From 2f8a41f8335cfb0d87481802657c4efd4bb69c8a Mon Sep 17 00:00:00 2001 From: Zeta_Null Date: Sun, 10 Sep 2023 12:35:35 -0400 Subject: [PATCH] First Commit Upload literally everything from the pokecrystal16 expand-move-ID branch --- .gitattributes | 37 + .gitignore | 57 + INSTALL.md | 172 + Makefile | 268 + README.md | 71 + audio.asm | 167 + audio/cries.asm | 2110 ++++ audio/cry_pointers.asm | 72 + audio/drumkits.asm | 260 + audio/engine.asm | 2852 +++++ audio/music/aftertherivalfight.asm | 65 + audio/music/azaleatown.asm | 654 ++ audio/music/battletowerlobby.asm | 309 + audio/music/battletowertheme.asm | 686 ++ audio/music/bicycle.asm | 515 + audio/music/buenaspassword.asm | 634 ++ audio/music/bugcatchingcontest.asm | 669 ++ audio/music/burnedtower.asm | 261 + audio/music/celadoncity.asm | 390 + audio/music/championbattle.asm | 777 ++ audio/music/cherrygrovecity.asm | 306 + audio/music/clair.asm | 434 + audio/music/contestresults.asm | 174 + audio/music/credits.asm | 1675 +++ audio/music/crystalopening.asm | 360 + audio/music/dancinghall.asm | 306 + audio/music/darkcave.asm | 487 + audio/music/dragonsden.asm | 173 + audio/music/ecruteakcity.asm | 668 ++ audio/music/elmslab.asm | 538 + audio/music/evolution.asm | 203 + audio/music/gamecorner.asm | 807 ++ audio/music/goldenrodcity.asm | 476 + audio/music/goldsilveropening.asm | 616 ++ audio/music/goldsilveropening2.asm | 218 + audio/music/gym.asm | 567 + audio/music/gymleadervictory.asm | 423 + audio/music/halloffame.asm | 174 + audio/music/healpokemon.asm | 51 + audio/music/indigoplateau.asm | 183 + audio/music/johtogymbattle.asm | 1023 ++ audio/music/johtotrainerbattle.asm | 1335 +++ audio/music/johtowildbattle.asm | 586 + audio/music/johtowildbattlenight.asm | 29 + audio/music/kantogymbattle.asm | 612 ++ audio/music/kantotrainerbattle.asm | 1537 +++ audio/music/kantowildbattle.asm | 1217 +++ audio/music/lakeofrage.asm | 323 + audio/music/lakeofragerocketradio.asm | 36 + audio/music/lavendertown.asm | 515 + audio/music/lighthouse.asm | 310 + audio/music/lookbeauty.asm | 326 + audio/music/lookhiker.asm | 115 + audio/music/lookkimonogirl.asm | 266 + audio/music/looklass.asm | 115 + audio/music/lookmysticalman.asm | 610 ++ audio/music/lookofficer.asm | 139 + audio/music/lookpokemaniac.asm | 162 + audio/music/lookrival.asm | 350 + audio/music/lookrocket.asm | 382 + audio/music/looksage.asm | 179 + audio/music/lookyoungster.asm | 296 + audio/music/magnettrain.asm | 281 + audio/music/mainmenu.asm | 146 + audio/music/mobileadapter.asm | 661 ++ audio/music/mobileadaptermenu.asm | 273 + audio/music/mobilecenter.asm | 485 + audio/music/mom.asm | 109 + audio/music/mtmoon.asm | 139 + audio/music/mtmoonsquare.asm | 108 + audio/music/nationalpark.asm | 659 ++ audio/music/newbarktown.asm | 325 + audio/music/nothing.asm | 12 + audio/music/pallettown.asm | 358 + audio/music/pokeflutechannel.asm | 228 + audio/music/pokemoncenter.asm | 405 + audio/music/pokemonchannel.asm | 232 + audio/music/pokemonlullaby.asm | 133 + audio/music/pokemonmarch.asm | 460 + audio/music/postcredits.asm | 265 + audio/music/printer.asm | 320 + audio/music/profoak.asm | 312 + audio/music/profoakspokemontalk.asm | 308 + audio/music/rivalbattle.asm | 864 ++ audio/music/rocketbattle.asm | 1031 ++ audio/music/rockethideout.asm | 310 + audio/music/rockettheme.asm | 475 + audio/music/route1.asm | 647 ++ audio/music/route12.asm | 452 + audio/music/route2.asm | 516 + audio/music/route26.asm | 666 ++ audio/music/route29.asm | 521 + audio/music/route3.asm | 503 + audio/music/route30.asm | 670 ++ audio/music/route36.asm | 522 + audio/music/route37.asm | 428 + audio/music/ruinsofalphinterior.asm | 47 + audio/music/ruinsofalphradio.asm | 74 + audio/music/showmearound.asm | 350 + audio/music/sprouttower.asm | 243 + audio/music/ssaqua.asm | 1173 ++ audio/music/successfulcapture.asm | 23 + audio/music/suicunebattle.asm | 2057 ++++ audio/music/surf.asm | 723 ++ audio/music/tintower.asm | 292 + audio/music/titlescreen.asm | 1170 ++ audio/music/trainervictory.asm | 233 + audio/music/unioncave.asm | 261 + audio/music/vermilioncity.asm | 338 + audio/music/victoryroad.asm | 200 + audio/music/violetcity.asm | 775 ++ audio/music/viridiancity.asm | 783 ++ audio/music/wildpokemonvictory.asm | 183 + audio/music_pointers.asm | 110 + audio/notes.asm | 29 + audio/sfx.asm | 5225 +++++++++ audio/sfx_crystal.asm | 285 + audio/sfx_pointers.asm | 212 + audio/wave_samples.asm | 13 + charmap.asm | 431 + constants/16_bit_locking_constants.asm | 41 + constants/16_bit_translation_constants.asm | 26 + constants/audio_constants.asm | 134 + constants/battle_anim_constants.asm | 853 ++ constants/battle_constants.asm | 269 + constants/battle_tower_constants.asm | 61 + constants/collision_constants.asm | 129 + constants/credits_constants.asm | 116 + constants/cry_constants.asm | 76 + constants/deco_constants.asm | 141 + constants/engine_flags.asm | 190 + constants/event_flags.asm | 1465 +++ constants/gfx_constants.asm | 57 + constants/hardware_constants.asm | 162 + constants/icon_constants.asm | 52 + constants/input_constants.asm | 26 + constants/item_constants.asm | 319 + constants/item_data_constants.asm | 144 + constants/landmark_constants.asm | 112 + constants/map_constants.asm | 504 + constants/map_data_constants.asm | 141 + constants/map_object_constants.asm | 308 + constants/map_setup_constants.asm | 24 + constants/mart_constants.asm | 45 + constants/menu_constants.asm | 114 + constants/misc_constants.asm | 49 + constants/mobile_constants.asm | 73 + constants/move_constants.asm | 304 + constants/move_effect_constants.asm | 160 + constants/music_constants.asm | 119 + constants/npc_trade_constants.asm | 47 + constants/phone_constants.asm | 72 + constants/pokemon_constants.asm | 321 + constants/pokemon_data_constants.asm | 230 + constants/printer_constants.asm | 9 + constants/radio_constants.asm | 132 + constants/scgb_constants.asm | 159 + constants/script_constants.asm | 328 + constants/serial_constants.asm | 48 + constants/sfx_constants.asm | 211 + constants/sprite_anim_constants.asm | 336 + constants/sprite_constants.asm | 169 + constants/sprite_data_constants.asm | 37 + constants/text_constants.asm | 50 + constants/tileset_constants.asm | 57 + constants/trainer_constants.asm | 706 ++ constants/trainer_data_constants.asm | 51 + constants/type_constants.asm | 39 + constants/wram_constants.asm | 320 + data/battle/accuracy_multipliers.asm | 17 + data/battle/ai/constant_damage_effects.asm | 10 + data/battle/ai/encore_moves.asm | 34 + data/battle/ai/rain_dance_moves.asm | 15 + data/battle/ai/reckless_moves.asm | 9 + data/battle/ai/residual_moves.asm | 16 + data/battle/ai/risky_effects.asm | 7 + data/battle/ai/stall_moves.asm | 37 + data/battle/ai/status_only_effects.asm | 9 + data/battle/ai/sunny_day_moves.asm | 13 + data/battle/ai/useful_moves.asm | 23 + data/battle/critical_hit_chances.asm | 8 + data/battle/effect_command_pointers.asm | 183 + data/battle/held_consumables.asm | 25 + data/battle/held_heal_status.asm | 10 + data/battle/held_stat_up.asm | 9 + data/battle/stat_multipliers.asm | 20 + data/battle/stat_multipliers_2.asm | 20 + data/battle/stat_names.asm | 12 + data/battle/weather_modifiers.asm | 10 + data/battle/wobble_probabilities.asm | 27 + data/battle_anims/ball_colors.asm | 15 + data/battle_anims/framesets.asm | 1270 +++ data/battle_anims/oam.asm | 1092 ++ data/battle_anims/object_gfx.asm | 52 + data/battle_anims/objects.asm | 398 + data/battle_tower/classes.asm | 79 + data/battle_tower/parties.asm | 5705 ++++++++++ data/battle_tower/trainer_text.asm | 623 ++ data/battle_tower/unknown.asm | 1406 +++ data/battle_tower/unknown_levels.asm | 36 + data/collision/collision_permissions.asm | 260 + data/collision/collision_stdscripts.asm | 18 + data/collision/field_move_blocks.asm | 55 + data/credits_script.asm | 286 + data/credits_strings.asm | 223 + data/decorations/attributes.asm | 89 + data/decorations/decorations.asm | 59 + data/decorations/mystery_gift_decos.asm | 39 + data/decorations/names.asm | 30 + data/default_options.asm | 18 + data/events/bug_contest_flags.asm | 13 + data/events/bug_contest_winners.asm | 80 + data/events/elevator_floors.asm | 37 + data/events/engine_flags.asm | 202 + data/events/happiness_changes.asm | 24 + data/events/happiness_probabilities.asm | 13 + data/events/magikarp_lengths.asm | 20 + data/events/npc_trades.asm | 22 + data/events/odd_eggs.asm | 437 + data/events/pokedex_ratings.asm | 22 + data/events/special_pointers.asm | 185 + data/events/unown_walls.asm | 45 + data/growth_rates.asm | 21 + data/icon_pointers.asm | 43 + data/items/apricorn_balls.asm | 10 + data/items/attributes.asm | 527 + data/items/bargain_shop.asm | 8 + data/items/buena_prizes.asm | 12 + data/items/catch_rate_items.asm | 18 + data/items/descriptions.asm | 917 ++ data/items/fruit_trees.asm | 34 + data/items/heal_hp.asm | 17 + data/items/heal_status.asm | 19 + data/items/mail_items.asm | 12 + data/items/marts.asm | 407 + data/items/mom_phone.asm | 29 + data/items/mystery_gift_items.asm | 39 + data/items/names.asm | 262 + data/items/pocket_names.asm | 13 + data/items/rooftop_sale.asm | 17 + data/items/x_stats.asm | 6 + data/maps/attributes.asm | 697 ++ data/maps/blocks.asm | 1047 ++ data/maps/environment_colors.asm | 37 + data/maps/flypoints.asm | 30 + data/maps/landmarks.asm | 210 + data/maps/map_data.asm | 10 + data/maps/maps.asm | 538 + data/maps/outdoor_sprites.asm | 671 ++ data/maps/roofs.asm | 51 + data/maps/scenes.asm | 87 + data/maps/scripts.asm | 486 + data/maps/setup_script_pointers.asm | 52 + data/maps/setup_scripts.asm | 183 + data/maps/sgb_roof_pal_inds.asm | 33 + data/maps/spawn_points.asm | 44 + data/mon_menu.asm | 36 + data/moves/animations.asm | 4823 +++++++++ data/moves/critical_hit_moves.asm | 9 + data/moves/descriptions.asm | 1266 +++ data/moves/effects.asm | 2079 ++++ data/moves/effects_pointers.asm | 161 + data/moves/effects_priorities.asm | 8 + data/moves/flail_reversal_power.asm | 8 + data/moves/magnitude_power.asm | 9 + data/moves/metronome_exception_moves.asm | 16 + data/moves/moves.asm | 272 + data/moves/names.asm | 254 + data/moves/present_power.asm | 6 + data/moves/tmhm_moves.asm | 27 + data/party_menu_qualities.asm | 40 + data/phone/non_trainer_names.asm | 17 + data/phone/permanent_numbers.asm | 4 + data/phone/phone_contacts.asm | 52 + data/phone/special_calls.asm | 19 + data/phone/text/alan_callee.asm | 59 + data/phone/text/alan_caller.asm | 98 + data/phone/text/alan_overworld.asm | 71 + data/phone/text/anthony_callee.asm | 73 + data/phone/text/anthony_caller.asm | 139 + data/phone/text/anthony_overworld.asm | 52 + data/phone/text/arnie_callee.asm | 62 + data/phone/text/arnie_caller.asm | 106 + data/phone/text/arnie_overworld.asm | 59 + data/phone/text/beth_callee.asm | 79 + data/phone/text/beth_caller.asm | 98 + data/phone/text/beth_overworld.asm | 56 + data/phone/text/beverly_callee.asm | 68 + data/phone/text/beverly_caller.asm | 82 + data/phone/text/beverly_overworld.asm | 60 + data/phone/text/bike_shop.asm | 19 + data/phone/text/bill.asm | 101 + data/phone/text/brent_callee.asm | 79 + data/phone/text/brent_caller.asm | 163 + data/phone/text/brent_overworld.asm | 62 + data/phone/text/buena.asm | 524 + data/phone/text/chad_callee.asm | 78 + data/phone/text/chad_caller.asm | 245 + data/phone/text/chad_overworld.asm | 56 + data/phone/text/dana_callee.asm | 68 + data/phone/text/dana_caller.asm | 110 + data/phone/text/dana_overworld.asm | 72 + data/phone/text/derek_callee.asm | 64 + data/phone/text/derek_caller.asm | 105 + data/phone/text/derek_overworld.asm | 61 + data/phone/text/elm.asm | 211 + data/phone/text/erin_callee.asm | 68 + data/phone/text/erin_caller.asm | 67 + data/phone/text/erin_overworld.asm | 63 + data/phone/text/gaven_callee.asm | 72 + data/phone/text/gaven_caller.asm | 85 + data/phone/text/gaven_overworld.asm | 63 + data/phone/text/gina_callee.asm | 66 + data/phone/text/gina_caller.asm | 119 + data/phone/text/gina_overworld.asm | 67 + data/phone/text/huey_callee.asm | 59 + data/phone/text/huey_caller.asm | 43 + data/phone/text/huey_overworld.asm | 80 + data/phone/text/irwin_callee.asm | 56 + data/phone/text/irwin_caller.asm | 289 + data/phone/text/irwin_overworld.asm | 53 + data/phone/text/jack_callee.asm | 71 + data/phone/text/jack_caller.asm | 193 + data/phone/text/jack_overworld.asm | 55 + data/phone/text/joey_callee.asm | 73 + data/phone/text/joey_caller.asm | 91 + data/phone/text/joey_overworld.asm | 71 + data/phone/text/jose_callee.asm | 69 + data/phone/text/jose_caller.asm | 130 + data/phone/text/jose_overworld.asm | 73 + data/phone/text/kenji_callee.asm | 44 + data/phone/text/kenji_caller.asm | 63 + data/phone/text/kenji_overworld.asm | 67 + data/phone/text/liz_callee.asm | 81 + data/phone/text/liz_caller.asm | 308 + data/phone/text/liz_overworld.asm | 44 + data/phone/text/mom.asm | 165 + data/phone/text/parry_callee.asm | 72 + data/phone/text/parry_caller.asm | 69 + data/phone/text/parry_overworld.asm | 73 + data/phone/text/ralph_callee.asm | 59 + data/phone/text/ralph_caller.asm | 133 + data/phone/text/ralph_overworld.asm | 58 + data/phone/text/reena_callee.asm | 72 + data/phone/text/reena_caller.asm | 88 + data/phone/text/reena_overworld.asm | 45 + data/phone/text/tiffany_callee.asm | 78 + data/phone/text/tiffany_caller.asm | 137 + data/phone/text/tiffany_overworld.asm | 62 + data/phone/text/todd_callee.asm | 70 + data/phone/text/todd_caller.asm | 117 + data/phone/text/todd_overworld.asm | 67 + data/phone/text/tully_callee.asm | 67 + data/phone/text/tully_caller.asm | 104 + data/phone/text/tully_overworld.asm | 73 + data/phone/text/unknown_callee.asm | 30 + data/phone/text/unused.asm | 3 + data/phone/text/vance_callee.asm | 81 + data/phone/text/vance_caller.asm | 64 + data/phone/text/vance_overworld.asm | 73 + data/phone/text/wade_callee.asm | 77 + data/phone/text/wade_caller.asm | 136 + data/phone/text/wade_overworld.asm | 70 + data/phone/text/wilton_callee.asm | 64 + data/phone/text/wilton_caller.asm | 103 + data/phone/text/wilton_overworld.asm | 61 + data/player_names.asm | 37 + data/pokemon/base_stats.asm | 281 + data/pokemon/base_stats/abra.asm | 21 + data/pokemon/base_stats/aerodactyl.asm | 21 + data/pokemon/base_stats/aipom.asm | 21 + data/pokemon/base_stats/alakazam.asm | 21 + data/pokemon/base_stats/ampharos.asm | 21 + data/pokemon/base_stats/arbok.asm | 21 + data/pokemon/base_stats/arcanine.asm | 21 + data/pokemon/base_stats/ariados.asm | 21 + data/pokemon/base_stats/articuno.asm | 21 + data/pokemon/base_stats/azumarill.asm | 21 + data/pokemon/base_stats/bayleef.asm | 21 + data/pokemon/base_stats/beedrill.asm | 21 + data/pokemon/base_stats/bellossom.asm | 21 + data/pokemon/base_stats/bellsprout.asm | 21 + data/pokemon/base_stats/blastoise.asm | 21 + data/pokemon/base_stats/blissey.asm | 21 + data/pokemon/base_stats/bulbasaur.asm | 21 + data/pokemon/base_stats/butterfree.asm | 21 + data/pokemon/base_stats/caterpie.asm | 21 + data/pokemon/base_stats/celebi.asm | 21 + data/pokemon/base_stats/chansey.asm | 21 + data/pokemon/base_stats/charizard.asm | 21 + data/pokemon/base_stats/charmander.asm | 21 + data/pokemon/base_stats/charmeleon.asm | 21 + data/pokemon/base_stats/chikorita.asm | 21 + data/pokemon/base_stats/chinchou.asm | 21 + data/pokemon/base_stats/clefable.asm | 21 + data/pokemon/base_stats/clefairy.asm | 21 + data/pokemon/base_stats/cleffa.asm | 21 + data/pokemon/base_stats/cloyster.asm | 21 + data/pokemon/base_stats/corsola.asm | 21 + data/pokemon/base_stats/crobat.asm | 21 + data/pokemon/base_stats/croconaw.asm | 21 + data/pokemon/base_stats/cubone.asm | 21 + data/pokemon/base_stats/cyndaquil.asm | 21 + data/pokemon/base_stats/delibird.asm | 21 + data/pokemon/base_stats/dewgong.asm | 21 + data/pokemon/base_stats/diglett.asm | 21 + data/pokemon/base_stats/ditto.asm | 21 + data/pokemon/base_stats/dodrio.asm | 21 + data/pokemon/base_stats/doduo.asm | 21 + data/pokemon/base_stats/donphan.asm | 21 + data/pokemon/base_stats/dragonair.asm | 21 + data/pokemon/base_stats/dragonite.asm | 21 + data/pokemon/base_stats/dratini.asm | 21 + data/pokemon/base_stats/drowzee.asm | 21 + data/pokemon/base_stats/dugtrio.asm | 21 + data/pokemon/base_stats/dunsparce.asm | 21 + data/pokemon/base_stats/eevee.asm | 21 + data/pokemon/base_stats/ekans.asm | 21 + data/pokemon/base_stats/electabuzz.asm | 21 + data/pokemon/base_stats/electrode.asm | 21 + data/pokemon/base_stats/elekid.asm | 21 + data/pokemon/base_stats/entei.asm | 21 + data/pokemon/base_stats/espeon.asm | 21 + data/pokemon/base_stats/exeggcute.asm | 21 + data/pokemon/base_stats/exeggutor.asm | 21 + data/pokemon/base_stats/farfetch_d.asm | 21 + data/pokemon/base_stats/fearow.asm | 21 + data/pokemon/base_stats/feraligatr.asm | 21 + data/pokemon/base_stats/flaaffy.asm | 21 + data/pokemon/base_stats/flareon.asm | 21 + data/pokemon/base_stats/forretress.asm | 21 + data/pokemon/base_stats/furret.asm | 21 + data/pokemon/base_stats/gastly.asm | 21 + data/pokemon/base_stats/gengar.asm | 21 + data/pokemon/base_stats/geodude.asm | 21 + data/pokemon/base_stats/girafarig.asm | 21 + data/pokemon/base_stats/gligar.asm | 21 + data/pokemon/base_stats/gloom.asm | 21 + data/pokemon/base_stats/golbat.asm | 21 + data/pokemon/base_stats/goldeen.asm | 21 + data/pokemon/base_stats/golduck.asm | 21 + data/pokemon/base_stats/golem.asm | 21 + data/pokemon/base_stats/granbull.asm | 21 + data/pokemon/base_stats/graveler.asm | 21 + data/pokemon/base_stats/grimer.asm | 21 + data/pokemon/base_stats/growlithe.asm | 21 + data/pokemon/base_stats/gyarados.asm | 21 + data/pokemon/base_stats/haunter.asm | 21 + data/pokemon/base_stats/heracross.asm | 21 + data/pokemon/base_stats/hitmonchan.asm | 21 + data/pokemon/base_stats/hitmonlee.asm | 21 + data/pokemon/base_stats/hitmontop.asm | 21 + data/pokemon/base_stats/ho_oh.asm | 21 + data/pokemon/base_stats/hoothoot.asm | 21 + data/pokemon/base_stats/hoppip.asm | 21 + data/pokemon/base_stats/horsea.asm | 21 + data/pokemon/base_stats/houndoom.asm | 21 + data/pokemon/base_stats/houndour.asm | 21 + data/pokemon/base_stats/hypno.asm | 21 + data/pokemon/base_stats/igglybuff.asm | 21 + data/pokemon/base_stats/ivysaur.asm | 21 + data/pokemon/base_stats/jigglypuff.asm | 21 + data/pokemon/base_stats/jolteon.asm | 21 + data/pokemon/base_stats/jumpluff.asm | 21 + data/pokemon/base_stats/jynx.asm | 21 + data/pokemon/base_stats/kabuto.asm | 21 + data/pokemon/base_stats/kabutops.asm | 21 + data/pokemon/base_stats/kadabra.asm | 21 + data/pokemon/base_stats/kakuna.asm | 21 + data/pokemon/base_stats/kangaskhan.asm | 21 + data/pokemon/base_stats/kingdra.asm | 21 + data/pokemon/base_stats/kingler.asm | 21 + data/pokemon/base_stats/koffing.asm | 21 + data/pokemon/base_stats/krabby.asm | 21 + data/pokemon/base_stats/lanturn.asm | 21 + data/pokemon/base_stats/lapras.asm | 21 + data/pokemon/base_stats/larvitar.asm | 21 + data/pokemon/base_stats/ledian.asm | 21 + data/pokemon/base_stats/ledyba.asm | 21 + data/pokemon/base_stats/lickitung.asm | 21 + data/pokemon/base_stats/lugia.asm | 21 + data/pokemon/base_stats/machamp.asm | 21 + data/pokemon/base_stats/machoke.asm | 21 + data/pokemon/base_stats/machop.asm | 21 + data/pokemon/base_stats/magby.asm | 21 + data/pokemon/base_stats/magcargo.asm | 21 + data/pokemon/base_stats/magikarp.asm | 21 + data/pokemon/base_stats/magmar.asm | 21 + data/pokemon/base_stats/magnemite.asm | 21 + data/pokemon/base_stats/magneton.asm | 21 + data/pokemon/base_stats/mankey.asm | 21 + data/pokemon/base_stats/mantine.asm | 21 + data/pokemon/base_stats/mareep.asm | 21 + data/pokemon/base_stats/marill.asm | 21 + data/pokemon/base_stats/marowak.asm | 21 + data/pokemon/base_stats/meganium.asm | 21 + data/pokemon/base_stats/meowth.asm | 21 + data/pokemon/base_stats/metapod.asm | 21 + data/pokemon/base_stats/mew.asm | 21 + data/pokemon/base_stats/mewtwo.asm | 21 + data/pokemon/base_stats/miltank.asm | 21 + data/pokemon/base_stats/misdreavus.asm | 21 + data/pokemon/base_stats/moltres.asm | 21 + data/pokemon/base_stats/mr__mime.asm | 21 + data/pokemon/base_stats/muk.asm | 21 + data/pokemon/base_stats/murkrow.asm | 21 + data/pokemon/base_stats/natu.asm | 21 + data/pokemon/base_stats/nidoking.asm | 21 + data/pokemon/base_stats/nidoqueen.asm | 21 + data/pokemon/base_stats/nidoran_f.asm | 21 + data/pokemon/base_stats/nidoran_m.asm | 21 + data/pokemon/base_stats/nidorina.asm | 21 + data/pokemon/base_stats/nidorino.asm | 21 + data/pokemon/base_stats/ninetales.asm | 21 + data/pokemon/base_stats/noctowl.asm | 21 + data/pokemon/base_stats/octillery.asm | 21 + data/pokemon/base_stats/oddish.asm | 21 + data/pokemon/base_stats/omanyte.asm | 21 + data/pokemon/base_stats/omastar.asm | 21 + data/pokemon/base_stats/onix.asm | 21 + data/pokemon/base_stats/paras.asm | 21 + data/pokemon/base_stats/parasect.asm | 21 + data/pokemon/base_stats/persian.asm | 21 + data/pokemon/base_stats/phanpy.asm | 21 + data/pokemon/base_stats/pichu.asm | 21 + data/pokemon/base_stats/pidgeot.asm | 21 + data/pokemon/base_stats/pidgeotto.asm | 21 + data/pokemon/base_stats/pidgey.asm | 21 + data/pokemon/base_stats/pikachu.asm | 21 + data/pokemon/base_stats/piloswine.asm | 21 + data/pokemon/base_stats/pineco.asm | 21 + data/pokemon/base_stats/pinsir.asm | 21 + data/pokemon/base_stats/politoed.asm | 21 + data/pokemon/base_stats/poliwag.asm | 21 + data/pokemon/base_stats/poliwhirl.asm | 21 + data/pokemon/base_stats/poliwrath.asm | 21 + data/pokemon/base_stats/ponyta.asm | 21 + data/pokemon/base_stats/porygon.asm | 21 + data/pokemon/base_stats/porygon2.asm | 21 + data/pokemon/base_stats/primeape.asm | 21 + data/pokemon/base_stats/psyduck.asm | 21 + data/pokemon/base_stats/pupitar.asm | 21 + data/pokemon/base_stats/quagsire.asm | 21 + data/pokemon/base_stats/quilava.asm | 21 + data/pokemon/base_stats/qwilfish.asm | 21 + data/pokemon/base_stats/raichu.asm | 21 + data/pokemon/base_stats/raikou.asm | 21 + data/pokemon/base_stats/rapidash.asm | 21 + data/pokemon/base_stats/raticate.asm | 21 + data/pokemon/base_stats/rattata.asm | 21 + data/pokemon/base_stats/remoraid.asm | 21 + data/pokemon/base_stats/rhydon.asm | 21 + data/pokemon/base_stats/rhyhorn.asm | 21 + data/pokemon/base_stats/sandshrew.asm | 21 + data/pokemon/base_stats/sandslash.asm | 21 + data/pokemon/base_stats/scizor.asm | 21 + data/pokemon/base_stats/scyther.asm | 21 + data/pokemon/base_stats/seadra.asm | 21 + data/pokemon/base_stats/seaking.asm | 21 + data/pokemon/base_stats/seel.asm | 21 + data/pokemon/base_stats/sentret.asm | 21 + data/pokemon/base_stats/shellder.asm | 21 + data/pokemon/base_stats/shuckle.asm | 21 + data/pokemon/base_stats/skarmory.asm | 21 + data/pokemon/base_stats/skiploom.asm | 21 + data/pokemon/base_stats/slowbro.asm | 21 + data/pokemon/base_stats/slowking.asm | 21 + data/pokemon/base_stats/slowpoke.asm | 21 + data/pokemon/base_stats/slugma.asm | 21 + data/pokemon/base_stats/smeargle.asm | 21 + data/pokemon/base_stats/smoochum.asm | 21 + data/pokemon/base_stats/sneasel.asm | 21 + data/pokemon/base_stats/snorlax.asm | 21 + data/pokemon/base_stats/snubbull.asm | 21 + data/pokemon/base_stats/spearow.asm | 21 + data/pokemon/base_stats/spinarak.asm | 21 + data/pokemon/base_stats/squirtle.asm | 21 + data/pokemon/base_stats/stantler.asm | 21 + data/pokemon/base_stats/starmie.asm | 21 + data/pokemon/base_stats/staryu.asm | 21 + data/pokemon/base_stats/steelix.asm | 21 + data/pokemon/base_stats/sudowoodo.asm | 21 + data/pokemon/base_stats/suicune.asm | 21 + data/pokemon/base_stats/sunflora.asm | 21 + data/pokemon/base_stats/sunkern.asm | 21 + data/pokemon/base_stats/swinub.asm | 21 + data/pokemon/base_stats/tangela.asm | 21 + data/pokemon/base_stats/tauros.asm | 21 + data/pokemon/base_stats/teddiursa.asm | 21 + data/pokemon/base_stats/tentacool.asm | 21 + data/pokemon/base_stats/tentacruel.asm | 21 + data/pokemon/base_stats/togepi.asm | 21 + data/pokemon/base_stats/togetic.asm | 21 + data/pokemon/base_stats/totodile.asm | 21 + data/pokemon/base_stats/typhlosion.asm | 21 + data/pokemon/base_stats/tyranitar.asm | 21 + data/pokemon/base_stats/tyrogue.asm | 21 + data/pokemon/base_stats/umbreon.asm | 21 + data/pokemon/base_stats/unown.asm | 21 + data/pokemon/base_stats/ursaring.asm | 21 + data/pokemon/base_stats/vaporeon.asm | 21 + data/pokemon/base_stats/venomoth.asm | 21 + data/pokemon/base_stats/venonat.asm | 21 + data/pokemon/base_stats/venusaur.asm | 21 + data/pokemon/base_stats/victreebel.asm | 21 + data/pokemon/base_stats/vileplume.asm | 21 + data/pokemon/base_stats/voltorb.asm | 21 + data/pokemon/base_stats/vulpix.asm | 21 + data/pokemon/base_stats/wartortle.asm | 21 + data/pokemon/base_stats/weedle.asm | 21 + data/pokemon/base_stats/weepinbell.asm | 21 + data/pokemon/base_stats/weezing.asm | 21 + data/pokemon/base_stats/wigglytuff.asm | 21 + data/pokemon/base_stats/wobbuffet.asm | 21 + data/pokemon/base_stats/wooper.asm | 21 + data/pokemon/base_stats/xatu.asm | 21 + data/pokemon/base_stats/yanma.asm | 21 + data/pokemon/base_stats/zapdos.asm | 21 + data/pokemon/base_stats/zubat.asm | 21 + data/pokemon/cries.asm | 260 + data/pokemon/dex_entries.asm | 265 + data/pokemon/dex_entries/abra.asm | 10 + data/pokemon/dex_entries/aerodactyl.asm | 10 + data/pokemon/dex_entries/aipom.asm | 10 + data/pokemon/dex_entries/alakazam.asm | 10 + data/pokemon/dex_entries/ampharos.asm | 10 + data/pokemon/dex_entries/arbok.asm | 10 + data/pokemon/dex_entries/arcanine.asm | 10 + data/pokemon/dex_entries/ariados.asm | 10 + data/pokemon/dex_entries/articuno.asm | 10 + data/pokemon/dex_entries/azumarill.asm | 10 + data/pokemon/dex_entries/bayleef.asm | 10 + data/pokemon/dex_entries/beedrill.asm | 10 + data/pokemon/dex_entries/bellossom.asm | 10 + data/pokemon/dex_entries/bellsprout.asm | 10 + data/pokemon/dex_entries/blastoise.asm | 10 + data/pokemon/dex_entries/blissey.asm | 10 + data/pokemon/dex_entries/bulbasaur.asm | 10 + data/pokemon/dex_entries/butterfree.asm | 10 + data/pokemon/dex_entries/caterpie.asm | 10 + data/pokemon/dex_entries/celebi.asm | 10 + data/pokemon/dex_entries/chansey.asm | 10 + data/pokemon/dex_entries/charizard.asm | 10 + data/pokemon/dex_entries/charmander.asm | 10 + data/pokemon/dex_entries/charmeleon.asm | 10 + data/pokemon/dex_entries/chikorita.asm | 10 + data/pokemon/dex_entries/chinchou.asm | 10 + data/pokemon/dex_entries/clefable.asm | 10 + data/pokemon/dex_entries/clefairy.asm | 10 + data/pokemon/dex_entries/cleffa.asm | 10 + data/pokemon/dex_entries/cloyster.asm | 10 + data/pokemon/dex_entries/corsola.asm | 10 + data/pokemon/dex_entries/crobat.asm | 10 + data/pokemon/dex_entries/croconaw.asm | 10 + data/pokemon/dex_entries/cubone.asm | 10 + data/pokemon/dex_entries/cyndaquil.asm | 10 + data/pokemon/dex_entries/delibird.asm | 10 + data/pokemon/dex_entries/dewgong.asm | 10 + data/pokemon/dex_entries/diglett.asm | 10 + data/pokemon/dex_entries/ditto.asm | 10 + data/pokemon/dex_entries/dodrio.asm | 10 + data/pokemon/dex_entries/doduo.asm | 10 + data/pokemon/dex_entries/donphan.asm | 10 + data/pokemon/dex_entries/dragonair.asm | 10 + data/pokemon/dex_entries/dragonite.asm | 10 + data/pokemon/dex_entries/dratini.asm | 10 + data/pokemon/dex_entries/drowzee.asm | 10 + data/pokemon/dex_entries/dugtrio.asm | 10 + data/pokemon/dex_entries/dunsparce.asm | 10 + data/pokemon/dex_entries/eevee.asm | 10 + data/pokemon/dex_entries/ekans.asm | 10 + data/pokemon/dex_entries/electabuzz.asm | 10 + data/pokemon/dex_entries/electrode.asm | 10 + data/pokemon/dex_entries/elekid.asm | 10 + data/pokemon/dex_entries/entei.asm | 10 + data/pokemon/dex_entries/espeon.asm | 10 + data/pokemon/dex_entries/exeggcute.asm | 10 + data/pokemon/dex_entries/exeggutor.asm | 10 + data/pokemon/dex_entries/farfetch_d.asm | 10 + data/pokemon/dex_entries/fearow.asm | 10 + data/pokemon/dex_entries/feraligatr.asm | 10 + data/pokemon/dex_entries/flaaffy.asm | 10 + data/pokemon/dex_entries/flareon.asm | 10 + data/pokemon/dex_entries/forretress.asm | 10 + data/pokemon/dex_entries/furret.asm | 10 + data/pokemon/dex_entries/gastly.asm | 10 + data/pokemon/dex_entries/gengar.asm | 10 + data/pokemon/dex_entries/geodude.asm | 10 + data/pokemon/dex_entries/girafarig.asm | 10 + data/pokemon/dex_entries/gligar.asm | 10 + data/pokemon/dex_entries/gloom.asm | 10 + data/pokemon/dex_entries/golbat.asm | 10 + data/pokemon/dex_entries/goldeen.asm | 10 + data/pokemon/dex_entries/golduck.asm | 10 + data/pokemon/dex_entries/golem.asm | 10 + data/pokemon/dex_entries/granbull.asm | 10 + data/pokemon/dex_entries/graveler.asm | 10 + data/pokemon/dex_entries/grimer.asm | 10 + data/pokemon/dex_entries/growlithe.asm | 10 + data/pokemon/dex_entries/gyarados.asm | 10 + data/pokemon/dex_entries/haunter.asm | 10 + data/pokemon/dex_entries/heracross.asm | 10 + data/pokemon/dex_entries/hitmonchan.asm | 10 + data/pokemon/dex_entries/hitmonlee.asm | 10 + data/pokemon/dex_entries/hitmontop.asm | 10 + data/pokemon/dex_entries/ho_oh.asm | 10 + data/pokemon/dex_entries/hoothoot.asm | 10 + data/pokemon/dex_entries/hoppip.asm | 10 + data/pokemon/dex_entries/horsea.asm | 10 + data/pokemon/dex_entries/houndoom.asm | 10 + data/pokemon/dex_entries/houndour.asm | 10 + data/pokemon/dex_entries/hypno.asm | 10 + data/pokemon/dex_entries/igglybuff.asm | 10 + data/pokemon/dex_entries/ivysaur.asm | 10 + data/pokemon/dex_entries/jigglypuff.asm | 10 + data/pokemon/dex_entries/jolteon.asm | 10 + data/pokemon/dex_entries/jumpluff.asm | 10 + data/pokemon/dex_entries/jynx.asm | 10 + data/pokemon/dex_entries/kabuto.asm | 10 + data/pokemon/dex_entries/kabutops.asm | 10 + data/pokemon/dex_entries/kadabra.asm | 10 + data/pokemon/dex_entries/kakuna.asm | 10 + data/pokemon/dex_entries/kangaskhan.asm | 10 + data/pokemon/dex_entries/kingdra.asm | 10 + data/pokemon/dex_entries/kingler.asm | 10 + data/pokemon/dex_entries/koffing.asm | 10 + data/pokemon/dex_entries/krabby.asm | 10 + data/pokemon/dex_entries/lanturn.asm | 10 + data/pokemon/dex_entries/lapras.asm | 10 + data/pokemon/dex_entries/larvitar.asm | 10 + data/pokemon/dex_entries/ledian.asm | 10 + data/pokemon/dex_entries/ledyba.asm | 10 + data/pokemon/dex_entries/lickitung.asm | 10 + data/pokemon/dex_entries/lugia.asm | 10 + data/pokemon/dex_entries/machamp.asm | 10 + data/pokemon/dex_entries/machoke.asm | 10 + data/pokemon/dex_entries/machop.asm | 10 + data/pokemon/dex_entries/magby.asm | 10 + data/pokemon/dex_entries/magcargo.asm | 10 + data/pokemon/dex_entries/magikarp.asm | 10 + data/pokemon/dex_entries/magmar.asm | 10 + data/pokemon/dex_entries/magnemite.asm | 10 + data/pokemon/dex_entries/magneton.asm | 10 + data/pokemon/dex_entries/mankey.asm | 10 + data/pokemon/dex_entries/mantine.asm | 10 + data/pokemon/dex_entries/mareep.asm | 10 + data/pokemon/dex_entries/marill.asm | 10 + data/pokemon/dex_entries/marowak.asm | 10 + data/pokemon/dex_entries/meganium.asm | 10 + data/pokemon/dex_entries/meowth.asm | 10 + data/pokemon/dex_entries/metapod.asm | 10 + data/pokemon/dex_entries/mew.asm | 10 + data/pokemon/dex_entries/mewtwo.asm | 10 + data/pokemon/dex_entries/miltank.asm | 10 + data/pokemon/dex_entries/misdreavus.asm | 10 + data/pokemon/dex_entries/moltres.asm | 10 + data/pokemon/dex_entries/mr__mime.asm | 10 + data/pokemon/dex_entries/muk.asm | 10 + data/pokemon/dex_entries/murkrow.asm | 10 + data/pokemon/dex_entries/natu.asm | 10 + data/pokemon/dex_entries/nidoking.asm | 10 + data/pokemon/dex_entries/nidoqueen.asm | 10 + data/pokemon/dex_entries/nidoran_f.asm | 10 + data/pokemon/dex_entries/nidoran_m.asm | 10 + data/pokemon/dex_entries/nidorina.asm | 10 + data/pokemon/dex_entries/nidorino.asm | 10 + data/pokemon/dex_entries/ninetales.asm | 10 + data/pokemon/dex_entries/noctowl.asm | 10 + data/pokemon/dex_entries/octillery.asm | 10 + data/pokemon/dex_entries/oddish.asm | 10 + data/pokemon/dex_entries/omanyte.asm | 10 + data/pokemon/dex_entries/omastar.asm | 10 + data/pokemon/dex_entries/onix.asm | 10 + data/pokemon/dex_entries/paras.asm | 10 + data/pokemon/dex_entries/parasect.asm | 10 + data/pokemon/dex_entries/persian.asm | 10 + data/pokemon/dex_entries/phanpy.asm | 10 + data/pokemon/dex_entries/pichu.asm | 10 + data/pokemon/dex_entries/pidgeot.asm | 10 + data/pokemon/dex_entries/pidgeotto.asm | 10 + data/pokemon/dex_entries/pidgey.asm | 10 + data/pokemon/dex_entries/pikachu.asm | 10 + data/pokemon/dex_entries/piloswine.asm | 10 + data/pokemon/dex_entries/pineco.asm | 10 + data/pokemon/dex_entries/pinsir.asm | 10 + data/pokemon/dex_entries/politoed.asm | 10 + data/pokemon/dex_entries/poliwag.asm | 10 + data/pokemon/dex_entries/poliwhirl.asm | 10 + data/pokemon/dex_entries/poliwrath.asm | 10 + data/pokemon/dex_entries/ponyta.asm | 10 + data/pokemon/dex_entries/porygon.asm | 10 + data/pokemon/dex_entries/porygon2.asm | 10 + data/pokemon/dex_entries/primeape.asm | 10 + data/pokemon/dex_entries/psyduck.asm | 10 + data/pokemon/dex_entries/pupitar.asm | 10 + data/pokemon/dex_entries/quagsire.asm | 10 + data/pokemon/dex_entries/quilava.asm | 10 + data/pokemon/dex_entries/qwilfish.asm | 10 + data/pokemon/dex_entries/raichu.asm | 10 + data/pokemon/dex_entries/raikou.asm | 10 + data/pokemon/dex_entries/rapidash.asm | 10 + data/pokemon/dex_entries/raticate.asm | 10 + data/pokemon/dex_entries/rattata.asm | 10 + data/pokemon/dex_entries/remoraid.asm | 10 + data/pokemon/dex_entries/rhydon.asm | 10 + data/pokemon/dex_entries/rhyhorn.asm | 10 + data/pokemon/dex_entries/sandshrew.asm | 10 + data/pokemon/dex_entries/sandslash.asm | 10 + data/pokemon/dex_entries/scizor.asm | 10 + data/pokemon/dex_entries/scyther.asm | 10 + data/pokemon/dex_entries/seadra.asm | 10 + data/pokemon/dex_entries/seaking.asm | 10 + data/pokemon/dex_entries/seel.asm | 10 + data/pokemon/dex_entries/sentret.asm | 10 + data/pokemon/dex_entries/shellder.asm | 10 + data/pokemon/dex_entries/shuckle.asm | 10 + data/pokemon/dex_entries/skarmory.asm | 10 + data/pokemon/dex_entries/skiploom.asm | 10 + data/pokemon/dex_entries/slowbro.asm | 10 + data/pokemon/dex_entries/slowking.asm | 10 + data/pokemon/dex_entries/slowpoke.asm | 10 + data/pokemon/dex_entries/slugma.asm | 10 + data/pokemon/dex_entries/smeargle.asm | 10 + data/pokemon/dex_entries/smoochum.asm | 10 + data/pokemon/dex_entries/sneasel.asm | 10 + data/pokemon/dex_entries/snorlax.asm | 10 + data/pokemon/dex_entries/snubbull.asm | 10 + data/pokemon/dex_entries/spearow.asm | 10 + data/pokemon/dex_entries/spinarak.asm | 10 + data/pokemon/dex_entries/squirtle.asm | 10 + data/pokemon/dex_entries/stantler.asm | 10 + data/pokemon/dex_entries/starmie.asm | 10 + data/pokemon/dex_entries/staryu.asm | 10 + data/pokemon/dex_entries/steelix.asm | 10 + data/pokemon/dex_entries/sudowoodo.asm | 10 + data/pokemon/dex_entries/suicune.asm | 10 + data/pokemon/dex_entries/sunflora.asm | 10 + data/pokemon/dex_entries/sunkern.asm | 10 + data/pokemon/dex_entries/swinub.asm | 10 + data/pokemon/dex_entries/tangela.asm | 10 + data/pokemon/dex_entries/tauros.asm | 10 + data/pokemon/dex_entries/teddiursa.asm | 10 + data/pokemon/dex_entries/tentacool.asm | 10 + data/pokemon/dex_entries/tentacruel.asm | 10 + data/pokemon/dex_entries/togepi.asm | 10 + data/pokemon/dex_entries/togetic.asm | 10 + data/pokemon/dex_entries/totodile.asm | 10 + data/pokemon/dex_entries/typhlosion.asm | 10 + data/pokemon/dex_entries/tyranitar.asm | 10 + data/pokemon/dex_entries/tyrogue.asm | 10 + data/pokemon/dex_entries/umbreon.asm | 10 + data/pokemon/dex_entries/unown.asm | 10 + data/pokemon/dex_entries/ursaring.asm | 10 + data/pokemon/dex_entries/vaporeon.asm | 10 + data/pokemon/dex_entries/venomoth.asm | 10 + data/pokemon/dex_entries/venonat.asm | 10 + data/pokemon/dex_entries/venusaur.asm | 10 + data/pokemon/dex_entries/victreebel.asm | 10 + data/pokemon/dex_entries/vileplume.asm | 10 + data/pokemon/dex_entries/voltorb.asm | 10 + data/pokemon/dex_entries/vulpix.asm | 10 + data/pokemon/dex_entries/wartortle.asm | 10 + data/pokemon/dex_entries/weedle.asm | 10 + data/pokemon/dex_entries/weepinbell.asm | 10 + data/pokemon/dex_entries/weezing.asm | 10 + data/pokemon/dex_entries/wigglytuff.asm | 10 + data/pokemon/dex_entries/wobbuffet.asm | 10 + data/pokemon/dex_entries/wooper.asm | 10 + data/pokemon/dex_entries/xatu.asm | 10 + data/pokemon/dex_entries/yanma.asm | 10 + data/pokemon/dex_entries/zapdos.asm | 10 + data/pokemon/dex_entries/zubat.asm | 10 + data/pokemon/dex_entry_pointers.asm | 255 + data/pokemon/dex_order_alpha.asm | 256 + data/pokemon/dex_order_new.asm | 256 + data/pokemon/egg_moves.asm | 18 + data/pokemon/egg_moves_johto.asm | 470 + data/pokemon/egg_moves_kanto.asm | 586 + data/pokemon/evos_attacks.asm | 24 + data/pokemon/evos_attacks_johto.asm | 1405 +++ data/pokemon/evos_attacks_kanto.asm | 2195 ++++ data/pokemon/ezchat_order.asm | 95 + data/pokemon/first_stages.asm | 255 + data/pokemon/gen1_base_special.asm | 156 + data/pokemon/gen1_order.asm | 256 + data/pokemon/menu_icons.asm | 256 + data/pokemon/names.asm | 258 + data/pokemon/palettes.asm | 539 + data/pokemon/pic_pointers.asm | 521 + data/pokemon/unown_pic_pointers.asm | 56 + data/pokemon/unown_words.asm | 65 + data/predef_pointers.asm | 83 + data/radio/buenas_passwords.asm | 31 + data/radio/channel_music.asm | 15 + data/radio/oaks_pkmn_talk_routes.asm | 19 + data/radio/pnp_hidden_people.asm | 26 + data/radio/pnp_places.asm | 13 + data/sgb_ctrl_packets.asm | 133 + data/sprite_anims/framesets.asm | 499 + data/sprite_anims/oam.asm | 1135 ++ data/sprite_anims/sequences.asm | 95 + data/sprite_anims/unused_gfx.asm | 23 + data/sprites/emotes.asm | 23 + data/sprites/facings.asm | 238 + data/sprites/map_objects.asm | 309 + data/sprites/player_sprites.asm | 13 + data/sprites/sprite_mons.asm | 39 + data/sprites/sprites.asm | 112 + data/text/battle.asm | 1108 ++ data/text/common.asm | 13 + data/text/common_1.asm | 1878 ++++ data/text/common_2.asm | 1551 +++ data/text/common_3.asm | 1515 +++ data/text/mail_input_chars.asm | 17 + data/text/name_input_chars.asm | 31 + data/text/std_text.asm | 388 + data/text_buffers.asm | 9 + data/tilesets.asm | 53 + .../aerodactyl_word_room_collision.asm | 64 + .../aerodactyl_word_room_metatiles.bin | 17 + .../battle_tower_inside_collision.asm | 64 + .../battle_tower_inside_metatiles.bin | Bin 0 -> 1024 bytes .../battle_tower_outside_collision.asm | 128 + .../battle_tower_outside_metatiles.bin | Bin 0 -> 2048 bytes data/tilesets/beta_word_room_collision.asm | 64 + data/tilesets/beta_word_room_metatiles.bin | 17 + data/tilesets/cave_collision.asm | 64 + data/tilesets/cave_metatiles.bin | 6 + data/tilesets/champions_room_collision.asm | 64 + data/tilesets/champions_room_metatiles.bin | 15 + data/tilesets/dark_cave_collision.asm | 64 + data/tilesets/dark_cave_metatiles.bin | 6 + data/tilesets/elite_four_room_collision.asm | 64 + data/tilesets/elite_four_room_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/facility_collision.asm | 64 + data/tilesets/facility_metatiles.bin | 8 + data/tilesets/forest_collision.asm | 64 + data/tilesets/forest_metatiles.bin | 1 + data/tilesets/game_corner_collision.asm | 64 + data/tilesets/game_corner_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/gate_collision.asm | 64 + data/tilesets/gate_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/ho_oh_word_room_collision.asm | 64 + data/tilesets/ho_oh_word_room_metatiles.bin | 17 + data/tilesets/house_collision.asm | 64 + data/tilesets/house_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/ice_path_collision.asm | 64 + data/tilesets/ice_path_metatiles.bin | 3 + data/tilesets/johto_collision.asm | 128 + data/tilesets/johto_metatiles.bin | Bin 0 -> 2048 bytes data/tilesets/johto_modern_collision.asm | 128 + data/tilesets/johto_modern_metatiles.bin | Bin 0 -> 2048 bytes data/tilesets/kabuto_word_room_collision.asm | 64 + data/tilesets/kabuto_word_room_metatiles.bin | 17 + data/tilesets/kanto_collision.asm | 128 + data/tilesets/kanto_metatiles.bin | Bin 0 -> 2048 bytes data/tilesets/lab_collision.asm | 64 + data/tilesets/lab_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/lighthouse_collision.asm | 64 + data/tilesets/lighthouse_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/mansion_collision.asm | 64 + data/tilesets/mansion_metatiles.bin | 5 + data/tilesets/mart_collision.asm | 64 + data/tilesets/mart_metatiles.bin | 3 + data/tilesets/omanyte_word_room_collision.asm | 64 + data/tilesets/omanyte_word_room_metatiles.bin | 17 + data/tilesets/park_collision.asm | 64 + data/tilesets/park_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/players_house_collision.asm | 64 + data/tilesets/players_house_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/players_room_collision.asm | 64 + data/tilesets/players_room_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/pokecenter_collision.asm | 64 + data/tilesets/pokecenter_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/pokecom_center_collision.asm | 64 + data/tilesets/pokecom_center_metatiles.bin | 2 + data/tilesets/port_collision.asm | 64 + data/tilesets/port_metatiles.bin | 65 + data/tilesets/radio_tower_collision.asm | 64 + data/tilesets/radio_tower_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/ruins_of_alph_collision.asm | 64 + data/tilesets/ruins_of_alph_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/tower_collision.asm | 64 + data/tilesets/tower_metatiles.bin | 2 + data/tilesets/traditional_house_collision.asm | 64 + data/tilesets/traditional_house_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/train_station_collision.asm | 64 + data/tilesets/train_station_metatiles.bin | Bin 0 -> 1024 bytes data/tilesets/underground_collision.asm | 64 + data/tilesets/underground_metatiles.bin | 2 + data/tilesets/unused_johto_collision.asm | 128 + data/tilesets/unused_johto_metatiles.bin | Bin 0 -> 2048 bytes data/trainers/attributes.asm | 407 + data/trainers/class_names.asm | 71 + data/trainers/dvs.asm | 73 + data/trainers/encounter_music.asm | 77 + data/trainers/gendered_trainers.asm | 42 + data/trainers/genders.asm | 72 + data/trainers/leaders.asm | 32 + data/trainers/palettes.asm | 80 + data/trainers/parties.asm | 5276 +++++++++ data/trainers/party_pointers.asm | 73 + data/trainers/pic_pointers.asm | 73 + data/trainers/sprites.asm | 70 + data/types/badge_type_boosts.asm | 21 + data/types/names.asm | 54 + data/types/search_strings.asm | 22 + data/types/search_types.asm | 21 + data/types/type_boost_items.asm | 19 + data/types/type_matchups.asm | 118 + data/wild/bug_contest_mons.asm | 13 + data/wild/fish.asm | 233 + data/wild/flee_mons.asm | 34 + data/wild/johto_grass.asm | 1713 +++ data/wild/johto_water.asm | 271 + data/wild/kanto_grass.asm | 845 ++ data/wild/kanto_water.asm | 173 + data/wild/probabilities.asm | 22 + data/wild/roammon_maps.asm | 35 + data/wild/swarm_grass.asm | 61 + data/wild/swarm_water.asm | 7 + data/wild/treemon_maps.asm | 48 + data/wild/treemons.asm | 131 + data/wild/treemons_asleep.asm | 31 + data/wild/unlocked_unowns.asm | 25 + docs/_config.yml | 1 + docs/assets/css/style.scss | 112 + docs/battle_anim_commands.md | 261 + docs/bugs_and_glitches.md | 2700 +++++ docs/design_flaws.md | 852 ++ docs/event_commands.md | 563 + docs/images/hp_exp_bar_border.png | Bin 0 -> 166 bytes docs/images/port.png | Bin 0 -> 1526 bytes docs/images/ruins_of_alph_outside.png | Bin 0 -> 494 bytes .../images/ruins_of_alph_outside_cinnabar.png | Bin 0 -> 485 bytes docs/index.md | 30 + docs/map_event_scripts.md | 236 + docs/map_setup_scripts.md | 144 + docs/menus.md | 297 + docs/move_effect_commands.md | 534 + docs/movement_commands.md | 123 + docs/music_commands.md | 290 + docs/pic_animations.md | 30 + docs/text_commands.md | 179 + docs/vc_patch.md | 124 + engine/16/macros.asm | 465 + engine/16/table_functions.asm | 111 + engine/battle/ai/items.asm | 845 ++ engine/battle/ai/move.asm | 217 + engine/battle/ai/redundant.asm | 199 + engine/battle/ai/scoring.asm | 3293 ++++++ engine/battle/ai/switch.asm | 650 ++ engine/battle/anim_hp_bar.asm | 417 + engine/battle/battle_transition.asm | 840 ++ .../battle/battlestart_copytilemapatonce.asm | 3 + engine/battle/check_battle_scene.asm | 47 + engine/battle/consume_held_item.asm | 57 + engine/battle/core.asm | 9236 ++++++++++++++++ engine/battle/effect_commands.asm | 6878 ++++++++++++ engine/battle/hidden_power.asm | 108 + engine/battle/link_result.asm | 162 + engine/battle/menu.asm | 100 + engine/battle/misc.asm | 224 + engine/battle/move_effects/attract.asm | 75 + engine/battle/move_effects/baton_pass.asm | 215 + engine/battle/move_effects/beat_up.asm | 220 + engine/battle/move_effects/belly_drum.asm | 31 + engine/battle/move_effects/bide.asm | 99 + engine/battle/move_effects/conversion.asm | 94 + engine/battle/move_effects/conversion2.asm | 62 + engine/battle/move_effects/counter.asm | 56 + engine/battle/move_effects/curse.asm | 91 + engine/battle/move_effects/destiny_bond.asm | 7 + engine/battle/move_effects/disable.asm | 73 + engine/battle/move_effects/encore.asm | 120 + engine/battle/move_effects/endure.asm | 14 + engine/battle/move_effects/false_swipe.asm | 46 + engine/battle/move_effects/focus_energy.asm | 13 + engine/battle/move_effects/foresight.asm | 20 + engine/battle/move_effects/frustration.asm | 26 + engine/battle/move_effects/fury_cutter.asm | 53 + engine/battle/move_effects/future_sight.asm | 77 + engine/battle/move_effects/heal_bell.asm | 32 + engine/battle/move_effects/hidden_power.asm | 6 + engine/battle/move_effects/leech_seed.asm | 39 + engine/battle/move_effects/lock_on.asm | 19 + engine/battle/move_effects/magnitude.asm | 27 + engine/battle/move_effects/metronome.asm | 70 + engine/battle/move_effects/mimic.asm | 53 + engine/battle/move_effects/mirror_coat.asm | 57 + engine/battle/move_effects/mirror_move.asm | 48 + engine/battle/move_effects/mist.asm | 13 + engine/battle/move_effects/nightmare.asm | 35 + engine/battle/move_effects/pain_split.asm | 91 + engine/battle/move_effects/pay_day.asm | 24 + engine/battle/move_effects/perish_song.asm | 36 + engine/battle/move_effects/present.asm | 87 + engine/battle/move_effects/protect.asm | 74 + engine/battle/move_effects/psych_up.asm | 47 + engine/battle/move_effects/pursuit.asm | 23 + engine/battle/move_effects/rage.asm | 5 + engine/battle/move_effects/rain_dance.asm | 8 + engine/battle/move_effects/rapid_spin.asm | 34 + engine/battle/move_effects/return.asm | 25 + engine/battle/move_effects/rollout.asm | 91 + engine/battle/move_effects/safeguard.asm | 21 + engine/battle/move_effects/sandstorm.asm | 16 + engine/battle/move_effects/selfdestruct.asm | 29 + engine/battle/move_effects/sketch.asm | 121 + engine/battle/move_effects/sleep_talk.asm | 141 + engine/battle/move_effects/snore.asm | 10 + engine/battle/move_effects/spikes.asm | 24 + engine/battle/move_effects/spite.asm | 87 + engine/battle/move_effects/splash.asm | 4 + engine/battle/move_effects/substitute.asm | 86 + engine/battle/move_effects/sunny_day.asm | 8 + engine/battle/move_effects/teleport.asm | 94 + engine/battle/move_effects/thief.asm | 110 + engine/battle/move_effects/thunder.asm | 16 + engine/battle/move_effects/transform.asm | 156 + engine/battle/move_effects/triple_kick.asm | 30 + engine/battle/read_trainer_attributes.asm | 66 + engine/battle/read_trainer_dvs.asm | 21 + engine/battle/read_trainer_party.asm | 298 + engine/battle/returntobattle_useball.asm | 19 + engine/battle/sliding_intro.asm | 98 + engine/battle/start_battle.asm | 199 + engine/battle/trainer_huds.asm | 257 + engine/battle/update_battle_huds.asm | 9 + engine/battle/used_move_text.asm | 119 + engine/battle_anims/anim_commands.asm | 1493 +++ engine/battle_anims/bg_effects.asm | 2941 +++++ engine/battle_anims/core.asm | 320 + engine/battle_anims/functions.asm | 4319 ++++++++ engine/battle_anims/helpers.asm | 130 + engine/battle_anims/pokeball_wobble.asm | 62 + engine/debug/debug_room.asm | 1753 +++ engine/events/basement_key.asm | 32 + engine/events/battle_tower/battle_tower.asm | 1609 +++ .../events/battle_tower/get_trainer_class.asm | 46 + engine/events/battle_tower/load_trainer.asm | 251 + engine/events/battle_tower/rules.asm | 299 + engine/events/battle_tower/trainer_text.asm | 701 ++ engine/events/buena.asm | 300 + engine/events/buena_menu.asm | 58 + engine/events/bug_contest/caught_mon.asm | 37 + engine/events/bug_contest/contest.asm | 41 + engine/events/bug_contest/contest_2.asm | 116 + engine/events/bug_contest/display_stats.asm | 105 + engine/events/bug_contest/judging.asm | 381 + engine/events/card_key.asm | 37 + engine/events/catch_tutorial.asm | 81 + engine/events/catch_tutorial_input.asm | 43 + engine/events/celebi.asm | 314 + engine/events/checkforhiddenitems.asm | 83 + engine/events/checksave.asm | 20 + engine/events/checktime.asm | 19 + engine/events/daycare.asm | 753 ++ engine/events/diploma.asm | 91 + engine/events/dratini.asm | 117 + engine/events/elevator.asm | 216 + engine/events/engine_flags.asm | 83 + engine/events/field_moves.asm | 445 + engine/events/fish.asm | 120 + engine/events/fishing_gfx.asm | 42 + engine/events/forced_movement.asm | 51 + engine/events/fruit_trees.asm | 117 + engine/events/haircut.asm | 75 + engine/events/halloffame.asm | 635 ++ engine/events/happiness_egg.asm | 220 + engine/events/heal_machine_anim.asm | 262 + engine/events/hidden_item.asm | 37 + engine/events/itemfinder.asm | 50 + engine/events/kurt.asm | 394 + .../kurt_selectquantity_interpretjoypad.asm | 4 + engine/events/lucky_number.asm | 262 + engine/events/magikarp.asm | 327 + engine/events/magnet_train.asm | 430 + engine/events/map_name_sign.asm | 259 + engine/events/misc_scripts.asm | 55 + engine/events/mom.asm | 664 ++ engine/events/mom_phone.asm | 239 + engine/events/money.asm | 209 + engine/events/move_deleter.asm | 150 + engine/events/move_tutor.asm | 98 + engine/events/name_rater.asm | 219 + engine/events/npc_trade.asm | 544 + engine/events/odd_egg.asm | 130 + engine/events/overworld.asm | 1816 ++++ engine/events/play_slow_cry.asm | 30 + engine/events/poisonstep.asm | 154 + engine/events/poisonstep_pals.asm | 48 + engine/events/poke_seer.asm | 408 + engine/events/pokecenter_pc.asm | 679 ++ engine/events/pokepic.asm | 48 + engine/events/pokerus/apply_pokerus_tick.asm | 26 + engine/events/pokerus/check_pokerus.asm | 25 + engine/events/pokerus/pokerus.asm | 167 + engine/events/print_photo.asm | 50 + engine/events/print_unown.asm | 238 + engine/events/print_unown_2.asm | 103 + engine/events/prof_oaks_pc.asm | 200 + engine/events/repel.asm | 10 + engine/events/sacred_ash.asm | 68 + engine/events/shuckle.asm | 156 + engine/events/specials.asm | 422 + engine/events/squirtbottle.asm | 45 + engine/events/std_collision.asm | 29 + engine/events/std_scripts.asm | 1897 ++++ engine/events/sweet_scent.asm | 66 + engine/events/trainer_scripts.asm | 31 + engine/events/treemons.asm | 282 + engine/events/unown_walls.asm | 270 + engine/events/whiteout.asm | 73 + engine/games/card_flip.asm | 1614 +++ engine/games/memory_game.asm | 590 + engine/games/slot_machine.asm | 2233 ++++ engine/games/unown_puzzle.asm | 835 ++ engine/gfx/cgb_layouts.asm | 985 ++ engine/gfx/color.asm | 1339 +++ engine/gfx/crystal_layouts.asm | 293 + engine/gfx/dma_transfer.asm | 604 ++ engine/gfx/load_font.asm | 144 + engine/gfx/load_overworld_font.asm | 16 + engine/gfx/load_pics.asm | 468 + engine/gfx/load_push_oam.asm | 28 + engine/gfx/mon_icons.asm | 453 + engine/gfx/pic_animation.asm | 1098 ++ engine/gfx/place_graphic.asm | 55 + engine/gfx/player_gfx.asm | 218 + engine/gfx/sgb_layouts.asm | 572 + engine/gfx/sprite_anims.asm | 877 ++ engine/gfx/sprites.asm | 633 ++ engine/gfx/trademon_frontpic.asm | 38 + engine/items/buy_sell_toss.asm | 221 + engine/items/item_effects.asm | 2913 +++++ engine/items/items.asm | 560 + engine/items/mart.asm | 866 ++ engine/items/pack.asm | 1581 +++ engine/items/pack_kris.asm | 20 + engine/items/print_item_description.asm | 32 + engine/items/switch_items.asm | 272 + engine/items/tmhm.asm | 554 + engine/items/tmhm2.asm | 57 + engine/items/update_item_description.asm | 13 + engine/link/init_list.asm | 46 + engine/link/link.asm | 3044 ++++++ engine/link/link_2.asm | 93 + engine/link/link_trade.asm | 342 + engine/link/mystery_gift.asm | 1923 ++++ engine/link/mystery_gift_2.asm | 153 + engine/link/place_waiting_text.asm | 24 + engine/link/time_capsule.asm | 160 + engine/link/time_capsule_2.asm | 39 + engine/math/get_square_root.asm | 30 + engine/math/math.asm | 189 + engine/math/print_num.asm | 301 + engine/math/sine.asm | 4 + engine/menus/delete_save.asm | 35 + engine/menus/empty_sram.asm | 15 + engine/menus/init_gender.asm | 101 + engine/menus/intro_menu.asm | 1385 +++ engine/menus/main_menu.asm | 384 + engine/menus/menu.asm | 805 ++ engine/menus/menu_2.asm | 253 + engine/menus/naming_screen.asm | 1343 +++ engine/menus/options_menu.asm | 560 + engine/menus/save.asm | 1387 +++ engine/menus/savemenu_copytilemapatonce.asm | 84 + engine/menus/scrolling_menu.asm | 519 + engine/menus/start_menu.asm | 541 + engine/menus/trainer_card.asm | 626 ++ engine/movie/credits.asm | 612 ++ engine/movie/evolution_animation.asm | 360 + engine/movie/gbc_only.asm | 133 + engine/movie/init_hof_credits.asm | 78 + engine/movie/intro.asm | 1777 +++ engine/movie/splash.asm | 349 + engine/movie/title.asm | 374 + engine/movie/trade_animation.asm | 1422 +++ engine/overworld/cmd_queue.asm | 301 + engine/overworld/decorations.asm | 1198 +++ engine/overworld/events.asm | 1350 +++ engine/overworld/init_map.asm | 104 + engine/overworld/landmarks.asm | 82 + engine/overworld/load_map_part.asm | 36 + engine/overworld/map_object_action.asm | 298 + engine/overworld/map_objects.asm | 3044 ++++++ engine/overworld/map_objects_2.asm | 70 + engine/overworld/map_setup.asm | 200 + engine/overworld/movement.asm | 778 ++ engine/overworld/npc_movement.asm | 562 + engine/overworld/overworld.asm | 672 ++ engine/overworld/player_movement.asm | 816 ++ engine/overworld/player_object.asm | 857 ++ engine/overworld/player_step.asm | 270 + engine/overworld/scripting.asm | 2409 +++++ engine/overworld/select_menu.asm | 172 + engine/overworld/spawn_points.asm | 58 + engine/overworld/tile_events.asm | 101 + engine/overworld/time.asm | 440 + engine/overworld/variables.asm | 155 + engine/overworld/warp_connection.asm | 445 + engine/overworld/wildmons.asm | 1004 ++ engine/phone/phone.asm | 716 ++ engine/phone/phonering_copytilemapatonce.asm | 87 + engine/phone/scripts/alan.asm | 60 + engine/phone/scripts/anthony.asm | 61 + engine/phone/scripts/arnie.asm | 64 + engine/phone/scripts/beth.asm | 39 + engine/phone/scripts/beverly.asm | 26 + engine/phone/scripts/bike_shop.asm | 5 + engine/phone/scripts/bill.asm | 41 + engine/phone/scripts/brent.asm | 44 + engine/phone/scripts/brent_gossip.asm | 62 + engine/phone/scripts/buena.asm | 169 + engine/phone/scripts/chad.asm | 49 + engine/phone/scripts/chad_gossip.asm | 62 + engine/phone/scripts/dana.asm | 65 + engine/phone/scripts/derek.asm | 48 + engine/phone/scripts/elm.asm | 101 + engine/phone/scripts/erin.asm | 40 + engine/phone/scripts/gaven.asm | 44 + engine/phone/scripts/generic_callee.asm | 1263 +++ engine/phone/scripts/generic_caller.asm | 961 ++ engine/phone/scripts/gina.asm | 72 + engine/phone/scripts/hangups.asm | 183 + engine/phone/scripts/hangups_2.asm | 49 + engine/phone/scripts/huey.asm | 41 + engine/phone/scripts/irwin.asm | 19 + engine/phone/scripts/irwin_gossip.asm | 88 + engine/phone/scripts/jack.asm | 49 + engine/phone/scripts/jack_gossip.asm | 68 + engine/phone/scripts/joey.asm | 41 + engine/phone/scripts/jose.asm | 59 + engine/phone/scripts/kenji.asm | 9 + engine/phone/scripts/liz.asm | 102 + engine/phone/scripts/liz_gossip.asm | 62 + engine/phone/scripts/mom.asm | 142 + engine/phone/scripts/parry.asm | 40 + engine/phone/scripts/ralph.asm | 59 + engine/phone/scripts/reena.asm | 39 + engine/phone/scripts/reminders.asm | 95 + engine/phone/scripts/reminders_2.asm | 15 + engine/phone/scripts/tiffany.asm | 98 + engine/phone/scripts/todd.asm | 59 + engine/phone/scripts/tully.asm | 60 + engine/phone/scripts/unused.asm | 3 + engine/phone/scripts/vance.asm | 40 + engine/phone/scripts/wade.asm | 113 + engine/phone/scripts/wilton.asm | 75 + engine/pokedex/new_pokedex_entry.asm | 50 + engine/pokedex/pokedex.asm | 2896 +++++ engine/pokedex/pokedex_2.asm | 282 + engine/pokedex/pokedex_3.asm | 163 + engine/pokedex/unown_dex.asm | 49 + engine/pokegear/pokegear.asm | 2922 +++++ engine/pokegear/radio.asm | 1803 ++++ .../townmap_convertlinebreakcharacters.asm | 21 + engine/pokemon/bills_pc.asm | 2694 +++++ engine/pokemon/bills_pc_top.asm | 266 + engine/pokemon/breeding.asm | 993 ++ engine/pokemon/breedmon_level_growth.asm | 27 + engine/pokemon/caught_data.asm | 246 + engine/pokemon/correct_nick_errors.asm | 74 + engine/pokemon/correct_party_errors.asm | 231 + engine/pokemon/european_mail.asm | 118 + engine/pokemon/evolve.asm | 686 ++ engine/pokemon/experience.asm | 163 + engine/pokemon/health.asm | 110 + engine/pokemon/knows_move.asm | 24 + engine/pokemon/learn.asm | 234 + engine/pokemon/level_up_happiness.asm | 20 + engine/pokemon/mail.asm | 567 + engine/pokemon/mail_2.asm | 947 ++ engine/pokemon/mon_menu.asm | 1287 +++ engine/pokemon/mon_stats.asm | 491 + engine/pokemon/mon_submenu.asm | 291 + engine/pokemon/move_mon.asm | 1847 ++++ engine/pokemon/move_mon_wo_mail.asm | 133 + engine/pokemon/party_menu.asm | 823 ++ engine/pokemon/print_move_description.asm | 19 + engine/pokemon/search_owned.asm | 362 + engine/pokemon/search_party.asm | 134 + engine/pokemon/stats_screen.asm | 1215 +++ engine/pokemon/switchpartymons.asm | 145 + engine/pokemon/tempmon.asm | 127 + engine/pokemon/types.asm | 87 + engine/predef.asm | 28 + engine/printer/print_party.asm | 367 + engine/printer/printer.asm | 968 ++ engine/printer/printer_serial.asm | 628 ++ engine/rtc/print_hours_mins.asm | 65 + engine/rtc/reset_password.asm | 255 + engine/rtc/restart_clock.asm | 241 + engine/rtc/rtc.asm | 201 + engine/rtc/timeset.asm | 726 ++ engine/smallflag.asm | 71 + engine/tilesets/map_palettes.asm | 86 + engine/tilesets/mapgroup_roofs.asm | 18 + engine/tilesets/tileset_anims.asm | 1049 ++ engine/tilesets/tileset_palettes.asm | 137 + engine/tilesets/timeofday_pals.asm | 384 + gfx/battle/balls.png | Bin 0 -> 115 bytes gfx/battle/dude.png | Bin 0 -> 375 bytes gfx/battle/enemy_hp_bar_border.png | Bin 0 -> 111 bytes gfx/battle/exp_bar.pal | 3 + gfx/battle/expbar.png | Bin 0 -> 120 bytes gfx/battle/expbarend.png | Bin 0 -> 85 bytes gfx/battle/expbarend_sgb.png | Bin 0 -> 85 bytes gfx/battle/hp_bar.pal | 9 + gfx/battle/hp_exp_bar_border.png | Bin 0 -> 116 bytes gfx/battle/minimize.png | Bin 0 -> 85 bytes gfx/battle_anims.asm | 40 + gfx/battle_anims/aeroblast.png | Bin 0 -> 187 bytes gfx/battle_anims/angels.png | Bin 0 -> 363 bytes gfx/battle_anims/battle_anims.pal | 30 + gfx/battle_anims/beam.png | Bin 0 -> 260 bytes gfx/battle_anims/bubble.png | Bin 0 -> 237 bytes gfx/battle_anims/charge.png | Bin 0 -> 188 bytes gfx/battle_anims/cut.png | Bin 0 -> 170 bytes gfx/battle_anims/egg.png | Bin 0 -> 200 bytes gfx/battle_anims/explosion.png | Bin 0 -> 157 bytes gfx/battle_anims/fire.png | Bin 0 -> 153 bytes gfx/battle_anims/flower.png | Bin 0 -> 149 bytes gfx/battle_anims/globe.png | Bin 0 -> 292 bytes gfx/battle_anims/haze.png | Bin 0 -> 173 bytes gfx/battle_anims/hit.png | Bin 0 -> 306 bytes gfx/battle_anims/horn.png | Bin 0 -> 179 bytes gfx/battle_anims/ice.png | Bin 0 -> 137 bytes gfx/battle_anims/lightning.png | Bin 0 -> 366 bytes gfx/battle_anims/misc.png | Bin 0 -> 481 bytes gfx/battle_anims/noise.png | Bin 0 -> 234 bytes gfx/battle_anims/objects.png | Bin 0 -> 327 bytes gfx/battle_anims/plant.png | Bin 0 -> 293 bytes gfx/battle_anims/poison.png | Bin 0 -> 166 bytes gfx/battle_anims/pokeball.png | Bin 0 -> 184 bytes gfx/battle_anims/powder.png | Bin 0 -> 100 bytes gfx/battle_anims/psychic.png | Bin 0 -> 175 bytes gfx/battle_anims/reflect.png | Bin 0 -> 211 bytes gfx/battle_anims/rocks.png | Bin 0 -> 326 bytes gfx/battle_anims/rope.png | Bin 0 -> 256 bytes gfx/battle_anims/sand.png | Bin 0 -> 176 bytes gfx/battle_anims/shapes.png | Bin 0 -> 237 bytes gfx/battle_anims/shine.png | Bin 0 -> 273 bytes gfx/battle_anims/skyattack.png | Bin 0 -> 393 bytes gfx/battle_anims/smoke.png | Bin 0 -> 191 bytes gfx/battle_anims/speed.png | Bin 0 -> 136 bytes gfx/battle_anims/status.png | Bin 0 -> 364 bytes gfx/battle_anims/unused_battle_anims.pal | 30 + gfx/battle_anims/water.png | Bin 0 -> 277 bytes gfx/battle_anims/wave.png | Bin 0 -> 205 bytes gfx/battle_anims/web.png | Bin 0 -> 191 bytes gfx/battle_anims/whip.png | Bin 0 -> 210 bytes gfx/battle_anims/wind.png | Bin 0 -> 286 bytes gfx/beta_poker/beta_poker.pal | 19 + gfx/card_flip/card_flip.pal | 44 + gfx/card_flip/card_flip.tilemap | Bin 0 -> 132 bytes gfx/card_flip/card_flip_1.png | Bin 0 -> 476 bytes gfx/card_flip/card_flip_2.png | Bin 0 -> 466 bytes gfx/card_flip/card_flip_3.png | Bin 0 -> 99 bytes gfx/card_flip/off.png | Bin 0 -> 79 bytes gfx/card_flip/on.png | Bin 0 -> 79 bytes gfx/credits/border.png | Bin 0 -> 153 bytes gfx/credits/credits.pal | 19 + gfx/credits/ditto.png | Bin 0 -> 377 bytes gfx/credits/igglybuff.png | Bin 0 -> 482 bytes gfx/credits/pichu.png | Bin 0 -> 348 bytes gfx/credits/smoochum.png | Bin 0 -> 409 bytes gfx/credits/theend.png | Bin 0 -> 180 bytes gfx/debug/up_arrow.png | Bin 0 -> 81 bytes gfx/diploma/diploma.pal | 39 + gfx/diploma/diploma.png | Bin 0 -> 938 bytes gfx/diploma/page1.tilemap | Bin 0 -> 360 bytes gfx/diploma/page2.tilemap | Bin 0 -> 360 bytes gfx/emotes.asm | 12 + gfx/emotes/bolt.png | Bin 0 -> 126 bytes gfx/emotes/fish.png | Bin 0 -> 123 bytes gfx/emotes/happy.png | Bin 0 -> 125 bytes gfx/emotes/heart.png | Bin 0 -> 133 bytes gfx/emotes/question.png | Bin 0 -> 126 bytes gfx/emotes/sad.png | Bin 0 -> 127 bytes gfx/emotes/shock.png | Bin 0 -> 110 bytes gfx/emotes/sleep.png | Bin 0 -> 123 bytes gfx/evo/bubble.png | Bin 0 -> 88 bytes gfx/evo/bubble_large.png | Bin 0 -> 130 bytes gfx/evo/egg_hatch.png | Bin 0 -> 107 bytes gfx/font.asm | 66 + gfx/font/bg_text.pal | 4 + gfx/font/black.png | Bin 0 -> 68 bytes gfx/font/english.png | Bin 0 -> 770 bytes gfx/font/feet_inches.png | Bin 0 -> 89 bytes gfx/font/font.png | Bin 0 -> 770 bytes gfx/font/font_battle_extra.png | Bin 0 -> 264 bytes gfx/font/font_extra.png | Bin 0 -> 281 bytes gfx/font/font_inversed.png | Bin 0 -> 736 bytes gfx/font/french_german.png | Bin 0 -> 853 bytes gfx/font/overworld.png | Bin 0 -> 752 bytes gfx/font/overworld_space.png | Bin 0 -> 71 bytes gfx/font/phone_icon.png | Bin 0 -> 82 bytes gfx/font/postal_mark.png | Bin 0 -> 78 bytes gfx/font/space.png | Bin 0 -> 71 bytes gfx/font/spanish_italian.png | Bin 0 -> 865 bytes gfx/font/unown_font.png | Bin 0 -> 294 bytes gfx/font/unused_bold_font.png | Bin 0 -> 575 bytes gfx/font/unused_up_arrow.png | Bin 0 -> 86 bytes gfx/font/unused_weekday_kanji.png | Bin 0 -> 142 bytes gfx/font/up_arrow.png | Bin 0 -> 86 bytes gfx/footprints.asm | 261 + gfx/footprints/252.png | Bin 0 -> 117 bytes gfx/footprints/253.png | Bin 0 -> 117 bytes gfx/footprints/254.png | Bin 0 -> 119 bytes gfx/footprints/255.png | Bin 0 -> 115 bytes gfx/footprints/256.png | Bin 0 -> 117 bytes gfx/footprints/abra.png | Bin 0 -> 92 bytes gfx/footprints/aerodactyl.png | Bin 0 -> 91 bytes gfx/footprints/aipom.png | Bin 0 -> 86 bytes gfx/footprints/alakazam.png | Bin 0 -> 102 bytes gfx/footprints/ampharos.png | Bin 0 -> 89 bytes gfx/footprints/arbok.png | Bin 0 -> 69 bytes gfx/footprints/arcanine.png | Bin 0 -> 107 bytes gfx/footprints/ariados.png | Bin 0 -> 84 bytes gfx/footprints/articuno.png | Bin 0 -> 118 bytes gfx/footprints/azumarill.png | Bin 0 -> 84 bytes gfx/footprints/bayleef.png | Bin 0 -> 87 bytes gfx/footprints/beedrill.png | Bin 0 -> 83 bytes gfx/footprints/bellossom.png | Bin 0 -> 69 bytes gfx/footprints/bellsprout.png | Bin 0 -> 106 bytes gfx/footprints/blastoise.png | Bin 0 -> 108 bytes gfx/footprints/blissey.png | Bin 0 -> 92 bytes gfx/footprints/bulbasaur.png | Bin 0 -> 87 bytes gfx/footprints/butterfree.png | Bin 0 -> 85 bytes gfx/footprints/caterpie.png | Bin 0 -> 79 bytes gfx/footprints/celebi.png | Bin 0 -> 83 bytes gfx/footprints/chansey.png | Bin 0 -> 86 bytes gfx/footprints/charizard.png | Bin 0 -> 100 bytes gfx/footprints/charmander.png | Bin 0 -> 90 bytes gfx/footprints/charmeleon.png | Bin 0 -> 96 bytes gfx/footprints/chikorita.png | Bin 0 -> 80 bytes gfx/footprints/chinchou.png | Bin 0 -> 69 bytes gfx/footprints/clefable.png | Bin 0 -> 109 bytes gfx/footprints/clefairy.png | Bin 0 -> 89 bytes gfx/footprints/cleffa.png | Bin 0 -> 78 bytes gfx/footprints/cloyster.png | Bin 0 -> 69 bytes gfx/footprints/corsola.png | Bin 0 -> 79 bytes gfx/footprints/crobat.png | Bin 0 -> 69 bytes gfx/footprints/croconaw.png | Bin 0 -> 85 bytes gfx/footprints/cubone.png | Bin 0 -> 85 bytes gfx/footprints/cyndaquil.png | Bin 0 -> 83 bytes gfx/footprints/delibird.png | Bin 0 -> 89 bytes gfx/footprints/dewgong.png | Bin 0 -> 69 bytes gfx/footprints/diglett.png | Bin 0 -> 69 bytes gfx/footprints/ditto.png | Bin 0 -> 69 bytes gfx/footprints/dodrio.png | Bin 0 -> 114 bytes gfx/footprints/doduo.png | Bin 0 -> 104 bytes gfx/footprints/donphan.png | Bin 0 -> 108 bytes gfx/footprints/dragonair.png | Bin 0 -> 69 bytes gfx/footprints/dragonite.png | Bin 0 -> 100 bytes gfx/footprints/dratini.png | Bin 0 -> 69 bytes gfx/footprints/drowzee.png | Bin 0 -> 87 bytes gfx/footprints/dugtrio.png | Bin 0 -> 69 bytes gfx/footprints/dunsparce.png | Bin 0 -> 69 bytes gfx/footprints/eevee.png | Bin 0 -> 99 bytes gfx/footprints/ekans.png | Bin 0 -> 69 bytes gfx/footprints/electabuzz.png | Bin 0 -> 98 bytes gfx/footprints/electrode.png | Bin 0 -> 69 bytes gfx/footprints/elekid.png | Bin 0 -> 85 bytes gfx/footprints/entei.png | Bin 0 -> 105 bytes gfx/footprints/espeon.png | Bin 0 -> 83 bytes gfx/footprints/exeggcute.png | Bin 0 -> 69 bytes gfx/footprints/exeggutor.png | Bin 0 -> 100 bytes gfx/footprints/farfetch_d.png | Bin 0 -> 109 bytes gfx/footprints/fearow.png | Bin 0 -> 107 bytes gfx/footprints/feraligatr.png | Bin 0 -> 91 bytes gfx/footprints/flaaffy.png | Bin 0 -> 80 bytes gfx/footprints/flareon.png | Bin 0 -> 109 bytes gfx/footprints/forretress.png | Bin 0 -> 69 bytes gfx/footprints/furret.png | Bin 0 -> 80 bytes gfx/footprints/gastly.png | Bin 0 -> 69 bytes gfx/footprints/gengar.png | Bin 0 -> 91 bytes gfx/footprints/geodude.png | Bin 0 -> 69 bytes gfx/footprints/girafarig.png | Bin 0 -> 80 bytes gfx/footprints/gligar.png | Bin 0 -> 88 bytes gfx/footprints/gloom.png | Bin 0 -> 87 bytes gfx/footprints/golbat.png | Bin 0 -> 92 bytes gfx/footprints/goldeen.png | Bin 0 -> 69 bytes gfx/footprints/golduck.png | Bin 0 -> 108 bytes gfx/footprints/golem.png | Bin 0 -> 102 bytes gfx/footprints/granbull.png | Bin 0 -> 100 bytes gfx/footprints/graveler.png | Bin 0 -> 97 bytes gfx/footprints/grimer.png | Bin 0 -> 69 bytes gfx/footprints/growlithe.png | Bin 0 -> 92 bytes gfx/footprints/gyarados.png | Bin 0 -> 69 bytes gfx/footprints/haunter.png | Bin 0 -> 69 bytes gfx/footprints/heracross.png | Bin 0 -> 90 bytes gfx/footprints/hitmonchan.png | Bin 0 -> 90 bytes gfx/footprints/hitmonlee.png | Bin 0 -> 113 bytes gfx/footprints/hitmontop.png | Bin 0 -> 112 bytes gfx/footprints/ho_oh.png | Bin 0 -> 98 bytes gfx/footprints/hoothoot.png | Bin 0 -> 107 bytes gfx/footprints/hoppip.png | Bin 0 -> 80 bytes gfx/footprints/horsea.png | Bin 0 -> 69 bytes gfx/footprints/houndoom.png | Bin 0 -> 107 bytes gfx/footprints/houndour.png | Bin 0 -> 93 bytes gfx/footprints/hypno.png | Bin 0 -> 99 bytes gfx/footprints/igglybuff.png | Bin 0 -> 84 bytes gfx/footprints/ivysaur.png | Bin 0 -> 100 bytes gfx/footprints/jigglypuff.png | Bin 0 -> 84 bytes gfx/footprints/jolteon.png | Bin 0 -> 93 bytes gfx/footprints/jumpluff.png | Bin 0 -> 84 bytes gfx/footprints/jynx.png | Bin 0 -> 69 bytes gfx/footprints/kabuto.png | Bin 0 -> 74 bytes gfx/footprints/kabutops.png | Bin 0 -> 92 bytes gfx/footprints/kadabra.png | Bin 0 -> 106 bytes gfx/footprints/kakuna.png | Bin 0 -> 69 bytes gfx/footprints/kangaskhan.png | Bin 0 -> 100 bytes gfx/footprints/kingdra.png | Bin 0 -> 69 bytes gfx/footprints/kingler.png | Bin 0 -> 100 bytes gfx/footprints/koffing.png | Bin 0 -> 69 bytes gfx/footprints/krabby.png | Bin 0 -> 89 bytes gfx/footprints/lanturn.png | Bin 0 -> 69 bytes gfx/footprints/lapras.png | Bin 0 -> 69 bytes gfx/footprints/larvitar.png | Bin 0 -> 78 bytes gfx/footprints/ledian.png | Bin 0 -> 94 bytes gfx/footprints/ledyba.png | Bin 0 -> 93 bytes gfx/footprints/lickitung.png | Bin 0 -> 108 bytes gfx/footprints/lugia.png | Bin 0 -> 99 bytes gfx/footprints/machamp.png | Bin 0 -> 100 bytes gfx/footprints/machoke.png | Bin 0 -> 93 bytes gfx/footprints/machop.png | Bin 0 -> 89 bytes gfx/footprints/magby.png | Bin 0 -> 87 bytes gfx/footprints/magcargo.png | Bin 0 -> 69 bytes gfx/footprints/magikarp.png | Bin 0 -> 69 bytes gfx/footprints/magmar.png | Bin 0 -> 95 bytes gfx/footprints/magnemite.png | Bin 0 -> 81 bytes gfx/footprints/magneton.png | Bin 0 -> 89 bytes gfx/footprints/mankey.png | Bin 0 -> 112 bytes gfx/footprints/mantine.png | Bin 0 -> 69 bytes gfx/footprints/mareep.png | Bin 0 -> 82 bytes gfx/footprints/marill.png | Bin 0 -> 83 bytes gfx/footprints/marowak.png | Bin 0 -> 85 bytes gfx/footprints/meganium.png | Bin 0 -> 101 bytes gfx/footprints/meowth.png | Bin 0 -> 93 bytes gfx/footprints/metapod.png | Bin 0 -> 69 bytes gfx/footprints/mew.png | Bin 0 -> 87 bytes gfx/footprints/mewtwo.png | Bin 0 -> 103 bytes gfx/footprints/miltank.png | Bin 0 -> 83 bytes gfx/footprints/misdreavus.png | Bin 0 -> 69 bytes gfx/footprints/moltres.png | Bin 0 -> 104 bytes gfx/footprints/mr__mime.png | Bin 0 -> 88 bytes gfx/footprints/muk.png | Bin 0 -> 69 bytes gfx/footprints/murkrow.png | Bin 0 -> 94 bytes gfx/footprints/natu.png | Bin 0 -> 82 bytes gfx/footprints/nidoking.png | Bin 0 -> 103 bytes gfx/footprints/nidoqueen.png | Bin 0 -> 108 bytes gfx/footprints/nidoran_f.png | Bin 0 -> 86 bytes gfx/footprints/nidoran_m.png | Bin 0 -> 87 bytes gfx/footprints/nidorina.png | Bin 0 -> 97 bytes gfx/footprints/nidorino.png | Bin 0 -> 103 bytes gfx/footprints/ninetales.png | Bin 0 -> 98 bytes gfx/footprints/noctowl.png | Bin 0 -> 105 bytes gfx/footprints/octillery.png | Bin 0 -> 105 bytes gfx/footprints/oddish.png | Bin 0 -> 80 bytes gfx/footprints/omanyte.png | Bin 0 -> 78 bytes gfx/footprints/omastar.png | Bin 0 -> 83 bytes gfx/footprints/onix.png | Bin 0 -> 69 bytes gfx/footprints/paras.png | Bin 0 -> 81 bytes gfx/footprints/parasect.png | Bin 0 -> 83 bytes gfx/footprints/persian.png | Bin 0 -> 107 bytes gfx/footprints/phanpy.png | Bin 0 -> 84 bytes gfx/footprints/pichu.png | Bin 0 -> 83 bytes gfx/footprints/pidgeot.png | Bin 0 -> 105 bytes gfx/footprints/pidgeotto.png | Bin 0 -> 95 bytes gfx/footprints/pidgey.png | Bin 0 -> 94 bytes gfx/footprints/pikachu.png | Bin 0 -> 83 bytes gfx/footprints/piloswine.png | Bin 0 -> 103 bytes gfx/footprints/pineco.png | Bin 0 -> 69 bytes gfx/footprints/pinsir.png | Bin 0 -> 91 bytes gfx/footprints/politoed.png | Bin 0 -> 106 bytes gfx/footprints/poliwag.png | Bin 0 -> 84 bytes gfx/footprints/poliwhirl.png | Bin 0 -> 87 bytes gfx/footprints/poliwrath.png | Bin 0 -> 93 bytes gfx/footprints/ponyta.png | Bin 0 -> 90 bytes gfx/footprints/porygon.png | Bin 0 -> 85 bytes gfx/footprints/porygon2.png | Bin 0 -> 86 bytes gfx/footprints/primeape.png | Bin 0 -> 99 bytes gfx/footprints/psyduck.png | Bin 0 -> 100 bytes gfx/footprints/pupitar.png | Bin 0 -> 69 bytes gfx/footprints/quagsire.png | Bin 0 -> 88 bytes gfx/footprints/quilava.png | Bin 0 -> 84 bytes gfx/footprints/qwilfish.png | Bin 0 -> 69 bytes gfx/footprints/raichu.png | Bin 0 -> 87 bytes gfx/footprints/raikou.png | Bin 0 -> 95 bytes gfx/footprints/rapidash.png | Bin 0 -> 98 bytes gfx/footprints/raticate.png | Bin 0 -> 96 bytes gfx/footprints/rattata.png | Bin 0 -> 83 bytes gfx/footprints/remoraid.png | Bin 0 -> 69 bytes gfx/footprints/rhydon.png | Bin 0 -> 103 bytes gfx/footprints/rhyhorn.png | Bin 0 -> 87 bytes gfx/footprints/sandshrew.png | Bin 0 -> 90 bytes gfx/footprints/sandslash.png | Bin 0 -> 90 bytes gfx/footprints/scizor.png | Bin 0 -> 88 bytes gfx/footprints/scyther.png | Bin 0 -> 108 bytes gfx/footprints/seadra.png | Bin 0 -> 69 bytes gfx/footprints/seaking.png | Bin 0 -> 69 bytes gfx/footprints/seel.png | Bin 0 -> 69 bytes gfx/footprints/sentret.png | Bin 0 -> 80 bytes gfx/footprints/shellder.png | Bin 0 -> 69 bytes gfx/footprints/shuckle.png | Bin 0 -> 85 bytes gfx/footprints/skarmory.png | Bin 0 -> 102 bytes gfx/footprints/skiploom.png | Bin 0 -> 86 bytes gfx/footprints/slowbro.png | Bin 0 -> 93 bytes gfx/footprints/slowking.png | Bin 0 -> 84 bytes gfx/footprints/slowpoke.png | Bin 0 -> 83 bytes gfx/footprints/slugma.png | Bin 0 -> 69 bytes gfx/footprints/smeargle.png | Bin 0 -> 98 bytes gfx/footprints/smoochum.png | Bin 0 -> 84 bytes gfx/footprints/sneasel.png | Bin 0 -> 92 bytes gfx/footprints/snorlax.png | Bin 0 -> 105 bytes gfx/footprints/snubbull.png | Bin 0 -> 88 bytes gfx/footprints/spearow.png | Bin 0 -> 94 bytes gfx/footprints/spinarak.png | Bin 0 -> 74 bytes gfx/footprints/squirtle.png | Bin 0 -> 87 bytes gfx/footprints/stantler.png | Bin 0 -> 97 bytes gfx/footprints/starmie.png | Bin 0 -> 79 bytes gfx/footprints/staryu.png | Bin 0 -> 79 bytes gfx/footprints/steelix.png | Bin 0 -> 69 bytes gfx/footprints/sudowoodo.png | Bin 0 -> 85 bytes gfx/footprints/suicune.png | Bin 0 -> 83 bytes gfx/footprints/sunflora.png | Bin 0 -> 88 bytes gfx/footprints/sunkern.png | Bin 0 -> 69 bytes gfx/footprints/swinub.png | Bin 0 -> 82 bytes gfx/footprints/tangela.png | Bin 0 -> 98 bytes gfx/footprints/tauros.png | Bin 0 -> 91 bytes gfx/footprints/teddiursa.png | Bin 0 -> 91 bytes gfx/footprints/tentacool.png | Bin 0 -> 69 bytes gfx/footprints/tentacruel.png | Bin 0 -> 69 bytes gfx/footprints/togepi.png | Bin 0 -> 83 bytes gfx/footprints/togetic.png | Bin 0 -> 88 bytes gfx/footprints/totodile.png | Bin 0 -> 86 bytes gfx/footprints/typhlosion.png | Bin 0 -> 88 bytes gfx/footprints/tyranitar.png | Bin 0 -> 99 bytes gfx/footprints/tyrogue.png | Bin 0 -> 80 bytes gfx/footprints/umbreon.png | Bin 0 -> 80 bytes gfx/footprints/unown.png | Bin 0 -> 69 bytes gfx/footprints/ursaring.png | Bin 0 -> 104 bytes gfx/footprints/vaporeon.png | Bin 0 -> 97 bytes gfx/footprints/venomoth.png | Bin 0 -> 74 bytes gfx/footprints/venonat.png | Bin 0 -> 87 bytes gfx/footprints/venusaur.png | Bin 0 -> 103 bytes gfx/footprints/victreebel.png | Bin 0 -> 69 bytes gfx/footprints/vileplume.png | Bin 0 -> 88 bytes gfx/footprints/voltorb.png | Bin 0 -> 69 bytes gfx/footprints/vulpix.png | Bin 0 -> 95 bytes gfx/footprints/wartortle.png | Bin 0 -> 96 bytes gfx/footprints/weedle.png | Bin 0 -> 79 bytes gfx/footprints/weepinbell.png | Bin 0 -> 69 bytes gfx/footprints/weezing.png | Bin 0 -> 69 bytes gfx/footprints/wigglytuff.png | Bin 0 -> 91 bytes gfx/footprints/wobbuffet.png | Bin 0 -> 80 bytes gfx/footprints/wooper.png | Bin 0 -> 95 bytes gfx/footprints/xatu.png | Bin 0 -> 86 bytes gfx/footprints/yanma.png | Bin 0 -> 80 bytes gfx/footprints/zapdos.png | Bin 0 -> 118 bytes gfx/footprints/zubat.png | Bin 0 -> 69 bytes gfx/frames/1.png | Bin 0 -> 122 bytes gfx/frames/2.png | Bin 0 -> 122 bytes gfx/frames/3.png | Bin 0 -> 112 bytes gfx/frames/4.png | Bin 0 -> 126 bytes gfx/frames/5.png | Bin 0 -> 109 bytes gfx/frames/6.png | Bin 0 -> 114 bytes gfx/frames/7.png | Bin 0 -> 119 bytes gfx/frames/8.png | Bin 0 -> 110 bytes gfx/frames/9.png | Bin 0 -> 113 bytes gfx/frames/map_entry_sign.png | Bin 0 -> 169 bytes gfx/icons.asm | 41 + gfx/icons/bat.png | Bin 0 -> 169 bytes gfx/icons/bigmon.png | Bin 0 -> 185 bytes gfx/icons/bird.png | Bin 0 -> 176 bytes gfx/icons/blob.png | Bin 0 -> 174 bytes gfx/icons/bug.png | Bin 0 -> 185 bytes gfx/icons/bulbasaur.png | Bin 0 -> 166 bytes gfx/icons/caterpillar.png | Bin 0 -> 159 bytes gfx/icons/charmander.png | Bin 0 -> 166 bytes gfx/icons/clefairy.png | Bin 0 -> 165 bytes gfx/icons/diglett.png | Bin 0 -> 129 bytes gfx/icons/egg.png | Bin 0 -> 155 bytes gfx/icons/equine.png | Bin 0 -> 159 bytes gfx/icons/fighter.png | Bin 0 -> 179 bytes gfx/icons/fish.png | Bin 0 -> 173 bytes gfx/icons/fox.png | Bin 0 -> 188 bytes gfx/icons/geodude.png | Bin 0 -> 173 bytes gfx/icons/ghost.png | Bin 0 -> 143 bytes gfx/icons/gyarados.png | Bin 0 -> 208 bytes gfx/icons/ho_oh.png | Bin 0 -> 204 bytes gfx/icons/humanshape.png | Bin 0 -> 161 bytes gfx/icons/jellyfish.png | Bin 0 -> 172 bytes gfx/icons/jigglypuff.png | Bin 0 -> 165 bytes gfx/icons/lapras.png | Bin 0 -> 165 bytes gfx/icons/lugia.png | Bin 0 -> 185 bytes gfx/icons/monster.png | Bin 0 -> 179 bytes gfx/icons/moth.png | Bin 0 -> 185 bytes gfx/icons/oddish.png | Bin 0 -> 157 bytes gfx/icons/pikachu.png | Bin 0 -> 172 bytes gfx/icons/poliwag.png | Bin 0 -> 158 bytes gfx/icons/serpent.png | Bin 0 -> 145 bytes gfx/icons/shell.png | Bin 0 -> 170 bytes gfx/icons/slowpoke.png | Bin 0 -> 183 bytes gfx/icons/snorlax.png | Bin 0 -> 165 bytes gfx/icons/squirtle.png | Bin 0 -> 170 bytes gfx/icons/staryu.png | Bin 0 -> 166 bytes gfx/icons/sudowoodo.png | Bin 0 -> 195 bytes gfx/icons/unown.png | Bin 0 -> 112 bytes gfx/icons/voltorb.png | Bin 0 -> 127 bytes gfx/intro/background.attrmap | Bin 0 -> 1024 bytes gfx/intro/background.pal | 79 + gfx/intro/background.png | Bin 0 -> 562 bytes gfx/intro/background.tilemap | Bin 0 -> 1024 bytes gfx/intro/crystal_unowns.attrmap | Bin 0 -> 1024 bytes gfx/intro/crystal_unowns.pal | 79 + gfx/intro/crystal_unowns.png | Bin 0 -> 269 bytes gfx/intro/crystal_unowns.tilemap | Bin 0 -> 1024 bytes gfx/intro/fade.pal | 41 + gfx/intro/grass1.png | Bin 0 -> 144 bytes gfx/intro/grass2.png | Bin 0 -> 134 bytes gfx/intro/grass3.png | Bin 0 -> 134 bytes gfx/intro/grass4.png | Bin 0 -> 75 bytes gfx/intro/gs_magikarp_bg.pal | 4 + gfx/intro/gs_magikarp_ob.pal | 4 + gfx/intro/gs_shellder_lapras_bg.pal | 4 + gfx/intro/gs_shellder_lapras_ob.pal | 9 + gfx/intro/pichu_wooper.png | Bin 0 -> 709 bytes gfx/intro/pulse.png | Bin 0 -> 201 bytes gfx/intro/suicune.pal | 79 + gfx/intro/suicune_back.attrmap | Bin 0 -> 1024 bytes gfx/intro/suicune_back.png | Bin 0 -> 881 bytes gfx/intro/suicune_back.tilemap | Bin 0 -> 1024 bytes gfx/intro/suicune_close.attrmap | Bin 0 -> 1024 bytes gfx/intro/suicune_close.pal | 79 + gfx/intro/suicune_close.png | Bin 0 -> 978 bytes gfx/intro/suicune_close.tilemap | Bin 0 -> 1024 bytes gfx/intro/suicune_jump.attrmap | Bin 0 -> 1024 bytes gfx/intro/suicune_jump.png | Bin 0 -> 1112 bytes gfx/intro/suicune_jump.tilemap | Bin 0 -> 1024 bytes gfx/intro/suicune_run.png | Bin 0 -> 792 bytes gfx/intro/unown_1.pal | 4 + gfx/intro/unown_2.pal | 4 + gfx/intro/unown_a.attrmap | Bin 0 -> 1024 bytes gfx/intro/unown_a.tilemap | Bin 0 -> 1024 bytes gfx/intro/unown_back.png | Bin 0 -> 355 bytes gfx/intro/unown_hi.attrmap | Bin 0 -> 1024 bytes gfx/intro/unown_hi.tilemap | Bin 0 -> 1024 bytes gfx/intro/unowns.attrmap | Bin 0 -> 1024 bytes gfx/intro/unowns.pal | 79 + gfx/intro/unowns.png | Bin 0 -> 904 bytes gfx/intro/unowns.tilemap | Bin 0 -> 1024 bytes gfx/lz.mk | 74 + gfx/mail.asm | 106 + gfx/mail/cloud.png | Bin 0 -> 110 bytes gfx/mail/ditto.png | Bin 0 -> 120 bytes gfx/mail/dragonite.png | Bin 0 -> 192 bytes gfx/mail/dratini.png | Bin 0 -> 131 bytes gfx/mail/eevee.png | Bin 0 -> 128 bytes gfx/mail/eon_mail_border_1.png | Bin 0 -> 84 bytes gfx/mail/eon_mail_border_2.png | Bin 0 -> 77 bytes gfx/mail/flower_1.png | Bin 0 -> 112 bytes gfx/mail/flower_2.png | Bin 0 -> 106 bytes gfx/mail/flower_mail_border.png | Bin 0 -> 137 bytes gfx/mail/grass.png | Bin 0 -> 84 bytes gfx/mail/lapras.png | Bin 0 -> 117 bytes gfx/mail/large_circle.png | Bin 0 -> 103 bytes gfx/mail/large_heart.png | Bin 0 -> 112 bytes gfx/mail/large_note.png | Bin 0 -> 115 bytes gfx/mail/large_pokeball.png | Bin 0 -> 119 bytes gfx/mail/large_triangle.png | Bin 0 -> 110 bytes gfx/mail/litebluemail_border.png | Bin 0 -> 136 bytes gfx/mail/lovely_mail_border.png | Bin 0 -> 121 bytes gfx/mail/lovely_mail_underline.png | Bin 0 -> 80 bytes gfx/mail/mail.pal | 10 + gfx/mail/mew.png | Bin 0 -> 230 bytes gfx/mail/morph_mail_border.png | Bin 0 -> 76 bytes gfx/mail/morph_mail_corner.png | Bin 0 -> 110 bytes gfx/mail/morph_mail_divider.png | Bin 0 -> 74 bytes gfx/mail/music_mail_border.png | Bin 0 -> 107 bytes gfx/mail/natu.png | Bin 0 -> 121 bytes gfx/mail/oddish.png | Bin 0 -> 118 bytes gfx/mail/poliwag.png | Bin 0 -> 136 bytes gfx/mail/portraitmail_border.png | Bin 0 -> 93 bytes gfx/mail/portraitmail_underline.png | Bin 0 -> 74 bytes gfx/mail/sentret.png | Bin 0 -> 135 bytes gfx/mail/small_heart.png | Bin 0 -> 84 bytes gfx/mail/small_note.png | Bin 0 -> 86 bytes gfx/mail/small_pokeball.png | Bin 0 -> 86 bytes gfx/mail/small_triangle.png | Bin 0 -> 88 bytes gfx/mail/surf_mail_border.png | Bin 0 -> 126 bytes gfx/mail/unused_grass.png | Bin 0 -> 92 bytes gfx/mail/wave.png | Bin 0 -> 91 bytes gfx/memory_game/memory_game.png | Bin 0 -> 445 bytes gfx/misc.asm | 57 + gfx/mobile/ascii_font.png | Bin 0 -> 762 bytes gfx/mobile/card.png | Bin 0 -> 335 bytes gfx/mobile/card_2.png | Bin 0 -> 306 bytes gfx/mobile/card_folder.png | Bin 0 -> 567 bytes gfx/mobile/card_large_sprite.png | Bin 0 -> 137 bytes gfx/mobile/card_list.png | Bin 0 -> 235 bytes gfx/mobile/card_sprite.png | Bin 0 -> 103 bytes gfx/mobile/chris_silhouette.png | Bin 0 -> 250 bytes gfx/mobile/dialing.png | Bin 0 -> 262 bytes gfx/mobile/dialing_frame.png | Bin 0 -> 149 bytes gfx/mobile/dialpad.attrmap | Bin 0 -> 360 bytes gfx/mobile/dialpad.png | Bin 0 -> 631 bytes gfx/mobile/dialpad.tilemap | Bin 0 -> 360 bytes gfx/mobile/dialpad_cursor.png | Bin 0 -> 135 bytes gfx/mobile/down_arrow.png | Bin 0 -> 82 bytes gfx/mobile/electro_ball.png | Bin 0 -> 695 bytes gfx/mobile/ez_chat_cursor.png | Bin 0 -> 78 bytes gfx/mobile/havewant.png | Bin 0 -> 968 bytes gfx/mobile/havewant_map.bin | Bin 0 -> 1136 bytes gfx/mobile/kris_silhouette.png | Bin 0 -> 264 bytes gfx/mobile/mobile_adapters.pal | 8 + gfx/mobile/mobile_cable_1.png | Bin 0 -> 181 bytes gfx/mobile/mobile_cable_2.png | Bin 0 -> 196 bytes gfx/mobile/mobile_center.attrmap | Bin 0 -> 360 bytes gfx/mobile/mobile_center.tilemap | Bin 0 -> 360 bytes gfx/mobile/mobile_menu.png | Bin 0 -> 177 bytes gfx/mobile/mobile_password.pal | 39 + gfx/mobile/mobile_splash.attrmap | Bin 0 -> 360 bytes gfx/mobile/mobile_splash.pal | 39 + gfx/mobile/mobile_splash.png | Bin 0 -> 767 bytes gfx/mobile/mobile_splash.tilemap | Bin 0 -> 360 bytes gfx/mobile/mobile_splash_check.png | Bin 0 -> 453 bytes gfx/mobile/mobile_trade.attrmap | Bin 0 -> 1024 bytes gfx/mobile/mobile_trade.png | Bin 0 -> 648 bytes gfx/mobile/mobile_trade.tilemap | Bin 0 -> 1024 bytes gfx/mobile/mobile_trade_bg.pal | 39 + gfx/mobile/mobile_trade_lights.pal | 19 + gfx/mobile/mobile_trade_lights.png | Bin 0 -> 94 bytes gfx/mobile/mobile_trade_ob1.pal | 39 + gfx/mobile/mobile_trade_ob2.pal | 39 + gfx/mobile/mobile_trade_sprites.png | Bin 0 -> 205 bytes gfx/mobile/password.attrmap | Bin 0 -> 360 bytes gfx/mobile/password_bottom.tilemap | Bin 0 -> 220 bytes gfx/mobile/password_shift.tilemap | Bin 0 -> 140 bytes gfx/mobile/password_top.tilemap | Bin 0 -> 140 bytes gfx/mobile/phone_tiles.png | Bin 0 -> 235 bytes gfx/mobile/pichu_animated.png | Bin 0 -> 1939 bytes gfx/mobile/pichu_border.attrmap | 1 + gfx/mobile/pichu_border.png | Bin 0 -> 266 bytes gfx/mobile/pichu_border.tilemap | 1 + gfx/mobile/pichu_border_bg.pal | 4 + gfx/mobile/pichu_border_ob.pal | 39 + gfx/mobile/pokemon_news.bin | Bin 0 -> 1128 bytes gfx/mobile/pokemon_news.pal | 39 + gfx/mobile/pokemon_news.png | Bin 0 -> 571 bytes gfx/mobile/select.png | Bin 0 -> 162 bytes gfx/mobile/select_start.png | Bin 0 -> 130 bytes gfx/mobile/stadium2_n64.attrmap | Bin 0 -> 360 bytes gfx/mobile/stadium2_n64.png | Bin 0 -> 787 bytes gfx/mobile/stadium2_n64.tilemap | 13 + gfx/mobile/unused_mobile_pulses.pal | 11 + gfx/mobile/up_arrow.png | Bin 0 -> 82 bytes gfx/mystery_gift/card_sprite.png | Bin 0 -> 133 bytes gfx/mystery_gift/card_trade.png | Bin 0 -> 620 bytes gfx/mystery_gift/gs_mystery_gift.pal | 4 + gfx/mystery_gift/mg_mobile.pal | 24 + gfx/mystery_gift/mobile_text.pal | 4 + gfx/mystery_gift/mystery_gift.pal | 9 + gfx/mystery_gift/mystery_gift.png | Bin 0 -> 694 bytes gfx/mystery_gift/name_card_bg.pal | 4 + gfx/mystery_gift/name_card_ob.pal | 4 + gfx/naming_screen/border.png | Bin 0 -> 82 bytes gfx/naming_screen/cursor.png | Bin 0 -> 78 bytes gfx/naming_screen/end.png | Bin 0 -> 82 bytes gfx/naming_screen/mail.png | Bin 0 -> 135 bytes gfx/naming_screen/middle_line.png | Bin 0 -> 76 bytes gfx/naming_screen/underline.png | Bin 0 -> 74 bytes gfx/new_game/down_arrow.png | Bin 0 -> 82 bytes gfx/new_game/gender_screen.pal | 4 + gfx/new_game/gender_screen.png | Bin 0 -> 71 bytes gfx/new_game/shrink1.png | Bin 0 -> 188 bytes gfx/new_game/shrink2.png | Bin 0 -> 156 bytes gfx/new_game/timeset_bg.png | Bin 0 -> 68 bytes gfx/new_game/up_arrow.png | Bin 0 -> 82 bytes gfx/overworld/boulder_dust.png | Bin 0 -> 106 bytes gfx/overworld/celebi.png | Bin 0 -> 205 bytes gfx/overworld/chris_fish.png | Bin 0 -> 195 bytes gfx/overworld/cut_grass.png | Bin 0 -> 134 bytes gfx/overworld/cut_tree.png | Bin 0 -> 140 bytes gfx/overworld/fishing_rod.png | Bin 0 -> 103 bytes gfx/overworld/grass_rustle.png | Bin 0 -> 88 bytes gfx/overworld/headbutt_tree.png | Bin 0 -> 197 bytes gfx/overworld/heal_machine.pal | 4 + gfx/overworld/heal_machine.png | Bin 0 -> 93 bytes gfx/overworld/kris_fish.png | Bin 0 -> 200 bytes gfx/overworld/magnet_train_bg.tilemap | 1 + gfx/overworld/magnet_train_fg.tilemap | Bin 0 -> 80 bytes gfx/overworld/npc_sprites.pal | 39 + gfx/overworld/shadow.png | Bin 0 -> 84 bytes gfx/overworld/trainer_battle.pal | 4 + gfx/overworld/trainer_battle_dark.pal | 4 + .../trainer_battle_pokeball_tiles.png | Bin 0 -> 89 bytes gfx/pack/pack.pal | 29 + gfx/pack/pack.png | Bin 0 -> 282 bytes gfx/pack/pack_f.pal | 29 + gfx/pack/pack_f.png | Bin 0 -> 356 bytes gfx/pack/pack_menu.png | Bin 0 -> 356 bytes gfx/pack/pack_menu.tilemap | Bin 0 -> 60 bytes gfx/pc/orange.pal | 4 + gfx/pc/pc.png | Bin 0 -> 115 bytes gfx/pc/pc_mail.png | Bin 0 -> 114 bytes gfx/pics.asm | 775 ++ gfx/player/chris.png | Bin 0 -> 417 bytes gfx/player/chris_back.png | Bin 0 -> 458 bytes gfx/player/kris.png | Bin 0 -> 418 bytes gfx/player/kris_back.png | Bin 0 -> 484 bytes gfx/pokedex/cursor.pal | 4 + gfx/pokedex/pokedex.png | Bin 0 -> 433 bytes gfx/pokedex/pokedex_sgb.png | Bin 0 -> 429 bytes gfx/pokedex/question_mark.pal | 4 + gfx/pokedex/question_mark.png | Bin 0 -> 183 bytes gfx/pokedex/slowpoke.png | Bin 0 -> 391 bytes gfx/pokegear/clock.tilemap.rle | 1 + gfx/pokegear/dexmap_nest_icon.png | Bin 0 -> 86 bytes gfx/pokegear/fast_ship.png | Bin 0 -> 154 bytes gfx/pokegear/flymap_label_border.png | Bin 0 -> 121 bytes gfx/pokegear/johto.bin | Bin 0 -> 361 bytes gfx/pokegear/kanto.bin | Bin 0 -> 361 bytes gfx/pokegear/phone.tilemap.rle | 4 + gfx/pokegear/pokegear.pal | 30 + gfx/pokegear/pokegear.png | Bin 0 -> 388 bytes gfx/pokegear/pokegear_f.pal | 30 + gfx/pokegear/pokegear_sprites.png | Bin 0 -> 133 bytes gfx/pokegear/radio.tilemap.rle | 5 + gfx/pokegear/town_map.png | Bin 0 -> 441 bytes gfx/pokegear/town_map_palette_map.asm | 29 + gfx/pokemon/abra/anim.asm | 6 + gfx/pokemon/abra/anim_idle.asm | 5 + gfx/pokemon/abra/back.png | Bin 0 -> 445 bytes gfx/pokemon/abra/front.png | Bin 0 -> 674 bytes gfx/pokemon/abra/shiny.pal | 4 + gfx/pokemon/aerodactyl/anim.asm | 8 + gfx/pokemon/aerodactyl/anim_idle.asm | 5 + gfx/pokemon/aerodactyl/back.png | Bin 0 -> 414 bytes gfx/pokemon/aerodactyl/front.png | Bin 0 -> 1159 bytes gfx/pokemon/aerodactyl/shiny.pal | 4 + gfx/pokemon/aipom/anim.asm | 6 + gfx/pokemon/aipom/anim_idle.asm | 5 + gfx/pokemon/aipom/back.png | Bin 0 -> 410 bytes gfx/pokemon/aipom/front.png | Bin 0 -> 664 bytes gfx/pokemon/aipom/shiny.pal | 4 + gfx/pokemon/alakazam/anim.asm | 8 + gfx/pokemon/alakazam/anim_idle.asm | 4 + gfx/pokemon/alakazam/back.png | Bin 0 -> 532 bytes gfx/pokemon/alakazam/front.png | Bin 0 -> 1482 bytes gfx/pokemon/alakazam/shiny.pal | 4 + gfx/pokemon/ampharos/anim.asm | 9 + gfx/pokemon/ampharos/anim_idle.asm | 6 + gfx/pokemon/ampharos/back.png | Bin 0 -> 394 bytes gfx/pokemon/ampharos/front.png | Bin 0 -> 1141 bytes gfx/pokemon/ampharos/shiny.pal | 4 + gfx/pokemon/anim_pointers.asm | 254 + gfx/pokemon/anims.asm | 252 + gfx/pokemon/arbok/anim.asm | 14 + gfx/pokemon/arbok/anim_idle.asm | 7 + gfx/pokemon/arbok/back.png | Bin 0 -> 354 bytes gfx/pokemon/arbok/front.png | Bin 0 -> 1533 bytes gfx/pokemon/arbok/shiny.pal | 4 + gfx/pokemon/arcanine/anim.asm | 6 + gfx/pokemon/arcanine/anim_idle.asm | 5 + gfx/pokemon/arcanine/back.png | Bin 0 -> 468 bytes gfx/pokemon/arcanine/front.png | Bin 0 -> 1580 bytes gfx/pokemon/arcanine/shiny.pal | 4 + gfx/pokemon/ariados/anim.asm | 7 + gfx/pokemon/ariados/anim_idle.asm | 7 + gfx/pokemon/ariados/back.png | Bin 0 -> 428 bytes gfx/pokemon/ariados/front.png | Bin 0 -> 1036 bytes gfx/pokemon/ariados/shiny.pal | 4 + gfx/pokemon/articuno/anim.asm | 8 + gfx/pokemon/articuno/anim_idle.asm | 7 + gfx/pokemon/articuno/back.png | Bin 0 -> 386 bytes gfx/pokemon/articuno/front.png | Bin 0 -> 1679 bytes gfx/pokemon/articuno/shiny.pal | 4 + gfx/pokemon/azumarill/anim.asm | 8 + gfx/pokemon/azumarill/anim_idle.asm | 5 + gfx/pokemon/azumarill/back.png | Bin 0 -> 347 bytes gfx/pokemon/azumarill/front.png | Bin 0 -> 891 bytes gfx/pokemon/azumarill/shiny.pal | 4 + gfx/pokemon/bayleef/anim.asm | 4 + gfx/pokemon/bayleef/anim_idle.asm | 5 + gfx/pokemon/bayleef/back.png | Bin 0 -> 484 bytes gfx/pokemon/bayleef/front.png | Bin 0 -> 971 bytes gfx/pokemon/bayleef/shiny.pal | 4 + gfx/pokemon/beedrill/anim.asm | 11 + gfx/pokemon/beedrill/anim_idle.asm | 9 + gfx/pokemon/beedrill/back.png | Bin 0 -> 460 bytes gfx/pokemon/beedrill/front.png | Bin 0 -> 1440 bytes gfx/pokemon/beedrill/shiny.pal | 4 + gfx/pokemon/bellossom/anim.asm | 9 + gfx/pokemon/bellossom/anim_idle.asm | 5 + gfx/pokemon/bellossom/back.png | Bin 0 -> 423 bytes gfx/pokemon/bellossom/front.png | Bin 0 -> 918 bytes gfx/pokemon/bellossom/shiny.pal | 4 + gfx/pokemon/bellsprout/anim.asm | 11 + gfx/pokemon/bellsprout/anim_idle.asm | 7 + gfx/pokemon/bellsprout/back.png | Bin 0 -> 365 bytes gfx/pokemon/bellsprout/front.png | Bin 0 -> 682 bytes gfx/pokemon/bellsprout/shiny.pal | 4 + gfx/pokemon/bitmask_pointers.asm | 254 + gfx/pokemon/bitmasks.asm | 252 + gfx/pokemon/blastoise/anim.asm | 5 + gfx/pokemon/blastoise/anim_idle.asm | 5 + gfx/pokemon/blastoise/back.png | Bin 0 -> 468 bytes gfx/pokemon/blastoise/front.png | Bin 0 -> 1477 bytes gfx/pokemon/blastoise/shiny.pal | 4 + gfx/pokemon/blissey/anim.asm | 7 + gfx/pokemon/blissey/anim_idle.asm | 5 + gfx/pokemon/blissey/back.png | Bin 0 -> 352 bytes gfx/pokemon/blissey/front.png | Bin 0 -> 1070 bytes gfx/pokemon/blissey/shiny.pal | 4 + gfx/pokemon/bulbasaur/anim.asm | 9 + gfx/pokemon/bulbasaur/anim_idle.asm | 4 + gfx/pokemon/bulbasaur/back.png | Bin 0 -> 374 bytes gfx/pokemon/bulbasaur/front.png | Bin 0 -> 557 bytes gfx/pokemon/bulbasaur/shiny.pal | 4 + gfx/pokemon/butterfree/anim.asm | 7 + gfx/pokemon/butterfree/anim_idle.asm | 5 + gfx/pokemon/butterfree/back.png | Bin 0 -> 499 bytes gfx/pokemon/butterfree/front.png | Bin 0 -> 1052 bytes gfx/pokemon/butterfree/shiny.pal | 4 + gfx/pokemon/caterpie/anim.asm | 7 + gfx/pokemon/caterpie/anim_idle.asm | 5 + gfx/pokemon/caterpie/back.png | Bin 0 -> 390 bytes gfx/pokemon/caterpie/front.png | Bin 0 -> 479 bytes gfx/pokemon/caterpie/shiny.pal | 4 + gfx/pokemon/celebi/anim.asm | 15 + gfx/pokemon/celebi/anim_idle.asm | 7 + gfx/pokemon/celebi/back.png | Bin 0 -> 515 bytes gfx/pokemon/celebi/front.png | Bin 0 -> 889 bytes gfx/pokemon/celebi/shiny.pal | 4 + gfx/pokemon/chansey/anim.asm | 9 + gfx/pokemon/chansey/anim_idle.asm | 5 + gfx/pokemon/chansey/back.png | Bin 0 -> 389 bytes gfx/pokemon/chansey/front.png | Bin 0 -> 813 bytes gfx/pokemon/chansey/shiny.pal | 4 + gfx/pokemon/charizard/anim.asm | 7 + gfx/pokemon/charizard/anim_idle.asm | 5 + gfx/pokemon/charizard/back.png | Bin 0 -> 436 bytes gfx/pokemon/charizard/front.png | Bin 0 -> 1217 bytes gfx/pokemon/charizard/shiny.pal | 4 + gfx/pokemon/charmander/anim.asm | 8 + gfx/pokemon/charmander/anim_idle.asm | 5 + gfx/pokemon/charmander/back.png | Bin 0 -> 385 bytes gfx/pokemon/charmander/front.png | Bin 0 -> 786 bytes gfx/pokemon/charmander/shiny.pal | 4 + gfx/pokemon/charmeleon/anim.asm | 8 + gfx/pokemon/charmeleon/anim_idle.asm | 7 + gfx/pokemon/charmeleon/back.png | Bin 0 -> 442 bytes gfx/pokemon/charmeleon/front.png | Bin 0 -> 1118 bytes gfx/pokemon/charmeleon/shiny.pal | 4 + gfx/pokemon/chikorita/anim.asm | 9 + gfx/pokemon/chikorita/anim_idle.asm | 5 + gfx/pokemon/chikorita/back.png | Bin 0 -> 403 bytes gfx/pokemon/chikorita/front.png | Bin 0 -> 891 bytes gfx/pokemon/chikorita/shiny.pal | 4 + gfx/pokemon/chinchou/anim.asm | 10 + gfx/pokemon/chinchou/anim_idle.asm | 5 + gfx/pokemon/chinchou/back.png | Bin 0 -> 376 bytes gfx/pokemon/chinchou/front.png | Bin 0 -> 727 bytes gfx/pokemon/chinchou/shiny.pal | 4 + gfx/pokemon/clefable/anim.asm | 5 + gfx/pokemon/clefable/anim_idle.asm | 5 + gfx/pokemon/clefable/back.png | Bin 0 -> 500 bytes gfx/pokemon/clefable/front.png | Bin 0 -> 938 bytes gfx/pokemon/clefable/shiny.pal | 4 + gfx/pokemon/clefairy/anim.asm | 8 + gfx/pokemon/clefairy/anim_idle.asm | 7 + gfx/pokemon/clefairy/back.png | Bin 0 -> 436 bytes gfx/pokemon/clefairy/front.png | Bin 0 -> 696 bytes gfx/pokemon/clefairy/shiny.pal | 4 + gfx/pokemon/cleffa/anim.asm | 4 + gfx/pokemon/cleffa/anim_idle.asm | 5 + gfx/pokemon/cleffa/back.png | Bin 0 -> 337 bytes gfx/pokemon/cleffa/front.png | Bin 0 -> 600 bytes gfx/pokemon/cleffa/shiny.pal | 4 + gfx/pokemon/cloyster/anim.asm | 6 + gfx/pokemon/cloyster/anim_idle.asm | 3 + gfx/pokemon/cloyster/back.png | Bin 0 -> 556 bytes gfx/pokemon/cloyster/front.png | Bin 0 -> 1257 bytes gfx/pokemon/cloyster/shiny.pal | 4 + gfx/pokemon/corsola/anim.asm | 6 + gfx/pokemon/corsola/anim_idle.asm | 5 + gfx/pokemon/corsola/back.png | Bin 0 -> 388 bytes gfx/pokemon/corsola/front.png | Bin 0 -> 735 bytes gfx/pokemon/corsola/shiny.pal | 4 + gfx/pokemon/crobat/anim.asm | 9 + gfx/pokemon/crobat/anim_idle.asm | 5 + gfx/pokemon/crobat/back.png | Bin 0 -> 354 bytes gfx/pokemon/crobat/front.png | Bin 0 -> 951 bytes gfx/pokemon/crobat/shiny.pal | 4 + gfx/pokemon/croconaw/anim.asm | 6 + gfx/pokemon/croconaw/anim_idle.asm | 5 + gfx/pokemon/croconaw/back.png | Bin 0 -> 478 bytes gfx/pokemon/croconaw/front.png | Bin 0 -> 1182 bytes gfx/pokemon/croconaw/shiny.pal | 4 + gfx/pokemon/cubone/anim.asm | 11 + gfx/pokemon/cubone/anim_idle.asm | 5 + gfx/pokemon/cubone/back.png | Bin 0 -> 472 bytes gfx/pokemon/cubone/front.png | Bin 0 -> 855 bytes gfx/pokemon/cubone/shiny.pal | 4 + gfx/pokemon/cyndaquil/anim.asm | 11 + gfx/pokemon/cyndaquil/anim_idle.asm | 5 + gfx/pokemon/cyndaquil/back.png | Bin 0 -> 498 bytes gfx/pokemon/cyndaquil/front.png | Bin 0 -> 776 bytes gfx/pokemon/cyndaquil/shiny.pal | 4 + gfx/pokemon/delibird/anim.asm | 11 + gfx/pokemon/delibird/anim_idle.asm | 5 + gfx/pokemon/delibird/back.png | Bin 0 -> 447 bytes gfx/pokemon/delibird/front.png | Bin 0 -> 951 bytes gfx/pokemon/delibird/shiny.pal | 4 + gfx/pokemon/dewgong/anim.asm | 6 + gfx/pokemon/dewgong/anim_idle.asm | 8 + gfx/pokemon/dewgong/back.png | Bin 0 -> 337 bytes gfx/pokemon/dewgong/front.png | Bin 0 -> 1578 bytes gfx/pokemon/dewgong/shiny.pal | 4 + gfx/pokemon/diglett/anim.asm | 6 + gfx/pokemon/diglett/anim_idle.asm | 5 + gfx/pokemon/diglett/back.png | Bin 0 -> 285 bytes gfx/pokemon/diglett/front.png | Bin 0 -> 529 bytes gfx/pokemon/diglett/shiny.pal | 4 + gfx/pokemon/ditto/anim.asm | 10 + gfx/pokemon/ditto/anim_idle.asm | 5 + gfx/pokemon/ditto/back.png | Bin 0 -> 315 bytes gfx/pokemon/ditto/front.png | Bin 0 -> 692 bytes gfx/pokemon/ditto/shiny.pal | 4 + gfx/pokemon/dodrio/anim.asm | 5 + gfx/pokemon/dodrio/anim_idle.asm | 5 + gfx/pokemon/dodrio/back.png | Bin 0 -> 553 bytes gfx/pokemon/dodrio/front.png | Bin 0 -> 1315 bytes gfx/pokemon/dodrio/shiny.pal | 4 + gfx/pokemon/doduo/anim.asm | 8 + gfx/pokemon/doduo/anim_idle.asm | 7 + gfx/pokemon/doduo/back.png | Bin 0 -> 447 bytes gfx/pokemon/doduo/front.png | Bin 0 -> 650 bytes gfx/pokemon/doduo/shiny.pal | 4 + gfx/pokemon/donphan/anim.asm | 5 + gfx/pokemon/donphan/anim_idle.asm | 5 + gfx/pokemon/donphan/back.png | Bin 0 -> 352 bytes gfx/pokemon/donphan/front.png | Bin 0 -> 1170 bytes gfx/pokemon/donphan/shiny.pal | 4 + gfx/pokemon/dragonair/anim.asm | 7 + gfx/pokemon/dragonair/anim_idle.asm | 9 + gfx/pokemon/dragonair/back.png | Bin 0 -> 430 bytes gfx/pokemon/dragonair/front.png | Bin 0 -> 1064 bytes gfx/pokemon/dragonair/shiny.pal | 4 + gfx/pokemon/dragonite/anim.asm | 12 + gfx/pokemon/dragonite/anim_idle.asm | 7 + gfx/pokemon/dragonite/back.png | Bin 0 -> 386 bytes gfx/pokemon/dragonite/front.png | Bin 0 -> 1282 bytes gfx/pokemon/dragonite/shiny.pal | 4 + gfx/pokemon/dratini/anim.asm | 7 + gfx/pokemon/dratini/anim_idle.asm | 5 + gfx/pokemon/dratini/back.png | Bin 0 -> 357 bytes gfx/pokemon/dratini/front.png | Bin 0 -> 674 bytes gfx/pokemon/dratini/shiny.pal | 4 + gfx/pokemon/drowzee/anim.asm | 10 + gfx/pokemon/drowzee/anim_idle.asm | 7 + gfx/pokemon/drowzee/back.png | Bin 0 -> 353 bytes gfx/pokemon/drowzee/front.png | Bin 0 -> 1013 bytes gfx/pokemon/drowzee/shiny.pal | 4 + gfx/pokemon/dugtrio/anim.asm | 15 + gfx/pokemon/dugtrio/anim_idle.asm | 9 + gfx/pokemon/dugtrio/back.png | Bin 0 -> 397 bytes gfx/pokemon/dugtrio/front.png | Bin 0 -> 984 bytes gfx/pokemon/dugtrio/shiny.pal | 4 + gfx/pokemon/dunsparce/anim.asm | 7 + gfx/pokemon/dunsparce/anim_idle.asm | 5 + gfx/pokemon/dunsparce/back.png | Bin 0 -> 332 bytes gfx/pokemon/dunsparce/front.png | Bin 0 -> 860 bytes gfx/pokemon/dunsparce/shiny.pal | 4 + gfx/pokemon/eevee/anim.asm | 8 + gfx/pokemon/eevee/anim_idle.asm | 7 + gfx/pokemon/eevee/back.png | Bin 0 -> 473 bytes gfx/pokemon/eevee/front.png | Bin 0 -> 741 bytes gfx/pokemon/eevee/shiny.pal | 4 + gfx/pokemon/egg/anim.asm | 7 + gfx/pokemon/egg/anim_idle.asm | 4 + gfx/pokemon/egg/front.png | Bin 0 -> 444 bytes gfx/pokemon/egg/shiny.pal | 4 + gfx/pokemon/egg/unused_front.png | Bin 0 -> 219 bytes gfx/pokemon/ekans/anim.asm | 8 + gfx/pokemon/ekans/anim_idle.asm | 7 + gfx/pokemon/ekans/back.png | Bin 0 -> 449 bytes gfx/pokemon/ekans/front.png | Bin 0 -> 792 bytes gfx/pokemon/ekans/shiny.pal | 4 + gfx/pokemon/electabuzz/anim.asm | 12 + gfx/pokemon/electabuzz/anim_idle.asm | 5 + gfx/pokemon/electabuzz/back.png | Bin 0 -> 461 bytes gfx/pokemon/electabuzz/front.png | Bin 0 -> 1036 bytes gfx/pokemon/electabuzz/shiny.pal | 4 + gfx/pokemon/electrode/anim.asm | 3 + gfx/pokemon/electrode/anim_idle.asm | 2 + gfx/pokemon/electrode/back.png | Bin 0 -> 308 bytes gfx/pokemon/electrode/front.png | Bin 0 -> 480 bytes gfx/pokemon/electrode/shiny.pal | 4 + gfx/pokemon/elekid/anim.asm | 10 + gfx/pokemon/elekid/anim_idle.asm | 6 + gfx/pokemon/elekid/back.png | Bin 0 -> 508 bytes gfx/pokemon/elekid/front.png | Bin 0 -> 1092 bytes gfx/pokemon/elekid/shiny.pal | 4 + gfx/pokemon/entei/anim.asm | 5 + gfx/pokemon/entei/anim_idle.asm | 5 + gfx/pokemon/entei/back.png | Bin 0 -> 448 bytes gfx/pokemon/entei/front.png | Bin 0 -> 1553 bytes gfx/pokemon/entei/shiny.pal | 4 + gfx/pokemon/espeon/anim.asm | 8 + gfx/pokemon/espeon/anim_idle.asm | 5 + gfx/pokemon/espeon/back.png | Bin 0 -> 410 bytes gfx/pokemon/espeon/front.png | Bin 0 -> 897 bytes gfx/pokemon/espeon/shiny.pal | 4 + gfx/pokemon/exeggcute/anim.asm | 16 + gfx/pokemon/exeggcute/anim_idle.asm | 5 + gfx/pokemon/exeggcute/back.png | Bin 0 -> 431 bytes gfx/pokemon/exeggcute/front.png | Bin 0 -> 1229 bytes gfx/pokemon/exeggcute/shiny.pal | 4 + gfx/pokemon/exeggutor/anim.asm | 8 + gfx/pokemon/exeggutor/anim_idle.asm | 5 + gfx/pokemon/exeggutor/back.png | Bin 0 -> 527 bytes gfx/pokemon/exeggutor/front.png | Bin 0 -> 927 bytes gfx/pokemon/exeggutor/shiny.pal | 4 + gfx/pokemon/farfetch_d/anim.asm | 5 + gfx/pokemon/farfetch_d/anim_idle.asm | 4 + gfx/pokemon/farfetch_d/back.png | Bin 0 -> 479 bytes gfx/pokemon/farfetch_d/front.png | Bin 0 -> 1049 bytes gfx/pokemon/farfetch_d/shiny.pal | 4 + gfx/pokemon/fearow/anim.asm | 7 + gfx/pokemon/fearow/anim_idle.asm | 5 + gfx/pokemon/fearow/back.png | Bin 0 -> 339 bytes gfx/pokemon/fearow/front.png | Bin 0 -> 1316 bytes gfx/pokemon/fearow/shiny.pal | 4 + gfx/pokemon/feraligatr/anim.asm | 6 + gfx/pokemon/feraligatr/anim_idle.asm | 5 + gfx/pokemon/feraligatr/back.png | Bin 0 -> 550 bytes gfx/pokemon/feraligatr/front.png | Bin 0 -> 1454 bytes gfx/pokemon/feraligatr/shiny.pal | 4 + gfx/pokemon/flaaffy/anim.asm | 7 + gfx/pokemon/flaaffy/anim_idle.asm | 5 + gfx/pokemon/flaaffy/back.png | Bin 0 -> 489 bytes gfx/pokemon/flaaffy/front.png | Bin 0 -> 840 bytes gfx/pokemon/flaaffy/shiny.pal | 4 + gfx/pokemon/flareon/anim.asm | 6 + gfx/pokemon/flareon/anim_idle.asm | 5 + gfx/pokemon/flareon/back.png | Bin 0 -> 455 bytes gfx/pokemon/flareon/front.png | Bin 0 -> 1090 bytes gfx/pokemon/flareon/shiny.pal | 4 + gfx/pokemon/forretress/anim.asm | 10 + gfx/pokemon/forretress/anim_idle.asm | 5 + gfx/pokemon/forretress/back.png | Bin 0 -> 229 bytes gfx/pokemon/forretress/front.png | Bin 0 -> 947 bytes gfx/pokemon/forretress/shiny.pal | 4 + gfx/pokemon/frame_pointers.asm | 254 + gfx/pokemon/furret/anim.asm | 7 + gfx/pokemon/furret/anim_idle.asm | 5 + gfx/pokemon/furret/back.png | Bin 0 -> 450 bytes gfx/pokemon/furret/front.png | Bin 0 -> 869 bytes gfx/pokemon/furret/shiny.pal | 4 + gfx/pokemon/gastly/anim.asm | 7 + gfx/pokemon/gastly/anim_idle.asm | 5 + gfx/pokemon/gastly/back.png | Bin 0 -> 319 bytes gfx/pokemon/gastly/front.png | Bin 0 -> 993 bytes gfx/pokemon/gastly/shiny.pal | 4 + gfx/pokemon/gengar/anim.asm | 8 + gfx/pokemon/gengar/anim_idle.asm | 8 + gfx/pokemon/gengar/back.png | Bin 0 -> 396 bytes gfx/pokemon/gengar/front.png | Bin 0 -> 917 bytes gfx/pokemon/gengar/shiny.pal | 4 + gfx/pokemon/geodude/anim.asm | 7 + gfx/pokemon/geodude/anim_idle.asm | 5 + gfx/pokemon/geodude/back.png | Bin 0 -> 471 bytes gfx/pokemon/geodude/front.png | Bin 0 -> 557 bytes gfx/pokemon/geodude/shiny.pal | 4 + gfx/pokemon/girafarig/anim.asm | 13 + gfx/pokemon/girafarig/anim_idle.asm | 3 + gfx/pokemon/girafarig/back.png | Bin 0 -> 458 bytes gfx/pokemon/girafarig/front.png | Bin 0 -> 1201 bytes gfx/pokemon/girafarig/shiny.pal | 4 + gfx/pokemon/gligar/anim.asm | 2 + gfx/pokemon/gligar/anim_idle.asm | 2 + gfx/pokemon/gligar/back.png | Bin 0 -> 467 bytes gfx/pokemon/gligar/front.png | Bin 0 -> 748 bytes gfx/pokemon/gligar/shiny.pal | 4 + gfx/pokemon/gloom/anim.asm | 11 + gfx/pokemon/gloom/anim_idle.asm | 5 + gfx/pokemon/gloom/back.png | Bin 0 -> 455 bytes gfx/pokemon/gloom/front.png | Bin 0 -> 800 bytes gfx/pokemon/gloom/shiny.pal | 4 + gfx/pokemon/golbat/anim.asm | 10 + gfx/pokemon/golbat/anim_idle.asm | 5 + gfx/pokemon/golbat/back.png | Bin 0 -> 285 bytes gfx/pokemon/golbat/front.png | Bin 0 -> 1209 bytes gfx/pokemon/golbat/shiny.pal | 4 + gfx/pokemon/goldeen/anim.asm | 7 + gfx/pokemon/goldeen/anim_idle.asm | 5 + gfx/pokemon/goldeen/back.png | Bin 0 -> 488 bytes gfx/pokemon/goldeen/front.png | Bin 0 -> 824 bytes gfx/pokemon/goldeen/shiny.pal | 4 + gfx/pokemon/golduck/anim.asm | 12 + gfx/pokemon/golduck/anim_idle.asm | 5 + gfx/pokemon/golduck/back.png | Bin 0 -> 413 bytes gfx/pokemon/golduck/front.png | Bin 0 -> 1594 bytes gfx/pokemon/golduck/shiny.pal | 4 + gfx/pokemon/golem/anim.asm | 6 + gfx/pokemon/golem/anim_idle.asm | 5 + gfx/pokemon/golem/back.png | Bin 0 -> 288 bytes gfx/pokemon/golem/front.png | Bin 0 -> 963 bytes gfx/pokemon/golem/shiny.pal | 4 + gfx/pokemon/granbull/anim.asm | 7 + gfx/pokemon/granbull/anim_idle.asm | 5 + gfx/pokemon/granbull/back.png | Bin 0 -> 389 bytes gfx/pokemon/granbull/front.png | Bin 0 -> 820 bytes gfx/pokemon/granbull/shiny.pal | 4 + gfx/pokemon/graveler/anim.asm | 9 + gfx/pokemon/graveler/anim_idle.asm | 6 + gfx/pokemon/graveler/back.png | Bin 0 -> 441 bytes gfx/pokemon/graveler/front.png | Bin 0 -> 957 bytes gfx/pokemon/graveler/shiny.pal | 4 + gfx/pokemon/grimer/anim.asm | 5 + gfx/pokemon/grimer/anim_idle.asm | 7 + gfx/pokemon/grimer/back.png | Bin 0 -> 386 bytes gfx/pokemon/grimer/front.png | Bin 0 -> 740 bytes gfx/pokemon/grimer/shiny.pal | 4 + gfx/pokemon/growlithe/anim.asm | 8 + gfx/pokemon/growlithe/anim_idle.asm | 6 + gfx/pokemon/growlithe/back.png | Bin 0 -> 448 bytes gfx/pokemon/growlithe/front.png | Bin 0 -> 655 bytes gfx/pokemon/growlithe/shiny.pal | 4 + gfx/pokemon/gyarados/anim.asm | 5 + gfx/pokemon/gyarados/anim_idle.asm | 5 + gfx/pokemon/gyarados/back.png | Bin 0 -> 520 bytes gfx/pokemon/gyarados/front.png | Bin 0 -> 1403 bytes gfx/pokemon/gyarados/shiny.pal | 4 + gfx/pokemon/haunter/anim.asm | 6 + gfx/pokemon/haunter/anim_idle.asm | 2 + gfx/pokemon/haunter/back.png | Bin 0 -> 385 bytes gfx/pokemon/haunter/front.png | Bin 0 -> 900 bytes gfx/pokemon/haunter/shiny.pal | 4 + gfx/pokemon/heracross/anim.asm | 4 + gfx/pokemon/heracross/anim_idle.asm | 5 + gfx/pokemon/heracross/back.png | Bin 0 -> 464 bytes gfx/pokemon/heracross/front.png | Bin 0 -> 926 bytes gfx/pokemon/heracross/shiny.pal | 4 + gfx/pokemon/hitmonchan/anim.asm | 10 + gfx/pokemon/hitmonchan/anim_idle.asm | 7 + gfx/pokemon/hitmonchan/back.png | Bin 0 -> 439 bytes gfx/pokemon/hitmonchan/front.png | Bin 0 -> 894 bytes gfx/pokemon/hitmonchan/shiny.pal | 4 + gfx/pokemon/hitmonlee/anim.asm | 12 + gfx/pokemon/hitmonlee/anim_idle.asm | 5 + gfx/pokemon/hitmonlee/back.png | Bin 0 -> 391 bytes gfx/pokemon/hitmonlee/front.png | Bin 0 -> 1669 bytes gfx/pokemon/hitmonlee/shiny.pal | 4 + gfx/pokemon/hitmontop/anim.asm | 8 + gfx/pokemon/hitmontop/anim_idle.asm | 6 + gfx/pokemon/hitmontop/back.png | Bin 0 -> 538 bytes gfx/pokemon/hitmontop/front.png | Bin 0 -> 1093 bytes gfx/pokemon/hitmontop/shiny.pal | 4 + gfx/pokemon/ho_oh/anim.asm | 10 + gfx/pokemon/ho_oh/anim_idle.asm | 5 + gfx/pokemon/ho_oh/back.png | Bin 0 -> 464 bytes gfx/pokemon/ho_oh/front.png | Bin 0 -> 1754 bytes gfx/pokemon/ho_oh/shiny.pal | 4 + gfx/pokemon/hoothoot/anim.asm | 11 + gfx/pokemon/hoothoot/anim_idle.asm | 7 + gfx/pokemon/hoothoot/back.png | Bin 0 -> 427 bytes gfx/pokemon/hoothoot/front.png | Bin 0 -> 633 bytes gfx/pokemon/hoothoot/shiny.pal | 4 + gfx/pokemon/hoppip/anim.asm | 5 + gfx/pokemon/hoppip/anim_idle.asm | 6 + gfx/pokemon/hoppip/back.png | Bin 0 -> 391 bytes gfx/pokemon/hoppip/front.png | Bin 0 -> 527 bytes gfx/pokemon/hoppip/shiny.pal | 4 + gfx/pokemon/horsea/anim.asm | 7 + gfx/pokemon/horsea/anim_idle.asm | 5 + gfx/pokemon/horsea/back.png | Bin 0 -> 355 bytes gfx/pokemon/horsea/front.png | Bin 0 -> 529 bytes gfx/pokemon/horsea/shiny.pal | 4 + gfx/pokemon/houndoom/anim.asm | 9 + gfx/pokemon/houndoom/anim_idle.asm | 5 + gfx/pokemon/houndoom/back.png | Bin 0 -> 357 bytes gfx/pokemon/houndoom/front.png | Bin 0 -> 1203 bytes gfx/pokemon/houndoom/shiny.pal | 4 + gfx/pokemon/houndour/anim.asm | 6 + gfx/pokemon/houndour/anim_idle.asm | 7 + gfx/pokemon/houndour/back.png | Bin 0 -> 341 bytes gfx/pokemon/houndour/front.png | Bin 0 -> 757 bytes gfx/pokemon/houndour/shiny.pal | 4 + gfx/pokemon/hypno/anim.asm | 6 + gfx/pokemon/hypno/anim_idle.asm | 5 + gfx/pokemon/hypno/back.png | Bin 0 -> 485 bytes gfx/pokemon/hypno/front.png | Bin 0 -> 1173 bytes gfx/pokemon/hypno/shiny.pal | 4 + gfx/pokemon/idle_pointers.asm | 254 + gfx/pokemon/idles.asm | 252 + gfx/pokemon/igglybuff/anim.asm | 5 + gfx/pokemon/igglybuff/anim_idle.asm | 5 + gfx/pokemon/igglybuff/back.png | Bin 0 -> 358 bytes gfx/pokemon/igglybuff/front.png | Bin 0 -> 488 bytes gfx/pokemon/igglybuff/shiny.pal | 4 + gfx/pokemon/ivysaur/anim.asm | 5 + gfx/pokemon/ivysaur/anim_idle.asm | 7 + gfx/pokemon/ivysaur/back.png | Bin 0 -> 423 bytes gfx/pokemon/ivysaur/front.png | Bin 0 -> 748 bytes gfx/pokemon/ivysaur/shiny.pal | 4 + gfx/pokemon/jigglypuff/anim.asm | 10 + gfx/pokemon/jigglypuff/anim_idle.asm | 5 + gfx/pokemon/jigglypuff/back.png | Bin 0 -> 317 bytes gfx/pokemon/jigglypuff/front.png | Bin 0 -> 644 bytes gfx/pokemon/jigglypuff/shiny.pal | 4 + gfx/pokemon/johto_frames.asm | 103 + gfx/pokemon/jolteon/anim.asm | 9 + gfx/pokemon/jolteon/anim_idle.asm | 5 + gfx/pokemon/jolteon/back.png | Bin 0 -> 407 bytes gfx/pokemon/jolteon/front.png | Bin 0 -> 1091 bytes gfx/pokemon/jolteon/shiny.pal | 4 + gfx/pokemon/jumpluff/anim.asm | 4 + gfx/pokemon/jumpluff/anim_idle.asm | 5 + gfx/pokemon/jumpluff/back.png | Bin 0 -> 436 bytes gfx/pokemon/jumpluff/front.png | Bin 0 -> 1064 bytes gfx/pokemon/jumpluff/shiny.pal | 4 + gfx/pokemon/jynx/anim.asm | 7 + gfx/pokemon/jynx/anim_idle.asm | 5 + gfx/pokemon/jynx/back.png | Bin 0 -> 293 bytes gfx/pokemon/jynx/front.png | Bin 0 -> 829 bytes gfx/pokemon/jynx/shiny.pal | 4 + gfx/pokemon/kabuto/anim.asm | 5 + gfx/pokemon/kabuto/anim_idle.asm | 7 + gfx/pokemon/kabuto/back.png | Bin 0 -> 369 bytes gfx/pokemon/kabuto/front.png | Bin 0 -> 526 bytes gfx/pokemon/kabuto/shiny.pal | 4 + gfx/pokemon/kabutops/anim.asm | 7 + gfx/pokemon/kabutops/anim_idle.asm | 5 + gfx/pokemon/kabutops/back.png | Bin 0 -> 476 bytes gfx/pokemon/kabutops/front.png | Bin 0 -> 1015 bytes gfx/pokemon/kabutops/shiny.pal | 4 + gfx/pokemon/kadabra/anim.asm | 7 + gfx/pokemon/kadabra/anim_idle.asm | 5 + gfx/pokemon/kadabra/back.png | Bin 0 -> 450 bytes gfx/pokemon/kadabra/front.png | Bin 0 -> 1086 bytes gfx/pokemon/kadabra/shiny.pal | 4 + gfx/pokemon/kakuna/anim.asm | 3 + gfx/pokemon/kakuna/anim_idle.asm | 5 + gfx/pokemon/kakuna/back.png | Bin 0 -> 356 bytes gfx/pokemon/kakuna/front.png | Bin 0 -> 410 bytes gfx/pokemon/kakuna/shiny.pal | 4 + gfx/pokemon/kangaskhan/anim.asm | 8 + gfx/pokemon/kangaskhan/anim_idle.asm | 7 + gfx/pokemon/kangaskhan/back.png | Bin 0 -> 530 bytes gfx/pokemon/kangaskhan/front.png | Bin 0 -> 1437 bytes gfx/pokemon/kangaskhan/shiny.pal | 4 + gfx/pokemon/kanto_frames.asm | 153 + gfx/pokemon/kingdra/anim.asm | 9 + gfx/pokemon/kingdra/anim_idle.asm | 5 + gfx/pokemon/kingdra/back.png | Bin 0 -> 434 bytes gfx/pokemon/kingdra/front.png | Bin 0 -> 1158 bytes gfx/pokemon/kingdra/shiny.pal | 4 + gfx/pokemon/kingler/anim.asm | 9 + gfx/pokemon/kingler/anim_idle.asm | 5 + gfx/pokemon/kingler/back.png | Bin 0 -> 417 bytes gfx/pokemon/kingler/front.png | Bin 0 -> 1094 bytes gfx/pokemon/kingler/shiny.pal | 4 + gfx/pokemon/koffing/anim.asm | 6 + gfx/pokemon/koffing/anim_idle.asm | 2 + gfx/pokemon/koffing/back.png | Bin 0 -> 464 bytes gfx/pokemon/koffing/front.png | Bin 0 -> 826 bytes gfx/pokemon/koffing/shiny.pal | 4 + gfx/pokemon/krabby/anim.asm | 10 + gfx/pokemon/krabby/anim_idle.asm | 4 + gfx/pokemon/krabby/back.png | Bin 0 -> 504 bytes gfx/pokemon/krabby/front.png | Bin 0 -> 850 bytes gfx/pokemon/krabby/shiny.pal | 4 + gfx/pokemon/lanturn/anim.asm | 8 + gfx/pokemon/lanturn/anim_idle.asm | 5 + gfx/pokemon/lanturn/back.png | Bin 0 -> 348 bytes gfx/pokemon/lanturn/front.png | Bin 0 -> 847 bytes gfx/pokemon/lanturn/shiny.pal | 4 + gfx/pokemon/lapras/anim.asm | 6 + gfx/pokemon/lapras/anim_idle.asm | 5 + gfx/pokemon/lapras/back.png | Bin 0 -> 428 bytes gfx/pokemon/lapras/front.png | Bin 0 -> 947 bytes gfx/pokemon/lapras/shiny.pal | 4 + gfx/pokemon/larvitar/anim.asm | 5 + gfx/pokemon/larvitar/anim_idle.asm | 5 + gfx/pokemon/larvitar/back.png | Bin 0 -> 379 bytes gfx/pokemon/larvitar/front.png | Bin 0 -> 570 bytes gfx/pokemon/larvitar/shiny.pal | 4 + gfx/pokemon/ledian/anim.asm | 8 + gfx/pokemon/ledian/anim_idle.asm | 5 + gfx/pokemon/ledian/back.png | Bin 0 -> 453 bytes gfx/pokemon/ledian/front.png | Bin 0 -> 832 bytes gfx/pokemon/ledian/shiny.pal | 4 + gfx/pokemon/ledyba/anim.asm | 6 + gfx/pokemon/ledyba/anim_idle.asm | 6 + gfx/pokemon/ledyba/back.png | Bin 0 -> 531 bytes gfx/pokemon/ledyba/front.png | Bin 0 -> 913 bytes gfx/pokemon/ledyba/shiny.pal | 4 + gfx/pokemon/lickitung/anim.asm | 6 + gfx/pokemon/lickitung/anim_idle.asm | 5 + gfx/pokemon/lickitung/back.png | Bin 0 -> 398 bytes gfx/pokemon/lickitung/front.png | Bin 0 -> 1126 bytes gfx/pokemon/lickitung/shiny.pal | 4 + gfx/pokemon/lugia/anim.asm | 7 + gfx/pokemon/lugia/anim_idle.asm | 7 + gfx/pokemon/lugia/back.png | Bin 0 -> 379 bytes gfx/pokemon/lugia/front.png | Bin 0 -> 2154 bytes gfx/pokemon/lugia/shiny.pal | 4 + gfx/pokemon/machamp/anim.asm | 10 + gfx/pokemon/machamp/anim_idle.asm | 5 + gfx/pokemon/machamp/back.png | Bin 0 -> 580 bytes gfx/pokemon/machamp/front.png | Bin 0 -> 1958 bytes gfx/pokemon/machamp/shiny.pal | 4 + gfx/pokemon/machoke/anim.asm | 4 + gfx/pokemon/machoke/anim_idle.asm | 9 + gfx/pokemon/machoke/back.png | Bin 0 -> 447 bytes gfx/pokemon/machoke/front.png | Bin 0 -> 1317 bytes gfx/pokemon/machoke/shiny.pal | 4 + gfx/pokemon/machop/anim.asm | 7 + gfx/pokemon/machop/anim_idle.asm | 5 + gfx/pokemon/machop/back.png | Bin 0 -> 436 bytes gfx/pokemon/machop/front.png | Bin 0 -> 736 bytes gfx/pokemon/machop/shiny.pal | 4 + gfx/pokemon/magby/anim.asm | 7 + gfx/pokemon/magby/anim_idle.asm | 5 + gfx/pokemon/magby/back.png | Bin 0 -> 404 bytes gfx/pokemon/magby/front.png | Bin 0 -> 853 bytes gfx/pokemon/magby/shiny.pal | 4 + gfx/pokemon/magcargo/anim.asm | 6 + gfx/pokemon/magcargo/anim_idle.asm | 2 + gfx/pokemon/magcargo/back.png | Bin 0 -> 488 bytes gfx/pokemon/magcargo/front.png | Bin 0 -> 1100 bytes gfx/pokemon/magcargo/shiny.pal | 4 + gfx/pokemon/magikarp/anim.asm | 6 + gfx/pokemon/magikarp/anim_idle.asm | 5 + gfx/pokemon/magikarp/back.png | Bin 0 -> 475 bytes gfx/pokemon/magikarp/front.png | Bin 0 -> 805 bytes gfx/pokemon/magikarp/shiny.pal | 4 + gfx/pokemon/magmar/anim.asm | 6 + gfx/pokemon/magmar/anim_idle.asm | 5 + gfx/pokemon/magmar/back.png | Bin 0 -> 469 bytes gfx/pokemon/magmar/front.png | Bin 0 -> 1001 bytes gfx/pokemon/magmar/shiny.pal | 4 + gfx/pokemon/magnemite/anim.asm | 7 + gfx/pokemon/magnemite/anim_idle.asm | 6 + gfx/pokemon/magnemite/back.png | Bin 0 -> 288 bytes gfx/pokemon/magnemite/front.png | Bin 0 -> 548 bytes gfx/pokemon/magnemite/shiny.pal | 4 + gfx/pokemon/magneton/anim.asm | 11 + gfx/pokemon/magneton/anim_idle.asm | 8 + gfx/pokemon/magneton/back.png | Bin 0 -> 508 bytes gfx/pokemon/magneton/front.png | Bin 0 -> 938 bytes gfx/pokemon/magneton/shiny.pal | 4 + gfx/pokemon/mankey/anim.asm | 6 + gfx/pokemon/mankey/anim_idle.asm | 5 + gfx/pokemon/mankey/back.png | Bin 0 -> 497 bytes gfx/pokemon/mankey/front.png | Bin 0 -> 708 bytes gfx/pokemon/mankey/shiny.pal | 4 + gfx/pokemon/mantine/anim.asm | 8 + gfx/pokemon/mantine/anim_idle.asm | 5 + gfx/pokemon/mantine/back.png | Bin 0 -> 313 bytes gfx/pokemon/mantine/front.png | Bin 0 -> 1166 bytes gfx/pokemon/mantine/shiny.pal | 4 + gfx/pokemon/mareep/anim.asm | 8 + gfx/pokemon/mareep/anim_idle.asm | 5 + gfx/pokemon/mareep/back.png | Bin 0 -> 459 bytes gfx/pokemon/mareep/front.png | Bin 0 -> 640 bytes gfx/pokemon/mareep/shiny.pal | 4 + gfx/pokemon/marill/anim.asm | 8 + gfx/pokemon/marill/anim_idle.asm | 6 + gfx/pokemon/marill/back.png | Bin 0 -> 329 bytes gfx/pokemon/marill/front.png | Bin 0 -> 719 bytes gfx/pokemon/marill/shiny.pal | 4 + gfx/pokemon/marowak/anim.asm | 9 + gfx/pokemon/marowak/anim_idle.asm | 5 + gfx/pokemon/marowak/back.png | Bin 0 -> 460 bytes gfx/pokemon/marowak/front.png | Bin 0 -> 1099 bytes gfx/pokemon/marowak/shiny.pal | 4 + gfx/pokemon/meganium/anim.asm | 10 + gfx/pokemon/meganium/anim_idle.asm | 5 + gfx/pokemon/meganium/back.png | Bin 0 -> 414 bytes gfx/pokemon/meganium/front.png | Bin 0 -> 1308 bytes gfx/pokemon/meganium/shiny.pal | 4 + gfx/pokemon/meowth/anim.asm | 6 + gfx/pokemon/meowth/anim_idle.asm | 5 + gfx/pokemon/meowth/back.png | Bin 0 -> 420 bytes gfx/pokemon/meowth/front.png | Bin 0 -> 830 bytes gfx/pokemon/meowth/shiny.pal | 4 + gfx/pokemon/metapod/anim.asm | 4 + gfx/pokemon/metapod/anim_idle.asm | 6 + gfx/pokemon/metapod/back.png | Bin 0 -> 355 bytes gfx/pokemon/metapod/front.png | Bin 0 -> 468 bytes gfx/pokemon/metapod/shiny.pal | 4 + gfx/pokemon/mew/anim.asm | 17 + gfx/pokemon/mew/anim_idle.asm | 8 + gfx/pokemon/mew/back.png | Bin 0 -> 411 bytes gfx/pokemon/mew/front.png | Bin 0 -> 809 bytes gfx/pokemon/mew/shiny.pal | 4 + gfx/pokemon/mewtwo/anim.asm | 16 + gfx/pokemon/mewtwo/anim_idle.asm | 5 + gfx/pokemon/mewtwo/back.png | Bin 0 -> 463 bytes gfx/pokemon/mewtwo/front.png | Bin 0 -> 1331 bytes gfx/pokemon/mewtwo/shiny.pal | 4 + gfx/pokemon/miltank/anim.asm | 7 + gfx/pokemon/miltank/anim_idle.asm | 5 + gfx/pokemon/miltank/back.png | Bin 0 -> 476 bytes gfx/pokemon/miltank/front.png | Bin 0 -> 857 bytes gfx/pokemon/miltank/shiny.pal | 4 + gfx/pokemon/misdreavus/anim.asm | 4 + gfx/pokemon/misdreavus/anim_idle.asm | 5 + gfx/pokemon/misdreavus/back.png | Bin 0 -> 395 bytes gfx/pokemon/misdreavus/front.png | Bin 0 -> 668 bytes gfx/pokemon/misdreavus/shiny.pal | 4 + gfx/pokemon/moltres/anim.asm | 12 + gfx/pokemon/moltres/anim_idle.asm | 8 + gfx/pokemon/moltres/back.png | Bin 0 -> 447 bytes gfx/pokemon/moltres/front.png | Bin 0 -> 1647 bytes gfx/pokemon/moltres/shiny.pal | 4 + gfx/pokemon/mr__mime/anim.asm | 10 + gfx/pokemon/mr__mime/anim_idle.asm | 5 + gfx/pokemon/mr__mime/back.png | Bin 0 -> 371 bytes gfx/pokemon/mr__mime/front.png | Bin 0 -> 1375 bytes gfx/pokemon/mr__mime/shiny.pal | 4 + gfx/pokemon/muk/anim.asm | 5 + gfx/pokemon/muk/anim_idle.asm | 5 + gfx/pokemon/muk/back.png | Bin 0 -> 420 bytes gfx/pokemon/muk/front.png | Bin 0 -> 1066 bytes gfx/pokemon/muk/shiny.pal | 4 + gfx/pokemon/murkrow/anim.asm | 9 + gfx/pokemon/murkrow/anim_idle.asm | 5 + gfx/pokemon/murkrow/back.png | Bin 0 -> 407 bytes gfx/pokemon/murkrow/front.png | Bin 0 -> 887 bytes gfx/pokemon/murkrow/shiny.pal | 4 + gfx/pokemon/natu/anim.asm | 5 + gfx/pokemon/natu/anim_idle.asm | 2 + gfx/pokemon/natu/back.png | Bin 0 -> 289 bytes gfx/pokemon/natu/front.png | Bin 0 -> 436 bytes gfx/pokemon/natu/shiny.pal | 4 + gfx/pokemon/nidoking/anim.asm | 5 + gfx/pokemon/nidoking/anim_idle.asm | 5 + gfx/pokemon/nidoking/back.png | Bin 0 -> 597 bytes gfx/pokemon/nidoking/front.png | Bin 0 -> 1491 bytes gfx/pokemon/nidoking/shiny.pal | 4 + gfx/pokemon/nidoqueen/anim.asm | 9 + gfx/pokemon/nidoqueen/anim_idle.asm | 6 + gfx/pokemon/nidoqueen/back.png | Bin 0 -> 459 bytes gfx/pokemon/nidoqueen/front.png | Bin 0 -> 1567 bytes gfx/pokemon/nidoqueen/shiny.pal | 4 + gfx/pokemon/nidoran_f/anim.asm | 7 + gfx/pokemon/nidoran_f/anim_idle.asm | 5 + gfx/pokemon/nidoran_f/back.png | Bin 0 -> 420 bytes gfx/pokemon/nidoran_f/front.png | Bin 0 -> 685 bytes gfx/pokemon/nidoran_f/shiny.pal | 4 + gfx/pokemon/nidoran_m/anim.asm | 7 + gfx/pokemon/nidoran_m/anim_idle.asm | 5 + gfx/pokemon/nidoran_m/back.png | Bin 0 -> 504 bytes gfx/pokemon/nidoran_m/front.png | Bin 0 -> 760 bytes gfx/pokemon/nidoran_m/shiny.pal | 4 + gfx/pokemon/nidorina/anim.asm | 8 + gfx/pokemon/nidorina/anim_idle.asm | 5 + gfx/pokemon/nidorina/back.png | Bin 0 -> 489 bytes gfx/pokemon/nidorina/front.png | Bin 0 -> 979 bytes gfx/pokemon/nidorina/shiny.pal | 4 + gfx/pokemon/nidorino/anim.asm | 11 + gfx/pokemon/nidorino/anim_idle.asm | 7 + gfx/pokemon/nidorino/back.png | Bin 0 -> 474 bytes gfx/pokemon/nidorino/front.png | Bin 0 -> 1181 bytes gfx/pokemon/nidorino/shiny.pal | 4 + gfx/pokemon/ninetales/anim.asm | 9 + gfx/pokemon/ninetales/anim_idle.asm | 5 + gfx/pokemon/ninetales/back.png | Bin 0 -> 519 bytes gfx/pokemon/ninetales/front.png | Bin 0 -> 1573 bytes gfx/pokemon/ninetales/shiny.pal | 4 + gfx/pokemon/noctowl/anim.asm | 9 + gfx/pokemon/noctowl/anim_idle.asm | 5 + gfx/pokemon/noctowl/back.png | Bin 0 -> 405 bytes gfx/pokemon/noctowl/front.png | Bin 0 -> 1072 bytes gfx/pokemon/noctowl/shiny.pal | 4 + gfx/pokemon/octillery/anim.asm | 7 + gfx/pokemon/octillery/anim_idle.asm | 5 + gfx/pokemon/octillery/back.png | Bin 0 -> 354 bytes gfx/pokemon/octillery/front.png | Bin 0 -> 780 bytes gfx/pokemon/octillery/shiny.pal | 4 + gfx/pokemon/oddish/anim.asm | 10 + gfx/pokemon/oddish/anim_idle.asm | 5 + gfx/pokemon/oddish/back.png | Bin 0 -> 355 bytes gfx/pokemon/oddish/front.png | Bin 0 -> 549 bytes gfx/pokemon/oddish/shiny.pal | 4 + gfx/pokemon/omanyte/anim.asm | 4 + gfx/pokemon/omanyte/anim_idle.asm | 5 + gfx/pokemon/omanyte/back.png | Bin 0 -> 451 bytes gfx/pokemon/omanyte/front.png | Bin 0 -> 606 bytes gfx/pokemon/omanyte/shiny.pal | 4 + gfx/pokemon/omastar/anim.asm | 4 + gfx/pokemon/omastar/anim_idle.asm | 5 + gfx/pokemon/omastar/back.png | Bin 0 -> 518 bytes gfx/pokemon/omastar/front.png | Bin 0 -> 898 bytes gfx/pokemon/omastar/shiny.pal | 4 + gfx/pokemon/onix/anim.asm | 9 + gfx/pokemon/onix/anim_idle.asm | 6 + gfx/pokemon/onix/back.png | Bin 0 -> 469 bytes gfx/pokemon/onix/front.png | Bin 0 -> 1528 bytes gfx/pokemon/onix/shiny.pal | 4 + gfx/pokemon/paras/anim.asm | 5 + gfx/pokemon/paras/anim_idle.asm | 5 + gfx/pokemon/paras/back.png | Bin 0 -> 402 bytes gfx/pokemon/paras/front.png | Bin 0 -> 777 bytes gfx/pokemon/paras/shiny.pal | 4 + gfx/pokemon/parasect/anim.asm | 12 + gfx/pokemon/parasect/anim_idle.asm | 4 + gfx/pokemon/parasect/back.png | Bin 0 -> 378 bytes gfx/pokemon/parasect/front.png | Bin 0 -> 1168 bytes gfx/pokemon/parasect/shiny.pal | 4 + gfx/pokemon/persian/anim.asm | 9 + gfx/pokemon/persian/anim_idle.asm | 5 + gfx/pokemon/persian/back.png | Bin 0 -> 468 bytes gfx/pokemon/persian/front.png | Bin 0 -> 1240 bytes gfx/pokemon/persian/shiny.pal | 4 + gfx/pokemon/phanpy/anim.asm | 7 + gfx/pokemon/phanpy/anim_idle.asm | 5 + gfx/pokemon/phanpy/back.png | Bin 0 -> 347 bytes gfx/pokemon/phanpy/front.png | Bin 0 -> 606 bytes gfx/pokemon/phanpy/shiny.pal | 4 + gfx/pokemon/pichu/anim.asm | 5 + gfx/pokemon/pichu/anim_idle.asm | 5 + gfx/pokemon/pichu/back.png | Bin 0 -> 376 bytes gfx/pokemon/pichu/front.png | Bin 0 -> 587 bytes gfx/pokemon/pichu/shiny.pal | 4 + gfx/pokemon/pidgeot/anim.asm | 7 + gfx/pokemon/pidgeot/anim_idle.asm | 8 + gfx/pokemon/pidgeot/back.png | Bin 0 -> 383 bytes gfx/pokemon/pidgeot/front.png | Bin 0 -> 1078 bytes gfx/pokemon/pidgeot/shiny.pal | 4 + gfx/pokemon/pidgeotto/anim.asm | 10 + gfx/pokemon/pidgeotto/anim_idle.asm | 5 + gfx/pokemon/pidgeotto/back.png | Bin 0 -> 382 bytes gfx/pokemon/pidgeotto/front.png | Bin 0 -> 877 bytes gfx/pokemon/pidgeotto/shiny.pal | 4 + gfx/pokemon/pidgey/anim.asm | 10 + gfx/pokemon/pidgey/anim_idle.asm | 7 + gfx/pokemon/pidgey/back.png | Bin 0 -> 517 bytes gfx/pokemon/pidgey/front.png | Bin 0 -> 777 bytes gfx/pokemon/pidgey/shiny.pal | 4 + gfx/pokemon/pikachu/anim.asm | 11 + gfx/pokemon/pikachu/anim_idle.asm | 9 + gfx/pokemon/pikachu/back.png | Bin 0 -> 427 bytes gfx/pokemon/pikachu/front.png | Bin 0 -> 799 bytes gfx/pokemon/pikachu/shiny.pal | 4 + gfx/pokemon/piloswine/anim.asm | 4 + gfx/pokemon/piloswine/anim_idle.asm | 5 + gfx/pokemon/piloswine/back.png | Bin 0 -> 287 bytes gfx/pokemon/piloswine/front.png | Bin 0 -> 866 bytes gfx/pokemon/piloswine/shiny.pal | 4 + gfx/pokemon/pineco/anim.asm | 3 + gfx/pokemon/pineco/anim_idle.asm | 5 + gfx/pokemon/pineco/back.png | Bin 0 -> 387 bytes gfx/pokemon/pineco/front.png | Bin 0 -> 653 bytes gfx/pokemon/pineco/shiny.pal | 4 + gfx/pokemon/pinsir/anim.asm | 7 + gfx/pokemon/pinsir/anim_idle.asm | 5 + gfx/pokemon/pinsir/back.png | Bin 0 -> 514 bytes gfx/pokemon/pinsir/front.png | Bin 0 -> 1137 bytes gfx/pokemon/pinsir/shiny.pal | 4 + gfx/pokemon/politoed/anim.asm | 8 + gfx/pokemon/politoed/anim_idle.asm | 5 + gfx/pokemon/politoed/back.png | Bin 0 -> 375 bytes gfx/pokemon/politoed/front.png | Bin 0 -> 1058 bytes gfx/pokemon/politoed/shiny.pal | 4 + gfx/pokemon/poliwag/anim.asm | 7 + gfx/pokemon/poliwag/anim_idle.asm | 9 + gfx/pokemon/poliwag/back.png | Bin 0 -> 305 bytes gfx/pokemon/poliwag/front.png | Bin 0 -> 627 bytes gfx/pokemon/poliwag/shiny.pal | 4 + gfx/pokemon/poliwhirl/anim.asm | 8 + gfx/pokemon/poliwhirl/anim_idle.asm | 5 + gfx/pokemon/poliwhirl/back.png | Bin 0 -> 403 bytes gfx/pokemon/poliwhirl/front.png | Bin 0 -> 1072 bytes gfx/pokemon/poliwhirl/shiny.pal | 4 + gfx/pokemon/poliwrath/anim.asm | 7 + gfx/pokemon/poliwrath/anim_idle.asm | 5 + gfx/pokemon/poliwrath/back.png | Bin 0 -> 446 bytes gfx/pokemon/poliwrath/front.png | Bin 0 -> 1145 bytes gfx/pokemon/poliwrath/shiny.pal | 4 + gfx/pokemon/ponyta/anim.asm | 9 + gfx/pokemon/ponyta/anim_idle.asm | 4 + gfx/pokemon/ponyta/back.png | Bin 0 -> 471 bytes gfx/pokemon/ponyta/front.png | Bin 0 -> 989 bytes gfx/pokemon/ponyta/shiny.pal | 4 + gfx/pokemon/porygon/anim.asm | 8 + gfx/pokemon/porygon/anim_idle.asm | 5 + gfx/pokemon/porygon/back.png | Bin 0 -> 366 bytes gfx/pokemon/porygon/front.png | Bin 0 -> 628 bytes gfx/pokemon/porygon/shiny.pal | 4 + gfx/pokemon/porygon2/anim.asm | 6 + gfx/pokemon/porygon2/anim_idle.asm | 2 + gfx/pokemon/porygon2/back.png | Bin 0 -> 396 bytes gfx/pokemon/porygon2/front.png | Bin 0 -> 669 bytes gfx/pokemon/porygon2/shiny.pal | 4 + gfx/pokemon/primeape/anim.asm | 7 + gfx/pokemon/primeape/anim_idle.asm | 7 + gfx/pokemon/primeape/back.png | Bin 0 -> 449 bytes gfx/pokemon/primeape/front.png | Bin 0 -> 1197 bytes gfx/pokemon/primeape/shiny.pal | 4 + gfx/pokemon/psyduck/anim.asm | 7 + gfx/pokemon/psyduck/anim_idle.asm | 5 + gfx/pokemon/psyduck/back.png | Bin 0 -> 426 bytes gfx/pokemon/psyduck/front.png | Bin 0 -> 605 bytes gfx/pokemon/psyduck/shiny.pal | 4 + gfx/pokemon/pupitar/anim.asm | 7 + gfx/pokemon/pupitar/anim_idle.asm | 6 + gfx/pokemon/pupitar/back.png | Bin 0 -> 458 bytes gfx/pokemon/pupitar/front.png | Bin 0 -> 607 bytes gfx/pokemon/pupitar/shiny.pal | 4 + gfx/pokemon/quagsire/anim.asm | 5 + gfx/pokemon/quagsire/anim_idle.asm | 3 + gfx/pokemon/quagsire/back.png | Bin 0 -> 380 bytes gfx/pokemon/quagsire/front.png | Bin 0 -> 802 bytes gfx/pokemon/quagsire/shiny.pal | 4 + gfx/pokemon/quilava/anim.asm | 8 + gfx/pokemon/quilava/anim_idle.asm | 5 + gfx/pokemon/quilava/back.png | Bin 0 -> 476 bytes gfx/pokemon/quilava/front.png | Bin 0 -> 1069 bytes gfx/pokemon/quilava/shiny.pal | 4 + gfx/pokemon/qwilfish/anim.asm | 7 + gfx/pokemon/qwilfish/anim_idle.asm | 5 + gfx/pokemon/qwilfish/back.png | Bin 0 -> 468 bytes gfx/pokemon/qwilfish/front.png | Bin 0 -> 640 bytes gfx/pokemon/qwilfish/shiny.pal | 4 + gfx/pokemon/raichu/anim.asm | 7 + gfx/pokemon/raichu/anim_idle.asm | 5 + gfx/pokemon/raichu/back.png | Bin 0 -> 414 bytes gfx/pokemon/raichu/front.png | Bin 0 -> 1097 bytes gfx/pokemon/raichu/shiny.pal | 4 + gfx/pokemon/raikou/anim.asm | 7 + gfx/pokemon/raikou/anim_idle.asm | 7 + gfx/pokemon/raikou/back.png | Bin 0 -> 350 bytes gfx/pokemon/raikou/front.png | Bin 0 -> 1516 bytes gfx/pokemon/raikou/shiny.pal | 4 + gfx/pokemon/rapidash/anim.asm | 13 + gfx/pokemon/rapidash/anim_idle.asm | 5 + gfx/pokemon/rapidash/back.png | Bin 0 -> 466 bytes gfx/pokemon/rapidash/front.png | Bin 0 -> 1497 bytes gfx/pokemon/rapidash/shiny.pal | 4 + gfx/pokemon/raticate/anim.asm | 6 + gfx/pokemon/raticate/anim_idle.asm | 9 + gfx/pokemon/raticate/back.png | Bin 0 -> 467 bytes gfx/pokemon/raticate/front.png | Bin 0 -> 1052 bytes gfx/pokemon/raticate/shiny.pal | 4 + gfx/pokemon/rattata/anim.asm | 9 + gfx/pokemon/rattata/anim_idle.asm | 5 + gfx/pokemon/rattata/back.png | Bin 0 -> 436 bytes gfx/pokemon/rattata/front.png | Bin 0 -> 702 bytes gfx/pokemon/rattata/shiny.pal | 4 + gfx/pokemon/remoraid/anim.asm | 4 + gfx/pokemon/remoraid/anim_idle.asm | 5 + gfx/pokemon/remoraid/back.png | Bin 0 -> 431 bytes gfx/pokemon/remoraid/front.png | Bin 0 -> 653 bytes gfx/pokemon/remoraid/shiny.pal | 4 + gfx/pokemon/rhydon/anim.asm | 9 + gfx/pokemon/rhydon/anim_idle.asm | 5 + gfx/pokemon/rhydon/back.png | Bin 0 -> 531 bytes gfx/pokemon/rhydon/front.png | Bin 0 -> 1337 bytes gfx/pokemon/rhydon/shiny.pal | 4 + gfx/pokemon/rhyhorn/anim.asm | 4 + gfx/pokemon/rhyhorn/anim_idle.asm | 5 + gfx/pokemon/rhyhorn/back.png | Bin 0 -> 425 bytes gfx/pokemon/rhyhorn/front.png | Bin 0 -> 1191 bytes gfx/pokemon/rhyhorn/shiny.pal | 4 + gfx/pokemon/sandshrew/anim.asm | 12 + gfx/pokemon/sandshrew/anim_idle.asm | 6 + gfx/pokemon/sandshrew/back.png | Bin 0 -> 518 bytes gfx/pokemon/sandshrew/front.png | Bin 0 -> 810 bytes gfx/pokemon/sandshrew/shiny.pal | 4 + gfx/pokemon/sandslash/anim.asm | 9 + gfx/pokemon/sandslash/anim_idle.asm | 5 + gfx/pokemon/sandslash/back.png | Bin 0 -> 504 bytes gfx/pokemon/sandslash/front.png | Bin 0 -> 1152 bytes gfx/pokemon/sandslash/shiny.pal | 4 + gfx/pokemon/scizor/anim.asm | 9 + gfx/pokemon/scizor/anim_idle.asm | 5 + gfx/pokemon/scizor/back.png | Bin 0 -> 450 bytes gfx/pokemon/scizor/front.png | Bin 0 -> 1710 bytes gfx/pokemon/scizor/shiny.pal | 4 + gfx/pokemon/scyther/anim.asm | 8 + gfx/pokemon/scyther/anim_idle.asm | 5 + gfx/pokemon/scyther/back.png | Bin 0 -> 453 bytes gfx/pokemon/scyther/front.png | Bin 0 -> 1352 bytes gfx/pokemon/scyther/shiny.pal | 4 + gfx/pokemon/seadra/anim.asm | 6 + gfx/pokemon/seadra/anim_idle.asm | 6 + gfx/pokemon/seadra/back.png | Bin 0 -> 508 bytes gfx/pokemon/seadra/front.png | Bin 0 -> 791 bytes gfx/pokemon/seadra/shiny.pal | 4 + gfx/pokemon/seaking/anim.asm | 6 + gfx/pokemon/seaking/anim_idle.asm | 6 + gfx/pokemon/seaking/back.png | Bin 0 -> 476 bytes gfx/pokemon/seaking/front.png | Bin 0 -> 1174 bytes gfx/pokemon/seaking/shiny.pal | 4 + gfx/pokemon/seel/anim.asm | 7 + gfx/pokemon/seel/anim_idle.asm | 6 + gfx/pokemon/seel/back.png | Bin 0 -> 375 bytes gfx/pokemon/seel/front.png | Bin 0 -> 808 bytes gfx/pokemon/seel/shiny.pal | 4 + gfx/pokemon/sentret/anim.asm | 5 + gfx/pokemon/sentret/anim_idle.asm | 5 + gfx/pokemon/sentret/back.png | Bin 0 -> 360 bytes gfx/pokemon/sentret/front.png | Bin 0 -> 546 bytes gfx/pokemon/sentret/shiny.pal | 4 + gfx/pokemon/shellder/anim.asm | 5 + gfx/pokemon/shellder/anim_idle.asm | 5 + gfx/pokemon/shellder/back.png | Bin 0 -> 481 bytes gfx/pokemon/shellder/front.png | Bin 0 -> 605 bytes gfx/pokemon/shellder/shiny.pal | 4 + gfx/pokemon/shuckle/anim.asm | 9 + gfx/pokemon/shuckle/anim_idle.asm | 5 + gfx/pokemon/shuckle/back.png | Bin 0 -> 342 bytes gfx/pokemon/shuckle/front.png | Bin 0 -> 633 bytes gfx/pokemon/shuckle/shiny.pal | 4 + gfx/pokemon/skarmory/anim.asm | 6 + gfx/pokemon/skarmory/anim_idle.asm | 5 + gfx/pokemon/skarmory/back.png | Bin 0 -> 367 bytes gfx/pokemon/skarmory/front.png | Bin 0 -> 1108 bytes gfx/pokemon/skarmory/shiny.pal | 4 + gfx/pokemon/skiploom/anim.asm | 5 + gfx/pokemon/skiploom/anim_idle.asm | 5 + gfx/pokemon/skiploom/back.png | Bin 0 -> 405 bytes gfx/pokemon/skiploom/front.png | Bin 0 -> 638 bytes gfx/pokemon/skiploom/shiny.pal | 4 + gfx/pokemon/slowbro/anim.asm | 12 + gfx/pokemon/slowbro/anim_idle.asm | 5 + gfx/pokemon/slowbro/back.png | Bin 0 -> 412 bytes gfx/pokemon/slowbro/front.png | Bin 0 -> 1204 bytes gfx/pokemon/slowbro/shiny.pal | 4 + gfx/pokemon/slowking/anim.asm | 10 + gfx/pokemon/slowking/anim_idle.asm | 3 + gfx/pokemon/slowking/back.png | Bin 0 -> 507 bytes gfx/pokemon/slowking/front.png | Bin 0 -> 1098 bytes gfx/pokemon/slowking/shiny.pal | 4 + gfx/pokemon/slowpoke/anim.asm | 4 + gfx/pokemon/slowpoke/anim_idle.asm | 2 + gfx/pokemon/slowpoke/back.png | Bin 0 -> 331 bytes gfx/pokemon/slowpoke/front.png | Bin 0 -> 613 bytes gfx/pokemon/slowpoke/shiny.pal | 4 + gfx/pokemon/slugma/anim.asm | 9 + gfx/pokemon/slugma/anim_idle.asm | 5 + gfx/pokemon/slugma/back.png | Bin 0 -> 406 bytes gfx/pokemon/slugma/front.png | Bin 0 -> 749 bytes gfx/pokemon/slugma/shiny.pal | 4 + gfx/pokemon/smeargle/anim.asm | 6 + gfx/pokemon/smeargle/anim_idle.asm | 5 + gfx/pokemon/smeargle/back.png | Bin 0 -> 439 bytes gfx/pokemon/smeargle/front.png | Bin 0 -> 971 bytes gfx/pokemon/smeargle/shiny.pal | 4 + gfx/pokemon/smoochum/anim.asm | 4 + gfx/pokemon/smoochum/anim_idle.asm | 5 + gfx/pokemon/smoochum/back.png | Bin 0 -> 378 bytes gfx/pokemon/smoochum/front.png | Bin 0 -> 593 bytes gfx/pokemon/smoochum/shiny.pal | 4 + gfx/pokemon/sneasel/anim.asm | 3 + gfx/pokemon/sneasel/anim_idle.asm | 4 + gfx/pokemon/sneasel/back.png | Bin 0 -> 415 bytes gfx/pokemon/sneasel/front.png | Bin 0 -> 1004 bytes gfx/pokemon/sneasel/shiny.pal | 4 + gfx/pokemon/snorlax/anim.asm | 9 + gfx/pokemon/snorlax/anim_idle.asm | 5 + gfx/pokemon/snorlax/back.png | Bin 0 -> 274 bytes gfx/pokemon/snorlax/front.png | Bin 0 -> 971 bytes gfx/pokemon/snorlax/shiny.pal | 4 + gfx/pokemon/snubbull/anim.asm | 10 + gfx/pokemon/snubbull/anim_idle.asm | 5 + gfx/pokemon/snubbull/back.png | Bin 0 -> 431 bytes gfx/pokemon/snubbull/front.png | Bin 0 -> 882 bytes gfx/pokemon/snubbull/shiny.pal | 4 + gfx/pokemon/spearow/anim.asm | 10 + gfx/pokemon/spearow/anim_idle.asm | 6 + gfx/pokemon/spearow/back.png | Bin 0 -> 416 bytes gfx/pokemon/spearow/front.png | Bin 0 -> 840 bytes gfx/pokemon/spearow/shiny.pal | 4 + gfx/pokemon/spinarak/anim.asm | 7 + gfx/pokemon/spinarak/anim_idle.asm | 5 + gfx/pokemon/spinarak/back.png | Bin 0 -> 341 bytes gfx/pokemon/spinarak/front.png | Bin 0 -> 474 bytes gfx/pokemon/spinarak/shiny.pal | 4 + gfx/pokemon/squirtle/anim.asm | 9 + gfx/pokemon/squirtle/anim_idle.asm | 5 + gfx/pokemon/squirtle/back.png | Bin 0 -> 344 bytes gfx/pokemon/squirtle/front.png | Bin 0 -> 633 bytes gfx/pokemon/squirtle/shiny.pal | 4 + gfx/pokemon/stantler/anim.asm | 8 + gfx/pokemon/stantler/anim_idle.asm | 5 + gfx/pokemon/stantler/back.png | Bin 0 -> 483 bytes gfx/pokemon/stantler/front.png | Bin 0 -> 1066 bytes gfx/pokemon/stantler/shiny.pal | 4 + gfx/pokemon/starmie/anim.asm | 7 + gfx/pokemon/starmie/anim_idle.asm | 4 + gfx/pokemon/starmie/back.png | Bin 0 -> 351 bytes gfx/pokemon/starmie/front.png | Bin 0 -> 911 bytes gfx/pokemon/starmie/shiny.pal | 4 + gfx/pokemon/staryu/anim.asm | 7 + gfx/pokemon/staryu/anim_idle.asm | 6 + gfx/pokemon/staryu/back.png | Bin 0 -> 379 bytes gfx/pokemon/staryu/front.png | Bin 0 -> 783 bytes gfx/pokemon/staryu/shiny.pal | 4 + gfx/pokemon/steelix/anim.asm | 6 + gfx/pokemon/steelix/anim_idle.asm | 5 + gfx/pokemon/steelix/back.png | Bin 0 -> 518 bytes gfx/pokemon/steelix/front.png | Bin 0 -> 1397 bytes gfx/pokemon/steelix/shiny.pal | 4 + gfx/pokemon/sudowoodo/anim.asm | 7 + gfx/pokemon/sudowoodo/anim_idle.asm | 5 + gfx/pokemon/sudowoodo/back.png | Bin 0 -> 454 bytes gfx/pokemon/sudowoodo/front.png | Bin 0 -> 715 bytes gfx/pokemon/sudowoodo/shiny.pal | 4 + gfx/pokemon/suicune/anim.asm | 12 + gfx/pokemon/suicune/anim_idle.asm | 6 + gfx/pokemon/suicune/back.png | Bin 0 -> 518 bytes gfx/pokemon/suicune/front.png | Bin 0 -> 1669 bytes gfx/pokemon/suicune/shiny.pal | 4 + gfx/pokemon/sunflora/anim.asm | 4 + gfx/pokemon/sunflora/anim_idle.asm | 5 + gfx/pokemon/sunflora/back.png | Bin 0 -> 505 bytes gfx/pokemon/sunflora/front.png | Bin 0 -> 907 bytes gfx/pokemon/sunflora/shiny.pal | 4 + gfx/pokemon/sunkern/anim.asm | 6 + gfx/pokemon/sunkern/anim_idle.asm | 5 + gfx/pokemon/sunkern/back.png | Bin 0 -> 393 bytes gfx/pokemon/sunkern/front.png | Bin 0 -> 539 bytes gfx/pokemon/sunkern/shiny.pal | 4 + gfx/pokemon/swinub/anim.asm | 6 + gfx/pokemon/swinub/anim_idle.asm | 5 + gfx/pokemon/swinub/back.png | Bin 0 -> 287 bytes gfx/pokemon/swinub/front.png | Bin 0 -> 397 bytes gfx/pokemon/swinub/shiny.pal | 4 + gfx/pokemon/tangela/anim.asm | 4 + gfx/pokemon/tangela/anim_idle.asm | 5 + gfx/pokemon/tangela/back.png | Bin 0 -> 321 bytes gfx/pokemon/tangela/front.png | Bin 0 -> 806 bytes gfx/pokemon/tangela/shiny.pal | 4 + gfx/pokemon/tauros/anim.asm | 10 + gfx/pokemon/tauros/anim_idle.asm | 5 + gfx/pokemon/tauros/back.png | Bin 0 -> 305 bytes gfx/pokemon/tauros/front.png | Bin 0 -> 1527 bytes gfx/pokemon/tauros/shiny.pal | 4 + gfx/pokemon/teddiursa/anim.asm | 8 + gfx/pokemon/teddiursa/anim_idle.asm | 5 + gfx/pokemon/teddiursa/back.png | Bin 0 -> 344 bytes gfx/pokemon/teddiursa/front.png | Bin 0 -> 594 bytes gfx/pokemon/teddiursa/shiny.pal | 4 + gfx/pokemon/tentacool/anim.asm | 5 + gfx/pokemon/tentacool/anim_idle.asm | 5 + gfx/pokemon/tentacool/back.png | Bin 0 -> 397 bytes gfx/pokemon/tentacool/front.png | Bin 0 -> 652 bytes gfx/pokemon/tentacool/shiny.pal | 4 + gfx/pokemon/tentacruel/anim.asm | 6 + gfx/pokemon/tentacruel/anim_idle.asm | 6 + gfx/pokemon/tentacruel/back.png | Bin 0 -> 437 bytes gfx/pokemon/tentacruel/front.png | Bin 0 -> 876 bytes gfx/pokemon/tentacruel/shiny.pal | 4 + gfx/pokemon/togepi/anim.asm | 7 + gfx/pokemon/togepi/anim_idle.asm | 5 + gfx/pokemon/togepi/back.png | Bin 0 -> 376 bytes gfx/pokemon/togepi/front.png | Bin 0 -> 469 bytes gfx/pokemon/togepi/shiny.pal | 4 + gfx/pokemon/togetic/anim.asm | 7 + gfx/pokemon/togetic/anim_idle.asm | 5 + gfx/pokemon/togetic/back.png | Bin 0 -> 464 bytes gfx/pokemon/togetic/front.png | Bin 0 -> 962 bytes gfx/pokemon/togetic/shiny.pal | 4 + gfx/pokemon/totodile/anim.asm | 9 + gfx/pokemon/totodile/anim_idle.asm | 6 + gfx/pokemon/totodile/back.png | Bin 0 -> 405 bytes gfx/pokemon/totodile/front.png | Bin 0 -> 765 bytes gfx/pokemon/totodile/shiny.pal | 4 + gfx/pokemon/typhlosion/anim.asm | 10 + gfx/pokemon/typhlosion/anim_idle.asm | 5 + gfx/pokemon/typhlosion/back.png | Bin 0 -> 462 bytes gfx/pokemon/typhlosion/front.png | Bin 0 -> 1240 bytes gfx/pokemon/typhlosion/shiny.pal | 4 + gfx/pokemon/tyranitar/anim.asm | 8 + gfx/pokemon/tyranitar/anim_idle.asm | 5 + gfx/pokemon/tyranitar/back.png | Bin 0 -> 497 bytes gfx/pokemon/tyranitar/front.png | Bin 0 -> 1479 bytes gfx/pokemon/tyranitar/shiny.pal | 4 + gfx/pokemon/tyrogue/anim.asm | 6 + gfx/pokemon/tyrogue/anim_idle.asm | 5 + gfx/pokemon/tyrogue/back.png | Bin 0 -> 465 bytes gfx/pokemon/tyrogue/front.png | Bin 0 -> 755 bytes gfx/pokemon/tyrogue/shiny.pal | 4 + gfx/pokemon/umbreon/anim.asm | 8 + gfx/pokemon/umbreon/anim_idle.asm | 5 + gfx/pokemon/umbreon/back.png | Bin 0 -> 433 bytes gfx/pokemon/umbreon/front.png | Bin 0 -> 977 bytes gfx/pokemon/umbreon/shiny.pal | 4 + gfx/pokemon/unown/anim.asm | 11 + gfx/pokemon/unown/anim_idle.asm | 5 + gfx/pokemon/unown/bitmask.asm | 30 + gfx/pokemon/unown/frames.asm | 44 + gfx/pokemon/unown/normal.pal | 4 + gfx/pokemon/unown/shiny.pal | 4 + gfx/pokemon/unown_a/anim.asm | 12 + gfx/pokemon/unown_a/anim_idle.asm | 5 + gfx/pokemon/unown_a/back.png | Bin 0 -> 241 bytes gfx/pokemon/unown_a/front.png | Bin 0 -> 377 bytes gfx/pokemon/unown_anim_pointers.asm | 29 + gfx/pokemon/unown_anims.asm | 26 + gfx/pokemon/unown_b/anim.asm | 8 + gfx/pokemon/unown_b/anim_idle.asm | 5 + gfx/pokemon/unown_b/back.png | Bin 0 -> 227 bytes gfx/pokemon/unown_b/front.png | Bin 0 -> 436 bytes gfx/pokemon/unown_bitmask_pointers.asm | 29 + gfx/pokemon/unown_bitmasks.asm | 26 + gfx/pokemon/unown_c/anim.asm | 8 + gfx/pokemon/unown_c/anim_idle.asm | 5 + gfx/pokemon/unown_c/back.png | Bin 0 -> 279 bytes gfx/pokemon/unown_c/front.png | Bin 0 -> 440 bytes gfx/pokemon/unown_d/anim.asm | 7 + gfx/pokemon/unown_d/anim_idle.asm | 5 + gfx/pokemon/unown_d/back.png | Bin 0 -> 236 bytes gfx/pokemon/unown_d/front.png | Bin 0 -> 467 bytes gfx/pokemon/unown_e/anim.asm | 8 + gfx/pokemon/unown_e/anim_idle.asm | 5 + gfx/pokemon/unown_e/back.png | Bin 0 -> 222 bytes gfx/pokemon/unown_e/front.png | Bin 0 -> 373 bytes gfx/pokemon/unown_f/anim.asm | 9 + gfx/pokemon/unown_f/anim_idle.asm | 5 + gfx/pokemon/unown_f/back.png | Bin 0 -> 243 bytes gfx/pokemon/unown_f/front.png | Bin 0 -> 403 bytes gfx/pokemon/unown_frame_pointers.asm | 29 + gfx/pokemon/unown_frames.asm | 28 + gfx/pokemon/unown_g/anim.asm | 6 + gfx/pokemon/unown_g/anim_idle.asm | 5 + gfx/pokemon/unown_g/back.png | Bin 0 -> 241 bytes gfx/pokemon/unown_g/front.png | Bin 0 -> 365 bytes gfx/pokemon/unown_h/anim.asm | 10 + gfx/pokemon/unown_h/anim_idle.asm | 5 + gfx/pokemon/unown_h/back.png | Bin 0 -> 271 bytes gfx/pokemon/unown_h/front.png | Bin 0 -> 437 bytes gfx/pokemon/unown_i/anim.asm | 7 + gfx/pokemon/unown_i/anim_idle.asm | 5 + gfx/pokemon/unown_i/back.png | Bin 0 -> 193 bytes gfx/pokemon/unown_i/front.png | Bin 0 -> 297 bytes gfx/pokemon/unown_idle_pointers.asm | 29 + gfx/pokemon/unown_idles.asm | 26 + gfx/pokemon/unown_j/anim.asm | 7 + gfx/pokemon/unown_j/anim_idle.asm | 5 + gfx/pokemon/unown_j/back.png | Bin 0 -> 220 bytes gfx/pokemon/unown_j/front.png | Bin 0 -> 344 bytes gfx/pokemon/unown_k/anim.asm | 7 + gfx/pokemon/unown_k/anim_idle.asm | 5 + gfx/pokemon/unown_k/back.png | Bin 0 -> 216 bytes gfx/pokemon/unown_k/front.png | Bin 0 -> 410 bytes gfx/pokemon/unown_l/anim.asm | 11 + gfx/pokemon/unown_l/anim_idle.asm | 5 + gfx/pokemon/unown_l/back.png | Bin 0 -> 214 bytes gfx/pokemon/unown_l/front.png | Bin 0 -> 362 bytes gfx/pokemon/unown_m/anim.asm | 11 + gfx/pokemon/unown_m/anim_idle.asm | 5 + gfx/pokemon/unown_m/back.png | Bin 0 -> 287 bytes gfx/pokemon/unown_m/front.png | Bin 0 -> 491 bytes gfx/pokemon/unown_n/anim.asm | 9 + gfx/pokemon/unown_n/anim_idle.asm | 5 + gfx/pokemon/unown_n/back.png | Bin 0 -> 236 bytes gfx/pokemon/unown_n/front.png | Bin 0 -> 472 bytes gfx/pokemon/unown_o/anim.asm | 7 + gfx/pokemon/unown_o/anim_idle.asm | 5 + gfx/pokemon/unown_o/back.png | Bin 0 -> 266 bytes gfx/pokemon/unown_o/front.png | Bin 0 -> 481 bytes gfx/pokemon/unown_p/anim.asm | 4 + gfx/pokemon/unown_p/anim_idle.asm | 5 + gfx/pokemon/unown_p/back.png | Bin 0 -> 208 bytes gfx/pokemon/unown_p/front.png | Bin 0 -> 335 bytes gfx/pokemon/unown_q/anim.asm | 7 + gfx/pokemon/unown_q/anim_idle.asm | 5 + gfx/pokemon/unown_q/back.png | Bin 0 -> 199 bytes gfx/pokemon/unown_q/front.png | Bin 0 -> 316 bytes gfx/pokemon/unown_r/anim.asm | 7 + gfx/pokemon/unown_r/anim_idle.asm | 5 + gfx/pokemon/unown_r/back.png | Bin 0 -> 203 bytes gfx/pokemon/unown_r/front.png | Bin 0 -> 304 bytes gfx/pokemon/unown_s/anim.asm | 9 + gfx/pokemon/unown_s/anim_idle.asm | 5 + gfx/pokemon/unown_s/back.png | Bin 0 -> 249 bytes gfx/pokemon/unown_s/front.png | Bin 0 -> 366 bytes gfx/pokemon/unown_t/anim.asm | 7 + gfx/pokemon/unown_t/anim_idle.asm | 5 + gfx/pokemon/unown_t/back.png | Bin 0 -> 204 bytes gfx/pokemon/unown_t/front.png | Bin 0 -> 370 bytes gfx/pokemon/unown_u/anim.asm | 5 + gfx/pokemon/unown_u/anim_idle.asm | 5 + gfx/pokemon/unown_u/back.png | Bin 0 -> 257 bytes gfx/pokemon/unown_u/front.png | Bin 0 -> 442 bytes gfx/pokemon/unown_v/anim.asm | 5 + gfx/pokemon/unown_v/anim_idle.asm | 5 + gfx/pokemon/unown_v/back.png | Bin 0 -> 244 bytes gfx/pokemon/unown_v/front.png | Bin 0 -> 376 bytes gfx/pokemon/unown_w/anim.asm | 5 + gfx/pokemon/unown_w/anim_idle.asm | 5 + gfx/pokemon/unown_w/back.png | Bin 0 -> 239 bytes gfx/pokemon/unown_w/front.png | Bin 0 -> 438 bytes gfx/pokemon/unown_x/anim.asm | 7 + gfx/pokemon/unown_x/anim_idle.asm | 5 + gfx/pokemon/unown_x/back.png | Bin 0 -> 226 bytes gfx/pokemon/unown_x/front.png | Bin 0 -> 363 bytes gfx/pokemon/unown_y/anim.asm | 8 + gfx/pokemon/unown_y/anim_idle.asm | 5 + gfx/pokemon/unown_y/back.png | Bin 0 -> 232 bytes gfx/pokemon/unown_y/front.png | Bin 0 -> 410 bytes gfx/pokemon/unown_z/anim.asm | 8 + gfx/pokemon/unown_z/anim_idle.asm | 5 + gfx/pokemon/unown_z/back.png | Bin 0 -> 209 bytes gfx/pokemon/unown_z/front.png | Bin 0 -> 375 bytes gfx/pokemon/ursaring/anim.asm | 8 + gfx/pokemon/ursaring/anim_idle.asm | 5 + gfx/pokemon/ursaring/back.png | Bin 0 -> 362 bytes gfx/pokemon/ursaring/front.png | Bin 0 -> 1127 bytes gfx/pokemon/ursaring/shiny.pal | 4 + gfx/pokemon/vaporeon/anim.asm | 6 + gfx/pokemon/vaporeon/anim_idle.asm | 5 + gfx/pokemon/vaporeon/back.png | Bin 0 -> 405 bytes gfx/pokemon/vaporeon/front.png | Bin 0 -> 947 bytes gfx/pokemon/vaporeon/shiny.pal | 4 + gfx/pokemon/venomoth/anim.asm | 5 + gfx/pokemon/venomoth/anim_idle.asm | 5 + gfx/pokemon/venomoth/back.png | Bin 0 -> 537 bytes gfx/pokemon/venomoth/front.png | Bin 0 -> 1084 bytes gfx/pokemon/venomoth/shiny.pal | 4 + gfx/pokemon/venonat/anim.asm | 15 + gfx/pokemon/venonat/anim_idle.asm | 5 + gfx/pokemon/venonat/back.png | Bin 0 -> 428 bytes gfx/pokemon/venonat/front.png | Bin 0 -> 636 bytes gfx/pokemon/venonat/shiny.pal | 4 + gfx/pokemon/venusaur/anim.asm | 9 + gfx/pokemon/venusaur/anim_idle.asm | 5 + gfx/pokemon/venusaur/back.png | Bin 0 -> 494 bytes gfx/pokemon/venusaur/front.png | Bin 0 -> 1441 bytes gfx/pokemon/venusaur/shiny.pal | 4 + gfx/pokemon/victreebel/anim.asm | 6 + gfx/pokemon/victreebel/anim_idle.asm | 6 + gfx/pokemon/victreebel/back.png | Bin 0 -> 397 bytes gfx/pokemon/victreebel/front.png | Bin 0 -> 1203 bytes gfx/pokemon/victreebel/shiny.pal | 4 + gfx/pokemon/vileplume/anim.asm | 9 + gfx/pokemon/vileplume/anim_idle.asm | 7 + gfx/pokemon/vileplume/back.png | Bin 0 -> 424 bytes gfx/pokemon/vileplume/front.png | Bin 0 -> 851 bytes gfx/pokemon/vileplume/shiny.pal | 4 + gfx/pokemon/voltorb/anim.asm | 7 + gfx/pokemon/voltorb/anim_idle.asm | 6 + gfx/pokemon/voltorb/back.png | Bin 0 -> 318 bytes gfx/pokemon/voltorb/front.png | Bin 0 -> 399 bytes gfx/pokemon/voltorb/shiny.pal | 4 + gfx/pokemon/vulpix/anim.asm | 10 + gfx/pokemon/vulpix/anim_idle.asm | 6 + gfx/pokemon/vulpix/back.png | Bin 0 -> 444 bytes gfx/pokemon/vulpix/front.png | Bin 0 -> 904 bytes gfx/pokemon/vulpix/shiny.pal | 4 + gfx/pokemon/wartortle/anim.asm | 7 + gfx/pokemon/wartortle/anim_idle.asm | 5 + gfx/pokemon/wartortle/back.png | Bin 0 -> 439 bytes gfx/pokemon/wartortle/front.png | Bin 0 -> 942 bytes gfx/pokemon/wartortle/shiny.pal | 4 + gfx/pokemon/weedle/anim.asm | 9 + gfx/pokemon/weedle/anim_idle.asm | 11 + gfx/pokemon/weedle/back.png | Bin 0 -> 363 bytes gfx/pokemon/weedle/front.png | Bin 0 -> 538 bytes gfx/pokemon/weedle/shiny.pal | 4 + gfx/pokemon/weepinbell/anim.asm | 7 + gfx/pokemon/weepinbell/anim_idle.asm | 5 + gfx/pokemon/weepinbell/back.png | Bin 0 -> 410 bytes gfx/pokemon/weepinbell/front.png | Bin 0 -> 764 bytes gfx/pokemon/weepinbell/shiny.pal | 4 + gfx/pokemon/weezing/anim.asm | 7 + gfx/pokemon/weezing/anim_idle.asm | 7 + gfx/pokemon/weezing/back.png | Bin 0 -> 417 bytes gfx/pokemon/weezing/front.png | Bin 0 -> 1384 bytes gfx/pokemon/weezing/shiny.pal | 4 + gfx/pokemon/wigglytuff/anim.asm | 8 + gfx/pokemon/wigglytuff/anim_idle.asm | 5 + gfx/pokemon/wigglytuff/back.png | Bin 0 -> 333 bytes gfx/pokemon/wigglytuff/front.png | Bin 0 -> 852 bytes gfx/pokemon/wigglytuff/shiny.pal | 4 + gfx/pokemon/wobbuffet/anim.asm | 3 + gfx/pokemon/wobbuffet/anim_idle.asm | 2 + gfx/pokemon/wobbuffet/back.png | Bin 0 -> 343 bytes gfx/pokemon/wobbuffet/front.png | Bin 0 -> 698 bytes gfx/pokemon/wobbuffet/shiny.pal | 4 + gfx/pokemon/wooper/anim.asm | 7 + gfx/pokemon/wooper/anim_idle.asm | 5 + gfx/pokemon/wooper/back.png | Bin 0 -> 338 bytes gfx/pokemon/wooper/front.png | Bin 0 -> 521 bytes gfx/pokemon/wooper/shiny.pal | 4 + gfx/pokemon/xatu/anim.asm | 9 + gfx/pokemon/xatu/anim_idle.asm | 10 + gfx/pokemon/xatu/back.png | Bin 0 -> 396 bytes gfx/pokemon/xatu/front.png | Bin 0 -> 852 bytes gfx/pokemon/xatu/shiny.pal | 4 + gfx/pokemon/yanma/anim.asm | 8 + gfx/pokemon/yanma/anim_idle.asm | 5 + gfx/pokemon/yanma/back.png | Bin 0 -> 514 bytes gfx/pokemon/yanma/front.png | Bin 0 -> 926 bytes gfx/pokemon/yanma/shiny.pal | 4 + gfx/pokemon/zapdos/anim.asm | 6 + gfx/pokemon/zapdos/anim_idle.asm | 4 + gfx/pokemon/zapdos/back.png | Bin 0 -> 427 bytes gfx/pokemon/zapdos/front.png | Bin 0 -> 1258 bytes gfx/pokemon/zapdos/shiny.pal | 4 + gfx/pokemon/zubat/anim.asm | 7 + gfx/pokemon/zubat/anim_idle.asm | 6 + gfx/pokemon/zubat/back.png | Bin 0 -> 466 bytes gfx/pokemon/zubat/front.png | Bin 0 -> 616 bytes gfx/pokemon/zubat/shiny.pal | 4 + gfx/printer/bold_a.png | Bin 0 -> 85 bytes gfx/printer/bold_b.png | Bin 0 -> 77 bytes gfx/printer/hp.png | Bin 0 -> 84 bytes gfx/printer/lv.png | Bin 0 -> 79 bytes gfx/sgb/blk_packets.asm | 89 + gfx/sgb/gbc_only.png | Bin 0 -> 896 bytes gfx/sgb/pal_packets.asm | 96 + gfx/sgb/predef.pal | 79 + gfx/sgb/sgb_border.bin | Bin 0 -> 1792 bytes gfx/sgb/sgb_border.pal | 79 + gfx/sgb/sgb_border.png | Bin 0 -> 608 bytes gfx/slots/slots.pal | 79 + gfx/slots/slots.tilemap | Bin 0 -> 240 bytes gfx/slots/slots_1.png | Bin 0 -> 433 bytes gfx/slots/slots_2.png | Bin 0 -> 664 bytes gfx/slots/slots_3.png | Bin 0 -> 554 bytes gfx/splash/copyright.png | Bin 0 -> 262 bytes gfx/splash/ditto.pal | 4 + gfx/splash/ditto.png | Bin 0 -> 944 bytes gfx/splash/ditto_fade.pal | 20 + gfx/splash/gamefreak_logo.png | Bin 0 -> 172 bytes gfx/splash/gamefreak_presents.png | Bin 0 -> 180 bytes gfx/sprites.asm | 108 + gfx/sprites/beauty.png | Bin 0 -> 263 bytes gfx/sprites/big_lapras.png | Bin 0 -> 193 bytes gfx/sprites/big_onix.png | Bin 0 -> 300 bytes gfx/sprites/big_snorlax.png | Bin 0 -> 183 bytes gfx/sprites/biker.png | Bin 0 -> 346 bytes gfx/sprites/bill.png | Bin 0 -> 307 bytes gfx/sprites/bird.png | Bin 0 -> 354 bytes gfx/sprites/black_belt.png | Bin 0 -> 279 bytes gfx/sprites/blaine.png | Bin 0 -> 304 bytes gfx/sprites/blue.png | Bin 0 -> 321 bytes gfx/sprites/boulder.png | Bin 0 -> 143 bytes gfx/sprites/brock.png | Bin 0 -> 276 bytes gfx/sprites/bruno.png | Bin 0 -> 286 bytes gfx/sprites/bug_catcher.png | Bin 0 -> 237 bytes gfx/sprites/bugsy.png | Bin 0 -> 277 bytes gfx/sprites/cal.png | Bin 0 -> 305 bytes gfx/sprites/captain.png | Bin 0 -> 227 bytes gfx/sprites/chris.png | Bin 0 -> 300 bytes gfx/sprites/chris_bike.png | Bin 0 -> 373 bytes gfx/sprites/chuck.png | Bin 0 -> 276 bytes gfx/sprites/clair.png | Bin 0 -> 350 bytes gfx/sprites/clerk.png | Bin 0 -> 292 bytes gfx/sprites/cooltrainer_f.png | Bin 0 -> 349 bytes gfx/sprites/cooltrainer_m.png | Bin 0 -> 286 bytes gfx/sprites/daisy.png | Bin 0 -> 277 bytes gfx/sprites/dragon.png | Bin 0 -> 327 bytes gfx/sprites/elder.png | Bin 0 -> 319 bytes gfx/sprites/elm.png | Bin 0 -> 314 bytes gfx/sprites/entei.png | Bin 0 -> 144 bytes gfx/sprites/erika.png | Bin 0 -> 233 bytes gfx/sprites/fairy.png | Bin 0 -> 317 bytes gfx/sprites/falkner.png | Bin 0 -> 303 bytes gfx/sprites/famicom.png | Bin 0 -> 110 bytes gfx/sprites/fisher.png | Bin 0 -> 308 bytes gfx/sprites/fishing_guru.png | Bin 0 -> 269 bytes gfx/sprites/fruit_tree.png | Bin 0 -> 148 bytes gfx/sprites/gameboy_kid.png | Bin 0 -> 209 bytes gfx/sprites/gentleman.png | Bin 0 -> 264 bytes gfx/sprites/gold_trophy.png | Bin 0 -> 121 bytes gfx/sprites/gramps.png | Bin 0 -> 338 bytes gfx/sprites/granny.png | Bin 0 -> 360 bytes gfx/sprites/gym_guide.png | Bin 0 -> 295 bytes gfx/sprites/janine.png | Bin 0 -> 259 bytes gfx/sprites/jasmine.png | Bin 0 -> 293 bytes gfx/sprites/karen.png | Bin 0 -> 207 bytes gfx/sprites/kimono_girl.png | Bin 0 -> 305 bytes gfx/sprites/koga.png | Bin 0 -> 253 bytes gfx/sprites/kris.png | Bin 0 -> 308 bytes gfx/sprites/kris_bike.png | Bin 0 -> 414 bytes gfx/sprites/kurt.png | Bin 0 -> 309 bytes gfx/sprites/kurt_outside.png | Bin 0 -> 224 bytes gfx/sprites/lance.png | Bin 0 -> 287 bytes gfx/sprites/lass.png | Bin 0 -> 305 bytes gfx/sprites/link_receptionist.png | Bin 0 -> 266 bytes gfx/sprites/misty.png | Bin 0 -> 274 bytes gfx/sprites/mom.png | Bin 0 -> 253 bytes gfx/sprites/monster.png | Bin 0 -> 350 bytes gfx/sprites/morty.png | Bin 0 -> 282 bytes gfx/sprites/n64.png | Bin 0 -> 142 bytes gfx/sprites/nurse.png | Bin 0 -> 210 bytes gfx/sprites/oak.png | Bin 0 -> 305 bytes gfx/sprites/officer.png | Bin 0 -> 285 bytes gfx/sprites/old_link_receptionist.png | Bin 0 -> 141 bytes gfx/sprites/paper.png | Bin 0 -> 111 bytes gfx/sprites/pharmacist.png | Bin 0 -> 292 bytes gfx/sprites/poke_ball.png | Bin 0 -> 119 bytes gfx/sprites/pokedex.png | Bin 0 -> 121 bytes gfx/sprites/pokefan_f.png | Bin 0 -> 264 bytes gfx/sprites/pokefan_m.png | Bin 0 -> 289 bytes gfx/sprites/pryce.png | Bin 0 -> 298 bytes gfx/sprites/raikou.png | Bin 0 -> 145 bytes gfx/sprites/receptionist.png | Bin 0 -> 237 bytes gfx/sprites/red.png | Bin 0 -> 294 bytes gfx/sprites/reds_mom.png | Bin 0 -> 281 bytes gfx/sprites/rival.png | Bin 0 -> 300 bytes gfx/sprites/rock.png | Bin 0 -> 146 bytes gfx/sprites/rocker.png | Bin 0 -> 296 bytes gfx/sprites/rocket.png | Bin 0 -> 247 bytes gfx/sprites/rocket_girl.png | Bin 0 -> 253 bytes gfx/sprites/sabrina.png | Bin 0 -> 260 bytes gfx/sprites/sage.png | Bin 0 -> 305 bytes gfx/sprites/sailor.png | Bin 0 -> 307 bytes gfx/sprites/scientist.png | Bin 0 -> 283 bytes gfx/sprites/silver_trophy.png | Bin 0 -> 120 bytes gfx/sprites/slowpoke.png | Bin 0 -> 139 bytes gfx/sprites/snes.png | Bin 0 -> 109 bytes gfx/sprites/standing_youngster.png | Bin 0 -> 214 bytes gfx/sprites/sudowoodo.png | Bin 0 -> 180 bytes gfx/sprites/suicune.png | Bin 0 -> 140 bytes gfx/sprites/super_nerd.png | Bin 0 -> 293 bytes gfx/sprites/surf.png | Bin 0 -> 355 bytes gfx/sprites/surfing_pikachu.png | Bin 0 -> 443 bytes gfx/sprites/surge.png | Bin 0 -> 277 bytes gfx/sprites/swimmer_girl.png | Bin 0 -> 328 bytes gfx/sprites/swimmer_guy.png | Bin 0 -> 303 bytes gfx/sprites/teacher.png | Bin 0 -> 283 bytes gfx/sprites/twin.png | Bin 0 -> 254 bytes gfx/sprites/unused_guy.png | Bin 0 -> 250 bytes gfx/sprites/virtual_boy.png | Bin 0 -> 127 bytes gfx/sprites/whitney.png | Bin 0 -> 298 bytes gfx/sprites/will.png | Bin 0 -> 216 bytes gfx/sprites/youngster.png | Bin 0 -> 281 bytes gfx/stats/item.png | Bin 0 -> 82 bytes gfx/stats/mail.png | Bin 0 -> 85 bytes gfx/stats/pages.pal | 15 + gfx/stats/party_menu_bg.pal | 4 + gfx/stats/party_menu_bg_mobile.pal | 4 + gfx/stats/party_menu_ob.pal | 39 + gfx/stats/stats.pal | 6 + gfx/stats/stats_tiles.png | Bin 0 -> 201 bytes gfx/tileset_palette_maps.asm | 115 + gfx/tilesets.asm | 337 + gfx/tilesets/aerodactyl_word_room.png | Bin 0 -> 1884 bytes .../aerodactyl_word_room_palette_map.asm | 29 + gfx/tilesets/battle_tower_inside.pal | 40 + gfx/tilesets/battle_tower_inside.png | Bin 0 -> 1004 bytes .../battle_tower_inside_palette_map.asm | 29 + gfx/tilesets/battle_tower_outside.png | Bin 0 -> 2324 bytes .../battle_tower_outside_palette_map.asm | 29 + gfx/tilesets/beta_word_room.png | Bin 0 -> 1884 bytes gfx/tilesets/beta_word_room_palette_map.asm | 29 + gfx/tilesets/bg_tiles.pal | 53 + gfx/tilesets/cave.png | Bin 0 -> 1031 bytes gfx/tilesets/cave_palette_map.asm | 29 + gfx/tilesets/champions_room.png | Bin 0 -> 2267 bytes gfx/tilesets/champions_room_palette_map.asm | 29 + gfx/tilesets/dark_cave.png | Bin 0 -> 840 bytes gfx/tilesets/dark_cave_palette_map.asm | 29 + gfx/tilesets/elite_four_room.png | Bin 0 -> 1272 bytes gfx/tilesets/elite_four_room_palette_map.asm | 29 + gfx/tilesets/facility.png | Bin 0 -> 1123 bytes gfx/tilesets/facility_palette_map.asm | 29 + gfx/tilesets/flower/cgb_1.png | Bin 0 -> 90 bytes gfx/tilesets/flower/cgb_2.png | Bin 0 -> 88 bytes gfx/tilesets/flower/dmg_1.png | Bin 0 -> 90 bytes gfx/tilesets/flower/dmg_2.png | Bin 0 -> 90 bytes gfx/tilesets/forest-tree/1.png | Bin 0 -> 90 bytes gfx/tilesets/forest-tree/2.png | Bin 0 -> 90 bytes gfx/tilesets/forest-tree/3.png | Bin 0 -> 90 bytes gfx/tilesets/forest-tree/4.png | Bin 0 -> 90 bytes gfx/tilesets/forest.png | Bin 0 -> 1214 bytes gfx/tilesets/forest_palette_map.asm | 29 + gfx/tilesets/fountain/1.png | Bin 0 -> 79 bytes gfx/tilesets/fountain/2.png | Bin 0 -> 81 bytes gfx/tilesets/fountain/3.png | Bin 0 -> 87 bytes gfx/tilesets/fountain/4.png | Bin 0 -> 89 bytes gfx/tilesets/fountain/5.png | Bin 0 -> 85 bytes gfx/tilesets/game_corner.png | Bin 0 -> 1562 bytes gfx/tilesets/game_corner_palette_map.asm | 29 + gfx/tilesets/gate.png | Bin 0 -> 1141 bytes gfx/tilesets/gate_palette_map.asm | 29 + gfx/tilesets/ho_oh_word_room.png | Bin 0 -> 1884 bytes gfx/tilesets/ho_oh_word_room_palette_map.asm | 29 + gfx/tilesets/house.pal | 40 + gfx/tilesets/house.png | Bin 0 -> 1254 bytes gfx/tilesets/house_palette_map.asm | 29 + gfx/tilesets/ice_path.pal | 40 + gfx/tilesets/ice_path.png | Bin 0 -> 2566 bytes gfx/tilesets/ice_path_palette_map.asm | 29 + gfx/tilesets/johto.png | Bin 0 -> 2044 bytes gfx/tilesets/johto_modern.png | Bin 0 -> 2324 bytes gfx/tilesets/johto_modern_palette_map.asm | 29 + gfx/tilesets/johto_palette_map.asm | 29 + gfx/tilesets/kabuto_word_room.png | Bin 0 -> 1884 bytes gfx/tilesets/kabuto_word_room_palette_map.asm | 29 + gfx/tilesets/kanto.png | Bin 0 -> 1301 bytes gfx/tilesets/kanto_palette_map.asm | 29 + gfx/tilesets/lab.png | Bin 0 -> 2022 bytes gfx/tilesets/lab_palette_map.asm | 29 + gfx/tilesets/lava/1.png | Bin 0 -> 89 bytes gfx/tilesets/lava/2.png | Bin 0 -> 89 bytes gfx/tilesets/lava/3.png | Bin 0 -> 87 bytes gfx/tilesets/lava/4.png | Bin 0 -> 79 bytes gfx/tilesets/lighthouse.png | Bin 0 -> 1226 bytes gfx/tilesets/lighthouse_palette_map.asm | 29 + gfx/tilesets/mansion.png | Bin 0 -> 2047 bytes gfx/tilesets/mansion_1.pal | 44 + gfx/tilesets/mansion_2.pal | 4 + gfx/tilesets/mansion_palette_map.asm | 29 + gfx/tilesets/mart.png | Bin 0 -> 1751 bytes gfx/tilesets/mart_palette_map.asm | 29 + gfx/tilesets/omanyte_word_room.png | Bin 0 -> 1884 bytes .../omanyte_word_room_palette_map.asm | 29 + gfx/tilesets/park.png | Bin 0 -> 1310 bytes gfx/tilesets/park_palette_map.asm | 29 + gfx/tilesets/players_house.png | Bin 0 -> 999 bytes gfx/tilesets/players_house_palette_map.asm | 29 + gfx/tilesets/players_room.png | Bin 0 -> 1221 bytes gfx/tilesets/players_room_palette_map.asm | 29 + gfx/tilesets/pokecenter.png | Bin 0 -> 1189 bytes gfx/tilesets/pokecenter_palette_map.asm | 29 + gfx/tilesets/pokecom_center.pal | 40 + gfx/tilesets/pokecom_center.png | Bin 0 -> 2485 bytes gfx/tilesets/pokecom_center_palette_map.asm | 29 + gfx/tilesets/port.png | Bin 0 -> 1048 bytes gfx/tilesets/port_palette_map.asm | 29 + gfx/tilesets/radio_tower.pal | 39 + gfx/tilesets/radio_tower.png | Bin 0 -> 1381 bytes gfx/tilesets/radio_tower_palette_map.asm | 29 + gfx/tilesets/roofs.pal | 107 + gfx/tilesets/roofs/azalea.png | Bin 0 -> 143 bytes gfx/tilesets/roofs/goldenrod.png | Bin 0 -> 112 bytes gfx/tilesets/roofs/new_bark.png | Bin 0 -> 102 bytes gfx/tilesets/roofs/olivine.png | Bin 0 -> 97 bytes gfx/tilesets/roofs/violet.png | Bin 0 -> 103 bytes gfx/tilesets/ruins_of_alph.png | Bin 0 -> 1884 bytes gfx/tilesets/ruins_of_alph_palette_map.asm | 29 + gfx/tilesets/tower-pillar/1.png | Bin 0 -> 137 bytes gfx/tilesets/tower-pillar/10.png | Bin 0 -> 118 bytes gfx/tilesets/tower-pillar/2.png | Bin 0 -> 133 bytes gfx/tilesets/tower-pillar/3.png | Bin 0 -> 127 bytes gfx/tilesets/tower-pillar/4.png | Bin 0 -> 130 bytes gfx/tilesets/tower-pillar/5.png | Bin 0 -> 117 bytes gfx/tilesets/tower-pillar/6.png | Bin 0 -> 116 bytes gfx/tilesets/tower-pillar/7.png | Bin 0 -> 115 bytes gfx/tilesets/tower-pillar/8.png | Bin 0 -> 115 bytes gfx/tilesets/tower-pillar/9.png | Bin 0 -> 127 bytes gfx/tilesets/tower.png | Bin 0 -> 1489 bytes gfx/tilesets/tower_palette_map.asm | 29 + gfx/tilesets/traditional_house.png | Bin 0 -> 1181 bytes .../traditional_house_palette_map.asm | 29 + gfx/tilesets/train_station.png | Bin 0 -> 1162 bytes gfx/tilesets/train_station_palette_map.asm | 29 + gfx/tilesets/underground.png | Bin 0 -> 1111 bytes gfx/tilesets/underground_palette_map.asm | 29 + gfx/tilesets/unused_museum_palette_map.asm | 32 + gfx/tilesets/water/water.png | Bin 0 -> 100 bytes gfx/tilesets/whirlpool/1.png | Bin 0 -> 146 bytes gfx/tilesets/whirlpool/2.png | Bin 0 -> 145 bytes gfx/tilesets/whirlpool/3.png | Bin 0 -> 146 bytes gfx/tilesets/whirlpool/4.png | Bin 0 -> 145 bytes gfx/title/crystal.png | Bin 0 -> 507 bytes gfx/title/logo.png | Bin 0 -> 1044 bytes gfx/title/suicune.png | Bin 0 -> 809 bytes gfx/title/title.pal | 81 + gfx/title/unused_gs_bg.pal | 24 + gfx/title/unused_gs_fg.pal | 9 + gfx/trade/arrow_left.png | Bin 0 -> 83 bytes gfx/trade/arrow_right.png | Bin 0 -> 83 bytes gfx/trade/ball.png | Bin 0 -> 136 bytes gfx/trade/border.pal | 29 + gfx/trade/border_cable_bottom.tilemap | 1 + gfx/trade/border_cable_top.tilemap | 1 + gfx/trade/border_mobile.tilemap | 1 + gfx/trade/border_tiles.png | Bin 0 -> 542 bytes gfx/trade/bubble.png | Bin 0 -> 123 bytes gfx/trade/cable.png | Bin 0 -> 100 bytes gfx/trade/game_boy.png | Bin 0 -> 214 bytes gfx/trade/game_boy.tilemap | 1 + gfx/trade/link_cable.png | Bin 0 -> 216 bytes gfx/trade/link_cable.tilemap | 1 + gfx/trade/mobile_border.pal | 39 + gfx/trade/poof.png | Bin 0 -> 191 bytes gfx/trade/unused_gs_border_tiles.png | Bin 0 -> 175 bytes gfx/trainer_card/badges.png | Bin 0 -> 517 bytes gfx/trainer_card/card_right_corner.png | Bin 0 -> 90 bytes gfx/trainer_card/card_status.png | Bin 0 -> 121 bytes gfx/trainer_card/chris_card.png | Bin 0 -> 412 bytes gfx/trainer_card/kris_card.png | Bin 0 -> 414 bytes gfx/trainer_card/leaders.png | Bin 0 -> 923 bytes gfx/trainer_card/trainer_card.png | Bin 0 -> 135 bytes gfx/trainers/beauty.png | Bin 0 -> 534 bytes gfx/trainers/biker.png | Bin 0 -> 650 bytes gfx/trainers/bird_keeper.png | Bin 0 -> 489 bytes gfx/trainers/blackbelt_t.png | Bin 0 -> 627 bytes gfx/trainers/blaine.png | Bin 0 -> 431 bytes gfx/trainers/blue.png | Bin 0 -> 430 bytes gfx/trainers/boarder.png | Bin 0 -> 581 bytes gfx/trainers/brock.png | Bin 0 -> 409 bytes gfx/trainers/bruno.png | Bin 0 -> 636 bytes gfx/trainers/bug_catcher.png | Bin 0 -> 525 bytes gfx/trainers/bugsy.png | Bin 0 -> 500 bytes gfx/trainers/burglar.png | Bin 0 -> 478 bytes gfx/trainers/cal.png | Bin 0 -> 484 bytes gfx/trainers/camper.png | Bin 0 -> 483 bytes gfx/trainers/champion.png | Bin 0 -> 617 bytes gfx/trainers/chuck.png | Bin 0 -> 620 bytes gfx/trainers/clair.png | Bin 0 -> 566 bytes gfx/trainers/cooltrainer_f.png | Bin 0 -> 487 bytes gfx/trainers/cooltrainer_m.png | Bin 0 -> 489 bytes gfx/trainers/erika.png | Bin 0 -> 458 bytes gfx/trainers/executive_f.png | Bin 0 -> 418 bytes gfx/trainers/executive_m.png | Bin 0 -> 420 bytes gfx/trainers/falkner.png | Bin 0 -> 507 bytes gfx/trainers/firebreather.png | Bin 0 -> 660 bytes gfx/trainers/fisher.png | Bin 0 -> 599 bytes gfx/trainers/gentleman.png | Bin 0 -> 443 bytes gfx/trainers/grunt_f.png | Bin 0 -> 467 bytes gfx/trainers/grunt_m.png | Bin 0 -> 462 bytes gfx/trainers/guitarist.png | Bin 0 -> 575 bytes gfx/trainers/hiker.png | Bin 0 -> 632 bytes gfx/trainers/janine.png | Bin 0 -> 472 bytes gfx/trainers/jasmine.png | Bin 0 -> 457 bytes gfx/trainers/juggler.png | Bin 0 -> 572 bytes gfx/trainers/karen.png | Bin 0 -> 489 bytes gfx/trainers/kimono_girl.png | Bin 0 -> 604 bytes gfx/trainers/koga.png | Bin 0 -> 489 bytes gfx/trainers/lass.png | Bin 0 -> 564 bytes gfx/trainers/lt_surge.png | Bin 0 -> 531 bytes gfx/trainers/medium.png | Bin 0 -> 615 bytes gfx/trainers/misty.png | Bin 0 -> 458 bytes gfx/trainers/morty.png | Bin 0 -> 480 bytes gfx/trainers/mysticalman.png | Bin 0 -> 503 bytes gfx/trainers/oak.png | Bin 0 -> 507 bytes gfx/trainers/officer.png | Bin 0 -> 432 bytes gfx/trainers/picnicker.png | Bin 0 -> 443 bytes gfx/trainers/pokefan_f.png | Bin 0 -> 548 bytes gfx/trainers/pokefan_m.png | Bin 0 -> 599 bytes gfx/trainers/pokemaniac.png | Bin 0 -> 574 bytes gfx/trainers/pryce.png | Bin 0 -> 422 bytes gfx/trainers/psychic_t.png | Bin 0 -> 452 bytes gfx/trainers/red.png | Bin 0 -> 458 bytes gfx/trainers/rival1.png | Bin 0 -> 502 bytes gfx/trainers/rival2.png | Bin 0 -> 429 bytes gfx/trainers/sabrina.png | Bin 0 -> 484 bytes gfx/trainers/sage.png | Bin 0 -> 385 bytes gfx/trainers/sailor.png | Bin 0 -> 508 bytes gfx/trainers/schoolboy.png | Bin 0 -> 463 bytes gfx/trainers/scientist.png | Bin 0 -> 523 bytes gfx/trainers/skier.png | Bin 0 -> 567 bytes gfx/trainers/super_nerd.png | Bin 0 -> 454 bytes gfx/trainers/swimmer_f.png | Bin 0 -> 489 bytes gfx/trainers/swimmer_m.png | Bin 0 -> 467 bytes gfx/trainers/teacher.png | Bin 0 -> 501 bytes gfx/trainers/twins.png | Bin 0 -> 526 bytes gfx/trainers/whitney.png | Bin 0 -> 469 bytes gfx/trainers/will.png | Bin 0 -> 471 bytes gfx/trainers/youngster.png | Bin 0 -> 449 bytes gfx/unown_puzzle/aerodactyl.png | Bin 0 -> 324 bytes gfx/unown_puzzle/cursor.png | Bin 0 -> 75 bytes gfx/unown_puzzle/hooh.png | Bin 0 -> 349 bytes gfx/unown_puzzle/kabuto.png | Bin 0 -> 276 bytes gfx/unown_puzzle/omanyte.png | Bin 0 -> 335 bytes gfx/unown_puzzle/start_cancel.png | Bin 0 -> 216 bytes gfx/unown_puzzle/tile_borders.png | Bin 0 -> 113 bytes home.asm | 64 + home/16bit.asm | 92 + home/array.asm | 71 + home/audio.asm | 517 + home/battle.asm | 273 + home/battle_vars.asm | 113 + home/call_regs.asm | 8 + home/clear_sprites.asm | 23 + home/compare.asm | 35 + home/copy.asm | 131 + home/copy_name.asm | 36 + home/copy_tilemap.asm | 35 + home/decompress.asm | 317 + home/delay.asm | 20 + home/double_speed.asm | 27 + home/fade.asm | 107 + home/farcall.asm | 48 + home/flag.asm | 113 + home/game_time.asm | 118 + home/gfx.asm | 392 + home/header.asm | 70 + home/hm_moves.asm | 28 + home/indirection.asm | 76 + home/init.asm | 216 + home/item.asm | 70 + home/joypad.asm | 483 + home/lcd.asm | 63 + home/map.asm | 2248 ++++ home/map_objects.asm | 575 + home/math.asm | 58 + home/menu.asm | 813 ++ home/mobile.asm | 255 + home/movement.asm | 128 + home/moves.asm | 36 + home/names.asm | 284 + home/palettes.asm | 329 + home/pokedex_flags.asm | 110 + home/pokemon.asm | 318 + home/predef.asm | 52 + home/print_bcd.asm | 79 + home/print_text.asm | 127 + home/printer.asm | 41 + home/queue_script.asm | 12 + home/random.asm | 80 + home/region.asm | 32 + home/scrolling_menu.asm | 61 + home/serial.asm | 407 + home/sine.asm | 9 + home/sprite_anims.asm | 31 + home/sprite_updates.asm | 19 + home/sram.asm | 30 + home/stone_queue.asm | 124 + home/string.asm | 35 + home/text.asm | 1044 ++ home/tilemap.asm | 226 + home/time.asm | 271 + home/time_palettes.asm | 22 + home/trainers.asm | 244 + home/vblank.asm | 421 + home/video.asm | 459 + home/window.asm | 93 + includes.asm | 76 + layout.link | 395 + lib/mobile/mail.asm | 5160 +++++++++ lib/mobile/main.asm | 9546 +++++++++++++++++ macros/asserts.asm | 65 + macros/code.asm | 96 + macros/const.asm | 48 + macros/coords.asm | 59 + macros/data.asm | 114 + macros/farcall.asm | 23 + macros/gfx.asm | 60 + macros/indirection.asm | 76 + macros/legacy.asm | 407 + macros/lists.asm | 19 + macros/predef.asm | 17 + macros/ram.asm | 408 + macros/scripts/audio.asm | 320 + macros/scripts/battle_anims.asm | 301 + macros/scripts/battle_commands.asm | 187 + macros/scripts/events.asm | 1080 ++ macros/scripts/maps.asm | 190 + macros/scripts/movement.asm | 222 + macros/scripts/oam_anims.asm | 38 + macros/scripts/pic_anims.asm | 28 + macros/scripts/text.asm | 147 + macros/vc.asm | 29 + macros/wram_16bit.asm | 65 + main.asm | 695 ++ maps/AzaleaGym.asm | 382 + maps/AzaleaGym.blk | 2 + maps/AzaleaMart.asm | 60 + maps/AzaleaPokecenter1F.asm | 93 + maps/AzaleaTown.asm | 496 + maps/AzaleaTown.blk | 10 + maps/BattleTower1F.asm | 813 ++ maps/BattleTower1F.blk | 1 + maps/BattleTowerBattleRoom.asm | 153 + maps/BattleTowerBattleRoom.blk | 3 + maps/BattleTowerElevator.asm | 57 + maps/BattleTowerElevator.blk | 1 + maps/BattleTowerHallway.asm | 94 + maps/BattleTowerHallway.blk | 1 + maps/BattleTowerOutside.asm | 148 + maps/BattleTowerOutside.blk | 3 + maps/BillsBrothersHouse.asm | 41 + maps/BillsFamilysHouse.asm | 260 + maps/BillsHouse.asm | 390 + maps/BlackthornCity.asm | 346 + maps/BlackthornCity.blk | 23 + maps/BlackthornDragonSpeechHouse.asm | 59 + maps/BlackthornEmysHouse.asm | 34 + maps/BlackthornGym1F.asm | 410 + maps/BlackthornGym1F.blk | 1 + maps/BlackthornGym2F.asm | 148 + maps/BlackthornGym2F.blk | 1 + maps/BlackthornMart.asm | 61 + maps/BlackthornPokecenter1F.asm | 66 + maps/BluesHouse.asm | 157 + maps/BrunosRoom.asm | 139 + maps/BrunosRoom.blk | 1 + maps/BurnedTower1F.asm | 309 + maps/BurnedTower1F.blk | 3 + maps/BurnedTowerB1F.asm | 261 + maps/BurnedTowerB1F.blk | 8 + maps/CeladonCafe.asm | 226 + maps/CeladonCafe.blk | 1 + maps/CeladonCity.asm | 269 + maps/CeladonCity.blk | 16 + maps/CeladonDeptStore1F.asm | 92 + maps/CeladonDeptStore2F.asm | 87 + maps/CeladonDeptStore3F.asm | 114 + maps/CeladonDeptStore4F.asm | 68 + maps/CeladonDeptStore5F.asm | 91 + maps/CeladonDeptStore6F.asm | 168 + maps/CeladonDeptStoreElevator.asm | 40 + maps/CeladonGameCorner.asm | 339 + maps/CeladonGameCorner.blk | 1 + maps/CeladonGameCornerPrizeRoom.asm | 286 + maps/CeladonGameCornerPrizeRoom.blk | 1 + maps/CeladonGym.asm | 287 + maps/CeladonGym.blk | 1 + maps/CeladonMansion1F.asm | 96 + maps/CeladonMansion1F.blk | 2 + maps/CeladonMansion2F.asm | 66 + maps/CeladonMansion2F.blk | 2 + maps/CeladonMansion3F.asm | 211 + maps/CeladonMansion3F.blk | 1 + maps/CeladonMansionRoof.asm | 48 + maps/CeladonMansionRoof.blk | 1 + maps/CeladonMansionRoofHouse.asm | 129 + maps/CeladonPokecenter1F.asm | 163 + maps/CeladonPokecenter2FBeta.asm | 16 + maps/CeruleanCity.asm | 306 + maps/CeruleanCity.blk | 30 + maps/CeruleanGym.asm | 383 + maps/CeruleanGym.blk | 2 + maps/CeruleanGymBadgeSpeechHouse.asm | 29 + maps/CeruleanMart.asm | 60 + maps/CeruleanPokecenter1F.asm | 78 + maps/CeruleanPokecenter2FBeta.asm | 16 + maps/CeruleanPoliceStation.asm | 58 + maps/CeruleanTradeSpeechHouse.asm | 69 + maps/CharcoalKiln.asm | 166 + maps/CherrygroveCity.asm | 572 + maps/CherrygroveCity.blk | 8 + maps/CherrygroveEvolutionSpeechHouse.asm | 57 + maps/CherrygroveGymSpeechHouse.asm | 60 + maps/CherrygroveMart.asm | 86 + maps/CherrygrovePokecenter1F.asm | 85 + maps/CianwoodCity.asm | 417 + maps/CianwoodCity.blk | 1 + maps/CianwoodGym.asm | 328 + maps/CianwoodGym.blk | 4 + maps/CianwoodLugiaSpeechHouse.asm | 78 + maps/CianwoodPharmacy.asm | 87 + maps/CianwoodPhotoStudio.asm | 61 + maps/CianwoodPokecenter1F.asm | 148 + maps/CinnabarIsland.asm | 143 + maps/CinnabarIsland.blk | 2 + maps/CinnabarPokecenter1F.asm | 50 + maps/CinnabarPokecenter2FBeta.asm | 16 + maps/Colosseum.asm | 78 + maps/Colosseum.blk | 1 + maps/CopycatsHouse1F.asm | 88 + maps/CopycatsHouse1F.blk | 1 + maps/CopycatsHouse2F.asm | 379 + maps/CopycatsHouse2F.blk | 1 + maps/DanceTheater.asm | 360 + maps/DanceTheater.blk | 1 + maps/DarkCaveBlackthornEntrance.asm | 76 + maps/DarkCaveBlackthornEntrance.blk | 12 + maps/DarkCaveVioletEntrance.asm | 55 + maps/DarkCaveVioletEntrance.blk | 25 + maps/DayCare.asm | 173 + maps/DayCare.blk | 4 + maps/DayOfWeekSiblingsHouse.asm | 83 + maps/DeptStore1F.blk | 2 + maps/DeptStore2F.blk | 1 + maps/DeptStore3F.blk | 2 + maps/DeptStore4F.blk | 1 + maps/DeptStore5F.blk | 1 + maps/DeptStore6F.blk | 1 + maps/DeptStoreElevator.blk | 1 + maps/DiglettsCave.asm | 40 + maps/DiglettsCave.blk | 18 + maps/DragonShrine.asm | 673 ++ maps/DragonShrine.blk | 1 + maps/DragonsDen1F.asm | 19 + maps/DragonsDen1F.blk | 5 + maps/DragonsDenB1F.asm | 432 + maps/DragonsDenB1F.blk | 16 + maps/EarlsPokemonAcademy.asm | 431 + maps/EarlsPokemonAcademy.blk | 1 + maps/EastWestGate.blk | 1 + maps/EcruteakCity.asm | 298 + maps/EcruteakCity.blk | 8 + maps/EcruteakGym.asm | 438 + maps/EcruteakGym.blk | 5 + maps/EcruteakItemfinderHouse.asm | 177 + maps/EcruteakLugiaSpeechHouse.asm | 59 + maps/EcruteakMart.asm | 60 + maps/EcruteakPokecenter1F.asm | 224 + maps/EcruteakTinTowerEntrance.asm | 298 + maps/EcruteakTinTowerEntrance.blk | 10 + maps/ElmsHouse.asm | 98 + maps/ElmsHouse.blk | 1 + maps/ElmsLab.asm | 1412 +++ maps/ElmsLab.blk | 2 + maps/FastShip1F.asm | 313 + maps/FastShip1F.blk | 1 + maps/FastShipB1F.asm | 475 + maps/FastShipB1F.blk | 1 + maps/FastShipCabins_NNW_NNE_NE.asm | 289 + maps/FastShipCabins_NNW_NNE_NE.blk | 6 + maps/FastShipCabins_SE_SSE_CaptainsCabin.asm | 490 + maps/FastShipCabins_SE_SSE_CaptainsCabin.blk | 9 + maps/FastShipCabins_SW_SSW_NW.asm | 244 + maps/FastShipCabins_SW_SSW_NW.blk | 8 + maps/FightingDojo.asm | 58 + maps/FightingDojo.blk | 1 + maps/FuchsiaCity.asm | 157 + maps/FuchsiaCity.blk | 25 + maps/FuchsiaGym.asm | 400 + maps/FuchsiaGym.blk | 1 + maps/FuchsiaMart.asm | 52 + maps/FuchsiaPokecenter1F.asm | 105 + maps/FuchsiaPokecenter2FBeta.asm | 16 + maps/GiftShop.blk | 1 + maps/GoldenrodBikeShop.asm | 122 + maps/GoldenrodBikeShop.blk | 2 + maps/GoldenrodCity.asm | 602 ++ maps/GoldenrodCity.blk | 15 + maps/GoldenrodDeptStore1F.asm | 98 + maps/GoldenrodDeptStore2F.asm | 118 + maps/GoldenrodDeptStore3F.asm | 74 + maps/GoldenrodDeptStore4F.asm | 96 + maps/GoldenrodDeptStore5F.asm | 238 + maps/GoldenrodDeptStore6F.asm | 172 + maps/GoldenrodDeptStoreB1F.asm | 130 + maps/GoldenrodDeptStoreB1F.blk | 5 + maps/GoldenrodDeptStoreElevator.asm | 67 + maps/GoldenrodDeptStoreRoof.asm | 234 + maps/GoldenrodDeptStoreRoof.blk | 1 + maps/GoldenrodFlowerShop.asm | 170 + maps/GoldenrodFlowerShop.blk | 1 + maps/GoldenrodGameCorner.asm | 498 + maps/GoldenrodGameCorner.blk | 1 + maps/GoldenrodGym.asm | 400 + maps/GoldenrodGym.blk | 1 + maps/GoldenrodHappinessRater.asm | 154 + maps/GoldenrodMagnetTrainStation.asm | 181 + maps/GoldenrodMagnetTrainStation.blk | 6 + maps/GoldenrodNameRater.asm | 38 + maps/GoldenrodPPSpeechHouse.asm | 68 + maps/GoldenrodPokecenter1F.asm | 825 ++ maps/GoldenrodUnderground.asm | 679 ++ maps/GoldenrodUnderground.blk | 1 + ...oldenrodUndergroundSwitchRoomEntrances.asm | 969 ++ ...oldenrodUndergroundSwitchRoomEntrances.blk | 2 + maps/GoldenrodUndergroundWarehouse.asm | 230 + maps/GoldenrodUndergroundWarehouse.blk | 3 + maps/GuideGentsHouse.asm | 42 + maps/HallOfFame.asm | 123 + maps/HallOfFame.blk | 1 + maps/House1.blk | 1 + maps/House2.blk | 1 + maps/IcePath1F.asm | 36 + maps/IcePath1F.blk | 14 + maps/IcePathB1F.asm | 99 + maps/IcePathB1F.blk | 2 + maps/IcePathB2FBlackthornSide.asm | 28 + maps/IcePathB2FBlackthornSide.blk | 1 + maps/IcePathB2FMahoganySide.asm | 53 + maps/IcePathB2FMahoganySide.blk | 1 + maps/IcePathB3F.asm | 29 + maps/IcePathB3F.blk | 1 + maps/IlexForest.asm | 965 ++ maps/IlexForest.blk | 3 + maps/IlexForestAzaleaGate.asm | 46 + maps/IndigoPlateauPokecenter1F.asm | 324 + maps/IndigoPlateauPokecenter1F.blk | 1 + maps/KarensRoom.asm | 147 + maps/KarensRoom.blk | 1 + maps/KogasRoom.asm | 144 + maps/KogasRoom.blk | 1 + maps/KurtsHouse.asm | 700 ++ maps/KurtsHouse.blk | 1 + maps/LakeOfRage.asm | 522 + maps/LakeOfRage.blk | 1 + maps/LakeOfRageHiddenPowerHouse.asm | 82 + maps/LakeOfRageMagikarpHouse.asm | 224 + maps/LancesRoom.asm | 356 + maps/LancesRoom.blk | 1 + maps/LavRadioTower1F.asm | 240 + maps/LavRadioTower1F.blk | 2 + maps/LavenderMart.asm | 62 + maps/LavenderNameRater.asm | 36 + maps/LavenderPokecenter1F.asm | 97 + maps/LavenderPokecenter2FBeta.asm | 16 + maps/LavenderSpeechHouse.asm | 43 + maps/LavenderTown.asm | 132 + maps/LavenderTown.blk | 1 + maps/MahoganyGym.asm | 393 + maps/MahoganyGym.blk | 1 + maps/MahoganyMart1F.asm | 238 + maps/MahoganyPokecenter1F.asm | 70 + maps/MahoganyRedGyaradosSpeechHouse.asm | 74 + maps/MahoganyTown.asm | 271 + maps/MahoganyTown.blk | 1 + maps/ManiasHouse.asm | 212 + maps/Mart.blk | 1 + maps/MobileBattleRoom.asm | 79 + maps/MobileBattleRoom.blk | 1 + maps/MobileTradeRoom.asm | 47 + maps/MobileTradeRoom.blk | 1 + maps/MountMoon.asm | 179 + maps/MountMoon.blk | 11 + maps/MountMoonGiftShop.asm | 43 + maps/MountMoonSquare.asm | 151 + maps/MountMoonSquare.blk | 4 + maps/MountMortar1FInside.asm | 143 + maps/MountMortar1FInside.blk | 29 + maps/MountMortar1FOutside.asm | 40 + maps/MountMortar1FOutside.blk | 20 + maps/MountMortar2FInside.asm | 86 + maps/MountMortar2FInside.blk | 13 + maps/MountMortarB1F.asm | 154 + maps/MountMortarB1F.blk | 20 + maps/MoveDeletersHouse.asm | 34 + maps/MrFujisHouse.asm | 98 + maps/MrFujisHouse.blk | 1 + maps/MrPokemonsHouse.asm | 391 + maps/MrPokemonsHouse.blk | 1 + maps/MrPsychicsHouse.asm | 62 + maps/NationalPark.asm | 545 + maps/NationalPark.blk | 2 + maps/NationalParkBugContest.asm | 250 + maps/NewBarkTown.asm | 304 + maps/NewBarkTown.blk | 1 + maps/NorthSouthGate.blk | 2 + maps/OaksLab.asm | 288 + maps/OaksLab.blk | 2 + maps/OlivineCafe.asm | 93 + maps/OlivineCafe.blk | 1 + maps/OlivineCity.asm | 322 + maps/OlivineCity.blk | 6 + maps/OlivineGoodRodHouse.asm | 94 + maps/OlivineGym.asm | 213 + maps/OlivineGym.blk | 1 + maps/OlivineHouseBeta.asm | 55 + maps/OlivineLighthouse1F.asm | 53 + maps/OlivineLighthouse1F.blk | 1 + maps/OlivineLighthouse2F.asm | 221 + maps/OlivineLighthouse2F.blk | 1 + maps/OlivineLighthouse3F.asm | 135 + maps/OlivineLighthouse3F.blk | 1 + maps/OlivineLighthouse4F.asm | 103 + maps/OlivineLighthouse4F.blk | 1 + maps/OlivineLighthouse5F.asm | 113 + maps/OlivineLighthouse5F.blk | 1 + maps/OlivineLighthouse6F.asm | 278 + maps/OlivineLighthouse6F.blk | 1 + maps/OlivineMart.asm | 60 + maps/OlivinePokecenter1F.asm | 64 + maps/OlivinePort.asm | 405 + maps/OlivinePort.blk | 104 + maps/OlivinePortPassage.asm | 35 + maps/OlivinePunishmentSpeechHouse.asm | 55 + maps/OlivineTimsHouse.asm | 34 + maps/PalletTown.asm | 88 + maps/PalletTown.blk | 4 + maps/PewterCity.asm | 179 + maps/PewterCity.blk | 59 + maps/PewterGym.asm | 225 + maps/PewterGym.blk | 1 + maps/PewterMart.asm | 60 + maps/PewterNidoranSpeechHouse.asm | 42 + maps/PewterPokecenter1F.asm | 85 + maps/PewterPokecenter2FBeta.asm | 16 + maps/PewterSnoozeSpeechHouse.asm | 35 + maps/PlayersHouse1F.asm | 409 + maps/PlayersHouse1F.blk | 2 + maps/PlayersHouse2F.asm | 133 + maps/PlayersHouse2F.blk | 1 + maps/PlayersNeighborsHouse.asm | 115 + maps/PokeSeersHouse.asm | 29 + maps/Pokecenter1F.blk | 1 + maps/Pokecenter2F.asm | 1042 ++ maps/Pokecenter2F.blk | 2 + maps/PokecomCenterAdminOfficeMobile.asm | 280 + maps/PokecomCenterAdminOfficeMobile.blk | 4 + maps/PokemonFanClub.asm | 316 + maps/PokemonFanClub.blk | 1 + maps/PortPassage.blk | 3 + maps/PowerPlant.asm | 410 + maps/PowerPlant.blk | 1 + maps/RadioTower1F.asm | 493 + maps/RadioTower1F.blk | 1 + maps/RadioTower2F.asm | 741 ++ maps/RadioTower2F.blk | 2 + maps/RadioTower3F.asm | 351 + maps/RadioTower3F.blk | 1 + maps/RadioTower4F.asm | 268 + maps/RadioTower4F.blk | 1 + maps/RadioTower5F.asm | 444 + maps/RadioTower5F.blk | 2 + maps/RedsHouse1F.asm | 91 + maps/RedsHouse1F.blk | 2 + maps/RedsHouse2F.asm | 38 + maps/RedsHouse2F.blk | 1 + maps/RockTunnel1F.asm | 41 + maps/RockTunnel1F.blk | 16 + maps/RockTunnelB1F.asm | 40 + maps/RockTunnelB1F.blk | 16 + maps/Route1.asm | 94 + maps/Route1.blk | 37 + maps/Route10North.asm | 29 + maps/Route10North.blk | 6 + maps/Route10Pokecenter1F.asm | 97 + maps/Route10Pokecenter2FBeta.asm | 16 + maps/Route10South.asm | 89 + maps/Route10South.blk | 1 + maps/Route11.asm | 162 + maps/Route11.blk | 14 + maps/Route12.asm | 186 + maps/Route12.blk | 13 + maps/Route12SuperRodHouse.asm | 91 + maps/Route13.asm | 210 + maps/Route13.blk | 33 + maps/Route14.asm | 129 + maps/Route14.blk | 61 + maps/Route15.asm | 221 + maps/Route15.blk | 43 + maps/Route15FuchsiaGate.asm | 34 + maps/Route16.asm | 44 + maps/Route16.blk | 1 + maps/Route16FuchsiaSpeechHouse.asm | 37 + maps/Route16Gate.asm | 77 + maps/Route17.asm | 150 + maps/Route17.blk | 52 + maps/Route17Route18Gate.asm | 68 + maps/Route18.asm | 92 + maps/Route18.blk | 10 + maps/Route19.asm | 253 + maps/Route19.blk | 1 + maps/Route19FuchsiaGate.asm | 60 + maps/Route2.asm | 175 + maps/Route2.blk | 41 + maps/Route20.asm | 127 + maps/Route20.blk | 1 + maps/Route21.asm | 102 + maps/Route21.blk | 4 + maps/Route22.asm | 27 + maps/Route22.blk | 3 + maps/Route23.asm | 37 + maps/Route23.blk | 9 + maps/Route24.asm | 129 + maps/Route24.blk | 10 + maps/Route25.asm | 455 + maps/Route25.blk | 25 + maps/Route26.asm | 434 + maps/Route26.blk | 20 + maps/Route26HealHouse.asm | 63 + maps/Route27.asm | 492 + maps/Route27.blk | 17 + maps/Route27SandstormHouse.asm | 108 + maps/Route28.asm | 29 + maps/Route28.blk | 14 + maps/Route28SteelWingHouse.asm | 86 + maps/Route29.asm | 437 + maps/Route29.blk | 1 + maps/Route29Route46Gate.asm | 52 + maps/Route2Gate.asm | 40 + maps/Route2NuggetHouse.asm | 64 + maps/Route3.asm | 148 + maps/Route3.blk | 50 + maps/Route30.asm | 434 + maps/Route30.blk | 1 + maps/Route30BerryHouse.asm | 61 + maps/Route31.asm | 439 + maps/Route31.blk | 1 + maps/Route31VioletGate.asm | 43 + maps/Route32.asm | 958 ++ maps/Route32.blk | 8 + maps/Route32Pokecenter1F.asm | 110 + maps/Route32RuinsOfAlphGate.asm | 63 + maps/Route33.asm | 209 + maps/Route33.blk | 4 + maps/Route34.asm | 793 ++ maps/Route34.blk | 10 + maps/Route34IlexForestGate.asm | 155 + maps/Route35.asm | 488 + maps/Route35.blk | 1 + maps/Route35GoldenrodGate.asm | 214 + maps/Route35NationalParkGate.asm | 455 + maps/Route35NationalParkGate.blk | 1 + maps/Route36.asm | 688 ++ maps/Route36.blk | 4 + maps/Route36NationalParkGate.asm | 877 ++ maps/Route36NationalParkGate.blk | 1 + maps/Route36RuinsOfAlphGate.asm | 50 + maps/Route37.asm | 256 + maps/Route37.blk | 1 + maps/Route38.asm | 493 + maps/Route38.blk | 1 + maps/Route38EcruteakGate.asm | 39 + maps/Route39.asm | 369 + maps/Route39.blk | 1 + maps/Route39Barn.asm | 203 + maps/Route39Barn.blk | 1 + maps/Route39Farmhouse.asm | 210 + maps/Route4.asm | 137 + maps/Route4.blk | 34 + maps/Route40.asm | 362 + maps/Route40.blk | 3 + maps/Route40BattleTowerGate.asm | 86 + maps/Route41.asm | 365 + maps/Route41.blk | 27 + maps/Route42.asm | 348 + maps/Route42.blk | 10 + maps/Route42EcruteakGate.asm | 34 + maps/Route43.asm | 526 + maps/Route43.blk | 1 + maps/Route43Gate.asm | 264 + maps/Route43MahoganyGate.asm | 53 + maps/Route44.asm | 531 + maps/Route44.blk | 1 + maps/Route45.asm | 557 + maps/Route45.blk | 4 + maps/Route46.asm | 270 + maps/Route46.blk | 1 + maps/Route5.asm | 56 + maps/Route5.blk | 1 + maps/Route5CleanseTagHouse.asm | 76 + maps/Route5SaffronGate.asm | 35 + maps/Route5UndergroundPathEntrance.asm | 33 + maps/Route6.asm | 107 + maps/Route6.blk | 1 + maps/Route6SaffronGate.asm | 72 + maps/Route6UndergroundPathEntrance.asm | 18 + maps/Route7.asm | 48 + maps/Route7.blk | 1 + maps/Route7SaffronGate.asm | 60 + maps/Route8.asm | 192 + maps/Route8.blk | 24 + maps/Route8SaffronGate.asm | 34 + maps/Route9.asm | 224 + maps/Route9.blk | 27 + maps/RuinsOfAlphAerodactylChamber.asm | 163 + maps/RuinsOfAlphAerodactylItemRoom.asm | 52 + maps/RuinsOfAlphAerodactylWordRoom.asm | 18 + maps/RuinsOfAlphAerodactylWordRoom.blk | 2 + maps/RuinsOfAlphHoOhChamber.asm | 164 + maps/RuinsOfAlphHoOhItemRoom.asm | 52 + maps/RuinsOfAlphHoOhWordRoom.asm | 18 + maps/RuinsOfAlphHoOhWordRoom.blk | 2 + maps/RuinsOfAlphInnerChamber.asm | 124 + maps/RuinsOfAlphInnerChamber.blk | 7 + maps/RuinsOfAlphItemRoom.blk | 1 + maps/RuinsOfAlphKabutoChamber.asm | 276 + maps/RuinsOfAlphKabutoItemRoom.asm | 52 + maps/RuinsOfAlphKabutoWordRoom.asm | 18 + maps/RuinsOfAlphKabutoWordRoom.blk | 2 + maps/RuinsOfAlphOmanyteChamber.asm | 164 + maps/RuinsOfAlphOmanyteItemRoom.asm | 52 + maps/RuinsOfAlphOmanyteWordRoom.asm | 18 + maps/RuinsOfAlphOmanyteWordRoom.blk | 2 + maps/RuinsOfAlphOutside.asm | 311 + maps/RuinsOfAlphOutside.blk | 12 + maps/RuinsOfAlphPuzzleChamber.blk | 1 + maps/RuinsOfAlphResearchCenter.asm | 407 + maps/RuinsOfAlphResearchCenter.blk | 1 + maps/SafariZoneBeta.asm | 17 + maps/SafariZoneBeta.blk | 1 + maps/SafariZoneFuchsiaGateBeta.asm | 19 + maps/SafariZoneMainOffice.asm | 17 + maps/SafariZoneWardensHome.asm | 93 + maps/SaffronCity.asm | 306 + maps/SaffronCity.blk | 5 + maps/SaffronGym.asm | 339 + maps/SaffronGym.blk | 4 + maps/SaffronMagnetTrainStation.asm | 234 + maps/SaffronMagnetTrainStation.blk | 6 + maps/SaffronMart.asm | 52 + maps/SaffronPokecenter1F.asm | 128 + maps/SaffronPokecenter2FBeta.asm | 16 + maps/SeafoamGym.asm | 170 + maps/SeafoamGym.blk | 3 + maps/SilphCo1F.asm | 69 + maps/SilphCo1F.blk | 1 + maps/SilverCaveItemRooms.asm | 29 + maps/SilverCaveItemRooms.blk | 5 + maps/SilverCaveOutside.asm | 38 + maps/SilverCaveOutside.blk | 14 + maps/SilverCavePokecenter1F.asm | 44 + maps/SilverCaveRoom1.asm | 47 + maps/SilverCaveRoom1.blk | 22 + maps/SilverCaveRoom2.asm | 40 + maps/SilverCaveRoom2.blk | 26 + maps/SilverCaveRoom3.asm | 62 + maps/SilverCaveRoom3.blk | 13 + maps/SlowpokeWellB1F.asm | 341 + maps/SlowpokeWellB1F.blk | 8 + maps/SlowpokeWellB2F.asm | 74 + maps/SlowpokeWellB2F.blk | 9 + maps/SoulHouse.asm | 88 + maps/SoulHouse.blk | 1 + maps/SproutTower1F.asm | 125 + maps/SproutTower1F.blk | 5 + maps/SproutTower2F.asm | 102 + maps/SproutTower2F.blk | 2 + maps/SproutTower3F.asm | 354 + maps/SproutTower3F.blk | 5 + maps/TeamRocketBaseB1F.asm | 789 ++ maps/TeamRocketBaseB1F.blk | 6 + maps/TeamRocketBaseB2F.asm | 969 ++ maps/TeamRocketBaseB2F.blk | 1 + maps/TeamRocketBaseB3F.asm | 606 ++ maps/TeamRocketBaseB3F.blk | 1 + maps/TimeCapsule.asm | 69 + maps/TinTower1F.asm | 552 + maps/TinTower1F.blk | 5 + maps/TinTower2F.asm | 17 + maps/TinTower2F.blk | 5 + maps/TinTower3F.asm | 24 + maps/TinTower3F.blk | 1 + maps/TinTower4F.asm | 40 + maps/TinTower4F.blk | 1 + maps/TinTower5F.asm | 34 + maps/TinTower5F.blk | 1 + maps/TinTower6F.asm | 24 + maps/TinTower6F.blk | 1 + maps/TinTower7F.asm | 27 + maps/TinTower7F.blk | 1 + maps/TinTower8F.asm | 38 + maps/TinTower8F.blk | 1 + maps/TinTower9F.asm | 37 + maps/TinTower9F.blk | 1 + maps/TinTowerRoof.asm | 56 + maps/TinTowerRoof.blk | 1 + maps/TohjoFalls.asm | 24 + maps/TohjoFalls.blk | 11 + maps/TradeCenter.asm | 69 + maps/TradeCenter.blk | 1 + maps/TrainerHouse1F.asm | 158 + maps/TrainerHouse1F.blk | 1 + maps/TrainerHouseB1F.asm | 183 + maps/TrainerHouseB1F.blk | 1 + maps/UndergroundPath.asm | 25 + maps/UndergroundPath.blk | 2 + maps/UndergroundPathEntrance.blk | 1 + maps/UnionCave1F.asm | 222 + maps/UnionCave1F.blk | 18 + maps/UnionCaveB1F.asm | 174 + maps/UnionCaveB1F.blk | 10 + maps/UnionCaveB2F.asm | 158 + maps/UnionCaveB2F.blk | 21 + maps/VermilionCity.asm | 301 + maps/VermilionCity.blk | 5 + maps/VermilionDiglettsCaveSpeechHouse.asm | 33 + maps/VermilionFishingSpeechHouse.asm | 63 + maps/VermilionGym.asm | 294 + maps/VermilionGym.blk | 1 + maps/VermilionMagnetTrainSpeechHouse.asm | 49 + maps/VermilionMart.asm | 51 + maps/VermilionPokecenter1F.asm | 93 + maps/VermilionPokecenter2FBeta.asm | 16 + maps/VermilionPort.asm | 315 + maps/VermilionPort.blk | 114 + maps/VermilionPortPassage.asm | 34 + maps/VictoryRoad.asm | 268 + maps/VictoryRoad.blk | 7 + maps/VictoryRoadGate.asm | 119 + maps/VictoryRoadGate.blk | 1 + maps/VioletCity.asm | 312 + maps/VioletCity.blk | 1 + maps/VioletGym.asm | 299 + maps/VioletGym.blk | 1 + maps/VioletKylesHouse.asm | 46 + maps/VioletMart.asm | 63 + maps/VioletNicknameSpeechHouse.asm | 59 + maps/VioletPokecenter1F.asm | 233 + maps/ViridianCity.asm | 240 + maps/ViridianCity.blk | 59 + maps/ViridianGym.asm | 185 + maps/ViridianGym.blk | 1 + maps/ViridianMart.asm | 51 + maps/ViridianNicknameSpeechHouse.asm | 77 + maps/ViridianPokecenter1F.asm | 88 + maps/ViridianPokecenter2FBeta.asm | 16 + maps/WhirlIslandB1F.asm | 68 + maps/WhirlIslandB1F.blk | 34 + maps/WhirlIslandB2F.asm | 36 + maps/WhirlIslandB2F.blk | 1 + maps/WhirlIslandCave.asm | 17 + maps/WhirlIslandCave.blk | 6 + maps/WhirlIslandLugiaChamber.asm | 55 + maps/WhirlIslandLugiaChamber.blk | 1 + maps/WhirlIslandNE.asm | 25 + maps/WhirlIslandNE.blk | 8 + maps/WhirlIslandNW.asm | 19 + maps/WhirlIslandNW.blk | 4 + maps/WhirlIslandSE.asm | 17 + maps/WhirlIslandSE.blk | 4 + maps/WhirlIslandSW.asm | 27 + maps/WhirlIslandSW.blk | 4 + maps/WillsRoom.asm | 142 + maps/WillsRoom.blk | 1 + maps/WiseTriosRoom.asm | 364 + maps/WiseTriosRoom.blk | 1 + maps/unused/BetaAzaleaTown.blk | 10 + maps/unused/BetaBlackthornCity.blk | 1 + maps/unused/BetaBlank.blk | 1 + maps/unused/BetaCapsuleHouse.blk | 1 + maps/unused/BetaCaveTestMap.blk | 18 + maps/unused/BetaCeladonMansion1F.blk | 1 + maps/unused/BetaCeladonMansion2F.blk | 1 + maps/unused/BetaCherrygroveCity.blk | 9 + maps/unused/BetaCianwoodCity.blk | 1 + maps/unused/BetaCinnabarPokemonLabHallway.blk | 2 + maps/unused/BetaCinnabarPokemonLabRoom1.blk | 2 + maps/unused/BetaCinnabarPokemonLabRoom2.blk | 1 + maps/unused/BetaCinnabarPokemonLabRoom3.blk | 1 + maps/unused/BetaEcruteakCity.blk | 1 + maps/unused/BetaElevator.blk | 1 + maps/unused/BetaFastShipInsideCutOut.blk | 1 + maps/unused/BetaGoldenrodCity.blk | 10 + maps/unused/BetaHouse.blk | 1 + maps/unused/BetaLakeOfRage.blk | 1 + maps/unused/BetaMahoganyTown.blk | 1 + maps/unused/BetaNewBarkTown.blk | 1 + maps/unused/BetaOlivineCity.blk | 4 + maps/unused/BetaPewterMuseumOfScience1F.blk | 2 + maps/unused/BetaPewterMuseumOfScience2F.blk | 1 + maps/unused/BetaPlayersHouse2F.blk | 1 + maps/unused/BetaPokecenter.blk | 1 + maps/unused/BetaRocketHideout1F.blk | 15 + maps/unused/BetaRocketHideoutB1F.blk | 4 + maps/unused/BetaRocketHideoutB2F.blk | 5 + maps/unused/BetaRocketHideoutB3F.blk | 5 + maps/unused/BetaRoute23.blk | 7 + .../BetaRuinsOfAlphUnsolvedPuzzleRoom.blk | 1 + maps/unused/BetaSilverCaveOutside.blk | 1 + maps/unused/BetaSlowpokeWell1F.blk | 5 + maps/unused/BetaSproutTower1.blk | 3 + maps/unused/BetaSproutTower2.blk | 9 + maps/unused/BetaSproutTower3.blk | 7 + maps/unused/BetaSproutTower5.blk | 9 + maps/unused/BetaSproutTower6.blk | 4 + maps/unused/BetaSproutTower7.blk | 8 + maps/unused/BetaSproutTower8.blk | 5 + maps/unused/BetaSproutTower9.blk | 1 + maps/unused/BetaSproutTowerCutOut1.blk | 1 + maps/unused/BetaSproutTowerCutOut2.blk | 1 + maps/unused/BetaSproutTowerCutOut3.blk | 1 + maps/unused/BetaUnionCave.blk | 8 + maps/unused/BetaUnknownGym.blk | 1 + maps/unused/BetaVioletCity.blk | 7 + mobile/fixed_words.asm | 4126 +++++++ mobile/mobile_12.asm | 1817 ++++ mobile/mobile_12_2.asm | 912 ++ mobile/mobile_22.asm | 4244 ++++++++ mobile/mobile_22_2.asm | 1099 ++ mobile/mobile_40.asm | 7712 +++++++++++++ mobile/mobile_41.asm | 1113 ++ mobile/mobile_42.asm | 1687 +++ mobile/mobile_45_2.asm | 1369 +++ mobile/mobile_45_sprite_engine.asm | 877 ++ mobile/mobile_45_stadium.asm | 813 ++ mobile/mobile_46.asm | 7714 +++++++++++++ mobile/mobile_5b.asm | 781 ++ mobile/mobile_5c.asm | 875 ++ mobile/mobile_5e.asm | 941 ++ mobile/mobile_5f.asm | 5183 +++++++++ mobile/mobile_menu.asm | 848 ++ mobile/news/news.asm | 42 + mobile/news/news_1.bin | Bin 0 -> 3494 bytes mobile/news/news_2.bin | Bin 0 -> 4044 bytes mobile/news/news_3.bin | Bin 0 -> 1462 bytes mobile/print_opp_message.asm | 30 + ram.asm | 7 + ram/hram.asm | 178 + ram/sram.asm | 440 + ram/vram.asm | 16 + ram/wram.asm | 3670 +++++++ replace.sh | 5 + rgbdscheck.asm | 16 + tools/.gitignore | 10 + tools/Makefile | 38 + tools/bpp2png.c | 240 + tools/common.h | 151 + tools/consts.py | 56 + tools/free_space.awk | 78 + tools/gfx.c | 300 + tools/lodepng/lodepng.c | 6497 +++++++++++ tools/lodepng/lodepng.h | 2019 ++++ tools/lz/global.c | 35 + tools/lz/main.c | 54 + tools/lz/merging.c | 102 + tools/lz/mpcomp.c | 112 + tools/lz/nullcomp.c | 20 + tools/lz/options.c | 141 + tools/lz/output.c | 146 + tools/lz/packing.c | 56 + tools/lz/proto.h | 107 + tools/lz/repcomp.c | 63 + tools/lz/spcomp.c | 141 + tools/lz/uncomp.c | 92 + tools/lz/util.c | 54 + tools/make_patch.c | 471 + tools/palfix.py | 76 + tools/png.py | 2357 ++++ tools/png_dimensions.c | 23 + tools/pokemon_animation.c | 195 + tools/pokemon_animation_graphics.c | 171 + tools/rgb555.py | 38 + tools/scan_includes.c | 98 + tools/stadium.c | 203 + tools/sym_comments.py | 52 + tools/unique.py | 106 + vc/pokecrystal.constants.asm | 39 + vc/pokecrystal.patch.template | 699 ++ 4618 files changed, 480386 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 INSTALL.md create mode 100644 Makefile create mode 100644 README.md create mode 100644 audio.asm create mode 100644 audio/cries.asm create mode 100644 audio/cry_pointers.asm create mode 100644 audio/drumkits.asm create mode 100644 audio/engine.asm create mode 100644 audio/music/aftertherivalfight.asm create mode 100644 audio/music/azaleatown.asm create mode 100644 audio/music/battletowerlobby.asm create mode 100644 audio/music/battletowertheme.asm create mode 100644 audio/music/bicycle.asm create mode 100644 audio/music/buenaspassword.asm create mode 100644 audio/music/bugcatchingcontest.asm create mode 100644 audio/music/burnedtower.asm create mode 100644 audio/music/celadoncity.asm create mode 100644 audio/music/championbattle.asm create mode 100644 audio/music/cherrygrovecity.asm create mode 100644 audio/music/clair.asm create mode 100644 audio/music/contestresults.asm create mode 100644 audio/music/credits.asm create mode 100644 audio/music/crystalopening.asm create mode 100644 audio/music/dancinghall.asm create mode 100644 audio/music/darkcave.asm create mode 100644 audio/music/dragonsden.asm create mode 100644 audio/music/ecruteakcity.asm create mode 100644 audio/music/elmslab.asm create mode 100644 audio/music/evolution.asm create mode 100644 audio/music/gamecorner.asm create mode 100644 audio/music/goldenrodcity.asm create mode 100644 audio/music/goldsilveropening.asm create mode 100644 audio/music/goldsilveropening2.asm create mode 100644 audio/music/gym.asm create mode 100644 audio/music/gymleadervictory.asm create mode 100644 audio/music/halloffame.asm create mode 100644 audio/music/healpokemon.asm create mode 100644 audio/music/indigoplateau.asm create mode 100644 audio/music/johtogymbattle.asm create mode 100644 audio/music/johtotrainerbattle.asm create mode 100644 audio/music/johtowildbattle.asm create mode 100644 audio/music/johtowildbattlenight.asm create mode 100644 audio/music/kantogymbattle.asm create mode 100644 audio/music/kantotrainerbattle.asm create mode 100644 audio/music/kantowildbattle.asm create mode 100644 audio/music/lakeofrage.asm create mode 100644 audio/music/lakeofragerocketradio.asm create mode 100644 audio/music/lavendertown.asm create mode 100644 audio/music/lighthouse.asm create mode 100644 audio/music/lookbeauty.asm create mode 100644 audio/music/lookhiker.asm create mode 100644 audio/music/lookkimonogirl.asm create mode 100644 audio/music/looklass.asm create mode 100644 audio/music/lookmysticalman.asm create mode 100644 audio/music/lookofficer.asm create mode 100644 audio/music/lookpokemaniac.asm create mode 100644 audio/music/lookrival.asm create mode 100644 audio/music/lookrocket.asm create mode 100644 audio/music/looksage.asm create mode 100644 audio/music/lookyoungster.asm create mode 100644 audio/music/magnettrain.asm create mode 100644 audio/music/mainmenu.asm create mode 100644 audio/music/mobileadapter.asm create mode 100644 audio/music/mobileadaptermenu.asm create mode 100644 audio/music/mobilecenter.asm create mode 100644 audio/music/mom.asm create mode 100644 audio/music/mtmoon.asm create mode 100644 audio/music/mtmoonsquare.asm create mode 100644 audio/music/nationalpark.asm create mode 100644 audio/music/newbarktown.asm create mode 100644 audio/music/nothing.asm create mode 100644 audio/music/pallettown.asm create mode 100644 audio/music/pokeflutechannel.asm create mode 100644 audio/music/pokemoncenter.asm create mode 100644 audio/music/pokemonchannel.asm create mode 100644 audio/music/pokemonlullaby.asm create mode 100644 audio/music/pokemonmarch.asm create mode 100644 audio/music/postcredits.asm create mode 100644 audio/music/printer.asm create mode 100644 audio/music/profoak.asm create mode 100644 audio/music/profoakspokemontalk.asm create mode 100644 audio/music/rivalbattle.asm create mode 100644 audio/music/rocketbattle.asm create mode 100644 audio/music/rockethideout.asm create mode 100644 audio/music/rockettheme.asm create mode 100644 audio/music/route1.asm create mode 100644 audio/music/route12.asm create mode 100644 audio/music/route2.asm create mode 100644 audio/music/route26.asm create mode 100644 audio/music/route29.asm create mode 100644 audio/music/route3.asm create mode 100644 audio/music/route30.asm create mode 100644 audio/music/route36.asm create mode 100644 audio/music/route37.asm create mode 100644 audio/music/ruinsofalphinterior.asm create mode 100644 audio/music/ruinsofalphradio.asm create mode 100644 audio/music/showmearound.asm create mode 100644 audio/music/sprouttower.asm create mode 100644 audio/music/ssaqua.asm create mode 100644 audio/music/successfulcapture.asm create mode 100644 audio/music/suicunebattle.asm create mode 100644 audio/music/surf.asm create mode 100644 audio/music/tintower.asm create mode 100644 audio/music/titlescreen.asm create mode 100644 audio/music/trainervictory.asm create mode 100644 audio/music/unioncave.asm create mode 100644 audio/music/vermilioncity.asm create mode 100644 audio/music/victoryroad.asm create mode 100644 audio/music/violetcity.asm create mode 100644 audio/music/viridiancity.asm create mode 100644 audio/music/wildpokemonvictory.asm create mode 100644 audio/music_pointers.asm create mode 100644 audio/notes.asm create mode 100644 audio/sfx.asm create mode 100644 audio/sfx_crystal.asm create mode 100644 audio/sfx_pointers.asm create mode 100644 audio/wave_samples.asm create mode 100644 charmap.asm create mode 100644 constants/16_bit_locking_constants.asm create mode 100644 constants/16_bit_translation_constants.asm create mode 100644 constants/audio_constants.asm create mode 100644 constants/battle_anim_constants.asm create mode 100644 constants/battle_constants.asm create mode 100644 constants/battle_tower_constants.asm create mode 100644 constants/collision_constants.asm create mode 100644 constants/credits_constants.asm create mode 100644 constants/cry_constants.asm create mode 100644 constants/deco_constants.asm create mode 100644 constants/engine_flags.asm create mode 100644 constants/event_flags.asm create mode 100644 constants/gfx_constants.asm create mode 100644 constants/hardware_constants.asm create mode 100644 constants/icon_constants.asm create mode 100644 constants/input_constants.asm create mode 100644 constants/item_constants.asm create mode 100644 constants/item_data_constants.asm create mode 100644 constants/landmark_constants.asm create mode 100644 constants/map_constants.asm create mode 100644 constants/map_data_constants.asm create mode 100644 constants/map_object_constants.asm create mode 100644 constants/map_setup_constants.asm create mode 100644 constants/mart_constants.asm create mode 100644 constants/menu_constants.asm create mode 100644 constants/misc_constants.asm create mode 100644 constants/mobile_constants.asm create mode 100644 constants/move_constants.asm create mode 100644 constants/move_effect_constants.asm create mode 100644 constants/music_constants.asm create mode 100644 constants/npc_trade_constants.asm create mode 100644 constants/phone_constants.asm create mode 100644 constants/pokemon_constants.asm create mode 100644 constants/pokemon_data_constants.asm create mode 100644 constants/printer_constants.asm create mode 100644 constants/radio_constants.asm create mode 100644 constants/scgb_constants.asm create mode 100644 constants/script_constants.asm create mode 100644 constants/serial_constants.asm create mode 100644 constants/sfx_constants.asm create mode 100644 constants/sprite_anim_constants.asm create mode 100644 constants/sprite_constants.asm create mode 100644 constants/sprite_data_constants.asm create mode 100644 constants/text_constants.asm create mode 100644 constants/tileset_constants.asm create mode 100644 constants/trainer_constants.asm create mode 100644 constants/trainer_data_constants.asm create mode 100644 constants/type_constants.asm create mode 100644 constants/wram_constants.asm create mode 100644 data/battle/accuracy_multipliers.asm create mode 100644 data/battle/ai/constant_damage_effects.asm create mode 100644 data/battle/ai/encore_moves.asm create mode 100644 data/battle/ai/rain_dance_moves.asm create mode 100644 data/battle/ai/reckless_moves.asm create mode 100644 data/battle/ai/residual_moves.asm create mode 100644 data/battle/ai/risky_effects.asm create mode 100644 data/battle/ai/stall_moves.asm create mode 100644 data/battle/ai/status_only_effects.asm create mode 100644 data/battle/ai/sunny_day_moves.asm create mode 100644 data/battle/ai/useful_moves.asm create mode 100644 data/battle/critical_hit_chances.asm create mode 100644 data/battle/effect_command_pointers.asm create mode 100644 data/battle/held_consumables.asm create mode 100644 data/battle/held_heal_status.asm create mode 100644 data/battle/held_stat_up.asm create mode 100644 data/battle/stat_multipliers.asm create mode 100644 data/battle/stat_multipliers_2.asm create mode 100644 data/battle/stat_names.asm create mode 100644 data/battle/weather_modifiers.asm create mode 100644 data/battle/wobble_probabilities.asm create mode 100644 data/battle_anims/ball_colors.asm create mode 100644 data/battle_anims/framesets.asm create mode 100644 data/battle_anims/oam.asm create mode 100644 data/battle_anims/object_gfx.asm create mode 100644 data/battle_anims/objects.asm create mode 100644 data/battle_tower/classes.asm create mode 100644 data/battle_tower/parties.asm create mode 100644 data/battle_tower/trainer_text.asm create mode 100644 data/battle_tower/unknown.asm create mode 100644 data/battle_tower/unknown_levels.asm create mode 100644 data/collision/collision_permissions.asm create mode 100644 data/collision/collision_stdscripts.asm create mode 100644 data/collision/field_move_blocks.asm create mode 100644 data/credits_script.asm create mode 100644 data/credits_strings.asm create mode 100644 data/decorations/attributes.asm create mode 100644 data/decorations/decorations.asm create mode 100644 data/decorations/mystery_gift_decos.asm create mode 100644 data/decorations/names.asm create mode 100644 data/default_options.asm create mode 100644 data/events/bug_contest_flags.asm create mode 100644 data/events/bug_contest_winners.asm create mode 100644 data/events/elevator_floors.asm create mode 100644 data/events/engine_flags.asm create mode 100644 data/events/happiness_changes.asm create mode 100644 data/events/happiness_probabilities.asm create mode 100644 data/events/magikarp_lengths.asm create mode 100644 data/events/npc_trades.asm create mode 100644 data/events/odd_eggs.asm create mode 100644 data/events/pokedex_ratings.asm create mode 100644 data/events/special_pointers.asm create mode 100644 data/events/unown_walls.asm create mode 100644 data/growth_rates.asm create mode 100644 data/icon_pointers.asm create mode 100644 data/items/apricorn_balls.asm create mode 100644 data/items/attributes.asm create mode 100644 data/items/bargain_shop.asm create mode 100644 data/items/buena_prizes.asm create mode 100644 data/items/catch_rate_items.asm create mode 100644 data/items/descriptions.asm create mode 100644 data/items/fruit_trees.asm create mode 100644 data/items/heal_hp.asm create mode 100644 data/items/heal_status.asm create mode 100644 data/items/mail_items.asm create mode 100644 data/items/marts.asm create mode 100644 data/items/mom_phone.asm create mode 100644 data/items/mystery_gift_items.asm create mode 100644 data/items/names.asm create mode 100644 data/items/pocket_names.asm create mode 100644 data/items/rooftop_sale.asm create mode 100644 data/items/x_stats.asm create mode 100644 data/maps/attributes.asm create mode 100644 data/maps/blocks.asm create mode 100644 data/maps/environment_colors.asm create mode 100644 data/maps/flypoints.asm create mode 100644 data/maps/landmarks.asm create mode 100644 data/maps/map_data.asm create mode 100644 data/maps/maps.asm create mode 100644 data/maps/outdoor_sprites.asm create mode 100644 data/maps/roofs.asm create mode 100644 data/maps/scenes.asm create mode 100644 data/maps/scripts.asm create mode 100644 data/maps/setup_script_pointers.asm create mode 100644 data/maps/setup_scripts.asm create mode 100644 data/maps/sgb_roof_pal_inds.asm create mode 100644 data/maps/spawn_points.asm create mode 100644 data/mon_menu.asm create mode 100644 data/moves/animations.asm create mode 100644 data/moves/critical_hit_moves.asm create mode 100644 data/moves/descriptions.asm create mode 100644 data/moves/effects.asm create mode 100644 data/moves/effects_pointers.asm create mode 100644 data/moves/effects_priorities.asm create mode 100644 data/moves/flail_reversal_power.asm create mode 100644 data/moves/magnitude_power.asm create mode 100644 data/moves/metronome_exception_moves.asm create mode 100644 data/moves/moves.asm create mode 100644 data/moves/names.asm create mode 100644 data/moves/present_power.asm create mode 100644 data/moves/tmhm_moves.asm create mode 100644 data/party_menu_qualities.asm create mode 100644 data/phone/non_trainer_names.asm create mode 100644 data/phone/permanent_numbers.asm create mode 100644 data/phone/phone_contacts.asm create mode 100644 data/phone/special_calls.asm create mode 100644 data/phone/text/alan_callee.asm create mode 100644 data/phone/text/alan_caller.asm create mode 100644 data/phone/text/alan_overworld.asm create mode 100644 data/phone/text/anthony_callee.asm create mode 100644 data/phone/text/anthony_caller.asm create mode 100644 data/phone/text/anthony_overworld.asm create mode 100644 data/phone/text/arnie_callee.asm create mode 100644 data/phone/text/arnie_caller.asm create mode 100644 data/phone/text/arnie_overworld.asm create mode 100644 data/phone/text/beth_callee.asm create mode 100644 data/phone/text/beth_caller.asm create mode 100644 data/phone/text/beth_overworld.asm create mode 100644 data/phone/text/beverly_callee.asm create mode 100644 data/phone/text/beverly_caller.asm create mode 100644 data/phone/text/beverly_overworld.asm create mode 100644 data/phone/text/bike_shop.asm create mode 100644 data/phone/text/bill.asm create mode 100644 data/phone/text/brent_callee.asm create mode 100644 data/phone/text/brent_caller.asm create mode 100644 data/phone/text/brent_overworld.asm create mode 100644 data/phone/text/buena.asm create mode 100644 data/phone/text/chad_callee.asm create mode 100644 data/phone/text/chad_caller.asm create mode 100644 data/phone/text/chad_overworld.asm create mode 100644 data/phone/text/dana_callee.asm create mode 100644 data/phone/text/dana_caller.asm create mode 100644 data/phone/text/dana_overworld.asm create mode 100644 data/phone/text/derek_callee.asm create mode 100644 data/phone/text/derek_caller.asm create mode 100644 data/phone/text/derek_overworld.asm create mode 100644 data/phone/text/elm.asm create mode 100644 data/phone/text/erin_callee.asm create mode 100644 data/phone/text/erin_caller.asm create mode 100644 data/phone/text/erin_overworld.asm create mode 100644 data/phone/text/gaven_callee.asm create mode 100644 data/phone/text/gaven_caller.asm create mode 100644 data/phone/text/gaven_overworld.asm create mode 100644 data/phone/text/gina_callee.asm create mode 100644 data/phone/text/gina_caller.asm create mode 100644 data/phone/text/gina_overworld.asm create mode 100644 data/phone/text/huey_callee.asm create mode 100644 data/phone/text/huey_caller.asm create mode 100644 data/phone/text/huey_overworld.asm create mode 100644 data/phone/text/irwin_callee.asm create mode 100644 data/phone/text/irwin_caller.asm create mode 100644 data/phone/text/irwin_overworld.asm create mode 100644 data/phone/text/jack_callee.asm create mode 100644 data/phone/text/jack_caller.asm create mode 100644 data/phone/text/jack_overworld.asm create mode 100644 data/phone/text/joey_callee.asm create mode 100644 data/phone/text/joey_caller.asm create mode 100644 data/phone/text/joey_overworld.asm create mode 100644 data/phone/text/jose_callee.asm create mode 100644 data/phone/text/jose_caller.asm create mode 100644 data/phone/text/jose_overworld.asm create mode 100644 data/phone/text/kenji_callee.asm create mode 100644 data/phone/text/kenji_caller.asm create mode 100644 data/phone/text/kenji_overworld.asm create mode 100644 data/phone/text/liz_callee.asm create mode 100644 data/phone/text/liz_caller.asm create mode 100644 data/phone/text/liz_overworld.asm create mode 100644 data/phone/text/mom.asm create mode 100644 data/phone/text/parry_callee.asm create mode 100644 data/phone/text/parry_caller.asm create mode 100644 data/phone/text/parry_overworld.asm create mode 100644 data/phone/text/ralph_callee.asm create mode 100644 data/phone/text/ralph_caller.asm create mode 100644 data/phone/text/ralph_overworld.asm create mode 100644 data/phone/text/reena_callee.asm create mode 100644 data/phone/text/reena_caller.asm create mode 100644 data/phone/text/reena_overworld.asm create mode 100644 data/phone/text/tiffany_callee.asm create mode 100644 data/phone/text/tiffany_caller.asm create mode 100644 data/phone/text/tiffany_overworld.asm create mode 100644 data/phone/text/todd_callee.asm create mode 100644 data/phone/text/todd_caller.asm create mode 100644 data/phone/text/todd_overworld.asm create mode 100644 data/phone/text/tully_callee.asm create mode 100644 data/phone/text/tully_caller.asm create mode 100644 data/phone/text/tully_overworld.asm create mode 100644 data/phone/text/unknown_callee.asm create mode 100644 data/phone/text/unused.asm create mode 100644 data/phone/text/vance_callee.asm create mode 100644 data/phone/text/vance_caller.asm create mode 100644 data/phone/text/vance_overworld.asm create mode 100644 data/phone/text/wade_callee.asm create mode 100644 data/phone/text/wade_caller.asm create mode 100644 data/phone/text/wade_overworld.asm create mode 100644 data/phone/text/wilton_callee.asm create mode 100644 data/phone/text/wilton_caller.asm create mode 100644 data/phone/text/wilton_overworld.asm create mode 100644 data/player_names.asm create mode 100644 data/pokemon/base_stats.asm create mode 100644 data/pokemon/base_stats/abra.asm create mode 100644 data/pokemon/base_stats/aerodactyl.asm create mode 100644 data/pokemon/base_stats/aipom.asm create mode 100644 data/pokemon/base_stats/alakazam.asm create mode 100644 data/pokemon/base_stats/ampharos.asm create mode 100644 data/pokemon/base_stats/arbok.asm create mode 100644 data/pokemon/base_stats/arcanine.asm create mode 100644 data/pokemon/base_stats/ariados.asm create mode 100644 data/pokemon/base_stats/articuno.asm create mode 100644 data/pokemon/base_stats/azumarill.asm create mode 100644 data/pokemon/base_stats/bayleef.asm create mode 100644 data/pokemon/base_stats/beedrill.asm create mode 100644 data/pokemon/base_stats/bellossom.asm create mode 100644 data/pokemon/base_stats/bellsprout.asm create mode 100644 data/pokemon/base_stats/blastoise.asm create mode 100644 data/pokemon/base_stats/blissey.asm create mode 100644 data/pokemon/base_stats/bulbasaur.asm create mode 100644 data/pokemon/base_stats/butterfree.asm create mode 100644 data/pokemon/base_stats/caterpie.asm create mode 100644 data/pokemon/base_stats/celebi.asm create mode 100644 data/pokemon/base_stats/chansey.asm create mode 100644 data/pokemon/base_stats/charizard.asm create mode 100644 data/pokemon/base_stats/charmander.asm create mode 100644 data/pokemon/base_stats/charmeleon.asm create mode 100644 data/pokemon/base_stats/chikorita.asm create mode 100644 data/pokemon/base_stats/chinchou.asm create mode 100644 data/pokemon/base_stats/clefable.asm create mode 100644 data/pokemon/base_stats/clefairy.asm create mode 100644 data/pokemon/base_stats/cleffa.asm create mode 100644 data/pokemon/base_stats/cloyster.asm create mode 100644 data/pokemon/base_stats/corsola.asm create mode 100644 data/pokemon/base_stats/crobat.asm create mode 100644 data/pokemon/base_stats/croconaw.asm create mode 100644 data/pokemon/base_stats/cubone.asm create mode 100644 data/pokemon/base_stats/cyndaquil.asm create mode 100644 data/pokemon/base_stats/delibird.asm create mode 100644 data/pokemon/base_stats/dewgong.asm create mode 100644 data/pokemon/base_stats/diglett.asm create mode 100644 data/pokemon/base_stats/ditto.asm create mode 100644 data/pokemon/base_stats/dodrio.asm create mode 100644 data/pokemon/base_stats/doduo.asm create mode 100644 data/pokemon/base_stats/donphan.asm create mode 100644 data/pokemon/base_stats/dragonair.asm create mode 100644 data/pokemon/base_stats/dragonite.asm create mode 100644 data/pokemon/base_stats/dratini.asm create mode 100644 data/pokemon/base_stats/drowzee.asm create mode 100644 data/pokemon/base_stats/dugtrio.asm create mode 100644 data/pokemon/base_stats/dunsparce.asm create mode 100644 data/pokemon/base_stats/eevee.asm create mode 100644 data/pokemon/base_stats/ekans.asm create mode 100644 data/pokemon/base_stats/electabuzz.asm create mode 100644 data/pokemon/base_stats/electrode.asm create mode 100644 data/pokemon/base_stats/elekid.asm create mode 100644 data/pokemon/base_stats/entei.asm create mode 100644 data/pokemon/base_stats/espeon.asm create mode 100644 data/pokemon/base_stats/exeggcute.asm create mode 100644 data/pokemon/base_stats/exeggutor.asm create mode 100644 data/pokemon/base_stats/farfetch_d.asm create mode 100644 data/pokemon/base_stats/fearow.asm create mode 100644 data/pokemon/base_stats/feraligatr.asm create mode 100644 data/pokemon/base_stats/flaaffy.asm create mode 100644 data/pokemon/base_stats/flareon.asm create mode 100644 data/pokemon/base_stats/forretress.asm create mode 100644 data/pokemon/base_stats/furret.asm create mode 100644 data/pokemon/base_stats/gastly.asm create mode 100644 data/pokemon/base_stats/gengar.asm create mode 100644 data/pokemon/base_stats/geodude.asm create mode 100644 data/pokemon/base_stats/girafarig.asm create mode 100644 data/pokemon/base_stats/gligar.asm create mode 100644 data/pokemon/base_stats/gloom.asm create mode 100644 data/pokemon/base_stats/golbat.asm create mode 100644 data/pokemon/base_stats/goldeen.asm create mode 100644 data/pokemon/base_stats/golduck.asm create mode 100644 data/pokemon/base_stats/golem.asm create mode 100644 data/pokemon/base_stats/granbull.asm create mode 100644 data/pokemon/base_stats/graveler.asm create mode 100644 data/pokemon/base_stats/grimer.asm create mode 100644 data/pokemon/base_stats/growlithe.asm create mode 100644 data/pokemon/base_stats/gyarados.asm create mode 100644 data/pokemon/base_stats/haunter.asm create mode 100644 data/pokemon/base_stats/heracross.asm create mode 100644 data/pokemon/base_stats/hitmonchan.asm create mode 100644 data/pokemon/base_stats/hitmonlee.asm create mode 100644 data/pokemon/base_stats/hitmontop.asm create mode 100644 data/pokemon/base_stats/ho_oh.asm create mode 100644 data/pokemon/base_stats/hoothoot.asm create mode 100644 data/pokemon/base_stats/hoppip.asm create mode 100644 data/pokemon/base_stats/horsea.asm create mode 100644 data/pokemon/base_stats/houndoom.asm create mode 100644 data/pokemon/base_stats/houndour.asm create mode 100644 data/pokemon/base_stats/hypno.asm create mode 100644 data/pokemon/base_stats/igglybuff.asm create mode 100644 data/pokemon/base_stats/ivysaur.asm create mode 100644 data/pokemon/base_stats/jigglypuff.asm create mode 100644 data/pokemon/base_stats/jolteon.asm create mode 100644 data/pokemon/base_stats/jumpluff.asm create mode 100644 data/pokemon/base_stats/jynx.asm create mode 100644 data/pokemon/base_stats/kabuto.asm create mode 100644 data/pokemon/base_stats/kabutops.asm create mode 100644 data/pokemon/base_stats/kadabra.asm create mode 100644 data/pokemon/base_stats/kakuna.asm create mode 100644 data/pokemon/base_stats/kangaskhan.asm create mode 100644 data/pokemon/base_stats/kingdra.asm create mode 100644 data/pokemon/base_stats/kingler.asm create mode 100644 data/pokemon/base_stats/koffing.asm create mode 100644 data/pokemon/base_stats/krabby.asm create mode 100644 data/pokemon/base_stats/lanturn.asm create mode 100644 data/pokemon/base_stats/lapras.asm create mode 100644 data/pokemon/base_stats/larvitar.asm create mode 100644 data/pokemon/base_stats/ledian.asm create mode 100644 data/pokemon/base_stats/ledyba.asm create mode 100644 data/pokemon/base_stats/lickitung.asm create mode 100644 data/pokemon/base_stats/lugia.asm create mode 100644 data/pokemon/base_stats/machamp.asm create mode 100644 data/pokemon/base_stats/machoke.asm create mode 100644 data/pokemon/base_stats/machop.asm create mode 100644 data/pokemon/base_stats/magby.asm create mode 100644 data/pokemon/base_stats/magcargo.asm create mode 100644 data/pokemon/base_stats/magikarp.asm create mode 100644 data/pokemon/base_stats/magmar.asm create mode 100644 data/pokemon/base_stats/magnemite.asm create mode 100644 data/pokemon/base_stats/magneton.asm create mode 100644 data/pokemon/base_stats/mankey.asm create mode 100644 data/pokemon/base_stats/mantine.asm create mode 100644 data/pokemon/base_stats/mareep.asm create mode 100644 data/pokemon/base_stats/marill.asm create mode 100644 data/pokemon/base_stats/marowak.asm create mode 100644 data/pokemon/base_stats/meganium.asm create mode 100644 data/pokemon/base_stats/meowth.asm create mode 100644 data/pokemon/base_stats/metapod.asm create mode 100644 data/pokemon/base_stats/mew.asm create mode 100644 data/pokemon/base_stats/mewtwo.asm create mode 100644 data/pokemon/base_stats/miltank.asm create mode 100644 data/pokemon/base_stats/misdreavus.asm create mode 100644 data/pokemon/base_stats/moltres.asm create mode 100644 data/pokemon/base_stats/mr__mime.asm create mode 100644 data/pokemon/base_stats/muk.asm create mode 100644 data/pokemon/base_stats/murkrow.asm create mode 100644 data/pokemon/base_stats/natu.asm create mode 100644 data/pokemon/base_stats/nidoking.asm create mode 100644 data/pokemon/base_stats/nidoqueen.asm create mode 100644 data/pokemon/base_stats/nidoran_f.asm create mode 100644 data/pokemon/base_stats/nidoran_m.asm create mode 100644 data/pokemon/base_stats/nidorina.asm create mode 100644 data/pokemon/base_stats/nidorino.asm create mode 100644 data/pokemon/base_stats/ninetales.asm create mode 100644 data/pokemon/base_stats/noctowl.asm create mode 100644 data/pokemon/base_stats/octillery.asm create mode 100644 data/pokemon/base_stats/oddish.asm create mode 100644 data/pokemon/base_stats/omanyte.asm create mode 100644 data/pokemon/base_stats/omastar.asm create mode 100644 data/pokemon/base_stats/onix.asm create mode 100644 data/pokemon/base_stats/paras.asm create mode 100644 data/pokemon/base_stats/parasect.asm create mode 100644 data/pokemon/base_stats/persian.asm create mode 100644 data/pokemon/base_stats/phanpy.asm create mode 100644 data/pokemon/base_stats/pichu.asm create mode 100644 data/pokemon/base_stats/pidgeot.asm create mode 100644 data/pokemon/base_stats/pidgeotto.asm create mode 100644 data/pokemon/base_stats/pidgey.asm create mode 100644 data/pokemon/base_stats/pikachu.asm create mode 100644 data/pokemon/base_stats/piloswine.asm create mode 100644 data/pokemon/base_stats/pineco.asm create mode 100644 data/pokemon/base_stats/pinsir.asm create mode 100644 data/pokemon/base_stats/politoed.asm create mode 100644 data/pokemon/base_stats/poliwag.asm create mode 100644 data/pokemon/base_stats/poliwhirl.asm create mode 100644 data/pokemon/base_stats/poliwrath.asm create mode 100644 data/pokemon/base_stats/ponyta.asm create mode 100644 data/pokemon/base_stats/porygon.asm create mode 100644 data/pokemon/base_stats/porygon2.asm create mode 100644 data/pokemon/base_stats/primeape.asm create mode 100644 data/pokemon/base_stats/psyduck.asm create mode 100644 data/pokemon/base_stats/pupitar.asm create mode 100644 data/pokemon/base_stats/quagsire.asm create mode 100644 data/pokemon/base_stats/quilava.asm create mode 100644 data/pokemon/base_stats/qwilfish.asm create mode 100644 data/pokemon/base_stats/raichu.asm create mode 100644 data/pokemon/base_stats/raikou.asm create mode 100644 data/pokemon/base_stats/rapidash.asm create mode 100644 data/pokemon/base_stats/raticate.asm create mode 100644 data/pokemon/base_stats/rattata.asm create mode 100644 data/pokemon/base_stats/remoraid.asm create mode 100644 data/pokemon/base_stats/rhydon.asm create mode 100644 data/pokemon/base_stats/rhyhorn.asm create mode 100644 data/pokemon/base_stats/sandshrew.asm create mode 100644 data/pokemon/base_stats/sandslash.asm create mode 100644 data/pokemon/base_stats/scizor.asm create mode 100644 data/pokemon/base_stats/scyther.asm create mode 100644 data/pokemon/base_stats/seadra.asm create mode 100644 data/pokemon/base_stats/seaking.asm create mode 100644 data/pokemon/base_stats/seel.asm create mode 100644 data/pokemon/base_stats/sentret.asm create mode 100644 data/pokemon/base_stats/shellder.asm create mode 100644 data/pokemon/base_stats/shuckle.asm create mode 100644 data/pokemon/base_stats/skarmory.asm create mode 100644 data/pokemon/base_stats/skiploom.asm create mode 100644 data/pokemon/base_stats/slowbro.asm create mode 100644 data/pokemon/base_stats/slowking.asm create mode 100644 data/pokemon/base_stats/slowpoke.asm create mode 100644 data/pokemon/base_stats/slugma.asm create mode 100644 data/pokemon/base_stats/smeargle.asm create mode 100644 data/pokemon/base_stats/smoochum.asm create mode 100644 data/pokemon/base_stats/sneasel.asm create mode 100644 data/pokemon/base_stats/snorlax.asm create mode 100644 data/pokemon/base_stats/snubbull.asm create mode 100644 data/pokemon/base_stats/spearow.asm create mode 100644 data/pokemon/base_stats/spinarak.asm create mode 100644 data/pokemon/base_stats/squirtle.asm create mode 100644 data/pokemon/base_stats/stantler.asm create mode 100644 data/pokemon/base_stats/starmie.asm create mode 100644 data/pokemon/base_stats/staryu.asm create mode 100644 data/pokemon/base_stats/steelix.asm create mode 100644 data/pokemon/base_stats/sudowoodo.asm create mode 100644 data/pokemon/base_stats/suicune.asm create mode 100644 data/pokemon/base_stats/sunflora.asm create mode 100644 data/pokemon/base_stats/sunkern.asm create mode 100644 data/pokemon/base_stats/swinub.asm create mode 100644 data/pokemon/base_stats/tangela.asm create mode 100644 data/pokemon/base_stats/tauros.asm create mode 100644 data/pokemon/base_stats/teddiursa.asm create mode 100644 data/pokemon/base_stats/tentacool.asm create mode 100644 data/pokemon/base_stats/tentacruel.asm create mode 100644 data/pokemon/base_stats/togepi.asm create mode 100644 data/pokemon/base_stats/togetic.asm create mode 100644 data/pokemon/base_stats/totodile.asm create mode 100644 data/pokemon/base_stats/typhlosion.asm create mode 100644 data/pokemon/base_stats/tyranitar.asm create mode 100644 data/pokemon/base_stats/tyrogue.asm create mode 100644 data/pokemon/base_stats/umbreon.asm create mode 100644 data/pokemon/base_stats/unown.asm create mode 100644 data/pokemon/base_stats/ursaring.asm create mode 100644 data/pokemon/base_stats/vaporeon.asm create mode 100644 data/pokemon/base_stats/venomoth.asm create mode 100644 data/pokemon/base_stats/venonat.asm create mode 100644 data/pokemon/base_stats/venusaur.asm create mode 100644 data/pokemon/base_stats/victreebel.asm create mode 100644 data/pokemon/base_stats/vileplume.asm create mode 100644 data/pokemon/base_stats/voltorb.asm create mode 100644 data/pokemon/base_stats/vulpix.asm create mode 100644 data/pokemon/base_stats/wartortle.asm create mode 100644 data/pokemon/base_stats/weedle.asm create mode 100644 data/pokemon/base_stats/weepinbell.asm create mode 100644 data/pokemon/base_stats/weezing.asm create mode 100644 data/pokemon/base_stats/wigglytuff.asm create mode 100644 data/pokemon/base_stats/wobbuffet.asm create mode 100644 data/pokemon/base_stats/wooper.asm create mode 100644 data/pokemon/base_stats/xatu.asm create mode 100644 data/pokemon/base_stats/yanma.asm create mode 100644 data/pokemon/base_stats/zapdos.asm create mode 100644 data/pokemon/base_stats/zubat.asm create mode 100644 data/pokemon/cries.asm create mode 100644 data/pokemon/dex_entries.asm create mode 100644 data/pokemon/dex_entries/abra.asm create mode 100644 data/pokemon/dex_entries/aerodactyl.asm create mode 100644 data/pokemon/dex_entries/aipom.asm create mode 100644 data/pokemon/dex_entries/alakazam.asm create mode 100644 data/pokemon/dex_entries/ampharos.asm create mode 100644 data/pokemon/dex_entries/arbok.asm create mode 100644 data/pokemon/dex_entries/arcanine.asm create mode 100644 data/pokemon/dex_entries/ariados.asm create mode 100644 data/pokemon/dex_entries/articuno.asm create mode 100644 data/pokemon/dex_entries/azumarill.asm create mode 100644 data/pokemon/dex_entries/bayleef.asm create mode 100644 data/pokemon/dex_entries/beedrill.asm create mode 100644 data/pokemon/dex_entries/bellossom.asm create mode 100644 data/pokemon/dex_entries/bellsprout.asm create mode 100644 data/pokemon/dex_entries/blastoise.asm create mode 100644 data/pokemon/dex_entries/blissey.asm create mode 100644 data/pokemon/dex_entries/bulbasaur.asm create mode 100644 data/pokemon/dex_entries/butterfree.asm create mode 100644 data/pokemon/dex_entries/caterpie.asm create mode 100644 data/pokemon/dex_entries/celebi.asm create mode 100644 data/pokemon/dex_entries/chansey.asm create mode 100644 data/pokemon/dex_entries/charizard.asm create mode 100644 data/pokemon/dex_entries/charmander.asm create mode 100644 data/pokemon/dex_entries/charmeleon.asm create mode 100644 data/pokemon/dex_entries/chikorita.asm create mode 100644 data/pokemon/dex_entries/chinchou.asm create mode 100644 data/pokemon/dex_entries/clefable.asm create mode 100644 data/pokemon/dex_entries/clefairy.asm create mode 100644 data/pokemon/dex_entries/cleffa.asm create mode 100644 data/pokemon/dex_entries/cloyster.asm create mode 100644 data/pokemon/dex_entries/corsola.asm create mode 100644 data/pokemon/dex_entries/crobat.asm create mode 100644 data/pokemon/dex_entries/croconaw.asm create mode 100644 data/pokemon/dex_entries/cubone.asm create mode 100644 data/pokemon/dex_entries/cyndaquil.asm create mode 100644 data/pokemon/dex_entries/delibird.asm create mode 100644 data/pokemon/dex_entries/dewgong.asm create mode 100644 data/pokemon/dex_entries/diglett.asm create mode 100644 data/pokemon/dex_entries/ditto.asm create mode 100644 data/pokemon/dex_entries/dodrio.asm create mode 100644 data/pokemon/dex_entries/doduo.asm create mode 100644 data/pokemon/dex_entries/donphan.asm create mode 100644 data/pokemon/dex_entries/dragonair.asm create mode 100644 data/pokemon/dex_entries/dragonite.asm create mode 100644 data/pokemon/dex_entries/dratini.asm create mode 100644 data/pokemon/dex_entries/drowzee.asm create mode 100644 data/pokemon/dex_entries/dugtrio.asm create mode 100644 data/pokemon/dex_entries/dunsparce.asm create mode 100644 data/pokemon/dex_entries/eevee.asm create mode 100644 data/pokemon/dex_entries/ekans.asm create mode 100644 data/pokemon/dex_entries/electabuzz.asm create mode 100644 data/pokemon/dex_entries/electrode.asm create mode 100644 data/pokemon/dex_entries/elekid.asm create mode 100644 data/pokemon/dex_entries/entei.asm create mode 100644 data/pokemon/dex_entries/espeon.asm create mode 100644 data/pokemon/dex_entries/exeggcute.asm create mode 100644 data/pokemon/dex_entries/exeggutor.asm create mode 100644 data/pokemon/dex_entries/farfetch_d.asm create mode 100644 data/pokemon/dex_entries/fearow.asm create mode 100644 data/pokemon/dex_entries/feraligatr.asm create mode 100644 data/pokemon/dex_entries/flaaffy.asm create mode 100644 data/pokemon/dex_entries/flareon.asm create mode 100644 data/pokemon/dex_entries/forretress.asm create mode 100644 data/pokemon/dex_entries/furret.asm create mode 100644 data/pokemon/dex_entries/gastly.asm create mode 100644 data/pokemon/dex_entries/gengar.asm create mode 100644 data/pokemon/dex_entries/geodude.asm create mode 100644 data/pokemon/dex_entries/girafarig.asm create mode 100644 data/pokemon/dex_entries/gligar.asm create mode 100644 data/pokemon/dex_entries/gloom.asm create mode 100644 data/pokemon/dex_entries/golbat.asm create mode 100644 data/pokemon/dex_entries/goldeen.asm create mode 100644 data/pokemon/dex_entries/golduck.asm create mode 100644 data/pokemon/dex_entries/golem.asm create mode 100644 data/pokemon/dex_entries/granbull.asm create mode 100644 data/pokemon/dex_entries/graveler.asm create mode 100644 data/pokemon/dex_entries/grimer.asm create mode 100644 data/pokemon/dex_entries/growlithe.asm create mode 100644 data/pokemon/dex_entries/gyarados.asm create mode 100644 data/pokemon/dex_entries/haunter.asm create mode 100644 data/pokemon/dex_entries/heracross.asm create mode 100644 data/pokemon/dex_entries/hitmonchan.asm create mode 100644 data/pokemon/dex_entries/hitmonlee.asm create mode 100644 data/pokemon/dex_entries/hitmontop.asm create mode 100644 data/pokemon/dex_entries/ho_oh.asm create mode 100644 data/pokemon/dex_entries/hoothoot.asm create mode 100644 data/pokemon/dex_entries/hoppip.asm create mode 100644 data/pokemon/dex_entries/horsea.asm create mode 100644 data/pokemon/dex_entries/houndoom.asm create mode 100644 data/pokemon/dex_entries/houndour.asm create mode 100644 data/pokemon/dex_entries/hypno.asm create mode 100644 data/pokemon/dex_entries/igglybuff.asm create mode 100644 data/pokemon/dex_entries/ivysaur.asm create mode 100644 data/pokemon/dex_entries/jigglypuff.asm create mode 100644 data/pokemon/dex_entries/jolteon.asm create mode 100644 data/pokemon/dex_entries/jumpluff.asm create mode 100644 data/pokemon/dex_entries/jynx.asm create mode 100644 data/pokemon/dex_entries/kabuto.asm create mode 100644 data/pokemon/dex_entries/kabutops.asm create mode 100644 data/pokemon/dex_entries/kadabra.asm create mode 100644 data/pokemon/dex_entries/kakuna.asm create mode 100644 data/pokemon/dex_entries/kangaskhan.asm create mode 100644 data/pokemon/dex_entries/kingdra.asm create mode 100644 data/pokemon/dex_entries/kingler.asm create mode 100644 data/pokemon/dex_entries/koffing.asm create mode 100644 data/pokemon/dex_entries/krabby.asm create mode 100644 data/pokemon/dex_entries/lanturn.asm create mode 100644 data/pokemon/dex_entries/lapras.asm create mode 100644 data/pokemon/dex_entries/larvitar.asm create mode 100644 data/pokemon/dex_entries/ledian.asm create mode 100644 data/pokemon/dex_entries/ledyba.asm create mode 100644 data/pokemon/dex_entries/lickitung.asm create mode 100644 data/pokemon/dex_entries/lugia.asm create mode 100644 data/pokemon/dex_entries/machamp.asm create mode 100644 data/pokemon/dex_entries/machoke.asm create mode 100644 data/pokemon/dex_entries/machop.asm create mode 100644 data/pokemon/dex_entries/magby.asm create mode 100644 data/pokemon/dex_entries/magcargo.asm create mode 100644 data/pokemon/dex_entries/magikarp.asm create mode 100644 data/pokemon/dex_entries/magmar.asm create mode 100644 data/pokemon/dex_entries/magnemite.asm create mode 100644 data/pokemon/dex_entries/magneton.asm create mode 100644 data/pokemon/dex_entries/mankey.asm create mode 100644 data/pokemon/dex_entries/mantine.asm create mode 100644 data/pokemon/dex_entries/mareep.asm create mode 100644 data/pokemon/dex_entries/marill.asm create mode 100644 data/pokemon/dex_entries/marowak.asm create mode 100644 data/pokemon/dex_entries/meganium.asm create mode 100644 data/pokemon/dex_entries/meowth.asm create mode 100644 data/pokemon/dex_entries/metapod.asm create mode 100644 data/pokemon/dex_entries/mew.asm create mode 100644 data/pokemon/dex_entries/mewtwo.asm create mode 100644 data/pokemon/dex_entries/miltank.asm create mode 100644 data/pokemon/dex_entries/misdreavus.asm create mode 100644 data/pokemon/dex_entries/moltres.asm create mode 100644 data/pokemon/dex_entries/mr__mime.asm create mode 100644 data/pokemon/dex_entries/muk.asm create mode 100644 data/pokemon/dex_entries/murkrow.asm create mode 100644 data/pokemon/dex_entries/natu.asm create mode 100644 data/pokemon/dex_entries/nidoking.asm create mode 100644 data/pokemon/dex_entries/nidoqueen.asm create mode 100644 data/pokemon/dex_entries/nidoran_f.asm create mode 100644 data/pokemon/dex_entries/nidoran_m.asm create mode 100644 data/pokemon/dex_entries/nidorina.asm create mode 100644 data/pokemon/dex_entries/nidorino.asm create mode 100644 data/pokemon/dex_entries/ninetales.asm create mode 100644 data/pokemon/dex_entries/noctowl.asm create mode 100644 data/pokemon/dex_entries/octillery.asm create mode 100644 data/pokemon/dex_entries/oddish.asm create mode 100644 data/pokemon/dex_entries/omanyte.asm create mode 100644 data/pokemon/dex_entries/omastar.asm create mode 100644 data/pokemon/dex_entries/onix.asm create mode 100644 data/pokemon/dex_entries/paras.asm create mode 100644 data/pokemon/dex_entries/parasect.asm create mode 100644 data/pokemon/dex_entries/persian.asm create mode 100644 data/pokemon/dex_entries/phanpy.asm create mode 100644 data/pokemon/dex_entries/pichu.asm create mode 100644 data/pokemon/dex_entries/pidgeot.asm create mode 100644 data/pokemon/dex_entries/pidgeotto.asm create mode 100644 data/pokemon/dex_entries/pidgey.asm create mode 100644 data/pokemon/dex_entries/pikachu.asm create mode 100644 data/pokemon/dex_entries/piloswine.asm create mode 100644 data/pokemon/dex_entries/pineco.asm create mode 100644 data/pokemon/dex_entries/pinsir.asm create mode 100644 data/pokemon/dex_entries/politoed.asm create mode 100644 data/pokemon/dex_entries/poliwag.asm create mode 100644 data/pokemon/dex_entries/poliwhirl.asm create mode 100644 data/pokemon/dex_entries/poliwrath.asm create mode 100644 data/pokemon/dex_entries/ponyta.asm create mode 100644 data/pokemon/dex_entries/porygon.asm create mode 100644 data/pokemon/dex_entries/porygon2.asm create mode 100644 data/pokemon/dex_entries/primeape.asm create mode 100644 data/pokemon/dex_entries/psyduck.asm create mode 100644 data/pokemon/dex_entries/pupitar.asm create mode 100644 data/pokemon/dex_entries/quagsire.asm create mode 100644 data/pokemon/dex_entries/quilava.asm create mode 100644 data/pokemon/dex_entries/qwilfish.asm create mode 100644 data/pokemon/dex_entries/raichu.asm create mode 100644 data/pokemon/dex_entries/raikou.asm create mode 100644 data/pokemon/dex_entries/rapidash.asm create mode 100644 data/pokemon/dex_entries/raticate.asm create mode 100644 data/pokemon/dex_entries/rattata.asm create mode 100644 data/pokemon/dex_entries/remoraid.asm create mode 100644 data/pokemon/dex_entries/rhydon.asm create mode 100644 data/pokemon/dex_entries/rhyhorn.asm create mode 100644 data/pokemon/dex_entries/sandshrew.asm create mode 100644 data/pokemon/dex_entries/sandslash.asm create mode 100644 data/pokemon/dex_entries/scizor.asm create mode 100644 data/pokemon/dex_entries/scyther.asm create mode 100644 data/pokemon/dex_entries/seadra.asm create mode 100644 data/pokemon/dex_entries/seaking.asm create mode 100644 data/pokemon/dex_entries/seel.asm create mode 100644 data/pokemon/dex_entries/sentret.asm create mode 100644 data/pokemon/dex_entries/shellder.asm create mode 100644 data/pokemon/dex_entries/shuckle.asm create mode 100644 data/pokemon/dex_entries/skarmory.asm create mode 100644 data/pokemon/dex_entries/skiploom.asm create mode 100644 data/pokemon/dex_entries/slowbro.asm create mode 100644 data/pokemon/dex_entries/slowking.asm create mode 100644 data/pokemon/dex_entries/slowpoke.asm create mode 100644 data/pokemon/dex_entries/slugma.asm create mode 100644 data/pokemon/dex_entries/smeargle.asm create mode 100644 data/pokemon/dex_entries/smoochum.asm create mode 100644 data/pokemon/dex_entries/sneasel.asm create mode 100644 data/pokemon/dex_entries/snorlax.asm create mode 100644 data/pokemon/dex_entries/snubbull.asm create mode 100644 data/pokemon/dex_entries/spearow.asm create mode 100644 data/pokemon/dex_entries/spinarak.asm create mode 100644 data/pokemon/dex_entries/squirtle.asm create mode 100644 data/pokemon/dex_entries/stantler.asm create mode 100644 data/pokemon/dex_entries/starmie.asm create mode 100644 data/pokemon/dex_entries/staryu.asm create mode 100644 data/pokemon/dex_entries/steelix.asm create mode 100644 data/pokemon/dex_entries/sudowoodo.asm create mode 100644 data/pokemon/dex_entries/suicune.asm create mode 100644 data/pokemon/dex_entries/sunflora.asm create mode 100644 data/pokemon/dex_entries/sunkern.asm create mode 100644 data/pokemon/dex_entries/swinub.asm create mode 100644 data/pokemon/dex_entries/tangela.asm create mode 100644 data/pokemon/dex_entries/tauros.asm create mode 100644 data/pokemon/dex_entries/teddiursa.asm create mode 100644 data/pokemon/dex_entries/tentacool.asm create mode 100644 data/pokemon/dex_entries/tentacruel.asm create mode 100644 data/pokemon/dex_entries/togepi.asm create mode 100644 data/pokemon/dex_entries/togetic.asm create mode 100644 data/pokemon/dex_entries/totodile.asm create mode 100644 data/pokemon/dex_entries/typhlosion.asm create mode 100644 data/pokemon/dex_entries/tyranitar.asm create mode 100644 data/pokemon/dex_entries/tyrogue.asm create mode 100644 data/pokemon/dex_entries/umbreon.asm create mode 100644 data/pokemon/dex_entries/unown.asm create mode 100644 data/pokemon/dex_entries/ursaring.asm create mode 100644 data/pokemon/dex_entries/vaporeon.asm create mode 100644 data/pokemon/dex_entries/venomoth.asm create mode 100644 data/pokemon/dex_entries/venonat.asm create mode 100644 data/pokemon/dex_entries/venusaur.asm create mode 100644 data/pokemon/dex_entries/victreebel.asm create mode 100644 data/pokemon/dex_entries/vileplume.asm create mode 100644 data/pokemon/dex_entries/voltorb.asm create mode 100644 data/pokemon/dex_entries/vulpix.asm create mode 100644 data/pokemon/dex_entries/wartortle.asm create mode 100644 data/pokemon/dex_entries/weedle.asm create mode 100644 data/pokemon/dex_entries/weepinbell.asm create mode 100644 data/pokemon/dex_entries/weezing.asm create mode 100644 data/pokemon/dex_entries/wigglytuff.asm create mode 100644 data/pokemon/dex_entries/wobbuffet.asm create mode 100644 data/pokemon/dex_entries/wooper.asm create mode 100644 data/pokemon/dex_entries/xatu.asm create mode 100644 data/pokemon/dex_entries/yanma.asm create mode 100644 data/pokemon/dex_entries/zapdos.asm create mode 100644 data/pokemon/dex_entries/zubat.asm create mode 100644 data/pokemon/dex_entry_pointers.asm create mode 100644 data/pokemon/dex_order_alpha.asm create mode 100644 data/pokemon/dex_order_new.asm create mode 100644 data/pokemon/egg_moves.asm create mode 100644 data/pokemon/egg_moves_johto.asm create mode 100644 data/pokemon/egg_moves_kanto.asm create mode 100644 data/pokemon/evos_attacks.asm create mode 100644 data/pokemon/evos_attacks_johto.asm create mode 100644 data/pokemon/evos_attacks_kanto.asm create mode 100644 data/pokemon/ezchat_order.asm create mode 100644 data/pokemon/first_stages.asm create mode 100644 data/pokemon/gen1_base_special.asm create mode 100644 data/pokemon/gen1_order.asm create mode 100644 data/pokemon/menu_icons.asm create mode 100644 data/pokemon/names.asm create mode 100644 data/pokemon/palettes.asm create mode 100644 data/pokemon/pic_pointers.asm create mode 100644 data/pokemon/unown_pic_pointers.asm create mode 100644 data/pokemon/unown_words.asm create mode 100644 data/predef_pointers.asm create mode 100644 data/radio/buenas_passwords.asm create mode 100644 data/radio/channel_music.asm create mode 100644 data/radio/oaks_pkmn_talk_routes.asm create mode 100644 data/radio/pnp_hidden_people.asm create mode 100644 data/radio/pnp_places.asm create mode 100644 data/sgb_ctrl_packets.asm create mode 100644 data/sprite_anims/framesets.asm create mode 100644 data/sprite_anims/oam.asm create mode 100644 data/sprite_anims/sequences.asm create mode 100644 data/sprite_anims/unused_gfx.asm create mode 100644 data/sprites/emotes.asm create mode 100644 data/sprites/facings.asm create mode 100644 data/sprites/map_objects.asm create mode 100644 data/sprites/player_sprites.asm create mode 100644 data/sprites/sprite_mons.asm create mode 100644 data/sprites/sprites.asm create mode 100644 data/text/battle.asm create mode 100644 data/text/common.asm create mode 100644 data/text/common_1.asm create mode 100644 data/text/common_2.asm create mode 100644 data/text/common_3.asm create mode 100644 data/text/mail_input_chars.asm create mode 100644 data/text/name_input_chars.asm create mode 100644 data/text/std_text.asm create mode 100644 data/text_buffers.asm create mode 100644 data/tilesets.asm create mode 100644 data/tilesets/aerodactyl_word_room_collision.asm create mode 100644 data/tilesets/aerodactyl_word_room_metatiles.bin create mode 100644 data/tilesets/battle_tower_inside_collision.asm create mode 100644 data/tilesets/battle_tower_inside_metatiles.bin create mode 100644 data/tilesets/battle_tower_outside_collision.asm create mode 100644 data/tilesets/battle_tower_outside_metatiles.bin create mode 100644 data/tilesets/beta_word_room_collision.asm create mode 100644 data/tilesets/beta_word_room_metatiles.bin create mode 100644 data/tilesets/cave_collision.asm create mode 100644 data/tilesets/cave_metatiles.bin create mode 100644 data/tilesets/champions_room_collision.asm create mode 100644 data/tilesets/champions_room_metatiles.bin create mode 100644 data/tilesets/dark_cave_collision.asm create mode 100644 data/tilesets/dark_cave_metatiles.bin create mode 100644 data/tilesets/elite_four_room_collision.asm create mode 100644 data/tilesets/elite_four_room_metatiles.bin create mode 100644 data/tilesets/facility_collision.asm create mode 100644 data/tilesets/facility_metatiles.bin create mode 100644 data/tilesets/forest_collision.asm create mode 100644 data/tilesets/forest_metatiles.bin create mode 100644 data/tilesets/game_corner_collision.asm create mode 100644 data/tilesets/game_corner_metatiles.bin create mode 100644 data/tilesets/gate_collision.asm create mode 100644 data/tilesets/gate_metatiles.bin create mode 100644 data/tilesets/ho_oh_word_room_collision.asm create mode 100644 data/tilesets/ho_oh_word_room_metatiles.bin create mode 100644 data/tilesets/house_collision.asm create mode 100644 data/tilesets/house_metatiles.bin create mode 100644 data/tilesets/ice_path_collision.asm create mode 100644 data/tilesets/ice_path_metatiles.bin create mode 100644 data/tilesets/johto_collision.asm create mode 100644 data/tilesets/johto_metatiles.bin create mode 100644 data/tilesets/johto_modern_collision.asm create mode 100644 data/tilesets/johto_modern_metatiles.bin create mode 100644 data/tilesets/kabuto_word_room_collision.asm create mode 100644 data/tilesets/kabuto_word_room_metatiles.bin create mode 100644 data/tilesets/kanto_collision.asm create mode 100644 data/tilesets/kanto_metatiles.bin create mode 100644 data/tilesets/lab_collision.asm create mode 100644 data/tilesets/lab_metatiles.bin create mode 100644 data/tilesets/lighthouse_collision.asm create mode 100644 data/tilesets/lighthouse_metatiles.bin create mode 100644 data/tilesets/mansion_collision.asm create mode 100644 data/tilesets/mansion_metatiles.bin create mode 100644 data/tilesets/mart_collision.asm create mode 100644 data/tilesets/mart_metatiles.bin create mode 100644 data/tilesets/omanyte_word_room_collision.asm create mode 100644 data/tilesets/omanyte_word_room_metatiles.bin create mode 100644 data/tilesets/park_collision.asm create mode 100644 data/tilesets/park_metatiles.bin create mode 100644 data/tilesets/players_house_collision.asm create mode 100644 data/tilesets/players_house_metatiles.bin create mode 100644 data/tilesets/players_room_collision.asm create mode 100644 data/tilesets/players_room_metatiles.bin create mode 100644 data/tilesets/pokecenter_collision.asm create mode 100644 data/tilesets/pokecenter_metatiles.bin create mode 100644 data/tilesets/pokecom_center_collision.asm create mode 100644 data/tilesets/pokecom_center_metatiles.bin create mode 100644 data/tilesets/port_collision.asm create mode 100644 data/tilesets/port_metatiles.bin create mode 100644 data/tilesets/radio_tower_collision.asm create mode 100644 data/tilesets/radio_tower_metatiles.bin create mode 100644 data/tilesets/ruins_of_alph_collision.asm create mode 100644 data/tilesets/ruins_of_alph_metatiles.bin create mode 100644 data/tilesets/tower_collision.asm create mode 100644 data/tilesets/tower_metatiles.bin create mode 100644 data/tilesets/traditional_house_collision.asm create mode 100644 data/tilesets/traditional_house_metatiles.bin create mode 100644 data/tilesets/train_station_collision.asm create mode 100644 data/tilesets/train_station_metatiles.bin create mode 100644 data/tilesets/underground_collision.asm create mode 100644 data/tilesets/underground_metatiles.bin create mode 100644 data/tilesets/unused_johto_collision.asm create mode 100644 data/tilesets/unused_johto_metatiles.bin create mode 100644 data/trainers/attributes.asm create mode 100644 data/trainers/class_names.asm create mode 100644 data/trainers/dvs.asm create mode 100644 data/trainers/encounter_music.asm create mode 100644 data/trainers/gendered_trainers.asm create mode 100644 data/trainers/genders.asm create mode 100644 data/trainers/leaders.asm create mode 100644 data/trainers/palettes.asm create mode 100644 data/trainers/parties.asm create mode 100644 data/trainers/party_pointers.asm create mode 100644 data/trainers/pic_pointers.asm create mode 100644 data/trainers/sprites.asm create mode 100644 data/types/badge_type_boosts.asm create mode 100644 data/types/names.asm create mode 100644 data/types/search_strings.asm create mode 100644 data/types/search_types.asm create mode 100644 data/types/type_boost_items.asm create mode 100644 data/types/type_matchups.asm create mode 100644 data/wild/bug_contest_mons.asm create mode 100644 data/wild/fish.asm create mode 100644 data/wild/flee_mons.asm create mode 100644 data/wild/johto_grass.asm create mode 100644 data/wild/johto_water.asm create mode 100644 data/wild/kanto_grass.asm create mode 100644 data/wild/kanto_water.asm create mode 100644 data/wild/probabilities.asm create mode 100644 data/wild/roammon_maps.asm create mode 100644 data/wild/swarm_grass.asm create mode 100644 data/wild/swarm_water.asm create mode 100644 data/wild/treemon_maps.asm create mode 100644 data/wild/treemons.asm create mode 100644 data/wild/treemons_asleep.asm create mode 100644 data/wild/unlocked_unowns.asm create mode 100644 docs/_config.yml create mode 100644 docs/assets/css/style.scss create mode 100644 docs/battle_anim_commands.md create mode 100644 docs/bugs_and_glitches.md create mode 100644 docs/design_flaws.md create mode 100644 docs/event_commands.md create mode 100644 docs/images/hp_exp_bar_border.png create mode 100644 docs/images/port.png create mode 100644 docs/images/ruins_of_alph_outside.png create mode 100644 docs/images/ruins_of_alph_outside_cinnabar.png create mode 100644 docs/index.md create mode 100644 docs/map_event_scripts.md create mode 100644 docs/map_setup_scripts.md create mode 100644 docs/menus.md create mode 100644 docs/move_effect_commands.md create mode 100644 docs/movement_commands.md create mode 100644 docs/music_commands.md create mode 100644 docs/pic_animations.md create mode 100644 docs/text_commands.md create mode 100644 docs/vc_patch.md create mode 100644 engine/16/macros.asm create mode 100644 engine/16/table_functions.asm create mode 100644 engine/battle/ai/items.asm create mode 100644 engine/battle/ai/move.asm create mode 100644 engine/battle/ai/redundant.asm create mode 100644 engine/battle/ai/scoring.asm create mode 100644 engine/battle/ai/switch.asm create mode 100644 engine/battle/anim_hp_bar.asm create mode 100644 engine/battle/battle_transition.asm create mode 100644 engine/battle/battlestart_copytilemapatonce.asm create mode 100644 engine/battle/check_battle_scene.asm create mode 100644 engine/battle/consume_held_item.asm create mode 100644 engine/battle/core.asm create mode 100644 engine/battle/effect_commands.asm create mode 100644 engine/battle/hidden_power.asm create mode 100644 engine/battle/link_result.asm create mode 100644 engine/battle/menu.asm create mode 100644 engine/battle/misc.asm create mode 100644 engine/battle/move_effects/attract.asm create mode 100644 engine/battle/move_effects/baton_pass.asm create mode 100644 engine/battle/move_effects/beat_up.asm create mode 100644 engine/battle/move_effects/belly_drum.asm create mode 100644 engine/battle/move_effects/bide.asm create mode 100644 engine/battle/move_effects/conversion.asm create mode 100644 engine/battle/move_effects/conversion2.asm create mode 100644 engine/battle/move_effects/counter.asm create mode 100644 engine/battle/move_effects/curse.asm create mode 100644 engine/battle/move_effects/destiny_bond.asm create mode 100644 engine/battle/move_effects/disable.asm create mode 100644 engine/battle/move_effects/encore.asm create mode 100644 engine/battle/move_effects/endure.asm create mode 100644 engine/battle/move_effects/false_swipe.asm create mode 100644 engine/battle/move_effects/focus_energy.asm create mode 100644 engine/battle/move_effects/foresight.asm create mode 100644 engine/battle/move_effects/frustration.asm create mode 100644 engine/battle/move_effects/fury_cutter.asm create mode 100644 engine/battle/move_effects/future_sight.asm create mode 100644 engine/battle/move_effects/heal_bell.asm create mode 100644 engine/battle/move_effects/hidden_power.asm create mode 100644 engine/battle/move_effects/leech_seed.asm create mode 100644 engine/battle/move_effects/lock_on.asm create mode 100644 engine/battle/move_effects/magnitude.asm create mode 100644 engine/battle/move_effects/metronome.asm create mode 100644 engine/battle/move_effects/mimic.asm create mode 100644 engine/battle/move_effects/mirror_coat.asm create mode 100644 engine/battle/move_effects/mirror_move.asm create mode 100644 engine/battle/move_effects/mist.asm create mode 100644 engine/battle/move_effects/nightmare.asm create mode 100644 engine/battle/move_effects/pain_split.asm create mode 100644 engine/battle/move_effects/pay_day.asm create mode 100644 engine/battle/move_effects/perish_song.asm create mode 100644 engine/battle/move_effects/present.asm create mode 100644 engine/battle/move_effects/protect.asm create mode 100644 engine/battle/move_effects/psych_up.asm create mode 100644 engine/battle/move_effects/pursuit.asm create mode 100644 engine/battle/move_effects/rage.asm create mode 100644 engine/battle/move_effects/rain_dance.asm create mode 100644 engine/battle/move_effects/rapid_spin.asm create mode 100644 engine/battle/move_effects/return.asm create mode 100644 engine/battle/move_effects/rollout.asm create mode 100644 engine/battle/move_effects/safeguard.asm create mode 100644 engine/battle/move_effects/sandstorm.asm create mode 100644 engine/battle/move_effects/selfdestruct.asm create mode 100644 engine/battle/move_effects/sketch.asm create mode 100644 engine/battle/move_effects/sleep_talk.asm create mode 100644 engine/battle/move_effects/snore.asm create mode 100644 engine/battle/move_effects/spikes.asm create mode 100644 engine/battle/move_effects/spite.asm create mode 100644 engine/battle/move_effects/splash.asm create mode 100644 engine/battle/move_effects/substitute.asm create mode 100644 engine/battle/move_effects/sunny_day.asm create mode 100644 engine/battle/move_effects/teleport.asm create mode 100644 engine/battle/move_effects/thief.asm create mode 100644 engine/battle/move_effects/thunder.asm create mode 100644 engine/battle/move_effects/transform.asm create mode 100644 engine/battle/move_effects/triple_kick.asm create mode 100644 engine/battle/read_trainer_attributes.asm create mode 100644 engine/battle/read_trainer_dvs.asm create mode 100644 engine/battle/read_trainer_party.asm create mode 100644 engine/battle/returntobattle_useball.asm create mode 100644 engine/battle/sliding_intro.asm create mode 100644 engine/battle/start_battle.asm create mode 100644 engine/battle/trainer_huds.asm create mode 100644 engine/battle/update_battle_huds.asm create mode 100644 engine/battle/used_move_text.asm create mode 100644 engine/battle_anims/anim_commands.asm create mode 100644 engine/battle_anims/bg_effects.asm create mode 100644 engine/battle_anims/core.asm create mode 100644 engine/battle_anims/functions.asm create mode 100644 engine/battle_anims/helpers.asm create mode 100644 engine/battle_anims/pokeball_wobble.asm create mode 100644 engine/debug/debug_room.asm create mode 100644 engine/events/basement_key.asm create mode 100644 engine/events/battle_tower/battle_tower.asm create mode 100644 engine/events/battle_tower/get_trainer_class.asm create mode 100644 engine/events/battle_tower/load_trainer.asm create mode 100644 engine/events/battle_tower/rules.asm create mode 100644 engine/events/battle_tower/trainer_text.asm create mode 100644 engine/events/buena.asm create mode 100644 engine/events/buena_menu.asm create mode 100644 engine/events/bug_contest/caught_mon.asm create mode 100644 engine/events/bug_contest/contest.asm create mode 100644 engine/events/bug_contest/contest_2.asm create mode 100644 engine/events/bug_contest/display_stats.asm create mode 100644 engine/events/bug_contest/judging.asm create mode 100644 engine/events/card_key.asm create mode 100644 engine/events/catch_tutorial.asm create mode 100644 engine/events/catch_tutorial_input.asm create mode 100644 engine/events/celebi.asm create mode 100644 engine/events/checkforhiddenitems.asm create mode 100644 engine/events/checksave.asm create mode 100644 engine/events/checktime.asm create mode 100644 engine/events/daycare.asm create mode 100644 engine/events/diploma.asm create mode 100644 engine/events/dratini.asm create mode 100644 engine/events/elevator.asm create mode 100644 engine/events/engine_flags.asm create mode 100644 engine/events/field_moves.asm create mode 100644 engine/events/fish.asm create mode 100644 engine/events/fishing_gfx.asm create mode 100644 engine/events/forced_movement.asm create mode 100644 engine/events/fruit_trees.asm create mode 100644 engine/events/haircut.asm create mode 100644 engine/events/halloffame.asm create mode 100644 engine/events/happiness_egg.asm create mode 100644 engine/events/heal_machine_anim.asm create mode 100644 engine/events/hidden_item.asm create mode 100644 engine/events/itemfinder.asm create mode 100644 engine/events/kurt.asm create mode 100644 engine/events/kurt_selectquantity_interpretjoypad.asm create mode 100644 engine/events/lucky_number.asm create mode 100644 engine/events/magikarp.asm create mode 100644 engine/events/magnet_train.asm create mode 100644 engine/events/map_name_sign.asm create mode 100644 engine/events/misc_scripts.asm create mode 100644 engine/events/mom.asm create mode 100644 engine/events/mom_phone.asm create mode 100644 engine/events/money.asm create mode 100644 engine/events/move_deleter.asm create mode 100644 engine/events/move_tutor.asm create mode 100644 engine/events/name_rater.asm create mode 100644 engine/events/npc_trade.asm create mode 100644 engine/events/odd_egg.asm create mode 100644 engine/events/overworld.asm create mode 100644 engine/events/play_slow_cry.asm create mode 100644 engine/events/poisonstep.asm create mode 100644 engine/events/poisonstep_pals.asm create mode 100644 engine/events/poke_seer.asm create mode 100644 engine/events/pokecenter_pc.asm create mode 100644 engine/events/pokepic.asm create mode 100644 engine/events/pokerus/apply_pokerus_tick.asm create mode 100644 engine/events/pokerus/check_pokerus.asm create mode 100644 engine/events/pokerus/pokerus.asm create mode 100644 engine/events/print_photo.asm create mode 100644 engine/events/print_unown.asm create mode 100644 engine/events/print_unown_2.asm create mode 100644 engine/events/prof_oaks_pc.asm create mode 100644 engine/events/repel.asm create mode 100644 engine/events/sacred_ash.asm create mode 100644 engine/events/shuckle.asm create mode 100644 engine/events/specials.asm create mode 100644 engine/events/squirtbottle.asm create mode 100644 engine/events/std_collision.asm create mode 100644 engine/events/std_scripts.asm create mode 100644 engine/events/sweet_scent.asm create mode 100644 engine/events/trainer_scripts.asm create mode 100644 engine/events/treemons.asm create mode 100644 engine/events/unown_walls.asm create mode 100644 engine/events/whiteout.asm create mode 100644 engine/games/card_flip.asm create mode 100644 engine/games/memory_game.asm create mode 100644 engine/games/slot_machine.asm create mode 100644 engine/games/unown_puzzle.asm create mode 100644 engine/gfx/cgb_layouts.asm create mode 100644 engine/gfx/color.asm create mode 100644 engine/gfx/crystal_layouts.asm create mode 100644 engine/gfx/dma_transfer.asm create mode 100644 engine/gfx/load_font.asm create mode 100644 engine/gfx/load_overworld_font.asm create mode 100644 engine/gfx/load_pics.asm create mode 100644 engine/gfx/load_push_oam.asm create mode 100644 engine/gfx/mon_icons.asm create mode 100644 engine/gfx/pic_animation.asm create mode 100644 engine/gfx/place_graphic.asm create mode 100644 engine/gfx/player_gfx.asm create mode 100644 engine/gfx/sgb_layouts.asm create mode 100644 engine/gfx/sprite_anims.asm create mode 100644 engine/gfx/sprites.asm create mode 100644 engine/gfx/trademon_frontpic.asm create mode 100644 engine/items/buy_sell_toss.asm create mode 100644 engine/items/item_effects.asm create mode 100644 engine/items/items.asm create mode 100644 engine/items/mart.asm create mode 100644 engine/items/pack.asm create mode 100644 engine/items/pack_kris.asm create mode 100644 engine/items/print_item_description.asm create mode 100644 engine/items/switch_items.asm create mode 100644 engine/items/tmhm.asm create mode 100644 engine/items/tmhm2.asm create mode 100644 engine/items/update_item_description.asm create mode 100644 engine/link/init_list.asm create mode 100644 engine/link/link.asm create mode 100644 engine/link/link_2.asm create mode 100644 engine/link/link_trade.asm create mode 100644 engine/link/mystery_gift.asm create mode 100644 engine/link/mystery_gift_2.asm create mode 100644 engine/link/place_waiting_text.asm create mode 100644 engine/link/time_capsule.asm create mode 100644 engine/link/time_capsule_2.asm create mode 100644 engine/math/get_square_root.asm create mode 100644 engine/math/math.asm create mode 100644 engine/math/print_num.asm create mode 100644 engine/math/sine.asm create mode 100644 engine/menus/delete_save.asm create mode 100644 engine/menus/empty_sram.asm create mode 100644 engine/menus/init_gender.asm create mode 100644 engine/menus/intro_menu.asm create mode 100644 engine/menus/main_menu.asm create mode 100644 engine/menus/menu.asm create mode 100644 engine/menus/menu_2.asm create mode 100644 engine/menus/naming_screen.asm create mode 100644 engine/menus/options_menu.asm create mode 100644 engine/menus/save.asm create mode 100644 engine/menus/savemenu_copytilemapatonce.asm create mode 100644 engine/menus/scrolling_menu.asm create mode 100644 engine/menus/start_menu.asm create mode 100644 engine/menus/trainer_card.asm create mode 100644 engine/movie/credits.asm create mode 100644 engine/movie/evolution_animation.asm create mode 100644 engine/movie/gbc_only.asm create mode 100644 engine/movie/init_hof_credits.asm create mode 100644 engine/movie/intro.asm create mode 100644 engine/movie/splash.asm create mode 100644 engine/movie/title.asm create mode 100644 engine/movie/trade_animation.asm create mode 100644 engine/overworld/cmd_queue.asm create mode 100644 engine/overworld/decorations.asm create mode 100644 engine/overworld/events.asm create mode 100644 engine/overworld/init_map.asm create mode 100644 engine/overworld/landmarks.asm create mode 100644 engine/overworld/load_map_part.asm create mode 100644 engine/overworld/map_object_action.asm create mode 100644 engine/overworld/map_objects.asm create mode 100644 engine/overworld/map_objects_2.asm create mode 100644 engine/overworld/map_setup.asm create mode 100644 engine/overworld/movement.asm create mode 100644 engine/overworld/npc_movement.asm create mode 100644 engine/overworld/overworld.asm create mode 100644 engine/overworld/player_movement.asm create mode 100644 engine/overworld/player_object.asm create mode 100644 engine/overworld/player_step.asm create mode 100644 engine/overworld/scripting.asm create mode 100644 engine/overworld/select_menu.asm create mode 100644 engine/overworld/spawn_points.asm create mode 100644 engine/overworld/tile_events.asm create mode 100644 engine/overworld/time.asm create mode 100644 engine/overworld/variables.asm create mode 100644 engine/overworld/warp_connection.asm create mode 100644 engine/overworld/wildmons.asm create mode 100644 engine/phone/phone.asm create mode 100644 engine/phone/phonering_copytilemapatonce.asm create mode 100644 engine/phone/scripts/alan.asm create mode 100644 engine/phone/scripts/anthony.asm create mode 100644 engine/phone/scripts/arnie.asm create mode 100644 engine/phone/scripts/beth.asm create mode 100644 engine/phone/scripts/beverly.asm create mode 100644 engine/phone/scripts/bike_shop.asm create mode 100644 engine/phone/scripts/bill.asm create mode 100644 engine/phone/scripts/brent.asm create mode 100644 engine/phone/scripts/brent_gossip.asm create mode 100644 engine/phone/scripts/buena.asm create mode 100644 engine/phone/scripts/chad.asm create mode 100644 engine/phone/scripts/chad_gossip.asm create mode 100644 engine/phone/scripts/dana.asm create mode 100644 engine/phone/scripts/derek.asm create mode 100644 engine/phone/scripts/elm.asm create mode 100644 engine/phone/scripts/erin.asm create mode 100644 engine/phone/scripts/gaven.asm create mode 100644 engine/phone/scripts/generic_callee.asm create mode 100644 engine/phone/scripts/generic_caller.asm create mode 100644 engine/phone/scripts/gina.asm create mode 100644 engine/phone/scripts/hangups.asm create mode 100644 engine/phone/scripts/hangups_2.asm create mode 100644 engine/phone/scripts/huey.asm create mode 100644 engine/phone/scripts/irwin.asm create mode 100644 engine/phone/scripts/irwin_gossip.asm create mode 100644 engine/phone/scripts/jack.asm create mode 100644 engine/phone/scripts/jack_gossip.asm create mode 100644 engine/phone/scripts/joey.asm create mode 100644 engine/phone/scripts/jose.asm create mode 100644 engine/phone/scripts/kenji.asm create mode 100644 engine/phone/scripts/liz.asm create mode 100644 engine/phone/scripts/liz_gossip.asm create mode 100644 engine/phone/scripts/mom.asm create mode 100644 engine/phone/scripts/parry.asm create mode 100644 engine/phone/scripts/ralph.asm create mode 100644 engine/phone/scripts/reena.asm create mode 100644 engine/phone/scripts/reminders.asm create mode 100644 engine/phone/scripts/reminders_2.asm create mode 100644 engine/phone/scripts/tiffany.asm create mode 100644 engine/phone/scripts/todd.asm create mode 100644 engine/phone/scripts/tully.asm create mode 100644 engine/phone/scripts/unused.asm create mode 100644 engine/phone/scripts/vance.asm create mode 100644 engine/phone/scripts/wade.asm create mode 100644 engine/phone/scripts/wilton.asm create mode 100644 engine/pokedex/new_pokedex_entry.asm create mode 100644 engine/pokedex/pokedex.asm create mode 100644 engine/pokedex/pokedex_2.asm create mode 100644 engine/pokedex/pokedex_3.asm create mode 100644 engine/pokedex/unown_dex.asm create mode 100644 engine/pokegear/pokegear.asm create mode 100644 engine/pokegear/radio.asm create mode 100644 engine/pokegear/townmap_convertlinebreakcharacters.asm create mode 100644 engine/pokemon/bills_pc.asm create mode 100644 engine/pokemon/bills_pc_top.asm create mode 100644 engine/pokemon/breeding.asm create mode 100644 engine/pokemon/breedmon_level_growth.asm create mode 100644 engine/pokemon/caught_data.asm create mode 100644 engine/pokemon/correct_nick_errors.asm create mode 100644 engine/pokemon/correct_party_errors.asm create mode 100644 engine/pokemon/european_mail.asm create mode 100644 engine/pokemon/evolve.asm create mode 100644 engine/pokemon/experience.asm create mode 100644 engine/pokemon/health.asm create mode 100644 engine/pokemon/knows_move.asm create mode 100644 engine/pokemon/learn.asm create mode 100644 engine/pokemon/level_up_happiness.asm create mode 100644 engine/pokemon/mail.asm create mode 100644 engine/pokemon/mail_2.asm create mode 100644 engine/pokemon/mon_menu.asm create mode 100644 engine/pokemon/mon_stats.asm create mode 100644 engine/pokemon/mon_submenu.asm create mode 100644 engine/pokemon/move_mon.asm create mode 100644 engine/pokemon/move_mon_wo_mail.asm create mode 100644 engine/pokemon/party_menu.asm create mode 100644 engine/pokemon/print_move_description.asm create mode 100644 engine/pokemon/search_owned.asm create mode 100644 engine/pokemon/search_party.asm create mode 100644 engine/pokemon/stats_screen.asm create mode 100644 engine/pokemon/switchpartymons.asm create mode 100644 engine/pokemon/tempmon.asm create mode 100644 engine/pokemon/types.asm create mode 100644 engine/predef.asm create mode 100644 engine/printer/print_party.asm create mode 100644 engine/printer/printer.asm create mode 100644 engine/printer/printer_serial.asm create mode 100644 engine/rtc/print_hours_mins.asm create mode 100644 engine/rtc/reset_password.asm create mode 100644 engine/rtc/restart_clock.asm create mode 100644 engine/rtc/rtc.asm create mode 100644 engine/rtc/timeset.asm create mode 100644 engine/smallflag.asm create mode 100644 engine/tilesets/map_palettes.asm create mode 100644 engine/tilesets/mapgroup_roofs.asm create mode 100644 engine/tilesets/tileset_anims.asm create mode 100644 engine/tilesets/tileset_palettes.asm create mode 100644 engine/tilesets/timeofday_pals.asm create mode 100644 gfx/battle/balls.png create mode 100644 gfx/battle/dude.png create mode 100644 gfx/battle/enemy_hp_bar_border.png create mode 100644 gfx/battle/exp_bar.pal create mode 100644 gfx/battle/expbar.png create mode 100644 gfx/battle/expbarend.png create mode 100644 gfx/battle/expbarend_sgb.png create mode 100644 gfx/battle/hp_bar.pal create mode 100644 gfx/battle/hp_exp_bar_border.png create mode 100644 gfx/battle/minimize.png create mode 100644 gfx/battle_anims.asm create mode 100644 gfx/battle_anims/aeroblast.png create mode 100644 gfx/battle_anims/angels.png create mode 100644 gfx/battle_anims/battle_anims.pal create mode 100644 gfx/battle_anims/beam.png create mode 100644 gfx/battle_anims/bubble.png create mode 100644 gfx/battle_anims/charge.png create mode 100644 gfx/battle_anims/cut.png create mode 100644 gfx/battle_anims/egg.png create mode 100644 gfx/battle_anims/explosion.png create mode 100644 gfx/battle_anims/fire.png create mode 100644 gfx/battle_anims/flower.png create mode 100644 gfx/battle_anims/globe.png create mode 100644 gfx/battle_anims/haze.png create mode 100644 gfx/battle_anims/hit.png create mode 100644 gfx/battle_anims/horn.png create mode 100644 gfx/battle_anims/ice.png create mode 100644 gfx/battle_anims/lightning.png create mode 100644 gfx/battle_anims/misc.png create mode 100644 gfx/battle_anims/noise.png create mode 100644 gfx/battle_anims/objects.png create mode 100644 gfx/battle_anims/plant.png create mode 100644 gfx/battle_anims/poison.png create mode 100644 gfx/battle_anims/pokeball.png create mode 100644 gfx/battle_anims/powder.png create mode 100644 gfx/battle_anims/psychic.png create mode 100644 gfx/battle_anims/reflect.png create mode 100644 gfx/battle_anims/rocks.png create mode 100644 gfx/battle_anims/rope.png create mode 100644 gfx/battle_anims/sand.png create mode 100644 gfx/battle_anims/shapes.png create mode 100644 gfx/battle_anims/shine.png create mode 100644 gfx/battle_anims/skyattack.png create mode 100644 gfx/battle_anims/smoke.png create mode 100644 gfx/battle_anims/speed.png create mode 100644 gfx/battle_anims/status.png create mode 100644 gfx/battle_anims/unused_battle_anims.pal create mode 100644 gfx/battle_anims/water.png create mode 100644 gfx/battle_anims/wave.png create mode 100644 gfx/battle_anims/web.png create mode 100644 gfx/battle_anims/whip.png create mode 100644 gfx/battle_anims/wind.png create mode 100644 gfx/beta_poker/beta_poker.pal create mode 100644 gfx/card_flip/card_flip.pal create mode 100644 gfx/card_flip/card_flip.tilemap create mode 100644 gfx/card_flip/card_flip_1.png create mode 100644 gfx/card_flip/card_flip_2.png create mode 100644 gfx/card_flip/card_flip_3.png create mode 100644 gfx/card_flip/off.png create mode 100644 gfx/card_flip/on.png create mode 100644 gfx/credits/border.png create mode 100644 gfx/credits/credits.pal create mode 100644 gfx/credits/ditto.png create mode 100644 gfx/credits/igglybuff.png create mode 100644 gfx/credits/pichu.png create mode 100644 gfx/credits/smoochum.png create mode 100644 gfx/credits/theend.png create mode 100644 gfx/debug/up_arrow.png create mode 100644 gfx/diploma/diploma.pal create mode 100644 gfx/diploma/diploma.png create mode 100644 gfx/diploma/page1.tilemap create mode 100644 gfx/diploma/page2.tilemap create mode 100644 gfx/emotes.asm create mode 100644 gfx/emotes/bolt.png create mode 100644 gfx/emotes/fish.png create mode 100644 gfx/emotes/happy.png create mode 100644 gfx/emotes/heart.png create mode 100644 gfx/emotes/question.png create mode 100644 gfx/emotes/sad.png create mode 100644 gfx/emotes/shock.png create mode 100644 gfx/emotes/sleep.png create mode 100644 gfx/evo/bubble.png create mode 100644 gfx/evo/bubble_large.png create mode 100644 gfx/evo/egg_hatch.png create mode 100644 gfx/font.asm create mode 100644 gfx/font/bg_text.pal create mode 100644 gfx/font/black.png create mode 100644 gfx/font/english.png create mode 100644 gfx/font/feet_inches.png create mode 100644 gfx/font/font.png create mode 100644 gfx/font/font_battle_extra.png create mode 100644 gfx/font/font_extra.png create mode 100644 gfx/font/font_inversed.png create mode 100644 gfx/font/french_german.png create mode 100644 gfx/font/overworld.png create mode 100644 gfx/font/overworld_space.png create mode 100644 gfx/font/phone_icon.png create mode 100644 gfx/font/postal_mark.png create mode 100644 gfx/font/space.png create mode 100644 gfx/font/spanish_italian.png create mode 100644 gfx/font/unown_font.png create mode 100644 gfx/font/unused_bold_font.png create mode 100644 gfx/font/unused_up_arrow.png create mode 100644 gfx/font/unused_weekday_kanji.png create mode 100644 gfx/font/up_arrow.png create mode 100644 gfx/footprints.asm create mode 100644 gfx/footprints/252.png create mode 100644 gfx/footprints/253.png create mode 100644 gfx/footprints/254.png create mode 100644 gfx/footprints/255.png create mode 100644 gfx/footprints/256.png create mode 100644 gfx/footprints/abra.png create mode 100644 gfx/footprints/aerodactyl.png create mode 100644 gfx/footprints/aipom.png create mode 100644 gfx/footprints/alakazam.png create mode 100644 gfx/footprints/ampharos.png create mode 100644 gfx/footprints/arbok.png create mode 100644 gfx/footprints/arcanine.png create mode 100644 gfx/footprints/ariados.png create mode 100644 gfx/footprints/articuno.png create mode 100644 gfx/footprints/azumarill.png create mode 100644 gfx/footprints/bayleef.png create mode 100644 gfx/footprints/beedrill.png create mode 100644 gfx/footprints/bellossom.png create mode 100644 gfx/footprints/bellsprout.png create mode 100644 gfx/footprints/blastoise.png create mode 100644 gfx/footprints/blissey.png create mode 100644 gfx/footprints/bulbasaur.png create mode 100644 gfx/footprints/butterfree.png create mode 100644 gfx/footprints/caterpie.png create mode 100644 gfx/footprints/celebi.png create mode 100644 gfx/footprints/chansey.png create mode 100644 gfx/footprints/charizard.png create mode 100644 gfx/footprints/charmander.png create mode 100644 gfx/footprints/charmeleon.png create mode 100644 gfx/footprints/chikorita.png create mode 100644 gfx/footprints/chinchou.png create mode 100644 gfx/footprints/clefable.png create mode 100644 gfx/footprints/clefairy.png create mode 100644 gfx/footprints/cleffa.png create mode 100644 gfx/footprints/cloyster.png create mode 100644 gfx/footprints/corsola.png create mode 100644 gfx/footprints/crobat.png create mode 100644 gfx/footprints/croconaw.png create mode 100644 gfx/footprints/cubone.png create mode 100644 gfx/footprints/cyndaquil.png create mode 100644 gfx/footprints/delibird.png create mode 100644 gfx/footprints/dewgong.png create mode 100644 gfx/footprints/diglett.png create mode 100644 gfx/footprints/ditto.png create mode 100644 gfx/footprints/dodrio.png create mode 100644 gfx/footprints/doduo.png create mode 100644 gfx/footprints/donphan.png create mode 100644 gfx/footprints/dragonair.png create mode 100644 gfx/footprints/dragonite.png create mode 100644 gfx/footprints/dratini.png create mode 100644 gfx/footprints/drowzee.png create mode 100644 gfx/footprints/dugtrio.png create mode 100644 gfx/footprints/dunsparce.png create mode 100644 gfx/footprints/eevee.png create mode 100644 gfx/footprints/ekans.png create mode 100644 gfx/footprints/electabuzz.png create mode 100644 gfx/footprints/electrode.png create mode 100644 gfx/footprints/elekid.png create mode 100644 gfx/footprints/entei.png create mode 100644 gfx/footprints/espeon.png create mode 100644 gfx/footprints/exeggcute.png create mode 100644 gfx/footprints/exeggutor.png create mode 100644 gfx/footprints/farfetch_d.png create mode 100644 gfx/footprints/fearow.png create mode 100644 gfx/footprints/feraligatr.png create mode 100644 gfx/footprints/flaaffy.png create mode 100644 gfx/footprints/flareon.png create mode 100644 gfx/footprints/forretress.png create mode 100644 gfx/footprints/furret.png create mode 100644 gfx/footprints/gastly.png create mode 100644 gfx/footprints/gengar.png create mode 100644 gfx/footprints/geodude.png create mode 100644 gfx/footprints/girafarig.png create mode 100644 gfx/footprints/gligar.png create mode 100644 gfx/footprints/gloom.png create mode 100644 gfx/footprints/golbat.png create mode 100644 gfx/footprints/goldeen.png create mode 100644 gfx/footprints/golduck.png create mode 100644 gfx/footprints/golem.png create mode 100644 gfx/footprints/granbull.png create mode 100644 gfx/footprints/graveler.png create mode 100644 gfx/footprints/grimer.png create mode 100644 gfx/footprints/growlithe.png create mode 100644 gfx/footprints/gyarados.png create mode 100644 gfx/footprints/haunter.png create mode 100644 gfx/footprints/heracross.png create mode 100644 gfx/footprints/hitmonchan.png create mode 100644 gfx/footprints/hitmonlee.png create mode 100644 gfx/footprints/hitmontop.png create mode 100644 gfx/footprints/ho_oh.png create mode 100644 gfx/footprints/hoothoot.png create mode 100644 gfx/footprints/hoppip.png create mode 100644 gfx/footprints/horsea.png create mode 100644 gfx/footprints/houndoom.png create mode 100644 gfx/footprints/houndour.png create mode 100644 gfx/footprints/hypno.png create mode 100644 gfx/footprints/igglybuff.png create mode 100644 gfx/footprints/ivysaur.png create mode 100644 gfx/footprints/jigglypuff.png create mode 100644 gfx/footprints/jolteon.png create mode 100644 gfx/footprints/jumpluff.png create mode 100644 gfx/footprints/jynx.png create mode 100644 gfx/footprints/kabuto.png create mode 100644 gfx/footprints/kabutops.png create mode 100644 gfx/footprints/kadabra.png create mode 100644 gfx/footprints/kakuna.png create mode 100644 gfx/footprints/kangaskhan.png create mode 100644 gfx/footprints/kingdra.png create mode 100644 gfx/footprints/kingler.png create mode 100644 gfx/footprints/koffing.png create mode 100644 gfx/footprints/krabby.png create mode 100644 gfx/footprints/lanturn.png create mode 100644 gfx/footprints/lapras.png create mode 100644 gfx/footprints/larvitar.png create mode 100644 gfx/footprints/ledian.png create mode 100644 gfx/footprints/ledyba.png create mode 100644 gfx/footprints/lickitung.png create mode 100644 gfx/footprints/lugia.png create mode 100644 gfx/footprints/machamp.png create mode 100644 gfx/footprints/machoke.png create mode 100644 gfx/footprints/machop.png create mode 100644 gfx/footprints/magby.png create mode 100644 gfx/footprints/magcargo.png create mode 100644 gfx/footprints/magikarp.png create mode 100644 gfx/footprints/magmar.png create mode 100644 gfx/footprints/magnemite.png create mode 100644 gfx/footprints/magneton.png create mode 100644 gfx/footprints/mankey.png create mode 100644 gfx/footprints/mantine.png create mode 100644 gfx/footprints/mareep.png create mode 100644 gfx/footprints/marill.png create mode 100644 gfx/footprints/marowak.png create mode 100644 gfx/footprints/meganium.png create mode 100644 gfx/footprints/meowth.png create mode 100644 gfx/footprints/metapod.png create mode 100644 gfx/footprints/mew.png create mode 100644 gfx/footprints/mewtwo.png create mode 100644 gfx/footprints/miltank.png create mode 100644 gfx/footprints/misdreavus.png create mode 100644 gfx/footprints/moltres.png create mode 100644 gfx/footprints/mr__mime.png create mode 100644 gfx/footprints/muk.png create mode 100644 gfx/footprints/murkrow.png create mode 100644 gfx/footprints/natu.png create mode 100644 gfx/footprints/nidoking.png create mode 100644 gfx/footprints/nidoqueen.png create mode 100644 gfx/footprints/nidoran_f.png create mode 100644 gfx/footprints/nidoran_m.png create mode 100644 gfx/footprints/nidorina.png create mode 100644 gfx/footprints/nidorino.png create mode 100644 gfx/footprints/ninetales.png create mode 100644 gfx/footprints/noctowl.png create mode 100644 gfx/footprints/octillery.png create mode 100644 gfx/footprints/oddish.png create mode 100644 gfx/footprints/omanyte.png create mode 100644 gfx/footprints/omastar.png create mode 100644 gfx/footprints/onix.png create mode 100644 gfx/footprints/paras.png create mode 100644 gfx/footprints/parasect.png create mode 100644 gfx/footprints/persian.png create mode 100644 gfx/footprints/phanpy.png create mode 100644 gfx/footprints/pichu.png create mode 100644 gfx/footprints/pidgeot.png create mode 100644 gfx/footprints/pidgeotto.png create mode 100644 gfx/footprints/pidgey.png create mode 100644 gfx/footprints/pikachu.png create mode 100644 gfx/footprints/piloswine.png create mode 100644 gfx/footprints/pineco.png create mode 100644 gfx/footprints/pinsir.png create mode 100644 gfx/footprints/politoed.png create mode 100644 gfx/footprints/poliwag.png create mode 100644 gfx/footprints/poliwhirl.png create mode 100644 gfx/footprints/poliwrath.png create mode 100644 gfx/footprints/ponyta.png create mode 100644 gfx/footprints/porygon.png create mode 100644 gfx/footprints/porygon2.png create mode 100644 gfx/footprints/primeape.png create mode 100644 gfx/footprints/psyduck.png create mode 100644 gfx/footprints/pupitar.png create mode 100644 gfx/footprints/quagsire.png create mode 100644 gfx/footprints/quilava.png create mode 100644 gfx/footprints/qwilfish.png create mode 100644 gfx/footprints/raichu.png create mode 100644 gfx/footprints/raikou.png create mode 100644 gfx/footprints/rapidash.png create mode 100644 gfx/footprints/raticate.png create mode 100644 gfx/footprints/rattata.png create mode 100644 gfx/footprints/remoraid.png create mode 100644 gfx/footprints/rhydon.png create mode 100644 gfx/footprints/rhyhorn.png create mode 100644 gfx/footprints/sandshrew.png create mode 100644 gfx/footprints/sandslash.png create mode 100644 gfx/footprints/scizor.png create mode 100644 gfx/footprints/scyther.png create mode 100644 gfx/footprints/seadra.png create mode 100644 gfx/footprints/seaking.png create mode 100644 gfx/footprints/seel.png create mode 100644 gfx/footprints/sentret.png create mode 100644 gfx/footprints/shellder.png create mode 100644 gfx/footprints/shuckle.png create mode 100644 gfx/footprints/skarmory.png create mode 100644 gfx/footprints/skiploom.png create mode 100644 gfx/footprints/slowbro.png create mode 100644 gfx/footprints/slowking.png create mode 100644 gfx/footprints/slowpoke.png create mode 100644 gfx/footprints/slugma.png create mode 100644 gfx/footprints/smeargle.png create mode 100644 gfx/footprints/smoochum.png create mode 100644 gfx/footprints/sneasel.png create mode 100644 gfx/footprints/snorlax.png create mode 100644 gfx/footprints/snubbull.png create mode 100644 gfx/footprints/spearow.png create mode 100644 gfx/footprints/spinarak.png create mode 100644 gfx/footprints/squirtle.png create mode 100644 gfx/footprints/stantler.png create mode 100644 gfx/footprints/starmie.png create mode 100644 gfx/footprints/staryu.png create mode 100644 gfx/footprints/steelix.png create mode 100644 gfx/footprints/sudowoodo.png create mode 100644 gfx/footprints/suicune.png create mode 100644 gfx/footprints/sunflora.png create mode 100644 gfx/footprints/sunkern.png create mode 100644 gfx/footprints/swinub.png create mode 100644 gfx/footprints/tangela.png create mode 100644 gfx/footprints/tauros.png create mode 100644 gfx/footprints/teddiursa.png create mode 100644 gfx/footprints/tentacool.png create mode 100644 gfx/footprints/tentacruel.png create mode 100644 gfx/footprints/togepi.png create mode 100644 gfx/footprints/togetic.png create mode 100644 gfx/footprints/totodile.png create mode 100644 gfx/footprints/typhlosion.png create mode 100644 gfx/footprints/tyranitar.png create mode 100644 gfx/footprints/tyrogue.png create mode 100644 gfx/footprints/umbreon.png create mode 100644 gfx/footprints/unown.png create mode 100644 gfx/footprints/ursaring.png create mode 100644 gfx/footprints/vaporeon.png create mode 100644 gfx/footprints/venomoth.png create mode 100644 gfx/footprints/venonat.png create mode 100644 gfx/footprints/venusaur.png create mode 100644 gfx/footprints/victreebel.png create mode 100644 gfx/footprints/vileplume.png create mode 100644 gfx/footprints/voltorb.png create mode 100644 gfx/footprints/vulpix.png create mode 100644 gfx/footprints/wartortle.png create mode 100644 gfx/footprints/weedle.png create mode 100644 gfx/footprints/weepinbell.png create mode 100644 gfx/footprints/weezing.png create mode 100644 gfx/footprints/wigglytuff.png create mode 100644 gfx/footprints/wobbuffet.png create mode 100644 gfx/footprints/wooper.png create mode 100644 gfx/footprints/xatu.png create mode 100644 gfx/footprints/yanma.png create mode 100644 gfx/footprints/zapdos.png create mode 100644 gfx/footprints/zubat.png create mode 100644 gfx/frames/1.png create mode 100644 gfx/frames/2.png create mode 100644 gfx/frames/3.png create mode 100644 gfx/frames/4.png create mode 100644 gfx/frames/5.png create mode 100644 gfx/frames/6.png create mode 100644 gfx/frames/7.png create mode 100644 gfx/frames/8.png create mode 100644 gfx/frames/9.png create mode 100644 gfx/frames/map_entry_sign.png create mode 100644 gfx/icons.asm create mode 100644 gfx/icons/bat.png create mode 100644 gfx/icons/bigmon.png create mode 100644 gfx/icons/bird.png create mode 100644 gfx/icons/blob.png create mode 100644 gfx/icons/bug.png create mode 100644 gfx/icons/bulbasaur.png create mode 100644 gfx/icons/caterpillar.png create mode 100644 gfx/icons/charmander.png create mode 100644 gfx/icons/clefairy.png create mode 100644 gfx/icons/diglett.png create mode 100644 gfx/icons/egg.png create mode 100644 gfx/icons/equine.png create mode 100644 gfx/icons/fighter.png create mode 100644 gfx/icons/fish.png create mode 100644 gfx/icons/fox.png create mode 100644 gfx/icons/geodude.png create mode 100644 gfx/icons/ghost.png create mode 100644 gfx/icons/gyarados.png create mode 100644 gfx/icons/ho_oh.png create mode 100644 gfx/icons/humanshape.png create mode 100644 gfx/icons/jellyfish.png create mode 100644 gfx/icons/jigglypuff.png create mode 100644 gfx/icons/lapras.png create mode 100644 gfx/icons/lugia.png create mode 100644 gfx/icons/monster.png create mode 100644 gfx/icons/moth.png create mode 100644 gfx/icons/oddish.png create mode 100644 gfx/icons/pikachu.png create mode 100644 gfx/icons/poliwag.png create mode 100644 gfx/icons/serpent.png create mode 100644 gfx/icons/shell.png create mode 100644 gfx/icons/slowpoke.png create mode 100644 gfx/icons/snorlax.png create mode 100644 gfx/icons/squirtle.png create mode 100644 gfx/icons/staryu.png create mode 100644 gfx/icons/sudowoodo.png create mode 100644 gfx/icons/unown.png create mode 100644 gfx/icons/voltorb.png create mode 100644 gfx/intro/background.attrmap create mode 100644 gfx/intro/background.pal create mode 100644 gfx/intro/background.png create mode 100644 gfx/intro/background.tilemap create mode 100644 gfx/intro/crystal_unowns.attrmap create mode 100644 gfx/intro/crystal_unowns.pal create mode 100644 gfx/intro/crystal_unowns.png create mode 100644 gfx/intro/crystal_unowns.tilemap create mode 100644 gfx/intro/fade.pal create mode 100644 gfx/intro/grass1.png create mode 100644 gfx/intro/grass2.png create mode 100644 gfx/intro/grass3.png create mode 100644 gfx/intro/grass4.png create mode 100644 gfx/intro/gs_magikarp_bg.pal create mode 100644 gfx/intro/gs_magikarp_ob.pal create mode 100644 gfx/intro/gs_shellder_lapras_bg.pal create mode 100644 gfx/intro/gs_shellder_lapras_ob.pal create mode 100644 gfx/intro/pichu_wooper.png create mode 100644 gfx/intro/pulse.png create mode 100644 gfx/intro/suicune.pal create mode 100644 gfx/intro/suicune_back.attrmap create mode 100644 gfx/intro/suicune_back.png create mode 100644 gfx/intro/suicune_back.tilemap create mode 100644 gfx/intro/suicune_close.attrmap create mode 100644 gfx/intro/suicune_close.pal create mode 100644 gfx/intro/suicune_close.png create mode 100644 gfx/intro/suicune_close.tilemap create mode 100644 gfx/intro/suicune_jump.attrmap create mode 100644 gfx/intro/suicune_jump.png create mode 100644 gfx/intro/suicune_jump.tilemap create mode 100644 gfx/intro/suicune_run.png create mode 100644 gfx/intro/unown_1.pal create mode 100644 gfx/intro/unown_2.pal create mode 100644 gfx/intro/unown_a.attrmap create mode 100644 gfx/intro/unown_a.tilemap create mode 100644 gfx/intro/unown_back.png create mode 100644 gfx/intro/unown_hi.attrmap create mode 100644 gfx/intro/unown_hi.tilemap create mode 100644 gfx/intro/unowns.attrmap create mode 100644 gfx/intro/unowns.pal create mode 100644 gfx/intro/unowns.png create mode 100644 gfx/intro/unowns.tilemap create mode 100644 gfx/lz.mk create mode 100644 gfx/mail.asm create mode 100644 gfx/mail/cloud.png create mode 100644 gfx/mail/ditto.png create mode 100644 gfx/mail/dragonite.png create mode 100644 gfx/mail/dratini.png create mode 100644 gfx/mail/eevee.png create mode 100644 gfx/mail/eon_mail_border_1.png create mode 100644 gfx/mail/eon_mail_border_2.png create mode 100644 gfx/mail/flower_1.png create mode 100644 gfx/mail/flower_2.png create mode 100644 gfx/mail/flower_mail_border.png create mode 100644 gfx/mail/grass.png create mode 100644 gfx/mail/lapras.png create mode 100644 gfx/mail/large_circle.png create mode 100644 gfx/mail/large_heart.png create mode 100644 gfx/mail/large_note.png create mode 100644 gfx/mail/large_pokeball.png create mode 100644 gfx/mail/large_triangle.png create mode 100644 gfx/mail/litebluemail_border.png create mode 100644 gfx/mail/lovely_mail_border.png create mode 100644 gfx/mail/lovely_mail_underline.png create mode 100644 gfx/mail/mail.pal create mode 100644 gfx/mail/mew.png create mode 100644 gfx/mail/morph_mail_border.png create mode 100644 gfx/mail/morph_mail_corner.png create mode 100644 gfx/mail/morph_mail_divider.png create mode 100644 gfx/mail/music_mail_border.png create mode 100644 gfx/mail/natu.png create mode 100644 gfx/mail/oddish.png create mode 100644 gfx/mail/poliwag.png create mode 100644 gfx/mail/portraitmail_border.png create mode 100644 gfx/mail/portraitmail_underline.png create mode 100644 gfx/mail/sentret.png create mode 100644 gfx/mail/small_heart.png create mode 100644 gfx/mail/small_note.png create mode 100644 gfx/mail/small_pokeball.png create mode 100644 gfx/mail/small_triangle.png create mode 100644 gfx/mail/surf_mail_border.png create mode 100644 gfx/mail/unused_grass.png create mode 100644 gfx/mail/wave.png create mode 100644 gfx/memory_game/memory_game.png create mode 100644 gfx/misc.asm create mode 100644 gfx/mobile/ascii_font.png create mode 100644 gfx/mobile/card.png create mode 100644 gfx/mobile/card_2.png create mode 100644 gfx/mobile/card_folder.png create mode 100644 gfx/mobile/card_large_sprite.png create mode 100644 gfx/mobile/card_list.png create mode 100644 gfx/mobile/card_sprite.png create mode 100644 gfx/mobile/chris_silhouette.png create mode 100644 gfx/mobile/dialing.png create mode 100644 gfx/mobile/dialing_frame.png create mode 100644 gfx/mobile/dialpad.attrmap create mode 100644 gfx/mobile/dialpad.png create mode 100644 gfx/mobile/dialpad.tilemap create mode 100644 gfx/mobile/dialpad_cursor.png create mode 100644 gfx/mobile/down_arrow.png create mode 100644 gfx/mobile/electro_ball.png create mode 100644 gfx/mobile/ez_chat_cursor.png create mode 100644 gfx/mobile/havewant.png create mode 100644 gfx/mobile/havewant_map.bin create mode 100644 gfx/mobile/kris_silhouette.png create mode 100644 gfx/mobile/mobile_adapters.pal create mode 100644 gfx/mobile/mobile_cable_1.png create mode 100644 gfx/mobile/mobile_cable_2.png create mode 100644 gfx/mobile/mobile_center.attrmap create mode 100644 gfx/mobile/mobile_center.tilemap create mode 100644 gfx/mobile/mobile_menu.png create mode 100644 gfx/mobile/mobile_password.pal create mode 100644 gfx/mobile/mobile_splash.attrmap create mode 100644 gfx/mobile/mobile_splash.pal create mode 100644 gfx/mobile/mobile_splash.png create mode 100644 gfx/mobile/mobile_splash.tilemap create mode 100644 gfx/mobile/mobile_splash_check.png create mode 100644 gfx/mobile/mobile_trade.attrmap create mode 100644 gfx/mobile/mobile_trade.png create mode 100644 gfx/mobile/mobile_trade.tilemap create mode 100644 gfx/mobile/mobile_trade_bg.pal create mode 100644 gfx/mobile/mobile_trade_lights.pal create mode 100644 gfx/mobile/mobile_trade_lights.png create mode 100644 gfx/mobile/mobile_trade_ob1.pal create mode 100644 gfx/mobile/mobile_trade_ob2.pal create mode 100644 gfx/mobile/mobile_trade_sprites.png create mode 100644 gfx/mobile/password.attrmap create mode 100644 gfx/mobile/password_bottom.tilemap create mode 100644 gfx/mobile/password_shift.tilemap create mode 100644 gfx/mobile/password_top.tilemap create mode 100644 gfx/mobile/phone_tiles.png create mode 100644 gfx/mobile/pichu_animated.png create mode 100644 gfx/mobile/pichu_border.attrmap create mode 100644 gfx/mobile/pichu_border.png create mode 100644 gfx/mobile/pichu_border.tilemap create mode 100644 gfx/mobile/pichu_border_bg.pal create mode 100644 gfx/mobile/pichu_border_ob.pal create mode 100644 gfx/mobile/pokemon_news.bin create mode 100644 gfx/mobile/pokemon_news.pal create mode 100644 gfx/mobile/pokemon_news.png create mode 100644 gfx/mobile/select.png create mode 100644 gfx/mobile/select_start.png create mode 100644 gfx/mobile/stadium2_n64.attrmap create mode 100644 gfx/mobile/stadium2_n64.png create mode 100644 gfx/mobile/stadium2_n64.tilemap create mode 100644 gfx/mobile/unused_mobile_pulses.pal create mode 100644 gfx/mobile/up_arrow.png create mode 100644 gfx/mystery_gift/card_sprite.png create mode 100644 gfx/mystery_gift/card_trade.png create mode 100644 gfx/mystery_gift/gs_mystery_gift.pal create mode 100644 gfx/mystery_gift/mg_mobile.pal create mode 100644 gfx/mystery_gift/mobile_text.pal create mode 100644 gfx/mystery_gift/mystery_gift.pal create mode 100644 gfx/mystery_gift/mystery_gift.png create mode 100644 gfx/mystery_gift/name_card_bg.pal create mode 100644 gfx/mystery_gift/name_card_ob.pal create mode 100644 gfx/naming_screen/border.png create mode 100644 gfx/naming_screen/cursor.png create mode 100644 gfx/naming_screen/end.png create mode 100644 gfx/naming_screen/mail.png create mode 100644 gfx/naming_screen/middle_line.png create mode 100644 gfx/naming_screen/underline.png create mode 100644 gfx/new_game/down_arrow.png create mode 100644 gfx/new_game/gender_screen.pal create mode 100644 gfx/new_game/gender_screen.png create mode 100644 gfx/new_game/shrink1.png create mode 100644 gfx/new_game/shrink2.png create mode 100644 gfx/new_game/timeset_bg.png create mode 100644 gfx/new_game/up_arrow.png create mode 100644 gfx/overworld/boulder_dust.png create mode 100644 gfx/overworld/celebi.png create mode 100644 gfx/overworld/chris_fish.png create mode 100644 gfx/overworld/cut_grass.png create mode 100644 gfx/overworld/cut_tree.png create mode 100644 gfx/overworld/fishing_rod.png create mode 100644 gfx/overworld/grass_rustle.png create mode 100644 gfx/overworld/headbutt_tree.png create mode 100644 gfx/overworld/heal_machine.pal create mode 100644 gfx/overworld/heal_machine.png create mode 100644 gfx/overworld/kris_fish.png create mode 100644 gfx/overworld/magnet_train_bg.tilemap create mode 100644 gfx/overworld/magnet_train_fg.tilemap create mode 100644 gfx/overworld/npc_sprites.pal create mode 100644 gfx/overworld/shadow.png create mode 100644 gfx/overworld/trainer_battle.pal create mode 100644 gfx/overworld/trainer_battle_dark.pal create mode 100644 gfx/overworld/trainer_battle_pokeball_tiles.png create mode 100644 gfx/pack/pack.pal create mode 100644 gfx/pack/pack.png create mode 100644 gfx/pack/pack_f.pal create mode 100644 gfx/pack/pack_f.png create mode 100644 gfx/pack/pack_menu.png create mode 100644 gfx/pack/pack_menu.tilemap create mode 100644 gfx/pc/orange.pal create mode 100644 gfx/pc/pc.png create mode 100644 gfx/pc/pc_mail.png create mode 100644 gfx/pics.asm create mode 100644 gfx/player/chris.png create mode 100644 gfx/player/chris_back.png create mode 100644 gfx/player/kris.png create mode 100644 gfx/player/kris_back.png create mode 100644 gfx/pokedex/cursor.pal create mode 100644 gfx/pokedex/pokedex.png create mode 100644 gfx/pokedex/pokedex_sgb.png create mode 100644 gfx/pokedex/question_mark.pal create mode 100644 gfx/pokedex/question_mark.png create mode 100644 gfx/pokedex/slowpoke.png create mode 100644 gfx/pokegear/clock.tilemap.rle create mode 100644 gfx/pokegear/dexmap_nest_icon.png create mode 100644 gfx/pokegear/fast_ship.png create mode 100644 gfx/pokegear/flymap_label_border.png create mode 100644 gfx/pokegear/johto.bin create mode 100644 gfx/pokegear/kanto.bin create mode 100644 gfx/pokegear/phone.tilemap.rle create mode 100644 gfx/pokegear/pokegear.pal create mode 100644 gfx/pokegear/pokegear.png create mode 100644 gfx/pokegear/pokegear_f.pal create mode 100644 gfx/pokegear/pokegear_sprites.png create mode 100644 gfx/pokegear/radio.tilemap.rle create mode 100644 gfx/pokegear/town_map.png create mode 100644 gfx/pokegear/town_map_palette_map.asm create mode 100644 gfx/pokemon/abra/anim.asm create mode 100644 gfx/pokemon/abra/anim_idle.asm create mode 100644 gfx/pokemon/abra/back.png create mode 100644 gfx/pokemon/abra/front.png create mode 100644 gfx/pokemon/abra/shiny.pal create mode 100644 gfx/pokemon/aerodactyl/anim.asm create mode 100644 gfx/pokemon/aerodactyl/anim_idle.asm create mode 100644 gfx/pokemon/aerodactyl/back.png create mode 100644 gfx/pokemon/aerodactyl/front.png create mode 100644 gfx/pokemon/aerodactyl/shiny.pal create mode 100644 gfx/pokemon/aipom/anim.asm create mode 100644 gfx/pokemon/aipom/anim_idle.asm create mode 100644 gfx/pokemon/aipom/back.png create mode 100644 gfx/pokemon/aipom/front.png create mode 100644 gfx/pokemon/aipom/shiny.pal create mode 100644 gfx/pokemon/alakazam/anim.asm create mode 100644 gfx/pokemon/alakazam/anim_idle.asm create mode 100644 gfx/pokemon/alakazam/back.png create mode 100644 gfx/pokemon/alakazam/front.png create mode 100644 gfx/pokemon/alakazam/shiny.pal create mode 100644 gfx/pokemon/ampharos/anim.asm create mode 100644 gfx/pokemon/ampharos/anim_idle.asm create mode 100644 gfx/pokemon/ampharos/back.png create mode 100644 gfx/pokemon/ampharos/front.png create mode 100644 gfx/pokemon/ampharos/shiny.pal create mode 100644 gfx/pokemon/anim_pointers.asm create mode 100644 gfx/pokemon/anims.asm create mode 100644 gfx/pokemon/arbok/anim.asm create mode 100644 gfx/pokemon/arbok/anim_idle.asm create mode 100644 gfx/pokemon/arbok/back.png create mode 100644 gfx/pokemon/arbok/front.png create mode 100644 gfx/pokemon/arbok/shiny.pal create mode 100644 gfx/pokemon/arcanine/anim.asm create mode 100644 gfx/pokemon/arcanine/anim_idle.asm create mode 100644 gfx/pokemon/arcanine/back.png create mode 100644 gfx/pokemon/arcanine/front.png create mode 100644 gfx/pokemon/arcanine/shiny.pal create mode 100644 gfx/pokemon/ariados/anim.asm create mode 100644 gfx/pokemon/ariados/anim_idle.asm create mode 100644 gfx/pokemon/ariados/back.png create mode 100644 gfx/pokemon/ariados/front.png create mode 100644 gfx/pokemon/ariados/shiny.pal create mode 100644 gfx/pokemon/articuno/anim.asm create mode 100644 gfx/pokemon/articuno/anim_idle.asm create mode 100644 gfx/pokemon/articuno/back.png create mode 100644 gfx/pokemon/articuno/front.png create mode 100644 gfx/pokemon/articuno/shiny.pal create mode 100644 gfx/pokemon/azumarill/anim.asm create mode 100644 gfx/pokemon/azumarill/anim_idle.asm create mode 100644 gfx/pokemon/azumarill/back.png create mode 100644 gfx/pokemon/azumarill/front.png create mode 100644 gfx/pokemon/azumarill/shiny.pal create mode 100644 gfx/pokemon/bayleef/anim.asm create mode 100644 gfx/pokemon/bayleef/anim_idle.asm create mode 100644 gfx/pokemon/bayleef/back.png create mode 100644 gfx/pokemon/bayleef/front.png create mode 100644 gfx/pokemon/bayleef/shiny.pal create mode 100644 gfx/pokemon/beedrill/anim.asm create mode 100644 gfx/pokemon/beedrill/anim_idle.asm create mode 100644 gfx/pokemon/beedrill/back.png create mode 100644 gfx/pokemon/beedrill/front.png create mode 100644 gfx/pokemon/beedrill/shiny.pal create mode 100644 gfx/pokemon/bellossom/anim.asm create mode 100644 gfx/pokemon/bellossom/anim_idle.asm create mode 100644 gfx/pokemon/bellossom/back.png create mode 100644 gfx/pokemon/bellossom/front.png create mode 100644 gfx/pokemon/bellossom/shiny.pal create mode 100644 gfx/pokemon/bellsprout/anim.asm create mode 100644 gfx/pokemon/bellsprout/anim_idle.asm create mode 100644 gfx/pokemon/bellsprout/back.png create mode 100644 gfx/pokemon/bellsprout/front.png create mode 100644 gfx/pokemon/bellsprout/shiny.pal create mode 100644 gfx/pokemon/bitmask_pointers.asm create mode 100644 gfx/pokemon/bitmasks.asm create mode 100644 gfx/pokemon/blastoise/anim.asm create mode 100644 gfx/pokemon/blastoise/anim_idle.asm create mode 100644 gfx/pokemon/blastoise/back.png create mode 100644 gfx/pokemon/blastoise/front.png create mode 100644 gfx/pokemon/blastoise/shiny.pal create mode 100644 gfx/pokemon/blissey/anim.asm create mode 100644 gfx/pokemon/blissey/anim_idle.asm create mode 100644 gfx/pokemon/blissey/back.png create mode 100644 gfx/pokemon/blissey/front.png create mode 100644 gfx/pokemon/blissey/shiny.pal create mode 100644 gfx/pokemon/bulbasaur/anim.asm create mode 100644 gfx/pokemon/bulbasaur/anim_idle.asm create mode 100644 gfx/pokemon/bulbasaur/back.png create mode 100644 gfx/pokemon/bulbasaur/front.png create mode 100644 gfx/pokemon/bulbasaur/shiny.pal create mode 100644 gfx/pokemon/butterfree/anim.asm create mode 100644 gfx/pokemon/butterfree/anim_idle.asm create mode 100644 gfx/pokemon/butterfree/back.png create mode 100644 gfx/pokemon/butterfree/front.png create mode 100644 gfx/pokemon/butterfree/shiny.pal create mode 100644 gfx/pokemon/caterpie/anim.asm create mode 100644 gfx/pokemon/caterpie/anim_idle.asm create mode 100644 gfx/pokemon/caterpie/back.png create mode 100644 gfx/pokemon/caterpie/front.png create mode 100644 gfx/pokemon/caterpie/shiny.pal create mode 100644 gfx/pokemon/celebi/anim.asm create mode 100644 gfx/pokemon/celebi/anim_idle.asm create mode 100644 gfx/pokemon/celebi/back.png create mode 100644 gfx/pokemon/celebi/front.png create mode 100644 gfx/pokemon/celebi/shiny.pal create mode 100644 gfx/pokemon/chansey/anim.asm create mode 100644 gfx/pokemon/chansey/anim_idle.asm create mode 100644 gfx/pokemon/chansey/back.png create mode 100644 gfx/pokemon/chansey/front.png create mode 100644 gfx/pokemon/chansey/shiny.pal create mode 100644 gfx/pokemon/charizard/anim.asm create mode 100644 gfx/pokemon/charizard/anim_idle.asm create mode 100644 gfx/pokemon/charizard/back.png create mode 100644 gfx/pokemon/charizard/front.png create mode 100644 gfx/pokemon/charizard/shiny.pal create mode 100644 gfx/pokemon/charmander/anim.asm create mode 100644 gfx/pokemon/charmander/anim_idle.asm create mode 100644 gfx/pokemon/charmander/back.png create mode 100644 gfx/pokemon/charmander/front.png create mode 100644 gfx/pokemon/charmander/shiny.pal create mode 100644 gfx/pokemon/charmeleon/anim.asm create mode 100644 gfx/pokemon/charmeleon/anim_idle.asm create mode 100644 gfx/pokemon/charmeleon/back.png create mode 100644 gfx/pokemon/charmeleon/front.png create mode 100644 gfx/pokemon/charmeleon/shiny.pal create mode 100644 gfx/pokemon/chikorita/anim.asm create mode 100644 gfx/pokemon/chikorita/anim_idle.asm create mode 100644 gfx/pokemon/chikorita/back.png create mode 100644 gfx/pokemon/chikorita/front.png create mode 100644 gfx/pokemon/chikorita/shiny.pal create mode 100644 gfx/pokemon/chinchou/anim.asm create mode 100644 gfx/pokemon/chinchou/anim_idle.asm create mode 100644 gfx/pokemon/chinchou/back.png create mode 100644 gfx/pokemon/chinchou/front.png create mode 100644 gfx/pokemon/chinchou/shiny.pal create mode 100644 gfx/pokemon/clefable/anim.asm create mode 100644 gfx/pokemon/clefable/anim_idle.asm create mode 100644 gfx/pokemon/clefable/back.png create mode 100644 gfx/pokemon/clefable/front.png create mode 100644 gfx/pokemon/clefable/shiny.pal create mode 100644 gfx/pokemon/clefairy/anim.asm create mode 100644 gfx/pokemon/clefairy/anim_idle.asm create mode 100644 gfx/pokemon/clefairy/back.png create mode 100644 gfx/pokemon/clefairy/front.png create mode 100644 gfx/pokemon/clefairy/shiny.pal create mode 100644 gfx/pokemon/cleffa/anim.asm create mode 100644 gfx/pokemon/cleffa/anim_idle.asm create mode 100644 gfx/pokemon/cleffa/back.png create mode 100644 gfx/pokemon/cleffa/front.png create mode 100644 gfx/pokemon/cleffa/shiny.pal create mode 100644 gfx/pokemon/cloyster/anim.asm create mode 100644 gfx/pokemon/cloyster/anim_idle.asm create mode 100644 gfx/pokemon/cloyster/back.png create mode 100644 gfx/pokemon/cloyster/front.png create mode 100644 gfx/pokemon/cloyster/shiny.pal create mode 100644 gfx/pokemon/corsola/anim.asm create mode 100644 gfx/pokemon/corsola/anim_idle.asm create mode 100644 gfx/pokemon/corsola/back.png create mode 100644 gfx/pokemon/corsola/front.png create mode 100644 gfx/pokemon/corsola/shiny.pal create mode 100644 gfx/pokemon/crobat/anim.asm create mode 100644 gfx/pokemon/crobat/anim_idle.asm create mode 100644 gfx/pokemon/crobat/back.png create mode 100644 gfx/pokemon/crobat/front.png create mode 100644 gfx/pokemon/crobat/shiny.pal create mode 100644 gfx/pokemon/croconaw/anim.asm create mode 100644 gfx/pokemon/croconaw/anim_idle.asm create mode 100644 gfx/pokemon/croconaw/back.png create mode 100644 gfx/pokemon/croconaw/front.png create mode 100644 gfx/pokemon/croconaw/shiny.pal create mode 100644 gfx/pokemon/cubone/anim.asm create mode 100644 gfx/pokemon/cubone/anim_idle.asm create mode 100644 gfx/pokemon/cubone/back.png create mode 100644 gfx/pokemon/cubone/front.png create mode 100644 gfx/pokemon/cubone/shiny.pal create mode 100644 gfx/pokemon/cyndaquil/anim.asm create mode 100644 gfx/pokemon/cyndaquil/anim_idle.asm create mode 100644 gfx/pokemon/cyndaquil/back.png create mode 100644 gfx/pokemon/cyndaquil/front.png create mode 100644 gfx/pokemon/cyndaquil/shiny.pal create mode 100644 gfx/pokemon/delibird/anim.asm create mode 100644 gfx/pokemon/delibird/anim_idle.asm create mode 100644 gfx/pokemon/delibird/back.png create mode 100644 gfx/pokemon/delibird/front.png create mode 100644 gfx/pokemon/delibird/shiny.pal create mode 100644 gfx/pokemon/dewgong/anim.asm create mode 100644 gfx/pokemon/dewgong/anim_idle.asm create mode 100644 gfx/pokemon/dewgong/back.png create mode 100644 gfx/pokemon/dewgong/front.png create mode 100644 gfx/pokemon/dewgong/shiny.pal create mode 100644 gfx/pokemon/diglett/anim.asm create mode 100644 gfx/pokemon/diglett/anim_idle.asm create mode 100644 gfx/pokemon/diglett/back.png create mode 100644 gfx/pokemon/diglett/front.png create mode 100644 gfx/pokemon/diglett/shiny.pal create mode 100644 gfx/pokemon/ditto/anim.asm create mode 100644 gfx/pokemon/ditto/anim_idle.asm create mode 100644 gfx/pokemon/ditto/back.png create mode 100644 gfx/pokemon/ditto/front.png create mode 100644 gfx/pokemon/ditto/shiny.pal create mode 100644 gfx/pokemon/dodrio/anim.asm create mode 100644 gfx/pokemon/dodrio/anim_idle.asm create mode 100644 gfx/pokemon/dodrio/back.png create mode 100644 gfx/pokemon/dodrio/front.png create mode 100644 gfx/pokemon/dodrio/shiny.pal create mode 100644 gfx/pokemon/doduo/anim.asm create mode 100644 gfx/pokemon/doduo/anim_idle.asm create mode 100644 gfx/pokemon/doduo/back.png create mode 100644 gfx/pokemon/doduo/front.png create mode 100644 gfx/pokemon/doduo/shiny.pal create mode 100644 gfx/pokemon/donphan/anim.asm create mode 100644 gfx/pokemon/donphan/anim_idle.asm create mode 100644 gfx/pokemon/donphan/back.png create mode 100644 gfx/pokemon/donphan/front.png create mode 100644 gfx/pokemon/donphan/shiny.pal create mode 100644 gfx/pokemon/dragonair/anim.asm create mode 100644 gfx/pokemon/dragonair/anim_idle.asm create mode 100644 gfx/pokemon/dragonair/back.png create mode 100644 gfx/pokemon/dragonair/front.png create mode 100644 gfx/pokemon/dragonair/shiny.pal create mode 100644 gfx/pokemon/dragonite/anim.asm create mode 100644 gfx/pokemon/dragonite/anim_idle.asm create mode 100644 gfx/pokemon/dragonite/back.png create mode 100644 gfx/pokemon/dragonite/front.png create mode 100644 gfx/pokemon/dragonite/shiny.pal create mode 100644 gfx/pokemon/dratini/anim.asm create mode 100644 gfx/pokemon/dratini/anim_idle.asm create mode 100644 gfx/pokemon/dratini/back.png create mode 100644 gfx/pokemon/dratini/front.png create mode 100644 gfx/pokemon/dratini/shiny.pal create mode 100644 gfx/pokemon/drowzee/anim.asm create mode 100644 gfx/pokemon/drowzee/anim_idle.asm create mode 100644 gfx/pokemon/drowzee/back.png create mode 100644 gfx/pokemon/drowzee/front.png create mode 100644 gfx/pokemon/drowzee/shiny.pal create mode 100644 gfx/pokemon/dugtrio/anim.asm create mode 100644 gfx/pokemon/dugtrio/anim_idle.asm create mode 100644 gfx/pokemon/dugtrio/back.png create mode 100644 gfx/pokemon/dugtrio/front.png create mode 100644 gfx/pokemon/dugtrio/shiny.pal create mode 100644 gfx/pokemon/dunsparce/anim.asm create mode 100644 gfx/pokemon/dunsparce/anim_idle.asm create mode 100644 gfx/pokemon/dunsparce/back.png create mode 100644 gfx/pokemon/dunsparce/front.png create mode 100644 gfx/pokemon/dunsparce/shiny.pal create mode 100644 gfx/pokemon/eevee/anim.asm create mode 100644 gfx/pokemon/eevee/anim_idle.asm create mode 100644 gfx/pokemon/eevee/back.png create mode 100644 gfx/pokemon/eevee/front.png create mode 100644 gfx/pokemon/eevee/shiny.pal create mode 100644 gfx/pokemon/egg/anim.asm create mode 100644 gfx/pokemon/egg/anim_idle.asm create mode 100644 gfx/pokemon/egg/front.png create mode 100644 gfx/pokemon/egg/shiny.pal create mode 100644 gfx/pokemon/egg/unused_front.png create mode 100644 gfx/pokemon/ekans/anim.asm create mode 100644 gfx/pokemon/ekans/anim_idle.asm create mode 100644 gfx/pokemon/ekans/back.png create mode 100644 gfx/pokemon/ekans/front.png create mode 100644 gfx/pokemon/ekans/shiny.pal create mode 100644 gfx/pokemon/electabuzz/anim.asm create mode 100644 gfx/pokemon/electabuzz/anim_idle.asm create mode 100644 gfx/pokemon/electabuzz/back.png create mode 100644 gfx/pokemon/electabuzz/front.png create mode 100644 gfx/pokemon/electabuzz/shiny.pal create mode 100644 gfx/pokemon/electrode/anim.asm create mode 100644 gfx/pokemon/electrode/anim_idle.asm create mode 100644 gfx/pokemon/electrode/back.png create mode 100644 gfx/pokemon/electrode/front.png create mode 100644 gfx/pokemon/electrode/shiny.pal create mode 100644 gfx/pokemon/elekid/anim.asm create mode 100644 gfx/pokemon/elekid/anim_idle.asm create mode 100644 gfx/pokemon/elekid/back.png create mode 100644 gfx/pokemon/elekid/front.png create mode 100644 gfx/pokemon/elekid/shiny.pal create mode 100644 gfx/pokemon/entei/anim.asm create mode 100644 gfx/pokemon/entei/anim_idle.asm create mode 100644 gfx/pokemon/entei/back.png create mode 100644 gfx/pokemon/entei/front.png create mode 100644 gfx/pokemon/entei/shiny.pal create mode 100644 gfx/pokemon/espeon/anim.asm create mode 100644 gfx/pokemon/espeon/anim_idle.asm create mode 100644 gfx/pokemon/espeon/back.png create mode 100644 gfx/pokemon/espeon/front.png create mode 100644 gfx/pokemon/espeon/shiny.pal create mode 100644 gfx/pokemon/exeggcute/anim.asm create mode 100644 gfx/pokemon/exeggcute/anim_idle.asm create mode 100644 gfx/pokemon/exeggcute/back.png create mode 100644 gfx/pokemon/exeggcute/front.png create mode 100644 gfx/pokemon/exeggcute/shiny.pal create mode 100644 gfx/pokemon/exeggutor/anim.asm create mode 100644 gfx/pokemon/exeggutor/anim_idle.asm create mode 100644 gfx/pokemon/exeggutor/back.png create mode 100644 gfx/pokemon/exeggutor/front.png create mode 100644 gfx/pokemon/exeggutor/shiny.pal create mode 100644 gfx/pokemon/farfetch_d/anim.asm create mode 100644 gfx/pokemon/farfetch_d/anim_idle.asm create mode 100644 gfx/pokemon/farfetch_d/back.png create mode 100644 gfx/pokemon/farfetch_d/front.png create mode 100644 gfx/pokemon/farfetch_d/shiny.pal create mode 100644 gfx/pokemon/fearow/anim.asm create mode 100644 gfx/pokemon/fearow/anim_idle.asm create mode 100644 gfx/pokemon/fearow/back.png create mode 100644 gfx/pokemon/fearow/front.png create mode 100644 gfx/pokemon/fearow/shiny.pal create mode 100644 gfx/pokemon/feraligatr/anim.asm create mode 100644 gfx/pokemon/feraligatr/anim_idle.asm create mode 100644 gfx/pokemon/feraligatr/back.png create mode 100644 gfx/pokemon/feraligatr/front.png create mode 100644 gfx/pokemon/feraligatr/shiny.pal create mode 100644 gfx/pokemon/flaaffy/anim.asm create mode 100644 gfx/pokemon/flaaffy/anim_idle.asm create mode 100644 gfx/pokemon/flaaffy/back.png create mode 100644 gfx/pokemon/flaaffy/front.png create mode 100644 gfx/pokemon/flaaffy/shiny.pal create mode 100644 gfx/pokemon/flareon/anim.asm create mode 100644 gfx/pokemon/flareon/anim_idle.asm create mode 100644 gfx/pokemon/flareon/back.png create mode 100644 gfx/pokemon/flareon/front.png create mode 100644 gfx/pokemon/flareon/shiny.pal create mode 100644 gfx/pokemon/forretress/anim.asm create mode 100644 gfx/pokemon/forretress/anim_idle.asm create mode 100644 gfx/pokemon/forretress/back.png create mode 100644 gfx/pokemon/forretress/front.png create mode 100644 gfx/pokemon/forretress/shiny.pal create mode 100644 gfx/pokemon/frame_pointers.asm create mode 100644 gfx/pokemon/furret/anim.asm create mode 100644 gfx/pokemon/furret/anim_idle.asm create mode 100644 gfx/pokemon/furret/back.png create mode 100644 gfx/pokemon/furret/front.png create mode 100644 gfx/pokemon/furret/shiny.pal create mode 100644 gfx/pokemon/gastly/anim.asm create mode 100644 gfx/pokemon/gastly/anim_idle.asm create mode 100644 gfx/pokemon/gastly/back.png create mode 100644 gfx/pokemon/gastly/front.png create mode 100644 gfx/pokemon/gastly/shiny.pal create mode 100644 gfx/pokemon/gengar/anim.asm create mode 100644 gfx/pokemon/gengar/anim_idle.asm create mode 100644 gfx/pokemon/gengar/back.png create mode 100644 gfx/pokemon/gengar/front.png create mode 100644 gfx/pokemon/gengar/shiny.pal create mode 100644 gfx/pokemon/geodude/anim.asm create mode 100644 gfx/pokemon/geodude/anim_idle.asm create mode 100644 gfx/pokemon/geodude/back.png create mode 100644 gfx/pokemon/geodude/front.png create mode 100644 gfx/pokemon/geodude/shiny.pal create mode 100644 gfx/pokemon/girafarig/anim.asm create mode 100644 gfx/pokemon/girafarig/anim_idle.asm create mode 100644 gfx/pokemon/girafarig/back.png create mode 100644 gfx/pokemon/girafarig/front.png create mode 100644 gfx/pokemon/girafarig/shiny.pal create mode 100644 gfx/pokemon/gligar/anim.asm create mode 100644 gfx/pokemon/gligar/anim_idle.asm create mode 100644 gfx/pokemon/gligar/back.png create mode 100644 gfx/pokemon/gligar/front.png create mode 100644 gfx/pokemon/gligar/shiny.pal create mode 100644 gfx/pokemon/gloom/anim.asm create mode 100644 gfx/pokemon/gloom/anim_idle.asm create mode 100644 gfx/pokemon/gloom/back.png create mode 100644 gfx/pokemon/gloom/front.png create mode 100644 gfx/pokemon/gloom/shiny.pal create mode 100644 gfx/pokemon/golbat/anim.asm create mode 100644 gfx/pokemon/golbat/anim_idle.asm create mode 100644 gfx/pokemon/golbat/back.png create mode 100644 gfx/pokemon/golbat/front.png create mode 100644 gfx/pokemon/golbat/shiny.pal create mode 100644 gfx/pokemon/goldeen/anim.asm create mode 100644 gfx/pokemon/goldeen/anim_idle.asm create mode 100644 gfx/pokemon/goldeen/back.png create mode 100644 gfx/pokemon/goldeen/front.png create mode 100644 gfx/pokemon/goldeen/shiny.pal create mode 100644 gfx/pokemon/golduck/anim.asm create mode 100644 gfx/pokemon/golduck/anim_idle.asm create mode 100644 gfx/pokemon/golduck/back.png create mode 100644 gfx/pokemon/golduck/front.png create mode 100644 gfx/pokemon/golduck/shiny.pal create mode 100644 gfx/pokemon/golem/anim.asm create mode 100644 gfx/pokemon/golem/anim_idle.asm create mode 100644 gfx/pokemon/golem/back.png create mode 100644 gfx/pokemon/golem/front.png create mode 100644 gfx/pokemon/golem/shiny.pal create mode 100644 gfx/pokemon/granbull/anim.asm create mode 100644 gfx/pokemon/granbull/anim_idle.asm create mode 100644 gfx/pokemon/granbull/back.png create mode 100644 gfx/pokemon/granbull/front.png create mode 100644 gfx/pokemon/granbull/shiny.pal create mode 100644 gfx/pokemon/graveler/anim.asm create mode 100644 gfx/pokemon/graveler/anim_idle.asm create mode 100644 gfx/pokemon/graveler/back.png create mode 100644 gfx/pokemon/graveler/front.png create mode 100644 gfx/pokemon/graveler/shiny.pal create mode 100644 gfx/pokemon/grimer/anim.asm create mode 100644 gfx/pokemon/grimer/anim_idle.asm create mode 100644 gfx/pokemon/grimer/back.png create mode 100644 gfx/pokemon/grimer/front.png create mode 100644 gfx/pokemon/grimer/shiny.pal create mode 100644 gfx/pokemon/growlithe/anim.asm create mode 100644 gfx/pokemon/growlithe/anim_idle.asm create mode 100644 gfx/pokemon/growlithe/back.png create mode 100644 gfx/pokemon/growlithe/front.png create mode 100644 gfx/pokemon/growlithe/shiny.pal create mode 100644 gfx/pokemon/gyarados/anim.asm create mode 100644 gfx/pokemon/gyarados/anim_idle.asm create mode 100644 gfx/pokemon/gyarados/back.png create mode 100644 gfx/pokemon/gyarados/front.png create mode 100644 gfx/pokemon/gyarados/shiny.pal create mode 100644 gfx/pokemon/haunter/anim.asm create mode 100644 gfx/pokemon/haunter/anim_idle.asm create mode 100644 gfx/pokemon/haunter/back.png create mode 100644 gfx/pokemon/haunter/front.png create mode 100644 gfx/pokemon/haunter/shiny.pal create mode 100644 gfx/pokemon/heracross/anim.asm create mode 100644 gfx/pokemon/heracross/anim_idle.asm create mode 100644 gfx/pokemon/heracross/back.png create mode 100644 gfx/pokemon/heracross/front.png create mode 100644 gfx/pokemon/heracross/shiny.pal create mode 100644 gfx/pokemon/hitmonchan/anim.asm create mode 100644 gfx/pokemon/hitmonchan/anim_idle.asm create mode 100644 gfx/pokemon/hitmonchan/back.png create mode 100644 gfx/pokemon/hitmonchan/front.png create mode 100644 gfx/pokemon/hitmonchan/shiny.pal create mode 100644 gfx/pokemon/hitmonlee/anim.asm create mode 100644 gfx/pokemon/hitmonlee/anim_idle.asm create mode 100644 gfx/pokemon/hitmonlee/back.png create mode 100644 gfx/pokemon/hitmonlee/front.png create mode 100644 gfx/pokemon/hitmonlee/shiny.pal create mode 100644 gfx/pokemon/hitmontop/anim.asm create mode 100644 gfx/pokemon/hitmontop/anim_idle.asm create mode 100644 gfx/pokemon/hitmontop/back.png create mode 100644 gfx/pokemon/hitmontop/front.png create mode 100644 gfx/pokemon/hitmontop/shiny.pal create mode 100644 gfx/pokemon/ho_oh/anim.asm create mode 100644 gfx/pokemon/ho_oh/anim_idle.asm create mode 100644 gfx/pokemon/ho_oh/back.png create mode 100644 gfx/pokemon/ho_oh/front.png create mode 100644 gfx/pokemon/ho_oh/shiny.pal create mode 100644 gfx/pokemon/hoothoot/anim.asm create mode 100644 gfx/pokemon/hoothoot/anim_idle.asm create mode 100644 gfx/pokemon/hoothoot/back.png create mode 100644 gfx/pokemon/hoothoot/front.png create mode 100644 gfx/pokemon/hoothoot/shiny.pal create mode 100644 gfx/pokemon/hoppip/anim.asm create mode 100644 gfx/pokemon/hoppip/anim_idle.asm create mode 100644 gfx/pokemon/hoppip/back.png create mode 100644 gfx/pokemon/hoppip/front.png create mode 100644 gfx/pokemon/hoppip/shiny.pal create mode 100644 gfx/pokemon/horsea/anim.asm create mode 100644 gfx/pokemon/horsea/anim_idle.asm create mode 100644 gfx/pokemon/horsea/back.png create mode 100644 gfx/pokemon/horsea/front.png create mode 100644 gfx/pokemon/horsea/shiny.pal create mode 100644 gfx/pokemon/houndoom/anim.asm create mode 100644 gfx/pokemon/houndoom/anim_idle.asm create mode 100644 gfx/pokemon/houndoom/back.png create mode 100644 gfx/pokemon/houndoom/front.png create mode 100644 gfx/pokemon/houndoom/shiny.pal create mode 100644 gfx/pokemon/houndour/anim.asm create mode 100644 gfx/pokemon/houndour/anim_idle.asm create mode 100644 gfx/pokemon/houndour/back.png create mode 100644 gfx/pokemon/houndour/front.png create mode 100644 gfx/pokemon/houndour/shiny.pal create mode 100644 gfx/pokemon/hypno/anim.asm create mode 100644 gfx/pokemon/hypno/anim_idle.asm create mode 100644 gfx/pokemon/hypno/back.png create mode 100644 gfx/pokemon/hypno/front.png create mode 100644 gfx/pokemon/hypno/shiny.pal create mode 100644 gfx/pokemon/idle_pointers.asm create mode 100644 gfx/pokemon/idles.asm create mode 100644 gfx/pokemon/igglybuff/anim.asm create mode 100644 gfx/pokemon/igglybuff/anim_idle.asm create mode 100644 gfx/pokemon/igglybuff/back.png create mode 100644 gfx/pokemon/igglybuff/front.png create mode 100644 gfx/pokemon/igglybuff/shiny.pal create mode 100644 gfx/pokemon/ivysaur/anim.asm create mode 100644 gfx/pokemon/ivysaur/anim_idle.asm create mode 100644 gfx/pokemon/ivysaur/back.png create mode 100644 gfx/pokemon/ivysaur/front.png create mode 100644 gfx/pokemon/ivysaur/shiny.pal create mode 100644 gfx/pokemon/jigglypuff/anim.asm create mode 100644 gfx/pokemon/jigglypuff/anim_idle.asm create mode 100644 gfx/pokemon/jigglypuff/back.png create mode 100644 gfx/pokemon/jigglypuff/front.png create mode 100644 gfx/pokemon/jigglypuff/shiny.pal create mode 100644 gfx/pokemon/johto_frames.asm create mode 100644 gfx/pokemon/jolteon/anim.asm create mode 100644 gfx/pokemon/jolteon/anim_idle.asm create mode 100644 gfx/pokemon/jolteon/back.png create mode 100644 gfx/pokemon/jolteon/front.png create mode 100644 gfx/pokemon/jolteon/shiny.pal create mode 100644 gfx/pokemon/jumpluff/anim.asm create mode 100644 gfx/pokemon/jumpluff/anim_idle.asm create mode 100644 gfx/pokemon/jumpluff/back.png create mode 100644 gfx/pokemon/jumpluff/front.png create mode 100644 gfx/pokemon/jumpluff/shiny.pal create mode 100644 gfx/pokemon/jynx/anim.asm create mode 100644 gfx/pokemon/jynx/anim_idle.asm create mode 100644 gfx/pokemon/jynx/back.png create mode 100644 gfx/pokemon/jynx/front.png create mode 100644 gfx/pokemon/jynx/shiny.pal create mode 100644 gfx/pokemon/kabuto/anim.asm create mode 100644 gfx/pokemon/kabuto/anim_idle.asm create mode 100644 gfx/pokemon/kabuto/back.png create mode 100644 gfx/pokemon/kabuto/front.png create mode 100644 gfx/pokemon/kabuto/shiny.pal create mode 100644 gfx/pokemon/kabutops/anim.asm create mode 100644 gfx/pokemon/kabutops/anim_idle.asm create mode 100644 gfx/pokemon/kabutops/back.png create mode 100644 gfx/pokemon/kabutops/front.png create mode 100644 gfx/pokemon/kabutops/shiny.pal create mode 100644 gfx/pokemon/kadabra/anim.asm create mode 100644 gfx/pokemon/kadabra/anim_idle.asm create mode 100644 gfx/pokemon/kadabra/back.png create mode 100644 gfx/pokemon/kadabra/front.png create mode 100644 gfx/pokemon/kadabra/shiny.pal create mode 100644 gfx/pokemon/kakuna/anim.asm create mode 100644 gfx/pokemon/kakuna/anim_idle.asm create mode 100644 gfx/pokemon/kakuna/back.png create mode 100644 gfx/pokemon/kakuna/front.png create mode 100644 gfx/pokemon/kakuna/shiny.pal create mode 100644 gfx/pokemon/kangaskhan/anim.asm create mode 100644 gfx/pokemon/kangaskhan/anim_idle.asm create mode 100644 gfx/pokemon/kangaskhan/back.png create mode 100644 gfx/pokemon/kangaskhan/front.png create mode 100644 gfx/pokemon/kangaskhan/shiny.pal create mode 100644 gfx/pokemon/kanto_frames.asm create mode 100644 gfx/pokemon/kingdra/anim.asm create mode 100644 gfx/pokemon/kingdra/anim_idle.asm create mode 100644 gfx/pokemon/kingdra/back.png create mode 100644 gfx/pokemon/kingdra/front.png create mode 100644 gfx/pokemon/kingdra/shiny.pal create mode 100644 gfx/pokemon/kingler/anim.asm create mode 100644 gfx/pokemon/kingler/anim_idle.asm create mode 100644 gfx/pokemon/kingler/back.png create mode 100644 gfx/pokemon/kingler/front.png create mode 100644 gfx/pokemon/kingler/shiny.pal create mode 100644 gfx/pokemon/koffing/anim.asm create mode 100644 gfx/pokemon/koffing/anim_idle.asm create mode 100644 gfx/pokemon/koffing/back.png create mode 100644 gfx/pokemon/koffing/front.png create mode 100644 gfx/pokemon/koffing/shiny.pal create mode 100644 gfx/pokemon/krabby/anim.asm create mode 100644 gfx/pokemon/krabby/anim_idle.asm create mode 100644 gfx/pokemon/krabby/back.png create mode 100644 gfx/pokemon/krabby/front.png create mode 100644 gfx/pokemon/krabby/shiny.pal create mode 100644 gfx/pokemon/lanturn/anim.asm create mode 100644 gfx/pokemon/lanturn/anim_idle.asm create mode 100644 gfx/pokemon/lanturn/back.png create mode 100644 gfx/pokemon/lanturn/front.png create mode 100644 gfx/pokemon/lanturn/shiny.pal create mode 100644 gfx/pokemon/lapras/anim.asm create mode 100644 gfx/pokemon/lapras/anim_idle.asm create mode 100644 gfx/pokemon/lapras/back.png create mode 100644 gfx/pokemon/lapras/front.png create mode 100644 gfx/pokemon/lapras/shiny.pal create mode 100644 gfx/pokemon/larvitar/anim.asm create mode 100644 gfx/pokemon/larvitar/anim_idle.asm create mode 100644 gfx/pokemon/larvitar/back.png create mode 100644 gfx/pokemon/larvitar/front.png create mode 100644 gfx/pokemon/larvitar/shiny.pal create mode 100644 gfx/pokemon/ledian/anim.asm create mode 100644 gfx/pokemon/ledian/anim_idle.asm create mode 100644 gfx/pokemon/ledian/back.png create mode 100644 gfx/pokemon/ledian/front.png create mode 100644 gfx/pokemon/ledian/shiny.pal create mode 100644 gfx/pokemon/ledyba/anim.asm create mode 100644 gfx/pokemon/ledyba/anim_idle.asm create mode 100644 gfx/pokemon/ledyba/back.png create mode 100644 gfx/pokemon/ledyba/front.png create mode 100644 gfx/pokemon/ledyba/shiny.pal create mode 100644 gfx/pokemon/lickitung/anim.asm create mode 100644 gfx/pokemon/lickitung/anim_idle.asm create mode 100644 gfx/pokemon/lickitung/back.png create mode 100644 gfx/pokemon/lickitung/front.png create mode 100644 gfx/pokemon/lickitung/shiny.pal create mode 100644 gfx/pokemon/lugia/anim.asm create mode 100644 gfx/pokemon/lugia/anim_idle.asm create mode 100644 gfx/pokemon/lugia/back.png create mode 100644 gfx/pokemon/lugia/front.png create mode 100644 gfx/pokemon/lugia/shiny.pal create mode 100644 gfx/pokemon/machamp/anim.asm create mode 100644 gfx/pokemon/machamp/anim_idle.asm create mode 100644 gfx/pokemon/machamp/back.png create mode 100644 gfx/pokemon/machamp/front.png create mode 100644 gfx/pokemon/machamp/shiny.pal create mode 100644 gfx/pokemon/machoke/anim.asm create mode 100644 gfx/pokemon/machoke/anim_idle.asm create mode 100644 gfx/pokemon/machoke/back.png create mode 100644 gfx/pokemon/machoke/front.png create mode 100644 gfx/pokemon/machoke/shiny.pal create mode 100644 gfx/pokemon/machop/anim.asm create mode 100644 gfx/pokemon/machop/anim_idle.asm create mode 100644 gfx/pokemon/machop/back.png create mode 100644 gfx/pokemon/machop/front.png create mode 100644 gfx/pokemon/machop/shiny.pal create mode 100644 gfx/pokemon/magby/anim.asm create mode 100644 gfx/pokemon/magby/anim_idle.asm create mode 100644 gfx/pokemon/magby/back.png create mode 100644 gfx/pokemon/magby/front.png create mode 100644 gfx/pokemon/magby/shiny.pal create mode 100644 gfx/pokemon/magcargo/anim.asm create mode 100644 gfx/pokemon/magcargo/anim_idle.asm create mode 100644 gfx/pokemon/magcargo/back.png create mode 100644 gfx/pokemon/magcargo/front.png create mode 100644 gfx/pokemon/magcargo/shiny.pal create mode 100644 gfx/pokemon/magikarp/anim.asm create mode 100644 gfx/pokemon/magikarp/anim_idle.asm create mode 100644 gfx/pokemon/magikarp/back.png create mode 100644 gfx/pokemon/magikarp/front.png create mode 100644 gfx/pokemon/magikarp/shiny.pal create mode 100644 gfx/pokemon/magmar/anim.asm create mode 100644 gfx/pokemon/magmar/anim_idle.asm create mode 100644 gfx/pokemon/magmar/back.png create mode 100644 gfx/pokemon/magmar/front.png create mode 100644 gfx/pokemon/magmar/shiny.pal create mode 100644 gfx/pokemon/magnemite/anim.asm create mode 100644 gfx/pokemon/magnemite/anim_idle.asm create mode 100644 gfx/pokemon/magnemite/back.png create mode 100644 gfx/pokemon/magnemite/front.png create mode 100644 gfx/pokemon/magnemite/shiny.pal create mode 100644 gfx/pokemon/magneton/anim.asm create mode 100644 gfx/pokemon/magneton/anim_idle.asm create mode 100644 gfx/pokemon/magneton/back.png create mode 100644 gfx/pokemon/magneton/front.png create mode 100644 gfx/pokemon/magneton/shiny.pal create mode 100644 gfx/pokemon/mankey/anim.asm create mode 100644 gfx/pokemon/mankey/anim_idle.asm create mode 100644 gfx/pokemon/mankey/back.png create mode 100644 gfx/pokemon/mankey/front.png create mode 100644 gfx/pokemon/mankey/shiny.pal create mode 100644 gfx/pokemon/mantine/anim.asm create mode 100644 gfx/pokemon/mantine/anim_idle.asm create mode 100644 gfx/pokemon/mantine/back.png create mode 100644 gfx/pokemon/mantine/front.png create mode 100644 gfx/pokemon/mantine/shiny.pal create mode 100644 gfx/pokemon/mareep/anim.asm create mode 100644 gfx/pokemon/mareep/anim_idle.asm create mode 100644 gfx/pokemon/mareep/back.png create mode 100644 gfx/pokemon/mareep/front.png create mode 100644 gfx/pokemon/mareep/shiny.pal create mode 100644 gfx/pokemon/marill/anim.asm create mode 100644 gfx/pokemon/marill/anim_idle.asm create mode 100644 gfx/pokemon/marill/back.png create mode 100644 gfx/pokemon/marill/front.png create mode 100644 gfx/pokemon/marill/shiny.pal create mode 100644 gfx/pokemon/marowak/anim.asm create mode 100644 gfx/pokemon/marowak/anim_idle.asm create mode 100644 gfx/pokemon/marowak/back.png create mode 100644 gfx/pokemon/marowak/front.png create mode 100644 gfx/pokemon/marowak/shiny.pal create mode 100644 gfx/pokemon/meganium/anim.asm create mode 100644 gfx/pokemon/meganium/anim_idle.asm create mode 100644 gfx/pokemon/meganium/back.png create mode 100644 gfx/pokemon/meganium/front.png create mode 100644 gfx/pokemon/meganium/shiny.pal create mode 100644 gfx/pokemon/meowth/anim.asm create mode 100644 gfx/pokemon/meowth/anim_idle.asm create mode 100644 gfx/pokemon/meowth/back.png create mode 100644 gfx/pokemon/meowth/front.png create mode 100644 gfx/pokemon/meowth/shiny.pal create mode 100644 gfx/pokemon/metapod/anim.asm create mode 100644 gfx/pokemon/metapod/anim_idle.asm create mode 100644 gfx/pokemon/metapod/back.png create mode 100644 gfx/pokemon/metapod/front.png create mode 100644 gfx/pokemon/metapod/shiny.pal create mode 100644 gfx/pokemon/mew/anim.asm create mode 100644 gfx/pokemon/mew/anim_idle.asm create mode 100644 gfx/pokemon/mew/back.png create mode 100644 gfx/pokemon/mew/front.png create mode 100644 gfx/pokemon/mew/shiny.pal create mode 100644 gfx/pokemon/mewtwo/anim.asm create mode 100644 gfx/pokemon/mewtwo/anim_idle.asm create mode 100644 gfx/pokemon/mewtwo/back.png create mode 100644 gfx/pokemon/mewtwo/front.png create mode 100644 gfx/pokemon/mewtwo/shiny.pal create mode 100644 gfx/pokemon/miltank/anim.asm create mode 100644 gfx/pokemon/miltank/anim_idle.asm create mode 100644 gfx/pokemon/miltank/back.png create mode 100644 gfx/pokemon/miltank/front.png create mode 100644 gfx/pokemon/miltank/shiny.pal create mode 100644 gfx/pokemon/misdreavus/anim.asm create mode 100644 gfx/pokemon/misdreavus/anim_idle.asm create mode 100644 gfx/pokemon/misdreavus/back.png create mode 100644 gfx/pokemon/misdreavus/front.png create mode 100644 gfx/pokemon/misdreavus/shiny.pal create mode 100644 gfx/pokemon/moltres/anim.asm create mode 100644 gfx/pokemon/moltres/anim_idle.asm create mode 100644 gfx/pokemon/moltres/back.png create mode 100644 gfx/pokemon/moltres/front.png create mode 100644 gfx/pokemon/moltres/shiny.pal create mode 100644 gfx/pokemon/mr__mime/anim.asm create mode 100644 gfx/pokemon/mr__mime/anim_idle.asm create mode 100644 gfx/pokemon/mr__mime/back.png create mode 100644 gfx/pokemon/mr__mime/front.png create mode 100644 gfx/pokemon/mr__mime/shiny.pal create mode 100644 gfx/pokemon/muk/anim.asm create mode 100644 gfx/pokemon/muk/anim_idle.asm create mode 100644 gfx/pokemon/muk/back.png create mode 100644 gfx/pokemon/muk/front.png create mode 100644 gfx/pokemon/muk/shiny.pal create mode 100644 gfx/pokemon/murkrow/anim.asm create mode 100644 gfx/pokemon/murkrow/anim_idle.asm create mode 100644 gfx/pokemon/murkrow/back.png create mode 100644 gfx/pokemon/murkrow/front.png create mode 100644 gfx/pokemon/murkrow/shiny.pal create mode 100644 gfx/pokemon/natu/anim.asm create mode 100644 gfx/pokemon/natu/anim_idle.asm create mode 100644 gfx/pokemon/natu/back.png create mode 100644 gfx/pokemon/natu/front.png create mode 100644 gfx/pokemon/natu/shiny.pal create mode 100644 gfx/pokemon/nidoking/anim.asm create mode 100644 gfx/pokemon/nidoking/anim_idle.asm create mode 100644 gfx/pokemon/nidoking/back.png create mode 100644 gfx/pokemon/nidoking/front.png create mode 100644 gfx/pokemon/nidoking/shiny.pal create mode 100644 gfx/pokemon/nidoqueen/anim.asm create mode 100644 gfx/pokemon/nidoqueen/anim_idle.asm create mode 100644 gfx/pokemon/nidoqueen/back.png create mode 100644 gfx/pokemon/nidoqueen/front.png create mode 100644 gfx/pokemon/nidoqueen/shiny.pal create mode 100644 gfx/pokemon/nidoran_f/anim.asm create mode 100644 gfx/pokemon/nidoran_f/anim_idle.asm create mode 100644 gfx/pokemon/nidoran_f/back.png create mode 100644 gfx/pokemon/nidoran_f/front.png create mode 100644 gfx/pokemon/nidoran_f/shiny.pal create mode 100644 gfx/pokemon/nidoran_m/anim.asm create mode 100644 gfx/pokemon/nidoran_m/anim_idle.asm create mode 100644 gfx/pokemon/nidoran_m/back.png create mode 100644 gfx/pokemon/nidoran_m/front.png create mode 100644 gfx/pokemon/nidoran_m/shiny.pal create mode 100644 gfx/pokemon/nidorina/anim.asm create mode 100644 gfx/pokemon/nidorina/anim_idle.asm create mode 100644 gfx/pokemon/nidorina/back.png create mode 100644 gfx/pokemon/nidorina/front.png create mode 100644 gfx/pokemon/nidorina/shiny.pal create mode 100644 gfx/pokemon/nidorino/anim.asm create mode 100644 gfx/pokemon/nidorino/anim_idle.asm create mode 100644 gfx/pokemon/nidorino/back.png create mode 100644 gfx/pokemon/nidorino/front.png create mode 100644 gfx/pokemon/nidorino/shiny.pal create mode 100644 gfx/pokemon/ninetales/anim.asm create mode 100644 gfx/pokemon/ninetales/anim_idle.asm create mode 100644 gfx/pokemon/ninetales/back.png create mode 100644 gfx/pokemon/ninetales/front.png create mode 100644 gfx/pokemon/ninetales/shiny.pal create mode 100644 gfx/pokemon/noctowl/anim.asm create mode 100644 gfx/pokemon/noctowl/anim_idle.asm create mode 100644 gfx/pokemon/noctowl/back.png create mode 100644 gfx/pokemon/noctowl/front.png create mode 100644 gfx/pokemon/noctowl/shiny.pal create mode 100644 gfx/pokemon/octillery/anim.asm create mode 100644 gfx/pokemon/octillery/anim_idle.asm create mode 100644 gfx/pokemon/octillery/back.png create mode 100644 gfx/pokemon/octillery/front.png create mode 100644 gfx/pokemon/octillery/shiny.pal create mode 100644 gfx/pokemon/oddish/anim.asm create mode 100644 gfx/pokemon/oddish/anim_idle.asm create mode 100644 gfx/pokemon/oddish/back.png create mode 100644 gfx/pokemon/oddish/front.png create mode 100644 gfx/pokemon/oddish/shiny.pal create mode 100644 gfx/pokemon/omanyte/anim.asm create mode 100644 gfx/pokemon/omanyte/anim_idle.asm create mode 100644 gfx/pokemon/omanyte/back.png create mode 100644 gfx/pokemon/omanyte/front.png create mode 100644 gfx/pokemon/omanyte/shiny.pal create mode 100644 gfx/pokemon/omastar/anim.asm create mode 100644 gfx/pokemon/omastar/anim_idle.asm create mode 100644 gfx/pokemon/omastar/back.png create mode 100644 gfx/pokemon/omastar/front.png create mode 100644 gfx/pokemon/omastar/shiny.pal create mode 100644 gfx/pokemon/onix/anim.asm create mode 100644 gfx/pokemon/onix/anim_idle.asm create mode 100644 gfx/pokemon/onix/back.png create mode 100644 gfx/pokemon/onix/front.png create mode 100644 gfx/pokemon/onix/shiny.pal create mode 100644 gfx/pokemon/paras/anim.asm create mode 100644 gfx/pokemon/paras/anim_idle.asm create mode 100644 gfx/pokemon/paras/back.png create mode 100644 gfx/pokemon/paras/front.png create mode 100644 gfx/pokemon/paras/shiny.pal create mode 100644 gfx/pokemon/parasect/anim.asm create mode 100644 gfx/pokemon/parasect/anim_idle.asm create mode 100644 gfx/pokemon/parasect/back.png create mode 100644 gfx/pokemon/parasect/front.png create mode 100644 gfx/pokemon/parasect/shiny.pal create mode 100644 gfx/pokemon/persian/anim.asm create mode 100644 gfx/pokemon/persian/anim_idle.asm create mode 100644 gfx/pokemon/persian/back.png create mode 100644 gfx/pokemon/persian/front.png create mode 100644 gfx/pokemon/persian/shiny.pal create mode 100644 gfx/pokemon/phanpy/anim.asm create mode 100644 gfx/pokemon/phanpy/anim_idle.asm create mode 100644 gfx/pokemon/phanpy/back.png create mode 100644 gfx/pokemon/phanpy/front.png create mode 100644 gfx/pokemon/phanpy/shiny.pal create mode 100644 gfx/pokemon/pichu/anim.asm create mode 100644 gfx/pokemon/pichu/anim_idle.asm create mode 100644 gfx/pokemon/pichu/back.png create mode 100644 gfx/pokemon/pichu/front.png create mode 100644 gfx/pokemon/pichu/shiny.pal create mode 100644 gfx/pokemon/pidgeot/anim.asm create mode 100644 gfx/pokemon/pidgeot/anim_idle.asm create mode 100644 gfx/pokemon/pidgeot/back.png create mode 100644 gfx/pokemon/pidgeot/front.png create mode 100644 gfx/pokemon/pidgeot/shiny.pal create mode 100644 gfx/pokemon/pidgeotto/anim.asm create mode 100644 gfx/pokemon/pidgeotto/anim_idle.asm create mode 100644 gfx/pokemon/pidgeotto/back.png create mode 100644 gfx/pokemon/pidgeotto/front.png create mode 100644 gfx/pokemon/pidgeotto/shiny.pal create mode 100644 gfx/pokemon/pidgey/anim.asm create mode 100644 gfx/pokemon/pidgey/anim_idle.asm create mode 100644 gfx/pokemon/pidgey/back.png create mode 100644 gfx/pokemon/pidgey/front.png create mode 100644 gfx/pokemon/pidgey/shiny.pal create mode 100644 gfx/pokemon/pikachu/anim.asm create mode 100644 gfx/pokemon/pikachu/anim_idle.asm create mode 100644 gfx/pokemon/pikachu/back.png create mode 100644 gfx/pokemon/pikachu/front.png create mode 100644 gfx/pokemon/pikachu/shiny.pal create mode 100644 gfx/pokemon/piloswine/anim.asm create mode 100644 gfx/pokemon/piloswine/anim_idle.asm create mode 100644 gfx/pokemon/piloswine/back.png create mode 100644 gfx/pokemon/piloswine/front.png create mode 100644 gfx/pokemon/piloswine/shiny.pal create mode 100644 gfx/pokemon/pineco/anim.asm create mode 100644 gfx/pokemon/pineco/anim_idle.asm create mode 100644 gfx/pokemon/pineco/back.png create mode 100644 gfx/pokemon/pineco/front.png create mode 100644 gfx/pokemon/pineco/shiny.pal create mode 100644 gfx/pokemon/pinsir/anim.asm create mode 100644 gfx/pokemon/pinsir/anim_idle.asm create mode 100644 gfx/pokemon/pinsir/back.png create mode 100644 gfx/pokemon/pinsir/front.png create mode 100644 gfx/pokemon/pinsir/shiny.pal create mode 100644 gfx/pokemon/politoed/anim.asm create mode 100644 gfx/pokemon/politoed/anim_idle.asm create mode 100644 gfx/pokemon/politoed/back.png create mode 100644 gfx/pokemon/politoed/front.png create mode 100644 gfx/pokemon/politoed/shiny.pal create mode 100644 gfx/pokemon/poliwag/anim.asm create mode 100644 gfx/pokemon/poliwag/anim_idle.asm create mode 100644 gfx/pokemon/poliwag/back.png create mode 100644 gfx/pokemon/poliwag/front.png create mode 100644 gfx/pokemon/poliwag/shiny.pal create mode 100644 gfx/pokemon/poliwhirl/anim.asm create mode 100644 gfx/pokemon/poliwhirl/anim_idle.asm create mode 100644 gfx/pokemon/poliwhirl/back.png create mode 100644 gfx/pokemon/poliwhirl/front.png create mode 100644 gfx/pokemon/poliwhirl/shiny.pal create mode 100644 gfx/pokemon/poliwrath/anim.asm create mode 100644 gfx/pokemon/poliwrath/anim_idle.asm create mode 100644 gfx/pokemon/poliwrath/back.png create mode 100644 gfx/pokemon/poliwrath/front.png create mode 100644 gfx/pokemon/poliwrath/shiny.pal create mode 100644 gfx/pokemon/ponyta/anim.asm create mode 100644 gfx/pokemon/ponyta/anim_idle.asm create mode 100644 gfx/pokemon/ponyta/back.png create mode 100644 gfx/pokemon/ponyta/front.png create mode 100644 gfx/pokemon/ponyta/shiny.pal create mode 100644 gfx/pokemon/porygon/anim.asm create mode 100644 gfx/pokemon/porygon/anim_idle.asm create mode 100644 gfx/pokemon/porygon/back.png create mode 100644 gfx/pokemon/porygon/front.png create mode 100644 gfx/pokemon/porygon/shiny.pal create mode 100644 gfx/pokemon/porygon2/anim.asm create mode 100644 gfx/pokemon/porygon2/anim_idle.asm create mode 100644 gfx/pokemon/porygon2/back.png create mode 100644 gfx/pokemon/porygon2/front.png create mode 100644 gfx/pokemon/porygon2/shiny.pal create mode 100644 gfx/pokemon/primeape/anim.asm create mode 100644 gfx/pokemon/primeape/anim_idle.asm create mode 100644 gfx/pokemon/primeape/back.png create mode 100644 gfx/pokemon/primeape/front.png create mode 100644 gfx/pokemon/primeape/shiny.pal create mode 100644 gfx/pokemon/psyduck/anim.asm create mode 100644 gfx/pokemon/psyduck/anim_idle.asm create mode 100644 gfx/pokemon/psyduck/back.png create mode 100644 gfx/pokemon/psyduck/front.png create mode 100644 gfx/pokemon/psyduck/shiny.pal create mode 100644 gfx/pokemon/pupitar/anim.asm create mode 100644 gfx/pokemon/pupitar/anim_idle.asm create mode 100644 gfx/pokemon/pupitar/back.png create mode 100644 gfx/pokemon/pupitar/front.png create mode 100644 gfx/pokemon/pupitar/shiny.pal create mode 100644 gfx/pokemon/quagsire/anim.asm create mode 100644 gfx/pokemon/quagsire/anim_idle.asm create mode 100644 gfx/pokemon/quagsire/back.png create mode 100644 gfx/pokemon/quagsire/front.png create mode 100644 gfx/pokemon/quagsire/shiny.pal create mode 100644 gfx/pokemon/quilava/anim.asm create mode 100644 gfx/pokemon/quilava/anim_idle.asm create mode 100644 gfx/pokemon/quilava/back.png create mode 100644 gfx/pokemon/quilava/front.png create mode 100644 gfx/pokemon/quilava/shiny.pal create mode 100644 gfx/pokemon/qwilfish/anim.asm create mode 100644 gfx/pokemon/qwilfish/anim_idle.asm create mode 100644 gfx/pokemon/qwilfish/back.png create mode 100644 gfx/pokemon/qwilfish/front.png create mode 100644 gfx/pokemon/qwilfish/shiny.pal create mode 100644 gfx/pokemon/raichu/anim.asm create mode 100644 gfx/pokemon/raichu/anim_idle.asm create mode 100644 gfx/pokemon/raichu/back.png create mode 100644 gfx/pokemon/raichu/front.png create mode 100644 gfx/pokemon/raichu/shiny.pal create mode 100644 gfx/pokemon/raikou/anim.asm create mode 100644 gfx/pokemon/raikou/anim_idle.asm create mode 100644 gfx/pokemon/raikou/back.png create mode 100644 gfx/pokemon/raikou/front.png create mode 100644 gfx/pokemon/raikou/shiny.pal create mode 100644 gfx/pokemon/rapidash/anim.asm create mode 100644 gfx/pokemon/rapidash/anim_idle.asm create mode 100644 gfx/pokemon/rapidash/back.png create mode 100644 gfx/pokemon/rapidash/front.png create mode 100644 gfx/pokemon/rapidash/shiny.pal create mode 100644 gfx/pokemon/raticate/anim.asm create mode 100644 gfx/pokemon/raticate/anim_idle.asm create mode 100644 gfx/pokemon/raticate/back.png create mode 100644 gfx/pokemon/raticate/front.png create mode 100644 gfx/pokemon/raticate/shiny.pal create mode 100644 gfx/pokemon/rattata/anim.asm create mode 100644 gfx/pokemon/rattata/anim_idle.asm create mode 100644 gfx/pokemon/rattata/back.png create mode 100644 gfx/pokemon/rattata/front.png create mode 100644 gfx/pokemon/rattata/shiny.pal create mode 100644 gfx/pokemon/remoraid/anim.asm create mode 100644 gfx/pokemon/remoraid/anim_idle.asm create mode 100644 gfx/pokemon/remoraid/back.png create mode 100644 gfx/pokemon/remoraid/front.png create mode 100644 gfx/pokemon/remoraid/shiny.pal create mode 100644 gfx/pokemon/rhydon/anim.asm create mode 100644 gfx/pokemon/rhydon/anim_idle.asm create mode 100644 gfx/pokemon/rhydon/back.png create mode 100644 gfx/pokemon/rhydon/front.png create mode 100644 gfx/pokemon/rhydon/shiny.pal create mode 100644 gfx/pokemon/rhyhorn/anim.asm create mode 100644 gfx/pokemon/rhyhorn/anim_idle.asm create mode 100644 gfx/pokemon/rhyhorn/back.png create mode 100644 gfx/pokemon/rhyhorn/front.png create mode 100644 gfx/pokemon/rhyhorn/shiny.pal create mode 100644 gfx/pokemon/sandshrew/anim.asm create mode 100644 gfx/pokemon/sandshrew/anim_idle.asm create mode 100644 gfx/pokemon/sandshrew/back.png create mode 100644 gfx/pokemon/sandshrew/front.png create mode 100644 gfx/pokemon/sandshrew/shiny.pal create mode 100644 gfx/pokemon/sandslash/anim.asm create mode 100644 gfx/pokemon/sandslash/anim_idle.asm create mode 100644 gfx/pokemon/sandslash/back.png create mode 100644 gfx/pokemon/sandslash/front.png create mode 100644 gfx/pokemon/sandslash/shiny.pal create mode 100644 gfx/pokemon/scizor/anim.asm create mode 100644 gfx/pokemon/scizor/anim_idle.asm create mode 100644 gfx/pokemon/scizor/back.png create mode 100644 gfx/pokemon/scizor/front.png create mode 100644 gfx/pokemon/scizor/shiny.pal create mode 100644 gfx/pokemon/scyther/anim.asm create mode 100644 gfx/pokemon/scyther/anim_idle.asm create mode 100644 gfx/pokemon/scyther/back.png create mode 100644 gfx/pokemon/scyther/front.png create mode 100644 gfx/pokemon/scyther/shiny.pal create mode 100644 gfx/pokemon/seadra/anim.asm create mode 100644 gfx/pokemon/seadra/anim_idle.asm create mode 100644 gfx/pokemon/seadra/back.png create mode 100644 gfx/pokemon/seadra/front.png create mode 100644 gfx/pokemon/seadra/shiny.pal create mode 100644 gfx/pokemon/seaking/anim.asm create mode 100644 gfx/pokemon/seaking/anim_idle.asm create mode 100644 gfx/pokemon/seaking/back.png create mode 100644 gfx/pokemon/seaking/front.png create mode 100644 gfx/pokemon/seaking/shiny.pal create mode 100644 gfx/pokemon/seel/anim.asm create mode 100644 gfx/pokemon/seel/anim_idle.asm create mode 100644 gfx/pokemon/seel/back.png create mode 100644 gfx/pokemon/seel/front.png create mode 100644 gfx/pokemon/seel/shiny.pal create mode 100644 gfx/pokemon/sentret/anim.asm create mode 100644 gfx/pokemon/sentret/anim_idle.asm create mode 100644 gfx/pokemon/sentret/back.png create mode 100644 gfx/pokemon/sentret/front.png create mode 100644 gfx/pokemon/sentret/shiny.pal create mode 100644 gfx/pokemon/shellder/anim.asm create mode 100644 gfx/pokemon/shellder/anim_idle.asm create mode 100644 gfx/pokemon/shellder/back.png create mode 100644 gfx/pokemon/shellder/front.png create mode 100644 gfx/pokemon/shellder/shiny.pal create mode 100644 gfx/pokemon/shuckle/anim.asm create mode 100644 gfx/pokemon/shuckle/anim_idle.asm create mode 100644 gfx/pokemon/shuckle/back.png create mode 100644 gfx/pokemon/shuckle/front.png create mode 100644 gfx/pokemon/shuckle/shiny.pal create mode 100644 gfx/pokemon/skarmory/anim.asm create mode 100644 gfx/pokemon/skarmory/anim_idle.asm create mode 100644 gfx/pokemon/skarmory/back.png create mode 100644 gfx/pokemon/skarmory/front.png create mode 100644 gfx/pokemon/skarmory/shiny.pal create mode 100644 gfx/pokemon/skiploom/anim.asm create mode 100644 gfx/pokemon/skiploom/anim_idle.asm create mode 100644 gfx/pokemon/skiploom/back.png create mode 100644 gfx/pokemon/skiploom/front.png create mode 100644 gfx/pokemon/skiploom/shiny.pal create mode 100644 gfx/pokemon/slowbro/anim.asm create mode 100644 gfx/pokemon/slowbro/anim_idle.asm create mode 100644 gfx/pokemon/slowbro/back.png create mode 100644 gfx/pokemon/slowbro/front.png create mode 100644 gfx/pokemon/slowbro/shiny.pal create mode 100644 gfx/pokemon/slowking/anim.asm create mode 100644 gfx/pokemon/slowking/anim_idle.asm create mode 100644 gfx/pokemon/slowking/back.png create mode 100644 gfx/pokemon/slowking/front.png create mode 100644 gfx/pokemon/slowking/shiny.pal create mode 100644 gfx/pokemon/slowpoke/anim.asm create mode 100644 gfx/pokemon/slowpoke/anim_idle.asm create mode 100644 gfx/pokemon/slowpoke/back.png create mode 100644 gfx/pokemon/slowpoke/front.png create mode 100644 gfx/pokemon/slowpoke/shiny.pal create mode 100644 gfx/pokemon/slugma/anim.asm create mode 100644 gfx/pokemon/slugma/anim_idle.asm create mode 100644 gfx/pokemon/slugma/back.png create mode 100644 gfx/pokemon/slugma/front.png create mode 100644 gfx/pokemon/slugma/shiny.pal create mode 100644 gfx/pokemon/smeargle/anim.asm create mode 100644 gfx/pokemon/smeargle/anim_idle.asm create mode 100644 gfx/pokemon/smeargle/back.png create mode 100644 gfx/pokemon/smeargle/front.png create mode 100644 gfx/pokemon/smeargle/shiny.pal create mode 100644 gfx/pokemon/smoochum/anim.asm create mode 100644 gfx/pokemon/smoochum/anim_idle.asm create mode 100644 gfx/pokemon/smoochum/back.png create mode 100644 gfx/pokemon/smoochum/front.png create mode 100644 gfx/pokemon/smoochum/shiny.pal create mode 100644 gfx/pokemon/sneasel/anim.asm create mode 100644 gfx/pokemon/sneasel/anim_idle.asm create mode 100644 gfx/pokemon/sneasel/back.png create mode 100644 gfx/pokemon/sneasel/front.png create mode 100644 gfx/pokemon/sneasel/shiny.pal create mode 100644 gfx/pokemon/snorlax/anim.asm create mode 100644 gfx/pokemon/snorlax/anim_idle.asm create mode 100644 gfx/pokemon/snorlax/back.png create mode 100644 gfx/pokemon/snorlax/front.png create mode 100644 gfx/pokemon/snorlax/shiny.pal create mode 100644 gfx/pokemon/snubbull/anim.asm create mode 100644 gfx/pokemon/snubbull/anim_idle.asm create mode 100644 gfx/pokemon/snubbull/back.png create mode 100644 gfx/pokemon/snubbull/front.png create mode 100644 gfx/pokemon/snubbull/shiny.pal create mode 100644 gfx/pokemon/spearow/anim.asm create mode 100644 gfx/pokemon/spearow/anim_idle.asm create mode 100644 gfx/pokemon/spearow/back.png create mode 100644 gfx/pokemon/spearow/front.png create mode 100644 gfx/pokemon/spearow/shiny.pal create mode 100644 gfx/pokemon/spinarak/anim.asm create mode 100644 gfx/pokemon/spinarak/anim_idle.asm create mode 100644 gfx/pokemon/spinarak/back.png create mode 100644 gfx/pokemon/spinarak/front.png create mode 100644 gfx/pokemon/spinarak/shiny.pal create mode 100644 gfx/pokemon/squirtle/anim.asm create mode 100644 gfx/pokemon/squirtle/anim_idle.asm create mode 100644 gfx/pokemon/squirtle/back.png create mode 100644 gfx/pokemon/squirtle/front.png create mode 100644 gfx/pokemon/squirtle/shiny.pal create mode 100644 gfx/pokemon/stantler/anim.asm create mode 100644 gfx/pokemon/stantler/anim_idle.asm create mode 100644 gfx/pokemon/stantler/back.png create mode 100644 gfx/pokemon/stantler/front.png create mode 100644 gfx/pokemon/stantler/shiny.pal create mode 100644 gfx/pokemon/starmie/anim.asm create mode 100644 gfx/pokemon/starmie/anim_idle.asm create mode 100644 gfx/pokemon/starmie/back.png create mode 100644 gfx/pokemon/starmie/front.png create mode 100644 gfx/pokemon/starmie/shiny.pal create mode 100644 gfx/pokemon/staryu/anim.asm create mode 100644 gfx/pokemon/staryu/anim_idle.asm create mode 100644 gfx/pokemon/staryu/back.png create mode 100644 gfx/pokemon/staryu/front.png create mode 100644 gfx/pokemon/staryu/shiny.pal create mode 100644 gfx/pokemon/steelix/anim.asm create mode 100644 gfx/pokemon/steelix/anim_idle.asm create mode 100644 gfx/pokemon/steelix/back.png create mode 100644 gfx/pokemon/steelix/front.png create mode 100644 gfx/pokemon/steelix/shiny.pal create mode 100644 gfx/pokemon/sudowoodo/anim.asm create mode 100644 gfx/pokemon/sudowoodo/anim_idle.asm create mode 100644 gfx/pokemon/sudowoodo/back.png create mode 100644 gfx/pokemon/sudowoodo/front.png create mode 100644 gfx/pokemon/sudowoodo/shiny.pal create mode 100644 gfx/pokemon/suicune/anim.asm create mode 100644 gfx/pokemon/suicune/anim_idle.asm create mode 100644 gfx/pokemon/suicune/back.png create mode 100644 gfx/pokemon/suicune/front.png create mode 100644 gfx/pokemon/suicune/shiny.pal create mode 100644 gfx/pokemon/sunflora/anim.asm create mode 100644 gfx/pokemon/sunflora/anim_idle.asm create mode 100644 gfx/pokemon/sunflora/back.png create mode 100644 gfx/pokemon/sunflora/front.png create mode 100644 gfx/pokemon/sunflora/shiny.pal create mode 100644 gfx/pokemon/sunkern/anim.asm create mode 100644 gfx/pokemon/sunkern/anim_idle.asm create mode 100644 gfx/pokemon/sunkern/back.png create mode 100644 gfx/pokemon/sunkern/front.png create mode 100644 gfx/pokemon/sunkern/shiny.pal create mode 100644 gfx/pokemon/swinub/anim.asm create mode 100644 gfx/pokemon/swinub/anim_idle.asm create mode 100644 gfx/pokemon/swinub/back.png create mode 100644 gfx/pokemon/swinub/front.png create mode 100644 gfx/pokemon/swinub/shiny.pal create mode 100644 gfx/pokemon/tangela/anim.asm create mode 100644 gfx/pokemon/tangela/anim_idle.asm create mode 100644 gfx/pokemon/tangela/back.png create mode 100644 gfx/pokemon/tangela/front.png create mode 100644 gfx/pokemon/tangela/shiny.pal create mode 100644 gfx/pokemon/tauros/anim.asm create mode 100644 gfx/pokemon/tauros/anim_idle.asm create mode 100644 gfx/pokemon/tauros/back.png create mode 100644 gfx/pokemon/tauros/front.png create mode 100644 gfx/pokemon/tauros/shiny.pal create mode 100644 gfx/pokemon/teddiursa/anim.asm create mode 100644 gfx/pokemon/teddiursa/anim_idle.asm create mode 100644 gfx/pokemon/teddiursa/back.png create mode 100644 gfx/pokemon/teddiursa/front.png create mode 100644 gfx/pokemon/teddiursa/shiny.pal create mode 100644 gfx/pokemon/tentacool/anim.asm create mode 100644 gfx/pokemon/tentacool/anim_idle.asm create mode 100644 gfx/pokemon/tentacool/back.png create mode 100644 gfx/pokemon/tentacool/front.png create mode 100644 gfx/pokemon/tentacool/shiny.pal create mode 100644 gfx/pokemon/tentacruel/anim.asm create mode 100644 gfx/pokemon/tentacruel/anim_idle.asm create mode 100644 gfx/pokemon/tentacruel/back.png create mode 100644 gfx/pokemon/tentacruel/front.png create mode 100644 gfx/pokemon/tentacruel/shiny.pal create mode 100644 gfx/pokemon/togepi/anim.asm create mode 100644 gfx/pokemon/togepi/anim_idle.asm create mode 100644 gfx/pokemon/togepi/back.png create mode 100644 gfx/pokemon/togepi/front.png create mode 100644 gfx/pokemon/togepi/shiny.pal create mode 100644 gfx/pokemon/togetic/anim.asm create mode 100644 gfx/pokemon/togetic/anim_idle.asm create mode 100644 gfx/pokemon/togetic/back.png create mode 100644 gfx/pokemon/togetic/front.png create mode 100644 gfx/pokemon/togetic/shiny.pal create mode 100644 gfx/pokemon/totodile/anim.asm create mode 100644 gfx/pokemon/totodile/anim_idle.asm create mode 100644 gfx/pokemon/totodile/back.png create mode 100644 gfx/pokemon/totodile/front.png create mode 100644 gfx/pokemon/totodile/shiny.pal create mode 100644 gfx/pokemon/typhlosion/anim.asm create mode 100644 gfx/pokemon/typhlosion/anim_idle.asm create mode 100644 gfx/pokemon/typhlosion/back.png create mode 100644 gfx/pokemon/typhlosion/front.png create mode 100644 gfx/pokemon/typhlosion/shiny.pal create mode 100644 gfx/pokemon/tyranitar/anim.asm create mode 100644 gfx/pokemon/tyranitar/anim_idle.asm create mode 100644 gfx/pokemon/tyranitar/back.png create mode 100644 gfx/pokemon/tyranitar/front.png create mode 100644 gfx/pokemon/tyranitar/shiny.pal create mode 100644 gfx/pokemon/tyrogue/anim.asm create mode 100644 gfx/pokemon/tyrogue/anim_idle.asm create mode 100644 gfx/pokemon/tyrogue/back.png create mode 100644 gfx/pokemon/tyrogue/front.png create mode 100644 gfx/pokemon/tyrogue/shiny.pal create mode 100644 gfx/pokemon/umbreon/anim.asm create mode 100644 gfx/pokemon/umbreon/anim_idle.asm create mode 100644 gfx/pokemon/umbreon/back.png create mode 100644 gfx/pokemon/umbreon/front.png create mode 100644 gfx/pokemon/umbreon/shiny.pal create mode 100644 gfx/pokemon/unown/anim.asm create mode 100644 gfx/pokemon/unown/anim_idle.asm create mode 100644 gfx/pokemon/unown/bitmask.asm create mode 100644 gfx/pokemon/unown/frames.asm create mode 100644 gfx/pokemon/unown/normal.pal create mode 100644 gfx/pokemon/unown/shiny.pal create mode 100644 gfx/pokemon/unown_a/anim.asm create mode 100644 gfx/pokemon/unown_a/anim_idle.asm create mode 100644 gfx/pokemon/unown_a/back.png create mode 100644 gfx/pokemon/unown_a/front.png create mode 100644 gfx/pokemon/unown_anim_pointers.asm create mode 100644 gfx/pokemon/unown_anims.asm create mode 100644 gfx/pokemon/unown_b/anim.asm create mode 100644 gfx/pokemon/unown_b/anim_idle.asm create mode 100644 gfx/pokemon/unown_b/back.png create mode 100644 gfx/pokemon/unown_b/front.png create mode 100644 gfx/pokemon/unown_bitmask_pointers.asm create mode 100644 gfx/pokemon/unown_bitmasks.asm create mode 100644 gfx/pokemon/unown_c/anim.asm create mode 100644 gfx/pokemon/unown_c/anim_idle.asm create mode 100644 gfx/pokemon/unown_c/back.png create mode 100644 gfx/pokemon/unown_c/front.png create mode 100644 gfx/pokemon/unown_d/anim.asm create mode 100644 gfx/pokemon/unown_d/anim_idle.asm create mode 100644 gfx/pokemon/unown_d/back.png create mode 100644 gfx/pokemon/unown_d/front.png create mode 100644 gfx/pokemon/unown_e/anim.asm create mode 100644 gfx/pokemon/unown_e/anim_idle.asm create mode 100644 gfx/pokemon/unown_e/back.png create mode 100644 gfx/pokemon/unown_e/front.png create mode 100644 gfx/pokemon/unown_f/anim.asm create mode 100644 gfx/pokemon/unown_f/anim_idle.asm create mode 100644 gfx/pokemon/unown_f/back.png create mode 100644 gfx/pokemon/unown_f/front.png create mode 100644 gfx/pokemon/unown_frame_pointers.asm create mode 100644 gfx/pokemon/unown_frames.asm create mode 100644 gfx/pokemon/unown_g/anim.asm create mode 100644 gfx/pokemon/unown_g/anim_idle.asm create mode 100644 gfx/pokemon/unown_g/back.png create mode 100644 gfx/pokemon/unown_g/front.png create mode 100644 gfx/pokemon/unown_h/anim.asm create mode 100644 gfx/pokemon/unown_h/anim_idle.asm create mode 100644 gfx/pokemon/unown_h/back.png create mode 100644 gfx/pokemon/unown_h/front.png create mode 100644 gfx/pokemon/unown_i/anim.asm create mode 100644 gfx/pokemon/unown_i/anim_idle.asm create mode 100644 gfx/pokemon/unown_i/back.png create mode 100644 gfx/pokemon/unown_i/front.png create mode 100644 gfx/pokemon/unown_idle_pointers.asm create mode 100644 gfx/pokemon/unown_idles.asm create mode 100644 gfx/pokemon/unown_j/anim.asm create mode 100644 gfx/pokemon/unown_j/anim_idle.asm create mode 100644 gfx/pokemon/unown_j/back.png create mode 100644 gfx/pokemon/unown_j/front.png create mode 100644 gfx/pokemon/unown_k/anim.asm create mode 100644 gfx/pokemon/unown_k/anim_idle.asm create mode 100644 gfx/pokemon/unown_k/back.png create mode 100644 gfx/pokemon/unown_k/front.png create mode 100644 gfx/pokemon/unown_l/anim.asm create mode 100644 gfx/pokemon/unown_l/anim_idle.asm create mode 100644 gfx/pokemon/unown_l/back.png create mode 100644 gfx/pokemon/unown_l/front.png create mode 100644 gfx/pokemon/unown_m/anim.asm create mode 100644 gfx/pokemon/unown_m/anim_idle.asm create mode 100644 gfx/pokemon/unown_m/back.png create mode 100644 gfx/pokemon/unown_m/front.png create mode 100644 gfx/pokemon/unown_n/anim.asm create mode 100644 gfx/pokemon/unown_n/anim_idle.asm create mode 100644 gfx/pokemon/unown_n/back.png create mode 100644 gfx/pokemon/unown_n/front.png create mode 100644 gfx/pokemon/unown_o/anim.asm create mode 100644 gfx/pokemon/unown_o/anim_idle.asm create mode 100644 gfx/pokemon/unown_o/back.png create mode 100644 gfx/pokemon/unown_o/front.png create mode 100644 gfx/pokemon/unown_p/anim.asm create mode 100644 gfx/pokemon/unown_p/anim_idle.asm create mode 100644 gfx/pokemon/unown_p/back.png create mode 100644 gfx/pokemon/unown_p/front.png create mode 100644 gfx/pokemon/unown_q/anim.asm create mode 100644 gfx/pokemon/unown_q/anim_idle.asm create mode 100644 gfx/pokemon/unown_q/back.png create mode 100644 gfx/pokemon/unown_q/front.png create mode 100644 gfx/pokemon/unown_r/anim.asm create mode 100644 gfx/pokemon/unown_r/anim_idle.asm create mode 100644 gfx/pokemon/unown_r/back.png create mode 100644 gfx/pokemon/unown_r/front.png create mode 100644 gfx/pokemon/unown_s/anim.asm create mode 100644 gfx/pokemon/unown_s/anim_idle.asm create mode 100644 gfx/pokemon/unown_s/back.png create mode 100644 gfx/pokemon/unown_s/front.png create mode 100644 gfx/pokemon/unown_t/anim.asm create mode 100644 gfx/pokemon/unown_t/anim_idle.asm create mode 100644 gfx/pokemon/unown_t/back.png create mode 100644 gfx/pokemon/unown_t/front.png create mode 100644 gfx/pokemon/unown_u/anim.asm create mode 100644 gfx/pokemon/unown_u/anim_idle.asm create mode 100644 gfx/pokemon/unown_u/back.png create mode 100644 gfx/pokemon/unown_u/front.png create mode 100644 gfx/pokemon/unown_v/anim.asm create mode 100644 gfx/pokemon/unown_v/anim_idle.asm create mode 100644 gfx/pokemon/unown_v/back.png create mode 100644 gfx/pokemon/unown_v/front.png create mode 100644 gfx/pokemon/unown_w/anim.asm create mode 100644 gfx/pokemon/unown_w/anim_idle.asm create mode 100644 gfx/pokemon/unown_w/back.png create mode 100644 gfx/pokemon/unown_w/front.png create mode 100644 gfx/pokemon/unown_x/anim.asm create mode 100644 gfx/pokemon/unown_x/anim_idle.asm create mode 100644 gfx/pokemon/unown_x/back.png create mode 100644 gfx/pokemon/unown_x/front.png create mode 100644 gfx/pokemon/unown_y/anim.asm create mode 100644 gfx/pokemon/unown_y/anim_idle.asm create mode 100644 gfx/pokemon/unown_y/back.png create mode 100644 gfx/pokemon/unown_y/front.png create mode 100644 gfx/pokemon/unown_z/anim.asm create mode 100644 gfx/pokemon/unown_z/anim_idle.asm create mode 100644 gfx/pokemon/unown_z/back.png create mode 100644 gfx/pokemon/unown_z/front.png create mode 100644 gfx/pokemon/ursaring/anim.asm create mode 100644 gfx/pokemon/ursaring/anim_idle.asm create mode 100644 gfx/pokemon/ursaring/back.png create mode 100644 gfx/pokemon/ursaring/front.png create mode 100644 gfx/pokemon/ursaring/shiny.pal create mode 100644 gfx/pokemon/vaporeon/anim.asm create mode 100644 gfx/pokemon/vaporeon/anim_idle.asm create mode 100644 gfx/pokemon/vaporeon/back.png create mode 100644 gfx/pokemon/vaporeon/front.png create mode 100644 gfx/pokemon/vaporeon/shiny.pal create mode 100644 gfx/pokemon/venomoth/anim.asm create mode 100644 gfx/pokemon/venomoth/anim_idle.asm create mode 100644 gfx/pokemon/venomoth/back.png create mode 100644 gfx/pokemon/venomoth/front.png create mode 100644 gfx/pokemon/venomoth/shiny.pal create mode 100644 gfx/pokemon/venonat/anim.asm create mode 100644 gfx/pokemon/venonat/anim_idle.asm create mode 100644 gfx/pokemon/venonat/back.png create mode 100644 gfx/pokemon/venonat/front.png create mode 100644 gfx/pokemon/venonat/shiny.pal create mode 100644 gfx/pokemon/venusaur/anim.asm create mode 100644 gfx/pokemon/venusaur/anim_idle.asm create mode 100644 gfx/pokemon/venusaur/back.png create mode 100644 gfx/pokemon/venusaur/front.png create mode 100644 gfx/pokemon/venusaur/shiny.pal create mode 100644 gfx/pokemon/victreebel/anim.asm create mode 100644 gfx/pokemon/victreebel/anim_idle.asm create mode 100644 gfx/pokemon/victreebel/back.png create mode 100644 gfx/pokemon/victreebel/front.png create mode 100644 gfx/pokemon/victreebel/shiny.pal create mode 100644 gfx/pokemon/vileplume/anim.asm create mode 100644 gfx/pokemon/vileplume/anim_idle.asm create mode 100644 gfx/pokemon/vileplume/back.png create mode 100644 gfx/pokemon/vileplume/front.png create mode 100644 gfx/pokemon/vileplume/shiny.pal create mode 100644 gfx/pokemon/voltorb/anim.asm create mode 100644 gfx/pokemon/voltorb/anim_idle.asm create mode 100644 gfx/pokemon/voltorb/back.png create mode 100644 gfx/pokemon/voltorb/front.png create mode 100644 gfx/pokemon/voltorb/shiny.pal create mode 100644 gfx/pokemon/vulpix/anim.asm create mode 100644 gfx/pokemon/vulpix/anim_idle.asm create mode 100644 gfx/pokemon/vulpix/back.png create mode 100644 gfx/pokemon/vulpix/front.png create mode 100644 gfx/pokemon/vulpix/shiny.pal create mode 100644 gfx/pokemon/wartortle/anim.asm create mode 100644 gfx/pokemon/wartortle/anim_idle.asm create mode 100644 gfx/pokemon/wartortle/back.png create mode 100644 gfx/pokemon/wartortle/front.png create mode 100644 gfx/pokemon/wartortle/shiny.pal create mode 100644 gfx/pokemon/weedle/anim.asm create mode 100644 gfx/pokemon/weedle/anim_idle.asm create mode 100644 gfx/pokemon/weedle/back.png create mode 100644 gfx/pokemon/weedle/front.png create mode 100644 gfx/pokemon/weedle/shiny.pal create mode 100644 gfx/pokemon/weepinbell/anim.asm create mode 100644 gfx/pokemon/weepinbell/anim_idle.asm create mode 100644 gfx/pokemon/weepinbell/back.png create mode 100644 gfx/pokemon/weepinbell/front.png create mode 100644 gfx/pokemon/weepinbell/shiny.pal create mode 100644 gfx/pokemon/weezing/anim.asm create mode 100644 gfx/pokemon/weezing/anim_idle.asm create mode 100644 gfx/pokemon/weezing/back.png create mode 100644 gfx/pokemon/weezing/front.png create mode 100644 gfx/pokemon/weezing/shiny.pal create mode 100644 gfx/pokemon/wigglytuff/anim.asm create mode 100644 gfx/pokemon/wigglytuff/anim_idle.asm create mode 100644 gfx/pokemon/wigglytuff/back.png create mode 100644 gfx/pokemon/wigglytuff/front.png create mode 100644 gfx/pokemon/wigglytuff/shiny.pal create mode 100644 gfx/pokemon/wobbuffet/anim.asm create mode 100644 gfx/pokemon/wobbuffet/anim_idle.asm create mode 100644 gfx/pokemon/wobbuffet/back.png create mode 100644 gfx/pokemon/wobbuffet/front.png create mode 100644 gfx/pokemon/wobbuffet/shiny.pal create mode 100644 gfx/pokemon/wooper/anim.asm create mode 100644 gfx/pokemon/wooper/anim_idle.asm create mode 100644 gfx/pokemon/wooper/back.png create mode 100644 gfx/pokemon/wooper/front.png create mode 100644 gfx/pokemon/wooper/shiny.pal create mode 100644 gfx/pokemon/xatu/anim.asm create mode 100644 gfx/pokemon/xatu/anim_idle.asm create mode 100644 gfx/pokemon/xatu/back.png create mode 100644 gfx/pokemon/xatu/front.png create mode 100644 gfx/pokemon/xatu/shiny.pal create mode 100644 gfx/pokemon/yanma/anim.asm create mode 100644 gfx/pokemon/yanma/anim_idle.asm create mode 100644 gfx/pokemon/yanma/back.png create mode 100644 gfx/pokemon/yanma/front.png create mode 100644 gfx/pokemon/yanma/shiny.pal create mode 100644 gfx/pokemon/zapdos/anim.asm create mode 100644 gfx/pokemon/zapdos/anim_idle.asm create mode 100644 gfx/pokemon/zapdos/back.png create mode 100644 gfx/pokemon/zapdos/front.png create mode 100644 gfx/pokemon/zapdos/shiny.pal create mode 100644 gfx/pokemon/zubat/anim.asm create mode 100644 gfx/pokemon/zubat/anim_idle.asm create mode 100644 gfx/pokemon/zubat/back.png create mode 100644 gfx/pokemon/zubat/front.png create mode 100644 gfx/pokemon/zubat/shiny.pal create mode 100644 gfx/printer/bold_a.png create mode 100644 gfx/printer/bold_b.png create mode 100644 gfx/printer/hp.png create mode 100644 gfx/printer/lv.png create mode 100644 gfx/sgb/blk_packets.asm create mode 100644 gfx/sgb/gbc_only.png create mode 100644 gfx/sgb/pal_packets.asm create mode 100644 gfx/sgb/predef.pal create mode 100644 gfx/sgb/sgb_border.bin create mode 100644 gfx/sgb/sgb_border.pal create mode 100644 gfx/sgb/sgb_border.png create mode 100644 gfx/slots/slots.pal create mode 100644 gfx/slots/slots.tilemap create mode 100644 gfx/slots/slots_1.png create mode 100644 gfx/slots/slots_2.png create mode 100644 gfx/slots/slots_3.png create mode 100644 gfx/splash/copyright.png create mode 100644 gfx/splash/ditto.pal create mode 100644 gfx/splash/ditto.png create mode 100644 gfx/splash/ditto_fade.pal create mode 100644 gfx/splash/gamefreak_logo.png create mode 100644 gfx/splash/gamefreak_presents.png create mode 100644 gfx/sprites.asm create mode 100644 gfx/sprites/beauty.png create mode 100644 gfx/sprites/big_lapras.png create mode 100644 gfx/sprites/big_onix.png create mode 100644 gfx/sprites/big_snorlax.png create mode 100644 gfx/sprites/biker.png create mode 100644 gfx/sprites/bill.png create mode 100644 gfx/sprites/bird.png create mode 100644 gfx/sprites/black_belt.png create mode 100644 gfx/sprites/blaine.png create mode 100644 gfx/sprites/blue.png create mode 100644 gfx/sprites/boulder.png create mode 100644 gfx/sprites/brock.png create mode 100644 gfx/sprites/bruno.png create mode 100644 gfx/sprites/bug_catcher.png create mode 100644 gfx/sprites/bugsy.png create mode 100644 gfx/sprites/cal.png create mode 100644 gfx/sprites/captain.png create mode 100644 gfx/sprites/chris.png create mode 100644 gfx/sprites/chris_bike.png create mode 100644 gfx/sprites/chuck.png create mode 100644 gfx/sprites/clair.png create mode 100644 gfx/sprites/clerk.png create mode 100644 gfx/sprites/cooltrainer_f.png create mode 100644 gfx/sprites/cooltrainer_m.png create mode 100644 gfx/sprites/daisy.png create mode 100644 gfx/sprites/dragon.png create mode 100644 gfx/sprites/elder.png create mode 100644 gfx/sprites/elm.png create mode 100644 gfx/sprites/entei.png create mode 100644 gfx/sprites/erika.png create mode 100644 gfx/sprites/fairy.png create mode 100644 gfx/sprites/falkner.png create mode 100644 gfx/sprites/famicom.png create mode 100644 gfx/sprites/fisher.png create mode 100644 gfx/sprites/fishing_guru.png create mode 100644 gfx/sprites/fruit_tree.png create mode 100644 gfx/sprites/gameboy_kid.png create mode 100644 gfx/sprites/gentleman.png create mode 100644 gfx/sprites/gold_trophy.png create mode 100644 gfx/sprites/gramps.png create mode 100644 gfx/sprites/granny.png create mode 100644 gfx/sprites/gym_guide.png create mode 100644 gfx/sprites/janine.png create mode 100644 gfx/sprites/jasmine.png create mode 100644 gfx/sprites/karen.png create mode 100644 gfx/sprites/kimono_girl.png create mode 100644 gfx/sprites/koga.png create mode 100644 gfx/sprites/kris.png create mode 100644 gfx/sprites/kris_bike.png create mode 100644 gfx/sprites/kurt.png create mode 100644 gfx/sprites/kurt_outside.png create mode 100644 gfx/sprites/lance.png create mode 100644 gfx/sprites/lass.png create mode 100644 gfx/sprites/link_receptionist.png create mode 100644 gfx/sprites/misty.png create mode 100644 gfx/sprites/mom.png create mode 100644 gfx/sprites/monster.png create mode 100644 gfx/sprites/morty.png create mode 100644 gfx/sprites/n64.png create mode 100644 gfx/sprites/nurse.png create mode 100644 gfx/sprites/oak.png create mode 100644 gfx/sprites/officer.png create mode 100644 gfx/sprites/old_link_receptionist.png create mode 100644 gfx/sprites/paper.png create mode 100644 gfx/sprites/pharmacist.png create mode 100644 gfx/sprites/poke_ball.png create mode 100644 gfx/sprites/pokedex.png create mode 100644 gfx/sprites/pokefan_f.png create mode 100644 gfx/sprites/pokefan_m.png create mode 100644 gfx/sprites/pryce.png create mode 100644 gfx/sprites/raikou.png create mode 100644 gfx/sprites/receptionist.png create mode 100644 gfx/sprites/red.png create mode 100644 gfx/sprites/reds_mom.png create mode 100644 gfx/sprites/rival.png create mode 100644 gfx/sprites/rock.png create mode 100644 gfx/sprites/rocker.png create mode 100644 gfx/sprites/rocket.png create mode 100644 gfx/sprites/rocket_girl.png create mode 100644 gfx/sprites/sabrina.png create mode 100644 gfx/sprites/sage.png create mode 100644 gfx/sprites/sailor.png create mode 100644 gfx/sprites/scientist.png create mode 100644 gfx/sprites/silver_trophy.png create mode 100644 gfx/sprites/slowpoke.png create mode 100644 gfx/sprites/snes.png create mode 100644 gfx/sprites/standing_youngster.png create mode 100644 gfx/sprites/sudowoodo.png create mode 100644 gfx/sprites/suicune.png create mode 100644 gfx/sprites/super_nerd.png create mode 100644 gfx/sprites/surf.png create mode 100644 gfx/sprites/surfing_pikachu.png create mode 100644 gfx/sprites/surge.png create mode 100644 gfx/sprites/swimmer_girl.png create mode 100644 gfx/sprites/swimmer_guy.png create mode 100644 gfx/sprites/teacher.png create mode 100644 gfx/sprites/twin.png create mode 100644 gfx/sprites/unused_guy.png create mode 100644 gfx/sprites/virtual_boy.png create mode 100644 gfx/sprites/whitney.png create mode 100644 gfx/sprites/will.png create mode 100644 gfx/sprites/youngster.png create mode 100644 gfx/stats/item.png create mode 100644 gfx/stats/mail.png create mode 100644 gfx/stats/pages.pal create mode 100644 gfx/stats/party_menu_bg.pal create mode 100644 gfx/stats/party_menu_bg_mobile.pal create mode 100644 gfx/stats/party_menu_ob.pal create mode 100644 gfx/stats/stats.pal create mode 100644 gfx/stats/stats_tiles.png create mode 100644 gfx/tileset_palette_maps.asm create mode 100644 gfx/tilesets.asm create mode 100644 gfx/tilesets/aerodactyl_word_room.png create mode 100644 gfx/tilesets/aerodactyl_word_room_palette_map.asm create mode 100644 gfx/tilesets/battle_tower_inside.pal create mode 100644 gfx/tilesets/battle_tower_inside.png create mode 100644 gfx/tilesets/battle_tower_inside_palette_map.asm create mode 100644 gfx/tilesets/battle_tower_outside.png create mode 100644 gfx/tilesets/battle_tower_outside_palette_map.asm create mode 100644 gfx/tilesets/beta_word_room.png create mode 100644 gfx/tilesets/beta_word_room_palette_map.asm create mode 100644 gfx/tilesets/bg_tiles.pal create mode 100644 gfx/tilesets/cave.png create mode 100644 gfx/tilesets/cave_palette_map.asm create mode 100644 gfx/tilesets/champions_room.png create mode 100644 gfx/tilesets/champions_room_palette_map.asm create mode 100644 gfx/tilesets/dark_cave.png create mode 100644 gfx/tilesets/dark_cave_palette_map.asm create mode 100644 gfx/tilesets/elite_four_room.png create mode 100644 gfx/tilesets/elite_four_room_palette_map.asm create mode 100644 gfx/tilesets/facility.png create mode 100644 gfx/tilesets/facility_palette_map.asm create mode 100644 gfx/tilesets/flower/cgb_1.png create mode 100644 gfx/tilesets/flower/cgb_2.png create mode 100644 gfx/tilesets/flower/dmg_1.png create mode 100644 gfx/tilesets/flower/dmg_2.png create mode 100644 gfx/tilesets/forest-tree/1.png create mode 100644 gfx/tilesets/forest-tree/2.png create mode 100644 gfx/tilesets/forest-tree/3.png create mode 100644 gfx/tilesets/forest-tree/4.png create mode 100644 gfx/tilesets/forest.png create mode 100644 gfx/tilesets/forest_palette_map.asm create mode 100644 gfx/tilesets/fountain/1.png create mode 100644 gfx/tilesets/fountain/2.png create mode 100644 gfx/tilesets/fountain/3.png create mode 100644 gfx/tilesets/fountain/4.png create mode 100644 gfx/tilesets/fountain/5.png create mode 100644 gfx/tilesets/game_corner.png create mode 100644 gfx/tilesets/game_corner_palette_map.asm create mode 100644 gfx/tilesets/gate.png create mode 100644 gfx/tilesets/gate_palette_map.asm create mode 100644 gfx/tilesets/ho_oh_word_room.png create mode 100644 gfx/tilesets/ho_oh_word_room_palette_map.asm create mode 100644 gfx/tilesets/house.pal create mode 100644 gfx/tilesets/house.png create mode 100644 gfx/tilesets/house_palette_map.asm create mode 100644 gfx/tilesets/ice_path.pal create mode 100644 gfx/tilesets/ice_path.png create mode 100644 gfx/tilesets/ice_path_palette_map.asm create mode 100644 gfx/tilesets/johto.png create mode 100644 gfx/tilesets/johto_modern.png create mode 100644 gfx/tilesets/johto_modern_palette_map.asm create mode 100644 gfx/tilesets/johto_palette_map.asm create mode 100644 gfx/tilesets/kabuto_word_room.png create mode 100644 gfx/tilesets/kabuto_word_room_palette_map.asm create mode 100644 gfx/tilesets/kanto.png create mode 100644 gfx/tilesets/kanto_palette_map.asm create mode 100644 gfx/tilesets/lab.png create mode 100644 gfx/tilesets/lab_palette_map.asm create mode 100644 gfx/tilesets/lava/1.png create mode 100644 gfx/tilesets/lava/2.png create mode 100644 gfx/tilesets/lava/3.png create mode 100644 gfx/tilesets/lava/4.png create mode 100644 gfx/tilesets/lighthouse.png create mode 100644 gfx/tilesets/lighthouse_palette_map.asm create mode 100644 gfx/tilesets/mansion.png create mode 100644 gfx/tilesets/mansion_1.pal create mode 100644 gfx/tilesets/mansion_2.pal create mode 100644 gfx/tilesets/mansion_palette_map.asm create mode 100644 gfx/tilesets/mart.png create mode 100644 gfx/tilesets/mart_palette_map.asm create mode 100644 gfx/tilesets/omanyte_word_room.png create mode 100644 gfx/tilesets/omanyte_word_room_palette_map.asm create mode 100644 gfx/tilesets/park.png create mode 100644 gfx/tilesets/park_palette_map.asm create mode 100644 gfx/tilesets/players_house.png create mode 100644 gfx/tilesets/players_house_palette_map.asm create mode 100644 gfx/tilesets/players_room.png create mode 100644 gfx/tilesets/players_room_palette_map.asm create mode 100644 gfx/tilesets/pokecenter.png create mode 100644 gfx/tilesets/pokecenter_palette_map.asm create mode 100644 gfx/tilesets/pokecom_center.pal create mode 100644 gfx/tilesets/pokecom_center.png create mode 100644 gfx/tilesets/pokecom_center_palette_map.asm create mode 100644 gfx/tilesets/port.png create mode 100644 gfx/tilesets/port_palette_map.asm create mode 100644 gfx/tilesets/radio_tower.pal create mode 100644 gfx/tilesets/radio_tower.png create mode 100644 gfx/tilesets/radio_tower_palette_map.asm create mode 100644 gfx/tilesets/roofs.pal create mode 100644 gfx/tilesets/roofs/azalea.png create mode 100644 gfx/tilesets/roofs/goldenrod.png create mode 100644 gfx/tilesets/roofs/new_bark.png create mode 100644 gfx/tilesets/roofs/olivine.png create mode 100644 gfx/tilesets/roofs/violet.png create mode 100644 gfx/tilesets/ruins_of_alph.png create mode 100644 gfx/tilesets/ruins_of_alph_palette_map.asm create mode 100644 gfx/tilesets/tower-pillar/1.png create mode 100644 gfx/tilesets/tower-pillar/10.png create mode 100644 gfx/tilesets/tower-pillar/2.png create mode 100644 gfx/tilesets/tower-pillar/3.png create mode 100644 gfx/tilesets/tower-pillar/4.png create mode 100644 gfx/tilesets/tower-pillar/5.png create mode 100644 gfx/tilesets/tower-pillar/6.png create mode 100644 gfx/tilesets/tower-pillar/7.png create mode 100644 gfx/tilesets/tower-pillar/8.png create mode 100644 gfx/tilesets/tower-pillar/9.png create mode 100644 gfx/tilesets/tower.png create mode 100644 gfx/tilesets/tower_palette_map.asm create mode 100644 gfx/tilesets/traditional_house.png create mode 100644 gfx/tilesets/traditional_house_palette_map.asm create mode 100644 gfx/tilesets/train_station.png create mode 100644 gfx/tilesets/train_station_palette_map.asm create mode 100644 gfx/tilesets/underground.png create mode 100644 gfx/tilesets/underground_palette_map.asm create mode 100644 gfx/tilesets/unused_museum_palette_map.asm create mode 100644 gfx/tilesets/water/water.png create mode 100644 gfx/tilesets/whirlpool/1.png create mode 100644 gfx/tilesets/whirlpool/2.png create mode 100644 gfx/tilesets/whirlpool/3.png create mode 100644 gfx/tilesets/whirlpool/4.png create mode 100644 gfx/title/crystal.png create mode 100644 gfx/title/logo.png create mode 100644 gfx/title/suicune.png create mode 100644 gfx/title/title.pal create mode 100644 gfx/title/unused_gs_bg.pal create mode 100644 gfx/title/unused_gs_fg.pal create mode 100644 gfx/trade/arrow_left.png create mode 100644 gfx/trade/arrow_right.png create mode 100644 gfx/trade/ball.png create mode 100644 gfx/trade/border.pal create mode 100644 gfx/trade/border_cable_bottom.tilemap create mode 100644 gfx/trade/border_cable_top.tilemap create mode 100644 gfx/trade/border_mobile.tilemap create mode 100644 gfx/trade/border_tiles.png create mode 100644 gfx/trade/bubble.png create mode 100644 gfx/trade/cable.png create mode 100644 gfx/trade/game_boy.png create mode 100644 gfx/trade/game_boy.tilemap create mode 100644 gfx/trade/link_cable.png create mode 100644 gfx/trade/link_cable.tilemap create mode 100644 gfx/trade/mobile_border.pal create mode 100644 gfx/trade/poof.png create mode 100644 gfx/trade/unused_gs_border_tiles.png create mode 100644 gfx/trainer_card/badges.png create mode 100644 gfx/trainer_card/card_right_corner.png create mode 100644 gfx/trainer_card/card_status.png create mode 100644 gfx/trainer_card/chris_card.png create mode 100644 gfx/trainer_card/kris_card.png create mode 100644 gfx/trainer_card/leaders.png create mode 100644 gfx/trainer_card/trainer_card.png create mode 100644 gfx/trainers/beauty.png create mode 100644 gfx/trainers/biker.png create mode 100644 gfx/trainers/bird_keeper.png create mode 100644 gfx/trainers/blackbelt_t.png create mode 100644 gfx/trainers/blaine.png create mode 100644 gfx/trainers/blue.png create mode 100644 gfx/trainers/boarder.png create mode 100644 gfx/trainers/brock.png create mode 100644 gfx/trainers/bruno.png create mode 100644 gfx/trainers/bug_catcher.png create mode 100644 gfx/trainers/bugsy.png create mode 100644 gfx/trainers/burglar.png create mode 100644 gfx/trainers/cal.png create mode 100644 gfx/trainers/camper.png create mode 100644 gfx/trainers/champion.png create mode 100644 gfx/trainers/chuck.png create mode 100644 gfx/trainers/clair.png create mode 100644 gfx/trainers/cooltrainer_f.png create mode 100644 gfx/trainers/cooltrainer_m.png create mode 100644 gfx/trainers/erika.png create mode 100644 gfx/trainers/executive_f.png create mode 100644 gfx/trainers/executive_m.png create mode 100644 gfx/trainers/falkner.png create mode 100644 gfx/trainers/firebreather.png create mode 100644 gfx/trainers/fisher.png create mode 100644 gfx/trainers/gentleman.png create mode 100644 gfx/trainers/grunt_f.png create mode 100644 gfx/trainers/grunt_m.png create mode 100644 gfx/trainers/guitarist.png create mode 100644 gfx/trainers/hiker.png create mode 100644 gfx/trainers/janine.png create mode 100644 gfx/trainers/jasmine.png create mode 100644 gfx/trainers/juggler.png create mode 100644 gfx/trainers/karen.png create mode 100644 gfx/trainers/kimono_girl.png create mode 100644 gfx/trainers/koga.png create mode 100644 gfx/trainers/lass.png create mode 100644 gfx/trainers/lt_surge.png create mode 100644 gfx/trainers/medium.png create mode 100644 gfx/trainers/misty.png create mode 100644 gfx/trainers/morty.png create mode 100644 gfx/trainers/mysticalman.png create mode 100644 gfx/trainers/oak.png create mode 100644 gfx/trainers/officer.png create mode 100644 gfx/trainers/picnicker.png create mode 100644 gfx/trainers/pokefan_f.png create mode 100644 gfx/trainers/pokefan_m.png create mode 100644 gfx/trainers/pokemaniac.png create mode 100644 gfx/trainers/pryce.png create mode 100644 gfx/trainers/psychic_t.png create mode 100644 gfx/trainers/red.png create mode 100644 gfx/trainers/rival1.png create mode 100644 gfx/trainers/rival2.png create mode 100644 gfx/trainers/sabrina.png create mode 100644 gfx/trainers/sage.png create mode 100644 gfx/trainers/sailor.png create mode 100644 gfx/trainers/schoolboy.png create mode 100644 gfx/trainers/scientist.png create mode 100644 gfx/trainers/skier.png create mode 100644 gfx/trainers/super_nerd.png create mode 100644 gfx/trainers/swimmer_f.png create mode 100644 gfx/trainers/swimmer_m.png create mode 100644 gfx/trainers/teacher.png create mode 100644 gfx/trainers/twins.png create mode 100644 gfx/trainers/whitney.png create mode 100644 gfx/trainers/will.png create mode 100644 gfx/trainers/youngster.png create mode 100644 gfx/unown_puzzle/aerodactyl.png create mode 100644 gfx/unown_puzzle/cursor.png create mode 100644 gfx/unown_puzzle/hooh.png create mode 100644 gfx/unown_puzzle/kabuto.png create mode 100644 gfx/unown_puzzle/omanyte.png create mode 100644 gfx/unown_puzzle/start_cancel.png create mode 100644 gfx/unown_puzzle/tile_borders.png create mode 100644 home.asm create mode 100644 home/16bit.asm create mode 100644 home/array.asm create mode 100644 home/audio.asm create mode 100644 home/battle.asm create mode 100644 home/battle_vars.asm create mode 100644 home/call_regs.asm create mode 100644 home/clear_sprites.asm create mode 100644 home/compare.asm create mode 100644 home/copy.asm create mode 100644 home/copy_name.asm create mode 100644 home/copy_tilemap.asm create mode 100644 home/decompress.asm create mode 100644 home/delay.asm create mode 100644 home/double_speed.asm create mode 100644 home/fade.asm create mode 100644 home/farcall.asm create mode 100644 home/flag.asm create mode 100644 home/game_time.asm create mode 100644 home/gfx.asm create mode 100644 home/header.asm create mode 100644 home/hm_moves.asm create mode 100644 home/indirection.asm create mode 100644 home/init.asm create mode 100644 home/item.asm create mode 100644 home/joypad.asm create mode 100644 home/lcd.asm create mode 100644 home/map.asm create mode 100644 home/map_objects.asm create mode 100644 home/math.asm create mode 100644 home/menu.asm create mode 100644 home/mobile.asm create mode 100644 home/movement.asm create mode 100644 home/moves.asm create mode 100644 home/names.asm create mode 100644 home/palettes.asm create mode 100644 home/pokedex_flags.asm create mode 100644 home/pokemon.asm create mode 100644 home/predef.asm create mode 100644 home/print_bcd.asm create mode 100644 home/print_text.asm create mode 100644 home/printer.asm create mode 100644 home/queue_script.asm create mode 100644 home/random.asm create mode 100644 home/region.asm create mode 100644 home/scrolling_menu.asm create mode 100644 home/serial.asm create mode 100644 home/sine.asm create mode 100644 home/sprite_anims.asm create mode 100644 home/sprite_updates.asm create mode 100644 home/sram.asm create mode 100644 home/stone_queue.asm create mode 100644 home/string.asm create mode 100644 home/text.asm create mode 100644 home/tilemap.asm create mode 100644 home/time.asm create mode 100644 home/time_palettes.asm create mode 100644 home/trainers.asm create mode 100644 home/vblank.asm create mode 100644 home/video.asm create mode 100644 home/window.asm create mode 100644 includes.asm create mode 100644 layout.link create mode 100644 lib/mobile/mail.asm create mode 100644 lib/mobile/main.asm create mode 100644 macros/asserts.asm create mode 100644 macros/code.asm create mode 100644 macros/const.asm create mode 100644 macros/coords.asm create mode 100644 macros/data.asm create mode 100644 macros/farcall.asm create mode 100644 macros/gfx.asm create mode 100644 macros/indirection.asm create mode 100644 macros/legacy.asm create mode 100644 macros/lists.asm create mode 100644 macros/predef.asm create mode 100644 macros/ram.asm create mode 100644 macros/scripts/audio.asm create mode 100644 macros/scripts/battle_anims.asm create mode 100644 macros/scripts/battle_commands.asm create mode 100644 macros/scripts/events.asm create mode 100644 macros/scripts/maps.asm create mode 100644 macros/scripts/movement.asm create mode 100644 macros/scripts/oam_anims.asm create mode 100644 macros/scripts/pic_anims.asm create mode 100644 macros/scripts/text.asm create mode 100644 macros/vc.asm create mode 100644 macros/wram_16bit.asm create mode 100644 main.asm create mode 100644 maps/AzaleaGym.asm create mode 100644 maps/AzaleaGym.blk create mode 100644 maps/AzaleaMart.asm create mode 100644 maps/AzaleaPokecenter1F.asm create mode 100644 maps/AzaleaTown.asm create mode 100644 maps/AzaleaTown.blk create mode 100644 maps/BattleTower1F.asm create mode 100644 maps/BattleTower1F.blk create mode 100644 maps/BattleTowerBattleRoom.asm create mode 100644 maps/BattleTowerBattleRoom.blk create mode 100644 maps/BattleTowerElevator.asm create mode 100644 maps/BattleTowerElevator.blk create mode 100644 maps/BattleTowerHallway.asm create mode 100644 maps/BattleTowerHallway.blk create mode 100644 maps/BattleTowerOutside.asm create mode 100644 maps/BattleTowerOutside.blk create mode 100644 maps/BillsBrothersHouse.asm create mode 100644 maps/BillsFamilysHouse.asm create mode 100644 maps/BillsHouse.asm create mode 100644 maps/BlackthornCity.asm create mode 100644 maps/BlackthornCity.blk create mode 100644 maps/BlackthornDragonSpeechHouse.asm create mode 100644 maps/BlackthornEmysHouse.asm create mode 100644 maps/BlackthornGym1F.asm create mode 100644 maps/BlackthornGym1F.blk create mode 100644 maps/BlackthornGym2F.asm create mode 100644 maps/BlackthornGym2F.blk create mode 100644 maps/BlackthornMart.asm create mode 100644 maps/BlackthornPokecenter1F.asm create mode 100644 maps/BluesHouse.asm create mode 100644 maps/BrunosRoom.asm create mode 100644 maps/BrunosRoom.blk create mode 100644 maps/BurnedTower1F.asm create mode 100644 maps/BurnedTower1F.blk create mode 100644 maps/BurnedTowerB1F.asm create mode 100644 maps/BurnedTowerB1F.blk create mode 100644 maps/CeladonCafe.asm create mode 100644 maps/CeladonCafe.blk create mode 100644 maps/CeladonCity.asm create mode 100644 maps/CeladonCity.blk create mode 100644 maps/CeladonDeptStore1F.asm create mode 100644 maps/CeladonDeptStore2F.asm create mode 100644 maps/CeladonDeptStore3F.asm create mode 100644 maps/CeladonDeptStore4F.asm create mode 100644 maps/CeladonDeptStore5F.asm create mode 100644 maps/CeladonDeptStore6F.asm create mode 100644 maps/CeladonDeptStoreElevator.asm create mode 100644 maps/CeladonGameCorner.asm create mode 100644 maps/CeladonGameCorner.blk create mode 100644 maps/CeladonGameCornerPrizeRoom.asm create mode 100644 maps/CeladonGameCornerPrizeRoom.blk create mode 100644 maps/CeladonGym.asm create mode 100644 maps/CeladonGym.blk create mode 100644 maps/CeladonMansion1F.asm create mode 100644 maps/CeladonMansion1F.blk create mode 100644 maps/CeladonMansion2F.asm create mode 100644 maps/CeladonMansion2F.blk create mode 100644 maps/CeladonMansion3F.asm create mode 100644 maps/CeladonMansion3F.blk create mode 100644 maps/CeladonMansionRoof.asm create mode 100644 maps/CeladonMansionRoof.blk create mode 100644 maps/CeladonMansionRoofHouse.asm create mode 100644 maps/CeladonPokecenter1F.asm create mode 100644 maps/CeladonPokecenter2FBeta.asm create mode 100644 maps/CeruleanCity.asm create mode 100644 maps/CeruleanCity.blk create mode 100644 maps/CeruleanGym.asm create mode 100644 maps/CeruleanGym.blk create mode 100644 maps/CeruleanGymBadgeSpeechHouse.asm create mode 100644 maps/CeruleanMart.asm create mode 100644 maps/CeruleanPokecenter1F.asm create mode 100644 maps/CeruleanPokecenter2FBeta.asm create mode 100644 maps/CeruleanPoliceStation.asm create mode 100644 maps/CeruleanTradeSpeechHouse.asm create mode 100644 maps/CharcoalKiln.asm create mode 100644 maps/CherrygroveCity.asm create mode 100644 maps/CherrygroveCity.blk create mode 100644 maps/CherrygroveEvolutionSpeechHouse.asm create mode 100644 maps/CherrygroveGymSpeechHouse.asm create mode 100644 maps/CherrygroveMart.asm create mode 100644 maps/CherrygrovePokecenter1F.asm create mode 100644 maps/CianwoodCity.asm create mode 100644 maps/CianwoodCity.blk create mode 100644 maps/CianwoodGym.asm create mode 100644 maps/CianwoodGym.blk create mode 100644 maps/CianwoodLugiaSpeechHouse.asm create mode 100644 maps/CianwoodPharmacy.asm create mode 100644 maps/CianwoodPhotoStudio.asm create mode 100644 maps/CianwoodPokecenter1F.asm create mode 100644 maps/CinnabarIsland.asm create mode 100644 maps/CinnabarIsland.blk create mode 100644 maps/CinnabarPokecenter1F.asm create mode 100644 maps/CinnabarPokecenter2FBeta.asm create mode 100644 maps/Colosseum.asm create mode 100644 maps/Colosseum.blk create mode 100644 maps/CopycatsHouse1F.asm create mode 100644 maps/CopycatsHouse1F.blk create mode 100644 maps/CopycatsHouse2F.asm create mode 100644 maps/CopycatsHouse2F.blk create mode 100644 maps/DanceTheater.asm create mode 100644 maps/DanceTheater.blk create mode 100644 maps/DarkCaveBlackthornEntrance.asm create mode 100644 maps/DarkCaveBlackthornEntrance.blk create mode 100644 maps/DarkCaveVioletEntrance.asm create mode 100644 maps/DarkCaveVioletEntrance.blk create mode 100644 maps/DayCare.asm create mode 100644 maps/DayCare.blk create mode 100644 maps/DayOfWeekSiblingsHouse.asm create mode 100644 maps/DeptStore1F.blk create mode 100644 maps/DeptStore2F.blk create mode 100644 maps/DeptStore3F.blk create mode 100644 maps/DeptStore4F.blk create mode 100644 maps/DeptStore5F.blk create mode 100644 maps/DeptStore6F.blk create mode 100644 maps/DeptStoreElevator.blk create mode 100644 maps/DiglettsCave.asm create mode 100644 maps/DiglettsCave.blk create mode 100644 maps/DragonShrine.asm create mode 100644 maps/DragonShrine.blk create mode 100644 maps/DragonsDen1F.asm create mode 100644 maps/DragonsDen1F.blk create mode 100644 maps/DragonsDenB1F.asm create mode 100644 maps/DragonsDenB1F.blk create mode 100644 maps/EarlsPokemonAcademy.asm create mode 100644 maps/EarlsPokemonAcademy.blk create mode 100644 maps/EastWestGate.blk create mode 100644 maps/EcruteakCity.asm create mode 100644 maps/EcruteakCity.blk create mode 100644 maps/EcruteakGym.asm create mode 100644 maps/EcruteakGym.blk create mode 100644 maps/EcruteakItemfinderHouse.asm create mode 100644 maps/EcruteakLugiaSpeechHouse.asm create mode 100644 maps/EcruteakMart.asm create mode 100644 maps/EcruteakPokecenter1F.asm create mode 100644 maps/EcruteakTinTowerEntrance.asm create mode 100644 maps/EcruteakTinTowerEntrance.blk create mode 100644 maps/ElmsHouse.asm create mode 100644 maps/ElmsHouse.blk create mode 100644 maps/ElmsLab.asm create mode 100644 maps/ElmsLab.blk create mode 100644 maps/FastShip1F.asm create mode 100644 maps/FastShip1F.blk create mode 100644 maps/FastShipB1F.asm create mode 100644 maps/FastShipB1F.blk create mode 100644 maps/FastShipCabins_NNW_NNE_NE.asm create mode 100644 maps/FastShipCabins_NNW_NNE_NE.blk create mode 100644 maps/FastShipCabins_SE_SSE_CaptainsCabin.asm create mode 100644 maps/FastShipCabins_SE_SSE_CaptainsCabin.blk create mode 100644 maps/FastShipCabins_SW_SSW_NW.asm create mode 100644 maps/FastShipCabins_SW_SSW_NW.blk create mode 100644 maps/FightingDojo.asm create mode 100644 maps/FightingDojo.blk create mode 100644 maps/FuchsiaCity.asm create mode 100644 maps/FuchsiaCity.blk create mode 100644 maps/FuchsiaGym.asm create mode 100644 maps/FuchsiaGym.blk create mode 100644 maps/FuchsiaMart.asm create mode 100644 maps/FuchsiaPokecenter1F.asm create mode 100644 maps/FuchsiaPokecenter2FBeta.asm create mode 100644 maps/GiftShop.blk create mode 100644 maps/GoldenrodBikeShop.asm create mode 100644 maps/GoldenrodBikeShop.blk create mode 100644 maps/GoldenrodCity.asm create mode 100644 maps/GoldenrodCity.blk create mode 100644 maps/GoldenrodDeptStore1F.asm create mode 100644 maps/GoldenrodDeptStore2F.asm create mode 100644 maps/GoldenrodDeptStore3F.asm create mode 100644 maps/GoldenrodDeptStore4F.asm create mode 100644 maps/GoldenrodDeptStore5F.asm create mode 100644 maps/GoldenrodDeptStore6F.asm create mode 100644 maps/GoldenrodDeptStoreB1F.asm create mode 100644 maps/GoldenrodDeptStoreB1F.blk create mode 100644 maps/GoldenrodDeptStoreElevator.asm create mode 100644 maps/GoldenrodDeptStoreRoof.asm create mode 100644 maps/GoldenrodDeptStoreRoof.blk create mode 100644 maps/GoldenrodFlowerShop.asm create mode 100644 maps/GoldenrodFlowerShop.blk create mode 100644 maps/GoldenrodGameCorner.asm create mode 100644 maps/GoldenrodGameCorner.blk create mode 100644 maps/GoldenrodGym.asm create mode 100644 maps/GoldenrodGym.blk create mode 100644 maps/GoldenrodHappinessRater.asm create mode 100644 maps/GoldenrodMagnetTrainStation.asm create mode 100644 maps/GoldenrodMagnetTrainStation.blk create mode 100644 maps/GoldenrodNameRater.asm create mode 100644 maps/GoldenrodPPSpeechHouse.asm create mode 100644 maps/GoldenrodPokecenter1F.asm create mode 100644 maps/GoldenrodUnderground.asm create mode 100644 maps/GoldenrodUnderground.blk create mode 100644 maps/GoldenrodUndergroundSwitchRoomEntrances.asm create mode 100644 maps/GoldenrodUndergroundSwitchRoomEntrances.blk create mode 100644 maps/GoldenrodUndergroundWarehouse.asm create mode 100644 maps/GoldenrodUndergroundWarehouse.blk create mode 100644 maps/GuideGentsHouse.asm create mode 100644 maps/HallOfFame.asm create mode 100644 maps/HallOfFame.blk create mode 100644 maps/House1.blk create mode 100644 maps/House2.blk create mode 100644 maps/IcePath1F.asm create mode 100644 maps/IcePath1F.blk create mode 100644 maps/IcePathB1F.asm create mode 100644 maps/IcePathB1F.blk create mode 100644 maps/IcePathB2FBlackthornSide.asm create mode 100644 maps/IcePathB2FBlackthornSide.blk create mode 100644 maps/IcePathB2FMahoganySide.asm create mode 100644 maps/IcePathB2FMahoganySide.blk create mode 100644 maps/IcePathB3F.asm create mode 100644 maps/IcePathB3F.blk create mode 100644 maps/IlexForest.asm create mode 100644 maps/IlexForest.blk create mode 100644 maps/IlexForestAzaleaGate.asm create mode 100644 maps/IndigoPlateauPokecenter1F.asm create mode 100644 maps/IndigoPlateauPokecenter1F.blk create mode 100644 maps/KarensRoom.asm create mode 100644 maps/KarensRoom.blk create mode 100644 maps/KogasRoom.asm create mode 100644 maps/KogasRoom.blk create mode 100644 maps/KurtsHouse.asm create mode 100644 maps/KurtsHouse.blk create mode 100644 maps/LakeOfRage.asm create mode 100644 maps/LakeOfRage.blk create mode 100644 maps/LakeOfRageHiddenPowerHouse.asm create mode 100644 maps/LakeOfRageMagikarpHouse.asm create mode 100644 maps/LancesRoom.asm create mode 100644 maps/LancesRoom.blk create mode 100644 maps/LavRadioTower1F.asm create mode 100644 maps/LavRadioTower1F.blk create mode 100644 maps/LavenderMart.asm create mode 100644 maps/LavenderNameRater.asm create mode 100644 maps/LavenderPokecenter1F.asm create mode 100644 maps/LavenderPokecenter2FBeta.asm create mode 100644 maps/LavenderSpeechHouse.asm create mode 100644 maps/LavenderTown.asm create mode 100644 maps/LavenderTown.blk create mode 100644 maps/MahoganyGym.asm create mode 100644 maps/MahoganyGym.blk create mode 100644 maps/MahoganyMart1F.asm create mode 100644 maps/MahoganyPokecenter1F.asm create mode 100644 maps/MahoganyRedGyaradosSpeechHouse.asm create mode 100644 maps/MahoganyTown.asm create mode 100644 maps/MahoganyTown.blk create mode 100644 maps/ManiasHouse.asm create mode 100644 maps/Mart.blk create mode 100644 maps/MobileBattleRoom.asm create mode 100644 maps/MobileBattleRoom.blk create mode 100644 maps/MobileTradeRoom.asm create mode 100644 maps/MobileTradeRoom.blk create mode 100644 maps/MountMoon.asm create mode 100644 maps/MountMoon.blk create mode 100644 maps/MountMoonGiftShop.asm create mode 100644 maps/MountMoonSquare.asm create mode 100644 maps/MountMoonSquare.blk create mode 100644 maps/MountMortar1FInside.asm create mode 100644 maps/MountMortar1FInside.blk create mode 100644 maps/MountMortar1FOutside.asm create mode 100644 maps/MountMortar1FOutside.blk create mode 100644 maps/MountMortar2FInside.asm create mode 100644 maps/MountMortar2FInside.blk create mode 100644 maps/MountMortarB1F.asm create mode 100644 maps/MountMortarB1F.blk create mode 100644 maps/MoveDeletersHouse.asm create mode 100644 maps/MrFujisHouse.asm create mode 100644 maps/MrFujisHouse.blk create mode 100644 maps/MrPokemonsHouse.asm create mode 100644 maps/MrPokemonsHouse.blk create mode 100644 maps/MrPsychicsHouse.asm create mode 100644 maps/NationalPark.asm create mode 100644 maps/NationalPark.blk create mode 100644 maps/NationalParkBugContest.asm create mode 100644 maps/NewBarkTown.asm create mode 100644 maps/NewBarkTown.blk create mode 100644 maps/NorthSouthGate.blk create mode 100644 maps/OaksLab.asm create mode 100644 maps/OaksLab.blk create mode 100644 maps/OlivineCafe.asm create mode 100644 maps/OlivineCafe.blk create mode 100644 maps/OlivineCity.asm create mode 100644 maps/OlivineCity.blk create mode 100644 maps/OlivineGoodRodHouse.asm create mode 100644 maps/OlivineGym.asm create mode 100644 maps/OlivineGym.blk create mode 100644 maps/OlivineHouseBeta.asm create mode 100644 maps/OlivineLighthouse1F.asm create mode 100644 maps/OlivineLighthouse1F.blk create mode 100644 maps/OlivineLighthouse2F.asm create mode 100644 maps/OlivineLighthouse2F.blk create mode 100644 maps/OlivineLighthouse3F.asm create mode 100644 maps/OlivineLighthouse3F.blk create mode 100644 maps/OlivineLighthouse4F.asm create mode 100644 maps/OlivineLighthouse4F.blk create mode 100644 maps/OlivineLighthouse5F.asm create mode 100644 maps/OlivineLighthouse5F.blk create mode 100644 maps/OlivineLighthouse6F.asm create mode 100644 maps/OlivineLighthouse6F.blk create mode 100644 maps/OlivineMart.asm create mode 100644 maps/OlivinePokecenter1F.asm create mode 100644 maps/OlivinePort.asm create mode 100644 maps/OlivinePort.blk create mode 100644 maps/OlivinePortPassage.asm create mode 100644 maps/OlivinePunishmentSpeechHouse.asm create mode 100644 maps/OlivineTimsHouse.asm create mode 100644 maps/PalletTown.asm create mode 100644 maps/PalletTown.blk create mode 100644 maps/PewterCity.asm create mode 100644 maps/PewterCity.blk create mode 100644 maps/PewterGym.asm create mode 100644 maps/PewterGym.blk create mode 100644 maps/PewterMart.asm create mode 100644 maps/PewterNidoranSpeechHouse.asm create mode 100644 maps/PewterPokecenter1F.asm create mode 100644 maps/PewterPokecenter2FBeta.asm create mode 100644 maps/PewterSnoozeSpeechHouse.asm create mode 100644 maps/PlayersHouse1F.asm create mode 100644 maps/PlayersHouse1F.blk create mode 100644 maps/PlayersHouse2F.asm create mode 100644 maps/PlayersHouse2F.blk create mode 100644 maps/PlayersNeighborsHouse.asm create mode 100644 maps/PokeSeersHouse.asm create mode 100644 maps/Pokecenter1F.blk create mode 100644 maps/Pokecenter2F.asm create mode 100644 maps/Pokecenter2F.blk create mode 100644 maps/PokecomCenterAdminOfficeMobile.asm create mode 100644 maps/PokecomCenterAdminOfficeMobile.blk create mode 100644 maps/PokemonFanClub.asm create mode 100644 maps/PokemonFanClub.blk create mode 100644 maps/PortPassage.blk create mode 100644 maps/PowerPlant.asm create mode 100644 maps/PowerPlant.blk create mode 100644 maps/RadioTower1F.asm create mode 100644 maps/RadioTower1F.blk create mode 100644 maps/RadioTower2F.asm create mode 100644 maps/RadioTower2F.blk create mode 100644 maps/RadioTower3F.asm create mode 100644 maps/RadioTower3F.blk create mode 100644 maps/RadioTower4F.asm create mode 100644 maps/RadioTower4F.blk create mode 100644 maps/RadioTower5F.asm create mode 100644 maps/RadioTower5F.blk create mode 100644 maps/RedsHouse1F.asm create mode 100644 maps/RedsHouse1F.blk create mode 100644 maps/RedsHouse2F.asm create mode 100644 maps/RedsHouse2F.blk create mode 100644 maps/RockTunnel1F.asm create mode 100644 maps/RockTunnel1F.blk create mode 100644 maps/RockTunnelB1F.asm create mode 100644 maps/RockTunnelB1F.blk create mode 100644 maps/Route1.asm create mode 100644 maps/Route1.blk create mode 100644 maps/Route10North.asm create mode 100644 maps/Route10North.blk create mode 100644 maps/Route10Pokecenter1F.asm create mode 100644 maps/Route10Pokecenter2FBeta.asm create mode 100644 maps/Route10South.asm create mode 100644 maps/Route10South.blk create mode 100644 maps/Route11.asm create mode 100644 maps/Route11.blk create mode 100644 maps/Route12.asm create mode 100644 maps/Route12.blk create mode 100644 maps/Route12SuperRodHouse.asm create mode 100644 maps/Route13.asm create mode 100644 maps/Route13.blk create mode 100644 maps/Route14.asm create mode 100644 maps/Route14.blk create mode 100644 maps/Route15.asm create mode 100644 maps/Route15.blk create mode 100644 maps/Route15FuchsiaGate.asm create mode 100644 maps/Route16.asm create mode 100644 maps/Route16.blk create mode 100644 maps/Route16FuchsiaSpeechHouse.asm create mode 100644 maps/Route16Gate.asm create mode 100644 maps/Route17.asm create mode 100644 maps/Route17.blk create mode 100644 maps/Route17Route18Gate.asm create mode 100644 maps/Route18.asm create mode 100644 maps/Route18.blk create mode 100644 maps/Route19.asm create mode 100644 maps/Route19.blk create mode 100644 maps/Route19FuchsiaGate.asm create mode 100644 maps/Route2.asm create mode 100644 maps/Route2.blk create mode 100644 maps/Route20.asm create mode 100644 maps/Route20.blk create mode 100644 maps/Route21.asm create mode 100644 maps/Route21.blk create mode 100644 maps/Route22.asm create mode 100644 maps/Route22.blk create mode 100644 maps/Route23.asm create mode 100644 maps/Route23.blk create mode 100644 maps/Route24.asm create mode 100644 maps/Route24.blk create mode 100644 maps/Route25.asm create mode 100644 maps/Route25.blk create mode 100644 maps/Route26.asm create mode 100644 maps/Route26.blk create mode 100644 maps/Route26HealHouse.asm create mode 100644 maps/Route27.asm create mode 100644 maps/Route27.blk create mode 100644 maps/Route27SandstormHouse.asm create mode 100644 maps/Route28.asm create mode 100644 maps/Route28.blk create mode 100644 maps/Route28SteelWingHouse.asm create mode 100644 maps/Route29.asm create mode 100644 maps/Route29.blk create mode 100644 maps/Route29Route46Gate.asm create mode 100644 maps/Route2Gate.asm create mode 100644 maps/Route2NuggetHouse.asm create mode 100644 maps/Route3.asm create mode 100644 maps/Route3.blk create mode 100644 maps/Route30.asm create mode 100644 maps/Route30.blk create mode 100644 maps/Route30BerryHouse.asm create mode 100644 maps/Route31.asm create mode 100644 maps/Route31.blk create mode 100644 maps/Route31VioletGate.asm create mode 100644 maps/Route32.asm create mode 100644 maps/Route32.blk create mode 100644 maps/Route32Pokecenter1F.asm create mode 100644 maps/Route32RuinsOfAlphGate.asm create mode 100644 maps/Route33.asm create mode 100644 maps/Route33.blk create mode 100644 maps/Route34.asm create mode 100644 maps/Route34.blk create mode 100644 maps/Route34IlexForestGate.asm create mode 100644 maps/Route35.asm create mode 100644 maps/Route35.blk create mode 100644 maps/Route35GoldenrodGate.asm create mode 100644 maps/Route35NationalParkGate.asm create mode 100644 maps/Route35NationalParkGate.blk create mode 100644 maps/Route36.asm create mode 100644 maps/Route36.blk create mode 100644 maps/Route36NationalParkGate.asm create mode 100644 maps/Route36NationalParkGate.blk create mode 100644 maps/Route36RuinsOfAlphGate.asm create mode 100644 maps/Route37.asm create mode 100644 maps/Route37.blk create mode 100644 maps/Route38.asm create mode 100644 maps/Route38.blk create mode 100644 maps/Route38EcruteakGate.asm create mode 100644 maps/Route39.asm create mode 100644 maps/Route39.blk create mode 100644 maps/Route39Barn.asm create mode 100644 maps/Route39Barn.blk create mode 100644 maps/Route39Farmhouse.asm create mode 100644 maps/Route4.asm create mode 100644 maps/Route4.blk create mode 100644 maps/Route40.asm create mode 100644 maps/Route40.blk create mode 100644 maps/Route40BattleTowerGate.asm create mode 100644 maps/Route41.asm create mode 100644 maps/Route41.blk create mode 100644 maps/Route42.asm create mode 100644 maps/Route42.blk create mode 100644 maps/Route42EcruteakGate.asm create mode 100644 maps/Route43.asm create mode 100644 maps/Route43.blk create mode 100644 maps/Route43Gate.asm create mode 100644 maps/Route43MahoganyGate.asm create mode 100644 maps/Route44.asm create mode 100644 maps/Route44.blk create mode 100644 maps/Route45.asm create mode 100644 maps/Route45.blk create mode 100644 maps/Route46.asm create mode 100644 maps/Route46.blk create mode 100644 maps/Route5.asm create mode 100644 maps/Route5.blk create mode 100644 maps/Route5CleanseTagHouse.asm create mode 100644 maps/Route5SaffronGate.asm create mode 100644 maps/Route5UndergroundPathEntrance.asm create mode 100644 maps/Route6.asm create mode 100644 maps/Route6.blk create mode 100644 maps/Route6SaffronGate.asm create mode 100644 maps/Route6UndergroundPathEntrance.asm create mode 100644 maps/Route7.asm create mode 100644 maps/Route7.blk create mode 100644 maps/Route7SaffronGate.asm create mode 100644 maps/Route8.asm create mode 100644 maps/Route8.blk create mode 100644 maps/Route8SaffronGate.asm create mode 100644 maps/Route9.asm create mode 100644 maps/Route9.blk create mode 100644 maps/RuinsOfAlphAerodactylChamber.asm create mode 100644 maps/RuinsOfAlphAerodactylItemRoom.asm create mode 100644 maps/RuinsOfAlphAerodactylWordRoom.asm create mode 100644 maps/RuinsOfAlphAerodactylWordRoom.blk create mode 100644 maps/RuinsOfAlphHoOhChamber.asm create mode 100644 maps/RuinsOfAlphHoOhItemRoom.asm create mode 100644 maps/RuinsOfAlphHoOhWordRoom.asm create mode 100644 maps/RuinsOfAlphHoOhWordRoom.blk create mode 100644 maps/RuinsOfAlphInnerChamber.asm create mode 100644 maps/RuinsOfAlphInnerChamber.blk create mode 100644 maps/RuinsOfAlphItemRoom.blk create mode 100644 maps/RuinsOfAlphKabutoChamber.asm create mode 100644 maps/RuinsOfAlphKabutoItemRoom.asm create mode 100644 maps/RuinsOfAlphKabutoWordRoom.asm create mode 100644 maps/RuinsOfAlphKabutoWordRoom.blk create mode 100644 maps/RuinsOfAlphOmanyteChamber.asm create mode 100644 maps/RuinsOfAlphOmanyteItemRoom.asm create mode 100644 maps/RuinsOfAlphOmanyteWordRoom.asm create mode 100644 maps/RuinsOfAlphOmanyteWordRoom.blk create mode 100644 maps/RuinsOfAlphOutside.asm create mode 100644 maps/RuinsOfAlphOutside.blk create mode 100644 maps/RuinsOfAlphPuzzleChamber.blk create mode 100644 maps/RuinsOfAlphResearchCenter.asm create mode 100644 maps/RuinsOfAlphResearchCenter.blk create mode 100644 maps/SafariZoneBeta.asm create mode 100644 maps/SafariZoneBeta.blk create mode 100644 maps/SafariZoneFuchsiaGateBeta.asm create mode 100644 maps/SafariZoneMainOffice.asm create mode 100644 maps/SafariZoneWardensHome.asm create mode 100644 maps/SaffronCity.asm create mode 100644 maps/SaffronCity.blk create mode 100644 maps/SaffronGym.asm create mode 100644 maps/SaffronGym.blk create mode 100644 maps/SaffronMagnetTrainStation.asm create mode 100644 maps/SaffronMagnetTrainStation.blk create mode 100644 maps/SaffronMart.asm create mode 100644 maps/SaffronPokecenter1F.asm create mode 100644 maps/SaffronPokecenter2FBeta.asm create mode 100644 maps/SeafoamGym.asm create mode 100644 maps/SeafoamGym.blk create mode 100644 maps/SilphCo1F.asm create mode 100644 maps/SilphCo1F.blk create mode 100644 maps/SilverCaveItemRooms.asm create mode 100644 maps/SilverCaveItemRooms.blk create mode 100644 maps/SilverCaveOutside.asm create mode 100644 maps/SilverCaveOutside.blk create mode 100644 maps/SilverCavePokecenter1F.asm create mode 100644 maps/SilverCaveRoom1.asm create mode 100644 maps/SilverCaveRoom1.blk create mode 100644 maps/SilverCaveRoom2.asm create mode 100644 maps/SilverCaveRoom2.blk create mode 100644 maps/SilverCaveRoom3.asm create mode 100644 maps/SilverCaveRoom3.blk create mode 100644 maps/SlowpokeWellB1F.asm create mode 100644 maps/SlowpokeWellB1F.blk create mode 100644 maps/SlowpokeWellB2F.asm create mode 100644 maps/SlowpokeWellB2F.blk create mode 100644 maps/SoulHouse.asm create mode 100644 maps/SoulHouse.blk create mode 100644 maps/SproutTower1F.asm create mode 100644 maps/SproutTower1F.blk create mode 100644 maps/SproutTower2F.asm create mode 100644 maps/SproutTower2F.blk create mode 100644 maps/SproutTower3F.asm create mode 100644 maps/SproutTower3F.blk create mode 100644 maps/TeamRocketBaseB1F.asm create mode 100644 maps/TeamRocketBaseB1F.blk create mode 100644 maps/TeamRocketBaseB2F.asm create mode 100644 maps/TeamRocketBaseB2F.blk create mode 100644 maps/TeamRocketBaseB3F.asm create mode 100644 maps/TeamRocketBaseB3F.blk create mode 100644 maps/TimeCapsule.asm create mode 100644 maps/TinTower1F.asm create mode 100644 maps/TinTower1F.blk create mode 100644 maps/TinTower2F.asm create mode 100644 maps/TinTower2F.blk create mode 100644 maps/TinTower3F.asm create mode 100644 maps/TinTower3F.blk create mode 100644 maps/TinTower4F.asm create mode 100644 maps/TinTower4F.blk create mode 100644 maps/TinTower5F.asm create mode 100644 maps/TinTower5F.blk create mode 100644 maps/TinTower6F.asm create mode 100644 maps/TinTower6F.blk create mode 100644 maps/TinTower7F.asm create mode 100644 maps/TinTower7F.blk create mode 100644 maps/TinTower8F.asm create mode 100644 maps/TinTower8F.blk create mode 100644 maps/TinTower9F.asm create mode 100644 maps/TinTower9F.blk create mode 100644 maps/TinTowerRoof.asm create mode 100644 maps/TinTowerRoof.blk create mode 100644 maps/TohjoFalls.asm create mode 100644 maps/TohjoFalls.blk create mode 100644 maps/TradeCenter.asm create mode 100644 maps/TradeCenter.blk create mode 100644 maps/TrainerHouse1F.asm create mode 100644 maps/TrainerHouse1F.blk create mode 100644 maps/TrainerHouseB1F.asm create mode 100644 maps/TrainerHouseB1F.blk create mode 100644 maps/UndergroundPath.asm create mode 100644 maps/UndergroundPath.blk create mode 100644 maps/UndergroundPathEntrance.blk create mode 100644 maps/UnionCave1F.asm create mode 100644 maps/UnionCave1F.blk create mode 100644 maps/UnionCaveB1F.asm create mode 100644 maps/UnionCaveB1F.blk create mode 100644 maps/UnionCaveB2F.asm create mode 100644 maps/UnionCaveB2F.blk create mode 100644 maps/VermilionCity.asm create mode 100644 maps/VermilionCity.blk create mode 100644 maps/VermilionDiglettsCaveSpeechHouse.asm create mode 100644 maps/VermilionFishingSpeechHouse.asm create mode 100644 maps/VermilionGym.asm create mode 100644 maps/VermilionGym.blk create mode 100644 maps/VermilionMagnetTrainSpeechHouse.asm create mode 100644 maps/VermilionMart.asm create mode 100644 maps/VermilionPokecenter1F.asm create mode 100644 maps/VermilionPokecenter2FBeta.asm create mode 100644 maps/VermilionPort.asm create mode 100644 maps/VermilionPort.blk create mode 100644 maps/VermilionPortPassage.asm create mode 100644 maps/VictoryRoad.asm create mode 100644 maps/VictoryRoad.blk create mode 100644 maps/VictoryRoadGate.asm create mode 100644 maps/VictoryRoadGate.blk create mode 100644 maps/VioletCity.asm create mode 100644 maps/VioletCity.blk create mode 100644 maps/VioletGym.asm create mode 100644 maps/VioletGym.blk create mode 100644 maps/VioletKylesHouse.asm create mode 100644 maps/VioletMart.asm create mode 100644 maps/VioletNicknameSpeechHouse.asm create mode 100644 maps/VioletPokecenter1F.asm create mode 100644 maps/ViridianCity.asm create mode 100644 maps/ViridianCity.blk create mode 100644 maps/ViridianGym.asm create mode 100644 maps/ViridianGym.blk create mode 100644 maps/ViridianMart.asm create mode 100644 maps/ViridianNicknameSpeechHouse.asm create mode 100644 maps/ViridianPokecenter1F.asm create mode 100644 maps/ViridianPokecenter2FBeta.asm create mode 100644 maps/WhirlIslandB1F.asm create mode 100644 maps/WhirlIslandB1F.blk create mode 100644 maps/WhirlIslandB2F.asm create mode 100644 maps/WhirlIslandB2F.blk create mode 100644 maps/WhirlIslandCave.asm create mode 100644 maps/WhirlIslandCave.blk create mode 100644 maps/WhirlIslandLugiaChamber.asm create mode 100644 maps/WhirlIslandLugiaChamber.blk create mode 100644 maps/WhirlIslandNE.asm create mode 100644 maps/WhirlIslandNE.blk create mode 100644 maps/WhirlIslandNW.asm create mode 100644 maps/WhirlIslandNW.blk create mode 100644 maps/WhirlIslandSE.asm create mode 100644 maps/WhirlIslandSE.blk create mode 100644 maps/WhirlIslandSW.asm create mode 100644 maps/WhirlIslandSW.blk create mode 100644 maps/WillsRoom.asm create mode 100644 maps/WillsRoom.blk create mode 100644 maps/WiseTriosRoom.asm create mode 100644 maps/WiseTriosRoom.blk create mode 100644 maps/unused/BetaAzaleaTown.blk create mode 100644 maps/unused/BetaBlackthornCity.blk create mode 100644 maps/unused/BetaBlank.blk create mode 100644 maps/unused/BetaCapsuleHouse.blk create mode 100644 maps/unused/BetaCaveTestMap.blk create mode 100644 maps/unused/BetaCeladonMansion1F.blk create mode 100644 maps/unused/BetaCeladonMansion2F.blk create mode 100644 maps/unused/BetaCherrygroveCity.blk create mode 100644 maps/unused/BetaCianwoodCity.blk create mode 100644 maps/unused/BetaCinnabarPokemonLabHallway.blk create mode 100644 maps/unused/BetaCinnabarPokemonLabRoom1.blk create mode 100644 maps/unused/BetaCinnabarPokemonLabRoom2.blk create mode 100644 maps/unused/BetaCinnabarPokemonLabRoom3.blk create mode 100644 maps/unused/BetaEcruteakCity.blk create mode 100644 maps/unused/BetaElevator.blk create mode 100644 maps/unused/BetaFastShipInsideCutOut.blk create mode 100644 maps/unused/BetaGoldenrodCity.blk create mode 100644 maps/unused/BetaHouse.blk create mode 100644 maps/unused/BetaLakeOfRage.blk create mode 100644 maps/unused/BetaMahoganyTown.blk create mode 100644 maps/unused/BetaNewBarkTown.blk create mode 100644 maps/unused/BetaOlivineCity.blk create mode 100644 maps/unused/BetaPewterMuseumOfScience1F.blk create mode 100644 maps/unused/BetaPewterMuseumOfScience2F.blk create mode 100644 maps/unused/BetaPlayersHouse2F.blk create mode 100644 maps/unused/BetaPokecenter.blk create mode 100644 maps/unused/BetaRocketHideout1F.blk create mode 100644 maps/unused/BetaRocketHideoutB1F.blk create mode 100644 maps/unused/BetaRocketHideoutB2F.blk create mode 100644 maps/unused/BetaRocketHideoutB3F.blk create mode 100644 maps/unused/BetaRoute23.blk create mode 100644 maps/unused/BetaRuinsOfAlphUnsolvedPuzzleRoom.blk create mode 100644 maps/unused/BetaSilverCaveOutside.blk create mode 100644 maps/unused/BetaSlowpokeWell1F.blk create mode 100644 maps/unused/BetaSproutTower1.blk create mode 100644 maps/unused/BetaSproutTower2.blk create mode 100644 maps/unused/BetaSproutTower3.blk create mode 100644 maps/unused/BetaSproutTower5.blk create mode 100644 maps/unused/BetaSproutTower6.blk create mode 100644 maps/unused/BetaSproutTower7.blk create mode 100644 maps/unused/BetaSproutTower8.blk create mode 100644 maps/unused/BetaSproutTower9.blk create mode 100644 maps/unused/BetaSproutTowerCutOut1.blk create mode 100644 maps/unused/BetaSproutTowerCutOut2.blk create mode 100644 maps/unused/BetaSproutTowerCutOut3.blk create mode 100644 maps/unused/BetaUnionCave.blk create mode 100644 maps/unused/BetaUnknownGym.blk create mode 100644 maps/unused/BetaVioletCity.blk create mode 100644 mobile/fixed_words.asm create mode 100644 mobile/mobile_12.asm create mode 100644 mobile/mobile_12_2.asm create mode 100644 mobile/mobile_22.asm create mode 100644 mobile/mobile_22_2.asm create mode 100644 mobile/mobile_40.asm create mode 100644 mobile/mobile_41.asm create mode 100644 mobile/mobile_42.asm create mode 100644 mobile/mobile_45_2.asm create mode 100644 mobile/mobile_45_sprite_engine.asm create mode 100644 mobile/mobile_45_stadium.asm create mode 100644 mobile/mobile_46.asm create mode 100644 mobile/mobile_5b.asm create mode 100644 mobile/mobile_5c.asm create mode 100644 mobile/mobile_5e.asm create mode 100644 mobile/mobile_5f.asm create mode 100644 mobile/mobile_menu.asm create mode 100644 mobile/news/news.asm create mode 100644 mobile/news/news_1.bin create mode 100644 mobile/news/news_2.bin create mode 100644 mobile/news/news_3.bin create mode 100644 mobile/print_opp_message.asm create mode 100644 ram.asm create mode 100644 ram/hram.asm create mode 100644 ram/sram.asm create mode 100644 ram/vram.asm create mode 100644 ram/wram.asm create mode 100644 replace.sh create mode 100644 rgbdscheck.asm create mode 100644 tools/.gitignore create mode 100644 tools/Makefile create mode 100644 tools/bpp2png.c create mode 100644 tools/common.h create mode 100644 tools/consts.py create mode 100644 tools/free_space.awk create mode 100644 tools/gfx.c create mode 100644 tools/lodepng/lodepng.c create mode 100644 tools/lodepng/lodepng.h create mode 100644 tools/lz/global.c create mode 100644 tools/lz/main.c create mode 100644 tools/lz/merging.c create mode 100644 tools/lz/mpcomp.c create mode 100644 tools/lz/nullcomp.c create mode 100644 tools/lz/options.c create mode 100644 tools/lz/output.c create mode 100644 tools/lz/packing.c create mode 100644 tools/lz/proto.h create mode 100644 tools/lz/repcomp.c create mode 100644 tools/lz/spcomp.c create mode 100644 tools/lz/uncomp.c create mode 100644 tools/lz/util.c create mode 100644 tools/make_patch.c create mode 100644 tools/palfix.py create mode 100644 tools/png.py create mode 100644 tools/png_dimensions.c create mode 100644 tools/pokemon_animation.c create mode 100644 tools/pokemon_animation_graphics.c create mode 100644 tools/rgb555.py create mode 100644 tools/scan_includes.c create mode 100644 tools/stadium.c create mode 100644 tools/sym_comments.py create mode 100644 tools/unique.py create mode 100644 vc/pokecrystal.constants.asm create mode 100644 vc/pokecrystal.patch.template diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..12b9534 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,37 @@ +# Auto detect text files and perform LF normalization +* text eol=lf + +# Explicitly declare text files you want to always be normalized and converted +# to native line endings on checkout. + +# files part of the build +*.asm text +*.pal text +*.link text +*.txt text + +# extra files +*.awk text +*.c text +*.h text +*.md text +*.py text +*.sh text +*.sha1 text + +# Denote all files that are truly binary and should not be modified. +*.png binary diff=hex +*.lz.* binary diff=hex +*.bin binary diff=hex +*.blk binary diff=hex +*.rle binary diff=hex +*.attrmap binary diff=hex +*.tilemap binary diff=hex + +# Declare files that will always have CRLF line endings on checkout. +*.patch.template text eol=crlf linguist-language=INI + +# these are generated but just in case +*.lz binary diff=hex +*.2bpp binary diff=hex +*.1bpp binary diff=hex diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..99c530f --- /dev/null +++ b/.gitignore @@ -0,0 +1,57 @@ +# compiled objects +*.o + +# compiled graphics +*.1bpp +*.2bpp +*.lz +*.gbcpal +*.dimensions +*.animated.tilemap +*.sgb.tilemap +gfx/pokemon/*/bitmask.asm +gfx/pokemon/*/frames.asm +!gfx/pokemon/unown/bitmask.asm +!gfx/pokemon/unown/frames.asm + +# compiled roms +*.gbc +*.gb +*.patch + +# rgbds extras +*.map +*.sym + +# tool binaries +*.exe + +# precompiled python +*.pyc +*$py.class + +# compare.sh +baserom.txt +pokecrystal.txt + +# used_space.py +used_space.png + +# save game files +*.sgm +*.sav +*.rtc +*.sn* +*.sa* +*.sg1 + +# vim configuration +# http://www.vim.org/scripts/script.php?script_id=441 +.lvimrc + +# swap files for vim and gedit +.*.swp +*~ + +# macos files +.DS_STORE diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 0000000..0d2daa5 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,172 @@ +# Instructions + +These instructions explain how to set up the tools required to build **pokecrystal**, including [**rgbds**](https://github.com/gbdev/rgbds), which assembles the source files into a ROM. + +If you run into trouble, ask for help on IRC or Discord (see [README.md](README.md)). + + +## Windows 10 + +Download and install [**Windows Subsystem for Linux**](https://docs.microsoft.com/en-us/windows/wsl/install-win10). Then open the **WSL terminal**. + +Update WSL's software before continuing. If you chose Debian, Ubuntu, or another distribution that uses `apt-get`, then enter this command: + +```bash +apt-get update && apt-get upgrade +``` + +WSL has its own file system that's not accessible from Windows, but Windows files *are* accessible from WSL. So you're going to want to install pokecrystal within Windows. You'll have to change the **current working directory** every time you open WSL. + +For example, if you want to store pokecrystal in **C:\Users\\*\*\Desktop**, enter this command: + +```bash +cd /mnt/c/Users//Desktop +``` + +(The Windows `C:\` drive is called `/mnt/c/` in WSL. Replace *\* in the example path with your username.) + +If this works, then follow [the instructions for **Linux**](#linux) below for whatever distribution you installed for WSL. + +Otherwise, continue reading below for [the older Windows instructions](#windows). + + +## Windows + +Download [**Cygwin**](http://cygwin.com/install.html): **setup-x86_64.exe** for 64-bit Windows, **setup-x86.exe** for 32-bit. + +Run setup and leave the default settings. At the "**Select Packages**" step, choose to install the following, all of which are in the "**Devel**" category: + +- `make` +- `git` +- `gcc-core` + +Double click on the text that says "**Skip**" next to each package to select the most recent version to install. + +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for Windows with Cygwin to install **rgbds 0.6.1**. + +**Note:** If you already have an installed rgbds older than 0.6.0, you will need to update to 0.6.0 or 0.6.1. Ignore this if you have never installed rgbds before. If a version newer than 0.6.1 does not work, try downloading 0.6.1. + +Now open the **Cygwin terminal** and enter the following commands. + +Cygwin has its own file system that's within Windows, at **C:\cygwin64\home\\*\***. If you don't want to store pokecrystal there, you'll have to change the **current working directory** every time you open Cygwin. + +For example, if you want to store pokecrystal in **C:\Users\\*\*\Desktop**: + +```bash +cd /cygdrive/c/Users//Desktop +``` + +(The Windows `C:\` drive is called `/cygdrive/c/` in Cygwin. Replace *\* in the example path with your username.) + +Now you're ready to [build **pokecrystal**](#build-pokecrystal). + + +## macOS + +Install [**Homebrew**](https://brew.sh/). Follow the official instructions. + +Open **Terminal** and prepare to enter commands. + +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for macOS to install **rgbds 0.6.1**. + +Now you're ready to [build **pokecrystal**](#build-pokecrystal). + + +## Linux + +Open **Terminal** and enter the following commands, depending on which distro you're using. + +### Debian or Ubuntu + +To install the software required for **pokecrystal**: + +```bash +sudo apt-get install make gcc git +``` + +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.1** from source. + +### OpenSUSE + +To install the software required for **pokecrystal**: + +```bash +sudo zypper install make gcc git +``` + +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.1** from source. + +### Arch Linux + +To install the software required for **pokecrystal**: + +```bash +sudo pacman -S make gcc git rgbds +``` + +Then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#pre-built) for Arch Linux to install **rgbds 0.6.1**. + +If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.1** from source. + +### Termux + +To install the software required for **pokecrystal**: + +```bash +sudo apt install make clang git sed +``` + +To install **rgbds**: + +```bash +sudo apt install rgbds +``` + +If you want to compile and install **rgbds** yourself instead, then follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.1** from source. + +### Other distros + +If your distro is not listed here, try to find the required software in its repositories: + +- `make` +- `gcc` (or `clang`) +- `git` +- `rgbds` + +If `rgbds` is not available, you'll need to follow the [**rgbds** instructions](https://rgbds.gbdev.io/install#building-from-source) to build **rgbds 0.6.1** from source. + +Now you're ready to [build **pokecrystal**](#build-pokecrystal). + + +## Build pokecrystal + +To download the **pokecrystal** source files: + +```bash +git clone https://github.com/pret/pokecrystal +cd pokecrystal +``` + +To build **pokecrystal.gbc**: + +```bash +make +``` + +To build **pokecrystal11.gbc**: + +```bash +make crystal11 +``` + +### Build with a local rgbds version + +If you have different projects that require different versions of `rgbds`, it might not be convenient to install rgbds 0.6.1 globally. Instead, you can put its files in a directory within pokecrystal, such as `pokecrystal/rgbds-0.6.1/`. Then specify it when you run `make`: + +```bash +make RGBDS=rgbds-0.6.1/ +``` + +```bash +make RGBDS=rgbds-0.6.1/ crystal11 +``` diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..41c1931 --- /dev/null +++ b/Makefile @@ -0,0 +1,268 @@ +roms := \ + pokecrystal.gbc +patches := pokecrystal.patch + +rom_obj := \ + audio.o \ + home.o \ + main.o \ + ram.o \ + data/text/common.o \ + data/maps/map_data.o \ + data/pokemon/dex_entries.o \ + data/pokemon/egg_moves.o \ + data/pokemon/evos_attacks.o \ + engine/movie/credits.o \ + engine/overworld/events.o \ + gfx/misc.o \ + gfx/pics.o \ + gfx/sprites.o \ + gfx/tilesets.o \ + lib/mobile/main.o \ + lib/mobile/mail.o + +pokecrystal_obj := $(rom_obj:.o=.o) +pokecrystal_vc_obj := $(rom_obj:.o=_vc.o) + + +### Build tools + +ifeq (,$(shell which sha1sum)) +SHA1 := shasum +else +SHA1 := sha1sum +endif + +RGBDS ?= +RGBASM ?= $(RGBDS)rgbasm +RGBFIX ?= $(RGBDS)rgbfix +RGBGFX ?= $(RGBDS)rgbgfx +RGBLINK ?= $(RGBDS)rgblink + + +### Build targets + +.SUFFIXES: +.PHONY: all crystal clean tidy tools +.SECONDEXPANSION: +.PRECIOUS: +.SECONDARY: + +all: crystal +crystal: pokecrystal.gbc +crystal_vc: pokecrystal.patch + +clean: tidy + find gfx \ + \( -name "*.[12]bpp" \ + -o -name "*.lz" \ + -o -name "*.gbcpal" \ + -o -name "*.sgb.tilemap" \) \ + -delete + find gfx/pokemon -mindepth 1 \ + ! -path "gfx/pokemon/unown/*" \ + \( -name "bitmask.asm" \ + -o -name "frames.asm" \ + -o -name "front.animated.tilemap" \ + -o -name "front.dimensions" \) \ + -delete + +tidy: + $(RM) $(roms) \ + $(roms:.gbc=.sym) \ + $(roms:.gbc=.map) \ + $(patches) \ + $(patches:.patch=_vc.gbc) \ + $(patches:.patch=_vc.sym) \ + $(patches:.patch=_vc.map) \ + $(patches:%.patch=vc/%.constants.sym) \ + $(pokecrystal_obj) \ + $(pokecrystal_vc_obj) \ + rgbdscheck.o + $(MAKE) clean -C tools/ + +tools: + $(MAKE) -C tools/ + + +RGBASMFLAGS = -hL -Q8 -P includes.asm -Weverything -Wnumeric-string=2 -Wtruncation=1 +# Create a sym/map for debug purposes if `make` run with `DEBUG=1` +ifeq ($(DEBUG),1) +RGBASMFLAGS += -E +endif + +$(pokecrystal_obj): RGBASMFLAGS += +$(pokecrystal_vc_obj): RGBASMFLAGS += -D _CRYSTAL_VC + +%.patch: vc/%.constants.sym %_vc.gbc %.gbc vc/%.patch.template + tools/make_patch $*_vc.sym $^ $@ + +rgbdscheck.o: rgbdscheck.asm + $(RGBASM) -o $@ $< + +# Build tools when building the rom. +# This has to happen before the rules are processed, since that's when scan_includes is run. +ifeq (,$(filter clean tidy tools,$(MAKECMDGOALS))) + +$(info $(shell $(MAKE) -C tools)) + +# The dep rules have to be explicit or else missing files won't be reported. +# As a side effect, they're evaluated immediately instead of when the rule is invoked. +# It doesn't look like $(shell) can be deferred so there might not be a better way. +preinclude_deps := includes.asm $(shell tools/scan_includes includes.asm) +define DEP +$1: $2 $$(shell tools/scan_includes $2) $(preinclude_deps) | rgbdscheck.o + $$(RGBASM) $$(RGBASMFLAGS) -o $$@ $$< +endef + +# Dependencies for shared objects objects +$(foreach obj, $(pokecrystal_obj), $(eval $(call DEP,$(obj),$(obj:.o=.asm)))) +$(foreach obj, $(pokecrystal_vc_obj), $(eval $(call DEP,$(obj),$(obj:_vc.o=.asm)))) + +# Dependencies for VC files that need to run scan_includes +%.constants.sym: %.constants.asm $(shell tools/scan_includes %.constants.asm) $(preinclude_deps) | rgbdscheck.o + $(RGBASM) $(RGBASMFLAGS) $< > $@ + +endif + + +pokecrystal_opt = -Cjv -t PM_CRYSTAL -i BYTE -n 0 -k 01 -l 0x33 -m 0x10 -r 3 -p 0 +pokecrystal_vc_opt = -Cjv -t PM_CRYSTAL -i BYTE -n 0 -k 01 -l 0x33 -m 0x10 -r 3 -p 0 + +%.gbc: $$(%_obj) layout.link + $(RGBLINK) -n $*.sym -m $*.map -l layout.link -o $@ $(filter %.o,$^) + $(RGBFIX) $($*_opt) $@ + tools/stadium $@ + + +### LZ compression rules + +%.lz: % + tools/lzcomp -- $< $@ + + +### Pokemon pic animation rules + +gfx/pokemon/%/front.animated.2bpp: gfx/pokemon/%/front.2bpp gfx/pokemon/%/front.dimensions + tools/pokemon_animation_graphics -o $@ $^ +gfx/pokemon/%/front.animated.tilemap: gfx/pokemon/%/front.2bpp gfx/pokemon/%/front.dimensions + tools/pokemon_animation_graphics -t $@ $^ +gfx/pokemon/%/bitmask.asm: gfx/pokemon/%/front.animated.tilemap gfx/pokemon/%/front.dimensions + tools/pokemon_animation -b $^ > $@ +gfx/pokemon/%/frames.asm: gfx/pokemon/%/front.animated.tilemap gfx/pokemon/%/front.dimensions + tools/pokemon_animation -f $^ > $@ + + +### Misc file-specific graphics rules + +gfx/pokemon/%/back.2bpp: rgbgfx += -Z -c embedded +gfx/pokemon/%/front.2bpp: rgbgfx += -c embedded + +gfx/trainers/%.2bpp: rgbgfx += -Z -c embedded + +gfx/pokemon/egg/unused_front.2bpp: rgbgfx += -Z + +gfx/new_game/shrink1.2bpp: rgbgfx += -Z +gfx/new_game/shrink2.2bpp: rgbgfx += -Z + +gfx/mail/dragonite.1bpp: tools/gfx += --remove-whitespace +gfx/mail/large_note.1bpp: tools/gfx += --remove-whitespace +gfx/mail/surf_mail_border.1bpp: tools/gfx += --remove-whitespace +gfx/mail/flower_mail_border.1bpp: tools/gfx += --remove-whitespace +gfx/mail/litebluemail_border.1bpp: tools/gfx += --remove-whitespace + +gfx/pokedex/pokedex.2bpp: tools/gfx += --trim-whitespace +gfx/pokedex/pokedex_sgb.2bpp: tools/gfx += --trim-whitespace +gfx/pokedex/question_mark.2bpp: rgbgfx += -Z +gfx/pokedex/slowpoke.2bpp: tools/gfx += --trim-whitespace +gfx/pokedex/question_mark.2bpp: rgbgfx += -h + +gfx/pokegear/pokegear.2bpp: rgbgfx += -x2 +gfx/pokegear/pokegear_sprites.2bpp: tools/gfx += --trim-whitespace + +gfx/mystery_gift/mystery_gift.2bpp: tools/gfx += --trim-whitespace + +gfx/title/crystal.2bpp: tools/gfx += --interleave --png=$< +gfx/title/old_fg.2bpp: tools/gfx += --interleave --png=$< +gfx/title/logo.2bpp: rgbgfx += -x 4 + +gfx/trade/ball.2bpp: tools/gfx += --remove-whitespace +gfx/trade/game_boy.2bpp: tools/gfx += --remove-duplicates --preserve=0x23,0x27 +gfx/trade/game_boy_cable.2bpp: gfx/trade/game_boy.2bpp gfx/trade/link_cable.2bpp ; cat $^ > $@ + +gfx/slots/slots_1.2bpp: tools/gfx += --trim-whitespace +gfx/slots/slots_2.2bpp: tools/gfx += --interleave --png=$< +gfx/slots/slots_3.2bpp: tools/gfx += --interleave --png=$< --remove-duplicates --keep-whitespace --remove-xflip + +gfx/card_flip/card_flip_1.2bpp: tools/gfx += --trim-whitespace +gfx/card_flip/card_flip_2.2bpp: tools/gfx += --remove-whitespace + +gfx/battle_anims/angels.2bpp: tools/gfx += --trim-whitespace +gfx/battle_anims/beam.2bpp: tools/gfx += --remove-xflip --remove-yflip --remove-whitespace +gfx/battle_anims/bubble.2bpp: tools/gfx += --trim-whitespace +gfx/battle_anims/charge.2bpp: tools/gfx += --trim-whitespace +gfx/battle_anims/egg.2bpp: tools/gfx += --remove-whitespace +gfx/battle_anims/explosion.2bpp: tools/gfx += --remove-whitespace +gfx/battle_anims/hit.2bpp: tools/gfx += --remove-whitespace +gfx/battle_anims/horn.2bpp: tools/gfx += --remove-whitespace +gfx/battle_anims/lightning.2bpp: tools/gfx += --remove-whitespace +gfx/battle_anims/misc.2bpp: tools/gfx += --remove-duplicates --remove-xflip +gfx/battle_anims/noise.2bpp: tools/gfx += --remove-whitespace +gfx/battle_anims/objects.2bpp: tools/gfx += --remove-whitespace --remove-xflip +gfx/battle_anims/pokeball.2bpp: tools/gfx += --remove-xflip --keep-whitespace +gfx/battle_anims/reflect.2bpp: tools/gfx += --remove-whitespace +gfx/battle_anims/rocks.2bpp: tools/gfx += --remove-whitespace +gfx/battle_anims/skyattack.2bpp: tools/gfx += --remove-whitespace +gfx/battle_anims/status.2bpp: tools/gfx += --remove-whitespace + +gfx/player/chris.2bpp: rgbgfx += -Z +gfx/player/chris_back.2bpp: rgbgfx += -Z +gfx/player/kris.2bpp: rgbgfx += -Z +gfx/player/kris_back.2bpp: rgbgfx += -Z + +gfx/trainer_card/chris_card.2bpp: rgbgfx += -Z +gfx/trainer_card/kris_card.2bpp: rgbgfx += -Z +gfx/trainer_card/leaders.2bpp: tools/gfx += --trim-whitespace + +gfx/overworld/chris_fish.2bpp: tools/gfx += --trim-whitespace +gfx/overworld/kris_fish.2bpp: tools/gfx += --trim-whitespace + +gfx/sprites/big_onix.2bpp: tools/gfx += --remove-whitespace --remove-xflip + +gfx/battle/dude.2bpp: rgbgfx += -Z + +gfx/font/unused_bold_font.1bpp: tools/gfx += --trim-whitespace + +gfx/sgb/sgb_border.2bpp: tools/gfx += --trim-whitespace +gfx/sgb/sgb_border.sgb.tilemap: gfx/sgb/sgb_border.bin ; tr < $< -d '\000' > $@ + +gfx/mobile/ascii_font.2bpp: tools/gfx += --trim-whitespace +gfx/mobile/dialpad.2bpp: tools/gfx += --trim-whitespace +gfx/mobile/dialpad_cursor.2bpp: tools/gfx += --trim-whitespace +gfx/mobile/electro_ball.2bpp: tools/gfx += --remove-duplicates --remove-xflip --preserve=0x39 +gfx/mobile/mobile_splash.2bpp: tools/gfx += --remove-duplicates --remove-xflip +gfx/mobile/card.2bpp: tools/gfx += --trim-whitespace +gfx/mobile/card_2.2bpp: tools/gfx += --trim-whitespace +gfx/mobile/card_folder.2bpp: tools/gfx += --trim-whitespace +gfx/mobile/phone_tiles.2bpp: tools/gfx += --remove-whitespace +gfx/mobile/pichu_animated.2bpp: tools/gfx += --trim-whitespace +gfx/mobile/stadium2_n64.2bpp: tools/gfx += --trim-whitespace + + +### Catch-all graphics rules + +%.2bpp: %.png + $(RGBGFX) $(rgbgfx) -o $@ $< + $(if $(tools/gfx),\ + tools/gfx $(tools/gfx) -o $@ $@) + +%.1bpp: %.png + $(RGBGFX) $(rgbgfx) -d1 -o $@ $< + $(if $(tools/gfx),\ + tools/gfx $(tools/gfx) -d1 -o $@ $@) + +%.gbcpal: %.png + $(RGBGFX) -c embedded -p $@ $< + +%.dimensions: %.png + tools/png_dimensions $< $@ diff --git a/README.md b/README.md new file mode 100644 index 0000000..ca03859 --- /dev/null +++ b/README.md @@ -0,0 +1,71 @@ +# 16-bit index expansion for Crystal + +This repository contains a modified Pokémon Crystal game, updated to handle 16-bit indexes. The main goal of this +project is to create a reusable system that ROM hacks can use to bring 16-bit indexes into their games. +It is *not* within scope to create a new game, or to add additional features beyond 16-bit indexes. + +The `master` branch of this repository is intended to perform identically to the original Pokémon Crystal, with +minimal changes to support further development on it. Other branches will implement more features on top of it; the +intention is that the necessary changes can be readily seen by comparing said branches to `master` (or between each +other). Therefore, these other branches will never be merged into `master`, even though they will always be directly +descended from it (i.e., in Git terminology, a merge would be a fast-forward). + +Since this repository is intended to be used as a reference, the commit history is intentionally kept clean to make +changes clearly visible. Therefore, modifications (such as bug fixes) will often be merged into whichever commit is +more suitable for them, with the remainder of the commit tree rebased on top of the updated commit. **Please do not +fork this repository to build a new game on top** (unless you intend to contribute to it), as the publicly-visible +history will be repeatedly rewritten, making merges impossible. If you do want to contribute to the repository, let +me know in advance so I can notify you of history rewrites. + +For further documentation, check out the [wiki]. + +## Branches + +* `master`: (status: **stable**, last update: **2023-07-18**) Base branch. This branch contains a slightly modified + version of Pokémon Crystal, with some quality-of-life improvements intended to make development easier. These + improvements have been taken from the documentation in the [main disassembly repository][pokecrystal]. This branch + contains no 16-bit features and it is only intended as a reference. +* `base-components`: (status: **stable**, last update: **2023-07-18**) This branch defines the basic components that + will comprise the 16-bit index table system, on top of which the remaining branches will be built. Since it only + defines macros (and a handful of WRAM locations to be shared by all index tables), it should build the same ROM as + `master`. +* `expand-mon-ID`: (status: **stable**, last update: **2023-07-18**) This branch implements 16-bit indexes for Pokémon + species, thus allowing more than 253 species to be included in a single game. +* `expand-move-ID`: (status: **stable**, last update: **2023-07-18**) This branch implements 16-bit indexes for moves, + on top of the existing 16-bit support for Pokémon species from the previous branch. (Interaction between the + branches is kept to a minimum, though.) +* `newbox`: (status: **experimental**, last update: **2023-07-18**) This branch ports Rangi & FIQ's "newbox" from + Polished Crystal. Newbox is a complete overhaul to Bill's PC, and this branch ports the functionality on + top of the previous branches. +* `pokecrystal`: (status: **N/A**, last update **2023-07-18**) This branch contains pret's vanilla pokecrystal and + should only be used to compare with the previous branches to view pokecrystal16 changes. **DO NOT USE THIS BRANCH!** + +To view the differences between any two branches (or any two commits in the repository), you can use GitHub's [tree +comparison][compare] tool. + +## FAQs + +**Q1:** Will this engine include \? +**A1:** Unless the feature is specifically related to 16-bit indexing (or otherwise extending the range of possible +index values), the answer is almost certainly "no". This repository's scope is limited to 16-bit indexes. If you +already have a ROM hack that includes the features you like and you'd want it to have 16-bit indexes, the right course +of action would be to port this engine to it. Otherwise, you can use this engine as a base to make your own ROM hack +with all the features you want. + +**Q2:** Can I use this engine for my own ROM hack? +**A2:** Of course; that's what it was made for. I will try make it as easy as possible to port to existing or new ROM +hacks; instructions to do so will be in the [wiki]. All I can ask you for is that, just like this engine was openly +available for you to use, you make your hack's code openly available as well — quoting some of the text in +[SQLite](https://sqlite.org)'s copyright disclaimer, "may you share freely, never taking more than you give". + +**Q3:** What's this engine's new limit on indexes? +**A3:** The theoretical limit is 65,534, minus a couple of "special" indexes used by the game for specific purposes +(such as the value that indicates that a Pokémon is inside an egg). However, there are several limitations that will +probably prevent you from ever reaching that limit. For starters, you can't fit 65,534 of _anything_ inside a ROM +bank! The index work is done, and I'll try to remove any hurdles that would render that work useless; however, if you +want to push the limits of the hardware and add 20,000 new Pokémon, you'll find yourself against a technical challenge +that will go beyond indexes. + +[compare]: https://github.com/aaaaaa123456789/pokecrystal16/compare +[pokecrystal]: https://github.com/pret/pokecrystal/ +[wiki]: https://github.com/aaaaaa123456789/pokecrystal16/wiki diff --git a/audio.asm b/audio.asm new file mode 100644 index 0000000..06d122d --- /dev/null +++ b/audio.asm @@ -0,0 +1,167 @@ +SECTION "Audio", ROMX + +INCLUDE "audio/engine.asm" +INCLUDE "data/trainers/encounter_music.asm" +INCLUDE "audio/music_pointers.asm" +INCLUDE "audio/music/nothing.asm" +INCLUDE "audio/cry_pointers.asm" +INCLUDE "audio/sfx_pointers.asm" + + +SECTION "Songs 1", ROMX + +INCLUDE "audio/music/route36.asm" +INCLUDE "audio/music/rivalbattle.asm" +INCLUDE "audio/music/rocketbattle.asm" +INCLUDE "audio/music/elmslab.asm" +INCLUDE "audio/music/darkcave.asm" +INCLUDE "audio/music/johtogymbattle.asm" +INCLUDE "audio/music/championbattle.asm" +INCLUDE "audio/music/ssaqua.asm" +INCLUDE "audio/music/newbarktown.asm" +INCLUDE "audio/music/goldenrodcity.asm" +INCLUDE "audio/music/vermilioncity.asm" +INCLUDE "audio/music/titlescreen.asm" +INCLUDE "audio/music/ruinsofalphinterior.asm" +INCLUDE "audio/music/lookpokemaniac.asm" +INCLUDE "audio/music/trainervictory.asm" + + +SECTION "Songs 2", ROMX + +INCLUDE "audio/music/route1.asm" +INCLUDE "audio/music/route3.asm" +INCLUDE "audio/music/route12.asm" +INCLUDE "audio/music/kantogymbattle.asm" +INCLUDE "audio/music/kantotrainerbattle.asm" +INCLUDE "audio/music/kantowildbattle.asm" +INCLUDE "audio/music/pokemoncenter.asm" +INCLUDE "audio/music/looklass.asm" +INCLUDE "audio/music/lookofficer.asm" +INCLUDE "audio/music/route2.asm" +INCLUDE "audio/music/mtmoon.asm" +INCLUDE "audio/music/showmearound.asm" +INCLUDE "audio/music/gamecorner.asm" +INCLUDE "audio/music/bicycle.asm" +INCLUDE "audio/music/looksage.asm" +INCLUDE "audio/music/pokemonchannel.asm" +INCLUDE "audio/music/lighthouse.asm" +INCLUDE "audio/music/lakeofrage.asm" +INCLUDE "audio/music/indigoplateau.asm" +INCLUDE "audio/music/route37.asm" +INCLUDE "audio/music/rockethideout.asm" +INCLUDE "audio/music/dragonsden.asm" +INCLUDE "audio/music/ruinsofalphradio.asm" +INCLUDE "audio/music/lookbeauty.asm" +INCLUDE "audio/music/route26.asm" +INCLUDE "audio/music/ecruteakcity.asm" +INCLUDE "audio/music/lakeofragerocketradio.asm" +INCLUDE "audio/music/magnettrain.asm" +INCLUDE "audio/music/lavendertown.asm" +INCLUDE "audio/music/dancinghall.asm" +INCLUDE "audio/music/contestresults.asm" +INCLUDE "audio/music/route30.asm" + + +SECTION "Songs 3", ROMX + +INCLUDE "audio/music/violetcity.asm" +INCLUDE "audio/music/route29.asm" +INCLUDE "audio/music/halloffame.asm" +INCLUDE "audio/music/healpokemon.asm" +INCLUDE "audio/music/evolution.asm" +INCLUDE "audio/music/printer.asm" + + +SECTION "Songs 4", ROMX + +INCLUDE "audio/music/viridiancity.asm" +INCLUDE "audio/music/celadoncity.asm" + +INCLUDE "audio/music/wildpokemonvictory.asm" +INCLUDE "audio/music/successfulcapture.asm" +assert BANK(Music_WildPokemonVictory) == BANK(Music_SuccessfulCapture) + +INCLUDE "audio/music/gymleadervictory.asm" +INCLUDE "audio/music/mtmoonsquare.asm" +INCLUDE "audio/music/gym.asm" +INCLUDE "audio/music/pallettown.asm" +INCLUDE "audio/music/profoakspokemontalk.asm" +INCLUDE "audio/music/profoak.asm" + +INCLUDE "audio/music/lookrival.asm" +INCLUDE "audio/music/aftertherivalfight.asm" +assert BANK(Music_LookRival) == BANK(Music_AfterTheRivalFight) + +INCLUDE "audio/music/surf.asm" +INCLUDE "audio/music/nationalpark.asm" +INCLUDE "audio/music/azaleatown.asm" +INCLUDE "audio/music/cherrygrovecity.asm" +INCLUDE "audio/music/unioncave.asm" + +INCLUDE "audio/music/johtowildbattle.asm" +INCLUDE "audio/music/johtowildbattlenight.asm" +assert BANK(Music_JohtoWildBattle) == BANK(Music_JohtoWildBattleNight) + +INCLUDE "audio/music/johtotrainerbattle.asm" +INCLUDE "audio/music/lookyoungster.asm" +INCLUDE "audio/music/tintower.asm" +INCLUDE "audio/music/sprouttower.asm" +INCLUDE "audio/music/burnedtower.asm" +INCLUDE "audio/music/mom.asm" +INCLUDE "audio/music/victoryroad.asm" +INCLUDE "audio/music/pokemonlullaby.asm" +INCLUDE "audio/music/pokemonmarch.asm" +INCLUDE "audio/music/goldsilveropening.asm" +INCLUDE "audio/music/goldsilveropening2.asm" +INCLUDE "audio/music/lookhiker.asm" + +INCLUDE "audio/music/lookrocket.asm" +INCLUDE "audio/music/rockettheme.asm" +assert BANK(Music_LookRocket) == BANK(Music_RocketTheme) + +INCLUDE "audio/music/mainmenu.asm" +INCLUDE "audio/music/lookkimonogirl.asm" +INCLUDE "audio/music/pokeflutechannel.asm" +INCLUDE "audio/music/bugcatchingcontest.asm" + + +SECTION "Songs 5", ROMX + +INCLUDE "audio/music/mobileadaptermenu.asm" +INCLUDE "audio/music/buenaspassword.asm" +INCLUDE "audio/music/lookmysticalman.asm" +INCLUDE "audio/music/crystalopening.asm" +INCLUDE "audio/music/battletowertheme.asm" +INCLUDE "audio/music/suicunebattle.asm" +INCLUDE "audio/music/battletowerlobby.asm" +INCLUDE "audio/music/mobilecenter.asm" + + +SECTION "Extra Songs 1", ROMX + +INCLUDE "audio/music/credits.asm" +INCLUDE "audio/music/clair.asm" +INCLUDE "audio/music/mobileadapter.asm" + + +SECTION "Extra Songs 2", ROMX + +INCLUDE "audio/music/postcredits.asm" + + +SECTION "Sound Effects", ROMX + +INCLUDE "audio/sfx.asm" + + +SECTION "Crystal Sound Effects", ROMX + +INCLUDE "audio/sfx_crystal.asm" + + +SECTION "Cries", ROMX + +INCLUDE "data/pokemon/cries.asm" + +INCLUDE "audio/cries.asm" diff --git a/audio/cries.asm b/audio/cries.asm new file mode 100644 index 0000000..cf2ead1 --- /dev/null +++ b/audio/cries.asm @@ -0,0 +1,2110 @@ +Cry_Marill: + channel_count 3 + channel 5, Cry_Marill_Ch5 + channel 6, Cry_Marill_Ch6 + channel 8, Cry_Marill_Ch8 + +Cry_Togepi: + channel_count 2 + channel 5, Cry_Togepi_Ch5 + channel 6, Cry_Togepi_Ch6 + +Cry_Togetic: + channel_count 2 + channel 5, Cry_Togetic_Ch5 + channel 6, Cry_Togetic_Ch6 + +Cry_Spinarak: + channel_count 3 + channel 5, Cry_Spinarak_Ch5 + channel 6, Cry_Spinarak_Ch6 + channel 8, Cry_Spinarak_Ch8 + +Cry_Raikou: + channel_count 3 + channel 5, Cry_Raikou_Ch5 + channel 6, Cry_Raikou_Ch6 + channel 8, Cry_Raikou_Ch8 + +Cry_Hoothoot: + channel_count 3 + channel 5, Cry_Hoothoot_Ch5 + channel 6, Cry_Hoothoot_Ch6 + channel 8, Cry_Hoothoot_Ch8 + +Cry_Sentret: + channel_count 2 + channel 5, Cry_Sentret_Ch5 + channel 6, Cry_Sentret_Ch6 + +Cry_Slowking: + channel_count 3 + channel 5, Cry_Slowking_Ch5 + channel 6, Cry_Slowking_Ch6 + channel 8, Cry_Slowking_Ch8 + +Cry_Mareep: + channel_count 2 + channel 5, Cry_Mareep_Ch5 + channel 6, Cry_Mareep_Ch6 + +Cry_Cyndaquil: + channel_count 3 + channel 5, Cry_Cyndaquil_Ch5 + channel 6, Cry_Cyndaquil_Ch6 + channel 8, Cry_Cyndaquil_Ch8 + +Cry_Chikorita: + channel_count 3 + channel 5, Cry_Chikorita_Ch5 + channel 6, Cry_Chikorita_Ch6 + channel 8, Cry_Chikorita_Ch8 + +Cry_Gligar: + channel_count 2 + channel 5, Cry_Gligar_Ch5 + channel 8, Cry_Gligar_Ch8 + +Cry_Girafarig: + channel_count 3 + channel 5, Cry_Girafarig_Ch5 + channel 6, Cry_Girafarig_Ch6 + channel 8, Cry_Girafarig_Ch8 + +Cry_Slugma: + channel_count 2 + channel 5, Cry_Slugma_Ch5 + channel 8, Cry_Slugma_Ch8 + +Cry_Ledyba: + channel_count 3 + channel 5, Cry_Ledyba_Ch5 + channel 6, Cry_Ledyba_Ch6 + channel 8, Cry_Ledyba_Ch8 + +Cry_Wooper: + channel_count 3 + channel 5, Cry_Wooper_Ch5 + channel 6, Cry_Wooper_Ch6 + channel 8, Cry_Wooper_Ch8 + +Cry_Donphan: + channel_count 3 + channel 5, Cry_Donphan_Ch5 + channel 6, Cry_Donphan_Ch6 + channel 8, Cry_Donphan_Ch8 + +Cry_Typhlosion: + channel_count 3 + channel 5, Cry_Typhlosion_Ch5 + channel 6, Cry_Typhlosion_Ch6 + channel 8, Cry_Typhlosion_Ch8 + +Cry_Natu: + channel_count 3 + channel 5, Cry_Natu_Ch5 + channel 6, Cry_Natu_Ch6 + channel 8, Cry_Natu_Ch8 + +Cry_Teddiursa: + channel_count 3 + channel 5, Cry_Teddiursa_Ch5 + channel 6, Cry_Teddiursa_Ch6 + channel 8, Cry_Teddiursa_Ch8 + +Cry_Sunflora: + channel_count 3 + channel 5, Cry_Sunflora_Ch5 + channel 6, Cry_Sunflora_Ch6 + channel 8, Cry_Sunflora_Ch8 + +Cry_Ampharos: + channel_count 3 + channel 5, Cry_Ampharos_Ch5 + channel 6, Cry_Ampharos_Ch6 + channel 8, Cry_Ampharos_Ch8 + +Cry_Totodile: + channel_count 3 + channel 5, Cry_Totodile_Ch5 + channel 6, Cry_Totodile_Ch6 + channel 8, Cry_Totodile_Ch8 + +Cry_Cleffa: + channel_count 3 + channel 5, Cry_Cleffa_Ch5 + channel 6, Cry_Cleffa_Ch6 + channel 8, Cry_Cleffa_Ch8 + +Cry_Pichu: + channel_count 3 + channel 5, Cry_Pichu_Ch5 + channel 6, Cry_Pichu_Ch6 + channel 8, Cry_Pichu_Ch8 + +Cry_Aipom: + channel_count 3 + channel 5, Cry_Aipom_Ch5 + channel 6, Cry_Aipom_Ch6 + channel 8, Cry_Aipom_Ch8 + +Cry_Dunsparce: + channel_count 3 + channel 5, Cry_Dunsparce_Ch5 + channel 6, Cry_Dunsparce_Ch6 + channel 8, Cry_Dunsparce_Ch8 + +Cry_Magcargo: + channel_count 3 + channel 5, Cry_Magcargo_Ch5 + channel 6, Cry_Magcargo_Ch6 + channel 8, Cry_Magcargo_Ch8 + +Cry_Entei: + channel_count 3 + channel 5, Cry_Entei_Ch5 + channel 6, Cry_Entei_Ch6 + channel 8, Cry_Entei_Ch8 + +Cry_Mantine: + channel_count 3 + channel 5, Cry_Mantine_Ch5 + channel 6, Cry_Mantine_Ch6 + channel 8, Cry_Mantine_Ch8 + +Cry_Entei_Ch5: + pitch_sweep 15, -7 + duty_cycle_pattern 1, 2, 0, 3 + square_note 1, 15, 8, 1528 + square_note 8, 9, -7, 1240 + square_note 6, 15, 8, 1476 + square_note 20, 15, 2, 1396 + pitch_sweep 8, 8 + sound_ret + +Cry_Entei_Ch6: + duty_cycle_pattern 0, 3, 0, 3 + square_note 1, 12, 8, 1600 + square_note 6, 15, -7, 1640 + square_note 7, 10, 8, 1332 + square_note 20, 10, 2, 1188 + sound_ret + +Cry_Entei_Ch8: + noise_note 10, 13, 6, 106 + noise_note 6, 11, -4, 108 + noise_note 6, 14, 2, 92 + noise_note 32, 11, 4, 108 + sound_ret + +Cry_Magcargo_Ch5: + duty_cycle_pattern 3, 0, 1, 0 + square_note 4, 10, -7, 1824 + square_note 2, 15, 8, 1820 + square_note 2, 15, 8, 1816 + square_note 2, 15, 8, 1800 + square_note 2, 15, 8, 1806 + square_note 12, 12, 8, 1810 + square_note 4, 9, 1, 1806 + sound_ret + +Cry_Magcargo_Ch6: + duty_cycle_pattern 0, 0, 2, 2 + square_note 1, 11, 8, 1808 + square_note 3, 13, 8, 1836 + square_note 4, 13, 8, 1637 + square_note 1, 11, 8, 1622 + square_note 1, 13, 8, 1628 + square_note 12, 15, 8, 1888 + square_note 4, 12, 1, 1872 + sound_ret + +Cry_Magcargo_Ch8: + noise_note 2, 14, 8, 59 +.loop: + noise_note 1, 15, 1, 78 + sound_loop 5, .loop + noise_note 2, 13, 8, 63 + noise_note 20, 12, 2, 95 + sound_ret + +Cry_Dunsparce_Ch5: + duty_cycle_pattern 0, 2, 0, 2 + square_note 1, 15, 8, 1456 + square_note 1, 15, 8, 1204 + square_note 1, 15, 8, 1464 + square_note 3, 15, 8, 1472 + square_note 8, 12, 8, 1168 + square_note 8, 12, 8, 1152 + pitch_sweep 15, -6 + square_note 16, 12, 3, 1168 + pitch_sweep 8, 8 + sound_ret + +Cry_Dunsparce_Ch6: + duty_cycle_pattern 0, 2, 0, 2 + square_note 8, 11, 8, 1224 + square_note 32, 11, 5, 1040 + sound_ret + +Cry_Dunsparce_Ch8: + noise_note 3, 15, -7, 75 + noise_note 3, 14, -7, 76 + noise_note 32, 11, 5, 95 + sound_ret + +Cry_Slowking_Ch5: + duty_cycle_pattern 0, 3, 0, 3 + square_note 2, 15, 1, 1360 + square_note 2, 15, 1, 1328 + square_note 2, 15, 1, 1296 + square_note 2, 15, 2, 1616 + square_note 2, 15, 2, 1600 + square_note 2, 15, 2, 1584 + square_note 16, 15, 2, 1360 + sound_ret + +Cry_Slowking_Ch6: + duty_cycle_pattern 3, 3, 0, 2 + square_note 4, 14, 1, 1568 + square_note 5, 14, 2, 1280 + square_note 6, 14, 1, 1568 + square_note 2, 14, 1, 1312 + square_note 16, 14, 2, 1280 + sound_ret + +Cry_Slowking_Ch8: + noise_note 2, 8, -2, 93 + noise_note 2, 9, -2, 76 + noise_note 5, 9, -2, 93 + noise_note 2, 9, -2, 77 + noise_note 2, 9, -2, 75 + noise_note 2, 9, -2, 77 + noise_note 2, 9, -2, 95 + noise_note 16, 11, 2, 111 + sound_ret + +Cry_Pichu_Ch5: + duty_cycle 0 + pitch_sweep 15, 7 + square_note 2, 15, 8, 1933 + square_note 2, 15, 8, 1937 + pitch_sweep 15, -7 + square_note 2, 15, 8, 1965 + pitch_sweep 8, 8 + square_note 2, 15, 8, 1972 + pitch_sweep 15, 7 + square_note 2, 15, 8, 1976 + pitch_sweep 8, 8 + sound_ret + +Cry_Pichu_Ch6: + duty_cycle_pattern 0, 1, 0, 0 + square_note 2, 12, 8, 1901 + square_note 2, 12, 8, 1905 + square_note 2, 12, 8, 1933 + square_note 2, 12, 8, 1940 + square_note 2, 12, 8, 1944 + sound_ret + +Cry_Pichu_Ch8: + noise_note 2, 11, 8, 1 + noise_note 2, 11, 8, 25 + noise_note 2, 12, 8, 24 + noise_note 2, 11, 8, 16 + noise_note 8, 12, 2, 24 + sound_ret + +Cry_Marill_Ch5: + duty_cycle_pattern 0, 2, 0, 2 + square_note 2, 8, 8, 1752 + square_note 8, 14, 2, 1760 + square_note 2, 6, 1, 1765 + square_note 2, 14, 8, 1728 + square_note 2, 14, 8, 1720 + square_note 2, 13, 8, 1712 + square_note 8, 12, 1, 1706 + sound_ret + +Cry_Marill_Ch6: + duty_cycle_pattern 1, 2, 0, 3 + square_note 2, 6, 8, 1713 + square_note 5, 12, 1, 1721 + square_note 5, 9, -1, 1888 + square_note 2, 11, 8, 1676 + square_note 2, 10, 8, 1668 + square_note 10, 9, 2, 1659 + sound_ret + +Cry_Marill_Ch8: + noise_note 1, 9, -1, 108 + noise_note 1, 9, 2, 92 + noise_note 10, 6, 2, 76 + noise_note 2, 6, 8, 106 + noise_note 2, 6, 8, 107 + noise_note 10, 6, 2, 108 + sound_ret + +Cry_Togepi_Ch5: + pitch_offset 2 +Cry_Togepi_Ch6: + duty_cycle_pattern 1, 1, 0, 2 + square_note 4, 15, 1, 1942 + square_note 4, 15, 1, 1837 + square_note 7, 0, 0, 0 + square_note 16, 15, 1, 1959 + sound_ret + +Cry_Togetic_Ch5: + pitch_offset 2 +Cry_Togetic_Ch6: + sound_call Cry_Togepi_Ch6 + sound_loop 2, Cry_Togetic_Ch6 + square_note 14, 0, 0, 0 + square_note 8, 15, 2, 1986 + sound_ret + +Cry_Spinarak_Ch5: + duty_cycle 1 + square_note 3, 2, -4, 1988 + square_note 1, 0, 0, 1 + square_note 5, 5, -1, 1977 + square_note 6, 11, 4, 1979 + sound_ret + +Cry_Spinarak_Ch6: + duty_cycle_pattern 0, 2, 2, 2 + square_note 3, 2, -4, 1991 + square_note 1, 0, 0, 0 + square_note 5, 5, -1, 1982 + square_note 6, 11, 4, 1981 + sound_ret + +Cry_Spinarak_Ch8: + noise_note 3, 9, 2, 16 + noise_note 1, 3, -1, 0 + noise_note 5, 6, -1, 16 + noise_note 6, 9, 3, 0 + sound_ret + +Cry_Raikou_Ch5: + duty_cycle_pattern 3, 3, 2, 0 + square_note 2, 15, 1, 1200 + square_note 2, 15, 7, 1424 + square_note 8, 15, 8, 1296 + square_note 3, 15, 2, 1728 + square_note 3, 15, 8, 1722 + square_note 3, 15, 2, 1712 + square_note 16, 15, 2, 1680 + sound_ret + +Cry_Raikou_Ch6: + duty_cycle_pattern 3, 3, 0, 2 + square_note 2, 15, 1, 1824 + square_note 2, 14, 1, 1616 + square_note 4, 15, 1, 1872 + square_note 4, 13, 1, 928 + square_note 3, 15, 1, 1648 + square_note 3, 14, 1, 1664 + square_note 3, 15, 2, 1680 + square_note 16, 14, 2, 1696 + sound_ret + +Cry_Raikou_Ch8: + noise_note 2, 8, -1, 46 + noise_note 2, 9, -1, 31 + noise_note 4, 8, -1, 78 + noise_note 4, 8, -1, 123 + noise_note 3, 13, 8, 75 + noise_note 3, 14, 7, 76 + noise_note 3, 14, -4, 77 + noise_note 16, 13, 2, 79 + sound_ret + +Cry_Hoothoot_Ch5: + duty_cycle_pattern 1, 2, 1, 2 + square_note 4, 7, 8, 1616 + square_note 4, 15, 8, 1632 + square_note 4, 15, 8, 1628 + square_note 1, 15, 8, 1660 + square_note 4, 15, 8, 1664 + square_note 4, 15, 8, 1660 + square_note 4, 15, 8, 1656 + square_note 4, 15, 1, 1652 + sound_ret + +Cry_Hoothoot_Ch6: + duty_cycle_pattern 0, 2, 0, 2 +.loop1: + square_note 2, 10, 1, 1536 + sound_loop 3, .loop1 +.loop2: + square_note 2, 10, 1, 1584 + sound_loop 4, .loop2 + square_note 4, 10, 2, 1588 + square_note 4, 9, 1, 1592 + sound_ret + +Cry_Hoothoot_Ch8: + noise_note 1, 6, 8, 54 + noise_note 16, 8, 8, 106 + noise_note 1, 9, 8, 94 + noise_note 16, 10, 7, 110 + sound_ret + +Cry_Sentret_Ch5: + pitch_offset 32 + duty_cycle 0 + sound_jump Cry_Sentret_Ch6.body + +Cry_Sentret_Ch6: + duty_cycle_pattern 0, 1, 2, 3 +.body: + square_note 8, 3, -1, 1837 + square_note 8, 15, 1, 1824 + sound_ret + +Cry_Sentret_Ch8: ; unreferenced + noise_note 8, 3, -3, 0 + noise_note 8, 9, 2, 0 + sound_ret + +Cry_Mareep_Ch5: + pitch_offset 32 + duty_cycle 0 + sound_jump Cry_Mareep_Ch6.body + +Cry_Mareep_Ch6: + duty_cycle_pattern 0, 0, 0, 1 +.body: + square_note 4, 3, -2, 1853 + square_note 6, 15, 8, 1890 + square_note 6, 15, 8, 1888 + square_note 6, 15, 1, 1886 + sound_ret + +Cry_Cyndaquil_Ch5: + pitch_offset 32 +Cry_Cyndaquil_Ch6: + duty_cycle 2 + square_note 8, 2, -7, 263 +.loop1: + square_note 0, 14, 1, 1155 + square_note 0, 5, 1, 1102 + sound_loop 4, .loop1 +.loop2: + square_note 0, 14, 1, 986 + square_note 1, 5, 1, 786 + sound_loop 4, .loop2 + sound_ret + +Cry_Gligar_Ch8: +Cry_Cyndaquil_Ch8: + noise_note 8, 3, -7, 82 + noise_note 32, 9, 3, 79 + sound_ret + +Cry_Chikorita_Ch5: + pitch_offset 32 +Cry_Chikorita_Ch6: + duty_cycle_pattern 0, 2, 0, 1 + square_note 2, 12, 8, 1601 + square_note 2, 4, 8, 1601 + square_note 6, 15, 8, 1936 + square_note 4, 15, 8, 1934 + square_note 4, 15, 1, 1931 + sound_ret + +Cry_Chikorita_Ch8: + noise_note 4, 9, 1, 16 + noise_note 8, 9, 4, 3 + sound_ret + +Cry_Gligar_Ch5: + duty_cycle_pattern 2, 2, 0, 2 + sound_jump Cry_Mareep_Ch6.body + +Cry_Girafarig_Ch5: + duty_cycle 1 + pitch_offset 4 + sound_jump Cry_Girafarig_Ch6.body + +Cry_Girafarig_Ch6: + duty_cycle_pattern 1, 0, 0, 1 +.body: + square_note 4, 6, 8, 1880 + square_note 2, 14, 8, 1888 + square_note 2, 14, 8, 1895 + square_note 2, 14, 8, 1900 + square_note 7, 15, 1, 1895 + sound_ret + +Cry_Girafarig_Ch8: + noise_note 4, 2, -1, 0 + noise_note 2, 3, -1, 1 + noise_note 2, 4, -1, 2 + noise_note 2, 5, -1, 1 + noise_note 7, 4, 1, 0 + sound_ret + +Cry_Slugma_Ch5: + duty_cycle_pattern 2, 1, 0, 1 + square_note 12, 15, 2, 1958 + square_note 4, 15, 8, 1968 + square_note 4, 14, 8, 944 + square_note 6, 15, 8, 928 + square_note 8, 14, 1, 656 + sound_ret + +Cry_Slugma_Ch8: + noise_note 12, 11, 2, 80 + noise_note 8, 10, 8, 96 + noise_note 6, 10, 8, 91 + noise_note 8, 10, 1, 92 + sound_ret + +Cry_Ledyba_Ch5: + pitch_offset 2 + duty_cycle 2 + sound_jump Cry_Ledyba_Ch6.body + +Cry_Ledyba_Ch6: + duty_cycle_pattern 0, 0, 0, 1 +.body: + square_note 3, 15, 8, 1937 + square_note 3, 13, 8, 1933 + square_note 2, 0, 0, 0 + square_note 1, 7, 8, 1729 + square_note 1, 15, 8, 1857 + square_note 4, 14, 1, 1873 + sound_ret + +Cry_Ledyba_Ch8: + noise_note 3, 5, -1, 33 + noise_note 3, 8, 1, 0 + noise_note 2, 2, 0, 0 + noise_note 1, 8, 0, 33 + noise_note 1, 8, 0, 16 + noise_note 4, 8, 7, 0 + sound_ret + +Cry_Wooper_Ch5: +Cry_Donphan_Ch5: + duty_cycle 2 + square_note 2, 9, -1, 1816 + square_note 4, 10, -3, 1826 + square_note 8, 10, -3, 1844 + square_note 4, 13, 6, 1814 + square_note 8, 13, 1, 1810 + square_note 8, 0, 0, 0 + sound_ret + +Cry_Wooper_Ch6: +Cry_Donphan_Ch6: + duty_cycle_pattern 0, 0, 1, 3 + square_note 2, 11, -1, 1848 + square_note 4, 12, -3, 1858 + square_note 8, 12, -3, 1876 + square_note 4, 15, 6, 1846 + square_note 8, 15, 1, 1842 + square_note 8, 0, 0, 0 + sound_ret + +Cry_Wooper_Ch8: + noise_note 2, 5, -3, 4 + noise_note 4, 6, 8, 19 + noise_note 8, 6, 8, 32 + noise_note 4, 6, 8, 19 + noise_note 16, 5, 1, 4 + sound_ret + +Cry_Donphan_Ch8: + noise_note 2, 8, -3, 89 + noise_note 4, 10, 8, 106 + noise_note 8, 10, 8, 112 + noise_note 4, 10, 8, 105 + noise_note 16, 9, 2, 108 + sound_ret + +Cry_Teddiursa_Ch5: +Cry_Typhlosion_Ch5: + duty_cycle_pattern 0, 1, 0, 2 +.loop1: + square_note 3, 12, 1, 1937 + sound_loop 3, .loop1 +.loop2: + square_note 3, 13, 1, 1201 + sound_loop 6, .loop2 +.loop3: + square_note 1, 13, 1, 1169 + square_note 1, 11, 1, 1105 + sound_loop 6, .loop3 +.loop4: + square_note 1, 10, 3, 1137 + square_note 1, 8, 1, 1089 + sound_loop 6, .loop4 +.loop5: + square_note 1, 4, 1, 1057 + square_note 1, 2, 1, 1025 + sound_loop 4, .loop5 + sound_ret + +Cry_Teddiursa_Ch6: +Cry_Typhlosion_Ch6: + duty_cycle_pattern 1, 3, 2, 0 + square_note 8, 9, -1, 1856 + square_note 8, 7, -1, 1862 + square_note 16, 15, 6, 1933 + square_note 8, 15, 8, 1937 + square_note 8, 15, 8, 1933 + square_note 8, 15, 8, 1927 + square_note 24, 14, 2, 1923 + sound_ret + +Cry_Typhlosion_Ch8: + noise_note 16, 10, 6, 22 + noise_note 24, 9, 8, 61 + noise_note 32, 9, 8, 92 + noise_note 32, 7, 5, 95 + sound_ret + +Cry_Natu_Ch5: + duty_cycle_pattern 3, 1, 3, 2 +.body1: + square_note 4, 15, 8, 1969 + square_note 4, 15, 8, 1968 + square_note 4, 4, 8, 1967 +.body2: + square_note 4, 15, 8, 1970 + square_note 4, 15, 8, 1971 + square_note 4, 4, 8, 1972 + sound_ret + +Cry_Natu_Ch6: +Cry_Sunflora_Ch6: +.body1: + duty_cycle_pattern 3, 3, 0, 2 + square_note 4, 15, 8, 1970 + square_note 4, 15, 8, 1969 + square_note 4, 2, 8, 1968 +.body2: + square_note 4, 15, 8, 1972 + square_note 4, 15, 8, 1974 + square_note 4, 4, 8, 1976 + sound_ret + +Cry_Natu_Ch8: +Cry_Sunflora_Ch8: +.body1: + noise_note 4, 8, 8, 5 + noise_note 4, 8, 8, 4 + noise_note 4, 3, 8, 3 +.body2: + noise_note 4, 8, 8, 5 + noise_note 4, 8, 8, 4 + noise_note 4, 8, 7, 4 + sound_ret + +Cry_Teddiursa_Ch8: + noise_note 8, 10, 6, 58 + noise_note 8, 10, 1, 90 + sound_ret + +Cry_Sunflora_Ch5: + duty_cycle 0 + sound_jump Cry_Natu_Ch5.body1 + +Cry_Mantine_Ch5: + duty_cycle 0 + sound_call Cry_Natu_Ch5.body1 + sound_call Cry_Natu_Ch5.body2 + sound_ret + +Cry_Mantine_Ch6: + sound_call Cry_Sunflora_Ch6.body1 + sound_call Cry_Sunflora_Ch6.body2 + sound_ret + +Cry_Mantine_Ch8: + sound_call Cry_Sunflora_Ch8.body1 + sound_call Cry_Sunflora_Ch8.body2 + sound_ret + +Cry_Ampharos_Ch5: + duty_cycle_pattern 3, 1, 3, 2 +.loop: + square_note 1, 12, 1, 1312 + square_note 1, 10, 1, 1056 + sound_loop 4, .loop + duty_cycle 0 + square_note 4, 7, 8, 1888 + square_note 4, 7, 8, 1840 + square_note 24, 12, 2, 1056 + sound_ret + +Cry_Ampharos_Ch6: + duty_cycle_pattern 0, 3, 0, 2 + square_note 8, 15, 8, 1792 + square_note 7, 15, 8, 1824 + square_note 4, 15, 8, 1936 + square_note 4, 15, 8, 1888 + square_note 24, 15, 2, 1840 + sound_ret + +Cry_Ampharos_Ch8: + noise_note 4, 8, 8, 109 + noise_note 4, 13, 8, 104 + noise_note 7, 12, 8, 105 + noise_note 4, 9, 8, 58 + noise_note 4, 9, 8, 60 + noise_note 24, 13, 2, 91 + sound_ret + +Cry_Totodile_Ch5: + duty_cycle_pattern 0, 3, 0, 2 + square_note 8, 15, 8, 816 + square_note 8, 15, 8, 832 + square_note 8, 12, 8, 1970 + square_note 8, 11, 8, 1971 + square_note 32, 11, 2, 1972 + sound_ret + +Cry_Totodile_Ch6: + duty_cycle_pattern 0, 1, 0, 2 + square_note 8, 14, 8, 800 + square_note 8, 14, 8, 808 + square_note 8, 9, 8, 1920 + square_note 8, 8, 8, 1922 + square_note 32, 7, 2, 1924 + sound_ret + +Cry_Totodile_Ch8: + noise_note 2, 11, -6, 73 + noise_note 5, 11, -6, 58 + noise_note 2, 11, -6, 41 + noise_note 40, 13, 3, 110 + sound_ret + +Cry_Cleffa_Ch5: + duty_cycle_pattern 0, 3, 2, 1 + pitch_sweep 15, -7 + square_note 2, 15, 8, 1824 + square_note 2, 15, 8, 1831 + square_note 2, 15, 8, 1920 + pitch_sweep 8, 8 + square_note 2, 15, 8, 1913 + square_note 4, 15, 8, 1856 + square_note 4, 15, 8, 1852 + pitch_sweep 15, -7 + square_note 8, 15, 1, 1847 + pitch_sweep 8, 8 + sound_ret + +Cry_Cleffa_Ch6: + duty_cycle_pattern 0, 2, 0, 2 + square_note 6, 11, 2, 1822 + square_note 5, 9, 2, 1913 + square_note 4, 8, 2, 1854 + square_note 8, 10, 1, 1845 + sound_ret + +Cry_Cleffa_Ch8: + noise_note 2, 6, 4, 127 + noise_note 2, 8, 4, 125 + noise_note 2, 10, 4, 111 + noise_note 2, 6, 4, 108 + noise_note 2, 9, 4, 111 + noise_note 2, 6, 1, 107 + sound_ret + +Cry_Aipom_Ch5: + duty_cycle_pattern 3, 1, 0, 2 + square_note 3, 15, 8, 1712 + square_note 1, 15, 8, 1701 + square_note 1, 15, 8, 1693 + square_note 7, 15, 1, 1674 + square_note 3, 15, 8, 1846 + square_note 3, 15, 8, 1824 + square_note 20, 15, 2, 1806 + sound_ret + +Cry_Aipom_Ch6: + duty_cycle_pattern 0, 2, 1, 3 +.loop1: + square_note 1, 15, 1, 1972 + sound_loop 8, .loop1 +.loop2: + square_note 1, 12, 1, 1936 + sound_loop 3, .loop2 +.loop3: + square_note 1, 11, 1, 1933 + sound_loop 2, .loop3 + square_note 16, 9, 2, 1941 + sound_ret + +Cry_Aipom_Ch8: + noise_note 0, 15, 1, 40 + sound_loop 4, Cry_Aipom_Ch8 + noise_note 0, 9, 1, 73 + noise_note 1, 10, 8, 74 + noise_note 0, 14, 1, 75 + noise_note 5, 13, 2, 79 + noise_note 3, 12, 2, 78 + noise_note 3, 11, 2, 77 + noise_note 20, 10, 3, 76 + sound_ret + +Cry_Nidoran_M: + channel_count 3 + channel 5, Cry_Nidoran_M_Ch5 + channel 6, Cry_Nidoran_M_Ch6 + channel 8, Cry_Nidoran_M_Ch8 + +Cry_Nidoran_F: + channel_count 3 + channel 5, Cry_Nidoran_F_Ch5 + channel 6, Cry_Nidoran_F_Ch6 + channel 8, Cry_Nidoran_F_Ch8 + +Cry_Slowpoke: + channel_count 3 + channel 5, Cry_Slowpoke_Ch5 + channel 6, Cry_Slowpoke_Ch6 + channel 8, Cry_Slowpoke_Ch8 + +Cry_Kangaskhan: + channel_count 3 + channel 5, Cry_Kangaskhan_Ch5 + channel 6, Cry_Kangaskhan_Ch6 + channel 8, Cry_Kangaskhan_Ch8 + +Cry_Charmander: + channel_count 3 + channel 5, Cry_Charmander_Ch5 + channel 6, Cry_Charmander_Ch6 + channel 8, Cry_Charmander_Ch8 + +Cry_Grimer: + channel_count 3 + channel 5, Cry_Grimer_Ch5 + channel 6, Cry_Grimer_Ch6 + channel 8, Cry_Grimer_Ch8 + +Cry_Voltorb: + channel_count 3 + channel 5, Cry_Voltorb_Ch5 + channel 6, Cry_Voltorb_Ch6 + channel 8, Cry_Voltorb_Ch8 + +Cry_Muk: + channel_count 3 + channel 5, Cry_Muk_Ch5 + channel 6, Cry_Muk_Ch6 + channel 8, Cry_Muk_Ch8 + +Cry_Oddish: + channel_count 3 + channel 5, Cry_Oddish_Ch5 + channel 6, Cry_Oddish_Ch6 + channel 8, Cry_Oddish_Ch8 + +Cry_Raichu: + channel_count 3 + channel 5, Cry_Raichu_Ch5 + channel 6, Cry_Raichu_Ch6 + channel 8, Cry_Raichu_Ch8 + +Cry_Nidoqueen: + channel_count 3 + channel 5, Cry_Nidoqueen_Ch5 + channel 6, Cry_Nidoqueen_Ch6 + channel 8, Cry_Nidoqueen_Ch8 + +Cry_Diglett: + channel_count 3 + channel 5, Cry_Diglett_Ch5 + channel 6, Cry_Diglett_Ch6 + channel 8, Cry_Diglett_Ch8 + +Cry_Seel: + channel_count 3 + channel 5, Cry_Seel_Ch5 + channel 6, Cry_Seel_Ch6 + channel 8, Cry_Seel_Ch8 + +Cry_Drowzee: + channel_count 3 + channel 5, Cry_Drowzee_Ch5 + channel 6, Cry_Drowzee_Ch6 + channel 8, Cry_Drowzee_Ch8 + +Cry_Pidgey: + channel_count 3 + channel 5, Cry_Pidgey_Ch5 + channel 6, Cry_Pidgey_Ch6 + channel 8, Cry_Pidgey_Ch8 + +Cry_Bulbasaur: + channel_count 3 + channel 5, Cry_Bulbasaur_Ch5 + channel 6, Cry_Bulbasaur_Ch6 + channel 8, Cry_Bulbasaur_Ch8 + +Cry_Spearow: + channel_count 3 + channel 5, Cry_Spearow_Ch5 + channel 6, Cry_Spearow_Ch6 + channel 8, Cry_Spearow_Ch8 + +Cry_Rhydon: + channel_count 3 + channel 5, Cry_Rhydon_Ch5 + channel 6, Cry_Rhydon_Ch6 + channel 8, Cry_Rhydon_Ch8 + +Cry_Golem: + channel_count 3 + channel 5, Cry_Golem_Ch5 + channel 6, Cry_Golem_Ch6 + channel 8, Cry_Golem_Ch8 + +Cry_Blastoise: + channel_count 3 + channel 5, Cry_Blastoise_Ch5 + channel 6, Cry_Blastoise_Ch6 + channel 8, Cry_Blastoise_Ch8 + +Cry_Pidgeotto: + channel_count 3 + channel 5, Cry_Pidgeotto_Ch5 + channel 6, Cry_Pidgeotto_Ch6 + channel 8, Cry_Pidgeotto_Ch8 + +Cry_Weedle: + channel_count 3 + channel 5, Cry_Weedle_Ch5 + channel 6, Cry_Weedle_Ch6 + channel 8, Cry_Weedle_Ch8 + +Cry_Caterpie: + channel_count 3 + channel 5, Cry_Caterpie_Ch5 + channel 6, Cry_Caterpie_Ch6 + channel 8, Cry_Caterpie_Ch8 + +Cry_Ekans: + channel_count 3 + channel 5, Cry_Ekans_Ch5 + channel 6, Cry_Ekans_Ch6 + channel 8, Cry_Ekans_Ch8 + +Cry_Fearow: + channel_count 3 + channel 5, Cry_Fearow_Ch5 + channel 6, Cry_Fearow_Ch6 + channel 8, Cry_Fearow_Ch8 + +Cry_Clefairy: + channel_count 3 + channel 5, Cry_Clefairy_Ch5 + channel 6, Cry_Clefairy_Ch6 + channel 8, Cry_Clefairy_Ch8 + +Cry_Venonat: + channel_count 3 + channel 5, Cry_Venonat_Ch5 + channel 6, Cry_Venonat_Ch6 + channel 8, Cry_Venonat_Ch8 + +Cry_Lapras: + channel_count 3 + channel 5, Cry_Lapras_Ch5 + channel 6, Cry_Lapras_Ch6 + channel 8, Cry_Lapras_Ch8 + +Cry_Metapod: + channel_count 3 + channel 5, Cry_Metapod_Ch5 + channel 6, Cry_Metapod_Ch6 + channel 8, Cry_Metapod_Ch8 + +Cry_Squirtle: + channel_count 3 + channel 5, Cry_Squirtle_Ch5 + channel 6, Cry_Squirtle_Ch6 + channel 8, Cry_Squirtle_Ch8 + +Cry_Paras: + channel_count 3 + channel 5, Cry_Paras_Ch5 + channel 6, Cry_Paras_Ch6 + channel 8, Cry_Paras_Ch8 + +Cry_Growlithe: + channel_count 3 + channel 5, Cry_Growlithe_Ch5 + channel 6, Cry_Growlithe_Ch6 + channel 8, Cry_Growlithe_Ch8 + +Cry_Krabby: + channel_count 3 + channel 5, Cry_Krabby_Ch5 + channel 6, Cry_Krabby_Ch6 + channel 8, Cry_Krabby_Ch8 + +Cry_Psyduck: + channel_count 3 + channel 5, Cry_Psyduck_Ch5 + channel 6, Cry_Psyduck_Ch6 + channel 8, Cry_Psyduck_Ch8 + +Cry_Rattata: + channel_count 3 + channel 5, Cry_Rattata_Ch5 + channel 6, Cry_Rattata_Ch6 + channel 8, Cry_Rattata_Ch8 + +Cry_Vileplume: + channel_count 3 + channel 5, Cry_Vileplume_Ch5 + channel 6, Cry_Vileplume_Ch6 + channel 8, Cry_Vileplume_Ch8 + +Cry_Vulpix: + channel_count 3 + channel 5, Cry_Vulpix_Ch5 + channel 6, Cry_Vulpix_Ch6 + channel 8, Cry_Vulpix_Ch8 + +Cry_Weepinbell: + channel_count 3 + channel 5, Cry_Weepinbell_Ch5 + channel 6, Cry_Weepinbell_Ch6 + channel 8, Cry_Weepinbell_Ch8 + +Cry_Unused_Ch5: ; unreferenced + duty_cycle_pattern 3, 3, 0, 0 + square_note 15, 14, 0, 1920 + square_note 15, 15, 0, 1924 + square_note 15, 12, 3, 1504 + square_note 15, 12, 4, 1536 + square_note 10, 6, -4, 1920 + square_note 8, 7, 1, 1924 + sound_ret + +Cry_Unused_Ch6: ; unreferenced + duty_cycle_pattern 0, 0, 1, 1 + square_note 15, 10, 0, 1857 + square_note 15, 11, 0, 1859 + square_note 15, 9, 3, 1457 + square_note 15, 9, 4, 1473 + square_note 10, 4, -4, 1857 + square_note 8, 3, 1, 1862 + sound_ret + +Cry_Unused_Ch8: ; unreferenced + noise_note 2, 15, 2, 76 + noise_note 6, 14, 0, 58 + noise_note 15, 13, 0, 58 + noise_note 8, 13, 0, 44 + noise_note 6, 14, 6, 76 + noise_note 12, 7, -5, 76 + noise_note 15, 13, 3, 76 + sound_ret + +Cry_Raichu_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 15, 15, 7, 1952 + square_note 6, 14, 6, 1955 + square_note 10, 15, 4, 1952 + duty_cycle_pattern 2, 2, 1, 1 + square_note 10, 15, 6, 2008 + square_note 4, 14, 3, 2007 + square_note 15, 15, 2, 2008 + sound_ret + +Cry_Raichu_Ch6: + duty_cycle_pattern 0, 0, 1, 1 + square_note 2, 0, 8, 0 + square_note 15, 10, 7, 1697 + square_note 6, 8, 6, 1698 + square_note 10, 7, 4, 1697 + duty_cycle_pattern 1, 1, 3, 3 + square_note 10, 7, 6, 1750 + square_note 4, 8, 3, 1753 + square_note 15, 10, 2, 1751 + sound_ret + +Cry_Raichu_Ch8: + noise_note 2, 15, 2, 60 + noise_note 8, 14, 4, 62 + noise_note 15, 13, 7, 60 + noise_note 6, 12, 5, 59 + noise_note 6, 14, 4, 61 + noise_note 8, 11, 6, 60 + noise_note 6, 13, 4, 61 + noise_note 8, 12, 1, 59 + sound_ret + +Cry_Vileplume_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 15, 15, 7, 1984 + square_note 6, 14, 4, 1985 + square_note 10, 15, 6, 1984 + square_note 4, 13, 3, 1986 + square_note 8, 12, 1, 1984 + sound_ret + +Cry_Vileplume_Ch6: + duty_cycle_pattern 1, 1, 3, 3 + square_note 15, 9, 7, 1921 + square_note 6, 8, 4, 1920 + square_note 10, 9, 6, 1921 + square_note 15, 8, 3, 1921 + sound_ret + +Cry_Vileplume_Ch8: + noise_note 3, 15, 2, 60 + noise_note 13, 14, 6, 44 + noise_note 15, 13, 7, 60 + noise_note 8, 12, 1, 44 + sound_ret + +Cry_Vulpix_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 15, 15, 7, 1664 + square_note 10, 14, 6, 1668 + square_note 15, 13, 7, 1680 + square_note 8, 13, 5, 1680 + square_note 6, 12, 4, 1672 + square_note 5, 13, 3, 1648 + square_note 4, 13, 3, 1632 + square_note 8, 12, 1, 1600 + sound_ret + +Cry_Vulpix_Ch6: + duty_cycle_pattern 0, 0, 1, 1 + square_note 15, 11, 7, 1601 + square_note 10, 9, 6, 1602 + square_note 15, 10, 7, 1617 + square_note 8, 10, 5, 1617 + square_note 6, 9, 4, 1607 + square_note 5, 10, 3, 1585 + square_note 4, 9, 3, 1570 + square_note 8, 7, 1, 1537 + sound_ret + +Cry_Vulpix_Ch8: + noise_note 15, 14, 4, 60 + noise_note 10, 12, 7, 76 + noise_note 10, 12, 7, 60 + noise_note 12, 11, 7, 76 + noise_note 15, 10, 2, 92 + sound_ret + +Cry_Rhydon_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 6, 15, 7, 1952 + square_note 8, 14, 6, 1956 + square_note 4, 13, 6, 1952 + square_note 15, 13, 3, 1824 + square_note 8, 12, 3, 1827 + square_note 2, 12, 2, 1832 + square_note 8, 11, 1, 1840 + sound_ret + +Cry_Rhydon_Ch6: + duty_cycle_pattern 0, 0, 2, 2 + square_note 4, 0, 8, 0 + square_note 6, 10, 7, 1857 + square_note 8, 8, 6, 1859 + square_note 4, 7, 6, 1857 + square_note 13, 8, 3, 1730 + square_note 7, 7, 3, 1729 + square_note 3, 8, 2, 1740 + square_note 8, 7, 1, 1752 + sound_ret + +Cry_Rhydon_Ch8: + noise_note 2, 15, 2, 76 + noise_note 6, 14, 6, 58 + noise_note 4, 13, 7, 58 + noise_note 6, 13, 6, 44 + noise_note 8, 14, 5, 60 + noise_note 12, 13, 2, 61 + noise_note 8, 13, 1, 44 + sound_ret + +Cry_Weepinbell_Ch5: + duty_cycle_pattern 2, 2, 1, 1 + square_note 6, 15, 4, 1856 + square_note 15, 14, 3, 1840 + square_note 4, 15, 4, 1856 + square_note 5, 11, 3, 1864 + square_note 8, 13, 1, 1872 + sound_ret + +Cry_Weepinbell_Ch6: + duty_cycle_pattern 1, 3, 1, 3 + square_note 6, 12, 3, 1810 + square_note 15, 11, 3, 1796 + square_note 3, 12, 3, 1810 + square_note 4, 12, 3, 1825 + square_note 8, 11, 1, 1842 + sound_ret + +Cry_Weepinbell_Ch8: + noise_note 8, 13, 6, 44 + noise_note 12, 12, 6, 60 + noise_note 10, 11, 6, 44 + noise_note 8, 9, 1, 28 + sound_ret + +Cry_Kangaskhan_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 4, 15, 7, 1544 + square_note 6, 14, 6, 1536 + square_note 6, 13, 7, 1520 + square_note 6, 12, 4, 1504 + square_note 5, 13, 3, 1472 + square_note 4, 13, 3, 1440 + square_note 8, 14, 1, 1408 + sound_ret + +Cry_Kangaskhan_Ch6: + duty_cycle_pattern 0, 0, 2, 2 + square_note 4, 12, 7, 1284 + square_note 6, 10, 6, 1282 + square_note 6, 9, 7, 1265 + square_note 4, 11, 4, 1249 + square_note 5, 10, 3, 1218 + square_note 4, 11, 3, 1187 + square_note 8, 12, 1, 1154 + sound_ret + +Cry_Kangaskhan_Ch8: + noise_note 12, 14, 4, 76 + noise_note 10, 12, 7, 92 + noise_note 12, 11, 6, 76 + noise_note 15, 10, 2, 92 + sound_ret + +Cry_Bulbasaur_Ch5: + duty_cycle_pattern 3, 3, 0, 1 + square_note 4, 15, 7, 1984 + square_note 12, 14, 6, 1986 + square_note 6, 11, 5, 1664 + square_note 4, 12, 4, 1648 + square_note 4, 11, 5, 1632 + square_note 8, 12, 1, 1600 + sound_ret + +Cry_Bulbasaur_Ch6: + duty_cycle_pattern 3, 0, 3, 0 + square_note 3, 12, 7, 1921 + square_note 12, 11, 6, 1920 + square_note 6, 10, 5, 1601 + square_note 4, 12, 4, 1586 + square_note 6, 11, 5, 1569 + square_note 8, 10, 1, 1538 + sound_ret + +Cry_Bulbasaur_Ch8: + noise_note 3, 14, 4, 60 + noise_note 12, 13, 6, 44 + noise_note 4, 14, 4, 60 + noise_note 8, 11, 7, 92 + noise_note 15, 12, 2, 93 + sound_ret + +Cry_Spearow_Ch5: + duty_cycle_pattern 3, 0, 2, 1 + square_note 8, 15, 7, 1664 + square_note 2, 15, 7, 1632 + square_note 1, 14, 7, 1600 + square_note 1, 14, 7, 1568 + square_note 15, 13, 1, 1536 + square_note 4, 12, 7, 1856 + square_note 4, 10, 7, 1840 + square_note 15, 9, 1, 1824 + sound_ret + +Cry_Spearow_Ch6: + duty_cycle_pattern 1, 3, 2, 1 + square_note 10, 14, 7, 1666 + square_note 2, 14, 7, 1634 + square_note 1, 13, 7, 1602 + square_note 1, 13, 7, 1570 + square_note 15, 12, 1, 1538 + square_note 4, 11, 7, 1858 + square_note 2, 9, 7, 1842 + square_note 15, 8, 1, 1826 + sound_ret + +Cry_Spearow_Ch8: + noise_note 4, 7, 4, 33 + noise_note 4, 7, 4, 16 + noise_note 4, 7, 1, 32 + sound_ret + +Cry_Nidoran_M_Ch5: + duty_cycle_pattern 3, 3, 1, 1 + square_note 4, 15, 3, 1816 + square_note 15, 14, 5, 1944 + square_note 8, 9, 1, 1880 + sound_ret + +Cry_Nidoran_M_Ch6: + duty_cycle_pattern 2, 2, 0, 0 + square_note 5, 11, 3, 1800 + square_note 15, 12, 5, 1928 + square_note 8, 7, 1, 1864 + sound_ret + +Cry_Nidoran_M_Ch8: + noise_note 3, 10, 1, 28 + noise_note 14, 9, 4, 44 + noise_note 8, 8, 1, 28 + sound_ret + +Cry_Pidgey_Ch5: + duty_cycle_pattern 2, 2, 1, 1 + square_note 4, 14, 1, 1792 + square_note 4, 15, 2, 1920 + square_note 2, 9, 2, 1856 + square_note 8, 14, 1, 1536 + sound_ret + +Cry_Pidgey_Ch6: + duty_cycle_pattern 0, 0, 2, 2 + square_note 4, 11, 1, 1761 + square_note 3, 12, 2, 1761 + square_note 3, 6, 2, 1665 + square_note 8, 11, 1, 1505 + sound_ret + +Cry_Pidgey_Ch8: + noise_note 2, 6, 1, 50 + noise_note 2, 6, 1, 33 + noise_note 8, 6, 1, 17 + sound_ret + +Cry_Voltorb_Ch5: + duty_cycle_pattern 3, 3, 2, 2 + square_note 6, 8, 3, 583 + square_note 15, 6, 2, 550 + square_note 4, 5, 2, 581 + square_note 9, 6, 3, 518 + square_note 15, 8, 2, 549 + square_note 15, 4, 2, 519 +Cry_Voltorb_Ch6: + sound_ret + +Cry_Voltorb_Ch8: + noise_note 8, 13, 4, 140 + noise_note 4, 14, 2, 156 + noise_note 15, 12, 6, 140 + noise_note 8, 14, 4, 172 + noise_note 15, 13, 7, 156 + noise_note 15, 15, 2, 172 + sound_ret + +Cry_Muk_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 4, 15, 3, 1760 + square_note 15, 14, 4, 1600 + square_note 8, 12, 1, 1568 + sound_ret + +Cry_Muk_Ch6: + duty_cycle_pattern 0, 0, 2, 2 + square_note 3, 12, 3, 1667 + square_note 14, 11, 4, 1538 + square_note 8, 10, 1, 1537 + sound_ret + +Cry_Muk_Ch8: + noise_note 4, 13, 3, 92 + noise_note 15, 14, 6, 76 + noise_note 8, 11, 1, 92 + sound_ret + +Cry_Grimer_Ch5: + duty_cycle_pattern 0, 0, 2, 2 + square_note 6, 14, 2, 1280 + square_note 6, 14, 3, 1408 + square_note 6, 13, 3, 1392 + square_note 8, 10, 1, 1376 + sound_ret + +Cry_Grimer_Ch6: + duty_cycle_pattern 3, 3, 1, 1 + square_note 6, 14, 2, 1154 + square_note 6, 13, 3, 1281 + square_note 6, 11, 2, 1250 + square_note 8, 8, 1, 1217 +Cry_Grimer_Ch8: + sound_ret + +Cry_Diglett_Ch5: + duty_cycle_pattern 3, 0, 3, 0 + square_note 4, 15, 1, 1792 + square_note 4, 14, 1, 1920 + square_note 4, 13, 1, 1856 + square_note 4, 14, 1, 1856 + square_note 4, 15, 1, 1920 + square_note 4, 13, 1, 1792 + square_note 4, 15, 1, 1793 + square_note 4, 13, 1, 1922 + square_note 4, 12, 1, 1858 + square_note 8, 11, 1, 1857 + sound_ret + +Cry_Diglett_Ch6: + duty_cycle_pattern 1, 0, 1, 0 + square_note 12, 0, 8, 0 + square_note 4, 15, 1, 1793 + square_note 4, 14, 1, 1922 + square_note 4, 13, 1, 1857 + square_note 4, 14, 1, 1857 + square_note 4, 15, 1, 1922 + square_note 8, 13, 1, 1793 + sound_ret + +Cry_Diglett_Ch8: + noise_note 15, 0, 8, 0 + noise_note 4, 0, 8, 0 + noise_note 4, 13, 1, 76 + noise_note 4, 11, 1, 44 + noise_note 4, 13, 1, 60 + noise_note 4, 11, 1, 60 + noise_note 4, 12, 1, 44 + noise_note 8, 10, 1, 76 + sound_ret + +Cry_Seel_Ch5: + duty_cycle_pattern 3, 0, 3, 0 + square_note 8, 15, 5, 1536 + square_note 2, 13, 2, 1592 + square_note 2, 12, 2, 1584 + square_note 2, 12, 2, 1576 + square_note 2, 11, 2, 1568 + square_note 2, 11, 2, 1552 + square_note 2, 10, 2, 1560 + square_note 2, 11, 2, 1552 + square_note 8, 12, 1, 1568 + sound_ret + +Cry_Seel_Ch6: + duty_cycle_pattern 1, 0, 1, 0 + square_note 12, 12, 3, 1472 + square_note 3, 11, 1, 1529 + square_note 2, 10, 1, 1521 + square_note 2, 10, 1, 1513 + square_note 2, 9, 1, 1505 + square_note 2, 9, 1, 1497 + square_note 2, 8, 1, 1489 + square_note 2, 9, 1, 1497 + square_note 8, 9, 1, 1505 +Cry_Seel_Ch8: + sound_ret + +Cry_Slowpoke_Ch5: + duty_cycle_pattern 0, 0, 0, 0 + square_note 8, 15, 5, 1152 + square_note 2, 14, 1, 1504 + square_note 8, 13, 1, 1500 + sound_ret + +Cry_Slowpoke_Ch6: + duty_cycle_pattern 2, 2, 1, 1 + square_note 7, 9, 5, 1089 + square_note 2, 8, 1, 1313 + square_note 8, 6, 1, 1306 +Cry_Slowpoke_Ch8: + sound_ret + +Cry_Drowzee_Ch5: + duty_cycle_pattern 2, 0, 2, 0 + square_note 5, 15, 2, 1616 + square_note 9, 13, 1, 1632 + square_note 5, 14, 2, 1554 + square_note 9, 12, 1, 1570 + square_note 5, 15, 2, 1552 + square_note 6, 13, 1, 1568 + sound_loop 2, Cry_Drowzee_Ch5 + sound_ret + +Cry_Drowzee_Ch6: + duty_cycle_pattern 1, 0, 0, 0 + square_note 4, 0, 8, 0 + square_note 5, 15, 2, 1617 + square_note 9, 13, 1, 1633 + square_note 5, 14, 2, 1556 + square_note 8, 12, 1, 1572 + square_note 5, 15, 2, 1553 + square_note 12, 13, 1, 1569 + square_note 5, 14, 2, 1556 + square_note 8, 12, 1, 1572 + square_note 5, 15, 2, 1553 + square_note 4, 13, 1, 1569 + sound_ret + +Cry_Drowzee_Ch8: + noise_note 6, 13, 2, 28 + noise_note 9, 11, 1, 44 + noise_note 8, 12, 2, 44 + noise_note 9, 11, 1, 60 + noise_note 6, 12, 2, 44 + noise_note 9, 10, 2, 60 + noise_note 7, 12, 2, 44 + noise_note 5, 10, 1, 60 + noise_note 9, 12, 2, 44 + noise_note 4, 10, 1, 60 + sound_ret + +Cry_Nidoran_F_Ch5: + duty_cycle_pattern 2, 2, 0, 0 + square_note 4, 15, 3, 1536 + square_note 8, 13, 5, 1888 + square_note 3, 14, 2, 1824 + square_note 8, 13, 1, 1808 + sound_ret + +Cry_Nidoran_F_Ch6: + duty_cycle_pattern 1, 1, 2, 2 + square_note 5, 11, 3, 1777 + square_note 7, 12, 5, 1874 + square_note 3, 10, 2, 1809 + square_note 8, 11, 1, 1537 + sound_ret + +Cry_Nidoran_F_Ch8: + noise_note 3, 10, 2, 60 + noise_note 12, 9, 4, 44 + noise_note 3, 8, 2, 28 + noise_note 8, 7, 1, 44 + sound_ret + +Cry_Nidoqueen_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 8, 15, 7, 1760 + square_note 6, 14, 6, 1765 + square_note 3, 15, 4, 1760 + square_note 3, 15, 6, 1744 + square_note 3, 14, 3, 1728 + square_note 4, 15, 2, 1712 + square_note 15, 10, 2, 1736 + sound_ret + +Cry_Nidoqueen_Ch6: + duty_cycle_pattern 0, 0, 1, 1 + square_note 3, 0, 8, 0 + square_note 8, 10, 7, 1697 + square_note 6, 8, 6, 1699 + square_note 3, 7, 4, 1697 + square_note 3, 7, 6, 1681 + square_note 3, 8, 3, 1666 + square_note 4, 10, 2, 1649 + square_note 15, 7, 2, 1673 + sound_ret + +Cry_Nidoqueen_Ch8: + noise_note 2, 15, 2, 60 + noise_note 8, 14, 4, 62 + noise_note 8, 13, 7, 60 + noise_note 5, 12, 5, 59 + noise_note 3, 13, 4, 44 + noise_note 2, 11, 6, 60 + noise_note 3, 10, 4, 44 + noise_note 8, 9, 1, 60 + sound_ret + +Cry_Oddish_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 15, 15, 6, 1381 + square_note 10, 14, 4, 1404 + square_note 3, 12, 2, 1372 + square_note 15, 11, 2, 1340 + sound_ret + +Cry_Oddish_Ch6: + duty_cycle_pattern 1, 1, 2, 2 + square_note 14, 13, 6, 1283 + square_note 9, 11, 4, 1307 + square_note 4, 9, 2, 1274 + square_note 15, 10, 2, 1243 + sound_ret + +Cry_Oddish_Ch8: + noise_note 12, 14, 6, 76 + noise_note 11, 13, 7, 92 + noise_note 15, 12, 2, 76 + sound_ret + +Cry_Charmander_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 4, 15, 7, 1696 + square_note 8, 14, 6, 1700 + square_note 4, 13, 6, 1696 + square_note 12, 13, 3, 1568 + square_note 8, 12, 3, 1572 + square_note 4, 12, 2, 1568 + square_note 8, 11, 1, 1552 + sound_ret + +Cry_Charmander_Ch6: + duty_cycle_pattern 1, 1, 2, 2 + square_note 4, 14, 7, 1537 + square_note 8, 13, 6, 1539 + square_note 4, 12, 6, 1537 + square_note 12, 12, 3, 1409 + square_note 8, 11, 3, 1411 + square_note 4, 11, 2, 1410 + square_note 8, 10, 1, 1393 + sound_ret + +Cry_Charmander_Ch8: + noise_note 7, 13, 6, 92 + noise_note 8, 14, 6, 76 + noise_note 4, 13, 4, 92 + noise_note 4, 13, 4, 76 + noise_note 7, 12, 3, 76 + noise_note 8, 10, 1, 92 + sound_ret + +Cry_Clefairy_Ch5: + duty_cycle_pattern 0, 1, 2, 3 + square_note 7, 13, 2, 1856 + square_note 15, 14, 5, 1888 + square_note 24, 12, 1, 1840 + sound_ret + +Cry_Clefairy_Ch6: + duty_cycle_pattern 2, 0, 0, 1 + square_note 2, 12, 2, 1793 + square_note 4, 12, 2, 1800 + square_note 15, 13, 7, 1857 + square_note 24, 10, 2, 1793 +Cry_Clefairy_Ch8: + sound_ret + +Cry_Caterpie_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 15, 13, 7, 1920 + square_note 4, 14, 6, 1952 + square_note 15, 13, 2, 1856 + sound_ret + +Cry_Caterpie_Ch6: + duty_cycle_pattern 1, 1, 2, 2 + square_note 15, 12, 7, 1875 + square_note 5, 11, 6, 1906 + square_note 15, 12, 2, 1809 + sound_ret + +Cry_Caterpie_Ch8: + noise_note 13, 15, 6, 76 + noise_note 4, 14, 6, 60 + noise_note 15, 15, 2, 76 + sound_ret + +Cry_Lapras_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 6, 15, 7, 1728 + square_note 15, 14, 7, 1792 + square_note 4, 15, 4, 1776 + square_note 4, 14, 4, 1760 + square_note 8, 13, 1, 1744 + sound_ret + +Cry_Lapras_Ch6: + duty_cycle_pattern 0, 0, 2, 2 + square_note 7, 14, 6, 1665 + square_note 14, 13, 5, 1729 + square_note 4, 12, 4, 1713 + square_note 4, 13, 4, 1697 + square_note 8, 12, 1, 1681 + sound_ret + +Cry_Lapras_Ch8: + noise_note 10, 10, 6, 60 + noise_note 14, 9, 4, 44 + noise_note 5, 10, 3, 60 + noise_note 8, 9, 1, 44 + sound_ret + +Cry_Golem_Ch5: + duty_cycle_pattern 2, 2, 1, 1 + square_note 12, 15, 2, 1088 + square_note 15, 14, 3, 1184 + square_note 4, 13, 2, 1168 + square_note 8, 13, 1, 1152 + sound_ret + +Cry_Golem_Ch6: + duty_cycle_pattern 3, 2, 3, 2 + square_note 11, 13, 2, 1080 + square_note 14, 12, 6, 1176 + square_note 3, 11, 2, 1160 + square_note 8, 11, 1, 1144 + sound_ret + +Cry_Golem_Ch8: + noise_note 10, 14, 6, 108 + noise_note 15, 13, 2, 92 + noise_note 3, 12, 2, 108 + noise_note 8, 13, 1, 92 + sound_ret + +Cry_Blastoise_Ch5: + duty_cycle_pattern 0, 3, 0, 3 + square_note 15, 15, 6, 1472 + square_note 8, 14, 3, 1468 + square_note 6, 13, 2, 1488 + square_note 6, 11, 2, 1504 + square_note 6, 12, 2, 1520 + square_note 8, 11, 1, 1536 + sound_ret + +Cry_Blastoise_Ch6: + duty_cycle_pattern 2, 1, 2, 1 + square_note 14, 12, 6, 1201 + square_note 7, 12, 3, 1197 + square_note 5, 11, 2, 1217 + square_note 8, 9, 2, 1233 + square_note 6, 10, 2, 1249 + square_note 8, 9, 1, 1265 + sound_ret + +Cry_Blastoise_Ch8: + noise_note 10, 14, 6, 92 + noise_note 10, 13, 6, 108 + noise_note 4, 12, 2, 76 + noise_note 6, 13, 3, 92 + noise_note 8, 11, 3, 76 + noise_note 8, 10, 1, 92 + sound_ret + +Cry_Pidgeotto_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 8, 14, 4, 1936 + square_note 15, 15, 5, 1984 + square_note 8, 13, 1, 2008 + sound_ret + +Cry_Pidgeotto_Ch6: + duty_cycle_pattern 2, 2, 1, 1 + square_note 10, 12, 4, 1905 + square_note 15, 11, 6, 1954 + square_note 8, 10, 1, 1975 + sound_ret + +Cry_Pidgeotto_Ch8: + noise_note 8, 14, 4, 76 + noise_note 14, 12, 4, 60 + noise_note 8, 13, 1, 44 + sound_ret + +Cry_Paras_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 6, 15, 2, 1536 + square_note 6, 14, 2, 1600 + square_note 6, 13, 2, 1664 + square_note 6, 14, 2, 1728 + square_note 6, 13, 2, 1792 + square_note 6, 12, 2, 1856 + square_note 6, 11, 2, 1920 + square_note 8, 10, 1, 1984 + sound_ret + +Cry_Paras_Ch6: + duty_cycle_pattern 0, 1, 0, 1 + square_note 3, 0, 8, 1 + square_note 6, 12, 2, 1473 + square_note 6, 11, 2, 1538 + square_note 6, 10, 2, 1601 + square_note 6, 11, 2, 1666 + square_note 6, 10, 2, 1730 + square_note 6, 9, 2, 1793 + square_note 6, 10, 2, 1858 + square_note 8, 8, 1, 1921 + sound_ret + +Cry_Paras_Ch8: + noise_note 6, 0, 8, 1 + noise_note 5, 14, 2, 92 + noise_note 5, 12, 2, 76 + noise_note 5, 13, 2, 60 + noise_note 5, 11, 2, 44 + noise_note 5, 12, 2, 28 + noise_note 5, 10, 2, 27 + noise_note 5, 9, 2, 26 + noise_note 8, 8, 1, 24 + sound_ret + +Cry_Weedle_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 4, 15, 3, 1920 + square_note 15, 14, 7, 1792 + square_note 8, 13, 3, 1808 + square_note 4, 12, 2, 1792 + square_note 4, 13, 2, 1776 + square_note 8, 12, 1, 1760 + sound_ret + +Cry_Weedle_Ch6: + duty_cycle_pattern 1, 1, 2, 2 + square_note 6, 12, 3, 1793 + square_note 14, 11, 7, 1665 + square_note 7, 11, 3, 1682 + square_note 3, 10, 2, 1665 + square_note 4, 11, 2, 1650 + square_note 8, 10, 1, 1633 + sound_ret + +Cry_Weedle_Ch8: + noise_note 6, 14, 3, 92 + noise_note 14, 13, 6, 76 + noise_note 6, 12, 6, 60 + noise_note 3, 11, 3, 76 + noise_note 3, 10, 2, 92 + noise_note 8, 11, 1, 108 + sound_ret + +Cry_Ekans_Ch5: + duty_cycle_pattern 0, 0, 3, 3 + square_note 15, 15, 7, 1280 + square_note 15, 14, 7, 1288 + square_note 8, 11, 4, 1152 + square_note 15, 10, 2, 1120 + sound_ret + +Cry_Ekans_Ch6: + duty_cycle_pattern 1, 0, 1, 0 + square_note 14, 13, 7, 1153 + square_note 14, 12, 7, 1161 + square_note 10, 11, 4, 1025 + square_note 15, 12, 2, 993 + sound_ret + +Cry_Ekans_Ch8: + noise_note 14, 15, 7, 124 + noise_note 12, 15, 6, 108 + noise_note 9, 14, 4, 124 + noise_note 15, 14, 2, 108 + sound_ret + +Cry_Metapod_Ch5: + duty_cycle_pattern 3, 3, 1, 1 + square_note 7, 13, 6, 2017 + square_note 6, 12, 6, 2018 + square_note 9, 13, 6, 2017 + square_note 7, 12, 6, 2016 + square_note 5, 11, 6, 2018 + square_note 7, 12, 6, 2017 + square_note 6, 11, 6, 2016 + square_note 8, 10, 1, 2015 + sound_ret + +Cry_Metapod_Ch6: + duty_cycle_pattern 1, 0, 1, 0 + square_note 6, 12, 3, 1993 + square_note 6, 11, 3, 1991 + square_note 10, 12, 4, 1987 + square_note 8, 11, 4, 1991 + square_note 6, 12, 3, 1993 + square_note 15, 10, 2, 1989 + sound_ret + +Cry_Metapod_Ch8: + noise_note 13, 1, -1, 124 + noise_note 13, 15, 7, 140 + noise_note 12, 13, 6, 124 + noise_note 8, 12, 4, 108 + noise_note 15, 11, 3, 92 + sound_ret + +Cry_Venonat_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 6, 15, 7, 1856 + square_note 12, 14, 6, 1860 + square_note 6, 13, 5, 1872 + square_note 4, 12, 3, 1888 + square_note 3, 12, 3, 1920 + square_note 8, 13, 1, 1952 + sound_ret + +Cry_Venonat_Ch6: + duty_cycle_pattern 0, 0, 2, 2 + square_note 6, 12, 7, 1793 + square_note 11, 11, 6, 1794 + square_note 6, 10, 5, 1809 + square_note 4, 9, 3, 1825 + square_note 3, 10, 3, 1857 + square_note 8, 9, 1, 1890 + sound_ret + +Cry_Venonat_Ch8: + noise_note 3, 14, 2, 60 + noise_note 8, 13, 6, 76 + noise_note 5, 13, 4, 60 + noise_note 12, 12, 7, 76 + noise_note 2, 14, 2, 60 + noise_note 8, 13, 1, 44 + sound_ret + +Cry_Squirtle_Ch5: + duty_cycle_pattern 3, 3, 1, 0 + square_note 15, 15, 0, 1797 + square_note 10, 14, 0, 1792 + square_note 6, 11, 4, 1808 + square_note 4, 13, 3, 1792 + square_note 6, 11, 2, 1568 + square_note 8, 10, 1, 1572 + sound_ret + +Cry_Squirtle_Ch6: + duty_cycle_pattern 0, 2, 0, 2 + square_note 15, 11, 0, 1731 + square_note 10, 10, 0, 1729 + square_note 6, 8, 4, 1746 + square_note 4, 9, 3, 1729 + square_note 6, 8, 2, 1505 + square_note 8, 6, 1, 1512 + sound_ret + +Cry_Squirtle_Ch8: + noise_note 6, 14, 6, 76 + noise_note 15, 13, 6, 60 + noise_note 10, 12, 5, 74 + noise_note 1, 11, 2, 91 + noise_note 15, 12, 2, 76 + sound_ret + +Cry_Fearow_Ch5: + duty_cycle_pattern 1, 1, 0, 0 + square_note 10, 15, 5, 1664 + square_note 3, 14, 2, 1696 + square_note 3, 15, 2, 1728 + square_note 3, 14, 2, 1760 + square_note 3, 13, 2, 1792 + square_note 3, 12, 2, 1760 + square_note 3, 13, 2, 1728 + square_note 8, 12, 1, 1696 + sound_ret + +Cry_Fearow_Ch6: + duty_cycle_pattern 0, 0, 3, 3 + square_note 9, 13, 5, 1585 + square_note 3, 13, 2, 1618 + square_note 3, 14, 2, 1649 + square_note 3, 11, 2, 1681 + square_note 3, 12, 2, 1714 + square_note 3, 11, 2, 1681 + square_note 3, 12, 2, 1649 + square_note 8, 11, 1, 1617 + sound_ret + +Cry_Fearow_Ch8: + noise_note 6, 14, 3, 76 + noise_note 4, 12, 3, 60 + noise_note 5, 13, 4, 60 + noise_note 4, 12, 4, 44 + noise_note 6, 11, 4, 60 + noise_note 8, 12, 1, 44 + sound_ret + +Cry_Growlithe_Ch5: + duty_cycle_pattern 2, 2, 1, 1 + square_note 3, 15, 4, 1601 + square_note 13, 13, 6, 1825 + square_note 8, 15, 4, 1817 + square_note 8, 12, 1, 1818 + sound_ret + +Cry_Growlithe_Ch6: + duty_cycle_pattern 3, 0, 3, 0 + square_note 4, 15, 4, 1408 + square_note 14, 14, 6, 1760 + square_note 8, 13, 5, 1752 + square_note 8, 13, 1, 1756 + sound_ret + +Cry_Growlithe_Ch8: + noise_note 5, 12, 4, 70 + noise_note 13, 10, 5, 68 + noise_note 8, 12, 4, 69 + noise_note 8, 11, 1, 68 + sound_ret + +Cry_Krabby_Ch5: + duty_cycle_pattern 3, 3, 0, 0 + square_note 13, 15, 1, 1297 + square_note 13, 14, 1, 1301 + square_note 13, 14, 1, 1297 + square_note 8, 13, 1, 1297 + sound_ret + +Cry_Krabby_Ch6: + duty_cycle_pattern 0, 1, 1, 1 + square_note 12, 14, 1, 1292 + square_note 12, 13, 1, 1296 + square_note 14, 12, 1, 1292 + square_note 8, 12, 1, 1290 + sound_ret + +Cry_Krabby_Ch8: + noise_note 14, 15, 2, 101 + noise_note 13, 14, 2, 85 + noise_note 14, 13, 2, 86 + noise_note 8, 13, 1, 102 + sound_ret + +Cry_Psyduck_Ch5: + duty_cycle_pattern 0, 1, 2, 3 + square_note 3, 15, 3, 1380 + square_note 2, 14, 2, 1348 + square_note 5, 13, 1, 1314 + square_note 2, 11, 2, 1156 + square_note 8, 13, 1, 1186 + square_note 3, 15, 3, 1316 + square_note 4, 14, 4, 1252 + square_note 8, 13, 1, 1282 + sound_ret + +Cry_Psyduck_Ch6: + duty_cycle_pattern 3, 0, 3, 0 + square_note 3, 13, 3, 1376 + square_note 2, 12, 2, 1344 + square_note 5, 12, 1, 1312 + square_note 2, 9, 2, 1152 + square_note 8, 12, 1, 1184 + square_note 3, 13, 3, 1312 + square_note 3, 12, 4, 1248 + square_note 8, 12, 1, 1280 +Cry_Psyduck_Ch8: + sound_ret + +Cry_Rattata_Ch5: + duty_cycle_pattern 0, 1, 0, 1 + square_note 2, 3, -5, 897 + square_note 7, 15, 5, 1537 + square_note 1, 12, 2, 1153 + square_note 8, 9, 1, 897 + sound_ret + +Cry_Rattata_Ch6: + duty_cycle_pattern 3, 2, 3, 2 + square_note 2, 3, -6, 1456 + square_note 7, 13, 5, 1885 + square_note 1, 11, 2, 1712 + square_note 8, 6, 1, 1456 + sound_ret + +Cry_Rattata_Ch8: + noise_note 2, 9, 2, 73 + noise_note 7, 11, 5, 41 + noise_note 1, 10, 2, 57 + noise_note 8, 9, 1, 73 + sound_ret diff --git a/audio/cry_pointers.asm b/audio/cry_pointers.asm new file mode 100644 index 0000000..58b948a --- /dev/null +++ b/audio/cry_pointers.asm @@ -0,0 +1,72 @@ +Cries: +; entries correspond to CRY_* constants (see constants/cry_constants.asm) + table_width 3, Cries + dba Cry_Nidoran_M + dba Cry_Nidoran_F + dba Cry_Slowpoke + dba Cry_Kangaskhan + dba Cry_Charmander + dba Cry_Grimer + dba Cry_Voltorb + dba Cry_Muk + dba Cry_Oddish + dba Cry_Raichu + dba Cry_Nidoqueen + dba Cry_Diglett + dba Cry_Seel + dba Cry_Drowzee + dba Cry_Pidgey + dba Cry_Bulbasaur + dba Cry_Spearow + dba Cry_Rhydon + dba Cry_Golem + dba Cry_Blastoise + dba Cry_Pidgeotto + dba Cry_Weedle + dba Cry_Caterpie + dba Cry_Ekans + dba Cry_Fearow + dba Cry_Clefairy + dba Cry_Venonat + dba Cry_Lapras + dba Cry_Metapod + dba Cry_Squirtle + dba Cry_Paras + dba Cry_Growlithe + dba Cry_Krabby + dba Cry_Psyduck + dba Cry_Rattata + dba Cry_Vileplume + dba Cry_Vulpix + dba Cry_Weepinbell + dba Cry_Marill + dba Cry_Spinarak + dba Cry_Togepi + dba Cry_Girafarig + dba Cry_Raikou + dba Cry_Mareep + dba Cry_Togetic + dba Cry_Hoothoot + dba Cry_Sentret + dba Cry_Slowking + dba Cry_Cyndaquil + dba Cry_Chikorita + dba Cry_Totodile + dba Cry_Gligar + dba Cry_Cleffa + dba Cry_Slugma + dba Cry_Ledyba + dba Cry_Entei + dba Cry_Wooper + dba Cry_Mantine + dba Cry_Typhlosion + dba Cry_Natu + dba Cry_Teddiursa + dba Cry_Sunflora + dba Cry_Ampharos + dba Cry_Magcargo + dba Cry_Pichu + dba Cry_Aipom + dba Cry_Dunsparce + dba Cry_Donphan + assert_table_length NUM_CRIES diff --git a/audio/drumkits.asm b/audio/drumkits.asm new file mode 100644 index 0000000..bd74307 --- /dev/null +++ b/audio/drumkits.asm @@ -0,0 +1,260 @@ +Drumkits: + dw Drumkit0 + dw Drumkit1 + dw Drumkit2 + dw Drumkit3 + dw Drumkit4 + dw Drumkit5 + +Drumkit0: + dw Drum00 + dw Snare1 + dw Snare2 + dw Snare3 + dw Snare4 + dw Drum05 + dw Triangle1 + dw Triangle2 + dw HiHat1 + dw Snare5 + dw Snare6 + dw Snare7 + dw HiHat2 +Drumkit1: + dw Drum00 + dw HiHat1 + dw Snare5 + dw Snare6 + dw Snare7 + dw HiHat2 + dw HiHat3 + dw Snare8 + dw Triangle3 + dw Triangle4 + dw Snare9 + dw Snare10 + dw Snare11 +Drumkit2: + dw Drum00 + dw Snare1 + dw Snare9 + dw Snare10 + dw Snare11 + dw Drum05 + dw Triangle1 + dw Triangle2 + dw HiHat1 + dw Snare5 + dw Snare6 + dw Snare7 + dw HiHat2 +Drumkit3: + dw Drum21 + dw Snare12 + dw Snare13 + dw Snare14 + dw Kick1 + dw Triangle5 + dw Drum20 + dw Drum27 + dw Drum28 + dw Drum29 + dw Drum21 + dw Kick2 + dw Crash2 +Drumkit4: + dw Drum21 + dw Drum20 + dw Snare13 + dw Snare14 + dw Kick1 + dw Drum33 + dw Triangle5 + dw Drum35 + dw Drum31 + dw Drum32 + dw Drum36 + dw Kick2 + dw Crash1 +Drumkit5: + dw Drum00 + dw Snare9 + dw Snare10 + dw Snare11 + dw Drum27 + dw Drum28 + dw Drum29 + dw Drum05 + dw Triangle1 + dw Crash1 + dw Snare14 + dw Snare13 + dw Kick2 + +Drum00: + noise_note 32, 1, 1, 0 + sound_ret + +Snare1: + noise_note 32, 12, 1, 51 + sound_ret + +Snare2: + noise_note 32, 11, 1, 51 + sound_ret + +Snare3: + noise_note 32, 10, 1, 51 + sound_ret + +Snare4: + noise_note 32, 8, 1, 51 + sound_ret + +Drum05: + noise_note 39, 8, 4, 55 + noise_note 38, 8, 4, 54 + noise_note 37, 8, 3, 53 + noise_note 36, 8, 3, 52 + noise_note 35, 8, 2, 51 + noise_note 34, 8, 1, 50 + sound_ret + +Triangle1: + noise_note 32, 5, 1, 42 + sound_ret + +Triangle2: + noise_note 33, 4, 1, 43 + noise_note 32, 6, 1, 42 + sound_ret + +HiHat1: + noise_note 32, 8, 1, 16 + sound_ret + +Snare5: + noise_note 32, 8, 2, 35 + sound_ret + +Snare6: + noise_note 32, 8, 2, 37 + sound_ret + +Snare7: + noise_note 32, 8, 2, 38 + sound_ret + +HiHat2: + noise_note 32, 10, 1, 16 + sound_ret + +HiHat3: + noise_note 32, 10, 2, 17 + sound_ret + +Snare8: + noise_note 32, 10, 2, 80 + sound_ret + +Triangle3: + noise_note 32, 10, 1, 24 + noise_note 32, 3, 1, 51 + sound_ret + +Triangle4: + noise_note 34, 9, 1, 40 + noise_note 32, 7, 1, 24 + sound_ret + +Snare9: + noise_note 32, 9, 1, 34 + sound_ret + +Snare10: + noise_note 32, 7, 1, 34 + sound_ret + +Snare11: + noise_note 32, 6, 1, 34 + sound_ret + +Drum20: + noise_note 32, 1, 1, 17 + sound_ret + +Drum21: + sound_ret + +Snare12: + noise_note 32, 9, 1, 51 + sound_ret + +Snare13: + noise_note 32, 5, 1, 50 + sound_ret + +Snare14: + noise_note 32, 8, 1, 49 + sound_ret + +Kick1: + noise_note 32, 8, 8, 107 + noise_note 32, 7, 1, 0 + sound_ret + +Triangle5: + noise_note 48, 9, 1, 24 + sound_ret + +Drum27: + noise_note 39, 9, 2, 16 + sound_ret + +Drum28: + noise_note 51, 9, 1, 0 + noise_note 51, 1, 1, 0 + sound_ret + +Drum29: + noise_note 51, 9, 1, 17 + noise_note 51, 1, 1, 0 + sound_ret + +Crash1: + noise_note 51, 8, 8, 21 + noise_note 32, 6, 5, 18 + sound_ret + +Drum31: + noise_note 51, 5, 1, 33 + noise_note 51, 1, 1, 17 + sound_ret + +Drum32: + noise_note 51, 5, 1, 80 + noise_note 51, 1, 1, 17 + sound_ret + +Drum33: + noise_note 32, 10, 1, 49 + sound_ret + +Crash2: + noise_note 32, 8, 4, 18 + sound_ret + +Drum35: + noise_note 51, 8, 1, 0 + noise_note 51, 1, 1, 0 + sound_ret + +Drum36: + noise_note 51, 8, 1, 33 + noise_note 51, 1, 1, 17 + sound_ret + +Kick2: + noise_note 32, 10, 8, 107 + noise_note 32, 7, 1, 0 + sound_ret diff --git a/audio/engine.asm b/audio/engine.asm new file mode 100644 index 0000000..38e9894 --- /dev/null +++ b/audio/engine.asm @@ -0,0 +1,2852 @@ +; The entire sound engine. Uses section "audio" in WRAM. + +; Interfaces are in bank 0. + +; Notable functions: +; FadeMusic +; PlayStereoSFX + +_InitSound:: +; restart sound operation +; clear all relevant hardware registers & wram + push hl + push de + push bc + push af + call MusicOff + ld hl, rNR50 ; channel control registers + xor a + ld [hli], a ; rNR50 ; volume/vin + ld [hli], a ; rNR51 ; sfx channels + ld a, $80 ; all channels on + ld [hli], a ; rNR52 ; music channels + + ld hl, rNR10 ; sound channel registers + ld e, NUM_MUSIC_CHANS +.clearsound +; sound channel 1 2 3 4 + xor a + ld [hli], a ; rNR10, rNR20, rNR30, rNR40 ; sweep = 0 + + ld [hli], a ; rNR11, rNR21, rNR31, rNR41 ; length/wavepattern = 0 + ld a, $8 + ld [hli], a ; rNR12, rNR22, rNR32, rNR42 ; envelope = 0 + xor a + ld [hli], a ; rNR13, rNR23, rNR33, rNR43 ; frequency lo = 0 + ld a, $80 + ld [hli], a ; rNR14, rNR24, rNR34, rNR44 ; restart sound (freq hi = 0) + dec e + jr nz, .clearsound + + ld hl, wAudio + ld de, wAudioEnd - wAudio +.clearaudio + xor a + ld [hli], a + dec de + ld a, e + or d + jr nz, .clearaudio + + ld a, MAX_VOLUME + ld [wVolume], a + call MusicOn + pop af + pop bc + pop de + pop hl + ret + +MusicFadeRestart: +; restart but keep the music id to fade in to + ld a, [wMusicFadeID + 1] + push af + ld a, [wMusicFadeID] + push af + call _InitSound + pop af + ld [wMusicFadeID], a + pop af + ld [wMusicFadeID + 1], a + ret + +MusicOn: + ld a, 1 + ld [wMusicPlaying], a + ret + +MusicOff: + xor a + ld [wMusicPlaying], a + ret + +_UpdateSound:: +; called once per frame + ; no use updating audio if it's not playing + ld a, [wMusicPlaying] + and a + ret z + ; start at ch1 + xor a + ld [wCurChannel], a ; just + ld [wSoundOutput], a ; off + ld bc, wChannel1 +.loop + ; is the channel active? + ld hl, CHANNEL_FLAGS1 + add hl, bc + bit SOUND_CHANNEL_ON, [hl] + jp z, .nextchannel + ; check time left in the current note + ld hl, CHANNEL_NOTE_DURATION + add hl, bc + ld a, [hl] + cp 2 ; 1 or 0? + jr c, .noteover + dec [hl] + jr .continue_sound_update + +.noteover + ; reset vibrato delay + ld hl, CHANNEL_VIBRATO_DELAY + add hl, bc + ld a, [hl] + ld hl, CHANNEL_VIBRATO_DELAY_COUNT + add hl, bc + ld [hl], a + ; turn vibrato off for now + ld hl, CHANNEL_FLAGS2 + add hl, bc + res SOUND_PITCH_SLIDE, [hl] + ; get next note + call ParseMusic +.continue_sound_update + call ApplyPitchSlide + ; duty cycle + ld hl, CHANNEL_DUTY_CYCLE + add hl, bc + ld a, [hli] + ld [wCurTrackDuty], a + ; volume envelope + ld a, [hli] + ld [wCurTrackVolumeEnvelope], a + ; frequency + ld a, [hli] + ld [wCurTrackFrequency], a + ld a, [hl] + ld [wCurTrackFrequency + 1], a + ; vibrato, noise + call HandleTrackVibrato ; handle vibrato and other things + call HandleNoise + ; turn off music when playing sfx? + ld a, [wSFXPriority] + and a + jr z, .next + ; are we in a sfx channel right now? + ld a, [wCurChannel] + cp NUM_MUSIC_CHANS + jr nc, .next + ; are any sfx channels active? + ; if so, mute + ld hl, wChannel5Flags1 + bit SOUND_CHANNEL_ON, [hl] + jr nz, .restnote + ld hl, wChannel6Flags1 + bit SOUND_CHANNEL_ON, [hl] + jr nz, .restnote + ld hl, wChannel7Flags1 + bit SOUND_CHANNEL_ON, [hl] + jr nz, .restnote + ld hl, wChannel8Flags1 + bit SOUND_CHANNEL_ON, [hl] + jr z, .next +.restnote + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + set NOTE_REST, [hl] ; Rest +.next + ; are we in a sfx channel right now? + ld a, [wCurChannel] + cp NUM_MUSIC_CHANS + jr nc, .sfx_channel + ld hl, CHANNEL_STRUCT_LENGTH * NUM_MUSIC_CHANS + CHANNEL_FLAGS1 + add hl, bc + bit SOUND_CHANNEL_ON, [hl] + jr nz, .sound_channel_on +.sfx_channel + call UpdateChannels + ld hl, CHANNEL_TRACKS + add hl, bc + ld a, [wSoundOutput] + or [hl] + ld [wSoundOutput], a +.sound_channel_on + ; clear note flags + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + xor a + ld [hl], a +.nextchannel + ; next channel + ld hl, CHANNEL_STRUCT_LENGTH + add hl, bc + ld c, l + ld b, h + ld a, [wCurChannel] + inc a + ld [wCurChannel], a + cp NUM_CHANNELS ; are we done? + jp nz, .loop ; do it all again + + call PlayDanger + ; fade music in/out + call FadeMusic + ; write volume to hardware register + ld a, [wVolume] + ldh [rNR50], a + ; write SO on/off to hardware register + ld a, [wSoundOutput] + ldh [rNR51], a + ret + +UpdateChannels: + ld hl, .ChannelFunctions + ld a, [wCurChannel] + maskbits NUM_CHANNELS + add a + ld e, a + ld d, 0 + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.ChannelFunctions: + table_width 2, UpdateChannels.ChannelFunctions +; music channels + dw .Channel1 + dw .Channel2 + dw .Channel3 + dw .Channel4 + assert_table_length NUM_MUSIC_CHANS +; sfx channels +; identical to music channels, except .Channel5 is not disabled by the low-HP danger sound +; (instead, PlayDanger does not play the danger sound if sfx is playing) + dw .Channel5 + dw .Channel6 + dw .Channel7 + dw .Channel8 + assert_table_length NUM_CHANNELS + +.Channel1: + ld a, [wLowHealthAlarm] + bit DANGER_ON_F, a + ret nz +.Channel5: + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + bit NOTE_PITCH_SWEEP, [hl] + jr z, .noPitchSweep + ; + ld a, [wPitchSweep] + ldh [rNR10], a +.noPitchSweep + bit NOTE_REST, [hl] ; rest + jr nz, .ch1_rest + bit NOTE_NOISE_SAMPLING, [hl] + jr nz, .ch1_noise_sampling + bit NOTE_FREQ_OVERRIDE, [hl] + jr nz, .ch1_frequency_override + bit NOTE_VIBRATO_OVERRIDE, [hl] + jr nz, .ch1_vibrato_override + jr .ch1_check_duty_override + +.ch1_frequency_override + ld a, [wCurTrackFrequency] + ldh [rNR13], a + ld a, [wCurTrackFrequency + 1] + ldh [rNR14], a +.ch1_check_duty_override + bit NOTE_DUTY_OVERRIDE, [hl] + ret z + ld a, [wCurTrackDuty] + ld d, a + ldh a, [rNR11] + and $3f ; sound length + or d + ldh [rNR11], a + ret + +.ch1_vibrato_override + ld a, [wCurTrackDuty] + ld d, a + ldh a, [rNR11] + and $3f ; sound length + or d + ldh [rNR11], a + ld a, [wCurTrackFrequency] + ldh [rNR13], a + ret + +.ch1_rest + ldh a, [rNR52] + and %10001110 ; ch1 off + ldh [rNR52], a + ld hl, rNR10 + call ClearChannel + ret + +.ch1_noise_sampling + ld hl, wCurTrackDuty + ld a, $3f ; sound length + or [hl] + ldh [rNR11], a + ld a, [wCurTrackVolumeEnvelope] + ldh [rNR12], a + ld a, [wCurTrackFrequency] + ldh [rNR13], a + ld a, [wCurTrackFrequency + 1] + or $80 + ldh [rNR14], a + ret + +.Channel2: +.Channel6: + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + bit NOTE_REST, [hl] ; rest + jr nz, .ch2_rest + bit NOTE_NOISE_SAMPLING, [hl] + jr nz, .ch2_noise_sampling + bit NOTE_VIBRATO_OVERRIDE, [hl] + jr nz, .ch2_vibrato_override + bit NOTE_DUTY_OVERRIDE, [hl] + ret z + ld a, [wCurTrackDuty] + ld d, a + ldh a, [rNR21] + and $3f ; sound length + or d + ldh [rNR21], a + ret + +.ch2_frequency_override ; unreferenced + ld a, [wCurTrackFrequency] + ldh [rNR23], a + ld a, [wCurTrackFrequency + 1] + ldh [rNR24], a + ret + +.ch2_vibrato_override + ld a, [wCurTrackDuty] + ld d, a + ldh a, [rNR21] + and $3f ; sound length + or d + ldh [rNR21], a + ld a, [wCurTrackFrequency] + ldh [rNR23], a + ret + +.ch2_rest + ldh a, [rNR52] + and %10001101 ; ch2 off + ldh [rNR52], a + ld hl, rNR21 - 1 ; there is no rNR20 + call ClearChannel + ret + +.ch2_noise_sampling + ld hl, wCurTrackDuty + ld a, $3f ; sound length + or [hl] + ldh [rNR21], a + ld a, [wCurTrackVolumeEnvelope] + ldh [rNR22], a + ld a, [wCurTrackFrequency] + ldh [rNR23], a + ld a, [wCurTrackFrequency + 1] + or $80 ; initial (restart) + ldh [rNR24], a + ret + +.Channel3: +.Channel7: + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + bit NOTE_REST, [hl] + jr nz, .ch3_rest + bit NOTE_NOISE_SAMPLING, [hl] + jr nz, .ch3_noise_sampling + bit NOTE_VIBRATO_OVERRIDE, [hl] + jr nz, .ch3_vibrato_override + ret + +.ch3_frequency_override ; unreferenced + ld a, [wCurTrackFrequency] + ldh [rNR33], a + ld a, [wCurTrackFrequency + 1] + ldh [rNR34], a + ret + +.ch3_vibrato_override + ld a, [wCurTrackFrequency] + ldh [rNR33], a + ret + +.ch3_rest + ldh a, [rNR52] + and %10001011 ; ch3 off + ldh [rNR52], a + ld hl, rNR30 + call ClearChannel + ret + +.ch3_noise_sampling + ld a, $3f ; sound length + ldh [rNR31], a + xor a + ldh [rNR30], a + call .load_wave_pattern + ld a, $80 + ldh [rNR30], a + ld a, [wCurTrackFrequency] + ldh [rNR33], a + ld a, [wCurTrackFrequency + 1] + or $80 + ldh [rNR34], a + ret + +.load_wave_pattern + push hl + ld a, [wCurTrackVolumeEnvelope] + and $f ; only 0-9 are valid + ld l, a + ld h, 0 + ; hl << 4 + ; each wavepattern is $f bytes long + ; so seeking is done in $10s +rept 4 + add hl, hl +endr + ld de, WaveSamples + add hl, de + ; load wavepattern into rWave_0-rWave_f + ld a, [hli] + ldh [rWave_0], a + ld a, [hli] + ldh [rWave_1], a + ld a, [hli] + ldh [rWave_2], a + ld a, [hli] + ldh [rWave_3], a + ld a, [hli] + ldh [rWave_4], a + ld a, [hli] + ldh [rWave_5], a + ld a, [hli] + ldh [rWave_6], a + ld a, [hli] + ldh [rWave_7], a + ld a, [hli] + ldh [rWave_8], a + ld a, [hli] + ldh [rWave_9], a + ld a, [hli] + ldh [rWave_a], a + ld a, [hli] + ldh [rWave_b], a + ld a, [hli] + ldh [rWave_c], a + ld a, [hli] + ldh [rWave_d], a + ld a, [hli] + ldh [rWave_e], a + ld a, [hli] + ldh [rWave_f], a + pop hl + ld a, [wCurTrackVolumeEnvelope] + and $f0 + sla a + ldh [rNR32], a + ret + +.Channel4: +.Channel8: + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + bit NOTE_REST, [hl] + jr nz, .ch4_rest + bit NOTE_NOISE_SAMPLING, [hl] + jr nz, .ch4_noise_sampling + ret + +.ch4_frequency_override ; unreferenced + ld a, [wCurTrackFrequency] + ldh [rNR43], a + ret + +.ch4_rest + ldh a, [rNR52] + and %10000111 ; ch4 off + ldh [rNR52], a + ld hl, rNR41 - 1 ; there is no rNR40 + call ClearChannel + ret + +.ch4_noise_sampling + ld a, $3f ; sound length + ldh [rNR41], a + ld a, [wCurTrackVolumeEnvelope] + ldh [rNR42], a + ld a, [wCurTrackFrequency] + ldh [rNR43], a + ld a, $80 + ldh [rNR44], a + ret + +_CheckSFX: +; return carry if any sfx channels are active + ld hl, wChannel5Flags1 + bit SOUND_CHANNEL_ON, [hl] + jr nz, .sfxon + ld hl, wChannel6Flags1 + bit SOUND_CHANNEL_ON, [hl] + jr nz, .sfxon + ld hl, wChannel7Flags1 + bit SOUND_CHANNEL_ON, [hl] + jr nz, .sfxon + ld hl, wChannel8Flags1 + bit SOUND_CHANNEL_ON, [hl] + jr nz, .sfxon + and a + ret + +.sfxon + scf + ret + +PlayDanger: + ld a, [wLowHealthAlarm] + bit DANGER_ON_F, a + ret z + + ; Don't do anything if SFX is being played + and ~(1 << DANGER_ON_F) + ld d, a + call _CheckSFX + jr c, .increment + + ; Play the high tone + and a + jr z, .begin + + ; Play the low tone + cp 16 + jr z, .halfway + + jr .increment + +.halfway + ld hl, DangerSoundLow + jr .applychannel + +.begin + ld hl, DangerSoundHigh + +.applychannel + xor a + ldh [rNR10], a + ld a, [hli] + ldh [rNR11], a + ld a, [hli] + ldh [rNR12], a + ld a, [hli] + ldh [rNR13], a + ld a, [hli] + ldh [rNR14], a + +.increment + ld a, d + inc a + cp 30 ; Ending frame + jr c, .noreset + xor a +.noreset + ; Make sure the danger sound is kept on + or 1 << DANGER_ON_F + ld [wLowHealthAlarm], a + + ; Enable channel 1 if it's off + ld a, [wSoundOutput] + and $11 + ret nz + ld a, [wSoundOutput] + or $11 + ld [wSoundOutput], a + ret + +DangerSoundHigh: + db $80 ; duty 50% + db $e2 ; volume 14, envelope decrease sweep 2 + db $50 ; frequency: $750 + db $87 ; restart sound + +DangerSoundLow: + db $80 ; duty 50% + db $e2 ; volume 14, envelope decrease sweep 2 + db $ee ; frequency: $6ee + db $86 ; restart sound + +FadeMusic: +; fade music if applicable +; usage: +; write to wMusicFade +; song fades out at the given rate +; load song id in wMusicFadeID +; fade new song in +; notes: +; max # frames per volume level is $3f + + ; fading? + ld a, [wMusicFade] + and a + ret z + ; has the count ended? + ld a, [wMusicFadeCount] + and a + jr z, .update + ; count down + dec a + ld [wMusicFadeCount], a + ret + +.update + ld a, [wMusicFade] + ld d, a + ; get new count + and $3f + ld [wMusicFadeCount], a + ; get SO1 volume + ld a, [wVolume] + and VOLUME_SO1_LEVEL + ; which way are we fading? + bit MUSIC_FADE_IN_F, d + jr nz, .fadein + ; fading out + and a + jr z, .novolume + dec a + jr .updatevolume + +.novolume + ; make sure volume is off + xor a + ld [wVolume], a + ; did we just get on a bike? + ld a, [wPlayerState] + cp PLAYER_BIKE + jr z, .bicycle + push bc + ; restart sound + call MusicFadeRestart + ; get new song id + ld a, [wMusicFadeID] + and a + jr z, .quit ; this assumes there are fewer than 256 songs! + ld e, a + ld a, [wMusicFadeID + 1] + ld d, a + ; load new song + call _PlayMusic +.quit + ; cleanup + pop bc + ; stop fading + xor a + ld [wMusicFade], a + ret + +.bicycle + push bc + ; restart sound + call MusicFadeRestart + ; this turns the volume up + ; turn it back down + xor a + ld [wVolume], a + ; get new song id + ld a, [wMusicFadeID] + ld e, a + ld a, [wMusicFadeID + 1] + ld d, a + ; load new song + call _PlayMusic + pop bc + ; fade in + ld hl, wMusicFade + set MUSIC_FADE_IN_F, [hl] + ret + +.fadein + ; are we done? + cp MAX_VOLUME & $f + jr nc, .maxvolume + ; inc volume + inc a + jr .updatevolume + +.maxvolume + ; we're done + xor a + ld [wMusicFade], a + ret + +.updatevolume + ; hi = lo + ld d, a + swap a + or d + ld [wVolume], a + ret + +LoadNote: + ; wait for pitch slide to finish + ld hl, CHANNEL_FLAGS2 + add hl, bc + bit SOUND_PITCH_SLIDE, [hl] + ret z + ; get note duration + ld hl, CHANNEL_NOTE_DURATION + add hl, bc + ld a, [hl] + ld hl, wCurNoteDuration + sub [hl] + jr nc, .ok + ld a, 1 +.ok + ld [hl], a + ; get frequency + ld hl, CHANNEL_FREQUENCY + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + ; get direction of pitch slide + ld hl, CHANNEL_PITCH_SLIDE_TARGET + add hl, bc + ld a, e + sub [hl] + ld e, a + ld a, d + sbc 0 + ld d, a + ld hl, CHANNEL_PITCH_SLIDE_TARGET + 1 + add hl, bc + sub [hl] + jr nc, .greater_than + ld hl, CHANNEL_FLAGS3 + add hl, bc + set SOUND_PITCH_SLIDE_DIR, [hl] + ; get frequency + ld hl, CHANNEL_FREQUENCY + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + ; ???? + ld hl, CHANNEL_PITCH_SLIDE_TARGET + add hl, bc + ld a, [hl] + sub e + ld e, a + ld a, d + sbc 0 + ld d, a + ; ???? + ld hl, CHANNEL_PITCH_SLIDE_TARGET + 1 + add hl, bc + ld a, [hl] + sub d + ld d, a + jr .resume + +.greater_than + ld hl, CHANNEL_FLAGS3 + add hl, bc + res SOUND_PITCH_SLIDE_DIR, [hl] + ; get frequency + ld hl, CHANNEL_FREQUENCY + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + ; get distance from pitch slide target + ld hl, CHANNEL_PITCH_SLIDE_TARGET + add hl, bc + ld a, e + sub [hl] + ld e, a + ld a, d + sbc 0 + ld d, a + ld hl, CHANNEL_PITCH_SLIDE_TARGET + 1 + add hl, bc + sub [hl] + ld d, a +.resume + ; de = x * [wCurNoteDuration] + y + ; x + 1 -> d + ; y -> a + push bc + ld hl, wCurNoteDuration + ld b, 0 ; quotient +.loop + inc b + ld a, e + sub [hl] + ld e, a + jr nc, .loop + ld a, d + and a + jr z, .quit + dec d + jr .loop + +.quit + ld a, e ; remainder + add [hl] + ld d, b ; quotient + pop bc + ld hl, CHANNEL_PITCH_SLIDE_AMOUNT + add hl, bc + ld [hl], d ; quotient + ld hl, CHANNEL_PITCH_SLIDE_AMOUNT_FRACTION + add hl, bc + ld [hl], a ; remainder + ld hl, CHANNEL_FIELD25 + add hl, bc + xor a + ld [hl], a + ret + +HandleTrackVibrato: +; handle duty, cry pitch, and vibrato + ld hl, CHANNEL_FLAGS2 + add hl, bc + bit SOUND_DUTY_LOOP, [hl] ; duty cycle looping + jr z, .next + ld hl, CHANNEL_DUTY_CYCLE_PATTERN + add hl, bc + ld a, [hl] + rlca + rlca + ld [hl], a + and $c0 + ld [wCurTrackDuty], a + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + set NOTE_DUTY_OVERRIDE, [hl] +.next + ld hl, CHANNEL_FLAGS2 + add hl, bc + bit SOUND_PITCH_OFFSET, [hl] + jr z, .vibrato + ld hl, CHANNEL_PITCH_OFFSET + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + ld hl, wCurTrackFrequency + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + ld e, l + ld d, h + ld hl, wCurTrackFrequency + ld [hl], e + inc hl + ld [hl], d +.vibrato + ; is vibrato on? + ld hl, CHANNEL_FLAGS2 + add hl, bc + bit SOUND_VIBRATO, [hl] ; vibrato + jr z, .quit + ; is vibrato active for this note yet? + ; is the delay over? + ld hl, CHANNEL_VIBRATO_DELAY_COUNT + add hl, bc + ld a, [hl] + and a + jr nz, .subexit + ; is the extent nonzero? + ld hl, CHANNEL_VIBRATO_EXTENT + add hl, bc + ld a, [hl] + and a + jr z, .quit + ; save it for later + ld d, a + ; is it time to toggle vibrato up/down? + ld hl, CHANNEL_VIBRATO_RATE + add hl, bc + ld a, [hl] + and $f ; count + jr z, .toggle +.subexit + dec [hl] + jr .quit + +.toggle + ; refresh count + ld a, [hl] + swap [hl] + or [hl] + ld [hl], a + ; ???? + ld a, [wCurTrackFrequency] + ld e, a + ; toggle vibrato up/down + ld hl, CHANNEL_FLAGS3 + add hl, bc + bit SOUND_VIBRATO_DIR, [hl] ; vibrato up/down + jr z, .down +; up + ; vibrato down + res SOUND_VIBRATO_DIR, [hl] + ; get the delay + ld a, d + and $f ; lo + ; + ld d, a + ld a, e + sub d + jr nc, .no_carry + ld a, 0 + jr .no_carry + +.down + ; vibrato up + set SOUND_VIBRATO_DIR, [hl] + ; get the delay + ld a, d + and $f0 ; hi + swap a ; move it to lo + ; + add e + jr nc, .no_carry + ld a, $ff +.no_carry + ld [wCurTrackFrequency], a + ; + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + set NOTE_VIBRATO_OVERRIDE, [hl] +.quit + ret + +ApplyPitchSlide: + ; quit if pitch slide inactive + ld hl, CHANNEL_FLAGS2 + add hl, bc + bit SOUND_PITCH_SLIDE, [hl] + ret z + ; de = Frequency + ld hl, CHANNEL_FREQUENCY + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + ; check whether pitch slide is going up or down + ld hl, CHANNEL_FLAGS3 + add hl, bc + bit SOUND_PITCH_SLIDE_DIR, [hl] + jr z, .decreasing + ; frequency += [Channel*PitchSlideAmount] + ld hl, CHANNEL_PITCH_SLIDE_AMOUNT + add hl, bc + ld l, [hl] + ld h, 0 + add hl, de + ld d, h + ld e, l + ; [Channel*Field25] += [Channel*PitchSlideAmountFraction] + ; if rollover: Frequency += 1 + ld hl, CHANNEL_PITCH_SLIDE_AMOUNT_FRACTION + add hl, bc + ld a, [hl] + ld hl, CHANNEL_FIELD25 + add hl, bc + add [hl] + ld [hl], a + ; could have done "jr nc, .no_rollover / inc de / .no_rollover" + ld a, 0 + adc e + ld e, a + ld a, 0 + adc d + ld d, a + ; Compare the dw at [Channel*PitchSlideTarget] to de. + ; If frequency is greater, we're finished. + ; Otherwise, load the frequency and set two flags. + ld hl, CHANNEL_PITCH_SLIDE_TARGET + 1 + add hl, bc + ld a, [hl] + cp d + jp c, .finished_pitch_slide + jr nz, .continue_pitch_slide + ld hl, CHANNEL_PITCH_SLIDE_TARGET + add hl, bc + ld a, [hl] + cp e + jp c, .finished_pitch_slide + jr .continue_pitch_slide + +.decreasing + ; frequency -= [Channel*PitchSlideAmount] + ld a, e + ld hl, CHANNEL_PITCH_SLIDE_AMOUNT + add hl, bc + ld e, [hl] + sub e + ld e, a + ld a, d + sbc 0 + ld d, a + ; [Channel*Field25] *= 2 + ; if rollover: Frequency -= 1 + ld hl, CHANNEL_PITCH_SLIDE_AMOUNT_FRACTION + add hl, bc + ld a, [hl] + add a + ld [hl], a + ; could have done "jr nc, .no_rollover / dec de / .no_rollover" + ld a, e + sbc 0 + ld e, a + ld a, d + sbc 0 + ld d, a + ; Compare the dw at [Channel*PitchSlideTarget] to de. + ; If frequency is lower, we're finished. + ; Otherwise, load the frequency and set two flags. + ld hl, CHANNEL_PITCH_SLIDE_TARGET + 1 + add hl, bc + ld a, d + cp [hl] + jr c, .finished_pitch_slide + jr nz, .continue_pitch_slide + ld hl, CHANNEL_PITCH_SLIDE_TARGET + add hl, bc + ld a, e + cp [hl] + jr nc, .continue_pitch_slide +.finished_pitch_slide + ld hl, CHANNEL_FLAGS2 + add hl, bc + res SOUND_PITCH_SLIDE, [hl] + ld hl, CHANNEL_FLAGS3 + add hl, bc + res SOUND_PITCH_SLIDE_DIR, [hl] + ret + +.continue_pitch_slide + ld hl, CHANNEL_FREQUENCY + add hl, bc + ld [hl], e + inc hl + ld [hl], d + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + set NOTE_FREQ_OVERRIDE, [hl] + set NOTE_DUTY_OVERRIDE, [hl] + ret + +HandleNoise: + ; is noise sampling on? + ld hl, CHANNEL_FLAGS1 + add hl, bc + bit SOUND_NOISE, [hl] ; noise sampling + ret z + ; are we in a sfx channel? + ld a, [wCurChannel] + bit NOISE_CHAN_F, a + jr nz, .next + ; is ch8 on? (noise) + ld hl, wChannel8Flags1 + bit SOUND_CHANNEL_ON, [hl] ; on? + jr z, .next + ; is ch8 playing noise? + bit SOUND_NOISE, [hl] + ret nz ; quit if so + ; +.next + ld a, [wNoiseSampleDelay] + and a + jr z, ReadNoiseSample + dec a + ld [wNoiseSampleDelay], a + ret + +ReadNoiseSample: +; sample struct: +; [wx] [yy] [zz] +; w: ? either 2 or 3 +; x: duration +; zz: volume envelope +; yy: frequency + + ; de = [wNoiseSampleAddress] + ld hl, wNoiseSampleAddress + ld e, [hl] + inc hl + ld d, [hl] + + ; is it empty? + ld a, e + or d + jr z, .quit + + ld a, [de] + inc de + + cp sound_ret_cmd + jr z, .quit + + and $f + inc a + ld [wNoiseSampleDelay], a + ld a, [de] + inc de + ld [wCurTrackVolumeEnvelope], a + ld a, [de] + inc de + ld [wCurTrackFrequency], a + xor a + ld [wCurTrackFrequency + 1], a + + ld hl, wNoiseSampleAddress + ld [hl], e + inc hl + ld [hl], d + + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + set NOTE_NOISE_SAMPLING, [hl] + ret + +.quit + ret + +ParseMusic: +; parses until a note is read or the song is ended + call GetMusicByte ; store next byte in a + cp sound_ret_cmd + jr z, .sound_ret + cp FIRST_MUSIC_CMD + jr c, .readnote +.readcommand + call ParseMusicCommand + jr ParseMusic ; start over + +.readnote +; wCurMusicByte contains current note +; special notes + ld hl, CHANNEL_FLAGS1 + add hl, bc + bit SOUND_SFX, [hl] + jp nz, ParseSFXOrCry + bit SOUND_CRY, [hl] + jp nz, ParseSFXOrCry + bit SOUND_NOISE, [hl] + jp nz, GetNoiseSample +; normal note + ; set note duration (bottom nybble) + ld a, [wCurMusicByte] + and $f + call SetNoteDuration + ; get note pitch (top nybble) + ld a, [wCurMusicByte] + swap a + and $f + jr z, .rest ; pitch 0 -> rest + ; update pitch + ld hl, CHANNEL_PITCH + add hl, bc + ld [hl], a + ; store pitch in e + ld e, a + ; store octave in d + ld hl, CHANNEL_OCTAVE + add hl, bc + ld d, [hl] + ; update frequency + call GetFrequency + ld hl, CHANNEL_FREQUENCY + add hl, bc + ld [hl], e + inc hl + ld [hl], d + ; ???? + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + set NOTE_NOISE_SAMPLING, [hl] + jp LoadNote + +.rest +; note = rest + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + set NOTE_REST, [hl] ; Rest + ret + +.sound_ret +; $ff is reached in music data + ld hl, CHANNEL_FLAGS1 + add hl, bc + bit SOUND_SUBROUTINE, [hl] ; in a subroutine? + jr nz, .readcommand ; execute + ld a, [wCurChannel] + cp CHAN5 + jr nc, .chan_5to8 + ; ???? + ld hl, CHANNEL_STRUCT_LENGTH * NUM_MUSIC_CHANS + CHANNEL_FLAGS1 + add hl, bc + bit SOUND_CHANNEL_ON, [hl] + jr nz, .ok +.chan_5to8 + ld hl, CHANNEL_FLAGS1 + add hl, bc + bit SOUND_CRY, [hl] + call nz, RestoreVolume + ; end music + ld a, [wCurChannel] + cp CHAN5 + jr nz, .ok + ; ???? + xor a + ldh [rNR10], a ; sweep = 0 +.ok +; stop playing + ; turn channel off + ld hl, CHANNEL_FLAGS1 + add hl, bc + res SOUND_CHANNEL_ON, [hl] + ; note = rest + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + set NOTE_REST, [hl] + ; clear music id & bank + ld hl, CHANNEL_MUSIC_ID + add hl, bc + xor a + ld [hli], a ; id hi + ld [hli], a ; id lo + ld [hli], a ; bank + ret + +RestoreVolume: + ; ch5 only + ld a, [wCurChannel] + cp CHAN5 + ret nz + xor a + ld hl, wChannel6PitchOffset + ld [hli], a + ld [hl], a + ld hl, wChannel8PitchOffset + ld [hli], a + ld [hl], a + ld a, [wLastVolume] + ld [wVolume], a + xor a + ld [wLastVolume], a + ld [wSFXPriority], a + ret + +ParseSFXOrCry: + ; turn noise sampling on + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + set NOTE_NOISE_SAMPLING, [hl] ; noise sample + ; update note duration + ld a, [wCurMusicByte] + call SetNoteDuration ; top nybble doesnt matter? + ; update volume envelope from next param + call GetMusicByte + ld hl, CHANNEL_VOLUME_ENVELOPE + add hl, bc + ld [hl], a + ; update lo frequency from next param + call GetMusicByte + ld hl, CHANNEL_FREQUENCY + add hl, bc + ld [hl], a + ; are we on the last channel? (noise sampling) + ld a, [wCurChannel] + maskbits NUM_MUSIC_CHANS + cp CHAN4 + ret z + ; update hi frequency from next param + call GetMusicByte + ld hl, CHANNEL_FREQUENCY + 1 + add hl, bc + ld [hl], a + ret + +GetNoiseSample: +; load ptr to sample header in wNoiseSampleAddress + ; are we on the last channel? + ld a, [wCurChannel] + and NUM_MUSIC_CHANS - 1 + cp CHAN4 + ; ret if not + ret nz + ; update note duration + ld a, [wCurMusicByte] + and $f + call SetNoteDuration + ; check current channel + ld a, [wCurChannel] + bit NOISE_CHAN_F, a + jr nz, .sfx + ld hl, wChannel8Flags1 + bit SOUND_CHANNEL_ON, [hl] ; is ch8 on? (noise) + ret nz + ld a, [wMusicNoiseSampleSet] + jr .next + +.sfx + ld a, [wSFXNoiseSampleSet] +.next + ; load noise sample set id into de + ld e, a + ld d, 0 + ; load ptr to noise sample set in hl + ld hl, Drumkits + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ; get pitch + ld a, [wCurMusicByte] + swap a + ; non-rest note? + and $f + ret z + ; use 'pitch' to seek noise sample set + ld e, a + ld d, 0 + add hl, de + add hl, de + ; load sample pointer into wNoiseSampleAddress + ld a, [hli] + ld [wNoiseSampleAddress], a + ld a, [hl] + ld [wNoiseSampleAddress + 1], a + ; clear ???? + xor a + ld [wNoiseSampleDelay], a + ret + +ParseMusicCommand: + ; reload command + ld a, [wCurMusicByte] + ; get command # + sub FIRST_MUSIC_CMD + ld e, a + ld d, 0 + ; seek command pointer + ld hl, MusicCommands + add hl, de + add hl, de + ; jump to the new pointer + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +MusicCommands: +; entries correspond to audio constants (see macros/scripts/audio.asm) + table_width 2, MusicCommands + dw Music_Octave8 + dw Music_Octave7 + dw Music_Octave6 + dw Music_Octave5 + dw Music_Octave4 + dw Music_Octave3 + dw Music_Octave2 + dw Music_Octave1 + dw Music_NoteType ; note length + volume envelope + dw Music_Transpose + dw Music_Tempo + dw Music_DutyCycle + dw Music_VolumeEnvelope + dw Music_PitchSweep + dw Music_DutyCyclePattern + dw Music_ToggleSFX + dw Music_PitchSlide + dw Music_Vibrato + dw MusicE2 ; unused + dw Music_ToggleNoise + dw Music_ForceStereoPanning + dw Music_Volume + dw Music_PitchOffset + dw MusicE7 ; unused + dw MusicE8 ; unused + dw Music_TempoRelative ; unused + dw Music_RestartChannel + dw Music_NewSong ; unused + dw Music_SFXPriorityOn + dw Music_SFXPriorityOff + dw MusicEE ; unused + dw Music_StereoPanning + dw Music_SFXToggleNoise + dw MusicF1 ; nothing + dw MusicF2 ; nothing + dw MusicF3 ; nothing + dw MusicF4 ; nothing + dw MusicF5 ; nothing + dw MusicF6 ; nothing + dw MusicF7 ; nothing + dw MusicF8 ; nothing + dw MusicF9 ; unused + dw Music_SetCondition + dw Music_JumpIf + dw Music_Jump + dw Music_Loop + dw Music_Call + dw Music_Ret + assert_table_length $100 - FIRST_MUSIC_CMD + +MusicF1: +MusicF2: +MusicF3: +MusicF4: +MusicF5: +MusicF6: +MusicF7: +MusicF8: + ret + +Music_Ret: +; called when $ff is encountered w/ subroutine flag set +; end music stream +; return to caller of the subroutine + ; reset subroutine flag + ld hl, CHANNEL_FLAGS1 + add hl, bc + res SOUND_SUBROUTINE, [hl] + ; copy LastMusicAddress to MusicAddress + ld hl, CHANNEL_LAST_MUSIC_ADDRESS + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + ld [hl], e + inc hl + ld [hl], d + ret + +Music_Call: +; call music stream (subroutine) +; parameters: ll hh ; pointer to subroutine + ; get pointer from next 2 bytes + call GetMusicByte + ld e, a + call GetMusicByte + ld d, a + push de + ; copy MusicAddress to LastMusicAddress + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + ld hl, CHANNEL_LAST_MUSIC_ADDRESS + add hl, bc + ld [hl], e + inc hl + ld [hl], d + ; load pointer into MusicAddress + pop de + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + ld [hl], e + inc hl + ld [hl], d + ; set subroutine flag + ld hl, CHANNEL_FLAGS1 + add hl, bc + set SOUND_SUBROUTINE, [hl] + ret + +Music_Jump: +; jump +; parameters: ll hh ; pointer + ; get pointer from next 2 bytes + call GetMusicByte + ld e, a + call GetMusicByte + ld d, a + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + ld [hl], e + inc hl + ld [hl], d + ret + +Music_Loop: +; loops xx - 1 times +; 00: infinite +; params: 3 +; xx ll hh +; xx : loop count +; ll hh : pointer + + ; get loop count + call GetMusicByte + ld hl, CHANNEL_FLAGS1 + add hl, bc + bit SOUND_LOOPING, [hl] ; has the loop been initiated? + jr nz, .checkloop + and a ; loop counter 0 = infinite + jr z, .loop + ; initiate loop + dec a + set SOUND_LOOPING, [hl] ; set loop flag + ld hl, CHANNEL_LOOP_COUNT + add hl, bc + ld [hl], a ; store loop counter +.checkloop + ld hl, CHANNEL_LOOP_COUNT + add hl, bc + ld a, [hl] + and a ; are we done? + jr z, .endloop + dec [hl] +.loop + ; get pointer + call GetMusicByte + ld e, a + call GetMusicByte + ld d, a + ; load new pointer into MusicAddress + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + ld [hl], e + inc hl + ld [hl], d + ret + +.endloop + ; reset loop flag + ld hl, CHANNEL_FLAGS1 + add hl, bc + res SOUND_LOOPING, [hl] + ; skip to next command + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + inc de ; skip + inc de ; pointer + ld [hl], d + dec hl + ld [hl], e + ret + +Music_SetCondition: +; set condition for a jump +; used with FB +; params: 1 +; xx ; condition + + ; set condition + call GetMusicByte + ld hl, CHANNEL_CONDITION + add hl, bc + ld [hl], a + ret + +Music_JumpIf: +; conditional jump +; used with FA +; params: 3 +; xx: condition +; ll hh: pointer + +; check condition + ; a = condition + call GetMusicByte + ; if existing condition matches, jump to new address + ld hl, CHANNEL_CONDITION + add hl, bc + cp [hl] + jr z, .jump +; skip to next command + ; get address + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + ; skip pointer + inc de + inc de + ; update address + ld [hl], d + dec hl + ld [hl], e + ret + +.jump +; jump to the new address + ; get pointer + call GetMusicByte + ld e, a + call GetMusicByte + ld d, a + ; update pointer in MusicAddress + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + ld [hl], e + inc hl + ld [hl], d + ret + +MusicEE: +; unused +; conditional jump +; checks a byte in ram corresponding to the current channel +; params: 2 +; ll hh ; pointer + +; if ????, jump + ; get channel + ld a, [wCurChannel] + maskbits NUM_MUSIC_CHANS + ld e, a + ld d, 0 + ; hl = wChannel1JumpCondition + channel id + ld hl, wChannel1JumpCondition + add hl, de + ; if set, jump + ld a, [hl] + and a + jr nz, .jump +; skip to next command + ; get address + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + ; skip pointer + inc de + inc de + ; update address + ld [hl], d + dec hl + ld [hl], e + ret + +.jump + ; reset jump flag + ld [hl], 0 + ; de = pointer + call GetMusicByte + ld e, a + call GetMusicByte + ld d, a + ; update address + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + ld [hl], e + inc hl + ld [hl], d + ret + +MusicF9: +; unused +; sets some flag +; params: 0 + ld a, TRUE + ld [wUnusedMusicF9Flag], a + ret + +MusicE2: +; unused +; params: 1 + call GetMusicByte + ld hl, CHANNEL_FIELD2C + add hl, bc + ld [hl], a + ld hl, CHANNEL_FLAGS2 + add hl, bc + set SOUND_UNKN_0B, [hl] + ret + +Music_Vibrato: +; vibrato +; params: 2 +; 1: [xx] + ; delay in frames +; 2: [yz] + ; y: extent + ; z: rate (# frames per cycle) + + ; set vibrato flag? + ld hl, CHANNEL_FLAGS2 + add hl, bc + set SOUND_VIBRATO, [hl] + ; start at lower frequency (extent is positive) + ld hl, CHANNEL_FLAGS3 + add hl, bc + res SOUND_VIBRATO_DIR, [hl] + ; get delay + call GetMusicByte +; update delay + ld hl, CHANNEL_VIBRATO_DELAY + add hl, bc + ld [hl], a +; update delay count + ld hl, CHANNEL_VIBRATO_DELAY_COUNT + add hl, bc + ld [hl], a +; update extent +; this is split into halves only to get added back together at the last second + ; get extent/rate + call GetMusicByte + ld hl, CHANNEL_VIBRATO_EXTENT + add hl, bc + ld d, a + ; get top nybble + and $f0 + swap a + srl a ; halve + ld e, a + adc 0 ; round up + swap a + or e + ld [hl], a +; update rate + ld hl, CHANNEL_VIBRATO_RATE + add hl, bc + ; get bottom nybble + ld a, d + and $f + ld d, a + swap a + or d + ld [hl], a + ret + +Music_PitchSlide: +; set the target for pitch slide +; params: 2 +; note duration +; target note + call GetMusicByte + ld [wCurNoteDuration], a + + call GetMusicByte + ; pitch in e + ld d, a + and $f + ld e, a + + ; octave in d + ld a, d + swap a + and $f + ld d, a + call GetFrequency + ld hl, CHANNEL_PITCH_SLIDE_TARGET + add hl, bc + ld [hl], e + ld hl, CHANNEL_PITCH_SLIDE_TARGET + 1 + add hl, bc + ld [hl], d + ld hl, CHANNEL_FLAGS2 + add hl, bc + set SOUND_PITCH_SLIDE, [hl] + ret + +Music_PitchOffset: +; tone +; params: 1 (dw) +; offset to add to each note frequency + ld hl, CHANNEL_FLAGS2 + add hl, bc + set SOUND_PITCH_OFFSET, [hl] + ld hl, CHANNEL_PITCH_OFFSET + 1 + add hl, bc + call GetMusicByte + ld [hld], a + call GetMusicByte + ld [hl], a + ret + +MusicE7: +; unused +; params: 1 + ld hl, CHANNEL_FLAGS2 + add hl, bc + set SOUND_UNKN_0E, [hl] + call GetMusicByte + ld hl, CHANNEL_FIELD29 + add hl, bc + ld [hl], a + ret + +Music_DutyCyclePattern: +; sequence of 4 duty cycles to be looped +; params: 1 (4 2-bit duty cycle arguments) + ld hl, CHANNEL_FLAGS2 + add hl, bc + set SOUND_DUTY_LOOP, [hl] ; duty cycle looping + ; sound duty sequence + call GetMusicByte + rrca + rrca + ld hl, CHANNEL_DUTY_CYCLE_PATTERN + add hl, bc + ld [hl], a + ; update duty cycle + and $c0 ; only uses top 2 bits + ld hl, CHANNEL_DUTY_CYCLE + add hl, bc + ld [hl], a + ret + +MusicE8: +; unused +; params: 1 + ld hl, CHANNEL_FLAGS2 + add hl, bc + set SOUND_UNKN_0D, [hl] + call GetMusicByte + ld hl, CHANNEL_FIELD2A + add hl, bc + ld [hl], a + ret + +Music_ToggleSFX: +; toggle something +; params: none + ld hl, CHANNEL_FLAGS1 + add hl, bc + bit SOUND_SFX, [hl] + jr z, .on + res SOUND_SFX, [hl] + ret + +.on + set SOUND_SFX, [hl] + ret + +Music_ToggleNoise: +; toggle music noise sampling +; can't be used as a straight toggle since the param is not read from on->off +; params: +; noise on: 1 +; noise off: 0 + ; check if noise sampling is on + ld hl, CHANNEL_FLAGS1 + add hl, bc + bit SOUND_NOISE, [hl] + jr z, .on + ; turn noise sampling off + res SOUND_NOISE, [hl] + ret + +.on + ; turn noise sampling on + set SOUND_NOISE, [hl] + call GetMusicByte + ld [wMusicNoiseSampleSet], a + ret + +Music_SFXToggleNoise: +; toggle sfx noise sampling +; params: +; on: 1 +; off: 0 + ; check if noise sampling is on + ld hl, CHANNEL_FLAGS1 + add hl, bc + bit SOUND_NOISE, [hl] + jr z, .on + ; turn noise sampling off + res SOUND_NOISE, [hl] + ret + +.on + ; turn noise sampling on + set SOUND_NOISE, [hl] + call GetMusicByte + ld [wSFXNoiseSampleSet], a + ret + +Music_NoteType: +; note length +; # frames per 16th note +; volume envelope: see Music_VolumeEnvelope +; params: 2 + ; note length + call GetMusicByte + ld hl, CHANNEL_NOTE_LENGTH + add hl, bc + ld [hl], a + ld a, [wCurChannel] + maskbits NUM_MUSIC_CHANS + cp CHAN4 + ret z + ; volume envelope + call Music_VolumeEnvelope + ret + +Music_PitchSweep: +; update pitch sweep +; params: 1 + call GetMusicByte + ld [wPitchSweep], a + ld hl, CHANNEL_NOTE_FLAGS + add hl, bc + set NOTE_PITCH_SWEEP, [hl] + ret + +Music_DutyCycle: +; duty cycle +; params: 1 + call GetMusicByte + rrca + rrca + and $c0 + ld hl, CHANNEL_DUTY_CYCLE + add hl, bc + ld [hl], a + ret + +Music_VolumeEnvelope: +; volume envelope +; params: 1 +; hi: volume +; lo: fade + call GetMusicByte + ld hl, CHANNEL_VOLUME_ENVELOPE + add hl, bc + ld [hl], a + ret + +Music_Tempo: +; global tempo +; params: 2 +; de: tempo + call GetMusicByte + ld d, a + call GetMusicByte + ld e, a + call SetGlobalTempo + ret + +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 + ld a, [wCurMusicByte] + and 7 + ld [hl], a + ret + +Music_Transpose: +; set starting octave +; this forces all notes up by the starting octave +; params: 1 + call GetMusicByte + ld hl, CHANNEL_TRANSPOSITION + add hl, bc + ld [hl], a + ret + +Music_StereoPanning: +; stereo panning +; params: 1 + ; stereo on? + ld a, [wOptions] + bit STEREO, a + jr nz, Music_ForceStereoPanning + ; skip param + call GetMusicByte + ret + +Music_ForceStereoPanning: +; force panning +; params: 1 + call SetLRTracks + call GetMusicByte + ld hl, CHANNEL_TRACKS + add hl, bc + and [hl] + ld [hl], a + ret + +Music_Volume: +; set volume +; params: 1 +; see Volume + ; read param even if it's not used + call GetMusicByte + ; is the song fading? + ld a, [wMusicFade] + and a + ret nz + ; reload param + ld a, [wCurMusicByte] + ; set volume + ld [wVolume], a + ret + +Music_TempoRelative: +; set global tempo to current channel tempo +/- param +; params: 1 signed + call GetMusicByte + ld e, a + ; check sign + cp $80 + jr nc, .negative +;positive + ld d, 0 + jr .ok + +.negative + ld d, -1 +.ok + ld hl, CHANNEL_TEMPO + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + ld e, l + ld d, h + call SetGlobalTempo + ret + +Music_SFXPriorityOn: +; turn sfx priority on +; params: none + ld a, 1 + ld [wSFXPriority], a + ret + +Music_SFXPriorityOff: +; turn sfx priority off +; params: none + xor a + ld [wSFXPriority], a + ret + +Music_RestartChannel: +; restart current channel from channel header (same bank) +; params: 2 (5) +; ll hh: pointer to new channel header +; header format: 0x yy zz +; x: channel # (0-3) +; zzyy: pointer to new music data + + ; update music id + ld hl, CHANNEL_MUSIC_ID + add hl, bc + ld a, [hli] + ld [wMusicID], a + ld a, [hl] + ld [wMusicID + 1], a + ; update music bank + ld hl, CHANNEL_MUSIC_BANK + add hl, bc + ld a, [hl] + ld [wMusicBank], a + ; get pointer to new channel header + call GetMusicByte + ld l, a + call GetMusicByte + ld h, a + ld e, [hl] + inc hl + ld d, [hl] + push bc ; save current channel + call LoadChannel + call StartChannel + pop bc ; restore current channel + ret + +Music_NewSong: +; new song +; params: 2 +; de: song id + call GetMusicByte + ld e, a + call GetMusicByte + ld d, a + push bc + call _PlayMusic + pop bc + ret + +GetMusicByte: +; returns byte from current address in a +; advances to next byte in music data +; input: bc = start of current channel + push hl + push de + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + ld a, [hli] + ld e, a + ld d, [hl] + ld hl, CHANNEL_MUSIC_BANK + add hl, bc + ld a, [hl] + call _LoadMusicByte ; load data into [wCurMusicByte] + inc de ; advance to next byte for next time this is called + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + ld a, e + ld [hli], a + ld [hl], d + pop de + pop hl + ld a, [wCurMusicByte] + ret + +GetFrequency: +; generate frequency +; input: +; d: octave +; e: pitch +; output: +; de: frequency + +; get octave + ; get starting octave + ld hl, CHANNEL_TRANSPOSITION + add hl, bc + ld a, [hl] + swap a ; hi nybble + and $f + ; add current octave + add d + push af ; we'll use this later + ; get starting octave + ld hl, CHANNEL_TRANSPOSITION + add hl, bc + ld a, [hl] + and $f ; lo nybble + ld l, a ; ok + ld d, 0 + ld h, d + add hl, de ; add current pitch + add hl, hl ; skip 2 bytes for each + ld de, FrequencyTable + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + ; get our octave + pop af + ; shift right by [7 - octave] bits +.loop + ; [7 - octave] loops + cp $7 + jr nc, .ok + ; sra de + sra d + rr e + inc a + jr .loop + +.ok + ld a, d + and $7 ; top 3 bits for frequency (11 total) + ld d, a + ret + +SetNoteDuration: +; input: a = note duration in 16ths + ; store delay units in de + inc a + ld e, a + ld d, 0 + ld hl, CHANNEL_NOTE_LENGTH + add hl, bc + ld a, [hl] + ; multiply NoteLength by delay units + ld l, 0 ; just multiply + call .Multiply + ld a, l ; low + ; store Tempo in de + ld hl, CHANNEL_TEMPO + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + ; add ???? to the next result + ld hl, CHANNEL_FIELD16 + add hl, bc + ld l, [hl] + ; multiply Tempo by last result (NoteLength * LOW(delay)) + call .Multiply + ; copy result to de + ld e, l + ld d, h + ; store result in ???? + ld hl, CHANNEL_FIELD16 + add hl, bc + ld [hl], e + ; store result in NoteDuration + ld hl, CHANNEL_NOTE_DURATION + add hl, bc + ld [hl], d + ret + +.Multiply: +; multiplies a and de +; adds the result to l +; stores the result in hl + ld h, 0 +.loop + ; halve a + srl a + ; is there a remainder? + jr nc, .skip + ; add it to the result + add hl, de +.skip + ; add de, de + sla e + rl d + ; are we done? + and a + jr nz, .loop + ret + +SetGlobalTempo: + push bc ; save current channel + ; are we dealing with music or sfx? + ld a, [wCurChannel] + cp CHAN5 + jr nc, .sfxchannels + ld bc, wChannel1 + call Tempo + ld bc, wChannel2 + call Tempo + ld bc, wChannel3 + call Tempo + ld bc, wChannel4 + call Tempo + jr .end + +.sfxchannels + ld bc, wChannel5 + call Tempo + ld bc, wChannel6 + call Tempo + ld bc, wChannel7 + call Tempo + ld bc, wChannel8 + call Tempo +.end + pop bc ; restore current channel + ret + +Tempo: +; input: +; de: note length + ; update Tempo + ld hl, CHANNEL_TEMPO + add hl, bc + ld [hl], e + inc hl + ld [hl], d + ; clear ???? + xor a + ld hl, CHANNEL_FIELD16 + add hl, bc + ld [hl], a + ret + +StartChannel: + call SetLRTracks + ld hl, CHANNEL_FLAGS1 + add hl, bc + set SOUND_CHANNEL_ON, [hl] ; turn channel on + ret + +SetLRTracks: +; set tracks for a the current channel to default +; seems to be redundant since this is overwritten by stereo data later + push de + ; store current channel in de + ld a, [wCurChannel] + maskbits NUM_MUSIC_CHANS + ld e, a + ld d, 0 + call GetLRTracks + add hl, de ; de = channel 0-3 + ld a, [hl] + ; load lr tracks into Tracks + ld hl, CHANNEL_TRACKS + add hl, bc + ld [hl], a + pop de + ret + +_PlayMusic:: +; load music + call MusicOff + ld hl, wMusicID + ld [hl], e ; song number + inc hl + ld [hl], d ; (always 0) + ld hl, Music + add hl, de ; three + add hl, de ; byte + add hl, de ; pointer + ld a, [hli] + ld [wMusicBank], a + ld e, [hl] + inc hl + ld d, [hl] ; music header address + call LoadMusicByte ; store first byte of music header in a + rlca + rlca + maskbits NUM_MUSIC_CHANS + inc a +.loop +; start playing channels + push af + call LoadChannel + call StartChannel + pop af + dec a + jr nz, .loop + xor a + ld [wUnusedMusicF9Flag], a + ld [wChannel1JumpCondition], a + ld [wChannel2JumpCondition], a + ld [wChannel3JumpCondition], a + ld [wChannel4JumpCondition], a + ld [wNoiseSampleAddress], a + ld [wNoiseSampleAddress + 1], a + ld [wNoiseSampleDelay], a + ld [wMusicNoiseSampleSet], a + call MusicOn + ret + +_PlayCry:: +; Play cry de using parameters: +; wCryPitch +; wCryLength + + call MusicOff + +; Overload the music id with the cry id + ld hl, wMusicID + ld [hl], e + inc hl + ld [hl], d + +; 3-byte pointers (bank, address) + ld hl, Cries + add hl, de + add hl, de + add hl, de + + ld a, [hli] + ld [wMusicBank], a + + ld e, [hl] + inc hl + ld d, [hl] + +; Read the cry's sound header + call LoadMusicByte + ; Top 2 bits contain the number of channels + rlca + rlca + maskbits NUM_MUSIC_CHANS + +; For each channel: + inc a +.loop + push af + call LoadChannel ; bc = current channel + + ld hl, CHANNEL_FLAGS1 + add hl, bc + set SOUND_CRY, [hl] + + ld hl, CHANNEL_FLAGS2 + add hl, bc + set SOUND_PITCH_OFFSET, [hl] + + ld hl, CHANNEL_PITCH_OFFSET + add hl, bc + ld a, [wCryPitch] + ld [hli], a + ld a, [wCryPitch + 1] + ld [hl], a + +; No tempo for channel 4 + ld a, [wCurChannel] + maskbits NUM_MUSIC_CHANS + cp CHAN4 + jr nc, .start + +; Tempo is effectively length + ld hl, CHANNEL_TEMPO + add hl, bc + ld a, [wCryLength] + ld [hli], a + ld a, [wCryLength + 1] + ld [hl], a +.start + call StartChannel + ld a, [wStereoPanningMask] + and a + jr z, .next + +; Stereo only: Play cry from the monster's side. +; This only applies in-battle. + + ld a, [wOptions] + bit STEREO, a + jr z, .next + +; [CHANNEL_TRACKS] &= [wCryTracks] + ld hl, CHANNEL_TRACKS + add hl, bc + ld a, [hl] + ld hl, wCryTracks + and [hl] + ld hl, CHANNEL_TRACKS + add hl, bc + ld [hl], a + +.next + pop af + dec a + jr nz, .loop + +; Cries play at max volume, so we save the current volume for later. + ld a, [wLastVolume] + and a + jr nz, .end + + ld a, [wVolume] + ld [wLastVolume], a + ld a, MAX_VOLUME + ld [wVolume], a + +.end + ld a, 1 ; stop playing music + ld [wSFXPriority], a + call MusicOn + ret + +_PlaySFX:: +; clear channels if they aren't already + call MusicOff + ld hl, wChannel5Flags1 + bit SOUND_CHANNEL_ON, [hl] ; ch5 on? + jr z, .ch6 + res SOUND_CHANNEL_ON, [hl] ; turn it off + xor a + ldh [rNR11], a ; length/wavepattern = 0 + ld a, $8 + ldh [rNR12], a ; envelope = 0 + xor a + ldh [rNR13], a ; frequency lo = 0 + ld a, $80 + ldh [rNR14], a ; restart sound (freq hi = 0) + xor a + ld [wPitchSweep], a ; pitch sweep off + ldh [rNR10], a ; pitch sweep off +.ch6 + ld hl, wChannel6Flags1 + bit SOUND_CHANNEL_ON, [hl] + jr z, .ch7 + res SOUND_CHANNEL_ON, [hl] ; turn it off + xor a + ldh [rNR21], a ; length/wavepattern = 0 + ld a, $8 + ldh [rNR22], a ; envelope = 0 + xor a + ldh [rNR23], a ; frequency lo = 0 + ld a, $80 + ldh [rNR24], a ; restart sound (freq hi = 0) +.ch7 + ld hl, wChannel7Flags1 + bit SOUND_CHANNEL_ON, [hl] + jr z, .ch8 + res SOUND_CHANNEL_ON, [hl] ; turn it off + xor a + ldh [rNR30], a ; sound mode #3 off + ldh [rNR31], a ; length/wavepattern = 0 + ld a, $8 + ldh [rNR32], a ; envelope = 0 + xor a + ldh [rNR33], a ; frequency lo = 0 + ld a, $80 + ldh [rNR34], a ; restart sound (freq hi = 0) +.ch8 + ld hl, wChannel8Flags1 + bit SOUND_CHANNEL_ON, [hl] + jr z, .chscleared + res SOUND_CHANNEL_ON, [hl] ; turn it off + xor a + ldh [rNR41], a ; length/wavepattern = 0 + ld a, $8 + ldh [rNR42], a ; envelope = 0 + xor a + ldh [rNR43], a ; frequency lo = 0 + ld a, $80 + ldh [rNR44], a ; restart sound (freq hi = 0) + xor a + ld [wNoiseSampleAddress], a + ld [wNoiseSampleAddress + 1], a +.chscleared +; start reading sfx header for # chs + ld hl, wMusicID + ld [hl], e + inc hl + ld [hl], d + ld hl, SFX + add hl, de ; three + add hl, de ; byte + add hl, de ; pointers + ; get bank + ld a, [hli] + ld [wMusicBank], a + ; get address + ld e, [hl] + inc hl + ld d, [hl] + ; get # channels + call LoadMusicByte + rlca ; top 2 + rlca ; bits + maskbits NUM_MUSIC_CHANS + inc a ; # channels -> # loops +.startchannels + push af + call LoadChannel ; bc = current channel + ld hl, CHANNEL_FLAGS1 + add hl, bc + set SOUND_SFX, [hl] + call StartChannel + pop af + dec a + jr nz, .startchannels + call MusicOn + xor a + ld [wSFXPriority], a + ret + +PlayStereoSFX:: +; play sfx de + + call MusicOff + +; standard procedure if stereo's off + ld a, [wOptions] + bit STEREO, a + jp z, _PlaySFX + +; else, let's go ahead with this + ld hl, wMusicID + ld [hl], e + inc hl + ld [hl], d + +; get sfx ptr + ld hl, SFX + add hl, de + add hl, de + add hl, de + +; bank + ld a, [hli] + ld [wMusicBank], a +; address + ld e, [hl] + inc hl + ld d, [hl] + +; bit 2-3 + call LoadMusicByte + rlca + rlca + maskbits NUM_MUSIC_CHANS + inc a + +.loop + push af + call LoadChannel + + ld hl, CHANNEL_FLAGS1 + add hl, bc + set SOUND_SFX, [hl] + + push de + ; get tracks for this channel + ld a, [wCurChannel] + maskbits NUM_MUSIC_CHANS + ld e, a + ld d, 0 + call GetLRTracks + add hl, de + ld a, [hl] + ld hl, wStereoPanningMask + and [hl] + + ld hl, CHANNEL_TRACKS + add hl, bc + ld [hl], a + + ld hl, CHANNEL_FIELD30 + add hl, bc + ld [hl], a + + ld a, [wCryTracks] + cp 2 ; ch 1-2 + jr c, .skip + +; ch3-4 + ld a, [wSFXDuration] + + ld hl, CHANNEL_FIELD2E + add hl, bc + ld [hl], a + + ld hl, CHANNEL_FIELD2F + add hl, bc + ld [hl], a + + ld hl, CHANNEL_FLAGS2 + add hl, bc + set SOUND_UNKN_0F, [hl] + +.skip + pop de + +; turn channel on + ld hl, CHANNEL_FLAGS1 + add hl, bc + set SOUND_CHANNEL_ON, [hl] ; on + +; done? + pop af + dec a + jr nz, .loop + +; we're done + call MusicOn + ret + +LoadChannel: +; input: de = audio pointer +; sets bc to current channel pointer + call LoadMusicByte + inc de + maskbits NUM_CHANNELS + ld [wCurChannel], a + ld c, a + ld b, 0 + ld hl, ChannelPointers + add hl, bc + add hl, bc + ld c, [hl] + inc hl + ld b, [hl] ; bc = channel pointer + ld hl, CHANNEL_FLAGS1 + add hl, bc + res SOUND_CHANNEL_ON, [hl] ; channel off + call ChannelInit + ; load music pointer + ld hl, CHANNEL_MUSIC_ADDRESS + add hl, bc + call LoadMusicByte + ld [hli], a + inc de + call LoadMusicByte + ld [hl], a + inc de + ; load music id + ld hl, CHANNEL_MUSIC_ID + add hl, bc + ld a, [wMusicID] + ld [hli], a + ld a, [wMusicID + 1] + ld [hl], a + ; load music bank + ld hl, CHANNEL_MUSIC_BANK + add hl, bc + ld a, [wMusicBank] + ld [hl], a + ret + +ChannelInit: +; make sure channel is cleared +; set default tempo and note length in case nothing is loaded +; input: +; bc = channel struct pointer + push de + xor a + ; get channel struct location and length + ld hl, CHANNEL_MUSIC_ID ; start + add hl, bc + ld e, CHANNEL_STRUCT_LENGTH ; channel struct length + ; clear channel +.loop + ld [hli], a + dec e + jr nz, .loop + ; set tempo to default ($100) + ld hl, CHANNEL_TEMPO + add hl, bc + xor a + ld [hli], a + inc a + ld [hl], a + ; set note length to default ($1) (fast) + ld hl, CHANNEL_NOTE_LENGTH + add hl, bc + ld [hl], a + pop de + ret + +LoadMusicByte:: +; input: +; de = current music address +; output: +; a = wCurMusicByte + ld a, [wMusicBank] + call _LoadMusicByte + ld a, [wCurMusicByte] + ret + +INCLUDE "audio/notes.asm" + +INCLUDE "audio/wave_samples.asm" + +INCLUDE "audio/drumkits.asm" + +GetLRTracks: +; gets the default sound l/r channels +; stores mono/stereo table in hl + ld a, [wOptions] + bit STEREO, a + ; made redundant, could have had a purpose in gold + jr nz, .stereo + ld hl, MonoTracks + ret + +.stereo + ld hl, StereoTracks + ret + +MonoTracks: +; bit corresponds to track # +; hi: left channel +; lo: right channel + db $11, $22, $44, $88 + +StereoTracks: +; made redundant +; seems to be modified on a per-song basis + db $11, $22, $44, $88 + +ChannelPointers: + table_width 2, ChannelPointers +; music channels + dw wChannel1 + dw wChannel2 + dw wChannel3 + dw wChannel4 + assert_table_length NUM_MUSIC_CHANS +; sfx channels + dw wChannel5 + dw wChannel6 + dw wChannel7 + dw wChannel8 + assert_table_length NUM_CHANNELS + +ClearChannels:: +; runs ClearChannel for all 4 channels + ld hl, rNR50 + xor a + ld [hli], a + ld [hli], a + ld a, $80 + ld [hli], a + ld hl, rNR10 + ld e, NUM_MUSIC_CHANS +.loop + call ClearChannel + dec e + jr nz, .loop + ret + +ClearChannel: +; input: hl = beginning hw sound register (rNR10, rNR20, rNR30, rNR40) +; output: 00 00 80 00 80 + +; sound channel 1 2 3 4 + xor a + ld [hli], a ; rNR10, rNR20, rNR30, rNR40 ; sweep = 0 + + ld [hli], a ; rNR11, rNR21, rNR31, rNR41 ; length/wavepattern = 0 + ld a, $8 + ld [hli], a ; rNR12, rNR22, rNR32, rNR42 ; envelope = 0 + xor a + ld [hli], a ; rNR13, rNR23, rNR33, rNR43 ; frequency lo = 0 + ld a, $80 + ld [hli], a ; rNR14, rNR24, rNR34, rNR44 ; restart sound (freq hi = 0) + ret + +PlayTrainerEncounterMusic:: +; input: e = trainer type + ; turn fade off + xor a + ld [wMusicFade], a + ; play nothing for one frame + push de + ld de, MUSIC_NONE + call PlayMusic + call DelayFrame + ; play new song + call MaxVolume + pop de + ld d, $00 + ld hl, TrainerEncounterMusic + add hl, de + ld e, [hl] + call PlayMusic + ret diff --git a/audio/music/aftertherivalfight.asm b/audio/music/aftertherivalfight.asm new file mode 100644 index 0000000..6ca23b0 --- /dev/null +++ b/audio/music/aftertherivalfight.asm @@ -0,0 +1,65 @@ +Music_AfterTheRivalFight: + channel_count 4 + channel 1, Music_AfterTheRivalFight_Ch1 + channel 2, Music_AfterTheRivalFight_Ch2 + channel 3, Music_AfterTheRivalFight_Ch3 + channel 4, Music_AfterTheRivalFight_Ch4 + +Music_AfterTheRivalFight_Ch1: + tempo 112 + volume 7, 7 + duty_cycle 0 + pitch_offset 1 + vibrato 8, 1, 4 + stereo_panning TRUE, FALSE + note_type 12, 11, 2 + octave 2 + note G#, 4 + note G#, 4 + volume_envelope 8, 2 + octave 3 + note G#, 2 + note G#, 2 + note G#, 2 + note G#, 2 + sound_loop 0, Music_LookRival_Ch1.mainloop + +Music_AfterTheRivalFight_Ch2: + duty_cycle 1 + vibrato 6, 3, 5 + stereo_panning FALSE, TRUE + note_type 12, 12, 2 + octave 4 + note G#, 4 + note G#, 4 + volume_envelope 10, 2 + note G#, 2 + note G#, 2 + note G#, 2 + note G#, 2 + sound_loop 0, Music_LookRival_Ch2.mainloop + +Music_AfterTheRivalFight_Ch3: + note_type 12, 2, 8 + octave 3 + note D#, 2 + rest 2 + note D#, 2 + rest 2 + note G#, 2 + note F#, 2 + note F_, 2 + note D#, 2 + sound_loop 0, Music_LookRival_Ch3.mainloop + +Music_AfterTheRivalFight_Ch4: + toggle_noise 3 + stereo_panning FALSE, TRUE + drum_speed 12 + drum_note 3, 4 + drum_note 3, 4 + drum_note 4, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + sound_loop 0, Music_LookRival_Ch4.mainloop diff --git a/audio/music/azaleatown.asm b/audio/music/azaleatown.asm new file mode 100644 index 0000000..d895469 --- /dev/null +++ b/audio/music/azaleatown.asm @@ -0,0 +1,654 @@ +Music_AzaleaTown: + channel_count 4 + channel 1, Music_AzaleaTown_Ch1 + channel 2, Music_AzaleaTown_Ch2 + channel 3, Music_AzaleaTown_Ch3 + channel 4, Music_AzaleaTown_Ch4 + +Music_AzaleaTown_Ch1: + tempo 160 + volume 7, 7 + duty_cycle 2 + stereo_panning FALSE, TRUE + note_type 12, 10, 1 + rest 2 +.introloop: + volume_envelope 10, 1 + octave 3 + note F_, 2 + volume_envelope 6, 1 + note F_, 2 + note F_, 2 + volume_envelope 10, 1 + note F_, 2 + volume_envelope 6, 1 + note F_, 2 + note F_, 2 + note F_, 2 + note F_, 2 + sound_loop 2, .introloop +.mainloop: + sound_call .sub1 + stereo_panning TRUE, FALSE + volume_envelope 10, 4 + note G#, 2 + note A#, 1 + rest 3 + octave 4 + note C_, 4 + note_type 6, 10, 4 + note G_, 1 + note G#, 3 + note F#, 4 + note D#, 2 + rest 2 + stereo_panning FALSE, TRUE + sound_call .sub1 + stereo_panning TRUE, FALSE + note_type 6, 10, 4 + note D#, 4 + note C_, 4 + rest 3 + note B_, 1 + octave 4 + note C_, 12 + octave 3 + note A#, 4 + note F#, 4 + stereo_panning FALSE, TRUE + sound_call .sub2 + volume_envelope 10, 3 + note A#, 4 + octave 4 + note C#, 2 + rest 2 + note C_, 2 + rest 2 + volume_envelope 10, 1 + octave 3 + note C#, 4 + note A_, 2 + rest 14 + sound_call .sub2 + volume_envelope 10, 3 + octave 4 + note C_, 1 + note C#, 3 + note F_, 2 + rest 2 + note C#, 2 + rest 2 + volume_envelope 10, 1 + octave 3 + note G_, 4 + note A#, 4 + note G_, 8 + volume_envelope 10, 2 + note A#, 4 + octave 4 + note C#, 4 + octave 3 + note A#, 4 + note F#, 4 + note C#, 8 + note F#, 4 + rest 4 + note A#, 4 + octave 4 + note C#, 4 + octave 3 + note A#, 4 + note G_, 4 + note C#, 4 + rest 4 + note G_, 4 + rest 4 + octave 4 + note C#, 4 + note D#, 4 + note C#, 4 + octave 3 + note G#, 4 + note D#, 4 + note C#, 4 + octave 2 + note G#, 4 + rest 8 + note_type 12, 2, -7 + octave 3 + note G#, 14 + rest 2 + sound_loop 0, .mainloop + +.sub1: + note_type 12, 10, 1 + octave 4 + note F_, 2 + volume_envelope 6, 1 + note F_, 2 + note F_, 2 + volume_envelope 10, 1 + note D#, 2 + volume_envelope 6, 1 + note D#, 2 + note D#, 2 + volume_envelope 10, 1 + note F_, 2 + volume_envelope 6, 1 + note F_, 2 + volume_envelope 10, 1 + note A#, 2 + volume_envelope 6, 1 + note A#, 2 + note A#, 2 + volume_envelope 10, 1 + note G#, 2 + volume_envelope 6, 1 + note G#, 2 + note G#, 2 + volume_envelope 10, 1 + note A_, 2 + volume_envelope 6, 1 + note A_, 2 + volume_envelope 10, 1 + note C_, 2 + volume_envelope 6, 1 + note C_, 2 + note C_, 2 + volume_envelope 10, 1 + note C#, 2 + volume_envelope 6, 1 + note C#, 2 + note C#, 2 + note C#, 2 + note C#, 2 + volume_envelope 10, 1 + note D#, 2 + volume_envelope 6, 1 + note D#, 2 + note D#, 2 + volume_envelope 10, 1 + note C#, 2 + volume_envelope 6, 1 + note C#, 2 + note C#, 2 + note C#, 2 + rest 2 + volume_envelope 10, 1 + octave 3 + note F_, 2 + volume_envelope 6, 1 + note F_, 2 + note F_, 2 + volume_envelope 10, 1 + note F#, 2 + volume_envelope 6, 1 + note F#, 2 + note F#, 2 + note F#, 2 + note F#, 2 + volume_envelope 10, 1 + note F_, 2 + volume_envelope 6, 1 + note F_, 2 + note F_, 2 + volume_envelope 10, 1 + note D#, 2 + volume_envelope 6, 1 + note D#, 2 + note D#, 2 + volume_envelope 10, 1 + note C#, 2 + volume_envelope 6, 1 + note C#, 2 + volume_envelope 10, 1 + note C_, 2 + volume_envelope 6, 1 + note C_, 2 + note C_, 2 + volume_envelope 10, 1 + octave 2 + note A#, 2 + volume_envelope 6, 1 + note A#, 2 + note A#, 2 + volume_envelope 10, 1 + octave 3 + note C#, 2 + volume_envelope 6, 1 + note C#, 2 + sound_ret + +.sub2: + volume_envelope 6, 1 + note G#, 8 + note G#, 8 + volume_envelope 8, 1 + note A_, 8 + volume_envelope 10, 1 + note A_, 8 + sound_ret + +Music_AzaleaTown_Ch2: + vibrato 18, 2, 3 + duty_cycle 2 + stereo_panning TRUE, FALSE + note_type 12, 6, 2 + rest 1 + octave 4 + note D_, 1 + volume_envelope 11, 1 + note D#, 2 + volume_envelope 7, 1 + note D#, 2 + note D#, 2 + volume_envelope 11, 1 + note C#, 2 + volume_envelope 7, 1 + note C#, 2 + note C#, 2 + volume_envelope 5, 1 + note C#, 2 + note C#, 2 + volume_envelope 11, 1 + note C_, 2 + volume_envelope 7, 1 + note C_, 2 + note C_, 2 + volume_envelope 11, 1 + note C#, 2 + volume_envelope 7, 1 + note C#, 2 + note C#, 2 + note_type 6, 11, 4 + note F_, 7 + duty_cycle 1 + octave 5 + note C_, 1 +.mainloop: + sound_call .sub1 + note C#, 4 + note C_, 2 + note C#, 1 + rest 3 + note_type 6, 11, 4 + note D#, 11 + rest 8 + duty_cycle 1 + octave 5 + note C_, 1 + sound_call .sub1 + rest 2 + note C#, 2 + note C_, 2 + octave 3 + note G#, 2 + note_type 6, 11, 4 + rest 3 + octave 4 + note G_, 1 + note G#, 12 + note F#, 4 + note F_, 4 + duty_cycle 0 + note D_, 1 + note D#, 3 + note C#, 4 + note C_, 2 + rest 2 + note G#, 4 + rest 4 + note F#, 4 + rest 4 + note F_, 4 + note D#, 4 + note F_, 2 + rest 2 + note D#, 2 + rest 2 + note C#, 8 + rest 12 + note D_, 1 + note D#, 3 + note C#, 4 + note C_, 2 + rest 2 + note G#, 4 + rest 4 + note A_, 4 + rest 4 + octave 5 + note C_, 4 + octave 4 + note B_, 1 + octave 5 + note C_, 3 + note C#, 2 + rest 2 + note C_, 2 + rest 2 + octave 4 + note F_, 4 + rest 4 + note D#, 4 + rest 4 + note C#, 4 + duty_cycle 2 + note F_, 4 + note D#, 4 + note C#, 4 + note F_, 4 + rest 4 + note D#, 4 + rest 4 + note C#, 4 + note F_, 4 + note D#, 4 + note C#, 4 + note F_, 4 + rest 4 + note A#, 4 + rest 4 + octave 5 + note C_, 4 + note_type 12, 11, 7 + octave 4 + note G#, 12 + note D#, 4 + volume_envelope 1, -7 + note C_, 14 + note_type 6, 11, 4 + duty_cycle 1 + note G#, 2 + octave 5 + note C_, 2 + sound_loop 0, .mainloop + +.sub1: + note C#, 4 + octave 4 + note G#, 2 + rest 2 + octave 5 + note C_, 2 + rest 2 + note C#, 8 + note D#, 8 + note F_, 2 + rest 1 + note G_, 1 + note G#, 12 + note F_, 2 + rest 6 + note D#, 8 + note F_, 2 + rest 1 + note C_, 1 + note_type 12, 10, 8 + vibrato 0, 0, 0 + note C#, 8 + volume_envelope 10, 7 + vibrato 18, 2, 3 + note C#, 16 + rest 4 + volume_envelope 11, 4 + duty_cycle 2 + octave 3 + note A#, 2 + octave 4 + note C#, 1 + rest 1 + note F#, 8 + rest 2 + note F#, 2 + note F_, 2 + note D#, 1 + rest 1 + note C#, 6 + note C_, 2 + rest 2 + note C_, 4 + note C#, 1 + note_type 6, 11, 4 + rest 1 + note D_, 1 + note_type 12, 11, 7 + note D#, 12 + volume_envelope 11, 4 + sound_ret + +Music_AzaleaTown_Ch3: + stereo_panning TRUE, TRUE + vibrato 6, 2, 6 + note_type 12, 2, 5 + octave 2 + note G#, 1 + octave 3 + note C_, 1 + note C#, 1 + rest 5 + note C#, 1 + rest 3 + note C#, 1 + rest 1 + octave 2 + note G#, 4 + octave 3 + note C#, 1 + rest 5 + note C#, 1 + rest 3 + note C#, 1 + rest 1 + note G#, 4 +.mainloop: + sound_call .sub1 + note G#, 4 + note D#, 2 + sound_call .sub1 + note G#, 2 + rest 2 + note F#, 2 + sound_call .sub2 + note A#, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + note F_, 2 + octave 3 + note A_, 4 + octave 4 + note C#, 1 + rest 3 + note F_, 1 + rest 1 + sound_call .sub2 + octave 2 + note A#, 2 + octave 3 + note F_, 1 + rest 1 + note A#, 1 + rest 1 + note D#, 2 + octave 2 + note A#, 2 + octave 3 + note D#, 1 + rest 3 + note G_, 2 + octave 2 + note F#, 1 + rest 5 + note F#, 1 + note F#, 1 + note F#, 1 + rest 1 + octave 3 + note C#, 2 + rest 2 + octave 2 + note F_, 1 + note F#, 1 + note G_, 1 + rest 5 + note G_, 1 + note G_, 1 + note G_, 1 + rest 1 + octave 3 + note C#, 2 + rest 2 + octave 2 + note F#, 1 + note G_, 1 + note G#, 1 + rest 5 + note G#, 1 + note G#, 1 + note G#, 1 + rest 1 + octave 3 + note D#, 2 + rest 2 + octave 2 + note F#, 1 + note G_, 1 + note G#, 1 + rest 5 + note G#, 1 + note G#, 1 + note G#, 1 + rest 1 + octave 3 + note D#, 2 + rest 2 + octave 2 + note B_, 1 + octave 3 + note C_, 1 + sound_loop 0, .mainloop + +.sub1: + note C#, 1 + rest 5 + note C#, 1 + rest 3 + note C#, 1 + rest 1 + octave 2 + note G#, 4 + octave 3 + note F_, 1 + rest 5 + note F_, 1 + rest 1 + note C_, 1 + rest 1 + note F_, 4 + note A_, 2 + volume_envelope 1, 5 + note A#, 1 + rest 1 + volume_envelope 2, 5 + octave 4 + note C#, 1 + rest 1 + note F_, 1 + rest 1 + octave 3 + note A_, 4 + octave 4 + note C#, 1 + rest 1 + note F_, 1 + rest 1 + octave 3 + note G#, 4 + note A#, 1 + rest 1 + note G#, 1 + rest 1 + note G_, 6 + rest 4 + note F#, 1 + rest 5 + note F#, 1 + rest 3 + note F#, 1 + rest 1 + note C#, 4 + note G_, 1 + rest 5 + note G_, 1 + rest 3 + note C#, 4 + note G_, 1 + rest 1 + note G#, 1 + rest 5 + note G#, 1 + rest 1 + note D#, 1 + rest 1 + note C#, 4 + note G#, 1 + rest 1 + note G#, 1 + rest 5 + note G#, 1 + rest 1 + note C_, 1 + rest 1 + sound_ret + +.sub2: + volume_envelope 3, 5 + octave 3 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + volume_envelope 2, 5 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + sound_ret + +Music_AzaleaTown_Ch4: + toggle_noise 3 + drum_speed 12 + drum_note 6, 2 +.mainloop: + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 4, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 4, 2 + drum_note 3, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 4, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 4, 2 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 0, .mainloop diff --git a/audio/music/battletowerlobby.asm b/audio/music/battletowerlobby.asm new file mode 100644 index 0000000..50e127f --- /dev/null +++ b/audio/music/battletowerlobby.asm @@ -0,0 +1,309 @@ +Music_BattleTowerLobby: + channel_count 4 + channel 1, Music_BattleTowerLobby_Ch1 + channel 2, Music_BattleTowerLobby_Ch2 + channel 3, Music_BattleTowerLobby_Ch3 + channel 4, Music_BattleTowerLobby_Ch4 + +Music_BattleTowerLobby_Ch1: + tempo 152 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 + vibrato 8, 2, 2 + stereo_panning TRUE, FALSE + note_type 12, 7, 2 +.mainloop: + note_type 12, 7, 2 + octave 3 + note G#, 2 + note_type 12, 7, 3 + octave 2 + note B_, 2 + octave 3 + note E_, 2 + note G#, 2 + note E_, 2 + octave 2 + note B_, 2 + octave 3 + note E_, 2 + note G#, 2 + note_type 12, 7, 2 + note F#, 2 + note_type 12, 7, 3 + octave 2 + note B_, 2 + octave 3 + note F#, 2 + note E_, 2 + note D#, 2 + octave 2 + note B_, 2 + octave 3 + note D#, 2 + note F#, 2 + note_type 12, 7, 2 + note G#, 2 + note_type 12, 7, 3 + octave 2 + note B_, 2 + octave 3 + note E_, 2 + note G#, 2 + octave 2 + note B_, 2 + octave 3 + note E_, 2 + note B_, 2 + octave 4 + note E_, 2 + note_type 12, 7, 2 + note F#, 3 + note_type 12, 7, 3 + note D_, 1 + note E_, 2 + octave 3 + note B_, 2 + note G#, 2 + note E_, 2 + note G#, 2 + note B_, 2 + note_type 12, 7, 2 + note C#, 2 + note_type 12, 7, 3 + note D#, 2 + note E_, 2 + note C#, 1 + octave 2 + note B_, 1 + note A_, 4 + note_type 12, 6, 2 + note A_, 4 + note_type 12, 7, 2 + note B_, 2 + note_type 12, 7, 3 + octave 3 + note C#, 2 + note D#, 2 + note E_, 1 + note F#, 1 + note G#, 4 + note_type 12, 6, 2 + octave 2 + note G#, 4 + note_type 12, 7, 2 + note A_, 2 + note_type 12, 7, 3 + note B_, 2 + octave 3 + note C#, 2 + note D_, 1 + note E_, 1 + note D_, 2 + note E_, 2 + note F#, 2 + note A_, 2 + note_type 12, 7, 2 + note B_, 2 + note_type 12, 7, 3 + note B_, 4 + note A_, 1 + note G#, 1 + note_type 12, 7, 2 + note F#, 4 + note_type 12, 7, 5 + octave 2 + note B_, 4 + sound_loop 0, .mainloop + +Music_BattleTowerLobby_Ch2: + duty_cycle 2 + vibrato 16, 3, 4 + stereo_panning FALSE, TRUE + note_type 12, 8, 2 +.mainloop: + note_type 12, 8, 2 + octave 4 + note E_, 2 + note E_, 4 + octave 3 + note B_, 1 + octave 4 + note E_, 1 + note B_, 4 + note A_, 2 + note G#, 2 + note A_, 3 + note E_, 1 + octave 3 + note B_, 4 + note_type 12, 6, 5 + note F#, 4 + octave 2 + note B_, 4 + note_type 12, 8, 2 + octave 4 + note E_, 2 + note E_, 4 + octave 3 + note B_, 1 + octave 4 + note E_, 1 + note B_, 4 + note A_, 2 + note G#, 2 + note A_, 3 + note F#, 1 + note_type 12, 8, 7 + note G#, 12 + note_type 12, 8, 2 + octave 3 + note A_, 2 + note_type 12, 8, 4 + note A_, 4 + note F#, 1 + note G#, 1 + note A_, 4 + note_type 12, 8, 2 + note C#, 4 + octave 4 + note G#, 2 + note_type 12, 8, 4 + note G#, 4 + note F#, 1 + note G#, 1 + note E_, 4 + note_type 12, 8, 2 + octave 3 + note E_, 4 + octave 4 + note F#, 2 + note_type 12, 8, 4 + note F#, 4 + note A_, 1 + note G#, 1 + note A_, 4 + note D_, 4 + note_type 12, 8, 2 + note E_, 2 + note_type 12, 8, 4 + note E_, 4 + note F#, 1 + note E_, 1 + note D#, 4 + note_type 12, 7, 3 + octave 3 + note D#, 1 + note F#, 1 + note B_, 1 + octave 4 + note D#, 1 + sound_loop 0, .mainloop + +Music_BattleTowerLobby_Ch3: + note_type 12, 1, 1 +.mainloop: + octave 2 + note B_, 2 + octave 3 + note E_, 2 + rest 2 + note E_, 2 + rest 2 + note E_, 2 + rest 2 + note E_, 2 + octave 2 + note B_, 2 + octave 3 + note E_, 2 + rest 2 + note E_, 2 + rest 2 + note D#, 2 + rest 2 + note D#, 2 + octave 2 + note B_, 2 + octave 3 + note E_, 2 + rest 2 + note E_, 2 + rest 2 + note E_, 2 + rest 2 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + rest 2 + octave 2 + note A_, 2 + note B_, 2 + octave 3 + note E_, 2 + rest 2 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note C#, 2 + octave 2 + note E_, 2 + octave 3 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note C#, 2 + note E_, 2 + rest 2 + octave 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note E_, 2 + octave 3 + note E_, 2 + octave 2 + note G#, 2 + note B_, 2 + octave 3 + note E_, 2 + rest 2 + note D_, 2 + octave 2 + note F#, 2 + note A_, 2 + octave 3 + note F#, 2 + octave 2 + note F#, 2 + note A_, 2 + octave 3 + note D_, 2 + note F#, 2 + note E_, 2 + octave 2 + note B_, 2 + note E_, 2 + note B_, 2 + note F#, 2 + note E_, 2 + note D#, 2 + note F#, 2 + sound_loop 0, .mainloop + +Music_BattleTowerLobby_Ch4: + toggle_noise 0 +.mainloop: + drum_speed 12 + rest 2 + drum_note 6, 4 + drum_note 6, 4 + drum_note 6, 2 + drum_note 6, 4 + sound_loop 0, .mainloop diff --git a/audio/music/battletowertheme.asm b/audio/music/battletowertheme.asm new file mode 100644 index 0000000..4aa2620 --- /dev/null +++ b/audio/music/battletowertheme.asm @@ -0,0 +1,686 @@ +Music_BattleTowerTheme: + channel_count 4 + channel 1, Music_BattleTowerTheme_Ch1 + channel 2, Music_BattleTowerTheme_Ch2 + channel 3, Music_BattleTowerTheme_Ch3 + channel 4, Music_BattleTowerTheme_Ch4 + +Music_BattleTowerTheme_Ch1: + tempo 141 + volume 7, 7 + pitch_offset 1 + vibrato 18, 3, 4 + stereo_panning FALSE, TRUE + note_type 6, 9, 4 +.mainloop: + rest 16 + rest 16 + rest 12 + rest 12 + duty_cycle 2 + octave 3 + note C_, 2 + note E_, 2 + note G_, 4 + sound_call .sub1 + note G_, 2 + rest 2 + note C_, 4 + rest 4 + volume_envelope 9, 2 + note G_, 2 + note F_, 2 + note C_, 2 + note E_, 2 + note G_, 2 + octave 4 + note E_, 2 + note G_, 2 + note E_, 2 + octave 3 + note G_, 2 + note E_, 2 + sound_call .sub1 + note G_, 2 + rest 2 + octave 2 + note A#, 4 + rest 4 + volume_envelope 9, 2 + octave 3 + note G_, 2 + note D#, 2 + note C_, 2 + note F_, 2 + note A_, 2 + octave 4 + note C_, 2 + note F_, 2 + note C_, 2 + octave 3 + note A_, 2 + note F_, 2 + volume_envelope 9, 3 + note D_, 2 + rest 2 + note E_, 4 + note F_, 4 + note G_, 2 + note A_, 2 + note A#, 8 + octave 2 + note A#, 8 + octave 3 + note C_, 2 + rest 2 + note D_, 4 + note E_, 4 + note F_, 2 + note G_, 2 + note A_, 8 + octave 2 + note A_, 8 + note A#, 2 + rest 2 + octave 3 + note C_, 4 + note D_, 4 + note D#, 2 + note F_, 2 + note D#, 4 + note F_, 4 + note G_, 4 + note A#, 4 + octave 4 + note C_, 2 + rest 2 + octave 3 + note F_, 4 + rest 4 + octave 2 + note A_, 2 + octave 3 + note C_, 2 + note E_, 4 + rest 4 + duty_cycle 3 + note C_, 2 + note E_, 2 + note G_, 4 + note A_, 4 + note F_, 8 + note F_, 2 + note G_, 2 + note A_, 8 + note G_, 4 + note F_, 4 + note D_, 8 + note A#, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + note A_, 2 + note A#, 2 + octave 4 + note C_, 2 + note D_, 2 + note C_, 2 + note D_, 2 + note D#, 2 + note F_, 4 + octave 3 + note F_, 8 + note C#, 2 + note D#, 2 + note F_, 8 + note G_, 4 + note F_, 4 + note F_, 4 + note C_, 8 + note G_, 2 + note F_, 2 + note E_, 8 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note G_, 2 + note E_, 2 + note C_, 4 + note F_, 8 + note C_, 2 + note F_, 2 + note A_, 8 + note A#, 4 + octave 4 + note C_, 4 + octave 3 + note A#, 4 + note F_, 8 + note A#, 4 + octave 4 + note D_, 8 + octave 3 + note A#, 2 + note A_, 2 + note F_, 4 + note G#, 4 + note F_, 8 + note G#, 4 + note F_, 4 + note D#, 4 + note C#, 4 + note F_, 4 + volume_envelope 9, 4 + octave 4 + note C_, 4 + octave 3 + note E_, 6 + rest 2 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note E_, 4 + rest 12 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 9, 4 + note A_, 2 + rest 2 + note C_, 4 + rest 4 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note C_, 4 + note F_, 4 + rest 4 + note A_, 4 + sound_ret + +Music_BattleTowerTheme_Ch2: + vibrato 18, 3, 4 +.mainloop: + duty_cycle 3 + note_type 6, 11, 8 + octave 3 + note F_, 2 + rest 2 + octave 2 + note A_, 4 + rest 4 + octave 3 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + octave 2 + note A_, 4 + octave 3 + note F_, 4 + rest 4 + octave 2 + note A_, 2 + rest 2 + octave 3 + note F_, 2 + rest 2 + octave 2 + note A_, 4 + rest 4 + pitch_offset 1 + note A_, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + note F_, 4 + rest 4 + pitch_offset 0 + volume_envelope 11, 7 + note G_, 2 + octave 4 + note C_, 2 + note E_, 4 + sound_call .sub1 + note A#, 4 + rest 2 + note F_, 2 + note_type 12, 11, 7 + note C_, 12 + note_type 6, 11, 7 + sound_call .sub1 + note_type 12, 11, 7 + note A#, 2 + rest 1 + note G_, 1 + note A_, 12 + note A#, 1 + rest 1 + note A#, 4 + note G_, 1 + note A_, 1 + note A#, 4 + note D_, 4 + note A_, 1 + rest 1 + note A_, 4 + note G_, 1 + note A_, 1 + note F_, 8 + note G_, 1 + rest 1 + note G_, 4 + note A#, 1 + note A_, 1 + note A#, 4 + note D#, 4 + note F_, 1 + rest 1 + note F_, 4 + note G_, 1 + note F_, 1 + note E_, 8 + stereo_panning TRUE, FALSE + duty_cycle 2 + note F_, 6 + note A_, 1 + note A#, 1 + octave 5 + note C_, 4 + octave 4 + note A#, 2 + note A_, 2 + note A#, 16 + note A#, 6 + note G_, 1 + note A_, 1 + note A#, 4 + octave 5 + note C_, 2 + octave 4 + note A#, 2 + note A_, 6 + note A#, 1 + note A_, 1 + note G_, 8 + note A_, 6 + note F_, 1 + note A_, 1 + octave 5 + note C_, 4 + note D_, 2 + note D#, 2 + note D_, 6 + note C_, 2 + octave 4 + note A#, 8 + octave 5 + note C#, 6 + note C_, 2 + octave 4 + note A#, 2 + note G#, 2 + note F_, 2 + note G#, 2 + note G_, 5 + rest 1 + note_type 6, 11, 7 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 4 + rest 4 + stereo_panning TRUE, TRUE + duty_cycle 3 + octave 3 + note C_, 2 + note D_, 2 + note E_, 4 + sound_loop 0, .mainloop + +.sub1: + note F_, 2 + rest 2 + note F_, 8 + note C_, 2 + note F_, 2 + octave 5 + note C_, 8 + octave 4 + note A#, 4 + note A_, 4 + sound_ret + +Music_BattleTowerTheme_Ch3: + vibrato 18, 3, 4 + note_type 6, 1, 6 +.mainloop: + stereo_panning TRUE, TRUE + sound_call .sub1 + note C_, 2 + rest 2 + note F_, 4 + rest 4 + octave 2 + note A_, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + note F_, 4 + rest 4 + stereo_panning TRUE, FALSE + note C_, 8 + sound_call .sub1 + note C_, 2 + rest 2 + note F_, 4 + rest 4 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note E_, 4 + note C_, 4 + rest 4 + note C_, 2 + rest 2 + sound_call .sub1 + octave 2 + note A#, 2 + rest 2 + octave 3 + note D#, 4 + rest 4 + octave 2 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + octave 3 + note C_, 4 + note F_, 4 + rest 4 + note C_, 1 + rest 1 + note C_, 2 + octave 2 + note A#, 2 + rest 2 + note A#, 4 + note F_, 4 + octave 3 + note F_, 1 + rest 1 + note F_, 2 + octave 2 + note A#, 2 + rest 2 + octave 3 + note D_, 2 + rest 2 + note F_, 8 + note C_, 2 + rest 2 + note C_, 4 + octave 2 + note F_, 4 + octave 3 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + octave 2 + note A_, 2 + rest 2 + octave 3 + note C_, 2 + rest 2 + note F_, 8 + note D#, 2 + rest 2 + note D#, 4 + octave 2 + note G_, 4 + octave 3 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + octave 2 + note G_, 2 + rest 2 + note A#, 2 + rest 2 + octave 3 + note D#, 8 + note F_, 2 + rest 2 + note C_, 4 + rest 4 + note C_, 2 + octave 2 + note F_, 2 + note G_, 4 + rest 4 + stereo_panning TRUE, TRUE + note G_, 2 + octave 3 + note C_, 2 + note E_, 4 + note F_, 4 + note C_, 8 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note A_, 4 + note C_, 6 + rest 2 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note F_, 4 + note D_, 8 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note A#, 4 + note A_, 4 + note F_, 4 + note D_, 4 + note F_, 4 + note C#, 8 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note A#, 4 + note F_, 8 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + note C_, 4 + note F_, 8 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note G_, 4 + note C_, 4 + note D_, 4 + note E_, 4 + note F_, 4 + note C_, 8 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note A_, 4 + note C_, 8 + note F_, 2 + rest 2 + note F_, 4 + octave 2 + note A#, 8 + octave 3 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note A#, 4 + octave 2 + note A#, 4 + octave 3 + note D_, 4 + note E_, 4 + note F_, 4 + octave 2 + note G#, 8 + octave 3 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + note G#, 4 + octave 2 + note G#, 8 + octave 3 + note C#, 4 + note C_, 4 + note G_, 8 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note G_, 4 + rest 12 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note C_, 2 + rest 2 + note F_, 4 + rest 4 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note F_, 4 + note C_, 4 + rest 4 + note C_, 2 + rest 2 + sound_ret + +Music_BattleTowerTheme_Ch4: + toggle_noise 3 + drum_speed 12 +.mainloop: + sound_call .sub1 + drum_note 3, 2 + drum_note 3, 4 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 4 + drum_note 3, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 2, 1 +.loop1: + sound_call .sub1 + sound_call .sub2 + sound_loop 2, .loop1 + sound_call .sub3 + sound_call .sub2 + sound_call .sub3 + drum_note 3, 2 + drum_note 3, 4 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 8 +.loop2: + sound_call .sub4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 2, 1 + sound_loop 3, .loop2 + sound_call .sub4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 4 + drum_note 3, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 2, 1 + sound_loop 0, .mainloop + +.sub1: + drum_note 3, 2 + drum_note 3, 4 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 4 + drum_note 3, 1 + drum_note 3, 1 + sound_ret + +.sub2: + drum_note 3, 2 + drum_note 3, 4 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 2, 1 + sound_ret + +.sub3: + drum_note 3, 2 + drum_note 3, 4 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + sound_ret + +.sub4: + drum_note 3, 2 + drum_note 2, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 2, 1 + drum_note 3, 2 + drum_note 2, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 2, 1 + sound_ret diff --git a/audio/music/bicycle.asm b/audio/music/bicycle.asm new file mode 100644 index 0000000..0cf69d0 --- /dev/null +++ b/audio/music/bicycle.asm @@ -0,0 +1,515 @@ +Music_Bicycle: + channel_count 4 + channel 1, Music_Bicycle_Ch1 + channel 2, Music_Bicycle_Ch2 + channel 3, Music_Bicycle_Ch3 + channel 4, Music_Bicycle_Ch4 + +Music_Bicycle_Ch1: + tempo 140 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 + stereo_panning FALSE, TRUE + vibrato 8, 1, 5 + note_type 12, 11, 4 + octave 3 + note B_, 6 + note A_, 6 + note G_, 4 + volume_envelope 11, 0 + note A_, 6 + volume_envelope 11, 6 + note A_, 8 + volume_envelope 11, 2 + note F#, 2 +.mainloop: + stereo_panning FALSE, TRUE + volume_envelope 11, 2 + note G_, 2 + note G_, 2 + note E_, 2 + note E_, 2 + note F#, 1 + note E_, 1 + note D#, 2 + note D_, 2 + note D_, 2 + note E_, 2 + note E_, 2 + note C_, 2 + note C_, 2 + octave 2 + note B_, 2 + note G_, 2 + note A_, 2 + note B_, 2 + octave 3 + note C_, 2 + note C_, 2 + note E_, 2 + note E_, 2 + note C#, 2 + note E_, 2 + note F#, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note D_, 2 + note C#, 2 + note D_, 2 + note D_, 2 + note C#, 2 + note D_, 2 + note G_, 2 + note G_, 2 + note E_, 2 + note E_, 2 + note F#, 1 + note E_, 1 + note D#, 2 + note D_, 2 + note D_, 2 + note E_, 2 + note E_, 2 + note C_, 2 + note C_, 2 + octave 2 + note B_, 2 + note B_, 2 + note A#, 2 + note B_, 2 + octave 3 + note C_, 2 + octave 2 + note B_, 2 + octave 3 + note C_, 2 + note E_, 2 + note C_, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note F#, 2 + volume_envelope 8, 2 + note F#, 2 + volume_envelope 11, 2 + note A_, 2 + note G_, 2 + note F#, 2 + note G_, 2 + note G#, 2 + note A_, 2 + stereo_panning TRUE, FALSE + volume_envelope 11, 6 + note B_, 4 + note G_, 4 + octave 4 + note D_, 4 + octave 3 + note G_, 4 + note A_, 4 + note F#, 4 + octave 4 + note D_, 4 + octave 3 + note F#, 4 + note G_, 4 + note E_, 4 + octave 4 + note C_, 4 + octave 3 + note E_, 4 + note F#, 4 + note D_, 2 + note F#, 2 + note G_, 2 + note G#, 2 + note A_, 4 + octave 4 + note D_, 2 + octave 3 + note B_, 2 + note G_, 2 + note B_, 2 + octave 4 + note D_, 2 + note G_, 2 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note C_, 2 + octave 3 + note A_, 2 + note F#, 2 + note A_, 2 + octave 4 + note C_, 2 + note F#, 2 + note C_, 2 + octave 3 + note A_, 2 + note G_, 2 + note E_, 2 + note C_, 2 + note E_, 2 + note G_, 2 + note G#, 2 + note A_, 2 + note B_, 2 + octave 4 + note C_, 2 + note C_, 2 + octave 3 + note A_, 2 + note G_, 2 + note F#, 2 + note G_, 2 + note G#, 2 + note A_, 2 + sound_loop 0, .mainloop + +Music_Bicycle_Ch2: + duty_cycle 2 + vibrato 16, 2, 4 + stereo_panning TRUE, FALSE + note_type 12, 12, 6 + octave 4 + note D_, 6 + note C_, 6 + octave 3 + note B_, 4 + volume_envelope 12, 2 + octave 4 + note D_, 2 + note D_, 1 + note E_, 1 + note D_, 2 + note D_, 1 + note E_, 1 + note D_, 2 + volume_envelope 12, 3 + note C_, 2 + octave 3 + note B_, 2 + note A_, 2 +.mainloop: + stereo_panning TRUE, TRUE + duty_cycle 2 + volume_envelope 12, 3 + octave 3 + note B_, 4 + note G_, 4 + note A_, 4 + note F#, 4 + volume_envelope 12, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note F#, 2 + volume_envelope 12, 5 + note D_, 8 + volume_envelope 12, 4 + note E_, 4 + note G_, 4 + volume_envelope 12, 2 + note E_, 2 + note B_, 2 + note A_, 2 + note G_, 2 + note F#, 2 + note G_, 2 + note A_, 2 + note G_, 2 + volume_envelope 12, 5 + note F#, 8 + volume_envelope 12, 3 + note B_, 4 + note G_, 4 + note A_, 4 + note F#, 4 + volume_envelope 12, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note F#, 2 + volume_envelope 12, 5 + note D_, 8 + volume_envelope 12, 4 + note E_, 4 + note G_, 4 + volume_envelope 12, 2 + note E_, 2 + octave 4 + note E_, 2 + note D_, 2 + note C_, 2 + octave 3 + note B_, 2 + octave 4 + note C_, 2 + note D_, 2 + note E_, 2 + volume_envelope 12, 7 + note F#, 8 + stereo_panning FALSE, TRUE + sound_call .sub1 + note F#, 4 + volume_envelope 12, 3 + note A_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note F#, 4 + volume_envelope 12, 7 + sound_call .sub1 + note F#, 4 + volume_envelope 12, 3 + note A_, 2 + note B_, 2 + note A_, 2 + note G_, 2 + note F#, 4 + sound_loop 0, .mainloop + +.sub1: + note G_, 6 + note B_, 6 + note G_, 4 + note F#, 6 + note A_, 6 + note F#, 4 + note E_, 6 + note G_, 6 + note E_, 4 + sound_ret + +Music_Bicycle_Ch3: + note_type 12, 1, 4 + rest 16 + octave 3 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + octave 4 + note D_, 2 + note C_, 2 + note E_, 2 + note D_, 2 + octave 3 + note A_, 1 + rest 1 +.mainloop: + sound_call .sub1 + note E_, 1 + rest 1 + note G_, 1 + rest 1 + note E_, 1 + rest 1 + note G_, 1 + rest 1 + note D_, 1 + rest 1 + octave 2 + note B_, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + note D_, 1 + rest 1 + note E_, 1 + rest 1 + note G_, 1 + rest 1 + note C_, 1 + rest 1 + note G_, 1 + rest 1 + note E_, 1 + rest 1 + note G_, 1 + rest 1 + note C_, 1 + rest 1 + note G_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + note F#, 1 + rest 1 + note D_, 1 + rest 1 + note E_, 1 + rest 1 + note F#, 1 + rest 1 + sound_call .sub1 + note E_, 1 + rest 1 + note G_, 1 + rest 1 + note E_, 1 + rest 1 + note G_, 1 + rest 1 + note D_, 1 + rest 1 + note G_, 1 + rest 1 + note F#, 1 + rest 1 + note F_, 1 + rest 1 + note E_, 1 + rest 1 + note G_, 1 + rest 1 + note C_, 1 + rest 1 + note G_, 1 + rest 1 + note E_, 1 + rest 1 + note G_, 1 + rest 1 + note C_, 1 + rest 1 + note G_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + note C_, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + note A_, 1 + rest 1 +.loop1: + note G_, 1 + rest 1 + note B_, 1 + rest 1 + note D_, 1 + rest 1 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + note D_, 1 + rest 1 + note B_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + note E_, 1 + rest 1 + note G_, 1 + rest 1 + note C_, 1 + rest 1 + note G_, 1 + rest 1 + note E_, 1 + rest 1 + note G_, 1 + rest 1 + note C_, 1 + rest 1 + note G_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + note F#, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + note A_, 1 + rest 1 + sound_loop 2, .loop1 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + note D_, 1 + rest 1 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + note D_, 1 + rest 1 + note B_, 1 + rest 1 + sound_ret + +Music_Bicycle_Ch4: + toggle_noise 0 + drum_speed 12 + rest 16 + rest 16 +.mainloop: + rest 2 +.loop1: + stereo_panning TRUE, FALSE + drum_note 6, 4 + sound_loop 12, .loop1 + drum_note 6, 4 + drum_note 6, 4 + stereo_panning TRUE, TRUE + drum_note 6, 2 + drum_note 6, 2 + drum_note 6, 2 + sound_loop 0, .mainloop diff --git a/audio/music/buenaspassword.asm b/audio/music/buenaspassword.asm new file mode 100644 index 0000000..b5bc7de --- /dev/null +++ b/audio/music/buenaspassword.asm @@ -0,0 +1,634 @@ +Music_BuenasPassword: + channel_count 4 + channel 1, Music_BuenasPassword_Ch1 + channel 2, Music_BuenasPassword_Ch2 + channel 3, Music_BuenasPassword_Ch3 + channel 4, Music_BuenasPassword_Ch4 + +Music_BuenasPassword_Ch1: + tempo 136 + volume 7, 7 + pitch_offset 1 + note_type 12, 11, 3 + rest 8 +.mainloop: + stereo_panning TRUE, TRUE + rest 16 + rest 16 + duty_cycle 3 + note_type 6, 9, 7 + stereo_panning FALSE, TRUE + octave 4 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note F#, 2 + note G#, 2 + rest 10 + rest 10 + stereo_panning TRUE, FALSE + note C#, 2 + note F_, 2 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note F#, 2 + note G#, 2 + rest 12 + duty_cycle 2 + sound_call .sub1 + stereo_panning TRUE, TRUE + sound_call Music_BuenasPassword_Ch2.sub3 + sound_call .sub2 + sound_call .sub1 + stereo_panning TRUE, TRUE + sound_call Music_BuenasPassword_Ch2.sub3 + sound_call .sub2 + sound_call .sub1 + duty_cycle 1 + note C#, 2 + rest 2 + note D#, 2 + rest 2 + note F#, 2 + rest 1 + note G#, 2 + rest 1 + note A#, 2 + note B_, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + note D#, 1 + rest 1 + octave 3 + note B_, 2 + rest 2 + note B_, 2 + note G#, 2 + note B_, 2 + note A#, 2 + note G#, 2 + note G_, 1 + note D#, 3 + note C#, 2 + octave 2 + note B_, 2 + note A#, 1 + note G#, 3 + note A#, 2 + note G_, 2 + note A#, 1 + octave 3 + note C#, 3 + note D#, 2 + note C#, 2 + note D#, 1 + note G_, 3 + note B_, 2 + rest 2 + note A#, 2 + rest 2 + note G#, 2 + rest 1 + note F#, 2 + rest 1 + note D#, 2 + note C#, 1 + rest 1 + note D#, 1 + rest 1 + note F_, 1 + rest 1 + note C#, 2 + rest 2 + note G#, 2 + octave 4 + note C#, 2 + note F_, 2 + note G#, 1 + rest 1 + note D#, 1 + rest 1 + note G#, 1 + note F#, 3 + note F_, 1 + rest 1 + note D#, 1 + rest 1 + octave 3 + note B_, 1 + note G#, 3 + note F#, 1 + rest 1 + note D#, 1 + rest 1 + note G#, 1 + note D#, 2 + note F#, 1 + note G#, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 1 + rest 1 + note G_, 1 + rest 1 + sound_loop 0, .mainloop + +.sub1: + stereo_panning FALSE, TRUE + note_type 6, 8, 4 + octave 4 + note D#, 2 + volume_envelope 7, 1 + note C#, 1 + note C_, 1 + volume_envelope 5, 1 + octave 3 + note A#, 1 + note G#, 1 + volume_envelope 3, 1 + note G_, 1 + note F_, 1 + volume_envelope 1, 1 + note D#, 1 + note C#, 1 + note C_, 1 + rest 1 + note_type 12, 8, 4 + sound_ret + +.sub2: + octave 3 + note D#, 1 + rest 1 + octave 2 + note G#, 1 + rest 1 + octave 3 + note D#, 1 + octave 2 + note G#, 1 + rest 1 + octave 3 + note D#, 1 + rest 2 + sound_ret + +Music_BuenasPassword_Ch2: + vibrato 18, 3, 4 + duty_cycle 2 + note_type 12, 10, 5 + rest 7 + octave 3 + note F#, 1 +.mainloop: + stereo_panning TRUE, TRUE + sound_call .sub3 + sound_call .sub1 + stereo_panning TRUE, TRUE + sound_call .sub2 + octave 3 + note B_, 2 + note A#, 2 + note B_, 2 + note G#, 16 + sound_call .sub1 + stereo_panning TRUE, TRUE + sound_call .sub2 + note B_, 2 + note A#, 2 + note B_, 2 + note G#, 16 + sound_call .sub1 + note F#, 2 + rest 2 + note G#, 2 + rest 2 + note A#, 2 + rest 1 + note B_, 2 + rest 1 + octave 4 + note C#, 2 + note D#, 1 + rest 1 + note F_, 1 + rest 1 + note F#, 1 + rest 1 + note D#, 2 + rest 2 + note G#, 2 + note F#, 2 + note G#, 2 + note D#, 14 + note C#, 1 + note D#, 1 + note C#, 6 + octave 3 + note B_, 1 + octave 4 + note C#, 1 + note D#, 8 + note F#, 2 + rest 2 + note F_, 2 + rest 2 + note D#, 2 + rest 1 + note C#, 2 + rest 1 + octave 3 + note B_, 2 + note G#, 1 + rest 1 + note A#, 1 + rest 1 + note B_, 1 + rest 1 + note G#, 2 + rest 2 + octave 4 + note C#, 2 + note F_, 2 + note G#, 2 + note B_, 14 + note A#, 1 + note B_, 1 + note G#, 10 + volume_envelope 8, 4 + octave 2 + note D#, 1 + rest 1 + note F#, 1 + rest 1 + note G_, 1 + rest 1 + volume_envelope 10, 5 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note G#, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 1 + note D#, 1 + rest 1 + note F#, 1 + rest 2 + stereo_panning TRUE, FALSE + octave 4 + note G#, 1 + note_type 6, 8, 1 + note G_, 1 + note F_, 1 + volume_envelope 7, 1 + note D#, 1 + note C#, 1 + volume_envelope 6, 1 + note C_, 1 + octave 3 + note A#, 1 + volume_envelope 4, 1 + note G#, 1 + volume_envelope 2, 1 + note G_, 1 + note F_, 1 + rest 1 + note_type 12, 10, 5 + sound_ret + +.sub2: + octave 4 + note G#, 2 + rest 2 + note F#, 2 + rest 2 + note F_, 2 + rest 1 + note D#, 2 + rest 1 + note C#, 2 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note C#, 1 + rest 1 + note D#, 2 + rest 2 + sound_ret + +.sub3: + octave 3 + note G#, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 1 + note D#, 1 + rest 1 + note F#, 1 + note F_, 1 + rest 1 + note C#, 1 + rest 1 + octave 2 + note B_, 1 + note G#, 3 + octave 3 + note G#, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 1 + note D#, 1 + rest 1 + note F#, 1 + note F_, 1 + rest 1 + note C#, 1 + rest 1 + octave 2 + note B_, 1 + note G#, 2 + octave 3 + note F#, 1 + note G#, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 1 + note D#, 1 + rest 1 + note F#, 1 + note F_, 1 + rest 1 + note C#, 1 + rest 1 + octave 2 + note B_, 1 + note G#, 3 + sound_ret + +Music_BuenasPassword_Ch3: + note_type 12, 1, 4 + rest 8 +.mainloop: +.loop1: + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + octave 2 + note G#, 1 + rest 1 + octave 3 + note F#, 1 + rest 1 + octave 2 + note G#, 1 + octave 3 + note D#, 2 + octave 2 + note G#, 1 + rest 2 + note B_, 1 + rest 1 + note G#, 4 + sound_loop 3, .loop1 + note F#, 1 + rest 1 + note A#, 1 + rest 1 + octave 3 + note C#, 1 + octave 2 + note F#, 1 + rest 1 + octave 3 + note C#, 1 + octave 2 + note F#, 1 + rest 1 + note A#, 2 + octave 3 + note C#, 1 + rest 1 + octave 2 + note F#, 2 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note B_, 1 + note G#, 1 + rest 1 + octave 3 + note D#, 1 + octave 2 + note G#, 1 + rest 1 + octave 3 + note G#, 2 + octave 2 + note G#, 1 + rest 1 + octave 3 + note D#, 2 + octave 2 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note G#, 1 + note D#, 1 + rest 1 + note A#, 1 + note D#, 1 + rest 1 + note G#, 2 + note A#, 1 + rest 1 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note G_, 1 + note D#, 1 + rest 1 + note A#, 1 + note D#, 1 + rest 1 + octave 3 + note D#, 2 + octave 2 + note D#, 1 + rest 1 + note G_, 2 + sound_call .sub2 + octave 3 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + note F_, 1 + note C#, 1 + rest 1 + note G#, 1 + octave 2 + note G#, 1 + rest 1 + octave 3 + note F_, 2 + octave 2 + note G#, 1 + rest 1 + octave 3 + note C#, 2 + sound_call .sub2 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note B_, 1 + note G#, 2 + octave 3 + note D#, 1 + octave 2 + note G#, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 1 + rest 1 + note G_, 1 + rest 1 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note G#, 1 + rest 1 + octave 3 + note F#, 1 + rest 1 + octave 2 + note G#, 1 + octave 3 + note D#, 2 + octave 2 + note G#, 1 + octave 3 + note C#, 1 + rest 1 + note B_, 1 + rest 1 + note C#, 1 + note F_, 2 + note C#, 1 + sound_ret + +.sub2: + octave 2 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note B_, 1 + note G#, 1 + rest 1 + octave 3 + note D#, 1 + octave 2 + note G#, 1 + rest 1 + note B_, 2 + octave 3 + note D#, 1 + rest 1 + octave 2 + note G#, 2 + sound_ret + +Music_BuenasPassword_Ch4: + toggle_noise 3 + drum_speed 12 + drum_note 4, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 +.mainloop: +.loop1: + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_loop 4, .loop1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + stereo_panning TRUE, TRUE + drum_note 4, 2 + stereo_panning TRUE, FALSE + drum_note 8, 2 + stereo_panning TRUE, TRUE + drum_note 3, 2 + stereo_panning FALSE, TRUE + drum_note 8, 1 + drum_note 8, 1 + stereo_panning TRUE, FALSE + drum_note 8, 2 + stereo_panning TRUE, TRUE + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + sound_loop 0, .mainloop + +.sub1: + stereo_panning TRUE, TRUE + drum_note 4, 2 + stereo_panning TRUE, FALSE + drum_note 8, 2 + stereo_panning TRUE, TRUE + drum_note 3, 2 + stereo_panning FALSE, TRUE + drum_note 8, 1 + drum_note 8, 1 + stereo_panning TRUE, FALSE + drum_note 8, 2 + stereo_panning TRUE, TRUE + drum_note 4, 2 + drum_note 3, 2 + stereo_panning FALSE, TRUE + drum_note 8, 2 + sound_ret + +.sub2: + stereo_panning TRUE, TRUE + drum_note 4, 2 + stereo_panning TRUE, FALSE + drum_note 8, 2 + stereo_panning TRUE, TRUE + drum_note 3, 2 + stereo_panning FALSE, TRUE + drum_note 8, 1 + drum_note 8, 1 + stereo_panning TRUE, FALSE + drum_note 8, 2 + stereo_panning TRUE, TRUE + drum_note 4, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + sound_ret diff --git a/audio/music/bugcatchingcontest.asm b/audio/music/bugcatchingcontest.asm new file mode 100644 index 0000000..cdc1dbd --- /dev/null +++ b/audio/music/bugcatchingcontest.asm @@ -0,0 +1,669 @@ +Music_BugCatchingContest: + channel_count 4 + channel 1, Music_BugCatchingContest_Ch1 + channel 2, Music_BugCatchingContest_Ch2 + channel 3, Music_BugCatchingContest_Ch3 + channel 4, Music_BugCatchingContest_Ch4 + +Music_BugCatchingContest_Ch1: + tempo 144 + volume 7, 7 + stereo_panning FALSE, TRUE + vibrato 8, 2, 4 + duty_cycle 2 + note_type 12, 11, 7 + rest 8 + octave 4 + note C#, 1 + rest 1 + note C#, 3 + rest 1 + note C#, 1 + note C#, 1 + note D_, 1 + rest 1 + note D_, 3 + rest 1 + note D_, 1 + note D_, 1 + note D#, 1 + rest 1 + note D#, 3 + rest 1 + note D#, 1 + note D#, 1 + note E_, 1 + rest 1 + note E_, 3 + rest 1 + note E_, 1 + note E_, 1 +.mainloop: + note_type 12, 11, 1 +.loop1: + rest 2 + octave 2 + note A_, 2 + sound_loop 4, .loop1 +.loop2: + rest 2 + note B_, 2 + sound_loop 8, .loop2 + volume_envelope 11, 4 + duty_cycle 1 + octave 3 + note B_, 6 + note A_, 1 + note B_, 1 + note A_, 6 + octave 4 + note D_, 1 + note E_, 1 + volume_envelope 11, 1 + duty_cycle 2 +.loop3: + rest 2 + octave 2 + note A_, 2 + sound_loop 4, .loop3 + rest 2 + note B_, 2 + rest 2 + note B_, 2 + note_type 6, 11, 7 + octave 4 + note E_, 4 + rest 1 + octave 3 + note B_, 1 + octave 4 + note E_, 1 + note G_, 1 + note B_, 8 + octave 5 + note E_, 8 + volume_envelope 11, 1 + rest 4 + octave 2 + note B_, 4 + rest 4 + octave 3 + note E_, 4 + rest 4 + note E_, 4 +.loop4: + rest 4 + octave 2 + note A_, 4 + sound_loop 3, .loop4 + volume_envelope 10, 7 + octave 4 + note F#, 4 + note A_, 4 + rest 4 + octave 3 + note G_, 2 + note B_, 2 + octave 4 + note D_, 2 + rest 2 + octave 3 + note B_, 2 + note G_, 2 + octave 4 + note G_, 1 + note A_, 1 + note G_, 1 + note A_, 1 + note G_, 1 + note A_, 1 + note G_, 1 + note A_, 1 + note G_, 8 + rest 4 + octave 3 + note F#, 2 + note A_, 2 + octave 4 + note D_, 2 + rest 2 + octave 3 + note A_, 2 + note F#, 2 + octave 4 + note F#, 1 + note G_, 1 + note F#, 1 + note G_, 1 + note F#, 1 + note G_, 1 + note F#, 1 + note G_, 1 + note F#, 8 + note D_, 2 + rest 2 + octave 3 + note B_, 2 + note G_, 2 + octave 4 + note G_, 2 + rest 2 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note B_, 2 + rest 2 + note G#, 2 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note D_, 2 + note G#, 2 + note B_, 2 + note C#, 2 + rest 2 + note C#, 6 + rest 2 + note C#, 2 + note C#, 2 + note D_, 2 + rest 2 + note D_, 6 + rest 2 + note D_, 2 + note D_, 2 + note D#, 2 + rest 2 + note D#, 6 + rest 2 + note D#, 2 + note D#, 2 + note E_, 2 + rest 2 + note E_, 6 + rest 2 + note E_, 2 + note E_, 2 + sound_loop 0, .mainloop + +Music_BugCatchingContest_Ch2: + stereo_panning TRUE, FALSE + vibrato 8, 2, 3 + duty_cycle 1 + note_type 12, 12, 7 + rest 8 +.loop5: + octave 4 + note A_, 1 + rest 1 + note A_, 3 + rest 1 + note A_, 1 + note A_, 1 + sound_loop 4, .loop5 +.mainloop: + duty_cycle 0 + sound_call .sub1 + octave 2 + note E_, 2 + octave 3 + note G_, 1 + rest 1 + octave 1 + note B_, 2 + octave 3 + note G_, 1 + rest 1 + octave 2 + note E_, 2 + octave 3 + note G_, 1 + rest 1 + octave 2 + note G_, 2 + octave 3 + note G_, 1 + rest 1 + octave 2 + note A_, 2 + octave 3 + note A_, 1 + rest 1 + octave 2 + note G#, 2 + octave 3 + note G#, 1 + rest 1 + octave 2 + note G_, 2 + octave 3 + note G_, 1 + rest 1 + octave 2 + note E_, 2 + octave 3 + note E_, 1 + rest 1 + sound_call .sub1 + octave 2 + note E_, 2 + octave 3 + note G_, 1 + rest 1 + octave 1 + note B_, 2 + octave 3 + note G_, 1 + rest 1 + octave 2 + note A_, 2 + octave 4 + note C#, 1 + rest 1 + octave 2 + note E_, 2 + octave 4 + note C#, 1 + rest 1 + octave 2 + note D_, 2 + octave 3 + note F#, 1 + rest 1 + octave 1 + note A_, 2 + octave 3 + note F#, 1 + rest 1 + octave 1 + note B_, 2 + octave 3 + note F#, 1 + rest 1 + octave 2 + note D#, 2 + octave 3 + note A_, 1 + rest 1 + duty_cycle 0 + rest 2 + octave 5 + note D_, 1 + rest 1 + note C#, 2 + note D_, 1 + rest 1 + octave 4 + note B_, 8 + rest 2 + octave 5 + note D_, 1 + rest 1 + note C#, 2 + note D_, 1 + rest 1 + octave 4 + note A_, 8 + rest 2 + octave 5 + note D_, 4 + note F#, 2 + note E_, 2 + note D_, 1 + rest 1 + note C#, 2 + note D_, 1 + rest 1 + note E_, 1 + rest 1 + note E_, 1 + rest 3 + note E_, 10 + note A_, 1 + rest 1 + note A_, 1 + rest 3 + note A_, 10 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note D_, 2 + octave 3 + note F#, 1 + rest 1 + octave 1 + note A_, 2 + octave 3 + note F#, 1 + rest 1 + octave 1 + note B_, 2 + octave 3 + note F#, 1 + rest 1 + octave 2 + note C#, 2 + octave 3 + note F#, 1 + rest 1 + octave 2 + note E_, 2 + octave 3 + note G_, 1 + rest 1 + octave 1 + note B_, 2 + octave 3 + note G_, 1 + rest 1 + octave 2 + note C#, 2 + octave 3 + note G_, 1 + rest 1 + octave 2 + note D#, 2 + octave 3 + note G_, 1 + rest 1 + sound_ret + +Music_BugCatchingContest_Ch3: + stereo_panning TRUE, TRUE + vibrato 16, 2, 3 + note_type 12, 1, 4 + rest 8 + octave 3 + note A_, 1 + rest 1 + note A_, 3 + rest 1 + note A_, 1 + note A_, 1 + note B_, 1 + rest 1 + note B_, 3 + rest 1 + note B_, 1 + note B_, 1 + octave 4 + note C_, 1 + rest 1 + note C_, 3 + rest 1 + note C_, 1 + note C_, 1 + note C#, 1 + rest 1 + note C#, 3 + rest 1 + note C#, 1 + note C#, 1 +.mainloop: + note_type 12, 1, 4 + note F#, 5 + rest 1 + note F#, 1 + note G_, 1 + note A_, 4 + octave 5 + note D_, 4 + note C#, 2 + volume_envelope 1, 0 + note E_, 1 + note G_, 1 + note B_, 1 + rest 1 + note G_, 1 + note E_, 1 + note_type 6, 2, 0 + octave 6 + note E_, 1 + note F#, 1 + note E_, 1 + note F#, 1 + note E_, 1 + note F#, 1 + note E_, 1 + note F#, 1 + note E_, 8 + volume_envelope 1, 4 + octave 4 + note E_, 10 + rest 2 + note E_, 2 + note F#, 2 + note G_, 8 + octave 5 + note C#, 8 + rest 4 + volume_envelope 1, 0 + note E_, 2 + note G_, 2 + note A_, 2 + rest 2 + note E_, 2 + note C_, 2 + octave 6 + note C#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note C#, 8 + volume_envelope 1, 5 + octave 5 + note F#, 4 + rest 4 + note G_, 4 + rest 4 + note A_, 4 + rest 4 + octave 6 + note D_, 4 + rest 4 + note C#, 12 + octave 5 + note B_, 2 + octave 6 + note C#, 2 + octave 5 + note B_, 4 + rest 4 + octave 6 + note G_, 4 + note F#, 4 + rest 4 + octave 5 + note G_, 4 + note A_, 4 + note B_, 4 + octave 6 + note E_, 4 + note D_, 4 + note C#, 4 + octave 5 + note B_, 2 + octave 6 + note C#, 2 + note D_, 4 + rest 8 + octave 5 + note B_, 4 + note A_, 4 + rest 1 + note D#, 1 + note F#, 1 + note A_, 1 + octave 6 + note C_, 8 + octave 3 + note G_, 2 + rest 2 + note B_, 2 + rest 2 + note D_, 2 + rest 2 + note B_, 2 + rest 2 + note E_, 2 + rest 2 + note B_, 2 + rest 2 + note G_, 2 + rest 2 + note B_, 2 + rest 2 + note D_, 2 + rest 2 + note F#, 2 + rest 2 + octave 2 + note A_, 2 + rest 2 + octave 3 + note F#, 2 + rest 2 + note D#, 2 + rest 2 + octave 4 + note C_, 2 + rest 2 + octave 3 + note A_, 2 + rest 2 + octave 4 + note C_, 2 + rest 2 + octave 3 + note G_, 2 + rest 2 + note B_, 2 + rest 2 + note D_, 2 + rest 2 + note B_, 2 + rest 2 + note G#, 2 + rest 2 + note B_, 2 + rest 2 + note E_, 2 + rest 2 + note B_, 2 + rest 2 + note A_, 2 + rest 2 + note A_, 6 + rest 2 + note A_, 2 + note A_, 2 + note B_, 2 + rest 2 + note B_, 6 + rest 2 + note B_, 2 + note B_, 2 + octave 4 + note C_, 2 + rest 2 + note C_, 6 + rest 2 + note C_, 2 + note C_, 2 + note C#, 2 + rest 2 + note C#, 6 + rest 2 + note C#, 2 + note C#, 2 + sound_loop 0, .mainloop + +Music_BugCatchingContest_Ch4: + toggle_noise 4 + drum_speed 6 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 5, 2 + drum_note 5, 2 + sound_call Music_BugCatchingContest_Ch4.sub1 +.mainloop: +.loop1: + drum_note 3, 4 + drum_note 3, 4 + drum_note 3, 2 + drum_note 2, 2 + drum_note 3, 2 + drum_note 2, 2 + drum_note 3, 4 + drum_note 3, 4 + drum_note 3, 2 + drum_note 2, 2 + drum_note 3, 2 + drum_note 2, 2 + drum_note 3, 4 + drum_note 3, 4 + drum_note 3, 2 + drum_note 2, 2 + drum_note 3, 2 + drum_note 2, 2 + drum_note 3, 4 + drum_note 3, 4 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + sound_loop 5, .loop1 + drum_note 3, 4 + drum_note 3, 4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 4 + drum_note 3, 4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + sound_call .sub1 + sound_loop 0, .mainloop + +.sub1: + drum_note 3, 4 + drum_note 12, 8 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 4 + drum_note 12, 8 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 4 + drum_note 12, 8 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 4 + drum_note 12, 8 + drum_note 3, 2 + drum_note 3, 2 + sound_ret diff --git a/audio/music/burnedtower.asm b/audio/music/burnedtower.asm new file mode 100644 index 0000000..742a769 --- /dev/null +++ b/audio/music/burnedtower.asm @@ -0,0 +1,261 @@ +Music_BurnedTower: + channel_count 4 + channel 1, Music_BurnedTower_Ch1 + channel 2, Music_BurnedTower_Ch2 + channel 3, Music_BurnedTower_Ch3 + channel 4, Music_BurnedTower_Ch4 + +Music_BurnedTower_Ch1: + tempo 168 + volume 7, 7 + duty_cycle 1 + pitch_offset 4 + vibrato 8, 4, 5 + stereo_panning TRUE, FALSE + note_type 12, 9, 1 + rest 2 + octave 2 + note A_, 4 + note A_, 4 + note A_, 2 + volume_envelope 8, 0 + octave 3 + note D#, 6 + volume_envelope 9, 1 + note D_, 4 + note D_, 4 + note D_, 2 + volume_envelope 8, 0 + note C#, 6 +.loop1: + volume_envelope 9, 1 + octave 2 + note A_, 4 + note A_, 4 + note A_, 2 + volume_envelope 8, 0 + note A#, 6 + sound_loop 2, .loop1 + tempo 150 +.mainloop: + volume_envelope 11, 1 + octave 2 + note A_, 4 + note A_, 4 + note A_, 2 + volume_envelope 10, 0 + octave 3 + note D#, 6 + volume_envelope 11, 1 + note D_, 4 + note D_, 4 + note D_, 2 + volume_envelope 10, 0 + note C#, 6 + volume_envelope 11, 1 + octave 2 + note A_, 4 + note A_, 4 + note A_, 2 + volume_envelope 10, 0 + note A#, 6 + volume_envelope 11, 1 + note A_, 4 + note A_, 4 + note A_, 2 + volume_envelope 11, 3 + note A#, 16 + note A#, 16 + note A#, 16 + note G#, 6 + volume_envelope 11, 1 + note A_, 4 + note A_, 4 + note A_, 2 + volume_envelope 10, 0 + note A#, 6 + volume_envelope 11, 1 + note B_, 4 + note B_, 4 + note B_, 2 + volume_envelope 10, 0 + octave 3 + note F_, 6 + volume_envelope 11, 1 + note E_, 4 + note E_, 4 + note E_, 2 + volume_envelope 10, 0 + note D#, 6 +.loop2: + volume_envelope 11, 1 + octave 2 + note B_, 4 + note B_, 4 + note B_, 2 + volume_envelope 10, 0 + octave 3 + note C_, 6 + sound_loop 2, .loop2 + sound_loop 0, .mainloop + +Music_BurnedTower_Ch2: + duty_cycle 2 + vibrato 32, 8, 2 + pitch_offset 2 + note_type 12, 7, 0 + sound_call .sub1 + volume_envelope 12, 5 +.mainloop: + sound_call .sub1 + volume_envelope 12, 1 + duty_cycle 3 + rest 2 + octave 2 + note A_, 4 + note A_, 4 + note A_, 2 + volume_envelope 11, 0 + octave 3 + note D#, 6 + volume_envelope 12, 1 + note D_, 4 + note D_, 4 + note D_, 2 + volume_envelope 11, 0 + note C#, 6 + volume_envelope 12, 1 + octave 2 + note A_, 4 + note A_, 4 + note A_, 2 + volume_envelope 11, 0 + note A#, 4 + volume_envelope 12, 1 + volume_envelope 12, 2 + octave 3 + note A_, 1 + note G_, 1 + note A_, 1 + octave 4 + note C_, 1 + vibrato 0, 0, 0 + volume_envelope 3, -5 + note E_, 8 + vibrato 32, 8, 3 + volume_envelope 11, 0 + octave 2 + note G_, 4 + duty_cycle 2 + volume_envelope 11, 0 + octave 3 + note F#, 4 + note E_, 2 + note F#, 2 + note G_, 4 + note B_, 4 + octave 4 + note C#, 4 + note D_, 2 + note C#, 2 + octave 3 + note B_, 4 + note G_, 4 + note F#, 4 + note E_, 2 + note F#, 2 + note G_, 4 + note E_, 4 + volume_envelope 11, 7 + note F#, 16 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note E_, 4 + note D_, 2 + note E_, 2 + note F_, 4 + note A_, 4 + note B_, 4 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note A_, 4 + note F_, 4 + note E_, 4 + note D_, 2 + note E_, 2 + note F_, 4 + note D_, 4 + note E_, 16 + sound_ret + +Music_BurnedTower_Ch3: + stereo_panning FALSE, TRUE + note_type 12, 1, 4 + rest 16 + rest 16 + rest 16 + rest 12 + octave 3 + note D#, 4 +.mainloop: +.loop1: + octave 2 + note A_, 2 + octave 3 + note E_, 2 + rest 2 + note E_, 2 + rest 2 + note E_, 2 + note F_, 4 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + rest 2 + note E_, 2 + rest 2 + note E_, 2 + note D#, 4 + sound_loop 4, .loop1 +.loop2: + octave 2 + note B_, 2 + octave 3 + note F#, 2 + rest 2 + note F#, 2 + rest 2 + note F#, 2 + note G_, 4 + octave 2 + note B_, 2 + octave 3 + note F#, 2 + rest 2 + note F#, 2 + rest 2 + note F#, 2 + note F_, 4 + sound_loop 2, .loop2 + sound_loop 0, .mainloop + +Music_BurnedTower_Ch4: + toggle_noise 0 + drum_speed 12 +.loop1: + rest 16 + sound_loop 4, .loop1 + rest 2 +.mainloop: + stereo_panning TRUE, FALSE + drum_note 8, 2 + drum_note 9, 2 + drum_note 8, 4 + drum_note 9, 2 + drum_note 8, 4 + sound_loop 0, .mainloop diff --git a/audio/music/celadoncity.asm b/audio/music/celadoncity.asm new file mode 100644 index 0000000..21d565b --- /dev/null +++ b/audio/music/celadoncity.asm @@ -0,0 +1,390 @@ +Music_CeladonCity: + channel_count 3 + channel 1, Music_CeladonCity_Ch1 + channel 2, Music_CeladonCity_Ch2 + channel 3, Music_CeladonCity_Ch3 + +Music_CeladonCity_Ch1: + tempo 146 + volume 7, 7 + pitch_offset 1 +.mainloop: + stereo_panning FALSE, TRUE + note_type 12, 10, 6 + octave 3 + note A_, 7 + volume_envelope 10, 1 + note G#, 1 + note A_, 1 + note D_, 3 + note E_, 2 + note F#, 2 + sound_call .sub1 +.loop1: + note D_, 2 + note F#, 1 + note A_, 1 + note D_, 1 + note F#, 1 + note A_, 1 + note F#, 1 + sound_loop 3, .loop1 + note D_, 2 + note G_, 1 + note B_, 1 + octave 4 + note D_, 1 + note C_, 1 + octave 3 + note B_, 1 + note G_, 1 + sound_call .sub1 + note D_, 1 + note C#, 1 + note D_, 1 + note E_, 1 + note F#, 1 + note G_, 1 + note A_, 1 + note B_, 1 + note A_, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note F#, 16 + sound_call .sub2 + sound_call .sub3 + octave 2 + note B_, 2 + note A#, 1 + note B_, 1 + octave 3 + note D_, 1 + note G_, 1 + note A_, 1 + note G_, 1 + note F#, 1 + note G_, 1 + note A_, 1 + note G#, 1 + note A_, 1 + octave 4 + note C_, 1 + octave 3 + note B_, 1 + note A_, 1 + sound_call .sub2 + sound_call .sub3 + note D_, 2 + note C#, 1 + note D_, 1 + note F#, 1 + note G_, 1 + note A_, 1 + note G_, 1 + note A_, 8 + sound_loop 0, .mainloop + +.sub1: +.sub1loop1: + note D_, 2 + note G_, 1 + note B_, 1 + note D_, 1 + note G_, 1 + note B_, 1 + note G_, 1 + sound_loop 3, .sub1loop1 + note D_, 2 + note F#, 1 + note A_, 1 + octave 4 + note D_, 1 + note C#, 1 + note D_, 1 + octave 3 + note A_, 1 + sound_ret + +.sub2: +.sub2loop1 + octave 2 + note G_, 2 + note B_, 1 + octave 3 + note D_, 1 + sound_loop 4, .sub2loop1 + note C_, 2 + octave 2 + note B_, 1 + octave 3 + note C_, 1 + note D_, 1 + note E_, 1 + note F#, 1 + note A_, 1 + note G_, 1 + note A_, 1 + note B_, 1 + octave 4 + note C_, 1 + note D_, 1 + note C#, 1 + note D_, 1 + octave 3 + note B_, 1 + sound_ret + +.sub3: +.sub3loop1: + note D_, 2 + note F#, 1 + note A_, 1 + sound_loop 4, .sub3loop1 + sound_ret + +Music_CeladonCity_Ch2: + vibrato 18, 3, 4 + duty_cycle 2 + stereo_panning TRUE, FALSE + note_type 12, 11, 7 + octave 4 + note D_, 1 + note C#, 1 + note D_, 1 + note E_, 1 + note F#, 1 + note E_, 1 + note F#, 1 + note G_, 1 + note A_, 8 +.mainloop: + sound_call .sub1 + note A_, 4 + note F#, 4 + note A_, 2 + note F#, 6 + note A_, 1 + note G_, 1 + note F#, 1 + note G_, 1 + note A_, 2 + note B_, 2 + note G_, 4 + note B_, 4 + sound_call .sub1 + volume_envelope 12, 1 + note A_, 2 + note G_, 2 + note F#, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note D_, 2 + note C#, 2 + note D_, 4 + note D_, 1 + note E_, 1 + note F#, 1 + note A_, 1 + volume_envelope 11, 3 + octave 5 + note D_, 6 + volume_envelope 10, 2 + octave 1 + note F#, 2 + sound_call .sub2 + octave 1 + note G_, 3 + note B_, 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 6 + note F#, 2 + sound_call .sub2 + octave 1 + note A_, 3 + octave 2 + note D_, 1 + note A_, 4 + note D_, 6 + volume_envelope 9, 7 + octave 4 + note F#, 1 + note A_, 1 + octave 5 + note D_, 16 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 11, 2 + octave 4 + note B_, 4 + note G_, 4 + note B_, 2 + note G_, 6 + note B_, 1 + note G_, 1 + note A_, 1 + note B_, 1 + octave 5 + note C_, 2 + octave 4 + note B_, 2 + note A_, 8 + sound_ret + +.sub2: + note G_, 3 + note B_, 1 + octave 2 + note D_, 4 + octave 1 + note G_, 2 + note B_, 2 + octave 2 + note D_, 4 + octave 1 + note G_, 3 + octave 2 + note C_, 1 + note D_, 4 + octave 1 + note G_, 2 + note B_, 2 + octave 2 + note D_, 4 + octave 1 + note A_, 3 + octave 2 + note D_, 1 + note F#, 4 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note F#, 4 + sound_ret + +Music_CeladonCity_Ch3: + vibrato 18, 2, 4 +.mainloop: + note_type 12, 2, 5 + octave 3 + note A_, 2 + rest 2 + note F#, 2 + rest 2 + note D_, 8 + sound_call .sub1 +.loop1: + octave 2 + note A_, 2 + rest 2 + octave 3 + note D_, 4 + sound_loop 3, .loop1 + octave 2 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + octave 3 + note D_, 3 + octave 2 + note F#, 1 + sound_call .sub1 + note A_, 1 + rest 1 + octave 3 + note D_, 1 + rest 1 + octave 3 + note F#, 3 + octave 2 + note G#, 1 + note A_, 1 + rest 1 + octave 3 + note C#, 1 + rest 1 + note E_, 2 + note C#, 2 + note D_, 2 + rest 6 + octave 2 + note A_, 2 + rest 6 + volume_envelope 1, 0 + sound_call .sub2 + octave 5 + note E_, 2 + rest 2 + note F#, 2 + rest 2 + note D_, 4 + rest 4 + note C_, 8 + octave 4 + note A_, 2 + note B_, 2 + octave 5 + note C_, 2 + note D_, 2 + note E_, 2 + rest 2 + note D_, 2 + note E_, 2 + note D_, 4 + rest 4 + sound_call .sub2 + octave 5 + note E_, 2 + rest 2 + note D_, 2 + note E_, 2 + note D_, 4 + rest 4 + note C_, 8 + note A_, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note F#, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note D_, 2 + rest 6 + sound_loop 0, .mainloop + +.sub1: +.sub1loop1: + octave 2 + note G_, 2 + rest 2 + octave 3 + note D_, 4 + sound_loop 3, .sub1loop1 + octave 2 + note A_, 1 + rest 1 + octave 3 + note D_, 1 + rest 1 + note F#, 3 + octave 2 + note G#, 1 + sound_ret + +.sub2: + octave 5 + note D_, 8 + note C_, 2 + octave 4 + note B_, 2 + note A_, 2 + note B_, 2 + sound_ret diff --git a/audio/music/championbattle.asm b/audio/music/championbattle.asm new file mode 100644 index 0000000..218a71e --- /dev/null +++ b/audio/music/championbattle.asm @@ -0,0 +1,777 @@ +Music_ChampionBattle: + channel_count 3 + channel 1, Music_ChampionBattle_Ch1 + channel 2, Music_ChampionBattle_Ch2 + channel 3, Music_ChampionBattle_Ch3 + +Music_ChampionBattle_Ch1: + tempo 98 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 18, 1, 5 + note_type 12, 11, 2 + octave 2 + note A#, 8 + note A#, 8 + note A#, 8 + note A#, 4 + volume_envelope 11, 7 + note B_, 4 +.loop1: + sound_call .sub1 + octave 3 + note D#, 4 + sound_loop 2, .loop1 + sound_call .sub1 + octave 3 + note E_, 4 +.loop2: + sound_call .sub2 + sound_loop 3, .loop2 + sound_call .sub3 +.loop3: + sound_call .sub2 + sound_loop 7, .loop3 + sound_call .sub3 + volume_envelope 11, 2 + note A#, 2 + note A#, 2 + volume_envelope 11, 7 + octave 3 + note D#, 4 + volume_envelope 11, 2 + octave 2 + note A#, 2 + note A#, 2 + volume_envelope 11, 7 + octave 3 + note E_, 4 + volume_envelope 11, 2 + octave 2 + note A#, 2 + note A#, 2 + volume_envelope 11, 7 + octave 3 + note F#, 4 + volume_envelope 11, 2 + octave 2 + note A#, 2 + note A#, 2 + volume_envelope 11, 7 + octave 3 + note G#, 4 + volume_envelope 10, 0 + note A#, 8 + octave 2 + note A#, 8 + octave 3 + note B_, 12 + volume_envelope 11, 2 + note A#, 1 + note B_, 1 + octave 4 + note C_, 1 + note C#, 1 +.mainloop: + sound_call .sub4 + note E_, 2 + note E_, 2 + volume_envelope 11, 7 + note F#, 4 +.loop4: + volume_envelope 11, 2 + note E_, 2 + note E_, 2 + volume_envelope 11, 7 + note G#, 4 + sound_loop 2, .loop4 + volume_envelope 11, 2 + note E_, 2 + note E_, 2 + volume_envelope 11, 7 + note B_, 4 + sound_call .sub4 + note E_, 2 + note E_, 2 + volume_envelope 11, 7 + note F#, 4 + volume_envelope 11, 2 + note E_, 2 + note E_, 2 + volume_envelope 11, 7 + note G#, 4 + volume_envelope 11, 2 + note E_, 2 + note E_, 2 + volume_envelope 11, 7 + note B_, 4 + volume_envelope 11, 2 + note E_, 2 + note E_, 2 + volume_envelope 11, 7 + octave 4 + note E_, 4 + sound_call .sub5 + note B_, 4 + note G#, 4 + sound_call .sub5 + octave 4 + note D_, 4 + note D_, 4 + volume_envelope 10, 0 + octave 3 + note A#, 8 + octave 2 + note A#, 8 + octave 3 + note F#, 8 + octave 2 + note F#, 8 + volume_envelope 6, 0 + note B_, 16 + volume_envelope 7, 0 + note B_, 16 + volume_envelope 8, 0 + octave 3 + note C#, 16 + volume_envelope 10, 0 + note D#, 16 + volume_envelope 11, 4 + octave 4 + note F#, 4 + note F_, 4 + note E_, 4 + note D#, 4 + note D_, 4 + note C#, 4 + note F#, 4 + note F#, 4 + note F#, 4 + note F_, 4 + note E_, 4 + note D#, 4 + note F#, 2 + note G#, 2 + note D#, 2 + note E_, 2 + note F#, 4 + note F#, 4 + rest 16 + volume_envelope 9, 0 + octave 3 + note F#, 8 + volume_envelope 11, 4 + note E_, 4 + note E_, 4 + volume_envelope 9, 0 + note D#, 16 + note C#, 16 +.loop5: + volume_envelope 11, 2 + octave 2 + note A#, 2 + note A#, 2 + volume_envelope 11, 7 + octave 3 + note D#, 4 + sound_loop 4, .loop5 +.loop6: + volume_envelope 11, 2 + note C_, 2 + note C_, 2 + volume_envelope 11, 7 + note D#, 4 + sound_loop 2, .loop6 + volume_envelope 11, 2 + note C_, 2 + note C_, 2 + volume_envelope 11, 7 + note F#, 4 + volume_envelope 11, 2 + note C_, 2 + note C_, 2 + volume_envelope 11, 7 + note G#, 4 + sound_call .sub6 + octave 3 + note D#, 2 + note D#, 2 + volume_envelope 11, 7 + note B_, 4 + sound_call .sub6 + octave 3 + note D#, 2 + note D#, 2 + volume_envelope 11, 7 + octave 4 + note D_, 4 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 11, 2 + octave 2 + note A#, 2 + note A#, 6 + note A#, 2 + note A#, 6 + note A#, 2 + note A#, 6 + note A#, 2 + note A#, 2 + volume_envelope 11, 7 + sound_ret + +.sub2: + volume_envelope 11, 2 + octave 2 + note A#, 2 + note A#, 2 + volume_envelope 11, 7 + octave 3 + note D#, 4 + sound_ret + +.sub3: + volume_envelope 11, 2 + octave 2 + note A#, 2 + note A#, 2 + volume_envelope 11, 7 + note B_, 4 + sound_ret + +.sub4: + volume_envelope 11, 5 + octave 3 + note D#, 2 + note A#, 2 + note D#, 2 + note F#, 4 + note F_, 2 + note E_, 2 + note B_, 2 + note F#, 2 + note A#, 2 + note F_, 2 + note A_, 2 + note E_, 2 + note G#, 2 + note D#, 2 + note G_, 2 + volume_envelope 11, 2 + sound_ret + +.sub5: + volume_envelope 11, 2 + octave 3 + note A#, 2 + note A#, 4 + note A#, 4 + note A#, 4 + note A#, 4 + note A#, 4 + note A#, 2 + volume_envelope 11, 7 + sound_ret + +.sub6: + volume_envelope 11, 2 + note D#, 2 + note D#, 2 + volume_envelope 11, 7 + note A#, 4 + volume_envelope 11, 2 + note D#, 2 + note D#, 2 + volume_envelope 11, 7 + note B_, 4 + volume_envelope 11, 2 + note D#, 2 + note D#, 2 + volume_envelope 11, 7 + octave 4 + note C#, 4 + volume_envelope 11, 2 + sound_ret + +Music_ChampionBattle_Ch2: + duty_cycle 3 + vibrato 8, 3, 6 + pitch_offset 1 + note_type 12, 12, 2 + octave 3 + note D#, 8 + note D#, 8 + note D#, 8 + note D#, 4 + volume_envelope 12, 7 + note D_, 4 + sound_call .sub1 + note A#, 4 + sound_call .sub1 + note B_, 4 + sound_call .sub1 + octave 4 + note C#, 4 + sound_call .sub2 + note D_, 4 + sound_call .sub2 + note F_, 4 + sound_call .sub2 + note D_, 4 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + note A#, 4 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + note B_, 4 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + octave 4 + note C_, 4 + volume_envelope 12, 2 + octave 3 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + octave 4 + note C#, 4 + note D#, 8 + octave 3 + note D#, 8 + octave 4 + note E_, 8 + volume_envelope 3, -4 + note E_, 8 +.mainloop: + volume_envelope 12, 5 + note D#, 6 + octave 3 + note A#, 6 + octave 4 + note D#, 2 + note D_, 2 + note C#, 4 + note C_, 4 + octave 3 + note B_, 4 + note A#, 4 + volume_envelope 12, 7 + note B_, 8 + octave 4 + note E_, 8 + volume_envelope 12, 2 + octave 3 + note G#, 2 + note G#, 2 + volume_envelope 12, 7 + note B_, 4 + volume_envelope 12, 2 + note G#, 2 + note G#, 2 + volume_envelope 12, 7 + octave 4 + note C#, 4 + volume_envelope 12, 5 + note D#, 6 + octave 3 + note A#, 6 + octave 4 + note D#, 2 + note D_, 2 + note C#, 4 + note C_, 4 + octave 3 + note B_, 4 + note A#, 2 + note B_, 2 + volume_envelope 12, 7 + octave 4 + note E_, 8 + note G#, 8 + note E_, 8 + note B_, 8 + sound_call .sub3 + note E_, 4 + note E_, 4 + sound_call .sub3 + note F#, 4 + note F#, 4 + volume_envelope 12, 7 + note D#, 8 + octave 3 + note D#, 8 + octave 4 + note C#, 8 + octave 3 + note C#, 8 + volume_envelope 11, 0 + note D#, 16 + note D#, 16 + note F_, 16 + note F#, 16 + volume_envelope 12, 4 +.loop1: + octave 5 + note D#, 4 + note D_, 4 + note C#, 4 + note C_, 4 + note D#, 2 + note D_, 2 + note C#, 2 + note C_, 2 + octave 4 + note B_, 4 + note B_, 4 + sound_loop 2, .loop1 + volume_envelope 11, 0 + octave 3 + note D#, 16 + note B_, 16 + note A#, 16 + note G#, 16 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + note A#, 4 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + note B_, 4 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + note A#, 4 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + note A_, 4 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + note A#, 4 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + note B_, 4 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + octave 4 + note C#, 4 + volume_envelope 12, 2 + octave 3 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + octave 4 + note D_, 4 + volume_envelope 11, 0 + note D#, 8 + note E_, 8 + note F#, 8 + note E_, 8 + note D#, 8 + note E_, 8 + note F#, 8 + note G#, 8 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 12, 2 + note D#, 2 + note D#, 6 + note D#, 2 + note D#, 6 + note D#, 2 + note D#, 6 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + sound_ret + +.sub2: + volume_envelope 12, 2 + octave 3 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + note A#, 4 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + note B_, 4 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + note A#, 4 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + sound_ret + +.sub3: + volume_envelope 12, 1 + note D#, 2 + note D#, 4 + note D#, 4 + note D#, 4 + note D#, 4 + note D#, 4 + note D#, 2 + volume_envelope 12, 5 + sound_ret + +Music_ChampionBattle_Ch3: + note_type 12, 1, 4 +.loop1: + octave 3 + note D#, 1 + rest 7 + sound_loop 3, .loop1 + note D#, 1 + rest 3 + note E_, 4 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + note D_, 4 + sound_call .sub2 + note A_, 4 + sound_call .sub2 + note D_, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note A#, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note A#, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note B_, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + octave 4 + note C#, 4 + note D#, 8 + octave 3 + note D#, 8 + note B_, 4 + note G_, 2 + note B_, 2 + note F#, 2 + note A#, 2 + note F_, 2 + note A_, 2 +.mainloop: +.loop2: + note D#, 2 + note A#, 2 + sound_loop 8, .loop2 +.loop3: + note E_, 2 + note B_, 2 + sound_loop 5, .loop3 + note E_, 2 + octave 4 + note C_, 2 + octave 3 + note A_, 2 + note B_, 2 + note G_, 2 + note A_, 2 +.loop4: + note D#, 2 + note A#, 2 + sound_loop 8, .loop4 +.loop5: + note E_, 2 + note B_, 2 + sound_loop 8, .loop5 + sound_call .sub3 + octave 3 + note D#, 2 + note E_, 2 + note D#, 2 + note E_, 2 + note D#, 2 + octave 4 + note D_, 2 + note C#, 2 + note C_, 2 + sound_call .sub3 + octave 3 + note D#, 2 + note A#, 2 + note D#, 2 + note A#, 2 + note D#, 2 + octave 4 + note D_, 2 + note C#, 2 + note C_, 2 + octave 3 + note A#, 8 + note D#, 8 + note B_, 8 + note D#, 8 +.loop6: + note D#, 2 + note F#, 2 + sound_loop 16, .loop6 + sound_call .sub4 + octave 3 + note E_, 2 + note B_, 2 + octave 4 + note D#, 2 + note E_, 2 + note F#, 2 + octave 3 + note B_, 2 + octave 4 + note D#, 2 + note E_, 2 + sound_call .sub4 +.loop7: + octave 3 + note E_, 2 + note B_, 2 + sound_loop 4, .loop7 +.loop8: + note D#, 2 + note A#, 2 + sound_loop 5, .loop8 + note B_, 2 + octave 4 + note D#, 2 + octave 3 + note D#, 2 + rest 2 + note D#, 2 + rest 2 +.loop9: + note E_, 2 + note B_, 2 + sound_loop 5, .loop9 + octave 4 + note C#, 2 + note E_, 2 + octave 3 + note E_, 2 + rest 2 + note E_, 2 + rest 2 +.loop10: + note D#, 2 + note G#, 2 + sound_loop 8, .loop10 +.loop11: + note D#, 2 + note A#, 2 + sound_loop 7, .loop11 + note B_, 2 + note A#, 2 +.loop12: + octave 3 + note D#, 2 + note A#, 2 + octave 4 + note D_, 2 + note D#, 2 + sound_loop 7, .loop12 + note C#, 2 + octave 3 + note B_, 2 + note A#, 2 + note G#, 2 + sound_loop 0, .mainloop + +.sub1: +.sub1loop1: + note D#, 1 + rest 1 + note D#, 1 + rest 5 + sound_loop 3, .sub1loop1 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note B_, 4 + sound_ret + +.sub2: + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note A#, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note B_, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note A#, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + sound_ret + +.sub3: + octave 3 + note D#, 2 + note F#, 2 + note D#, 2 + note F#, 2 + note D#, 2 + octave 4 + note D_, 2 + note C#, 2 + note C_, 2 + sound_ret + +.sub4: + octave 3 + note E_, 2 + note B_, 2 + note E_, 2 + note B_, 2 + note E_, 2 + note B_, 2 + octave 4 + note D#, 2 + note E_, 2 + sound_ret diff --git a/audio/music/cherrygrovecity.asm b/audio/music/cherrygrovecity.asm new file mode 100644 index 0000000..f0d4bda --- /dev/null +++ b/audio/music/cherrygrovecity.asm @@ -0,0 +1,306 @@ +Music_CherrygroveCity: + channel_count 4 + channel 1, Music_CherrygroveCity_Ch1 + channel 2, Music_CherrygroveCity_Ch2 + channel 3, Music_CherrygroveCity_Ch3 + channel 4, Music_CherrygroveCity_Ch4 + +Music_CherrygroveCity_Ch1: + tempo 152 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 + vibrato 8, 1, 5 + stereo_panning TRUE, FALSE + note_type 12, 11, 5 + rest 10 + octave 3 + note C_, 2 + note D_, 2 + note E_, 2 +.mainloop: + note A_, 4 + note G#, 2 + note A_, 2 + note A#, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note A_, 6 + note F_, 2 + note C_, 2 + octave 2 + note A#, 2 + octave 3 + note C_, 2 + note E_, 2 + note G_, 4 + note F#, 2 + note G_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note G_, 6 + note E_, 2 + note C_, 2 + octave 2 + note A#, 2 + note A_, 2 + octave 3 + note C_, 2 + volume_envelope 11, 7 + octave 2 + note A#, 6 + octave 3 + note D_, 6 + note A#, 4 + note A_, 6 + note F_, 2 + note C_, 8 + octave 2 + note A#, 6 + octave 3 + note D_, 6 + volume_envelope 11, 5 + note A_, 4 + note G_, 4 + note E_, 4 + note D_, 4 + note E_, 4 + octave 2 + note A#, 6 + octave 3 + note D_, 6 + note A#, 4 + note A_, 6 + note F_, 2 + note C_, 4 + octave 2 + note B_, 4 + note A#, 6 + octave 3 + note C#, 2 + octave 2 + note A#, 4 + note G_, 4 + note A_, 4 + octave 3 + note C_, 4 + octave 2 + note A_, 4 + octave 3 + note C_, 4 + sound_loop 0, .mainloop + +Music_CherrygroveCity_Ch2: + duty_cycle 3 + vibrato 16, 3, 6 + stereo_panning FALSE, TRUE + note_type 12, 12, 3 + octave 3 + note C_, 2 + note D_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note G_, 2 + note A_, 2 + note A#, 2 +.mainloop: + volume_envelope 12, 6 + octave 4 + note C_, 6 + note D_, 4 + volume_envelope 11, 3 + note D_, 2 + note C_, 2 + octave 3 + note A#, 2 + volume_envelope 12, 7 + octave 4 + note C_, 6 + octave 3 + note A_, 2 + note F_, 8 + volume_envelope 12, 6 + note A#, 6 + octave 4 + note C_, 4 + volume_envelope 11, 3 + note C_, 2 + octave 3 + note A#, 2 + note A_, 2 + volume_envelope 12, 7 + note A#, 6 + note G_, 2 + note E_, 8 + volume_envelope 10, 0 + note D_, 6 + note F_, 6 + octave 4 + note D_, 4 + note C_, 6 + volume_envelope 10, 5 + octave 3 + note A_, 2 + volume_envelope 12, 7 + note F_, 8 + volume_envelope 10, 0 + note D_, 6 + note F_, 6 + octave 4 + note D_, 4 + volume_envelope 12, 7 + note C_, 16 + volume_envelope 11, 5 + octave 3 + note D_, 6 + note F_, 6 + octave 4 + note D_, 4 + note C_, 6 + octave 3 + note A_, 2 + note F_, 8 + note C#, 6 + note F_, 6 + note G_, 4 + volume_envelope 10, 0 + note F_, 8 + volume_envelope 10, 7 + note F_, 8 + sound_loop 0, .mainloop + +Music_CherrygroveCity_Ch3: + note_type 12, 1, 6 + rest 4 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 +.mainloop: + note A_, 2 + note F_, 2 + note A_, 2 + octave 4 + note C_, 4 + octave 3 + note F_, 2 + note G_, 2 + note A_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + octave 4 + note C_, 4 + octave 3 + note F_, 2 + note G_, 2 + note A_, 2 + note A#, 2 + note G_, 2 + note A#, 2 + octave 4 + note C_, 4 + octave 3 + note F_, 2 + note G_, 2 + note A_, 2 + note A#, 4 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note F_, 4 + note A#, 2 + note F_, 2 + note A#, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note A_, 4 + note F_, 2 + note A_, 2 + note F_, 2 + note E_, 2 + note D#, 2 + note D_, 2 + note F_, 4 + note A#, 2 + note F_, 2 + note A#, 2 + note A_, 2 + note G_, 2 + note E_, 2 + note G_, 2 + note A#, 2 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note D_, 2 + note F_, 4 + note A#, 2 + note F_, 2 + note A#, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note A_, 4 + note F_, 2 + note A_, 2 + note F_, 2 + note E_, 2 + note D#, 2 + note C#, 2 + note F_, 4 + note A#, 2 + note F_, 2 + note A#, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + sound_loop 0, .mainloop + +Music_CherrygroveCity_Ch4: + toggle_noise 3 + drum_speed 12 + rest 16 +.mainloop: + drum_note 2, 2 + rest 2 + drum_note 8, 2 + drum_note 2, 2 + drum_note 2, 2 + drum_note 7, 2 + drum_note 2, 4 + drum_note 2, 2 + rest 2 + drum_note 8, 2 + drum_note 2, 1 + drum_note 2, 1 + drum_note 7, 4 + drum_note 2, 2 + drum_note 8, 2 + sound_loop 0, .mainloop diff --git a/audio/music/clair.asm b/audio/music/clair.asm new file mode 100644 index 0000000..502bcdd --- /dev/null +++ b/audio/music/clair.asm @@ -0,0 +1,434 @@ +Music_Clair: + channel_count 4 + channel 1, Music_Clair_Ch1 + channel 2, Music_Clair_Ch2 + channel 3, Music_Clair_Ch3 + channel 4, Music_Clair_Ch4 + +Music_Clair_Ch1: + tempo 136 + volume 7, 7 + pitch_offset 1 + vibrato 18, 3, 4 + stereo_panning FALSE, TRUE + note_type 12, 9, 3 + duty_cycle 3 +.loop1: + octave 4 + note F_, 1 + note F#, 1 + note F_, 1 + rest 1 + note C#, 1 + rest 1 + sound_loop 2, .loop1 + octave 3 + note B_, 1 + rest 1 + note G#, 1 + duty_cycle 2 + volume_envelope 9, 2 + octave 5 + note F_, 1 + note G_, 4 + volume_envelope 10, 7 + duty_cycle 3 + octave 3 + note D#, 4 + note F_, 4 + note G_, 4 +.mainloop: + volume_envelope 9, 3 + sound_call .sub1 + octave 2 + note B_, 1 + octave 3 + note C#, 1 + note D#, 2 + octave 2 + note G_, 1 + note A#, 1 + octave 3 + note C#, 2 + octave 2 + note A#, 1 + note G_, 1 + sound_call .sub1 + note D#, 1 + note C#, 1 + note D#, 2 + octave 4 + note A#, 1 + note G#, 1 + note G_, 1 + note G#, 1 + note A#, 1 + octave 5 + note D#, 1 + sound_call .sub2 + duty_cycle 3 + note G#, 3 + note F_, 2 + rest 1 + note A#, 4 + duty_cycle 2 + note D#, 1 + note C#, 1 + note D#, 1 + note G_, 1 + note A#, 1 + octave 5 + note D#, 1 + sound_call .sub2 + duty_cycle 3 + note D#, 3 + note C#, 2 + rest 1 + octave 3 + note B_, 4 + duty_cycle 2 + note G#, 1 + note C#, 1 + note D#, 1 + note G#, 1 + note B_, 1 + octave 4 + note D#, 1 + sound_loop 0, .mainloop + +.sub1: + duty_cycle 3 + stereo_panning TRUE, TRUE + octave 3 + note B_, 1 + rest 2 + note G#, 5 + duty_cycle 2 + stereo_panning FALSE, TRUE + octave 2 + note B_, 2 + note G#, 1 + note B_, 1 + octave 3 + note D#, 1 + rest 1 + note D#, 1 + note F#, 1 + note F_, 1 + note C#, 1 + rest 1 + note F_, 1 + note C#, 1 + rest 1 + sound_ret + +.sub2: + octave 4 + note F#, 1 + note D#, 1 + rest 1 + note F#, 1 + note D#, 1 + rest 1 + octave 3 + note D#, 1 + note G#, 1 + note B_, 2 + note G#, 1 + note B_, 1 + octave 4 + note D#, 1 + rest 1 + note D#, 1 + note F#, 1 + sound_ret + +Music_Clair_Ch2: + duty_cycle 3 + vibrato 18, 3, 4 + note_type 6, 11, 7 +.loop1: + octave 3 + note A#, 2 + note B_, 2 + note A#, 2 + rest 2 + note G#, 2 + rest 2 + sound_loop 2, .loop1 + note F_, 2 + rest 2 + note C#, 2 + rest 2 + volume_envelope 8, 2 + note D#, 2 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A#, 2 + volume_envelope 9, 2 + note G_, 2 + octave 4 + note C#, 2 + note D#, 2 + octave 3 + note A#, 2 + volume_envelope 11, 2 + octave 4 + note C#, 2 + note D#, 2 + note G_, 2 + note D#, 2 + volume_envelope 12, 2 + note C#, 2 + note D#, 2 + note G_, 2 + note A#, 2 + volume_envelope 11, 7 +.mainloop: + sound_call .sub1 + note F#, 2 + rest 4 + note D#, 12 + rest 2 + note D#, 4 + note C#, 4 + octave 3 + note B_, 3 + note A#, 1 + note B_, 6 + octave 4 + note C#, 4 + rest 2 + octave 3 + note A#, 16 + rest 4 + transpose 0, 12 + sound_call .sub1 + transpose 0, 0 + octave 5 + note F#, 2 + rest 4 + note D#, 12 + rest 2 + octave 4 + note G#, 4 + note A#, 4 + note B_, 3 + octave 5 + note C_, 1 + note C#, 6 + octave 4 + note A#, 4 + rest 2 + note G#, 16 + rest 4 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note F#, 2 + rest 4 + note D#, 12 + rest 2 + octave 3 + note G#, 4 + note A#, 4 + note B_, 3 + octave 4 + note C_, 1 + note C#, 6 + octave 3 + note B_, 4 + rest 2 + octave 4 + note D#, 16 + rest 4 + sound_ret + +Music_Clair_Ch3: + note_type 12, 1, 4 + transpose 0, 12 + octave 3 + note C#, 2 + rest 4 + octave 2 + note G#, 1 + note B_, 1 + octave 3 + note C#, 2 + rest 4 + octave 2 + note G#, 1 + note B_, 1 + octave 3 + note D#, 2 + rest 2 + octave 2 + note A#, 4 + note G#, 4 + note G_, 4 +.mainloop: + sound_call .sub1 + octave 2 + note C#, 2 + rest 1 + note G#, 2 + rest 1 + note C#, 2 + rest 2 + note D#, 2 + note A#, 2 + note D#, 2 + sound_call .sub1 + octave 2 + note G#, 2 + rest 1 + note C#, 2 + rest 1 + note D#, 2 + rest 2 + note D#, 1 + note C#, 1 + note D#, 1 + note F_, 1 + note G_, 1 + note A#, 1 + octave 1 + note G#, 2 + rest 1 + octave 2 + note D#, 2 + rest 1 + octave 1 + note G#, 2 + octave 3 + note F#, 1 + rest 1 + octave 1 + note G#, 1 + octave 3 + note D#, 1 + octave 2 + note D#, 2 + octave 1 + note G#, 2 + octave 2 + note C#, 2 + rest 1 + note G#, 2 + rest 1 + note C#, 2 + octave 3 + note D#, 1 + rest 1 + octave 2 + note D#, 1 + octave 3 + note A#, 1 + octave 2 + note A#, 2 + octave 3 + note G_, 1 + octave 2 + note D#, 1 + octave 1 + note G#, 2 + rest 1 + octave 2 + note D#, 2 + rest 1 + octave 1 + note G#, 2 + octave 3 + note F#, 1 + rest 1 + octave 1 + note G#, 1 + octave 3 + note D#, 1 + octave 2 + note D#, 2 + octave 1 + note G#, 2 + octave 2 + note D#, 2 + rest 1 + note G_, 2 + rest 1 + note G#, 2 + octave 2 + note B_, 1 + rest 1 + octave 1 + note G#, 1 + octave 2 + note A#, 1 + note D#, 2 + note G#, 1 + octave 1 + note G#, 1 + sound_loop 0, .mainloop + +.sub1: + octave 1 + note G#, 2 + rest 1 + octave 2 + note D#, 2 + rest 1 + octave 1 + note G#, 2 + rest 2 + note G#, 2 + octave 2 + note D#, 2 + octave 1 + note G#, 2 + sound_ret + +Music_Clair_Ch4: + toggle_noise 3 + drum_speed 12 + stereo_panning TRUE, FALSE + drum_note 12, 8 + drum_note 12, 8 + drum_note 12, 6 + stereo_panning TRUE, TRUE + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 2 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 +.mainloop: + stereo_panning TRUE, TRUE + sound_call .sub1 + drum_note 8, 1 + stereo_panning TRUE, TRUE + sound_call .sub1 + drum_note 7, 1 + sound_loop 0, .mainloop + +.sub1: + drum_note 4, 2 + stereo_panning TRUE, FALSE + drum_note 8, 2 + stereo_panning TRUE, TRUE + drum_note 3, 2 + stereo_panning TRUE, FALSE + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 2 + stereo_panning TRUE, TRUE + drum_note 4, 1 + stereo_panning TRUE, FALSE + drum_note 8, 1 + stereo_panning TRUE, TRUE + drum_note 3, 2 + stereo_panning TRUE, FALSE + drum_note 8, 1 + sound_ret diff --git a/audio/music/contestresults.asm b/audio/music/contestresults.asm new file mode 100644 index 0000000..28575ee --- /dev/null +++ b/audio/music/contestresults.asm @@ -0,0 +1,174 @@ +Music_ContestResults: + channel_count 4 + channel 1, Music_ContestResults_Ch1 + channel 2, Music_ContestResults_Ch2 + channel 3, Music_ContestResults_Ch3 + channel 4, Music_ContestResults_Ch4 + +Music_ContestResults_Ch1: + tempo 144 + volume 7, 7 + note_type 12, 5, 1 +.mainloop: + rest 2 + octave 2 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + note G_, 1 + rest 1 + rest 2 + note A_, 1 + rest 3 + note A_, 1 + rest 3 + note A_, 1 + rest 3 + note A_, 1 + rest 1 + rest 2 + note A_, 1 + rest 3 + note A_, 1 + rest 3 + note A_, 1 + rest 3 + note A_, 1 + rest 1 + rest 2 + note B_, 1 + rest 3 + note A#, 1 + rest 3 + note A_, 1 + rest 3 + note G_, 1 + rest 1 + sound_loop 0, .mainloop + +Music_ContestResults_Ch2: + note_type 12, 6, 1 +.mainloop: + octave 2 + note C_, 2 + octave 3 + note E_, 1 + rest 1 + octave 1 + note G_, 2 + octave 3 + note E_, 1 + rest 1 + octave 1 + note A_, 2 + octave 3 + note E_, 1 + rest 1 + octave 1 + note B_, 2 + octave 3 + note E_, 1 + rest 1 + octave 2 + note D_, 2 + octave 3 + note F_, 1 + rest 1 + octave 1 + note A_, 2 + octave 3 + note F_, 1 + rest 1 + octave 1 + note B_, 2 + octave 3 + note F_, 1 + rest 1 + octave 2 + note C#, 2 + octave 3 + note F_, 1 + rest 1 +.loop1: + octave 2 + note D_, 2 + octave 3 + note F_, 1 + rest 1 + octave 1 + note A_, 2 + octave 3 + note F_, 1 + rest 1 + sound_loop 2, .loop1 + octave 2 + note G_, 2 + octave 3 + note G_, 1 + rest 1 + octave 2 + note D_, 2 + octave 3 + note F#, 1 + rest 1 + octave 2 + note G_, 2 + octave 3 + note F_, 1 + rest 1 + octave 2 + note D_, 2 + octave 3 + note D_, 1 + rest 1 + sound_loop 0, .mainloop + +Music_ContestResults_Ch3: + vibrato 8, 2, 4 + note_type 12, 2, 3 +.mainloop: + octave 4 + note E_, 5 + rest 1 + note E_, 1 + note F_, 1 + note G_, 4 + octave 5 + note C_, 4 + octave 4 + note B_, 8 + note A_, 8 + note D_, 5 + rest 1 + note D_, 1 + note E_, 1 + note F_, 4 + note B_, 4 + note A_, 8 + note G_, 8 + sound_loop 0, .mainloop + +Music_ContestResults_Ch4: + toggle_noise 4 + drum_speed 6 +.mainloop: + drum_note 2, 4 + drum_note 2, 4 + drum_note 2, 2 + drum_note 2, 2 + drum_note 2, 2 + drum_note 2, 2 + drum_note 2, 4 + drum_note 2, 4 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + sound_loop 0, .mainloop diff --git a/audio/music/credits.asm b/audio/music/credits.asm new file mode 100644 index 0000000..ee2cff0 --- /dev/null +++ b/audio/music/credits.asm @@ -0,0 +1,1675 @@ +Music_Credits: + channel_count 4 + channel 1, Music_Credits_Ch1 + channel 2, Music_Credits_Ch2 + channel 3, Music_Credits_Ch3 + channel 4, Music_Credits_Ch4 + +Music_Credits_Ch1: + tempo 139 + volume 7, 7 + stereo_panning FALSE, TRUE + duty_cycle 3 + note_type 12, 2, -7 + octave 2 + note G_, 16 + note_type 6, 10, 7 + octave 3 + note B_, 12 + note A#, 2 + note A_, 2 + note B_, 1 + octave 4 + note C_, 7 + note D_, 8 + sound_call .sub1 + rest 4 + octave 3 + note B_, 2 + rest 2 + note A_, 2 + note B_, 2 + rest 2 + note A_, 2 + note B_, 2 + volume_envelope 9, 6 + note A_, 1 + note G_, 1 + octave 3 + note D_, 1 + note C_, 1 + octave 2 + note B_, 1 + note A_, 1 + volume_envelope 9, 4 + note G_, 1 + note F_, 1 + note E_, 1 + note D_, 1 + note C_, 1 + octave 1 + note B_, 1 + note A_, 1 + octave 3 + rest 1 + volume_envelope 10, 7 + sound_call .sub1 + sound_call .sub2 + volume_envelope 9, 7 + sound_call .sub3 + octave 3 + note B_, 2 + octave 4 + note G_, 2 + note D_, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + octave 3 + note B_, 2 + octave 4 + note G_, 2 + note D_, 2 + note G_, 2 + octave 3 + note B_, 2 + octave 4 + note G_, 2 + note D_, 2 + note G_, 2 + octave 3 + note G_, 2 + octave 4 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note D_, 2 + note E_, 2 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note D_, 2 + note B_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note B_, 2 + note G_, 2 + note A_, 2 + note E_, 2 + note C_, 2 + note E_, 2 + note G#, 2 + note E_, 2 + note C_, 2 + note E_, 2 + note G_, 2 + note E_, 2 + note C_, 2 + note E_, 2 + note F#, 2 + note E_, 2 + note C_, 2 + octave 3 + note B_, 2 + sound_call .sub3 + sound_call .sub4 + note B_, 1 + octave 4 + note C_, 7 + note D_, 8 + volume_envelope 10, 7 + octave 5 + note E_, 2 + note C#, 2 + octave 4 + note A_, 2 + note E_, 2 + octave 5 + note C#, 2 + octave 4 + note A_, 2 + note E_, 2 + note C#, 2 + note C#, 1 + note D_, 7 + note E_, 7 + octave 3 + rest 1 + transpose 0, 2 + sound_call .sub1 + sound_call .sub2 + sound_call .sub3 + sound_call .sub4 + transpose 0, 0 + octave 3 + note A_, 12 + note_type 8, 10, 7 + note D_, 1 + note D_, 1 + note D_, 1 + sound_call .sub5 + octave 3 + note B_, 6 + note A_, 6 + note A_, 6 + note G_, 6 + note A#, 6 + note A#, 6 + note A_, 6 + octave 4 + note C#, 6 + sound_call .sub5 + tempo 143 + octave 4 + note D_, 6 + octave 3 + note B_, 6 + note G_, 6 + octave 4 + note D_, 6 + tempo 146 + note E_, 6 + note F#, 6 + note A_, 6 + octave 5 + note C#, 6 + note_type 12, 10, 7 +.loop1: + octave 3 + note A_, 1 + octave 4 + note D_, 1 + sound_loop 6, .loop1 + note_type 8, 10, 7 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G#, 1 + rest 1 + tempo 153 + note_type 12, 10, 7 + octave 3 + note C_, 1 + note E_, 1 + note G_, 1 + octave 4 + note C_, 1 + octave 3 + note E_, 1 + note G_, 1 + octave 4 + note C_, 1 + note E_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + note E_, 1 + note G_, 1 + note_type 8, 10, 7 + note C_, 1 + rest 1 + note E_, 1 + rest 1 + note G_, 1 + rest 1 + note_type 12, 10, 7 + octave 3 + note D_, 1 + note F#, 1 + note A_, 1 + octave 4 + note D_, 1 + octave 3 + note F#, 1 + note A_, 1 + octave 4 + note D_, 1 + note E_, 1 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note_type 8, 10, 7 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + tempo 160 + note_type 12, 10, 7 + octave 2 + note G_, 1 + rest 3 + note E_, 1 + rest 3 + note_type 8, 10, 7 + octave 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + octave 2 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C#, 1 + rest 1 + note_type 12, 10, 7 + octave 2 + note D_, 1 + rest 7 + volume_envelope 12, 7 + octave 2 + note D_, 16 + volume_envelope 11, 8 + volume_envelope 11, 7 + rest 16 + rest 16 + rest 16 + sound_ret + +.sub1: + note C_, 16 + note F#, 1 + note G_, 3 + note E_, 4 + note D_, 4 + note E_, 4 + note D_, 4 + octave 3 + note B_, 2 + rest 2 + note A#, 2 + note B_, 2 + rest 2 + note A#, 2 + note B_, 4 + note G_, 4 + rest 4 + octave 4 + note D_, 4 + rest 4 + note E_, 4 + octave 3 + note A#, 4 + note G_, 4 + note E_, 4 + note G_, 4 + octave 4 + note G_, 4 + note C_, 4 + note D_, 4 + note C_, 2 + rest 2 + octave 3 + note B_, 2 + octave 4 + note C_, 2 + rest 2 + octave 3 + note B_, 2 + octave 4 + note C_, 4 + octave 3 + note A_, 4 + rest 4 + octave 4 + note C_, 4 + octave 3 + note G#, 8 + note F_, 4 + note C_, 7 + note G#, 1 + note A_, 1 + note A#, 7 + note G#, 4 + rest 4 + octave 4 + note C_, 4 + octave 3 + note G_, 4 + note E_, 4 + note C_, 4 + note E_, 4 + note G_, 4 + octave 4 + note C_, 4 + octave 5 + note D_, 1 + rest 1 + octave 4 + note A_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + octave 5 + note D_, 1 + rest 1 + octave 4 + note A_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + octave 5 + note D_, 1 + rest 1 + octave 4 + note A_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + octave 5 + note D_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + octave 6 + note C_, 1 + rest 1 + sound_ret + +.sub2: + octave 4 + note C_, 4 + octave 3 + note D_, 4 + note G_, 4 + note B_, 8 + octave 4 + note D_, 4 + note C_, 4 + note D#, 4 + sound_ret + +.sub3: + octave 3 + note A_, 2 + octave 4 + note E_, 2 + note C_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note C_, 2 + note E_, 2 + octave 3 + note A_, 2 + octave 4 + note E_, 2 + note D_, 2 + note E_, 2 + note A_, 4 + note B_, 2 + octave 5 + note C_, 2 + octave 4 + note B_, 2 + note G_, 2 + note F_, 2 + note D_, 2 + note G_, 2 + note F_, 2 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note F_, 2 + note D_, 2 + octave 3 + note B_, 2 + note G_, 2 + note B_, 2 + octave 4 + note D_, 2 + note F_, 2 + note F#, 2 + octave 3 + note G_, 2 + octave 4 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note D_, 2 + note C_, 2 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note D_, 2 + octave 3 + note G_, 2 + octave 4 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note D_, 2 + note G_, 4 + note A_, 2 + note B_, 2 + octave 3 + note A_, 4 + octave 4 + note C_, 4 + note E_, 4 + octave 3 + note G#, 8 + octave 4 + note C_, 8 + note E_, 4 + octave 3 + note A_, 2 + octave 4 + note F_, 2 + note C_, 2 + note F_, 2 + note D_, 2 + note F_, 2 + note C_, 2 + note F_, 2 + octave 3 + note A_, 2 + octave 4 + note F_, 2 + note C_, 2 + note F_, 2 + note E_, 2 + note F_, 2 + note C_, 2 + note F_, 2 + sound_ret + +.sub4: + octave 3 + note A_, 2 + octave 4 + note F#, 2 + note C_, 2 + note F#, 2 + note D_, 2 + note F#, 2 + note C_, 2 + note F#, 2 + note E_, 2 + note F#, 2 + note C_, 2 + note F#, 2 + octave 3 + note A_, 2 + octave 4 + note F#, 2 + note C_, 2 + note F#, 2 + note C_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + octave 3 + note B_, 12 + note A#, 2 + note A_, 2 + sound_ret + +.sub5: + rest 6 + octave 3 + note D_, 6 + note E_, 6 + note F_, 6 + note F#, 6 + note A_, 6 + octave 4 + note F#, 6 + note C#, 6 + sound_ret + +Music_Credits_Ch2: + duty_cycle 1 + vibrato 20, 2, 3 + note_type 12, 2, -7 + stereo_panning TRUE, FALSE + octave 4 + note G_, 16 + volume_envelope 12, 7 + octave 5 + note G_, 8 + octave 3 + note G_, 4 + note F_, 4 + note_type 6, 12, 7 + sound_call .sub1 + octave 1 + note G_, 2 + rest 2 + octave 2 + note G_, 2 + rest 2 + note F#, 2 + note G_, 2 + rest 2 + octave 3 + note C_, 2 + octave 2 + note G_, 2 + rest 2 + note G_, 2 + rest 2 + note G_, 2 + volume_envelope 9, 7 + note F#, 1 + note F_, 1 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + volume_envelope 12, 7 + sound_call .sub1 + sound_call .sub2 + sound_call .sub3 + octave 4 + note B_, 1 + octave 5 + note C_, 11 + octave 4 + note B_, 8 + note A_, 8 + note B_, 4 + note F#, 1 + note G_, 15 + note_type 12, 12, 7 + octave 5 + note E_, 15 + note_type 6, 12, 7 + note G_, 1 + note G#, 1 + note A_, 2 + note E_, 2 + note C_, 2 + octave 4 + note A_, 2 + octave 5 + note E_, 2 + note C_, 2 + octave 4 + note A_, 2 + note E_, 2 + sound_call .sub3 + octave 4 + note B_, 1 + octave 5 + note C_, 11 + octave 4 + note B_, 8 + octave 5 + note C_, 12 + note_type 12, 12, 7 + note D_, 16 + note G_, 8 + octave 3 + note G_, 4 + note F_, 4 + octave 5 + note A_, 1 + note E_, 1 + note C#, 1 + octave 4 + note A_, 1 + octave 5 + note E_, 1 + note C#, 1 + octave 4 + note A_, 1 + note E_, 1 + octave 3 + note A_, 4 + note G_, 4 + note_type 6, 12, 7 + transpose 0, 2 + sound_call .sub1 + sound_call .sub2 + sound_call .sub3 + transpose 0, 0 + octave 5 + note C#, 1 + note D_, 11 + note C#, 8 + note D_, 12 + note_type 12, 12, 7 + note E_, 16 + note A_, 14 + note_type 8, 12, 7 + octave 2 + note D_, 1 + note D_, 1 + note D_, 1 + note D_, 6 + octave 3 + note F#, 6 + note G_, 6 + note G#, 6 + note A_, 6 + octave 4 + note C#, 6 + note A_, 6 + note G_, 6 + note G_, 6 + note F#, 6 + note F#, 6 + note E_, 6 + note E_, 6 + note D_, 6 + note C#, 6 + note E_, 6 + octave 1 + note D_, 3 + rest 3 + note D_, 3 + rest 3 + note D_, 3 + rest 3 + note D_, 3 + rest 3 + note F#, 3 + rest 3 + note F#, 3 + rest 3 + note F#, 3 + note_type 12, 12, 7 + octave 2 + note F#, 1 + rest 1 + octave 1 + note F#, 2 + octave 2 + note F#, 1 + rest 1 +.loop1: + octave 1 + note G_, 2 + octave 2 + note G_, 1 + rest 1 + sound_loop 4, .loop1 + octave 1 + note A_, 1 + octave 2 + note A_, 1 + note E_, 1 + note A_, 1 + octave 1 + note A_, 1 + octave 2 + note A_, 1 + note E_, 1 + note A_, 1 + octave 1 + note A_, 1 + octave 3 + note C#, 1 + note E_, 1 + note G_, 1 + note E_, 1 + note G_, 1 + note A_, 1 + octave 4 + note C#, 1 + octave 5 + note D_, 12 + note_type 8, 12, 7 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C#, 1 + rest 1 + note_type 12, 12, 7 + note D_, 12 + note_type 8, 12, 7 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C#, 1 + rest 1 + note D_, 9 + note_type 12, 12, 7 + octave 4 + note F#, 1 + note A_, 1 + octave 5 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + note_type 8, 12, 7 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + note_type 12, 12, 7 + note C_, 1 + rest 3 + note C_, 1 + rest 3 + note_type 8, 12, 7 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C#, 1 + rest 1 + note_type 12, 12, 7 + note D_, 1 + rest 7 + volume_envelope 12, 8 + volume_envelope 12, 7 + octave 1 + note D_, 16 + volume_envelope 12, 7 + rest 16 + rest 16 + rest 16 + sound_ret + +.sub1: + octave 2 + note C_, 4 + volume_envelope 11, 1 + octave 5 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note F#, 1 + rest 1 + note G_, 2 + rest 2 + volume_envelope 12, 7 + octave 2 + note C_, 1 + rest 1 + note C_, 4 + rest 12 + octave 1 + note B_, 4 + rest 10 + note B_, 1 + rest 1 + note B_, 2 + rest 2 + note B_, 2 + rest 2 + octave 2 + note G_, 2 + octave 1 + note B_, 6 + note A#, 4 + volume_envelope 11, 1 + octave 5 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note D#, 1 + rest 1 + note E_, 2 + rest 2 + volume_envelope 12, 7 + octave 1 + note A#, 1 + rest 1 + note A#, 4 + rest 12 + note A_, 4 + rest 10 + note A_, 1 + rest 1 + note A_, 2 + rest 2 + note A_, 2 + rest 2 + octave 2 + note F_, 2 + octave 1 + note A_, 6 + note G#, 4 + volume_envelope 11, 1 + octave 5 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 4 + note B_, 1 + rest 1 + octave 5 + note C_, 2 + rest 2 + volume_envelope 12, 7 + octave 1 + note G#, 1 + rest 1 + note G#, 4 + rest 12 + note G_, 4 + rest 10 + note G_, 1 + rest 1 + note G_, 2 + rest 2 + note G_, 2 + rest 2 + octave 2 + note E_, 2 + octave 1 + note G_, 6 + note F#, 4 + rest 2 + note F#, 2 + note F#, 2 + octave 2 + note D_, 2 + octave 1 + note F#, 4 + note A_, 2 + octave 2 + note D_, 2 + note F#, 2 + note A_, 2 + note D_, 2 + note F#, 2 + note A_, 2 + octave 3 + note C_, 2 + sound_ret + +.sub2: + octave 1 + note G_, 4 + rest 4 + note G_, 2 + rest 2 + octave 2 + note G_, 12 + note F#, 8 + sound_ret + +.sub3: + octave 4 + note A_, 8 + note B_, 8 + octave 5 + note C_, 8 + note E_, 8 + note_type 12, 12, 7 + note D_, 16 + octave 4 + note G_, 4 + note A_, 4 + note B_, 4 + octave 5 + note D_, 4 + note C_, 10 + note_type 6, 12, 7 + octave 4 + note B_, 1 + octave 5 + note C_, 3 + octave 4 + note B_, 4 + octave 5 + note C_, 4 + note_type 12, 12, 7 + octave 4 + note A_, 10 + note_type 6, 12, 7 + note G#, 1 + note A_, 3 + note B_, 4 + octave 5 + note C_, 4 + sound_ret + +Music_Credits_Ch3: + vibrato 22, 2, 3 + note_type 12, 3, 4 + stereo_panning TRUE, TRUE + octave 6 + note G_, 1 + note D_, 1 + note C_, 1 + octave 5 + note G_, 1 + octave 6 + note G_, 1 + note D_, 1 + note C_, 1 + octave 5 + note G_, 1 + volume_envelope 2, 4 + octave 6 + note G_, 1 + note D_, 1 + note C_, 1 + octave 5 + note G_, 1 + volume_envelope 1, 4 + octave 6 + note G_, 1 + note D_, 1 + note C_, 1 + octave 5 + note G_, 1 + octave 6 + note G_, 1 + note D_, 1 + octave 5 + note B_, 1 + note G_, 1 + octave 6 + note D_, 1 + octave 5 + note B_, 1 + note G_, 1 + note D_, 1 + note_type 6, 1, 4 + note D#, 1 + note E_, 7 + note F_, 8 + sound_call .sub1 + octave 4 + note G_, 1 + rest 1 + octave 5 + note G_, 1 + rest 1 + note F#, 1 + note G_, 1 + rest 1 + note F#, 1 + note G_, 1 + note_type 6, 1, 4 + volume_envelope 2, 4 + note F_, 1 + note E_, 1 + volume_envelope 1, 4 + note E_, 4 + rest 4 + note F_, 4 + sound_call .sub1 + sound_call .sub2 + sound_call .sub3 + sound_call .sub4 + octave 2 + note G_, 4 + rest 2 + note G_, 1 + rest 1 + note G_, 2 + octave 3 + note G_, 2 + rest 2 + octave 2 + note G_, 1 + rest 1 + note G_, 2 + octave 3 + note G_, 2 + octave 2 + note G_, 4 + note B_, 2 + octave 3 + note D_, 2 + note F#, 2 + note G_, 2 + octave 2 + note E_, 4 + rest 2 + note E_, 1 + rest 1 + note E_, 2 + octave 3 + note E_, 2 + rest 2 + octave 2 + note E_, 1 + rest 1 + note E_, 2 + octave 3 + note E_, 2 + octave 2 + note E_, 4 + note G#, 2 + note B_, 2 + octave 3 + note D#, 2 + note E_, 2 + octave 2 + note A_, 4 + octave 3 + note E_, 2 + rest 2 + octave 2 + note G#, 2 + octave 3 + note E_, 2 + rest 2 + octave 2 + note G#, 2 + note G_, 2 + octave 3 + note E_, 2 + rest 2 + octave 2 + note G_, 2 + note F#, 4 + octave 3 + note E_, 4 + sound_call .sub3 + sound_call .sub4 + sound_call .sub5 + octave 5 + note D#, 1 + note E_, 7 + note F_, 8 + octave 2 + note A_, 2 + rest 2 + octave 3 + note E_, 2 + rest 2 + note A_, 2 + rest 2 + octave 4 + note C#, 2 + rest 2 + octave 5 + note F_, 1 + note F#, 7 + note G_, 8 + transpose 0, 2 + sound_call .sub1 + sound_call .sub2 + transpose 1, 2 + sound_call .sub3 + transpose 0, 2 + sound_call .sub4 + sound_call .sub5 + transpose 0, 0 + octave 6 + note C#, 2 + octave 5 + note A_, 2 + note E_, 2 + note C#, 2 + note A_, 2 + note E_, 2 + note_type 8, 1, 4 + octave 2 + note D_, 1 + note D_, 1 + note D_, 1 + note_type 12, 1, 4 + note D_, 16 + note F#, 16 + note G_, 16 + note G_, 8 + note A_, 8 + rest 4 + octave 4 + note F#, 4 + note G_, 4 + note G#, 4 + note A_, 4 + octave 5 + note C#, 4 + note A_, 4 + note G_, 4 + note G_, 4 + note F#, 4 + note E_, 4 + note G_, 4 + note A_, 4 + note B_, 4 + octave 6 + note C#, 4 + note E_, 4 + volume_envelope 1, 5 + octave 4 + note D_, 6 + note F#, 2 + note A_, 8 + note E_, 6 + note G_, 2 + octave 5 + note C_, 6 + octave 4 + note B_, 1 + note A#, 1 + note A_, 8 + volume_envelope 1, 4 + octave 2 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note_type 8, 1, 4 + octave 3 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note_type 12, 1, 4 + octave 5 + note G_, 1 + rest 3 + note E_, 1 + rest 3 + note_type 8, 1, 4 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G#, 1 + rest 1 + note_type 12, 1, 4 + note A_, 1 + rest 16 + rest 16 + rest 16 + sound_ret + +.sub1: + note G_, 16 + octave 6 + note C#, 1 + note D_, 3 + note C_, 4 + octave 5 + note B_, 4 + octave 6 + note C_, 4 + note_type 12, 1, 4 + octave 5 + note G_, 10 + note E_, 2 + rest 2 + note F_, 2 + note G_, 10 + note_type 6, 1, 4 + note G#, 1 + note A_, 7 + note E_, 4 + note G_, 12 + note F_, 8 + note D_, 4 + rest 4 + note E_, 4 + note_type 12, 1, 4 + note F_, 10 + note_type 6, 1, 4 + note F#, 1 + note G_, 7 + note F_, 4 + note E_, 4 + note D#, 4 + note E_, 4 + note B_, 12 + note A_, 8 + note_type 12, 1, 4 + note D_, 16 + sound_ret + +.sub2: + note_type 6, 1, 4 + note F#, 1 + note G_, 3 + octave 4 + note G_, 4 + octave 5 + note D_, 4 + note G_, 12 + note G#, 8 + sound_ret + +.sub3: + octave 3 + note F_, 4 + rest 2 + note F_, 2 + rest 2 + octave 4 + note C_, 2 + octave 3 + note A_, 2 + note F_, 2 + octave 4 + note C_, 2 + rest 2 + note C_, 2 + rest 2 + octave 3 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note F_, 4 + note G_, 4 + rest 2 + note G_, 2 + rest 2 + octave 4 + note D_, 2 + octave 3 + note B_, 2 + note G_, 2 + octave 4 + note D_, 2 + rest 2 + note D_, 2 + rest 2 + octave 3 + note B_, 2 + octave 4 + note D_, 2 + octave 3 + note G_, 4 + note E_, 4 + rest 2 + note E_, 2 + rest 2 + note B_, 2 + note G_, 2 + note E_, 2 + note B_, 2 + rest 2 + note B_, 2 + rest 2 + note G_, 2 + note B_, 2 + note E_, 4 + note A_, 4 + rest 2 + note A_, 2 + rest 2 + octave 4 + note E_, 2 + note C_, 2 + octave 3 + note G#, 2 + octave 4 + note C_, 2 + octave 3 + note G#, 2 + rest 2 + note G#, 2 + octave 4 + note C_, 2 + note E_, 2 + note C_, 2 + octave 3 + note G#, 2 + sound_ret + +.sub4: + octave 2 + note F_, 4 + rest 2 + note F_, 1 + rest 1 + note F_, 2 + octave 3 + note F_, 2 + rest 2 + octave 2 + note F_, 1 + rest 1 + note F_, 2 + octave 3 + note F_, 2 + octave 2 + note F_, 4 + note A_, 2 + octave 3 + note C_, 2 + note E_, 2 + note F_, 2 + sound_ret + +.sub5: + octave 2 + note F#, 4 + rest 2 + note F#, 1 + rest 1 + note F#, 2 + octave 3 + note F#, 2 + rest 2 + octave 2 + note F#, 1 + rest 1 + note F#, 2 + octave 3 + note F#, 2 + octave 2 + note F#, 4 + note A_, 2 + octave 3 + note C_, 2 + note F_, 2 + note F#, 2 + note G_, 8 + octave 4 + note C_, 8 + note D_, 8 + note F_, 8 + octave 6 + note G_, 2 + note D_, 2 + octave 5 + note B_, 2 + note G_, 2 + octave 6 + note D_, 2 + octave 5 + note B_, 2 + note G_, 2 + note D_, 2 + sound_ret + +Music_Credits_Ch4: + toggle_noise 3 + drum_speed 12 + drum_note 9, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 9, 1 + drum_note 8, 1 + drum_note 12, 2 + drum_note 9, 1 + drum_note 8, 1 + drum_note 9, 1 + drum_note 8, 1 + drum_note 11, 4 + drum_note 11, 4 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 +.loop1: + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 7, .loop1 + drum_note 9, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 7, 2 + drum_note 3, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 8, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 3, 1 +.loop2: + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 7, .loop2 + drum_note 9, 1 + drum_note 8, 1 + drum_note 7, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 11, 4 + drum_note 2, 4 + drum_note 9, 1 + drum_note 8, 1 + drum_note 12, 2 + drum_note 9, 1 + drum_note 8, 1 + drum_note 12, 2 + drum_note 11, 4 + drum_note 11, 4 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 +.loop3: + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 7, .loop3 + drum_note 9, 1 + drum_note 8, 1 + drum_note 7, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 7 + drum_speed 8 + drum_note 11, 1 + drum_note 11, 1 + drum_note 11, 1 + drum_speed 12 + drum_note 12, 16 + rest 16 + drum_note 12, 15 + rest 1 + drum_note 12, 8 + drum_note 12, 8 + drum_note 12, 16 + rest 16 + drum_note 12, 16 + drum_note 12, 8 + drum_note 12, 6 + drum_note 3, 1 + drum_note 3, 1 + drum_note 12, 12 + drum_speed 8 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_speed 12 + drum_note 12, 12 + drum_speed 8 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 12, 12 + drum_speed 12 + drum_note 3, 1 + rest 1 + drum_note 3, 1 + rest 1 + drum_speed 8 + drum_note 2, 2 + drum_note 2, 2 + drum_note 3, 2 + drum_speed 12 + drum_note 3, 1 + rest 3 + drum_note 3, 1 + rest 3 + drum_speed 8 + drum_note 2, 2 + drum_note 2, 2 + drum_note 2, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_speed 12 + drum_note 3, 1 + rest 7 + drum_note 11, 8 + rest 16 + rest 16 + rest 16 + sound_ret + +.sub1: + drum_note 9, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 9, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 8, 1 + drum_note 7, 2 + sound_ret + +.sub2: + drum_note 9, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 8, 1 + drum_note 9, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 8, 1 + drum_note 9, 1 + drum_note 3, 1 + drum_note 7, 2 + drum_note 3, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 11, 1 + drum_note 3, 1 + sound_ret diff --git a/audio/music/crystalopening.asm b/audio/music/crystalopening.asm new file mode 100644 index 0000000..386c7e1 --- /dev/null +++ b/audio/music/crystalopening.asm @@ -0,0 +1,360 @@ +Music_CrystalOpening: + channel_count 4 + channel 1, Music_CrystalOpening_Ch1 + channel 2, Music_CrystalOpening_Ch2 + channel 3, Music_CrystalOpening_Ch3 + channel 4, Music_CrystalOpening_Ch4 + +Music_CrystalOpening_Ch1: + tempo 136 + volume 7, 7 + pitch_offset 2 + vibrato 16, 3, 4 + duty_cycle 3 + stereo_panning TRUE, FALSE + note_type 12, 9, 2 + octave 2 + note F#, 2 + note F#, 4 + note F#, 2 + note F#, 2 + note F#, 4 + note F#, 2 + note F#, 2 + note F#, 4 + note F#, 2 + note F#, 2 + note F#, 6 + note_type 12, 11, 4 + octave 2 + note B_, 2 + note F#, 2 + note E_, 2 + note B_, 2 + octave 3 + note C#, 2 + octave 2 + note G#, 2 + note F#, 2 + octave 3 + note C#, 2 + octave 2 + note F#, 2 + note C#, 2 + octave 1 + note B_, 2 + octave 2 + note F#, 2 + octave 3 + note F#, 2 + octave 2 + note F#, 2 + note B_, 2 + octave 3 + note E_, 2 + note F#, 2 + note E_, 2 + octave 2 + note B_, 2 + note F#, 2 + note B_, 2 + octave 3 + note E_, 2 + note F#, 2 + note E_, 2 + octave 2 + note B_, 2 + note F#, 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note D_, 8 + octave 3 + note D_, 2 + octave 2 + note A_, 2 + note G_, 2 + octave 3 + note D_, 2 + note E_, 2 + octave 2 + note B_, 2 + note A_, 2 + octave 3 + note E_, 2 + octave 2 + note A_, 2 + note E_, 2 + note D_, 2 + note A_, 2 + octave 3 + note A_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note F#, 2 + octave 4 + note C_, 2 + note_type 12, 10, 0 + note D_, 8 + note D_, 8 + note_type 12, 10, 7 + note D_, 8 + note_type 12, 11, 2 + octave 2 + note D_, 16 + sound_ret + +Music_CrystalOpening_Ch2: + note_type 12, 10, 2 + duty_cycle 3 + vibrato 8, 4, 4 + octave 2 + note B_, 2 + note B_, 4 + note B_, 2 + note B_, 2 + note B_, 4 + note B_, 2 + note B_, 2 + note B_, 4 + note B_, 2 + note B_, 2 + note B_, 2 + note_type 12, 10, 2 + octave 2 + note E_, 1 + note B_, 1 + octave 3 + note E_, 1 + note F#, 1 + note_type 12, 12, 7 + note E_, 8 + note F#, 8 + octave 2 + note B_, 8 + note_type 12, 11, 0 + octave 3 + note B_, 8 + note_type 12, 12, 7 + note B_, 16 + rest 16 + note G_, 8 + note A_, 8 + note D_, 8 + note_type 12, 12, 7 + octave 4 + note D_, 8 + note_type 12, 7, -4 + note D_, 8 + note_type 12, 12, 7 + note D_, 8 + note G_, 8 + note_type 12, 11, 0 + note F#, 8 + note F#, 8 + note_type 12, 12, 7 + note F#, 8 + note_type 12, 12, 2 + octave 3 + note D_, 16 + sound_ret + +Music_CrystalOpening_Ch3: + note_type 12, 1, 6 + octave 1 + note B_, 4 + note_type 6, 1, 6 + note B_, 1 + note A#, 1 + note A_, 1 + note G#, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note_type 12, 1, 6 + note B_, 4 + note B_, 4 + note B_, 4 + note_type 6, 1, 6 + note B_, 1 + note A#, 1 + note A_, 1 + note G#, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note_type 12, 1, 6 + note B_, 4 + note B_, 4 + octave 2 + note B_, 8 + note F#, 8 + note D#, 8 + note B_, 4 + note F#, 4 + note B_, 4 + octave 3 + note E_, 4 + note F#, 4 + note E_, 4 + note D_, 4 + note C#, 4 + octave 2 + note A_, 8 + octave 3 + note D_, 8 + octave 2 + note A_, 8 + note F#, 8 + octave 3 + note D_, 4 + note E_, 4 + note F#, 4 + note E_, 4 + note D_, 4 + note C#, 4 + note C_, 8 + note D_, 8 + note D_, 16 + octave 2 + note D_, 1 + rest 15 + sound_ret + +Music_CrystalOpening_Ch4: + stereo_panning FALSE, TRUE + toggle_noise 3 + drum_speed 12 + rest 16 + rest 12 + octave 2 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 4 + drum_speed 8 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 6 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 3 + drum_speed 12 + drum_note 2, 1 + drum_note 2, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 2 + drum_note 2, 1 + drum_note 2, 1 + drum_note 8, 2 + drum_note 3, 1 + drum_note 2, 1 + drum_note 10, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 8, 1 + rest 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 10, 1 + drum_note 8, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 10, 2 + drum_note 2, 2 + drum_note 2, 2 + drum_note 2, 2 + drum_note 10, 2 + drum_note 3, 2 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 4 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 4 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 10, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 10, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 10, 1 + drum_note 8, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 10, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 2, 2 + drum_note 3, 2 + rest 2 + drum_note 3, 2 + drum_note 3, 2 + rest 6 + rest 16 + rest 16 + sound_ret diff --git a/audio/music/dancinghall.asm b/audio/music/dancinghall.asm new file mode 100644 index 0000000..95d3134 --- /dev/null +++ b/audio/music/dancinghall.asm @@ -0,0 +1,306 @@ +Music_DancingHall: + channel_count 3 + channel 1, Music_DancingHall_Ch1 + channel 2, Music_DancingHall_Ch2 + channel 3, Music_DancingHall_Ch3 + + db $3 ; unused, leftover from a channel 4 + +Music_DancingHall_Ch1: + tempo 208 + volume 7, 7 + stereo_panning FALSE, TRUE + note_type 6, 11, 7 + rest 3 + duty_cycle 0 +.mainloop: + note_type 12, 11, 7 + sound_call .sub1 + rest 16 + sound_call .sub1 + rest 16 + rest 16 + rest 16 + volume_envelope 11, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + note F_, 1 + note A_, 1 + note B_, 1 + note A_, 1 + note B_, 1 + octave 4 + note D_, 1 + note F_, 2 + note_type 8, 11, 1 + note D_, 1 + note E_, 1 + note D_, 1 + octave 3 + note B_, 3 + note A_, 3 + note_type 12, 11, 1 + note B_, 1 + note A_, 1 + note D_, 1 + note E_, 1 + octave 4 + note F_, 2 + note_type 8, 11, 1 + octave 3 + note B_, 1 + octave 4 + note D_, 1 + octave 3 + note B_, 1 + note_type 12, 11, 5 + note A_, 1 + rest 1 + note B_, 1 + note B_, 1 + note A_, 1 + rest 1 + note F_, 2 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note B_, 1 + rest 1 + note A_, 1 + rest 1 + note B_, 1 + rest 1 + note A_, 1 + rest 1 + octave 4 + note E_, 1 + rest 1 + note D_, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + sound_ret + +Music_DancingHall_Ch2: + stereo_panning TRUE, FALSE + note_type 6, 10, 1 + duty_cycle 0 + vibrato 16, 2, 4 + rest 3 +.mainloop: + note_type 6, 10, 2 + sound_call .sub1 + sound_call .sub1 + volume_envelope 10, 7 + octave 2 + note D_, 16 + note F_, 16 + note_type 12, 10, 7 + note E_, 16 + octave 3 + note F_, 1 + note A_, 1 + note B_, 1 + octave 4 + note D_, 1 + note E_, 1 + note D_, 1 + note E_, 1 + note A_, 1 + note B_, 2 + note_type 8, 10, 7 + note A_, 1 + note B_, 1 + note A_, 1 + note F_, 3 + note D_, 3 + note_type 12, 10, 7 + note E_, 1 + note D_, 1 + octave 3 + note A_, 1 + note B_, 1 + octave 4 + note A_, 2 + note_type 8, 10, 7 + note F_, 1 + note A_, 1 + note F_, 1 + note_type 12, 10, 7 + note E_, 1 + rest 1 + note F_, 1 + note F_, 1 + note E_, 1 + rest 1 + note D_, 2 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 10, 1 + octave 4 + note E_, 4 + octave 2 + note E_, 4 + octave 4 + note E_, 4 + octave 2 + note E_, 4 + octave 4 + note B_, 4 + note A_, 4 + note F_, 4 + note A_, 4 + volume_envelope 3, 3 + note D_, 1 + note F_, 1 + volume_envelope 6, 3 + note D_, 1 + note F_, 1 + volume_envelope 9, 3 + note D_, 1 + note F_, 1 + volume_envelope 12, 3 + note D_, 1 + note F_, 1 + volume_envelope 14, 3 + note D_, 1 + note F_, 1 + volume_envelope 10, 3 + note D_, 1 + note F_, 1 + volume_envelope 8, 3 + note D_, 1 + note F_, 1 + volume_envelope 5, 3 + note D_, 1 + note F_, 1 + volume_envelope 7, 3 + octave 3 + note B_, 1 + octave 4 + note E_, 1 + volume_envelope 10, 3 + octave 3 + note B_, 1 + octave 4 + note E_, 1 + volume_envelope 11, 3 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + volume_envelope 12, 3 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + volume_envelope 13, 3 + octave 3 + note E_, 1 + note B_, 1 + volume_envelope 14, 3 + note E_, 1 + note B_, 1 + volume_envelope 15, 3 + note A_, 1 + octave 4 + note D_, 1 + volume_envelope 15, 3 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + sound_ret + +Music_DancingHall_Ch3: + stereo_panning TRUE, TRUE + vibrato 22, 2, 4 + note_type 6, 1, 0 + octave 5 + note A_, 1 + note B_, 1 + octave 6 + note D_, 1 +.mainloop: + note E_, 13 + note D_, 1 + note E_, 1 + note A_, 1 + note B_, 16 + volume_envelope 1, 4 + octave 3 + note F_, 16 + note E_, 14 + volume_envelope 1, 0 + octave 6 + note E_, 1 + note F_, 1 + note E_, 13 + note D_, 1 + note E_, 1 + note A_, 1 + note B_, 16 + volume_envelope 1, 4 + octave 3 + note F_, 16 + note E_, 16 + volume_envelope 1, 3 + octave 4 + note F_, 2 + note A_, 2 + note B_, 2 + octave 5 + note D_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note A_, 2 + note A#, 1 + note B_, 3 + note_type 8, 1, 3 + note A_, 1 + note B_, 1 + note A_, 1 + note F_, 3 + note D_, 3 + note_type 12, 1, 3 + note E_, 1 + note D_, 1 + octave 4 + note A_, 1 + note B_, 1 + octave 5 + note A_, 2 + note_type 8, 1, 3 + note F_, 1 + note A_, 1 + note F_, 1 + note_type 6, 1, 3 + note D#, 1 + note E_, 3 + note D_, 4 + octave 4 + note B_, 4 + octave 5 + note D_, 4 + volume_envelope 1, 4 + octave 3 + note D_, 16 + note F_, 16 + note E_, 16 + note E_, 13 + volume_envelope 1, 0 + octave 5 + note A_, 1 + note B_, 1 + octave 6 + note D_, 1 + sound_loop 0, .mainloop diff --git a/audio/music/darkcave.asm b/audio/music/darkcave.asm new file mode 100644 index 0000000..08206b2 --- /dev/null +++ b/audio/music/darkcave.asm @@ -0,0 +1,487 @@ +Music_DarkCave: + channel_count 4 + channel 1, Music_DarkCave_Ch1 + channel 2, Music_DarkCave_Ch2 + channel 3, Music_DarkCave_Ch3 + channel 4, Music_DarkCave_Ch4 + +Music_DarkCave_Ch1: + tempo 128 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 + vibrato 17, 1, 5 + stereo_panning TRUE, FALSE + note_type 12, 10, 7 +.loop1: + rest 16 + sound_loop 4, .loop1 + octave 3 + note D#, 16 + note D_, 16 + note C#, 16 + note C_, 16 + volume_envelope 10, 3 +.mainloop: +.loop2: + sound_call .sub1 + sound_loop 3, .loop2 + volume_envelope 11, 7 + note G#, 8 + note D#, 8 + note G_, 8 + note D_, 8 + note F_, 8 + note C#, 8 + note D#, 8 + note G_, 8 + note G#, 8 + note D#, 8 + note G_, 8 + note D_, 8 + note F_, 8 + note C#, 8 + note D#, 8 + note C_, 8 + volume_envelope 10, 3 +.loop3: + sound_call .sub1 + sound_loop 2, .loop3 + rest 16 + rest 8 + volume_envelope 11, 7 + octave 2 + note F_, 2 + note G_, 2 + note G#, 4 + octave 3 + note D#, 16 + rest 8 + octave 2 + note G#, 2 + note G_, 2 + note G#, 4 + octave 3 + note D#, 16 + note G_, 2 + rest 6 + note F_, 2 + note G_, 2 + note G#, 4 + note G_, 16 + note F_, 2 + rest 6 + note G#, 2 + note G_, 2 + note G#, 4 + volume_envelope 10, 3 +.loop4: + sound_call .sub1 + sound_loop 2, .loop4 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note D#, 2 + octave 3 + note G#, 2 + octave 4 + note C_, 2 + note D#, 2 + octave 3 + note G#, 2 + octave 4 + note C_, 2 + note D#, 2 + note C_, 2 + note D_, 2 + octave 3 + note G_, 2 + note A#, 2 + octave 4 + note D_, 2 + octave 3 + note G_, 2 + note A#, 2 + octave 4 + note D_, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note F_, 2 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note F_, 2 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note A#, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note A#, 2 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + sound_ret + +Music_DarkCave_Ch2: + duty_cycle 1 + vibrato 18, 3, 6 + stereo_panning FALSE, TRUE + note_type 12, 10, 7 +.loop1: + rest 16 + sound_loop 4, .loop1 + octave 3 + note G_, 16 + note A#, 16 + note F_, 16 + note G_, 16 +.mainloop: +.loop2: + rest 16 + sound_loop 4, .loop2 + rest 8 + stereo_panning TRUE, TRUE + volume_envelope 12, 7 + octave 5 + note C_, 8 + volume_envelope 12, 4 + note D_, 2 + note C_, 2 + octave 4 + note A#, 2 + note G_, 4 + note A#, 2 + octave 5 + note D_, 4 + volume_envelope 11, 0 + note C#, 4 + volume_envelope 11, 7 + note C#, 12 + volume_envelope 5, -1 + note C_, 8 + volume_envelope 12, 7 + note C_, 8 + rest 8 + volume_envelope 12, 7 + note C_, 8 + volume_envelope 12, 4 + note D_, 2 + note C_, 2 + octave 4 + note A#, 2 + note G_, 2 + note G_, 2 + note A#, 2 + octave 5 + note D_, 4 + volume_envelope 12, 7 + note C#, 12 + volume_envelope 12, 3 + note C_, 2 + note C#, 2 + volume_envelope 11, 0 + note D#, 10 + volume_envelope 11, 7 + note D#, 6 + stereo_panning FALSE, TRUE + volume_envelope 12, 4 + octave 4 + note F_, 4 + note D#, 2 + note D_, 2 + note D#, 4 + note D_, 2 + note C_, 2 + note D_, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + note D_, 4 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 8 + octave 3 + note A#, 8 + volume_envelope 11, 0 + octave 4 + note D#, 2 + note D_, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 8 + note F_, 4 + note D#, 2 + note D_, 2 + note D#, 4 + note D_, 2 + note C_, 2 + note D_, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + note D_, 4 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 4 + note C_, 2 + note C#, 2 + note C_, 2 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + volume_envelope 11, 0 + note C_, 8 + volume_envelope 11, 7 + note C_, 8 + volume_envelope 12, 7 + stereo_panning TRUE, TRUE + rest 8 + octave 5 + note C_, 8 + volume_envelope 12, 4 + note D_, 2 + note C_, 2 + octave 4 + note A#, 2 + note G_, 4 + note A#, 2 + octave 5 + note D_, 4 + volume_envelope 4, -1 + note C#, 8 + volume_envelope 12, 7 + note C#, 8 + volume_envelope 11, 0 + note C_, 8 + volume_envelope 11, 7 + note C_, 8 + rest 8 + volume_envelope 12, 7 + note C_, 8 + volume_envelope 12, 4 + note D_, 2 + note C_, 2 + octave 4 + note A#, 2 + note G_, 2 + note G_, 2 + note A#, 2 + octave 5 + note D_, 4 + volume_envelope 11, 0 + note C#, 8 + volume_envelope 11, 7 + note C#, 8 + volume_envelope 11, 0 + note C_, 8 + volume_envelope 11, 7 + note C_, 8 + volume_envelope 12, 7 + rest 16 + stereo_panning FALSE, TRUE + rest 8 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + note C#, 4 + note C_, 16 + rest 8 + note C#, 2 + note C_, 2 + note C#, 4 + note C_, 16 + volume_envelope 12, 2 + note D#, 8 + volume_envelope 12, 7 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + note C#, 4 + note C_, 16 + volume_envelope 12, 2 + octave 3 + note A#, 8 + volume_envelope 12, 7 + octave 4 + note C#, 2 + note C_, 2 + volume_envelope 12, 4 + note C#, 16 + rest 4 + rest 16 + rest 16 + rest 16 + volume_envelope 11, 7 + octave 5 + note D#, 16 + note D_, 16 + note F_, 16 + note D#, 16 + sound_loop 0, .mainloop + +Music_DarkCave_Ch3: + note_type 12, 2, 7 +.loop1: + sound_call .sub3 + sound_loop 2, .loop1 +.mainloop: +.loop2: + sound_call .sub3 + sound_loop 7, .loop2 + sound_call .sub2 + octave 3 + note C_, 4 + note G_, 2 + note D#, 4 + note G_, 2 + note D#, 4 + note F_, 2 + rest 2 + octave 2 + note A#, 12 + sound_call .sub2 + octave 3 + note C_, 4 + note G_, 2 + note D#, 4 + note G_, 2 + note D#, 4 + note F_, 2 + rest 2 + octave 2 + note A#, 4 + octave 3 + note C#, 2 + note C_, 2 + note C#, 4 + sound_call .sub1 + sound_call .sub1 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note C_, 4 + note G_, 2 + note D#, 4 + note G_, 2 + note F_, 4 + note D#, 2 + rest 2 + octave 2 + note A#, 4 + note A#, 2 + octave 3 + note C_, 2 + note C#, 4 + note C_, 4 + note G_, 2 + note D#, 4 + note G_, 2 + note D#, 4 + note F_, 2 + rest 2 + octave 2 + note A#, 4 + octave 3 + note C#, 2 + note C_, 2 + note C#, 4 + sound_ret + +.sub2: + octave 3 + note C_, 4 + note G_, 2 + note D#, 4 + note G_, 2 + note F_, 4 + note D#, 2 + rest 2 + octave 2 + note A#, 12 + sound_ret + +.sub3: + octave 2 + note C_, 4 + note G_, 2 + note D#, 4 + note G_, 2 + note F_, 4 + note D#, 2 + rest 2 + octave 1 + note A#, 4 + note A#, 2 + octave 2 + note C_, 2 + note C#, 4 + note C_, 4 + note G_, 2 + note D#, 4 + note G_, 2 + note D#, 4 + note F_, 2 + rest 2 + octave 1 + note A#, 4 + octave 2 + note C#, 2 + note C_, 2 + note C#, 4 + sound_ret + +Music_DarkCave_Ch4: + toggle_noise 3 + drum_speed 12 +.mainloop: + stereo_panning TRUE, TRUE + drum_note 4, 8 + drum_note 4, 8 + drum_note 4, 4 + stereo_panning TRUE, FALSE + drum_note 2, 4 + stereo_panning FALSE, TRUE + drum_note 2, 2 + drum_note 2, 2 + stereo_panning TRUE, FALSE + drum_note 2, 4 + stereo_panning TRUE, TRUE + drum_note 4, 8 + drum_note 4, 8 + drum_note 4, 4 + stereo_panning FALSE, TRUE + drum_note 2, 8 + stereo_panning TRUE, FALSE + drum_note 2, 2 + drum_note 2, 2 + sound_loop 0, .mainloop diff --git a/audio/music/dragonsden.asm b/audio/music/dragonsden.asm new file mode 100644 index 0000000..ccde8f9 --- /dev/null +++ b/audio/music/dragonsden.asm @@ -0,0 +1,173 @@ +Music_DragonsDen: + channel_count 4 + channel 1, Music_DragonsDen_Ch1 + channel 2, Music_DragonsDen_Ch2 + channel 3, Music_DragonsDen_Ch3 + channel 4, Music_DragonsDen_Ch4 + +Music_DragonsDen_Ch1: + tempo 144 + volume 7, 7 + duty_cycle 0 + pitch_offset 4 + stereo_panning TRUE, FALSE + note_type 12, 8, 0 +.mainloop: + sound_call .sub1 + rest 16 + sound_call .sub2 + rest 2 + sound_call .sub2 + rest 2 + sound_call .sub2 + rest 2 + sound_call .sub2 + rest 10 + note_type 12, 11, 7 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note A#, 12 + note A_, 4 + note A#, 12 + note A_, 4 + note A#, 6 + octave 4 + note C_, 4 + note C#, 6 + note E_, 16 + note D#, 12 + note D_, 4 + octave 3 + note G#, 16 + sound_ret + +.sub2: + volume_envelope 11, 1 + rest 2 + octave 4 + note C#, 3 + note C#, 3 + note C#, 3 + note C#, 3 + note C#, 4 + note C#, 3 + note C#, 3 + note C#, 4 + note C#, 2 + note C#, 2 + sound_ret + +Music_DragonsDen_Ch2: + duty_cycle 0 + pitch_offset 4 + stereo_panning FALSE, TRUE + note_type 12, 9, 0 +.mainloop: + sound_call .sub1 + rest 16 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + rest 16 + note_type 12, 12, 7 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note D#, 12 + note D_, 4 + note D#, 12 + note D_, 4 + note D#, 6 + note F_, 4 + note F#, 6 + note A_, 16 + note G#, 12 + note G_, 4 + note C#, 16 + sound_ret + +.sub2: + volume_envelope 12, 1 +.sub2loop1: + octave 5 + note C#, 4 + octave 4 + note G#, 4 + note G#, 4 + note G#, 4 + sound_loop 2, .sub2loop1 + sound_ret + +Music_DragonsDen_Ch3: +.mainloop: +.loop1: + note_type 12, 1, 4 + octave 4 + note C#, 2 + octave 3 + note G#, 1 + octave 4 + note C#, 1 + octave 3 + note G#, 2 + octave 4 + note C#, 2 + octave 3 + note G#, 1 + octave 4 + note C#, 1 + octave 3 + note G#, 2 + octave 4 + note C#, 2 + octave 3 + note G#, 1 + octave 4 + note C#, 1 + sound_loop 15, .loop1 + rest 16 + note_type 6, 2, 7 +.loop2: + octave 3 + note C#, 4 + octave 2 + note G#, 2 + octave 3 + note C#, 2 + octave 2 + note G#, 4 + octave 3 + note C#, 4 + octave 2 + note G#, 2 + octave 3 + note C#, 2 + octave 2 + note G#, 4 + octave 3 + note C#, 4 + octave 2 + note G#, 2 + octave 3 + note C#, 2 + sound_loop 16, .loop2 + sound_loop 0, .mainloop + +Music_DragonsDen_Ch4: + toggle_noise 0 + drum_speed 12 + rest 16 + rest 16 +.mainloop: + stereo_panning TRUE, FALSE + drum_note 6, 4 + stereo_panning FALSE, TRUE + drum_note 7, 4 + drum_note 7, 4 + stereo_panning TRUE, FALSE + drum_note 7, 4 + sound_loop 0, .mainloop diff --git a/audio/music/ecruteakcity.asm b/audio/music/ecruteakcity.asm new file mode 100644 index 0000000..96d8ee9 --- /dev/null +++ b/audio/music/ecruteakcity.asm @@ -0,0 +1,668 @@ +Music_EcruteakCity: + channel_count 3 + channel 1, Music_EcruteakCity_Ch1 + channel 2, Music_EcruteakCity_Ch2 + channel 3, Music_EcruteakCity_Ch3 + +Music_EcruteakCity_Ch1: + tempo 197 + volume 7, 7 + stereo_panning FALSE, TRUE + vibrato 18, 2, 5 + duty_cycle 2 +.mainloop: + note_type 12, 5, 7 + rest 10 + octave 4 + note C_, 6 + rest 10 + note C_, 6 + rest 16 + octave 3 + note B_, 4 + octave 4 + note C_, 4 + note D_, 4 + volume_envelope 6, 0 + rest 4 + rest 16 + rest 10 + note G_, 2 + note A_, 2 + note A#, 2 + rest 8 + note G#, 2 + note G_, 2 + note F_, 2 + octave 5 + note C_, 6 + note_type 6, 6, 7 + note C#, 4 + note D_, 10 + rest 2 + stereo_panning TRUE, TRUE + octave 4 + note B_, 8 + stereo_panning FALSE, TRUE + octave 3 + note A#, 1 + note B_, 11 + octave 4 + note C_, 4 + note E_, 4 + note G_, 12 + note A#, 12 + note G_, 4 + rest 4 + note A#, 4 + octave 5 + note C#, 4 + note E_, 2 + rest 2 + octave 3 + note A_, 8 + octave 4 + note C_, 8 + note F_, 4 + rest 12 + note E_, 1 + note F_, 11 + note G_, 2 + rest 2 + note A_, 4 + note G_, 4 + rest 8 + volume_envelope 5, 2 + sound_call .sub1 + note D_, 2 + octave 4 + note B_, 2 + note A_, 2 + note B_, 2 + note A_, 2 + note B_, 2 + octave 5 + note D_, 2 + octave 4 + note B_, 2 + octave 5 + note D_, 2 + octave 4 + note B_, 2 + note A_, 2 + note B_, 2 + note A_, 2 + note B_, 2 + note A_, 2 + note B_, 2 + sound_call .sub2 + volume_envelope 5, 2 + note A#, 2 + note G_, 2 + note E_, 2 + note C#, 2 + note G_, 2 + note E_, 2 + note C#, 2 + octave 4 + note A#, 2 + octave 5 + note E_, 2 + note C#, 2 + octave 4 + note A#, 2 + note G_, 2 + note A#, 2 + note G_, 2 + note E_, 2 + note C#, 2 + sound_call .sub1 + note D_, 2 + note C_, 2 + octave 4 + note G#, 2 + octave 5 + note C_, 2 + octave 4 + note G#, 2 + octave 5 + note C_, 2 + note D_, 2 + note C_, 2 + note D_, 2 + note C_, 2 + octave 4 + note G#, 2 + octave 5 + note C_, 2 + octave 4 + note G#, 2 + octave 5 + note C_, 2 + octave 4 + note G#, 2 + octave 5 + note C_, 2 + sound_call .sub2 + sound_loop 0, .mainloop + +.sub1: + octave 5 + note E_, 2 + note C_, 2 + octave 4 + note A_, 2 + octave 5 + note C_, 2 + octave 4 + note A_, 2 + octave 5 + note C_, 2 + note E_, 2 + note C_, 2 + sound_loop 2, .sub1 + sound_ret + +.sub2: + octave 5 + note D_, 2 + octave 4 + note B_, 2 + note G_, 2 + note B_, 2 + note G_, 2 + note B_, 2 + octave 5 + note D_, 2 + octave 4 + note B_, 2 + octave 5 + note D_, 2 + octave 4 + note B_, 2 + note G_, 2 + note B_, 2 + note G_, 2 + note B_, 2 + octave 5 + note D_, 2 + note F_, 2 + note A_, 2 + note E_, 2 + note C_, 2 + octave 4 + note A_, 2 + octave 5 + note E_, 2 + note C_, 2 + octave 4 + note A_, 2 + note E_, 2 + octave 5 + note C_, 2 + octave 4 + note A_, 2 + note E_, 2 + note C_, 2 + note A_, 2 + note E_, 2 + note C_, 2 + octave 3 + note A_, 2 +.sub2loop1: + octave 4 + note F_, 2 + note A_, 2 + octave 5 + note C_, 2 + octave 4 + note A_, 2 + octave 5 + note C_, 2 + octave 4 + note A_, 2 + octave 5 + note C_, 2 + note F_, 2 + sound_loop 2, .sub2loop1 +.sub2loop2: + octave 4 + note G_, 2 + note B_, 2 + octave 5 + note D_, 2 + octave 4 + note B_, 2 + octave 5 + note D_, 2 + octave 4 + note B_, 2 + octave 5 + note D_, 2 + note G_, 2 + sound_loop 2, .sub2loop2 + volume_envelope 5, 0 + duty_cycle 0 + note E_, 16 + note G_, 16 + duty_cycle 2 + sound_ret + +Music_EcruteakCity_Ch2: + vibrato 18, 2, 5 + duty_cycle 3 + stereo_panning TRUE, FALSE +.mainloop: + note_type 6, 6, 7 + rest 16 + rest 5 + octave 4 + note G_, 1 + octave 5 + note D_, 1 + note E_, 9 + rest 16 + rest 5 + octave 4 + note A_, 1 + octave 5 + note E_, 1 + note F_, 9 + note_type 12, 7, 7 + rest 10 + note D_, 2 + note C_, 2 + octave 4 + note G#, 2 + note G_, 4 + note A_, 4 + note B_, 4 + note_type 6, 9, 3 + volume_envelope 9, 7 + duty_cycle 2 + octave 3 + note G_, 7 + octave 4 + note C#, 1 + note D_, 11 + rest 1 + note C_, 2 + rest 2 + note C_, 16 + note F_, 8 + rest 4 + note E_, 4 + rest 4 + note E_, 4 + note F_, 4 + note G_, 4 + note E_, 4 + note C_, 2 + rest 2 + note C_, 4 + octave 3 + note A_, 2 + note F_, 1 + note A_, 1 + octave 4 + note C_, 16 + note E_, 4 + note G_, 2 + rest 2 + note E_, 4 + note D_, 10 + rest 1 + stereo_panning TRUE, TRUE + note D#, 9 + stereo_panning TRUE, FALSE + duty_cycle 0 + octave 5 + note C#, 1 + note D_, 11 + note C_, 2 + rest 2 + note C_, 16 + note F_, 12 + note E_, 4 + rest 4 + note E_, 4 + note F_, 4 + note G_, 2 + octave 4 + note A_, 1 + octave 5 + note C_, 1 + note E_, 1 + note A_, 3 + note E_, 2 + rest 2 + note E_, 4 + note C_, 2 + rest 2 + note C_, 4 + octave 4 + note A_, 2 + rest 2 + note B_, 4 + octave 5 + note C_, 2 + octave 4 + note G_, 1 + note B_, 1 + octave 5 + note D#, 1 + note E_, 11 + note D_, 2 + rest 2 + note D_, 8 + duty_cycle 1 + octave 4 + note E_, 4 + note G_, 3 + note G#, 1 + note A_, 16 + octave 3 + note A_, 4 + octave 4 + note C_, 2 + rest 2 + note E_, 4 + note D_, 12 + note C_, 4 + rest 4 + octave 3 + note B_, 4 + rest 4 + octave 4 + note F_, 8 + note G_, 12 + note F_, 8 + rest 4 + note E_, 8 + note D_, 4 + note C_, 2 + rest 2 + octave 3 + note B_, 4 + octave 4 + note C_, 2 + rest 6 + octave 3 + note B_, 4 + rest 4 + octave 4 + note C_, 4 + octave 3 + note A_, 16 + rest 4 + octave 4 + note F_, 4 + note E_, 4 + note D_, 4 + note C_, 12 + octave 3 + note B_, 4 + rest 4 + octave 4 + note C_, 4 + note D_, 4 + note D#, 4 + note_type 12, 8, 3 + note E_, 16 + volume_envelope 8, 0 + note D_, 4 + note C#, 4 + note F_, 4 + note_type 6, 8, 0 + note G_, 7 + note G#, 1 + volume_envelope 8, 7 + note A_, 12 + note E_, 2 + rest 2 + note E_, 2 + rest 2 + note E_, 3 + note G#, 1 + note A_, 4 + note E_, 2 + rest 2 + note E_, 4 + note D_, 2 + rest 2 + note C#, 4 + note D_, 12 + octave 3 + note B_, 4 + octave 4 + note F_, 4 + note G_, 12 + note D_, 2 + rest 2 + note D_, 2 + rest 2 + note D_, 4 + note G_, 4 + note D_, 2 + rest 1 + note A#, 1 + note B_, 12 + octave 5 + note C_, 4 + octave 4 + note A_, 8 + octave 3 + note A_, 4 + octave 4 + note C_, 4 + note_type 12, 8, 7 + note F_, 10 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 8 + rest 2 + octave 3 + note B_, 2 + octave 4 + note C_, 2 + note D_, 2 + note E_, 16 + sound_loop 0, .mainloop + +Music_EcruteakCity_Ch3: + stereo_panning TRUE, TRUE +.mainloop: + vibrato 18, 2, 5 + note_type 12, 2, 5 + octave 3 + note C_, 2 + note G_, 2 + octave 4 + note D_, 2 + note E_, 10 + octave 3 + note C_, 2 + note A_, 2 + octave 4 + note E_, 2 + note F_, 10 + octave 3 + note C_, 2 + note G_, 2 + octave 4 + note D_, 2 + note E_, 10 + note G_, 4 + note F#, 4 + note F_, 4 + octave 3 + note B_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + octave 4 + note D_, 2 + note E_, 10 + octave 3 + note C#, 2 + note G_, 2 + note A#, 2 + octave 4 + note D_, 2 + rest 2 + note C#, 2 + note D_, 2 + note E_, 2 + octave 3 + note D_, 2 + note A_, 1 + rest 1 + octave 4 + note E_, 2 + note F_, 1 + rest 1 + note G#, 8 + octave 3 + note G_, 2 + octave 4 + note D_, 2 + note F_, 2 + note G#, 2 + note B_, 2 + note G_, 1 + note G#, 5 + octave 3 + note C_, 2 + note G_, 2 + octave 4 + note D_, 2 + note E_, 2 + note G_, 2 + octave 5 + note C_, 2 + note D_, 2 + note E_, 2 + octave 3 + note C#, 2 + note A#, 2 + octave 4 + note D_, 2 + note C#, 2 + note E_, 2 + note D_, 2 + note F_, 2 + note G_, 1 + rest 1 + octave 3 + note F_, 8 + octave 4 + note A_, 2 + octave 5 + note C_, 1 + rest 1 + note D_, 2 + note E_, 1 + rest 1 + octave 2 + note G_, 2 + octave 3 + note D_, 2 + note G_, 2 + note F#, 2 + note A_, 2 + note G_, 2 + note B_, 2 + octave 4 + note D_, 2 + sound_call .sub1 + octave 4 + note C_, 8 + note E_, 8 + note G_, 8 + note B_, 8 + note A#, 8 + note G_, 8 + note E_, 8 + note C#, 8 + note_type 12, 2, 5 + sound_call .sub1 + octave 4 + note C_, 8 + octave 3 + note G_, 8 + note E_, 8 + note D_, 8 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note F_, 4 + rest 2 + note F_, 1 + rest 1 + note F_, 4 + rest 2 + note C_, 1 + rest 1 + note F_, 4 + rest 2 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note F_, 2 + rest 2 + note F_, 1 + rest 1 + note E_, 4 + rest 2 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note E_, 2 + rest 2 + note B_, 1 + rest 1 + note A_, 4 + rest 2 + note A_, 1 + rest 1 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note G_, 1 + rest 1 + note F#, 1 + rest 1 + note D_, 4 + rest 2 + note A_, 1 + rest 1 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + note E_, 1 + rest 1 + note F_, 1 + rest 1 + note G_, 4 + rest 2 + octave 4 + note D_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note A_, 1 + rest 1 + note A#, 1 + note_type 6, 2, 5 + rest 1 + note B_, 1 + sound_ret diff --git a/audio/music/elmslab.asm b/audio/music/elmslab.asm new file mode 100644 index 0000000..5980237 --- /dev/null +++ b/audio/music/elmslab.asm @@ -0,0 +1,538 @@ +Music_ElmsLab: + channel_count 4 + channel 1, Music_ElmsLab_Ch1 + channel 2, Music_ElmsLab_Ch2 + channel 3, Music_ElmsLab_Ch3 + channel 4, Music_ElmsLab_Ch4 + +Music_ElmsLab_Ch1: + tempo 144 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 + vibrato 16, 1, 5 + stereo_panning TRUE, FALSE + note_type 12, 11, 2 + octave 2 + note F_, 2 + note G_, 2 + note A_, 2 + note B_, 2 + volume_envelope 11, 6 + octave 3 + note C_, 8 + volume_envelope 11, 2 + octave 2 + note A#, 2 + note A_, 2 + note G_, 2 + octave 3 + note C_, 8 + note F_, 4 + note F_, 4 + note F_, 8 + note A_, 4 + note A_, 4 + note A_, 2 +.mainloop: + rest 2 + note A_, 2 + note G#, 2 + note A_, 2 + volume_envelope 11, 7 + octave 4 + note C_, 4 + volume_envelope 11, 5 + octave 3 + note B_, 2 + octave 4 + note C_, 2 + volume_envelope 11, 4 + note F_, 8 + volume_envelope 11, 5 + octave 3 + note A_, 2 + note G#, 2 + note A_, 2 + note F_, 2 + volume_envelope 11, 7 + note F_, 8 + volume_envelope 11, 5 + note A_, 2 + note G_, 2 + note F_, 2 + volume_envelope 11, 2 + note G_, 4 + volume_envelope 11, 5 + note A_, 2 + note G#, 2 + note A_, 2 + volume_envelope 11, 7 + note F_, 4 + volume_envelope 11, 5 + note C_, 4 + volume_envelope 11, 7 + note D_, 8 + volume_envelope 11, 4 + note F_, 2 + note E_, 2 + note D_, 2 + note F_, 2 + volume_envelope 11, 7 + note E_, 8 + volume_envelope 11, 4 + note G_, 2 + note F_, 2 + note E_, 2 + note G_, 2 + volume_envelope 11, 7 + note F_, 8 + volume_envelope 11, 4 + note G_, 2 + note A_, 2 + note A#, 2 + note A_, 2 + volume_envelope 11, 2 + note G_, 4 + volume_envelope 11, 4 + note F_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + volume_envelope 11, 2 + note G_, 6 + volume_envelope 11, 7 + note F_, 4 + octave 4 + note C_, 2 + octave 3 + note F_, 4 + note D_, 2 + note A#, 4 + note A_, 4 + volume_envelope 11, 4 + note G_, 2 + note F_, 2 + note G_, 2 + volume_envelope 11, 2 + note A_, 6 + volume_envelope 11, 7 + note E_, 4 + note A#, 2 + note E_, 6 + volume_envelope 11, 3 + note F_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + note A_, 2 + note A_, 2 + note G_, 2 + volume_envelope 11, 2 + note E_, 6 + volume_envelope 11, 4 + note F_, 4 + octave 4 + note C_, 4 + octave 3 + note F_, 2 + octave 4 + note C_, 2 + note D_, 2 + note C_, 2 + octave 3 + note A#, 2 + note A_, 2 + volume_envelope 11, 7 + note A#, 8 + octave 4 + note E_, 4 + note D_, 4 + note C_, 4 + octave 3 + note A#, 4 + octave 4 + note C_, 4 + note D_, 4 + note D#, 4 + note E_, 4 + volume_envelope 11, 4 + octave 3 + note A_, 2 + note F_, 2 + octave 4 + note C_, 2 + octave 3 + note F_, 2 + note A_, 2 + note F_, 2 + octave 4 + note C_, 2 + octave 3 + note F_, 2 + note A_, 2 + note F_, 2 + octave 4 + note C_, 2 + octave 3 + note F_, 2 + note A_, 2 + volume_envelope 11, 2 + note F_, 2 + note F_, 4 + sound_loop 0, .mainloop + +Music_ElmsLab_Ch2: + duty_cycle 3 + vibrato 16, 2, 6 + stereo_panning FALSE, TRUE + note_type 12, 12, 3 + octave 4 + note F_, 2 + note E_, 2 + note D_, 2 + octave 3 + note B_, 2 + volume_envelope 12, 5 + octave 4 + note C_, 8 + volume_envelope 12, 3 + octave 3 + note A#, 2 + note A_, 2 + note G_, 2 + note E_, 2 + volume_envelope 12, 2 + note F_, 6 + octave 4 + note C_, 4 + note C_, 4 + note C_, 8 + note C_, 4 + note C_, 4 + note C_, 2 + stereo_panning TRUE, TRUE +.mainloop: + volume_envelope 12, 6 + octave 4 + note F_, 6 + volume_envelope 12, 2 + note E_, 2 + note F_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + volume_envelope 12, 7 + note A_, 6 + volume_envelope 12, 2 + note F_, 2 + volume_envelope 12, 7 + note C_, 8 + volume_envelope 12, 7 + note D_, 6 + volume_envelope 12, 3 + note C#, 2 + note D_, 2 + note C#, 2 + note D_, 2 + note E_, 2 + volume_envelope 12, 7 + note F_, 6 + volume_envelope 12, 3 + note C_, 2 + volume_envelope 12, 7 + octave 3 + note A_, 10 + volume_envelope 12, 3 + note A#, 2 + note A#, 2 + octave 4 + note D_, 2 + volume_envelope 12, 5 + note C_, 4 + octave 3 + note A#, 6 + volume_envelope 12, 3 + octave 4 + note C_, 2 + note C_, 2 + note E_, 2 + volume_envelope 12, 4 + note D_, 4 + note C_, 6 + volume_envelope 12, 2 + note D_, 2 + note D_, 2 + note F_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note F_, 2 + volume_envelope 12, 2 + note G_, 4 + volume_envelope 12, 6 + note C_, 4 + note D_, 4 + volume_envelope 12, 4 + note E_, 6 + volume_envelope 12, 3 + note F_, 2 + note F_, 2 + note G_, 2 + volume_envelope 12, 7 + note A_, 4 + volume_envelope 12, 3 + note G_, 2 + note F#, 2 + note G_, 2 + note F#, 2 + note G_, 1 + note F_, 2 + volume_envelope 12, 7 + note D_, 11 + volume_envelope 12, 3 + note E_, 2 + note E_, 2 + note F_, 2 + volume_envelope 12, 7 + note G_, 4 + volume_envelope 12, 3 + note F_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + note F_, 1 + note D_, 2 + volume_envelope 12, 7 + note C_, 11 + volume_envelope 12, 4 + note F_, 2 + note F_, 2 + note G_, 2 + volume_envelope 12, 7 + note A_, 4 + volume_envelope 12, 4 + note G_, 2 + note F_, 2 + note A#, 2 + note A_, 2 + note A#, 1 + octave 5 + note C_, 2 + note D_, 5 + volume_envelope 12, 3 + note E_, 2 + note D_, 2 + volume_envelope 12, 7 + note C_, 4 + octave 4 + note A#, 4 + note A_, 4 + note G_, 4 + octave 5 + note C_, 4 + octave 4 + note A#, 4 + note A_, 4 + note G_, 4 + volume_envelope 11, 0 + note F_, 8 + volume_envelope 10, 0 + note F_, 8 + volume_envelope 10, 7 + note F_, 10 + volume_envelope 12, 2 + note C_, 2 + note F_, 2 + volume_envelope 12, 4 + octave 3 + note E_, 2 + sound_loop 0, .mainloop + +Music_ElmsLab_Ch3: + stereo_panning FALSE, TRUE + note_type 12, 2, 5 + rest 8 + rest 14 + octave 3 + note C_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note C_, 2 + note D_, 2 + note E_, 2 +.mainloop: + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note E_, 2 + octave 4 + note C_, 2 + octave 3 + note D_, 2 + note A_, 2 + octave 2 + note A_, 2 + octave 3 + note A_, 2 + note D_, 2 + note A_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note C_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note A#, 2 + note D_, 2 + note A#, 2 + note F_, 2 + note A#, 2 + note D_, 2 + note A#, 2 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note E_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note E_, 2 + note A_, 2 + note A#, 2 + octave 4 + note D_, 2 + octave 3 + note F_, 2 + octave 4 + note D_, 2 + octave 3 + note A#, 2 + octave 4 + note D_, 2 + octave 3 + note F_, 2 + note B_, 2 + octave 4 + note C_, 2 + rest 2 + note C_, 4 + octave 3 + note A#, 4 + note G_, 4 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note G_, 2 + note A#, 2 + note D_, 2 + note A#, 2 + note G_, 2 + note A#, 2 + note D_, 2 + note A_, 2 + note E_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note E_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note G_, 2 + note E_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note G_, 2 + note A#, 2 + note D_, 2 + note A#, 2 + note G_, 2 + note A#, 2 + note A_, 2 + note G_, 2 + note C_, 4 + note D_, 4 + note E_, 4 + note G_, 4 + note E_, 4 + note F_, 4 + note F#, 4 + note G_, 4 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note C_, 2 + note F_, 2 + note A_, 2 + sound_loop 0, .mainloop + +Music_ElmsLab_Ch4: + stereo_panning TRUE, FALSE + toggle_noise 0 + drum_speed 12 + rest 16 + rest 2 +.mainloop: + drum_note 8, 4 + sound_loop 0, .mainloop diff --git a/audio/music/evolution.asm b/audio/music/evolution.asm new file mode 100644 index 0000000..4fc5850 --- /dev/null +++ b/audio/music/evolution.asm @@ -0,0 +1,203 @@ +Music_Evolution: + channel_count 4 + channel 1, Music_Evolution_Ch1 + channel 2, Music_Evolution_Ch2 + channel 3, Music_Evolution_Ch3 + channel 4, Music_Evolution_Ch4 + +Music_Evolution_Ch1: + tempo 132 + volume 7, 7 + vibrato 6, 3, 4 + pitch_offset 1 + duty_cycle 2 + note_type 12, 9, 2 + octave 3 + pitch_slide 1, 4, A_ + note C_, 1 + pitch_slide 1, 4, A_ + note G_, 1 + pitch_slide 1, 4, A_ + note C_, 1 + pitch_slide 1, 4, A_ + note G_, 1 + rest 4 + duty_cycle 3 + stereo_panning FALSE, TRUE +.mainloop: +.loop1: + sound_call .sub1 + note_type 12, 10, 4 + note F#, 4 + sound_call .sub1 + note_type 12, 10, 4 + note F#, 4 + sound_loop 2, .loop1 + sound_call .sub2 + note_type 12, 10, 4 + note G#, 4 + sound_call .sub2 + note_type 12, 10, 4 + note G#, 4 + sound_loop 0, .mainloop + +.sub1: + note_type 12, 10, 2 + octave 3 + note C_, 4 + note G_, 4 + note C_, 4 + note G_, 4 + note C_, 4 + note G_, 4 + note C_, 4 + sound_ret + +.sub2: + note_type 12, 10, 2 + octave 3 + note D_, 4 + note A_, 4 + note D_, 4 + note A_, 4 + note D_, 4 + note A_, 4 + note D_, 4 + sound_ret + +Music_Evolution_Ch2: + duty_cycle 2 + vibrato 8, 2, 5 + note_type 12, 10, 2 + octave 4 + note G_, 1 + note D_, 1 + note G_, 1 + note D_, 1 + rest 4 + duty_cycle 3 + stereo_panning TRUE, FALSE +.mainloop: +.loop1: + sound_call .sub1 + note_type 12, 11, 5 + note A_, 4 + sound_call .sub1 + note_type 12, 11, 5 + note B_, 4 + sound_loop 2, .loop1 + sound_call .sub2 + note_type 12, 11, 5 + note B_, 4 + sound_call .sub2 + note_type 12, 11, 5 + octave 4 + note C#, 4 + octave 3 + sound_loop 0, .mainloop + +.sub1: + note_type 12, 11, 2 + octave 3 + note G_, 4 + note D_, 4 + note G_, 4 + note D_, 4 + note G_, 4 + note D_, 4 + note G_, 4 + sound_ret + +.sub2: + note_type 12, 11, 2 + octave 3 + note A_, 4 + note E_, 4 + note A_, 4 + note E_, 4 + note A_, 4 + note E_, 4 + note A_, 4 + sound_ret + +Music_Evolution_Ch3: + note_type 12, 1, 6 + rest 8 +.mainloop: +.loop1: + sound_call .sub1 + octave 3 + note A_, 4 + sound_call .sub1 + octave 3 + note B_, 4 + sound_loop 2, .loop1 + sound_call .sub2 + octave 3 + note B_, 4 + sound_call .sub2 + octave 4 + note C#, 4 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note A_, 2 + rest 2 + octave 3 + note D_, 2 + rest 2 + octave 2 + note A_, 2 + rest 2 + octave 3 + note D_, 2 + rest 2 + octave 2 + note A_, 2 + rest 2 + octave 3 + note D_, 2 + rest 2 + octave 2 + note A_, 2 + rest 2 + sound_ret + +.sub2: + octave 2 + note B_, 2 + rest 2 + octave 3 + note E_, 2 + rest 2 + octave 2 + note B_, 2 + rest 2 + octave 3 + note E_, 2 + rest 2 + octave 2 + note B_, 2 + rest 2 + octave 3 + note E_, 2 + rest 2 + octave 2 + note A_, 2 + rest 2 + sound_ret + +Music_Evolution_Ch4: + toggle_noise 5 + drum_speed 12 + rest 8 +.mainloop: + stereo_panning TRUE, FALSE + drum_note 11, 6 + drum_note 11, 4 + stereo_panning FALSE, TRUE + drum_note 5, 2 + drum_note 5, 2 + drum_note 5, 2 + sound_loop 0, .mainloop diff --git a/audio/music/gamecorner.asm b/audio/music/gamecorner.asm new file mode 100644 index 0000000..3f580e3 --- /dev/null +++ b/audio/music/gamecorner.asm @@ -0,0 +1,807 @@ +Music_GameCorner: + channel_count 4 + channel 1, Music_GameCorner_Ch1 + channel 2, Music_GameCorner_Ch2 + channel 3, Music_GameCorner_Ch3 + channel 4, Music_GameCorner_Ch4 + +Music_GameCorner_Ch1: + tempo 147 + volume 7, 7 + stereo_panning FALSE, TRUE + note_type 12, 9, 1 + rest 8 +.mainloop: + volume_envelope 9, 1 + rest 16 + rest 16 + rest 16 + rest 16 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + octave 3 + rest 2 + note G#, 3 + note G#, 3 + note A#, 2 + note A#, 2 + note G#, 2 + note G_, 2 + volume_envelope 7, 1 +.loop1: + octave 4 + note G#, 1 + octave 5 + note C_, 1 + note F_, 1 + note C_, 1 + sound_loop 4, .loop1 +.loop2: + octave 4 + note A#, 1 + octave 5 + note D_, 1 + note G_, 1 + note D_, 1 + sound_loop 4, .loop2 +.loop3: + octave 4 + note D#, 1 + note G_, 1 + octave 5 + note C_, 1 + octave 4 + note G_, 1 + sound_loop 4, .loop3 +.loop4: + octave 4 + note F_, 1 + note A_, 1 + octave 5 + note C_, 1 + octave 4 + note A_, 1 + sound_loop 4, .loop4 +.loop5: + octave 4 + note G#, 1 + octave 5 + note C_, 1 + note F_, 1 + note C_, 1 + sound_loop 4, .loop5 +.loop6: + octave 4 + note A#, 1 + octave 5 + note D_, 1 + note G_, 1 + note D_, 1 + sound_loop 4, .loop6 +.loop7: + octave 4 + note B_, 1 + octave 5 + note D_, 1 + note G_, 1 + note D_, 1 + sound_loop 4, .loop7 + octave 3 + note D_, 1 + note D_, 1 + note D_, 3 + note F_, 2 + note F_, 9 + sound_loop 0, .mainloop + +.sub1: + rest 2 + octave 4 + note A#, 3 + note G_, 3 + note D#, 3 + octave 3 + note F_, 3 + note F_, 2 + rest 2 + note G#, 3 + note G#, 3 + note A#, 2 + note A#, 2 + note G#, 1 + note A#, 3 + sound_ret + +.sub2: + rest 2 + octave 4 + note A#, 3 + note G_, 3 + note D#, 3 + octave 3 + note F_, 3 + note F_, 2 + sound_ret + +Music_GameCorner_Ch2: + stereo_panning TRUE, TRUE + vibrato 8, 2, 4 + note_type 12, 10, 1 + rest 8 +.mainloop: + volume_envelope 9, 2 + duty_cycle 1 + sound_call .sub1 + octave 1 + note F_, 2 + octave 3 + note G#, 2 + octave 1 + note F_, 1 + octave 3 + note G#, 2 + volume_envelope 10, 4 + note G#, 3 + volume_envelope 9, 2 + note G_, 2 + note A#, 1 + octave 4 + note C_, 3 + sound_call .sub1 + octave 4 + note F_, 2 + note D#, 2 + note F_, 1 + note D#, 2 + volume_envelope 10, 4 + note G_, 3 + note F_, 4 + duty_cycle 2 + volume_envelope 12, 7 + octave 3 + note D#, 1 + note F_, 1 + note G_, 6 + note F_, 6 + note C_, 4 + note D_, 6 + note D#, 6 + note F_, 4 + note D_, 6 + note C_, 6 + octave 2 + note A#, 4 + note A_, 4 + rest 10 + octave 3 + note D#, 1 + note F_, 1 + note G_, 6 + note F_, 6 + note C_, 4 + note D_, 6 + note D#, 6 + note F_, 2 + note D#, 1 + note F_, 1 + note G_, 16 + volume_envelope 9, 2 + note G_, 1 + note G_, 1 + note G_, 3 + note A#, 2 + note A#, 9 + volume_envelope 10, 4 + sound_loop 0, .mainloop + +.sub1: + octave 1 + note C_, 2 + octave 3 + note D#, 3 + note D#, 3 + note D#, 3 + note F_, 3 + note F_, 2 + octave 1 + note C_, 2 + octave 3 + note D#, 3 + note D#, 3 + note F_, 2 + note F_, 2 + note D#, 1 + note F_, 3 + octave 1 + note C_, 2 + octave 3 + note D#, 3 + note D#, 3 + note D#, 3 + note F_, 3 + note F_, 2 + octave 1 + note C_, 2 + octave 3 + note D#, 3 + note D#, 3 + note F_, 2 + note C_, 2 + note D#, 1 + note F_, 3 + octave 1 + note C_, 2 + octave 5 + note D_, 3 + octave 4 + note A#, 3 + note G_, 2 + note C_, 2 + note D_, 2 + note D#, 2 + note F_, 2 + note D#, 2 + note F_, 1 + note D#, 2 + volume_envelope 10, 4 + note F_, 3 + note G_, 4 + volume_envelope 9, 2 + note F#, 1 + note F_, 1 + octave 1 + note C_, 2 + octave 5 + note D_, 3 + octave 4 + note A#, 3 + note G_, 2 + note C_, 2 + note D_, 2 + note D#, 2 + octave 1 + note F_, 1 + octave 4 + note F_, 1 + note D#, 2 + note G_, 1 + note D#, 2 + volume_envelope 10, 4 + note A#, 3 + note A_, 2 + volume_envelope 9, 2 + note A#, 1 + octave 5 + note C_, 3 + octave 1 + note C_, 2 + octave 5 + note D_, 3 + octave 4 + note A#, 3 + note G_, 2 + note C_, 2 + note D_, 2 + note D#, 2 + note F_, 2 + note D#, 2 + note F_, 1 + note D#, 2 + volume_envelope 10, 4 + note F_, 3 + note G_, 4 + volume_envelope 9, 2 + note F#, 1 + note F_, 1 + octave 1 + note C_, 2 + octave 5 + note D_, 3 + octave 4 + note A#, 3 + note G_, 2 + note C_, 2 + note D_, 2 + note D#, 2 + sound_ret + +Music_GameCorner_Ch3: + vibrato 8, 2, 2 + note_type 12, 1, 4 + rest 8 +.mainloop: + stereo_panning TRUE, TRUE + note_type 12, 1, 4 + sound_call .sub1 + sound_call .sub2 + octave 4 + note G_, 1 + note A_, 3 + sound_call .sub1 + sound_call .sub2 + octave 4 + note A#, 1 + octave 5 + note C_, 3 + stereo_panning TRUE, FALSE + sound_call .sub1 + sound_call .sub3 + sound_call .sub1 + sound_call .sub4 + sound_call .sub1 + sound_call .sub3 + sound_call .sub1 + stereo_panning TRUE, TRUE + octave 2 + note F_, 1 + octave 3 + note F_, 1 + octave 5 + note C_, 1 + octave 4 + note F_, 1 + octave 2 + note F_, 1 + octave 5 + note C_, 1 + octave 3 + note F_, 1 + octave 5 + note D#, 3 + note D_, 1 + rest 1 + note D#, 1 + note F_, 1 + rest 2 + sound_call .sub1 + sound_call .sub2 + octave 4 + note G_, 1 + note A_, 3 + sound_call .sub1 + sound_call .sub2 + octave 4 + note A#, 1 + octave 5 + note C_, 3 + stereo_panning TRUE, FALSE + sound_call .sub1 + sound_call .sub3 + sound_call .sub1 + sound_call .sub4 + sound_call .sub1 + sound_call .sub3 + sound_call .sub1 + octave 2 + note F_, 1 + octave 3 + note F_, 1 + octave 5 + note C_, 1 + octave 4 + note F_, 1 + octave 3 + note F_, 1 + octave 5 + note C_, 1 + octave 4 + note F_, 1 + octave 3 + note F_, 1 + octave 5 + note D#, 1 + rest 1 + note D_, 1 + rest 1 + note C_, 1 + rest 1 + octave 4 + note A#, 1 + rest 1 + volume_envelope 1, 5 + sound_call .sub5 + octave 2 + note C_, 2 + rest 1 + note C_, 1 + octave 3 + note C_, 1 + octave 2 + note C_, 1 + rest 1 + note C_, 1 + note C_, 1 + octave 3 + note C_, 1 + octave 2 + note C_, 2 + octave 3 + note C_, 1 + octave 2 + note C_, 1 + rest 1 + octave 3 + note C_, 1 + octave 2 + note F_, 2 + rest 1 + note F_, 1 + octave 3 + note F_, 1 + octave 2 + note F_, 1 + rest 1 + note F_, 1 + note F_, 1 + octave 3 + note F_, 1 + octave 2 + note F_, 2 + octave 3 + note F_, 1 + octave 2 + note F_, 1 + rest 1 + octave 3 + note F_, 1 + sound_call .sub5 + octave 2 + note G_, 2 + rest 1 + note G_, 1 + octave 3 + note G_, 1 + octave 2 + note G_, 1 + rest 1 + note G_, 1 + note G_, 1 + octave 3 + note G_, 1 + octave 2 + note G_, 2 + octave 3 + note G_, 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + octave 2 + note B_, 1 + note B_, 1 + note B_, 1 + rest 2 + note B_, 1 + rest 1 + note B_, 1 + rest 4 + note_type 6, 1, 5 + octave 3 + note D_, 1 + note C_, 1 + octave 2 + note B_, 1 + note A_, 1 + note G_, 1 + note F_, 1 + note E_, 1 + note D_, 1 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note C_, 1 + octave 3 + note C_, 1 + octave 4 + note G_, 1 + note C_, 1 + octave 3 + note C_, 1 + octave 4 + note G_, 1 + note C_, 1 + octave 3 + note C_, 1 + octave 4 + note G_, 1 + note C_, 1 + octave 3 + note C_, 1 + octave 4 + note A_, 1 + note C_, 1 + octave 3 + note C_, 1 + octave 4 + note A_, 2 + sound_ret + +.sub2: + octave 2 + note C_, 1 + octave 3 + note C_, 1 + octave 4 + note G_, 1 + note C_, 1 + octave 3 + note C_, 1 + octave 4 + note G_, 1 + note C_, 1 + octave 3 + note C_, 1 + octave 4 + note A#, 1 + rest 1 + note A_, 1 + rest 1 + sound_ret + +.sub3: + octave 2 + note F_, 1 + octave 3 + note F_, 1 + octave 5 + note C_, 1 + octave 4 + note F_, 1 + octave 3 + note F_, 1 + octave 5 + note C_, 1 + octave 4 + note F_, 1 + octave 3 + note F_, 1 + octave 5 + note D#, 1 + rest 1 + note D_, 1 + rest 1 + note C_, 1 + note D_, 3 + sound_ret + +.sub4: + octave 2 + note F_, 1 + octave 3 + note F_, 1 + octave 5 + note C_, 1 + octave 4 + note F_, 1 + octave 3 + note F_, 1 + octave 5 + note C_, 1 + octave 4 + note F_, 1 + octave 3 + note F_, 1 + octave 5 + note D#, 1 + rest 1 + note D_, 1 + rest 1 + note C_, 1 + note D_, 1 + octave 3 + note F_, 1 + rest 1 + sound_ret + +.sub5: + octave 2 + note F_, 2 + rest 1 + note F_, 1 + octave 3 + note F_, 1 + octave 2 + note F_, 1 + rest 1 + note F_, 1 + note F_, 1 + octave 3 + note F_, 1 + octave 2 + note F_, 2 + octave 3 + note F_, 1 + octave 2 + note F_, 1 + rest 1 + octave 3 + note F_, 1 + octave 2 + note G_, 2 + rest 1 + note G_, 1 + octave 3 + note G_, 1 + octave 2 + note G_, 1 + rest 1 + note G_, 1 + note G_, 1 + octave 3 + note G_, 1 + octave 2 + note F_, 1 + octave 3 + note F_, 1 + octave 2 + note D#, 1 + octave 3 + note D#, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + sound_ret + +Music_GameCorner_Ch4: + toggle_noise 3 + drum_speed 12 + drum_speed 8 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_speed 12 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 +.mainloop: + sound_call .sub1 +.loop1: + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 6, .loop1 + sound_call .sub2 +.loop2: + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 3, .loop2 + rest 12 + drum_note 3, 1 + drum_note 3, 1 + drum_note 7, 2 + sound_call .sub1 +.loop3: + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 6, .loop3 + sound_call .sub2 +.loop4: + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 3, .loop4 + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 +.loop5: + drum_note 11, 2 + drum_note 7, 1 + drum_note 4, 1 + drum_note 3, 1 + drum_note 4, 1 + drum_note 7, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 1 + drum_note 7, 1 + drum_note 4, 1 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 3, .loop5 + drum_note 11, 2 + drum_note 7, 1 + drum_note 4, 1 + drum_note 3, 1 + drum_note 4, 1 + drum_note 7, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 1 + drum_note 7, 1 + drum_note 4, 1 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 +.loop6: + drum_note 11, 2 + drum_note 7, 1 + drum_note 4, 1 + drum_note 3, 1 + drum_note 4, 1 + drum_note 7, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 1 + drum_note 7, 1 + drum_note 4, 1 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 3, .loop6 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 11, 1 + drum_note 7, 2 + drum_note 7, 5 + drum_note 3, 1 + drum_note 3, 1 + drum_note 4, 2 + sound_loop 0, .mainloop + +.sub1: + drum_note 1, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + sound_ret + +.sub2: + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 7, 2 + sound_ret diff --git a/audio/music/goldenrodcity.asm b/audio/music/goldenrodcity.asm new file mode 100644 index 0000000..bb2bf63 --- /dev/null +++ b/audio/music/goldenrodcity.asm @@ -0,0 +1,476 @@ +Music_GoldenrodCity: + channel_count 4 + channel 1, Music_GoldenrodCity_Ch1 + channel 2, Music_GoldenrodCity_Ch2 + channel 3, Music_GoldenrodCity_Ch3 + channel 4, Music_GoldenrodCity_Ch4 + +Music_GoldenrodCity_Ch1: + stereo_panning FALSE, TRUE + tempo 176 + volume 7, 7 + note_type 12, 9, 7 + rest 16 + rest 16 + rest 16 + rest 16 +.mainloop: + duty_cycle 0 + sound_call .sub1 + octave 3 + note G#, 1 + octave 4 + note C_, 1 + note D#, 1 + note F#, 1 + note D#, 1 + note F#, 1 + note G#, 1 + octave 5 + note C_, 1 + volume_envelope 7, 1 + duty_cycle 0 + sound_call .sub2 + volume_envelope 7, 7 + note D#, 2 + note F_, 2 + note F#, 2 + note G#, 4 + volume_envelope 7, 1 + sound_call .sub2 + note D#, 1 + note F#, 1 + volume_envelope 7, 7 + octave 5 + note C_, 2 + octave 4 + note G#, 2 + note F#, 2 + note D#, 2 + duty_cycle 2 + volume_envelope 9, 7 + sound_call .sub1 + note C_, 4 + octave 3 + note G#, 2 + octave 4 + note C_, 2 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note C#, 2 + octave 3 + note G#, 1 + rest 3 + note G#, 1 + rest 1 + octave 4 + note C_, 2 + octave 3 + note G#, 1 + rest 3 + note G#, 1 + rest 1 + note A#, 2 + note F_, 1 + rest 1 + note C#, 2 + note F_, 1 + rest 1 + note D#, 2 + note C_, 2 + note C#, 2 + note D#, 2 + note F#, 2 + note C#, 1 + rest 3 + note C#, 1 + rest 1 + note F#, 2 + note C#, 1 + rest 1 + note F#, 2 + note A#, 2 + note C#, 2 + note D#, 2 + note G#, 2 + octave 4 + note C#, 2 + sound_ret + +.sub2: + octave 4 + note F_, 1 + note C#, 1 + octave 3 + note G#, 1 + octave 4 + note C#, 1 + note F_, 1 + note G#, 1 + note F_, 1 + note G#, 1 + note C#, 1 + octave 3 + note G#, 1 + note F_, 1 + note G#, 1 + octave 4 + note C#, 1 + note F_, 1 + note C#, 1 + note F_, 1 + note D#, 1 + note C_, 1 + octave 3 + note G#, 1 + octave 4 + note C_, 1 + note D#, 1 + note F#, 1 + note D#, 1 + note F#, 1 + note C_, 1 + octave 3 + note G#, 1 + note F#, 1 + note G#, 1 + octave 4 + note C_, 1 + note D#, 1 + note C_, 1 + note D#, 1 + note C#, 1 + octave 3 + note A#, 1 + note F#, 1 + note A#, 1 + octave 4 + note C#, 1 + note F_, 1 + note C#, 1 + note F_, 1 + octave 3 + note A#, 1 + note F#, 1 + note C#, 1 + note F#, 1 + note A#, 1 + octave 4 + note C#, 1 + octave 3 + note A#, 1 + octave 4 + note C#, 1 + note D#, 1 + note C_, 1 + octave 3 + note G#, 1 + octave 4 + note C_, 1 + note D#, 1 + note F#, 1 + sound_ret + +Music_GoldenrodCity_Ch2: + stereo_panning TRUE, FALSE + vibrato 18, 2, 3 + duty_cycle 2 + note_type 12, 9, 7 +.mainloop: + volume_envelope 9, 7 + sound_call .sub1 + octave 4 + note F_, 2 + note F#, 2 + note G#, 2 + note F_, 2 + note D#, 8 + sound_call .sub1 + note G#, 2 + note A#, 2 + octave 5 + note C_, 2 + note C#, 2 + note D#, 8 + duty_cycle 2 + volume_envelope 7, 7 + sound_call .sub2 + octave 4 + note G#, 2 + note A#, 2 + note B_, 2 + octave 5 + note C_, 4 + duty_cycle 3 + volume_envelope 7, 7 + sound_call .sub2 + note F_, 2 + note D#, 2 + note C#, 2 + note C_, 2 + octave 4 + note G#, 2 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note F_, 4 + note C#, 4 + note D#, 4 + note C_, 4 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + octave 3 + note G#, 6 + octave 3 + note G#, 1 + octave 3 + note A_, 1 + note A#, 4 + octave 4 + note C#, 4 + octave 3 + note A#, 2 + octave 4 + note A#, 2 + note G#, 2 + note F#, 2 + duty_cycle 1 + sound_ret + +.sub2: + note C#, 6 + note F_, 6 + note C#, 4 + note C_, 6 + note D#, 6 + note C_, 2 + octave 4 + note G#, 1 + note A_, 1 + note A#, 6 + octave 5 + note C#, 6 + octave 4 + note A#, 4 + octave 5 + note C_, 4 + note D#, 2 + sound_ret + +Music_GoldenrodCity_Ch3: + stereo_panning TRUE, TRUE + vibrato 8, 2, 3 + note_type 12, 2, 5 +.mainloop: + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + rest 3 + octave 3 + note C_, 1 + note D#, 1 + note G_, 1 + note G#, 1 + note D#, 2 + sound_call .sub2 + rest 1 + octave 3 + note G#, 2 + note F#, 2 + note D#, 2 + octave 2 + note G#, 2 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note C#, 4 + rest 2 + note C#, 1 + rest 1 + note C_, 4 + rest 2 + note C_, 1 + rest 1 + octave 2 + note A#, 4 + rest 2 + note A#, 1 + rest 1 + note G#, 4 + rest 2 + note G#, 1 + rest 1 + note F#, 4 + rest 2 + note F#, 1 + rest 1 + octave 3 + note D#, 4 + rest 2 + note D#, 1 + rest 1 + note G#, 4 + rest 2 + note G#, 1 + rest 1 + octave 2 + note G#, 1 + rest 1 + note G#, 3 + rest 1 + octave 3 + note G#, 1 + rest 1 + sound_ret + +.sub2: + note C#, 1 + rest 1 + octave 4 + note C#, 1 + octave 3 + note C#, 1 + rest 2 + note C#, 1 + rest 5 + octave 4 + note C_, 1 + note C#, 1 + octave 3 + note G#, 2 + note C_, 1 + rest 1 + octave 4 + note C_, 1 + octave 3 + note C_, 1 + rest 2 + note C_, 1 + rest 5 + note B_, 1 + octave 4 + note C_, 1 + octave 3 + note G#, 2 + octave 2 + note A#, 1 + rest 1 + octave 3 + note A#, 1 + octave 2 + note A#, 1 + rest 2 + note A#, 1 + rest 5 + octave 3 + note A_, 1 + note A#, 1 + note F#, 2 + octave 2 + note G#, 1 + rest 1 + octave 3 + note G#, 1 + octave 2 + note G#, 1 + rest 2 + note G#, 1 + sound_ret + +Music_GoldenrodCity_Ch4: + toggle_noise 3 + drum_speed 12 + rest 16 + rest 16 + rest 16 + rest 8 + drum_note 3, 2 + drum_note 7, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 7, 2 +.mainloop: +.loop1: + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 3, .loop1 + sound_call .sub1 + sound_call .sub2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 7, 2 + sound_call .sub2 + drum_note 3, 2 + drum_note 7, 2 + sound_call .sub2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 7, 2 + sound_call .sub2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + sound_call .sub2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 7, 2 + sound_call .sub2 + drum_note 3, 2 + drum_note 7, 2 + sound_call .sub2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 7, 2 + sound_call .sub2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 +.loop2: + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 3, .loop2 + sound_call .sub1 + sound_loop 0, .mainloop + +.sub1: + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 7, 2 + sound_ret + +.sub2: + drum_note 4, 2 + drum_note 3, 1 + drum_note 4, 3 + drum_note 4, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + sound_ret diff --git a/audio/music/goldsilveropening.asm b/audio/music/goldsilveropening.asm new file mode 100644 index 0000000..8eac605 --- /dev/null +++ b/audio/music/goldsilveropening.asm @@ -0,0 +1,616 @@ +Music_GoldSilverOpening: + channel_count 3 + channel 1, Music_GoldSilverOpening_Ch1 + channel 2, Music_GoldSilverOpening_Ch2 + channel 3, Music_GoldSilverOpening_Ch3 + +Music_GoldSilverOpening_Ch1: + tempo 256 + volume 7, 7 + pitch_offset 1 + duty_cycle 2 + stereo_panning TRUE, FALSE + note_type 12, 11, 7 + octave 1 + note G#, 16 + note G#, 16 + tempo 168 + duty_cycle 3 + note_type 6, 12, 7 + octave 3 + note F_, 12 + note A_, 4 + octave 4 + note C_, 12 + octave 3 + note B_, 2 + note A#, 2 + note G_, 12 + note A#, 4 + octave 4 + note D#, 12 + note D_, 2 + note C#, 2 + note_type 6, 11, 5 + note C_, 8 + octave 3 + note F_, 8 + note A_, 8 + note B_, 4 + octave 4 + note C_, 4 + note_type 6, 11, 3 + octave 3 + note A#, 8 + note C#, 8 + octave 2 + note F#, 8 + octave 1 + note B_, 8 + note_type 6, 11, 2 + rest 4 + octave 3 + note A#, 4 + note A#, 8 + note G#, 4 + note G#, 8 + note G_, 4 + note G_, 8 + note F#, 4 + note F#, 8 + octave 2 + note A_, 4 + note A_, 8 + note G#, 4 + note G#, 8 + note G_, 4 + note G_, 8 + note F#, 4 + note A_, 8 + note A_, 4 + note A_, 8 + note G#, 6 + note G#, 6 + note F#, 4 + note G_, 4 + note F_, 4 + note_type 8, 11, 3 + octave 4 + note F_, 1 + note G_, 1 + note A_, 1 + note A#, 1 + note B_, 1 + octave 5 + note C_, 1 + duty_cycle 2 + note_type 12, 11, 3 + note D_, 1 + note C#, 1 + note D_, 4 + note A_, 1 + note G#, 1 + note A_, 4 + octave 4 + note A#, 2 + octave 5 + note D_, 2 + note F_, 2 + note G_, 6 + note D#, 2 + note D_, 2 + note C_, 2 + note D#, 4 + note F#, 2 + duty_cycle 3 + note_type 8, 9, 2 + note A_, 1 + note F_, 1 + note D#, 1 + note C_, 1 + octave 4 + note A_, 1 + note G_, 1 + note F_, 1 + note D#, 1 + note C_, 1 + octave 3 + note A_, 3 + note_type 12, 11, 2 + note A#, 2 + note B_, 2 + octave 4 + note C_, 2 + note D_, 2 + note D#, 2 + volume_envelope 12, 2 + note F_, 2 + note G_, 2 + note A_, 16 + sound_ret + +Music_GoldSilverOpening_Ch2: + pitch_offset 1 + stereo_panning FALSE, TRUE + note_type 12, 11, 7 + duty_cycle 2 + octave 2 + note C_, 16 + note C_, 16 + duty_cycle 3 + note_type 12, 11, 2 + rest 2 + note_type 6, 6, 2 + octave 1 + note F_, 2 + note A_, 2 + octave 2 + note C_, 2 + note E_, 2 + note F_, 2 + note A_, 2 + octave 3 + note C_, 2 + note E_, 2 + note F_, 2 + note A_, 2 + octave 4 + note C_, 2 + note E_, 2 + note F_, 2 + note A_, 2 + octave 5 + note C_, 2 + note E_, 2 + octave 1 + note D#, 2 + note G_, 2 + note A#, 2 + octave 2 + note D_, 2 + note D#, 2 + note G_, 2 + note A#, 2 + octave 3 + note D_, 2 + note D#, 2 + note G_, 2 + note A#, 2 + octave 4 + note D_, 2 + note D#, 2 + note G_, 2 + note_type 12, 11, 7 + octave 1 + note F_, 16 + volume_envelope 8, 3 + octave 4 + note F_, 2 + volume_envelope 8, 1 + note D_, 2 + volume_envelope 9, 3 + note G#, 2 + volume_envelope 9, 1 + note F_, 2 + volume_envelope 10, 3 + octave 5 + note C#, 2 + volume_envelope 10, 1 + octave 4 + note A#, 2 + volume_envelope 11, 3 + octave 5 + note F#, 2 + volume_envelope 12, 1 + note D#, 2 + volume_envelope 11, 3 + octave 1 + note A#, 2 + note_type 6, 11, 2 + octave 4 + note D_, 4 + note D_, 4 + octave 1 + note F_, 4 + octave 4 + note D_, 4 + note D_, 4 + octave 2 + note C_, 4 + octave 4 + note D#, 4 + note D#, 4 + octave 1 + note F_, 4 + octave 4 + note D#, 4 + note D#, 4 + octave 1 + note A#, 4 + octave 3 + note D_, 4 + note D_, 4 + octave 1 + note B_, 4 + octave 3 + note D_, 4 + note D_, 4 + octave 2 + note C_, 4 + octave 3 + note D#, 4 + note D#, 4 + octave 1 + note B_, 4 + octave 3 + note D#, 4 + note F#, 4 + octave 1 + note A#, 4 + octave 3 + note D_, 4 + note D_, 4 + octave 1 + note B_, 4 + octave 3 + note D_, 6 + note D_, 2 + octave 2 + note C_, 4 + octave 3 + note D#, 4 + note D#, 16 + octave 2 + note D#, 2 + octave 3 + note G_, 4 + note G_, 4 + note G_, 2 + octave 2 + note D#, 4 + octave 3 + note F#, 4 + note F#, 4 + octave 2 + note D_, 2 + octave 3 + note F_, 4 + note F_, 4 + note F_, 2 + octave 2 + note G_, 4 + octave 3 + note B_, 4 + note B_, 4 + octave 2 + note C_, 4 + octave 3 + note D#, 4 + note D#, 4 + octave 2 + note C_, 4 + octave 3 + note D#, 4 + note D#, 16 + note_type 6, 10, 2 + note F_, 4 + note G_, 4 + note G#, 4 + note_type 6, 12, 2 + note A_, 4 + note A#, 4 + octave 4 + note C_, 4 + note_type 6, 13, 2 + octave 3 + note A_, 4 + octave 4 + note C_, 4 + note D#, 16 + sound_ret + +Music_GoldSilverOpening_Ch3: + note_type 6, 1, 0 + octave 2 + note D_, 4 + note_type 6, 2, 0 + note D_, 4 + note_type 6, 3, 0 + note D_, 4 + rest 12 + rest 8 + note_type 6, 1, 0 + octave 2 + note D#, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + octave 3 + note D_, 1 + rest 1 + note D#, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + note D#, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + octave 5 + note D_, 1 + rest 1 + note D#, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + octave 6 + note D_, 1 + rest 1 + octave 2 + note F_, 1 + rest 1 + note A_, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + note E_, 1 + rest 1 + note F_, 1 + rest 1 + note A_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + note E_, 1 + rest 1 + note F_, 1 + rest 1 + note A_, 1 + rest 1 + octave 5 + note C_, 1 + rest 1 + note E_, 1 + rest 1 + note F_, 1 + rest 1 + note A_, 1 + rest 1 + octave 6 + note C_, 1 + rest 1 + note E_, 1 + rest 1 + octave 2 + note D#, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + octave 3 + note D_, 1 + rest 1 + note D#, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + note D#, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + octave 5 + note D_, 1 + rest 1 + note D#, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + octave 6 + note D_, 1 + rest 1 + note_type 8, 1, 0 + note F_, 1 + octave 5 + note B_, 1 + note A_, 1 + note B_, 1 + note A_, 1 + note F_, 1 + note A_, 1 + note F_, 1 + octave 4 + note B_, 1 + octave 5 + note F_, 1 + octave 4 + note B_, 1 + note A_, 1 + note B_, 1 + note A_, 1 + note F_, 1 + note A_, 1 + note F_, 1 + octave 3 + note B_, 1 + octave 4 + note F_, 1 + octave 3 + note B_, 1 + note A_, 1 + note B_, 1 + note A_, 1 + note F_, 1 + octave 5 + note A_, 3 + note_type 12, 1, 0 + note G_, 1 + rest 1 + octave 6 + note C_, 2 + octave 5 + note A#, 1 + rest 1 + octave 6 + note F_, 2 + note D#, 1 + rest 1 + note A#, 2 + note G#, 1 + rest 1 + rest 16 + rest 4 + note_type 6, 1, 0 + octave 2 + note G_, 1 + rest 3 + note A_, 2 + rest 2 + octave 5 + note F_, 12 + note D_, 4 + note D_, 6 + note F_, 2 + note D#, 12 + note G#, 2 + rest 2 + note F#, 6 + note D#, 2 + note F_, 12 + note D_, 2 + rest 2 + note D#, 6 + note F_, 2 + note G_, 2 + rest 2 + note F#, 2 + rest 2 + note G_, 2 + rest 2 + note A_, 4 + note D#, 4 + note F_, 2 + rest 2 + octave 4 + note A#, 1 + rest 1 + octave 5 + note D_, 1 + rest 1 + octave 4 + note A#, 1 + rest 1 + octave 5 + note D_, 1 + rest 1 + octave 4 + note A#, 1 + rest 1 + octave 5 + note D_, 1 + rest 1 + octave 4 + note A#, 1 + rest 1 + octave 5 + note C_, 1 + rest 1 + octave 4 + note A#, 1 + rest 1 + octave 5 + note C_, 1 + rest 1 + octave 4 + note A#, 1 + rest 1 + octave 5 + note C_, 1 + rest 1 + octave 4 + note A#, 1 + rest 1 + octave 5 + note D_, 1 + rest 1 + octave 4 + note A#, 1 + rest 1 + octave 5 + note D_, 1 + rest 1 + octave 4 + note A#, 1 + rest 1 + octave 5 + note D_, 1 + rest 1 + octave 4 + note A#, 1 + rest 1 + octave 5 + note C_, 1 + rest 1 + note D_, 1 + rest 1 + note F_, 1 + rest 1 + note D_, 1 + rest 1 + note F_, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + note F#, 1 + rest 1 + note A#, 1 + rest 1 + note F#, 1 + rest 1 + note A#, 1 + rest 1 + note F#, 1 + rest 1 + note A#, 1 + rest 9 + note_type 12, 1, 0 + rest 14 + octave 3 + note F_, 2 + note D#, 1 + rest 1 + note C_, 1 + rest 13 + sound_ret diff --git a/audio/music/goldsilveropening2.asm b/audio/music/goldsilveropening2.asm new file mode 100644 index 0000000..13714b3 --- /dev/null +++ b/audio/music/goldsilveropening2.asm @@ -0,0 +1,218 @@ +Music_GoldSilverOpening2: + channel_count 4 + channel 1, Music_GoldSilverOpening2_Ch1 + channel 2, Music_GoldSilverOpening2_Ch2 + channel 3, Music_GoldSilverOpening2_Ch3 + channel 4, Music_GoldSilverOpening2_Ch4 + +Music_GoldSilverOpening2_Ch1: + tempo 92 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + stereo_panning FALSE, TRUE + note_type 12, 3, -5 + octave 3 + note D#, 8 +.loop1: + note_type 12, 12, 1 + octave 3 + note D_, 2 + note D_, 2 + note D_, 2 + volume_envelope 11, 7 + note D#, 10 + volume_envelope 12, 1 + note D_, 2 + note D_, 2 + note D_, 2 + volume_envelope 11, 7 + note F_, 4 + note D#, 4 + note C_, 2 + sound_loop 2, .loop1 + volume_envelope 12, 1 + note D_, 2 + note D_, 2 + note D_, 2 + volume_envelope 11, 7 + note D#, 10 + volume_envelope 12, 1 + note D_, 2 + note D_, 2 + note D_, 2 + volume_envelope 11, 7 + note F_, 4 + note G_, 4 + note A#, 2 + volume_envelope 11, 0 + note A_, 16 + note A_, 16 + volume_envelope 11, 2 + octave 4 + note D_, 16 + sound_ret + +Music_GoldSilverOpening2_Ch2: + duty_cycle 3 + vibrato 20, 1, 4 + stereo_panning TRUE, FALSE + note_type 12, 3, -7 + octave 3 + note A#, 8 + note_type 12, 13, 1 + octave 3 + note A_, 2 + note A_, 2 + note A_, 2 + volume_envelope 12, 7 + note A#, 10 + volume_envelope 13, 1 + note A_, 2 + note A_, 2 + note A_, 2 + volume_envelope 12, 7 + octave 4 + note C_, 4 + octave 3 + note A#, 4 + note G_, 2 + volume_envelope 13, 1 + note A_, 2 + note A_, 2 + note A_, 2 + volume_envelope 12, 7 + note A#, 10 + volume_envelope 13, 1 + note A_, 2 + note A_, 2 + note A_, 2 + volume_envelope 12, 7 + octave 4 + note C_, 4 + note C#, 4 + note D#, 2 + volume_envelope 12, 7 + note D_, 8 + note D#, 8 + note F_, 8 + note A#, 8 + volume_envelope 11, 0 + octave 5 + note D_, 16 + note D_, 16 + volume_envelope 12, 2 + note D_, 16 + sound_ret + +Music_GoldSilverOpening2_Ch3: + note_type 12, 1, 7 + rest 8 + octave 2 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A#, 8 + rest 2 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note D_, 4 + note F_, 4 + note A_, 2 + note D_, 2 + note A_, 2 + note D_, 2 + note A_, 2 + note G#, 2 + note E_, 2 + note G_, 2 + note F_, 2 + note D_, 2 + note A_, 2 + note G#, 2 + note E_, 2 + note G_, 2 + note F_, 2 + note C_, 2 + note D#, 2 + note D_, 2 + note A_, 2 + note D_, 2 + note A_, 2 + note G#, 2 + note E_, 2 + note G_, 2 + note F_, 2 + note D_, 2 + note A_, 2 + note G#, 2 + note E_, 2 + note G_, 2 + note F_, 2 + note C_, 2 + note D#, 2 + note D_, 2 + note F#, 2 + note A#, 2 + octave 3 + note D_, 2 + octave 2 + note A#, 2 + note A_, 2 + note F#, 2 + note D#, 2 + note D_, 2 + note F#, 2 + note A#, 2 + octave 3 + note D_, 2 + octave 2 + note A#, 2 + note F#, 2 + note A#, 2 + octave 3 + note C#, 2 + note D_, 2 + rest 14 + sound_ret + +Music_GoldSilverOpening2_Ch4: + toggle_noise 0 + drum_speed 6 + drum_note 4, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_speed 12 +.loop1: + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 2, 4 + drum_note 4, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 2, 6 + drum_speed 6 + drum_note 4, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_speed 12 + sound_loop 4, .loop1 + drum_note 1, 16 + sound_ret diff --git a/audio/music/gym.asm b/audio/music/gym.asm new file mode 100644 index 0000000..774e471 --- /dev/null +++ b/audio/music/gym.asm @@ -0,0 +1,567 @@ +Music_Gym: + channel_count 4 + channel 1, Music_Gym_Ch1 + channel 2, Music_Gym_Ch2 + channel 3, Music_Gym_Ch3 + channel 4, Music_Gym_Ch4 + +Music_Gym_Ch1: + tempo 156 + volume 7, 7 + stereo_panning FALSE, TRUE + vibrato 18, 2, 4 + duty_cycle 1 + note_type 12, 11, 7 +.mainloop: + octave 4 + note F#, 2 + octave 2 + note A_, 1 + note A_, 1 + note A_, 1 + rest 3 + octave 4 + note E_, 2 + octave 2 + note G_, 1 + note G_, 1 + note G_, 1 + rest 3 + octave 4 + note D_, 2 + octave 2 + note D_, 1 + note D_, 1 + note D_, 1 + rest 1 + octave 3 + note D_, 1 + note D_, 1 + note B_, 1 + note G_, 1 + note D_, 1 + note B_, 1 + octave 4 + note C#, 1 + octave 3 + note A_, 1 + note E_, 1 + octave 4 + note E_, 1 + octave 3 + note A_, 12 + note F#, 2 + note A_, 2 + note G_, 1 + rest 2 + note E_, 1 + note E_, 2 + note C_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note A_, 2 + note G_, 2 + note F#, 8 + note A_, 4 + note F#, 2 + note A_, 2 + note E_, 1 + rest 1 + note E_, 1 + note F#, 1 + note G_, 4 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note A_, 2 + octave 4 + note C_, 2 + note D_, 6 + octave 3 + note A_, 2 + note F#, 2 + note E_, 2 + note G_, 2 + note A_, 2 + note B_, 1 + rest 2 + note G_, 1 + note G_, 4 + octave 4 + note E_, 1 + rest 2 + note C_, 1 + note C_, 2 + octave 3 + note B_, 1 + note A#, 1 + note A_, 12 + note F#, 2 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + note E_, 2 + note C_, 2 + note E_, 2 + note C_, 1 + note E_, 1 + note G_, 4 + note D_, 6 + octave 3 + note A_, 1 + rest 3 + note A_, 1 + rest 1 + note A_, 1 + octave 4 + note F#, 3 + note G_, 4 + note F#, 4 + note E_, 4 + note C_, 4 + note D_, 1 + rest 1 + note D_, 1 + note E_, 1 + rest 2 + octave 3 + note B_, 4 + note F#, 2 + note D_, 2 + note F#, 2 + note A#, 1 + note A_, 1 + note G_, 1 + note F_, 1 + octave 4 + note D_, 4 + note C_, 1 + octave 3 + note A#, 1 + note A_, 1 + note G_, 1 + octave 4 + note E_, 4 + note F#, 6 + octave 3 + note A_, 1 + rest 3 + note A_, 1 + rest 1 + note A_, 1 + octave 4 + note F#, 3 + note A_, 4 + note G_, 4 + note F#, 4 + note E_, 4 + note D_, 1 + octave 3 + note B_, 1 + note F#, 1 + octave 4 + note E_, 1 + note F#, 4 + note E_, 1 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note F#, 1 + note G_, 4 + note A_, 1 + note G_, 1 + note F#, 1 + note E_, 1 + note A_, 4 + octave 5 + note D_, 4 + octave 4 + note A_, 1 + note G_, 1 + note F#, 1 + note E_, 1 + sound_loop 0, .mainloop + +Music_Gym_Ch2: + duty_cycle 1 + stereo_panning TRUE, FALSE +.mainloop: + note_type 12, 12, 3 + octave 2 + note D_, 2 + octave 1 + note D_, 1 + note D_, 1 + note D_, 2 + note A_, 1 + octave 2 + note F#, 1 + note C_, 2 + octave 1 + note C_, 1 + note C_, 1 + note C_, 2 + octave 2 + note G_, 1 + note E_, 1 + octave 1 + note G_, 2 + octave 1 + note G_, 1 + note G_, 1 + note G_, 2 + octave 1 + note G_, 1 + note G_, 1 + note A_, 4 + octave 2 + note A_, 2 + octave 3 + note C_, 1 + note C#, 1 + sound_call .sub1 + octave 3 + note E_, 2 + note C_, 1 + note C#, 1 + sound_call .sub1 + octave 3 + note C_, 1 + note E_, 1 + note G_, 1 + octave 4 + note C_, 1 + volume_envelope 13, 2 + sound_call .sub2 + octave 1 + note F#, 1 + note B_, 1 + note F#, 2 + octave 2 + note F#, 2 + octave 1 + note B_, 2 + note A#, 4 + note A#, 2 + note F_, 1 + note F_, 1 + note G_, 1 + octave 2 + note C_, 1 + octave 1 + note G_, 2 + octave 2 + note G_, 2 + note E_, 2 + sound_call .sub2 + octave 1 + note G_, 1 + octave 2 + note C_, 1 + octave 1 + note G_, 2 + octave 2 + note E_, 2 + note C_, 2 + note D_, 4 + note D_, 2 + octave 1 + note A_, 1 + note A_, 1 + note A_, 1 + octave 2 + note D_, 1 + octave 1 + note A_, 2 + octave 2 + note F#, 2 + note D_, 2 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note D_, 3 + octave 2 + note D_, 3 + note D_, 2 + note D_, 1 + note D_, 1 + note D_, 2 + octave 3 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note C_, 3 + octave 2 + note C_, 3 + note C_, 2 + note C_, 1 + note C_, 1 + note C_, 2 + octave 3 + note E_, 2 + note C_, 1 + note C#, 1 + note D_, 3 + octave 2 + note D_, 3 + note D_, 2 + note D_, 1 + note D_, 1 + note D_, 2 + octave 3 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note C_, 3 + octave 2 + note C_, 3 + note C_, 2 + note C_, 1 + note C_, 1 + note C_, 2 + sound_ret + +.sub2: + octave 2 + note D_, 4 + note D_, 2 + octave 1 + note A_, 1 + note A_, 1 + note A_, 1 + octave 2 + note D_, 1 + octave 1 + note A_, 2 + octave 2 + note A_, 2 + note D_, 2 + note C_, 4 + note C_, 2 + octave 1 + note G_, 1 + note G_, 1 + note G_, 1 + octave 2 + note C_, 1 + octave 1 + note G_, 2 + octave 2 + note G_, 2 + note C_, 2 + octave 1 + note B_, 2 + rest 2 + note B_, 2 + note F#, 1 + note F#, 1 + sound_ret + +Music_Gym_Ch3: + vibrato 20, 2, 3 + stereo_panning TRUE, TRUE +.mainloop: + note_type 12, 1, 4 + octave 6 + note D_, 2 + octave 4 + note D_, 1 + note D_, 1 + note D_, 1 + rest 1 + octave 5 + note A_, 1 + octave 6 + note D_, 1 + note C_, 2 + octave 4 + note C_, 1 + note C_, 1 + note C_, 1 + rest 1 + octave 5 + note A_, 1 + octave 6 + note C_, 1 + octave 5 + note B_, 2 + octave 3 + note G_, 1 + note G_, 1 + note G_, 1 + rest 1 + octave 5 + note B_, 1 + note B_, 1 + note B_, 4 + octave 6 + note C#, 4 + octave 5 + note D_, 12 + octave 4 + note A_, 2 + octave 5 + note D_, 2 + note E_, 1 + rest 2 + note C_, 1 + note C_, 4 + note G_, 4 + note E_, 4 + note D_, 12 + octave 4 + note A_, 2 + octave 5 + note D_, 2 + note C_, 1 + rest 1 + note C_, 1 + note D_, 1 + note E_, 8 + rest 4 + note F#, 12 + note E_, 2 + note F#, 2 + note G_, 1 + rest 2 + note E_, 1 + note E_, 4 + octave 6 + note C_, 1 + rest 2 + octave 5 + note G_, 1 + note G_, 4 + note F#, 12 + note E_, 2 + note F#, 2 + note G_, 2 + note E_, 1 + note G_, 1 + octave 6 + note C_, 8 + octave 5 + note B_, 4 + volume_envelope 1, 3 + sound_call .sub1 + rest 2 + note A_, 2 + octave 6 + note D_, 2 + octave 5 + note A_, 2 + octave 6 + note C_, 4 + octave 5 + note A#, 4 + note A_, 4 + note G_, 4 + sound_call .sub1 + note A_, 1 + rest 1 + note A_, 1 + note B_, 1 + octave 6 + note C_, 4 + note D_, 1 + rest 1 + note D_, 1 + note E_, 1 + note F#, 8 + note E_, 4 + sound_loop 0, .mainloop + +.sub1: + octave 5 + note A_, 6 + octave 6 + note D_, 6 + octave 5 + note A_, 4 + octave 6 + note C_, 4 + octave 5 + note B_, 4 + note A_, 4 + note G_, 4 + note F#, 1 + rest 1 + note F#, 1 + note G_, 1 + note A_, 4 + sound_ret + +Music_Gym_Ch4: + toggle_noise 4 +.mainloop: + drum_speed 12 + drum_note 3, 2 + drum_note 2, 1 + drum_note 2, 1 + drum_note 12, 4 + drum_note 3, 2 + drum_note 2, 1 + drum_note 2, 1 + drum_note 12, 4 + drum_note 3, 2 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 2 + drum_note 2, 1 + drum_note 2, 1 + drum_note 11, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_speed 6 +.loop1: + drum_note 3, 6 + drum_note 3, 6 + drum_note 3, 4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 4 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 6 + drum_note 3, 6 + drum_note 3, 4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 4 + drum_note 12, 8 + sound_loop 4, .loop1 +.loop2: + drum_note 4, 4 + drum_note 7, 4 + drum_note 3, 4 + drum_note 4, 2 + drum_note 3, 2 + drum_note 4, 2 + drum_note 3, 2 + drum_note 4, 4 + drum_note 3, 4 + drum_note 7, 4 + sound_loop 8, .loop2 + sound_loop 0, .mainloop diff --git a/audio/music/gymleadervictory.asm b/audio/music/gymleadervictory.asm new file mode 100644 index 0000000..4f53ea8 --- /dev/null +++ b/audio/music/gymleadervictory.asm @@ -0,0 +1,423 @@ +Music_GymLeaderVictory: + channel_count 4 + channel 1, Music_GymLeaderVictory_Ch1 + channel 2, Music_GymLeaderVictory_Ch2 + channel 3, Music_GymLeaderVictory_Ch3 + channel 4, Music_GymLeaderVictory_Ch4 + +Music_GymLeaderVictory_Ch1: + tempo 116 + volume 7, 7 + vibrato 18, 3, 4 + duty_cycle 3 + pitch_offset 1 + note_type 12, 11, 7 + octave 4 + note D_, 6 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + note F#, 6 + note D_, 1 + note F#, 1 + note A_, 6 + note F#, 1 + note A_, 1 + octave 5 + note D_, 8 + stereo_panning FALSE, TRUE +.mainloop: +.loop1: + duty_cycle 1 + sound_call .sub1 + octave 4 + note C#, 4 + note E_, 4 + sound_call .sub1 + note F#, 8 + sound_loop 2, .loop1 + duty_cycle 2 + sound_call .sub2 + note A_, 4 + note G_, 4 + note F#, 6 + note D_, 1 + note E_, 1 + note F#, 6 + note E_, 2 + note D_, 8 + note C#, 8 + duty_cycle 3 + sound_call .sub2 + note C#, 4 + note E_, 4 + note G_, 6 + note A_, 1 + note G_, 1 + note A_, 6 + note G_, 2 + volume_envelope 8, 7 + note F#, 16 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 9, 1 + octave 3 + note F#, 2 + note A_, 2 + octave 4 + note D_, 2 + octave 3 + note A_, 1 + note F#, 1 + note E_, 2 + note A_, 2 + octave 4 + note C#, 2 + octave 3 + note A_, 1 + note E_, 1 + note D_, 2 + note G_, 2 + note B_, 2 + note G_, 1 + note D_, 1 + sound_ret + +.sub2: + volume_envelope 8, 7 + octave 3 + note F#, 14 + note D_, 1 + note F#, 1 + note A_, 8 + note F#, 4 + note A_, 1 + note G#, 1 + note F#, 1 + note A_, 1 + note G#, 14 + note E_, 1 + note G#, 1 + note B_, 8 + octave 4 + note D_, 4 + note E_, 1 + note D_, 1 + note E_, 1 + note D_, 1 + note C#, 14 + octave 3 + note A_, 1 + octave 4 + note C#, 1 + note E_, 8 + sound_ret + +Music_GymLeaderVictory_Ch2: + vibrato 18, 3, 4 + duty_cycle 3 + note_type 12, 13, 7 + octave 4 + note A_, 6 + note F#, 1 + note A_, 1 + octave 5 + note D_, 6 + octave 4 + note A_, 1 + octave 5 + note D_, 1 + note F#, 16 +.mainloop: + duty_cycle 3 + volume_envelope 10, 1 + sound_call .sub1 + note A_, 4 + note A_, 4 + sound_call .sub1 + note D_, 6 + duty_cycle 2 + note B_, 1 + octave 5 + note C#, 1 + sound_call .sub1 + note A_, 4 + note A_, 4 + sound_call .sub1 + note D_, 8 + duty_cycle 3 + sound_call .sub2 + note F#, 4 + note E_, 4 + note D_, 14 + octave 4 + note B_, 2 + volume_envelope 10, 7 + note A_, 16 + duty_cycle 2 + sound_call .sub2 + octave 4 + note A_, 4 + octave 5 + note C#, 4 + note D_, 14 + note E_, 2 + volume_envelope 10, 6 + note D_, 12 + rest 2 + duty_cycle 3 + octave 4 + note B_, 1 + octave 5 + note C#, 1 + sound_loop 0, .mainloop + +.sub1: + octave 5 + note D_, 2 + note C#, 2 + octave 4 + note B_, 4 + octave 5 + note C#, 2 + octave 4 + note B_, 2 + note A_, 4 + note B_, 2 + note A_, 2 + note G_, 2 + note F#, 2 + sound_ret + +.sub2: + volume_envelope 9, 8 + note A_, 6 + note F#, 1 + note A_, 1 + octave 5 + note D_, 8 + note D_, 16 + octave 4 + note B_, 6 + note G#, 1 + note B_, 1 + octave 5 + note E_, 8 + note E_, 16 + octave 4 + note G_, 6 + note E_, 1 + note G_, 1 + octave 5 + note C#, 8 + note C#, 8 + sound_ret + +Music_GymLeaderVictory_Ch3: + note_type 12, 2, 5 + octave 3 + note F#, 16 + note D_, 10 + octave 2 + note A_, 2 + note B_, 2 + octave 3 + note C#, 2 + stereo_panning TRUE, FALSE +.mainloop: +.loop1: + note D_, 2 + rest 4 + octave 2 + note A_, 2 + octave 3 + note C#, 2 + rest 4 + octave 2 + note A_, 2 + note B_, 2 + rest 4 + note G_, 2 + note A_, 2 + rest 2 + octave 3 + note C#, 4 + note D_, 2 + rest 4 + octave 2 + note A_, 2 + octave 3 + note C#, 2 + rest 4 + octave 2 + note A_, 2 + note B_, 2 + rest 4 + note G_, 2 + octave 3 + note D_, 2 + rest 6 + sound_loop 2, .loop1 + sound_call .sub1 + octave 3 + note D_, 2 + rest 2 + note D_, 2 + octave 4 + note D_, 2 + rest 2 + octave 3 + note D_, 2 + note F#, 2 + note D_, 2 + note A_, 2 + rest 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + rest 2 + octave 2 + note A_, 2 + octave 3 + note C#, 2 + octave 2 + note A_, 2 + sound_call .sub1 + octave 3 + note D_, 2 + rest 2 + note G_, 2 + octave 4 + note D_, 2 + rest 2 + octave 3 + note D_, 2 + note G_, 2 + note E_, 2 + note D_, 2 + rest 2 + note D_, 2 + note A_, 2 + rest 2 + octave 2 + note A_, 2 + note B_, 2 + octave 3 + note C#, 2 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note D_, 2 + rest 2 + note D_, 2 + octave 4 + note D_, 2 + rest 2 + octave 3 + note D_, 2 + note F#, 2 + note D_, 2 + note A_, 2 + rest 2 + note D_, 2 + note F#, 2 + rest 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + rest 2 + note E_, 2 + octave 4 + note E_, 2 + rest 2 + octave 3 + note E_, 2 + note G#, 2 + note E_, 2 + note B_, 2 + rest 2 + note E_, 2 + note G#, 2 + rest 2 + octave 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note B_, 2 + note A_, 2 + rest 2 + note A_, 2 + octave 3 + note A_, 2 + rest 2 + octave 2 + note A_, 2 + octave 3 + note C#, 2 + octave 2 + note A_, 2 + octave 3 + note A_, 2 + rest 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + rest 2 + octave 2 + note A_, 2 + octave 3 + note C#, 2 + octave 2 + note A_, 2 + sound_ret + +Music_GymLeaderVictory_Ch4: + toggle_noise 4 + drum_speed 12 + drum_note 12, 16 + drum_note 12, 16 +.mainloop: + sound_call .sub1 + drum_note 4, 6 + drum_note 4, 2 + drum_note 4, 8 + sound_call .sub1 + drum_note 4, 6 + drum_note 4, 2 + drum_note 4, 4 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 +.loop1: + drum_note 4, 2 + drum_note 8, 2 + drum_note 3, 2 + drum_note 4, 2 + drum_note 8, 2 + drum_note 4, 2 + drum_note 3, 2 + drum_note 8, 2 + sound_loop 16, .loop1 + sound_loop 0, .mainloop + +.sub1: +.sub1loop1: + drum_note 4, 6 + drum_note 4, 2 + drum_note 4, 4 + drum_note 3, 2 + drum_note 4, 2 + sound_loop 3, .sub1loop1 + sound_ret diff --git a/audio/music/halloffame.asm b/audio/music/halloffame.asm new file mode 100644 index 0000000..1786773 --- /dev/null +++ b/audio/music/halloffame.asm @@ -0,0 +1,174 @@ +Music_HallOfFame: + channel_count 4 + channel 1, Music_HallOfFame_Ch1 + channel 2, Music_HallOfFame_Ch2 + channel 3, Music_HallOfFame_Ch3 + channel 4, Music_HallOfFame_Ch4 + +Music_HallOfFame_Ch1: + tempo 112 + volume 7, 7 + duty_cycle 2 + vibrato 12, 2, 2 + pitch_offset 1 + stereo_panning TRUE, FALSE + note_type 12, 9, 3 + rest 16 + rest 16 + rest 16 + rest 12 + octave 3 + note D_, 1 + note E_, 1 + note F_, 1 + note F#, 1 +.mainloop: +.loop1: + volume_envelope 9, 7 + octave 4 + note C_, 8 + volume_envelope 7, 7 + note C_, 8 + volume_envelope 9, 7 + note E_, 8 + volume_envelope 7, 7 + note E_, 8 + volume_envelope 9, 7 + note F#, 8 + volume_envelope 7, 7 + note F#, 8 + volume_envelope 7, 7 + note F_, 8 + volume_envelope 5, 7 + note F_, 8 + sound_loop 3, .loop1 + rest 16 + rest 16 + rest 16 + rest 16 + sound_loop 0, .mainloop + +Music_HallOfFame_Ch2: + vibrato 8, 2, 5 + duty_cycle 3 +.mainloop: + note_type 12, 12, 4 + octave 3 + note G_, 2 + note D_, 2 + note G_, 2 + note A_, 10 + note G_, 2 + note D_, 2 + note G_, 2 + octave 4 + note C_, 4 + octave 3 + note B_, 4 + note A_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note A_, 10 + note F_, 2 + note C_, 2 + note F_, 2 + note A#, 4 + note A_, 4 + note F_, 2 + sound_loop 0, .mainloop + +Music_HallOfFame_Ch3: +.mainloop: + note_type 12, 2, 8 +.loop1: + octave 3 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + octave 3 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + octave 3 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + octave 3 + note C_, 2 + note F_, 2 + note C_, 2 + note F_, 2 + note C_, 2 + note F_, 2 + note C_, 2 + note F_, 2 + sound_loop 3, .loop1 + note D_, 4 + note G_, 4 + note D_, 4 + note G_, 4 + note E_, 4 + note G_, 4 + note E_, 4 + note G_, 4 + note F#, 4 + note A_, 4 + note F#, 4 + note A_, 4 + note E_, 4 + note G_, 4 + note E_, 4 + note G_, 4 + sound_loop 0, .mainloop + +Music_HallOfFame_Ch4: + toggle_noise 5 + drum_speed 12 + rest 16 + rest 16 + rest 16 + rest 16 + drum_speed 6 +.mainloop: + stereo_panning FALSE, TRUE + drum_note 11, 4 + drum_note 11, 8 + drum_note 11, 4 + drum_note 11, 4 + drum_note 11, 4 + stereo_panning TRUE, FALSE + drum_note 10, 2 + drum_note 10, 2 + drum_note 11, 2 + drum_note 11, 2 + drum_note 11, 4 + drum_note 11, 4 + drum_note 11, 8 + drum_note 11, 4 + drum_note 11, 4 + stereo_panning FALSE, TRUE + drum_note 11, 1 + drum_note 11, 1 + drum_note 10, 1 + drum_note 10, 1 + drum_note 11, 1 + drum_note 11, 1 + drum_note 11, 1 + drum_note 11, 1 + sound_loop 0, .mainloop diff --git a/audio/music/healpokemon.asm b/audio/music/healpokemon.asm new file mode 100644 index 0000000..0a5130b --- /dev/null +++ b/audio/music/healpokemon.asm @@ -0,0 +1,51 @@ +Music_HealPokemon: + channel_count 3 + channel 1, Music_HealPokemon_Ch1 + channel 2, Music_HealPokemon_Ch2 + channel 3, Music_HealPokemon_Ch3 + +Music_HealPokemon_Ch1: + tempo 144 + volume 7, 7 + duty_cycle 2 + pitch_offset 1 + note_type 12, 8, 1 + rest 2 + pitch_slide 1, 4, B_ + note B_, 2 + pitch_slide 1, 3, E_ + note B_, 2 + pitch_slide 1, 4, E_ + note E_, 2 + rest 4 + pitch_slide 1, 5, B_ + note E_, 4 + pitch_slide 1, 4, B_ + note B_, 4 + sound_ret + +Music_HealPokemon_Ch2: + duty_cycle 2 + note_type 12, 12, 3 + octave 4 + note B_, 4 + note B_, 4 + note B_, 2 + note G#, 2 + note_type 12, 12, 4 + octave 5 + note E_, 8 + sound_ret + +Music_HealPokemon_Ch3: + note_type 12, 1, 0 + octave 4 + note E_, 2 + rest 2 + note E_, 2 + rest 2 + note E_, 2 + note G#, 2 + note E_, 6 + rest 2 + sound_ret diff --git a/audio/music/indigoplateau.asm b/audio/music/indigoplateau.asm new file mode 100644 index 0000000..189cbb2 --- /dev/null +++ b/audio/music/indigoplateau.asm @@ -0,0 +1,183 @@ +Music_IndigoPlateau: + channel_count 4 + channel 1, Music_IndigoPlateau_Ch1 + channel 2, Music_IndigoPlateau_Ch2 + channel 3, Music_IndigoPlateau_Ch3 + channel 4, Music_IndigoPlateau_Ch4 + +Music_IndigoPlateau_Ch1: + tempo 128 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + stereo_panning FALSE, TRUE +.mainloop: + sound_call .sub1 + octave 3 + note D_, 4 + sound_call .sub1 + octave 3 + note D#, 4 + sound_call .sub1 + octave 3 + note D#, 4 + sound_call .sub1 + note A#, 4 + sound_loop 0, .mainloop + +.sub1: + note_type 12, 11, 6 + octave 2 + note A_, 4 + volume_envelope 11, 2 + note A_, 2 + note A_, 2 + note A_, 2 + note A_, 2 + note A_, 4 + note A_, 2 + note A_, 2 + volume_envelope 10, 0 + sound_ret + +Music_IndigoPlateau_Ch2: + duty_cycle 3 + vibrato 16, 2, 2 + stereo_panning TRUE, FALSE +.mainloop: + sound_call .sub1 + note A_, 4 + sound_call .sub1 + note A#, 4 + sound_call .sub1 + note A_, 4 + sound_call .sub1 + note C#, 4 + volume_envelope 12, 7 + note A_, 6 + note D_, 2 + note G_, 2 + note A#, 2 + note A_, 8 + volume_envelope 11, 0 + note A_, 4 + sound_call .sub1 + note A#, 4 + volume_envelope 12, 7 + octave 4 + note D_, 6 + note D#, 2 + note C_, 4 + note D_, 8 + volume_envelope 11, 0 + octave 3 + note A_, 4 + sound_call .sub1 + note C#, 4 + volume_envelope 12, 7 + octave 4 + note C_, 6 + octave 3 + note A#, 2 + note A_, 2 + note G_, 2 + note F#, 8 + volume_envelope 11, 0 + note A_, 4 + sound_call .sub1 + note A#, 4 + volume_envelope 12, 7 + octave 4 + note D_, 6 + note D#, 2 + note F_, 4 + note F#, 8 + volume_envelope 11, 0 + octave 3 + note A_, 4 + sound_call .sub1 + note C#, 4 + sound_loop 0, .mainloop + +.sub1: + note_type 12, 12, 6 + octave 3 + note D_, 4 + volume_envelope 12, 2 + note D_, 2 + note D_, 2 + note D_, 2 + note D_, 2 + note D_, 4 + note D_, 2 + note D_, 2 + volume_envelope 11, 0 + sound_ret + +Music_IndigoPlateau_Ch3: + note_type 12, 1, 9 +.mainloop: + sound_call .sub1 + octave 3 + note A_, 4 + sound_call .sub1 + octave 3 + note A_, 4 + sound_call .sub1 + octave 3 + note A_, 4 + sound_call .sub1 + octave 3 + note F#, 4 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note D_, 1 + rest 3 + octave 2 + note A_, 1 + rest 3 + octave 3 + note C_, 1 + rest 3 + note D_, 1 + rest 3 + octave 2 + note A_, 1 + rest 3 + sound_ret + +Music_IndigoPlateau_Ch4: + stereo_panning TRUE, FALSE + toggle_noise 0 + drum_speed 12 +.mainloop: + drum_note 4, 4 + drum_note 3, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 3, 4 + drum_note 3, 2 + drum_note 3, 2 + drum_speed 6 + drum_note 3, 1 + drum_note 3, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_speed 12 + drum_note 4, 4 + drum_note 3, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 3, 2 + drum_note 2, 4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 2, 4 + sound_loop 0, .mainloop diff --git a/audio/music/johtogymbattle.asm b/audio/music/johtogymbattle.asm new file mode 100644 index 0000000..2c29e79 --- /dev/null +++ b/audio/music/johtogymbattle.asm @@ -0,0 +1,1023 @@ +Music_JohtoGymBattle: + channel_count 3 + channel 1, Music_JohtoGymBattle_Ch1 + channel 2, Music_JohtoGymBattle_Ch2 + channel 3, Music_JohtoGymBattle_Ch3 + +Music_JohtoGymBattle_Ch1: + tempo 101 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 18, 1, 5 + note_type 12, 11, 2 +.loop1: + octave 3 + note A#, 1 + note A_, 1 + note G#, 1 + note A_, 1 + sound_loop 4, .loop1 +.loop2: + note C#, 1 + note C_, 1 + octave 2 + note A#, 1 + octave 3 + note C_, 1 + sound_loop 3, .loop2 + volume_envelope 4, -3 + note C#, 4 + volume_envelope 11, 2 + note D_, 6 + note D#, 6 + note C_, 4 + note F_, 6 + note D_, 6 + note D#, 4 + note D_, 6 + note D#, 6 + note C_, 4 + note F_, 6 + note G_, 6 + volume_envelope 11, 7 + note C_, 4 + volume_envelope 11, 2 + note G_, 6 + note G#, 6 + note F_, 4 + note G#, 6 + note F_, 6 + note G#, 4 + note G_, 6 + note G#, 6 + note F_, 4 + note G#, 6 + octave 4 + note C_, 6 + octave 3 + note G#, 2 + note F_, 2 +.mainloop: + volume_envelope 11, 5 + note D_, 6 + note G_, 6 + note F_, 2 + note G_, 2 + note G#, 4 + note G_, 4 + note F_, 4 + note G_, 4 + volume_envelope 11, 7 + note G#, 12 + volume_envelope 11, 2 + note G_, 4 + volume_envelope 11, 7 + octave 4 + note C#, 12 + volume_envelope 11, 2 + note C_, 4 + volume_envelope 11, 5 + octave 3 + note D_, 6 + note G_, 6 + note F_, 2 + note G_, 2 + note G#, 4 + note G_, 4 + note F_, 4 + note G_, 4 + volume_envelope 11, 7 + note G#, 8 + note G_, 8 + note F_, 8 + note D#, 8 + volume_envelope 7, 0 + note C_, 8 + volume_envelope 7, 7 + note C_, 8 + volume_envelope 11, 4 + note D#, 2 + note E_, 2 + note F_, 6 + note G_, 2 + note D#, 4 + volume_envelope 7, 7 + octave 2 + note A#, 8 + note A#, 8 + volume_envelope 12, 5 + octave 3 + note G_, 2 + note G#, 2 + note A#, 6 + note A#, 2 + note G#, 4 + volume_envelope 12, 7 + note G_, 8 + note F_, 4 + note E_, 2 + note C#, 2 + volume_envelope 10, 0 + note C_, 8 + volume_envelope 10, 7 + note C_, 8 + volume_envelope 11, 2 + note F_, 6 + note F_, 4 + note E_, 2 + note F_, 4 + note F_, 6 + note F_, 6 + note F_, 2 + note G#, 2 + note E_, 6 + note E_, 4 + note F_, 2 + note E_, 2 + note C#, 2 + note C_, 6 + note C_, 6 + note C_, 4 + note F_, 6 + note F_, 2 + note G#, 2 + note E_, 2 + note F_, 2 + note G#, 2 + note F_, 2 + note C_, 4 + note F_, 6 + note E_, 2 + note G#, 2 + note E_, 2 + note G_, 4 + note E_, 4 + note F_, 2 + note E_, 2 + note F_, 2 + note G_, 6 + note G_, 4 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note C_, 2 + note C_, 6 + note C_, 6 + note C_, 4 + note C#, 6 + note C#, 6 + note C#, 4 + note D_, 6 + note D_, 6 + note D_, 4 + note D#, 6 + note D#, 6 + note D#, 4 + volume_envelope 8, 0 + note G_, 16 + volume_envelope 9, 0 + note G#, 16 + volume_envelope 10, 0 + note A_, 8 + note A#, 2 + note A_, 2 + note G#, 2 + note A_, 2 + volume_envelope 11, 0 + note A#, 8 + note B_, 2 + note A#, 2 + note A_, 2 + octave 4 + note C#, 2 + volume_envelope 11, 7 + note C_, 8 + note C#, 4 + note C_, 4 + octave 3 + note G#, 2 + octave 4 + note C_, 2 + octave 3 + note G#, 2 + octave 4 + note D#, 2 + octave 3 + note G#, 2 + octave 4 + note C#, 2 + octave 3 + note G#, 2 + octave 4 + note C_, 2 + note G#, 4 + note D#, 4 + note G#, 4 + note D#, 4 + note D#, 4 + octave 3 + note G#, 4 + octave 4 + note D#, 4 + octave 3 + note G#, 4 + note G#, 8 + note A_, 4 + note G#, 4 + note D#, 2 + note G#, 2 + note D#, 2 + octave 4 + note C#, 2 + octave 3 + note D#, 2 + note A_, 2 + note D#, 2 + note G_, 2 + octave 4 + note C#, 4 + octave 3 + note G#, 4 + octave 4 + note C#, 4 + octave 3 + note G#, 4 + note G#, 4 + note C#, 4 + note G#, 4 + note C#, 4 + note B_, 8 + note A_, 8 + note G#, 8 + note F#, 8 + volume_envelope 11, 4 + note A_, 4 + octave 4 + note C#, 4 + octave 3 + note B_, 4 + octave 4 + note E_, 4 + volume_envelope 9, 2 + note D#, 2 + note D#, 2 + note D#, 2 + note D#, 2 + volume_envelope 11, 2 + note D#, 2 + note D#, 2 + note D#, 2 + note D#, 2 + volume_envelope 12, 2 + note D#, 16 + volume_envelope 5, 0 + octave 3 + note C_, 16 + note F_, 16 + note E_, 16 + volume_envelope 9, 7 + note D#, 10 + volume_envelope 11, 4 + octave 2 + note A#, 2 + octave 3 + note D#, 2 + note F#, 2 + sound_loop 0, .mainloop + +Music_JohtoGymBattle_Ch2: + duty_cycle 3 + vibrato 8, 3, 6 + pitch_offset 1 + note_type 12, 12, 2 +.loop1: + octave 4 + note F#, 1 + note F_, 1 + note E_, 1 + note A#, 1 + sound_loop 4, .loop1 +.loop2: + note F#, 1 + note F_, 1 + note F#, 1 + note A#, 1 + sound_loop 4, .loop2 + note A_, 6 + octave 3 + note A#, 6 + note G_, 4 + octave 4 + note D_, 6 + octave 3 + note A_, 6 + note A#, 4 + note A_, 6 + note A#, 6 + note G_, 4 + octave 4 + note D_, 6 + note D#, 6 + volume_envelope 11, 0 + octave 3 + note D#, 4 + volume_envelope 12, 2 + octave 4 + note D_, 2 + volume_envelope 9, 2 + octave 3 + note D_, 2 + note D_, 2 + volume_envelope 12, 2 + octave 4 + note D#, 4 + volume_envelope 9, 2 + octave 3 + note D_, 2 + volume_envelope 12, 2 + octave 4 + note C_, 4 + note G_, 2 + note_type 12, 9, 2 + octave 3 + note D_, 2 + note D_, 2 + volume_envelope 12, 2 + octave 4 + note D_, 4 + volume_envelope 9, 2 + octave 3 + note D_, 2 + volume_envelope 12, 2 + octave 4 + note D#, 2 + volume_envelope 9, 2 + octave 3 + note D#, 2 + volume_envelope 12, 2 + octave 4 + note D_, 2 + volume_envelope 9, 2 + octave 3 + note D_, 2 + note D_, 2 + volume_envelope 12, 2 + octave 4 + note D#, 4 + volume_envelope 9, 2 + octave 3 + note D_, 2 + volume_envelope 12, 2 + octave 4 + note C_, 2 + volume_envelope 9, 2 + octave 3 + note D#, 2 + volume_envelope 12, 2 + octave 4 + note G_, 2 + volume_envelope 9, 2 + octave 3 + note F_, 2 + note F_, 2 + volume_envelope 12, 2 + octave 4 + note G#, 2 + volume_envelope 9, 2 + octave 3 + note F_, 2 + note F_, 2 + volume_envelope 12, 2 + octave 4 + note F#, 2 + volume_envelope 11, 2 + octave 3 + note G#, 1 + note A_, 1 +.mainloop: + volume_envelope 12, 7 + note A#, 8 + volume_envelope 12, 4 + octave 4 + note D_, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + volume_envelope 12, 7 + note C#, 8 + volume_envelope 12, 4 + note F_, 2 + note D#, 2 + note C#, 2 + note D#, 2 + volume_envelope 11, 0 + note F_, 6 + volume_envelope 11, 7 + note F_, 6 + volume_envelope 12, 2 + note D#, 4 + volume_envelope 11, 0 + note G#, 6 + volume_envelope 11, 7 + note G#, 6 + volume_envelope 12, 2 + note F_, 4 + volume_envelope 12, 7 + octave 3 + note A#, 8 + volume_envelope 12, 4 + octave 4 + note D_, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + volume_envelope 12, 7 + note C#, 8 + volume_envelope 12, 4 + note F_, 2 + note D#, 2 + note C#, 2 + note D#, 2 + volume_envelope 11, 0 + note C#, 16 + volume_envelope 11, 7 + note C#, 16 + volume_envelope 10, 4 + octave 3 + note F_, 6 + note D#, 6 + note F_, 4 + volume_envelope 12, 6 + octave 4 + note C_, 6 + octave 3 + note A#, 6 + octave 4 + note C_, 4 + volume_envelope 10, 4 + octave 3 + note C#, 6 + note C_, 6 + note C#, 4 + volume_envelope 12, 6 + octave 4 + note C#, 6 + note C_, 6 + note C#, 4 + volume_envelope 3, -4 + note C_, 10 + volume_envelope 11, 7 + note C_, 6 + volume_envelope 11, 0 + note E_, 8 + volume_envelope 11, 7 + note E_, 8 + volume_envelope 11, 0 + octave 3 + note C#, 16 + octave 2 + note A#, 8 + octave 3 + note C#, 6 + note D#, 2 + note C_, 16 + note E_, 16 + volume_envelope 10, 0 + octave 5 + note C#, 4 + volume_envelope 10, 7 + octave 5 + note C#, 12 + volume_envelope 11, 7 + octave 4 + note A#, 8 + octave 5 + note C#, 6 + note D#, 2 + volume_envelope 10, 0 + note C_, 8 + volume_envelope 10, 7 + note C_, 8 + volume_envelope 3, -6 + note E_, 6 + volume_envelope 10, 6 + note E_, 10 + volume_envelope 12, 2 + octave 3 + note F_, 6 + note F_, 6 + note F_, 4 + note F#, 6 + note F#, 6 + note F#, 4 + note G_, 6 + note G_, 6 + note G_, 4 + note G#, 6 + note G#, 6 + note G#, 4 + volume_envelope 9, 0 + octave 4 + note C_, 16 + volume_envelope 10, 0 + note C#, 16 + volume_envelope 11, 0 + note D_, 16 + volume_envelope 11, 7 + note D#, 8 + volume_envelope 4, -4 + note D#, 6 + volume_envelope 12, 2 + note F#, 1 + note G_, 1 + volume_envelope 12, 7 + note G#, 8 + note A_, 2 + note G#, 2 + note F#, 2 + note A_, 2 + note G#, 4 + octave 5 + note C_, 4 + octave 4 + note A_, 4 + note G#, 4 + octave 5 + note D#, 4 + octave 4 + note G#, 4 + octave 5 + note D#, 4 + octave 4 + note G#, 4 + octave 5 + note D#, 2 + note C#, 2 + note C_, 2 + note C#, 2 + note C_, 2 + octave 4 + note A_, 2 + note G#, 2 + note A_, 2 + note D#, 8 + note E_, 2 + note D#, 2 + note C#, 2 + note E_, 2 + note D#, 4 + note G#, 4 + note E_, 4 + note C#, 4 + note G#, 4 + note C#, 4 + note G#, 4 + note C#, 4 + note A_, 2 + note G#, 2 + note F#, 2 + note E_, 2 + note D#, 2 + note E_, 2 + note D#, 2 + note C#, 2 + note D#, 8 + note C#, 8 + octave 3 + note B_, 8 + note A_, 8 + octave 4 + note D#, 4 + note G#, 4 + note E_, 4 + note A_, 4 + volume_envelope 12, 0 + note G#, 8 + volume_envelope 12, 7 + note G#, 8 + volume_envelope 12, 2 + note G#, 16 + volume_envelope 8, 0 + octave 3 + note F_, 16 + octave 4 + note C_, 16 + octave 3 + note B_, 16 + note G_, 16 + sound_loop 0, .mainloop + +Music_JohtoGymBattle_Ch3: + note_type 12, 1, 9 + octave 4 + note F_, 1 + rest 1 + octave 3 + note A_, 2 + octave 4 + note F_, 1 + rest 1 + octave 3 + note G#, 2 + octave 4 + note F_, 1 + rest 1 + octave 3 + note G_, 2 + octave 4 + note F_, 1 + rest 1 + octave 3 + note F#, 2 + octave 4 + note G#, 1 + rest 1 + octave 3 + note F_, 2 + octave 4 + note G#, 1 + rest 1 + octave 3 + note E_, 2 + note F_, 2 + note G_, 2 + note G#, 4 + sound_call .sub1 + note G_, 2 + note D_, 2 + note F_, 2 + note G_, 2 + note G#, 2 + note G#, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note D_, 2 + note F_, 2 + note G_, 2 + note G#, 2 + note D#, 2 + note F#, 4 + sound_call .sub1 + note G_, 2 + note D_, 2 + note F_, 2 + note G_, 2 + note G#, 2 + note G#, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note D_, 2 + note F_, 2 + note G_, 2 + note G#, 2 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note G#, 2 +.mainloop: + sound_call .sub2 + sound_call .sub2 + sound_call .sub3 + note C#, 2 + note G#, 2 + note C#, 2 + note G#, 2 + note C#, 2 + note A#, 2 + note A_, 2 + note G#, 2 + sound_call .sub2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note G#, 2 + note G_, 2 + sound_call .sub3 + sound_call .sub3 + note C_, 2 + note G_, 2 + note A#, 2 + note C_, 2 + note D#, 2 + note F_, 2 + note G_, 2 + note A#, 2 + sound_call .sub4 + sound_call .sub3 + sound_call .sub5 + octave 3 + note G_, 2 + note G#, 2 + note F_, 2 + sound_call .sub4 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + sound_call .sub3 + sound_call .sub5 + octave 3 + note C_, 2 + note C#, 2 + note G#, 2 + sound_call .sub4 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + sound_call .sub3 + sound_call .sub5 + octave 3 + note F_, 2 + octave 2 + note A#, 2 + octave 3 + note G#, 2 + sound_call .sub4 + note C_, 2 + note G_, 2 + note C_, 2 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note G_, 2 + note F_, 2 + note G_, 2 + sound_call .sub6 + rest 2 + sound_call .sub7 + octave 4 + note C#, 2 + sound_call .sub8 + rest 2 + note D#, 2 + note A#, 2 + octave 4 + note D#, 2 + octave 3 + note D#, 2 + note A#, 2 + octave 4 + note D#, 2 + octave 3 + note D#, 2 + octave 4 + note D#, 2 + sound_call .sub6 + note G_, 2 + sound_call .sub7 + note G#, 2 + sound_call .sub8 + note A_, 2 + octave 4 + note D#, 2 + octave 3 + note A#, 2 + note D#, 2 + octave 4 + note D#, 2 + octave 3 + note D#, 2 + octave 4 + note D#, 2 + note D_, 4 + sound_call .sub9 + note D#, 2 + note G#, 2 + note D#, 2 + octave 4 + note C#, 2 + octave 3 + note D#, 2 + note A_, 2 + note D#, 2 + note G#, 2 + sound_call .sub9 + note D#, 2 + note G#, 2 + note D#, 2 + note G#, 2 + note D#, 2 + note A_, 2 + note G#, 2 + note F#, 2 + sound_call .sub10 + note C#, 2 + note F#, 2 + note C#, 2 + octave 4 + note C#, 2 + octave 3 + note C#, 2 + note A_, 2 + note C#, 2 + note G_, 2 + sound_call .sub10 + note C#, 2 + note F#, 2 + note C#, 2 + note F#, 2 + note C#, 2 + note D#, 2 + note E_, 2 + note A_, 2 + sound_call .sub9 + note D#, 2 + note G#, 2 + note D#, 2 + note G#, 2 + note D#, 2 + note G#, 2 + note A_, 2 + octave 4 + note C#, 2 + octave 3 + note D#, 2 + note G#, 2 + note D#, 2 + note A_, 2 + note D#, 2 + note B_, 2 + note D#, 2 + octave 4 + note C#, 2 + octave 3 + note G#, 2 + note D#, 2 + note F#, 2 + note G#, 2 + note A_, 2 + note A_, 2 + note G#, 2 + note F#, 2 + note G#, 2 + note D#, 2 + note F#, 2 + note G#, 2 + note F#, 2 + note F#, 2 + note E_, 2 + note F#, 2 + sound_call .sub11 + note F_, 2 + note C_, 2 + note D#, 2 + note F_, 2 + note D#, 2 + note D#, 2 + note C#, 2 + note D#, 2 + sound_call .sub11 + note F_, 2 + note C_, 2 + note D#, 2 + note F_, 2 + note D#, 2 + note F#, 2 + note F_, 2 + note D#, 2 + sound_loop 0, .mainloop + +.sub1: + note G_, 2 + note D_, 2 + note F_, 2 + note G_, 2 + note G#, 2 + note G#, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note D_, 2 + note F_, 2 + note G_, 2 + note F_, 2 + note F_, 2 + note D#, 2 + note F_, 2 + sound_ret + +.sub2: +.sub2loop1: + note D_, 2 + note G_, 2 + sound_loop 4, .sub2loop1 + sound_ret + +.sub3: +.sub3loop1: + note C#, 2 + note G#, 2 + sound_loop 4, .sub3loop1 + sound_ret + +.sub4: +.sub4loop1: + note C_, 2 + note G_, 2 + sound_loop 4, .sub4loop1 + sound_ret + +.sub5: + octave 2 + note A#, 2 + octave 3 + note F_, 2 + octave 2 + note A#, 2 + octave 3 + note F_, 2 + octave 2 + note A#, 2 + sound_ret + +.sub6: + octave 3 + note C_, 2 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note C_, 2 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note C_, 2 + sound_ret + +.sub7: + note C#, 2 + note G#, 2 + octave 4 + note C#, 2 + octave 3 + note C#, 2 + note G#, 2 + octave 4 + note C#, 2 + octave 3 + note C#, 2 + sound_ret + +.sub8: + octave 3 + note D_, 2 + note A_, 2 + octave 4 + note D_, 2 + octave 3 + note D_, 2 + note A_, 2 + octave 4 + note D_, 2 + octave 3 + note D_, 2 + sound_ret + +.sub9: +.sub9loop1: + octave 3 + note D#, 2 + note G#, 2 + sound_loop 4, .sub9loop1 + sound_ret + +.sub10: +.sub10loop1: + note C#, 2 + note F#, 2 + sound_loop 4, .sub10loop1 + sound_ret + +.sub11: + note F_, 2 + note C_, 2 + note D#, 2 + note F_, 2 + note F#, 2 + note F#, 2 + note F_, 2 + note D#, 2 + sound_ret diff --git a/audio/music/johtotrainerbattle.asm b/audio/music/johtotrainerbattle.asm new file mode 100644 index 0000000..e214208 --- /dev/null +++ b/audio/music/johtotrainerbattle.asm @@ -0,0 +1,1335 @@ +Music_JohtoTrainerBattle: + channel_count 3 + channel 1, Music_JohtoTrainerBattle_Ch1 + channel 2, Music_JohtoTrainerBattle_Ch2 + channel 3, Music_JohtoTrainerBattle_Ch3 + +Music_JohtoTrainerBattle_Ch1: + tempo 102 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 18, 1, 5 + note_type 12, 9, 2 + rest 8 + octave 3 + note A_, 1 + note G#, 1 + note G_, 1 + note G#, 1 + volume_envelope 11, 2 + note C_, 1 + octave 2 + note B_, 1 + note A#, 1 + note B_, 1 + octave 3 + note C#, 1 + note C_, 1 + octave 2 + note B_, 1 + octave 3 + note C_, 1 + note D_, 1 + note C#, 1 + note C_, 1 + note C#, 1 + note D#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note E_, 1 + note D#, 1 + note D_, 1 + note D#, 1 + note E_, 6 + note E_, 6 + note E_, 4 + note E_, 2 + note D_, 2 + note E_, 2 + note F_, 6 + volume_envelope 11, 7 + note D_, 4 + volume_envelope 11, 2 + note E_, 6 + note D_, 6 + note E_, 4 + note E_, 2 + note D_, 2 + note E_, 2 + note F_, 6 + volume_envelope 11, 7 + note F_, 4 + volume_envelope 11, 2 + octave 4 + note E_, 6 + note E_, 6 + note E_, 4 + note E_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + octave 3 + note A_, 2 + note A#, 2 + volume_envelope 11, 7 + note B_, 4 + volume_envelope 11, 2 + octave 4 + note E_, 6 + note E_, 6 + note E_, 4 + note E_, 2 + note D_, 2 + note E_, 2 + note F_, 6 + volume_envelope 11, 7 + note G_, 4 +.mainloop: + volume_envelope 11, 4 + sound_call .sub1 + volume_envelope 11, 7 + note A#, 4 + volume_envelope 11, 3 + note G_, 1 + note F_, 1 + note E_, 1 + note G_, 1 + volume_envelope 11, 7 + octave 4 + note C_, 4 + volume_envelope 11, 3 + octave 3 + note A_, 1 + note G_, 1 + note F_, 1 + note A_, 1 + volume_envelope 11, 7 + octave 4 + note D_, 4 + volume_envelope 11, 3 + note C_, 1 + octave 3 + note A#, 1 + note A_, 1 + octave 4 + note C_, 1 + volume_envelope 11, 5 + note F_, 2 + note E_, 2 + note D_, 2 + note C_, 2 + sound_call .sub1 + volume_envelope 11, 7 + note F_, 4 + note E_, 2 + note F_, 2 + octave 4 + note C_, 4 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + volume_envelope 10, 0 + octave 3 + note F_, 8 + volume_envelope 10, 7 + note F_, 8 + volume_envelope 11, 7 + note A_, 6 + note E_, 6 + note A#, 4 + octave 4 + note C#, 6 + note F_, 4 + note E_, 2 + note D_, 2 + note F_, 2 + note E_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note C#, 2 + octave 3 + note A#, 2 + note A_, 2 + note A#, 2 + volume_envelope 10, 0 + note A_, 8 + volume_envelope 10, 7 + note A_, 8 + volume_envelope 11, 7 + note E_, 8 + note D_, 8 + note E_, 8 + note F_, 8 + note E_, 8 + note D_, 8 + note G_, 8 + note F_, 8 + note D_, 8 + note C_, 8 + note D_, 8 + note D#, 8 + note D_, 8 + note C_, 8 + note D_, 8 + note D#, 8 + note D_, 8 + note D#, 8 + note E_, 8 + note F_, 8 + volume_envelope 11, 4 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note G#, 2 + note G_, 2 + note F_, 2 + note D#, 2 + note F_, 2 + note G_, 2 + octave 4 + note C#, 2 + note C_, 2 + note C#, 2 + note D#, 2 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + volume_envelope 11, 5 + note D#, 2 + note D_, 2 + volume_envelope 11, 2 + note D#, 4 + volume_envelope 11, 7 + note C_, 8 + note D#, 4 + note C#, 4 + note C_, 4 + note D#, 4 + volume_envelope 11, 5 + note E_, 2 + note D#, 2 + volume_envelope 11, 2 + note E_, 4 + volume_envelope 11, 7 + note C#, 8 + note F_, 4 + note D#, 4 + note C#, 4 + note F_, 4 + volume_envelope 11, 5 + note F#, 2 + note F_, 2 + volume_envelope 11, 2 + note F#, 4 + volume_envelope 11, 7 + note D_, 8 + note F#, 4 + note E_, 4 + note D_, 4 + note F#, 4 + note G_, 8 + note D#, 8 + note A#, 8 + note G_, 8 + volume_envelope 10, 0 + note D#, 4 + volume_envelope 10, 7 + note D#, 12 + rest 16 +.loop1: + volume_envelope 11, 7 + note F_, 8 + volume_envelope 11, 4 + note G_, 4 + note D#, 4 + note F_, 4 + note G_, 2 + note D#, 2 + note F_, 4 + octave 2 + note A#, 4 + volume_envelope 11, 7 + octave 3 + note F_, 8 + volume_envelope 11, 4 + note G_, 4 + note D#, 4 + note F_, 4 + note G_, 2 + note D#, 2 + note F_, 4 + note F_, 4 + sound_loop 2, .loop1 + volume_envelope 11, 7 + note F_, 8 + volume_envelope 11, 4 + note G_, 4 + note D#, 4 + note F_, 4 + note G#, 2 + note G_, 2 + volume_envelope 11, 7 + note F_, 8 + note F_, 8 + volume_envelope 11, 5 + note G_, 4 + note D#, 4 + note F_, 4 + note G_, 2 + note D#, 2 + volume_envelope 11, 7 + note F_, 8 + note F_, 8 + volume_envelope 11, 5 + note G_, 4 + note D#, 4 + note F_, 4 + note G_, 2 + note D#, 2 + volume_envelope 3, -7 + note G#, 8 + volume_envelope 11, 7 + note G#, 8 + volume_envelope 10, 0 + octave 4 + note C_, 8 + volume_envelope 10, 7 + note C_, 8 + volume_envelope 11, 2 + octave 3 + note D#, 6 + note D#, 6 + note D#, 4 + note D#, 6 + note D#, 6 + volume_envelope 11, 7 + note F_, 4 + volume_envelope 11, 2 + note D#, 6 + note D#, 6 + note D#, 4 + note D#, 6 + note D#, 6 + volume_envelope 4, -4 + note F_, 4 + volume_envelope 11, 7 + note G#, 6 + note G_, 6 + note F_, 4 + note D#, 4 + note F_, 4 + note G_, 4 + note D#, 4 + note F_, 4 + octave 4 + note C#, 2 + note C_, 2 + octave 3 + note F_, 4 + octave 4 + note C#, 2 + note C_, 2 + octave 3 + note F_, 2 + note G_, 2 + note G#, 2 + octave 4 + note C_, 2 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + note G#, 2 + note G_, 6 + note D#, 6 + note G_, 4 + octave 4 + note C#, 4 + note C_, 4 + octave 3 + note A#, 4 + note G#, 4 + note F_, 4 + note C#, 2 + note D#, 2 + note F_, 4 + note C#, 2 + note D#, 2 + note A#, 4 + note G#, 4 + note G_, 4 + note F_, 4 + volume_envelope 9, 0 + octave 2 + note A#, 8 + octave 3 + note D#, 8 + octave 2 + note A#, 8 + octave 3 + note G_, 8 + volume_envelope 10, 0 + note D#, 8 + note A#, 8 + note G_, 8 + octave 4 + note D#, 8 + volume_envelope 10, 0 + octave 3 + note A#, 8 + volume_envelope 10, 7 + note A#, 8 + volume_envelope 11, 7 + note G_, 6 + note A#, 6 + note G#, 2 + note G_, 2 + volume_envelope 10, 0 + note D#, 8 + volume_envelope 10, 7 + note D#, 8 + volume_envelope 11, 4 + note A#, 6 + note G_, 4 + note G_, 2 + note A#, 12 + rest 16 + rest 8 + volume_envelope 10, 0 + octave 4 + note D_, 4 + volume_envelope 10, 7 + note D_, 12 + volume_envelope 10, 0 + note F_, 8 + volume_envelope 10, 7 + note F_, 8 + volume_envelope 11, 3 + sound_call .sub1 + note F_, 4 + note E_, 2 + note F_, 2 + octave 4 + note C_, 4 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + volume_envelope 10, 0 + octave 3 + note F_, 10 + volume_envelope 10, 7 + note F_, 6 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note E_, 2 + note D_, 2 + note E_, 2 + note A_, 2 + note B_, 2 + note A_, 2 + note G_, 2 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note A_, 2 + note B_, 2 + note G_, 2 + note A_, 2 + note E_, 2 + note F_, 2 + note D_, 2 + sound_ret + +Music_JohtoTrainerBattle_Ch2: + duty_cycle 3 + vibrato 8, 3, 6 + pitch_offset 1 + note_type 12, 12, 2 + octave 4 + note G#, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note G#, 1 + note D_, 1 + note D#, 1 + note E_, 1 + note G#, 1 + note D#, 1 + note D_, 1 + note D#, 1 + note G#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note G#, 1 + note C#, 1 + note C_, 1 + note C#, 1 + note G#, 1 + octave 3 + note A#, 1 + note B_, 1 + octave 4 + note C_, 1 + note G#, 1 + octave 3 + note B_, 1 + note A#, 1 + note B_, 1 + octave 4 + note G#, 1 + octave 3 + note A#, 1 + note A_, 1 + note A#, 1 + volume_envelope 12, 2 + octave 4 + note A_, 6 + sound_call .sub1 + volume_envelope 12, 2 + note A_, 6 + sound_call .sub1 + volume_envelope 12, 2 + octave 5 + note C_, 6 + note C_, 6 + note C_, 4 + note C_, 6 + note C_, 6 + volume_envelope 12, 7 + note C#, 4 + volume_envelope 12, 2 + note C_, 2 + volume_envelope 10, 4 + octave 3 + note E_, 2 + note A_, 2 + volume_envelope 12, 2 + octave 5 + note C_, 2 + volume_envelope 10, 4 + octave 3 + note E_, 2 + note A_, 2 + volume_envelope 12, 2 + octave 5 + note C_, 2 + volume_envelope 10, 4 + octave 3 + note E_, 2 + volume_envelope 12, 2 + octave 5 + note C_, 2 + volume_envelope 10, 4 + octave 3 + note E_, 2 + note B_, 2 + volume_envelope 12, 2 + octave 5 + note C_, 2 + volume_envelope 10, 4 + octave 4 + note C_, 2 + note E_, 2 + volume_envelope 12, 7 + note B_, 4 +.mainloop: + sound_call .sub2 + volume_envelope 3, -6 + note A#, 8 + volume_envelope 12, 7 + note A#, 8 + sound_call .sub2 + volume_envelope 12, 4 + note D_, 4 + octave 3 + note A#, 2 + octave 4 + note D_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note A#, 2 + note A_, 2 + note A#, 2 + octave 5 + note D_, 2 + volume_envelope 11, 0 + note C#, 8 + volume_envelope 11, 7 + note C#, 4 + volume_envelope 12, 7 + octave 4 + note A#, 4 + volume_envelope 11, 0 + note A_, 16 + volume_envelope 11, 7 + note A_, 16 +.loop1: + volume_envelope 12, 3 + octave 3 + note A_, 2 + note G_, 2 + note A_, 2 + volume_envelope 12, 7 + note A#, 4 + volume_envelope 12, 3 + note A_, 2 + note G_, 2 + note A#, 2 + sound_loop 3, .loop1 + note A_, 2 + octave 4 + note D_, 2 + note C_, 2 + octave 3 + note A#, 2 + note A_, 2 + note G_, 2 + note A_, 2 + note A#, 2 +.loop2: + note G_, 2 + note F_, 2 + note G_, 2 + volume_envelope 12, 7 + note G#, 4 + volume_envelope 12, 3 + note G_, 2 + note F_, 2 + note G#, 2 + sound_loop 3, .loop2 + note F_, 2 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note G#, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note G#, 2 + volume_envelope 12, 7 + note G_, 6 + octave 4 + note D_, 6 + note C_, 2 + note D_, 2 + note F_, 4 + note E_, 4 + note D_, 4 + note C_, 4 + volume_envelope 11, 0 + note D#, 10 + volume_envelope 11, 7 + note D#, 6 + volume_envelope 9, 0 + note G_, 8 + volume_envelope 9, 7 + note G_, 8 + volume_envelope 12, 7 + octave 3 + note F_, 8 + note D#, 4 + note F_, 4 + note G_, 4 + note F_, 4 + note D#, 4 + note G_, 4 + note G#, 8 + note F_, 4 + note G_, 4 + note G#, 4 + note G_, 4 + note F_, 4 + note G#, 4 + note A_, 8 + note F#, 4 + note G#, 4 + note A_, 4 + note G#, 4 + note F#, 4 + note A_, 4 + volume_envelope 11, 0 + note A#, 8 + note A#, 8 + volume_envelope 11, 0 + octave 4 + note D#, 8 + volume_envelope 11, 7 + note D#, 8 + volume_envelope 6, 2 + sound_call .sub3 + volume_envelope 8, 2 + sound_call .sub3 + volume_envelope 9, 2 + sound_call .sub3 + volume_envelope 10, 2 + sound_call .sub3 +.loop3: + octave 4 + note D#, 2 + octave 3 + note A#, 2 + octave 4 + note G_, 2 + octave 3 + note A#, 2 + octave 4 + note D#, 2 + octave 3 + note A#, 2 + octave 4 + note G_, 2 + octave 3 + note A#, 2 + sound_loop 8, .loop3 + sound_call .sub4 + octave 3 + note A#, 2 + volume_envelope 12, 7 + octave 4 + note C_, 8 + sound_call .sub4 + note G_, 2 + volume_envelope 12, 7 + note F_, 8 + sound_call .sub4 + octave 3 + note A#, 2 + volume_envelope 11, 0 + octave 4 + note C_, 8 + volume_envelope 11, 7 + note C_, 8 + volume_envelope 1, -7 + note D#, 12 + volume_envelope 12, 7 + note D#, 4 + volume_envelope 12, 2 + octave 3 + note G_, 4 + note D#, 2 + note G_, 6 + note G_, 4 + note G_, 2 + note F_, 2 + note D#, 2 + note G_, 6 + volume_envelope 12, 7 + note G#, 4 + volume_envelope 12, 2 + note G_, 4 + note D#, 2 + note G_, 6 + note G_, 4 + note G_, 6 + note G_, 6 + volume_envelope 4, -4 + note G#, 4 + sound_call .sub5 + volume_envelope 11, 0 + note F_, 8 + volume_envelope 11, 7 + note F_, 8 + volume_envelope 11, 0 + note G#, 8 + volume_envelope 11, 7 + note G#, 8 + sound_call .sub5 + volume_envelope 11, 0 + note C#, 8 + volume_envelope 11, 7 + note C#, 8 + volume_envelope 12, 7 + note C#, 4 + note C_, 4 + octave 3 + note A#, 4 + note G#, 4 + note G_, 6 + note D#, 2 + note A#, 8 + note A#, 6 + note G_, 2 + octave 4 + note D#, 8 + note D#, 6 + octave 3 + note A#, 2 + octave 4 + note G_, 8 + note G_, 6 + note D#, 2 + note A#, 8 + note G_, 6 + note A#, 6 + note G#, 2 + note G_, 2 + volume_envelope 11, 0 + note D#, 8 + volume_envelope 11, 7 + note D#, 8 + volume_envelope 12, 7 + note D#, 6 + note A#, 6 + note G#, 2 + note G_, 2 + volume_envelope 11, 0 + note D#, 8 + volume_envelope 11, 7 + note D#, 8 + volume_envelope 12, 7 + octave 3 + note A_, 6 + octave 4 + note E_, 6 + note D_, 2 + note E_, 2 + note G_, 4 + note F#, 4 + note E_, 4 + note D_, 4 + volume_envelope 11, 0 + note F_, 8 + volume_envelope 11, 7 + note F_, 8 + volume_envelope 11, 0 + note A#, 8 + volume_envelope 11, 7 + note A#, 8 + sound_call .sub2 + volume_envelope 12, 7 + note D_, 4 + octave 3 + note A#, 2 + octave 4 + note D_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note F_, 2 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note A_, 6 + note A_, 4 + note A_, 6 + note A_, 6 + volume_envelope 12, 7 + note A#, 4 + sound_ret + +.sub2: + volume_envelope 12, 7 + octave 3 + note A_, 6 + octave 4 + note E_, 6 + note D_, 2 + note E_, 2 + note G_, 4 + note F#, 4 + note E_, 4 + note D_, 4 + volume_envelope 11, 0 + note F_, 8 + volume_envelope 11, 7 + note F_, 8 + sound_ret + +.sub3: + octave 3 + note A#, 2 + note D#, 2 + octave 4 + note D#, 2 + octave 3 + note D#, 2 + sound_ret + +.sub4: + volume_envelope 12, 7 + octave 4 + note F_, 4 + volume_envelope 12, 4 + octave 3 + note A#, 2 + octave 4 + note F_, 2 + note G#, 2 + note G_, 2 + note F_, 2 + note D#, 2 + note D_, 1 + note D#, 1 + note D_, 1 + note D#, 1 + note F_, 2 + sound_ret + +.sub5: + volume_envelope 12, 7 + octave 4 + note D#, 6 + note A#, 6 + note G#, 2 + note G_, 2 + note G#, 4 + note G_, 4 + note F_, 4 + note D#, 4 + sound_ret + +Music_JohtoTrainerBattle_Ch3: + note_type 12, 1, 9 + octave 4 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + octave 3 + note B_, 1 + octave 4 + note C_, 1 + octave 3 + note B_, 1 + note A#, 1 + note A_, 1 + note A#, 1 + note A_, 1 + note G#, 1 + note G_, 1 + note G#, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note D#, 1 + note E_, 2 + note A#, 2 + note A_, 2 + note G#, 2 +.loop1: + note A_, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note E_, 2 + sound_loop 3, .loop1 + note A_, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note G#, 2 + sound_call .sub1 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note A_, 2 + note A#, 2 + octave 4 + note C_, 2 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + sound_call .sub1 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note A_, 2 + note A#, 2 + note G_, 2 + note A_, 2 + note A#, 2 + note G_, 2 +.mainloop: + sound_call .sub2 + note E_, 2 + sound_call .sub3 + sound_call .sub3 + sound_call .sub2 + note A_, 2 + sound_call .sub3 + sound_call .sub3 + sound_call .sub4 + note E_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + sound_call .sub4 + note E_, 2 + octave 4 + note F_, 2 + note E_, 2 + note D_, 2 + octave 3 + note A_, 2 + note G#, 2 + note A_, 2 + note A#, 2 + sound_call .sub5 + note D_, 2 + note A_, 2 + note D_, 2 + note A_, 2 + note D_, 2 + note A_, 2 + note G_, 2 + note A_, 2 + sound_call .sub5 + note D_, 2 + octave 4 + note D_, 2 + note C_, 2 + octave 3 + note A#, 2 + note A_, 2 + note G_, 2 + note A_, 2 + note A#, 2 + sound_call .sub6 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note F_, 2 + note G_, 2 + sound_call .sub6 + note C_, 2 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note G#, 2 + note G_, 2 + note F_, 2 + note D#, 2 + note D_, 2 + note G_, 8 + note F_, 8 + note E_, 8 + note D#, 8 +.loop2: + octave 3 + note D#, 2 + note A#, 2 + note D#, 2 + note A#, 2 + note D#, 2 + note A#, 2 + note A_, 2 + octave 4 + note C_, 2 + sound_loop 2, .loop2 + sound_call .sub6 + note C_, 2 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note G#, 2 + note G_, 2 + note F_, 2 + note D#, 2 + note G_, 2 +.loop3: + note C#, 2 + note G#, 2 + sound_loop 7, .loop3 + note B_, 2 + note A_, 2 +.loop4: + note D_, 2 + note A_, 2 + sound_loop 5, .loop4 + note B_, 2 + note A_, 2 + note G#, 2 + note F#, 2 + note G#, 2 + note A_, 2 +.loop5: + note A#, 4 + note D#, 4 + sound_loop 4, .loop5 +.loop6: + octave 4 + note G_, 4 + octave 3 + note A#, 4 + sound_loop 4, .loop6 +.loop7: + sound_call .sub7 + note D#, 2 + note F_, 8 + sound_call .sub7 + octave 4 + note C_, 2 + octave 3 + note A#, 8 + sound_loop 2, .loop7 + octave 4 + note C#, 8 + note C_, 8 + octave 3 + note A#, 8 + note G#, 8 + note F_, 8 + note G_, 8 + note G#, 8 + note A#, 8 + note F_, 8 + note G_, 8 + note G#, 4 + note D#, 2 + note G#, 2 + octave 4 + note C_, 8 + note C_, 8 + note D#, 8 + octave 3 + note A#, 2 + note G#, 2 + note G_, 2 + note F_, 2 + note D#, 2 + note A#, 2 + note D#, 2 + note A#, 2 + note D#, 2 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A#, 2 + note D#, 2 + note A#, 2 + octave 4 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + note G#, 2 + note G_, 2 + note G#, 2 + note D#, 2 + note A#, 2 + note D#, 2 + note A#, 2 + note D#, 2 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A#, 2 + note D#, 2 + note A#, 2 + octave 4 + note C_, 2 + note C#, 2 + note D#, 2 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 +.loop8: + note D#, 2 + note A#, 2 + sound_loop 8, .loop8 +.loop9: + note C#, 2 + note G#, 2 + sound_loop 6, .loop9 + note C#, 2 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note G#, 2 +.loop10: + note D#, 2 + note A#, 2 + sound_loop 8, .loop10 +.loop11: + note C#, 2 + note G#, 2 + sound_loop 4, .loop11 + note C#, 2 + octave 4 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + note G_, 2 + note G#, 2 + note A#, 2 + octave 4 + note C_, 2 + octave 3 + note D#, 8 + note C#, 8 + note C_, 8 + octave 2 + note A#, 8 + octave 3 + note A#, 8 + note G#, 8 + note G_, 8 + note F_, 8 + octave 4 + note D#, 8 + note D#, 8 + octave 3 + note A#, 8 + note A#, 8 + note G_, 8 + note G_, 8 + note D#, 8 + note D#, 4 + note A#, 4 + note A_, 16 + octave 4 + note C_, 16 + octave 3 + note A#, 16 + octave 4 + note D_, 16 + octave 3 + note A_, 16 + octave 4 + note C_, 16 + octave 3 + note A#, 16 + octave 4 + note D_, 8 + rest 2 + octave 3 + note A_, 2 + note A#, 2 + octave 4 + note D_, 2 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note A_, 2 + note A#, 2 + note G_, 2 + note A_, 2 + note A#, 2 + note G_, 2 + sound_ret + +.sub2: + octave 3 + note E_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note F#, 2 + note G_, 2 + sound_ret + +.sub3: + octave 3 + note F_, 2 + note A#, 2 + note F_, 2 + note A#, 2 + note F_, 2 + note A_, 2 + note A#, 2 + octave 4 + note D_, 2 + sound_ret + +.sub4: +.sub4loop1: + octave 3 + note E_, 2 + note A_, 2 + sound_loop 4, .sub4loop1 + sound_ret + +.sub5: +.sub5loop1: + note D_, 2 + note A_, 2 + sound_loop 4, .sub5loop1 + sound_ret + +.sub6: +.sub6loop1: + octave 3 + note C_, 2 + note G_, 2 + sound_loop 4, .sub6loop1 + sound_ret + +.sub7: + note A#, 4 + note D#, 2 + note A#, 2 + octave 4 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + note G#, 2 + note G_, 1 + note G#, 1 + note G_, 1 + note G#, 1 + note A#, 2 + sound_ret diff --git a/audio/music/johtowildbattle.asm b/audio/music/johtowildbattle.asm new file mode 100644 index 0000000..7377810 --- /dev/null +++ b/audio/music/johtowildbattle.asm @@ -0,0 +1,586 @@ +Music_JohtoWildBattle: + channel_count 3 + channel 1, Music_JohtoWildBattle_Ch1 + channel 2, Music_JohtoWildBattle_Ch2 + channel 3, Music_JohtoWildBattle_Ch3 + +Music_JohtoWildBattle_Ch1: + tempo 104 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 18, 1, 5 +.body: + note_type 12, 11, 2 + octave 4 + note C_, 1 + octave 3 + note B_, 1 + note A#, 1 + note A_, 1 + note A#, 1 + note A_, 1 + note G#, 1 + note G_, 1 + note G#, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note D#, 1 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + octave 2 + note B_, 1 + octave 3 + note C_, 1 + octave 2 + note B_, 1 + note A#, 1 + note A_, 1 + note A#, 1 + note B_, 1 + octave 3 + note C_, 1 + note C#, 1 + volume_envelope 11, 2 + note G_, 6 + octave 2 + note A#, 6 + octave 3 + note D_, 4 + note C_, 4 + note C#, 4 + note D_, 8 + note D#, 6 + octave 2 + note A#, 6 + octave 3 + note D#, 4 + note C_, 4 + note D_, 4 + volume_envelope 11, 5 + note D#, 8 + volume_envelope 11, 2 + octave 4 + note D_, 6 + octave 3 + note A#, 6 + octave 4 + note D_, 4 + note C_, 4 + note C#, 4 + note D_, 8 + note D#, 6 + octave 3 + note A#, 6 + octave 4 + note D#, 4 + note C_, 4 + note D_, 4 + volume_envelope 6, -7 + note D#, 8 +.mainloop: + volume_envelope 11, 6 + octave 3 + note D_, 6 + octave 2 + note B_, 6 + note B_, 4 + octave 3 + note F_, 6 + note E_, 6 + note C_, 4 + note G#, 8 + note A#, 1 + note A_, 1 + note G_, 1 + note F#, 1 + note G_, 1 + note G#, 1 + note A_, 1 + note A#, 1 + octave 4 + note C_, 8 + octave 3 + note B_, 1 + note A#, 1 + note G#, 1 + note G_, 1 + note G#, 1 + note A_, 1 + note A#, 1 + note B_, 1 + note D_, 6 + octave 2 + note B_, 6 + note B_, 4 + octave 3 + note F_, 6 + note E_, 6 + note D_, 4 + note E_, 8 + note D_, 8 + note C_, 8 + note F_, 8 + note D#, 6 + note C_, 6 + note C_, 4 + note F#, 6 + note F_, 6 + note C#, 4 + note A_, 8 + note B_, 1 + note A#, 1 + note G#, 1 + note G_, 1 + note G#, 1 + note A_, 1 + note A#, 1 + note B_, 1 + octave 4 + note C#, 8 + note C_, 1 + octave 3 + note B_, 1 + note A_, 1 + note G#, 1 + note A_, 1 + note A#, 1 + note B_, 1 + octave 4 + note C_, 1 + octave 3 + note D#, 6 + note C_, 6 + note C_, 4 + note F#, 6 + note F_, 6 + note C#, 4 + note F_, 8 + note D#, 8 + note C#, 8 + note F#, 8 + volume_envelope 11, 7 + note E_, 6 + note D_, 6 + note E_, 4 + note F_, 6 + note E_, 6 + note C_, 4 + note F_, 8 + note C_, 8 + note E_, 6 + note D_, 6 + note F_, 4 + note G_, 16 + octave 4 + note D_, 8 + note G_, 8 + note G_, 16 + note D_, 16 + octave 3 + note C_, 4 + note D_, 4 + note C_, 4 + octave 2 + note B_, 4 + octave 3 + note C_, 16 + note D_, 4 + note E_, 4 + note D_, 4 + note F#, 4 + note G_, 16 + sound_loop 0, .mainloop + +Music_JohtoWildBattle_Ch2: + duty_cycle 3 + vibrato 8, 3, 6 + pitch_offset 1 + sound_call .sub1 + note_type 12, 12, 2 + octave 4 + note G_, 6 +.body: + octave 3 + note D_, 6 + note G_, 4 + note F_, 4 + note F#, 4 + note G_, 8 + note G#, 6 + note D_, 6 + note G#, 4 + note F_, 4 + note G_, 4 + volume_envelope 12, 7 + note G#, 8 + volume_envelope 12, 2 + octave 4 + note G_, 6 + note D_, 6 + note G_, 4 + note F_, 4 + note F#, 4 + note G_, 8 + note G#, 6 + note D_, 6 + note G#, 4 + note F_, 4 + note G_, 4 + volume_envelope 6, -7 + note G#, 8 +.mainloop: + volume_envelope 12, 4 + octave 3 + note G_, 6 + note D_, 6 + note D_, 2 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note A_, 2 + octave 4 + note C#, 2 + volume_envelope 11, 0 + note D#, 16 + volume_envelope 11, 7 + note D#, 16 + volume_envelope 12, 4 + octave 3 + note G_, 6 + note D_, 6 + note D_, 2 + note G_, 2 + octave 4 + note C_, 4 + octave 3 + note B_, 4 + note A_, 4 + note B_, 4 + volume_envelope 11, 0 + note A_, 16 + volume_envelope 11, 6 + note A_, 16 + volume_envelope 12, 4 + note G#, 6 + note D#, 6 + note D#, 2 + note G#, 2 + octave 4 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + note G#, 2 + note F#, 2 + note G#, 2 + note A#, 2 + octave 4 + note D_, 2 + volume_envelope 11, 0 + note E_, 16 + volume_envelope 11, 7 + note E_, 16 + volume_envelope 12, 4 + octave 3 + note G#, 6 + note D#, 6 + note D#, 2 + note G#, 2 + octave 4 + note C#, 4 + note C_, 4 + octave 3 + note A#, 4 + note G#, 4 + volume_envelope 11, 0 + note A#, 16 + volume_envelope 11, 5 + note A#, 16 + volume_envelope 12, 6 + octave 4 + note B_, 12 + note G_, 2 + note B_, 2 + octave 5 + note D_, 2 + note C_, 2 + octave 4 + note B_, 2 + note A_, 2 + note G_, 2 + note A_, 2 + note B_, 2 + note G_, 2 + note A_, 12 + octave 3 + note F_, 2 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note A_, 2 + octave 4 + note C_, 2 + volume_envelope 12, 7 + note D_, 16 + note G_, 8 + octave 5 + note C_, 8 + octave 4 + note B_, 16 + note G_, 16 + octave 3 + note E_, 4 + note F#, 4 + note E_, 4 + note D_, 4 + note E_, 16 + note G_, 4 + note A_, 4 + note G_, 4 + note A#, 4 + note B_, 16 + sound_loop 0, .mainloop + +.sub1: + note_type 12, 12, 2 + octave 4 + note F_, 1 + note F#, 1 + note G_, 1 + octave 5 + note G_, 1 + octave 4 + note F_, 1 + note F#, 1 + note G_, 1 + octave 5 + note G_, 1 + octave 4 + note F_, 1 + note F#, 1 + note G_, 1 + octave 5 + note G_, 1 + octave 4 + note F_, 1 + note F#, 1 + note G_, 1 + octave 5 + note G_, 1 + octave 4 + note F_, 1 + note F#, 1 + note G_, 1 + octave 5 + note G_, 1 + octave 4 + note F_, 1 + note F#, 1 + note G_, 1 + octave 5 + note G_, 1 + octave 4 + note F_, 1 + note F#, 1 + note G_, 1 + octave 5 + note G_, 1 + octave 4 + note F_, 1 + note F#, 1 + note G_, 1 + octave 5 + note G_, 1 + sound_ret + +Music_JohtoWildBattle_Ch3: + note_type 12, 1, 4 +.body: + octave 4 + note G_, 2 + octave 5 + note D_, 2 + octave 4 + note G_, 2 + octave 5 + note C#, 2 + octave 4 + note F#, 2 + octave 5 + note C_, 2 + octave 4 + note F#, 2 + note B_, 2 + note F_, 2 + note A#, 2 + note F_, 2 + note A_, 2 + note F_, 2 + note D_, 2 + note G_, 2 + note F_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + sound_call .sub1 + note D#, 2 + note G#, 2 + note D#, 2 + note G#, 2 + note D#, 2 + note D#, 2 + note G_, 2 + note F_, 2 +.loop1: + note D_, 2 + note G_, 2 + sound_loop 6, .loop1 + note D_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + sound_call .sub1 + note F_, 2 + note F_, 2 + note G_, 2 + note G_, 2 + note G#, 2 + note G_, 2 + note F_, 2 + note D#, 2 +.mainloop: +.loop2: + note D_, 2 + note G_, 2 + sound_loop 7, .loop2 + note F#, 4 + sound_call .sub1 + sound_call .sub1 +.loop3: + note D_, 2 + note G_, 2 + sound_loop 7, .loop3 + note D_, 2 + note A_, 2 +.loop4: + note C_, 2 + note F_, 2 + sound_loop 5, .loop4 + note E_, 2 + note D_, 2 + note C_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + sound_call .sub1 + note D#, 2 + note G#, 2 + note D#, 2 + note G#, 2 + note D#, 2 + note G#, 2 + note G_, 4 +.loop5: + note E_, 2 + note A_, 2 + sound_loop 8, .loop5 + sound_call .sub1 + note D#, 2 + note G#, 2 + note D#, 2 + note G#, 2 + note D#, 2 + note G#, 2 + note D#, 2 + note A#, 2 + note C#, 2 + note F#, 2 + note C#, 2 + note F#, 2 + note C#, 2 + note F#, 2 + note C#, 2 + note F#, 2 + note C#, 2 + note F#, 2 + note F_, 2 + note F#, 2 + note G#, 2 + note F#, 2 + note F_, 2 + note D#, 2 +.loop6: + note D_, 2 + note G_, 2 + sound_loop 8, .loop6 +.loop7: + note C_, 2 + note F_, 2 + sound_loop 7, .loop7 + note E_, 2 + note C_, 2 + note D_, 4 + note G_, 4 + note D_, 4 + note G_, 4 +.loop8: + note D_, 2 + note G_, 2 + sound_loop 12, .loop8 +.loop9: + note C_, 2 + note E_, 2 + sound_loop 7, .loop9 + note F_, 2 + note F#, 2 +.loop10: + note D_, 2 + note G_, 2 + sound_loop 6, .loop10 + note A_, 2 + note G_, 2 + note F#, 2 + note E_, 2 + sound_loop 0, .mainloop + +.sub1: +.sub1loop1: + note D#, 2 + note G#, 2 + sound_loop 4, .sub1loop1 + sound_ret diff --git a/audio/music/johtowildbattlenight.asm b/audio/music/johtowildbattlenight.asm new file mode 100644 index 0000000..efba350 --- /dev/null +++ b/audio/music/johtowildbattlenight.asm @@ -0,0 +1,29 @@ +Music_JohtoWildBattleNight: + channel_count 3 + channel 1, Music_JohtoWildBattleNight_Ch1 + channel 2, Music_JohtoWildBattleNight_Ch2 + channel 3, Music_JohtoWildBattleNight_Ch3 + +Music_JohtoWildBattleNight_Ch1: + tempo 107 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 16, 2, 5 + sound_loop 0, Music_JohtoWildBattle_Ch1.body + +Music_JohtoWildBattleNight_Ch2: + duty_cycle 3 + vibrato 32, 3, 6 + pitch_offset 1 + sound_call Music_JohtoWildBattle_Ch2.sub1 + note_type 12, 12, 2 + octave 4 + note G_, 6 + pitch_offset 1 + duty_cycle 2 + sound_loop 0, Music_JohtoWildBattle_Ch2.body + +Music_JohtoWildBattleNight_Ch3: + note_type 12, 1, 1 + sound_loop 0, Music_JohtoWildBattle_Ch3.body diff --git a/audio/music/kantogymbattle.asm b/audio/music/kantogymbattle.asm new file mode 100644 index 0000000..3c9d3a5 --- /dev/null +++ b/audio/music/kantogymbattle.asm @@ -0,0 +1,612 @@ +Music_KantoGymBattle: + channel_count 3 + channel 1, Music_KantoGymBattle_Ch1 + channel 2, Music_KantoGymBattle_Ch2 + channel 3, Music_KantoGymBattle_Ch3 + +Music_KantoGymBattle_Ch1: + tempo 101 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 18, 1, 5 + note_type 12, 11, 2 + octave 3 + note A#, 1 + note A_, 1 + note G#, 1 + note G_, 1 + note G#, 1 + note G_, 1 + note F#, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note F_, 1 + note E_, 1 + note D#, 1 + note E_, 1 + note D#, 1 + note D_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + note C#, 1 + note C_, 1 + octave 2 + note B_, 1 + octave 3 + note C_, 1 + octave 2 + note B_, 1 + note A#, 1 + note B_, 1 + note A#, 2 + note A#, 6 + note A#, 2 + note A#, 6 + note A#, 2 + note A#, 8 + volume_envelope 11, 7 + note B_, 2 + volume_envelope 11, 2 + note A#, 2 + note A#, 6 + note A#, 2 + note A#, 6 + note A#, 2 + note A#, 8 + volume_envelope 11, 7 + octave 3 + note E_, 2 + volume_envelope 11, 2 + octave 2 + note A#, 2 + note A#, 6 + note A#, 2 + note A#, 6 + note A#, 2 + note A#, 8 + volume_envelope 11, 7 + note B_, 2 + volume_envelope 11, 2 + note A#, 2 + note A#, 6 + note A#, 2 + note A#, 6 + note A#, 2 + volume_envelope 11, 4 + octave 3 + note E_, 4 + note E_, 4 + note E_, 2 +.mainloop: + sound_call .sub1 + octave 2 + note A#, 2 + volume_envelope 11, 7 + note G#, 8 + note B_, 8 + octave 3 + note D#, 10 + note E_, 6 + sound_call .sub1 + note D#, 2 + volume_envelope 11, 7 + note C#, 8 + octave 2 + note B_, 8 + note G#, 10 + octave 3 + note E_, 6 + volume_envelope 11, 2 + note D#, 2 + note D#, 2 + note G_, 1 + note E_, 1 + note D#, 1 + note G_, 1 + note D#, 2 + note D#, 2 + note A#, 1 + note G#, 1 + note E_, 1 + note A#, 1 + note D#, 2 + note D#, 2 + note B_, 1 + note A#, 1 + note G#, 1 + note B_, 1 + note D#, 2 + volume_envelope 11, 7 + note E_, 2 + volume_envelope 11, 2 + note D#, 2 + note D#, 2 + note G_, 1 + note E_, 1 + note D#, 1 + note G_, 1 + note D#, 2 + note D#, 2 + note A#, 1 + note G#, 1 + note E_, 1 + note A#, 1 + note D#, 2 + note D#, 2 + note B_, 1 + note A#, 1 + note G#, 1 + note B_, 1 + note G#, 2 + volume_envelope 11, 5 + note B_, 2 + note D#, 2 + note C#, 2 + octave 2 + note A#, 4 + note D#, 2 + note G#, 2 + note B_, 2 + octave 3 + note E_, 2 + note D#, 4 + note C#, 2 + octave 2 + note A#, 2 + note A#, 2 + note D#, 2 + note A#, 2 + octave 3 + note C#, 2 + volume_envelope 11, 7 + octave 2 + note B_, 8 + note A#, 8 + note G#, 10 + note B_, 6 + volume_envelope 11, 5 + octave 3 + note D#, 2 + note C#, 2 + octave 2 + note A#, 4 + note D#, 2 + note G#, 2 + note B_, 2 + octave 3 + note E_, 2 + note D#, 4 + note C#, 2 + octave 2 + note A#, 2 + note A#, 2 + note G#, 2 + note A#, 2 + octave 3 + note C#, 2 + volume_envelope 11, 7 + note E_, 8 + note F#, 8 + note G_, 16 + volume_envelope 11, 2 + octave 2 + note G#, 2 + note G#, 2 + volume_envelope 11, 7 + octave 3 + note C#, 12 + volume_envelope 11, 2 + note G#, 2 + note F_, 4 + volume_envelope 11, 5 + octave 2 + note F_, 4 + note G_, 2 + note G#, 2 + note A#, 2 + volume_envelope 11, 2 + note A#, 2 + note A#, 2 + volume_envelope 11, 7 + octave 3 + note D#, 12 + volume_envelope 11, 2 + note A#, 2 + note G_, 4 + volume_envelope 11, 7 + octave 4 + note D#, 6 + volume_envelope 4, -4 + octave 3 + note D_, 4 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 11, 5 + note D#, 2 + octave 2 + note A#, 2 + octave 3 + note D#, 2 + note E_, 4 + note D#, 2 + note C#, 2 + octave 2 + note A#, 2 + note D#, 2 + note G#, 2 + note A#, 2 + octave 3 + note D#, 2 + note E_, 2 + note D#, 2 + note C#, 2 + sound_ret + +Music_KantoGymBattle_Ch2: + duty_cycle 3 + vibrato 8, 3, 6 + pitch_offset 1 + note_type 12, 12, 2 +.loop1: + octave 4 + note A#, 1 + note G#, 1 + note A#, 1 + octave 5 + note D#, 1 + sound_loop 8, .loop1 + octave 3 +.loop2: + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + note F#, 1 + note E_, 1 + note D#, 1 + note F#, 1 + note D#, 2 + note D#, 2 + note A#, 1 + note G#, 1 + note F#, 1 + note A#, 1 + note D#, 2 + note D#, 2 + note B_, 1 + note A#, 1 + note G#, 1 + note B_, 1 + note D_, 2 + volume_envelope 12, 7 + note E_, 2 + volume_envelope 12, 2 + note D#, 2 + note D#, 2 + note F#, 1 + note E_, 1 + note D#, 1 + note F#, 1 + note D#, 2 + note D#, 2 + note A#, 1 + note G#, 1 + note F#, 1 + note A#, 1 + note D#, 2 + note D#, 2 + note B_, 1 + note A#, 1 + note G#, 1 + note B_, 1 + note G#, 2 + volume_envelope 12, 7 + note B_, 2 + volume_envelope 12, 2 + octave 4 + sound_loop 2, .loop2 +.mainloop: + sound_call .sub1 + note E_, 8 + note G#, 8 + note B_, 10 + note G#, 6 + sound_call .sub1 + note E_, 8 + note G#, 8 + note B_, 10 + octave 4 + note E_, 6 + note D#, 8 + volume_envelope 11, 7 + note D#, 8 + volume_envelope 10, 2 + rest 6 + octave 5 + note E_, 4 + note E_, 4 + note E_, 2 + volume_envelope 10, 0 + note D#, 8 + volume_envelope 10, 7 + note D#, 8 + rest 12 + volume_envelope 12, 5 + octave 3 + note A#, 4 + note B_, 4 + note G#, 4 + note A#, 4 + note B_, 4 + note G#, 4 + note E_, 4 + volume_envelope 11, 0 + note D#, 8 + note D#, 16 + volume_envelope 11, 7 + note D#, 12 + volume_envelope 12, 5 + note A#, 4 + note B_, 4 + note G#, 4 + note A#, 4 + note B_, 4 + note G#, 4 + note B_, 4 + volume_envelope 11, 0 + note A#, 8 + volume_envelope 11, 7 + note A#, 8 + volume_envelope 11, 0 + octave 4 + note D#, 8 + volume_envelope 11, 7 + note D#, 8 + volume_envelope 12, 2 + octave 3 + note C#, 2 + note C#, 2 + volume_envelope 12, 7 + note F_, 8 + volume_envelope 12, 2 + octave 4 + note C#, 4 + note F_, 2 + note C#, 4 + volume_envelope 12, 7 + note G#, 4 + note G_, 2 + note F_, 2 + note D#, 2 + volume_envelope 12, 2 + octave 3 + note D#, 2 + note D#, 2 + volume_envelope 12, 7 + note G_, 8 + volume_envelope 12, 2 + octave 4 + note D#, 4 + note G_, 2 + note D#, 4 + volume_envelope 12, 7 + note A#, 6 + octave 3 + note A_, 4 + sound_loop 0, .mainloop + +.sub1: + duty_cycle 2 + volume_envelope 13, 1 + octave 3 + note A#, 2 + volume_envelope 10, 2 + note A#, 2 + volume_envelope 13, 1 + note G#, 2 + volume_envelope 10, 2 + note G#, 2 + volume_envelope 13, 1 + note A#, 2 + volume_envelope 10, 2 + note A#, 2 + volume_envelope 12, 5 + note B_, 2 + octave 4 + note C#, 2 + note C#, 2 + octave 3 + note B_, 4 + note A#, 2 + note G#, 2 + note F#, 2 + note G#, 2 + note A#, 2 + duty_cycle 3 + volume_envelope 11, 0 + sound_ret + +Music_KantoGymBattle_Ch3: + note_type 12, 1, 9 + octave 2 + note E_, 1 + rest 1 +.loop1: + note B_, 3 + rest 1 + sound_loop 6, .loop1 + note B_, 2 + note G#, 2 + note B_, 2 +.loop2: + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note A#, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note B_, 4 + note D_, 1 + rest 1 + note F_, 2 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note A#, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note B_, 4 + note D#, 1 + rest 1 + note E_, 2 + sound_loop 2, .loop2 +.mainloop: +.loop3: + octave 2 + note D#, 2 + note A#, 2 + sound_loop 8, .loop3 +.loop4: + note E_, 2 + note B_, 2 + sound_loop 4, .loop4 + octave 1 + note B_, 2 + octave 2 + note E_, 2 + octave 1 + note B_, 2 + octave 2 + note E_, 4 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note B_, 2 +.loop5: + octave 2 + note F#, 2 + octave 3 + note C#, 2 + sound_loop 8, .loop5 +.loop6: + octave 2 + note E_, 2 + note B_, 2 + sound_loop 7, .loop6 + octave 3 + note E_, 2 + octave 2 + note B_, 2 +.loop7: + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note A#, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note B_, 4 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note A#, 4 + note D#, 1 + rest 1 + note E_, 2 + sound_loop 2, .loop7 +.loop8: + note D#, 2 + note A#, 2 + sound_loop 7, .loop8 + octave 3 + note C#, 2 + octave 2 + note A#, 2 + note E_, 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note E_, 2 + note B_, 2 + octave 3 + note E_, 2 +.loop9: + octave 2 + note E_, 2 + note B_, 2 + sound_loop 5, .loop9 +.loop10: + octave 2 + note F#, 2 + octave 3 + note C#, 2 + sound_loop 7, .loop10 + octave 2 + note A#, 2 + octave 3 + note C#, 2 + octave 2 + note E_, 2 + note A#, 2 + octave 3 + note E_, 2 + note F#, 2 + note G#, 2 + note F#, 2 + note E_, 2 + note C#, 2 +.loop11: + octave 2 + note D#, 2 + note A#, 2 + sound_loop 4, .loop11 +.loop12: + note C#, 2 + note G#, 2 + sound_loop 8, .loop12 +.loop13: + note D#, 2 + note A#, 2 + sound_loop 4, .loop13 + octave 3 + note D#, 2 + octave 2 + note A#, 2 + note D#, 2 + note D_, 2 + note D_, 2 + note A#, 2 + octave 3 + note D#, 2 + note F_, 2 + sound_loop 0, .mainloop diff --git a/audio/music/kantotrainerbattle.asm b/audio/music/kantotrainerbattle.asm new file mode 100644 index 0000000..3457d73 --- /dev/null +++ b/audio/music/kantotrainerbattle.asm @@ -0,0 +1,1537 @@ +Music_KantoTrainerBattle: + channel_count 3 + channel 1, Music_KantoTrainerBattle_Ch1 + channel 2, Music_KantoTrainerBattle_Ch2 + channel 3, Music_KantoTrainerBattle_Ch3 + + db $3 ; unused, leftover from a channel 4 + +Music_KantoTrainerBattle_Ch1: + tempo 114 + volume 7, 7 + transpose 1, 11 + note_type 12, 11, 3 + vibrato 18, 2, 4 + duty_cycle 1 + rest 1 + octave 4 + note A_, 1 + note G#, 1 + note G_, 1 + note G#, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note D#, 1 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + octave 3 + note B_, 1 + octave 4 + note C_, 1 + octave 3 + note B_, 1 + note A#, 1 + note A_, 1 + note A#, 1 + note A_, 1 + note G#, 1 + note G_, 1 + note G#, 1 + note G_, 1 + note F#, 1 + note G_, 1 + duty_cycle 2 + volume_envelope 11, 1 + octave 4 + note D#, 2 + octave 2 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 4 + note C_, 2 + octave 2 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 4 + note D#, 2 + rest 2 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + rest 2 + note D#, 2 + rest 2 + octave 3 + note D#, 1 + rest 1 + note F_, 1 + rest 1 + note F#, 1 + rest 1 + octave 4 + note C_, 2 + octave 2 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 4 + note C_, 2 + octave 2 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 4 + note D#, 2 + rest 2 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + rest 2 + note D#, 2 + rest 2 + note D#, 1 + rest 1 + note F_, 1 + rest 1 + note G_, 1 + rest 1 + volume_envelope 11, 3 + note D#, 2 + rest 4 + note F_, 2 + rest 4 + note F#, 2 + rest 2 + note D#, 2 + note F_, 2 + rest 2 + note F#, 2 + rest 2 + note D#, 2 + note F_, 2 + note F#, 2 +.mainloop: + note_type 12, 11, 7 + note D#, 4 + rest 2 + note C_, 10 + rest 4 + note D#, 2 + note C_, 2 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + note D#, 1 + rest 1 + note C_, 1 + rest 1 + note D#, 1 + rest 1 + note C#, 8 + note F_, 8 + note G#, 8 + octave 5 + note C#, 4 + note C#, 1 + octave 4 + note G#, 1 + note F_, 1 + note C#, 1 + note D#, 4 + rest 2 + note C_, 10 + rest 4 + note D#, 2 + note C_, 2 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + note D#, 1 + rest 1 + note D_, 1 + rest 1 + note F_, 1 + rest 1 + note D#, 6 + note D_, 6 + note C_, 2 + rest 2 + rest 2 + note D_, 2 + rest 4 + note F_, 2 + rest 2 + note G#, 2 + note G_, 1 + note F#, 1 + octave 3 + note G#, 1 + note F_, 1 + note C_, 1 + note G#, 1 + octave 4 + note C_, 1 + rest 1 + note F_, 1 + rest 1 + note C_, 1 + octave 3 + note G#, 1 + note F_, 1 + rest 5 + octave 4 + note D#, 8 + note D_, 4 + octave 3 + note F_, 1 + note A_, 1 + octave 4 + note C_, 1 + note D#, 1 + note D_, 4 + octave 3 + note D_, 4 + octave 4 + note F_, 4 + octave 3 + note D_, 4 + rest 4 + note D_, 4 + rest 4 + note D_, 4 + note G#, 1 + note F_, 1 + note C_, 1 + note G#, 1 + octave 4 + note C_, 1 + rest 1 + note F_, 1 + rest 1 + note C_, 1 + octave 3 + note G#, 1 + note F_, 1 + rest 5 + octave 4 + note D#, 8 + note D_, 4 + octave 3 + note F_, 1 + note A_, 1 + octave 4 + note C_, 1 + note D#, 1 + note D_, 4 + octave 3 + note D_, 4 + rest 4 + note D_, 4 + note A#, 1 + octave 4 + note D_, 1 + note F_, 1 + rest 1 + octave 3 + note D_, 2 + octave 4 + note F_, 2 + note D_, 2 + octave 3 + note A#, 2 + note D_, 2 + octave 4 + note D_, 2 + volume_envelope 6, 7 + note C_, 1 + note C#, 1 + note D_, 1 + note D#, 1 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + rest 3 + note D#, 4 + note_type 6, 6, 7 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note D#, 1 + rest 7 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + octave 3 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + octave 4 + note C_, 8 + volume_envelope 7, 7 + note C#, 2 + note D_, 2 + note D#, 2 + note E_, 2 + note F_, 2 + note E_, 2 + note D#, 2 + note D_, 2 + note C#, 2 + rest 6 + note E_, 8 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note E_, 1 + rest 7 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + octave 3 + note G#, 1 + rest 3 + note G#, 1 + rest 3 + octave 4 + note C#, 8 + volume_envelope 8, 7 + note D_, 2 + note D#, 2 + note E_, 2 + note F_, 2 + note F#, 2 + note F_, 2 + note E_, 2 + note D#, 2 + note D_, 2 + rest 6 + note F_, 8 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note F_, 1 + rest 7 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + octave 3 + note A_, 1 + rest 3 + note A_, 1 + rest 3 + octave 4 + note D_, 8 + volume_envelope 9, 7 + note D#, 2 + note E_, 2 + note F_, 2 + note F#, 2 + note G_, 2 + note F#, 2 + note F_, 2 + note E_, 2 + note D#, 2 + rest 6 + note F#, 8 + volume_envelope 10, 7 + note G#, 8 + note A#, 8 + volume_envelope 11, 7 + octave 5 + note D_, 8 + note D_, 2 + rest 6 + octave 4 + note A#, 2 + note F#, 2 + note D#, 2 + octave 3 + note A#, 2 + octave 4 + note F#, 2 + note D#, 2 + octave 3 + note A#, 2 + note F#, 2 + octave 4 + note G#, 2 + rest 2 + note D#, 12 + volume_envelope 11, 1 + octave 6 + note C_, 2 + note C_, 2 + note C_, 8 + note C_, 2 + note C_, 2 + note C_, 4 + note C_, 4 + note C_, 4 + note C_, 4 + volume_envelope 11, 7 + octave 4 + note A#, 2 + note F#, 2 + note D#, 2 + octave 3 + note A#, 2 + octave 4 + note F#, 2 + note D#, 2 + octave 3 + note A#, 2 + note F#, 2 + octave 4 + note F#, 2 + rest 2 + note B_, 4 + note A#, 4 + note G#, 4 + note F#, 4 + note F_, 4 + note D#, 4 + note D_, 4 + note D#, 8 + note F#, 8 + octave 5 + note C_, 8 + note D#, 8 + octave 4 + note C#, 16 + note C#, 2 + rest 2 + note D#, 2 + rest 2 + note F_, 2 + rest 2 + octave 3 + note G#, 2 + rest 2 + octave 4 + note F_, 2 + note F#, 2 + note F_, 2 + note D#, 2 + note F_, 2 + volume_envelope 6, 7 + note E_, 1 + note D_, 1 + note C_, 1 + octave 3 + note B_, 1 + note A_, 1 + note G_, 1 + volume_envelope 10, 1 + octave 4 + note C#, 2 + octave 2 + note G_, 2 + note G_, 2 + octave 4 + note C#, 2 + octave 2 + note G_, 2 + note G_, 2 + volume_envelope 11, 7 + octave 4 + note D_, 4 + sound_loop 0, .mainloop + +Music_KantoTrainerBattle_Ch2: + transpose 1, 11 + vibrato 6, 3, 6 + duty_cycle 1 + note_type 12, 13, 1 + octave 4 + note A#, 4 + note A#, 4 + note A#, 4 + note A#, 4 + note A#, 4 + note A#, 4 + note A#, 4 + note G_, 1 + note G#, 1 + note G_, 1 + note F#, 1 + duty_cycle 3 + volume_envelope 6, 2 +.loop1: + octave 3 + note G_, 1 + note G#, 1 + note G_, 1 + note F#, 1 + sound_loop 14, .loop1 + note G_, 1 + note G#, 1 + note G_, 1 + note F_, 1 + note D#, 1 + note D_, 1 + note C_, 1 + octave 2 + note B_, 1 + volume_envelope 13, 7 + duty_cycle 2 + note C_, 2 + octave 3 + note C_, 1 + rest 1 + octave 2 + note C_, 1 + rest 1 + octave 1 + note A#, 2 + octave 2 + note A#, 1 + rest 1 + octave 1 + note A#, 1 + rest 1 + note A_, 2 + octave 2 + note A_, 1 + rest 1 + octave 1 + note A_, 1 + rest 1 + note G#, 2 + octave 2 + note G#, 1 + rest 1 + octave 1 + note G#, 1 + rest 1 + note G_, 1 + note B_, 1 + octave 2 + note D_, 1 + note F_, 1 + note G_, 1 + note B_, 1 + octave 3 + note D_, 1 + note F_, 1 +.mainloop: + note_type 12, 13, 7 + octave 2 + note C_, 1 + note C_, 1 + octave 3 + note C_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + octave 2 + note C_, 2 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + note C_, 2 + note A#, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + note C_, 2 + note A_, 1 + rest 1 + note G#, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + octave 2 + note C#, 1 + note C#, 1 + note G#, 1 + rest 1 + octave 3 + note C#, 2 + octave 2 + note C#, 2 + note G#, 1 + rest 1 + octave 3 + note C_, 2 + octave 2 + note C#, 2 + note G#, 1 + rest 1 + note A#, 2 + note C#, 1 + note C#, 1 + note F_, 1 + rest 1 + note G#, 2 + octave 3 + note C#, 1 + rest 1 + note F_, 2 + note G#, 1 + rest 1 + note A#, 2 + octave 2 + note C_, 1 + note C_, 1 + octave 3 + note C_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + octave 2 + note C_, 2 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + note C_, 2 + note A#, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + note C_, 2 + note A_, 1 + rest 1 + note F_, 1 + rest 1 + note A_, 1 + rest 1 + octave 1 + note A#, 1 + note A#, 1 + octave 2 + note F_, 1 + rest 1 + note A#, 2 + octave 1 + note A#, 2 + octave 2 + note F_, 1 + rest 1 + note A_, 2 + octave 1 + note A#, 2 + octave 2 + note F_, 1 + rest 1 + note G#, 2 + octave 1 + note A#, 1 + note A#, 1 + octave 2 + note F_, 1 + rest 1 + note G_, 2 + note A#, 1 + rest 1 + octave 3 + note D_, 2 + note F_, 1 + rest 1 + note A#, 2 + octave 1 + note F_, 2 + octave 2 + note F_, 1 + rest 1 + note C_, 1 + rest 1 + note F_, 1 + rest 1 + octave 1 + note F_, 2 + octave 2 + note E_, 1 + rest 1 + note C_, 1 + rest 1 + note E_, 1 + rest 1 + octave 1 + note F_, 2 + octave 2 + note D#, 1 + rest 1 + note C_, 1 + rest 1 + note D#, 1 + rest 1 + octave 1 + note F_, 2 + octave 2 + note D_, 1 + rest 1 + note D#, 1 + note C_, 1 + octave 1 + note A#, 1 + note A_, 1 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + octave 3 + note F_, 4 + octave 1 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + octave 3 + note F#, 4 + octave 1 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + octave 3 + note G_, 4 + octave 1 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + octave 3 + note G#, 4 + octave 1 + note F_, 2 + octave 2 + note F_, 1 + rest 1 + note C_, 1 + rest 1 + note F_, 1 + rest 1 + octave 1 + note F_, 2 + octave 2 + note E_, 1 + rest 1 + note C_, 1 + rest 1 + note E_, 1 + rest 1 + octave 1 + note F_, 2 + octave 2 + note D#, 1 + rest 1 + note C_, 1 + rest 1 + note D#, 1 + rest 1 + octave 1 + note F_, 2 + octave 2 + note D_, 1 + rest 1 + note D#, 1 + note C_, 1 + octave 1 + note A#, 1 + note A_, 1 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + octave 3 + note F_, 4 + octave 1 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + octave 3 + note F#, 4 + octave 1 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + octave 3 + note G_, 4 + octave 1 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + octave 3 + note G#, 4 + vibrato 18, 2, 4 + note_type 12, 7, 8 + octave 4 + note G_, 16 + volume_envelope 7, 7 + note G_, 16 + note_type 6, 8, 8 + note G#, 16 + volume_envelope 8, 7 + note G#, 15 + note G_, 1 + note G#, 7 + note A_, 1 + note A#, 3 + note A_, 1 + note G#, 8 + note G_, 4 + note F_, 6 + rest 2 + note_type 12, 9, 8 + note A_, 16 + volume_envelope 9, 7 + note A_, 16 + volume_envelope 10, 7 + note A#, 16 + volume_envelope 13, 7 + octave 5 + note D_, 8 + note F_, 8 + vibrato 4, 3, 6 + octave 2 + note A#, 4 + note D#, 4 + note C_, 1 + rest 1 + volume_envelope 13, 8 + note G#, 6 + volume_envelope 13, 7 + note G#, 16 + note A#, 4 + note D#, 4 + note D#, 1 + rest 1 + octave 3 + note D#, 14 + octave 2 + note C_, 1 + rest 1 + octave 3 + note D#, 2 + rest 2 + note_type 6, 13, 7 + octave 2 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 2 + rest 2 + note C_, 2 + rest 2 + octave 3 + note G#, 8 + octave 4 + note F_, 2 + note F#, 2 + note F_, 2 + note D#, 2 + note F_, 2 + rest 2 + note D#, 2 + rest 2 + octave 3 + note F_, 2 + rest 2 + note F#, 2 + rest 2 + note G#, 2 + rest 2 + note C#, 2 + rest 2 + note G#, 2 + note A#, 2 + note G#, 2 + note F#, 2 + note G#, 2 + volume_envelope 7, 2 + note G_, 1 + note F_, 1 + note E_, 1 + note D_, 1 + note C_, 1 + octave 2 + note B_, 1 + volume_envelope 12, 1 + octave 3 + note B_, 2 + octave 1 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + octave 3 + note B_, 2 + octave 1 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + volume_envelope 13, 7 + octave 3 + note B_, 4 + sound_loop 0, .mainloop + +Music_KantoTrainerBattle_Ch3: + transpose 1, 11 + vibrato 18, 2, 3 + note_type 12, 1, 5 + octave 2 + note A#, 1 + octave 4 + note A#, 1 + octave 3 + note A#, 2 + octave 2 + note A_, 1 + octave 4 + note A_, 1 + octave 3 + note A_, 2 + octave 2 + note G#, 1 + octave 4 + note G#, 1 + octave 3 + note G#, 2 + octave 2 + note G_, 1 + octave 4 + note G_, 1 + octave 3 + note G_, 2 + octave 2 + note F#, 1 + octave 4 + note F#, 1 + octave 3 + note F#, 2 + octave 2 + note F_, 1 + octave 4 + note F_, 1 + octave 3 + note F_, 2 + octave 2 + note E_, 1 + octave 4 + note E_, 1 + octave 3 + note E_, 2 + note D_, 1 + note F_, 1 + note B_, 1 + octave 4 + note D_, 1 + volume_envelope 1, 8 + octave 6 + note C_, 2 + octave 3 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 5 + note F_, 2 + octave 3 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 5 + note F#, 2 + octave 4 + note C_, 1 + note D#, 1 + octave 5 + note D#, 2 + note F_, 2 + rest 2 + note F#, 2 + rest 2 + octave 4 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + note B_, 1 + rest 1 + octave 5 + note D#, 2 + octave 3 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 5 + note F_, 2 + octave 3 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 5 + note F#, 2 + octave 4 + note C_, 1 + note D#, 1 + octave 5 + note D#, 2 + note F_, 2 + rest 2 + note F#, 2 + rest 2 + note G_, 1 + rest 1 + note A#, 1 + rest 1 + note B_, 1 + rest 1 + octave 6 + note C_, 2 + rest 4 + note D_, 2 + rest 4 + note D#, 2 + rest 2 + note C_, 2 + note D_, 2 + rest 2 + note D#, 2 + rest 2 + octave 5 + note G_, 2 + note A#, 2 + note B_, 2 +.mainloop: + note_type 12, 1, 4 + octave 6 + note C_, 4 + note_type 6, 1, 4 + octave 5 + note B_, 1 + note A#, 1 + note A_, 1 + note G#, 1 + note_type 12, 1, 4 + note G_, 10 + rest 2 + note_type 6, 1, 4 + note G_, 1 + note G#, 1 + note A_, 1 + note A#, 1 + octave 6 + note C_, 6 + octave 5 + note A_, 1 + note G#, 1 + note G_, 8 + octave 6 + note C_, 7 + octave 5 + note B_, 1 + note_type 12, 1, 4 + octave 6 + note C#, 16 + note C#, 8 + note F_, 4 + note G#, 1 + note F_, 1 + note C#, 1 + octave 5 + note G#, 1 + octave 6 + note C_, 4 + note_type 6, 1, 4 + octave 5 + note B_, 1 + note A#, 1 + note A_, 1 + note G#, 1 + note_type 12, 1, 4 + note G_, 10 + rest 2 + note_type 6, 1, 4 + note G_, 1 + note G#, 1 + note A_, 1 + note A#, 1 + octave 6 + note C_, 6 + octave 5 + note A_, 1 + note G#, 1 + note G_, 8 + octave 6 + note C_, 7 + octave 5 + note B_, 1 + note A#, 16 + note A#, 16 + note A#, 13 + note B_, 1 + octave 6 + note C_, 1 + note C#, 1 + note D_, 8 + note F_, 2 + note D_, 2 + octave 5 + note A#, 2 + note A_, 2 + note_type 12, 1, 0 + note G#, 11 + volume_envelope 1, 4 + note C_, 1 + note F_, 1 + rest 1 + note G#, 1 + rest 1 + volume_envelope 1, 0 + octave 6 + note C_, 6 + note_type 6, 1, 0 + octave 5 + note B_, 1 + note A#, 1 + note A_, 1 + note G#, 1 + note G#, 16 + note_type 12, 1, 0 + note A#, 16 + volume_envelope 2, 5 + note D_, 1 + octave 4 + note A#, 1 + note F_, 1 + note A#, 1 + octave 5 + note F_, 1 + note D_, 1 + octave 4 + note A#, 1 + octave 5 + note D_, 1 + note A#, 1 + note F_, 1 + note D_, 1 + note F_, 1 + octave 6 + note D_, 2 + note C#, 1 + note C_, 1 + volume_envelope 1, 0 + octave 5 + note G#, 11 + volume_envelope 1, 4 + note C_, 1 + note F_, 1 + rest 1 + note G#, 1 + rest 1 + volume_envelope 1, 0 + octave 6 + note C_, 7 + note_type 6, 1, 0 + note C#, 1 + note D_, 1 + note_type 12, 1, 0 + note D#, 8 + note D_, 12 + note G#, 1 + note F_, 1 + volume_envelope 2, 5 + octave 5 + note A#, 1 + note F_, 1 + note G#, 1 + note G#, 1 + note G#, 1 + rest 1 + note A#, 1 + rest 1 + note G#, 2 + note G_, 2 + note F_, 2 + note D#, 2 + note F_, 2 + volume_envelope 2, 4 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + octave 3 + note D#, 1 + octave 4 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + octave 3 + note D#, 1 + octave 4 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + octave 3 + note D#, 1 + octave 4 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + octave 3 + note D#, 1 + octave 4 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + octave 3 + note D#, 1 + octave 4 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + octave 3 + note D#, 1 + octave 4 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + octave 3 + note D#, 1 + octave 4 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + octave 3 + note D#, 1 + octave 4 + note C_, 1 + octave 3 + note G#, 1 + octave 4 + note C#, 1 + octave 3 + note E_, 1 + octave 4 + note C#, 1 + octave 3 + note G#, 1 + octave 4 + note C#, 1 + octave 3 + note E_, 1 + octave 4 + note C#, 1 + octave 3 + note G#, 1 + octave 4 + note C#, 1 + octave 3 + note E_, 1 + octave 4 + note C#, 1 + octave 3 + note G#, 1 + octave 4 + note C#, 1 + octave 3 + note E_, 1 + octave 4 + note C#, 1 + octave 3 + note G#, 1 + octave 4 + note C#, 1 + octave 3 + note E_, 1 + octave 4 + note C#, 1 + octave 3 + note G#, 1 + octave 4 + note C#, 1 + octave 3 + note E_, 1 + octave 4 + note C#, 1 + octave 3 + note G#, 1 + octave 4 + note C#, 1 + octave 3 + note E_, 1 + octave 4 + note C#, 1 + octave 3 + note G#, 1 + octave 4 + note C#, 1 + octave 3 + note E_, 1 + octave 4 + note C#, 1 + volume_envelope 1, 4 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + octave 3 + note F_, 1 + octave 4 + note D_, 1 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + octave 3 + note F_, 1 + octave 4 + note D_, 1 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + octave 3 + note F_, 1 + octave 4 + note D_, 1 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + octave 3 + note F_, 1 + octave 4 + note D_, 1 + volume_envelope 1, 5 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + octave 3 + note F_, 1 + octave 4 + note D_, 1 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + octave 3 + note F_, 1 + octave 4 + note D_, 1 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + octave 3 + note F_, 1 + octave 4 + note D_, 1 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + octave 3 + note F_, 1 + octave 4 + note D_, 1 + volume_envelope 1, 5 + octave 3 + note A#, 1 + octave 4 + note D#, 1 + octave 3 + note F#, 1 + octave 4 + note D#, 1 + octave 3 + note A#, 1 + octave 4 + note D#, 1 + octave 3 + note F#, 1 + octave 4 + note D#, 1 + octave 3 + note A#, 1 + octave 4 + note D#, 1 + octave 3 + note F#, 1 + octave 4 + note D#, 1 + octave 3 + note A#, 1 + octave 4 + note D#, 1 + octave 3 + note F#, 1 + octave 4 + note D#, 1 + volume_envelope 1, 4 + octave 3 + note F_, 1 + note G#, 1 + note B_, 1 + octave 4 + note D_, 1 + octave 3 + note G#, 1 + note B_, 1 + octave 4 + note D_, 1 + note F_, 1 + octave 3 + note B_, 1 + octave 4 + note D_, 1 + note F_, 1 + note G#, 1 + note D_, 1 + note F_, 1 + note G#, 1 + octave 5 + note D_, 1 + octave 6 + note D#, 4 + octave 5 + note A#, 4 + octave 6 + note C#, 1 + rest 1 + note C_, 6 + octave 4 + note C_, 1 + note D#, 1 + note G#, 1 + octave 5 + note C_, 1 + note D#, 1 + note G#, 1 + octave 6 + note C_, 1 + note D#, 1 + note G#, 1 + note D#, 1 + note C_, 1 + octave 5 + note G#, 1 + note D#, 1 + note C_, 1 + octave 4 + note G#, 1 + note D#, 1 + octave 6 + note D#, 4 + octave 5 + note A#, 4 + note B_, 1 + rest 1 + octave 6 + note F#, 12 + note F_, 1 + note F#, 1 + note G#, 16 + note F_, 8 + note C#, 1 + rest 1 + note D#, 1 + rest 1 + note F_, 1 + rest 1 + octave 5 + note G#, 1 + rest 1 + octave 6 + note F_, 1 + note F#, 1 + note F_, 1 + note D#, 1 + note F_, 1 + note_type 6, 2, 4 + note E_, 1 + note D_, 1 + note C_, 1 + octave 5 + note B_, 1 + note A_, 1 + note G_, 1 + volume_envelope 1, 4 + note G_, 2 + octave 3 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + octave 5 + note G_, 2 + octave 3 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + volume_envelope 1, 4 + octave 5 + note G_, 4 + sound_loop 0, .mainloop diff --git a/audio/music/kantowildbattle.asm b/audio/music/kantowildbattle.asm new file mode 100644 index 0000000..758e63b --- /dev/null +++ b/audio/music/kantowildbattle.asm @@ -0,0 +1,1217 @@ +Music_KantoWildBattle: + channel_count 3 + channel 1, Music_KantoWildBattle_Ch1 + channel 2, Music_KantoWildBattle_Ch2 + channel 3, Music_KantoWildBattle_Ch3 + + db $3 ; unused, leftover from a channel 4 + +Music_KantoWildBattle_Ch1: + tempo 112 + volume 7, 7 + vibrato 18, 2, 3 + duty_cycle 2 + note_type 12, 11, 7 + rest 16 + octave 4 + note A#, 6 + note A_, 1 + note G#, 1 + note A_, 1 + note G#, 1 + note G_, 1 + note F#, 1 + note G#, 1 + note G_, 1 + note F#, 1 + note F_, 1 +.mainloop: + note_type 12, 11, 7 + sound_call .sub1 + octave 4 + note F_, 4 + note C#, 4 + octave 3 + note B_, 8 + sound_call .sub1 + rest 8 + note G_, 1 + note B_, 1 + octave 4 + note C#, 1 + octave 3 + note B_, 1 + note G_, 1 + note B_, 1 + octave 4 + note D_, 1 + note D#, 1 + volume_envelope 11, 1 + note E_, 6 + note C_, 6 + octave 3 + note G_, 4 + octave 4 + note E_, 6 + note C_, 6 + note E_, 4 + volume_envelope 11, 7 + note F_, 1 + note C#, 1 + octave 3 + note G#, 1 + octave 4 + note C_, 1 + note C#, 1 + octave 3 + note G#, 1 + note F_, 1 + note G_, 1 + note G#, 4 + note F#, 1 + note G_, 1 + note G#, 1 + octave 4 + note C_, 1 + note C#, 4 + octave 3 + note F_, 1 + note G#, 1 + octave 4 + note C#, 1 + note E_, 1 + note F_, 3 + note G_, 1 + note G#, 4 + volume_envelope 11, 1 + octave 3 + note G_, 6 + note F_, 6 + note E_, 4 + note G#, 6 + note G_, 6 + note F_, 4 + octave 4 + note C_, 6 + octave 3 + note A#, 6 + note G_, 4 + note_type 8, 11, 7 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + note E_, 2 + note C_, 2 + note E_, 2 + note G_, 2 + note E_, 2 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + octave 4 + note C_, 2 + note E_, 2 + note F_, 2 + note C#, 2 + octave 3 + note G#, 2 + octave 4 + note C#, 2 + octave 3 + note G#, 2 + note F_, 2 + note G#, 2 + note F_, 2 + note C#, 2 + note F_, 2 + note C#, 2 + octave 2 + note G#, 2 + note_type 12, 11, 7 + octave 3 + note G#, 4 + octave 4 + note C#, 4 + volume_envelope 7, 1 + note F_, 1 + note F_, 1 + volume_envelope 9, 1 + note F_, 1 + note F_, 1 + volume_envelope 11, 1 + note G#, 1 + note G#, 1 + volume_envelope 13, 1 + note G#, 1 + note G#, 1 + volume_envelope 12, 7 + note E_, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note E_, 12 + note E_, 8 + volume_envelope 11, 1 + note E_, 1 + note D_, 1 + note C_, 1 + octave 3 + note A#, 1 + note A_, 1 + note G_, 1 + note F_, 1 + note E_, 1 + volume_envelope 11, 7 + note D_, 8 + note F_, 8 + note A#, 8 + octave 4 + note D_, 8 + octave 3 + note G_, 8 + octave 4 + note C_, 8 + note E_, 8 + note G_, 8 + rest 8 + octave 3 + note D#, 8 + note G#, 8 + octave 4 + note C_, 8 + octave 3 + note A#, 8 + rest 8 + octave 4 + note D_, 8 + octave 3 + note G#, 2 + note F_, 2 + note D_, 2 + note F_, 2 + octave 4 + note C_, 4 + rest 6 + note C_, 1 + rest 5 + note C#, 2 + note C_, 1 + rest 13 + note C#, 4 + rest 6 + note C#, 1 + rest 5 + note F_, 2 + note D#, 1 + rest 5 + note C#, 8 +.loop1: + volume_envelope 11, 1 + octave 3 + note C_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + sound_loop 8, .loop1 +.loop2: + note C#, 1 + note F_, 1 + note E_, 1 + note D#, 1 + sound_loop 8, .loop2 +.loop3: + note C_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + sound_loop 16, .loop3 +.loop4: + note C#, 1 + note E_, 1 + note D#, 1 + note D_, 1 + sound_loop 8, .loop4 +.loop5: + note C_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + sound_loop 8, .loop5 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note C_, 1 + rest 5 + octave 3 + note B_, 1 + rest 5 + note A#, 1 + rest 3 + rest 10 + octave 4 + note C_, 2 + rest 2 + note D#, 2 + note C#, 1 + rest 5 + note C_, 1 + rest 5 + octave 3 + note B_, 1 + rest 3 + sound_ret + +Music_KantoWildBattle_Ch2: + duty_cycle 1 + vibrato 18, 2, 3 + note_type 12, 11, 1 + octave 4 + note G_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note D#, 1 + note F_, 1 + note E_, 1 + note D#, 1 + note D_, 1 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 +.mainloop: + note_type 12, 11, 7 + sound_call .sub1 + octave 2 + note F_, 2 + octave 1 + note B_, 1 + rest 1 + octave 2 + note G_, 2 + sound_call .sub1 + octave 2 + note G_, 1 + rest 1 + octave 1 + note B_, 1 + rest 1 + octave 2 + note F_, 1 + note F#, 1 + note_type 6, 11, 7 + sound_call .sub2 + sound_call .sub2 + transpose 0, 1 + sound_call .sub2 + sound_call .sub2 + transpose 0, 0 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + transpose 0, 1 + sound_call .sub2 + sound_call .sub2 + transpose 0, 0 + sound_call .sub2 + sound_call .sub2 + rest 16 + octave 3 + note A#, 16 + octave 4 + note D_, 16 + note F_, 16 + note_type 12, 11, 7 + note E_, 16 + note G_, 8 + octave 5 + note C_, 8 + rest 8 + octave 3 + note G#, 8 + octave 4 + note C_, 8 + note D#, 8 + note F_, 8 + note F_, 1 + octave 3 + note A#, 1 + note G#, 1 + note A#, 1 + octave 4 + note F_, 1 + octave 3 + note A#, 1 + note G#, 1 + note A#, 1 + octave 4 + note G#, 8 + note G#, 1 + note F_, 1 + note D_, 1 + octave 3 + note B_, 1 + octave 4 + note F_, 1 + note D_, 1 + octave 3 + note B_, 1 + note G#, 1 + note_type 6, 11, 7 + sound_call .sub3 + transpose 0, 1 + sound_call .sub3 + transpose 0, 0 + sound_call .sub4 + octave 2 + note C_, 2 + rest 2 + octave 3 + note G_, 4 + octave 2 + note C_, 2 + rest 2 + note C_, 2 + rest 2 + octave 4 + note C_, 4 + octave 2 + note C_, 2 + rest 2 + octave 4 + note D#, 4 + octave 2 + note C_, 2 + rest 2 + octave 4 + note C#, 4 + octave 2 + note C#, 2 + rest 2 + note C#, 2 + rest 2 + octave 4 + note C#, 4 + octave 2 + note C#, 2 + rest 2 + note C#, 2 + rest 2 + octave 4 + note C#, 4 + octave 2 + note C#, 2 + rest 2 + note C#, 2 + rest 2 + octave 4 + note C#, 4 + octave 2 + note C#, 2 + rest 2 + note C#, 2 + rest 2 + octave 4 + note C#, 4 + octave 2 + note C#, 2 + rest 2 + octave 4 + note F_, 4 + octave 2 + note C#, 2 + rest 2 + sound_call .sub4 + sound_call .sub5 + sound_call .sub4 + sound_call .sub5 + transpose 0, 1 + sound_call .sub4 + transpose 0, 0 + note C#, 2 + rest 2 + octave 3 + note G#, 4 + octave 2 + note C#, 2 + rest 2 + note C#, 2 + rest 2 + octave 4 + note C#, 4 + octave 2 + note C#, 2 + rest 2 + octave 3 + note A#, 4 + octave 2 + note C#, 2 + rest 2 + sound_call .sub4 + note C_, 2 + rest 2 + octave 3 + note G_, 4 + octave 2 + note C_, 2 + rest 2 + note C_, 2 + rest 2 + octave 4 + note C_, 4 + octave 2 + note C_, 2 + rest 2 + octave 3 + note A#, 4 + octave 2 + note C_, 2 + rest 2 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note C_, 1 + rest 2 + note C_, 1 + octave 1 + note G_, 1 + rest 1 + octave 2 + note C_, 1 + rest 1 + octave 3 + note C_, 2 + octave 2 + note C_, 1 + rest 1 + octave 1 + note G_, 1 + rest 2 + note G_, 1 + octave 2 + note C_, 3 + note C_, 1 + octave 1 + note G_, 2 + octave 2 + note C_, 2 + octave 1 + note G_, 2 + octave 2 + note F#, 2 + octave 1 + note G_, 2 + octave 2 + note G_, 2 + note C#, 1 + rest 2 + note C#, 1 + octave 1 + note G#, 1 + rest 1 + octave 2 + note C#, 1 + rest 1 + octave 3 + note C#, 1 + rest 1 + octave 2 + note C#, 2 + octave 1 + note G#, 1 + rest 2 + note G#, 1 + octave 2 + note C#, 1 + rest 2 + note C#, 1 + octave 1 + note G#, 1 + rest 1 + octave 2 + note C#, 1 + rest 1 + octave 1 + note G_, 2 + sound_ret + +.sub2: + octave 2 + note C_, 2 + rest 4 + note C_, 1 + rest 1 + note C_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 4 + rest 2 + note C_, 2 + rest 2 + note C_, 2 + octave 3 + note C_, 2 + rest 2 + octave 2 + note C_, 4 + sound_ret + +.sub3: + octave 2 + note C_, 2 + rest 4 + note C_, 2 + rest 4 + octave 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + octave 2 + note E_, 2 + rest 2 + note E_, 2 + rest 2 + note E_, 2 + note C_, 6 + note C_, 2 + rest 4 + note C_, 2 + octave 1 + note G_, 2 + octave 2 + note E_, 2 + note C_, 2 + octave 1 + note G_, 2 + octave 2 + note C_, 2 + rest 4 + note C_, 2 + note E_, 2 + note G_, 2 + note B_, 2 + octave 3 + note C_, 2 + sound_ret + +.sub4: + octave 3 + note G_, 4 + octave 2 + note C_, 2 + rest 2 + note C_, 2 + rest 2 + octave 3 + note G_, 4 + octave 2 + note C_, 2 + rest 2 + note C_, 2 + rest 2 + octave 3 + note G_, 4 + octave 2 + note C_, 2 + rest 2 + sound_ret + +.sub5: + note C_, 2 + rest 2 + octave 3 + note G_, 4 + octave 2 + note C_, 2 + rest 2 + note C_, 2 + rest 2 + octave 3 + note G_, 4 + octave 2 + note C_, 2 + rest 2 + octave 3 + note G_, 4 + octave 2 + note C_, 2 + rest 2 + sound_ret + +Music_KantoWildBattle_Ch3: + vibrato 20, 2, 3 + note_type 12, 1, 4 + octave 3 + note C_, 1 + rest 1 + note C_, 1 + octave 4 + note C_, 1 + octave 3 + note C#, 1 + rest 1 + note C#, 1 + octave 4 + note C#, 1 + octave 3 + note D_, 1 + rest 1 + note D_, 1 + octave 4 + note D_, 1 + octave 3 + note D#, 1 + rest 1 + note D#, 1 + octave 4 + note D#, 1 + octave 3 + note E_, 1 + rest 1 + note E_, 1 + octave 4 + note E_, 1 + octave 3 + note F_, 1 + rest 1 + note F_, 1 + octave 4 + note F_, 1 + octave 3 + note F#, 1 + rest 1 + note F#, 1 + octave 4 + note F#, 1 + octave 3 + note G_, 1 + rest 1 + note G_, 1 + octave 4 + note G_, 1 +.mainloop: + note_type 12, 1, 4 + octave 5 + note G_, 1 + rest 2 + octave 4 + note G_, 1 + rest 2 + octave 5 + note G_, 1 + rest 3 + octave 4 + note G_, 1 + rest 1 + octave 5 + note G_, 1 + rest 2 + octave 4 + note G_, 1 + octave 3 + note G_, 1 + note B_, 1 + octave 4 + note C_, 1 + note D_, 1 + note D#, 6 + octave 5 + note D#, 2 + rest 2 + note G_, 2 + note G#, 1 + rest 2 + octave 4 + note G#, 1 + rest 2 + octave 5 + note G#, 1 + rest 3 + octave 4 + note G#, 1 + rest 1 + octave 5 + note G#, 1 + rest 2 + octave 4 + note G#, 1 + octave 6 + note C#, 6 + octave 5 + note G#, 1 + note F_, 1 + note B_, 1 + note G_, 1 + note F_, 1 + note D_, 1 + note G_, 1 + note F_, 1 + note D_, 1 + octave 4 + note B_, 1 + octave 5 + note G_, 1 + rest 2 + octave 4 + note G_, 1 + rest 2 + octave 5 + note G_, 1 + rest 3 + octave 4 + note G_, 1 + rest 1 + octave 5 + note G_, 1 + rest 2 + octave 4 + note G_, 1 + note C_, 1 + note D_, 1 + note D#, 1 + note F_, 1 + note G_, 6 + octave 5 + note D#, 2 + rest 2 + note G_, 2 + note G#, 1 + rest 2 + octave 4 + note G_, 1 + rest 2 + octave 5 + note G#, 1 + rest 3 + octave 4 + note G_, 1 + rest 1 + octave 5 + note G#, 1 + rest 2 + octave 4 + note G_, 1 + note C#, 4 + note G#, 4 + octave 5 + note F_, 7 + note F#, 1 + note G_, 2 + volume_envelope 2, 4 + note C_, 1 + octave 4 + note G_, 1 + octave 5 + note C_, 1 + octave 4 + note G_, 1 + volume_envelope 1, 4 + octave 5 + note F#, 2 + volume_envelope 2, 4 + note C_, 1 + octave 4 + note G_, 1 + octave 5 + note C_, 1 + octave 4 + note G_, 1 + volume_envelope 1, 4 + octave 5 + note E_, 2 + volume_envelope 2, 4 + note C_, 1 + octave 4 + note G_, 1 + volume_envelope 1, 4 + octave 5 + note G_, 2 + volume_envelope 2, 4 + note C_, 1 + octave 4 + note G_, 1 + octave 5 + note C_, 1 + octave 4 + note G_, 1 + volume_envelope 1, 4 + octave 5 + note A_, 2 + volume_envelope 2, 4 + note C_, 1 + octave 4 + note G_, 1 + octave 5 + note C_, 1 + octave 4 + note G_, 1 + volume_envelope 1, 4 + octave 5 + note G_, 2 + volume_envelope 2, 4 + note C_, 1 + octave 4 + note G#, 1 + volume_envelope 1, 4 + octave 5 + note G#, 12 + note G_, 2 + note F_, 2 + note G#, 2 + note G_, 2 + note C#, 1 + note F_, 1 + note G#, 1 + octave 6 + note C_, 1 + note C#, 8 + octave 5 + note C_, 2 + volume_envelope 2, 4 + octave 4 + note E_, 1 + note G_, 1 + note E_, 1 + note G_, 1 + volume_envelope 1, 4 + note A#, 2 + volume_envelope 2, 4 + note E_, 1 + note G_, 1 + note E_, 1 + note G_, 1 + volume_envelope 1, 4 + note G#, 2 + volume_envelope 2, 4 + note E_, 1 + note G_, 1 + volume_envelope 1, 4 + octave 5 + note C#, 2 + volume_envelope 2, 4 + octave 4 + note E_, 1 + note G_, 1 + note E_, 1 + note G_, 1 + volume_envelope 1, 4 + octave 5 + note C_, 2 + volume_envelope 2, 4 + octave 4 + note E_, 1 + note G_, 1 + note E_, 1 + note G_, 1 + volume_envelope 1, 4 + note A#, 2 + volume_envelope 2, 4 + note E_, 1 + note G_, 1 + volume_envelope 1, 4 + octave 5 + note F_, 2 + volume_envelope 2, 4 + octave 4 + note G_, 1 + octave 5 + note C_, 1 + octave 4 + note G_, 1 + octave 5 + note C_, 1 + volume_envelope 1, 4 + note E_, 2 + volume_envelope 2, 4 + octave 4 + note G_, 1 + octave 5 + note C_, 1 + octave 4 + note G_, 1 + octave 5 + note C_, 1 + volume_envelope 1, 4 + note D_, 2 + volume_envelope 2, 4 + octave 4 + note G_, 1 + octave 5 + note C_, 1 + volume_envelope 1, 4 + octave 4 + note A#, 4 + octave 5 + note C_, 4 + note D_, 4 + note F_, 4 + note G#, 16 + note_type 6, 1, 4 + note G#, 1 + rest 1 + volume_envelope 2, 4 + note G#, 1 + rest 1 + volume_envelope 3, 4 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + volume_envelope 2, 4 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + volume_envelope 1, 4 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + octave 6 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + octave 5 + note G_, 2 + note F_, 2 + note E_, 2 + note F_, 2 + note_type 12, 1, 5 + note G_, 12 + note G_, 8 + note_type 6, 1, 5 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + volume_envelope 2, 4 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + volume_envelope 1, 4 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note_type 12, 1, 4 + octave 2 + note A#, 16 + note A#, 1 + rest 2 + note A#, 1 + rest 2 + note A#, 1 + rest 1 + octave 3 + note A#, 1 + rest 2 + note A#, 1 + rest 2 + note A#, 1 + rest 1 + note C_, 1 + rest 2 + note_type 6, 1, 5 + note C_, 1 + rest 1 + note C_, 2 + octave 4 + note C_, 2 + octave 3 + note C_, 4 + rest 2 + note C_, 2 + rest 2 + note C_, 2 + octave 4 + note C_, 2 + rest 2 + octave 3 + note C_, 4 + note C_, 2 + rest 4 + note C_, 1 + rest 1 + note C_, 2 + octave 4 + note C_, 2 + octave 3 + note C_, 4 + rest 2 + note C_, 2 + rest 2 + note C_, 2 + octave 2 + note A#, 2 + rest 2 + note A#, 2 + rest 2 + note_type 12, 1, 4 + note G#, 16 + note G#, 16 + note A#, 2 + rest 2 + note A#, 1 + rest 3 + note A#, 1 + rest 1 + octave 3 + note A#, 1 + rest 1 + octave 2 + note A#, 1 + rest 1 + octave 3 + note A#, 1 + rest 1 + note D_, 2 + rest 2 + note D_, 1 + rest 3 + note D_, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + octave 2 + note B_, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 5 + note E_, 4 + octave 4 + note C_, 1 + note E_, 1 + note G_, 1 + note B_, 1 + octave 5 + note C_, 1 + rest 1 + note E_, 1 + rest 5 + note F_, 2 + note E_, 1 + rest 1 + octave 4 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + note E_, 1 + note G_, 1 + note E_, 1 + note C_, 1 + note E_, 1 + note G_, 1 + octave 5 + note C_, 1 + note E_, 1 + note G_, 1 + note F_, 4 + octave 4 + note C#, 1 + note F_, 1 + note G#, 1 + octave 5 + note C_, 1 + note C#, 1 + rest 1 + note F_, 1 + rest 5 + note G#, 2 + note G_, 1 + rest 5 + note F_, 8 + volume_envelope 1, 3 + note G_, 6 + note F#, 6 + note E_, 2 + rest 2 + note G_, 6 + note A_, 6 + note G_, 2 + rest 2 + note G#, 12 + note G_, 2 + note F_, 2 + note G#, 2 + note G_, 2 + rest 4 + octave 6 + note C#, 8 + octave 5 + note C_, 6 + octave 4 + note A#, 6 + note G#, 2 + rest 2 + octave 5 + note C#, 6 + note C_, 6 + octave 4 + note A#, 2 + rest 2 + octave 5 + note F_, 6 + note E_, 6 + note D_, 2 + rest 2 + octave 4 + note A#, 4 + octave 5 + note C_, 4 + note D_, 4 + note F_, 4 + note G#, 16 + note G#, 16 + note G_, 16 + note G_, 16 + sound_loop 0, .mainloop diff --git a/audio/music/lakeofrage.asm b/audio/music/lakeofrage.asm new file mode 100644 index 0000000..dbc121c --- /dev/null +++ b/audio/music/lakeofrage.asm @@ -0,0 +1,323 @@ +Music_LakeOfRage: + channel_count 4 + channel 1, Music_LakeOfRage_Ch1 + channel 2, Music_LakeOfRage_Ch2 + channel 3, Music_LakeOfRage_Ch3 + channel 4, Music_LakeOfRage_Ch4 + +Music_LakeOfRage_Ch1: + tempo 144 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 8, 2, 2 + stereo_panning TRUE, FALSE + note_type 12, 11, 4 + octave 3 + note D_, 6 + note D_, 10 + note D_, 6 + note D_, 6 + note E_, 4 +.mainloop: + volume_envelope 11, 5 + note F#, 6 + note E_, 6 + note D_, 4 + octave 4 + note D_, 6 + note C_, 4 + note E_, 2 + note D_, 4 + octave 3 + note B_, 6 + note G_, 2 + note_type 8, 11, 5 + note D_, 4 + note G_, 4 + note B_, 4 + note_type 12, 11, 4 + note D_, 3 + note F#, 1 + volume_envelope 11, 7 + note A_, 8 + note F#, 4 + note A_, 3 + octave 4 + note C#, 1 + note D_, 12 + note_type 8, 11, 4 + octave 3 + note C_, 4 + octave 2 + note B_, 4 + note A_, 4 + note_type 8, 11, 7 + note A_, 12 + note_type 12, 11, 7 + octave 3 + note C_, 12 + volume_envelope 11, 4 + note E_, 4 + note D_, 2 + volume_envelope 11, 7 + octave 2 + note A_, 10 + volume_envelope 11, 4 + octave 3 + note E_, 4 + note D_, 3 + note E_, 1 + volume_envelope 11, 7 + note F#, 8 + note D_, 6 + note C_, 1 + note E_, 1 + note C_, 8 + note E_, 6 + note E_, 1 + note G_, 1 + note E_, 8 + note G_, 6 + note F#, 1 + note G_, 1 + volume_envelope 10, 0 + note A_, 7 + volume_envelope 10, 7 + note A_, 7 + note A_, 1 + octave 4 + note C_, 1 + volume_envelope 10, 0 + note D_, 6 + volume_envelope 10, 7 + note D_, 6 + sound_loop 0, .mainloop + +Music_LakeOfRage_Ch2: + duty_cycle 3 + vibrato 32, 4, 4 + stereo_panning TRUE, TRUE + note_type 12, 9, 0 + octave 3 + note G_, 8 + volume_envelope 9, 7 + note G_, 8 + volume_envelope 10, 0 + note A_, 8 + volume_envelope 10, 7 + note A_, 8 +.mainloop: + note_type 8, 12, 7 + octave 4 + note D_, 16 + octave 3 + note A_, 4 + octave 4 + note D_, 4 + note A_, 16 + octave 5 + note C_, 4 + octave 4 + note B_, 4 + note_type 12, 12, 7 + note G_, 12 + note B_, 4 + note A_, 3 + note G_, 1 + volume_envelope 11, 0 + note F#, 12 + volume_envelope 11, 7 + note F#, 16 + note_type 8, 12, 3 + octave 3 + note G_, 4 + note F#, 4 + note E_, 4 + note C_, 15 + note_type 12, 12, 3 + octave 4 + note C_, 1 + note E_, 1 + note G_, 1 + rest 1 + note E_, 1 + note G_, 1 + volume_envelope 12, 5 + octave 5 + note C_, 10 + volume_envelope 12, 3 + octave 4 + note A_, 4 + note G_, 4 + note F#, 4 + note E_, 2 + note_type 8, 12, 3 + note D_, 4 + note E_, 4 + note F#, 4 + note_type 8, 12, 7 + note A_, 12 + note_type 8, 12, 3 + octave 3 + note G_, 4 + note F#, 4 + note E_, 4 + octave 4 + note C_, 4 + octave 3 + note B_, 4 + note A_, 4 + octave 4 + note E_, 4 + note D_, 4 + note C_, 4 + note G_, 4 + note F#, 4 + note E_, 4 + note_type 8, 12, 7 + note F#, 16 + note D_, 4 + note F#, 4 + note_type 12, 12, 7 + note A_, 16 + sound_loop 0, .mainloop + +Music_LakeOfRage_Ch3: + stereo_panning FALSE, TRUE + note_type 12, 1, 6 + octave 3 + note G_, 4 + rest 2 + note G_, 4 + rest 6 + note F#, 4 + rest 2 + note F#, 4 + rest 2 + note E_, 4 +.mainloop: + octave 3 + note D_, 4 + octave 2 + note A_, 2 + octave 3 + note D_, 4 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note E_, 2 + note F_, 4 + note C_, 2 + note F_, 4 + note C_, 2 + note F_, 2 + note F#, 2 + note G_, 4 + note D_, 2 + note G_, 4 + note D_, 2 + note G_, 2 + note B_, 2 + note A_, 2 + note D_, 2 + note F#, 2 + note A_, 4 + note D_, 2 + note E_, 2 + note F#, 2 + note A_, 2 + note F#, 2 + note A_, 2 + octave 4 + note D_, 4 + octave 3 + note A_, 2 + octave 4 + note D_, 2 + note F#, 2 + octave 3 + note E_, 4 + note C_, 2 + note E_, 4 + note C_, 2 + note E_, 2 + note C_, 2 + note G_, 4 + note C_, 2 + note G_, 4 + note C_, 2 + note G_, 2 + note C_, 2 + note F#, 4 + note D_, 2 + note F#, 4 + note D_, 2 + note F#, 2 + note D_, 2 + note A_, 2 + note D_, 2 + note F#, 2 + octave 4 + note D_, 4 + octave 3 + note D_, 2 + note E_, 2 + note F#, 2 + note G_, 4 + note C_, 2 + note G_, 4 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 4 + note C_, 2 + note G_, 4 + note C_, 2 + note G_, 2 + note C_, 2 + note F#, 4 + note D_, 2 + note F#, 4 + note D_, 2 + note F#, 2 + note D_, 2 + note D_, 4 + octave 2 + note A_, 2 + octave 3 + note D_, 4 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + octave 2 + note A_, 2 + sound_loop 0, .mainloop + +Music_LakeOfRage_Ch4: + stereo_panning TRUE, FALSE + toggle_noise 3 + drum_speed 12 +.mainloop: + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 8, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 7, 6 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 8, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 7, 3 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + sound_loop 0, .mainloop diff --git a/audio/music/lakeofragerocketradio.asm b/audio/music/lakeofragerocketradio.asm new file mode 100644 index 0000000..7e34e36 --- /dev/null +++ b/audio/music/lakeofragerocketradio.asm @@ -0,0 +1,36 @@ +Music_LakeOfRageRocketRadio: + channel_count 3 + channel 1, Music_LakeOfRageRocketRadio_Ch1 + channel 2, Music_LakeOfRageRocketRadio_Ch2 + channel 3, Music_LakeOfRageRocketRadio_Ch3 + +Music_LakeOfRageRocketRadio_Ch1: + tempo 160 + volume 7, 7 + duty_cycle 1 + pitch_offset 4376 + vibrato 0, 15, 0 + stereo_panning TRUE, FALSE +.mainloop: + note_type 12, 10, 7 + octave 7 + note G_, 4 + note F#, 4 + note G_, 4 + note F#, 4 + rest 16 + sound_loop 0, .mainloop + +Music_LakeOfRageRocketRadio_Ch2: + duty_cycle 1 + vibrato 19, 14, 8 + note_type 12, 10, 7 + rest 2 + stereo_panning FALSE, TRUE + sound_loop 0, Music_LakeOfRageRocketRadio_Ch1.mainloop + +Music_LakeOfRageRocketRadio_Ch3: + note_type 12, 2, 6 + vibrato 16, 4, 4 + rest 4 + sound_loop 0, Music_LakeOfRageRocketRadio_Ch1.mainloop diff --git a/audio/music/lavendertown.asm b/audio/music/lavendertown.asm new file mode 100644 index 0000000..6311df0 --- /dev/null +++ b/audio/music/lavendertown.asm @@ -0,0 +1,515 @@ +Music_LavenderTown: + channel_count 3 + channel 1, Music_LavenderTown_Ch1 + channel 2, Music_LavenderTown_Ch2 + channel 3, Music_LavenderTown_Ch3 + + db $3 ; unused, leftover from a channel 4 + +Music_LavenderTown_Ch1: + tempo 160 + volume 7, 7 + stereo_panning FALSE, TRUE + vibrato 6, 2, 4 + duty_cycle 0 + note_type 12, 11, 3 + rest 16 + rest 16 + rest 16 + rest 16 +.mainloop: + sound_call .sub1 + volume_envelope 9, 3 + octave 5 + note D_, 2 + volume_envelope 4, 3 + note D_, 2 + volume_envelope 9, 3 + note F#, 2 + volume_envelope 4, 3 + note F#, 2 + volume_envelope 9, 3 + note B_, 2 + volume_envelope 4, 3 + note B_, 2 + volume_envelope 9, 3 + note A_, 2 + volume_envelope 4, 3 + note A_, 2 + sound_call .sub2 + volume_envelope 9, 3 + volume_envelope 9, 3 + note F_, 2 + volume_envelope 8, 3 + note F_, 2 + volume_envelope 9, 3 + note D_, 2 + volume_envelope 4, 3 + note D_, 2 + volume_envelope 9, 3 + octave 4 + note B_, 2 + volume_envelope 4, 3 + note B_, 2 + volume_envelope 9, 3 + note G_, 2 + volume_envelope 4, 3 + note G_, 2 + sound_call .sub1 + volume_envelope 9, 3 + octave 5 + note D_, 2 + volume_envelope 4, 3 + note D_, 2 + volume_envelope 9, 3 + note G_, 2 + volume_envelope 4, 3 + note G_, 2 + volume_envelope 9, 3 + note B_, 2 + volume_envelope 4, 3 + note B_, 2 + volume_envelope 9, 3 + note G_, 2 + volume_envelope 4, 3 + note G_, 2 + sound_call .sub2 + volume_envelope 9, 3 + octave 6 + note C_, 2 + volume_envelope 4, 3 + note C_, 2 + volume_envelope 9, 3 + octave 5 + note G_, 2 + volume_envelope 4, 3 + note G_, 2 + volume_envelope 9, 3 + note E_, 2 + volume_envelope 4, 3 + note E_, 2 + volume_envelope 9, 3 + note C_, 2 + volume_envelope 4, 3 + note C_, 2 + octave 3 + note F_, 2 + note A_, 2 + octave 4 + note C_, 2 + note E_, 2 + note F_, 2 + note C_, 2 + octave 3 + note A_, 2 + note F_, 2 +.loop1: + octave 3 + note C_, 2 + note E_, 2 + note G_, 2 + note B_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note E_, 2 + note C_, 2 + note F_, 2 + note A_, 2 + octave 4 + note C_, 2 + note E_, 2 + note F_, 2 + note C_, 2 + octave 3 + note A_, 2 + note F_, 2 + sound_loop 2, .loop1 + note F#, 2 + note A_, 2 + octave 4 + note C_, 2 + note F#, 2 + note A_, 2 + note C_, 2 + octave 3 + note A_, 2 + note F#, 2 + note G_, 2 + octave 4 + note C_, 2 + note D_, 2 + note F_, 2 + note G_, 2 + note F_, 2 + note D_, 2 + note C_, 2 + octave 3 + note B_, 8 + note B_, 8 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 8, 3 + octave 5 + note C_, 2 + volume_envelope 4, 3 + note C_, 2 + volume_envelope 8, 3 + note G_, 2 + volume_envelope 4, 3 + note G_, 2 + volume_envelope 8, 3 + octave 6 + note C_, 2 + volume_envelope 4, 3 + note C_, 2 + volume_envelope 8, 3 + octave 5 + note G_, 2 + volume_envelope 4, 3 + note G_, 2 + volume_envelope 8, 3 + note D_, 2 + volume_envelope 4, 3 + note D_, 2 + volume_envelope 8, 3 + note A_, 2 + volume_envelope 4, 3 + note A_, 2 + volume_envelope 8, 3 + octave 6 + note D_, 2 + volume_envelope 4, 3 + note D_, 2 + volume_envelope 8, 3 + octave 5 + note A_, 2 + volume_envelope 4, 3 + note A_, 2 + volume_envelope 8, 3 + note E_, 2 + volume_envelope 4, 3 + note E_, 2 + volume_envelope 8, 3 + note B_, 2 + volume_envelope 4, 3 + note B_, 2 + volume_envelope 8, 3 + octave 6 + note E_, 2 + volume_envelope 4, 3 + note E_, 2 + volume_envelope 8, 3 + octave 5 + note B_, 2 + volume_envelope 4, 3 + note B_, 2 + volume_envelope 8, 3 + note C#, 2 + volume_envelope 4, 3 + note C#, 2 + volume_envelope 8, 3 + note G_, 2 + volume_envelope 4, 3 + note G_, 2 + volume_envelope 8, 3 + note A#, 2 + volume_envelope 4, 3 + note A#, 2 + volume_envelope 8, 3 + note G_, 2 + volume_envelope 4, 3 + note G_, 2 + volume_envelope 8, 3 + note C_, 2 + volume_envelope 4, 3 + note C_, 2 + volume_envelope 8, 3 + note F_, 2 + volume_envelope 4, 3 + note F_, 2 + volume_envelope 8, 3 + octave 6 + note C_, 2 + volume_envelope 4, 3 + note C_, 2 + volume_envelope 8, 3 + octave 5 + note F_, 2 + volume_envelope 4, 3 + note F_, 2 + sound_ret + +.sub2: + volume_envelope 9, 3 + octave 5 + note G_, 2 + volume_envelope 8, 3 + note G_, 2 + volume_envelope 8, 3 + note F_, 2 + volume_envelope 4, 3 + note F_, 2 + volume_envelope 8, 3 + note D_, 2 + volume_envelope 4, 3 + note D_, 2 + volume_envelope 8, 3 + note G_, 2 + volume_envelope 4, 3 + note G_, 2 + sound_ret + +Music_LavenderTown_Ch2: + duty_cycle 1 + vibrato 8, 2, 4 + stereo_panning TRUE, TRUE +.loop1: + note_type 12, 10, 3 + octave 5 + note C_, 2 + volume_envelope 6, 3 + note C_, 2 + volume_envelope 10, 3 + note G_, 2 + volume_envelope 6, 3 + note G_, 2 + volume_envelope 10, 3 + note B_, 2 + volume_envelope 6, 3 + note B_, 2 + volume_envelope 10, 3 + note F#, 2 + volume_envelope 6, 3 + note F#, 2 + sound_loop 3, .loop1 + volume_envelope 10, 3 + note C_, 2 + volume_envelope 6, 3 + note C_, 2 + volume_envelope 10, 3 + note G_, 2 + volume_envelope 6, 3 + note G_, 2 + volume_envelope 10, 3 + note B_, 2 + volume_envelope 6, 3 + note B_, 2 + volume_envelope 10, 3 + octave 6 + note D_, 2 + volume_envelope 6, 3 + note D_, 2 +.mainloop: + volume_envelope 11, 5 + sound_call .sub1 + octave 2 + note F#, 4 + octave 3 + note C_, 4 + note F#, 4 + note A_, 4 + octave 2 + note G_, 4 + octave 3 + note C_, 4 + note D_, 4 + note G_, 4 + note F_, 4 + note D_, 4 + octave 2 + note B_, 4 + note G_, 4 + sound_call .sub1 + octave 2 + note G_, 4 + octave 3 + note C_, 4 + note F_, 4 + note G_, 4 + note C_, 4 + note F_, 4 + note G_, 4 + note F_, 4 + note C_, 4 + note E_, 4 + note G_, 4 + octave 4 + note C_, 4 + volume_envelope 11, 7 + octave 2 + note F_, 16 + note C_, 16 + note F_, 16 + note C_, 16 + note F_, 16 + note F#, 16 + note G_, 16 + octave 1 + note G_, 8 + volume_envelope 5, 7 + octave 5 + note D_, 1 + note F_, 1 + note G_, 6 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note C_, 4 + note G_, 4 + octave 3 + note E_, 4 + octave 2 + note G_, 4 + note D_, 4 + note A_, 4 + octave 3 + note F_, 4 + octave 2 + note A_, 4 + note E_, 4 + note B_, 4 + octave 3 + note G_, 4 + note F_, 4 + note E_, 4 + note C#, 4 + octave 2 + note A#, 4 + note G_, 4 + note F_, 4 + octave 3 + note C_, 4 + note A_, 4 + note C_, 4 + sound_ret + +Music_LavenderTown_Ch3: + vibrato 18, 2, 4 + note_type 12, 1, 3 + stereo_panning TRUE, FALSE + rest 16 + rest 16 + rest 16 + rest 8 + octave 5 + note E_, 4 + note F_, 4 +.mainloop: + volume_envelope 1, 2 + octave 5 + note G_, 4 + rest 4 + note G_, 4 + rest 4 + note E_, 4 + rest 4 + note E_, 4 + note F_, 4 + note G_, 4 + note F_, 4 + note E_, 4 + note B_, 4 + note C#, 8 + rest 2 + note C#, 2 + note D_, 2 + note E_, 2 + note F_, 10 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 8 + octave 4 + note A_, 4 + octave 5 + note D_, 4 + note E_, 12 + note F_, 2 + note E_, 2 + note D_, 12 + note E_, 2 + note F_, 2 + note G_, 4 + rest 4 + note G_, 4 + rest 4 + note E_, 4 + rest 4 + note E_, 4 + note F_, 4 + note G_, 4 + note F_, 4 + note E_, 4 + note B_, 4 + note C#, 8 + rest 2 + note C#, 2 + note D_, 2 + note E_, 2 + note F_, 10 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 12 + note C_, 2 + note D_, 2 + note C_, 16 + note C_, 12 + rest 4 + volume_envelope 2, 4 + note A_, 2 + note G_, 2 + note A_, 2 + note B_, 2 + octave 6 + note C_, 4 + octave 5 + note G_, 4 + note F_, 4 + note E_, 4 + note D_, 4 + note C_, 4 + note A_, 2 + note G_, 2 + note A_, 2 + note B_, 2 + octave 6 + note C_, 4 + octave 5 + note G_, 4 + octave 6 + note F_, 4 + note_type 8, 2, 4 + note E_, 2 + note F_, 2 + note E_, 2 + note_type 12, 2, 4 + note D_, 4 + note C_, 4 + octave 5 + note A_, 2 + note G_, 2 + note A_, 2 + note B_, 2 + octave 6 + note C_, 4 + octave 5 + note G_, 4 + note A_, 2 + note G_, 2 + note A_, 2 + note B_, 2 + octave 6 + note C_, 4 + note C#, 4 + note D_, 12 + note C_, 4 + octave 5 + note B_, 12 + note E_, 2 + note F_, 2 + sound_loop 0, .mainloop diff --git a/audio/music/lighthouse.asm b/audio/music/lighthouse.asm new file mode 100644 index 0000000..6e2a28a --- /dev/null +++ b/audio/music/lighthouse.asm @@ -0,0 +1,310 @@ +Music_Lighthouse: + channel_count 4 + channel 1, Music_Lighthouse_Ch1 + channel 2, Music_Lighthouse_Ch2 + channel 3, Music_Lighthouse_Ch3 + channel 4, Music_Lighthouse_Ch4 + +Music_Lighthouse_Ch1: + tempo 144 + volume 7, 7 + duty_cycle 3 + pitch_offset 4 + vibrato 8, 4, 5 + stereo_panning FALSE, TRUE +.mainloop: + note_type 12, 11, 3 + octave 3 + note C#, 8 + octave 2 + note F#, 2 + note G#, 2 + note A_, 2 + note B_, 2 + octave 3 + note C#, 4 + octave 2 + note B_, 4 + note A_, 4 + note B_, 4 + note G#, 1 + rest 7 + octave 3 + note C_, 4 + octave 2 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note C_, 2 + note D#, 1 + rest 1 + note F#, 1 + rest 1 + note G#, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + octave 3 + note C#, 8 + octave 2 + note C#, 2 + note F#, 2 + note G#, 2 + octave 3 + note C_, 2 + note D_, 2 + note C#, 2 + octave 2 + note A_, 2 + note G#, 2 + note A_, 2 + note G#, 2 + note F#, 2 + note A_, 2 + note G#, 1 + rest 7 + octave 3 + note C_, 12 + octave 2 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note G#, 1 + rest 3 + octave 3 + note C_, 1 + rest 3 + octave 2 + note A_, 4 + octave 3 + note A_, 4 + note G#, 4 + note F#, 4 + note E_, 4 + note D#, 4 + note C#, 4 + note E_, 4 + note F#, 2 + note E_, 2 + note D#, 12 + octave 2 + note B_, 2 + note A_, 2 + note B_, 2 + note A_, 2 + note G#, 8 + note A_, 4 + octave 3 + note A_, 4 + note G#, 2 + note F#, 2 + note E_, 2 + note F#, 2 + note E_, 2 + note D#, 2 + note C#, 2 + octave 2 + note B_, 2 + note A_, 2 + note B_, 2 + octave 3 + note C#, 2 + note D#, 2 + note E_, 2 + note F#, 2 + note G#, 12 + octave 2 + note B_, 2 + note A_, 2 + note B_, 2 + note A_, 2 + note G#, 8 + sound_loop 0, .mainloop + +Music_Lighthouse_Ch2: + duty_cycle 3 + pitch_offset 2 + vibrato 16, 4, 5 +.mainloop: + note_type 12, 12, 5 + octave 3 + note G#, 12 + note F#, 2 + note G#, 2 + note A_, 8 + octave 4 + note C#, 8 + note C_, 1 + rest 7 + octave 3 + note G#, 16 + volume_envelope 12, 5 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + note G#, 12 + note F#, 2 + note G#, 2 + note A_, 8 + octave 4 + note C#, 8 + note C_, 1 + rest 7 + note D#, 12 + octave 3 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note D#, 1 + rest 3 + note D#, 1 + rest 3 + octave 4 + note E_, 12 + note D#, 2 + note C#, 2 + octave 3 + note G#, 12 + note A#, 4 + note B_, 2 + octave 4 + note C#, 2 + note D#, 12 + octave 3 + note D#, 2 + note C#, 2 + note D#, 2 + note C#, 2 + note C_, 8 + octave 4 + note E_, 12 + note D#, 2 + note C#, 2 + octave 3 + note G#, 12 + octave 4 + note C_, 4 + octave 3 + note B_, 2 + octave 4 + note C_, 2 + note D#, 12 + octave 3 + note D#, 2 + note C#, 2 + note D#, 2 + note C#, 2 + note C_, 8 + sound_loop 0, .mainloop + +Music_Lighthouse_Ch3: + note_type 12, 1, 9 + stereo_panning TRUE, FALSE +.mainloop: + octave 2 + note G#, 2 + rest 2 + note D#, 2 + rest 2 + note F#, 2 + rest 2 + note G_, 2 + rest 2 +.loop1: + note G#, 2 + rest 2 + note D#, 2 + rest 2 + note F#, 2 + rest 2 + note A_, 2 + rest 2 + sound_loop 2, .loop1 + note G#, 2 + rest 2 + note D#, 2 + rest 2 + note F#, 2 + rest 2 + note A_, 2 + octave 3 + note C_, 2 + note C#, 2 + rest 2 + octave 2 + note G#, 2 + rest 2 + note A_, 2 + rest 2 + octave 3 + note C_, 2 + rest 2 +.loop2: + note C#, 2 + rest 2 + octave 2 + note G#, 2 + rest 2 + note A_, 2 + rest 2 + octave 3 + note D_, 2 + rest 2 + sound_loop 2, .loop2 + note C#, 2 + rest 2 + octave 2 + note G#, 2 + rest 2 + note A_, 2 + rest 2 + octave 3 + note D#, 2 + note F#, 2 +.loop3: + note E_, 2 + rest 2 + octave 2 + note B_, 2 + rest 2 + octave 3 + note C_, 2 + rest 2 + note F_, 2 + rest 2 + sound_loop 8, .loop3 + sound_loop 0, .mainloop + +Music_Lighthouse_Ch4: + toggle_noise 0 + drum_speed 12 +.mainloop: + stereo_panning FALSE, TRUE + drum_note 9, 4 + drum_note 6, 2 + drum_note 9, 4 + drum_note 6, 2 + drum_note 10, 2 + drum_note 11, 2 + stereo_panning TRUE, TRUE + drum_note 9, 2 + drum_note 6, 4 + drum_note 9, 2 + drum_note 6, 4 + drum_note 9, 2 + drum_note 10, 2 + sound_loop 0, .mainloop diff --git a/audio/music/lookbeauty.asm b/audio/music/lookbeauty.asm new file mode 100644 index 0000000..c710d7c --- /dev/null +++ b/audio/music/lookbeauty.asm @@ -0,0 +1,326 @@ +Music_LookBeauty: + channel_count 4 + channel 1, Music_LookBeauty_Ch1 + channel 2, Music_LookBeauty_Ch2 + channel 3, Music_LookBeauty_Ch3 + channel 4, Music_LookBeauty_Ch4 + +Music_LookBeauty_Ch1: + stereo_panning FALSE, TRUE + vibrato 18, 2, 5 + duty_cycle 2 + tempo 128 + volume 7, 7 + note_type 12, 10, 3 + rest 16 + rest 8 + octave 4 + note C_, 8 + duty_cycle 3 +.mainloop: + rest 4 + octave 3 + note D_, 1 + rest 5 + note D_, 1 + rest 5 + rest 2 + note D_, 1 + rest 3 + note D_, 1 + rest 5 + note D_, 4 + rest 4 + note D_, 1 + rest 5 + note D_, 1 + rest 5 + rest 2 + note D_, 1 + rest 3 + note D_, 1 + rest 3 + note D_, 2 + rest 2 + note D_, 2 + rest 4 + note E_, 1 + rest 5 + note E_, 1 + rest 5 + rest 2 + note E_, 1 + rest 3 + note E_, 1 + rest 1 + note E_, 1 + rest 3 + note E_, 4 + rest 4 + note F#, 1 + rest 5 + note F#, 1 + rest 3 + note D_, 2 + note D_, 1 + rest 7 + octave 2 + note A_, 1 + octave 3 + note C_, 1 + note D#, 1 + note F#, 1 + note D#, 1 + note F#, 1 + note A_, 1 + octave 4 + note C_, 1 + sound_loop 0, .mainloop + +Music_LookBeauty_Ch2: + stereo_panning TRUE, FALSE + vibrato 16, 2, 3 + duty_cycle 2 + note_type 12, 12, 7 + octave 3 + note D_, 1 + rest 1 + octave 5 + note D_, 6 + note C_, 1 + rest 1 + octave 4 + note B_, 1 + rest 1 + note A#, 1 + rest 1 + note A_, 1 + rest 1 + note G#, 1 + rest 1 + note G_, 1 + rest 1 + note F#, 1 + rest 1 + note F_, 1 + rest 1 + note E_, 2 + note D_, 1 + rest 1 + note E_, 1 + rest 1 + note F#, 1 + rest 1 + duty_cycle 3 +.mainloop: + note_type 12, 12, 7 + note G_, 16 + note A_, 8 + note B_, 8 + note A_, 10 + note G#, 1 + rest 1 + note A_, 1 + rest 1 + note G#, 2 + note G#, 8 + rest 2 + note F_, 2 + rest 2 + note E_, 2 + volume_envelope 11, 7 + vibrato 16, 2, 4 + octave 5 + note C_, 15 + note_type 6, 12, 7 + volume_envelope 12, 5 + vibrato 16, 2, 3 + rest 1 + note C#, 1 + note D_, 16 + note C_, 16 + octave 4 + note B_, 16 + rest 4 + octave 5 + note D_, 2 + rest 2 + octave 4 + note B_, 2 + rest 2 + note A_, 6 + rest 14 + note F#, 8 + note A_, 8 + sound_loop 0, .mainloop + +Music_LookBeauty_Ch3: + stereo_panning TRUE, TRUE + vibrato 8, 1, 2 + note_type 12, 1, 5 + rest 16 + octave 5 + note E_, 1 + rest 1 + note D#, 1 + rest 1 + note D_, 1 + rest 1 + note C#, 1 + rest 1 + octave 3 + note D_, 7 + note F#, 1 +.mainloop: + note G_, 4 + octave 4 + note B_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + note D_, 1 + rest 1 + octave 4 + note B_, 1 + rest 1 + octave 3 + note D_, 1 + rest 1 + note G_, 2 + note G_, 1 + octave 4 + note A#, 1 + note B_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 4 + note B_, 1 + rest 1 + octave 3 + note D_, 1 + rest 3 + octave 4 + note B_, 4 + octave 3 + note E_, 4 + octave 4 + note B_, 1 + rest 1 + octave 3 + note E_, 1 + rest 1 + octave 2 + note B_, 1 + rest 1 + octave 4 + note A_, 1 + rest 1 + octave 2 + note B_, 1 + rest 1 + octave 3 + note E_, 2 + note E_, 1 + octave 4 + note G_, 1 + note G#, 1 + rest 1 + octave 3 + note E_, 1 + rest 1 + octave 4 + note F#, 1 + rest 3 + note G#, 2 + rest 2 + note B_, 2 + octave 3 + note A_, 4 + octave 5 + note C_, 1 + rest 1 + octave 3 + note A_, 1 + rest 1 + note E_, 1 + rest 1 + octave 5 + note C_, 1 + rest 1 + octave 3 + note E_, 1 + rest 1 + note A_, 2 + note A_, 1 + octave 4 + note B_, 1 + octave 5 + note C_, 1 + rest 1 + octave 3 + note A_, 1 + rest 1 + octave 5 + note C_, 1 + rest 1 + note D_, 1 + rest 3 + note C_, 4 + octave 3 + note D_, 4 + octave 4 + note B_, 1 + rest 1 + octave 3 + note D_, 1 + rest 1 + octave 2 + note A_, 1 + rest 1 + octave 4 + note A_, 1 + rest 1 + octave 2 + note A_, 1 + rest 1 + octave 4 + note A_, 2 + note A_, 1 + rest 7 + octave 3 + note D_, 8 + sound_loop 0, .mainloop + +Music_LookBeauty_Ch4: + toggle_noise 3 + drum_speed 12 + rest 16 + rest 16 +.mainloop: + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_loop 0, .mainloop + +.sub1: + drum_note 7, 2 + drum_note 8, 2 + drum_note 3, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 3, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 8, 2 + drum_note 3, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 3, 2 + drum_note 8, 2 + sound_ret diff --git a/audio/music/lookhiker.asm b/audio/music/lookhiker.asm new file mode 100644 index 0000000..913aece --- /dev/null +++ b/audio/music/lookhiker.asm @@ -0,0 +1,115 @@ +Music_LookHiker: + channel_count 4 + channel 1, Music_LookHiker_Ch1 + channel 2, Music_LookHiker_Ch2 + channel 3, Music_LookHiker_Ch3 + channel 4, Music_LookHiker_Ch4 + +Music_LookHiker_Ch1: + tempo 132 + volume 7, 7 + pitch_offset 1 + vibrato 18, 2, 4 + duty_cycle 2 + stereo_panning FALSE, TRUE + note_type 12, 6, 8 + octave 3 + note F#, 2 + note F_, 2 + note F#, 8 +.mainloop: + note D_, 2 + note D#, 2 + note E_, 2 + note F_, 2 + note F#, 2 + rest 4 + note F#, 2 + rest 4 + note F#, 2 + rest 2 + note F#, 2 + rest 6 + sound_loop 0, .mainloop + +Music_LookHiker_Ch2: + duty_cycle 0 + note_type 12, 10, 1 + rest 4 + octave 1 + note B_, 1 + note B_, 5 + octave 2 + note F#, 1 + note F#, 5 + octave 1 + note B_, 1 + octave 2 + note D_, 1 + note F#, 1 + note D_, 1 + volume_envelope 10, 1 +.mainloop: + octave 1 + note B_, 1 + note B_, 2 + octave 2 + note D_, 1 + note D_, 2 + note F#, 1 + note F#, 2 + note A#, 1 + note A#, 2 + octave 1 + note B_, 1 + octave 2 + note D_, 1 + note F#, 1 + note D_, 1 + sound_loop 0, .mainloop + +Music_LookHiker_Ch3: + vibrato 18, 2, 4 + stereo_panning TRUE, FALSE + note_type 12, 1, 4 + octave 4 + note B_, 2 + note A#, 2 + note B_, 8 +.mainloop: + octave 5 + note D#, 2 + note D_, 2 + note C#, 2 + note C_, 2 + sound_call .sub1 + note G_, 2 + note G#, 2 + note A_, 2 + note A#, 2 + sound_call .sub1 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note B_, 2 + rest 4 + note B_, 2 + rest 4 + note B_, 2 + rest 2 + note B_, 2 + rest 6 + sound_ret + +Music_LookHiker_Ch4: + toggle_noise 3 + drum_speed 12 + drum_note 6, 4 + rest 16 +.mainloop: + drum_note 4, 2 + drum_note 8, 2 + drum_note 3, 2 + drum_note 8, 2 + sound_loop 0, .mainloop diff --git a/audio/music/lookkimonogirl.asm b/audio/music/lookkimonogirl.asm new file mode 100644 index 0000000..055f7a1 --- /dev/null +++ b/audio/music/lookkimonogirl.asm @@ -0,0 +1,266 @@ +Music_LookKimonoGirl: + channel_count 3 + channel 1, Music_LookKimonoGirl_Ch1 + channel 2, Music_LookKimonoGirl_Ch2 + channel 3, Music_LookKimonoGirl_Ch3 + + db $3 ; unused, leftover from a channel 4 + +Music_LookKimonoGirl_Ch1: + tempo 160 + volume 7, 7 + stereo_panning FALSE, TRUE + duty_cycle 1 + note_type 6, 8, 7 + pitch_offset 1 + sound_call Music_LookKimonoGirl_Ch2.sub2 + pitch_offset 0 +.mainloop: + note_type 12, 11, 2 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub2 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + volume_envelope 11, 4 + octave 3 + note E_, 1 + volume_envelope 5, 4 + octave 4 + note E_, 1 + volume_envelope 11, 4 + octave 3 + note D_, 1 + volume_envelope 5, 4 + octave 4 + note D_, 1 + volume_envelope 11, 4 + octave 2 + note B_, 1 + volume_envelope 5, 4 + octave 3 + note B_, 1 + volume_envelope 11, 4 + octave 2 + note A_, 1 + volume_envelope 5, 4 + octave 3 + note A_, 1 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 11, 4 + octave 2 + note F_, 1 + volume_envelope 7, 4 + octave 3 + note F_, 1 + volume_envelope 11, 4 + octave 2 + note A_, 1 + volume_envelope 7, 4 + octave 3 + note A_, 1 + volume_envelope 11, 4 + octave 2 + note B_, 1 + volume_envelope 7, 4 + octave 3 + note B_, 1 + volume_envelope 11, 4 + octave 3 + note D_, 1 + volume_envelope 7, 4 + octave 4 + note D_, 1 + sound_ret + +.sub2: + volume_envelope 11, 4 + octave 2 + note E_, 1 + volume_envelope 7, 4 + octave 3 + note E_, 1 + volume_envelope 11, 4 + octave 2 + note A_, 1 + volume_envelope 7, 4 + octave 3 + note A_, 1 + volume_envelope 11, 4 + octave 2 + note B_, 1 + volume_envelope 7, 4 + octave 3 + note B_, 1 + volume_envelope 11, 4 + octave 3 + note D_, 1 + volume_envelope 7, 4 + octave 4 + note D_, 1 + sound_ret + +Music_LookKimonoGirl_Ch2: + duty_cycle 0 + note_type 6, 10, 7 + stereo_panning TRUE, FALSE + sound_call .sub2 +.mainloop: + duty_cycle 3 + note_type 12, 9, 1 + octave 5 + note E_, 1 + note D_, 1 + octave 4 + note B_, 1 + note A_, 1 + note B_, 1 + note A_, 1 + note E_, 1 + note D_, 1 + note E_, 1 + note D_, 1 + octave 3 + note B_, 1 + note A_, 1 + note B_, 1 + note A_, 1 + note E_, 1 + note D_, 1 + sound_call .sub1 + octave 5 + note F_, 1 + note D_, 1 + octave 4 + note B_, 1 + note A_, 1 + note B_, 1 + note A_, 1 + note F_, 1 + note D_, 1 + note F_, 1 + note D_, 1 + octave 3 + note B_, 1 + note A_, 1 + note B_, 1 + note A_, 1 + note E_, 1 + note D_, 1 + sound_call .sub1 + sound_loop 0, .mainloop + +.sub1: + octave 5 + note B_, 1 + note A_, 1 + note E_, 1 + note D_, 1 + note E_, 1 + note D_, 1 + octave 4 + note B_, 1 + note A_, 1 + note B_, 1 + note A_, 1 + note E_, 1 + note D_, 1 + note E_, 1 + note D_, 1 + octave 3 + note B_, 1 + note E_, 1 + sound_ret + +.sub2: + octave 4 + note E_, 1 + octave 5 + note E_, 16 + rest 1 + note E_, 2 + rest 3 + volume_envelope 11, 7 + note E_, 2 + rest 2 + volume_envelope 11, 7 + note E_, 2 + rest 1 + volume_envelope 10, 7 + note E_, 2 + rest 1 + note_type 6, 6, 5 + note E_, 2 + rest 1 + volume_envelope 5, 4 + note E_, 2 + rest 1 + volume_envelope 6, 3 + note E_, 2 + note E_, 2 + volume_envelope 9, 1 + note E_, 2 + volume_envelope 10, 1 + note E_, 1 + note_type 8, 11, 1 + note E_, 1 + note E_, 1 + sound_ret + +Music_LookKimonoGirl_Ch3: + stereo_panning TRUE, TRUE + vibrato 18, 2, 4 + note_type 6, 1, 3 + rest 1 + rest 16 + octave 5 + note E_, 1 + note F_, 1 + note E_, 2 + note_type 12, 1, 3 + note E_, 12 + note_type 6, 1, 3 + octave 5 + note D_, 2 + note E_, 2 +.mainloop: + octave 5 + note D_, 4 + note E_, 4 + note F_, 4 + note A_, 4 + note B_, 4 + note A_, 4 + note B_, 4 + octave 6 + note D_, 4 + note E_, 8 + note F_, 1 + note F#, 1 + note F_, 2 + note D_, 4 + note E_, 8 + note D_, 4 + note E_, 4 + note F_, 8 + note A_, 8 + note B_, 1 + octave 7 + note C_, 1 + octave 6 + note B_, 2 + note A_, 4 + note F_, 4 + note D_, 4 + note E_, 1 + note F_, 1 + note E_, 10 + note F_, 2 + note E_, 2 + note D_, 8 + note E_, 8 + sound_loop 0, .mainloop diff --git a/audio/music/looklass.asm b/audio/music/looklass.asm new file mode 100644 index 0000000..05c487a --- /dev/null +++ b/audio/music/looklass.asm @@ -0,0 +1,115 @@ +Music_LookLass: + channel_count 4 + channel 1, Music_LookLass_Ch1 + channel 2, Music_LookLass_Ch2 + channel 3, Music_LookLass_Ch3 + channel 4, Music_LookLass_Ch4 + +Music_LookLass_Ch1: + tempo 132 + volume 7, 7 + pitch_offset 1 + duty_cycle 2 + note_type 12, 12, 7 + octave 3 + note B_, 1 + rest 1 + octave 4 + note B_, 14 + stereo_panning FALSE, TRUE + duty_cycle 0 +.mainloop: + volume_envelope 10, 2 + octave 3 + note E_, 4 + volume_envelope 10, 1 + note E_, 4 + note E_, 4 + note E_, 2 + volume_envelope 10, 3 + note B_, 2 + sound_loop 0, .mainloop + +Music_LookLass_Ch2: + stereo_panning TRUE, FALSE + duty_cycle 0 + note_type 12, 8, 3 + rest 16 +.mainloop: + volume_envelope 9, 2 + octave 2 + note B_, 4 + volume_envelope 9, 1 + note B_, 4 + note B_, 4 + note B_, 2 + volume_envelope 9, 3 + octave 3 + note G#, 2 + sound_loop 0, .mainloop + +Music_LookLass_Ch3: + note_type 12, 1, 0 + rest 8 + octave 6 + note E_, 2 + note D#, 2 + note C#, 2 + note C_, 2 +.mainloop: + octave 5 + note B_, 2 + rest 2 + octave 6 + note D#, 2 + rest 2 + note E_, 2 + rest 2 + note D#, 2 + rest 2 + note C#, 2 + note C_, 2 + octave 5 + note B_, 2 + note A_, 2 + note G#, 2 + note A_, 2 + note A#, 2 + octave 6 + note C#, 2 + octave 5 + note B_, 2 + rest 2 + octave 6 + note C#, 2 + rest 2 + octave 5 + note B_, 2 + rest 2 + note A_, 2 + rest 2 + note G#, 2 + note F#, 2 + note E_, 2 + note D#, 2 + note E_, 2 + note F#, 2 + note G#, 2 + note A_, 2 + sound_loop 0, .mainloop + +Music_LookLass_Ch4: + toggle_noise 4 + drum_speed 12 + drum_note 1, 16 +.mainloop: + drum_speed 6 + drum_note 3, 8 + drum_note 2, 8 + drum_note 2, 8 + drum_note 2, 4 + drum_note 3, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + sound_loop 0, .mainloop diff --git a/audio/music/lookmysticalman.asm b/audio/music/lookmysticalman.asm new file mode 100644 index 0000000..c75fba0 --- /dev/null +++ b/audio/music/lookmysticalman.asm @@ -0,0 +1,610 @@ +Music_LookMysticalMan: + channel_count 4 + channel 1, Music_LookMysticalMan_Ch1 + channel 2, Music_LookMysticalMan_Ch2 + channel 3, Music_LookMysticalMan_Ch3 + channel 4, Music_LookMysticalMan_Ch4 + +Music_LookMysticalMan_Ch1: + tempo 136 + volume 7, 7 + vibrato 10, 3, 4 + pitch_offset 1 + stereo_panning FALSE, TRUE + note_type 12, 11, 3 + rest 8 +.mainloop: + duty_cycle 3 + note_type 6, 9, 6 + octave 3 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note E_, 2 + note F#, 2 + rest 4 + note F#, 2 + rest 9 + rest 9 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note D_, 2 + note E_, 2 + rest 4 + note E_, 2 + rest 9 + rest 9 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note C#, 2 + note E_, 2 + rest 4 + note E_, 2 + rest 9 + rest 9 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note C#, 2 + note E_, 2 + rest 3 + note F_, 1 + note F#, 4 + rest 4 + note E_, 4 + rest 4 + note C#, 4 + duty_cycle 2 + sound_call .sub1 + octave 4 + note C#, 2 + rest 2 + octave 3 + note B_, 2 + rest 2 + note A#, 2 + octave 4 + note C#, 6 + rest 4 + octave 3 + note F#, 4 + rest 4 + note E_, 4 + sound_call .sub1 + octave 4 + note C#, 2 + rest 2 + note C#, 2 + rest 2 + octave 3 + note A#, 2 + note B_, 6 + note A#, 4 + note F#, 4 + volume_envelope 10, 5 + duty_cycle 0 + octave 4 + note F#, 2 + note A#, 6 + duty_cycle 2 + volume_envelope 7, 2 +.loop1: + octave 5 + note D_, 2 + octave 4 + note B_, 2 + note F#, 2 + note D_, 2 + sound_loop 4, .loop1 + octave 5 + note D_, 2 + octave 4 + note B_, 2 + note F#, 2 + note D_, 2 + octave 3 + note A_, 2 + note F#, 2 + note D_, 2 + octave 2 + note A_, 2 + note B_, 2 + octave 3 + note D_, 2 + note F#, 2 + note A_, 2 + note B_, 2 + octave 4 + note D_, 2 + note F#, 2 + note B_, 2 +.loop2: + octave 5 + note D_, 2 + octave 4 + note G#, 2 + note E_, 2 + octave 3 + note B_, 2 + sound_loop 4, .loop2 + octave 5 + note C#, 2 + octave 4 + note A#, 2 + note F#, 2 + note C#, 2 + octave 3 + note A#, 2 + note F#, 2 + note C#, 2 + octave 2 + note A#, 2 + octave 3 + note C#, 2 + note E_, 2 + note F#, 2 + note A#, 2 + octave 4 + note C#, 2 + note E_, 2 + note F#, 2 + note A#, 2 + sound_loop 0, .mainloop + +.sub1: + note D_, 16 + octave 4 + note D_, 2 + rest 2 + note E_, 2 + rest 2 + note F#, 2 + note D_, 6 + octave 3 + note E_, 16 + note B_, 2 + rest 2 + octave 4 + note C#, 2 + rest 2 + note D_, 2 + octave 3 + note B_, 6 + octave 4 + note E_, 2 + rest 2 + note E_, 2 + rest 2 + note D_, 2 + note C#, 6 + note C#, 2 + rest 2 + note C#, 2 + rest 2 + octave 3 + note B_, 2 + note A_, 6 + sound_ret + +Music_LookMysticalMan_Ch2: + duty_cycle 3 + vibrato 10, 3, 4 + note_type 12, 11, 3 + rest 8 +.mainloop: + stereo_panning TRUE, FALSE + note_type 6, 11, 8 + octave 3 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note A_, 2 + note B_, 2 + rest 4 + note B_, 2 + rest 6 + stereo_panning TRUE, TRUE + note B_, 8 + note A_, 4 + stereo_panning TRUE, FALSE + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note F#, 2 + note G#, 2 + rest 4 + note G#, 2 + rest 6 + stereo_panning TRUE, TRUE + note F#, 8 + note G#, 4 + stereo_panning TRUE, FALSE + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note G_, 2 + note A_, 2 + rest 4 + note A_, 2 + rest 6 + stereo_panning TRUE, TRUE + note A_, 8 + note G_, 4 + stereo_panning TRUE, FALSE + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note E_, 2 + note F#, 2 + rest 3 + note A_, 1 + note A#, 4 + rest 4 + note F#, 4 + rest 4 + note E_, 4 + sound_call .sub1 + note F#, 2 + rest 2 + note E_, 2 + rest 2 + note D_, 2 + note E_, 6 + sound_call .sub2 + sound_call .sub1 + note F#, 2 + rest 2 + note F#, 2 + rest 2 + note E_, 2 + note D_, 6 + sound_call .sub2 + note_type 12, 11, 7 + note B_, 2 + rest 2 + note B_, 2 + rest 2 + octave 4 + note D_, 2 + rest 1 + note C#, 2 + rest 1 + octave 3 + note B_, 16 + rest 2 + note B_, 2 + rest 2 + octave 4 + note D_, 2 + rest 2 + note C#, 2 + rest 1 + octave 3 + note B_, 2 + rest 1 + note A#, 16 + rest 2 + sound_loop 0, .mainloop + +.sub1: + note B_, 2 + rest 2 + octave 4 + note D_, 2 + rest 2 + note F#, 2 + note A_, 6 + note B_, 8 + rest 2 + note A_, 2 + note B_, 2 + octave 5 + note C#, 2 + note D_, 2 + rest 2 + note C#, 2 + rest 2 + note D_, 2 + note C#, 6 + octave 4 + note B_, 12 + volume_envelope 8, 8 + note A#, 1 + note A_, 1 + volume_envelope 6, 8 + note G#, 1 + note F#, 1 + volume_envelope 11, 8 + octave 5 + note C#, 2 + rest 2 + note C#, 2 + rest 2 + octave 4 + note B_, 2 + note A_, 6 + note G_, 2 + rest 2 + note G_, 2 + rest 2 + note F#, 2 + note E_, 6 + sound_ret + +.sub2: + note C#, 8 + volume_envelope 8, 8 + note C_, 1 + octave 3 + note B_, 1 + note A#, 1 + volume_envelope 6, 8 + note G#, 1 + note F#, 1 + volume_envelope 4, 8 + note E_, 1 + note C#, 1 + rest 1 + volume_envelope 11, 8 + sound_ret + +Music_LookMysticalMan_Ch3: + note_type 6, 1, 6 + rest 16 +.mainloop: + octave 2 + note B_, 4 + octave 3 + note A_, 2 + rest 2 + note F#, 4 + octave 2 + note B_, 1 + rest 1 + note B_, 4 + note A_, 2 + note B_, 2 + octave 3 + note B_, 2 + octave 2 + note B_, 2 + octave 3 + note A_, 2 + octave 2 + note B_, 2 + octave 3 + note F#, 2 + note E_, 4 + note G#, 2 + rest 2 + note B_, 4 + note E_, 1 + rest 1 + note E_, 6 + octave 2 + note A#, 2 + note B_, 6 + note G#, 4 + note A_, 4 + octave 3 + note G_, 2 + rest 2 + note E_, 4 + octave 2 + note A_, 1 + rest 1 + note A_, 4 + note G_, 2 + note A_, 2 + octave 3 + note A_, 2 + octave 2 + note A_, 2 + octave 3 + note G_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 +.loop1: + octave 2 + note F#, 4 + note A#, 2 + rest 2 + octave 3 + note C#, 4 + octave 2 + note F#, 1 + rest 1 + note F#, 6 + note G#, 4 + rest 4 + note A#, 4 + note B_, 4 + octave 3 + note A_, 2 + rest 2 + note F#, 4 + octave 2 + note B_, 1 + rest 1 + note B_, 6 + octave 3 + note D_, 2 + rest 2 + note F#, 2 + note D_, 6 + note E_, 4 + note G#, 2 + rest 2 + note B_, 4 + note E_, 1 + rest 1 + note E_, 6 + note D_, 2 + rest 2 + octave 2 + note B_, 2 + note G#, 6 + note A_, 4 + octave 3 + note C#, 2 + rest 2 + note E_, 4 + octave 2 + note A_, 1 + rest 1 + note A_, 6 + octave 3 + note E_, 4 + note C#, 2 + octave 2 + note E_, 6 + sound_loop 2, .loop1 + note F#, 4 + note A#, 2 + rest 2 + octave 3 + note C#, 2 + note F#, 6 + octave 2 + note F#, 2 + rest 2 + octave 3 + note C#, 4 + octave 2 + note A#, 2 + octave 3 + note F#, 6 + octave 2 + note B_, 4 + octave 3 + note B_, 4 + octave 2 + note B_, 4 + octave 3 + note F#, 2 + note A_, 6 + octave 2 + note B_, 4 + octave 3 + note F#, 4 + octave 2 + note B_, 4 + note A_, 4 + rest 2 + note A#, 4 + rest 2 + note B_, 6 + rest 2 + note B_, 4 + note A_, 4 + note F#, 4 + note E_, 4 + octave 3 + note E_, 4 + octave 2 + note E_, 4 + note G#, 2 + octave 3 + note D_, 6 + octave 2 + note E_, 4 + note B_, 4 + octave 3 + note E_, 4 + note F#, 4 + rest 2 + note E_, 4 + rest 2 + note C#, 8 + octave 2 + note B_, 8 + note A#, 4 + sound_loop 0, .mainloop + +Music_LookMysticalMan_Ch4: + toggle_noise 3 + drum_speed 12 + drum_note 4, 2 + drum_note 4, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 +.mainloop: +.loop1: + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub3 + sound_loop 2, .loop1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + drum_note 3, 2 + drum_note 4, 2 + drum_note 3, 2 + drum_note 4, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 4, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 +.loop2: + drum_note 3, 2 + drum_note 4, 2 + drum_note 3, 3 + drum_note 4, 1 + drum_note 4, 2 + drum_note 4, 2 + drum_note 3, 2 + drum_note 4, 2 + drum_note 3, 2 + drum_note 4, 2 + drum_note 3, 3 + drum_note 4, 1 + drum_note 4, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + sound_loop 2, .loop2 + sound_loop 0, .mainloop + +.sub1: + drum_note 4, 4 + drum_note 3, 3 + drum_note 4, 3 + drum_note 4, 2 + drum_note 3, 4 + sound_ret + +.sub2: + drum_note 4, 4 + drum_note 3, 3 + drum_note 3, 3 + drum_note 4, 2 + drum_note 3, 4 + sound_ret + +.sub3: + drum_note 4, 4 + drum_note 3, 2 + drum_note 4, 1 + drum_note 3, 3 + drum_note 3, 2 + drum_note 4, 2 + drum_note 3, 1 + drum_note 3, 1 + sound_ret diff --git a/audio/music/lookofficer.asm b/audio/music/lookofficer.asm new file mode 100644 index 0000000..e069bad --- /dev/null +++ b/audio/music/lookofficer.asm @@ -0,0 +1,139 @@ +Music_LookOfficer: + channel_count 3 + channel 1, Music_LookOfficer_Ch1 + channel 2, Music_LookOfficer_Ch2 + channel 3, Music_LookOfficer_Ch3 + +Music_LookOfficer_Ch1: + tempo 116 + volume 7, 7 + pitch_offset 1 + vibrato 18, 3, 4 + stereo_panning FALSE, TRUE + duty_cycle 3 + note_type 12, 10, 7 + octave 4 + note C#, 1 + note D_, 1 + note D#, 1 + note E_, 1 + note F_, 12 + volume_envelope 2, -7 + octave 3 + note B_, 16 +.mainloop: + volume_envelope 8, 2 + rest 4 + note B_, 6 + note G#, 4 + note B_, 6 + note B_, 6 + note G#, 4 + note B_, 2 + volume_envelope 2, -7 + note A#, 16 + note A_, 16 + sound_loop 0, .mainloop + +Music_LookOfficer_Ch2: + vibrato 18, 3, 4 + duty_cycle 3 + note_type 12, 11, 7 + octave 5 + note D#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + octave 4 + note B_, 12 + duty_cycle 3 + volume_envelope 10, 2 + octave 1 + note B_, 4 + octave 2 + note A_, 2 + octave 1 + note B_, 4 + octave 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note D#, 2 +.mainloop: +.loop1: + note E_, 2 + note G#, 2 + octave 3 + note E_, 2 + octave 2 + note E_, 2 + note G#, 2 + note B_, 2 + note E_, 2 + note G#, 2 + sound_loop 2, .loop1 + transpose 0, 1 + sound_call .sub1 + transpose 0, 0 + sound_call .sub1 + sound_loop 0, .mainloop + +.sub1: + octave 1 + note A_, 2 + octave 2 + note C#, 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note C#, 2 + note E_, 2 + octave 1 + note A_, 2 + octave 2 + note C#, 2 + sound_ret + +Music_LookOfficer_Ch3: + vibrato 20, 1, 4 + stereo_panning TRUE, FALSE + note_type 12, 1, 4 + rest 10 + octave 3 + note B_, 2 + rest 2 + note B_, 2 + volume_envelope 1, 2 + octave 5 + note D#, 2 + rest 1 + note F_, 2 + rest 1 + note A_, 2 + note B_, 2 + rest 1 + octave 6 + note C#, 2 + rest 1 + note D#, 2 +.mainloop: + note E_, 6 + note D#, 6 + note C#, 4 + octave 5 + note B_, 2 + note A_, 2 + note G#, 2 + note F#, 2 + note G#, 2 + note A_, 2 + note B_, 2 + octave 6 + note C#, 2 + note F_, 8 + note D_, 8 + note E_, 8 + note C#, 8 + sound_loop 0, .mainloop diff --git a/audio/music/lookpokemaniac.asm b/audio/music/lookpokemaniac.asm new file mode 100644 index 0000000..4fb44fd --- /dev/null +++ b/audio/music/lookpokemaniac.asm @@ -0,0 +1,162 @@ +Music_LookPokemaniac: + channel_count 3 + channel 1, Music_LookPokemaniac_Ch1 + channel 2, Music_LookPokemaniac_Ch2 + channel 3, Music_LookPokemaniac_Ch3 + +Music_LookPokemaniac_Ch1: + stereo_panning FALSE, TRUE + tempo 144 + volume 7, 7 + vibrato 2, 3, 3 + pitch_offset 2 + note_type 12, 11, 3 + rest 8 +.mainloop: +.loop1: + rest 4 + octave 3 + note A#, 1 + rest 3 + note A#, 1 + rest 3 + sound_loop 4, .loop1 + rest 4 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + sound_loop 4, .loop1 + sound_loop 0, .mainloop + +Music_LookPokemaniac_Ch2: + stereo_panning TRUE, TRUE + vibrato 2, 3, 3 + pitch_offset 1 + note_type 12, 11, 3 + octave 2 + note A_, 1 + note F#, 1 + note D#, 1 + note C_, 1 + octave 1 + note A_, 4 +.mainloop: +.loop1: + octave 2 + note C_, 2 + rest 2 + octave 3 + note F#, 1 + rest 3 + note A_, 1 + rest 3 + octave 1 + note G_, 2 + rest 2 + octave 3 + note C_, 1 + rest 3 + note D#, 1 + rest 3 + sound_loop 2, .loop1 +.loop2: + octave 1 + note A_, 2 + rest 2 + octave 3 + note D#, 1 + rest 3 + note F#, 1 + rest 3 + octave 1 + note E_, 2 + rest 2 + octave 2 + note A_, 1 + rest 3 + octave 3 + note C_, 1 + rest 3 + sound_loop 2, .loop2 + sound_loop 0, .mainloop + +Music_LookPokemaniac_Ch3: + stereo_panning TRUE, FALSE + vibrato 6, 3, 3 + note_type 12, 1, 5 + octave 4 + note C_, 1 + note D#, 1 + note F#, 1 + note A_, 1 + octave 5 + note C_, 4 + volume_envelope 1, 0 +.mainloop: + sound_call .sub1 + volume_envelope 1, 4 + sound_call .sub1 + volume_envelope 1, 0 + sound_loop 0, .mainloop + +.sub1: + note A#, 6 + note A_, 2 + note G#, 2 + note G_, 2 + note F#, 6 + note F_, 2 + note F#, 2 + note A_, 2 + octave 4 + note D#, 4 + note C_, 1 + rest 1 + note D#, 1 + rest 1 + note C_, 1 + rest 1 + note D#, 1 + rest 1 + octave 5 + note F#, 4 + note C_, 1 + rest 1 + note F#, 1 + rest 1 + note C_, 1 + rest 1 + note F#, 1 + rest 1 + note G_, 6 + note F#, 2 + note F_, 2 + note E_, 2 + note D#, 6 + note D_, 2 + note D#, 2 + note F#, 2 + note C_, 4 + octave 4 + note A_, 1 + rest 1 + octave 5 + note C_, 1 + rest 1 + note D#, 1 + rest 1 + note C_, 1 + rest 1 + note D#, 4 + octave 4 + note A_, 1 + rest 1 + octave 5 + note D#, 1 + rest 1 + note F#, 1 + rest 1 + note C_, 1 + rest 1 + sound_ret diff --git a/audio/music/lookrival.asm b/audio/music/lookrival.asm new file mode 100644 index 0000000..d4b98eb --- /dev/null +++ b/audio/music/lookrival.asm @@ -0,0 +1,350 @@ +Music_LookRival: + channel_count 4 + channel 1, Music_LookRival_Ch1 + channel 2, Music_LookRival_Ch2 + channel 3, Music_LookRival_Ch3 + channel 4, Music_LookRival_Ch4 + +Music_LookRival_Ch1: + tempo 112 + volume 7, 7 + duty_cycle 1 + pitch_offset 1 + vibrato 18, 1, 5 + stereo_panning FALSE, TRUE + note_type 12, 11, 2 + octave 4 + note C_, 1 + octave 3 + note A#, 1 + note G#, 2 + note A#, 1 + note G#, 1 + note F#, 2 + note F_, 6 + volume_envelope 11, 7 + note G#, 6 + volume_envelope 11, 2 + note A#, 4 + note F_, 2 + note G#, 4 + volume_envelope 10, 0 + note G#, 10 + volume_envelope 10, 5 + note G#, 8 + volume_envelope 10, 6 + note F#, 8 +.mainloop: + volume_envelope 11, 5 + note F_, 4 + note D#, 2 + note F_, 6 + note F_, 2 + note G_, 2 + note G#, 4 + note A#, 4 + note G#, 2 + note G_, 4 + volume_envelope 10, 0 + note F_, 2 + volume_envelope 10, 7 + note F_, 16 + volume_envelope 6, 6 + rest 2 + note F_, 2 + note G_, 4 + volume_envelope 11, 6 + note G#, 4 + octave 4 + note C_, 4 + octave 3 + note A#, 4 + note G#, 2 + note A#, 6 + volume_envelope 11, 4 + note A#, 2 + octave 4 + note C_, 2 + note C#, 2 + note C#, 2 + note D#, 2 + note D#, 2 + note C#, 2 + note C_, 6 + volume_envelope 11, 7 + octave 3 + note A#, 12 + note G#, 2 + note G_, 2 + note G#, 2 + note A#, 10 + note B_, 4 + octave 4 + note C_, 6 + octave 3 + note A#, 6 + octave 4 + note D_, 2 + note C_, 2 + octave 3 + note A#, 6 + note G_, 10 + note A#, 6 + note G#, 6 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note G#, 8 + note F_, 6 + note C_, 2 +.loop1: + volume_envelope 11, 2 + note F_, 6 + volume_envelope 11, 7 + note G#, 4 + note F#, 2 + note F_, 2 + note D#, 2 + sound_loop 3, .loop1 + volume_envelope 11, 2 + note F_, 2 + note G#, 4 + volume_envelope 11, 7 + note G#, 6 + note F#, 4 + sound_loop 0, .mainloop + +Music_LookRival_Ch2: + duty_cycle 3 + vibrato 8, 3, 6 + stereo_panning TRUE, FALSE + note_type 12, 12, 2 + octave 4 + note F#, 2 + note F_, 2 + note D#, 2 + note C#, 2 + note C_, 6 + volume_envelope 12, 7 + note D#, 6 + volume_envelope 12, 2 + note F_, 4 + note C_, 2 + note D#, 4 + volume_envelope 11, 0 + note D#, 10 + volume_envelope 11, 7 + note D#, 16 +.mainloop: + volume_envelope 12, 7 + note C_, 12 + volume_envelope 12, 4 + note C_, 2 + note D_, 2 + note D#, 4 + note D_, 4 + note C_, 2 + note D_, 4 + volume_envelope 11, 0 + note C_, 6 + volume_envelope 11, 7 + note C_, 8 + volume_envelope 11, 4 + octave 3 + note A_, 2 + note G_, 2 + note A_, 2 + volume_envelope 12, 6 + octave 4 + note C_, 6 + volume_envelope 12, 7 + note D#, 8 + note F_, 12 + volume_envelope 12, 4 + note F_, 2 + note G_, 2 + note G#, 2 + note G#, 2 + note G_, 2 + note G_, 2 + note F_, 2 + volume_envelope 12, 4 + note G_, 6 + volume_envelope 11, 0 + note F_, 16 + volume_envelope 11, 7 + note F_, 16 + volume_envelope 11, 0 + note G_, 12 + note F_, 4 + note E_, 16 + note F_, 12 + note D#, 4 + volume_envelope 12, 7 + note D_, 8 + volume_envelope 12, 4 + note C_, 2 + note D_, 2 + note D#, 1 + note D_, 1 + note D#, 2 +.loop1: + volume_envelope 12, 2 + note C_, 6 + volume_envelope 12, 7 + note D#, 6 + volume_envelope 12, 2 + note F_, 4 + sound_loop 3, .loop1 + note C_, 2 + note D#, 4 + volume_envelope 12, 7 + note D#, 10 + sound_loop 0, .mainloop + +Music_LookRival_Ch3: + note_type 12, 2, 8 + rest 2 + octave 4 + note C_, 2 + octave 3 + note G#, 2 + note F#, 2 + note F_, 4 + note G#, 2 + note D#, 4 + note C_, 2 + note D_, 2 + note D#, 2 + note G#, 2 + note F#, 2 + note F_, 2 + note D#, 10 + note D#, 10 + note C_, 2 + note D#, 2 + note F#, 2 +.mainloop: +.loop1: + sound_call .sub1 + sound_loop 3, .loop1 + note F_, 4 + note C_, 2 + note D#, 4 + note G#, 2 + note G_, 2 + note F#, 2 + sound_call .sub2 + note A#, 2 + note F_, 2 + note G_, 2 + note G#, 4 + note F_, 2 + note G_, 2 + note G#, 1 + note A_, 1 + sound_call .sub3 + note A#, 2 + note F_, 2 + note G_, 2 + note G#, 4 + note F_, 2 + note A#, 2 + note B_, 2 + octave 4 + note C_, 4 + octave 3 + note G_, 2 + note A#, 4 + note G_, 2 + note A_, 2 + note A#, 2 + octave 4 + note C_, 4 + octave 3 + note G_, 2 + note A#, 4 + note G_, 2 + note A_, 2 + note A#, 1 + note A_, 1 + sound_call .sub2 + sound_call .sub3 + sound_call .sub1 + sound_call .sub1 + note F_, 2 + note C_, 2 + note D_, 2 + note D#, 4 + note C_, 2 + note D_, 2 + note D#, 1 + note E_, 1 + note F_, 2 + note C_, 2 + note D_, 2 + note D#, 4 + note C_, 2 + note F#, 2 + note E_, 2 + sound_loop 0, .mainloop + +.sub1: + note F_, 2 + note C_, 2 + note D_, 2 + note D#, 4 + note C_, 2 + note D_, 2 + note D#, 2 + sound_ret + +.sub2: + note A#, 2 + note F_, 2 + note G_, 2 + note G#, 4 + note F_, 2 + note G_, 2 + note G#, 2 + sound_ret + +.sub3: + note A#, 4 + note F_, 2 + note G#, 4 + note F_, 2 + note G_, 2 + note G#, 2 + sound_ret + +Music_LookRival_Ch4: + stereo_panning TRUE, FALSE + toggle_noise 3 + drum_speed 12 + rest 8 + rest 16 + drum_note 4, 2 + drum_note 3, 4 + drum_note 3, 6 + drum_note 3, 4 + drum_note 4, 4 + drum_note 4, 4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 +.mainloop: + drum_note 4, 4 + drum_note 3, 2 + drum_note 4, 4 + drum_note 4, 2 + drum_note 3, 4 + drum_note 4, 4 + drum_note 3, 2 + drum_note 4, 4 + drum_note 4, 2 + drum_note 3, 2 + drum_note 3, 2 + sound_loop 0, .mainloop diff --git a/audio/music/lookrocket.asm b/audio/music/lookrocket.asm new file mode 100644 index 0000000..db1c601 --- /dev/null +++ b/audio/music/lookrocket.asm @@ -0,0 +1,382 @@ +Music_LookRocket: + channel_count 4 + channel 1, Music_LookRocket_Ch1 + channel 2, Music_LookRocket_Ch2 + channel 3, Music_LookRocket_Ch3 + channel 4, Music_LookRocket_Ch4 + +Music_LookRocket_Ch1: + tempo 123 + volume 7, 7 + transpose 0, 2 + stereo_panning FALSE, TRUE + duty_cycle 3 + vibrato 5, 6, 4 + note_type 12, 10, 8 + octave 4 + note C_, 1 + note D_, 1 + sound_call .sub1 + duty_cycle 1 +.mainloop: + volume_envelope 10, 8 + sound_call .sub2 + sound_call Music_LookRocket_Ch2.sub5 + octave 4 + note F#, 1 + rest 1 + volume_envelope 5, 3 + sound_call .sub3 + volume_envelope 12, 3 + sound_call .sub3 + volume_envelope 14, 3 + sound_call .sub3 + rest 16 + sound_loop 0, .mainloop + +.sub1: + note D#, 1 + rest 1 + note D_, 1 + rest 1 + note C#, 1 + rest 1 + note C_, 1 + rest 3 + octave 2 + note F_, 1 + note G#, 1 + note B_, 1 + octave 3 + note D_, 1 + note F_, 1 + note G#, 1 + sound_ret + +.sub2: + rest 2 + octave 3 + note D#, 1 + rest 5 + note D#, 4 + octave 2 + note A_, 2 + octave 3 + note D#, 1 + note F_, 1 + note F#, 6 + note D#, 1 + rest 3 + note F#, 1 + rest 1 + note D#, 1 + rest 1 + octave 4 + note F#, 1 + rest 1 + sound_ret + +.sub3: + rest 2 + octave 2 + note B_, 1 + rest 7 + octave 3 + note C_, 1 + rest 5 + sound_ret + +Music_LookRocket_Ch2: + transpose 0, 2 + vibrato 4, 6, 4 + duty_cycle 3 + note_type 12, 11, 7 + stereo_panning TRUE, TRUE + octave 5 + note C_, 1 + note D_, 1 + sound_call .sub1 +.mainloop: + volume_envelope 11, 7 + sound_call .sub5 + octave 5 + note C_, 1 + rest 1 + sound_call .sub2 + volume_envelope 5, 3 + sound_call .sub3 + volume_envelope 12, 3 + sound_call .sub3 + volume_envelope 14, 3 + sound_call .sub3 + sound_call .sub4 + sound_loop 0, .mainloop + +.sub1: + note D#, 1 + rest 1 + note D_, 1 + rest 1 + note C#, 1 + rest 1 + note C_, 1 + rest 3 + octave 3 + note B_, 6 + duty_cycle 0 + sound_ret + +.sub2: + rest 2 + octave 4 + note D#, 1 + rest 5 + note F_, 4 + note C_, 1 + note D_, 1 + note D#, 1 + note F_, 1 + note F#, 6 + note D#, 1 + rest 3 + note F#, 1 + rest 1 + note D#, 1 + rest 1 + octave 5 + note D#, 1 + rest 1 + sound_ret + +.sub3: + rest 2 + octave 3 + note F_, 1 + rest 7 + note F#, 1 + rest 5 + sound_ret + +.sub4: + volume_envelope 6, 3 + note G#, 1 + note F_, 1 + note D_, 1 + octave 2 + note B_, 1 + volume_envelope 10, 3 + octave 3 + note A_, 1 + note F#, 1 + note D#, 1 + note C_, 1 + volume_envelope 12, 3 + note A#, 1 + note G_, 1 + note E_, 1 + note C#, 1 + volume_envelope 15, 3 + note B_, 1 + note G#, 1 + note F_, 1 + note D_, 1 + sound_ret + +.sub5: + octave 3 + rest 2 + note G_, 1 + rest 5 + note A_, 8 + note A#, 6 + note A_, 1 + rest 3 + note A#, 1 + rest 1 + note A_, 1 + rest 1 + sound_ret + +Music_LookRocket_Ch3: + transpose 0, 2 + vibrato 4, 2, 2 + note_type 12, 1, 4 + stereo_panning TRUE, FALSE + rest 2 + sound_call .sub1 +.mainloop: + sound_call .sub4 + sound_call .sub4 + volume_envelope 2, 4 + sound_call .sub5 + volume_envelope 1, 4 + sound_call .sub2 + sound_call .sub5 + sound_call .sub3 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note F_, 1 + rest 1 + note G#, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + note D_, 1 + rest 3 + octave 3 + note D_, 6 + sound_ret + +.sub2: + octave 2 + note G#, 1 + rest 1 + octave 3 + note G#, 1 + rest 1 + octave 2 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note A_, 1 + rest 1 + octave 3 + note A_, 1 + rest 1 + note C_, 1 + rest 1 + note F#, 1 + rest 1 + sound_ret + +.sub3: + volume_envelope 2, 4 + octave 2 + note G#, 1 + rest 1 + octave 3 + note F_, 1 + rest 1 + octave 2 + note A_, 1 + rest 1 + octave 3 + note F#, 1 + rest 1 + volume_envelope 1, 4 + octave 2 + note A#, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note B_, 1 + rest 1 + octave 3 + note G#, 1 + rest 1 + sound_ret + +.sub4: + note C_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + note D#, 1 + rest 1 + note G_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + sound_ret + +.sub5: + octave 2 + note G#, 1 + rest 1 + octave 3 + note G#, 1 + rest 1 + octave 2 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note A_, 1 + rest 1 + octave 3 + note A_, 1 + rest 1 + note G#, 1 + note F#, 1 + note D#, 1 + note C_, 1 + sound_ret + +Music_LookRocket_Ch4: + toggle_noise 3 + drum_speed 12 + rest 2 + sound_call .sub1 +.mainloop: + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub1 + sound_loop 0, .mainloop + +.sub1: + drum_note 1, 8 + drum_note 3, 2 + drum_note 4, 2 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 3, 1 + sound_ret + +.sub2: + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + sound_ret diff --git a/audio/music/looksage.asm b/audio/music/looksage.asm new file mode 100644 index 0000000..1fa147e --- /dev/null +++ b/audio/music/looksage.asm @@ -0,0 +1,179 @@ +Music_LookSage: + channel_count 2 + channel 1, Music_LookSage_Ch1 + channel 3, Music_LookSage_Ch3 + +Music_LookSage_Ch1: + tempo 144 + stereo_panning FALSE, TRUE + volume 7, 7 + duty_cycle 3 + note_type 12, 11, 3 + rest 2 + rest 16 + sound_call .sub1 + volume_envelope 11, 3 + octave 3 + note D_, 2 + volume_envelope 9, 3 + note D_, 2 + volume_envelope 11, 3 + note E_, 2 + volume_envelope 9, 3 + note E_, 2 + volume_envelope 11, 3 + note A_, 2 + volume_envelope 9, 3 + note A_, 2 + volume_envelope 11, 3 + note F_, 2 + volume_envelope 9, 3 + note F_, 2 +.mainloop: + volume_envelope 11, 3 + note D_, 2 + volume_envelope 9, 3 + note D_, 2 + volume_envelope 11, 3 + octave 2 + note B_, 2 + volume_envelope 9, 3 + note B_, 2 + volume_envelope 11, 3 + note A_, 2 + volume_envelope 9, 3 + note A_, 2 + volume_envelope 11, 3 + note B_, 2 + volume_envelope 9, 3 + note B_, 2 + volume_envelope 11, 3 + octave 3 + note D_, 2 + volume_envelope 9, 3 + note D_, 2 + volume_envelope 11, 3 + octave 2 + note B_, 2 + volume_envelope 9, 3 + note B_, 2 + volume_envelope 11, 3 + octave 3 + note D_, 2 + volume_envelope 9, 3 + note D_, 2 + volume_envelope 11, 3 + note E_, 2 + volume_envelope 9, 3 + note E_, 2 + volume_envelope 11, 3 + note F_, 2 + volume_envelope 9, 3 + note F_, 2 + volume_envelope 11, 3 + note D_, 2 + volume_envelope 9, 3 + note D_, 2 + volume_envelope 11, 3 + note E_, 2 + volume_envelope 9, 3 + note E_, 2 + volume_envelope 11, 3 + note A_, 2 + volume_envelope 9, 3 + note A_, 2 + volume_envelope 11, 3 + note D_, 2 + volume_envelope 9, 3 + note D_, 2 + volume_envelope 11, 3 + octave 2 + note B_, 2 + volume_envelope 9, 3 + note B_, 2 + volume_envelope 11, 3 + note A_, 2 + volume_envelope 9, 3 + note A_, 2 + volume_envelope 11, 3 + note B_, 2 + volume_envelope 9, 3 + note B_, 2 + sound_call .sub1 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 11, 3 + octave 2 + note E_, 2 + volume_envelope 9, 3 + note E_, 2 + volume_envelope 11, 3 + note A_, 2 + volume_envelope 9, 3 + note A_, 2 + volume_envelope 11, 3 + note B_, 2 + volume_envelope 9, 3 + note B_, 2 + volume_envelope 11, 3 + note A_, 2 + volume_envelope 9, 3 + note A_, 2 + sound_ret + +Music_LookSage_Ch3: + stereo_panning TRUE, FALSE + vibrato 22, 2, 3 + note_type 12, 1, 0 + octave 5 + note B_, 1 + octave 6 + note C_, 1 + octave 5 + note B_, 16 + vibrato 7, 2, 3 + note B_, 8 + vibrato 20, 2, 3 + octave 6 + note D_, 6 + note E_, 1 + note F_, 1 + note E_, 14 + note G_, 1 + note G#, 1 +.mainloop: + note A_, 12 + note B_, 4 + note D_, 9 + note E_, 1 + note F_, 1 + note D_, 1 + vibrato 0, 0, 0 + note E_, 4 + vibrato 7, 2, 3 + note E_, 8 + vibrato 20, 2, 3 + octave 5 + note B_, 8 + octave 6 + note F_, 8 + note_type 6, 1, 0 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + octave 5 + note B_, 1 + note A#, 1 + note A_, 1 + rest 4 + octave 6 + note E_, 2 + note F_, 2 + note_type 12, 1, 0 + note E_, 14 + note G_, 1 + note G#, 1 + sound_loop 0, .mainloop diff --git a/audio/music/lookyoungster.asm b/audio/music/lookyoungster.asm new file mode 100644 index 0000000..e840fac --- /dev/null +++ b/audio/music/lookyoungster.asm @@ -0,0 +1,296 @@ +Music_LookYoungster: + channel_count 3 + channel 1, Music_LookYoungster_Ch1 + channel 2, Music_LookYoungster_Ch2 + channel 3, Music_LookYoungster_Ch3 + +Music_LookYoungster_Ch1: + tempo 118 + volume 7, 7 + stereo_panning FALSE, TRUE + duty_cycle 3 + note_type 12, 10, 3 + octave 3 + note G_, 1 + note G#, 1 + note A_, 1 + note A#, 1 + volume_envelope 3, -6 + note B_, 16 + volume_envelope 12, 3 + octave 4 + note C_, 1 + rest 3 + note C_, 4 + rest 2 + note C_, 6 + volume_envelope 11, 3 +.mainloop: + rest 2 + octave 3 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + note C_, 1 + rest 3 + note C_, 1 + rest 1 + rest 16 + rest 2 + octave 3 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + note C_, 1 + rest 3 + note C_, 1 + rest 1 + rest 16 + sound_loop 0, .mainloop + + sound_ret ; unused + +Music_LookYoungster_Ch2: + stereo_panning TRUE, FALSE + vibrato 18, 2, 6 + duty_cycle 1 + note_type 12, 10, 3 + octave 3 + note B_, 1 + octave 4 + note C_, 1 + note C#, 1 + note D_, 1 + volume_envelope 3, -6 + note_type 12, 2, -6 + note G_, 16 + note_type 12, 11, 3 + volume_envelope 12, 3 + note F_, 1 + rest 3 + note F_, 4 + rest 2 + note F#, 6 +.mainloop: + duty_cycle 3 + volume_envelope 11, 3 + rest 2 + octave 3 + note B_, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note G_, 1 + rest 1 + note F_, 1 + rest 3 + note F_, 1 + rest 1 + volume_envelope 9, 7 + duty_cycle 2 + note D#, 1 + note F_, 1 + note D#, 1 + note D_, 1 + note C_, 1 + rest 1 + octave 3 + note G#, 1 + rest 3 + note F_, 1 + rest 1 + note G_, 1 + rest 1 + note G#, 1 + rest 1 + duty_cycle 3 + volume_envelope 11, 3 + rest 2 + note B_, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note G_, 1 + rest 1 + note F_, 1 + rest 3 + note F_, 1 + rest 1 + duty_cycle 2 + volume_envelope 9, 7 + note G#, 1 + note A#, 1 + note G#, 1 + note G_, 1 + note F_, 1 + rest 1 + note C_, 1 + rest 3 + octave 3 + note G#, 1 + rest 1 + note A#, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + sound_loop 0, .mainloop + + sound_ret ; unused + +Music_LookYoungster_Ch3: + stereo_panning TRUE, TRUE + vibrato 2, 2, 4 + note_type 12, 2, 5 + rest 4 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + volume_envelope 1, 5 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + note D_, 1 + rest 3 + note D_, 4 + rest 2 + note G#, 6 + volume_envelope 2, 5 +.mainloop: + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note F_, 1 + rest 1 + octave 3 + note D#, 1 + rest 1 + octave 2 + note F_, 1 + rest 1 + octave 3 + note D#, 1 + rest 1 + octave 2 + note F_, 1 + rest 1 + octave 3 + note D#, 1 + rest 1 + octave 2 + note F_, 1 + rest 1 + octave 3 + note D#, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note G#, 1 + rest 1 + octave 3 + note D#, 1 + rest 1 + octave 2 + note G#, 1 + rest 1 + octave 3 + note D#, 1 + rest 1 + octave 2 + note G#, 1 + rest 1 + octave 3 + note D#, 1 + rest 1 + note G_, 1 + rest 1 + note G#, 1 + rest 1 + sound_loop 0, .mainloop + + sound_ret ; unused diff --git a/audio/music/magnettrain.asm b/audio/music/magnettrain.asm new file mode 100644 index 0000000..428acc4 --- /dev/null +++ b/audio/music/magnettrain.asm @@ -0,0 +1,281 @@ +Music_MagnetTrain: + channel_count 4 + channel 1, Music_MagnetTrain_Ch1 + channel 2, Music_MagnetTrain_Ch2 + channel 3, Music_MagnetTrain_Ch3 + channel 4, Music_MagnetTrain_Ch4 + +Music_MagnetTrain_Ch1: + tempo 110 + volume 7, 7 + stereo_panning FALSE, TRUE + vibrato 20, 2, 3 + duty_cycle 2 + note_type 12, 11, 2 + rest 16 + rest 16 + volume_envelope 11, 7 + octave 4 + note D_, 1 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + note D_, 1 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + note D_, 1 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + note D_, 1 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + note E_, 1 + note C_, 1 + octave 3 + note A_, 1 + octave 4 + note C_, 1 + note E_, 1 + note C_, 1 + octave 3 + note A_, 1 + octave 4 + note C_, 1 + note E_, 1 + note C_, 1 + octave 3 + note A_, 1 + octave 4 + note C_, 1 + note E_, 1 + note C_, 1 + note_type 6, 11, 7 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note_type 12, 11, 7 + note D_, 16 + sound_ret + +Music_MagnetTrain_Ch2: + vibrato 20, 2, 3 + duty_cycle 1 + note_type 12, 13, 2 + stereo_panning TRUE, FALSE + note_type 12, 13, 8 + octave 1 + note F_, 12 + rest 2 + note_type 6, 13, 7 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + octave 2 + note F_, 4 + rest 4 + note F_, 4 + rest 4 + note F_, 4 + rest 4 + note F_, 4 + rest 4 + duty_cycle 3 + note_type 12, 13, 7 + octave 4 + note G_, 16 + note A_, 13 + rest 1 + note_type 6, 13, 7 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note_type 12, 13, 7 + note A_, 16 + sound_ret + +Music_MagnetTrain_Ch3: + stereo_panning TRUE, TRUE + vibrato 16, 2, 3 + note_type 12, 1, 5 + octave 6 + note C_, 1 + octave 5 + note G_, 1 + note D#, 1 + note C_, 1 + note G_, 1 + note D#, 1 + note C_, 1 + octave 4 + note G_, 1 + octave 5 + note D#, 1 + note C_, 1 + octave 4 + note G_, 1 + note D#, 1 + octave 5 + note C_, 1 + octave 4 + note G_, 1 + note D#, 1 + note C_, 1 + note G_, 1 + note D#, 1 + note C_, 1 + octave 3 + note G_, 1 + octave 4 + note C_, 1 + note D#, 1 + note G_, 1 + note C_, 1 + note D#, 1 + note G_, 1 + octave 5 + note C_, 1 + octave 4 + note G_, 1 + octave 5 + note C_, 1 + note D#, 1 + note G_, 1 + note C_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 1 + octave 3 + note D_, 1 + octave 2 + note D_, 16 + sound_ret + +Music_MagnetTrain_Ch4: + toggle_noise 3 + drum_speed 12 + drum_note 12, 12 + drum_note 3, 2 + drum_note 11, 1 + drum_note 11, 1 + drum_speed 6 + drum_note 4, 4 + drum_note 7, 4 + drum_note 4, 4 + drum_note 7, 4 + drum_note 11, 4 + drum_note 7, 4 + drum_note 11, 4 + drum_note 3, 2 + drum_note 3, 2 + sound_call .sub2 + sound_call .sub2 + drum_speed 12 + drum_note 12, 16 + sound_ret + +.sub1: ; unreferenced + drum_note 9, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 9, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 9, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 9, 1 + drum_note 8, 1 + drum_note 8, 1 + sound_ret + +.sub2: + drum_note 9, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 9, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 9, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 9, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 8, 2 + sound_ret diff --git a/audio/music/mainmenu.asm b/audio/music/mainmenu.asm new file mode 100644 index 0000000..71f9c7a --- /dev/null +++ b/audio/music/mainmenu.asm @@ -0,0 +1,146 @@ +Music_MainMenu: + channel_count 4 + channel 1, Music_MainMenu_Ch1 + channel 2, Music_MainMenu_Ch2 + channel 3, Music_MainMenu_Ch3 + channel 4, Music_MainMenu_Ch4 + +Music_MainMenu_Ch1: + tempo 160 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 + vibrato 16, 1, 5 + stereo_panning TRUE, FALSE + note_type 12, 0, -7 + octave 3 + note D_, 8 +.mainloop: +.loop1: + note_type 12, 9, 2 + octave 3 + note C#, 6 + note C#, 1 + note C#, 1 + note C#, 2 + note C#, 2 + note C#, 4 + sound_loop 2, .loop1 + note D#, 6 + note D#, 1 + note D#, 1 + note D#, 2 + note D#, 2 + note D#, 4 + octave 2 + note B_, 6 + note B_, 1 + note B_, 1 + note B_, 2 + note B_, 2 + note_type 12, 9, 4 + octave 3 + note C_, 4 + sound_loop 0, .mainloop + +Music_MainMenu_Ch2: + duty_cycle 3 + stereo_panning FALSE, TRUE + note_type 12, 0, -7 + octave 3 + note G_, 8 +.mainloop: +.loop1: + note_type 12, 10, 2 + note F#, 6 + note F#, 1 + note F#, 1 + note F#, 2 + note F#, 2 + note F#, 4 + sound_loop 2, .loop1 + note G#, 6 + note G#, 1 + note G#, 1 + note G#, 2 + note G#, 2 + note G#, 4 + note E_, 6 + note E_, 1 + note E_, 1 + note E_, 2 + note E_, 2 + note_type 12, 10, 4 + note F_, 4 + sound_loop 0, .mainloop + +Music_MainMenu_Ch3: + stereo_panning TRUE, FALSE + note_type 12, 2, 5 + rest 8 +.mainloop: +.loop1: + octave 2 + note F#, 1 + rest 5 + note F#, 1 + note F#, 1 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note F#, 1 + rest 3 + sound_loop 2, .loop1 + note G#, 1 + rest 5 + note G#, 1 + note G#, 1 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note G#, 1 + rest 3 + note E_, 1 + rest 5 + note E_, 1 + note E_, 1 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note F_, 1 + rest 3 + sound_loop 0, .mainloop + +Music_MainMenu_Ch4: + stereo_panning FALSE, TRUE + toggle_noise 3 + drum_speed 12 + rest 8 + rest 16 + rest 16 + rest 16 + rest 12 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 +.mainloop: + drum_note 3, 6 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 4 + drum_note 3, 6 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 2 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 1 + drum_note 3, 1 + sound_loop 0, .mainloop diff --git a/audio/music/mobileadapter.asm b/audio/music/mobileadapter.asm new file mode 100644 index 0000000..0c36649 --- /dev/null +++ b/audio/music/mobileadapter.asm @@ -0,0 +1,661 @@ +Music_MobileAdapter: + channel_count 4 + channel 1, Music_MobileAdapter_Ch1 + channel 2, Music_MobileAdapter_Ch2 + channel 3, Music_MobileAdapter_Ch3 + channel 4, Music_MobileAdapter_Ch4 + +Music_MobileAdapter_Ch1: + tempo 132 + volume 7, 7 + pitch_offset 1 + stereo_panning FALSE, TRUE + duty_cycle 2 + note_type 12, 8, 4 + rest 2 + rest 6 + octave 3 + note G_, 1 + octave 4 + note D_, 1 + note E_, 1 + rest 1 + note D_, 1 + rest 1 + note C#, 4 +.mainloop: + sound_call .sub1 + note D_, 1 + note C#, 1 + note D_, 2 + octave 3 + note A_, 1 + note G_, 1 + note A_, 2 + note F#, 1 + note E_, 1 + note F#, 2 + note D_, 1 + note C#, 1 + note D_, 2 + sound_call .sub1 + note D_, 1 + note C#, 1 + octave 3 + note B_, 1 + octave 4 + note D_, 1 + note F#, 1 + note E_, 1 + note D_, 1 + note C#, 1 + volume_envelope 9, 4 + note D_, 2 + octave 3 + note A_, 2 + octave 4 + note D_, 4 + octave 5 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + octave 4 + note C#, 8 + volume_envelope 9, 2 + note F#, 1 + note G_, 1 + note A_, 2 + note G#, 2 + note A_, 2 + volume_envelope 9, 4 + note E_, 3 + octave 3 + note A_, 3 + note E_, 4 + octave 4 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + octave 3 + note B_, 8 + volume_envelope 9, 2 + octave 4 + note B_, 1 + octave 5 + note C_, 1 + note C#, 2 + octave 4 + note B_, 2 + note A_, 2 + octave 5 + note C#, 3 + volume_envelope 9, 4 + octave 4 + note C#, 3 + octave 3 + note A_, 4 + octave 4 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + octave 3 + note F#, 10 + octave 4 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + octave 3 + note D_, 10 + octave 4 + note A_, 8 + volume_envelope 10, 1 + octave 3 + note C#, 1 + note D_, 1 + note E_, 1 + note F#, 1 + note G_, 1 + note A_, 1 + note B_, 1 + octave 4 + note C#, 1 + note D_, 1 + note C#, 1 + note D_, 2 + octave 3 + note A_, 1 + note G_, 1 + note A_, 2 + volume_envelope 9, 4 + note F#, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 4 + volume_envelope 7, 7 + sound_call Music_MobileAdapter_Ch3.sub5 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 9, 4 + octave 4 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note F#, 2 + octave 3 + note F#, 10 + octave 4 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 2 + octave 3 + note G_, 8 + volume_envelope 10, 1 + note B_, 1 + octave 4 + note D_, 1 + note E_, 1 + note D_, 1 + note C#, 1 + note E_, 1 + note D_, 1 + note C#, 1 + octave 3 + note B_, 1 + note A_, 1 + note E_, 1 + note F#, 1 + note G_, 1 + note F#, 1 + note E_, 1 + note A_, 1 + note B_, 1 + octave 4 + note C#, 1 + sound_ret + +Music_MobileAdapter_Ch2: + note_type 12, 12, 1 + vibrato 16, 2, 3 + duty_cycle 2 + octave 3 + note G_, 1 + note B_, 1 + octave 4 + note D_, 1 + note C#, 1 + note D_, 2 + octave 3 + note B_, 1 + note A#, 1 + note B_, 2 + octave 4 + note C#, 2 + octave 3 + note B_, 2 + note A_, 2 + volume_envelope 11, 4 + octave 4 + note D_, 1 + note F#, 1 +.mainloop: + sound_call .sub1 + note A_, 4 + note G_, 4 + note A_, 4 + note E_, 4 + note F#, 12 + rest 2 + note D_, 1 + note F#, 1 + sound_call .sub1 + octave 5 + note C#, 4 + octave 4 + note A_, 4 + octave 5 + note F#, 4 + note E_, 4 + note D_, 12 + rest 2 + note C#, 1 + note D_, 1 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note G_, 4 + note F#, 2 + note E_, 2 + note D_, 2 + note C#, 9 + volume_envelope 10, 2 + octave 3 + note E_, 3 + note C#, 2 + volume_envelope 11, 4 + octave 5 + note D_, 1 + note C#, 1 + octave 4 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + octave 5 + note C#, 4 + note D_, 2 + note E_, 2 + note F#, 2 + note E_, 9 + volume_envelope 10, 2 + octave 3 + note A_, 3 + note E_, 2 + volume_envelope 11, 4 + octave 5 + note F#, 1 + note G_, 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note G_, 4 + note F#, 2 + note E_, 2 + note D_, 1 + note C#, 1 + octave 4 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + octave 5 + note G_, 4 + note F#, 2 + note D_, 2 + octave 4 + note A#, 1 + note B_, 1 + octave 5 + note C#, 12 + note E_, 4 + note D_, 16 + duty_cycle 1 + volume_envelope 7, 1 + sound_call .sub2 + octave 4 + note E_, 1 + note A_, 1 + octave 5 + note C#, 1 + note E_, 1 + sound_call .sub2 + rest 2 + duty_cycle 2 + volume_envelope 11, 4 + octave 4 + note D_, 1 + note F#, 1 + sound_loop 0, .mainloop + +.sub1: + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 2 + octave 5 + note D_, 4 + note C#, 2 + octave 4 + note B_, 2 + note G_, 1 + note A_, 1 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note B_, 2 + octave 5 + note E_, 4 + note D_, 2 + note C#, 2 + octave 4 + note B_, 2 + sound_ret + +.sub2: + octave 5 + note F#, 1 + note D_, 1 + octave 4 + note A_, 1 + note F#, 1 + octave 5 + note F#, 1 + note D_, 1 + octave 4 + note A_, 1 + note F#, 1 + octave 5 + note F#, 1 + note D_, 1 + octave 4 + note A#, 1 + note F#, 1 + octave 5 + note F#, 1 + note D_, 1 + octave 4 + note A#, 1 + note F#, 1 + octave 5 + note G_, 1 + note D_, 1 + octave 4 + note B_, 1 + note G_, 1 + octave 5 + note G_, 1 + note D_, 1 + octave 4 + note B_, 1 + note G_, 1 + octave 5 + note C#, 4 + sound_ret + +Music_MobileAdapter_Ch3: + note_type 12, 1, 4 + rest 2 + octave 3 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + note B_, 1 + note G_, 1 + note A_, 1 + rest 1 + note E_, 1 + rest 1 + note A_, 4 +.mainloop: + sound_call .sub1 + sound_call .sub2 + sound_call .sub3 + note D_, 1 + rest 1 + octave 2 + note A_, 1 + rest 1 + note B_, 1 + rest 1 + octave 3 + note C#, 1 + rest 1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub3 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 4 + sound_call .sub2 + sound_call .sub4 + note B_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note B_, 1 + rest 1 + octave 3 + note D_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note D_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + sound_call .sub4 + octave 3 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + note C#, 1 + rest 1 + note A_, 1 + rest 1 + note C#, 1 + rest 1 + note A_, 1 + rest 1 + octave 2 + note B_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note B_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note A#, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 2 + note A#, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + sound_call .sub2 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + note F#, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 4 + sound_call .sub5 + sound_loop 0, .mainloop + +.sub1: +.sub1loop1: + octave 3 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + sound_loop 4, .sub1loop1 +.sub1loop2: + octave 2 + note G_, 1 + rest 1 + octave 3 + note D_, 1 + rest 1 + sound_loop 4, .sub1loop2 + sound_ret + +.sub2: +.sub2loop1: + octave 2 + note A_, 1 + rest 1 + octave 3 + note E_, 1 + rest 1 + sound_loop 4, .sub2loop1 + sound_ret + +.sub3: + note D_, 1 + rest 1 + note A_, 1 + rest 1 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + sound_ret + +.sub4: + octave 2 + note A_, 1 + rest 1 + octave 3 + note C#, 1 + rest 1 + note E_, 1 + rest 1 + note C#, 1 + rest 1 + octave 2 + note A_, 1 + octave 3 + note E_, 2 + rest 1 + octave 2 + note A_, 4 + sound_ret + +.sub5: +.sub5loop1: + octave 2 + note A_, 1 + rest 1 + octave 3 + note D_, 2 + octave 2 + note A_, 1 + octave 3 + note D_, 3 + octave 2 + note A#, 1 + rest 1 + octave 3 + note D_, 2 + octave 2 + note A#, 1 + octave 3 + note D_, 3 + octave 2 + note B_, 1 + rest 1 + octave 3 + note D_, 2 + octave 2 + note B_, 1 + octave 3 + note D_, 3 + octave 2 + note A_, 2 + rest 6 + sound_loop 2, .sub5loop1 + sound_ret + +Music_MobileAdapter_Ch4: + toggle_noise 3 + stereo_panning TRUE, FALSE + drum_speed 12 + rest 2 + rest 10 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 +.mainloop: + sound_call .sub1 + sound_call .sub1 +.loop1: + rest 4 + drum_note 3, 8 + drum_note 3, 8 + drum_note 3, 4 + drum_note 3, 1 + drum_note 3, 3 + drum_note 3, 4 + sound_loop 2, .loop1 +.loop2: + rest 4 + drum_note 3, 4 + sound_loop 11, .loop2 + rest 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + rest 4 + drum_note 3, 8 + drum_note 3, 8 + drum_note 3, 6 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + sound_loop 0, .mainloop + +.sub1: +.sub1loop1: + rest 4 + drum_note 3, 4 + sound_loop 7, .sub1loop1 + rest 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + sound_ret diff --git a/audio/music/mobileadaptermenu.asm b/audio/music/mobileadaptermenu.asm new file mode 100644 index 0000000..4312422 --- /dev/null +++ b/audio/music/mobileadaptermenu.asm @@ -0,0 +1,273 @@ +Music_MobileAdapterMenu: + channel_count 3 + channel 1, Music_MobileAdapterMenu_Ch1 + channel 2, Music_MobileAdapterMenu_Ch2 + channel 3, Music_MobileAdapterMenu_Ch3 + +Music_MobileAdapterMenu_Ch1: + tempo 168 + volume 7, 7 + pitch_offset 1 + stereo_panning FALSE, TRUE + duty_cycle 2 + note_type 12, 6, 6 + rest 2 +.mainloop: + sound_call .sub1 + sound_call .sub2 + octave 3 + note F#, 4 + note B_, 4 + note F#, 2 + note B_, 1 + rest 1 + note D#, 4 + sound_call .sub2 + octave 3 + note F#, 2 + octave 2 + note B_, 2 + octave 3 + note D#, 3 + note E_, 1 + note D#, 8 + sound_call .sub1 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note G#, 7 + octave 4 + note E_, 1 + note D#, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + note F#, 4 + note E_, 8 + note D#, 1 + rest 1 + note C#, 1 + rest 1 + note D#, 4 + note G#, 7 + octave 4 + note E_, 1 + note D#, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + note F#, 4 + note A_, 2 + note E_, 2 + note A_, 3 + note A_, 1 + note G#, 8 + sound_ret + +.sub2: + note E_, 1 + rest 1 + note A_, 1 + rest 1 + octave 4 + note C#, 3 + octave 3 + note B_, 1 + note A_, 2 + octave 4 + note E_, 1 + rest 1 + note C#, 4 + sound_ret + +Music_MobileAdapterMenu_Ch2: + stereo_panning TRUE, FALSE + note_type 12, 8, 4 + duty_cycle 2 + octave 4 + note E_, 1 + note G#, 1 +.mainloop: + sound_call .sub1 + note E_, 8 + sound_call .sub2 + note D#, 2 + note C#, 2 + note D#, 3 + note E_, 1 + note F#, 8 + sound_call .sub2 + note D#, 2 + note E_, 2 + note F#, 3 + note G#, 1 + note F#, 6 + note E_, 1 + note G#, 1 + sound_call .sub1 + note E_, 6 + note E_, 1 + note G#, 1 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note A_, 3 + note G#, 1 + note F#, 1 + rest 1 + note D#, 1 + rest 1 + octave 3 + note B_, 4 + octave 4 + note C#, 2 + note D#, 2 + note E_, 3 + note G#, 1 + note F#, 6 + note E_, 1 + note G#, 1 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note A_, 3 + note G#, 1 + note F#, 1 + rest 1 + note D#, 1 + rest 1 + octave 3 + note B_, 4 + octave 4 + note C#, 2 + octave 3 + note B_, 2 + octave 4 + note C#, 3 + note D#, 1 + sound_ret + +.sub2: + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note G#, 3 + note F#, 1 + note E_, 2 + note A_, 1 + rest 1 + note E_, 4 + sound_ret + +Music_MobileAdapterMenu_Ch3: + vibrato 8, 3, 4 + note_type 12, 2, 5 + rest 2 +.mainloop: + sound_call .sub1 + octave 2 + note B_, 1 + note G#, 1 + sound_call .sub2 + octave 2 + note B_, 2 + rest 2 + octave 3 + note F#, 2 + rest 1 + note D#, 1 + note F#, 2 + note D#, 1 + rest 1 + octave 2 + note B_, 2 + note F#, 1 + note G#, 1 + sound_call .sub2 + octave 2 + note B_, 2 + rest 2 + octave 3 + note F#, 2 + rest 1 + note D#, 1 + octave 2 + note B_, 1 + rest 1 + octave 3 + note D#, 1 + rest 1 + note F#, 4 + sound_call .sub1 + rest 2 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note E_, 2 + rest 2 + note B_, 2 + rest 1 + note G#, 1 + note D#, 1 + rest 1 + note B_, 1 + rest 1 + note D#, 4 + note C#, 2 + rest 2 + note A_, 2 + rest 1 + note F#, 1 + octave 2 + note B_, 1 + rest 1 + octave 3 + note D#, 1 + rest 1 + note F#, 4 + note E_, 2 + rest 2 + note B_, 2 + rest 1 + note G#, 1 + note D#, 1 + rest 1 + note B_, 1 + rest 1 + note D#, 4 + note C#, 2 + rest 2 + note A_, 2 + rest 1 + note C#, 1 + note E_, 3 + volume_envelope 3, 5 + note E_, 3 + volume_envelope 2, 5 + sound_ret + +.sub2: + note A_, 2 + rest 2 + octave 3 + note A_, 2 + rest 1 + note C#, 1 + note A_, 2 + octave 4 + note C#, 1 + rest 1 + octave 3 + note A_, 4 + sound_ret diff --git a/audio/music/mobilecenter.asm b/audio/music/mobilecenter.asm new file mode 100644 index 0000000..71c5169 --- /dev/null +++ b/audio/music/mobilecenter.asm @@ -0,0 +1,485 @@ +Music_MobileCenter: + channel_count 4 + channel 1, Music_MobileCenter_Ch1 + channel 2, Music_MobileCenter_Ch2 + channel 3, Music_MobileCenter_Ch3 + channel 4, Music_MobileCenter_Ch4 + +Music_MobileCenter_Ch1: + tempo 160 + volume 7, 7 + duty_cycle 1 + pitch_offset 2 + vibrato 8, 2, 2 + stereo_panning TRUE, FALSE + note_type 12, 10, 2 + octave 3 + note E_, 2 + note F_, 2 + note G_, 4 + note G_, 2 + note A_, 2 + note B_, 4 +.mainloop: + octave 3 + note E_, 2 + note C_, 2 + note E_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note B_, 2 + note A_, 2 + note G_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note B_, 2 + note G_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note G_, 2 + note A_, 2 + note B_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note A_, 2 + note G_, 2 + note E_, 2 + note C_, 2 + note E_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note B_, 2 + note A_, 2 + note G_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note B_, 4 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note C_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + note C_, 4 + note D_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 4 + octave 2 + note B_, 2 + octave 3 + note C_, 2 + note D_, 2 + note F_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + note A_, 2 + note G_, 8 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note A_, 4 + note G_, 2 + note A_, 2 + note B_, 2 + octave 4 + note C_, 2 + note D_, 2 + note C_, 2 + octave 3 + note B_, 4 + note A_, 2 + note B_, 2 + octave 4 + note C_, 2 + note D_, 2 + octave 3 + note B_, 2 + note A_, 2 + note G_, 4 + note F_, 2 + note G_, 2 + note A_, 2 + note F_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note C_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + sound_loop 0, .mainloop + +Music_MobileCenter_Ch2: + note_type 12, 12, 2 + duty_cycle 3 + rest 10 + octave 1 + note G_, 2 + note A_, 2 + note B_, 2 +.mainloop: + octave 2 + note C_, 2 + note E_, 2 + octave 1 + note G_, 2 + octave 2 + note E_, 2 + note C_, 2 + note E_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note G_, 2 + octave 1 + note G_, 2 + octave 2 + note G_, 2 + note D_, 2 + note G_, 2 + octave 1 + note G_, 2 + octave 2 + note G_, 2 + note D_, 2 + note G_, 2 + octave 1 + note G_, 2 + octave 2 + note G_, 2 + note D_, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note E_, 2 + note G_, 2 + note E_, 2 + note G_, 2 + note E_, 2 + note G_, 2 + octave 1 + note G_, 2 + octave 2 + note G_, 2 + note C_, 2 + note E_, 2 + octave 1 + note G_, 2 + octave 2 + note E_, 2 + note C_, 2 + note E_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note G_, 2 + octave 1 + note G_, 2 + octave 2 + note G_, 2 + note D_, 2 + note G_, 2 + octave 1 + note G_, 2 + octave 2 + note G_, 2 + note D_, 2 + note G_, 2 + octave 1 + note G_, 2 + octave 2 + note G_, 2 + note D_, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note C_, 2 + note E_, 2 + octave 1 + note G_, 2 + octave 2 + note E_, 2 + note C_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note E_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note D_, 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note D_, 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note E_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note E_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note E_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note E_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note D_, 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note D_, 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note E_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note E_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + sound_loop 0, .mainloop + +Music_MobileCenter_Ch3: + note_type 12, 2, 4 + vibrato 16, 3, 4 + octave 4 + note G_, 2 + note A_, 2 + note B_, 4 + note B_, 2 + octave 5 + note C_, 2 + note D_, 4 + note_type 12, 2, 5 +.mainloop: + note C_, 2 + octave 4 + note G_, 2 + octave 5 + note C_, 2 + note G_, 4 + note F_, 4 + note E_, 2 + note D_, 2 + octave 4 + note B_, 6 + note_type 12, 1, 0 + octave 6 + note G_, 1 + rest 1 + note D_, 1 + rest 1 + octave 7 + note D_, 1 + rest 3 + note_type 12, 2, 5 + octave 4 + note B_, 2 + note G_, 2 + note B_, 2 + octave 5 + note E_, 4 + note D_, 4 + octave 4 + note B_, 2 + octave 5 + note C_, 2 + note E_, 6 + octave 4 + note E_, 2 + note F_, 2 + note D_, 2 + note E_, 2 + octave 5 + note C_, 2 + octave 4 + note G_, 2 + octave 5 + note C_, 2 + note G_, 4 + note F_, 4 + note E_, 2 + note D_, 2 + octave 4 + note B_, 6 + note_type 12, 1, 0 + octave 6 + note G_, 1 + rest 1 + note D_, 1 + rest 1 + octave 7 + note D_, 1 + rest 3 + note_type 12, 2, 5 + octave 4 + note B_, 2 + note G_, 2 + note B_, 2 + octave 5 + note E_, 4 + note D_, 4 + octave 4 + note B_, 2 + octave 5 + note C_, 8 + octave 4 + note G_, 2 + note A_, 2 + note B_, 2 + octave 5 + note D_, 2 + vibrato 24, 4, 4 + note E_, 8 + note G_, 8 + note F_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 8 + octave 4 + note B_, 8 + octave 5 + note D_, 8 + note E_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note C_, 8 + note E_, 8 + note G_, 8 + note F_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + note A_, 8 + note G_, 4 + note F_, 2 + note E_, 2 + note F_, 8 + note E_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note C_, 8 + vibrato 16, 3, 4 + sound_loop 0, .mainloop + +Music_MobileCenter_Ch4: + toggle_noise 3 + stereo_panning FALSE, TRUE + drum_speed 12 + drum_note 10, 8 + drum_note 10, 4 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 +.mainloop: +.loop1: + drum_note 10, 2 + drum_note 2, 2 + drum_note 2, 2 + drum_note 2, 2 + drum_note 10, 2 + drum_note 2, 2 + drum_note 3, 2 + drum_note 2, 2 + sound_loop 3, .loop1 + drum_note 10, 2 + drum_note 2, 2 + drum_note 2, 2 + drum_note 2, 2 + drum_note 10, 2 + drum_note 3, 2 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + sound_loop 0, .mainloop diff --git a/audio/music/mom.asm b/audio/music/mom.asm new file mode 100644 index 0000000..9828c5d --- /dev/null +++ b/audio/music/mom.asm @@ -0,0 +1,109 @@ +Music_Mom: + channel_count 3 + channel 2, Music_Mom_Ch2 + channel 3, Music_Mom_Ch3 + channel 4, Music_Mom_Ch4 + +Music_Mom_Ch2: + tempo 144 + volume 7, 7 + stereo_panning FALSE, TRUE + duty_cycle 2 + note_type 6, 11, 3 + octave 3 + note B_, 1 + octave 4 + note E_, 1 + note G#, 1 + note A_, 1 + note B_, 8 +.mainloop: + note_type 12, 11, 1 + rest 4 + octave 3 + note C#, 6 + note D_, 4 + note C_, 2 + rest 2 + note C#, 6 + octave 2 + note E_, 4 + note A#, 2 + note B_, 2 + sound_loop 0, .mainloop + +Music_Mom_Ch3: + stereo_panning TRUE, FALSE + note_type 6, 2, 5 + octave 3 + note E_, 1 + note D_, 1 + octave 2 + note B_, 1 + note G#, 1 + note E_, 8 + volume_envelope 2, 3 +.mainloop: + octave 2 + note A_, 2 + rest 6 + octave 4 + note E_, 2 + rest 2 + octave 2 + note A_, 2 + rest 2 + octave 3 + note D_, 2 + rest 2 + octave 4 + note F#, 8 + note D#, 2 + rest 2 + octave 2 + note A_, 2 + rest 2 + octave 4 + note E_, 2 + rest 6 + octave 2 + note A_, 2 + rest 2 + octave 4 + note D_, 2 + rest 6 + note C#, 4 + note D_, 2 + rest 2 + sound_loop 0, .mainloop + +Music_Mom_Ch4: + toggle_noise 3 + drum_speed 12 + rest 6 +.mainloop: + drum_note 4, 1 + rest 1 + drum_note 7, 2 + drum_note 3, 1 + rest 1 + drum_note 8, 1 + rest 1 + drum_note 8, 1 + rest 1 + drum_note 7, 4 + drum_note 3, 1 + rest 1 + drum_note 4, 1 + rest 1 + drum_note 7, 4 + drum_note 3, 1 + rest 1 + drum_note 8, 1 + rest 1 + drum_note 8, 1 + rest 1 + drum_note 3, 2 + drum_note 4, 1 + rest 1 + sound_loop 0, .mainloop diff --git a/audio/music/mtmoon.asm b/audio/music/mtmoon.asm new file mode 100644 index 0000000..4fedde5 --- /dev/null +++ b/audio/music/mtmoon.asm @@ -0,0 +1,139 @@ +Music_MtMoon: + channel_count 4 + channel 1, Music_MtMoon_Ch1 + channel 2, Music_MtMoon_Ch2 + channel 3, Music_MtMoon_Ch3 + channel 4, Music_MtMoon_Ch4 + +Music_MtMoon_Ch1: + tempo 208 + volume 7, 7 + duty_cycle 2 + pitch_offset 1 + vibrato 8, 1, 4 + stereo_panning TRUE, FALSE + note_type 12, 4, 5 + rest 2 + sound_loop 0, Music_MtMoon_Ch2.mainloop + +Music_MtMoon_Ch2: + vibrato 11, 1, 5 + duty_cycle 2 + note_type 12, 8, 4 + stereo_panning FALSE, TRUE +.mainloop: + octave 4 + note D#, 6 + note C#, 6 + octave 3 + note B_, 2 + octave 4 + note C#, 2 + note D#, 2 + note G_, 2 + note D#, 2 + note C#, 6 + octave 3 + note B_, 2 + octave 4 + note C#, 2 + note D#, 2 + note G_, 2 + note D#, 2 + note C#, 6 + octave 3 + note B_, 2 + note A#, 2 + note B_, 6 + octave 4 + note C#, 10 + note G#, 6 + note F#, 6 + note E_, 2 + note F#, 2 + note G#, 2 + octave 5 + note C_, 2 + octave 4 + note G#, 2 + note F#, 6 + note E_, 2 + note F#, 2 + note G#, 2 + octave 5 + note C_, 2 + octave 4 + note G#, 2 + note F#, 6 + note E_, 2 + note D#, 2 + note E_, 6 + note F#, 6 + note E_, 4 + sound_loop 0, .mainloop + +Music_MtMoon_Ch3: +.mainloop: + note_type 12, 2, 8 +.loop1: + octave 2 + note B_, 2 + octave 3 + note D#, 2 + note G_, 2 + octave 2 + note B_, 2 + octave 3 + note D#, 2 + note G_, 2 + octave 2 + note B_, 2 + octave 3 + note D#, 2 + sound_loop 3, .loop1 + octave 2 + note B_, 2 + octave 3 + note D#, 2 + note G_, 2 + octave 2 + note B_, 2 + octave 3 + note D#, 2 + note G_, 2 + note D#, 2 + note E_, 2 +.loop2: + note E_, 2 + note G#, 2 + octave 4 + note C_, 2 + octave 3 + note E_, 2 + note G#, 2 + octave 4 + note C_, 2 + octave 3 + note E_, 2 + note G#, 2 + sound_loop 4, .loop2 + sound_loop 0, .mainloop + +Music_MtMoon_Ch4: + toggle_noise 5 + drum_speed 12 +.mainloop: + stereo_panning FALSE, TRUE + drum_note 11, 4 + drum_note 11, 8 + drum_note 11, 4 + stereo_panning TRUE, FALSE + drum_note 11, 4 + drum_note 11, 4 + drum_note 11, 4 + stereo_panning FALSE, TRUE + drum_note 11, 4 + drum_note 11, 4 + stereo_panning TRUE, FALSE + drum_note 11, 8 + sound_loop 0, .mainloop diff --git a/audio/music/mtmoonsquare.asm b/audio/music/mtmoonsquare.asm new file mode 100644 index 0000000..0b0dc03 --- /dev/null +++ b/audio/music/mtmoonsquare.asm @@ -0,0 +1,108 @@ +Music_MtMoonSquare: + channel_count 2 + channel 1, Music_MtMoonSquare_Ch1 + channel 2, Music_MtMoonSquare_Ch2 + +Music_MtMoonSquare_Ch1: + tempo 112 + volume 7, 7 + duty_cycle 2 + pitch_offset 1 + rest 1 +.mainloop: + note_type 12, 4, 4 +.loop1: + octave 4 + note D_, 2 + note E_, 2 + note F#, 4 + note F#, 2 + note A_, 2 + octave 5 + note D_, 4 + sound_loop 2, .loop1 +.loop2: + octave 4 + note E_, 2 + note F#, 2 + note G#, 4 + note G#, 2 + note B_, 2 + octave 5 + note E_, 4 + sound_loop 2, .loop2 +.loop3: + octave 4 + note C#, 2 + note D_, 2 + note E_, 4 + note E_, 2 + note G_, 2 + octave 5 + note C#, 4 + sound_loop 2, .loop3 +.loop4: + octave 4 + note D_, 2 + note E_, 2 + note F#, 4 + note F#, 2 + note A_, 2 + octave 5 + note D_, 4 + sound_loop 2, .loop4 + sound_loop 0, .mainloop + +Music_MtMoonSquare_Ch2: + duty_cycle 2 + vibrato 24, 2, 4 +.mainloop: + note_type 12, 8, 2 +.loop1: + octave 4 + note D_, 2 + note E_, 2 + note F#, 4 + note F#, 2 + note A_, 2 + octave 5 + note D_, 4 + note_type 12, 6, 2 + sound_loop 2, .loop1 + note_type 12, 8, 2 +.loop2: + octave 4 + note E_, 2 + note F#, 2 + note G#, 4 + note G#, 2 + note B_, 2 + octave 5 + note E_, 4 + note_type 12, 6, 2 + sound_loop 2, .loop2 + note_type 12, 8, 2 +.loop3: + octave 4 + note C#, 2 + note D_, 2 + note E_, 4 + note E_, 2 + note G_, 2 + octave 5 + note C#, 4 + note_type 12, 6, 2 + sound_loop 2, .loop3 + note_type 12, 8, 2 +.loop4: + octave 4 + note D_, 2 + note E_, 2 + note F#, 4 + note F#, 2 + note A_, 2 + octave 5 + note D_, 4 + note_type 12, 6, 2 + sound_loop 2, .loop4 + sound_loop 0, .mainloop diff --git a/audio/music/nationalpark.asm b/audio/music/nationalpark.asm new file mode 100644 index 0000000..254efa8 --- /dev/null +++ b/audio/music/nationalpark.asm @@ -0,0 +1,659 @@ +Music_NationalPark: + channel_count 4 + channel 1, Music_NationalPark_Ch1 + channel 2, Music_NationalPark_Ch2 + channel 3, Music_NationalPark_Ch3 + channel 4, Music_NationalPark_Ch4 + +Music_NationalPark_Ch1: + tempo 192 + volume 7, 7 + stereo_panning FALSE, TRUE + vibrato 24, 2, 4 + duty_cycle 1 + note_type 12, 7, 7 + rest 2 +.mainloop: + sound_call .sub1 + sound_call .sub1 + note_type 6, 6, 7 + sound_call .sub2 + note_type 12, 7, 7 + rest 16 + octave 2 + note A#, 1 + octave 3 + note D_, 1 + note F_, 1 + note G#, 1 + note D_, 1 + note F_, 1 + note A#, 1 + note_type 6, 6, 7 + octave 4 + note D_, 1 + note C#, 1 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + note C#, 1 + rest 1 + note D_, 1 + rest 3 + note D_, 1 + rest 3 + note D_, 1 + rest 1 + sound_call .sub2 + volume_envelope 7, 7 + octave 3 + note E_, 1 + note F_, 5 + note D#, 4 + rest 2 + note C_, 12 + note F_, 8 + note C#, 1 + volume_envelope 9, 8 + note D_, 16 + volume_envelope 7, 7 + note D_, 7 + note_type 12, 7, 7 + rest 4 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note G#, 6 + octave 3 + note F_, 2 + volume_envelope 4, 7 + note F_, 1 + note G#, 1 + volume_envelope 5, 7 + note F_, 1 + note G#, 1 + volume_envelope 7, 7 + note F_, 1 + note G#, 1 + volume_envelope 9, 7 + note F_, 1 + note G#, 1 + volume_envelope 7, 7 + octave 2 + note A_, 6 + octave 3 + note F#, 2 + volume_envelope 4, 7 + note F#, 1 + note A_, 1 + volume_envelope 5, 7 + note F#, 1 + note A_, 1 + volume_envelope 7, 7 + note F#, 1 + note A_, 1 + volume_envelope 9, 7 + note F#, 1 + note A_, 1 + volume_envelope 7, 7 + octave 2 + note G#, 6 + octave 3 + note F_, 2 + volume_envelope 4, 7 + octave 4 + note C_, 1 + note C#, 1 + volume_envelope 5, 7 + note C_, 1 + note C#, 1 + volume_envelope 7, 7 + note C_, 1 + note C#, 1 + volume_envelope 9, 7 + note C_, 1 + note C#, 1 + volume_envelope 7, 7 + octave 2 + note A_, 6 + octave 3 + note C#, 2 + volume_envelope 4, 7 + octave 4 + note C#, 1 + note D#, 1 + volume_envelope 5, 7 + note C#, 1 + note D#, 1 + volume_envelope 7, 7 + note C#, 1 + note D#, 1 + volume_envelope 9, 7 + note C#, 1 + note D#, 1 + volume_envelope 7, 7 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A_, 2 + octave 4 + note C#, 2 + octave 3 + note A_, 2 + volume_envelope 4, 7 + octave 4 + note C#, 1 + note D#, 1 + volume_envelope 5, 7 + note C#, 1 + note D#, 1 + volume_envelope 7, 7 + note C#, 1 + note D#, 1 + volume_envelope 9, 7 + note C#, 1 + note D#, 1 + volume_envelope 7, 7 + note C_, 2 + octave 3 + note G#, 2 + octave 4 + note C_, 2 + octave 3 + note G#, 2 + octave 4 + note D#, 2 + note C_, 2 + note D#, 2 + note C_, 2 + note D_, 2 + octave 3 + note A#, 2 + octave 4 + note D_, 2 + octave 3 + note A#, 2 + volume_envelope 5, 7 + octave 4 + note F_, 1 + note D#, 1 + volume_envelope 6, 7 + note D_, 1 + note D#, 1 + volume_envelope 7, 7 + note F_, 1 + note F#, 1 + volume_envelope 9, 7 + note G#, 1 + note A#, 1 + volume_envelope 7, 7 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A_, 2 + octave 4 + note C#, 2 + octave 3 + note A_, 2 + volume_envelope 4, 7 + octave 4 + note C#, 1 + note D#, 1 + volume_envelope 5, 7 + note C#, 1 + note D#, 1 + volume_envelope 7, 7 + note C#, 1 + note D#, 1 + volume_envelope 9, 7 + note C#, 1 + note D#, 1 + volume_envelope 7, 7 + note C_, 2 + octave 3 + note G#, 2 + octave 4 + note C_, 2 + octave 3 + note G#, 2 + octave 4 + note D#, 2 + note C_, 2 + note D#, 2 + note C_, 2 + note D_, 2 + octave 3 + note A#, 2 + octave 4 + note D_, 2 + octave 3 + note A#, 2 + octave 4 + note D_, 2 + octave 3 + note A#, 2 + octave 4 + note D_, 2 + octave 3 + note A#, 2 + sound_ret + +.sub2: + rest 16 + rest 3 + octave 4 + note A#, 1 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + note A#, 2 + rest 4 + rest 16 + rest 3 + note A_, 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 2 + rest 4 + sound_ret + +Music_NationalPark_Ch2: + vibrato 20, 2, 4 + duty_cycle 1 + note_type 12, 10, 7 + rest 2 + stereo_panning TRUE, FALSE +.mainloop: + note_type 12, 10, 7 + sound_call .sub1 + octave 3 + note D_, 8 + sound_call .sub1 + rest 2 + volume_envelope 10, 7 + octave 4 + note G#, 2 + note F#, 2 + note F_, 2 + note_type 6, 10, 7 + sound_call .sub2 + octave 3 + note B_, 1 + octave 4 + note C_, 5 + octave 3 + note G#, 4 + rest 2 + octave 4 + note A#, 8 + note G#, 2 + rest 2 + note F#, 2 + rest 2 + note G#, 4 + note E_, 1 + note F_, 14 + volume_envelope 8, 7 + note G_, 1 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note G_, 1 + rest 1 + note G#, 1 + rest 3 + note G#, 1 + rest 3 + note G#, 1 + rest 1 + volume_envelope 10, 7 + sound_call .sub2 + octave 3 + note B_, 1 + octave 4 + note C_, 5 + octave 3 + note G#, 4 + rest 2 + note A#, 12 + octave 4 + note C_, 8 + octave 3 + note A_, 1 + vibrato 0, 0, 0 + volume_envelope 11, 8 + note A#, 16 + vibrato 20, 2, 4 + volume_envelope 11, 7 + note A#, 11 + octave 2 + note D#, 2 + note D_, 2 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note C#, 6 + note G#, 2 + octave 3 + note C#, 8 + octave 2 + note C#, 6 + note A_, 2 + octave 3 + note C#, 8 + octave 2 + note C#, 6 + note G#, 2 + octave 3 + note C#, 8 + octave 2 + note C#, 6 + note A_, 2 + octave 3 + note F#, 8 + octave 1 + note F#, 6 + octave 2 + note C#, 2 + note A#, 8 + octave 1 + note F#, 6 + octave 2 + note C#, 2 + note A_, 8 + octave 1 + note F_, 6 + octave 2 + note C_, 2 + note G#, 8 + octave 1 + note A#, 6 + octave 2 + note F_, 2 + octave 3 + note D_, 8 + octave 1 + note F#, 6 + octave 2 + note C#, 2 + note A#, 8 + octave 1 + note F#, 6 + octave 2 + note C#, 2 + note A_, 8 + octave 1 + note F_, 6 + octave 2 + note C_, 2 + note G#, 8 + octave 1 + note A#, 6 + octave 2 + note F_, 2 + sound_ret + +.sub2: + octave 4 + note E_, 1 + note F_, 5 + note F#, 4 + rest 2 + note C#, 7 + volume_envelope 8, 7 + octave 5 + note E_, 1 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note E_, 1 + rest 1 + note F_, 2 + volume_envelope 10, 7 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + octave 4 + note E_, 1 + note F_, 5 + note F#, 4 + rest 2 + note D#, 7 + volume_envelope 8, 7 + octave 5 + note D_, 1 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note D_, 1 + rest 1 + note D#, 2 + volume_envelope 10, 7 + octave 4 + note D_, 2 + note C#, 2 + sound_ret + +Music_NationalPark_Ch3: + vibrato 22, 2, 4 + note_type 12, 1, 1 + octave 4 + note G#, 1 + note A#, 1 + stereo_panning TRUE, TRUE +.mainloop: + sound_call .sub1 + octave 5 + note A#, 14 + octave 4 + note G#, 1 + note A#, 1 + sound_call .sub1 + octave 5 + note A#, 8 + octave 4 + note D_, 8 + volume_envelope 1, 5 + sound_call .sub2 + octave 4 + note D_, 1 + octave 3 + note F_, 3 + sound_call .sub2 + octave 4 + note D_, 1 + octave 3 + note F_, 1 + volume_envelope 1, 1 + octave 4 + note G#, 1 + note A#, 1 + sound_loop 0, .mainloop + +.sub1: + octave 5 + note C_, 16 + note C#, 14 + note G#, 1 + note A#, 1 + octave 6 + note C_, 16 + note C#, 10 + note C_, 2 + note C#, 2 + note D#, 2 + note F_, 2 + note D#, 2 + note C#, 2 + octave 5 + note A#, 10 + octave 6 + note F_, 2 + note D#, 2 + note C#, 2 + octave 5 + note A_, 9 + octave 6 + note D_, 1 + octave 6 + note D#, 2 + note C#, 2 + note C_, 2 + octave 5 + note G#, 4 + octave 6 + note G#, 4 + note D#, 2 + note F_, 14 + note D_, 1 + note D#, 1 + note F_, 2 + note D#, 2 + note C#, 2 + octave 5 + note A#, 10 + octave 6 + note F_, 2 + note D#, 2 + note C#, 2 + octave 5 + note A_, 10 + octave 6 + note D#, 2 + note C#, 2 + note C_, 2 + octave 5 + note G#, 4 + note A#, 4 + octave 6 + note C_, 2 + sound_ret + +.sub2: + octave 2 + note F#, 3 + octave 3 + note C#, 2 + rest 1 + note A#, 4 + note C#, 1 + rest 1 + note A#, 1 + note C#, 3 + octave 2 + note F#, 3 + octave 3 + note C#, 2 + rest 1 + note A_, 4 + note C#, 1 + rest 1 + note A_, 1 + note C#, 3 + octave 2 + note F_, 3 + octave 3 + note C_, 2 + rest 1 + note G#, 4 + note C_, 1 + rest 1 + note G#, 1 + note C_, 3 + octave 2 + note A#, 3 + octave 3 + note F_, 2 + rest 1 + octave 4 + note D_, 4 + octave 3 + note F_, 1 + rest 1 + sound_ret + +Music_NationalPark_Ch4: + toggle_noise 3 + drum_speed 12 + rest 2 +.mainloop: +.loop1: + rest 16 + sound_loop 23, .loop1 + rest 8 + drum_note 11, 2 + drum_note 3, 2 + drum_note 11, 1 + drum_note 3, 1 + drum_note 12, 2 +.loop2: + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 12, 2 + sound_loop 7, .loop2 + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 11, 2 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 11, 1 + drum_note 4, 1 + sound_loop 0, .mainloop diff --git a/audio/music/newbarktown.asm b/audio/music/newbarktown.asm new file mode 100644 index 0000000..c7cbbfe --- /dev/null +++ b/audio/music/newbarktown.asm @@ -0,0 +1,325 @@ +Music_NewBarkTown: + channel_count 3 + channel 1, Music_NewBarkTown_Ch1 + channel 2, Music_NewBarkTown_Ch2 + channel 3, Music_NewBarkTown_Ch3 + + db $3 ; unused, leftover from a channel 4 + +Music_NewBarkTown_Ch1: + tempo 187 + volume 7, 7 + stereo_panning FALSE, TRUE + vibrato 18, 2, 3 + note_type 12, 8, 7 + rest 4 +.mainloop: + duty_cycle 0 + sound_call .sub1 + octave 3 + note C#, 1 + rest 1 + octave 2 + note A_, 1 + rest 1 + octave 3 + note G_, 2 + note F#, 2 + duty_cycle 2 + volume_envelope 8, 2 + note E_, 1 + note F#, 1 + note E_, 1 + note D_, 1 + note C#, 1 + octave 2 + note B_, 1 + note A_, 1 + note G_, 1 + duty_cycle 0 + volume_envelope 8, 7 + sound_call .sub1 + octave 3 + note C#, 1 + rest 1 + octave 2 + note A_, 1 + rest 1 + octave 3 + note E_, 2 + duty_cycle 2 + volume_envelope 8, 2 + note C#, 1 + rest 1 + octave 2 + note A_, 1 + octave 3 + note C#, 1 + note E_, 1 + note G_, 1 + note A_, 1 + octave 4 + note C#, 1 + note E_, 1 + note A_, 1 + duty_cycle 1 + volume_envelope 5, -6 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + octave 2 + note G_, 2 + note B_, 2 + octave 3 + note D_, 2 + note F#, 4 + note G_, 4 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note C#, 2 + note E_, 2 + note G_, 4 + note A_, 4 + note B_, 2 + volume_envelope 8, 7 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note F#, 1 + rest 1 + note D_, 1 + rest 1 + note A_, 2 + note D_, 1 + rest 1 + note F#, 1 + rest 1 + note D_, 1 + rest 1 + note A#, 2 + note D_, 1 + rest 1 + note F#, 1 + rest 1 + note D_, 1 + rest 1 + note B_, 2 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note D_, 1 + rest 1 + octave 4 + note C_, 2 + octave 3 + note D_, 1 + rest 1 + octave 2 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + octave 3 + note G_, 2 + octave 2 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note G#, 1 + rest 1 + octave 3 + note E_, 2 + octave 2 + note B_, 1 + rest 1 + sound_ret + +.sub2: + octave 2 + note G_, 2 + note B_, 2 + octave 3 + note D_, 2 + note F#, 4 + note G_, 4 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note C#, 2 + note E_, 2 + note G_, 4 + note A_, 4 + note E_, 2 + sound_ret + +Music_NewBarkTown_Ch2: + stereo_panning TRUE, TRUE + vibrato 18, 2, 3 + note_type 6, 10, 7 + rest 8 +.mainloop: + duty_cycle 2 + note_type 6, 10, 7 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + volume_envelope 8, 7 + octave 5 + note B_, 6 + note A_, 6 + volume_envelope 7, 7 + octave 6 + note D_, 4 + note C#, 16 + sound_call .sub2 + volume_envelope 8, 7 + octave 5 + note B_, 6 + note A_, 6 + volume_envelope 7, 7 + octave 6 + note D_, 4 + note E_, 16 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note D_, 4 + rest 8 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + note D_, 2 + rest 2 + note D_, 8 + note A#, 2 + rest 2 + note D_, 4 + rest 8 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + note D_, 2 + rest 2 + note D_, 8 + octave 3 + note C_, 2 + rest 2 + octave 2 + note G_, 4 + rest 8 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + octave 1 + note G#, 2 + rest 2 + note G#, 8 + octave 2 + note D_, 2 + rest 2 + note A_, 4 + rest 8 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + octave 1 + note A_, 2 + rest 2 + note A_, 8 + octave 2 + note C#, 4 + sound_ret + +.sub2: + note_type 6, 9, 7 + duty_cycle 2 + octave 4 + note B_, 12 + note A_, 12 + note G_, 8 + note_type 12, 9, 7 + note E_, 16 + sound_ret + +Music_NewBarkTown_Ch3: + stereo_panning TRUE, FALSE + note_type 12, 1, 0 + octave 5 + note D_, 2 + note E_, 2 +.mainloop: + vibrato 22, 2, 3 + note F#, 4 + note A_, 4 + note G_, 2 + note F#, 2 + note E_, 2 + note G_, 2 + note F#, 6 + note D_, 2 + octave 4 + note A_, 6 + note G_, 1 + note A_, 1 + note B_, 4 + octave 5 + note D_, 4 + note E_, 2 + note D_, 2 + note C#, 2 + note D_, 2 + note E_, 6 + note F#, 2 + note E_, 4 + rest 2 + note D_, 1 + note E_, 1 + note F#, 4 + note A_, 4 + note A#, 2 + note A_, 2 + note G_, 2 + note A#, 2 + note A_, 6 + octave 6 + note C#, 2 + note D_, 6 + octave 5 + note E_, 1 + note F#, 1 + note G_, 6 + note A_, 2 + note B_, 8 + note A_, 6 + note G_, 1 + note F#, 1 + note E_, 4 + rest 4 + volume_envelope 2, 5 + vibrato 18, 5, 3 + octave 2 + note G_, 16 + note A_, 16 + note G_, 16 + note A_, 16 + note G_, 16 + note A_, 16 + note G_, 16 + note A_, 14 + volume_envelope 1, 0 + vibrato 22, 2, 3 + octave 5 + note D_, 1 + note E_, 1 + sound_loop 0, .mainloop diff --git a/audio/music/nothing.asm b/audio/music/nothing.asm new file mode 100644 index 0000000..957a435 --- /dev/null +++ b/audio/music/nothing.asm @@ -0,0 +1,12 @@ +Music_Nothing: + channel_count 4 + channel 1, Music_Nothing_Ch1 + channel 2, Music_Nothing_Ch2 + channel 3, Music_Nothing_Ch3 + channel 4, Music_Nothing_Ch4 + +Music_Nothing_Ch1: +Music_Nothing_Ch2: +Music_Nothing_Ch3: +Music_Nothing_Ch4: + sound_ret diff --git a/audio/music/pallettown.asm b/audio/music/pallettown.asm new file mode 100644 index 0000000..3196bc2 --- /dev/null +++ b/audio/music/pallettown.asm @@ -0,0 +1,358 @@ +Music_PalletTown: + channel_count 3 + channel 1, Music_PalletTown_Ch1 + channel 2, Music_PalletTown_Ch2 + channel 3, Music_PalletTown_Ch3 + +Music_PalletTown_Ch1: + tempo 188 + volume 7, 7 + vibrato 18, 2, 4 + pitch_offset 1 + stereo_panning FALSE, TRUE +.mainloop: + duty_cycle 2 + note_type 12, 7, 8 + octave 3 + note B_, 12 + note A_, 1 + note D_, 1 + note F#, 1 + note A_, 1 + note B_, 12 + note D#, 1 + note G_, 1 + note B_, 1 + octave 4 + note D#, 1 + note E_, 4 + note D_, 4 + note C_, 4 + octave 3 + note A_, 4 + volume_envelope 7, 7 + note G_, 8 + volume_envelope 7, 8 + note F#, 4 + note A_, 4 + note B_, 12 + note A_, 1 + note D_, 1 + note F#, 1 + note A_, 1 + note G_, 2 + note B_, 2 + octave 4 + note E_, 2 + note G_, 4 + note F#, 2 + note G_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + note C_, 2 + note E_, 2 + note F#, 2 + note E_, 2 + note D_, 2 + note C_, 2 + octave 3 + note B_, 8 + volume_envelope 7, 7 + note B_, 8 +.loop1: + duty_cycle 3 + volume_envelope 9, 2 + note G_, 2 + note E_, 2 + note G_, 2 + note E_, 2 + note G_, 2 + note D#, 2 + note G_, 2 + note D#, 2 + volume_envelope 5, -7 + note G_, 1 + note A_, 1 + note B_, 1 + octave 4 + note C_, 1 + note D_, 2 + note G_, 4 + note D_, 2 + note C_, 2 + octave 3 + note B_, 2 + sound_loop 2, .loop1 + volume_envelope 3, -7 + octave 4 + note C_, 4 + octave 3 + note B_, 4 + note A_, 4 + note G_, 4 + note F#, 4 + note D_, 4 + note E_, 4 + volume_envelope 7, 2 + note C_, 1 + note E_, 1 + note G_, 1 + octave 4 + note C_, 1 + note D_, 1 + note A_, 1 + octave 5 + note D_, 2 + volume_envelope 6, 2 + note D_, 2 + volume_envelope 2, 2 + note D_, 2 + volume_envelope 2, -7 + octave 3 + note D_, 4 + note E_, 4 + note G_, 6 + note A_, 1 + note G_, 1 + volume_envelope 1, -7 + note F#, 8 + sound_loop 0, .mainloop + +Music_PalletTown_Ch2: + vibrato 18, 4, 4 + duty_cycle 2 + stereo_panning TRUE, FALSE +.mainloop: + note_type 12, 8, 8 + octave 1 + note G_, 2 + note B_, 2 + octave 2 + note D_, 2 + note G_, 6 + note F#, 4 + octave 1 + note G_, 2 + note B_, 2 + octave 2 + note D_, 2 + note G_, 6 + octave 1 + note B_, 4 + octave 2 + note C_, 2 + octave 1 + note G_, 2 + note B_, 2 + octave 2 + note C_, 4 + note D_, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note D_, 2 + rest 4 + note D_, 4 + note F#, 4 + octave 1 + note G_, 2 + note B_, 2 + octave 2 + note D_, 2 + note G_, 6 + note F#, 4 + note E_, 2 + note D_, 2 + note E_, 2 + octave 1 + note B_, 4 + octave 2 + note D_, 2 + note E_, 2 + note F#, 2 + note G_, 8 + note A_, 8 + note G_, 2 + note D_, 2 + note G_, 2 + octave 3 + note D_, 4 + octave 2 + note B_, 2 + octave 3 + note C_, 2 + note D_, 2 +.loop1: + volume_envelope 10, 2 + octave 3 + note E_, 2 + octave 2 + note C_, 2 + octave 3 + note E_, 2 + octave 2 + note C_, 2 + octave 3 + note D#, 2 + octave 2 + note C_, 2 + octave 3 + note D#, 2 + octave 2 + note C_, 2 + volume_envelope 9, 3 + note G_, 6 + note G_, 1 + note G_, 3 + note D_, 2 + note G_, 4 + sound_loop 2, .loop1 + note C_, 2 + octave 3 + note E_, 4 + octave 2 + note C_, 1 + octave 3 + note C_, 3 + octave 2 + note C_, 2 + note E_, 2 + note C_, 2 + note D_, 2 + octave 3 + note D_, 4 + octave 2 + note D_, 1 + note G_, 3 + note E_, 2 + note G_, 2 + note E_, 2 + volume_envelope 1, -7 + note F#, 4 + volume_envelope 8, 8 + note F#, 4 + note B_, 4 + note G_, 4 + note A_, 2 + note D_, 2 + note G_, 2 + note D_, 4 + note C_, 2 + octave 1 + note B_, 2 + note A_, 2 + sound_loop 0, .mainloop + +Music_PalletTown_Ch3: + vibrato 20, 2, 4 +.mainloop: + note_type 12, 1, 0 + octave 6 + note D_, 2 + note C_, 2 + octave 5 + note B_, 2 + note A_, 2 + octave 6 + note G_, 2 + note E_, 2 + note F#, 2 + note E_, 2 + note D_, 6 + octave 5 + note B_, 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note A_, 1 + rest 1 + note B_, 1 + rest 1 + octave 6 + note C_, 8 + rest 2 + octave 5 + note F#, 2 + note G_, 2 + note A_, 2 + note B_, 6 + octave 6 + note C_, 1 + octave 5 + note B_, 1 + note A_, 8 + octave 6 + note D_, 2 + note C_, 2 + octave 5 + note B_, 2 + octave 6 + note D_, 2 + note G_, 1 + rest 1 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note G_, 1 + rest 1 + note E_, 6 + note D_, 1 + rest 1 + note D_, 8 + note C_, 2 + octave 5 + note B_, 2 + note A_, 2 + note G_, 2 + octave 6 + note D_, 2 + note C_, 2 + octave 5 + note B_, 2 + note A_, 2 + note G_, 8 + rest 2 + note G_, 2 + note A_, 2 + note B_, 2 + octave 6 + note C_, 8 + note D_, 6 + note C_, 2 + octave 5 + note B_, 8 + rest 2 + note G_, 2 + note A_, 2 + note B_, 2 + octave 6 + note C_, 2 + rest 2 + note C_, 4 + note D_, 6 + note C_, 1 + note D_, 1 + octave 5 + note B_, 8 + rest 2 + note B_, 2 + note A_, 2 + note G_, 2 + note A_, 8 + note E_, 4 + note B_, 4 + note A_, 8 + note G_, 4 + note E_, 4 + note F#, 7 + rest 1 + note G_, 3 + rest 1 + note B_, 3 + rest 1 + note B_, 8 + note A_, 8 + sound_loop 0, .mainloop diff --git a/audio/music/pokeflutechannel.asm b/audio/music/pokeflutechannel.asm new file mode 100644 index 0000000..46d164c --- /dev/null +++ b/audio/music/pokeflutechannel.asm @@ -0,0 +1,228 @@ +Music_PokeFluteChannel: + channel_count 3 + channel 1, Music_PokeFluteChannel_Ch1 + channel 2, Music_PokeFluteChannel_Ch2 + channel 3, Music_PokeFluteChannel_Ch3 + +Music_PokeFluteChannel_Ch1: + tempo 240 + volume 7, 7 + stereo_panning TRUE, FALSE + duty_cycle 3 + pitch_offset 2 + note_type 12, 11, 4 + rest 4 + octave 3 + note E_, 8 + note E_, 8 + note_type 12, 11, 3 + note F_, 2 + note E_, 2 + note D_, 2 + note C_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note A_, 2 + note B_, 16 + rest 2 + octave 2 + note G_, 4 + note A_, 8 +.mainloop: + octave 3 + note E_, 2 + note G_, 2 + note F_, 4 + octave 2 + note F_, 8 + octave 3 + note G_, 2 + note A_, 2 + note G_, 4 + octave 2 + note E_, 4 + octave 3 + note G_, 2 + note A_, 2 + note B_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 8 + note A_, 8 + note G_, 8 + octave 2 + note B_, 2 + octave 3 + note D_, 2 + octave 2 + note B_, 4 + note G_, 8 + octave 3 + note C_, 4 + note E_, 2 + note D_, 2 + octave 2 + note G_, 4 + note A_, 8 + sound_loop 0, .mainloop + +Music_PokeFluteChannel_Ch2: + stereo_panning FALSE, TRUE + duty_cycle 3 + pitch_offset 1 + note_type 12, 12, 4 + rest 4 + octave 3 + note C_, 8 + octave 2 + note G_, 8 + note A_, 8 + octave 3 + note E_, 8 + note_type 12, 12, 3 + octave 2 + note E_, 2 + note G_, 2 + octave 3 + note C_, 2 + note E_, 2 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + note E_, 2 + note D_, 2 + octave 2 + note E_, 2 + octave 3 + note C_, 2 + octave 2 + note F_, 2 + octave 3 + note C_, 2 + octave 2 + note E_, 2 + note G_, 2 +.mainloop: + octave 3 + note C_, 2 + note E_, 2 + octave 2 + note A_, 4 + note C_, 4 + octave 3 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + octave 2 + note G_, 4 + note C_, 4 + note G_, 2 + note E_, 2 + octave 3 + note C_, 2 + octave 2 + note A_, 2 + note D_, 2 + note G_, 2 + note B_, 2 + octave 3 + note D_, 2 + octave 2 + note D_, 2 + note F#, 2 + note A_, 2 + octave 3 + note D_, 2 + octave 2 + note G_, 2 + octave 3 + note D_, 2 + note G_, 2 + note D_, 2 + octave 2 + note D_, 4 + note G_, 4 + note E_, 2 + octave 3 + note C_, 2 + note C_, 4 + octave 2 + note G_, 2 + octave 3 + note E_, 2 + octave 2 + note G_, 2 + note B_, 2 + note E_, 2 + octave 3 + note C_, 2 + octave 2 + note F_, 2 + octave 3 + note C_, 2 + octave 2 + note E_, 2 + note G_, 2 + sound_loop 0, .mainloop + +Music_PokeFluteChannel_Ch3: + vibrato 16, 1, 4 + note_type 12, 1, 0 + sound_call .sub1 + sound_call .sub1 +.mainloop: + rest 4 + octave 4 + note C_, 2 + octave 5 + note F_, 2 + note E_, 2 + note F_, 2 + octave 6 + note C_, 4 + rest 4 + octave 4 + note C_, 2 + octave 5 + note G_, 2 + note F#, 2 + note G_, 2 + octave 6 + note C_, 4 + octave 5 + note B_, 2 + note A_, 2 + note B_, 4 + note A_, 2 + note G_, 2 + note A_, 4 + note G_, 2 + note F#, 2 + note G_, 8 + rest 4 + sound_call .sub1 + sound_loop 0, .mainloop + +.sub1: + octave 5 + note E_, 2 + note F_, 2 + note G_, 4 + note A_, 2 + note G_, 2 + octave 6 + note C_, 4 + note C_, 2 + note D_, 2 + note C_, 2 + octave 5 + note G_, 2 + note A_, 2 + note F_, 2 + note G_, 4 + sound_ret diff --git a/audio/music/pokemoncenter.asm b/audio/music/pokemoncenter.asm new file mode 100644 index 0000000..a5687ca --- /dev/null +++ b/audio/music/pokemoncenter.asm @@ -0,0 +1,405 @@ +Music_PokemonCenter: + channel_count 4 + channel 1, Music_PokemonCenter_Ch1 + channel 2, Music_PokemonCenter_Ch2 + channel 3, Music_PokemonCenter_Ch3 + channel 4, Music_PokemonCenter_Ch4 + +Music_PokemonCenter_Ch1: + tempo 152 + volume 7, 7 + duty_cycle 2 + vibrato 10, 1, 4 + pitch_offset 1 +.mainloop: + stereo_panning FALSE, TRUE + note_type 12, 8, 3 + octave 3 + note F#, 2 + note F_, 2 + note F#, 2 + octave 4 + note D_, 4 + note C#, 2 + octave 3 + note B_, 2 + note A_, 2 + note B_, 2 + note A_, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note A_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + octave 4 + note C#, 4 + octave 3 + note B_, 2 + note A_, 2 + note G_, 2 + note F#, 2 + note A_, 2 + note B_, 2 + octave 4 + note C#, 2 + note D_, 2 + note C#, 2 + octave 3 + note B_, 2 + note A_, 2 + note F#, 2 + note F_, 2 + note F#, 2 + octave 4 + note D_, 4 + note C#, 2 + octave 3 + note B_, 2 + note A_, 2 + note B_, 2 + note A_, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note A_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + octave 4 + note C#, 4 + octave 3 + note B_, 2 + note A_, 2 + note G_, 2 + note_type 12, 11, 4 + note F#, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note A_, 2 + note B_, 2 + stereo_panning TRUE, FALSE + note F#, 2 + note E_, 2 + note D_, 4 + note E_, 2 + note F#, 2 + note G_, 2 + note A_, 2 + note B_, 2 + note A_, 2 + note G_, 4 + note E_, 2 + note F#, 2 + note G_, 2 + note A_, 2 + note G_, 2 + note F#, 2 + note E_, 4 + note C#, 2 + note D_, 2 + note E_, 2 + note G_, 2 + note F#, 2 + note G_, 2 + note A_, 2 + note B_, 2 + note A_, 8 + octave 4 + note D_, 2 + note C#, 2 + octave 3 + note B_, 4 + note A_, 2 + note B_, 2 + octave 4 + note C#, 2 + note D_, 2 + note E_, 2 + note D_, 2 + note C#, 4 + octave 3 + note B_, 2 + octave 4 + note C#, 2 + note D_, 2 + note E_, 2 + note C#, 2 + octave 3 + note B_, 2 + note A_, 4 + note G_, 2 + note A_, 2 + note B_, 2 + note G_, 2 + note A_, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note F#, 2 + note G_, 2 + sound_loop 0, .mainloop + +Music_PokemonCenter_Ch2: + vibrato 16, 2, 5 +.mainloop: + stereo_panning TRUE, TRUE + sound_call .sub1 + stereo_panning FALSE, TRUE + note_type 12, 10, 5 + octave 3 + note A_, 4 + note E_, 4 + stereo_panning TRUE, TRUE + sound_call .sub2 + note D_, 2 + note F#, 6 + stereo_panning FALSE, TRUE + note_type 12, 10, 5 + octave 3 + note A_, 4 + note E_, 4 + stereo_panning TRUE, TRUE + sound_call .sub1 + stereo_panning FALSE, TRUE + note_type 12, 10, 5 + octave 3 + note A_, 4 + note E_, 4 + stereo_panning TRUE, TRUE + sound_call .sub2 + note D_, 8 + stereo_panning FALSE, TRUE + note_type 12, 10, 5 + octave 3 + note D_, 4 + note E_, 4 + note_type 12, 12, 6 + octave 4 + note F#, 8 + note A_, 8 + note G_, 2 + note A_, 2 + note G_, 2 + note F#, 2 + note E_, 8 + note C#, 8 + note E_, 8 + note F#, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note D_, 8 + note F#, 8 + note A_, 8 + note G_, 2 + note F#, 2 + note G_, 2 + note A_, 2 + note B_, 8 + note A_, 4 + note G_, 2 + note F#, 2 + note G_, 8 + note F#, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note D_, 8 + sound_loop 0, .mainloop + +.sub1: + duty_cycle 2 + note_type 12, 12, 2 + octave 4 + note D_, 2 + octave 3 + note A_, 2 + octave 4 + note D_, 2 + volume_envelope 12, 3 + note A_, 4 + note G_, 4 + note F#, 2 + note E_, 2 + note C#, 6 + sound_ret + +.sub2: + note_type 12, 12, 2 + octave 4 + note C#, 2 + octave 3 + note A_, 2 + octave 4 + note C#, 2 + volume_envelope 12, 3 + note F#, 4 + note E_, 4 + note C#, 2 + sound_ret + +Music_PokemonCenter_Ch3: + note_type 12, 2, 8 +.mainloop: + stereo_panning TRUE, FALSE + octave 3 + note D_, 1 + rest 5 + note F#, 1 + rest 3 + note F#, 1 + rest 1 + note G_, 1 + rest 1 + note F#, 1 + rest 1 + sound_call .sub1 + sound_call .sub2 + note F#, 1 + rest 5 + note A_, 1 + rest 3 + note A_, 1 + rest 1 + note G_, 1 + rest 1 + note A_, 1 + rest 1 + note D_, 1 + rest 5 + note F#, 1 + rest 3 + note F#, 1 + rest 1 + note G_, 1 + rest 1 + note F#, 1 + rest 1 + sound_call .sub1 + sound_call .sub2 + note D_, 1 + rest 5 + note F#, 1 + rest 3 + note F#, 1 + rest 1 + note D_, 1 + rest 1 + note G_, 1 + rest 1 + stereo_panning TRUE, TRUE + sound_call .sub3 + note G_, 1 + rest 5 + note B_, 1 + rest 3 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 5 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + note G_, 1 + rest 1 + note F#, 1 + rest 5 + note A_, 1 + rest 3 + note A_, 1 + rest 1 + note G#, 1 + rest 1 + note A_, 1 + rest 1 + sound_call .sub3 + note G_, 1 + rest 5 + note B_, 1 + rest 3 + note B_, 1 + rest 3 + note B_, 1 + rest 1 + note E_, 1 + rest 5 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + note G_, 1 + rest 1 + note F#, 1 + rest 5 + note A_, 1 + rest 3 + note A_, 1 + rest 1 + note G_, 1 + rest 1 + note E_, 1 + rest 1 + sound_loop 0, .mainloop + +.sub1: + note E_, 1 + rest 5 + note A_, 1 + rest 3 + note A_, 1 + rest 3 + note A_, 1 + rest 1 + sound_ret + +.sub2: + note E_, 1 + rest 5 + note A_, 1 + rest 3 + note A_, 1 + rest 1 + note G_, 1 + rest 1 + note A_, 1 + rest 1 + sound_ret + +.sub3: + note F#, 1 + rest 5 + note A_, 1 + rest 3 + note A_, 1 + rest 3 + note A_, 1 + rest 1 + sound_ret + +Music_PokemonCenter_Ch4: + toggle_noise 3 + drum_speed 12 + stereo_panning TRUE, TRUE +.mainloop: + drum_note 8, 6 + drum_note 8, 4 + drum_note 8, 2 + drum_note 8, 2 + drum_note 8, 2 + sound_loop 0, .mainloop diff --git a/audio/music/pokemonchannel.asm b/audio/music/pokemonchannel.asm new file mode 100644 index 0000000..2348323 --- /dev/null +++ b/audio/music/pokemonchannel.asm @@ -0,0 +1,232 @@ +Music_PokemonChannel: + channel_count 4 + channel 1, Music_PokemonChannel_Ch1 + channel 2, Music_PokemonChannel_Ch2 + channel 3, Music_PokemonChannel_Ch3 + channel 4, Music_PokemonChannel_Ch4 + +Music_PokemonChannel_Ch1: + tempo 128 + volume 7, 7 + vibrato 8, 3, 8 + duty_cycle 1 + stereo_panning FALSE, TRUE + note_type 12, 11, 3 + octave 2 + note B_, 1 + rest 2 + note F#, 1 + note B_, 1 + rest 1 + octave 3 + note F#, 4 + duty_cycle 0 + octave 2 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note_type 6, 11, 3 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + duty_cycle 1 + octave 3 + note C_, 2 + rest 4 + note G_, 2 + note C_, 2 + rest 2 + note B_, 8 + duty_cycle 0 + note C_, 4 + note C_, 4 + octave 2 + note G_, 2 + rest 2 + duty_cycle 3 + octave 4 + note D_, 2 + rest 2 + note D_, 2 + rest 2 + octave 3 + note G_, 2 + note B_, 2 + octave 4 + note D_, 2 + note F#, 2 + note G_, 2 + rest 2 + note D#, 2 + rest 2 + note C_, 2 + rest 2 + note D#, 2 + rest 2 + rest 8 + octave 3 + note G_, 2 + rest 6 + note B_, 2 + rest 6 + note D_, 2 + rest 6 + sound_ret + +Music_PokemonChannel_Ch2: + duty_cycle 1 + vibrato 8, 3, 8 + stereo_panning TRUE, TRUE + note_type 12, 11, 3 + octave 3 + note G_, 3 + note A_, 1 + note B_, 1 + rest 1 + octave 4 + note D_, 4 + duty_cycle 0 + octave 3 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note_type 6, 11, 3 + note D_, 1 + rest 1 + note G_, 1 + rest 1 + duty_cycle 1 + octave 4 + note C_, 6 + note D_, 2 + note E_, 2 + rest 2 + note G_, 8 + duty_cycle 0 + octave 3 + note G_, 4 + note F#, 4 + note E_, 2 + rest 2 + duty_cycle 3 + octave 4 + note B_, 2 + rest 2 + note A#, 2 + rest 2 + note B_, 8 + octave 5 + note C_, 2 + rest 2 + note C_, 2 + rest 2 + octave 4 + note A#, 2 + rest 2 + note G#, 2 + rest 2 + rest 8 + note D_, 2 + octave 3 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + note D_, 1 + rest 1 + octave 4 + note G_, 2 + rest 6 + octave 3 + note G_, 2 + rest 6 + sound_ret + +Music_PokemonChannel_Ch3: + vibrato 8, 3, 8 + note_type 12, 2, 5 + stereo_panning TRUE, FALSE + octave 2 + note G_, 1 + rest 2 + note B_, 1 + octave 3 + note D_, 1 + rest 1 + note G_, 6 + rest 4 + note C_, 1 + rest 2 + octave 2 + note G_, 1 + octave 3 + note C_, 1 + rest 1 + note E_, 6 + rest 4 + octave 4 + note G_, 1 + rest 1 + note D_, 1 + rest 1 + octave 3 + note G_, 4 + note G#, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + note D#, 1 + rest 1 + note G#, 1 + rest 1 + note D_, 1 + octave 3 + note B_, 1 + note G_, 1 + note B_, 1 + note G_, 1 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + octave 2 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + sound_ret + +Music_PokemonChannel_Ch4: + toggle_noise 3 + drum_speed 12 +.loop1: + drum_note 11, 3 + drum_note 11, 1 + drum_note 3, 2 + drum_note 1, 4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 11, 1 + drum_note 3, 1 + sound_loop 2, .loop1 + drum_note 9, 2 + drum_note 11, 2 + drum_note 9, 1 + drum_note 9, 1 + drum_note 9, 1 + drum_note 9, 1 + drum_note 1, 4 + drum_note 9, 1 + drum_note 9, 1 + drum_note 9, 1 + drum_note 9, 1 + drum_note 12, 4 + drum_note 3, 4 + drum_note 11, 4 + drum_note 11, 4 + sound_ret diff --git a/audio/music/pokemonlullaby.asm b/audio/music/pokemonlullaby.asm new file mode 100644 index 0000000..277a5d6 --- /dev/null +++ b/audio/music/pokemonlullaby.asm @@ -0,0 +1,133 @@ +Music_PokemonLullaby: + channel_count 3 + channel 1, Music_PokemonLullaby_Ch1 + channel 2, Music_PokemonLullaby_Ch2 + channel 3, Music_PokemonLullaby_Ch3 + +Music_PokemonLullaby_Ch1: + tempo 224 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 +.mainloop: + note_type 12, 10, 7 + octave 3 + note G_, 16 + octave 4 + note C_, 16 + stereo_panning TRUE, FALSE + octave 3 + note G_, 16 + stereo_panning FALSE, TRUE + octave 4 + note C_, 8 + stereo_panning TRUE, FALSE + octave 3 + note B_, 8 + stereo_panning FALSE, TRUE + note G_, 16 + stereo_panning TRUE, FALSE + octave 4 + note C_, 8 + stereo_panning FALSE, TRUE + octave 3 + note B_, 8 + stereo_panning TRUE, FALSE + note G_, 8 + stereo_panning TRUE, TRUE + rest 2 + note G_, 2 + note G_, 2 + note B_, 2 + octave 4 + note C_, 4 + octave 3 + note B_, 4 + octave 4 + note C_, 4 + octave 3 + note B_, 4 + note G_, 16 + octave 4 + note C_, 8 + octave 3 + note B_, 8 + sound_loop 0, .mainloop + +Music_PokemonLullaby_Ch2: + vibrato 16, 1, 4 + duty_cycle 0 + note_type 12, 11, 4 +.mainloop: + rest 16 + rest 10 + octave 4 + note G_, 2 + note F#, 2 + note G_, 2 + volume_envelope 11, 7 + note E_, 12 + note D_, 2 + note E_, 2 + note F_, 4 + note G_, 4 + note F_, 2 + note E_, 2 + note D_, 2 + note F_, 2 + note E_, 10 + volume_envelope 11, 5 + note D_, 2 + note D_, 2 + volume_envelope 12, 7 + note E_, 2 + note F_, 4 + note E_, 4 + note F_, 4 + volume_envelope 11, 5 + note G_, 2 + note G_, 2 + note D#, 2 + volume_envelope 11, 7 + note E_, 14 + volume_envelope 8, 7 + octave 3 + note F_, 8 + note G_, 4 + volume_envelope 11, 5 + octave 4 + note G_, 2 + note G_, 2 + volume_envelope 11, 7 + note D#, 2 + note E_, 16 + rest 14 + sound_loop 0, .mainloop + +Music_PokemonLullaby_Ch3: + note_type 12, 1, 1 +.mainloop: + stereo_panning TRUE, FALSE + octave 4 + note C_, 2 + note E_, 2 + note G_, 2 + note B_, 2 + octave 5 + note C_, 2 + octave 4 + note B_, 2 + note A_, 2 + note G_, 2 + stereo_panning FALSE, TRUE + note D_, 2 + note F_, 2 + note A_, 2 + octave 5 + note C_, 2 + note D_, 2 + note C_, 2 + octave 4 + note B_, 2 + note A_, 2 + sound_loop 0, .mainloop diff --git a/audio/music/pokemonmarch.asm b/audio/music/pokemonmarch.asm new file mode 100644 index 0000000..80acde9 --- /dev/null +++ b/audio/music/pokemonmarch.asm @@ -0,0 +1,460 @@ +Music_PokemonMarch: + channel_count 4 + channel 1, Music_PokemonMarch_Ch1 + channel 2, Music_PokemonMarch_Ch2 + channel 3, Music_PokemonMarch_Ch3 + channel 4, Music_PokemonMarch_Ch4 + +Music_PokemonMarch_Ch1: + tempo 144 + volume 7, 7 + stereo_panning TRUE, FALSE + duty_cycle 3 + pitch_offset 1 + note_type 12, 4, 2 + octave 3 + note D_, 4 + volume_envelope 6, 2 + note D_, 4 + volume_envelope 8, 2 + note D_, 4 + volume_envelope 10, 2 + note D_, 4 + note_type 8, 10, 2 +.mainloop: + sound_call .sub1 + note D#, 2 + note C_, 2 + note D#, 2 + note C_, 2 + sound_call .sub1 + note D#, 2 + note C_, 2 + note D#, 2 + note G_, 2 + sound_call .sub1 + note C_, 2 + note C_, 2 + note D#, 2 + note C_, 2 + sound_call .sub1 + note D#, 2 + note C_, 2 + note C#, 2 + note D#, 2 + sound_call .sub2 + note F_, 2 + note D_, 2 + note F_, 2 + note D_, 2 + sound_call .sub2 + note F_, 2 + note D_, 2 + note F_, 2 + note A_, 2 + sound_call .sub2 + note D_, 2 + note D_, 2 + note F_, 2 + note D_, 2 + sound_call .sub2 + note F_, 2 + note D_, 2 + note F_, 2 + note G_, 2 + sound_call .sub2 + note F_, 2 + note D_, 2 + note F_, 2 + note D_, 2 + sound_call .sub1 + note D#, 2 + note C_, 2 + note D#, 2 + note C_, 2 + octave 2 + note A#, 2 + note A#, 2 + octave 3 + note C_, 2 + note D_, 2 + note C#, 2 + note C_, 2 + octave 2 + note A#, 2 + rest 4 + note D#, 2 + rest 4 + octave 3 + note D#, 2 + note D#, 2 + note F_, 2 + note G_, 2 + note F#, 2 + note F_, 2 + note D#, 4 + note F_, 2 + note G_, 4 + note A#, 2 + sound_loop 0, .mainloop + +.sub1: + rest 4 + octave 3 + note D#, 1 + note D_, 1 + note D#, 2 + rest 2 + note D#, 2 + note D#, 2 + rest 2 + sound_ret + +.sub2: + rest 4 + note F_, 1 + note E_, 1 + note F_, 2 + rest 2 + note F_, 2 + note F_, 2 + rest 2 + sound_ret + +Music_PokemonMarch_Ch2: + duty_cycle 2 + vibrato 16, 2, 2 + note_type 12, 11, 2 + octave 3 + note G_, 4 + note G_, 4 + note G_, 4 + note G_, 4 +.mainloop: + note_type 12, 11, 7 + octave 3 + note G#, 12 + note_type 8, 11, 3 + note D#, 2 + note G#, 2 + note A#, 2 + octave 4 + note C_, 2 + rest 16 + rest 6 + note_type 8, 11, 7 + octave 3 + note G#, 16 + note_type 8, 11, 3 + note D#, 2 + note G#, 4 + note A#, 2 + octave 4 + note C_, 4 + note C#, 2 + note C_, 4 + note C#, 2 + note C_, 4 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + note G#, 2 + note_type 8, 11, 7 + note A#, 16 + note_type 8, 11, 3 + note A#, 2 + note F_, 2 + note A#, 2 + octave 4 + note C_, 2 + note D_, 2 + rest 16 + rest 6 + note_type 8, 11, 7 + octave 3 + note A#, 16 + note_type 8, 11, 3 + note F_, 2 + note A#, 4 + octave 4 + note C_, 2 + note D_, 4 + note D#, 2 + note D_, 4 + note D#, 2 + note D_, 4 + note D#, 2 + note D_, 2 + note C_, 2 + octave 3 + note B_, 2 + note_type 8, 11, 7 + note A#, 16 + note_type 8, 11, 3 + note A_, 2 + note A#, 4 + octave 4 + note C_, 2 + note_type 8, 11, 7 + octave 3 + note G#, 16 + note_type 8, 11, 3 + note A#, 2 + note G#, 4 + note F_, 2 + note D#, 2 + note D#, 2 + note F_, 2 + note G_, 2 + note F#, 2 + note F_, 2 + note D#, 2 + rest 2 + octave 4 + note D#, 1 + note D_, 1 + note D#, 1 + rest 5 + octave 3 + note G_, 2 + note G_, 2 + note G#, 2 + note A#, 2 + note A_, 2 + note G#, 2 + note G_, 2 + rest 2 + octave 4 + note G_, 1 + note F#, 1 + note G_, 1 + rest 5 + sound_loop 0, .mainloop + +Music_PokemonMarch_Ch3: + stereo_panning FALSE, TRUE + note_type 12, 1, 6 + rest 16 + note_type 8, 1, 6 +.mainloop: + sound_call .sub1 + rest 2 + octave 4 + note D#, 2 + sound_call .sub1 + octave 4 + note G#, 2 + note D#, 2 + sound_call .sub1 + rest 2 + octave 4 + note D#, 2 + octave 3 + note G#, 2 + rest 2 + octave 4 + note D#, 2 + octave 3 + note D#, 2 + rest 2 + octave 4 + note D#, 2 + octave 3 + note G#, 2 + rest 2 + octave 4 + note D#, 2 + octave 3 + note D#, 2 + note G_, 2 + note G#, 2 +.loop1: + octave 3 + note A#, 2 + rest 2 + octave 4 + note F_, 2 + octave 3 + note F_, 2 + rest 2 + octave 4 + note F_, 2 + octave 3 + note G_, 2 + rest 2 + octave 4 + note F_, 2 + octave 3 + note A_, 2 + rest 1 + octave 4 + note F_, 2 + rest 1 + sound_loop 3, .loop1 + octave 3 + note A#, 2 + rest 2 + octave 4 + note F_, 2 + octave 3 + note F_, 2 + rest 2 + octave 4 + note F_, 2 + octave 3 + note A#, 2 + rest 2 + octave 4 + note F_, 2 + note D_, 2 + note C_, 2 + octave 3 + note B_, 2 + note A#, 2 + rest 2 + octave 4 + note F_, 2 + octave 3 + note F_, 2 + rest 2 + octave 4 + note F_, 2 + octave 3 + note G_, 2 + rest 2 + octave 4 + note F_, 2 + octave 3 + note F_, 2 + note G_, 2 + note A#, 2 + note G#, 2 + rest 2 + octave 4 + note D#, 2 + octave 3 + note D#, 2 + rest 2 + octave 4 + note D#, 2 + octave 3 + note F_, 2 + rest 2 + octave 4 + note D#, 2 + octave 3 + note G#, 2 + rest 2 + octave 4 + note C_, 2 + note D#, 2 + note D#, 2 + note F_, 2 + note G_, 2 + note F#, 2 + note F_, 2 + note D#, 2 + rest 4 + octave 3 + note D#, 2 + rest 4 + octave 4 + note G_, 2 + note G_, 2 + note G#, 2 + note A#, 2 + note A_, 2 + note G#, 2 + note G_, 2 + rest 2 + note D#, 2 + note F_, 2 + rest 2 + note G#, 2 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note G#, 2 + rest 2 + octave 4 + note D#, 2 + octave 3 + note D#, 2 + rest 2 + octave 4 + note D#, 2 + octave 3 + note F_, 2 + rest 2 + octave 4 + note D#, 2 + octave 3 + note G_, 2 + sound_ret + +Music_PokemonMarch_Ch4: + stereo_panning TRUE, FALSE + toggle_noise 5 + drum_speed 8 + sound_call .sub2 +.mainloop: + sound_call .sub1 + drum_note 1, 4 + drum_note 1, 2 + drum_note 1, 4 + drum_note 1, 2 + drum_note 1, 4 + drum_note 1, 5 + drum_speed 6 + drum_note 3, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_speed 8 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub2 + drum_note 2, 4 + drum_note 2, 2 + drum_note 2, 4 + drum_note 2, 2 + drum_note 2, 6 + drum_note 1, 2 + drum_speed 4 + rest 5 + drum_speed 6 + drum_note 3, 1 + drum_note 3, 1 + drum_speed 8 + sound_call .sub2 + sound_loop 0, .mainloop + +.sub1: + drum_note 1, 4 + drum_note 1, 2 + drum_note 1, 4 + drum_note 1, 2 + drum_note 1, 4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 2, 2 + drum_note 2, 2 + sound_ret + +.sub2: + drum_note 1, 4 + drum_note 1, 2 + drum_note 1, 4 + drum_note 1, 4 + drum_note 1, 4 + drum_note 2, 2 + drum_note 3, 2 + drum_note 2, 2 + sound_ret diff --git a/audio/music/postcredits.asm b/audio/music/postcredits.asm new file mode 100644 index 0000000..40c80a4 --- /dev/null +++ b/audio/music/postcredits.asm @@ -0,0 +1,265 @@ +Music_PostCredits: + channel_count 2 + channel 1, Music_PostCredits_Ch1 + channel 2, Music_PostCredits_Ch2 + + db $2 ; unused, leftover from a channel 3 + +Music_PostCredits_Ch1: + tempo 271 + volume 7, 7 + transpose 0, 3 + duty_cycle 2 + note_type 12, 9, 3 + rest 8 +.mainloop: + octave 3 + note C_, 2 + note E_, 2 + note G_, 2 + octave 4 + note C_, 2 + note E_, 2 + volume_envelope 7, 3 + note E_, 2 + volume_envelope 5, 3 + note E_, 2 + volume_envelope 4, 3 + note E_, 2 + volume_envelope 9, 3 + octave 2 + note B_, 2 + octave 3 + note D_, 2 + note G_, 2 + note B_, 2 + octave 4 + note D_, 2 + volume_envelope 7, 3 + note D_, 2 + volume_envelope 5, 3 + note D_, 2 + volume_envelope 4, 3 + note D_, 2 + volume_envelope 9, 3 + octave 2 + note A#, 2 + octave 3 + note D_, 2 + note G_, 2 + note A#, 2 + octave 4 + note D_, 2 + volume_envelope 7, 3 + note D_, 2 + volume_envelope 5, 3 + note D_, 2 + volume_envelope 4, 3 + note D_, 2 + volume_envelope 9, 3 + octave 2 + note A_, 2 + octave 3 + note C_, 2 + note F_, 2 + note A_, 2 + octave 4 + note C_, 2 + volume_envelope 7, 3 + note C_, 2 + volume_envelope 5, 3 + note C_, 2 + volume_envelope 4, 3 + note C_, 2 + volume_envelope 9, 3 + octave 2 + note G#, 2 + octave 3 + note C_, 2 + note F_, 2 + note G#, 2 + octave 4 + note C_, 2 + volume_envelope 7, 3 + note C_, 2 + volume_envelope 5, 3 + note C_, 2 + volume_envelope 4, 3 + note C_, 2 + volume_envelope 9, 3 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + note E_, 2 + note G_, 2 + octave 4 + note C_, 2 + volume_envelope 7, 3 + note C_, 2 + volume_envelope 6, 3 + note C_, 2 + volume_envelope 4, 3 + note C_, 2 + volume_envelope 9, 3 + octave 2 + note F#, 2 + note A_, 2 + octave 3 + note D_, 2 + note F#, 2 + note A_, 2 + volume_envelope 7, 3 + note A_, 2 + volume_envelope 6, 3 + note A_, 2 + volume_envelope 4, 3 + note A_, 2 + volume_envelope 9, 3 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + note D_, 2 + note G_, 2 + note G_, 2 + volume_envelope 7, 3 + note G_, 2 + volume_envelope 9, 3 + note D_, 2 + octave 2 + note G_, 2 + sound_loop 0, .mainloop + +Music_PostCredits_Ch2: + transpose 0, 3 + duty_cycle 2 + note_type 12, 10, 3 + octave 5 + note E_, 2 + volume_envelope 7, 3 + note E_, 2 + volume_envelope 10, 3 + note F_, 2 + volume_envelope 7, 3 + note F_, 2 +.mainloop: + volume_envelope 10, 3 + note G_, 2 + volume_envelope 7, 3 + note G_, 2 + volume_envelope 5, 3 + note G_, 2 + volume_envelope 4, 3 + note G_, 2 + volume_envelope 9, 3 + octave 6 + note D_, 2 + note C_, 2 + octave 5 + note B_, 2 + octave 6 + note C_, 2 + octave 5 + note G_, 2 + volume_envelope 7, 3 + note G_, 2 + volume_envelope 5, 3 + note G_, 2 + volume_envelope 4, 3 + note G_, 2 + volume_envelope 3, 3 + note G_, 2 + volume_envelope 10, 3 + note E_, 2 + volume_envelope 7, 3 + note E_, 2 + volume_envelope 10, 3 + note F_, 2 + note G_, 2 + volume_envelope 7, 3 + note G_, 2 + volume_envelope 5, 3 + note G_, 2 + volume_envelope 4, 3 + note G_, 2 + volume_envelope 3, 3 + note G_, 2 + volume_envelope 10, 3 + note A_, 2 + volume_envelope 7, 3 + note A_, 2 + volume_envelope 10, 3 + note E_, 2 + note G_, 2 + volume_envelope 7, 3 + note G_, 2 + volume_envelope 5, 3 + note G_, 2 + volume_envelope 10, 3 + note F_, 2 + volume_envelope 7, 3 + note F_, 2 + volume_envelope 5, 3 + note F_, 2 + volume_envelope 10, 3 + note D_, 2 + note E_, 2 + note F_, 2 + volume_envelope 7, 3 + note F_, 2 + volume_envelope 5, 3 + note F_, 2 + volume_envelope 4, 3 + note F_, 2 + volume_envelope 3, 3 + note F_, 2 + volume_envelope 10, 3 + note G_, 2 + volume_envelope 7, 3 + note G_, 2 + volume_envelope 10, 3 + note F_, 2 + note E_, 2 + note D#, 2 + note E_, 2 + note B_, 2 + volume_envelope 7, 3 + note B_, 2 + volume_envelope 5, 3 + note B_, 2 + volume_envelope 10, 3 + note A_, 2 + volume_envelope 7, 3 + note A_, 2 + volume_envelope 10, 3 + note D_, 2 + volume_envelope 7, 3 + note D_, 2 + volume_envelope 5, 3 + note D_, 2 + volume_envelope 4, 3 + note D_, 2 + volume_envelope 3, 3 + note D_, 2 + note D_, 2 + volume_envelope 2, 3 + note D_, 2 + note D_, 2 + volume_envelope 10, 3 + note G_, 2 + volume_envelope 7, 3 + octave 4 + note G_, 2 + volume_envelope 10, 3 + octave 5 + note D_, 2 + note G_, 2 + volume_envelope 7, 3 + note G_, 2 + volume_envelope 5, 3 + note G_, 2 + volume_envelope 10, 3 + note E_, 2 + note F_, 2 + sound_loop 0, .mainloop diff --git a/audio/music/printer.asm b/audio/music/printer.asm new file mode 100644 index 0000000..18ceb4e --- /dev/null +++ b/audio/music/printer.asm @@ -0,0 +1,320 @@ +Music_Printer: + channel_count 1 + channel 3, Music_Printer_Ch3 + +Music_Printer_Ch3: + tempo 256 + note_type 12, 2, 0 + octave 4 + note B_, 6 + octave 5 + note C#, 1 + rest 1 + octave 4 + note B_, 6 + octave 5 + note C#, 1 + rest 1 + octave 4 + note B_, 1 + rest 1 + octave 5 + note E_, 1 + rest 1 + note D#, 1 + rest 1 + note C#, 1 + rest 1 + octave 4 + note B_, 1 + rest 1 + note A_, 1 + rest 1 + note G#, 1 + rest 1 + note F#, 1 + rest 1 +.mainloop: + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note F#, 1 + rest 1 + octave 5 + note C#, 1 + note C_, 1 + note C#, 1 + rest 1 + octave 4 + note F#, 1 + rest 1 + note E_, 1 + rest 1 + note G#, 1 + rest 1 + note E_, 1 + rest 1 + note G#, 1 + rest 1 + note E_, 1 + rest 1 + octave 5 + note E_, 1 + note D#, 1 + note E_, 1 + rest 1 + octave 4 + note D#, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note B_, 1 + rest 1 + note A_, 1 + rest 1 + note G#, 1 + rest 1 + note F#, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + note D_, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note F#, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note F#, 1 + rest 1 + note E_, 1 + rest 1 + note G#, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note G#, 1 + rest 1 + note E_, 1 + rest 1 + note G#, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note G#, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note C#, 1 + rest 1 + note A_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note C#, 1 + rest 1 + note A_, 1 + rest 1 + note B_, 1 + note A#, 1 + note B_, 1 + rest 1 + note E_, 1 + rest 1 + note F#, 1 + rest 1 + note G#, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + note D_, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note F#, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note F#, 1 + rest 1 + note E_, 1 + rest 1 + note G#, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note G#, 1 + rest 1 + note E_, 1 + rest 1 + note G#, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note G#, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note C#, 1 + rest 1 + note A_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note F#, 1 + rest 1 + note D#, 1 + rest 1 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note G#, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + note D#, 1 + rest 1 + sound_loop 0, .mainloop diff --git a/audio/music/profoak.asm b/audio/music/profoak.asm new file mode 100644 index 0000000..d9fdca7 --- /dev/null +++ b/audio/music/profoak.asm @@ -0,0 +1,312 @@ +Music_ProfOak: + channel_count 3 + channel 1, Music_ProfOak_Ch1 + channel 2, Music_ProfOak_Ch2 + channel 3, Music_ProfOak_Ch3 + +Music_ProfOak_Ch1: + tempo 118 + volume 7, 7 + vibrato 18, 3, 4 + pitch_offset 1 + stereo_panning TRUE, FALSE + duty_cycle 3 + note_type 12, 9, 8 + octave 2 + note F#, 1 + note B_, 1 + octave 3 + note D#, 1 + note F#, 1 + note A_, 16 + note G#, 8 + volume_envelope 9, 7 + note G#, 8 +.loop1: + volume_envelope 9, 1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub2 + sound_loop 2, .loop1 +.mainloop: + sound_call .sub3 + sound_call .sub3 + sound_call .sub4 + sound_call .sub4 + transpose 0, 2 + sound_call .sub3 + sound_call .sub3 + transpose 0, 0 + sound_call .sub4 + sound_call .sub4 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note B_, 2 + octave 3 + note E_, 2 + note G#, 2 + note E_, 2 + note B_, 2 + note E_, 2 + note G#, 2 + note E_, 2 + sound_ret + +.sub2: + octave 2 + note B_, 2 + octave 3 + note D#, 2 + note F#, 2 + note D#, 2 + note B_, 2 + note D#, 2 + note F#, 2 + note D#, 2 + sound_ret + +.sub3: + octave 2 + note A_, 2 + octave 3 + note C#, 2 + note E_, 2 + note C#, 1 + note E_, 1 + note C#, 2 + volume_envelope 9, 2 + note A_, 2 + volume_envelope 9, 1 + note C#, 2 + volume_envelope 9, 2 + note E_, 2 + volume_envelope 9, 1 + sound_ret + +.sub4: + octave 2 + note B_, 1 + octave 3 + note E_, 1 + volume_envelope 9, 2 + note G#, 4 + note E_, 4 + volume_envelope 9, 1 + note E_, 1 + note G#, 1 + volume_envelope 9, 2 + note B_, 4 + volume_envelope 9, 1 + sound_ret + +Music_ProfOak_Ch2: + vibrato 18, 3, 4 + duty_cycle 3 + note_type 12, 10, 8 + octave 3 + note B_, 1 + octave 4 + note D#, 1 + note F#, 1 + note A#, 1 + note B_, 16 + volume_envelope 10, 7 + note B_, 10 + duty_cycle 2 +.loop1: + volume_envelope 11, 2 + octave 3 + note B_, 2 + octave 4 + note C#, 2 + note D#, 2 + note E_, 4 + note D#, 2 + note C#, 4 + volume_envelope 9, 1 + note B_, 2 + octave 5 + note C#, 2 + note D#, 2 + note E_, 4 + note D#, 2 + note C#, 4 + volume_envelope 11, 2 + octave 3 + note B_, 2 + note A_, 2 + note G#, 2 + note A_, 4 + note B_, 1 + rest 1 + note B_, 4 + volume_envelope 9, 1 + octave 4 + note B_, 2 + note A_, 2 + note G#, 2 + note A_, 4 + note B_, 2 + note B_, 4 + sound_loop 2, .loop1 + rest 6 + volume_envelope 11, 4 +.mainloop: + note C#, 6 + octave 3 + note A_, 1 + octave 4 + note C#, 1 + note E_, 6 + note C#, 1 + note E_, 1 + note F#, 4 + note E_, 4 + note D#, 4 + note C#, 4 + octave 3 + note B_, 6 + note G#, 1 + note B_, 1 + octave 4 + note E_, 8 + volume_envelope 8, 2 + note B_, 6 + note G#, 1 + note B_, 1 + volume_envelope 8, 3 + octave 5 + note E_, 8 + volume_envelope 11, 4 + octave 3 + note A_, 6 + note F#, 1 + note A_, 1 + octave 4 + note D#, 8 + note E_, 4 + note D#, 4 + note C#, 4 + note C_, 4 + octave 3 + note B_, 6 + note G#, 1 + note B_, 1 + octave 4 + note E_, 6 + octave 3 + note B_, 1 + octave 4 + note E_, 1 + note G#, 16 + sound_loop 0, .mainloop + +Music_ProfOak_Ch3: + stereo_panning FALSE, TRUE + note_type 12, 1, 4 + rest 4 + octave 3 + note E_, 2 + rest 2 + octave 4 + note E_, 1 + rest 1 + octave 3 + note A_, 2 + rest 2 + octave 2 + note B_, 2 + octave 3 + note B_, 1 + rest 1 + note E_, 2 + sound_call .sub1 +.loop1: + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub2 + sound_loop 2, .loop1 +.mainloop: + sound_call .sub3 + sound_call .sub3 + sound_call .sub4 + sound_call .sub4 + transpose 0, 2 + sound_call .sub3 + sound_call .sub3 + transpose 0, 0 + sound_call .sub4 + sound_call .sub4 + sound_loop 0, .mainloop + +.sub1: + note E_, 2 + rest 2 + octave 4 + note E_, 1 + rest 1 + octave 3 + note G#, 2 + rest 2 + octave 2 + note B_, 2 + octave 3 + note B_, 1 + rest 1 + note E_, 2 + sound_ret + +.sub2: + octave 2 + note B_, 2 + rest 2 + octave 4 + note D#, 1 + rest 1 + octave 3 + note D#, 2 + rest 2 + note F#, 2 + note B_, 1 + rest 1 + note D#, 2 + sound_ret + +.sub3: + octave 2 + note A_, 2 + rest 2 + octave 3 + note A_, 1 + rest 1 + octave 2 + note A_, 2 + rest 2 + octave 3 + note E_, 2 + note A_, 1 + rest 1 + note C#, 2 + sound_ret + +.sub4: + octave 2 + note G#, 2 + rest 2 + octave 3 + note G#, 1 + rest 1 + octave 2 + note G#, 2 + rest 2 + octave 3 + note E_, 2 + note G#, 1 + rest 1 + octave 2 + note B_, 2 + sound_ret diff --git a/audio/music/profoakspokemontalk.asm b/audio/music/profoakspokemontalk.asm new file mode 100644 index 0000000..a8d3010 --- /dev/null +++ b/audio/music/profoakspokemontalk.asm @@ -0,0 +1,308 @@ +Music_ProfOaksPokemonTalk: + channel_count 3 + channel 1, Music_ProfOaksPokemonTalk_Ch1 + channel 2, Music_ProfOaksPokemonTalk_Ch2 + channel 3, Music_ProfOaksPokemonTalk_Ch3 + + db $3 ; unused, leftover from a channel 4 + +Music_ProfOaksPokemonTalk_Ch1: + tempo 164 + volume 7, 7 + stereo_panning FALSE, TRUE + vibrato 6, 2, 5 + duty_cycle 1 + note_type 12, 9, 4 + rest 8 + octave 3 + note B_, 1 + octave 4 + note C#, 1 + note D#, 1 + note E_, 1 + note C#, 1 + note D#, 1 + note E_, 1 + note F#, 1 +.mainloop: + note D#, 6 + note C#, 1 + octave 3 + note B_, 1 + note F#, 1 + note G#, 1 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + note A#, 1 + note B_, 2 + note F#, 1 + note G#, 1 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note F#, 1 + note G#, 1 + note F#, 1 + rest 1 + note A#, 4 + octave 4 + note D#, 6 + note C#, 1 + octave 3 + note B_, 1 + note G#, 1 + note B_, 1 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note A#, 1 + note B_, 1 + note F#, 1 + note A#, 1 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 1 + note A#, 1 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note A#, 4 + note E_, 2 + octave 2 + note B_, 1 + octave 3 + note E_, 1 + note G#, 2 + note E_, 1 + note G#, 1 + note B_, 1 + octave 4 + note C#, 1 + octave 3 + note B_, 1 + octave 4 + note C#, 1 + octave 3 + note B_, 4 + note F#, 2 + note D#, 1 + note F#, 1 + note B_, 2 + note F#, 1 + note B_, 1 + octave 4 + note D#, 1 + note E_, 1 + note D#, 1 + note E_, 1 + note D#, 4 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + note E_, 2 + note F#, 2 + note C#, 2 + note E_, 2 + note F#, 2 + note E_, 2 + note C#, 2 + octave 3 + note A#, 1 + rest 1 + note B_, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + note D#, 1 + rest 1 + note E_, 1 + rest 1 + note F_, 1 + rest 1 + note F#, 1 + rest 1 + sound_loop 0, .mainloop + +Music_ProfOaksPokemonTalk_Ch2: + vibrato 8, 2, 4 + duty_cycle 3 + note_type 12, 10, 7 + stereo_panning TRUE, TRUE + octave 3 + note B_, 1 + octave 4 + note C#, 1 + note D#, 1 + note E_, 1 + note C#, 1 + note D#, 1 + note E_, 1 + note F#, 1 + note D#, 1 + note E_, 1 + note F#, 1 + note G#, 1 + note E_, 1 + note F#, 1 + note G#, 1 + note A#, 1 +.mainloop: + note B_, 6 + note A#, 1 + note G#, 1 + note F#, 6 + note F_, 1 + note F#, 1 + note G#, 4 + note F#, 8 + note F#, 4 + note G#, 6 + note F#, 1 + note E_, 1 + note D#, 6 + note D_, 1 + note D#, 1 + note E_, 4 + note D#, 8 + note D#, 4 + note E_, 6 + octave 3 + note B_, 1 + octave 4 + note E_, 1 + note G#, 8 + note F#, 6 + note D#, 1 + note F#, 1 + note B_, 8 + note A#, 4 + note B_, 2 + note A#, 2 + note G#, 4 + note A#, 2 + note G#, 2 + note F#, 2 + note C#, 1 + rest 1 + note D#, 1 + rest 1 + note E_, 1 + rest 1 + note F#, 1 + rest 1 + note G_, 1 + rest 1 + note G#, 1 + rest 1 + note A#, 1 + rest 1 + sound_loop 0, .mainloop + +Music_ProfOaksPokemonTalk_Ch3: + vibrato 6, 3, 8 + note_type 12, 2, 5 + stereo_panning TRUE, FALSE + rest 8 + octave 3 + note F#, 1 + note E_, 1 + note D#, 1 + note C#, 1 + note E_, 1 + note D#, 1 + note C#, 1 + octave 2 + note A#, 1 +.mainloop: + note B_, 6 + octave 3 + note D#, 1 + note F#, 1 + note B_, 6 + note D#, 1 + note C#, 1 + octave 2 + note B_, 4 + octave 3 + note B_, 8 + octave 4 + note D#, 4 + octave 3 + note G#, 6 + note D#, 1 + note G#, 1 + octave 2 + note G#, 6 + octave 3 + note D#, 1 + note G#, 1 + note D#, 6 + note F#, 2 + note A#, 2 + note G#, 2 + note F#, 2 + note D#, 2 + note E_, 2 + rest 4 + note E_, 1 + note E_, 1 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note B_, 4 + note F#, 2 + rest 4 + note F#, 1 + note F#, 1 + octave 2 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + octave 3 + note B_, 4 + note F#, 2 + octave 4 + note F#, 2 + octave 3 + note E_, 2 + octave 4 + note E_, 2 + octave 3 + note C#, 2 + octave 4 + note C#, 2 + octave 2 + note A#, 2 + octave 3 + note A#, 2 + octave 2 + note F#, 2 + octave 3 + note A#, 1 + rest 1 + note G#, 1 + rest 1 + note F#, 1 + rest 1 + note E_, 1 + rest 1 + note D#, 1 + rest 1 + note C#, 1 + rest 1 + octave 2 + note A#, 1 + rest 1 + sound_loop 0, .mainloop diff --git a/audio/music/rivalbattle.asm b/audio/music/rivalbattle.asm new file mode 100644 index 0000000..9ac5719 --- /dev/null +++ b/audio/music/rivalbattle.asm @@ -0,0 +1,864 @@ +Music_RivalBattle: + channel_count 3 + channel 1, Music_RivalBattle_Ch1 + channel 2, Music_RivalBattle_Ch2 + channel 3, Music_RivalBattle_Ch3 + +Music_RivalBattle_Ch1: + tempo 102 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 8, 1, 5 + note_type 12, 11, 2 + octave 3 + note F#, 2 + note A#, 4 + volume_envelope 11, 7 + note A#, 10 + volume_envelope 11, 2 + note F#, 2 + octave 4 + note C#, 4 + volume_envelope 11, 7 + note C#, 6 + note E_, 4 +.loop1: + volume_envelope 11, 2 + octave 2 + note A#, 6 + volume_envelope 11, 7 + octave 3 + note C#, 6 + volume_envelope 11, 2 + note D#, 4 + sound_loop 3, .loop1 + volume_envelope 11, 2 + octave 2 + note A#, 2 + octave 3 + note C#, 4 + volume_envelope 11, 7 + note C#, 10 +.loop2: + volume_envelope 11, 2 + octave 3 + note G#, 6 + volume_envelope 11, 7 + note B_, 6 + volume_envelope 11, 2 + octave 4 + note C#, 4 + sound_loop 3, .loop2 + volume_envelope 11, 2 + octave 3 + note G#, 2 + note B_, 4 + volume_envelope 4, -5 + note B_, 10 +.mainloop: + volume_envelope 11, 7 + note A#, 6 + note F#, 6 + note D#, 4 + note F_, 4 + note F#, 4 + note G#, 2 + note A#, 6 + volume_envelope 11, 2 + note F_, 1 + note D#, 1 + note C#, 1 + note D#, 1 + volume_envelope 11, 7 + note F_, 4 + volume_envelope 11, 2 + note G#, 1 + note F#, 1 + note F_, 1 + note F#, 1 + volume_envelope 11, 7 + note G#, 4 + volume_envelope 11, 6 + note G#, 2 + note A#, 2 + note B_, 2 + note A#, 2 + note B_, 2 + octave 4 + note C#, 2 + octave 3 + note B_, 2 + octave 4 + note E_, 2 + volume_envelope 11, 7 + octave 3 + note A#, 6 + note F#, 6 + note A#, 4 + octave 4 + note C#, 4 + octave 3 + note B_, 4 + note A#, 2 + note G#, 6 + note F_, 6 + octave 4 + note C#, 6 + octave 3 + note G#, 4 + volume_envelope 11, 5 + note C#, 2 + note F_, 2 + note G#, 2 + octave 4 + note C_, 2 + note C#, 2 + octave 3 + note G#, 2 + note F_, 2 + note G#, 2 + volume_envelope 11, 7 + note F#, 10 + volume_envelope 11, 4 + octave 2 + note B_, 2 + octave 3 + note D#, 2 + note F#, 2 + volume_envelope 11, 7 + note F_, 4 + note D#, 4 + note C#, 2 + note D#, 6 + volume_envelope 10, 0 + note F_, 8 + volume_envelope 10, 7 + note F_, 8 + volume_envelope 10, 0 + octave 2 + note A#, 8 + volume_envelope 10, 7 + note A#, 8 + volume_envelope 11, 7 + octave 3 + note F#, 10 + volume_envelope 11, 5 + octave 2 + note B_, 2 + octave 3 + note D#, 2 + note F#, 2 + note F_, 2 + note D#, 2 + note C#, 2 + note D#, 2 + note G#, 2 + note F#, 2 + note F_, 2 + note G#, 2 + volume_envelope 10, 0 + note A#, 16 + volume_envelope 10, 7 + note A#, 16 + volume_envelope 10, 0 + note B_, 8 + volume_envelope 10, 7 + note B_, 4 + volume_envelope 11, 7 + note G#, 4 + volume_envelope 11, 5 + octave 4 + note E_, 2 + note D#, 2 + note C#, 2 + octave 3 + note B_, 2 + octave 4 + note F#, 2 + note E_, 2 + note D#, 2 + note C#, 2 +.loop3: + octave 3 + note A#, 2 + note E_, 2 + note A#, 2 + octave 4 + note D#, 2 + note E_, 2 + note D#, 2 + octave 3 + note A#, 2 + octave 4 + note D#, 2 + octave 3 + note A#, 2 + octave 4 + note D#, 2 + note E_, 2 + note D#, 2 + octave 3 + note A#, 2 + note D#, 2 + note A#, 2 + octave 4 + note D#, 2 + sound_loop 2, .loop3 + volume_envelope 9, 4 + octave 3 + note D#, 8 + octave 2 + note A#, 8 + octave 3 + note G_, 8 + note F_, 8 + volume_envelope 9, 6 + octave 2 + note G#, 8 + note A#, 8 + note B_, 8 + octave 3 + note C#, 8 + volume_envelope 11, 7 + octave 4 + note D#, 8 + octave 3 + note A#, 8 + octave 4 + note G_, 8 + note F_, 8 + octave 3 + note G#, 8 + note A#, 8 + note B_, 8 + octave 4 + note C#, 8 + volume_envelope 10, 0 + note D#, 8 + volume_envelope 10, 7 + note D#, 8 + volume_envelope 10, 0 + octave 3 + note G_, 8 + volume_envelope 10, 7 + note G_, 8 + volume_envelope 11, 7 + note D#, 8 + note C#, 8 + note D#, 4 + note C#, 4 + octave 2 + note B_, 4 + octave 3 + note C#, 4 + volume_envelope 12, 7 + octave 2 + note A#, 6 + octave 3 + note C#, 6 + note D#, 4 + note E_, 6 + note D#, 6 + note C#, 4 + note G#, 6 + note E_, 6 + note D#, 4 + note C#, 6 + note D#, 6 + note D_, 4 + octave 2 + note G#, 6 + note B_, 6 + octave 3 + note C#, 4 + note D_, 6 + note C#, 6 + octave 2 + note B_, 4 + octave 3 + note F#, 6 + note D_, 6 + note C#, 4 + octave 2 + note B_, 6 + octave 3 + note C#, 10 + sound_loop 0, .mainloop + +Music_RivalBattle_Ch2: + duty_cycle 3 + vibrato 8, 3, 6 + pitch_offset 1 + note_type 12, 12, 2 + octave 4 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + octave 3 + note B_, 1 + octave 4 + note C_, 1 + octave 3 + note B_, 1 + note A#, 1 + note A_, 1 + note A#, 1 + note A_, 1 + note G#, 1 + note G_, 1 + note G#, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note D#, 1 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + octave 2 + note B_, 1 + volume_envelope 12, 2 + octave 4 + note D#, 6 + volume_envelope 12, 7 + octave 3 + note F#, 6 + volume_envelope 12, 2 + note G#, 4 +.loop1: + volume_envelope 12, 2 + note D#, 6 + volume_envelope 12, 7 + note F#, 6 + volume_envelope 12, 2 + note G#, 4 + sound_loop 2, .loop1 + volume_envelope 12, 2 + note D#, 2 + note F#, 4 + volume_envelope 12, 7 + note F#, 8 + volume_envelope 10, 2 + note B_, 1 + octave 4 + note C_, 1 +.loop2: + volume_envelope 12, 2 + note C#, 6 + volume_envelope 12, 7 + note E_, 6 + volume_envelope 12, 2 + note F#, 4 + sound_loop 3, .loop2 + volume_envelope 12, 2 + note C#, 2 + note E_, 4 + volume_envelope 11, 0 + note E_, 4 + volume_envelope 11, 7 + note E_, 6 +.mainloop: + sound_call .sub1 + volume_envelope 11, 0 + note G#, 8 + volume_envelope 11, 7 + note G#, 8 + sound_call .sub1 + volume_envelope 4, -6 + note G#, 8 + volume_envelope 11, 7 + note G#, 8 + volume_envelope 11, 0 + octave 3 + note B_, 10 + volume_envelope 11, 7 + note B_, 6 + volume_envelope 11, 0 + octave 4 + note C#, 8 + octave 3 + note B_, 8 + volume_envelope 11, 0 + note A#, 10 + volume_envelope 11, 7 + note A#, 6 + volume_envelope 2, -7 + note D#, 10 + volume_envelope 11, 7 + note D#, 6 + volume_envelope 11, 0 + note B_, 10 + volume_envelope 11, 7 + note B_, 6 + volume_envelope 12, 7 + octave 4 + note C#, 8 + octave 3 + note B_, 8 + volume_envelope 11, 0 + octave 4 + note D#, 16 + volume_envelope 11, 7 + note D#, 16 + volume_envelope 11, 0 + note E_, 4 + volume_envelope 11, 7 + note E_, 6 + volume_envelope 12, 7 + note E_, 2 + note G#, 2 + note B_, 2 + octave 5 + note C#, 8 + octave 4 + note B_, 8 + volume_envelope 11, 0 + note A#, 10 + volume_envelope 11, 7 + note A#, 6 + volume_envelope 11, 0 + note A_, 10 + volume_envelope 11, 7 + note A_, 6 + volume_envelope 11, 0 + note G#, 10 + volume_envelope 11, 7 + note G#, 6 + volume_envelope 11, 0 + note G_, 10 + volume_envelope 11, 7 + note G_, 6 + volume_envelope 10, 4 + octave 3 + note G_, 8 + note D#, 8 + note A#, 8 + note G#, 8 + volume_envelope 10, 6 + octave 2 + note B_, 8 + octave 3 + note C#, 8 + note D#, 8 + note F_, 8 + volume_envelope 12, 7 + octave 4 + note G_, 8 + note D#, 8 + note A#, 8 + note G#, 8 + octave 3 + note B_, 8 + octave 4 + note C#, 8 + note D#, 8 + note F_, 8 + volume_envelope 11, 0 + note G_, 16 + note D#, 16 + octave 3 + note B_, 8 + note A#, 8 + note G#, 8 + volume_envelope 12, 7 + note F_, 8 +.loop3: + volume_envelope 12, 2 + octave 3 + note A#, 6 + volume_envelope 12, 7 + octave 4 + note C#, 6 + volume_envelope 12, 2 + note D#, 4 + sound_loop 3, .loop3 + volume_envelope 12, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 4 + volume_envelope 11, 7 + note C#, 6 + volume_envelope 9, -2 + note C#, 4 +.loop4: + volume_envelope 12, 2 + octave 3 + note G#, 6 + volume_envelope 12, 7 + note B_, 6 + volume_envelope 12, 2 + octave 4 + note C#, 4 + sound_loop 3, .loop4 + volume_envelope 12, 2 + octave 3 + note G#, 2 + note B_, 4 + volume_envelope 12, 7 + note B_, 6 + volume_envelope 6, -2 + octave 4 + note D_, 4 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 12, 7 + note D#, 10 + volume_envelope 12, 4 + octave 3 + note A#, 2 + octave 4 + note D#, 2 + note F#, 2 + volume_envelope 12, 5 + note F_, 4 + note D#, 4 + volume_envelope 12, 2 + note C#, 2 + volume_envelope 12, 7 + note D#, 6 + volume_envelope 11, 0 + note F_, 8 + volume_envelope 11, 7 + note F_, 8 + sound_ret + +Music_RivalBattle_Ch3: + note_type 12, 1, 9 + octave 3 + note F#, 2 + note A#, 2 + rest 2 + note A#, 10 + octave 3 + note F#, 2 + octave 4 + note C#, 2 + rest 2 + note C#, 6 + octave 3 + note C#, 2 + note D_, 2 +.loop1: + note D#, 2 + note C#, 2 + note D#, 2 + note F#, 4 + note E_, 2 + note D#, 2 + note C#, 2 + sound_loop 4, .loop1 +.loop2: + octave 3 + note C#, 2 + octave 2 + note B_, 2 + octave 3 + note C#, 2 + note E_, 4 + note D_, 2 + note C#, 2 + octave 2 + note B_, 2 + sound_loop 3, .loop2 + octave 3 + note C#, 2 + note E_, 2 + note C#, 2 + octave 2 + note B_, 4 + octave 3 + note C_, 2 + note C#, 2 + note D_, 2 +.mainloop: + sound_call .sub1 + octave 2 + note A#, 2 + octave 4 + note C#, 2 + octave 2 + note A#, 2 + octave 3 + note B_, 2 + octave 2 + note A#, 2 + octave 3 + note A#, 2 + octave 2 + note A#, 2 + octave 3 + note G#, 2 + sound_call .sub2 + note C#, 2 + note G#, 2 + octave 4 + note C#, 2 + octave 3 + note G#, 4 + note C#, 2 + note C_, 2 + octave 2 + note B_, 2 + sound_call .sub1 + octave 2 + note A#, 2 + octave 3 + note A#, 2 + octave 2 + note A#, 2 + octave 3 + note G#, 2 + octave 2 + note A#, 2 + octave 3 + note F#, 2 + octave 2 + note A#, 2 + octave 3 + note F_, 2 + sound_call .sub2 +.loop3: + note C#, 2 + note G#, 2 + sound_loop 4, .loop3 + sound_call .sub3 + note G#, 2 + note F#, 2 +.loop4: + octave 2 + note A#, 2 + octave 3 + note F_, 2 + sound_loop 4, .loop4 + octave 2 + note A#, 2 + octave 3 + note F#, 2 + octave 2 + note A#, 2 + octave 3 + note F#, 2 + octave 2 + note A#, 2 + octave 3 + note F#, 2 + note F_, 2 + note D#, 2 + sound_call .sub3 + octave 2 + note B_, 2 + octave 3 + note D_, 2 + sound_call .sub4 + octave 3 + note D#, 2 + octave 4 + note D#, 2 + sound_call .sub4 + octave 3 + note D#, 2 + note A#, 2 + note E_, 2 + note B_, 2 + octave 4 + note E_, 2 + octave 3 + note E_, 2 + note B_, 2 + octave 4 + note E_, 2 + octave 3 + note E_, 2 + octave 4 + note E_, 2 + octave 3 + note E_, 2 + note B_, 2 + octave 4 + note E_, 2 + octave 3 + note E_, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note G#, 2 +.loop5: + note D#, 2 + note A#, 2 + sound_loop 4, .loop5 +.loop6: + note D#, 2 + note A_, 2 + sound_loop 4, .loop6 +.loop7: + note D#, 2 + note G#, 2 + sound_loop 4, .loop7 +.loop8: + note D#, 2 + note G_, 2 + sound_loop 12, .loop8 +.loop9: + octave 2 + note B_, 2 + octave 3 + note D#, 2 + sound_loop 4, .loop9 +.loop10: + octave 2 + note B_, 2 + octave 3 + note F#, 2 + sound_loop 4, .loop10 + note D#, 2 + note G_, 2 + note A#, 2 + note D#, 2 + note G_, 2 + note A#, 2 + note D#, 2 + note A#, 2 + note D#, 2 + note G_, 2 + note A#, 2 + note D#, 2 + note G_, 2 + note A#, 2 + note D#, 2 + note A#, 2 + octave 2 + note B_, 2 + octave 3 + note G_, 2 + note B_, 2 + octave 2 + note B_, 2 + octave 3 + note G_, 2 + note B_, 2 + octave 2 + note B_, 2 + octave 3 + note B_, 2 + octave 2 + note B_, 2 + octave 3 + note G#, 2 + note B_, 2 + octave 2 + note B_, 2 + octave 4 + note D#, 2 + note C#, 2 + octave 3 + note B_, 2 + note G#, 2 + note G_, 8 + note D#, 8 + note A#, 8 + note G_, 8 + octave 2 + note B_, 8 + octave 3 + note C#, 8 + note D#, 8 + note F_, 8 +.loop11: + octave 2 + note A#, 2 + octave 3 + note D#, 2 + sound_loop 7, .loop11 + note E_, 2 + note D#, 2 +.loop12: + octave 2 + note A#, 2 + octave 3 + note D#, 2 + sound_loop 6, .loop12 + octave 2 + note A#, 2 + octave 3 + note F#, 2 + note F_, 2 + note E_, 2 +.loop13: + octave 2 + note G#, 2 + octave 3 + note C#, 2 + sound_loop 7, .loop13 + note D_, 2 + note C#, 2 +.loop14: + octave 2 + note G#, 2 + octave 3 + note C#, 2 + sound_loop 4, .loop14 + octave 2 + note B_, 2 + note G#, 2 + note B_, 2 + octave 3 + note F_, 4 + note E_, 2 + note D#, 2 + note D_, 2 + sound_loop 0, .mainloop + +.sub1: +.sub1loop1: + octave 2 + note A#, 2 + octave 3 + note D#, 2 + sound_loop 4, .sub1loop1 + sound_ret + +.sub2: + note C#, 2 + note G#, 2 + octave 4 + note C#, 2 + octave 3 + note G#, 4 + octave 4 + note C#, 2 + octave 3 + note C#, 2 + note G#, 2 + sound_ret + +.sub3: +.sub3loop1: + octave 2 + note B_, 2 + octave 3 + note F#, 2 + sound_loop 7, .sub3loop1 + sound_ret + +.sub4: +.sub4loop1: + octave 3 + note D#, 2 + note A#, 2 + octave 4 + note D#, 2 + sound_loop 2, .sub4loop1 + sound_ret diff --git a/audio/music/rocketbattle.asm b/audio/music/rocketbattle.asm new file mode 100644 index 0000000..6fa39f3 --- /dev/null +++ b/audio/music/rocketbattle.asm @@ -0,0 +1,1031 @@ +Music_RocketBattle: + channel_count 3 + channel 1, Music_RocketBattle_Ch1 + channel 2, Music_RocketBattle_Ch2 + channel 3, Music_RocketBattle_Ch3 + +Music_RocketBattle_Ch1: + tempo 101 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 16, 1, 5 + note_type 12, 11, 2 + octave 4 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + octave 3 + note B_, 1 + octave 4 + note C_, 1 + octave 3 + note B_, 1 + note A#, 1 + note A_, 1 + note A#, 1 + note A_, 1 + note G#, 1 + note G_, 1 + note G#, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note D#, 1 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + octave 2 + note B_, 1 +.loop1: + volume_envelope 11, 2 + octave 3 + note C_, 6 + note C_, 4 + note E_, 2 + volume_envelope 11, 7 + note D_, 4 + sound_loop 3, .loop1 + volume_envelope 11, 2 + note C_, 6 + note C_, 6 + volume_envelope 11, 7 + note D_, 4 +.loop2: + volume_envelope 11, 2 + octave 4 + note E_, 6 + note E_, 4 + note G_, 2 + volume_envelope 11, 7 + note F_, 4 + sound_loop 3, .loop2 + volume_envelope 11, 2 + note E_, 6 + note E_, 4 + volume_envelope 11, 7 + note D_, 2 + note D#, 4 + volume_envelope 11, 3 + octave 4 + note C_, 2 + octave 3 + note E_, 2 + note E_, 2 + note A#, 2 + note F_, 2 + note F_, 2 + note A_, 2 + note D_, 2 + note D_, 2 + octave 4 + note C_, 2 + octave 3 + note E_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note E_, 2 + note F_, 2 + volume_envelope 11, 5 + note G_, 4 + volume_envelope 11, 3 + note G_, 2 + note F_, 2 + note D#, 2 + note D_, 2 + note C#, 2 + note D_, 2 + volume_envelope 11, 5 + note D#, 4 + volume_envelope 11, 3 + note D#, 2 + note D_, 2 + note F_, 2 +.mainloop: + octave 4 + note E_, 2 + octave 3 + note E_, 2 + note E_, 2 + octave 4 + note D_, 2 + octave 3 + note F_, 2 + note F_, 2 + octave 4 + note C_, 2 + octave 3 + note D_, 2 + note D_, 2 + octave 4 + note E_, 2 + octave 3 + note E_, 2 + note E_, 2 + octave 4 + note D_, 2 + octave 3 + note E_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note E_, 2 + note F_, 2 + volume_envelope 11, 5 + note G_, 4 + volume_envelope 11, 3 + note G_, 2 + note F_, 2 + octave 4 + note C_, 2 + note D_, 2 + note C_, 2 + note D_, 2 + volume_envelope 11, 5 + note F_, 4 + volume_envelope 11, 2 + octave 3 + note F_, 2 + note G_, 2 + note G#, 4 + volume_envelope 11, 5 + note D_, 4 + note C_, 4 + note D_, 4 + note E_, 2 + volume_envelope 11, 2 + note F_, 2 + note A_, 4 + volume_envelope 11, 7 + note A_, 4 + volume_envelope 11, 5 + note A_, 2 + note G_, 2 + note F_, 4 + note D_, 4 + note C_, 4 + note D_, 4 + note E_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note C_, 2 + note A#, 2 + note G_, 2 + note A_, 2 + note A#, 2 + volume_envelope 11, 7 + octave 4 + note E_, 6 + note D_, 4 + octave 3 + note G_, 2 + note A#, 4 + note A_, 6 + note G_, 4 + note E_, 2 + note F_, 4 + note E_, 6 + note D_, 6 + note D#, 4 + volume_envelope 10, 0 + note E_, 8 + volume_envelope 10, 7 + note E_, 8 + volume_envelope 11, 7 + octave 2 + note A_, 8 + note G_, 8 + note A_, 8 + note A#, 8 + note A_, 8 + note G_, 8 + note A_, 8 + octave 3 + note C#, 8 + note D_, 8 + note C#, 8 + octave 2 + note A#, 8 + note A_, 8 + octave 3 + note D_, 8 + note C#, 8 + note D_, 8 + note E_, 8 + octave 2 + note A#, 6 + octave 3 + note D_, 6 + note C_, 4 + volume_envelope 11, 5 + octave 2 + note A#, 2 + octave 3 + note C_, 2 + note D_, 2 + note E_, 2 + note F_, 2 + note G_, 2 + note A_, 2 + note A#, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note A#, 2 + note A_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + octave 4 + note C#, 2 + note D_, 2 + note C#, 2 + octave 3 + note A#, 2 + note G_, 2 + volume_envelope 11, 2 + note E_, 6 + note E_, 6 + note E_, 4 + note E_, 6 + note E_, 4 + volume_envelope 11, 7 + note G_, 2 + note F_, 4 + volume_envelope 11, 2 + note E_, 6 + note E_, 4 + volume_envelope 11, 7 + note G_, 2 + note F_, 4 + volume_envelope 11, 2 + note E_, 6 + octave 4 + note D_, 1 + note D#, 1 + volume_envelope 10, 0 + note E_, 8 + volume_envelope 11, 2 + octave 3 + note F_, 6 + note F_, 4 + volume_envelope 11, 7 + note A#, 2 + note G_, 4 +.loop3: + volume_envelope 11, 2 + note F_, 6 + note F_, 4 + volume_envelope 11, 7 + note A_, 2 + note G_, 4 + sound_loop 2, .loop3 + volume_envelope 11, 2 + note F_, 6 + octave 4 + note D_, 1 + note E_, 1 + volume_envelope 10, 0 + note F_, 8 + volume_envelope 11, 3 + note D_, 2 + octave 3 + note A_, 2 + note E_, 2 + note A_, 4 + note A_, 2 + volume_envelope 11, 7 + octave 4 + note D_, 4 + volume_envelope 11, 3 + note D#, 2 + octave 3 + note A#, 2 + note G_, 2 + note A#, 4 + note A#, 2 + volume_envelope 11, 7 + octave 4 + note D_, 4 + volume_envelope 11, 3 + note E_, 2 + note C_, 2 + octave 3 + note A_, 2 + octave 4 + note C_, 4 + note C_, 2 + volume_envelope 11, 7 + note D#, 4 + volume_envelope 10, 0 + note E_, 4 + volume_envelope 10, 7 + note E_, 6 + volume_envelope 10, 0 + octave 3 + note G#, 6 + volume_envelope 11, 3 + note C_, 2 + note E_, 2 + note E_, 2 + octave 2 + note A#, 2 + octave 3 + note F_, 2 + note F_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note D_, 2 + note C_, 2 + note E_, 2 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + note D_, 2 + note C_, 2 + note C_, 2 + octave 2 + note A#, 2 + octave 3 + note C_, 2 + volume_envelope 11, 5 + note D_, 4 + volume_envelope 11, 3 + note D_, 2 + note C_, 2 + octave 2 + note A#, 2 + octave 3 + note D_, 2 + note C#, 2 + note D_, 2 + volume_envelope 11, 5 + note D#, 4 + volume_envelope 11, 3 + note D#, 2 + note D_, 2 + note F_, 2 + sound_loop 0, .mainloop + +Music_RocketBattle_Ch2: + duty_cycle 3 + vibrato 8, 3, 6 + pitch_offset 1 + note_type 12, 11, 2 + octave 4 + note A_, 4 + note A#, 4 + note B_, 4 + octave 5 + note C_, 1 + volume_envelope 8, 2 + octave 4 + note G#, 1 + note A_, 1 + note G#, 1 + volume_envelope 12, 2 + octave 5 + note C#, 1 + volume_envelope 9, 2 + octave 4 + note G#, 1 + note A_, 1 + note G#, 1 + volume_envelope 12, 2 + octave 5 + note D_, 1 + volume_envelope 10, 2 + octave 4 + note G#, 1 + note A_, 1 + note G#, 1 + volume_envelope 12, 2 + octave 5 + note D#, 1 + volume_envelope 11, 2 + octave 4 + note G#, 1 + note A_, 1 + note G#, 1 + volume_envelope 12, 2 + octave 5 + note E_, 1 + octave 4 + note G#, 1 + note A_, 1 + note G#, 1 +.loop1: + volume_envelope 12, 2 + octave 3 + note A_, 6 + note A_, 4 + octave 4 + note C_, 2 + volume_envelope 12, 7 + octave 3 + note A#, 4 + sound_loop 3, .loop1 + volume_envelope 12, 2 + note A_, 6 + note A_, 6 + volume_envelope 4, -2 + note G#, 4 +.loop2: + volume_envelope 12, 2 + octave 4 + note A_, 6 + note A_, 4 + octave 5 + note C_, 2 + volume_envelope 12, 7 + octave 4 + note A#, 4 + sound_loop 3, .loop2 + volume_envelope 12, 2 + note A_, 6 + note A_, 4 + volume_envelope 12, 7 + note G_, 2 + note G#, 4 + sound_call .sub1 + volume_envelope 11, 0 + note F_, 16 + volume_envelope 11, 7 + note F_, 16 +.mainloop: + sound_call .sub1 + volume_envelope 11, 0 + note F_, 8 + volume_envelope 11, 7 + note F_, 8 + volume_envelope 11, 0 + note A#, 8 + volume_envelope 11, 7 + note A#, 8 + volume_envelope 12, 4 + octave 3 + note A_, 2 + note G_, 2 + note A_, 2 + volume_envelope 12, 7 + octave 4 + note C_, 4 + octave 3 + note A#, 2 + note A_, 2 + note G_, 2 + volume_envelope 12, 2 + note A_, 2 + octave 4 + note C_, 4 + volume_envelope 11, 0 + note C_, 6 + volume_envelope 11, 7 + note C_, 4 + volume_envelope 12, 4 + octave 3 + note A#, 2 + note A_, 2 + note A#, 2 + volume_envelope 12, 7 + octave 4 + note D_, 4 + note C_, 2 + octave 3 + note A#, 2 + note A_, 2 + volume_envelope 12, 2 + note A#, 2 + octave 4 + note D_, 4 + volume_envelope 11, 0 + note D_, 4 + volume_envelope 11, 7 + note D_, 6 + volume_envelope 4, -7 + note A_, 6 + volume_envelope 10, 0 + note G_, 6 + note F_, 4 + note E_, 6 + note F_, 6 + note G_, 4 + note A_, 6 + note A#, 6 + note G#, 4 + note A_, 6 + volume_envelope 10, 7 + note A_, 10 + volume_envelope 3, -7 + octave 3 + note D_, 8 + volume_envelope 11, 7 + note D_, 8 + volume_envelope 3, -7 + note C#, 8 + volume_envelope 11, 7 + note C#, 8 + volume_envelope 3, -7 + note D_, 8 + volume_envelope 11, 7 + note D_, 8 + volume_envelope 3, -7 + note E_, 8 + volume_envelope 11, 7 + note E_, 8 + volume_envelope 4, -6 + note F_, 8 + volume_envelope 10, 0 + note F_, 8 + note E_, 16 + note F_, 16 + note A_, 16 + volume_envelope 3, -7 + note F_, 16 + volume_envelope 12, 7 + octave 4 + note D_, 8 + note C#, 8 + volume_envelope 11, 0 + note E_, 8 + volume_envelope 11, 7 + note E_, 8 + volume_envelope 3, -4 + note A_, 6 + volume_envelope 12, 7 + note A_, 10 + volume_envelope 12, 2 + octave 3 + note A_, 6 + note A_, 6 + note A_, 4 + note A_, 6 + note A_, 4 + volume_envelope 12, 7 + octave 4 + note C_, 2 + octave 3 + note A#, 4 + volume_envelope 12, 2 + note A_, 6 + note A_, 4 + volume_envelope 12, 7 + octave 4 + note C_, 2 + octave 3 + note A#, 4 + volume_envelope 12, 2 + note A_, 6 + volume_envelope 12, 7 + octave 4 + note G_, 1 + note G#, 1 + note A_, 8 +.loop3: + volume_envelope 12, 2 + octave 3 + note A#, 6 + note A#, 4 + volume_envelope 12, 7 + octave 4 + note D_, 2 + note C_, 4 + sound_loop 3, .loop3 + volume_envelope 12, 2 + octave 3 + note A#, 6 + volume_envelope 12, 7 + octave 4 + note G_, 1 + note A_, 1 + note A#, 8 + volume_envelope 12, 7 + note A_, 6 + note G_, 6 + note A_, 4 + note A#, 6 + octave 5 + note D_, 6 + octave 4 + note A#, 4 + note A_, 6 + note G_, 6 + volume_envelope 12, 5 + note A_, 4 + volume_envelope 11, 0 + note A_, 8 + volume_envelope 11, 7 + note A_, 8 + volume_envelope 12, 6 + octave 3 + note A_, 6 + note G#, 6 + note E_, 4 + note A_, 6 + note G#, 6 + note E_, 4 + volume_envelope 11, 0 + note F_, 8 + volume_envelope 11, 7 + note F_, 8 + volume_envelope 3, -5 + note A#, 8 + volume_envelope 12, 7 + note A#, 8 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 12, 6 + octave 4 + note A_, 6 + note G#, 6 + note E_, 4 + note A_, 6 + note G#, 6 + note E_, 4 + sound_ret + +Music_RocketBattle_Ch3: + note_type 12, 1, 9 + octave 3 + note A_, 2 + octave 4 + note E_, 2 + octave 3 + note G#, 2 + octave 4 + note E_, 2 + octave 3 + note G_, 2 + octave 4 + note E_, 2 + octave 3 + note F#, 2 + octave 4 + note E_, 2 + octave 3 + note F_, 2 + octave 4 + note E_, 2 + octave 3 + note E_, 2 + octave 4 + note E_, 2 + octave 2 + note B_, 2 + octave 3 + note C_, 2 + octave 2 + note B_, 2 + note A#, 2 +.loop1: + sound_call .sub1 + sound_loop 3, .loop1 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 2 +.loop2: + sound_call .sub1 + sound_loop 3, .loop2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note G_, 2 + octave 2 + note G_, 2 + note A_, 2 + note A#, 2 + sound_call .sub2 + sound_call .sub3 + octave 3 + note F_, 2 + sound_call .sub4 +.mainloop: + sound_call .sub2 + sound_call .sub3 + octave 3 + note A#, 2 + octave 2 + note A#, 2 + octave 3 + note F_, 2 + octave 2 + note A#, 2 + octave 3 + note F_, 2 + octave 2 + note A#, 2 + octave 3 + note F_, 2 + note E_, 2 + note D_, 2 + sound_call .sub5 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + note A_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + note A_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 +.loop3: + octave 2 + note A#, 2 + octave 3 + note F_, 2 + sound_loop 5, .loop3 + note A#, 2 + octave 2 + note A#, 2 + octave 3 + note F_, 2 + note A#, 2 + octave 2 + note A#, 2 + octave 3 + note A#, 2 + sound_call .sub5 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note F_, 2 + note E_, 2 + note D_, 2 + sound_call .sub5 + sound_call .sub5 +.loop4: + octave 2 + note A_, 2 + octave 3 + note E_, 2 + note D_, 2 + octave 2 + note A#, 2 + note A_, 2 + octave 3 + note D_, 2 + note G_, 2 + note F_, 2 + sound_loop 7, .loop4 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + note D_, 2 + octave 2 + note A#, 2 + note A_, 2 + octave 3 + note A_, 2 + note G_, 2 + note F_, 2 +.loop5: + octave 2 + note A#, 2 + octave 3 + note F_, 2 + sound_loop 4, .loop5 + octave 2 + note A#, 2 + octave 3 + note F_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note C#, 2 + note D_, 2 +.loop6: + octave 2 + note A_, 2 + octave 3 + note E_, 2 + sound_loop 13, .loop6 + octave 2 + note A_, 2 + octave 3 + note E_, 4 + note D_, 2 + note C_, 2 + octave 2 + note A#, 2 +.loop7: + octave 2 + note A_, 2 + octave 3 + note E_, 2 + sound_loop 4, .loop7 + octave 2 + note A_, 2 + octave 4 + note D_, 2 + octave 3 + note A_, 2 + note A#, 4 + note A_, 2 + note G_, 2 + note A#, 2 +.loop8: + octave 2 + note A#, 2 + octave 3 + note F_, 2 + sound_loop 7, .loop8 + note E_, 2 + note F_, 2 +.loop9: + octave 2 + note A#, 2 + octave 3 + note F_, 2 + sound_loop 5, .loop9 + octave 3 + note A#, 2 + octave 4 + note D_, 4 + note C_, 2 + octave 3 + note A#, 2 + note G_, 2 + sound_call .sub6 + octave 3 + note E_, 2 + sound_call .sub3 + octave 3 + note F_, 2 + sound_call .sub6 + octave 3 + note A_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + sound_call .sub2 + sound_call .sub3 + octave 3 + note F_, 2 + sound_call .sub4 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note A_, 2 + octave 3 + note E_, 2 + note D_, 2 + octave 2 + note A_, 2 + note A#, 2 + octave 3 + note E_, 2 + note G_, 2 + note F_, 2 + sound_ret + +.sub2: + octave 2 + note A_, 2 + octave 3 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + note D#, 2 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + note D#, 2 + note D_, 2 + sound_ret + +.sub3: + octave 2 + note A#, 2 + octave 3 + note F_, 2 + note A#, 2 + octave 2 + note A#, 2 + octave 3 + note F_, 2 + note A#, 2 + octave 2 + note A#, 2 + sound_ret + +.sub4: + octave 2 + note A#, 2 + octave 3 + note F_, 2 + note A#, 2 + note F_, 2 + note A#, 2 + note F_, 2 + octave 2 + note A#, 2 + octave 3 + note F_, 2 + sound_ret + +.sub5: +.sub5loop1: + octave 2 + note A_, 2 + octave 3 + note E_, 2 + sound_loop 4, .sub5loop1 + sound_ret + +.sub6: + octave 2 + note A_, 2 + octave 3 + note E_, 2 + note A_, 2 + octave 2 + note A_, 2 + octave 3 + note E_, 2 + note A_, 2 + octave 2 + note A_, 2 + sound_ret diff --git a/audio/music/rockethideout.asm b/audio/music/rockethideout.asm new file mode 100644 index 0000000..424c991 --- /dev/null +++ b/audio/music/rockethideout.asm @@ -0,0 +1,310 @@ +Music_RocketHideout: + channel_count 4 + channel 1, Music_RocketHideout_Ch1 + channel 2, Music_RocketHideout_Ch2 + channel 3, Music_RocketHideout_Ch3 + channel 4, Music_RocketHideout_Ch4 + +Music_RocketHideout_Ch1: + tempo 144 + volume 7, 7 + duty_cycle 3 + pitch_offset 4 + vibrato 16, 4, 4 + note_type 12, 11, 3 + stereo_panning TRUE, FALSE +.mainloop: +.loop1 + rest 16 + sound_loop 4, .loop1 +.loop2: + octave 2 + note D#, 2 + rest 2 + note A#, 4 + note A_, 2 + rest 6 + note D#, 2 + note A#, 4 + note A_, 2 + rest 8 + sound_loop 2, .loop2 + octave 3 + note A#, 2 + note A_, 2 + note F_, 2 + note F#, 2 + octave 4 + note C#, 2 + note C_, 2 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + note A_, 2 + note F_, 2 + note F#, 2 + octave 4 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + note A_, 2 + note F#, 2 + note F_, 2 + note D#, 2 + note F_, 2 + note F#, 2 + note A#, 2 + note F#, 2 + note F_, 2 + note D#, 2 + note F_, 2 + note F#, 2 + note A_, 2 + octave 2 + note A#, 2 + note B_, 2 + octave 3 + note D#, 2 + note F_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note G_, 2 + note G#, 2 + octave 4 + note D#, 2 + note D_, 2 + note D#, 2 + note D_, 2 + note C_, 2 + octave 3 + note B_, 2 + note G_, 2 + note G#, 2 + octave 4 + note D#, 2 + note D_, 2 + note C_, 2 + octave 3 + note B_, 2 + note G#, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note G#, 2 + octave 4 + note C_, 2 + octave 3 + note G#, 2 + note G_, 2 + note F_, 2 + note G_, 2 + note G#, 2 + note B_, 2 + note C_, 2 + note C#, 2 + note F_, 2 + note G_, 2 + rest 16 + volume_envelope 11, 7 + octave 2 + note G#, 16 + rest 16 + note A_, 16 + volume_envelope 11, 3 +.loop3: + rest 16 + sound_loop 4, .loop3 + sound_loop 0, .mainloop + +Music_RocketHideout_Ch2: + duty_cycle 3 + pitch_offset 2 + vibrato 0, 15, 0 + note_type 12, 12, 4 + stereo_panning FALSE, TRUE +.mainloop: + octave 2 + note D#, 2 + rest 2 + note A#, 4 + note A_, 2 + rest 6 + note D#, 2 + note A#, 4 + note A_, 2 + rest 8 + note D#, 2 + rest 2 + note A#, 4 + note A_, 2 + rest 6 + note D#, 2 + note A#, 4 + note A_, 2 + rest 8 + octave 3 + note D#, 12 + note A#, 2 + note A_, 2 + octave 4 + note C#, 8 + note C_, 8 + octave 3 + note A#, 12 + note A_, 4 + note F#, 8 + note F_, 8 + octave 4 + note D#, 12 + note A#, 2 + note A_, 2 + note F#, 8 + note F_, 8 + note D#, 12 + note D_, 4 + octave 3 + note B_, 8 + note A#, 8 + octave 4 + note F_, 12 + octave 5 + note C_, 2 + octave 4 + note B_, 2 + note G#, 8 + note G_, 8 + note F_, 12 + note E_, 4 + note C#, 8 + note C_, 8 + octave 2 + note C#, 2 + rest 2 + note G#, 4 + note G_, 2 + rest 6 + volume_envelope 12, 7 + octave 3 + note C#, 16 + volume_envelope 12, 4 + octave 2 + note C#, 2 + rest 2 + note G#, 4 + note G_, 2 + rest 6 + volume_envelope 12, 7 + octave 3 + note C#, 16 + volume_envelope 12, 4 + octave 2 + note C#, 2 + rest 2 + note G#, 4 + note G_, 2 + rest 6 + note C#, 2 + note G#, 4 + note G_, 2 + rest 8 + note C#, 2 + rest 2 + note G#, 4 + note G_, 2 + rest 6 + note C#, 2 + note G#, 4 + note G_, 2 + rest 8 + sound_loop 0, .mainloop + +Music_RocketHideout_Ch3: + note_type 12, 1, 9 +.mainloop: +.loop1: + octave 2 + note D#, 2 + rest 2 + note A#, 4 + note A_, 2 + rest 6 + note D#, 2 + note A#, 4 + note A_, 2 + rest 8 + sound_loop 6, .loop1 +.loop2: + note F_, 2 + rest 2 + octave 3 + note C_, 4 + octave 2 + note B_, 2 + rest 6 + note F_, 2 + octave 3 + note C_, 4 + octave 2 + note B_, 2 + rest 8 + sound_loop 2, .loop2 +.loop3: + note C#, 2 + rest 2 + note G#, 4 + note G_, 2 + rest 6 + octave 3 + note C#, 16 + sound_loop 2, .loop3 +.loop4: + octave 2 + note C#, 2 + rest 2 + note G#, 4 + note G_, 2 + rest 6 + note C#, 2 + note G#, 4 + note G_, 2 + rest 8 + sound_loop 2, .loop4 + sound_loop 0, .mainloop + +Music_RocketHideout_Ch4: + toggle_noise 0 + drum_speed 12 + stereo_panning FALSE, TRUE + rest 16 + rest 16 + drum_note 3, 1 + drum_note 3, 1 + drum_note 4, 1 + drum_note 4, 1 + sound_call .sub1 +.mainloop: + sound_call .sub1 + drum_note 5, 4 + sound_call .sub1 + drum_note 6, 4 + sound_call .sub1 + drum_note 11, 4 + sound_call .sub1 + drum_note 7, 4 + sound_loop 0, .mainloop + +.sub1: + stereo_panning TRUE, FALSE + drum_note 4, 1 + drum_note 4, 1 + stereo_panning FALSE, TRUE + drum_note 10, 4 + drum_note 4, 1 + drum_note 4, 1 + stereo_panning TRUE, FALSE + drum_note 10, 4 + sound_ret diff --git a/audio/music/rockettheme.asm b/audio/music/rockettheme.asm new file mode 100644 index 0000000..6b37371 --- /dev/null +++ b/audio/music/rockettheme.asm @@ -0,0 +1,475 @@ +Music_RocketTheme: + channel_count 4 + channel 1, Music_RocketTheme_Ch1 + channel 2, Music_RocketTheme_Ch2 + channel 3, Music_RocketTheme_Ch3 + channel 4, Music_RocketTheme_Ch4 + +Music_RocketTheme_Ch1: + tempo 128 + volume 7, 7 + duty_cycle 3 + stereo_panning FALSE, TRUE + vibrato 5, 6, 4 + note_type 12, 10, 8 + octave 4 + note C_, 1 + note D_, 1 +.mainloop: + duty_cycle 3 + note_type 12, 10, 8 + sound_call Music_LookRocket_Ch1.sub1 + duty_cycle 1 + volume_envelope 10, 8 + sound_call Music_LookRocket_Ch1.sub2 + sound_call Music_LookRocket_Ch2.sub5 + octave 4 + note F#, 1 + rest 1 + volume_envelope 5, 3 + sound_call Music_LookRocket_Ch1.sub3 + volume_envelope 12, 3 + sound_call Music_LookRocket_Ch1.sub3 + volume_envelope 14, 3 + sound_call Music_LookRocket_Ch1.sub3 + rest 16 + duty_cycle 0 + note_type 6, 11, 3 + vibrato 6, 6, 4 + sound_call .sub1 + octave 4 + note F_, 1 + note F#, 3 + note F_, 2 + rest 2 + note D#, 2 + rest 2 + note C_, 2 + note D_, 2 + note D#, 2 + note C_, 2 + octave 3 + note A#, 2 + note G_, 2 + note A#, 2 + octave 4 + note C_, 2 + rest 4 + note D_, 4 + rest 4 + note D#, 4 + rest 4 + note D#, 2 + note F#, 2 + sound_call .sub1 + octave 3 + note F#, 1 + note G_, 3 + note F_, 2 + rest 2 + note D#, 2 + rest 2 + note C_, 2 + note D_, 2 + note D#, 2 + note C_, 2 + octave 2 + note A#, 2 + note G_, 2 + note A#, 2 + octave 3 + note C_, 2 + rest 4 + note D_, 4 + rest 4 + note D#, 4 + note F_, 2 + note E_, 2 + note D#, 2 + note D_, 2 +.loop1: + rest 4 + note F_, 2 + rest 14 + note F#, 2 + rest 10 + sound_loop 3, .loop1 + rest 4 + note F_, 2 + rest 14 + note F#, 2 + rest 2 + note F#, 2 + rest 2 + note D#, 2 + note C_, 2 +.loop2: + note F#, 2 + note A_, 2 + sound_loop 4, .loop2 +.loop3: + note G_, 2 + note A#, 2 + sound_loop 4, .loop3 +.loop4: + note G#, 2 + note B_, 2 + sound_loop 4, .loop4 +.loop5: + octave 3 + note A_, 2 + octave 4 + note C_, 2 + sound_loop 4, .loop5 + note_type 12, 11, 3 + rest 16 + rest 12 + note F_, 2 + note C_, 1 + note D_, 1 + sound_loop 0, .mainloop + +.sub1: + rest 7 + note B_, 1 + octave 4 + note C_, 2 + rest 6 + note C_, 2 + rest 2 + octave 3 + note G_, 2 + rest 6 + octave 4 + note D#, 12 + note D_, 8 + octave 3 + note A#, 2 + rest 6 + note G_, 2 + rest 2 + note A_, 2 + rest 2 + note A#, 2 + rest 10 + sound_ret + +Music_RocketTheme_Ch2: + stereo_panning TRUE, TRUE + vibrato 4, 6, 4 + duty_cycle 3 + note_type 12, 11, 7 + octave 5 + note C_, 1 + note D_, 1 +.mainloop: + note_type 12, 11, 7 + sound_call Music_LookRocket_Ch2.sub1 + volume_envelope 11, 7 + sound_call Music_LookRocket_Ch2.sub5 + octave 5 + note C_, 1 + rest 1 + sound_call Music_LookRocket_Ch2.sub2 + volume_envelope 5, 3 + sound_call Music_LookRocket_Ch2.sub3 + volume_envelope 12, 3 + sound_call Music_LookRocket_Ch2.sub3 + volume_envelope 14, 3 + sound_call Music_LookRocket_Ch2.sub3 + sound_call Music_LookRocket_Ch2.sub4 + vibrato 6, 6, 4 + sound_call .sub1 + octave 4 + note A_, 1 + vibrato 0, 0, 0 + volume_envelope 11, 8 + note A#, 14 + vibrato 5, 2, 2 + volume_envelope 11, 7 + note A#, 5 + vibrato 6, 6, 4 + note_type 12, 11, 7 + note A#, 12 + rest 2 + octave 5 + note C_, 1 + note D_, 1 + sound_call .sub1 + note B_, 1 + vibrato 0, 0, 0 + volume_envelope 11, 8 + octave 4 + note C_, 14 + vibrato 5, 2, 2 + volume_envelope 11, 7 + note C_, 5 + vibrato 6, 6, 4 + note_type 12, 11, 7 + note C_, 12 + octave 3 + note A#, 1 + note A_, 1 + note G#, 1 + note G_, 1 + note_type 6, 11, 7 + sound_call .sub2 + octave 4 + note D_, 1 + note D#, 9 + note D_, 1 + note C#, 1 + note C_, 12 + note F_, 2 + rest 2 + note F#, 2 + rest 2 + sound_call .sub2 + octave 3 + note B_, 2 + rest 2 + octave 4 + note C_, 2 + rest 2 + note D_, 2 + rest 2 + note D#, 8 + rest 4 + note D_, 2 + rest 2 + note C_, 2 + octave 3 + note G_, 2 + note B_, 1 + octave 4 + note C_, 15 + note C#, 16 + note D_, 16 + note D#, 16 + note E_, 2 + note C#, 2 + octave 3 + note A#, 2 + note G_, 2 + octave 4 + note F_, 2 + note D_, 2 + octave 3 + note B_, 2 + note G#, 2 + octave 4 + note F#, 2 + note D#, 2 + note C_, 2 + octave 3 + note A_, 2 + octave 4 + note G_, 2 + note E_, 2 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note G#, 2 + note F_, 2 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note A_, 2 + note F#, 2 + note D#, 2 + note C_, 2 + note A#, 2 + note G_, 2 + note E_, 2 + note C#, 2 + note B_, 4 + octave 5 + note C_, 2 + note D_, 2 + sound_loop 0, .mainloop + +.sub1: + note_type 6, 11, 7 + rest 7 + octave 4 + note D_, 1 + note D#, 2 + rest 6 + note D#, 2 + rest 2 + note C_, 2 + rest 6 + note F#, 12 + note F_, 8 + note D#, 2 + rest 6 + note C_, 2 + rest 2 + note D_, 2 + rest 2 + note D#, 2 + rest 2 + octave 3 + note D#, 2 + rest 2 + note D#, 2 + rest 2 + sound_ret + +.sub2: + octave 3 + note B_, 1 + octave 4 + note C_, 3 + note D#, 4 + note C_, 4 + note F#, 8 + note F_, 8 + note C_, 4 + sound_ret + +Music_RocketTheme_Ch3: + stereo_panning TRUE, FALSE + vibrato 4, 2, 2 + note_type 12, 1, 4 + rest 2 +.mainloop: + note_type 12, 1, 4 + sound_call Music_LookRocket_Ch3.sub1 + sound_call Music_LookRocket_Ch3.sub4 + sound_call Music_LookRocket_Ch3.sub4 + volume_envelope 2, 4 + sound_call Music_LookRocket_Ch3.sub5 + volume_envelope 1, 4 + sound_call Music_LookRocket_Ch3.sub2 + sound_call Music_LookRocket_Ch3.sub5 + sound_call Music_LookRocket_Ch3.sub3 + sound_call Music_LookRocket_Ch3.sub4 + sound_call Music_LookRocket_Ch3.sub4 + sound_call Music_LookRocket_Ch3.sub4 + sound_call Music_LookRocket_Ch3.sub4 + sound_call Music_LookRocket_Ch3.sub5 + sound_call Music_LookRocket_Ch3.sub2 + sound_call Music_LookRocket_Ch3.sub5 + sound_call Music_LookRocket_Ch3.sub2 + octave 3 + note C_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C#, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + octave 3 + note A#, 1 + note G_, 1 + note E_, 1 + note C#, 1 + note D_, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + octave 3 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + note D#, 1 + rest 1 + octave 4 + note D#, 1 + rest 1 + note C_, 1 + octave 3 + note A_, 1 + note F#, 1 + note D#, 1 + note E_, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + octave 3 + note F_, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + octave 3 + note F#, 1 + rest 1 + octave 4 + note D#, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 4 + note E_, 1 + rest 1 + octave 3 + note G#, 1 + rest 1 + octave 4 + note F_, 1 + rest 1 + octave 3 + note A_, 1 + rest 1 + octave 4 + note F#, 1 + rest 1 + octave 3 + note A#, 1 + rest 1 + octave 4 + note G_, 1 + rest 1 + octave 3 + note B_, 2 + octave 4 + note G#, 1 + rest 1 + sound_loop 0, .mainloop + +Music_RocketTheme_Ch4: + toggle_noise 3 + drum_speed 12 + rest 2 +.mainloop: + sound_call Music_LookRocket_Ch4.sub1 + sound_call Music_LookRocket_Ch4.sub2 + sound_call Music_LookRocket_Ch4.sub2 + sound_call Music_LookRocket_Ch4.sub2 + sound_call Music_LookRocket_Ch4.sub2 + sound_call Music_LookRocket_Ch4.sub2 + sound_call Music_LookRocket_Ch4.sub2 + sound_call Music_LookRocket_Ch4.sub2 + sound_call Music_LookRocket_Ch4.sub1 +.loop1: + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + drum_note 11, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 7, 2 + sound_loop 11, .loop1 + sound_call Music_LookRocket_Ch4.sub2 + sound_call Music_LookRocket_Ch4.sub2 + sound_call Music_LookRocket_Ch4.sub2 + sound_call Music_LookRocket_Ch4.sub1 + sound_call Music_LookRocket_Ch4.sub1 + sound_loop 0, .mainloop diff --git a/audio/music/route1.asm b/audio/music/route1.asm new file mode 100644 index 0000000..61e6526 --- /dev/null +++ b/audio/music/route1.asm @@ -0,0 +1,647 @@ +Music_Route1: + channel_count 3 + channel 1, Music_Route1_Ch1 + channel 2, Music_Route1_Ch2 + channel 3, Music_Route1_Ch3 + + db $3 ; unused, leftover from a channel 4 + +Music_Route1_Ch1: + stereo_panning FALSE, TRUE + tempo 184 + volume 7, 7 + vibrato 22, 1, 1 + duty_cycle 3 + note_type 12, 8, 3 + octave 4 + note D_, 1 + note E_, 1 + note F#, 2 + note F#, 2 + note D_, 2 + octave 3 + note A_, 2 + octave 4 + note B_, 2 + note A_, 2 + note G_, 2 + note F#, 2 + note D_, 2 + octave 3 + note A_, 2 + note F#, 2 + note G_, 1 + note A_, 1 + note G_, 2 + note E_, 2 + note G_, 1 + note E_, 1 + octave 4 + note D_, 1 + note E_, 1 + note F#, 2 + note F#, 2 + note D_, 2 + octave 3 + note A_, 2 + octave 4 + note B_, 2 + note A_, 2 + note G_, 3 + note E_, 1 + note E_, 2 + note G_, 2 + note A_, 2 + note G_, 2 + note F#, 2 + volume_envelope 8, 1 + octave 5 + note D_, 2 + note D_, 2 + volume_envelope 8, 3 + rest 2 +.mainloop: + volume_envelope 8, 3 + rest 2 + octave 4 + note D_, 2 + octave 3 + note A_, 2 + rest 4 + octave 4 + note D_, 2 + octave 3 + note A_, 2 + rest 2 + rest 2 + octave 4 + note D_, 2 + octave 3 + note A_, 3 + octave 4 + note D_, 1 + octave 3 + note E_, 2 + volume_envelope 8, 1 + note G_, 2 + note G_, 2 + volume_envelope 8, 3 + rest 2 + rest 2 + octave 4 + note C#, 2 + octave 3 + note A_, 2 + rest 4 + octave 4 + note C#, 2 + octave 3 + note A_, 2 + rest 2 + rest 2 + octave 4 + note C#, 2 + note C#, 1 + octave 3 + note B_, 1 + note A_, 1 + note G_, 1 + note F#, 2 + note A_, 2 + octave 4 + note D_, 2 + rest 2 + rest 2 + octave 3 + note F#, 1 + note G_, 1 + note A_, 4 + rest 2 + note D_, 1 + note E_, 1 + note F#, 2 + note F#, 1 + note G_, 1 + note A_, 2 + note A_, 1 + note B_, 1 + note A_, 2 + note A_, 1 + note B_, 1 + note A_, 2 + volume_envelope 8, 1 + octave 4 + note G_, 2 + note G_, 2 + volume_envelope 8, 3 + octave 3 + note F#, 1 + note E_, 1 + rest 2 + note E_, 1 + note F#, 1 + note G_, 6 + note E_, 1 + octave 2 + note B_, 1 + octave 3 + note C#, 2 + note E_, 1 + note F#, 1 + note G_, 4 + note_type 8, 8, 3 + note A_, 1 + note B_, 1 + note A_, 1 + note_type 12, 8, 3 + note G_, 1 + note E_, 1 + note F#, 2 + volume_envelope 8, 1 + octave 4 + note A_, 2 + note A_, 2 + volume_envelope 8, 3 + octave 3 + note A_, 1 + note G_, 1 + volume_envelope 7, 7 + volume_envelope 1, -5 + note F#, 4 + note A_, 4 + note G_, 2 + note F#, 2 + note E_, 2 + note G_, 2 + note F#, 4 + note A_, 3 + note F#, 1 + note E_, 2 + note A_, 2 + octave 4 + note C#, 2 + octave 3 + note A_, 1 + note G_, 1 + duty_cycle 2 + volume_envelope 8, 7 + octave 6 + note F#, 4 + note A_, 4 + note G_, 2 + note F#, 2 + note E_, 3 + note G_, 1 + note F#, 2 + note D_, 2 + note E_, 2 + note C#, 2 + note D_, 2 + volume_envelope 8, 1 + octave 5 + note D_, 2 + note D_, 2 + rest 2 + sound_loop 0, .mainloop + +Music_Route1_Ch2: + stereo_panning TRUE, FALSE + vibrato 18, 2, 2 + duty_cycle 2 + note_type 12, 9, 2 + octave 4 + note F#, 1 + note G_, 1 + sound_call .sub2 + octave 3 + note A_, 2 + note A_, 2 + octave 4 + note F#, 1 + note G_, 1 + sound_call .sub3 + note C#, 2 + note E_, 2 + note D_, 2 + volume_envelope 8, 1 + note F#, 2 + note F#, 2 + volume_envelope 8, 2 + octave 4 + note D_, 1 + note E_, 1 + duty_cycle 2 +.mainloop: + volume_envelope 8, 2 + sound_call .sub1 + volume_envelope 8, 1 + octave 3 + note A_, 2 + note A_, 2 + volume_envelope 8, 2 + octave 4 + note C#, 1 + note D_, 1 + note E_, 2 + note E_, 2 + note E_, 2 + note C#, 1 + note D_, 1 + note E_, 2 + note E_, 2 + note E_, 2 + note C#, 1 + note D_, 1 + note E_, 2 + note E_, 2 + note F#, 1 + note E_, 1 + note E_, 1 + note F#, 1 + note D_, 2 + rest 2 + note F#, 2 + note D_, 1 + note E_, 1 + sound_call .sub1 + volume_envelope 8, 1 + note A_, 2 + note A_, 2 + volume_envelope 8, 2 + note C#, 1 + note D_, 1 + note E_, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note D_, 2 + note C#, 2 + octave 3 + note B_, 2 + note A_, 2 + octave 4 + note B_, 4 + note_type 8, 9, 2 + note C#, 1 + note D_, 1 + note C#, 1 + note_type 12, 9, 2 + octave 3 + note B_, 1 + octave 4 + note C#, 1 + note D_, 2 + volume_envelope 8, 1 + octave 5 + note D_, 2 + note D_, 2 + volume_envelope 8, 2 + octave 4 + note F#, 1 + note G_, 1 + sound_call .sub2 + rest 4 + note F#, 1 + note G_, 1 + sound_call .sub3 + note_type 8, 9, 2 + note C#, 1 + note D_, 1 + note C#, 1 + note_type 12, 9, 2 + octave 4 + note B_, 1 + octave 5 + note C#, 1 + note D_, 2 + volume_envelope 8, 1 + note F#, 2 + note F#, 2 + volume_envelope 8, 2 + octave 4 + note D_, 1 + note E_, 1 + sound_loop 0, .mainloop + +.sub1: + note F#, 2 + note F#, 2 + note F#, 2 + note D_, 1 + note E_, 1 + note F#, 2 + note F#, 2 + note F#, 2 + note D_, 1 + note E_, 1 + note F#, 2 + note F#, 2 + note G_, 3 + note F#, 1 + note E_, 2 + sound_ret + +.sub2: + note A_, 2 + note A_, 2 + note F#, 2 + note D_, 2 + octave 5 + note D_, 2 + note C#, 2 + octave 4 + note B_, 2 + octave 5 + note D_, 2 + octave 4 + note A_, 2 + note F#, 2 + note D_, 3 + note F#, 1 + note E_, 2 + sound_ret + +.sub3: + note A_, 2 + note A_, 2 + note F#, 2 + note D_, 2 + octave 5 + note D_, 2 + note C#, 2 + octave 4 + note B_, 3 + note G_, 1 + note A_, 2 + octave 5 + note D_, 2 + sound_ret + +Music_Route1_Ch3: + stereo_panning TRUE, TRUE + vibrato 16, 2, 3 + note_type 12, 2, 5 + rest 2 + octave 3 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + octave 4 + note F#, 1 + rest 3 + octave 3 + note D_, 1 + rest 1 + note B_, 1 + rest 1 + octave 4 + note G_, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + note D_, 1 + rest 1 + note A_, 1 + rest 1 + octave 4 + note D_, 1 + rest 3 + octave 3 + note C#, 1 + rest 1 + note A_, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + note C#, 1 + octave 3 + note A_, 1 + note D_, 1 + octave 2 + note A_, 1 + octave 3 + note D_, 1 + note F#, 1 + octave 4 + note D_, 1 + octave 3 + note A_, 1 + note F#, 1 + note A_, 1 + note G_, 1 + note D_, 1 + note G_, 1 + note B_, 1 + octave 4 + note G_, 1 + note D_, 1 + octave 3 + note B_, 1 + note G_, 1 + octave 2 + note A_, 1 + octave 3 + note C#, 1 + note E_, 1 + note G_, 1 + note E_, 1 + note A_, 1 + octave 4 + note C#, 1 + note G_, 1 + note F#, 2 + note A_, 1 + rest 1 + note A_, 1 + rest 3 +.mainloop: + octave 3 + note D_, 1 + rest 1 + octave 4 + note D_, 2 + octave 3 + note C#, 1 + rest 1 + octave 4 + note C#, 2 + octave 2 + note B_, 1 + rest 1 + octave 3 + note B_, 2 + octave 2 + note A_, 1 + rest 1 + octave 3 + note A_, 2 + note D_, 1 + rest 1 + octave 4 + note D_, 2 + octave 2 + note A_, 1 + rest 1 + octave 3 + note A_, 2 + octave 2 + note B_, 1 + rest 1 + octave 3 + note B_, 2 + octave 2 + note A_, 1 + rest 1 + octave 3 + note A_, 2 + note C#, 1 + rest 1 + octave 4 + note C#, 2 + octave 2 + note A_, 1 + rest 1 + octave 3 + note A_, 2 + octave 2 + note B_, 1 + rest 1 + octave 3 + note B_, 2 + note C_, 1 + rest 1 + octave 4 + note C_, 2 + octave 3 + note C#, 1 + rest 1 + octave 4 + note C#, 2 + octave 2 + note A_, 1 + rest 1 + octave 3 + note A_, 2 + octave 4 + note D_, 2 + note C#, 1 + octave 3 + note B_, 1 + note A_, 2 + note G_, 1 + note E_, 1 + octave 2 + note D_, 1 + rest 1 + octave 3 + note D_, 2 + octave 2 + note E_, 1 + rest 1 + octave 3 + note E_, 2 + octave 2 + note F#, 1 + rest 1 + octave 3 + note F#, 2 + octave 2 + note A_, 1 + rest 1 + octave 3 + note A_, 2 + octave 4 + note D_, 2 + octave 3 + note A_, 2 + octave 4 + note D_, 2 + note F#, 2 + note E_, 2 + octave 3 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + octave 4 + note E_, 2 + octave 3 + note C#, 1 + rest 1 + octave 4 + note C#, 2 + octave 2 + note B_, 1 + rest 1 + octave 3 + note B_, 2 + octave 2 + note A_, 1 + rest 1 + octave 3 + note A_, 2 + octave 2 + note G_, 1 + rest 1 + octave 3 + note G_, 1 + note B_, 1 + octave 4 + note C#, 2 + note E_, 1 + note C#, 1 + octave 3 + note A_, 1 + note G_, 1 + note E_, 1 + note C#, 1 + note D_, 2 + octave 4 + note F#, 1 + rest 1 + note F#, 1 + rest 3 + octave 3 + note D_, 4 + note F#, 4 + note G_, 2 + note A_, 2 + note B_, 3 + note G_, 1 + note F#, 2 + note D_, 2 + octave 2 + note A_, 3 + octave 3 + note D_, 1 + note A_, 1 + note B_, 1 + note A_, 1 + note B_, 1 + note A_, 3 + note G_, 1 + note F#, 2 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note G_, 2 + note F#, 2 + note E_, 3 + note C#, 1 + note D_, 2 + note F#, 2 + note A_, 2 + octave 4 + note C#, 2 + note D_, 2 + octave 5 + note A_, 1 + rest 1 + note A_, 1 + rest 3 + sound_loop 0, .mainloop diff --git a/audio/music/route12.asm b/audio/music/route12.asm new file mode 100644 index 0000000..2e7fc75 --- /dev/null +++ b/audio/music/route12.asm @@ -0,0 +1,452 @@ +Music_Route12: + channel_count 4 + channel 1, Music_Route12_Ch1 + channel 2, Music_Route12_Ch2 + channel 3, Music_Route12_Ch3 + channel 4, Music_Route12_Ch4 + +Music_Route12_Ch1: + tempo 148 + volume 7, 7 + vibrato 18, 3, 4 + pitch_offset 1 + stereo_panning FALSE, TRUE + duty_cycle 3 + note_type 12, 9, 8 + octave 3 + note G#, 1 + rest 2 + note A_, 1 + note G#, 8 + octave 2 + note B_, 1 + octave 3 + note E_, 1 + note F#, 1 + note G#, 1 + note F#, 1 + rest 2 + note E_, 1 + volume_envelope 9, 7 + note D#, 12 +.mainloop: + duty_cycle 2 + volume_envelope 9, 6 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + note E_, 1 + rest 2 + note F#, 1 + note E_, 4 + note B_, 4 + octave 4 + note D#, 4 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + volume_envelope 9, 2 + octave 4 + note E_, 1 + octave 3 + note B_, 1 + note G#, 1 + note E_, 1 + octave 4 + note D#, 1 + octave 3 + note B_, 1 + note G#, 1 + note D#, 1 + octave 4 + note D_, 1 + octave 3 + note B_, 1 + note G#, 1 + note D_, 1 + note C#, 1 + note F_, 1 + note G#, 1 + note B_, 1 + duty_cycle 3 + volume_envelope 7, -7 + octave 4 + note C#, 3 + octave 3 + note B_, 3 + note A_, 1 + rest 1 + note A_, 4 + octave 4 + note C#, 2 + octave 3 + note B_, 2 + octave 4 + note C#, 1 + octave 3 + note B_, 1 + note A_, 4 + note G#, 2 + note F#, 2 + note G#, 2 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 3 + note A_, 3 + note G#, 1 + rest 1 + note G#, 4 + note B_, 2 + note A_, 2 + note B_, 1 + note A_, 1 + note G#, 4 + note F#, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note E_, 2 + note D#, 3 + note F#, 3 + note D#, 2 + note E_, 8 + note F#, 8 + note D#, 4 + note F#, 4 +.loop1: + volume_envelope 9, 7 + note G#, 1 + note A_, 1 + note B_, 4 + octave 2 + note B_, 1 + octave 3 + note D#, 1 + note E_, 1 + rest 1 + note E_, 1 + note F#, 1 + note G#, 4 + sound_loop 2, .loop1 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note G#, 1 + rest 1 + note E_, 1 + rest 1 + octave 2 + note B_, 1 + rest 1 + note B_, 1 + octave 3 + note D#, 1 + note E_, 4 + note G#, 4 + sound_ret + +.sub2: + note A_, 1 + rest 1 + note F#, 1 + rest 1 + note D_, 1 + rest 1 + note F#, 1 + note G#, 1 + note A_, 4 + note F#, 4 + sound_ret + +Music_Route12_Ch2: + duty_cycle 3 + vibrato 18, 3, 4 + note_type 12, 11, 8 + octave 4 + note E_, 1 + rest 2 + note F#, 1 + note E_, 12 + octave 3 + note B_, 1 + rest 2 + octave 4 + note C_, 1 + volume_envelope 11, 7 + octave 3 + note B_, 8 + note D#, 1 + note F#, 1 + note B_, 1 + octave 4 + note D#, 1 +.mainloop: + duty_cycle 3 + volume_envelope 11, 7 + sound_call .sub1 + note F#, 1 + note A_, 1 + note G#, 1 + note F#, 1 + note G#, 2 + rest 1 + note E_, 1 + octave 3 + note B_, 12 + duty_cycle 2 + octave 2 + note B_, 1 + rest 2 + octave 3 + note C_, 1 + octave 2 + note B_, 4 + octave 3 + note D#, 4 + note F#, 4 + duty_cycle 3 + sound_call .sub1 + note A_, 1 + octave 5 + note C#, 1 + octave 4 + note B_, 1 + note A_, 1 + note B_, 2 + rest 1 + note A_, 1 + volume_envelope 11, 8 + note G#, 6 + volume_envelope 11, 7 + note G#, 6 + volume_envelope 6, -7 + note G#, 16 + duty_cycle 2 + volume_envelope 10, 8 + note A_, 3 + note G#, 3 + note F#, 1 + rest 1 + note F#, 8 + volume_envelope 10, 7 + note F#, 10 + rest 2 + note F#, 4 + volume_envelope 10, 8 + note G#, 3 + note F#, 3 + note E_, 1 + rest 1 + note E_, 8 + volume_envelope 10, 7 + note E_, 10 + rest 2 + note E_, 4 + note F#, 3 + note D#, 3 + octave 3 + note B_, 2 + volume_envelope 10, 8 + octave 4 + note B_, 8 + note B_, 8 + note A_, 8 + note G#, 1 + note F#, 1 + note E_, 14 + note E_, 10 + volume_envelope 10, 4 + note E_, 6 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note E_, 6 + volume_envelope 11, 1 + octave 3 + note B_, 1 + note B_, 1 + volume_envelope 11, 7 + note B_, 4 + octave 4 + note B_, 4 + note A_, 4 + note G#, 4 + note F#, 4 + sound_ret + +Music_Route12_Ch3: + vibrato 18, 5, 4 + note_type 12, 1, 6 + octave 3 + note G#, 2 + rest 4 + note G#, 1 + note A_, 1 + note B_, 2 + rest 2 + note E_, 4 + note D#, 2 + rest 4 + note D#, 1 + note E_, 1 + note F#, 2 + rest 2 + note D#, 4 +.mainloop: + sound_call .sub1 + note F#, 1 + rest 1 + note E_, 1 + rest 3 + note D#, 1 + note E_, 1 + note F#, 4 + octave 2 + note B_, 4 + sound_call .sub1 + note E_, 1 + rest 1 + note B_, 1 + rest 3 + octave 2 + note B_, 1 + octave 3 + note C#, 1 + note D_, 4 + note F_, 4 + note F#, 13 + rest 1 + note F#, 1 + note G#, 1 + note A_, 5 + rest 1 + note A_, 1 + note B_, 1 + octave 4 + note C_, 4 + octave 3 + note F#, 4 + note E_, 14 + note G#, 1 + note A_, 1 + note B_, 6 + note E_, 1 + note F#, 1 + note G_, 4 + note E_, 4 + octave 2 + note B_, 5 + rest 1 + note B_, 1 + octave 3 + note D#, 1 + note F#, 8 + note E_, 8 + note F#, 4 + note D#, 4 +.loop1: + note E_, 1 + rest 1 + note E_, 1 + rest 3 + note E_, 1 + note F#, 1 + note G#, 4 + note E_, 3 + rest 1 + sound_loop 2, .loop1 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note E_, 1 + rest 1 + note E_, 1 + rest 3 + note E_, 1 + note F#, 1 + note G#, 4 + note E_, 4 + note D_, 1 + rest 1 + note D_, 1 + rest 3 + note D_, 1 + note E_, 1 + note F#, 4 + note D_, 4 + note E_, 1 + rest 1 + note E_, 1 + rest 3 + note E_, 1 + note F#, 1 + note G#, 4 + note E_, 4 + sound_ret + +Music_Route12_Ch4: + toggle_noise 4 + stereo_panning TRUE, FALSE + drum_speed 12 + drum_note 12, 10 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 4 + drum_note 12, 6 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 4 + drum_speed 6 + sound_call .sub1 +.mainloop: +.loop1: + drum_note 3, 4 + drum_note 3, 8 + drum_note 2, 2 + drum_note 2, 2 + drum_note 3, 8 + sound_call .sub1 + sound_loop 8, .loop1 +.loop2: + drum_speed 12 + drum_note 12, 10 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 6 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 6 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 4 + sound_loop 2, .loop2 + drum_note 12, 16 + drum_speed 6 + sound_call .sub1 + sound_call .sub1 + drum_note 12, 16 +.loop3: + drum_note 3, 4 + drum_note 3, 8 + drum_note 2, 2 + drum_note 2, 2 + drum_note 3, 8 + sound_call .sub1 + sound_loop 2, .loop3 + sound_loop 0, .mainloop + +.sub1: + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + sound_ret diff --git a/audio/music/route2.asm b/audio/music/route2.asm new file mode 100644 index 0000000..a4594e0 --- /dev/null +++ b/audio/music/route2.asm @@ -0,0 +1,516 @@ +Music_Route2: + channel_count 4 + channel 1, Music_Route2_Ch1 + channel 2, Music_Route2_Ch2 + channel 3, Music_Route2_Ch3 + channel 4, Music_Route2_Ch4 + +Music_Route2_Ch1: + tempo 151 + volume 7, 7 + stereo_panning FALSE, TRUE + vibrato 6, 2, 3 + note_type 12, 11, 1 + rest 16 + rest 16 + sound_call .sub1 +.mainloop: + volume_envelope 11, 1 + octave 3 + note B_, 4 + note B_, 4 + note B_, 4 + note B_, 4 + octave 4 + note E_, 4 + note E_, 4 + note E_, 4 + note E_, 4 + sound_call .sub1 + sound_call .sub2 + sound_call .sub2 + sound_call .sub3 + octave 3 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + octave 4 + note C_, 2 + note F_, 2 + note D_, 2 + octave 3 + note B_, 2 + note G_, 2 + sound_call .sub3 + note G_, 2 + octave 4 + note C_, 2 + note D_, 2 + note G_, 2 + note F_, 2 + note D_, 2 + octave 3 + note B_, 2 + note G_, 2 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note C_, 4 + note C_, 4 + note C_, 4 + note C_, 4 + note C_, 4 + note C_, 4 + volume_envelope 11, 7 + note C_, 4 + octave 3 + note B_, 4 + volume_envelope 11, 1 + sound_ret + +.sub2: + octave 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note B_, 2 + octave 3 + note E_, 2 + note E_, 2 + note A#, 2 + note E_, 2 + note A#, 2 + note E_, 2 + note A#, 2 + note E_, 2 + note A#, 2 + note C_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note C_, 2 + note A_, 2 + note C_, 2 + note G#, 2 + note C_, 2 + note G#, 2 + volume_envelope 11, 7 + octave 2 + note B_, 2 + octave 3 + note G#, 2 + octave 2 + note B_, 2 + octave 3 + note G_, 2 + volume_envelope 11, 1 + sound_ret + +.sub3: + note B_, 2 + note G_, 2 + note B_, 2 + note G_, 2 + note B_, 2 + note G#, 2 + note B_, 2 + note G#, 2 + octave 4 + note E_, 2 + note C_, 2 + note E_, 2 + note C_, 2 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note C_, 2 + octave 3 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note A_, 2 + sound_ret + +Music_Route2_Ch2: + stereo_panning TRUE, TRUE + vibrato 8, 2, 4 + note_type 12, 11, 2 + sound_call .sub1 +.mainloop: + volume_envelope 11, 2 + sound_call .sub1 + duty_cycle 2 + volume_envelope 11, 5 + sound_call .sub2 + sound_call .sub2 + sound_call .sub3 + sound_call .sub3 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note E_, 4 + note E_, 4 + note E_, 2 + octave 2 + note C_, 2 + octave 4 + note E_, 2 + octave 2 + note C_, 2 + octave 4 + note A#, 4 + note A#, 4 + note A#, 2 + octave 2 + note G_, 2 + octave 4 + note A#, 2 + octave 2 + note G_, 2 + octave 4 + note A_, 4 + note A_, 4 + note A_, 4 + note A_, 4 + note G#, 4 + note G#, 4 + volume_envelope 11, 7 + note G#, 4 + note G_, 4 + volume_envelope 11, 2 + sound_ret + +.sub2: + octave 2 + note C_, 4 + rest 2 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 2 + rest 2 + note C_, 1 + rest 1 + note G_, 4 + rest 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 2 + rest 2 + note G_, 1 + rest 1 + note F_, 4 + rest 2 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note F_, 2 + rest 2 + note F_, 1 + rest 1 + note F_, 4 + rest 2 + note F_, 1 + rest 1 + note F_, 4 + note D_, 4 + sound_ret + +.sub3: + octave 2 + note E_, 4 + rest 2 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note E_, 2 + rest 2 + note E_, 1 + rest 1 + note A_, 4 + rest 2 + note A_, 1 + rest 1 + note G#, 1 + rest 1 + note G#, 2 + rest 2 + note G#, 1 + rest 1 + note F_, 4 + rest 2 + note F_, 1 + rest 1 + note F#, 1 + rest 1 + note F#, 2 + rest 2 + note F#, 1 + rest 1 + note G_, 4 + rest 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 2 + rest 2 + note G_, 1 + rest 1 + sound_ret + +Music_Route2_Ch3: + stereo_panning TRUE, FALSE + vibrato 22, 1, 5 + note_type 12, 1, 4 + octave 4 + note B_, 1 + rest 3 + note B_, 1 + rest 3 + note B_, 1 + rest 3 + note B_, 1 + rest 3 + octave 5 + note E_, 1 + rest 3 + note E_, 1 + rest 3 + note E_, 1 + rest 3 + note E_, 1 + rest 3 + sound_call .sub1 + octave 3 + note D_, 4 +.mainloop: + note_type 12, 1, 5 + octave 3 + note C_, 4 + rest 2 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 2 + rest 2 + note C_, 1 + rest 1 + note G_, 4 + rest 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 2 + rest 2 + note G_, 1 + rest 1 + sound_call .sub1 + octave 3 + note D_, 2 + volume_envelope 1, 0 + octave 6 + note C_, 1 + note D_, 1 + sound_call .sub2 + rest 4 + note G_, 8 + note F_, 2 + note G_, 2 + note_type 12, 1, 0 + sound_call .sub2 + rest 16 + volume_envelope 2, 5 + sound_call .sub3 + rest 4 + note D#, 1 + note E_, 7 + note D_, 4 + octave 5 + note B_, 1 + octave 6 + note C_, 3 + octave 5 + note B_, 4 + note A_, 4 + note B_, 8 + note G_, 4 + octave 6 + note A_, 4 + note G_, 4 + sound_call .sub3 + rest 4 + note G#, 1 + note A_, 7 + note B_, 4 + note F#, 1 + note G_, 16 + note G_, 15 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note F_, 4 + rest 2 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note F_, 2 + rest 2 + note F_, 1 + rest 1 + note F_, 4 + rest 2 + note F_, 1 + rest 1 + note F_, 4 + sound_ret + +.sub2: + octave 6 + note E_, 10 + note D_, 2 + rest 2 + note C_, 2 + note_type 6, 1, 0 + octave 5 + note F#, 1 + note G_, 15 + note A_, 4 + note A#, 4 + rest 4 + octave 6 + note C_, 2 + note D_, 2 + note D#, 1 + note E_, 16 + note E_, 7 + note F_, 4 + note E_, 4 + note D#, 1 + note E_, 3 + note D_, 4 + note C_, 4 + note D_, 4 + sound_ret + +.sub3: + octave 5 + note B_, 16 + rest 4 + octave 6 + note C#, 1 + note D_, 7 + note E_, 4 + octave 5 + note B_, 1 + octave 6 + note C_, 16 + note C_, 3 + note D_, 4 + rest 4 + note E_, 4 + note F_, 16 + sound_ret + +Music_Route2_Ch4: + toggle_noise 5 + drum_speed 12 +.loop1: + drum_note 10, 4 + drum_note 10, 4 + drum_note 10, 2 + drum_note 12, 2 + drum_note 10, 2 + drum_note 12, 2 + sound_loop 3, .loop1 + drum_note 10, 4 + drum_note 10, 4 + drum_note 10, 2 + drum_note 10, 2 + drum_note 4, 4 +.mainloop: +.loop2: + drum_note 10, 4 + drum_note 10, 4 + drum_note 10, 2 + drum_note 10, 2 + drum_note 12, 2 + drum_note 10, 2 + sound_loop 4, .loop2 +.loop3: + drum_note 12, 4 + drum_note 10, 2 + drum_note 12, 2 + drum_note 10, 2 + drum_note 12, 2 + drum_note 10, 2 + drum_note 12, 2 + sound_loop 7, .loop3 + drum_note 12, 4 + drum_note 10, 4 + drum_note 10, 2 + drum_note 10, 2 + drum_note 4, 4 +.loop4: + drum_note 12, 4 + drum_note 1, 4 + drum_note 12, 2 + drum_note 12, 2 + drum_note 1, 4 + sound_loop 3, .loop4 + drum_note 12, 4 + drum_note 1, 4 + drum_note 2, 2 + drum_note 1, 2 + drum_note 2, 4 +.loop5: + drum_note 12, 4 + drum_note 1, 4 + drum_note 12, 2 + drum_note 12, 2 + drum_note 1, 4 + sound_loop 3, .loop5 + drum_note 12, 4 + drum_note 1, 4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 4, 4 + sound_loop 0, .mainloop diff --git a/audio/music/route26.asm b/audio/music/route26.asm new file mode 100644 index 0000000..49cad4d --- /dev/null +++ b/audio/music/route26.asm @@ -0,0 +1,666 @@ +Music_Route26: + channel_count 4 + channel 1, Music_Route26_Ch1 + channel 2, Music_Route26_Ch2 + channel 3, Music_Route26_Ch3 + channel 4, Music_Route26_Ch4 + +Music_Route26_Ch1: + stereo_panning FALSE, TRUE + vibrato 18, 2, 3 + tempo 151 + volume 7, 7 + vibrato 20, 2, 3 + duty_cycle 0 + note_type 12, 10, 7 + octave 3 + note D_, 4 + rest 4 + note D#, 4 + rest 4 + note F#, 4 + rest 4 + note G#, 12 + note_type 8, 10, 7 + octave 4 + note C_, 2 + octave 3 + note G#, 2 + note F#, 2 +.mainloop: + duty_cycle 0 + note_type 12, 10, 7 + octave 3 + note F_, 1 + rest 2 + note C#, 1 + note F_, 3 + note G_, 1 + note G#, 1 + rest 2 + note F_, 1 + octave 4 + note C#, 4 + note D#, 4 + octave 3 + note B_, 4 + note A_, 4 + note F#, 4 + note F_, 1 + rest 1 + note C#, 1 + note F_, 1 + note G#, 3 + note G_, 1 + note G#, 1 + rest 1 + note F_, 1 + note G#, 1 + octave 4 + note C#, 4 + note E_, 4 + note D#, 4 + octave 3 + note A_, 4 + note B_, 4 + note A#, 1 + rest 1 + note F_, 1 + note A#, 1 + octave 4 + note C#, 1 + rest 1 + octave 3 + note A#, 1 + octave 4 + note C#, 1 + note F_, 4 + note C#, 1 + rest 1 + octave 3 + note A_, 1 + rest 1 + note A#, 4 + rest 2 + note_type 6, 10, 7 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + note A#, 2 + rest 2 + note A#, 2 + rest 2 + note G_, 2 + rest 2 + note G_, 2 + rest 2 + note_type 8, 10, 5 + note G#, 2 + octave 4 + note C#, 2 + note D#, 2 + note G#, 6 + note F#, 6 + note D#, 6 + note C#, 6 + octave 3 + note A#, 6 + octave 4 + note C_, 6 + octave 3 + note G#, 6 + duty_cycle 2 + note_type 12, 10, 5 + note A_, 3 + note G#, 3 + note F#, 4 + note C#, 2 + note D#, 2 + note E_, 2 + note F#, 2 + note B_, 4 + note A_, 2 + note G#, 2 + note F#, 2 + note G#, 2 + note A_, 2 + note G#, 4 + note F#, 4 + note E_, 4 + note D#, 4 + octave 4 + note C#, 2 + octave 3 + note B_, 2 + note G#, 2 + note F_, 4 + note F#, 2 + note_type 6, 10, 5 + note G#, 7 + octave 4 + note C_, 1 + note C#, 8 + note_type 8, 10, 5 + octave 3 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + note C#, 6 + note_type 6, 10, 5 + rest 7 + octave 4 + note D#, 1 + note E_, 8 + note_type 8, 10, 5 + octave 3 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note E_, 6 + rest 6 + note_type 12, 10, 5 + octave 2 + note B_, 1 + note F#, 1 + note B_, 1 + octave 3 + note E_, 1 + note F#, 1 + note E_, 1 + note F#, 1 + note B_, 1 + octave 4 + note E_, 1 + octave 3 + note B_, 1 + octave 4 + note E_, 1 + note F#, 1 + note B_, 1 + note F#, 1 + note E_, 1 + octave 3 + note B_, 1 + note F#, 4 + note D#, 4 + octave 2 + note B_, 4 + rest 4 + sound_loop 0, .mainloop + +Music_Route26_Ch2: + stereo_panning TRUE, FALSE + vibrato 20, 2, 3 + duty_cycle 2 + note_type 12, 12, 7 + octave 1 + note A#, 4 + rest 2 + note_type 6, 12, 7 + note A#, 1 + rest 1 + octave 2 + note A#, 1 + rest 1 + octave 1 + note G#, 8 + rest 4 + note G#, 1 + rest 1 + octave 2 + note G#, 1 + rest 1 + octave 1 + note F#, 8 + rest 4 + note F#, 1 + rest 1 + octave 2 + note F#, 1 + rest 1 + note_type 12, 12, 7 + octave 1 + note G#, 12 + note_type 8, 12, 7 + note G#, 2 + octave 2 + note C_, 2 + note D#, 2 +.mainloop: + duty_cycle 2 + note_type 12, 12, 2 + octave 2 + note C#, 6 + note C#, 1 + note G#, 1 + note C#, 2 + note C#, 2 + note G#, 2 + note C#, 2 + octave 1 + note B_, 6 + note B_, 1 + octave 2 + note A_, 1 + octave 1 + note B_, 2 + note B_, 2 + note B_, 2 + note B_, 2 + sound_call .sub1 + note A_, 6 + note A_, 1 + octave 2 + note B_, 1 + note_type 8, 12, 2 + octave 1 + note B_, 2 + note B_, 2 + note B_, 2 + octave 2 + note B_, 2 + note B_, 2 + note B_, 2 + note_type 12, 12, 2 + sound_call .sub1 + volume_envelope 12, 7 + octave 2 + note F#, 4 + rest 2 + note_type 6, 12, 2 + note F#, 2 + note F#, 2 + note F#, 4 + note F#, 4 + note D#, 4 + note D#, 4 + note_type 8, 12, 2 +.loop1: + octave 2 + note G#, 2 + note G#, 2 + note G#, 2 + octave 1 + note G#, 6 + sound_loop 3, .loop1 + octave 2 + note G#, 2 + note G#, 2 + note G#, 2 + note_type 12, 12, 7 + note F#, 1 + note D#, 1 + note C_, 1 + octave 1 + note G#, 1 + duty_cycle 3 + octave 4 + note C#, 6 + note D#, 6 + note E_, 4 + note F#, 6 + note B_, 4 + note A_, 2 + note G#, 2 + note A_, 2 + note G#, 6 + note D#, 2 + rest 2 + note D#, 2 + note G#, 2 + note D#, 2 + note F_, 2 + rest 2 + note F_, 2 + note F#, 6 + note G#, 4 + note A_, 8 + rest 2 + note A_, 2 + note G#, 2 + note F#, 2 + note A_, 8 + rest 4 + note G#, 2 + note A_, 2 + note B_, 12 + rest 4 + note D#, 12 + note D#, 1 + note C#, 1 + note C_, 1 + note D#, 1 + sound_loop 0, .mainloop + +.sub1: + note A#, 6 + note A#, 1 + octave 2 + note A#, 1 + octave 1 + note A#, 2 + note A#, 2 + octave 2 + note A#, 2 + octave 1 + note A#, 2 + sound_ret + +Music_Route26_Ch3: + stereo_panning TRUE, TRUE + vibrato 18, 2, 3 + note_type 12, 1, 4 + vibrato 24, 2, 3 + octave 4 + note A#, 4 + rest 2 + note_type 6, 1, 4 + note F_, 1 + rest 1 + note A#, 1 + rest 1 + octave 5 + note C_, 8 + rest 4 + octave 4 + note G#, 1 + rest 1 + octave 5 + note C_, 1 + rest 1 + note C#, 8 + rest 4 + octave 4 + note A#, 1 + rest 1 + octave 5 + note C#, 1 + rest 1 + note_type 12, 1, 4 + note D#, 12 + note_type 8, 1, 4 + note F#, 2 + note F_, 2 + note D#, 2 +.mainloop: + vibrato 24, 2, 3 + note_type 12, 1, 4 + octave 5 + note C#, 1 + rest 2 + octave 4 + note G#, 1 + sound_call .sub1 + vibrato 37, 1, 3 + note C#, 1 + rest 1 + octave 4 + note G#, 1 + octave 5 + note C#, 1 + sound_call .sub1 + note F_, 1 + rest 1 + note C#, 1 + note F_, 1 + note A#, 8 + note A#, 1 + rest 1 + octave 6 + note C_, 1 + rest 1 + note C#, 12 + note D#, 4 + note C#, 8 + note C_, 8 + octave 5 + note A#, 8 + octave 6 + note C_, 4 + note G#, 1 + note D#, 1 + note C_, 1 + octave 5 + note G#, 1 + volume_envelope 1, 5 + octave 2 + note A_, 1 + rest 1 + note A_, 1 + rest 3 + note_type 6, 1, 5 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 2 + rest 2 + note A_, 2 + rest 2 + octave 3 + note A_, 2 + rest 2 + octave 2 + note A_, 4 + note B_, 2 + rest 2 + note B_, 2 + rest 6 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note B_, 2 + rest 2 + note B_, 2 + rest 2 + octave 3 + note B_, 2 + rest 2 + note A_, 4 + note G#, 2 + rest 2 + octave 2 + note G#, 2 + rest 6 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note G#, 2 + rest 2 + note G#, 2 + rest 2 + octave 3 + note G#, 2 + rest 2 + octave 2 + note G#, 2 + rest 2 + octave 3 + note C#, 2 + rest 10 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + note C#, 2 + rest 2 + note C#, 2 + rest 2 + octave 4 + note F_, 2 + rest 2 + note C#, 4 + octave 3 + note F#, 8 + note_type 8, 1, 5 + octave 2 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + note F#, 6 + rest 6 + octave 4 + note C_, 6 + octave 3 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 6 + rest 6 + note_type 12, 1, 5 + octave 2 + note B_, 16 + note B_, 8 + octave 3 + note F#, 4 + note D#, 1 + rest 1 + octave 2 + note G#, 1 + octave 3 + note C_, 1 + sound_loop 0, .mainloop + +.sub1: + octave 5 + note F_, 8 + note C#, 2 + note F_, 2 + note G#, 4 + note F#, 4 + note C#, 4 + note D#, 4 + sound_ret + +Music_Route26_Ch4: + toggle_noise 4 + drum_speed 12 +.loop1: + drum_note 12, 6 + drum_note 3, 1 + drum_note 3, 1 + sound_loop 3, .loop1 + sound_call .sub3 +.mainloop: + drum_speed 6 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + drum_note 3, 12 + drum_note 3, 2 + drum_note 3, 2 + drum_speed 8 + drum_note 3, 2 + drum_note 2, 2 + drum_note 2, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 5, 2 + drum_speed 6 + sound_call .sub1 + sound_call .sub1 + drum_speed 8 +.loop2: + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 12, 6 + sound_loop 4, .loop2 + drum_speed 6 + sound_call .sub2 + sound_call .sub2 + sound_call .sub1 + sound_call .sub2 +.loop3: + drum_speed 6 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_speed 8 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 12, 12 + sound_loop 2, .loop3 + drum_speed 12 + drum_note 12, 16 + sound_call .sub3 + sound_loop 0, .mainloop + +.sub1: + drum_note 5, 12 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 4 + drum_note 3, 4 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + sound_ret + +.sub2: + drum_note 5, 12 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 4 + drum_note 3, 4 + drum_note 5, 4 + drum_note 3, 4 + sound_ret + +.sub3: + drum_speed 6 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_speed 8 + drum_note 3, 2 + drum_note 3, 2 + drum_note 5, 2 + sound_ret diff --git a/audio/music/route29.asm b/audio/music/route29.asm new file mode 100644 index 0000000..aaf3237 --- /dev/null +++ b/audio/music/route29.asm @@ -0,0 +1,521 @@ +Music_Route29: + channel_count 4 + channel 1, Music_Route29_Ch1 + channel 2, Music_Route29_Ch2 + channel 3, Music_Route29_Ch3 + channel 4, Music_Route29_Ch4 + +Music_Route29_Ch1: + tempo 146 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 + vibrato 16, 1, 5 + stereo_panning FALSE, TRUE + note_type 12, 11, 2 + rest 2 +.mainloop: + rest 2 + octave 4 + note C_, 2 + note E_, 2 + note C_, 4 + octave 3 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 4 + note A_, 2 + note F#, 2 + note C_, 4 + octave 4 + note D_, 2 + octave 3 + note B_, 2 + note D_, 4 + octave 4 + note C_, 2 + note E_, 2 + note C_, 4 + octave 3 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note A_, 4 + note A_, 2 + note C_, 2 + note D_, 2 + note G_, 2 + note C_, 2 + note C_, 4 + note G_, 2 + octave 4 + note C_, 2 + note E_, 2 + note C_, 2 + octave 3 + note E_, 2 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note F_, 1 + note G_, 1 + note A_, 2 + note C_, 2 + note F#, 2 + note D_, 2 + octave 4 + note D_, 2 + octave 3 + note B_, 4 + note E_, 2 + octave 4 + note C_, 2 + note E_, 2 + note E_, 2 + octave 3 + note E_, 2 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note D_, 1 + note G_, 1 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note G_, 2 + note E_, 1 + note F_, 1 + note G_, 2 + note G_, 2 + note F_, 8 + volume_envelope 11, 4 + note A_, 4 + octave 4 + note C_, 2 + octave 3 + note A_, 10 + note E_, 4 + note G_, 2 + note E_, 2 + volume_envelope 11, 2 + note G_, 6 + volume_envelope 11, 4 + note F_, 4 + note A_, 2 + note G_, 2 + note F_, 2 + volume_envelope 11, 2 + note A_, 4 + volume_envelope 11, 4 + note C#, 4 + note E_, 2 + note G_, 4 + volume_envelope 11, 3 + note E_, 8 + volume_envelope 11, 4 + note A_, 2 + note G_, 2 + note A_, 2 + octave 4 + note C_, 4 + volume_envelope 11, 2 + octave 3 + note A_, 6 + volume_envelope 11, 4 + note G_, 2 + note E_, 2 + note G_, 2 + octave 4 + note C_, 4 + octave 3 + note G_, 2 + octave 4 + note D_, 2 + note C_, 2 + octave 3 + note B_, 2 + note A_, 2 + volume_envelope 11, 2 + note G_, 4 + note B_, 4 + volume_envelope 11, 4 + note G_, 2 + note E_, 2 + octave 4 + note C_, 2 + octave 3 + note E_, 4 + note E_, 2 + octave 4 + note C_, 2 + octave 3 + note E_, 2 + note G_, 4 + octave 4 + note C_, 2 + octave 3 + note E_, 2 + volume_envelope 11, 2 + note C_, 2 + note G_, 2 + note G_, 4 + sound_loop 0, .mainloop + +Music_Route29_Ch2: + duty_cycle 3 + vibrato 18, 3, 6 + note_type 12, 12, 2 + octave 4 + note C_, 1 + note D_, 1 +.mainloop: + sound_call .sub1 + note F_, 1 + note E_, 1 + note D_, 2 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note C_, 2 + octave 3 + note E_, 2 + note E_, 2 + octave 4 + note C_, 1 + note D_, 1 + sound_call .sub1 + note F_, 1 + note E_, 1 + note D_, 2 + note D_, 2 + octave 3 + note B_, 2 + volume_envelope 12, 4 + octave 4 + note C_, 8 + octave 3 + note A_, 2 + note A_, 2 + octave 4 + note C_, 2 + note C_, 2 + note F_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + octave 3 + note G_, 2 + note G_, 2 + octave 4 + note C_, 2 + note C_, 2 + note E_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + octave 3 + note F_, 2 + note F_, 2 + note A_, 2 + note A_, 2 + octave 4 + note D_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note D_, 2 + note C#, 2 + note D_, 2 + note C#, 2 + octave 3 + note A#, 2 + note A_, 2 + note G_, 2 + note A_, 2 + note A_, 2 + octave 4 + note C_, 2 + note C_, 2 + note F_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + octave 3 + note G_, 2 + note G_, 2 + octave 4 + note C_, 2 + note C_, 2 + note E_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note F_, 2 + volume_envelope 12, 2 + note E_, 4 + note D_, 4 + volume_envelope 12, 4 + note C_, 2 + octave 3 + note G_, 2 + octave 4 + note E_, 2 + octave 3 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + octave 4 + note E_, 2 + octave 3 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + octave 4 + note E_, 2 + octave 3 + note G_, 2 + volume_envelope 12, 2 + octave 4 + note C_, 2 + note C_, 2 + note C_, 2 + octave 4 + note C_, 1 + note D_, 1 + sound_loop 0, .mainloop + +.sub1: + note E_, 2 + note E_, 2 + note G_, 2 + note G_, 2 + note C_, 2 + note D_, 2 + note E_, 2 + note C_, 2 + note F_, 1 + note E_, 1 + note D_, 2 + octave 3 + note B_, 2 + note A_, 2 + note G_, 2 + octave 4 + note A_, 2 + note G_, 2 + note C_, 1 + note D_, 1 + note E_, 2 + note E_, 2 + note G_, 2 + note G_, 2 + note C_, 2 + note D_, 2 + note E_, 2 + note C_, 2 + sound_ret + +Music_Route29_Ch3: + stereo_panning TRUE, FALSE + note_type 12, 2, 5 + vibrato 9, 2, 7 + rest 2 +.mainloop: + rest 2 + octave 3 + note G_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + note E_, 1 + rest 3 + note E_, 1 + rest 1 + octave 3 + note A_, 1 + rest 1 + octave 4 + note E_, 1 + rest 1 + octave 3 + note F_, 1 + rest 1 + octave 4 + note C_, 1 + rest 3 + octave 3 + note A_, 1 + rest 1 + note G_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + octave 3 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + note E_, 1 + rest 3 + note C_, 1 + rest 1 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + octave 3 + note F_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + note B_, 1 + rest 1 + octave 4 + note E_, 1 + rest 1 + octave 3 + note G_, 1 + rest 1 + note G_, 1 + rest 3 + note E_, 4 + note G_, 4 + octave 4 + note C_, 4 + octave 3 + note G_, 4 + note F_, 4 + note F#, 4 + octave 4 + note C_, 4 + octave 3 + note B_, 4 + note E_, 4 + note G_, 4 + octave 4 + note C_, 4 + octave 3 + note G_, 2 + note E_, 2 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + octave 4 + note C_, 2 + note D_, 2 + note C_, 6 + octave 3 + note F_, 6 + note A_, 4 + octave 4 + note C_, 6 + octave 3 + note G_, 6 + note A_, 2 + note A#, 2 + note B_, 6 + note G_, 6 + octave 4 + note D_, 2 + note F_, 2 + octave 3 + note A_, 6 + note E_, 2 + octave 4 + note E_, 2 + note C#, 2 + octave 3 + note A_, 2 + note G_, 2 + note A_, 6 + octave 4 + note C_, 6 + octave 3 + note A_, 4 + note G_, 6 + octave 4 + note C_, 6 + note F_, 2 + note E_, 2 + note F_, 6 + note F_, 2 + note E_, 2 + rest 2 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note C_, 6 + octave 3 + note G_, 6 + octave 4 + note C_, 4 + note E_, 4 + note C_, 4 + octave 3 + note G_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + note C_, 1 + rest 3 + sound_loop 0, .mainloop + +Music_Route29_Ch4: + stereo_panning FALSE, TRUE + toggle_noise 0 + drum_speed 12 + rest 2 +.mainloop: + rest 2 + drum_note 6, 2 + drum_note 6, 6 + drum_note 6, 2 + drum_note 6, 2 + drum_note 6, 2 + rest 2 + drum_note 6, 4 + drum_note 6, 4 + drum_note 6, 2 + drum_note 6, 4 + sound_loop 0, .mainloop diff --git a/audio/music/route3.asm b/audio/music/route3.asm new file mode 100644 index 0000000..cb93d6e --- /dev/null +++ b/audio/music/route3.asm @@ -0,0 +1,503 @@ +Music_Route3: + channel_count 4 + channel 1, Music_Route3_Ch1 + channel 2, Music_Route3_Ch2 + channel 3, Music_Route3_Ch3 + channel 4, Music_Route3_Ch4 + +Music_Route3_Ch1: + stereo_panning FALSE, TRUE + tempo 160 + volume 7, 7 + note_type 12, 9, 1 + rest 10 + duty_cycle 0 + vibrato 20, 0, 6 + octave 3 + note C#, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note A_, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note A_, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note A_, 1 + note F_, 1 + note D_, 1 + note F_, 1 + note D_, 1 + note F_, 1 + note D_, 1 + note F_, 1 + note C#, 1 + note E_, 1 + note A_, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note F#, 1 + note G#, 1 +.mainloop: + sound_call .sub1 + note G_, 1 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + note G_, 1 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + note G_, 1 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + note A_, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note A_, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note A_, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note A_, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note A_, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note A_, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note C#, 1 + note E_, 1 + note G_, 1 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + note G_, 1 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + note G_, 1 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + volume_envelope 6, -7 + note G_, 1 + note D_, 1 + volume_envelope 7, 7 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + note G_, 1 + note D_, 1 + note E_, 1 + note G#, 1 + note B_, 4 + volume_envelope 6, -7 + octave 3 + note G#, 2 + note E_, 2 + note A_, 2 + note G#, 2 + note A_, 2 + note E_, 8 + note D#, 1 + note E_, 1 + note G#, 2 + octave 2 + note B_, 4 + octave 3 + note D_, 2 + note E_, 2 + note G#, 2 + note B_, 2 + note A_, 1 + note G#, 1 + note F_, 3 + note E_, 3 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note E_, 2 + note F_, 2 + volume_envelope 9, 1 + note F#, 1 + note D_, 1 + octave 2 + note A_, 1 + octave 3 + note D_, 1 + note F#, 1 + note A_, 1 + note F#, 1 + note A_, 1 + note B_, 1 + note G#, 1 + note E_, 1 + note G#, 1 + note E_, 1 + note G#, 1 + note B_, 1 + octave 4 + note D_, 1 + sound_loop 0, .mainloop + +.sub1: +.sub1loop1: + octave 3 + note A_, 1 + note E_, 1 + note C#, 1 + note E_, 1 + sound_loop 3, .sub1loop1 + note C#, 1 + note E_, 1 + note C#, 1 + note E_, 1 +.sub1loop2: + note A_, 1 + note E_, 1 + note C#, 1 + note E_, 1 + sound_loop 3, .sub1loop2 + note C#, 1 + note E_, 1 + note C#, 1 + note E_, 1 +.sub1loop3: + note G_, 1 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + sound_loop 3, .sub1loop3 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + octave 2 + note B_, 1 + octave 3 + note D_, 1 + sound_ret + +Music_Route3_Ch2: + stereo_panning TRUE, FALSE + note_type 12, 5, -6 + duty_cycle 2 + vibrato 6, 0, 3 + octave 4 + note E_, 1 + note G_, 1 + note G#, 6 + volume_envelope 8, 7 + note F#, 1 + note G#, 1 + note A_, 1 + rest 7 + note C#, 4 + note E_, 4 + note D_, 4 + octave 3 + note B_, 4 + octave 4 + note C#, 4 + volume_envelope 10, 7 + duty_cycle 2 + octave 3 + note A_, 1 + octave 4 + note C#, 1 + note E_, 1 + note G#, 1 +.mainloop: + volume_envelope 7, -5 + sound_call .sub1 + note G_, 1 + note B_, 10 + volume_envelope 11, 7 + note B_, 6 + volume_envelope 7, -5 + rest 4 + duty_cycle 3 + note G#, 4 + sound_call .sub1 + note B_, 1 + volume_envelope 7, -5 + octave 5 + note D_, 5 + volume_envelope 11, 7 + octave 5 + note D_, 5 + duty_cycle 0 + octave 3 + note D_, 1 + note G_, 1 + note B_, 1 + rest 1 + note G_, 1 + note B_, 1 + octave 4 + note D_, 4 + volume_envelope 8, -7 + duty_cycle 2 + octave 4 + note E_, 2 + note D_, 2 + note C#, 2 + octave 3 + note B_, 2 + octave 4 + note C#, 2 + octave 3 + note A_, 8 + note G#, 1 + note A_, 1 + note B_, 2 + note E_, 4 + octave 4 + note E_, 8 + note D_, 1 + note C#, 1 + note D_, 3 + note C#, 3 + octave 3 + note A_, 10 + duty_cycle 2 + octave 4 + note F#, 6 + note E_, 1 + note F#, 1 + note G#, 6 + note F#, 1 + note G#, 1 + sound_loop 0, .mainloop + +.sub1: + note A_, 6 + note E_, 1 + note A_, 1 + octave 5 + note C#, 7 + volume_envelope 11, 7 + octave 5 + note C#, 3 + volume_envelope 7, -5 + octave 4 + note E_, 2 + note A_, 2 + octave 5 + note E_, 2 + note D_, 2 + note C#, 2 + octave 4 + note B_, 2 + note A_, 2 + note G_, 6 + note D_, 1 + sound_ret + +Music_Route3_Ch3: + stereo_panning TRUE, TRUE + vibrato 6, 0, 3 + note_type 12, 1, 3 + octave 3 + note B_, 1 + octave 4 + note D_, 1 + note E_, 6 + note D_, 1 + octave 3 + note B_, 1 + volume_envelope 1, 4 + octave 3 + note A_, 1 + rest 1 + octave 2 + note A_, 2 + rest 2 + note A_, 1 + note A_, 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note G#, 2 + sound_call .sub1 +.mainloop: + volume_envelope 1, 4 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + note A_, 2 + octave 3 + note C#, 2 + note E_, 2 + note A_, 6 + note G#, 2 + note F#, 2 + note E_, 2 + note D_, 2 + octave 2 + note B_, 2 + note G#, 2 + note E_, 1 + rest 1 + note E_, 2 + note B_, 2 + octave 3 + note E_, 2 + note F_, 6 + note E_, 2 + note D_, 2 + octave 2 + note B_, 2 + octave 3 + note C_, 2 + note C#, 2 + note D_, 1 + rest 1 + note D_, 2 + rest 2 + note D_, 1 + note D_, 1 + note E_, 1 + rest 1 + note E_, 2 + rest 2 + note F#, 1 + note G#, 1 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note A_, 1 + rest 1 + octave 2 + note A_, 2 + rest 2 + note A_, 1 + note A_, 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + octave 3 + note A_, 2 + octave 2 + note G#, 2 + sound_ret + +.sub2: + octave 3 + note G_, 1 + rest 1 + octave 2 + note A_, 2 + rest 2 + note A_, 1 + note A_, 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + octave 3 + note D_, 2 + note G_, 2 + note G_, 1 + rest 1 + octave 2 + note G_, 2 + rest 2 + note G_, 1 + note G_, 1 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note G#, 2 + note B_, 2 + sound_ret + +Music_Route3_Ch4: + toggle_noise 4 + drum_speed 12 + rest 10 +.mainloop: + drum_speed 12 + drum_note 3, 2 + drum_note 3, 4 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 2 + drum_speed 6 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + sound_loop 0, .mainloop diff --git a/audio/music/route30.asm b/audio/music/route30.asm new file mode 100644 index 0000000..a8f947d --- /dev/null +++ b/audio/music/route30.asm @@ -0,0 +1,670 @@ +Music_Route30: + channel_count 4 + channel 1, Music_Route30_Ch1 + channel 2, Music_Route30_Ch2 + channel 3, Music_Route30_Ch3 + channel 4, Music_Route30_Ch4 + +Music_Route30_Ch1: + tempo 144 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 + vibrato 16, 1, 5 + stereo_panning TRUE, FALSE + note_type 12, 11, 2 + octave 3 + note D_, 6 + note D_, 1 + note D_, 1 + note D_, 2 + note D_, 2 + note D_, 4 + note D_, 6 + note D_, 1 + note D_, 1 + note D_, 2 + note D_, 2 + volume_envelope 4, -6 + note C_, 4 +.mainloop: + volume_envelope 11, 6 + note D_, 6 + volume_envelope 11, 4 + octave 2 + note B_, 2 + octave 3 + note F_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + volume_envelope 11, 6 + note F_, 6 + volume_envelope 11, 4 + note C_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note C_, 2 + note D_, 2 + note G_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note B_, 1 + octave 4 + note C_, 1 + octave 3 + note B_, 1 + octave 4 + note C_, 1 + volume_envelope 11, 7 + octave 3 + note B_, 12 + volume_envelope 11, 5 + note F_, 6 + note C_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note C_, 2 + octave 4 + note D_, 2 + note C_, 2 + octave 3 + note B_, 2 + note A_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note A_, 2 + note G_, 2 + note D_, 1 + note E_, 1 + note D_, 1 + note E_, 1 + volume_envelope 11, 6 + note D_, 4 + note G_, 4 + note D_, 4 + volume_envelope 11, 3 + octave 2 + note B_, 1 + octave 3 + note C_, 1 + octave 2 + note B_, 1 + octave 3 + note C_, 1 + volume_envelope 11, 6 + octave 2 + note B_, 4 + octave 3 + note D_, 4 + octave 2 + note B_, 4 + volume_envelope 11, 4 + octave 3 + note F_, 2 + note E_, 2 + note D_, 2 + note C_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + volume_envelope 11, 6 + note A_, 4 + note B_, 4 + octave 4 + note C_, 4 + note E_, 4 + note D_, 2 + octave 3 + note G_, 4 + note A_, 4 + note B_, 4 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + volume_envelope 11, 7 + note D_, 14 + volume_envelope 11, 6 + note F_, 2 + note E_, 2 + note D_, 2 + note C_, 2 + note A_, 2 + note G_, 2 + note F_, 2 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note B_, 2 + note A_, 2 + note B_, 2 + octave 4 + note C_, 2 + note E_, 2 + note F_, 2 + note A_, 2 + octave 3 + note G_, 2 + octave 4 + note C_, 2 + note D_, 2 + octave 3 + note G_, 2 + octave 4 + note C_, 2 + note D_, 2 + octave 3 + note G_, 2 + octave 4 + note D_, 2 + volume_envelope 11, 5 + octave 3 + note B_, 2 + octave 4 + note D_, 2 + octave 3 + note B_, 2 + octave 4 + note D_, 4 + octave 3 + note G_, 2 + note B_, 2 + octave 4 + note D_, 2 + sound_loop 0, .mainloop + +Music_Route30_Ch2: + duty_cycle 3 + vibrato 18, 3, 6 + stereo_panning FALSE, TRUE + note_type 12, 12, 2 + octave 3 + note G_, 6 + note G_, 1 + note G_, 1 + note G_, 2 + note G_, 2 + note G_, 4 + note G_, 6 + note G_, 1 + note G_, 1 + note G_, 2 + note G_, 2 + volume_envelope 12, 4 + note D_, 1 + note E_, 1 + note F_, 1 + note F#, 1 +.mainloop: + volume_envelope 12, 7 + note G_, 10 + octave 4 + note D_, 2 + octave 3 + note B_, 2 + note G_, 2 + octave 4 + note F_, 10 + note E_, 2 + note D_, 2 + note C_, 2 + note D_, 1 + note E_, 1 + note D_, 1 + note E_, 1 + volume_envelope 11, 0 + note D_, 4 + volume_envelope 11, 7 + note D_, 8 + volume_envelope 3, -7 + note D_, 8 + volume_envelope 11, 7 + note D_, 8 + volume_envelope 12, 7 + note C_, 10 + note C_, 2 + octave 3 + note A_, 2 + note F_, 2 + octave 4 + note F_, 10 + note E_, 2 + note D_, 2 + note C_, 2 + octave 3 + note B_, 6 + note G_, 2 + octave 4 + note D_, 8 + octave 3 + note G_, 6 + note D_, 2 + note B_, 8 + note C_, 2 + note A_, 4 + note B_, 4 + octave 4 + note C_, 4 + note D_, 2 + note F_, 8 + note A_, 8 + note G_, 2 + volume_envelope 11, 0 + note D_, 4 + volume_envelope 11, 7 + note D_, 10 + volume_envelope 12, 7 + note C_, 4 + octave 3 + note B_, 4 + note A_, 4 + note G_, 4 + note A_, 4 + note B_, 4 + octave 4 + note C_, 4 + note D_, 4 + note F_, 8 + octave 5 + note C_, 8 + octave 4 + note B_, 2 + volume_envelope 11, 0 + note G_, 6 + volume_envelope 11, 7 + note G_, 8 + volume_envelope 12, 7 + note B_, 2 + volume_envelope 11, 0 + note G_, 4 + volume_envelope 11, 7 + note G_, 8 + volume_envelope 10, 7 + octave 3 + note F#, 2 + sound_loop 0, .mainloop + +Music_Route30_Ch3: + note_type 12, 2, 7 + octave 2 + note G_, 1 + rest 5 + note G_, 1 + note G_, 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 3 + note G_, 1 + rest 5 + note G_, 1 + note G_, 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 +.mainloop: + note G_, 1 + rest 1 + note B_, 2 + rest 2 + note G_, 1 + note G_, 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note F_, 1 + rest 1 + octave 3 + note D_, 2 + note A_, 2 + octave 2 + note F_, 1 + note F_, 1 + note F_, 1 + rest 1 + octave 3 + note C_, 2 + octave 2 + note F_, 1 + rest 1 + note F#, 1 + rest 1 + note G_, 1 + rest 1 + note B_, 2 + octave 3 + note D_, 2 + octave 2 + note G_, 1 + note G_, 1 + note G_, 1 + rest 1 + octave 3 + note D_, 2 + octave 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + octave 3 + note E_, 2 + note D_, 2 + octave 2 + note G_, 1 + note G_, 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note F_, 1 + rest 1 + octave 3 + note C_, 2 + octave 2 + note A_, 2 + note F_, 1 + note F_, 1 + note F_, 1 + rest 1 + octave 3 + note C_, 2 + octave 2 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + octave 3 + note C_, 2 + note F_, 2 + octave 2 + note F_, 1 + note F_, 1 + note F_, 1 + rest 1 + octave 3 + note E_, 2 + octave 2 + note F_, 2 + note F#, 2 + note G_, 1 + rest 1 + note B_, 2 + octave 3 + note G_, 2 + octave 2 + note G_, 1 + note G_, 1 + note G_, 1 + rest 1 + note B_, 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + octave 4 + note D_, 2 + octave 3 + note B_, 2 + octave 2 + note G_, 1 + note G_, 1 + note G_, 1 + rest 1 + octave 3 + note G_, 2 + octave 2 + note G_, 2 + note G#, 2 + note A_, 1 + rest 1 + octave 3 + note C_, 2 + octave 2 + note B_, 2 + note A_, 1 + note A_, 1 + note A_, 1 + rest 1 + octave 3 + note D_, 2 + octave 2 + note A_, 1 + rest 1 + note B_, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + note F_, 2 + note E_, 2 + note C_, 1 + note C_, 1 + note C_, 1 + rest 1 + note A_, 2 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 2 + note B_, 1 + rest 1 + octave 3 + note E_, 2 + note D_, 2 + octave 2 + note B_, 1 + note B_, 1 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + note B_, 2 + note A_, 2 + note G_, 1 + note G_, 1 + note G_, 1 + rest 1 + note B_, 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note A_, 1 + rest 1 + octave 3 + note C_, 2 + octave 2 + note B_, 2 + note A_, 1 + note A_, 1 + note A_, 1 + rest 1 + octave 3 + note D_, 2 + octave 2 + note A_, 1 + rest 1 + note B_, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + note F_, 2 + note E_, 2 + note C_, 1 + note C_, 1 + note C_, 1 + rest 1 + note A_, 2 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note C_, 2 + note D_, 2 + octave 2 + note G_, 1 + note G_, 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + octave 3 + note E_, 2 + note D_, 2 + octave 2 + note G_, 1 + note G_, 1 + note G_, 1 + rest 1 + octave 3 + note D_, 2 + octave 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + sound_loop 0, .mainloop + +Music_Route30_Ch4: + toggle_noise 3 + drum_speed 12 + sound_call .sub1 + sound_call .sub2 +.mainloop: + sound_call .sub3 + sound_call .sub4 + sound_call .sub4 + sound_call .sub5 + sound_call .sub4 + sound_call .sub3 + sound_call .sub4 + sound_call .sub5 + sound_call .sub4 + sound_call .sub4 + sound_call .sub3 + sound_call .sub4 + sound_call .sub4 + sound_call .sub4 + sound_call .sub3 + sound_call .sub5 + sound_loop 0, .mainloop + +.sub1: + drum_note 3, 2 + drum_note 7, 2 + drum_note 7, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 4 + sound_ret + +.sub2: + drum_note 3, 2 + drum_note 7, 2 + drum_note 7, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + sound_ret + +.sub3: + drum_note 3, 2 + drum_note 7, 2 + drum_note 7, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + sound_ret + +.sub4: + drum_note 3, 2 + drum_note 7, 2 + drum_note 7, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 3, 2 + sound_ret + +.sub5: + drum_note 3, 2 + drum_note 7, 2 + drum_note 7, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 2 + drum_speed 6 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_speed 12 + sound_ret diff --git a/audio/music/route36.asm b/audio/music/route36.asm new file mode 100644 index 0000000..ca954ad --- /dev/null +++ b/audio/music/route36.asm @@ -0,0 +1,522 @@ +Music_Route36: + channel_count 4 + channel 1, Music_Route36_Ch1 + channel 2, Music_Route36_Ch2 + channel 3, Music_Route36_Ch3 + channel 4, Music_Route36_Ch4 + +Music_Route36_Ch1: + tempo 144 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 + vibrato 16, 1, 5 + stereo_panning FALSE, TRUE + note_type 12, 11, 3 + octave 3 + note C_, 4 + note C_, 6 + note F_, 1 + note E_, 1 + volume_envelope 11, 5 + note F_, 8 + volume_envelope 11, 3 + note F_, 6 + note A#, 1 + note A_, 1 + volume_envelope 5, -5 + note A#, 4 +.mainloop: + volume_envelope 11, 5 + note F_, 4 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note F_, 2 + note A_, 2 + note D#, 2 + note A#, 4 + note A_, 4 + note G_, 2 + note A#, 4 + note F_, 4 + note A_, 2 + note G_, 2 + note F_, 2 + note E_, 2 + note F_, 2 + note A_, 2 + note G_, 2 + note A#, 4 + note A_, 4 + octave 4 + note D#, 4 + octave 3 + note A#, 2 + volume_envelope 11, 6 + octave 4 + note F_, 10 + volume_envelope 11, 5 + note C_, 2 + note F_, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note D#, 4 + note D_, 4 + note C_, 2 + octave 3 + note A#, 4 + volume_envelope 11, 4 + note A_, 2 + octave 4 + note D_, 2 + octave 3 + note F#, 2 + note A_, 2 + octave 4 + note D_, 2 + octave 3 + note F#, 2 + note A_, 2 + octave 4 + note D_, 2 + volume_envelope 10, 4 + octave 3 + note A_, 2 + octave 4 + note D_, 2 + note F#, 2 + octave 3 + note A_, 2 + octave 4 + note D_, 2 + note F#, 2 + octave 3 + note A_, 2 + octave 4 + note D_, 2 + stereo_panning TRUE, FALSE + volume_envelope 9, 5 + octave 3 + note D_, 6 + octave 2 + note A_, 6 + octave 3 + note D_, 4 + octave 2 + note A_, 6 + octave 3 + note D_, 6 + note E_, 4 + volume_envelope 11, 5 + note D_, 6 + note A_, 6 + note G_, 4 + volume_envelope 10, 5 + octave 2 + note A_, 6 + octave 3 + note F#, 6 + note E_, 4 + note D_, 6 + octave 2 + note A_, 6 + octave 3 + note D_, 4 + volume_envelope 11, 5 + note F#, 6 + note E_, 6 + note C#, 4 + note D_, 6 + note A_, 6 + note G_, 4 + octave 2 + note A_, 6 + octave 3 + note F#, 6 + note D_, 4 + note C_, 6 + note G_, 6 + note C_, 2 + note E_, 2 + volume_envelope 11, 7 + note C_, 6 + note G_, 4 + note D_, 2 + note E_, 2 + note G_, 2 + note A_, 2 + note G#, 2 + note A_, 2 + octave 4 + note D_, 6 + note C_, 2 + octave 3 + note B_, 2 + note A_, 6 + note D_, 6 + stereo_panning FALSE, TRUE + volume_envelope 11, 5 + note D#, 2 + note E_, 2 + sound_loop 0, .mainloop + +Music_Route36_Ch2: + duty_cycle 3 + vibrato 16, 3, 6 + stereo_panning TRUE, FALSE + note_type 12, 12, 2 + octave 3 + note F_, 2 + note C_, 1 + note F_, 1 + volume_envelope 12, 7 + note A_, 8 + note C_, 4 + volume_envelope 12, 3 + octave 4 + note C_, 2 + octave 3 + note A_, 1 + octave 4 + note C_, 1 + volume_envelope 12, 7 + note F_, 8 + octave 3 + note G_, 4 +.mainloop: + volume_envelope 12, 7 + octave 4 + note C_, 10 + volume_envelope 12, 4 + octave 3 + note A_, 2 + octave 4 + note C_, 2 + note A_, 2 + note G_, 3 + volume_envelope 12, 2 + note D#, 1 + volume_envelope 12, 7 + note D#, 12 + note C_, 10 + volume_envelope 12, 4 + octave 3 + note A_, 2 + octave 4 + note C_, 2 + note F_, 2 + volume_envelope 12, 2 + note D#, 2 + note D#, 1 + note F_, 1 + volume_envelope 12, 7 + note G_, 12 + note A_, 10 + volume_envelope 12, 4 + note F_, 2 + note A_, 2 + octave 5 + note C_, 2 + octave 4 + note A#, 3 + note A_, 1 + volume_envelope 12, 7 + note G_, 8 + note A#, 4 + volume_envelope 11, 0 + note A_, 16 + volume_envelope 11, 7 + note A_, 16 + stereo_panning FALSE, TRUE + volume_envelope 10, 4 + octave 3 + note A_, 6 + note G_, 6 + note F#, 4 + note E_, 6 + note F#, 6 + note G_, 4 + volume_envelope 11, 3 + note A_, 2 + note F#, 1 + note A_, 1 + volume_envelope 11, 7 + octave 4 + note D_, 12 + volume_envelope 10, 4 + octave 3 + note F#, 2 + note D_, 1 + note F#, 1 + volume_envelope 10, 7 + note A_, 12 + volume_envelope 12, 7 + note A_, 6 + note G_, 6 + note F#, 4 + note B_, 6 + note A_, 6 + note G_, 4 + volume_envelope 12, 3 + note A_, 2 + note F#, 1 + note A_, 1 + volume_envelope 12, 7 + octave 4 + note D_, 12 + volume_envelope 12, 3 + octave 3 + note F#, 2 + note D_, 1 + note F#, 1 + volume_envelope 12, 7 + note A_, 12 + volume_envelope 12, 2 + note G_, 2 + note E_, 1 + note G_, 1 + volume_envelope 11, 0 + octave 4 + note C_, 2 + volume_envelope 11, 7 + note C_, 10 + volume_envelope 12, 5 + octave 3 + note G_, 2 + note E_, 1 + note G_, 1 + volume_envelope 12, 7 + octave 4 + note C_, 8 + note C#, 4 + stereo_panning TRUE, TRUE + note D_, 6 + note A_, 6 + note G_, 2 + note F#, 2 + volume_envelope 11, 0 + note D_, 4 + volume_envelope 11, 7 + note D_, 8 + stereo_panning TRUE, FALSE + volume_envelope 12, 4 + octave 3 + note F#, 1 + note G_, 1 + note A_, 1 + note B_, 1 + sound_loop 0, .mainloop + +Music_Route36_Ch3: + note_type 12, 2, 5 + octave 3 + note F_, 1 + rest 3 + note F_, 1 + rest 1 + octave 4 + note C_, 4 + octave 3 + note C_, 2 + note F_, 2 + note C_, 2 + note D#, 1 + rest 3 + note D#, 1 + rest 1 + octave 4 + note F_, 4 + octave 2 + note A#, 2 + octave 3 + note D#, 2 + note E_, 2 +.mainloop: + note F_, 4 + note C_, 2 + note F_, 4 + note C_, 2 + note F_, 2 + note C_, 2 + note G_, 4 + note D#, 2 + note G_, 4 + note D#, 2 + note G_, 2 + note D#, 2 + note F_, 4 + note C_, 2 + note F_, 4 + note C_, 2 + note F_, 2 + note C_, 2 + note G_, 4 + note D#, 2 + note G_, 4 + note D#, 2 + note G_, 2 + note D#, 2 + note A_, 4 + note F_, 2 + note A_, 4 + note F_, 2 + note A_, 2 + note F_, 2 + note A#, 4 + note G_, 2 + note A#, 4 + note G_, 2 + note A#, 2 + note G_, 2 + note F#, 4 + note D_, 2 + note F#, 4 + note D_, 2 + note F#, 2 + note D_, 2 + note D_, 4 + octave 2 + note A_, 2 + octave 3 + note D_, 4 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note F#, 4 + note D_, 2 + note F#, 4 + note D_, 2 + note F#, 2 + note D_, 2 + note G_, 4 + note E_, 2 + note G_, 4 + note E_, 2 + note G_, 2 + note E_, 2 + note F#, 4 + note D_, 2 + note F#, 4 + note D_, 2 + note F#, 2 + note D_, 2 + note F#, 4 + note D_, 2 + note F#, 4 + note D_, 2 + note E_, 2 + note A_, 2 + note F#, 4 + note D_, 2 + note F#, 4 + note D_, 2 + note F#, 2 + note D_, 2 + note G_, 4 + note E_, 2 + note G_, 4 + note E_, 2 + note G_, 2 + note E_, 2 + note F#, 4 + note D_, 2 + note F#, 4 + note D_, 2 + note F#, 2 + note D_, 2 + note F#, 4 + note D_, 2 + note F#, 4 + note D_, 2 + note F#, 2 + note D_, 2 + note G_, 4 + note C_, 2 + note G_, 4 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 4 + note C_, 2 + note G_, 4 + note C_, 2 + note E_, 2 + note G_, 2 + note A_, 6 + octave 4 + note F#, 4 + octave 3 + note D_, 2 + note A_, 2 + octave 4 + note D_, 2 + note C_, 3 + note E_, 1 + note F#, 6 + octave 3 + note D_, 2 + note D#, 2 + note E_, 2 + sound_loop 0, .mainloop + +Music_Route36_Ch4: + toggle_noise 1 + drum_speed 12 + sound_call .sub1 + sound_call .sub3 +.mainloop: +.loop1: + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub3 + sound_loop 2, .loop1 +.loop2: + drum_note 11, 4 + drum_note 10, 2 + drum_note 6, 4 + drum_note 12, 1 + drum_note 12, 1 + drum_note 10, 4 + sound_loop 11, .loop2 + sound_call .sub3 + sound_loop 0, .mainloop + +.sub1: + drum_note 10, 4 + drum_note 10, 6 + drum_note 11, 1 + drum_note 11, 1 + drum_note 10, 2 + drum_note 11, 2 + sound_ret + +.sub2: + drum_note 10, 4 + drum_note 10, 6 + drum_note 12, 1 + drum_note 11, 1 + drum_note 10, 4 + sound_ret + +.sub3: + drum_note 10, 4 + drum_note 10, 6 + drum_note 11, 1 + drum_note 11, 1 + drum_note 10, 2 + drum_speed 6 + drum_note 11, 1 + drum_note 11, 1 + drum_note 10, 1 + drum_note 10, 1 + drum_speed 12 + sound_ret diff --git a/audio/music/route37.asm b/audio/music/route37.asm new file mode 100644 index 0000000..ec7f900 --- /dev/null +++ b/audio/music/route37.asm @@ -0,0 +1,428 @@ +Music_Route37: + channel_count 4 + channel 1, Music_Route37_Ch1 + channel 2, Music_Route37_Ch2 + channel 3, Music_Route37_Ch3 + channel 4, Music_Route37_Ch4 + +Music_Route37_Ch1: + tempo 144 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 16, 2, 2 + note_type 12, 11, 3 + rest 16 + rest 16 +.mainloop: + volume_envelope 11, 3 + rest 2 + octave 2 + note F#, 2 + note B_, 2 + octave 3 + note E_, 2 + volume_envelope 11, 7 + note D#, 10 + volume_envelope 11, 3 + note E_, 4 + note D#, 4 + note C#, 4 + octave 2 + note B_, 2 + octave 3 + note D#, 3 + octave 2 + note B_, 1 + volume_envelope 11, 7 + note F#, 8 + note B_, 8 + octave 3 + note B_, 12 + volume_envelope 11, 3 + rest 2 + octave 2 + note F#, 2 + note B_, 2 + octave 3 + note E_, 2 + volume_envelope 11, 7 + note D#, 10 + octave 2 + note A_, 4 + octave 3 + note C#, 4 + note E_, 4 + note A_, 2 + note F#, 3 + note A_, 1 + note B_, 6 + octave 2 + note B_, 2 + octave 3 + note D#, 2 + note F#, 2 + note B_, 2 + note A_, 4 + note F#, 4 + note E_, 2 + note D#, 4 + stereo_panning FALSE, TRUE +.loop1: + sound_call .sub1 + octave 3 + note C#, 4 + sound_loop 2, .loop1 + sound_call .sub2 + octave 3 + note F#, 4 + sound_call .sub2 + octave 3 + note F#, 4 + sound_call .sub1 + octave 3 + note E_, 4 + sound_call .sub1 + octave 3 + note G#, 4 + sound_call .sub2 + octave 4 + note D#, 4 + sound_call .sub2 + octave 3 + note F_, 4 + stereo_panning TRUE, TRUE + sound_call .sub2 + rest 4 + sound_call .sub2 + rest 4 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 12, 2 + octave 2 + note A_, 2 + note A_, 1 + note A_, 1 + note A_, 2 + note A_, 1 + note A_, 1 + note A_, 1 + note A_, 1 + note A_, 2 + volume_envelope 11, 7 + sound_ret + +.sub2: + volume_envelope 12, 2 + octave 2 + note B_, 2 + note B_, 1 + note B_, 1 + note B_, 2 + note B_, 1 + note B_, 1 + note B_, 1 + note B_, 1 + note B_, 2 + volume_envelope 11, 7 + sound_ret + +Music_Route37_Ch2: + duty_cycle 3 + vibrato 28, 1, 2 + note_type 12, 12, 2 + octave 2 + note B_, 2 + note_type 12, 12, 1 + note B_, 1 + note B_, 1 + volume_envelope 12, 2 + note B_, 2 + volume_envelope 12, 1 + note B_, 1 + note B_, 1 + note B_, 1 + note B_, 1 + volume_envelope 12, 2 + note B_, 6 + note B_, 2 + volume_envelope 12, 1 + note B_, 1 + note B_, 1 + volume_envelope 12, 2 + note B_, 2 + volume_envelope 12, 1 + note B_, 1 + note B_, 1 + note B_, 1 + note B_, 1 + volume_envelope 12, 2 + note B_, 2 +.mainloop: + sound_call .sub1 + volume_envelope 12, 6 + octave 4 + note C#, 4 + octave 3 + note B_, 4 + note A_, 4 + note E_, 4 + volume_envelope 11, 0 + note F#, 8 + volume_envelope 11, 7 + note F#, 8 + volume_envelope 12, 7 + note D#, 12 + sound_call .sub1 + volume_envelope 12, 7 + octave 4 + note C#, 4 + octave 3 + note B_, 4 + octave 4 + note C#, 4 + note E_, 4 + volume_envelope 11, 0 + note D#, 16 + volume_envelope 11, 0 + note D#, 8 + volume_envelope 11, 7 + note D#, 8 + volume_envelope 12, 4 + rest 4 + octave 3 + note A_, 3 + octave 4 + note E_, 1 + note A_, 4 + note G#, 4 + volume_envelope 10, 0 + note C#, 6 + note D#, 6 + note E_, 4 + volume_envelope 12, 3 + note F#, 3 + note E_, 1 + volume_envelope 11, 0 + note D#, 6 + volume_envelope 11, 7 + note D#, 6 + volume_envelope 12, 3 + octave 3 + note B_, 3 + note F#, 1 + volume_envelope 11, 0 + octave 4 + note D#, 6 + volume_envelope 11, 7 + octave 4 + note D#, 6 + volume_envelope 12, 4 + rest 4 + octave 3 + note A_, 3 + octave 4 + note E_, 1 + note A_, 4 + note G#, 4 + volume_envelope 11, 0 + note C#, 6 + note D#, 6 + note E_, 4 + volume_envelope 12, 3 + note F#, 3 + note D#, 1 + volume_envelope 11, 0 + note B_, 6 + volume_envelope 11, 7 + note B_, 6 + volume_envelope 12, 3 + note B_, 3 + note F#, 1 + volume_envelope 11, 0 + octave 5 + note D#, 6 + volume_envelope 11, 7 + octave 5 + note D#, 6 + volume_envelope 12, 2 + octave 3 + note F#, 2 + note F#, 1 + note F#, 1 + note F#, 2 + volume_envelope 12, 1 + note F#, 1 + note F#, 1 + note F#, 1 + note F#, 1 + volume_envelope 12, 2 + note F#, 6 + note F#, 2 + note F#, 1 + note F#, 1 + note F#, 2 + volume_envelope 12, 1 + note F#, 1 + note F#, 1 + note F#, 1 + note F#, 1 + volume_envelope 12, 2 + note F#, 2 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 12, 7 + octave 3 + note F#, 4 + volume_envelope 11, 0 + note B_, 5 + volume_envelope 11, 7 + note B_, 5 + volume_envelope 12, 3 + note F#, 2 + note F#, 2 + note B_, 2 + sound_ret + +Music_Route37_Ch3: + stereo_panning TRUE, FALSE + note_type 12, 1, 4 +.loop1: + octave 2 + note F#, 2 + rest 6 + sound_loop 4, .loop1 +.mainloop: + sound_call .sub1 + note A_, 2 + octave 3 + note C#, 2 + octave 2 + note G#, 2 + note B_, 2 + note F#, 2 + note A_, 2 + note F#, 2 + note E_, 2 +.loop2: + note D#, 2 + note F#, 2 + sound_loop 4, .loop2 + sound_call .sub1 + sound_call .sub1 + note A_, 2 + octave 3 + note C#, 2 + octave 2 + note G#, 2 + note B_, 2 + note F#, 2 + note A_, 2 + octave 3 + note C#, 2 + octave 2 + note A_, 2 + sound_call .sub1 +.loop3: + octave 2 + note B_, 2 + octave 3 + note D#, 2 + sound_loop 4, .loop3 +.loop4: + octave 2 + note A_, 2 + octave 3 + note C#, 2 + sound_loop 7, .loop4 + note E_, 2 + note C#, 2 + sound_call .sub2 +.loop5: + octave 2 + note B_, 2 + octave 3 + note F#, 2 + sound_loop 4, .loop5 +.loop6: + octave 2 + note A_, 2 + octave 3 + note C#, 2 + sound_loop 7, .loop6 + note E_, 2 + note C#, 2 + sound_call .sub2 + sound_call .sub1 +.loop7: + note F#, 2 + rest 6 + sound_loop 4, .loop7 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note F#, 2 + note B_, 2 + note F#, 2 + note B_, 2 + note F#, 2 + note B_, 2 + note F#, 2 + note B_, 2 + sound_ret + +.sub2: + octave 2 + note B_, 2 + octave 3 + note D#, 2 + octave 2 + note B_, 2 + octave 3 + note D#, 2 + octave 2 + note B_, 2 + octave 3 + note D#, 2 + octave 2 + note B_, 2 + octave 3 + note D#, 2 + sound_ret + +Music_Route37_Ch4: + stereo_panning FALSE, TRUE + toggle_noise 0 +.mainloop: + drum_speed 12 + sound_call .sub1 + drum_note 3, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 1 + sound_call .sub1 + drum_speed 6 + drum_note 4, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 1 + sound_loop 0, .mainloop + +.sub1: + drum_note 3, 2 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 2 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 2 + drum_note 4, 1 + drum_note 4, 1 + sound_ret diff --git a/audio/music/ruinsofalphinterior.asm b/audio/music/ruinsofalphinterior.asm new file mode 100644 index 0000000..7799b2c --- /dev/null +++ b/audio/music/ruinsofalphinterior.asm @@ -0,0 +1,47 @@ +Music_RuinsOfAlphInterior: + channel_count 3 + channel 1, Music_RuinsOfAlphInterior_Ch1 + channel 2, Music_RuinsOfAlphInterior_Ch2 + channel 3, Music_RuinsOfAlphInterior_Ch3 + +Music_RuinsOfAlphInterior_Ch1: + tempo 224 + volume 7, 7 + duty_cycle 0 + stereo_panning TRUE, FALSE + note_type 12, 4, 4 + rest 1 + sound_loop 0, Music_RuinsOfAlphInterior_Ch2.mainloop + +Music_RuinsOfAlphInterior_Ch2: + pitch_offset 2 + duty_cycle 0 + stereo_panning FALSE, TRUE + note_type 12, 10, 4 +.mainloop: + octave 4 + note C_, 4 + octave 3 + note A#, 4 + octave 4 + note C#, 2 + note D#, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 4 + octave 3 + note A#, 4 + sound_loop 0, .mainloop + +Music_RuinsOfAlphInterior_Ch3: + note_type 12, 1, 0 +.mainloop: + octave 2 + note G#, 2 + octave 3 + note C#, 2 + note E_, 2 + rest 10 + sound_loop 0, .mainloop diff --git a/audio/music/ruinsofalphradio.asm b/audio/music/ruinsofalphradio.asm new file mode 100644 index 0000000..3cf7c77 --- /dev/null +++ b/audio/music/ruinsofalphradio.asm @@ -0,0 +1,74 @@ +Music_RuinsOfAlphRadio: + channel_count 3 + channel 1, Music_RuinsOfAlphRadio_Ch1 + channel 2, Music_RuinsOfAlphRadio_Ch2 + channel 3, Music_RuinsOfAlphRadio_Ch3 + +Music_RuinsOfAlphRadio_Ch1: + tempo 160 + volume 7, 7 + duty_cycle 0 + pitch_offset 280 + vibrato 0, 15, 0 + stereo_panning TRUE, FALSE +.mainloop: + note_type 6, 7, 1 + sound_call .sub1 + note_type 12, 10, 1 + rest 16 + rest 16 + sound_call .sub2 + note_type 12, 10, 1 + rest 16 + rest 16 + sound_call .sub1 + note_type 12, 10, 1 + rest 16 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note G_, 1 + note F#, 1 + note G_, 1 + note F#, 1 + note C_, 8 + sound_ret + +.sub2: + octave 4 + note G_, 1 + note F#, 1 + note G_, 1 + note F#, 1 + note C_, 4 + note G_, 1 + octave 5 + note C_, 8 + sound_ret + +Music_RuinsOfAlphRadio_Ch2: + duty_cycle 1 + vibrato 1, 14, 0 +.mainloop: + stereo_panning FALSE, TRUE + note_type 6, 8, 1 + sound_call Music_RuinsOfAlphRadio_Ch1.sub1 + note_type 12, 10, 1 + rest 16 + rest 16 + note_type 6, 8, 1 + sound_call Music_RuinsOfAlphRadio_Ch1.sub2 + note_type 12, 10, 1 + rest 16 + sound_loop 0, .mainloop + +Music_RuinsOfAlphRadio_Ch3: + note_type 6, 2, 6 +.mainloop: + octave 2 + note C_, 1 + note C#, 1 + note C_, 1 + rest 16 + sound_loop 0, .mainloop diff --git a/audio/music/showmearound.asm b/audio/music/showmearound.asm new file mode 100644 index 0000000..8bf3520 --- /dev/null +++ b/audio/music/showmearound.asm @@ -0,0 +1,350 @@ +Music_ShowMeAround: + channel_count 4 + channel 1, Music_ShowMeAround_Ch1 + channel 2, Music_ShowMeAround_Ch2 + channel 3, Music_ShowMeAround_Ch3 + channel 4, Music_ShowMeAround_Ch4 + +Music_ShowMeAround_Ch1: + tempo 144 + volume 7, 7 + stereo_panning FALSE, TRUE + duty_cycle 2 + note_type 12, 11, 1 + octave 4 + note B_, 2 + note A_, 2 + note G#, 2 + note A_, 2 + note G#, 2 + note F#, 2 + note E_, 2 + note D_, 2 + octave 3 + note B_, 4 + note G#, 1 + note B_, 1 + octave 4 + note D_, 1 + note E_, 1 + note G#, 8 +.mainloop: + rest 16 + rest 16 + rest 16 + rest 16 + sound_call Music_ShowMeAround_Ch2.sub3 + sound_call .sub1 + sound_call Music_ShowMeAround_Ch2.sub3 + sound_call .sub1 + sound_loop 0, .mainloop + +.sub1: + rest 4 + octave 3 + note C#, 1 + rest 5 + note D_, 4 + note C_, 1 + rest 1 + rest 4 + octave 2 + note E_, 1 + rest 1 + note G#, 1 + rest 1 + octave 4 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note E_, 1 + rest 3 + sound_ret + +Music_ShowMeAround_Ch2: + stereo_panning TRUE, TRUE + duty_cycle 2 + note_type 12, 11, 1 + octave 5 + note E_, 2 + note D_, 2 + note C#, 2 + note D_, 2 + note C#, 2 + octave 4 + note B_, 2 + note A_, 2 + note G#, 2 + note E_, 4 + note E_, 1 + note G#, 1 + note B_, 1 + octave 5 + note D_, 1 + note E_, 8 + duty_cycle 1 +.mainloop: + sound_call .sub3 + sound_call .sub3 + sound_call .sub1 + note A_, 4 + octave 3 + note A_, 2 + octave 4 + note C#, 2 + note E_, 4 + note D_, 2 + note C#, 2 + octave 3 + note B_, 4 + sound_call .sub1 + note A_, 2 + note A_, 2 + note G#, 2 + note E_, 2 + note F#, 2 + note G#, 2 + note A_, 2 + note A_, 2 + note A_, 4 + sound_call .sub2 + note A_, 4 + octave 5 + note C#, 2 + octave 4 + note A_, 2 + note A_, 4 + note G#, 1 + note G_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + rest 1 + note D#, 1 + note E_, 1 + sound_call .sub2 + note A_, 2 + octave 5 + note E_, 2 + note D_, 2 + octave 4 + note B_, 2 + note A_, 2 + note G#, 2 + note A_, 2 + note A_, 2 + note A_, 4 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note A_, 2 + octave 4 + note C#, 2 + note E_, 4 + note D_, 2 + note F#, 2 + sound_ret + +.sub2: + octave 5 + note C#, 2 + octave 4 + note A_, 2 + note A_, 4 + octave 5 + note F#, 2 + octave 4 + note A_, 2 + sound_ret + +.sub3: + rest 4 + octave 3 + note C#, 1 + rest 5 + note D_, 4 + note C_, 1 + rest 1 + rest 2 + note C#, 1 + rest 5 + octave 2 + note E_, 1 + rest 3 + note A#, 2 + note B_, 1 + rest 1 + sound_ret + +Music_ShowMeAround_Ch3: + stereo_panning TRUE, FALSE + vibrato 16, 2, 2 + note_type 6, 2, 5 + octave 2 + note B_, 1 + rest 3 + octave 3 + note D_, 1 + rest 3 + note E_, 1 + rest 3 + note G#, 1 + rest 3 + note B_, 1 + rest 3 + octave 4 + note D_, 1 + rest 3 + note E_, 1 + rest 3 + note G#, 1 + rest 3 + note D_, 2 + rest 6 + note D_, 2 + octave 3 + note B_, 2 + note G#, 2 + note B_, 2 + note E_, 2 + rest 6 + volume_envelope 1, 4 + octave 2 + note B_, 1 + note A#, 1 + note A_, 1 + note G#, 1 + note G_, 1 + note F_, 1 + note E_, 2 + volume_envelope 1, 4 +.mainloop: + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub2 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note A_, 2 + rest 6 + octave 4 + note E_, 2 + rest 2 + octave 2 + note A_, 2 + rest 2 + octave 3 + note D_, 2 + rest 2 + octave 4 + note F#, 8 + note D#, 2 + rest 2 + octave 2 + note A_, 2 + rest 2 + octave 4 + note E_, 2 + rest 6 + octave 2 + note A_, 2 + rest 2 + octave 4 + note D_, 2 + rest 6 + note C#, 4 + note D_, 2 + rest 2 + sound_ret + +.sub2: + octave 2 + note A_, 2 + rest 6 + octave 4 + note E_, 2 + rest 2 + octave 2 + note A_, 2 + rest 2 + octave 3 + note D_, 2 + rest 2 + octave 4 + note F#, 8 + note D#, 2 + rest 2 + octave 2 + note G#, 2 + rest 6 + octave 4 + note D_, 2 + rest 2 + octave 3 + note B_, 2 + rest 2 + note C#, 2 + rest 2 + note E_, 2 + rest 2 + octave 2 + note A_, 2 + rest 6 + sound_ret + +Music_ShowMeAround_Ch4: + toggle_noise 3 + drum_speed 12 + rest 16 + rest 8 + drum_note 3, 2 + drum_note 4, 2 + drum_note 7, 4 +.mainloop: + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub2 + sound_loop 0, .mainloop + +.sub1: + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 7, 4 + drum_note 3, 2 + drum_note 4, 2 + drum_note 7, 4 + drum_note 3, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 3, 2 + drum_note 4, 2 + sound_ret + +.sub2: + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 8, 2 + drum_note 8, 2 + drum_note 7, 4 + drum_note 3, 2 + drum_note 4, 2 + drum_note 7, 4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 7, 2 + sound_ret diff --git a/audio/music/sprouttower.asm b/audio/music/sprouttower.asm new file mode 100644 index 0000000..c77e442 --- /dev/null +++ b/audio/music/sprouttower.asm @@ -0,0 +1,243 @@ +Music_SproutTower: + channel_count 4 + channel 1, Music_SproutTower_Ch1 + channel 2, Music_SproutTower_Ch2 + channel 3, Music_SproutTower_Ch3 + channel 4, Music_SproutTower_Ch4 + +Music_SproutTower_Ch1: + tempo 176 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 8, 4, 5 + stereo_panning FALSE, TRUE + note_type 12, 10, 3 + rest 16 + rest 16 +.mainloop: + rest 6 + octave 3 + note F_, 2 + note F#, 4 + note F#, 4 + note F_, 4 + note C_, 4 + note C#, 4 + note D#, 4 + note D#, 4 + note D#, 4 + note F#, 4 + note F#, 4 + note F_, 2 + note F#, 2 + note G#, 2 + note F#, 2 + note F_, 4 + note F#, 2 + note D#, 10 + note F#, 2 + note F_, 2 + note D#, 2 + note C#, 2 + volume_envelope 10, 5 + note C_, 8 + volume_envelope 10, 3 + note C#, 2 + note C_, 2 + octave 2 + note A#, 2 + octave 3 + note C#, 2 + volume_envelope 10, 7 + note C_, 16 + volume_envelope 10, 3 + note F_, 4 + note F_, 4 + note F#, 4 + note F#, 4 + note F_, 4 + note F_, 4 + note D#, 4 + note D#, 4 + sound_loop 0, .mainloop + +Music_SproutTower_Ch2: + duty_cycle 3 + pitch_offset 1 + vibrato 8, 4, 8 + note_type 12, 11, 2 + octave 3 + note F_, 4 + note F_, 4 + note F#, 4 + note F#, 4 + note F_, 4 + note F_, 4 + note D#, 4 + note D#, 4 +.mainloop: + volume_envelope 11, 5 + octave 4 + note C_, 4 + octave 3 + note A#, 4 + octave 4 + note C#, 4 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note F#, 4 + volume_envelope 11, 7 + note F_, 8 + volume_envelope 11, 5 + note F#, 4 + note A#, 4 + octave 4 + note C_, 2 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + note C#, 2 + note D#, 2 + note C#, 2 + note C_, 8 + volume_envelope 11, 5 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + note F#, 2 + volume_envelope 11, 7 + note A#, 8 + volume_envelope 11, 5 + octave 4 + note C_, 2 + octave 3 + note A#, 2 + note F#, 2 + note D#, 2 + volume_envelope 11, 7 + note F_, 8 + volume_envelope 11, 3 + note F_, 4 + note F_, 4 + note F#, 4 + note A#, 2 + note F_, 1 + note A#, 1 + volume_envelope 11, 7 + octave 4 + note C_, 16 + rest 16 + sound_loop 0, .mainloop + +Music_SproutTower_Ch3: + vibrato 20, 14, 8 + note_type 12, 1, 4 + octave 3 + note F_, 2 + rest 2 + note C_, 2 + note F_, 2 + note F#, 2 + note D#, 2 + rest 2 + note F#, 2 + note F_, 2 + rest 2 + note C_, 2 + note F_, 2 + note F#, 2 + note D#, 2 + rest 2 + note F#, 2 + stereo_panning TRUE, FALSE +.mainloop: + rest 4 + note C_, 2 + note F_, 2 + note F#, 2 + note D#, 2 + rest 2 + note F#, 2 + note F_, 2 + rest 2 + note C_, 2 + note F_, 2 + note F#, 2 + note D#, 2 + rest 2 + note F_, 2 + note D#, 2 + rest 2 + octave 2 + note A#, 2 + octave 3 + note D#, 2 + note F#, 2 + note D#, 2 + rest 2 + note F#, 2 + note F_, 2 + rest 2 + note C_, 2 + note F_, 2 + note F#, 2 + note D#, 2 + rest 2 + note F#, 2 + note F_, 8 + note F#, 4 + note A#, 4 + note D#, 8 + note F_, 4 + note F#, 4 + note F_, 16 + note F_, 2 + rest 2 + note C_, 2 + note F_, 2 + note F#, 2 + note D#, 2 + rest 2 + note F_, 2 + note F_, 2 + rest 2 + note C_, 2 + note F_, 2 + note F#, 2 + note D#, 2 + rest 2 + note F_, 2 + sound_loop 0, .mainloop + +Music_SproutTower_Ch4: + toggle_noise 0 + drum_speed 12 + rest 4 +.mainloop: + drum_note 7, 4 + stereo_panning TRUE, FALSE + drum_note 4, 4 + drum_note 7, 2 + stereo_panning FALSE, TRUE + drum_note 4, 2 + stereo_panning TRUE, TRUE + drum_note 7, 4 + drum_note 7, 4 + stereo_panning FALSE, TRUE + drum_note 4, 4 + drum_note 7, 2 + stereo_panning TRUE, FALSE + drum_note 4, 2 + stereo_panning TRUE, TRUE + drum_note 7, 4 + sound_loop 0, .mainloop diff --git a/audio/music/ssaqua.asm b/audio/music/ssaqua.asm new file mode 100644 index 0000000..8d00d46 --- /dev/null +++ b/audio/music/ssaqua.asm @@ -0,0 +1,1173 @@ +Music_SSAqua: + channel_count 4 + channel 1, Music_SSAqua_Ch1 + channel 2, Music_SSAqua_Ch2 + channel 3, Music_SSAqua_Ch3 + channel 4, Music_SSAqua_Ch4 + +Music_SSAqua_Ch1: + tempo 117 + volume 7, 7 + stereo_panning FALSE, TRUE + pitch_offset 1 + vibrato 18, 3, 3 + duty_cycle 2 + note_type 6, 9, 7 + octave 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 +.mainloop: + octave 2 + note G_, 16 + rest 8 + note G_, 2 + rest 2 + note_type 12, 9, 7 + note G_, 2 + note G_, 10 + rest 4 + note_type 6, 9, 7 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 16 + rest 8 + note G_, 2 + rest 2 + note_type 12, 9, 7 + note G_, 2 + note G_, 8 + rest 8 + duty_cycle 1 + volume_envelope 6, 1 + sound_call Music_SSAqua_Ch2.sub4 + octave 5 + note G_, 1 + octave 4 + note B_, 1 + note A_, 1 + note G_, 1 + octave 5 + note G_, 1 + octave 4 + note B_, 1 + note A_, 1 + note G_, 1 + octave 5 + note G_, 1 + octave 4 + note B_, 1 + note A_, 1 + note G_, 1 + octave 5 + note G_, 1 + octave 4 + note B_, 1 + note A_, 1 + note G_, 1 + sound_call Music_SSAqua_Ch2.sub4 + sound_call Music_SSAqua_Ch2.sub5 + rest 16 + rest 16 + rest 16 + volume_envelope 9, 7 + rest 14 + note_type 6, 9, 7 + note D_, 1 + rest 1 + octave 3 + note A#, 1 + rest 1 + note_type 12, 9, 7 + rest 16 + rest 16 + volume_envelope 9, 5 + rest 2 + octave 4 + note C_, 1 + note E_, 1 + note G_, 1 + rest 1 + note E_, 1 + note C_, 1 + octave 3 + note E_, 1 + note C_, 1 + note E_, 1 + note G_, 1 + octave 4 + note C_, 1 + note E_, 1 + note G_, 1 + octave 5 + note C_, 1 + octave 4 + note E_, 6 + note D_, 2 + note C_, 1 + note D_, 1 + note F#, 1 + note A_, 1 + octave 5 + note C_, 1 + note D_, 1 + octave 4 + note G_, 1 + note F#, 1 + duty_cycle 2 + volume_envelope 9, 7 + note G_, 8 + note F#, 8 + note E_, 8 + note D_, 8 + octave 3 + note B_, 8 + note A#, 2 + rest 2 + note B_, 1 + rest 1 + octave 4 + note F#, 2 + volume_envelope 7, 5 + octave 5 + note A_, 4 + note F#, 4 + note D_, 4 + octave 4 + note A#, 2 + note_type 6, 9, 7 + note D_, 1 + rest 1 + octave 3 + note A#, 1 + rest 1 + volume_envelope 9, 7 + note G_, 16 + note A_, 16 + note B_, 4 + rest 4 + note B_, 4 + rest 4 + octave 4 + note E_, 8 + note G_, 8 + note F#, 1 + vibrato 0, 0, 0 + volume_envelope 8, 8 + note G_, 10 + vibrato 2, 2, 3 + volume_envelope 8, 7 + note G_, 9 + vibrato 8, 3, 3 + note C_, 4 + note E_, 4 + note C_, 4 + note D_, 12 + note F#, 12 + rest 8 + octave 2 + note B_, 2 + octave 3 + note D_, 2 + note F#, 2 + note A_, 2 + note D_, 2 + note F#, 2 + note A_, 2 + octave 4 + note D_, 2 + note F#, 2 + note_type 12, 9, 7 + rest 7 + rest 16 + rest 16 + note G_, 8 + note F#, 1 + note D_, 1 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + octave 3 + note A_, 1 + note F#, 1 + note D_, 1 + octave 2 + note A_, 1 + note B_, 1 + octave 3 + note D_, 1 + note F#, 1 + note A_, 1 + note D_, 1 + note F#, 1 + note A_, 1 + octave 4 + note D_, 1 + note F#, 1 + rest 7 + rest 16 + rest 2 + note E_, 2 + note G_, 1 + rest 1 + note E_, 1 + note_type 6, 9, 7 + rest 1 + note C_, 1 + note C#, 4 + octave 3 + note B_, 2 + rest 2 + note A_, 3 + rest 1 + note G_, 2 + rest 2 + note F#, 2 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note A_, 2 + note F#, 2 + note D_, 2 + note A_, 2 + octave 4 + note D_, 2 + octave 3 + note A_, 2 + note F#, 2 + note A_, 2 + octave 4 + note C_, 2 + note D_, 2 + note F#, 2 + note A_, 2 + sound_loop 0, .mainloop + +Music_SSAqua_Ch2: + stereo_panning TRUE, FALSE + duty_cycle 2 + vibrato 8, 3, 3 + note_type 12, 11, 7 + rest 2 +.mainloop: + note_type 12, 11, 7 + duty_cycle 1 + volume_envelope 6, 1 + sound_call .sub4 + sound_call .sub5 + duty_cycle 2 + volume_envelope 13, 7 + sound_call .sub3 + note B_, 1 + rest 1 + note G_, 1 + rest 3 + octave 3 + note G_, 6 + note G_, 1 + note B_, 1 + octave 4 + note C#, 1 + note E_, 1 + transpose 0, 12 + sound_call .sub3 + transpose 0, 0 + octave 3 + note B_, 1 + rest 1 + note G_, 1 + rest 3 + octave 4 + note G_, 6 + rest 2 + duty_cycle 3 + volume_envelope 11, 7 + octave 3 + note B_, 1 + octave 4 + note C_, 1 + sound_call .sub1 + note G_, 4 + rest 4 + note G_, 8 + note A_, 8 + note B_, 8 + note_type 12, 11, 7 + octave 5 + note C_, 10 + note D_, 2 + note C_, 2 + octave 4 + note G_, 2 + note B_, 6 + note A_, 6 + rest 2 + octave 3 + note B_, 1 + octave 4 + note C_, 1 + sound_call .sub1 + note G_, 4 + rest 4 + note G_, 8 + note A_, 8 + note B_, 8 + octave 5 + note D#, 1 + vibrato 0, 0, 0 + volume_envelope 9, 8 + note E_, 10 + vibrato 4, 2, 3 + volume_envelope 9, 7 + note E_, 9 + vibrato 8, 2, 3 + note D_, 4 + note C_, 4 + octave 4 + note G_, 4 + note B_, 12 + note A_, 12 + rest 4 + duty_cycle 0 + note B_, 2 + note A_, 2 + sound_call .sub2 + note_type 6, 11, 7 + note G#, 1 + note A_, 11 + note G_, 2 + note F#, 2 + note G_, 12 + rest 4 + rest 4 + note E_, 2 + rest 2 + note E_, 2 + rest 2 + note G_, 2 + rest 2 + note A_, 2 + rest 2 + note E_, 2 + rest 2 + note F#, 2 + rest 2 + note G_, 2 + rest 2 + note A_, 16 + note A#, 12 + note B_, 2 + note A_, 2 + sound_call .sub2 + note_type 6, 11, 7 + note G#, 1 + note A_, 11 + note B_, 4 + note G_, 12 + rest 4 + rest 4 + octave 5 + note C_, 4 + note D_, 2 + rest 2 + note C_, 2 + rest 1 + octave 4 + note A#, 1 + note B_, 4 + note A_, 2 + rest 2 + note G_, 4 + note E_, 2 + rest 2 + note F#, 8 + note G_, 8 + note A_, 8 + rest 8 + sound_loop 0, .mainloop + +.sub1: + note D_, 6 + octave 3 + note B_, 1 + octave 4 + note C_, 1 + note D_, 2 + octave 3 + note B_, 1 + octave 4 + note C_, 1 + note D_, 2 + octave 3 + note B_, 1 + octave 4 + note C_, 1 + note D_, 2 + rest 2 + note G_, 2 + rest 2 + note A_, 2 + rest 2 + note A#, 2 + rest 2 + note B_, 6 + note F#, 6 + rest 4 + duty_cycle 1 + note_type 6, 11, 7 + octave 3 + note A_, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + note D_, 1 + rest 1 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + octave 5 + note D_, 1 + rest 1 + note F#, 1 + rest 1 + note D_, 1 + rest 1 + octave 4 + note A#, 1 + rest 1 + note F#, 1 + rest 1 + note A#, 1 + rest 1 + note F#, 1 + rest 1 + duty_cycle 3 + note E_, 2 + note F#, 2 + note G_, 12 + note E_, 2 + note F#, 2 + note G_, 4 + note E_, 2 + note F#, 2 + note G_, 4 + note E_, 2 + note F#, 2 + sound_ret + +.sub2: + note_type 12, 11, 7 + note B_, 10 + note F#, 1 + rest 1 + note B_, 1 + rest 1 + note F#, 1 + rest 1 + sound_ret + +.sub3: + octave 3 + note D_, 10 + note E_, 1 + rest 3 + note D_, 1 + rest 1 + note C#, 12 + octave 2 + note A_, 1 + rest 1 + note B_, 1 + rest 1 + octave 3 + note C_, 8 + rest 2 + octave 2 + note B_, 1 + rest 3 + note A_, 1 + rest 1 + sound_ret + +.sub4: + octave 5 + note G_, 1 + note D_, 1 + octave 4 + note B_, 1 + note G_, 1 + octave 5 + note G_, 1 + note D_, 1 + octave 4 + note B_, 1 + note G_, 1 + octave 5 + note G_, 1 + note D_, 1 + octave 4 + note B_, 1 + note G_, 1 + octave 5 + note G_, 1 + note D_, 1 + octave 4 + note B_, 1 + note G_, 1 + octave 5 + note G_, 1 + note C#, 1 + octave 4 + note A#, 1 + note G_, 1 + octave 5 + note G_, 1 + note C#, 1 + octave 4 + note A#, 1 + note G_, 1 + octave 5 + note G_, 1 + note C#, 1 + octave 4 + note A#, 1 + note G_, 1 + octave 5 + note G_, 1 + note C#, 1 + octave 4 + note A#, 1 + note G_, 1 + octave 5 + note G_, 1 + note C_, 1 + octave 4 + note A_, 1 + note G_, 1 + octave 5 + note G_, 1 + note C_, 1 + octave 4 + note A_, 1 + note G_, 1 + octave 5 + note G_, 1 + note C_, 1 + octave 4 + note A_, 1 + note G_, 1 + octave 5 + note G_, 1 + note C_, 1 + octave 4 + note A_, 1 + note G_, 1 + sound_ret + +.sub5: + octave 5 + note G_, 1 + octave 4 + note B_, 1 + note A_, 1 + note G_, 1 + octave 5 + note G_, 1 + octave 4 + note B_, 1 + note A_, 1 + note G_, 1 + octave 5 + note G_, 1 + note D_, 1 + octave 4 + note B_, 1 + note G_, 1 + note B_, 1 + note G_, 1 + note C#, 1 + octave 3 + note G_, 1 + sound_ret + +Music_SSAqua_Ch3: + stereo_panning TRUE, TRUE + vibrato 8, 3, 4 + note_type 6, 1, 5 + octave 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 +.mainloop: + note G_, 16 + rest 8 + note G_, 2 + rest 2 + note_type 12, 1, 5 + note G_, 2 + note G_, 10 + rest 4 + note_type 6, 1, 5 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 16 + rest 8 + note G_, 2 + rest 2 + note_type 12, 1, 5 + note G_, 2 + note G_, 8 + note B_, 1 + octave 3 + note C#, 1 + note D_, 1 + note G_, 1 + note D_, 1 + note G_, 1 + note B_, 1 + octave 4 + note E_, 1 + sound_call .sub1 + sound_call .sub1 +.loop1: + note G_, 2 + rest 2 + octave 3 + note G_, 1 + rest 3 + octave 2 + note G_, 2 + rest 2 + octave 3 + note G_, 1 + rest 3 + octave 2 + note G_, 2 + rest 2 + octave 3 + note G_, 1 + rest 3 + octave 2 + note G_, 2 + rest 2 + octave 3 + note G_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + sound_loop 4, .loop1 + sound_call .sub2 + sound_call .sub2 + sound_call .sub3 + octave 3 + note E_, 2 + rest 2 + octave 4 + note E_, 1 + rest 3 + octave 3 + note D#, 2 + rest 2 + octave 4 + note D#, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note D_, 1 + rest 3 + octave 3 + note D#, 2 + rest 2 + octave 4 + note D#, 1 + rest 3 + octave 2 + note A_, 2 + rest 2 + octave 4 + note C_, 1 + rest 3 + octave 2 + note A_, 2 + rest 2 + octave 4 + note C_, 1 + rest 3 + octave 2 + note A_, 2 + rest 2 + octave 4 + note C#, 1 + rest 3 + octave 2 + note A_, 2 + rest 2 + octave 4 + note C#, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note G_, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note G_, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note F#, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note F#, 1 + rest 3 + sound_call .sub3 + octave 3 + note E_, 2 + rest 2 + octave 4 + note E_, 1 + rest 3 + octave 3 + note E_, 2 + rest 2 + octave 4 + note D#, 1 + rest 3 + octave 2 + note A_, 2 + rest 2 + octave 4 + note C#, 1 + rest 3 + octave 2 + note A_, 2 + rest 2 + octave 4 + note C#, 1 + rest 3 + octave 3 + note C_, 2 + rest 2 + octave 4 + note G_, 1 + rest 3 + octave 3 + note C_, 2 + rest 2 + octave 4 + note G_, 1 + rest 3 + octave 3 + note C#, 2 + rest 2 + octave 4 + note G_, 1 + rest 3 + octave 3 + note C#, 2 + rest 2 + octave 4 + note G_, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note G_, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note G_, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note F#, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + sound_loop 0, .mainloop + +.sub1: + note_type 6, 1, 5 + octave 2 + note G_, 2 + rest 6 + note G_, 2 + rest 6 + note G_, 2 + rest 2 + octave 3 + note G_, 2 + rest 2 + octave 2 + note G_, 2 + rest 4 + note G_, 1 + rest 1 + note G_, 2 + rest 6 + note G_, 2 + rest 2 + octave 3 + note G_, 1 + rest 3 + octave 2 + note G_, 2 + rest 2 + octave 3 + note G_, 1 + rest 3 + octave 2 + note G_, 2 + rest 4 + note G_, 1 + rest 1 + sound_ret + +.sub2: + octave 2 + note G_, 2 + rest 2 + octave 4 + note D_, 1 + rest 3 + octave 2 + note G_, 2 + rest 2 + octave 4 + note D_, 1 + rest 3 + octave 2 + note G_, 2 + rest 2 + octave 4 + note E_, 1 + rest 3 + octave 2 + note G_, 2 + rest 2 + octave 4 + note E_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + note G_, 2 + rest 2 + octave 4 + note F#, 1 + rest 3 + octave 2 + note G_, 2 + rest 2 + octave 4 + note F#, 1 + rest 3 + octave 2 + note G_, 2 + rest 2 + octave 4 + note G_, 4 + note F#, 4 + note E_, 2 + rest 2 + octave 2 + note B_, 2 + rest 2 + octave 4 + note F#, 1 + rest 3 + octave 2 + note B_, 2 + rest 2 + octave 4 + note F#, 1 + rest 3 + octave 2 + note A#, 2 + rest 2 + octave 3 + note A#, 1 + rest 3 + octave 2 + note A#, 2 + rest 2 + octave 3 + note A#, 1 + rest 3 + octave 2 + note A_, 2 + rest 2 + octave 3 + note A_, 1 + rest 3 + octave 2 + note A_, 2 + rest 2 + octave 3 + note A_, 1 + rest 3 + octave 2 + note A#, 2 + rest 2 + octave 3 + note A#, 1 + rest 3 + octave 2 + note A#, 2 + rest 2 + octave 3 + note A#, 1 + rest 1 + note D#, 1 + rest 1 + note E_, 2 + rest 2 + octave 4 + note E_, 1 + rest 3 + octave 3 + note E_, 2 + rest 2 + octave 4 + note E_, 1 + rest 3 + octave 3 + note D#, 2 + rest 2 + octave 4 + note D#, 1 + rest 3 + octave 3 + note D#, 2 + rest 2 + octave 4 + note D#, 1 + rest 1 + octave 3 + note C#, 1 + rest 1 + note D_, 2 + rest 2 + octave 4 + note D_, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note D_, 1 + rest 3 + octave 3 + note C#, 2 + rest 2 + octave 4 + note B_, 4 + note G_, 4 + note E_, 2 + rest 2 + octave 3 + note C_, 2 + rest 2 + octave 4 + note G_, 1 + rest 3 + octave 3 + note C_, 2 + rest 2 + octave 4 + note G_, 1 + rest 3 + octave 2 + note A_, 2 + rest 2 + octave 4 + note E_, 1 + rest 3 + octave 2 + note A_, 2 + rest 2 + octave 4 + note E_, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note G_, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note G_, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note F#, 1 + rest 3 + octave 3 + note D_, 2 + rest 2 + octave 4 + note F#, 1 + rest 3 + sound_ret + +.sub3: + octave 2 + note B_, 2 + rest 2 + octave 4 + note F#, 1 + rest 3 + octave 2 + note B_, 2 + rest 2 + octave 4 + note F#, 1 + rest 3 + octave 2 + note B_, 2 + rest 2 + octave 4 + note D#, 1 + rest 3 + octave 2 + note B_, 2 + rest 2 + octave 4 + note D#, 1 + rest 3 + sound_ret + +Music_SSAqua_Ch4: + toggle_noise 3 + drum_speed 12 + rest 2 +.mainloop: +.loop1: + drum_note 9, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 9, 1 + drum_note 8, 1 + sound_loop 12, .loop1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub3 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub3 + sound_loop 0, .mainloop + +.sub1: + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 8, 1 + drum_note 8, 1 + sound_ret + +.sub2: + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 7, 2 + sound_ret + +.sub3: + drum_note 11, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 3, 2 + drum_note 3, 2 + drum_note 1, 2 + sound_ret diff --git a/audio/music/successfulcapture.asm b/audio/music/successfulcapture.asm new file mode 100644 index 0000000..2c4e355 --- /dev/null +++ b/audio/music/successfulcapture.asm @@ -0,0 +1,23 @@ +Music_SuccessfulCapture: + channel_count 3 + channel 1, Music_SuccessfulCapture_Ch1 + channel 2, Music_SuccessfulCapture_Ch2 + channel 3, Music_SuccessfulCapture_Ch3 + +Music_SuccessfulCapture_Ch1: + tempo 126 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 + note_type 12, 10, 1 + sound_jump Music_WildPokemonVictory_Ch1.body + +Music_SuccessfulCapture_Ch2: + vibrato 18, 2, 4 + note_type 12, 12, 1 + duty_cycle 2 + sound_jump Music_WildPokemonVictory_Ch2.body + +Music_SuccessfulCapture_Ch3: + note_type 12, 2, 5 + sound_jump Music_WildPokemonVictory_Ch3.body diff --git a/audio/music/suicunebattle.asm b/audio/music/suicunebattle.asm new file mode 100644 index 0000000..041d307 --- /dev/null +++ b/audio/music/suicunebattle.asm @@ -0,0 +1,2057 @@ +Music_SuicuneBattle: + channel_count 3 + channel 1, Music_SuicuneBattle_Ch1 + channel 2, Music_SuicuneBattle_Ch2 + channel 3, Music_SuicuneBattle_Ch3 + +Music_SuicuneBattle_Ch1: + tempo 101 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 18, 1, 5 + note_type 12, 11, 7 + octave 4 + note A_, 1 + note G#, 1 + note G_, 4 + note E_, 2 + note D#, 1 + note D_, 1 + note C#, 4 + octave 3 + note A#, 2 + note A_, 1 + note G#, 1 + note G_, 4 + note E_, 2 + note D#, 1 + note D_, 1 + note C#, 4 + octave 2 + note A#, 2 + note_type 12, 11, 2 + note A_, 2 + note A_, 4 + note A_, 2 + note A_, 2 + note A_, 4 + note A_, 2 + note A_, 2 + note A_, 4 + note A_, 2 + note A_, 2 + note A_, 2 + note_type 12, 11, 3 + octave 4 + note F_, 4 + note E_, 2 + note_type 12, 11, 2 + octave 2 + note A_, 4 + note A_, 2 + note A_, 2 + note A_, 4 + note A_, 2 + note A_, 2 + note A_, 4 + note A_, 2 + note A_, 2 + note A_, 2 + note_type 12, 11, 3 + octave 4 + note F_, 4 + note E_, 2 + note_type 12, 11, 2 + octave 2 + note A_, 4 + note A_, 2 + note A_, 2 + note A_, 4 + note A_, 2 + note A_, 2 + note A_, 4 + note A_, 2 + note A_, 2 + note A_, 2 + note_type 12, 11, 3 + octave 4 + note F_, 4 + note E_, 2 + note_type 12, 11, 2 + octave 2 + note A_, 4 + note A_, 2 + note A_, 2 + note A_, 4 + note A_, 2 + note A_, 2 + note A_, 4 + note A_, 2 + note A_, 2 + note A_, 2 + note A_, 1 + note B_, 1 + octave 3 + note E_, 1 + note G#, 1 +.mainloop: + note_type 12, 11, 4 + octave 2 + note A_, 2 + note B_, 2 + note E_, 2 + octave 3 + note E_, 4 + octave 2 + note B_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note D_, 2 + note A_, 4 + note E_, 2 + note D_, 2 + note E_, 2 + octave 3 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note E_, 2 + note C_, 2 + note D_, 2 + octave 2 + note G_, 2 + octave 3 + note G_, 4 + note D_, 2 + note C_, 2 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + note D_, 2 + octave 2 + note G_, 2 + octave 3 + note F_, 4 + note E_, 2 + note D_, 2 + note F_, 2 + note G_, 2 + note E_, 2 + octave 2 + note G_, 2 + octave 3 + note E_, 2 + note G_, 2 + note A_, 6 + note G_, 4 + note F_, 4 + note E_, 2 + note D_, 6 + octave 2 + note A_, 2 + note B_, 2 + note E_, 2 + octave 3 + note E_, 4 + octave 2 + note B_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + note D_, 2 + note A_, 4 + note E_, 2 + note D_, 2 + note E_, 2 + octave 3 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note E_, 2 + note C_, 2 + note D_, 2 + octave 2 + note G_, 2 + octave 3 + note G_, 4 + note D_, 2 + note C_, 2 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + note D_, 2 + octave 2 + note G_, 2 + octave 3 + note F_, 4 + note E_, 2 + note D_, 2 + note F_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note C_, 2 + note A_, 4 + note G_, 2 + note F_, 2 + note A_, 2 + note G_, 2 + note A_, 2 + note C_, 2 + octave 4 + note C_, 4 + octave 3 + note A_, 2 + note G_, 2 + note C_, 2 + note_type 12, 11, 3 + octave 2 + note B_, 2 + octave 3 + note C_, 2 + rest 2 + note E_, 4 + note D_, 2 + note C_, 2 + octave 2 + note B_, 2 + note B_, 2 + octave 3 + note C_, 2 + note E_, 2 + note D_, 2 + note C_, 2 + octave 2 + note B_, 2 + note A_, 2 + note B_, 2 + octave 3 + note C_, 2 + octave 2 + note G_, 2 + rest 2 + note_type 12, 11, 6 + octave 3 + note G_, 10 + note_type 12, 11, 3 + note C_, 2 + octave 2 + note G_, 2 + rest 2 + note_type 12, 11, 7 + octave 3 + note G_, 10 + note_type 12, 11, 3 + octave 2 + note B_, 2 + octave 3 + note C_, 2 + rest 2 + note E_, 4 + note D_, 2 + note C_, 2 + octave 2 + note B_, 2 + note B_, 2 + octave 3 + note C_, 2 + note E_, 2 + note D_, 2 + note C_, 2 + octave 2 + note B_, 2 + note A_, 2 + note B_, 2 + octave 3 + note G_, 2 + note C_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note F#, 2 + octave 2 + note B_, 2 + octave 3 + note B_, 2 + note F#, 2 + note E_, 2 + octave 2 + note A_, 2 + octave 3 + note A_, 2 + note E_, 2 + note C_, 2 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note_type 12, 11, 2 + octave 2 + note B_, 2 + note B_, 6 + note B_, 2 + note B_, 6 + note B_, 2 + note B_, 6 + note B_, 2 + note_type 12, 11, 4 + octave 3 + note C_, 6 + note_type 12, 11, 2 + octave 2 + note B_, 2 + note B_, 2 + note_type 12, 11, 5 + octave 1 + note F#, 4 + note_type 12, 11, 2 + octave 2 + note B_, 2 + note B_, 2 + note_type 12, 11, 5 + octave 1 + note F#, 4 + note_type 12, 11, 2 + octave 2 + note B_, 2 + note B_, 2 + note_type 12, 11, 5 + octave 1 + note F#, 4 + note_type 12, 11, 2 + octave 2 + note B_, 2 + octave 3 + note C_, 2 + octave 2 + note B_, 1 + octave 3 + note F#, 1 + note A_, 1 + octave 4 + note C_, 1 + note_type 12, 11, 2 + octave 3 + note B_, 2 + note B_, 2 + note_type 12, 11, 5 + octave 1 + note F#, 4 + note_type 12, 11, 2 + octave 3 + note B_, 2 + note B_, 2 + note_type 12, 11, 5 + octave 1 + note F#, 4 + note_type 12, 11, 2 + octave 3 + note B_, 2 + note B_, 2 + note_type 12, 11, 5 + octave 1 + note F#, 4 + note_type 12, 11, 2 + octave 3 + note B_, 2 + note_type 12, 11, 5 + octave 4 + note C_, 6 + note_type 12, 11, 2 + octave 3 + note B_, 2 + note B_, 2 + note_type 12, 11, 4 + octave 1 + note F#, 4 + note_type 12, 11, 2 + octave 3 + note B_, 2 + note B_, 2 + note_type 12, 11, 4 + octave 1 + note F#, 4 + note_type 12, 11, 2 + octave 3 + note B_, 2 + note B_, 2 + note_type 12, 11, 4 + octave 1 + note F#, 4 + note_type 12, 11, 2 + octave 3 + note B_, 2 + note_type 12, 11, 5 + octave 4 + note C_, 6 + note_type 12, 11, 7 + octave 2 + note B_, 8 + note E_, 8 + octave 3 + note C_, 8 + octave 2 + note A_, 8 + note B_, 8 + note E_, 8 + note F_, 10 + note C_, 2 + note D_, 2 + note C_, 2 + note_type 12, 10, 0 + octave 1 + note F#, 8 + note B_, 8 + note G_, 8 + octave 2 + note C_, 8 + octave 1 + note B_, 8 + note E_, 8 + note F_, 8 + note_type 12, 10, 7 + note F_, 8 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + note_type 12, 11, 2 + rest 4 + octave 3 + note D_, 8 + note D_, 8 + note D_, 8 + note D_, 8 + note D_, 8 + note D_, 8 + note D_, 8 + note D_, 8 + note F_, 8 + note F_, 8 + note F_, 8 + note F_, 8 + note F_, 8 + note F_, 8 + note F_, 8 + note F_, 4 + note E_, 8 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + rest 16 + vibrato 8, 2, 4 + duty_cycle 2 + note_type 12, 9, 6 + octave 4 + note E_, 6 + note F#, 6 + octave 3 + note A_, 4 + octave 4 + note A_, 16 + vibrato 18, 1, 5 + duty_cycle 3 + sound_loop 0, .mainloop + +Music_SuicuneBattle_Ch2: + duty_cycle 3 + vibrato 20, 3, 4 + pitch_offset 1 + note_type 12, 12, 3 + octave 5 + note E_, 1 + octave 4 + note E_, 1 + note A_, 2 + octave 5 + note E_, 1 + octave 4 + note E_, 1 + note A_, 2 + octave 5 + note E_, 1 + octave 4 + note E_, 1 + note A_, 2 + octave 5 + note E_, 1 + octave 4 + note E_, 1 + note A_, 2 + octave 5 + note E_, 1 + octave 4 + note E_, 1 + note A_, 2 + octave 5 + note E_, 1 + octave 4 + note E_, 1 + note A_, 2 + octave 5 + note E_, 1 + octave 4 + note E_, 1 + note A_, 2 + octave 5 + note E_, 1 + octave 4 + note E_, 1 + note A_, 6 + note_type 12, 12, 2 + octave 2 + note E_, 8 + note E_, 8 + note E_, 8 + note_type 12, 12, 3 + octave 4 + note A#, 4 + note_type 12, 12, 2 + note A_, 4 + octave 2 + note E_, 8 + note E_, 8 + note E_, 8 + note_type 12, 12, 3 + octave 4 + note A#, 4 + note_type 12, 12, 2 + note A_, 4 + octave 4 + note E_, 8 + note E_, 8 + note E_, 8 + note_type 12, 12, 3 + octave 4 + note A#, 4 + note_type 12, 12, 2 + note A_, 4 + octave 4 + note E_, 8 + note E_, 8 + note E_, 8 + note E_, 4 +.mainloop: + note_type 12, 12, 7 + octave 3 + note A_, 8 + note B_, 8 + note D_, 8 + note_type 12, 11, 0 + octave 4 + note D_, 8 + note_type 12, 11, 6 + note D_, 8 + vibrato 16, 2, 4 + duty_cycle 2 + note_type 12, 10, 4 + octave 5 + note A_, 6 + note B_, 6 + note D_, 4 + octave 6 + note D_, 8 + vibrato 20, 3, 4 + duty_cycle 3 + note_type 12, 12, 7 + octave 4 + note C_, 8 + note D_, 8 + octave 3 + note G_, 8 + octave 4 + note F_, 8 + note_type 12, 11, 0 + note E_, 10 + note_type 12, 11, 7 + note E_, 6 + note_type 12, 10, 5 + octave 2 + note G_, 4 + note A_, 4 + note G_, 4 + note B_, 4 + note_type 12, 12, 7 + octave 3 + note A_, 8 + note B_, 8 + note D_, 8 + note_type 12, 12, 7 + octave 4 + note D_, 8 + note_type 12, 4, -4 + note D_, 4 + note_type 12, 12, 6 + note D_, 4 + note_type 12, 10, 4 + vibrato 8, 2, 4 + duty_cycle 2 + octave 5 + note A_, 6 + note B_, 6 + note D_, 4 + octave 6 + note D_, 8 + vibrato 20, 3, 4 + note_type 12, 12, 7 + duty_cycle 3 + octave 4 + note C_, 8 + note D_, 8 + octave 3 + note G_, 8 + octave 4 + note F_, 8 + note_type 12, 4, -4 + note E_, 8 + note_type 12, 12, 7 + note E_, 8 + note_type 12, 12, 6 + note C_, 8 + note G_, 8 + note_type 12, 12, 2 + octave 3 + note F#, 2 + note G_, 2 + rest 2 + note B_, 4 + note A_, 2 + note G_, 2 + note F#, 2 + note F#, 2 + note G_, 2 + note B_, 2 + note A_, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note F#, 2 + note G_, 2 + note C_, 2 + rest 2 + note_type 12, 12, 7 + octave 4 + note C_, 10 + note_type 12, 12, 3 + octave 4 + note G_, 2 + note C_, 2 + rest 2 + note_type 12, 12, 7 + octave 5 + note C_, 10 + note_type 12, 12, 3 + octave 4 + note F#, 2 + note G_, 2 + rest 2 + note B_, 4 + note A_, 2 + note G_, 2 + note F#, 2 + note F#, 2 + note G_, 2 + note B_, 2 + note A_, 2 + note G_, 2 + note F#, 2 + note E_, 2 + note F#, 2 + note_type 12, 12, 7 + note G_, 8 + note F#, 8 + note E_, 8 + note G_, 8 + note_type 12, 12, 2 + octave 3 + note F#, 2 + note F#, 6 + note F#, 2 + note F#, 6 + note F#, 2 + note F#, 6 + note F#, 2 + note_type 12, 11, 7 + note G_, 6 + note_type 12, 12, 2 + note F#, 2 + note F#, 2 + note_type 12, 12, 7 + octave 1 + note B_, 4 + note_type 12, 12, 2 + octave 3 + note F#, 2 + note F#, 2 + note_type 12, 12, 7 + octave 1 + note B_, 4 + note_type 12, 12, 2 + octave 3 + note F#, 2 + note F#, 2 + note_type 12, 12, 7 + octave 1 + note B_, 4 + note_type 12, 12, 2 + octave 3 + note F#, 2 + note_type 12, 12, 7 + note G_, 6 + note_type 12, 12, 2 + octave 4 + note F#, 2 + note F#, 2 + note_type 12, 12, 7 + octave 1 + note B_, 4 + note_type 12, 12, 2 + octave 4 + note F#, 2 + note F#, 2 + note_type 12, 12, 7 + octave 1 + note B_, 4 + note_type 12, 12, 2 + octave 4 + note F#, 2 + note F#, 2 + note_type 12, 12, 7 + octave 1 + note B_, 4 + note_type 12, 12, 2 + octave 4 + note F#, 2 + note_type 12, 12, 7 + note G_, 6 + note_type 12, 12, 2 + note F#, 2 + note F#, 2 + note_type 12, 12, 7 + octave 1 + note B_, 4 + note_type 12, 12, 2 + octave 4 + note F#, 2 + note F#, 2 + note_type 12, 12, 7 + octave 1 + note B_, 4 + note_type 12, 12, 2 + octave 4 + note F#, 2 + note F#, 2 + note_type 12, 12, 7 + octave 1 + note B_, 4 + note_type 12, 12, 2 + octave 4 + note F#, 2 + note_type 12, 12, 7 + note G_, 6 + note_type 12, 11, 0 + octave 3 + note F#, 8 + octave 2 + note B_, 8 + octave 3 + note G_, 8 + note E_, 8 + note F#, 8 + octave 2 + note B_, 8 + octave 3 + note C_, 8 + note_type 12, 11, 7 + octave 3 + note C_, 8 + note_type 12, 12, 7 + octave 1 + note B_, 8 + octave 2 + note E_, 8 + note C_, 8 + note F_, 8 + note E_, 8 + octave 1 + note B_, 8 + note_type 12, 11, 0 + octave 2 + note C_, 10 + note_type 12, 11, 7 + octave 2 + note C_, 6 + note_type 12, 12, 3 + octave 1 + note B_, 2 + octave 2 + note E_, 2 + octave 1 + note F_, 2 + octave 2 + note F_, 4 + note E_, 2 + octave 1 + note B_, 2 + note F_, 2 + note B_, 2 + octave 2 + note E_, 2 + note F_, 2 + note E_, 2 + octave 1 + note B_, 2 + note F_, 2 + note B_, 2 + octave 2 + note E_, 2 + octave 1 + note B_, 2 + octave 2 + note E_, 2 + octave 1 + note F_, 2 + octave 2 + note F_, 4 + note E_, 2 + octave 1 + note B_, 2 + note F_, 2 + note B_, 2 + octave 2 + note E_, 2 + note F_, 2 + note E_, 2 + octave 1 + note B_, 2 + note F_, 2 + note B_, 2 + octave 2 + note E_, 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note F_, 2 + octave 3 + note F_, 4 + note E_, 2 + octave 2 + note B_, 2 + note F_, 2 + note B_, 2 + octave 3 + note E_, 2 + note F_, 2 + note E_, 2 + octave 2 + note B_, 2 + note F_, 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note F_, 2 + octave 3 + note F_, 4 + note E_, 2 + octave 2 + note B_, 2 + note F_, 2 + note B_, 2 + octave 3 + note E_, 2 + note F_, 2 + note E_, 2 + octave 2 + note B_, 2 + note F_, 2 + note B_, 2 + octave 3 + note E_, 2 + note D_, 2 + note G_, 2 + octave 2 + note G#, 2 + octave 3 + note G#, 4 + note G_, 2 + note D_, 2 + octave 2 + note G#, 2 + octave 3 + note D_, 2 + note G_, 2 + note G#, 2 + note G_, 2 + note D_, 2 + octave 2 + note G#, 2 + octave 3 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + octave 2 + note G#, 2 + octave 3 + note G#, 4 + note G_, 2 + note D_, 2 + octave 2 + note G#, 2 + octave 3 + note D_, 2 + note G_, 2 + note G#, 2 + note G_, 2 + note D_, 2 + octave 2 + note G#, 2 + octave 3 + note D_, 2 + note G_, 2 + note B_, 2 + octave 4 + note E_, 2 + octave 3 + note F_, 2 + octave 4 + note F_, 4 + note E_, 2 + octave 3 + note B_, 2 + note F_, 2 + note B_, 2 + octave 4 + note E_, 2 + note F_, 2 + note E_, 2 + octave 3 + note B_, 2 + note F_, 2 + note B_, 2 + octave 4 + note E_, 2 + octave 3 + note B_, 2 + octave 4 + note E_, 2 + octave 3 + note F_, 2 + octave 4 + note F_, 4 + note E_, 2 + octave 3 + note B_, 2 + note F_, 2 + note B_, 2 + octave 4 + note E_, 2 + note F_, 2 + note E_, 2 + octave 3 + note B_, 2 + note F_, 2 + note B_, 2 + octave 4 + note E_, 2 + note D_, 2 + note G_, 2 + octave 3 + note G#, 2 + octave 4 + note G#, 4 + note G_, 2 + note D_, 2 + octave 3 + note G#, 2 + octave 4 + note D_, 2 + note G_, 2 + note G#, 2 + note G_, 2 + note D_, 2 + octave 3 + note G#, 2 + octave 4 + note D_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + octave 3 + note G#, 2 + octave 4 + note G#, 4 + note G_, 2 + note D_, 2 + octave 3 + note G#, 2 + octave 4 + note D_, 2 + note G_, 2 + note G#, 2 + note G_, 2 + note D_, 2 + octave 3 + note G#, 2 + octave 4 + note D_, 2 + note G_, 2 + note_type 12, 12, 2 + note A_, 8 + note_type 12, 12, 3 + octave 2 + note A_, 2 + note B_, 2 + note E_, 2 + octave 3 + note E_, 4 + octave 2 + note B_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note B_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note B_, 2 + note A_, 2 + note B_, 2 + note E_, 2 + octave 3 + note E_, 4 + octave 2 + note B_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note B_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note B_, 2 + octave 3 + note C_, 2 + note D_, 2 + octave 2 + note G_, 2 + octave 3 + note G_, 4 + note D_, 2 + note C_, 2 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note C_, 2 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + note D_, 2 + note C_, 2 + note D_, 2 + octave 2 + note G_, 2 + octave 3 + note G_, 4 + note D_, 2 + note C_, 2 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + note D_, 2 + note G_, 2 + note D_, 2 + note C_, 2 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + note D_, 2 + octave 2 + note A_, 2 + note B_, 2 + note E_, 2 + octave 3 + note E_, 4 + octave 2 + note B_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note B_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note B_, 2 + note A_, 2 + note B_, 2 + note E_, 2 + octave 3 + note E_, 4 + octave 2 + note B_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note B_, 2 + octave 3 + note E_, 2 + octave 2 + note B_, 2 + note A_, 2 + note E_, 2 + note A_, 2 + note B_, 2 + sound_loop 0, .mainloop + +Music_SuicuneBattle_Ch3: + note_type 12, 1, 8 + rest 16 + rest 4 + octave 2 + note A_, 4 + note D_, 2 + note E_, 2 + note A#, 2 + note G_, 2 + note D_, 2 + note E_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 4 + note E_, 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 4 + note E_, 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note E_, 2 + note A_, 4 + note E_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 4 + note E_, 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note E_, 2 + note A_, 2 + note E_, 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note E_, 2 + note D_, 2 + note E_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 4 + note E_, 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note E_, 2 + note A_, 4 + note E_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note E_, 2 + note_type 12, 1, 6 +.mainloop: + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note A_, 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 2 + note D_, 2 + note A_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + octave 3 + note C_, 4 + octave 2 + note G_, 2 + note F_, 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note A_, 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 2 + note D_, 2 + note A_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + octave 3 + note C_, 2 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 2 + note G_, 2 + note C_, 2 + octave 3 + note C_, 4 + octave 2 + note G_, 2 + note C_, 2 + note G_, 2 + octave 1 + note B_, 2 + octave 2 + note F#, 2 + note B_, 2 + note F#, 2 + octave 1 + note B_, 2 + octave 2 + note F#, 2 + octave 1 + note B_, 2 + octave 2 + note F#, 2 + octave 1 + note B_, 2 + octave 2 + note F#, 2 + note B_, 2 + note F#, 2 + octave 1 + note B_, 2 + octave 2 + note F#, 2 + octave 1 + note B_, 2 + octave 2 + note F#, 2 + note C_, 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note G_, 4 + note C_, 2 + octave 3 + note C_, 2 + octave 2 + note G_, 2 + note D_, 2 + note A_, 2 + octave 3 + note D_, 2 + octave 2 + note A_, 2 + note D_, 2 + note A_, 2 + note D_, 2 + note A_, 2 + note D_, 2 + note A_, 2 + octave 3 + note D_, 2 + octave 2 + note A_, 2 + note D_, 2 + note A_, 2 + note D_, 2 + note A_, 2 + note C_, 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note G_, 2 + octave 1 + note B_, 2 + octave 2 + note F#, 2 + octave 1 + note B_, 2 + octave 2 + note F#, 2 + octave 1 + note A_, 2 + octave 2 + note E_, 2 + note A_, 2 + note E_, 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + note F#, 2 + note F#, 2 + rest 4 + note F#, 2 + note F#, 2 + rest 4 + note F#, 2 + note F#, 2 + rest 4 + note F#, 2 + note G_, 6 + note F#, 2 + note F#, 2 + rest 4 + note F#, 2 + note F#, 2 + rest 4 + note F#, 2 + note F#, 2 + rest 4 + note F#, 2 + note G_, 6 + note B_, 2 + note B_, 2 + octave 1 + note B_, 4 + octave 2 + note B_, 2 + note B_, 2 + octave 1 + note B_, 4 + octave 2 + note B_, 2 + note B_, 2 + octave 1 + note B_, 4 + octave 2 + note B_, 2 + octave 3 + note C_, 6 + note F#, 2 + note F#, 2 + octave 1 + note B_, 4 + octave 3 + note F#, 2 + note F#, 2 + octave 1 + note B_, 4 + octave 3 + note F#, 2 + note F#, 2 + octave 1 + note B_, 4 + octave 3 + note F#, 2 + note G_, 6 + octave 2 + note F#, 8 + octave 1 + note B_, 8 + octave 2 + note G_, 8 + note E_, 8 + note F#, 8 + octave 1 + note B_, 8 + octave 2 + note C_, 10 + note C_, 2 + note D_, 2 + note C_, 2 + octave 1 + note B_, 8 + octave 2 + note E_, 8 + note C_, 8 + note F_, 8 + note E_, 8 + octave 1 + note B_, 8 + octave 2 + note C_, 16 + rest 4 + octave 1 + note B_, 2 + rest 6 + note B_, 2 + rest 2 + rest 4 + note B_, 2 + rest 6 + note B_, 2 + rest 2 + rest 4 + note B_, 2 + rest 6 + note B_, 2 + rest 2 + rest 4 + note B_, 2 + rest 6 + note B_, 2 + rest 2 + note B_, 2 + octave 2 + note F_, 2 + note B_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note B_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note B_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note B_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note B_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note B_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note B_, 2 + note F_, 2 + note B_, 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note D_, 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note D_, 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note D_, 2 + note G#, 2 + note D_, 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note D_, 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note D_, 2 + note G#, 2 + note D_, 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note D_, 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note D_, 2 + note G#, 2 + note D_, 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note G#, 2 + note D_, 2 + note G#, 2 + note B_, 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note B_, 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note B_, 2 + note F_, 2 + note B_, 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note B_, 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note B_, 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note B_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note B_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note B_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + note B_, 2 + octave 1 + note B_, 2 + octave 2 + note F_, 2 + octave 3 + note D_, 2 + octave 2 + note G#, 2 + note D_, 2 + octave 3 + note D_, 2 + octave 2 + note G#, 2 + note D_, 2 + octave 3 + note D_, 2 + octave 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note G#, 2 + note D_, 2 + octave 3 + note D_, 2 + octave 2 + note G#, 2 + note D_, 2 + octave 3 + note D_, 2 + octave 2 + note G#, 2 + note D_, 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note D_, 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note D_, 2 + note G#, 2 + note D_, 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note G#, 2 + octave 3 + note D_, 2 + octave 2 + note G#, 2 + note D_, 2 + note G#, 2 + note A_, 4 + rest 4 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note A_, 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + octave 1 + note A_, 2 + octave 2 + note D_, 2 + note C_, 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 2 + note G_, 2 + note C_, 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 2 + note G_, 2 + octave 3 + note C_, 2 + octave 2 + note C_, 2 + note G_, 2 + octave 1 + note A_, 2 + octave 2 + note E_, 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note E_, 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note E_, 2 + octave 1 + note A_, 2 + octave 2 + note E_, 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note E_, 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note E_, 2 + octave 1 + note A_, 2 + octave 2 + note E_, 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note E_, 2 + note A_, 2 + octave 1 + note A_, 2 + octave 2 + note E_, 2 + octave 1 + note A_, 2 + octave 2 + note E_, 2 + octave 1 + note A_, 2 + octave 2 + note A_, 4 + note E_, 2 + note D_, 2 + note E_, 2 + sound_loop 0, .mainloop diff --git a/audio/music/surf.asm b/audio/music/surf.asm new file mode 100644 index 0000000..383e880 --- /dev/null +++ b/audio/music/surf.asm @@ -0,0 +1,723 @@ +Music_Surf: + channel_count 3 + channel 1, Music_Surf_Ch1 + channel 2, Music_Surf_Ch2 + channel 3, Music_Surf_Ch3 + + db $3 ; unused, leftover from a channel 4 + +Music_Surf_Ch1: + tempo 108 + volume 7, 7 + note_type 12, 10, 7 + stereo_panning FALSE, TRUE +.mainloop: + duty_cycle 2 + vibrato 16, 2, 4 + volume_envelope 7, 3 + octave 3 + note F_, 1 + rest 1 + note D#, 1 + rest 1 + volume_envelope 7, 3 + note F_, 1 + rest 1 + note D#, 1 + rest 1 + note G#, 1 + rest 1 + note D#, 1 + rest 1 + volume_envelope 7, 3 + note F_, 1 + rest 1 + note D#, 1 + rest 1 + note F_, 1 + rest 1 + note D#, 1 + volume_envelope 9, 3 + rest 1 + note G#, 1 + rest 1 + note D#, 1 + rest 1 + volume_envelope 10, 7 + note F_, 1 + rest 1 + note D#, 1 + rest 1 + note F_, 1 + rest 1 + note D#, 1 + volume_envelope 11, 7 + rest 1 + note A#, 2 + note G#, 2 + note F_, 2 + note D_, 2 + note_type 8, 12, 7 + octave 2 + note A#, 2 + octave 3 + note D_, 2 + note F_, 2 + volume_envelope 15, 7 + note G#, 2 + note A#, 2 + octave 4 + note D_, 2 + duty_cycle 0 + sound_call .sub1 + duty_cycle 1 + note_type 8, 10, 7 + sound_call .sub1 + sound_call .sub2 + octave 4 + note C_, 2 + octave 3 + note G_, 2 + note D#, 2 + note C_, 2 + note D#, 2 + note G_, 2 + octave 4 + note C_, 2 + note D#, 2 + note G_, 2 + duty_cycle 1 + note_type 6, 9, 7 + sound_call .sub2 + volume_envelope 10, 8 + note G#, 6 + note A_, 6 + note A#, 3 + octave 4 + note D_, 3 + volume_envelope 10, 8 + duty_cycle 1 + sound_call .sub3 + octave 3 + note D#, 8 + note G#, 8 + note D#, 8 + duty_cycle 3 + note_type 8, 9, 8 + sound_call .sub3 + note_type 12, 10, 7 + octave 3 + note D#, 12 + octave 2 + note F_, 4 + note D#, 4 + note F_, 4 + note G#, 4 + note D#, 2 + note G#, 2 + note B_, 2 + octave 3 + note D#, 2 + sound_loop 0, .mainloop + +.sub1: + note_type 12, 10, 7 + octave 3 + note D#, 4 + note A#, 1 + rest 1 + octave 4 + note D#, 1 + rest 1 + octave 3 + note A#, 1 + rest 1 + octave 4 + note D#, 1 + rest 1 + octave 3 + note D#, 4 + note A#, 1 + rest 1 + octave 4 + note D#, 1 + rest 1 + octave 3 + note A#, 1 + rest 1 + octave 4 + note D#, 1 + rest 1 + octave 3 + note C#, 4 + note A#, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + octave 3 + note A#, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + octave 3 + note C#, 4 + note A#, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + octave 3 + note A#, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + octave 3 + note C_, 4 + note G#, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + octave 3 + note G#, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + octave 3 + note C_, 4 + note G#, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + octave 3 + note G#, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + note_type 6, 10, 7 + octave 3 + note A#, 1 + note B_, 15 + octave 4 + note D#, 4 + octave 3 + note B_, 4 + note G#, 8 + note F_, 8 + note C#, 4 + note D_, 4 + sound_ret + +.sub2: + octave 4 + note G#, 16 + note D#, 4 + note C_, 4 + octave 3 + note G#, 4 + octave 4 + note C_, 4 + note D_, 4 + note D#, 4 + note G_, 4 + note G#, 4 + note_type 8, 9, 2 + note A#, 2 + note F_, 2 + note D_, 2 + note F_, 2 + note D_, 2 + octave 3 + note A#, 2 + octave 4 + note D_, 2 + octave 3 + note A#, 2 + note F_, 2 + note A#, 2 + note F_, 2 + note D_, 2 + octave 2 + note A#, 2 + octave 3 + note D_, 2 + note F_, 2 + note G#, 2 + note A#, 2 + octave 4 + note D_, 2 + note_type 6, 9, 7 + note C#, 1 + note D_, 15 + note G_, 4 + note D_, 4 + octave 3 + note A#, 4 + octave 4 + note D_, 4 + note F_, 4 + note G_, 4 + note A_, 4 + note A#, 4 + note_type 8, 9, 2 + octave 5 + note C_, 2 + octave 4 + note G_, 2 + note D#, 2 + note G_, 2 + note D#, 2 + note C_, 2 + note D#, 2 + note C_, 2 + octave 3 + note G_, 2 + sound_ret + +.sub3: + octave 3 + note A#, 3 + note G_, 3 + note A#, 3 + octave 4 + note D#, 9 + note_type 6, 5, 8 + note D_, 1 + note C#, 1 + note C_, 1 + octave 3 + note B_, 1 + note A#, 1 + note A_, 1 + note G#, 1 + note G_, 1 + volume_envelope 10, 8 + note D#, 4 + note D_, 4 + note D#, 4 + note G_, 4 + note A_, 4 + note G#, 4 + note G_, 4 + note F#, 4 + note F_, 4 + note E_, 4 + note G_, 8 + note C#, 8 + note A#, 8 + note A_, 1 + note A#, 3 + note G#, 4 + octave 4 + note C_, 4 + note F_, 12 + volume_envelope 5, 8 + note D#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + octave 3 + note B_, 1 + note A#, 1 + note A_, 1 + note G_, 1 + volume_envelope 10, 8 + note G#, 8 + octave 4 + note D#, 4 + octave 3 + note B_, 4 + note G#, 8 + note D#, 8 + octave 2 + note B_, 8 + sound_ret + +Music_Surf_Ch2: +.mainloop: + note_type 12, 12, 2 + stereo_panning TRUE, FALSE + duty_cycle 2 + vibrato 20, 2, 3 +.loop1: + octave 1 + note A#, 4 + octave 2 + note A#, 1 + rest 3 + note A#, 1 + rest 3 + sound_loop 3, .loop1 + octave 1 + note A#, 4 + octave 2 + note F_, 1 + rest 3 + note A#, 1 + rest 3 +.loop2: + note D#, 4 + note G_, 2 + note G#, 2 + note A#, 4 + note D#, 4 + note G_, 2 + note G#, 2 + note A#, 4 + note C#, 4 + note G_, 2 + note G#, 2 + note A#, 4 + note C#, 4 + note G_, 2 + note G#, 2 + note A#, 4 + note C_, 4 + note F_, 2 + note G_, 2 + note G#, 4 + note C_, 4 + note F_, 2 + note G_, 2 + note G#, 4 + octave 1 + note B_, 4 + octave 2 + note F_, 2 + note G_, 2 + note G#, 2 + note A#, 2 + note B_, 4 + note A#, 4 + note G#, 4 + sound_loop 2, .loop2 + volume_envelope 12, 7 + sound_call .sub1 + note D#, 4 + note D_, 4 + note C#, 4 + sound_call .sub1 + note D_, 4 + note D#, 4 + octave 1 + note A#, 4 + note_type 6, 11, 8 + sound_call .sub2 + duty_cycle 1 + volume_envelope 11, 8 + sound_call .sub3 + duty_cycle 2 + sound_call .sub4 + duty_cycle 1 + volume_envelope 11, 8 + sound_call .sub5 + octave 3 + note B_, 16 + octave 4 + note C#, 8 + transpose 0, 12 + duty_cycle 3 + sound_call .sub2 + volume_envelope 11, 8 + duty_cycle 1 + sound_call .sub3 + duty_cycle 3 + sound_call .sub4 + volume_envelope 11, 8 + duty_cycle 1 + sound_call .sub5 + transpose 0, 0 + note_type 12, 11, 8 + octave 4 + note B_, 12 + duty_cycle 2 + note A#, 4 + note G#, 4 + note D#, 4 + note G#, 4 + note A#, 4 + note B_, 4 + sound_loop 0, .mainloop + +.sub1: + octave 1 + note G#, 4 + octave 3 + note F_, 4 + note D#, 4 + octave 1 + note G#, 4 + octave 3 + note D#, 4 + note D_, 4 + octave 1 + note A#, 4 + octave 3 + note C_, 4 + octave 2 + note A#, 4 + octave 1 + note A#, 4 + octave 2 + note G#, 4 + note A#, 4 + octave 1 + note G_, 4 + octave 3 + note D_, 4 + note C_, 4 + octave 1 + note G_, 4 + octave 2 + note A#, 4 + note G_, 4 + note C_, 4 + octave 3 + note F_, 4 + note G_, 4 + sound_ret + +.sub2: + octave 4 + note F_, 4 + note D#, 4 + note F_, 4 + note G_, 12 + volume_envelope 5, 8 + note F#, 1 + note F_, 1 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + note C_, 1 + octave 3 + note B_, 1 + note A_, 1 + sound_ret + +.sub3: + note A#, 7 + octave 4 + note C_, 8 + note C#, 16 + note C_, 4 + octave 3 + note B_, 4 + octave 4 + note C_, 16 + note G_, 8 + sound_ret + +.sub4: + note F#, 1 + note G_, 3 + note F_, 4 + note G_, 4 + note G#, 12 + volume_envelope 5, 8 + note G_, 1 + note F#, 1 + note F_, 1 + note E_, 1 + note D#, 1 + note D_, 1 + note C#, 1 + octave 3 + note B_, 1 + sound_ret + +.sub5: + octave 4 + note C_, 8 + note G_, 4 + note G#, 4 + note A#, 8 + note G#, 8 + note D#, 8 + sound_ret + +Music_Surf_Ch3: +.mainloop: + stereo_panning TRUE, TRUE + note_type 12, 1, 5 + vibrato 22, 2, 3 + octave 4 + note A#, 12 + octave 5 + note C_, 12 + note D_, 8 + note D#, 4 + note F_, 4 + note G_, 4 + note G#, 4 + volume_envelope 1, 2 + note A#, 12 + rest 4 + note G#, 4 + note G_, 4 + note_type 6, 1, 2 + note F#, 1 + note G_, 15 + note G#, 4 + note G_, 4 + note F_, 16 + octave 4 + note A#, 8 + note_type 12, 1, 2 + octave 5 + note G#, 16 + note G_, 4 + note F_, 4 + note_type 6, 1, 2 + note E_, 1 + note F_, 15 + note G_, 4 + note F_, 4 + note D#, 16 + note F_, 8 + note_type 12, 1, 4 + note A#, 12 + rest 4 + note G#, 4 + note G_, 4 + note_type 6, 1, 4 + note F#, 1 + note G_, 15 + note G#, 4 + note G_, 4 + note F_, 16 + octave 4 + note A#, 8 + note_type 12, 1, 4 + octave 5 + note G#, 16 + note G_, 4 + note F_, 4 + note_type 6, 1, 4 + note E_, 1 + note F_, 15 + note G_, 4 + note F_, 4 + note D#, 16 + octave 6 + note D#, 8 + note_type 12, 1, 3 + note C_, 16 + note D_, 4 + note D#, 4 + note_type 6, 1, 3 + note D_, 1 + note D#, 15 + note D_, 4 + note C_, 4 + octave 5 + note D_, 16 + octave 6 + note D_, 8 + note_type 12, 1, 3 + octave 5 + note A#, 12 + note_type 6, 1, 3 + note A_, 1 + note A#, 7 + octave 6 + note C_, 8 + note D_, 8 + note F_, 16 + note D#, 4 + note D_, 4 + note D#, 16 + note D_, 8 + note_type 12, 1, 4 + note C_, 12 + note C_, 4 + note D_, 4 + note D#, 4 + note_type 6, 1, 4 + note D_, 1 + note D#, 15 + note D_, 4 + note C_, 4 + octave 5 + note D_, 16 + octave 6 + note D_, 8 + note_type 12, 1, 4 + octave 5 + note A#, 12 + note_type 6, 1, 4 + note A_, 1 + note A#, 7 + octave 6 + note C_, 8 + note D_, 8 + note_type 12, 1, 4 + note F_, 12 + note G_, 8 + octave 5 + note A#, 4 + volume_envelope 1, 5 + sound_call .sub1 + octave 2 + note B_, 4 + octave 3 + note D#, 4 + note F_, 4 + note G#, 4 + note A#, 4 + note B_, 4 + sound_call .sub1 + octave 2 + note B_, 4 + octave 3 + note D#, 4 + note G#, 4 + note B_, 12 + octave 2 + note B_, 12 + octave 3 + note D#, 8 + octave 2 + note B_, 4 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note D#, 4 + note G_, 1 + rest 3 + note A#, 1 + rest 3 + note D#, 4 + note G_, 1 + rest 3 + note A#, 1 + rest 3 + note C#, 4 + note G_, 1 + rest 3 + note A#, 1 + rest 3 + note C#, 4 + note G_, 1 + rest 3 + note A#, 1 + rest 3 + note C_, 4 + note F_, 1 + rest 3 + note G#, 1 + rest 3 + note C_, 4 + note F_, 1 + rest 3 + note G#, 1 + rest 3 + sound_ret diff --git a/audio/music/tintower.asm b/audio/music/tintower.asm new file mode 100644 index 0000000..7503067 --- /dev/null +++ b/audio/music/tintower.asm @@ -0,0 +1,292 @@ +Music_TinTower: + channel_count 4 + channel 1, Music_TinTower_Ch1 + channel 2, Music_TinTower_Ch2 + channel 3, Music_TinTower_Ch3 + channel 4, Music_TinTower_Ch4 + +Music_TinTower_Ch1: + tempo 208 + volume 7, 7 + duty_cycle 3 + pitch_offset 4 + vibrato 8, 4, 5 +.mainloop: + stereo_panning TRUE, FALSE + note_type 12, 10, 5 + octave 3 + note G_, 4 + note C_, 4 + note G#, 8 + note G_, 4 + note C_, 4 + octave 2 + note A#, 2 + octave 3 + note C_, 2 + note C#, 2 + octave 2 + note A#, 2 + octave 3 + note G_, 4 + note C_, 4 + note G#, 4 + note F_, 4 + note G_, 4 + octave 2 + note G_, 4 + octave 3 + note G_, 6 + note A#, 2 + note G_, 2 + note F_, 2 + note C#, 2 + note G_, 2 + note G#, 8 + note G_, 4 + octave 4 + note C_, 4 + octave 3 + note G#, 2 + note G_, 2 + note F_, 2 + note G#, 2 + note G_, 2 + note C#, 2 + octave 2 + note A#, 2 + octave 3 + note G_, 2 + note G#, 4 + note F_, 4 + note G_, 4 + octave 2 + note G_, 4 + octave 3 + note G_, 8 + volume_envelope 10, 2 + octave 2 + note G_, 4 + note G_, 12 + note G_, 4 + note G_, 8 + volume_envelope 10, 7 + note G_, 4 + volume_envelope 10, 2 + note G#, 4 + note G#, 8 + volume_envelope 10, 7 + note G_, 4 + volume_envelope 10, 2 + note G#, 4 + note G#, 8 + volume_envelope 10, 7 + note A#, 4 + volume_envelope 10, 2 + note G_, 4 + note G_, 12 + note G_, 4 + note G_, 12 + note G_, 4 + note G_, 12 + note G_, 4 + note G_, 8 + volume_envelope 10, 5 + octave 3 + note A#, 4 + sound_loop 0, .mainloop + +Music_TinTower_Ch2: + duty_cycle 3 + pitch_offset 2 + vibrato 24, 4, 4 +.mainloop: + stereo_panning TRUE, TRUE +.loop1: + note_type 12, 11, 5 + octave 4 + note C_, 4 + note C_, 4 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + note C_, 4 + note F_, 4 + note C#, 4 + octave 3 + note A#, 4 + octave 4 + note C_, 4 + note C_, 4 + note C#, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + note C_, 4 + octave 3 + note C_, 4 + octave 4 + note C_, 8 + stereo_panning FALSE, TRUE + sound_loop 2, .loop1 + volume_envelope 11, 2 + octave 3 + note C_, 4 + note C_, 12 + note C_, 4 + note C_, 8 + volume_envelope 11, 7 + note C_, 4 + volume_envelope 11, 2 + note C#, 4 + note C#, 8 + volume_envelope 11, 7 + note C_, 4 + volume_envelope 11, 2 + note C#, 4 + note C#, 8 + volume_envelope 11, 7 + note D#, 4 + volume_envelope 9, 0 + stereo_panning TRUE, TRUE + note G_, 4 + octave 4 + note C_, 4 + octave 3 + note A#, 2 + note G#, 2 + note G_, 2 + note G#, 2 + note G_, 4 + note C_, 4 + note G_, 8 + note G_, 4 + octave 4 + note C_, 4 + octave 3 + note A#, 2 + octave 4 + note C_, 2 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 4 + octave 3 + note C_, 4 + octave 4 + note C_, 6 + volume_envelope 9, 5 + note C#, 2 + sound_loop 0, .mainloop + +Music_TinTower_Ch3: + note_type 12, 1, 4 +.mainloop: + rest 16 + rest 16 + rest 16 + rest 10 + octave 2 + note G_, 2 + note G#, 2 + note A#, 2 + octave 3 + note C_, 8 + note C#, 8 + note E_, 8 + octave 2 + note A#, 2 + octave 3 + note C_, 2 + note C#, 2 + note D#, 2 + note C_, 8 + note C#, 8 + note E_, 8 + octave 4 + note C_, 8 + octave 3 + note C_, 1 + rest 3 + note C_, 1 + rest 11 + note C_, 1 + rest 3 + note C_, 1 + rest 7 + note C_, 4 + note C#, 1 + rest 3 + note C#, 1 + rest 7 + note C_, 4 + note C#, 1 + rest 3 + note C#, 1 + rest 7 + note D#, 4 + stereo_panning FALSE, TRUE + note C_, 1 + rest 3 + note C_, 1 + rest 11 + note C_, 1 + rest 3 + note C_, 1 + rest 3 + stereo_panning TRUE, TRUE + octave 2 + note A#, 2 + octave 3 + note C_, 2 + note C#, 2 + note D#, 2 + stereo_panning FALSE, TRUE + note C_, 1 + rest 3 + note C_, 1 + rest 11 + note C_, 1 + rest 3 + note C_, 1 + rest 11 + stereo_panning TRUE, TRUE + sound_loop 0, .mainloop + +Music_TinTower_Ch4: + toggle_noise 0 + drum_speed 12 +.mainloop: + stereo_panning FALSE, TRUE + drum_note 8, 2 + stereo_panning TRUE, FALSE + drum_note 8, 1 + drum_note 8, 1 + stereo_panning FALSE, TRUE + drum_note 8, 2 + stereo_panning TRUE, FALSE + drum_note 6, 4 + stereo_panning FALSE, TRUE + drum_note 8, 2 + drum_note 8, 2 + drum_note 6, 2 + stereo_panning TRUE, FALSE + drum_note 8, 2 + stereo_panning FALSE, TRUE + drum_note 8, 1 + drum_note 8, 1 + stereo_panning TRUE, FALSE + drum_note 8, 2 + stereo_panning FALSE, TRUE + drum_note 6, 4 + stereo_panning TRUE, FALSE + drum_note 8, 2 + drum_note 8, 2 + drum_note 6, 2 + sound_loop 0, .mainloop diff --git a/audio/music/titlescreen.asm b/audio/music/titlescreen.asm new file mode 100644 index 0000000..3c3bff5 --- /dev/null +++ b/audio/music/titlescreen.asm @@ -0,0 +1,1170 @@ +Music_TitleScreen: + channel_count 4 + channel 1, Music_TitleScreen_Ch1 + channel 2, Music_TitleScreen_Ch2 + channel 3, Music_TitleScreen_Ch3 + channel 4, Music_TitleScreen_Ch4 + +Music_TitleScreen_Ch1: + tempo 134 + volume 7, 7 + duty_cycle 3 + pitch_offset 2 + vibrato 16, 1, 2 + stereo_panning TRUE, FALSE + note_type 12, 10, 7 + volume_envelope 10, 0 + octave 3 + rest 4 + volume_envelope 10, 7 + octave 2 + note G_, 1 + rest 2 + note A_, 1 + note B_, 8 + note G_, 4 + octave 3 + note C_, 1 + rest 2 + note D_, 1 + note E_, 8 + note C_, 4 + octave 2 + note B_, 1 + rest 2 + octave 3 + note C_, 1 + octave 2 + note B_, 8 + note A_, 4 + note A_, 1 + rest 2 + note B_, 1 + octave 3 + note C_, 6 + note E_, 4 + note F#, 2 + stereo_panning TRUE, TRUE + octave 4 + note G_, 1 + stereo_panning TRUE, FALSE + octave 3 + note D_, 5 + octave 2 + note B_, 2 + octave 3 + note D_, 4 + octave 2 + note B_, 4 + octave 3 + note C_, 6 + note F_, 6 + note C_, 4 + note D_, 6 + volume_envelope 11, 7 + note D#, 1 + note E_, 1 + note F_, 6 + note E_, 1 + note D#, 1 + note D_, 8 + note_type 8, 10, 7 + note C_, 4 + octave 2 + note B_, 4 + octave 3 + note C_, 4 + note D_, 9 + octave 2 + note B_, 3 + octave 3 + note D_, 6 + octave 2 + note B_, 6 + octave 3 + note C_, 3 + note D_, 6 + note E_, 3 + note E_, 4 + note E_, 4 + note C_, 4 + note_type 8, 10, 0 + octave 2 + note B_, 6 + note_type 8, 10, 7 + note B_, 6 + note_type 8, 10, 7 + octave 3 + note F_, 4 + note E_, 4 + note C_, 4 + note_type 8, 10, 0 + note D_, 6 + note_type 8, 10, 7 + note D_, 6 + note_type 8, 10, 7 + rest 3 + octave 2 + note B_, 3 + octave 3 + note C_, 3 + note D_, 3 + note D_, 9 + octave 2 + note B_, 3 + octave 3 + note D_, 6 + octave 2 + note B_, 6 + octave 3 + note C_, 9 + note F_, 9 + note C_, 6 + note D_, 9 + note_type 12, 11, 7 + note D#, 1 + note E_, 1 + note F_, 6 + note E_, 1 + note D#, 1 + note D_, 8 + note_type 8, 10, 7 + note C_, 4 + octave 2 + note B_, 4 + octave 3 + note C_, 4 + note D_, 9 + octave 2 + note B_, 3 + octave 3 + note D_, 9 + note_type 8, 11, 7 + note G_, 3 + note A_, 4 + note G_, 4 + note F_, 4 + note F_, 6 + note E_, 6 + note D_, 9 + note F_, 3 + note G_, 3 + note D_, 6 + note G_, 3 + note_type 8, 5, 4 + octave 2 + note G_, 3 + note B_, 3 + note_type 8, 9, 4 + octave 3 + note D_, 3 + note G_, 3 + tempo 136 + note_type 8, 11, 4 + note F_, 3 + note A_, 3 + note_type 8, 13, 4 + octave 4 + note C_, 3 + note F_, 3 + tempo 138 + note_type 8, 11, 4 + note D_, 9 + note C_, 9 + octave 3 + note A#, 6 + note_type 12, 11, 7 + note F_, 1 + note E_, 1 + note D_, 1 + note E_, 1 + note F_, 4 + octave 4 + note D_, 4 + note F_, 4 + note E_, 6 + octave 3 + note G_, 2 + note_type 8, 11, 7 + note A_, 4 + note G_, 4 + note F_, 4 + note G_, 12 + octave 4 + note C_, 6 + tempo 136 + note C#, 6 + tempo 134 + sound_call .sub1 + octave 4 + note C_, 4 + note C_, 4 + note C#, 4 + sound_call .sub1 + octave 4 + note C_, 4 + note C_, 4 + note C#, 4 + sound_call .sub1 + octave 3 + note E_, 4 + note E_, 4 + note C_, 4 + note_type 12, 10, 0 + note D_, 6 + note_type 12, 10, 7 + note D_, 10 + volume_envelope 10, 0 + note C_, 8 + volume_envelope 10, 7 + note C_, 8 + volume_envelope 10, 0 + octave 2 + note B_, 8 + volume_envelope 10, 7 + note B_, 8 + octave 3 + note C_, 8 + octave 2 + note B_, 8 + octave 3 + note D_, 8 + octave 2 + note B_, 8 + octave 3 + note C_, 8 + note F_, 8 + note A_, 8 + note G_, 6 + note G_, 1 + note F#, 1 + note F_, 8 + note E_, 8 + volume_envelope 10, 0 + note D_, 16 + volume_envelope 10, 7 + note D_, 16 + volume_envelope 10, 3 + octave 2 + note G_, 1 + rest 3 + note G_, 1 + rest 5 + note G_, 1 + note G_, 1 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + note_type 8, 11, 2 + note A_, 2 + note A_, 2 + note A_, 2 + note A_, 2 + note A_, 2 + note F#, 2 + note_type 12, 11, 7 + note G_, 1 + rest 3 + octave 1 + note G_, 1 + rest 11 + sound_ret + +.sub1: + note_type 12, 12, 3 + note D_, 1 +.sub1loop1: + rest 1 + octave 2 + note D_, 1 + octave 1 + note A_, 1 + octave 2 + note D_, 1 + sound_loop 5, .sub1loop1 + rest 1 + note D_, 1 + octave 1 + note A_, 1 + note_type 8, 11, 7 + sound_ret + +Music_TitleScreen_Ch2: + duty_cycle 3 + vibrato 20, 1, 2 + note_type 12, 12, 7 + volume_envelope 10, 4 + octave 1 + note G_, 1 + octave 2 + note D_, 1 + note G_, 1 + octave 3 + note C_, 1 + volume_envelope 12, 2 + octave 3 + note B_, 1 + rest 2 + note A_, 1 + volume_envelope 11, 0 + note G_, 6 + volume_envelope 11, 7 + note G_, 6 + rest 16 + rest 16 + volume_envelope 12, 7 + octave 4 + note C_, 1 + rest 2 + note D_, 1 + note E_, 8 + note F#, 2 + note E_, 1 + note F#, 1 + octave 3 + note G_, 6 + note B_, 2 + octave 4 + note D_, 8 + stereo_panning TRUE, FALSE + volume_envelope 9, 7 + octave 2 + note A_, 4 + note F_, 4 + stereo_panning TRUE, TRUE + volume_envelope 12, 7 + octave 4 + note F_, 6 + note E_, 1 + note D#, 1 + note D_, 8 + stereo_panning TRUE, FALSE + volume_envelope 9, 7 + octave 2 + note A_, 6 + octave 3 + note C_, 2 + stereo_panning FALSE, TRUE + volume_envelope 10, 3 + octave 4 + note D_, 4 + note D_, 2 + note C_, 4 + note C_, 2 + octave 3 + note B_, 4 + stereo_panning TRUE, TRUE + volume_envelope 12, 7 + octave 3 + note G_, 6 + note B_, 2 + octave 4 + note D_, 8 + stereo_panning TRUE, FALSE + volume_envelope 9, 7 + octave 2 + note A_, 2 + note F_, 4 + note A_, 2 + stereo_panning TRUE, TRUE + note_type 8, 12, 7 + octave 4 + note C_, 4 + octave 3 + note B_, 4 + octave 4 + note C_, 4 + note D_, 12 + stereo_panning TRUE, FALSE + note_type 8, 11, 7 + octave 2 + note A_, 9 + stereo_panning FALSE, TRUE + note_type 12, 12, 7 + note G_, 1 + note A_, 1 + note B_, 6 + note E_, 1 + note F#, 1 + note G_, 4 + note_type 12, 4, -3 + note A_, 4 + stereo_panning TRUE, TRUE + note_type 12, 12, 7 + octave 3 + note G_, 6 + note B_, 2 + octave 4 + note D_, 8 + stereo_panning TRUE, FALSE + volume_envelope 9, 7 + octave 2 + note A_, 2 + note F_, 6 + stereo_panning TRUE, TRUE + volume_envelope 12, 7 + octave 4 + note F_, 6 + note E_, 1 + note D#, 1 + note D_, 8 + stereo_panning TRUE, FALSE + volume_envelope 9, 7 + octave 3 + note C_, 2 + octave 2 + note A_, 6 + note B_, 6 + note G_, 2 + note_type 8, 12, 7 + note F_, 4 + note G_, 4 + note F_, 4 + stereo_panning TRUE, TRUE + octave 3 + note G_, 9 + note B_, 3 + octave 4 + note D_, 12 + stereo_panning TRUE, FALSE + note_type 8, 10, 7 + octave 3 + note D_, 4 + note C_, 4 + note D_, 4 + stereo_panning TRUE, TRUE + note_type 8, 12, 7 + octave 4 + note F_, 4 + note E_, 4 + note F_, 4 + note G_, 9 + note A#, 3 + note_type 12, 11, 0 + note G_, 8 + note_type 12, 11, 7 + note G_, 8 + volume_envelope 12, 6 + note A_, 4 + volume_envelope 5, -5 + note A_, 4 + volume_envelope 12, 7 + note A#, 6 + volume_envelope 12, 3 + note F_, 2 + volume_envelope 12, 7 + note F_, 8 + volume_envelope 10, 7 + octave 3 + note A#, 8 + volume_envelope 12, 7 + octave 4 + note A#, 4 + note B_, 4 + octave 5 + note C_, 6 + volume_envelope 12, 3 + octave 4 + note G_, 2 + volume_envelope 12, 7 + note G_, 8 + volume_envelope 10, 7 + octave 3 + note E_, 8 + volume_envelope 12, 7 + octave 5 + note C_, 4 + note C#, 4 + pitch_offset 1 + stereo_panning FALSE, TRUE + sound_call .sub1 + note C#, 4 + sound_call .sub1 + note C#, 4 + sound_call .sub1 + octave 4 + note A_, 4 + stereo_panning TRUE, TRUE + pitch_offset 0 + note_type 12, 11, 0 + octave 3 + note B_, 6 + note_type 12, 11, 7 + note B_, 10 + volume_envelope 12, 7 + note A_, 8 + note F_, 6 + note E_, 1 + note D#, 1 + note D_, 8 + note G_, 8 + note F_, 8 + note A_, 8 + volume_envelope 11, 0 + note G_, 8 + volume_envelope 11, 7 + note G_, 8 + volume_envelope 12, 7 + note F_, 8 + octave 4 + note F_, 6 + note E_, 1 + note D#, 1 + note D_, 8 + octave 2 + note B_, 8 + octave 3 + note C_, 8 + note A_, 6 + note F_, 1 + note A_, 1 + volume_envelope 11, 0 + note G_, 16 + volume_envelope 11, 7 + note G_, 16 + volume_envelope 12, 2 + octave 4 + note G_, 1 + rest 3 + note G_, 1 + rest 5 + note G_, 1 + note G_, 1 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + volume_envelope 9, 0 + note G_, 4 + note_type 8, 12, 2 + octave 3 + note F_, 2 + note F_, 2 + note F_, 2 + note F_, 2 + note F_, 2 + note F#, 2 + note_type 12, 12, 7 + note G_, 1 + rest 3 + octave 2 + note G_, 1 + rest 11 + sound_ret + +.sub1: + note_type 12, 11, 2 + note D_, 1 +.sub1loop1: + octave 3 + note A_, 1 + octave 4 + note D_, 1 + note A_, 1 + note D_, 1 + sound_loop 5, .sub1loop1 + octave 3 + note A_, 1 + octave 4 + note D_, 1 + note A_, 1 + note_type 8, 11, 7 + octave 5 + note C_, 4 + note C_, 4 + sound_ret + +Music_TitleScreen_Ch3: + stereo_panning FALSE, TRUE + vibrato 16, 1, 4 + pitch_offset 1 + note_type 12, 1, 6 + octave 3 + octave 3 + rest 4 + octave 2 + note G_, 2 + note D_, 1 + note C#, 1 + note D_, 1 + rest 1 + note G_, 2 + note D_, 1 + rest 1 + note D_, 2 + note G_, 2 + note D_, 2 + note F_, 2 + note C_, 1 + octave 1 + note B_, 1 + octave 2 + note C_, 1 + rest 1 + note F_, 2 + note C_, 1 + rest 1 + note C_, 2 + note F_, 2 + note C_, 2 + note G_, 2 + note D_, 1 + note C#, 1 + note D_, 1 + rest 1 + note G_, 2 + note D_, 1 + rest 1 + note D_, 2 + note G_, 2 + note D_, 2 + note A_, 2 + note F_, 1 + note E_, 1 + note F_, 1 + rest 1 + note A_, 2 + note F_, 2 + note A_, 4 + octave 3 + note C_, 2 + octave 2 + note G_, 4 + note D_, 2 + note G_, 4 + note D_, 2 + note G_, 2 + note D_, 2 + note A_, 4 + note F_, 2 + note A_, 4 + note F_, 2 + note A_, 2 + octave 3 + note C_, 2 + octave 2 + note B_, 4 + note G_, 2 + note B_, 4 + note G_, 2 + note B_, 2 + note G_, 2 + note G_, 4 + note B_, 2 + note A_, 4 + note B_, 2 + octave 3 + note C_, 4 + octave 2 + note G_, 4 + note D_, 2 + note G_, 4 + note D_, 2 + note G_, 2 + note D_, 2 + note A_, 4 + note F_, 2 + note A_, 4 + note F_, 2 + note A_, 2 + octave 3 + note C_, 2 + octave 2 + note B_, 4 + note G_, 2 + note B_, 4 + note G_, 2 + note B_, 2 + octave 3 + note C_, 2 + octave 2 + note B_, 4 + note G_, 2 + note B_, 4 + note G_, 2 + octave 3 + note D_, 4 + octave 2 + note G_, 4 + note D_, 2 + note G_, 4 + note D_, 2 + note G_, 2 + note D_, 2 + note A_, 4 + note F_, 2 + note A_, 4 + note F_, 2 + note A_, 2 + octave 3 + note C_, 2 + octave 2 + note B_, 4 + note G_, 2 + note B_, 4 + note G_, 2 + note B_, 2 + note G_, 2 + octave 3 + note D_, 4 + octave 2 + note G_, 2 + octave 3 + note D_, 4 + octave 2 + note G_, 2 + octave 3 + note D_, 2 + octave 2 + note A_, 2 + note G_, 4 + note D_, 2 + note G_, 4 + note D_, 2 + note G_, 2 + note D_, 2 + note A_, 4 + note F_, 2 + note A_, 4 + note F_, 2 + note A_, 2 + octave 3 + note C_, 2 + octave 2 + note B_, 4 + note G_, 2 + note B_, 4 + note G_, 2 + octave 3 + note D_, 2 + octave 2 + note G_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + note A_, 2 + note A_, 2 + note F_, 2 + note A_, 2 + octave 3 + note C_, 2 + note D_, 6 + octave 2 + note A#, 6 + octave 3 + note F_, 4 + note A#, 6 + note F_, 6 + note D_, 4 + note E_, 6 + note C_, 6 + note E_, 4 + octave 4 + note C_, 6 + octave 3 + note G_, 6 + note E_, 4 + note D_, 1 + rest 1 + stereo_panning TRUE, TRUE + note_type 12, 1, 6 + pitch_offset 0 + octave 4 + note A_, 2 + octave 5 + note D_, 2 + note A_, 6 + note G_, 2 + note F#, 2 + note D_, 1 + rest 2 + note E_, 1 + note F#, 4 + note_type 8, 1, 6 + octave 3 + note C_, 4 + note C_, 4 + note C#, 4 + note_type 12, 1, 6 + note D_, 1 + rest 1 + octave 4 + note A_, 2 + octave 5 + note D_, 2 + note A_, 6 + note G_, 2 + note F#, 2 + note B_, 1 + rest 2 + note A_, 1 + note A_, 4 + note_type 8, 1, 6 + octave 3 + note C_, 4 + note C_, 4 + note C#, 4 + note_type 12, 1, 6 + note D_, 1 + rest 1 + note_type 12, 1, 6 + octave 4 + note A_, 2 + octave 5 + note D_, 2 + note G_, 6 + note E_, 2 + note G_, 2 + note F#, 1 + note E_, 1 + note D_, 6 + pitch_offset 1 + note_type 8, 1, 6 + octave 3 + note C_, 4 + note C_, 4 + note E_, 2 + note F#, 2 + stereo_panning FALSE, TRUE + note_type 12, 1, 6 + note G_, 16 + note F_, 16 + note G_, 8 + note D_, 6 + note D_, 1 + note E_, 1 + note F_, 2 + note F_, 12 + note E_, 1 + note D#, 1 + note D_, 8 + note G_, 8 + note F_, 8 + note A_, 8 + note G_, 8 + note D_, 6 + note D_, 1 + note E_, 1 + note F_, 16 + note G_, 1 + rest 3 + note G_, 1 + rest 5 + note G_, 1 + note G_, 1 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + note G_, 1 + rest 5 + note G_, 1 + note G_, 1 + note G_, 1 + rest 3 + octave 2 + note G_, 1 + rest 3 + note G_, 1 + rest 5 + note G_, 1 + note G_, 1 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + note G_, 1 + rest 3 + note_type 8, 1, 6 + note F_, 2 + note F_, 2 + note F_, 2 + note F_, 2 + note F_, 2 + note A_, 2 + note_type 12, 1, 6 + note G_, 1 + rest 3 + octave 1 + note G_, 1 + rest 11 + sound_ret + +Music_TitleScreen_Ch4: + toggle_noise 5 + stereo_panning TRUE, FALSE + drum_speed 12 + rest 4 + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 6 + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 3 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 4 + drum_note 4, 2 + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_speed 6 + drum_note 3, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_speed 12 + sound_call .sub1 + sound_call .sub2 + sound_call .sub2 + drum_note 1, 2 + drum_note 4, 2 + drum_note 1, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_speed 6 + drum_note 2, 1 + drum_note 2, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_speed 12 + sound_call .sub1 + drum_note 1, 2 + drum_note 4, 2 + drum_note 1, 2 + drum_note 6, 2 + drum_note 4, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_note 1, 2 + sound_call .sub2 + drum_note 1, 2 + drum_note 4, 2 + drum_note 1, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub2 + drum_note 1, 2 + drum_note 4, 2 + drum_note 1, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_speed 6 + drum_note 2, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_speed 12 + sound_call .sub1 + sound_call .sub2 + drum_note 1, 2 + drum_note 4, 2 + drum_note 1, 2 + drum_note 6, 2 + drum_note 4, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_note 4, 2 + drum_note 1, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_speed 6 + drum_note 3, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_speed 12 + drum_note 10, 2 + drum_note 4, 4 + drum_note 10, 4 + drum_note 4, 2 + drum_note 10, 4 + drum_note 10, 2 + drum_note 4, 4 + drum_note 10, 4 + drum_note 4, 2 + drum_note 10, 2 + drum_note 10, 2 + drum_note 10, 2 + drum_note 4, 4 + drum_note 10, 4 + drum_note 4, 2 + drum_note 10, 4 + drum_note 10, 4 + drum_note 10, 4 + drum_note 10, 2 + drum_note 3, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 1, 1 + drum_note 1, 1 + sound_call .sub3 + sound_call .sub4 + drum_note 2, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_speed 12 + sound_call .sub3 + sound_call .sub4 + drum_note 3, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_speed 12 + sound_call .sub3 + sound_call .sub4 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_speed 12 + drum_note 9, 16 +.loop1: + rest 16 + sound_loop 6, .loop1 + rest 12 + drum_speed 6 + drum_note 3, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_speed 12 + drum_note 1, 4 + drum_note 1, 6 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 4 + drum_note 1, 4 + drum_note 1, 6 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 4 + drum_note 1, 4 + drum_note 1, 6 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 4 + drum_note 1, 4 + drum_note 1, 4 + drum_speed 8 + drum_note 1, 2 + drum_note 1, 2 + drum_note 1, 2 + drum_speed 6 + drum_note 2, 1 + drum_note 2, 1 + drum_note 3, 1 + drum_note 3, 1 + drum_note 2, 1 + drum_note 2, 1 + drum_note 1, 1 + drum_note 1, 1 + drum_speed 12 + drum_note 1, 4 + drum_note 12, 4 + sound_ret + +.sub1: + drum_note 1, 2 + drum_note 4, 2 + drum_note 1, 2 + drum_note 4, 2 + drum_note 6, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_note 4, 2 + sound_ret + +.sub2: + drum_note 1, 2 + drum_note 4, 2 + drum_note 1, 2 + drum_note 6, 2 + drum_note 4, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_note 4, 2 + sound_ret + +.sub3: +.sub3loop1: + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + sound_loop 4, .sub3loop1 + sound_ret + +.sub4: + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_note 1, 2 + drum_note 1, 1 + drum_note 1, 1 + drum_speed 8 + drum_note 1, 4 + drum_note 1, 4 + sound_ret diff --git a/audio/music/trainervictory.asm b/audio/music/trainervictory.asm new file mode 100644 index 0000000..e4b5f4e --- /dev/null +++ b/audio/music/trainervictory.asm @@ -0,0 +1,233 @@ +Music_TrainerVictory: + channel_count 3 + channel 1, Music_TrainerVictory_Ch1 + channel 2, Music_TrainerVictory_Ch2 + channel 3, Music_TrainerVictory_Ch3 + +Music_TrainerVictory_Ch1: + tempo 120 + volume 7, 7 + duty_cycle 2 + pitch_offset 1 + note_type 8, 11, 1 + octave 4 + note E_, 2 + note E_, 2 + note E_, 2 + note E_, 2 + note F#, 2 + note G_, 2 + volume_envelope 11, 6 + note A_, 12 + stereo_panning FALSE, TRUE +.mainloop: +.loop1: + volume_envelope 7, 2 + sound_call .sub1 + volume_envelope 5, 1 + note C#, 2 + note E_, 2 + note F#, 2 + note A_, 2 + note B_, 2 + octave 4 + note C#, 2 + volume_envelope 7, 2 + octave 3 + note A_, 2 + rest 2 + octave 4 + note C#, 2 + note E_, 6 + sound_loop 2, .loop1 + sound_call .sub1 + note A_, 2 + rest 2 + note F_, 2 + note A_, 6 + note A#, 2 + rest 2 + note G_, 2 + note A#, 6 +.loop2: + volume_envelope 7, 2 + octave 4 + note D_, 2 + note C#, 2 + octave 3 + note A_, 2 + sound_loop 3, .loop2 + note F#, 2 + note A_, 2 + octave 4 + note D_, 2 +.loop3: + octave 4 + note C#, 2 + octave 3 + note B_, 2 + note A_, 2 + sound_loop 3, .loop3 + note E_, 2 + note F#, 2 + note G_, 2 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note F#, 2 + rest 2 + note D_, 2 + note F#, 6 + note G_, 2 + rest 2 + note E_, 2 + note G_, 6 + sound_ret + +Music_TrainerVictory_Ch2: + vibrato 18, 3, 4 + duty_cycle 3 + note_type 8, 13, 1 + octave 4 + note A_, 2 + note A_, 2 + note A_, 2 + note A_, 2 + note B_, 2 + octave 5 + note C#, 2 + volume_envelope 13, 6 + note D_, 12 + stereo_panning TRUE, FALSE +.mainloop: +.loop1: + note_type 8, 8, 2 + sound_call .sub1 + note F#, 2 + rest 2 + note G_, 2 + note A_, 6 + note E_, 2 + rest 2 + note F#, 2 + note G_, 6 + sound_loop 2, .loop1 + sound_call .sub1 + note F_, 2 + rest 2 + note C_, 2 + note F_, 6 + note G_, 2 + rest 2 + note D_, 2 + note G_, 6 + note_type 12, 8, 8 + note F#, 16 + note E_, 16 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note D_, 2 + rest 2 + octave 3 + note A_, 2 + octave 4 + note D_, 6 + note E_, 2 + rest 2 + octave 3 + note B_, 2 + octave 4 + note E_, 6 + sound_ret + +Music_TrainerVictory_Ch3: + note_type 8, 2, 5 + octave 3 + note G_, 6 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note F#, 6 + note D_, 2 + note C#, 2 + octave 2 + note B_, 2 +.mainloop: +.loop1: + sound_call .sub1 + octave 3 + note C#, 2 + rest 2 + note C#, 2 + note A_, 2 + note F#, 2 + note C#, 2 + octave 2 + note A_, 2 + rest 2 + octave 3 + note A_, 1 + rest 1 + note A_, 6 + sound_loop 2, .loop1 + sound_call .sub1 + octave 3 + note C_, 2 + rest 2 + note C_, 2 + note A_, 2 + note F_, 2 + note C_, 2 + note D_, 2 + rest 2 + note D_, 2 + octave 4 + note D_, 2 + octave 3 + note A#, 2 + note G_, 2 + note D_, 2 + note F#, 2 + note A_, 2 + octave 4 + note D_, 12 + octave 3 + note A_, 2 + note F#, 2 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note E_, 2 + note A_, 12 + note G_, 2 + note E_, 2 + note C#, 2 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note A_, 2 + rest 2 + note A_, 2 + octave 3 + note F#, 2 + note D_, 2 + octave 2 + note A_, 2 + note B_, 2 + rest 2 + note B_, 2 + octave 3 + note G_, 2 + note E_, 2 + octave 2 + note B_, 2 + sound_ret diff --git a/audio/music/unioncave.asm b/audio/music/unioncave.asm new file mode 100644 index 0000000..d492b7d --- /dev/null +++ b/audio/music/unioncave.asm @@ -0,0 +1,261 @@ +Music_UnionCave: + channel_count 4 + channel 1, Music_UnionCave_Ch1 + channel 2, Music_UnionCave_Ch2 + channel 3, Music_UnionCave_Ch3 + channel 4, Music_UnionCave_Ch4 + +Music_UnionCave_Ch1: + tempo 160 + volume 7, 7 + duty_cycle 1 + pitch_offset 2 + vibrato 24, 3, 4 + stereo_panning FALSE, TRUE +.mainloop: + note_type 12, 11, 3 +.loop1: + sound_call .sub1 + sound_loop 4, .loop1 +.loop2: + octave 2 + note G#, 2 + octave 3 + note C#, 2 + note E_, 4 + note C#, 2 + note E_, 2 + note F_, 4 + sound_loop 8, .loop2 +.loop3: + octave 2 + note A_, 2 + octave 3 + note D_, 2 + note F_, 4 + note D_, 2 + note F_, 2 + note F#, 4 + sound_loop 4, .loop3 + rest 4 + volume_envelope 8, 0 + note F_, 16 + note F#, 16 + note G_, 16 + note F#, 16 + note G_, 8 + note F#, 8 + note F_, 8 + note E_, 8 + note G_, 8 + note F#, 8 + octave 4 + note C_, 8 + octave 3 + note A_, 8 + volume_envelope 9, 5 + pitch_offset 4 + sound_call .sub1 + pitch_offset 8 + sound_call .sub1 + pitch_offset 12 + sound_call .sub1 + pitch_offset 16 + sound_call .sub1 + pitch_offset 2 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note G#, 2 + octave 3 + note C#, 2 + note E_, 12 + sound_ret + +Music_UnionCave_Ch2: + duty_cycle 3 + vibrato 8, 2, 4 +.mainloop: + note_type 12, 12, 4 + sound_call .sub1 + volume_envelope 12, 5 + sound_call .sub1 + volume_envelope 12, 7 + sound_call .sub1 + volume_envelope 12, 4 + note C#, 4 + octave 3 + note B_, 4 + octave 4 + note D_, 2 + note E_, 2 + note C#, 2 + octave 3 + note B_, 2 + octave 4 + note C#, 4 + octave 3 + note B_, 4 + octave 4 + note D_, 8 + octave 3 + note B_, 4 + octave 4 + note D_, 4 + note F#, 2 + note F_, 2 + note C#, 2 + octave 3 + note B_, 2 + octave 4 + note C#, 8 + note D_, 4 + note C#, 4 + rest 4 + volume_envelope 10, 0 + note C_, 16 + note C#, 16 + note D_, 16 + note C#, 16 + note E_, 16 + note D#, 16 + note A#, 16 + note A_, 16 + volume_envelope 10, 5 + vibrato 6, 4, 4 + sound_call .sub2 + vibrato 4, 3, 3 + sound_call .sub2 + vibrato 2, 2, 2 + sound_call .sub2 + vibrato 1, 4, 1 + sound_call .sub2 + vibrato 8, 2, 4 + sound_loop 0, .mainloop + +.sub1: + octave 4 + note C_, 4 + octave 3 + note A#, 4 + octave 4 + note C#, 2 + note D#, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 4 + octave 3 + note A#, 4 + octave 4 + note C#, 8 + octave 3 + note A#, 4 + octave 4 + note C#, 4 + note F_, 2 + note E_, 2 + note C_, 2 + octave 3 + note A#, 2 + octave 4 + note C_, 8 + note C#, 4 + note C_, 4 + sound_ret + +.sub2: + octave 2 + note G#, 2 + octave 3 + note C#, 2 + note E_, 12 + sound_ret + +Music_UnionCave_Ch3: + note_type 12, 1, 6 + stereo_panning TRUE, FALSE +.mainloop: +.loop1: + rest 16 + sound_loop 7, .loop1 + rest 14 + octave 4 + note C_, 2 +.loop2: + rest 2 + octave 3 + note E_, 2 + rest 2 + note E_, 2 + note G#, 2 + note E_, 2 + rest 2 + octave 4 + note C_, 2 + sound_loop 4, .loop2 +.loop3: + rest 2 + octave 3 + note F_, 2 + rest 2 + note F_, 2 + note A_, 2 + note F_, 2 + rest 2 + octave 4 + note C#, 2 + sound_loop 4, .loop3 + rest 4 + note C_, 8 + octave 3 + note B_, 8 + note A#, 8 + note A_, 8 + octave 4 + note C#, 8 + note C_, 8 + octave 3 + note B_, 8 + note A#, 8 +.loop4: + note A_, 4 + note G_, 4 + note A#, 2 + octave 4 + note C_, 2 + octave 3 + note A_, 2 + note G_, 2 + sound_loop 3, .loop4 + note A_, 4 + note G_, 4 + note A#, 8 +.loop5: + rest 16 + sound_loop 4, .loop5 + sound_loop 0, .mainloop + +Music_UnionCave_Ch4: + toggle_noise 1 + drum_speed 12 +.mainloop: + stereo_panning TRUE, FALSE + drum_note 5, 4 + stereo_panning TRUE, TRUE + drum_note 6, 4 + stereo_panning FALSE, TRUE + drum_note 9, 4 + rest 8 + stereo_panning FALSE, TRUE + drum_note 5, 4 + stereo_panning TRUE, TRUE + drum_note 6, 4 + stereo_panning TRUE, FALSE + drum_note 9, 4 + rest 8 + sound_loop 0, .mainloop + + sound_loop 0, .mainloop ; unused diff --git a/audio/music/vermilioncity.asm b/audio/music/vermilioncity.asm new file mode 100644 index 0000000..e52d7cf --- /dev/null +++ b/audio/music/vermilioncity.asm @@ -0,0 +1,338 @@ +Music_VermilionCity: + channel_count 3 + channel 1, Music_VermilionCity_Ch1 + channel 2, Music_VermilionCity_Ch2 + channel 3, Music_VermilionCity_Ch3 + + db $3 ; unused, leftover from a channel 4 + +Music_VermilionCity_Ch1: + stereo_panning FALSE, TRUE + tempo 176 + volume 7, 7 + duty_cycle 2 + note_type 12, 6, 5 + octave 4 + note B_, 4 + note G#, 4 + note F#, 4 + note E_, 4 + note D_, 4 + octave 3 + note B_, 4 + note A_, 2 + note B_, 1 + octave 4 + note D_, 1 + note E_, 1 + note G#, 1 + note B_, 1 + octave 5 + note D_, 1 + vibrato 16, 2, 3 +.mainloop: + duty_cycle 1 + note_type 12, 8, 5 + sound_call .sub1 + note F_, 4 + octave 4 + note D_, 4 + note C#, 4 + note E_, 4 + sound_call .sub1 + sound_call .sub2 + duty_cycle 2 + note_type 12, 8, 5 + sound_call .sub1 + note F_, 4 + octave 4 + note D_, 4 + note E_, 1 + note C#, 1 + octave 3 + note A_, 1 + note E_, 1 + octave 4 + note C#, 1 + octave 3 + note A_, 1 + note E_, 1 + note C_, 1 + sound_call .sub1 + sound_call .sub2 + volume_envelope 9, 3 + duty_cycle 0 + rest 2 + note F#, 2 + rest 2 + note F#, 2 + rest 2 + note F#, 2 + rest 2 + note F#, 2 + sound_call .sub3 + sound_call .sub3 + volume_envelope 8, 7 + duty_cycle 2 + octave 4 + note D_, 8 + octave 3 + note G#, 8 + note E_, 8 + note B_, 8 + note A_, 4 + note G#, 4 + note F#, 4 + note E_, 4 + octave 2 + note B_, 4 + note G#, 4 + note B_, 4 + octave 3 + note D_, 4 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note C#, 4 + note E_, 4 + note F#, 2 + note A_, 2 + note E_, 2 + note G#, 2 + sound_ret + +.sub2: + note D_, 2 + note F_, 2 + note A_, 2 + octave 4 + note D_, 2 + note E_, 2 + note C#, 2 + octave 3 + note A_, 2 + note E_, 2 + sound_ret + +.sub3: + rest 2 + note F#, 2 + note A_, 2 + note F#, 2 + octave 4 + note D_, 2 + octave 3 + note F#, 2 + note A_, 2 + note F#, 2 + rest 2 + note G#, 2 + note B_, 2 + note G#, 2 + octave 4 + note E_, 2 + octave 3 + note G#, 2 + note B_, 2 + note G#, 2 + sound_ret + +Music_VermilionCity_Ch2: + stereo_panning TRUE, TRUE + duty_cycle 3 + note_type 12, 7, 7 + vibrato 16, 2, 3 + octave 5 + note E_, 4 + note D_, 4 + octave 4 + note B_, 4 + note G#, 4 + note F#, 4 + note E_, 4 + note F#, 4 + note G#, 4 +.mainloop: + note_type 12, 9, 7 + sound_call .sub1 + note G#, 2 + sound_call .sub1 + note E_, 2 + volume_envelope 11, 7 + octave 3 + note B_, 4 + octave 4 + note C#, 4 + note D_, 4 + note E_, 4 + sound_call .sub2 + sound_call .sub2 + note F#, 6 + note E_, 1 + note F#, 1 + note E_, 8 + note A_, 6 + note G#, 1 + note A_, 1 + note G#, 8 + note G#, 14 + note_type 6, 5, 7 + rest 1 + octave 4 + note E_, 1 + note G#, 1 + note B_, 1 + note_type 12, 8, 7 + octave 5 + note E_, 16 + sound_loop 0, .mainloop + +.sub1: + octave 1 + note A_, 8 + octave 2 + note F#, 4 + note E_, 4 + note D_, 6 + note C#, 1 + note D_, 1 + note E_, 8 + octave 1 + note A_, 8 + octave 2 + note F#, 4 + note E_, 4 + note D_, 6 + note E_, 1 + note D_, 1 + note C#, 2 + note E_, 2 + octave 1 + note A_, 2 + sound_ret + +.sub2: + note F#, 8 + note B_, 8 + note A_, 4 + note G#, 4 + note F#, 4 + note E_, 4 + sound_ret + +Music_VermilionCity_Ch3: + stereo_panning TRUE, FALSE + vibrato 34, 2, 3 + note_type 12, 2, 5 + octave 2 + note E_, 4 + note B_, 4 + octave 3 + note E_, 4 + note B_, 4 + note D_, 4 + note E_, 4 + note D_, 2 + octave 3 + note B_, 1 + note G#, 1 + note F#, 1 + note E_, 1 + note D_, 1 + octave 2 + note B_, 1 +.mainloop: + note_type 12, 2, 2 + sound_call .sub1 + octave 5 + note A_, 6 + volume_envelope 2, 4 + note E_, 1 + note G#, 1 + sound_call .sub1 + note A_, 8 + volume_envelope 1, 4 + octave 3 + note D_, 4 + note C#, 4 + octave 2 + note B_, 4 + note A_, 4 + octave 3 + note D_, 2 + rest 4 + note D_, 1 + note D_, 1 + sound_call .sub2 + octave 4 + note D_, 2 + octave 3 + note D_, 2 + rest 2 + note D_, 2 + sound_call .sub2 + volume_envelope 2, 5 + octave 3 + note E_, 8 + octave 4 + note E_, 8 + octave 3 + note B_, 8 + octave 4 + note E_, 8 + octave 2 + note E_, 16 + octave 3 + note E_, 14 + volume_envelope 2, 2 + octave 5 + note E_, 1 + note G#, 1 + sound_loop 0, .mainloop + +.sub1: + octave 5 + note A_, 8 + octave 6 + note D_, 4 + note C#, 4 + octave 5 + note B_, 6 + note A_, 1 + note B_, 1 + octave 6 + note C#, 8 + octave 5 + note A_, 8 + octave 6 + note D_, 4 + note C#, 4 + octave 5 + note B_, 6 + octave 6 + note C#, 1 + octave 5 + note B_, 1 + sound_ret + +.sub2: + note A_, 1 + rest 1 + note A_, 2 + rest 2 + note F#, 2 + note E_, 2 + rest 4 + note E_, 1 + note E_, 1 + octave 4 + note E_, 1 + rest 1 + note D_, 2 + rest 2 + octave 3 + note B_, 1 + octave 4 + note C#, 1 + sound_ret diff --git a/audio/music/victoryroad.asm b/audio/music/victoryroad.asm new file mode 100644 index 0000000..ff602ce --- /dev/null +++ b/audio/music/victoryroad.asm @@ -0,0 +1,200 @@ +Music_VictoryRoad: + channel_count 4 + channel 1, Music_VictoryRoad_Ch1 + channel 2, Music_VictoryRoad_Ch2 + channel 3, Music_VictoryRoad_Ch3 + channel 4, Music_VictoryRoad_Ch4 + +Music_VictoryRoad_Ch1: + tempo 144 + volume 7, 7 + stereo_panning FALSE, TRUE + duty_cycle 3 + pitch_offset 2 + note_type 12, 11, 3 +.mainloop: +.loop1: + sound_call .sub1 + sound_loop 6, .loop1 +.loop2: + volume_envelope 11, 2 + octave 2 + note A_, 1 + octave 3 + note C#, 1 + note D_, 1 + rest 1 + octave 2 + note A_, 1 + volume_envelope 11, 7 + octave 3 + note C#, 3 + octave 2 + note A_, 1 + octave 3 + note D_, 3 + octave 2 + note A_, 1 + octave 3 + note G#, 3 + sound_loop 2, .loop2 +.loop3: + sound_call .sub1 + sound_loop 2, .loop3 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 11, 2 + octave 2 + note G_, 1 + note B_, 1 + octave 3 + note C_, 1 + rest 1 + octave 2 + note G_, 1 + volume_envelope 11, 7 + note B_, 3 + note G_, 1 + octave 3 + note C_, 3 + octave 2 + note G_, 1 + octave 3 + note F#, 3 + sound_ret + +Music_VictoryRoad_Ch2: + duty_cycle 3 + vibrato 16, 2, 4 +.mainloop: + note_type 12, 12, 2 + sound_call .sub1 + rest 2 + sound_call .sub1 + rest 1 + octave 4 + note C_, 1 + note_type 12, 11, 0 + note E_, 8 + octave 5 + note C_, 4 + octave 4 + note B_, 4 + note E_, 15 + note D#, 1 + note_type 12, 11, 0 + note E_, 8 + octave 5 + note C_, 4 + octave 4 + note B_, 4 + note_type 12, 11, 0 + octave 5 + note E_, 8 + note_type 12, 11, 7 + note E_, 8 + note_type 12, 12, 7 + note D_, 8 + stereo_panning TRUE, FALSE + note C#, 4 + stereo_panning FALSE, TRUE + octave 4 + note A_, 4 + stereo_panning TRUE, TRUE + octave 5 + note C_, 8 + stereo_panning FALSE, TRUE + octave 4 + note A#, 4 + stereo_panning TRUE, FALSE + note F_, 4 + stereo_panning TRUE, TRUE + note A_, 12 + note D_, 1 + note F#, 1 + note A_, 1 + octave 5 + note C#, 1 + note D_, 16 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note F#, 1 + note F#, 1 + rest 2 + note G#, 1 + note G#, 1 + rest 2 + note A_, 1 + note A_, 1 + sound_ret + +Music_VictoryRoad_Ch3: + stereo_panning TRUE, FALSE + note_type 12, 2, 8 +.mainloop: +.loop1: + sound_call .sub1 + sound_loop 6, .loop1 +.loop2: + note D_, 1 + rest 1 + note B_, 1 + rest 1 + note F_, 1 + note A_, 3 + note D_, 1 + note B_, 1 + rest 2 + note D_, 1 + note B_, 3 + sound_loop 2, .loop2 +.loop3: + sound_call .sub1 + sound_loop 2, .loop3 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note C_, 1 + rest 1 + note A_, 1 + rest 1 + note D#, 1 + note G_, 3 + note C_, 1 + note A_, 1 + rest 2 + note C_, 1 + note A_, 3 + sound_ret + +Music_VictoryRoad_Ch4: + toggle_noise 0 + drum_speed 12 +.mainloop: + drum_note 3, 2 + drum_note 3, 2 + drum_note 4, 1 + drum_note 3, 3 + drum_note 4, 1 + drum_note 3, 3 + drum_note 4, 1 + drum_note 3, 3 + drum_note 3, 2 + drum_note 3, 2 + drum_note 4, 1 + drum_note 3, 3 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 2 + drum_note 4, 1 + drum_note 3, 2 + drum_note 4, 1 + sound_loop 0, .mainloop diff --git a/audio/music/violetcity.asm b/audio/music/violetcity.asm new file mode 100644 index 0000000..44c1b7e --- /dev/null +++ b/audio/music/violetcity.asm @@ -0,0 +1,775 @@ +Music_VioletCity: + channel_count 4 + channel 1, Music_VioletCity_Ch1 + channel 2, Music_VioletCity_Ch2 + channel 3, Music_VioletCity_Ch3 + channel 4, Music_VioletCity_Ch4 + +Music_VioletCity_Ch1: + tempo 164 + volume 7, 7 + vibrato 18, 2, 5 + duty_cycle 2 + note_type 12, 9, 5 + rest 16 + stereo_panning TRUE, FALSE + octave 2 + note E_, 1 + note G#, 1 + note B_, 1 + stereo_panning TRUE, TRUE + octave 3 + note D#, 1 + note G#, 1 + rest 1 + note A#, 4 + note G#, 2 + note F#, 2 + note C#, 2 + stereo_panning FALSE, TRUE + octave 2 + note D#, 1 + note F#, 1 + note A#, 1 + stereo_panning TRUE, TRUE + octave 3 + note C#, 1 + note F#, 1 + rest 1 + note D#, 4 + note G#, 2 + note D#, 2 + octave 2 + note G#, 2 + note C#, 1 + note E_, 1 + note G#, 1 + note B_, 1 + octave 3 + note G#, 1 + rest 1 + octave 2 + note B_, 4 + note_type 6, 9, 1 + octave 3 + note C#, 2 + note F_, 2 + note C#, 2 + note F_, 2 + note G#, 2 + note B_, 2 + volume_envelope 10, 4 + octave 2 + note B_, 8 + rest 4 + octave 3 + note C#, 12 + rest 8 +.mainloop: + note_type 6, 9, 5 + rest 4 + octave 2 + note B_, 2 + octave 3 + note C#, 2 + note D#, 4 + note D#, 2 + note E_, 2 + note D#, 2 + rest 2 + note F#, 2 + rest 2 + note G#, 2 + rest 2 + note B_, 2 + rest 2 + stereo_panning TRUE, FALSE + octave 4 + note C#, 2 + octave 3 + note G#, 2 + note E_, 2 + octave 4 + note C#, 2 + stereo_panning TRUE, TRUE + note C_, 2 + octave 3 + note G#, 2 + note E_, 2 + octave 4 + note C_, 2 + stereo_panning FALSE, TRUE + octave 3 + note B_, 2 + rest 2 + note B_, 2 + rest 2 + note A#, 8 + stereo_panning TRUE, TRUE + rest 4 + note C#, 2 + note E_, 2 + note A#, 4 + note A#, 2 + octave 4 + note C#, 2 + octave 3 + note A#, 2 + rest 2 + note F#, 2 + rest 2 + note E_, 2 + rest 2 + note C#, 2 + rest 2 + stereo_panning FALSE, TRUE + note D#, 8 + stereo_panning TRUE, TRUE + note E_, 8 + stereo_panning TRUE, FALSE + note F_, 2 + rest 2 + note F_, 2 + rest 2 + note F#, 2 + rest 2 + note G_, 4 + stereo_panning TRUE, TRUE + note G#, 2 + note D#, 1 + rest 1 + octave 2 + note B_, 1 + rest 1 + octave 3 + note D#, 1 + rest 1 + note B_, 4 + note G#, 2 + note G#, 2 + note A#, 2 + rest 2 + note A#, 2 + rest 2 + note D#, 4 + note F#, 2 + rest 2 + note_type 12, 9, 5 + rest 8 + octave 4 + note F_, 3 + duty_cycle 1 + note_type 6, 7, 5 + note G#, 1 + note B_, 1 + octave 5 + note D#, 8 + note_type 12, 9, 3 + duty_cycle 2 + rest 16 + note_type 6, 9, 1 + stereo_panning TRUE, FALSE + octave 3 + note E_, 2 + octave 2 + note B_, 2 + note G#, 2 + octave 3 + note E_, 2 + stereo_panning FALSE, TRUE + octave 2 + note B_, 2 + note G#, 2 + note B_, 2 + octave 3 + note E_, 2 + volume_envelope 10, 4 + stereo_panning TRUE, TRUE + note D#, 8 + rest 8 + duty_cycle 3 + volume_envelope 8, 4 + rest 4 + note G_, 2 + note A_, 2 + note B_, 4 + octave 4 + note D_, 4 + note C#, 4 + note_type 8, 8, 4 + octave 3 + note B_, 1 + octave 4 + note C#, 1 + octave 3 + note B_, 1 + note A_, 3 + note_type 12, 8, 4 + note F#, 1 + rest 1 + note F#, 2 + note C#, 1 + rest 1 + note F#, 2 + note D_, 4 + note E_, 4 + note F#, 2 + note B_, 1 + rest 1 + note B_, 1 + octave 4 + note C#, 1 + note D_, 2 + note F#, 2 + note E_, 2 + note_type 8, 8, 4 + note D_, 1 + note E_, 1 + note D_, 1 + note C#, 3 + note_type 12, 8, 4 + octave 3 + note B_, 1 + rest 1 + note A_, 2 + note F#, 1 + rest 1 + note A_, 2 + octave 4 + note E_, 4 + note D_, 4 + note C#, 2 + note G#, 1 + note E_, 1 + octave 3 + note B_, 1 + octave 4 + note E_, 1 + note G#, 1 + rest 1 + note G#, 1 + note A#, 1 + note B_, 4 + rest 4 + note G#, 1 + note F_, 1 + octave 3 + note B_, 1 + octave 4 + note F_, 1 + note G#, 1 + rest 1 + note G#, 1 + note A#, 1 + note B_, 4 + rest 4 + note C#, 1 + octave 3 + note B_, 1 + note F#, 1 + octave 4 + note C#, 1 + octave 3 + note B_, 1 + note F#, 1 + octave 4 + note C#, 1 + octave 3 + note B_, 1 + note F#, 1 + note C#, 1 + note F#, 1 + note A#, 1 + octave 4 + note C#, 1 + note F#, 1 + note A#, 1 + octave 5 + note C#, 1 + duty_cycle 2 + octave 4 + note C#, 6 + note C_, 1 + octave 3 + note B_, 1 + octave 4 + note C#, 4 + rest 4 + sound_loop 0, .mainloop + +Music_VioletCity_Ch2: + vibrato 18, 2, 4 + duty_cycle 2 + note_type 12, 12, 7 + rest 16 + octave 3 + note G#, 1 + rest 1 + note A#, 1 + rest 1 + note B_, 1 + rest 1 + octave 4 + note D#, 4 + note C#, 2 + octave 3 + note A#, 2 + note G#, 2 + note F#, 1 + rest 1 + note G#, 1 + rest 1 + note A#, 1 + rest 1 + octave 4 + note C#, 4 + octave 3 + note B_, 2 + note A#, 2 + note B_, 2 + note G#, 1 + rest 1 + note A#, 1 + rest 1 + note B_, 1 + rest 1 + note G#, 4 + note A#, 2 + note B_, 2 + octave 4 + note C#, 2 + note D#, 2 + octave 3 + note F#, 2 + octave 4 + note D#, 1 + rest 1 + note C#, 6 + rest 2 + note D#, 1 + note E_, 1 +.mainloop: + volume_envelope 11, 7 + note F#, 4 + rest 2 + note F#, 1 + note G#, 1 + note F#, 1 + rest 1 + note E_, 1 + rest 1 + note D#, 1 + rest 1 + note F#, 1 + rest 1 + note E_, 14 + note C#, 1 + note D#, 1 + note E_, 4 + rest 2 + note E_, 1 + note F#, 1 + note E_, 1 + rest 1 + note D#, 1 + rest 1 + note C#, 1 + rest 1 + note E_, 1 + rest 1 + note D#, 12 + rest 2 + octave 3 + note B_, 1 + octave 4 + note C#, 1 + note D#, 4 + rest 2 + note D#, 1 + note E_, 1 + note D#, 1 + rest 1 + note C#, 1 + rest 1 + octave 3 + note B_, 2 + octave 4 + note C#, 1 + rest 1 + note D#, 4 + note G#, 4 + note B_, 3 + rest 3 + note C#, 1 + note D#, 1 + note E_, 2 + octave 3 + note G#, 2 + note B_, 2 + octave 4 + note E_, 2 + note D#, 1 + octave 3 + note F#, 1 + note B_, 1 + octave 4 + note D#, 1 + note C#, 1 + octave 3 + note E_, 1 + note A#, 1 + octave 4 + note C#, 1 + octave 3 + note B_, 12 + rest 4 + volume_envelope 10, 7 + duty_cycle 3 + rest 2 + note B_, 1 + octave 4 + note C#, 1 + note D_, 2 + note F#, 2 + note E_, 2 + note_type 8, 10, 7 + note D_, 1 + note E_, 1 + note D_, 1 + note C#, 3 + note_type 12, 10, 7 + octave 3 + note B_, 1 + rest 1 + note A_, 2 + note F#, 1 + rest 1 + note A_, 2 + octave 4 + note E_, 4 + note D_, 4 + note C#, 2 + rest 2 + note G_, 1 + note A_, 1 + note B_, 2 + octave 5 + note D_, 2 + note C#, 2 + note_type 8, 10, 7 + octave 4 + note B_, 1 + octave 5 + note C#, 1 + octave 4 + note B_, 1 + note A_, 3 + note_type 12, 10, 7 + note G_, 1 + rest 1 + note F#, 2 + note C#, 1 + rest 1 + note F#, 2 + vibrato 0, 0, 0 + volume_envelope 8, 7 + octave 5 + note E_, 4 + note F#, 4 + note D_, 1 + note E_, 1 + note F#, 12 + rest 2 + note D_, 1 + note E_, 1 + note F#, 12 + rest 2 + octave 4 + note A#, 1 + note B_, 1 + octave 5 + note C#, 11 + rest 5 + vibrato 18, 2, 4 + volume_envelope 10, 7 + duty_cycle 2 + octave 4 + note A#, 6 + note A_, 1 + note G#, 1 + note F#, 4 + rest 2 + note D#, 1 + note E_, 1 + sound_loop 0, .mainloop + +Music_VioletCity_Ch3: + note_type 12, 2, 5 + rest 16 + rest 6 + octave 4 + note E_, 4 + rest 6 + rest 6 + octave 3 + note G#, 4 + rest 6 + rest 6 + note F_, 4 + rest 6 + octave 2 + note F#, 4 + octave 3 + note C#, 1 + rest 1 + note A#, 4 + note A_, 1 + note G#, 1 + note F#, 2 + octave 2 + note A#, 2 +.mainloop: + note_type 12, 2, 5 + note B_, 1 + rest 5 + note B_, 1 + note B_, 1 + rest 2 + note B_, 1 + rest 1 + octave 3 + note F#, 2 + octave 2 + note F#, 1 + rest 1 + octave 3 + note C#, 1 + rest 5 + note C#, 1 + note C#, 1 + rest 2 + note C#, 1 + rest 1 + note G#, 2 + octave 2 + note G#, 1 + rest 1 + note F#, 1 + rest 5 + note F#, 1 + note F#, 1 + note F#, 1 + rest 1 + note F#, 1 + rest 1 + octave 3 + note F#, 2 + note C#, 1 + rest 1 + octave 2 + note B_, 1 + rest 5 + note B_, 1 + note B_, 1 + rest 2 + note B_, 1 + rest 1 + octave 3 + note B_, 4 + note G#, 1 + rest 5 + note G#, 1 + note G#, 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note F#, 2 + note F#, 1 + rest 1 + note_type 6, 2, 5 + octave 3 + note C#, 2 + note F_, 2 + note G#, 2 + note B_, 2 + octave 4 + note C#, 2 + note F_, 2 + note G#, 2 + note B_, 2 + octave 4 + note C#, 6 + note_type 12, 2, 5 + rest 5 + note_type 6, 2, 5 + octave 2 + note E_, 2 + rest 10 + note E_, 2 + note E_, 2 + note F#, 2 + rest 2 + note F#, 2 + rest 2 + octave 3 + note C#, 4 + note C_, 4 + octave 2 + note B_, 2 + rest 10 + note B_, 2 + note B_, 2 + rest 4 + note B_, 2 + rest 2 + note A_, 8 + sound_call .sub1 + note F#, 2 + rest 10 + note B_, 2 + note B_, 2 + note B_, 2 + rest 2 + note A#, 8 + note A_, 2 + rest 2 + sound_call .sub1 + note F#, 2 + rest 10 + note B_, 2 + note B_, 2 + note B_, 2 + rest 2 + note A#, 8 + note A_, 2 + rest 2 + octave 3 + note E_, 2 + rest 10 + note E_, 2 + note E_, 2 + rest 4 + note E_, 2 + rest 2 + note B_, 4 + note G#, 2 + note F#, 2 + note F_, 2 + rest 10 + note F_, 2 + note F_, 2 + rest 4 + note F_, 2 + rest 2 + octave 4 + note C#, 4 + octave 3 + note A#, 2 + note G#, 2 + note F#, 2 + rest 10 + note F#, 2 + note F#, 2 + octave 2 + note F#, 2 + rest 2 + note F#, 2 + rest 2 + octave 3 + note F#, 4 + octave 2 + note F#, 2 + note G#, 2 + octave 3 + note F#, 12 + note G#, 2 + note A_, 2 + note A#, 8 + rest 4 + octave 2 + note A#, 4 + sound_loop 0, .mainloop + +.sub1: + note G_, 2 + rest 10 + note G_, 2 + note G_, 2 + note A_, 2 + rest 2 + note A_, 2 + rest 2 + octave 3 + note E_, 4 + octave 2 + note A_, 4 + sound_ret + +Music_VioletCity_Ch4: + toggle_noise 3 + drum_speed 12 + drum_note 4, 2 + drum_note 3, 2 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 2 + drum_note 3, 4 + drum_note 7, 4 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + drum_note 3, 2 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 2 + drum_note 1, 8 + drum_note 4, 2 +.mainloop: + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_call .sub2 + sound_loop 0, .mainloop + +.sub1: + drum_note 3, 1 + drum_note 3, 1 + drum_note 4, 1 + drum_note 4, 1 + drum_note 3, 2 + drum_note 8, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 7, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + sound_ret + +.sub2: + drum_note 4, 2 + drum_note 8, 1 + drum_note 8, 1 + drum_note 8, 1 + rest 1 + drum_note 4, 1 + drum_note 4, 1 + rest 2 + drum_note 4, 2 + drum_note 3, 2 + drum_note 4, 2 + sound_ret diff --git a/audio/music/viridiancity.asm b/audio/music/viridiancity.asm new file mode 100644 index 0000000..6bc7200 --- /dev/null +++ b/audio/music/viridiancity.asm @@ -0,0 +1,783 @@ +Music_ViridianCity: + channel_count 4 + channel 1, Music_ViridianCity_Ch1 + channel 2, Music_ViridianCity_Ch2 + channel 3, Music_ViridianCity_Ch3 + channel 4, Music_ViridianCity_Ch4 + +Music_ViridianCity_Ch1: + tempo 157 + volume 7, 7 + stereo_panning FALSE, TRUE + duty_cycle 2 + vibrato 18, 3, 4 + note_type 12, 10, 7 + octave 3 + note F#, 1 + rest 3 + note F#, 2 + rest 4 + note F#, 2 + rest 2 + note F#, 1 + rest 1 + note F#, 4 + rest 2 + octave 4 + note D_, 2 + rest 2 + octave 3 + note A_, 2 + rest 2 + note F#, 1 + rest 1 + note F#, 1 + rest 3 + note F#, 2 + rest 4 + note F#, 2 + rest 2 + note G_, 1 + rest 1 + rest 4 + note G_, 8 + rest 4 +.mainloop: + sound_call .sub1 + rest 4 + sound_call .sub1 + octave 4 + note C_, 4 + sound_call .sub2 + octave 4 + note B_, 2 + note G_, 2 + note D_, 2 + octave 3 + note B_, 2 + note F#, 2 + note E_, 2 + note F#, 1 + rest 1 + note A_, 1 + rest 3 + note F#, 2 + note A_, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + rest 2 + octave 3 + note A_, 1 + rest 1 + octave 4 + note C#, 1 + rest 1 + note F#, 1 + rest 1 + volume_envelope 8, 7 + octave 5 + note F#, 4 + note F_, 4 + volume_envelope 10, 7 + octave 3 + note G_, 6 + note B_, 8 + octave 4 + note E_, 2 + rest 2 + note E_, 2 + octave 3 + note B_, 4 + note G_, 2 + note F#, 2 + note E_, 4 + note D_, 2 + octave 2 + note A_, 2 + octave 3 + note D_, 1 + rest 1 + note F#, 1 + rest 3 + note D_, 2 + note F#, 1 + rest 1 + note A_, 1 + rest 1 + rest 2 + note F#, 2 + note A_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + note D#, 2 + note C_, 2 + octave 3 + note B_, 2 + note A_, 2 + sound_call .sub2 + octave 4 + note A_, 2 + note G_, 2 + note D_, 2 + note G_, 2 + octave 3 + note F#, 2 + note E_, 2 + note F#, 1 + rest 1 + note A_, 1 + rest 3 + note F#, 2 + note A_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + rest 2 + note E_, 2 + rest 2 + note C_, 2 + rest 2 + octave 3 + note A_, 2 + rest 2 + note F#, 2 + note G_, 6 + note B_, 1 + rest 1 + octave 4 + note E_, 4 + note F#, 2 + note G_, 6 + note E_, 2 + rest 2 + octave 3 + note G_, 2 + octave 4 + note E_, 2 + rest 2 + note F#, 6 + note D_, 4 + octave 3 + note A_, 4 + note F#, 4 + note G_, 1 + rest 3 + note G_, 8 + note A#, 4 + sound_loop 0, .mainloop + +.sub1: + octave 3 + note A_, 1 + rest 3 + note A_, 2 + rest 4 + note A_, 2 + rest 2 + note A_, 1 + rest 1 + octave 4 + note C_, 4 + rest 2 + octave 3 + note A_, 2 + rest 2 + octave 4 + note C_, 2 + octave 3 + note A_, 1 + rest 1 + octave 4 + note C_, 1 + rest 1 + octave 3 + note B_, 1 + rest 3 + note G_, 2 + rest 4 + note G_, 2 + rest 2 + octave 4 + note D_, 2 + rest 2 + octave 3 + note B_, 2 + rest 2 + note G_, 1 + rest 1 + note G_, 4 + rest 2 + note B_, 1 + rest 1 + octave 4 + note D_, 1 + rest 3 + note D_, 2 + rest 4 + note D_, 2 + rest 2 + note D_, 1 + rest 1 + octave 3 + note G_, 4 + rest 2 + octave 4 + note C#, 1 + rest 1 + note E_, 1 + rest 1 + note D_, 4 + note C#, 1 + rest 1 + octave 3 + note A_, 1 + rest 3 + note F#, 2 + rest 4 + note F#, 2 + rest 2 + note G_, 1 + rest 1 + rest 4 + note G_, 8 + sound_ret + +.sub2: + octave 3 + note B_, 2 + note D_, 2 + note G_, 1 + rest 1 + note B_, 1 + rest 3 + note G_, 2 + note B_, 1 + rest 1 + octave 4 + note D_, 1 + rest 1 + rest 2 + octave 3 + note B_, 2 + octave 4 + note D_, 1 + rest 1 + note G_, 1 + rest 1 + sound_ret + +Music_ViridianCity_Ch2: + vibrato 16, 4, 6 + duty_cycle 1 + note_type 12, 11, 7 + stereo_panning TRUE, FALSE + octave 2 + note D_, 4 + rest 2 + note A_, 1 + rest 1 + note A_, 4 + rest 4 + note D_, 4 + rest 2 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + octave 3 + note C#, 4 + octave 2 + note A_, 1 + rest 1 + note D_, 4 + rest 2 + note A_, 1 + rest 1 + note A_, 4 + rest 2 + note E_, 1 + rest 1 + rest 4 + note E_, 8 + rest 4 +.mainloop: + sound_call .sub1 + rest 4 + sound_call .sub1 + octave 2 + note F#, 4 + sound_call .sub2 + note G_, 4 + rest 2 + octave 3 + note D_, 1 + rest 1 + octave 2 + note G_, 1 + rest 1 + octave 3 + note D_, 4 + octave 2 + note B_, 2 + sound_call .sub3 + rest 2 + note F#, 2 + rest 2 + octave 3 + note C#, 1 + rest 1 + note C#, 4 + note C_, 4 + sound_call .sub4 + note E_, 4 + rest 2 + note B_, 1 + rest 1 + note E_, 2 + note B_, 2 + note G_, 4 + note D_, 4 + rest 2 + note A_, 1 + rest 1 + note A_, 4 + note C_, 2 + note C#, 2 + rest 2 + note D#, 2 + note A_, 1 + rest 1 + octave 3 + note C_, 1 + rest 1 + note D#, 2 + note C_, 2 + octave 2 + note A_, 2 + note F#, 2 + sound_call .sub2 + note G_, 4 + rest 2 + note B_, 1 + rest 1 + note G_, 1 + rest 1 + note B_, 4 + note G_, 2 + sound_call .sub3 + rest 2 + note F#, 2 + rest 2 + note A_, 2 + rest 2 + octave 3 + note C_, 2 + rest 2 + octave 2 + note D#, 2 + sound_call .sub4 + note E_, 4 + rest 2 + note A#, 1 + rest 1 + note A#, 4 + rest 2 + note G_, 1 + rest 1 + note D_, 4 + rest 2 + note A_, 1 + rest 1 + note A_, 4 + rest 2 + note D_, 1 + rest 1 + note E_, 1 + rest 3 + note E_, 8 + octave 1 + note A_, 4 + sound_loop 0, .mainloop + +.sub1: + octave 2 + note D_, 4 + rest 2 + note A_, 1 + rest 1 + note A_, 4 + rest 4 + note D#, 4 + rest 2 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + octave 3 + note C_, 4 + octave 2 + note A_, 1 + rest 1 + note E_, 4 + rest 2 + note B_, 1 + rest 1 + note B_, 4 + rest 4 + note E_, 4 + rest 2 + note B_, 1 + rest 1 + note B_, 1 + rest 1 + octave 3 + note D_, 4 + octave 2 + note B_, 1 + rest 1 + note G_, 4 + rest 2 + octave 3 + note D_, 1 + rest 1 + note D_, 4 + rest 4 + octave 2 + note A_, 4 + rest 2 + octave 3 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note G_, 4 + note E_, 1 + rest 1 + octave 2 + note D_, 4 + rest 2 + note A_, 1 + rest 1 + note A_, 4 + rest 2 + note E_, 1 + rest 1 + rest 4 + note E_, 8 + sound_ret + +.sub2: + note G_, 4 + rest 2 + octave 3 + note D_, 1 + rest 1 + note D_, 4 + octave 2 + note F_, 2 + note F#, 2 + sound_ret + +.sub3: + note F#, 4 + rest 2 + octave 3 + note C#, 1 + rest 1 + note C#, 4 + octave 2 + note E_, 2 + note F_, 2 + sound_ret + +.sub4: + octave 2 + note E_, 4 + rest 2 + note B_, 1 + rest 1 + note B_, 4 + note D_, 2 + note D#, 2 + sound_ret + +Music_ViridianCity_Ch3: + vibrato 18, 2, 4 + note_type 12, 1, 3 + stereo_panning TRUE, TRUE + octave 4 + note A_, 1 + rest 3 + note A_, 2 + rest 4 + note A_, 2 + rest 2 + note A_, 1 + rest 1 + note A_, 4 + rest 2 + octave 5 + note F#, 2 + rest 2 + note C#, 2 + rest 2 + octave 4 + note A_, 1 + rest 1 + note A_, 1 + rest 3 + note A_, 2 + rest 4 + note A_, 2 + rest 2 + octave 5 + note D_, 1 + rest 1 + rest 4 + note D_, 8 + note F#, 2 + note G_, 2 +.mainloop: + volume_envelope 1, 3 + sound_call .sub1 + octave 5 + note F#, 2 + note G_, 2 + sound_call .sub1 + note E_, 4 + vibrato 24, 2, 5 + volume_envelope 2, 5 + note B_, 12 + note G_, 4 + octave 6 + note D_, 8 + note E_, 2 + note D_, 2 + note C#, 2 + octave 5 + note B_, 2 + note A_, 12 + note F#, 4 + note A_, 8 + note A_, 4 + note G#, 4 + note E_, 10 + note E_, 2 + note F#, 2 + note G_, 2 + rest 2 + note G_, 2 + note F#, 4 + note E_, 4 + note G_, 4 + note F#, 12 + note D_, 4 + note A_, 4 + rest 4 + octave 6 + note C_, 8 + octave 5 + note B_, 12 + octave 6 + note C#, 2 + note D_, 2 + note E_, 2 + rest 2 + note D_, 2 + rest 2 + note C#, 2 + rest 2 + octave 5 + note B_, 2 + rest 2 + note A_, 10 + note A_, 2 + note B_, 2 + octave 6 + note C_, 2 + rest 2 + octave 5 + note B_, 2 + rest 2 + note A_, 2 + rest 2 + note F#, 2 + rest 2 + note G_, 12 + note G_, 2 + note A_, 2 + note A#, 6 + note A_, 2 + rest 2 + note G_, 2 + note A#, 2 + rest 2 + note A_, 14 + rest 4 + note D_, 1 + rest 3 + note D_, 8 + note E_, 4 + sound_loop 0, .mainloop + +.sub1: + octave 5 + note A_, 2 + rest 2 + note G_, 2 + rest 2 + note F#, 2 + rest 6 + rest 2 + note F#, 2 + note G_, 2 + note A_, 2 + rest 2 + note A_, 2 + note G_, 2 + note F#, 2 + note G_, 2 + note E_, 2 + octave 4 + note B_, 2 + rest 4 + note B_, 2 + rest 2 + octave 5 + note G_, 2 + rest 2 + note D_, 2 + rest 2 + octave 4 + note B_, 1 + rest 1 + note B_, 4 + octave 5 + note E_, 2 + note F#, 2 + note G_, 2 + rest 2 + note F#, 2 + rest 2 + note E_, 2 + rest 6 + rest 2 + note E_, 2 + note F#, 2 + note G_, 2 + rest 2 + note G_, 2 + note F#, 2 + note E_, 2 + note F#, 2 + note D_, 2 + octave 4 + note A_, 2 + rest 4 + note A_, 2 + rest 2 + octave 5 + note D_, 1 + rest 1 + rest 4 + note D_, 8 + sound_ret + +Music_ViridianCity_Ch4: + toggle_noise 3 + drum_speed 12 + sound_call .sub1 + sound_call .sub2 +.mainloop: + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub1 + sound_call .sub1 + sound_call .sub1 + sound_call .sub2 + sound_call .sub3 + sound_call .sub4 + sound_call .sub3 + sound_call .sub3 + sound_call .sub3 + sound_call .sub4 + sound_call .sub3 + sound_call .sub3 + sound_loop 0, .mainloop + +.sub1: + drum_note 5, 2 + drum_note 5, 2 + drum_note 3, 2 + drum_note 5, 4 + drum_note 3, 2 + drum_note 5, 2 + drum_note 7, 2 + drum_note 5, 2 + drum_note 5, 2 + drum_note 3, 4 + drum_note 5, 2 + drum_note 3, 2 + drum_note 5, 2 + drum_note 7, 2 + sound_ret + +.sub2: + drum_note 5, 2 + drum_note 5, 2 + drum_note 3, 2 + drum_note 5, 4 + drum_note 3, 2 + drum_note 5, 2 + drum_note 7, 2 + drum_note 5, 2 + drum_note 5, 2 + drum_note 7, 4 + drum_note 3, 2 + drum_note 3, 2 + drum_note 11, 2 + drum_note 11, 2 + sound_ret + +.sub3: + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 4 + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 4, 2 + sound_ret + +.sub4: + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 4 + drum_note 4, 2 + drum_note 7, 2 + drum_note 3, 2 + drum_note 4, 2 + drum_note 4, 2 + drum_note 3, 2 + drum_note 3, 2 + drum_note 7, 2 + sound_ret diff --git a/audio/music/wildpokemonvictory.asm b/audio/music/wildpokemonvictory.asm new file mode 100644 index 0000000..9515951 --- /dev/null +++ b/audio/music/wildpokemonvictory.asm @@ -0,0 +1,183 @@ +Music_WildPokemonVictory: + channel_count 3 + channel 1, Music_WildPokemonVictory_Ch1 + channel 2, Music_WildPokemonVictory_Ch2 + channel 3, Music_WildPokemonVictory_Ch3 + +Music_WildPokemonVictory_Ch1: + tempo 126 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 + note_type 12, 11, 1 + octave 3 + note B_, 1 + note A_, 1 + note G#, 1 + note F#, 1 + volume_envelope 11, 6 + note E_, 12 +.body: + stereo_panning FALSE, TRUE +.mainloop: + sound_call .sub1 + note F#, 2 + note F#, 2 + note F#, 4 + sound_call .sub1 + note G#, 4 + volume_envelope 7, 8 + octave 3 + note G_, 4 + transpose 0, 1 + sound_call .sub1 + note F#, 2 + note F#, 2 + note F#, 4 + sound_call .sub1 + note G#, 4 + transpose 0, 0 + volume_envelope 7, 8 + octave 3 + note F#, 4 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 7, 1 + octave 3 + note G#, 1 + note B_, 1 + octave 4 + note E_, 2 + octave 3 + note B_, 2 + octave 4 + note E_, 2 + octave 3 + note G#, 1 + note F#, 1 + note E_, 1 + note F#, 1 + note G#, 2 + note E_, 2 + note A_, 1 + octave 4 + note C#, 1 + note E_, 2 + note E_, 2 + note A_, 2 + sound_ret + +Music_WildPokemonVictory_Ch2: + vibrato 18, 2, 4 + duty_cycle 2 + note_type 12, 13, 1 + octave 4 + note E_, 1 + note F#, 1 + note G#, 1 + note A_, 1 + volume_envelope 13, 6 + note B_, 12 +.body: + stereo_panning TRUE, FALSE +.mainloop: + sound_call .sub1 + octave 4 + note B_, 2 + note B_, 2 + note B_, 4 + sound_call .sub1 + octave 4 + note B_, 4 + volume_envelope 8, 1 + note C_, 1 + note E_, 1 + note G_, 1 + note A#, 1 + transpose 0, 1 + sound_call .sub1 + octave 4 + note B_, 2 + note B_, 2 + note B_, 4 + sound_call .sub1 + octave 4 + note B_, 4 + transpose 0, 0 + volume_envelope 8, 1 + octave 3 + note B_, 1 + octave 4 + note D#, 1 + note F#, 1 + note A_, 1 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 8, 1 + octave 4 + note B_, 2 + note A_, 2 + note G#, 2 + note A_, 2 + note B_, 2 + note B_, 2 + note B_, 4 + octave 5 + note C#, 2 + note C#, 2 + note C#, 4 + sound_ret + +Music_WildPokemonVictory_Ch3: + note_type 12, 2, 0 + rest 6 + octave 6 + note D#, 1 + rest 1 + note E_, 1 + rest 3 + note E_, 1 + rest 3 +.body: +.mainloop: + sound_call .sub1 + note D#, 2 + note C#, 2 + octave 2 + note B_, 2 + rest 2 + sound_call .sub1 + note E_, 2 + rest 2 + note C_, 4 + transpose 0, 1 + sound_call .sub1 + note D#, 2 + note C#, 2 + octave 2 + note B_, 2 + rest 2 + sound_call .sub1 + note E_, 2 + rest 2 + transpose 0, 0 + octave 2 + note B_, 4 + sound_loop 0, .mainloop + +.sub1: + volume_envelope 2, 5 + octave 3 + note E_, 2 + rest 4 + note E_, 2 + rest 2 + note D_, 2 + rest 2 + note D_, 2 + note C#, 2 + rest 4 + note C#, 2 + sound_ret diff --git a/audio/music_pointers.asm b/audio/music_pointers.asm new file mode 100644 index 0000000..f3124c7 --- /dev/null +++ b/audio/music_pointers.asm @@ -0,0 +1,110 @@ +; See song sections in audio.asm. + +Music: +; entries correspond to MUSIC_* constants + table_width 3, Music + dba Music_Nothing + dba Music_TitleScreen + dba Music_Route1 + dba Music_Route3 + dba Music_Route12 + dba Music_MagnetTrain + dba Music_KantoGymBattle + dba Music_KantoTrainerBattle + dba Music_KantoWildBattle + dba Music_PokemonCenter + dba Music_LookHiker + dba Music_LookLass + dba Music_LookOfficer + dba Music_HealPokemon + dba Music_LavenderTown + dba Music_Route2 + dba Music_MtMoon + dba Music_ShowMeAround + dba Music_GameCorner + dba Music_Bicycle + dba Music_HallOfFame + dba Music_ViridianCity + dba Music_CeladonCity + dba Music_TrainerVictory + dba Music_WildPokemonVictory + dba Music_GymLeaderVictory + dba Music_MtMoonSquare + dba Music_Gym + dba Music_PalletTown + dba Music_ProfOaksPokemonTalk + dba Music_ProfOak + dba Music_LookRival + dba Music_AfterTheRivalFight + dba Music_Surf + dba Music_Evolution + dba Music_NationalPark + dba Music_Credits + dba Music_AzaleaTown + dba Music_CherrygroveCity + dba Music_LookKimonoGirl + dba Music_UnionCave + dba Music_JohtoWildBattle + dba Music_JohtoTrainerBattle + dba Music_Route30 + dba Music_EcruteakCity + dba Music_VioletCity + dba Music_JohtoGymBattle + dba Music_ChampionBattle + dba Music_RivalBattle + dba Music_RocketBattle + dba Music_ElmsLab + dba Music_DarkCave + dba Music_Route29 + dba Music_Route36 + dba Music_SSAqua + dba Music_LookYoungster + dba Music_LookBeauty + dba Music_LookRocket + dba Music_LookPokemaniac + dba Music_LookSage + dba Music_NewBarkTown + dba Music_GoldenrodCity + dba Music_VermilionCity + dba Music_PokemonChannel + dba Music_PokeFluteChannel + dba Music_TinTower + dba Music_SproutTower + dba Music_BurnedTower + dba Music_Lighthouse + dba Music_LakeOfRage + dba Music_IndigoPlateau + dba Music_Route37 + dba Music_RocketHideout + dba Music_DragonsDen + dba Music_JohtoWildBattleNight + dba Music_RuinsOfAlphRadio + dba Music_SuccessfulCapture + dba Music_Route26 + dba Music_Mom + dba Music_VictoryRoad + dba Music_PokemonLullaby + dba Music_PokemonMarch + dba Music_GoldSilverOpening + dba Music_GoldSilverOpening2 + dba Music_MainMenu + dba Music_RuinsOfAlphInterior + dba Music_RocketTheme + dba Music_DancingHall + dba Music_ContestResults + dba Music_BugCatchingContest + dba Music_LakeOfRageRocketRadio + dba Music_Printer + dba Music_PostCredits +; new to Crystal + dba Music_Clair + dba Music_MobileAdapterMenu + dba Music_MobileAdapter + dba Music_BuenasPassword + dba Music_LookMysticalMan + dba Music_CrystalOpening + dba Music_BattleTowerTheme + dba Music_SuicuneBattle + dba Music_BattleTowerLobby + dba Music_MobileCenter + assert_table_length NUM_MUSIC_SONGS diff --git a/audio/notes.asm b/audio/notes.asm new file mode 100644 index 0000000..e1d6931 --- /dev/null +++ b/audio/notes.asm @@ -0,0 +1,29 @@ +FrequencyTable: + table_width 2, FrequencyTable + dw 0 ; __ + dw $f82c ; C_ + dw $f89d ; C# + dw $f907 ; D_ + dw $f96b ; D# + dw $f9ca ; E_ + dw $fa23 ; F_ + dw $fa77 ; F# + dw $fac7 ; G_ + dw $fb12 ; G# + dw $fb58 ; A_ + dw $fb9b ; A# + dw $fbda ; B_ + assert_table_length NUM_NOTES + 1 + dw $fc16 ; C_ + dw $fc4e ; C# + dw $fc83 ; D_ + dw $fcb5 ; D# + dw $fce5 ; E_ + dw $fd11 ; F_ + dw $fd3b ; F# + dw $fd63 ; G_ + dw $fd89 ; G# + dw $fdac ; A_ + dw $fdcd ; A# + dw $fded ; B_ + assert_table_length NUM_NOTES * 2 + 1 diff --git a/audio/sfx.asm b/audio/sfx.asm new file mode 100644 index 0000000..83dd5f6 --- /dev/null +++ b/audio/sfx.asm @@ -0,0 +1,5225 @@ +Sfx_PokeballsPlacedOnTable: + channel_count 1 + channel 5, Sfx_PokeballsPlacedOnTable_Ch5 + +Sfx_BallWobble: + channel_count 1 + channel 5, Sfx_BallWobble_Ch5 + +Sfx_Potion: + channel_count 1 + channel 5, Sfx_Potion_Ch5 + +Sfx_FullHeal: + channel_count 1 + channel 5, Sfx_FullHeal_Ch5 + +Sfx_Menu: + channel_count 1 + channel 8, Sfx_Menu_Ch8 + +Sfx_ReadText: +Sfx_ReadText2: + channel_count 1 + channel 5, Sfx_ReadText_Ch5 + assert Sfx_ReadText_Ch5 == Sfx_ReadText2_Ch5 + +Sfx_Poison: + channel_count 1 + channel 5, Sfx_Poison_Ch5 + +Sfx_GotSafariBalls: + channel_count 1 + channel 5, Sfx_GotSafariBalls_Ch5 + +Sfx_BootPc: + channel_count 1 + channel 5, Sfx_BootPc_Ch5 + +Sfx_ShutDownPc: + channel_count 1 + channel 5, Sfx_ShutDownPc_Ch5 + +Sfx_ChoosePcOption: + channel_count 1 + channel 5, Sfx_ChoosePcOption_Ch5 + +Sfx_EscapeRope: + channel_count 1 + channel 5, Sfx_EscapeRope_Ch5 + +Sfx_PushButton: + channel_count 1 + channel 5, Sfx_PushButton_Ch5 + +Sfx_SecondPartOfItemfinder: + channel_count 1 + channel 5, Sfx_SecondPartOfItemfinder_Ch5 + +Sfx_WarpTo: + channel_count 1 + channel 5, Sfx_WarpTo_Ch5 + +Sfx_WarpFrom: + channel_count 1 + channel 5, Sfx_WarpFrom_Ch5 + +Sfx_ChangeDexMode: + channel_count 1 + channel 5, Sfx_ChangeDexMode_Ch5 + +Sfx_JumpOverLedge: + channel_count 1 + channel 5, Sfx_JumpOverLedge_Ch5 + +Sfx_GrassRustle: + channel_count 1 + channel 8, Sfx_GrassRustle_Ch8 + +Sfx_Fly: + channel_count 1 + channel 8, Sfx_Fly_Ch8 + +Sfx_Wrong: + channel_count 2 + channel 5, Sfx_Wrong_Ch5 + channel 6, Sfx_Wrong_Ch6 + +Sfx_Squeak: + channel_count 1 + channel 5, Sfx_Squeak_Ch5 + +Sfx_Strength: + channel_count 1 + channel 8, Sfx_Strength_Ch8 + +Sfx_Boat: + channel_count 2 + channel 5, Sfx_Boat_Ch5 + channel 6, Sfx_Boat_Ch6 + +Sfx_WallOpen: + channel_count 1 + channel 5, Sfx_WallOpen_Ch5 + +Sfx_PlacePuzzlePieceDown: + channel_count 1 + channel 8, Sfx_PlacePuzzlePieceDown_Ch8 + +Sfx_EnterDoor: + channel_count 1 + channel 8, Sfx_EnterDoor_Ch8 + +Sfx_SwitchPokemon: + channel_count 2 + channel 5, Sfx_SwitchPokemon_Ch5 + channel 6, Sfx_SwitchPokemon_Ch6 + +Sfx_Tally: + channel_count 2 + channel 5, Sfx_Tally_Ch5 + channel 6, Sfx_Tally_Ch6 + +Sfx_Transaction: + channel_count 2 + channel 5, Sfx_Transaction_Ch5 + channel 6, Sfx_Transaction_Ch6 + +Sfx_Bump: + channel_count 1 + channel 5, Sfx_Bump_Ch5 + +Sfx_ExitBuilding: + channel_count 1 + channel 8, Sfx_ExitBuilding_Ch8 + +Sfx_Save: + channel_count 2 + channel 5, Sfx_Save_Ch5 + channel 6, Sfx_Save_Ch6 + +Sfx_Save_Ch5: + duty_cycle 2 + square_note 2, 15, 1, 1792 + square_note 1, 14, 1, 1536 + square_note 1, 14, 1, 1664 + square_note 1, 14, 1, 1728 + square_note 2, 14, 1, 1792 + square_note 2, 14, 1, 1984 + square_note 15, 15, 2, 2016 + sound_ret + +Sfx_Save_Ch6: + duty_cycle 2 + square_note 2, 0, 8, 0 + square_note 2, 10, 1, 1793 + square_note 1, 9, 1, 1537 + square_note 1, 9, 1, 1665 + square_note 1, 9, 1, 1729 + square_note 2, 9, 1, 1793 + square_note 2, 9, 1, 1985 + square_note 15, 13, 2, 2017 + sound_ret + +Sfx_Pokeflute: + channel_count 1 + channel 7, Sfx_Pokeflute_Ch7 + +Sfx_ElevatorEnd: + channel_count 1 + channel 5, Sfx_ElevatorEnd_Ch5 + +Sfx_ThrowBall: + channel_count 2 + channel 5, Sfx_ThrowBall_Ch5 + channel 6, Sfx_ThrowBall_Ch6 + +Sfx_BallPoof: + channel_count 2 + channel 5, Sfx_BallPoof_Ch5 + channel 8, Sfx_BallPoof_Ch8 + +Sfx_Unknown3A: + channel_count 2 + channel 5, Sfx_Unknown3A_Ch5 + channel 8, Sfx_Unknown3A_Ch8 + +Sfx_Run: + channel_count 1 + channel 8, Sfx_Run_Ch8 + +Sfx_SlotMachineStart: + channel_count 2 + channel 5, Sfx_SlotMachineStart_Ch5 + channel 6, Sfx_SlotMachineStart_Ch6 + +Sfx_Call: + channel_count 1 + channel 5, Sfx_Call_Ch5 + +Sfx_Unknown60: + channel_count 1 + channel 8, Sfx_Unknown60_Ch8 + +Sfx_Unknown61: + channel_count 1 + channel 8, Sfx_Unknown61_Ch8 + +Sfx_SwitchPockets: + channel_count 1 + channel 8, Sfx_SwitchPockets_Ch8 + +Sfx_Unknown63: + channel_count 1 + channel 8, Sfx_Unknown63_Ch8 + +Sfx_Burn: + channel_count 1 + channel 8, Sfx_Burn_Ch8 + +Sfx_TitleScreenEntrance: + channel_count 1 + channel 8, Sfx_TitleScreenEntrance_Ch8 + +Sfx_Unknown66: + channel_count 1 + channel 5, Sfx_Unknown66_Ch5 + +Sfx_GetCoinFromSlots: + channel_count 1 + channel 5, Sfx_GetCoinFromSlots_Ch5 + +Sfx_PayDay: + channel_count 2 + channel 5, Sfx_PayDay_Ch5 + channel 6, Sfx_PayDay_Ch6 + +Sfx_Metronome: + channel_count 1 + channel 5, Sfx_Metronome_Ch5 + +Sfx_Peck: + channel_count 1 + channel 8, Sfx_Peck_Ch8 + +Sfx_Kinesis: + channel_count 1 + channel 5, Sfx_Kinesis_Ch5 + +Sfx_Lick: + channel_count 1 + channel 5, Sfx_Lick_Ch5 + +Sfx_Pound: + channel_count 1 + channel 8, Sfx_Pound_Ch8 + +Sfx_MovePuzzlePiece: + channel_count 1 + channel 8, Sfx_MovePuzzlePiece_Ch8 + +Sfx_CometPunch: + channel_count 1 + channel 8, Sfx_CometPunch_Ch8 + +Sfx_MegaPunch: + channel_count 1 + channel 8, Sfx_MegaPunch_Ch8 + +Sfx_Scratch: + channel_count 1 + channel 8, Sfx_Scratch_Ch8 + +Sfx_Vicegrip: + channel_count 1 + channel 8, Sfx_Vicegrip_Ch8 + +Sfx_RazorWind: + channel_count 1 + channel 8, Sfx_RazorWind_Ch8 + +Sfx_Cut: + channel_count 1 + channel 8, Sfx_Cut_Ch8 + +Sfx_WingAttack: + channel_count 1 + channel 8, Sfx_WingAttack_Ch8 + +Sfx_Whirlwind: + channel_count 1 + channel 8, Sfx_Whirlwind_Ch8 + +Sfx_Bind: + channel_count 1 + channel 8, Sfx_Bind_Ch8 + +Sfx_VineWhip: + channel_count 1 + channel 8, Sfx_VineWhip_Ch8 + +Sfx_DoubleKick: + channel_count 1 + channel 8, Sfx_DoubleKick_Ch8 + +Sfx_MegaKick: + channel_count 1 + channel 8, Sfx_MegaKick_Ch8 + +Sfx_Headbutt: + channel_count 1 + channel 8, Sfx_Headbutt_Ch8 + +Sfx_HornAttack: + channel_count 1 + channel 8, Sfx_HornAttack_Ch8 + +Sfx_Tackle: + channel_count 1 + channel 8, Sfx_Tackle_Ch8 + +Sfx_PoisonSting: + channel_count 1 + channel 8, Sfx_PoisonSting_Ch8 + +Sfx_Powder: + channel_count 1 + channel 8, Sfx_Powder_Ch8 + +Sfx_Doubleslap: + channel_count 1 + channel 8, Sfx_Doubleslap_Ch8 + +Sfx_Bite: + channel_count 2 + channel 5, Sfx_Bite_Ch5 + channel 8, Sfx_Bite_Ch8 + +Sfx_JumpKick: + channel_count 1 + channel 8, Sfx_JumpKick_Ch8 + +Sfx_Stomp: + channel_count 1 + channel 8, Sfx_Stomp_Ch8 + +Sfx_TailWhip: + channel_count 1 + channel 8, Sfx_TailWhip_Ch8 + +Sfx_KarateChop: + channel_count 1 + channel 8, Sfx_KarateChop_Ch8 + +Sfx_Submission: + channel_count 1 + channel 8, Sfx_Submission_Ch8 + +Sfx_WaterGun: + channel_count 2 + channel 5, Sfx_WaterGun_Ch5 + channel 8, Sfx_WaterGun_Ch8 + +Sfx_SwordsDance: + channel_count 1 + channel 8, Sfx_SwordsDance_Ch8 + +Sfx_Thunder: + channel_count 1 + channel 8, Sfx_Thunder_Ch8 + +Sfx_Supersonic: + channel_count 3 + channel 5, Sfx_Supersonic_Ch5 + channel 6, Sfx_Supersonic_Ch6 + channel 8, Sfx_Supersonic_Ch8 + +Sfx_Leer: + channel_count 3 + channel 5, Sfx_Leer_Ch5 + channel 6, Sfx_Leer_Ch6 + channel 8, Sfx_Leer_Ch8 + +Sfx_Ember: + channel_count 2 + channel 5, Sfx_Ember_Ch5 + channel 8, Sfx_Ember_Ch8 + +Sfx_Bubblebeam: + channel_count 3 + channel 5, Sfx_Bubblebeam_Ch5 + channel 6, Sfx_Bubblebeam_Ch6 + channel 8, Sfx_Bubblebeam_Ch8 + +Sfx_HydroPump: + channel_count 2 + channel 5, Sfx_HydroPump_Ch5 + channel 8, Sfx_HydroPump_Ch8 + +Sfx_Surf: + channel_count 3 + channel 5, Sfx_Surf_Ch5 + channel 6, Sfx_Surf_Ch6 + channel 8, Sfx_Surf_Ch8 + +Sfx_Psybeam: + channel_count 3 + channel 5, Sfx_Psybeam_Ch5 + channel 6, Sfx_Psybeam_Ch6 + channel 8, Sfx_Psybeam_Ch8 + +Sfx_Charge: + channel_count 3 + channel 5, Sfx_Charge_Ch5 + channel 6, Sfx_Charge_Ch6 + channel 8, Sfx_Charge_Ch8 + +Sfx_Thundershock: + channel_count 3 + channel 5, Sfx_Thundershock_Ch5 + channel 6, Sfx_Thundershock_Ch6 + channel 8, Sfx_Thundershock_Ch8 + +Sfx_Psychic: + channel_count 3 + channel 5, Sfx_Psychic_Ch5 + channel 6, Sfx_Psychic_Ch6 + channel 8, Sfx_Psychic_Ch8 + +Sfx_Screech: + channel_count 2 + channel 5, Sfx_Screech_Ch5 + channel 6, Sfx_Screech_Ch6 + +Sfx_BoneClub: + channel_count 2 + channel 5, Sfx_BoneClub_Ch5 + channel 6, Sfx_BoneClub_Ch6 + +Sfx_Sharpen: + channel_count 2 + channel 5, Sfx_Sharpen_Ch5 + channel 6, Sfx_Sharpen_Ch6 + +Sfx_EggBomb: + channel_count 3 + channel 5, Sfx_EggBomb_Ch5 + channel 6, Sfx_EggBomb_Ch6 + channel 8, Sfx_EggBomb_Ch8 + +Sfx_Sing: + channel_count 2 + channel 5, Sfx_Sing_Ch5 + channel 6, Sfx_Sing_Ch6 + +Sfx_HyperBeam: + channel_count 3 + channel 5, Sfx_HyperBeam_Ch5 + channel 6, Sfx_HyperBeam_Ch6 + channel 8, Sfx_HyperBeam_Ch8 + +Sfx_Shine: + channel_count 1 + channel 5, Sfx_Shine_Ch5 + +Sfx_Unknown5F: + channel_count 3 + channel 5, Sfx_Unknown5F_Ch5 + channel 6, Sfx_Unknown5F_Ch6 +Sfx_Sandstorm: + channel 8, Sfx_Sandstorm_Ch8 + assert Sfx_Sandstorm_Ch8 == Sfx_Unknown5F_Ch8 + +Sfx_HangUp: + channel_count 1 + channel 5, Sfx_HangUp_Ch5 + +Sfx_NoSignal: + channel_count 1 + channel 5, Sfx_NoSignal_Ch5 + +Sfx_Elevator: + channel_count 4 + channel 5, Sfx_Elevator_Ch5 + channel 6, Sfx_Elevator_Ch6 + channel 7, Sfx_Elevator_Ch7 + channel 8, Sfx_Elevator_Ch8 + +Sfx_LevelUp: +Sfx_DexFanfare5079: + channel_count 4 + channel 5, Sfx_LevelUp_Ch5 + channel 6, Sfx_LevelUp_Ch6 + channel 7, Sfx_LevelUp_Ch7 + channel 8, Sfx_LevelUp_Ch8 + assert Sfx_LevelUp_Ch5 == Sfx_DexFanfare5079_Ch5 + assert Sfx_LevelUp_Ch6 == Sfx_DexFanfare5079_Ch6 + assert Sfx_LevelUp_Ch7 == Sfx_DexFanfare5079_Ch7 + assert Sfx_LevelUp_Ch8 == Sfx_DexFanfare5079_Ch8 + +Sfx_LevelUp_Ch5: +Sfx_DexFanfare5079_Ch5: + toggle_sfx + tempo 120 + volume 7, 7 + duty_cycle 2 + note_type 8, 11, 1 + octave 3 + note B_, 2 + note B_, 2 + note B_, 2 + volume_envelope 11, 3 + octave 4 + note G#, 12 + sound_ret + +Sfx_LevelUp_Ch6: +Sfx_DexFanfare5079_Ch6: + toggle_sfx + duty_cycle 2 + note_type 8, 12, 1 + octave 4 + note E_, 2 + note E_, 2 + note E_, 2 + volume_envelope 12, 3 + note B_, 12 + sound_ret + +Sfx_LevelUp_Ch7: +Sfx_DexFanfare5079_Ch7: + toggle_sfx + note_type 8, 2, 5 + octave 4 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + octave 5 + note E_, 5 + volume_envelope 3, 5 + note E_, 3 + rest 4 + sound_ret + +Sfx_LevelUp_Ch8: +Sfx_DexFanfare5079_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 12 + note C_, 12 + sound_ret + +Sfx_KeyItem: + channel_count 4 + channel 5, Sfx_KeyItem_Ch5 + channel 6, Sfx_KeyItem_Ch6 + channel 7, Sfx_KeyItem_Ch7 + channel 8, Sfx_KeyItem_Ch8 + +Sfx_KeyItem_Ch5: + toggle_sfx + tempo 120 + volume 7, 7 + duty_cycle 2 + note_type 6, 11, 1 + octave 3 + note B_, 4 + note B_, 2 + note B_, 2 + note B_, 4 + octave 4 + note E_, 4 + volume_envelope 11, 3 + note G#, 16 + sound_ret + +Sfx_KeyItem_Ch6: + toggle_sfx + duty_cycle 2 + note_type 6, 12, 1 + octave 4 + note E_, 4 + note E_, 2 + note E_, 2 + note E_, 4 + note G#, 4 + volume_envelope 12, 3 + note B_, 16 + sound_ret + +Sfx_KeyItem_Ch7: + toggle_sfx + note_type 6, 2, 5 + octave 4 + note G#, 2 + rest 2 + note G#, 1 + rest 1 + note G#, 1 + rest 1 + note G#, 2 + rest 2 + note B_, 2 + rest 2 + octave 5 + note E_, 8 + volume_envelope 3, 5 + note E_, 4 + rest 4 + sound_ret + +Sfx_KeyItem_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 12 + note C_, 16 + sound_ret + +Sfx_DexFanfare2049: + channel_count 4 + channel 5, Sfx_DexFanfare2049_Ch5 + channel 6, Sfx_DexFanfare2049_Ch6 + channel 7, Sfx_DexFanfare2049_Ch7 + channel 8, Sfx_DexFanfare2049_Ch8 + +Sfx_DexFanfare2049_Ch5: + toggle_sfx + tempo 104 + volume 7, 7 + duty_cycle 2 + note_type 12, 8, 8 + octave 3 + note A_, 4 + rest 2 + note A_, 1 + rest 1 + note A#, 4 + rest 2 + note A#, 1 + rest 1 + octave 4 + note C_, 2 + rest 2 + octave 3 + note A#, 2 + rest 2 + note A_, 2 + rest 6 + sound_ret + +Sfx_DexFanfare2049_Ch6: + toggle_sfx + duty_cycle 2 + note_type 12, 12, 1 + octave 5 + note F_, 2 + note E_, 2 + note D_, 2 + note C_, 2 + octave 4 + note A#, 2 + octave 5 + note C_, 2 + note D_, 2 + note E_, 2 + note F_, 4 + note G_, 4 + note F_, 8 + sound_ret + +Sfx_DexFanfare2049_Ch7: + toggle_sfx + note_type 12, 2, 5 + octave 4 + note F_, 4 + rest 2 + note F_, 1 + rest 1 + note F_, 4 + rest 2 + note F_, 1 + rest 1 + note A_, 2 + rest 2 + note E_, 2 + rest 2 + note F_, 2 + rest 6 + sound_ret + +Sfx_DexFanfare2049_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 12 + note C_, 16 + rest 16 + sound_ret + +Sfx_Item: + channel_count 4 + channel 5, Sfx_Item_Ch5 + channel 6, Sfx_Item_Ch6 + channel 7, Sfx_Item_Ch7 + channel 8, Sfx_Item_Ch8 + +Sfx_Item_Ch5: + toggle_sfx + tempo 108 + volume 7, 7 + vibrato 8, 2, 7 + duty_cycle 2 + note_type 8, 11, 2 + octave 4 + note C_, 6 + note C_, 2 + note F_, 2 + note C_, 2 + note G_, 4 + note G_, 4 + note G_, 4 + note F_, 12 + rest 12 + sound_ret + +Sfx_Item_Ch6: + toggle_sfx + vibrato 8, 2, 7 + duty_cycle 2 + note_type 8, 12, 3 + octave 4 + note A_, 6 + note A_, 2 + note A_, 2 + note A_, 2 + note A#, 4 + note A#, 4 + note A#, 4 + note A_, 12 + rest 12 + sound_ret + +Sfx_Item_Ch7: + toggle_sfx + note_type 8, 2, 5 + octave 4 + note F_, 4 + rest 2 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + note D#, 2 + rest 2 + note D#, 2 + rest 2 + note E_, 2 + rest 2 + note F_, 6 + volume_envelope 3, 5 + note F_, 4 + rest 14 + sound_ret + +Sfx_Item_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 12 + note C_, 16 + rest 16 + sound_ret + +Sfx_CaughtMon: + channel_count 4 + channel 5, Sfx_CaughtMon_Ch5 + channel 6, Sfx_CaughtMon_Ch6 + channel 7, Sfx_CaughtMon_Ch7 + channel 8, Sfx_CaughtMon_Ch8 + +Sfx_CaughtMon_Ch5: + toggle_sfx + tempo 112 + volume 7, 7 + vibrato 8, 2, 7 + duty_cycle 2 + note_type 8, 11, 3 + octave 4 + note C_, 6 + octave 3 + note A_, 6 + note F_, 12 + volume_envelope 11, 1 + octave 4 + note D#, 2 + note D#, 2 + note D#, 2 + note D#, 2 + note D#, 2 + note G_, 2 + volume_envelope 11, 3 + note F_, 12 + sound_ret + +Sfx_CaughtMon_Ch6: + toggle_sfx + duty_cycle 2 + vibrato 8, 2, 7 + note_type 8, 12, 3 + octave 4 + note A_, 6 + note F_, 6 + note C_, 12 + volume_envelope 12, 1 + note A#, 2 + note A#, 2 + note A#, 2 + note G_, 2 + note G_, 2 + note A#, 2 + volume_envelope 12, 3 + note A_, 12 + sound_ret + +Sfx_CaughtMon_Ch7: + toggle_sfx + note_type 8, 2, 5 + octave 3 + note C_, 12 + note C_, 6 + octave 2 + note A_, 2 + octave 3 + note C_, 2 + note F_, 2 + note G_, 6 + note A#, 6 + note A_, 6 + volume_envelope 3, 5 + note A_, 3 + rest 3 + sound_ret + +Sfx_CaughtMon_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 12 + note C_, 16 + rest 16 + sound_ret + +Sfx_DexFanfare80109: + channel_count 4 + channel 5, Sfx_DexFanfare80109_Ch5 + channel 6, Sfx_DexFanfare80109_Ch6 + channel 7, Sfx_DexFanfare80109_Ch7 + channel 8, Sfx_DexFanfare80109_Ch8 + +Sfx_DexFanfare80109_Ch5: + toggle_sfx + tempo 112 + volume 7, 7 + vibrato 8, 2, 7 + duty_cycle 2 + note_type 12, 11, 1 + octave 4 + note D#, 2 + note D#, 1 + note D#, 1 + octave 3 + note A#, 2 + note A#, 1 + note A#, 1 + octave 4 + note D#, 2 + note D#, 1 + note D#, 1 + note F_, 2 + note F_, 1 + note F_, 1 + volume_envelope 10, 5 + note A#, 16 + sound_ret + +Sfx_DexFanfare80109_Ch6: + toggle_sfx + vibrato 8, 2, 7 + duty_cycle 2 + note_type 12, 12, 1 + octave 4 + note G_, 2 + note G_, 1 + note G_, 1 + note D#, 2 + note D#, 1 + note D#, 1 + note G#, 2 + note G#, 1 + note G#, 1 + note A#, 2 + note A#, 1 + note A#, 1 + volume_envelope 11, 5 + octave 5 + note D#, 16 + sound_ret + +Sfx_DexFanfare80109_Ch7: + toggle_sfx + note_type 12, 2, 5 + octave 4 + note D#, 1 + rest 1 + octave 3 + note A#, 2 + octave 4 + note D#, 1 + rest 1 + octave 3 + note A#, 2 + octave 4 + note D#, 1 + rest 1 + note C_, 2 + note D_, 1 + rest 1 + octave 3 + note A#, 2 + note D#, 4 + volume_envelope 3, 5 + note D#, 3 + rest 9 + sound_ret + +Sfx_DexFanfare80109_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 12 + note C_, 16 + rest 16 + sound_ret + +Sfx_Fanfare2: + channel_count 3 + channel 5, Sfx_Fanfare2_Ch5 + channel 6, Sfx_Fanfare2_Ch6 + channel 8, Sfx_Fanfare2_Ch8 + +Sfx_Unused: ; unreferenced + channel_count 4 + channel 5, Sfx_Unused_Ch5 + channel 6, Sfx_Unused_Ch6 + channel 7, Sfx_Unused_Ch7 + channel 8, Sfx_Unused_Ch8 + +Sfx_Unused_Ch5: + toggle_sfx + tempo 124 + volume 7, 7 + vibrato 8, 2, 7 + duty_cycle 2 + note_type 12, 11, 1 + octave 4 + note F_, 2 + note F_, 1 + note F_, 1 + note C_, 2 + note C_, 1 + note C_, 1 + note E_, 2 + note G_, 1 + note G_, 1 + note C_, 2 + note E_, 1 + note E_, 1 + volume_envelope 10, 5 + note F_, 16 + sound_ret + +Sfx_Unused_Ch6: + toggle_sfx + vibrato 8, 2, 7 + duty_cycle 2 + note_type 12, 12, 1 + octave 4 + note A_, 2 + note A_, 1 + note A_, 1 + note F_, 2 + note F_, 1 + note F_, 1 + octave 5 + note C_, 2 + note C_, 1 + note C_, 1 + octave 4 + note A#, 2 + note A#, 1 + note A#, 1 + volume_envelope 11, 5 + note A_, 16 + sound_ret + +Sfx_Unused_Ch7: + toggle_sfx + note_type 12, 2, 5 + octave 4 + note F_, 8 + note C_, 2 + note E_, 2 + note G_, 2 + note A#, 2 + note A_, 4 + volume_envelope 3, 5 + note A_, 3 + rest 9 + sound_ret + +Sfx_Unused_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 12 + note C_, 16 + rest 16 + sound_ret + +Sfx_Fanfare: + channel_count 3 + channel 5, Sfx_Fanfare_Ch5 + channel 6, Sfx_Fanfare_Ch6 + channel 8, Sfx_Fanfare_Ch8 + +Sfx_RegisterPhoneNumber: + channel_count 4 + channel 5, Sfx_RegisterPhoneNumber_Ch5 + channel 6, Sfx_RegisterPhoneNumber_Ch6 + channel 7, Sfx_RegisterPhoneNumber_Ch7 + channel 8, Sfx_RegisterPhoneNumber_Ch8 + +Sfx_RegisterPhoneNumber_Ch5: + toggle_sfx + tempo 124 + volume 7, 7 + duty_cycle 3 + note_type 12, 10, 2 + rest 2 + octave 3 + note C_, 4 + note G#, 4 + octave 4 + note C_, 2 + octave 3 + note F_, 1 + note G#, 2 + note C_, 1 + note F_, 2 + note A#, 3 + octave 4 + note C#, 3 + note C_, 2 + rest 8 + sound_ret + + toggle_sfx ; unused + +Sfx_RegisterPhoneNumber_Ch6: + toggle_sfx + duty_cycle 3 + note_type 12, 12, 2 + rest 2 + octave 4 + note D#, 2 + note C#, 2 + note C_, 2 + note D#, 2 + note F_, 2 + rest 1 + note G#, 3 + octave 5 + note C_, 2 + note D#, 3 + octave 4 + note G_, 3 + note G#, 2 + rest 8 + sound_ret + + toggle_sfx ; unused + +Sfx_RegisterPhoneNumber_Ch7: + toggle_sfx + note_type 12, 2, 5 + rest 2 + octave 3 + note D#, 7 + rest 1 + note G#, 2 + rest 1 + note C_, 2 + rest 1 + note G#, 2 + note G_, 2 + rest 1 + note A#, 3 + note G#, 2 + rest 8 + sound_ret + + toggle_sfx ; unused + +Sfx_RegisterPhoneNumber_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 12 + note C_, 2 + rest 16 + rest 16 + sound_ret + + toggle_sfx ; unused + +Sfx_3rdPlace: + channel_count 3 + channel 5, Sfx_3rdPlace_Ch5 + channel 6, Sfx_3rdPlace_Ch6 + channel 7, Sfx_3rdPlace_Ch7 + +Sfx_3rdPlace_Ch5: + toggle_sfx + tempo 120 + volume 7, 7 + duty_cycle 2 + note_type 12, 10, 4 + octave 4 + note F_, 1 + note A_, 1 + octave 5 + note C_, 1 + note F_, 1 + rest 1 + note C_, 1 + note D_, 6 + sound_ret + + toggle_sfx ; unused + +Sfx_3rdPlace_Ch6: + toggle_sfx + duty_cycle 2 + note_type 12, 11, 4 + octave 4 + note A_, 1 + octave 5 + note C_, 1 + note F_, 1 + note A_, 1 + rest 1 + note F_, 1 + note G_, 6 + sound_ret + + toggle_sfx ; unused + +Sfx_3rdPlace_Ch7: + toggle_sfx + note_type 12, 2, 5 + octave 3 + note A_, 1 + note F_, 1 + note A_, 1 + octave 4 + note C_, 1 + rest 1 + octave 3 + note A_, 1 + note B_, 6 + sound_ret + + toggle_sfx ; unused + +Sfx_GetEgg: + channel_count 4 + channel 5, Sfx_GetEgg_Ch5 + channel 6, Sfx_GetEgg_Ch6 + channel 7, Sfx_GetEgg_Ch7 + channel 8, Sfx_GetEgg_Ch8 + +Sfx_GetEgg_Ch5: + toggle_sfx + tempo 120 + volume 7, 7 + vibrato 18, 3, 4 + duty_cycle 2 + note_type 8, 10, 1 + rest 2 + octave 3 + note C_, 2 + note F_, 2 + note A_, 2 + note F_, 2 + note A#, 2 + octave 4 + note D_, 2 + volume_envelope 10, 2 + note F_, 6 + volume_envelope 10, 1 + duty_cycle 3 + octave 3 + note E_, 2 + note G_, 2 + octave 4 + note C_, 2 + volume_envelope 10, 4 + note F_, 9 + rest 9 + sound_ret + + toggle_sfx ; unused + +Sfx_GetEgg_Ch6: + toggle_sfx + vibrato 18, 3, 4 + duty_cycle 3 + note_type 8, 12, 2 + rest 2 + octave 4 + note F_, 2 + rest 2 + note A_, 2 + volume_envelope 12, 1 + note A#, 2 + note A_, 2 + note A#, 2 + volume_envelope 12, 2 + octave 5 + note C_, 6 + volume_envelope 12, 1 + octave 4 + note C_, 2 + note E_, 2 + note G_, 2 + volume_envelope 12, 4 + note A_, 9 + rest 9 + sound_ret + + toggle_sfx ; unused + +Sfx_GetEgg_Ch7: + toggle_sfx + note_type 8, 2, 5 + rest 2 + octave 3 + note C_, 6 + octave 2 + note A#, 6 + octave 3 + note C_, 2 + note F_, 2 + note G_, 2 + note A#, 6 + note A_, 9 + rest 9 + sound_ret + + toggle_sfx ; unused + +Sfx_GetEgg_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 8 + rest 2 + drum_speed 12 + rest 16 + rest 12 + sound_ret + + toggle_sfx ; unused + +Sfx_MoveDeleted: + channel_count 4 + channel 5, Sfx_MoveDeleted_Ch5 + channel 6, Sfx_MoveDeleted_Ch6 + channel 7, Sfx_MoveDeleted_Ch7 + channel 8, Sfx_MoveDeleted_Ch8 + +Sfx_MoveDeleted_Ch5: + toggle_sfx + tempo 116 + volume 7, 7 + duty_cycle 2 + vibrato 12, 4, 4 + note_type 12, 10, 4 + rest 8 + octave 2 + note G_, 1 + rest 2 + note C#, 1 + note E_, 1 + note D#, 1 + note E_, 4 + volume_envelope 10, 1 + note G_, 2 + note F_, 2 + note E_, 2 + note D_, 2 + note G#, 2 + note B_, 2 + volume_envelope 10, 6 + octave 3 + note D_, 10 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_MoveDeleted_Ch6: + toggle_sfx + duty_cycle 3 + vibrato 12, 4, 4 + note_type 12, 7, 4 + octave 1 + note B_, 1 + octave 2 + note D_, 1 + note F_, 1 + note G#, 1 + volume_envelope 9, 4 + note D_, 1 + note F_, 1 + note G#, 1 + note B_, 1 + volume_envelope 11, 4 + octave 3 + note C#, 1 + rest 2 + octave 2 + note A#, 1 + octave 3 + note C#, 4 + rest 2 + volume_envelope 11, 1 + note C#, 2 + note D#, 2 + note E_, 2 + volume_envelope 11, 6 + note F_, 16 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_MoveDeleted_Ch7: + toggle_sfx + note_type 6, 2, 5 + octave 2 + note G#, 8 + note A_, 8 + note A#, 2 + rest 4 + note A#, 1 + rest 1 + note A#, 8 + rest 4 + octave 3 + note C#, 2 + rest 2 + note C_, 2 + rest 2 + octave 2 + note A#, 2 + rest 2 + note_type 12, 2, 0 + note B_, 16 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_MoveDeleted_Ch8: + toggle_sfx + sfx_toggle_noise 3 + drum_speed 12 + note F_, 8 + rest 16 + rest 16 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_2ndPlace: + channel_count 4 + channel 5, Sfx_2ndPlace_Ch5 + channel 6, Sfx_2ndPlace_Ch6 + channel 7, Sfx_2ndPlace_Ch7 + channel 8, Sfx_2ndPlace_Ch8 + +Sfx_2ndPlace_Ch5: + toggle_sfx + tempo 116 + volume 7, 7 + duty_cycle 2 + vibrato 12, 3, 4 + note_type 8, 10, 1 + octave 4 + note E_, 2 + note E_, 2 + note E_, 2 + note C_, 2 + octave 3 + note A_, 2 + note F_, 2 + note A_, 2 + octave 4 + note C_, 2 + note F_, 2 + note C_, 2 + octave 3 + note A_, 2 + octave 4 + note F_, 2 + note A_, 2 + note A_, 2 + note A_, 2 + volume_envelope 10, 7 + note B_, 12 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_2ndPlace_Ch6: + toggle_sfx + duty_cycle 2 + note_type 8, 11, 1 + octave 4 + note G_, 2 + note G_, 2 + note G_, 2 + note A_, 4 + note B_, 2 + volume_envelope 11, 4 + octave 5 + note C_, 12 + volume_envelope 11, 1 + note C_, 2 + note C_, 2 + note C_, 2 + volume_envelope 11, 7 + note D_, 12 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_2ndPlace_Ch7: + toggle_sfx + note_type 8, 2, 5 + octave 3 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 2 + note F_, 2 + rest 2 + octave 3 + note F_, 2 + octave 2 + note F_, 2 + rest 2 + octave 3 + note F_, 2 + octave 2 + note F_, 2 + rest 2 + octave 3 + note F_, 2 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + octave 2 + note G_, 12 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_2ndPlace_Ch8: + toggle_sfx + sfx_toggle_noise 3 + drum_speed 8 +.loop1: + note C#, 1 + sound_loop 6, .loop1 + note B_, 12 + note B_, 12 + note B_, 12 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_1stPlace: + channel_count 4 + channel 5, Sfx_1stPlace_Ch5 + channel 6, Sfx_1stPlace_Ch6 + channel 7, Sfx_1stPlace_Ch7 + channel 8, Sfx_1stPlace_Ch8 + +Sfx_1stPlace_Ch5: + toggle_sfx + tempo 124 + volume 7, 7 + duty_cycle 3 + vibrato 12, 3, 4 + note_type 12, 10, 1 + octave 5 + note D_, 2 + octave 4 + note B_, 2 + octave 5 + note D_, 2 + note A#, 1 + note F_, 1 + note D_, 1 + note F_, 1 + volume_envelope 9, 1 + note D_, 1 + octave 4 + note A#, 1 + note F_, 1 + note A#, 1 + volume_envelope 8, 1 + octave 5 + note D_, 1 + octave 4 + note A#, 1 + note F_, 1 + note D_, 1 + volume_envelope 10, 1 + note C_, 2 + note E_, 2 + note G_, 2 + volume_envelope 10, 7 + note A_, 10 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_1stPlace_Ch6: + toggle_sfx + duty_cycle 3 + vibrato 12, 3, 4 + note_type 12, 12, 1 + octave 3 + note B_, 2 + note G_, 2 + note B_, 2 + volume_envelope 11, 6 + octave 4 + note D_, 12 + volume_envelope 12, 1 + note E_, 2 + note G_, 2 + octave 5 + note C_, 2 + volume_envelope 11, 7 + note D_, 10 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_1stPlace_Ch7: + toggle_sfx + note_type 12, 2, 5 + octave 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 6 + note F_, 6 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + note D_, 10 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_1stPlace_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 6 + note D_, 4 + note D_, 4 + note D_, 4 + note B_, 12 + note B_, 10 + note C#, 1 + note C#, 1 + note D_, 4 + note D_, 4 + note D_, 4 + drum_speed 12 + note B_, 10 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_ChooseACard: + channel_count 4 + channel 5, Sfx_ChooseACard_Ch5 + channel 6, Sfx_ChooseACard_Ch6 + channel 7, Sfx_ChooseACard_Ch7 + channel 8, Sfx_ChooseACard_Ch8 + +Sfx_ChooseACard_Ch5: + toggle_sfx + tempo 152 + volume 7, 7 + duty_cycle 3 + note_type 6, 10, 4 + octave 3 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + octave 4 + note C#, 4 + octave 3 + note F_, 1 + rest 1 + note F_, 1 + rest 1 + octave 4 + note D_, 4 + octave 3 + note E_, 1 + rest 1 + note E_, 1 + rest 1 + octave 4 + note E_, 4 + volume_envelope 7, 1 + octave 3 + note E_, 1 + note F#, 1 + note G#, 1 + note A_, 1 + volume_envelope 9, 1 + note B_, 1 + octave 4 + note C#, 1 + note D_, 1 + note D#, 1 + volume_envelope 10, 4 + note E_, 4 + rest 12 + sound_ret + + toggle_sfx ; unused + +Sfx_ChooseACard_Ch6: + toggle_sfx + duty_cycle 3 + note_type 6, 11, 4 + octave 3 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + octave 4 + note E_, 4 + octave 3 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + octave 4 + note F_, 4 + octave 3 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + octave 4 + note G_, 4 + note G#, 8 + note A_, 4 + rest 12 + sound_ret + + toggle_sfx ; unused + +Sfx_ChooseACard_Ch7: + toggle_sfx + note_type 6, 2, 5 + octave 3 + note C#, 1 + rest 1 + note C#, 1 + rest 1 + octave 2 + note A_, 4 + octave 3 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + octave 2 + note A_, 4 + octave 3 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + octave 2 + note A_, 4 + octave 3 + note E_, 2 + octave 2 + note G#, 2 + note B_, 2 + note G#, 2 + note A_, 4 + rest 12 + sound_ret + + toggle_sfx ; unused + +Sfx_ChooseACard_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 6 + note D_, 2 + note C#, 2 + note B_, 4 + note D_, 2 + note C#, 2 + note B_, 4 + note D_, 2 + note C#, 2 + note D_, 1 + note C#, 1 + note D_, 1 + note C#, 1 + note D_, 2 + note C#, 2 + note C#, 2 + note D_, 2 + note B_, 16 + sound_ret + + toggle_sfx ; unused + +Sfx_GetTm: + channel_count 4 + channel 5, Sfx_GetTm_Ch5 + channel 6, Sfx_GetTm_Ch6 + channel 7, Sfx_GetTm_Ch7 + channel 8, Sfx_GetTm_Ch8 + +Sfx_GetTm_Ch5: + toggle_sfx + tempo 144 + volume 7, 7 + duty_cycle 3 + vibrato 8, 2, 4 + note_type 12, 10, 3 + octave 4 + note D_, 1 + rest 1 + octave 3 + note B_, 1 + octave 4 + note D_, 1 + note G_, 6 + volume_envelope 11, 1 + note E_, 2 + note F#, 2 + note G_, 2 + volume_envelope 10, 5 + note F#, 8 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_GetTm_Ch6: + toggle_sfx + duty_cycle 3 + vibrato 8, 2, 4 + note_type 12, 11, 3 + octave 4 + note G_, 1 + rest 1 + note D_, 1 + note G_, 1 + note B_, 6 + volume_envelope 12, 1 + note A_, 2 + note B_, 2 + octave 5 + note C_, 2 + volume_envelope 11, 5 + note D_, 8 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_GetTm_Ch7: + toggle_sfx + note_type 6, 2, 5 + octave 2 + note B_, 2 + rest 2 + note G_, 2 + note B_, 2 + octave 3 + note D_, 4 + octave 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 4 + octave 3 + note C_, 2 + rest 2 + octave 2 + note B_, 2 + rest 2 + octave 3 + note C_, 4 + octave 2 + note A_, 16 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_GetTm_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 6 + note D_, 4 + note C#, 2 + note D_, 2 + note B_, 8 + note D_, 4 + note C#, 4 + note D_, 4 + note C#, 1 + note C#, 1 + note D_, 2 + note B_, 16 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_GetBadge: + channel_count 4 + channel 5, Sfx_GetBadge_Ch5 + channel 6, Sfx_GetBadge_Ch6 + channel 7, Sfx_GetBadge_Ch7 + channel 8, Sfx_GetBadge_Ch8 + +Sfx_GetBadge_Ch5: + toggle_sfx + tempo 120 + volume 7, 7 + duty_cycle 2 + vibrato 8, 2, 4 + note_type 6, 9, 2 + octave 4 + note F_, 3 + sound_call .sub1 + note A#, 3 + transpose 0, 2 + sound_call .sub1 + transpose 0, 0 + volume_envelope 10, 7 + note A_, 16 + rest 6 + sound_ret + + toggle_sfx ; unused + +.sub1: + rest 5 + octave 3 + note F_, 2 + note G#, 2 + octave 4 + note C#, 2 + note F_, 2 + note C#, 2 + octave 3 + note F_, 2 + note G#, 2 + octave 4 + note C#, 2 + octave 3 + note F_, 2 + note G#, 2 + octave 4 + note C#, 2 + note F_, 2 + sound_ret + +Sfx_GetBadge_Ch6: + toggle_sfx + duty_cycle 3 + vibrato 8, 2, 4 + note_type 6, 11, 5 + octave 5 + note C#, 3 + rest 3 + octave 4 + note G#, 1 + rest 1 + note G#, 8 + octave 3 + note C#, 2 + rest 2 + octave 2 + note G#, 2 + rest 1 + volume_envelope 9, 5 + octave 5 + note C_, 1 + volume_envelope 11, 5 + note C#, 2 + rest 2 + note D_, 2 + rest 2 + note D#, 3 + rest 3 + octave 4 + note A#, 1 + rest 1 + note A#, 8 + octave 3 + note D#, 2 + rest 2 + octave 2 + note A#, 2 + rest 1 + volume_envelope 9, 5 + octave 5 + note D_, 1 + volume_envelope 11, 5 + note D#, 8 + note F_, 16 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_GetBadge_Ch7: + toggle_sfx + note_type 6, 2, 5 + octave 2 + note G#, 3 + rest 3 + octave 3 + note C#, 1 + rest 1 + note C#, 8 + note G#, 2 + rest 2 + note F_, 2 + rest 2 + note C#, 2 + note C_, 2 + octave 2 + note A#, 2 + note G#, 2 + note G_, 3 + rest 3 + octave 3 + note D#, 1 + rest 1 + note D#, 8 + note A#, 2 + rest 2 + note G_, 2 + rest 2 + note G_, 2 + note F_, 2 + note G_, 2 + note D#, 2 + note F_, 16 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_GetBadge_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 6 +.loop1: + note B_, 12 + note D_, 1 + note D_, 1 + note D_, 2 + note D_, 4 + note D_, 4 + note D_, 1 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + sound_loop 2, .loop1 + note B_, 16 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_QuitSlots: + channel_count 4 + channel 5, Sfx_QuitSlots_Ch5 + channel 6, Sfx_QuitSlots_Ch6 + channel 7, Sfx_QuitSlots_Ch7 + channel 8, Sfx_QuitSlots_Ch8 + +Sfx_QuitSlots_Ch5: + toggle_sfx + tempo 144 + volume 7, 7 + duty_cycle 2 + note_type 8, 8, 2 + octave 3 + note G#, 2 + rest 4 + note C#, 2 + note F_, 2 + note G#, 2 + note F_, 2 + note G#, 2 + octave 4 + note D_, 2 + note F_, 2 + note D_, 2 + octave 3 + note B_, 2 + note A#, 2 + note F#, 2 + note A#, 2 + note G#, 2 + note F#, 2 + volume_envelope 9, 7 + note G#, 14 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_QuitSlots_Ch6: + toggle_sfx + duty_cycle 2 + note_type 8, 11, 3 + rest 3 + octave 4 + note B_, 1 + octave 5 + note C_, 2 + octave 4 + note G#, 4 + note A#, 2 + volume_envelope 12, 1 + note B_, 4 + note A#, 2 + note G#, 4 + note F_, 2 + note F#, 4 + note F_, 2 + note D#, 4 + volume_envelope 11, 7 + note F_, 14 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_QuitSlots_Ch7: + toggle_sfx + note_type 8, 2, 5 + octave 3 + note C#, 2 + rest 2 + note F_, 2 + note D#, 2 + note C#, 2 + note G#, 2 + note D_, 2 + rest 2 + note D_, 2 + octave 2 + note G#, 2 + note B_, 2 + octave 3 + note D_, 2 + note D#, 2 + rest 2 + octave 2 + note A#, 2 + octave 3 + note C_, 2 + rest 2 + note C#, 14 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_QuitSlots_Ch8: + toggle_sfx + sfx_toggle_noise 3 + drum_speed 8 + note D#, 6 + note D_, 4 + note D#, 2 + note D#, 4 + note D#, 2 + note D_, 4 + note D#, 2 + note D_, 4 + note D#, 2 + note D_, 4 + note B_, 14 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_Protect: + channel_count 2 + channel 5, Sfx_Protect_Ch5 + channel 8, Sfx_Protect_Ch8 + +Sfx_Protect_Ch5: + toggle_sfx + note_type 1, 15, 1 + duty_cycle 0 +.loop1: + octave 5 + note F_, 5 + note A_, 5 + octave 6 + note C_, 5 + note E_, 5 + octave 5 + note F#, 5 + note A#, 5 + octave 6 + note C#, 5 + note E_, 5 + sound_loop 3, .loop1 + volume_envelope 12, 1 + octave 5 + note F_, 5 + note A_, 5 + volume_envelope 9, 1 + octave 6 + note C_, 5 + note E_, 5 + volume_envelope 7, 1 + octave 5 + note F#, 5 + note A#, 5 + volume_envelope 5, 1 + octave 6 + note C#, 5 + note E_, 5 + sound_ret + +Sfx_Protect_Ch8: + noise_note 9, 9, -6, 0 + noise_note 9, 11, -6, 17 + sound_loop 6, Sfx_Protect_Ch8 + noise_note 9, 10, 7, 0 + noise_note 16, 7, 5, 17 + sound_ret + +Sfx_Sketch: + channel_count 1 + channel 5, Sfx_Sketch_Ch5 + +Sfx_Sketch_Ch5: + duty_cycle 1 + pitch_sweep 10, 5 +.loop1: + square_note 2, 15, 1, 1760 + square_note 13, 10, -7, 1456 + square_note 4, 0, 0, 0 + square_note 9, 15, 4, 1816 + sound_loop 3, .loop1 + pitch_sweep 0, 8 + sound_ret + +Sfx_RainDance: + channel_count 1 + channel 8, Sfx_RainDance_Ch8 + +Sfx_RainDance_Ch8: + noise_note 11, 7, -5, 80 + noise_note 6, 7, -5, 79 + noise_note 11, 7, -7, 71 + noise_note 15, 6, -6, 34 + sound_loop 3, Sfx_RainDance_Ch8 + noise_note 6, 6, -5, 80 + noise_note 5, 5, -5, 79 + noise_note 5, 4, -7, 71 + noise_note 10, 3, 2, 70 + sound_ret + +Sfx_Aeroblast: + channel_count 2 + channel 5, Sfx_Aeroblast_Ch5 + channel 8, Sfx_Aeroblast_Ch8 + +Sfx_Aeroblast_Ch5: + duty_cycle_pattern 3, 3, 0, 2 + pitch_sweep 15, 5 + square_note 28, 15, 8, 1408 + pitch_sweep 0, 8 + sound_ret + +Sfx_Aeroblast_Ch8: + noise_note 4, 15, 8, 108 + noise_note 4, 12, 8, 92 + noise_note 4, 7, 8, 91 + noise_note 16, 3, 1, 90 + sound_ret + +Sfx_Spark: + channel_count 1 + channel 8, Sfx_Spark_Ch8 + +Sfx_Spark_Ch8: + noise_note 4, 15, 8, 93 + noise_note 4, 13, 8, 111 + sound_loop 2, Sfx_Spark_Ch8 + sound_ret + +Sfx_Curse: + channel_count 2 + channel 5, Sfx_Curse_Ch5 + channel 8, Sfx_Curse_Ch8 + +Sfx_Curse_Ch5: + duty_cycle 3 + square_note 4, 15, 2, 1155 + square_note 4, 15, 2, 1297 + square_note 4, 15, 2, 1417 + square_note 4, 15, 2, 1517 + sound_ret + +Sfx_Curse_Ch8: + noise_note 20, 9, -2, 9 + sound_ret + +Sfx_Rage: + channel_count 2 + channel 5, Sfx_Rage_Ch5 + channel 8, Sfx_Rage_Ch8 + +Sfx_Rage_Ch5: + duty_cycle 0 + square_note 3, 13, 1, 1968 + square_note 3, 13, 1, 1986 + square_note 24, 13, 2, 2005 + sound_ret + +Sfx_Rage_Ch8: + noise_note 3, 15, 4, 26 + noise_note 3, 15, 4, 25 + noise_note 24, 15, 2, 24 + sound_ret + +Sfx_Thief: + channel_count 1 + channel 8, Sfx_Thief_Ch8 + +Sfx_Thief_Ch8: + noise_note 0, 0, 0, 0 + noise_note 4, 14, 1, 18 + noise_note 0, 0, 0, 0 + noise_note 2, 11, 1, 34 + sound_loop 2, Sfx_Thief_Ch8 + sound_ret + +Sfx_Thief2: + channel_count 1 + channel 5, Sfx_Thief2_Ch5 + +Sfx_Thief2_Ch5: + toggle_sfx + note_type 2, 15, 4 + duty_cycle 0 + octave 4 + note C#, 3 + note A#, 3 + volume_envelope 13, 2 + note C#, 3 + note A#, 3 + volume_envelope 11, 1 + note C_, 3 + note A_, 3 + volume_envelope 8, 1 + note C_, 3 + note A_, 3 + toggle_sfx + sound_ret + +Sfx_SpiderWeb: + channel_count 2 + channel 5, Sfx_SpiderWeb_Ch5 + channel 8, Sfx_SpiderWeb_Ch8 + +Sfx_SpiderWeb_Ch5: + duty_cycle 0 + square_note 32, 7, -7, 1824 + pitch_sweep 9, 5 + square_note 4, 15, 8, 1568 + square_note 4, 14, 8, 1584 + square_note 4, 13, 8, 1600 + square_note 4, 9, 5, 1568 + square_note 4, 7, 3, 1584 + square_note 4, 5, 1, 1600 + pitch_sweep 0, 8 + sound_ret + +Sfx_SpiderWeb_Ch8: + noise_note 32, 14, -7, 0 + sound_ret + +Sfx_MindReader: + channel_count 2 + channel 5, Sfx_MindReader_Ch5 + channel 8, Sfx_MindReader_Ch8 + +Sfx_MindReader_Ch5: + toggle_sfx + duty_cycle 2 + note_type 2, 15, 1 + octave 5 + note C_, 3 + volume_envelope 4, 1 + note C_, 3 + volume_envelope 15, 1 + note C#, 3 + volume_envelope 4, 1 + note C#, 3 + volume_envelope 15, 1 + note D_, 3 + volume_envelope 4, 1 + note D_, 3 + toggle_sfx + sound_ret + +Sfx_MindReader_Ch8: + noise_note 17, 10, -7, 25 + noise_note 18, 10, -7, 24 + sound_ret + +Sfx_Nightmare: + channel_count 1 + channel 5, Sfx_Nightmare_Ch5 + +Sfx_Nightmare_Ch5: + duty_cycle 0 + pitch_sweep 3, 4 +.loop1: + square_note 3, 11, -2, 1585 + square_note 2, 0, 0, 0 + square_note 3, 15, 8, 1569 + square_note 2, 0, 0, 0 + square_note 3, 15, 8, 1553 + square_note 2, 0, 0, 0 + square_note 3, 14, 8, 1537 + square_note 2, 0, 0, 0 + square_note 3, 14, 8, 1521 + square_note 2, 0, 0, 0 + sound_loop 2, .loop1 + pitch_sweep 0, 8 + sound_ret + +Sfx_Snore: + channel_count 1 + channel 8, Sfx_Snore_Ch8 + +Sfx_Snore_Ch8: + noise_note 2, 14, -2, 75 + noise_note 2, 14, -2, 91 + noise_note 2, 0, 0, 0 + noise_note 4, 14, -6, 71 + noise_note 4, 14, -6, 70 + noise_note 4, 14, -6, 69 + sound_ret + +Sfx_SweetKiss: + channel_count 1 + channel 5, Sfx_SweetKiss_Ch5 + +Sfx_SweetKiss_Ch5: + duty_cycle 2 +.loop1: + square_note 2, 12, 1, 1992 + square_note 2, 13, 1, 2010 + sound_loop 2, .loop1 + square_note 26, 15, 1, 2018 + sound_ret + +Sfx_SweetKiss2: + channel_count 1 + channel 5, Sfx_SweetKiss2_Ch5 + +Sfx_SweetKiss2_Ch5: + duty_cycle 0 + pitch_sweep 9, 7 + square_note 2, 15, 4, 1906 + square_note 4, 0, 0, 0 + square_note 2, 12, 4, 1906 + square_note 4, 0, 0, 0 + square_note 2, 11, 4, 1906 + square_note 4, 0, 0, 0 + square_note 2, 10, 1, 1906 + pitch_sweep 0, 8 + sound_ret + +Sfx_BellyDrum: + channel_count 2 + channel 5, Sfx_BellyDrum_Ch5 + channel 8, Sfx_BellyDrum_Ch8 + +Sfx_BellyDrum_Ch5: + duty_cycle 2 + pitch_sweep 10, -4 + square_note 12, 15, 1, 1443 + pitch_sweep 0, 8 + sound_ret + +Sfx_BellyDrum_Ch8: + noise_note 12, 11, 1, 108 + sound_ret + +Sfx_Unknown7F: + channel_count 1 + channel 5, Sfx_Unknown7F_Ch5 + +Sfx_Unknown7F_Ch5: + duty_cycle 2 + pitch_sweep 9, 5 + square_note 2, 12, -1, 947 + square_note 5, 15, 8, 1123 + square_note 4, 13, 1, 1347 + pitch_sweep 0, 8 + sound_ret + +Sfx_SludgeBomb: + channel_count 2 + channel 5, Sfx_SludgeBomb_Ch5 + channel 8, Sfx_SludgeBomb_Ch8 + +Sfx_SludgeBomb_Ch5: + duty_cycle 2 + pitch_sweep 12, 5 + square_note 3, 15, 8, 1409 + square_note 1, 0, 0, 0 + pitch_sweep 12, -3 + square_note 16, 15, 2, 1489 + pitch_sweep 0, 8 + sound_ret + +Sfx_SludgeBomb_Ch8: + noise_note 3, 14, 2, 110 + noise_note 1, 0, 0, 0 + noise_note 16, 14, 2, 109 + sound_ret + +Sfx_Foresight: + channel_count 1 + channel 5, Sfx_Foresight_Ch5 + +Sfx_Foresight_Ch5: + square_note 3, 15, 4, 1973 + square_note 3, 15, 5, 1992 + square_note 8, 15, 4, 2010 + square_note 2, 0, 0, 0 + square_note 8, 12, 1, 2010 + square_note 2, 0, 0, 0 + square_note 8, 9, 1, 2010 + sound_ret + +Sfx_Spite: + channel_count 1 + channel 5, Sfx_Spite_Ch5 + +Sfx_Spite_Ch5: + toggle_sfx + vibrato 0, 1, 2 + duty_cycle 3 + pitch_sweep 15, -5 + note_type 3, 15, 8 + octave 3 + note F_, 3 + note G#, 3 + note B_, 3 + note E_, 3 + note G_, 3 + note A#, 3 + volume_envelope 11, -7 + note D#, 3 + note F#, 3 + note A_, 3 + volume_envelope 5, -7 + note D_, 3 + volume_envelope 2, -7 + note F_, 3 + note G#, 3 + pitch_sweep 0, 8 + toggle_sfx + sound_ret + +Sfx_Outrage: + channel_count 1 + channel 8, Sfx_Outrage_Ch8 + +Sfx_Outrage_Ch8: + noise_note 11, 14, -2, 108 + noise_note 11, 14, -2, 107 + noise_note 11, 14, -2, 106 + noise_note 11, 14, -2, 105 + noise_note 11, 14, 1, 89 + sound_ret + +Sfx_PerishSong: + channel_count 2 + channel 5, Sfx_PerishSong_Ch5 + channel 6, Sfx_PerishSong_Ch6 + +Sfx_PerishSong_Ch5: + toggle_sfx + duty_cycle 0 + vibrato 18, 5, 3 + note_type 8, 10, -7 + octave 4 + note A_, 9 + note G#, 9 + toggle_sfx + sound_ret + +Sfx_PerishSong_Ch6: + toggle_sfx + duty_cycle 0 + vibrato 18, 5, 3 + note_type 8, 10, -7 + octave 4 + note C_, 9 + octave 3 + note B_, 9 + toggle_sfx + sound_ret + +Sfx_GigaDrain: + channel_count 2 + channel 5, Sfx_GigaDrain_Ch5 + channel 8, Sfx_GigaDrain_Ch8 + +Sfx_GigaDrain_Ch5: + duty_cycle 2 + pitch_sweep 9, 7 + square_note 4, 15, 8, 1664 + square_note 20, 15, 8, 1664 + square_note 20, 12, 8, 1632 + square_note 20, 10, 8, 1648 + square_note 20, 8, 8, 1664 + square_note 20, 15, 8, 1377 + square_note 20, 12, 8, 1345 + square_note 20, 10, 8, 1313 + square_note 20, 8, 8, 1297 + pitch_sweep 0, 8 + sound_ret + +Sfx_GigaDrain_Ch8: + noise_note 4, 12, 8, 68 + noise_note 20, 12, 8, 80 + noise_note 20, 12, 8, 82 + noise_note 20, 12, 8, 84 + noise_note 20, 12, 8, 86 + noise_note 64, 12, 7, 87 + sound_ret + +Sfx_Attract: + channel_count 1 + channel 5, Sfx_Attract_Ch5 + +Sfx_Attract_Ch5: + duty_cycle 0 + pitch_sweep 7, 7 + square_note 4, 10, -1, 1776 + square_note 12, 15, 8, 1824 + pitch_sweep 7, -7 + square_note 8, 15, 1, 1856 + pitch_sweep 0, 8 + sound_ret + +Sfx_Kinesis2: + channel_count 1 + channel 5, Sfx_Kinesis2_Ch5 + +Sfx_Kinesis2_Ch5: + duty_cycle 0 + square_note 2, 15, 3, 1942 + square_note 2, 2, 3, 1942 + square_note 20, 15, 1, 1988 + sound_ret + +Sfx_ZapCannon: + channel_count 1 + channel 8, Sfx_ZapCannon_Ch8 + +Sfx_ZapCannon_Ch8: + noise_note 2, 14, 1, 73 + noise_note 0, 0, 0, 0 + sound_loop 8, Sfx_ZapCannon_Ch8 + noise_note 8, 14, 1, 73 + sound_ret + +Sfx_MeanLook: + channel_count 1 + channel 5, Sfx_MeanLook_Ch5 + +Sfx_MeanLook_Ch5: + pitch_sweep 7, 7 + duty_cycle 3 + square_note 2, 15, 8, 1824 +.loop1: + square_note 1, 8, 8, 1632 + square_note 2, 15, 8, 1936 + sound_loop 5, .loop1 + square_note 12, 15, 8, 1792 + square_note 12, 12, 8, 1824 + square_note 12, 10, 8, 1792 + square_note 12, 7, 8, 1824 + square_note 12, 4, 8, 1792 + square_note 12, 2, 8, 1824 + pitch_sweep 0, 8 + sound_ret + +Sfx_HealBell: + channel_count 1 + channel 5, Sfx_HealBell_Ch5 + +Sfx_HealBell_Ch5: + duty_cycle 1 + square_note 1, 15, 1, 2010 + square_note 1, 13, 1, 2009 + square_note 1, 15, 1, 2010 + square_note 8, 13, 1, 2011 + sound_ret + +Sfx_Return: + channel_count 1 + channel 5, Sfx_Return_Ch5 + +Sfx_Return_Ch5: + duty_cycle 0 +.loop1: + pitch_sweep 11, -7 + square_note 8, 15, 1, 1881 + pitch_sweep 5, 7 + square_note 8, 15, 1, 1881 + square_note 16, 0, 0, 0 + sound_loop 2, .loop1 + pitch_sweep 0, 8 + sound_ret + +Sfx_ExpBar: + channel_count 1 + channel 5, Sfx_ExpBar_Ch5 + +Sfx_ExpBar_Ch5: + duty_cycle 2 + pitch_sweep 13, 7 + square_note 8, 14, 1, 1872 + pitch_sweep 14, 7 + square_note 8, 4, 8, 1760 + square_note 8, 5, 8, 1784 + square_note 8, 6, 8, 1808 + square_note 8, 7, 8, 1832 + square_note 8, 8, 8, 1856 + square_note 8, 9, 8, 1880 + square_note 16, 10, 8, 1904 + pitch_sweep 0, 8 + sound_ret + +Sfx_MilkDrink: + channel_count 1 + channel 5, Sfx_MilkDrink_Ch5 + +Sfx_MilkDrink_Ch5: + duty_cycle 2 +.loop1: + pitch_sweep 10, 4 + square_note 2, 14, -2, 1248 + square_note 13, 15, 7, 656 + pitch_sweep 9, -6 + square_note 4, 12, -1, 1505 + square_note 2, 0, 0, 0 + sound_loop 6, .loop1 + pitch_sweep 0, 8 + sound_ret + +Sfx_Present: + channel_count 1 + channel 5, Sfx_Present_Ch5 + +Sfx_Present_Ch5: + duty_cycle 2 + pitch_sweep 13, 6 +.loop1: + square_note 2, 15, 1, 1856 + square_note 1, 0, 0, 0 + sound_loop 3, .loop1 + square_note 16, 15, 1, 1920 + pitch_sweep 0, 8 + sound_ret + +Sfx_MorningSun: + channel_count 1 + channel 5, Sfx_MorningSun_Ch5 + +Sfx_MorningSun_Ch5: + duty_cycle 3 +.loop1: + square_note 2, 15, 1, 2020 + square_note 2, 15, 1, 2016 + square_note 5, 15, 2, 2023 + sound_loop 3, .loop1 + square_note 1, 0, 0, 0 + square_note 8, 12, 2, 2023 + square_note 1, 0, 0, 0 + square_note 8, 8, 2, 2023 + sound_ret + +Sfx_Moonlight: + channel_count 1 + channel 5, Sfx_Moonlight_Ch5 + +Sfx_Moonlight_Ch5: + duty_cycle 2 +.loop1: + square_note 1, 15, 8, 2000 + square_note 4, 15, 1, 2016 + sound_loop 2, .loop1 + square_note 16, 15, 1, 2016 + square_note 16, 13, 1, 2016 + square_note 16, 8, 1, 2016 + sound_ret + +Sfx_Encore: + channel_count 2 + channel 5, Sfx_Encore_Ch5 + channel 8, Sfx_Encore_Ch8 + +Sfx_Encore_Ch5: + duty_cycle 2 + pitch_sweep 12, -6 + square_note 16, 0, 0, 0 +.loop1: + square_note 2, 15, 8, 1908 + square_note 36, 0, 0, 0 + sound_loop 2, .loop1 + pitch_sweep 0, 8 + sound_ret + +Sfx_Encore_Ch8: + noise_note 48, 1, -7, 54 + noise_note 48, 7, 6, 54 + sound_ret + +Sfx_BeatUp: + channel_count 1 + channel 8, Sfx_BeatUp_Ch8 + +Sfx_BeatUp_Ch8: + noise_note 2, 14, 8, 105 + noise_note 6, 13, 8, 36 + noise_note 2, 14, 8, 108 + noise_note 4, 12, 8, 70 + noise_note 6, 13, 1, 36 + sound_ret + +Sfx_SweetScent: + channel_count 1 + channel 5, Sfx_SweetScent_Ch5 + +Sfx_SweetScent_Ch5: + duty_cycle 2 + pitch_sweep 9, 6 + square_note 6, 15, 8, 1888 + square_note 6, 14, 8, 1824 + pitch_sweep 13, -7 + square_note 22, 15, 1, 1840 + pitch_sweep 0, 8 + sound_ret + +Sfx_BatonPass: + channel_count 2 + channel 5, Sfx_BatonPass_Ch5 + channel 8, Sfx_BatonPass_Ch8 + +Sfx_BatonPass_Ch5: + duty_cycle 2 + pitch_sweep 15, 7 + square_note 32, 15, 2, 1664 + square_note 1, 15, 1, 1888 + square_note 32, 0, 0, 0 + square_note 1, 15, 1, 1888 + square_note 26, 0, 0, 0 + square_note 1, 15, 1, 1888 + pitch_sweep 0, 8 + sound_ret + +Sfx_BatonPass_Ch8: + noise_note 32, 15, 2, 32 + sound_ret + +Sfx_EggCrack: + channel_count 1 + channel 5, Sfx_EggCrack_Ch5 + +Sfx_EggCrack_Ch5: + toggle_sfx + note_type 1, 15, 1 + duty_cycle 0 + octave 4 + note D#, 1 + note C_, 1 + rest 1 + note F#, 1 + sound_ret + +Sfx_Evolved: + channel_count 1 + channel 5, Sfx_Evolved_Ch5 + +Sfx_Evolved_Ch5: + toggle_sfx + note_type 1, 12, 1 + octave 4 + note C_, 2 + note E_, 2 + note C_, 2 + note E_, 3 + note G_, 3 + note B_, 3 + octave 5 + note E_, 2 + note C_, 2 + note E_, 2 + note G_, 3 + note B_, 3 + octave 7 + note C_, 16 + sound_ret + +Sfx_MasterBall: + channel_count 1 + channel 5, Sfx_MasterBall_Ch5 + +Sfx_MasterBall_Ch5: + toggle_sfx + duty_cycle 1 + note_type 2, 14, 1 + octave 6 + note B_, 2 + octave 7 + note D_, 2 + octave 6 + note B_, 2 + note G_, 2 + note B_, 2 + note A#, 2 + note A_, 2 + note A#, 2 + note A_, 2 + volume_envelope 12, 1 + note G#, 2 + note G_, 2 + note F#, 2 + volume_envelope 9, 1 + note F_, 2 + note E_, 2 + note D#, 2 + volume_envelope 6, 1 + note D_, 2 + note C#, 2 + note C_, 2 + sound_ret + +Sfx_EggHatch: + channel_count 1 + channel 5, Sfx_EggHatch_Ch5 + +Sfx_EggHatch_Ch5: + toggle_sfx + note_type 2, 15, 1 + duty_cycle 2 + octave 5 + note E_, 1 + note C_, 1 + rest 1 + note G_, 1 + note D_, 1 + volume_envelope 14, 2 + note B_, 7 + volume_envelope 8, 2 + note B_, 7 + volume_envelope 4, 2 + note B_, 7 + sound_ret + +Sfx_GsIntroCharizardFireball: + channel_count 1 + channel 8, Sfx_GsIntroCharizardFireball_Ch8 + +Sfx_GsIntroCharizardFireball_Ch8: + noise_note 8, 12, -7, 77 + noise_note 8, 15, 1, 55 +.loop1: + noise_note 1, 15, 8, 79 + noise_note 0, 12, 8, 38 + noise_note 1, 13, 8, 95 + noise_note 0, 10, 8, 55 + sound_loop 12, .loop1 + noise_note 3, 15, 8, 111 + noise_note 4, 13, 8, 95 + noise_note 12, 13, 8, 92 + noise_note 40, 13, 3, 79 + sound_ret + +Sfx_GsIntroPokemonAppears: + channel_count 1 + channel 8, Sfx_GsIntroPokemonAppears_Ch8 + +Sfx_GsIntroPokemonAppears_Ch8: + noise_note 1, 8, 8, 79 + noise_note 2, 8, -7, 2 + noise_note 2, 5, -7, 18 + noise_note 2, 3, -7, 34 + noise_note 0, 15, 8, 39 + noise_note 1, 15, 8, 79 + noise_note 8, 15, 1, 0 + sound_ret + +Sfx_Flash: + channel_count 1 + channel 5, Sfx_Flash_Ch5 + +Sfx_Flash_Ch5: + duty_cycle 1 + pitch_sweep 14, -7 + square_note 1, 4, 0, 2024 + square_note 1, 6, 0, 2024 + square_note 2, 8, 0, 2024 + square_note 5, 10, 0, 2024 + square_note 6, 10, 0, 2024 + square_note 7, 8, 0, 2024 + square_note 8, 6, 0, 2024 + square_note 9, 3, 0, 2024 + square_note 15, 1, 2, 2024 + pitch_sweep 0, 8 + sound_ret + +Sfx_GameFreakLogoGs: + channel_count 1 + channel 5, Sfx_GameFreakLogoGs_Ch5 + +Sfx_GameFreakLogoGs_Ch5: + duty_cycle 3 + pitch_sweep 7, -7 + square_note 4, 5, 5, 2018 + square_note 5, 7, 5, 2018 + square_note 6, 9, 4, 2018 + square_note 7, 11, 4, 2018 + square_note 8, 11, 3, 2018 + square_note 9, 9, 3, 2018 + square_note 10, 7, 2, 2018 + square_note 10, 5, 3, 2018 + square_note 10, 3, 4, 2018 + square_note 10, 1, 5, 2018 + pitch_sweep 0, 8 + sound_ret + +Sfx_DexFanfareLessThan20: + channel_count 4 + channel 5, Sfx_DexFanfareLessThan20_Ch5 + channel 6, Sfx_DexFanfareLessThan20_Ch6 + channel 7, Sfx_DexFanfareLessThan20_Ch7 + channel 8, Sfx_DexFanfareLessThan20_Ch8 + +Sfx_DexFanfareLessThan20_Ch5: + toggle_sfx + tempo 124 + volume 7, 7 + note_type 8, 11, 1 + octave 3 + note A_, 4 + note F#, 2 + note A_, 4 + note F#, 2 + note C#, 6 + note G_, 6 + note F#, 6 + note E_, 2 + note E_, 2 + note E_, 2 + note D_, 6 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfareLessThan20_Ch6: + toggle_sfx + note_type 8, 12, 1 + octave 3 + note B_, 4 + note A_, 2 + note B_, 4 + note A_, 2 + note D#, 6 + note A#, 6 + note A_, 6 + note A_, 2 + note A_, 2 + note G_, 2 + note F#, 6 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfareLessThan20_Ch7: + toggle_sfx + note_type 8, 2, 5 + octave 4 + note D_, 6 + octave 3 + note A_, 2 + rest 2 + note A_, 2 + note A#, 4 + note G_, 2 + octave 4 + note D#, 6 + note D_, 2 + rest 4 + octave 3 + note E_, 1 + rest 1 + note F#, 1 + rest 1 + note G_, 1 + rest 1 + note A_, 2 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfareLessThan20_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 12 + note C#, 6 + rest 16 + rest 12 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare140169: + channel_count 4 + channel 5, Sfx_DexFanfare140169_Ch5 + channel 6, Sfx_DexFanfare140169_Ch6 + channel 7, Sfx_DexFanfare140169_Ch7 + channel 8, Sfx_DexFanfare140169_Ch8 + +Sfx_DexFanfare140169_Ch5: + toggle_sfx + tempo 120 + volume 7, 7 + duty_cycle 3 + vibrato 18, 3, 4 + note_type 6, 11, 1 + rest 8 + octave 3 + note E_, 4 + note E_, 4 + note A_, 4 + octave 4 + note C#, 4 + volume_envelope 10, 4 + note D_, 4 + note C_, 4 + octave 3 + note A_, 2 + note G_, 2 + note F#, 4 + note G_, 16 + octave 2 + note B_, 8 + rest 8 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare140169_Ch6: + toggle_sfx + duty_cycle 2 + vibrato 18, 3, 4 + note_type 6, 12, 1 + octave 4 + note E_, 4 + note F#, 4 + note G_, 4 + note G_, 4 + note G_, 4 + note G_, 4 + volume_envelope 11, 4 + note F#, 4 + note G_, 4 + note A_, 4 + octave 5 + note C_, 4 + octave 4 + note B_, 16 + note G_, 8 + rest 8 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare140169_Ch7: + toggle_sfx + note_type 12, 2, 5 + rest 4 + octave 2 + note A_, 1 + octave 3 + note C#, 1 + note E_, 1 + note A_, 3 + note C#, 1 + rest 1 + note D_, 1 + note F#, 1 + note A_, 1 + octave 4 + note D_, 3 + octave 2 + note A_, 1 + rest 1 + note G_, 1 + note B_, 1 + octave 3 + note D_, 1 + note G_, 3 + octave 2 + note B_, 1 + rest 1 + note G_, 4 + rest 4 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare140169_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 12 + note C_, 4 +.loop1: + note D_, 4 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + sound_loop 3, .loop1 + note D_, 8 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare170199: + channel_count 4 + channel 5, Sfx_DexFanfare170199_Ch5 + channel 6, Sfx_DexFanfare170199_Ch6 + channel 7, Sfx_DexFanfare170199_Ch7 + channel 8, Sfx_DexFanfare170199_Ch8 + +Sfx_DexFanfare170199_Ch5: + toggle_sfx + tempo 112 + volume 7, 7 + vibrato 18, 3, 4 + duty_cycle 3 + note_type 8, 11, 4 + octave 3 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 6 + rest 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + volume_envelope 12, 1 + note F_, 4 + note G_, 4 + note A_, 4 + note_type 12, 10, 8 + note A#, 12 + rest 4 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare170199_Ch6: + toggle_sfx + vibrato 18, 3, 4 + duty_cycle 3 + note_type 8, 12, 4 + octave 3 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + note A#, 6 + rest 2 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + volume_envelope 13, 1 + octave 4 + note D#, 4 + note D#, 4 + note D#, 4 + note_type 12, 11, 8 + note D_, 12 + rest 4 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare170199_Ch7: + toggle_sfx + note_type 8, 2, 5 + octave 3 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note D#, 6 + rest 2 + note D#, 1 + rest 1 + note D#, 1 + rest 1 + note C_, 2 + rest 2 + note C_, 2 + rest 2 + note C_, 2 + rest 2 + note_type 12, 2, 5 + octave 2 + note A#, 12 + rest 4 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare170199_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 8 + note D_, 2 + note D_, 2 + note D_, 4 + note D_, 4 + note D_, 2 + note D_, 2 + note D_, 4 + note D_, 4 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + drum_speed 12 + note B_, 16 + sound_ret + + db sound_loop_cmd ; unused + +Sfx_DexFanfare200229: + channel_count 4 + channel 5, Sfx_DexFanfare200229_Ch5 + channel 6, Sfx_DexFanfare200229_Ch6 + channel 7, Sfx_DexFanfare200229_Ch7 + channel 8, Sfx_DexFanfare200229_Ch8 + +Sfx_DexFanfare200229_Ch5: + toggle_sfx + tempo 124 + volume 7, 7 + vibrato 18, 3, 4 + duty_cycle 3 + note_type 8, 11, 2 + octave 3 + note C_, 2 + note E_, 2 + note G_, 2 + octave 4 + note C_, 4 + octave 3 + note B_, 4 + note A_, 4 + note A#, 4 + octave 4 + note D#, 4 + note G_, 4 + note_type 12, 10, 8 + note F#, 12 + rest 4 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare200229_Ch6: + toggle_sfx + vibrato 18, 3, 4 + duty_cycle 3 + note_type 8, 11, 2 + octave 3 + note E_, 2 + note G_, 2 + octave 4 + note C_, 2 + note E_, 4 + note D_, 4 + note C_, 4 + note D#, 4 + note G_, 4 + note A#, 4 + note_type 12, 11, 8 + note A_, 12 + rest 4 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare200229_Ch7: + toggle_sfx + note_type 8, 2, 5 + octave 3 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 1 + rest 1 + note C_, 2 + note E_, 2 + note G_, 2 + octave 4 + note C_, 2 + octave 3 + note C_, 4 + note D#, 2 + note G_, 2 + note A#, 2 + octave 4 + note D#, 2 + octave 3 + note D#, 4 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + octave 2 + note A_, 2 + octave 3 + note D_, 1 + rest 1 + note D_, 1 + rest 1 + octave 2 + note A_, 2 + octave 3 + note D_, 6 + rest 6 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare200229_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 8 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + note D_, 4 + note D_, 4 + note D_, 4 + note D_, 4 + note D_, 4 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + note D_, 4 + note D_, 2 + note D_, 2 + note D_, 2 + note D_, 2 + note B_, 12 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare230Plus: + channel_count 4 + channel 5, Sfx_DexFanfare230Plus_Ch5 + channel 6, Sfx_DexFanfare230Plus_Ch6 + channel 7, Sfx_DexFanfare230Plus_Ch7 + channel 8, Sfx_DexFanfare230Plus_Ch8 + +Sfx_DexFanfare230Plus_Ch5: + toggle_sfx + tempo 112 + volume 7, 7 + vibrato 18, 3, 4 + duty_cycle 3 + note_type 8, 10, 5 + octave 3 + note B_, 2 + note G_, 2 + note B_, 2 + octave 4 + note D_, 14 + rest 2 + duty_cycle 2 + volume_envelope 8, 5 + octave 2 + note F_, 1 + rest 1 + note F_, 6 + volume_envelope 10, 5 + duty_cycle 3 + octave 3 + note A_, 2 + note G_, 2 + note F_, 10 + rest 2 + duty_cycle 2 + volume_envelope 8, 5 + octave 2 + note F_, 1 + rest 1 + note F_, 6 + volume_envelope 10, 5 + duty_cycle 3 + octave 3 + note A#, 12 + volume_envelope 11, 2 + note G_, 4 + note A_, 4 + note A#, 4 + note_type 12, 10, 8 + note A_, 14 + rest 2 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare230Plus_Ch6: + toggle_sfx + vibrato 18, 3, 4 + duty_cycle 3 + note_type 8, 11, 5 + octave 4 + note G_, 2 + note D_, 2 + note G_, 2 + note F_, 14 + rest 4 + note F_, 2 + note E_, 2 + note D_, 2 + note C_, 2 + octave 3 + note B_, 2 + note A_, 10 + rest 4 + note A_, 2 + octave 4 + note C_, 2 + note D_, 2 + note D#, 12 + volume_envelope 12, 2 + note G_, 4 + note G_, 4 + note G_, 4 + note_type 12, 11, 8 + note F#, 14 + rest 2 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare230Plus_Ch7: + toggle_sfx + note_type 8, 2, 5 + octave 3 + note G_, 6 + note A#, 4 + note F_, 2 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + note A#, 1 + rest 1 + note A#, 2 + rest 2 + note D_, 1 + rest 1 + note D_, 6 + note A_, 4 + note F_, 2 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 1 + rest 1 + note A_, 2 + rest 2 + note C_, 1 + rest 1 + note C_, 6 + note G_, 4 + note D#, 2 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note G_, 1 + rest 1 + note A#, 4 + note G_, 4 + note D#, 4 + note_type 12, 2, 5 + note D_, 14 + rest 2 + sound_ret + + toggle_sfx ; unused + +Sfx_DexFanfare230Plus_Ch8: + toggle_sfx + sfx_toggle_noise 4 + drum_speed 8 + note D_, 2 + note D_, 2 + note D_, 2 +.loop1: + note D_, 6 + note D_, 2 + note D_, 2 + note D_, 2 + note D_, 6 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + note C#, 1 + sound_loop 2, .loop1 + note D_, 6 + note D_, 2 + note D_, 2 + note C#, 1 + note C#, 1 + note D_, 4 + note D_, 4 + note D_, 4 +.loop2: + note C#, 1 + sound_loop 18, .loop2 + note D_, 6 + sound_ret + + toggle_sfx ; unused + +Sfx_NotVeryEffective: + channel_count 1 + channel 8, Sfx_NotVeryEffective_Ch8 + +Sfx_NotVeryEffective_Ch8: + noise_note 4, 15, 1, 95 + noise_note 1, 10, 0, 66 + noise_note 16, 15, 1, 83 + sound_ret + +Sfx_Damage: + channel_count 1 + channel 8, Sfx_Damage_Ch8 + +Sfx_Damage_Ch8: + noise_note 4, 15, 1, 94 + noise_note 1, 10, 0, 18 + noise_note 4, 15, 0, 50 + noise_note 16, 15, 1, 68 + sound_ret + +Sfx_SuperEffective: + channel_count 1 + channel 8, Sfx_SuperEffective_Ch8 + +Sfx_SuperEffective_Ch8: + noise_note 3, 15, 1, 79 + noise_note 1, 12, 8, 34 + noise_note 2, 15, 8, 63 + noise_note 3, 13, 0, 21 + noise_note 32, 15, 2, 53 + sound_ret + +Sfx_BallBounce: + channel_count 2 + channel 5, Sfx_BallBounce_Ch5 + channel 6, Sfx_BallBounce_Ch6 + +Sfx_BallBounce_Ch5: + duty_cycle 2 + square_note 8, 14, 1, 1856 + square_note 23, 0, 0, 0 + square_note 8, 11, 1, 1856 + square_note 23, 0, 0, 0 + square_note 8, 8, 1, 1856 + square_note 23, 0, 0, 0 + square_note 8, 5, 1, 1856 + square_note 23, 0, 0, 0 + sound_ret + +Sfx_BallBounce_Ch6: + duty_cycle 2 + square_note 2, 0, 8, 0 + square_note 8, 11, 1, 1857 + square_note 23, 0, 0, 0 + square_note 8, 8, 1, 1857 + square_note 23, 0, 0, 0 + square_note 8, 5, 1, 1857 + square_note 23, 0, 0, 0 + square_note 8, 2, 1, 1857 + square_note 23, 0, 0, 0 + sound_ret + +Sfx_SweetScent2: + channel_count 2 + channel 5, Sfx_SweetScent2_Ch5 + channel 8, Sfx_SweetScent2_Ch8 + +Sfx_SweetScent2_Ch5: + pitch_sweep 10, -7 + duty_cycle 1 + square_note 6, 15, 8, 1520 + square_note 2, 15, 1, 1568 + square_note 16, 15, 1, 1616 + pitch_sweep 0, 8 + sound_ret + +Sfx_SweetScent2_Ch8: + noise_note 2, 14, 8, 34 + noise_note 17, 10, -2, 0 +.loop1: + noise_note 4, 13, -1, 16 + noise_note 8, 9, 1, 0 + noise_note 2, 6, 1, 7 + sound_loop 5, .loop1 + noise_note 4, 9, -1, 0 + noise_note 10, 6, 1, 0 + noise_note 6, 5, -1, 0 + noise_note 2, 2, 1, 7 + sound_ret + +Sfx_HitEndOfExpBar: + channel_count 2 + channel 5, Sfx_HitEndOfExpBar_Ch5 + channel 6, Sfx_HitEndOfExpBar_Ch6 + +Sfx_HitEndOfExpBar_Ch5: + duty_cycle 2 + square_note 1, 14, 1, 1929 + square_note 1, 14, 1, 1954 + square_note 16, 14, 1, 1969 + sound_ret + +Sfx_HitEndOfExpBar_Ch6: + duty_cycle 2 + square_note 1, 14, 1, 1954 + square_note 1, 14, 1, 1969 + square_note 16, 14, 1, 1988 + sound_ret + +Sfx_GiveTrademon: + channel_count 1 + channel 5, Sfx_GiveTrademon_Ch5 + +Sfx_GiveTrademon_Ch5: + square_note 32, 0, 0, 0 + duty_cycle 1 + pitch_sweep 10, 7 + square_note 27, 15, 4, 1872 + square_note 27, 13, 4, 1872 + square_note 27, 11, 4, 1872 + square_note 27, 9, 4, 1872 + square_note 27, 7, 4, 1872 + square_note 27, 5, 4, 1872 + square_note 27, 3, 4, 1872 + square_note 27, 1, 4, 1872 + pitch_sweep 0, 8 + sound_ret + +Sfx_GetTrademon: + channel_count 1 + channel 5, Sfx_GetTrademon_Ch5 + +Sfx_GetTrademon_Ch5: + square_note 32, 0, 0, 0 + duty_cycle 2 + pitch_sweep 11, -7 + square_note 27, 1, 4, 1980 + square_note 27, 3, 4, 1980 + square_note 27, 5, 4, 1980 + square_note 27, 7, 4, 1980 + square_note 27, 9, 4, 1980 + square_note 27, 11, 4, 1980 + square_note 27, 13, 4, 1980 + square_note 27, 15, 4, 1980 + pitch_sweep 0, 8 + sound_ret + +Sfx_TrainArrived: + channel_count 3 + channel 5, Sfx_TrainArrived_Ch5 + channel 6, Sfx_TrainArrived_Ch6 + channel 8, Sfx_TrainArrived_Ch8 + +Sfx_TrainArrived_Ch6: + pitch_offset 8 + square_note 8, 0, 0, 0 +Sfx_TrainArrived_Ch5: + duty_cycle 2 + square_note 4, 5, -7, 1681 + square_note 4, 6, -7, 1684 + square_note 4, 7, 8, 1687 + square_note 4, 7, -7, 1690 + square_note 4, 6, 8, 1710 + square_note 16, 6, -7, 1707 + square_note 104, 6, 5, 1704 + sound_ret + +Sfx_TrainArrived_Ch8: + noise_note 5, 10, -7, 16 + noise_note 4, 9, -7, 32 + noise_note 4, 8, -7, 33 + noise_note 4, 7, -7, 34 + noise_note 4, 8, -7, 33 + noise_note 4, 9, -7, 32 + noise_note 4, 9, -7, 16 + noise_note 104, 10, 3, 0 + sound_ret + +Sfx_2Boops: + channel_count 1 + channel 5, Sfx_2Boops_Ch5 + +Sfx_2Boops_Ch5: + duty_cycle 2 +.loop1: + pitch_sweep 7, -1 + square_note 1, 9, -1, 1379 + square_note 4, 15, 2, 1205 + pitch_sweep 4, 3 + square_note 16, 15, 8, 1485 + sound_loop 2, .loop1 + pitch_sweep 0, 8 + sound_ret + +Sfx_IntroWhoosh: + channel_count 1 + channel 8, Sfx_IntroWhoosh_Ch8 + +Sfx_Menu_Ch8: + noise_note 1, 14, 2, 51 + noise_note 8, 14, 1, 34 + sound_ret + +Sfx_Pokeflute_Ch7: + tempo 256 + volume 7, 7 + toggle_sfx + vibrato 16, 1, 4 + note_type 12, 1, 0 + octave 5 + note E_, 2 + note F_, 2 + note G_, 4 + note A_, 2 + note G_, 2 + octave 6 + note C_, 4 + note C_, 2 + note D_, 2 + note C_, 2 + octave 5 + note G_, 2 + note A_, 2 + note F_, 2 + note G_, 8 + rest 12 + sound_ret + +Sfx_PlacePuzzlePieceDown_Ch8: + noise_note 2, 15, 7, 36 + noise_note 2, 15, 7, 52 + noise_note 4, 15, 7, 68 + noise_note 8, 15, 4, 85 + noise_note 8, 15, 1, 68 + sound_ret + +Sfx_EnterDoor_Ch8: + noise_note 9, 15, 1, 68 + noise_note 8, 13, 1, 67 + sound_ret + +Sfx_SwitchPokemon_Ch5: + duty_cycle 2 + square_note 8, 14, 1, 1856 + sound_ret + +Sfx_SwitchPokemon_Ch6: + duty_cycle 2 + square_note 2, 0, 8, 0 + square_note 8, 11, 1, 1857 + sound_ret + +Sfx_PokeballsPlacedOnTable_Ch5: + duty_cycle 2 + pitch_sweep 3, -2 + square_note 4, 15, 2, 512 + pitch_sweep 2, 2 + square_note 8, 14, 2, 512 + pitch_sweep 0, 8 + sound_ret + +Sfx_BallWobble_Ch5: + duty_cycle 2 + pitch_sweep 3, -2 + square_note 4, 15, 2, 1024 + pitch_sweep 2, 2 + square_note 8, 14, 2, 1024 + pitch_sweep 0, 8 + sound_ret + +Sfx_Tally_Ch5: + duty_cycle 2 + square_note 4, 15, 1, 1920 + sound_ret + +Sfx_Tally_Ch6: + duty_cycle 2 + square_note 1, 0, 8, 0 + square_note 4, 10, 1, 1889 + sound_ret + +Sfx_Transaction_Ch5: + duty_cycle 2 + square_note 4, 14, 1, 1792 + square_note 24, 15, 2, 2016 + sound_ret + +Sfx_Transaction_Ch6: + duty_cycle 2 + square_note 1, 0, 8, 0 + square_note 4, 9, 1, 1729 + square_note 24, 10, 2, 1953 + sound_ret + +Sfx_Bump_Ch5: + duty_cycle 2 + pitch_sweep 5, -2 + square_note 15, 15, 1, 768 + pitch_sweep 0, 8 + sound_ret + +Sfx_ExitBuilding_Ch8: + noise_note 2, 15, 1, 84 + noise_note 12, 7, 1, 35 + noise_note 2, 11, 1, 84 + noise_note 12, 6, 1, 35 + noise_note 6, 4, 1, 84 + sound_ret + +Sfx_ReadText_Ch5: +Sfx_ReadText2_Ch5: + duty_cycle 2 + square_note 0, 9, 1, 1984 + square_note 0, 8, 1, 2000 + square_note 0, 9, 1, 1984 + square_note 12, 10, 1, 2000 + sound_ret + +Sfx_Potion_Ch5: + duty_cycle 2 + pitch_sweep 1, 7 + square_note 15, 15, 0, 1264 + square_note 15, 15, 2, 1616 + pitch_sweep 0, 8 + sound_ret + +Sfx_Poison_Ch5: + duty_cycle 0 + pitch_sweep 1, 4 + square_note 4, 15, 2, 1536 + sound_loop 4, Sfx_Poison_Ch5 + square_note 15, 15, 3, 1536 + pitch_sweep 0, 8 + sound_ret + +Sfx_FullHeal_Ch5: + duty_cycle 2 + pitch_sweep 1, 4 + square_note 4, 15, 2, 1536 + square_note 4, 15, 2, 1536 + pitch_sweep 1, 7 + square_note 15, 15, 2, 1536 + pitch_sweep 0, 8 + sound_ret + +Sfx_GotSafariBalls_Ch5: + duty_cycle 2 + pitch_sweep 1, 5 + square_note 15, 15, 0, 1264 + square_note 15, 15, 2, 1616 + pitch_sweep 0, 8 + sound_ret + +Sfx_BootPc_Ch5: + duty_cycle 2 + square_note 15, 15, 2, 1984 + square_note 15, 0, 0, 0 + square_note 3, 10, 1, 1920 + square_note 3, 10, 1, 1792 + square_note 3, 10, 1, 1856 + square_note 3, 10, 1, 1792 + square_note 3, 10, 1, 1920 + square_note 3, 10, 1, 1792 + square_note 3, 10, 1, 1984 + square_note 8, 10, 1, 1792 + sound_ret + +Sfx_ShutDownPc_Ch5: + duty_cycle 2 + square_note 4, 15, 0, 1536 + square_note 4, 15, 0, 1024 + square_note 4, 15, 0, 512 + square_note 1, 0, 0, 0 + sound_ret + +Sfx_ChoosePcOption_Ch5: + duty_cycle 2 + square_note 6, 15, 0, 1792 + square_note 4, 0, 0, 0 + square_note 6, 15, 0, 1792 + square_note 1, 0, 0, 0 + sound_ret + +Sfx_EscapeRope_Ch5: + duty_cycle 1 + pitch_sweep 1, 7 + square_note 15, 13, 7, 1536 + square_note 15, 11, 7, 1408 + square_note 15, 8, 7, 1280 + square_note 15, 4, 7, 1152 + square_note 15, 1, 7, 1024 + pitch_sweep 0, 8 + sound_ret + +Sfx_PushButton_Ch5: + duty_cycle 2 + square_note 4, 0, 0, 0 + square_note 2, 15, 1, 1664 + square_note 1, 0, 0, 0 + square_note 4, 15, 1, 1920 + square_note 4, 0, 0, 0 + sound_ret + +Sfx_SecondPartOfItemfinder_Ch5: + duty_cycle 2 + pitch_sweep 2, -4 + square_note 4, 15, 2, 1280 + pitch_sweep 2, 2 + square_note 2, 15, 1, 1280 + pitch_sweep 0, 8 + square_note 1, 0, 0, 0 + sound_ret + +Sfx_WarpTo_Ch5: + duty_cycle 1 + pitch_sweep 1, 7 + square_note 15, 13, 7, 1280 + square_note 15, 11, 7, 1408 + square_note 15, 8, 7, 1536 + square_note 15, 4, 7, 1664 + square_note 15, 1, 7, 1792 + pitch_sweep 0, 8 + sound_ret + +Sfx_WarpFrom_Ch5: + duty_cycle 1 + pitch_sweep 1, 7 + square_note 15, 13, 7, 1792 + square_note 15, 11, 7, 1664 + square_note 15, 8, 7, 1536 + square_note 15, 4, 7, 1408 + square_note 15, 1, 7, 1280 + pitch_sweep 0, 8 + sound_ret + +Sfx_ChangeDexMode_Ch5: + duty_cycle 1 + pitch_sweep 1, 6 + square_note 15, 13, 2, 1280 + pitch_sweep 0, 8 + sound_ret + +Sfx_JumpOverLedge_Ch5: + duty_cycle 2 + pitch_sweep 9, 5 + square_note 15, 15, 2, 1024 + pitch_sweep 0, 8 + sound_ret + +Sfx_GrassRustle_Ch8: + noise_note 2, 15, 1, 50 + noise_note 2, 0, 0, 0 + noise_note 2, 15, 1, 34 + noise_note 1, 0, 0, 0 + sound_ret + +Sfx_Fly_Ch8: + noise_note 2, 15, 1, 18 + noise_note 2, 0, 0, 0 + noise_note 2, 10, 1, 18 + noise_note 2, 0, 0, 0 + noise_note 2, 13, 1, 18 + noise_note 2, 0, 0, 0 + noise_note 2, 8, 1, 18 + noise_note 2, 0, 0, 0 + noise_note 2, 11, 1, 18 + noise_note 2, 0, 0, 0 + noise_note 2, 6, 1, 18 + noise_note 2, 0, 0, 0 + noise_note 2, 9, 1, 18 + noise_note 2, 0, 0, 0 + noise_note 2, 4, 1, 18 + noise_note 2, 0, 0, 0 + sound_ret + +Sfx_Wrong_Ch5: + duty_cycle 3 + pitch_sweep 5, -2 + square_note 4, 15, 0, 1280 + pitch_sweep 0, 8 + square_note 4, 0, 0, 0 + square_note 15, 15, 0, 1280 + square_note 1, 0, 0, 0 + sound_ret + +Sfx_Wrong_Ch6: + duty_cycle 3 + square_note 4, 15, 0, 1025 + square_note 4, 0, 0, 0 + square_note 15, 15, 0, 1025 + square_note 1, 0, 0, 0 + sound_ret + +Sfx_Squeak_Ch5: + duty_cycle 0 + pitch_sweep 1, 7 + square_note 15, 13, 2, 1792 + pitch_sweep 0, 8 + sound_ret + +Sfx_Strength_Ch8: + noise_note 4, 10, 2, 35 + noise_note 8, 15, 1, 52 + noise_note 15, 0, 0, 0 + noise_note 2, 15, 7, 36 + noise_note 2, 15, 7, 52 + noise_note 4, 15, 7, 68 + noise_note 8, 15, 4, 85 + noise_note 8, 15, 1, 68 + sound_ret + +Sfx_Boat_Ch5: + duty_cycle 2 + square_note 15, 15, 0, 1280 + square_note 4, 0, 0, 0 + square_note 15, 15, 0, 1280 + square_note 15, 15, 0, 1280 + square_note 15, 15, 0, 1280 + square_note 15, 15, 0, 1280 + square_note 15, 15, 2, 1280 + sound_ret + +Sfx_Boat_Ch6: + duty_cycle 3 + square_note 15, 15, 0, 1154 + square_note 4, 0, 0, 0 + square_note 15, 15, 0, 1154 + square_note 15, 15, 0, 1154 + square_note 15, 15, 0, 1154 + square_note 15, 15, 0, 1154 + square_note 15, 15, 2, 1154 + sound_ret + +Sfx_WallOpen_Ch5: + duty_cycle 1 + pitch_sweep 3, -2 + square_note 4, 15, 2, 1280 + pitch_sweep 2, 2 + square_note 4, 14, 2, 1280 + pitch_sweep 3, -2 + square_note 4, 15, 2, 1792 + pitch_sweep 2, 2 + square_note 15, 14, 2, 1792 + pitch_sweep 0, 8 + sound_ret + +Sfx_ElevatorEnd_Ch5: + duty_cycle 2 + square_note 15, 15, 3, 1840 + square_note 8, 6, 5, 1840 + square_note 15, 15, 4, 1792 + square_note 15, 7, 4, 1792 + square_note 15, 4, 4, 1792 + square_note 15, 2, 4, 1792 + sound_ret + +Sfx_ThrowBall_Ch5: + duty_cycle 2 + pitch_sweep 2, -7 + square_note 15, 15, 2, 1920 + sound_ret + +Sfx_ThrowBall_Ch6: + duty_cycle 2 + square_note 15, 12, 2, 1922 + sound_ret + +Sfx_Shine_Ch5: + duty_cycle 0 + square_note 0, 13, 2, 1792 + square_note 0, 13, 2, 1856 + square_note 0, 13, 2, 1920 + square_note 0, 13, 2, 1984 + square_note 10, 14, 1, 2016 + square_note 1, 0, 0, 0 + sound_ret + +Sfx_BallPoof_Ch5: + duty_cycle 2 + pitch_sweep 1, 6 + square_note 15, 15, 2, 1024 + pitch_sweep 0, 8 + sound_ret + +Sfx_BallPoof_Ch8: + noise_note 15, 10, 2, 34 + sound_ret + +Sfx_Unknown3A_Ch5: + square_note 15, 13, 1, 512 + pitch_sweep 0, 8 + sound_ret + +Sfx_Unknown3A_Ch8: + noise_note 4, 15, 5, 51 + noise_note 8, 15, 4, 34 + noise_note 15, 15, 2, 33 + sound_ret + +Sfx_Run_Ch8: + noise_note 2, 6, 1, 35 + noise_note 2, 10, 1, 51 + noise_note 2, 12, 1, 51 + noise_note 2, 5, 1, 17 + noise_note 2, 15, 1, 51 + noise_note 2, 4, 1, 17 + noise_note 2, 12, 1, 51 + noise_note 2, 3, 1, 17 + noise_note 2, 8, 1, 51 + noise_note 2, 3, 1, 17 + noise_note 8, 4, 1, 51 + sound_ret + +Sfx_SlotMachineStart_Ch5: + duty_cycle 2 + pitch_sweep 4, 4 + square_note 15, 15, 0, 1264 + pitch_sweep 1, 7 + square_note 15, 15, 2, 1616 + pitch_sweep 0, 8 + sound_ret + +Sfx_SlotMachineStart_Ch6: + duty_cycle 2 + square_note 15, 9, 2, 1536 + square_note 15, 9, 2, 1922 + sound_ret + +Sfx_Call_Ch5: + pitch_sweep 6, 7 + square_note 4, 15, 7, 1952 + square_note 4, 15, 7, 1952 + square_note 4, 15, 7, 1952 + square_note 4, 15, 7, 1952 + square_note 4, 15, 7, 1952 + pitch_sweep 0, 8 + square_note 4, 0, 0, 0 + sound_ret + +Sfx_Peck_Ch8: + noise_note 2, 10, 1, 18 + sound_ret + +Sfx_Kinesis_Ch5: + duty_cycle 1 + pitch_sweep 10, -7 + square_note 15, 15, 2, 1920 + pitch_sweep 0, 8 + sound_ret + +Sfx_Lick_Ch5: + duty_cycle 1 + pitch_sweep 9, 7 + square_note 15, 15, 2, 1280 + pitch_sweep 0, 8 + sound_ret + +Sfx_Pound_Ch8: + noise_note 2, 10, 1, 34 + sound_ret + +Sfx_MovePuzzlePiece_Ch8: + noise_note 8, 15, 1, 84 + sound_ret + +Sfx_CometPunch_Ch8: + noise_note 15, 8, -7, 17 + noise_note 4, 15, -7, 18 + noise_note 10, 15, 1, 85 + sound_ret + +Sfx_MegaPunch_Ch8: + noise_note 15, 8, -7, 52 + noise_note 8, 15, 2, 53 + noise_note 10, 15, 1, 85 + sound_ret + +Sfx_Scratch_Ch8: + noise_note 15, 9, -7, 35 + noise_note 8, 15, 1, 33 + sound_ret + +Sfx_Vicegrip_Ch8: + noise_note 2, 14, 1, 75 + noise_note 10, 15, 1, 68 + noise_note 2, 14, 1, 58 + noise_note 6, 15, 1, 52 + sound_ret + +Sfx_RazorWind_Ch8: + noise_note 2, 15, 4, 68 + noise_note 2, 15, 4, 20 + noise_note 15, 15, 1, 50 + sound_ret + +Sfx_Cut_Ch8: + noise_note 4, 8, -7, 85 + noise_note 2, 15, 4, 68 + noise_note 8, 15, 4, 34 + noise_note 15, 15, 2, 33 + sound_ret + +Sfx_WingAttack_Ch8: + noise_note 8, 4, -7, 35 + noise_note 4, 12, 4, 34 + noise_note 6, 15, 2, 35 + sound_loop 4, Sfx_WingAttack_Ch8 + sound_ret + +Sfx_Whirlwind_Ch8: + noise_note 8, 4, -7, 51 + noise_note 4, 12, 4, 34 + noise_note 6, 15, 2, 35 + noise_note 15, 15, 2, 34 + sound_ret + +Sfx_Bind_Ch8: + noise_note 8, 15, -7, 50 + noise_note 8, 15, 4, 67 + noise_note 8, 15, 2, 84 + noise_note 8, 15, 1, 101 + sound_ret + +Sfx_VineWhip_Ch8: + noise_note 1, 12, 2, 51 + noise_note 2, 15, 2, 33 + noise_note 1, 14, 2, 51 + noise_note 1, 12, 2, 50 + noise_note 1, 9, 2, 18 + noise_note 1, 11, 2, 49 + noise_note 12, 9, 1, 16 + noise_note 8, 15, 2, 65 + sound_ret + +Sfx_DoubleKick_Ch8: + noise_note 1, 9, 4, 35 + noise_note 1, 11, 4, 34 + noise_note 8, 15, 1, 68 + sound_ret + +Sfx_MegaKick_Ch8: + noise_note 2, 9, 4, 51 + noise_note 4, 11, 4, 34 + noise_note 4, 15, 1, 68 + noise_note 8, 15, 1, 85 + sound_ret + +Sfx_Headbutt_Ch8: + noise_note 4, 15, -7, 85 + noise_note 8, 15, 1, 101 + sound_ret + +Sfx_HornAttack_Ch8: + noise_note 2, 8, 4, 67 + noise_note 2, 12, 4, 34 + noise_note 8, 15, 2, 52 + sound_ret + +Sfx_Tackle_Ch8: + noise_note 4, 15, 1, 52 + noise_note 15, 15, 2, 100 + sound_ret + +Sfx_PoisonSting_Ch8: + noise_note 2, 15, 1, 34 + noise_note 15, 15, 2, 18 + sound_ret + +Sfx_Powder_Ch8: + noise_note 2, 12, 2, 1 + noise_note 15, 15, 4, 1 + noise_note 15, 15, 2, 1 + sound_ret + +Sfx_Doubleslap_Ch8: + noise_note 8, 15, 1, 50 + noise_note 8, 15, 1, 51 + sound_ret + +Sfx_Bite_Ch5: + duty_cycle 0 + pitch_sweep 3, -2 + square_note 4, 15, 2, 512 + pitch_sweep 2, 2 + square_note 8, 14, 2, 512 + pitch_sweep 0, 8 + sound_ret + +Sfx_Bite_Ch8: + noise_note 0, 13, 1, 66 + noise_note 4, 10, 1, 50 + noise_note 0, 13, 1, 34 + noise_note 6, 10, 1, 50 + sound_ret + +Sfx_JumpKick_Ch8: + noise_note 3, 9, 2, 49 + noise_note 3, 11, 2, 50 + noise_note 3, 12, 2, 51 + noise_note 8, 15, 1, 84 + sound_ret + +Sfx_Stomp_Ch8: + noise_note 12, 15, 1, 84 + noise_note 8, 15, 1, 100 + sound_ret + +Sfx_TailWhip_Ch8: + noise_note 2, 15, 1, 51 + noise_note 2, 12, 1, 50 + noise_note 2, 10, 1, 49 + noise_note 15, 8, 2, 50 + noise_note 8, 15, 1, 52 + sound_ret + +Sfx_KarateChop_Ch8: + noise_note 2, 13, 2, 50 + noise_note 15, 15, 2, 67 + sound_ret + +Sfx_Submission_Ch8: + noise_note 2, 15, 2, 67 + noise_note 4, 11, 5, 50 + noise_note 9, 8, 6, 49 + noise_note 7, 6, 4, 0 + noise_note 15, 15, 2, 85 + sound_ret + +Sfx_WaterGun_Ch5: + duty_cycle 1 + pitch_sweep 9, 7 + square_note 15, 15, 2, 1792 + pitch_sweep 0, 8 + sound_ret + +Sfx_WaterGun_Ch8: + noise_note 15, 3, -7, 34 + noise_note 15, 15, 2, 33 + sound_ret + +Sfx_SwordsDance_Ch8: + noise_note 15, 4, -7, 65 + noise_note 8, 8, -7, 65 + noise_note 8, 12, -7, 65 + noise_note 8, 15, 2, 66 + noise_note 15, 15, 2, 65 + sound_ret + +Sfx_Thunder_Ch8: + noise_note 10, 15, -7, 80 + noise_note 15, 15, -7, 81 + noise_note 8, 15, 2, 81 + noise_note 6, 15, -7, 82 + noise_note 6, 15, -7, 83 + noise_note 8, 15, -7, 84 + noise_note 15, 15, 2, 84 + sound_ret + +Sfx_Supersonic_Ch5: + duty_cycle 2 + square_note 15, 3, -7, 1984 +.loop: + square_note 15, 13, -7, 1984 + sound_loop 4, .loop + square_note 15, 13, 1, 1984 + sound_ret + +Sfx_Supersonic_Ch6: + duty_cycle_pattern 2, 3, 0, 3 + square_note 15, 2, -7, 1992 +.loop: + square_note 15, 12, -7, 1991 + sound_loop 4, .loop + square_note 15, 12, 1, 1992 + sound_ret + +Sfx_Supersonic_Ch8: + noise_note 3, 9, 7, 18 + noise_note 3, 10, 1, 17 + sound_loop 10, Sfx_Supersonic_Ch8 + sound_ret + +Sfx_Leer_Ch5: + duty_cycle 0 + square_note 0, 15, 1, 1984 + square_note 0, 15, 1, 1792 + sound_loop 12, Sfx_Leer_Ch5 + sound_ret + +Sfx_Leer_Ch6: + duty_cycle_pattern 2, 3, 0, 3 + square_note 0, 14, 1, 1985 + square_note 0, 14, 1, 1793 + sound_loop 12, Sfx_Leer_Ch6 + sound_ret + +Sfx_Leer_Ch8: + noise_note 1, 13, 1, 73 + noise_note 1, 13, 1, 41 + sound_loop 6, Sfx_Leer_Ch8 + sound_ret + +Sfx_Ember_Ch5: + duty_cycle_pattern 3, 0, 2, 1 + square_note 11, 15, 3, 288 + square_note 9, 13, 3, 336 + sound_loop 5, Sfx_Ember_Ch5 + square_note 8, 14, 3, 304 + square_note 15, 12, 2, 272 + sound_ret + +Sfx_Ember_Ch8: + noise_note 10, 15, 3, 53 + noise_note 14, 15, 6, 69 + sound_loop 4, Sfx_Ember_Ch8 + noise_note 12, 15, 4, 188 + noise_note 12, 15, 5, 156 + noise_note 15, 15, 4, 172 + sound_ret + +Sfx_Bubblebeam_Ch5: + duty_cycle_pattern 0, 3, 2, 1 + square_note 4, 15, 4, 1536 + square_note 3, 12, 4, 1280 + square_note 5, 11, 5, 1536 + square_note 13, 14, 2, 1728 + sound_loop 3, Sfx_Bubblebeam_Ch5 + square_note 8, 13, 1, 1536 + sound_ret + +Sfx_Bubblebeam_Ch6: + duty_cycle_pattern 2, 0, 3, 1 + square_note 5, 14, 4, 1504 + square_note 4, 11, 4, 1248 + square_note 6, 10, 5, 1512 + square_note 14, 13, 1, 1696 + sound_loop 3, Sfx_Bubblebeam_Ch6 + sound_ret + +Sfx_Bubblebeam_Ch8: + noise_note 5, 12, 3, 51 + noise_note 3, 9, 2, 67 + noise_note 10, 11, 5, 51 + noise_note 15, 12, 3, 50 + sound_loop 2, Sfx_Bubblebeam_Ch8 + sound_ret + +Sfx_HydroPump_Ch5: + duty_cycle_pattern 3, 1, 0, 2 + square_note 3, 8, 1, 768 + square_note 3, 12, 1, 1024 + square_note 3, 15, 1, 1280 + square_note 3, 11, 1, 1024 + square_note 3, 7, 1, 768 + sound_loop 5, Sfx_HydroPump_Ch5 + square_note 8, 8, 1, 1024 + sound_ret + +Sfx_HydroPump_Ch8: + noise_note 3, 6, 2, 34 + noise_note 3, 10, 2, 50 + noise_note 3, 13, 2, 51 + noise_note 3, 9, 2, 35 + noise_note 3, 5, 2, 18 + sound_loop 5, Sfx_HydroPump_Ch8 + noise_note 8, 8, 1, 18 + sound_ret + +Sfx_Surf_Ch5: + duty_cycle_pattern 0, 3, 2, 1 + square_note 15, 15, 4, 1280 + square_note 15, 12, 4, 1024 + square_note 15, 14, 2, 1472 + sound_loop 3, Sfx_Surf_Ch5 + sound_ret + +Sfx_Surf_Ch6: + duty_cycle_pattern 2, 0, 3, 1 + square_note 7, 14, 4, 1072 + square_note 15, 11, 4, 816 + square_note 15, 10, 2, 1080 + sound_loop 4, Sfx_Surf_Ch6 + sound_ret + +Sfx_Surf_Ch8: + noise_note 9, 15, 4, 68 + noise_note 9, 15, 2, 67 + noise_note 15, 15, 4, 66 + noise_note 15, 15, 4, 65 + sound_loop 3, Sfx_Surf_Ch8 + sound_ret + +Sfx_Psybeam_Ch5: + duty_cycle_pattern 2, 2, 0, 1 + square_note 10, 15, 1, 1600 + square_note 10, 15, 3, 1664 + square_note 10, 15, 2, 1568 + sound_loop 4, Sfx_Psybeam_Ch5 + square_note 10, 15, 1, 1600 + sound_ret + +Sfx_Psybeam_Ch6: + duty_cycle_pattern 2, 3, 0, 3 + square_note 10, 15, 3, 1393 + square_note 7, 14, 3, 1329 + square_note 10, 15, 1, 1361 + sound_loop 4, Sfx_Psybeam_Ch6 + square_note 10, 15, 1, 1393 + sound_ret + +Sfx_Psybeam_Ch8: + noise_note 2, 13, 1, 74 + noise_note 2, 13, 2, 42 + sound_loop 21, Sfx_Psybeam_Ch8 + sound_ret + +Sfx_Charge_Ch5: + duty_cycle 0 + square_note 2, 15, 1, 512 + square_note 3, 15, 1, 1792 + square_note 4, 15, 1, 1280 + square_note 5, 15, 1, 2032 + sound_loop 8, Sfx_Charge_Ch5 + sound_ret + +Sfx_Charge_Ch6: + duty_cycle_pattern 2, 3, 0, 3 + square_note 2, 14, 1, 770 + square_note 3, 14, 1, 2034 + square_note 4, 14, 1, 1538 + square_note 5, 14, 1, 1794 + sound_loop 8, Sfx_Charge_Ch6 + sound_ret + +Sfx_Charge_Ch8: + noise_note 2, 13, 3, 16 + noise_note 3, 13, 3, 17 + noise_note 2, 13, 2, 16 + noise_note 5, 13, 2, 18 + sound_loop 9, Sfx_Charge_Ch8 + sound_ret + +Sfx_Thundershock_Ch5: + duty_cycle_pattern 0, 2, 2, 3 + square_note 3, 15, 1, 2032 + square_note 4, 15, 2, 512 + sound_loop 8, Sfx_Thundershock_Ch5 + sound_ret + +Sfx_Thundershock_Ch6: + duty_cycle_pattern 2, 3, 0, 3 + square_note 4, 14, 2, 514 + square_note 4, 14, 1, 2018 + sound_loop 9, Sfx_Thundershock_Ch6 + sound_ret + +Sfx_Thundershock_Ch8: + noise_note 4, 15, -7, 67 + noise_note 4, 15, 2, 68 + sound_loop 9, Sfx_Thundershock_Ch8 + sound_ret + +Sfx_Psychic_Ch5: + duty_cycle 2 + pitch_sweep 15, 7 + square_note 8, 12, 4, 1981 + square_note 8, 12, 4, 1982 + square_note 8, 12, 4, 1983 + square_note 8, 12, 4, 1984 + square_note 15, 12, 4, 1985 + square_note 15, 15, 2, 1984 + pitch_sweep 0, 8 + sound_ret + +Sfx_Psychic_Ch6: + duty_cycle 2 + square_note 8, 12, 4, 1904 + square_note 8, 12, 4, 1889 + square_note 8, 12, 4, 1890 + square_note 8, 12, 4, 1891 + square_note 15, 12, 4, 1892 + square_note 15, 15, 2, 1892 + sound_ret + +Sfx_Psychic_Ch8: + noise_note 15, 3, -7, 20 + noise_note 15, 12, -7, 19 + noise_note 15, 12, -7, 18 + noise_note 15, 12, -7, 17 + noise_note 15, 12, -7, 16 + noise_note 15, 12, 2, 16 + sound_ret + +Sfx_Screech_Ch5: + duty_cycle 2 + square_note 15, 15, -7, 2016 + square_note 15, 15, -7, 2016 + square_note 15, 15, -7, 2016 + square_note 15, 15, -7, 2016 + square_note 15, 15, 2, 2016 + sound_ret + +Sfx_Screech_Ch6: + duty_cycle 3 + square_note 15, 15, -7, 2018 + square_note 15, 15, -7, 2017 + square_note 15, 15, -7, 2018 + square_note 15, 15, -7, 2017 + square_note 15, 15, 2, 2018 + sound_ret + +Sfx_BoneClub_Ch5: + duty_cycle 2 + pitch_sweep 10, -7 + square_note 8, 15, 1, 1792 + pitch_sweep 0, 8 + sound_ret + +Sfx_BoneClub_Ch6: + duty_cycle 3 + square_note 8, 15, 1, 1793 + sound_ret + +Sfx_Sharpen_Ch5: + duty_cycle 2 + square_note 6, 15, 1, 1280 + square_note 6, 15, 1, 1408 + square_note 6, 15, 1, 1536 + square_note 6, 15, 1, 1664 + square_note 8, 15, 1, 1792 + sound_ret + +Sfx_Sharpen_Ch6: + duty_cycle 3 + square_note 6, 14, 1, 1296 + square_note 6, 14, 1, 1424 + square_note 6, 14, 1, 1552 + square_note 6, 14, 1, 1680 + square_note 8, 14, 1, 1808 + sound_ret + +Sfx_EggBomb_Ch5: + duty_cycle_pattern 3, 2, 3, 1 + square_note 8, 15, -7, 1016 + square_note 15, 15, -7, 1024 + square_note 15, 15, 3, 1024 + sound_ret + +Sfx_EggBomb_Ch6: + duty_cycle_pattern 2, 3, 1, 0 + square_note 8, 14, -7, 960 + square_note 15, 14, -7, 960 + square_note 15, 14, 3, 960 + sound_ret + +Sfx_EggBomb_Ch8: + noise_note 4, 15, -7, 81 + noise_note 8, 15, -7, 84 + noise_note 15, 15, -7, 85 + noise_note 15, 15, 3, 86 + sound_ret + +Sfx_Sing_Ch5: + toggle_sfx + vibrato 10, 2, 4 + duty_cycle 2 + note_type 10, 8, 7 + octave 5 + note G_, 8 + octave 6 + note F_, 4 + note D#, 4 + octave 5 + note G_, 8 + sound_ret + +Sfx_Sing_Ch6: + toggle_sfx + vibrato 10, 2, 3 + duty_cycle 2 + note_type 11, 6, 7 + octave 5 + note G_, 8 + note_type 10, 6, 7 + octave 6 + note F_, 4 + note D#, 4 + octave 5 + note G_, 8 + sound_ret + +Sfx_HyperBeam_Ch5: + duty_cycle 0 + square_note 2, 15, 1, 1920 + square_note 2, 15, 1, 1792 + square_note 2, 15, 1, 1936 + square_note 2, 15, 1, 1792 + square_note 2, 15, 1, 1952 + square_note 2, 15, 1, 1792 + square_note 2, 15, 1, 1968 + square_note 2, 15, 1, 1792 + square_note 2, 15, 1, 1984 + square_note 2, 15, 1, 1792 + square_note 2, 15, 1, 2000 +.loop: + square_note 2, 15, 1, 1792 + square_note 2, 15, 1, 2016 + sound_loop 12, .loop + square_note 15, 15, 1, 1792 + sound_ret + +Sfx_HyperBeam_Ch6: + duty_cycle_pattern 2, 3, 0, 3 + square_note 2, 15, 1, 1921 + square_note 2, 15, 1, 1793 + square_note 2, 15, 1, 1937 + square_note 2, 15, 1, 1793 + square_note 2, 15, 1, 1953 + square_note 2, 15, 1, 1793 + square_note 2, 15, 1, 1969 + square_note 2, 15, 1, 1793 + square_note 2, 15, 1, 1985 + square_note 2, 15, 1, 1793 + square_note 2, 15, 1, 2001 +.loop: + square_note 2, 15, 1, 1793 + square_note 2, 15, 1, 2017 + sound_loop 12, .loop + square_note 15, 15, 1, 1793 + sound_ret + +Sfx_HyperBeam_Ch8: + noise_note 1, 13, 1, 73 + noise_note 1, 13, 1, 41 + sound_loop 26, Sfx_HyperBeam_Ch8 + sound_ret + +Sfx_Unknown60_Ch8: + noise_note 6, 2, 0, 16 + noise_note 6, 2, -7, 64 + noise_note 6, 4, -7, 65 + noise_note 6, 8, -7, 65 + noise_note 6, 12, -7, 66 + noise_note 8, 13, 7, 66 + noise_note 15, 14, 7, 67 + noise_note 15, 15, 2, 67 + sound_ret + +Sfx_IntroWhoosh_Ch8: + noise_note 1, 1, 0, 16 + noise_note 2, 2, 0, 16 + noise_note 2, 3, 0, 32 + noise_note 2, 4, 0, 32 + noise_note 2, 5, 0, 33 + noise_note 2, 6, 0, 34 + noise_note 4, 7, 0, 34 + noise_note 8, 8, 0, 34 + noise_note 15, 9, 4, 34 + sound_ret + +Sfx_Unknown61_Ch8: + noise_note 4, 13, 1, 65 + sound_ret + +Sfx_SwitchPockets_Ch8: + noise_note 4, 12, 1, 66 + sound_ret + +Sfx_Unknown63_Ch8: + noise_note 2, 6, -7, 33 + noise_note 2, 10, -7, 49 + noise_note 15, 15, 2, 65 + sound_ret + +Sfx_Burn_Ch8: + noise_note 2, 13, 2, 50 + noise_note 15, 15, 2, 67 + sound_ret + +Sfx_TitleScreenEntrance_Ch8: + noise_note 2, 7, 0, 34 + noise_note 2, 8, 0, 35 + noise_note 2, 9, 0, 36 + noise_note 2, 10, 0, 37 + noise_note 2, 11, 0, 38 + noise_note 15, 12, 2, 38 + sound_ret + +Sfx_Unknown66_Ch5: + duty_cycle 2 + square_note 1, 15, 2, 1696 + square_note 1, 15, 2, 1760 + square_note 8, 15, 1, 1792 + sound_ret + +Sfx_GetCoinFromSlots_Ch5: + duty_cycle 2 + square_note 2, 15, 1, 1792 + square_note 8, 8, 1, 2016 + sound_ret + +Sfx_PayDay_Ch5: + duty_cycle 3 + square_note 5, 14, 1, 1792 + square_note 2, 14, 1, 1920 + square_note 15, 15, 1, 1984 + sound_ret + +Sfx_PayDay_Ch6: + duty_cycle 2 + square_note 4, 12, 1, 1729 + square_note 2, 12, 1, 1857 + square_note 15, 13, 1, 1921 + sound_ret + +Sfx_Metronome_Ch5: + duty_cycle 2 + pitch_sweep 5, -7 + square_note 4, 4, 0, 2016 + square_note 4, 6, 0, 2016 + square_note 4, 8, 0, 2016 + square_note 8, 10, 0, 2016 + square_note 8, 10, 0, 2016 + square_note 8, 8, 0, 2016 + square_note 8, 6, 0, 2016 + square_note 8, 3, 0, 2016 + square_note 15, 1, 2, 2016 + pitch_sweep 0, 8 + sound_ret + +Sfx_Unknown5F_Ch5: +.loop: + square_note 2, 15, 7, 1537 + square_note 2, 15, 7, 1793 + sound_loop 8, .loop + sound_ret + +Sfx_Unknown5F_Ch6: + square_note 1, 15, 7, 65535 + square_note 2, 15, 7, 1538 + square_note 2, 15, 7, 1794 + sound_loop 8, Sfx_Unknown5F_Ch5.loop + sound_ret + +Sfx_Fanfare2_Ch5: + toggle_sfx + sfx_priority_on + tempo 256 + volume 7, 7 + pitch_offset 1 + duty_cycle 3 + note_type 6, 11, 5 + octave 3 + note G#, 4 + note_type 4, 11, 2 + note F_, 2 + note G#, 2 + note A_, 2 + note A#, 2 + note F#, 2 + note A#, 2 + octave 4 + note C_, 4 + note C_, 2 + note_type 4, 11, 6 + note C#, 12 + sfx_priority_off + sound_ret + +Sfx_Fanfare2_Ch6: + toggle_sfx + duty_cycle 2 + note_type 6, 12, 5 + octave 4 + note C#, 6 + note_type 4, 12, 1 + note C#, 1 + note C#, 1 + note C#, 1 + note_type 4, 12, 2 + note D#, 2 + note C#, 2 + note D#, 2 + note E_, 4 + note E_, 2 + note_type 4, 12, 6 + note F_, 12 + sound_ret + +Sfx_Fanfare2_Ch8: + toggle_sfx + drum_speed 6 + note C_, 1 + octave 5 + note C#, 2 + rest 2 + note C#, 2 + rest 2 + drum_speed 4 + note C_, 1 + note C#, 2 + rest 2 + note C#, 2 + note D#, 2 + rest 2 + note F_, 2 + note G#, 6 + sound_ret + +Sfx_Fanfare_Ch5: + toggle_sfx + sfx_priority_on + tempo 256 + volume 7, 7 + duty_cycle 3 + pitch_offset 1 + note_type 6, 11, 3 + octave 3 + note F_, 4 + note C#, 4 + note F#, 4 + note D#, 4 + note G#, 4 + note F_, 4 + note A#, 4 + note F#, 4 + note_type 4, 11, 3 + note A#, 4 + note B_, 4 + octave 4 + note C_, 4 + note C#, 4 + note D#, 4 + note C_, 4 + note_type 4, 11, 6 + note C#, 12 + sfx_priority_off + sound_ret + +Sfx_Fanfare_Ch6: + toggle_sfx + duty_cycle 2 + note_type 6, 12, 4 + octave 4 + note C#, 4 + note_type 4, 12, 4 + note C#, 2 + octave 3 + note A#, 2 + octave 4 + note C#, 2 + note D#, 6 + note D#, 2 + octave 3 + note B_, 2 + octave 4 + note D#, 2 + note F_, 6 + note F_, 2 + note C#, 2 + note F_, 2 + note F#, 6 + note F#, 2 + note D#, 2 + note F#, 2 + note C#, 4 + note D#, 4 + note E_, 4 + note F_, 4 + note F#, 4 + note G#, 4 + note_type 4, 12, 6 + note F#, 12 + sound_ret + +Sfx_Fanfare_Ch8: + toggle_sfx + drum_speed 6 + note C_, 1 + octave 4 + note A#, 4 + rest 4 + note B_, 4 + rest 4 + octave 5 + note C#, 4 + rest 4 + note D#, 4 + rest 4 + drum_speed 4 + note C_, 1 + note F_, 4 + note D#, 4 + note C#, 4 + note A#, 4 + note G#, 4 + note F_, 4 + note F#, 6 + sound_ret + +Sfx_HangUp_Ch5: + duty_cycle 2 + square_note 4, 11, 8, 1915 + square_note 2, 2, 1, 1915 + square_note 16, 0, 0, 0 +Sfx_NoSignal_Ch5: + duty_cycle 2 + square_note 20, 14, 8, 1803 + square_note 28, 0, 0, 0 + sound_loop 3, Sfx_NoSignal_Ch5 + sound_ret + +Sfx_Unknown5F_Ch8: +Sfx_Sandstorm_Ch8: + noise_note 1, 15, 8, 65 + noise_note 2, 9, -4, 36 + noise_note 0, 0, 0, 0 + noise_note 3, 5, -1, 22 + noise_note 2, 0, 0, 0 + sound_loop 3, Sfx_Sandstorm_Ch8 + sound_ret + +Sfx_Elevator_Ch5: + duty_cycle 2 + pitch_sweep 5, -2 +.loop: + square_note 2, 15, 1, 768 + sound_loop 48, .loop + pitch_sweep 0, 8 + duty_cycle 2 + square_note 15, 15, 3, 1840 + square_note 8, 6, 5, 1840 + square_note 15, 15, 4, 1792 + square_note 15, 7, 4, 1792 + square_note 15, 4, 4, 1792 + square_note 15, 2, 4, 1792 + sound_ret + +Sfx_Elevator_Ch6: +Sfx_Elevator_Ch7: + square_note 96, 0, 0, 0 + square_note 83, 0, 0, 0 + sound_ret + +Sfx_Elevator_Ch8: + noise_note 96, 0, 0, 0 + noise_note 83, 0, 0, 0 + sound_ret + +Sfx_StopSlot: + channel_count 1 + channel 5, Sfx_StopSlot_Ch5 + +Sfx_StopSlot_Ch5: + duty_cycle 2 + square_note 1, 15, 8, 1888 + square_note 4, 8, 2, 1888 + sound_ret + +Sfx_GlassTing: + channel_count 1 + channel 5, Sfx_GlassTing_Ch5 + +Sfx_GlassTing_Ch5: + duty_cycle 2 + square_note 32, 13, 1, 2012 + sound_ret + +Sfx_GlassTing2: + channel_count 2 + channel 5, Sfx_GlassTing2_Ch5 + channel 6, Sfx_GlassTing2_Ch6 + +Sfx_GlassTing2_Ch5: + duty_cycle 2 + square_note 16, 15, 1, 2012 + sound_ret + +Sfx_GlassTing2_Ch6: + duty_cycle 2 + square_note 16, 13, 1, 2013 + sound_ret diff --git a/audio/sfx_crystal.asm b/audio/sfx_crystal.asm new file mode 100644 index 0000000..1a5d1e2 --- /dev/null +++ b/audio/sfx_crystal.asm @@ -0,0 +1,285 @@ +Sfx_IntroUnown1: + channel_count 1 + channel 5, Sfx_IntroUnown1_Ch5 + +Sfx_IntroUnown1_Ch5: + vibrato 1, 10, 3 + duty_cycle 2 + square_note 8, 3, -1, 1797 + square_note 32, 14, 2, 1797 + sound_ret + +Sfx_IntroUnown2: + channel_count 1 + channel 6, Sfx_IntroUnown2_Ch6 + +Sfx_IntroUnown2_Ch6: + vibrato 1, 7, 3 + duty_cycle 2 + square_note 8, 3, -1, 1880 + square_note 32, 14, 2, 1880 + sound_ret + +Sfx_IntroUnown3: + channel_count 1 + channel 7, Sfx_IntroUnown3_Ch7 + +Sfx_IntroUnown3_Ch7: + vibrato 1, 5, 3 + square_note 3, 3, 2, 1986 + square_note 3, 2, 2, 1986 + square_note 3, 1, 2, 1986 + square_note 16, 1, 2, 1986 + square_note 6, 2, 2, 1986 + square_note 6, 3, 2, 1986 + sound_ret + +Sfx_DittoPopUp: + channel_count 1 + channel 5, Sfx_DittoPopUp_Ch5 + +Sfx_DittoPopUp_Ch5: + duty_cycle 2 + pitch_sweep 1, -6 + square_note 3, 8, 2, 1792 + square_note 1, 3, 1, 1793 + pitch_sweep 1, 6 + square_note 4, 11, 1, 1600 + square_note 16, 3, 1, 1601 + sound_ret + +Sfx_DittoTransform: + channel_count 1 + channel 5, Sfx_DittoTransform_Ch5 + +Sfx_DittoTransform_Ch5: + duty_cycle 1 + pitch_sweep 2, 6 + square_note 20, 3, -3, 1088 + square_note 4, 9, 7, 1216 + square_note 4, 6, 7, 1217 + square_note 4, 4, 2, 1218 + sound_ret + +Sfx_IntroSuicune1: + channel_count 1 + channel 8, Sfx_IntroSuicune1_Ch8 + +Sfx_IntroSuicune1_Ch8: + noise_note 1, 5, 8, 89 + noise_note 2, 9, 1, 35 + sound_ret + +Sfx_IntroPichu: + channel_count 1 + channel 5, Sfx_IntroPichu_Ch5 + +Sfx_IntroPichu_Ch5: + duty_cycle 3 + pitch_sweep 4, -5 + square_note 1, 8, 8, 1904 + square_note 3, 0, 0, 0 + pitch_sweep 1, 7 + square_note 2, 8, 8, 1910 + sound_ret + +Sfx_IntroSuicune2: + channel_count 1 + channel 8, Sfx_IntroSuicune2_Ch8 + +Sfx_IntroSuicune2_Ch8: + noise_note 1, 10, 7, 49 + noise_note 1, 9, 1, 0 + noise_note 1, 9, 2, 33 + noise_note 1, 9, 1, 0 + noise_note 1, 9, 2, 34 + noise_note 1, 8, 2, 17 + noise_note 1, 8, 2, 34 + noise_note 1, 7, 2, 17 + noise_note 1, 7, 2, 18 + noise_note 1, 6, 2, 16 + noise_note 1, 6, 3, 0 + noise_note 1, 5, 3, 16 + noise_note 1, 4, 3, 0 + noise_note 1, 3, 3, 16 + noise_note 1, 2, 3, 0 + noise_note 1, 1, 3, 16 + sound_ret + +Sfx_IntroSuicune3: + channel_count 1 + channel 8, Sfx_IntroSuicune3_Ch8 + +Sfx_IntroSuicune3_Ch8: + noise_note 1, 8, 8, 49 + noise_note 8, 3, -1, 17 + noise_note 4, 10, 4, 16 + noise_note 4, 4, 4, 16 + noise_note 4, 2, 4, 16 + sound_ret + +Sfx_DittoBounce: + channel_count 1 + channel 5, Sfx_DittoBounce_Ch5 + +Sfx_DittoBounce_Ch5: + duty_cycle 2 + pitch_sweep 2, -4 + square_note 2, 8, 2, 1200 + square_note 0, 3, 1, 1200 + pitch_sweep 3, 4 + square_note 16, 11, 1, 1056 + sound_ret + +Sfx_IntroSuicune4: + channel_count 1 + channel 8, Sfx_IntroSuicune4_Ch8 + +Sfx_IntroSuicune4_Ch8: + noise_note 1, 10, 1, 92 + noise_note 0, 0, 0, 0 + noise_note 1, 12, 1, 77 + noise_note 0, 0, 0, 0 + noise_note 4, 11, 2, 49 + noise_note 0, 0, 0, 0 + noise_note 4, 10, 2, 2 + noise_note 0, 0, 0, 0 + noise_note 4, 9, 2, 1 + noise_note 0, 0, 0, 0 + noise_note 32, 7, 2, 0 + sound_ret + +Sfx_GameFreakPresents: + channel_count 1 + channel 5, Sfx_GameFreakPresents_Ch5 + +Sfx_GameFreakPresents_Ch5: + toggle_sfx + duty_cycle 2 + note_type 2, 11, 1 + pitch_sweep 15, -7 + transpose 1, 10 + octave 5 + note C_, 2 + note E_, 2 + note G_, 2 + octave 6 + note C_, 2 + note E_, 2 + note G_, 3 + volume_envelope 8, 1 + note G_, 3 + volume_envelope 5, 1 + note G_, 3 + volume_envelope 3, 1 + note G_, 3 + sound_ret + +Sfx_Tingle: + channel_count 1 + channel 5, Sfx_Tingle_Ch5 + +Sfx_Tingle_Ch5: + toggle_sfx + duty_cycle 1 + transpose 0, 11 + note_type 1, 11, 1 +.loop1: + octave 5 + note C_, 3 + octave 6 + note G_, 2 + octave 5 + note C_, 3 + rest 2 + sound_loop 2, .loop1 + note C_, 2 + volume_envelope 10, 1 + note G_, 13 + sound_ret + +Sfx_TwoPcBeeps: + channel_count 1 + channel 5, Sfx_TwoPcBeeps_Ch5 + +Sfx_TwoPcBeeps_Ch5: + duty_cycle 2 + square_note 2, 14, 8, 1986 + square_note 2, 2, 8, 1986 + square_note 2, 14, 8, 1986 + square_note 2, 2, 8, 1986 + sound_ret + +Sfx_4NoteDitty: + channel_count 3 + channel 5, Sfx_4NoteDitty_Ch5 + channel 6, Sfx_4NoteDitty_Ch6 + channel 7, Sfx_4NoteDitty_Ch7 + +Sfx_4NoteDitty_Ch5: + toggle_sfx + duty_cycle 2 + note_type 2, 14, 8 + transpose 0, 2 + octave 4 + note C_, 2 + volume_envelope 4, 8 + note C_, 2 + volume_envelope 14, 8 + note G_, 2 + volume_envelope 4, 8 + note G_, 2 + octave 5 + volume_envelope 14, 8 + note E_, 2 + volume_envelope 4, 8 + note E_, 2 + octave 6 + volume_envelope 14, 8 + note C_, 2 + volume_envelope 4, 3 + note C_, 16 + sound_ret + +Sfx_4NoteDitty_Ch6: + toggle_sfx + note_type 2, 11, 8 + rest 9 + rest 16 + sound_ret + +Sfx_4NoteDitty_Ch7: + toggle_sfx + note_type 2, 11, 8 + rest 9 + rest 16 + sound_ret + +Sfx_Twinkle: + channel_count 1 + channel 5, Sfx_Twinkle_Ch5 + +Sfx_Twinkle_Ch5: + toggle_sfx + duty_cycle 0 + transpose 0, 2 + note_type 2, 14, 1 + octave 3 + note G_, 2 + volume_envelope 11, 1 + octave 4 + note D_, 2 + volume_envelope 14, 1 + note B_, 2 + volume_envelope 11, 1 + note G_, 2 + volume_envelope 14, 1 + octave 5 + note D_, 2 + volume_envelope 11, 1 + octave 4 + note B_, 2 + volume_envelope 14, 1 + octave 5 + note G_, 6 + sound_ret diff --git a/audio/sfx_pointers.asm b/audio/sfx_pointers.asm new file mode 100644 index 0000000..6b4d9df --- /dev/null +++ b/audio/sfx_pointers.asm @@ -0,0 +1,212 @@ +SFX: +; entries correspond to SFX_* constants + table_width 3, SFX + dba Sfx_DexFanfare5079 + dba Sfx_Item + dba Sfx_CaughtMon + dba Sfx_PokeballsPlacedOnTable + dba Sfx_Potion + dba Sfx_FullHeal + dba Sfx_Menu + dba Sfx_ReadText + dba Sfx_ReadText2 + dba Sfx_DexFanfare2049 + dba Sfx_DexFanfare80109 + dba Sfx_Poison + dba Sfx_GotSafariBalls + dba Sfx_BootPc + dba Sfx_ShutDownPc + dba Sfx_ChoosePcOption + dba Sfx_EscapeRope + dba Sfx_PushButton + dba Sfx_SecondPartOfItemfinder + dba Sfx_WarpTo + dba Sfx_WarpFrom + dba Sfx_ChangeDexMode + dba Sfx_JumpOverLedge + dba Sfx_GrassRustle + dba Sfx_Fly + dba Sfx_Wrong + dba Sfx_Squeak + dba Sfx_Strength + dba Sfx_Boat + dba Sfx_WallOpen + dba Sfx_PlacePuzzlePieceDown + dba Sfx_EnterDoor + dba Sfx_SwitchPokemon + dba Sfx_Tally + dba Sfx_Transaction + dba Sfx_ExitBuilding + dba Sfx_Bump + dba Sfx_Save + dba Sfx_Pokeflute + dba Sfx_ElevatorEnd + dba Sfx_ThrowBall + dba Sfx_BallPoof + dba Sfx_Unknown3A + dba Sfx_Run + dba Sfx_SlotMachineStart + dba Sfx_Fanfare + dba Sfx_Peck + dba Sfx_Kinesis + dba Sfx_Lick + dba Sfx_Pound + dba Sfx_MovePuzzlePiece + dba Sfx_CometPunch + dba Sfx_MegaPunch + dba Sfx_Scratch + dba Sfx_Vicegrip + dba Sfx_RazorWind + dba Sfx_Cut + dba Sfx_WingAttack + dba Sfx_Whirlwind + dba Sfx_Bind + dba Sfx_VineWhip + dba Sfx_DoubleKick + dba Sfx_MegaKick + dba Sfx_Headbutt + dba Sfx_HornAttack + dba Sfx_Tackle + dba Sfx_PoisonSting + dba Sfx_Powder + dba Sfx_Doubleslap + dba Sfx_Bite + dba Sfx_JumpKick + dba Sfx_Stomp + dba Sfx_TailWhip + dba Sfx_KarateChop + dba Sfx_Submission + dba Sfx_WaterGun + dba Sfx_SwordsDance + dba Sfx_Thunder + dba Sfx_Supersonic + dba Sfx_Leer + dba Sfx_Ember + dba Sfx_Bubblebeam + dba Sfx_HydroPump + dba Sfx_Surf + dba Sfx_Psybeam + dba Sfx_Charge + dba Sfx_Thundershock + dba Sfx_Psychic + dba Sfx_Screech + dba Sfx_BoneClub + dba Sfx_Sharpen + dba Sfx_EggBomb + dba Sfx_Sing + dba Sfx_HyperBeam + dba Sfx_Shine + dba Sfx_Unknown5F + dba Sfx_Unknown60 + dba Sfx_Unknown61 + dba Sfx_SwitchPockets + dba Sfx_Unknown63 + dba Sfx_Burn + dba Sfx_TitleScreenEntrance + dba Sfx_Unknown66 + dba Sfx_GetCoinFromSlots + dba Sfx_PayDay + dba Sfx_Metronome + dba Sfx_Call + dba Sfx_HangUp + dba Sfx_NoSignal + dba Sfx_Sandstorm + dba Sfx_Elevator + dba Sfx_Protect + dba Sfx_Sketch + dba Sfx_RainDance + dba Sfx_Aeroblast + dba Sfx_Spark + dba Sfx_Curse + dba Sfx_Rage + dba Sfx_Thief + dba Sfx_Thief2 + dba Sfx_SpiderWeb + dba Sfx_MindReader + dba Sfx_Nightmare + dba Sfx_Snore + dba Sfx_SweetKiss + dba Sfx_SweetKiss2 + dba Sfx_BellyDrum + dba Sfx_Unknown7F + dba Sfx_SludgeBomb + dba Sfx_Foresight + dba Sfx_Spite + dba Sfx_Outrage + dba Sfx_PerishSong + dba Sfx_GigaDrain + dba Sfx_Attract + dba Sfx_Kinesis2 + dba Sfx_ZapCannon + dba Sfx_MeanLook + dba Sfx_HealBell + dba Sfx_Return + dba Sfx_ExpBar + dba Sfx_MilkDrink + dba Sfx_Present + dba Sfx_MorningSun + dba Sfx_LevelUp + dba Sfx_KeyItem + dba Sfx_Fanfare2 + dba Sfx_RegisterPhoneNumber + dba Sfx_3rdPlace + dba Sfx_GetEgg + dba Sfx_GetEgg + dba Sfx_MoveDeleted + dba Sfx_2ndPlace + dba Sfx_1stPlace + dba Sfx_ChooseACard + dba Sfx_GetTm + dba Sfx_GetBadge + dba Sfx_QuitSlots + dba Sfx_EggCrack + dba Sfx_DexFanfareLessThan20 + dba Sfx_DexFanfare140169 + dba Sfx_DexFanfare170199 + dba Sfx_DexFanfare200229 + dba Sfx_DexFanfare230Plus + dba Sfx_Evolved + dba Sfx_MasterBall + dba Sfx_EggHatch + dba Sfx_GsIntroCharizardFireball + dba Sfx_GsIntroPokemonAppears + dba Sfx_Flash + dba Sfx_GameFreakLogoGs + dba Sfx_NotVeryEffective + dba Sfx_Damage + dba Sfx_SuperEffective + dba Sfx_BallBounce + dba Sfx_Moonlight + dba Sfx_Encore + dba Sfx_BeatUp + dba Sfx_BatonPass + dba Sfx_BallWobble + dba Sfx_SweetScent + dba Sfx_SweetScent2 + dba Sfx_HitEndOfExpBar + dba Sfx_GiveTrademon + dba Sfx_GetTrademon + dba Sfx_TrainArrived + dba Sfx_StopSlot + dba Sfx_2Boops +; new to Crystal + dba Sfx_GlassTing + dba Sfx_GlassTing2 + dba Sfx_IntroUnown1 + dba Sfx_IntroUnown2 + dba Sfx_IntroUnown3 + dba Sfx_DittoPopUp + dba Sfx_DittoTransform + dba Sfx_IntroSuicune1 + dba Sfx_IntroPichu + dba Sfx_IntroSuicune2 + dba Sfx_IntroSuicune3 + dba Sfx_DittoBounce + dba Sfx_IntroSuicune4 + dba Sfx_GameFreakPresents + dba Sfx_Tingle + dba Sfx_IntroWhoosh + dba Sfx_TwoPcBeeps + dba Sfx_4NoteDitty + dba Sfx_Twinkle + assert_table_length NUM_SFX diff --git a/audio/wave_samples.asm b/audio/wave_samples.asm new file mode 100644 index 0000000..81fee21 --- /dev/null +++ b/audio/wave_samples.asm @@ -0,0 +1,13 @@ +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 + dn 0, 2, 4, 6, 8, 10, 12, 14, 14, 15, 15, 15, 15, 14, 14, 14, 13, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 1, 1 + dn 1, 3, 6, 9, 11, 13, 14, 14, 14, 14, 15, 15, 15, 15, 14, 13, 13, 14, 15, 15, 15, 15, 14, 14, 14, 14, 13, 11, 9, 6, 3, 1 + dn 0, 2, 4, 6, 8, 10, 12, 13, 14, 15, 15, 14, 13, 14, 15, 15, 14, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 + dn 0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 13, 14, 14, 15, 7, 7, 15, 14, 14, 13, 12, 10, 8, 7, 6, 5, 4, 3, 2, 1, 0 + dn 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 3, 3, 2, 2, 1, 1, 15, 15, 14, 14, 12, 12, 10, 10, 8, 8, 10, 10, 12, 12, 14, 14 + dn 0, 2, 4, 6, 8, 10, 12, 14, 12, 11, 10, 9, 8, 7, 6, 5, 15, 15, 15, 14, 14, 13, 13, 12, 4, 4, 3, 3, 2, 2, 1, 1 + 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 diff --git a/charmap.asm b/charmap.asm new file mode 100644 index 0000000..b1f6d5b --- /dev/null +++ b/charmap.asm @@ -0,0 +1,431 @@ +; $00-$16 are TX_* constants (see macros/scripts/text.asm) + +; Control characters (see home/text.asm) + + charmap "", $00 + charmap "", $14 ; "くん" or "ちゃん"; same as "" in English + charmap "", $15 + charmap "", $16 + charmap "¯", $1f ; soft linebreak + charmap "", $22 + charmap "", $24 ; "" + charmap "%", $25 ; soft linebreak in landmark names + charmap "", $38 ; wRedsName + charmap "", $39 ; wGreensName + charmap "", $3f + charmap "", $49 ; wMomsName + charmap "", $4a ; "" + charmap "<_CONT>", $4b ; implements "" + charmap "", $4c + charmap "", $4e + charmap "", $4f + charmap "@", $50 ; string terminator + charmap "", $51 + charmap "", $52 ; wPlayerName + charmap "", $53 ; wRivalName + charmap "#", $54 ; "POKé" + charmap "", $55 + charmap "<……>", $56 ; "……" + charmap "", $57 + charmap "", $58 + charmap "", $59 + charmap "", $5a + charmap "", $5b ; "PC" + charmap "", $5c ; "TM" + charmap "", $5d ; "TRAINER" + charmap "", $5e ; "ROCKET" + charmap "", $5f + +; Actual characters (from gfx/font/font_extra.png) + + charmap "", $60 ; unused + charmap "", $61 ; unused + charmap "", $62 ; unused + charmap "", $63 ; unused + charmap "", $64 ; unused + charmap "", $65 ; unused + charmap "", $66 ; unused + charmap "", $67 ; unused + charmap "", $68 ; unused + charmap "", $69 + charmap "", $6a + charmap "", $6b ; unused + charmap "", $6c ; unused + charmap "", $6d ; colon with tinier dots than ":" + charmap "ぃ", $6e ; hiragana small i, unused + charmap "ぅ", $6f ; hiragana small u, unused + charmap "", $70 + charmap "", $71 + charmap "“", $72 ; opening quote + charmap "”", $73 ; closing quote + charmap "·", $74 ; middle dot, unused + charmap "…", $75 ; ellipsis + charmap "ぁ", $76 ; hiragana small a, unused + charmap "ぇ", $77 ; hiragana small e, unused + charmap "ぉ", $78 ; hiragana small o, unused + + charmap "┌", $79 + charmap "─", $7a + charmap "┐", $7b + charmap "│", $7c + charmap "└", $7d + charmap "┘", $7e + charmap " ", $7f + +; Actual characters (from gfx/font/font_battle_extra.png) + + charmap "", $6e + + charmap "", $70 ; hiragana small do, unused + charmap "◀", $71 + charmap "『", $72 ; Japanese opening quote, unused + charmap "", $73 + charmap "№", $74 + +; Actual characters (from other graphics files) + + ; needed for _LoadFontsExtra1 (see engine/gfx/load_font.asm) + charmap "■", $60 ; gfx/font/black.2bpp + charmap "▲", $61 ; gfx/font/up_arrow.png + charmap "☎", $62 ; gfx/font/phone_icon.2bpp + + ; needed for MagikarpHouseSign (see engine/events/magikarp.asm) + charmap "′", $6e ; gfx/font/feet_inches.png + charmap "″", $6f ; gfx/font/feet_inches.png + + ; needed for StatsScreen_PlaceShinyIcon and PrintPartyMonPage1 + charmap "⁂", $3f ; gfx/stats/stats_tiles.png, tile 14 + +; Actual characters (from gfx/font/font.png) + + charmap "A", $80 + charmap "B", $81 + charmap "C", $82 + charmap "D", $83 + charmap "E", $84 + charmap "F", $85 + charmap "G", $86 + charmap "H", $87 + charmap "I", $88 + charmap "J", $89 + charmap "K", $8a + charmap "L", $8b + charmap "M", $8c + charmap "N", $8d + charmap "O", $8e + charmap "P", $8f + charmap "Q", $90 + charmap "R", $91 + charmap "S", $92 + charmap "T", $93 + charmap "U", $94 + charmap "V", $95 + charmap "W", $96 + charmap "X", $97 + charmap "Y", $98 + charmap "Z", $99 + + charmap "(", $9a + charmap ")", $9b + charmap ":", $9c + charmap ";", $9d + charmap "[", $9e + charmap "]", $9f + + charmap "a", $a0 + charmap "b", $a1 + charmap "c", $a2 + charmap "d", $a3 + charmap "e", $a4 + charmap "f", $a5 + charmap "g", $a6 + charmap "h", $a7 + charmap "i", $a8 + charmap "j", $a9 + charmap "k", $aa + charmap "l", $ab + charmap "m", $ac + charmap "n", $ad + charmap "o", $ae + charmap "p", $af + charmap "q", $b0 + charmap "r", $b1 + charmap "s", $b2 + charmap "t", $b3 + charmap "u", $b4 + charmap "v", $b5 + charmap "w", $b6 + charmap "x", $b7 + charmap "y", $b8 + charmap "z", $b9 + + charmap "Ä", $c0 + charmap "Ö", $c1 + charmap "Ü", $c2 + charmap "ä", $c3 + charmap "ö", $c4 + charmap "ü", $c5 + + charmap "'d", $d0 + charmap "'l", $d1 + charmap "'m", $d2 + charmap "'r", $d3 + charmap "'s", $d4 + charmap "'t", $d5 + charmap "'v", $d6 + + charmap "←", $df + charmap "'", $e0 + charmap "", $e1 + charmap "", $e2 + charmap "-", $e3 + + charmap "?", $e6 + charmap "!", $e7 + charmap ".", $e8 + charmap "&", $e9 + + charmap "é", $ea + charmap "→", $eb + charmap "▷", $ec + charmap "▶", $ed + charmap "▼", $ee + charmap "♂", $ef + charmap "¥", $f0 + charmap "×", $f1 + charmap "", $f2 ; decimal point; same as "." in English + charmap "/", $f3 + charmap ",", $f4 + charmap "♀", $f5 + + charmap "0", $f6 + charmap "1", $f7 + charmap "2", $f8 + charmap "3", $f9 + charmap "4", $fa + charmap "5", $fb + charmap "6", $fc + charmap "7", $fd + charmap "8", $fe + charmap "9", $ff + +; Japanese control characters (see home/text.asm) + + charmap "", $18 ; "ノ゛" (ungrammatical) + charmap "", $1d ; "に " + charmap "", $1e ; "って" + charmap "", $1f ; "を " + charmap "", $22 ; "た!" + charmap "", $23 ; "こうげき" + charmap "", $24 ; "は " + charmap "", $25 ; "の " + charmap "", $35 ; "ばん どうろ" + charmap "", $36 ; "わたし" + charmap "", $37 ; "ここは" + charmap "", $4a ; "が " + +; Japanese kana, for those bits of text that were not translated to English + + charmap "ガ", $05 + charmap "ギ", $06 + charmap "グ", $07 + charmap "ゲ", $08 + charmap "ゴ", $09 + charmap "ザ", $0a + charmap "ジ", $0b + charmap "ズ", $0c + charmap "ゼ", $0d + charmap "ゾ", $0e + charmap "ダ", $0f + charmap "ヂ", $10 + charmap "ヅ", $11 + charmap "デ", $12 + charmap "ド", $13 + + charmap "バ", $19 + charmap "ビ", $1a + charmap "ブ", $1b + charmap "ボ", $1c + + charmap "が", $26 + charmap "ぎ", $27 + charmap "ぐ", $28 + charmap "げ", $29 + charmap "ご", $2a + charmap "ざ", $2b + charmap "じ", $2c + charmap "ず", $2d + charmap "ぜ", $2e + charmap "ぞ", $2f + charmap "だ", $30 + charmap "ぢ", $31 + charmap "づ", $32 + charmap "で", $33 + charmap "ど", $34 + + charmap "ば", $3a + charmap "び", $3b + charmap "ぶ", $3c + charmap "べ", $3d + charmap "ぼ", $3e + + charmap "パ", $40 + charmap "ピ", $41 + charmap "プ", $42 + charmap "ポ", $43 + charmap "ぱ", $44 + charmap "ぴ", $45 + charmap "ぷ", $46 + charmap "ぺ", $47 + charmap "ぽ", $48 + + charmap "「", $70 + charmap "」", $71 + charmap "』", $73 + charmap "・", $74 + charmap "⋯", $75 + + charmap " ", $7f + + charmap "ア", $80 + charmap "イ", $81 + charmap "ウ", $82 + charmap "エ", $83 + charmap "オ", $84 + charmap "カ", $85 + charmap "キ", $86 + charmap "ク", $87 + charmap "ケ", $88 + charmap "コ", $89 + charmap "サ", $8a + charmap "シ", $8b + charmap "ス", $8c + charmap "セ", $8d + charmap "ソ", $8e + charmap "タ", $8f + charmap "チ", $90 + charmap "ツ", $91 + charmap "テ", $92 + charmap "ト", $93 + charmap "ナ", $94 + charmap "ニ", $95 + charmap "ヌ", $96 + charmap "ネ", $97 + charmap "ノ", $98 + charmap "ハ", $99 + charmap "ヒ", $9a + charmap "フ", $9b + charmap "ホ", $9c + charmap "マ", $9d + charmap "ミ", $9e + charmap "ム", $9f + charmap "メ", $a0 + charmap "モ", $a1 + charmap "ヤ", $a2 + charmap "ユ", $a3 + charmap "ヨ", $a4 + charmap "ラ", $a5 + charmap "ル", $a6 + charmap "レ", $a7 + charmap "ロ", $a8 + charmap "ワ", $a9 + charmap "ヲ", $aa + charmap "ン", $ab + charmap "ッ", $ac + charmap "ャ", $ad + charmap "ュ", $ae + charmap "ョ", $af + charmap "ィ", $b0 + + charmap "あ", $b1 + charmap "い", $b2 + charmap "う", $b3 + charmap "え", $b4 + charmap "お", $b5 + charmap "か", $b6 + charmap "き", $b7 + charmap "く", $b8 + charmap "け", $b9 + charmap "こ", $ba + charmap "さ", $bb + charmap "し", $bc + charmap "す", $bd + charmap "せ", $be + charmap "そ", $bf + charmap "た", $c0 + charmap "ち", $c1 + charmap "つ", $c2 + charmap "て", $c3 + charmap "と", $c4 + charmap "な", $c5 + charmap "に", $c6 + charmap "ぬ", $c7 + charmap "ね", $c8 + charmap "の", $c9 + charmap "は", $ca + charmap "ひ", $cb + charmap "ふ", $cc + charmap "へ", $cd + charmap "ほ", $ce + charmap "ま", $cf + charmap "み", $d0 + charmap "む", $d1 + charmap "め", $d2 + charmap "も", $d3 + charmap "や", $d4 + charmap "ゆ", $d5 + charmap "よ", $d6 + charmap "ら", $d7 + charmap "り", $d8 + charmap "る", $d9 + charmap "れ", $da + charmap "ろ", $db + charmap "わ", $dc + charmap "を", $dd + charmap "ん", $de + charmap "っ", $df + charmap "ゃ", $e0 + charmap "ゅ", $e1 + charmap "ょ", $e2 + + charmap "ー", $e3 + charmap "゚", $e4 + charmap "゙", $e5 + + charmap "?", $e6 + charmap "!", $e7 + charmap "。", $e8 + + charmap "ァ", $e9 + charmap "ゥ", $ea + charmap "ェ", $eb + + charmap "円", $f0 + + charmap ".", $f2 + charmap "/", $f3 + + charmap "ォ", $f4 + + charmap "0", $f6 + charmap "1", $f7 + charmap "2", $f8 + charmap "3", $f9 + charmap "4", $fa + charmap "5", $fb + charmap "6", $fc + charmap "7", $fd + charmap "8", $fe + charmap "9", $ff + +; ASCII charmap, for mobile functions +pushc + newcharmap ascii + DEF PRINTABLE_ASCII EQUS " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz\{|}~" + for i, STRLEN("{PRINTABLE_ASCII}") + charmap STRSUB("{PRINTABLE_ASCII}", i + 1, 1), i + $20 + endr + charmap "\t", $09 + charmap "\n", $0a + charmap "\r", $0d +popc diff --git a/constants/16_bit_locking_constants.asm b/constants/16_bit_locking_constants.asm new file mode 100644 index 0000000..4a2e8a7 --- /dev/null +++ b/constants/16_bit_locking_constants.asm @@ -0,0 +1,41 @@ +; Pokémon locked ID table constants + const_def + const LOCKED_MON_ID_MAP_1 + const LOCKED_MON_ID_MAP_2 + const LOCKED_MON_ID_MAP_3 + const LOCKED_MON_ID_MAP_4 + const LOCKED_MON_ID_MAP_5 + const LOCKED_MON_ID_MAP_6 + const LOCKED_MON_ID_MAP_7 + const LOCKED_MON_ID_MAP_8 +DEF NUM_MAP_LOCKED_MON_IDS EQU const_value + -LOCKED_MON_ID_MAP_1 + const LOCKED_MON_ID_DEX_SELECTED + const LOCKED_MON_ID_TRADE_SEND + const LOCKED_MON_ID_TRADE_RECEIVE + const LOCKED_MON_ID_BATTLE_TOWER_1 + const LOCKED_MON_ID_BATTLE_TOWER_2 + const LOCKED_MON_ID_BATTLE_TOWER_3 + const LOCKED_MON_ID_CURRENT_MENU + +if const_value > MON_TABLE_LOCKED_ENTRIES + fail "Too many locked Pokémon IDs" +endc + +; Move locked ID table constants + const_def + const LOCKED_MOVE_ID_BATTLE_TOWER_MON1_MOVE1 + const LOCKED_MOVE_ID_BATTLE_TOWER_MON1_MOVE2 + const LOCKED_MOVE_ID_BATTLE_TOWER_MON1_MOVE3 + const LOCKED_MOVE_ID_BATTLE_TOWER_MON1_MOVE4 + const LOCKED_MOVE_ID_BATTLE_TOWER_MON2_MOVE1 + const LOCKED_MOVE_ID_BATTLE_TOWER_MON2_MOVE2 + const LOCKED_MOVE_ID_BATTLE_TOWER_MON2_MOVE3 + const LOCKED_MOVE_ID_BATTLE_TOWER_MON2_MOVE4 + const LOCKED_MOVE_ID_BATTLE_TOWER_MON3_MOVE1 + const LOCKED_MOVE_ID_BATTLE_TOWER_MON3_MOVE2 + const LOCKED_MOVE_ID_BATTLE_TOWER_MON3_MOVE3 + const LOCKED_MOVE_ID_BATTLE_TOWER_MON3_MOVE4 + +if const_value > MOVE_TABLE_LOCKED_ENTRIES + fail "Too many locked move IDs" +endc diff --git a/constants/16_bit_translation_constants.asm b/constants/16_bit_translation_constants.asm new file mode 100644 index 0000000..fb6b2a8 --- /dev/null +++ b/constants/16_bit_translation_constants.asm @@ -0,0 +1,26 @@ +; constants for 16-bit conversion tables: +; _ENTRIES: number of entries in the table; 8-bit indexes $01, $02, ..., _ENTRIES will point to table entries +; _LOCKED_ENTRIES: number of entries in a reserved ID array; valid IDs stored in this table will be protected from +; eviction when the table is garbage collected to make room for new entries (useful to preserve +; IDs being used in the current screen, map script, etc.) +; _CACHE_SIZE: number of entries in a fast-retrieval cache table that attempts to make retrieving recently-used +; indexes faster; must be a power of two (or zero to disable the cache) +; _SAVED_RECENT_INDEXES: circular buffer of recently-allocated IDs, protecting them from eviction and thus simplifying +; code that allocates several IDs at once +; _MINIMUM_RESERVED_INDEX: minimum value that will be treated as a special value and not handled through the table; +; 8-bit IDs that are greater or equal to this value convert to $FF00 + index, and the reverse +; conversion is also valid without using the table. This guarantees that high values (such +; as $FF), often handled as negative indexes, retain their special meanings without requiring +; an allocation + +DEF MON_TABLE_ENTRIES EQU 100 +DEF MON_TABLE_LOCKED_ENTRIES EQU 30 +DEF MON_TABLE_CACHE_SIZE EQU 16 +DEF MON_TABLE_SAVED_RECENT_INDEXES EQU 8 +DEF MON_TABLE_MINIMUM_RESERVED_INDEX EQU $FD ; ensures that the value for the egg will remain reserved + +DEF MOVE_TABLE_ENTRIES EQU 230 +DEF MOVE_TABLE_LOCKED_ENTRIES EQU 18 +DEF MOVE_TABLE_CACHE_SIZE EQU 16 +DEF MOVE_TABLE_SAVED_RECENT_INDEXES EQU 16 +DEF MOVE_TABLE_MINIMUM_RESERVED_INDEX EQU $FF diff --git a/constants/audio_constants.asm b/constants/audio_constants.asm new file mode 100644 index 0000000..f9b016c --- /dev/null +++ b/constants/audio_constants.asm @@ -0,0 +1,134 @@ +; pitch +; FrequencyTable indexes (see audio/notes.asm) + const_def 1 + const C_ ; 1 + const C# ; 2 + const D_ ; 3 + const D# ; 4 + const E_ ; 5 + const F_ ; 6 + const F# ; 7 + const G_ ; 8 + const G# ; 9 + const A_ ; a + const A# ; b + const B_ ; c +DEF NUM_NOTES EQU const_value - 1 + +; channel +; ChannelPointers indexes (see audio/engine.asm) + const_def + const CHAN1 ; 0 + const CHAN2 ; 1 + const CHAN3 ; 2 + const CHAN4 ; 3 +DEF NUM_MUSIC_CHANS EQU const_value + const CHAN5 ; 4 + const CHAN6 ; 5 + const CHAN7 ; 6 + const CHAN8 ; 7 +DEF NUM_NOISE_CHANS EQU const_value - NUM_MUSIC_CHANS +DEF NUM_CHANNELS EQU const_value + +; channel_struct members (see macros/ram.asm) +rsreset +DEF CHANNEL_MUSIC_ID rw +DEF CHANNEL_MUSIC_BANK rb +DEF CHANNEL_FLAGS1 rb +DEF CHANNEL_FLAGS2 rb +DEF CHANNEL_FLAGS3 rb +DEF CHANNEL_MUSIC_ADDRESS rw +DEF CHANNEL_LAST_MUSIC_ADDRESS rw + rb_skip 2 +DEF CHANNEL_NOTE_FLAGS rb +DEF CHANNEL_CONDITION rb +DEF CHANNEL_DUTY_CYCLE rb +DEF CHANNEL_VOLUME_ENVELOPE rb +DEF CHANNEL_FREQUENCY rw +DEF CHANNEL_PITCH rb +DEF CHANNEL_OCTAVE rb +DEF CHANNEL_TRANSPOSITION rb +DEF CHANNEL_NOTE_DURATION rb +DEF CHANNEL_FIELD16 rb + rb_skip +DEF CHANNEL_LOOP_COUNT rb +DEF CHANNEL_TEMPO rw +DEF CHANNEL_TRACKS rb +DEF CHANNEL_DUTY_CYCLE_PATTERN rb +DEF CHANNEL_VIBRATO_DELAY_COUNT rb +DEF CHANNEL_VIBRATO_DELAY rb +DEF CHANNEL_VIBRATO_EXTENT rb +DEF CHANNEL_VIBRATO_RATE rb +DEF CHANNEL_PITCH_SLIDE_TARGET rw +DEF CHANNEL_PITCH_SLIDE_AMOUNT rb +DEF CHANNEL_PITCH_SLIDE_AMOUNT_FRACTION rb +DEF CHANNEL_FIELD25 rb + rb_skip +DEF CHANNEL_PITCH_OFFSET rw +DEF CHANNEL_FIELD29 rb +DEF CHANNEL_FIELD2A rw +DEF CHANNEL_FIELD2C rb +DEF CHANNEL_NOTE_LENGTH rb +DEF CHANNEL_FIELD2E rb +DEF CHANNEL_FIELD2F rb +DEF CHANNEL_FIELD30 rb + rb_skip +DEF CHANNEL_STRUCT_LENGTH EQU _RS + +DEF NOISE_CHAN_F EQU 2 ; bit set in CHAN5-CHAN7 + +; Flags1 + const_def + const SOUND_CHANNEL_ON ; 0 + const SOUND_SUBROUTINE ; 1 + const SOUND_LOOPING ; 2 + const SOUND_SFX ; 3 + const SOUND_NOISE ; 4 + const SOUND_CRY ; 5 + +; Flags2 + const_def + const SOUND_VIBRATO ; 0 + const SOUND_PITCH_SLIDE ; 1 + const SOUND_DUTY_LOOP ; 2 + const SOUND_UNKN_0B ; 3 + const SOUND_PITCH_OFFSET ; 4 + const SOUND_UNKN_0D ; 5 + const SOUND_UNKN_0E ; 6 + const SOUND_UNKN_0F ; 7 + +; Flags3 + const_def + const SOUND_VIBRATO_DIR ; 0 + const SOUND_PITCH_SLIDE_DIR ; 1 + +; NoteFlags + const_def + const NOTE_DUTY_OVERRIDE ; 0 + const NOTE_FREQ_OVERRIDE ; 1 + const NOTE_UNUSED ; 2 + const NOTE_PITCH_SWEEP ; 3 + const NOTE_NOISE_SAMPLING ; 4 + const NOTE_REST ; 5 + const NOTE_VIBRATO_OVERRIDE ; 6 + +; wVolume +DEF VOLUME_SO1_F EQU 3 +DEF VOLUME_SO2_F EQU 7 +DEF VOLUME_SO1_LEVEL EQU %00000111 +DEF VOLUME_SO2_LEVEL EQU %01110000 +DEF MAX_VOLUME EQU $77 + +; wSoundInput +DEF SOUND_INPUT_CH1_F EQU 0 +DEF SOUND_INPUT_CH2_F EQU 1 +DEF SOUND_INPUT_CH3_F EQU 2 +DEF SOUND_INPUT_CH4_F EQU 3 +DEF SOUND_INPUT_GLOBAL_F EQU 7 + +; wLowHealthAlarm +DEF DANGER_PITCH_F EQU 4 +DEF DANGER_ON_F EQU 7 + +; wMusicFade +DEF MUSIC_FADE_IN_F EQU 7 diff --git a/constants/battle_anim_constants.asm b/constants/battle_anim_constants.asm new file mode 100644 index 0000000..bf6b45e --- /dev/null +++ b/constants/battle_anim_constants.asm @@ -0,0 +1,853 @@ +; battle_anim_struct members (see macros/ram.asm) +rsreset +DEF BATTLEANIMSTRUCT_INDEX rb +DEF BATTLEANIMSTRUCT_OAMFLAGS rb +DEF BATTLEANIMSTRUCT_FIX_Y rb +DEF BATTLEANIMSTRUCT_FRAMESET_ID rb +DEF BATTLEANIMSTRUCT_FUNCTION rb +DEF BATTLEANIMSTRUCT_PALETTE rb +DEF BATTLEANIMSTRUCT_TILEID rb +DEF BATTLEANIMOBJ_LENGTH EQU _RS - 1 ; discount BATTLEANIMSTRUCT_INDEX +DEF BATTLEANIMSTRUCT_XCOORD rb +DEF BATTLEANIMSTRUCT_YCOORD rb +DEF BATTLEANIMSTRUCT_XOFFSET rb +DEF BATTLEANIMSTRUCT_YOFFSET rb +DEF BATTLEANIMSTRUCT_PARAM rb +DEF BATTLEANIMSTRUCT_DURATION rb +DEF BATTLEANIMSTRUCT_FRAME rb +DEF BATTLEANIMSTRUCT_JUMPTABLE_INDEX rb +DEF BATTLEANIMSTRUCT_VAR1 rb +DEF BATTLEANIMSTRUCT_VAR2 rb + rb_skip 7 +DEF BATTLEANIMSTRUCT_LENGTH EQU _RS +DEF NUM_ANIM_OBJECTS EQU 10 ; see wActiveAnimObjects + +; wBattleAnimTileDict size (see wram.asm) +DEF NUM_BATTLEANIMTILEDICT_ENTRIES EQU 5 + +; Start tile for battle animation graphics +DEF BATTLEANIM_BASE_TILE EQU 7 * 7 ; Maximum size of a pokemon picture + +; BattleAnimObjects indexes (see data/battle_anims/objects.asm) + const_def + const ANIM_OBJ_HIT_BIG_YFIX + const ANIM_OBJ_HIT_YFIX + const ANIM_OBJ_HIT_SMALL_YFIX + const ANIM_OBJ_HIT_BIG + const ANIM_OBJ_HIT + const ANIM_OBJ_HIT_SMALL + const ANIM_OBJ_PUNCH + const ANIM_OBJ_KICK + const ANIM_OBJ_PALM + const ANIM_OBJ_FANG + const ANIM_OBJ_PUNCH_SHAKE + const ANIM_OBJ_EMBER + const ANIM_OBJ_DRAGON_RAGE + const ANIM_OBJ_FLAMETHROWER + const ANIM_OBJ_FIRE_SPIN + const ANIM_OBJ_FIRE_BLAST + const ANIM_OBJ_BURNED + const ANIM_OBJ_BLIZZARD + const ANIM_OBJ_ICE + const ANIM_OBJ_ICE_BEAM + const ANIM_OBJ_RAZOR_LEAF + const ANIM_OBJ_POKE_BALL + const ANIM_OBJ_POKE_BALL_BLOCKED + const ANIM_OBJ_EXPLOSION1 + const ANIM_OBJ_EXPLOSION2 + const ANIM_OBJ_ACID + const ANIM_OBJ_SLUDGE + const ANIM_OBJ_BETA_BALL_POOF + const ANIM_OBJ_BALL_POOF + const ANIM_OBJ_BIG_ROCK + const ANIM_OBJ_SMALL_ROCK + const ANIM_OBJ_STRENGTH + const ANIM_OBJ_SEISMIC_TOSS + const ANIM_OBJ_BUBBLE + const ANIM_OBJ_SURF + const ANIM_OBJ_SING + const ANIM_OBJ_WATER_GUN + const ANIM_OBJ_HYDRO_PUMP + const ANIM_OBJ_POWDER + const ANIM_OBJ_BEAM + const ANIM_OBJ_BEAM_TIP + const ANIM_OBJ_ICE_BUILDUP + const ANIM_OBJ_FROZEN + const ANIM_OBJ_MASTER_BALL_SPARKLE + const ANIM_OBJ_RECOVER + const ANIM_OBJ_THUNDER1 + const ANIM_OBJ_THUNDER2 + const ANIM_OBJ_THUNDER3 + const ANIM_OBJ_THUNDER_WAVE + const ANIM_OBJ_SPARKS_CIRCLE_BIG + const ANIM_OBJ_THUNDERBOLT_BALL + const ANIM_OBJ_SPARKS_CIRCLE + const ANIM_OBJ_THUNDERSHOCK_BALL + const ANIM_OBJ_CLAMP + const ANIM_OBJ_BITE + const ANIM_OBJ_CUT_DOWN_LEFT + const ANIM_OBJ_CUT_DOWN_RIGHT + const ANIM_OBJ_CUT_UP_RIGHT + const ANIM_OBJ_CUT_LONG_DOWN_LEFT + const ANIM_OBJ_CUT_LONG_DOWN_RIGHT + const ANIM_OBJ_SOLAR_BEAM_CHARGE + const ANIM_OBJ_ABSORB_CENTER + const ANIM_OBJ_GUST + const ANIM_OBJ_VINE_WHIP1 + const ANIM_OBJ_VINE_WHIP2 + const ANIM_OBJ_RAZOR_WIND1 + const ANIM_OBJ_RAZOR_WIND2 + const ANIM_OBJ_SONICBOOM_JP + const ANIM_OBJ_WARP + const ANIM_OBJ_ABSORB + const ANIM_OBJ_EGG + const ANIM_OBJ_FOCUS + const ANIM_OBJ_BIND1 + const ANIM_OBJ_BIND2 + const ANIM_OBJ_LEECH_SEED + const ANIM_OBJ_SOUND + const ANIM_OBJ_WAVE + const ANIM_OBJ_CONFUSE_RAY + const ANIM_OBJ_LEER + const ANIM_OBJ_LEER_TIP + const ANIM_OBJ_SCREEN + const ANIM_OBJ_HARDEN + const ANIM_OBJ_CHICK + const ANIM_OBJ_AMNESIA + const ANIM_OBJ_ASLEEP + const ANIM_OBJ_SKULL + const ANIM_OBJ_DIG_SAND + const ANIM_OBJ_DIG_PILE + const ANIM_OBJ_SAND + const ANIM_OBJ_PARALYZED + const ANIM_OBJ_STRING_SHOT + const ANIM_OBJ_HAZE + const ANIM_OBJ_MIST + const ANIM_OBJ_SMOG + const ANIM_OBJ_POISON_GAS + const ANIM_OBJ_HORN + const ANIM_OBJ_NEEDLE + const ANIM_OBJ_PETAL_DANCE + const ANIM_OBJ_SLUDGE_BOMB + const ANIM_OBJ_PAY_DAY + const ANIM_OBJ_SONICBOOM_JP_UNUSED + const ANIM_OBJ_MIMIC + const ANIM_OBJ_ATTRACT + const ANIM_OBJ_BONEMERANG + const ANIM_OBJ_BONE_CLUB + const ANIM_OBJ_BONE_RUSH + const ANIM_OBJ_SWIFT + const ANIM_OBJ_KINESIS + const ANIM_OBJ_FLASH + const ANIM_OBJ_SHINY + const ANIM_OBJ_SKY_ATTACK + const ANIM_OBJ_LICK + const ANIM_OBJ_WITHDRAW + const ANIM_OBJ_DRAIN + const ANIM_OBJ_GROWTH + const ANIM_OBJ_CONVERSION2 + const ANIM_OBJ_SMOKE + const ANIM_OBJ_SMOKESCREEN + const ANIM_OBJ_SWORDS_DANCE + const ANIM_OBJ_SPEED_LINE + const ANIM_OBJ_SHARPEN + const ANIM_OBJ_DEFENSE_CURL + const ANIM_OBJ_METRONOME_HAND + const ANIM_OBJ_METRONOME_SPARKLE + const ANIM_OBJ_DISABLE + const ANIM_OBJ_AGILITY + const ANIM_OBJ_HEART + const ANIM_OBJ_FLAME_WHEEL + const ANIM_OBJ_SACRED_FIRE + const ANIM_OBJ_COTTON_SPORE + const ANIM_OBJ_MILK_DRINK + const ANIM_OBJ_ANGER + const ANIM_OBJ_HEAL_BELL + const ANIM_OBJ_HEAL_BELL_NOTE + const ANIM_OBJ_BATON_PASS + const ANIM_OBJ_LOCK_ON + const ANIM_OBJ_MIND_READER + const ANIM_OBJ_SAFEGUARD + const ANIM_OBJ_PROTECT + const ANIM_OBJ_THIEF + const ANIM_OBJ_OCTAZOOKA + const ANIM_OBJ_PRESENT + const ANIM_OBJ_SPIKES + const ANIM_OBJ_POWDER_SNOW + const ANIM_OBJ_DRAGONBREATH + const ANIM_OBJ_CONVERSION + const ANIM_OBJ_SPIDER_WEB + const ANIM_OBJ_CAKE_UNUSED + const ANIM_OBJ_NIGHTMARE + const ANIM_OBJ_IN_NIGHTMARE + const ANIM_OBJ_LOVELY_KISS + const ANIM_OBJ_SWEET_KISS + const ANIM_OBJ_SKETCH + const ANIM_OBJ_ENCORE_HAND + const ANIM_OBJ_ENCORE_STAR + const ANIM_OBJ_DESTINY_BOND + const ANIM_OBJ_MORNING_SUN + const ANIM_OBJ_GLIMMER + const ANIM_OBJ_MOONLIGHT + const ANIM_OBJ_HIDDEN_POWER + const ANIM_OBJ_CROSS_CHOP1 + const ANIM_OBJ_CROSS_CHOP2 + const ANIM_OBJ_SANDSTORM + const ANIM_OBJ_ZAP_CANNON + const ANIM_OBJ_SPITE + const ANIM_OBJ_CURSE + const ANIM_OBJ_PERISH_SONG + const ANIM_OBJ_FORESIGHT + const ANIM_OBJ_RAPID_SPIN + const ANIM_OBJ_SWAGGER + const ANIM_OBJ_BELLY_DRUM_HAND + const ANIM_OBJ_BELLY_DRUM_NOTE + const ANIM_OBJ_MEAN_LOOK + const ANIM_OBJ_BETA_PURSUIT + const ANIM_OBJ_SHOOTING_SPARKLE + const ANIM_OBJ_RAIN + const ANIM_OBJ_B0 + const ANIM_OBJ_PSYCH_UP + const ANIM_OBJ_ANCIENTPOWER + const ANIM_OBJ_AEROBLAST + const ANIM_OBJ_SHADOW_BALL + const ANIM_OBJ_ROCK_SMASH + const ANIM_OBJ_FLOWER + const ANIM_OBJ_COTTON + const ANIM_OBJ_ENEMYFEET_1ROW + const ANIM_OBJ_PLAYERHEAD_1ROW + const ANIM_OBJ_ENEMYFEET_2ROW + const ANIM_OBJ_PLAYERHEAD_2ROW +DEF NUM_ANIM_OBJS EQU const_value + +; DoBattleAnimFrame arguments (see engine/battle_anims/functions.asm) + const_def + const BATTLEANIMFUNC_NULL + const BATTLEANIMFUNC_USER_TO_TARGET + const BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR + const BATTLEANIMFUNC_MOVE_IN_CIRCLE + const BATTLEANIMFUNC_WAVE_TO_TARGET + const BATTLEANIMFUNC_THROW_TO_TARGET + const BATTLEANIMFUNC_THROW_TO_TARGET_DISAPPEAR + const BATTLEANIMFUNC_DROP + const BATTLEANIMFUNC_USER_TO_TARGET_SPIN + const BATTLEANIMFUNC_SHAKE + const BATTLEANIMFUNC_FIRE_BLAST + const BATTLEANIMFUNC_RAZOR_LEAF + const BATTLEANIMFUNC_BUBBLE + const BATTLEANIMFUNC_SURF + const BATTLEANIMFUNC_SING + const BATTLEANIMFUNC_WATER_GUN + const BATTLEANIMFUNC_EMBER + const BATTLEANIMFUNC_POWDER + const BATTLEANIMFUNC_POKEBALL + const BATTLEANIMFUNC_POKEBALL_BLOCKED + const BATTLEANIMFUNC_RECOVER + const BATTLEANIMFUNC_THUNDER_WAVE + const BATTLEANIMFUNC_CLAMP_ENCORE + const BATTLEANIMFUNC_BITE + const BATTLEANIMFUNC_SOLAR_BEAM + const BATTLEANIMFUNC_GUST + const BATTLEANIMFUNC_RAZOR_WIND + const BATTLEANIMFUNC_KICK + const BATTLEANIMFUNC_ABSORB + const BATTLEANIMFUNC_EGG + const BATTLEANIMFUNC_MOVE_UP + const BATTLEANIMFUNC_WRAP + const BATTLEANIMFUNC_LEECH_SEED + const BATTLEANIMFUNC_SOUND + const BATTLEANIMFUNC_CONFUSE_RAY + const BATTLEANIMFUNC_DIZZY + const BATTLEANIMFUNC_AMNESIA + const BATTLEANIMFUNC_FLOAT_UP + const BATTLEANIMFUNC_DIG + const BATTLEANIMFUNC_STRING + const BATTLEANIMFUNC_PARALYZED + const BATTLEANIMFUNC_SPIRAL_DESCENT + const BATTLEANIMFUNC_POISON_GAS + const BATTLEANIMFUNC_HORN + const BATTLEANIMFUNC_NEEDLE + const BATTLEANIMFUNC_PETAL_DANCE + const BATTLEANIMFUNC_THIEF_PAYDAY + const BATTLEANIMFUNC_ABSORB_CIRCLE + const BATTLEANIMFUNC_BONEMERANG + const BATTLEANIMFUNC_SHINY + const BATTLEANIMFUNC_SKY_ATTACK + const BATTLEANIMFUNC_GROWTH_SWORDS_DANCE + const BATTLEANIMFUNC_SMOKE_FLAME_WHEEL + const BATTLEANIMFUNC_PRESENT_SMOKESCREEN + const BATTLEANIMFUNC_STRENGTH_SEISMIC_TOSS + const BATTLEANIMFUNC_SPEED_LINE + const BATTLEANIMFUNC_SLUDGE + const BATTLEANIMFUNC_METRONOME_HAND + const BATTLEANIMFUNC_METRONOME_SPARKLE_SKETCH + const BATTLEANIMFUNC_AGILITY + const BATTLEANIMFUNC_SACRED_FIRE + const BATTLEANIMFUNC_SAFEGUARD_PROTECT + const BATTLEANIMFUNC_LOCK_ON_MIND_READER + const BATTLEANIMFUNC_SPIKES + const BATTLEANIMFUNC_HEAL_BELL_NOTES + const BATTLEANIMFUNC_BATON_PASS + const BATTLEANIMFUNC_CONVERSION + const BATTLEANIMFUNC_ENCORE_BELLY_DRUM + const BATTLEANIMFUNC_SWAGGER_MORNING_SUN + const BATTLEANIMFUNC_HIDDEN_POWER + const BATTLEANIMFUNC_CURSE + const BATTLEANIMFUNC_PERISH_SONG + const BATTLEANIMFUNC_RAPID_SPIN + const BATTLEANIMFUNC_BETA_PURSUIT + const BATTLEANIMFUNC_RAIN_SANDSTORM + const BATTLEANIMFUNC_ANIM_OBJ_B0 + const BATTLEANIMFUNC_PSYCH_UP + const BATTLEANIMFUNC_ANCIENT_POWER + const BATTLEANIMFUNC_ROCK_SMASH + const BATTLEANIMFUNC_COTTON +DEF NUM_BATTLEANIMFUNCS EQU const_value + +; BattleAnimFrameData indexes (see data/battle_anims/framesets.asm) + const_def + const BATTLEANIMFRAMESET_00 + const BATTLEANIMFRAMESET_01 + const BATTLEANIMFRAMESET_02 + const BATTLEANIMFRAMESET_03 + const BATTLEANIMFRAMESET_04 + const BATTLEANIMFRAMESET_05 + const BATTLEANIMFRAMESET_06 + const BATTLEANIMFRAMESET_07 + const BATTLEANIMFRAMESET_08 + const BATTLEANIMFRAMESET_09 + const BATTLEANIMFRAMESET_0A + const BATTLEANIMFRAMESET_0B + const BATTLEANIMFRAMESET_0C + const BATTLEANIMFRAMESET_0D + const BATTLEANIMFRAMESET_0E + const BATTLEANIMFRAMESET_0F + const BATTLEANIMFRAMESET_10 + const BATTLEANIMFRAMESET_11 + const BATTLEANIMFRAMESET_12 + const BATTLEANIMFRAMESET_13 + const BATTLEANIMFRAMESET_14 + const BATTLEANIMFRAMESET_15 + const BATTLEANIMFRAMESET_16 + const BATTLEANIMFRAMESET_17 + const BATTLEANIMFRAMESET_18 + const BATTLEANIMFRAMESET_19 + const BATTLEANIMFRAMESET_1A + const BATTLEANIMFRAMESET_1B + const BATTLEANIMFRAMESET_1C + const BATTLEANIMFRAMESET_1D + const BATTLEANIMFRAMESET_1E + const BATTLEANIMFRAMESET_1F + const BATTLEANIMFRAMESET_20 + const BATTLEANIMFRAMESET_21 + const BATTLEANIMFRAMESET_22 + const BATTLEANIMFRAMESET_23 + const BATTLEANIMFRAMESET_24 + const BATTLEANIMFRAMESET_25 + const BATTLEANIMFRAMESET_26 + const BATTLEANIMFRAMESET_27 + const BATTLEANIMFRAMESET_28 + const BATTLEANIMFRAMESET_29 + const BATTLEANIMFRAMESET_2A + const BATTLEANIMFRAMESET_2B + const BATTLEANIMFRAMESET_2C + const BATTLEANIMFRAMESET_2D + const BATTLEANIMFRAMESET_2E + const BATTLEANIMFRAMESET_2F + const BATTLEANIMFRAMESET_30 + const BATTLEANIMFRAMESET_31 + const BATTLEANIMFRAMESET_32 + const BATTLEANIMFRAMESET_33 + const BATTLEANIMFRAMESET_34 + const BATTLEANIMFRAMESET_35 + const BATTLEANIMFRAMESET_36 + const BATTLEANIMFRAMESET_37 + const BATTLEANIMFRAMESET_38 + const BATTLEANIMFRAMESET_39 + const BATTLEANIMFRAMESET_3A + const BATTLEANIMFRAMESET_3B + const BATTLEANIMFRAMESET_3C + const BATTLEANIMFRAMESET_3D + const BATTLEANIMFRAMESET_3E + const BATTLEANIMFRAMESET_3F + const BATTLEANIMFRAMESET_40 + const BATTLEANIMFRAMESET_41 + const BATTLEANIMFRAMESET_42 + const BATTLEANIMFRAMESET_43 + const BATTLEANIMFRAMESET_44 + const BATTLEANIMFRAMESET_45 + const BATTLEANIMFRAMESET_46 + const BATTLEANIMFRAMESET_47 + const BATTLEANIMFRAMESET_48 + const BATTLEANIMFRAMESET_49 + const BATTLEANIMFRAMESET_4A + const BATTLEANIMFRAMESET_4B + const BATTLEANIMFRAMESET_4C + const BATTLEANIMFRAMESET_4D + const BATTLEANIMFRAMESET_4E + const BATTLEANIMFRAMESET_4F + const BATTLEANIMFRAMESET_50 + const BATTLEANIMFRAMESET_51 + const BATTLEANIMFRAMESET_52 + const BATTLEANIMFRAMESET_53 + const BATTLEANIMFRAMESET_54 + const BATTLEANIMFRAMESET_55 + const BATTLEANIMFRAMESET_56 + const BATTLEANIMFRAMESET_57 + const BATTLEANIMFRAMESET_58 + const BATTLEANIMFRAMESET_59 + const BATTLEANIMFRAMESET_5A + const BATTLEANIMFRAMESET_5B + const BATTLEANIMFRAMESET_5C + const BATTLEANIMFRAMESET_5D + const BATTLEANIMFRAMESET_5E + const BATTLEANIMFRAMESET_5F + const BATTLEANIMFRAMESET_60 + const BATTLEANIMFRAMESET_61 + const BATTLEANIMFRAMESET_62 + const BATTLEANIMFRAMESET_63 + const BATTLEANIMFRAMESET_64 + const BATTLEANIMFRAMESET_65 + const BATTLEANIMFRAMESET_66 + const BATTLEANIMFRAMESET_67 + const BATTLEANIMFRAMESET_68 + const BATTLEANIMFRAMESET_69 + const BATTLEANIMFRAMESET_6A + const BATTLEANIMFRAMESET_6B + const BATTLEANIMFRAMESET_6C + const BATTLEANIMFRAMESET_6D + const BATTLEANIMFRAMESET_6E + const BATTLEANIMFRAMESET_6F + const BATTLEANIMFRAMESET_70 + const BATTLEANIMFRAMESET_71 + const BATTLEANIMFRAMESET_72 + const BATTLEANIMFRAMESET_73 + const BATTLEANIMFRAMESET_74 + const BATTLEANIMFRAMESET_75 + const BATTLEANIMFRAMESET_76 + const BATTLEANIMFRAMESET_77 + const BATTLEANIMFRAMESET_78 + const BATTLEANIMFRAMESET_79 + const BATTLEANIMFRAMESET_7A + const BATTLEANIMFRAMESET_7B + const BATTLEANIMFRAMESET_7C + const BATTLEANIMFRAMESET_7D + const BATTLEANIMFRAMESET_7E + const BATTLEANIMFRAMESET_7F + const BATTLEANIMFRAMESET_80 + const BATTLEANIMFRAMESET_81 + const BATTLEANIMFRAMESET_82 + const BATTLEANIMFRAMESET_83 + const BATTLEANIMFRAMESET_84 + const BATTLEANIMFRAMESET_85 + const BATTLEANIMFRAMESET_86 + const BATTLEANIMFRAMESET_87 + const BATTLEANIMFRAMESET_88 + const BATTLEANIMFRAMESET_89 + const BATTLEANIMFRAMESET_8A + const BATTLEANIMFRAMESET_8B + const BATTLEANIMFRAMESET_8C + const BATTLEANIMFRAMESET_8D + const BATTLEANIMFRAMESET_8E + const BATTLEANIMFRAMESET_8F + const BATTLEANIMFRAMESET_90 + const BATTLEANIMFRAMESET_91 + const BATTLEANIMFRAMESET_92 + const BATTLEANIMFRAMESET_93 + const BATTLEANIMFRAMESET_94 + const BATTLEANIMFRAMESET_95 + const BATTLEANIMFRAMESET_96 + const BATTLEANIMFRAMESET_97 + const BATTLEANIMFRAMESET_98 + const BATTLEANIMFRAMESET_99 + const BATTLEANIMFRAMESET_9A + const BATTLEANIMFRAMESET_9B + const BATTLEANIMFRAMESET_9C + const BATTLEANIMFRAMESET_9D + const BATTLEANIMFRAMESET_9E + const BATTLEANIMFRAMESET_9F + const BATTLEANIMFRAMESET_A0 + const BATTLEANIMFRAMESET_A1 + const BATTLEANIMFRAMESET_A2 + const BATTLEANIMFRAMESET_A3 + const BATTLEANIMFRAMESET_A4 + const BATTLEANIMFRAMESET_A5 + const BATTLEANIMFRAMESET_A6 + const BATTLEANIMFRAMESET_A7 + const BATTLEANIMFRAMESET_A8 + const BATTLEANIMFRAMESET_A9 + const BATTLEANIMFRAMESET_AA + const BATTLEANIMFRAMESET_AB + const BATTLEANIMFRAMESET_AC + const BATTLEANIMFRAMESET_AD + const BATTLEANIMFRAMESET_AE + const BATTLEANIMFRAMESET_AF + const BATTLEANIMFRAMESET_B0 + const BATTLEANIMFRAMESET_B1 + const BATTLEANIMFRAMESET_B2 + const BATTLEANIMFRAMESET_B3 + const BATTLEANIMFRAMESET_B4 + const BATTLEANIMFRAMESET_B5 + const BATTLEANIMFRAMESET_B6 + const BATTLEANIMFRAMESET_B7 + const BATTLEANIMFRAMESET_B8 +DEF NUM_BATTLEANIMFRAMESETS EQU const_value + +; BattleAnimOAMData indexes (see data/battle_anims/oam.asm) + const_def + const BATTLEANIMOAMSET_00 + const BATTLEANIMOAMSET_01 + const BATTLEANIMOAMSET_02 + const BATTLEANIMOAMSET_03 + const BATTLEANIMOAMSET_04 + const BATTLEANIMOAMSET_05 + const BATTLEANIMOAMSET_06 + const BATTLEANIMOAMSET_07 + const BATTLEANIMOAMSET_08 + const BATTLEANIMOAMSET_09 + const BATTLEANIMOAMSET_0A + const BATTLEANIMOAMSET_0B + const BATTLEANIMOAMSET_0C + const BATTLEANIMOAMSET_0D + const BATTLEANIMOAMSET_0E + const BATTLEANIMOAMSET_0F + const BATTLEANIMOAMSET_10 + const BATTLEANIMOAMSET_11 + const BATTLEANIMOAMSET_12 + const BATTLEANIMOAMSET_13 + const BATTLEANIMOAMSET_14 + const BATTLEANIMOAMSET_15 + const BATTLEANIMOAMSET_16 + const BATTLEANIMOAMSET_17 + const BATTLEANIMOAMSET_18 + const BATTLEANIMOAMSET_19 + const BATTLEANIMOAMSET_1A + const BATTLEANIMOAMSET_1B + const BATTLEANIMOAMSET_1C + const BATTLEANIMOAMSET_1D + const BATTLEANIMOAMSET_1E + const BATTLEANIMOAMSET_1F + const BATTLEANIMOAMSET_20 + const BATTLEANIMOAMSET_21 + const BATTLEANIMOAMSET_22 + const BATTLEANIMOAMSET_23 + const BATTLEANIMOAMSET_24 + const BATTLEANIMOAMSET_25 + const BATTLEANIMOAMSET_26 + const BATTLEANIMOAMSET_27 + const BATTLEANIMOAMSET_28 + const BATTLEANIMOAMSET_29 + const BATTLEANIMOAMSET_2A + const BATTLEANIMOAMSET_2B + const BATTLEANIMOAMSET_2C + const BATTLEANIMOAMSET_2D + const BATTLEANIMOAMSET_2E + const BATTLEANIMOAMSET_2F + const BATTLEANIMOAMSET_30 + const BATTLEANIMOAMSET_31 + const BATTLEANIMOAMSET_32 + const BATTLEANIMOAMSET_33 + const BATTLEANIMOAMSET_34 + const BATTLEANIMOAMSET_35 + const BATTLEANIMOAMSET_36 + const BATTLEANIMOAMSET_37 + const BATTLEANIMOAMSET_38 + const BATTLEANIMOAMSET_39 + const BATTLEANIMOAMSET_3A + const BATTLEANIMOAMSET_3B + const BATTLEANIMOAMSET_3C + const BATTLEANIMOAMSET_3D + const BATTLEANIMOAMSET_3E + const BATTLEANIMOAMSET_3F + const BATTLEANIMOAMSET_40 + const BATTLEANIMOAMSET_41 + const BATTLEANIMOAMSET_42 + const BATTLEANIMOAMSET_43 + const BATTLEANIMOAMSET_44 + const BATTLEANIMOAMSET_45 + const BATTLEANIMOAMSET_46 + const BATTLEANIMOAMSET_47 + const BATTLEANIMOAMSET_48 + const BATTLEANIMOAMSET_49 + const BATTLEANIMOAMSET_4A + const BATTLEANIMOAMSET_4B + const BATTLEANIMOAMSET_4C + const BATTLEANIMOAMSET_4D + const BATTLEANIMOAMSET_4E + const BATTLEANIMOAMSET_4F + const BATTLEANIMOAMSET_50 + const BATTLEANIMOAMSET_51 + const BATTLEANIMOAMSET_52 + const BATTLEANIMOAMSET_53 + const BATTLEANIMOAMSET_54 + const BATTLEANIMOAMSET_55 + const BATTLEANIMOAMSET_56 + const BATTLEANIMOAMSET_57 + const BATTLEANIMOAMSET_58 + const BATTLEANIMOAMSET_59 + const BATTLEANIMOAMSET_5A + const BATTLEANIMOAMSET_5B + const BATTLEANIMOAMSET_5C + const BATTLEANIMOAMSET_5D + const BATTLEANIMOAMSET_5E + const BATTLEANIMOAMSET_5F + const BATTLEANIMOAMSET_60 + const BATTLEANIMOAMSET_61 + const BATTLEANIMOAMSET_62 + const BATTLEANIMOAMSET_63 + const BATTLEANIMOAMSET_64 + const BATTLEANIMOAMSET_65 + const BATTLEANIMOAMSET_66 + const BATTLEANIMOAMSET_67 + const BATTLEANIMOAMSET_68 + const BATTLEANIMOAMSET_69 + const BATTLEANIMOAMSET_6A + const BATTLEANIMOAMSET_6B + const BATTLEANIMOAMSET_6C + const BATTLEANIMOAMSET_6D + const BATTLEANIMOAMSET_6E + const BATTLEANIMOAMSET_6F + const BATTLEANIMOAMSET_70 + const BATTLEANIMOAMSET_71 + const BATTLEANIMOAMSET_72 + const BATTLEANIMOAMSET_73 + const BATTLEANIMOAMSET_74 + const BATTLEANIMOAMSET_75 + const BATTLEANIMOAMSET_76 + const BATTLEANIMOAMSET_77 + const BATTLEANIMOAMSET_78 + const BATTLEANIMOAMSET_79 + const BATTLEANIMOAMSET_7A + const BATTLEANIMOAMSET_7B + const BATTLEANIMOAMSET_7C + const BATTLEANIMOAMSET_7D + const BATTLEANIMOAMSET_7E + const BATTLEANIMOAMSET_7F + const BATTLEANIMOAMSET_80 + const BATTLEANIMOAMSET_81 + const BATTLEANIMOAMSET_82 + const BATTLEANIMOAMSET_83 + const BATTLEANIMOAMSET_84 + const BATTLEANIMOAMSET_85 + const BATTLEANIMOAMSET_86 + const BATTLEANIMOAMSET_87 + const BATTLEANIMOAMSET_88 + const BATTLEANIMOAMSET_89 + const BATTLEANIMOAMSET_8A + const BATTLEANIMOAMSET_8B + const BATTLEANIMOAMSET_8C + const BATTLEANIMOAMSET_8D + const BATTLEANIMOAMSET_8E + const BATTLEANIMOAMSET_8F + const BATTLEANIMOAMSET_90 + const BATTLEANIMOAMSET_91 + const BATTLEANIMOAMSET_92 + const BATTLEANIMOAMSET_93 + const BATTLEANIMOAMSET_94 + const BATTLEANIMOAMSET_95 + const BATTLEANIMOAMSET_96 + const BATTLEANIMOAMSET_97 + const BATTLEANIMOAMSET_98 + const BATTLEANIMOAMSET_99 + const BATTLEANIMOAMSET_9A + const BATTLEANIMOAMSET_9B + const BATTLEANIMOAMSET_9C + const BATTLEANIMOAMSET_9D + const BATTLEANIMOAMSET_9E + const BATTLEANIMOAMSET_9F + const BATTLEANIMOAMSET_A0 + const BATTLEANIMOAMSET_A1 + const BATTLEANIMOAMSET_A2 + const BATTLEANIMOAMSET_A3 + const BATTLEANIMOAMSET_A4 + const BATTLEANIMOAMSET_A5 + const BATTLEANIMOAMSET_A6 + const BATTLEANIMOAMSET_A7 + const BATTLEANIMOAMSET_A8 + const BATTLEANIMOAMSET_A9 + const BATTLEANIMOAMSET_AA + const BATTLEANIMOAMSET_AB + const BATTLEANIMOAMSET_AC + const BATTLEANIMOAMSET_AD + const BATTLEANIMOAMSET_AE + const BATTLEANIMOAMSET_AF + const BATTLEANIMOAMSET_B0 + const BATTLEANIMOAMSET_B1 + const BATTLEANIMOAMSET_B2 + const BATTLEANIMOAMSET_B3 + const BATTLEANIMOAMSET_B4 + const BATTLEANIMOAMSET_B5 + const BATTLEANIMOAMSET_B6 + const BATTLEANIMOAMSET_B7 + const BATTLEANIMOAMSET_B8 + const BATTLEANIMOAMSET_B9 + const BATTLEANIMOAMSET_BA + const BATTLEANIMOAMSET_BB + const BATTLEANIMOAMSET_BC + const BATTLEANIMOAMSET_BD + const BATTLEANIMOAMSET_BE + const BATTLEANIMOAMSET_BF + const BATTLEANIMOAMSET_C0 + const BATTLEANIMOAMSET_C1 + const BATTLEANIMOAMSET_C2 + const BATTLEANIMOAMSET_C3 + const BATTLEANIMOAMSET_C4 + const BATTLEANIMOAMSET_C5 + const BATTLEANIMOAMSET_C6 + const BATTLEANIMOAMSET_C7 + const BATTLEANIMOAMSET_C8 + const BATTLEANIMOAMSET_C9 + const BATTLEANIMOAMSET_CA + const BATTLEANIMOAMSET_CB + const BATTLEANIMOAMSET_CC + const BATTLEANIMOAMSET_CD + const BATTLEANIMOAMSET_CE + const BATTLEANIMOAMSET_CF + const BATTLEANIMOAMSET_D0 + const BATTLEANIMOAMSET_D1 + const BATTLEANIMOAMSET_D2 + const BATTLEANIMOAMSET_D3 + const BATTLEANIMOAMSET_D4 + const BATTLEANIMOAMSET_D5 + const BATTLEANIMOAMSET_D6 + const BATTLEANIMOAMSET_D7 +DEF NUM_BATTLEANIMOAMSETS EQU const_value + +; BattleBGEffects indexes (see engine/battle_anims/bg_effects.asm) + const_def 1 + const ANIM_BG_FLASH_INVERTED + const ANIM_BG_FLASH_WHITE + const ANIM_BG_WHITE_HUES + const ANIM_BG_BLACK_HUES + const ANIM_BG_ALTERNATE_HUES + const ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW + const ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW + const ANIM_BG_CYCLE_BGPALS_INVERTED + const ANIM_BG_HIDE_MON + const ANIM_BG_SHOW_MON + const ANIM_BG_ENTER_MON + const ANIM_BG_RETURN_MON + const ANIM_BG_SURF + const ANIM_BG_WHIRLPOOL + const ANIM_BG_TELEPORT + const ANIM_BG_NIGHT_SHADE + const ANIM_BG_BATTLEROBJ_1ROW + const ANIM_BG_BATTLEROBJ_2ROW + const ANIM_BG_DOUBLE_TEAM + const ANIM_BG_ACID_ARMOR + const ANIM_BG_RAPID_FLASH + const ANIM_BG_FADE_MON_TO_LIGHT + const ANIM_BG_FADE_MON_TO_BLACK + const ANIM_BG_FADE_MON_TO_LIGHT_REPEATING + const ANIM_BG_FADE_MON_TO_BLACK_REPEATING + const ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING + const ANIM_BG_FLASH_MON_REPEATING + const ANIM_BG_FADE_MONS_TO_BLACK_REPEATING + const ANIM_BG_FADE_MON_TO_WHITE_WAIT_FADE_BACK + const ANIM_BG_FADE_MON_FROM_WHITE + const ANIM_BG_SHAKE_SCREEN_X + const ANIM_BG_SHAKE_SCREEN_Y + const ANIM_BG_WITHDRAW + const ANIM_BG_BOUNCE_DOWN + const ANIM_BG_DIG + const ANIM_BG_TACKLE + const ANIM_BG_BODY_SLAM + const ANIM_BG_WOBBLE_MON + const ANIM_BG_REMOVE_MON + const ANIM_BG_WAVE_DEFORM_MON + const ANIM_BG_PSYCHIC + const ANIM_BG_BETA_SEND_OUT_MON1 + const ANIM_BG_BETA_SEND_OUT_MON2 + const ANIM_BG_FLAIL + const ANIM_BG_BETA_PURSUIT + const ANIM_BG_ROLLOUT + const ANIM_BG_VITAL_THROW + const ANIM_BG_START_WATER + const ANIM_BG_WATER + const ANIM_BG_END_WATER + const ANIM_BG_VIBRATE_MON + const ANIM_BG_WOBBLE_PLAYER + const ANIM_BG_WOBBLE_SCREEN +DEF NUM_ANIM_BGS EQU const_value - 1 + +; wBattleAnimTileDict keys (see wram.asm) +; AnimObjGFX indexes (see data/battle_anims/object_gfx.asm) + const_def 1 + const ANIM_GFX_HIT + const ANIM_GFX_CUT + const ANIM_GFX_FIRE + const ANIM_GFX_WATER + const ANIM_GFX_LIGHTNING + const ANIM_GFX_PLANT + const ANIM_GFX_SMOKE + const ANIM_GFX_EXPLOSION + const ANIM_GFX_ROCKS + const ANIM_GFX_ICE + const ANIM_GFX_POKE_BALL + const ANIM_GFX_POISON + const ANIM_GFX_BUBBLE + const ANIM_GFX_NOISE + const ANIM_GFX_POWDER + const ANIM_GFX_BEAM + const ANIM_GFX_SPEED + const ANIM_GFX_CHARGE + const ANIM_GFX_WIND + const ANIM_GFX_WHIP + const ANIM_GFX_EGG + const ANIM_GFX_ROPE + const ANIM_GFX_PSYCHIC + const ANIM_GFX_REFLECT + const ANIM_GFX_STATUS + const ANIM_GFX_SAND + const ANIM_GFX_WEB + const ANIM_GFX_HAZE + const ANIM_GFX_HORN + const ANIM_GFX_FLOWER + const ANIM_GFX_MISC + const ANIM_GFX_SKY_ATTACK + const ANIM_GFX_GLOBE + const ANIM_GFX_SHAPES + const ANIM_GFX_OBJECTS + const ANIM_GFX_SHINE + const ANIM_GFX_ANGELS + const ANIM_GFX_WAVE + const ANIM_GFX_AEROBLAST + const ANIM_GFX_PLAYERHEAD + const ANIM_GFX_ENEMYFEET +DEF NUM_ANIM_GFX EQU const_value - 1 + +; battle_bg_effect struct members (see macros/ram.asm) +rsreset +DEF BG_EFFECT_STRUCT_FUNCTION rb +DEF BG_EFFECT_STRUCT_JT_INDEX rb +DEF BG_EFFECT_STRUCT_BATTLE_TURN rb +DEF BG_EFFECT_STRUCT_PARAM rb +DEF BG_EFFECT_STRUCT_LENGTH EQU _RS +DEF NUM_BG_EFFECTS EQU 5 ; see wActiveBGEffects + +; anim_bgeffect battle turn values for some effects + const_def + const BG_EFFECT_TARGET ; 0 + const BG_EFFECT_USER ; 1 + +; battle palettes + const_def + const PAL_BATTLE_BG_PLAYER ; 0 + const PAL_BATTLE_BG_ENEMY ; 1 + const PAL_BATTLE_BG_ENEMY_HP ; 2 + const PAL_BATTLE_BG_PLAYER_HP ; 3 + const PAL_BATTLE_BG_EXP ; 4 + const PAL_BATTLE_BG_5 ; 5 + const PAL_BATTLE_BG_6 ; 6 + const PAL_BATTLE_BG_TEXT ; 7 + +; animation object palettes + const_def + const PAL_BATTLE_OB_ENEMY ; 0 + const PAL_BATTLE_OB_PLAYER ; 1 + const PAL_BATTLE_OB_GRAY ; 2 + const PAL_BATTLE_OB_YELLOW ; 3 + const PAL_BATTLE_OB_RED ; 4 + const PAL_BATTLE_OB_GREEN ; 5 + const PAL_BATTLE_OB_BLUE ; 6 + const PAL_BATTLE_OB_BROWN ; 7 diff --git a/constants/battle_constants.asm b/constants/battle_constants.asm new file mode 100644 index 0000000..e6a1f36 --- /dev/null +++ b/constants/battle_constants.asm @@ -0,0 +1,269 @@ +; significant level values +DEF MAX_LEVEL EQU 100 +DEF MIN_LEVEL EQU 2 +DEF EGG_LEVEL EQU 5 + +; maximum moves known per mon +DEF NUM_MOVES EQU 4 + +; significant stat values +DEF BASE_STAT_LEVEL EQU 7 +DEF MAX_STAT_LEVEL EQU 13 + +; turns that sleep lasts +DEF REST_SLEEP_TURNS EQU 2 +DEF TREEMON_SLEEP_TURNS EQU 7 + +; default move priority +DEF BASE_PRIORITY EQU 1 + +; type effectiveness factors, scaled by 10 +DEF SUPER_EFFECTIVE EQU 20 +DEF MORE_EFFECTIVE EQU 15 +DEF EFFECTIVE EQU 10 +DEF NOT_VERY_EFFECTIVE EQU 05 +DEF NO_EFFECT EQU 00 + +; enemy AI behavior +DEF BASE_AI_SWITCH_SCORE EQU 10 + +; wPlayerStatLevels and wEnemyStatLevels indexes (see wram.asm) +; GetStatName arguments (see data/battle/stat_names.asm) + const_def + const ATTACK + const DEFENSE + const SPEED + const SP_ATTACK + const SP_DEFENSE + const ACCURACY + const EVASION + const ABILITY ; used for BattleCommand_Curse +DEF NUM_LEVEL_STATS EQU const_value + +; move struct members (see data/moves/moves.asm) +rsreset +DEF MOVE_ANIM rb ; 0 +DEF MOVE_EFFECT rb ; 1 +DEF MOVE_POWER rb ; 2 +DEF MOVE_TYPE rb ; 3 +DEF MOVE_ACC rb ; 4 +DEF MOVE_PP rb ; 5 +DEF MOVE_CHANCE rb ; 6 +DEF MOVE_LENGTH EQU _RS + +; stat constants +; indexes for: +; - wPlayerStats and wEnemyStats (see wram.asm) +; - party_struct and battle_struct members (see macros/ram.asm) + const_def 1 + const STAT_HP + const STAT_ATK + const STAT_DEF + const STAT_SPD + const STAT_SATK +DEF NUM_EXP_STATS EQU const_value - 1 + const STAT_SDEF +DEF NUM_STATS EQU const_value - 1 +DEF NUM_BATTLE_STATS EQU NUM_STATS - 1 ; don't count HP + +; stat formula constants +DEF STAT_MIN_NORMAL EQU 5 +DEF STAT_MIN_HP EQU 10 + +DEF MAX_STAT_VALUE EQU 999 + +; shiny dvs +DEF ATKDEFDV_SHINY EQU $EA +DEF SPDSPCDV_SHINY EQU $AA + +; battle classes (wBattleMode values) + const_def 1 + const WILD_BATTLE + const TRAINER_BATTLE + +; battle types (wBattleType values) + const_def + const BATTLETYPE_NORMAL + const BATTLETYPE_CANLOSE + const BATTLETYPE_DEBUG + const BATTLETYPE_TUTORIAL + const BATTLETYPE_FISH + const BATTLETYPE_ROAMING + const BATTLETYPE_CONTEST + const BATTLETYPE_SHINY + const BATTLETYPE_TREE + const BATTLETYPE_TRAP + const BATTLETYPE_FORCEITEM + const BATTLETYPE_CELEBI + const BATTLETYPE_SUICUNE + +; BattleVarPairs indexes (see home/battle_vars.asm) + const_def + const BATTLE_VARS_SUBSTATUS1 + const BATTLE_VARS_SUBSTATUS2 + const BATTLE_VARS_SUBSTATUS3 + const BATTLE_VARS_SUBSTATUS4 + const BATTLE_VARS_SUBSTATUS5 + const BATTLE_VARS_SUBSTATUS1_OPP + const BATTLE_VARS_SUBSTATUS2_OPP + const BATTLE_VARS_SUBSTATUS3_OPP + const BATTLE_VARS_SUBSTATUS4_OPP + const BATTLE_VARS_SUBSTATUS5_OPP + const BATTLE_VARS_STATUS + const BATTLE_VARS_STATUS_OPP + const BATTLE_VARS_MOVE_ANIM + const BATTLE_VARS_MOVE_EFFECT + const BATTLE_VARS_MOVE_POWER + const BATTLE_VARS_MOVE_TYPE + const BATTLE_VARS_MOVE + const BATTLE_VARS_LAST_COUNTER_MOVE + const BATTLE_VARS_LAST_COUNTER_MOVE_OPP + const BATTLE_VARS_LAST_MOVE + const BATTLE_VARS_LAST_MOVE_OPP +DEF NUM_BATTLE_VARS EQU const_value + +; BattleVarLocations indexes (see home/battle_vars.asm) + const_def + const PLAYER_SUBSTATUS_1 + const ENEMY_SUBSTATUS_1 + const PLAYER_SUBSTATUS_2 + const ENEMY_SUBSTATUS_2 + const PLAYER_SUBSTATUS_3 + const ENEMY_SUBSTATUS_3 + const PLAYER_SUBSTATUS_4 + const ENEMY_SUBSTATUS_4 + const PLAYER_SUBSTATUS_5 + const ENEMY_SUBSTATUS_5 + const PLAYER_STATUS + const ENEMY_STATUS + const PLAYER_MOVE_ANIMATION + const ENEMY_MOVE_ANIMATION + const PLAYER_MOVE_EFFECT + const ENEMY_MOVE_EFFECT + const PLAYER_MOVE_POWER + const ENEMY_MOVE_POWER + const PLAYER_MOVE_TYPE + const ENEMY_MOVE_TYPE + const PLAYER_CUR_MOVE + const ENEMY_CUR_MOVE + const PLAYER_COUNTER_MOVE + const ENEMY_COUNTER_MOVE + const PLAYER_LAST_MOVE + const ENEMY_LAST_MOVE +assert const_value % 2 == 0 +DEF NUM_BATTLE_VAR_LOCATION_PAIRS EQU const_value / 2 + +; status condition bit flags +DEF SLP_MASK EQU %111 ; 0-7 turns + const_def 3 + const PSN + const BRN + const FRZ + const PAR + +DEF ALL_STATUS EQU (1 << PSN) | (1 << BRN) | (1 << FRZ) | (1 << PAR) | SLP_MASK + +; wPlayerSubStatus1 or wEnemySubStatus1 bit flags + const_def + const SUBSTATUS_NIGHTMARE + const SUBSTATUS_CURSE + const SUBSTATUS_PROTECT + const SUBSTATUS_IDENTIFIED + const SUBSTATUS_PERISH + const SUBSTATUS_ENDURE + const SUBSTATUS_ROLLOUT + const SUBSTATUS_IN_LOVE + +; wPlayerSubStatus2 or wEnemySubStatus2 bit flags + const_def + const SUBSTATUS_CURLED + +; wPlayerSubStatus3 or wEnemySubStatus3 bit flags + const_def + const SUBSTATUS_BIDE + const SUBSTATUS_RAMPAGE + const SUBSTATUS_IN_LOOP + const SUBSTATUS_FLINCHED + const SUBSTATUS_CHARGED + const SUBSTATUS_UNDERGROUND + const SUBSTATUS_FLYING + const SUBSTATUS_CONFUSED + +; wPlayerSubStatus4 or wEnemySubStatus4 bit flags + const_def + const SUBSTATUS_X_ACCURACY + const SUBSTATUS_MIST + const SUBSTATUS_FOCUS_ENERGY + const_skip + const SUBSTATUS_SUBSTITUTE + const SUBSTATUS_RECHARGE + const SUBSTATUS_RAGE + const SUBSTATUS_LEECH_SEED + +; wPlayerSubStatus5 or wEnemySubStatus5 bit flags + const_def + const SUBSTATUS_TOXIC + const_skip + const_skip + const SUBSTATUS_TRANSFORMED + const SUBSTATUS_ENCORED + const SUBSTATUS_LOCK_ON + const SUBSTATUS_DESTINY_BOND + const SUBSTATUS_CANT_RUN + +; wPlayerScreens or wEnemyScreens bit flags + const_def + const SCREENS_SPIKES + const_skip + const SCREENS_SAFEGUARD + const SCREENS_LIGHT_SCREEN + const SCREENS_REFLECT + +; values in wBattleWeather + const_def + const WEATHER_NONE + const WEATHER_RAIN + const WEATHER_SUN + const WEATHER_SANDSTORM + const WEATHER_RAIN_END + const WEATHER_SUN_END + const WEATHER_SANDSTORM_END + +; wBattleAction + const_def + const BATTLEACTION_MOVE1 + const BATTLEACTION_MOVE2 + const BATTLEACTION_MOVE3 + const BATTLEACTION_MOVE4 + const BATTLEACTION_SWITCH1 + const BATTLEACTION_SWITCH2 + const BATTLEACTION_SWITCH3 + const BATTLEACTION_SWITCH4 + const BATTLEACTION_SWITCH5 + const BATTLEACTION_SWITCH6 + const_skip + const_skip + const_skip + const BATTLEACTION_SKIPTURN + const BATTLEACTION_STRUGGLE + const BATTLEACTION_FORFEIT + +; wBattlePlayerAction + const_def + const BATTLEPLAYERACTION_USEMOVE + const BATTLEPLAYERACTION_USEITEM + const BATTLEPLAYERACTION_SWITCH + +; wBattleResult + const_def + const WIN + const LOSE + const DRAW + +DEF BATTLERESULT_CAUGHT_CELEBI EQU 6 +DEF BATTLERESULT_BOX_FULL EQU 7 +DEF BATTLERESULT_BITMASK EQU (1 << BATTLERESULT_CAUGHT_CELEBI) | (1 << BATTLERESULT_BOX_FULL) + +; link_battle_record struct +DEF LINK_BATTLE_RECORD_LENGTH EQU 2 + (NAME_LENGTH - 1) + 2 * 3 +DEF NUM_LINK_BATTLE_RECORDS EQU 5 diff --git a/constants/battle_tower_constants.asm b/constants/battle_tower_constants.asm new file mode 100644 index 0000000..ca21172 --- /dev/null +++ b/constants/battle_tower_constants.asm @@ -0,0 +1,61 @@ +DEF BATTLETOWER_PARTY_LENGTH EQU 3 +DEF BATTLETOWER_STREAK_LENGTH EQU 7 + +DEF BATTLETOWER_NUM_UNIQUE_MON EQU 21 +DEF BATTLETOWER_NUM_UNIQUE_TRAINERS EQU 70 + +DEF BATTLETOWER_TRAINERDATALENGTH EQU 18 * 2 ; $24 +DEF BATTLE_TOWER_STRUCT_LENGTH EQU NAME_LENGTH + BATTLETOWER_PARTY_LENGTH * NICKNAMED_MON_STRUCT_LENGTH + BATTLETOWER_TRAINERDATALENGTH ; $e0 + +; BattleTowerAction setval arguments (see engine/events/battle_tower/battle_tower.asm) + const_def + const BATTLETOWERACTION_CHECK_EXPLANATION_READ + const BATTLETOWERACTION_SET_EXPLANATION_READ + const BATTLETOWERACTION_GET_CHALLENGE_STATE + const BATTLETOWERACTION_SAVE_AND_QUIT + const BATTLETOWERACTION_CHALLENGECANCELED + const BATTLETOWERACTION_05 + const BATTLETOWERACTION_06 ; reset stuff in SRAM bank 5 + const BATTLETOWERACTION_SAVELEVELGROUP + const BATTLETOWERACTION_LOADLEVELGROUP + const BATTLETOWERACTION_CHECKSAVEFILEISYOURS + const BATTLETOWERACTION_0A + const BATTLETOWERACTION_CHECKMOBILEEVENT + const BATTLETOWERACTION_0C ; more time stuff in SRAM bank 5 + const BATTLETOWERACTION_0D ; more time stuff in SRAM bank 5 + const BATTLETOWERACTION_EGGTICKET + const BATTLETOWERACTION_0F ; check w3_d090 + const BATTLETOWERACTION_10 ; dw based on s5_a800 + const BATTLETOWERACTION_11 ; store 0 in s5_aa8d + const BATTLETOWERACTION_12 ; store 1 in s5_aa8d + const BATTLETOWERACTION_13 ; check s5_aa8d + const BATTLETOWERACTION_14 ; if save file is yours: bit 0, [sBattleTowerSaveFileFlags] + const BATTLETOWERACTION_15 ; set 0, [sBattleTowerSaveFileFlags] + const BATTLETOWERACTION_16 ; update time in SRAM bank 5 + const BATTLETOWERACTION_17 ; check time in SRAM bank 5 + const BATTLETOWERACTION_LEVEL_CHECK + const BATTLETOWERACTION_UBERS_CHECK + const BATTLETOWERACTION_RESETDATA ; clear data + const BATTLETOWERACTION_GIVEREWARD ; give reward + const BATTLETOWERACTION_1C ; set won challenge + const BATTLETOWERACTION_1D ; set received reward + const BATTLETOWERACTION_CHOOSEREWARD ; save options + const BATTLETOWERACTION_SAVEOPTIONS + +; BattleTowerAction return values +; - from BATTLETOWERACTION_CHECKMOBILEEVENT +DEF MOBILE_EVENT_OBJECT_GS_BALL EQU $b + +; BattleTowerText arguments (see engine/events/battle_tower/trainer_text.asm) + const_def 1 + const BATTLETOWERTEXT_INTRO + const BATTLETOWERTEXT_WIN_TEXT + const BATTLETOWERTEXT_LOSS_TEXT + +; sBattleTowerChallengeState values + const_def + const BATTLETOWER_NO_CHALLENGE + const BATTLETOWER_SAVED_AND_LEFT + const BATTLETOWER_CHALLENGE_IN_PROGRESS + const BATTLETOWER_WON_CHALLENGE + const BATTLETOWER_RECEIVED_REWARD diff --git a/constants/collision_constants.asm b/constants/collision_constants.asm new file mode 100644 index 0000000..a183e8c --- /dev/null +++ b/constants/collision_constants.asm @@ -0,0 +1,129 @@ +; collision permissions (see data/collision/collision_permissions.asm) +DEF LAND_TILE EQU $00 +DEF WATER_TILE EQU $01 +DEF WALL_TILE EQU $0f +DEF TALK EQU $10 + +; collision data types (see data/tilesets/*_collision.asm) +; TileCollisionTable indexes (see data/collision/collision_permissions.asm) +DEF COLL_FLOOR EQU $00 +DEF COLL_01 EQU $01 ; garbage +DEF COLL_03 EQU $03 ; garbage +DEF COLL_04 EQU $04 ; garbage +DEF COLL_WALL EQU $07 +DEF COLL_CUT_08 EQU $08 ; unused +DEF COLL_TALL_GRASS_10 EQU $10 ; unused +DEF COLL_CUT_TREE EQU $12 +DEF COLL_LONG_GRASS EQU $14 +DEF COLL_HEADBUTT_TREE EQU $15 +DEF COLL_TALL_GRASS EQU $18 +DEF COLL_CUT_TREE_1A EQU $1a ; unused +DEF COLL_LONG_GRASS_1C EQU $1c ; unused +DEF COLL_HEADBUTT_TREE_1D EQU $1d ; unused +DEF COLL_WATER_21 EQU $21 ; unused +DEF COLL_ICE EQU $23 +DEF COLL_WHIRLPOOL EQU $24 +DEF COLL_BUOY EQU $27 +DEF COLL_CUT_28 EQU $28 ; garbage +DEF COLL_WATER EQU $29 +DEF COLL_ICE_2B EQU $2b ; unused +DEF COLL_WHIRLPOOL_2C EQU $2c ; unused +DEF COLL_WATERFALL_RIGHT EQU $30 ; unused +DEF COLL_WATERFALL_LEFT EQU $31 ; unused +DEF COLL_WATERFALL_UP EQU $32 ; unused +DEF COLL_WATERFALL EQU $33 +DEF COLL_CURRENT_RIGHT EQU $38 ; unused +DEF COLL_CURRENT_LEFT EQU $39 ; unused +DEF COLL_CURRENT_UP EQU $3a ; unused +DEF COLL_CURRENT_DOWN EQU $3b ; unused +DEF COLL_BRAKE EQU $40 ; unused +DEF COLL_WALK_RIGHT EQU $41 ; unused +DEF COLL_WALK_LEFT EQU $42 ; unused +DEF COLL_WALK_UP EQU $43 ; unused +DEF COLL_WALK_DOWN EQU $44 ; unused +DEF COLL_BRAKE_45 EQU $45 ; garbage +DEF COLL_BRAKE_46 EQU $46 ; unused +DEF COLL_BRAKE_47 EQU $47 ; unused +DEF COLL_GRASS_48 EQU $48 ; unused +DEF COLL_GRASS_49 EQU $49 ; unused +DEF COLL_GRASS_4A EQU $4a ; garbage +DEF COLL_GRASS_4B EQU $4b ; garbage +DEF COLL_GRASS_4C EQU $4c ; unused +DEF COLL_WALK_RIGHT_ALT EQU $50 ; unused +DEF COLL_WALK_LEFT_ALT EQU $51 ; unused +DEF COLL_WALK_UP_ALT EQU $52 ; unused +DEF COLL_WALK_DOWN_ALT EQU $53 ; unused +DEF COLL_BRAKE_ALT EQU $54 ; unused +DEF COLL_BRAKE_55 EQU $55 ; unused +DEF COLL_BRAKE_56 EQU $56 ; unused +DEF COLL_BRAKE_57 EQU $57 ; unused +DEF COLL_5B EQU $5b ; garbage +DEF COLL_PIT EQU $60 +DEF COLL_VIRTUAL_BOY EQU $61 ; garbage +DEF COLL_64 EQU $64 ; garbage +DEF COLL_65 EQU $65 ; garbage +DEF COLL_PIT_68 EQU $68 ; unused +DEF COLL_WARP_CARPET_DOWN EQU $70 +DEF COLL_DOOR EQU $71 +DEF COLL_LADDER EQU $72 +DEF COLL_STAIRCASE_73 EQU $73 ; unused +DEF COLL_CAVE_74 EQU $74 ; unused +DEF COLL_DOOR_75 EQU $75 ; unused +DEF COLL_WARP_CARPET_LEFT EQU $76 +DEF COLL_WARP_77 EQU $77 ; unused +DEF COLL_WARP_CARPET_UP EQU $78 +DEF COLL_DOOR_79 EQU $79 ; unused +DEF COLL_STAIRCASE EQU $7a +DEF COLL_CAVE EQU $7b +DEF COLL_WARP_PANEL EQU $7c +DEF COLL_DOOR_7D EQU $7d ; unused +DEF COLL_WARP_CARPET_RIGHT EQU $7e +DEF COLL_WARP_7F EQU $7f ; unused +DEF COLL_COUNTER EQU $90 +DEF COLL_BOOKSHELF EQU $91 +DEF COLL_PC EQU $93 +DEF COLL_RADIO EQU $94 +DEF COLL_TOWN_MAP EQU $95 +DEF COLL_MART_SHELF EQU $96 +DEF COLL_TV EQU $97 +DEF COLL_COUNTER_98 EQU $98 ; unused +DEF COLL_9C EQU $9c ; garbage +DEF COLL_WINDOW EQU $9d +DEF COLL_INCENSE_BURNER EQU $9f +DEF COLL_HOP_RIGHT EQU $a0 +DEF COLL_HOP_LEFT EQU $a1 +DEF COLL_HOP_UP EQU $a2 ; unused +DEF COLL_HOP_DOWN EQU $a3 +DEF COLL_HOP_DOWN_RIGHT EQU $a4 +DEF COLL_HOP_DOWN_LEFT EQU $a5 +DEF COLL_HOP_UP_RIGHT EQU $a6 ; unused +DEF COLL_HOP_UP_LEFT EQU $a7 ; unused +DEF COLL_RIGHT_WALL EQU $b0 +DEF COLL_LEFT_WALL EQU $b1 +DEF COLL_UP_WALL EQU $b2 +DEF COLL_DOWN_WALL EQU $b3 ; unused +DEF COLL_DOWN_RIGHT_WALL EQU $b4 ; unused +DEF COLL_DOWN_LEFT_WALL EQU $b5 ; unused +DEF COLL_UP_RIGHT_WALL EQU $b6 ; unused +DEF COLL_UP_LEFT_WALL EQU $b7 ; unused +DEF COLL_RIGHT_BUOY EQU $c0 ; unused +DEF COLL_LEFT_BUOY EQU $c1 ; unused +DEF COLL_UP_BUOY EQU $c2 ; unused +DEF COLL_DOWN_BUOY EQU $c3 ; unused +DEF COLL_DOWN_RIGHT_BUOY EQU $c4 ; unused +DEF COLL_DOWN_LEFT_BUOY EQU $c5 ; unused +DEF COLL_UP_RIGHT_BUOY EQU $c6 ; unused +DEF COLL_UP_LEFT_BUOY EQU $c7 ; unused +DEF COLL_FF EQU $ff ; garbage + +; collision data type nybbles +DEF LO_NYBBLE_GRASS EQU $07 +DEF HI_NYBBLE_TALL_GRASS EQU $10 +DEF HI_NYBBLE_WATER EQU $20 +DEF HI_NYBBLE_CURRENT EQU $30 +DEF HI_NYBBLE_WALK EQU $40 +DEF HI_NYBBLE_WALK_ALT EQU $50 +DEF HI_NYBBLE_WARPS EQU $70 +DEF HI_NYBBLE_LEDGES EQU $a0 +DEF HI_NYBBLE_SIDE_WALLS EQU $b0 +DEF HI_NYBBLE_SIDE_BUOYS EQU $c0 diff --git a/constants/credits_constants.asm b/constants/credits_constants.asm new file mode 100644 index 0000000..0fed374 --- /dev/null +++ b/constants/credits_constants.asm @@ -0,0 +1,116 @@ +; CreditsStringsPointers indexes (see data/credits_strings.asm) + const_def + const SATOSHI_TAJIRI + const JUNICHI_MASUDA + const TETSUYA_WATANABE + const SHIGEKI_MORIMOTO + const SOUSUKE_TAMADA + const TAKENORI_OOTA + const KEN_SUGIMORI + const MOTOFUMI_FUJIWARA + const ATSUKO_NISHIDA + const MUNEO_SAITO + const SATOSHI_OOTA + const RENA_YOSHIKAWA + const JUN_OKUTANI + const HIRONOBU_YOSHIDA + const ASUKA_IWASHITA + const GO_ICHINOSE + const MORIKAZU_AOKI + const KOHJI_NISHINO + const KENJI_MATSUSHIMA + const TOSHINOBU_MATSUMIYA + const SATORU_IWATA + const NOBUHIRO_SEYA + const KAZUHITO_SEKINE + const TETSUJI_OOTA + const NCL_SUPER_MARIO_CLUB + const SARUGAKUCHO + const AKITO_MORI + const TAKAHIRO_HARADA + const TOHRU_HASHIMOTO + const NOBORU_MATSUMOTO + const TAKEHIRO_IZUSHI + const TAKASHI_KAWAGUCHI + const TSUNEKAZU_ISHIHARA + const HIROSHI_YAMAUCHI + const KENJI_SAIKI + const ATSUSHI_TADA + const NAOKO_KAWAKAMI + const HIROYUKI_ZINNAI + const KUNIMI_KAWAMURA + const HISASHI_SOGABE + const KEITA_KAGAYA + const YOSHINORI_MATSUDA + const HITOMI_SATO + const TORU_OSAWA + const TAKAO_OHARA + const YUICHIRO_ITO + const TAKAO_SHIMIZU + const PLANNING + const KEITA_NAKAMURA + const HIROTAKA_UEMURA + const HIROAKI_TAMURA + const NORIAKI_SAKAGUCHI + const MIYUKI_SATO + const GAKUZI_NOMOTO + const AI_MASHIMA + const MIKIHIRO_ISHIKAWA + const HIDEYUKI_HASHIMOTO + const SATOSHI_YAMATO + const SHIGERU_MIYAMOTO + const GAIL_TILDEN + const NOB_OGASAWARA + const SETH_MCMAHILL + const HIROTO_ALEXANDER + const TERESA_LILLYGREN + const THOMAS_HERTZOG + const ERIK_JOHNSON + const HIRO_NAKAMURA + const TERUKI_MURAKAWA + const KAZUYOSHI_OSAWA + const KIMIKO_NAKAMICHI + const CREDIT_END + const CREDIT_UNKNOWN + const STAFF + const DIRECTOR + const CODIRECTOR + const PROGRAMMERS + const GRAPHICS_DIRECTOR + const MONSTER_DESIGN + const GRAPHICS_DESIGN + const CREDIT_MUSIC + const CREDIT_SOUND_EFFECTS + const GAME_DESIGN + const GAME_SCENARIO + const TOOL_PROGRAMMING + const PARAMETRIC_DESIGN + const SCRIPT_DESIGN + const MAP_DATA_DESIGN + const MAP_DESIGN + const PRODUCT_TESTING + const SPECIAL_THANKS + const PRODUCERS + const EXECUTIVE_PRODUCER + const POKEMON_ANIMATION + const POKEDEX_TEXT + const MOBILE_PRJ_LEADER + const MOBILE_SYSTEM_AD + const MOBILE_STADIUM_DIR + const COORDINATION + const COPYRIGHT + const US_VERSION_STAFF + const US_COORDINATION + const TEXT_TRANSLATION + const PAAD_TESTING +DEF NUM_CREDITS_STRINGS EQU const_value + +; CreditsScript indexes (see data/credits_script.asm) + const_def -1, -1 + const CREDITS_END + const CREDITS_WAIT + const CREDITS_SCENE + const CREDITS_CLEAR + const CREDITS_MUSIC + const CREDITS_WAIT2 + const CREDITS_THEEND diff --git a/constants/cry_constants.asm b/constants/cry_constants.asm new file mode 100644 index 0000000..6b5aba6 --- /dev/null +++ b/constants/cry_constants.asm @@ -0,0 +1,76 @@ +; Cries indexes (see audio/cry_pointers.asm) + const_def + +; gen 1 + const CRY_NIDORAN_M + const CRY_NIDORAN_F + const CRY_SLOWPOKE + const CRY_KANGASKHAN + const CRY_CHARMANDER + const CRY_GRIMER + const CRY_VOLTORB + const CRY_MUK + const CRY_ODDISH + const CRY_RAICHU + const CRY_NIDOQUEEN + const CRY_DIGLETT + const CRY_SEEL + const CRY_DROWZEE + const CRY_PIDGEY + const CRY_BULBASAUR + const CRY_SPEAROW + const CRY_RHYDON + const CRY_GOLEM + const CRY_BLASTOISE + const CRY_PIDGEOTTO + const CRY_WEEDLE + const CRY_CATERPIE + const CRY_EKANS + const CRY_FEAROW + const CRY_CLEFAIRY + const CRY_VENONAT + const CRY_LAPRAS + const CRY_METAPOD + const CRY_SQUIRTLE + const CRY_PARAS + const CRY_GROWLITHE + const CRY_KRABBY + const CRY_PSYDUCK + const CRY_RATTATA + const CRY_VILEPLUME + const CRY_VULPIX + const CRY_WEEPINBELL + +; gen 2 + const CRY_MARILL + const CRY_SPINARAK + const CRY_TOGEPI + const CRY_GIRAFARIG + const CRY_RAIKOU + const CRY_MAREEP + const CRY_TOGETIC + const CRY_HOOTHOOT + const CRY_SENTRET + const CRY_SLOWKING + const CRY_CYNDAQUIL + const CRY_CHIKORITA + const CRY_TOTODILE + const CRY_GLIGAR + const CRY_CLEFFA + const CRY_SLUGMA + const CRY_LEDYBA + const CRY_ENTEI + const CRY_WOOPER + const CRY_MANTINE + const CRY_TYPHLOSION + const CRY_NATU + const CRY_TEDDIURSA + const CRY_SUNFLORA + const CRY_AMPHAROS + const CRY_MAGCARGO + const CRY_PICHU + const CRY_AIPOM + const CRY_DUNSPARCE + const CRY_DONPHAN + +DEF NUM_CRIES EQU const_value diff --git a/constants/deco_constants.asm b/constants/deco_constants.asm new file mode 100644 index 0000000..f877276 --- /dev/null +++ b/constants/deco_constants.asm @@ -0,0 +1,141 @@ +; decoration attributes +rsreset +DEF DECOATTR_TYPE rb +DEF DECOATTR_NAME rb +DEF DECOATTR_ACTION rb +DEF DECOATTR_EVENT_FLAG rw +DEF DECOATTR_SPRITE rb +DEF DECOATTR_STRUCT_LENGTH EQU _RS + +; decoration types + const_def 1 + const DECO_PLANT + const DECO_BED + const DECO_CARPET + const DECO_POSTER + const DECO_DOLL + const DECO_BIGDOLL +DEF NUM_DECO_TYPES EQU const_value - 1 + +; DecorationNames indexes (see data/decorations/names.asm) + const_def + const CANCEL_DECO + const PUT_IT_AWAY + const MAGNAPLANT + const TROPICPLANT + const JUMBOPLANT + const TOWN_MAP_POSTER + const FAMICOM + const SUPER_NES + const NINTENDO_64 + const VIRTUAL_BOY + const GOLD_TROPHY + const SILVER_TROPHY + const SURF_PIKA_DOLL + const _BED + const _CARPET + const _POSTER + const _DOLL + const BIG_ + const FEATHERY_BED + const PIKACHU_BED + const PINK_BED + const POLKADOT_BED + const RED_CARPET + const BLUE_CARPET + const YELLOW_CARPET + const GREEN_CARPET +DEF NUM_DECO_NAMES EQU const_value + +; DoDecorationAction2.DecoActions indexes (see engine/overworld/decorations.asm) + const_def 1 + const SET_UP_BED + const PUT_AWAY_BED + const SET_UP_CARPET + const PUT_AWAY_CARPET + const SET_UP_PLANT + const PUT_AWAY_PLANT + const SET_UP_POSTER + const PUT_AWAY_POSTER + const SET_UP_CONSOLE + const PUT_AWAY_CONSOLE + const SET_UP_BIG_DOLL + const PUT_AWAY_BIG_DOLL + const SET_UP_DOLL + const PUT_AWAY_DOLL +DEF NUM_DECO_ACTIONS EQU const_value - 1 + +DEF __deco_value__ = 0 + +MACRO deco + const DECO_\1 + DEF DECOFLAG_\1 EQU __deco_value__ + DEF __deco_value__ += 1 +ENDM + +; decorations: +; - DecorationAttributes (see data/decorations/attributes.asm) +; - DecorationIDs (see data/decorations/decorations.asm) + const_def 1 +; FindOwnedBeds.beds values (see engine/overworld/decorations.asm) + const BEDS + deco FEATHERY_BED + deco PINK_BED + deco POLKADOT_BED + deco PIKACHU_BED +; FindOwnedCarpets.carpets values (see engine/overworld/decorations.asm) + const CARPETS + deco RED_CARPET + deco BLUE_CARPET + deco YELLOW_CARPET + deco GREEN_CARPET +; FindOwnedPlants.plants values (see engine/overworld/decorations.asm) + const PLANTS + deco MAGNAPLANT + deco TROPICPLANT + deco JUMBOPLANT +; FindOwnedPosters.posters values (see engine/overworld/decorations.asm) + const POSTERS + deco TOWN_MAP + deco PIKACHU_POSTER + deco CLEFAIRY_POSTER + deco JIGGLYPUFF_POSTER +; FindOwnedConsoles.consoles values (see engine/overworld/decorations.asm) + const CONSOLES + deco FAMICOM + deco SNES + deco N64 + deco VIRTUAL_BOY +; FindOwnedBigDolls.big_dolls values (see engine/overworld/decorations.asm) + const BIG_DOLLS + deco BIG_SNORLAX_DOLL + deco BIG_ONIX_DOLL + deco BIG_LAPRAS_DOLL +; FindOwnedOrnaments.ornaments values (see engine/overworld/decorations.asm) + const DOLLS + deco PIKACHU_DOLL + deco SURF_PIKACHU_DOLL + deco CLEFAIRY_DOLL + deco JIGGLYPUFF_DOLL + deco BULBASAUR_DOLL + deco CHARMANDER_DOLL + deco SQUIRTLE_DOLL + deco POLIWAG_DOLL + deco DIGLETT_DOLL + deco STARMIE_DOLL + deco MAGIKARP_DOLL + deco ODDISH_DOLL + deco GENGAR_DOLL + deco SHELLDER_DOLL + deco GRIMER_DOLL + deco VOLTORB_DOLL + deco WEEDLE_DOLL + deco UNOWN_DOLL + deco GEODUDE_DOLL + deco MACHOP_DOLL + deco TENTACOOL_DOLL +DEF NUM_NON_TROPHY_DECOS EQU __deco_value__ + deco GOLD_TROPHY_DOLL + deco SILVER_TROPHY_DOLL +DEF NUM_DECOS EQU __deco_value__ +DEF NUM_DECO_CATEGORIES EQU const_value - 1 - NUM_DECOS diff --git a/constants/engine_flags.asm b/constants/engine_flags.asm new file mode 100644 index 0000000..bc029d5 --- /dev/null +++ b/constants/engine_flags.asm @@ -0,0 +1,190 @@ +; EngineFlags indexes (see data/events/engine_flags.asm) + const_def +; wPokegearFlags + const ENGINE_RADIO_CARD + const ENGINE_MAP_CARD + const ENGINE_PHONE_CARD + const ENGINE_EXPN_CARD + const ENGINE_POKEGEAR +; wDayCareMan + const ENGINE_DAY_CARE_MAN_HAS_EGG + const ENGINE_DAY_CARE_MAN_HAS_MON +; wDayCareLady + const ENGINE_DAY_CARE_LADY_HAS_MON +; wMomSavingMoney + const ENGINE_MOM_SAVING_MONEY + const ENGINE_MOM_ACTIVE +; wUnusedTwoDayTimerOn + const ENGINE_UNUSED_TWO_DAY_TIMER_ON +; wStatusFlags + const ENGINE_POKEDEX + const ENGINE_UNOWN_DEX + const ENGINE_CAUGHT_POKERUS + const ENGINE_ROCKET_SIGNAL_ON_CH20 + const ENGINE_CREDITS_SKIP + const ENGINE_MAIN_MENU_MOBILE_CHOICES +; wStatusFlags2 + const ENGINE_BUG_CONTEST_TIMER + const ENGINE_SAFARI_ZONE + const ENGINE_ROCKETS_IN_RADIO_TOWER + const ENGINE_BIKE_SHOP_CALL_ENABLED + const ENGINE_15 + const ENGINE_REACHED_GOLDENROD + const ENGINE_ROCKETS_IN_MAHOGANY +; wBikeFlags + const ENGINE_STRENGTH_ACTIVE + const ENGINE_ALWAYS_ON_BIKE + const ENGINE_DOWNHILL +; wJohtoBadges + const ENGINE_ZEPHYRBADGE + const ENGINE_HIVEBADGE + const ENGINE_PLAINBADGE + const ENGINE_FOGBADGE + const ENGINE_MINERALBADGE + const ENGINE_STORMBADGE + const ENGINE_GLACIERBADGE + const ENGINE_RISINGBADGE +; wKantoBadges + const ENGINE_BOULDERBADGE + const ENGINE_CASCADEBADGE + const ENGINE_THUNDERBADGE + const ENGINE_RAINBOWBADGE + const ENGINE_SOULBADGE + const ENGINE_MARSHBADGE + const ENGINE_VOLCANOBADGE + const ENGINE_EARTHBADGE +; wUnlockedUnowns + const ENGINE_UNLOCKED_UNOWNS_A_TO_K + const ENGINE_UNLOCKED_UNOWNS_L_TO_R + const ENGINE_UNLOCKED_UNOWNS_S_TO_W + const ENGINE_UNLOCKED_UNOWNS_X_TO_Z + const ENGINE_UNLOCKED_UNOWNS_UNUSED_4 + const ENGINE_UNLOCKED_UNOWNS_UNUSED_5 + const ENGINE_UNLOCKED_UNOWNS_UNUSED_6 + const ENGINE_UNLOCKED_UNOWNS_UNUSED_7 +; wVisitedSpawns + const ENGINE_FLYPOINT_PLAYERS_HOUSE + const ENGINE_FLYPOINT_DEBUG + const ENGINE_FLYPOINT_PALLET + const ENGINE_FLYPOINT_VIRIDIAN + const ENGINE_FLYPOINT_PEWTER + const ENGINE_FLYPOINT_CERULEAN + const ENGINE_FLYPOINT_ROCK_TUNNEL + const ENGINE_FLYPOINT_VERMILION + const ENGINE_FLYPOINT_LAVENDER + const ENGINE_FLYPOINT_SAFFRON + const ENGINE_FLYPOINT_CELADON + const ENGINE_FLYPOINT_FUCHSIA + const ENGINE_FLYPOINT_CINNABAR + const ENGINE_FLYPOINT_INDIGO_PLATEAU + const ENGINE_FLYPOINT_NEW_BARK + const ENGINE_FLYPOINT_CHERRYGROVE + const ENGINE_FLYPOINT_VIOLET + const ENGINE_FLYPOINT_AZALEA + const ENGINE_FLYPOINT_CIANWOOD + const ENGINE_FLYPOINT_GOLDENROD + const ENGINE_FLYPOINT_OLIVINE + const ENGINE_FLYPOINT_ECRUTEAK + const ENGINE_FLYPOINT_MAHOGANY + const ENGINE_FLYPOINT_LAKE_OF_RAGE + const ENGINE_FLYPOINT_BLACKTHORN + const ENGINE_FLYPOINT_SILVER_CAVE + const ENGINE_FLYPOINT_UNUSED +; wLuckyNumberShowFlag + const ENGINE_LUCKY_NUMBER_SHOW +; wStatusFlags2 + const ENGINE_4F +; wDailyFlags1 + const ENGINE_KURT_MAKING_BALLS + const ENGINE_DAILY_BUG_CONTEST + const ENGINE_QWILFISH_SWARM + const ENGINE_TIME_CAPSULE + const ENGINE_ALL_FRUIT_TREES + const ENGINE_GOT_SHUCKIE_TODAY + const ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED + const ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY +; wDailyFlags2 + const ENGINE_MT_MOON_SQUARE_CLEFAIRY + const ENGINE_UNION_CAVE_LAPRAS + const ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT + const ENGINE_GOLDENROD_DEPT_STORE_TM27_RETURN + const ENGINE_DAISYS_GROOMING + const ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT + const ENGINE_DAILY_MOVE_TUTOR + const ENGINE_BUENAS_PASSWORD +; wSwarmFlags + const ENGINE_BUENAS_PASSWORD_2 + const ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON +; wGameTimerPaused + const ENGINE_62 +; wPlayerGender + const ENGINE_PLAYER_IS_FEMALE +; wCelebiEvent + const ENGINE_FOREST_IS_RESTLESS +; wDailyRematchFlags + const ENGINE_JACK_READY_FOR_REMATCH + const ENGINE_HUEY_READY_FOR_REMATCH + const ENGINE_GAVEN_READY_FOR_REMATCH + const ENGINE_BETH_READY_FOR_REMATCH + const ENGINE_JOSE_READY_FOR_REMATCH + const ENGINE_REENA_READY_FOR_REMATCH + const ENGINE_JOEY_READY_FOR_REMATCH + const ENGINE_WADE_READY_FOR_REMATCH + const ENGINE_RALPH_READY_FOR_REMATCH + const ENGINE_LIZ_READY_FOR_REMATCH + const ENGINE_ANTHONY_READY_FOR_REMATCH + const ENGINE_TODD_READY_FOR_REMATCH + const ENGINE_GINA_READY_FOR_REMATCH + const ENGINE_ARNIE_READY_FOR_REMATCH + const ENGINE_ALAN_READY_FOR_REMATCH + const ENGINE_DANA_READY_FOR_REMATCH + const ENGINE_CHAD_READY_FOR_REMATCH + const ENGINE_TULLY_READY_FOR_REMATCH + const ENGINE_BRENT_READY_FOR_REMATCH + const ENGINE_TIFFANY_READY_FOR_REMATCH + const ENGINE_VANCE_READY_FOR_REMATCH + const ENGINE_WILTON_READY_FOR_REMATCH + const ENGINE_PARRY_READY_FOR_REMATCH + const ENGINE_ERIN_READY_FOR_REMATCH +; wDailyPhoneItemFlags + const ENGINE_BEVERLY_HAS_NUGGET + const ENGINE_JOSE_HAS_STAR_PIECE + const ENGINE_WADE_HAS_ITEM + const ENGINE_GINA_HAS_LEAF_STONE + const ENGINE_ALAN_HAS_FIRE_STONE + const ENGINE_DANA_HAS_THUNDERSTONE + const ENGINE_DEREK_HAS_NUGGET + const ENGINE_TULLY_HAS_WATER_STONE + const ENGINE_TIFFANY_HAS_PINK_BOW + const ENGINE_WILTON_HAS_ITEM +; wDailyPhoneTimeOfDayFlags + const ENGINE_JACK_MONDAY_MORNING + const ENGINE_HUEY_WEDNESDAY_NIGHT + const ENGINE_GAVEN_THURSDAY_MORNING + const ENGINE_BETH_FRIDAY_AFTERNOON + const ENGINE_JOSE_SATURDAY_NIGHT + const ENGINE_REENA_SUNDAY_MORNING + const ENGINE_JOEY_MONDAY_AFTERNOON + const ENGINE_WADE_TUESDAY_NIGHT + const ENGINE_RALPH_WEDNESDAY_MORNING + const ENGINE_LIZ_THURSDAY_AFTERNOON + const ENGINE_ANTHONY_FRIDAY_NIGHT + const ENGINE_TODD_SATURDAY_MORNING + const ENGINE_GINA_SUNDAY_AFTERNOON + const ENGINE_ARNIE_TUESDAY_MORNING + const ENGINE_ALAN_WEDNESDAY_AFTERNOON + const ENGINE_DANA_THURSDAY_NIGHT + const ENGINE_CHAD_FRIDAY_MORNING + const ENGINE_TULLY_SUNDAY_NIGHT + const ENGINE_BRENT_MONDAY_MORNING + const ENGINE_TIFFANY_TUESDAY_AFTERNOON + const ENGINE_VANCE_WEDNESDAY_NIGHT + const ENGINE_WILTON_THURSDAY_MORNING + const ENGINE_PARRY_FRIDAY_AFTERNOON + const ENGINE_ERIN_SATURDAY_NIGHT +; wPlayerSpriteSetupFlags + const ENGINE_KRIS_IN_CABLE_CLUB +; wSwarmFlags + const ENGINE_DUNSPARCE_SWARM + const ENGINE_YANMA_SWARM +DEF NUM_ENGINE_FLAGS EQU const_value diff --git a/constants/event_flags.asm b/constants/event_flags.asm new file mode 100644 index 0000000..1a17bad --- /dev/null +++ b/constants/event_flags.asm @@ -0,0 +1,1465 @@ +; wEventFlags bit flags + + const_def +; The first eight flags are reset upon reloading the map + const EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + const EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + const EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + const EVENT_TEMPORARY_UNTIL_MAP_RELOAD_4 + const EVENT_TEMPORARY_UNTIL_MAP_RELOAD_5 + const EVENT_TEMPORARY_UNTIL_MAP_RELOAD_6 + const EVENT_TEMPORARY_UNTIL_MAP_RELOAD_7 + const EVENT_TEMPORARY_UNTIL_MAP_RELOAD_8 +; Johto Gym Leader TM gifts + const EVENT_GOT_TM31_MUD_SLAP + const EVENT_GOT_TM49_FURY_CUTTER + const EVENT_GOT_TM01_DYNAMICPUNCH + const EVENT_GOT_TM45_ATTRACT + const EVENT_GOT_TM30_SHADOW_BALL + const EVENT_GOT_TM23_IRON_TAIL + const EVENT_GOT_TM16_ICY_WIND + const EVENT_GOT_TM24_DRAGONBREATH +; HMs (EVENT_GOT_HM07_WATERFALL is with the Johto itemballs) + const EVENT_GOT_HM01_CUT + const EVENT_GOT_HM02_FLY + const EVENT_GOT_HM03_SURF + const EVENT_GOT_HM04_STRENGTH + const EVENT_GOT_HM05_FLASH + const EVENT_GOT_HM06_WHIRLPOOL + const_skip ; unused +; Rods + const EVENT_GOT_OLD_ROD + const EVENT_GOT_GOOD_ROD + const EVENT_GOT_SUPER_ROD +; Johto story events + const EVENT_GOT_A_POKEMON_FROM_ELM + const EVENT_GOT_CYNDAQUIL_FROM_ELM + const EVENT_GOT_TOTODILE_FROM_ELM + const EVENT_GOT_CHIKORITA_FROM_ELM + const EVENT_GOT_MYSTERY_EGG_FROM_MR_POKEMON + const EVENT_GAVE_MYSTERY_EGG_TO_ELM + const EVENT_JASMINE_RETURNED_TO_GYM + const EVENT_CLEARED_RADIO_TOWER + const EVENT_CLEARED_ROCKET_HIDEOUT + const EVENT_GOT_SECRETPOTION_FROM_PHARMACY + const EVENT_GOT_SS_TICKET_FROM_ELM + const EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER + const EVENT_REFUSED_TO_HELP_LANCE_AT_LAKE_OF_RAGE + const EVENT_GOT_BERRY_FROM_ROUTE_30_HOUSE + const EVENT_MADE_WHITNEY_CRY + const EVENT_HERDED_FARFETCHD + const EVENT_FOUGHT_SUDOWOODO + const EVENT_CLEARED_SLOWPOKE_WELL + const EVENT_REFUSED_TO_TAKE_EGG_FROM_ELMS_AIDE + const EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE + const EVENT_MADE_UNOWN_APPEAR_IN_RUINS + const EVENT_FAST_SHIP_DESTINATION_OLIVINE + const EVENT_FAST_SHIP_FIRST_TIME + const EVENT_FAST_SHIP_HAS_ARRIVED + const EVENT_FAST_SHIP_FOUND_GIRL + const EVENT_FAST_SHIP_LAZY_SAILOR + const EVENT_FAST_SHIP_INFORMED_ABOUT_LAZY_SAILOR + const EVENT_KURT_GAVE_YOU_LURE_BALL + const EVENT_INITIALIZED_EVENTS + const EVENT_JASMINE_EXPLAINED_AMPHYS_SICKNESS + const EVENT_LAKE_OF_RAGE_EXPLAINED_WEIRD_MAGIKARP + const EVENT_LAKE_OF_RAGE_ASKED_FOR_MAGIKARP + const EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY + const_skip ; unused + const_skip ; unused + const EVENT_HEALED_MOOMOO + const EVENT_GOT_TM13_SNORE_FROM_MOOMOO_FARM + const EVENT_TALKED_TO_FARMER_ABOUT_MOOMOO + const EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST + const EVENT_DUDE_TALKED_TO_YOU + const EVENT_LEARNED_TO_CATCH_POKEMON + const EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON + const EVENT_BEAT_ELITE_FOUR + const EVENT_GOT_SHUCKIE + const EVENT_MANIA_TOOK_SHUCKIE_OR_LET_YOU_KEEP_HIM + const EVENT_GOT_SUNNY_DAY_FROM_RADIO_TOWER + const EVENT_GOT_PINK_BOW_FROM_MARY + const EVENT_USED_BASEMENT_KEY + const EVENT_RECEIVED_CARD_KEY + const EVENT_GOT_TM08_ROCK_SMASH + const EVENT_LANCE_HEALED_YOU_IN_TEAM_ROCKET_BASE + const EVENT_GOT_MYSTIC_WATER_IN_CHERRYGROVE + const EVENT_GOT_TM05_ROAR + const EVENT_GOT_EEVEE + const EVENT_GOT_KENYA + const EVENT_GAVE_KENYA + const EVENT_GOT_HP_UP_FROM_RANDY + const EVENT_GOT_TM50_NIGHTMARE + const EVENT_TOGEPI_HATCHED + const EVENT_SHOWED_TOGEPI_TO_ELM + const EVENT_GOT_EVERSTONE_FROM_ELM + const EVENT_GOT_QUICK_CLAW + const EVENT_GOT_TM10_HIDDEN_POWER + const EVENT_GOT_TM36_SLUDGE_BOMB + const EVENT_GOT_ITEMFINDER + const EVENT_GOT_BICYCLE + const EVENT_GOT_SQUIRTBOTTLE + const EVENT_GOT_MIRACLE_SEED_IN_ROUTE_32 + const EVENT_GOT_CHARCOAL_IN_CHARCOAL_KILN + const EVENT_GOT_TM02_HEADBUTT + const EVENT_DECIDED_TO_HELP_LANCE + const EVENT_GOT_TYROGUE_FROM_KIYO + const EVENT_MET_FRIEDA_OF_FRIDAY + const EVENT_GOT_POISON_BARB_FROM_FRIEDA + const EVENT_MET_TUSCANY_OF_TUESDAY + const EVENT_GOT_PINK_BOW_FROM_TUSCANY + const EVENT_MET_ARTHUR_OF_THURSDAY + const EVENT_GOT_HARD_STONE_FROM_ARTHUR + const EVENT_MET_SUNNY_OF_SUNDAY + const EVENT_GOT_MAGNET_FROM_SUNNY + const EVENT_MET_WESLEY_OF_WEDNESDAY + const EVENT_GOT_BLACKBELT_FROM_WESLEY + const EVENT_MET_SANTOS_OF_SATURDAY + const EVENT_GOT_SPELL_TAG_FROM_SANTOS + const EVENT_MET_MONICA_OF_MONDAY + const EVENT_GOT_SHARP_BEAK_FROM_MONICA + const EVENT_GOT_SOFT_SAND_FROM_KATE + const EVENT_GOT_METAL_COAT_FROM_GRANDPA_ON_SS_AQUA + const EVENT_GOT_BLACKGLASSES_IN_DARK_CAVE + const EVENT_GOT_KINGS_ROCK_IN_SLOWPOKE_WELL + const EVENT_GOT_TM47_STEEL_WING + const EVENT_GOT_TM37_SANDSTORM + const EVENT_FIRST_TIME_BANKING_WITH_MOM + const EVENT_TOLD_ELM_ABOUT_TOGEPI_OVER_THE_PHONE + const EVENT_GOT_CLEAR_BELL + const EVENT_GOT_SILVER_WING + const EVENT_GOT_TM12_SWEET_SCENT + const EVENT_RELEASED_THE_BEASTS + const EVENT_GOT_MASTER_BALL_FROM_ELM +; Johto hidden items + const EVENT_TIN_TOWER_4F_HIDDEN_MAX_POTION + const EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE + const EVENT_TIN_TOWER_5F_HIDDEN_CARBOS + const EVENT_BURNED_TOWER_1F_HIDDEN_ETHER + const_skip ; unused in Crystal + const_skip ; unused in Crystal + const_skip ; unused in Crystal + const EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL + const EVENT_OLIVINE_LIGHTHOUSE_5F_HIDDEN_HYPER_POTION + const EVENT_TEAM_ROCKET_BASE_B1F_HIDDEN_REVIVE + const EVENT_TEAM_ROCKET_BASE_B2F_HIDDEN_FULL_HEAL + const EVENT_ILEX_FOREST_HIDDEN_ETHER + const EVENT_ILEX_FOREST_HIDDEN_SUPER_POTION + const EVENT_ILEX_FOREST_HIDDEN_FULL_HEAL + const EVENT_GOLDENROD_UNDERGROUND_HIDDEN_PARLYZ_HEAL + const EVENT_GOLDENROD_UNDERGROUND_HIDDEN_SUPER_POTION + const EVENT_GOLDENROD_UNDERGROUND_HIDDEN_ANTIDOTE + const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION + const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE + const EVENT_MOUNT_MORTAR_1F_OUTSIDE_HIDDEN_HYPER_POTION + const EVENT_MOUNT_MORTAR_1F_INSIDE_HIDDEN_MAX_REPEL + const EVENT_MOUNT_MORTAR_2F_INSIDE_HIDDEN_FULL_RESTORE + const EVENT_MOUNT_MORTAR_B1F_HIDDEN_MAX_REVIVE + const EVENT_ICE_PATH_B1F_HIDDEN_MAX_POTION + const EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_HIDDEN_CARBOS + const EVENT_ICE_PATH_B2F_BLACKTHORN_SIDE_HIDDEN_ICE_HEAL + const EVENT_WHIRL_ISLAND_B1F_HIDDEN_RARE_CANDY + const EVENT_WHIRL_ISLAND_B1F_HIDDEN_ULTRA_BALL + const EVENT_WHIRL_ISLAND_B1F_HIDDEN_FULL_RESTORE + const EVENT_SILVER_CAVE_ROOM_1_HIDDEN_DIRE_HIT + const EVENT_SILVER_CAVE_ROOM_1_HIDDEN_ULTRA_BALL + const EVENT_SILVER_CAVE_ROOM_2_HIDDEN_MAX_POTION + const EVENT_DARK_CAVE_VIOLET_ENTRANCE_HIDDEN_ELIXER + const EVENT_VICTORY_ROAD_HIDDEN_MAX_POTION + const EVENT_VICTORY_ROAD_HIDDEN_FULL_HEAL + const EVENT_DRAGONS_DEN_B1F_HIDDEN_REVIVE + const EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_POTION + const EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_ELIXER + const EVENT_ROUTE_28_HIDDEN_RARE_CANDY + const EVENT_ROUTE_30_HIDDEN_POTION + const EVENT_ROUTE_32_HIDDEN_GREAT_BALL + const EVENT_ROUTE_32_HIDDEN_SUPER_POTION + const EVENT_ROUTE_34_HIDDEN_RARE_CANDY + const EVENT_ROUTE_34_HIDDEN_SUPER_POTION + const EVENT_ROUTE_37_HIDDEN_ETHER + const EVENT_ROUTE_39_HIDDEN_NUGGET + const EVENT_ROUTE_40_HIDDEN_HYPER_POTION + const EVENT_ROUTE_41_HIDDEN_MAX_ETHER + const EVENT_ROUTE_42_HIDDEN_MAX_POTION + const EVENT_ROUTE_44_HIDDEN_ELIXER + const EVENT_ROUTE_45_HIDDEN_PP_UP + const EVENT_VIOLET_CITY_HIDDEN_HYPER_POTION + const EVENT_AZALEA_TOWN_HIDDEN_FULL_HEAL + const EVENT_CIANWOOD_CITY_HIDDEN_REVIVE + const EVENT_CIANWOOD_CITY_HIDDEN_MAX_ETHER + const EVENT_ECRUTEAK_CITY_HIDDEN_HYPER_POTION + const EVENT_LAKE_OF_RAGE_HIDDEN_FULL_RESTORE + const EVENT_LAKE_OF_RAGE_HIDDEN_RARE_CANDY + const EVENT_LAKE_OF_RAGE_HIDDEN_MAX_POTION + const EVENT_SILVER_CAVE_OUTSIDE_HIDDEN_FULL_RESTORE +; Crystal-exclusive events in Johto + const EVENT_MET_FLORIA + const EVENT_TALKED_TO_FLORIA_AT_FLOWER_SHOP + const EVENT_BUGGING_KURT_TOO_MUCH + const EVENT_TALKED_TO_RUINS_COWARD + const EVENT_GOT_DRATINI + const EVENT_CAN_GIVE_GS_BALL_TO_KURT + const EVENT_GAVE_GS_BALL_TO_KURT + const EVENT_FOREST_IS_RESTLESS + const EVENT_ANSWERED_DRAGON_MASTER_QUIZ_WRONG +; Unused: next 6 events + + const_next 200 +; Kanto story events + const EVENT_GOT_NUGGET_FROM_GUY + const EVENT_RETURNED_MACHINE_PART + const EVENT_MET_MANAGER_AT_POWER_PLANT + const EVENT_MET_ROCKET_GRUNT_AT_CERULEAN_GYM + const EVENT_MET_REDS_MOM + const EVENT_RESTORED_POWER_TO_KANTO + const EVENT_GOT_COINS_FROM_GAMBLER_AT_CELADON + const EVENT_MET_COPYCAT_FOUND_OUT_ABOUT_LOST_ITEM + const EVENT_RETURNED_LOST_ITEM_TO_COPYCAT + const EVENT_GOT_PASS_FROM_COPYCAT + const EVENT_GOT_LOST_ITEM_FROM_FAN_CLUB + const EVENT_LISTENED_TO_FAN_CLUB_PRESIDENT_BUT_BAG_WAS_FULL + const EVENT_LISTENED_TO_FAN_CLUB_PRESIDENT + const EVENT_TALKED_TO_SEAFOAM_GYM_GUIDE_ONCE + const EVENT_ENABLE_DIPLOMA_PRINTING + const EVENT_CINNABAR_ROCKS_CLEARED + const EVENT_CLEARED_NUGGET_BRIDGE + const EVENT_TALKED_TO_WARDENS_GRANDDAUGHTER + const EVENT_GOT_TM03_CURSE + const EVENT_GOT_CLEANSE_TAG + const EVENT_GOT_TM19_GIGA_DRAIN + const EVENT_GOT_TM06_TOXIC + const EVENT_GOT_UP_GRADE + const EVENT_GOT_TM07_ZAP_CANNON + const EVENT_GOT_TM42_DREAM_EATER + const EVENT_TALKED_TO_OAK_IN_KANTO + const EVENT_GOT_HP_UP_FROM_VERMILION_GUY + const EVENT_GOT_TM29_PSYCHIC +; Kanto hidden items + const EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE + const EVENT_UNDERGROUND_PATH_HIDDEN_FULL_RESTORE + const EVENT_UNDERGROUND_PATH_HIDDEN_X_SPECIAL + const EVENT_ROCK_TUNNEL_1F_HIDDEN_X_ACCURACY + const EVENT_ROCK_TUNNEL_1F_HIDDEN_X_DEFEND + const EVENT_ROCK_TUNNEL_B1F_HIDDEN_MAX_POTION + const EVENT_OLIVINE_PORT_HIDDEN_PROTEIN + const EVENT_VERMILION_PORT_HIDDEN_IRON + const EVENT_MOUNT_MOON_SQUARE_HIDDEN_MOON_STONE + const EVENT_ROUTE_2_HIDDEN_MAX_ETHER + const EVENT_ROUTE_2_HIDDEN_FULL_HEAL + const EVENT_ROUTE_2_HIDDEN_FULL_RESTORE + const EVENT_ROUTE_2_HIDDEN_REVIVE + const EVENT_ROUTE_4_HIDDEN_ULTRA_BALL + const EVENT_ROUTE_9_HIDDEN_ETHER + const EVENT_ROUTE_12_HIDDEN_ELIXER + const EVENT_ROUTE_13_HIDDEN_CALCIUM + const EVENT_ROUTE_11_HIDDEN_REVIVE + const EVENT_ROUTE_17_HIDDEN_MAX_ETHER + const EVENT_ROUTE_17_HIDDEN_MAX_ELIXER + const EVENT_ROUTE_25_HIDDEN_POTION + const EVENT_FOUND_LEFTOVERS_IN_CELADON_CAFE + const EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY + const EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM + const EVENT_VERMILION_CITY_HIDDEN_FULL_HEAL + const EVENT_CELADON_CITY_HIDDEN_PP_UP + const EVENT_CINNABAR_ISLAND_HIDDEN_RARE_CANDY + const EVENT_BURNED_TOWER_1F_HIDDEN_ULTRA_BALL + const EVENT_GINA_GAVE_LEAF_STONE + const EVENT_ALAN_GAVE_FIRE_STONE + const EVENT_DANA_GAVE_THUNDERSTONE + const EVENT_TULLY_GAVE_WATER_STONE + const EVENT_TIFFANY_GAVE_PINK_BOW +; Unused: next 339 events + + const_next 600 +; Kurt Apricorn events + const EVENT_GAVE_KURT_RED_APRICORN + const EVENT_GAVE_KURT_BLU_APRICORN + const EVENT_GAVE_KURT_YLW_APRICORN + const EVENT_GAVE_KURT_GRN_APRICORN + const EVENT_GAVE_KURT_WHT_APRICORN + const EVENT_GAVE_KURT_BLK_APRICORN + const EVENT_GAVE_KURT_PNK_APRICORN +; Phone events + const EVENT_JACK_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_BEVERLY_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_HUEY_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_GOT_PROTEIN_FROM_HUEY + const EVENT_GOT_HP_UP_FROM_JOEY + const EVENT_GOT_CARBOS_FROM_VANCE + const EVENT_GOT_IRON_FROM_PARRY + const EVENT_GOT_CALCIUM_FROM_ERIN + const EVENT_KENJI_ON_BREAK + const EVENT_GAVEN_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_BETH_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_JOSE_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_REENA_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_JOEY_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_WADE_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_RALPH_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_LIZ_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_ANTHONY_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_TODD_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_GINA_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_IRWIN_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_ARNIE_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_ALAN_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const_skip ; unused + const_skip ; unused + const EVENT_DANA_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_CHAD_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_DEREK_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_TULLY_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_BRENT_ASKED_FOR_PHONE_NUMBER + const_skip ; unused + const EVENT_TIFFANY_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_VANCE_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_WILTON_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_KENJI_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_PARRY_ASKED_FOR_PHONE_NUMBER + const_skip ; unused in Crystal + const EVENT_ERIN_ASKED_FOR_PHONE_NUMBER + const EVENT_BUENA_OFFERED_HER_PHONE_NUMBER_NO_BLUE_CARD + const_skip ; unused +; Ruins of Alph puzzles + const EVENT_SOLVED_HO_OH_PUZZLE + const EVENT_SOLVED_KABUTO_PUZZLE + const EVENT_SOLVED_OMANYTE_PUZZLE + const EVENT_SOLVED_AERODACTYL_PUZZLE +; Decorations + const EVENT_DECO_BED_1 + const EVENT_DECO_BED_2 + const EVENT_DECO_BED_3 + const EVENT_DECO_BED_4 + const EVENT_DECO_CARPET_1 + const EVENT_DECO_CARPET_2 + const EVENT_DECO_CARPET_3 + const EVENT_DECO_CARPET_4 + const EVENT_DECO_PLANT_1 + const EVENT_DECO_PLANT_2 + const EVENT_DECO_PLANT_3 + const EVENT_DECO_POSTER_1 + const EVENT_DECO_POSTER_2 + const EVENT_DECO_POSTER_3 + const EVENT_DECO_POSTER_4 + const EVENT_DECO_FAMICOM + const EVENT_DECO_SNES + const EVENT_DECO_N64 + const EVENT_DECO_VIRTUAL_BOY + const EVENT_DECO_PIKACHU_DOLL + const EVENT_DECO_SURFING_PIKACHU_DOLL + const EVENT_DECO_CLEFAIRY_DOLL + const EVENT_DECO_JIGGLYPUFF_DOLL + const EVENT_DECO_BULBASAUR_DOLL + const EVENT_DECO_CHARMANDER_DOLL + const EVENT_DECO_SQUIRTLE_DOLL + const EVENT_DECO_POLIWAG_DOLL + const EVENT_DECO_DIGLETT_DOLL + const EVENT_DECO_STARMIE_DOLL + const EVENT_DECO_MAGIKARP_DOLL + const EVENT_DECO_ODDISH_DOLL + const EVENT_DECO_GENGAR_DOLL + const EVENT_DECO_SHELLDER_DOLL + const EVENT_DECO_GRIMER_DOLL + const EVENT_DECO_VOLTORB_DOLL + const EVENT_DECO_WEEDLE_DOLL + const EVENT_DECO_UNOWN_DOLL + const EVENT_DECO_GEODUDE_DOLL + const EVENT_DECO_MACHOP_DOLL + const EVENT_DECO_TENTACOOL_DOLL + const EVENT_PLAYERS_ROOM_POSTER + const EVENT_DECO_GOLD_TROPHY + const EVENT_DECO_SILVER_TROPHY + const EVENT_DECO_BIG_SNORLAX_DOLL + const EVENT_DECO_BIG_ONIX_DOLL + const EVENT_DECO_BIG_LAPRAS_DOLL +; More Johto story events + const EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE + const EVENT_SWITCH_1 + const EVENT_SWITCH_2 + const EVENT_SWITCH_3 + const EVENT_EMERGENCY_SWITCH + const EVENT_SWITCH_4 + const EVENT_SWITCH_5 + const EVENT_SWITCH_6 + const EVENT_SWITCH_7 + const EVENT_SWITCH_8 + const EVENT_SWITCH_9 + const EVENT_SWITCH_10 + const EVENT_SWITCH_11 + const EVENT_SWITCH_12 + const EVENT_SWITCH_13 + const EVENT_SWITCH_14 + const EVENT_UNCOVERED_STAIRCASE_IN_MAHOGANY_MART + const EVENT_TURNED_OFF_SECURITY_CAMERAS + const EVENT_SECURITY_CAMERA_1 + const EVENT_SECURITY_CAMERA_2 + const EVENT_SECURITY_CAMERA_3 + const EVENT_SECURITY_CAMERA_4 + const EVENT_SECURITY_CAMERA_5 + const EVENT_EXPLODING_TRAP_1 + const EVENT_EXPLODING_TRAP_2 + const EVENT_EXPLODING_TRAP_3 + const EVENT_EXPLODING_TRAP_4 + const EVENT_EXPLODING_TRAP_5 + const EVENT_EXPLODING_TRAP_6 + const EVENT_EXPLODING_TRAP_7 + const EVENT_EXPLODING_TRAP_8 + const EVENT_EXPLODING_TRAP_9 + const EVENT_EXPLODING_TRAP_10 + const EVENT_EXPLODING_TRAP_11 + const EVENT_EXPLODING_TRAP_12 + const EVENT_EXPLODING_TRAP_13 + const EVENT_EXPLODING_TRAP_14 + const EVENT_EXPLODING_TRAP_15 + const EVENT_EXPLODING_TRAP_16 + const EVENT_EXPLODING_TRAP_17 + const EVENT_EXPLODING_TRAP_18 + const EVENT_EXPLODING_TRAP_19 + const EVENT_EXPLODING_TRAP_20 + const EVENT_EXPLODING_TRAP_21 + const EVENT_EXPLODING_TRAP_22 + const EVENT_LEARNED_HAIL_GIOVANNI + const EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER + const EVENT_LEARNED_SLOWPOKETAIL + const EVENT_LEARNED_RATICATE_TAIL + const EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE + const EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1 + const EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2 + const EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3 + const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF + const EVENT_LEFT_MONS_WITH_CONTEST_OFFICER + const EVENT_WILLS_ROOM_ENTRANCE_CLOSED + const EVENT_WILLS_ROOM_EXIT_OPEN + const EVENT_KOGAS_ROOM_ENTRANCE_CLOSED + const EVENT_KOGAS_ROOM_EXIT_OPEN + const EVENT_BRUNOS_ROOM_ENTRANCE_CLOSED + const EVENT_BRUNOS_ROOM_EXIT_OPEN + const EVENT_KARENS_ROOM_ENTRANCE_CLOSED + const EVENT_KARENS_ROOM_EXIT_OPEN + const EVENT_LANCES_ROOM_ENTRANCE_CLOSED + const EVENT_LANCES_ROOM_EXIT_OPEN + const EVENT_CONTEST_OFFICER_HAS_SUN_STONE + const EVENT_CONTEST_OFFICER_HAS_EVERSTONE + const EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY + const EVENT_CONTEST_OFFICER_HAS_BERRY + const EVENT_FOUGHT_HO_OH + const EVENT_FOUGHT_LUGIA + const EVENT_BEAT_RIVAL_IN_MT_MOON + const EVENT_MET_BILLS_GRANDPA + const EVENT_SHOWED_LICKITUNG_TO_BILLS_GRANDPA + const EVENT_SHOWED_ODDISH_TO_BILLS_GRANDPA + const EVENT_SHOWED_STARYU_TO_BILLS_GRANDPA + const EVENT_SHOWED_GROWLITHE_VULPIX_TO_BILLS_GRANDPA + const EVENT_SHOWED_PICHU_TO_BILLS_GRANDPA + const EVENT_GOT_EVERSTONE_FROM_BILLS_GRANDPA + const EVENT_GOT_LEAF_STONE_FROM_BILLS_GRANDPA + const EVENT_GOT_WATER_STONE_FROM_BILLS_GRANDPA + const EVENT_GOT_FIRE_STONE_FROM_BILLS_GRANDPA + const EVENT_GOT_THUNDERSTONE_FROM_BILLS_GRANDPA + const EVENT_LISTENED_TO_INITIAL_RADIO +; More Crystal-exclusive events in Johto + const EVENT_WALL_OPENED_IN_HO_OH_CHAMBER + const EVENT_WALL_OPENED_IN_KABUTO_CHAMBER + const EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER + const EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER + const EVENT_WELCOMED_TO_POKECOM_CENTER + const EVENT_WADE_HAS_BERRY + const EVENT_WADE_HAS_PSNCUREBERRY + const EVENT_WADE_HAS_PRZCUREBERRY + const EVENT_WADE_HAS_BITTER_BERRY + const EVENT_WILTON_HAS_ULTRA_BALL + const EVENT_WILTON_HAS_GREAT_BALL + const EVENT_WILTON_HAS_POKE_BALL + const EVENT_HOLE_IN_BURNED_TOWER + const EVENT_FOUGHT_EUSINE + const EVENT_KOJI_ALLOWS_YOU_PASSAGE_TO_TIN_TOWER + const EVENT_FOUGHT_SUICUNE + const EVENT_GOT_RAINBOW_WING + const EVENT_HUEY_PROTEIN + const EVENT_JOEY_HP_UP + const EVENT_VANCE_CARBOS + const EVENT_PARRY_IRON + const EVENT_ERIN_CALCIUM + const EVENT_BUENA_OFFERED_HER_PHONE_NUMBER + const EVENT_MET_BUENA + const EVENT_GOT_ODD_EGG + const_skip ; unused + const EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER +; Unused: next 167 events + + const_next 1000 +; Trainer flags +; Swimmer F + const EVENT_BEAT_SWIMMERF_ELAINE + const EVENT_BEAT_SWIMMERF_PAULA + const EVENT_BEAT_SWIMMERF_KAYLEE + const EVENT_BEAT_SWIMMERF_SUSIE + const EVENT_BEAT_SWIMMERF_DENISE + const EVENT_BEAT_SWIMMERF_KARA + const EVENT_BEAT_SWIMMERF_WENDY + const EVENT_BEAT_SWIMMERF_LISA + const EVENT_BEAT_SWIMMERF_JILL + const EVENT_BEAT_SWIMMERF_MARY + const EVENT_BEAT_SWIMMERF_KATIE + const EVENT_BEAT_SWIMMERF_DAWN + const EVENT_BEAT_SWIMMERF_TARA + const EVENT_BEAT_SWIMMERF_NICOLE + const EVENT_BEAT_SWIMMERF_LORI + const EVENT_BEAT_SWIMMERF_JODY + const EVENT_BEAT_SWIMMERF_NIKKI + const EVENT_BEAT_SWIMMERF_DIANA + const EVENT_BEAT_SWIMMERF_BRIANA +; Bird Keeper + const EVENT_BEAT_BIRD_KEEPER_ROD + const EVENT_BEAT_BIRD_KEEPER_ABE + const EVENT_BEAT_BIRD_KEEPER_BRYAN + const EVENT_BEAT_BIRD_KEEPER_THEO + const EVENT_BEAT_BIRD_KEEPER_TOBY + const EVENT_BEAT_BIRD_KEEPER_DENIS + const EVENT_BEAT_BIRD_KEEPER_VANCE + const EVENT_BEAT_BIRD_KEEPER_HANK + const EVENT_BEAT_BIRD_KEEPER_ROY + const EVENT_BEAT_BIRD_KEEPER_BORIS + const EVENT_BEAT_BIRD_KEEPER_BOB + const EVENT_BEAT_BIRD_KEEPER_JOSE + const EVENT_BEAT_BIRD_KEEPER_PETER + const EVENT_BEAT_BIRD_KEEPER_JOSE2 + const EVENT_BEAT_BIRD_KEEPER_PERRY + const EVENT_BEAT_BIRD_KEEPER_BRET + const EVENT_BEAT_BIRD_KEEPER_JOSE3 + const EVENT_BEAT_BIRD_KEEPER_VANCE2 + const EVENT_BEAT_BIRD_KEEPER_VANCE3 +; Boarder + const EVENT_BEAT_BOARDER_RONALD + const EVENT_BEAT_BOARDER_BRAD + const EVENT_BEAT_BOARDER_DOUGLAS +; Sage + const EVENT_BEAT_SAGE_CHOW + const EVENT_BEAT_SAGE_NICO + const EVENT_BEAT_SAGE_JIN + const EVENT_BEAT_SAGE_TROY + const EVENT_BEAT_SAGE_JEFFREY + const EVENT_BEAT_SAGE_PING + const EVENT_BEAT_SAGE_EDMOND + const EVENT_BEAT_SAGE_NEAL + const EVENT_BEAT_SAGE_LI +; Camper + const EVENT_BEAT_CAMPER_ROLAND + const EVENT_BEAT_CAMPER_TODD + const EVENT_BEAT_CAMPER_IVAN + const EVENT_BEAT_CAMPER_ELLIOT + const EVENT_BEAT_CAMPER_BARRY + const EVENT_BEAT_CAMPER_LLOYD + const EVENT_BEAT_CAMPER_DEAN + const EVENT_BEAT_CAMPER_SID + const EVENT_BEAT_CAMPER_HERVEY + const EVENT_BEAT_CAMPER_DALE + const EVENT_BEAT_CAMPER_TED + const EVENT_BEAT_CAMPER_TODD2 + const EVENT_BEAT_CAMPER_TODD3 + const EVENT_BEAT_CAMPER_THOMAS + const EVENT_BEAT_CAMPER_LEROY + const EVENT_BEAT_CAMPER_DAVID + const EVENT_BEAT_CAMPER_JOHN + const EVENT_BEAT_CAMPER_JERRY + const EVENT_BEAT_CAMPER_SPENCER +; Burglar + const EVENT_BEAT_BURGLAR_DUNCAN + const EVENT_BEAT_BURGLAR_EDDIE + const EVENT_BEAT_BURGLAR_COREY + const_skip ; unused +; Biker + const EVENT_BEAT_BIKER_BENNY + const EVENT_BEAT_BIKER_KAZU + const EVENT_BEAT_BIKER_DWAYNE + const EVENT_BEAT_BIKER_HARRIS + const EVENT_BEAT_BIKER_ZEKE + const EVENT_BEAT_BIKER_CHARLES + const EVENT_BEAT_BIKER_RILEY + const EVENT_BEAT_BIKER_JOEL + const EVENT_BEAT_BIKER_GLENN +; Psychic + const EVENT_BEAT_PSYCHIC_NATHAN + const EVENT_BEAT_PSYCHIC_FRANKLIN + const EVENT_BEAT_PSYCHIC_HERMAN + const EVENT_BEAT_PSYCHIC_FIDEL + const EVENT_BEAT_PSYCHIC_GREG + const EVENT_BEAT_PSYCHIC_NORMAN + const EVENT_BEAT_PSYCHIC_MARK + const EVENT_BEAT_PSYCHIC_PHIL + const EVENT_BEAT_PSYCHIC_RICHARD + const EVENT_BEAT_PSYCHIC_GILBERT + const EVENT_BEAT_PSYCHIC_JARED + const EVENT_BEAT_PSYCHIC_RODNEY +; Firebreather + const EVENT_BEAT_FIREBREATHER_OTIS + const EVENT_BEAT_FIREBREATHER_DICK + const EVENT_BEAT_FIREBREATHER_NED + const EVENT_BEAT_FIREBREATHER_BURT + const EVENT_BEAT_FIREBREATHER_BILL + const EVENT_BEAT_FIREBREATHER_WALT + const EVENT_BEAT_FIREBREATHER_RAY + const EVENT_BEAT_FIREBREATHER_LYLE +; Fisher + const EVENT_BEAT_FISHER_JUSTIN + const EVENT_BEAT_FISHER_RALPH + const EVENT_BEAT_FISHER_ARNOLD + const EVENT_BEAT_FISHER_KYLE + const EVENT_BEAT_FISHER_HENRY + const EVENT_BEAT_FISHER_MARVIN + const EVENT_BEAT_FISHER_TULLY + const EVENT_BEAT_FISHER_ANDRE + const EVENT_BEAT_FISHER_RAYMOND + const EVENT_BEAT_FISHER_WILTON + const EVENT_BEAT_FISHER_EDGAR + const EVENT_BEAT_FISHER_JONAH + const EVENT_BEAT_FISHER_MARTIN + const EVENT_BEAT_FISHER_STEPHEN + const EVENT_BEAT_FISHER_BARNEY + const EVENT_BEAT_FISHER_RALPH2 + const EVENT_BEAT_FISHER_RALPH3 + const EVENT_BEAT_FISHER_TULLY2 + const EVENT_BEAT_FISHER_TULLY3 + const EVENT_BEAT_FISHER_WILTON2 + const EVENT_BEAT_FISHER_SCOTT + const EVENT_BEAT_FISHER_WILTON3 +; Twins + const EVENT_BEAT_TWINS_AMY_AND_MAY + const EVENT_BEAT_TWINS_ANN_AND_ANNE + const EVENT_BEAT_TWINS_ANN_AND_ANNE2 + const EVENT_BEAT_TWINS_AMY_AND_MAY2 + const EVENT_BEAT_TWINS_JO_AND_ZOE + const EVENT_BEAT_TWINS_JO_AND_ZOE2 + const EVENT_BEAT_TWINS_MEG_AND_PEG + const EVENT_BEAT_TWINS_MEG_AND_PEG2 +; Schoolboy + const EVENT_BEAT_SCHOOLBOY_JACK + const EVENT_BEAT_SCHOOLBOY_KIP + const EVENT_BEAT_SCHOOLBOY_ALAN + const EVENT_BEAT_SCHOOLBOY_JOHNNY + const EVENT_BEAT_SCHOOLBOY_DANNY + const EVENT_BEAT_SCHOOLBOY_TOMMY + const EVENT_BEAT_SCHOOLBOY_DUDLEY + const EVENT_BEAT_SCHOOLBOY_JOE + const EVENT_BEAT_SCHOOLBOY_BILLY + const EVENT_BEAT_SCHOOLBOY_CHAD + const EVENT_BEAT_SCHOOLBOY_NATE + const EVENT_BEAT_SCHOOLBOY_RICKY + const EVENT_BEAT_SCHOOLBOY_JACK2 + const EVENT_BEAT_SCHOOLBOY_JACK3 + const EVENT_BEAT_SCHOOLBOY_ALAN2 + const EVENT_BEAT_SCHOOLBOY_ALAN3 + const EVENT_BEAT_SCHOOLBOY_CHAD2 + const EVENT_BEAT_SCHOOLBOY_CHAD3 +; Picnicker + const EVENT_BEAT_PICNICKER_LIZ + const EVENT_BEAT_PICNICKER_GINA + const EVENT_BEAT_PICNICKER_BROOKE + const EVENT_BEAT_PICNICKER_KIM + const EVENT_BEAT_PICNICKER_CINDY + const EVENT_BEAT_PICNICKER_HOPE + const EVENT_BEAT_PICNICKER_SHARON + const EVENT_BEAT_PICNICKER_DEBRA + const EVENT_BEAT_PICNICKER_GINA2 + const EVENT_BEAT_PICNICKER_ERIN + const EVENT_BEAT_PICNICKER_LIZ2 + const EVENT_BEAT_PICNICKER_LIZ3 + const EVENT_BEAT_PICNICKER_HEIDI + const EVENT_BEAT_PICNICKER_EDNA + const EVENT_BEAT_PICNICKER_GINA3 + const EVENT_BEAT_PICNICKER_TIFFANY2 + const EVENT_BEAT_PICNICKER_TIFFANY3 + const EVENT_BEAT_PICNICKER_ERIN2 + const EVENT_BEAT_PICNICKER_TANYA + const EVENT_BEAT_PICNICKER_TIFFANY + const EVENT_BEAT_PICNICKER_ERIN3 +; Guitarist + const EVENT_BEAT_GUITARIST_CLYDE + const EVENT_BEAT_GUITARIST_VINCENT +; Juggler + const EVENT_BEAT_JUGGLER_IRWIN + const EVENT_BEAT_JUGGLER_FRITZ + const EVENT_BEAT_JUGGLER_HORTON + const EVENT_BEAT_JUGGLER_IRWIN2 + const EVENT_BEAT_JUGGLER_IRWIN3 +; Gentleman + const EVENT_BEAT_GENTLEMAN_PRESTON + const EVENT_BEAT_GENTLEMAN_EDWARD + const EVENT_BEAT_GENTLEMAN_GREGORY + const EVENT_BEAT_GENTLEMAN_VIRGIL + const EVENT_BEAT_GENTLEMAN_ALFRED +; Scientist + const EVENT_BEAT_SCIENTIST_ROSS + const EVENT_BEAT_SCIENTIST_MITCH + const EVENT_BEAT_SCIENTIST_JED + const EVENT_BEAT_SCIENTIST_MARC + const EVENT_BEAT_SCIENTIST_RICH +; Blackbelt + const EVENT_BEAT_BLACKBELT_KENJI2 + const EVENT_BEAT_BLACKBELT_YOSHI + const EVENT_BEAT_BLACKBELT_KENJI3 + const EVENT_BEAT_BLACKBELT_LAO + const EVENT_BEAT_BLACKBELT_NOB + const EVENT_BEAT_BLACKBELT_KIYO + const EVENT_BEAT_BLACKBELT_LUNG + const EVENT_BEAT_BLACKBELT_KENJI + const EVENT_BEAT_BLACKBELT_WAI +; Beauty + const EVENT_BEAT_BEAUTY_VICTORIA + const EVENT_BEAT_BEAUTY_SAMANTHA + const EVENT_BEAT_BEAUTY_JULIE + const EVENT_BEAT_BEAUTY_JACLYN + const EVENT_BEAT_BEAUTY_BRENDA + const EVENT_BEAT_BEAUTY_CASSIE + const EVENT_BEAT_BEAUTY_CAROLINE + const EVENT_BEAT_BEAUTY_CARLENE + const EVENT_BEAT_BEAUTY_JESSICA + const EVENT_BEAT_BEAUTY_RACHAEL + const EVENT_BEAT_BEAUTY_ANGELICA + const EVENT_BEAT_BEAUTY_KENDRA + const EVENT_BEAT_BEAUTY_VERONICA + const EVENT_BEAT_BEAUTY_JULIA + const EVENT_BEAT_BEAUTY_THERESA + const EVENT_BEAT_BEAUTY_VALERIE +; Johto Gym Leaders + const EVENT_BEAT_FALKNER + const EVENT_BEAT_BUGSY + const EVENT_BEAT_WHITNEY + const EVENT_BEAT_MORTY + const EVENT_BEAT_JASMINE + const EVENT_BEAT_CHUCK + const EVENT_BEAT_PRYCE + const EVENT_BEAT_CLAIR +; Kanto Gym Leaders + const EVENT_BEAT_BROCK + const EVENT_BEAT_MISTY + const EVENT_BEAT_LTSURGE + const EVENT_BEAT_ERIKA + const EVENT_BEAT_JANINE + const EVENT_BEAT_SABRINA + const EVENT_BEAT_BLAINE + const EVENT_BEAT_BLUE +; PokefanM + const EVENT_BEAT_POKEFANM_WILLIAM + const EVENT_BEAT_POKEFANM_DEREK + const EVENT_BEAT_POKEFANM_ROBERT + const EVENT_BEAT_POKEFANM_JOSHUA + const EVENT_BEAT_POKEFANM_CARTER + const EVENT_BEAT_POKEFANM_TREVOR + const EVENT_BEAT_POKEFANM_BRANDON + const EVENT_BEAT_POKEFANM_JEREMY + const EVENT_BEAT_POKEFANM_COLIN + const EVENT_BEAT_POKEFANM_DEREK2 + const EVENT_BEAT_POKEFANM_DEREK3 + const EVENT_BEAT_POKEFANM_ALEX +; PokefanF + const EVENT_BEAT_POKEFANF_BEVERLY + const EVENT_BEAT_POKEFANF_RUTH + const EVENT_BEAT_POKEFANF_BEVERLY2 + const EVENT_BEAT_POKEFANF_BEVERLY3 + const EVENT_BEAT_POKEFANF_GEORGIA +; Kimono Girl + const_skip ; unused + const EVENT_BEAT_KIMONO_GIRL_NAOKO + const EVENT_BEAT_KIMONO_GIRL_SAYO + const EVENT_BEAT_KIMONO_GIRL_ZUKI + const EVENT_BEAT_KIMONO_GIRL_KUNI + const EVENT_BEAT_KIMONO_GIRL_MIKI +; Pokemaniac + const EVENT_BEAT_POKEMANIAC_LARRY + const EVENT_BEAT_POKEMANIAC_ANDREW + const EVENT_BEAT_POKEMANIAC_CALVIN + const EVENT_BEAT_POKEMANIAC_SHANE + const EVENT_BEAT_POKEMANIAC_BEN + const EVENT_BEAT_POKEMANIAC_BRENT + const EVENT_BEAT_POKEMANIAC_RON + const EVENT_BEAT_POKEMANIAC_ETHAN + const EVENT_BEAT_POKEMANIAC_BRENT2 + const EVENT_BEAT_POKEMANIAC_BRENT3 + const EVENT_BEAT_POKEMANIAC_ISSAC + const EVENT_BEAT_POKEMANIAC_DONALD + const EVENT_BEAT_POKEMANIAC_ZACH +; GruntM + const EVENT_BEAT_ROCKET_GRUNTM_1 + const EVENT_BEAT_ROCKET_GRUNTM_2 + const EVENT_BEAT_ROCKET_GRUNTM_3 + const EVENT_BEAT_ROCKET_GRUNTM_4 + const EVENT_BEAT_ROCKET_GRUNTM_5 + const EVENT_BEAT_ROCKET_GRUNTM_6 + const EVENT_BEAT_ROCKET_GRUNTM_7 + const EVENT_BEAT_ROCKET_GRUNTM_8 + const EVENT_BEAT_ROCKET_GRUNTM_9 + const EVENT_BEAT_ROCKET_GRUNTM_10 + const EVENT_BEAT_ROCKET_GRUNTM_11 + const EVENT_BEAT_ROCKET_GRUNTM_12 + const EVENT_BEAT_ROCKET_GRUNTM_13 + const EVENT_BEAT_ROCKET_GRUNTM_14 + const EVENT_BEAT_ROCKET_GRUNTM_15 + const EVENT_BEAT_ROCKET_GRUNTM_16 + const EVENT_BEAT_ROCKET_GRUNTM_17 + const EVENT_BEAT_ROCKET_GRUNTM_18 + const EVENT_BEAT_ROCKET_GRUNTM_19 + const EVENT_BEAT_ROCKET_GRUNTM_20 + const EVENT_BEAT_ROCKET_GRUNTM_21 + const EVENT_BEAT_ROCKET_GRUNTM_22 + const EVENT_BEAT_ROCKET_GRUNTM_23 + const EVENT_BEAT_ROCKET_GRUNTM_24 + const EVENT_BEAT_ROCKET_GRUNTM_25 + const EVENT_BEAT_ROCKET_GRUNTM_26 + const EVENT_BEAT_ROCKET_GRUNTM_27 + const EVENT_BEAT_ROCKET_GRUNTM_28 + const EVENT_BEAT_ROCKET_GRUNTM_29 + const EVENT_BEAT_ROCKET_GRUNTM_30 + const EVENT_BEAT_ROCKET_GRUNTM_31 +; GruntF + const EVENT_BEAT_ROCKET_GRUNTF_1 + const EVENT_BEAT_ROCKET_GRUNTF_2 + const EVENT_BEAT_ROCKET_GRUNTF_3 + const EVENT_BEAT_ROCKET_GRUNTF_4 + const EVENT_BEAT_ROCKET_GRUNTF_5 +; Lass + const EVENT_BEAT_LASS_CARRIE + const EVENT_BEAT_LASS_BRIDGET + const EVENT_BEAT_LASS_ALICE + const EVENT_BEAT_LASS_KRISE + const EVENT_BEAT_LASS_CONNIE + const EVENT_BEAT_LASS_LINDA + const EVENT_BEAT_LASS_LAURA + const EVENT_BEAT_LASS_SHANNON + const EVENT_BEAT_LASS_MICHELLE + const EVENT_BEAT_LASS_DANA + const EVENT_BEAT_LASS_ELLEN + const EVENT_BEAT_LASS_CONNIE2 + const EVENT_BEAT_LASS_CONNIE3 + const EVENT_BEAT_LASS_DANA2 + const EVENT_BEAT_LASS_DANA3 +; Hiker + const EVENT_BEAT_HIKER_ANTHONY2 + const EVENT_BEAT_HIKER_RUSSELL + const EVENT_BEAT_HIKER_PHILLIP + const EVENT_BEAT_HIKER_LEONARD + const EVENT_BEAT_HIKER_ANTHONY + const EVENT_BEAT_HIKER_BENJAMIN + const EVENT_BEAT_HIKER_ERIK + const EVENT_BEAT_HIKER_MICHAEL + const EVENT_BEAT_HIKER_PARRY + const EVENT_BEAT_HIKER_TIMOTHY + const EVENT_BEAT_HIKER_BAILEY + const EVENT_BEAT_HIKER_ANTHONY3 + const EVENT_BEAT_HIKER_TIM + const EVENT_BEAT_HIKER_NOLAND + const EVENT_BEAT_HIKER_SIDNEY + const EVENT_BEAT_HIKER_KENNY + const EVENT_BEAT_HIKER_JIM + const EVENT_BEAT_HIKER_DANIEL + const EVENT_BEAT_HIKER_PARRY2 + const EVENT_BEAT_HIKER_PARRY3 +; Bug Catcher + const EVENT_BEAT_BUG_CATCHER_DON + const EVENT_BEAT_BUG_CATCHER_ROB + const EVENT_BEAT_BUG_CATCHER_ED + const EVENT_BEAT_BUG_CATCHER_WADE + const EVENT_BEAT_BUG_CATCHER_BENNY + const EVENT_BEAT_BUG_CATCHER_AL + const EVENT_BEAT_BUG_CATCHER_JOSH + const EVENT_BEAT_BUG_CATCHER_ARNIE + const EVENT_BEAT_BUG_CATCHER_KEN + const EVENT_BEAT_BUG_CATCHER_WADE2 + const EVENT_BEAT_BUG_CATCHER_WADE3 + const EVENT_BEAT_BUG_CATCHER_DOUG + const EVENT_BEAT_BUG_CATCHER_ARNIE2 + const EVENT_BEAT_BUG_CATCHER_ARNIE3 +; Officer + const EVENT_BEAT_OFFICER_KEITH + const EVENT_BEAT_OFFICER_DIRK +; CooltrainerM + const EVENT_BEAT_COOLTRAINERM_NICK + const EVENT_BEAT_COOLTRAINERM_AARON + const EVENT_BEAT_COOLTRAINERM_PAUL + const EVENT_BEAT_COOLTRAINERM_CODY + const EVENT_BEAT_COOLTRAINERM_MIKE + const EVENT_BEAT_COOLTRAINERM_GAVEN2 + const EVENT_BEAT_COOLTRAINERM_GAVEN3 + const EVENT_BEAT_COOLTRAINERM_RYAN + const EVENT_BEAT_COOLTRAINERM_JAKE + const EVENT_BEAT_COOLTRAINERM_GAVEN + const EVENT_BEAT_COOLTRAINERM_BLAKE + const EVENT_BEAT_COOLTRAINERM_BRIAN + const EVENT_BEAT_COOLTRAINERM_ERICK + const EVENT_BEAT_COOLTRAINERM_ANDY + const EVENT_BEAT_COOLTRAINERM_TYLER + const EVENT_BEAT_COOLTRAINERM_SEAN + const EVENT_BEAT_COOLTRAINERM_KEVIN + const EVENT_BEAT_COOLTRAINERM_STEVE + const EVENT_BEAT_COOLTRAINERM_ALLEN +; CooltrainerF + const EVENT_BEAT_COOLTRAINERF_GWEN + const EVENT_BEAT_COOLTRAINERF_LOIS + const EVENT_BEAT_COOLTRAINERF_FRAN + const EVENT_BEAT_COOLTRAINERF_LOLA + const EVENT_BEAT_COOLTRAINERF_KATE + const EVENT_BEAT_COOLTRAINERF_IRENE + const EVENT_BEAT_COOLTRAINERF_KELLY + const EVENT_BEAT_COOLTRAINERF_JOYCE + const EVENT_BEAT_COOLTRAINERF_BETH + const EVENT_BEAT_COOLTRAINERF_REENA + const EVENT_BEAT_COOLTRAINERF_MEGAN + const EVENT_BEAT_COOLTRAINERF_BETH2 + const EVENT_BEAT_COOLTRAINERF_CAROL + const EVENT_BEAT_COOLTRAINERF_QUINN + const EVENT_BEAT_COOLTRAINERF_EMMA + const EVENT_BEAT_COOLTRAINERF_CYBIL + const EVENT_BEAT_COOLTRAINERF_JENN + const EVENT_BEAT_COOLTRAINERF_BETH3 + const EVENT_BEAT_COOLTRAINERF_REENA2 + const EVENT_BEAT_COOLTRAINERF_REENA3 +; ExecutiveF + const EVENT_BEAT_ROCKET_EXECUTIVEF_1 + const EVENT_BEAT_ROCKET_EXECUTIVEF_2 +; ExecutiveM + const EVENT_BEAT_ROCKET_EXECUTIVEM_1 + const EVENT_BEAT_ROCKET_EXECUTIVEM_2 + const EVENT_BEAT_ROCKET_EXECUTIVEM_3 + const EVENT_BEAT_ROCKET_EXECUTIVEM_4 +; Sailor + const EVENT_BEAT_SAILOR_EUGENE + const EVENT_BEAT_SAILOR_HUEY + const EVENT_BEAT_SAILOR_TERRELL + const EVENT_BEAT_SAILOR_KENT + const EVENT_BEAT_SAILOR_ERNEST + const EVENT_BEAT_SAILOR_JEFF + const EVENT_BEAT_SAILOR_GARRETT + const EVENT_BEAT_SAILOR_KENNETH + const EVENT_BEAT_SAILOR_STANLY + const EVENT_BEAT_SAILOR_HARRY + const EVENT_BEAT_SAILOR_HUEY2 + const EVENT_BEAT_SAILOR_HUEY3 +; Super Nerd + const EVENT_BEAT_SUPER_NERD_STAN + const EVENT_BEAT_SUPER_NERD_ERIC + const EVENT_BEAT_SUPER_NERD_GREGG + const EVENT_BEAT_SUPER_NERD_JAY + const EVENT_BEAY_SUPER_NERD_DAVE + const EVENT_BEAT_SUPER_NERD_SAM + const EVENT_BEAT_SUPER_NERD_TOM + const EVENT_BEAT_SUPER_NERD_PAT + const EVENT_BEAT_SUPER_NERD_SHAWN + const EVENT_BEAT_SUPER_NERD_TERU +; Medium + const EVENT_BEAT_MEDIUM_MARTHA + const EVENT_BEAT_MEDIUM_GRACE + const EVENT_BEAT_MEDIUM_BETHANY + const EVENT_BEAT_MEDIUM_MARGRET + const EVENT_BEAT_MEDIUM_ETHEL + const EVENT_BEAT_MEDIUM_REBECCA + const EVENT_BEAT_MEDIUM_DORIS +; Skier + const EVENT_BEAT_SKIER_ROXANNE + const EVENT_BEAT_SKIER_CLARISSA +; SwimmerM + const EVENT_BEAT_SWIMMERM_HAROLD + const EVENT_BEAT_SWIMMERM_SIMON + const EVENT_BEAT_SWIMMERM_RANDALL + const EVENT_BEAT_SWIMMERM_CHARLIE + const EVENT_BEAT_SWIMMERM_GEORGE + const EVENT_BEAT_SWIMMERM_BERKE + const EVENT_BEAT_SWIMMERM_KIRK + const EVENT_BEAT_SWIMMERM_MATHEW + const EVENT_BEAT_SWIMMERM_HAL + const EVENT_BEAT_SWIMMERM_PATON + const EVENT_BEAT_SWIMMERM_DARYL + const EVENT_BEAT_SWIMMERM_WALTER + const EVENT_BEAT_SWIMMERM_TONY + const EVENT_BEAT_SWIMMERM_JEROME + const EVENT_BEAT_SWIMMERM_TUCKER + const EVENT_BEAT_SWIMMERM_RICK + const EVENT_BEAT_SWIMMERM_CAMERON + const EVENT_BEAT_SWIMMERM_SETH + const EVENT_BEAT_SWIMMERM_JAMES + const EVENT_BEAT_SWIMMERM_LEWIS + const EVENT_BEAT_SWIMMERM_PARKER +; Youngster + const EVENT_BEAT_YOUNGSTER_JOEY + const EVENT_BEAT_YOUNGSTER_MIKEY + const EVENT_BEAT_YOUNGSTER_ALBERT + const EVENT_BEAT_YOUNGSTER_GORDON + const EVENT_BEAT_YOUNGSTER_SAMUEL + const EVENT_BEAT_YOUNGSTER_IAN + const EVENT_BEAT_YOUNGSTER_JOEY2 + const EVENT_BEAT_YOUNGSTER_JOEY3 + const EVENT_BEAT_YOUNGSTER_WARREN + const EVENT_BEAT_YOUNGSTER_JIMMY + const EVENT_BEAT_YOUNGSTER_OWEN + const EVENT_BEAT_YOUNGSTER_JASON +; Teacher + const EVENT_BEAT_TEACHER_COLETTE + const EVENT_BEAT_TEACHER_HILLARY + const EVENT_BEAT_TEACHER_SHIRLEY +; Elite Four and Champion + const EVENT_BEAT_ELITE_4_WILL + const EVENT_BEAT_ELITE_4_KOGA + const EVENT_BEAT_ELITE_4_BRUNO + const EVENT_BEAT_ELITE_4_KAREN + const EVENT_BEAT_CHAMPION_LANCE +; Crystal-exclusive trainer flags + const EVENT_BEAT_COOLTRAINERM_DARIN + const EVENT_BEAT_COOLTRAINERF_CARA + const EVENT_BEAT_TWINS_LEA_AND_PIA + const EVENT_BEAT_BUG_CATCHER_WAYNE + const EVENT_BEAT_BEAUTY_OLIVIA + const EVENT_BEAT_POKEFANF_JAIME + const EVENT_BEAT_CAMPER_QUENTIN + const EVENT_BEAT_POKEMANIAC_MILLER + const EVENT_BEAT_SUPER_NERD_HUGH + const EVENT_BEAT_SUPER_NERD_MARKUS + const EVENT_BEAT_POKEFANM_REX + const EVENT_BEAT_POKEFANM_ALLAN + const EVENT_BEAT_SAGE_GAKU + const EVENT_BEAT_SAGE_MASA + const EVENT_BEAT_SAGE_KOJI +; Unused: next 116 events + + const_next 1600 +; Sprite visibility flags +; When these events are cleared, the sprite becomes visible; when set, the sprite is hidden. +; The map script command macros `disappear` and `appear` set/clear these flags and immediately apply the effect on visibility. +; The map script command macros `setevent` and `clearevent` set/clear these flags, and their effects will be seen when the map is reloaded. +; Johto itemballs + const EVENT_CYNDAQUIL_POKEBALL_IN_ELMS_LAB + const EVENT_TOTODILE_POKEBALL_IN_ELMS_LAB + const EVENT_CHIKORITA_POKEBALL_IN_ELMS_LAB + const EVENT_VIOLET_CITY_PP_UP + const EVENT_VIOLET_CITY_RARE_CANDY + const EVENT_LAKE_OF_RAGE_ELIXER + const EVENT_LAKE_OF_RAGE_TM_DETECT + const EVENT_SPROUT_TOWER_1F_PARLYZ_HEAL + const EVENT_SPROUT_TOWER_2F_X_ACCURACY + const EVENT_SPROUT_TOWER_3F_POTION + const EVENT_SPROUT_TOWER_3F_ESCAPE_ROPE + const EVENT_TIN_TOWER_3F_FULL_HEAL + const EVENT_TIN_TOWER_4F_ULTRA_BALL + const EVENT_TIN_TOWER_4F_PP_UP + const EVENT_TIN_TOWER_4F_ESCAPE_ROPE + const EVENT_TIN_TOWER_5F_RARE_CANDY + const EVENT_TIN_TOWER_7F_MAX_REVIVE + const EVENT_TIN_TOWER_8F_NUGGET + const EVENT_TIN_TOWER_8F_MAX_ELIXER + const EVENT_TIN_TOWER_8F_FULL_RESTORE + const EVENT_TEAM_ROCKET_BASE_B3F_ULTRA_BALL + const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_ULTRA_BALL + const EVENT_BURNED_TOWER_1F_HP_UP + const EVENT_BURNED_TOWER_B1F_TM_ENDURE + const EVENT_NATIONAL_PARK_PARLYZ_HEAL + const EVENT_NATIONAL_PARK_TM_DIG + const EVENT_UNION_CAVE_1F_GREAT_BALL + const EVENT_UNION_CAVE_1F_X_ATTACK + const EVENT_UNION_CAVE_1F_POTION + const EVENT_UNION_CAVE_1F_AWAKENING + const EVENT_UNION_CAVE_B1F_TM_SWIFT + const EVENT_UNION_CAVE_B1F_X_DEFEND + const EVENT_UNION_CAVE_B2F_ELIXER + const EVENT_UNION_CAVE_B2F_HYPER_POTION + const EVENT_SLOWPOKE_WELL_B1F_SUPER_POTION + const EVENT_SLOWPOKE_WELL_B2F_TM_RAIN_DANCE + const EVENT_OLIVINE_LIGHTHOUSE_3F_ETHER + const EVENT_OLIVINE_LIGHTHOUSE_5F_RARE_CANDY + const EVENT_OLIVINE_LIGHTHOUSE_5F_SUPER_REPEL + const EVENT_OLIVINE_LIGHTHOUSE_5F_TM_SWAGGER + const EVENT_OLIVINE_LIGHTHOUSE_6F_SUPER_POTION + const EVENT_TEAM_ROCKET_BASE_B1F_HYPER_POTION + const EVENT_TEAM_ROCKET_BASE_B1F_NUGGET + const EVENT_TEAM_ROCKET_BASE_B1F_GUARD_SPEC + const EVENT_TEAM_ROCKET_BASE_B2F_TM_THIEF + const EVENT_TEAM_ROCKET_BASE_B3F_PROTEIN + const EVENT_TEAM_ROCKET_BASE_B3F_X_SPECIAL + const EVENT_TEAM_ROCKET_BASE_B3F_FULL_HEAL + const EVENT_TEAM_ROCKET_BASE_B3F_ICE_HEAL + const EVENT_ILEX_FOREST_REVIVE + const EVENT_GOLDENROD_UNDERGROUND_COIN_CASE + const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_SMOKE_BALL + const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_FULL_HEAL + const EVENT_GOLDENROD_DEPT_STORE_B1F_ETHER + const EVENT_GOLDENROD_DEPT_STORE_B1F_AMULET_COIN + const EVENT_GOLDENROD_DEPT_STORE_B1F_BURN_HEAL + const EVENT_GOLDENROD_DEPT_STORE_B1F_ULTRA_BALL + const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_MAX_ETHER + const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK + const EVENT_MOUNT_MORTAR_1F_OUTSIDE_ETHER + const EVENT_MOUNT_MORTAR_1F_OUTSIDE_REVIVE + const EVENT_MOUNT_MORTAR_1F_INSIDE_ESCAPE_ROPE + const EVENT_MOUNT_MORTAR_1F_INSIDE_MAX_REVIVE + const EVENT_MOUNT_MORTAR_1F_INSIDE_HYPER_POTION + const EVENT_MOUNT_MORTAR_2F_INSIDE_MAX_POTION + const EVENT_MOUNT_MORTAR_2F_INSIDE_RARE_CANDY + const EVENT_MOUNT_MORTAR_2F_INSIDE_TM_DEFENSE_CURL + const EVENT_MOUNT_MORTAR_2F_INSIDE_DRAGON_SCALE + const EVENT_MOUNT_MORTAR_2F_INSIDE_ELIXER + const EVENT_MOUNT_MORTAR_2F_INSIDE_ESCAPE_ROPE + const EVENT_MOUNT_MORTAR_B1F_HYPER_POTION + const EVENT_MOUNT_MORTAR_B1F_CARBOS + const EVENT_GOT_HM07_WATERFALL + const EVENT_ICE_PATH_1F_PP_UP + const EVENT_ICE_PATH_B1F_IRON + const EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_FULL_HEAL + const EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_MAX_POTION + const EVENT_ICE_PATH_B2F_BLACKTHORN_SIDE_TM_REST + const EVENT_ICE_PATH_B3F_NEVERMELTICE + const EVENT_WHIRL_ISLAND_NE_ULTRA_BALL + const EVENT_WHIRL_ISLAND_SW_ULTRA_BALL + const EVENT_WHIRL_ISLAND_B1F_FULL_RESTORE + const EVENT_WHIRL_ISLAND_B1F_CARBOS + const EVENT_WHIRL_ISLAND_B1F_CALCIUM + const EVENT_WHIRL_ISLAND_B1F_NUGGET + const EVENT_WHIRL_ISLAND_B1F_ESCAPE_ROPE + const EVENT_WHIRL_ISLAND_B2F_FULL_RESTORE + const EVENT_WHIRL_ISLAND_B2F_MAX_REVIVE + const EVENT_WHIRL_ISLAND_B2F_MAX_ELIXER + const EVENT_SILVER_CAVE_ROOM_1_MAX_ELIXER + const EVENT_SILVER_CAVE_ROOM_1_PROTEIN + const EVENT_SILVER_CAVE_ROOM_1_ESCAPE_ROPE + const EVENT_SILVER_CAVE_ITEM_ROOMS_MAX_REVIVE + const EVENT_SILVER_CAVE_ITEM_ROOMS_FULL_RESTORE + const EVENT_DARK_CAVE_VIOLET_ENTRANCE_POTION + const EVENT_DARK_CAVE_VIOLET_ENTRANCE_FULL_HEAL + const EVENT_DARK_CAVE_VIOLET_ENTRANCE_HYPER_POTION + const EVENT_DARK_CAVE_BLACKTHORN_ENTRANCE_REVIVE + const EVENT_DARK_CAVE_BLACKTHORN_ENTRANCE_TM_SNORE + const EVENT_VICTORY_ROAD_TM_EARTHQUAKE + const EVENT_VICTORY_ROAD_MAX_REVIVE + const EVENT_VICTORY_ROAD_FULL_RESTORE + const EVENT_VICTORY_ROAD_FULL_HEAL + const EVENT_VICTORY_ROAD_HP_UP + const EVENT_DRAGONS_DEN_B1F_DRAGON_FANG + const EVENT_TOHJO_FALLS_MOON_STONE + const EVENT_ROUTE_26_MAX_ELIXER + const EVENT_ROUTE_27_TM_SOLARBEAM + const EVENT_ROUTE_27_RARE_CANDY + const EVENT_ROUTE_29_POTION + const EVENT_ROUTE_31_POTION + const EVENT_ROUTE_31_POKE_BALL + const EVENT_ROUTE_32_GREAT_BALL + const EVENT_ROUTE_32_REPEL + const EVENT_ROUTE_35_TM_ROLLOUT + const EVENT_ROUTE_42_ULTRA_BALL + const EVENT_ROUTE_42_SUPER_POTION + const EVENT_ROUTE_43_MAX_ETHER + const EVENT_ROUTE_44_MAX_REVIVE + const EVENT_ROUTE_44_ULTRA_BALL + const EVENT_ROUTE_45_NUGGET + const EVENT_ROUTE_45_REVIVE + const EVENT_ROUTE_45_ELIXER + const EVENT_ROUTE_45_MAX_POTION + const EVENT_ROUTE_46_X_SPEED +; Johto people + const EVENT_RIVAL_NEW_BARK_TOWN + const EVENT_RIVAL_CHERRYGROVE_CITY + const EVENT_RIVAL_AZALEA_TOWN + const EVENT_RIVAL_TEAM_ROCKET_BASE + const EVENT_RIVAL_GOLDENROD_UNDERGROUND + const EVENT_RIVAL_VICTORY_ROAD + const EVENT_RIVAL_OLIVINE_CITY + const EVENT_RIVAL_SPROUT_TOWER + const EVENT_RIVAL_BURNED_TOWER + const EVENT_RIVAL_DRAGONS_DEN + const EVENT_PLAYERS_HOUSE_MOM_1 + const EVENT_PLAYERS_HOUSE_MOM_2 + const EVENT_MR_POKEMONS_HOUSE_OAK + const EVENT_VIOLET_CITY_EARL + const EVENT_EARLS_ACADEMY_EARL + const EVENT_GOLDENROD_CITY_ROCKET_SCOUT + const EVENT_GOLDENROD_CITY_ROCKET_TAKEOVER + const EVENT_RADIO_TOWER_ROCKET_TAKEOVER + const EVENT_GOLDENROD_CITY_CIVILIANS + const EVENT_RADIO_TOWER_CIVILIANS_AFTER + const EVENT_RADIO_TOWER_BLACKBELT_BLOCKS_STAIRS + const EVENT_OLIVINE_LIGHTHOUSE_JASMINE + const EVENT_OLIVINE_GYM_JASMINE + const EVENT_LAKE_OF_RAGE_LANCE + const EVENT_MAHOGANY_MART_LANCE_AND_DRAGONITE + const EVENT_TEAM_ROCKET_BASE_B2F_LANCE + const EVENT_TEAM_ROCKET_BASE_B3F_LANCE_PASSWORDS + const EVENT_DRAGONS_DEN_CLAIR + const EVENT_TEAM_ROCKET_BASE_SECURITY_GRUNTS + const EVENT_TEAM_ROCKET_BASE_POPULATION + const EVENT_TEAM_ROCKET_BASE_B3F_EXECUTIVE + const EVENT_ROUTE_43_GATE_ROCKETS + const EVENT_TEAM_ROCKET_BASE_B2F_EXECUTIVE + const EVENT_TEAM_ROCKET_BASE_B2F_GRUNT_WITH_EXECUTIVE + const EVENT_TEAM_ROCKET_BASE_B2F_DRAGONITE + const EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_1 + const EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_2 + const EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_3 + const EVENT_BLACKTHORN_CITY_SUPER_NERD_BLOCKS_GYM + const EVENT_BLACKTHORN_CITY_SUPER_NERD_DOES_NOT_BLOCK_GYM + const EVENT_DAY_CARE_MAN_IN_DAY_CARE + const EVENT_DAY_CARE_MAN_ON_ROUTE_34 + const EVENT_DAY_CARE_MON_1 + const EVENT_DAY_CARE_MON_2 + const EVENT_ILEX_FOREST_FARFETCHD + const EVENT_ROUTE_34_ILEX_FOREST_GATE_TEACHER_BEHIND_COUNTER + const EVENT_ROUTE_34_ILEX_FOREST_GATE_LASS + const EVENT_ROUTE_34_ILEX_FOREST_GATE_TEACHER_IN_WALKWAY + const EVENT_ILEX_FOREST_LASS + const EVENT_COPYCAT_1 + const EVENT_COPYCAT_2 + const EVENT_GOLDENROD_SALE_OFF + const EVENT_GOLDENROD_SALE_ON + const_skip ; unused in Crystal + const EVENT_ILEX_FOREST_APPRENTICE + const EVENT_ILEX_FOREST_CHARCOAL_MASTER + const EVENT_CHARCOAL_KILN_FARFETCH_D + const EVENT_CHARCOAL_KILN_APPRENTICE + const EVENT_CHARCOAL_KILN_BOSS + const EVENT_ROUTE_36_SUDOWOODO + const EVENT_AZALEA_TOWN_SLOWPOKES + const EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET + const EVENT_SLOWPOKE_WELL_SLOWPOKES + const EVENT_SLOWPOKE_WELL_ROCKETS + const EVENT_KURTS_HOUSE_SLOWPOKE + const EVENT_GUIDE_GENT_IN_HIS_HOUSE + const EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE + const EVENT_ELMS_AIDE_IN_VIOLET_POKEMON_CENTER + const EVENT_ELMS_AIDE_IN_LAB + const EVENT_COP_IN_ELMS_LAB + const EVENT_RUINS_OF_ALPH_OUTSIDE_SCIENTIST + const EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST + const EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS + const EVENT_BOULDER_IN_BLACKTHORN_GYM_1 + const EVENT_BOULDER_IN_BLACKTHORN_GYM_2 + const EVENT_BOULDER_IN_BLACKTHORN_GYM_3 + const EVENT_BOULDER_IN_ICE_PATH_1 + const EVENT_BOULDER_IN_ICE_PATH_2 + const EVENT_BOULDER_IN_ICE_PATH_3 + const EVENT_BOULDER_IN_ICE_PATH_4 + const EVENT_BOULDER_IN_ICE_PATH_1A + const EVENT_BOULDER_IN_ICE_PATH_2A + const EVENT_BOULDER_IN_ICE_PATH_3A + const EVENT_BOULDER_IN_ICE_PATH_4A + const EVENT_MYSTERY_GIFT_DELIVERY_GUY + const EVENT_MET_BILL + const EVENT_ECRUTEAK_POKE_CENTER_BILL + const EVENT_ROUTE_30_BATTLE + const EVENT_ROUTE_30_YOUNGSTER_JOEY + const EVENT_BUG_CATCHING_CONTESTANT_1A + const EVENT_BUG_CATCHING_CONTESTANT_2A + const EVENT_BUG_CATCHING_CONTESTANT_3A + const EVENT_BUG_CATCHING_CONTESTANT_4A + const EVENT_BUG_CATCHING_CONTESTANT_5A + const EVENT_BUG_CATCHING_CONTESTANT_6A + const EVENT_BUG_CATCHING_CONTESTANT_7A + const EVENT_BUG_CATCHING_CONTESTANT_8A + const EVENT_BUG_CATCHING_CONTESTANT_9A + const EVENT_BUG_CATCHING_CONTESTANT_10A + const EVENT_BUG_CATCHING_CONTESTANT_1B + const EVENT_BUG_CATCHING_CONTESTANT_2B + const EVENT_BUG_CATCHING_CONTESTANT_3B + const EVENT_BUG_CATCHING_CONTESTANT_4B + const EVENT_BUG_CATCHING_CONTESTANT_5B + const EVENT_BUG_CATCHING_CONTESTANT_6B + const EVENT_BUG_CATCHING_CONTESTANT_7B + const EVENT_BUG_CATCHING_CONTESTANT_8B + const EVENT_BUG_CATCHING_CONTESTANT_9B + const EVENT_BUG_CATCHING_CONTESTANT_10B + const EVENT_OLIVINE_PORT_SAILOR_AT_GANGWAY + const EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY + const EVENT_FAST_SHIP_1F_GENTLEMAN + const EVENT_FAST_SHIP_CABINS_NNW_NNE_NE_SAILOR + const EVENT_FAST_SHIP_B1F_SAILOR_LEFT + const EVENT_FAST_SHIP_B1F_SAILOR_RIGHT + const EVENT_FAST_SHIP_CABINS_SE_SSE_GENTLEMAN + const EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_1 + const EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_2 + const EVENT_OLIVINE_PORT_PASSAGE_POKEFAN_M + const EVENT_ROUTE_35_NATIONAL_PARK_GATE_YOUNGSTER + const EVENT_LAKE_OF_RAGE_CIVILIANS + const EVENT_MAHOGANY_MART_OWNERS + const EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME + const EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME + const EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP + const EVENT_FAST_SHIP_PASSENGERS_EASTBOUND + const EVENT_FAST_SHIP_PASSENGERS_WESTBOUND + const EVENT_TIN_TOWER_ROOF_HO_OH + const EVENT_WHIRL_ISLAND_LUGIA_CHAMBER_LUGIA + const EVENT_KURTS_HOUSE_KURT_1 + const EVENT_KURTS_HOUSE_KURT_2 + const EVENT_SLOWPOKE_WELL_KURT + const EVENT_PLAYERS_HOUSE_2F_CONSOLE + const EVENT_PLAYERS_HOUSE_2F_DOLL_1 + const EVENT_PLAYERS_HOUSE_2F_DOLL_2 + const EVENT_PLAYERS_HOUSE_2F_BIG_DOLL + const EVENT_ROUTE_35_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY + const EVENT_ROUTE_35_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY + const EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY + const EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY + const EVENT_GOLDENROD_TRAIN_STATION_GENTLEMAN + const EVENT_BURNED_TOWER_B1F_BEASTS_1 + const EVENT_BURNED_TOWER_B1F_BEASTS_2 + const EVENT_BLACKTHORN_CITY_GRAMPS_BLOCKS_DRAGONS_DEN + const EVENT_BLACKTHORN_CITY_GRAMPS_NOT_BLOCKING_DRAGONS_DEN + const EVENT_RUINS_OF_ALPH_KABUTO_CHAMBER_RECEPTIONIST + const EVENT_OPENED_MT_SILVER + const EVENT_FOUGHT_SNORLAX + const EVENT_LAKE_OF_RAGE_RED_GYARADOS + const EVENT_GOLDENROD_UNDERGROUND_GRANNY + const EVENT_GOLDENROD_UNDERGROUND_GRAMPS + const EVENT_GOLDENROD_UNDERGROUND_OLDER_HAIRCUT_BROTHER + const EVENT_GOLDENROD_UNDERGROUND_YOUNGER_HAIRCUT_BROTHER + const EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST + const EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_GYM + const EVENT_ROUTE_32_FRIEDA_OF_FRIDAY + const EVENT_ROUTE_29_TUSCANY_OF_TUESDAY + const EVENT_ROUTE_36_ARTHUR_OF_THURSDAY + const EVENT_ROUTE_37_SUNNY_OF_SUNDAY + const EVENT_LAKE_OF_RAGE_WESLEY_OF_WEDNESDAY + const EVENT_BLACKTHORN_CITY_SANTOS_OF_SATURDAY + const EVENT_ROUTE_40_MONICA_OF_MONDAY + const EVENT_LANCES_ROOM_OAK_AND_MARY + const EVENT_UNION_CAVE_B2F_LAPRAS + const EVENT_TEAM_ROCKET_DISBANDED + const EVENT_RED_IN_MT_SILVER + const EVENT_GOLDENROD_DEPT_STORE_5F_HAPPINESS_EVENT_LADY + const EVENT_BURNED_TOWER_MORTY + const EVENT_BURNED_TOWER_1F_EUSINE + const EVENT_RANG_CLEAR_BELL_1 + const EVENT_RANG_CLEAR_BELL_2 + const EVENT_FLORIA_AT_FLOWER_SHOP + const EVENT_FLORIA_AT_SUDOWOODO + const EVENT_GOLDENROD_CITY_MOVE_TUTOR + const EVENT_GOLDENROD_GAME_CORNER_MOVE_TUTOR +; Unused: next 0 events +; (In pokegold the previous 4 event flags were not defined, +; but in pokecrystal the 'const_next 1900' is redundant.) + + const_next 1900 +; Kanto people + const EVENT_ROUTE_24_ROCKET + const EVENT_CERULEAN_GYM_ROCKET + const EVENT_ROUTE_25_MISTY_BOYFRIEND + const EVENT_TRAINERS_IN_CERULEAN_GYM + const EVENT_VERMILION_CITY_SNORLAX + const EVENT_ROUTE_5_6_POKEFAN_M_BLOCKS_UNDERGROUND_PATH + const EVENT_SAFFRON_TRAIN_STATION_POPULATION + const EVENT_COPYCATS_HOUSE_2F_DOLL + const EVENT_VERMILION_FAN_CLUB_DOLL + const EVENT_BLUE_IN_CINNABAR + const EVENT_VIRIDIAN_GYM_BLUE + const EVENT_SEAFOAM_GYM_GYM_GUIDE + const EVENT_MT_MOON_SQUARE_ROCK + const EVENT_MT_MOON_SQUARE_CLEFAIRY + const EVENT_MT_MOON_RIVAL + const EVENT_INDIGO_PLATEAU_POKECENTER_RIVAL + const EVENT_TELEPORT_GUY +; Kanto itemballs + const EVENT_PICKED_UP_FOCUS_BAND + const EVENT_ROCK_TUNNEL_1F_ELIXER + const EVENT_ROCK_TUNNEL_1F_TM_STEEL_WING + const EVENT_ROCK_TUNNEL_B1F_IRON + const EVENT_ROCK_TUNNEL_B1F_PP_UP + const EVENT_ROCK_TUNNEL_B1F_REVIVE + const EVENT_ROUTE_2_DIRE_HIT + const EVENT_ROUTE_2_MAX_POTION + const EVENT_ROUTE_2_CARBOS + const EVENT_ROUTE_2_ELIXER + const EVENT_ROUTE_4_HP_UP + const EVENT_ROUTE_12_CALCIUM + const EVENT_ROUTE_12_NUGGET + const EVENT_ROUTE_15_PP_UP + const EVENT_ROUTE_25_PROTEIN +; New to Crystal + const EVENT_KURTS_HOUSE_GRANDDAUGHTER_1 + const EVENT_KURTS_HOUSE_GRANDDAUGHTER_2 + const EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_FISHER + const EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_YOUNGSTERS + const EVENT_DRAGON_SHRINE_CLAIR + const EVENT_BATTLE_TOWER_BATTLE_ROOM_YOUNGSTER + const EVENT_PLAYERS_HOUSE_1F_NEIGHBOR + const EVENT_PLAYERS_NEIGHBORS_HOUSE_NEIGHBOR + const EVENT_PICKED_UP_GOLD_BERRY_FROM_HO_OH_ITEM_ROOM + const EVENT_PICKED_UP_MYSTERYBERRY_FROM_HO_OH_ITEM_ROOM + const EVENT_PICKED_UP_REVIVAL_HERB_FROM_HO_OH_ITEM_ROOM + const EVENT_PICKED_UP_CHARCOAL_FROM_HO_OH_ITEM_ROOM + const EVENT_PICKED_UP_BERRY_FROM_KABUTO_ITEM_ROOM + const EVENT_PICKED_UP_PSNCUREBERRY_FROM_KABUTO_ITEM_ROOM + const EVENT_PICKED_UP_HEAL_POWDER_FROM_KABUTO_ITEM_ROOM + const EVENT_PICKED_UP_ENERGYPOWDER_FROM_KABUTO_ITEM_ROOM + const EVENT_PICKED_UP_MYSTERYBERRY_FROM_OMANYTE_ITEM_ROOM + const EVENT_PICKED_UP_MYSTIC_WATER_FROM_OMANYTE_ITEM_ROOM + const EVENT_PICKED_UP_STARDUST_FROM_OMANYTE_ITEM_ROOM + const EVENT_PICKED_UP_STAR_PIECE_FROM_OMANYTE_ITEM_ROOM + const EVENT_PICKED_UP_GOLD_BERRY_FROM_AERODACTYL_ITEM_ROOM + const EVENT_PICKED_UP_MOON_STONE_FROM_AERODACTYL_ITEM_ROOM + const EVENT_PICKED_UP_HEAL_POWDER_FROM_AERODACTYL_ITEM_ROOM + const EVENT_PICKED_UP_ENERGY_ROOT_FROM_AERODACTYL_ITEM_ROOM + const EVENT_AZALEA_TOWN_KURT + const EVENT_ILEX_FOREST_KURT + const EVENT_MOUNT_MORTAR_1F_INSIDE_MAX_POTION + const EVENT_MOUNT_MORTAR_1F_INSIDE_NUGGET + const EVENT_ECRUTEAK_GYM_GRAMPS + const EVENT_ECRUTEAK_CITY_GRAMPS + const EVENT_EUSINE_IN_BURNED_TOWER + const EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1 + const EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2 + const EVENT_CIANWOOD_CITY_EUSINE + const EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY + const EVENT_SAW_SUICUNE_ON_ROUTE_42 + const EVENT_SAW_SUICUNE_ON_ROUTE_36 + const EVENT_ECRUTEAK_TIN_TOWER_ENTRANCE_WANDERING_SAGE + const EVENT_TIN_TOWER_1F_SUICUNE + const EVENT_TIN_TOWER_1F_ENTEI + const EVENT_TIN_TOWER_1F_RAIKOU + const EVENT_TIN_TOWER_1F_EUSINE + const EVENT_TIN_TOWER_1F_WISE_TRIO_1 + const EVENT_SET_WHEN_FOUGHT_HO_OH + const EVENT_ROUTE_30_ANTIDOTE + const EVENT_ILEX_FOREST_X_ATTACK + const EVENT_ILEX_FOREST_ANTIDOTE + const EVENT_ILEX_FOREST_ETHER + const EVENT_ROUTE_34_NUGGET + const EVENT_ROUTE_44_MAX_REPEL + const EVENT_ICE_PATH_1F_PROTEIN + const EVENT_DRAGONS_DEN_B1F_CALCIUM + const EVENT_DRAGONS_DEN_B1F_MAX_ELIXER + const EVENT_SILVER_CAVE_ROOM_1_ULTRA_BALL + const EVENT_SILVER_CAVE_ROOM_2_CALCIUM + const EVENT_SILVER_CAVE_ROOM_2_ULTRA_BALL + const EVENT_SILVER_CAVE_ROOM_2_PP_UP + const EVENT_TIN_TOWER_1F_WISE_TRIO_2 + const EVENT_TIN_TOWER_6F_MAX_POTION + const EVENT_TIN_TOWER_9F_HP_UP + const EVENT_MOUNT_MORTAR_1F_INSIDE_IRON + const EVENT_MOUNT_MORTAR_1F_INSIDE_ULTRA_BALL + const EVENT_MOUNT_MORTAR_B1F_FULL_RESTORE + const EVENT_MOUNT_MORTAR_B1F_MAX_ETHER + const EVENT_MOUNT_MORTAR_B1F_PP_UP + const EVENT_RADIO_TOWER_5F_ULTRA_BALL + const EVENT_DARK_CAVE_VIOLET_ENTRANCE_DIRE_HIT + const EVENT_BATTLE_TOWER_OPEN_CIVILIANS +; Unused: next 48 events + + const_next 2048 +DEF NUM_EVENTS EQU const_value ; 800 diff --git a/constants/gfx_constants.asm b/constants/gfx_constants.asm new file mode 100644 index 0000000..4a56ce2 --- /dev/null +++ b/constants/gfx_constants.asm @@ -0,0 +1,57 @@ +DEF TILE_WIDTH EQU 8 ; pixels +DEF LEN_1BPP_TILE EQU 1 * TILE_WIDTH ; bytes +DEF LEN_2BPP_TILE EQU 2 * TILE_WIDTH ; bytes + +DEF NUM_PAL_COLORS EQU 4 +DEF PAL_COLOR_SIZE EQU 2 +DEF PALETTE_SIZE EQU NUM_PAL_COLORS * PAL_COLOR_SIZE + +DEF PALRGB_WHITE EQU palred 31 + palgreen 31 + palblue 31 ; $7fff + +DEF SCREEN_WIDTH EQU 20 ; tiles +DEF SCREEN_HEIGHT EQU 18 ; tiles +DEF SCREEN_WIDTH_PX EQU SCREEN_WIDTH * TILE_WIDTH ; pixels +DEF SCREEN_HEIGHT_PX EQU SCREEN_HEIGHT * TILE_WIDTH ; pixels + +DEF BG_MAP_WIDTH EQU 32 ; tiles +DEF BG_MAP_HEIGHT EQU 32 ; tiles + +DEF METATILE_WIDTH EQU 4 ; tiles +DEF SCREEN_META_WIDTH EQU 6 ; metatiles +DEF SCREEN_META_HEIGHT EQU 5 ; metatiles +DEF SURROUNDING_WIDTH EQU SCREEN_META_WIDTH * METATILE_WIDTH ; tiles +DEF SURROUNDING_HEIGHT EQU SCREEN_META_HEIGHT * METATILE_WIDTH ; tiles +DEF MAP_CONNECTION_PADDING_WIDTH EQU 3 ; metatiles + +DEF HP_BAR_LENGTH EQU 6 ; tiles +DEF EXP_BAR_LENGTH EQU 8 ; tiles +DEF HP_BAR_LENGTH_PX EQU HP_BAR_LENGTH * TILE_WIDTH ; pixels +DEF EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * TILE_WIDTH ; pixels + +; GetHPPal return values (see home/tilemap.asm) +DEF HP_GREEN EQU 0 +DEF HP_YELLOW EQU 1 +DEF HP_RED EQU 2 + +; sprite_oam_struct members (see macros/ram.asm) +rsreset +DEF SPRITEOAMSTRUCT_YCOORD rb ; 0 +DEF SPRITEOAMSTRUCT_XCOORD rb ; 1 +DEF SPRITEOAMSTRUCT_TILE_ID rb ; 2 +DEF SPRITEOAMSTRUCT_ATTRIBUTES rb ; 3 +DEF SPRITEOAMSTRUCT_LENGTH EQU _RS +DEF NUM_SPRITE_OAM_STRUCTS EQU 40 ; see wShadowOAM + +DEF SPRITE_GFX_LIST_CAPACITY EQU 32 ; see wUsedSprites + +; PokeAnims indexes (see engine/gfx/pic_animation.asm) + const_def + const ANIM_MON_SLOW + const ANIM_MON_NORMAL + const ANIM_MON_MENU + const ANIM_MON_TRADE + const ANIM_MON_EVOLVE + const ANIM_MON_HATCH + const ANIM_MON_HOF + const ANIM_MON_EGG1 + const ANIM_MON_EGG2 diff --git a/constants/hardware_constants.asm b/constants/hardware_constants.asm new file mode 100644 index 0000000..f662348 --- /dev/null +++ b/constants/hardware_constants.asm @@ -0,0 +1,162 @@ +; Graciously derived from: +; https://gbdev.io/pandocs/ +; https://github.com/gbdev/hardware.inc +; http://gameboy.mongenel.com/dmg/asmmemmap.html + +; memory map +DEF VRAM_Begin EQU $8000 +DEF VRAM_End EQU $a000 +DEF SRAM_Begin EQU $a000 +DEF SRAM_End EQU $c000 +DEF WRAM0_Begin EQU $c000 +DEF WRAM0_End EQU $d000 +DEF WRAM1_Begin EQU $d000 +DEF WRAM1_End EQU $e000 +; hardware registers $ff00-$ff80 (see below) +DEF HRAM_Begin EQU $ff80 +DEF HRAM_End EQU $ffff + +; MBC3 +DEF MBC3SRamEnable EQU $0000 +DEF MBC3RomBank EQU $2000 +DEF MBC3SRamBank EQU $4000 +DEF MBC3LatchClock EQU $6000 +DEF MBC3RTC EQU $a000 + +DEF SRAM_DISABLE EQU $00 +DEF SRAM_ENABLE EQU $0a + +DEF NUM_SRAM_BANKS EQU 4 + +DEF RTC_S EQU $08 ; Seconds 0-59 (0-3Bh) +DEF RTC_M EQU $09 ; Minutes 0-59 (0-3Bh) +DEF RTC_H EQU $0a ; Hours 0-23 (0-17h) +DEF RTC_DL EQU $0b ; Lower 8 bits of Day Counter (0-FFh) +DEF RTC_DH EQU $0c ; Upper 1 bit of Day Counter, Carry Bit, Halt Flag + ; Bit 0 Most significant bit of Day Counter (Bit 8) + ; Bit 6 Halt (0=Active, 1=Stop Timer) + ; Bit 7 Day Counter Carry Bit (1=Counter Overflow) + +; interrupt flags +DEF VBLANK EQU 0 +DEF LCD_STAT EQU 1 +DEF TIMER EQU 2 +DEF SERIAL EQU 3 +DEF JOYPAD EQU 4 +DEF IE_DEFAULT EQU (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) + +; OAM attribute flags +DEF OAM_TILE_BANK EQU 3 +DEF OAM_OBP_NUM EQU 4 ; non CGB Mode Only +DEF OAM_X_FLIP EQU 5 +DEF OAM_Y_FLIP EQU 6 +DEF OAM_PRIORITY EQU 7 ; 0: OBJ above BG, 1: OBJ behind BG (colors 1-3) + +; BG Map attribute flags +DEF PALETTE_MASK EQU %111 +DEF VRAM_BANK_1 EQU 1 << OAM_TILE_BANK ; $08 +DEF OBP_NUM EQU 1 << OAM_OBP_NUM ; $10 +DEF X_FLIP EQU 1 << OAM_X_FLIP ; $20 +DEF Y_FLIP EQU 1 << OAM_Y_FLIP ; $40 +DEF PRIORITY EQU 1 << OAM_PRIORITY ; $80 + +; Hardware registers +DEF rJOYP EQU $ff00 ; Joypad (R/W) +DEF rSB EQU $ff01 ; Serial transfer data (R/W) +DEF rSC EQU $ff02 ; Serial Transfer Control (R/W) +DEF rSC_ON EQU 7 +DEF rSC_CGB EQU 1 +DEF rSC_CLOCK EQU 0 +DEF rDIV EQU $ff04 ; Divider Register (R/W) +DEF rTIMA EQU $ff05 ; Timer counter (R/W) +DEF rTMA EQU $ff06 ; Timer Modulo (R/W) +DEF rTAC EQU $ff07 ; Timer Control (R/W) +DEF rTAC_ON EQU 2 +DEF rTAC_4096_HZ EQU %00 +DEF rTAC_262144_HZ EQU %01 +DEF rTAC_65536_HZ EQU %10 +DEF rTAC_16384_HZ EQU %11 +DEF rIF EQU $ff0f ; Interrupt Flag (R/W) +DEF rNR10 EQU $ff10 ; Channel 1 Sweep register (R/W) +DEF rNR11 EQU $ff11 ; Channel 1 Sound length/Wave pattern duty (R/W) +DEF rNR12 EQU $ff12 ; Channel 1 Volume Envelope (R/W) +DEF rNR13 EQU $ff13 ; Channel 1 Frequency lo (Write Only) +DEF rNR14 EQU $ff14 ; Channel 1 Frequency hi (R/W) +DEF rNR21 EQU $ff16 ; Channel 2 Sound Length/Wave Pattern Duty (R/W) +DEF rNR22 EQU $ff17 ; Channel 2 Volume Envelope (R/W) +DEF rNR23 EQU $ff18 ; Channel 2 Frequency lo data (W) +DEF rNR24 EQU $ff19 ; Channel 2 Frequency hi data (R/W) +DEF rNR30 EQU $ff1a ; Channel 3 Sound on/off (R/W) +DEF rNR31 EQU $ff1b ; Channel 3 Sound Length +DEF rNR32 EQU $ff1c ; Channel 3 Select output level (R/W) +DEF rNR33 EQU $ff1d ; Channel 3 Frequency's lower data (W) +DEF rNR34 EQU $ff1e ; Channel 3 Frequency's higher data (R/W) +DEF rNR41 EQU $ff20 ; Channel 4 Sound Length (R/W) +DEF rNR42 EQU $ff21 ; Channel 4 Volume Envelope (R/W) +DEF rNR43 EQU $ff22 ; Channel 4 Polynomial Counter (R/W) +DEF rNR44 EQU $ff23 ; Channel 4 Counter/consecutive; Inital (R/W) +DEF rNR50 EQU $ff24 ; Channel control / ON-OFF / Volume (R/W) +DEF rNR51 EQU $ff25 ; Selection of Sound output terminal (R/W) +DEF rNR52 EQU $ff26 ; Sound on/off +DEF rWave_0 EQU $ff30 +DEF rWave_1 EQU $ff31 +DEF rWave_2 EQU $ff32 +DEF rWave_3 EQU $ff33 +DEF rWave_4 EQU $ff34 +DEF rWave_5 EQU $ff35 +DEF rWave_6 EQU $ff36 +DEF rWave_7 EQU $ff37 +DEF rWave_8 EQU $ff38 +DEF rWave_9 EQU $ff39 +DEF rWave_a EQU $ff3a +DEF rWave_b EQU $ff3b +DEF rWave_c EQU $ff3c +DEF rWave_d EQU $ff3d +DEF rWave_e EQU $ff3e +DEF rWave_f EQU $ff3f +DEF rLCDC EQU $ff40 ; LCD Control (R/W) +DEF rLCDC_BG_PRIORITY EQU 0 ; 0=Off, 1=On +DEF rLCDC_SPRITES_ENABLE EQU 1 ; 0=Off, 1=On +DEF rLCDC_SPRITE_SIZE EQU 2 ; 0=8x8, 1=8x16 +DEF rLCDC_BG_TILEMAP EQU 3 ; 0=9800-9BFF, 1=9C00-9FFF +DEF rLCDC_TILE_DATA EQU 4 ; 0=8800-97FF, 1=8000-8FFF +DEF rLCDC_WINDOW_ENABLE EQU 5 ; 0=Off, 1=On +DEF rLCDC_WINDOW_TILEMAP EQU 6 ; 0=9800-9BFF, 1=9C00-9FFF +DEF rLCDC_ENABLE EQU 7 ; 0=Off, 1=On +DEF LCDC_DEFAULT EQU (1 << rLCDC_ENABLE) | (1 << rLCDC_WINDOW_TILEMAP) | (1 << rLCDC_WINDOW_ENABLE) | (1 << rLCDC_SPRITES_ENABLE) | (1 << rLCDC_BG_PRIORITY) +DEF rSTAT EQU $ff41 ; LCDC Status (R/W) +DEF rSCY EQU $ff42 ; Scroll Y (R/W) +DEF rSCX EQU $ff43 ; Scroll X (R/W) +DEF rLY EQU $ff44 ; LCDC Y-Coordinate (R) +DEF LY_VBLANK EQU 144 +DEF rLYC EQU $ff45 ; LY Compare (R/W) +DEF rDMA EQU $ff46 ; DMA Transfer and Start Address (W) +DEF rBGP EQU $ff47 ; BG Palette Data (R/W) - Non CGB Mode Only +DEF rOBP0 EQU $ff48 ; Object Palette 0 Data (R/W) - Non CGB Mode Only +DEF rOBP1 EQU $ff49 ; Object Palette 1 Data (R/W) - Non CGB Mode Only +DEF rWY EQU $ff4a ; Window Y Position (R/W) +DEF rWX EQU $ff4b ; Window X Position minus 7 (R/W) +DEF rLCDMODE EQU $ff4c +DEF rKEY1 EQU $ff4d ; CGB Mode Only - Prepare Speed Switch +DEF rVBK EQU $ff4f ; CGB Mode Only - VRAM Bank +DEF rBLCK EQU $ff50 +DEF rHDMA1 EQU $ff51 ; CGB Mode Only - New DMA Source, High +DEF rHDMA2 EQU $ff52 ; CGB Mode Only - New DMA Source, Low +DEF rHDMA3 EQU $ff53 ; CGB Mode Only - New DMA Destination, High +DEF rHDMA4 EQU $ff54 ; CGB Mode Only - New DMA Destination, Low +DEF rHDMA5 EQU $ff55 ; CGB Mode Only - New DMA Length/Mode/Start +DEF rRP EQU $ff56 ; CGB Mode Only - Infrared Communications Port +DEF rRP_LED_ON EQU 0 +DEF rRP_RECEIVING EQU 1 +DEF rRP_ENABLE_READ_MASK EQU %11000000 +DEF rBGPI EQU $ff68 ; CGB Mode Only - Background Palette Index +DEF rBGPI_AUTO_INCREMENT EQU 7 ; increment rBGPI after write to rBGPD +DEF rBGPD EQU $ff69 ; CGB Mode Only - Background Palette Data +DEF rOBPI EQU $ff6a ; CGB Mode Only - Sprite Palette Index +DEF rOBPI_AUTO_INCREMENT EQU 7 ; increment rOBPI after write to rOBPD +DEF rOBPD EQU $ff6b ; CGB Mode Only - Sprite Palette Data +DEF rOPRI EQU $ff6c ; CGB Mode Only - Object Priority Mode +DEF rSVBK EQU $ff70 ; CGB Mode Only - WRAM Bank +DEF rPCM12 EQU $ff76 ; Channel 1 & 2 Amplitude (R) +DEF rPCM34 EQU $ff77 ; Channel 3 & 4 Amplitude (R) +DEF rIE EQU $ffff ; Interrupt Enable (R/W) diff --git a/constants/icon_constants.asm b/constants/icon_constants.asm new file mode 100644 index 0000000..8877c8b --- /dev/null +++ b/constants/icon_constants.asm @@ -0,0 +1,52 @@ +; IconPointers indexes (see data/icon_pointers.asm) + const_def + const ICON_NULL + const ICON_POLIWAG + const ICON_JIGGLYPUFF + const ICON_DIGLETT + const ICON_PIKACHU + const ICON_STARYU + const ICON_FISH + const ICON_BIRD + const ICON_MONSTER + const ICON_CLEFAIRY + const ICON_ODDISH + const ICON_BUG + const ICON_GHOST + const ICON_LAPRAS + const ICON_HUMANSHAPE + const ICON_FOX + const ICON_EQUINE + const ICON_SHELL + const ICON_BLOB + const ICON_SERPENT + const ICON_VOLTORB + const ICON_SQUIRTLE + const ICON_BULBASAUR + const ICON_CHARMANDER + const ICON_CATERPILLAR + const ICON_UNOWN + const ICON_GEODUDE + const ICON_FIGHTER + const ICON_EGG + const ICON_JELLYFISH + const ICON_MOTH + const ICON_BAT + const ICON_SNORLAX + const ICON_HO_OH + const ICON_LUGIA + const ICON_GYARADOS + const ICON_SLOWPOKE + const ICON_SUDOWOODO + const ICON_BIGMON +DEF NUM_ICONS EQU const_value - 1 + +; LoadMenuMonIcon.Jumptable indexes (see engine/gfx/mon_icons.asm) + const_def + const MONICON_PARTYMENU + const MONICON_NAMINGSCREEN + const MONICON_MOVES + const MONICON_TRADE + const MONICON_MOBILE1 + const MONICON_MOBILE2 + const MONICON_UNUSED diff --git a/constants/input_constants.asm b/constants/input_constants.asm new file mode 100644 index 0000000..5319758 --- /dev/null +++ b/constants/input_constants.asm @@ -0,0 +1,26 @@ +; joypad buttons + const_def + const A_BUTTON_F ; 0 + const B_BUTTON_F ; 1 + const SELECT_F ; 2 + const START_F ; 3 + const D_RIGHT_F ; 4 + const D_LEFT_F ; 5 + const D_UP_F ; 6 + const D_DOWN_F ; 7 + +DEF NO_INPUT EQU %00000000 +DEF A_BUTTON EQU 1 << A_BUTTON_F +DEF B_BUTTON EQU 1 << B_BUTTON_F +DEF SELECT EQU 1 << SELECT_F +DEF START EQU 1 << START_F +DEF D_RIGHT EQU 1 << D_RIGHT_F +DEF D_LEFT EQU 1 << D_LEFT_F +DEF D_UP EQU 1 << D_UP_F +DEF D_DOWN EQU 1 << D_DOWN_F + +DEF BUTTONS EQU A_BUTTON | B_BUTTON | SELECT | START +DEF D_PAD EQU D_RIGHT | D_LEFT | D_UP | D_DOWN + +DEF R_DPAD EQU %00100000 +DEF R_BUTTONS EQU %00010000 diff --git a/constants/item_constants.asm b/constants/item_constants.asm new file mode 100644 index 0000000..fd8407d --- /dev/null +++ b/constants/item_constants.asm @@ -0,0 +1,319 @@ +; item ids +; indexes for: +; - ItemNames (see data/items/names.asm) +; - ItemDescriptions (see data/items/descriptions.asm) +; - ItemAttributes (see data/items/attributes.asm) +; - ItemEffects (see engine/items/item_effects.asm) + const_def + const NO_ITEM ; 00 + const MASTER_BALL ; 01 + const ULTRA_BALL ; 02 + const BRIGHTPOWDER ; 03 + const GREAT_BALL ; 04 + const POKE_BALL ; 05 + const TOWN_MAP ; 06 + const BICYCLE ; 07 + const MOON_STONE ; 08 + const ANTIDOTE ; 09 + const BURN_HEAL ; 0a + const ICE_HEAL ; 0b + const AWAKENING ; 0c + const PARLYZ_HEAL ; 0d + const FULL_RESTORE ; 0e + const MAX_POTION ; 0f + const HYPER_POTION ; 10 + const SUPER_POTION ; 11 + const POTION ; 12 + const ESCAPE_ROPE ; 13 + const REPEL ; 14 + const MAX_ELIXER ; 15 + const FIRE_STONE ; 16 + const THUNDERSTONE ; 17 + const WATER_STONE ; 18 + const ITEM_19 ; 19 + const HP_UP ; 1a + const PROTEIN ; 1b + const IRON ; 1c + const CARBOS ; 1d + const LUCKY_PUNCH ; 1e + const CALCIUM ; 1f + const RARE_CANDY ; 20 + const X_ACCURACY ; 21 + const LEAF_STONE ; 22 + const METAL_POWDER ; 23 + const NUGGET ; 24 + const POKE_DOLL ; 25 + const FULL_HEAL ; 26 + const REVIVE ; 27 + const MAX_REVIVE ; 28 + const GUARD_SPEC ; 29 + const SUPER_REPEL ; 2a + const MAX_REPEL ; 2b + const DIRE_HIT ; 2c + const ITEM_2D ; 2d + const FRESH_WATER ; 2e + const SODA_POP ; 2f + const LEMONADE ; 30 + const X_ATTACK ; 31 + const ITEM_32 ; 32 + const X_DEFEND ; 33 + const X_SPEED ; 34 + const X_SPECIAL ; 35 + const COIN_CASE ; 36 + const ITEMFINDER ; 37 + const POKE_FLUTE ; 38 + const EXP_SHARE ; 39 + const OLD_ROD ; 3a + const GOOD_ROD ; 3b + const SILVER_LEAF ; 3c + const SUPER_ROD ; 3d + const PP_UP ; 3e + const ETHER ; 3f + const MAX_ETHER ; 40 + const ELIXER ; 41 + const RED_SCALE ; 42 + const SECRETPOTION ; 43 + const S_S_TICKET ; 44 + const MYSTERY_EGG ; 45 + const CLEAR_BELL ; 46 + const SILVER_WING ; 47 + const MOOMOO_MILK ; 48 + const QUICK_CLAW ; 49 + const PSNCUREBERRY ; 4a + const GOLD_LEAF ; 4b + const SOFT_SAND ; 4c + const SHARP_BEAK ; 4d + const PRZCUREBERRY ; 4e + const BURNT_BERRY ; 4f + const ICE_BERRY ; 50 + const POISON_BARB ; 51 + const KINGS_ROCK ; 52 + const BITTER_BERRY ; 53 + const MINT_BERRY ; 54 + const RED_APRICORN ; 55 + const TINYMUSHROOM ; 56 + const BIG_MUSHROOM ; 57 + const SILVERPOWDER ; 58 + const BLU_APRICORN ; 59 + const ITEM_5A ; 5a + const AMULET_COIN ; 5b + const YLW_APRICORN ; 5c + const GRN_APRICORN ; 5d + const CLEANSE_TAG ; 5e + const MYSTIC_WATER ; 5f + const TWISTEDSPOON ; 60 + const WHT_APRICORN ; 61 + const BLACKBELT_I ; 62 + const BLK_APRICORN ; 63 + const ITEM_64 ; 64 + const PNK_APRICORN ; 65 + const BLACKGLASSES ; 66 + const SLOWPOKETAIL ; 67 + const PINK_BOW ; 68 + const STICK ; 69 + const SMOKE_BALL ; 6a + const NEVERMELTICE ; 6b + const MAGNET ; 6c + const MIRACLEBERRY ; 6d + const PEARL ; 6e + const BIG_PEARL ; 6f + const EVERSTONE ; 70 + const SPELL_TAG ; 71 + const RAGECANDYBAR ; 72 + const GS_BALL ; 73 + const BLUE_CARD ; 74 + const MIRACLE_SEED ; 75 + const THICK_CLUB ; 76 + const FOCUS_BAND ; 77 + const ITEM_78 ; 78 + const ENERGYPOWDER ; 79 + const ENERGY_ROOT ; 7a + const HEAL_POWDER ; 7b + const REVIVAL_HERB ; 7c + const HARD_STONE ; 7d + const LUCKY_EGG ; 7e + const CARD_KEY ; 7f + const MACHINE_PART ; 80 + const EGG_TICKET ; 81 + const LOST_ITEM ; 82 + const STARDUST ; 83 + const STAR_PIECE ; 84 + const BASEMENT_KEY ; 85 + const PASS ; 86 + const ITEM_87 ; 87 + const ITEM_88 ; 88 + const ITEM_89 ; 89 + const CHARCOAL ; 8a + const BERRY_JUICE ; 8b + const SCOPE_LENS ; 8c + const ITEM_8D ; 8d + const ITEM_8E ; 8e + const METAL_COAT ; 8f + const DRAGON_FANG ; 90 + const ITEM_91 ; 91 + const LEFTOVERS ; 92 + const ITEM_93 ; 93 + const ITEM_94 ; 94 + const ITEM_95 ; 95 + const MYSTERYBERRY ; 96 + const DRAGON_SCALE ; 97 + const BERSERK_GENE ; 98 + const ITEM_99 ; 99 + const ITEM_9A ; 9a + const ITEM_9B ; 9b + const SACRED_ASH ; 9c + const HEAVY_BALL ; 9d + const FLOWER_MAIL ; 9e + const LEVEL_BALL ; 9f + const LURE_BALL ; a0 + const FAST_BALL ; a1 + const ITEM_A2 ; a2 + const LIGHT_BALL ; a3 + const FRIEND_BALL ; a4 + const MOON_BALL ; a5 + const LOVE_BALL ; a6 + const NORMAL_BOX ; a7 + const GORGEOUS_BOX ; a8 + const SUN_STONE ; a9 + const POLKADOT_BOW ; aa + const ITEM_AB ; ab + const UP_GRADE ; ac + const BERRY ; ad + const GOLD_BERRY ; ae + const SQUIRTBOTTLE ; af + const ITEM_B0 ; b0 + const PARK_BALL ; b1 + const RAINBOW_WING ; b2 + const ITEM_B3 ; b3 + const BRICK_PIECE ; b4 + const SURF_MAIL ; b5 + const LITEBLUEMAIL ; b6 + const PORTRAITMAIL ; b7 + const LOVELY_MAIL ; b8 + const EON_MAIL ; b9 + const MORPH_MAIL ; ba + const BLUESKY_MAIL ; bb + const MUSIC_MAIL ; bc + const MIRAGE_MAIL ; bd + const ITEM_BE ; be + const ITEM_DC ; bf + const ITEM_C3 ; c0 + const ITEM_FA ; c1 +DEF NUM_ITEMS EQU const_value - 1 + +DEF __tmhm_value__ = 1 + +MACRO add_tmnum + DEF \1_TMNUM EQU __tmhm_value__ + DEF __tmhm_value__ += 1 +ENDM + +MACRO add_tm +; Defines three constants: +; - TM_\1: the item id, starting at $bf +; - \1_TMNUM: the learnable TM/HM flag, starting at 1 +; - TM##_MOVE: alias for the move id, equal to the value of \1 + const TM_\1 + DEF TM{02d:__tmhm_value__}_MOVE = \1 + add_tmnum \1 +ENDM + +; see data/moves/tmhm_moves.asm for moves +DEF TM01 EQU const_value + add_tm DYNAMICPUNCH ; c2 + add_tm HEADBUTT ; c3 + add_tm CURSE ; c4 + add_tm ROLLOUT ; c5 + add_tm ROAR ; c6 + add_tm TOXIC ; c7 + add_tm ZAP_CANNON ; c8 + add_tm ROCK_SMASH ; c9 + add_tm PSYCH_UP ; ca + add_tm HIDDEN_POWER ; cb + add_tm SUNNY_DAY ; cc + add_tm SWEET_SCENT ; cd + add_tm SNORE ; ce + add_tm BLIZZARD ; cf + add_tm HYPER_BEAM ; d0 + add_tm ICY_WIND ; d1 + add_tm PROTECT ; d2 + add_tm RAIN_DANCE ; d3 + add_tm GIGA_DRAIN ; d4 + add_tm ENDURE ; d5 + add_tm FRUSTRATION ; d6 + add_tm SOLARBEAM ; d7 + add_tm IRON_TAIL ; d8 + add_tm DRAGONBREATH ; d9 + add_tm THUNDER ; da + add_tm EARTHQUAKE ; db + add_tm RETURN ; dc + add_tm DIG ; dd + add_tm PSYCHIC_M ; de + add_tm SHADOW_BALL ; df + add_tm MUD_SLAP ; e0 + add_tm DOUBLE_TEAM ; e1 + add_tm ICE_PUNCH ; e2 + add_tm SWAGGER ; e3 + add_tm SLEEP_TALK ; e4 + add_tm SLUDGE_BOMB ; e5 + add_tm SANDSTORM ; e6 + add_tm FIRE_BLAST ; e7 + add_tm SWIFT ; e8 + add_tm DEFENSE_CURL ; e9 + add_tm THUNDERPUNCH ; ea + add_tm DREAM_EATER ; eb + add_tm DETECT ; ec + add_tm REST ; ed + add_tm ATTRACT ; ee + add_tm THIEF ; ef + add_tm STEEL_WING ; f0 + add_tm FIRE_PUNCH ; f1 + add_tm FURY_CUTTER ; f2 + add_tm NIGHTMARE ; f3 +DEF NUM_TMS EQU __tmhm_value__ - 1 + +MACRO add_hm +; Defines three constants: +; - HM_\1: the item id, starting at $f3 +; - \1_TMNUM: the learnable TM/HM flag, starting at 51 +; - HM##_MOVE: alias for the move id, equal to the value of \1 + const HM_\1 + DEF HM_VALUE = __tmhm_value__ - NUM_TMS + DEF HM{02d:HM_VALUE}_MOVE = \1 + add_tmnum \1 +ENDM + +DEF HM01 EQU const_value + add_hm CUT ; f4 + add_hm FLY ; f5 + add_hm SURF ; f6 + add_hm STRENGTH ; f7 + add_hm FLASH ; f8 + add_hm WHIRLPOOL ; f9 + add_hm WATERFALL ; fa +DEF NUM_HMS EQU __tmhm_value__ - NUM_TMS - 1 + +MACRO add_mt +; Defines two constants: +; - \1_TMNUM: the learnable TM/HM flag, starting at 58 +; - MT##_MOVE: alias for the move id, equal to the value of \1 + DEF MT_VALUE = __tmhm_value__ - NUM_TMS - NUM_HMS + DEF MT{02d:MT_VALUE}_MOVE = \1 + add_tmnum \1 +ENDM + +DEF MT01 EQU const_value + add_mt FLAMETHROWER + add_mt THUNDERBOLT + add_mt ICE_BEAM +DEF NUM_TUTORS = __tmhm_value__ - NUM_TMS - NUM_HMS - 1 + +DEF NUM_TM_HM_TUTOR EQU NUM_TMS + NUM_HMS + NUM_TUTORS + +DEF USE_SCRIPT_VAR EQU $00 +DEF ITEM_FROM_MEM EQU $ff + +; leftovers from red +DEF SAFARI_BALL EQU $08 ; MOON_STONE +DEF MOON_STONE_RED EQU $0a ; BURN_HEAL +DEF FULL_HEAL_RED EQU $34 ; X_SPEED diff --git a/constants/item_data_constants.asm b/constants/item_data_constants.asm new file mode 100644 index 0000000..faf201d --- /dev/null +++ b/constants/item_data_constants.asm @@ -0,0 +1,144 @@ +; item_attributes struct members (see data/items/attributes.asm) +rsreset +DEF ITEMATTR_PRICE rw +rsset ITEMATTR_PRICE +DEF ITEMATTR_PRICE_LO rb +DEF ITEMATTR_PRICE_HI rb +DEF ITEMATTR_EFFECT rb +DEF ITEMATTR_PARAM rb +DEF ITEMATTR_PERMISSIONS rb +DEF ITEMATTR_POCKET rb +DEF ITEMATTR_HELP rb +DEF ITEMATTR_STRUCT_LENGTH EQU _RS + +; item types + const_def 1 + const ITEM ; 1 + const KEY_ITEM ; 2 + const BALL ; 3 + const TM_HM ; 4 +DEF NUM_ITEM_TYPES EQU const_value - 1 + +; item menu types +; UseItem.dw indexes (see engine/items/pack.asm) +; UseRegisteredItem.SwitchTo indexes (see engine/overworld/select_menu.asm) + const_def + const ITEMMENU_NOUSE ; 0 + const_skip 3 + const ITEMMENU_CURRENT ; 4 + const ITEMMENU_PARTY ; 5 + const ITEMMENU_CLOSE ; 6 + +; item actions +DEF CANT_SELECT_F EQU 6 +DEF CANT_TOSS_F EQU 7 + +DEF NO_LIMITS EQU 0 +DEF CANT_SELECT EQU 1 << CANT_SELECT_F +DEF CANT_TOSS EQU 1 << CANT_TOSS_F + +; pack pockets + const_def + const ITEM_POCKET ; 0 + const BALL_POCKET ; 1 + const KEY_ITEM_POCKET ; 2 + const TM_HM_POCKET ; 3 +DEF NUM_POCKETS EQU const_value + +DEF MAX_ITEMS EQU 20 +DEF MAX_BALLS EQU 12 +DEF MAX_KEY_ITEMS EQU 25 +DEF MAX_PC_ITEMS EQU 50 + +DEF MAX_ITEM_STACK EQU 99 + +; mail +DEF MAIL_LINE_LENGTH EQU $10 +DEF MAIL_MSG_LENGTH EQU $20 +DEF MAILBOX_CAPACITY EQU 10 +DEF MAIL_STRUCT_LENGTH EQU $2f ; mailmsg struct +DEF MAIL_STRUCT_LENGTH_JP EQU $2a ; mailmsg_jp struct + +; mail languages + const_def + const MAIL_LANG_ENGLISH + const MAIL_LANG_FRENCH + const MAIL_LANG_GERMAN + const MAIL_LANG_ITALIAN + const MAIL_LANG_SPANISH + +; held item effects + const_def + const HELD_NONE + const HELD_BERRY + const HELD_2 + const HELD_LEFTOVERS + const_skip + const HELD_5 + const HELD_RESTORE_PP + const_skip + const HELD_CLEANSE_TAG + + const_next 10 + const HELD_HEAL_POISON + const HELD_HEAL_FREEZE + const HELD_HEAL_BURN + const HELD_HEAL_SLEEP + const HELD_HEAL_PARALYZE + const HELD_HEAL_STATUS + const HELD_HEAL_CONFUSION + + const_next 20 + const HELD_PREVENT_POISON + const HELD_PREVENT_BURN + const HELD_PREVENT_FREEZE + const HELD_PREVENT_SLEEP + const HELD_PREVENT_PARALYZE + const HELD_PREVENT_CONFUSE + + const_next 30 + const HELD_30 + const HELD_ATTACK_UP + const HELD_DEFENSE_UP + const HELD_SPEED_UP + const HELD_SP_ATTACK_UP + const HELD_SP_DEFENSE_UP + const HELD_ACCURACY_UP + const HELD_EVASION_UP + const HELD_38 + + const_next 40 + const_skip + const_skip + const HELD_METAL_POWDER + + const_next 50 + const HELD_NORMAL_BOOST + const HELD_FIGHTING_BOOST + const HELD_FLYING_BOOST + const HELD_POISON_BOOST + const HELD_GROUND_BOOST + const HELD_ROCK_BOOST + const HELD_BUG_BOOST + const HELD_GHOST_BOOST + const HELD_FIRE_BOOST + const HELD_WATER_BOOST + const HELD_GRASS_BOOST + const HELD_ELECTRIC_BOOST + const HELD_PSYCHIC_BOOST + const HELD_ICE_BOOST + const HELD_DRAGON_BOOST + const HELD_DARK_BOOST + const HELD_STEEL_BOOST + + const_next 70 + const HELD_CATCH_CHANCE + const HELD_71 + const HELD_ESCAPE + const HELD_CRITICAL_UP + const HELD_QUICK_CLAW + const HELD_FLINCH + const HELD_AMULET_COIN + const HELD_BRIGHTPOWDER + const_skip + const HELD_FOCUS_BAND diff --git a/constants/landmark_constants.asm b/constants/landmark_constants.asm new file mode 100644 index 0000000..058b70c --- /dev/null +++ b/constants/landmark_constants.asm @@ -0,0 +1,112 @@ +; Landmarks indexes (see data/maps/landmarks.asm) + const_def + const LANDMARK_SPECIAL ; 00 +; Johto landmarks + const LANDMARK_NEW_BARK_TOWN ; 01 + const LANDMARK_ROUTE_29 ; 02 + const LANDMARK_CHERRYGROVE_CITY ; 03 + const LANDMARK_ROUTE_30 ; 04 + const LANDMARK_ROUTE_31 ; 05 + const LANDMARK_VIOLET_CITY ; 06 + const LANDMARK_SPROUT_TOWER ; 07 + const LANDMARK_ROUTE_32 ; 08 + const LANDMARK_RUINS_OF_ALPH ; 09 + const LANDMARK_UNION_CAVE ; 0a + const LANDMARK_ROUTE_33 ; 0b + const LANDMARK_AZALEA_TOWN ; 0c + const LANDMARK_SLOWPOKE_WELL ; 0d + const LANDMARK_ILEX_FOREST ; 0e + const LANDMARK_ROUTE_34 ; 0f + const LANDMARK_GOLDENROD_CITY ; 10 + const LANDMARK_RADIO_TOWER ; 11 + const LANDMARK_ROUTE_35 ; 12 + const LANDMARK_NATIONAL_PARK ; 13 + const LANDMARK_ROUTE_36 ; 14 + const LANDMARK_ROUTE_37 ; 15 + const LANDMARK_ECRUTEAK_CITY ; 16 + const LANDMARK_TIN_TOWER ; 17 + const LANDMARK_BURNED_TOWER ; 18 + const LANDMARK_ROUTE_38 ; 19 + const LANDMARK_ROUTE_39 ; 1a + const LANDMARK_OLIVINE_CITY ; 1b + const LANDMARK_LIGHTHOUSE ; 1c + const LANDMARK_BATTLE_TOWER ; 1d + const LANDMARK_ROUTE_40 ; 1e + const LANDMARK_WHIRL_ISLANDS ; 1f + const LANDMARK_ROUTE_41 ; 20 + const LANDMARK_CIANWOOD_CITY ; 21 + const LANDMARK_ROUTE_42 ; 22 + const LANDMARK_MT_MORTAR ; 23 + const LANDMARK_MAHOGANY_TOWN ; 24 + const LANDMARK_ROUTE_43 ; 25 + const LANDMARK_LAKE_OF_RAGE ; 26 + const LANDMARK_ROUTE_44 ; 27 + const LANDMARK_ICE_PATH ; 28 + const LANDMARK_BLACKTHORN_CITY ; 29 + const LANDMARK_DRAGONS_DEN ; 2a + const LANDMARK_ROUTE_45 ; 2b + const LANDMARK_DARK_CAVE ; 2c + const LANDMARK_ROUTE_46 ; 2d + const LANDMARK_SILVER_CAVE ; 2e +DEF KANTO_LANDMARK EQU const_value + const LANDMARK_PALLET_TOWN ; 2f + const LANDMARK_ROUTE_1 ; 30 + const LANDMARK_VIRIDIAN_CITY ; 31 + const LANDMARK_ROUTE_2 ; 32 + const LANDMARK_PEWTER_CITY ; 33 + const LANDMARK_ROUTE_3 ; 34 + const LANDMARK_MT_MOON ; 35 + const LANDMARK_ROUTE_4 ; 36 + const LANDMARK_CERULEAN_CITY ; 37 + const LANDMARK_ROUTE_24 ; 38 + const LANDMARK_ROUTE_25 ; 39 + const LANDMARK_ROUTE_5 ; 3a + const LANDMARK_UNDERGROUND_PATH ; 3b + const LANDMARK_ROUTE_6 ; 3c + const LANDMARK_VERMILION_CITY ; 3d + const LANDMARK_DIGLETTS_CAVE ; 3e + const LANDMARK_ROUTE_7 ; 3f + const LANDMARK_ROUTE_8 ; 40 + const LANDMARK_ROUTE_9 ; 41 + const LANDMARK_ROCK_TUNNEL ; 42 + const LANDMARK_ROUTE_10 ; 43 + const LANDMARK_POWER_PLANT ; 44 + const LANDMARK_LAVENDER_TOWN ; 45 + const LANDMARK_LAV_RADIO_TOWER ; 46 + const LANDMARK_CELADON_CITY ; 47 + const LANDMARK_SAFFRON_CITY ; 48 + const LANDMARK_ROUTE_11 ; 49 + const LANDMARK_ROUTE_12 ; 4a + const LANDMARK_ROUTE_13 ; 4b + const LANDMARK_ROUTE_14 ; 4c + const LANDMARK_ROUTE_15 ; 4d + const LANDMARK_ROUTE_16 ; 4e + const LANDMARK_ROUTE_17 ; 4f + const LANDMARK_ROUTE_18 ; 50 + const LANDMARK_FUCHSIA_CITY ; 51 + const LANDMARK_ROUTE_19 ; 52 + const LANDMARK_ROUTE_20 ; 53 + const LANDMARK_SEAFOAM_ISLANDS ; 54 + const LANDMARK_CINNABAR_ISLAND ; 55 + const LANDMARK_ROUTE_21 ; 56 + const LANDMARK_ROUTE_22 ; 57 + const LANDMARK_VICTORY_ROAD ; 58 + const LANDMARK_ROUTE_23 ; 59 + const LANDMARK_INDIGO_PLATEAU ; 5a + const LANDMARK_ROUTE_26 ; 5b + const LANDMARK_ROUTE_27 ; 5c + const LANDMARK_TOHJO_FALLS ; 5d + const LANDMARK_ROUTE_28 ; 5e + const LANDMARK_FAST_SHIP ; 5f +DEF NUM_LANDMARKS EQU const_value + +; used in CaughtData + const_def $7f, -1 + const LANDMARK_EVENT ; $7f + const LANDMARK_GIFT ; $7e + +; Regions + const_def + const JOHTO_REGION ; 0 + const KANTO_REGION ; 1 +DEF NUM_REGIONS EQU const_value diff --git a/constants/map_constants.asm b/constants/map_constants.asm new file mode 100644 index 0000000..e24d04c --- /dev/null +++ b/constants/map_constants.asm @@ -0,0 +1,504 @@ +MACRO newgroup +;\1: group id + const_skip + DEF MAPGROUP_\1 EQU const_value + DEF CURRENT_NUM_MAPGROUP_MAPS EQUS "NUM_\1_MAPS" + DEF __map_value__ = 1 +ENDM + +MACRO map_const +;\1: map id +;\2: width: in blocks +;\3: height: in blocks + DEF GROUP_\1 EQU const_value + DEF MAP_\1 EQU __map_value__ + DEF __map_value__ += 1 + DEF \1_WIDTH EQU \2 + DEF \1_HEIGHT EQU \3 +ENDM + +MACRO endgroup + DEF {CURRENT_NUM_MAPGROUP_MAPS} EQU __map_value__ - 1 + PURGE CURRENT_NUM_MAPGROUP_MAPS +ENDM + +; map group ids +; `newgroup` indexes are for: +; - MapGroupPointers (see data/maps/maps.asm) +; - MapGroupRoofs (see data/maps/roofs.asm) +; - OutdoorSprites (see data/maps/outdoor_sprites.asm) +; - RoofPals (see gfx/tilesets/roofs.pal) +; `map_const` indexes are for the sub-tables of MapGroupPointers (see data/maps/maps.asm) +; Each map also has associated data: +; - attributes (see data/maps/attributes.asm) +; - blocks (see data/maps/blocks.asm) +; - scripts and events (see data/maps/scripts.asm) + const_def + + newgroup OLIVINE ; 1 + map_const OLIVINE_POKECENTER_1F, 5, 4 ; 1 + map_const OLIVINE_GYM, 5, 8 ; 2 + map_const OLIVINE_TIMS_HOUSE, 4, 4 ; 3 + map_const OLIVINE_HOUSE_BETA, 4, 4 ; 4 + map_const OLIVINE_PUNISHMENT_SPEECH_HOUSE, 4, 4 ; 5 + map_const OLIVINE_GOOD_ROD_HOUSE, 4, 4 ; 6 + map_const OLIVINE_CAFE, 4, 4 ; 7 + map_const OLIVINE_MART, 6, 4 ; 8 + map_const ROUTE_38_ECRUTEAK_GATE, 5, 4 ; 9 + map_const ROUTE_39_BARN, 4, 4 ; 10 + map_const ROUTE_39_FARMHOUSE, 4, 4 ; 11 + map_const ROUTE_38, 20, 9 ; 12 + map_const ROUTE_39, 10, 18 ; 13 + map_const OLIVINE_CITY, 20, 18 ; 14 + endgroup + + newgroup MAHOGANY ; 2 + map_const MAHOGANY_RED_GYARADOS_SPEECH_HOUSE, 4, 4 ; 1 + map_const MAHOGANY_GYM, 5, 9 ; 2 + map_const MAHOGANY_POKECENTER_1F, 5, 4 ; 3 + map_const ROUTE_42_ECRUTEAK_GATE, 5, 4 ; 4 + map_const ROUTE_42, 30, 9 ; 5 + map_const ROUTE_44, 30, 9 ; 6 + map_const MAHOGANY_TOWN, 10, 9 ; 7 + endgroup + + newgroup DUNGEONS ; 3 + map_const SPROUT_TOWER_1F, 10, 8 ; 1 + map_const SPROUT_TOWER_2F, 10, 8 ; 2 + map_const SPROUT_TOWER_3F, 10, 8 ; 3 + map_const TIN_TOWER_1F, 10, 9 ; 4 + map_const TIN_TOWER_2F, 10, 9 ; 5 + map_const TIN_TOWER_3F, 10, 9 ; 6 + map_const TIN_TOWER_4F, 10, 9 ; 7 + map_const TIN_TOWER_5F, 10, 9 ; 8 + map_const TIN_TOWER_6F, 10, 9 ; 9 + map_const TIN_TOWER_7F, 10, 9 ; 10 + map_const TIN_TOWER_8F, 10, 9 ; 11 + map_const TIN_TOWER_9F, 10, 9 ; 12 + map_const BURNED_TOWER_1F, 10, 9 ; 13 + map_const BURNED_TOWER_B1F, 10, 9 ; 14 + map_const NATIONAL_PARK, 20, 27 ; 15 + map_const NATIONAL_PARK_BUG_CONTEST, 20, 27 ; 16 + map_const RADIO_TOWER_1F, 9, 4 ; 17 + map_const RADIO_TOWER_2F, 9, 4 ; 18 + map_const RADIO_TOWER_3F, 9, 4 ; 19 + map_const RADIO_TOWER_4F, 9, 4 ; 20 + map_const RADIO_TOWER_5F, 9, 4 ; 21 + map_const RUINS_OF_ALPH_OUTSIDE, 10, 18 ; 22 + map_const RUINS_OF_ALPH_HO_OH_CHAMBER, 4, 5 ; 23 + map_const RUINS_OF_ALPH_KABUTO_CHAMBER, 4, 5 ; 24 + map_const RUINS_OF_ALPH_OMANYTE_CHAMBER, 4, 5 ; 25 + map_const RUINS_OF_ALPH_AERODACTYL_CHAMBER, 4, 5 ; 26 + map_const RUINS_OF_ALPH_INNER_CHAMBER, 10, 14 ; 27 + map_const RUINS_OF_ALPH_RESEARCH_CENTER, 4, 4 ; 28 + map_const RUINS_OF_ALPH_HO_OH_ITEM_ROOM, 4, 5 ; 29 + map_const RUINS_OF_ALPH_KABUTO_ITEM_ROOM, 4, 5 ; 30 + map_const RUINS_OF_ALPH_OMANYTE_ITEM_ROOM, 4, 5 ; 31 + map_const RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM, 4, 5 ; 32 + map_const RUINS_OF_ALPH_HO_OH_WORD_ROOM, 10, 12 ; 33 + map_const RUINS_OF_ALPH_KABUTO_WORD_ROOM, 10, 7 ; 34 + map_const RUINS_OF_ALPH_OMANYTE_WORD_ROOM, 10, 8 ; 35 + map_const RUINS_OF_ALPH_AERODACTYL_WORD_ROOM, 10, 7 ; 36 + map_const UNION_CAVE_1F, 10, 18 ; 37 + map_const UNION_CAVE_B1F, 10, 18 ; 38 + map_const UNION_CAVE_B2F, 10, 18 ; 39 + map_const SLOWPOKE_WELL_B1F, 10, 9 ; 40 + map_const SLOWPOKE_WELL_B2F, 10, 9 ; 41 + map_const OLIVINE_LIGHTHOUSE_1F, 10, 9 ; 42 + map_const OLIVINE_LIGHTHOUSE_2F, 10, 9 ; 43 + map_const OLIVINE_LIGHTHOUSE_3F, 10, 9 ; 44 + map_const OLIVINE_LIGHTHOUSE_4F, 10, 9 ; 45 + map_const OLIVINE_LIGHTHOUSE_5F, 10, 9 ; 46 + map_const OLIVINE_LIGHTHOUSE_6F, 10, 9 ; 47 + map_const MAHOGANY_MART_1F, 4, 4 ; 48 + map_const TEAM_ROCKET_BASE_B1F, 15, 9 ; 49 + map_const TEAM_ROCKET_BASE_B2F, 15, 9 ; 50 + map_const TEAM_ROCKET_BASE_B3F, 15, 9 ; 51 + map_const ILEX_FOREST, 15, 27 ; 52 + map_const GOLDENROD_UNDERGROUND, 15, 18 ; 53 + map_const GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, 15, 18 ; 54 + map_const GOLDENROD_DEPT_STORE_B1F, 10, 9 ; 55 + map_const GOLDENROD_UNDERGROUND_WAREHOUSE, 10, 9 ; 56 + map_const MOUNT_MORTAR_1F_OUTSIDE, 20, 18 ; 57 + map_const MOUNT_MORTAR_1F_INSIDE, 20, 27 ; 58 + map_const MOUNT_MORTAR_2F_INSIDE, 20, 18 ; 59 + map_const MOUNT_MORTAR_B1F, 20, 18 ; 60 + map_const ICE_PATH_1F, 20, 18 ; 61 + map_const ICE_PATH_B1F, 10, 18 ; 62 + map_const ICE_PATH_B2F_MAHOGANY_SIDE, 10, 9 ; 63 + map_const ICE_PATH_B2F_BLACKTHORN_SIDE, 5, 9 ; 64 + map_const ICE_PATH_B3F, 10, 9 ; 65 + map_const WHIRL_ISLAND_NW, 5, 9 ; 66 + map_const WHIRL_ISLAND_NE, 10, 9 ; 67 + map_const WHIRL_ISLAND_SW, 10, 9 ; 68 + map_const WHIRL_ISLAND_CAVE, 5, 9 ; 69 + map_const WHIRL_ISLAND_SE, 5, 9 ; 70 + map_const WHIRL_ISLAND_B1F, 20, 18 ; 71 + map_const WHIRL_ISLAND_B2F, 10, 18 ; 72 + map_const WHIRL_ISLAND_LUGIA_CHAMBER, 10, 9 ; 73 + map_const SILVER_CAVE_ROOM_1, 10, 18 ; 74 + map_const SILVER_CAVE_ROOM_2, 15, 18 ; 75 + map_const SILVER_CAVE_ROOM_3, 10, 18 ; 76 + map_const SILVER_CAVE_ITEM_ROOMS, 10, 9 ; 77 + map_const DARK_CAVE_VIOLET_ENTRANCE, 20, 18 ; 78 + map_const DARK_CAVE_BLACKTHORN_ENTRANCE, 15, 18 ; 79 + map_const DRAGONS_DEN_1F, 5, 9 ; 80 + map_const DRAGONS_DEN_B1F, 20, 18 ; 81 + map_const DRAGON_SHRINE, 5, 5 ; 82 + map_const TOHJO_FALLS, 15, 9 ; 83 + map_const DIGLETTS_CAVE, 10, 18 ; 84 + map_const MOUNT_MOON, 15, 9 ; 85 + map_const UNDERGROUND_PATH, 3, 14 ; 86 + map_const ROCK_TUNNEL_1F, 15, 18 ; 87 + map_const ROCK_TUNNEL_B1F, 15, 18 ; 88 + map_const SAFARI_ZONE_FUCHSIA_GATE_BETA, 5, 4 ; 89 + map_const SAFARI_ZONE_BETA, 10, 18 ; 90 + map_const VICTORY_ROAD, 10, 36 ; 91 + endgroup + + newgroup ECRUTEAK ; 4 + map_const ECRUTEAK_TIN_TOWER_ENTRANCE, 10, 9 ; 1 + map_const WISE_TRIOS_ROOM, 4, 4 ; 2 + map_const ECRUTEAK_POKECENTER_1F, 5, 4 ; 3 + map_const ECRUTEAK_LUGIA_SPEECH_HOUSE, 4, 4 ; 4 + map_const DANCE_THEATER, 6, 7 ; 5 + map_const ECRUTEAK_MART, 6, 4 ; 6 + map_const ECRUTEAK_GYM, 5, 9 ; 7 + map_const ECRUTEAK_ITEMFINDER_HOUSE, 4, 4 ; 8 + map_const ECRUTEAK_CITY, 20, 18 ; 9 + endgroup + + newgroup BLACKTHORN ; 5 + map_const BLACKTHORN_GYM_1F, 5, 9 ; 1 + map_const BLACKTHORN_GYM_2F, 5, 9 ; 2 + map_const BLACKTHORN_DRAGON_SPEECH_HOUSE, 4, 4 ; 3 + map_const BLACKTHORN_EMYS_HOUSE, 4, 4 ; 4 + map_const BLACKTHORN_MART, 6, 4 ; 5 + map_const BLACKTHORN_POKECENTER_1F, 5, 4 ; 6 + map_const MOVE_DELETERS_HOUSE, 4, 4 ; 7 + map_const ROUTE_45, 10, 45 ; 8 + map_const ROUTE_46, 10, 18 ; 9 + map_const BLACKTHORN_CITY, 20, 18 ; 10 + endgroup + + newgroup CINNABAR ; 6 + map_const CINNABAR_POKECENTER_1F, 5, 4 ; 1 + map_const CINNABAR_POKECENTER_2F_BETA, 8, 4 ; 2 + map_const ROUTE_19_FUCHSIA_GATE, 5, 4 ; 3 + map_const SEAFOAM_GYM, 5, 4 ; 4 + map_const ROUTE_19, 10, 18 ; 5 + map_const ROUTE_20, 30, 9 ; 6 + map_const ROUTE_21, 10, 18 ; 7 + map_const CINNABAR_ISLAND, 10, 9 ; 8 + endgroup + + newgroup CERULEAN ; 7 + map_const CERULEAN_GYM_BADGE_SPEECH_HOUSE, 4, 4 ; 1 + map_const CERULEAN_POLICE_STATION, 4, 4 ; 2 + map_const CERULEAN_TRADE_SPEECH_HOUSE, 4, 4 ; 3 + map_const CERULEAN_POKECENTER_1F, 5, 4 ; 4 + map_const CERULEAN_POKECENTER_2F_BETA, 8, 4 ; 5 + map_const CERULEAN_GYM, 5, 8 ; 6 + map_const CERULEAN_MART, 6, 4 ; 7 + map_const ROUTE_10_POKECENTER_1F, 5, 4 ; 8 + map_const ROUTE_10_POKECENTER_2F_BETA, 8, 4 ; 9 + map_const POWER_PLANT, 10, 9 ; 10 + map_const BILLS_HOUSE, 4, 4 ; 11 + map_const ROUTE_4, 20, 9 ; 12 + map_const ROUTE_9, 30, 9 ; 13 + map_const ROUTE_10_NORTH, 10, 9 ; 14 + map_const ROUTE_24, 10, 9 ; 15 + map_const ROUTE_25, 30, 9 ; 16 + map_const CERULEAN_CITY, 20, 18 ; 17 + endgroup + + newgroup AZALEA ; 8 + map_const AZALEA_POKECENTER_1F, 5, 4 ; 1 + map_const CHARCOAL_KILN, 4, 4 ; 2 + map_const AZALEA_MART, 6, 4 ; 3 + map_const KURTS_HOUSE, 8, 4 ; 4 + map_const AZALEA_GYM, 5, 8 ; 5 + map_const ROUTE_33, 10, 9 ; 6 + map_const AZALEA_TOWN, 20, 9 ; 7 + endgroup + + newgroup LAKE_OF_RAGE ; 9 + map_const LAKE_OF_RAGE_HIDDEN_POWER_HOUSE, 4, 4 ; 1 + map_const LAKE_OF_RAGE_MAGIKARP_HOUSE, 4, 4 ; 2 + map_const ROUTE_43_MAHOGANY_GATE, 5, 4 ; 3 + map_const ROUTE_43_GATE, 5, 4 ; 4 + map_const ROUTE_43, 10, 27 ; 5 + map_const LAKE_OF_RAGE, 20, 18 ; 6 + endgroup + + newgroup VIOLET ; 10 + map_const ROUTE_32, 10, 45 ; 1 + map_const ROUTE_35, 10, 18 ; 2 + map_const ROUTE_36, 30, 9 ; 3 + map_const ROUTE_37, 10, 9 ; 4 + map_const VIOLET_CITY, 20, 18 ; 5 + map_const VIOLET_MART, 6, 4 ; 6 + map_const VIOLET_GYM, 5, 8 ; 7 + map_const EARLS_POKEMON_ACADEMY, 4, 8 ; 8 + map_const VIOLET_NICKNAME_SPEECH_HOUSE, 4, 4 ; 9 + map_const VIOLET_POKECENTER_1F, 5, 4 ; 10 + map_const VIOLET_KYLES_HOUSE, 4, 4 ; 11 + map_const ROUTE_32_RUINS_OF_ALPH_GATE, 5, 4 ; 12 + map_const ROUTE_32_POKECENTER_1F, 5, 4 ; 13 + map_const ROUTE_35_GOLDENROD_GATE, 5, 4 ; 14 + map_const ROUTE_35_NATIONAL_PARK_GATE, 4, 4 ; 15 + map_const ROUTE_36_RUINS_OF_ALPH_GATE, 5, 4 ; 16 + map_const ROUTE_36_NATIONAL_PARK_GATE, 5, 4 ; 17 + endgroup + + newgroup GOLDENROD ; 11 + map_const ROUTE_34, 10, 27 ; 1 + map_const GOLDENROD_CITY, 20, 18 ; 2 + map_const GOLDENROD_GYM, 10, 9 ; 3 + map_const GOLDENROD_BIKE_SHOP, 4, 4 ; 4 + map_const GOLDENROD_HAPPINESS_RATER, 4, 4 ; 5 + map_const BILLS_FAMILYS_HOUSE, 4, 4 ; 6 + map_const GOLDENROD_MAGNET_TRAIN_STATION, 10, 9 ; 7 + map_const GOLDENROD_FLOWER_SHOP, 4, 4 ; 8 + map_const GOLDENROD_PP_SPEECH_HOUSE, 4, 4 ; 9 + map_const GOLDENROD_NAME_RATER, 4, 4 ; 10 + map_const GOLDENROD_DEPT_STORE_1F, 8, 4 ; 11 + map_const GOLDENROD_DEPT_STORE_2F, 8, 4 ; 12 + map_const GOLDENROD_DEPT_STORE_3F, 8, 4 ; 13 + map_const GOLDENROD_DEPT_STORE_4F, 8, 4 ; 14 + map_const GOLDENROD_DEPT_STORE_5F, 8, 4 ; 15 + map_const GOLDENROD_DEPT_STORE_6F, 8, 4 ; 16 + map_const GOLDENROD_DEPT_STORE_ELEVATOR, 2, 2 ; 17 + map_const GOLDENROD_DEPT_STORE_ROOF, 8, 4 ; 18 + map_const GOLDENROD_GAME_CORNER, 10, 7 ; 19 + map_const GOLDENROD_POKECENTER_1F, 5, 4 ; 20 + map_const POKECOM_CENTER_ADMIN_OFFICE_MOBILE, 16, 16 ; 21 + map_const ILEX_FOREST_AZALEA_GATE, 5, 4 ; 22 + map_const ROUTE_34_ILEX_FOREST_GATE, 5, 4 ; 23 + map_const DAY_CARE, 5, 4 ; 24 + endgroup + + newgroup VERMILION ; 12 + map_const ROUTE_6, 10, 9 ; 1 + map_const ROUTE_11, 20, 9 ; 2 + map_const VERMILION_CITY, 20, 18 ; 3 + map_const VERMILION_FISHING_SPEECH_HOUSE, 4, 4 ; 4 + map_const VERMILION_POKECENTER_1F, 5, 4 ; 5 + map_const VERMILION_POKECENTER_2F_BETA, 8, 4 ; 6 + map_const POKEMON_FAN_CLUB, 5, 4 ; 7 + map_const VERMILION_MAGNET_TRAIN_SPEECH_HOUSE, 4, 4 ; 8 + map_const VERMILION_MART, 6, 4 ; 9 + map_const VERMILION_DIGLETTS_CAVE_SPEECH_HOUSE, 4, 4 ; 10 + map_const VERMILION_GYM, 5, 9 ; 11 + map_const ROUTE_6_SAFFRON_GATE, 5, 4 ; 12 + map_const ROUTE_6_UNDERGROUND_PATH_ENTRANCE, 4, 4 ; 13 + endgroup + + newgroup PALLET ; 13 + map_const ROUTE_1, 10, 18 ; 1 + map_const PALLET_TOWN, 10, 9 ; 2 + map_const REDS_HOUSE_1F, 4, 4 ; 3 + map_const REDS_HOUSE_2F, 4, 4 ; 4 + map_const BLUES_HOUSE, 4, 4 ; 5 + map_const OAKS_LAB, 5, 6 ; 6 + endgroup + + newgroup PEWTER ; 14 + map_const ROUTE_3, 30, 9 ; 1 + map_const PEWTER_CITY, 20, 18 ; 2 + map_const PEWTER_NIDORAN_SPEECH_HOUSE, 4, 4 ; 3 + map_const PEWTER_GYM, 5, 7 ; 4 + map_const PEWTER_MART, 6, 4 ; 5 + map_const PEWTER_POKECENTER_1F, 5, 4 ; 6 + map_const PEWTER_POKECENTER_2F_BETA, 8, 4 ; 7 + map_const PEWTER_SNOOZE_SPEECH_HOUSE, 4, 4 ; 8 + endgroup + + newgroup FAST_SHIP ; 15 + map_const OLIVINE_PORT, 10, 18 ; 1 + map_const VERMILION_PORT, 10, 18 ; 2 + map_const FAST_SHIP_1F, 16, 9 ; 3 + map_const FAST_SHIP_CABINS_NNW_NNE_NE, 4, 16 ; 4 + map_const FAST_SHIP_CABINS_SW_SSW_NW, 4, 16 ; 5 + map_const FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN, 5, 17 ; 6 + map_const FAST_SHIP_B1F, 16, 8 ; 7 + map_const OLIVINE_PORT_PASSAGE, 10, 9 ; 8 + map_const VERMILION_PORT_PASSAGE, 10, 9 ; 9 + map_const MOUNT_MOON_SQUARE, 15, 9 ; 10 + map_const MOUNT_MOON_GIFT_SHOP, 4, 4 ; 11 + map_const TIN_TOWER_ROOF, 10, 9 ; 12 + endgroup + + newgroup INDIGO ; 16 + map_const ROUTE_23, 10, 9 ; 1 + map_const INDIGO_PLATEAU_POKECENTER_1F, 9, 7 ; 2 + map_const WILLS_ROOM, 5, 9 ; 3 + map_const KOGAS_ROOM, 5, 9 ; 4 + map_const BRUNOS_ROOM, 5, 9 ; 5 + map_const KARENS_ROOM, 5, 9 ; 6 + map_const LANCES_ROOM, 5, 12 ; 7 + map_const HALL_OF_FAME, 5, 7 ; 8 + endgroup + + newgroup FUCHSIA ; 17 + map_const ROUTE_13, 30, 9 ; 1 + map_const ROUTE_14, 10, 18 ; 2 + map_const ROUTE_15, 20, 9 ; 3 + map_const ROUTE_18, 10, 9 ; 4 + map_const FUCHSIA_CITY, 20, 18 ; 5 + map_const FUCHSIA_MART, 6, 4 ; 6 + map_const SAFARI_ZONE_MAIN_OFFICE, 4, 4 ; 7 + map_const FUCHSIA_GYM, 5, 9 ; 8 + map_const BILLS_BROTHERS_HOUSE, 4, 4 ; 9 + map_const FUCHSIA_POKECENTER_1F, 5, 4 ; 10 + map_const FUCHSIA_POKECENTER_2F_BETA, 8, 4 ; 11 + map_const SAFARI_ZONE_WARDENS_HOME, 5, 4 ; 12 + map_const ROUTE_15_FUCHSIA_GATE, 5, 4 ; 13 + endgroup + + newgroup LAVENDER ; 18 + map_const ROUTE_8, 20, 9 ; 1 + map_const ROUTE_12, 10, 27 ; 2 + map_const ROUTE_10_SOUTH, 10, 9 ; 3 + map_const LAVENDER_TOWN, 10, 9 ; 4 + map_const LAVENDER_POKECENTER_1F, 5, 4 ; 5 + map_const LAVENDER_POKECENTER_2F_BETA, 8, 4 ; 6 + map_const MR_FUJIS_HOUSE, 5, 4 ; 7 + map_const LAVENDER_SPEECH_HOUSE, 4, 4 ; 8 + map_const LAVENDER_NAME_RATER, 4, 4 ; 9 + map_const LAVENDER_MART, 6, 4 ; 10 + map_const SOUL_HOUSE, 5, 4 ; 11 + map_const LAV_RADIO_TOWER_1F, 10, 4 ; 12 + map_const ROUTE_8_SAFFRON_GATE, 5, 4 ; 13 + map_const ROUTE_12_SUPER_ROD_HOUSE, 4, 4 ; 14 + endgroup + + newgroup SILVER ; 19 + map_const ROUTE_28, 20, 9 ; 1 + map_const SILVER_CAVE_OUTSIDE, 20, 18 ; 2 + map_const SILVER_CAVE_POKECENTER_1F, 5, 4 ; 3 + map_const ROUTE_28_STEEL_WING_HOUSE, 4, 4 ; 4 + endgroup + + newgroup CABLE_CLUB ; 20 + map_const POKECENTER_2F, 8, 4 ; 1 + map_const TRADE_CENTER, 5, 4 ; 2 + map_const COLOSSEUM, 5, 4 ; 3 + map_const TIME_CAPSULE, 5, 4 ; 4 + map_const MOBILE_TRADE_ROOM, 5, 4 ; 5 + map_const MOBILE_BATTLE_ROOM, 5, 4 ; 6 + endgroup + + newgroup CELADON ; 21 + map_const ROUTE_7, 10, 9 ; 1 + map_const ROUTE_16, 10, 9 ; 2 + map_const ROUTE_17, 10, 45 ; 3 + map_const CELADON_CITY, 20, 18 ; 4 + map_const CELADON_DEPT_STORE_1F, 8, 4 ; 5 + map_const CELADON_DEPT_STORE_2F, 8, 4 ; 6 + map_const CELADON_DEPT_STORE_3F, 8, 4 ; 7 + map_const CELADON_DEPT_STORE_4F, 8, 4 ; 8 + map_const CELADON_DEPT_STORE_5F, 8, 4 ; 9 + map_const CELADON_DEPT_STORE_6F, 8, 4 ; 10 + map_const CELADON_DEPT_STORE_ELEVATOR, 2, 2 ; 11 + map_const CELADON_MANSION_1F, 4, 5 ; 12 + map_const CELADON_MANSION_2F, 4, 5 ; 13 + map_const CELADON_MANSION_3F, 4, 5 ; 14 + map_const CELADON_MANSION_ROOF, 4, 5 ; 15 + map_const CELADON_MANSION_ROOF_HOUSE, 4, 4 ; 16 + map_const CELADON_POKECENTER_1F, 5, 4 ; 17 + map_const CELADON_POKECENTER_2F_BETA, 8, 4 ; 18 + map_const CELADON_GAME_CORNER, 10, 7 ; 19 + map_const CELADON_GAME_CORNER_PRIZE_ROOM, 3, 3 ; 20 + map_const CELADON_GYM, 5, 9 ; 21 + map_const CELADON_CAFE, 6, 4 ; 22 + map_const ROUTE_16_FUCHSIA_SPEECH_HOUSE, 4, 4 ; 23 + map_const ROUTE_16_GATE, 5, 4 ; 24 + map_const ROUTE_7_SAFFRON_GATE, 5, 4 ; 25 + map_const ROUTE_17_ROUTE_18_GATE, 5, 4 ; 26 + endgroup + + newgroup CIANWOOD ; 22 + map_const ROUTE_40, 10, 18 ; 1 + map_const ROUTE_41, 25, 27 ; 2 + map_const CIANWOOD_CITY, 15, 27 ; 3 + map_const MANIAS_HOUSE, 4, 4 ; 4 + map_const CIANWOOD_GYM, 5, 9 ; 5 + map_const CIANWOOD_POKECENTER_1F, 5, 4 ; 6 + map_const CIANWOOD_PHARMACY, 4, 4 ; 7 + map_const CIANWOOD_PHOTO_STUDIO, 4, 4 ; 8 + map_const CIANWOOD_LUGIA_SPEECH_HOUSE, 4, 4 ; 9 + map_const POKE_SEERS_HOUSE, 4, 4 ; 10 + map_const BATTLE_TOWER_1F, 8, 5 ; 11 + map_const BATTLE_TOWER_BATTLE_ROOM, 4, 4 ; 12 + map_const BATTLE_TOWER_ELEVATOR, 2, 2 ; 13 + map_const BATTLE_TOWER_HALLWAY, 11, 2 ; 14 + map_const ROUTE_40_BATTLE_TOWER_GATE, 5, 4 ; 15 + map_const BATTLE_TOWER_OUTSIDE, 10, 14 ; 16 + endgroup + + newgroup VIRIDIAN ; 23 + map_const ROUTE_2, 10, 27 ; 1 + map_const ROUTE_22, 20, 9 ; 2 + map_const VIRIDIAN_CITY, 20, 18 ; 3 + map_const VIRIDIAN_GYM, 5, 9 ; 4 + map_const VIRIDIAN_NICKNAME_SPEECH_HOUSE, 4, 4 ; 5 + map_const TRAINER_HOUSE_1F, 5, 7 ; 6 + map_const TRAINER_HOUSE_B1F, 5, 8 ; 7 + map_const VIRIDIAN_MART, 6, 4 ; 8 + map_const VIRIDIAN_POKECENTER_1F, 5, 4 ; 9 + map_const VIRIDIAN_POKECENTER_2F_BETA, 8, 4 ; 10 + map_const ROUTE_2_NUGGET_HOUSE, 4, 4 ; 11 + map_const ROUTE_2_GATE, 5, 4 ; 12 + map_const VICTORY_ROAD_GATE, 10, 9 ; 13 + endgroup + + newgroup NEW_BARK ; 24 + map_const ROUTE_26, 10, 54 ; 1 + map_const ROUTE_27, 40, 9 ; 2 + map_const ROUTE_29, 30, 9 ; 3 + map_const NEW_BARK_TOWN, 10, 9 ; 4 + map_const ELMS_LAB, 5, 6 ; 5 + map_const PLAYERS_HOUSE_1F, 5, 4 ; 6 + map_const PLAYERS_HOUSE_2F, 4, 3 ; 7 + map_const PLAYERS_NEIGHBORS_HOUSE, 4, 4 ; 8 + map_const ELMS_HOUSE, 4, 4 ; 9 + map_const ROUTE_26_HEAL_HOUSE, 4, 4 ; 10 + map_const DAY_OF_WEEK_SIBLINGS_HOUSE, 4, 4 ; 11 + map_const ROUTE_27_SANDSTORM_HOUSE, 4, 4 ; 12 + map_const ROUTE_29_ROUTE_46_GATE, 5, 4 ; 13 + endgroup + + newgroup SAFFRON ; 25 + map_const ROUTE_5, 10, 9 ; 1 + map_const SAFFRON_CITY, 20, 18 ; 2 + map_const FIGHTING_DOJO, 5, 6 ; 3 + map_const SAFFRON_GYM, 10, 9 ; 4 + map_const SAFFRON_MART, 6, 4 ; 5 + map_const SAFFRON_POKECENTER_1F, 5, 4 ; 6 + map_const SAFFRON_POKECENTER_2F_BETA, 8, 4 ; 7 + map_const MR_PSYCHICS_HOUSE, 4, 4 ; 8 + map_const SAFFRON_MAGNET_TRAIN_STATION, 10, 9 ; 9 + map_const SILPH_CO_1F, 8, 4 ; 10 + map_const COPYCATS_HOUSE_1F, 4, 4 ; 11 + map_const COPYCATS_HOUSE_2F, 5, 3 ; 12 + map_const ROUTE_5_UNDERGROUND_PATH_ENTRANCE, 4, 4 ; 13 + map_const ROUTE_5_SAFFRON_GATE, 5, 4 ; 14 + map_const ROUTE_5_CLEANSE_TAG_HOUSE, 4, 4 ; 15 + endgroup + + newgroup CHERRYGROVE ; 26 + map_const ROUTE_30, 10, 27 ; 1 + map_const ROUTE_31, 20, 9 ; 2 + map_const CHERRYGROVE_CITY, 20, 9 ; 3 + map_const CHERRYGROVE_MART, 6, 4 ; 4 + map_const CHERRYGROVE_POKECENTER_1F, 5, 4 ; 5 + map_const CHERRYGROVE_GYM_SPEECH_HOUSE, 4, 4 ; 6 + map_const GUIDE_GENTS_HOUSE, 4, 4 ; 7 + map_const CHERRYGROVE_EVOLUTION_SPEECH_HOUSE, 4, 4 ; 8 + map_const ROUTE_30_BERRY_HOUSE, 4, 4 ; 9 + map_const MR_POKEMONS_HOUSE, 4, 4 ; 10 + map_const ROUTE_31_VIOLET_GATE, 5, 4 ; 11 + endgroup + +DEF NUM_MAP_GROUPS EQU const_value ; 26 diff --git a/constants/map_data_constants.asm b/constants/map_data_constants.asm new file mode 100644 index 0000000..5d18ce3 --- /dev/null +++ b/constants/map_data_constants.asm @@ -0,0 +1,141 @@ +DEF MAPGROUP_N_A EQU -1 +DEF GROUP_N_A EQU -1 +DEF MAP_N_A EQU -1 +DEF MAPGROUP_NONE EQU 0 +DEF GROUP_NONE EQU 0 +DEF MAP_NONE EQU 0 + +; map struct members (see data/maps/maps.asm) +rsreset +DEF MAP_MAPATTRIBUTES_BANK rb ; 0 +DEF MAP_TILESET rb ; 1 +DEF MAP_ENVIRONMENT rb ; 2 +DEF MAP_MAPATTRIBUTES rw ; 3 +DEF MAP_LOCATION rb ; 5 +DEF MAP_MUSIC rb ; 6 +DEF MAP_PALETTE rb ; 7 +DEF MAP_FISHGROUP rb ; 8 +DEF MAP_LENGTH EQU _RS + +; map environments (wEnvironment) +; EnvironmentColorsPointers indexes (see data/maps/environment_colors.asm) + const_def 1 + const TOWN + const ROUTE + const INDOOR + const CAVE + const ENVIRONMENT_5 + const GATE + const DUNGEON +DEF NUM_ENVIRONMENTS EQU const_value - 1 + +; map palettes (wEnvironment) + const_def + const PALETTE_AUTO + const PALETTE_DAY + const PALETTE_NITE + const PALETTE_MORN + const PALETTE_DARK +DEF NUM_MAP_PALETTES EQU const_value + +; FishGroups indexes (see data/wild/fish.asm) + const_def + const FISHGROUP_NONE + const FISHGROUP_SHORE + const FISHGROUP_OCEAN + const FISHGROUP_LAKE + const FISHGROUP_POND + const FISHGROUP_DRATINI + const FISHGROUP_QWILFISH_SWARM + const FISHGROUP_REMORAID_SWARM + const FISHGROUP_GYARADOS + const FISHGROUP_DRATINI_2 + const FISHGROUP_WHIRL_ISLANDS + const FISHGROUP_QWILFISH + const FISHGROUP_REMORAID + const FISHGROUP_QWILFISH_NO_SWARM +DEF NUM_FISHGROUPS EQU const_value - 1 + +; connection directions (see data/maps/data.asm) + const_def + const EAST_F + const WEST_F + const SOUTH_F + const NORTH_F + +; wMapConnections + const_def + shift_const EAST + shift_const WEST + shift_const SOUTH + shift_const NORTH + +; SpawnPoints indexes (see data/maps/spawn_points.asm) + const_def + const SPAWN_HOME + const SPAWN_DEBUG +; kanto + const SPAWN_PALLET + const SPAWN_VIRIDIAN + const SPAWN_PEWTER + const SPAWN_CERULEAN + const SPAWN_ROCK_TUNNEL + const SPAWN_VERMILION + const SPAWN_LAVENDER + const SPAWN_SAFFRON + const SPAWN_CELADON + const SPAWN_FUCHSIA + const SPAWN_CINNABAR + const SPAWN_INDIGO +; johto + const SPAWN_NEW_BARK + const SPAWN_CHERRYGROVE + const SPAWN_VIOLET + const SPAWN_UNION_CAVE + const SPAWN_AZALEA + const SPAWN_CIANWOOD + const SPAWN_GOLDENROD + const SPAWN_OLIVINE + const SPAWN_ECRUTEAK + const SPAWN_MAHOGANY + const SPAWN_LAKE_OF_RAGE + const SPAWN_BLACKTHORN + const SPAWN_MT_SILVER + const SPAWN_FAST_SHIP +DEF NUM_SPAWNS EQU const_value + +DEF SPAWN_N_A EQU -1 + +; Flypoints indexes (see data/maps/flypoints.asm) + const_def +; johto +DEF JOHTO_FLYPOINT EQU const_value + const FLY_NEW_BARK + const FLY_CHERRYGROVE + const FLY_VIOLET + const FLY_AZALEA + const FLY_GOLDENROD + const FLY_ECRUTEAK + const FLY_OLIVINE + const FLY_CIANWOOD + const FLY_MAHOGANY + const FLY_LAKE_OF_RAGE + const FLY_BLACKTHORN + const FLY_MT_SILVER +; kanto +DEF KANTO_FLYPOINT EQU const_value + const FLY_PALLET + const FLY_VIRIDIAN + const FLY_PEWTER + const FLY_CERULEAN + const FLY_VERMILION + const FLY_ROCK_TUNNEL + const FLY_LAVENDER + const FLY_CELADON + const FLY_SAFFRON + const FLY_FUCHSIA + const FLY_CINNABAR + const FLY_INDIGO +DEF NUM_FLYPOINTS EQU const_value + +DEF MAX_OUTDOOR_SPRITES EQU 23 ; see engine/overworld/overworld.asm diff --git a/constants/map_object_constants.asm b/constants/map_object_constants.asm new file mode 100644 index 0000000..ada9a98 --- /dev/null +++ b/constants/map_object_constants.asm @@ -0,0 +1,308 @@ +; object_struct members (see macros/ram.asm) +rsreset +DEF OBJECT_SPRITE rb ; 00 +DEF OBJECT_MAP_OBJECT_INDEX rb ; 01 +DEF OBJECT_SPRITE_TILE rb ; 02 +DEF OBJECT_MOVEMENT_TYPE rb ; 03 +DEF OBJECT_FLAGS1 rb ; 04 +DEF OBJECT_FLAGS2 rb ; 05 +DEF OBJECT_PALETTE rb ; 06 +DEF OBJECT_WALKING rb ; 07 +DEF OBJECT_DIRECTION rb ; 08 +DEF OBJECT_STEP_TYPE rb ; 09 +DEF OBJECT_STEP_DURATION rb ; 0a +DEF OBJECT_ACTION rb ; 0b +DEF OBJECT_STEP_FRAME rb ; 0c +DEF OBJECT_FACING rb ; 0d +DEF OBJECT_TILE rb ; 0e +DEF OBJECT_LAST_TILE rb ; 0f +DEF OBJECT_MAP_X rb ; 10 +DEF OBJECT_MAP_Y rb ; 11 +DEF OBJECT_LAST_MAP_X rb ; 12 +DEF OBJECT_LAST_MAP_Y rb ; 13 +DEF OBJECT_INIT_X rb ; 14 +DEF OBJECT_INIT_Y rb ; 15 +DEF OBJECT_RADIUS rb ; 16 +DEF OBJECT_SPRITE_X rb ; 17 +DEF OBJECT_SPRITE_Y rb ; 18 +DEF OBJECT_SPRITE_X_OFFSET rb ; 19 +DEF OBJECT_SPRITE_Y_OFFSET rb ; 1a +DEF OBJECT_MOVEMENT_INDEX rb ; 1b +DEF OBJECT_STEP_INDEX rb ; 1c +DEF OBJECT_1D rb ; 1d +DEF OBJECT_1E rb ; 1e +DEF OBJECT_JUMP_HEIGHT rb ; 1f +DEF OBJECT_RANGE rb ; 20 + rb_skip 7 +DEF OBJECT_LENGTH EQU _RS +DEF NUM_OBJECT_STRUCTS EQU 13 ; see wObjectStructs + +; object_struct OBJECT_DIRECTION values +DEF OW_DOWN EQU DOWN << 2 +DEF OW_UP EQU UP << 2 +DEF OW_LEFT EQU LEFT << 2 +DEF OW_RIGHT EQU RIGHT << 2 + +; object_struct OBJECT_FLAGS1 bit flags + const_def + const INVISIBLE_F ; 0 + const WONT_DELETE_F ; 1 + const FIXED_FACING_F ; 2 + const SLIDING_F ; 3 + const NOCLIP_TILES_F ; 4 + const MOVE_ANYWHERE_F ; 5 + const NOCLIP_OBJS_F ; 6 + const EMOTE_OBJECT_F ; 7 + +DEF INVISIBLE EQU 1 << INVISIBLE_F +DEF WONT_DELETE EQU 1 << WONT_DELETE_F +DEF FIXED_FACING EQU 1 << FIXED_FACING_F +DEF SLIDING EQU 1 << SLIDING_F +DEF NOCLIP_TILES EQU 1 << NOCLIP_TILES_F +DEF MOVE_ANYWHERE EQU 1 << MOVE_ANYWHERE_F +DEF NOCLIP_OBJS EQU 1 << NOCLIP_OBJS_F +DEF EMOTE_OBJECT EQU 1 << EMOTE_OBJECT_F + +; object_struct OBJECT_FLAGS2 bit flags + const_def + const LOW_PRIORITY_F ; 0 + const HIGH_PRIORITY_F ; 1 + const OBJ_FLAGS2_2 ; 2 + const OVERHEAD_F ; 3 + const USE_OBP1_F ; 4 + const FROZEN_F ; 5 + const OBJ_FLAGS2_6 ; 6 + const OBJ_FLAGS2_7 ; 7 + +DEF LOW_PRIORITY EQU 1 << LOW_PRIORITY_F +DEF HIGH_PRIORITY EQU 1 << HIGH_PRIORITY_F +DEF OVERHEAD EQU 1 << OVERHEAD_F +DEF USE_OBP1 EQU 1 << USE_OBP1_F + +; object_struct OBJECT_PALETTE bit flags + const_def 5 + const SWIMMING_F ; 5 + const STRENGTH_BOULDER_F ; 6 + const BIG_OBJECT_F ; 7 + +DEF SWIMMING EQU 1 << SWIMMING_F +DEF STRENGTH_BOULDER EQU 1 << STRENGTH_BOULDER_F +DEF BIG_OBJECT EQU 1 << BIG_OBJECT_F + +; facing attribute bit flags +DEF RELATIVE_ATTRIBUTES_F EQU 1 +DEF ABSOLUTE_TILE_ID_F EQU 2 + +DEF RELATIVE_ATTRIBUTES EQU 1 << RELATIVE_ATTRIBUTES_F +DEF ABSOLUTE_TILE_ID EQU 1 << ABSOLUTE_TILE_ID_F + +; map_object struct members (see macros/ram.asm) +rsreset +DEF MAPOBJECT_OBJECT_STRUCT_ID rb ; 0 +DEF MAPOBJECT_SPRITE rb ; 1 +DEF MAPOBJECT_Y_COORD rb ; 2 +DEF MAPOBJECT_X_COORD rb ; 3 +DEF MAPOBJECT_MOVEMENT rb ; 4 +DEF MAPOBJECT_RADIUS rb ; 5 +DEF MAPOBJECT_HOUR_1 rb ; 6 +DEF MAPOBJECT_HOUR_2 rb ; 7 +rsset MAPOBJECT_HOUR_2 +DEF MAPOBJECT_TIMEOFDAY rb ; 7 +DEF MAPOBJECT_PALETTE rb ; 8 +rsset MAPOBJECT_PALETTE +DEF MAPOBJECT_TYPE rb ; 8 +DEF MAPOBJECT_SIGHT_RANGE rb ; 9 +DEF MAPOBJECT_SCRIPT_POINTER rw ; a +DEF MAPOBJECT_EVENT_FLAG rw ; c + rb_skip 2 +DEF MAPOBJECT_LENGTH EQU _RS +DEF NUM_OBJECTS EQU 16 +DEF PLAYER_OBJECT EQU 0 + +DEF MAPOBJECT_PALETTE_MASK EQU %11110000 +DEF MAPOBJECT_TYPE_MASK EQU %00001111 + +; SpriteMovementData struct members (see data/sprites/map_objects.asm) +rsreset +DEF SPRITEMOVEATTR_MOVEMENT rb ; 0 +DEF SPRITEMOVEATTR_FACING rb ; 1 +DEF SPRITEMOVEATTR_ACTION rb ; 2 +DEF SPRITEMOVEATTR_FLAGS1 rb ; 3 +DEF SPRITEMOVEATTR_FLAGS2 rb ; 4 +DEF SPRITEMOVEATTR_PALFLAGS rb ; 5 +DEF NUM_SPRITEMOVEDATA_FIELDS EQU _RS + +DEF MAPOBJECT_SCREEN_WIDTH EQU (SCREEN_WIDTH / 2) + 2 +DEF MAPOBJECT_SCREEN_HEIGHT EQU (SCREEN_HEIGHT / 2) + 2 + +; SpriteMovementData indexes (see data/sprites/map_objects.asm) + const_def + const SPRITEMOVEDATA_00 ; 00 + const SPRITEMOVEDATA_STILL ; 01 + const SPRITEMOVEDATA_WANDER ; 02 + const SPRITEMOVEDATA_SPINRANDOM_SLOW ; 03 + const SPRITEMOVEDATA_WALK_UP_DOWN ; 04 + const SPRITEMOVEDATA_WALK_LEFT_RIGHT ; 05 + const SPRITEMOVEDATA_STANDING_DOWN ; 06 + const SPRITEMOVEDATA_STANDING_UP ; 07 + const SPRITEMOVEDATA_STANDING_LEFT ; 08 + const SPRITEMOVEDATA_STANDING_RIGHT ; 09 + const SPRITEMOVEDATA_SPINRANDOM_FAST ; 0a + const SPRITEMOVEDATA_PLAYER ; 0b + const SPRITEMOVEDATA_INDEXED_1 ; 0c + const SPRITEMOVEDATA_INDEXED_2 ; 0d + const SPRITEMOVEDATA_0E ; 0e + const SPRITEMOVEDATA_0F ; 0f + const SPRITEMOVEDATA_10 ; 10 + const SPRITEMOVEDATA_11 ; 11 + const SPRITEMOVEDATA_12 ; 12 + const SPRITEMOVEDATA_FOLLOWING ; 13 + const SPRITEMOVEDATA_SCRIPTED ; 14 + const SPRITEMOVEDATA_BIGDOLLSYM ; 15 + const SPRITEMOVEDATA_POKEMON ; 16 + const SPRITEMOVEDATA_SUDOWOODO ; 17 + const SPRITEMOVEDATA_SMASHABLE_ROCK ; 18 + const SPRITEMOVEDATA_STRENGTH_BOULDER ; 19 + const SPRITEMOVEDATA_FOLLOWNOTEXACT ; 1a + const SPRITEMOVEDATA_SHADOW ; 1b + const SPRITEMOVEDATA_EMOTE ; 1c + const SPRITEMOVEDATA_SCREENSHAKE ; 1d + const SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE ; 1e + const SPRITEMOVEDATA_SPINCLOCKWISE ; 1f + const SPRITEMOVEDATA_BIGDOLLASYM ; 20 + const SPRITEMOVEDATA_BIGDOLL ; 21 + const SPRITEMOVEDATA_BOULDERDUST ; 22 + const SPRITEMOVEDATA_GRASS ; 23 + const SPRITEMOVEDATA_SWIM_WANDER ; 24 +DEF NUM_SPRITEMOVEDATA EQU const_value + +; StepFunction_FromMovement.Pointers indexes (see engine/overworld/map_objects.asm) + const_def + const SPRITEMOVEFN_00 ; 00 + const SPRITEMOVEFN_RANDOM_WALK_Y ; 01 + const SPRITEMOVEFN_RANDOM_WALK_X ; 02 + const SPRITEMOVEFN_RANDOM_WALK_XY ; 03 + const SPRITEMOVEFN_SLOW_RANDOM_SPIN ; 04 + const SPRITEMOVEFN_FAST_RANDOM_SPIN ; 05 + const SPRITEMOVEFN_STANDING ; 06 + const SPRITEMOVEFN_OBEY_DPAD ; 07 + const SPRITEMOVEFN_INDEXED_1 ; 08 + const SPRITEMOVEFN_INDEXED_2 ; 09 + const SPRITEMOVEFN_0A ; 0a + const SPRITEMOVEFN_0B ; 0b + const SPRITEMOVEFN_0C ; 0c + const SPRITEMOVEFN_0D ; 0d + const SPRITEMOVEFN_0E ; 0e + const SPRITEMOVEFN_FOLLOW ; 0f + const SPRITEMOVEFN_SCRIPTED ; 10 + const SPRITEMOVEFN_STRENGTH ; 11 + const SPRITEMOVEFN_FOLLOWNOTEXACT ; 12 + const SPRITEMOVEFN_SHADOW ; 13 + const SPRITEMOVEFN_EMOTE ; 14 + const SPRITEMOVEFN_BIG_SNORLAX ; 15 + const SPRITEMOVEFN_BOUNCE ; 16 + const SPRITEMOVEFN_SCREENSHAKE ; 17 + const SPRITEMOVEFN_SPIN_CLOCKWISE ; 18 + const SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE ; 19 + const SPRITEMOVEFN_BOULDERDUST ; 1a + const SPRITEMOVEFN_GRASS ; 1b +DEF NUM_SPRITEMOVEFN EQU const_value + +; StepTypesJumptable indexes (see engine/overworld/map_objects.asm) + const_def + const STEP_TYPE_RESET ; 00 + const STEP_TYPE_FROM_MOVEMENT ; 01 + const STEP_TYPE_NPC_WALK ; 02 + const STEP_TYPE_SLEEP ; 03 + const STEP_TYPE_STANDING ; 04 + const STEP_TYPE_RESTORE ; 05 + const STEP_TYPE_PLAYER_WALK ; 06 + const STEP_TYPE_CONTINUE_WALK ; 07 + const STEP_TYPE_NPC_JUMP ; 08 + const STEP_TYPE_PLAYER_JUMP ; 09 + const STEP_TYPE_TURN ; 0a + const STEP_TYPE_BUMP ; 0b + const STEP_TYPE_TELEPORT_FROM ; 0c + const STEP_TYPE_TELEPORT_TO ; 0d + const STEP_TYPE_SKYFALL ; 0e + const STEP_TYPE_STRENGTH_BOULDER ; 0f + const STEP_TYPE_GOT_BITE ; 10 + const STEP_TYPE_ROCK_SMASH ; 11 + const STEP_TYPE_RETURN_DIG ; 12 + const STEP_TYPE_TRACKING_OBJECT ; 13 + const STEP_TYPE_14 ; 14 + const STEP_TYPE_SCREENSHAKE ; 15 + const STEP_TYPE_16 ; 16 + const STEP_TYPE_17 ; 17 + const STEP_TYPE_DELETE ; 18 + const STEP_TYPE_SKYFALL_TOP ; 19 +DEF NUM_STEP_TYPES EQU const_value + +; ObjectActionPairPointers indexes (see engine/overworld/map_object_action.asm) + const_def + const OBJECT_ACTION_00 ; 00 + const OBJECT_ACTION_STAND ; 01 + const OBJECT_ACTION_STEP ; 02 + const OBJECT_ACTION_BUMP ; 03 + const OBJECT_ACTION_SPIN ; 04 + const OBJECT_ACTION_SPIN_FLICKER ; 05 + const OBJECT_ACTION_FISHING ; 06 + const OBJECT_ACTION_SHADOW ; 07 + const OBJECT_ACTION_EMOTE ; 08 + const OBJECT_ACTION_BIG_DOLL_SYM ; 09 + const OBJECT_ACTION_BOUNCE ; 0a + const OBJECT_ACTION_WEIRD_TREE ; 0b + const OBJECT_ACTION_BIG_DOLL_ASYM ; 0c + const OBJECT_ACTION_BIG_DOLL ; 0d + const OBJECT_ACTION_BOULDER_DUST ; 0e + const OBJECT_ACTION_GRASS_SHAKE ; 0f + const OBJECT_ACTION_SKYFALL ; 10 +DEF NUM_OBJECT_ACTIONS EQU const_value + +; Facings indexes (see data/sprites/facings.asm) + const_def + const FACING_STEP_DOWN_0 ; 00 + const FACING_STEP_DOWN_1 ; 01 + const FACING_STEP_DOWN_2 ; 02 + const FACING_STEP_DOWN_3 ; 03 + const FACING_STEP_UP_0 ; 04 + const FACING_STEP_UP_1 ; 05 + const FACING_STEP_UP_2 ; 06 + const FACING_STEP_UP_3 ; 07 + const FACING_STEP_LEFT_0 ; 08 + const FACING_STEP_LEFT_1 ; 09 + const FACING_STEP_LEFT_2 ; 0a + const FACING_STEP_LEFT_3 ; 0b + const FACING_STEP_RIGHT_0 ; 0c + const FACING_STEP_RIGHT_1 ; 0d + const FACING_STEP_RIGHT_2 ; 0e + const FACING_STEP_RIGHT_3 ; 0f + const FACING_FISH_DOWN ; 10 + const FACING_FISH_UP ; 11 + const FACING_FISH_LEFT ; 12 + const FACING_FISH_RIGHT ; 13 + const FACING_EMOTE ; 14 + const FACING_SHADOW ; 15 + const FACING_BIG_DOLL_ASYM ; 16 + const FACING_BIG_DOLL_SYM ; 17 + const FACING_WEIRD_TREE_0 ; 18 + const FACING_WEIRD_TREE_1 ; 19 + const FACING_WEIRD_TREE_2 ; 1a + const FACING_WEIRD_TREE_3 ; 1b + const FACING_BOULDER_DUST_1 ; 1c + const FACING_BOULDER_DUST_2 ; 1d + const FACING_GRASS_1 ; 1e + const FACING_GRASS_2 ; 1f +DEF NUM_FACINGS EQU const_value + +; DoPlayerMovement.DoStep arguments (see engine/overworld/player_movement.asm) + const_def + const STEP_SLOW ; 0 + const STEP_WALK ; 1 + const STEP_BIKE ; 2 + const STEP_LEDGE ; 3 + const STEP_ICE ; 4 + const STEP_TURN ; 5 + const STEP_BACK_LEDGE ; 6 + const STEP_WALK_IN_PLACE ; 7 +DEF NUM_STEPS EQU const_value diff --git a/constants/map_setup_constants.asm b/constants/map_setup_constants.asm new file mode 100644 index 0000000..42d806a --- /dev/null +++ b/constants/map_setup_constants.asm @@ -0,0 +1,24 @@ +; hMapEntryMethod values +; MapSetupScripts indexes (see data/maps/setup_scripts.asm) + const_def $f1 + const MAPSETUP_WARP ; f1 + const MAPSETUP_CONTINUE ; f2 + const MAPSETUP_RELOADMAP ; f3 + const MAPSETUP_TELEPORT ; f4 + const MAPSETUP_DOOR ; f5 + const MAPSETUP_FALL ; f6 + const MAPSETUP_CONNECTION ; f7 + const MAPSETUP_LINKRETURN ; f8 + const MAPSETUP_TRAIN ; f9 + const MAPSETUP_SUBMENU ; fa + const MAPSETUP_BADWARP ; fb + const MAPSETUP_FLY ; fc +DEF NUM_MAPSETUP_SCRIPTS EQU const_value - $f1 + +; callback types + const_def 1 + const MAPCALLBACK_TILES + const MAPCALLBACK_OBJECTS + const MAPCALLBACK_CMDQUEUE + const MAPCALLBACK_SPRITES + const MAPCALLBACK_NEWMAP diff --git a/constants/mart_constants.asm b/constants/mart_constants.asm new file mode 100644 index 0000000..1a2d08f --- /dev/null +++ b/constants/mart_constants.asm @@ -0,0 +1,45 @@ +; mart types (see engine/items/mart.asm) + const_def + const MARTTYPE_STANDARD + const MARTTYPE_BITTER + const MARTTYPE_BARGAIN + const MARTTYPE_PHARMACY + const MARTTYPE_ROOFTOP + +; Marts indexes (see data/items/marts.asm) + const_def + const MART_CHERRYGROVE + const MART_CHERRYGROVE_DEX + const MART_VIOLET + const MART_AZALEA + const MART_CIANWOOD + const MART_GOLDENROD_2F_1 + const MART_GOLDENROD_2F_2 + const MART_GOLDENROD_3F + const MART_GOLDENROD_4F + const MART_GOLDENROD_5F_1 + const MART_GOLDENROD_5F_2 + const MART_GOLDENROD_5F_3 + const MART_GOLDENROD_5F_4 + const MART_OLIVINE + const MART_ECRUTEAK + const MART_MAHOGANY_1 + const MART_MAHOGANY_2 + const MART_BLACKTHORN + const MART_VIRIDIAN + const MART_PEWTER + const MART_CERULEAN + const MART_LAVENDER + const MART_VERMILION + const MART_CELADON_2F_1 + const MART_CELADON_2F_2 + const MART_CELADON_3F + const MART_CELADON_4F + const MART_CELADON_5F_1 + const MART_CELADON_5F_2 + const MART_FUCHSIA + const MART_SAFFRON + const MART_MT_MOON + const MART_INDIGO_PLATEAU + const MART_UNDERGROUND +DEF NUM_MARTS EQU const_value diff --git a/constants/menu_constants.asm b/constants/menu_constants.asm new file mode 100644 index 0000000..63b0f5d --- /dev/null +++ b/constants/menu_constants.asm @@ -0,0 +1,114 @@ +; MenuHeader flags + const_def + shift_const MENU_RESTORE_TILES ; Will be set if MENU_BACKUP_TILES(_2) is set. + shift_const MENU_UNUSED_1 + shift_const MENU_UNUSED_2 + shift_const MENU_NO_CLICK_SFX + shift_const MENU_SPRITE_ANIMS + shift_const MENU_UNUSED_3 + shift_const MENU_BACKUP_TILES + shift_const MENU_BACKUP_TILES_2 + +; VerticalMenu/DoNthMenu/SetUpMenu/_2DMenu MenuData flags +; Per flag the comment specifies which menus actually implement it + const_def + shift_const STATICMENU_DISABLE_B ; VerticalMenu/_2DMenu + shift_const STATICMENU_ENABLE_SELECT ; VerticalMenu/_2DMenu + shift_const STATICMENU_ENABLE_LEFT_RIGHT ; DoNthMenu/SetUpMenu + shift_const STATICMENU_ENABLE_START ; DoNthMenu/SetUpMenu + shift_const STATICMENU_PLACE_TITLE ; VerticalMenu + shift_const STATICMENU_WRAP ; All + shift_const STATICMENU_NO_TOP_SPACING ; VerticalMenu/_2DMenu + shift_const STATICMENU_CURSOR ; VerticalMenu/_2DMenu + +; ScrollingMenu MenuData flags + const_def + shift_const SCROLLINGMENU_CALL_FUNCTION1_CANCEL + shift_const SCROLLINGMENU_CALL_FUNCTION3_NO_SWITCH + shift_const SCROLLINGMENU_ENABLE_LEFT + shift_const SCROLLINGMENU_ENABLE_RIGHT + shift_const SCROLLINGMENU_DISPLAY_ARROWS + shift_const SCROLLINGMENU_ENABLE_FUNCTION3 + shift_const SCROLLINGMENU_ENABLE_START + shift_const SCROLLINGMENU_ENABLE_SELECT + +; ScrollingMenu items structure format + const_def 1 + const SCROLLINGMENU_ITEMS_NORMAL + const SCROLLINGMENU_ITEMS_QUANTITY + +; MonMenuOptions indexes (see data/mon_menu.asm) +; used by PokemonActionSubmenu (see engine/pokemon/mon_menu.asm) + const_def 1 + ; moves + const MONMENUITEM_CUT ; 1 + const MONMENUITEM_FLY ; 2 + const MONMENUITEM_SURF ; 3 + const MONMENUITEM_STRENGTH ; 4 + const MONMENUITEM_WATERFALL ; 5 + const MONMENUITEM_FLASH ; 6 + const MONMENUITEM_WHIRLPOOL ; 7 + const MONMENUITEM_DIG ; 8 + const MONMENUITEM_TELEPORT ; 9 + const MONMENUITEM_SOFTBOILED ; 10 + const MONMENUITEM_HEADBUTT ; 11 + const MONMENUITEM_ROCKSMASH ; 12 + const MONMENUITEM_MILKDRINK ; 13 + const MONMENUITEM_SWEETSCENT ; 14 + ; options + const MONMENUITEM_STATS ; 15 + const MONMENUITEM_SWITCH ; 16 + const MONMENUITEM_ITEM ; 17 + const MONMENUITEM_CANCEL ; 18 + const MONMENUITEM_MOVE ; 19 + const MONMENUITEM_MAIL ; 20 + const MONMENUITEM_ERROR ; 21 +DEF NUM_MONMENUITEMS EQU const_value - 1 + +; MonMenuOptions categories +DEF MONMENU_FIELD_MOVE EQU 0 +DEF MONMENU_MENUOPTION EQU 1 + +DEF NUM_MONMENU_ITEMS EQU 8 + +; start/select menu return values +DEF HMENURETURN_SCRIPT EQU %10000000 +DEF HMENURETURN_ASM EQU %11111111 + +; PartyMenuQualityPointers indexes (see data/party_menu_qualities.asm) + const_def + const PARTYMENUACTION_CHOOSE_POKEMON + const PARTYMENUACTION_HEALING_ITEM + const PARTYMENUACTION_SWITCH + const PARTYMENUACTION_TEACH_TMHM + const PARTYMENUACTION_MOVE + const PARTYMENUACTION_EVO_STONE + const PARTYMENUACTION_GIVE_MON + const PARTYMENUACTION_GIVE_MON_FEMALE ; unused + const PARTYMENUACTION_GIVE_ITEM + const PARTYMENUACTION_MOBILE ; mobile +DEF NUM_PARTYMENUACTIONS EQU const_value +; PrintPartyMenuActionText arguments (see engine/pokemon/party_menu.asm) + const_next $f0 + const PARTYMENUTEXT_HEAL_PSN + const PARTYMENUTEXT_HEAL_BRN + const PARTYMENUTEXT_HEAL_FRZ + const PARTYMENUTEXT_HEAL_SLP + const PARTYMENUTEXT_HEAL_PAR + const PARTYMENUTEXT_HEAL_HP + const PARTYMENUTEXT_HEAL_ALL + const PARTYMENUTEXT_REVIVE + const PARTYMENUTEXT_LEVEL_UP + const PARTYMENUTEXT_HEAL_CONFUSION + +; Naming types (see engine/menus/naming_screen.asm) + const_def + const NAME_MON + const NAME_PLAYER + const NAME_RIVAL + const NAME_MOM + const NAME_BOX + const NAME_FRIEND + const NAME_6 ; duplicate of NAME_MON + const NAME_7 ; duplicate of NAME_MON +DEF NUM_NAME_TYPES EQU const_value diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm new file mode 100644 index 0000000..b909d57 --- /dev/null +++ b/constants/misc_constants.asm @@ -0,0 +1,49 @@ +; Boolean checks +DEF FALSE EQU 0 +DEF TRUE EQU 1 + +; genders +DEF MALE EQU 0 +DEF FEMALE EQU 1 + +; FlagAction arguments (see home/flag.asm) + const_def + const RESET_FLAG + const SET_FLAG + const CHECK_FLAG + +; G/S version ID: 0 = Gold, 1 = Silver (used by checkver) +; Mystery Gift uses incremented values 1 and 2 +DEF GS_VERSION EQU 0 +; Pokémon Pikachu 2, a step counter / virtual pet device (used by Mystery Gift) +DEF POKEMON_PIKACHU_2_VERSION EQU 3 +DEF RESERVED_GAME_VERSION EQU 4 + +; save file corruption check values +DEF SAVE_CHECK_VALUE_1 EQU 99 +DEF SAVE_CHECK_VALUE_2 EQU 127 + +; RTC halted check value +DEF RTC_HALT_VALUE EQU $1234 + +; time of day boundaries +DEF MORN_HOUR EQU 4 ; 4 AM +DEF DAY_HOUR EQU 10 ; 10 AM +DEF NITE_HOUR EQU 18 ; 6 PM +DEF NOON_HOUR EQU 12 ; 12 PM +DEF MAX_HOUR EQU 24 ; 12 AM + +; significant money values +DEF START_MONEY EQU 3000 +DEF MOM_MONEY EQU 2300 +DEF MAX_MONEY EQU 999999 +DEF MAX_COINS EQU 9999 + +; link record +DEF MAX_LINK_RECORD EQU 9999 + +; day-care +DEF MAX_DAY_CARE_EXP EQU $500000 + +; hall of fame +DEF HOF_MASTER_COUNT EQU 200 diff --git a/constants/mobile_constants.asm b/constants/mobile_constants.asm new file mode 100644 index 0000000..95ff562 --- /dev/null +++ b/constants/mobile_constants.asm @@ -0,0 +1,73 @@ +; MobileAPI calls (see lib/mobile/main.asm:_MobileAPI) + const_def 0, 2 + const MOBILEAPI_00 + const MOBILEAPI_01 + const MOBILEAPI_02 + const MOBILEAPI_03 + const MOBILEAPI_04 + const MOBILEAPI_05 + const MOBILEAPI_06 + const MOBILEAPI_07 + const MOBILEAPI_08 + const MOBILEAPI_09 + const MOBILEAPI_0A + const MOBILEAPI_0B + const MOBILEAPI_0C + const MOBILEAPI_0D + const MOBILEAPI_0E + const MOBILEAPI_0F + const MOBILEAPI_10 + const MOBILEAPI_11 + const MOBILEAPI_12 + const MOBILEAPI_13 + const MOBILEAPI_14 + const MOBILEAPI_15 + const MOBILEAPI_16 + const MOBILEAPI_17 + const MOBILEAPI_SETTIMER + const MOBILEAPI_TELEPHONESTATUS + const MOBILEAPI_1A + const MOBILEAPI_1B + const MOBILEAPI_1C + const MOBILEAPI_1D + const MOBILEAPI_1E + const MOBILEAPI_1F + const MOBILEAPI_20 + const MOBILEAPI_21 + +; MobileEZChatCategoryPointers indexes (see mobile/fixed_words.asm) + const_def + const EZCHAT_POKEMON + const EZCHAT_TYPES + const EZCHAT_GREETINGS + const EZCHAT_PEOPLE + const EZCHAT_BATTLE + const EZCHAT_EXCLAMATIONS + const EZCHAT_CONVERSATION + const EZCHAT_FEELINGS + const EZCHAT_CONDITIONS + const EZCHAT_LIFE + const EZCHAT_HOBBIES + const EZCHAT_ACTIONS + const EZCHAT_TIME + const EZCHAT_FAREWELLS + const EZCHAT_THISANDTHAT + +DEF NUM_KANA EQU 45 ; length of SortedPokemon table (see mobile/fixed_words.asm) + +DEF MOBILE_LOGIN_PASSWORD_LENGTH EQU 17 +DEF MOBILE_PHONE_NUMBER_LENGTH EQU 20 + +; Maximum amount of time allowed for mobile battles each day +DEF MOBILE_BATTLE_ALLOWED_SECONDS EQU 0 +DEF MOBILE_BATTLE_ALLOWED_MINUTES EQU 10 + +; Trade corner request size +; DION addr $1e + request $8 + Name $5 +; + party struct $30 + OT $5 + NICK $5 +; + JP Mail struct $2a +DEF MOBILE_EMAIL_LENGTH EQU $1e +DEF TRADE_CORNER_REQUEST_LENGTH EQU $8f + +DEF EASY_CHAT_MESSAGE_WORD_COUNT EQU 6 +DEF EASY_CHAT_MESSAGE_LENGTH EQU EASY_CHAT_MESSAGE_WORD_COUNT * 2 ; every word uses 2 bytes diff --git a/constants/move_constants.asm b/constants/move_constants.asm new file mode 100644 index 0000000..181bf36 --- /dev/null +++ b/constants/move_constants.asm @@ -0,0 +1,304 @@ +; move ids +; indexes for: +; - Moves (see data/moves/moves.asm) +; - MoveNames (see data/moves/names.asm) +; - MoveDescriptions (see data/moves/descriptions.asm) +; - BattleAnimations (see data/moves/animations.asm) + const_def + const NO_MOVE ; 00 + const POUND ; 01 + const KARATE_CHOP ; 02 + const DOUBLESLAP ; 03 + const COMET_PUNCH ; 04 + const MEGA_PUNCH ; 05 + const PAY_DAY ; 06 + const FIRE_PUNCH ; 07 + const ICE_PUNCH ; 08 + const THUNDERPUNCH ; 09 + const SCRATCH ; 0a + const VICEGRIP ; 0b + const GUILLOTINE ; 0c + const RAZOR_WIND ; 0d + const SWORDS_DANCE ; 0e + const CUT ; 0f + const GUST ; 10 + const WING_ATTACK ; 11 + const WHIRLWIND ; 12 + const FLY ; 13 + const BIND ; 14 + const SLAM ; 15 + const VINE_WHIP ; 16 + const STOMP ; 17 + const DOUBLE_KICK ; 18 + const MEGA_KICK ; 19 + const JUMP_KICK ; 1a + const ROLLING_KICK ; 1b + const SAND_ATTACK ; 1c + const HEADBUTT ; 1d + const HORN_ATTACK ; 1e + const FURY_ATTACK ; 1f + const HORN_DRILL ; 20 + const TACKLE ; 21 + const BODY_SLAM ; 22 + const WRAP ; 23 + const TAKE_DOWN ; 24 + const THRASH ; 25 + const DOUBLE_EDGE ; 26 + const TAIL_WHIP ; 27 + const POISON_STING ; 28 + const TWINEEDLE ; 29 + const PIN_MISSILE ; 2a + const LEER ; 2b + const BITE ; 2c + const GROWL ; 2d + const ROAR ; 2e + const SING ; 2f + const SUPERSONIC ; 30 + const SONICBOOM ; 31 + const DISABLE ; 32 + const ACID ; 33 + const EMBER ; 34 + const FLAMETHROWER ; 35 + const MIST ; 36 + const WATER_GUN ; 37 + const HYDRO_PUMP ; 38 + const SURF ; 39 + const ICE_BEAM ; 3a + const BLIZZARD ; 3b + const PSYBEAM ; 3c + const BUBBLEBEAM ; 3d + const AURORA_BEAM ; 3e + const HYPER_BEAM ; 3f + const PECK ; 40 + const DRILL_PECK ; 41 + const SUBMISSION ; 42 + const LOW_KICK ; 43 + const COUNTER ; 44 + const SEISMIC_TOSS ; 45 + const STRENGTH ; 46 + const ABSORB ; 47 + const MEGA_DRAIN ; 48 + const LEECH_SEED ; 49 + const GROWTH ; 4a + const RAZOR_LEAF ; 4b + const SOLARBEAM ; 4c + const POISONPOWDER ; 4d + const STUN_SPORE ; 4e + const SLEEP_POWDER ; 4f + const PETAL_DANCE ; 50 + const STRING_SHOT ; 51 + const DRAGON_RAGE ; 52 + const FIRE_SPIN ; 53 + const THUNDERSHOCK ; 54 + const THUNDERBOLT ; 55 + const THUNDER_WAVE ; 56 + const THUNDER ; 57 + const ROCK_THROW ; 58 + const EARTHQUAKE ; 59 + const FISSURE ; 5a + const DIG ; 5b + const TOXIC ; 5c + const CONFUSION ; 5d + const PSYCHIC_M ; 5e + const HYPNOSIS ; 5f + const MEDITATE ; 60 + const AGILITY ; 61 + const QUICK_ATTACK ; 62 + const RAGE ; 63 + const TELEPORT ; 64 + const NIGHT_SHADE ; 65 + const MIMIC ; 66 + const SCREECH ; 67 + const DOUBLE_TEAM ; 68 + const RECOVER ; 69 + const HARDEN ; 6a + const MINIMIZE ; 6b + const SMOKESCREEN ; 6c + const CONFUSE_RAY ; 6d + const WITHDRAW ; 6e + const DEFENSE_CURL ; 6f + const BARRIER ; 70 + const LIGHT_SCREEN ; 71 + const HAZE ; 72 + const REFLECT ; 73 + const FOCUS_ENERGY ; 74 + const BIDE ; 75 + const METRONOME ; 76 + const MIRROR_MOVE ; 77 + const SELFDESTRUCT ; 78 + const EGG_BOMB ; 79 + const LICK ; 7a + const SMOG ; 7b + const SLUDGE ; 7c + const BONE_CLUB ; 7d + const FIRE_BLAST ; 7e + const WATERFALL ; 7f + const CLAMP ; 80 + const SWIFT ; 81 + const SKULL_BASH ; 82 + const SPIKE_CANNON ; 83 + const CONSTRICT ; 84 + const AMNESIA ; 85 + const KINESIS ; 86 + const SOFTBOILED ; 87 + const HI_JUMP_KICK ; 88 + const GLARE ; 89 + const DREAM_EATER ; 8a + const POISON_GAS ; 8b + const BARRAGE ; 8c + const LEECH_LIFE ; 8d + const LOVELY_KISS ; 8e + const SKY_ATTACK ; 8f + const TRANSFORM ; 90 + const BUBBLE ; 91 + const DIZZY_PUNCH ; 92 + const SPORE ; 93 + const FLASH ; 94 + const PSYWAVE ; 95 + const SPLASH ; 96 + const ACID_ARMOR ; 97 + const CRABHAMMER ; 98 + const EXPLOSION ; 99 + const FURY_SWIPES ; 9a + const BONEMERANG ; 9b + const REST ; 9c + const ROCK_SLIDE ; 9d + const HYPER_FANG ; 9e + const SHARPEN ; 9f + const CONVERSION ; a0 + const TRI_ATTACK ; a1 + const SUPER_FANG ; a2 + const SLASH ; a3 + const SUBSTITUTE ; a4 + const STRUGGLE ; a5 + const SKETCH ; a6 + const TRIPLE_KICK ; a7 + const THIEF ; a8 + const SPIDER_WEB ; a9 + const MIND_READER ; aa + const NIGHTMARE ; ab + const FLAME_WHEEL ; ac + const SNORE ; ad + const CURSE ; ae + const FLAIL ; af + const CONVERSION2 ; b0 + const AEROBLAST ; b1 + const COTTON_SPORE ; b2 + const REVERSAL ; b3 + const SPITE ; b4 + const POWDER_SNOW ; b5 + const PROTECT ; b6 + const MACH_PUNCH ; b7 + const SCARY_FACE ; b8 + const FAINT_ATTACK ; b9 + const SWEET_KISS ; ba + const BELLY_DRUM ; bb + const SLUDGE_BOMB ; bc + const MUD_SLAP ; bd + const OCTAZOOKA ; be + const SPIKES ; bf + const ZAP_CANNON ; c0 + const FORESIGHT ; c1 + const DESTINY_BOND ; c2 + const PERISH_SONG ; c3 + const ICY_WIND ; c4 + const DETECT ; c5 + const BONE_RUSH ; c6 + const LOCK_ON ; c7 + const OUTRAGE ; c8 + const SANDSTORM ; c9 + const GIGA_DRAIN ; ca + const ENDURE ; cb + const CHARM ; cc + const ROLLOUT ; cd + const FALSE_SWIPE ; ce + const SWAGGER ; cf + const MILK_DRINK ; d0 + const SPARK ; d1 + const FURY_CUTTER ; d2 + const STEEL_WING ; d3 + const MEAN_LOOK ; d4 + const ATTRACT ; d5 + const SLEEP_TALK ; d6 + const HEAL_BELL ; d7 + const RETURN ; d8 + const PRESENT ; d9 + const FRUSTRATION ; da + const SAFEGUARD ; db + const PAIN_SPLIT ; dc + const SACRED_FIRE ; dd + const MAGNITUDE ; de + const DYNAMICPUNCH ; df + const MEGAHORN ; e0 + const DRAGONBREATH ; e1 + const BATON_PASS ; e2 + const ENCORE ; e3 + const PURSUIT ; e4 + const RAPID_SPIN ; e5 + const SWEET_SCENT ; e6 + const IRON_TAIL ; e7 + const METAL_CLAW ; e8 + const VITAL_THROW ; e9 + const MORNING_SUN ; ea + const SYNTHESIS ; eb + const MOONLIGHT ; ec + const HIDDEN_POWER ; ed + const CROSS_CHOP ; ee + const TWISTER ; ef + const RAIN_DANCE ; f0 + const SUNNY_DAY ; f1 + const CRUNCH ; f2 + const MIRROR_COAT ; f3 + const PSYCH_UP ; f4 + const EXTREMESPEED ; f5 + const ANCIENTPOWER ; f6 + const SHADOW_BALL ; f7 + const FUTURE_SIGHT ; f8 + const ROCK_SMASH ; f9 + const WHIRLPOOL ; fa + const BEAT_UP ; fb +DEF NUM_ATTACKS EQU const_value - 1 + + if NUM_ATTACKS > $3fff + fail "Too many moves defined!" + endc + +; Battle animations use the same constants as the moves + const ANIM_SWEET_SCENT_2 ; fc +; Animations with negative IDs will play even when animations are disabled + const_def -1, -1 + const ANIM_HIT_CONFUSION ; -1 (ffff) + const ANIM_SHAKE ; -2 (fffe) + const ANIM_WOBBLE ; -3 (fffd) + const ANIM_PLAYER_DAMAGE ; -4 (fffc) + const ANIM_PLAYER_STAT_DOWN ; -5 (fffb) + const ANIM_ENEMY_STAT_DOWN ; -6 (fffa) + const ANIM_ENEMY_DAMAGE ; -7 (fff9) + const ANIM_MISS ; -8 (fff8) +; battle anims + const ANIM_IN_WHIRLPOOL ; -9 (fff7) + const ANIM_IN_NIGHTMARE ; -a (fff6) + const ANIM_IN_SANDSTORM ; -b (fff5) + const ANIM_IN_LOVE ; -c (fff4) + const ANIM_PAR ; -d (fff3) + const ANIM_FRZ ; -e (fff2) + const ANIM_SAP ; -f (fff1) + const ANIM_PSN ; -10 (fff0) + const ANIM_BRN ; -11 (ffef) + const ANIM_SLP ; -12 (ffee) + const ANIM_CONFUSED ; -13 (ffed) + const ANIM_RETURN_MON ; -14 (ffec) + const ANIM_SEND_OUT_MON ; -15 (ffeb) + const ANIM_THROW_POKE_BALL ; -16 (ffea) +DEF NUM_BATTLE_ANIMS EQU -const_value - 1 + +; wNumHits uses offsets from ANIM_MISS + const_def + const BATTLEANIM_NONE + const BATTLEANIM_ENEMY_DAMAGE + const BATTLEANIM_ENEMY_STAT_DOWN + const BATTLEANIM_PLAYER_STAT_DOWN + const BATTLEANIM_PLAYER_DAMAGE + const BATTLEANIM_WOBBLE + const BATTLEANIM_SHAKE + const BATTLEANIM_HIT_CONFUSION diff --git a/constants/move_effect_constants.asm b/constants/move_effect_constants.asm new file mode 100644 index 0000000..0477a6b --- /dev/null +++ b/constants/move_effect_constants.asm @@ -0,0 +1,160 @@ +; MoveEffectsPointers indexes (see data/moves/effects_pointers.asm) + const_def + const EFFECT_NORMAL_HIT + const EFFECT_SLEEP + const EFFECT_POISON_HIT + const EFFECT_LEECH_HIT + const EFFECT_BURN_HIT + const EFFECT_FREEZE_HIT + const EFFECT_PARALYZE_HIT + const EFFECT_SELFDESTRUCT + const EFFECT_DREAM_EATER + const EFFECT_MIRROR_MOVE + const EFFECT_ATTACK_UP + const EFFECT_DEFENSE_UP + const EFFECT_SPEED_UP + const EFFECT_SP_ATK_UP + const EFFECT_SP_DEF_UP + const EFFECT_ACCURACY_UP + const EFFECT_EVASION_UP + const EFFECT_ALWAYS_HIT + const EFFECT_ATTACK_DOWN + const EFFECT_DEFENSE_DOWN + const EFFECT_SPEED_DOWN + const EFFECT_SP_ATK_DOWN + const EFFECT_SP_DEF_DOWN + const EFFECT_ACCURACY_DOWN + const EFFECT_EVASION_DOWN + const EFFECT_RESET_STATS + const EFFECT_BIDE + const EFFECT_RAMPAGE + const EFFECT_FORCE_SWITCH + const EFFECT_MULTI_HIT + const EFFECT_CONVERSION + const EFFECT_FLINCH_HIT + const EFFECT_HEAL + const EFFECT_TOXIC + const EFFECT_PAY_DAY + const EFFECT_LIGHT_SCREEN + const EFFECT_TRI_ATTACK + const EFFECT_UNUSED_25 + const EFFECT_OHKO + const EFFECT_RAZOR_WIND + const EFFECT_SUPER_FANG + const EFFECT_STATIC_DAMAGE + const EFFECT_TRAP_TARGET + const EFFECT_UNUSED_2B + const EFFECT_DOUBLE_HIT + const EFFECT_JUMP_KICK + const EFFECT_MIST + const EFFECT_FOCUS_ENERGY + const EFFECT_RECOIL_HIT + const EFFECT_CONFUSE + const EFFECT_ATTACK_UP_2 + const EFFECT_DEFENSE_UP_2 + const EFFECT_SPEED_UP_2 + const EFFECT_SP_ATK_UP_2 + const EFFECT_SP_DEF_UP_2 + const EFFECT_ACCURACY_UP_2 + const EFFECT_EVASION_UP_2 + const EFFECT_TRANSFORM + const EFFECT_ATTACK_DOWN_2 + const EFFECT_DEFENSE_DOWN_2 + const EFFECT_SPEED_DOWN_2 + const EFFECT_SP_ATK_DOWN_2 + const EFFECT_SP_DEF_DOWN_2 + const EFFECT_ACCURACY_DOWN_2 + const EFFECT_EVASION_DOWN_2 + const EFFECT_REFLECT + const EFFECT_POISON + const EFFECT_PARALYZE + const EFFECT_ATTACK_DOWN_HIT + const EFFECT_DEFENSE_DOWN_HIT + const EFFECT_SPEED_DOWN_HIT + const EFFECT_SP_ATK_DOWN_HIT + const EFFECT_SP_DEF_DOWN_HIT + const EFFECT_ACCURACY_DOWN_HIT + const EFFECT_EVASION_DOWN_HIT + const EFFECT_SKY_ATTACK + const EFFECT_CONFUSE_HIT + const EFFECT_POISON_MULTI_HIT + const EFFECT_UNUSED_4E + const EFFECT_SUBSTITUTE + const EFFECT_HYPER_BEAM + const EFFECT_RAGE + const EFFECT_MIMIC + const EFFECT_METRONOME + const EFFECT_LEECH_SEED + const EFFECT_SPLASH + const EFFECT_DISABLE + const EFFECT_LEVEL_DAMAGE + const EFFECT_PSYWAVE + const EFFECT_COUNTER + const EFFECT_ENCORE + const EFFECT_PAIN_SPLIT + const EFFECT_SNORE + const EFFECT_CONVERSION2 + const EFFECT_LOCK_ON + const EFFECT_SKETCH + const EFFECT_DEFROST_OPPONENT + const EFFECT_SLEEP_TALK + const EFFECT_DESTINY_BOND + const EFFECT_REVERSAL + const EFFECT_SPITE + const EFFECT_FALSE_SWIPE + const EFFECT_HEAL_BELL + const EFFECT_PRIORITY_HIT + const EFFECT_TRIPLE_KICK + const EFFECT_THIEF + const EFFECT_MEAN_LOOK + const EFFECT_NIGHTMARE + const EFFECT_FLAME_WHEEL + const EFFECT_CURSE + const EFFECT_UNUSED_6E + const EFFECT_PROTECT + const EFFECT_SPIKES + const EFFECT_FORESIGHT + const EFFECT_PERISH_SONG + const EFFECT_SANDSTORM + const EFFECT_ENDURE + const EFFECT_ROLLOUT + const EFFECT_SWAGGER + const EFFECT_FURY_CUTTER + const EFFECT_ATTRACT + const EFFECT_RETURN + const EFFECT_PRESENT + const EFFECT_FRUSTRATION + const EFFECT_SAFEGUARD + const EFFECT_SACRED_FIRE + const EFFECT_MAGNITUDE + const EFFECT_BATON_PASS + const EFFECT_PURSUIT + const EFFECT_RAPID_SPIN + const EFFECT_UNUSED_82 + const EFFECT_UNUSED_83 + const EFFECT_MORNING_SUN + const EFFECT_SYNTHESIS + const EFFECT_MOONLIGHT + const EFFECT_HIDDEN_POWER + const EFFECT_RAIN_DANCE + const EFFECT_SUNNY_DAY + const EFFECT_DEFENSE_UP_HIT + const EFFECT_ATTACK_UP_HIT + const EFFECT_ALL_UP_HIT + const EFFECT_FAKE_OUT + const EFFECT_BELLY_DRUM + const EFFECT_PSYCH_UP + const EFFECT_MIRROR_COAT + const EFFECT_SKULL_BASH + const EFFECT_TWISTER + const EFFECT_EARTHQUAKE + const EFFECT_FUTURE_SIGHT + const EFFECT_GUST + const EFFECT_STOMP + const EFFECT_SOLARBEAM + const EFFECT_THUNDER + const EFFECT_TELEPORT + const EFFECT_BEAT_UP + const EFFECT_FLY + const EFFECT_DEFENSE_CURL +DEF NUM_MOVE_EFFECTS EQU const_value diff --git a/constants/music_constants.asm b/constants/music_constants.asm new file mode 100644 index 0000000..d64fa57 --- /dev/null +++ b/constants/music_constants.asm @@ -0,0 +1,119 @@ +; song ids +; Music indexes (see audio/music_pointers.asm) + const_def + const MUSIC_NONE ; 00 + const MUSIC_TITLE ; 01 + const MUSIC_ROUTE_1 ; 02 + const MUSIC_ROUTE_3 ; 03 + const MUSIC_ROUTE_12 ; 04 + const MUSIC_MAGNET_TRAIN ; 05 + const MUSIC_KANTO_GYM_LEADER_BATTLE ; 06 + const MUSIC_KANTO_TRAINER_BATTLE ; 07 + const MUSIC_KANTO_WILD_BATTLE ; 08 + const MUSIC_POKEMON_CENTER ; 09 + const MUSIC_HIKER_ENCOUNTER ; 0a + const MUSIC_LASS_ENCOUNTER ; 0b + const MUSIC_OFFICER_ENCOUNTER ; 0c + const MUSIC_HEAL ; 0d + const MUSIC_LAVENDER_TOWN ; 0e + const MUSIC_ROUTE_2 ; 0f + const MUSIC_MT_MOON ; 10 + const MUSIC_SHOW_ME_AROUND ; 11 + const MUSIC_GAME_CORNER ; 12 + const MUSIC_BICYCLE ; 13 + const MUSIC_HALL_OF_FAME ; 14 + const MUSIC_VIRIDIAN_CITY ; 15 + const MUSIC_CELADON_CITY ; 16 + const MUSIC_TRAINER_VICTORY ; 17 + const MUSIC_WILD_VICTORY ; 18 + const MUSIC_GYM_VICTORY ; 19 + const MUSIC_MT_MOON_SQUARE ; 1a + const MUSIC_GYM ; 1b + const MUSIC_PALLET_TOWN ; 1c + const MUSIC_POKEMON_TALK ; 1d + const MUSIC_PROF_OAK ; 1e + const MUSIC_RIVAL_ENCOUNTER ; 1f + const MUSIC_RIVAL_AFTER ; 20 + const MUSIC_SURF ; 21 + const MUSIC_EVOLUTION ; 22 + const MUSIC_NATIONAL_PARK ; 23 + const MUSIC_CREDITS ; 24 + const MUSIC_AZALEA_TOWN ; 25 + const MUSIC_CHERRYGROVE_CITY ; 26 + const MUSIC_KIMONO_ENCOUNTER ; 27 + const MUSIC_UNION_CAVE ; 28 + const MUSIC_JOHTO_WILD_BATTLE ; 29 + const MUSIC_JOHTO_TRAINER_BATTLE ; 2a + const MUSIC_ROUTE_30 ; 2b + const MUSIC_ECRUTEAK_CITY ; 2c + const MUSIC_VIOLET_CITY ; 2d + const MUSIC_JOHTO_GYM_LEADER_BATTLE ; 2e + const MUSIC_CHAMPION_BATTLE ; 2f + const MUSIC_RIVAL_BATTLE ; 30 + const MUSIC_ROCKET_BATTLE ; 31 + const MUSIC_PROF_ELM ; 32 + const MUSIC_DARK_CAVE ; 33 + const MUSIC_ROUTE_29 ; 34 + const MUSIC_ROUTE_36 ; 35 + const MUSIC_SS_AQUA ; 36 + const MUSIC_YOUNGSTER_ENCOUNTER ; 37 + const MUSIC_BEAUTY_ENCOUNTER ; 38 + const MUSIC_ROCKET_ENCOUNTER ; 39 + const MUSIC_POKEMANIAC_ENCOUNTER ; 3a + const MUSIC_SAGE_ENCOUNTER ; 3b + const MUSIC_NEW_BARK_TOWN ; 3c + const MUSIC_GOLDENROD_CITY ; 3d + const MUSIC_VERMILION_CITY ; 3e + const MUSIC_POKEMON_CHANNEL ; 3f + const MUSIC_POKE_FLUTE_CHANNEL ; 40 + const MUSIC_TIN_TOWER ; 41 + const MUSIC_SPROUT_TOWER ; 42 + const MUSIC_BURNED_TOWER ; 43 + const MUSIC_LIGHTHOUSE ; 44 + const MUSIC_LAKE_OF_RAGE ; 45 + const MUSIC_INDIGO_PLATEAU ; 46 + const MUSIC_ROUTE_37 ; 47 + const MUSIC_ROCKET_HIDEOUT ; 48 + const MUSIC_DRAGONS_DEN ; 49 + const MUSIC_JOHTO_WILD_BATTLE_NIGHT ; 4a + const MUSIC_RUINS_OF_ALPH_RADIO ; 4b + const MUSIC_CAPTURE ; 4c + const MUSIC_ROUTE_26 ; 4d + const MUSIC_MOM ; 4e + const MUSIC_VICTORY_ROAD ; 4f + const MUSIC_POKEMON_LULLABY ; 50 + const MUSIC_POKEMON_MARCH ; 51 + const MUSIC_GS_OPENING ; 52 + const MUSIC_GS_OPENING_2 ; 53 + const MUSIC_MAIN_MENU ; 54 + const MUSIC_RUINS_OF_ALPH_INTERIOR ; 55 + const MUSIC_ROCKET_OVERTURE ; 56 + const MUSIC_DANCING_HALL ; 57 + const MUSIC_BUG_CATCHING_CONTEST_RANKING ; 58 + const MUSIC_BUG_CATCHING_CONTEST ; 59 + const MUSIC_LAKE_OF_RAGE_ROCKET_RADIO ; 5a + const MUSIC_PRINTER ; 5b + const MUSIC_POST_CREDITS ; 5c +; new to Crystal + const MUSIC_CLAIR ; 5d + const MUSIC_MOBILE_ADAPTER_MENU ; 5e + const MUSIC_MOBILE_ADAPTER ; 5f + const MUSIC_BUENAS_PASSWORD ; 60 + const MUSIC_MYSTICALMAN_ENCOUNTER ; 61 + const MUSIC_CRYSTAL_OPENING ; 62 + const MUSIC_BATTLE_TOWER_THEME ; 63 + const MUSIC_SUICUNE_BATTLE ; 64 + const MUSIC_BATTLE_TOWER_LOBBY ; 65 + const MUSIC_MOBILE_CENTER ; 66 +DEF NUM_MUSIC_SONGS EQU const_value + +; GetMapMusic picks music for this value (see home/map.asm) +DEF MUSIC_MAHOGANY_MART EQU $64 + +; ExitPokegearRadio_HandleMusic uses these values +DEF RESTART_MAP_MUSIC EQU $fe +DEF ENTER_MAP_MUSIC EQU $ff + +; GetMapMusic picks music for this bit flag +DEF RADIO_TOWER_MUSIC_F EQU 7 +DEF RADIO_TOWER_MUSIC EQU 1 << RADIO_TOWER_MUSIC_F diff --git a/constants/npc_trade_constants.asm b/constants/npc_trade_constants.asm new file mode 100644 index 0000000..56f630b --- /dev/null +++ b/constants/npc_trade_constants.asm @@ -0,0 +1,47 @@ +; npctrade struct members (see data/events/npc_trades.asm) +rsreset +DEF NPCTRADE_DIALOG rb +DEF NPCTRADE_GIVEMON rw +DEF NPCTRADE_GETMON rw +DEF NPCTRADE_NICKNAME rb MON_NAME_LENGTH +DEF NPCTRADE_DVS rw +DEF NPCTRADE_ITEM rb +DEF NPCTRADE_OT_ID rw +DEF NPCTRADE_OT_NAME rb PLAYER_NAME_LENGTH +DEF NPCTRADE_GENDER rb + rb_skip 2 +DEF NPCTRADE_STRUCT_LENGTH EQU _RS + +; NPCTrades indexes (see data/events/npc_trades.asm) + const_def + const NPC_TRADE_MIKE ; 0 + const NPC_TRADE_KYLE ; 1 + const NPC_TRADE_TIM ; 2 + const NPC_TRADE_EMY ; 3 + const NPC_TRADE_CHRIS ; 4 + const NPC_TRADE_KIM ; 5 + const NPC_TRADE_FOREST ; 6 +DEF NUM_NPC_TRADES EQU const_value + +; trade gender limits + const_def + const TRADE_GENDER_EITHER + const TRADE_GENDER_MALE + const TRADE_GENDER_FEMALE + +; TradeTexts indexes (see engine/events/npc_trade.asm) + +; trade dialogs + const_def + const TRADE_DIALOG_INTRO + const TRADE_DIALOG_CANCEL + const TRADE_DIALOG_WRONG + const TRADE_DIALOG_COMPLETE + const TRADE_DIALOG_AFTER + +; trade dialog sets + const_def + const TRADE_DIALOGSET_COLLECTOR + const TRADE_DIALOGSET_HAPPY + const TRADE_DIALOGSET_NEWBIE + const TRADE_DIALOGSET_GIRL diff --git a/constants/phone_constants.asm b/constants/phone_constants.asm new file mode 100644 index 0000000..0600dc2 --- /dev/null +++ b/constants/phone_constants.asm @@ -0,0 +1,72 @@ +; PhoneContacts indexes (see data/phone/phone_contacts.asm) + const_def + const PHONE_00 + const PHONE_MOM + const PHONE_OAK + const PHONE_BILL + const PHONE_ELM + const PHONE_SCHOOLBOY_JACK + const PHONE_POKEFAN_BEVERLY + const PHONE_SAILOR_HUEY + const_skip + const_skip + const_skip + const PHONE_COOLTRAINERM_GAVEN + const PHONE_COOLTRAINERF_BETH + const PHONE_BIRDKEEPER_JOSE + const PHONE_COOLTRAINERF_REENA + const PHONE_YOUNGSTER_JOEY + const PHONE_BUG_CATCHER_WADE + const PHONE_FISHER_RALPH + const PHONE_PICNICKER_LIZ + const PHONE_HIKER_ANTHONY + const PHONE_CAMPER_TODD + const PHONE_PICNICKER_GINA + const PHONE_JUGGLER_IRWIN + const PHONE_BUG_CATCHER_ARNIE + const PHONE_SCHOOLBOY_ALAN + const_skip + const PHONE_LASS_DANA + const PHONE_SCHOOLBOY_CHAD + const PHONE_POKEFANM_DEREK + const PHONE_FISHER_TULLY + const PHONE_POKEMANIAC_BRENT + const PHONE_PICNICKER_TIFFANY + const PHONE_BIRDKEEPER_VANCE + const PHONE_FISHER_WILTON + const PHONE_BLACKBELT_KENJI + const PHONE_HIKER_PARRY + const PHONE_PICNICKER_ERIN + const PHONE_BUENA +DEF NUM_PHONE_CONTACTS EQU const_value - 1 + +; SpecialPhoneCallList indexes (see data/phone/special_calls.asm) + const_def + const SPECIALCALL_NONE + const SPECIALCALL_POKERUS + const SPECIALCALL_ROBBED + const SPECIALCALL_ASSISTANT + const SPECIALCALL_WEIRDBROADCAST + const SPECIALCALL_SSTICKET + const SPECIALCALL_BIKESHOP + const SPECIALCALL_WORRIED + const SPECIALCALL_MASTERBALL +DEF NUM_SPECIALCALLS EQU const_value - 1 +DEF SPECIALCALL_SIZE EQU 6 + +; phone struct members +rsreset +DEF PHONE_CONTACT_TRAINER_CLASS rb +DEF PHONE_CONTACT_TRAINER_NUMBER rb +DEF PHONE_CONTACT_MAP_GROUP rb +DEF PHONE_CONTACT_MAP_NUMBER rb +DEF PHONE_CONTACT_SCRIPT1_TIME rb +DEF PHONE_CONTACT_SCRIPT1_BANK rb +DEF PHONE_CONTACT_SCRIPT1_ADDR rw +DEF PHONE_CONTACT_SCRIPT2_TIME rb +DEF PHONE_CONTACT_SCRIPT2_BANK rb +DEF PHONE_CONTACT_SCRIPT2_ADDR rw +DEF PHONE_CONTACT_SIZE EQU _RS + +; maximum number of pokegear contacts +DEF CONTACT_LIST_SIZE EQU 10 diff --git a/constants/pokemon_constants.asm b/constants/pokemon_constants.asm new file mode 100644 index 0000000..2f9a2da --- /dev/null +++ b/constants/pokemon_constants.asm @@ -0,0 +1,321 @@ +; pokemon ids +; indexes for: +; - PokemonNames (see data/pokemon/names.asm) +; - BaseData (see data/pokemon/base_stats.asm) +; - EvosAttacksPointers (see data/pokemon/evos_attacks_pointers.asm) +; - EggMovePointers (see data/pokemon/egg_move_pointers.asm) +; - PokemonCries (see data/pokemon/cries.asm) +; - MonMenuIcons (see data/pokemon/menu_icons.asm) +; - PokemonPicPointers (see data/pokemon/pic_pointers.asm) +; - PokemonPalettes (see data/pokemon/palettes.asm) +; - PokedexDataPointerTable (see data/pokemon/dex_entry_pointers.asm) +; - AlphabeticalPokedexOrder (see data/pokemon/dex_order_alpha.asm) +; - NewPokedexOrder (see data/pokemon/dex_order_new.asm) +; - Pokered_MonIndices (see data/pokemon/gen1_order.asm) +; - Footprints (see gfx/footprints.asm) +; - AnimationPointers (see gfx/pokemon/anim_pointers.asm) +; - AnimationIdlePointers (see gfx/pokemon/idle_pointers.asm) +; - BitmasksPointers (see gfx/pokemon/bitmask_pointers.asm) +; - FramesPointers (see gfx/pokemon/frame_pointers.asm) +; - EZChat_SortedPokemon (see data/pokemon/ezchat_order.asm) + const_def 1 + const BULBASAUR ; 01 + const IVYSAUR ; 02 + const VENUSAUR ; 03 + const CHARMANDER ; 04 + const CHARMELEON ; 05 + const CHARIZARD ; 06 + const SQUIRTLE ; 07 + const WARTORTLE ; 08 + const BLASTOISE ; 09 + const CATERPIE ; 0a + const METAPOD ; 0b + const BUTTERFREE ; 0c + const WEEDLE ; 0d + const KAKUNA ; 0e + const BEEDRILL ; 0f + const PIDGEY ; 10 + const PIDGEOTTO ; 11 + const PIDGEOT ; 12 + const RATTATA ; 13 + const RATICATE ; 14 + const SPEAROW ; 15 + const FEAROW ; 16 + const EKANS ; 17 + const ARBOK ; 18 + const PIKACHU ; 19 + const RAICHU ; 1a + const SANDSHREW ; 1b + const SANDSLASH ; 1c + const NIDORAN_F ; 1d + const NIDORINA ; 1e + const NIDOQUEEN ; 1f + const NIDORAN_M ; 20 + const NIDORINO ; 21 + const NIDOKING ; 22 + const CLEFAIRY ; 23 + const CLEFABLE ; 24 + const VULPIX ; 25 + const NINETALES ; 26 + const JIGGLYPUFF ; 27 + const WIGGLYTUFF ; 28 + const ZUBAT ; 29 + const GOLBAT ; 2a + const ODDISH ; 2b + const GLOOM ; 2c + const VILEPLUME ; 2d + const PARAS ; 2e + const PARASECT ; 2f + const VENONAT ; 30 + const VENOMOTH ; 31 + const DIGLETT ; 32 + const DUGTRIO ; 33 + const MEOWTH ; 34 + const PERSIAN ; 35 + const PSYDUCK ; 36 + const GOLDUCK ; 37 + const MANKEY ; 38 + const PRIMEAPE ; 39 + const GROWLITHE ; 3a + const ARCANINE ; 3b + const POLIWAG ; 3c + const POLIWHIRL ; 3d + const POLIWRATH ; 3e + const ABRA ; 3f + const KADABRA ; 40 + const ALAKAZAM ; 41 + const MACHOP ; 42 + const MACHOKE ; 43 + const MACHAMP ; 44 + const BELLSPROUT ; 45 + const WEEPINBELL ; 46 + const VICTREEBEL ; 47 + const TENTACOOL ; 48 + const TENTACRUEL ; 49 + const GEODUDE ; 4a + const GRAVELER ; 4b + const GOLEM ; 4c + const PONYTA ; 4d + const RAPIDASH ; 4e + const SLOWPOKE ; 4f + const SLOWBRO ; 50 + const MAGNEMITE ; 51 + const MAGNETON ; 52 + const FARFETCH_D ; 53 + const DODUO ; 54 + const DODRIO ; 55 + const SEEL ; 56 + const DEWGONG ; 57 + const GRIMER ; 58 + const MUK ; 59 + const SHELLDER ; 5a + const CLOYSTER ; 5b + const GASTLY ; 5c + const HAUNTER ; 5d + const GENGAR ; 5e + const ONIX ; 5f + const DROWZEE ; 60 + const HYPNO ; 61 + const KRABBY ; 62 + const KINGLER ; 63 + const VOLTORB ; 64 + const ELECTRODE ; 65 + const EXEGGCUTE ; 66 + const EXEGGUTOR ; 67 + const CUBONE ; 68 + const MAROWAK ; 69 + const HITMONLEE ; 6a + const HITMONCHAN ; 6b + const LICKITUNG ; 6c + const KOFFING ; 6d + const WEEZING ; 6e + const RHYHORN ; 6f + const RHYDON ; 70 + const CHANSEY ; 71 + const TANGELA ; 72 + const KANGASKHAN ; 73 + const HORSEA ; 74 + const SEADRA ; 75 + const GOLDEEN ; 76 + const SEAKING ; 77 + const STARYU ; 78 + const STARMIE ; 79 + const MR__MIME ; 7a + const SCYTHER ; 7b + const JYNX ; 7c + const ELECTABUZZ ; 7d + const MAGMAR ; 7e + const PINSIR ; 7f + const TAUROS ; 80 + const MAGIKARP ; 81 + const GYARADOS ; 82 + const LAPRAS ; 83 + const DITTO ; 84 + const EEVEE ; 85 + const VAPOREON ; 86 + const JOLTEON ; 87 + const FLAREON ; 88 + const PORYGON ; 89 + const OMANYTE ; 8a + const OMASTAR ; 8b + const KABUTO ; 8c + const KABUTOPS ; 8d + const AERODACTYL ; 8e + const SNORLAX ; 8f + const ARTICUNO ; 90 + const ZAPDOS ; 91 + const MOLTRES ; 92 + const DRATINI ; 93 + const DRAGONAIR ; 94 + const DRAGONITE ; 95 + const MEWTWO ; 96 + const MEW ; 97 +DEF JOHTO_POKEMON EQU const_value + const CHIKORITA ; 98 + const BAYLEEF ; 99 + const MEGANIUM ; 9a + const CYNDAQUIL ; 9b + const QUILAVA ; 9c + const TYPHLOSION ; 9d + const TOTODILE ; 9e + const CROCONAW ; 9f + const FERALIGATR ; a0 + const SENTRET ; a1 + const FURRET ; a2 + const HOOTHOOT ; a3 + const NOCTOWL ; a4 + const LEDYBA ; a5 + const LEDIAN ; a6 + const SPINARAK ; a7 + const ARIADOS ; a8 + const CROBAT ; a9 + const CHINCHOU ; aa + const LANTURN ; ab + const PICHU ; ac + const CLEFFA ; ad + const IGGLYBUFF ; ae + const TOGEPI ; af + const TOGETIC ; b0 + const NATU ; b1 + const XATU ; b2 + const MAREEP ; b3 + const FLAAFFY ; b4 + const AMPHAROS ; b5 + const BELLOSSOM ; b6 + const MARILL ; b7 + const AZUMARILL ; b8 + const SUDOWOODO ; b9 + const POLITOED ; ba + const HOPPIP ; bb + const SKIPLOOM ; bc + const JUMPLUFF ; bd + const AIPOM ; be + const SUNKERN ; bf + const SUNFLORA ; c0 + const YANMA ; c1 + const WOOPER ; c2 + const QUAGSIRE ; c3 + const ESPEON ; c4 + const UMBREON ; c5 + const MURKROW ; c6 + const SLOWKING ; c7 + const MISDREAVUS ; c8 + const UNOWN ; c9 + const WOBBUFFET ; ca + const GIRAFARIG ; cb + const PINECO ; cc + const FORRETRESS ; cd + const DUNSPARCE ; ce + const GLIGAR ; cf + const STEELIX ; d0 + const SNUBBULL ; d1 + const GRANBULL ; d2 + const QWILFISH ; d3 + const SCIZOR ; d4 + const SHUCKLE ; d5 + const HERACROSS ; d6 + const SNEASEL ; d7 + const TEDDIURSA ; d8 + const URSARING ; d9 + const SLUGMA ; da + const MAGCARGO ; db + const SWINUB ; dc + const PILOSWINE ; dd + const CORSOLA ; de + const REMORAID ; df + const OCTILLERY ; e0 + const DELIBIRD ; e1 + const MANTINE ; e2 + const SKARMORY ; e3 + const HOUNDOUR ; e4 + const HOUNDOOM ; e5 + const KINGDRA ; e6 + const PHANPY ; e7 + const DONPHAN ; e8 + const PORYGON2 ; e9 + const STANTLER ; ea + const SMEARGLE ; eb + const TYROGUE ; ec + const HITMONTOP ; ed + const SMOOCHUM ; ee + const ELEKID ; ef + const MAGBY ; f0 + const MILTANK ; f1 + const BLISSEY ; f2 + const RAIKOU ; f3 + const ENTEI ; f4 + const SUICUNE ; f5 + const LARVITAR ; f6 + const PUPITAR ; f7 + const TYRANITAR ; f8 + const LUGIA ; f9 + const HO_OH ; fa + const CELEBI ; fb +DEF NUM_POKEMON EQU const_value - 1 + +DEF EGG EQU -3 + +; limits: +; 999: everything that prints dex counts +; 1407: size of wPokedexOrder +; 4095: hard limit; would require serious redesign to increase +if NUM_POKEMON > 999 + fail "Too many Pokémon defined!" +endc + +; Unown forms +; indexes for: +; - UnownWords (see data/pokemon/unown_words.asm) +; - UnownPicPointers (see data/pokemon/unown_pic_pointers.asm) +; - UnownAnimationPointers (see gfx/pokemon/unown_anim_pointers.asm) +; - UnownAnimationIdlePointers (see gfx/pokemon/unown_idle_pointers.asm) +; - UnownBitmasksPointers (see gfx/pokemon/unown_bitmask_pointers.asm) +; - UnownFramesPointers (see gfx/pokemon/unown_frame_pointers.asm) + const_def 1 + const UNOWN_A ; 1 + const UNOWN_B ; 2 + const UNOWN_C ; 3 + const UNOWN_D ; 4 + const UNOWN_E ; 5 + const UNOWN_F ; 6 + const UNOWN_G ; 7 + const UNOWN_H ; 8 + const UNOWN_I ; 9 + const UNOWN_J ; 10 + const UNOWN_K ; 11 + const UNOWN_L ; 12 + const UNOWN_M ; 13 + const UNOWN_N ; 14 + const UNOWN_O ; 15 + const UNOWN_P ; 16 + const UNOWN_Q ; 17 + const UNOWN_R ; 18 + const UNOWN_S ; 19 + const UNOWN_T ; 20 + const UNOWN_U ; 21 + const UNOWN_V ; 22 + const UNOWN_W ; 23 + const UNOWN_X ; 24 + const UNOWN_Y ; 25 + const UNOWN_Z ; 26 +DEF NUM_UNOWN EQU const_value - 1 ; 26 diff --git a/constants/pokemon_data_constants.asm b/constants/pokemon_data_constants.asm new file mode 100644 index 0000000..f61da46 --- /dev/null +++ b/constants/pokemon_data_constants.asm @@ -0,0 +1,230 @@ +; base data struct members (see data/pokemon/base_stats/*.asm) +rsreset +DEF BASE_SPECIES rb +DEF BASE_STATS rb NUM_STATS +rsset BASE_STATS +DEF BASE_HP rb +DEF BASE_ATK rb +DEF BASE_DEF rb +DEF BASE_SPD rb +DEF BASE_SAT rb +DEF BASE_SDF rb +DEF BASE_TYPES rw +rsset BASE_TYPES +DEF BASE_TYPE_1 rb +DEF BASE_TYPE_2 rb +DEF BASE_CATCH_RATE rb +DEF BASE_EXP rb +DEF BASE_ITEMS rw +rsset BASE_ITEMS +DEF BASE_ITEM_1 rb +DEF BASE_ITEM_2 rb +DEF BASE_GENDER rb + rb_skip +DEF BASE_EGG_STEPS rb + rb_skip +DEF BASE_PIC_SIZE rb +DEF BASE_FRONTPIC rw +DEF BASE_BACKPIC rw +DEF BASE_GROWTH_RATE rb +DEF BASE_EGG_GROUPS rb +DEF BASE_TMHM rb (NUM_TM_HM_TUTOR + 7) / 8 +DEF BASE_DATA_SIZE EQU _RS + +; gender ratio constants +DEF GENDER_F0 EQU 0 percent +DEF GENDER_F12_5 EQU 12 percent + 1 +DEF GENDER_F25 EQU 25 percent +DEF GENDER_F50 EQU 50 percent +DEF GENDER_F75 EQU 75 percent +DEF GENDER_F100 EQU 100 percent - 1 +DEF GENDER_UNKNOWN EQU -1 + +; wBaseGrowthRate values +; GrowthRates indexes (see data/growth_rates.asm) + const_def + const GROWTH_MEDIUM_FAST + const GROWTH_SLIGHTLY_FAST + const GROWTH_SLIGHTLY_SLOW + const GROWTH_MEDIUM_SLOW + const GROWTH_FAST + const GROWTH_SLOW +DEF NUM_GROWTH_RATES EQU const_value + +; wBaseEggGroups values + const_def 1 + const EGG_MONSTER ; 1 + const EGG_WATER_1 ; 2 (Amphibian) + const EGG_BUG ; 3 + const EGG_FLYING ; 4 + const EGG_GROUND ; 5 (Field) + const EGG_FAIRY ; 6 + const EGG_PLANT ; 7 (Grass) + const EGG_HUMANSHAPE ; 8 (Human-Like) + const EGG_WATER_3 ; 9 (Invertebrate) + const EGG_MINERAL ; a + const EGG_INDETERMINATE ; b (Amorphous) + const EGG_WATER_2 ; c (Fish) + const EGG_DITTO ; d + const EGG_DRAGON ; e + const EGG_NONE ; f (Undiscovered) + +; party_struct members (see macros/ram.asm) +rsreset +DEF MON_SPECIES rb +DEF MON_ITEM rb +DEF MON_MOVES rb NUM_MOVES +DEF MON_ID rw +DEF MON_EXP rb 3 +DEF MON_STAT_EXP rw NUM_EXP_STATS +rsset MON_STAT_EXP +DEF MON_HP_EXP rw +DEF MON_ATK_EXP rw +DEF MON_DEF_EXP rw +DEF MON_SPD_EXP rw +DEF MON_SPC_EXP rw +DEF MON_DVS rw +DEF MON_PP rb NUM_MOVES +DEF MON_HAPPINESS rb +DEF MON_POKERUS rb +DEF MON_CAUGHTDATA rw +rsset MON_CAUGHTDATA +DEF MON_CAUGHTTIME rb +DEF MON_CAUGHTGENDER rb +rsset MON_CAUGHTDATA +DEF MON_CAUGHTLEVEL rb +DEF MON_CAUGHTLOCATION rb +DEF MON_LEVEL rb +DEF BOXMON_STRUCT_LENGTH EQU _RS +DEF MON_STATUS rb + rb_skip +DEF MON_HP rw +DEF MON_MAXHP rw +DEF MON_STATS rw NUM_BATTLE_STATS +rsset MON_STATS +DEF MON_ATK rw +DEF MON_DEF rw +DEF MON_SPD rw +DEF MON_SAT rw +DEF MON_SDF rw +DEF PARTYMON_STRUCT_LENGTH EQU _RS + +DEF NICKNAMED_MON_STRUCT_LENGTH EQU PARTYMON_STRUCT_LENGTH + MON_NAME_LENGTH +DEF REDMON_STRUCT_LENGTH EQU 44 + +; caught data + +DEF CAUGHT_TIME_MASK EQU %11000000 +DEF CAUGHT_LEVEL_MASK EQU %00111111 + +DEF CAUGHT_GENDER_MASK EQU %10000000 +DEF CAUGHT_LOCATION_MASK EQU %01111111 + +DEF CAUGHT_BY_UNKNOWN EQU 0 +DEF CAUGHT_BY_GIRL EQU 1 +DEF CAUGHT_BY_BOY EQU 2 + +DEF CAUGHT_EGG_LEVEL EQU 1 + +DEF MON_CRY_LENGTH EQU 6 + +; maximum number of party pokemon +DEF PARTY_LENGTH EQU 6 + +; boxes +DEF MONS_PER_BOX EQU 20 +; box: count, species, mons, OTs, nicknames, padding +DEF BOX_LENGTH EQU 1 + MONS_PER_BOX + 1 + (BOXMON_STRUCT_LENGTH + NAME_LENGTH + MON_NAME_LENGTH) * MONS_PER_BOX + 2 ; $450 +DEF NUM_BOXES EQU 14 + +; hall of fame +; hof_mon: species, id, dvs, level, nicknames +DEF HOF_MON_LENGTH EQU 2 + 2 + 2 + 1 + (MON_NAME_LENGTH - 1) +; hall_of_fame: win count, party, terminator +DEF HOF_LENGTH EQU 1 + HOF_MON_LENGTH * PARTY_LENGTH + 2 +DEF NUM_HOF_TEAMS EQU 30 + +; evolution types (used in data/pokemon/evos_attacks.asm) + const_def 1 + const EVOLVE_LEVEL + const EVOLVE_ITEM + const EVOLVE_TRADE + const EVOLVE_HAPPINESS + const EVOLVE_STAT + +; EVOLVE_HAPPINESS triggers + const_def 1 + const TR_ANYTIME + const TR_MORNDAY + const TR_NITE + +; EVOLVE_STAT triggers + const_def 1 + const ATK_GT_DEF + const ATK_LT_DEF + const ATK_EQ_DEF + +; wild data + +DEF NUM_GRASSMON EQU 7 ; data/wild/*_grass.asm table size +DEF NUM_WATERMON EQU 3 ; data/wild/*_water.asm table size + +DEF GRASS_WILDDATA_LENGTH EQU 2 + (1 + NUM_GRASSMON * 3) * 3 +DEF WATER_WILDDATA_LENGTH EQU 2 + (1 + NUM_WATERMON * 3) * 1 +DEF FISHGROUP_DATA_LENGTH EQU 1 + 2 * 3 + +DEF NUM_ROAMMON_MAPS EQU 16 ; RoamMaps table size (see data/wild/roammon_maps.asm) + +; treemon sets +; TreeMons indexes (see data/wild/treemons.asm) + const_def + const TREEMON_SET_CITY + const TREEMON_SET_CANYON + const TREEMON_SET_TOWN + const TREEMON_SET_ROUTE + const TREEMON_SET_KANTO + const TREEMON_SET_LAKE + const TREEMON_SET_FOREST + const TREEMON_SET_ROCK +DEF NUM_TREEMON_SETS EQU const_value + +; treemon scores + const_def + const TREEMON_SCORE_BAD ; 0 + const TREEMON_SCORE_GOOD ; 1 + const TREEMON_SCORE_RARE ; 2 + +; ChangeHappiness arguments (see data/events/happiness_changes.asm) + const_def 1 + const HAPPINESS_GAINLEVEL ; 01 + const HAPPINESS_USEDITEM ; 02 + const HAPPINESS_USEDXITEM ; 03 + const HAPPINESS_GYMBATTLE ; 04 + const HAPPINESS_LEARNMOVE ; 05 + const HAPPINESS_FAINTED ; 06 + const HAPPINESS_POISONFAINT ; 07 + const HAPPINESS_BEATENBYSTRONGFOE ; 08 + const HAPPINESS_OLDERCUT1 ; 09 + const HAPPINESS_OLDERCUT2 ; 0a + const HAPPINESS_OLDERCUT3 ; 0b + const HAPPINESS_YOUNGCUT1 ; 0c + const HAPPINESS_YOUNGCUT2 ; 0d + const HAPPINESS_YOUNGCUT3 ; 0e + const HAPPINESS_BITTERPOWDER ; 0f + const HAPPINESS_ENERGYROOT ; 10 + const HAPPINESS_REVIVALHERB ; 11 + const HAPPINESS_GROOMING ; 12 + const HAPPINESS_GAINLEVELATHOME ; 13 +DEF NUM_HAPPINESS_CHANGES EQU const_value - 1 + +; significant happiness values +DEF BASE_HAPPINESS EQU 70 +DEF FRIEND_BALL_HAPPINESS EQU 200 +DEF HAPPINESS_TO_EVOLVE EQU 220 +DEF HAPPINESS_THRESHOLD_1 EQU 100 +DEF HAPPINESS_THRESHOLD_2 EQU 200 + +; PP +DEF PP_UP_MASK EQU %11000000 +DEF PP_UP_ONE EQU %01000000 +DEF PP_MASK EQU %00111111 diff --git a/constants/printer_constants.asm b/constants/printer_constants.asm new file mode 100644 index 0000000..f0b8b48 --- /dev/null +++ b/constants/printer_constants.asm @@ -0,0 +1,9 @@ +; wPrinterStatus + const_def 1 + const PRINTER_STATUS_CHECKING + const PRINTER_STATUS_TRANSMITTING + const PRINTER_STATUS_PRINTING + const PRINTER_ERROR_1 + const PRINTER_ERROR_2 + const PRINTER_ERROR_3 + const PRINTER_ERROR_4 diff --git a/constants/radio_constants.asm b/constants/radio_constants.asm new file mode 100644 index 0000000..f719f2d --- /dev/null +++ b/constants/radio_constants.asm @@ -0,0 +1,132 @@ +; radio channel ids +; indexes for: +; - RadioChannelSongs (see data/radio/channel_music.asm) +; - PlayRadioShow/RadioJumptable (see engine/pokegear/radio.asm) +; - RadioChannels (see engine/pokegear/pokegear.asm) + const_def + const OAKS_POKEMON_TALK ; 00 + const POKEDEX_SHOW ; 01 + const POKEMON_MUSIC ; 02 + const LUCKY_CHANNEL ; 03 + const BUENAS_PASSWORD ; 04 + const PLACES_AND_PEOPLE ; 05 + const LETS_ALL_SING ; 06 + const ROCKET_RADIO ; 07 + const POKE_FLUTE_RADIO ; 08 + const UNOWN_RADIO ; 09 + const EVOLUTION_RADIO ; 0a +DEF NUM_RADIO_CHANNELS EQU const_value +; internal indexes for channel segments + const OAKS_POKEMON_TALK_2 ; 0b + const OAKS_POKEMON_TALK_3 ; 0c + const OAKS_POKEMON_TALK_4 ; 0d + const OAKS_POKEMON_TALK_5 ; 0e + const OAKS_POKEMON_TALK_6 ; 0f + const OAKS_POKEMON_TALK_7 ; 10 + const OAKS_POKEMON_TALK_8 ; 11 + const OAKS_POKEMON_TALK_9 ; 12 + const POKEDEX_SHOW_2 ; 13 + const POKEDEX_SHOW_3 ; 14 + const POKEDEX_SHOW_4 ; 15 + const POKEDEX_SHOW_5 ; 16 + const POKEMON_MUSIC_2 ; 17 + const POKEMON_MUSIC_3 ; 18 + const POKEMON_MUSIC_4 ; 19 + const POKEMON_MUSIC_5 ; 1a + const POKEMON_MUSIC_6 ; 1b + const POKEMON_MUSIC_7 ; 1c + const LETS_ALL_SING_2 ; 1d + const LUCKY_NUMBER_SHOW_2 ; 1e + const LUCKY_NUMBER_SHOW_3 ; 1f + const LUCKY_NUMBER_SHOW_4 ; 20 + const LUCKY_NUMBER_SHOW_5 ; 21 + const LUCKY_NUMBER_SHOW_6 ; 22 + const LUCKY_NUMBER_SHOW_7 ; 23 + const LUCKY_NUMBER_SHOW_8 ; 24 + const LUCKY_NUMBER_SHOW_9 ; 25 + const LUCKY_NUMBER_SHOW_10 ; 26 + const LUCKY_NUMBER_SHOW_11 ; 27 + const LUCKY_NUMBER_SHOW_12 ; 28 + const LUCKY_NUMBER_SHOW_13 ; 29 + const LUCKY_NUMBER_SHOW_14 ; 2a + const LUCKY_NUMBER_SHOW_15 ; 2b + const PLACES_AND_PEOPLE_2 ; 2c + const PLACES_AND_PEOPLE_3 ; 2d + const PLACES_AND_PEOPLE_4 ; 2e + const PLACES_AND_PEOPLE_5 ; 2f + const PLACES_AND_PEOPLE_6 ; 30 + const PLACES_AND_PEOPLE_7 ; 31 + const ROCKET_RADIO_2 ; 32 + const ROCKET_RADIO_3 ; 33 + const ROCKET_RADIO_4 ; 34 + const ROCKET_RADIO_5 ; 35 + const ROCKET_RADIO_6 ; 36 + const ROCKET_RADIO_7 ; 37 + const ROCKET_RADIO_8 ; 38 + const ROCKET_RADIO_9 ; 39 + const ROCKET_RADIO_10 ; 3a + const OAKS_POKEMON_TALK_10 ; 3b + const OAKS_POKEMON_TALK_11 ; 3c + const OAKS_POKEMON_TALK_12 ; 3d + const OAKS_POKEMON_TALK_13 ; 3e + const OAKS_POKEMON_TALK_14 ; 3f + const BUENAS_PASSWORD_2 ; 40 + const BUENAS_PASSWORD_3 ; 41 + const BUENAS_PASSWORD_4 ; 42 + const BUENAS_PASSWORD_5 ; 43 + const BUENAS_PASSWORD_6 ; 44 + const BUENAS_PASSWORD_7 ; 45 + const BUENAS_PASSWORD_8 ; 46 + const BUENAS_PASSWORD_9 ; 47 + const BUENAS_PASSWORD_10 ; 48 + const BUENAS_PASSWORD_11 ; 49 + const BUENAS_PASSWORD_12 ; 4a + const BUENAS_PASSWORD_13 ; 4b + const BUENAS_PASSWORD_14 ; 4c + const BUENAS_PASSWORD_15 ; 4d + const BUENAS_PASSWORD_16 ; 4e + const BUENAS_PASSWORD_17 ; 4f + const BUENAS_PASSWORD_18 ; 50 + const BUENAS_PASSWORD_19 ; 51 + const BUENAS_PASSWORD_20 ; 52 + const BUENAS_PASSWORD_21 ; 53 + const RADIO_SCROLL ; 54 + const POKEDEX_SHOW_6 ; 55 + const POKEDEX_SHOW_7 ; 56 + const POKEDEX_SHOW_8 ; 57 +DEF NUM_RADIO_SEGMENTS EQU const_value + +; PlayRadioStationPointers indexes (see engine/pokegear/pokegear.asm) + const_def + const MAPRADIO_POKEMON_CHANNEL + const MAPRADIO_OAKS_POKEMON_TALK + const MAPRADIO_POKEDEX_SHOW + const MAPRADIO_POKEMON_MUSIC + const MAPRADIO_LUCKY_CHANNEL + const MAPRADIO_UNOWN + const MAPRADIO_PLACES_PEOPLE + const MAPRADIO_LETS_ALL_SING + const MAPRADIO_ROCKET +DEF NUM_MAP_RADIO_STATIONS EQU const_value + +; These tables in engine/pokegear/radio.asm are all sized to a power of 2 +; so there's no need for a rejection sampling loop +DEF NUM_OAKS_POKEMON_TALK_ADVERBS EQU 16 ; OaksPKMNTalk8.Adverbs +DEF NUM_OAKS_POKEMON_TALK_ADJECTIVES EQU 16 ; OaksPKMNTalk9.Adjectives +DEF NUM_PNP_PEOPLE_ADJECTIVES EQU 16 ; PeoplePlaces5.Adjectives +DEF NUM_PNP_PLACES_ADJECTIVES EQU 16 ; PeoplePlaces7.Adjectives + +; BuenasPasswordTable sizes (see data/radio/buenas_passwords.asm) +DEF NUM_PASSWORD_CATEGORIES EQU 11 +DEF NUM_PASSWORDS_PER_CATEGORY EQU 3 + +; BuenaPrizeItems size (see data/items/buena_prizes.asm) +DEF NUM_BUENA_PRIZES EQU 9 + +; GetBuenasPassword.StringFunctionJumpTable indexes (see engine/pokegear/radio.asm) + const_def + const BUENA_MON + const BUENA_ITEM + const BUENA_MOVE + const BUENA_STRING +DEF NUM_BUENA_FUNCTIONS EQU const_value diff --git a/constants/scgb_constants.asm b/constants/scgb_constants.asm new file mode 100644 index 0000000..449be75 --- /dev/null +++ b/constants/scgb_constants.asm @@ -0,0 +1,159 @@ +; CGBLayoutJumptable indexes (see engine/gfx/cgb_layouts.asm) +; SGBLayoutJumptable indexes (see engine/gfx/sgb_layouts.asm) + const_def + const SCGB_BATTLE_GRAYSCALE + const SCGB_BATTLE_COLORS + const SCGB_POKEGEAR_PALS + const SCGB_STATS_SCREEN_HP_PALS + const SCGB_POKEDEX + const SCGB_SLOT_MACHINE + const SCGB_BETA_TITLE_SCREEN + const SCGB_GS_INTRO + const SCGB_DIPLOMA + const SCGB_MAPPALS + const SCGB_PARTY_MENU + const SCGB_EVOLUTION + const SCGB_GS_TITLE_SCREEN + const SCGB_0D + const SCGB_MOVE_LIST + const SCGB_BETA_PIKACHU_MINIGAME + const SCGB_POKEDEX_SEARCH_OPTION + const SCGB_BETA_POKER + const SCGB_POKEPIC + const SCGB_MAGNET_TRAIN + const SCGB_PACKPALS + const SCGB_TRAINER_CARD + const SCGB_POKEDEX_UNOWN_MODE + const SCGB_BILLS_PC + const SCGB_UNOWN_PUZZLE + const SCGB_GAMEFREAK_LOGO + const SCGB_PLAYER_OR_MON_FRONTPIC_PALS + const SCGB_TRADE_TUBE + const SCGB_TRAINER_OR_MON_FRONTPIC_PALS + const SCGB_MYSTERY_GIFT + const SCGB_1E +DEF NUM_SCGB_LAYOUTS EQU const_value + +DEF SCGB_PARTY_MENU_HP_BARS EQU $fc +DEF SCGB_DEFAULT EQU $ff + +; GetCrystalCGBLayout arguments (see engine/gfx/crystal_layouts.asm) + const_def + const CRYSTAL_CGB_MOBILE_0 + const CRYSTAL_CGB_MOBILE_1 + const CRYSTAL_CGB_NAME_CARD + +; PredefPals indexes (see gfx/sgb/predef.pal) +; GetPredefPal arguments (see engine/gfx/color.asm) + const_def + const PREDEFPAL_ROUTES + const PREDEFPAL_PALLET + const PREDEFPAL_VIRIDIAN + const PREDEFPAL_PEWTER + const PREDEFPAL_CERULEAN + const PREDEFPAL_LAVENDER + const PREDEFPAL_VERMILION + const PREDEFPAL_CELADON + const PREDEFPAL_FUCHSIA + const PREDEFPAL_CINNABAR + const PREDEFPAL_SAFFRON + const PREDEFPAL_INDIGO + const PREDEFPAL_NEW_BARK + const PREDEFPAL_CHERRYGROVE + const PREDEFPAL_VIOLET + const PREDEFPAL_AZALEA + const PREDEFPAL_GOLDENROD + const PREDEFPAL_ECRUTEAK + const PREDEFPAL_OLIVINE + const PREDEFPAL_CIANWOOD + const PREDEFPAL_MAHOGANY + const PREDEFPAL_BLACKTHORN + const PREDEFPAL_LAKE_OF_RAGE + const PREDEFPAL_SILVER_CAVE + const PREDEFPAL_DUNGEONS + const PREDEFPAL_NITE + const PREDEFPAL_BLACKOUT + const PREDEFPAL_DIPLOMA ; RB_MEWMON + const PREDEFPAL_TRADE_TUBE ; RB_BLUEMON + const PREDEFPAL_POKEDEX ; RB_REDMON + const PREDEFPAL_RB_CYANMON + const PREDEFPAL_RB_PURPLEMON + const PREDEFPAL_RB_BROWNMON + const PREDEFPAL_RB_GREENMON + const PREDEFPAL_RB_PINKMON + const PREDEFPAL_RB_YELLOWMON + const PREDEFPAL_CGB_BADGE ; RB_GRAYMON + const PREDEFPAL_BETA_SHINY_MEWMON + const PREDEFPAL_BETA_SHINY_BLUEMON + const PREDEFPAL_BETA_SHINY_REDMON + const PREDEFPAL_BETA_SHINY_CYANMON + const PREDEFPAL_BETA_SHINY_PURPLEMON + const PREDEFPAL_BETA_SHINY_BROWNMON + const PREDEFPAL_BETA_SHINY_GREENMON + const PREDEFPAL_BETA_SHINY_PINKMON + const PREDEFPAL_BETA_SHINY_YELLOWMON + const PREDEFPAL_PARTY_ICON ; BETA_SHINY_GRAYMON + const PREDEFPAL_HP_GREEN + const PREDEFPAL_HP_YELLOW + const PREDEFPAL_HP_RED + const PREDEFPAL_POKEGEAR + const PREDEFPAL_BETA_LOGO_1 + const PREDEFPAL_BETA_LOGO_2 + const PREDEFPAL_GS_INTRO_GAMEFREAK_LOGO + const PREDEFPAL_GS_INTRO_SHELLDER_LAPRAS + const PREDEFPAL_BETA_INTRO_LAPRAS + const PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_BG + const PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_OB + const PREDEFPAL_GS_INTRO_STARTERS_TRANSITION + const PREDEFPAL_BETA_INTRO_VENUSAUR + const PREDEFPAL_PACK ; GS_INTRO_CHARIZARD + const PREDEFPAL_SLOT_MACHINE_0 + const PREDEFPAL_SLOT_MACHINE_1 + const PREDEFPAL_SLOT_MACHINE_2 + const PREDEFPAL_SLOT_MACHINE_3 + const PREDEFPAL_BETA_POKER_0 + const PREDEFPAL_BETA_POKER_1 + const PREDEFPAL_BETA_POKER_2 + const PREDEFPAL_BETA_POKER_3 + const PREDEFPAL_BETA_RADIO + const PREDEFPAL_BETA_POKEGEAR + const PREDEFPAL_47 + const PREDEFPAL_GS_TITLE_SCREEN_0 + const PREDEFPAL_GS_TITLE_SCREEN_1 + const PREDEFPAL_GS_TITLE_SCREEN_2 + const PREDEFPAL_GS_TITLE_SCREEN_3 + const PREDEFPAL_UNOWN_PUZZLE + const PREDEFPAL_GAMEFREAK_LOGO_OB + const PREDEFPAL_GAMEFREAK_LOGO_BG +DEF NUM_PREDEF_PALS EQU const_value + +; SGB system command codes +; http://gbdev.gg8.se/wiki/articles/SGB_Functions#SGB_System_Command_Table + const_def + const SGB_PAL01 + const SGB_PAL23 + const SGB_PAL03 + const SGB_PAL12 + const SGB_ATTR_BLK + const SGB_ATTR_LIN + const SGB_ATTR_DIV + const SGB_ATTR_CHR + const SGB_SOUND + const SGB_SOU_TRN + const SGB_PAL_SET + const SGB_PAL_TRN + const SGB_ATRC_EN + const SGB_TEST_EN + const SGB_ICON_EN + const SGB_DATA_SND + const SGB_DATA_TRN + const SGB_MLT_REQ + const SGB_JUMP + const SGB_CHR_TRN + const SGB_PCT_TRN + const SGB_ATTR_TRN + const SGB_ATTR_SET + const SGB_MASK_EN + const SGB_OBJ_TRN + +DEF PALPACKET_LENGTH EQU $10 diff --git a/constants/script_constants.asm b/constants/script_constants.asm new file mode 100644 index 0000000..634cae2 --- /dev/null +++ b/constants/script_constants.asm @@ -0,0 +1,328 @@ +; object constants +DEF PLAYER EQU 0 +DEF LAST_TALKED EQU -2 + +; string buffer constants + const_def + const STRING_BUFFER_3 ; use wStringBuffer3 + const STRING_BUFFER_4 ; use wStringBuffer4 + const STRING_BUFFER_5 ; use wStringBuffer5 +DEF NUM_STRING_BUFFERS EQU const_value + +DEF STRING_BUFFER_LENGTH EQU 19 + +; checkmoney/takemoney accounts + const_def + const YOUR_MONEY ; 0 + const MOMS_MONEY ; 1 + +; checkmoney/checkcoins return values + const_def + const HAVE_MORE ; 0 + const HAVE_AMOUNT ; 1 + const HAVE_LESS ; 2 + +; checkpokemail return values + const_def + const POKEMAIL_WRONG_MAIL ; 0 + const POKEMAIL_CORRECT ; 1 + const POKEMAIL_REFUSED ; 2 + const POKEMAIL_NO_MAIL ; 3 + const POKEMAIL_LAST_MON ; 4 + +; askforphonenumber return values + const_def + const PHONE_CONTACT_GOT ; 0 + const PHONE_CONTACTS_FULL ; 1 + const PHONE_CONTACT_REFUSED ; 2 + +; trainertext arguments + const_def + const TRAINERTEXT_SEEN + const TRAINERTEXT_WIN + const TRAINERTEXT_LOSS + +; readvar/writevar/loadvar arguments +; _GetVarAction.VarActionTable indexes (see engine/overworld/variables.asm) + const_def + const VAR_STRINGBUFFER2 ; 00 + const VAR_PARTYCOUNT ; 01 + const VAR_BATTLERESULT ; 02 + const VAR_BATTLETYPE ; 03 + const VAR_TIMEOFDAY ; 04 + const VAR_DEXCAUGHT ; 05 + const VAR_DEXSEEN ; 06 + const VAR_BADGES ; 07 + const VAR_MOVEMENT ; 08 + const VAR_FACING ; 09 + const VAR_HOUR ; 0a + const VAR_WEEKDAY ; 0b + const VAR_MAPGROUP ; 0c + const VAR_MAPNUMBER ; 0d + const VAR_UNOWNCOUNT ; 0e + const VAR_ENVIRONMENT ; 0f + const VAR_BOXSPACE ; 10 + const VAR_CONTESTMINUTES ; 11 + const VAR_XCOORD ; 12 + const VAR_YCOORD ; 13 + const VAR_SPECIALPHONECALL ; 14 + const VAR_BT_WIN_STREAK ; 15 + const VAR_KURT_APRICORNS ; 16 + const VAR_CALLERID ; 17 + const VAR_BLUECARDBALANCE ; 18 + const VAR_BUENASPASSWORD ; 19 + const VAR_KENJI_BREAK ; 1a + const VAR_DEXUNCAUGHT ; 1b +DEF NUM_VARS EQU const_value + +; variable action types +DEF RETVAR_STRBUF2 EQU 0 << 6 +DEF RETVAR_ADDR_DE EQU 1 << 6 +DEF RETVAR_EXECUTE EQU 2 << 6 + +; PlayerEventScriptPointers indexes (see engine/overworld/events.asm) + const_def -1 + const PLAYEREVENT_MAPSCRIPT + const PLAYEREVENT_NONE + const PLAYEREVENT_SEENBYTRAINER + const PLAYEREVENT_TALKTOTRAINER + const PLAYEREVENT_ITEMBALL + const PLAYEREVENT_CONNECTION + const PLAYEREVENT_WARP + const PLAYEREVENT_FALL + const PLAYEREVENT_WHITEOUT + const PLAYEREVENT_HATCH + const PLAYEREVENT_JOYCHANGEFACING +DEF NUM_PLAYER_EVENTS EQU const_value + +; PlayerMovementPointers indexes (see engine/overworld/events.asm) + const_def + const PLAYERMOVEMENT_NORMAL + const PLAYERMOVEMENT_WARP + const PLAYERMOVEMENT_TURN + const PLAYERMOVEMENT_FORCE_TURN + const PLAYERMOVEMENT_FINISH + const PLAYERMOVEMENT_CONTINUE + const PLAYERMOVEMENT_EXIT_WATER + const PLAYERMOVEMENT_JUMP +DEF NUM_PLAYER_MOVEMENTS EQU const_value + +; script data sizes (see macros/scripts/maps.asm) +DEF SCENE_SCRIPT_SIZE EQU 4 ; scene_script +DEF CALLBACK_SIZE EQU 3 ; callback +DEF WARP_EVENT_SIZE EQU 5 ; warp_event +DEF COORD_EVENT_SIZE EQU 8 ; coord_event +DEF BG_EVENT_SIZE EQU 5 ; bg_event +DEF OBJECT_EVENT_SIZE EQU 13 ; object_event + +; A coord_event for scene -1 will always activate, +; regardless of the map's scene variable value. +DEF SCENE_ALWAYS EQU -1 + +; bg_event types +; BGEventJumptable indexes (see engine/overworld/events.asm) + const_def + const BGEVENT_READ + const BGEVENT_UP + const BGEVENT_DOWN + const BGEVENT_RIGHT + const BGEVENT_LEFT + const BGEVENT_IFSET + const BGEVENT_IFNOTSET + const BGEVENT_ITEM + const BGEVENT_COPY +DEF NUM_BGEVENTS EQU const_value + +; object_event types +; ObjectEventTypeArray indexes (see engine/overworld/events.asm) + const_def + const OBJECTTYPE_SCRIPT + const OBJECTTYPE_ITEMBALL + const OBJECTTYPE_TRAINER + const OBJECTTYPE_3 + const OBJECTTYPE_4 + const OBJECTTYPE_5 + const OBJECTTYPE_6 +DEF NUM_OBJECT_TYPES EQU const_value + +; command queue members +rsreset +DEF CMDQUEUE_TYPE rb +DEF CMDQUEUE_ADDR rb +DEF CMDQUEUE_02 rb +DEF CMDQUEUE_03 rb +DEF CMDQUEUE_04 rb +DEF CMDQUEUE_JUMPTABLE_INDEX rb +DEF CMDQUEUE_ENTRY_SIZE EQU _RS +DEF CMDQUEUE_CAPACITY EQU 4 + +; HandleQueuedCommand.Jumptable indexes (see engine/overworld/events.asm) + const_def + const CMDQUEUE_NULL + const CMDQUEUE_TYPE1 + const CMDQUEUE_STONETABLE + const CMDQUEUE_TYPE3 + const CMDQUEUE_TYPE4 +DEF NUM_CMDQUEUE_TYPES EQU const_value + +; elevfloor macro values +; ElevatorFloorNames indexes (see data/events/elevator_floors.asm) + const_def + const FLOOR_B4F + const FLOOR_B3F + const FLOOR_B2F + const FLOOR_B1F + const FLOOR_1F + const FLOOR_2F + const FLOOR_3F + const FLOOR_4F + const FLOOR_5F + const FLOOR_6F + const FLOOR_7F + const FLOOR_8F + const FLOOR_9F + const FLOOR_10F + const FLOOR_11F + const FLOOR_ROOF +DEF NUM_FLOORS EQU const_value + +; showemote arguments +; Emotes indexes (see data/sprites/emotes.asm) + const_def + const EMOTE_SHOCK + const EMOTE_QUESTION + const EMOTE_HAPPY + const EMOTE_SAD + const EMOTE_HEART + const EMOTE_BOLT + const EMOTE_SLEEP + const EMOTE_FISH + const EMOTE_SHADOW + const EMOTE_ROD + const EMOTE_BOULDER_DUST + const EMOTE_GRASS_RUSTLE +DEF NUM_EMOTES EQU const_value +DEF EMOTE_FROM_MEM EQU -1 +DEF EMOTE_LENGTH EQU 6 + +; fruittree arguments +; FruitTreeItems indexes (see data/items/fruit_trees.asm) + const_def 1 + const FRUITTREE_ROUTE_29 ; 01 + const FRUITTREE_ROUTE_30_1 ; 02 + const FRUITTREE_ROUTE_38 ; 03 + const FRUITTREE_ROUTE_46_1 ; 04 + const FRUITTREE_ROUTE_30_2 ; 05 + const FRUITTREE_ROUTE_33 ; 06 + const FRUITTREE_ROUTE_31 ; 07 + const FRUITTREE_ROUTE_43 ; 08 + const FRUITTREE_VIOLET_CITY ; 09 + const FRUITTREE_ROUTE_46_2 ; 0a + const FRUITTREE_ROUTE_35 ; 0b + const FRUITTREE_ROUTE_45 ; 0c + const FRUITTREE_ROUTE_36 ; 0d + const FRUITTREE_ROUTE_26 ; 0e + const FRUITTREE_ROUTE_39 ; 0f + const FRUITTREE_ROUTE_44 ; 10 + const FRUITTREE_ROUTE_37_1 ; 11 + const FRUITTREE_ROUTE_37_2 ; 12 + const FRUITTREE_ROUTE_37_3 ; 13 + const FRUITTREE_AZALEA_TOWN ; 14 + const FRUITTREE_ROUTE_42_1 ; 15 + const FRUITTREE_ROUTE_42_2 ; 16 + const FRUITTREE_ROUTE_42_3 ; 17 + const FRUITTREE_ROUTE_11 ; 18 + const FRUITTREE_ROUTE_2 ; 19 + const FRUITTREE_ROUTE_1 ; 1a + const FRUITTREE_ROUTE_8 ; 1b + const FRUITTREE_PEWTER_CITY_1 ; 1c + const FRUITTREE_PEWTER_CITY_2 ; 1d + const FRUITTREE_FUCHSIA_CITY ; 1e +DEF NUM_FRUIT_TREES EQU const_value - 1 + +; describedecoration arguments +; DescribeDecoration.JumpTable indexes (see engine/overworld/decorations.asm) + const_def + const DECODESC_POSTER ; 0 + const DECODESC_LEFT_DOLL ; 1 + const DECODESC_RIGHT_DOLL ; 2 + const DECODESC_BIG_DOLL ; 3 + const DECODESC_CONSOLE ; 4 +DEF NUM_DECODESCS EQU const_value + +; swarm arguments +; StoreSwarmMapIndices arguments + const_def + const SWARM_DUNSPARCE ; 0 + const SWARM_YANMA ; 1 + +; ActivateFishingSwarm setval arguments + const_def + const FISHSWARM_NONE ; 0 + const FISHSWARM_QWILFISH ; 1 + const FISHSWARM_REMORAID ; 2 + +; SpecialGameboyCheck return values + const_def + const GBCHECK_GB ; 0 + const GBCHECK_SGB ; 1 + const GBCHECK_CGB ; 2 + +; CheckMagikarpLength return values + const_def + const MAGIKARPLENGTH_NOT_MAGIKARP ; 0 + const MAGIKARPLENGTH_REFUSED ; 1 + const MAGIKARPLENGTH_TOO_SHORT ; 2 + const MAGIKARPLENGTH_BEAT_RECORD ; 3 + +; ReturnShuckie return values + const_def + const SHUCKIE_WRONG_MON ; 0 + const SHUCKIE_REFUSED ; 1 + const SHUCKIE_RETURNED ; 2 + const SHUCKIE_HAPPY ; 3 + const SHUCKIE_FAINTED ; 4 + +; CheckPartyFullAfterContest return values + const_def + const BUGCONTEST_CAUGHT_MON ; 0 + const BUGCONTEST_BOXED_MON ; 1 + const BUGCONTEST_NO_CATCH ; 2 + +; Bug-Catching Contest values +DEF BUG_CONTEST_BALLS EQU 20 +DEF BUG_CONTEST_MINUTES EQU 20 +DEF BUG_CONTEST_SECONDS EQU 0 +DEF BUG_CONTEST_PLAYER EQU 1 +DEF NUM_BUG_CONTESTANTS EQU 10 ; not counting the player +DEF BUG_CONTESTANT_SIZE EQU 4 + +; HealMachineAnim setval arguments +; HealMachineAnim.Pointers indexes (see engine/events/heal_machine_anim.asm) + const_def + const HEALMACHINE_POKECENTER ; 0 + const HEALMACHINE_ELMS_LAB ; 1 + const HEALMACHINE_HALL_OF_FAME ; 2 + +; UnownPuzzle setval arguments +; LoadUnownPuzzlePiecesGFX.LZPointers indexes (see engine/games/unown_puzzle.asm) + const_def + const UNOWNPUZZLE_KABUTO ; 0 + const UNOWNPUZZLE_OMANYTE ; 1 + const UNOWNPUZZLE_AERODACTYL ; 2 + const UNOWNPUZZLE_HO_OH ; 3 +DEF NUM_UNOWN_PUZZLES EQU const_value + +; DisplayUnownWords setval arguments +; UnownWalls and MenuHeaders_UnownWalls indexes (see data/events/unown_walls.asm) + const_def + const UNOWNWORDS_ESCAPE ; 0 + const UNOWNWORDS_LIGHT ; 1 + const UNOWNWORDS_WATER ; 2 + const UNOWNWORDS_HO_OH ; 3 + +; MoveTutor setval arguments + const_def 1 + const MOVETUTOR_FLAMETHROWER ; 1 + const MOVETUTOR_THUNDERBOLT ; 2 + const MOVETUTOR_ICE_BEAM ; 3 diff --git a/constants/serial_constants.asm b/constants/serial_constants.asm new file mode 100644 index 0000000..bf3c356 --- /dev/null +++ b/constants/serial_constants.asm @@ -0,0 +1,48 @@ +; wLinkMode + const_def + const LINK_NULL ; 0 + const LINK_TIMECAPSULE ; 1 + const LINK_TRADECENTER ; 2 + const LINK_COLOSSEUM ; 3 + const LINK_MOBILE ; 4 + +; hSerialReceive high nybbles +DEF SERIAL_TIMECAPSULE EQU $60 +DEF SERIAL_TRADECENTER EQU $70 +DEF SERIAL_BATTLE EQU $80 + +DEF ESTABLISH_CONNECTION_WITH_INTERNAL_CLOCK EQU $01 +DEF ESTABLISH_CONNECTION_WITH_EXTERNAL_CLOCK EQU $02 + +; hSerialConnectionStatus +DEF USING_EXTERNAL_CLOCK EQU $01 +DEF USING_INTERNAL_CLOCK EQU $02 +DEF CONNECTION_NOT_ESTABLISHED EQU $ff + +; length of a patch list +DEF SERIAL_PATCH_LIST_LENGTH EQU 200 +; size of the patch area (offsets into this area may not have special values) +DEF SERIAL_PATCH_DATA_SIZE EQU $fc +; signals the start of an array of bytes transferred over the link cable +DEF SERIAL_PREAMBLE_BYTE EQU $fd +; this byte is used when there is no data to send +DEF SERIAL_NO_DATA_BYTE EQU $fe +; signals the end of one part of a patch list (there are two parts) for player/enemy party data +DEF SERIAL_PATCH_LIST_PART_TERMINATOR EQU $ff +; used to replace SERIAL_NO_DATA_BYTE +DEF SERIAL_PATCH_REPLACEMENT_BYTE EQU $ff + +DEF SERIAL_PREAMBLE_LENGTH EQU 6 +DEF SERIAL_RN_PREAMBLE_LENGTH EQU 7 +DEF SERIAL_PATCH_PREAMBLE_LENGTH EQU 3 +DEF SERIAL_RNS_LENGTH EQU 10 + +DEF SERIAL_MAIL_PREAMBLE_BYTE EQU $20 +DEF SERIAL_MAIL_PREAMBLE_LENGTH EQU 5 +; used to replace SERIAL_NO_DATA_BYTE +DEF SERIAL_MAIL_REPLACEMENT_BYTE EQU $21 + +; timeout duration after exchanging a byte +DEF SERIAL_LINK_BYTE_TIMEOUT EQU $5000 + +DEF MAX_MYSTERY_GIFT_PARTNERS EQU 5 diff --git a/constants/sfx_constants.asm b/constants/sfx_constants.asm new file mode 100644 index 0000000..b51e6dd --- /dev/null +++ b/constants/sfx_constants.asm @@ -0,0 +1,211 @@ +; SFX indexes (see audio/sfx_pointers.asm) + const_def + const SFX_DEX_FANFARE_50_79 ; 00 + const SFX_ITEM ; 01 + const SFX_CAUGHT_MON ; 02 + const SFX_POKEBALLS_PLACED_ON_TABLE ; 03 + const SFX_POTION ; 04 + const SFX_FULL_HEAL ; 05 + const SFX_MENU ; 06 + const SFX_READ_TEXT ; 07 + const SFX_READ_TEXT_2 ; 08 + const SFX_DEX_FANFARE_20_49 ; 09 + const SFX_DEX_FANFARE_80_109 ; 0a + const SFX_POISON ; 0b + const SFX_GOT_SAFARI_BALLS ; 0c + const SFX_BOOT_PC ; 0d + const SFX_SHUT_DOWN_PC ; 0e + const SFX_CHOOSE_PC_OPTION ; 0f + const SFX_ESCAPE_ROPE ; 10 + const SFX_PUSH_BUTTON ; 11 + const SFX_SECOND_PART_OF_ITEMFINDER ; 12 + const SFX_WARP_TO ; 13 + const SFX_WARP_FROM ; 14 + const SFX_CHANGE_DEX_MODE ; 15 + const SFX_JUMP_OVER_LEDGE ; 16 + const SFX_GRASS_RUSTLE ; 17 + const SFX_FLY ; 18 + const SFX_WRONG ; 19 + const SFX_SQUEAK ; 1a + const SFX_STRENGTH ; 1b + const SFX_BOAT ; 1c + const SFX_WALL_OPEN ; 1d + const SFX_PLACE_PUZZLE_PIECE_DOWN ; 1e + const SFX_ENTER_DOOR ; 1f + const SFX_SWITCH_POKEMON ; 20 + const SFX_TALLY ; 21 + const SFX_TRANSACTION ; 22 + const SFX_EXIT_BUILDING ; 23 + const SFX_BUMP ; 24 + const SFX_SAVE ; 25 + const SFX_POKEFLUTE ; 26 + const SFX_ELEVATOR_END ; 27 + const SFX_THROW_BALL ; 28 + const SFX_BALL_POOF ; 29 + const SFX_FAINT ; 2a + const SFX_RUN ; 2b + const SFX_SLOT_MACHINE_START ; 2c + const SFX_FANFARE ; 2d + const SFX_PECK ; 2e + const SFX_KINESIS ; 2f + const SFX_LICK ; 30 + const SFX_POUND ; 31 + const SFX_MOVE_PUZZLE_PIECE ; 32 + const SFX_COMET_PUNCH ; 33 + const SFX_MEGA_PUNCH ; 34 + const SFX_SCRATCH ; 35 + const SFX_VICEGRIP ; 36 + const SFX_RAZOR_WIND ; 37 + const SFX_CUT ; 38 + const SFX_WING_ATTACK ; 39 + const SFX_WHIRLWIND ; 3a + const SFX_BIND ; 3b + const SFX_VINE_WHIP ; 3c + const SFX_DOUBLE_KICK ; 3d + const SFX_MEGA_KICK ; 3e + const SFX_HEADBUTT ; 3f + const SFX_HORN_ATTACK ; 40 + const SFX_TACKLE ; 41 + const SFX_POISON_STING ; 42 + const SFX_POWDER ; 43 + const SFX_DOUBLESLAP ; 44 + const SFX_BITE ; 45 + const SFX_JUMP_KICK ; 46 + const SFX_STOMP ; 47 + const SFX_TAIL_WHIP ; 48 + const SFX_KARATE_CHOP ; 49 + const SFX_SUBMISSION ; 4a + const SFX_WATER_GUN ; 4b + const SFX_SWORDS_DANCE ; 4c + const SFX_THUNDER ; 4d + const SFX_SUPERSONIC ; 4e + const SFX_LEER ; 4f + const SFX_EMBER ; 50 + const SFX_BUBBLEBEAM ; 51 + const SFX_HYDRO_PUMP ; 52 + const SFX_SURF ; 53 + const SFX_PSYBEAM ; 54 + const SFX_CHARGE ; 55 + const SFX_THUNDERSHOCK ; 56 + const SFX_PSYCHIC ; 57 + const SFX_SCREECH ; 58 + const SFX_BONE_CLUB ; 59 + const SFX_SHARPEN ; 5a + const SFX_EGG_BOMB ; 5b + const SFX_SING ; 5c + const SFX_HYPER_BEAM ; 5d + const SFX_SHINE ; 5e + const SFX_UNKNOWN_5F ; 5f + const SFX_UNKNOWN_60 ; 60 + const SFX_UNKNOWN_61 ; 61 + const SFX_SWITCH_POCKETS ; 62 + const SFX_UNKNOWN_63 ; 63 + const SFX_BURN ; 64 + const SFX_TITLE_SCREEN_ENTRANCE ; 65 + const SFX_UNKNOWN_66 ; 66 + const SFX_GET_COIN_FROM_SLOTS ; 67 + const SFX_PAY_DAY ; 68 + const SFX_METRONOME ; 69 + const SFX_CALL ; 6a + const SFX_HANG_UP ; 6b + const SFX_NO_SIGNAL ; 6c + const SFX_SANDSTORM ; 6d + const SFX_ELEVATOR ; 6e + const SFX_PROTECT ; 6f + const SFX_SKETCH ; 70 + const SFX_RAIN_DANCE ; 71 + const SFX_AEROBLAST ; 72 + const SFX_SPARK ; 73 + const SFX_CURSE ; 74 + const SFX_RAGE ; 75 + const SFX_THIEF ; 76 + const SFX_THIEF_2 ; 77 + const SFX_SPIDER_WEB ; 78 + const SFX_MIND_READER ; 79 + const SFX_NIGHTMARE ; 7a + const SFX_SNORE ; 7b + const SFX_SWEET_KISS ; 7c + const SFX_SWEET_KISS_2 ; 7d + const SFX_BELLY_DRUM ; 7e + const SFX_TOXIC ; 7f + const SFX_SLUDGE_BOMB ; 80 + const SFX_FORESIGHT ; 81 + const SFX_SPITE ; 82 + const SFX_OUTRAGE ; 83 + const SFX_PERISH_SONG ; 84 + const SFX_GIGA_DRAIN ; 85 + const SFX_ATTRACT ; 86 + const SFX_KINESIS_2 ; 87 + const SFX_ZAP_CANNON ; 88 + const SFX_MEAN_LOOK ; 89 + const SFX_HEAL_BELL ; 8a + const SFX_RETURN ; 8b + const SFX_EXP_BAR ; 8c + const SFX_MILK_DRINK ; 8d + const SFX_PRESENT ; 8e + const SFX_MORNING_SUN ; 8f + const SFX_LEVEL_UP ; 90 + const SFX_KEY_ITEM ; 91 + const SFX_FANFARE_2 ; 92 + const SFX_REGISTER_PHONE_NUMBER ; 93 + const SFX_3RD_PLACE ; 94 + const SFX_GET_EGG_UNUSED ; 95 + const SFX_GET_EGG ; 96 + const SFX_MOVE_DELETED ; 97 + const SFX_2ND_PLACE ; 98 + const SFX_1ST_PLACE ; 99 + const SFX_CHOOSE_A_CARD ; 9a + const SFX_GET_TM ; 9b + const SFX_GET_BADGE ; 9c + const SFX_QUIT_SLOTS ; 9d + const SFX_EGG_CRACK ; 9e + const SFX_DEX_FANFARE_LESS_THAN_20 ; 9f + const SFX_DEX_FANFARE_140_169 ; a0 + const SFX_DEX_FANFARE_170_199 ; a1 + const SFX_DEX_FANFARE_200_229 ; a2 + const SFX_DEX_FANFARE_230_PLUS ; a3 + const SFX_EVOLVED ; a4 + const SFX_MASTER_BALL ; a5 + const SFX_EGG_HATCH ; a6 + const SFX_GS_INTRO_CHARIZARD_FIREBALL ; a7 + const SFX_GS_INTRO_POKEMON_APPEARS ; a8 + const SFX_FLASH ; a9 + const SFX_GAME_FREAK_LOGO_GS ; aa + const SFX_NOT_VERY_EFFECTIVE ; ab + const SFX_DAMAGE ; ac + const SFX_SUPER_EFFECTIVE ; ad + const SFX_BALL_BOUNCE ; ae + const SFX_MOONLIGHT ; af + const SFX_ENCORE ; b0 + const SFX_BEAT_UP ; b1 + const SFX_BATON_PASS ; b2 + const SFX_BALL_WOBBLE ; b3 + const SFX_SWEET_SCENT ; b4 + const SFX_SWEET_SCENT_2 ; b5 + const SFX_HIT_END_OF_EXP_BAR ; b6 + const SFX_GIVE_TRADEMON ; b7 + const SFX_GET_TRADEMON ; b8 + const SFX_TRAIN_ARRIVED ; b9 + const SFX_STOP_SLOT ; ba + const SFX_2_BOOPS ; bb +; new to Crystal + const SFX_GLASS_TING ; bc + const SFX_GLASS_TING_2 ; bd + const SFX_INTRO_UNOWN_1 ; be + const SFX_INTRO_UNOWN_2 ; bf + const SFX_INTRO_UNOWN_3 ; c0 + const SFX_DITTO_POP_UP ; c1 + const SFX_DITTO_TRANSFORM ; c2 + const SFX_INTRO_SUICUNE_1 ; c3 + const SFX_INTRO_PICHU ; c4 + const SFX_INTRO_SUICUNE_2 ; c5 + const SFX_INTRO_SUICUNE_3 ; c6 + const SFX_DITTO_BOUNCE ; c7 + const SFX_INTRO_SUICUNE_4 ; c8 + const SFX_GAME_FREAK_PRESENTS ; c9 + const SFX_TINGLE ; ca + const SFX_INTRO_WHOOSH ; cb + const SFX_TWO_PC_BEEPS ; cc + const SFX_4_NOTE_DITTY ; cd + const SFX_TWINKLE ; ce +DEF NUM_SFX EQU const_value diff --git a/constants/sprite_anim_constants.asm b/constants/sprite_anim_constants.asm new file mode 100644 index 0000000..bc8d3b1 --- /dev/null +++ b/constants/sprite_anim_constants.asm @@ -0,0 +1,336 @@ +; sprite_anim_struct members (see macros/ram.asm) +rsreset +DEF SPRITEANIMSTRUCT_INDEX rb ; 0 +DEF SPRITEANIMSTRUCT_FRAMESET_ID rb ; 1 +DEF SPRITEANIMSTRUCT_ANIM_SEQ_ID rb ; 2 +DEF SPRITEANIMSTRUCT_TILE_ID rb ; 3 +DEF SPRITEANIMSTRUCT_XCOORD rb ; 4 +DEF SPRITEANIMSTRUCT_YCOORD rb ; 5 +DEF SPRITEANIMSTRUCT_XOFFSET rb ; 6 +DEF SPRITEANIMSTRUCT_YOFFSET rb ; 7 +DEF SPRITEANIMSTRUCT_DURATION rb ; 8 +DEF SPRITEANIMSTRUCT_DURATIONOFFSET rb ; 9 +DEF SPRITEANIMSTRUCT_FRAME rb ; a +DEF SPRITEANIMSTRUCT_JUMPTABLE_INDEX rb ; b +DEF SPRITEANIMSTRUCT_VAR1 rb ; c +DEF SPRITEANIMSTRUCT_VAR2 rb ; d +DEF SPRITEANIMSTRUCT_VAR3 rb ; e +DEF SPRITEANIMSTRUCT_VAR4 rb ; f +DEF SPRITEANIMSTRUCT_LENGTH EQU _RS +DEF NUM_SPRITE_ANIM_STRUCTS EQU 10 ; see wSpriteAnimationStructs + +; wSpriteAnimDict keys (see wram.asm) +; UnusedSpriteAnimGFX indexes (see data/sprite_anims/unused_gfx.asm) + const_def + const SPRITE_ANIM_DICT_DEFAULT ; 0 + const_skip 4 ; unused + const SPRITE_ANIM_DICT_TEXT_CURSOR ; 5 + const SPRITE_ANIM_DICT_GS_SPLASH ; 6 + const SPRITE_ANIM_DICT_SLOTS ; 7 + const SPRITE_ANIM_DICT_ARROW_CURSOR ; 8 +DEF NUM_SPRITE_ANIM_GFX EQU const_value + +; wSpriteAnimDict size (see wram.asm) +DEF NUM_SPRITEANIMDICT_ENTRIES EQU 10 + +; SpriteAnimSeqData indexes (see data/sprite_anims/sequences.asm) + const_def + const SPRITE_ANIM_INDEX_PARTY_MON ; 00 + const SPRITE_ANIM_INDEX_GS_TITLE_TRAIL ; 01 + const SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR ; 02 + const SPRITE_ANIM_INDEX_GAMEFREAK_LOGO ; 03 + const SPRITE_ANIM_INDEX_GS_GAMEFREAK_LOGO_STAR ; 04 + const SPRITE_ANIM_INDEX_GS_GAMEFREAK_LOGO_SPARKLE ; 05 + const SPRITE_ANIM_INDEX_SLOTS_GOLEM ; 06 + const SPRITE_ANIM_INDEX_SLOTS_CHANSEY ; 07 + const SPRITE_ANIM_INDEX_SLOTS_EGG ; 08 + const SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR ; 09 + const SPRITE_ANIM_INDEX_RED_WALK ; 0a + const SPRITE_ANIM_INDEX_UNUSED_CURSOR ; 0b + const SPRITE_ANIM_INDEX_MEMORY_GAME_CURSOR ; 0c + const SPRITE_ANIM_INDEX_POKEGEAR_ARROW ; 0d + const SPRITE_ANIM_INDEX_TRADE_POKE_BALL ; 0e + const SPRITE_ANIM_INDEX_TRADE_POOF ; 0f + const SPRITE_ANIM_INDEX_TRADE_TUBE_BULGE ; 10 + const SPRITE_ANIM_INDEX_TRADEMON_ICON ; 11 + const SPRITE_ANIM_INDEX_TRADEMON_BUBBLE ; 12 + const SPRITE_ANIM_INDEX_EVOLUTION_BALL_OF_LIGHT ; 13 + const SPRITE_ANIM_INDEX_RADIO_TUNING_KNOB ; 14 + const SPRITE_ANIM_INDEX_MAGNET_TRAIN_RED ; 15 + const SPRITE_ANIM_INDEX_LEAF ; 16 + const SPRITE_ANIM_INDEX_CUT_TREE ; 17 + const SPRITE_ANIM_INDEX_FLY_LEAF ; 18 + const SPRITE_ANIM_INDEX_EGG_CRACK ; 19 + const SPRITE_ANIM_INDEX_GS_INTRO_HO_OH_LUGIA ; 1a + const SPRITE_ANIM_INDEX_HEADBUTT ; 1b + const SPRITE_ANIM_INDEX_EGG_HATCH ; 1c + const SPRITE_ANIM_INDEX_EZCHAT_CURSOR ; 1d + const SPRITE_ANIM_INDEX_BLUE_WALK ; 1e + const SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE ; 1f + const SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL ; 20 + const SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL ; 21 + const SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE ; 22 + const SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_PULSE ; 23 + const SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_PULSE ; 24 + const SPRITE_ANIM_INDEX_MOBILE_TRADE_PING ; 25 + const SPRITE_ANIM_INDEX_INTRO_SUICUNE ; 26 + const SPRITE_ANIM_INDEX_INTRO_PICHU ; 27 + const SPRITE_ANIM_INDEX_INTRO_WOOPER ; 28 + const SPRITE_ANIM_INDEX_INTRO_UNOWN ; 29 + const SPRITE_ANIM_INDEX_INTRO_UNOWN_F ; 2a + const SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY ; 2b + const SPRITE_ANIM_INDEX_CELEBI ; 2c +DEF NUM_SPRITE_ANIM_INDEXES EQU const_value + +; DoAnimFrame.Jumptable indexes (see engine/gfx/sprite_anims.asm) + const_def + const SPRITE_ANIM_SEQ_NULL ; 00 + const SPRITE_ANIM_SEQ_PARTY_MON ; 01 + const SPRITE_ANIM_SEQ_PARTY_MON_SWITCH ; 02 + const SPRITE_ANIM_SEQ_PARTY_MON_SELECTED ; 03 + const SPRITE_ANIM_SEQ_GS_TITLE_TRAIL ; 04 + const SPRITE_ANIM_SEQ_NAMING_SCREEN_CURSOR ; 05 + const SPRITE_ANIM_SEQ_GAMEFREAK_LOGO ; 06 + const SPRITE_ANIM_SEQ_GS_GAMEFREAK_LOGO_STAR ; 07 + const SPRITE_ANIM_SEQ_GS_GAMEFREAK_LOGO_SPARKLE ; 08 + const SPRITE_ANIM_SEQ_SLOTS_GOLEM ; 09 + const SPRITE_ANIM_SEQ_SLOTS_CHANSEY ; 0a + const SPRITE_ANIM_SEQ_SLOTS_EGG ; 0b + const SPRITE_ANIM_SEQ_MAIL_CURSOR ; 0c + const SPRITE_ANIM_SEQ_UNUSED_CURSOR ; 0d + const SPRITE_ANIM_SEQ_MEMORY_GAME_CURSOR ; 0e + const SPRITE_ANIM_SEQ_POKEGEAR_ARROW ; 0f + const SPRITE_ANIM_SEQ_TRADE_POKE_BALL ; 10 + const SPRITE_ANIM_SEQ_TRADE_TUBE_BULGE ; 11 + const SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE ; 12 + const SPRITE_ANIM_SEQ_REVEAL_NEW_MON ; 13 + const SPRITE_ANIM_SEQ_RADIO_TUNING_KNOB ; 14 + const SPRITE_ANIM_SEQ_CUT_LEAVES ; 15 + const SPRITE_ANIM_SEQ_FLY_FROM ; 16 + const SPRITE_ANIM_SEQ_FLY_LEAF ; 17 + const SPRITE_ANIM_SEQ_FLY_TO ; 18 + const SPRITE_ANIM_SEQ_GS_INTRO_HO_OH_LUGIA ; 19 + const SPRITE_ANIM_SEQ_EZCHAT_CURSOR ; 1a + const SPRITE_ANIM_SEQ_MOBILE_TRADE_SENT_PULSE ; 1b + const SPRITE_ANIM_SEQ_MOBILE_TRADE_OT_PULSE ; 1c + const SPRITE_ANIM_SEQ_INTRO_SUICUNE ; 1d + const SPRITE_ANIM_SEQ_INTRO_PICHU_WOOPER ; 1e + const SPRITE_ANIM_SEQ_CELEBI ; 1f + const SPRITE_ANIM_SEQ_INTRO_UNOWN ; 20 + const SPRITE_ANIM_SEQ_INTRO_UNOWN_F ; 21 + const SPRITE_ANIM_SEQ_INTRO_SUICUNE_AWAY ; 22 +DEF NUM_SPRITE_ANIM_SEQS EQU const_value + +; SpriteAnimFrameData indexes (see data/sprite_anims/framesets.asm) + const_def + const SPRITE_ANIM_FRAMESET_00 ; 00 + const SPRITE_ANIM_FRAMESET_PARTY_MON ; 01 + const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_MAIL ; 02 + const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_ITEM ; 03 + const SPRITE_ANIM_FRAMESET_PARTY_MON_FAST ; 04 + const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_MAIL_FAST ; 05 + const SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_ITEM_FAST ; 06 + const SPRITE_ANIM_FRAMESET_GS_TITLE_TRAIL ; 07 + const SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR ; 08 + const SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR_BIG ; 09 + const SPRITE_ANIM_FRAMESET_GAMEFREAK_LOGO ; 0a + const SPRITE_ANIM_FRAMESET_GS_GAMEFREAK_LOGO_STAR ; 0b + const SPRITE_ANIM_FRAMESET_GS_GAMEFREAK_LOGO_SPARKLE ; 0c + const SPRITE_ANIM_FRAMESET_SLOTS_GOLEM ; 0d + const SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY ; 0e + const SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY_2 ; 0f + const SPRITE_ANIM_FRAMESET_SLOTS_EGG ; 10 + const SPRITE_ANIM_FRAMESET_RED_WALK ; 11 + const SPRITE_ANIM_FRAMESET_STILL_CURSOR ; 12 + const SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL ; 13 + const SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_WOBBLE ; 14 + const SPRITE_ANIM_FRAMESET_TRADE_POOF ; 15 + const SPRITE_ANIM_FRAMESET_TRADE_TUBE_BULGE ; 16 + const SPRITE_ANIM_FRAMESET_TRADEMON_ICON ; 17 + const SPRITE_ANIM_FRAMESET_TRADEMON_BUBBLE ; 18 + const SPRITE_ANIM_FRAMESET_EVOLUTION_BALL_OF_LIGHT ; 19 + const SPRITE_ANIM_FRAMESET_RADIO_TUNING_KNOB ; 1a + const SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_RED ; 1b + const SPRITE_ANIM_FRAMESET_UNUSED_1C ; 1c + const SPRITE_ANIM_FRAMESET_LEAF ; 1d + const SPRITE_ANIM_FRAMESET_CUT_TREE ; 1e + const SPRITE_ANIM_FRAMESET_EGG_CRACK ; 1f + const SPRITE_ANIM_FRAMESET_EGG_HATCH_1 ; 20 + const SPRITE_ANIM_FRAMESET_EGG_HATCH_2 ; 21 + const SPRITE_ANIM_FRAMESET_EGG_HATCH_3 ; 22 + const SPRITE_ANIM_FRAMESET_EGG_HATCH_4 ; 23 + const SPRITE_ANIM_FRAMESET_GS_INTRO_HO_OH_LUGIA ; 24 + const SPRITE_ANIM_FRAMESET_HEADBUTT ; 25 + const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 ; 26 + const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_2 ; 27 + const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 28 + const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_4 ; 29 + const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_5 ; 2a + const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_6 ; 2b + const SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_7 ; 2c + const SPRITE_ANIM_FRAMESET_BLUE_WALK ; 2d + const SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_BLUE ; 2e + const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_BALL ; 2f + const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_BALL ; 30 + const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_CABLE_BULGE ; 31 + const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_PULSE ; 32 + const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_PULSE ; 33 + const SPRITE_ANIM_FRAMESET_MOBILE_TRADE_PING ; 34 + const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE ; 35 + const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_2 ; 36 + const SPRITE_ANIM_FRAMESET_INTRO_PICHU ; 37 + const SPRITE_ANIM_FRAMESET_INTRO_WOOPER ; 38 + const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_1 ; 39 + const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_2 ; 3a + const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_3 ; 3b + const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_4 ; 3c + const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F_2 ; 3d + const SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_AWAY ; 3e + const SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F ; 3f + const SPRITE_ANIM_FRAMESET_CELEBI_LEFT ; 40 + const SPRITE_ANIM_FRAMESET_CELEBI_RIGHT ; 41 +DEF NUM_SPRITE_ANIM_FRAMESETS EQU const_value + +; SpriteAnimOAMData indexes (see data/sprite_anims/oam.asm) + const_def + const SPRITE_ANIM_OAMSET_RED_WALK_1 ; 00 + const SPRITE_ANIM_OAMSET_RED_WALK_2 ; 01 + const SPRITE_ANIM_OAMSET_GS_INTRO_BUBBLE_1 ; 02 + const SPRITE_ANIM_OAMSET_GS_INTRO_BUBBLE_2 ; 03 + const SPRITE_ANIM_OAMSET_GS_INTRO_SHELLDER_1 ; 04 + const SPRITE_ANIM_OAMSET_GS_INTRO_SHELLDER_2 ; 05 + const SPRITE_ANIM_OAMSET_GS_INTRO_MAGIKARP_1 ; 06 + const SPRITE_ANIM_OAMSET_GS_INTRO_MAGIKARP_2 ; 07 + const SPRITE_ANIM_OAMSET_GS_INTRO_UNUSED_LAPRAS ; 08 + const SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_1 ; 09 + const SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_2 ; 0a + const SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_3 ; 0b + const SPRITE_ANIM_OAMSET_GS_INTRO_NOTE ; 0c + const SPRITE_ANIM_OAMSET_GS_INTRO_INVISIBLE_NOTE ; 0d + const SPRITE_ANIM_OAMSET_GS_INTRO_JIGGLYPUFF_1 ; 0e + const SPRITE_ANIM_OAMSET_GS_INTRO_JIGGLYPUFF_2 ; 0f + const SPRITE_ANIM_OAMSET_GS_INTRO_JIGGLYPUFF_3 ; 10 + const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_1 ; 11 + const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_2 ; 12 + const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_3 ; 13 + const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_4 ; 14 + const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_TAIL_1 ; 15 + const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_TAIL_2 ; 16 + const SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_TAIL_3 ; 17 + const SPRITE_ANIM_OAMSET_GS_INTRO_SMALL_FIREBALL ; 18 + const SPRITE_ANIM_OAMSET_GS_INTRO_MED_FIREBALL ; 19 + const SPRITE_ANIM_OAMSET_GS_INTRO_BIG_FIREBALL ; 1a + const SPRITE_ANIM_OAMSET_GS_INTRO_CHIKORITA ; 1b + const SPRITE_ANIM_OAMSET_GS_INTRO_CYNDAQUIL ; 1c + const SPRITE_ANIM_OAMSET_GS_INTRO_TOTODILE ; 1d + const SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_1 ; 1e + const SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_2 ; 1f + const SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR ; 20 + const SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR_BIG ; 21 + const SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO ; 22 + const SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_STAR ; 23 + const SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_SPARKLE_1 ; 24 + const SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_SPARKLE_2 ; 25 + const SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_SPARKLE_3 ; 26 + const SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1 ; 27 + const SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2 ; 28 + const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_1 ; 29 + const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_2 ; 2a + const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_3 ; 2b + const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_4 ; 2c + const SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_5 ; 2d + const SPRITE_ANIM_OAMSET_SLOTS_EGG ; 2e + const SPRITE_ANIM_OAMSET_STILL_CURSOR ; 2f + const SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1 ; 30 + const SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2 ; 31 + const SPRITE_ANIM_OAMSET_TRADE_POOF_1 ; 32 + const SPRITE_ANIM_OAMSET_TRADE_POOF_2 ; 33 + const SPRITE_ANIM_OAMSET_TRADE_POOF_3 ; 34 + const SPRITE_ANIM_OAMSET_TRADE_TUBE_BULGE_1 ; 35 + const SPRITE_ANIM_OAMSET_TRADE_TUBE_BULGE_2 ; 36 + const SPRITE_ANIM_OAMSET_TRADEMON_ICON_1 ; 37 + const SPRITE_ANIM_OAMSET_TRADEMON_ICON_2 ; 38 + const SPRITE_ANIM_OAMSET_TRADEMON_BUBBLE ; 39 + const SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_1 ; 3a + const SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_2 ; 3b + const SPRITE_ANIM_OAMSET_RADIO_TUNING_KNOB ; 3c + const SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_1 ; 3d + const SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_2 ; 3e + const SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_1 ; 3f + const SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_2 ; 40 + const SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_1 ; 41 + const SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2 ; 42 + const SPRITE_ANIM_OAMSET_UNUSED_43 ; 43 + const SPRITE_ANIM_OAMSET_UNUSED_44 ; 44 + const SPRITE_ANIM_OAMSET_UNUSED_45 ; 45 + const SPRITE_ANIM_OAMSET_UNUSED_46 ; 46 + const SPRITE_ANIM_OAMSET_UNUSED_47 ; 47 + const SPRITE_ANIM_OAMSET_UNUSED_48 ; 48 + const SPRITE_ANIM_OAMSET_UNUSED_49 ; 49 + const SPRITE_ANIM_OAMSET_UNUSED_4A ; 4a + const SPRITE_ANIM_OAMSET_UNUSED_4B ; 4b + const SPRITE_ANIM_OAMSET_UNUSED_4C ; 4c + const SPRITE_ANIM_OAMSET_UNUSED_4D ; 4d + const SPRITE_ANIM_OAMSET_UNUSED_4E ; 4e + const SPRITE_ANIM_OAMSET_LEAF ; 4f + const SPRITE_ANIM_OAMSET_TREE_1 ; 50 + const SPRITE_ANIM_OAMSET_CUT_TREE_2 ; 51 + const SPRITE_ANIM_OAMSET_CUT_TREE_3 ; 52 + const SPRITE_ANIM_OAMSET_CUT_TREE_4 ; 53 + const SPRITE_ANIM_OAMSET_EGG_CRACK ; 54 + const SPRITE_ANIM_OAMSET_EGG_HATCH ; 55 + const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_1 ; 56 + const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_2 ; 57 + const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_3 ; 58 + const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_4 ; 59 + const SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_5 ; 5a + const SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2 ; 5b + const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_1 ; 5c + const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_2 ; 5d + const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_3 ; 5e + const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_4 ; 5f + const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_5 ; 60 + const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_6 ; 61 + const SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_7 ; 62 + const SPRITE_ANIM_OAMSET_BLUE_WALK_1 ; 63 + const SPRITE_ANIM_OAMSET_BLUE_WALK_2 ; 64 + const SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_1 ; 65 + const SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2 ; 66 + const SPRITE_ANIM_OAMSET_MOBILE_TRADE_CABLE_BULGE_1 ; 67 + const SPRITE_ANIM_OAMSET_MOBILE_TRADE_CABLE_BULGE_2 ; 68 + const SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_1 ; 69 + const SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_2 ; 6a + const SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_3 ; 6b + const SPRITE_ANIM_OAMSET_MOBILE_TRADE_SENT_PULSE ; 6c + const SPRITE_ANIM_OAMSET_MOBILE_TRADE_OT_PULSE ; 6d + const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_1 ; 6e + const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_2 ; 6f + const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_3 ; 70 + const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_4 ; 71 + const SPRITE_ANIM_OAMSET_INTRO_PICHU_1 ; 72 + const SPRITE_ANIM_OAMSET_INTRO_PICHU_2 ; 73 + const SPRITE_ANIM_OAMSET_INTRO_PICHU_3 ; 74 + const SPRITE_ANIM_OAMSET_INTRO_WOOPER ; 75 + const SPRITE_ANIM_OAMSET_INTRO_UNOWN_1 ; 76 + const SPRITE_ANIM_OAMSET_INTRO_UNOWN_2 ; 77 + const SPRITE_ANIM_OAMSET_INTRO_UNOWN_3 ; 78 + const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_1 ; 79 + const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_2 ; 7a + const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_3 ; 7b + const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_4 ; 7c + const SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_5 ; 7d + const SPRITE_ANIM_OAMSET_INTRO_SUICUNE_AWAY ; 7e + const SPRITE_ANIM_OAMSET_CELEBI_1 ; 7f + const SPRITE_ANIM_OAMSET_CELEBI_2 ; 80 + const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_1 ; 81 + const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_2 ; 82 + const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_3 ; 83 + const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_4 ; 84 + const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_5 ; 85 + const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_6 ; 86 + const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_7 ; 87 + const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_8 ; 88 + const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_9 ; 89 + const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_10 ; 8a + const SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_11 ; 8b +DEF NUM_SPRITE_ANIM_OAMSETS EQU const_value diff --git a/constants/sprite_constants.asm b/constants/sprite_constants.asm new file mode 100644 index 0000000..1181285 --- /dev/null +++ b/constants/sprite_constants.asm @@ -0,0 +1,169 @@ +; sprite ids +; OverworldSprites indexes (see data/sprites/sprites.asm) + const_def + const SPRITE_NONE ; 00 + const SPRITE_CHRIS ; 01 + const SPRITE_CHRIS_BIKE ; 02 + const SPRITE_GAMEBOY_KID ; 03 + const SPRITE_RIVAL ; 04 + const SPRITE_OAK ; 05 + const SPRITE_RED ; 06 + const SPRITE_BLUE ; 07 + const SPRITE_BILL ; 08 + const SPRITE_ELDER ; 09 + const SPRITE_JANINE ; 0a + const SPRITE_KURT ; 0b + const SPRITE_MOM ; 0c + const SPRITE_BLAINE ; 0d + const SPRITE_REDS_MOM ; 0e + const SPRITE_DAISY ; 0f + const SPRITE_ELM ; 10 + const SPRITE_WILL ; 11 + const SPRITE_FALKNER ; 12 + const SPRITE_WHITNEY ; 13 + const SPRITE_BUGSY ; 14 + const SPRITE_MORTY ; 15 + const SPRITE_CHUCK ; 16 + const SPRITE_JASMINE ; 17 + const SPRITE_PRYCE ; 18 + const SPRITE_CLAIR ; 19 + const SPRITE_BROCK ; 1a + const SPRITE_KAREN ; 1b + const SPRITE_BRUNO ; 1c + const SPRITE_MISTY ; 1d + const SPRITE_LANCE ; 1e + const SPRITE_SURGE ; 1f + const SPRITE_ERIKA ; 20 + const SPRITE_KOGA ; 21 + const SPRITE_SABRINA ; 22 + const SPRITE_COOLTRAINER_M ; 23 + const SPRITE_COOLTRAINER_F ; 24 + const SPRITE_BUG_CATCHER ; 25 + const SPRITE_TWIN ; 26 + const SPRITE_YOUNGSTER ; 27 + const SPRITE_LASS ; 28 + const SPRITE_TEACHER ; 29 + const SPRITE_BEAUTY ; 2a + const SPRITE_SUPER_NERD ; 2b + const SPRITE_ROCKER ; 2c + const SPRITE_POKEFAN_M ; 2d + const SPRITE_POKEFAN_F ; 2e + const SPRITE_GRAMPS ; 2f + const SPRITE_GRANNY ; 30 + const SPRITE_SWIMMER_GUY ; 31 + const SPRITE_SWIMMER_GIRL ; 32 + const SPRITE_BIG_SNORLAX ; 33 + const SPRITE_SURFING_PIKACHU ; 34 + const SPRITE_ROCKET ; 35 + const SPRITE_ROCKET_GIRL ; 36 + const SPRITE_NURSE ; 37 + const SPRITE_LINK_RECEPTIONIST ; 38 + const SPRITE_CLERK ; 39 + const SPRITE_FISHER ; 3a + const SPRITE_FISHING_GURU ; 3b + const SPRITE_SCIENTIST ; 3c + const SPRITE_KIMONO_GIRL ; 3d + const SPRITE_SAGE ; 3e + const SPRITE_UNUSED_GUY ; 3f + const SPRITE_GENTLEMAN ; 40 + const SPRITE_BLACK_BELT ; 41 + const SPRITE_RECEPTIONIST ; 42 + const SPRITE_OFFICER ; 43 + const SPRITE_CAL ; 44 + const SPRITE_SLOWPOKE ; 45 + const SPRITE_CAPTAIN ; 46 + const SPRITE_BIG_LAPRAS ; 47 + const SPRITE_GYM_GUIDE ; 48 + const SPRITE_SAILOR ; 49 + const SPRITE_BIKER ; 4a + const SPRITE_PHARMACIST ; 4b + const SPRITE_MONSTER ; 4c + const SPRITE_FAIRY ; 4d + const SPRITE_BIRD ; 4e + const SPRITE_DRAGON ; 4f + const SPRITE_BIG_ONIX ; 50 + const SPRITE_N64 ; 51 + const SPRITE_SUDOWOODO ; 52 + const SPRITE_SURF ; 53 + const SPRITE_POKE_BALL ; 54 + const SPRITE_POKEDEX ; 55 + const SPRITE_PAPER ; 56 + const SPRITE_VIRTUAL_BOY ; 57 + const SPRITE_OLD_LINK_RECEPTIONIST ; 58 + const SPRITE_ROCK ; 59 + const SPRITE_BOULDER ; 5a + const SPRITE_SNES ; 5b + const SPRITE_FAMICOM ; 5c + const SPRITE_FRUIT_TREE ; 5d + const SPRITE_GOLD_TROPHY ; 5e + const SPRITE_SILVER_TROPHY ; 5f + const SPRITE_KRIS ; 60 + const SPRITE_KRIS_BIKE ; 61 + const SPRITE_KURT_OUTSIDE ; 62 + const SPRITE_SUICUNE ; 63 + const SPRITE_ENTEI ; 64 + const SPRITE_RAIKOU ; 65 + const SPRITE_STANDING_YOUNGSTER ; 66 +DEF NUM_OVERWORLD_SPRITES EQU const_value - 1 + +; SpriteMons indexes (see data/sprites/sprite_mons.asm) + const_next $80 +DEF SPRITE_POKEMON EQU const_value + const SPRITE_UNOWN ; 80 + const SPRITE_GEODUDE ; 81 + const SPRITE_GROWLITHE ; 82 + const SPRITE_WEEDLE ; 83 + const SPRITE_SHELLDER ; 84 + const SPRITE_ODDISH ; 85 + const SPRITE_GENGAR ; 86 + const SPRITE_ZUBAT ; 87 + const SPRITE_MAGIKARP ; 88 + const SPRITE_SQUIRTLE ; 89 + const SPRITE_TOGEPI ; 8a + const SPRITE_BUTTERFREE ; 8b + const SPRITE_DIGLETT ; 8c + const SPRITE_POLIWAG ; 8d + const SPRITE_PIKACHU ; 8e + const SPRITE_CLEFAIRY ; 8f + const SPRITE_CHARMANDER ; 90 + const SPRITE_JYNX ; 91 + const SPRITE_STARMIE ; 92 + const SPRITE_BULBASAUR ; 93 + const SPRITE_JIGGLYPUFF ; 94 + const SPRITE_GRIMER ; 95 + const SPRITE_EKANS ; 96 + const SPRITE_PARAS ; 97 + const SPRITE_TENTACOOL ; 98 + const SPRITE_TAUROS ; 99 + const SPRITE_MACHOP ; 9a + const SPRITE_VOLTORB ; 9b + const SPRITE_LAPRAS ; 9c + const SPRITE_RHYDON ; 9d + const SPRITE_MOLTRES ; 9e + const SPRITE_SNORLAX ; 9f + const SPRITE_GYARADOS ; a0 + const SPRITE_LUGIA ; a1 + const SPRITE_HO_OH ; a2 +DEF NUM_POKEMON_SPRITES EQU const_value - SPRITE_POKEMON + +; special GetMonSprite values (see engine/overworld/overworld.asm) + const_next $e0 + const SPRITE_DAY_CARE_MON_1 ; e0 + const SPRITE_DAY_CARE_MON_2 ; e1 + +; wVariableSprites indexes (see wram.asm) + const_next $f0 +DEF SPRITE_VARS EQU const_value + const SPRITE_CONSOLE ; f0 + const SPRITE_DOLL_1 ; f1 + const SPRITE_DOLL_2 ; f2 + const SPRITE_BIG_DOLL ; f3 + const SPRITE_WEIRD_TREE ; f4 + const SPRITE_OLIVINE_RIVAL ; f5 + const SPRITE_AZALEA_ROCKET ; f6 + const SPRITE_FUCHSIA_GYM_1 ; f7 + const SPRITE_FUCHSIA_GYM_2 ; f8 + const SPRITE_FUCHSIA_GYM_3 ; f9 + const SPRITE_FUCHSIA_GYM_4 ; fa + const SPRITE_COPYCAT ; fb + const SPRITE_JANINE_IMPERSONATOR ; fc diff --git a/constants/sprite_data_constants.asm b/constants/sprite_data_constants.asm new file mode 100644 index 0000000..a7dc809 --- /dev/null +++ b/constants/sprite_data_constants.asm @@ -0,0 +1,37 @@ +; overworld_sprite struct members (see data/sprites/sprites.asm) +rsreset +DEF SPRITEDATA_ADDR rw ; 0 +DEF SPRITEDATA_SIZE rb ; 2 +DEF SPRITEDATA_BANK rb ; 3 +DEF SPRITEDATA_TYPE rb ; 4 +DEF SPRITEDATA_PALETTE rb ; 5 +DEF NUM_SPRITEDATA_FIELDS EQU _RS + +; sprite types + const_def 1 + const WALKING_SPRITE ; 1 + const STANDING_SPRITE ; 2 + const STILL_SPRITE ; 3 + +; sprite palettes + const_def + const PAL_OW_RED ; 0 + const PAL_OW_BLUE ; 1 + const PAL_OW_GREEN ; 2 + const PAL_OW_BROWN ; 3 + const PAL_OW_PINK ; 4 + const PAL_OW_EMOTE ; 5 + const PAL_OW_TREE ; 6 + const PAL_OW_ROCK ; 7 + +; object_events set bit 3 so as not to use the sprite's default palette +; MapObjectPals indexes (see gfx/overworld/npc_sprites.pal) + const_def 1 << 3 + const PAL_NPC_RED ; 8 + const PAL_NPC_BLUE ; 9 + const PAL_NPC_GREEN ; a + const PAL_NPC_BROWN ; b + const PAL_NPC_PINK ; c + const PAL_NPC_EMOTE ; d + const PAL_NPC_TREE ; e + const PAL_NPC_ROCK ; f diff --git a/constants/text_constants.asm b/constants/text_constants.asm new file mode 100644 index 0000000..a6ee360 --- /dev/null +++ b/constants/text_constants.asm @@ -0,0 +1,50 @@ +; name lengths +DEF NAME_LENGTH EQU 11 +DEF PLAYER_NAME_LENGTH EQU 8 +DEF BOX_NAME_LENGTH EQU 9 +DEF MON_NAME_LENGTH EQU 11 +DEF MOVE_NAME_LENGTH EQU 13 +DEF ITEM_NAME_LENGTH EQU 13 +DEF TRAINER_CLASS_NAME_LENGTH EQU 13 +DEF NAME_LENGTH_JAPANESE EQU 6 + +; GetName types (see home/names.asm) + const_def 1 + const MON_NAME ; 1 + const MOVE_NAME ; 2 + const ITEM_NAME ; 3 + const PARTY_OT_NAME ; 4 + const ENEMY_OT_NAME ; 5 + const TRAINER_NAME ; 6 + +; see home/text.asm +DEF BORDER_WIDTH EQU 2 +DEF TEXTBOX_WIDTH EQU SCREEN_WIDTH +DEF TEXTBOX_INNERW EQU TEXTBOX_WIDTH - BORDER_WIDTH +DEF TEXTBOX_HEIGHT EQU 6 +DEF TEXTBOX_INNERH EQU TEXTBOX_HEIGHT - BORDER_WIDTH +DEF TEXTBOX_X EQU 0 +DEF TEXTBOX_INNERX EQU TEXTBOX_X + 1 +DEF TEXTBOX_Y EQU SCREEN_HEIGHT - TEXTBOX_HEIGHT +DEF TEXTBOX_INNERY EQU TEXTBOX_Y + 2 + +; see gfx/frames/*.png +DEF TEXTBOX_FRAME_TILES EQU 6 + +; PrintNum bit flags + const_def 5 + const PRINTNUM_MONEY_F ; 5 + const PRINTNUM_LEFTALIGN_F ; 6 + const PRINTNUM_LEADINGZEROS_F ; 7 + +; PrintNum arguments (see engine/math/print_num.asm) +DEF PRINTNUM_MONEY EQU 1 << PRINTNUM_MONEY_F +DEF PRINTNUM_LEFTALIGN EQU 1 << PRINTNUM_LEFTALIGN_F +DEF PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F + +; character sets (see charmap.asm) +DEF FIRST_REGULAR_TEXT_CHAR EQU $60 +DEF FIRST_HIRAGANA_DAKUTEN_CHAR EQU $20 + +; gfx/font/unown_font.png +DEF FIRST_UNOWN_CHAR EQU $40 diff --git a/constants/tileset_constants.asm b/constants/tileset_constants.asm new file mode 100644 index 0000000..2b4f976 --- /dev/null +++ b/constants/tileset_constants.asm @@ -0,0 +1,57 @@ +; Tilesets indexes (see data/tilesets.asm) + const_def 1 + const TILESET_JOHTO ; 01 + const TILESET_JOHTO_MODERN ; 02 + const TILESET_KANTO ; 03 + const TILESET_BATTLE_TOWER_OUTSIDE ; 04 + const TILESET_HOUSE ; 05 + const TILESET_PLAYERS_HOUSE ; 06 + const TILESET_POKECENTER ; 07 + const TILESET_GATE ; 08 + const TILESET_PORT ; 09 + const TILESET_LAB ; 0a + const TILESET_FACILITY ; 0b + const TILESET_MART ; 0c + const TILESET_MANSION ; 0d + const TILESET_GAME_CORNER ; 0e + const TILESET_ELITE_FOUR_ROOM ; 0f + const TILESET_TRADITIONAL_HOUSE ; 10 + const TILESET_TRAIN_STATION ; 11 + const TILESET_CHAMPIONS_ROOM ; 12 + const TILESET_LIGHTHOUSE ; 13 + const TILESET_PLAYERS_ROOM ; 14 + const TILESET_POKECOM_CENTER ; 15 + const TILESET_BATTLE_TOWER_INSIDE ; 16 + const TILESET_TOWER ; 17 + const TILESET_CAVE ; 18 + const TILESET_PARK ; 19 + const TILESET_RUINS_OF_ALPH ; 1a + const TILESET_RADIO_TOWER ; 1b + const TILESET_UNDERGROUND ; 1c + const TILESET_ICE_PATH ; 1d + const TILESET_DARK_CAVE ; 1e + const TILESET_FOREST ; 1f + const TILESET_BETA_WORD_ROOM ; 20 + const TILESET_HO_OH_WORD_ROOM ; 21 + const TILESET_KABUTO_WORD_ROOM ; 22 + const TILESET_OMANYTE_WORD_ROOM ; 23 + const TILESET_AERODACTYL_WORD_ROOM ; 24 +DEF NUM_TILESETS EQU const_value - 1 + +; wTileset struct size +DEF TILESET_LENGTH EQU 15 + +; roof length (see gfx/tilesets/roofs) +DEF ROOF_LENGTH EQU 9 + +; bg palette values (see gfx/tilesets/*_palette_map.asm) +; TilesetBGPalette indexes (see gfx/tilesets/bg_tiles.pal) + const_def + const PAL_BG_GRAY ; 0 + const PAL_BG_RED ; 1 + const PAL_BG_GREEN ; 2 + const PAL_BG_WATER ; 3 + const PAL_BG_YELLOW ; 4 + const PAL_BG_BROWN ; 5 + const PAL_BG_ROOF ; 6 + const PAL_BG_TEXT ; 7 diff --git a/constants/trainer_constants.asm b/constants/trainer_constants.asm new file mode 100644 index 0000000..a56ab82 --- /dev/null +++ b/constants/trainer_constants.asm @@ -0,0 +1,706 @@ +DEF __trainer_class__ = 0 + +MACRO trainerclass + DEF \1 EQU __trainer_class__ + DEF __trainer_class__ += 1 + const_def 1 +ENDM + +; trainer class ids +; `trainerclass` indexes are for: +; - TrainerClassNames (see data/trainers/class_names.asm) +; - TrainerClassAttributes (see data/trainers/attributes.asm) +; - TrainerClassDVs (see data/trainers/dvs.asm) +; - TrainerGroups (see data/trainers/party_pointers.asm) +; - TrainerEncounterMusic (see data/trainers/encounter_music.asm) +; - TrainerPicPointers (see data/trainers/pic_pointers.asm) +; - TrainerPalettes (see data/trainers/palettes.asm) +; - BTTrainerClassSprites (see data/trainers/sprites.asm) +; - BTTrainerClassGenders (see data/trainers/genders.asm) +; trainer constants are Trainers indexes, for the sub-tables of TrainerGroups (see data/trainers/parties.asm) +DEF CHRIS EQU __trainer_class__ + trainerclass TRAINER_NONE ; 0 + const PHONECONTACT_MOM + const PHONECONTACT_BIKESHOP + const PHONECONTACT_BILL + const PHONECONTACT_ELM + const PHONECONTACT_BUENA +DEF NUM_NONTRAINER_PHONECONTACTS EQU const_value - 1 + +DEF KRIS EQU __trainer_class__ + trainerclass FALKNER ; 1 + const FALKNER1 + + trainerclass WHITNEY ; 2 + const WHITNEY1 + + trainerclass BUGSY ; 3 + const BUGSY1 + + trainerclass MORTY ; 4 + const MORTY1 + + trainerclass PRYCE ; 5 + const PRYCE1 + + trainerclass JASMINE ; 6 + const JASMINE1 + + trainerclass CHUCK ; 7 + const CHUCK1 + + trainerclass CLAIR ; 8 + const CLAIR1 + + trainerclass RIVAL1 ; 9 + const RIVAL1_1_CHIKORITA + const RIVAL1_1_CYNDAQUIL + const RIVAL1_1_TOTODILE + const RIVAL1_2_CHIKORITA + const RIVAL1_2_CYNDAQUIL + const RIVAL1_2_TOTODILE + const RIVAL1_3_CHIKORITA + const RIVAL1_3_CYNDAQUIL + const RIVAL1_3_TOTODILE + const RIVAL1_4_CHIKORITA + const RIVAL1_4_CYNDAQUIL + const RIVAL1_4_TOTODILE + const RIVAL1_5_CHIKORITA + const RIVAL1_5_CYNDAQUIL + const RIVAL1_5_TOTODILE + + trainerclass POKEMON_PROF ; a + + trainerclass WILL ; b + const WILL1 + + trainerclass CAL ; c + const CAL1 ; unused + const CAL2 + const CAL3 + + trainerclass BRUNO ; d + const BRUNO1 + + trainerclass KAREN ; e + const KAREN1 + + trainerclass KOGA ; f + const KOGA1 + + trainerclass CHAMPION ; 10 + const LANCE + + trainerclass BROCK ; 11 + const BROCK1 + + trainerclass MISTY ; 12 + const MISTY1 + + trainerclass LT_SURGE ; 13 + const LT_SURGE1 + + trainerclass SCIENTIST ; 14 + const ROSS + const MITCH + const JED + const MARC + const RICH + + trainerclass ERIKA ; 15 + const ERIKA1 + + trainerclass YOUNGSTER ; 16 + const JOEY1 + const MIKEY + const ALBERT + const GORDON + const SAMUEL + const IAN + const JOEY2 + const JOEY3 + const WARREN + const JIMMY + const OWEN + const JASON + const JOEY4 + const JOEY5 + + trainerclass SCHOOLBOY ; 17 + const JACK1 + const KIPP + const ALAN1 + const JOHNNY + const DANNY + const TOMMY + const DUDLEY + const JOE + const BILLY + const CHAD1 + const NATE + const RICKY + const JACK2 + const JACK3 + const ALAN2 + const ALAN3 + const CHAD2 + const CHAD3 + const JACK4 + const JACK5 + const ALAN4 + const ALAN5 + const CHAD4 + const CHAD5 + + trainerclass BIRD_KEEPER ; 18 + const ROD + const ABE + const BRYAN + const THEO + const TOBY + const DENIS + const VANCE1 + const HANK + const ROY + const BORIS + const BOB + const JOSE1 + const PETER + const JOSE2 + const PERRY + const BRET + const JOSE3 + const VANCE2 + const VANCE3 + + trainerclass LASS ; 19 + const CARRIE + const BRIDGET + const ALICE + const KRISE + const CONNIE1 + const LINDA + const LAURA + const SHANNON + const MICHELLE + const DANA1 + const ELLEN + const CONNIE2 ; unused + const CONNIE3 ; unused + const DANA2 + const DANA3 + const DANA4 + const DANA5 + + trainerclass JANINE ; 1a + const JANINE1 + + trainerclass COOLTRAINERM ; 1b + const NICK + const AARON + const PAUL + const CODY + const MIKE + const GAVEN1 + const GAVEN2 + const RYAN + const JAKE + const GAVEN3 + const BLAKE + const BRIAN + const ERICK ; unused + const ANDY ; unused + const TYLER ; unused + const SEAN + const KEVIN + const STEVE ; unused + const ALLEN + const DARIN + + trainerclass COOLTRAINERF ; 1c + const GWEN + const LOIS + const FRAN + const LOLA + const KATE + const IRENE + const KELLY + const JOYCE + const BETH1 + const REENA1 + const MEGAN + const BETH2 + const CAROL + const QUINN + const EMMA + const CYBIL + const JENN + const BETH3 + const REENA2 + const REENA3 + const CARA + + trainerclass BEAUTY ; 1d + const VICTORIA + const SAMANTHA + const JULIE ; unused + const JACLYN ; unused + const BRENDA ; unused + const CASSIE + const CAROLINE ; unused + const CARLENE ; unused + const JESSICA ; unused + const RACHAEL ; unused + const ANGELICA ; unused + const KENDRA ; unused + const VERONICA ; unused + const JULIA + const THERESA ; unused + const VALERIE + const OLIVIA + + trainerclass POKEMANIAC ; 1e + const LARRY + const ANDREW + const CALVIN + const SHANE + const BEN + const BRENT1 + const RON + const ETHAN + const BRENT2 + const BRENT3 + const ISSAC + const DONALD + const ZACH + const BRENT4 + const MILLER + + trainerclass GRUNTM ; 1f + const GRUNTM_1 + const GRUNTM_2 + const GRUNTM_3 + const GRUNTM_4 + const GRUNTM_5 + const GRUNTM_6 + const GRUNTM_7 + const GRUNTM_8 + const GRUNTM_9 + const GRUNTM_10 + const GRUNTM_11 + const GRUNTM_12 ; unused + const GRUNTM_13 + const GRUNTM_14 + const GRUNTM_15 + const GRUNTM_16 + const GRUNTM_17 + const GRUNTM_18 + const GRUNTM_19 + const GRUNTM_20 + const GRUNTM_21 + const GRUNTM_22 ; unused + const GRUNTM_23 ; unused + const GRUNTM_24 + const GRUNTM_25 + const GRUNTM_26 ; unused + const GRUNTM_27 ; unused + const GRUNTM_28 + const GRUNTM_29 + const GRUNTM_30 ; unused + const GRUNTM_31 + + trainerclass GENTLEMAN ; 20 + const PRESTON + const EDWARD + const GREGORY + const VIRGIL ; unused + const ALFRED + + trainerclass SKIER ; 21 + const ROXANNE + const CLARISSA + + trainerclass TEACHER ; 22 + const COLETTE + const HILLARY + const SHIRLEY + + trainerclass SABRINA ; 23 + const SABRINA1 + + trainerclass BUG_CATCHER ; 24 + const DON + const ROB + const ED + const WADE1 + const BUG_CATCHER_BENNY + const AL + const JOSH + const ARNIE1 + const KEN + const WADE2 + const WADE3 + const DOUG + const ARNIE2 + const ARNIE3 + const WADE4 + const WADE5 + const ARNIE4 + const ARNIE5 + const WAYNE + + trainerclass FISHER ; 25 + const JUSTIN + const RALPH1 + const ARNOLD + const KYLE + const HENRY + const MARVIN + const TULLY1 + const ANDRE + const RAYMOND + const WILTON1 + const EDGAR + const JONAH + const MARTIN + const STEPHEN + const BARNEY + const RALPH2 + const RALPH3 + const TULLY2 + const TULLY3 + const WILTON2 + const SCOTT + const WILTON3 + const RALPH4 + const RALPH5 + const TULLY4 + + trainerclass SWIMMERM ; 26 + const HAROLD + const SIMON + const RANDALL + const CHARLIE + const GEORGE + const BERKE + const KIRK + const MATHEW + const HAL ; unused + const PATON ; unused + const DARYL ; unused + const WALTER ; unused + const TONY ; unused + const JEROME + const TUCKER + const RICK ; unused + const CAMERON + const SETH + const JAMES ; unused + const LEWIS ; unused + const PARKER + + trainerclass SWIMMERF ; 27 + const ELAINE + const PAULA + const KAYLEE + const SUSIE + const DENISE + const KARA + const WENDY + const LISA ; unused + const JILL ; unused + const MARY ; unused + const KATIE ; unused + const DAWN + const TARA ; unused + const NICOLE + const LORI + const JODY ; unused + const NIKKI + const DIANA + const BRIANA + + trainerclass SAILOR ; 28 + const EUGENE + const HUEY1 + const TERRELL + const KENT + const ERNEST + const JEFF + const GARRETT + const KENNETH + const STANLY + const HARRY + const HUEY2 + const HUEY3 + const HUEY4 + + trainerclass SUPER_NERD ; 29 + const STAN + const ERIC + const GREGG ; unused + const JAY ; unused + const DAVE ; unused + const SAM + const TOM + const PAT + const SHAWN + const TERU + const RUSS ; unused + const NORTON ; unused + const HUGH + const MARKUS + + trainerclass RIVAL2 ; 2a + const RIVAL2_1_CHIKORITA + const RIVAL2_1_CYNDAQUIL + const RIVAL2_1_TOTODILE + const RIVAL2_2_CHIKORITA + const RIVAL2_2_CYNDAQUIL + const RIVAL2_2_TOTODILE + + trainerclass GUITARIST ; 2b + const CLYDE + const VINCENT + + trainerclass HIKER ; 2c + const ANTHONY1 + const RUSSELL + const PHILLIP + const LEONARD + const ANTHONY2 + const BENJAMIN + const ERIK + const MICHAEL + const PARRY1 + const TIMOTHY + const BAILEY + const ANTHONY3 + const TIM + const NOLAND + const SIDNEY + const KENNY + const JIM + const DANIEL + const PARRY2 + const PARRY3 + const ANTHONY4 + const ANTHONY5 + + trainerclass BIKER ; 2d + const BIKER_BENNY ; unused + const KAZU ; unused + const DWAYNE + const HARRIS + const ZEKE + const CHARLES + const RILEY + const JOEL + const GLENN + + trainerclass BLAINE ; 2e + const BLAINE1 + + trainerclass BURGLAR ; 2f + const DUNCAN + const EDDIE + const COREY + + trainerclass FIREBREATHER ; 30 + const OTIS + const DICK ; unused + const NED ; unused + const BURT + const BILL + const WALT + const RAY + const LYLE + + trainerclass JUGGLER ; 31 + const IRWIN1 + const FRITZ + const HORTON + const IRWIN2 ; unused + const IRWIN3 ; unused + const IRWIN4 ; unused + + trainerclass BLACKBELT_T ; 32 + const KENJI1 ; unused + const YOSHI + const KENJI2 ; unused + const LAO + const NOB + const KIYO + const LUNG + const KENJI3 + const WAI + + trainerclass EXECUTIVEM ; 33 + const EXECUTIVEM_1 + const EXECUTIVEM_2 + const EXECUTIVEM_3 + const EXECUTIVEM_4 + + trainerclass PSYCHIC_T ; 34 + const NATHAN + const FRANKLIN + const HERMAN + const FIDEL + const GREG + const NORMAN + const MARK + const PHIL + const RICHARD + const GILBERT + const JARED + const RODNEY + + trainerclass PICNICKER ; 35 + const LIZ1 + const GINA1 + const BROOKE + const KIM + const CINDY + const HOPE + const SHARON + const DEBRA + const GINA2 + const ERIN1 + const LIZ2 + const LIZ3 + const HEIDI + const EDNA + const GINA3 + const TIFFANY1 + const TIFFANY2 + const ERIN2 + const TANYA + const TIFFANY3 + const ERIN3 + const LIZ4 + const LIZ5 + const GINA4 + const GINA5 + const TIFFANY4 + + trainerclass CAMPER ; 36 + const ROLAND + const TODD1 + const IVAN + const ELLIOT + const BARRY + const LLOYD + const DEAN + const SID + const HARVEY ; unused + const DALE ; unused + const TED + const TODD2 + const TODD3 + const THOMAS ; unused + const LEROY ; unused + const DAVID ; unused + const JOHN ; unused + const JERRY + const SPENCER + const TODD4 + const TODD5 + const QUENTIN + + trainerclass EXECUTIVEF ; 37 + const EXECUTIVEF_1 + const EXECUTIVEF_2 + + trainerclass SAGE ; 38 + const CHOW + const NICO + const JIN + const TROY + const JEFFREY + const PING + const EDMOND + const NEAL + const LI + const GAKU + const MASA + const KOJI + + trainerclass MEDIUM ; 39 + const MARTHA + const GRACE + const BETHANY ; unused + const MARGRET ; unused + const ETHEL ; unused + const REBECCA + const DORIS + + trainerclass BOARDER ; 3a + const RONALD + const BRAD + const DOUGLAS + + trainerclass POKEFANM ; 3b + const WILLIAM + const DEREK1 + const ROBERT + const JOSHUA + const CARTER + const TREVOR + const BRANDON + const JEREMY + const COLIN + const DEREK2 ; unused + const DEREK3 ; unused + const ALEX + const REX + const ALLAN + + trainerclass KIMONO_GIRL ; 3c + const NAOKO_UNUSED ; unused + const NAOKO + const SAYO + const ZUKI + const KUNI + const MIKI + + trainerclass TWINS ; 3d + const AMYANDMAY1 + const ANNANDANNE1 + const ANNANDANNE2 + const AMYANDMAY2 + const JOANDZOE1 + const JOANDZOE2 + const MEGANDPEG1 + const MEGANDPEG2 + const LEAANDPIA1 + const LEAANDPIA2 ; unused + + trainerclass POKEFANF ; 3e + const BEVERLY1 + const RUTH + const BEVERLY2 ; unused + const BEVERLY3 ; unused + const GEORGIA + const JAIME + + trainerclass RED ; 3f + const RED1 + + trainerclass BLUE ; 40 + const BLUE1 + + trainerclass OFFICER ; 41 + const KEITH + const DIRK + + trainerclass GRUNTF ; 42 + const GRUNTF_1 + const GRUNTF_2 + const GRUNTF_3 + const GRUNTF_4 + const GRUNTF_5 + + trainerclass MYSTICALMAN ; 43 + const EUSINE + +DEF NUM_TRAINER_CLASSES EQU __trainer_class__ - 1 diff --git a/constants/trainer_data_constants.asm b/constants/trainer_data_constants.asm new file mode 100644 index 0000000..2d8a705 --- /dev/null +++ b/constants/trainer_data_constants.asm @@ -0,0 +1,51 @@ +; TrainerClassAttributes struct members (see data/trainers/attributes.asm) +rsreset +DEF TRNATTR_ITEM1 rb ; 0 +DEF TRNATTR_ITEM2 rb ; 1 +DEF TRNATTR_BASEMONEY rb ; 2 +DEF TRNATTR_AI_MOVE_WEIGHTS rw ; 3 +DEF TRNATTR_AI_ITEM_SWITCH rw ; 5 +DEF NUM_TRAINER_ATTRIBUTES EQU _RS + +; TRNATTR_AI_MOVE_WEIGHTS bit flags (wEnemyTrainerAIFlags) +; AIScoringPointers indexes (see engine/battle/ai/move.asm) + const_def + shift_const AI_BASIC + shift_const AI_SETUP + shift_const AI_TYPES + shift_const AI_OFFENSIVE + shift_const AI_SMART + shift_const AI_OPPORTUNIST + shift_const AI_AGGRESSIVE + shift_const AI_CAUTIOUS + shift_const AI_STATUS + shift_const AI_RISKY +DEF NO_AI EQU 0 + +; TRNATTR_AI_ITEM_SWITCH bit flags + const_def + const SWITCH_OFTEN_F ; 0 + const SWITCH_RARELY_F ; 1 + const SWITCH_SOMETIMES_F ; 2 + const_skip ; 3 + const ALWAYS_USE_F ; 4 + const UNKNOWN_USE_F ; 5 + const CONTEXT_USE_F ; 6 + +DEF SWITCH_OFTEN EQU 1 << SWITCH_OFTEN_F +DEF SWITCH_RARELY EQU 1 << SWITCH_RARELY_F +DEF SWITCH_SOMETIMES EQU 1 << SWITCH_SOMETIMES_F +DEF ALWAYS_USE EQU 1 << ALWAYS_USE_F +DEF UNKNOWN_USE EQU 1 << UNKNOWN_USE_F +DEF CONTEXT_USE EQU 1 << CONTEXT_USE_F + +; TrainerTypes bits (see engine/battle/read_trainer_party.asm) + const_def + const TRAINERTYPE_MOVES_F + const TRAINERTYPE_ITEM_F + +; Trainer party types (see data/trainers/parties.asm) +DEF TRAINERTYPE_NORMAL EQU 0 +DEF TRAINERTYPE_MOVES EQU 1 << TRAINERTYPE_MOVES_F +DEF TRAINERTYPE_ITEM EQU 1 << TRAINERTYPE_ITEM_F +DEF TRAINERTYPE_ITEM_MOVES EQU TRAINERTYPE_MOVES | TRAINERTYPE_ITEM ;backwards compatibility diff --git a/constants/type_constants.asm b/constants/type_constants.asm new file mode 100644 index 0000000..49fa661 --- /dev/null +++ b/constants/type_constants.asm @@ -0,0 +1,39 @@ +; TypeNames indexes (see data/types/names.asm) +; also used in: +; - PokedexTypeSearchConversionTable (see data/types/search_types.asm) +; - PokedexTypeSearchStrings (see data/types/search_strings.asm) +; - TypeMatchups (see data/types/type_matchups.asm) +; - TypeBoostItems (see data/types/type_boost_items.asm) + const_def + +DEF PHYSICAL EQU const_value + const NORMAL + const FIGHTING + const FLYING + const POISON + const GROUND + const ROCK + const BIRD + const BUG + const GHOST + const STEEL + +DEF UNUSED_TYPES EQU const_value + const_next 19 + const CURSE_TYPE +DEF UNUSED_TYPES_END EQU const_value + +DEF SPECIAL EQU const_value + const FIRE + const WATER + const GRASS + const ELECTRIC + const PSYCHIC_TYPE + const ICE + const DRAGON + const DARK +DEF TYPES_END EQU const_value + +DEF NUM_TYPES EQU TYPES_END + UNUSED_TYPES - UNUSED_TYPES_END - 1 ; discount BIRD + +DEF POKEDEX_TYPE_STRING_LENGTH EQU 9 diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm new file mode 100644 index 0000000..9a80a8c --- /dev/null +++ b/constants/wram_constants.asm @@ -0,0 +1,320 @@ +; wInputType:: +DEF AUTO_INPUT EQU $ff + +; wDebugFlags:: + const_def + const DEBUG_BATTLE_F + const DEBUG_FIELD_F + +; wCurDexMode:: + const_def + const DEXMODE_NEW + const DEXMODE_OLD + const DEXMODE_ABC + const DEXMODE_UNOWN + +; wMonType:: + const_def + const PARTYMON ; 0 + const OTPARTYMON ; 1 + const BOXMON ; 2 + const TEMPMON ; 3 + const WILDMON ; 4 + +; wGameTimerPaused:: +DEF GAME_TIMER_PAUSED_F EQU 0 +DEF GAME_TIMER_MOBILE_F EQU 7 + +; wJoypadDisable:: +DEF JOYPAD_DISABLE_MON_FAINT_F EQU 6 +DEF JOYPAD_DISABLE_SGB_TRANSFER_F EQU 7 + +; wOptions1:: +DEF TEXT_DELAY_MASK EQU %111 + const_def 4 + const NO_TEXT_SCROLL ; 4 + const STEREO ; 5 + const BATTLE_SHIFT ; 6 + const BATTLE_SCENE ; 7 + +DEF TEXT_DELAY_FAST EQU %001 ; 1 +DEF TEXT_DELAY_MED EQU %011 ; 3 +DEF TEXT_DELAY_SLOW EQU %101 ; 5 + +; wTextboxFrame:: + const_def + const FRAME_1 ; 0 + const FRAME_2 ; 1 + const FRAME_3 ; 2 + const FRAME_4 ; 3 + const FRAME_5 ; 4 + const FRAME_6 ; 5 + const FRAME_7 ; 6 + const FRAME_8 ; 7 +DEF NUM_FRAMES EQU const_value + +; wTextboxFlags:: + const_def + const FAST_TEXT_DELAY_F ; 0 + const NO_TEXT_DELAY_F ; 1 + +; wGBPrinterBrightness:: +DEF GBPRINTER_LIGHTEST EQU $00 +DEF GBPRINTER_LIGHTER EQU $20 +DEF GBPRINTER_NORMAL EQU $40 +DEF GBPRINTER_DARKER EQU $60 +DEF GBPRINTER_DARKEST EQU $7f + +; wOptions2:: + const_def + const MENU_ACCOUNT ; 0 + +; wWalkingDirection:: + const_def -1 + const STANDING ; -1 + const DOWN ; 0 + const UP ; 1 + const LEFT ; 2 + const RIGHT ; 3 +DEF NUM_DIRECTIONS EQU const_value + +DEF DOWN_MASK EQU 1 << DOWN +DEF UP_MASK EQU 1 << UP +DEF LEFT_MASK EQU 1 << LEFT +DEF RIGHT_MASK EQU 1 << RIGHT + +; wFacingDirection:: + const_def NUM_DIRECTIONS - 1, -1 + shift_const FACE_DOWN ; 8 + shift_const FACE_UP ; 4 + shift_const FACE_LEFT ; 2 + shift_const FACE_RIGHT ; 1 +DEF FACE_CURRENT EQU 0 + +; wPokemonWithdrawDepositParameter:: +DEF PC_WITHDRAW EQU 0 +DEF PC_DEPOSIT EQU 1 +DEF REMOVE_PARTY EQU 0 +DEF REMOVE_BOX EQU 1 +DEF DAY_CARE_WITHDRAW EQU 2 +DEF DAY_CARE_DEPOSIT EQU 3 + +; wPlayerStepFlags:: + const_def 4 + const PLAYERSTEP_MIDAIR_F ; 4 + const PLAYERSTEP_CONTINUE_F ; 5 + const PLAYERSTEP_STOP_F ; 6 + const PLAYERSTEP_START_F ; 7 + +; wInitListType:: +DEF INIT_ENEMYOT_LIST EQU 1 +DEF INIT_BAG_ITEM_LIST EQU 2 +DEF INIT_OTHER_ITEM_LIST EQU 3 +DEF INIT_PLAYEROT_LIST EQU 4 +DEF INIT_MON_LIST EQU 5 + +; wTimeOfDay:: + const_def + const MORN_F ; 0 + const DAY_F ; 1 + const NITE_F ; 2 + const DARKNESS_F ; 3 +DEF NUM_DAYTIMES EQU const_value + +DEF MORN EQU 1 << MORN_F +DEF DAY EQU 1 << DAY_F +DEF NITE EQU 1 << NITE_F +DEF DARKNESS EQU 1 << DARKNESS_F + +DEF ANYTIME EQU MORN | DAY | NITE + +; wTimeOfDayPalset:: +DEF DARKNESS_PALSET EQU (DARKNESS_F << 6) | (DARKNESS_F << 4) | (DARKNESS_F << 2) | DARKNESS_F + +; wBattleAnimFlags:: + const_def + const BATTLEANIM_STOP_F ; 0 + const BATTLEANIM_IN_SUBROUTINE_F ; 1 + const BATTLEANIM_IN_LOOP_F ; 2 + const BATTLEANIM_KEEPSPRITES_F ; 3 + +; wPlayerSpriteSetupFlags:: +DEF PLAYERSPRITESETUP_FACING_MASK EQU %11 +DEF PLAYERSPRITESETUP_FEMALE_TO_MALE_F EQU 2 +DEF PLAYERSPRITESETUP_CUSTOM_FACING_F EQU 5 +DEF PLAYERSPRITESETUP_SKIP_RELOAD_GFX_F EQU 6 +DEF PLAYERSPRITESETUP_RESET_ACTION_F EQU 7 + +; wPlayerGender:: +DEF PLAYERGENDER_FEMALE_F EQU 0 + +; wMapStatus:: + const_def + const MAPSTATUS_START ; 0 + const MAPSTATUS_ENTER ; 1 + const MAPSTATUS_HANDLE ; 2 + const MAPSTATUS_DONE ; 3 + +; wMapEventStatus:: + const_def + const MAPEVENTS_ON ; 0 + const MAPEVENTS_OFF ; 1 + +; wScriptFlags:: +DEF SCRIPT_RUNNING EQU 2 + +; wScriptMode:: + const_def + const SCRIPT_OFF + const SCRIPT_READ + const SCRIPT_WAIT_MOVEMENT + const SCRIPT_WAIT + +; wSpawnAfterChampion:: +DEF SPAWN_LANCE EQU 1 +DEF SPAWN_RED EQU 2 + +; wCurDay:: + const_def + const SUNDAY ; 0 + const MONDAY ; 1 + const TUESDAY ; 2 + const WEDNESDAY ; 3 + const THURSDAY ; 4 + const FRIDAY ; 5 + const SATURDAY ; 6 + +; wStatusFlags:: + const_def + const STATUSFLAGS_POKEDEX_F ; 0 + const STATUSFLAGS_UNOWN_DEX_F ; 1 + const STATUSFLAGS_FLASH_F ; 2 + const STATUSFLAGS_CAUGHT_POKERUS_F ; 3 + const STATUSFLAGS_ROCKET_SIGNAL_F ; 4 + const STATUSFLAGS_NO_WILD_ENCOUNTERS_F ; 5 + const STATUSFLAGS_HALL_OF_FAME_F ; 6 + const STATUSFLAGS_MAIN_MENU_MOBILE_CHOICES_F ; 7 + +; wStatusFlags2:: + const_def + const STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F ; 0 + const STATUSFLAGS2_SAFARI_GAME_F ; 1 + const STATUSFLAGS2_BUG_CONTEST_TIMER_F ; 2 + const STATUSFLAGS2_UNUSED_3_F ; 3 + const STATUSFLAGS2_BIKE_SHOP_CALL_F ; 4 + const STATUSFLAGS2_UNUSED_5_F ; 5 + const STATUSFLAGS2_REACHED_GOLDENROD_F ; 6 + const STATUSFLAGS2_ROCKETS_IN_MAHOGANY_F ; 7 + +; wMomSavingMoney:: +DEF MOM_SAVING_SOME_MONEY_F EQU 0 +DEF MOM_SAVING_HALF_MONEY_F EQU 1 +DEF MOM_SAVING_ALL_MONEY_F EQU 2 +DEF MOM_ACTIVE_F EQU 7 + +DEF MOM_SAVING_MONEY_MASK EQU (1 << MOM_SAVING_SOME_MONEY_F) | (1 << MOM_SAVING_HALF_MONEY_F) | (1 << MOM_SAVING_ALL_MONEY_F) + +; wJohtoBadges:: + const_def + const ZEPHYRBADGE + const HIVEBADGE + const PLAINBADGE + const FOGBADGE + const MINERALBADGE + const STORMBADGE + const GLACIERBADGE + const RISINGBADGE +DEF NUM_JOHTO_BADGES EQU const_value + +; wKantoBadges:: + const_def + const BOULDERBADGE + const CASCADEBADGE + const THUNDERBADGE + const RAINBOWBADGE + const SOULBADGE + const MARSHBADGE + const VOLCANOBADGE + const EARTHBADGE +DEF NUM_KANTO_BADGES EQU const_value +DEF NUM_BADGES EQU NUM_JOHTO_BADGES + NUM_KANTO_BADGES + +; wPokegearFlags:: + const_def + const POKEGEAR_MAP_CARD_F ; 0 + const POKEGEAR_RADIO_CARD_F ; 1 + const POKEGEAR_PHONE_CARD_F ; 2 + const POKEGEAR_EXPN_CARD_F ; 3 + const_skip 3 + const POKEGEAR_OBTAINED_F ; 7 + +; wWhichRegisteredItem:: +DEF REGISTERED_POCKET EQU %11000000 +DEF REGISTERED_NUMBER EQU %00111111 + +; wPlayerState:: +DEF PLAYER_NORMAL EQU 0 +DEF PLAYER_BIKE EQU 1 +DEF PLAYER_SKATE EQU 2 +DEF PLAYER_SURF EQU 4 +DEF PLAYER_SURF_PIKA EQU 8 + +; wCelebiEvent:: +DEF CELEBIEVENT_FOREST_IS_RESTLESS_F EQU 2 + +; wBikeFlags:: + const_def + const BIKEFLAGS_STRENGTH_ACTIVE_F ; 0 + const BIKEFLAGS_ALWAYS_ON_BIKE_F ; 1 + const BIKEFLAGS_DOWNHILL_F ; 2 + +; wDailyFlags1:: + const_def + const DAILYFLAGS1_KURT_MAKING_BALLS_F ; 0 + const DAILYFLAGS1_BUG_CONTEST_F ; 1 + const DAILYFLAGS1_FISH_SWARM_F ; 2 + const DAILYFLAGS1_TIME_CAPSULE_F ; 3 + const DAILYFLAGS1_ALL_FRUIT_TREES_F ; 4 + const DAILYFLAGS1_GOT_SHUCKIE_TODAY_F ; 5 + const DAILYFLAGS1_GOLDENROD_UNDERGROUND_BARGAIN_F ; 6 + const DAILYFLAGS1_TRAINER_HOUSE_F ; 7 + +; wDailyFlags2:: + const_def + const DAILYFLAGS2_MT_MOON_SQUARE_CLEFAIRY_F ; 0 + const DAILYFLAGS2_UNION_CAVE_LAPRAS_F ; 1 + const DAILYFLAGS2_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F ; 2 + const DAILYFLAGS2_GOLDENROD_DEPT_STORE_TM27_RETURN_F ; 3 + const DAILYFLAGS2_DAISYS_GROOMING_F ; 4 + const DAILYFLAGS2_INDIGO_PLATEAU_RIVAL_FIGHT_F ; 5 + const DAILYFLAGS2_MOVE_TUTOR_F ; 6 + const DAILYFLAGS2_BUENAS_PASSWORD_F ; 7 + +; wSwarmFlags:: + const_def + const SWARMFLAGS_BUENAS_PASSWORD_F ; 0 + const SWARMFLAGS_GOLDENROD_DEPT_STORE_SALE_F ; 1 + const SWARMFLAGS_DUNSPARCE_SWARM_F ; 2 + const SWARMFLAGS_YANMA_SWARM_F ; 3 + const SWARMFLAGS_MOBILE_4_F ; 4 + +; wLuckyNumberShowFlag:: +DEF LUCKYNUMBERSHOW_GAME_OVER_F EQU 0 + +; wDayCareMan:: +DEF DAYCAREMAN_HAS_MON_F EQU 0 +DEF DAYCAREMAN_MONS_COMPATIBLE_F EQU 5 +DEF DAYCAREMAN_HAS_EGG_F EQU 6 +DEF DAYCAREMAN_ACTIVE_F EQU 7 + +; wDayCareLady:: +DEF DAYCARELADY_HAS_MON_F EQU 0 +DEF DAYCARELADY_ACTIVE_F EQU 7 + +; wUnlockedUnowns:: + const_def + const UNLOCKED_UNOWNS_A_TO_K_F + const UNLOCKED_UNOWNS_L_TO_R_F + const UNLOCKED_UNOWNS_S_TO_W_F + const UNLOCKED_UNOWNS_X_TO_Z_F +DEF NUM_UNLOCKED_UNOWN_SETS EQU const_value diff --git a/data/battle/accuracy_multipliers.asm b/data/battle/accuracy_multipliers.asm new file mode 100644 index 0000000..4b52a09 --- /dev/null +++ b/data/battle/accuracy_multipliers.asm @@ -0,0 +1,17 @@ +; Multiplier ratios for accuracy from modifier -6 to +6 +; (for other stats, see data/battle/stat_multipliers.asm). + +AccuracyLevelMultipliers: + db 33, 100 ; -6 = 33% + db 36, 100 ; -5 = 36% + db 43, 100 ; -4 = 43% + db 50, 100 ; -3 = 50% + db 60, 100 ; -2 = 60% + db 75, 100 ; -1 = 75% + db 1, 1 ; 0 = 100% + db 133, 100 ; +1 = 133% + db 166, 100 ; +2 = 166% + db 2, 1 ; +3 = 200% + db 233, 100 ; +4 = 233% + db 133, 50 ; +5 = 266% + db 3, 1 ; +6 = 300% diff --git a/data/battle/ai/constant_damage_effects.asm b/data/battle/ai/constant_damage_effects.asm new file mode 100644 index 0000000..cd812d4 --- /dev/null +++ b/data/battle/ai/constant_damage_effects.asm @@ -0,0 +1,10 @@ +; AIDamageCalc uses BattleCommand_ConstantDamage +; to calculate damage for these instead of +; BattleCommand_DamageCalc and BattleCommand_Stab. + +ConstantDamageEffects: + db EFFECT_SUPER_FANG + db EFFECT_STATIC_DAMAGE + db EFFECT_LEVEL_DAMAGE + db EFFECT_PSYWAVE + db -1 ; end diff --git a/data/battle/ai/encore_moves.asm b/data/battle/ai/encore_moves.asm new file mode 100644 index 0000000..546afca --- /dev/null +++ b/data/battle/ai/encore_moves.asm @@ -0,0 +1,34 @@ +; AI_SMART encourages these moves with Encore. + +EncoreMoves: + dw SWORDS_DANCE + dw WHIRLWIND + dw LEER + dw ROAR + dw DISABLE + dw MIST + dw LEECH_SEED + dw GROWTH + dw POISONPOWDER + dw STRING_SHOT + dw MEDITATE + dw AGILITY + dw TELEPORT + dw SCREECH + dw HAZE + dw FOCUS_ENERGY + dw DREAM_EATER + dw POISON_GAS + dw SPLASH + dw SHARPEN + dw CONVERSION + dw SUPER_FANG + dw SUBSTITUTE + dw TRIPLE_KICK + dw SPIDER_WEB + dw MIND_READER + dw FLAME_WHEEL + dw AEROBLAST + dw COTTON_SPORE + dw POWDER_SNOW + dw -1 ; end diff --git a/data/battle/ai/rain_dance_moves.asm b/data/battle/ai/rain_dance_moves.asm new file mode 100644 index 0000000..5270dd5 --- /dev/null +++ b/data/battle/ai/rain_dance_moves.asm @@ -0,0 +1,15 @@ +; AI_SMART prefers these moves during rain. + +RainDanceMoves: + dw WATER_GUN + dw HYDRO_PUMP + dw SURF + dw BUBBLEBEAM + dw THUNDER + dw WATERFALL + dw CLAMP + dw BUBBLE + dw CRABHAMMER + dw OCTAZOOKA + dw WHIRLPOOL + dw -1 ; end diff --git a/data/battle/ai/reckless_moves.asm b/data/battle/ai/reckless_moves.asm new file mode 100644 index 0000000..6725297 --- /dev/null +++ b/data/battle/ai/reckless_moves.asm @@ -0,0 +1,9 @@ +; AI_AGGRESSIVE does not discourage these moves +; even if a stronger one is available. + +RecklessMoves: + db EFFECT_SELFDESTRUCT + db EFFECT_RAMPAGE + db EFFECT_MULTI_HIT + db EFFECT_DOUBLE_HIT + db -1 ; end diff --git a/data/battle/ai/residual_moves.asm b/data/battle/ai/residual_moves.asm new file mode 100644 index 0000000..1ad8675 --- /dev/null +++ b/data/battle/ai/residual_moves.asm @@ -0,0 +1,16 @@ +; AI_CAUTIOUS discourages these moves after the first turn. + +ResidualMoves: + dw MIST + dw LEECH_SEED + dw POISONPOWDER + dw STUN_SPORE + dw THUNDER_WAVE + dw FOCUS_ENERGY + dw BIDE + dw POISON_GAS + dw TRANSFORM + dw CONVERSION + dw SUBSTITUTE + dw SPIKES + dw -1 ; end diff --git a/data/battle/ai/risky_effects.asm b/data/battle/ai/risky_effects.asm new file mode 100644 index 0000000..529436c --- /dev/null +++ b/data/battle/ai/risky_effects.asm @@ -0,0 +1,7 @@ +; AI_RISKY will not use these effects at max HP +; even if they would KO the player. + +RiskyEffects: + db EFFECT_SELFDESTRUCT + db EFFECT_OHKO + db -1 ; end diff --git a/data/battle/ai/stall_moves.asm b/data/battle/ai/stall_moves.asm new file mode 100644 index 0000000..70b0126 --- /dev/null +++ b/data/battle/ai/stall_moves.asm @@ -0,0 +1,37 @@ +; AI_OPPORTUNIST discourages these moves +; when the player's HP is low. + +StallMoves: + dw SWORDS_DANCE + dw TAIL_WHIP + dw LEER + dw GROWL + dw DISABLE + dw MIST + dw COUNTER + dw LEECH_SEED + dw GROWTH + dw STRING_SHOT + dw MEDITATE + dw AGILITY + dw RAGE + dw MIMIC + dw SCREECH + dw HARDEN + dw WITHDRAW + dw DEFENSE_CURL + dw BARRIER + dw LIGHT_SCREEN + dw HAZE + dw REFLECT + dw FOCUS_ENERGY + dw BIDE + dw AMNESIA + dw TRANSFORM + dw SPLASH + dw ACID_ARMOR + dw SHARPEN + dw CONVERSION + dw SUBSTITUTE + dw FLAME_WHEEL + dw -1 ; end diff --git a/data/battle/ai/status_only_effects.asm b/data/battle/ai/status_only_effects.asm new file mode 100644 index 0000000..8748d93 --- /dev/null +++ b/data/battle/ai/status_only_effects.asm @@ -0,0 +1,9 @@ +; AI_BASIC discourages these effects if the player +; already has a status condition. + +StatusOnlyEffects: + db EFFECT_SLEEP + db EFFECT_TOXIC + db EFFECT_POISON + db EFFECT_PARALYZE + db -1 ; end diff --git a/data/battle/ai/sunny_day_moves.asm b/data/battle/ai/sunny_day_moves.asm new file mode 100644 index 0000000..5d16e8b --- /dev/null +++ b/data/battle/ai/sunny_day_moves.asm @@ -0,0 +1,13 @@ +; AI_SMART prefers these moves during harsh sunlight. + +SunnyDayMoves: +; BUG: "Smart" AI does not encourage Solar Beam, Flame Wheel, or Moonlight during Sunny Day (see docs/bugs_and_glitches.md) + dw FIRE_PUNCH + dw EMBER + dw FLAMETHROWER + dw FIRE_SPIN + dw FIRE_BLAST + dw SACRED_FIRE + dw MORNING_SUN + dw SYNTHESIS + dw -1 ; end diff --git a/data/battle/ai/useful_moves.asm b/data/battle/ai/useful_moves.asm new file mode 100644 index 0000000..d43024a --- /dev/null +++ b/data/battle/ai/useful_moves.asm @@ -0,0 +1,23 @@ +; AI_SMART knows these moves are usable all-around. + +UsefulMoves: + dw DOUBLE_EDGE + dw SING + dw FLAMETHROWER + dw HYDRO_PUMP + dw SURF + dw ICE_BEAM + dw BLIZZARD + dw HYPER_BEAM + dw SLEEP_POWDER + dw THUNDERBOLT + dw THUNDER + dw EARTHQUAKE + dw TOXIC + dw PSYCHIC_M + dw HYPNOSIS + dw RECOVER + dw FIRE_BLAST + dw SOFTBOILED + dw SUPER_FANG + dw -1 ; end diff --git a/data/battle/critical_hit_chances.asm b/data/battle/critical_hit_chances.asm new file mode 100644 index 0000000..bb1ce9a --- /dev/null +++ b/data/battle/critical_hit_chances.asm @@ -0,0 +1,8 @@ +CriticalHitChances: + db 1 out_of 15 ; 0 + db 1 out_of 8 ; +1 + db 1 out_of 4 ; +2 + db 1 out_of 3 ; +3 + db 1 out_of 2 ; +4 + db 1 out_of 2 ; +5 + db 1 out_of 2 ; +6 diff --git a/data/battle/effect_command_pointers.asm b/data/battle/effect_command_pointers.asm new file mode 100644 index 0000000..7239e81 --- /dev/null +++ b/data/battle/effect_command_pointers.asm @@ -0,0 +1,183 @@ +; battle commands are defined in engine/battle/effect_commands.asm + + dw 0 ; padding + +BattleCommandPointers: +; entries correspond to macros/scripts/battle_commands.asm + table_width 2, BattleCommandPointers + 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_CheckFaint + 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 BattleCommand_Unused3C + 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 BattleCommand_Unused5D + 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 + assert_table_length NUM_EFFECT_COMMANDS diff --git a/data/battle/held_consumables.asm b/data/battle/held_consumables.asm new file mode 100644 index 0000000..bd47c1d --- /dev/null +++ b/data/battle/held_consumables.asm @@ -0,0 +1,25 @@ +; Held item effects that are consumed on use + +ConsumableEffects: + db HELD_BERRY + db HELD_2 + db HELD_5 + db HELD_HEAL_POISON + db HELD_HEAL_FREEZE + db HELD_HEAL_BURN + db HELD_HEAL_SLEEP + db HELD_HEAL_PARALYZE + db HELD_HEAL_STATUS + db HELD_30 + db HELD_ATTACK_UP + db HELD_DEFENSE_UP + db HELD_SPEED_UP + db HELD_SP_ATTACK_UP + db HELD_SP_DEFENSE_UP + db HELD_ACCURACY_UP + db HELD_EVASION_UP + db HELD_38 + db HELD_71 + db HELD_ESCAPE + db HELD_CRITICAL_UP + db -1 diff --git a/data/battle/held_heal_status.asm b/data/battle/held_heal_status.asm new file mode 100644 index 0000000..87cf82a --- /dev/null +++ b/data/battle/held_heal_status.asm @@ -0,0 +1,10 @@ +; See also data/items/heal_status.asm + +HeldStatusHealingEffects: + db HELD_HEAL_POISON, 1 << PSN + db HELD_HEAL_FREEZE, 1 << FRZ + db HELD_HEAL_BURN, 1 << BRN + db HELD_HEAL_SLEEP, SLP_MASK + db HELD_HEAL_PARALYZE, 1 << PAR + db HELD_HEAL_STATUS, ALL_STATUS + db -1 ; end diff --git a/data/battle/held_stat_up.asm b/data/battle/held_stat_up.asm new file mode 100644 index 0000000..4f28c0d --- /dev/null +++ b/data/battle/held_stat_up.asm @@ -0,0 +1,9 @@ +HeldStatUpItems: + dbw HELD_ATTACK_UP, BattleCommand_AttackUp + dbw HELD_DEFENSE_UP, BattleCommand_DefenseUp + dbw HELD_SPEED_UP, BattleCommand_SpeedUp + dbw HELD_SP_ATTACK_UP, BattleCommand_SpecialAttackUp + dbw HELD_SP_DEFENSE_UP, BattleCommand_SpecialDefenseUp + dbw HELD_ACCURACY_UP, BattleCommand_AccuracyUp + dbw HELD_EVASION_UP, BattleCommand_EvasionUp + db -1 ; end diff --git a/data/battle/stat_multipliers.asm b/data/battle/stat_multipliers.asm new file mode 100644 index 0000000..bbb1cad --- /dev/null +++ b/data/battle/stat_multipliers.asm @@ -0,0 +1,20 @@ +; Multiplier ratios for all stats from modifier -6 to +6 +; (except accuracy, see data/battle/accuracy_multipliers.asm). + +; This table is identical to data/battle/stat_multipliers_2.asm. +; This one is used by CalcBattleStats. + +StatLevelMultipliers: + db 25, 100 ; -6 = 25% + db 28, 100 ; -5 = 28% + db 33, 100 ; -4 = 33% + db 40, 100 ; -3 = 40% + db 50, 100 ; -2 = 50% + db 66, 100 ; -1 = 66% + db 1, 1 ; 0 = 100% + db 15, 10 ; +1 = 150% + db 2, 1 ; +2 = 200% + db 25, 10 ; +3 = 250% + db 3, 1 ; +4 = 300% + db 35, 10 ; +5 = 350% + db 4, 1 ; +6 = 400% diff --git a/data/battle/stat_multipliers_2.asm b/data/battle/stat_multipliers_2.asm new file mode 100644 index 0000000..3f3dc23 --- /dev/null +++ b/data/battle/stat_multipliers_2.asm @@ -0,0 +1,20 @@ +; Multiplier ratios for all stats from modifier -6 to +6 +; (except accuracy, see data/battle/accuracy_multipliers.asm). + +; This table is identical to data/battle/stat_multipliers.asm. +; This one is used by ApplyStatLevelMultiplier. + +StatLevelMultipliers_Applied: + db 25, 100 ; -6 = 25% + db 28, 100 ; -5 = 28% + db 33, 100 ; -4 = 33% + db 40, 100 ; -3 = 40% + db 50, 100 ; -2 = 50% + db 66, 100 ; -1 = 66% + db 1, 1 ; 0 = 100% + db 15, 10 ; +1 = 150% + db 2, 1 ; +2 = 200% + db 25, 10 ; +3 = 250% + db 3, 1 ; +4 = 300% + db 35, 10 ; +5 = 350% + db 4, 1 ; +6 = 400% diff --git a/data/battle/stat_names.asm b/data/battle/stat_names.asm new file mode 100644 index 0000000..ae6c6cf --- /dev/null +++ b/data/battle/stat_names.asm @@ -0,0 +1,12 @@ +StatNames: +; entries correspond to stat ids + list_start StatNames + li "ATTACK" + li "DEFENSE" + li "SPEED" + li "SPCL.ATK" + li "SPCL.DEF" + li "ACCURACY" + li "EVASION" + li "ABILITY" ; used for BattleCommand_Curse + assert_list_length NUM_LEVEL_STATS diff --git a/data/battle/weather_modifiers.asm b/data/battle/weather_modifiers.asm new file mode 100644 index 0000000..d0acdc2 --- /dev/null +++ b/data/battle/weather_modifiers.asm @@ -0,0 +1,10 @@ +WeatherTypeModifiers: + db WEATHER_RAIN, WATER, MORE_EFFECTIVE + db WEATHER_RAIN, FIRE, NOT_VERY_EFFECTIVE + db WEATHER_SUN, FIRE, MORE_EFFECTIVE + db WEATHER_SUN, WATER, NOT_VERY_EFFECTIVE + db -1 ; end + +WeatherMoveModifiers: + db WEATHER_RAIN, EFFECT_SOLARBEAM, NOT_VERY_EFFECTIVE + db -1 ; end diff --git a/data/battle/wobble_probabilities.asm b/data/battle/wobble_probabilities.asm new file mode 100644 index 0000000..38e9a12 --- /dev/null +++ b/data/battle/wobble_probabilities.asm @@ -0,0 +1,27 @@ +WobbleProbabilities: +; catch rate, chance of wobbling / 255 +; nLeft/255 = (nRight/255) ** 4 + db 1, 63 + db 2, 75 + db 3, 84 + db 4, 90 + db 5, 95 + db 7, 103 + db 10, 113 + db 15, 126 + db 20, 134 + db 30, 149 + db 40, 160 + db 50, 169 + db 60, 177 + db 80, 191 + db 100, 201 + db 120, 211 + db 140, 220 + db 160, 227 + db 180, 234 + db 200, 240 + db 220, 246 + db 240, 251 + db 254, 253 + db 255, 255 diff --git a/data/battle_anims/ball_colors.asm b/data/battle_anims/ball_colors.asm new file mode 100644 index 0000000..0453c14 --- /dev/null +++ b/data/battle_anims/ball_colors.asm @@ -0,0 +1,15 @@ +; colors of balls thrown in battle + +BallColors: + db MASTER_BALL, PAL_BATTLE_OB_GREEN + db ULTRA_BALL, PAL_BATTLE_OB_YELLOW + db GREAT_BALL, PAL_BATTLE_OB_BLUE + db POKE_BALL, PAL_BATTLE_OB_RED + db HEAVY_BALL, PAL_BATTLE_OB_GRAY + db LEVEL_BALL, PAL_BATTLE_OB_BROWN + db LURE_BALL, PAL_BATTLE_OB_BLUE + db FAST_BALL, PAL_BATTLE_OB_BLUE + db FRIEND_BALL, PAL_BATTLE_OB_YELLOW + db MOON_BALL, PAL_BATTLE_OB_GRAY + db LOVE_BALL, PAL_BATTLE_OB_RED + db -1, PAL_BATTLE_OB_GRAY diff --git a/data/battle_anims/framesets.asm b/data/battle_anims/framesets.asm new file mode 100644 index 0000000..834457f --- /dev/null +++ b/data/battle_anims/framesets.asm @@ -0,0 +1,1270 @@ +BattleAnimFrameData: +; entries correspond to BATTLEANIMFRAMESET_* constants + table_width 2, BattleAnimFrameData + dw .Frameset_00 ; BATTLEANIMFRAMESET_00 + dw .Frameset_01 ; BATTLEANIMFRAMESET_01 + dw .Frameset_02 ; BATTLEANIMFRAMESET_02 + dw .Frameset_03 ; BATTLEANIMFRAMESET_03 + dw .Frameset_04 ; BATTLEANIMFRAMESET_04 + dw .Frameset_05 ; BATTLEANIMFRAMESET_05 + dw .Frameset_06 ; BATTLEANIMFRAMESET_06 + dw .Frameset_07 ; BATTLEANIMFRAMESET_07 + dw .Frameset_08 ; BATTLEANIMFRAMESET_08 + dw .Frameset_09 ; BATTLEANIMFRAMESET_09 + dw .Frameset_0a ; BATTLEANIMFRAMESET_0A + dw .Frameset_0b ; BATTLEANIMFRAMESET_0B + dw .Frameset_0c ; BATTLEANIMFRAMESET_0C + dw .Frameset_0d ; BATTLEANIMFRAMESET_0D + dw .Frameset_0e ; BATTLEANIMFRAMESET_0E + dw .Frameset_0f ; BATTLEANIMFRAMESET_0F + dw .Frameset_10 ; BATTLEANIMFRAMESET_10 + dw .Frameset_11 ; BATTLEANIMFRAMESET_11 + dw .Frameset_12 ; BATTLEANIMFRAMESET_12 + dw .Frameset_13 ; BATTLEANIMFRAMESET_13 + dw .Frameset_14 ; BATTLEANIMFRAMESET_14 + dw .Frameset_15 ; BATTLEANIMFRAMESET_15 + dw .Frameset_16 ; BATTLEANIMFRAMESET_16 + dw .Frameset_17 ; BATTLEANIMFRAMESET_17 + dw .Frameset_18 ; BATTLEANIMFRAMESET_18 + dw .Frameset_19 ; BATTLEANIMFRAMESET_19 + dw .Frameset_1a ; BATTLEANIMFRAMESET_1A + dw .Frameset_1b ; BATTLEANIMFRAMESET_1B + dw .Frameset_1c ; BATTLEANIMFRAMESET_1C + dw .Frameset_1d ; BATTLEANIMFRAMESET_1D + dw .Frameset_1e ; BATTLEANIMFRAMESET_1E + dw .Frameset_1f ; BATTLEANIMFRAMESET_1F + dw .Frameset_20 ; BATTLEANIMFRAMESET_20 + dw .Frameset_21 ; BATTLEANIMFRAMESET_21 + dw .Frameset_22 ; BATTLEANIMFRAMESET_22 + dw .Frameset_23 ; BATTLEANIMFRAMESET_23 + dw .Frameset_24 ; BATTLEANIMFRAMESET_24 + dw .Frameset_25 ; BATTLEANIMFRAMESET_25 + dw .Frameset_26 ; BATTLEANIMFRAMESET_26 + dw .Frameset_27 ; BATTLEANIMFRAMESET_27 + dw .Frameset_28 ; BATTLEANIMFRAMESET_28 + dw .Frameset_29 ; BATTLEANIMFRAMESET_29 + dw .Frameset_2a ; BATTLEANIMFRAMESET_2A + dw .Frameset_2b ; BATTLEANIMFRAMESET_2B + dw .Frameset_2c ; BATTLEANIMFRAMESET_2C + dw .Frameset_2d ; BATTLEANIMFRAMESET_2D + dw .Frameset_2e ; BATTLEANIMFRAMESET_2E + dw .Frameset_2f ; BATTLEANIMFRAMESET_2F + dw .Frameset_30 ; BATTLEANIMFRAMESET_30 + dw .Frameset_31 ; BATTLEANIMFRAMESET_31 + dw .Frameset_32 ; BATTLEANIMFRAMESET_32 + dw .Frameset_33 ; BATTLEANIMFRAMESET_33 + dw .Frameset_34 ; BATTLEANIMFRAMESET_34 + dw .Frameset_35 ; BATTLEANIMFRAMESET_35 + dw .Frameset_36 ; BATTLEANIMFRAMESET_36 + dw .Frameset_37 ; BATTLEANIMFRAMESET_37 + dw .Frameset_38 ; BATTLEANIMFRAMESET_38 + dw .Frameset_39 ; BATTLEANIMFRAMESET_39 + dw .Frameset_3a ; BATTLEANIMFRAMESET_3A + dw .Frameset_3b ; BATTLEANIMFRAMESET_3B + dw .Frameset_3c ; BATTLEANIMFRAMESET_3C + dw .Frameset_3d ; BATTLEANIMFRAMESET_3D + dw .Frameset_3e ; BATTLEANIMFRAMESET_3E + dw .Frameset_3f ; BATTLEANIMFRAMESET_3F + dw .Frameset_40 ; BATTLEANIMFRAMESET_40 + dw .Frameset_41 ; BATTLEANIMFRAMESET_41 + dw .Frameset_42 ; BATTLEANIMFRAMESET_42 + dw .Frameset_43 ; BATTLEANIMFRAMESET_43 + dw .Frameset_44 ; BATTLEANIMFRAMESET_44 + dw .Frameset_45 ; BATTLEANIMFRAMESET_45 + dw .Frameset_46 ; BATTLEANIMFRAMESET_46 + dw .Frameset_47 ; BATTLEANIMFRAMESET_47 + dw .Frameset_48 ; BATTLEANIMFRAMESET_48 + dw .Frameset_49 ; BATTLEANIMFRAMESET_49 + dw .Frameset_4a ; BATTLEANIMFRAMESET_4A + dw .Frameset_4b ; BATTLEANIMFRAMESET_4B + dw .Frameset_4c ; BATTLEANIMFRAMESET_4C + dw .Frameset_4d ; BATTLEANIMFRAMESET_4D + dw .Frameset_4e ; BATTLEANIMFRAMESET_4E + dw .Frameset_4f ; BATTLEANIMFRAMESET_4F + dw .Frameset_50 ; BATTLEANIMFRAMESET_50 + dw .Frameset_51 ; BATTLEANIMFRAMESET_51 + dw .Frameset_52 ; BATTLEANIMFRAMESET_52 + dw .Frameset_53 ; BATTLEANIMFRAMESET_53 + dw .Frameset_54 ; BATTLEANIMFRAMESET_54 + dw .Frameset_55 ; BATTLEANIMFRAMESET_55 + dw .Frameset_56 ; BATTLEANIMFRAMESET_56 + dw .Frameset_57 ; BATTLEANIMFRAMESET_57 + dw .Frameset_58 ; BATTLEANIMFRAMESET_58 + dw .Frameset_59 ; BATTLEANIMFRAMESET_59 + dw .Frameset_5a ; BATTLEANIMFRAMESET_5A + dw .Frameset_5b ; BATTLEANIMFRAMESET_5B + dw .Frameset_5c ; BATTLEANIMFRAMESET_5C + dw .Frameset_5d ; BATTLEANIMFRAMESET_5D + dw .Frameset_5e ; BATTLEANIMFRAMESET_5E + dw .Frameset_5f ; BATTLEANIMFRAMESET_5F + dw .Frameset_60 ; BATTLEANIMFRAMESET_60 + dw .Frameset_61 ; BATTLEANIMFRAMESET_61 + dw .Frameset_62 ; BATTLEANIMFRAMESET_62 + dw .Frameset_63 ; BATTLEANIMFRAMESET_63 + dw .Frameset_64 ; BATTLEANIMFRAMESET_64 + dw .Frameset_65 ; BATTLEANIMFRAMESET_65 + dw .Frameset_66 ; BATTLEANIMFRAMESET_66 + dw .Frameset_67 ; BATTLEANIMFRAMESET_67 + dw .Frameset_68 ; BATTLEANIMFRAMESET_68 + dw .Frameset_69 ; BATTLEANIMFRAMESET_69 + dw .Frameset_6a ; BATTLEANIMFRAMESET_6A + dw .Frameset_6b ; BATTLEANIMFRAMESET_6B + dw .Frameset_6c ; BATTLEANIMFRAMESET_6C + dw .Frameset_6d ; BATTLEANIMFRAMESET_6D + dw .Frameset_6e ; BATTLEANIMFRAMESET_6E + dw .Frameset_6f ; BATTLEANIMFRAMESET_6F + dw .Frameset_70 ; BATTLEANIMFRAMESET_70 + dw .Frameset_71 ; BATTLEANIMFRAMESET_71 + dw .Frameset_72 ; BATTLEANIMFRAMESET_72 + dw .Frameset_73 ; BATTLEANIMFRAMESET_73 + dw .Frameset_74 ; BATTLEANIMFRAMESET_74 + dw .Frameset_75 ; BATTLEANIMFRAMESET_75 + dw .Frameset_76 ; BATTLEANIMFRAMESET_76 + dw .Frameset_77 ; BATTLEANIMFRAMESET_77 + dw .Frameset_78 ; BATTLEANIMFRAMESET_78 + dw .Frameset_79 ; BATTLEANIMFRAMESET_79 + dw .Frameset_7a ; BATTLEANIMFRAMESET_7A + dw .Frameset_7b ; BATTLEANIMFRAMESET_7B + dw .Frameset_7c ; BATTLEANIMFRAMESET_7C + dw .Frameset_7d ; BATTLEANIMFRAMESET_7D + dw .Frameset_7e ; BATTLEANIMFRAMESET_7E + dw .Frameset_7f ; BATTLEANIMFRAMESET_7F + dw .Frameset_80 ; BATTLEANIMFRAMESET_80 + dw .Frameset_81 ; BATTLEANIMFRAMESET_81 + dw .Frameset_82 ; BATTLEANIMFRAMESET_82 + dw .Frameset_83 ; BATTLEANIMFRAMESET_83 + dw .Frameset_84 ; BATTLEANIMFRAMESET_84 + dw .Frameset_85 ; BATTLEANIMFRAMESET_85 + dw .Frameset_86 ; BATTLEANIMFRAMESET_86 + dw .Frameset_87 ; BATTLEANIMFRAMESET_87 + dw .Frameset_88 ; BATTLEANIMFRAMESET_88 + dw .Frameset_89 ; BATTLEANIMFRAMESET_89 + dw .Frameset_8a ; BATTLEANIMFRAMESET_8A + dw .Frameset_8b ; BATTLEANIMFRAMESET_8B + dw .Frameset_8c ; BATTLEANIMFRAMESET_8C + dw .Frameset_8d ; BATTLEANIMFRAMESET_8D + dw .Frameset_8e ; BATTLEANIMFRAMESET_8E + dw .Frameset_8f ; BATTLEANIMFRAMESET_8F + dw .Frameset_90 ; BATTLEANIMFRAMESET_90 + dw .Frameset_91 ; BATTLEANIMFRAMESET_91 + dw .Frameset_92 ; BATTLEANIMFRAMESET_92 + dw .Frameset_93 ; BATTLEANIMFRAMESET_93 + dw .Frameset_94 ; BATTLEANIMFRAMESET_94 + dw .Frameset_95 ; BATTLEANIMFRAMESET_95 + dw .Frameset_96 ; BATTLEANIMFRAMESET_96 + dw .Frameset_97 ; BATTLEANIMFRAMESET_97 + dw .Frameset_98 ; BATTLEANIMFRAMESET_98 + dw .Frameset_99 ; BATTLEANIMFRAMESET_99 + dw .Frameset_9a ; BATTLEANIMFRAMESET_9A + dw .Frameset_9b ; BATTLEANIMFRAMESET_9B + dw .Frameset_9c ; BATTLEANIMFRAMESET_9C + dw .Frameset_9d ; BATTLEANIMFRAMESET_9D + dw .Frameset_9e ; BATTLEANIMFRAMESET_9E + dw .Frameset_9f ; BATTLEANIMFRAMESET_9F + dw .Frameset_a0 ; BATTLEANIMFRAMESET_A0 + dw .Frameset_a1 ; BATTLEANIMFRAMESET_A1 + dw .Frameset_a2 ; BATTLEANIMFRAMESET_A2 + dw .Frameset_a3 ; BATTLEANIMFRAMESET_A3 + dw .Frameset_a4 ; BATTLEANIMFRAMESET_A4 + dw .Frameset_a5 ; BATTLEANIMFRAMESET_A5 + dw .Frameset_a6 ; BATTLEANIMFRAMESET_A6 + dw .Frameset_a7 ; BATTLEANIMFRAMESET_A7 + dw .Frameset_a8 ; BATTLEANIMFRAMESET_A8 + dw .Frameset_a9 ; BATTLEANIMFRAMESET_A9 + dw .Frameset_aa ; BATTLEANIMFRAMESET_AA + dw .Frameset_ab ; BATTLEANIMFRAMESET_AB + dw .Frameset_ac ; BATTLEANIMFRAMESET_AC + dw .Frameset_ad ; BATTLEANIMFRAMESET_AD + dw .Frameset_ae ; BATTLEANIMFRAMESET_AE + dw .Frameset_af ; BATTLEANIMFRAMESET_AF + dw .Frameset_b0 ; BATTLEANIMFRAMESET_B0 + dw .Frameset_b1 ; BATTLEANIMFRAMESET_B1 + dw .Frameset_b2 ; BATTLEANIMFRAMESET_B2 + dw .Frameset_b3 ; BATTLEANIMFRAMESET_B3 + dw .Frameset_b4 ; BATTLEANIMFRAMESET_B4 + dw .Frameset_b5 ; BATTLEANIMFRAMESET_B5 + dw .Frameset_b6 ; BATTLEANIMFRAMESET_B6 + dw .Frameset_b7 ; BATTLEANIMFRAMESET_B7 + dw .Frameset_b8 ; BATTLEANIMFRAMESET_B8 + assert_table_length NUM_BATTLEANIMFRAMESETS + +.Frameset_00: + oamframe BATTLEANIMOAMSET_00, 6 + oamdelete + +.Frameset_01: + oamframe BATTLEANIMOAMSET_01, 6 + oamdelete + +.Frameset_02: + oamframe BATTLEANIMOAMSET_02, 6 + oamdelete + +.Frameset_03: + oamframe BATTLEANIMOAMSET_03, 6 + oamdelete + +.Frameset_04: + oamframe BATTLEANIMOAMSET_04, 6 + oamdelete + +.Frameset_05: + oamframe BATTLEANIMOAMSET_05, 6 + oamdelete + +.Frameset_06: + oamframe BATTLEANIMOAMSET_06, 6 + oamdelete + +.Frameset_07: + oamframe BATTLEANIMOAMSET_03, 4 + oamframe BATTLEANIMOAMSET_01, 1 + oamframe BATTLEANIMOAMSET_03, 4 + oamframe BATTLEANIMOAMSET_01, 1 + oamframe BATTLEANIMOAMSET_03, 4 + oamframe BATTLEANIMOAMSET_01, 1 + oamframe BATTLEANIMOAMSET_03, 4 + oamframe BATTLEANIMOAMSET_01, 1 + oamdelete + +.Frameset_3e: + oamframe BATTLEANIMOAMSET_4B, 2 + oamframe BATTLEANIMOAMSET_4C, 2 + oamframe BATTLEANIMOAMSET_4D, 4 + oamframe BATTLEANIMOAMSET_4E, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_4E, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_4E, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_4E, 2 + oamdelete + +.Frameset_3f: + oamframe BATTLEANIMOAMSET_4B, 2, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_4C, 2, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_4D, 4, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP + oamwait 2 + oamframe BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP + oamwait 2 + oamframe BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP + oamwait 2 + oamframe BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP + oamdelete + +.Frameset_40: + oamframe BATTLEANIMOAMSET_4B, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_4C, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_4D, 4, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP + oamwait 2 + oamframe BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP + oamwait 2 + oamframe BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP + oamwait 2 + oamframe BATTLEANIMOAMSET_4E, 2, OAM_X_FLIP, OAM_Y_FLIP + oamdelete + +.Frameset_41: + oamframe BATTLEANIMOAMSET_4B, 1 + oamframe BATTLEANIMOAMSET_4C, 1 + oamframe BATTLEANIMOAMSET_4D, 1 + oamframe BATTLEANIMOAMSET_4F, 1 + oamframe BATTLEANIMOAMSET_50, 1 + oamframe BATTLEANIMOAMSET_51, 1 + oamframe BATTLEANIMOAMSET_52, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_52, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_52, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_52, 2 + oamdelete + +.Frameset_42: + oamframe BATTLEANIMOAMSET_4B, 1, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_4C, 1, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_4D, 1, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_4F, 1, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_50, 1, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_51, 1, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_52, 2, OAM_X_FLIP + oamwait 2 + oamframe BATTLEANIMOAMSET_52, 2, OAM_X_FLIP + oamwait 2 + oamframe BATTLEANIMOAMSET_52, 2, OAM_X_FLIP + oamwait 2 + oamframe BATTLEANIMOAMSET_52, 2, OAM_X_FLIP + oamdelete + +.Frameset_08: + oamframe BATTLEANIMOAMSET_00, 3 + oamframe BATTLEANIMOAMSET_07, 3 + oamframe BATTLEANIMOAMSET_08, 3 + oamframe BATTLEANIMOAMSET_09, 3 + oamdelete + +.Frameset_09: + oamframe BATTLEANIMOAMSET_0A, 7 + oamframe BATTLEANIMOAMSET_0B, 7 + oamframe BATTLEANIMOAMSET_0A, 7 + oamframe BATTLEANIMOAMSET_0B, 7, OAM_X_FLIP + oamrestart + +.Frameset_0a: + oamframe BATTLEANIMOAMSET_0C, 8 + oamend + +.Frameset_0b: + oamframe BATTLEANIMOAMSET_0D, 8 + oamend + +.Frameset_0c: + oamframe BATTLEANIMOAMSET_0A, 8 + oamend + +.Frameset_0d: + oamframe BATTLEANIMOAMSET_0A, 7 + oamframe BATTLEANIMOAMSET_0B, 7 + oamframe BATTLEANIMOAMSET_0A, 7 + oamframe BATTLEANIMOAMSET_0B, 7, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_0A, 7 + oamend + +.Frameset_0e: + oamframe BATTLEANIMOAMSET_0A, 8 + oamend + +.Frameset_0f: + oamframe BATTLEANIMOAMSET_0A, 4 + oamframe BATTLEANIMOAMSET_0E, 4 + oamrestart + +.Frameset_10: + oamframe BATTLEANIMOAMSET_0F, 4 + oamframe BATTLEANIMOAMSET_10, 4 + oamrestart + +.Frameset_11: + oamframe BATTLEANIMOAMSET_10, 4 + oamframe BATTLEANIMOAMSET_0F, 4 + oamframe BATTLEANIMOAMSET_0E, 4 + oamframe BATTLEANIMOAMSET_0A, 4 + oamframe BATTLEANIMOAMSET_0E, 4 + oamframe BATTLEANIMOAMSET_0A, 4 + oamframe BATTLEANIMOAMSET_0E, 4 + oamframe BATTLEANIMOAMSET_0A, 4 + oamdelete + +.Frameset_12: + oamframe BATTLEANIMOAMSET_10, 1 + oamframe BATTLEANIMOAMSET_0F, 1 + oamframe BATTLEANIMOAMSET_12, 1 + oamframe BATTLEANIMOAMSET_11, 1 + oamframe BATTLEANIMOAMSET_12, 1 + oamframe BATTLEANIMOAMSET_0F, 1 + oamrestart + +.Frameset_13: + oamframe BATTLEANIMOAMSET_10, 3 + oamframe BATTLEANIMOAMSET_0F, 3 + oamframe BATTLEANIMOAMSET_12, 1 + oamwait 1 + oamframe BATTLEANIMOAMSET_12, 1 + oamwait 1 + oamframe BATTLEANIMOAMSET_12, 1 + oamwait 1 + oamframe BATTLEANIMOAMSET_12, 1 + oamwait 1 + oamframe BATTLEANIMOAMSET_12, 3 + oamdelete + +.Frameset_14: + oamframe BATTLEANIMOAMSET_13, 20 + oamdelete + +.Frameset_15: + oamframe BATTLEANIMOAMSET_10, 1 + oamframe BATTLEANIMOAMSET_0F, 1 + oamrestart + +.Frameset_16: + oamframe BATTLEANIMOAMSET_14, 8 + oamend + +.Frameset_17: + oamframe BATTLEANIMOAMSET_17, 4 + oamframe BATTLEANIMOAMSET_16, 8 + oamframe BATTLEANIMOAMSET_15, 8 + oamframe BATTLEANIMOAMSET_16, 8 + oamframe BATTLEANIMOAMSET_17, 4 + oamframe BATTLEANIMOAMSET_17, 4 + oamframe BATTLEANIMOAMSET_16, 8, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_15, 8, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_16, 8, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_17, 4 + oamrestart + +.Frameset_56: + oamframe BATTLEANIMOAMSET_69, 8 + oamend + +.Frameset_57: + oamframe BATTLEANIMOAMSET_69, 32 + oamframe BATTLEANIMOAMSET_6A, 4 + oamframe BATTLEANIMOAMSET_6B, 4 + oamframe BATTLEANIMOAMSET_6D, 4 + oamframe BATTLEANIMOAMSET_6C, 4 + oamend + +.Frameset_58: + oamframe BATTLEANIMOAMSET_6C, 8 + oamframe BATTLEANIMOAMSET_6D, 8 + oamrestart + +.Frameset_18: + oamframe BATTLEANIMOAMSET_18, 4 + oamframe BATTLEANIMOAMSET_19, 4 + oamframe BATTLEANIMOAMSET_1A, 4 + oamdelete + +.Frameset_19: + oamframe BATTLEANIMOAMSET_1B, 8 + oamend + +.Frameset_1a: + oamframe BATTLEANIMOAMSET_0F, 8 + oamend + +.Frameset_1b: + oamframe BATTLEANIMOAMSET_1C, 8 + oamend + +.Frameset_1c: + oamframe BATTLEANIMOAMSET_0A, 8 + oamdelete + +.Frameset_1d: + oamframe BATTLEANIMOAMSET_1D, 8 + oamend + +.Frameset_1e: + oamframe BATTLEANIMOAMSET_17, 8 + oamend + +.Frameset_1f: + oamframe BATTLEANIMOAMSET_0F, 3 + oamframe BATTLEANIMOAMSET_10, 3 + oamframe BATTLEANIMOAMSET_1E, 3 + oamend + +.Frameset_20: + oamframe BATTLEANIMOAMSET_1F, 16 + oamframe BATTLEANIMOAMSET_20, 3 + oamdelete + +.Frameset_21: + oamframe BATTLEANIMOAMSET_20, 8 + oamend + +.Frameset_22: + oamframe BATTLEANIMOAMSET_20, 8 + oamframe BATTLEANIMOAMSET_21, 8 + oamframe BATTLEANIMOAMSET_1B, 8 + oamframe BATTLEANIMOAMSET_21, 8 + oamrestart + +.Frameset_23: + oamframe BATTLEANIMOAMSET_22, 8 + oamend + +.Frameset_24: + oamframe BATTLEANIMOAMSET_1B, 8 + oamend + +.Frameset_25: + oamframe BATTLEANIMOAMSET_23, 8 + oamend + +.Frameset_26: + oamframe BATTLEANIMOAMSET_24, 8 + oamend + +.Frameset_27: + oamframe BATTLEANIMOAMSET_25, 8 + oamend + +.Frameset_28: + oamframe BATTLEANIMOAMSET_26, 8 + oamframe BATTLEANIMOAMSET_27, 8 + oamend + +.Frameset_29: + oamframe BATTLEANIMOAMSET_28, 8 + oamframe BATTLEANIMOAMSET_29, 8 + oamdelete + +.Frameset_2a: + oamframe BATTLEANIMOAMSET_2A, 1 + oamframe BATTLEANIMOAMSET_2B, 1 + oamframe BATTLEANIMOAMSET_2C, 1 + oamframe BATTLEANIMOAMSET_2D, 1 + oamframe BATTLEANIMOAMSET_2E, 1 + oamframe BATTLEANIMOAMSET_2D, 1 + oamframe BATTLEANIMOAMSET_2C, 1 + oamframe BATTLEANIMOAMSET_2B, 1 + oamframe BATTLEANIMOAMSET_2A, 1 + oamdelete + +.Frameset_2b: + oamframe BATTLEANIMOAMSET_14, 1 + oamframe BATTLEANIMOAMSET_15, 1 + oamrestart + +.Frameset_2c: + oamframe BATTLEANIMOAMSET_2F, 4 + oamframe BATTLEANIMOAMSET_30, 40 + oamdelete + +.Frameset_2d: + oamframe BATTLEANIMOAMSET_31, 8 + oamend + +.Frameset_2e: + oamframe BATTLEANIMOAMSET_32, 32 + oamframe BATTLEANIMOAMSET_33, 32 + oamframe BATTLEANIMOAMSET_34, 32 + oamframe BATTLEANIMOAMSET_35, 32 ; fallthrough +.Frameset_2f: + oamwait 2 + oamframe BATTLEANIMOAMSET_35, 4 + oamwait 2 + oamframe BATTLEANIMOAMSET_35, 4 + oamwait 2 + oamframe BATTLEANIMOAMSET_35, 4 + oamwait 2 + oamframe BATTLEANIMOAMSET_35, 4 + oamdelete + +.Frameset_30: + oamframe BATTLEANIMOAMSET_14, 4 + oamframe BATTLEANIMOAMSET_15, 4 + oamrestart + +.Frameset_31: + oamframe BATTLEANIMOAMSET_36, 2 + oamframe BATTLEANIMOAMSET_37, 2 + oamframe BATTLEANIMOAMSET_38, 2 + oamframe BATTLEANIMOAMSET_39, 32 + oamdelete + +.Frameset_32: + oamframe BATTLEANIMOAMSET_3A, 2 + oamframe BATTLEANIMOAMSET_3B, 2 + oamframe BATTLEANIMOAMSET_3C, 2 + oamframe BATTLEANIMOAMSET_3D, 32 + oamdelete + +.Frameset_33: + oamframe BATTLEANIMOAMSET_3A, 2, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_3B, 2, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_3C, 2, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_3D, 32, OAM_X_FLIP + oamdelete + +.Frameset_34: + oamframe BATTLEANIMOAMSET_3E, 8 + oamframe BATTLEANIMOAMSET_3F, 8 + oamframe BATTLEANIMOAMSET_40, 8 + oamend + +.Frameset_35: + oamframe BATTLEANIMOAMSET_40, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_40, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_41, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_41, 2 + oamwait 2 + oamrestart + +.Frameset_36: + oamframe BATTLEANIMOAMSET_42, 2 + oamframe BATTLEANIMOAMSET_43, 2 + oamframe BATTLEANIMOAMSET_44, 2 + oamframe BATTLEANIMOAMSET_45, 2 + oamrestart + +.Frameset_37: + oamframe BATTLEANIMOAMSET_19, 2 + oamwait 2 + oamrestart + +.Frameset_38: + oamframe BATTLEANIMOAMSET_46, 4 + oamframe BATTLEANIMOAMSET_47, 4 + oamrestart + +.Frameset_39: + oamframe BATTLEANIMOAMSET_18, 2 + oamwait 2 + oamrestart + +.Frameset_3a: + oamframe BATTLEANIMOAMSET_48, 8 + oamend + +.Frameset_3b: + oamframe BATTLEANIMOAMSET_48, 8, OAM_X_FLIP + oamend + +.Frameset_3c: + oamframe BATTLEANIMOAMSET_49, 8 + oamend + +.Frameset_3d: + oamframe BATTLEANIMOAMSET_4A, 8 + oamend + +.Frameset_43: + oamframe BATTLEANIMOAMSET_20, 16 + oamframe BATTLEANIMOAMSET_1F, 16 + oamframe BATTLEANIMOAMSET_1E, 16 + oamend + +.Frameset_4c: + oamframe BATTLEANIMOAMSET_20, 8 + oamframe BATTLEANIMOAMSET_1F, 8 + oamframe BATTLEANIMOAMSET_1E, 8 + oamend + +.Frameset_44: + oamwait 20 + oamframe BATTLEANIMOAMSET_55, 40 + oamframe BATTLEANIMOAMSET_54, 40 + oamframe BATTLEANIMOAMSET_53, 20 + oamwait 4 + oamframe BATTLEANIMOAMSET_53, 4 + oamwait 4 + oamframe BATTLEANIMOAMSET_53, 4 + oamwait 4 + oamframe BATTLEANIMOAMSET_53, 4 + oamdelete + +.Frameset_7e: + oamframe BATTLEANIMOAMSET_1E, 8 + oamframe BATTLEANIMOAMSET_1F, 8 + oamframe BATTLEANIMOAMSET_20, 8 + oamdelete + +.Frameset_45: + oamwait 0 + oamframe BATTLEANIMOAMSET_14, 0 + oamframe BATTLEANIMOAMSET_15, 0 + oamframe BATTLEANIMOAMSET_14, 0, OAM_X_FLIP + oamwait 0 + oamframe BATTLEANIMOAMSET_16, 0, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_15, 0 + oamframe BATTLEANIMOAMSET_16, 0 + oamrestart + +.Frameset_46: + oamframe BATTLEANIMOAMSET_56, 2 + oamframe BATTLEANIMOAMSET_57, 4 + oamdelete + +.Frameset_47: + oamframe BATTLEANIMOAMSET_56, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_57, 4, OAM_X_FLIP, OAM_Y_FLIP + oamdelete + +.Frameset_48: + oamframe BATTLEANIMOAMSET_56, 1 + oamframe BATTLEANIMOAMSET_57, 1 + oamframe BATTLEANIMOAMSET_58, 1 + oamframe BATTLEANIMOAMSET_57, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_58, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_57, 2 + oamdelete + +.Frameset_49: + oamframe BATTLEANIMOAMSET_56, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_57, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_58, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_57, 1 + oamframe BATTLEANIMOAMSET_58, 1 + oamframe BATTLEANIMOAMSET_57, 2, OAM_X_FLIP, OAM_Y_FLIP + oamdelete + +.Frameset_4a: + oamframe BATTLEANIMOAMSET_57, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_58, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_57, 1 + oamframe BATTLEANIMOAMSET_58, 1 + oamrestart + +.Frameset_4b: + oamframe BATTLEANIMOAMSET_59, 1 + oamframe BATTLEANIMOAMSET_5A, 1 + oamframe BATTLEANIMOAMSET_5B, 1 + oamframe BATTLEANIMOAMSET_5C, 2 + oamdelete + +.Frameset_4d: + oamframe BATTLEANIMOAMSET_0A, 10 + oamframe BATTLEANIMOAMSET_0B, 3, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_5D, 3, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_0B, 3, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_0A, 2, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_0B, 1, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_5D, 1 + oamframe BATTLEANIMOAMSET_0B, 1 + oamrestart + +.Frameset_4e: + oamframe BATTLEANIMOAMSET_0A, 3 + oamframe BATTLEANIMOAMSET_0B, 7, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_0A, 7 + oamframe BATTLEANIMOAMSET_0B, 7 + oamframe BATTLEANIMOAMSET_0A, 3 + oamrestart + +.Frameset_4f: + oamframe BATTLEANIMOAMSET_5E, 32 + oamframe BATTLEANIMOAMSET_5E, 32 + oamdelete + +.Frameset_50: + oamframe BATTLEANIMOAMSET_5F, 32 + oamframe BATTLEANIMOAMSET_5F, 32 + oamdelete + +.Frameset_51: + oamframe BATTLEANIMOAMSET_60, 8 + oamend + +.Frameset_52: + oamframe BATTLEANIMOAMSET_61, 1 + oamframe BATTLEANIMOAMSET_62, 1 + oamframe BATTLEANIMOAMSET_63, 1 + oamend + +.Frameset_53: + oamframe BATTLEANIMOAMSET_63, 7 + oamframe BATTLEANIMOAMSET_64, 7 + oamrestart + +.Frameset_54: + oamframe BATTLEANIMOAMSET_65, 1 + oamframe BATTLEANIMOAMSET_66, 1 + oamframe BATTLEANIMOAMSET_67, 1 + oamend + +.Frameset_55: + oamframe BATTLEANIMOAMSET_67, 7 + oamframe BATTLEANIMOAMSET_68, 7 + oamrestart + +.Frameset_59: + oamframe BATTLEANIMOAMSET_6E, 8 + oamend + +.Frameset_5a: + oamframe BATTLEANIMOAMSET_6F, 8 + oamend + +.Frameset_5b: + oamframe BATTLEANIMOAMSET_6E, 8, OAM_Y_FLIP + oamend + +.Frameset_5c: + oamframe BATTLEANIMOAMSET_18, 4 + oamframe BATTLEANIMOAMSET_70, 4 + oamframe BATTLEANIMOAMSET_71, 4 + oamframe BATTLEANIMOAMSET_72, 4 + oamframe BATTLEANIMOAMSET_73, 4 + oamdelete + +.Frameset_5d: + oamframe BATTLEANIMOAMSET_74, 4 + oamframe BATTLEANIMOAMSET_75, 4 + oamrestart + +.Frameset_5e: + oamframe BATTLEANIMOAMSET_14, 8 + oamend + +.Frameset_7a: + oamframe BATTLEANIMOAMSET_74, 3 + oamframe BATTLEANIMOAMSET_14, 3 + oamframe BATTLEANIMOAMSET_15, 3 + oamframe BATTLEANIMOAMSET_14, 3 + oamframe BATTLEANIMOAMSET_15, 3 + oamdelete + +.Frameset_af: + oamframe BATTLEANIMOAMSET_14, 0 + oamframe BATTLEANIMOAMSET_15, 0 + oamframe BATTLEANIMOAMSET_14, 0 + oamframe BATTLEANIMOAMSET_15, 0 + oamframe BATTLEANIMOAMSET_74, 12 + oamdelete + +.Frameset_5f: + oamframe BATTLEANIMOAMSET_76, 8 + oamend + +.Frameset_60: + oamframe BATTLEANIMOAMSET_77, 1 + oamframe BATTLEANIMOAMSET_78, 1 + oamframe BATTLEANIMOAMSET_79, 1 + oamframe BATTLEANIMOAMSET_7A, 1 + oamframe BATTLEANIMOAMSET_7B, 1 + oamframe BATTLEANIMOAMSET_7C, 1 + oamframe BATTLEANIMOAMSET_7D, 1 + oamframe BATTLEANIMOAMSET_7C, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_7B, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_7A, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_79, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_78, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_77, 1, OAM_X_FLIP, OAM_Y_FLIP + oamdelete + +.Frameset_61: + oamframe BATTLEANIMOAMSET_1B, 4 + oamframe BATTLEANIMOAMSET_7E, 4 + oamrestart + +.Frameset_62: + oamframe BATTLEANIMOAMSET_1B, 4, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_7E, 4, OAM_X_FLIP + oamrestart + +.Frameset_63: + oamframe BATTLEANIMOAMSET_7F, 8 + oamend + +.Frameset_64: + oamframe BATTLEANIMOAMSET_25, 8 + oamend + +.Frameset_65: + oamframe BATTLEANIMOAMSET_80, 8 + oamend + +.Frameset_66: + oamframe BATTLEANIMOAMSET_83, 7 + oamframe BATTLEANIMOAMSET_82, 7 + oamframe BATTLEANIMOAMSET_81, 7 + oamframe BATTLEANIMOAMSET_82, 7 + oamframe BATTLEANIMOAMSET_83, 7 + oamframe BATTLEANIMOAMSET_82, 7 + oamframe BATTLEANIMOAMSET_81, 7 + oamdelete + +.Frameset_67: + oamframe BATTLEANIMOAMSET_1B, 16 + oamdelete + +.Frameset_68: + oamwait 15 + oamframe BATTLEANIMOAMSET_84, 15 + oamframe BATTLEANIMOAMSET_85, 15 + oamframe BATTLEANIMOAMSET_29, 15 + oamframe BATTLEANIMOAMSET_28, 15 + oamframe BATTLEANIMOAMSET_86, 32 + oamdelete + +.Frameset_69: + oamframe BATTLEANIMOAMSET_1B, 3 + oamframe BATTLEANIMOAMSET_87, 3 + oamframe BATTLEANIMOAMSET_88, 3 + oamframe BATTLEANIMOAMSET_89, 3 + oamdelete + +.Frameset_6a: + oamframe BATTLEANIMOAMSET_8A, 2 + oamframe BATTLEANIMOAMSET_8B, 2 + oamframe BATTLEANIMOAMSET_8C, 2 + oamframe BATTLEANIMOAMSET_8D, 2 + oamdelete + +.Frameset_6b: + oamframe BATTLEANIMOAMSET_61, 2 + oamframe BATTLEANIMOAMSET_62, 2 + oamframe BATTLEANIMOAMSET_63, 2 + oamend + +.Frameset_6c: + oamframe BATTLEANIMOAMSET_65, 2 + oamframe BATTLEANIMOAMSET_66, 2 + oamframe BATTLEANIMOAMSET_67, 2 + oamend + +.Frameset_6d: + oamframe BATTLEANIMOAMSET_8E, 8 + oamend + +.Frameset_6e: + oamframe BATTLEANIMOAMSET_8E, 8, OAM_X_FLIP + oamend + +.Frameset_6f: + oamframe BATTLEANIMOAMSET_8F, 16 + oamframe BATTLEANIMOAMSET_90, 16 + oamrestart + +.Frameset_70: + oamframe BATTLEANIMOAMSET_91, 16 + oamframe BATTLEANIMOAMSET_92, 16 + oamrestart + +.Frameset_71: + oamframe BATTLEANIMOAMSET_93, 8 + oamend + +.Frameset_72: + oamframe BATTLEANIMOAMSET_1E, 8 + oamend + +.Frameset_73: + oamframe BATTLEANIMOAMSET_1B, 7 + oamframe BATTLEANIMOAMSET_94, 7 + oamrestart + +.Frameset_74: + oamframe BATTLEANIMOAMSET_95, 8 + oamend + +.Frameset_75: + oamframe BATTLEANIMOAMSET_96, 8 + oamend + +.Frameset_76: + oamframe BATTLEANIMOAMSET_95, 8 + oamend + +.Frameset_77: + oamframe BATTLEANIMOAMSET_97, 1 + oamframe BATTLEANIMOAMSET_97, 1, OAM_X_FLIP + oamrestart + +.Frameset_78: + oamframe BATTLEANIMOAMSET_98, 8 + oamend + +.Frameset_79: + oamframe BATTLEANIMOAMSET_99, 32 + oamframe BATTLEANIMOAMSET_99, 32 + oamframe BATTLEANIMOAMSET_99, 32 + oamframe BATTLEANIMOAMSET_99, 32 + oamframe BATTLEANIMOAMSET_99, 32 + oamframe BATTLEANIMOAMSET_9A, 8 + oamend + +.Frameset_7b: + oamframe BATTLEANIMOAMSET_9B, 8 + oamend + +.Frameset_7c: + oamframe BATTLEANIMOAMSET_9C, 2 + oamframe BATTLEANIMOAMSET_9D, 2 + oamframe BATTLEANIMOAMSET_9E, 8 + oamwait 2 + oamframe BATTLEANIMOAMSET_9E, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_9E, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_9E, 2 + oamdelete + +.Frameset_7d: + oamframe BATTLEANIMOAMSET_9F, 8 + oamend + +.Frameset_7f: + oamframe BATTLEANIMOAMSET_0F, 8 + oamend + +.Frameset_80: + oamframe BATTLEANIMOAMSET_6B, 24 + oamdelete + +.Frameset_81: + oamframe BATTLEANIMOAMSET_A0, 1 ; fallthrough +.Frameset_82: + oamframe BATTLEANIMOAMSET_A1, 1 ; fallthrough +.Frameset_83: + oamframe BATTLEANIMOAMSET_A2, 1 + oamdelete + +.Frameset_84: + oamframe BATTLEANIMOAMSET_A3, 8 + oamend + +.Frameset_85: + oamframe BATTLEANIMOAMSET_A4, 4 + oamframe BATTLEANIMOAMSET_A5, 4 + oamframe BATTLEANIMOAMSET_A6, 4 + oamframe BATTLEANIMOAMSET_A7, 4 + oamframe BATTLEANIMOAMSET_A6, 4, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_A5, 4, OAM_X_FLIP + oamrestart + +.Frameset_86: + oamframe BATTLEANIMOAMSET_A8, 4 + oamframe BATTLEANIMOAMSET_A9, 4 + oamframe BATTLEANIMOAMSET_AA, 4 + oamframe BATTLEANIMOAMSET_AB, 4 + oamframe BATTLEANIMOAMSET_AA, 4, OAM_X_FLIP + oamframe BATTLEANIMOAMSET_A9, 4, OAM_X_FLIP + oamrestart + +.Frameset_87: + oamframe BATTLEANIMOAMSET_1B, 8 + oamend + +.Frameset_88: + oamframe BATTLEANIMOAMSET_AC, 8 + oamend + +.Frameset_89: + oamframe BATTLEANIMOAMSET_AD, 8 + oamend + +.Frameset_8a: + oamframe BATTLEANIMOAMSET_AE, 8 + oamend + +.Frameset_8b: + oamframe BATTLEANIMOAMSET_AF, 8 + oamend + +.Frameset_8c: + oamframe BATTLEANIMOAMSET_B0, 32 + oamdelete + +.Frameset_8d: + oamframe BATTLEANIMOAMSET_B1, 7 + oamframe BATTLEANIMOAMSET_B1, 7, OAM_X_FLIP + oamrestart + +.Frameset_8e: + oamframe BATTLEANIMOAMSET_B2, 8 + oamend + +.Frameset_8f: + oamframe BATTLEANIMOAMSET_B3, 8 + oamend + +.Frameset_90: + oamframe BATTLEANIMOAMSET_B3, 8, OAM_X_FLIP + oamend + +.Frameset_91: + oamframe BATTLEANIMOAMSET_B3, 8, OAM_Y_FLIP + oamend + +.Frameset_92: + oamframe BATTLEANIMOAMSET_B3, 8, OAM_X_FLIP, OAM_Y_FLIP + oamend + +.Frameset_93: + oamframe BATTLEANIMOAMSET_B5, 8 + oamend + +.Frameset_94: + oamframe BATTLEANIMOAMSET_B5, 8, OAM_X_FLIP + oamend + +.Frameset_95: + oamframe BATTLEANIMOAMSET_B5, 8, OAM_Y_FLIP + oamend + +.Frameset_96: + oamframe BATTLEANIMOAMSET_B5, 8, OAM_X_FLIP, OAM_Y_FLIP + oamend + +.Frameset_97: + oamframe BATTLEANIMOAMSET_B4, 8 + oamend + +.Frameset_98: + oamframe BATTLEANIMOAMSET_6B, 8 + oamend + +.Frameset_99: + oamframe BATTLEANIMOAMSET_B6, 8 + oamend + +.Frameset_9a: + oamframe BATTLEANIMOAMSET_B7, 32 + oamend + +.Frameset_9b: + oamframe BATTLEANIMOAMSET_1B, 32 + oamend + +.Frameset_9c: + oamframe BATTLEANIMOAMSET_B8, 32 + oamend + +.Frameset_9d: + oamframe BATTLEANIMOAMSET_B8, 32, OAM_X_FLIP + oamend + +.Frameset_9e: + oamframe BATTLEANIMOAMSET_B9, 32 + oamend + +.Frameset_9f: + oamframe BATTLEANIMOAMSET_BA, 32 + oamend + +.Frameset_a0: + oamframe BATTLEANIMOAMSET_BB, 32, OAM_X_FLIP + oamend + +.Frameset_a1: + oamframe BATTLEANIMOAMSET_BB, 32 + oamend + +.Frameset_a2: + oamframe BATTLEANIMOAMSET_BC, 32 + oamend + +.Frameset_a3: + oamframe BATTLEANIMOAMSET_BD, 11 + oamframe BATTLEANIMOAMSET_BE, 11 + oamframe BATTLEANIMOAMSET_1B, 11 + oamdelete + +.Frameset_a4: + oamframe BATTLEANIMOAMSET_BF, 4 + oamframe BATTLEANIMOAMSET_C0, 4 + oamframe BATTLEANIMOAMSET_C1, 4 + oamdelete + +.Frameset_a5: + oamframe BATTLEANIMOAMSET_C2, 32 + oamframe BATTLEANIMOAMSET_C2, 32 + oamdelete + +.Frameset_a6: + oamframe BATTLEANIMOAMSET_4B, 2 + oamframe BATTLEANIMOAMSET_4C, 2 + oamframe BATTLEANIMOAMSET_4D, 32 + oamframe BATTLEANIMOAMSET_4D, 32 + oamframe BATTLEANIMOAMSET_4D, 32 + oamframe BATTLEANIMOAMSET_4F, 1 + oamframe BATTLEANIMOAMSET_50, 1 + oamframe BATTLEANIMOAMSET_51, 1 + oamframe BATTLEANIMOAMSET_52, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_52, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_52, 2 + oamwait 2 + oamframe BATTLEANIMOAMSET_52, 2 + oamdelete + +.Frameset_a7: + oamframe BATTLEANIMOAMSET_4B, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_4C, 2, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_4D, 32, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_4D, 32, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_4D, 32, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_4F, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_50, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_51, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP + oamwait 2 + oamframe BATTLEANIMOAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP + oamwait 2 + oamframe BATTLEANIMOAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP + oamwait 2 + oamframe BATTLEANIMOAMSET_52, 2, OAM_X_FLIP, OAM_Y_FLIP + oamdelete + +.Frameset_a8: + oamframe BATTLEANIMOAMSET_C3, 1 + oamframe BATTLEANIMOAMSET_C3, 1, OAM_X_FLIP, OAM_Y_FLIP + oamrestart + +.Frameset_a9: + oamframe BATTLEANIMOAMSET_C4, 32 + oamend + +.Frameset_aa: + oamframe BATTLEANIMOAMSET_C5, 4 + oamframe BATTLEANIMOAMSET_C6, 4 + oamframe BATTLEANIMOAMSET_C7, 4 + oamdelete + +.Frameset_ab: + oamframe BATTLEANIMOAMSET_C8, 1 + oamframe BATTLEANIMOAMSET_C8, 1, OAM_X_FLIP + oamrestart + +.Frameset_ac: + oamframe BATTLEANIMOAMSET_C9, 3 + oamframe BATTLEANIMOAMSET_05, 3 + oamdelete + +.Frameset_ad: + oamframe BATTLEANIMOAMSET_CA, 32 + oamframe BATTLEANIMOAMSET_CB, 3 + oamframe BATTLEANIMOAMSET_CA, 3 + oamframe BATTLEANIMOAMSET_CB, 3 + oamrestart + +.Frameset_ae: + oamframe BATTLEANIMOAMSET_03, 32, OAM_Y_FLIP + oamend + +.Frameset_b0: + oamframe BATTLEANIMOAMSET_CC, 32 + oamend + +.Frameset_b1: + oamframe BATTLEANIMOAMSET_7F, 2 + oamframe BATTLEANIMOAMSET_25, 2 + oamframe BATTLEANIMOAMSET_80, 2 + oamframe BATTLEANIMOAMSET_25, 2 + oamrestart + +.Frameset_b2: + oamframe BATTLEANIMOAMSET_CD, 4 + oamframe BATTLEANIMOAMSET_CE, 4 + oamframe BATTLEANIMOAMSET_CD, 4, OAM_X_FLIP, OAM_Y_FLIP + oamframe BATTLEANIMOAMSET_CE, 4, OAM_X_FLIP, OAM_Y_FLIP + oamrestart + +.Frameset_b3: + oamframe BATTLEANIMOAMSET_CF, 4 + oamframe BATTLEANIMOAMSET_D0, 4 + oamframe BATTLEANIMOAMSET_D1, 4 + oamframe BATTLEANIMOAMSET_D2, 4 + oamdelete + +.Frameset_b4: + oamframe BATTLEANIMOAMSET_D3, 32 + oamend + +.Frameset_b5: + oamframe BATTLEANIMOAMSET_D4, 8 + oamend + +.Frameset_b6: + oamframe BATTLEANIMOAMSET_D5, 8 + oamend + +.Frameset_b7: + oamframe BATTLEANIMOAMSET_D6, 8 + oamend + +.Frameset_b8: + oamframe BATTLEANIMOAMSET_D7, 8 + oamend diff --git a/data/battle_anims/oam.asm b/data/battle_anims/oam.asm new file mode 100644 index 0000000..da80a96 --- /dev/null +++ b/data/battle_anims/oam.asm @@ -0,0 +1,1092 @@ +MACRO battleanimoam +; vtile offset, data length, data pointer + db \1, \2 + dw \3 +ENDM + +BattleAnimOAMData: +; entries correspond to BATTLEANIMOAMSET_* constants + table_width 4, BattleAnimOAMData + battleanimoam $00, 16, .OAMData_00 ; BATTLEANIMOAMSET_00 + battleanimoam $04, 9, .OAMData_01 ; BATTLEANIMOAMSET_01 + battleanimoam $08, 4, .OAMData_02 ; BATTLEANIMOAMSET_02 + battleanimoam $09, 4, .OAMData_03 ; BATTLEANIMOAMSET_03 + battleanimoam $0d, 4, .OAMData_04 ; BATTLEANIMOAMSET_04 + battleanimoam $0f, 4, .OAMData_03 ; BATTLEANIMOAMSET_05 + battleanimoam $13, 4, .OAMData_04 ; BATTLEANIMOAMSET_06 + battleanimoam $04, 16, .OAMData_00 ; BATTLEANIMOAMSET_07 + battleanimoam $08, 16, .OAMData_00 ; BATTLEANIMOAMSET_08 + battleanimoam $08, 16, .OAMData_09 ; BATTLEANIMOAMSET_09 + battleanimoam $00, 4, .OAMData_04 ; BATTLEANIMOAMSET_0A + battleanimoam $02, 4, .OAMData_03 ; BATTLEANIMOAMSET_0B + battleanimoam $06, 2, .OAMData_0c ; BATTLEANIMOAMSET_0C + battleanimoam $07, 2, .OAMData_0c ; BATTLEANIMOAMSET_0D + battleanimoam $02, 4, .OAMData_04 ; BATTLEANIMOAMSET_0E + battleanimoam $04, 1, .OAMData_0f ; BATTLEANIMOAMSET_0F + battleanimoam $05, 1, .OAMData_0f ; BATTLEANIMOAMSET_10 + battleanimoam $00, 2, .OAMData_11 ; BATTLEANIMOAMSET_11 + battleanimoam $02, 2, .OAMData_11 ; BATTLEANIMOAMSET_12 + battleanimoam $00, 4, .OAMData_13 ; BATTLEANIMOAMSET_13 + battleanimoam $00, 1, .OAMData_0f ; BATTLEANIMOAMSET_14 + battleanimoam $01, 1, .OAMData_0f ; BATTLEANIMOAMSET_15 + battleanimoam $02, 1, .OAMData_0f ; BATTLEANIMOAMSET_16 + battleanimoam $03, 1, .OAMData_0f ; BATTLEANIMOAMSET_17 + battleanimoam $00, 4, .OAMData_02 ; BATTLEANIMOAMSET_18 + battleanimoam $01, 16, .OAMData_00 ; BATTLEANIMOAMSET_19 + battleanimoam $05, 16, .OAMData_00 ; BATTLEANIMOAMSET_1A + battleanimoam $00, 4, .OAMData_03 ; BATTLEANIMOAMSET_1B + battleanimoam $05, 12, .OAMData_1c ; BATTLEANIMOAMSET_1C + battleanimoam $02, 4, .OAMData_02 ; BATTLEANIMOAMSET_1D + battleanimoam $06, 1, .OAMData_0f ; BATTLEANIMOAMSET_1E + battleanimoam $07, 1, .OAMData_0f ; BATTLEANIMOAMSET_1F + battleanimoam $08, 1, .OAMData_0f ; BATTLEANIMOAMSET_20 + battleanimoam $04, 4, .OAMData_03 ; BATTLEANIMOAMSET_21 + battleanimoam $09, 22, .OAMData_22 ; BATTLEANIMOAMSET_22 + battleanimoam $04, 2, .OAMData_11 ; BATTLEANIMOAMSET_23 + battleanimoam $06, 2, .OAMData_11 ; BATTLEANIMOAMSET_24 + battleanimoam $0c, 1, .OAMData_0f ; BATTLEANIMOAMSET_25 + battleanimoam $0a, 1, .OAMData_0f ; BATTLEANIMOAMSET_26 + battleanimoam $0b, 4, .OAMData_02 ; BATTLEANIMOAMSET_27 + battleanimoam $08, 4, .OAMData_04 ; BATTLEANIMOAMSET_28 + battleanimoam $06, 4, .OAMData_04 ; BATTLEANIMOAMSET_29 + battleanimoam $00, 5, .OAMData_2a ; BATTLEANIMOAMSET_2A + battleanimoam $03, 6, .OAMData_2b ; BATTLEANIMOAMSET_2B + battleanimoam $00, 7, .OAMData_2c ; BATTLEANIMOAMSET_2C + battleanimoam $03, 8, .OAMData_2d ; BATTLEANIMOAMSET_2D + battleanimoam $00, 9, .OAMData_2e ; BATTLEANIMOAMSET_2E + battleanimoam $00, 4, .OAMData_2f ; BATTLEANIMOAMSET_2F + battleanimoam $02, 4, .OAMData_30 ; BATTLEANIMOAMSET_30 + battleanimoam $04, 6, .OAMData_31 ; BATTLEANIMOAMSET_31 + battleanimoam $00, 2, .OAMData_32 ; BATTLEANIMOAMSET_32 + battleanimoam $00, 7, .OAMData_33 ; BATTLEANIMOAMSET_33 + battleanimoam $00, 14, .OAMData_32 ; BATTLEANIMOAMSET_34 + battleanimoam $00, 21, .OAMData_33 ; BATTLEANIMOAMSET_35 + battleanimoam $00, 2, .OAMData_36 ; BATTLEANIMOAMSET_36 + battleanimoam $00, 6, .OAMData_36 ; BATTLEANIMOAMSET_37 + battleanimoam $00, 10, .OAMData_36 ; BATTLEANIMOAMSET_38 + battleanimoam $00, 14, .OAMData_36 ; BATTLEANIMOAMSET_39 + battleanimoam $00, 2, .OAMData_3a ; BATTLEANIMOAMSET_3A + battleanimoam $00, 6, .OAMData_3a ; BATTLEANIMOAMSET_3B + battleanimoam $00, 10, .OAMData_3a ; BATTLEANIMOAMSET_3C + battleanimoam $00, 14, .OAMData_3a ; BATTLEANIMOAMSET_3D + battleanimoam $00, 4, .OAMData_3e ; BATTLEANIMOAMSET_3E + battleanimoam $00, 16, .OAMData_3e ; BATTLEANIMOAMSET_3F + battleanimoam $00, 26, .OAMData_3e ; BATTLEANIMOAMSET_40 + battleanimoam $00, 26, .OAMData_41 ; BATTLEANIMOAMSET_41 + battleanimoam $0e, 4, .OAMData_42 ; BATTLEANIMOAMSET_42 + battleanimoam $0e, 8, .OAMData_42 ; BATTLEANIMOAMSET_43 + battleanimoam $0e, 4, .OAMData_44 ; BATTLEANIMOAMSET_44 + battleanimoam $0e, 8, .OAMData_44 ; BATTLEANIMOAMSET_45 + battleanimoam $0e, 4, .OAMData_46 ; BATTLEANIMOAMSET_46 + battleanimoam $0e, 4, .OAMData_47 ; BATTLEANIMOAMSET_47 + battleanimoam $00, 6, .OAMData_48 ; BATTLEANIMOAMSET_48 + battleanimoam $03, 4, .OAMData_49 ; BATTLEANIMOAMSET_49 + battleanimoam $03, 2, .OAMData_4a ; BATTLEANIMOAMSET_4A + battleanimoam $01, 5, .OAMData_0f ; BATTLEANIMOAMSET_4B + battleanimoam $01, 6, .OAMData_4c ; BATTLEANIMOAMSET_4C + battleanimoam $01, 7, .OAMData_4d ; BATTLEANIMOAMSET_4D + battleanimoam $01, 3, .OAMData_4d ; BATTLEANIMOAMSET_4E + battleanimoam $01, 8, .OAMData_4f ; BATTLEANIMOAMSET_4F + battleanimoam $01, 9, .OAMData_50 ; BATTLEANIMOAMSET_50 + battleanimoam $01, 10, .OAMData_51 ; BATTLEANIMOAMSET_51 + battleanimoam $01, 6, .OAMData_51 ; BATTLEANIMOAMSET_52 + battleanimoam $00, 9, .OAMData_01 ; BATTLEANIMOAMSET_53 + battleanimoam $04, 4, .OAMData_02 ; BATTLEANIMOAMSET_54 + battleanimoam $05, 4, .OAMData_02 ; BATTLEANIMOAMSET_55 + battleanimoam $00, 2, .OAMData_56 ; BATTLEANIMOAMSET_56 + battleanimoam $02, 2, .OAMData_56 ; BATTLEANIMOAMSET_57 + battleanimoam $04, 2, .OAMData_56 ; BATTLEANIMOAMSET_58 + battleanimoam $02, 4, .OAMData_59 ; BATTLEANIMOAMSET_59 + battleanimoam $02, 4, .OAMData_5a ; BATTLEANIMOAMSET_5A + battleanimoam $02, 2, .OAMData_0c ; BATTLEANIMOAMSET_5B + battleanimoam $04, 2, .OAMData_0c ; BATTLEANIMOAMSET_5C + battleanimoam $06, 4, .OAMData_5d ; BATTLEANIMOAMSET_5D + battleanimoam $08, 2, .OAMData_0c ; BATTLEANIMOAMSET_5E + battleanimoam $09, 2, .OAMData_0c ; BATTLEANIMOAMSET_5F + battleanimoam $05, 2, .OAMData_60 ; BATTLEANIMOAMSET_60 + battleanimoam $00, 2, .OAMData_61 ; BATTLEANIMOAMSET_61 + battleanimoam $00, 5, .OAMData_61 ; BATTLEANIMOAMSET_62 + battleanimoam $00, 9, .OAMData_61 ; BATTLEANIMOAMSET_63 + battleanimoam $09, 9, .OAMData_61 ; BATTLEANIMOAMSET_64 + battleanimoam $00, 4, .OAMData_65 ; BATTLEANIMOAMSET_65 + battleanimoam $00, 7, .OAMData_65 ; BATTLEANIMOAMSET_66 + battleanimoam $00, 9, .OAMData_65 ; BATTLEANIMOAMSET_67 + battleanimoam $09, 9, .OAMData_65 ; BATTLEANIMOAMSET_68 + battleanimoam $04, 1, .OAMData_69 ; BATTLEANIMOAMSET_69 + battleanimoam $05, 2, .OAMData_6a ; BATTLEANIMOAMSET_6A + battleanimoam $06, 4, .OAMData_03 ; BATTLEANIMOAMSET_6B + battleanimoam $0a, 4, .OAMData_03 ; BATTLEANIMOAMSET_6C + battleanimoam $0e, 4, .OAMData_03 ; BATTLEANIMOAMSET_6D + battleanimoam $08, 5, .OAMData_6e ; BATTLEANIMOAMSET_6E + battleanimoam $0d, 3, .OAMData_6f ; BATTLEANIMOAMSET_6F + battleanimoam $01, 8, .OAMData_70 ; BATTLEANIMOAMSET_70 + battleanimoam $03, 8, .OAMData_70 ; BATTLEANIMOAMSET_71 + battleanimoam $05, 8, .OAMData_70 ; BATTLEANIMOAMSET_72 + battleanimoam $07, 8, .OAMData_70 ; BATTLEANIMOAMSET_73 + battleanimoam $06, 4, .OAMData_02 ; BATTLEANIMOAMSET_74 + battleanimoam $07, 4, .OAMData_02 ; BATTLEANIMOAMSET_75 + battleanimoam $0a, 2, .OAMData_76 ; BATTLEANIMOAMSET_76 + battleanimoam $00, 1, .OAMData_77 ; BATTLEANIMOAMSET_77 + battleanimoam $00, 3, .OAMData_78 ; BATTLEANIMOAMSET_78 + battleanimoam $00, 6, .OAMData_79 ; BATTLEANIMOAMSET_79 + battleanimoam $00, 9, .OAMData_7a ; BATTLEANIMOAMSET_7A + battleanimoam $00, 12, .OAMData_7b ; BATTLEANIMOAMSET_7B + battleanimoam $00, 14, .OAMData_7c ; BATTLEANIMOAMSET_7C + battleanimoam $00, 15, .OAMData_7d ; BATTLEANIMOAMSET_7D + battleanimoam $04, 4, .OAMData_03 ; BATTLEANIMOAMSET_7E + battleanimoam $08, 4, .OAMData_03 ; BATTLEANIMOAMSET_7F + battleanimoam $0d, 1, .OAMData_0f ; BATTLEANIMOAMSET_80 + battleanimoam $0e, 4, .OAMData_81 ; BATTLEANIMOAMSET_81 + battleanimoam $10, 1, .OAMData_0f ; BATTLEANIMOAMSET_82 + battleanimoam $11, 1, .OAMData_0f ; BATTLEANIMOAMSET_83 + battleanimoam $04, 2, .OAMData_6a ; BATTLEANIMOAMSET_84 + battleanimoam $05, 2, .OAMData_6a ; BATTLEANIMOAMSET_85 + battleanimoam $0a, 4, .OAMData_04 ; BATTLEANIMOAMSET_86 + battleanimoam $00, 8, .OAMData_87 ; BATTLEANIMOAMSET_87 + battleanimoam $00, 12, .OAMData_88 ; BATTLEANIMOAMSET_88 + battleanimoam $00, 16, .OAMData_87 ; BATTLEANIMOAMSET_89 + battleanimoam $09, 2, .OAMData_8a ; BATTLEANIMOAMSET_8A + battleanimoam $09, 4, .OAMData_8a ; BATTLEANIMOAMSET_8B + battleanimoam $09, 6, .OAMData_8a ; BATTLEANIMOAMSET_8C + battleanimoam $09, 8, .OAMData_8a ; BATTLEANIMOAMSET_8D + battleanimoam $12, 5, .OAMData_8e ; BATTLEANIMOAMSET_8E + battleanimoam $00, 4, .OAMData_8f ; BATTLEANIMOAMSET_8F + battleanimoam $04, 4, .OAMData_8f ; BATTLEANIMOAMSET_90 + battleanimoam $08, 4, .OAMData_8f ; BATTLEANIMOAMSET_91 + battleanimoam $0c, 4, .OAMData_8f ; BATTLEANIMOAMSET_92 + battleanimoam $00, 6, .OAMData_93 ; BATTLEANIMOAMSET_93 + battleanimoam $04, 4, .OAMData_03 ; BATTLEANIMOAMSET_94 + battleanimoam $0a, 4, .OAMData_04 ; BATTLEANIMOAMSET_95 + battleanimoam $15, 4, .OAMData_30 ; BATTLEANIMOAMSET_96 + battleanimoam $04, 4, .OAMData_30 ; BATTLEANIMOAMSET_97 + battleanimoam $0c, 4, .OAMData_04 ; BATTLEANIMOAMSET_98 + battleanimoam $0a, 4, .OAMData_99 ; BATTLEANIMOAMSET_99 + battleanimoam $0c, 4, .OAMData_03 ; BATTLEANIMOAMSET_9A + battleanimoam $00, 36, .OAMData_9b ; BATTLEANIMOAMSET_9B + battleanimoam $0d, 2, .OAMData_9c ; BATTLEANIMOAMSET_9C + battleanimoam $0d, 4, .OAMData_9c ; BATTLEANIMOAMSET_9D + battleanimoam $0d, 6, .OAMData_9c ; BATTLEANIMOAMSET_9E + battleanimoam $02, 8, .OAMData_9f ; BATTLEANIMOAMSET_9F + battleanimoam $08, 7, .OAMData_a0 ; BATTLEANIMOAMSET_A0 + battleanimoam $08, 5, .OAMData_a0 ; BATTLEANIMOAMSET_A1 + battleanimoam $08, 3, .OAMData_a0 ; BATTLEANIMOAMSET_A2 + battleanimoam $00, 16, .OAMData_1c ; BATTLEANIMOAMSET_A3 + battleanimoam $00, 9, .OAMData_a4 ; BATTLEANIMOAMSET_A4 + battleanimoam $06, 9, .OAMData_a4 ; BATTLEANIMOAMSET_A5 + battleanimoam $0c, 9, .OAMData_a4 ; BATTLEANIMOAMSET_A6 + battleanimoam $12, 9, .OAMData_a4 ; BATTLEANIMOAMSET_A7 + battleanimoam $18, 9, .OAMData_a4 ; BATTLEANIMOAMSET_A8 + battleanimoam $1e, 9, .OAMData_a4 ; BATTLEANIMOAMSET_A9 + battleanimoam $24, 9, .OAMData_a4 ; BATTLEANIMOAMSET_AA + battleanimoam $2a, 9, .OAMData_a4 ; BATTLEANIMOAMSET_AB + battleanimoam $03, 4, .OAMData_ac ; BATTLEANIMOAMSET_AC + battleanimoam $12, 4, .OAMData_03 ; BATTLEANIMOAMSET_AD + battleanimoam $10, 4, .OAMData_04 ; BATTLEANIMOAMSET_AE + battleanimoam $16, 1, .OAMData_0f ; BATTLEANIMOAMSET_AF + battleanimoam $17, 4, .OAMData_02 ; BATTLEANIMOAMSET_B0 + battleanimoam $18, 4, .OAMData_03 ; BATTLEANIMOAMSET_B1 + battleanimoam $1c, 4, .OAMData_03 ; BATTLEANIMOAMSET_B2 + battleanimoam $20, 3, .OAMData_03 ; BATTLEANIMOAMSET_B3 + battleanimoam $23, 4, .OAMData_04 ; BATTLEANIMOAMSET_B4 + battleanimoam $25, 3, .OAMData_03 ; BATTLEANIMOAMSET_B5 + battleanimoam $17, 4, .OAMData_03 ; BATTLEANIMOAMSET_B6 + battleanimoam $0a, 16, .OAMData_00 ; BATTLEANIMOAMSET_B7 + battleanimoam $10, 16, .OAMData_1c ; BATTLEANIMOAMSET_B8 + battleanimoam $00, 16, .OAMData_1c ; BATTLEANIMOAMSET_B9 + battleanimoam $04, 4, .OAMData_03 ; BATTLEANIMOAMSET_BA + battleanimoam $08, 2, .OAMData_11 ; BATTLEANIMOAMSET_BB + battleanimoam $20, 6, .OAMData_bc ; BATTLEANIMOAMSET_BC + battleanimoam $08, 1, .OAMData_0f ; BATTLEANIMOAMSET_BD + battleanimoam $04, 4, .OAMData_03 ; BATTLEANIMOAMSET_BE + battleanimoam $1a, 4, .OAMData_30 ; BATTLEANIMOAMSET_BF + battleanimoam $16, 9, .OAMData_01 ; BATTLEANIMOAMSET_C0 + battleanimoam $10, 16, .OAMData_c1 ; BATTLEANIMOAMSET_C1 + battleanimoam $09, 6, .OAMData_c2 ; BATTLEANIMOAMSET_C2 + battleanimoam $11, 9, .OAMData_c3 ; BATTLEANIMOAMSET_C3 + battleanimoam $0e, 4, .OAMData_03 ; BATTLEANIMOAMSET_C4 + battleanimoam $0b, 4, .OAMData_30 ; BATTLEANIMOAMSET_C5 + battleanimoam $1c, 6, .OAMData_02 ; BATTLEANIMOAMSET_C6 + battleanimoam $20, 16, .OAMData_c1 ; BATTLEANIMOAMSET_C7 + battleanimoam $05, 6, .OAMData_c8 ; BATTLEANIMOAMSET_C8 + battleanimoam $0b, 4, .OAMData_03 ; BATTLEANIMOAMSET_C9 + battleanimoam $09, 4, .OAMData_ca ; BATTLEANIMOAMSET_CA + battleanimoam $0b, 4, .OAMData_04 ; BATTLEANIMOAMSET_CB + battleanimoam $11, 13, .OAMData_cc ; BATTLEANIMOAMSET_CC + battleanimoam $00, 9, .OAMData_c3 ; BATTLEANIMOAMSET_CD + battleanimoam $09, 9, .OAMData_c3 ; BATTLEANIMOAMSET_CE + battleanimoam $00, 12, .OAMData_cf ; BATTLEANIMOAMSET_CF + battleanimoam $06, 12, .OAMData_cf ; BATTLEANIMOAMSET_D0 + battleanimoam $0c, 12, .OAMData_cf ; BATTLEANIMOAMSET_D1 + battleanimoam $12, 12, .OAMData_cf ; BATTLEANIMOAMSET_D2 + battleanimoam $00, 13, .OAMData_cc ; BATTLEANIMOAMSET_D3 + battleanimoam $00, 7, .OAMData_d4 ; BATTLEANIMOAMSET_D4 + battleanimoam $00, 6, .OAMData_d5 ; BATTLEANIMOAMSET_D5 + battleanimoam $00, 14, .OAMData_d6 ; BATTLEANIMOAMSET_D6 + battleanimoam $00, 12, .OAMData_d7 ; BATTLEANIMOAMSET_D7 + assert_table_length NUM_BATTLEANIMOAMSETS + +.OAMData_11: + dbsprite -1, -1, 4, 0, $00, $0 + dbsprite -1, 0, 4, 0, $01, $0 + +.OAMData_56: + dbsprite -1, -1, 0, 4, $00, $0 + dbsprite 0, -1, 0, 4, $01, $0 + +.OAMData_03: + dbsprite -1, -1, 0, 0, $00, $0 + dbsprite 0, -1, 0, 0, $01, $0 + dbsprite -1, 0, 0, 0, $02, $0 + dbsprite 0, 0, 0, 0, $03, $0 + +.OAMData_02: + dbsprite -1, -1, 0, 0, $00, $0 + dbsprite 0, -1, 0, 0, $00, X_FLIP + dbsprite -1, 0, 0, 0, $00, Y_FLIP + dbsprite 0, 0, 0, 0, $00, X_FLIP | Y_FLIP + +.OAMData_c3: + dbsprite -2, -2, 4, 4, $00, $0 + dbsprite -1, -2, 4, 4, $01, $0 + dbsprite 0, -2, 4, 4, $02, $0 + dbsprite -2, -1, 4, 4, $03, $0 + dbsprite -1, -1, 4, 4, $04, $0 + dbsprite 0, -1, 4, 4, $05, $0 + dbsprite -2, 0, 4, 4, $06, $0 + dbsprite -1, 0, 4, 4, $07, $0 + dbsprite 0, 0, 4, 4, $08, $0 + +.OAMData_01: + dbsprite -2, -2, 4, 4, $00, $0 + dbsprite -1, -2, 4, 4, $01, $0 + dbsprite 0, -2, 4, 4, $00, X_FLIP + dbsprite -2, -1, 4, 4, $02, $0 + dbsprite -1, -1, 4, 4, $03, $0 + dbsprite 0, -1, 4, 4, $02, X_FLIP | Y_FLIP + dbsprite -2, 0, 4, 4, $00, Y_FLIP + dbsprite -1, 0, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 0, 0, 4, 4, $00, X_FLIP | Y_FLIP + +.OAMData_cf: + dbsprite -2, -2, 4, 0, $00, $0 + dbsprite -1, -2, 4, 0, $01, $0 + dbsprite 0, -2, 4, 0, $02, $0 + dbsprite -2, -1, 4, 0, $03, $0 + dbsprite -1, -1, 4, 0, $04, $0 + dbsprite 0, -1, 4, 0, $05, $0 + dbsprite -2, 0, 4, 0, $05, X_FLIP | Y_FLIP + dbsprite -1, 0, 4, 0, $04, X_FLIP | Y_FLIP + dbsprite 0, 0, 4, 0, $03, X_FLIP | Y_FLIP + dbsprite -2, 1, 4, 0, $02, X_FLIP | Y_FLIP + dbsprite -1, 1, 4, 0, $01, X_FLIP | Y_FLIP + dbsprite 0, 1, 4, 0, $00, X_FLIP | Y_FLIP + +.OAMData_1c: + dbsprite -2, -2, 0, 0, $00, $0 + dbsprite -1, -2, 0, 0, $01, $0 + dbsprite 0, -2, 0, 0, $02, $0 + dbsprite 1, -2, 0, 0, $03, $0 + dbsprite -2, -1, 0, 0, $04, $0 + dbsprite -1, -1, 0, 0, $05, $0 + dbsprite 0, -1, 0, 0, $06, $0 + dbsprite 1, -1, 0, 0, $07, $0 + dbsprite -2, 0, 0, 0, $08, $0 + dbsprite -1, 0, 0, 0, $09, $0 + dbsprite 0, 0, 0, 0, $0a, $0 + dbsprite 1, 0, 0, 0, $0b, $0 + dbsprite -2, 1, 0, 0, $0c, $0 + dbsprite -1, 1, 0, 0, $0d, $0 + dbsprite 0, 1, 0, 0, $0e, $0 + dbsprite 1, 1, 0, 0, $0f, $0 + +.OAMData_00: + dbsprite -2, -2, 0, 0, $00, $0 + dbsprite -1, -2, 0, 0, $01, $0 + dbsprite -2, -1, 0, 0, $02, $0 + dbsprite -1, -1, 0, 0, $03, $0 + dbsprite 0, -2, 0, 0, $01, X_FLIP + dbsprite 1, -2, 0, 0, $00, X_FLIP + dbsprite 0, -1, 0, 0, $03, X_FLIP + dbsprite 1, -1, 0, 0, $02, X_FLIP + dbsprite -2, 0, 0, 0, $02, Y_FLIP + dbsprite -1, 0, 0, 0, $03, Y_FLIP + dbsprite -2, 1, 0, 0, $00, Y_FLIP + dbsprite -1, 1, 0, 0, $01, Y_FLIP + dbsprite 0, 0, 0, 0, $03, X_FLIP | Y_FLIP + dbsprite 1, 0, 0, 0, $02, X_FLIP | Y_FLIP + dbsprite 0, 1, 0, 0, $01, X_FLIP | Y_FLIP + dbsprite 1, 1, 0, 0, $00, X_FLIP | Y_FLIP + +.OAMData_09: + dbsprite -3, -3, 4, 4, $00, $0 + dbsprite -2, -3, 4, 4, $01, $0 + dbsprite -3, -2, 4, 4, $02, $0 + dbsprite -2, -2, 4, 4, $03, $0 + dbsprite 0, -3, 4, 4, $01, X_FLIP + dbsprite 1, -3, 4, 4, $00, X_FLIP + dbsprite 0, -2, 4, 4, $03, X_FLIP + dbsprite 1, -2, 4, 4, $02, X_FLIP + dbsprite -3, 0, 4, 4, $02, Y_FLIP + dbsprite -2, 0, 4, 4, $03, Y_FLIP + dbsprite -3, 1, 4, 4, $00, Y_FLIP + dbsprite -2, 1, 4, 4, $01, Y_FLIP + dbsprite 0, 0, 4, 4, $03, X_FLIP | Y_FLIP + dbsprite 1, 0, 4, 4, $02, X_FLIP | Y_FLIP + dbsprite 0, 1, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, 1, 4, 4, $00, X_FLIP | Y_FLIP + +.OAMData_0c: + dbsprite -1, -1, 0, 4, $00, $0 + dbsprite 0, -1, 0, 4, $00, X_FLIP + +.OAMData_6a: + dbsprite -1, 0, 0, 0, $00, $0 + dbsprite 0, 0, 0, 0, $00, X_FLIP + +.OAMData_04: + dbsprite -1, -1, 0, 0, $00, $0 + dbsprite 0, -1, 0, 0, $00, X_FLIP + dbsprite -1, 0, 0, 0, $01, $0 + dbsprite 0, 0, 0, 0, $01, X_FLIP + +.OAMData_5d: + dbsprite -1, -1, 0, 0, $00, $0 + dbsprite 0, -1, 0, 0, $01, $0 + dbsprite -1, 0, 0, 0, $00, Y_FLIP + dbsprite 0, 0, 0, 0, $01, Y_FLIP + +.OAMData_13: + dbsprite -1, -1, 0, 2, $02, $0 + dbsprite -1, 0, 0, 2, $03, $0 + dbsprite 0, -2, 0, 6, $02, $0 + dbsprite 0, -1, 0, 6, $03, $0 + +.OAMData_22: + dbsprite -11, 1, 0, 0, $01, $0 + dbsprite -10, 0, 0, 0, $02, $0 + dbsprite -9, 0, 0, 0, $03, $0 + dbsprite -8, 0, 0, 0, $00, $0 + dbsprite -7, 0, 0, 0, $03, $0 + dbsprite -6, 0, 0, 0, $00, $0 + dbsprite -5, 0, 0, 0, $03, $0 + dbsprite -4, 0, 0, 0, $00, $0 + dbsprite -3, 0, 0, 0, $03, $0 + dbsprite -2, 0, 0, 0, $00, $0 + dbsprite -1, 0, 0, 0, $01, $0 + dbsprite 0, -1, 0, 0, $02, $0 + dbsprite 1, -1, 0, 0, $03, $0 + dbsprite 2, -1, 0, 0, $00, $0 + dbsprite 3, -1, 0, 0, $03, $0 + dbsprite 4, -1, 0, 0, $00, $0 + dbsprite 5, -1, 0, 0, $03, $0 + dbsprite 6, -1, 0, 0, $00, $0 + dbsprite 7, -1, 0, 0, $03, $0 + dbsprite 8, -1, 0, 0, $00, $0 + dbsprite 9, -1, 0, 0, $01, $0 + dbsprite 10, -2, 0, 0, $02, $0 + +.OAMData_2a: + dbsprite -1, -3, 0, 4, $00, $0 + dbsprite 0, -3, 0, 4, $00, X_FLIP + dbsprite -1, -2, 0, 4, $01, $0 + dbsprite 0, -2, 0, 4, $01, X_FLIP + dbsprite -1, -1, 4, 4, $02, $0 + +.OAMData_2b: + dbsprite -1, -4, 0, 4, $00, $0 + dbsprite 0, -4, 0, 4, $00, X_FLIP + dbsprite -1, -3, 0, 4, $01, $0 + dbsprite 0, -3, 0, 4, $01, X_FLIP + dbsprite -1, -2, 4, 4, $02, $0 + dbsprite -1, -1, 4, 4, $02, $0 + +.OAMData_2c: + dbsprite -1, -5, 0, 4, $00, $0 + dbsprite 0, -5, 0, 4, $00, X_FLIP + dbsprite -1, -4, 0, 4, $01, $0 + dbsprite 0, -4, 0, 4, $01, X_FLIP + dbsprite -1, -3, 4, 4, $02, $0 + dbsprite -1, -2, 4, 4, $02, $0 + dbsprite -1, -1, 4, 4, $02, $0 + +.OAMData_2d: + dbsprite -1, -6, 0, 4, $00, $0 + dbsprite 0, -6, 0, 4, $00, X_FLIP + dbsprite -1, -5, 0, 4, $01, $0 + dbsprite 0, -5, 0, 4, $01, X_FLIP + dbsprite -1, -4, 4, 4, $02, $0 + dbsprite -1, -3, 4, 4, $02, $0 + dbsprite -1, -2, 4, 4, $02, $0 + dbsprite -1, -1, 4, 4, $02, $0 + +.OAMData_2e: + dbsprite -1, -7, 0, 4, $00, $0 + dbsprite 0, -7, 0, 4, $00, X_FLIP + dbsprite -1, -6, 0, 4, $01, $0 + dbsprite 0, -6, 0, 4, $01, X_FLIP + dbsprite -1, -5, 4, 4, $02, $0 + dbsprite -1, -4, 4, 4, $02, $0 + dbsprite -1, -3, 4, 4, $02, $0 + dbsprite -1, -2, 4, 4, $02, $0 + dbsprite -1, -1, 4, 4, $02, $0 + +.OAMData_2f: + dbsprite -1, -1, 0, 0, $00, $0 + dbsprite 0, -1, 0, 0, $00, X_FLIP + dbsprite -1, 0, 0, 0, $01, $0 + dbsprite 0, 0, 0, 0, $00, X_FLIP | Y_FLIP + +.OAMData_30: + dbsprite -1, -1, 0, 0, $00, $0 + dbsprite 0, -1, 0, 0, $01, $0 + dbsprite -1, 0, 0, 0, $01, X_FLIP | Y_FLIP + dbsprite 0, 0, 0, 0, $00, X_FLIP | Y_FLIP + +.OAMData_31: + dbsprite -1, -2, 0, 4, $00, $0 + dbsprite 0, -2, 0, 4, $01, $0 + dbsprite -1, -1, 0, 4, $02, $0 + dbsprite 0, -1, 0, 4, $03, $0 + dbsprite -1, 0, 0, 4, $04, $0 + dbsprite 0, 0, 0, 4, $05, $0 + +.OAMData_76: + dbsprite -1, -1, 0, 5, $00, $0 + dbsprite 0, -1, 0, 1, $00, $0 + +.OAMData_32: + dbsprite -2, -1, 4, 0, $00, $0 + dbsprite 0, -1, 4, 0, $00, $0 + dbsprite -2, -3, 4, 0, $00, $0 + dbsprite 0, -3, 4, 0, $00, $0 + dbsprite -3, -2, 4, 0, $00, $0 + dbsprite -2, -2, 4, 0, $01, $0 + dbsprite -1, -2, 4, 0, $00, $0 + dbsprite 0, -2, 4, 0, $01, $0 + dbsprite 1, -2, 4, 0, $00, $0 + dbsprite -4, -1, 4, 0, $00, $0 + dbsprite -3, -1, 4, 0, $01, $0 + dbsprite -1, -1, 4, 0, $01, $0 + dbsprite 1, -1, 4, 0, $01, $0 + dbsprite 2, -1, 4, 0, $00, $0 + +.OAMData_33: + dbsprite -2, -2, 4, 0, $00, $0 + dbsprite 0, -2, 4, 0, $00, $0 + dbsprite -3, -1, 4, 0, $00, $0 + dbsprite -2, -1, 4, 0, $01, $0 + dbsprite -1, -1, 4, 0, $00, $0 + dbsprite 0, -1, 4, 0, $01, $0 + dbsprite 1, -1, 4, 0, $00, $0 + dbsprite -2, -4, 4, 0, $00, $0 + dbsprite 0, -4, 4, 0, $00, $0 + dbsprite -3, -3, 4, 0, $00, $0 + dbsprite -2, -3, 4, 0, $01, $0 + dbsprite -1, -3, 4, 0, $00, $0 + dbsprite 0, -3, 4, 0, $01, $0 + dbsprite 1, -3, 4, 0, $00, $0 + dbsprite -4, -2, 4, 0, $00, $0 + dbsprite -3, -2, 4, 0, $01, $0 + dbsprite -1, -2, 4, 0, $01, $0 + dbsprite 1, -2, 4, 0, $01, $0 + dbsprite 2, -2, 4, 0, $00, $0 + dbsprite -4, -1, 4, 0, $01, $0 + dbsprite 2, -1, 4, 0, $01, $0 + +.OAMData_36: + dbsprite -1, -7, 0, 4, $00, $0 + dbsprite 0, -7, 0, 4, $01, $0 + dbsprite -1, -6, 0, 4, $02, $0 + dbsprite 0, -6, 0, 4, $03, $0 + dbsprite -1, -5, 0, 4, $04, $0 + dbsprite 0, -5, 0, 4, $05, $0 + dbsprite -1, -4, 0, 4, $06, $0 + dbsprite 0, -4, 0, 4, $07, $0 + dbsprite -1, -3, 0, 4, $08, $0 + dbsprite 0, -3, 0, 4, $09, $0 + dbsprite -1, -2, 0, 4, $0a, $0 + dbsprite 0, -2, 0, 4, $0b, $0 + dbsprite -1, -1, 0, 4, $0c, $0 + dbsprite 0, -1, 0, 4, $0d, $0 + +.OAMData_3a: + dbsprite -1, -7, 0, 4, $0c, $0 + dbsprite 0, -7, 0, 4, $0d, $0 + dbsprite -1, -6, 0, 4, $08, $0 + dbsprite 0, -6, 0, 4, $09, $0 + dbsprite -1, -5, 0, 4, $04, $0 + dbsprite 0, -5, 0, 4, $05, $0 + dbsprite -1, -4, 0, 4, $00, $0 + dbsprite 0, -4, 0, 4, $01, $0 + dbsprite -1, -3, 0, 4, $02, $0 + dbsprite 0, -3, 0, 4, $03, $0 + dbsprite 0, -2, 0, 4, $02, $0 + dbsprite 1, -2, 0, 4, $03, $0 + dbsprite 0, -1, 0, 4, $0a, $0 + dbsprite 1, -1, 0, 4, $0b, $0 + +.OAMData_3e: + dbsprite -2, 1, 0, 4, $00, Y_FLIP + dbsprite -1, 1, 0, 4, $02, Y_FLIP + dbsprite 0, 1, 0, 4, $02, X_FLIP | Y_FLIP + dbsprite 1, 1, 0, 4, $00, X_FLIP | Y_FLIP + dbsprite -3, -1, 0, 4, $09, X_FLIP + dbsprite -2, -1, 0, 4, $08, X_FLIP + dbsprite -1, -1, 0, 4, $06, $0 + dbsprite 0, -1, 0, 4, $07, $0 + dbsprite 1, -1, 0, 4, $08, $0 + dbsprite 2, -1, 0, 4, $09, $0 + dbsprite -3, 0, 0, 4, $01, X_FLIP + dbsprite -2, 0, 0, 4, $00, X_FLIP + dbsprite -1, 0, 0, 4, $0c, $0 + dbsprite 0, 0, 0, 4, $0d, $0 + dbsprite 1, 0, 0, 4, $00, $0 + dbsprite 2, 0, 0, 4, $01, $0 + dbsprite -2, -3, 0, 4, $00, $0 + dbsprite -1, -3, 0, 4, $02, $0 + dbsprite 0, -3, 0, 4, $02, X_FLIP + dbsprite 1, -3, 0, 4, $00, X_FLIP + dbsprite -3, -2, 0, 4, $03, X_FLIP + dbsprite -2, -2, 0, 4, $02, X_FLIP + dbsprite -1, -2, 0, 4, $04, $0 + dbsprite 0, -2, 0, 4, $05, $0 + dbsprite 1, -2, 0, 4, $02, $0 + dbsprite 2, -2, 0, 4, $03, $0 + +.OAMData_41: + dbsprite -2, -3, 0, 4, $00, $0 + dbsprite -1, -3, 0, 4, $02, $0 + dbsprite 0, -3, 0, 4, $02, X_FLIP + dbsprite 1, -3, 0, 4, $00, X_FLIP + dbsprite -3, -2, 4, 4, $00, $0 + dbsprite -2, -2, 4, 4, $01, $0 + dbsprite -1, -2, 0, 4, $05, X_FLIP + dbsprite 0, -2, 0, 4, $04, X_FLIP + dbsprite 0, -2, 4, 4, $01, X_FLIP + dbsprite 1, -2, 4, 4, $00, X_FLIP + dbsprite -3, -1, 4, 4, $02, $0 + dbsprite -2, -1, 4, 4, $03, $0 + dbsprite -1, -1, 0, 4, $07, X_FLIP + dbsprite 0, -1, 0, 4, $06, X_FLIP + dbsprite 0, -1, 4, 4, $03, X_FLIP + dbsprite 1, -1, 4, 4, $02, X_FLIP + dbsprite -3, 0, 4, 4, $04, $0 + dbsprite -2, 0, 4, 4, $05, $0 + dbsprite -1, 0, 0, 4, $0d, X_FLIP + dbsprite 0, 0, 0, 4, $0c, X_FLIP + dbsprite 0, 0, 4, 4, $05, X_FLIP + dbsprite 1, 0, 4, 4, $04, X_FLIP + dbsprite -2, 1, 0, 4, $00, Y_FLIP + dbsprite -1, 1, 0, 4, $02, Y_FLIP + dbsprite 0, 1, 0, 4, $02, X_FLIP | Y_FLIP + dbsprite 1, 1, 0, 4, $00, X_FLIP | Y_FLIP + +.OAMData_42: + dbsprite -1, -3, 4, 0, $02, $0 + dbsprite -1, 2, 4, 0, $02, X_FLIP | Y_FLIP + dbsprite -3, -1, 0, 4, $01, $0 + dbsprite 2, -1, 0, 4, $01, X_FLIP | Y_FLIP + dbsprite -1, -4, 4, 0, $02, $0 + dbsprite -1, 3, 4, 0, $02, X_FLIP | Y_FLIP + dbsprite -4, -1, 0, 4, $01, $0 + dbsprite 3, -1, 0, 4, $01, X_FLIP | Y_FLIP + +.OAMData_44: + dbsprite -3, -3, 5, 5, $00, X_FLIP + dbsprite 1, -3, 3, 5, $00, $0 + dbsprite -3, 1, 5, 3, $00, X_FLIP | Y_FLIP + dbsprite 1, 1, 3, 3, $00, Y_FLIP + dbsprite -4, -4, 5, 5, $00, X_FLIP + dbsprite 2, -4, 3, 5, $00, $0 + dbsprite -4, 2, 5, 3, $00, X_FLIP | Y_FLIP + dbsprite 2, 2, 3, 3, $00, Y_FLIP + +.OAMData_46: + dbsprite -1, -3, 4, 4, $02, $0 + dbsprite -1, 1, 4, 4, $02, X_FLIP | Y_FLIP + dbsprite -3, -1, 4, 4, $01, $0 + dbsprite 1, -1, 4, 4, $01, X_FLIP | Y_FLIP + +.OAMData_47: + dbsprite -2, -2, 0, 0, $00, X_FLIP + dbsprite 1, -2, 0, 0, $00, $0 + dbsprite -2, 1, 0, 0, $00, X_FLIP | Y_FLIP + dbsprite 1, 1, 0, 0, $00, Y_FLIP + +.OAMData_48: + dbsprite -1, -3, 4, 0, $00, $0 + dbsprite -1, -2, 2, 0, $00, $0 + dbsprite -1, -1, 0, 0, $00, $0 + dbsprite -1, 0, 0, 0, $00, $0 + dbsprite -1, 1, 2, 0, $00, $0 + dbsprite -1, 2, 4, 0, $00, $0 + +.OAMData_49: + dbsprite -2, -1, 0, 4, $00, X_FLIP + dbsprite -1, -1, 0, 2, $00, X_FLIP + dbsprite 0, -1, 0, 2, $00, $0 + dbsprite 1, -1, 0, 4, $00, $0 + +.OAMData_4a: + dbsprite -1, -1, 0, 4, $00, X_FLIP | Y_FLIP + dbsprite 0, -1, 0, 4, $00, Y_FLIP + +.OAMData_0f: + dbsprite -1, -1, 4, 4, $00, $0 + dbsprite -2, -1, 4, 4, $01, $0 + dbsprite -1, -1, 4, 4, $01, X_FLIP + dbsprite -2, 0, 4, 4, $01, Y_FLIP + dbsprite -1, 0, 4, 4, $01, X_FLIP | Y_FLIP + +.OAMData_4c: + dbsprite -1, -1, 4, 4, $00, $0 + dbsprite -2, 0, 6, 2, $00, $0 + dbsprite -3, 0, 6, 2, $01, $0 + dbsprite -2, 0, 6, 2, $01, X_FLIP + dbsprite -3, 1, 6, 2, $01, Y_FLIP + dbsprite -2, 1, 6, 2, $01, X_FLIP | Y_FLIP + +.OAMData_4d: + dbsprite -1, -1, 4, 4, $00, $0 + dbsprite -2, 0, 6, 2, $00, $0 + dbsprite -2, 1, 0, 0, $00, $0 + dbsprite -3, 1, 0, 0, $01, $0 + dbsprite -2, 1, 0, 0, $01, X_FLIP + dbsprite -3, 2, 0, 0, $01, Y_FLIP + dbsprite -2, 2, 0, 0, $01, X_FLIP | Y_FLIP + +.OAMData_4f: + dbsprite -1, -1, 4, 4, $00, $0 + dbsprite -2, 0, 6, 2, $00, $0 + dbsprite -2, 1, 0, 0, $00, $0 + dbsprite -3, 1, 2, 6, $00, $0 + dbsprite -4, 1, 2, 6, $01, $0 + dbsprite -3, 1, 2, 6, $01, X_FLIP + dbsprite -4, 2, 2, 6, $01, Y_FLIP + dbsprite -3, 2, 2, 6, $01, X_FLIP | Y_FLIP + +.OAMData_50: + dbsprite -1, -1, 4, 4, $00, $0 + dbsprite -2, 0, 6, 2, $00, $0 + dbsprite -2, 1, 0, 0, $00, $0 + dbsprite -3, 1, 2, 6, $00, $0 + dbsprite -4, 2, 4, 4, $00, $0 + dbsprite -5, 2, 4, 4, $01, $0 + dbsprite -4, 2, 4, 4, $01, X_FLIP + dbsprite -5, 3, 4, 4, $01, Y_FLIP + dbsprite -4, 3, 4, 4, $01, X_FLIP | Y_FLIP + +.OAMData_51: + dbsprite -1, -1, 4, 4, $00, $0 + dbsprite -2, 0, 6, 2, $00, $0 + dbsprite -2, 1, 0, 0, $00, $0 + dbsprite -3, 1, 2, 6, $00, $0 + dbsprite -4, 2, 4, 4, $00, $0 + dbsprite -5, 3, 6, 2, $00, $0 + dbsprite -6, 3, 6, 2, $01, $0 + dbsprite -5, 3, 6, 2, $01, X_FLIP + dbsprite -6, 4, 6, 2, $01, Y_FLIP + dbsprite -5, 4, 6, 2, $01, X_FLIP | Y_FLIP + +.OAMData_59: + dbsprite -2, -1, 0, 4, $00, $0 + dbsprite -1, -1, 0, 4, $01, $0 + dbsprite 0, -1, 0, 4, $01, X_FLIP + dbsprite 1, -1, 0, 4, $00, X_FLIP + +.OAMData_5a: + dbsprite -2, -1, 0, 4, $02, $0 + dbsprite -1, -1, 0, 4, $01, $0 + dbsprite 0, -1, 0, 4, $01, X_FLIP + dbsprite 1, -1, 0, 4, $02, X_FLIP + +.OAMData_60: + dbsprite -1, -1, 4, 0, $00, $0 + +.OAMData_69: + dbsprite -1, 0, 4, 0, $00, $0 + +.OAMData_61: + dbsprite -4, -1, 4, 4, $00, $0 + dbsprite -3, -1, 4, 4, $01, $0 + dbsprite -2, -1, 4, 4, $02, $0 + dbsprite -1, -1, 4, 4, $03, $0 + dbsprite 0, -1, 4, 4, $04, $0 + dbsprite 1, -1, 4, 4, $05, $0 + dbsprite 2, -1, 4, 4, $06, $0 + dbsprite 1, -2, 4, 4, $07, $0 + dbsprite 2, -2, 4, 4, $08, $0 + +.OAMData_65: + dbsprite -4, -2, 4, 4, $08, X_FLIP + dbsprite -3, -2, 4, 4, $07, X_FLIP + dbsprite -4, -1, 4, 4, $06, X_FLIP + dbsprite -3, -1, 4, 4, $05, X_FLIP + dbsprite -2, -1, 4, 4, $04, X_FLIP + dbsprite -1, -1, 4, 4, $03, X_FLIP + dbsprite 0, -1, 4, 4, $02, X_FLIP + dbsprite 1, -1, 4, 4, $01, X_FLIP + dbsprite 2, -1, 4, 4, $00, X_FLIP + +.OAMData_d4: + dbsprite -4, 0, 4, 0, $00, OBP_NUM + dbsprite -3, 0, 4, 0, $01, OBP_NUM + dbsprite -2, 0, 4, 0, $02, OBP_NUM + dbsprite -1, 0, 4, 0, $03, OBP_NUM + dbsprite 0, 0, 4, 0, $04, OBP_NUM + dbsprite 1, 0, 4, 0, $05, OBP_NUM + dbsprite 2, 0, 4, 0, $06, OBP_NUM + +.OAMData_d6: + dbsprite -4, -1, 4, 0, $00, OBP_NUM + dbsprite -4, 0, 4, 0, $01, OBP_NUM + dbsprite -3, -1, 4, 0, $02, OBP_NUM + dbsprite -3, 0, 4, 0, $03, OBP_NUM + dbsprite -2, -1, 4, 0, $04, OBP_NUM + dbsprite -2, 0, 4, 0, $05, OBP_NUM + dbsprite -1, -1, 4, 0, $06, OBP_NUM + dbsprite -1, 0, 4, 0, $07, OBP_NUM + dbsprite 0, -1, 4, 0, $08, OBP_NUM + dbsprite 0, 0, 4, 0, $09, OBP_NUM + dbsprite 1, -1, 4, 0, $0a, OBP_NUM + dbsprite 1, 0, 4, 0, $0b, OBP_NUM + dbsprite 2, -1, 4, 0, $0c, OBP_NUM + dbsprite 2, 0, 4, 0, $0d, OBP_NUM + +.OAMData_d5: + dbsprite -3, 0, 0, 0, $00, $1 | OBP_NUM + dbsprite -2, 0, 0, 0, $01, $1 | OBP_NUM + dbsprite -1, 0, 0, 0, $02, $1 | OBP_NUM + dbsprite 0, 0, 0, 0, $03, $1 | OBP_NUM + dbsprite 1, 0, 0, 0, $04, $1 | OBP_NUM + dbsprite 2, 0, 0, 0, $05, $1 | OBP_NUM + +.OAMData_d7: + dbsprite -3, 0, 0, 0, $00, $1 | OBP_NUM + dbsprite -3, 1, 0, 0, $01, $1 | OBP_NUM + dbsprite -2, 0, 0, 0, $02, $1 | OBP_NUM + dbsprite -2, 1, 0, 0, $03, $1 | OBP_NUM + dbsprite -1, 0, 0, 0, $04, $1 | OBP_NUM + dbsprite -1, 1, 0, 0, $05, $1 | OBP_NUM + dbsprite 0, 0, 0, 0, $06, $1 | OBP_NUM + dbsprite 0, 1, 0, 0, $07, $1 | OBP_NUM + dbsprite 1, 0, 0, 0, $08, $1 | OBP_NUM + dbsprite 1, 1, 0, 0, $09, $1 | OBP_NUM + dbsprite 2, 0, 0, 0, $0a, $1 | OBP_NUM + dbsprite 2, 1, 0, 0, $0b, $1 | OBP_NUM + +.OAMData_6e: + dbsprite 0, -2, 4, 4, $00, $0 + dbsprite -2, -1, 4, 4, $01, $0 + dbsprite -1, -1, 4, 4, $02, $0 + dbsprite 0, -1, 4, 4, $03, $0 + dbsprite -2, 0, 4, 4, $04, $0 + +.OAMData_6f: + dbsprite -2, -1, 4, 4, $00, $0 + dbsprite -1, -1, 4, 4, $01, $0 + dbsprite 0, -1, 4, 4, $02, $0 + +.OAMData_77: + dbsprite 1, -4, 4, 4, $01, X_FLIP | Y_FLIP + +.OAMData_78: + dbsprite 1, -4, 4, 4, $00, $0 + dbsprite 0, -4, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, -3, 4, 4, $01, X_FLIP | Y_FLIP + +.OAMData_79: + dbsprite 1, -4, 4, 4, $01, $0 + dbsprite 0, -4, 4, 4, $00, $0 + dbsprite -1, -4, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, -3, 4, 4, $00, $0 + dbsprite 0, -3, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, -2, 4, 4, $01, X_FLIP | Y_FLIP + +.OAMData_7a: + dbsprite -2, -4, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -1, -4, 4, 4, $00, $0 + dbsprite 0, -4, 4, 4, $01, $0 + dbsprite -1, -3, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 0, -3, 4, 4, $00, $0 + dbsprite 1, -3, 4, 4, $01, $0 + dbsprite 0, -2, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, -2, 4, 4, $00, $0 + dbsprite 1, -1, 4, 4, $01, X_FLIP | Y_FLIP + +.OAMData_7b: + dbsprite -3, -4, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -2, -4, 4, 4, $00, $0 + dbsprite -1, -4, 4, 4, $01, $0 + dbsprite -2, -3, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -1, -3, 4, 4, $00, $0 + dbsprite 0, -3, 4, 4, $01, $0 + dbsprite -1, -2, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 0, -2, 4, 4, $00, $0 + dbsprite 1, -2, 4, 4, $01, $0 + dbsprite 0, -1, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, -1, 4, 4, $00, $0 + dbsprite 1, 0, 4, 4, $01, X_FLIP | Y_FLIP + +.OAMData_7c: + dbsprite -3, -4, 4, 4, $00, $0 + dbsprite -2, -4, 4, 4, $01, $0 + dbsprite -3, -3, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -2, -3, 4, 4, $00, $0 + dbsprite -1, -3, 4, 4, $01, $0 + dbsprite -2, -2, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -1, -2, 4, 4, $00, $0 + dbsprite 0, -2, 4, 4, $01, $0 + dbsprite -1, -1, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 0, -1, 4, 4, $00, $0 + dbsprite 1, -1, 4, 4, $01, $0 + dbsprite 0, 0, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, 0, 4, 4, $00, $0 + dbsprite 1, 1, 4, 4, $01, X_FLIP | Y_FLIP + +.OAMData_7d: + dbsprite -3, -4, 4, 4, $01, $0 + dbsprite -3, -3, 4, 4, $00, $0 + dbsprite -2, -3, 4, 4, $01, $0 + dbsprite -3, -2, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -2, -2, 4, 4, $00, $0 + dbsprite -1, -2, 4, 4, $01, $0 + dbsprite -2, -1, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite -1, -1, 4, 4, $00, $0 + dbsprite 0, -1, 4, 4, $01, $0 + dbsprite -1, 0, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 0, 0, 4, 4, $00, $0 + dbsprite 1, 0, 4, 4, $01, $0 + dbsprite 0, 1, 4, 4, $01, X_FLIP | Y_FLIP + dbsprite 1, 1, 4, 4, $00, $0 + dbsprite 1, 2, 4, 4, $01, X_FLIP | Y_FLIP + +.OAMData_70: + dbsprite -1, -2, 0, 0, $00, $0 + dbsprite -1, -1, 0, 0, $01, $0 + dbsprite 0, -2, 0, 0, $00, X_FLIP + dbsprite 0, -1, 0, 0, $01, X_FLIP + dbsprite -1, 0, 0, 0, $01, Y_FLIP + dbsprite -1, 1, 0, 0, $00, Y_FLIP + dbsprite 0, 0, 0, 0, $01, X_FLIP | Y_FLIP + dbsprite 0, 1, 0, 0, $00, X_FLIP | Y_FLIP + +.OAMData_81: + dbsprite -1, -1, 0, 0, $00, $0 + dbsprite 0, -1, 0, 0, $01, $0 + dbsprite -1, 0, 0, 0, $01, X_FLIP | Y_FLIP + dbsprite 0, 0, 0, 0, $00, X_FLIP | Y_FLIP + +.OAMData_87: + dbsprite -1, -2, 0, 4, $00, $0 + dbsprite 0, -2, 0, 4, $01, $0 + dbsprite -1, -1, 0, 4, $02, $0 + dbsprite 0, -1, 0, 4, $03, $0 + dbsprite -1, -1, 0, 4, $00, $0 + dbsprite 0, -1, 0, 4, $01, $0 + dbsprite -1, 0, 0, 4, $02, $0 + dbsprite 0, 0, 0, 4, $03, $0 + dbsprite -1, -3, 0, 4, $00, $0 + dbsprite 0, -3, 0, 4, $01, $0 + dbsprite -1, -2, 0, 4, $02, $0 + dbsprite 0, -2, 0, 4, $03, $0 + dbsprite -1, 0, 0, 4, $00, $0 + dbsprite 0, 0, 0, 4, $01, $0 + dbsprite -1, 1, 0, 4, $02, $0 + dbsprite 0, 1, 0, 4, $03, $0 + +.OAMData_88: + dbsprite -1, -2, 0, 0, $00, $0 + dbsprite 0, -2, 0, 0, $01, $0 + dbsprite -1, -1, 0, 0, $02, $0 + dbsprite 0, -1, 0, 0, $03, $0 + dbsprite -1, -1, 0, 0, $00, $0 + dbsprite 0, -1, 0, 0, $01, $0 + dbsprite -1, 0, 0, 0, $02, $0 + dbsprite 0, 0, 0, 0, $03, $0 + dbsprite -1, 0, 0, 0, $00, $0 + dbsprite 0, 0, 0, 0, $01, $0 + dbsprite -1, 1, 0, 0, $02, $0 + dbsprite 0, 1, 0, 0, $03, $0 + +.OAMData_8a: + dbsprite -1, -1, 4, 4, $00, $0 + dbsprite 0, -1, 4, 0, $00, $0 + dbsprite 1, -2, 4, 4, $00, $0 + dbsprite 2, -2, 4, 0, $00, $0 + dbsprite 3, -3, 4, 4, $00, $0 + dbsprite 4, -3, 4, 0, $00, $0 + dbsprite 5, -4, 4, 0, $00, $0 + dbsprite 6, -5, 4, 4, $00, $0 + +.OAMData_8e: + dbsprite -1, -3, 4, 4, $00, $0 + dbsprite -1, -2, 4, 4, $01, $0 + dbsprite -1, -1, 4, 4, $02, $0 + dbsprite -1, 0, 4, 4, $01, Y_FLIP + dbsprite -1, 1, 4, 4, $00, Y_FLIP + +.OAMData_8f: + dbsprite -2, -1, 0, 4, $00, $0 + dbsprite -1, -1, 0, 4, $01, $0 + dbsprite 0, -1, 0, 4, $02, $0 + dbsprite 1, -1, 0, 4, $03, $0 + +.OAMData_93: + dbsprite -2, -1, 4, 0, $00, $0 + dbsprite -1, -1, 4, 0, $01, $0 + dbsprite 0, -1, 4, 0, $02, $0 + dbsprite -2, 0, 4, 0, $03, $0 + dbsprite -1, 0, 4, 0, $04, $0 + dbsprite 0, 0, 4, 0, $05, $0 + +.OAMData_99: + dbsprite -1, -1, 0, 0, $00, $0 + dbsprite 0, -1, 0, 0, $05, $0 + dbsprite -1, 0, 0, 0, $01, $0 + dbsprite 0, 0, 0, 0, $05, $0 + +.OAMData_9b: + dbsprite 1, -4, 0, 4, $00, $0 + dbsprite 2, -4, 0, 4, $01, $0 + dbsprite -1, -3, 0, 4, $02, $0 + dbsprite 0, -3, 0, 4, $03, $0 + dbsprite 1, -3, 0, 4, $04, $0 + dbsprite 2, -3, 0, 4, $05, $0 + dbsprite 3, -3, 0, 4, $06, $0 + dbsprite -2, -2, 0, 4, $07, $0 + dbsprite -1, -2, 0, 4, $08, $0 + dbsprite 0, -2, 0, 4, $09, $0 + dbsprite 1, -2, 0, 4, $0a, $0 + dbsprite 2, -2, 0, 4, $0b, $0 + dbsprite 3, -2, 0, 4, $0c, $0 + dbsprite 4, -2, 0, 4, $0d, $0 + dbsprite -3, -1, 0, 4, $0e, $0 + dbsprite -2, -1, 0, 4, $0f, $0 + dbsprite -1, -1, 0, 4, $10, $0 + dbsprite 0, -1, 0, 4, $11, $0 + dbsprite 1, -1, 0, 4, $12, $0 + dbsprite 2, -1, 0, 4, $13, $0 + dbsprite -5, 0, 0, 4, $14, $0 + dbsprite -4, 0, 0, 4, $15, $0 + dbsprite -3, 0, 0, 4, $16, $0 + dbsprite -2, 0, 0, 4, $17, $0 + dbsprite -1, 0, 0, 4, $18, $0 + dbsprite 0, 0, 0, 4, $19, $0 + dbsprite 1, 0, 0, 4, $1a, $0 + dbsprite 2, 0, 0, 4, $1b, $0 + dbsprite 3, 0, 0, 4, $1c, $0 + dbsprite -5, 1, 0, 4, $1d, $0 + dbsprite -4, 1, 0, 4, $1e, $0 + dbsprite -2, 1, 0, 4, $1f, $0 + dbsprite -1, 1, 0, 4, $20, $0 + dbsprite 0, 1, 0, 4, $21, $0 + dbsprite 1, 1, 0, 4, $22, $0 + dbsprite 0, 2, 0, 4, $23, $0 + +.OAMData_9c: + dbsprite -1, 0, 0, 4, $02, $0 + dbsprite 0, 0, 0, 4, $03, $0 + dbsprite -1, -1, 0, 4, $01, $0 + dbsprite 0, -1, 0, 4, $01, X_FLIP + dbsprite -1, -2, 0, 4, $00, $0 + dbsprite 0, -2, 0, 4, $00, X_FLIP + +.OAMData_9f: + dbsprite -2, -1, 0, 0, $00, $0 + dbsprite -1, -1, 0, 0, $01, $0 + dbsprite 0, -1, 0, 0, $02, $0 + dbsprite 1, -1, 0, 0, $03, $0 + dbsprite -2, 0, 0, 0, $04, $0 + dbsprite -1, 0, 0, 0, $05, $0 + dbsprite 0, 0, 0, 0, $06, $0 + dbsprite 1, 0, 0, 0, $07, $0 + +.OAMData_a0: + dbsprite -1, -2, 4, 4, $00, $0 + dbsprite -1, -1, 4, 4, $00, $0 + dbsprite -1, 0, 4, 4, $00, $0 + dbsprite -1, -3, 4, 4, $00, $0 + dbsprite -1, 1, 4, 4, $00, $0 + dbsprite -1, -4, 4, 4, $00, $0 + dbsprite -1, 2, 4, 4, $00, $0 + +.OAMData_a4: + dbsprite -2, -2, 4, 4, $00, $0 + dbsprite -1, -2, 4, 4, $01, $0 + dbsprite 0, -2, 4, 4, $02, $0 + dbsprite -2, -1, 4, 4, $03, $0 + dbsprite -1, -1, 4, 4, $04, $0 + dbsprite 0, -1, 4, 4, $05, $0 + dbsprite -2, 0, 4, 4, $00, Y_FLIP + dbsprite -1, 0, 4, 4, $01, Y_FLIP + dbsprite 0, 0, 4, 4, $02, Y_FLIP + +.OAMData_ac: + dbsprite -2, -1, 0, 4, $00, $0 + dbsprite -1, -1, 0, 4, $01, $0 + dbsprite 0, -1, 0, 4, $01, X_FLIP + dbsprite 1, -1, 0, 4, $00, X_FLIP + +.OAMData_bc: + dbsprite -3, -1, 0, 4, $00, $0 + dbsprite -2, -1, 0, 4, $01, $0 + dbsprite -1, -1, 0, 4, $02, $0 + dbsprite 0, -1, 0, 4, $02, X_FLIP + dbsprite 1, -1, 0, 4, $01, X_FLIP + dbsprite 2, -1, 0, 4, $00, X_FLIP + +.OAMData_c1: + dbsprite -2, -2, 0, 0, $00, $0 + dbsprite -1, -2, 0, 0, $01, $0 + dbsprite 0, -2, 0, 0, $02, $0 + dbsprite 1, -2, 0, 0, $00, X_FLIP + dbsprite -2, -1, 0, 0, $03, $0 + dbsprite -1, -1, 0, 0, $04, $0 + dbsprite 0, -1, 0, 0, $04, X_FLIP + dbsprite 1, -1, 0, 0, $05, $0 + dbsprite -2, 0, 0, 0, $05, X_FLIP | Y_FLIP + dbsprite -1, 0, 0, 0, $04, Y_FLIP + dbsprite 0, 0, 0, 0, $04, X_FLIP | Y_FLIP + dbsprite 1, 0, 0, 0, $03, X_FLIP | Y_FLIP + dbsprite -2, 1, 0, 0, $00, Y_FLIP + dbsprite -1, 1, 0, 0, $02, X_FLIP | Y_FLIP + dbsprite 0, 1, 0, 0, $01, X_FLIP | Y_FLIP + dbsprite 1, 1, 0, 0, $00, X_FLIP | Y_FLIP + +.OAMData_c2: + dbsprite -2, -1, 0, 0, $00, $0 + dbsprite -1, -1, 0, 0, $01, $0 + dbsprite 0, -1, 0, 0, $00, X_FLIP | Y_FLIP + dbsprite -1, 0, 0, 0, $00, $0 + dbsprite 0, 0, 0, 0, $01, $0 + dbsprite 1, 0, 0, 0, $00, X_FLIP | Y_FLIP + +.OAMData_c8: + dbsprite 1, -1, 4, 0, $00, $0 + dbsprite 2, -1, 4, 0, $01, $0 + dbsprite -1, 0, 4, 0, $02, $0 + dbsprite 0, 0, 4, 0, $03, $0 + dbsprite 1, 0, 4, 0, $04, $0 + dbsprite 2, 0, 4, 0, $05, $0 + +.OAMData_ca: + dbsprite -1, -1, 0, 0, $00, $0 + dbsprite 0, -1, 0, 0, $01, X_FLIP | Y_FLIP + dbsprite -1, 0, 0, 0, $01, $0 + dbsprite 0, 0, 0, 0, $01, X_FLIP + +.OAMData_cc: + dbsprite -13, -2, 4, 0, $00, $0 + dbsprite -11, -4, 4, 0, $00, $0 + dbsprite -9, -1, 4, 0, $00, $0 + dbsprite -7, -5, 4, 0, $00, $0 + dbsprite -5, -3, 4, 0, $00, $0 + dbsprite -3, -5, 4, 0, $00, $0 + dbsprite -1, -3, 4, 0, $00, $0 + dbsprite 0, -3, 4, 0, $00, $0 + dbsprite 2, -5, 4, 0, $00, $0 + dbsprite 4, 0, 4, 0, $00, $0 + dbsprite 6, -2, 4, 0, $00, $0 + dbsprite 8, -4, 4, 0, $00, $0 + dbsprite 10, -2, 4, 0, $00, $0 diff --git a/data/battle_anims/object_gfx.asm b/data/battle_anims/object_gfx.asm new file mode 100644 index 0000000..0d20f5a --- /dev/null +++ b/data/battle_anims/object_gfx.asm @@ -0,0 +1,52 @@ +MACRO anim_obj_gfx +; # tiles, gfx pointer + db \1 + dba \2 +ENDM + +AnimObjGFX: +; entries correspond to ANIM_GFX_* constants + table_width 4, AnimObjGFX + anim_obj_gfx 0, AnimObj00GFX + anim_obj_gfx 21, AnimObjHitGFX + anim_obj_gfx 6, AnimObjCutGFX + anim_obj_gfx 6, AnimObjFireGFX + anim_obj_gfx 20, AnimObjWaterGFX + anim_obj_gfx 26, AnimObjLightningGFX + anim_obj_gfx 18, AnimObjPlantGFX + anim_obj_gfx 12, AnimObjSmokeGFX + anim_obj_gfx 9, AnimObjExplosionGFX + anim_obj_gfx 17, AnimObjRocksGFX + anim_obj_gfx 6, AnimObjIceGFX + anim_obj_gfx 10, AnimObjPokeBallGFX + anim_obj_gfx 9, AnimObjPoisonGFX + anim_obj_gfx 13, AnimObjBubbleGFX + anim_obj_gfx 16, AnimObjNoiseGFX + anim_obj_gfx 2, AnimObjPowderGFX + anim_obj_gfx 11, AnimObjBeamGFX + anim_obj_gfx 9, AnimObjSpeedGFX + anim_obj_gfx 9, AnimObjChargeGFX + anim_obj_gfx 19, AnimObjWindGFX + anim_obj_gfx 10, AnimObjWhipGFX + anim_obj_gfx 12, AnimObjEggGFX + anim_obj_gfx 18, AnimObjRopeGFX + anim_obj_gfx 13, AnimObjPsychicGFX + anim_obj_gfx 10, AnimObjReflectGFX + anim_obj_gfx 27, AnimObjStatusGFX + anim_obj_gfx 12, AnimObjSandGFX + anim_obj_gfx 14, AnimObjWebGFX + anim_obj_gfx 16, AnimObjHazeGFX + anim_obj_gfx 7, AnimObjHornGFX + anim_obj_gfx 8, AnimObjFlowerGFX + anim_obj_gfx 40, AnimObjMiscGFX + anim_obj_gfx 36, AnimObjSkyAttackGFX + anim_obj_gfx 16, AnimObjGlobeGFX + anim_obj_gfx 48, AnimObjShapesGFX + anim_obj_gfx 18, AnimObjObjectsGFX + anim_obj_gfx 38, AnimObjShineGFX + anim_obj_gfx 35, AnimObjAngelsGFX + anim_obj_gfx 18, AnimObjWaveGFX + anim_obj_gfx 24, AnimObjAeroblastGFX + anim_obj_gfx 1, NULL + anim_obj_gfx 1, NULL + assert_table_length NUM_ANIM_GFX + 1 diff --git a/data/battle_anims/objects.asm b/data/battle_anims/objects.asm new file mode 100644 index 0000000..84ea638 --- /dev/null +++ b/data/battle_anims/objects.asm @@ -0,0 +1,398 @@ +DEF ABSOLUTE_X EQU $00 +DEF RELATIVE_X EQU $01 + +MACRO battleanimobj + db \1 ; flags + ; bit 7: priority + ; bit 6: y flip (for enemy) + ; bit 5: x flip (for enemy) + ; bit 0: enable enemy animation coord fixing (x = $b4 - x; see below for y) + db \2 ; enemy animation y fix param + ; if $FF: y = y + 5 tiles + ; else: y = -y - (1 tile) * (is_softboiled_animation) + db \3 ; video sequence + db \4 ; callback + db \5 ; palette + db \6 ; tile offset +ENDM + +BattleAnimObjects: +; entries correspond to ANIM_OBJ_* constants + table_width BATTLEANIMOBJ_LENGTH, BattleAnimObjects +; ANIM_OBJ_HIT_BIG_YFIX + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_00, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_HIT_YFIX + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_01, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_HIT_SMALL_YFIX + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_02, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_HIT_BIG + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_00, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_HIT + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_01, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_HIT_SMALL + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_02, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_PUNCH + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_03, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_KICK + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_04, BATTLEANIMFUNC_KICK, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_PALM + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_05, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_FANG + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_06, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_PUNCH_SHAKE + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_07, BATTLEANIMFUNC_SHAKE, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_EMBER + battleanimobj RELATIVE_X, $aa, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_EMBER, PAL_BATTLE_OB_RED, ANIM_GFX_FIRE +; ANIM_OBJ_DRAGON_RAGE + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_0E, BATTLEANIMFUNC_WAVE_TO_TARGET, PAL_BATTLE_OB_RED, ANIM_GFX_FIRE +; ANIM_OBJ_FLAMETHROWER + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_MOVE_IN_CIRCLE, PAL_BATTLE_OB_RED, ANIM_GFX_FIRE +; ANIM_OBJ_FIRE_SPIN + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_USER_TO_TARGET_SPIN, PAL_BATTLE_OB_RED, ANIM_GFX_FIRE +; ANIM_OBJ_FIRE_BLAST + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_FIRE_BLAST, PAL_BATTLE_OB_RED, ANIM_GFX_FIRE +; ANIM_OBJ_BURNED + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_11, BATTLEANIMFUNC_MOVE_IN_CIRCLE, PAL_BATTLE_OB_RED, ANIM_GFX_FIRE +; ANIM_OBJ_BLIZZARD + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_12, BATTLEANIMFUNC_USER_TO_TARGET_SPIN, PAL_BATTLE_OB_BLUE, ANIM_GFX_ICE +; ANIM_OBJ_ICE + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_13, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BLUE, ANIM_GFX_ICE +; ANIM_OBJ_ICE_BEAM + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_14, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_BLUE, ANIM_GFX_ICE +; ANIM_OBJ_RAZOR_LEAF + battleanimobj RELATIVE_X | X_FLIP, $78, BATTLEANIMFRAMESET_16, BATTLEANIMFUNC_RAZOR_LEAF, PAL_BATTLE_OB_GREEN, ANIM_GFX_PLANT +; ANIM_OBJ_POKE_BALL + battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_09, BATTLEANIMFUNC_POKEBALL, PAL_BATTLE_OB_RED, ANIM_GFX_POKE_BALL +; ANIM_OBJ_POKE_BALL_BLOCKED + battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_09, BATTLEANIMFUNC_POKEBALL_BLOCKED, PAL_BATTLE_OB_RED, ANIM_GFX_POKE_BALL +; ANIM_OBJ_EXPLOSION1 + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_18, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_RED, ANIM_GFX_EXPLOSION +; ANIM_OBJ_EXPLOSION2 + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_18, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_RED, ANIM_GFX_EXPLOSION +; ANIM_OBJ_ACID + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_1D, BATTLEANIMFUNC_THROW_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, ANIM_GFX_POISON +; ANIM_OBJ_SLUDGE + battleanimobj RELATIVE_X, $b4, BATTLEANIMFRAMESET_1F, BATTLEANIMFUNC_SLUDGE, PAL_BATTLE_OB_GRAY, ANIM_GFX_POISON +; ANIM_OBJ_BETA_BALL_POOF + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_08, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_SMOKE +; ANIM_OBJ_BALL_POOF + battleanimobj RELATIVE_X, $a0, BATTLEANIMFRAMESET_08, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_SMOKE +; ANIM_OBJ_BIG_ROCK + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_DROP, PAL_BATTLE_OB_BROWN, ANIM_GFX_ROCKS +; ANIM_OBJ_SMALL_ROCK + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_1A, BATTLEANIMFUNC_DROP, PAL_BATTLE_OB_BROWN, ANIM_GFX_ROCKS +; ANIM_OBJ_STRENGTH + battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_1B, BATTLEANIMFUNC_STRENGTH_SEISMIC_TOSS, PAL_BATTLE_OB_BROWN, ANIM_GFX_ROCKS +; ANIM_OBJ_SEISMIC_TOSS + battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_84, BATTLEANIMFUNC_STRENGTH_SEISMIC_TOSS, PAL_BATTLE_OB_BLUE, ANIM_GFX_GLOBE +; ANIM_OBJ_BUBBLE + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_BUBBLE, PAL_BATTLE_OB_BLUE, ANIM_GFX_BUBBLE +; ANIM_OBJ_SURF + battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_23, BATTLEANIMFUNC_SURF, PAL_BATTLE_OB_BLUE, ANIM_GFX_BUBBLE +; ANIM_OBJ_SING + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_SING, PAL_BATTLE_OB_GRAY, ANIM_GFX_NOISE +; ANIM_OBJ_WATER_GUN + battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $80, BATTLEANIMFRAMESET_27, BATTLEANIMFUNC_WATER_GUN, PAL_BATTLE_OB_BLUE, ANIM_GFX_WATER +; ANIM_OBJ_HYDRO_PUMP + battleanimobj RELATIVE_X, $b4, BATTLEANIMFRAMESET_2A, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BLUE, ANIM_GFX_WATER +; ANIM_OBJ_POWDER + battleanimobj RELATIVE_X, $40, BATTLEANIMFRAMESET_2B, BATTLEANIMFUNC_POWDER, PAL_BATTLE_OB_GREEN, ANIM_GFX_POWDER +; ANIM_OBJ_BEAM + battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_2C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BEAM +; ANIM_OBJ_BEAM_TIP + battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_SHAKE, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BEAM +; ANIM_OBJ_ICE_BUILDUP + battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_2E, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BLUE, ANIM_GFX_ICE +; ANIM_OBJ_FROZEN + battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_2F, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BLUE, ANIM_GFX_ICE +; ANIM_OBJ_MASTER_BALL_SPARKLE + battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_RECOVER, PAL_BATTLE_OB_BROWN, ANIM_GFX_SPEED +; ANIM_OBJ_RECOVER + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_RECOVER, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BUBBLE +; ANIM_OBJ_THUNDER1 + battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_31, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING +; ANIM_OBJ_THUNDER2 + battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_32, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING +; ANIM_OBJ_THUNDER3 + battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_33, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING +; ANIM_OBJ_THUNDER_WAVE + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_THUNDER_WAVE, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING +; ANIM_OBJ_SPARKS_CIRCLE_BIG + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_36, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING +; ANIM_OBJ_THUNDERBOLT_BALL + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_37, BATTLEANIMFUNC_MOVE_IN_CIRCLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_EXPLOSION +; ANIM_OBJ_SPARKS_CIRCLE + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_38, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING +; ANIM_OBJ_THUNDERSHOCK_BALL + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_39, BATTLEANIMFUNC_MOVE_IN_CIRCLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_EXPLOSION +; ANIM_OBJ_CLAMP + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_3A, BATTLEANIMFUNC_CLAMP_ENCORE, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT +; ANIM_OBJ_BITE + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_3C, BATTLEANIMFUNC_BITE, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT +; ANIM_OBJ_CUT_DOWN_LEFT + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_3E, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT +; ANIM_OBJ_CUT_DOWN_RIGHT + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_3F, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT +; ANIM_OBJ_CUT_UP_RIGHT + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_40, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT +; ANIM_OBJ_CUT_LONG_DOWN_LEFT + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_41, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT +; ANIM_OBJ_CUT_LONG_DOWN_RIGHT + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_42, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT +; ANIM_OBJ_SOLAR_BEAM_CHARGE + battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_43, BATTLEANIMFUNC_SOLAR_BEAM, PAL_BATTLE_OB_GREEN, ANIM_GFX_CHARGE +; ANIM_OBJ_ABSORB_CENTER + battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_44, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GREEN, ANIM_GFX_CHARGE +; ANIM_OBJ_GUST + battleanimobj RELATIVE_X | X_FLIP, $b8, BATTLEANIMFRAMESET_45, BATTLEANIMFUNC_GUST, PAL_BATTLE_OB_GRAY, ANIM_GFX_WIND +; ANIM_OBJ_VINE_WHIP1 + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_46, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP +; ANIM_OBJ_VINE_WHIP2 + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_47, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP +; ANIM_OBJ_RAZOR_WIND1 + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_48, BATTLEANIMFUNC_RAZOR_WIND, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP +; ANIM_OBJ_RAZOR_WIND2 + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_49, BATTLEANIMFUNC_RAZOR_WIND, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP +; ANIM_OBJ_SONICBOOM_JP + battleanimobj RELATIVE_X | X_FLIP, $98, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP +; ANIM_OBJ_WARP + battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_4B, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED +; ANIM_OBJ_ABSORB + battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_4C, BATTLEANIMFUNC_ABSORB, PAL_BATTLE_OB_GREEN, ANIM_GFX_CHARGE +; ANIM_OBJ_EGG + battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_4D, BATTLEANIMFUNC_EGG, PAL_BATTLE_OB_GRAY, ANIM_GFX_EGG +; ANIM_OBJ_FOCUS + battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_51, BATTLEANIMFUNC_MOVE_UP, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED +; ANIM_OBJ_BIND1 + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_52, BATTLEANIMFUNC_WRAP, PAL_BATTLE_OB_GREEN, ANIM_GFX_ROPE +; ANIM_OBJ_BIND2 + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_54, BATTLEANIMFUNC_WRAP, PAL_BATTLE_OB_GREEN, ANIM_GFX_ROPE +; ANIM_OBJ_LEECH_SEED + battleanimobj RELATIVE_X | X_FLIP, $68, BATTLEANIMFRAMESET_56, BATTLEANIMFUNC_LEECH_SEED, PAL_BATTLE_OB_GREEN, ANIM_GFX_PLANT +; ANIM_OBJ_SOUND + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_59, BATTLEANIMFUNC_SOUND, PAL_BATTLE_OB_GRAY, ANIM_GFX_NOISE +; ANIM_OBJ_WAVE + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_5C, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, ANIM_GFX_PSYCHIC +; ANIM_OBJ_CONFUSE_RAY + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_5D, BATTLEANIMFUNC_CONFUSE_RAY, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED +; ANIM_OBJ_LEER + battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $88, BATTLEANIMFRAMESET_5F, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BEAM +; ANIM_OBJ_LEER_TIP + battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $88, BATTLEANIMFRAMESET_2D, BATTLEANIMFUNC_SHAKE, PAL_BATTLE_OB_YELLOW, ANIM_GFX_BEAM +; ANIM_OBJ_SCREEN + battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_REFLECT +; ANIM_OBJ_HARDEN + battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_60, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_REFLECT +; ANIM_OBJ_CHICK + battleanimobj RELATIVE_X | X_FLIP, $50, BATTLEANIMFRAMESET_61, BATTLEANIMFUNC_DIZZY, PAL_BATTLE_OB_YELLOW, ANIM_GFX_STATUS +; ANIM_OBJ_AMNESIA + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_63, BATTLEANIMFUNC_AMNESIA, PAL_BATTLE_OB_GRAY, ANIM_GFX_STATUS +; ANIM_OBJ_ASLEEP + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_66, BATTLEANIMFUNC_FLOAT_UP, PAL_BATTLE_OB_GRAY, ANIM_GFX_STATUS +; ANIM_OBJ_SKULL + battleanimobj RELATIVE_X, $50, BATTLEANIMFRAMESET_1C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_POISON +; ANIM_OBJ_DIG_SAND + battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_67, BATTLEANIMFUNC_DIG, PAL_BATTLE_OB_BROWN, ANIM_GFX_SAND +; ANIM_OBJ_DIG_PILE + battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_68, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BROWN, ANIM_GFX_SAND +; ANIM_OBJ_SAND + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_69, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_GRAY, ANIM_GFX_SAND +; ANIM_OBJ_PARALYZED + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_6D, BATTLEANIMFUNC_PARALYZED, PAL_BATTLE_OB_YELLOW, ANIM_GFX_STATUS +; ANIM_OBJ_STRING_SHOT + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_6A, BATTLEANIMFUNC_STRING, PAL_BATTLE_OB_GRAY, ANIM_GFX_WEB +; ANIM_OBJ_HAZE + battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPIRAL_DESCENT, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE +; ANIM_OBJ_MIST + battleanimobj RELATIVE_X | X_FLIP, $48, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_SPIRAL_DESCENT, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE +; ANIM_OBJ_SMOG + battleanimobj RELATIVE_X | X_FLIP, $48, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SPIRAL_DESCENT, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE +; ANIM_OBJ_POISON_GAS + battleanimobj RELATIVE_X | X_FLIP, $78, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_POISON_GAS, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE +; ANIM_OBJ_HORN + battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_71, BATTLEANIMFUNC_HORN, PAL_BATTLE_OB_GRAY, ANIM_GFX_HORN +; ANIM_OBJ_NEEDLE + battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_72, BATTLEANIMFUNC_NEEDLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_HORN +; ANIM_OBJ_PETAL_DANCE + battleanimobj RELATIVE_X, $48, BATTLEANIMFRAMESET_73, BATTLEANIMFUNC_PETAL_DANCE, PAL_BATTLE_OB_RED, ANIM_GFX_FLOWER +; ANIM_OBJ_SLUDGE_BOMB + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_THROW_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, ANIM_GFX_EGG +; ANIM_OBJ_PAY_DAY + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_75, BATTLEANIMFUNC_THIEF_PAYDAY, PAL_BATTLE_OB_BROWN, ANIM_GFX_STATUS +; ANIM_OBJ_SONICBOOM_JP_UNUSED + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_4A, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP +; ANIM_OBJ_MIMIC + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_ABSORB_CIRCLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_SPEED +; ANIM_OBJ_ATTRACT + battleanimobj RELATIVE_X, $78, BATTLEANIMFRAMESET_76, BATTLEANIMFUNC_POISON_GAS, PAL_BATTLE_OB_RED, ANIM_GFX_OBJECTS +; ANIM_OBJ_BONEMERANG + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_BONEMERANG, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC +; ANIM_OBJ_BONE_CLUB + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC +; ANIM_OBJ_BONE_RUSH + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_77, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC +; ANIM_OBJ_SWIFT + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_USER_TO_TARGET_SPIN, PAL_BATTLE_OB_YELLOW, ANIM_GFX_OBJECTS +; ANIM_OBJ_KINESIS + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_79, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC +; ANIM_OBJ_FLASH + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_SHINY, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED +; ANIM_OBJ_SHINY + battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_SHINY, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED +; ANIM_OBJ_SKY_ATTACK + battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_7B, BATTLEANIMFUNC_SKY_ATTACK, PAL_BATTLE_OB_GRAY, ANIM_GFX_SKY_ATTACK +; ANIM_OBJ_LICK + battleanimobj RELATIVE_X | X_FLIP, $98, BATTLEANIMFRAMESET_7C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_WATER +; ANIM_OBJ_WITHDRAW + battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_7D, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_REFLECT +; ANIM_OBJ_DRAIN + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_21, BATTLEANIMFUNC_ABSORB_CIRCLE, PAL_BATTLE_OB_BLUE, ANIM_GFX_BUBBLE +; ANIM_OBJ_GROWTH + battleanimobj RELATIVE_X, $b0, BATTLEANIMFRAMESET_7E, BATTLEANIMFUNC_GROWTH_SWORDS_DANCE, PAL_BATTLE_OB_YELLOW, ANIM_GFX_CHARGE +; ANIM_OBJ_CONVERSION2 + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_7F, BATTLEANIMFUNC_ABSORB_CIRCLE, PAL_BATTLE_OB_GRAY, ANIM_GFX_EXPLOSION +; ANIM_OBJ_SMOKE + battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_6F, BATTLEANIMFUNC_SMOKE_FLAME_WHEEL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HAZE +; ANIM_OBJ_SMOKESCREEN + battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_PRESENT_SMOKESCREEN, PAL_BATTLE_OB_GRAY, ANIM_GFX_EGG +; ANIM_OBJ_SWORDS_DANCE + battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_80, BATTLEANIMFUNC_GROWTH_SWORDS_DANCE, PAL_BATTLE_OB_GRAY, ANIM_GFX_WHIP +; ANIM_OBJ_SPEED_LINE + battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_81, BATTLEANIMFUNC_SPEED_LINE, PAL_BATTLE_OB_GRAY, ANIM_GFX_SPEED +; ANIM_OBJ_SHARPEN + battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_85, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_SHAPES +; ANIM_OBJ_DEFENSE_CURL + battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_86, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_SHAPES +; ANIM_OBJ_METRONOME_HAND + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_87, BATTLEANIMFUNC_METRONOME_HAND, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC +; ANIM_OBJ_METRONOME_SPARKLE + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_30, BATTLEANIMFUNC_METRONOME_SPARKLE_SKETCH, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED +; ANIM_OBJ_DISABLE + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_34, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING +; ANIM_OBJ_AGILITY + battleanimobj RELATIVE_X | X_FLIP | PRIORITY, $88, BATTLEANIMFRAMESET_88, BATTLEANIMFUNC_AGILITY, PAL_BATTLE_OB_BLUE, ANIM_GFX_WIND +; ANIM_OBJ_HEART + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_76, BATTLEANIMFUNC_FLOAT_UP, PAL_BATTLE_OB_RED, ANIM_GFX_OBJECTS +; ANIM_OBJ_FLAME_WHEEL + battleanimobj RELATIVE_X, $98, BATTLEANIMFRAMESET_10, BATTLEANIMFUNC_SMOKE_FLAME_WHEEL, PAL_BATTLE_OB_RED, ANIM_GFX_FIRE +; ANIM_OBJ_SACRED_FIRE + battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_0F, BATTLEANIMFUNC_SACRED_FIRE, PAL_BATTLE_OB_RED, ANIM_GFX_FIRE +; ANIM_OBJ_COTTON_SPORE + battleanimobj RELATIVE_X | X_FLIP, $68, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_SPIRAL_DESCENT, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC +; ANIM_OBJ_MILK_DRINK + battleanimobj RELATIVE_X | X_FLIP, $b0, BATTLEANIMFRAMESET_8A, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC +; ANIM_OBJ_ANGER + battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_8C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC +; ANIM_OBJ_HEAL_BELL + battleanimobj RELATIVE_X | X_FLIP, $50, BATTLEANIMFRAMESET_8D, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_MISC +; ANIM_OBJ_HEAL_BELL_NOTE + battleanimobj RELATIVE_X, $40, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_HEAL_BELL_NOTES, PAL_BATTLE_OB_GRAY, ANIM_GFX_NOISE +; ANIM_OBJ_BATON_PASS + battleanimobj RELATIVE_X | X_FLIP, $a8, BATTLEANIMFRAMESET_8E, BATTLEANIMFUNC_BATON_PASS, PAL_BATTLE_OB_RED, ANIM_GFX_MISC +; ANIM_OBJ_LOCK_ON + battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_8F, BATTLEANIMFUNC_LOCK_ON_MIND_READER, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC +; ANIM_OBJ_MIND_READER + battleanimobj RELATIVE_X | X_FLIP, $88, BATTLEANIMFRAMESET_93, BATTLEANIMFUNC_LOCK_ON_MIND_READER, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC +; ANIM_OBJ_SAFEGUARD + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_97, BATTLEANIMFUNC_SAFEGUARD_PROTECT, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC +; ANIM_OBJ_PROTECT + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_SAFEGUARD_PROTECT, PAL_BATTLE_OB_YELLOW, ANIM_GFX_OBJECTS +; ANIM_OBJ_THIEF + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_THIEF_PAYDAY, PAL_BATTLE_OB_GRAY, ANIM_GFX_STATUS +; ANIM_OBJ_OCTAZOOKA + battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_GRAY, ANIM_GFX_EGG +; ANIM_OBJ_PRESENT + battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_PRESENT_SMOKESCREEN, PAL_BATTLE_OB_RED, ANIM_GFX_STATUS +; ANIM_OBJ_SPIKES + battleanimobj RELATIVE_X | X_FLIP, $70, BATTLEANIMFRAMESET_8B, BATTLEANIMFUNC_SPIKES, PAL_BATTLE_OB_GRAY, ANIM_GFX_MISC +; ANIM_OBJ_POWDER_SNOW + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_15, BATTLEANIMFUNC_USER_TO_TARGET_SPIN, PAL_BATTLE_OB_GRAY, ANIM_GFX_ICE +; ANIM_OBJ_DRAGONBREATH + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_11, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_RED, ANIM_GFX_FIRE +; ANIM_OBJ_CONVERSION + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_7F, BATTLEANIMFUNC_CONVERSION, PAL_BATTLE_OB_GRAY, ANIM_GFX_EXPLOSION +; ANIM_OBJ_SPIDER_WEB + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_9A, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_WEB +; ANIM_OBJ_CAKE_UNUSED + battleanimobj RELATIVE_X | X_FLIP, $a0, BATTLEANIMFRAMESET_9B, BATTLEANIMFUNC_PRESENT_SMOKESCREEN, PAL_BATTLE_OB_RED, ANIM_GFX_OBJECTS +; ANIM_OBJ_NIGHTMARE + battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_DIZZY, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS +; ANIM_OBJ_IN_NIGHTMARE + battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9D, BATTLEANIMFUNC_FLOAT_UP, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS +; ANIM_OBJ_LOVELY_KISS + battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS +; ANIM_OBJ_SWEET_KISS + battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_9E, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BLUE, ANIM_GFX_ANGELS +; ANIM_OBJ_SKETCH + battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $80, BATTLEANIMFRAMESET_9F, BATTLEANIMFUNC_METRONOME_SPARKLE_SKETCH, PAL_BATTLE_OB_GREEN, ANIM_GFX_OBJECTS +; ANIM_OBJ_ENCORE_HAND + battleanimobj RELATIVE_X | X_FLIP, $80, BATTLEANIMFRAMESET_A0, BATTLEANIMFUNC_CLAMP_ENCORE, PAL_BATTLE_OB_GRAY, ANIM_GFX_OBJECTS +; ANIM_OBJ_ENCORE_STAR + battleanimobj RELATIVE_X | X_FLIP, $70, BATTLEANIMFRAMESET_78, BATTLEANIMFUNC_ENCORE_BELLY_DRUM, PAL_BATTLE_OB_YELLOW, ANIM_GFX_OBJECTS +; ANIM_OBJ_DESTINY_BOND + battleanimobj RELATIVE_X | X_FLIP, $c0, BATTLEANIMFRAMESET_A2, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS +; ANIM_OBJ_MORNING_SUN + battleanimobj RELATIVE_X | X_FLIP, $40, BATTLEANIMFRAMESET_A3, BATTLEANIMFUNC_SWAGGER_MORNING_SUN, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SHINE +; ANIM_OBJ_GLIMMER + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_A4, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_SHINE +; ANIM_OBJ_MOONLIGHT + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_A5, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SHINE +; ANIM_OBJ_HIDDEN_POWER + battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_43, BATTLEANIMFUNC_HIDDEN_POWER, PAL_BATTLE_OB_RED, ANIM_GFX_CHARGE +; ANIM_OBJ_CROSS_CHOP1 + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_A6, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT +; ANIM_OBJ_CROSS_CHOP2 + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_A7, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_CUT +; ANIM_OBJ_SANDSTORM + battleanimobj RELATIVE_X | X_FLIP, $00, BATTLEANIMFRAMESET_B4, BATTLEANIMFUNC_RAIN_SANDSTORM, PAL_BATTLE_OB_BROWN, ANIM_GFX_POWDER +; ANIM_OBJ_ZAP_CANNON + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_A8, BATTLEANIMFUNC_USER_TO_TARGET_DISAPPEAR, PAL_BATTLE_OB_YELLOW, ANIM_GFX_LIGHTNING +; ANIM_OBJ_SPITE + battleanimobj RELATIVE_X | X_FLIP, $40, BATTLEANIMFRAMESET_9C, BATTLEANIMFUNC_POWDER, PAL_BATTLE_OB_GRAY, ANIM_GFX_ANGELS +; ANIM_OBJ_CURSE + battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $90, BATTLEANIMFRAMESET_A9, BATTLEANIMFUNC_CURSE, PAL_BATTLE_OB_GRAY, ANIM_GFX_OBJECTS +; ANIM_OBJ_PERISH_SONG + battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_PERISH_SONG, PAL_BATTLE_OB_GRAY, ANIM_GFX_NOISE +; ANIM_OBJ_FORESIGHT + battleanimobj RELATIVE_X, $80, BATTLEANIMFRAMESET_AA, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_SHINE +; ANIM_OBJ_RAPID_SPIN + battleanimobj RELATIVE_X | X_FLIP, $b8, BATTLEANIMFRAMESET_AB, BATTLEANIMFUNC_RAPID_SPIN, PAL_BATTLE_OB_GRAY, ANIM_GFX_WIND +; ANIM_OBJ_SWAGGER + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_AC, BATTLEANIMFUNC_SWAGGER_MORNING_SUN, PAL_BATTLE_OB_GRAY, ANIM_GFX_WIND +; ANIM_OBJ_BELLY_DRUM_HAND + battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_05, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_BELLY_DRUM_NOTE + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_ENCORE_BELLY_DRUM, PAL_BATTLE_OB_GRAY, ANIM_GFX_NOISE +; ANIM_OBJ_MEAN_LOOK + battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_AD, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_BLUE, ANIM_GFX_PSYCHIC +; ANIM_OBJ_BETA_PURSUIT + battleanimobj RELATIVE_X, $a8, BATTLEANIMFRAMESET_AE, BATTLEANIMFUNC_BETA_PURSUIT, PAL_BATTLE_OB_GRAY, ANIM_GFX_HIT +; ANIM_OBJ_SHOOTING_SPARKLE + battleanimobj RELATIVE_X | X_FLIP, $90, BATTLEANIMFRAMESET_AF, BATTLEANIMFUNC_USER_TO_TARGET, PAL_BATTLE_OB_YELLOW, ANIM_GFX_SPEED +; ANIM_OBJ_RAIN + battleanimobj RELATIVE_X | X_FLIP, $00, BATTLEANIMFRAMESET_B0, BATTLEANIMFUNC_RAIN_SANDSTORM, PAL_BATTLE_OB_GRAY, ANIM_GFX_WATER +; ANIM_OBJ_B0 + battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_70, BATTLEANIMFUNC_ANIM_OBJ_B0, PAL_BATTLE_OB_RED, ANIM_GFX_HAZE +; ANIM_OBJ_PSYCH_UP + battleanimobj RELATIVE_X, $88, BATTLEANIMFRAMESET_B1, BATTLEANIMFUNC_PSYCH_UP, PAL_BATTLE_OB_GRAY, ANIM_GFX_STATUS +; ANIM_OBJ_ANCIENTPOWER + battleanimobj RELATIVE_X, $b8, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_ANCIENT_POWER, PAL_BATTLE_OB_BROWN, ANIM_GFX_ROCKS +; ANIM_OBJ_AEROBLAST + battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_B3, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_YELLOW, ANIM_GFX_AEROBLAST +; ANIM_OBJ_SHADOW_BALL + battleanimobj RELATIVE_X | X_FLIP | Y_FLIP, $98, BATTLEANIMFRAMESET_74, BATTLEANIMFUNC_WAVE_TO_TARGET, PAL_BATTLE_OB_BLUE, ANIM_GFX_EGG +; ANIM_OBJ_ROCK_SMASH + battleanimobj RELATIVE_X | X_FLIP, $ff, BATTLEANIMFRAMESET_19, BATTLEANIMFUNC_ROCK_SMASH, PAL_BATTLE_OB_BROWN, ANIM_GFX_ROCKS +; ANIM_OBJ_FLOWER + battleanimobj RELATIVE_X, $90, BATTLEANIMFRAMESET_73, BATTLEANIMFUNC_USER_TO_TARGET_SPIN, PAL_BATTLE_OB_RED, ANIM_GFX_FLOWER +; ANIM_OBJ_COTTON + battleanimobj RELATIVE_X, $ff, BATTLEANIMFRAMESET_89, BATTLEANIMFUNC_COTTON, PAL_BATTLE_OB_RED, ANIM_GFX_MISC +; ANIM_OBJ_ENEMYFEET_1ROW + battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B5, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_ENEMY, ANIM_GFX_PLAYERHEAD +; ANIM_OBJ_PLAYERHEAD_1ROW + battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B6, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_PLAYER, ANIM_GFX_ENEMYFEET +; ANIM_OBJ_ENEMYFEET_2ROW + battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B7, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_ENEMY, ANIM_GFX_PLAYERHEAD +; ANIM_OBJ_PLAYERHEAD_2ROW + battleanimobj ABSOLUTE_X, $00, BATTLEANIMFRAMESET_B8, BATTLEANIMFUNC_NULL, PAL_BATTLE_OB_PLAYER, ANIM_GFX_ENEMYFEET + assert_table_length NUM_ANIM_OBJS diff --git a/data/battle_tower/classes.asm b/data/battle_tower/classes.asm new file mode 100644 index 0000000..863759c --- /dev/null +++ b/data/battle_tower/classes.asm @@ -0,0 +1,79 @@ +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. + table_width (NAME_LENGTH - 1) + 1, BattleTowerTrainers + ; name, class + db "HANSON@@@@", FISHER + db "SAWYER@@@@", POKEMANIAC + db "MASUDA@@@@", GUITARIST + db "NICKEL@@@@", SCIENTIST + db "OLSON@@@@@", POKEFANM + db "ZABOROWSKI", LASS + db "WRIGHT@@@@", YOUNGSTER + db "ALEXANDER@", HIKER + db "KAWAKAMI@@", TEACHER + db "BICKETT@@@", POKEFANM + db "SAITO@@@@@", KIMONO_GIRL + db "CRAWFORD@@", BOARDER + db "DIAZ@@@@@@", PICNICKER + db "ERICKSON@@", BIKER + db "FAIRFIELD@", JUGGLER + db "HUNTER@@@@", POKEFANF + db "HILL@@@@@@", FIREBREATHER + db "JAVIER@@@@", SWIMMERF + db "KAUFMAN@@@", SWIMMERM + db "LANCASTER@", SKIER + db "McMAHILL@@", CAMPER + assert_table_length BATTLETOWER_NUM_UNIQUE_MON +; The following can only be sampled in Crystal 1.1. + db "OBRIEN@@@@", GENTLEMAN + db "FROST@@@@@", BEAUTY + db "MORSE@@@@@", SUPER_NERD + db "YUFUNE@@@@", BLACKBELT_T + db "RAJAN@@@@@", COOLTRAINERF + db "RODRIGUEZ@", OFFICER + db "SANTIAGO@@", PSYCHIC_T + db "STOCK@@@@@", POKEFANM + db "THURMAN@@@", SCIENTIST + db "VALENTINO@", BEAUTY + db "WAGNER@@@@", CAMPER + db "YATES@@@@@", BIRD_KEEPER + db "ANDREWS@@@", PICNICKER + db "BAHN@@@@@@", POKEMANIAC + db "MORI@@@@@@", SCIENTIST + db "BUCKMAN@@@", SAGE + db "COBB@@@@@@", SCHOOLBOY + db "HUGHES@@@@", FISHER + db "ARITA@@@@@", KIMONO_GIRL + db "EASTON@@@@", PSYCHIC_T + db "FREEMAN@@@", CAMPER + db "GIESE@@@@@", LASS + db "HATCHER@@@", GENTLEMAN + db "JACKSON@@@", POKEFANF + db "KAHN@@@@@@", POKEMANIAC + db "LEONG@@@@@", YOUNGSTER + db "MARINO@@@@", TEACHER + db "NEWMAN@@@@", SAILOR + db "NGUYEN@@@@", BLACKBELT_T + db "OGDEN@@@@@", SUPER_NERD + db "PARK@@@@@@", COOLTRAINERF + db "RAINE@@@@@", SWIMMERM + db "SELLS@@@@@", BIRD_KEEPER + db "ROCKWELL@@", BOARDER + db "THORNTON@@", LASS + db "TURNER@@@@", OFFICER + db "VAN DYKE@@", SKIER + db "WALKER@@@@", SCHOOLBOY + db "MEYER@@@@@", SWIMMERF + db "JOHNSON@@@", YOUNGSTER + db "ADAMS@@@@@", GUITARIST + db "SMITH@@@@@", BUG_CATCHER + db "TAJIRI@@@@", BUG_CATCHER + db "BAKER@@@@@", POKEMANIAC + db "COLLINS@@@", SCIENTIST + db "SMART@@@@@", SUPER_NERD + db "DYKSTRA@@@", SWIMMERF + db "EATON@@@@@", BIKER + db "WONG@@@@@@", FIREBREATHER + assert_table_length BATTLETOWER_NUM_UNIQUE_TRAINERS diff --git a/data/battle_tower/parties.asm b/data/battle_tower/parties.asm new file mode 100644 index 0000000..b23b494 --- /dev/null +++ b/data/battle_tower/parties.asm @@ -0,0 +1,5705 @@ +BattleTowerMons: +; 10 groups of 21 mons. +; Each mon is several bytes too long; the initial species, item and move IDs must be converted to 8-bit when loading. + table_width NICKNAMED_MON_STRUCT_LENGTH + 5, BattleTowerMons + +; BattleTowerMons group 1 + + dw JOLTEON + db MIRACLEBERRY + dw THUNDERBOLT, HYPER_BEAM, SHADOW_BALL, ROAR + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 40000 + bigdw 40000 + bigdw 35000 + bigdw 40000 + dn 13, 13, 11, 13 ; DVs + db 15, 5, 15, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 41 ; HP + bigdw 41 ; Max HP + bigdw 25 ; Atk + bigdw 24 ; Def + bigdw 37 ; Spd + bigdw 34 ; SAtk + bigdw 31 ; SDef + db "SANDA-SU@@@" + + dw ESPEON + db LEFTOVERS + dw MUD_SLAP, PSYCHIC_M, PSYCH_UP, TOXIC + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 50000 + bigdw 35000 + bigdw 40000 + bigdw 40000 + dn 14, 13, 15, 11 ; DVs + db 10, 10, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 39 ; HP + bigdw 39 ; Max HP + bigdw 26 ; Atk + bigdw 24 ; Def + bigdw 35 ; Spd + bigdw 38 ; SAtk + bigdw 31 ; SDef + db "E-HUi@@@@@@" + + dw UMBREON + db GOLD_BERRY + dw SHADOW_BALL, IRON_TAIL, PSYCH_UP, TOXIC + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 40000 + bigdw 45000 + bigdw 50000 + bigdw 40000 + dn 13, 11, 14, 15 ; DVs + db 15, 15, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 46 ; HP + bigdw 46 ; Max HP + bigdw 25 ; Atk + bigdw 34 ; Def + bigdw 26 ; Spd + bigdw 25 ; SAtk + bigdw 39 ; SDef + db "BURAtuKI-@@" + + dw WOBBUFFET + db FOCUS_BAND + dw COUNTER, MIRROR_COAT, SAFEGUARD, DESTINY_BOND + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 7, 15, 13, 7 ; DVs + db 20, 20, 25, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 66 ; HP + bigdw 66 ; Max HP + bigdw 18 ; Atk + bigdw 25 ; Def + bigdw 19 ; Spd + bigdw 18 ; SAtk + bigdw 23 ; SDef + db "SO-NANSU@@@" + + dw KANGASKHAN + db MIRACLEBERRY + dw REVERSAL, HYPER_BEAM, EARTHQUAKE, ATTRACT + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 30000 + bigdw 40000 + bigdw 30000 + bigdw 30000 + dn 14, 15, 12, 15 ; DVs + db 15, 5, 10, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 47 ; HP + bigdw 47 ; Max HP + bigdw 31 ; Atk + bigdw 29 ; Def + bigdw 29 ; Spd + bigdw 20 ; SAtk + bigdw 28 ; SDef + db "GARU-RA@@@@" + + dw CORSOLA + db SCOPE_LENS + dw SURF, PSYCHIC_M, RECOVER, ANCIENTPOWER + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 30000 + bigdw 33300 + bigdw 30000 + bigdw 30000 + dn 15, 14, 15, 13 ; DVs + db 15, 10, 20, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 38 ; HP + bigdw 38 ; Max HP + bigdw 23 ; Atk + bigdw 29 ; Def + bigdw 19 ; Spd + bigdw 24 ; SAtk + bigdw 28 ; SDef + db "SANI-GO@@@@" + + dw MILTANK + db GOLD_BERRY + dw BLIZZARD, EARTHQUAKE, HYPER_BEAM, TOXIC + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 35000 + dn 11, 11, 13, 15 ; DVs + db 5, 10, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 46 ; HP + bigdw 46 ; Max HP + bigdw 27 ; Atk + bigdw 32 ; Def + bigdw 31 ; Spd + bigdw 20 ; SAtk + bigdw 26 ; SDef + db "MIRUTANKU@@" + + dw AERODACTYL + db LEFTOVERS + dw HYPER_BEAM, SUPERSONIC, EARTHQUAKE, BITE + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 13, 11, 15, 11 ; DVs + db 5, 20, 10, 25 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 43 ; HP + bigdw 43 ; Max HP + bigdw 32 ; Atk + bigdw 24 ; Def + bigdw 38 ; Spd + bigdw 23 ; SAtk + bigdw 26 ; SDef + db "PUTERA@@@@@" + + dw LAPRAS + db MIRACLEBERRY + dw BLIZZARD, SURF, THUNDERBOLT, PSYCHIC_M + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 15, 13, 14, 11 ; DVs + db 5, 15, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 52 ; HP + bigdw 52 ; Max HP + bigdw 29 ; Atk + bigdw 27 ; Def + bigdw 24 ; Spd + bigdw 28 ; SAtk + bigdw 30 ; SDef + db "RAPURASU@@@" + + dw SNEASEL + db GOLD_BERRY + dw SLASH, FAINT_ATTACK, SURF, BLIZZARD + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 35000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 15, 11, 11, 15 ; DVs + db 20, 20, 15, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 38 ; HP + bigdw 38 ; Max HP + bigdw 31 ; Atk + bigdw 22 ; Def + bigdw 34 ; Spd + bigdw 19 ; SAtk + bigdw 27 ; SDef + db "NIyu-RA@@@@" + + dw PORYGON2 + db BRIGHTPOWDER + dw PSYCHIC_M, BLIZZARD, HYPER_BEAM, TRI_ATTACK + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 40000 + bigdw 30000 + bigdw 30000 + dn 15, 11, 13, 14 ; DVs + db 10, 5, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 44 ; HP + bigdw 44 ; Max HP + bigdw 28 ; Atk + bigdw 30 ; Def + bigdw 23 ; Spd + bigdw 33 ; SAtk + bigdw 31 ; SDef + db "PORIGON2@@@" + + dw MISDREAVUS + db FOCUS_BAND + dw PERISH_SONG, MEAN_LOOK, PAIN_SPLIT, SHADOW_BALL + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 14, 15, 13, 15 ; DVs + db 5, 5, 20, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 37 ; HP + bigdw 37 ; Max HP + bigdw 24 ; Atk + bigdw 24 ; Def + bigdw 28 ; Spd + bigdw 29 ; SAtk + bigdw 29 ; SDef + db "MUUMA@@@@@@" + + dw HOUNDOUR + db GOLD_BERRY + dw FAINT_ATTACK, SOLARBEAM, ROAR, SUNNY_DAY + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 33000 + bigdw 30000 + dn 15, 13, 15, 14 ; DVs + db 20, 10, 20, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 36 ; HP + bigdw 36 ; Max HP + bigdw 24 ; Atk + bigdw 17 ; Def + bigdw 25 ; Spd + bigdw 28 ; SAtk + bigdw 22 ; SDef + db "DERUBIRU@@@" + + dw GIRAFARIG + db KINGS_ROCK + dw PSYBEAM, MUD_SLAP, SHADOW_BALL, AGILITY + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 14, 13, 15, 13 ; DVs + db 20, 10, 15, 30 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 39 ; HP + bigdw 39 ; Max HP + bigdw 28 ; Atk + bigdw 24 ; Def + bigdw 29 ; Spd + bigdw 29 ; SAtk + bigdw 24 ; SDef + db "KIRINRIKI@@" + + dw BLISSEY + db QUICK_CLAW + dw HEADBUTT, SOLARBEAM, ROLLOUT, STRENGTH + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 32000 + bigdw 40000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 13, 15, 12, 14 ; DVs + db 15, 10, 20, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 77 ; HP + bigdw 77 ; Max HP + bigdw 14 ; Atk + bigdw 14 ; Def + bigdw 22 ; Spd + bigdw 27 ; SAtk + bigdw 39 ; SDef + db "HAPINASU@@@" + + dw SNORLAX + db MIRACLEBERRY + dw HEADBUTT, PROTECT, SNORE, SURF + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 14, 15, 15, 7 ; DVs + db 15, 10, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 57 ; HP + bigdw 57 ; Max HP + bigdw 34 ; Atk + bigdw 25 ; Def + bigdw 18 ; Spd + bigdw 23 ; SAtk + bigdw 32 ; SDef + db "KABIGON@@@@" + + dw EXEGGUTOR + db KINGS_ROCK + dw TOXIC, GIGA_DRAIN, THIEF, CONFUSION + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 15, 14, 15, 14 ; DVs + db 10, 5, 10, 25 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 45 ; HP + bigdw 45 ; Max HP + bigdw 31 ; Atk + bigdw 29 ; Def + bigdw 23 ; Spd + bigdw 37 ; SAtk + bigdw 25 ; SDef + db "NAtuSI-@@@@" + + dw HERACROSS + db GOLD_BERRY + dw REVERSAL, ENDURE, COUNTER, ROCK_SMASH + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 15, 7, 15, 7 ; DVs + db 15, 10, 20, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 43 ; HP + bigdw 43 ; Max HP + bigdw 37 ; Atk + bigdw 25 ; Def + bigdw 29 ; Spd + bigdw 18 ; SAtk + bigdw 29 ; SDef + db "HERAKUROSU@" + + dw UNOWN + db BERRY + dw HIDDEN_POWER, 0, 0, 0 + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 15, 15, 15, 15 ; DVs + db 15, 0, 0, 0 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 36 ; HP + bigdw 36 ; Max HP + bigdw 26 ; Atk + bigdw 21 ; Def + bigdw 21 ; Spd + bigdw 26 ; SAtk + bigdw 21 ; SDef + db "ANNO-N@@@@@" + + dw TAUROS + db KINGS_ROCK + dw HEADBUTT, SWAGGER, TAIL_WHIP, ICY_WIND + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 6, 5, 5, 7 ; DVs + db 15, 15, 30, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 40 ; HP + bigdw 40 ; Max HP + bigdw 30 ; Atk + bigdw 29 ; Def + bigdw 32 ; Spd + bigdw 18 ; SAtk + bigdw 24 ; SDef + db "KENTAROSU@@" + + dw MR__MIME + db QUICK_CLAW + dw TOXIC, PSYCH_UP, FIRE_PUNCH, HEADBUTT + + dw 0 ; OT ID + dt 1000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 7, 3, 6, 7 ; DVs + db 10, 10, 15, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 10 ; Level + db 0, 0 ; Status + bigdw 34 ; HP + bigdw 34 ; Max HP + bigdw 19 ; Atk + bigdw 22 ; Def + bigdw 28 ; Spd + bigdw 30 ; SAtk + bigdw 34 ; SDef + db "BARIYA-DO@@" + + +; BattleTowerMons group 2 + + dw UMBREON + db LEFTOVERS + dw PROTECT, TOXIC, MUD_SLAP, ATTRACT + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 12, 15, 11, 12 ; DVs + db 10, 10, 10, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 81 ; HP + bigdw 81 ; Max HP + bigdw 46 ; Atk + bigdw 66 ; Def + bigdw 46 ; Spd + bigdw 44 ; SAtk + bigdw 72 ; SDef + db "BURAtuKI-@@" + + dw STARMIE + db GOLD_BERRY + dw RECOVER, PSYCHIC_M, SURF, PSYCH_UP + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 13, 11, 13, 11 ; DVs + db 20, 10, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 71 ; HP + bigdw 71 ; Max HP + bigdw 51 ; Atk + bigdw 54 ; Def + bigdw 67 ; Spd + bigdw 60 ; SAtk + bigdw 54 ; SDef + db "SUTA-MI-@@@" + + dw GYARADOS + db MIRACLEBERRY + dw HYPER_BEAM, DRAGON_RAGE, THUNDERBOLT, FIRE_BLAST + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 10, 15, 13 ; DVs + db 5, 10, 15, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 83 ; HP + bigdw 83 ; Max HP + bigdw 72 ; Atk + bigdw 51 ; Def + bigdw 54 ; Spd + bigdw 45 ; SAtk + bigdw 61 ; SDef + db "GIyaRADOSU@" + + dw STEELIX + db GOLD_BERRY + dw ROAR, IRON_TAIL, SWAGGER, EARTHQUAKE + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 30000 + bigdw 50000 + dn 15, 15, 15, 15 ; DVs + db 20, 15, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 77 ; HP + bigdw 77 ; Max HP + bigdw 55 ; Atk + bigdw 102 ; Def + bigdw 31 ; Spd + bigdw 44 ; SAtk + bigdw 48 ; SDef + db "HAGANE-RU@@" + + dw ALAKAZAM + db BERRY_JUICE + dw PSYCHIC_M, PSYCH_UP, TOXIC, THUNDERPUNCH + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 30000 + bigdw 50000 + bigdw 40000 + dn 15, 13, 14, 15 ; DVs + db 10, 10, 10, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 68 ; HP + bigdw 68 ; Max HP + bigdw 42 ; Atk + bigdw 36 ; Def + bigdw 69 ; Spd + bigdw 75 ; SAtk + bigdw 55 ; SDef + db "HU-DEiN@@@@" + + dw ARCANINE + db BRIGHTPOWDER + dw FLAMETHROWER, ROAR, HYPER_BEAM, IRON_TAIL + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 35000 + bigdw 45000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + dn 13, 11, 15, 11 ; DVs + db 15, 20, 5, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 81 ; HP + bigdw 81 ; Max HP + bigdw 64 ; Atk + bigdw 52 ; Def + bigdw 60 ; Spd + bigdw 60 ; SAtk + bigdw 52 ; SDef + db "UINDEi@@@@@" + + dw HERACROSS + db FOCUS_BAND + dw ENDURE, REVERSAL, MEGAHORN, EARTHQUAKE + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 30000 + bigdw 45000 + bigdw 30000 + bigdw 45000 + dn 13, 15, 13, 14 ; DVs + db 10, 15, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 78 ; HP + bigdw 78 ; Max HP + bigdw 68 ; Atk + bigdw 51 ; Def + bigdw 52 ; Spd + bigdw 37 ; SAtk + bigdw 59 ; SDef + db "HERAKUROSU@" + + dw EXEGGUTOR + db LEFTOVERS + dw HYPER_BEAM, PSYCHIC_M, TOXIC, DREAM_EATER + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 45000 + dn 15, 13, 14, 11 ; DVs + db 5, 10, 10, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 83 ; HP + bigdw 83 ; Max HP + bigdw 60 ; Atk + bigdw 55 ; Def + bigdw 43 ; Spd + bigdw 70 ; SAtk + bigdw 46 ; SDef + db "NAtuSI-@@@@" + + dw AERODACTYL + db GOLD_BERRY + dw REST, HYPER_BEAM, EARTHQUAKE, DRAGON_RAGE + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 45000 + dn 15, 11, 11, 11 ; DVs + db 10, 5, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 78 ; HP + bigdw 78 ; Max HP + bigdw 64 ; Atk + bigdw 45 ; Def + bigdw 72 ; Spd + bigdw 44 ; SAtk + bigdw 50 ; SDef + db "PUTERA@@@@@" + + dw BLISSEY + db BRIGHTPOWDER + dw PSYCHIC_M, SUBMISSION, SOFTBOILED, COUNTER + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 30000 + bigdw 30000 + bigdw 50000 + dn 11, 13, 15, 14 ; DVs + db 10, 25, 10, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 148 ; HP + bigdw 148 ; Max HP + bigdw 24 ; Atk + bigdw 22 ; Def + bigdw 41 ; Spd + bigdw 51 ; SAtk + bigdw 75 ; SDef + db "HAPINASU@@@" + + dw LAPRAS + db GOLD_BERRY + dw PSYCHIC_M, THUNDERBOLT, BLIZZARD, CONFUSE_RAY + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 30000 + bigdw 40000 + bigdw 55000 + bigdw 30000 + dn 15, 14, 13, 7 ; DVs + db 10, 15, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 98 ; HP + bigdw 98 ; Max HP + bigdw 53 ; Atk + bigdw 52 ; Def + bigdw 45 ; Spd + bigdw 50 ; SAtk + bigdw 54 ; SDef + db "RAPURASU@@@" + + dw PIKACHU + db LIGHT_BALL + dw THUNDERBOLT, THUNDER_WAVE, STRENGTH, TOXIC + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 50000 + dn 15, 12, 15, 14 ; DVs + db 15, 20, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 58 ; HP + bigdw 58 ; Max HP + bigdw 44 ; Atk + bigdw 32 ; Def + bigdw 58 ; Spd + bigdw 41 ; SAtk + bigdw 37 ; SDef + db "PIKATIyuU@@" + + dw SCIZOR + db FOCUS_BAND + dw STEEL_WING, SLASH, TOXIC, SANDSTORM + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 45000 + bigdw 40000 + bigdw 45000 + bigdw 50000 + dn 15, 13, 15, 14 ; DVs + db 25, 20, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 73 ; HP + bigdw 73 ; Max HP + bigdw 73 ; Atk + bigdw 60 ; Def + bigdw 47 ; Spd + bigdw 43 ; SAtk + bigdw 53 ; SDef + db "HAtuSAMU@@@" + + dw HITMONCHAN + db GOLD_BERRY + dw THUNDERPUNCH, ICE_PUNCH, FIRE_PUNCH, MEGA_PUNCH + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 35000 + bigdw 50000 + bigdw 30000 + dn 15, 11, 15, 13 ; DVs + db 15, 15, 15, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 67 ; HP + bigdw 67 ; Max HP + bigdw 63 ; Atk + bigdw 50 ; Def + bigdw 52 ; Spd + bigdw 32 ; SAtk + bigdw 62 ; SDef + db "EBIWARA-@@@" + + dw TAUROS + db BRIGHTPOWDER + dw THUNDERBOLT, EARTHQUAKE, HYPER_BEAM, BLIZZARD + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 30000 + bigdw 30000 + dn 15, 11, 14, 15 ; DVs + db 15, 10, 5, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 76 ; HP + bigdw 76 ; Max HP + bigdw 61 ; Atk + bigdw 58 ; Def + bigdw 63 ; Spd + bigdw 35 ; SAtk + bigdw 47 ; SDef + db "KENTAROSU@@" + + dw AZUMARILL + db MYSTIC_WATER + dw SURF, BLIZZARD, ATTRACT, RAIN_DANCE + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 40000 + bigdw 40000 + bigdw 40000 + bigdw 40000 + dn 14, 13, 15, 7 ; DVs + db 15, 5, 15, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 82 ; HP + bigdw 82 ; Max HP + bigdw 40 ; Atk + bigdw 52 ; Def + bigdw 41 ; Spd + bigdw 37 ; SAtk + bigdw 49 ; SDef + db "MARIRURI@@@" + + dw MILTANK + db KINGS_ROCK + dw EARTHQUAKE, THUNDER, ATTRACT, SURF + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 40000 + bigdw 40000 + bigdw 40000 + bigdw 40000 + dn 13, 15, 15, 14 ; DVs + db 10, 10, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 83 ; HP + bigdw 83 ; Max HP + bigdw 52 ; Atk + bigdw 63 ; Def + bigdw 61 ; Spd + bigdw 36 ; SAtk + bigdw 48 ; SDef + db "MIRUTANKU@@" + + dw WIGGLYTUFF + db GOLD_BERRY + dw HYPER_BEAM, BLIZZARD, FIRE_BLAST, ATTRACT + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 40000 + bigdw 40000 + bigdw 40000 + bigdw 40000 + dn 12, 7, 15, 14 ; DVs + db 5, 5, 5, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 98 ; HP + bigdw 98 ; Max HP + bigdw 47 ; Atk + bigdw 35 ; Def + bigdw 39 ; Spd + bigdw 50 ; SAtk + bigdw 40 ; SDef + db "PUKURIN@@@@" + + dw WIGGLYTUFF + db PINK_BOW + dw PSYCHIC_M, SWAGGER, PSYCH_UP, HEADBUTT + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 12, 7, 7, 7 ; DVs + db 10, 15, 10, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 97 ; HP + bigdw 97 ; Max HP + bigdw 46 ; Atk + bigdw 34 ; Def + bigdw 34 ; Spd + bigdw 46 ; SAtk + bigdw 36 ; SDef + db "PUKURIN@@@@" + + dw NIDOKING + db BERRY + dw BLIZZARD, EARTHQUAKE, SURF, THUNDERPUNCH + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 5, 6, 4, 6 ; DVs + db 5, 10, 15, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 74 ; HP + bigdw 74 ; Max HP + bigdw 52 ; Atk + bigdw 46 ; Def + bigdw 49 ; Spd + bigdw 50 ; SAtk + bigdw 46 ; SDef + db "NIDOKINGU@@" + + dw QUAGSIRE + db QUICK_CLAW + dw AMNESIA, EARTHQUAKE, SURF, RAIN_DANCE + + dw 0 ; OT ID + dt 8000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 5, 5, 4, 7 ; DVs + db 20, 10, 15, 5 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 20 ; Level + db 0, 0 ; Status + bigdw 81 ; HP + bigdw 81 ; Max HP + bigdw 49 ; Atk + bigdw 49 ; Def + bigdw 29 ; Spd + bigdw 42 ; SAtk + bigdw 42 ; SDef + db "NUO-@@@@@@@" + + +; BattleTowerMons group 3 + + dw JOLTEON + db MIRACLEBERRY + dw THUNDERBOLT, THUNDER_WAVE, ROAR, MUD_SLAP + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 55000 + dn 13, 11, 14, 13 ; DVs + db 15, 20, 20, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 103 ; HP + bigdw 103 ; Max HP + bigdw 68 ; Atk + bigdw 64 ; Def + bigdw 107 ; Spd + bigdw 96 ; SAtk + bigdw 87 ; SDef + db "SANDA-SU@@@" + + dw POLIWRATH + db BRIGHTPOWDER + dw DOUBLE_TEAM, SURF, FISSURE, SUBMISSION + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 55000 + bigdw 55000 + bigdw 55000 + bigdw 50000 + dn 13, 13, 15, 11 ; DVs + db 15, 15, 5, 25 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 119 ; HP + bigdw 119 ; Max HP + bigdw 81 ; Atk + bigdw 87 ; Def + bigdw 73 ; Spd + bigdw 70 ; SAtk + bigdw 82 ; SDef + db "NIyoROBON@@" + + dw STARMIE + db LEFTOVERS + dw THUNDER_WAVE, PSYCHIC_M, RECOVER, SURF + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 15, 15, 15 ; DVs + db 20, 10, 20, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 101 ; HP + bigdw 101 ; Max HP + bigdw 75 ; Atk + bigdw 81 ; Def + bigdw 99 ; Spd + bigdw 90 ; SAtk + bigdw 81 ; SDef + db "SUTA-MI-@@@" + + dw JYNX + db GOLD_BERRY + dw BLIZZARD, LOVELY_KISS, DREAM_EATER, ATTRACT + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 30000 + bigdw 50000 + dn 15, 11, 14, 14 ; DVs + db 5, 10, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 102 ; HP + bigdw 102 ; Max HP + bigdw 60 ; Atk + bigdw 49 ; Def + bigdw 83 ; Spd + bigdw 98 ; SAtk + bigdw 86 ; SDef + db "RU-ZIyuRA@@" + + dw DUGTRIO + db KINGS_ROCK + dw EARTHQUAKE, SLUDGE_BOMB, SLASH, MUD_SLAP + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 30000 + bigdw 50000 + bigdw 50000 + dn 14, 15, 15, 15 ; DVs + db 10, 10, 20, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 81 ; HP + bigdw 81 ; Max HP + bigdw 77 ; Atk + bigdw 56 ; Def + bigdw 102 ; Spd + bigdw 60 ; SAtk + bigdw 72 ; SDef + db "DAGUTORIO@@" + + dw BELLOSSOM + db BRIGHTPOWDER + dw GIGA_DRAIN, SUNNY_DAY, SOLARBEAM, DOUBLE_TEAM + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 45000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + dn 13, 15, 13, 11 ; DVs + db 5, 5, 10, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 109 ; HP + bigdw 109 ; Max HP + bigdw 76 ; Atk + bigdw 81 ; Def + bigdw 60 ; Spd + bigdw 82 ; SAtk + bigdw 88 ; SDef + db "KIREIHANA@@" + + dw BLISSEY + db LEFTOVERS + dw TOXIC, REFLECT, SOFTBOILED, PROTECT + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 30000 + bigdw 45000 + bigdw 30000 + bigdw 45000 + dn 15, 11, 14, 13 ; DVs + db 10, 20, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 217 ; HP + bigdw 217 ; Max HP + bigdw 32 ; Atk + bigdw 33 ; Def + bigdw 59 ; Spd + bigdw 73 ; SAtk + bigdw 109 ; SDef + db "HAPINASU@@@" + + dw HOUNDOOM + db CHARCOAL + dw FLAMETHROWER, CRUNCH, SHADOW_BALL, DREAM_EATER + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 45000 + dn 15, 13, 14, 13 ; DVs + db 15, 15, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 108 ; HP + bigdw 108 ; Max HP + bigdw 84 ; Atk + bigdw 59 ; Def + bigdw 86 ; Spd + bigdw 94 ; SAtk + bigdw 76 ; SDef + db "HERUGA-@@@@" + + dw MACHAMP + db MIRACLEBERRY + dw CROSS_CHOP, ICE_PUNCH, EARTHQUAKE, FIRE_BLAST + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 45000 + dn 15, 13, 11, 14 ; DVs + db 5, 15, 10, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 118 ; HP + bigdw 118 ; Max HP + bigdw 108 ; Atk + bigdw 75 ; Def + bigdw 61 ; Spd + bigdw 68 ; SAtk + bigdw 80 ; SDef + db "KAIRIKI-@@@" + + dw CROBAT + db GOLD_BERRY + dw ATTRACT, CONFUSE_RAY, TOXIC, WING_ATTACK + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 30000 + bigdw 30000 + bigdw 50000 + dn 14, 15, 13, 12 ; DVs + db 15, 10, 10, 35 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 111 ; HP + bigdw 111 ; Max HP + bigdw 83 ; Atk + bigdw 74 ; Def + bigdw 103 ; Spd + bigdw 70 ; SAtk + bigdw 76 ; SDef + db "KUROBAtuTO@" + + dw PORYGON2 + db BRIGHTPOWDER + dw PSYCHIC_M, RECOVER, HYPER_BEAM, TRI_ATTACK + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 30000 + bigdw 40000 + bigdw 55000 + bigdw 30000 + dn 13, 15, 13, 11 ; DVs + db 10, 20, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 117 ; HP + bigdw 117 ; Max HP + bigdw 73 ; Atk + bigdw 83 ; Def + bigdw 66 ; Spd + bigdw 87 ; SAtk + bigdw 81 ; SDef + db "PORIGON2@@@" + + dw MAROWAK + db THICK_CLUB + dw EARTHQUAKE, RETURN, HYPER_BEAM, BONEMERANG + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 30000 + dn 13, 13, 14, 11 ; DVs + db 10, 20, 5, 10 ; PP + db 255 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 99 ; HP + bigdw 99 ; Max HP + bigdw 77 ; Atk + bigdw 94 ; Def + bigdw 56 ; Spd + bigdw 54 ; SAtk + bigdw 72 ; SDef + db "GARAGARA@@@" + + dw ELECTRODE + db BRIGHTPOWDER + dw LIGHT_SCREEN, THUNDERBOLT, PROTECT, THUNDER + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 45000 + bigdw 40000 + bigdw 45000 + bigdw 50000 + dn 11, 13, 14, 15 ; DVs + db 30, 15, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 98 ; HP + bigdw 98 ; Max HP + bigdw 57 ; Atk + bigdw 69 ; Def + bigdw 113 ; Spd + bigdw 78 ; SAtk + bigdw 78 ; SDef + db "MARUMAIN@@@" + + dw LAPRAS + db LEFTOVERS + dw RAIN_DANCE, WATER_GUN, ICY_WIND, STRENGTH + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 35000 + bigdw 50000 + bigdw 30000 + dn 15, 13, 14, 11 ; DVs + db 5, 25, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 142 ; HP + bigdw 142 ; Max HP + bigdw 80 ; Atk + bigdw 74 ; Def + bigdw 65 ; Spd + bigdw 75 ; SAtk + bigdw 81 ; SDef + db "RAPURASU@@@" + + dw LANTURN + db GOLD_BERRY + dw RAIN_DANCE, THUNDER, SURF, FLAIL + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 30000 + bigdw 30000 + dn 13, 13, 14, 11 ; DVs + db 5, 10, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 139 ; HP + bigdw 139 ; Max HP + bigdw 62 ; Atk + bigdw 64 ; Def + bigdw 66 ; Spd + bigdw 70 ; SAtk + bigdw 70 ; SDef + db "RANTA-N@@@@" + + dw ESPEON + db MIRACLEBERRY + dw CONFUSION, SWIFT, TOXIC, PSYCH_UP + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 14, 15, 15, 7 ; DVs + db 25, 20, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 99 ; HP + bigdw 99 ; Max HP + bigdw 68 ; Atk + bigdw 66 ; Def + bigdw 96 ; Spd + bigdw 103 ; SAtk + bigdw 82 ; SDef + db "E-HUi@@@@@@" + + dw TENTACRUEL + db KINGS_ROCK + dw WRAP, TOXIC, SLUDGE_BOMB, BUBBLEBEAM + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 47000 + bigdw 45000 + dn 15, 14, 15, 14 ; DVs + db 20, 10, 10, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 110 ; HP + bigdw 110 ; Max HP + bigdw 71 ; Atk + bigdw 68 ; Def + bigdw 90 ; Spd + bigdw 77 ; SAtk + bigdw 101 ; SDef + db "DOKUKURAGE@" + + dw GENGAR + db GOLD_BERRY + dw THIEF, LICK, NIGHT_SHADE, GIGA_DRAIN + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 7, 15, 7 ; DVs + db 10, 30, 15, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 101 ; HP + bigdw 101 ; Max HP + bigdw 68 ; Atk + bigdw 61 ; Def + bigdw 96 ; Spd + bigdw 103 ; SAtk + bigdw 70 ; SDef + db "GENGA-@@@@@" + + dw URSARING + db GOLD_BERRY + dw HEADBUTT, PROTECT, ROAR, LEER + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 7, 7, 4, 5 ; DVs + db 15, 10, 20, 30 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 114 ; HP + bigdw 114 ; Max HP + bigdw 100 ; Atk + bigdw 67 ; Def + bigdw 53 ; Spd + bigdw 65 ; SAtk + bigdw 65 ; SDef + db "RINGUMA@@@@" + + dw FEAROW + db BRIGHTPOWDER + dw MIRROR_MOVE, PURSUIT, PECK, SWIFT + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 6, 7, 7, 7 ; DVs + db 20, 20, 35, 20 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 96 ; HP + bigdw 96 ; Max HP + bigdw 75 ; Atk + bigdw 61 ; Def + bigdw 82 ; Spd + bigdw 58 ; SAtk + bigdw 58 ; SDef + db "ONIDORIRU@@" + + dw PRIMEAPE + db MIRACLEBERRY + dw LOW_KICK, KARATE_CHOP, REVERSAL, FOCUS_ENERGY + + dw 0 ; OT ID + dt 27000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 7, 7, 6, 7 ; DVs + db 20, 25, 15, 30 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 30 ; Level + db 0, 0 ; Status + bigdw 99 ; HP + bigdw 99 ; Max HP + bigdw 85 ; Atk + bigdw 58 ; Def + bigdw 78 ; Spd + bigdw 58 ; SAtk + bigdw 64 ; SDef + db "OKORIZARU@@" + + +; BattleTowerMons group 4 + + dw TAUROS + db GOLD_BERRY + dw RETURN, HYPER_BEAM, EARTHQUAKE, IRON_TAIL + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 13, 15, 14 ; DVs + db 20, 5, 10, 15 ; PP + db 255 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 143 ; HP + bigdw 143 ; Max HP + bigdw 119 ; Atk + bigdw 113 ; Def + bigdw 127 ; Spd + bigdw 70 ; SAtk + bigdw 94 ; SDef + db "KENTAROSU@@" + + dw KINGDRA + db LEFTOVERS + dw SURF, DRAGONBREATH, HYPER_BEAM, BLIZZARD + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 13, 14, 15 ; DVs + db 15, 20, 5, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 142 ; HP + bigdw 142 ; Max HP + bigdw 115 ; Atk + bigdw 113 ; Def + bigdw 106 ; Spd + bigdw 115 ; SAtk + bigdw 115 ; SDef + db "KINGUDORA@@" + + dw SNORLAX + db QUICK_CLAW + dw ATTRACT, BODY_SLAM, PSYCH_UP, EARTHQUAKE + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 14, 13, 13, 13 ; DVs + db 15, 15, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 205 ; HP + bigdw 205 ; Max HP + bigdw 126 ; Atk + bigdw 89 ; Def + bigdw 61 ; Spd + bigdw 89 ; SAtk + bigdw 125 ; SDef + db "KABIGON@@@@" + + dw LAPRAS + db LEFTOVERS + dw THUNDERBOLT, ICE_BEAM, CONFUSE_RAY, SURF + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 13, 14, 11 ; DVs + db 15, 10, 10, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 186 ; HP + bigdw 186 ; Max HP + bigdw 107 ; Atk + bigdw 101 ; Def + bigdw 86 ; Spd + bigdw 103 ; SAtk + bigdw 111 ; SDef + db "RAPURASU@@@" + + dw STEELIX + db GOLD_BERRY + dw SANDSTORM, IRON_TAIL, EARTHQUAKE, TOXIC + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 14, 15, 13, 11 ; DVs + db 10, 15, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 137 ; HP + bigdw 137 ; Max HP + bigdw 106 ; Atk + bigdw 199 ; Def + bigdw 61 ; Spd + bigdw 79 ; SAtk + bigdw 87 ; SDef + db "HAGANE-RU@@" + + dw ALAKAZAM + db KINGS_ROCK + dw PSYCHIC_M, THUNDERPUNCH, RECOVER, FIRE_PUNCH + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + dn 13, 13, 14, 15 ; DVs + db 10, 15, 20, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 126 ; HP + bigdw 126 ; Max HP + bigdw 76 ; Atk + bigdw 73 ; Def + bigdw 135 ; Spd + bigdw 147 ; SAtk + bigdw 107 ; SDef + db "HU-DEiN@@@@" + + dw STARMIE + db LEFTOVERS + dw BLIZZARD, THUNDERBOLT, SURF, PSYCHIC_M + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 45000 + dn 15, 13, 11, 14 ; DVs + db 5, 15, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 131 ; HP + bigdw 131 ; Max HP + bigdw 99 ; Atk + bigdw 104 ; Def + bigdw 127 ; Spd + bigdw 117 ; SAtk + bigdw 105 ; SDef + db "SUTA-MI-@@@" + + dw WOBBUFFET + db GOLD_BERRY + dw COUNTER, MIRROR_COAT, SAFEGUARD, DESTINY_BOND + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 11, 15, 14, 7 ; DVs + db 20, 20, 25, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 233 ; HP + bigdw 233 ; Max HP + bigdw 62 ; Atk + bigdw 85 ; Def + bigdw 64 ; Spd + bigdw 59 ; SAtk + bigdw 79 ; SDef + db "SO-NANSU@@@" + + dw GOLEM + db FOCUS_BAND + dw EXPLOSION, EARTHQUAKE, MEGA_PUNCH, ROCK_SLIDE + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 45000 + dn 13, 13, 14, 13 ; DVs + db 5, 10, 20, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 145 ; HP + bigdw 145 ; Max HP + bigdw 125 ; Atk + bigdw 139 ; Def + bigdw 74 ; Spd + bigdw 80 ; SAtk + bigdw 88 ; SDef + db "GORO-NIya@@" + + dw SCIZOR + db SCOPE_LENS + dw SLASH, STEEL_WING, PURSUIT, HYPER_BEAM + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 40000 + bigdw 50000 + dn 11, 13, 15, 14 ; DVs + db 20, 25, 20, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 139 ; HP + bigdw 139 ; Max HP + bigdw 139 ; Atk + bigdw 117 ; Def + bigdw 89 ; Spd + bigdw 82 ; SAtk + bigdw 102 ; SDef + db "HAtuSAMU@@@" + + dw DUGTRIO + db KINGS_ROCK + dw EARTHQUAKE, HYPER_BEAM, SLUDGE_BOMB, MUD_SLAP + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 14, 11, 11 ; DVs + db 10, 5, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 108 ; HP + bigdw 108 ; Max HP + bigdw 103 ; Atk + bigdw 78 ; Def + bigdw 131 ; Spd + bigdw 75 ; SAtk + bigdw 91 ; SDef + db "DAGUTORIO@@" + + dw SLOWBRO + db MIRACLEBERRY + dw SURF, PSYCHIC_M, EARTHQUAKE, BLIZZARD + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 50000 + dn 11, 15, 12, 15 ; DVs + db 15, 10, 10, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 157 ; HP + bigdw 157 ; Max HP + bigdw 95 ; Atk + bigdw 126 ; Def + bigdw 60 ; Spd + bigdw 119 ; SAtk + bigdw 103 ; SDef + db "YADORAN@@@@" + + dw PORYGON2 + db NO_ITEM + dw CONVERSION2, CONVERSION, PSYBEAM, THIEF + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 11, 12, 14, 15 ; DVs + db 30, 30, 20, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 147 ; HP + bigdw 147 ; Max HP + bigdw 99 ; Atk + bigdw 108 ; Def + bigdw 86 ; Spd + bigdw 123 ; SAtk + bigdw 115 ; SDef + db "PORIGON2@@@" + + dw ARCANINE + db CHARCOAL + dw FLAME_WHEEL, LEER, BODY_SLAM, ROAR + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 14, 11, 11 ; DVs + db 25, 30, 15, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 152 ; HP + bigdw 152 ; Max HP + bigdw 127 ; Atk + bigdw 102 ; Def + bigdw 111 ; Spd + bigdw 115 ; SAtk + bigdw 99 ; SDef + db "UINDEi@@@@@" + + dw FORRETRESS + db LEFTOVERS + dw RAPID_SPIN, PROTECT, TOXIC, SANDSTORM + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 10, 7, 15 ; DVs + db 40, 10, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 140 ; HP + bigdw 140 ; Max HP + bigdw 111 ; Atk + bigdw 147 ; Def + bigdw 64 ; Spd + bigdw 87 ; SAtk + bigdw 87 ; SDef + db "HUoRETOSU@@" + + dw OMASTAR + db GOLD_BERRY + dw CURSE, WATER_GUN, ANCIENTPOWER, ROCK_SMASH + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 14, 15, 15, 7 ; DVs + db 10, 25, 5, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 133 ; HP + bigdw 133 ; Max HP + bigdw 86 ; Atk + bigdw 139 ; Def + bigdw 83 ; Spd + bigdw 124 ; SAtk + bigdw 88 ; SDef + db "OMUSUTA-@@@" + + dw CHARIZARD + db KINGS_ROCK + dw FIRE_SPIN, DRAGON_RAGE, FLY, SLASH + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 14, 15, 14 ; DVs + db 15, 10, 15, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 142 ; HP + bigdw 142 ; Max HP + bigdw 106 ; Atk + bigdw 100 ; Def + bigdw 119 ; Spd + bigdw 125 ; SAtk + bigdw 106 ; SDef + db "RIZA-DON@@@" + + dw EXEGGUTOR + db BRIGHTPOWDER + dw EGG_BOMB, STOMP, PSYCH_UP, CONFUSION + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 7, 14, 7 ; DVs + db 10, 20, 10, 25 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 158 ; HP + bigdw 158 ; Max HP + bigdw 115 ; Atk + bigdw 100 ; Def + bigdw 82 ; Spd + bigdw 132 ; SAtk + bigdw 84 ; SDef + db "NAtuSI-@@@@" + + dw HYPNO + db BRIGHTPOWDER + dw CONFUSION, THUNDERPUNCH, HEADBUTT, DISABLE + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 7, 7, 7, 10 ; DVs + db 25, 15, 15, 20 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 146 ; HP + bigdw 146 ; Max HP + bigdw 86 ; Atk + bigdw 83 ; Def + bigdw 81 ; Spd + bigdw 88 ; SAtk + bigdw 122 ; SDef + db "SURI-PA-@@@" + + dw MUK + db QUICK_CLAW + dw SCREECH, TOXIC, SLUDGE, HARDEN + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 7, 5, 6, 11 ; DVs + db 40, 10, 20, 30 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 161 ; HP + bigdw 161 ; Max HP + bigdw 111 ; Atk + bigdw 86 ; Def + bigdw 67 ; Spd + bigdw 83 ; SAtk + bigdw 111 ; SDef + db "BETOBETON@@" + + dw ELECTABUZZ + db KINGS_ROCK + dw LIGHT_SCREEN, THUNDERPUNCH, SWIFT, SNORE + + dw 0 ; OT ID + dt 64000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 6, 5, 7, 7 ; DVs + db 30, 15, 20, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 40 ; Level + db 0, 0 ; Status + bigdw 124 ; HP + bigdw 124 ; Max HP + bigdw 93 ; Atk + bigdw 71 ; Def + bigdw 111 ; Spd + bigdw 103 ; SAtk + bigdw 95 ; SDef + db "EREBU-@@@@@" + + +; BattleTowerMons group 5 + + dw KINGDRA + db GOLD_BERRY + dw SURF, HYPER_BEAM, BLIZZARD, DRAGONBREATH + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 55000 + bigdw 60000 + bigdw 50000 + bigdw 55000 + dn 13, 13, 15, 15 ; DVs + db 15, 5, 5, 20 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 179 ; HP + bigdw 179 ; Max HP + bigdw 142 ; Atk + bigdw 143 ; Def + bigdw 132 ; Spd + bigdw 144 ; SAtk + bigdw 144 ; SDef + db "KINGUDORA@@" + + dw HOUNDOOM + db MIRACLEBERRY + dw REST, CRUNCH, DREAM_EATER, FLAMETHROWER + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 50000 + bigdw 60000 + bigdw 60000 + bigdw 60000 + dn 13, 13, 15, 12 ; DVs + db 10, 15, 15, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 178 ; HP + bigdw 178 ; Max HP + bigdw 135 ; Atk + bigdw 98 ; Def + bigdw 145 ; Spd + bigdw 157 ; SAtk + bigdw 127 ; SDef + db "HERUGA-@@@@" + + dw SHUCKLE + db LEFTOVERS + dw SANDSTORM, REST, TOXIC, WRAP + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 60000 + bigdw 60000 + bigdw 60000 + bigdw 60000 + bigdw 55000 + dn 15, 13, 12, 15 ; DVs + db 10, 10, 10, 20 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 123 ; HP + bigdw 123 ; Max HP + bigdw 60 ; Atk + bigdw 278 ; Def + bigdw 52 ; Spd + bigdw 59 ; SAtk + bigdw 279 ; SDef + db "TUBOTUBO@@@" + + dw SNORLAX + db LEFTOVERS + dw HYPER_BEAM, EARTHQUAKE, SURF, PSYCH_UP + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 60000 + bigdw 55000 + bigdw 55000 + bigdw 60000 + bigdw 55000 + dn 15, 13, 14, 15 ; DVs + db 5, 10, 15, 10 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 263 ; HP + bigdw 263 ; Max HP + bigdw 159 ; Atk + bigdw 112 ; Def + bigdw 79 ; Spd + bigdw 114 ; SAtk + bigdw 159 ; SDef + db "KABIGON@@@@" + + dw LAPRAS + db GOLD_BERRY + dw THUNDERBOLT, SURF, CONFUSE_RAY, BLIZZARD + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 60000 + bigdw 60000 + bigdw 55000 + bigdw 60000 + dn 13, 13, 13, 13 ; DVs + db 15, 15, 10, 5 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 234 ; HP + bigdw 234 ; Max HP + bigdw 133 ; Atk + bigdw 128 ; Def + bigdw 107 ; Spd + bigdw 133 ; SAtk + bigdw 143 ; SDef + db "RAPURASU@@@" + + dw JOLTEON + db KINGS_ROCK + dw THUNDERBOLT, THUNDER_WAVE, SHADOW_BALL, HIDDEN_POWER + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 60000 + bigdw 57000 + bigdw 55000 + bigdw 55000 + dn 14, 13, 15, 15 ; DVs + db 15, 20, 15, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 161 ; HP + bigdw 161 ; Max HP + bigdw 114 ; Atk + bigdw 107 ; Def + bigdw 179 ; Spd + bigdw 159 ; SAtk + bigdw 144 ; SDef + db "SANDA-SU@@@" + + dw SCIZOR + db LEFTOVERS + dw HYPER_BEAM, SLASH, AGILITY, METAL_CLAW + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 45000 + dn 13, 15, 14, 13 ; DVs + db 5, 20, 30, 35 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 169 ; HP + bigdw 169 ; Max HP + bigdw 175 ; Atk + bigdw 145 ; Def + bigdw 111 ; Spd + bigdw 99 ; SAtk + bigdw 124 ; SDef + db "HAtuSAMU@@@" + + dw SLOWKING + db MINT_BERRY + dw REST, SURF, PSYCHIC_M, AMNESIA + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 40000 + bigdw 45000 + bigdw 50000 + bigdw 50000 + dn 13, 15, 13, 14 ; DVs + db 10, 15, 10, 20 ; PP + db 15 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 196 ; HP + bigdw 196 ; Max HP + bigdw 118 ; Atk + bigdw 126 ; Def + bigdw 75 ; Spd + bigdw 146 ; SAtk + bigdw 156 ; SDef + db "YADOKINGU@@" + + dw MACHAMP + db GOLD_BERRY + dw CROSS_CHOP, EARTHQUAKE, FIRE_BLAST, THUNDERPUNCH + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 45000 + bigdw 50000 + bigdw 40000 + bigdw 44000 + dn 15, 15, 14, 12 ; DVs + db 5, 10, 5, 15 ; PP + db 13 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 187 ; HP + bigdw 187 ; Max HP + bigdw 176 ; Atk + bigdw 127 ; Def + bigdw 99 ; Spd + bigdw 108 ; SAtk + bigdw 128 ; SDef + db "KAIRIKI-@@@" + + dw STARMIE + db SCOPE_LENS + dw THUNDER_WAVE, RECOVER, THUNDERBOLT, SURF + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 44000 + bigdw 40000 + bigdw 45000 + bigdw 40000 + dn 15, 15, 15, 15 ; DVs + db 20, 20, 15, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 161 ; HP + bigdw 161 ; Max HP + bigdw 121 ; Atk + bigdw 130 ; Def + bigdw 161 ; Spd + bigdw 145 ; SAtk + bigdw 130 ; SDef + db "SUTA-MI-@@@" + + dw DUGTRIO + db KINGS_ROCK + dw EARTHQUAKE, SLASH, HYPER_BEAM, SLUDGE_BOMB + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 40000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + dn 15, 7, 15, 14 ; DVs + db 10, 20, 5, 10 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 135 ; HP + bigdw 135 ; Max HP + bigdw 125 ; Atk + bigdw 89 ; Def + bigdw 166 ; Spd + bigdw 96 ; SAtk + bigdw 116 ; SDef + db "DAGUTORIO@@" + + dw ELECTRODE + db MIRACLEBERRY + dw THUNDERBOLT, EXPLOSION, MIRROR_COAT, REST + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 54000 + bigdw 40000 + bigdw 50000 + dn 7, 13, 15, 14 ; DVs + db 15, 5, 20, 10 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 161 ; HP + bigdw 161 ; Max HP + bigdw 88 ; Atk + bigdw 117 ; Def + bigdw 185 ; Spd + bigdw 126 ; SAtk + bigdw 126 ; SDef + db "MARUMAIN@@@" + + dw AERODACTYL + db KINGS_ROCK + dw HYPER_BEAM, EARTHQUAKE, FIRE_BLAST, IRON_TAIL + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 45000 + dn 15, 13, 13, 13 ; DVs + db 5, 10, 5, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 181 ; HP + bigdw 181 ; Max HP + bigdw 152 ; Atk + bigdw 110 ; Def + bigdw 174 ; Spd + bigdw 104 ; SAtk + bigdw 119 ; SDef + db "PUTERA@@@@@" + + dw CROBAT + db LEFTOVERS + dw CONFUSE_RAY, ATTRACT, HYPER_BEAM, TOXIC + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 40000 + bigdw 50000 + bigdw 40000 + bigdw 50000 + dn 14, 15, 15, 15 ; DVs + db 10, 15, 5, 10 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 178 ; HP + bigdw 178 ; Max HP + bigdw 134 ; Atk + bigdw 127 ; Def + bigdw 175 ; Spd + bigdw 117 ; SAtk + bigdw 127 ; SDef + db "KUROBAtuTO@" + + dw ZAPDOS + db MIRACLEBERRY + dw DRILL_PECK, THUNDERBOLT, THUNDER_WAVE, HYPER_BEAM + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 45000 + bigdw 40000 + bigdw 50000 + dn 15, 13, 13, 14 ; DVs + db 20, 15, 20, 5 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 190 ; HP + bigdw 190 ; Max HP + bigdw 137 ; Atk + bigdw 129 ; Def + bigdw 143 ; Spd + bigdw 171 ; SAtk + bigdw 136 ; SDef + db "SANDA-@@@@@" + + dw SKARMORY + db GOLD_BERRY + dw SANDSTORM, FLY, STEEL_WING, TOXIC + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 40000 + dn 13, 7, 14, 13 ; DVs + db 10, 15, 25, 10 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 164 ; HP + bigdw 164 ; Max HP + bigdw 125 ; Atk + bigdw 179 ; Def + bigdw 116 ; Spd + bigdw 83 ; SAtk + bigdw 113 ; SDef + db "EA-MUDO@@@@" + + dw FORRETRESS + db LEFTOVERS + dw SANDSTORM, TOXIC, EXPLOSION, SWAGGER + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 55000 + bigdw 45000 + bigdw 40000 + dn 12, 15, 13, 13 ; DVs + db 10, 10, 5, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 169 ; HP + bigdw 169 ; Max HP + bigdw 134 ; Atk + bigdw 189 ; Def + bigdw 84 ; Spd + bigdw 103 ; SAtk + bigdw 103 ; SDef + db "HUoRETOSU@@" + + dw STEELIX + db MIRACLEBERRY + dw SANDSTORM, IRON_TAIL, REST, EARTHQUAKE + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 40000 + bigdw 45000 + dn 13, 13, 13, 13 ; DVs + db 10, 15, 10, 10 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 176 ; HP + bigdw 176 ; Max HP + bigdw 130 ; Atk + bigdw 245 ; Def + bigdw 73 ; Spd + bigdw 99 ; SAtk + bigdw 109 ; SDef + db "HAGANE-RU@@" + + dw GIRAFARIG + db SCOPE_LENS + dw DREAM_EATER, CRUNCH, PSYCHIC_M, EARTHQUAKE + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 40000 + bigdw 40000 + bigdw 40000 + bigdw 40000 + dn 4, 5, 5, 6 ; DVs + db 15, 15, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 161 ; HP + bigdw 161 ; Max HP + bigdw 114 ; Atk + bigdw 100 ; Def + bigdw 120 ; Spd + bigdw 126 ; SAtk + bigdw 101 ; SDef + db "KIRINRIKI@@" + + dw GYARADOS + db MIRACLEBERRY + dw HYPER_BEAM, SURF, RAIN_DANCE, ZAP_CANNON + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 40000 + bigdw 40000 + bigdw 40000 + bigdw 40000 + dn 7, 5, 6, 5 ; DVs + db 5, 15, 5, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 193 ; HP + bigdw 193 ; Max HP + bigdw 162 ; Atk + bigdw 114 ; Def + bigdw 117 ; Spd + bigdw 95 ; SAtk + bigdw 135 ; SDef + db "GIyaRADOSU@" + + dw ARTICUNO + db GOLD_BERRY + dw BLIZZARD, HYPER_BEAM, ROAR, ICY_WIND + + dw 0 ; OT ID + dt 125000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 40000 + bigdw 40000 + bigdw 40000 + bigdw 40000 + dn 4, 5, 5, 6 ; DVs + db 5, 5, 20, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 50 ; Level + db 0, 0 ; Status + bigdw 181 ; HP + bigdw 181 ; Max HP + bigdw 119 ; Atk + bigdw 135 ; Def + bigdw 120 ; Spd + bigdw 131 ; SAtk + bigdw 161 ; SDef + db "HURI-ZA-@@@" + + +; BattleTowerMons group 6 + + dw KINGDRA + db LEFTOVERS + dw DRAGONBREATH, SURF, HYPER_BEAM, BLIZZARD + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 55000 + bigdw 50000 + bigdw 60000 + bigdw 60000 + dn 13, 13, 15, 14 ; DVs + db 20, 15, 5, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 211 ; HP + bigdw 211 ; Max HP + bigdw 169 ; Atk + bigdw 167 ; Def + bigdw 161 ; Spd + bigdw 172 ; SAtk + bigdw 172 ; SDef + db "KINGUDORA@@" + + dw TYRANITAR + db GOLD_BERRY + dw CRUNCH, EARTHQUAKE, ROCK_SLIDE, HYPER_BEAM + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 60000 + bigdw 55000 + bigdw 60000 + bigdw 55000 + dn 15, 13, 14, 13 ; DVs + db 15, 10, 10, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 240 ; HP + bigdw 240 ; Max HP + bigdw 220 ; Atk + bigdw 187 ; Def + bigdw 131 ; Spd + bigdw 169 ; SAtk + bigdw 175 ; SDef + db "BANGIRASU@@" + + dw HOUNDOOM + db MIRACLEBERRY + dw FLAMETHROWER, CRUNCH, DREAM_EATER, REST + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 60000 + bigdw 55000 + bigdw 55000 + bigdw 60000 + bigdw 55000 + dn 15, 11, 14, 15 ; DVs + db 15, 15, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 212 ; HP + bigdw 212 ; Max HP + bigdw 165 ; Atk + bigdw 113 ; Def + bigdw 172 ; Spd + bigdw 189 ; SAtk + bigdw 153 ; SDef + db "HERUGA-@@@@" + + dw PORYGON2 + db LEFTOVERS + dw BLIZZARD, RECOVER, TOXIC, PSYCHIC_M + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 55000 + dn 13, 13, 13, 14 ; DVs + db 5, 20, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 223 ; HP + bigdw 223 ; Max HP + bigdw 149 ; Atk + bigdw 161 ; Def + bigdw 125 ; Spd + bigdw 182 ; SAtk + bigdw 170 ; SDef + db "PORIGON2@@@" + + dw MACHAMP + db QUICK_CLAW + dw FIRE_PUNCH, CROSS_CHOP, THUNDERPUNCH, EARTHQUAKE + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 50000 + dn 15, 13, 14, 15 ; DVs + db 15, 5, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 226 ; HP + bigdw 226 ; Max HP + bigdw 212 ; Atk + bigdw 148 ; Def + bigdw 120 ; Spd + bigdw 134 ; SAtk + bigdw 158 ; SDef + db "KAIRIKI-@@@" + + dw ZAPDOS + db MINT_BERRY + dw REST, DRILL_PECK, THUNDERBOLT, THUNDER_WAVE + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + dn 13, 13, 15, 13 ; DVs + db 10, 20, 15, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 229 ; HP + bigdw 229 ; Max HP + bigdw 160 ; Atk + bigdw 155 ; Def + bigdw 177 ; Spd + bigdw 203 ; SAtk + bigdw 161 ; SDef + db "SANDA-@@@@@" + + dw WOBBUFFET + db GOLD_BERRY + dw COUNTER, MIRROR_COAT, DESTINY_BOND, SAFEGUARD + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 45000 + dn 15, 13, 14, 13 ; DVs + db 20, 20, 5, 25 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 346 ; HP + bigdw 346 ; Max HP + bigdw 95 ; Atk + bigdw 122 ; Def + bigdw 94 ; Spd + bigdw 92 ; SAtk + bigdw 122 ; SDef + db "SO-NANSU@@@" + + dw AERODACTYL + db LEFTOVERS + dw HYPER_BEAM, SUPERSONIC, EARTHQUAKE, BITE + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 45000 + dn 15, 13, 13, 13 ; DVs + db 5, 20, 10, 25 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 215 ; HP + bigdw 215 ; Max HP + bigdw 182 ; Atk + bigdw 131 ; Def + bigdw 208 ; Spd + bigdw 124 ; SAtk + bigdw 142 ; SDef + db "PUTERA@@@@@" + + dw DRAGONITE + db MIRACLEBERRY + dw HYPER_BEAM, ICY_WIND, THUNDERBOLT, SURF + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 45000 + dn 13, 13, 15, 13 ; DVs + db 5, 15, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 229 ; HP + bigdw 229 ; Max HP + bigdw 214 ; Atk + bigdw 164 ; Def + bigdw 152 ; Spd + bigdw 172 ; SAtk + bigdw 172 ; SDef + db "KAIRIyu-@@@" + + dw UMBREON + db GOLD_BERRY + dw MUD_SLAP, MOONLIGHT, PSYCHIC_M, FAINT_ATTACK + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 13, 14, 15 ; DVs + db 10, 5, 10, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 232 ; HP + bigdw 232 ; Max HP + bigdw 134 ; Atk + bigdw 185 ; Def + bigdw 132 ; Spd + bigdw 128 ; SAtk + bigdw 212 ; SDef + db "BURAtuKI-@@" + + dw ARCANINE + db CHARCOAL + dw FLAMETHROWER, CRUNCH, EXTREMESPEED, IRON_TAIL + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 50000 + bigdw 40000 + bigdw 55000 + bigdw 50000 + dn 15, 13, 14, 13 ; DVs + db 15, 15, 5, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 228 ; HP + bigdw 228 ; Max HP + bigdw 188 ; Atk + bigdw 146 ; Def + bigdw 170 ; Spd + bigdw 173 ; SAtk + bigdw 149 ; SDef + db "UINDEi@@@@@" + + dw SKARMORY + db MIRACLEBERRY + dw STEEL_WING, FLY, TOXIC, PROTECT + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 50000 + dn 15, 11, 14, 11 ; DVs + db 25, 15, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 196 ; HP + bigdw 196 ; Max HP + bigdw 152 ; Atk + bigdw 218 ; Def + bigdw 138 ; Spd + bigdw 99 ; SAtk + bigdw 135 ; SDef + db "EA-MUDO@@@@" + + dw BLISSEY + db LEFTOVERS + dw SOFTBOILED, TOXIC, PROTECT, PSYCHIC_M + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + dn 15, 11, 12, 13 ; DVs + db 10, 10, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 424 ; HP + bigdw 424 ; Max HP + bigdw 66 ; Atk + bigdw 63 ; Def + bigdw 117 ; Spd + bigdw 143 ; SAtk + bigdw 215 ; SDef + db "HAPINASU@@@" + + dw SNORLAX + db PINK_BOW + dw ROCK_SLIDE, SURF, BODY_SLAM, EARTHQUAKE + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 10, 15, 12 ; DVs + db 10, 15, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 307 ; HP + bigdw 307 ; Max HP + bigdw 186 ; Atk + bigdw 128 ; Def + bigdw 92 ; Spd + bigdw 130 ; SAtk + bigdw 184 ; SDef + db "KABIGON@@@@" + + dw HERACROSS + db FOCUS_BAND + dw REVERSAL, MEGAHORN, EARTHQUAKE, COUNTER + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 13, 15, 14, 13 ; DVs + db 15, 10, 10, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 214 ; HP + bigdw 214 ; Max HP + bigdw 200 ; Atk + bigdw 146 ; Def + bigdw 156 ; Spd + bigdw 101 ; SAtk + bigdw 167 ; SDef + db "HERAKUROSU@" + + dw JYNX + db MIRACLEBERRY + dw BLIZZARD, PSYCHIC_M, SHADOW_BALL, ICY_WIND + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 15, 14, 11 ; DVs + db 5, 10, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 196 ; HP + bigdw 196 ; Max HP + bigdw 116 ; Atk + bigdw 98 ; Def + bigdw 168 ; Spd + bigdw 189 ; SAtk + bigdw 165 ; SDef + db "RU-ZIyuRA@@" + + dw BLASTOISE + db GOLD_BERRY + dw SURF, EARTHQUAKE, RAPID_SPIN, BLIZZARD + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 14, 15, 14 ; DVs + db 15, 10, 40, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 209 ; HP + bigdw 209 ; Max HP + bigdw 155 ; Atk + bigdw 174 ; Def + bigdw 149 ; Spd + bigdw 156 ; SAtk + bigdw 180 ; SDef + db "KAMEtuKUSU@" + + dw RHYDON + db QUICK_CLAW + dw EARTHQUAKE, SURF, IRON_TAIL, ROCK_SLIDE + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 11, 15, 10 ; DVs + db 10, 15, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 245 ; HP + bigdw 245 ; Max HP + bigdw 212 ; Atk + bigdw 195 ; Def + bigdw 104 ; Spd + bigdw 104 ; SAtk + bigdw 104 ; SDef + db "SAIDON@@@@@" + + dw SANDSLASH + db SCOPE_LENS + dw EARTHQUAKE, SLASH, HYPER_BEAM, SNORE + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 11, 7, 6, 7 ; DVs + db 10, 20, 5, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 201 ; HP + bigdw 201 ; Max HP + bigdw 164 ; Atk + bigdw 171 ; Def + bigdw 116 ; Spd + bigdw 93 ; SAtk + bigdw 105 ; SDef + db "SANDOPAN@@@" + + dw PARASECT + db GOLD_BERRY + dw SPORE, GIGA_DRAIN, HYPER_BEAM, SLUDGE_BOMB + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 6, 6, 5, 15 ; DVs + db 15, 5, 5, 10 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 171 ; HP + bigdw 171 ; Max HP + bigdw 152 ; Atk + bigdw 134 ; Def + bigdw 72 ; Spd + bigdw 120 ; SAtk + bigdw 144 ; SDef + db "PARASEKUTO@" + + dw GOLEM + db BRIGHTPOWDER + dw EXPLOSION, EARTHQUAKE, FIRE_PUNCH, FRUSTRATION + + dw 0 ; OT ID + dt 216000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 7, 6, 5, 7 ; DVs + db 5, 10, 15, 20 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 60 ; Level + db 0, 0 ; Status + bigdw 205 ; HP + bigdw 205 ; Max HP + bigdw 171 ; Atk + bigdw 194 ; Def + bigdw 90 ; Spd + bigdw 105 ; SAtk + bigdw 117 ; SDef + db "GORO-NIya@@" + + +; BattleTowerMons group 7 + + dw JOLTEON + db MIRACLEBERRY + dw THUNDERBOLT, HYPER_BEAM, SHADOW_BALL, ROAR + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 60000 + bigdw 56000 + bigdw 55000 + bigdw 50000 + bigdw 60000 + dn 15, 11, 14, 15 ; DVs + db 15, 5, 15, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 231 ; HP + bigdw 231 ; Max HP + bigdw 158 ; Atk + bigdw 145 ; Def + bigdw 245 ; Spd + bigdw 222 ; SAtk + bigdw 201 ; SDef + db "SANDA-SU@@@" + + dw VAPOREON + db LEFTOVERS + dw BLIZZARD, SHADOW_BALL, SURF, MUD_SLAP + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 60000 + bigdw 60000 + bigdw 50000 + dn 11, 15, 14, 15 ; DVs + db 5, 15, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 318 ; HP + bigdw 318 ; Max HP + bigdw 149 ; Atk + bigdw 152 ; Def + bigdw 158 ; Spd + bigdw 218 ; SAtk + bigdw 197 ; SDef + db "SIyaWA-ZU@@" + + dw UMBREON + db GOLD_BERRY + dw FAINT_ATTACK, MOONLIGHT, PSYCH_UP, TOXIC + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 54000 + bigdw 60000 + bigdw 55000 + bigdw 50000 + bigdw 58000 + dn 13, 13, 13, 13 ; DVs + db 20, 5, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 274 ; HP + bigdw 274 ; Max HP + bigdw 156 ; Atk + bigdw 217 ; Def + bigdw 152 ; Spd + bigdw 149 ; SAtk + bigdw 247 ; SDef + db "BURAtuKI-@@" + + dw BLISSEY + db GOLD_BERRY + dw COUNTER, SOFTBOILED, SHADOW_BALL, THUNDERBOLT + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 55000 + bigdw 55000 + bigdw 58000 + bigdw 50000 + dn 13, 15, 14, 13 ; DVs + db 20, 10, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 495 ; HP + bigdw 495 ; Max HP + bigdw 77 ; Atk + bigdw 80 ; Def + bigdw 143 ; Spd + bigdw 166 ; SAtk + bigdw 250 ; SDef + db "HAPINASU@@@" + + dw SNORLAX + db LEFTOVERS + dw ROCK_SLIDE, EARTHQUAKE, BLIZZARD, SHADOW_BALL + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 55000 + bigdw 60000 + bigdw 55000 + bigdw 50000 + dn 13, 13, 13, 13 ; DVs + db 10, 10, 5, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 365 ; HP + bigdw 365 ; Max HP + bigdw 217 ; Atk + bigdw 156 ; Def + bigdw 105 ; Spd + bigdw 152 ; SAtk + bigdw 215 ; SDef + db "KABIGON@@@@" + + dw HOUNDOOM + db KINGS_ROCK + dw CRUNCH, FLAMETHROWER, FAINT_ATTACK, ROAR + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 58000 + bigdw 50000 + bigdw 55000 + bigdw 60000 + bigdw 55000 + dn 13, 13, 12, 13 ; DVs + db 15, 15, 20, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 245 ; HP + bigdw 245 ; Max HP + bigdw 187 ; Atk + bigdw 133 ; Def + bigdw 197 ; Spd + bigdw 217 ; SAtk + bigdw 175 ; SDef + db "HERUGA-@@@@" + + dw TYRANITAR + db LEFTOVERS + dw EARTHQUAKE, CRUNCH, ROCK_SLIDE, HYPER_BEAM + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 45000 + bigdw 50000 + bigdw 45000 + dn 13, 11, 13, 15 ; DVs + db 10, 15, 10, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 279 ; HP + bigdw 279 ; Max HP + bigdw 247 ; Atk + bigdw 211 ; Def + bigdw 147 ; Spd + bigdw 196 ; SAtk + bigdw 203 ; SDef + db "BANGIRASU@@" + + dw ZAPDOS + db GOLD_BERRY + dw THUNDERBOLT, DRILL_PECK, THUNDER_WAVE, HYPER_BEAM + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 45000 + dn 13, 11, 13, 15 ; DVs + db 15, 20, 20, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 264 ; HP + bigdw 264 ; Max HP + bigdw 187 ; Atk + bigdw 177 ; Def + bigdw 200 ; Spd + bigdw 238 ; SAtk + bigdw 189 ; SDef + db "SANDA-@@@@@" + + dw EXEGGUTOR + db MIRACLEBERRY + dw REST, EXPLOSION, PSYCHIC_M, GIGA_DRAIN + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 45000 + dn 13, 13, 14, 13 ; DVs + db 10, 5, 10, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 268 ; HP + bigdw 268 ; Max HP + bigdw 194 ; Atk + bigdw 177 ; Def + bigdw 140 ; Spd + bigdw 235 ; SAtk + bigdw 151 ; SDef + db "NAtuSI-@@@@" + + dw UMBREON + db GOLD_BERRY + dw MOONLIGHT, FAINT_ATTACK, PSYCHIC_M, SHADOW_BALL + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 45000 + bigdw 50000 + dn 15, 13, 14, 11 ; DVs + db 5, 20, 10, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 269 ; HP + bigdw 269 ; Max HP + bigdw 155 ; Atk + bigdw 214 ; Def + bigdw 152 ; Spd + bigdw 142 ; SAtk + bigdw 240 ; SDef + db "BURAtuKI-@@" + + dw GYARADOS + db BRIGHTPOWDER + dw SURF, THUNDERBOLT, HYPER_BEAM, ROAR + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 45000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + dn 13, 11, 14, 15 ; DVs + db 15, 15, 5, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 271 ; HP + bigdw 271 ; Max HP + bigdw 235 ; Atk + bigdw 169 ; Def + bigdw 178 ; Spd + bigdw 148 ; SAtk + bigdw 204 ; SDef + db "GIyaRADOSU@" + + dw QUAGSIRE + db MIRACLEBERRY + dw EARTHQUAKE, SURF, SLUDGE_BOMB, IRON_TAIL + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 50000 + dn 13, 14, 13, 13 ; DVs + db 10, 15, 10, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 266 ; HP + bigdw 266 ; Max HP + bigdw 180 ; Atk + bigdw 180 ; Def + bigdw 110 ; Spd + bigdw 152 ; SAtk + bigdw 152 ; SDef + db "NUO-@@@@@@@" + + dw URSARING + db SCOPE_LENS + dw SLASH, EARTHQUAKE, HYPER_BEAM, THUNDERPUNCH + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + dn 15, 13, 14, 13 ; DVs + db 20, 10, 5, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 262 ; HP + bigdw 262 ; Max HP + bigdw 245 ; Atk + bigdw 166 ; Def + bigdw 138 ; Spd + bigdw 166 ; SAtk + bigdw 166 ; SDef + db "RINGUMA@@@@" + + dw MR__MIME + db KINGS_ROCK + dw REFLECT, FIRE_PUNCH, PSYCHIC_M, ENCORE + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 45000 + bigdw 50000 + bigdw 50000 + dn 11, 13, 15, 11 ; DVs + db 20, 15, 10, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 195 ; HP + bigdw 195 ; Max HP + bigdw 120 ; Atk + bigdw 151 ; Def + bigdw 190 ; Spd + bigdw 198 ; SAtk + bigdw 226 ; SDef + db "BARIYA-DO@@" + + dw PRIMEAPE + db QUICK_CLAW + dw CROSS_CHOP, ICE_PUNCH, THUNDERPUNCH, ROCK_SLIDE + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 11, 13, 14, 15 ; DVs + db 5, 15, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 227 ; HP + bigdw 227 ; Max HP + bigdw 202 ; Atk + bigdw 145 ; Def + bigdw 196 ; Spd + bigdw 148 ; SAtk + bigdw 162 ; SDef + db "OKORIZARU@@" + + dw GIRAFARIG + db GOLD_BERRY + dw AGILITY, BATON_PASS, CRUNCH, EARTHQUAKE + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 14, 15, 13 ; DVs + db 30, 40, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 231 ; HP + bigdw 231 ; Max HP + bigdw 176 ; Atk + bigdw 154 ; Def + bigdw 183 ; Spd + bigdw 187 ; SAtk + bigdw 152 ; SDef + db "KIRINRIKI@@" + + dw HITMONLEE + db FOCUS_BAND + dw REVERSAL, ENDURE, BODY_SLAM, MEGA_KICK + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 14, 15, 14 ; DVs + db 15, 10, 15, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 202 ; HP + bigdw 202 ; Max HP + bigdw 232 ; Atk + bigdw 137 ; Def + bigdw 186 ; Spd + bigdw 112 ; SAtk + bigdw 217 ; SDef + db "SAWAMURA-@@" + + dw HERACROSS + db BRIGHTPOWDER + dw REVERSAL, ENDURE, MEGAHORN, EARTHQUAKE + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 7, 15, 7 ; DVs + db 15, 10, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 251 ; HP + bigdw 251 ; Max HP + bigdw 239 ; Atk + bigdw 158 ; Def + bigdw 183 ; Spd + bigdw 109 ; SAtk + bigdw 186 ; SDef + db "HERAKUROSU@" + + dw VENUSAUR + db BRIGHTPOWDER + dw SUNNY_DAY, SOLARBEAM, SYNTHESIS, HYPER_BEAM + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 7, 6, 4, 4 ; DVs + db 5, 10, 5, 5 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 233 ; HP + bigdw 233 ; Max HP + bigdw 159 ; Atk + bigdw 159 ; Def + bigdw 152 ; Spd + bigdw 180 ; SAtk + bigdw 180 ; SDef + db "HUSIGIBANA@" + + dw CHARIZARD + db SCOPE_LENS + dw SLASH, EARTHQUAKE, HYPER_BEAM, FLAMETHROWER + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 5, 6, 4, 4 ; DVs + db 20, 10, 5, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 230 ; HP + bigdw 230 ; Max HP + bigdw 159 ; Atk + bigdw 152 ; Def + bigdw 180 ; Spd + bigdw 193 ; SAtk + bigdw 159 ; SDef + db "RIZA-DON@@@" + + dw BLASTOISE + db QUICK_CLAW + dw HYDRO_PUMP, ICE_PUNCH, HYPER_BEAM, IRON_TAIL + + dw 0 ; OT ID + dt 343000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 7, 6, 6, 4 ; DVs + db 5, 15, 5, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 70 ; Level + db 0, 0 ; Status + bigdw 231 ; HP + bigdw 231 ; Max HP + bigdw 161 ; Atk + bigdw 183 ; Def + bigdw 152 ; Spd + bigdw 159 ; SAtk + bigdw 187 ; SDef + db "KAMEtuKUSU@" + + +; BattleTowerMons group 8 + + dw JOLTEON + db MIRACLEBERRY + dw THUNDER_WAVE, THUNDERBOLT, IRON_TAIL, ROAR + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 60000 + bigdw 55000 + bigdw 60000 + bigdw 55000 + bigdw 55000 + dn 15, 13, 14, 11 ; DVs + db 20, 15, 15, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 263 ; HP + bigdw 263 ; Max HP + bigdw 179 ; Atk + bigdw 170 ; Def + bigdw 281 ; Spd + bigdw 245 ; SAtk + bigdw 221 ; SDef + db "SANDA-SU@@@" + + dw SNORLAX + db LEFTOVERS + dw REST, BELLY_DRUM, SNORE, EARTHQUAKE + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 60000 + bigdw 55000 + bigdw 50000 + bigdw 55500 + bigdw 60000 + dn 13, 11, 14, 13 ; DVs + db 10, 10, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 415 ; HP + bigdw 415 ; Max HP + bigdw 248 ; Atk + bigdw 170 ; Def + bigdw 121 ; Spd + bigdw 178 ; SAtk + bigdw 250 ; SDef + db "KABIGON@@@@" + + dw HOUNDOOM + db MINT_BERRY + dw REST, CRUNCH, FLAMETHROWER, SUNNY_DAY + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 50000 + bigdw 55000 + bigdw 55000 + bigdw 55000 + dn 15, 13, 13, 11 ; DVs + db 10, 15, 15, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 280 ; HP + bigdw 280 ; Max HP + bigdw 217 ; Atk + bigdw 152 ; Def + bigdw 224 ; Spd + bigdw 245 ; SAtk + bigdw 197 ; SDef + db "HERUGA-@@@@" + + dw TAUROS + db GOLD_BERRY + dw EARTHQUAKE, BODY_SLAM, IRON_TAIL, HYPER_BEAM + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 30000 + bigdw 50000 + dn 15, 13, 13, 14 ; DVs + db 10, 15, 15, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 276 ; HP + bigdw 276 ; Max HP + bigdw 233 ; Atk + bigdw 221 ; Def + bigdw 236 ; Spd + bigdw 135 ; SAtk + bigdw 183 ; SDef + db "KENTAROSU@@" + + dw LAPRAS + db MINT_BERRY + dw REST, SURF, CONFUSE_RAY, PSYCHIC_M + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + dn 13, 15, 13, 11 ; DVs + db 10, 15, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 366 ; HP + bigdw 366 ; Max HP + bigdw 205 ; Atk + bigdw 201 ; Def + bigdw 168 ; Spd + bigdw 202 ; SAtk + bigdw 218 ; SDef + db "RAPURASU@@@" + + dw TYRANITAR + db MIRACLEBERRY + dw REST, CRUNCH, EARTHQUAKE, ROCK_SLIDE + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 55000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + dn 13, 15, 13, 11 ; DVs + db 10, 15, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 318 ; HP + bigdw 318 ; Max HP + bigdw 286 ; Atk + bigdw 249 ; Def + bigdw 169 ; Spd + bigdw 218 ; SAtk + bigdw 226 ; SDef + db "BANGIRASU@@" + + dw GENGAR + db NO_ITEM + dw THUNDERBOLT, SHADOW_BALL, CONFUSE_RAY, THIEF + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 55000 + bigdw 50000 + dn 13, 14, 13, 13 ; DVs + db 15, 15, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 247 ; HP + bigdw 247 ; Max HP + bigdw 173 ; Atk + bigdw 165 ; Def + bigdw 248 ; Spd + bigdw 277 ; SAtk + bigdw 189 ; SDef + db "GENGA-@@@@@" + + dw FORRETRESS + db LEFTOVERS + dw EXPLOSION, TOXIC, SOLARBEAM, SWAGGER + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + dn 15, 13, 14, 13 ; DVs + db 5, 10, 10, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 273 ; HP + bigdw 273 ; Max HP + bigdw 217 ; Atk + bigdw 293 ; Def + bigdw 133 ; Spd + bigdw 165 ; SAtk + bigdw 165 ; SDef + db "HUoRETOSU@@" + + dw KINGDRA + db MINT_BERRY + dw REST, SURF, BLIZZARD, DRAGONBREATH + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 40000 + bigdw 55000 + bigdw 50000 + dn 15, 11, 14, 13 ; DVs + db 10, 15, 5, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 273 ; HP + bigdw 273 ; Max HP + bigdw 225 ; Atk + bigdw 214 ; Def + bigdw 209 ; Spd + bigdw 221 ; SAtk + bigdw 221 ; SDef + db "KINGUDORA@@" + + dw DRAGONITE + db GOLD_BERRY + dw THUNDER_WAVE, SURF, THUNDERBOLT, OUTRAGE + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 45000 + dn 13, 13, 13, 13 ; DVs + db 20, 15, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 303 ; HP + bigdw 303 ; Max HP + bigdw 284 ; Atk + bigdw 221 ; Def + bigdw 197 ; Spd + bigdw 228 ; SAtk + bigdw 228 ; SDef + db "KAIRIyu-@@@" + + dw PORYGON2 + db LEFTOVERS + dw PSYCHIC_M, RECOVER, HYPER_BEAM, TRI_ATTACK + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 50000 + bigdw 40000 + bigdw 55000 + bigdw 50000 + dn 13, 15, 14, 13 ; DVs + db 10, 20, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 293 ; HP + bigdw 293 ; Max HP + bigdw 197 ; Atk + bigdw 213 ; Def + bigdw 169 ; Spd + bigdw 237 ; SAtk + bigdw 221 ; SDef + db "PORIGON2@@@" + + dw JYNX + db QUICK_CLAW + dw LOVELY_KISS, BLIZZARD, DREAM_EATER, PSYCHIC_M + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 50000 + dn 13, 15, 13, 15 ; DVs + db 10, 5, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 264 ; HP + bigdw 264 ; Max HP + bigdw 149 ; Atk + bigdw 127 ; Def + bigdw 221 ; Spd + bigdw 257 ; SAtk + bigdw 225 ; SDef + db "RU-ZIyuRA@@" + + dw MANTINE + db GOLD_BERRY + dw SURF, CONFUSE_RAY, BLIZZARD, WING_ATTACK + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 40000 + bigdw 45000 + bigdw 40000 + bigdw 45000 + bigdw 50000 + dn 13, 15, 13, 12 ; DVs + db 15, 10, 5, 35 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 256 ; HP + bigdw 256 ; Max HP + bigdw 132 ; Atk + bigdw 181 ; Def + bigdw 180 ; Spd + bigdw 196 ; SAtk + bigdw 292 ; SDef + db "MANTAIN@@@@" + + dw SKARMORY + db QUICK_CLAW + dw STEEL_WING, FLY, MUD_SLAP, TOXIC + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 35000 + bigdw 50000 + bigdw 50000 + dn 13, 13, 14, 15 ; DVs + db 25, 15, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 258 ; HP + bigdw 258 ; Max HP + bigdw 196 ; Atk + bigdw 286 ; Def + bigdw 183 ; Spd + bigdw 137 ; SAtk + bigdw 185 ; SDef + db "EA-MUDO@@@@" + + dw MOLTRES + db CHARCOAL + dw FLAMETHROWER, SKY_ATTACK, STEEL_WING, HYPER_BEAM + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 40000 + bigdw 50000 + dn 13, 13, 15, 14 ; DVs + db 15, 5, 25, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 300 ; HP + bigdw 300 ; Max HP + bigdw 225 ; Atk + bigdw 213 ; Def + bigdw 213 ; Spd + bigdw 271 ; SAtk + bigdw 207 ; SDef + db "HUaIYA-@@@@" + + dw AERODACTYL + db MIRACLEBERRY + dw HYPER_BEAM, REST, EARTHQUAKE, ROAR + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 40000 + bigdw 50000 + dn 15, 15, 14, 13 ; DVs + db 5, 10, 10, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 282 ; HP + bigdw 282 ; Max HP + bigdw 237 ; Atk + bigdw 177 ; Def + bigdw 275 ; Spd + bigdw 165 ; SAtk + bigdw 189 ; SDef + db "PUTERA@@@@@" + + dw ELECTRODE + db KINGS_ROCK + dw THUNDERBOLT, EXPLOSION, MIRROR_COAT, TOXIC + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 40000 + bigdw 40000 + bigdw 50000 + dn 15, 15, 14, 15 ; DVs + db 15, 5, 20, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 250 ; HP + bigdw 250 ; Max HP + bigdw 153 ; Atk + bigdw 181 ; Def + bigdw 291 ; Spd + bigdw 201 ; SAtk + bigdw 201 ; SDef + db "MARUMAIN@@@" + + dw DUGTRIO + db SCOPE_LENS + dw SLASH, EARTHQUAKE, THIEF, MUD_SLAP + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 40000 + dn 15, 13, 13, 13 ; DVs + db 20, 10, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 214 ; HP + bigdw 214 ; Max HP + bigdw 201 ; Atk + bigdw 145 ; Def + bigdw 261 ; Spd + bigdw 145 ; SAtk + bigdw 177 ; SDef + db "DAGUTORIO@@" + + dw VICTREEBEL + db QUICK_CLAW + dw GIGA_DRAIN, SLUDGE_BOMB, HYPER_BEAM, TOXIC + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 6, 5, 6, 5 ; DVs + db 5, 10, 5, 10 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 260 ; HP + bigdw 260 ; Max HP + bigdw 217 ; Atk + bigdw 151 ; Def + bigdw 161 ; Spd + bigdw 207 ; SAtk + bigdw 143 ; SDef + db "UTUBOtuTO@@" + + dw PINSIR + db GOLD_BERRY + dw HYPER_BEAM, SUBMISSION, STRENGTH, TOXIC + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 7, 4, 6, 4 ; DVs + db 5, 25, 15, 10 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 241 ; HP + bigdw 241 ; Max HP + bigdw 250 ; Atk + bigdw 205 ; Def + bigdw 185 ; Spd + bigdw 133 ; SAtk + bigdw 157 ; SDef + db "KAIROSU@@@@" + + dw GRANBULL + db BRIGHTPOWDER + dw ROAR, SHADOW_BALL, HYPER_BEAM, THUNDERPUNCH + + dw 0 ; OT ID + dt 512000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 7, 6, 5, 7 ; DVs + db 20, 15, 5, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 80 ; Level + db 0, 0 ; Status + bigdw 286 ; HP + bigdw 286 ; Max HP + bigdw 242 ; Atk + bigdw 169 ; Def + bigdw 119 ; Spd + bigdw 146 ; SAtk + bigdw 146 ; SDef + db "GURANBURU@@" + + +; BattleTowerMons group 9 + + dw UMBREON + db KINGS_ROCK + dw FAINT_ATTACK, MUD_SLAP, MOONLIGHT, CONFUSE_RAY + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 60000 + bigdw 60000 + bigdw 55000 + bigdw 60000 + bigdw 55000 + dn 15, 13, 14, 13 ; DVs + db 20, 10, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 349 ; HP + bigdw 349 ; Max HP + bigdw 203 ; Atk + bigdw 278 ; Def + bigdw 202 ; Spd + bigdw 188 ; SAtk + bigdw 314 ; SDef + db "BURAtuKI-@@" + + dw DRAGONITE + db QUICK_CLAW + dw FIRE_BLAST, HYPER_BEAM, OUTRAGE, BLIZZARD + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 65000 + bigdw 50000 + bigdw 56000 + bigdw 60000 + bigdw 60000 + dn 15, 13, 14, 13 ; DVs + db 5, 5, 15, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 343 ; HP + bigdw 343 ; Max HP + bigdw 322 ; Atk + bigdw 252 ; Def + bigdw 229 ; Spd + bigdw 263 ; SAtk + bigdw 263 ; SDef + db "KAIRIyu-@@@" + + dw STARMIE + db LEFTOVERS + dw RECOVER, THUNDERBOLT, SURF, PSYCHIC_M + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 60000 + bigdw 60000 + bigdw 60000 + bigdw 55000 + bigdw 60000 + dn 13, 15, 13, 13 ; DVs + db 20, 15, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 289 ; HP + bigdw 289 ; Max HP + bigdw 218 ; Atk + bigdw 239 ; Def + bigdw 287 ; Spd + bigdw 263 ; SAtk + bigdw 236 ; SDef + db "SUTA-MI-@@@" + + dw CLOYSTER + db LEFTOVERS + dw EXPLOSION, BLIZZARD, SURF, ICY_WIND + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 13, 11, 13, 15 ; DVs + db 5, 5, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 266 ; HP + bigdw 266 ; Max HP + bigdw 248 ; Atk + bigdw 398 ; Def + bigdw 203 ; Spd + bigdw 234 ; SAtk + bigdw 162 ; SDef + db "PARUSIeN@@@" + + dw CROBAT + db GOLD_BERRY + dw WING_ATTACK, HAZE, HYPER_BEAM, GIGA_DRAIN + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 13, 12, 15 ; DVs + db 35, 30, 5, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 325 ; HP + bigdw 325 ; Max HP + bigdw 243 ; Atk + bigdw 221 ; Def + bigdw 310 ; Spd + bigdw 207 ; SAtk + bigdw 225 ; SDef + db "KUROBAtuTO@" + + dw PORYGON2 + db QUICK_CLAW + dw TOXIC, PSYCHIC_M, RECOVER, PROTECT + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + dn 15, 13, 14, 13 ; DVs + db 10, 10, 20, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 325 ; HP + bigdw 325 ; Max HP + bigdw 223 ; Atk + bigdw 239 ; Def + bigdw 190 ; Spd + bigdw 266 ; SAtk + bigdw 248 ; SDef + db "PORIGON2@@@" + + dw KINGDRA + db LEFTOVERS + dw DRAGONBREATH, SURF, HYPER_BEAM, BLIZZARD + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + bigdw 45000 + dn 13, 15, 13, 14 ; DVs + db 20, 15, 5, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 309 ; HP + bigdw 309 ; Max HP + bigdw 248 ; Atk + bigdw 255 ; Def + bigdw 230 ; Spd + bigdw 248 ; SAtk + bigdw 248 ; SDef + db "KINGUDORA@@" + + dw TYRANITAR + db QUICK_CLAW + dw HYPER_BEAM, CRUNCH, EARTHQUAKE, ROCK_SLIDE + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 55000 + bigdw 50000 + bigdw 45000 + bigdw 50000 + dn 13, 15, 13, 14 ; DVs + db 5, 15, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 354 ; HP + bigdw 354 ; Max HP + bigdw 321 ; Atk + bigdw 279 ; Def + bigdw 185 ; Spd + bigdw 250 ; SAtk + bigdw 259 ; SDef + db "BANGIRASU@@" + + dw LAPRAS + db MINT_BERRY + dw REST, SURF, THUNDERBOLT, PSYCHIC_M + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 55000 + dn 11, 13, 14, 15 ; DVs + db 10, 15, 15, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 405 ; HP + bigdw 405 ; Max HP + bigdw 227 ; Atk + bigdw 221 ; Def + bigdw 187 ; Spd + bigdw 237 ; SAtk + bigdw 255 ; SDef + db "RAPURASU@@@" + + dw ESPEON + db GOLD_BERRY + dw PSYCHIC_M, SHADOW_BALL, SUNNY_DAY, MORNING_SUN + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 50000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + dn 13, 13, 15, 14 ; DVs + db 10, 15, 5, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 294 ; HP + bigdw 294 ; Max HP + bigdw 194 ; Atk + bigdw 185 ; Def + bigdw 282 ; Spd + bigdw 313 ; SAtk + bigdw 250 ; SDef + db "E-HUi@@@@@@" + + dw MACHAMP + db QUICK_CLAW + dw CROSS_CHOP, VITAL_THROW, FIRE_BLAST, EARTHQUAKE + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 55000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + dn 13, 13, 14, 13 ; DVs + db 5, 10, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 337 ; HP + bigdw 337 ; Max HP + bigdw 314 ; Atk + bigdw 221 ; Def + bigdw 181 ; Spd + bigdw 194 ; SAtk + bigdw 230 ; SDef + db "KAIRIKI-@@@" + + dw SNORLAX + db MIRACLEBERRY + dw FIRE_BLAST, SURF, EARTHQUAKE, HYPER_BEAM + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + bigdw 50000 + dn 15, 14, 15, 13 ; DVs + db 5, 15, 10, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 455 ; HP + bigdw 455 ; Max HP + bigdw 279 ; Atk + bigdw 199 ; Def + bigdw 135 ; Spd + bigdw 194 ; SAtk + bigdw 275 ; SDef + db "KABIGON@@@@" + + dw ARCANINE + db MINT_BERRY + dw SUNNY_DAY, FLAMETHROWER, EXTREMESPEED, REST + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 45000 + bigdw 55000 + dn 13, 15, 13, 14 ; DVs + db 5, 15, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 336 ; HP + bigdw 336 ; Max HP + bigdw 274 ; Atk + bigdw 225 ; Def + bigdw 247 ; Spd + bigdw 262 ; SAtk + bigdw 226 ; SDef + db "UINDEi@@@@@" + + dw BLISSEY + db LEFTOVERS + dw SOLARBEAM, SUNNY_DAY, SOFTBOILED, FIRE_BLAST + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 11, 13, 15, 14 ; DVs + db 10, 5, 10, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 633 ; HP + bigdw 633 ; Max HP + bigdw 90 ; Atk + bigdw 95 ; Def + bigdw 180 ; Spd + bigdw 214 ; SAtk + bigdw 322 ; SDef + db "HAPINASU@@@" + + dw HOUNDOOM + db BRIGHTPOWDER + dw FLAMETHROWER, CRUNCH, SUNNY_DAY, SOLARBEAM + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 13, 11, 15, 14 ; DVs + db 15, 15, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 309 ; HP + bigdw 309 ; Max HP + bigdw 235 ; Atk + bigdw 164 ; Def + bigdw 252 ; Spd + bigdw 277 ; SAtk + bigdw 223 ; SDef + db "HERUGA-@@@@" + + dw SKARMORY + db QUICK_CLAW + dw SANDSTORM, STEEL_WING, TOXIC, RETURN + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 14, 15, 15, 7 ; DVs + db 10, 25, 10, 20 ; PP + db 255 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 279 ; HP + bigdw 279 ; Max HP + bigdw 223 ; Atk + bigdw 333 ; Def + bigdw 207 ; Spd + bigdw 139 ; SAtk + bigdw 193 ; SDef + db "EA-MUDO@@@@" + + dw SHUCKLE + db LEFTOVERS + dw TOXIC, WRAP, PROTECT, ENCORE + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 14, 15, 14 ; DVs + db 10, 20, 10, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 203 ; HP + bigdw 203 ; Max HP + bigdw 99 ; Atk + bigdw 493 ; Def + bigdw 90 ; Spd + bigdw 97 ; SAtk + bigdw 493 ; SDef + db "TUBOTUBO@@@" + + dw FLAREON + db MINT_BERRY + dw HYPER_BEAM, FLAMETHROWER, SHADOW_BALL, ROAR + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 7, 15, 7 ; DVs + db 5, 15, 15, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 293 ; HP + bigdw 293 ; Max HP + bigdw 315 ; Atk + bigdw 175 ; Def + bigdw 198 ; Spd + bigdw 238 ; SAtk + bigdw 265 ; SDef + db "BU-SUTA-@@@" + + dw MILTANK + db LEFTOVERS + dw MILK_DRINK, EARTHQUAKE, ATTRACT, BODY_SLAM + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 4, 7, 5, 7 ; DVs + db 10, 10, 15, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 322 ; HP + bigdw 322 ; Max HP + bigdw 194 ; Atk + bigdw 245 ; Def + bigdw 232 ; Spd + bigdw 128 ; SAtk + bigdw 182 ; SDef + db "MIRUTANKU@@" + + dw TAUROS + db PINK_BOW + dw THUNDERBOLT, HYPER_BEAM, ATTRACT, EARTHQUAKE + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 6, 5, 7, 6 ; DVs + db 15, 5, 15, 10 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 284 ; HP + bigdw 284 ; Max HP + bigdw 234 ; Atk + bigdw 223 ; Def + bigdw 254 ; Spd + bigdw 126 ; SAtk + bigdw 180 ; SDef + db "KENTAROSU@@" + + dw MUK + db QUICK_CLAW + dw TOXIC, SLUDGE_BOMB, ATTRACT, GIGA_DRAIN + + dw 0 ; OT ID + dt 729000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 5, 4, 4, 4 ; DVs + db 10, 10, 15, 5 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 90 ; Level + db 0, 0 ; Status + bigdw 342 ; HP + bigdw 342 ; Max HP + bigdw 241 ; Atk + bigdw 185 ; Def + bigdw 140 ; Spd + bigdw 167 ; SAtk + bigdw 230 ; SDef + db "BETOBETON@@" + + +; BattleTowerMons group 10 + + dw HOUNDOOM + db MINT_BERRY + dw CRUNCH, FLAMETHROWER, ROAR, REST + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 60000 + bigdw 60000 + bigdw 60000 + bigdw 60000 + bigdw 60000 + dn 15, 13, 14, 13 ; DVs + db 15, 15, 20, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 347 ; HP + bigdw 347 ; Max HP + bigdw 276 ; Atk + bigdw 192 ; Def + bigdw 284 ; Spd + bigdw 312 ; SAtk + bigdw 252 ; SDef + db "HERUGA-@@@@" + + dw MACHAMP + db QUICK_CLAW + dw CROSS_CHOP, EARTHQUAKE, HYPER_BEAM, VITAL_THROW + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 60000 + bigdw 60000 + bigdw 60000 + bigdw 60000 + bigdw 60000 + dn 15, 13, 14, 15 ; DVs + db 5, 10, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 377 ; HP + bigdw 377 ; Max HP + bigdw 356 ; Atk + bigdw 252 ; Def + bigdw 204 ; Spd + bigdw 226 ; SAtk + bigdw 266 ; SDef + db "KAIRIKI-@@@" + + dw KINGDRA + db LEFTOVERS + dw SURF, DRAGONBREATH, REST, TOXIC + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 60000 + bigdw 60000 + bigdw 60000 + bigdw 60000 + bigdw 60000 + dn 13, 15, 15, 14 ; DVs + db 15, 20, 10, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 349 ; HP + bigdw 349 ; Max HP + bigdw 282 ; Atk + bigdw 286 ; Def + bigdw 266 ; Spd + bigdw 284 ; SAtk + bigdw 284 ; SDef + db "KINGUDORA@@" + + dw JOLTEON + db BRIGHTPOWDER + dw THUNDERBOLT, ROAR, THUNDER_WAVE, IRON_TAIL + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 30000 + bigdw 50000 + dn 15, 13, 15, 14 ; DVs + db 15, 20, 20, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 323 ; HP + bigdw 323 ; Max HP + bigdw 220 ; Atk + bigdw 206 ; Def + bigdw 338 ; Spd + bigdw 308 ; SAtk + bigdw 278 ; SDef + db "SANDA-SU@@@" + + dw TAUROS + db KINGS_ROCK + dw HYPER_BEAM, EARTHQUAKE, IRON_TAIL, THUNDERBOLT + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 13, 14, 15 ; DVs + db 5, 10, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 341 ; HP + bigdw 341 ; Max HP + bigdw 290 ; Atk + bigdw 276 ; Def + bigdw 308 ; Spd + bigdw 170 ; SAtk + bigdw 230 ; SDef + db "KENTAROSU@@" + + dw ARCANINE + db LEFTOVERS + dw FLAMETHROWER, EXTREMESPEED, IRON_TAIL, HYPER_BEAM + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 50000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + dn 13, 13, 14, 15 ; DVs + db 15, 5, 15, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 374 ; HP + bigdw 374 ; Max HP + bigdw 306 ; Atk + bigdw 246 ; Def + bigdw 281 ; Spd + bigdw 290 ; SAtk + bigdw 250 ; SDef + db "UINDEi@@@@@" + + dw CHARIZARD + db SCOPE_LENS + dw FLAMETHROWER, EARTHQUAKE, SLASH, FLY + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 55000 + bigdw 55000 + bigdw 55000 + dn 15, 14, 13, 15 ; DVs + db 15, 10, 20, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 343 ; HP + bigdw 343 ; Max HP + bigdw 258 ; Atk + bigdw 247 ; Def + bigdw 289 ; Spd + bigdw 311 ; SAtk + bigdw 263 ; SDef + db "RIZA-DON@@@" + + dw ELECTRODE + db BRIGHTPOWDER + dw THUNDER_WAVE, THUNDERBOLT, EXPLOSION, MIRROR_COAT + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 50000 + bigdw 45000 + bigdw 45000 + dn 15, 11, 14, 15 ; DVs + db 20, 15, 5, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 309 ; HP + bigdw 309 ; Max HP + bigdw 190 ; Atk + bigdw 222 ; Def + bigdw 366 ; Spd + bigdw 248 ; SAtk + bigdw 248 ; SDef + db "MARUMAIN@@@" + + dw RHYDON + db MIRACLEBERRY + dw SURF, EARTHQUAKE, HYPER_BEAM, ROCK_SLIDE + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + bigdw 45000 + dn 15, 13, 14, 15 ; DVs + db 15, 10, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 404 ; HP + bigdw 404 ; Max HP + bigdw 350 ; Atk + bigdw 329 ; Def + bigdw 168 ; Spd + bigdw 178 ; SAtk + bigdw 178 ; SDef + db "SAIDON@@@@@" + + dw STEELIX + db LEFTOVERS + dw EARTHQUAKE, HYPER_BEAM, SWAGGER, CRUNCH + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 55000 + bigdw 60000 + bigdw 50000 + dn 15, 13, 13, 14 ; DVs + db 10, 5, 15, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 343 ; HP + bigdw 343 ; Max HP + bigdw 260 ; Atk + bigdw 489 ; Def + bigdw 152 ; Spd + bigdw 198 ; SAtk + bigdw 218 ; SDef + db "HAGANE-RU@@" + + dw FEAROW + db KINGS_ROCK + dw DRILL_PECK, STEEL_WING, HYPER_BEAM, MUD_SLAP + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 55000 + bigdw 50000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + dn 15, 13, 12, 15 ; DVs + db 20, 25, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 324 ; HP + bigdw 324 ; Max HP + bigdw 270 ; Atk + bigdw 216 ; Def + bigdw 287 ; Spd + bigdw 212 ; SAtk + bigdw 212 ; SDef + db "ONIDORIRU@@" + + dw MISDREAVUS + db FOCUS_BAND + dw PERISH_SONG, MEAN_LOOK, PAIN_SPLIT, SHADOW_BALL + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 45000 + bigdw 50000 + bigdw 55000 + bigdw 50000 + bigdw 55000 + dn 11, 13, 14, 15 ; DVs + db 5, 5, 20, 15 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 309 ; HP + bigdw 309 ; Max HP + bigdw 202 ; Atk + bigdw 209 ; Def + bigdw 258 ; Spd + bigdw 263 ; SAtk + bigdw 263 ; SDef + db "MUUMA@@@@@@" + + dw SNEASEL + db SCOPE_LENS + dw SLASH, BLIZZARD, DREAM_EATER, FAINT_ATTACK + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 48000 + bigdw 45000 + bigdw 50000 + dn 15, 13, 14, 15 ; DVs + db 20, 5, 15, 20 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 301 ; HP + bigdw 301 ; Max HP + bigdw 280 ; Atk + bigdw 195 ; Def + bigdw 316 ; Spd + bigdw 160 ; SAtk + bigdw 240 ; SDef + db "NIyu-RA@@@@" + + dw SCIZOR + db QUICK_CLAW + dw STEEL_WING, HYPER_BEAM, SLASH, TOXIC + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 45000 + dn 15, 11, 15, 14 ; DVs + db 25, 5, 20, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 333 ; HP + bigdw 333 ; Max HP + bigdw 350 ; Atk + bigdw 282 ; Def + bigdw 220 ; Spd + bigdw 196 ; SAtk + bigdw 246 ; SDef + db "HAtuSAMU@@@" + + dw BLISSEY + db LEFTOVERS + dw THUNDERBOLT, BLIZZARD, FIRE_BLAST, SOFTBOILED + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 40000 + bigdw 50000 + bigdw 30000 + bigdw 30000 + dn 13, 13, 15, 14 ; DVs + db 15, 5, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 703 ; HP + bigdw 703 ; Max HP + bigdw 101 ; Atk + bigdw 106 ; Def + bigdw 188 ; Spd + bigdw 226 ; SAtk + bigdw 346 ; SDef + db "HAPINASU@@@" + + dw PILOSWINE + db MINT_BERRY + dw REST, BLIZZARD, HYPER_BEAM, EARTHQUAKE + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 14, 15, 7 ; DVs + db 10, 5, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 387 ; HP + bigdw 387 ; Max HP + bigdw 290 ; Atk + bigdw 248 ; Def + bigdw 190 ; Spd + bigdw 194 ; SAtk + bigdw 194 ; SDef + db "INOMU-@@@@@" + + dw EXEGGUTOR + db QUICK_CLAW + dw PSYCHIC_M, TOXIC, EXPLOSION, GIGA_DRAIN + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 14, 15, 14 ; DVs + db 10, 10, 5, 5 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 375 ; HP + bigdw 375 ; Max HP + bigdw 280 ; Atk + bigdw 258 ; Def + bigdw 200 ; Spd + bigdw 338 ; SAtk + bigdw 218 ; SDef + db "NAtuSI-@@@@" + + dw OMASTAR + db LEFTOVERS + dw SURF, ANCIENTPOWER, BLIZZARD, TOXIC + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + bigdw 50000 + dn 15, 11, 14, 7 ; DVs + db 15, 5, 5, 10 ; PP + db 100 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 331 ; HP + bigdw 331 ; Max HP + bigdw 210 ; Atk + bigdw 332 ; Def + bigdw 198 ; Spd + bigdw 304 ; SAtk + bigdw 214 ; SDef + db "OMUSUTA-@@@" + + dw GOLEM + db BRIGHTPOWDER + dw EXPLOSION, EARTHQUAKE, ROCK_SLIDE, FIRE_BLAST + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 7, 4, 4, 6 ; DVs + db 5, 10, 10, 5 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 329 ; HP + bigdw 329 ; Max HP + bigdw 282 ; Atk + bigdw 316 ; Def + bigdw 146 ; Spd + bigdw 170 ; SAtk + bigdw 190 ; SDef + db "GORO-NIya@@" + + dw HITMONCHAN + db FOCUS_BAND + dw COUNTER, FIRE_PUNCH, THUNDERPUNCH, ICE_PUNCH + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 6, 7, 7, 6 ; DVs + db 20, 15, 15, 15 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 265 ; HP + bigdw 265 ; Max HP + bigdw 270 ; Atk + bigdw 220 ; Def + bigdw 214 ; Spd + bigdw 130 ; SAtk + bigdw 280 ; SDef + db "EBIWARA-@@@" + + dw LANTURN + db QUICK_CLAW + dw SURF, RAIN_DANCE, ZAP_CANNON, CONFUSE_RAY + + dw 0 ; OT ID + dt 1000000 ; Exp + ; Stat exp + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + bigdw 30000 + dn 7, 6, 5, 7 ; DVs + db 15, 5, 5, 10 ; PP + db 0 ; Happiness + db 0, 0, 0 ; Pokerus, Caught data + db 100 ; Level + db 0, 0 ; Status + bigdw 425 ; HP + bigdw 425 ; Max HP + bigdw 178 ; Atk + bigdw 176 ; Def + bigdw 192 ; Spd + bigdw 214 ; SAtk + bigdw 214 ; SDef + db "RANTA-N@@@@" + + assert_table_length 10 * BATTLETOWER_NUM_UNIQUE_MON diff --git a/data/battle_tower/trainer_text.asm b/data/battle_tower/trainer_text.asm new file mode 100644 index 0000000..5e9aadc --- /dev/null +++ b/data/battle_tower/trainer_text.asm @@ -0,0 +1,623 @@ +_BTGreetingM1Text: + text "Hello, glad to" + line "meet you!" + + para "I do hope we have" + line "a good battle." + done + +_BTLossM1Text: + text "Thank you! A most" + line "enjoyable battle!" + done + +_BTWinM1Text: + text "Thank you. You are" + line "formidable." + done + +_BTGreetingM2Text: + text "Work, work, work…" + line "I'm always busy!" + done + +_BTLossM2Text: + text "But, I work hard" + line "in battle too!" + done + +_BTWinM2Text: + text "I'm too busy to be" + line "battling!" + done + +_BTGreetingM3Text: + text "Brace yourself for" + line "my all-out attack!" + done + +_BTLossM3Text: + text "What a cakewalk!" + line "You're too easy!" + done + +_BTWinM3Text: + text "I won't lose next" + line "time, all right?" + done + +_BTGreetingM4Text: + text "Heh, your #MON" + line "look pretty cool." + done + +_BTLossM4Text: + text "Hey, hey, no way!" + line "You won't win!" + done + +_BTWinM4Text: + text "You serious?" + line "This is brutal!" + done + +_BTGreetingM5Text: + text "#MON every day!" + line "I love battling!" + done + +_BTLossM5Text: + text "I'm on top of my" + line "game, but not you!" + done + +_BTWinM5Text: + text "I don't care that" + line "I lost, really!" + done + +_BTGreetingM6Text: + text "Hi, there! Let's" + line "keep this clean!" + done + +_BTLossM6Text: + text "Whoops, sorry for" + line "that wipeout!" + done + +_BTWinM6Text: + text "Whoops! Come on," + line "let me win one!" + done + +_BTGreetingM7Text: + text "Do you want to see" + line "my battle level?" + done + +_BTLossM7Text: + text "Hehehe, I know" + line "your level now!" + done + +_BTWinM7Text: + text "Ouch… I'm just too" + line "weak…" + done + +_BTGreetingM8Text: + text "Hey, let's battle." + line "I'm your opponent." + done + +_BTLossM8Text: + text "Wow, you're not" + line "serious about it!" + done + +_BTWinM8Text: + text "…Urgh… Nothing" + line "positive here…" + done + +_BTGreetingM9Text: + text "I'm your" + line "opponent." + + para "Get ready to be" + line "hammered." + done + +_BTLossM9Text: + text "Hahah! That was a" + line "pushover!" + done + +_BTWinM9Text: + text "No way! There has" + line "to be a mistake!" + done + +_BTGreetingM10Text: + text "Hah!" + line "Let's get rolling!" + done + +_BTLossM10Text: + text "Wahahaha! Didn't" + line "break a sweat!" + done + +_BTWinM10Text: + text "Tough! I'm no" + line "match for you!" + done + +_BTGreetingM11Text: + text "<……><……><……>" + line "<……><……>Battle?" + done + +_BTLossM11Text: + text "<……><……><……>" + line "<……><……>I won?" + done + +_BTWinM11Text: + text "<……><……><……>" + line "<……><……>I lost?" + done + +_BTGreetingM12Text: + text "You want to be a" + line "leader?" + + para "Let me battle you," + line "then!" + done + +_BTLossM12Text: + text "You need another" + line "ten years of" + + para "training to get" + line "better, I'd say." + done + +_BTWinM12Text: + text "You're incredibly" + line "talented." + + para "No one can touch" + line "you now!" + done + +_BTGreetingM13Text: + text "Today, I'm going" + line "to whomp you." + done + +_BTLossM13Text: + text "I knew I'd win." + line "I'm so great!" + done + +_BTWinM13Text: + text "Uh? My plans are" + line "out of whack…" + done + +_BTGreetingM14Text: + text "I bet you can't" + line "beat me!" + done + +_BTLossM14Text: + text "Those #MON" + line "aren't enough!" + done + +_BTWinM14Text: + text "I want your" + line "#MON. Please?" + done + +_BTGreetingM15Text: + text "I'll show you a" + line "real battle!" + done + +_BTLossM15Text: + text "This battle…" + line "I'm bored!" + done + +_BTWinM15Text: + text "…I won't turn tail" + line "in battle!" + done + +_BTGreetingM16Text: + text "Let's go!" + line "No holds barred!" + done + +_BTLossM16Text: + text "Sorry! I wanted" + line "the win more!" + done + +_BTWinM16Text: + text "Wahah! Congrats!" + line "I can't do better!" + done + +_BTGreetingM17Text: + text "My #MON skills" + line "are phenomenal!" + done + +_BTLossM17Text: + text "You've got a long" + line "way to go." + + para "Well, keep trying!" + line "Best of luck!" + done + +_BTWinM17Text: + text "Aww… Don't lose" + line "after beating me." + done + +_BTGreetingM18Text: + text "Who are you?" + line "I don't know you…" + done + +_BTLossM18Text: + text "I must've imagined" + line "that." + + para "There seems to be" + line "no one here…" + done + +_BTWinM18Text: + text "Who am I?" + line "I don't know…" + done + +_BTGreetingM19Text: + text "Um… Are you that…" + line "um…person?" + done + +_BTLossM19Text: + text "It doesn't appear" + line "to be you…" + done + +_BTWinM19Text: + text "Then you really" + line "are the legendary…" + done + +_BTGreetingM20Text: + text "I heard that" + line "you're hot!" + done + +_BTLossM20Text: + text "Not bad. I was" + line "just a bit better." + done + +_BTWinM20Text: + text "Eh, you're not" + line "that special." + done + +_BTGreetingM21Text: + text "I'm scared about" + line "what might happen." + + para "My #MON are way" + line "too strong." + done + +_BTLossM21Text: + text "See? My #MON" + line "were too strong." + done + +_BTWinM21Text: + text "Graa! My #MON" + line "were total wimps!" + done + +_BTGreetingM22Text: + text "Hey, there!" + line "I'll take you on!" + done + +_BTLossM22Text: + text "Don't you have a" + line "better strategy?" + done + +_BTWinM22Text: + text "You've got decent" + line "style!" + done + +_BTGreetingM23Text: + text "I wonder if I can" + line "battle properly…" + done + +_BTLossM23Text: + text "Um… Sorry…" + line "I think I won." + done + +_BTWinM23Text: + text "I guess I'm not" + line "good enough yet…" + done + +_BTGreetingM24Text: + text "Wrrooar!" + line "I won't lose!" + done + +_BTLossM24Text: + text "Wrrooar! I knew" + line "I was a genius!" + done + +_BTWinM24Text: + text "Arrooh! I hate it" + line "when I lose!" + done + +_BTGreetingM25Text: + text "Sorry, but I'm" + line "going to win." + done + +_BTLossM25Text: + text "Yeah! My #MON" + line "rule!" + done + +_BTWinM25Text: + text "Oh, close! I lost" + line "by just a bit!" + done + +_BTGreetingF1Text: + text "OK, I'm not" + line "fooling around!" + done + +_BTLossF1Text: + text "Yay! Too easy!" + line "Like, no way!" + done + +_BTWinF1Text: + text "No!" + line "Like, no way!" + done + +_BTGreetingF2Text: + text "Look! My #MON" + line "are really cute!" + done + +_BTLossF2Text: + text "Aren't they really" + line "adorable?" + done + +_BTWinF2Text: + text "I'm sorry, it's" + line "all my fault!" + done + +_BTGreetingF3Text: + text "Let's get our" + line "battle started!" + done + +_BTLossF3Text: + text "Was I too strong" + line "for you?" + done + +_BTWinF3Text: + text "Ooh, you're in a" + line "different class." + done + +_BTGreetingF4Text: + text "Are we going to" + line "battle? Let's!" + done + +_BTLossF4Text: + text "Oh, you're too" + line "weak. Shame." + done + +_BTWinF4Text: + text "Wow! Are you quite" + line "satisfied?" + done + +_BTGreetingF5Text: + text "Oh, you have some" + line "rare #MON." + done + +_BTLossF5Text: + text "May I have one of" + line "your #MON?" + done + +_BTWinF5Text: + text "…I want one of" + line "your #MON." + done + +_BTGreetingF6Text: + text "Want to hear about" + line "my cute #MON?" + done + +_BTLossF6Text: + text "What do you think" + line "about my cuties?" + done + +_BTWinF6Text: + text "Oh! My! You're a" + line "dreadful trainer!" + done + +_BTGreetingF7Text: + text "Battle? Sure!" + line "Right now!" + done + +_BTLossF7Text: + text "Oh, I love it!" + line "Battling is wild!" + done + +_BTWinF7Text: + text "Oh, how rude! Wait" + line "till next time!" + done + +_BTGreetingF8Text: + text "Please let me win!" + line "Please?" + done + +_BTLossF8Text: + text "Wow, thank you!" + line "You're so nice!" + done + +_BTWinF8Text: + text "You're mean!" + line "I hate meanies!" + done + +_BTGreetingF9Text: + text "Well, can we" + line "begin?" + done + +_BTLossF9Text: + text "Well, I beg your" + line "pardon…" + done + +_BTWinF9Text: + text "Sob… That's not" + line "fair!" + done + +_BTGreetingF10Text: + text "I'm good!" + line "You can't win." + done + +_BTLossF10Text: + text "Giving up? You're" + line "pretty weak!" + done + +_BTWinF10Text: + text "I won't accept" + line "this… No way!" + done + +_BTGreetingF11Text: + text "Are you treating" + line "this seriously?" + done + +_BTLossF11Text: + text "Oh, sorry! Looks" + line "like I won!" + done + +_BTWinF11Text: + text "Oh, how nasty!" + line "You were serious!" + done + +_BTGreetingF12Text: + text "Ahahah! I'll take" + line "it easy on you!" + done + +_BTLossF12Text: + text "Oops, sorry! But" + line "I'm happy too!" + done + +_BTWinF12Text: + text "Oh, oh, I lost!" + line "Thanks. Bye!" + done + +_BTGreetingF13Text: + text "BATTLE TOWER is a" + line "tough place!" + done + +_BTLossF13Text: + text "You might have a" + line "hard time." + done + +_BTWinF13Text: + text "Ooh, you might" + line "make a run here!" + done + +_BTGreetingF14Text: + text "I want to see your" + line "style in action!" + done + +_BTLossF14Text: + text "Every battle is a" + line "drama!" + done + +_BTWinF14Text: + text "Oh… Want to trade" + line "something?" + done + +_BTGreetingF15Text: + text "OK, here goes!" + line "I have momentum!" + done + +_BTLossF15Text: + text "See, I rolled" + line "right over you!" + done + +_BTWinF15Text: + text "No! This did not" + line "happen!" + done diff --git a/data/battle_tower/unknown.asm b/data/battle_tower/unknown.asm new file mode 100644 index 0000000..af51b1e --- /dev/null +++ b/data/battle_tower/unknown.asm @@ -0,0 +1,1406 @@ +BattleTowerTrainerData:: ; ??? +; 70 tables (BATTLETOWER_NUM_UNIQUE_TRAINERS) of 18 two-argument entries (total size BATTLETOWER_TRAINERDATALENGTH). +; Second argument points to an entry in Unknown_170470, to which the first argument is compared. + table_width BATTLETOWER_TRAINERDATALENGTH, BattleTowerTrainerData + +; BattleTowerTrainerData table 1: + db $37, 3 + db $0e, 9 + db $25, 11 + db $1c, 13 + db $12, 13 + db $00, 5 + db $0e, 9 + db $1a, 11 + db $30, 4 + db $3f, 6 + db $20, 4 + db $21, 13 + db $0e, 9 + db $30, 4 + db $20, 4 + db $0b, 6 + db $34, 3 + db $06, 5 + +; BattleTowerTrainerData table 2: + db $36, 3 + db $ca, 0 + db $22, 8 + db $20, 4 + db $33, 13 + db $11, 13 + db $37, 5 + db $06, 5 + db $3f, 6 + db $ca, 0 + db $20, 4 + db $06, 13 + db $ca, 0 + db $21, 3 + db $09, 6 + db $12, 4 + db $28, 11 + db $0c, 13 + +; BattleTowerTrainerData table 3: + db $32, 6 + db $31, 4 + db $02, 2 + db $03, 4 + db $22, 2 + db $00, 5 + db $40, 4 + db $2d, 6 + db $13, 13 + db $18, 3 + db $3f, 4 + db $13, 13 + db $1a, 12 + db $33, 4 + db $32, 13 + db $09, 6 + db $22, 2 + db $13, 13 + +; BattleTowerTrainerData table 4: + db $22, 12 + db $22, 12 + db $0a, 9 + db $0b, 8 + db $2f, 6 + db $22, 7 + db $22, 6 + db $2c, 4 + db $1a, 6 + db $0d, 7 + db $3f, 13 + db $00, 5 + db $0b, 8 + db $09, 6 + db $2c, 4 + db $1f, 14 + db $1c, 11 + db $41, 11 + +; BattleTowerTrainerData table 5: + db $a3, 0 + db $41, 3 + db $1f, 4 + db $29, 0 + db $1c, 4 + db $03, 2 + db $3d, 5 + db $38, 6 + db $71, 0 + db $18, 3 + db $30, 6 + db $53, 0 + db $1e, 5 + db $b9, 0 + db $21, 13 + db $30, 6 + db $d1, 0 + db $0a, 6 + +; BattleTowerTrainerData table 6: + db $13, 2 + db $31, 6 + db $04, 2 + db $1c, 4 + db $0d, 13 + db $31, 13 + db $39, 7 + db $31, 6 + db $24, 7 + db $3d, 4 + db $40, 4 + db $30, 13 + db $03, 6 + db $08, 5 + db $02, 5 + db $14, 7 + db $08, 5 + db $1a, 13 + +; BattleTowerTrainerData table 7: + db $0d, 2 + db $07, 2 + db $00, 5 + db $22, 2 + db $10, 11 + db $0a, 13 + db $16, 2 + db $01, 2 + db $08, 13 + db $2c, 4 + db $23, 7 + db $23, 13 + db $16, 2 + db $01, 2 + db $08, 13 + db $02, 3 + db $20, 4 + db $23, 13 + +; BattleTowerTrainerData table 8: + db $1e, 2 + db $22, 2 + db $00, 5 + db $20, 8 + db $2c, 4 + db $03, 2 + db $1d, 5 + db $41, 8 + db $41, 8 + db $35, 5 + db $40, 11 + db $00, 5 + db $0b, 5 + db $0b, 2 + db $00, 5 + db $04, 4 + db $14, 8 + db $00, 5 + +; BattleTowerTrainerData table 9: + db $06, 12 + db $09, 6 + db $00, 0 + db $0b, 9 + db $1e, 12 + db $37, 13 + db $41, 3 + db $06, 4 + db $34, 6 + db $22, 12 + db $15, 9 + db $23, 13 + db $02, 3 + db $22, 8 + db $41, 13 + db $26, 4 + db $31, 13 + db $01, 5 + +; BattleTowerTrainerData table 10: + db $22, 12 + db $30, 4 + db $01, 5 + db $2c, 4 + db $23, 7 + db $01, 5 + db $37, 3 + db $3d, 4 + db $3c, 13 + db $1c, 3 + db $29, 8 + db $3c, 13 + db $18, 4 + db $30, 13 + db $06, 5 + db $14, 7 + db $30, 13 + db $06, 5 + +; BattleTowerTrainerData table 11: + db $0e, 6 + db $04, 5 + db $2c, 4 + db $1e, 12 + db $38, 13 + db $00, 5 + db $3f, 3 + db $3f, 6 + db $20, 4 + db $33, 13 + db $04, 13 + db $00, 0 + db $20, 4 + db $26, 13 + db $04, 5 + db $0c, 4 + db $26, 13 + db $04, 5 + +; BattleTowerTrainerData table 12: + db $18, 2 + db $33, 3 + db $28, 4 + db $2c, 4 + db $09, 7 + db $03, 5 + db $30, 4 + db $08, 9 + db $00, 5 + db $1a, 2 + db $32, 3 + db $00, 5 + db $3f, 5 + db $26, 7 + db $01, 5 + db $26, 5 + db $0f, 2 + db $00, 5 + +; BattleTowerTrainerData table 13: + db $3a, 11 + db $3a, 11 + db $00, 5 + db $42, 3 + db $19, 8 + db $30, 4 + db $39, 3 + db $13, 6 + db $13, 6 + db $19, 8 + db $21, 13 + db $00, 0 + db $39, 3 + db $09, 2 + db $00, 5 + db $40, 3 + db $3a, 8 + db $2a, 13 + +; BattleTowerTrainerData table 14: + db $31, 5 + db $11, 14 + db $30, 4 + db $1b, 8 + db $07, 8 + db $0c, 13 + db $1b, 2 + db $1b, 2 + db $01, 5 + db $15, 2 + db $0a, 4 + db $0e, 13 + db $22, 5 + db $31, 6 + db $02, 5 + db $1d, 6 + db $3b, 7 + db $0e, 13 + +; BattleTowerTrainerData table 15: + db $1b, 2 + db $2c, 4 + db $0d, 13 + db $34, 3 + db $00, 3 + db $11, 13 + db $1b, 8 + db $31, 4 + db $0b, 13 + db $2f, 8 + db $01, 5 + db $00, 0 + db $06, 5 + db $10, 5 + db $0f, 6 + db $11, 13 + db $06, 5 + db $00, 0 + +; BattleTowerTrainerData table 16: + db $42, 3 + db $30, 4 + db $1f, 11 + db $16, 14 + db $10, 7 + db $34, 13 + db $17, 14 + db $04, 13 + db $00, 0 + db $42, 3 + db $19, 8 + db $30, 4 + db $0c, 5 + db $35, 5 + db $01, 5 + db $1e, 6 + db $36, 8 + db $41, 13 + +; BattleTowerTrainerData table 17: + db $18, 3 + db $42, 3 + db $43, 4 + db $3a, 11 + db $3b, 11 + db $03, 5 + db $2c, 5 + db $06, 5 + db $1b, 3 + db $43, 4 + db $39, 11 + db $3c, 4 + db $14, 11 + db $0f, 5 + db $06, 5 + db $40, 3 + db $3f, 4 + db $20, 14 + +; BattleTowerTrainerData table 18: + db $0c, 5 + db $36, 7 + db $30, 4 + db $27, 11 + db $10, 8 + db $31, 13 + db $11, 14 + db $30, 4 + db $41, 3 + db $07, 13 + db $2f, 8 + db $03, 5 + db $06, 5 + db $3f, 6 + db $11, 14 + db $30, 4 + db $30, 7 + db $06, 5 + +; BattleTowerTrainerData table 19: + db $36, 3 + db $06, 6 + db $44, 4 + db $0b, 14 + db $16, 13 + db $00, 5 + db $32, 13 + db $08, 6 + db $09, 14 + db $44, 4 + db $09, 8 + db $22, 13 + db $04, 14 + db $09, 14 + db $44, 4 + db $29, 8 + db $05, 13 + db $00, 0 + +; BattleTowerTrainerData table 20: + db $3f, 6 + db $2c, 4 + db $34, 13 + db $14, 5 + db $13, 2 + db $04, 2 + db $0c, 5 + db $3f, 4 + db $38, 13 + db $02, 3 + db $29, 8 + db $32, 13 + db $35, 5 + db $15, 6 + db $40, 5 + db $02, 3 + db $34, 7 + db $04, 13 + +; BattleTowerTrainerData table 21: + db $12, 3 + db $02, 4 + db $07, 7 + db $28, 4 + db $2c, 13 + db $00, 5 + db $2c, 3 + db $12, 3 + db $2b, 6 + db $0a, 4 + db $06, 13 + db $31, 13 + db $2c, 3 + db $12, 3 + db $06, 4 + db $0d, 6 + db $28, 11 + db $02, 5 + +; BattleTowerTrainerData table 22: + db $41, 4 + db $3c, 11 + db $34, 13 + db $40, 3 + db $00, 3 + db $0d, 13 + db $13, 12 + db $33, 8 + db $31, 13 + db $1e, 9 + db $27, 7 + db $3b, 13 + db $22, 8 + db $15, 4 + db $11, 13 + db $2c, 3 + db $0c, 4 + db $3b, 13 + +; BattleTowerTrainerData table 23: + db $03, 10 + db $3a, 13 + db $2c, 4 + db $1c, 11 + db $35, 7 + db $26, 13 + db $24, 9 + db $43, 4 + db $26, 13 + db $0f, 3 + db $1f, 7 + db $04, 5 + db $02, 3 + db $24, 8 + db $26, 13 + db $3f, 3 + db $13, 4 + db $04, 5 + +; BattleTowerTrainerData table 24: + db $06, 5 + db $06, 5 + db $06, 5 + db $06, 5 + db $2c, 4 + db $03, 5 + db $06, 5 + db $06, 5 + db $06, 5 + db $06, 5 + db $07, 4 + db $03, 5 + db $06, 5 + db $06, 5 + db $06, 5 + db $06, 5 + db $33, 4 + db $03, 5 + +; BattleTowerTrainerData table 25: + db $27, 5 + db $01, 5 + db $00, 0 + db $18, 4 + db $19, 13 + db $01, 5 + db $41, 5 + db $00, 0 + db $00, 0 + db $16, 6 + db $3d, 4 + db $19, 13 + db $20, 4 + db $05, 5 + db $00, 0 + db $21, 3 + db $0c, 4 + db $19, 13 + +; BattleTowerTrainerData table 26: + db $03, 2 + db $43, 3 + db $27, 4 + db $28, 4 + db $2d, 13 + db $00, 5 + db $30, 5 + db $04, 5 + db $02, 3 + db $38, 6 + db $3e, 4 + db $41, 13 + db $16, 14 + db $04, 5 + db $02, 3 + db $38, 6 + db $20, 4 + db $41, 13 + +; BattleTowerTrainerData table 27: + db $34, 3 + db $00, 3 + db $11, 13 + db $03, 4 + db $1c, 11 + db $07, 13 + db $29, 5 + db $00, 5 + db $00, 0 + db $40, 4 + db $11, 13 + db $3e, 13 + db $03, 6 + db $11, 13 + db $00, 5 + db $16, 14 + db $0d, 6 + db $20, 6 + +; BattleTowerTrainerData table 28: + db $19, 3 + db $17, 11 + db $20, 6 + db $1b, 11 + db $06, 12 + db $1a, 11 + db $34, 3 + db $06, 4 + db $20, 6 + db $1b, 11 + db $06, 12 + db $1a, 11 + db $34, 3 + db $36, 4 + db $20, 6 + db $1b, 11 + db $06, 12 + db $1a, 11 + +; BattleTowerTrainerData table 29: + db $0a, 3 + db $0c, 12 + db $25, 10 + db $21, 14 + db $2c, 4 + db $03, 2 + db $10, 9 + db $03, 8 + db $09, 6 + db $0a, 3 + db $31, 4 + db $16, 13 + db $27, 5 + db $17, 7 + db $04, 5 + db $02, 12 + db $0a, 9 + db $2f, 13 + +; BattleTowerTrainerData table 30: + db $15, 2 + db $2c, 4 + db $03, 2 + db $24, 4 + db $39, 4 + db $0f, 13 + db $1e, 2 + db $11, 2 + db $01, 5 + db $0d, 4 + db $39, 8 + db $05, 13 + db $29, 5 + db $08, 2 + db $00, 5 + db $43, 3 + db $0c, 4 + db $3b, 13 + +; BattleTowerTrainerData table 31: + db $10, 11 + db $04, 4 + db $00, 5 + db $05, 8 + db $21, 13 + db $00, 0 + db $1f, 5 + db $01, 2 + db $00, 5 + db $18, 3 + db $3c, 8 + db $31, 13 + db $02, 6 + db $23, 11 + db $31, 3 + db $43, 3 + db $13, 7 + db $16, 13 + +; BattleTowerTrainerData table 32: + db $0f, 14 + db $19, 13 + db $00, 5 + db $0b, 14 + db $2c, 4 + db $19, 13 + db $0e, 14 + db $2c, 4 + db $06, 5 + db $1f, 7 + db $19, 13 + db $01, 5 + db $06, 5 + db $37, 3 + db $29, 4 + db $32, 13 + db $19, 13 + db $01, 5 + +; BattleTowerTrainerData table 33: + db $35, 3 + db $06, 4 + db $0d, 6 + db $29, 11 + db $05, 13 + db $00, 0 + db $16, 14 + db $30, 4 + db $0b, 13 + db $29, 8 + db $16, 13 + db $00, 5 + db $11, 14 + db $30, 4 + db $30, 7 + db $06, 5 + db $29, 8 + db $03, 5 + +; BattleTowerTrainerData table 34: + db $18, 4 + db $03, 5 + db $0b, 13 + db $2c, 4 + db $1e, 12 + db $01, 5 + db $1f, 5 + db $1d, 7 + db $1d, 7 + db $2c, 4 + db $21, 7 + db $01, 5 + db $0a, 5 + db $12, 2 + db $32, 13 + db $11, 12 + db $0c, 6 + db $1a, 13 + +; BattleTowerTrainerData table 35: + db $0c, 12 + db $37, 3 + db $1a, 3 + db $40, 4 + db $23, 11 + db $26, 10 + db $3f, 6 + db $09, 4 + db $1b, 7 + db $37, 3 + db $22, 8 + db $27, 6 + db $04, 14 + db $03, 5 + db $00, 0 + db $26, 10 + db $3b, 8 + db $1b, 7 + +; BattleTowerTrainerData table 36: + db $18, 3 + db $1b, 8 + db $29, 11 + db $40, 8 + db $32, 13 + db $00, 5 + db $2f, 6 + db $29, 11 + db $0b, 13 + db $2f, 8 + db $23, 13 + db $02, 13 + db $35, 5 + db $13, 14 + db $2e, 6 + db $22, 6 + db $2f, 8 + db $27, 6 + +; BattleTowerTrainerData table 37: + db $1c, 3 + db $02, 14 + db $31, 3 + db $2a, 13 + db $24, 13 + db $00, 0 + db $18, 3 + db $0b, 13 + db $30, 8 + db $40, 8 + db $04, 5 + db $00, 0 + db $1c, 5 + db $01, 5 + db $03, 3 + db $02, 14 + db $27, 4 + db $34, 13 + +; BattleTowerTrainerData table 38: + db $33, 3 + db $30, 4 + db $2c, 4 + db $1c, 11 + db $35, 7 + db $00, 5 + db $30, 4 + db $2c, 4 + db $20, 6 + db $1e, 9 + db $40, 6 + db $40, 4 + db $30, 4 + db $2c, 4 + db $20, 6 + db $1e, 9 + db $40, 6 + db $22, 7 + +; BattleTowerTrainerData table 39: + db $22, 12 + db $22, 12 + db $16, 10 + db $35, 13 + db $1c, 11 + db $3f, 13 + db $13, 5 + db $16, 10 + db $40, 6 + db $23, 7 + db $06, 13 + db $06, 5 + db $3f, 6 + db $16, 10 + db $16, 13 + db $37, 3 + db $2c, 4 + db $26, 7 + +; BattleTowerTrainerData table 40: + db $0e, 6 + db $05, 8 + db $04, 13 + db $00, 0 + db $00, 0 + db $00, 0 + db $14, 5 + db $06, 5 + db $12, 2 + db $00, 0 + db $00, 0 + db $00, 0 + db $23, 5 + db $01, 6 + db $18, 13 + db $00, 0 + db $00, 0 + db $00, 0 + +; BattleTowerTrainerData table 41: + db $18, 3 + db $27, 3 + db $03, 5 + db $20, 11 + db $27, 6 + db $06, 5 + db $20, 14 + db $12, 7 + db $2b, 13 + db $2c, 3 + db $0e, 8 + db $35, 7 + db $37, 3 + db $27, 3 + db $03, 5 + db $42, 7 + db $2f, 8 + db $06, 5 + +; BattleTowerTrainerData table 42: + db $36, 3 + db $30, 4 + db $17, 4 + db $2c, 3 + db $0c, 4 + db $3b, 13 + db $18, 3 + db $32, 7 + db $15, 13 + db $35, 5 + db $0d, 7 + db $07, 13 + db $09, 5 + db $06, 5 + db $0f, 12 + db $09, 4 + db $07, 13 + db $3b, 13 + +; BattleTowerTrainerData table 43: + db $0b, 5 + db $14, 6 + db $24, 4 + db $0a, 13 + db $3c, 13 + db $00, 5 + db $14, 5 + db $09, 2 + db $32, 13 + db $1e, 6 + db $04, 7 + db $06, 13 + db $1a, 5 + db $33, 4 + db $03, 5 + db $16, 2 + db $00, 2 + db $07, 5 + +; BattleTowerTrainerData table 44: + db $0a, 3 + db $32, 7 + db $0b, 14 + db $22, 6 + db $2c, 4 + db $29, 11 + db $0a, 3 + db $12, 13 + db $24, 4 + db $1a, 11 + db $33, 13 + db $03, 13 + db $0a, 3 + db $35, 4 + db $1b, 7 + db $06, 5 + db $1e, 6 + db $14, 7 + +; BattleTowerTrainerData table 45: + db $0e, 6 + db $2c, 4 + db $00, 13 + db $06, 3 + db $31, 4 + db $04, 13 + db $0c, 5 + db $12, 2 + db $00, 5 + db $40, 3 + db $09, 4 + db $01, 13 + db $35, 5 + db $36, 8 + db $00, 5 + db $02, 3 + db $31, 4 + db $21, 13 + +; BattleTowerTrainerData table 46: + db $22, 5 + db $07, 14 + db $30, 4 + db $c5, 0 + db $10, 2 + db $01, 5 + db $0c, 12 + db $00, 1 + db $30, 4 + db $82, 0 + db $21, 4 + db $01, 5 + db $10, 1 + db $11, 5 + db $30, 4 + db $c3, 0 + db $3f, 4 + db $06, 5 + +; BattleTowerTrainerData table 47: + db $3a, 7 + db $3b, 7 + db $36, 3 + db $30, 4 + db $21, 4 + db $06, 13 + db $17, 14 + db $03, 5 + db $00, 0 + db $3f, 6 + db $21, 4 + db $21, 13 + db $36, 5 + db $36, 3 + db $30, 4 + db $33, 6 + db $3f, 4 + db $0c, 13 + +; BattleTowerTrainerData table 48: + db $43, 3 + db $20, 4 + db $41, 13 + db $17, 6 + db $06, 3 + db $0a, 4 + db $3a, 6 + db $13, 4 + db $04, 13 + db $08, 6 + db $3f, 4 + db $31, 13 + db $43, 3 + db $39, 4 + db $04, 5 + db $17, 6 + db $39, 4 + db $41, 13 + +; BattleTowerTrainerData table 49: + db $36, 3 + db $16, 4 + db $08, 6 + db $09, 8 + db $06, 13 + db $00, 0 + db $1f, 11 + db $03, 5 + db $12, 14 + db $0f, 14 + db $2c, 13 + db $00, 5 + db $3a, 6 + db $16, 4 + db $38, 6 + db $38, 6 + db $2c, 13 + db $00, 5 + +; BattleTowerTrainerData table 50: + db $11, 5 + db $25, 3 + db $33, 4 + db $2f, 8 + db $19, 13 + db $00, 5 + db $11, 5 + db $25, 3 + db $3f, 6 + db $26, 4 + db $19, 13 + db $00, 5 + db $11, 5 + db $21, 3 + db $35, 4 + db $14, 7 + db $19, 13 + db $06, 5 + +; BattleTowerTrainerData table 51: + db $2c, 4 + db $0a, 13 + db $04, 5 + db $33, 3 + db $29, 11 + db $05, 13 + db $00, 6 + db $04, 5 + db $09, 2 + db $33, 3 + db $07, 4 + db $35, 7 + db $33, 3 + db $3a, 8 + db $05, 13 + db $3f, 6 + db $29, 8 + db $05, 13 + +; BattleTowerTrainerData table 52: + db $05, 3 + db $1b, 4 + db $41, 3 + db $39, 11 + db $3a, 11 + db $01, 5 + db $2c, 4 + db $03, 5 + db $00, 0 + db $40, 7 + db $3e, 13 + db $00, 5 + db $00, 14 + db $09, 5 + db $04, 5 + db $19, 9 + db $1d, 11 + db $03, 5 + +; BattleTowerTrainerData table 53: + db $1c, 12 + db $20, 6 + db $05, 8 + db $3e, 13 + db $00, 5 + db $00, 0 + db $18, 3 + db $1f, 14 + db $11, 10 + db $1c, 11 + db $15, 11 + db $1c, 6 + db $03, 14 + db $06, 12 + db $21, 12 + db $14, 13 + db $06, 5 + db $1f, 8 + +; BattleTowerTrainerData table 54: + db $37, 3 + db $0e, 1 + db $08, 1 + db $19, 6 + db $27, 11 + db $03, 2 + db $0e, 1 + db $08, 1 + db $1b, 8 + db $05, 8 + db $21, 13 + db $00, 0 + db $36, 3 + db $33, 4 + db $04, 5 + db $00, 4 + db $41, 8 + db $3b, 13 + +; BattleTowerTrainerData table 55: + db $06, 2 + db $00, 5 + db $34, 3 + db $00, 3 + db $0d, 13 + db $00, 5 + db $3c, 6 + db $05, 8 + db $16, 4 + db $2f, 8 + db $33, 13 + db $02, 13 + db $1c, 5 + db $00, 5 + db $18, 3 + db $05, 8 + db $1b, 4 + db $0c, 13 + +; BattleTowerTrainerData table 56: + db $2c, 4 + db $13, 9 + db $20, 6 + db $39, 3 + db $20, 4 + db $3c, 13 + db $05, 3 + db $43, 4 + db $0b, 13 + db $22, 4 + db $06, 13 + db $31, 13 + db $24, 8 + db $00, 5 + db $02, 3 + db $09, 8 + db $06, 13 + db $3b, 13 + +; BattleTowerTrainerData table 57: + db $06, 3 + db $20, 4 + db $24, 13 + db $24, 4 + db $10, 11 + db $00, 5 + db $39, 7 + db $00, 5 + db $2a, 6 + db $04, 4 + db $3c, 4 + db $00, 0 + db $24, 4 + db $1c, 11 + db $07, 13 + db $2f, 8 + db $09, 6 + db $06, 5 + +; BattleTowerTrainerData table 58: + db $44, 7 + db $23, 11 + db $33, 13 + db $2c, 4 + db $20, 6 + db $24, 8 + db $24, 8 + db $00, 5 + db $0e, 14 + db $12, 8 + db $09, 11 + db $28, 6 + db $24, 8 + db $00, 5 + db $02, 3 + db $13, 6 + db $11, 8 + db $41, 13 + +; BattleTowerTrainerData table 59: + db $36, 3 + db $06, 6 + db $30, 4 + db $0f, 11 + db $02, 11 + db $3b, 13 + db $31, 13 + db $00, 5 + db $39, 3 + db $20, 4 + db $21, 13 + db $00, 0 + db $04, 14 + db $02, 5 + db $06, 6 + db $20, 14 + db $0b, 6 + db $27, 6 + +; BattleTowerTrainerData table 60: + db $14, 5 + db $04, 2 + db $09, 14 + db $08, 8 + db $2e, 8 + db $41, 13 + db $34, 5 + db $2e, 8 + db $21, 13 + db $3f, 3 + db $18, 8 + db $00, 5 + db $36, 5 + db $05, 2 + db $00, 5 + db $17, 6 + db $39, 4 + db $00, 5 + +; BattleTowerTrainerData table 61: + db $34, 3 + db $00, 3 + db $11, 13 + db $41, 8 + db $0b, 6 + db $06, 4 + db $39, 7 + db $00, 5 + db $00, 0 + db $36, 3 + db $30, 4 + db $07, 8 + db $10, 5 + db $15, 8 + db $00, 5 + db $3a, 6 + db $1e, 6 + db $14, 13 + +; BattleTowerTrainerData table 62: + db $37, 5 + db $37, 5 + db $00, 5 + db $38, 5 + db $38, 5 + db $41, 5 + db $25, 5 + db $04, 5 + db $32, 5 + db $31, 5 + db $41, 5 + db $41, 5 + db $0f, 5 + db $04, 5 + db $0f, 5 + db $0f, 5 + db $16, 5 + db $01, 5 + +; BattleTowerTrainerData table 63: + db $1f, 14 + db $36, 4 + db $40, 13 + db $2f, 8 + db $1a, 13 + db $00, 5 + db $21, 6 + db $35, 5 + db $24, 6 + db $1a, 6 + db $12, 14 + db $00, 0 + db $1b, 5 + db $31, 6 + db $02, 5 + db $28, 13 + db $27, 13 + db $00, 0 + +; BattleTowerTrainerData table 64: + db $41, 8 + db $0b, 6 + db $37, 3 + db $08, 6 + db $20, 4 + db $3b, 13 + db $15, 2 + db $16, 6 + db $26, 7 + db $13, 12 + db $33, 8 + db $32, 13 + db $2d, 7 + db $00, 5 + db $35, 3 + db $0b, 4 + db $28, 6 + db $06, 5 + +; BattleTowerTrainerData table 65: + db $0c, 8 + db $2c, 4 + db $1c, 11 + db $06, 7 + db $0a, 13 + db $03, 5 + db $30, 6 + db $06, 7 + db $00, 5 + db $2c, 4 + db $20, 6 + db $24, 7 + db $30, 6 + db $0b, 7 + db $00, 5 + db $2c, 4 + db $20, 6 + db $22, 7 + +; BattleTowerTrainerData table 66: + db $22, 12 + db $22, 12 + db $0a, 9 + db $04, 11 + db $02, 7 + db $27, 6 + db $0f, 12 + db $0a, 10 + db $22, 6 + db $02, 7 + db $27, 6 + db $04, 5 + db $3a, 6 + db $0e, 10 + db $22, 6 + db $05, 8 + db $02, 7 + db $04, 5 + +; BattleTowerTrainerData table 67: + db $2d, 11 + db $02, 8 + db $37, 13 + db $10, 5 + db $29, 7 + db $03, 5 + db $20, 14 + db $0e, 14 + db $0d, 6 + db $42, 7 + db $30, 8 + db $28, 6 + db $10, 5 + db $04, 5 + db $04, 5 + db $10, 5 + db $10, 5 + db $04, 5 + +; BattleTowerTrainerData table 68: + db $3f, 3 + db $16, 14 + db $3f, 8 + db $0b, 13 + db $2f, 8 + db $41, 13 + db $34, 5 + db $00, 5 + db $02, 3 + db $3a, 6 + db $31, 7 + db $31, 13 + db $21, 14 + db $03, 5 + db $3f, 3 + db $16, 14 + db $26, 7 + db $03, 5 + +; BattleTowerTrainerData table 69: + db $3a, 6 + db $2c, 3 + db $12, 3 + db $17, 12 + db $28, 11 + db $06, 13 + db $3a, 6 + db $17, 12 + db $23, 11 + db $0d, 6 + db $2f, 8 + db $22, 13 + db $14, 7 + db $04, 5 + db $17, 12 + db $1c, 11 + db $1b, 7 + db $00, 5 + +; BattleTowerTrainerData table 70: + db $1b, 2 + db $00, 5 + db $0c, 8 + db $2c, 4 + db $23, 11 + db $32, 13 + db $2b, 7 + db $1f, 4 + db $3b, 13 + db $09, 7 + db $09, 7 + db $00, 5 + db $26, 5 + db $00, 5 + db $3f, 3 + db $22, 7 + db $d1, 0 + db $32, 13 + + assert_table_length BATTLETOWER_NUM_UNIQUE_TRAINERS diff --git a/data/battle_tower/unknown_levels.asm b/data/battle_tower/unknown_levels.asm new file mode 100644 index 0000000..8469843 --- /dev/null +++ b/data/battle_tower/unknown_levels.asm @@ -0,0 +1,36 @@ +Unknown_170470: + db $12 + db $24 + db $45 + db $45 + db $42 + db $42 + db $45 + db $42 + db $27 + db $27 + db $45 + db $27 + db $42 + db $24 +.end + +Unknown_17047e: + db $03, 4 + db $05, 8 + db $03, 5 + db $0e, 6 + db $03, 2 + db $00, 0 + db $39, 7 + db $07, 4 + db $00, 5 + db $04, 7 + db $01, 5 + db $00, 0 + db $0f, 5 + db $14, 7 + db $05, 5 + db $11, 12 + db $0c, 6 + db $06, 4 diff --git a/data/collision/collision_permissions.asm b/data/collision/collision_permissions.asm new file mode 100644 index 0000000..188338c --- /dev/null +++ b/data/collision/collision_permissions.asm @@ -0,0 +1,260 @@ +TileCollisionTable:: +; entries correspond to COLL_* constants + table_width 1, TileCollisionTable + db LAND_TILE ; COLL_FLOOR + db LAND_TILE ; COLL_01 + db LAND_TILE ; 02 + db LAND_TILE ; COLL_03 + db LAND_TILE ; COLL_04 + db LAND_TILE ; 05 + db LAND_TILE ; 06 + db WALL_TILE ; COLL_WALL + db LAND_TILE ; COLL_CUT_08 + db LAND_TILE ; 09 + db LAND_TILE ; 0a + db LAND_TILE ; 0b + db LAND_TILE ; 0c + db LAND_TILE ; 0d + db LAND_TILE ; 0e + db WALL_TILE ; 0f + db LAND_TILE ; COLL_TALL_GRASS_10 + db LAND_TILE ; 11 + db WALL_TILE | TALK ; COLL_CUT_TREE + db LAND_TILE ; 13 + db LAND_TILE ; COLL_LONG_GRASS + db WALL_TILE | TALK ; COLL_HEADBUTT_TREE + db LAND_TILE ; 16 + db LAND_TILE ; 17 + db LAND_TILE ; COLL_TALL_GRASS + db LAND_TILE ; 19 + db WALL_TILE | TALK ; COLL_CUT_TREE_1A + db LAND_TILE ; 1b + db LAND_TILE ; COLL_LONG_GRASS_1C + db WALL_TILE | TALK ; COLL_HEADBUTT_TREE_1D + db LAND_TILE ; 1e + db LAND_TILE ; 1f + db WATER_TILE ; 20 + db WATER_TILE ; COLL_WATER_21 + db WATER_TILE | TALK ; 22 + db LAND_TILE ; COLL_ICE + db WATER_TILE | TALK ; COLL_WHIRLPOOL + db WATER_TILE ; 25 + db WATER_TILE ; 26 + db WALL_TILE ; COLL_BUOY + db WATER_TILE ; COLL_CUT_28 + db WATER_TILE ; COLL_WATER + db WATER_TILE | TALK ; 2a + db LAND_TILE ; COLL_ICE_2B + db WATER_TILE | TALK ; COLL_WHIRLPOOL_2C + db WATER_TILE ; 2d + db WATER_TILE ; 2e + db WALL_TILE ; 2f + db WATER_TILE ; COLL_WATERFALL_RIGHT + db WATER_TILE ; COLL_WATERFALL_LEFT + db WATER_TILE ; COLL_WATERFALL_UP + db WATER_TILE ; COLL_WATERFALL + db WATER_TILE ; 34 + db WATER_TILE ; 35 + db WATER_TILE ; 36 + db WATER_TILE ; 37 + db WATER_TILE ; COLL_CURRENT_RIGHT + db WATER_TILE ; COLL_CURRENT_LEFT + db WATER_TILE ; COLL_CURRENT_UP + db WATER_TILE ; COLL_CURRENT_DOWN + db WATER_TILE ; 3c + db WATER_TILE ; 3d + db WATER_TILE ; 3e + db WATER_TILE ; 3f + db LAND_TILE ; COLL_BRAKE + db LAND_TILE ; COLL_WALK_RIGHT + db LAND_TILE ; COLL_WALK_LEFT + db LAND_TILE ; COLL_WALK_UP + db LAND_TILE ; COLL_WALK_DOWN + db LAND_TILE ; COLL_BRAKE_45 + db LAND_TILE ; COLL_BRAKE_46 + db LAND_TILE ; COLL_BRAKE_47 + db LAND_TILE ; COLL_GRASS_48 + db LAND_TILE ; COLL_GRASS_49 + db LAND_TILE ; COLL_GRASS_4A + db LAND_TILE ; COLL_GRASS_4B + db LAND_TILE ; COLL_GRASS_4C + db LAND_TILE ; 4d + db LAND_TILE ; 4e + db LAND_TILE ; 4f + db LAND_TILE ; COLL_WALK_RIGHT_ALT + db LAND_TILE ; COLL_WALK_LEFT_ALT + db LAND_TILE ; COLL_WALK_UP_ALT + db LAND_TILE ; COLL_WALK_DOWN_ALT + db LAND_TILE ; COLL_BRAKE_ALT + db LAND_TILE ; COLL_BRAKE_55 + db LAND_TILE ; COLL_BRAKE_56 + db LAND_TILE ; COLL_BRAKE_57 + db LAND_TILE ; 58 + db LAND_TILE ; 59 + db LAND_TILE ; 5a + db LAND_TILE ; COLL_5B + db LAND_TILE ; 5c + db LAND_TILE ; 5d + db LAND_TILE ; 5e + db LAND_TILE ; 5f + db LAND_TILE ; COLL_PIT + db LAND_TILE ; COLL_VIRTUAL_BOY + db WALL_TILE ; 62 + db LAND_TILE ; 63 + db LAND_TILE ; COLL_64 + db LAND_TILE ; COLL_65 + db LAND_TILE ; 66 + db LAND_TILE ; 67 + db LAND_TILE ; COLL_PIT_68 + db LAND_TILE ; 69 + db WALL_TILE ; 6a + db LAND_TILE ; 6b + db LAND_TILE ; 6c + db LAND_TILE ; 6d + db LAND_TILE ; 6e + db LAND_TILE ; 6f + db LAND_TILE ; COLL_WARP_CARPET_DOWN + db LAND_TILE ; COLL_DOOR + db LAND_TILE ; COLL_LADDER + db LAND_TILE ; COLL_STAIRCASE_73 + db LAND_TILE ; COLL_CAVE_74 + db LAND_TILE ; COLL_DOOR_75 + db LAND_TILE ; COLL_WARP_CARPET_LEFT + db LAND_TILE ; COLL_WARP_77 + db LAND_TILE ; COLL_WARP_CARPET_UP + db LAND_TILE ; COLL_DOOR_79 + db LAND_TILE ; COLL_STAIRCASE + db LAND_TILE ; COLL_CAVE + db LAND_TILE ; COLL_WARP_PANEL + db LAND_TILE ; COLL_DOOR_7D + db LAND_TILE ; COLL_WARP_CARPET_RIGHT + db LAND_TILE ; COLL_WARP_7F + db WALL_TILE ; 80 + db WALL_TILE ; 81 + db WALL_TILE ; 82 + db WALL_TILE ; 83 + db WALL_TILE ; 84 + db LAND_TILE ; 85 + db LAND_TILE ; 86 + db LAND_TILE ; 87 + db WALL_TILE ; 88 + db WALL_TILE ; 89 + db WALL_TILE ; 8a + db WALL_TILE ; 8b + db WALL_TILE ; 8c + db LAND_TILE ; 8d + db LAND_TILE ; 8e + db LAND_TILE ; 8f + db WALL_TILE ; COLL_COUNTER + db WALL_TILE ; COLL_BOOKSHELF + db WALL_TILE ; 92 + db WALL_TILE ; COLL_PC + db WALL_TILE ; COLL_RADIO + db WALL_TILE ; COLL_TOWN_MAP + db WALL_TILE ; COLL_MART_SHELF + db WALL_TILE ; COLL_TV + db WALL_TILE ; COLL_COUNTER_98 + db WALL_TILE ; 99 + db WALL_TILE ; 9a + db WALL_TILE ; 9b + db WALL_TILE ; COLL_9C + db WALL_TILE ; COLL_WINDOW + db WALL_TILE ; 9e + db WALL_TILE ; COLL_INCENSE_BURNER + db LAND_TILE ; COLL_HOP_RIGHT + db LAND_TILE ; COLL_HOP_LEFT + db LAND_TILE ; COLL_HOP_UP + db LAND_TILE ; COLL_HOP_DOWN + db LAND_TILE ; COLL_HOP_DOWN_RIGHT + db LAND_TILE ; COLL_HOP_DOWN_LEFT + db LAND_TILE ; COLL_HOP_UP_RIGHT + db LAND_TILE ; COLL_HOP_UP_LEFT + db LAND_TILE ; a8 + db LAND_TILE ; a9 + db LAND_TILE ; aa + db LAND_TILE ; ab + db LAND_TILE ; ac + db LAND_TILE ; ad + db LAND_TILE ; ae + db LAND_TILE ; af + db LAND_TILE ; COLL_RIGHT_WALL + db LAND_TILE ; COLL_LEFT_WALL + db LAND_TILE ; COLL_UP_WALL + db LAND_TILE ; COLL_DOWN_WALL + db LAND_TILE ; COLL_DOWN_RIGHT_WALL + db LAND_TILE ; COLL_DOWN_LEFT_WALL + db LAND_TILE ; COLL_UP_RIGHT_WALL + db LAND_TILE ; COLL_UP_LEFT_WALL + db LAND_TILE ; b8 + db LAND_TILE ; b9 + db LAND_TILE ; ba + db LAND_TILE ; bb + db LAND_TILE ; bc + db LAND_TILE ; bd + db LAND_TILE ; be + db LAND_TILE ; bf + db WATER_TILE ; COLL_RIGHT_BUOY + db WATER_TILE ; COLL_LEFT_BUOY + db WATER_TILE ; COLL_UP_BUOY + db WATER_TILE ; COLL_DOWN_BUOY + db WATER_TILE ; COLL_DOWN_RIGHT_BUOY + db WATER_TILE ; COLL_DOWN_LEFT_BUOY + db WATER_TILE ; COLL_UP_RIGHT_BUOY + db WATER_TILE ; COLL_UP_LEFT_BUOY + db WATER_TILE ; c8 + db WATER_TILE ; c9 + db WATER_TILE ; ca + db WATER_TILE ; cb + db WATER_TILE ; cc + db WATER_TILE ; cd + db WATER_TILE ; ce + db WATER_TILE ; cf + db LAND_TILE ; d0 + db LAND_TILE ; d1 + db LAND_TILE ; d2 + db LAND_TILE ; d3 + db LAND_TILE ; d4 + db LAND_TILE ; d5 + db LAND_TILE ; d6 + db LAND_TILE ; d7 + db LAND_TILE ; d8 + db LAND_TILE ; d9 + db LAND_TILE ; da + db LAND_TILE ; db + db LAND_TILE ; dc + db LAND_TILE ; dd + db LAND_TILE ; de + db LAND_TILE ; df + db LAND_TILE ; e0 + db LAND_TILE ; e1 + db LAND_TILE ; e2 + db LAND_TILE ; e3 + db LAND_TILE ; e4 + db LAND_TILE ; e5 + db LAND_TILE ; e6 + db LAND_TILE ; e7 + db LAND_TILE ; e8 + db LAND_TILE ; e9 + db LAND_TILE ; ea + db LAND_TILE ; eb + db LAND_TILE ; ec + db LAND_TILE ; ed + db LAND_TILE ; ee + db LAND_TILE ; ef + db LAND_TILE ; f0 + db LAND_TILE ; f1 + db LAND_TILE ; f2 + db LAND_TILE ; f3 + db LAND_TILE ; f4 + db LAND_TILE ; f5 + db LAND_TILE ; f6 + db LAND_TILE ; f7 + db LAND_TILE ; f8 + db LAND_TILE ; f9 + db LAND_TILE ; fa + db LAND_TILE ; fb + db LAND_TILE ; fc + db LAND_TILE ; fd + db LAND_TILE ; fe + db WALL_TILE ; COLL_FF + assert_table_length $100 diff --git a/data/collision/collision_stdscripts.asm b/data/collision/collision_stdscripts.asm new file mode 100644 index 0000000..77b4277 --- /dev/null +++ b/data/collision/collision_stdscripts.asm @@ -0,0 +1,18 @@ +; std scripts associated with tile collisions + +MACRO stdcoll + db \1 + dw (\2StdScript - StdScripts) / 3 +ENDM + +TileCollisionStdScripts: + ; collision type, std script + stdcoll COLL_BOOKSHELF, MagazineBookshelfScript + stdcoll COLL_PC, PCScript + stdcoll COLL_RADIO, Radio1Script + stdcoll COLL_TOWN_MAP, TownMapScript + stdcoll COLL_MART_SHELF, MerchandiseShelfScript + stdcoll COLL_TV, TVScript + stdcoll COLL_WINDOW, WindowScript + stdcoll COLL_INCENSE_BURNER, IncenseBurnerScript + db -1 ; end diff --git a/data/collision/field_move_blocks.asm b/data/collision/field_move_blocks.asm new file mode 100644 index 0000000..444be14 --- /dev/null +++ b/data/collision/field_move_blocks.asm @@ -0,0 +1,55 @@ +; these blocks all use COLL_CUT_TREE in one quadrant +CutTreeBlockPointers: +; tileset, block list pointer + dbw TILESET_JOHTO, .johto + dbw TILESET_JOHTO_MODERN, .johto_modern + dbw TILESET_KANTO, .kanto + dbw TILESET_PARK, .park + dbw TILESET_FOREST, .forest + db -1 ; end + +.johto: +; facing block, replacement block, animation + db $03, $02, 1 ; grass + db $5b, $3c, 0 ; tree + db $5f, $3d, 0 ; tree + db $63, $3f, 0 ; tree + db $67, $3e, 0 ; tree + db -1 ; end + +.johto_modern: +; facing block, replacement block, animation + db $03, $02, $01 ; grass + db -1 ; end + +.kanto: +; facing block, replacement block, animation + db $0b, $0a, 1 ; grass + db $32, $6d, 0 ; tree + db $33, $6c, 0 ; tree + db $34, $6f, 0 ; tree + db $35, $4c, 0 ; tree + db $60, $6e, 0 ; tree + db -1 ; end + +.park: +; facing block, replacement block, animation + db $13, $03, 1 ; grass + db $03, $04, 1 ; grass + db -1 ; end + +.forest: +; facing block, replacement block, animation + db $0f, $17, 0 + db -1 ; end + + +; these blocks all use COLL_WHIRLPOOL in one quadrant +WhirlpoolBlockPointers: + dbw TILESET_JOHTO, .johto + db -1 ; end + +.johto: +; facing block, replacement block, animation + db $07, $36, 0 + db -1 ; end diff --git a/data/credits_script.asm b/data/credits_script.asm new file mode 100644 index 0000000..7f349aa --- /dev/null +++ b/data/credits_script.asm @@ -0,0 +1,286 @@ +CreditsScript: + +; Clear the banner. + db CREDITS_CLEAR + +; Pokemon Crystal Version Staff + db STAFF, 1 + + db CREDITS_WAIT, 8 + +; Play the credits music. + db CREDITS_MUSIC + + db CREDITS_WAIT2, 10 + + db CREDITS_WAIT, 1 + +; Update the banner. + db CREDITS_SCENE, 0 ; Pichu + + db DIRECTOR, 1 + db SATOSHI_TAJIRI, 2 + + db CREDITS_WAIT, 12 + + db CODIRECTOR, 1 + db JUNICHI_MASUDA, 2 + + db CREDITS_WAIT, 12 + + db PROGRAMMERS, 0 + db SOUSUKE_TAMADA, 1 + db HISASHI_SOGABE, 2 + db KEITA_KAGAYA, 3 + db YOSHINORI_MATSUDA, 4 + + db CREDITS_WAIT, 12 + + db PROGRAMMERS, 0 + db SHIGEKI_MORIMOTO, 1 + db TETSUYA_WATANABE, 2 + db TAKENORI_OOTA, 3 + + db CREDITS_WAIT, 12 + + db GRAPHICS_DIRECTOR, 1 + db KEN_SUGIMORI, 2 + + db CREDITS_WAIT, 12 + + db MONSTER_DESIGN, 0 + db KEN_SUGIMORI, 1 + db MOTOFUMI_FUJIWARA, 2 + db SHIGEKI_MORIMOTO, 3 + db HIRONOBU_YOSHIDA, 4 + db SATOSHI_OOTA, 5 + + db CREDITS_WAIT, 12 + + db MONSTER_DESIGN, 0 + db ATSUKO_NISHIDA, 1 + db MUNEO_SAITO, 2 + db RENA_YOSHIKAWA, 3 + + db CREDITS_WAIT, 12 + + db POKEMON_ANIMATION, 1 + db HIRONOBU_YOSHIDA, 2 + db JUN_OKUTANI, 3 + + db CREDITS_WAIT, 12 + +; Clear the banner. + db CREDITS_CLEAR + + db CREDITS_WAIT, 1 + +; Update the banner. + db CREDITS_SCENE, 1 ; Smoochum + + db GRAPHICS_DESIGN, 0 + db HIRONOBU_YOSHIDA, 1 + db JUN_OKUTANI, 2 + db ASUKA_IWASHITA, 3 + db TETSUYA_WATANABE, 4 + + db CREDITS_WAIT, 12 + + db CREDIT_MUSIC, 0 + db JUNICHI_MASUDA, 1 + db MORIKAZU_AOKI, 2 + db GO_ICHINOSE, 3 + + db CREDITS_WAIT, 12 + + db CREDIT_SOUND_EFFECTS, 0 + db MORIKAZU_AOKI, 1 + db JUNICHI_MASUDA, 2 + db TETSUYA_WATANABE, 3 + + db CREDITS_WAIT, 12 + + db GAME_DESIGN, 0 + db JUNICHI_MASUDA, 1 + db SHIGEKI_MORIMOTO, 2 + db KOHJI_NISHINO, 3 + + db CREDITS_WAIT, 12 + + db GAME_DESIGN, 0 + db TETSUJI_OOTA, 1 + db HITOMI_SATO, 2 + db KENJI_MATSUSHIMA, 3 + + db CREDITS_WAIT, 12 + + db GAME_SCENARIO, 0 + db JUNICHI_MASUDA, 1 + db KOHJI_NISHINO, 2 + db TOSHINOBU_MATSUMIYA, 3 + db KENJI_MATSUSHIMA, 4 + + db CREDITS_WAIT, 12 + + db POKEDEX_TEXT, 1 + db TOSHINOBU_MATSUMIYA, 2 + + db CREDITS_WAIT, 12 + + db TOOL_PROGRAMMING, 1 + db SOUSUKE_TAMADA, 2 + db TAKENORI_OOTA, 3 + + db CREDITS_WAIT, 12 + + db PARAMETRIC_DESIGN, 1 + db KOHJI_NISHINO, 2 + + db CREDITS_WAIT, 12 + +; Clear the banner. + db CREDITS_CLEAR + + db CREDITS_WAIT, 1 + +; Update the banner. + db CREDITS_SCENE, 2 ; Ditto + + db SCRIPT_DESIGN, 1 + db TETSUJI_OOTA, 2 + db NOBUHIRO_SEYA, 3 + + db CREDITS_WAIT, 12 + + db MAP_DATA_DESIGN, 1 + db TETSUJI_OOTA, 2 + db KAZUHITO_SEKINE, 3 + + db CREDITS_WAIT, 12 + + db MAP_DESIGN, 0 + db TETSUJI_OOTA, 1 + db KOHJI_NISHINO, 2 + db NOBUHIRO_SEYA, 3 + + db CREDITS_WAIT, 12 + + db COORDINATION, 1 + db HIROYUKI_ZINNAI, 2 + + db CREDITS_WAIT, 12 + + db PRODUCERS, 0 + db SATORU_IWATA, 1 + db SATOSHI_YAMATO, 2 + db SHIGERU_MIYAMOTO, 3 + + db CREDITS_WAIT, 12 + + db PRODUCERS, 1 + db TSUNEKAZU_ISHIHARA, 2 + + db CREDITS_WAIT, 12 + +; Clear the banner. + db CREDITS_CLEAR + + db CREDITS_WAIT, 1 + +; Update the banner. + db CREDITS_SCENE, 3 ; Igglybuff + + db US_VERSION_STAFF, 2 + + db CREDITS_WAIT, 9 + + db US_COORDINATION, 1 + db GAIL_TILDEN, 2 + db HIRO_NAKAMURA, 3 + + db CREDITS_WAIT, 12 + + db US_COORDINATION, 1 + db JUNICHI_MASUDA, 2 + db SETH_MCMAHILL, 3 + + db CREDITS_WAIT, 12 + + db US_COORDINATION, 1 + db HIROTO_ALEXANDER, 2 + db TERESA_LILLYGREN, 3 + + db CREDITS_WAIT, 12 + + db TEXT_TRANSLATION, 1 + db NOB_OGASAWARA, 2 + + db CREDITS_WAIT, 12 + + db PROGRAMMERS, 1 + db TERUKI_MURAKAWA, 2 + db KAZUYOSHI_OSAWA, 3 + + db CREDITS_WAIT, 12 + + db PAAD_TESTING, 1 + db THOMAS_HERTZOG, 2 + db ERIK_JOHNSON, 3 + + db CREDITS_WAIT, 12 + + db PRODUCT_TESTING, 0 + db PLANNING, 1 + + db CREDITS_WAIT, 12 + + db PRODUCT_TESTING, 0 + db KEITA_NAKAMURA, 1 + db HIROTAKA_UEMURA, 2 + db HIROAKI_TAMURA, 3 + db NORIAKI_SAKAGUCHI, 4 + + db CREDITS_WAIT, 12 + + db PRODUCT_TESTING, 0 + db NCL_SUPER_MARIO_CLUB, 1 + db KENJI_SAIKI, 2 + db ATSUSHI_TADA, 3 + db MIYUKI_SATO, 4 + + db CREDITS_WAIT, 12 + + db SPECIAL_THANKS, 0 + db KIMIKO_NAKAMICHI, 1 + db AKITO_MORI, 2 + + db CREDITS_WAIT, 12 + + db SPECIAL_THANKS, 0 + db GAKUZI_NOMOTO, 1 + db AI_MASHIMA, 2 + db KUNIMI_KAWAMURA, 3 + + db CREDITS_WAIT, 12 + + db SPECIAL_THANKS, 0 + db MIKIHIRO_ISHIKAWA, 1 + db HIDEYUKI_HASHIMOTO, 2 + + db CREDITS_WAIT, 12 + + db EXECUTIVE_PRODUCER, 1 + db HIROSHI_YAMAUCHI, 2 + + db CREDITS_WAIT, 12 + + db COPYRIGHT, 1 + + db CREDITS_WAIT, 9 + +; Display "The End" graphic. + db CREDITS_THEEND + + db CREDITS_WAIT, 20 + + db CREDITS_END diff --git a/data/credits_strings.asm b/data/credits_strings.asm new file mode 100644 index 0000000..c3a5020 --- /dev/null +++ b/data/credits_strings.asm @@ -0,0 +1,223 @@ +CreditsStringsPointers: +; entries correspond to constants/credits_constants.asm + table_width 2, CreditsStringsPointers + dw .SatoshiTajiri + dw .JunichiMasuda + dw .TetsuyaWatanabe + dw .ShigekiMorimoto + dw .SousukeTamada + dw .TakenoriOota + dw .KenSugimori + dw .MotofumiFujiwara + dw .AtsukoNishida + dw .MuneoSaito + dw .SatoshiOota + dw .RenaYoshikawa + dw .JunOkutani + dw .HironobuYoshida + dw .AsukaIwashita + dw .GoIchinose + dw .MorikazuAoki + dw .KohjiNishino + dw .KenjiMatsushima + dw .ToshinobuMatsumiya + dw .SatoruIwata + dw .NobuhiroSeya + dw .KazuhitoSekine + dw .TetsujiOota + dw .NclSuperMarioClub + dw .Sarugakucho + dw .AkitoMori + dw .TakahiroHarada + dw .TohruHashimoto + dw .NoboruMatsumoto + dw .TakehiroIzushi + dw .TakashiKawaguchi + dw .TsunekazuIshihara + dw .HiroshiYamauchi + dw .KenjiSaiki + dw .AtsushiTada + dw .NaokoKawakami + dw .HiroyukiZinnai + dw .KunimiKawamura + dw .HisashiSogabe + dw .KeitaKagaya + dw .YoshinoriMatsuda + dw .HitomiSato + dw .ToruOsawa + dw .TakaoOhara + dw .YuichiroIto + dw .TakaoShimizu + dw .Planning + dw .KeitaNakamura + dw .HirotakaUemura + dw .HiroakiTamura + dw .NoriakiSakaguchi + dw .MiyukiSato + dw .GakuziNomoto + dw .AiMashima + dw .MikihiroIshikawa + dw .HideyukiHashimoto + dw .SatoshiYamato + dw .ShigeruMiyamoto + dw .GailTilden + dw .NobOgasawara + dw .SethMcMahill + dw .HirotoAlexander + dw .TeresaLillygren + dw .ThomasHertzog + dw .ErikJohnson + dw .HiroNakamura + dw .TerukiMurakawa + dw .KazuyoshiOsawa + dw .KimikoNakamichi + dw .End + dw .Unknown + dw .Staff + dw .Director + dw .CoDirector + dw .Programmers + dw .GraphicsDirector + dw .MonsterDesign + dw .GraphicsDesign + dw .Music + dw .SoundEffects + dw .GameDesign + dw .GameScenario + dw .ToolProgramming + dw .ParametricDesign + dw .ScriptDesign + dw .MapDataDesign + dw .MapDesign + dw .ProductTesting + dw .SpecialThanks + dw .Producers + dw .ExecutiveProducer + dw .PokemonAnimation + dw .PokedexText + dw .MobilePrjLeader + dw .MobileSystemAd + dw .MobileStadiumDir + dw .Coordination + dw .Copyright + dw .UsVersionStaff + dw .UsCoordination + dw .TextTranslation + dw .PaadTesting + assert_table_length NUM_CREDITS_STRINGS + +.SatoshiTajiri: db " SATOSHI TAJIRI@" ; "たじり さとし@" +.JunichiMasuda: db " JUNICHI MASUDA@" ; "ますだ じゅんいち@" +.TetsuyaWatanabe: db " TETSUYA WATANABE@" ; "わたなべ てつや@" +.ShigekiMorimoto: db " SHIGEKI MORIMOTO@" ; "もりもと しげき@" +.SousukeTamada: db " SOUSUKE TAMADA@" ; "たまだ そうすけ@" +.TakenoriOota: db " TAKENORI OOTA@" ; "おおた たけのり@" +.KenSugimori: db " KEN SUGIMORI@" ; "すぎもり けん@" +.MotofumiFujiwara: db " MOTOFUMI FUJIWARA@" ; "ふじわら もとふみ@" +.AtsukoNishida: db " ATSUKO NISHIDA@" ; "にしだ あつこ@" +.MuneoSaito: db " MUNEO SAITO@" ; "さいとう むねお@" +.SatoshiOota: db " SATOSHI OOTA@" ; "おおた さとし@" +.RenaYoshikawa: db " RENA YOSHIKAWA@" ; "よしかわ れな@" +.JunOkutani: db " JUN OKUTANI@" ; "おくたに じゅん@" +.HironobuYoshida: db " HIRONOBU YOSHIDA@" ; "よしだ ひろのぶ@" +.AsukaIwashita: db " ASUKA IWASHITA@" ; "いわした あすか@" +.GoIchinose: db " GO ICHINOSE@" ; "いちのせ ごう@" +.MorikazuAoki: db " MORIKAZU AOKI@" ; "あおき もりかず@" +.KohjiNishino: db " KOHJI NISHINO@" ; "にしの こうじ@" +.KenjiMatsushima: db " KENJI MATSUSHIMA@" ; "まつしま けんじ@" +.ToshinobuMatsumiya: db "TOSHINOBU MATSUMIYA@" ; "まつみや としのぶ@" +.SatoruIwata: db " SATORU IWATA@" ; "いわた さとる@" +.NobuhiroSeya: db " NOBUHIRO SEYA@" ; "せや のぶひろ@" +.KazuhitoSekine: db " KAZUHITO SEKINE@" ; "せきね かずひと@" +.TetsujiOota: db " TETSUJI OOTA@" ; "おおた てつじ@" +.NclSuperMarioClub: db "NCL SUPER MARIO CLUB@" ; "スーパーマりオクラブ@" +.Sarugakucho: db " SARUGAKUCHO@" ; "さるがくちょう@" +.AkitoMori: db " AKITO MORI@" ; "もり あきと@" +.TakahiroHarada: db " TAKAHIRO HARADA@" ; "はらだ たかひろ@" +.TohruHashimoto: db " TOHRU HASHIMOTO@" ; "はしもと とおる@" +.NoboruMatsumoto: db " NOBORU MATSUMOTO@" ; "まつもと のぼる@" +.TakehiroIzushi: db " TAKEHIRO IZUSHI@" ; "いずし たけひろ@" +.TakashiKawaguchi: db " TAKASHI KAWAGUCHI@" ; "かわぐち たかし@" +.TsunekazuIshihara: db " TSUNEKAZU ISHIHARA@" ; "いしはら つねかず@" +.HiroshiYamauchi: db " HIROSHI YAMAUCHI@" ; "やまうち ひろし@" +.KenjiSaiki: db " KENJI SAIKI@" ; "さいき けんじ@" +.AtsushiTada: db " ATSUSHI TADA@" ; "ただ あつし@" +.NaokoKawakami: db " NAOKO KAWAKAMI@" ; "かわかみ なおこ@" +.HiroyukiZinnai: db " HIROYUKI ZINNAI@" ; "じんない ひろゆき@" +.KunimiKawamura: db " KUNIMI KAWAMURA@" ; "かわむら くにみ@" +.HisashiSogabe: db " HISASHI SOGABE@" ; "そがべ ひさし@" +.KeitaKagaya: db " KEITA KAGAYA@" ; "かがや けいた@" +.YoshinoriMatsuda: db " YOSHINORI MATSUDA@" ; "まつだ よしのり@" +.HitomiSato: db " HITOMI SATO@" ; "さとう ひとみ@" +.ToruOsawa: db " TORU OSAWA@" ; "おおさわ とおる@" +.TakaoOhara: db " TAKAO OHARA@" ; "おおはら たかお@" +.YuichiroIto: db " YUICHIRO ITO@" ; "いとう ゆういちろう@" +.TakaoShimizu: db " TAKAO SHIMIZU@" ; "しみず たかお@" +.Planning: db " SPECIAL PRODUCTION" + next " PLANNING" ; "きかくかいはつぶ@" + next " & DEVELOPMENT DEPT.@" +.KeitaNakamura: db " KEITA NAKAMURA@" ; "なかむら けいた@" +.HirotakaUemura: db " HIROTAKA UEMURA@" ; "うえむら ひろたか@" +.HiroakiTamura: db " HIROAKI TAMURA@" ; "たむら ひろあき@" +.NoriakiSakaguchi: db " NORIAKI SAKAGUCHI@" ; "さかぐち のりあき@" +.MiyukiSato: db " MIYUKI SATO@" ; "さとう みゆき@" +.GakuziNomoto: db " GAKUZI NOMOTO@" ; "のもと がくじ@" +.AiMashima: db " AI MASHIMA@" ; "ましま あい@" +.MikihiroIshikawa: db " MIKIHIRO ISHIKAWA@" ; "いしかわ みきひろ@" +.HideyukiHashimoto: db " HIDEYUKI HASHIMOTO@" ; "はしもと ひでゆき@" +.SatoshiYamato: db " SATOSHI YAMATO@" ; "やまと さとし@" +.ShigeruMiyamoto: db " SHIGERU MIYAMOTO@" ; "みやもと しげる@" +.End: db " END@" ; "おしまい@" +.Unknown: db " ????????@" ; "????????@" +.GailTilden: db " GAIL TILDEN@" +.NobOgasawara: db " NOB OGASAWARA@" +.SethMcMahill: db " SETH McMAHILL@" +.HirotoAlexander: db " HIROTO ALEXANDER@" +.TeresaLillygren: db " TERESA LILLYGREN@" +.ThomasHertzog: db " THOMAS HERTZOG@" +.ErikJohnson: db " ERIK JOHNSON@" +.HiroNakamura: db " HIRO NAKAMURA@" +.TerukiMurakawa: db " TERUKI MURAKAWA@" +.KazuyoshiOsawa: db " KAZUYOSHI OSAWA@" +.KimikoNakamichi: db " KIMIKO NAKAMICHI@" +.Staff: db " #MON" ; "ポケットモンスター" + next " CRYSTAL VERSION" ; "  クりスタル バージョン" + next " STAFF@" ; "    スタッフ@" +.Director: db " DIRECTOR@" ; "エグゼクティブ ディレクター@" +.CoDirector: db " CO-DIRECTOR@" ; "ディレクター@" +.Programmers: db " PROGRAMMERS@" ; "プログラム@" +.GraphicsDirector: db " GRAPHICS DIRECTOR@" ; "グラフィック ディレクター@" +.MonsterDesign: db " MONSTER DESIGN@" ; "# デザイン@" +.GraphicsDesign: db " GRAPHICS DESIGN@" ; "グラフィック デザイン@" +.Music: db " MUSIC@" ; "おんがく@" +.SoundEffects: db " SOUND EFFECTS@" ; "サウンド エフェクト@" +.GameDesign: db " GAME DESIGN@" ; "ゲームデザイン@" +.GameScenario: db " GAME SCENARIO@" ; "シナりオ@" +.ToolProgramming: db " TOOL PROGRAMMING@" ; "ツール プログラム@" +.ParametricDesign: db " PARAMETRIC DESIGN@" ; "パラメーター せってい@" +.ScriptDesign: db " SCRIPT DESIGN@" ; "スクりプト せってい@" +.MapDataDesign: db " MAP DATA DESIGN@" ; "マップデータ せってい@" +.MapDesign: db " MAP DESIGN@" ; "マップ デザイン@" +.ProductTesting: db " PRODUCT TESTING@" ; "デバッグプレイ@" +.SpecialThanks: db " SPECIAL THANKS@" ; "スぺシャルサンクス@" +.Producers: db " PRODUCERS@" ; "プロデューサー@" +.ExecutiveProducer: db " EXECUTIVE PRODUCER@" ; "エグゼクティブ プロデューサー@" +.PokemonAnimation: db " #MON ANIMATION@" ; "# アニメーション@" +.PokedexText: db " #DEX TEXT@" ; "ずかん テキスト@" +.MobilePrjLeader: db " MOBILE PRJ. LEADER@" ; "モバイルプロジェクト りーダー@" +.MobileSystemAd: db " MOBILE SYSTEM AD.@" ; "モバイル システムアドバイザー@" +.MobileStadiumDir: db "MOBILE STADIUM DIR.@" ; "モバイルスタジアム ディレクター@" +.Coordination: db " COORDINATION@" ; "コーディネーター@" +.UsVersionStaff: db " US VERSION STAFF@" +.UsCoordination: db " US COORDINATION@" +.TextTranslation: db " TEXT TRANSLATION@" +.PaadTesting: db " PAAD TESTING@" + +.Copyright: + ; (C) 1 9 9 5 - 2 0 0 1 N i n t e n d o + db $60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$6a,$6b,$6c + ; (C) 1 9 9 5 - 2 0 0 1 C r e a t u r e s i n c . + next $60,$61,$62,$63,$64,$65,$66,$6d,$6e,$6f,$70,$71,$72, $7a,$7b,$7c + ; (C) 1 9 9 5 - 2 0 0 1 G A M E F R E A K i n c . + next $60,$61,$62,$63,$64,$65,$66,$73,$74,$75,$76,$77,$78,$79, $7a,$7b,$7c + db "@" diff --git a/data/decorations/attributes.asm b/data/decorations/attributes.asm new file mode 100644 index 0000000..43ebd32 --- /dev/null +++ b/data/decorations/attributes.asm @@ -0,0 +1,89 @@ +MACRO decoration + ; type, name, action, event flag, tile/sprite + db \1, \2, \3 + dw \4 + db \5 +ENDM + +DecorationAttributes: +; entries correspond to deco constants + table_width DECOATTR_STRUCT_LENGTH, DecorationAttributes + decoration DECO_PLANT, 0, 0, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0 + decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BED, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0 + decoration DECO_BED, FEATHERY_BED, SET_UP_BED, EVENT_DECO_BED_1, $1b + decoration DECO_BED, PINK_BED, SET_UP_BED, EVENT_DECO_BED_2, $1c + decoration DECO_BED, POLKADOT_BED, SET_UP_BED, EVENT_DECO_BED_3, $1d + decoration DECO_BED, PIKACHU_BED, SET_UP_BED, EVENT_DECO_BED_4, $1e + decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_CARPET, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0 + decoration DECO_CARPET, RED_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_1, $08 + decoration DECO_CARPET, BLUE_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_2, $0b + decoration DECO_CARPET, YELLOW_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_3, $0e + decoration DECO_CARPET, GREEN_CARPET, SET_UP_CARPET, EVENT_DECO_CARPET_4, $11 + decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_PLANT, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0 + decoration DECO_PLANT, MAGNAPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_1, $20 + decoration DECO_PLANT, TROPICPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_2, $21 + decoration DECO_PLANT, JUMBOPLANT, SET_UP_PLANT, EVENT_DECO_PLANT_3, $22 + decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_POSTER, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0 + decoration DECO_PLANT, TOWN_MAP_POSTER, SET_UP_POSTER, EVENT_DECO_POSTER_1, $1f + decoration DECO_POSTER, 4, SET_UP_POSTER, EVENT_DECO_POSTER_2, $23 + decoration DECO_POSTER, 5, SET_UP_POSTER, EVENT_DECO_POSTER_3, $24 + decoration DECO_POSTER, 6, SET_UP_POSTER, EVENT_DECO_POSTER_4, $25 + decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_CONSOLE, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0 + decoration DECO_PLANT, FAMICOM, SET_UP_CONSOLE, EVENT_DECO_FAMICOM, SPRITE_FAMICOM + decoration DECO_PLANT, SUPER_NES, SET_UP_CONSOLE, EVENT_DECO_SNES, SPRITE_SNES + decoration DECO_PLANT, NINTENDO_64, SET_UP_CONSOLE, EVENT_DECO_N64, SPRITE_N64 + decoration DECO_PLANT, VIRTUAL_BOY, SET_UP_CONSOLE, EVENT_DECO_VIRTUAL_BOY, SPRITE_VIRTUAL_BOY + decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_BIG_DOLL, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0 + decoration DECO_BIGDOLL, 21, SET_UP_BIG_DOLL, EVENT_DECO_BIG_SNORLAX_DOLL, SPRITE_BIG_SNORLAX + decoration DECO_BIGDOLL, 16, SET_UP_BIG_DOLL, EVENT_DECO_BIG_ONIX_DOLL, SPRITE_BIG_ONIX + decoration DECO_BIGDOLL, 20, SET_UP_BIG_DOLL, EVENT_DECO_BIG_LAPRAS_DOLL, SPRITE_BIG_LAPRAS + decoration DECO_PLANT, PUT_IT_AWAY, PUT_AWAY_DOLL, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1, 0 + decoration DECO_DOLL, 4, SET_UP_DOLL, EVENT_DECO_PIKACHU_DOLL, SPRITE_PIKACHU + decoration DECO_PLANT, SURF_PIKA_DOLL, SET_UP_DOLL, EVENT_DECO_SURFING_PIKACHU_DOLL, SPRITE_SURFING_PIKACHU + decoration DECO_DOLL, 5, SET_UP_DOLL, EVENT_DECO_CLEFAIRY_DOLL, SPRITE_CLEFAIRY + decoration DECO_DOLL, 6, SET_UP_DOLL, EVENT_DECO_JIGGLYPUFF_DOLL, SPRITE_JIGGLYPUFF + decoration DECO_DOLL, 0, SET_UP_DOLL, EVENT_DECO_BULBASAUR_DOLL, SPRITE_BULBASAUR + decoration DECO_DOLL, 1, SET_UP_DOLL, EVENT_DECO_CHARMANDER_DOLL, SPRITE_CHARMANDER + decoration DECO_DOLL, 2, SET_UP_DOLL, EVENT_DECO_SQUIRTLE_DOLL, SPRITE_SQUIRTLE + decoration DECO_DOLL, 9, SET_UP_DOLL, EVENT_DECO_POLIWAG_DOLL, SPRITE_POLIWAG + decoration DECO_DOLL, 8, SET_UP_DOLL, EVENT_DECO_DIGLETT_DOLL, SPRITE_DIGLETT + decoration DECO_DOLL, 18, SET_UP_DOLL, EVENT_DECO_STARMIE_DOLL, SPRITE_STARMIE + decoration DECO_DOLL, 19, SET_UP_DOLL, EVENT_DECO_MAGIKARP_DOLL, SPRITE_MAGIKARP + decoration DECO_DOLL, 7, SET_UP_DOLL, EVENT_DECO_ODDISH_DOLL, SPRITE_ODDISH + decoration DECO_DOLL, 15, SET_UP_DOLL, EVENT_DECO_GENGAR_DOLL, SPRITE_GENGAR + decoration DECO_DOLL, 14, SET_UP_DOLL, EVENT_DECO_SHELLDER_DOLL, SPRITE_SHELLDER + decoration DECO_DOLL, 13, SET_UP_DOLL, EVENT_DECO_GRIMER_DOLL, SPRITE_GRIMER + decoration DECO_DOLL, 17, SET_UP_DOLL, EVENT_DECO_VOLTORB_DOLL, SPRITE_VOLTORB + decoration DECO_DOLL, 3, SET_UP_DOLL, EVENT_DECO_WEEDLE_DOLL, SPRITE_WEEDLE + decoration DECO_DOLL, 22, SET_UP_DOLL, EVENT_DECO_UNOWN_DOLL, SPRITE_UNOWN + decoration DECO_DOLL, 12, SET_UP_DOLL, EVENT_DECO_GEODUDE_DOLL, SPRITE_GEODUDE + decoration DECO_DOLL, 10, SET_UP_DOLL, EVENT_DECO_MACHOP_DOLL, SPRITE_MACHOP + decoration DECO_DOLL, 11, 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 + assert_table_length NUM_DECOS + NUM_DECO_CATEGORIES + 1 + +DecorationAttributePokemonNames: + dw BULBASAUR ; 0 + dw CHARMANDER ; 1 + dw SQUIRTLE ; 2 + dw WEEDLE ; 3 + dw PIKACHU ; 4 + dw CLEFAIRY ; 5 + dw JIGGLYPUFF ; 6 + dw ODDISH ; 7 + dw DIGLETT ; 8 + dw POLIWAG ; 9 + dw MACHOP ; 10 + dw TENTACOOL ; 11 + dw GEODUDE ; 12 + dw GRIMER ; 13 + dw SHELLDER ; 14 + dw GENGAR ; 15 + dw ONIX ; 16 + dw VOLTORB ; 17 + dw STARYU ; 18 + dw MAGIKARP ; 19 + dw LAPRAS ; 20 + dw SNORLAX ; 21 + dw UNOWN ; 22 diff --git a/data/decorations/decorations.asm b/data/decorations/decorations.asm new file mode 100644 index 0000000..9cd24d1 --- /dev/null +++ b/data/decorations/decorations.asm @@ -0,0 +1,59 @@ +DecorationIDs: +; see constants/deco_constants.asm + table_width 1, DecorationIDs + + db DECO_FEATHERY_BED ; 2 + db DECO_PINK_BED ; 3 + db DECO_POLKADOT_BED ; 4 + db DECO_PIKACHU_BED ; 5 + + db DECO_RED_CARPET ; 7 + db DECO_BLUE_CARPET ; 8 + db DECO_YELLOW_CARPET ; 9 + db DECO_GREEN_CARPET ; a + + db DECO_MAGNAPLANT ; c + db DECO_TROPICPLANT ; d + db DECO_JUMBOPLANT ; e + + db DECO_TOWN_MAP ; 10 + db DECO_PIKACHU_POSTER ; 11 + db DECO_CLEFAIRY_POSTER ; 12 + db DECO_JIGGLYPUFF_POSTER ; 13 + + db DECO_FAMICOM ; 15 + db DECO_SNES ; 16 + db DECO_N64 ; 17 + db DECO_VIRTUAL_BOY ; 18 + + db DECO_PIKACHU_DOLL ; 1e + db DECO_SURF_PIKACHU_DOLL ; 1f + db DECO_CLEFAIRY_DOLL ; 20 + db DECO_JIGGLYPUFF_DOLL ; 21 + db DECO_BULBASAUR_DOLL ; 22 + db DECO_CHARMANDER_DOLL ; 23 + db DECO_SQUIRTLE_DOLL ; 24 + db DECO_POLIWAG_DOLL ; 25 + db DECO_DIGLETT_DOLL ; 26 + db DECO_STARMIE_DOLL ; 27 + db DECO_MAGIKARP_DOLL ; 28 + db DECO_ODDISH_DOLL ; 29 + db DECO_GENGAR_DOLL ; 2a + db DECO_SHELLDER_DOLL ; 2b + db DECO_GRIMER_DOLL ; 2c + db DECO_VOLTORB_DOLL ; 2d + db DECO_WEEDLE_DOLL ; 2e + db DECO_UNOWN_DOLL ; 2f + db DECO_GEODUDE_DOLL ; 30 + db DECO_MACHOP_DOLL ; 31 + db DECO_TENTACOOL_DOLL ; 32 + + db DECO_BIG_SNORLAX_DOLL ; 1a + db DECO_BIG_ONIX_DOLL ; 1b + db DECO_BIG_LAPRAS_DOLL ; 1c + + db DECO_GOLD_TROPHY_DOLL ; 33 + db DECO_SILVER_TROPHY_DOLL ; 34 + + assert_table_length NUM_DECOS + db -1 ; end diff --git a/data/decorations/mystery_gift_decos.asm b/data/decorations/mystery_gift_decos.asm new file mode 100644 index 0000000..3b75c0a --- /dev/null +++ b/data/decorations/mystery_gift_decos.asm @@ -0,0 +1,39 @@ +MysteryGiftDecos: + db DECOFLAG_PIKACHU_DOLL + db DECOFLAG_BULBASAUR_DOLL + db DECOFLAG_CHARMANDER_DOLL + db DECOFLAG_SQUIRTLE_DOLL + db DECOFLAG_POLIWAG_DOLL + db DECOFLAG_DIGLETT_DOLL + db DECOFLAG_STARMIE_DOLL + db DECOFLAG_MAGIKARP_DOLL + db DECOFLAG_ODDISH_DOLL + db DECOFLAG_GENGAR_DOLL + db DECOFLAG_CLEFAIRY_POSTER + db DECOFLAG_JIGGLYPUFF_POSTER + db DECOFLAG_SNES + db DECOFLAG_SHELLDER_DOLL + db DECOFLAG_VOLTORB_DOLL + db DECOFLAG_WEEDLE_DOLL + db DECOFLAG_MAGNAPLANT + db DECOFLAG_TROPICPLANT + db DECOFLAG_FAMICOM + db DECOFLAG_N64 + db DECOFLAG_SURF_PIKACHU_DOLL + db DECOFLAG_JIGGLYPUFF_DOLL + db DECOFLAG_PINK_BED + db DECOFLAG_POLKADOT_BED + db DECOFLAG_RED_CARPET + db DECOFLAG_BLUE_CARPET + db DECOFLAG_YELLOW_CARPET + db DECOFLAG_GREEN_CARPET + db DECOFLAG_JUMBOPLANT + db DECOFLAG_VIRTUAL_BOY + db DECOFLAG_MACHOP_DOLL + db DECOFLAG_PIKACHU_POSTER + db DECOFLAG_TENTACOOL_DOLL + db DECOFLAG_BIG_ONIX_DOLL + db DECOFLAG_PIKACHU_BED + db DECOFLAG_GRIMER_DOLL + db DECOFLAG_UNOWN_DOLL +.End diff --git a/data/decorations/names.asm b/data/decorations/names.asm new file mode 100644 index 0000000..db418b8 --- /dev/null +++ b/data/decorations/names.asm @@ -0,0 +1,30 @@ +DecorationNames: +; entries correspond to constants/deco_constants.asm + list_start DecorationNames + li "CANCEL" + li "PUT IT AWAY" + li "MAGNAPLANT" + li "TROPICPLANT" + li "JUMBOPLANT" + li "TOWN MAP" + li "NES" + li "SUPER NES" + li "NINTENDO 64" + li "VIRTUAL BOY" + li "GOLD TROPHY" + li "SILVER TROPHY" + li "SURF PIKACHU DOLL" + li " BED" + li " CARPET" + li " POSTER" + li " DOLL" + li "BIG " + li "FEATHERY" + li "PIKACHU" + li "PINK" + li "POLKADOT" + li "RED" + li "BLUE" + li "YELLOW" + li "GREEN" + assert_list_length NUM_DECO_NAMES diff --git a/data/default_options.asm b/data/default_options.asm new file mode 100644 index 0000000..76de343 --- /dev/null +++ b/data/default_options.asm @@ -0,0 +1,18 @@ +DefaultOptions: +; wOptions: med text speed + db TEXT_DELAY_MED +; wSaveFileExists: no + db FALSE +; wTextboxFrame: frame 1 + db FRAME_1 +; wTextboxFlags: use text speed + db 1 << FAST_TEXT_DELAY_F +; wGBPrinterBrightness: normal + db GBPRINTER_NORMAL +; wOptions2: menu account on + db 1 << MENU_ACCOUNT + + db $00 + db $00 +.End + assert DefaultOptions.End - DefaultOptions == wOptionsEnd - wOptions diff --git a/data/events/bug_contest_flags.asm b/data/events/bug_contest_flags.asm new file mode 100644 index 0000000..f3d9ff7 --- /dev/null +++ b/data/events/bug_contest_flags.asm @@ -0,0 +1,13 @@ +BugCatchingContestantEventFlagTable: + table_width 2, BugCatchingContestantEventFlagTable + dw EVENT_BUG_CATCHING_CONTESTANT_1A + dw EVENT_BUG_CATCHING_CONTESTANT_2A + dw EVENT_BUG_CATCHING_CONTESTANT_3A + dw EVENT_BUG_CATCHING_CONTESTANT_4A + dw EVENT_BUG_CATCHING_CONTESTANT_5A + dw EVENT_BUG_CATCHING_CONTESTANT_6A + dw EVENT_BUG_CATCHING_CONTESTANT_7A + dw EVENT_BUG_CATCHING_CONTESTANT_8A + dw EVENT_BUG_CATCHING_CONTESTANT_9A + dw EVENT_BUG_CATCHING_CONTESTANT_10A + assert_table_length NUM_BUG_CONTESTANTS diff --git a/data/events/bug_contest_winners.asm b/data/events/bug_contest_winners.asm new file mode 100644 index 0000000..a36a57e --- /dev/null +++ b/data/events/bug_contest_winners.asm @@ -0,0 +1,80 @@ +BugContestantPointers: + table_width 2, BugContestantPointers + dw BugContestant_BugCatcherDon ; this reverts back to the player + dw BugContestant_BugCatcherDon + dw BugContestant_BugCatcherEd + dw BugContestant_CooltrainerMNick + dw BugContestant_PokefanMWilliam + dw BugContestant_BugCatcherBenny + dw BugContestant_CamperBarry + dw BugContestant_PicnickerCindy + dw BugContestant_BugCatcherJosh + dw BugContestant_YoungsterSamuel + dw BugContestant_SchoolboyKipp + assert_table_length NUM_BUG_CONTESTANTS + 1 + +; contestant format: +; db class, id +; dw 1st-place mon, score +; dw 2nd-place mon, score +; dw 3rd-place mon, score + +BugContestant_BugCatcherDon: + db BUG_CATCHER, DON + dw KAKUNA, 300 + dw METAPOD, 285 + dw CATERPIE, 226 + +BugContestant_BugCatcherEd: + db BUG_CATCHER, ED + dw BUTTERFREE, 286 + dw BUTTERFREE, 251 + dw CATERPIE, 237 + +BugContestant_CooltrainerMNick: + db COOLTRAINERM, NICK + dw SCYTHER, 357 + dw BUTTERFREE, 349 + dw PINSIR, 368 + +BugContestant_PokefanMWilliam: + db POKEFANM, WILLIAM + dw PINSIR, 332 + dw BUTTERFREE, 324 + dw VENONAT, 321 + +BugContestant_BugCatcherBenny: + db BUG_CATCHER, BUG_CATCHER_BENNY + dw BUTTERFREE, 318 + dw WEEDLE, 295 + dw CATERPIE, 285 + +BugContestant_CamperBarry: + db CAMPER, BARRY + dw PINSIR, 366 + dw VENONAT, 329 + dw KAKUNA, 314 + +BugContestant_PicnickerCindy: + db PICNICKER, CINDY + dw BUTTERFREE, 341 + dw METAPOD, 301 + dw CATERPIE, 264 + +BugContestant_BugCatcherJosh: + db BUG_CATCHER, JOSH + dw SCYTHER, 326 + dw BUTTERFREE, 292 + dw METAPOD, 282 + +BugContestant_YoungsterSamuel: + db YOUNGSTER, SAMUEL + dw WEEDLE, 270 + dw PINSIR, 282 + dw CATERPIE, 251 + +BugContestant_SchoolboyKipp: + db SCHOOLBOY, KIPP + dw VENONAT, 267 + dw PARAS, 254 + dw KAKUNA, 259 diff --git a/data/events/elevator_floors.asm b/data/events/elevator_floors.asm new file mode 100644 index 0000000..861653b --- /dev/null +++ b/data/events/elevator_floors.asm @@ -0,0 +1,37 @@ +ElevatorFloorNames: +; entries correspond to FLOOR_* constants + table_width 2, ElevatorFloorNames + dw .B4F + dw .B3F + dw .B2F + dw .B1F + dw ._1F + dw ._2F + dw ._3F + dw ._4F + dw ._5F + dw ._6F + dw ._7F + dw ._8F + dw ._9F + dw ._10F + dw ._11F + dw .ROOF + assert_table_length NUM_FLOORS + +.B4F: db "B4F@" +.B3F: db "B3F@" +.B2F: db "B2F@" +.B1F: db "B1F@" +._1F: db "1F@" +._2F: db "2F@" +._3F: db "3F@" +._4F: db "4F@" +._5F: db "5F@" +._6F: db "6F@" +._7F: db "7F@" +._8F: db "8F@" +._9F: db "9F@" +._10F: db "10F@" +._11F: db "11F@" +.ROOF: db "ROOF@" diff --git a/data/events/engine_flags.asm b/data/events/engine_flags.asm new file mode 100644 index 0000000..e579a82 --- /dev/null +++ b/data/events/engine_flags.asm @@ -0,0 +1,202 @@ +MACRO engine_flag +; location, bit +; (all locations are in WRAM bank 1) + dwb \1 + (\2 / 8), 1 << (\2 % 8) +ENDM + +EngineFlags: +; entries correspond to ENGINE_* constants + table_width 3, EngineFlags + + ; pokegear + engine_flag wPokegearFlags, POKEGEAR_RADIO_CARD_F + engine_flag wPokegearFlags, POKEGEAR_MAP_CARD_F + engine_flag wPokegearFlags, POKEGEAR_PHONE_CARD_F + engine_flag wPokegearFlags, POKEGEAR_EXPN_CARD_F + engine_flag wPokegearFlags, POKEGEAR_OBTAINED_F + + ; day-care + engine_flag wDayCareMan, DAYCAREMAN_HAS_EGG_F + engine_flag wDayCareMan, DAYCAREMAN_HAS_MON_F + engine_flag wDayCareLady, DAYCARELADY_HAS_MON_F + + engine_flag wMomSavingMoney, MOM_SAVING_SOME_MONEY_F + engine_flag wMomSavingMoney, MOM_ACTIVE_F + + engine_flag wUnusedTwoDayTimerOn, 0 ; unused, possibly related to a 2-day timer + + engine_flag wStatusFlags, STATUSFLAGS_POKEDEX_F + engine_flag wStatusFlags, STATUSFLAGS_UNOWN_DEX_F + engine_flag wStatusFlags, STATUSFLAGS_CAUGHT_POKERUS_F + engine_flag wStatusFlags, STATUSFLAGS_ROCKET_SIGNAL_F + engine_flag wStatusFlags, STATUSFLAGS_HALL_OF_FAME_F + engine_flag wStatusFlags, STATUSFLAGS_MAIN_MENU_MOBILE_CHOICES_F + + engine_flag wStatusFlags2, STATUSFLAGS2_BUG_CONTEST_TIMER_F + engine_flag wStatusFlags2, STATUSFLAGS2_SAFARI_GAME_F + engine_flag wStatusFlags2, STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F + engine_flag wStatusFlags2, STATUSFLAGS2_BIKE_SHOP_CALL_F + engine_flag wStatusFlags2, STATUSFLAGS2_UNUSED_5_F + engine_flag wStatusFlags2, STATUSFLAGS2_REACHED_GOLDENROD_F + engine_flag wStatusFlags2, STATUSFLAGS2_ROCKETS_IN_MAHOGANY_F + + engine_flag wBikeFlags, BIKEFLAGS_STRENGTH_ACTIVE_F + engine_flag wBikeFlags, BIKEFLAGS_ALWAYS_ON_BIKE_F + engine_flag wBikeFlags, BIKEFLAGS_DOWNHILL_F + + engine_flag wJohtoBadges, ZEPHYRBADGE + engine_flag wJohtoBadges, HIVEBADGE + engine_flag wJohtoBadges, PLAINBADGE + engine_flag wJohtoBadges, FOGBADGE + engine_flag wJohtoBadges, MINERALBADGE + engine_flag wJohtoBadges, STORMBADGE + engine_flag wJohtoBadges, GLACIERBADGE + engine_flag wJohtoBadges, RISINGBADGE + + engine_flag wKantoBadges, BOULDERBADGE + engine_flag wKantoBadges, CASCADEBADGE + engine_flag wKantoBadges, THUNDERBADGE + engine_flag wKantoBadges, RAINBOWBADGE + engine_flag wKantoBadges, SOULBADGE + engine_flag wKantoBadges, MARSHBADGE + engine_flag wKantoBadges, VOLCANOBADGE + engine_flag wKantoBadges, EARTHBADGE + + ; unown sets (see data/wild/unlocked_unowns.asm) + engine_flag wUnlockedUnowns, UNLOCKED_UNOWNS_A_TO_K_F + engine_flag wUnlockedUnowns, UNLOCKED_UNOWNS_L_TO_R_F + engine_flag wUnlockedUnowns, UNLOCKED_UNOWNS_S_TO_W_F + engine_flag wUnlockedUnowns, UNLOCKED_UNOWNS_X_TO_Z_F + engine_flag wUnlockedUnowns, 4 ; unused + engine_flag wUnlockedUnowns, 5 ; unused + engine_flag wUnlockedUnowns, 6 ; unused + engine_flag wUnlockedUnowns, 7 ; unused + + ; fly + engine_flag wVisitedSpawns, SPAWN_HOME + engine_flag wVisitedSpawns, SPAWN_DEBUG + engine_flag wVisitedSpawns, SPAWN_PALLET + engine_flag wVisitedSpawns, SPAWN_VIRIDIAN + engine_flag wVisitedSpawns, SPAWN_PEWTER + engine_flag wVisitedSpawns, SPAWN_CERULEAN + engine_flag wVisitedSpawns, SPAWN_ROCK_TUNNEL + engine_flag wVisitedSpawns, SPAWN_VERMILION + engine_flag wVisitedSpawns, SPAWN_LAVENDER + engine_flag wVisitedSpawns, SPAWN_SAFFRON + engine_flag wVisitedSpawns, SPAWN_CELADON + engine_flag wVisitedSpawns, SPAWN_FUCHSIA + engine_flag wVisitedSpawns, SPAWN_CINNABAR + engine_flag wVisitedSpawns, SPAWN_INDIGO + engine_flag wVisitedSpawns, SPAWN_NEW_BARK + engine_flag wVisitedSpawns, SPAWN_CHERRYGROVE + engine_flag wVisitedSpawns, SPAWN_VIOLET + engine_flag wVisitedSpawns, SPAWN_AZALEA + engine_flag wVisitedSpawns, SPAWN_CIANWOOD + engine_flag wVisitedSpawns, SPAWN_GOLDENROD + engine_flag wVisitedSpawns, SPAWN_OLIVINE + engine_flag wVisitedSpawns, SPAWN_ECRUTEAK + engine_flag wVisitedSpawns, SPAWN_MAHOGANY + engine_flag wVisitedSpawns, SPAWN_LAKE_OF_RAGE + engine_flag wVisitedSpawns, SPAWN_BLACKTHORN + engine_flag wVisitedSpawns, SPAWN_MT_SILVER + engine_flag wVisitedSpawns, NUM_SPAWNS ; unused + + engine_flag wLuckyNumberShowFlag, LUCKYNUMBERSHOW_GAME_OVER_F + + engine_flag wStatusFlags2, STATUSFLAGS2_UNUSED_3_F + + engine_flag wDailyFlags1, DAILYFLAGS1_KURT_MAKING_BALLS_F + engine_flag wDailyFlags1, DAILYFLAGS1_BUG_CONTEST_F + engine_flag wDailyFlags1, DAILYFLAGS1_FISH_SWARM_F + engine_flag wDailyFlags1, DAILYFLAGS1_TIME_CAPSULE_F + engine_flag wDailyFlags1, DAILYFLAGS1_ALL_FRUIT_TREES_F + engine_flag wDailyFlags1, DAILYFLAGS1_GOT_SHUCKIE_TODAY_F + engine_flag wDailyFlags1, DAILYFLAGS1_GOLDENROD_UNDERGROUND_BARGAIN_F + engine_flag wDailyFlags1, DAILYFLAGS1_TRAINER_HOUSE_F + + engine_flag wDailyFlags2, DAILYFLAGS2_MT_MOON_SQUARE_CLEFAIRY_F + engine_flag wDailyFlags2, DAILYFLAGS2_UNION_CAVE_LAPRAS_F + engine_flag wDailyFlags2, DAILYFLAGS2_GOLDENROD_UNDERGROUND_GOT_HAIRCUT_F + engine_flag wDailyFlags2, DAILYFLAGS2_GOLDENROD_DEPT_STORE_TM27_RETURN_F + engine_flag wDailyFlags2, DAILYFLAGS2_DAISYS_GROOMING_F + engine_flag wDailyFlags2, DAILYFLAGS2_INDIGO_PLATEAU_RIVAL_FIGHT_F + engine_flag wDailyFlags2, DAILYFLAGS2_MOVE_TUTOR_F + engine_flag wDailyFlags2, DAILYFLAGS2_BUENAS_PASSWORD_F + + engine_flag wSwarmFlags, SWARMFLAGS_BUENAS_PASSWORD_F + engine_flag wSwarmFlags, SWARMFLAGS_GOLDENROD_DEPT_STORE_SALE_F + + engine_flag wGameTimerPaused, GAME_TIMER_MOBILE_F + + engine_flag wPlayerGender, PLAYERGENDER_FEMALE_F + + engine_flag wCelebiEvent, CELEBIEVENT_FOREST_IS_RESTLESS_F + + ; rematches + engine_flag wDailyRematchFlags, 0 ; jack + engine_flag wDailyRematchFlags, 1 ; huey + engine_flag wDailyRematchFlags, 2 ; gaven + engine_flag wDailyRematchFlags, 3 ; beth + engine_flag wDailyRematchFlags, 4 ; jose + engine_flag wDailyRematchFlags, 5 ; reena + engine_flag wDailyRematchFlags, 6 ; joey + engine_flag wDailyRematchFlags, 7 ; wade + engine_flag wDailyRematchFlags, 8 ; ralph + engine_flag wDailyRematchFlags, 9 ; liz + engine_flag wDailyRematchFlags, 10 ; anthony + engine_flag wDailyRematchFlags, 11 ; todd + engine_flag wDailyRematchFlags, 12 ; gina + engine_flag wDailyRematchFlags, 13 ; arnie + engine_flag wDailyRematchFlags, 14 ; alan + engine_flag wDailyRematchFlags, 15 ; dana + engine_flag wDailyRematchFlags, 16 ; chad + engine_flag wDailyRematchFlags, 17 ; tully + engine_flag wDailyRematchFlags, 18 ; brent + engine_flag wDailyRematchFlags, 19 ; tiffany + engine_flag wDailyRematchFlags, 20 ; vance + engine_flag wDailyRematchFlags, 21 ; wilton + engine_flag wDailyRematchFlags, 22 ; parry + engine_flag wDailyRematchFlags, 23 ; erin + + engine_flag wDailyPhoneItemFlags, 0 ; beverly has nugget + engine_flag wDailyPhoneItemFlags, 1 ; jose has star piece + engine_flag wDailyPhoneItemFlags, 2 ; wade has item (see EVENT_WADE_HAS_*** in constants/event_flags.asm) + engine_flag wDailyPhoneItemFlags, 3 ; gina has leaf stone + engine_flag wDailyPhoneItemFlags, 4 ; alan has fire stone + engine_flag wDailyPhoneItemFlags, 5 ; liz has thunderstone + engine_flag wDailyPhoneItemFlags, 6 ; derek has nugget + engine_flag wDailyPhoneItemFlags, 7 ; tully has water stone + engine_flag wDailyPhoneItemFlags, 8 ; tiffany has pink bow + engine_flag wDailyPhoneItemFlags, 9 ; wilton has item (see EVENT_WILTON_HAS_*** in constants/event_flags.asm) + + engine_flag wDailyPhoneTimeOfDayFlags, 0 ; jack + engine_flag wDailyPhoneTimeOfDayFlags, 1 ; huey + engine_flag wDailyPhoneTimeOfDayFlags, 2 ; gaven + engine_flag wDailyPhoneTimeOfDayFlags, 3 ; beth + engine_flag wDailyPhoneTimeOfDayFlags, 4 ; jose + engine_flag wDailyPhoneTimeOfDayFlags, 5 ; reena + engine_flag wDailyPhoneTimeOfDayFlags, 6 ; joey + engine_flag wDailyPhoneTimeOfDayFlags, 7 ; wade + engine_flag wDailyPhoneTimeOfDayFlags, 8 ; ralph + engine_flag wDailyPhoneTimeOfDayFlags, 9 ; liz + engine_flag wDailyPhoneTimeOfDayFlags, 10 ; anthony + engine_flag wDailyPhoneTimeOfDayFlags, 11 ; todd + engine_flag wDailyPhoneTimeOfDayFlags, 12 ; gina + engine_flag wDailyPhoneTimeOfDayFlags, 13 ; arnie + engine_flag wDailyPhoneTimeOfDayFlags, 14 ; alan + engine_flag wDailyPhoneTimeOfDayFlags, 15 ; dana + engine_flag wDailyPhoneTimeOfDayFlags, 16 ; chad + engine_flag wDailyPhoneTimeOfDayFlags, 17 ; tully + engine_flag wDailyPhoneTimeOfDayFlags, 18 ; brent + engine_flag wDailyPhoneTimeOfDayFlags, 19 ; tiffany + engine_flag wDailyPhoneTimeOfDayFlags, 20 ; vance + engine_flag wDailyPhoneTimeOfDayFlags, 21 ; wilton + engine_flag wDailyPhoneTimeOfDayFlags, 22 ; parry + engine_flag wDailyPhoneTimeOfDayFlags, 23 ; erin + + engine_flag wPlayerSpriteSetupFlags, PLAYERSPRITESETUP_FEMALE_TO_MALE_F + + engine_flag wSwarmFlags, SWARMFLAGS_DUNSPARCE_SWARM_F + engine_flag wSwarmFlags, SWARMFLAGS_YANMA_SWARM_F + + assert_table_length NUM_ENGINE_FLAGS diff --git a/data/events/happiness_changes.asm b/data/events/happiness_changes.asm new file mode 100644 index 0000000..e6228cf --- /dev/null +++ b/data/events/happiness_changes.asm @@ -0,0 +1,24 @@ +HappinessChanges: +; entries correspond to HAPPINESS_* constants + table_width 3, HappinessChanges + ; change if happiness < 100, change if happiness < 200, change otherwise + db +5, +3, +2 ; Gained a level + db +5, +3, +2 ; Vitamin + db +1, +1, +0 ; X Item + db +3, +2, +1 ; Battled a Gym Leader + db +1, +1, +0 ; Learned a move + db -1, -1, -1 ; Lost to an enemy + db -5, -5, -10 ; Fainted due to poison + db -5, -5, -10 ; Lost to a much stronger enemy + db +1, +1, +1 ; Haircut (older brother) 1 + db +3, +3, +1 ; Haircut (older brother) 2 + db +5, +5, +2 ; Haircut (older brother) 3 + db +1, +1, +1 ; Haircut (younger brother) 1 + db +3, +3, +1 ; Haircut (younger brother) 2 + db +10, +10, +4 ; Haircut (younger brother) 3 + db -5, -5, -10 ; Used Heal Powder or Energypowder (bitter) + db -10, -10, -15 ; Used Energy Root (bitter) + db -15, -15, -20 ; Used Revival Herb (bitter) + db +3, +3, +1 ; Grooming + db +10, +6, +4 ; Gained a level in the place where it was caught + assert_table_length NUM_HAPPINESS_CHANGES diff --git a/data/events/happiness_probabilities.asm b/data/events/happiness_probabilities.asm new file mode 100644 index 0000000..584fd1c --- /dev/null +++ b/data/events/happiness_probabilities.asm @@ -0,0 +1,13 @@ +HappinessData_OlderHaircutBrother: + db 30 percent, 2, HAPPINESS_OLDERCUT1 ; 30% chance + db 50 percent + 1, 3, HAPPINESS_OLDERCUT2 ; 50% chance + db -1, 4, HAPPINESS_OLDERCUT3 ; 20% chance + +HappinessData_YoungerHaircutBrother: + db 60 percent + 1, 2, HAPPINESS_YOUNGCUT1 ; 60% chance + db 30 percent, 3, HAPPINESS_YOUNGCUT2 ; 30% chance + db -1, 4, HAPPINESS_YOUNGCUT3 ; 10% chance + +HappinessData_DaisysGrooming: +; BUG: Daisy's grooming doesn't always increase happiness (see docs/bugs_and_glitches.md) + db -1, 2, HAPPINESS_GROOMING ; 99.6% chance diff --git a/data/events/magikarp_lengths.asm b/data/events/magikarp_lengths.asm new file mode 100644 index 0000000..1a1040d --- /dev/null +++ b/data/events/magikarp_lengths.asm @@ -0,0 +1,20 @@ +MagikarpLengths: +; [wMagikarpLength] = z * 100 + (bc - x) / y +; First argument is the bc threshold as well as x. +; Second argument is y. +; In reality, due to the bug at .BCLessThanDE, +; the threshold is determined by only register b. + dwb 110, 1 ; not used unless the bug is fixed + dwb 310, 2 + dwb 710, 4 + dwb 2710, 20 + dwb 7710, 50 + dwb 17710, 100 + dwb 32710, 150 + dwb 47710, 150 + dwb 57710, 100 + dwb 62710, 50 + dwb 64710, 20 + dwb 65210, 5 + dwb 65410, 2 + dwb 65510, 1 ; not used diff --git a/data/events/npc_trades.asm b/data/events/npc_trades.asm new file mode 100644 index 0000000..33ba2bc --- /dev/null +++ b/data/events/npc_trades.asm @@ -0,0 +1,22 @@ +MACRO npctrade +; dialog set, requested mon, offered mon, nickname, dvs, item, OT ID, OT name, gender requested + db \1 + dw \2, \3 + db \4, \5, \6, \7 + shift + dw \7 + db \8, \9 + db 0, 0 +ENDM + +NPCTrades: +; entries correspond to NPCTRADE_* constants + table_width NPCTRADE_STRUCT_LENGTH, NPCTrades + 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 + npctrade TRADE_DIALOGSET_HAPPY, KRABBY, VOLTORB, "VOLTY@@@@@@", $98, $88, PRZCUREBERRY, 29189, "TIM@@@@@", TRADE_GENDER_EITHER + npctrade TRADE_DIALOGSET_GIRL, DRAGONAIR, DODRIO, "DORIS@@@@@@", $77, $66, SMOKE_BALL, 00283, "EMY@@@@@", TRADE_GENDER_FEMALE + 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 + assert_table_length NUM_NPC_TRADES diff --git a/data/events/odd_eggs.asm b/data/events/odd_eggs.asm new file mode 100644 index 0000000..7046d53 --- /dev/null +++ b/data/events/odd_eggs.asm @@ -0,0 +1,437 @@ +DEF NUM_ODD_EGGS EQU 14 + +MACRO prob + DEF prob_total += \1 + dw prob_total * $ffff / 100 +ENDM + +OddEggProbabilities: +; entries correspond to OddEggs (below) + table_width 2, OddEggProbabilities +DEF prob_total = 0 +; Pichu + prob 8 + prob 1 +; Cleffa + prob 16 + prob 3 +; Igglybuff + prob 16 + prob 3 +; Smoochum + prob 14 + prob 2 +; Magby + prob 10 + prob 2 +; Elekid + prob 12 + prob 2 +; Tyrogue + prob 10 + prob 1 + assert_table_length NUM_ODD_EGGS + assert prob_total == 100, "OddEggProbabilities do not sum to 100%!" + +OddEggSpecies: + table_width 2, OddEggSpecies + dw PICHU + dw PICHU + dw CLEFFA + dw CLEFFA + dw IGGLYBUFF + dw IGGLYBUFF + dw SMOOCHUM + dw SMOOCHUM + dw MAGBY + dw MAGBY + dw ELEKID + dw ELEKID + dw TYROGUE + dw TYROGUE + assert_table_length NUM_ODD_EGGS + +OddEggMoves: + dw THUNDERSHOCK, CHARM, DIZZY_PUNCH, NO_MOVE + dw THUNDERSHOCK, CHARM, DIZZY_PUNCH, NO_MOVE + dw POUND, CHARM, DIZZY_PUNCH, NO_MOVE + dw POUND, CHARM, DIZZY_PUNCH, NO_MOVE + dw SING, CHARM, DIZZY_PUNCH, NO_MOVE + dw SING, CHARM, DIZZY_PUNCH, NO_MOVE + dw POUND, LICK, DIZZY_PUNCH, NO_MOVE + dw POUND, LICK, DIZZY_PUNCH, NO_MOVE + dw EMBER, DIZZY_PUNCH, NO_MOVE, NO_MOVE + dw EMBER, DIZZY_PUNCH, NO_MOVE, NO_MOVE + dw QUICK_ATTACK, LEER, DIZZY_PUNCH, NO_MOVE + dw QUICK_ATTACK, LEER, DIZZY_PUNCH, NO_MOVE + dw TACKLE, DIZZY_PUNCH, NO_MOVE, NO_MOVE + dw TACKLE, DIZZY_PUNCH, NO_MOVE, NO_MOVE + +OddEggs: + table_width NICKNAMED_MON_STRUCT_LENGTH, OddEggs + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 02048 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 0, 0, 0, 0 ; DVs + db 30, 20, 10, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 17 ; Max HP + bigdw 9 ; Atk + bigdw 6 ; Def + bigdw 11 ; Spd + bigdw 8 ; SAtk + bigdw 8 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 00256 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 2, 10, 10, 10 ; DVs + db 30, 20, 10, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 17 ; Max HP + bigdw 9 ; Atk + bigdw 7 ; Def + bigdw 12 ; Spd + bigdw 9 ; SAtk + bigdw 9 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 04096 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 0, 0, 0, 0 ; DVs + db 35, 20, 10, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 20 ; Max HP + bigdw 7 ; Atk + bigdw 7 ; Def + bigdw 6 ; Spd + bigdw 9 ; SAtk + bigdw 10 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 00768 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 2, 10, 10, 10 ; DVs + db 35, 20, 10, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 20 ; Max HP + bigdw 7 ; Atk + bigdw 8 ; Def + bigdw 7 ; Spd + bigdw 10 ; SAtk + bigdw 11 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 04096 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 0, 0, 0, 0 ; DVs + db 15, 20, 10, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 24 ; Max HP + bigdw 8 ; Atk + bigdw 6 ; Def + bigdw 6 ; Spd + bigdw 9 ; SAtk + bigdw 7 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 00768 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 2, 10, 10, 10 ; DVs + db 15, 20, 10, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 24 ; Max HP + bigdw 8 ; Atk + bigdw 7 ; Def + bigdw 7 ; Spd + bigdw 10 ; SAtk + bigdw 8 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 03584 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 0, 0, 0, 0 ; DVs + db 35, 30, 10, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 19 ; Max HP + bigdw 8 ; Atk + bigdw 6 ; Def + bigdw 11 ; Spd + bigdw 13 ; SAtk + bigdw 11 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 00512 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 2, 10, 10, 10 ; DVs + db 35, 30, 10, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 19 ; Max HP + bigdw 8 ; Atk + bigdw 7 ; Def + bigdw 12 ; Spd + bigdw 14 ; SAtk + bigdw 12 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 02560 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 0, 0, 0, 0 ; DVs + db 25, 10, 0, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 19 ; Max HP + bigdw 12 ; Atk + bigdw 8 ; Def + bigdw 13 ; Spd + bigdw 12 ; SAtk + bigdw 10 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 00512 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 2, 10, 10, 10 ; DVs + db 25, 10, 0, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 19 ; Max HP + bigdw 12 ; Atk + bigdw 9 ; Def + bigdw 14 ; Spd + bigdw 13 ; SAtk + bigdw 11 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 03072 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 0, 0, 0, 0 ; DVs + db 30, 30, 10, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 19 ; Max HP + bigdw 11 ; Atk + bigdw 8 ; Def + bigdw 14 ; Spd + bigdw 11 ; SAtk + bigdw 10 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 00512 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 2, 10, 10, 10 ; DVs + db 30, 30, 10, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 19 ; Max HP + bigdw 11 ; Atk + bigdw 9 ; Def + bigdw 15 ; Spd + bigdw 12 ; SAtk + bigdw 11 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 02560 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 0, 0, 0, 0 ; DVs + db 35, 10, 0, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 18 ; Max HP + bigdw 8 ; Atk + bigdw 8 ; Def + bigdw 8 ; Spd + bigdw 8 ; SAtk + bigdw 8 ; SDef + db "EGG@@@@@@@@" + + db 0 ; Species, will be filled on load + db NO_ITEM + db 0, 0, 0, 0 ; Moves, will be filled on load + dw 00256 ; OT ID + dt 125 ; Exp + ; Stat exp + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + bigdw 0 + dn 2, 10, 10, 10 ; DVs + db 35, 10, 0, 0 ; PP + db 20 ; Step cycles to hatch + db 0, 0, 0 ; Pokerus, Caught data + db 5 ; Level + db 0, 0 ; Status + bigdw 0 ; HP + bigdw 18 ; Max HP + bigdw 8 ; Atk + bigdw 9 ; Def + bigdw 9 ; Spd + bigdw 9 ; SAtk + bigdw 9 ; SDef + db "EGG@@@@@@@@" + + assert_table_length NUM_ODD_EGGS diff --git a/data/events/pokedex_ratings.asm b/data/events/pokedex_ratings.asm new file mode 100644 index 0000000..a0a7ab6 --- /dev/null +++ b/data/events/pokedex_ratings.asm @@ -0,0 +1,22 @@ +OakRatings: +; if you caught at most this many, play this sound, load this text +; (text is defined in engine/events/prof_oaks_pc.asm) + dw 9, SFX_DEX_FANFARE_LESS_THAN_20, OakRating01 + dw 19, SFX_DEX_FANFARE_LESS_THAN_20, OakRating02 + dw 34, SFX_DEX_FANFARE_20_49, OakRating03 + dw 49, SFX_DEX_FANFARE_20_49, OakRating04 + dw 64, SFX_DEX_FANFARE_50_79, OakRating05 + dw 79, SFX_DEX_FANFARE_50_79, OakRating06 + dw 94, SFX_DEX_FANFARE_80_109, OakRating07 + dw 109, SFX_DEX_FANFARE_80_109, OakRating08 + dw 124, SFX_CAUGHT_MON, OakRating09 + dw 139, SFX_CAUGHT_MON, OakRating10 + dw 154, SFX_DEX_FANFARE_140_169, OakRating11 + dw 169, SFX_DEX_FANFARE_140_169, OakRating12 + dw 184, SFX_DEX_FANFARE_170_199, OakRating13 + dw 199, SFX_DEX_FANFARE_170_199, OakRating14 + dw 214, SFX_DEX_FANFARE_200_229, OakRating15 + dw 229, SFX_DEX_FANFARE_200_229, OakRating16 + dw 239, SFX_DEX_FANFARE_230_PLUS, OakRating17 + dw 248, SFX_DEX_FANFARE_230_PLUS, OakRating18 + dw -1, SFX_DEX_FANFARE_230_PLUS, OakRating19 diff --git a/data/events/special_pointers.asm b/data/events/special_pointers.asm new file mode 100644 index 0000000..36fa6d1 --- /dev/null +++ b/data/events/special_pointers.asm @@ -0,0 +1,185 @@ +; Special routines can be used with the "special" map script command. +; They often use wScriptVar for arguments and return values. + +MACRO add_special +\1Special:: + dba \1 +ENDM + +SpecialsPointers:: + add_special WarpToSpawnPoint + +; Communications + add_special SetBitsForLinkTradeRequest + add_special WaitForLinkedFriend + add_special CheckLinkTimeout_Receptionist + add_special TryQuickSave + add_special CheckBothSelectedSameRoom + add_special FailedLinkToPast + add_special CloseLink + add_special WaitForOtherPlayerToExit + add_special SetBitsForBattleRequest + add_special SetBitsForTimeCapsuleRequest + add_special CheckTimeCapsuleCompatibility + add_special EnterTimeCapsule + add_special TradeCenter + add_special Colosseum + add_special TimeCapsule + add_special CableClubCheckWhichChris + add_special CheckMysteryGift + add_special GetMysteryGiftItem + add_special UnlockMysteryGift + +; Map events + add_special BugContestJudging + add_special CheckPartyFullAfterContest + add_special ContestDropOffMons + add_special ContestReturnMons + add_special GiveParkBalls + add_special CheckMagikarpLength + add_special MagikarpHouseSign + add_special HealParty ; this is both a special and a predef + add_special PokemonCenterPC + add_special PlayersHousePC + add_special DayCareMan + add_special DayCareLady + add_special DayCareManOutside + add_special MoveDeletion + add_special BankOfMom + add_special MagnetTrain + add_special NameRival + add_special SetDayOfWeek + add_special OverworldTownMap + add_special UnownPrinter + add_special MapRadio + add_special UnownPuzzle + add_special SlotMachine + add_special CardFlip + add_special UnusedMemoryGame ; unused + add_special ClearBGPalettesBufferScreen ; unused + add_special FadeOutPalettes + add_special BattleTowerFade + add_special FadeBlackQuickly + add_special FadeInPalettes + add_special FadeInQuickly + add_special ReloadSpritesNoPalettes ; bank 0 + add_special ClearBGPalettes ; bank 0 + add_special UpdateTimePals ; bank 0 + add_special ClearTilemap ; bank 0; unused as special + add_special UpdateSprites ; bank 0 + add_special UpdatePlayerSprite ; bank 0 + add_special GameCornerPrizeMonCheckDex + add_special UnusedSetSeenMon ; unused + add_special WaitSFX ; bank 0 + add_special PlayMapMusic ; bank 0 + add_special RestartMapMusic ; bank 0 + add_special HealMachineAnim + add_special SurfStartStep + add_special FindPartyMonAboveLevel ; unused + add_special FindPartyMonAtLeastThatHappy ; unused + add_special FindPartyMonThatSpecies + add_special FindPartyMonThatSpeciesYourTrainerID + add_special UnusedCheckUnusedTwoDayTimer ; unused + add_special DayCareMon1 + add_special DayCareMon2 + add_special SelectRandomBugContestContestants + add_special ActivateFishingSwarm + add_special ToggleMaptileDecorations + add_special ToggleDecorationsVisibility + add_special GiveShuckle + add_special ReturnShuckie + add_special BillsGrandfather + add_special CheckPokerus + add_special DisplayCoinCaseBalance + add_special DisplayMoneyAndCoinBalance + add_special PlaceMoneyTopRight + add_special CheckForLuckyNumberWinners + add_special CheckLuckyNumberShowFlag + add_special ResetLuckyNumberShowFlag + add_special PrintTodaysLuckyNumber + add_special SelectApricornForKurt + add_special NameRater + add_special DisplayLinkRecord + add_special GetFirstPokemonHappiness + add_special CheckFirstMonIsEgg + add_special RandomUnseenWildMon + add_special RandomPhoneWildMon + add_special RandomPhoneMon + add_special LoadUsedSpritesGFX + add_special PlaySlowCry + add_special SnorlaxAwake + add_special OlderHaircutBrother + add_special YoungerHaircutBrother + add_special DaisysGrooming + add_special PlayCurMonCry + add_special ProfOaksPCBoot + add_special GameboyCheck + add_special TrainerHouse + add_special PhotoStudio + add_special InitRoamMons + add_special FadeOutMusic + add_special Diploma + add_special PrintDiploma + +; Crystal only + add_special Function11ac3e + add_special TradeCornerHoldMon + add_special Function11b5e8 + add_special Function11b7e5 + add_special Function11b879 + add_special Function11b920 + add_special Function11b93b + add_special BattleTowerRoomMenu + add_special Function1700ba + add_special Function170114 + add_special BattleTowerBattle + add_special Function1704e1 + add_special UnusedBattleTowerDummySpecial1 + add_special LoadOpponentTrainerAndPokemonWithOTSprite + add_special Function11ba38 + add_special CheckForBattleTowerRules + add_special GiveOddEgg + add_special Reset ; bank 0 + add_special Function1011f1 + add_special Function101220 + add_special Function101225 + add_special Function101231 + add_special MoveTutor + add_special OmanyteChamber + add_special Function11c1ab + add_special BattleTowerAction + add_special DisplayUnownWords + add_special Menu_ChallengeExplanationCancel + add_special Function17d2b6 + add_special Function17d2ce + add_special BattleTowerMobileError + add_special AskMobileOrCable + add_special HoOhChamber + add_special Function102142 + add_special CelebiShrineEvent + add_special CheckCaughtCelebi + add_special PokeSeer + add_special BuenasPassword + add_special BuenaPrize + add_special GiveDratini + add_special SampleKenjiBreakCountdown + add_special BeastsCheck + add_special MonCheck + add_special SetPlayerPalette + add_special UnusedBattleTowerDummySpecial2 + add_special Mobile_SelectThreeMons + add_special Function1037eb + add_special Function10383c + add_special StubbedTrainerRankings_Healings + add_special RefreshSprites + add_special Function1037c2 + add_special Mobile_DummyReturnFalse + add_special Function103780 + add_special Function10387b + add_special AskRememberPassword + add_special LoadMapPalettes + add_special UnusedFindItemInPCOrBag + + add_special InitialSetDSTFlag + add_special InitialClearDSTFlag + add_special UnusedDummySpecial ; unused diff --git a/data/events/unown_walls.asm b/data/events/unown_walls.asm new file mode 100644 index 0000000..6e28b5f --- /dev/null +++ b/data/events/unown_walls.asm @@ -0,0 +1,45 @@ +MACRO unownwall + for n, CHARLEN(\1) + DEF x = CHARSUB(\1, n + 1) + if x == "-" + db $64 + elif x >= "Y" + db 2 * (x - "Y") + $60 + elif x >= "Q" + db 2 * (x - "Q") + $40 + elif x >= "I" + db 2 * (x - "I") + $20 + else + db 2 * (x - "A") + endc + endr + db -1 ; end +ENDM + +UnownWalls: +; UNOWNWORDS_ESCAPE + ; db $08, $44, $04, $00, $2e, $08, -1 + unownwall "ESCAPE" +; UNOWNWORDS_LIGHT + ; db $26, $20, $0c, $0e, $46, -1 + unownwall "LIGHT" +; UNOWNWORDS_WATER + ; db $4c, $00, $46, $08, $42, -1 + unownwall "WATER" +; UNOWNWORDS_HO_OH + ; db $0e, $2c, $64, $2c, $0e, -1 + unownwall "HO-OH" + +MenuHeaders_UnownWalls: +; UNOWNWORDS_ESCAPE + db MENU_BACKUP_TILES ; flags + menu_coords 3, 4, 16, 9 +; UNOWNWORDS_LIGHT + db MENU_BACKUP_TILES ; flags + menu_coords 4, 4, 15, 9 +; UNOWNWORDS_WATER + db MENU_BACKUP_TILES ; flags + menu_coords 4, 4, 15, 9 +; UNOWNWORDS_HO_OH + db MENU_BACKUP_TILES ; flags + menu_coords 4, 4, 15, 9 diff --git a/data/growth_rates.asm b/data/growth_rates.asm new file mode 100644 index 0000000..dfbb5ff --- /dev/null +++ b/data/growth_rates.asm @@ -0,0 +1,21 @@ +MACRO growth_rate +; [1]/[2]*n**3 + [3]*n**2 + [4]*n - [5] + dn \1, \2 + if \3 < 0 + db -\3 | $80 ; signed magnitude + else + db \3 + endc + db \4, \5 +ENDM + +GrowthRates: +; entries correspond to GROWTH_* (see constants/pokemon_data_constants.asm) + table_width 4, GrowthRates + growth_rate 1, 1, 0, 0, 0 ; Medium Fast + growth_rate 3, 4, 10, 0, 30 ; Slightly Fast + growth_rate 3, 4, 20, 0, 70 ; Slightly Slow + growth_rate 6, 5, -15, 100, 140 ; Medium Slow + growth_rate 4, 5, 0, 0, 0 ; Fast + growth_rate 5, 4, 0, 0, 0 ; Slow + assert_table_length NUM_GROWTH_RATES diff --git a/data/icon_pointers.asm b/data/icon_pointers.asm new file mode 100644 index 0000000..1ad361c --- /dev/null +++ b/data/icon_pointers.asm @@ -0,0 +1,43 @@ +IconPointers: +; entries correspond to ICON_* constants (see constants/icon_constants.asm) + table_width 2, IconPointers + dw NullIcon + dw PoliwagIcon + dw JigglypuffIcon + dw DiglettIcon + dw PikachuIcon + dw StaryuIcon + dw FishIcon + dw BirdIcon + dw MonsterIcon + dw ClefairyIcon + dw OddishIcon + dw BugIcon + dw GhostIcon + dw LaprasIcon + dw HumanshapeIcon + dw FoxIcon + dw EquineIcon + dw ShellIcon + dw BlobIcon + dw SerpentIcon + dw VoltorbIcon + dw SquirtleIcon + dw BulbasaurIcon + dw CharmanderIcon + dw CaterpillarIcon + dw UnownIcon + dw GeodudeIcon + dw FighterIcon + dw EggIcon + dw JellyfishIcon + dw MothIcon + dw BatIcon + dw SnorlaxIcon + dw HoOhIcon + dw LugiaIcon + dw GyaradosIcon + dw SlowpokeIcon + dw SudowoodoIcon + dw BigmonIcon + assert_table_length NUM_ICONS + 1 diff --git a/data/items/apricorn_balls.asm b/data/items/apricorn_balls.asm new file mode 100644 index 0000000..814aeab --- /dev/null +++ b/data/items/apricorn_balls.asm @@ -0,0 +1,10 @@ +ApricornBalls: + ; apricorn, ball + db RED_APRICORN, LEVEL_BALL + db BLU_APRICORN, LURE_BALL + db YLW_APRICORN, MOON_BALL + db GRN_APRICORN, FRIEND_BALL + db WHT_APRICORN, FAST_BALL + db BLK_APRICORN, HEAVY_BALL + db PNK_APRICORN, LOVE_BALL + db -1 diff --git a/data/items/attributes.asm b/data/items/attributes.asm new file mode 100644 index 0000000..08a5e9f --- /dev/null +++ b/data/items/attributes.asm @@ -0,0 +1,527 @@ +MACRO item_attribute +; price, held effect, parameter, property, pocket, field menu, battle menu + dw \1 + db \2, \3, \4, \5 + dn \6, \7 +ENDM + +ItemAttributes: +; entries correspond to item ids (see constants/item_constants.asm) + table_width ITEMATTR_STRUCT_LENGTH, ItemAttributes +; MASTER_BALL + item_attribute 0, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; ULTRA_BALL + item_attribute 1200, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; BRIGHTPOWDER + item_attribute 10, HELD_BRIGHTPOWDER, 20, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; GREAT_BALL + item_attribute 600, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; POKE_BALL + item_attribute 200, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; TOWN_MAP + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BICYCLE + item_attribute 0, HELD_NONE, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE +; MOON_STONE + item_attribute 0, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; ANTIDOTE + item_attribute 100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; BURN_HEAL + item_attribute 250, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; ICE_HEAL + item_attribute 250, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; AWAKENING + item_attribute 250, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; PARLYZ_HEAL + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; FULL_RESTORE + item_attribute 3000, HELD_NONE, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; MAX_POTION + item_attribute 2500, HELD_NONE, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; HYPER_POTION + item_attribute 1200, HELD_NONE, 200, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; SUPER_POTION + item_attribute 700, HELD_NONE, 50, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; POTION + item_attribute 300, HELD_NONE, 20, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; ESCAPE_ROPE + item_attribute 550, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE +; REPEL + item_attribute 350, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE +; MAX_ELIXER + item_attribute 4500, HELD_NONE, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; FIRE_STONE + item_attribute 2100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; THUNDERSTONE + item_attribute 2100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; WATER_STONE + item_attribute 2100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; ITEM_19 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; HP_UP + item_attribute 9800, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; PROTEIN + item_attribute 9800, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; IRON + item_attribute 9800, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; CARBOS + item_attribute 9800, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; LUCKY_PUNCH + item_attribute 10, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; CALCIUM + item_attribute 9800, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; RARE_CANDY + item_attribute 4800, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; X_ACCURACY + item_attribute 950, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; LEAF_STONE + item_attribute 2100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; METAL_POWDER + item_attribute 10, HELD_METAL_POWDER, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; NUGGET + item_attribute 10000, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; POKE_DOLL + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; FULL_HEAL + item_attribute 600, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; REVIVE + item_attribute 1500, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; MAX_REVIVE + item_attribute 4000, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; GUARD_SPEC + item_attribute 700, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; SUPER_REPEL + item_attribute 500, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE +; MAX_REPEL + item_attribute 700, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE +; DIRE_HIT + item_attribute 650, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; ITEM_2D + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; FRESH_WATER + item_attribute 200, HELD_NONE, 50, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; SODA_POP + item_attribute 300, HELD_NONE, 60, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; LEMONADE + item_attribute 350, HELD_NONE, 80, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; X_ATTACK + item_attribute 500, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; ITEM_32 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; X_DEFEND + item_attribute 550, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; X_SPEED + item_attribute 350, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; X_SPECIAL + item_attribute 350, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; COIN_CASE + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE +; ITEMFINDER + item_attribute 0, HELD_NONE, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE +; POKE_FLUTE + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; EXP_SHARE + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; OLD_ROD + item_attribute 0, HELD_NONE, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE +; GOOD_ROD + item_attribute 0, HELD_NONE, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE +; SILVER_LEAF + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; SUPER_ROD + item_attribute 0, HELD_NONE, 0, CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE +; PP_UP + item_attribute 9800, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; ETHER + item_attribute 1200, HELD_NONE, 10, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; MAX_ETHER + item_attribute 2000, HELD_NONE, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; ELIXER + item_attribute 3000, HELD_NONE, 10, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; RED_SCALE + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; SECRETPOTION + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; S_S_TICKET + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; MYSTERY_EGG + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; CLEAR_BELL + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; SILVER_WING + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; MOOMOO_MILK + item_attribute 500, HELD_NONE, 100, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; QUICK_CLAW + item_attribute 100, HELD_QUICK_CLAW, 60, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; PSNCUREBERRY + item_attribute 10, HELD_HEAL_POISON, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; GOLD_LEAF + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; SOFT_SAND + item_attribute 100, HELD_GROUND_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; SHARP_BEAK + item_attribute 100, HELD_FLYING_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; PRZCUREBERRY + item_attribute 10, HELD_HEAL_PARALYZE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; BURNT_BERRY + item_attribute 10, HELD_HEAL_FREEZE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; ICE_BERRY + item_attribute 10, HELD_HEAL_BURN, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; POISON_BARB + item_attribute 100, HELD_POISON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; KINGS_ROCK + item_attribute 100, HELD_FLINCH, 30, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BITTER_BERRY + item_attribute 10, HELD_HEAL_CONFUSION, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_PARTY +; MINT_BERRY + item_attribute 10, HELD_HEAL_SLEEP, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; RED_APRICORN + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; TINYMUSHROOM + item_attribute 500, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BIG_MUSHROOM + item_attribute 5000, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; SILVERPOWDER + item_attribute 100, HELD_BUG_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BLU_APRICORN + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_5A + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; AMULET_COIN + item_attribute 100, HELD_AMULET_COIN, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; YLW_APRICORN + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; GRN_APRICORN + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; CLEANSE_TAG + item_attribute 200, HELD_CLEANSE_TAG, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; MYSTIC_WATER + item_attribute 100, HELD_WATER_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; TWISTEDSPOON + item_attribute 100, HELD_PSYCHIC_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; WHT_APRICORN + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BLACKBELT_I + item_attribute 100, HELD_FIGHTING_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BLK_APRICORN + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_64 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; PNK_APRICORN + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BLACKGLASSES + item_attribute 100, HELD_DARK_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; SLOWPOKETAIL + item_attribute 9800, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; PINK_BOW + item_attribute 100, HELD_NORMAL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; STICK + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; SMOKE_BALL + item_attribute 200, HELD_ESCAPE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; NEVERMELTICE + item_attribute 100, HELD_ICE_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; MAGNET + item_attribute 100, HELD_ELECTRIC_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; MIRACLEBERRY + item_attribute 10, HELD_HEAL_STATUS, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; PEARL + item_attribute 1400, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BIG_PEARL + item_attribute 7500, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; EVERSTONE + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; SPELL_TAG + item_attribute 100, HELD_GHOST_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; RAGECANDYBAR + item_attribute 300, HELD_NONE, 20, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; GS_BALL + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BLUE_CARD + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE +; MIRACLE_SEED + item_attribute 100, HELD_GRASS_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; THICK_CLUB + item_attribute 500, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; FOCUS_BAND + item_attribute 200, HELD_FOCUS_BAND, 30, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_78 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ENERGYPOWDER + item_attribute 500, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; ENERGY_ROOT + item_attribute 800, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; HEAL_POWDER + item_attribute 450, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; REVIVAL_HERB + item_attribute 2800, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; HARD_STONE + item_attribute 100, HELD_ROCK_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; LUCKY_EGG + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; CARD_KEY + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE +; MACHINE_PART + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; EGG_TICKET + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; LOST_ITEM + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; STARDUST + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; STAR_PIECE + item_attribute 9800, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BASEMENT_KEY + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE +; PASS + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_87 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_88 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_89 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; CHARCOAL + item_attribute 9800, HELD_FIRE_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BERRY_JUICE + item_attribute 100, HELD_BERRY, 20, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; SCOPE_LENS + item_attribute 200, HELD_CRITICAL_UP, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_8D + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_8E + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; METAL_COAT + item_attribute 100, HELD_STEEL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BUG: Dragon Scale, not Dragon Fang, boosts Dragon-type moves (see docs/bugs_and_glitches.md) +; DRAGON_FANG + item_attribute 100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_91 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; LEFTOVERS + item_attribute 200, HELD_LEFTOVERS, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_93 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_94 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_95 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; MYSTERYBERRY + item_attribute 10, HELD_RESTORE_PP, -1, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; DRAGON_SCALE + item_attribute 2100, HELD_DRAGON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BERSERK_GENE + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_99 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_9A + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_9B + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; SACRED_ASH + item_attribute 200, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE +; HEAVY_BALL + item_attribute 150, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; FLOWER_MAIL + item_attribute 50, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; LEVEL_BALL + item_attribute 150, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; LURE_BALL + item_attribute 150, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; FAST_BALL + item_attribute 150, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; ITEM_A2 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; LIGHT_BALL + item_attribute 100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; FRIEND_BALL + item_attribute 150, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; MOON_BALL + item_attribute 150, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; LOVE_BALL + item_attribute 150, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; NORMAL_BOX + item_attribute 10, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE +; GORGEOUS_BOX + item_attribute 10, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_CURRENT, ITEMMENU_NOUSE +; SUN_STONE + item_attribute 2100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; POLKADOT_BOW + item_attribute 100, HELD_NORMAL_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_AB + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; UP_GRADE + item_attribute 2100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BERRY + item_attribute 10, HELD_BERRY, 10, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; GOLD_BERRY + item_attribute 10, HELD_BERRY, 30, CANT_SELECT, ITEM, ITEMMENU_PARTY, ITEMMENU_PARTY +; SQUIRTBOTTLE + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_CLOSE, ITEMMENU_NOUSE +; ITEM_B0 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; PARK_BALL + item_attribute 0, HELD_NONE, 0, CANT_SELECT, BALL, ITEMMENU_NOUSE, ITEMMENU_CLOSE +; RAINBOW_WING + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, KEY_ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_B3 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BRICK_PIECE + item_attribute 50, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; SURF_MAIL + item_attribute 50, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; LITEBLUEMAIL + item_attribute 50, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; PORTRAITMAIL + item_attribute 50, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; LOVELY_MAIL + item_attribute 50, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; EON_MAIL + item_attribute 50, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; MORPH_MAIL + item_attribute 50, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; BLUESKY_MAIL + item_attribute 50, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; MUSIC_MAIL + item_attribute 50, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; MIRAGE_MAIL + item_attribute 50, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_BE + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_DC + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_C3 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; ITEM_FA + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE + assert_table_length NUM_ITEMS +; TM01 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM02 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM03 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM04 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM05 + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM06 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM07 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM08 + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM09 + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM10 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM11 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM12 + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM13 + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM14 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM15 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM16 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM17 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM18 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM19 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM20 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM21 + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM22 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM23 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM24 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM25 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM26 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM27 + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM28 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM29 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM30 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM31 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM32 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM33 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM34 + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM35 + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM36 + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM37 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM38 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM39 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM40 + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM41 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM42 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM43 + item_attribute 1000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM44 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM45 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM46 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM47 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM48 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM49 + item_attribute 3000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; TM50 + item_attribute 2000, HELD_NONE, 0, CANT_SELECT, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE + assert_table_length NUM_ITEMS + NUM_TMS +; HM01 + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; HM02 + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; HM03 + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; HM04 + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; HM05 + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; HM06 + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE +; HM07 + item_attribute 0, HELD_NONE, 0, CANT_SELECT | CANT_TOSS, TM_HM, ITEMMENU_PARTY, ITEMMENU_NOUSE + assert_table_length NUM_ITEMS + NUM_TMS + NUM_HMS +; $fb + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; $fc + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; $fd + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; $fe + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; $ff + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +; $00 + item_attribute $9999, HELD_NONE, 0, NO_LIMITS, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE + assert_table_length $100 diff --git a/data/items/bargain_shop.asm b/data/items/bargain_shop.asm new file mode 100644 index 0000000..a17db65 --- /dev/null +++ b/data/items/bargain_shop.asm @@ -0,0 +1,8 @@ +BargainShopData: + db 5 + dbw NUGGET, 4500 + dbw PEARL, 650 + dbw BIG_PEARL, 3500 + dbw STARDUST, 900 + dbw STAR_PIECE, 4600 + db -1 diff --git a/data/items/buena_prizes.asm b/data/items/buena_prizes.asm new file mode 100644 index 0000000..4e2005c --- /dev/null +++ b/data/items/buena_prizes.asm @@ -0,0 +1,12 @@ +BuenaPrizeItems: + table_width 2, BuenaPrizeItems + db ULTRA_BALL, 2 + db FULL_RESTORE, 2 + db NUGGET, 3 + db RARE_CANDY, 3 + db PROTEIN, 5 + db IRON, 5 + db CARBOS, 5 + db CALCIUM, 5 + db HP_UP, 5 + assert_table_length NUM_BUENA_PRIZES diff --git a/data/items/catch_rate_items.asm b/data/items/catch_rate_items.asm new file mode 100644 index 0000000..9c39afa --- /dev/null +++ b/data/items/catch_rate_items.asm @@ -0,0 +1,18 @@ +; Pokémon traded from RBY do not have held items, so GSC usually interprets the +; 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: + db ITEM_19, LEFTOVERS + db ITEM_2D, BITTER_BERRY + db ITEM_32, GOLD_BERRY + db ITEM_5A, BERRY + db ITEM_64, BERRY + db ITEM_78, BERRY + db ITEM_87, BERRY + db ITEM_BE, BERRY + db ITEM_C3, BERRY + db ITEM_DC, BERRY + db ITEM_FA, BERRY + db -1, BERRY + db 0 ; end diff --git a/data/items/descriptions.asm b/data/items/descriptions.asm new file mode 100644 index 0000000..550d3b8 --- /dev/null +++ b/data/items/descriptions.asm @@ -0,0 +1,917 @@ +ItemDescriptions: +; entries correspond to item ids (see constants/item_constants.asm) + table_width 2, ItemDescriptions + dw MasterBallDesc + dw UltraBallDesc + dw BrightpowderDesc + dw GreatBallDesc + dw PokeBallDesc + dw QuestionMarkDesc + dw BicycleDesc + dw MoonStoneDesc + dw AntidoteDesc + dw BurnHealDesc + dw IceHealDesc + dw AwakeningDesc + dw ParlyzHealDesc + dw FullRestoreDesc + dw MaxPotionDesc + dw HyperPotionDesc + dw SuperPotionDesc + dw PotionDesc + dw EscapeRopeDesc + dw RepelDesc + dw MaxElixerDesc + dw FireStoneDesc + dw ThunderStoneDesc + dw WaterStoneDesc + dw QuestionMarkDesc + dw HPUpDesc + dw ProteinDesc + dw IronDesc + dw CarbosDesc + dw LuckyPunchDesc + dw CalciumDesc + dw RareCandyDesc + dw XAccuracyDesc + dw LeafStoneDesc + dw MetalPowderDesc + dw NuggetDesc + dw PokeDollDesc + dw FullHealDesc + dw ReviveDesc + dw MaxReviveDesc + dw GuardSpecDesc + dw SuperRepelDesc + dw MaxRepelDesc + dw DireHitDesc + dw QuestionMarkDesc + dw FreshWaterDesc + dw SodaPopDesc + dw LemonadeDesc + dw XAttackDesc + dw QuestionMarkDesc + dw XDefendDesc + dw XSpeedDesc + dw XSpecialDesc + dw CoinCaseDesc + dw ItemfinderDesc + dw QuestionMarkDesc + dw ExpShareDesc + dw OldRodDesc + dw GoodRodDesc + dw SilverLeafDesc + dw SuperRodDesc + dw PPUpDesc + dw EtherDesc + dw MaxEtherDesc + dw ElixerDesc + dw RedScaleDesc + dw SecretPotionDesc + dw SSTicketDesc + dw MysteryEggDesc + dw ClearBellDesc + dw SilverWingDesc + dw MoomooMilkDesc + dw QuickClawDesc + dw PsnCureBerryDesc + dw GoldLeafDesc + dw SoftSandDesc + dw SharpBeakDesc + dw PrzCureBerryDesc + dw BurntBerryDesc + dw IceBerryDesc + dw PoisonBarbDesc + dw KingsRockDesc + dw BitterBerryDesc + dw MintBerryDesc + dw RedApricornDesc + dw TinyMushroomDesc + dw BigMushroomDesc + dw SilverPowderDesc + dw BluApricornDesc + dw QuestionMarkDesc + dw AmuletCoinDesc + dw YlwApricornDesc + dw GrnApricornDesc + dw CleanseTagDesc + dw MysticWaterDesc + dw TwistedSpoonDesc + dw WhtApricornDesc + dw BlackbeltDesc + dw BlkApricornDesc + dw QuestionMarkDesc + dw PnkApricornDesc + dw BlackGlassesDesc + dw SlowpokeTailDesc + dw PinkBowDesc + dw StickDesc + dw SmokeBallDesc + dw NeverMeltIceDesc + dw MagnetDesc + dw MiracleBerryDesc + dw PearlDesc + dw BigPearlDesc + dw EverStoneDesc + dw SpellTagDesc + dw RageCandyBarDesc + dw GSBallDesc + dw BlueCardDesc + dw MiracleSeedDesc + dw ThickClubDesc + dw FocusBandDesc + dw QuestionMarkDesc + dw EnergyPowderDesc + dw EnergyRootDesc + dw HealPowderDesc + dw RevivalHerbDesc + dw HardStoneDesc + dw LuckyEggDesc + dw CardKeyDesc + dw MachinePartDesc + dw EggTicketDesc + dw LostItemDesc + dw StardustDesc + dw StarPieceDesc + dw BasementKeyDesc + dw PassDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw CharcoalDesc + dw BerryJuiceDesc + dw ScopeLensDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw MetalCoatDesc + dw DragonFangDesc + dw QuestionMarkDesc + dw LeftoversDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw MysteryBerryDesc + dw DragonScaleDesc + dw BerserkGeneDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw SacredAshDesc + dw HeavyBallDesc + dw FlowerMailDesc + dw LevelBallDesc + dw LureBallDesc + dw FastBallDesc + dw QuestionMarkDesc + dw LightBallDesc + dw FriendBallDesc + dw MoonBallDesc + dw LoveBallDesc + dw NormalBoxDesc + dw GorgeousBoxDesc + dw SunStoneDesc + dw PolkadotBowDesc + dw QuestionMarkDesc + dw UpGradeDesc + dw BerryDesc + dw GoldBerryDesc + dw SquirtBottleDesc + dw QuestionMarkDesc + dw ParkBallDesc + dw RainbowWingDesc + dw QuestionMarkDesc + dw BrickPieceDesc + dw SurfMailDesc + dw LiteBlueMailDesc + dw PortraitMailDesc + dw LovelyMailDesc + dw EonMailDesc + dw MorphMailDesc + dw BlueSkyMailDesc + dw MusicMailDesc + dw MirageMailDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + assert_table_length NUM_ITEMS + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + dw QuestionMarkDesc + assert_table_length $ff + +MasterBallDesc: + db "The best BALL. It" + next "never misses.@" + +UltraBallDesc: + db "A BALL with a high" + next "rate of success.@" + +BrightpowderDesc: + db "Lowers the foe's" + next "accuracy. (HOLD)@" + +GreatBallDesc: + db "A BALL with a de-" + next "cent success rate.@" + +PokeBallDesc: + db "An item for catch-" + next "ing #MON.@" + +BicycleDesc: + db "A collapsible bike" + next "for fast movement.@" + +MoonStoneDesc: + db "Evolves certain" + next "kinds of #MON.@" + +AntidoteDesc: + db "Cures poisoned" + next "#MON.@" + +BurnHealDesc: + db "Heals burned" + next "#MON.@" + +IceHealDesc: + db "Defrosts frozen" + next "#MON.@" + +AwakeningDesc: + db "Awakens sleeping" + next "#MON.@" + +ParlyzHealDesc: + db "Heals paralyzed" + next "#MON.@" + +FullRestoreDesc: + db "Fully restores HP" + next "& status.@" + +MaxPotionDesc: + db "Fully restores" + next "#MON HP.@" + +HyperPotionDesc: + db "Restores #MON" + next "HP by 200.@" + +SuperPotionDesc: + db "Restores #MON" + next "HP by 50.@" + +PotionDesc: + db "Restores #MON" + next "HP by 20.@" + +EscapeRopeDesc: + db "Use for escaping" + next "from caves, etc.@" + +RepelDesc: + db "Repels weak #-" + next "MON for 100 steps.@" + +MaxElixerDesc: + db "Fully restores the" + next "PP of one #MON.@" + +FireStoneDesc: + db "Evolves certain" + next "kinds of #MON.@" + +ThunderStoneDesc: + db "Evolves certain" + next "kinds of #MON.@" + +WaterStoneDesc: + db "Evolves certain" + next "kinds of #MON.@" + +HPUpDesc: + db "Raises the HP of" + next "one #MON.@" + +ProteinDesc: + db "Raises ATTACK of" + next "one #MON.@" + +IronDesc: + db "Raises DEFENSE of" + next "one #MON.@" + +CarbosDesc: + db "Raises SPEED of" + next "one #MON.@" + +LuckyPunchDesc: + db "Ups critical hit" + next "ratio of CHANSEY.@" + +CalciumDesc: + db "Ups SPECIAL stats" + next "of one #MON.@" + +RareCandyDesc: + db "Raises level of a" + next "#MON by one.@" + +XAccuracyDesc: + db "Raises accuracy." + next "(1 BTL)@" + +LeafStoneDesc: + db "Evolves certain" + next "kinds of #MON.@" + +MetalPowderDesc: + db "Raises DEFENSE of" + next "DITTO. (HOLD)@" + +NuggetDesc: + db "Made of pure gold." + next "Sell high.@" + +PokeDollDesc: + db "Use to escape from" + next "a wild #MON.@" + +FullHealDesc: + db "Eliminates all" + next "status problems.@" + +ReviveDesc: + db "Restores a fainted" + next "#MON to 1/2 HP.@" + +MaxReviveDesc: + db "Fully restores a" + next "fainted #MON.@" + +GuardSpecDesc: + db "Prevents stats" + next "reduction. (1 BTL)@" + +SuperRepelDesc: + db "Repels weak #-" + next "MON for 200 steps.@" + +MaxRepelDesc: + db "Repels weak #-" + next "MON for 250 steps.@" + +DireHitDesc: + db "Ups critical hit" + next "ratio. (1 BTL)@" + +FreshWaterDesc: + db "Restores #MON" + next "HP by 50.@" + +SodaPopDesc: + db "Restores #MON" + next "HP by 60.@" + +LemonadeDesc: + db "Restores #MON" + next "HP by 80.@" + +XAttackDesc: + db "Raises ATTACK." + next "(1 BTL)@" + +XDefendDesc: + db "Raises DEFENSE." + next "(1 BTL)@" + +XSpeedDesc: + db "Raises SPEED." + next "(1 BTL)@" + +XSpecialDesc: + db "Raises SPECIAL" + next "ATTACK. (1 BTL)@" + +CoinCaseDesc: + db "Holds up to 9,999" + next "game coins.@" + +ItemfinderDesc: + db "Checks for unseen" + next "items in the area.@" + +ExpShareDesc: + db "Shares battle EXP." + next "Points. (HOLD)@" + +OldRodDesc: + db "Use by water to" + next "fish for #MON.@" + +GoodRodDesc: + db "A good ROD for" + next "catching #MON.@" + +SilverLeafDesc: + db "A strange, silver-" + next "colored leaf.@" + +SuperRodDesc: + db "The best ROD for" + next "catching #MON.@" + +PPUpDesc: + db "Raises max PP of" + next "a selected move.@" + +EtherDesc: + db "Restores PP of one" + next "move by 10.@" + +MaxEtherDesc: + db "Fully restores PP" + next "of one move.@" + +ElixerDesc: + db "Restores PP of all" + next "moves by 10.@" + +RedScaleDesc: + db "A scale from the" + next "red GYARADOS.@" + +SecretPotionDesc: + db "Fully heals any" + next "#MON.@" + +SSTicketDesc: + db "A ticket for the" + next "S.S.AQUA.@" + +MysteryEggDesc: + db "An EGG obtained" + next "from MR.#MON.@" + +ClearBellDesc: + db "Makes a gentle" + next "ringing.@" + +SilverWingDesc: + db "A strange, silver-" + next "colored feather.@" + +MoomooMilkDesc: + db "Restores #MON" + next "HP by 100.@" + +QuickClawDesc: + db "Raises 1st strike" + next "ratio. (HOLD)@" + +PsnCureBerryDesc: + db "A self-cure for" + next "poison. (HOLD)@" + +GoldLeafDesc: + db "A strange, gold-" + next "colored leaf.@" + +SoftSandDesc: + db "Powers up ground-" + next "type moves. (HOLD)@" + +SharpBeakDesc: + db "Powers up flying-" + next "type moves. (HOLD)@" + +PrzCureBerryDesc: + db "A self-cure for" + next "paralysis. (HOLD)@" + +BurntBerryDesc: + db "A self-cure for" + next "freezing. (HOLD)@" + +IceBerryDesc: + db "A self-heal for a" + next "burn. (HOLD)@" + +PoisonBarbDesc: + db "Powers up poison-" + next "type moves. (HOLD)@" + +KingsRockDesc: + db "May make the foe" + next "flinch. (HOLD)@" + +BitterBerryDesc: + db "A self-cure for" + next "confusion. (HOLD)@" + +MintBerryDesc: + db "A self-awakening" + next "for sleep. (HOLD)@" + +RedApricornDesc: + db "A red APRICORN.@" + +TinyMushroomDesc: + db "An ordinary mush-" + next "room. Sell low.@" + +BigMushroomDesc: + db "A rare mushroom." + next "Sell high.@" + +SilverPowderDesc: + db "Powers up bug-type" + next "moves. (HOLD)@" + +BluApricornDesc: + db "A blue APRICORN.@" + +AmuletCoinDesc: + db "Doubles monetary" + next "earnings. (HOLD)@" + +YlwApricornDesc: + db "A yellow APRICORN.@" + +GrnApricornDesc: + db "A green APRICORN.@" + +CleanseTagDesc: + db "Helps repel wild" + next "#MON. (HOLD)@" + +MysticWaterDesc: + db "Powers up water-" + next "type moves. (HOLD)@" + +TwistedSpoonDesc: + db "Powers up psychic-" + next "type moves. (HOLD)@" + +WhtApricornDesc: + db "A white APRICORN.@" + +BlackbeltDesc: + db "Boosts fighting-" + next "type moves. (HOLD)@" + +BlkApricornDesc: + db "A black APRICORN." + next "@" + +PnkApricornDesc: + db "A pink APRICORN." + next "@" + +BlackGlassesDesc: + db "Powers up dark-" + next "type moves. (HOLD)@" + +SlowpokeTailDesc: + db "Very tasty. Sell" + next "high.@" + +PinkBowDesc: + db "Powers up normal-" + next "type moves. (HOLD)@" + +StickDesc: + db "An ordinary stick." + next "Sell low.@" + +SmokeBallDesc: + db "Escape from wild" + next "#MON. (HOLD)@" + +NeverMeltIceDesc: + db "Powers up ice-type" + next "moves. (HOLD)@" + +MagnetDesc: + db "Boosts electric-" + next "type moves. (HOLD)@" + +MiracleBerryDesc: + db "Cures all status" + next "problems. (HOLD)@" + +PearlDesc: + db "A beautiful pearl." + next "Sell low.@" + +BigPearlDesc: + db "A big, beautiful" + next "pearl. Sell high.@" + +EverStoneDesc: + db "Stops evolution." + next "(HOLD)@" + +SpellTagDesc: + db "Powers up ghost-" + next "type moves. (HOLD)@" + +RageCandyBarDesc: + db "Restores #MON" + next "HP by 20.@" + +GSBallDesc: + db "The mysterious" + next "BALL.@" + +BlueCardDesc: + db "Card to save" + next "points.@" + +MiracleSeedDesc: + db "Powers up grass-" + next "type moves. (HOLD)@" + +ThickClubDesc: + db "A bone of some" + next "sort. Sell low.@" + +FocusBandDesc: + db "May prevent faint-" + next "ing. (HOLD)@" + +EnergyPowderDesc: + db "Restores #MON" + next "HP by 50. Bitter.@" + +EnergyRootDesc: + db "Restores #MON" + next "HP by 200. Bitter.@" + +HealPowderDesc: + db "Cures all status" + next "problems. Bitter.@" + +RevivalHerbDesc: + db "Revives fainted" + next "#MON. Bitter.@" + +HardStoneDesc: + db "Powers up rock-" + next "type moves. (HOLD)@" + +LuckyEggDesc: + db "Earns extra EXP." + next "points. (HOLD)@" + +CardKeyDesc: + db "Opens shutters in" + next "the RADIO TOWER.@" + +MachinePartDesc: + db "A machine part for" + next "the POWER PLANT.@" + +EggTicketDesc: + db "May use at Golden-" + next "rod trade corner.@" + +LostItemDesc: + db "The # DOLL lost" + next "by the COPYCAT.@" + +StardustDesc: + db "Pretty, red sand." + next "Sell high.@" + +StarPieceDesc: + db "A hunk of red gem." + next "Sell very high.@" + +BasementKeyDesc: + db "Opens doors.@" + +PassDesc: + db "A ticket for the" + next "MAGNET TRAIN.@" + +CharcoalDesc: + db "Powers up fire-" + next "type moves. (HOLD)@" + +BerryJuiceDesc: + db "Restores #MON" + next "HP by 20.@" + +ScopeLensDesc: + db "Raises critical" + next "hit ratio. (HOLD)@" + +MetalCoatDesc: + db "Powers up steel-" + next "type moves. (HOLD)@" + +DragonFangDesc: + db "Powers up dragon-" + next "type moves. (HOLD)@" + +LeftoversDesc: + db "Restores HP during" + next "battle. (HOLD)@" + +MysteryBerryDesc: + db "A self-restore" + next "for PP. (HOLD)@" + +DragonScaleDesc: + db "A rare dragon-type" + next "item.@" + +BerserkGeneDesc: + db "Boosts ATTACK but" + next "causes confusion.@" + +SacredAshDesc: + db "Fully revives all" + next "fainted #MON.@" + +HeavyBallDesc: + db "A BALL for catch-" + next "ing heavy #MON.@" + +FlowerMailDesc: + db "Flower-print MAIL." + next "(HOLD)@" + +LevelBallDesc: + db "A BALL for lower-" + next "level #MON.@" + +LureBallDesc: + db "A BALL for #MON" + next "hooked by a ROD.@" + +FastBallDesc: + db "A BALL for catch-" + next "ing fast #MON.@" + +LightBallDesc: + db "An odd, electrical" + next "orb. (HOLD)@" + +FriendBallDesc: + db "A BALL that makes" + next "#MON friendly.@" + +MoonBallDesc: + db "A BALL for MOON" + next "STONE evolvers.@" + +LoveBallDesc: + db "For catching the" + next "opposite gender.@" + +NormalBoxDesc: + db "Open it and see" + next "what's inside.@" + +GorgeousBoxDesc: + db "Open it and see" + next "what's inside.@" + +SunStoneDesc: + db "Evolves certain" + next "kinds of #MON.@" + +PolkadotBowDesc: + db "Powers up normal-" + next "type moves. (HOLD)@" + +UpGradeDesc: + db "A mysterious box" + next "made by SILPH CO.@" + +BerryDesc: + db "A self-restore" + next "item. (10HP, HOLD)@" + +GoldBerryDesc: + db "A self-restore" + next "item. (30HP, HOLD)@" + +SquirtBottleDesc: + db "A bottle used for" + next "watering plants.@" + +ParkBallDesc: + db "The Bug-Catching" + next "Contest BALL.@" + +RainbowWingDesc: + db "A mystical feather" + next "of rainbow colors.@" + +QuestionMarkDesc: + db "?@" + +BrickPieceDesc: + db "A rare chunk of" + next "tile.@" + +SurfMailDesc: + db "LAPRAS-print MAIL." + next "(HOLD)@" + +LiteBlueMailDesc: + db "DRATINI-print" + next "MAIL. (HOLD)@" + +PortraitMailDesc: + db "MAIL featuring the" + next "holder's likeness.@" + +LovelyMailDesc: + db "Heart-print MAIL." + next "(HOLD)@" + +EonMailDesc: + db "EEVEE-print MAIL." + next "(HOLD)@" + +MorphMailDesc: + db "DITTO-print MAIL." + next "(HOLD)@" + +BlueSkyMailDesc: + db "Sky-print MAIL." + next "(HOLD)@" + +MusicMailDesc: + db "NATU-print MAIL." + next "(HOLD)@" + +MirageMailDesc: + db "MEW-print MAIL." + next "(HOLD)@" diff --git a/data/items/fruit_trees.asm b/data/items/fruit_trees.asm new file mode 100644 index 0000000..ff39551 --- /dev/null +++ b/data/items/fruit_trees.asm @@ -0,0 +1,34 @@ +FruitTreeItems: +; entries correspond to FRUITTREE_* constants + table_width 1, FruitTreeItems + db BERRY ; ROUTE_29 + db BERRY ; ROUTE_30_1 + db BERRY ; ROUTE_38 + db BERRY ; ROUTE_46_1 + db PSNCUREBERRY ; ROUTE_30_2 + db PSNCUREBERRY ; ROUTE_33 + db BITTER_BERRY ; ROUTE_31 + db BITTER_BERRY ; ROUTE_43 + db PRZCUREBERRY ; VIOLET_CITY + db PRZCUREBERRY ; ROUTE_46_2 + db MYSTERYBERRY ; ROUTE_35 + db MYSTERYBERRY ; ROUTE_45 + db ICE_BERRY ; ROUTE_36 + db ICE_BERRY ; ROUTE_26 + db MINT_BERRY ; ROUTE_39 + db BURNT_BERRY ; ROUTE_44 + db RED_APRICORN ; ROUTE_37_1 + db BLU_APRICORN ; ROUTE_37_2 + db BLK_APRICORN ; ROUTE_37_3 + db WHT_APRICORN ; AZALEA_TOWN + db PNK_APRICORN ; ROUTE_42_1 + db GRN_APRICORN ; ROUTE_42_2 + db YLW_APRICORN ; ROUTE_42_3 + db BERRY ; ROUTE_11 + db PSNCUREBERRY ; ROUTE_2 + db BITTER_BERRY ; ROUTE_1 + db PRZCUREBERRY ; ROUTE_8 + db ICE_BERRY ; PEWTER_CITY_1 + db MINT_BERRY ; PEWTER_CITY_2 + db BURNT_BERRY ; FUCHSIA_CITY + assert_table_length NUM_FRUIT_TREES diff --git a/data/items/heal_hp.asm b/data/items/heal_hp.asm new file mode 100644 index 0000000..cc3da23 --- /dev/null +++ b/data/items/heal_hp.asm @@ -0,0 +1,17 @@ +HealingHPAmounts: + dbw FRESH_WATER, 50 + dbw SODA_POP, 60 + dbw LEMONADE, 80 + dbw HYPER_POTION, 200 + dbw SUPER_POTION, 50 + dbw POTION, 20 + dbw MAX_POTION, MAX_STAT_VALUE + dbw FULL_RESTORE, MAX_STAT_VALUE + dbw MOOMOO_MILK, 100 + dbw BERRY, 10 + dbw GOLD_BERRY, 30 + dbw ENERGYPOWDER, 50 + dbw ENERGY_ROOT, 200 + dbw RAGECANDYBAR, 20 + dbw BERRY_JUICE, 20 + dbw -1, 0 ; end diff --git a/data/items/heal_status.asm b/data/items/heal_status.asm new file mode 100644 index 0000000..ea65811 --- /dev/null +++ b/data/items/heal_status.asm @@ -0,0 +1,19 @@ +; See also data/battle/held_heal_status.asm + +StatusHealingActions: + ; item, party menu action text, status + db ANTIDOTE, PARTYMENUTEXT_HEAL_PSN, 1 << PSN + db BURN_HEAL, PARTYMENUTEXT_HEAL_BRN, 1 << BRN + db ICE_HEAL, PARTYMENUTEXT_HEAL_FRZ, 1 << FRZ + db AWAKENING, PARTYMENUTEXT_HEAL_SLP, SLP_MASK + db PARLYZ_HEAL, PARTYMENUTEXT_HEAL_PAR, 1 << PAR + db FULL_HEAL, PARTYMENUTEXT_HEAL_ALL, %11111111 + db FULL_RESTORE, PARTYMENUTEXT_HEAL_ALL, %11111111 + db HEAL_POWDER, PARTYMENUTEXT_HEAL_ALL, %11111111 + db PSNCUREBERRY, PARTYMENUTEXT_HEAL_PSN, 1 << PSN + db PRZCUREBERRY, PARTYMENUTEXT_HEAL_PAR, 1 << PAR + db BURNT_BERRY, PARTYMENUTEXT_HEAL_FRZ, 1 << FRZ + db ICE_BERRY, PARTYMENUTEXT_HEAL_BRN, 1 << BRN + db MINT_BERRY, PARTYMENUTEXT_HEAL_SLP, SLP_MASK + db MIRACLEBERRY, PARTYMENUTEXT_HEAL_ALL, %11111111 + db -1, 0, 0 ; end diff --git a/data/items/mail_items.asm b/data/items/mail_items.asm new file mode 100644 index 0000000..388613d --- /dev/null +++ b/data/items/mail_items.asm @@ -0,0 +1,12 @@ +MailItems: + db FLOWER_MAIL + db SURF_MAIL + db LITEBLUEMAIL + db PORTRAITMAIL + db LOVELY_MAIL + db EON_MAIL + db MORPH_MAIL + db BLUESKY_MAIL + db MUSIC_MAIL + db MIRAGE_MAIL + db -1 diff --git a/data/items/marts.asm b/data/items/marts.asm new file mode 100644 index 0000000..d96281d --- /dev/null +++ b/data/items/marts.asm @@ -0,0 +1,407 @@ +Marts: +; entries correspond to MART_* constants (see constants/mart_constants.asm) + table_width 2, Marts + dw MartCherrygrove + dw MartCherrygroveDex + dw MartViolet + dw MartAzalea + dw MartCianwood + dw MartGoldenrod2F1 + dw MartGoldenrod2F2 + dw MartGoldenrod3F + dw MartGoldenrod4F + dw MartGoldenrod5F1 + dw MartGoldenrod5F2 + dw MartGoldenrod5F3 + dw MartGoldenrod5F4 + dw MartOlivine + dw MartEcruteak + dw MartMahogany1 + dw MartMahogany2 + dw MartBlackthorn + dw MartViridian + dw MartPewter + dw MartCerulean + dw MartLavender + dw MartVermilion + dw MartCeladon2F1 + dw MartCeladon2F2 + dw MartCeladon3F + dw MartCeladon4F + dw MartCeladon5F1 + dw MartCeladon5F2 + dw MartFuchsia + dw MartSaffron + dw MartMtMoon + dw MartIndigoPlateau + dw MartUnderground + assert_table_length NUM_MARTS + +MartCherrygrove: + db 4 ; # items + db POTION + db ANTIDOTE + db PARLYZ_HEAL + db AWAKENING + db -1 ; end + +MartCherrygroveDex: + db 5 ; # items + db POKE_BALL + db POTION + db ANTIDOTE + db PARLYZ_HEAL + db AWAKENING + db -1 ; end + +MartViolet: + db 10 ; # items + db POKE_BALL + db POTION + db ESCAPE_ROPE + db ANTIDOTE + db PARLYZ_HEAL + db AWAKENING + db X_DEFEND + db X_ATTACK + db X_SPEED + db FLOWER_MAIL + db -1 ; end + +MartAzalea: + db 9 ; # items + db CHARCOAL + db POKE_BALL + db POTION + db SUPER_POTION + db ESCAPE_ROPE + db REPEL + db ANTIDOTE + db PARLYZ_HEAL + db FLOWER_MAIL + db -1 ; end + +MartCianwood: + db 5 ; # items + db POTION + db SUPER_POTION + db HYPER_POTION + db FULL_HEAL + db REVIVE + db -1 ; end + +MartGoldenrod2F1: + db 7 ; # items + db POTION + db SUPER_POTION + db ANTIDOTE + db PARLYZ_HEAL + db AWAKENING + db BURN_HEAL + db ICE_HEAL + db -1 ; end + +MartGoldenrod2F2: + db 8 ; # items + db POKE_BALL + db GREAT_BALL + db ESCAPE_ROPE + db REPEL + db REVIVE + db FULL_HEAL + db POKE_DOLL + db FLOWER_MAIL + db -1 ; end + +MartGoldenrod3F: + db 7 ; # items + db X_SPEED + db X_SPECIAL + db X_DEFEND + db X_ATTACK + db DIRE_HIT + db GUARD_SPEC + db X_ACCURACY + db -1 ; end + +MartGoldenrod4F: + db 5 ; # items + db PROTEIN + db IRON + db CARBOS + db CALCIUM + db HP_UP + db -1 ; end + +MartGoldenrod5F1: + db 3 ; # items + db TM_THUNDERPUNCH + db TM_FIRE_PUNCH + db TM_ICE_PUNCH + db -1 ; end + +MartGoldenrod5F2: + db 4 ; # items + db TM_THUNDERPUNCH + db TM_FIRE_PUNCH + db TM_ICE_PUNCH + db TM_HEADBUTT + db -1 ; end + +MartGoldenrod5F3: + db 4 ; # items + db TM_THUNDERPUNCH + db TM_FIRE_PUNCH + db TM_ICE_PUNCH + db TM_ROCK_SMASH + db -1 ; end + +MartGoldenrod5F4: + db 5 ; # items + db TM_THUNDERPUNCH + db TM_FIRE_PUNCH + db TM_ICE_PUNCH + db TM_HEADBUTT + db TM_ROCK_SMASH + db -1 ; end + +MartOlivine: + db 9 ; # items + db GREAT_BALL + db SUPER_POTION + db HYPER_POTION + db ANTIDOTE + db PARLYZ_HEAL + db AWAKENING + db ICE_HEAL + db SUPER_REPEL + db SURF_MAIL + db -1 ; end + +MartEcruteak: + db 10 ; # items + db POKE_BALL + db GREAT_BALL + db POTION + db SUPER_POTION + db ANTIDOTE + db PARLYZ_HEAL + db AWAKENING + db BURN_HEAL + db ICE_HEAL + db REVIVE + db -1 ; end + +MartMahogany1: + db 4 ; # items + db TINYMUSHROOM + db SLOWPOKETAIL + db POKE_BALL + db POTION + db -1 ; end + +MartMahogany2: + db 9 ; # items + db RAGECANDYBAR + db GREAT_BALL + db SUPER_POTION + db HYPER_POTION + db ANTIDOTE + db PARLYZ_HEAL + db SUPER_REPEL + db REVIVE + db FLOWER_MAIL + db -1 ; end + +MartBlackthorn: + db 9 ; # items + db GREAT_BALL + db ULTRA_BALL + db HYPER_POTION + db MAX_POTION + db FULL_HEAL + db REVIVE + db MAX_REPEL + db X_DEFEND + db X_ATTACK + db -1 ; end + +MartViridian: + db 9 ; # items + db ULTRA_BALL + db HYPER_POTION + db FULL_HEAL + db REVIVE + db ANTIDOTE + db PARLYZ_HEAL + db AWAKENING + db BURN_HEAL + db FLOWER_MAIL + db -1 ; end + +MartPewter: + db 7 ; # items + db GREAT_BALL + db SUPER_POTION + db SUPER_REPEL + db ANTIDOTE + db PARLYZ_HEAL + db AWAKENING + db BURN_HEAL + db -1 ; end + +MartCerulean: + db 9 ; # items + db GREAT_BALL + db ULTRA_BALL + db SUPER_POTION + db SUPER_REPEL + db FULL_HEAL + db X_DEFEND + db X_ATTACK + db DIRE_HIT + db SURF_MAIL + db -1 ; end + +MartLavender: + db 8 ; # items + db GREAT_BALL + db POTION + db SUPER_POTION + db MAX_REPEL + db ANTIDOTE + db PARLYZ_HEAL + db AWAKENING + db BURN_HEAL + db -1 ; end + +MartVermilion: + db 8 ; # items + db ULTRA_BALL + db SUPER_POTION + db HYPER_POTION + db REVIVE + db PARLYZ_HEAL + db AWAKENING + db BURN_HEAL + db LITEBLUEMAIL + db -1 ; end + +MartCeladon2F1: + db 7 ; # items + db POTION + db SUPER_POTION + db HYPER_POTION + db MAX_POTION + db REVIVE + db SUPER_REPEL + db MAX_REPEL + db -1 ; end + +MartCeladon2F2: + db 10 ; # items + db POKE_BALL + db GREAT_BALL + db ULTRA_BALL + db ESCAPE_ROPE + db FULL_HEAL + db ANTIDOTE + db BURN_HEAL + db ICE_HEAL + db AWAKENING + db PARLYZ_HEAL + db -1 ; end + +MartCeladon3F: + db 5 ; # items + db TM_HIDDEN_POWER + db TM_SUNNY_DAY + db TM_PROTECT + db TM_RAIN_DANCE + db TM_SANDSTORM + db -1 ; end + +MartCeladon4F: + db 3 ; # items + db POKE_DOLL + db LOVELY_MAIL + db SURF_MAIL + db -1 ; end + +MartCeladon5F1: + db 5 ; # items + db HP_UP + db PROTEIN + db IRON + db CARBOS + db CALCIUM + db -1 ; end + +MartCeladon5F2: + db 7 ; # items + db X_ACCURACY + db GUARD_SPEC + db DIRE_HIT + db X_ATTACK + db X_DEFEND + db X_SPEED + db X_SPECIAL + db -1 ; end + +MartFuchsia: + db 7 ; # items + db GREAT_BALL + db ULTRA_BALL + db SUPER_POTION + db HYPER_POTION + db FULL_HEAL + db MAX_REPEL + db FLOWER_MAIL + db -1 ; end + +MartSaffron: + db 8 ; # items + db GREAT_BALL + db ULTRA_BALL + db HYPER_POTION + db MAX_POTION + db FULL_HEAL + db X_ATTACK + db X_DEFEND + db FLOWER_MAIL + db -1 ; end + +MartMtMoon: + db 6 ; # items + db POKE_DOLL + db FRESH_WATER + db SODA_POP + db LEMONADE + db REPEL + db PORTRAITMAIL + db -1 ; end + +MartIndigoPlateau: + db 7 ; # items + db ULTRA_BALL + db MAX_REPEL + db HYPER_POTION + db MAX_POTION + db FULL_RESTORE + db REVIVE + db FULL_HEAL + db -1 ; end + +MartUnderground: + db 4 ; # items + db ENERGYPOWDER + db ENERGY_ROOT + db HEAL_POWDER + db REVIVAL_HERB + db -1 ; end + +DefaultMart: + db 2 ; # items + db POKE_BALL + db POTION + db -1 ; end diff --git a/data/items/mom_phone.asm b/data/items/mom_phone.asm new file mode 100644 index 0000000..6e891ef --- /dev/null +++ b/data/items/mom_phone.asm @@ -0,0 +1,29 @@ +MACRO momitem +; money to trigger, cost, kind, item + dt \1 + dt \2 + db \3, \4 +ENDM + +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 + +MomItems_2: + momitem 900, 600, MOM_ITEM, SUPER_POTION + momitem 4000, 270, MOM_ITEM, REPEL + momitem 7000, 600, MOM_ITEM, SUPER_POTION + momitem 10000, 1800, MOM_DOLL, DECO_CHARMANDER_DOLL + momitem 15000, 3000, MOM_ITEM, MOON_STONE + momitem 19000, 600, MOM_ITEM, SUPER_POTION + momitem 30000, 4800, MOM_DOLL, DECO_CLEFAIRY_DOLL + 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 + + dt 0 ; unused diff --git a/data/items/mystery_gift_items.asm b/data/items/mystery_gift_items.asm new file mode 100644 index 0000000..242035e --- /dev/null +++ b/data/items/mystery_gift_items.asm @@ -0,0 +1,39 @@ +MysteryGiftItems: + db BERRY + db PRZCUREBERRY + db MINT_BERRY + db ICE_BERRY + db BURNT_BERRY + db PSNCUREBERRY + db GUARD_SPEC + db X_DEFEND + db X_ATTACK + db BITTER_BERRY + db DIRE_HIT + db X_SPECIAL + db X_ACCURACY + db EON_MAIL + db MORPH_MAIL + db MUSIC_MAIL + db MIRACLEBERRY + db GOLD_BERRY + db REVIVE + db GREAT_BALL + db SUPER_REPEL + db MAX_REPEL + db ELIXER + db ETHER + db WATER_STONE + db FIRE_STONE + db LEAF_STONE + db THUNDERSTONE + db MAX_ETHER + db MAX_ELIXER + db MAX_REVIVE + db SCOPE_LENS + db HP_UP + db PP_UP + db RARE_CANDY + db BLUESKY_MAIL + db MIRAGE_MAIL +.End diff --git a/data/items/names.asm b/data/items/names.asm new file mode 100644 index 0000000..b820b77 --- /dev/null +++ b/data/items/names.asm @@ -0,0 +1,262 @@ +ItemNames:: + list_start ItemNames + li "MASTER BALL" + li "ULTRA BALL" + li "BRIGHTPOWDER" + li "GREAT BALL" + li "# BALL" + li "TERU-SAMA" + li "BICYCLE" + li "MOON STONE" + li "ANTIDOTE" + li "BURN HEAL" + li "ICE HEAL" + li "AWAKENING" + li "PARLYZ HEAL" + li "FULL RESTORE" + li "MAX POTION" + li "HYPER POTION" + li "SUPER POTION" + li "POTION" + li "ESCAPE ROPE" + li "REPEL" + li "MAX ELIXER" + li "FIRE STONE" + li "THUNDERSTONE" + li "WATER STONE" + li "TERU-SAMA" + li "HP UP" + li "PROTEIN" + li "IRON" + li "CARBOS" + li "LUCKY PUNCH" + li "CALCIUM" + li "RARE CANDY" + li "X ACCURACY" + li "LEAF STONE" + li "METAL POWDER" + li "NUGGET" + li "# DOLL" + li "FULL HEAL" + li "REVIVE" + li "MAX REVIVE" + li "GUARD SPEC." + li "SUPER REPEL" + li "MAX REPEL" + li "DIRE HIT" + li "TERU-SAMA" + li "FRESH WATER" + li "SODA POP" + li "LEMONADE" + li "X ATTACK" + li "TERU-SAMA" + li "X DEFEND" + li "X SPEED" + li "X SPECIAL" + li "COIN CASE" + li "ITEMFINDER" + li "TERU-SAMA" + li "EXP.SHARE" + li "OLD ROD" + li "GOOD ROD" + li "SILVER LEAF" + li "SUPER ROD" + li "PP UP" + li "ETHER" + li "MAX ETHER" + li "ELIXER" + li "RED SCALE" + li "SECRETPOTION" + li "S.S.TICKET" + li "MYSTERY EGG" + li "CLEAR BELL" + li "SILVER WING" + li "MOOMOO MILK" + li "QUICK CLAW" + li "PSNCUREBERRY" + li "GOLD LEAF" + li "SOFT SAND" + li "SHARP BEAK" + li "PRZCUREBERRY" + li "BURNT BERRY" + li "ICE BERRY" + li "POISON BARB" + li "KING'S ROCK" + li "BITTER BERRY" + li "MINT BERRY" + li "RED APRICORN" + li "TINYMUSHROOM" + li "BIG MUSHROOM" + li "SILVERPOWDER" + li "BLU APRICORN" + li "TERU-SAMA" + li "AMULET COIN" + li "YLW APRICORN" + li "GRN APRICORN" + li "CLEANSE TAG" + li "MYSTIC WATER" + li "TWISTEDSPOON" + li "WHT APRICORN" + li "BLACKBELT" + li "BLK APRICORN" + li "TERU-SAMA" + li "PNK APRICORN" + li "BLACKGLASSES" + li "SLOWPOKETAIL" + li "PINK BOW" + li "STICK" + li "SMOKE BALL" + li "NEVERMELTICE" + li "MAGNET" + li "MIRACLEBERRY" + li "PEARL" + li "BIG PEARL" + li "EVERSTONE" + li "SPELL TAG" + li "RAGECANDYBAR" + li "GS BALL" + li "BLUE CARD" + li "MIRACLE SEED" + li "THICK CLUB" + li "FOCUS BAND" + li "TERU-SAMA" + li "ENERGYPOWDER" + li "ENERGY ROOT" + li "HEAL POWDER" + li "REVIVAL HERB" + li "HARD STONE" + li "LUCKY EGG" + li "CARD KEY" + li "MACHINE PART" + li "EGG TICKET" + li "LOST ITEM" + li "STARDUST" + li "STAR PIECE" + li "BASEMENT KEY" + li "PASS" + li "TERU-SAMA" + li "TERU-SAMA" + li "TERU-SAMA" + li "CHARCOAL" + li "BERRY JUICE" + li "SCOPE LENS" + li "TERU-SAMA" + li "TERU-SAMA" + li "METAL COAT" + li "DRAGON FANG" + li "TERU-SAMA" + li "LEFTOVERS" + li "TERU-SAMA" + li "TERU-SAMA" + li "TERU-SAMA" + li "MYSTERYBERRY" + li "DRAGON SCALE" + li "BERSERK GENE" + li "TERU-SAMA" + li "TERU-SAMA" + li "TERU-SAMA" + li "SACRED ASH" + li "HEAVY BALL" + li "FLOWER MAIL" + li "LEVEL BALL" + li "LURE BALL" + li "FAST BALL" + li "TERU-SAMA" + li "LIGHT BALL" + li "FRIEND BALL" + li "MOON BALL" + li "LOVE BALL" + li "NORMAL BOX" + li "GORGEOUS BOX" + li "SUN STONE" + li "POLKADOT BOW" + li "TERU-SAMA" + li "UP-GRADE" + li "BERRY" + li "GOLD BERRY" + li "SQUIRTBOTTLE" + li "TERU-SAMA" + li "PARK BALL" + li "RAINBOW WING" + li "TERU-SAMA" + li "BRICK PIECE" + li "SURF MAIL" + li "LITEBLUEMAIL" + li "PORTRAITMAIL" + li "LOVELY MAIL" + li "EON MAIL" + li "MORPH MAIL" + li "BLUESKY MAIL" + li "MUSIC MAIL" + li "MIRAGE MAIL" + li "TERU-SAMA" + li "TERU-SAMA" + li "TERU-SAMA" + li "TERU-SAMA" + assert_list_length NUM_ITEMS + li "TM01" + li "TM02" + li "TM03" + li "TM04" + li "TM05" + li "TM06" + li "TM07" + li "TM08" + li "TM09" + li "TM10" + li "TM11" + li "TM12" + li "TM13" + li "TM14" + li "TM15" + li "TM16" + li "TM17" + li "TM18" + li "TM19" + li "TM20" + li "TM21" + li "TM22" + li "TM23" + li "TM24" + li "TM25" + li "TM26" + li "TM27" + li "TM28" + li "TM29" + li "TM30" + li "TM31" + li "TM32" + li "TM33" + li "TM34" + li "TM35" + li "TM36" + li "TM37" + li "TM38" + li "TM39" + li "TM40" + li "TM41" + li "TM42" + li "TM43" + li "TM44" + li "TM45" + li "TM46" + li "TM47" + li "TM48" + li "TM49" + li "TM50" + assert_list_length NUM_ITEMS + NUM_TMS + li "HM01" + li "HM02" + li "HM03" + li "HM04" + li "HM05" + li "HM06" + li "HM07" + assert_list_length NUM_ITEMS + NUM_TMS + NUM_HMS + li "TERU-SAMA" + li "TERU-SAMA" + li "TERU-SAMA" + li "TERU-SAMA" + li "TERU-SAMA" + li "?" + assert_list_length $100 diff --git a/data/items/pocket_names.asm b/data/items/pocket_names.asm new file mode 100644 index 0000000..9669c52 --- /dev/null +++ b/data/items/pocket_names.asm @@ -0,0 +1,13 @@ +ItemPocketNames: +; entries correspond to item type constants + table_width 2, ItemPocketNames + dw .Item + dw .Key + dw .Ball + dw .TM + assert_table_length NUM_ITEM_TYPES + +.Item: db "ITEM POCKET@" +.Key: db "KEY POCKET@" +.Ball: db "BALL POCKET@" +.TM: db "TM POCKET@" diff --git a/data/items/rooftop_sale.asm b/data/items/rooftop_sale.asm new file mode 100644 index 0000000..9606ef2 --- /dev/null +++ b/data/items/rooftop_sale.asm @@ -0,0 +1,17 @@ +RooftopSaleMart1: + db 5 + dbw POKE_BALL, 150 + dbw GREAT_BALL, 500 + dbw SUPER_POTION, 500 + dbw FULL_HEAL, 500 + dbw REVIVE, 1200 + db -1 + +RooftopSaleMart2: + db 5 + dbw HYPER_POTION, 1000 + dbw FULL_RESTORE, 2000 + dbw FULL_HEAL, 500 + dbw ULTRA_BALL, 1000 + dbw PROTEIN, 7800 + db -1 diff --git a/data/items/x_stats.asm b/data/items/x_stats.asm new file mode 100644 index 0000000..2555420 --- /dev/null +++ b/data/items/x_stats.asm @@ -0,0 +1,6 @@ +XItemStats: + ; item, stat + db X_ATTACK, ATTACK + db X_DEFEND, DEFENSE + db X_SPEED, SPEED + db X_SPECIAL, SP_ATTACK diff --git a/data/maps/attributes.asm b/data/maps/attributes.asm new file mode 100644 index 0000000..07f4a7f --- /dev/null +++ b/data/maps/attributes.asm @@ -0,0 +1,697 @@ +MACRO map_attributes +;\1: map name +;\2: map id +;\3: border block +;\4: connections: combo of NORTH, SOUTH, WEST, and/or EAST, or 0 for none + DEF CURRENT_MAP_WIDTH = \2_WIDTH + DEF CURRENT_MAP_HEIGHT = \2_HEIGHT +\1_MapAttributes:: + db \3 + db CURRENT_MAP_HEIGHT, CURRENT_MAP_WIDTH + db BANK(\1_Blocks) + dw \1_Blocks + db BANK(\1_MapScripts) ; aka BANK(\1_MapEvents) + dw \1_MapScripts + dw \1_MapEvents + db \4 +ENDM + +; Connections go in order: north, south, west, east +MACRO connection +;\1: direction +;\2: map name +;\3: map id +;\4: offset of the target map relative to the current map +; (x offset for east/west, y offset for north/south) + + ; LEGACY: Support for old connection macro + if _NARG == 6 + connection \1, \2, \3, (\4) - (\5) + else + + ; Calculate tile offsets for source (current) and target maps + DEF _src = 0 + DEF _tgt = (\4) + 3 + if _tgt < 0 + DEF _src = -_tgt + DEF _tgt = 0 + endc + + if !STRCMP("\1", "north") + DEF _blk = \3_WIDTH * (\3_HEIGHT - 3) + _src + DEF _map = _tgt + DEF _win = (\3_WIDTH + 6) * \3_HEIGHT + 1 + DEF _y = \3_HEIGHT * 2 - 1 + DEF _x = (\4) * -2 + DEF _len = CURRENT_MAP_WIDTH + 3 - (\4) + if _len > \3_WIDTH + DEF _len = \3_WIDTH + endc + + elif !STRCMP("\1", "south") + DEF _blk = _src + DEF _map = (CURRENT_MAP_WIDTH + 6) * (CURRENT_MAP_HEIGHT + 3) + _tgt + DEF _win = \3_WIDTH + 7 + DEF _y = 0 + DEF _x = (\4) * -2 + DEF _len = CURRENT_MAP_WIDTH + 3 - (\4) + if _len > \3_WIDTH + DEF _len = \3_WIDTH + endc + + elif !STRCMP("\1", "west") + DEF _blk = (\3_WIDTH * _src) + \3_WIDTH - 3 + DEF _map = (CURRENT_MAP_WIDTH + 6) * _tgt + DEF _win = (\3_WIDTH + 6) * 2 - 6 + DEF _y = (\4) * -2 + DEF _x = \3_WIDTH * 2 - 1 + DEF _len = CURRENT_MAP_HEIGHT + 3 - (\4) + if _len > \3_HEIGHT + DEF _len = \3_HEIGHT + endc + + elif !STRCMP("\1", "east") + DEF _blk = (\3_WIDTH * _src) + DEF _map = (CURRENT_MAP_WIDTH + 6) * _tgt + CURRENT_MAP_WIDTH + 3 + DEF _win = \3_WIDTH + 7 + DEF _y = (\4) * -2 + DEF _x = 0 + DEF _len = CURRENT_MAP_HEIGHT + 3 - (\4) + if _len > \3_HEIGHT + DEF _len = \3_HEIGHT + endc + + else + fail "Invalid direction for 'connection'." + endc + + map_id \3 + dw \2_Blocks + _blk + dw wOverworldMapBlocks + _map + db _len - _src + db \3_WIDTH + db _y, _x + dw wOverworldMapBlocks + _win + + endc +ENDM + + + map_attributes NewBarkTown, NEW_BARK_TOWN, $05, WEST | EAST + connection west, Route29, ROUTE_29, 0 + connection east, Route27, ROUTE_27, 0 + + map_attributes CherrygroveCity, CHERRYGROVE_CITY, $35, NORTH | EAST + connection north, Route30, ROUTE_30, 5 + connection east, Route29, ROUTE_29, 0 + + map_attributes VioletCity, VIOLET_CITY, $05, SOUTH | WEST | EAST + connection south, Route32, ROUTE_32, 0 + connection west, Route36, ROUTE_36, 0 + connection east, Route31, ROUTE_31, 9 + + map_attributes AzaleaTown, AZALEA_TOWN, $05, WEST | EAST + connection west, Route34, ROUTE_34, -18 + connection east, Route33, ROUTE_33, 0 + + map_attributes CianwoodCity, CIANWOOD_CITY, $35, EAST + connection east, Route41, ROUTE_41, 0 + + map_attributes GoldenrodCity, GOLDENROD_CITY, $35, NORTH | SOUTH + connection north, Route35, ROUTE_35, 5 + connection south, Route34, ROUTE_34, 5 + + map_attributes OlivineCity, OLIVINE_CITY, $35, NORTH | WEST + connection north, Route39, ROUTE_39, 5 + connection west, Route40, ROUTE_40, 9 + + map_attributes EcruteakCity, ECRUTEAK_CITY, $05, SOUTH | WEST | EAST + connection south, Route37, ROUTE_37, 5 + connection west, Route38, ROUTE_38, 5 + connection east, Route42, ROUTE_42, 9 + + map_attributes MahoganyTown, MAHOGANY_TOWN, $71, NORTH | WEST | EAST + connection north, Route43, ROUTE_43, 0 + connection west, Route42, ROUTE_42, 0 + connection east, Route44, ROUTE_44, 0 + + map_attributes LakeOfRage, LAKE_OF_RAGE, $05, SOUTH + connection south, Route43, ROUTE_43, 5 + + map_attributes BlackthornCity, BLACKTHORN_CITY, $71, SOUTH | WEST + connection south, Route45, ROUTE_45, 0 + connection west, Route44, ROUTE_44, 9 + + map_attributes SilverCaveOutside, SILVER_CAVE_OUTSIDE, $2c, EAST + connection east, Route28, ROUTE_28, 9 + + map_attributes Route26, ROUTE_26, $05, WEST + connection west, Route27, ROUTE_27, 45 + + map_attributes Route27, ROUTE_27, $35, WEST | EAST + connection west, NewBarkTown, NEW_BARK_TOWN, 0 + connection east, Route26, ROUTE_26, -45 + + map_attributes Route28, ROUTE_28, $2c, WEST + connection west, SilverCaveOutside, SILVER_CAVE_OUTSIDE, -9 + + map_attributes Route29, ROUTE_29, $05, NORTH | WEST | EAST + connection north, Route46, ROUTE_46, 10 + connection west, CherrygroveCity, CHERRYGROVE_CITY, 0 + connection east, NewBarkTown, NEW_BARK_TOWN, 0 + + map_attributes Route30, ROUTE_30, $05, NORTH | SOUTH + connection north, Route31, ROUTE_31, -10 + connection south, CherrygroveCity, CHERRYGROVE_CITY, -5 + + map_attributes Route31, ROUTE_31, $05, SOUTH | WEST + connection south, Route30, ROUTE_30, 10 + connection west, VioletCity, VIOLET_CITY, -9 + + map_attributes Route32, ROUTE_32, $05, NORTH | SOUTH + connection north, VioletCity, VIOLET_CITY, 0 + connection south, Route33, ROUTE_33, 0 + + map_attributes Route33, ROUTE_33, $05, NORTH | WEST + connection north, Route32, ROUTE_32, 0 + connection west, AzaleaTown, AZALEA_TOWN, 0 + + map_attributes Route34, ROUTE_34, $05, NORTH | EAST + connection north, GoldenrodCity, GOLDENROD_CITY, -5 + connection east, AzaleaTown, AZALEA_TOWN, 18 + + map_attributes Route35, ROUTE_35, $05, NORTH | SOUTH + connection north, Route36, ROUTE_36, 0 + connection south, GoldenrodCity, GOLDENROD_CITY, -5 + + map_attributes Route36, ROUTE_36, $05, NORTH | SOUTH | EAST + connection north, Route37, ROUTE_37, 10 + connection south, Route35, ROUTE_35, 0 + connection east, VioletCity, VIOLET_CITY, 0 + + map_attributes Route37, ROUTE_37, $05, NORTH | SOUTH + connection north, EcruteakCity, ECRUTEAK_CITY, -5 + connection south, Route36, ROUTE_36, -10 + + map_attributes Route38, ROUTE_38, $05, WEST | EAST + connection west, Route39, ROUTE_39, 0 + connection east, EcruteakCity, ECRUTEAK_CITY, -5 + + map_attributes Route39, ROUTE_39, $05, SOUTH | EAST + connection south, OlivineCity, OLIVINE_CITY, -5 + connection east, Route38, ROUTE_38, 0 + + map_attributes Route40, ROUTE_40, $35, SOUTH | EAST + connection south, Route41, ROUTE_41, -15 + connection east, OlivineCity, OLIVINE_CITY, -9 + + map_attributes Route41, ROUTE_41, $35, NORTH | WEST + connection north, Route40, ROUTE_40, 15 + connection west, CianwoodCity, CIANWOOD_CITY, 0 + + map_attributes Route42, ROUTE_42, $05, WEST | EAST + connection west, EcruteakCity, ECRUTEAK_CITY, -9 + connection east, MahoganyTown, MAHOGANY_TOWN, 0 + + map_attributes Route43, ROUTE_43, $05, NORTH | SOUTH + connection north, LakeOfRage, LAKE_OF_RAGE, -5 + connection south, MahoganyTown, MAHOGANY_TOWN, 0 + + map_attributes Route44, ROUTE_44, $71, WEST | EAST + connection west, MahoganyTown, MAHOGANY_TOWN, 0 + connection east, BlackthornCity, BLACKTHORN_CITY, -9 + + map_attributes Route45, ROUTE_45, $71, NORTH | WEST + connection north, BlackthornCity, BLACKTHORN_CITY, 0 + connection west, Route46, ROUTE_46, 36 + + map_attributes Route46, ROUTE_46, $05, SOUTH | EAST + connection south, Route29, ROUTE_29, -10 + connection east, Route45, ROUTE_45, -36 + + map_attributes PewterCity, PEWTER_CITY, $0f, SOUTH | EAST + connection south, Route2, ROUTE_2, 5 + connection east, Route3, ROUTE_3, 5 + + map_attributes Route2, ROUTE_2, $0f, NORTH | SOUTH + connection north, PewterCity, PEWTER_CITY, -5 + connection south, ViridianCity, VIRIDIAN_CITY, -5 + + map_attributes ViridianCity, VIRIDIAN_CITY, $0f, NORTH | SOUTH | WEST + connection north, Route2, ROUTE_2, 5 + connection south, Route1, ROUTE_1, 10 + connection west, Route22, ROUTE_22, 4 + + map_attributes Route22, ROUTE_22, $2c, EAST + connection east, ViridianCity, VIRIDIAN_CITY, -4 + + map_attributes Route1, ROUTE_1, $0f, NORTH | SOUTH + connection north, ViridianCity, VIRIDIAN_CITY, -10 + connection south, PalletTown, PALLET_TOWN, 0 + + map_attributes PalletTown, PALLET_TOWN, $0f, NORTH | SOUTH + connection north, Route1, ROUTE_1, 0 + connection south, Route21, ROUTE_21, 0 + + map_attributes Route21, ROUTE_21, $43, NORTH | SOUTH + connection north, PalletTown, PALLET_TOWN, 0 + connection south, CinnabarIsland, CINNABAR_ISLAND, 0 + + map_attributes CinnabarIsland, CINNABAR_ISLAND, $43, NORTH | EAST + connection north, Route21, ROUTE_21, 0 + connection east, Route20, ROUTE_20, 0 + + map_attributes Route20, ROUTE_20, $43, WEST | EAST + connection west, CinnabarIsland, CINNABAR_ISLAND, 0 + connection east, Route19, ROUTE_19, -9 + + map_attributes Route19, ROUTE_19, $43, NORTH | WEST + connection north, FuchsiaCity, FUCHSIA_CITY, 0 + connection west, Route20, ROUTE_20, 9 + + map_attributes FuchsiaCity, FUCHSIA_CITY, $0f, SOUTH | WEST | EAST + connection south, Route19, ROUTE_19, 0 + connection west, Route18, ROUTE_18, 7 + connection east, Route15, ROUTE_15, 9 + + map_attributes Route18, ROUTE_18, $43, WEST | EAST + connection west, Route17, ROUTE_17, -38 + connection east, FuchsiaCity, FUCHSIA_CITY, -7 + + map_attributes Route17, ROUTE_17, $43, NORTH | EAST + connection north, Route16, ROUTE_16, 0 + connection east, Route18, ROUTE_18, 38 + + map_attributes Route16, ROUTE_16, $0f, SOUTH | EAST + connection south, Route17, ROUTE_17, 0 + connection east, CeladonCity, CELADON_CITY, -9 + + map_attributes CeladonCity, CELADON_CITY, $0f, WEST | EAST + connection west, Route16, ROUTE_16, 9 + connection east, Route7, ROUTE_7, 5 + + map_attributes Route7, ROUTE_7, $0f, WEST | EAST + connection west, CeladonCity, CELADON_CITY, -5 + connection east, SaffronCity, SAFFRON_CITY, -9 + + map_attributes Route15, ROUTE_15, $0f, WEST | EAST + connection west, FuchsiaCity, FUCHSIA_CITY, -9 + connection east, Route14, ROUTE_14, -9 + + map_attributes Route14, ROUTE_14, $43, NORTH | WEST + connection north, Route13, ROUTE_13, 0 + connection west, Route15, ROUTE_15, 9 + + map_attributes Route13, ROUTE_13, $43, NORTH | SOUTH + connection north, Route12, ROUTE_12, 20 + connection south, Route14, ROUTE_14, 0 + + map_attributes Route12, ROUTE_12, $43, NORTH | SOUTH | WEST + connection north, LavenderTown, LAVENDER_TOWN, 0 + connection south, Route13, ROUTE_13, -20 + connection west, Route11, ROUTE_11, 9 + + map_attributes Route11, ROUTE_11, $0f, WEST | EAST + connection west, VermilionCity, VERMILION_CITY, 0 + connection east, Route12, ROUTE_12, -9 + + map_attributes LavenderTown, LAVENDER_TOWN, $2c, NORTH | SOUTH | WEST + connection north, Route10South, ROUTE_10_SOUTH, 0 + connection south, Route12, ROUTE_12, 0 + connection west, Route8, ROUTE_8, 0 + + map_attributes VermilionCity, VERMILION_CITY, $43, NORTH | EAST + connection north, Route6, ROUTE_6, 5 + connection east, Route11, ROUTE_11, 0 + + map_attributes Route6, ROUTE_6, $0f, NORTH | SOUTH + connection north, SaffronCity, SAFFRON_CITY, -5 + connection south, VermilionCity, VERMILION_CITY, -5 + + map_attributes SaffronCity, SAFFRON_CITY, $0f, NORTH | SOUTH | WEST | EAST + connection north, Route5, ROUTE_5, 5 + connection south, Route6, ROUTE_6, 5 + connection west, Route7, ROUTE_7, 9 + connection east, Route8, ROUTE_8, 9 + + map_attributes Route5, ROUTE_5, $0f, NORTH | SOUTH + connection north, CeruleanCity, CERULEAN_CITY, -5 + connection south, SaffronCity, SAFFRON_CITY, -5 + + map_attributes CeruleanCity, CERULEAN_CITY, $0f, NORTH | SOUTH | WEST | EAST + connection north, Route24, ROUTE_24, 6 + connection south, Route5, ROUTE_5, 5 + connection west, Route4, ROUTE_4, 5 + connection east, Route9, ROUTE_9, 9 + + map_attributes Route9, ROUTE_9, $2c, SOUTH | WEST + connection south, Route10North, ROUTE_10_NORTH, 20 + connection west, CeruleanCity, CERULEAN_CITY, -9 + + map_attributes Route24, ROUTE_24, $2c, NORTH | SOUTH + connection north, Route25, ROUTE_25, 0 + connection south, CeruleanCity, CERULEAN_CITY, -6 + + map_attributes Route25, ROUTE_25, $2c, SOUTH + connection south, Route24, ROUTE_24, 0 + + map_attributes Route3, ROUTE_3, $2c, WEST | EAST + connection west, PewterCity, PEWTER_CITY, -5 + connection east, Route4, ROUTE_4, 0 + + map_attributes Route4, ROUTE_4, $2c, WEST | EAST + connection west, Route3, ROUTE_3, 0 + connection east, CeruleanCity, CERULEAN_CITY, -5 + + map_attributes Route8, ROUTE_8, $2c, WEST | EAST + connection west, SaffronCity, SAFFRON_CITY, -9 + connection east, LavenderTown, LAVENDER_TOWN, 0 + + map_attributes Route10North, ROUTE_10_NORTH, $2c, NORTH | SOUTH + connection north, Route9, ROUTE_9, -20 + connection south, Route10South, ROUTE_10_SOUTH, 0 + + map_attributes Route10South, ROUTE_10_SOUTH, $2c, NORTH | SOUTH + connection north, Route10North, ROUTE_10_NORTH, 0 + connection south, LavenderTown, LAVENDER_TOWN, 0 + + map_attributes Route23, ROUTE_23, $0f, 0 + map_attributes SproutTower1F, SPROUT_TOWER_1F, $00, 0 + map_attributes SproutTower2F, SPROUT_TOWER_2F, $00, 0 + map_attributes SproutTower3F, SPROUT_TOWER_3F, $00, 0 + map_attributes TinTower1F, TIN_TOWER_1F, $00, 0 + map_attributes TinTower2F, TIN_TOWER_2F, $00, 0 + map_attributes TinTower3F, TIN_TOWER_3F, $00, 0 + map_attributes TinTower4F, TIN_TOWER_4F, $00, 0 + map_attributes TinTower5F, TIN_TOWER_5F, $00, 0 + map_attributes TinTower6F, TIN_TOWER_6F, $00, 0 + map_attributes TinTower7F, TIN_TOWER_7F, $00, 0 + map_attributes TinTower8F, TIN_TOWER_8F, $00, 0 + map_attributes TinTower9F, TIN_TOWER_9F, $00, 0 + map_attributes BurnedTower1F, BURNED_TOWER_1F, $00, 0 + map_attributes BurnedTowerB1F, BURNED_TOWER_B1F, $09, 0 + map_attributes NationalPark, NATIONAL_PARK, $00, 0 + map_attributes NationalParkBugContest, NATIONAL_PARK_BUG_CONTEST, $00, 0 + map_attributes RadioTower1F, RADIO_TOWER_1F, $00, 0 + map_attributes RadioTower2F, RADIO_TOWER_2F, $00, 0 + map_attributes RadioTower3F, RADIO_TOWER_3F, $00, 0 + map_attributes RadioTower4F, RADIO_TOWER_4F, $00, 0 + map_attributes RadioTower5F, RADIO_TOWER_5F, $00, 0 + map_attributes RuinsOfAlphOutside, RUINS_OF_ALPH_OUTSIDE, $05, 0 + map_attributes RuinsOfAlphHoOhChamber, RUINS_OF_ALPH_HO_OH_CHAMBER, $00, 0 + map_attributes RuinsOfAlphKabutoChamber, RUINS_OF_ALPH_KABUTO_CHAMBER, $00, 0 + map_attributes RuinsOfAlphOmanyteChamber, RUINS_OF_ALPH_OMANYTE_CHAMBER, $00, 0 + map_attributes RuinsOfAlphAerodactylChamber, RUINS_OF_ALPH_AERODACTYL_CHAMBER, $00, 0 + map_attributes RuinsOfAlphInnerChamber, RUINS_OF_ALPH_INNER_CHAMBER, $00, 0 + map_attributes RuinsOfAlphResearchCenter, RUINS_OF_ALPH_RESEARCH_CENTER, $00, 0 + map_attributes RuinsOfAlphHoOhItemRoom, RUINS_OF_ALPH_HO_OH_ITEM_ROOM, $00, 0 + map_attributes RuinsOfAlphKabutoItemRoom, RUINS_OF_ALPH_KABUTO_ITEM_ROOM, $00, 0 + map_attributes RuinsOfAlphOmanyteItemRoom, RUINS_OF_ALPH_OMANYTE_ITEM_ROOM, $00, 0 + map_attributes RuinsOfAlphAerodactylItemRoom, RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM, $00, 0 + map_attributes RuinsOfAlphHoOhWordRoom, RUINS_OF_ALPH_HO_OH_WORD_ROOM, $00, 0 + map_attributes RuinsOfAlphKabutoWordRoom, RUINS_OF_ALPH_KABUTO_WORD_ROOM, $00, 0 + map_attributes RuinsOfAlphOmanyteWordRoom, RUINS_OF_ALPH_OMANYTE_WORD_ROOM, $00, 0 + map_attributes RuinsOfAlphAerodactylWordRoom, RUINS_OF_ALPH_AERODACTYL_WORD_ROOM, $00, 0 + map_attributes UnionCave1F, UNION_CAVE_1F, $09, 0 + map_attributes UnionCaveB1F, UNION_CAVE_B1F, $09, 0 + map_attributes UnionCaveB2F, UNION_CAVE_B2F, $09, 0 + map_attributes SlowpokeWellB1F, SLOWPOKE_WELL_B1F, $09, 0 + map_attributes SlowpokeWellB2F, SLOWPOKE_WELL_B2F, $09, 0 + map_attributes OlivineLighthouse1F, OLIVINE_LIGHTHOUSE_1F, $00, 0 + map_attributes OlivineLighthouse2F, OLIVINE_LIGHTHOUSE_2F, $00, 0 + map_attributes OlivineLighthouse3F, OLIVINE_LIGHTHOUSE_3F, $00, 0 + map_attributes OlivineLighthouse4F, OLIVINE_LIGHTHOUSE_4F, $00, 0 + map_attributes OlivineLighthouse5F, OLIVINE_LIGHTHOUSE_5F, $00, 0 + map_attributes OlivineLighthouse6F, OLIVINE_LIGHTHOUSE_6F, $00, 0 + map_attributes MahoganyMart1F, MAHOGANY_MART_1F, $00, 0 + map_attributes TeamRocketBaseB1F, TEAM_ROCKET_BASE_B1F, $00, 0 + map_attributes TeamRocketBaseB2F, TEAM_ROCKET_BASE_B2F, $00, 0 + map_attributes TeamRocketBaseB3F, TEAM_ROCKET_BASE_B3F, $00, 0 + map_attributes IlexForest, ILEX_FOREST, $05, 0 + map_attributes GoldenrodUnderground, GOLDENROD_UNDERGROUND, $00, 0 + map_attributes GoldenrodUndergroundSwitchRoomEntrances, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, $00, 0 + map_attributes GoldenrodDeptStoreB1F, GOLDENROD_DEPT_STORE_B1F, $00, 0 + map_attributes GoldenrodUndergroundWarehouse, GOLDENROD_UNDERGROUND_WAREHOUSE, $00, 0 + map_attributes MountMortar1FOutside, MOUNT_MORTAR_1F_OUTSIDE, $09, 0 + map_attributes MountMortar1FInside, MOUNT_MORTAR_1F_INSIDE, $09, 0 + map_attributes MountMortar2FInside, MOUNT_MORTAR_2F_INSIDE, $09, 0 + map_attributes MountMortarB1F, MOUNT_MORTAR_B1F, $09, 0 + map_attributes IcePath1F, ICE_PATH_1F, $09, 0 + map_attributes IcePathB1F, ICE_PATH_B1F, $19, 0 + map_attributes IcePathB2FMahoganySide, ICE_PATH_B2F_MAHOGANY_SIDE, $19, 0 + map_attributes IcePathB2FBlackthornSide, ICE_PATH_B2F_BLACKTHORN_SIDE, $19, 0 + map_attributes IcePathB3F, ICE_PATH_B3F, $19, 0 + map_attributes WhirlIslandNW, WHIRL_ISLAND_NW, $09, 0 + map_attributes WhirlIslandNE, WHIRL_ISLAND_NE, $09, 0 + map_attributes WhirlIslandSW, WHIRL_ISLAND_SW, $09, 0 + map_attributes WhirlIslandCave, WHIRL_ISLAND_CAVE, $09, 0 + map_attributes WhirlIslandSE, WHIRL_ISLAND_SE, $0f, 0 + map_attributes WhirlIslandB1F, WHIRL_ISLAND_B1F, $09, 0 + map_attributes WhirlIslandB2F, WHIRL_ISLAND_B2F, $2e, 0 + map_attributes WhirlIslandLugiaChamber, WHIRL_ISLAND_LUGIA_CHAMBER, $0f, 0 + map_attributes SilverCaveRoom1, SILVER_CAVE_ROOM_1, $09, 0 + map_attributes SilverCaveRoom2, SILVER_CAVE_ROOM_2, $09, 0 + map_attributes SilverCaveRoom3, SILVER_CAVE_ROOM_3, $09, 0 + map_attributes SilverCaveItemRooms, SILVER_CAVE_ITEM_ROOMS, $09, 0 + map_attributes DarkCaveVioletEntrance, DARK_CAVE_VIOLET_ENTRANCE, $09, 0 + map_attributes DarkCaveBlackthornEntrance, DARK_CAVE_BLACKTHORN_ENTRANCE, $09, 0 + map_attributes DragonsDen1F, DRAGONS_DEN_1F, $09, 0 + map_attributes DragonsDenB1F, DRAGONS_DEN_B1F, $71, 0 + map_attributes DragonShrine, DRAGON_SHRINE, $00, 0 + map_attributes TohjoFalls, TOHJO_FALLS, $09, 0 + map_attributes OlivinePokecenter1F, OLIVINE_POKECENTER_1F, $00, 0 + map_attributes OlivineGym, OLIVINE_GYM, $00, 0 + map_attributes OlivineTimsHouse, OLIVINE_TIMS_HOUSE, $00, 0 + map_attributes OlivineHouseBeta, OLIVINE_HOUSE_BETA, $00, 0 + map_attributes OlivinePunishmentSpeechHouse, OLIVINE_PUNISHMENT_SPEECH_HOUSE, $00, 0 + map_attributes OlivineGoodRodHouse, OLIVINE_GOOD_ROD_HOUSE, $00, 0 + map_attributes OlivineCafe, OLIVINE_CAFE, $00, 0 + map_attributes OlivineMart, OLIVINE_MART, $00, 0 + map_attributes Route38EcruteakGate, ROUTE_38_ECRUTEAK_GATE, $00, 0 + map_attributes Route39Barn, ROUTE_39_BARN, $00, 0 + map_attributes Route39Farmhouse, ROUTE_39_FARMHOUSE, $00, 0 + map_attributes MahoganyRedGyaradosSpeechHouse, MAHOGANY_RED_GYARADOS_SPEECH_HOUSE, $00, 0 + map_attributes MahoganyGym, MAHOGANY_GYM, $00, 0 + map_attributes MahoganyPokecenter1F, MAHOGANY_POKECENTER_1F, $00, 0 + map_attributes Route42EcruteakGate, ROUTE_42_ECRUTEAK_GATE, $00, 0 + map_attributes DiglettsCave, DIGLETTS_CAVE, $09, 0 + map_attributes MountMoon, MOUNT_MOON, $09, 0 + map_attributes UndergroundPath, UNDERGROUND_PATH, $00, 0 + map_attributes RockTunnel1F, ROCK_TUNNEL_1F, $09, 0 + map_attributes RockTunnelB1F, ROCK_TUNNEL_B1F, $09, 0 + map_attributes SafariZoneFuchsiaGateBeta, SAFARI_ZONE_FUCHSIA_GATE_BETA, $00, 0 + map_attributes SafariZoneBeta, SAFARI_ZONE_BETA, $13, 0 + map_attributes VictoryRoad, VICTORY_ROAD, $1d, 0 + map_attributes EcruteakTinTowerEntrance, ECRUTEAK_TIN_TOWER_ENTRANCE, $00, 0 + map_attributes WiseTriosRoom, WISE_TRIOS_ROOM, $00, 0 + map_attributes EcruteakPokecenter1F, ECRUTEAK_POKECENTER_1F, $00, 0 + map_attributes EcruteakLugiaSpeechHouse, ECRUTEAK_LUGIA_SPEECH_HOUSE, $00, 0 + map_attributes DanceTheater, DANCE_THEATER, $00, 0 + map_attributes EcruteakMart, ECRUTEAK_MART, $00, 0 + map_attributes EcruteakGym, ECRUTEAK_GYM, $00, 0 + map_attributes EcruteakItemfinderHouse, ECRUTEAK_ITEMFINDER_HOUSE, $00, 0 + map_attributes BlackthornGym1F, BLACKTHORN_GYM_1F, $00, 0 + map_attributes BlackthornGym2F, BLACKTHORN_GYM_2F, $00, 0 + map_attributes BlackthornDragonSpeechHouse, BLACKTHORN_DRAGON_SPEECH_HOUSE, $00, 0 + map_attributes BlackthornEmysHouse, BLACKTHORN_EMYS_HOUSE, $00, 0 + map_attributes BlackthornMart, BLACKTHORN_MART, $00, 0 + map_attributes BlackthornPokecenter1F, BLACKTHORN_POKECENTER_1F, $00, 0 + map_attributes MoveDeletersHouse, MOVE_DELETERS_HOUSE, $00, 0 + map_attributes CinnabarPokecenter1F, CINNABAR_POKECENTER_1F, $00, 0 + map_attributes CinnabarPokecenter2FBeta, CINNABAR_POKECENTER_2F_BETA, $00, 0 + map_attributes Route19FuchsiaGate, ROUTE_19_FUCHSIA_GATE, $00, 0 + map_attributes SeafoamGym, SEAFOAM_GYM, $09, 0 + map_attributes CeruleanGymBadgeSpeechHouse, CERULEAN_GYM_BADGE_SPEECH_HOUSE, $00, 0 + map_attributes CeruleanPoliceStation, CERULEAN_POLICE_STATION, $00, 0 + map_attributes CeruleanTradeSpeechHouse, CERULEAN_TRADE_SPEECH_HOUSE, $00, 0 + map_attributes CeruleanPokecenter1F, CERULEAN_POKECENTER_1F, $00, 0 + map_attributes CeruleanPokecenter2FBeta, CERULEAN_POKECENTER_2F_BETA, $00, 0 + map_attributes CeruleanGym, CERULEAN_GYM, $00, 0 + map_attributes CeruleanMart, CERULEAN_MART, $00, 0 + map_attributes Route10Pokecenter1F, ROUTE_10_POKECENTER_1F, $00, 0 + map_attributes Route10Pokecenter2FBeta, ROUTE_10_POKECENTER_2F_BETA, $00, 0 + map_attributes PowerPlant, POWER_PLANT, $00, 0 + map_attributes BillsHouse, BILLS_HOUSE, $00, 0 + map_attributes AzaleaPokecenter1F, AZALEA_POKECENTER_1F, $00, 0 + map_attributes CharcoalKiln, CHARCOAL_KILN, $00, 0 + map_attributes AzaleaMart, AZALEA_MART, $00, 0 + map_attributes KurtsHouse, KURTS_HOUSE, $00, 0 + map_attributes AzaleaGym, AZALEA_GYM, $00, 0 + map_attributes LakeOfRageHiddenPowerHouse, LAKE_OF_RAGE_HIDDEN_POWER_HOUSE, $00, 0 + map_attributes LakeOfRageMagikarpHouse, LAKE_OF_RAGE_MAGIKARP_HOUSE, $00, 0 + map_attributes Route43MahoganyGate, ROUTE_43_MAHOGANY_GATE, $00, 0 + map_attributes Route43Gate, ROUTE_43_GATE, $00, 0 + map_attributes VioletMart, VIOLET_MART, $00, 0 + map_attributes VioletGym, VIOLET_GYM, $00, 0 + map_attributes EarlsPokemonAcademy, EARLS_POKEMON_ACADEMY, $00, 0 + map_attributes VioletNicknameSpeechHouse, VIOLET_NICKNAME_SPEECH_HOUSE, $00, 0 + map_attributes VioletPokecenter1F, VIOLET_POKECENTER_1F, $00, 0 + map_attributes VioletKylesHouse, VIOLET_KYLES_HOUSE, $00, 0 + map_attributes Route32RuinsOfAlphGate, ROUTE_32_RUINS_OF_ALPH_GATE, $00, 0 + map_attributes Route32Pokecenter1F, ROUTE_32_POKECENTER_1F, $00, 0 + map_attributes Route35GoldenrodGate, ROUTE_35_GOLDENROD_GATE, $00, 0 + map_attributes Route35NationalParkGate, ROUTE_35_NATIONAL_PARK_GATE, $00, 0 + map_attributes Route36RuinsOfAlphGate, ROUTE_36_RUINS_OF_ALPH_GATE, $00, 0 + map_attributes Route36NationalParkGate, ROUTE_36_NATIONAL_PARK_GATE, $00, 0 + map_attributes GoldenrodGym, GOLDENROD_GYM, $00, 0 + map_attributes GoldenrodBikeShop, GOLDENROD_BIKE_SHOP, $00, 0 + map_attributes GoldenrodHappinessRater, GOLDENROD_HAPPINESS_RATER, $00, 0 + map_attributes BillsFamilysHouse, BILLS_FAMILYS_HOUSE, $00, 0 + map_attributes GoldenrodMagnetTrainStation, GOLDENROD_MAGNET_TRAIN_STATION, $00, 0 + map_attributes GoldenrodFlowerShop, GOLDENROD_FLOWER_SHOP, $00, 0 + map_attributes GoldenrodPPSpeechHouse, GOLDENROD_PP_SPEECH_HOUSE, $00, 0 + map_attributes GoldenrodNameRater, GOLDENROD_NAME_RATER, $00, 0 + map_attributes GoldenrodDeptStore1F, GOLDENROD_DEPT_STORE_1F, $00, 0 + map_attributes GoldenrodDeptStore2F, GOLDENROD_DEPT_STORE_2F, $00, 0 + map_attributes GoldenrodDeptStore3F, GOLDENROD_DEPT_STORE_3F, $00, 0 + map_attributes GoldenrodDeptStore4F, GOLDENROD_DEPT_STORE_4F, $00, 0 + map_attributes GoldenrodDeptStore5F, GOLDENROD_DEPT_STORE_5F, $00, 0 + map_attributes GoldenrodDeptStore6F, GOLDENROD_DEPT_STORE_6F, $00, 0 + map_attributes GoldenrodDeptStoreElevator, GOLDENROD_DEPT_STORE_ELEVATOR, $00, 0 + map_attributes GoldenrodDeptStoreRoof, GOLDENROD_DEPT_STORE_ROOF, $24, 0 + map_attributes GoldenrodGameCorner, GOLDENROD_GAME_CORNER, $00, 0 + map_attributes GoldenrodPokecenter1F, GOLDENROD_POKECENTER_1F, $00, 0 + map_attributes PokecomCenterAdminOfficeMobile, POKECOM_CENTER_ADMIN_OFFICE_MOBILE, $00, 0 + map_attributes IlexForestAzaleaGate, ILEX_FOREST_AZALEA_GATE, $00, 0 + map_attributes Route34IlexForestGate, ROUTE_34_ILEX_FOREST_GATE, $00, 0 + map_attributes DayCare, DAY_CARE, $00, 0 + map_attributes VermilionFishingSpeechHouse, VERMILION_FISHING_SPEECH_HOUSE, $00, 0 + map_attributes VermilionPokecenter1F, VERMILION_POKECENTER_1F, $00, 0 + map_attributes VermilionPokecenter2FBeta, VERMILION_POKECENTER_2F_BETA, $00, 0 + map_attributes PokemonFanClub, POKEMON_FAN_CLUB, $00, 0 + map_attributes VermilionMagnetTrainSpeechHouse, VERMILION_MAGNET_TRAIN_SPEECH_HOUSE, $00, 0 + map_attributes VermilionMart, VERMILION_MART, $00, 0 + map_attributes VermilionDiglettsCaveSpeechHouse, VERMILION_DIGLETTS_CAVE_SPEECH_HOUSE, $00, 0 + map_attributes VermilionGym, VERMILION_GYM, $00, 0 + map_attributes Route6SaffronGate, ROUTE_6_SAFFRON_GATE, $00, 0 + map_attributes Route6UndergroundPathEntrance, ROUTE_6_UNDERGROUND_PATH_ENTRANCE, $00, 0 + map_attributes RedsHouse1F, REDS_HOUSE_1F, $00, 0 + map_attributes RedsHouse2F, REDS_HOUSE_2F, $00, 0 + map_attributes BluesHouse, BLUES_HOUSE, $00, 0 + map_attributes OaksLab, OAKS_LAB, $00, 0 + map_attributes PewterNidoranSpeechHouse, PEWTER_NIDORAN_SPEECH_HOUSE, $00, 0 + map_attributes PewterGym, PEWTER_GYM, $00, 0 + map_attributes PewterMart, PEWTER_MART, $00, 0 + map_attributes PewterPokecenter1F, PEWTER_POKECENTER_1F, $00, 0 + map_attributes PewterPokecenter2FBeta, PEWTER_POKECENTER_2F_BETA, $00, 0 + map_attributes PewterSnoozeSpeechHouse, PEWTER_SNOOZE_SPEECH_HOUSE, $00, 0 + map_attributes OlivinePort, OLIVINE_PORT, $0a, 0 + map_attributes VermilionPort, VERMILION_PORT, $0a, 0 + map_attributes FastShip1F, FAST_SHIP_1F, $00, 0 + map_attributes FastShipCabins_NNW_NNE_NE, FAST_SHIP_CABINS_NNW_NNE_NE, $00, 0 + map_attributes FastShipCabins_SW_SSW_NW, FAST_SHIP_CABINS_SW_SSW_NW, $00, 0 + map_attributes FastShipCabins_SE_SSE_CaptainsCabin, FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN, $00, 0 + map_attributes FastShipB1F, FAST_SHIP_B1F, $00, 0 + map_attributes OlivinePortPassage, OLIVINE_PORT_PASSAGE, $00, 0 + map_attributes VermilionPortPassage, VERMILION_PORT_PASSAGE, $00, 0 + map_attributes MountMoonSquare, MOUNT_MOON_SQUARE, $2d, 0 + map_attributes MountMoonGiftShop, MOUNT_MOON_GIFT_SHOP, $00, 0 + map_attributes TinTowerRoof, TIN_TOWER_ROOF, $00, 0 + map_attributes IndigoPlateauPokecenter1F, INDIGO_PLATEAU_POKECENTER_1F, $00, 0 + map_attributes WillsRoom, WILLS_ROOM, $00, 0 + map_attributes KogasRoom, KOGAS_ROOM, $00, 0 + map_attributes BrunosRoom, BRUNOS_ROOM, $00, 0 + map_attributes KarensRoom, KARENS_ROOM, $00, 0 + map_attributes LancesRoom, LANCES_ROOM, $00, 0 + map_attributes HallOfFame, HALL_OF_FAME, $00, 0 + map_attributes FuchsiaMart, FUCHSIA_MART, $00, 0 + map_attributes SafariZoneMainOffice, SAFARI_ZONE_MAIN_OFFICE, $00, 0 + map_attributes FuchsiaGym, FUCHSIA_GYM, $00, 0 + map_attributes BillsBrothersHouse, BILLS_BROTHERS_HOUSE, $00, 0 + map_attributes FuchsiaPokecenter1F, FUCHSIA_POKECENTER_1F, $00, 0 + map_attributes FuchsiaPokecenter2FBeta, FUCHSIA_POKECENTER_2F_BETA, $00, 0 + map_attributes SafariZoneWardensHome, SAFARI_ZONE_WARDENS_HOME, $00, 0 + map_attributes Route15FuchsiaGate, ROUTE_15_FUCHSIA_GATE, $00, 0 + map_attributes LavenderPokecenter1F, LAVENDER_POKECENTER_1F, $00, 0 + map_attributes LavenderPokecenter2FBeta, LAVENDER_POKECENTER_2F_BETA, $00, 0 + map_attributes MrFujisHouse, MR_FUJIS_HOUSE, $00, 0 + map_attributes LavenderSpeechHouse, LAVENDER_SPEECH_HOUSE, $00, 0 + map_attributes LavenderNameRater, LAVENDER_NAME_RATER, $00, 0 + map_attributes LavenderMart, LAVENDER_MART, $00, 0 + map_attributes SoulHouse, SOUL_HOUSE, $00, 0 + map_attributes LavRadioTower1F, LAV_RADIO_TOWER_1F, $00, 0 + map_attributes Route8SaffronGate, ROUTE_8_SAFFRON_GATE, $00, 0 + map_attributes Route12SuperRodHouse, ROUTE_12_SUPER_ROD_HOUSE, $00, 0 + map_attributes SilverCavePokecenter1F, SILVER_CAVE_POKECENTER_1F, $00, 0 + map_attributes Route28SteelWingHouse, ROUTE_28_STEEL_WING_HOUSE, $00, 0 + map_attributes Pokecenter2F, POKECENTER_2F, $00, 0 + map_attributes TradeCenter, TRADE_CENTER, $00, 0 + map_attributes Colosseum, COLOSSEUM, $00, 0 + map_attributes TimeCapsule, TIME_CAPSULE, $00, 0 + map_attributes MobileTradeRoom, MOBILE_TRADE_ROOM, $00, 0 + map_attributes MobileBattleRoom, MOBILE_BATTLE_ROOM, $00, 0 + map_attributes CeladonDeptStore1F, CELADON_DEPT_STORE_1F, $00, 0 + map_attributes CeladonDeptStore2F, CELADON_DEPT_STORE_2F, $00, 0 + map_attributes CeladonDeptStore3F, CELADON_DEPT_STORE_3F, $00, 0 + map_attributes CeladonDeptStore4F, CELADON_DEPT_STORE_4F, $00, 0 + map_attributes CeladonDeptStore5F, CELADON_DEPT_STORE_5F, $00, 0 + map_attributes CeladonDeptStore6F, CELADON_DEPT_STORE_6F, $00, 0 + map_attributes CeladonDeptStoreElevator, CELADON_DEPT_STORE_ELEVATOR, $00, 0 + map_attributes CeladonMansion1F, CELADON_MANSION_1F, $00, 0 + map_attributes CeladonMansion2F, CELADON_MANSION_2F, $00, 0 + map_attributes CeladonMansion3F, CELADON_MANSION_3F, $00, 0 + map_attributes CeladonMansionRoof, CELADON_MANSION_ROOF, $01, 0 + map_attributes CeladonMansionRoofHouse, CELADON_MANSION_ROOF_HOUSE, $00, 0 + map_attributes CeladonPokecenter1F, CELADON_POKECENTER_1F, $00, 0 + map_attributes CeladonPokecenter2FBeta, CELADON_POKECENTER_2F_BETA, $00, 0 + map_attributes CeladonGameCorner, CELADON_GAME_CORNER, $00, 0 + map_attributes CeladonGameCornerPrizeRoom, CELADON_GAME_CORNER_PRIZE_ROOM, $00, 0 + map_attributes CeladonGym, CELADON_GYM, $00, 0 + map_attributes CeladonCafe, CELADON_CAFE, $00, 0 + map_attributes Route16FuchsiaSpeechHouse, ROUTE_16_FUCHSIA_SPEECH_HOUSE, $00, 0 + map_attributes Route16Gate, ROUTE_16_GATE, $00, 0 + map_attributes Route7SaffronGate, ROUTE_7_SAFFRON_GATE, $00, 0 + map_attributes Route17Route18Gate, ROUTE_17_ROUTE_18_GATE, $00, 0 + map_attributes ManiasHouse, MANIAS_HOUSE, $00, 0 + map_attributes CianwoodGym, CIANWOOD_GYM, $00, 0 + map_attributes CianwoodPokecenter1F, CIANWOOD_POKECENTER_1F, $00, 0 + map_attributes CianwoodPharmacy, CIANWOOD_PHARMACY, $00, 0 + map_attributes CianwoodPhotoStudio, CIANWOOD_PHOTO_STUDIO, $00, 0 + map_attributes CianwoodLugiaSpeechHouse, CIANWOOD_LUGIA_SPEECH_HOUSE, $00, 0 + map_attributes PokeSeersHouse, POKE_SEERS_HOUSE, $00, 0 + map_attributes BattleTower1F, BATTLE_TOWER_1F, $00, 0 + map_attributes BattleTowerBattleRoom, BATTLE_TOWER_BATTLE_ROOM, $00, 0 + map_attributes BattleTowerElevator, BATTLE_TOWER_ELEVATOR, $00, 0 + map_attributes BattleTowerHallway, BATTLE_TOWER_HALLWAY, $00, 0 + map_attributes Route40BattleTowerGate, ROUTE_40_BATTLE_TOWER_GATE, $00, 0 + map_attributes BattleTowerOutside, BATTLE_TOWER_OUTSIDE, $05, 0 + map_attributes ViridianGym, VIRIDIAN_GYM, $00, 0 + map_attributes ViridianNicknameSpeechHouse, VIRIDIAN_NICKNAME_SPEECH_HOUSE, $00, 0 + map_attributes TrainerHouse1F, TRAINER_HOUSE_1F, $00, 0 + map_attributes TrainerHouseB1F, TRAINER_HOUSE_B1F, $00, 0 + map_attributes ViridianMart, VIRIDIAN_MART, $00, 0 + map_attributes ViridianPokecenter1F, VIRIDIAN_POKECENTER_1F, $00, 0 + map_attributes ViridianPokecenter2FBeta, VIRIDIAN_POKECENTER_2F_BETA, $00, 0 + map_attributes Route2NuggetHouse, ROUTE_2_NUGGET_HOUSE, $00, 0 + map_attributes Route2Gate, ROUTE_2_GATE, $00, 0 + map_attributes VictoryRoadGate, VICTORY_ROAD_GATE, $00, 0 + map_attributes ElmsLab, ELMS_LAB, $00, 0 + map_attributes PlayersHouse1F, PLAYERS_HOUSE_1F, $00, 0 + map_attributes PlayersHouse2F, PLAYERS_HOUSE_2F, $00, 0 + map_attributes PlayersNeighborsHouse, PLAYERS_NEIGHBORS_HOUSE, $00, 0 + map_attributes ElmsHouse, ELMS_HOUSE, $00, 0 + map_attributes Route26HealHouse, ROUTE_26_HEAL_HOUSE, $00, 0 + map_attributes DayOfWeekSiblingsHouse, DAY_OF_WEEK_SIBLINGS_HOUSE, $00, 0 + map_attributes Route27SandstormHouse, ROUTE_27_SANDSTORM_HOUSE, $00, 0 + map_attributes Route29Route46Gate, ROUTE_29_ROUTE_46_GATE, $00, 0 + map_attributes FightingDojo, FIGHTING_DOJO, $00, 0 + map_attributes SaffronGym, SAFFRON_GYM, $00, 0 + map_attributes SaffronMart, SAFFRON_MART, $00, 0 + map_attributes SaffronPokecenter1F, SAFFRON_POKECENTER_1F, $00, 0 + map_attributes SaffronPokecenter2FBeta, SAFFRON_POKECENTER_2F_BETA, $00, 0 + map_attributes MrPsychicsHouse, MR_PSYCHICS_HOUSE, $00, 0 + map_attributes SaffronMagnetTrainStation, SAFFRON_MAGNET_TRAIN_STATION, $00, 0 + map_attributes SilphCo1F, SILPH_CO_1F, $00, 0 + map_attributes CopycatsHouse1F, COPYCATS_HOUSE_1F, $00, 0 + map_attributes CopycatsHouse2F, COPYCATS_HOUSE_2F, $00, 0 + map_attributes Route5UndergroundPathEntrance, ROUTE_5_UNDERGROUND_PATH_ENTRANCE, $00, 0 + map_attributes Route5SaffronGate, ROUTE_5_SAFFRON_GATE, $00, 0 + map_attributes Route5CleanseTagHouse, ROUTE_5_CLEANSE_TAG_HOUSE, $00, 0 + map_attributes CherrygroveMart, CHERRYGROVE_MART, $00, 0 + map_attributes CherrygrovePokecenter1F, CHERRYGROVE_POKECENTER_1F, $00, 0 + map_attributes CherrygroveGymSpeechHouse, CHERRYGROVE_GYM_SPEECH_HOUSE, $00, 0 + map_attributes GuideGentsHouse, GUIDE_GENTS_HOUSE, $00, 0 + map_attributes CherrygroveEvolutionSpeechHouse, CHERRYGROVE_EVOLUTION_SPEECH_HOUSE, $00, 0 + map_attributes Route30BerryHouse, ROUTE_30_BERRY_HOUSE, $00, 0 + map_attributes MrPokemonsHouse, MR_POKEMONS_HOUSE, $00, 0 + map_attributes Route31VioletGate, ROUTE_31_VIOLET_GATE, $00, 0 diff --git a/data/maps/blocks.asm b/data/maps/blocks.asm new file mode 100644 index 0000000..a698e9b --- /dev/null +++ b/data/maps/blocks.asm @@ -0,0 +1,1047 @@ +SECTION "Map Blocks 1", ROMX + +Route32_Blocks: + INCBIN "maps/Route32.blk" + +Route40_Blocks: + INCBIN "maps/Route40.blk" + +Route36_Blocks: + INCBIN "maps/Route36.blk" + +Route44_Blocks: + INCBIN "maps/Route44.blk" + +Route28_Blocks: + INCBIN "maps/Route28.blk" + +BetaPlayersHouse2F_Blocks: ; unreferenced + INCBIN "maps/unused/BetaPlayersHouse2F.blk" + +CeladonCity_Blocks: + INCBIN "maps/CeladonCity.blk" + +SaffronCity_Blocks: + INCBIN "maps/SaffronCity.blk" + +Route2_Blocks: + INCBIN "maps/Route2.blk" + +ElmsHouse_Blocks: + INCBIN "maps/ElmsHouse.blk" + +BetaSproutTower1_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSproutTower1.blk" + +Route11_Blocks: + INCBIN "maps/Route11.blk" + +BetaSproutTower5_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSproutTower5.blk" + +Route15_Blocks: + INCBIN "maps/Route15.blk" + +BetaSproutTower9_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSproutTower9.blk" + +Route19_Blocks: + INCBIN "maps/Route19.blk" + +BetaBlackthornCity_Blocks: ; unreferenced + INCBIN "maps/unused/BetaBlackthornCity.blk" + +Route10South_Blocks: + INCBIN "maps/Route10South.blk" + +Pokecenter2F_Blocks: +CinnabarPokecenter2FBeta_Blocks: +CeruleanPokecenter2FBeta_Blocks: +Route10Pokecenter2FBeta_Blocks: +VermilionPokecenter2FBeta_Blocks: +PewterPokecenter2FBeta_Blocks: +FuchsiaPokecenter2FBeta_Blocks: +LavenderPokecenter2FBeta_Blocks: +CeladonPokecenter2FBeta_Blocks: +ViridianPokecenter2FBeta_Blocks: +SaffronPokecenter2FBeta_Blocks: + INCBIN "maps/Pokecenter2F.blk" + +Route41_Blocks: + INCBIN "maps/Route41.blk" + +Route33_Blocks: + INCBIN "maps/Route33.blk" + +Route45_Blocks: + INCBIN "maps/Route45.blk" + +Route29_Blocks: + INCBIN "maps/Route29.blk" + +Route37_Blocks: + INCBIN "maps/Route37.blk" + +LavenderTown_Blocks: + INCBIN "maps/LavenderTown.blk" + +PalletTown_Blocks: + INCBIN "maps/PalletTown.blk" + +Route25_Blocks: + INCBIN "maps/Route25.blk" + +Route24_Blocks: + INCBIN "maps/Route24.blk" + +BetaVioletCity_Blocks: ; unreferenced + INCBIN "maps/unused/BetaVioletCity.blk" + +Route3_Blocks: + INCBIN "maps/Route3.blk" + +PewterCity_Blocks: + INCBIN "maps/PewterCity.blk" + +BetaSilverCaveOutside_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSilverCaveOutside.blk" + +BetaSproutTower2_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSproutTower2.blk" + +Route12_Blocks: + INCBIN "maps/Route12.blk" + +BetaGoldenrodCity_Blocks: ; unreferenced + INCBIN "maps/unused/BetaGoldenrodCity.blk" + +Route20_Blocks: + INCBIN "maps/Route20.blk" + +BetaSproutTower6_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSproutTower6.blk" + +BetaPokecenter_Blocks: ; unreferenced + INCBIN "maps/unused/BetaPokecenter.blk" + +Route30_Blocks: + INCBIN "maps/Route30.blk" + +Route26_Blocks: + INCBIN "maps/Route26.blk" + +Route42_Blocks: + INCBIN "maps/Route42.blk" + +Route34_Blocks: + INCBIN "maps/Route34.blk" + +Route46_Blocks: + INCBIN "maps/Route46.blk" + +FuchsiaCity_Blocks: + INCBIN "maps/FuchsiaCity.blk" + +Route38_Blocks: + INCBIN "maps/Route38.blk" + +BetaCianwoodCity_Blocks: ; unreferenced + INCBIN "maps/unused/BetaCianwoodCity.blk" + +OlivineTimsHouse_Blocks: +OlivineHouseBeta_Blocks: +OlivinePunishmentSpeechHouse_Blocks: +OlivineGoodRodHouse_Blocks: +Route39Farmhouse_Blocks: +MahoganyRedGyaradosSpeechHouse_Blocks: +BlackthornDragonSpeechHouse_Blocks: +BlackthornEmysHouse_Blocks: +MoveDeletersHouse_Blocks: +CeruleanGymBadgeSpeechHouse_Blocks: +CeruleanPoliceStation_Blocks: +CeruleanTradeSpeechHouse_Blocks: +BillsHouse_Blocks: +CharcoalKiln_Blocks: +LakeOfRageHiddenPowerHouse_Blocks: +LakeOfRageMagikarpHouse_Blocks: +GoldenrodHappinessRater_Blocks: +BillsFamilysHouse_Blocks: +GoldenrodPPSpeechHouse_Blocks: +GoldenrodNameRater_Blocks: +VermilionFishingSpeechHouse_Blocks: +VermilionMagnetTrainSpeechHouse_Blocks: +VermilionDiglettsCaveSpeechHouse_Blocks: +BluesHouse_Blocks: +PewterNidoranSpeechHouse_Blocks: +PewterSnoozeSpeechHouse_Blocks: +BillsBrothersHouse_Blocks: +LavenderSpeechHouse_Blocks: +LavenderNameRater_Blocks: +Route12SuperRodHouse_Blocks: +Route28SteelWingHouse_Blocks: +CeladonMansionRoofHouse_Blocks: +Route16FuchsiaSpeechHouse_Blocks: +ManiasHouse_Blocks: +CianwoodPharmacy_Blocks: +CianwoodPhotoStudio_Blocks: +CianwoodLugiaSpeechHouse_Blocks: +PokeSeersHouse_Blocks: +ViridianNicknameSpeechHouse_Blocks: +Route2NuggetHouse_Blocks: +PlayersNeighborsHouse_Blocks: +Route26HealHouse_Blocks: +DayOfWeekSiblingsHouse_Blocks: +Route27SandstormHouse_Blocks: +MrPsychicsHouse_Blocks: +Route5CleanseTagHouse_Blocks: +CherrygroveGymSpeechHouse_Blocks: +GuideGentsHouse_Blocks: +CherrygroveEvolutionSpeechHouse_Blocks: +Route30BerryHouse_Blocks: + INCBIN "maps/House1.blk" + +SafariZoneFuchsiaGateBeta_Blocks: +Route19FuchsiaGate_Blocks: +Route43MahoganyGate_Blocks: +Route43Gate_Blocks: +Route35GoldenrodGate_Blocks: +Route36RuinsOfAlphGate_Blocks: +Route34IlexForestGate_Blocks: +Route6SaffronGate_Blocks: +Route40BattleTowerGate_Blocks: +Route2Gate_Blocks: +Route29Route46Gate_Blocks: +Route5SaffronGate_Blocks: + INCBIN "maps/NorthSouthGate.blk" + +BetaEcruteakCity_Blocks: ; unreferenced + INCBIN "maps/unused/BetaEcruteakCity.blk" + +BetaCherrygroveCity_Blocks: ; unreferenced + INCBIN "maps/unused/BetaCherrygroveCity.blk" + +CinnabarIsland_Blocks: + INCBIN "maps/CinnabarIsland.blk" + +Route4_Blocks: + INCBIN "maps/Route4.blk" + +Route8_Blocks: + INCBIN "maps/Route8.blk" + +BetaSproutTower3_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSproutTower3.blk" + +ViridianCity_Blocks: + INCBIN "maps/ViridianCity.blk" + +Route13_Blocks: + INCBIN "maps/Route13.blk" + +Route21_Blocks: + INCBIN "maps/Route21.blk" + +BetaSproutTower7_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSproutTower7.blk" + +Route17_Blocks: + INCBIN "maps/Route17.blk" + +BetaMahoganyTown_Blocks: ; unreferenced + INCBIN "maps/unused/BetaMahoganyTown.blk" + +Route31_Blocks: + INCBIN "maps/Route31.blk" + +Route27_Blocks: + INCBIN "maps/Route27.blk" + +Route35_Blocks: + INCBIN "maps/Route35.blk" + +Route43_Blocks: + INCBIN "maps/Route43.blk" + +Route39_Blocks: + INCBIN "maps/Route39.blk" + +PlayersHouse1F_Blocks: + INCBIN "maps/PlayersHouse1F.blk" + +Route38EcruteakGate_Blocks: +Route42EcruteakGate_Blocks: +Route32RuinsOfAlphGate_Blocks: +IlexForestAzaleaGate_Blocks: +Route15FuchsiaGate_Blocks: +Route8SaffronGate_Blocks: +Route16Gate_Blocks: +Route7SaffronGate_Blocks: +Route17Route18Gate_Blocks: +Route31VioletGate_Blocks: + INCBIN "maps/EastWestGate.blk" + +BetaAzaleaTown_Blocks: ; unreferenced + INCBIN "maps/unused/BetaAzaleaTown.blk" + +VermilionCity_Blocks: + INCBIN "maps/VermilionCity.blk" + +BetaOlivineCity_Blocks: ; unreferenced + INCBIN "maps/unused/BetaOlivineCity.blk" + +BetaNewBarkTown_Blocks: ; unreferenced + INCBIN "maps/unused/BetaNewBarkTown.blk" + +ElmsLab_Blocks: + INCBIN "maps/ElmsLab.blk" + +CeruleanCity_Blocks: + INCBIN "maps/CeruleanCity.blk" + +Route1_Blocks: + INCBIN "maps/Route1.blk" + +Route5_Blocks: + INCBIN "maps/Route5.blk" + +Route9_Blocks: + INCBIN "maps/Route9.blk" + +Route22_Blocks: + INCBIN "maps/Route22.blk" + + +SECTION "Map Blocks 2", ROMX + +Route14_Blocks: + INCBIN "maps/Route14.blk" + +BetaSproutTower8_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSproutTower8.blk" + +OlivineMart_Blocks: +EcruteakMart_Blocks: +BlackthornMart_Blocks: +CeruleanMart_Blocks: +AzaleaMart_Blocks: +VioletMart_Blocks: +VermilionMart_Blocks: +PewterMart_Blocks: +FuchsiaMart_Blocks: +LavenderMart_Blocks: +ViridianMart_Blocks: +SaffronMart_Blocks: +CherrygroveMart_Blocks: + INCBIN "maps/Mart.blk" + +Route10North_Blocks: + INCBIN "maps/Route10North.blk" + +BetaLakeOfRage_Blocks: ; unreferenced + INCBIN "maps/unused/BetaLakeOfRage.blk" + +OlivinePokecenter1F_Blocks: +MahoganyPokecenter1F_Blocks: +EcruteakPokecenter1F_Blocks: +BlackthornPokecenter1F_Blocks: +CinnabarPokecenter1F_Blocks: +CeruleanPokecenter1F_Blocks: +Route10Pokecenter1F_Blocks: +AzaleaPokecenter1F_Blocks: +VioletPokecenter1F_Blocks: +Route32Pokecenter1F_Blocks: +GoldenrodPokecenter1F_Blocks: +VermilionPokecenter1F_Blocks: +PewterPokecenter1F_Blocks: +FuchsiaPokecenter1F_Blocks: +LavenderPokecenter1F_Blocks: +SilverCavePokecenter1F_Blocks: +CeladonPokecenter1F_Blocks: +CianwoodPokecenter1F_Blocks: +ViridianPokecenter1F_Blocks: +SaffronPokecenter1F_Blocks: +CherrygrovePokecenter1F_Blocks: + INCBIN "maps/Pokecenter1F.blk" + +BetaPewterMuseumOfScience1F_Blocks: ; unreferenced + INCBIN "maps/unused/BetaPewterMuseumOfScience1F.blk" + +BetaPewterMuseumOfScience2F_Blocks: ; unreferenced + INCBIN "maps/unused/BetaPewterMuseumOfScience2F.blk" + +EarlsPokemonAcademy_Blocks: + INCBIN "maps/EarlsPokemonAcademy.blk" + +BetaCinnabarPokemonLabHallway_Blocks: ; unreferenced + INCBIN "maps/unused/BetaCinnabarPokemonLabHallway.blk" + +BetaCinnabarPokemonLabRoom1_Blocks: ; unreferenced + INCBIN "maps/unused/BetaCinnabarPokemonLabRoom1.blk" + +BetaCinnabarPokemonLabRoom2_Blocks: ; unreferenced + INCBIN "maps/unused/BetaCinnabarPokemonLabRoom2.blk" + +BetaCinnabarPokemonLabRoom3_Blocks: ; unreferenced + INCBIN "maps/unused/BetaCinnabarPokemonLabRoom3.blk" + +GoldenrodDeptStore1F_Blocks: +CeladonDeptStore1F_Blocks: + INCBIN "maps/DeptStore1F.blk" + +GoldenrodDeptStore2F_Blocks: +CeladonDeptStore2F_Blocks: + INCBIN "maps/DeptStore2F.blk" + +GoldenrodDeptStore3F_Blocks: +CeladonDeptStore3F_Blocks: + INCBIN "maps/DeptStore3F.blk" + +GoldenrodDeptStore4F_Blocks: +CeladonDeptStore4F_Blocks: + INCBIN "maps/DeptStore4F.blk" + +GoldenrodDeptStore5F_Blocks: +CeladonDeptStore5F_Blocks: + INCBIN "maps/DeptStore5F.blk" + +GoldenrodDeptStore6F_Blocks: +CeladonDeptStore6F_Blocks: + INCBIN "maps/DeptStore6F.blk" + +GoldenrodDeptStoreElevator_Blocks: +CeladonDeptStoreElevator_Blocks: + INCBIN "maps/DeptStoreElevator.blk" + +CeladonMansion1F_Blocks: + INCBIN "maps/CeladonMansion1F.blk" + +CeladonMansion2F_Blocks: + INCBIN "maps/CeladonMansion2F.blk" + +CeladonMansion3F_Blocks: + INCBIN "maps/CeladonMansion3F.blk" + +CeladonMansionRoof_Blocks: + INCBIN "maps/CeladonMansionRoof.blk" + +BetaHouse_Blocks: ; unreferenced + INCBIN "maps/unused/BetaHouse.blk" + +CeladonGameCorner_Blocks: + INCBIN "maps/CeladonGameCorner.blk" + +CeladonGameCornerPrizeRoom_Blocks: + INCBIN "maps/CeladonGameCornerPrizeRoom.blk" + +Colosseum_Blocks: + INCBIN "maps/Colosseum.blk" + +TradeCenter_Blocks: +TimeCapsule_Blocks: + INCBIN "maps/TradeCenter.blk" + +EcruteakLugiaSpeechHouse_Blocks: +EcruteakItemfinderHouse_Blocks: +VioletNicknameSpeechHouse_Blocks: +VioletKylesHouse_Blocks: + INCBIN "maps/House2.blk" + +BetaUnionCave_Blocks: ; unreferenced + INCBIN "maps/unused/BetaUnionCave.blk" + +UnionCaveB1F_Blocks: + INCBIN "maps/UnionCaveB1F.blk" + +UnionCaveB2F_Blocks: + INCBIN "maps/UnionCaveB2F.blk" + +UnionCave1F_Blocks: + INCBIN "maps/UnionCave1F.blk" + +NationalPark_Blocks: +NationalParkBugContest_Blocks: + INCBIN "maps/NationalPark.blk" + +Route5UndergroundPathEntrance_Blocks: +Route6UndergroundPathEntrance_Blocks: + INCBIN "maps/UndergroundPathEntrance.blk" + +BetaCapsuleHouse_Blocks: ; unreferenced + INCBIN "maps/unused/BetaCapsuleHouse.blk" + +KurtsHouse_Blocks: + INCBIN "maps/KurtsHouse.blk" + +GoldenrodMagnetTrainStation_Blocks: + INCBIN "maps/GoldenrodMagnetTrainStation.blk" + +RuinsOfAlphOutside_Blocks: + INCBIN "maps/RuinsOfAlphOutside.blk" + +BetaRuinsOfAlphUnsolvedPuzzleRoom_Blocks: ; unreferenced + INCBIN "maps/unused/BetaRuinsOfAlphUnsolvedPuzzleRoom.blk" + +RuinsOfAlphInnerChamber_Blocks: + INCBIN "maps/RuinsOfAlphInnerChamber.blk" + +RuinsOfAlphHoOhChamber_Blocks: +RuinsOfAlphKabutoChamber_Blocks: +RuinsOfAlphOmanyteChamber_Blocks: +RuinsOfAlphAerodactylChamber_Blocks: + INCBIN "maps/RuinsOfAlphPuzzleChamber.blk" + +SproutTower1F_Blocks: + INCBIN "maps/SproutTower1F.blk" + +BetaSproutTowerCutOut1_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSproutTowerCutOut1.blk" + +SproutTower2F_Blocks: + INCBIN "maps/SproutTower2F.blk" + +BetaSproutTowerCutOut2_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSproutTowerCutOut2.blk" + +SproutTower3F_Blocks: + INCBIN "maps/SproutTower3F.blk" + +BetaSproutTowerCutOut3_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSproutTowerCutOut3.blk" + +RadioTower1F_Blocks: + INCBIN "maps/RadioTower1F.blk" + +RadioTower2F_Blocks: + INCBIN "maps/RadioTower2F.blk" + +RadioTower3F_Blocks: + INCBIN "maps/RadioTower3F.blk" + +RadioTower4F_Blocks: + INCBIN "maps/RadioTower4F.blk" + +RadioTower5F_Blocks: + INCBIN "maps/RadioTower5F.blk" + +NewBarkTown_Blocks: + INCBIN "maps/NewBarkTown.blk" + +CherrygroveCity_Blocks: + INCBIN "maps/CherrygroveCity.blk" + +VioletCity_Blocks: + INCBIN "maps/VioletCity.blk" + +AzaleaTown_Blocks: + INCBIN "maps/AzaleaTown.blk" + +CianwoodCity_Blocks: + INCBIN "maps/CianwoodCity.blk" + +GoldenrodCity_Blocks: + INCBIN "maps/GoldenrodCity.blk" + +OlivineCity_Blocks: + INCBIN "maps/OlivineCity.blk" + +EcruteakCity_Blocks: + INCBIN "maps/EcruteakCity.blk" + +MahoganyTown_Blocks: + INCBIN "maps/MahoganyTown.blk" + +LakeOfRage_Blocks: + INCBIN "maps/LakeOfRage.blk" + +BlackthornCity_Blocks: + INCBIN "maps/BlackthornCity.blk" + +SilverCaveOutside_Blocks: + INCBIN "maps/SilverCaveOutside.blk" + +Route6_Blocks: + INCBIN "maps/Route6.blk" + +Route7_Blocks: + INCBIN "maps/Route7.blk" + +Route16_Blocks: + INCBIN "maps/Route16.blk" + +Route18_Blocks: + INCBIN "maps/Route18.blk" + +GoldenrodUnderground_Blocks: + INCBIN "maps/GoldenrodUnderground.blk" + +GoldenrodUndergroundSwitchRoomEntrances_Blocks: + INCBIN "maps/GoldenrodUndergroundSwitchRoomEntrances.blk" + +GoldenrodDeptStoreB1F_Blocks: + INCBIN "maps/GoldenrodDeptStoreB1F.blk" + +GoldenrodUndergroundWarehouse_Blocks: + INCBIN "maps/GoldenrodUndergroundWarehouse.blk" + +BetaElevator_Blocks: ; unreferenced + INCBIN "maps/unused/BetaElevator.blk" + +TinTower1F_Blocks: + INCBIN "maps/TinTower1F.blk" + +TinTower2F_Blocks: + INCBIN "maps/TinTower2F.blk" + +TinTower3F_Blocks: + INCBIN "maps/TinTower3F.blk" + +TinTower4F_Blocks: + INCBIN "maps/TinTower4F.blk" + +TinTower5F_Blocks: + INCBIN "maps/TinTower5F.blk" + +TinTower6F_Blocks: + INCBIN "maps/TinTower6F.blk" + +TinTower7F_Blocks: + INCBIN "maps/TinTower7F.blk" + +TinTower8F_Blocks: + INCBIN "maps/TinTower8F.blk" + +TinTower9F_Blocks: + INCBIN "maps/TinTower9F.blk" + +TinTowerRoof_Blocks: + INCBIN "maps/TinTowerRoof.blk" + +BurnedTower1F_Blocks: + INCBIN "maps/BurnedTower1F.blk" + +BurnedTowerB1F_Blocks: + INCBIN "maps/BurnedTowerB1F.blk" + +BetaCaveTestMap_Blocks: ; unreferenced + INCBIN "maps/unused/BetaCaveTestMap.blk" + +MountMortar1FOutside_Blocks: + INCBIN "maps/MountMortar1FOutside.blk" + +MountMortar1FInside_Blocks: + INCBIN "maps/MountMortar1FInside.blk" + +MountMortar2FInside_Blocks: + INCBIN "maps/MountMortar2FInside.blk" + +MountMortarB1F_Blocks: + INCBIN "maps/MountMortarB1F.blk" + +IcePath1F_Blocks: + INCBIN "maps/IcePath1F.blk" + +IcePathB1F_Blocks: + INCBIN "maps/IcePathB1F.blk" + +IcePathB2FMahoganySide_Blocks: + INCBIN "maps/IcePathB2FMahoganySide.blk" + +IcePathB2FBlackthornSide_Blocks: + INCBIN "maps/IcePathB2FBlackthornSide.blk" + +IcePathB3F_Blocks: + INCBIN "maps/IcePathB3F.blk" + +WhirlIslandNW_Blocks: + INCBIN "maps/WhirlIslandNW.blk" + +WhirlIslandNE_Blocks: + INCBIN "maps/WhirlIslandNE.blk" + +WhirlIslandSW_Blocks: + INCBIN "maps/WhirlIslandSW.blk" + +WhirlIslandCave_Blocks: + INCBIN "maps/WhirlIslandCave.blk" + +WhirlIslandSE_Blocks: + INCBIN "maps/WhirlIslandSE.blk" + +WhirlIslandB1F_Blocks: + INCBIN "maps/WhirlIslandB1F.blk" + +WhirlIslandB2F_Blocks: + INCBIN "maps/WhirlIslandB2F.blk" + +WhirlIslandLugiaChamber_Blocks: + INCBIN "maps/WhirlIslandLugiaChamber.blk" + +SilverCaveRoom1_Blocks: + INCBIN "maps/SilverCaveRoom1.blk" + +SilverCaveRoom2_Blocks: + INCBIN "maps/SilverCaveRoom2.blk" + +SilverCaveRoom3_Blocks: + INCBIN "maps/SilverCaveRoom3.blk" + +BetaRocketHideoutB2F_Blocks: ; unreferenced + INCBIN "maps/unused/BetaRocketHideoutB2F.blk" + +BetaRocketHideoutB1F_Blocks: ; unreferenced + INCBIN "maps/unused/BetaRocketHideoutB1F.blk" + +BetaRocketHideout1F_Blocks: ; unreferenced + INCBIN "maps/unused/BetaRocketHideout1F.blk" + +BetaRocketHideoutB3F_Blocks: ; unreferenced + INCBIN "maps/unused/BetaRocketHideoutB3F.blk" + +MahoganyMart1F_Blocks: +MountMoonGiftShop_Blocks: + INCBIN "maps/GiftShop.blk" + +TeamRocketBaseB1F_Blocks: + INCBIN "maps/TeamRocketBaseB1F.blk" + +TeamRocketBaseB2F_Blocks: + INCBIN "maps/TeamRocketBaseB2F.blk" + +TeamRocketBaseB3F_Blocks: + INCBIN "maps/TeamRocketBaseB3F.blk" + +BetaRoute23_Blocks: ; unreferenced + INCBIN "maps/unused/BetaRoute23.blk" + +IndigoPlateauPokecenter1F_Blocks: + INCBIN "maps/IndigoPlateauPokecenter1F.blk" + +WillsRoom_Blocks: + INCBIN "maps/WillsRoom.blk" + +KogasRoom_Blocks: + INCBIN "maps/KogasRoom.blk" + +BrunosRoom_Blocks: + INCBIN "maps/BrunosRoom.blk" + +KarensRoom_Blocks: + INCBIN "maps/KarensRoom.blk" + +AzaleaGym_Blocks: + INCBIN "maps/AzaleaGym.blk" + +VioletGym_Blocks: + INCBIN "maps/VioletGym.blk" + +GoldenrodGym_Blocks: + INCBIN "maps/GoldenrodGym.blk" + +EcruteakGym_Blocks: + INCBIN "maps/EcruteakGym.blk" + +MahoganyGym_Blocks: + INCBIN "maps/MahoganyGym.blk" + +OlivineGym_Blocks: + INCBIN "maps/OlivineGym.blk" + +BetaUnknownGym_Blocks: ; unreferenced + INCBIN "maps/unused/BetaUnknownGym.blk" + +CianwoodGym_Blocks: + INCBIN "maps/CianwoodGym.blk" + +BlackthornGym1F_Blocks: + INCBIN "maps/BlackthornGym1F.blk" + +BlackthornGym2F_Blocks: + INCBIN "maps/BlackthornGym2F.blk" + +OlivineLighthouse1F_Blocks: + INCBIN "maps/OlivineLighthouse1F.blk" + +OlivineLighthouse2F_Blocks: + INCBIN "maps/OlivineLighthouse2F.blk" + +OlivineLighthouse3F_Blocks: + INCBIN "maps/OlivineLighthouse3F.blk" + +OlivineLighthouse4F_Blocks: + INCBIN "maps/OlivineLighthouse4F.blk" + +OlivineLighthouse5F_Blocks: + INCBIN "maps/OlivineLighthouse5F.blk" + +OlivineLighthouse6F_Blocks: + INCBIN "maps/OlivineLighthouse6F.blk" + + +SECTION "Map Blocks 3", ROMX + +BetaSlowpokeWell1F_Blocks: ; unreferenced + INCBIN "maps/unused/BetaSlowpokeWell1F.blk" + +SlowpokeWellB1F_Blocks: + INCBIN "maps/SlowpokeWellB1F.blk" + +SlowpokeWellB2F_Blocks: + INCBIN "maps/SlowpokeWellB2F.blk" + +IlexForest_Blocks: + INCBIN "maps/IlexForest.blk" + +DarkCaveVioletEntrance_Blocks: + INCBIN "maps/DarkCaveVioletEntrance.blk" + +DarkCaveBlackthornEntrance_Blocks: + INCBIN "maps/DarkCaveBlackthornEntrance.blk" + +RuinsOfAlphResearchCenter_Blocks: + INCBIN "maps/RuinsOfAlphResearchCenter.blk" + +GoldenrodBikeShop_Blocks: + INCBIN "maps/GoldenrodBikeShop.blk" + +DanceTheater_Blocks: + INCBIN "maps/DanceTheater.blk" + +EcruteakTinTowerEntrance_Blocks: + INCBIN "maps/EcruteakTinTowerEntrance.blk" + +GoldenrodGameCorner_Blocks: + INCBIN "maps/GoldenrodGameCorner.blk" + +Route35NationalParkGate_Blocks: + INCBIN "maps/Route35NationalParkGate.blk" + +Route36NationalParkGate_Blocks: + INCBIN "maps/Route36NationalParkGate.blk" + +FastShip1F_Blocks: + INCBIN "maps/FastShip1F.blk" + +FastShipB1F_Blocks: + INCBIN "maps/FastShipB1F.blk" + +BetaFastShipInsideCutOut_Blocks: ; unreferenced + INCBIN "maps/unused/BetaFastShipInsideCutOut.blk" + +FastShipCabins_NNW_NNE_NE_Blocks: + INCBIN "maps/FastShipCabins_NNW_NNE_NE.blk" + +FastShipCabins_SW_SSW_NW_Blocks: + INCBIN "maps/FastShipCabins_SW_SSW_NW.blk" + +FastShipCabins_SE_SSE_CaptainsCabin_Blocks: + INCBIN "maps/FastShipCabins_SE_SSE_CaptainsCabin.blk" + +OlivinePort_Blocks: + INCBIN "maps/OlivinePort.blk" + +VermilionPort_Blocks: + INCBIN "maps/VermilionPort.blk" + +OlivineCafe_Blocks: +SafariZoneMainOffice_Blocks: + INCBIN "maps/OlivineCafe.blk" + +PlayersHouse2F_Blocks: + INCBIN "maps/PlayersHouse2F.blk" + +SaffronMagnetTrainStation_Blocks: + INCBIN "maps/SaffronMagnetTrainStation.blk" + +CeruleanGym_Blocks: + INCBIN "maps/CeruleanGym.blk" + +VermilionGym_Blocks: + INCBIN "maps/VermilionGym.blk" + +SaffronGym_Blocks: + INCBIN "maps/SaffronGym.blk" + +PowerPlant_Blocks: + INCBIN "maps/PowerPlant.blk" + +PokemonFanClub_Blocks: +SafariZoneWardensHome_Blocks: + INCBIN "maps/PokemonFanClub.blk" + +FightingDojo_Blocks: + INCBIN "maps/FightingDojo.blk" + +SilphCo1F_Blocks: + INCBIN "maps/SilphCo1F.blk" + +ViridianGym_Blocks: + INCBIN "maps/ViridianGym.blk" + +TrainerHouse1F_Blocks: + INCBIN "maps/TrainerHouse1F.blk" + +TrainerHouseB1F_Blocks: + INCBIN "maps/TrainerHouseB1F.blk" + +RedsHouse1F_Blocks: + INCBIN "maps/RedsHouse1F.blk" + +RedsHouse2F_Blocks: + INCBIN "maps/RedsHouse2F.blk" + +OaksLab_Blocks: + INCBIN "maps/OaksLab.blk" + +MrFujisHouse_Blocks: + INCBIN "maps/MrFujisHouse.blk" + +LavRadioTower1F_Blocks: + INCBIN "maps/LavRadioTower1F.blk" + +SilverCaveItemRooms_Blocks: + INCBIN "maps/SilverCaveItemRooms.blk" + +DayCare_Blocks: + INCBIN "maps/DayCare.blk" + +SoulHouse_Blocks: + INCBIN "maps/SoulHouse.blk" + +PewterGym_Blocks: + INCBIN "maps/PewterGym.blk" + +CeladonGym_Blocks: + INCBIN "maps/CeladonGym.blk" + +BetaCeladonMansion1F_Blocks: ; unreferenced + INCBIN "maps/unused/BetaCeladonMansion1F.blk" + +CeladonCafe_Blocks: + INCBIN "maps/CeladonCafe.blk" + +BetaCeladonMansion2F_Blocks: ; unreferenced + INCBIN "maps/unused/BetaCeladonMansion2F.blk" + +RockTunnel1F_Blocks: + INCBIN "maps/RockTunnel1F.blk" + +RockTunnelB1F_Blocks: + INCBIN "maps/RockTunnelB1F.blk" + +DiglettsCave_Blocks: + INCBIN "maps/DiglettsCave.blk" + +MountMoon_Blocks: + INCBIN "maps/MountMoon.blk" + +SeafoamGym_Blocks: + INCBIN "maps/SeafoamGym.blk" + +MrPokemonsHouse_Blocks: + INCBIN "maps/MrPokemonsHouse.blk" + +VictoryRoadGate_Blocks: + INCBIN "maps/VictoryRoadGate.blk" + +OlivinePortPassage_Blocks: +VermilionPortPassage_Blocks: + INCBIN "maps/PortPassage.blk" + +FuchsiaGym_Blocks: + INCBIN "maps/FuchsiaGym.blk" + +SafariZoneBeta_Blocks: + INCBIN "maps/SafariZoneBeta.blk" + +UndergroundPath_Blocks: + INCBIN "maps/UndergroundPath.blk" + +Route39Barn_Blocks: + INCBIN "maps/Route39Barn.blk" + +VictoryRoad_Blocks: + INCBIN "maps/VictoryRoad.blk" + +Route23_Blocks: + INCBIN "maps/Route23.blk" + +LancesRoom_Blocks: + INCBIN "maps/LancesRoom.blk" + +HallOfFame_Blocks: + INCBIN "maps/HallOfFame.blk" + +CopycatsHouse1F_Blocks: + INCBIN "maps/CopycatsHouse1F.blk" + +CopycatsHouse2F_Blocks: + INCBIN "maps/CopycatsHouse2F.blk" + +GoldenrodFlowerShop_Blocks: + INCBIN "maps/GoldenrodFlowerShop.blk" + +MountMoonSquare_Blocks: + INCBIN "maps/MountMoonSquare.blk" + +WiseTriosRoom_Blocks: + INCBIN "maps/WiseTriosRoom.blk" + +DragonsDen1F_Blocks: + INCBIN "maps/DragonsDen1F.blk" + +DragonsDenB1F_Blocks: + INCBIN "maps/DragonsDenB1F.blk" + +TohjoFalls_Blocks: + INCBIN "maps/TohjoFalls.blk" + +RuinsOfAlphHoOhItemRoom_Blocks: +RuinsOfAlphKabutoItemRoom_Blocks: +RuinsOfAlphOmanyteItemRoom_Blocks: +RuinsOfAlphAerodactylItemRoom_Blocks: + INCBIN "maps/RuinsOfAlphItemRoom.blk" + +RuinsOfAlphHoOhWordRoom_Blocks: + INCBIN "maps/RuinsOfAlphHoOhWordRoom.blk" + +RuinsOfAlphKabutoWordRoom_Blocks: + INCBIN "maps/RuinsOfAlphKabutoWordRoom.blk" + +RuinsOfAlphOmanyteWordRoom_Blocks: + INCBIN "maps/RuinsOfAlphOmanyteWordRoom.blk" + +RuinsOfAlphAerodactylWordRoom_Blocks: + INCBIN "maps/RuinsOfAlphAerodactylWordRoom.blk" + +DragonShrine_Blocks: + INCBIN "maps/DragonShrine.blk" + +BattleTower1F_Blocks: + INCBIN "maps/BattleTower1F.blk" + +BattleTowerBattleRoom_Blocks: + INCBIN "maps/BattleTowerBattleRoom.blk" + +PokecomCenterAdminOfficeMobile_Blocks: + INCBIN "maps/PokecomCenterAdminOfficeMobile.blk" + +MobileTradeRoom_Blocks: + INCBIN "maps/MobileTradeRoom.blk" + +MobileBattleRoom_Blocks: + INCBIN "maps/MobileBattleRoom.blk" + +BattleTowerHallway_Blocks: + INCBIN "maps/BattleTowerHallway.blk" + +BattleTowerElevator_Blocks: + INCBIN "maps/BattleTowerElevator.blk" + +BattleTowerOutside_Blocks: + INCBIN "maps/BattleTowerOutside.blk" + +BetaBlank_Blocks: ; unreferenced + INCBIN "maps/unused/BetaBlank.blk" + +GoldenrodDeptStoreRoof_Blocks: + INCBIN "maps/GoldenrodDeptStoreRoof.blk" diff --git a/data/maps/environment_colors.asm b/data/maps/environment_colors.asm new file mode 100644 index 0000000..99e9be7 --- /dev/null +++ b/data/maps/environment_colors.asm @@ -0,0 +1,37 @@ +EnvironmentColorsPointers: +; entries correspond to environment constants (see constants/map_data_constants.asm) + table_width 2, EnvironmentColorsPointers + dw .OutdoorColors ; unused + dw .OutdoorColors ; TOWN + dw .OutdoorColors ; ROUTE + dw .IndoorColors ; INDOOR + dw .DungeonColors ; CAVE + dw .Env5Colors ; ENVIRONMENT_5 + dw .IndoorColors ; GATE + dw .DungeonColors ; DUNGEON + assert_table_length NUM_ENVIRONMENTS + 1 + +; Valid indices: $00 - $29 (see gfx/tilesets/bg_tiles.pal) +.OutdoorColors: + db $00, $01, $02, $28, $04, $05, $06, $07 ; morn + db $08, $09, $0a, $28, $0c, $0d, $0e, $0f ; day + db $10, $11, $12, $29, $14, $15, $16, $17 ; nite + db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f ; dark + +.IndoorColors: + db $20, $21, $22, $23, $24, $25, $26, $07 ; morn + db $20, $21, $22, $23, $24, $25, $26, $07 ; day + db $10, $11, $12, $13, $14, $15, $16, $07 ; nite + db $18, $19, $1a, $1b, $1c, $1d, $1e, $07 ; dark + +.DungeonColors: + db $00, $01, $02, $03, $04, $05, $06, $07 ; morn + db $08, $09, $0a, $0b, $0c, $0d, $0e, $0f ; day + db $10, $11, $12, $13, $14, $15, $16, $17 ; nite + db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f ; dark + +.Env5Colors: + db $00, $01, $02, $03, $04, $05, $06, $07 ; morn + db $08, $09, $0a, $0b, $0c, $0d, $0e, $0f ; day + db $10, $11, $12, $13, $14, $15, $16, $17 ; nite + db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f ; dark diff --git a/data/maps/flypoints.asm b/data/maps/flypoints.asm new file mode 100644 index 0000000..faf3a4d --- /dev/null +++ b/data/maps/flypoints.asm @@ -0,0 +1,30 @@ +Flypoints: +; entries correspond to FLY_* constants +; Johto + ; landmark, spawn point + db LANDMARK_NEW_BARK_TOWN, SPAWN_NEW_BARK + db LANDMARK_CHERRYGROVE_CITY, SPAWN_CHERRYGROVE + db LANDMARK_VIOLET_CITY, SPAWN_VIOLET + db LANDMARK_AZALEA_TOWN, SPAWN_AZALEA + db LANDMARK_GOLDENROD_CITY, SPAWN_GOLDENROD + db LANDMARK_ECRUTEAK_CITY, SPAWN_ECRUTEAK + db LANDMARK_OLIVINE_CITY, SPAWN_OLIVINE + db LANDMARK_CIANWOOD_CITY, SPAWN_CIANWOOD + db LANDMARK_MAHOGANY_TOWN, SPAWN_MAHOGANY + db LANDMARK_LAKE_OF_RAGE, SPAWN_LAKE_OF_RAGE + db LANDMARK_BLACKTHORN_CITY, SPAWN_BLACKTHORN + db LANDMARK_SILVER_CAVE, SPAWN_MT_SILVER +; Kanto + db LANDMARK_PALLET_TOWN, SPAWN_PALLET + db LANDMARK_VIRIDIAN_CITY, SPAWN_VIRIDIAN + db LANDMARK_PEWTER_CITY, SPAWN_PEWTER + db LANDMARK_CERULEAN_CITY, SPAWN_CERULEAN + db LANDMARK_VERMILION_CITY, SPAWN_VERMILION + db LANDMARK_ROCK_TUNNEL, SPAWN_ROCK_TUNNEL + db LANDMARK_LAVENDER_TOWN, SPAWN_LAVENDER + db LANDMARK_CELADON_CITY, SPAWN_CELADON + db LANDMARK_SAFFRON_CITY, SPAWN_SAFFRON + db LANDMARK_FUCHSIA_CITY, SPAWN_FUCHSIA + db LANDMARK_CINNABAR_ISLAND, SPAWN_CINNABAR + db LANDMARK_INDIGO_PLATEAU, SPAWN_INDIGO + db -1 ; end diff --git a/data/maps/landmarks.asm b/data/maps/landmarks.asm new file mode 100644 index 0000000..173d11b --- /dev/null +++ b/data/maps/landmarks.asm @@ -0,0 +1,210 @@ +MACRO landmark +; x, y, name + db \1 + 8, \2 + 16 + dw \3 +ENDM + +Landmarks: +; entries correspond to constants/landmark_constants.asm + table_width 4, Landmarks + landmark -8, -16, SpecialMapName + landmark 140, 100, NewBarkTownName + landmark 128, 100, Route29Name + landmark 100, 100, CherrygroveCityName + landmark 100, 80, Route30Name + landmark 96, 60, Route31Name + landmark 84, 60, VioletCityName + landmark 85, 58, SproutTowerName + landmark 84, 92, Route32Name + landmark 76, 76, RuinsOfAlphName + landmark 84, 124, UnionCaveName + landmark 82, 124, Route33Name + landmark 68, 124, AzaleaTownName + landmark 70, 122, SlowpokeWellName + landmark 52, 120, IlexForestName + landmark 52, 112, Route34Name + landmark 52, 92, GoldenrodCityName + landmark 50, 92, RadioTowerName + landmark 52, 76, Route35Name + landmark 52, 60, NationalParkName + landmark 64, 60, Route36Name + landmark 68, 52, Route37Name + landmark 68, 44, EcruteakCityName + landmark 70, 42, TinTowerName + landmark 66, 42, BurnedTowerName + landmark 52, 44, Route38Name + landmark 36, 48, Route39Name + landmark 36, 60, OlivineCityName + landmark 38, 62, LighthouseName + landmark 28, 56, BattleTowerName + landmark 28, 64, Route40Name + landmark 28, 92, WhirlIslandsName + landmark 28, 100, Route41Name + landmark 20, 100, CianwoodCityName + landmark 92, 44, Route42Name + landmark 84, 44, MtMortarName + landmark 108, 44, MahoganyTownName + landmark 108, 36, Route43Name + landmark 108, 28, LakeOfRageName + landmark 120, 44, Route44Name + landmark 130, 38, IcePathName + landmark 132, 44, BlackthornCityName + landmark 132, 36, DragonsDenName + landmark 132, 64, Route45Name + landmark 112, 72, DarkCaveName + landmark 124, 88, Route46Name + landmark 148, 68, SilverCaveName + assert_table_length KANTO_LANDMARK + landmark 52, 108, PalletTownName + landmark 52, 92, Route1Name + landmark 52, 76, ViridianCityName + landmark 52, 64, Route2Name + landmark 52, 52, PewterCityName + landmark 64, 52, Route3Name + landmark 76, 52, MtMoonName + landmark 88, 52, Route4Name + landmark 100, 52, CeruleanCityName + landmark 100, 44, Route24Name + landmark 108, 36, Route25Name + landmark 100, 60, Route5Name + landmark 108, 76, UndergroundName + landmark 100, 76, Route6Name + landmark 100, 84, VermilionCityName + landmark 88, 60, DiglettsCaveName + landmark 88, 68, Route7Name + landmark 116, 68, Route8Name + landmark 116, 52, Route9Name + landmark 132, 52, RockTunnelName + landmark 132, 56, Route10Name + landmark 132, 60, PowerPlantName + landmark 132, 68, LavenderTownName + landmark 140, 68, LavRadioTowerName + landmark 76, 68, CeladonCityName + landmark 100, 68, SaffronCityName + landmark 116, 84, Route11Name + landmark 132, 80, Route12Name + landmark 124, 100, Route13Name + landmark 116, 112, Route14Name + landmark 104, 116, Route15Name + landmark 68, 68, Route16Name + landmark 68, 92, Route17Name + landmark 80, 116, Route18Name + landmark 92, 116, FuchsiaCityName + landmark 92, 128, Route19Name + landmark 76, 132, Route20Name + landmark 68, 132, SeafoamIslandsName + landmark 52, 132, CinnabarIslandName + landmark 52, 120, Route21Name + landmark 36, 68, Route22Name + landmark 28, 52, VictoryRoadName + landmark 28, 44, Route23Name + landmark 28, 36, IndigoPlateauName + landmark 28, 92, Route26Name + landmark 20, 100, Route27Name + landmark 12, 100, TohjoFallsName + landmark 20, 68, Route28Name + landmark 140, 116, FastShipName + assert_table_length NUM_LANDMARKS + +NewBarkTownName: db "NEW BARK¯TOWN@" +CherrygroveCityName: db "CHERRYGROVE¯CITY@" +VioletCityName: db "VIOLET CITY@" +AzaleaTownName: db "AZALEA TOWN@" +GoldenrodCityName: db "GOLDENROD¯CITY@" +EcruteakCityName: db "ECRUTEAK¯CITY@" +OlivineCityName: db "OLIVINE¯CITY@" +CianwoodCityName: db "CIANWOOD¯CITY@" +MahoganyTownName: db "MAHOGANY¯TOWN@" +BlackthornCityName: db "BLACKTHORN¯CITY@" +LakeOfRageName: db "LAKE OF¯RAGE@" +SilverCaveName: db "SILVER CAVE@" +SproutTowerName: db "SPROUT¯TOWER@" +RuinsOfAlphName: db "RUINS¯OF ALPH@" +UnionCaveName: db "UNION CAVE@" +SlowpokeWellName: db "SLOWPOKE¯WELL@" +RadioTowerName: db "RADIO TOWER@" +PowerPlantName: db "POWER PLANT@" +NationalParkName: db "NATIONAL¯PARK@" +TinTowerName: db "TIN TOWER@" +LighthouseName: db "LIGHTHOUSE@" +WhirlIslandsName: db "WHIRL¯ISLANDS@" +MtMortarName: db "MT.MORTAR@" +DragonsDenName: db "DRAGON'S¯DEN@" +IcePathName: db "ICE PATH@" +NotApplicableName: db "N/A@" ; unreferenced ; "オバケやしき" ("HAUNTED HOUSE") in Japanese +PalletTownName: db "PALLET TOWN@" +ViridianCityName: db "VIRIDIAN¯CITY@" +PewterCityName: db "PEWTER CITY@" +CeruleanCityName: db "CERULEAN¯CITY@" +LavenderTownName: db "LAVENDER¯TOWN@" +VermilionCityName: db "VERMILION¯CITY@" +CeladonCityName: db "CELADON¯CITY@" +SaffronCityName: db "SAFFRON¯CITY@" +FuchsiaCityName: db "FUCHSIA¯CITY@" +CinnabarIslandName: db "CINNABAR¯ISLAND@" +IndigoPlateauName: db "INDIGO¯PLATEAU@" +VictoryRoadName: db "VICTORY¯ROAD@" +MtMoonName: db "MT.MOON@" +RockTunnelName: db "ROCK TUNNEL@" +LavRadioTowerName: db "LAV¯RADIO TOWER@" +SilphCoName: db "SILPH CO.@" ; unreferenced +SafariZoneName: db "SAFARI ZONE@" ; unreferenced +SeafoamIslandsName: db "SEAFOAM¯ISLANDS@" +PokemonMansionName: db "#MON¯MANSION@" ; unreferenced +CeruleanCaveName: db "CERULEAN¯CAVE@" ; unreferenced +Route1Name: db "ROUTE 1@" +Route2Name: db "ROUTE 2@" +Route3Name: db "ROUTE 3@" +Route4Name: db "ROUTE 4@" +Route5Name: db "ROUTE 5@" +Route6Name: db "ROUTE 6@" +Route7Name: db "ROUTE 7@" +Route8Name: db "ROUTE 8@" +Route9Name: db "ROUTE 9@" +Route10Name: db "ROUTE 10@" +Route11Name: db "ROUTE 11@" +Route12Name: db "ROUTE 12@" +Route13Name: db "ROUTE 13@" +Route14Name: db "ROUTE 14@" +Route15Name: db "ROUTE 15@" +Route16Name: db "ROUTE 16@" +Route17Name: db "ROUTE 17@" +Route18Name: db "ROUTE 18@" +Route19Name: db "ROUTE 19@" +Route20Name: db "ROUTE 20@" +Route21Name: db "ROUTE 21@" +Route22Name: db "ROUTE 22@" +Route23Name: db "ROUTE 23@" +Route24Name: db "ROUTE 24@" +Route25Name: db "ROUTE 25@" +Route26Name: db "ROUTE 26@" +Route27Name: db "ROUTE 27@" +Route28Name: db "ROUTE 28@" +Route29Name: db "ROUTE 29@" +Route30Name: db "ROUTE 30@" +Route31Name: db "ROUTE 31@" +Route32Name: db "ROUTE 32@" +Route33Name: db "ROUTE 33@" +Route34Name: db "ROUTE 34@" +Route35Name: db "ROUTE 35@" +Route36Name: db "ROUTE 36@" +Route37Name: db "ROUTE 37@" +Route38Name: db "ROUTE 38@" +Route39Name: db "ROUTE 39@" +Route40Name: db "ROUTE 40@" +Route41Name: db "ROUTE 41@" +Route42Name: db "ROUTE 42@" +Route43Name: db "ROUTE 43@" +Route44Name: db "ROUTE 44@" +Route45Name: db "ROUTE 45@" +Route46Name: db "ROUTE 46@" +DarkCaveName: db "DARK CAVE@" +IlexForestName: db "ILEX¯FOREST@" +BurnedTowerName: db "BURNED¯TOWER@" +FastShipName: db "FAST SHIP@" +ViridianForestName: db "VIRIDIAN¯FOREST@" ; unreferenced +DiglettsCaveName: db "DIGLETT'S¯CAVE@" +TohjoFallsName: db "TOHJO FALLS@" +UndergroundName: db "UNDERGROUND@" +BattleTowerName: db "BATTLE¯TOWER@" +SpecialMapName: db "SPECIAL@" diff --git a/data/maps/map_data.asm b/data/maps/map_data.asm new file mode 100644 index 0000000..f41d7b7 --- /dev/null +++ b/data/maps/map_data.asm @@ -0,0 +1,10 @@ +SECTION "Maps", ROMX + +INCLUDE "data/maps/maps.asm" +INCLUDE "data/maps/attributes.asm" + + +INCLUDE "data/maps/blocks.asm" + + +INCLUDE "data/maps/scripts.asm" diff --git a/data/maps/maps.asm b/data/maps/maps.asm new file mode 100644 index 0000000..5282212 --- /dev/null +++ b/data/maps/maps.asm @@ -0,0 +1,538 @@ +MACRO map +;\1: map name: for the MapAttributes pointer (see data/maps/attributes.asm) +;\2: tileset: a TILESET_* constant +;\3: environment: TOWN, ROUTE, INDOOR, CAVE, ENVIRONMENT_5, GATE, or DUNGEON +;\4: location: a LANDMARK_* constant +;\5: music: a MUSIC_* constant +;\6: phone service flag: TRUE to prevent phone calls +;\7: time of day: a PALETTE_* constant +;\8: fishing group: a FISHGROUP_* constant + db BANK(\1_MapAttributes), \2, \3 + dw \1_MapAttributes + db \4, \5 + dn \6, \7 + db \8 +ENDM + +MapGroupPointers:: +; pointers to the first map of each map group + table_width 2, MapGroupPointers + dw MapGroup_Olivine ; 1 + dw MapGroup_Mahogany ; 2 + dw MapGroup_Dungeons ; 3 + dw MapGroup_Ecruteak ; 4 + dw MapGroup_Blackthorn ; 5 + dw MapGroup_Cinnabar ; 6 + dw MapGroup_Cerulean ; 7 + dw MapGroup_Azalea ; 8 + dw MapGroup_LakeOfRage ; 9 + dw MapGroup_Violet ; 10 + dw MapGroup_Goldenrod ; 11 + dw MapGroup_Vermilion ; 12 + dw MapGroup_Pallet ; 13 + dw MapGroup_Pewter ; 14 + dw MapGroup_FastShip ; 15 + dw MapGroup_Indigo ; 16 + dw MapGroup_Fuchsia ; 17 + dw MapGroup_Lavender ; 18 + dw MapGroup_Silver ; 19 + dw MapGroup_CableClub ; 20 + dw MapGroup_Celadon ; 21 + dw MapGroup_Cianwood ; 22 + dw MapGroup_Viridian ; 23 + dw MapGroup_NewBark ; 24 + dw MapGroup_Saffron ; 25 + dw MapGroup_Cherrygrove ; 26 + assert_table_length NUM_MAP_GROUPS + +MapGroup_Olivine: + table_width MAP_LENGTH, MapGroup_Olivine + map OlivinePokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_OLIVINE_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OlivineGym, TILESET_CHAMPIONS_ROOM, INDOOR, LANDMARK_OLIVINE_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map OlivineTimsHouse, TILESET_HOUSE, INDOOR, LANDMARK_OLIVINE_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OlivineHouseBeta, TILESET_HOUSE, INDOOR, LANDMARK_OLIVINE_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OlivinePunishmentSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_OLIVINE_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OlivineGoodRodHouse, TILESET_HOUSE, INDOOR, LANDMARK_OLIVINE_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OlivineCafe, TILESET_GAME_CORNER, INDOOR, LANDMARK_OLIVINE_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OlivineMart, TILESET_MART, INDOOR, LANDMARK_OLIVINE_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route38EcruteakGate, TILESET_GATE, GATE, LANDMARK_ROUTE_38, MUSIC_ROUTE_37, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route39Barn, TILESET_TRADITIONAL_HOUSE, INDOOR, LANDMARK_ROUTE_39, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route39Farmhouse, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_39, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route38, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_38, MUSIC_ROUTE_37, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map Route39, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_39, MUSIC_ROUTE_37, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map OlivineCity, TILESET_JOHTO, TOWN, LANDMARK_OLIVINE_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + assert_table_length NUM_OLIVINE_MAPS + +MapGroup_Mahogany: + table_width MAP_LENGTH, MapGroup_Mahogany + map MahoganyRedGyaradosSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_MAHOGANY_TOWN, MUSIC_CHERRYGROVE_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map MahoganyGym, TILESET_ELITE_FOUR_ROOM, INDOOR, LANDMARK_MAHOGANY_TOWN, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map MahoganyPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_MAHOGANY_TOWN, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route42EcruteakGate, TILESET_GATE, GATE, LANDMARK_ROUTE_42, MUSIC_LAKE_OF_RAGE, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route42, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_42, MUSIC_LAKE_OF_RAGE, FALSE, PALETTE_AUTO, FISHGROUP_LAKE + map Route44, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_44, MUSIC_LAKE_OF_RAGE, FALSE, PALETTE_AUTO, FISHGROUP_POND + map MahoganyTown, TILESET_JOHTO, TOWN, LANDMARK_MAHOGANY_TOWN, MUSIC_CHERRYGROVE_CITY, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + assert_table_length NUM_MAHOGANY_MAPS + +MapGroup_Dungeons: + table_width MAP_LENGTH, MapGroup_Dungeons + map SproutTower1F, TILESET_TOWER, DUNGEON, LANDMARK_SPROUT_TOWER, MUSIC_SPROUT_TOWER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map SproutTower2F, TILESET_TOWER, DUNGEON, LANDMARK_SPROUT_TOWER, MUSIC_SPROUT_TOWER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map SproutTower3F, TILESET_TOWER, DUNGEON, LANDMARK_SPROUT_TOWER, MUSIC_SPROUT_TOWER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map TinTower1F, TILESET_TOWER, DUNGEON, LANDMARK_TIN_TOWER, MUSIC_TIN_TOWER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map TinTower2F, TILESET_TOWER, DUNGEON, LANDMARK_TIN_TOWER, MUSIC_TIN_TOWER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map TinTower3F, TILESET_TOWER, DUNGEON, LANDMARK_TIN_TOWER, MUSIC_TIN_TOWER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map TinTower4F, TILESET_TOWER, DUNGEON, LANDMARK_TIN_TOWER, MUSIC_TIN_TOWER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map TinTower5F, TILESET_TOWER, DUNGEON, LANDMARK_TIN_TOWER, MUSIC_TIN_TOWER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map TinTower6F, TILESET_TOWER, DUNGEON, LANDMARK_TIN_TOWER, MUSIC_TIN_TOWER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map TinTower7F, TILESET_TOWER, DUNGEON, LANDMARK_TIN_TOWER, MUSIC_TIN_TOWER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map TinTower8F, TILESET_TOWER, DUNGEON, LANDMARK_TIN_TOWER, MUSIC_TIN_TOWER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map TinTower9F, TILESET_TOWER, DUNGEON, LANDMARK_TIN_TOWER, MUSIC_TIN_TOWER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map BurnedTower1F, TILESET_TOWER, DUNGEON, LANDMARK_BURNED_TOWER, MUSIC_BURNED_TOWER, TRUE, PALETTE_NITE, FISHGROUP_SHORE + map BurnedTowerB1F, TILESET_CAVE, CAVE, LANDMARK_BURNED_TOWER, MUSIC_BURNED_TOWER, TRUE, PALETTE_NITE, FISHGROUP_SHORE + map NationalPark, TILESET_PARK, ROUTE, LANDMARK_NATIONAL_PARK, MUSIC_NATIONAL_PARK, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map NationalParkBugContest, TILESET_PARK, ROUTE, LANDMARK_NATIONAL_PARK, MUSIC_BUG_CATCHING_CONTEST, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map RadioTower1F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_RADIO_TOWER, RADIO_TOWER_MUSIC | MUSIC_GOLDENROD_CITY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RadioTower2F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_RADIO_TOWER, RADIO_TOWER_MUSIC | MUSIC_GOLDENROD_CITY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RadioTower3F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_RADIO_TOWER, RADIO_TOWER_MUSIC | MUSIC_GOLDENROD_CITY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RadioTower4F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_RADIO_TOWER, RADIO_TOWER_MUSIC | MUSIC_GOLDENROD_CITY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RadioTower5F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_RADIO_TOWER, RADIO_TOWER_MUSIC | MUSIC_GOLDENROD_CITY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphOutside, TILESET_JOHTO, ROUTE, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, FALSE, PALETTE_AUTO, FISHGROUP_POND + map RuinsOfAlphHoOhChamber, TILESET_RUINS_OF_ALPH, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphKabutoChamber, TILESET_RUINS_OF_ALPH, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphOmanyteChamber, TILESET_RUINS_OF_ALPH, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphAerodactylChamber, TILESET_RUINS_OF_ALPH, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphInnerChamber, TILESET_RUINS_OF_ALPH, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_RUINS_OF_ALPH_INTERIOR, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphResearchCenter, TILESET_FACILITY, INDOOR, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphHoOhItemRoom, TILESET_RUINS_OF_ALPH, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphKabutoItemRoom, TILESET_RUINS_OF_ALPH, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphOmanyteItemRoom, TILESET_RUINS_OF_ALPH, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphAerodactylItemRoom, TILESET_RUINS_OF_ALPH, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphHoOhWordRoom, TILESET_HO_OH_WORD_ROOM, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphKabutoWordRoom, TILESET_KABUTO_WORD_ROOM, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphOmanyteWordRoom, TILESET_OMANYTE_WORD_ROOM, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map RuinsOfAlphAerodactylWordRoom, TILESET_AERODACTYL_WORD_ROOM, DUNGEON, LANDMARK_RUINS_OF_ALPH, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map UnionCave1F, TILESET_CAVE, CAVE, LANDMARK_UNION_CAVE, MUSIC_UNION_CAVE, TRUE, PALETTE_NITE, FISHGROUP_LAKE + map UnionCaveB1F, TILESET_CAVE, CAVE, LANDMARK_UNION_CAVE, MUSIC_UNION_CAVE, TRUE, PALETTE_NITE, FISHGROUP_LAKE + map UnionCaveB2F, TILESET_CAVE, CAVE, LANDMARK_UNION_CAVE, MUSIC_UNION_CAVE, TRUE, PALETTE_NITE, FISHGROUP_SHORE + map SlowpokeWellB1F, TILESET_CAVE, CAVE, LANDMARK_SLOWPOKE_WELL, MUSIC_DARK_CAVE, TRUE, PALETTE_NITE, FISHGROUP_LAKE + map SlowpokeWellB2F, TILESET_CAVE, CAVE, LANDMARK_SLOWPOKE_WELL, MUSIC_DARK_CAVE, TRUE, PALETTE_NITE, FISHGROUP_LAKE + map OlivineLighthouse1F, TILESET_LIGHTHOUSE, DUNGEON, LANDMARK_LIGHTHOUSE, MUSIC_LIGHTHOUSE, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OlivineLighthouse2F, TILESET_LIGHTHOUSE, DUNGEON, LANDMARK_LIGHTHOUSE, MUSIC_LIGHTHOUSE, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OlivineLighthouse3F, TILESET_LIGHTHOUSE, DUNGEON, LANDMARK_LIGHTHOUSE, MUSIC_LIGHTHOUSE, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OlivineLighthouse4F, TILESET_LIGHTHOUSE, DUNGEON, LANDMARK_LIGHTHOUSE, MUSIC_LIGHTHOUSE, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OlivineLighthouse5F, TILESET_LIGHTHOUSE, DUNGEON, LANDMARK_LIGHTHOUSE, MUSIC_LIGHTHOUSE, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OlivineLighthouse6F, TILESET_LIGHTHOUSE, DUNGEON, LANDMARK_LIGHTHOUSE, MUSIC_VIOLET_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map MahoganyMart1F, TILESET_TRADITIONAL_HOUSE, INDOOR, LANDMARK_MAHOGANY_TOWN, MUSIC_MAHOGANY_MART, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map TeamRocketBaseB1F, TILESET_UNDERGROUND, DUNGEON, LANDMARK_MAHOGANY_TOWN, MUSIC_ROCKET_HIDEOUT, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map TeamRocketBaseB2F, TILESET_FACILITY, DUNGEON, LANDMARK_MAHOGANY_TOWN, MUSIC_ROCKET_HIDEOUT, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map TeamRocketBaseB3F, TILESET_FACILITY, DUNGEON, LANDMARK_MAHOGANY_TOWN, MUSIC_ROCKET_HIDEOUT, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map IlexForest, TILESET_FOREST, CAVE, LANDMARK_ILEX_FOREST, MUSIC_UNION_CAVE, FALSE, PALETTE_NITE, FISHGROUP_POND + map GoldenrodUnderground, TILESET_GATE, DUNGEON, LANDMARK_GOLDENROD_CITY, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodUndergroundSwitchRoomEntrances, TILESET_ELITE_FOUR_ROOM, DUNGEON, LANDMARK_GOLDENROD_CITY, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodDeptStoreB1F, TILESET_UNDERGROUND, DUNGEON, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodUndergroundWarehouse, TILESET_UNDERGROUND, DUNGEON, LANDMARK_GOLDENROD_CITY, MUSIC_UNION_CAVE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map MountMortar1FOutside, TILESET_DARK_CAVE, CAVE, LANDMARK_MT_MORTAR, MUSIC_UNION_CAVE, TRUE, PALETTE_NITE, FISHGROUP_LAKE + map MountMortar1FInside, TILESET_DARK_CAVE, CAVE, LANDMARK_MT_MORTAR, MUSIC_UNION_CAVE, TRUE, PALETTE_NITE, FISHGROUP_LAKE + map MountMortar2FInside, TILESET_DARK_CAVE, CAVE, LANDMARK_MT_MORTAR, MUSIC_UNION_CAVE, TRUE, PALETTE_NITE, FISHGROUP_LAKE + map MountMortarB1F, TILESET_DARK_CAVE, CAVE, LANDMARK_MT_MORTAR, MUSIC_UNION_CAVE, TRUE, PALETTE_NITE, FISHGROUP_LAKE + map IcePath1F, TILESET_ICE_PATH, CAVE, LANDMARK_ICE_PATH, MUSIC_DARK_CAVE, TRUE, PALETTE_NITE, FISHGROUP_DRATINI + map IcePathB1F, TILESET_ICE_PATH, CAVE, LANDMARK_ICE_PATH, MUSIC_DARK_CAVE, TRUE, PALETTE_NITE, FISHGROUP_DRATINI + map IcePathB2FMahoganySide, TILESET_ICE_PATH, CAVE, LANDMARK_ICE_PATH, MUSIC_DARK_CAVE, TRUE, PALETTE_NITE, FISHGROUP_DRATINI + map IcePathB2FBlackthornSide, TILESET_ICE_PATH, CAVE, LANDMARK_ICE_PATH, MUSIC_DARK_CAVE, TRUE, PALETTE_NITE, FISHGROUP_DRATINI + map IcePathB3F, TILESET_ICE_PATH, CAVE, LANDMARK_ICE_PATH, MUSIC_DARK_CAVE, TRUE, PALETTE_NITE, FISHGROUP_DRATINI + map WhirlIslandNW, TILESET_DARK_CAVE, CAVE, LANDMARK_WHIRL_ISLANDS, MUSIC_UNION_CAVE, TRUE, PALETTE_DARK, FISHGROUP_WHIRL_ISLANDS + map WhirlIslandNE, TILESET_DARK_CAVE, CAVE, LANDMARK_WHIRL_ISLANDS, MUSIC_UNION_CAVE, TRUE, PALETTE_DARK, FISHGROUP_WHIRL_ISLANDS + map WhirlIslandSW, TILESET_DARK_CAVE, CAVE, LANDMARK_WHIRL_ISLANDS, MUSIC_UNION_CAVE, TRUE, PALETTE_DARK, FISHGROUP_WHIRL_ISLANDS + map WhirlIslandCave, TILESET_DARK_CAVE, CAVE, LANDMARK_WHIRL_ISLANDS, MUSIC_UNION_CAVE, TRUE, PALETTE_DARK, FISHGROUP_WHIRL_ISLANDS + map WhirlIslandSE, TILESET_DARK_CAVE, CAVE, LANDMARK_WHIRL_ISLANDS, MUSIC_UNION_CAVE, TRUE, PALETTE_DARK, FISHGROUP_WHIRL_ISLANDS + map WhirlIslandB1F, TILESET_DARK_CAVE, CAVE, LANDMARK_WHIRL_ISLANDS, MUSIC_UNION_CAVE, TRUE, PALETTE_DARK, FISHGROUP_WHIRL_ISLANDS + map WhirlIslandB2F, TILESET_DARK_CAVE, CAVE, LANDMARK_WHIRL_ISLANDS, MUSIC_UNION_CAVE, TRUE, PALETTE_DARK, FISHGROUP_WHIRL_ISLANDS + map WhirlIslandLugiaChamber, TILESET_DARK_CAVE, CAVE, LANDMARK_WHIRL_ISLANDS, MUSIC_UNION_CAVE, TRUE, PALETTE_DARK, FISHGROUP_WHIRL_ISLANDS + map SilverCaveRoom1, TILESET_DARK_CAVE, CAVE, LANDMARK_SILVER_CAVE, MUSIC_LIGHTHOUSE, TRUE, PALETTE_DARK, FISHGROUP_LAKE + map SilverCaveRoom2, TILESET_CAVE, CAVE, LANDMARK_SILVER_CAVE, MUSIC_LIGHTHOUSE, TRUE, PALETTE_NITE, FISHGROUP_LAKE + map SilverCaveRoom3, TILESET_CAVE, CAVE, LANDMARK_SILVER_CAVE, MUSIC_LIGHTHOUSE, TRUE, PALETTE_DAY, FISHGROUP_LAKE + map SilverCaveItemRooms, TILESET_CAVE, CAVE, LANDMARK_SILVER_CAVE, MUSIC_LIGHTHOUSE, TRUE, PALETTE_NITE, FISHGROUP_LAKE + map DarkCaveVioletEntrance, TILESET_DARK_CAVE, CAVE, LANDMARK_DARK_CAVE, MUSIC_DARK_CAVE, TRUE, PALETTE_DARK, FISHGROUP_LAKE + map DarkCaveBlackthornEntrance, TILESET_DARK_CAVE, CAVE, LANDMARK_DARK_CAVE, MUSIC_DARK_CAVE, TRUE, PALETTE_DARK, FISHGROUP_LAKE + map DragonsDen1F, TILESET_CAVE, CAVE, LANDMARK_DRAGONS_DEN, MUSIC_DRAGONS_DEN, TRUE, PALETTE_NITE, FISHGROUP_DRATINI + map DragonsDenB1F, TILESET_JOHTO, CAVE, LANDMARK_DRAGONS_DEN, MUSIC_DRAGONS_DEN, TRUE, PALETTE_NITE, FISHGROUP_DRATINI + map DragonShrine, TILESET_LAB, INDOOR, LANDMARK_DRAGONS_DEN, MUSIC_DRAGONS_DEN, TRUE, PALETTE_NITE, FISHGROUP_SHORE + map TohjoFalls, TILESET_CAVE, CAVE, LANDMARK_TOHJO_FALLS, MUSIC_UNION_CAVE, TRUE, PALETTE_NITE, FISHGROUP_LAKE + map DiglettsCave, TILESET_CAVE, CAVE, LANDMARK_DIGLETTS_CAVE, MUSIC_MT_MOON, TRUE, PALETTE_NITE, FISHGROUP_SHORE + map MountMoon, TILESET_CAVE, CAVE, LANDMARK_MT_MOON, MUSIC_MT_MOON, TRUE, PALETTE_NITE, FISHGROUP_SHORE + map UndergroundPath, TILESET_UNDERGROUND, GATE, LANDMARK_UNDERGROUND_PATH, MUSIC_MT_MOON, FALSE, PALETTE_NITE, FISHGROUP_SHORE + map RockTunnel1F, TILESET_DARK_CAVE, CAVE, LANDMARK_ROCK_TUNNEL, MUSIC_MT_MOON, TRUE, PALETTE_DARK, FISHGROUP_SHORE + map RockTunnelB1F, TILESET_DARK_CAVE, CAVE, LANDMARK_ROCK_TUNNEL, MUSIC_MT_MOON, TRUE, PALETTE_DARK, FISHGROUP_SHORE + map SafariZoneFuchsiaGateBeta, TILESET_GATE, INDOOR, LANDMARK_FUCHSIA_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map SafariZoneBeta, TILESET_PARK, CAVE, LANDMARK_FUCHSIA_CITY, MUSIC_EVOLUTION, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map VictoryRoad, TILESET_CAVE, CAVE, LANDMARK_VICTORY_ROAD, MUSIC_VICTORY_ROAD, TRUE, PALETTE_NITE, FISHGROUP_SHORE + assert_table_length NUM_DUNGEONS_MAPS + +MapGroup_Ecruteak: + table_width MAP_LENGTH, MapGroup_Ecruteak + map EcruteakTinTowerEntrance, TILESET_TOWER, INDOOR, LANDMARK_ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map WiseTriosRoom, TILESET_TRADITIONAL_HOUSE, INDOOR, LANDMARK_ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map EcruteakPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_ECRUTEAK_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map EcruteakLugiaSpeechHouse, TILESET_TRADITIONAL_HOUSE, INDOOR, LANDMARK_ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map DanceTheater, TILESET_TRADITIONAL_HOUSE, INDOOR, LANDMARK_ECRUTEAK_CITY, MUSIC_DANCING_HALL, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map EcruteakMart, TILESET_MART, INDOOR, LANDMARK_ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map EcruteakGym, TILESET_TOWER, INDOOR, LANDMARK_ECRUTEAK_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map EcruteakItemfinderHouse, TILESET_TRADITIONAL_HOUSE, INDOOR, LANDMARK_ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map EcruteakCity, TILESET_JOHTO, TOWN, LANDMARK_ECRUTEAK_CITY, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_AUTO, FISHGROUP_POND + assert_table_length NUM_ECRUTEAK_MAPS + +MapGroup_Blackthorn: + table_width MAP_LENGTH, MapGroup_Blackthorn + map BlackthornGym1F, TILESET_ELITE_FOUR_ROOM, INDOOR, LANDMARK_BLACKTHORN_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map BlackthornGym2F, TILESET_ELITE_FOUR_ROOM, INDOOR, LANDMARK_BLACKTHORN_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map BlackthornDragonSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map BlackthornEmysHouse, TILESET_HOUSE, INDOOR, LANDMARK_BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map BlackthornMart, TILESET_MART, INDOOR, LANDMARK_BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map BlackthornPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_BLACKTHORN_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map MoveDeletersHouse, TILESET_HOUSE, INDOOR, LANDMARK_BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route45, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_45, MUSIC_ROUTE_36, FALSE, PALETTE_AUTO, FISHGROUP_DRATINI_2 + map Route46, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_46, MUSIC_ROUTE_36, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map BlackthornCity, TILESET_JOHTO, TOWN, LANDMARK_BLACKTHORN_CITY, MUSIC_AZALEA_TOWN, FALSE, PALETTE_AUTO, FISHGROUP_POND + assert_table_length NUM_BLACKTHORN_MAPS + +MapGroup_Cinnabar: + table_width MAP_LENGTH, MapGroup_Cinnabar + map CinnabarPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_CINNABAR_ISLAND, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CinnabarPokecenter2FBeta, TILESET_POKECENTER, INDOOR, LANDMARK_CINNABAR_ISLAND, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route19FuchsiaGate, TILESET_GATE, GATE, LANDMARK_ROUTE_19, MUSIC_ROUTE_3, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map SeafoamGym, TILESET_CAVE, INDOOR, LANDMARK_SEAFOAM_ISLANDS, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map Route19, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_19, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map Route20, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_20, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_OCEAN + map Route21, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_21, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_OCEAN + map CinnabarIsland, TILESET_KANTO, TOWN, LANDMARK_CINNABAR_ISLAND, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_AUTO, FISHGROUP_OCEAN + assert_table_length NUM_CINNABAR_MAPS + +MapGroup_Cerulean: + table_width MAP_LENGTH, MapGroup_Cerulean + map CeruleanGymBadgeSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeruleanPoliceStation, TILESET_HOUSE, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeruleanTradeSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeruleanPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeruleanPokecenter2FBeta, TILESET_POKECENTER, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeruleanGym, TILESET_PORT, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_NONE + map CeruleanMart, TILESET_MART, INDOOR, LANDMARK_CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route10Pokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_ROUTE_10, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route10Pokecenter2FBeta, TILESET_POKECENTER, INDOOR, LANDMARK_ROUTE_10, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map PowerPlant, TILESET_FACILITY, INDOOR, LANDMARK_POWER_PLANT, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map BillsHouse, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_25, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route4, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_4, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_NONE + map Route9, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_9, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_LAKE + map Route10North, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_10, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_LAKE + map Route24, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_24, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_LAKE + map Route25, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_25, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_LAKE + map CeruleanCity, TILESET_KANTO, TOWN, LANDMARK_CERULEAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_AUTO, FISHGROUP_NONE + assert_table_length NUM_CERULEAN_MAPS + +MapGroup_Azalea: + table_width MAP_LENGTH, MapGroup_Azalea + map AzaleaPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_AZALEA_TOWN, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CharcoalKiln, TILESET_HOUSE, INDOOR, LANDMARK_AZALEA_TOWN, MUSIC_AZALEA_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map AzaleaMart, TILESET_MART, INDOOR, LANDMARK_AZALEA_TOWN, MUSIC_AZALEA_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map KurtsHouse, TILESET_TRADITIONAL_HOUSE, INDOOR, LANDMARK_AZALEA_TOWN, MUSIC_AZALEA_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map AzaleaGym, TILESET_ELITE_FOUR_ROOM, INDOOR, LANDMARK_AZALEA_TOWN, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map Route33, TILESET_JOHTO_MODERN, ROUTE, LANDMARK_ROUTE_33, MUSIC_ROUTE_30, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map AzaleaTown, TILESET_JOHTO_MODERN, TOWN, LANDMARK_AZALEA_TOWN, MUSIC_AZALEA_TOWN, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + assert_table_length NUM_AZALEA_MAPS + +MapGroup_LakeOfRage: + table_width MAP_LENGTH, MapGroup_LakeOfRage + map LakeOfRageHiddenPowerHouse, TILESET_HOUSE, INDOOR, LANDMARK_LAKE_OF_RAGE, MUSIC_LAKE_OF_RAGE, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map LakeOfRageMagikarpHouse, TILESET_HOUSE, INDOOR, LANDMARK_LAKE_OF_RAGE, MUSIC_LAKE_OF_RAGE, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route43MahoganyGate, TILESET_GATE, GATE, LANDMARK_ROUTE_43, MUSIC_LAKE_OF_RAGE, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route43Gate, TILESET_GATE, GATE, LANDMARK_ROUTE_43, MUSIC_LAKE_OF_RAGE, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route43, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_43, MUSIC_LAKE_OF_RAGE, FALSE, PALETTE_AUTO, FISHGROUP_POND + map LakeOfRage, TILESET_JOHTO, TOWN, LANDMARK_LAKE_OF_RAGE, MUSIC_LAKE_OF_RAGE, FALSE, PALETTE_AUTO, FISHGROUP_GYARADOS + assert_table_length NUM_LAKE_OF_RAGE_MAPS + +MapGroup_Violet: + table_width MAP_LENGTH, MapGroup_Violet + map Route32, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_32, MUSIC_ROUTE_30, FALSE, PALETTE_AUTO, FISHGROUP_QWILFISH + map Route35, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_35, MUSIC_ROUTE_36, FALSE, PALETTE_AUTO, FISHGROUP_POND + map Route36, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_36, MUSIC_ROUTE_36, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map Route37, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_37, MUSIC_ROUTE_36, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map VioletCity, TILESET_JOHTO, TOWN, LANDMARK_VIOLET_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_AUTO, FISHGROUP_POND + map VioletMart, TILESET_MART, INDOOR, LANDMARK_VIOLET_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map VioletGym, TILESET_ELITE_FOUR_ROOM, INDOOR, LANDMARK_VIOLET_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map EarlsPokemonAcademy, TILESET_LAB, INDOOR, LANDMARK_VIOLET_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map VioletNicknameSpeechHouse, TILESET_TRADITIONAL_HOUSE, INDOOR, LANDMARK_VIOLET_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map VioletPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_VIOLET_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map VioletKylesHouse, TILESET_TRADITIONAL_HOUSE, INDOOR, LANDMARK_VIOLET_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route32RuinsOfAlphGate, TILESET_GATE, GATE, LANDMARK_ROUTE_32, MUSIC_ROUTE_30, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route32Pokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_ROUTE_32, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route35GoldenrodGate, TILESET_GATE, GATE, LANDMARK_ROUTE_35, MUSIC_ROUTE_36, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route35NationalParkGate, TILESET_GATE, INDOOR, LANDMARK_ROUTE_35, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route36RuinsOfAlphGate, TILESET_GATE, GATE, LANDMARK_ROUTE_36, MUSIC_ROUTE_36, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route36NationalParkGate, TILESET_GATE, INDOOR, LANDMARK_ROUTE_36, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_VIOLET_MAPS + +MapGroup_Goldenrod: + table_width MAP_LENGTH, MapGroup_Goldenrod + map Route34, TILESET_JOHTO_MODERN, ROUTE, LANDMARK_ROUTE_34, MUSIC_ROUTE_36, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map GoldenrodCity, TILESET_JOHTO_MODERN, TOWN, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map GoldenrodGym, TILESET_ELITE_FOUR_ROOM, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodBikeShop, TILESET_CHAMPIONS_ROOM, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodHappinessRater, TILESET_HOUSE, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map BillsFamilysHouse, TILESET_HOUSE, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodMagnetTrainStation, TILESET_TRAIN_STATION, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodFlowerShop, TILESET_HOUSE, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodPPSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodNameRater, TILESET_HOUSE, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodDeptStore1F, TILESET_MART, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodDeptStore2F, TILESET_MART, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodDeptStore3F, TILESET_MART, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodDeptStore4F, TILESET_MART, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodDeptStore5F, TILESET_MART, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodDeptStore6F, TILESET_MART, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodDeptStoreElevator, TILESET_MART, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodDeptStoreRoof, TILESET_MART, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodGameCorner, TILESET_GAME_CORNER, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_GAME_CORNER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GoldenrodPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map PokecomCenterAdminOfficeMobile, TILESET_POKECOM_CENTER, INDOOR, LANDMARK_GOLDENROD_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map IlexForestAzaleaGate, TILESET_GATE, GATE, LANDMARK_ROUTE_34, MUSIC_ROUTE_36, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route34IlexForestGate, TILESET_GATE, GATE, LANDMARK_ROUTE_34, MUSIC_ROUTE_36, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map DayCare, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_34, MUSIC_AZALEA_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_GOLDENROD_MAPS + +MapGroup_Vermilion: + table_width MAP_LENGTH, MapGroup_Vermilion + map Route6, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_6, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_POND + map Route11, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_11, MUSIC_ROUTE_12, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map VermilionCity, TILESET_KANTO, TOWN, LANDMARK_VERMILION_CITY, MUSIC_VERMILION_CITY, FALSE, PALETTE_AUTO, FISHGROUP_OCEAN + map VermilionFishingSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_VERMILION_CITY, MUSIC_VERMILION_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map VermilionPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_VERMILION_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map VermilionPokecenter2FBeta, TILESET_POKECENTER, INDOOR, LANDMARK_VERMILION_CITY, MUSIC_VERMILION_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map PokemonFanClub, TILESET_HOUSE, INDOOR, LANDMARK_VERMILION_CITY, MUSIC_VERMILION_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map VermilionMagnetTrainSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_VERMILION_CITY, MUSIC_VERMILION_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map VermilionMart, TILESET_MART, INDOOR, LANDMARK_VERMILION_CITY, MUSIC_VERMILION_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map VermilionDiglettsCaveSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_VERMILION_CITY, MUSIC_VERMILION_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map VermilionGym, TILESET_GAME_CORNER, INDOOR, LANDMARK_VERMILION_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map Route6SaffronGate, TILESET_GATE, GATE, LANDMARK_ROUTE_6, MUSIC_ROUTE_3, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route6UndergroundPathEntrance, TILESET_GATE, GATE, LANDMARK_ROUTE_6, MUSIC_ROUTE_3, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_VERMILION_MAPS + +MapGroup_Pallet: + table_width MAP_LENGTH, MapGroup_Pallet + map Route1, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_1, MUSIC_ROUTE_1, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map PalletTown, TILESET_KANTO, TOWN, LANDMARK_PALLET_TOWN, MUSIC_PALLET_TOWN, FALSE, PALETTE_AUTO, FISHGROUP_OCEAN + map RedsHouse1F, TILESET_PLAYERS_HOUSE, INDOOR, LANDMARK_PALLET_TOWN, MUSIC_PALLET_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map RedsHouse2F, TILESET_PLAYERS_HOUSE, INDOOR, LANDMARK_PALLET_TOWN, MUSIC_PALLET_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map BluesHouse, TILESET_HOUSE, INDOOR, LANDMARK_PALLET_TOWN, MUSIC_PALLET_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OaksLab, TILESET_LAB, INDOOR, LANDMARK_PALLET_TOWN, MUSIC_POKEMON_TALK, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_PALLET_MAPS + +MapGroup_Pewter: + table_width MAP_LENGTH, MapGroup_Pewter + map Route3, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_3, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map PewterCity, TILESET_KANTO, TOWN, LANDMARK_PEWTER_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map PewterNidoranSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_PEWTER_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map PewterGym, TILESET_TOWER, INDOOR, LANDMARK_PEWTER_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map PewterMart, TILESET_MART, INDOOR, LANDMARK_PEWTER_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map PewterPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_PEWTER_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map PewterPokecenter2FBeta, TILESET_POKECENTER, INDOOR, LANDMARK_PEWTER_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map PewterSnoozeSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_PEWTER_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_PEWTER_MAPS + +MapGroup_FastShip: + table_width MAP_LENGTH, MapGroup_FastShip + map OlivinePort, TILESET_PORT, ROUTE, LANDMARK_OLIVINE_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_AUTO, FISHGROUP_OCEAN + map VermilionPort, TILESET_PORT, ROUTE, LANDMARK_VERMILION_CITY, MUSIC_VERMILION_CITY, FALSE, PALETTE_AUTO, FISHGROUP_OCEAN + map FastShip1F, TILESET_LIGHTHOUSE, INDOOR, LANDMARK_FAST_SHIP, MUSIC_SS_AQUA, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map FastShipCabins_NNW_NNE_NE, TILESET_LIGHTHOUSE, INDOOR, LANDMARK_FAST_SHIP, MUSIC_SS_AQUA, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map FastShipCabins_SW_SSW_NW, TILESET_LIGHTHOUSE, INDOOR, LANDMARK_FAST_SHIP, MUSIC_SS_AQUA, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map FastShipCabins_SE_SSE_CaptainsCabin, TILESET_LIGHTHOUSE, INDOOR, LANDMARK_FAST_SHIP, MUSIC_SS_AQUA, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map FastShipB1F, TILESET_LIGHTHOUSE, INDOOR, LANDMARK_FAST_SHIP, MUSIC_SS_AQUA, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map OlivinePortPassage, TILESET_UNDERGROUND, INDOOR, LANDMARK_OLIVINE_CITY, MUSIC_VIOLET_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map VermilionPortPassage, TILESET_UNDERGROUND, INDOOR, LANDMARK_VERMILION_CITY, MUSIC_VERMILION_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map MountMoonSquare, TILESET_KANTO, ROUTE, LANDMARK_MT_MOON, MUSIC_MT_MOON_SQUARE, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map MountMoonGiftShop, TILESET_TRADITIONAL_HOUSE, INDOOR, LANDMARK_MT_MOON, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map TinTowerRoof, TILESET_TOWER, ROUTE, LANDMARK_TIN_TOWER, MUSIC_TIN_TOWER, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + assert_table_length NUM_FAST_SHIP_MAPS + +MapGroup_Indigo: + table_width MAP_LENGTH, MapGroup_Indigo + map Route23, TILESET_KANTO, TOWN, LANDMARK_ROUTE_23, MUSIC_INDIGO_PLATEAU, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map IndigoPlateauPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map WillsRoom, TILESET_ELITE_FOUR_ROOM, INDOOR, LANDMARK_INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map KogasRoom, TILESET_ELITE_FOUR_ROOM, INDOOR, LANDMARK_INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map BrunosRoom, TILESET_ELITE_FOUR_ROOM, INDOOR, LANDMARK_INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map KarensRoom, TILESET_ELITE_FOUR_ROOM, INDOOR, LANDMARK_INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map LancesRoom, TILESET_CHAMPIONS_ROOM, INDOOR, LANDMARK_INDIGO_PLATEAU, MUSIC_INDIGO_PLATEAU, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map HallOfFame, TILESET_ICE_PATH, INDOOR, LANDMARK_INDIGO_PLATEAU, MUSIC_NEW_BARK_TOWN, TRUE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_INDIGO_MAPS + +MapGroup_Fuchsia: + table_width MAP_LENGTH, MapGroup_Fuchsia + map Route13, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_13, MUSIC_ROUTE_12, FALSE, PALETTE_AUTO, FISHGROUP_QWILFISH_NO_SWARM + map Route14, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_14, MUSIC_ROUTE_12, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map Route15, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_15, MUSIC_ROUTE_12, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map Route18, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_18, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map FuchsiaCity, TILESET_KANTO, TOWN, LANDMARK_FUCHSIA_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_AUTO, FISHGROUP_GYARADOS + map FuchsiaMart, TILESET_MART, INDOOR, LANDMARK_FUCHSIA_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map SafariZoneMainOffice, TILESET_GAME_CORNER, INDOOR, LANDMARK_FUCHSIA_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map FuchsiaGym, TILESET_LAB, INDOOR, LANDMARK_FUCHSIA_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map BillsBrothersHouse, TILESET_HOUSE, INDOOR, LANDMARK_FUCHSIA_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map FuchsiaPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_FUCHSIA_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map FuchsiaPokecenter2FBeta, TILESET_POKECENTER, INDOOR, LANDMARK_FUCHSIA_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map SafariZoneWardensHome, TILESET_HOUSE, INDOOR, LANDMARK_FUCHSIA_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route15FuchsiaGate, TILESET_GATE, GATE, LANDMARK_ROUTE_15, MUSIC_ROUTE_12, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_FUCHSIA_MAPS + +MapGroup_Lavender: + table_width MAP_LENGTH, MapGroup_Lavender + map Route8, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_8, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map Route12, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_12, MUSIC_ROUTE_12, FALSE, PALETTE_AUTO, FISHGROUP_QWILFISH_NO_SWARM + map Route10South, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_10, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_LAKE + map LavenderTown, TILESET_KANTO, TOWN, LANDMARK_LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map LavenderPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_LAVENDER_TOWN, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map LavenderPokecenter2FBeta, TILESET_POKECENTER, INDOOR, LANDMARK_LAVENDER_TOWN, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map MrFujisHouse, TILESET_HOUSE, INDOOR, LANDMARK_LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map LavenderSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map LavenderNameRater, TILESET_HOUSE, INDOOR, LANDMARK_LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map LavenderMart, TILESET_MART, INDOOR, LANDMARK_LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map SoulHouse, TILESET_HOUSE, INDOOR, LANDMARK_LAVENDER_TOWN, MUSIC_LAVENDER_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map LavRadioTower1F, TILESET_RADIO_TOWER, INDOOR, LANDMARK_LAV_RADIO_TOWER, MUSIC_LAVENDER_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route8SaffronGate, TILESET_GATE, GATE, LANDMARK_ROUTE_8, MUSIC_ROUTE_3, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route12SuperRodHouse, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_12, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_LAVENDER_MAPS + +MapGroup_Silver: + table_width MAP_LENGTH, MapGroup_Silver + map Route28, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_28, MUSIC_INDIGO_PLATEAU, FALSE, PALETTE_AUTO, FISHGROUP_POND + map SilverCaveOutside, TILESET_KANTO, TOWN, LANDMARK_SILVER_CAVE, MUSIC_INDIGO_PLATEAU, FALSE, PALETTE_AUTO, FISHGROUP_POND + map SilverCavePokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_SILVER_CAVE, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route28SteelWingHouse, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_28, MUSIC_AZALEA_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_SILVER_MAPS + +MapGroup_CableClub: + table_width MAP_LENGTH, MapGroup_CableClub + map Pokecenter2F, TILESET_POKECENTER, INDOOR, LANDMARK_SPECIAL, MUSIC_POKEMON_CENTER, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map TradeCenter, TILESET_GATE, INDOOR, LANDMARK_SPECIAL, MUSIC_CHERRYGROVE_CITY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map Colosseum, TILESET_GATE, INDOOR, LANDMARK_SPECIAL, MUSIC_CHERRYGROVE_CITY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map TimeCapsule, TILESET_GATE, INDOOR, LANDMARK_SPECIAL, MUSIC_CHERRYGROVE_CITY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map MobileTradeRoom, TILESET_MANSION, INDOOR, LANDMARK_SPECIAL, MUSIC_CHERRYGROVE_CITY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map MobileBattleRoom, TILESET_MANSION, INDOOR, LANDMARK_SPECIAL, MUSIC_CHERRYGROVE_CITY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_CABLE_CLUB_MAPS + +MapGroup_Celadon: + table_width MAP_LENGTH, MapGroup_Celadon + map Route7, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_7, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map Route16, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_16, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map Route17, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_17, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_NONE + map CeladonCity, TILESET_KANTO, TOWN, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_AUTO, FISHGROUP_NONE + map CeladonDeptStore1F, TILESET_MART, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonDeptStore2F, TILESET_MART, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonDeptStore3F, TILESET_MART, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonDeptStore4F, TILESET_MART, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonDeptStore5F, TILESET_MART, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonDeptStore6F, TILESET_MART, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonDeptStoreElevator, TILESET_MART, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonMansion1F, TILESET_MANSION, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonMansion2F, TILESET_MANSION, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonMansion3F, TILESET_MANSION, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonMansionRoof, TILESET_MANSION, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonMansionRoofHouse, TILESET_HOUSE, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_CELADON_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonPokecenter2FBeta, TILESET_POKECENTER, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonGameCorner, TILESET_GAME_CORNER, INDOOR, LANDMARK_CELADON_CITY, MUSIC_GAME_CORNER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonGameCornerPrizeRoom, TILESET_GAME_CORNER, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonGym, TILESET_TRAIN_STATION, INDOOR, LANDMARK_CELADON_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map CeladonCafe, TILESET_GAME_CORNER, INDOOR, LANDMARK_CELADON_CITY, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route16FuchsiaSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_16, MUSIC_CELADON_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route16Gate, TILESET_GATE, GATE, LANDMARK_ROUTE_16, MUSIC_ROUTE_3, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route7SaffronGate, TILESET_GATE, GATE, LANDMARK_ROUTE_7, MUSIC_ROUTE_3, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route17Route18Gate, TILESET_GATE, GATE, LANDMARK_ROUTE_17, MUSIC_ROUTE_3, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_CELADON_MAPS + +MapGroup_Cianwood: + table_width MAP_LENGTH, MapGroup_Cianwood + map Route40, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_40, MUSIC_ROUTE_36, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map Route41, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_41, MUSIC_ROUTE_36, FALSE, PALETTE_AUTO, FISHGROUP_OCEAN + map CianwoodCity, TILESET_JOHTO, TOWN, LANDMARK_CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map ManiasHouse, TILESET_HOUSE, INDOOR, LANDMARK_CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CianwoodGym, TILESET_TOWER, INDOOR, LANDMARK_CIANWOOD_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map CianwoodPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_CIANWOOD_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CianwoodPharmacy, TILESET_HOUSE, INDOOR, LANDMARK_CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CianwoodPhotoStudio, TILESET_HOUSE, INDOOR, LANDMARK_CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CianwoodLugiaSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map PokeSeersHouse, TILESET_HOUSE, INDOOR, LANDMARK_CIANWOOD_CITY, MUSIC_ECRUTEAK_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map BattleTower1F, TILESET_BATTLE_TOWER_INSIDE, INDOOR, LANDMARK_BATTLE_TOWER, MUSIC_BATTLE_TOWER_LOBBY, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map BattleTowerBattleRoom, TILESET_BATTLE_TOWER_INSIDE, INDOOR, LANDMARK_BATTLE_TOWER, MUSIC_BATTLE_TOWER_THEME, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map BattleTowerElevator, TILESET_BATTLE_TOWER_INSIDE, INDOOR, LANDMARK_BATTLE_TOWER, MUSIC_NONE, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map BattleTowerHallway, TILESET_BATTLE_TOWER_INSIDE, INDOOR, LANDMARK_BATTLE_TOWER, MUSIC_BATTLE_TOWER_THEME, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map Route40BattleTowerGate, TILESET_GATE, GATE, LANDMARK_BATTLE_TOWER, MUSIC_ROUTE_36, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map BattleTowerOutside, TILESET_BATTLE_TOWER_OUTSIDE, ROUTE, LANDMARK_BATTLE_TOWER, MUSIC_BATTLE_TOWER_THEME, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + assert_table_length NUM_CIANWOOD_MAPS + +MapGroup_Viridian: + table_width MAP_LENGTH, MapGroup_Viridian + map Route2, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_2, MUSIC_ROUTE_2, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map Route22, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_22, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_POND + map ViridianCity, TILESET_KANTO, TOWN, LANDMARK_VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_AUTO, FISHGROUP_POND + map ViridianGym, TILESET_TRAIN_STATION, INDOOR, LANDMARK_VIRIDIAN_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map ViridianNicknameSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map TrainerHouse1F, TILESET_HOUSE, INDOOR, LANDMARK_VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map TrainerHouseB1F, TILESET_FACILITY, INDOOR, LANDMARK_VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map ViridianMart, TILESET_MART, INDOOR, LANDMARK_VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map ViridianPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_VIRIDIAN_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map ViridianPokecenter2FBeta, TILESET_POKECENTER, INDOOR, LANDMARK_VIRIDIAN_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route2NuggetHouse, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_2, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route2Gate, TILESET_GATE, GATE, LANDMARK_ROUTE_2, MUSIC_ROUTE_2, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map VictoryRoadGate, TILESET_GATE, GATE, LANDMARK_ROUTE_26, MUSIC_INDIGO_PLATEAU, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_VIRIDIAN_MAPS + +MapGroup_NewBark: + table_width MAP_LENGTH, MapGroup_NewBark + map Route26, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_26, MUSIC_ROUTE_26, FALSE, PALETTE_AUTO, FISHGROUP_OCEAN + map Route27, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_27, MUSIC_ROUTE_26, FALSE, PALETTE_AUTO, FISHGROUP_OCEAN + map Route29, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_29, MUSIC_ROUTE_29, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map NewBarkTown, TILESET_JOHTO, TOWN, LANDMARK_NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, FALSE, PALETTE_AUTO, FISHGROUP_OCEAN + map ElmsLab, TILESET_LAB, INDOOR, LANDMARK_NEW_BARK_TOWN, MUSIC_PROF_ELM, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map PlayersHouse1F, TILESET_PLAYERS_HOUSE, INDOOR, LANDMARK_NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map PlayersHouse2F, TILESET_PLAYERS_ROOM, INDOOR, LANDMARK_NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map PlayersNeighborsHouse, TILESET_HOUSE, INDOOR, LANDMARK_NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map ElmsHouse, TILESET_PLAYERS_HOUSE, INDOOR, LANDMARK_NEW_BARK_TOWN, MUSIC_NEW_BARK_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route26HealHouse, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_26, MUSIC_AZALEA_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map DayOfWeekSiblingsHouse, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_26, MUSIC_AZALEA_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route27SandstormHouse, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_27, MUSIC_AZALEA_TOWN, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route29Route46Gate, TILESET_GATE, GATE, LANDMARK_ROUTE_29, MUSIC_ROUTE_29, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_NEW_BARK_MAPS + +MapGroup_Saffron: + table_width MAP_LENGTH, MapGroup_Saffron + map Route5, TILESET_KANTO, ROUTE, LANDMARK_ROUTE_5, MUSIC_ROUTE_3, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map SaffronCity, TILESET_KANTO, TOWN, LANDMARK_SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map FightingDojo, TILESET_TRAIN_STATION, INDOOR, LANDMARK_SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map SaffronGym, TILESET_UNDERGROUND, INDOOR, LANDMARK_SAFFRON_CITY, MUSIC_GYM, TRUE, PALETTE_DAY, FISHGROUP_SHORE + map SaffronMart, TILESET_MART, INDOOR, LANDMARK_SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map SaffronPokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_SAFFRON_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map SaffronPokecenter2FBeta, TILESET_POKECENTER, INDOOR, LANDMARK_SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map MrPsychicsHouse, TILESET_HOUSE, INDOOR, LANDMARK_SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map SaffronMagnetTrainStation, TILESET_TRAIN_STATION, INDOOR, LANDMARK_SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map SilphCo1F, TILESET_FACILITY, INDOOR, LANDMARK_SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CopycatsHouse1F, TILESET_PLAYERS_HOUSE, INDOOR, LANDMARK_SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CopycatsHouse2F, TILESET_PLAYERS_HOUSE, INDOOR, LANDMARK_SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route5UndergroundPathEntrance, TILESET_GATE, GATE, LANDMARK_ROUTE_5, MUSIC_ROUTE_3, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route5SaffronGate, TILESET_GATE, GATE, LANDMARK_ROUTE_5, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route5CleanseTagHouse, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_5, MUSIC_VIRIDIAN_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_SAFFRON_MAPS + +MapGroup_Cherrygrove: + table_width MAP_LENGTH, MapGroup_Cherrygrove + map Route30, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_30, MUSIC_ROUTE_30, FALSE, PALETTE_AUTO, FISHGROUP_POND + map Route31, TILESET_JOHTO, ROUTE, LANDMARK_ROUTE_31, MUSIC_ROUTE_30, FALSE, PALETTE_AUTO, FISHGROUP_POND + map CherrygroveCity, TILESET_JOHTO, TOWN, LANDMARK_CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, FALSE, PALETTE_AUTO, FISHGROUP_SHORE + map CherrygroveMart, TILESET_MART, INDOOR, LANDMARK_CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CherrygrovePokecenter1F, TILESET_POKECENTER, INDOOR, LANDMARK_CHERRYGROVE_CITY, MUSIC_POKEMON_CENTER, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CherrygroveGymSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map GuideGentsHouse, TILESET_HOUSE, INDOOR, LANDMARK_CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map CherrygroveEvolutionSpeechHouse, TILESET_HOUSE, INDOOR, LANDMARK_CHERRYGROVE_CITY, MUSIC_CHERRYGROVE_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route30BerryHouse, TILESET_HOUSE, INDOOR, LANDMARK_ROUTE_30, MUSIC_CHERRYGROVE_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map MrPokemonsHouse, TILESET_FACILITY, INDOOR, LANDMARK_ROUTE_30, MUSIC_CHERRYGROVE_CITY, FALSE, PALETTE_DAY, FISHGROUP_SHORE + map Route31VioletGate, TILESET_GATE, GATE, LANDMARK_ROUTE_31, MUSIC_ROUTE_30, FALSE, PALETTE_DAY, FISHGROUP_SHORE + assert_table_length NUM_CHERRYGROVE_MAPS diff --git a/data/maps/outdoor_sprites.asm b/data/maps/outdoor_sprites.asm new file mode 100644 index 0000000..9f4860d --- /dev/null +++ b/data/maps/outdoor_sprites.asm @@ -0,0 +1,671 @@ +; Valid sprite IDs for each map group. +; Maps with environment ROUTE or TOWN can only use these sprites. + +OutdoorSprites: +; entries correspond to MAPGROUP_* constants + table_width 2, OutdoorSprites + dw OlivineGroupSprites + dw MahoganyGroupSprites + dw DungeonsGroupSprites + dw EcruteakGroupSprites + dw BlackthornGroupSprites + dw CinnabarGroupSprites + dw CeruleanGroupSprites + dw AzaleaGroupSprites + dw LakeOfRageGroupSprites + dw VioletGroupSprites + dw GoldenrodGroupSprites + dw VermilionGroupSprites + dw PalletGroupSprites + dw PewterGroupSprites + dw FastShipGroupSprites + dw IndigoGroupSprites + dw FuchsiaGroupSprites + dw LavenderGroupSprites + dw SilverGroupSprites + dw CableClubGroupSprites + dw CeladonGroupSprites + dw CianwoodGroupSprites + dw ViridianGroupSprites + dw NewBarkGroupSprites + dw SaffronGroupSprites + dw CherrygroveGroupSprites + assert_table_length NUM_MAP_GROUPS + +PalletGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_TEACHER + db SPRITE_FISHER + db SPRITE_YOUNGSTER + db SPRITE_BLUE + db SPRITE_GRAMPS + db SPRITE_BUG_CATCHER + db SPRITE_COOLTRAINER_F + db SPRITE_SWIMMER_GIRL + db SPRITE_SWIMMER_GUY + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +ViridianGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_TEACHER + db SPRITE_FISHER + db SPRITE_YOUNGSTER + db SPRITE_BLUE + db SPRITE_GRAMPS + db SPRITE_BUG_CATCHER + db SPRITE_COOLTRAINER_F + db SPRITE_SWIMMER_GIRL + db SPRITE_SWIMMER_GUY + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +PewterGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_TEACHER + db SPRITE_FISHER + db SPRITE_YOUNGSTER + db SPRITE_BLUE + db SPRITE_GRAMPS + db SPRITE_BUG_CATCHER + db SPRITE_COOLTRAINER_F + db SPRITE_SWIMMER_GIRL + db SPRITE_SWIMMER_GUY + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +CinnabarGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_TEACHER + db SPRITE_FISHER + db SPRITE_YOUNGSTER + db SPRITE_BLUE + db SPRITE_GRAMPS + db SPRITE_BUG_CATCHER + db SPRITE_COOLTRAINER_F + db SPRITE_SWIMMER_GIRL + db SPRITE_SWIMMER_GUY + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +CeruleanGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_COOLTRAINER_M + db SPRITE_SUPER_NERD + db SPRITE_COOLTRAINER_F + db SPRITE_FISHER + db SPRITE_YOUNGSTER + db SPRITE_LASS + db SPRITE_POKEFAN_M + db SPRITE_ROCKET + db SPRITE_MISTY + db SPRITE_POKE_BALL + db SPRITE_SLOWPOKE + +SaffronGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_COOLTRAINER_M + db SPRITE_SUPER_NERD + db SPRITE_COOLTRAINER_F + db SPRITE_FISHER + db SPRITE_YOUNGSTER + db SPRITE_LASS + db SPRITE_POKEFAN_M + db SPRITE_ROCKET + db SPRITE_MISTY + db SPRITE_POKE_BALL + db SPRITE_SLOWPOKE + +CeladonGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_FISHER + db SPRITE_POLIWAG + db SPRITE_TEACHER + db SPRITE_GRAMPS + db SPRITE_YOUNGSTER + db SPRITE_LASS + db SPRITE_BIKER + db SPRITE_RIVAL + db SPRITE_BLUE + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +LavenderGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_POKEFAN_M + db SPRITE_MACHOP + db SPRITE_GRAMPS + db SPRITE_YOUNGSTER + db SPRITE_FISHER + db SPRITE_TEACHER + db SPRITE_SUPER_NERD + db SPRITE_BIG_SNORLAX + db SPRITE_BIKER + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +VermilionGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_POKEFAN_M + db SPRITE_MACHOP + db SPRITE_GRAMPS + db SPRITE_YOUNGSTER + db SPRITE_FISHER + db SPRITE_TEACHER + db SPRITE_SUPER_NERD + db SPRITE_BIG_SNORLAX + db SPRITE_BIKER + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +FuchsiaGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_POKEFAN_M + db SPRITE_MACHOP + db SPRITE_GRAMPS + db SPRITE_YOUNGSTER + db SPRITE_FISHER + db SPRITE_TEACHER + db SPRITE_SUPER_NERD + db SPRITE_BIG_SNORLAX + db SPRITE_BIKER + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +IndigoGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_POKEFAN_M + db SPRITE_BEAUTY + db SPRITE_GRAMPS + db SPRITE_YOUNGSTER + db SPRITE_FISHER + db SPRITE_TEACHER + db SPRITE_SUPER_NERD + db SPRITE_MACHOP + db SPRITE_BIKER + db SPRITE_POKE_BALL + db SPRITE_BOULDER + +NewBarkGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_RIVAL + db SPRITE_TEACHER + db SPRITE_FISHER + db SPRITE_COOLTRAINER_M + db SPRITE_YOUNGSTER + db SPRITE_MONSTER + db SPRITE_GRAMPS + db SPRITE_BUG_CATCHER + db SPRITE_COOLTRAINER_F + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +CherrygroveGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_RIVAL + db SPRITE_TEACHER + db SPRITE_FISHER + db SPRITE_COOLTRAINER_M + db SPRITE_YOUNGSTER + db SPRITE_MONSTER + db SPRITE_GRAMPS + db SPRITE_BUG_CATCHER + db SPRITE_COOLTRAINER_F + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +SilverGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_RIVAL + db SPRITE_TEACHER + db SPRITE_FISHER + db SPRITE_COOLTRAINER_M + db SPRITE_YOUNGSTER + db SPRITE_MONSTER + db SPRITE_GRAMPS + db SPRITE_BUG_CATCHER + db SPRITE_COOLTRAINER_F + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +VioletGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_FISHER + db SPRITE_LASS + db SPRITE_OFFICER + db SPRITE_GRAMPS + db SPRITE_YOUNGSTER + db SPRITE_COOLTRAINER_M + db SPRITE_BUG_CATCHER + db SPRITE_SUPER_NERD + db SPRITE_WEIRD_TREE + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +EcruteakGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_FISHER + db SPRITE_LASS + db SPRITE_OFFICER + db SPRITE_GRAMPS + db SPRITE_YOUNGSTER + db SPRITE_COOLTRAINER_M + db SPRITE_BUG_CATCHER + db SPRITE_SUPER_NERD + db SPRITE_WEIRD_TREE + db SPRITE_POKE_BALL + db SPRITE_FRUIT_TREE + +AzaleaGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_KURT_OUTSIDE + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_GRAMPS + db SPRITE_YOUNGSTER + db SPRITE_OFFICER + db SPRITE_POKEFAN_M + db SPRITE_BLACK_BELT + db SPRITE_TEACHER + db SPRITE_AZALEA_ROCKET + db SPRITE_LASS + db SPRITE_RIVAL + db SPRITE_FRUIT_TREE + db SPRITE_SLOWPOKE + +GoldenrodGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_POKE_BALL + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_GRAMPS + db SPRITE_YOUNGSTER + db SPRITE_OFFICER + db SPRITE_POKEFAN_M + db SPRITE_DAY_CARE_MON_1 + db SPRITE_COOLTRAINER_F + db SPRITE_ROCKET + db SPRITE_LASS + db SPRITE_DAY_CARE_MON_2 + db SPRITE_FRUIT_TREE + db SPRITE_SLOWPOKE + +CianwoodGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_STANDING_YOUNGSTER + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_OLIVINE_RIVAL + db SPRITE_POKEFAN_M + db SPRITE_LASS + db SPRITE_BEAUTY + db SPRITE_SWIMMER_GIRL + db SPRITE_SAILOR + db SPRITE_POKEFAN_F + db SPRITE_SUPER_NERD + db SPRITE_TAUROS + db SPRITE_FRUIT_TREE + db SPRITE_ROCK + +OlivineGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_STANDING_YOUNGSTER + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_OLIVINE_RIVAL + db SPRITE_POKEFAN_M + db SPRITE_LASS + db SPRITE_BEAUTY + db SPRITE_SWIMMER_GIRL + db SPRITE_SAILOR + db SPRITE_POKEFAN_F + db SPRITE_SUPER_NERD + db SPRITE_TAUROS + db SPRITE_FRUIT_TREE + db SPRITE_ROCK + +LakeOfRageGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_LANCE + db SPRITE_GRAMPS + db SPRITE_SUPER_NERD + db SPRITE_COOLTRAINER_F + db SPRITE_FISHER + db SPRITE_COOLTRAINER_M + db SPRITE_LASS + db SPRITE_YOUNGSTER + db SPRITE_GYARADOS + db SPRITE_FRUIT_TREE + db SPRITE_POKE_BALL + +MahoganyGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_GRAMPS + db SPRITE_YOUNGSTER + db SPRITE_LASS + db SPRITE_SUPER_NERD + db SPRITE_COOLTRAINER_M + db SPRITE_POKEFAN_M + db SPRITE_BLACK_BELT + db SPRITE_COOLTRAINER_F + db SPRITE_FISHER + db SPRITE_FRUIT_TREE + db SPRITE_POKE_BALL + +BlackthornGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_GRAMPS + db SPRITE_YOUNGSTER + db SPRITE_LASS + db SPRITE_SUPER_NERD + db SPRITE_COOLTRAINER_M + db SPRITE_POKEFAN_M + db SPRITE_BLACK_BELT + db SPRITE_COOLTRAINER_F + db SPRITE_FISHER + db SPRITE_FRUIT_TREE + db SPRITE_POKE_BALL + +DungeonsGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_GAMEBOY_KID + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_LASS + db SPRITE_POKEFAN_F + db SPRITE_TEACHER + db SPRITE_YOUNGSTER + db SPRITE_GROWLITHE + db SPRITE_POKEFAN_M + db SPRITE_ROCKER + db SPRITE_FISHER + db SPRITE_SCIENTIST + db SPRITE_POKE_BALL + db SPRITE_BOULDER + +FastShipGroupSprites: + db SPRITE_SUICUNE + db SPRITE_SILVER_TROPHY + db SPRITE_FAMICOM + db SPRITE_POKEDEX + db SPRITE_WILL + db SPRITE_KAREN + db SPRITE_NURSE + db SPRITE_OLD_LINK_RECEPTIONIST + db SPRITE_BIG_LAPRAS + db SPRITE_BIG_ONIX + db SPRITE_SUDOWOODO + db SPRITE_BIG_SNORLAX + db SPRITE_SAILOR + db SPRITE_FISHING_GURU + db SPRITE_GENTLEMAN + db SPRITE_SUPER_NERD + db SPRITE_HO_OH + db SPRITE_TEACHER + db SPRITE_COOLTRAINER_F + db SPRITE_YOUNGSTER + db SPRITE_FAIRY + db SPRITE_POKE_BALL + db SPRITE_ROCK + +CableClubGroupSprites: + db SPRITE_OAK + db SPRITE_FISHER + db SPRITE_TEACHER + db SPRITE_TWIN + db SPRITE_POKEFAN_M + db SPRITE_GRAMPS + db SPRITE_FAIRY + db SPRITE_RIVAL + db SPRITE_FISHING_GURU + db SPRITE_POKE_BALL + db SPRITE_POKEDEX diff --git a/data/maps/roofs.asm b/data/maps/roofs.asm new file mode 100644 index 0000000..bcc49f1 --- /dev/null +++ b/data/maps/roofs.asm @@ -0,0 +1,51 @@ +; MapGroupRoofs values; Roofs indexes + const_def + const ROOF_NEW_BARK ; 0 + const ROOF_VIOLET ; 1 + const ROOF_AZALEA ; 2 + const ROOF_OLIVINE ; 3 + const ROOF_GOLDENROD ; 4 +DEF NUM_ROOFS EQU const_value + +MapGroupRoofs: +; entries correspond to MAPGROUP_* constants +; values are indexes for Roofs (see below) + table_width 1, MapGroupRoofs + db -1 ; 0 + db ROOF_OLIVINE ; 1 (Olivine) + db ROOF_AZALEA ; 2 (Mahogany) + db -1 ; 3 + db ROOF_VIOLET ; 4 (Ecruteak) + db ROOF_AZALEA ; 5 (Blackthorn) + db -1 ; 6 + db -1 ; 7 + db ROOF_AZALEA ; 8 (Azalea) + db ROOF_AZALEA ; 9 (Lake of Rage) + db ROOF_VIOLET ; 10 (Violet) + db ROOF_GOLDENROD ; 11 (Goldenrod) + db -1 ; 12 + db -1 ; 13 + db -1 ; 14 + db -1 ; 15 + db -1 ; 16 + db -1 ; 17 + db -1 ; 18 + db ROOF_NEW_BARK ; 19 (Silver Cave) + db -1 ; 20 + db -1 ; 21 + db ROOF_OLIVINE ; 22 (Cianwood) + db -1 ; 23 + db ROOF_NEW_BARK ; 24 (New Bark) + db -1 ; 25 + db ROOF_NEW_BARK ; 26 (Cherrygrove) + assert_table_length NUM_MAP_GROUPS + 1 + +Roofs: +; entries correspond to ROOF_* constants + table_width ROOF_LENGTH * LEN_2BPP_TILE, Roofs +INCBIN "gfx/tilesets/roofs/new_bark.2bpp" +INCBIN "gfx/tilesets/roofs/violet.2bpp" +INCBIN "gfx/tilesets/roofs/azalea.2bpp" +INCBIN "gfx/tilesets/roofs/olivine.2bpp" +INCBIN "gfx/tilesets/roofs/goldenrod.2bpp" + assert_table_length NUM_ROOFS diff --git a/data/maps/scenes.asm b/data/maps/scenes.asm new file mode 100644 index 0000000..9066520 --- /dev/null +++ b/data/maps/scenes.asm @@ -0,0 +1,87 @@ +MACRO scene_var +; map, variable + map_id \1 + dw \2 +ENDM + +MapScenes:: + scene_var POKECENTER_2F, wPokecenter2FSceneID + scene_var TRADE_CENTER, wTradeCenterSceneID + scene_var COLOSSEUM, wColosseumSceneID + scene_var TIME_CAPSULE, wTimeCapsuleSceneID + scene_var POWER_PLANT, wPowerPlantSceneID + scene_var CERULEAN_GYM, wCeruleanGymSceneID + scene_var ROUTE_25, wRoute25SceneID + scene_var TRAINER_HOUSE_B1F, wTrainerHouseB1FSceneID + scene_var VICTORY_ROAD_GATE, wVictoryRoadGateSceneID + scene_var SAFFRON_MAGNET_TRAIN_STATION, wSaffronMagnetTrainStationSceneID + scene_var ROUTE_16_GATE, wRoute16GateSceneID + scene_var ROUTE_17_ROUTE_18_GATE, wRoute17Route18GateSceneID + scene_var INDIGO_PLATEAU_POKECENTER_1F, wIndigoPlateauPokecenter1FSceneID + scene_var WILLS_ROOM, wWillsRoomSceneID + scene_var KOGAS_ROOM, wKogasRoomSceneID + scene_var BRUNOS_ROOM, wBrunosRoomSceneID + scene_var KARENS_ROOM, wKarensRoomSceneID + scene_var LANCES_ROOM, wLancesRoomSceneID + scene_var HALL_OF_FAME, wHallOfFameSceneID + scene_var ROUTE_27, wRoute27SceneID + scene_var NEW_BARK_TOWN, wNewBarkTownSceneID + scene_var ELMS_LAB, wElmsLabSceneID + scene_var PLAYERS_HOUSE_1F, wPlayersHouse1FSceneID + scene_var ROUTE_29, wRoute29SceneID + scene_var CHERRYGROVE_CITY, wCherrygroveCitySceneID + scene_var MR_POKEMONS_HOUSE, wMrPokemonsHouseSceneID + scene_var ROUTE_32, wRoute32SceneID + scene_var ROUTE_35_NATIONAL_PARK_GATE, wRoute35NationalParkGateSceneID + scene_var ROUTE_36, wRoute36SceneID + scene_var ROUTE_36_NATIONAL_PARK_GATE, wRoute36NationalParkGateSceneID + scene_var AZALEA_TOWN, wAzaleaTownSceneID + scene_var GOLDENROD_GYM, wGoldenrodGymSceneID + scene_var GOLDENROD_MAGNET_TRAIN_STATION, wGoldenrodMagnetTrainStationSceneID + scene_var GOLDENROD_POKECENTER_1F, wGoldenrodPokecenter1FSceneID + scene_var OLIVINE_CITY, wOlivineCitySceneID + scene_var ROUTE_34, wRoute34SceneID ; unused + scene_var ROUTE_34_ILEX_FOREST_GATE, wRoute34IlexForestGateSceneID ; unused + scene_var ECRUTEAK_TIN_TOWER_ENTRANCE, wEcruteakTinTowerEntranceSceneID + scene_var WISE_TRIOS_ROOM, wWiseTriosRoomSceneID + scene_var ECRUTEAK_POKECENTER_1F, wEcruteakPokecenter1FSceneID + scene_var ECRUTEAK_GYM, wEcruteakGymSceneID + scene_var MAHOGANY_TOWN, wMahoganyTownSceneID + scene_var ROUTE_42, wRoute42SceneID + scene_var CIANWOOD_CITY, wCianwoodCitySceneID + scene_var BATTLE_TOWER_1F, wBattleTower1FSceneID + scene_var BATTLE_TOWER_BATTLE_ROOM, wBattleTowerBattleRoomSceneID + scene_var BATTLE_TOWER_ELEVATOR, wBattleTowerElevatorSceneID + scene_var BATTLE_TOWER_HALLWAY, wBattleTowerHallwaySceneID + scene_var BATTLE_TOWER_OUTSIDE, wBattleTowerOutsideSceneID ; unused + scene_var ROUTE_43_GATE, wRoute43GateSceneID + scene_var MOUNT_MOON, wMountMoonSceneID + scene_var SPROUT_TOWER_3F, wSproutTower3FSceneID + scene_var TIN_TOWER_1F, wTinTower1FSceneID + scene_var BURNED_TOWER_1F, wBurnedTower1FSceneID + scene_var BURNED_TOWER_B1F, wBurnedTowerB1FSceneID + scene_var RADIO_TOWER_5F, wRadioTower5FSceneID + scene_var RUINS_OF_ALPH_OUTSIDE, wRuinsOfAlphOutsideSceneID + scene_var RUINS_OF_ALPH_RESEARCH_CENTER, wRuinsOfAlphResearchCenterSceneID + scene_var RUINS_OF_ALPH_HO_OH_CHAMBER, wRuinsOfAlphHoOhChamberSceneID + scene_var RUINS_OF_ALPH_KABUTO_CHAMBER, wRuinsOfAlphKabutoChamberSceneID + scene_var RUINS_OF_ALPH_OMANYTE_CHAMBER, wRuinsOfAlphOmanyteChamberSceneID + scene_var RUINS_OF_ALPH_AERODACTYL_CHAMBER, wRuinsOfAlphAerodactylChamberSceneID + scene_var RUINS_OF_ALPH_INNER_CHAMBER, wRuinsOfAlphInnerChamberSceneID + scene_var MAHOGANY_MART_1F, wMahoganyMart1FSceneID + scene_var TEAM_ROCKET_BASE_B1F, wTeamRocketBaseB1FSceneID + scene_var TEAM_ROCKET_BASE_B2F, wTeamRocketBaseB2FSceneID + scene_var TEAM_ROCKET_BASE_B3F, wTeamRocketBaseB3FSceneID + scene_var GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, wGoldenrodUndergroundSwitchRoomEntrancesSceneID + scene_var SILVER_CAVE_ROOM_3, wSilverCaveRoom3SceneID ; unused + scene_var VICTORY_ROAD, wVictoryRoadSceneID + scene_var DRAGONS_DEN_B1F, wDragonsDenB1FSceneID + scene_var DRAGON_SHRINE, wDragonShrineSceneID + scene_var OLIVINE_PORT, wOlivinePortSceneID + scene_var VERMILION_PORT, wVermilionPortSceneID + scene_var FAST_SHIP_1F, wFastShip1FSceneID + scene_var FAST_SHIP_B1F, wFastShipB1FSceneID + scene_var MOUNT_MOON_SQUARE, wMountMoonSquareSceneID + scene_var MOBILE_TRADE_ROOM, wMobileTradeRoomSceneID + scene_var MOBILE_BATTLE_ROOM, wMobileBattleRoomSceneID + db -1 ; end diff --git a/data/maps/scripts.asm b/data/maps/scripts.asm new file mode 100644 index 0000000..19b06a1 --- /dev/null +++ b/data/maps/scripts.asm @@ -0,0 +1,486 @@ +SECTION "Map Scripts 1", ROMX + +INCLUDE "maps/GoldenrodGym.asm" +INCLUDE "maps/GoldenrodBikeShop.asm" +INCLUDE "maps/GoldenrodHappinessRater.asm" +INCLUDE "maps/BillsFamilysHouse.asm" +INCLUDE "maps/GoldenrodMagnetTrainStation.asm" +INCLUDE "maps/GoldenrodFlowerShop.asm" +INCLUDE "maps/GoldenrodPPSpeechHouse.asm" +INCLUDE "maps/GoldenrodNameRater.asm" +INCLUDE "maps/GoldenrodDeptStore1F.asm" +INCLUDE "maps/GoldenrodDeptStore2F.asm" +INCLUDE "maps/GoldenrodDeptStore3F.asm" +INCLUDE "maps/GoldenrodDeptStore4F.asm" +INCLUDE "maps/GoldenrodDeptStore5F.asm" +INCLUDE "maps/GoldenrodDeptStore6F.asm" +INCLUDE "maps/GoldenrodDeptStoreElevator.asm" +INCLUDE "maps/GoldenrodDeptStoreRoof.asm" +INCLUDE "maps/GoldenrodGameCorner.asm" + + +SECTION "Map Scripts 2", ROMX + +INCLUDE "maps/RuinsOfAlphOutside.asm" +INCLUDE "maps/RuinsOfAlphHoOhChamber.asm" +INCLUDE "maps/RuinsOfAlphKabutoChamber.asm" +INCLUDE "maps/RuinsOfAlphOmanyteChamber.asm" +INCLUDE "maps/RuinsOfAlphAerodactylChamber.asm" +INCLUDE "maps/RuinsOfAlphInnerChamber.asm" +INCLUDE "maps/RuinsOfAlphResearchCenter.asm" +INCLUDE "maps/RuinsOfAlphHoOhItemRoom.asm" +INCLUDE "maps/RuinsOfAlphKabutoItemRoom.asm" +INCLUDE "maps/RuinsOfAlphOmanyteItemRoom.asm" +INCLUDE "maps/RuinsOfAlphAerodactylItemRoom.asm" +INCLUDE "maps/RuinsOfAlphHoOhWordRoom.asm" +INCLUDE "maps/RuinsOfAlphKabutoWordRoom.asm" +INCLUDE "maps/RuinsOfAlphOmanyteWordRoom.asm" +INCLUDE "maps/RuinsOfAlphAerodactylWordRoom.asm" +INCLUDE "maps/UnionCave1F.asm" +INCLUDE "maps/UnionCaveB1F.asm" +INCLUDE "maps/UnionCaveB2F.asm" +INCLUDE "maps/SlowpokeWellB1F.asm" +INCLUDE "maps/SlowpokeWellB2F.asm" +INCLUDE "maps/OlivineLighthouse1F.asm" +INCLUDE "maps/OlivineLighthouse2F.asm" +INCLUDE "maps/OlivineLighthouse3F.asm" +INCLUDE "maps/OlivineLighthouse4F.asm" + + +SECTION "Map Scripts 3", ROMX + +INCLUDE "maps/NationalPark.asm" +INCLUDE "maps/NationalParkBugContest.asm" +INCLUDE "maps/RadioTower1F.asm" +INCLUDE "maps/RadioTower2F.asm" +INCLUDE "maps/RadioTower3F.asm" +INCLUDE "maps/RadioTower4F.asm" + + +SECTION "Map Scripts 4", ROMX + +INCLUDE "maps/RadioTower5F.asm" +INCLUDE "maps/OlivineLighthouse5F.asm" +INCLUDE "maps/OlivineLighthouse6F.asm" +INCLUDE "maps/GoldenrodPokecenter1F.asm" +INCLUDE "maps/PokecomCenterAdminOfficeMobile.asm" +INCLUDE "maps/IlexForestAzaleaGate.asm" +INCLUDE "maps/Route34IlexForestGate.asm" +INCLUDE "maps/DayCare.asm" + + +SECTION "Map Scripts 5", ROMX + +INCLUDE "maps/Route11.asm" +INCLUDE "maps/VioletMart.asm" +INCLUDE "maps/VioletGym.asm" +INCLUDE "maps/EarlsPokemonAcademy.asm" +INCLUDE "maps/VioletNicknameSpeechHouse.asm" +INCLUDE "maps/VioletPokecenter1F.asm" +INCLUDE "maps/VioletKylesHouse.asm" +INCLUDE "maps/Route32RuinsOfAlphGate.asm" +INCLUDE "maps/Route32Pokecenter1F.asm" +INCLUDE "maps/Route35GoldenrodGate.asm" +INCLUDE "maps/Route35NationalParkGate.asm" +INCLUDE "maps/Route36RuinsOfAlphGate.asm" +INCLUDE "maps/Route36NationalParkGate.asm" + + +SECTION "Map Scripts 6", ROMX + +INCLUDE "maps/Route8.asm" +INCLUDE "maps/MahoganyMart1F.asm" +INCLUDE "maps/TeamRocketBaseB1F.asm" +INCLUDE "maps/TeamRocketBaseB2F.asm" +INCLUDE "maps/TeamRocketBaseB3F.asm" +INCLUDE "maps/IlexForest.asm" + + +SECTION "Map Scripts 7", ROMX + +INCLUDE "maps/LakeOfRage.asm" +INCLUDE "maps/CeladonDeptStore1F.asm" +INCLUDE "maps/CeladonDeptStore2F.asm" +INCLUDE "maps/CeladonDeptStore3F.asm" +INCLUDE "maps/CeladonDeptStore4F.asm" +INCLUDE "maps/CeladonDeptStore5F.asm" +INCLUDE "maps/CeladonDeptStore6F.asm" +INCLUDE "maps/CeladonDeptStoreElevator.asm" +INCLUDE "maps/CeladonMansion1F.asm" +INCLUDE "maps/CeladonMansion2F.asm" +INCLUDE "maps/CeladonMansion3F.asm" +INCLUDE "maps/CeladonMansionRoof.asm" +INCLUDE "maps/CeladonMansionRoofHouse.asm" +INCLUDE "maps/CeladonPokecenter1F.asm" +INCLUDE "maps/CeladonPokecenter2FBeta.asm" +INCLUDE "maps/CeladonGameCorner.asm" +INCLUDE "maps/CeladonGameCornerPrizeRoom.asm" +INCLUDE "maps/CeladonGym.asm" +INCLUDE "maps/CeladonCafe.asm" +INCLUDE "maps/Route16FuchsiaSpeechHouse.asm" +INCLUDE "maps/Route16Gate.asm" +INCLUDE "maps/Route7SaffronGate.asm" +INCLUDE "maps/Route17Route18Gate.asm" + + +SECTION "Map Scripts 8", ROMX + +INCLUDE "maps/DiglettsCave.asm" +INCLUDE "maps/MountMoon.asm" +INCLUDE "maps/UndergroundPath.asm" +INCLUDE "maps/RockTunnel1F.asm" +INCLUDE "maps/RockTunnelB1F.asm" +INCLUDE "maps/SafariZoneFuchsiaGateBeta.asm" +INCLUDE "maps/SafariZoneBeta.asm" +INCLUDE "maps/VictoryRoad.asm" +INCLUDE "maps/OlivinePort.asm" +INCLUDE "maps/VermilionPort.asm" +INCLUDE "maps/FastShip1F.asm" +INCLUDE "maps/FastShipCabins_NNW_NNE_NE.asm" +INCLUDE "maps/FastShipCabins_SW_SSW_NW.asm" +INCLUDE "maps/FastShipCabins_SE_SSE_CaptainsCabin.asm" +INCLUDE "maps/FastShipB1F.asm" +INCLUDE "maps/OlivinePortPassage.asm" +INCLUDE "maps/VermilionPortPassage.asm" +INCLUDE "maps/MountMoonSquare.asm" +INCLUDE "maps/MountMoonGiftShop.asm" +INCLUDE "maps/TinTowerRoof.asm" + + +SECTION "Map Scripts 9", ROMX + +INCLUDE "maps/Route34.asm" +INCLUDE "maps/ElmsLab.asm" +INCLUDE "maps/PlayersHouse1F.asm" +INCLUDE "maps/PlayersHouse2F.asm" +INCLUDE "maps/PlayersNeighborsHouse.asm" +INCLUDE "maps/ElmsHouse.asm" +INCLUDE "maps/Route26HealHouse.asm" +INCLUDE "maps/DayOfWeekSiblingsHouse.asm" +INCLUDE "maps/Route27SandstormHouse.asm" +INCLUDE "maps/Route29Route46Gate.asm" + + +SECTION "Map Scripts 10", ROMX + +INCLUDE "maps/Route22.asm" +INCLUDE "maps/GoldenrodUnderground.asm" +INCLUDE "maps/GoldenrodUndergroundSwitchRoomEntrances.asm" +INCLUDE "maps/GoldenrodDeptStoreB1F.asm" +INCLUDE "maps/GoldenrodUndergroundWarehouse.asm" +INCLUDE "maps/MountMortar1FOutside.asm" +INCLUDE "maps/MountMortar1FInside.asm" +INCLUDE "maps/MountMortar2FInside.asm" +INCLUDE "maps/MountMortarB1F.asm" +INCLUDE "maps/IcePath1F.asm" +INCLUDE "maps/IcePathB1F.asm" +INCLUDE "maps/IcePathB2FMahoganySide.asm" +INCLUDE "maps/IcePathB2FBlackthornSide.asm" +INCLUDE "maps/IcePathB3F.asm" +INCLUDE "maps/LavenderPokecenter1F.asm" +INCLUDE "maps/LavenderPokecenter2FBeta.asm" +INCLUDE "maps/MrFujisHouse.asm" +INCLUDE "maps/LavenderSpeechHouse.asm" +INCLUDE "maps/LavenderNameRater.asm" +INCLUDE "maps/LavenderMart.asm" +INCLUDE "maps/SoulHouse.asm" +INCLUDE "maps/LavRadioTower1F.asm" +INCLUDE "maps/Route8SaffronGate.asm" +INCLUDE "maps/Route12SuperRodHouse.asm" + + +SECTION "Map Scripts 11", ROMX + +INCLUDE "maps/EcruteakTinTowerEntrance.asm" +INCLUDE "maps/WiseTriosRoom.asm" +INCLUDE "maps/EcruteakPokecenter1F.asm" +INCLUDE "maps/EcruteakLugiaSpeechHouse.asm" +INCLUDE "maps/DanceTheater.asm" +INCLUDE "maps/EcruteakMart.asm" +INCLUDE "maps/EcruteakGym.asm" +INCLUDE "maps/EcruteakItemfinderHouse.asm" +INCLUDE "maps/ViridianGym.asm" +INCLUDE "maps/ViridianNicknameSpeechHouse.asm" +INCLUDE "maps/TrainerHouse1F.asm" +INCLUDE "maps/TrainerHouseB1F.asm" +INCLUDE "maps/ViridianMart.asm" +INCLUDE "maps/ViridianPokecenter1F.asm" +INCLUDE "maps/ViridianPokecenter2FBeta.asm" +INCLUDE "maps/Route2NuggetHouse.asm" +INCLUDE "maps/Route2Gate.asm" +INCLUDE "maps/VictoryRoadGate.asm" + + +SECTION "Map Scripts 12", ROMX + +INCLUDE "maps/OlivinePokecenter1F.asm" +INCLUDE "maps/OlivineGym.asm" +INCLUDE "maps/OlivineTimsHouse.asm" +INCLUDE "maps/OlivineHouseBeta.asm" +INCLUDE "maps/OlivinePunishmentSpeechHouse.asm" +INCLUDE "maps/OlivineGoodRodHouse.asm" +INCLUDE "maps/OlivineCafe.asm" +INCLUDE "maps/OlivineMart.asm" +INCLUDE "maps/Route38EcruteakGate.asm" +INCLUDE "maps/Route39Barn.asm" +INCLUDE "maps/Route39Farmhouse.asm" +INCLUDE "maps/ManiasHouse.asm" +INCLUDE "maps/CianwoodGym.asm" +INCLUDE "maps/CianwoodPokecenter1F.asm" +INCLUDE "maps/CianwoodPharmacy.asm" +INCLUDE "maps/CianwoodPhotoStudio.asm" +INCLUDE "maps/CianwoodLugiaSpeechHouse.asm" +INCLUDE "maps/PokeSeersHouse.asm" +INCLUDE "maps/BattleTower1F.asm" +INCLUDE "maps/BattleTowerBattleRoom.asm" +INCLUDE "maps/BattleTowerElevator.asm" +INCLUDE "maps/BattleTowerHallway.asm" +INCLUDE "maps/Route40BattleTowerGate.asm" +INCLUDE "maps/BattleTowerOutside.asm" + + +SECTION "Map Scripts 13", ROMX + +INCLUDE "maps/IndigoPlateauPokecenter1F.asm" +INCLUDE "maps/WillsRoom.asm" +INCLUDE "maps/KogasRoom.asm" +INCLUDE "maps/BrunosRoom.asm" +INCLUDE "maps/KarensRoom.asm" +INCLUDE "maps/LancesRoom.asm" +INCLUDE "maps/HallOfFame.asm" + + +SECTION "Map Scripts 14", ROMX + +INCLUDE "maps/CeruleanCity.asm" +INCLUDE "maps/SproutTower1F.asm" +INCLUDE "maps/SproutTower2F.asm" +INCLUDE "maps/SproutTower3F.asm" +INCLUDE "maps/TinTower1F.asm" +INCLUDE "maps/TinTower2F.asm" +INCLUDE "maps/TinTower3F.asm" +INCLUDE "maps/TinTower4F.asm" +INCLUDE "maps/TinTower5F.asm" +INCLUDE "maps/TinTower6F.asm" +INCLUDE "maps/TinTower7F.asm" +INCLUDE "maps/TinTower8F.asm" +INCLUDE "maps/TinTower9F.asm" +INCLUDE "maps/BurnedTower1F.asm" +INCLUDE "maps/BurnedTowerB1F.asm" + + +SECTION "Map Scripts 15", ROMX + +INCLUDE "maps/CeruleanGymBadgeSpeechHouse.asm" +INCLUDE "maps/CeruleanPoliceStation.asm" +INCLUDE "maps/CeruleanTradeSpeechHouse.asm" +INCLUDE "maps/CeruleanPokecenter1F.asm" +INCLUDE "maps/CeruleanPokecenter2FBeta.asm" +INCLUDE "maps/CeruleanGym.asm" +INCLUDE "maps/CeruleanMart.asm" +INCLUDE "maps/Route10Pokecenter1F.asm" +INCLUDE "maps/Route10Pokecenter2FBeta.asm" +INCLUDE "maps/PowerPlant.asm" +INCLUDE "maps/BillsHouse.asm" +INCLUDE "maps/FightingDojo.asm" +INCLUDE "maps/SaffronGym.asm" +INCLUDE "maps/SaffronMart.asm" +INCLUDE "maps/SaffronPokecenter1F.asm" +INCLUDE "maps/SaffronPokecenter2FBeta.asm" +INCLUDE "maps/MrPsychicsHouse.asm" +INCLUDE "maps/SaffronMagnetTrainStation.asm" +INCLUDE "maps/SilphCo1F.asm" +INCLUDE "maps/CopycatsHouse1F.asm" +INCLUDE "maps/CopycatsHouse2F.asm" +INCLUDE "maps/Route5UndergroundPathEntrance.asm" +INCLUDE "maps/Route5SaffronGate.asm" +INCLUDE "maps/Route5CleanseTagHouse.asm" + + +SECTION "Map Scripts 16", ROMX + +INCLUDE "maps/PewterCity.asm" +INCLUDE "maps/WhirlIslandNW.asm" +INCLUDE "maps/WhirlIslandNE.asm" +INCLUDE "maps/WhirlIslandSW.asm" +INCLUDE "maps/WhirlIslandCave.asm" +INCLUDE "maps/WhirlIslandSE.asm" +INCLUDE "maps/WhirlIslandB1F.asm" +INCLUDE "maps/WhirlIslandB2F.asm" +INCLUDE "maps/WhirlIslandLugiaChamber.asm" +INCLUDE "maps/SilverCaveRoom1.asm" +INCLUDE "maps/SilverCaveRoom2.asm" +INCLUDE "maps/SilverCaveRoom3.asm" +INCLUDE "maps/SilverCaveItemRooms.asm" +INCLUDE "maps/DarkCaveVioletEntrance.asm" +INCLUDE "maps/DarkCaveBlackthornEntrance.asm" +INCLUDE "maps/DragonsDen1F.asm" +INCLUDE "maps/DragonsDenB1F.asm" +INCLUDE "maps/DragonShrine.asm" +INCLUDE "maps/TohjoFalls.asm" +INCLUDE "maps/AzaleaPokecenter1F.asm" +INCLUDE "maps/CharcoalKiln.asm" +INCLUDE "maps/AzaleaMart.asm" +INCLUDE "maps/KurtsHouse.asm" +INCLUDE "maps/AzaleaGym.asm" + + +SECTION "Map Scripts 17", ROMX + +INCLUDE "maps/MahoganyTown.asm" +INCLUDE "maps/Route32.asm" +INCLUDE "maps/VermilionFishingSpeechHouse.asm" +INCLUDE "maps/VermilionPokecenter1F.asm" +INCLUDE "maps/VermilionPokecenter2FBeta.asm" +INCLUDE "maps/PokemonFanClub.asm" +INCLUDE "maps/VermilionMagnetTrainSpeechHouse.asm" +INCLUDE "maps/VermilionMart.asm" +INCLUDE "maps/VermilionDiglettsCaveSpeechHouse.asm" +INCLUDE "maps/VermilionGym.asm" +INCLUDE "maps/Route6SaffronGate.asm" +INCLUDE "maps/Route6UndergroundPathEntrance.asm" +INCLUDE "maps/Pokecenter2F.asm" +INCLUDE "maps/TradeCenter.asm" +INCLUDE "maps/Colosseum.asm" +INCLUDE "maps/TimeCapsule.asm" +INCLUDE "maps/MobileTradeRoom.asm" +INCLUDE "maps/MobileBattleRoom.asm" + + +SECTION "Map Scripts 18", ROMX + +INCLUDE "maps/Route36.asm" +INCLUDE "maps/FuchsiaCity.asm" +INCLUDE "maps/BlackthornGym1F.asm" +INCLUDE "maps/BlackthornGym2F.asm" +INCLUDE "maps/BlackthornDragonSpeechHouse.asm" +INCLUDE "maps/BlackthornEmysHouse.asm" +INCLUDE "maps/BlackthornMart.asm" +INCLUDE "maps/BlackthornPokecenter1F.asm" +INCLUDE "maps/MoveDeletersHouse.asm" +INCLUDE "maps/FuchsiaMart.asm" +INCLUDE "maps/SafariZoneMainOffice.asm" +INCLUDE "maps/FuchsiaGym.asm" +INCLUDE "maps/BillsBrothersHouse.asm" +INCLUDE "maps/FuchsiaPokecenter1F.asm" +INCLUDE "maps/FuchsiaPokecenter2FBeta.asm" +INCLUDE "maps/SafariZoneWardensHome.asm" +INCLUDE "maps/Route15FuchsiaGate.asm" +INCLUDE "maps/CherrygroveMart.asm" +INCLUDE "maps/CherrygrovePokecenter1F.asm" +INCLUDE "maps/CherrygroveGymSpeechHouse.asm" +INCLUDE "maps/GuideGentsHouse.asm" +INCLUDE "maps/CherrygroveEvolutionSpeechHouse.asm" +INCLUDE "maps/Route30BerryHouse.asm" +INCLUDE "maps/MrPokemonsHouse.asm" +INCLUDE "maps/Route31VioletGate.asm" + + +SECTION "Map Scripts 19", ROMX + +INCLUDE "maps/AzaleaTown.asm" +INCLUDE "maps/GoldenrodCity.asm" +INCLUDE "maps/SaffronCity.asm" +INCLUDE "maps/MahoganyRedGyaradosSpeechHouse.asm" +INCLUDE "maps/MahoganyGym.asm" +INCLUDE "maps/MahoganyPokecenter1F.asm" +INCLUDE "maps/Route42EcruteakGate.asm" +INCLUDE "maps/LakeOfRageHiddenPowerHouse.asm" +INCLUDE "maps/LakeOfRageMagikarpHouse.asm" +INCLUDE "maps/Route43MahoganyGate.asm" +INCLUDE "maps/Route43Gate.asm" +INCLUDE "maps/RedsHouse1F.asm" +INCLUDE "maps/RedsHouse2F.asm" +INCLUDE "maps/BluesHouse.asm" +INCLUDE "maps/OaksLab.asm" + + +SECTION "Map Scripts 20", ROMX + +INCLUDE "maps/CherrygroveCity.asm" +INCLUDE "maps/Route35.asm" +INCLUDE "maps/Route43.asm" +INCLUDE "maps/Route44.asm" +INCLUDE "maps/Route45.asm" +INCLUDE "maps/Route19.asm" +INCLUDE "maps/Route25.asm" + + +SECTION "Map Scripts 21", ROMX + +INCLUDE "maps/CianwoodCity.asm" +INCLUDE "maps/Route27.asm" +INCLUDE "maps/Route29.asm" +INCLUDE "maps/Route30.asm" +INCLUDE "maps/Route38.asm" +INCLUDE "maps/Route13.asm" +INCLUDE "maps/PewterNidoranSpeechHouse.asm" +INCLUDE "maps/PewterGym.asm" +INCLUDE "maps/PewterMart.asm" +INCLUDE "maps/PewterPokecenter1F.asm" +INCLUDE "maps/PewterPokecenter2FBeta.asm" +INCLUDE "maps/PewterSnoozeSpeechHouse.asm" + + +SECTION "Map Scripts 22", ROMX + +INCLUDE "maps/EcruteakCity.asm" +INCLUDE "maps/BlackthornCity.asm" +INCLUDE "maps/Route26.asm" +INCLUDE "maps/Route28.asm" +INCLUDE "maps/Route31.asm" +INCLUDE "maps/Route39.asm" +INCLUDE "maps/Route40.asm" +INCLUDE "maps/Route41.asm" +INCLUDE "maps/Route12.asm" + + +SECTION "Map Scripts 23", ROMX + +INCLUDE "maps/NewBarkTown.asm" +INCLUDE "maps/VioletCity.asm" +INCLUDE "maps/OlivineCity.asm" +INCLUDE "maps/Route37.asm" +INCLUDE "maps/Route42.asm" +INCLUDE "maps/Route46.asm" +INCLUDE "maps/ViridianCity.asm" +INCLUDE "maps/CeladonCity.asm" +INCLUDE "maps/Route15.asm" +INCLUDE "maps/VermilionCity.asm" +INCLUDE "maps/Route9.asm" +INCLUDE "maps/CinnabarPokecenter1F.asm" +INCLUDE "maps/CinnabarPokecenter2FBeta.asm" +INCLUDE "maps/Route19FuchsiaGate.asm" +INCLUDE "maps/SeafoamGym.asm" + + +SECTION "Map Scripts 24", ROMX + +INCLUDE "maps/Route33.asm" +INCLUDE "maps/Route2.asm" +INCLUDE "maps/Route1.asm" +INCLUDE "maps/PalletTown.asm" +INCLUDE "maps/Route21.asm" +INCLUDE "maps/CinnabarIsland.asm" +INCLUDE "maps/Route20.asm" +INCLUDE "maps/Route18.asm" +INCLUDE "maps/Route17.asm" +INCLUDE "maps/Route16.asm" +INCLUDE "maps/Route7.asm" +INCLUDE "maps/Route14.asm" +INCLUDE "maps/LavenderTown.asm" +INCLUDE "maps/Route6.asm" +INCLUDE "maps/Route5.asm" +INCLUDE "maps/Route24.asm" +INCLUDE "maps/Route3.asm" +INCLUDE "maps/Route4.asm" +INCLUDE "maps/Route10South.asm" +INCLUDE "maps/Route23.asm" +INCLUDE "maps/SilverCavePokecenter1F.asm" +INCLUDE "maps/Route28SteelWingHouse.asm" + + +SECTION "Map Scripts 25", ROMX + +INCLUDE "maps/SilverCaveOutside.asm" +INCLUDE "maps/Route10North.asm" diff --git a/data/maps/setup_script_pointers.asm b/data/maps/setup_script_pointers.asm new file mode 100644 index 0000000..b32be8d --- /dev/null +++ b/data/maps/setup_script_pointers.asm @@ -0,0 +1,52 @@ +MACRO add_mapsetup +\1_MapSetupCmd: + dba \1 +ENDM + +MapSetupCommands: + add_mapsetup EnableLCD ; 00 + add_mapsetup DisableLCD ; 01 + add_mapsetup InitSound ; 02 + add_mapsetup PlayMapMusic ; 03 + add_mapsetup RestartMapMusic ; 04 + add_mapsetup FadeToMapMusic ; 05 + add_mapsetup FadeMapMusicAndPalettes ; 06 + add_mapsetup PlayMapMusicBike ; 07 + add_mapsetup ForceMapMusic ; 08 + add_mapsetup FadeInToMusic ; 09 + add_mapsetup LoadBlockData ; 0a (callback 1) + add_mapsetup LoadConnectionBlockData ; 0b + add_mapsetup SaveScreen ; 0c + add_mapsetup BufferScreen ; 0d + add_mapsetup LoadMapGraphics ; 0e + add_mapsetup LoadMapTileset ; 0f + add_mapsetup LoadMapTimeOfDay ; 10 + add_mapsetup LoadMapPalettes ; 11 + add_mapsetup LoadWildMonData ; 12 + add_mapsetup RefreshMapSprites ; 13 + add_mapsetup HandleNewMap ; 14 + add_mapsetup HandleContinueMap ; 15 + add_mapsetup LoadMapObjects ; 16 + add_mapsetup EnterMapSpawnPoint ; 17 + add_mapsetup EnterMapConnection ; 18 + add_mapsetup EnterMapWarp ; 19 + add_mapsetup LoadMapAttributes ; 1a + add_mapsetup LoadMapAttributes_SkipObjects ; 1b + add_mapsetup ClearBGPalettes ; 1c + add_mapsetup FadeOutPalettes ; 1d + add_mapsetup FadeInPalettes ; 1e + add_mapsetup GetMapScreenCoords ; 1f + add_mapsetup GetWarpDestCoords ; 20 + add_mapsetup SpawnInFacingDown ; 21 + add_mapsetup SpawnPlayer ; 22 + add_mapsetup RefreshPlayerCoords ; 23 + add_mapsetup ResetPlayerObjectAction ; 24 + add_mapsetup SkipUpdateMapSprites ; 25 + add_mapsetup UpdateRoamMons ; 26 + add_mapsetup JumpRoamMons ; 27 + add_mapsetup FadeOutMapMusic ; 28 + add_mapsetup ActivateMapAnims ; 29 + add_mapsetup SuspendMapAnims ; 2a + add_mapsetup ApplyMapPalettes ; 2b + add_mapsetup EnableTextAcceleration ; 2c + add_mapsetup InitMapNameSign ; 2d diff --git a/data/maps/setup_scripts.asm b/data/maps/setup_scripts.asm new file mode 100644 index 0000000..5ad24be --- /dev/null +++ b/data/maps/setup_scripts.asm @@ -0,0 +1,183 @@ +MapSetupScripts: +; entries correspond to MAPSETUP_* constants (see constants/map_setup_constants.asm) + table_width 2, MapSetupScripts + dw MapSetupScript_Warp + dw MapSetupScript_Continue + dw MapSetupScript_ReloadMap + dw MapSetupScript_Teleport + dw MapSetupScript_Door + dw MapSetupScript_Fall + dw MapSetupScript_Connection + dw MapSetupScript_LinkReturn + dw MapSetupScript_Train + dw MapSetupScript_Submenu + dw MapSetupScript_BadWarp + dw MapSetupScript_Fly + assert_table_length NUM_MAPSETUP_SCRIPTS + +; valid commands are listed in MapSetupCommands (see data/maps/setup_script_pointers.asm) +MACRO mapsetup + db (\1_MapSetupCmd - MapSetupCommands) / 3 +ENDM + +MapSetupScript_Teleport: + mapsetup ResetPlayerObjectAction +MapSetupScript_Fly: + mapsetup FadeOutPalettes + mapsetup JumpRoamMons +MapSetupScript_Warp: + mapsetup DisableLCD + mapsetup InitSound + mapsetup EnterMapSpawnPoint + mapsetup LoadMapAttributes + mapsetup HandleNewMap + mapsetup SpawnPlayer + mapsetup RefreshPlayerCoords + mapsetup GetMapScreenCoords + mapsetup LoadBlockData + mapsetup BufferScreen + mapsetup LoadMapGraphics + mapsetup LoadMapTimeOfDay + mapsetup LoadMapObjects + mapsetup EnableLCD + mapsetup LoadMapPalettes + mapsetup SpawnInFacingDown + mapsetup RefreshMapSprites + mapsetup PlayMapMusicBike + mapsetup FadeInToMusic + mapsetup FadeInPalettes + mapsetup ActivateMapAnims + mapsetup LoadWildMonData + db -1 ; end + +MapSetupScript_BadWarp: + mapsetup EnterMapSpawnPoint + mapsetup LoadMapAttributes + mapsetup HandleNewMap + mapsetup SpawnPlayer + mapsetup RefreshPlayerCoords + mapsetup GetMapScreenCoords + mapsetup LoadBlockData + mapsetup BufferScreen + mapsetup DisableLCD + mapsetup LoadMapGraphics + mapsetup LoadMapTimeOfDay + mapsetup FadeOutMapMusic + mapsetup EnableLCD + mapsetup LoadMapObjects + mapsetup LoadMapPalettes + mapsetup SpawnInFacingDown + mapsetup RefreshMapSprites + mapsetup FadeToMapMusic + mapsetup FadeInPalettes + mapsetup ActivateMapAnims + mapsetup LoadWildMonData + db -1 ; end + +MapSetupScript_Connection: + mapsetup SuspendMapAnims + mapsetup EnterMapConnection + mapsetup LoadMapAttributes + mapsetup HandleNewMap + mapsetup RefreshPlayerCoords + mapsetup LoadBlockData + mapsetup LoadMapTileset + mapsetup SaveScreen + mapsetup LoadMapObjects + mapsetup FadeToMapMusic + mapsetup LoadMapPalettes + mapsetup InitMapNameSign + mapsetup ApplyMapPalettes + mapsetup LoadWildMonData + mapsetup UpdateRoamMons + mapsetup ActivateMapAnims + db -1 ; end + +MapSetupScript_Fall: + mapsetup ResetPlayerObjectAction +MapSetupScript_Door: + mapsetup FadeOutPalettes +MapSetupScript_Train: + mapsetup EnterMapWarp + mapsetup LoadMapAttributes + mapsetup GetWarpDestCoords + mapsetup HandleNewMap + mapsetup RefreshPlayerCoords + mapsetup LoadBlockData + mapsetup BufferScreen + mapsetup DisableLCD + mapsetup LoadMapGraphics + mapsetup LoadMapTimeOfDay + mapsetup FadeOutMapMusic + mapsetup EnableLCD + mapsetup LoadMapObjects + mapsetup LoadMapPalettes + mapsetup RefreshMapSprites + mapsetup FadeToMapMusic + mapsetup FadeInPalettes + mapsetup ActivateMapAnims + mapsetup LoadWildMonData + mapsetup UpdateRoamMons + db -1 ; end + +MapSetupScript_ReloadMap: + mapsetup FadeMapMusicAndPalettes + mapsetup ClearBGPalettes + mapsetup DisableLCD + mapsetup InitSound + mapsetup LoadBlockData + mapsetup LoadConnectionBlockData + mapsetup LoadMapGraphics + mapsetup LoadMapTimeOfDay + mapsetup EnableLCD + mapsetup LoadMapPalettes + mapsetup RefreshMapSprites + mapsetup ForceMapMusic + mapsetup FadeInPalettes + mapsetup ActivateMapAnims + mapsetup LoadWildMonData + db -1 ; end + +MapSetupScript_LinkReturn: + mapsetup FadeMapMusicAndPalettes + mapsetup DisableLCD + mapsetup InitSound + mapsetup HandleNewMap + mapsetup LoadBlockData + mapsetup BufferScreen + mapsetup LoadMapGraphics + mapsetup LoadMapTimeOfDay + mapsetup EnableLCD + mapsetup LoadMapPalettes + mapsetup RefreshMapSprites + mapsetup PlayMapMusicBike + mapsetup FadeInPalettes + mapsetup ActivateMapAnims + mapsetup LoadWildMonData + mapsetup EnableTextAcceleration + db -1 ; end + +MapSetupScript_Continue: + mapsetup DisableLCD + mapsetup InitSound + mapsetup LoadMapAttributes_SkipObjects + mapsetup GetMapScreenCoords + mapsetup HandleContinueMap + mapsetup LoadBlockData + mapsetup LoadConnectionBlockData + mapsetup BufferScreen + mapsetup LoadMapGraphics + mapsetup LoadMapTimeOfDay + mapsetup EnableLCD + mapsetup LoadMapPalettes + mapsetup RefreshMapSprites + mapsetup PlayMapMusicBike + mapsetup FadeInPalettes + mapsetup ActivateMapAnims + mapsetup LoadWildMonData + db -1 ; end + +MapSetupScript_Submenu: + mapsetup LoadBlockData + mapsetup LoadConnectionBlockData + db -1 ; end diff --git a/data/maps/sgb_roof_pal_inds.asm b/data/maps/sgb_roof_pal_inds.asm new file mode 100644 index 0000000..617b004 --- /dev/null +++ b/data/maps/sgb_roof_pal_inds.asm @@ -0,0 +1,33 @@ +; Crystal does not support SGB, so this is unused. + +MapGroupRoofSGBPalInds: +; entries correspond to map groups + table_width 1, MapGroupRoofSGBPalInds + db PREDEFPAL_ROUTES + db PREDEFPAL_OLIVINE + db PREDEFPAL_MAHOGANY + db PREDEFPAL_DUNGEONS + db PREDEFPAL_ECRUTEAK + db PREDEFPAL_BLACKTHORN + db PREDEFPAL_CINNABAR + db PREDEFPAL_CERULEAN + db PREDEFPAL_AZALEA + db PREDEFPAL_LAKE_OF_RAGE + db PREDEFPAL_VIOLET + db PREDEFPAL_GOLDENROD + db PREDEFPAL_VERMILION + db PREDEFPAL_PALLET + db PREDEFPAL_PEWTER + db PREDEFPAL_VERMILION + db PREDEFPAL_INDIGO + db PREDEFPAL_FUCHSIA + db PREDEFPAL_LAVENDER + db PREDEFPAL_SILVER_CAVE + db PREDEFPAL_FUCHSIA + db PREDEFPAL_CELADON + db PREDEFPAL_CIANWOOD + db PREDEFPAL_VIRIDIAN + db PREDEFPAL_NEW_BARK + db PREDEFPAL_SAFFRON + db PREDEFPAL_CHERRYGROVE + assert_table_length NUM_MAP_GROUPS + 1 diff --git a/data/maps/spawn_points.asm b/data/maps/spawn_points.asm new file mode 100644 index 0000000..61938cd --- /dev/null +++ b/data/maps/spawn_points.asm @@ -0,0 +1,44 @@ +MACRO spawn +; map, x, y + map_id \1 + db \2, \3 +ENDM + +SpawnPoints: +; entries correspond to SPAWN_* constants + table_width 4, SpawnPoints + + spawn PLAYERS_HOUSE_2F, 3, 3 + spawn VIRIDIAN_POKECENTER_1F, 5, 3 + + spawn PALLET_TOWN, 5, 6 + spawn VIRIDIAN_CITY, 23, 26 + spawn PEWTER_CITY, 13, 26 + spawn CERULEAN_CITY, 19, 22 + spawn ROUTE_10_NORTH, 11, 2 + spawn VERMILION_CITY, 9, 6 + spawn LAVENDER_TOWN, 5, 6 + spawn SAFFRON_CITY, 9, 30 + spawn CELADON_CITY, 29, 10 + spawn FUCHSIA_CITY, 19, 28 + spawn CINNABAR_ISLAND, 11, 12 + spawn ROUTE_23, 9, 6 + + spawn NEW_BARK_TOWN, 13, 6 + spawn CHERRYGROVE_CITY, 29, 4 + spawn VIOLET_CITY, 31, 26 + spawn ROUTE_32, 11, 74 + spawn AZALEA_TOWN, 15, 10 + spawn CIANWOOD_CITY, 23, 44 + spawn GOLDENROD_CITY, 15, 28 + spawn OLIVINE_CITY, 13, 22 + spawn ECRUTEAK_CITY, 23, 28 + spawn MAHOGANY_TOWN, 15, 14 + spawn LAKE_OF_RAGE, 21, 29 + spawn BLACKTHORN_CITY, 21, 30 + spawn SILVER_CAVE_OUTSIDE, 23, 20 + spawn FAST_SHIP_CABINS_SW_SSW_NW, 6, 2 + + spawn N_A, -1, -1 + + assert_table_length NUM_SPAWNS + 1 diff --git a/data/mon_menu.asm b/data/mon_menu.asm new file mode 100644 index 0000000..dec1293 --- /dev/null +++ b/data/mon_menu.asm @@ -0,0 +1,36 @@ +MonMenuOptions: +; category, item, value; actions are in PokemonActionSubmenu (see engine/pokemon/mon_menu.asm) + table_width 4, MonMenuOptions +; moves + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_CUT, CUT + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_FLY, FLY + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_SURF, SURF + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_STRENGTH, STRENGTH + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_FLASH, FLASH + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_WATERFALL, WATERFALL + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_WHIRLPOOL, WHIRLPOOL + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_DIG, DIG + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_TELEPORT, TELEPORT + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_SOFTBOILED, SOFTBOILED + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_HEADBUTT, HEADBUTT + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_ROCKSMASH, ROCK_SMASH + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_MILKDRINK, MILK_DRINK + dbbw MONMENU_FIELD_MOVE, MONMENUITEM_SWEETSCENT, SWEET_SCENT +; options + dbbw MONMENU_MENUOPTION, MONMENUITEM_STATS, .stats + dbbw MONMENU_MENUOPTION, MONMENUITEM_SWITCH, .switch + dbbw MONMENU_MENUOPTION, MONMENUITEM_ITEM, .item + dbbw MONMENU_MENUOPTION, MONMENUITEM_CANCEL, .cancel + dbbw MONMENU_MENUOPTION, MONMENUITEM_MOVE, .move + dbbw MONMENU_MENUOPTION, MONMENUITEM_MAIL, .mail + dbbw MONMENU_MENUOPTION, MONMENUITEM_ERROR, .error + assert_table_length NUM_MONMENUITEMS + db -1 + +.stats: db "STATS@" +.switch: db "SWITCH@" +.item: db "ITEM@" +.cancel: db "CANCEL@" +.move: db "MOVE@" +.mail: db "MAIL@" +.error: db "ERROR!@" diff --git a/data/moves/animations.asm b/data/moves/animations.asm new file mode 100644 index 0000000..4251ca5 --- /dev/null +++ b/data/moves/animations.asm @@ -0,0 +1,4823 @@ +; entries correspond to constants/move_constants.asm +: + table_width 2, :- +; negative entries first (see the constants file for details) + dw BattleAnim_ThrowPokeBall + dw BattleAnim_SendOutMon + dw BattleAnim_ReturnMon + dw BattleAnim_Confused + dw BattleAnim_Slp + dw BattleAnim_Brn + dw BattleAnim_Psn + dw BattleAnim_Sap + dw BattleAnim_Frz + dw BattleAnim_Par + dw BattleAnim_InLove + dw BattleAnim_InSandstorm + dw BattleAnim_InNightmare + dw BattleAnim_InWhirlpool + dw BattleAnim_Miss + dw BattleAnim_EnemyDamage + dw BattleAnim_EnemyStatDown + dw BattleAnim_PlayerStatDown + dw BattleAnim_PlayerDamage + dw BattleAnim_Wobble + dw BattleAnim_Shake + dw BattleAnim_HitConfusion + assert_table_length NUM_BATTLE_ANIMS +BattleAnimations:: + table_width 2, BattleAnimations + dw BattleAnim_Dummy + dw BattleAnim_Pound + dw BattleAnim_KarateChop + dw BattleAnim_Doubleslap + dw BattleAnim_CometPunch + dw BattleAnim_MegaPunch + dw BattleAnim_PayDay + dw BattleAnim_FirePunch + dw BattleAnim_IcePunch + dw BattleAnim_Thunderpunch + dw BattleAnim_Scratch + dw BattleAnim_Vicegrip + dw BattleAnim_Guillotine + dw BattleAnim_RazorWind + dw BattleAnim_SwordsDance + dw BattleAnim_Cut + dw BattleAnim_Gust + dw BattleAnim_WingAttack + dw BattleAnim_Whirlwind + dw BattleAnim_Fly + dw BattleAnim_Bind + dw BattleAnim_Slam + dw BattleAnim_VineWhip + dw BattleAnim_Stomp + dw BattleAnim_DoubleKick + dw BattleAnim_MegaKick + dw BattleAnim_JumpKick + dw BattleAnim_RollingKick + dw BattleAnim_SandAttack + dw BattleAnim_Headbutt + dw BattleAnim_HornAttack + dw BattleAnim_FuryAttack + dw BattleAnim_HornDrill + dw BattleAnim_Tackle + dw BattleAnim_BodySlam + dw BattleAnim_Wrap + dw BattleAnim_TakeDown + dw BattleAnim_Thrash + dw BattleAnim_DoubleEdge + dw BattleAnim_TailWhip + dw BattleAnim_PoisonSting + dw BattleAnim_Twineedle + dw BattleAnim_PinMissile + dw BattleAnim_Leer + dw BattleAnim_Bite + dw BattleAnim_Growl + dw BattleAnim_Roar + dw BattleAnim_Sing + dw BattleAnim_Supersonic + dw BattleAnim_Sonicboom + dw BattleAnim_Disable + dw BattleAnim_Acid + dw BattleAnim_Ember + dw BattleAnim_Flamethrower + dw BattleAnim_Mist + dw BattleAnim_WaterGun + dw BattleAnim_HydroPump + dw BattleAnim_Surf + dw BattleAnim_IceBeam + dw BattleAnim_Blizzard + dw BattleAnim_Psybeam + dw BattleAnim_Bubblebeam + dw BattleAnim_AuroraBeam + dw BattleAnim_HyperBeam + dw BattleAnim_Peck + dw BattleAnim_DrillPeck + dw BattleAnim_Submission + dw BattleAnim_LowKick + dw BattleAnim_Counter + dw BattleAnim_SeismicToss + dw BattleAnim_Strength + dw BattleAnim_Absorb + dw BattleAnim_MegaDrain + dw BattleAnim_LeechSeed + dw BattleAnim_Growth + dw BattleAnim_RazorLeaf + dw BattleAnim_Solarbeam + dw BattleAnim_Poisonpowder + dw BattleAnim_StunSpore + dw BattleAnim_SleepPowder + dw BattleAnim_PetalDance + dw BattleAnim_StringShot + dw BattleAnim_DragonRage + dw BattleAnim_FireSpin + dw BattleAnim_Thundershock + dw BattleAnim_Thunderbolt + dw BattleAnim_ThunderWave + dw BattleAnim_Thunder + dw BattleAnim_RockThrow + dw BattleAnim_Earthquake + dw BattleAnim_Fissure + dw BattleAnim_Dig + dw BattleAnim_Toxic + dw BattleAnim_Confusion + dw BattleAnim_PsychicM + dw BattleAnim_Hypnosis + dw BattleAnim_Meditate + dw BattleAnim_Agility + dw BattleAnim_QuickAttack + dw BattleAnim_Rage + dw BattleAnim_Teleport + dw BattleAnim_NightShade + dw BattleAnim_Mimic + dw BattleAnim_Screech + dw BattleAnim_DoubleTeam + dw BattleAnim_Recover + dw BattleAnim_Harden + dw BattleAnim_Minimize + dw BattleAnim_Smokescreen + dw BattleAnim_ConfuseRay + dw BattleAnim_Withdraw + dw BattleAnim_DefenseCurl + dw BattleAnim_Barrier + dw BattleAnim_LightScreen + dw BattleAnim_Haze + dw BattleAnim_Reflect + dw BattleAnim_FocusEnergy + dw BattleAnim_Bide + dw BattleAnim_Metronome + dw BattleAnim_MirrorMove + dw BattleAnim_Selfdestruct + dw BattleAnim_EggBomb + dw BattleAnim_Lick + dw BattleAnim_Smog + dw BattleAnim_Sludge + dw BattleAnim_BoneClub + dw BattleAnim_FireBlast + dw BattleAnim_Waterfall + dw BattleAnim_Clamp + dw BattleAnim_Swift + dw BattleAnim_SkullBash + dw BattleAnim_SpikeCannon + dw BattleAnim_Constrict + dw BattleAnim_Amnesia + dw BattleAnim_Kinesis + dw BattleAnim_Softboiled + dw BattleAnim_HiJumpKick + dw BattleAnim_Glare + dw BattleAnim_DreamEater + dw BattleAnim_PoisonGas + dw BattleAnim_Barrage + dw BattleAnim_LeechLife + dw BattleAnim_LovelyKiss + dw BattleAnim_SkyAttack + dw BattleAnim_Transform + dw BattleAnim_Bubble + dw BattleAnim_DizzyPunch + dw BattleAnim_Spore + dw BattleAnim_Flash + dw BattleAnim_Psywave + dw BattleAnim_Splash + dw BattleAnim_AcidArmor + dw BattleAnim_Crabhammer + dw BattleAnim_Explosion + dw BattleAnim_FurySwipes + dw BattleAnim_Bonemerang + dw BattleAnim_Rest + dw BattleAnim_RockSlide + dw BattleAnim_HyperFang + dw BattleAnim_Sharpen + dw BattleAnim_Conversion + dw BattleAnim_TriAttack + dw BattleAnim_SuperFang + dw BattleAnim_Slash + dw BattleAnim_Substitute + dw BattleAnim_Struggle + dw BattleAnim_Sketch + dw BattleAnim_TripleKick + dw BattleAnim_Thief + dw BattleAnim_SpiderWeb + dw BattleAnim_MindReader + dw BattleAnim_Nightmare + dw BattleAnim_FlameWheel + dw BattleAnim_Snore + dw BattleAnim_Curse + dw BattleAnim_Flail + dw BattleAnim_Conversion2 + dw BattleAnim_Aeroblast + dw BattleAnim_CottonSpore + dw BattleAnim_Reversal + dw BattleAnim_Spite + dw BattleAnim_PowderSnow + dw BattleAnim_Protect + dw BattleAnim_MachPunch + dw BattleAnim_ScaryFace + dw BattleAnim_FaintAttack + dw BattleAnim_SweetKiss + dw BattleAnim_BellyDrum + dw BattleAnim_SludgeBomb + dw BattleAnim_MudSlap + dw BattleAnim_Octazooka + dw BattleAnim_Spikes + dw BattleAnim_ZapCannon + dw BattleAnim_Foresight + dw BattleAnim_DestinyBond + dw BattleAnim_PerishSong + dw BattleAnim_IcyWind + dw BattleAnim_Detect + dw BattleAnim_BoneRush + dw BattleAnim_LockOn + dw BattleAnim_Outrage + dw BattleAnim_Sandstorm + dw BattleAnim_GigaDrain + dw BattleAnim_Endure + dw BattleAnim_Charm + dw BattleAnim_Rollout + dw BattleAnim_FalseSwipe + dw BattleAnim_Swagger + dw BattleAnim_MilkDrink + dw BattleAnim_Spark + dw BattleAnim_FuryCutter + dw BattleAnim_SteelWing + dw BattleAnim_MeanLook + dw BattleAnim_Attract + dw BattleAnim_SleepTalk + dw BattleAnim_HealBell + dw BattleAnim_Return + dw BattleAnim_Present + dw BattleAnim_Frustration + dw BattleAnim_Safeguard + dw BattleAnim_PainSplit + dw BattleAnim_SacredFire + dw BattleAnim_Magnitude + dw BattleAnim_Dynamicpunch + dw BattleAnim_Megahorn + dw BattleAnim_Dragonbreath + dw BattleAnim_BatonPass + dw BattleAnim_Encore + dw BattleAnim_Pursuit + dw BattleAnim_RapidSpin + dw BattleAnim_SweetScent + dw BattleAnim_IronTail + dw BattleAnim_MetalClaw + dw BattleAnim_VitalThrow + dw BattleAnim_MorningSun + dw BattleAnim_Synthesis + dw BattleAnim_Moonlight + dw BattleAnim_HiddenPower + dw BattleAnim_CrossChop + dw BattleAnim_Twister + dw BattleAnim_RainDance + dw BattleAnim_SunnyDay + dw BattleAnim_Crunch + dw BattleAnim_MirrorCoat + dw BattleAnim_PsychUp + dw BattleAnim_Extremespeed + dw BattleAnim_Ancientpower + dw BattleAnim_ShadowBall + dw BattleAnim_FutureSight + dw BattleAnim_RockSmash + dw BattleAnim_Whirlpool + dw BattleAnim_BeatUp + assert_table_length NUM_ATTACKS + 1 + dw BattleAnim_SweetScent2 + +BattleAnim_Dummy: +BattleAnim_MirrorMove: + anim_ret + +BattleAnim_SweetScent2: + anim_2gfx ANIM_GFX_FLOWER, ANIM_GFX_MISC + anim_obj ANIM_OBJ_FLOWER, 64, 96, $2 + anim_wait 2 + anim_obj ANIM_OBJ_FLOWER, 64, 80, $2 + anim_wait 64 + anim_obj ANIM_OBJ_COTTON, 136, 40, $15 + anim_obj ANIM_OBJ_COTTON, 136, 40, $2a + anim_obj ANIM_OBJ_COTTON, 136, 40, $3f + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_wait 128 + anim_ret + +BattleAnim_ThrowPokeBall: + anim_if_param_equal NO_ITEM, .TheTrainerBlockedTheBall + anim_if_param_equal MASTER_BALL, .MasterBall + anim_if_param_equal ULTRA_BALL, .UltraBall + anim_if_param_equal GREAT_BALL, .GreatBall + ; any other ball + anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE + anim_sound 6, 2, SFX_THROW_BALL + anim_obj ANIM_OBJ_POKE_BALL, 68, 92, $40 + anim_wait 36 + anim_obj ANIM_OBJ_POKE_BALL, 136, 65, $0 + anim_setobj $2, $7 + anim_wait 16 + anim_sound 0, 1, SFX_BALL_POOF + anim_obj ANIM_OBJ_BALL_POOF, 136, 64, $10 + anim_wait 16 + anim_jump .Shake + +.TheTrainerBlockedTheBall: + anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_HIT + anim_sound 6, 2, SFX_THROW_BALL + anim_obj ANIM_OBJ_POKE_BALL_BLOCKED, 64, 92, $20 + anim_wait 20 + anim_obj ANIM_OBJ_HIT_YFIX, 112, 40, $0 + anim_wait 32 + anim_ret + +.UltraBall: + anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE + anim_sound 6, 2, SFX_THROW_BALL + anim_obj ANIM_OBJ_POKE_BALL, 68, 92, $40 + anim_wait 36 + anim_obj ANIM_OBJ_POKE_BALL, 136, 65, $0 + anim_setobj $2, $7 + anim_wait 16 + anim_sound 0, 1, SFX_BALL_POOF + anim_obj ANIM_OBJ_BALL_POOF, 136, 64, $10 + anim_wait 16 + anim_jump .Shake + +.GreatBall: + anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE + anim_sound 6, 2, SFX_THROW_BALL + anim_obj ANIM_OBJ_POKE_BALL, 68, 92, $40 + anim_wait 36 + anim_obj ANIM_OBJ_POKE_BALL, 136, 65, $0 + anim_setobj $2, $7 + anim_wait 16 + anim_sound 0, 1, SFX_BALL_POOF + anim_obj ANIM_OBJ_BALL_POOF, 136, 64, $10 + anim_wait 16 + anim_jump .Shake + +.MasterBall: + anim_3gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE, ANIM_GFX_SPEED + anim_sound 6, 2, SFX_THROW_BALL + anim_obj ANIM_OBJ_POKE_BALL, 64, 92, $20 + anim_wait 36 + anim_obj ANIM_OBJ_POKE_BALL, 136, 65, $0 + anim_setobj $2, $7 + anim_wait 16 + anim_sound 0, 1, SFX_BALL_POOF + anim_obj ANIM_OBJ_BALL_POOF, 136, 64, $10 + anim_wait 24 + anim_sound 0, 1, SFX_MASTER_BALL + anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, 136, 56, $30 + anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, 136, 56, $31 + anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, 136, 56, $32 + anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, 136, 56, $33 + anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, 136, 56, $34 + anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, 136, 56, $35 + anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, 136, 56, $36 + anim_obj ANIM_OBJ_MASTER_BALL_SPARKLE, 136, 56, $37 + anim_wait 64 +.Shake: + anim_bgeffect ANIM_BG_RETURN_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 8 + anim_incobj 2 + anim_wait 16 + anim_sound 0, 1, SFX_CHANGE_DEX_MODE + anim_incobj 1 + anim_wait 32 + anim_sound 0, 1, SFX_BALL_BOUNCE + anim_wait 32 + anim_wait 32 + anim_wait 32 + anim_wait 8 + anim_setvar $0 +.Loop: + anim_wait 48 + anim_checkpokeball + anim_if_var_equal $1, .Click + anim_if_var_equal $2, .BreakFree + anim_incobj 1 + anim_sound 0, 1, SFX_BALL_WOBBLE + anim_jump .Loop + +.Click: + anim_keepsprites + anim_ret + +.BreakFree: + anim_setobj $1, $b + anim_sound 0, 1, SFX_BALL_POOF + anim_obj ANIM_OBJ_BALL_POOF, 136, 64, $10 + anim_wait 2 + anim_bgeffect ANIM_BG_ENTER_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 32 + anim_ret + +BattleAnim_SendOutMon: + anim_if_param_equal $0, .Normal + anim_if_param_equal $1, .Shiny + anim_if_param_equal $2, .Unknown + anim_1gfx ANIM_GFX_SMOKE + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_BETA_SEND_OUT_MON2, $0, BG_EFFECT_USER, $0 + anim_sound 0, 0, SFX_BALL_POOF + anim_obj ANIM_OBJ_BETA_BALL_POOF, 48, 96, $0 + anim_bgeffect ANIM_BG_ENTER_MON, $0, BG_EFFECT_USER, $0 + anim_wait 128 + anim_wait 4 + anim_call BattleAnim_ShowMon_0 + anim_ret + +.Unknown: + anim_1gfx ANIM_GFX_SMOKE + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_BETA_SEND_OUT_MON1, $0, BG_EFFECT_USER, $0 + anim_wait 1 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_sound 0, 0, SFX_BALL_POOF + anim_obj ANIM_OBJ_BETA_BALL_POOF, 48, 96, $0 + anim_incbgeffect ANIM_BG_BETA_SEND_OUT_MON1 + anim_wait 96 + anim_incbgeffect ANIM_BG_BETA_SEND_OUT_MON1 + anim_call BattleAnim_ShowMon_0 + anim_ret + +.Shiny: + anim_1gfx ANIM_GFX_SPEED + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $3 + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SHINY, 48, 96, $0 + anim_wait 4 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SHINY, 48, 96, $8 + anim_wait 4 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SHINY, 48, 96, $10 + anim_wait 4 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SHINY, 48, 96, $18 + anim_wait 4 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SHINY, 48, 96, $20 + anim_wait 4 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SHINY, 48, 96, $28 + anim_wait 4 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SHINY, 48, 96, $30 + anim_wait 4 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SHINY, 48, 96, $38 + anim_wait 32 + anim_ret + +.Normal: + anim_1gfx ANIM_GFX_SMOKE + anim_sound 0, 0, SFX_BALL_POOF + anim_obj ANIM_OBJ_BALL_POOF, 44, 96, $0 + anim_wait 4 + anim_bgeffect ANIM_BG_ENTER_MON, $0, BG_EFFECT_USER, $0 + anim_wait 32 + anim_ret + +BattleAnim_ReturnMon: + anim_sound 0, 0, SFX_BALL_POOF +BattleAnimSub_Return: + anim_bgeffect ANIM_BG_RETURN_MON, $0, BG_EFFECT_USER, $0 + anim_wait 32 + anim_ret + +BattleAnim_Confused: + anim_1gfx ANIM_GFX_STATUS + anim_sound 0, 0, SFX_KINESIS + anim_obj ANIM_OBJ_CHICK, 44, 56, $15 + anim_obj ANIM_OBJ_CHICK, 44, 56, $aa + anim_obj ANIM_OBJ_CHICK, 44, 56, $bf + anim_wait 96 + anim_ret + +BattleAnim_Slp: + anim_1gfx ANIM_GFX_STATUS + anim_sound 0, 0, SFX_TAIL_WHIP +.loop + anim_obj ANIM_OBJ_ASLEEP, 64, 80, $0 + anim_wait 40 + anim_loop 3, .loop + anim_wait 32 + anim_ret + +BattleAnim_Brn: + anim_1gfx ANIM_GFX_FIRE +.loop + anim_sound 0, 0, SFX_BURN + anim_obj ANIM_OBJ_BURNED, 56, 88, $10 + anim_wait 4 + anim_loop 3, .loop + anim_wait 6 + anim_ret + +BattleAnim_Psn: + anim_1gfx ANIM_GFX_POISON + anim_sound 0, 0, SFX_POISON + anim_obj ANIM_OBJ_SKULL, 64, 56, $0 + anim_wait 8 + anim_sound 0, 0, SFX_POISON + anim_obj ANIM_OBJ_SKULL, 48, 56, $0 + anim_wait 8 + anim_ret + +BattleAnim_Sap: + anim_1gfx ANIM_GFX_CHARGE + anim_sound 6, 3, SFX_WATER_GUN + anim_obj ANIM_OBJ_ABSORB, 128, 48, $2 + anim_wait 6 + anim_sound 6, 3, SFX_WATER_GUN + anim_obj ANIM_OBJ_ABSORB, 136, 64, $3 + anim_wait 6 + anim_sound 6, 3, SFX_WATER_GUN + anim_obj ANIM_OBJ_ABSORB, 136, 32, $4 + anim_wait 16 + anim_ret + +BattleAnim_Frz: + anim_1gfx ANIM_GFX_ICE + anim_obj ANIM_OBJ_FROZEN, 44, 110, $0 + anim_sound 0, 0, SFX_SHINE + anim_wait 16 + anim_sound 0, 0, SFX_SHINE + anim_wait 16 + anim_ret + +BattleAnim_Par: + anim_1gfx ANIM_GFX_STATUS + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_sound 0, 0, SFX_THUNDERSHOCK + anim_obj ANIM_OBJ_PARALYZED, 20, 88, $42 + anim_obj ANIM_OBJ_PARALYZED, 76, 88, $c2 + anim_wait 128 + anim_ret + +BattleAnim_InLove: + anim_1gfx ANIM_GFX_OBJECTS + anim_sound 0, 0, SFX_LICK + anim_obj ANIM_OBJ_HEART, 64, 76, $0 + anim_wait 32 + anim_sound 0, 0, SFX_LICK + anim_obj ANIM_OBJ_HEART, 36, 72, $0 + anim_wait 32 + anim_ret + +BattleAnim_InSandstorm: + anim_1gfx ANIM_GFX_POWDER + anim_obj ANIM_OBJ_SANDSTORM, 88, 0, $0 + anim_wait 8 + anim_obj ANIM_OBJ_SANDSTORM, 72, 0, $1 + anim_wait 8 + anim_obj ANIM_OBJ_SANDSTORM, 56, 0, $2 +.loop + anim_sound 0, 1, SFX_MENU + anim_wait 8 + anim_loop 6, .loop + anim_wait 8 + anim_ret + +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 + +BattleAnim_InWhirlpool: + anim_1gfx ANIM_GFX_WIND + anim_bgeffect ANIM_BG_WHIRLPOOL, $0, $0, $0 + anim_sound 0, 1, SFX_SURF +.loop + anim_obj ANIM_OBJ_GUST, 132, 72, $0 + anim_wait 6 + anim_loop 6, .loop + anim_incbgeffect ANIM_BG_WHIRLPOOL + anim_wait 1 + anim_ret + +BattleAnim_HitConfusion: + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 0, SFX_POUND + anim_obj ANIM_OBJ_HIT, 44, 96, $0 + anim_wait 16 + anim_ret + +BattleAnim_Miss: + anim_ret + +BattleAnim_EnemyDamage: +.loop + anim_bgeffect ANIM_BG_HIDE_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 5 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 5 + anim_loop 3, .loop + anim_ret + +BattleAnim_EnemyStatDown: + anim_call BattleAnim_UserObj_1Row + anim_bgeffect ANIM_BG_VIBRATE_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 40 + anim_call BattleAnim_ShowMon_1 + anim_wait 1 + anim_ret + +BattleAnim_PlayerStatDown: + anim_call BattleAnim_UserObj_1Row + anim_bgeffect ANIM_BG_WOBBLE_PLAYER, $0, $0, $0 + anim_wait 40 + anim_call BattleAnim_ShowMon_1 + anim_wait 1 + anim_ret + +BattleAnim_PlayerDamage: + anim_bgeffect ANIM_BG_SHAKE_SCREEN_Y, $20, $2, $20 + anim_wait 40 + anim_ret + +BattleAnim_Wobble: + anim_bgeffect ANIM_BG_WOBBLE_SCREEN, $0, $0, $0 + anim_wait 40 + anim_ret + +BattleAnim_Shake: + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $20, $2, $40 + anim_wait 40 + anim_ret + +BattleAnim_Pound: + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 1, SFX_POUND + anim_obj ANIM_OBJ_PALM, 136, 56, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 16 + anim_ret + +BattleAnim_KarateChop: + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 1, SFX_KARATE_CHOP + anim_obj ANIM_OBJ_PALM, 136, 40, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 40, $0 + anim_wait 6 + anim_sound 0, 1, SFX_KARATE_CHOP + anim_obj ANIM_OBJ_PALM, 136, 44, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 44, $0 + anim_wait 6 + anim_sound 0, 1, SFX_KARATE_CHOP + anim_obj ANIM_OBJ_PALM, 136, 48, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 48, $0 + anim_wait 16 + anim_ret + +BattleAnim_Doubleslap: + anim_1gfx ANIM_GFX_HIT + anim_if_param_equal $1, .alternate + anim_sound 0, 1, SFX_DOUBLESLAP + anim_obj ANIM_OBJ_PALM, 144, 48, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 144, 48, $0 + anim_wait 8 + anim_ret + +.alternate: + anim_sound 0, 1, SFX_DOUBLESLAP + anim_obj ANIM_OBJ_PALM, 120, 48, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 120, 48, $0 + anim_wait 8 + anim_ret + +BattleAnim_CometPunch: + anim_1gfx ANIM_GFX_HIT + anim_if_param_equal $1, .alternate + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_PUNCH, 144, 48, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 144, 48, $0 + anim_wait 8 + anim_ret + +.alternate: + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_PUNCH, 120, 64, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 120, 64, $0 + anim_wait 8 + anim_ret + +BattleAnim_MegaPunch: + anim_1gfx ANIM_GFX_HIT + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $40, $2, $0 + anim_wait 48 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $3 +.loop + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_PUNCH, 136, 56, $0 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 56, $0 + anim_wait 6 + anim_obj ANIM_OBJ_PUNCH, 136, 56, $0 + anim_wait 6 + anim_loop 3, .loop + anim_ret + +BattleAnim_Stomp: + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 1, SFX_STOMP + anim_obj ANIM_OBJ_KICK, 136, 40, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 40, $0 + anim_wait 6 + anim_sound 0, 1, SFX_STOMP + anim_obj ANIM_OBJ_KICK, 136, 44, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 44, $0 + anim_wait 6 + anim_sound 0, 1, SFX_STOMP + anim_obj ANIM_OBJ_KICK, 136, 48, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 48, $0 + anim_wait 16 + anim_ret + +BattleAnim_DoubleKick: + anim_1gfx ANIM_GFX_HIT + anim_if_param_equal $1, .alternate + anim_sound 0, 1, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_KICK, 144, 48, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 144, 48, $0 + anim_wait 8 + anim_ret + +.alternate: + anim_sound 0, 1, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_KICK, 120, 64, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 120, 64, $0 + anim_wait 8 + anim_ret + +BattleAnim_JumpKick: + anim_1gfx ANIM_GFX_HIT + anim_if_param_equal $1, .alternate + anim_sound 0, 1, SFX_JUMP_KICK + anim_obj ANIM_OBJ_KICK, 112, 72, $0 + anim_obj ANIM_OBJ_KICK, 100, 60, $0 + anim_setobj $1, $2 + anim_setobj $2, $2 + anim_wait 24 + anim_sound 0, 1, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_HIT, 136, 48, $0 + anim_wait 16 + anim_ret + +.alternate: + anim_wait 8 + anim_sound 0, 0, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_HIT, 44, 88, $0 + anim_wait 16 + anim_ret + +BattleAnim_HiJumpKick: + anim_1gfx ANIM_GFX_HIT + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $40, $2, $0 + anim_if_param_equal $1, .alternate + anim_wait 32 + anim_sound 0, 1, SFX_JUMP_KICK + anim_obj ANIM_OBJ_KICK, 112, 72, $0 + anim_setobj $1, $2 + anim_wait 16 + anim_sound 0, 1, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_HIT, 136, 48, $0 + anim_wait 16 + anim_ret + +.alternate: + anim_wait 16 + anim_sound 0, 0, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_HIT, 44, 88, $0 + anim_wait 16 + anim_ret + +BattleAnim_RollingKick: + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 1, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_KICK, 112, 56, $0 + anim_setobj $1, $3 + anim_wait 12 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 48, $0 + anim_wait 16 + anim_ret + +BattleAnim_MegaKick: + anim_1gfx ANIM_GFX_HIT + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $40, $2, $0 + anim_wait 67 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $3 +.loop + anim_sound 0, 1, SFX_MEGA_KICK + anim_obj ANIM_OBJ_KICK, 136, 56, $0 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 56, $0 + anim_wait 6 + anim_obj ANIM_OBJ_KICK, 136, 56, $0 + anim_wait 6 + anim_loop 3, .loop + anim_ret + +BattleAnim_HyperFang: + anim_1gfx ANIM_GFX_HIT + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $20, $1, $0 + anim_sound 0, 1, SFX_BITE + anim_obj ANIM_OBJ_FANG, 136, 56, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 16 + anim_ret + +BattleAnim_SuperFang: + anim_1gfx ANIM_GFX_HIT + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $40, $2, $0 + anim_wait 48 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $3 +.loop + anim_sound 0, 1, SFX_BITE + anim_obj ANIM_OBJ_FANG, 136, 56, $0 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 56, $0 + anim_wait 6 + anim_obj ANIM_OBJ_FANG, 136, 56, $0 + anim_wait 6 + anim_loop 3, .loop + anim_ret + +BattleAnim_Ember: + anim_1gfx ANIM_GFX_FIRE + anim_sound 6, 2, SFX_EMBER + anim_obj ANIM_OBJ_EMBER, 64, 96, $12 + anim_wait 4 + anim_sound 6, 2, SFX_EMBER + anim_obj ANIM_OBJ_EMBER, 64, 100, $14 + anim_wait 4 + anim_sound 6, 2, SFX_EMBER + anim_obj ANIM_OBJ_EMBER, 64, 84, $13 + anim_wait 16 + anim_incobj 1 + anim_incobj 2 + anim_incobj 3 + anim_sound 0, 1, SFX_EMBER + anim_obj ANIM_OBJ_EMBER, 120, 68, $30 + anim_obj ANIM_OBJ_EMBER, 132, 68, $30 + anim_obj ANIM_OBJ_EMBER, 144, 68, $30 + anim_wait 32 + anim_ret + +BattleAnim_FirePunch: + anim_2gfx ANIM_GFX_HIT, ANIM_GFX_FIRE + anim_obj ANIM_OBJ_PUNCH_SHAKE, 136, 56, $43 + anim_call BattleAnimSub_Fire + anim_wait 16 + anim_ret + +BattleAnim_FireSpin: + anim_1gfx ANIM_GFX_FIRE +.loop + anim_sound 6, 2, SFX_EMBER + anim_obj ANIM_OBJ_FIRE_SPIN, 64, 88, $4 + anim_wait 2 + anim_sound 6, 2, SFX_EMBER + anim_obj ANIM_OBJ_FIRE_SPIN, 64, 96, $3 + anim_wait 2 + anim_sound 6, 2, SFX_EMBER + anim_obj ANIM_OBJ_FIRE_SPIN, 64, 88, $3 + anim_wait 2 + anim_sound 6, 2, SFX_EMBER + anim_obj ANIM_OBJ_FIRE_SPIN, 64, 96, $4 + anim_wait 2 + anim_loop 2, .loop + anim_wait 96 + anim_ret + +BattleAnim_DragonRage: + anim_1gfx ANIM_GFX_FIRE +.loop + anim_sound 6, 2, SFX_EMBER + anim_obj ANIM_OBJ_DRAGON_RAGE, 64, 92, $0 + anim_wait 3 + anim_loop 16, .loop + anim_wait 64 + anim_ret + +BattleAnim_Flamethrower: + anim_1gfx ANIM_GFX_FIRE + anim_sound 6, 2, SFX_EMBER + anim_obj ANIM_OBJ_FLAMETHROWER, 64, 92, $3 + anim_wait 2 + anim_obj ANIM_OBJ_FLAMETHROWER, 75, 86, $5 + anim_wait 2 + anim_obj ANIM_OBJ_FLAMETHROWER, 85, 81, $7 + anim_wait 2 + anim_obj ANIM_OBJ_FLAMETHROWER, 96, 76, $9 + anim_wait 2 + anim_obj ANIM_OBJ_FLAMETHROWER, 106, 71, $b + anim_wait 2 + anim_obj ANIM_OBJ_FLAMETHROWER, 116, 66, $c + anim_wait 2 + anim_obj ANIM_OBJ_FLAMETHROWER, 126, 61, $a + anim_wait 2 + anim_obj ANIM_OBJ_FLAMETHROWER, 136, 56, $8 + anim_wait 16 +.loop + anim_sound 0, 1, SFX_EMBER + anim_wait 16 + anim_loop 6, .loop + anim_wait 16 + anim_ret + +BattleAnim_FireBlast: + anim_1gfx ANIM_GFX_FIRE +.loop1 + anim_sound 6, 2, SFX_EMBER + anim_obj ANIM_OBJ_FIRE_BLAST, 64, 92, $7 + anim_wait 6 + anim_loop 10, .loop1 +.loop2 + anim_sound 0, 1, SFX_EMBER + anim_wait 8 + anim_loop 10, .loop2 + anim_incobj 1 + anim_incobj 2 + anim_incobj 3 + anim_incobj 4 + anim_incobj 5 + anim_incobj 6 + anim_incobj 7 + anim_incobj 8 + anim_incobj 9 + anim_incobj 10 + anim_wait 2 +.loop3 + anim_sound 0, 1, SFX_EMBER + anim_obj ANIM_OBJ_FIRE_BLAST, 136, 56, $1 + anim_obj ANIM_OBJ_FIRE_BLAST, 136, 56, $2 + anim_obj ANIM_OBJ_FIRE_BLAST, 136, 56, $3 + anim_obj ANIM_OBJ_FIRE_BLAST, 136, 56, $4 + anim_obj ANIM_OBJ_FIRE_BLAST, 136, 56, $5 + anim_wait 16 + anim_loop 2, .loop3 + anim_wait 32 + anim_ret + +BattleAnim_IcePunch: + anim_2gfx ANIM_GFX_HIT, ANIM_GFX_ICE + anim_obj ANIM_OBJ_PUNCH_SHAKE, 136, 56, $43 + anim_call BattleAnimSub_Ice + anim_wait 32 + anim_ret + +BattleAnim_IceBeam: + anim_1gfx ANIM_GFX_ICE +.loop + anim_sound 6, 2, SFX_SHINE + anim_obj ANIM_OBJ_ICE_BEAM, 64, 92, $4 + anim_wait 4 + anim_loop 5, .loop + anim_obj ANIM_OBJ_ICE_BUILDUP, 136, 74, $10 +.loop2 + anim_sound 6, 2, SFX_SHINE + anim_obj ANIM_OBJ_ICE_BEAM, 64, 92, $4 + anim_wait 4 + anim_loop 15, .loop2 + anim_wait 48 + anim_sound 0, 1, SFX_SHINE + anim_wait 8 + anim_sound 0, 1, SFX_SHINE + anim_wait 8 + anim_ret + +BattleAnim_Blizzard: + anim_1gfx ANIM_GFX_ICE +.loop + anim_sound 6, 2, SFX_SHINE + anim_obj ANIM_OBJ_BLIZZARD, 64, 88, $63 + anim_wait 2 + anim_sound 6, 2, SFX_SHINE + anim_obj ANIM_OBJ_BLIZZARD, 64, 80, $64 + anim_wait 2 + anim_sound 6, 2, SFX_SHINE + anim_obj ANIM_OBJ_BLIZZARD, 64, 96, $63 + anim_wait 2 + anim_loop 3, .loop + anim_bgeffect ANIM_BG_WHITE_HUES, $0, $8, $0 + anim_wait 32 + anim_obj ANIM_OBJ_ICE_BUILDUP, 136, 74, $10 + anim_wait 128 + anim_sound 0, 1, SFX_SHINE + anim_wait 8 + anim_sound 0, 1, SFX_SHINE + anim_wait 24 + anim_ret + +BattleAnim_Bubble: + anim_1gfx ANIM_GFX_BUBBLE + anim_sound 32, 2, SFX_WATER_GUN + anim_obj ANIM_OBJ_BUBBLE, 64, 92, $c1 + anim_wait 6 + anim_sound 32, 2, SFX_WATER_GUN + anim_obj ANIM_OBJ_BUBBLE, 64, 92, $e1 + anim_wait 6 + anim_sound 32, 2, SFX_WATER_GUN + anim_obj ANIM_OBJ_BUBBLE, 64, 92, $d1 + anim_wait 128 + anim_wait 32 + anim_ret + +BattleAnim_Bubblebeam: + anim_1gfx ANIM_GFX_BUBBLE +.loop + anim_sound 16, 2, SFX_BUBBLEBEAM + anim_obj ANIM_OBJ_BUBBLE, 64, 92, $92 + anim_wait 6 + anim_sound 16, 2, SFX_BUBBLEBEAM + anim_obj ANIM_OBJ_BUBBLE, 64, 92, $b3 + anim_wait 6 + anim_sound 16, 2, SFX_BUBBLEBEAM + anim_obj ANIM_OBJ_BUBBLE, 64, 92, $f4 + anim_wait 8 + anim_loop 3, .loop + anim_wait 64 + anim_clearobjs + anim_bgeffect ANIM_BG_START_WATER, $0, BG_EFFECT_TARGET, $0 + anim_wait 1 + anim_call BattleAnim_UserObj_2Row + anim_bgeffect ANIM_BG_WATER, $1c, $0, $0 + anim_wait 19 + anim_call BattleAnim_ShowMon_1 + anim_bgeffect ANIM_BG_END_WATER, $0, $0, $0 + anim_wait 8 + anim_ret + +BattleAnim_WaterGun: + anim_bgeffect ANIM_BG_START_WATER, $0, BG_EFFECT_TARGET, $0 + anim_1gfx ANIM_GFX_WATER + anim_call BattleAnim_UserObj_2Row + anim_sound 16, 2, SFX_WATER_GUN + anim_obj ANIM_OBJ_WATER_GUN, 64, 88, $0 + anim_wait 8 + anim_obj ANIM_OBJ_WATER_GUN, 64, 76, $0 + anim_wait 8 + anim_obj ANIM_OBJ_WATER_GUN, 64, 82, $0 + anim_wait 24 + anim_bgeffect ANIM_BG_WATER, $1c, $0, $0 + anim_wait 8 + anim_bgeffect ANIM_BG_WATER, $8, $0, $0 + anim_wait 8 + anim_bgeffect ANIM_BG_WATER, $30, $0, $0 + anim_wait 32 + anim_call BattleAnim_ShowMon_1 + anim_bgeffect ANIM_BG_END_WATER, $0, $0, $0 + anim_wait 16 + anim_ret + +BattleAnim_HydroPump: + anim_bgeffect ANIM_BG_START_WATER, $0, BG_EFFECT_TARGET, $0 + anim_1gfx ANIM_GFX_WATER + anim_call BattleAnim_UserObj_2Row + anim_sound 0, 1, SFX_HYDRO_PUMP + anim_obj ANIM_OBJ_HYDRO_PUMP, 108, 72, $0 + anim_bgeffect ANIM_BG_WATER, $1c, $0, $0 + anim_wait 8 + anim_sound 0, 1, SFX_HYDRO_PUMP + anim_obj ANIM_OBJ_HYDRO_PUMP, 116, 72, $0 + anim_bgeffect ANIM_BG_WATER, $8, $0, $0 + anim_wait 8 + anim_sound 0, 1, SFX_HYDRO_PUMP + anim_obj ANIM_OBJ_HYDRO_PUMP, 124, 72, $0 + anim_bgeffect ANIM_BG_WATER, $30, $0, $0 + anim_wait 8 + anim_sound 0, 1, SFX_HYDRO_PUMP + anim_obj ANIM_OBJ_HYDRO_PUMP, 132, 72, $0 + anim_bgeffect ANIM_BG_WATER, $1c, $0, $0 + anim_wait 8 + anim_sound 0, 1, SFX_HYDRO_PUMP + anim_obj ANIM_OBJ_HYDRO_PUMP, 140, 72, $0 + anim_bgeffect ANIM_BG_WATER, $8, $0, $0 + anim_wait 8 + anim_sound 0, 1, SFX_HYDRO_PUMP + anim_obj ANIM_OBJ_HYDRO_PUMP, 148, 72, $0 + anim_bgeffect ANIM_BG_WATER, $30, $0, $0 + anim_wait 8 + anim_sound 0, 1, SFX_HYDRO_PUMP + anim_obj ANIM_OBJ_HYDRO_PUMP, 156, 72, $0 + anim_bgeffect ANIM_BG_WATER, $1c, $0, $0 + anim_wait 32 + anim_call BattleAnim_ShowMon_1 + anim_bgeffect ANIM_BG_END_WATER, $0, $0, $0 + anim_wait 16 + anim_ret + +BattleAnim_Surf: + anim_1gfx ANIM_GFX_BUBBLE + anim_bgeffect ANIM_BG_SURF, $0, $0, $0 + anim_obj ANIM_OBJ_SURF, 88, 104, $8 +.loop + anim_sound 0, 1, SFX_SURF + anim_wait 32 + anim_loop 4, .loop + anim_incobj 1 + anim_wait 56 + anim_ret + +BattleAnim_VineWhip: + anim_1gfx ANIM_GFX_WHIP + anim_sound 0, 1, SFX_VINE_WHIP + anim_obj ANIM_OBJ_VINE_WHIP2, 116, 52, $80 + anim_wait 4 + anim_sound 0, 1, SFX_VINE_WHIP + anim_obj ANIM_OBJ_VINE_WHIP1, 128, 60, $0 + anim_wait 4 + anim_incobj 1 + anim_wait 4 + anim_ret + +BattleAnim_LeechSeed: + anim_1gfx ANIM_GFX_PLANT + anim_sound 16, 2, SFX_VINE_WHIP + anim_obj ANIM_OBJ_LEECH_SEED, 48, 80, $20 + anim_wait 8 + anim_sound 16, 2, SFX_VINE_WHIP + anim_obj ANIM_OBJ_LEECH_SEED, 48, 80, $30 + anim_wait 8 + anim_sound 16, 2, SFX_VINE_WHIP + anim_obj ANIM_OBJ_LEECH_SEED, 48, 80, $28 + anim_wait 32 + anim_sound 0, 1, SFX_CHARGE + anim_wait 128 + anim_ret + +BattleAnim_RazorLeaf: + anim_1gfx ANIM_GFX_PLANT + anim_sound 0, 0, SFX_VINE_WHIP + anim_obj ANIM_OBJ_RAZOR_LEAF, 48, 80, $28 + anim_obj ANIM_OBJ_RAZOR_LEAF, 48, 80, $5c + anim_obj ANIM_OBJ_RAZOR_LEAF, 48, 80, $10 + anim_obj ANIM_OBJ_RAZOR_LEAF, 48, 80, $e8 + anim_obj ANIM_OBJ_RAZOR_LEAF, 48, 80, $9c + anim_obj ANIM_OBJ_RAZOR_LEAF, 48, 80, $d0 + anim_wait 6 + anim_obj ANIM_OBJ_RAZOR_LEAF, 48, 80, $1c + anim_obj ANIM_OBJ_RAZOR_LEAF, 48, 80, $50 + anim_obj ANIM_OBJ_RAZOR_LEAF, 48, 80, $dc + anim_obj ANIM_OBJ_RAZOR_LEAF, 48, 80, $90 + anim_wait 80 + anim_sound 16, 2, SFX_VINE_WHIP + anim_incobj 3 + anim_wait 2 + anim_sound 16, 2, SFX_VINE_WHIP + anim_incobj 5 + anim_wait 2 + anim_sound 16, 2, SFX_VINE_WHIP + anim_incobj 7 + anim_wait 2 + anim_sound 16, 2, SFX_VINE_WHIP + anim_incobj 9 + anim_wait 2 + anim_sound 16, 2, SFX_VINE_WHIP + anim_incobj 1 + anim_wait 2 + anim_sound 16, 2, SFX_VINE_WHIP + anim_incobj 2 + anim_wait 2 + anim_sound 16, 2, SFX_VINE_WHIP + anim_incobj 4 + anim_wait 2 + anim_sound 16, 2, SFX_VINE_WHIP + anim_incobj 6 + anim_wait 2 + anim_sound 16, 2, SFX_VINE_WHIP + anim_incobj 8 + anim_wait 2 + anim_sound 16, 2, SFX_VINE_WHIP + anim_incobj 10 + anim_wait 64 + anim_ret + +BattleAnim_Solarbeam: + anim_if_param_equal $0, .FireSolarBeam + ; charge turn + anim_1gfx ANIM_GFX_CHARGE + anim_sound 0, 0, SFX_CHARGE + anim_obj ANIM_OBJ_ABSORB_CENTER, 48, 84, $0 + anim_obj ANIM_OBJ_SOLAR_BEAM_CHARGE, 48, 84, $0 + anim_obj ANIM_OBJ_SOLAR_BEAM_CHARGE, 48, 84, $8 + anim_obj ANIM_OBJ_SOLAR_BEAM_CHARGE, 48, 84, $10 + anim_obj ANIM_OBJ_SOLAR_BEAM_CHARGE, 48, 84, $18 + anim_obj ANIM_OBJ_SOLAR_BEAM_CHARGE, 48, 84, $20 + anim_obj ANIM_OBJ_SOLAR_BEAM_CHARGE, 48, 84, $28 + anim_obj ANIM_OBJ_SOLAR_BEAM_CHARGE, 48, 84, $30 + anim_obj ANIM_OBJ_SOLAR_BEAM_CHARGE, 48, 84, $38 + anim_wait 104 + anim_bgeffect ANIM_BG_FLASH_WHITE, $0, $4, $2 + anim_wait 64 + anim_ret + +.FireSolarBeam + anim_1gfx ANIM_GFX_BEAM + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_call BattleAnimSub_Beam + anim_wait 48 + anim_ret + +BattleAnim_Thunderpunch: + anim_2gfx ANIM_GFX_HIT, ANIM_GFX_LIGHTNING + anim_obj ANIM_OBJ_PUNCH_SHAKE, 136, 56, $43 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $2 + anim_sound 0, 1, SFX_THUNDER + anim_obj ANIM_OBJ_THUNDER3, 152, 68, $0 + anim_wait 64 + anim_ret + +BattleAnim_Thundershock: + anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_EXPLOSION + anim_obj ANIM_OBJ_THUNDERSHOCK_BALL, 136, 56, $2 + anim_wait 16 + anim_sound 0, 1, SFX_THUNDERSHOCK + anim_obj ANIM_OBJ_SPARKS_CIRCLE, 136, 56, $0 + anim_wait 96 + anim_ret + +BattleAnim_Thunderbolt: + anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_EXPLOSION + anim_obj ANIM_OBJ_THUNDERBOLT_BALL, 136, 56, $2 + anim_wait 16 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 + anim_sound 0, 1, SFX_THUNDERSHOCK + anim_obj ANIM_OBJ_SPARKS_CIRCLE_BIG, 136, 56, $0 + anim_wait 64 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 + anim_wait 64 + anim_ret + +BattleAnim_ThunderWave: + anim_1gfx ANIM_GFX_LIGHTNING + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $3 + anim_sound 0, 1, SFX_THUNDERSHOCK + anim_obj ANIM_OBJ_THUNDER_WAVE, 136, 56, $0 + anim_wait 20 + anim_bgp $1b + anim_incobj 1 + anim_wait 96 + anim_ret + +BattleAnim_Thunder: + anim_1gfx ANIM_GFX_LIGHTNING + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $6, $20 + anim_sound 0, 1, SFX_THUNDER + anim_obj ANIM_OBJ_THUNDER2, 120, 68, $0 + anim_wait 16 + anim_sound 0, 1, SFX_THUNDER + anim_obj ANIM_OBJ_THUNDER3, 152, 68, $0 + anim_wait 16 + anim_sound 0, 1, SFX_THUNDER + anim_obj ANIM_OBJ_THUNDER1, 136, 68, $0 + anim_wait 48 + anim_ret + +BattleAnim_RazorWind: + anim_if_param_equal $1, BattleAnim_FocusEnergy + anim_1gfx ANIM_GFX_WHIP + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $1, $0 +.loop + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 + anim_sound 0, 1, SFX_RAZOR_WIND + anim_obj ANIM_OBJ_RAZOR_WIND2, 152, 40, $3 + anim_wait 4 + anim_sound 0, 1, SFX_RAZOR_WIND + anim_obj ANIM_OBJ_RAZOR_WIND2, 136, 56, $3 + anim_wait 4 + anim_sound 0, 1, SFX_RAZOR_WIND + anim_obj ANIM_OBJ_RAZOR_WIND2, 152, 64, $3 + anim_wait 4 + anim_sound 0, 1, SFX_RAZOR_WIND + anim_obj ANIM_OBJ_RAZOR_WIND1, 120, 40, $83 + anim_wait 4 + anim_sound 0, 1, SFX_RAZOR_WIND + anim_obj ANIM_OBJ_RAZOR_WIND1, 120, 64, $83 + anim_wait 4 + anim_loop 3, .loop + anim_wait 24 + anim_ret + +BattleAnim_Sonicboom_JP: ; unreferenced + anim_2gfx ANIM_GFX_WHIP, ANIM_GFX_HIT +.loop + anim_sound 3, 0, SFX_RAZOR_WIND + anim_obj ANIM_OBJ_SONICBOOM_JP, 64, 80, $3 + anim_wait 8 + anim_sound 3, 0, SFX_RAZOR_WIND + anim_obj ANIM_OBJ_SONICBOOM_JP, 64, 88, $2 + anim_wait 8 + anim_sound 3, 0, SFX_RAZOR_WIND + anim_obj ANIM_OBJ_SONICBOOM_JP, 64, 96, $4 + anim_wait 8 + anim_loop 2, .loop + anim_wait 32 + anim_incobj 1 + anim_incobj 2 + anim_incobj 3 + anim_incobj 4 + anim_incobj 5 + anim_incobj 6 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 16 + anim_ret + +BattleAnim_Gust: +BattleAnim_Sonicboom: + anim_2gfx ANIM_GFX_WIND, ANIM_GFX_HIT +.loop + anim_sound 0, 1, SFX_RAZOR_WIND + anim_obj ANIM_OBJ_GUST, 136, 72, $0 + anim_wait 6 + anim_loop 9, .loop + anim_obj ANIM_OBJ_HIT_YFIX, 144, 64, $18 + anim_wait 8 + anim_obj ANIM_OBJ_HIT_YFIX, 128, 32, $18 + anim_wait 16 + anim_ret + +BattleAnim_Selfdestruct: + anim_1gfx ANIM_GFX_EXPLOSION + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $24 + anim_if_param_equal $1, .loop + anim_call BattleAnimSub_Explosion2 + anim_wait 16 + anim_ret + +.loop + anim_call BattleAnimSub_Explosion1 + anim_wait 5 + anim_bgeffect ANIM_BG_HIDE_MON, $0, BG_EFFECT_USER, $0 + anim_loop 2, .loop + anim_wait 16 + anim_ret + +BattleAnim_Explosion: + anim_1gfx ANIM_GFX_EXPLOSION + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $60, $4, $10 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $24 + anim_if_param_equal $1, .loop + anim_call BattleAnimSub_Explosion2 + anim_wait 16 + anim_ret + +.loop + anim_call BattleAnimSub_Explosion1 + anim_wait 5 + anim_bgeffect ANIM_BG_HIDE_MON, $0, BG_EFFECT_USER, $0 + anim_loop 2, .loop + anim_wait 16 + anim_ret + +BattleAnim_Acid: + anim_1gfx ANIM_GFX_POISON + anim_call BattleAnimSub_Acid + anim_wait 64 + anim_ret + +BattleAnim_RockThrow: + anim_1gfx ANIM_GFX_ROCKS + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $60, $1, $0 + anim_sound 0, 1, SFX_STRENGTH + anim_obj ANIM_OBJ_SMALL_ROCK, 128, 64, $40 + anim_wait 2 + anim_sound 0, 1, SFX_STRENGTH + anim_obj ANIM_OBJ_BIG_ROCK, 120, 68, $30 + anim_wait 2 + anim_sound 0, 1, SFX_STRENGTH + anim_obj ANIM_OBJ_SMALL_ROCK, 152, 68, $30 + anim_wait 2 + anim_sound 0, 1, SFX_STRENGTH + anim_obj ANIM_OBJ_BIG_ROCK, 144, 64, $40 + anim_wait 2 + anim_sound 0, 1, SFX_STRENGTH + anim_obj ANIM_OBJ_SMALL_ROCK, 136, 68, $30 + anim_wait 96 + anim_ret + +BattleAnim_RockSlide: + anim_1gfx ANIM_GFX_ROCKS + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $c0, $1, $0 +.loop + anim_sound 0, 1, SFX_STRENGTH + anim_obj ANIM_OBJ_SMALL_ROCK, 128, 64, $40 + anim_wait 4 + anim_sound 0, 1, SFX_STRENGTH + anim_obj ANIM_OBJ_BIG_ROCK, 120, 68, $30 + anim_wait 4 + anim_sound 0, 1, SFX_STRENGTH + anim_obj ANIM_OBJ_SMALL_ROCK, 152, 68, $30 + anim_wait 4 + anim_sound 0, 1, SFX_STRENGTH + anim_obj ANIM_OBJ_BIG_ROCK, 144, 64, $40 + anim_wait 4 + anim_sound 0, 1, SFX_STRENGTH + anim_obj ANIM_OBJ_SMALL_ROCK, 136, 68, $30 + anim_wait 16 + anim_loop 4, .loop + anim_wait 96 + anim_ret + +BattleAnim_Sing: + anim_1gfx ANIM_GFX_NOISE + anim_sound 16, 2, SFX_SING +.loop + anim_obj ANIM_OBJ_SING, 64, 92, $0 + anim_wait 8 + anim_obj ANIM_OBJ_SING, 64, 92, $1 + anim_wait 8 + anim_obj ANIM_OBJ_SING, 64, 92, $2 + anim_wait 8 + anim_obj ANIM_OBJ_SING, 64, 92, $0 + anim_wait 8 + anim_obj ANIM_OBJ_SING, 64, 92, $2 + anim_wait 8 + anim_loop 4, .loop + anim_wait 64 + anim_ret + +BattleAnim_Poisonpowder: +BattleAnim_SleepPowder: +BattleAnim_Spore: +BattleAnim_StunSpore: + anim_1gfx ANIM_GFX_POWDER +.loop + anim_sound 0, 1, SFX_POWDER + anim_obj ANIM_OBJ_POWDER, 104, 16, $0 + anim_wait 4 + anim_sound 0, 1, SFX_POWDER + anim_obj ANIM_OBJ_POWDER, 136, 16, $0 + anim_wait 4 + anim_sound 0, 1, SFX_POWDER + anim_obj ANIM_OBJ_POWDER, 112, 16, $0 + anim_wait 4 + anim_sound 0, 1, SFX_POWDER + anim_obj ANIM_OBJ_POWDER, 128, 16, $0 + anim_wait 4 + anim_sound 0, 1, SFX_POWDER + anim_obj ANIM_OBJ_POWDER, 120, 16, $0 + anim_wait 4 + anim_loop 2, .loop + anim_wait 96 + anim_ret + +BattleAnim_HyperBeam: + anim_1gfx ANIM_GFX_BEAM + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $30, $4, $10 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $40 + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_call BattleAnimSub_Beam + anim_wait 48 + anim_ret + +BattleAnim_AuroraBeam: + anim_1gfx ANIM_GFX_BEAM + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 + anim_wait 64 + anim_call BattleAnimSub_Beam + anim_wait 48 + anim_incobj 5 + anim_wait 64 + anim_ret + +BattleAnim_Vicegrip: + anim_1gfx ANIM_GFX_CUT + anim_sound 0, 1, SFX_VICEGRIP + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 152, 40, $0 + anim_obj ANIM_OBJ_CUT_UP_RIGHT, 120, 72, $0 + anim_wait 32 + anim_ret + +BattleAnim_Scratch: + anim_1gfx ANIM_GFX_CUT + anim_sound 0, 1, SFX_SCRATCH + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 144, 48, $0 + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 140, 44, $0 + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 136, 40, $0 + anim_wait 32 + anim_ret + +BattleAnim_FurySwipes: + anim_1gfx ANIM_GFX_CUT + anim_if_param_equal $1, .alternate + anim_sound 0, 1, SFX_SCRATCH + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 144, 48, $0 + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 140, 44, $0 + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 136, 40, $0 + anim_sound 0, 1, SFX_SCRATCH + anim_wait 32 + anim_ret + +.alternate: + anim_sound 0, 1, SFX_SCRATCH + anim_obj ANIM_OBJ_CUT_DOWN_RIGHT, 120, 48, $0 + anim_obj ANIM_OBJ_CUT_DOWN_RIGHT, 124, 44, $0 + anim_obj ANIM_OBJ_CUT_DOWN_RIGHT, 128, 40, $0 + anim_sound 0, 1, SFX_SCRATCH + anim_wait 32 + anim_ret + +BattleAnim_Cut: + anim_1gfx ANIM_GFX_CUT + anim_sound 0, 1, SFX_CUT + anim_obj ANIM_OBJ_CUT_LONG_DOWN_LEFT, 152, 40, $0 + anim_wait 32 + anim_ret + +BattleAnim_Slash: + anim_1gfx ANIM_GFX_CUT + anim_sound 0, 1, SFX_CUT + anim_obj ANIM_OBJ_CUT_LONG_DOWN_LEFT, 152, 40, $0 + anim_obj ANIM_OBJ_CUT_LONG_DOWN_LEFT, 148, 36, $0 + anim_wait 32 + anim_ret + +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 + anim_wait 16 + anim_sound 0, 1, SFX_BITE + anim_obj ANIM_OBJ_HIT_YFIX, 144, 48, $18 + anim_wait 32 + anim_sound 0, 1, SFX_BITE + anim_obj ANIM_OBJ_HIT_YFIX, 128, 64, $18 + anim_wait 16 + anim_ret + +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 + anim_wait 8 + anim_sound 0, 1, SFX_BITE + anim_obj ANIM_OBJ_HIT_YFIX, 144, 48, $18 + anim_wait 16 + anim_sound 0, 1, SFX_BITE + anim_obj ANIM_OBJ_HIT_YFIX, 128, 64, $18 + anim_wait 8 + anim_ret + +BattleAnim_Teleport: + anim_1gfx ANIM_GFX_SPEED + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_TELEPORT, $0, BG_EFFECT_USER, $0 + anim_wait 32 + anim_bgeffect ANIM_BG_HIDE_MON, $0, BG_EFFECT_USER, $0 + anim_wait 3 + anim_incbgeffect ANIM_BG_TELEPORT + anim_call BattleAnim_ShowMon_0 + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $1, $0 + anim_call BattleAnimSub_WarpAway + anim_wait 64 + anim_ret + +BattleAnim_Fly: + anim_if_param_equal $1, .turn1 + anim_if_param_equal $2, .miss + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 1, SFX_WING_ATTACK + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 32 +.miss: + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_USER, $0 + anim_wait 32 + anim_ret + +.turn1: + anim_1gfx ANIM_GFX_SPEED + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $1, $0 + anim_bgeffect ANIM_BG_HIDE_MON, $0, BG_EFFECT_USER, $0 + anim_call BattleAnimSub_WarpAway + anim_wait 64 + anim_ret + +BattleAnim_DoubleTeam: + anim_call BattleAnim_TargetObj_2Row + anim_sound 0, 0, SFX_PSYBEAM + anim_bgeffect ANIM_BG_DOUBLE_TEAM, $0, BG_EFFECT_USER, $0 + anim_wait 96 + anim_incbgeffect ANIM_BG_DOUBLE_TEAM + anim_wait 24 + anim_incbgeffect ANIM_BG_DOUBLE_TEAM + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Recover: + anim_1gfx ANIM_GFX_BUBBLE + anim_call BattleAnim_TargetObj_1Row + anim_sound 0, 0, SFX_FULL_HEAL + anim_bgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING, $0, BG_EFFECT_USER, $40 + anim_obj ANIM_OBJ_RECOVER, 44, 88, $30 + anim_obj ANIM_OBJ_RECOVER, 44, 88, $31 + anim_obj ANIM_OBJ_RECOVER, 44, 88, $32 + anim_obj ANIM_OBJ_RECOVER, 44, 88, $33 + anim_obj ANIM_OBJ_RECOVER, 44, 88, $34 + anim_obj ANIM_OBJ_RECOVER, 44, 88, $35 + anim_obj ANIM_OBJ_RECOVER, 44, 88, $36 + anim_obj ANIM_OBJ_RECOVER, 44, 88, $37 + anim_wait 64 + anim_incbgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Absorb: + anim_1gfx ANIM_GFX_CHARGE + anim_obj ANIM_OBJ_ABSORB_CENTER, 44, 88, $0 +.loop + anim_sound 6, 3, SFX_WATER_GUN + anim_obj ANIM_OBJ_ABSORB, 128, 48, $2 + anim_wait 6 + anim_sound 6, 3, SFX_WATER_GUN + anim_obj ANIM_OBJ_ABSORB, 136, 64, $3 + anim_wait 6 + anim_sound 6, 3, SFX_WATER_GUN + anim_obj ANIM_OBJ_ABSORB, 136, 32, $4 + anim_wait 6 + anim_loop 5, .loop + anim_wait 32 + anim_ret + +BattleAnim_MegaDrain: + anim_1gfx ANIM_GFX_CHARGE + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_FADE_MONS_TO_BLACK_REPEATING, $0, BG_EFFECT_TARGET, $10 + anim_setvar $0 +.loop + anim_sound 6, 3, SFX_WATER_GUN + anim_obj ANIM_OBJ_ABSORB, 128, 48, $2 + anim_wait 6 + anim_sound 6, 3, SFX_WATER_GUN + anim_obj ANIM_OBJ_ABSORB, 136, 64, $3 + anim_wait 6 + anim_sound 6, 3, SFX_WATER_GUN + anim_obj ANIM_OBJ_ABSORB, 136, 32, $4 + anim_wait 6 + anim_incvar + anim_if_var_equal $7, .done + anim_if_var_equal $2, .spawn + anim_jump .loop + +.spawn + anim_obj ANIM_OBJ_ABSORB_CENTER, 44, 88, $0 + anim_jump .loop + +.done + anim_wait 32 + anim_incbgeffect ANIM_BG_FADE_MONS_TO_BLACK_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_ret + +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 + anim_wait 128 + anim_wait 96 + anim_incobj 1 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $3 + anim_sound 0, 1, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION2, 128, 64, $0 + anim_wait 8 + anim_sound 0, 1, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION2, 144, 68, $0 + anim_wait 8 + anim_sound 0, 1, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION2, 136, 72, $0 + anim_wait 24 + anim_ret + +BattleAnim_Softboiled: + anim_2gfx ANIM_GFX_EGG, ANIM_GFX_BUBBLE + anim_call BattleAnim_TargetObj_1Row + anim_sound 0, 0, SFX_SWITCH_POKEMON + anim_obj ANIM_OBJ_EGG, 44, 104, $6 + anim_wait 128 + anim_incobj 2 + anim_obj ANIM_OBJ_EGG, 76, 104, $b + anim_wait 16 + anim_bgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING, $0, BG_EFFECT_USER, $40 + anim_sound 0, 0, SFX_METRONOME +.loop + anim_obj ANIM_OBJ_RECOVER, 44, 88, $20 + anim_wait 8 + anim_loop 8, .loop + anim_wait 128 + anim_incbgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_FocusEnergy: + anim_1gfx ANIM_GFX_SPEED + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_FADE_MON_TO_LIGHT, $0, BG_EFFECT_USER, $40 + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 +.loop + anim_sound 0, 0, SFX_SWORDS_DANCE + anim_obj ANIM_OBJ_FOCUS, 44, 108, $6 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 36, 108, $6 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 52, 108, $8 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 28, 108, $8 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 60, 108, $6 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 20, 108, $8 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 68, 108, $8 + anim_wait 2 + anim_loop 3, .loop + anim_wait 8 + anim_incbgeffect ANIM_BG_FADE_MON_TO_LIGHT + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Bide: + anim_if_param_equal $0, BattleAnim_MegaPunch + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_1Row + anim_sound 0, 0, SFX_ESCAPE_ROPE + anim_bgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING, $0, BG_EFFECT_USER, $20 + anim_wait 72 + anim_incbgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Bind: + anim_1gfx ANIM_GFX_ROPE + anim_sound 0, 1, SFX_BIND + anim_obj ANIM_OBJ_BIND1, 132, 64, $0 + anim_wait 8 + anim_obj ANIM_OBJ_BIND2, 132, 56, $0 + anim_wait 8 + anim_obj ANIM_OBJ_BIND1, 132, 48, $0 + anim_wait 64 + anim_sound 0, 1, SFX_BIND + anim_incobj 1 + anim_incobj 2 + anim_incobj 3 + anim_wait 96 + anim_ret + +BattleAnim_Wrap: + anim_1gfx ANIM_GFX_ROPE + anim_sound 0, 1, SFX_BIND + anim_obj ANIM_OBJ_BIND1, 132, 64, $0 + anim_wait 8 + anim_obj ANIM_OBJ_BIND1, 132, 56, $0 + anim_wait 8 + anim_obj ANIM_OBJ_BIND1, 132, 48, $0 + anim_wait 64 + anim_sound 0, 1, SFX_BIND + anim_incobj 1 + anim_incobj 2 + anim_incobj 3 + anim_wait 96 + anim_ret + +BattleAnim_Confusion: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_UserObj_2Row + anim_sound 0, 1, SFX_PSYCHIC + anim_bgeffect ANIM_BG_NIGHT_SHADE, $0, BG_EFFECT_TARGET, $8 + anim_wait 128 + anim_incbgeffect ANIM_BG_NIGHT_SHADE + anim_call BattleAnim_ShowMon_1 + anim_ret + +BattleAnim_Constrict: + anim_1gfx ANIM_GFX_ROPE + anim_sound 0, 1, SFX_BIND + anim_obj ANIM_OBJ_BIND2, 132, 64, $0 + anim_wait 8 + anim_obj ANIM_OBJ_BIND1, 132, 48, $0 + anim_wait 8 + anim_obj ANIM_OBJ_BIND2, 132, 40, $0 + anim_wait 8 + anim_obj ANIM_OBJ_BIND1, 132, 56, $0 + anim_wait 64 + anim_ret + +BattleAnim_Earthquake: + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $60, $4, $10 +.loop + anim_sound 0, 1, SFX_EMBER + anim_wait 24 + anim_loop 4, .loop + anim_ret + +BattleAnim_Fissure: + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $40 + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $60, $4, $0 +.loop + anim_sound 0, 1, SFX_EMBER + anim_wait 24 + anim_loop 4, .loop + anim_ret + +BattleAnim_Growl: + anim_1gfx ANIM_GFX_NOISE + anim_battlergfx_2row + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_cry $0 +.loop + anim_call BattleAnimSub_Sound + anim_wait 16 + anim_loop 3, .loop + anim_wait 9 + anim_bgeffect ANIM_BG_BATTLEROBJ_1ROW, $0, BG_EFFECT_USER, $0 + anim_wait 8 + anim_bgeffect ANIM_BG_FADE_MON_TO_BLACK_REPEATING, $0, BG_EFFECT_TARGET, $40 + anim_wait 64 + anim_incbgeffect ANIM_BG_FADE_MON_TO_BLACK_REPEATING + anim_wait 1 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_USER, $0 + anim_wait 5 + anim_incobj 10 + anim_wait 8 + anim_ret + +BattleAnim_Roar: + anim_1gfx ANIM_GFX_NOISE + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_cry $1 +.loop + anim_call BattleAnimSub_Sound + anim_wait 16 + anim_loop 3, .loop + anim_wait 16 + anim_if_param_equal $0, .done + anim_bgeffect ANIM_BG_REMOVE_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 64 +.done + anim_ret + +BattleAnim_Supersonic: + anim_1gfx ANIM_GFX_PSYCHIC +.loop + anim_sound 6, 2, SFX_SUPERSONIC + anim_obj ANIM_OBJ_WAVE, 64, 88, $2 + anim_wait 4 + anim_loop 10, .loop + anim_wait 64 + anim_ret + +BattleAnim_Screech: + anim_1gfx ANIM_GFX_PSYCHIC + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $8, $1, $20 + anim_sound 6, 2, SFX_SCREECH +.loop + anim_obj ANIM_OBJ_WAVE, 64, 88, $2 + anim_wait 2 + anim_loop 2, .loop + anim_wait 64 + anim_ret + +BattleAnim_ConfuseRay: + anim_1gfx ANIM_GFX_SPEED + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_bgeffect ANIM_BG_CYCLE_BGPALS_INVERTED, $0, $4, $0 + anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $0 + anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $80 + anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $88 + anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $90 + anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $98 + anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $a0 + anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $a8 + anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $b0 + anim_obj ANIM_OBJ_CONFUSE_RAY, 64, 88, $b8 +.loop + anim_sound 6, 2, SFX_WHIRLWIND + anim_wait 16 + anim_loop 8, .loop + anim_wait 32 + anim_ret + +BattleAnim_Leer: + anim_1gfx ANIM_GFX_BEAM + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_call BattleAnimSub_EyeBeams + anim_wait 16 + anim_ret + +BattleAnim_Reflect: + anim_1gfx ANIM_GFX_REFLECT + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SCREEN, 72, 80, $0 + anim_wait 24 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SCREEN, 72, 80, $0 + anim_wait 64 + anim_ret + +BattleAnim_LightScreen: + anim_2gfx ANIM_GFX_SPEED, ANIM_GFX_REFLECT + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_sound 0, 0, SFX_FLASH + anim_obj ANIM_OBJ_SCREEN, 72, 80, $0 + anim_wait 4 + anim_obj ANIM_OBJ_SHINY, 72, 80, $0 + anim_wait 4 + anim_obj ANIM_OBJ_SHINY, 72, 80, $8 + anim_wait 4 + anim_obj ANIM_OBJ_SHINY, 72, 80, $10 + anim_wait 4 + anim_obj ANIM_OBJ_SHINY, 72, 80, $18 + anim_wait 4 + anim_obj ANIM_OBJ_SCREEN, 72, 80, $0 + anim_obj ANIM_OBJ_SHINY, 72, 80, $20 + anim_wait 4 + anim_obj ANIM_OBJ_SHINY, 72, 80, $28 + anim_wait 4 + anim_obj ANIM_OBJ_SHINY, 72, 80, $30 + anim_wait 4 + anim_obj ANIM_OBJ_SHINY, 72, 80, $38 + anim_wait 64 + anim_ret + +BattleAnim_Amnesia: + anim_1gfx ANIM_GFX_STATUS + anim_sound 0, 0, SFX_LICK + anim_obj ANIM_OBJ_AMNESIA, 64, 80, $2 + anim_wait 16 + anim_obj ANIM_OBJ_AMNESIA, 68, 80, $1 + anim_wait 16 + anim_obj ANIM_OBJ_AMNESIA, 72, 80, $0 + anim_wait 64 + anim_ret + +BattleAnim_DizzyPunch: + anim_2gfx ANIM_GFX_STATUS, ANIM_GFX_HIT + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 40, $0 + anim_obj ANIM_OBJ_HIT_SMALL_YFIX, 136, 64, $0 + anim_wait 16 + anim_sound 0, 1, SFX_KINESIS + anim_obj ANIM_OBJ_CHICK, 136, 24, $15 + anim_obj ANIM_OBJ_CHICK, 136, 24, $aa + anim_obj ANIM_OBJ_CHICK, 136, 24, $bf + anim_wait 96 + anim_ret + +BattleAnim_Rest: + anim_1gfx ANIM_GFX_STATUS + anim_sound 0, 0, SFX_TAIL_WHIP +.loop + anim_obj ANIM_OBJ_ASLEEP, 64, 80, $0 + anim_wait 40 + anim_loop 3, .loop + anim_wait 32 + anim_ret + +BattleAnim_AcidArmor: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_2Row + anim_bgeffect ANIM_BG_ACID_ARMOR, $0, BG_EFFECT_USER, $8 + anim_sound 0, 0, SFX_MEGA_PUNCH + anim_wait 64 + anim_incbgeffect ANIM_BG_ACID_ARMOR + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Splash: + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 0, SFX_VICEGRIP + anim_call BattleAnim_TargetObj_2Row + anim_bgeffect ANIM_BG_BOUNCE_DOWN, $0, BG_EFFECT_USER, $0 + anim_wait 96 + anim_incbgeffect ANIM_BG_BOUNCE_DOWN + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Dig: + anim_2gfx ANIM_GFX_SAND, ANIM_GFX_HIT + anim_if_param_equal $0, .hit + anim_if_param_equal $2, .fail + anim_call BattleAnim_TargetObj_2Row + anim_bgeffect ANIM_BG_DIG, $0, BG_EFFECT_USER, $1 + anim_obj ANIM_OBJ_DIG_PILE, 72, 104, $0 +.loop + anim_sound 0, 0, SFX_RAZOR_WIND + anim_obj ANIM_OBJ_DIG_SAND, 56, 104, $0 + anim_wait 16 + anim_loop 6, .loop + anim_wait 32 + anim_bgeffect ANIM_BG_HIDE_MON, $0, BG_EFFECT_USER, $0 + anim_wait 8 + anim_incbgeffect ANIM_BG_DIG + anim_call BattleAnim_ShowMon_0 + anim_ret + +.hit + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 32 +.fail + anim_bgeffect ANIM_BG_ENTER_MON, $0, BG_EFFECT_USER, $0 + anim_wait 32 + anim_ret + +BattleAnim_SandAttack: + anim_1gfx ANIM_GFX_SAND + anim_call BattleAnimSub_SandOrMud + anim_ret + +BattleAnim_StringShot: + anim_1gfx ANIM_GFX_WEB + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_sound 6, 2, SFX_MENU + anim_obj ANIM_OBJ_STRING_SHOT, 64, 80, $0 + anim_wait 4 + anim_sound 0, 1, SFX_MENU + anim_obj ANIM_OBJ_STRING_SHOT, 132, 48, $1 + anim_wait 4 + anim_sound 6, 2, SFX_MENU + anim_obj ANIM_OBJ_STRING_SHOT, 64, 88, $0 + anim_wait 4 + anim_sound 0, 1, SFX_MENU + anim_obj ANIM_OBJ_STRING_SHOT, 132, 64, $1 + anim_wait 4 + anim_sound 6, 2, SFX_MENU + anim_obj ANIM_OBJ_STRING_SHOT, 64, 84, $0 + anim_wait 4 + anim_sound 0, 1, SFX_MENU + anim_obj ANIM_OBJ_STRING_SHOT, 132, 56, $2 + anim_wait 64 + anim_ret + +BattleAnim_Headbutt: + anim_1gfx ANIM_GFX_HIT + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $14, $2, $0 + anim_wait 32 + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_TACKLE, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_sound 0, 1, SFX_HEADBUTT + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 8 + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Tackle: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_2Row + anim_bgeffect ANIM_BG_TACKLE, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_sound 0, 1, SFX_TACKLE + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 48, $0 + anim_wait 8 + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_BodySlam: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_2Row + anim_bgeffect ANIM_BG_BOUNCE_DOWN, $0, BG_EFFECT_USER, $0 + anim_wait 32 + anim_incbgeffect ANIM_BG_BOUNCE_DOWN + anim_wait 4 + anim_bgeffect ANIM_BG_BODY_SLAM, $0, BG_EFFECT_USER, $0 + anim_wait 3 + anim_sound 0, 1, SFX_TACKLE + anim_obj ANIM_OBJ_HIT_YFIX, 136, 48, $0 + anim_wait 6 + anim_sound 0, 1, SFX_TACKLE + anim_obj ANIM_OBJ_HIT_YFIX, 144, 48, $0 + anim_wait 3 + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_TakeDown: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_TACKLE, $0, BG_EFFECT_USER, $0 + anim_wait 3 + anim_sound 0, 1, SFX_TACKLE + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 + anim_obj ANIM_OBJ_HIT_YFIX, 128, 56, $0 + anim_wait 6 + anim_sound 0, 1, SFX_TACKLE + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 + anim_obj ANIM_OBJ_HIT_YFIX, 144, 48, $0 + anim_wait 3 + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_DoubleEdge: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $10 + anim_bgeffect ANIM_BG_TACKLE, $0, BG_EFFECT_USER, $0 + anim_wait 3 + anim_sound 0, 1, SFX_TACKLE + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 128, 48, $0 + anim_wait 6 + anim_sound 0, 1, SFX_TACKLE + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 144, 48, $0 + anim_wait 3 + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Submission: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_UserObj_1Row + anim_bgeffect ANIM_BG_WOBBLE_MON, $0, BG_EFFECT_TARGET, $0 + anim_sound 0, 1, SFX_SUBMISSION + anim_wait 32 + anim_obj ANIM_OBJ_HIT_YFIX, 120, 48, $0 + anim_wait 32 + anim_obj ANIM_OBJ_HIT_YFIX, 152, 56, $0 + anim_wait 32 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 52, $0 + anim_wait 32 + anim_incbgeffect ANIM_BG_WOBBLE_MON + anim_call BattleAnim_ShowMon_1 + anim_ret + +BattleAnim_Whirlwind: + anim_1gfx ANIM_GFX_WIND +.loop + anim_sound 0, 0, SFX_RAZOR_WIND + anim_obj ANIM_OBJ_GUST, 64, 112, $0 + anim_wait 6 + anim_loop 9, .loop + anim_incobj 1 + anim_incobj 2 + anim_incobj 3 + anim_incobj 4 + anim_incobj 5 + anim_incobj 6 + anim_incobj 7 + anim_incobj 8 + anim_incobj 9 + anim_sound 16, 2, SFX_WHIRLWIND + anim_wait 128 + anim_if_param_equal $0, .done + anim_bgeffect ANIM_BG_REMOVE_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 64 +.done + anim_ret + +BattleAnim_Hypnosis: + anim_1gfx ANIM_GFX_PSYCHIC +.loop + anim_sound 6, 2, SFX_SUPERSONIC + anim_obj ANIM_OBJ_WAVE, 64, 88, $2 + anim_obj ANIM_OBJ_WAVE, 56, 80, $2 + anim_wait 8 + anim_loop 3, .loop + anim_wait 56 + anim_ret + +BattleAnim_Haze: + anim_1gfx ANIM_GFX_HAZE + anim_sound 0, 1, SFX_SURF +.loop + anim_obj ANIM_OBJ_HAZE, 48, 56, $0 + anim_obj ANIM_OBJ_HAZE, 132, 16, $0 + anim_wait 12 + anim_loop 5, .loop + anim_wait 96 + anim_ret + +BattleAnim_Mist: + anim_obp0 $54 + anim_1gfx ANIM_GFX_HAZE + anim_sound 0, 0, SFX_SURF +.loop + anim_obj ANIM_OBJ_MIST, 48, 56, $0 + anim_wait 8 + anim_loop 10, .loop + anim_wait 96 + anim_ret + +BattleAnim_Smog: + anim_1gfx ANIM_GFX_HAZE + anim_sound 0, 1, SFX_BUBBLEBEAM +.loop + anim_obj ANIM_OBJ_SMOG, 132, 16, $0 + anim_wait 8 + anim_loop 10, .loop + anim_wait 96 + anim_ret + +BattleAnim_PoisonGas: + anim_1gfx ANIM_GFX_HAZE + anim_sound 16, 2, SFX_BUBBLEBEAM +.loop + anim_obj ANIM_OBJ_POISON_GAS, 44, 80, $2 + anim_wait 8 + anim_loop 10, .loop + anim_wait 128 + anim_ret + +BattleAnim_HornAttack: + anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT + anim_obj ANIM_OBJ_HORN, 72, 80, $1 + anim_wait 16 + anim_sound 0, 1, SFX_HORN_ATTACK + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 16 + anim_ret + +BattleAnim_FuryAttack: + anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT + anim_obj ANIM_OBJ_HORN, 72, 72, $2 + anim_wait 8 + anim_sound 0, 1, SFX_HORN_ATTACK + anim_obj ANIM_OBJ_HIT, 128, 40, $0 + anim_wait 8 + anim_obj ANIM_OBJ_HORN, 80, 88, $2 + anim_wait 8 + anim_sound 0, 1, SFX_HORN_ATTACK + anim_obj ANIM_OBJ_HIT, 136, 56, $0 + anim_wait 8 + anim_obj ANIM_OBJ_HORN, 76, 80, $2 + anim_wait 8 + anim_sound 0, 1, SFX_HORN_ATTACK + anim_obj ANIM_OBJ_HIT, 132, 48, $0 + anim_wait 8 + anim_ret + +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 + anim_wait 8 +.loop + anim_sound 0, 1, SFX_HORN_ATTACK + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 132, 40, $0 + anim_wait 8 + anim_sound 0, 1, SFX_HORN_ATTACK + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 140, 48, $0 + anim_wait 8 + anim_sound 0, 1, SFX_HORN_ATTACK + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 132, 56, $0 + anim_wait 8 + anim_sound 0, 1, SFX_HORN_ATTACK + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 124, 48, $0 + anim_wait 8 + anim_loop 3, .loop + anim_ret + +BattleAnim_PoisonSting: + anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT + anim_obj ANIM_OBJ_NEEDLE, 64, 92, $14 + anim_wait 16 + anim_sound 0, 1, SFX_POISON_STING + anim_obj ANIM_OBJ_HIT_SMALL, 136, 56, $0 + anim_wait 16 + anim_ret + +BattleAnim_Twineedle: + anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT + anim_sound 0, 1, SFX_POISON_STING + anim_obj ANIM_OBJ_NEEDLE, 64, 92, $14 + anim_obj ANIM_OBJ_NEEDLE, 56, 84, $14 + anim_wait 16 + anim_sound 0, 1, SFX_POISON_STING + anim_obj ANIM_OBJ_HIT_SMALL, 136, 56, $0 + anim_obj ANIM_OBJ_HIT_SMALL, 128, 48, $0 + anim_wait 16 + anim_ret + +BattleAnim_PinMissile: + anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT +.loop + anim_obj ANIM_OBJ_NEEDLE, 64, 92, $28 + anim_wait 8 + anim_obj ANIM_OBJ_NEEDLE, 56, 84, $28 + anim_sound 0, 1, SFX_POISON_STING + anim_obj ANIM_OBJ_HIT_SMALL, 136, 56, $0 + anim_wait 8 + anim_obj ANIM_OBJ_NEEDLE, 52, 88, $28 + anim_sound 0, 1, SFX_POISON_STING + anim_obj ANIM_OBJ_HIT_SMALL, 128, 48, $0 + anim_wait 8 + anim_sound 0, 1, SFX_POISON_STING + anim_obj ANIM_OBJ_HIT_SMALL, 132, 52, $0 + anim_loop 3, .loop + anim_wait 16 + anim_ret + +BattleAnim_SpikeCannon: + anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT +.loop + anim_obj ANIM_OBJ_NEEDLE, 64, 92, $18 + anim_wait 8 + anim_obj ANIM_OBJ_NEEDLE, 56, 84, $18 + anim_sound 0, 1, SFX_POISON_STING + anim_obj ANIM_OBJ_HIT_SMALL, 136, 56, $0 + anim_wait 8 + anim_obj ANIM_OBJ_NEEDLE, 52, 88, $18 + anim_sound 0, 1, SFX_POISON_STING + anim_obj ANIM_OBJ_HIT_SMALL, 128, 48, $0 + anim_wait 8 + anim_sound 0, 1, SFX_POISON_STING + anim_obj ANIM_OBJ_HIT_SMALL, 132, 52, $0 + anim_loop 3, .loop + anim_wait 16 + anim_ret + +BattleAnim_Transform: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_2Row + anim_transform + anim_sound 0, 0, SFX_PSYBEAM + anim_bgeffect ANIM_BG_WAVE_DEFORM_MON, $0, BG_EFFECT_USER, $0 + anim_wait 48 + anim_updateactorpic + anim_incbgeffect ANIM_BG_WAVE_DEFORM_MON + anim_wait 48 + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_PetalDance: + anim_sound 0, 0, SFX_MENU + anim_2gfx ANIM_GFX_FLOWER, ANIM_GFX_HIT +.loop + anim_obj ANIM_OBJ_PETAL_DANCE, 48, 56, $0 + anim_wait 11 + anim_loop 8, .loop + anim_wait 128 + anim_wait 64 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 56, $0 + anim_wait 16 + anim_ret + +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 + anim_wait 36 + anim_sound 0, 1, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION2, 136, 56, $0 + anim_wait 16 + anim_ret + +BattleAnim_PayDay: + anim_2gfx ANIM_GFX_HIT, ANIM_GFX_STATUS + anim_sound 0, 1, SFX_POUND + anim_obj ANIM_OBJ_HIT_YFIX, 128, 56, $0 + anim_wait 16 + anim_sound 0, 1, SFX_PAY_DAY + anim_obj ANIM_OBJ_PAY_DAY, 120, 76, $1 + anim_wait 64 + anim_ret + +BattleAnim_Mimic: + anim_1gfx ANIM_GFX_SPEED + anim_obp0 $fc + anim_sound 63, 3, SFX_LICK + anim_obj ANIM_OBJ_MIMIC, 132, 44, $0 + anim_obj ANIM_OBJ_MIMIC, 132, 44, $8 + anim_obj ANIM_OBJ_MIMIC, 132, 44, $10 + anim_obj ANIM_OBJ_MIMIC, 132, 44, $18 + anim_obj ANIM_OBJ_MIMIC, 132, 44, $20 + anim_obj ANIM_OBJ_MIMIC, 132, 44, $28 + anim_obj ANIM_OBJ_MIMIC, 132, 44, $30 + anim_obj ANIM_OBJ_MIMIC, 132, 44, $38 + anim_wait 128 + anim_wait 48 + anim_ret + +BattleAnim_LovelyKiss: + anim_2gfx ANIM_GFX_OBJECTS, ANIM_GFX_ANGELS + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_obj ANIM_OBJ_LOVELY_KISS, 152, 40, $0 + anim_wait 32 + anim_sound 0, 1, SFX_LICK + anim_obj ANIM_OBJ_HEART, 128, 40, $0 + anim_wait 40 + anim_ret + +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 + anim_wait 24 + anim_sound 0, 1, SFX_MOVE_PUZZLE_PIECE + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 24 + anim_ret + +BattleAnim_Swift: + anim_1gfx ANIM_GFX_OBJECTS + anim_sound 6, 2, SFX_METRONOME + anim_obj ANIM_OBJ_SWIFT, 64, 88, $4 + anim_wait 4 + anim_obj ANIM_OBJ_SWIFT, 64, 72, $4 + anim_wait 4 + anim_obj ANIM_OBJ_SWIFT, 64, 76, $4 + anim_wait 64 + anim_ret + +BattleAnim_Crabhammer: + anim_1gfx ANIM_GFX_HIT + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $40, $2, $0 + anim_wait 48 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $3 +.loop + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 56, $0 + anim_wait 12 + anim_loop 3, .loop + anim_ret + +BattleAnim_SkullBash: + anim_if_param_equal $1, BattleAnim_FocusEnergy + anim_1gfx ANIM_GFX_HIT + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $14, $2, $0 + anim_wait 32 + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $3 + anim_bgeffect ANIM_BG_TACKLE, $0, BG_EFFECT_USER, $0 + anim_wait 4 +.loop + anim_sound 0, 1, SFX_HEADBUTT + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 8 + anim_loop 3, .loop + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Kinesis: + anim_2gfx ANIM_GFX_MISC, ANIM_GFX_NOISE + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_obj ANIM_OBJ_KINESIS, 80, 76, $0 + anim_wait 32 +.loop + anim_sound 0, 0, SFX_KINESIS + anim_obj ANIM_OBJ_SOUND, 64, 88, $0 + anim_wait 32 + anim_loop 3, .loop + anim_wait 32 + anim_sound 0, 0, SFX_KINESIS_2 + anim_wait 32 + anim_ret + +BattleAnim_Peck: + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 1, SFX_PECK + anim_obj ANIM_OBJ_HIT_SMALL_YFIX, 128, 48, $0 + anim_wait 8 + anim_sound 0, 1, SFX_PECK + anim_obj ANIM_OBJ_HIT_SMALL_YFIX, 136, 56, $0 + anim_wait 16 + anim_ret + +BattleAnim_DrillPeck: + anim_1gfx ANIM_GFX_HIT +.loop + anim_sound 0, 1, SFX_PECK + anim_obj ANIM_OBJ_HIT_SMALL_YFIX, 124, 56, $0 + anim_wait 4 + anim_sound 0, 1, SFX_PECK + anim_obj ANIM_OBJ_HIT_SMALL_YFIX, 132, 48, $0 + anim_wait 4 + anim_sound 0, 1, SFX_PECK + anim_obj ANIM_OBJ_HIT_SMALL_YFIX, 140, 56, $0 + anim_wait 4 + anim_sound 0, 1, SFX_PECK + anim_obj ANIM_OBJ_HIT_SMALL_YFIX, 132, 64, $0 + anim_wait 4 + anim_loop 5, .loop + anim_wait 16 + anim_ret + +BattleAnim_Guillotine: + anim_1gfx ANIM_GFX_CUT + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $10 + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $40, $2, $0 + anim_sound 0, 1, SFX_VICEGRIP + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 156, 44, $0 + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 152, 40, $0 + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 148, 36, $0 + anim_obj ANIM_OBJ_CUT_UP_RIGHT, 124, 76, $0 + anim_obj ANIM_OBJ_CUT_UP_RIGHT, 120, 72, $0 + anim_obj ANIM_OBJ_CUT_UP_RIGHT, 116, 68, $0 + anim_obj ANIM_OBJ_CUT_UP_RIGHT, 120, 72, $0 + anim_wait 32 + anim_ret + +BattleAnim_Flash: + anim_1gfx ANIM_GFX_SPEED + anim_sound 0, 1, SFX_FLASH + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $6, $20 + anim_wait 4 + anim_obj ANIM_OBJ_FLASH, 136, 56, $0 + anim_wait 4 + anim_obj ANIM_OBJ_FLASH, 136, 56, $8 + anim_wait 4 + anim_obj ANIM_OBJ_FLASH, 136, 56, $10 + anim_wait 4 + anim_obj ANIM_OBJ_FLASH, 136, 56, $18 + anim_wait 4 + anim_obj ANIM_OBJ_FLASH, 136, 56, $20 + anim_wait 4 + anim_obj ANIM_OBJ_FLASH, 136, 56, $28 + anim_wait 4 + anim_obj ANIM_OBJ_FLASH, 136, 56, $30 + anim_wait 4 + anim_obj ANIM_OBJ_FLASH, 136, 56, $38 + anim_wait 32 + anim_ret + +BattleAnim_Substitute: + anim_sound 0, 0, SFX_SURF + anim_if_param_equal $3, .dropsub2 + anim_if_param_equal $2, .raisesub + anim_if_param_equal $1, .dropsub + anim_1gfx ANIM_GFX_SMOKE + anim_bgeffect ANIM_BG_REMOVE_MON, $0, BG_EFFECT_USER, $0 + anim_wait 48 + anim_raisesub + anim_obj ANIM_OBJ_BALL_POOF, 48, 96, $0 + anim_bgeffect ANIM_BG_ENTER_MON, $0, BG_EFFECT_USER, $0 + anim_wait 32 + anim_ret + +.dropsub: + anim_bgeffect ANIM_BG_REMOVE_MON, $0, BG_EFFECT_USER, $0 + anim_wait 48 + anim_dropsub + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_USER, $0 + anim_wait 32 + anim_ret + +.raisesub: + anim_bgeffect ANIM_BG_REMOVE_MON, $0, BG_EFFECT_USER, $0 + anim_wait 48 + anim_raisesub + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_USER, $0 + anim_wait 32 + anim_ret + +.dropsub2: + anim_bgeffect ANIM_BG_HIDE_MON, $0, BG_EFFECT_USER, $0 + anim_wait 48 + anim_dropsub + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_USER, $0 + anim_wait 32 + anim_ret + +BattleAnim_Minimize: + anim_sound 0, 0, SFX_SURF + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_2Row + anim_minimize + anim_bgeffect ANIM_BG_WAVE_DEFORM_MON, $0, BG_EFFECT_USER, $0 + anim_wait 48 + anim_updateactorpic + anim_incbgeffect ANIM_BG_WAVE_DEFORM_MON + anim_wait 48 + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_SkyAttack: + anim_if_param_equal $1, BattleAnim_FocusEnergy + anim_1gfx ANIM_GFX_SKY_ATTACK + anim_bgeffect ANIM_BG_REMOVE_MON, $0, BG_EFFECT_USER, $0 + anim_wait 32 + anim_sound 0, 0, SFX_HYPER_BEAM + anim_obj ANIM_OBJ_SKY_ATTACK, 48, 88, $40 + anim_wait 64 + anim_incobj 1 + anim_wait 21 + anim_sound 0, 1, SFX_HYPER_BEAM + anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 + anim_wait 64 + anim_incobj 1 + anim_wait 32 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_USER, $0 + anim_wait 16 + anim_ret + +BattleAnim_NightShade: + anim_1gfx ANIM_GFX_HIT + anim_bgp $1b + anim_obp1 $1b + anim_wait 32 + anim_call BattleAnim_UserObj_2Row + anim_bgeffect ANIM_BG_NIGHT_SHADE, $0, BG_EFFECT_TARGET, $8 + anim_sound 0, 1, SFX_PSYCHIC + anim_wait 96 + anim_incbgeffect ANIM_BG_NIGHT_SHADE + anim_call BattleAnim_ShowMon_1 + anim_ret + +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 + +BattleAnim_TriAttack: + anim_3gfx ANIM_GFX_FIRE, ANIM_GFX_ICE, ANIM_GFX_LIGHTNING + anim_call BattleAnimSub_Fire + anim_wait 16 + anim_call BattleAnimSub_Ice + anim_wait 16 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $4 + anim_sound 0, 1, SFX_THUNDER + anim_obj ANIM_OBJ_THUNDER3, 152, 68, $0 + anim_wait 16 + anim_ret + +BattleAnim_Withdraw: + anim_1gfx ANIM_GFX_REFLECT + anim_call BattleAnim_TargetObj_2Row + anim_bgeffect ANIM_BG_WITHDRAW, $0, BG_EFFECT_USER, $50 + anim_wait 48 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_WITHDRAW, 48, 88, $0 + anim_wait 64 + anim_incobj 2 + anim_wait 1 + anim_incbgeffect ANIM_BG_WITHDRAW + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Psybeam: + anim_1gfx ANIM_GFX_PSYCHIC + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_bgeffect ANIM_BG_CYCLE_BGPALS_INVERTED, $0, $4, $0 +.loop + anim_sound 6, 2, SFX_PSYBEAM + anim_obj ANIM_OBJ_WAVE, 64, 88, $4 + anim_wait 4 + anim_loop 10, .loop + anim_wait 48 + anim_ret + +BattleAnim_DreamEater: + anim_1gfx ANIM_GFX_BUBBLE + anim_bgp $1b + anim_obp0 $27 + anim_sound 6, 3, SFX_WATER_GUN + anim_call BattleAnimSub_Drain + anim_wait 128 + anim_wait 48 + anim_ret + +BattleAnim_LeechLife: + anim_1gfx ANIM_GFX_BUBBLE + anim_sound 6, 3, SFX_WATER_GUN + anim_call BattleAnimSub_Drain + anim_wait 128 + anim_wait 48 + anim_ret + +BattleAnim_Harden: + anim_1gfx ANIM_GFX_REFLECT + anim_obp0 $0 + anim_call BattleAnim_TargetObj_1Row + anim_call BattleAnimSub_Metallic + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Psywave: + anim_1gfx ANIM_GFX_PSYCHIC + anim_bgeffect ANIM_BG_PSYCHIC, $0, $0, $0 +.loop + anim_sound 6, 2, SFX_PSYCHIC + anim_obj ANIM_OBJ_WAVE, 64, 80, $2 + anim_wait 8 + anim_sound 6, 2, SFX_PSYCHIC + anim_obj ANIM_OBJ_WAVE, 64, 88, $3 + anim_wait 8 + anim_sound 6, 2, SFX_PSYCHIC + anim_obj ANIM_OBJ_WAVE, 64, 96, $4 + anim_wait 8 + anim_loop 3, .loop + anim_wait 32 + anim_incbgeffect ANIM_BG_PSYCHIC + anim_wait 4 + anim_ret + +BattleAnim_Glare: + anim_1gfx ANIM_GFX_BEAM + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $20 + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_call BattleAnimSub_EyeBeams + anim_wait 16 + anim_ret + +BattleAnim_Thrash: + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 1, SFX_POUND + anim_obj ANIM_OBJ_PALM, 120, 72, $0 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 120, 72, $0 + anim_wait 6 + anim_sound 0, 1, SFX_MOVE_PUZZLE_PIECE + anim_obj ANIM_OBJ_PUNCH, 136, 56, $0 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 56, $0 + anim_wait 6 + anim_sound 0, 1, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_KICK, 152, 40, $0 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 152, 40, $0 + anim_wait 16 + anim_ret + +BattleAnim_Growth: + anim_bgeffect ANIM_BG_WHITE_HUES, $0, $8, $0 + anim_1gfx ANIM_GFX_CHARGE + anim_sound 0, 0, SFX_SWORDS_DANCE + anim_obj ANIM_OBJ_GROWTH, 48, 108, $0 + anim_obj ANIM_OBJ_GROWTH, 48, 108, $8 + anim_obj ANIM_OBJ_GROWTH, 48, 108, $10 + anim_obj ANIM_OBJ_GROWTH, 48, 108, $18 + anim_obj ANIM_OBJ_GROWTH, 48, 108, $20 + anim_obj ANIM_OBJ_GROWTH, 48, 108, $28 + anim_obj ANIM_OBJ_GROWTH, 48, 108, $30 + anim_obj ANIM_OBJ_GROWTH, 48, 108, $38 + anim_wait 64 + anim_ret + +BattleAnim_Conversion2: + anim_1gfx ANIM_GFX_EXPLOSION + anim_sound 63, 3, SFX_SHARPEN + anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $0 + anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $8 + anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $10 + anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $18 + anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $20 + anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $28 + anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $30 + anim_obj ANIM_OBJ_CONVERSION2, 132, 44, $38 + anim_wait 128 + anim_wait 48 + anim_ret + +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 + anim_wait 24 + anim_incobj 1 + anim_sound 0, 1, SFX_BALL_POOF + anim_obj ANIM_OBJ_BALL_POOF, 108, 70, $10 + anim_wait 8 +.loop + anim_sound 0, 1, SFX_MENU + anim_obj ANIM_OBJ_SMOKE, 132, 60, $20 + anim_wait 8 + anim_loop 5, .loop + anim_wait 128 + anim_ret + +BattleAnim_Strength: + anim_2gfx ANIM_GFX_ROCKS, ANIM_GFX_HIT + anim_bgeffect ANIM_BG_SHAKE_SCREEN_Y, $10, $1, $20 + anim_sound 0, 0, SFX_STRENGTH + anim_obj ANIM_OBJ_STRENGTH, 64, 104, $1 + anim_wait 128 + anim_incobj 1 + anim_wait 20 + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 132, 40, $0 + anim_wait 16 + anim_ret + +BattleAnim_SwordsDance: + anim_1gfx ANIM_GFX_WHIP + anim_sound 0, 0, SFX_SWORDS_DANCE + anim_obj ANIM_OBJ_SWORDS_DANCE, 48, 108, $0 + anim_obj ANIM_OBJ_SWORDS_DANCE, 48, 108, $d + anim_obj ANIM_OBJ_SWORDS_DANCE, 48, 108, $1a + anim_obj ANIM_OBJ_SWORDS_DANCE, 48, 108, $27 + anim_obj ANIM_OBJ_SWORDS_DANCE, 48, 108, $34 + anim_wait 56 + anim_ret + +BattleAnim_QuickAttack: + anim_2gfx ANIM_GFX_SPEED, ANIM_GFX_HIT + anim_sound 0, 0, SFX_MENU + anim_bgeffect ANIM_BG_HIDE_MON, $0, BG_EFFECT_USER, $0 + anim_obj ANIM_OBJ_SPEED_LINE, 24, 88, $2 + anim_obj ANIM_OBJ_SPEED_LINE, 32, 88, $1 + anim_obj ANIM_OBJ_SPEED_LINE, 40, 88, $0 + anim_obj ANIM_OBJ_SPEED_LINE, 48, 88, $80 + anim_obj ANIM_OBJ_SPEED_LINE, 56, 88, $81 + anim_obj ANIM_OBJ_SPEED_LINE, 64, 88, $82 + anim_wait 12 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 8 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_USER, $0 + anim_wait 16 + anim_ret + +BattleAnim_Meditate: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_1Row + anim_sound 0, 0, SFX_PSYBEAM + anim_bgeffect ANIM_BG_WAVE_DEFORM_MON, $0, BG_EFFECT_USER, $0 + anim_wait 48 + anim_incbgeffect ANIM_BG_WAVE_DEFORM_MON + anim_wait 48 + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Sharpen: + anim_1gfx ANIM_GFX_SHAPES + anim_obp0 $e4 + anim_call BattleAnim_TargetObj_1Row + anim_sound 0, 0, SFX_SHARPEN + anim_bgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING, $0, BG_EFFECT_USER, $40 + anim_obj ANIM_OBJ_SHARPEN, 48, 88, $0 + anim_wait 96 + anim_incobj 2 + anim_incbgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_DefenseCurl: + anim_1gfx ANIM_GFX_SHAPES + anim_obp0 $e4 + anim_call BattleAnim_TargetObj_1Row + anim_sound 0, 0, SFX_SHARPEN + anim_bgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING, $0, BG_EFFECT_USER, $40 + anim_obj ANIM_OBJ_DEFENSE_CURL, 48, 88, $0 + anim_wait 96 + anim_incobj 2 + anim_incbgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_SeismicToss: + anim_2gfx ANIM_GFX_GLOBE, ANIM_GFX_HIT + anim_bgeffect ANIM_BG_SHAKE_SCREEN_Y, $10, $1, $20 + anim_sound 0, 0, SFX_STRENGTH + anim_obj ANIM_OBJ_SEISMIC_TOSS, 64, 104, $1 + anim_wait 128 + anim_incobj 1 + anim_wait 20 + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 132, 40, $0 + anim_wait 16 + anim_ret + +BattleAnim_Rage: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING, $0, BG_EFFECT_USER, $20 + anim_sound 0, 0, SFX_RAGE + anim_wait 72 + anim_incbgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_sound 0, 1, SFX_MOVE_PUZZLE_PIECE + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 120, 72, $0 + anim_wait 6 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 56, $0 + anim_wait 6 + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 152, 40, $0 + anim_wait 16 + anim_ret + +BattleAnim_Agility: + anim_1gfx ANIM_GFX_WIND + anim_obp0 $fc + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING, $0, BG_EFFECT_USER, $40 + anim_obj ANIM_OBJ_AGILITY, 8, 24, $10 + anim_obj ANIM_OBJ_AGILITY, 8, 48, $2 + anim_obj ANIM_OBJ_AGILITY, 8, 88, $8 + anim_wait 4 + anim_obj ANIM_OBJ_AGILITY, 8, 32, $6 + anim_obj ANIM_OBJ_AGILITY, 8, 56, $c + anim_obj ANIM_OBJ_AGILITY, 8, 80, $4 + anim_obj ANIM_OBJ_AGILITY, 8, 104, $e +.loop + anim_sound 0, 0, SFX_RAZOR_WIND + anim_wait 4 + anim_loop 18, .loop + anim_incbgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_BoneClub: + anim_2gfx ANIM_GFX_HIT, ANIM_GFX_MISC + anim_obj ANIM_OBJ_BONE_CLUB, 64, 88, $2 + anim_wait 32 + anim_sound 0, 1, SFX_BONE_CLUB + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 16 + anim_ret + +BattleAnim_Barrier: + anim_1gfx ANIM_GFX_REFLECT + anim_battlergfx_2row + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_wait 8 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SCREEN, 72, 80, $0 + anim_wait 32 + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SCREEN, 72, 80, $0 + anim_wait 32 + anim_ret + +BattleAnim_Waterfall: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_2Row + anim_bgeffect ANIM_BG_BODY_SLAM, $0, BG_EFFECT_USER, $0 + anim_wait 16 + anim_call BattleAnim_ShowMon_0 + anim_sound 0, 1, SFX_LICK + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 3 + anim_sound 0, 1, SFX_LICK + anim_obj ANIM_OBJ_HIT_YFIX, 136, 48, $0 + anim_wait 3 + anim_sound 0, 1, SFX_LICK + anim_obj ANIM_OBJ_HIT_YFIX, 136, 40, $0 + anim_wait 3 + anim_sound 0, 1, SFX_LICK + anim_obj ANIM_OBJ_HIT_YFIX, 136, 32, $0 + anim_wait 3 + anim_sound 0, 1, SFX_LICK + anim_obj ANIM_OBJ_HIT_YFIX, 136, 24, $0 + anim_wait 8 + anim_ret + +BattleAnim_PsychicM: + anim_1gfx ANIM_GFX_PSYCHIC + anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 + anim_bgeffect ANIM_BG_PSYCHIC, $0, $0, $0 +.loop + anim_sound 6, 2, SFX_PSYCHIC + anim_obj ANIM_OBJ_WAVE, 64, 88, $2 + anim_wait 8 + anim_loop 8, .loop + anim_wait 96 + anim_incbgeffect ANIM_BG_PSYCHIC + anim_wait 4 + anim_ret + +BattleAnim_Sludge: + anim_1gfx ANIM_GFX_POISON + anim_call BattleAnimSub_Sludge + anim_wait 56 + anim_ret + +BattleAnim_Toxic: + anim_1gfx ANIM_GFX_POISON + anim_bgeffect ANIM_BG_BLACK_HUES, $0, $8, $0 + anim_call BattleAnimSub_Acid + anim_wait 32 + anim_call BattleAnimSub_Sludge + anim_wait 64 + anim_ret + +BattleAnim_Metronome: + anim_2gfx ANIM_GFX_MISC, ANIM_GFX_SPEED + anim_sound 0, 0, SFX_METRONOME + anim_obj ANIM_OBJ_METRONOME_HAND, 72, 88, $0 +.loop + anim_obj ANIM_OBJ_METRONOME_SPARKLE, 72, 80, $0 + anim_wait 8 + anim_loop 5, .loop + anim_wait 48 + anim_ret + +BattleAnim_Counter: + anim_1gfx ANIM_GFX_HIT +.loop + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $6, $2 + anim_sound 0, 1, SFX_POUND + anim_obj ANIM_OBJ_PALM, 120, 72, $0 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 120, 72, $0 + anim_wait 6 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $6, $2 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_PUNCH, 136, 40, $0 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 40, $0 + anim_wait 6 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $6, $2 + anim_sound 0, 1, SFX_MEGA_KICK + anim_obj ANIM_OBJ_KICK, 152, 56, $0 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 152, 56, $0 + anim_wait 6 + anim_loop 3, .loop + anim_wait 16 + anim_ret + +BattleAnim_LowKick: + anim_1gfx ANIM_GFX_HIT + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 + anim_sound 0, 1, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_KICK, 124, 64, $0 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 124, 64, $0 + anim_wait 6 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 + anim_sound 0, 1, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_KICK, 132, 64, $0 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 132, 64, $0 + anim_wait 6 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2 + anim_sound 0, 1, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_KICK, 140, 64, $0 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 140, 64, $0 + anim_wait 16 + anim_ret + +BattleAnim_WingAttack: + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 1, SFX_WING_ATTACK + anim_obj ANIM_OBJ_HIT_YFIX, 148, 56, $0 + anim_obj ANIM_OBJ_HIT_YFIX, 116, 56, $0 + anim_wait 6 + anim_sound 0, 1, SFX_WING_ATTACK + anim_obj ANIM_OBJ_HIT_YFIX, 144, 56, $0 + anim_obj ANIM_OBJ_HIT_YFIX, 120, 56, $0 + anim_wait 6 + anim_sound 0, 1, SFX_WING_ATTACK + anim_obj ANIM_OBJ_HIT_YFIX, 140, 56, $0 + anim_obj ANIM_OBJ_HIT_YFIX, 124, 56, $0 + anim_wait 16 + anim_ret + +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_HIT_YFIX, 124, 40, $0 + anim_wait 16 + anim_ret + +BattleAnim_Disable: + anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_STATUS + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_obj ANIM_OBJ_DISABLE, 132, 56, $0 + anim_wait 16 + anim_sound 0, 1, SFX_BIND + anim_obj ANIM_OBJ_PARALYZED, 104, 56, $42 + anim_obj ANIM_OBJ_PARALYZED, 160, 56, $c2 + anim_wait 96 + anim_ret + +BattleAnim_TailWhip: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_2Row + anim_sound 0, 0, SFX_TAIL_WHIP + anim_bgeffect ANIM_BG_WOBBLE_MON, $0, BG_EFFECT_USER, $0 + anim_wait 32 + anim_incbgeffect ANIM_BG_WOBBLE_MON + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Struggle: + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 1, SFX_POUND + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 16 + anim_ret + +BattleAnim_Sketch: + anim_1gfx ANIM_GFX_OBJECTS + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING, $0, BG_EFFECT_USER, $20 + anim_sound 0, 0, SFX_SKETCH + anim_obj ANIM_OBJ_SKETCH, 72, 80, $0 + anim_wait 80 + anim_incbgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_wait 1 + anim_ret + +BattleAnim_TripleKick: + anim_1gfx ANIM_GFX_HIT + anim_if_param_equal $1, .alternate1 + anim_if_param_equal $2, .alternate2 + anim_sound 0, 1, SFX_MEGA_KICK + anim_obj ANIM_OBJ_KICK, 144, 48, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 144, 48, $0 + anim_wait 8 + anim_ret + +.alternate1: + anim_sound 0, 1, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_KICK, 120, 64, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 120, 64, $0 + anim_wait 8 + anim_ret + +.alternate2: + anim_sound 0, 1, SFX_DOUBLE_KICK + anim_obj ANIM_OBJ_KICK, 132, 32, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 132, 32, $0 + anim_wait 8 + anim_ret + +BattleAnim_Thief: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_TACKLE, $0, BG_EFFECT_USER, $0 + anim_wait 16 + anim_sound 0, 1, SFX_THIEF + anim_obj ANIM_OBJ_HIT_YFIX, 128, 48, $0 + anim_wait 16 + anim_call BattleAnim_ShowMon_0 + anim_wait 1 + anim_1gfx ANIM_GFX_STATUS + anim_sound 0, 1, SFX_THIEF_2 + anim_obj ANIM_OBJ_THIEF, 120, 76, $1 + anim_wait 64 + anim_ret + +BattleAnim_SpiderWeb: + anim_1gfx ANIM_GFX_WEB + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_obj ANIM_OBJ_SPIDER_WEB, 132, 48, $0 + anim_sound 6, 2, SFX_SPIDER_WEB + anim_obj ANIM_OBJ_STRING_SHOT, 64, 80, $0 + anim_wait 4 + anim_obj ANIM_OBJ_STRING_SHOT, 64, 88, $0 + anim_wait 4 + anim_obj ANIM_OBJ_STRING_SHOT, 64, 84, $0 + anim_wait 64 + anim_ret + +BattleAnim_MindReader: + anim_1gfx ANIM_GFX_MISC + anim_sound 0, 1, SFX_MIND_READER +.loop + anim_obj ANIM_OBJ_MIND_READER, 132, 48, $3 + anim_obj ANIM_OBJ_MIND_READER, 132, 48, $12 + anim_obj ANIM_OBJ_MIND_READER, 132, 48, $20 + anim_obj ANIM_OBJ_MIND_READER, 132, 48, $31 + anim_wait 16 + anim_loop 2, .loop + anim_wait 32 + anim_ret + +BattleAnim_Nightmare: + anim_1gfx ANIM_GFX_ANGELS + anim_bgp $1b + anim_obp0 $f + anim_obj ANIM_OBJ_NIGHTMARE, 132, 40, $0 + anim_obj ANIM_OBJ_NIGHTMARE, 132, 40, $a0 + anim_sound 0, 1, SFX_NIGHTMARE + anim_wait 96 + anim_ret + +BattleAnim_FlameWheel: + anim_1gfx ANIM_GFX_FIRE +.loop + anim_sound 0, 0, SFX_EMBER + anim_obj ANIM_OBJ_FLAME_WHEEL, 48, 96, $0 + anim_wait 6 + anim_loop 8, .loop + anim_wait 96 + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_TACKLE, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $3 + anim_sound 0, 1, SFX_EMBER + anim_obj ANIM_OBJ_FIRE_BLAST, 136, 48, $1 + anim_obj ANIM_OBJ_FIRE_BLAST, 136, 48, $4 + anim_obj ANIM_OBJ_FIRE_BLAST, 136, 48, $5 + anim_wait 8 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 4 + anim_incobj 9 + anim_wait 8 + anim_ret + +BattleAnim_Snore: + anim_2gfx ANIM_GFX_STATUS, ANIM_GFX_NOISE + anim_obj ANIM_OBJ_ASLEEP, 64, 80, $0 + anim_wait 32 + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $60, $2, $0 + anim_sound 0, 0, SFX_SNORE +.loop + anim_call BattleAnimSub_Sound + anim_wait 16 + anim_loop 2, .loop + anim_wait 8 + anim_ret + +BattleAnim_Curse: + anim_if_param_equal $1, .NotGhost + anim_2gfx ANIM_GFX_HIT, ANIM_GFX_OBJECTS + anim_obj ANIM_OBJ_CURSE, 68, 72, $0 + anim_sound 0, 0, SFX_CURSE + anim_wait 32 + anim_incobj 1 + anim_wait 12 + anim_sound 0, 0, SFX_POISON_STING + anim_obj ANIM_OBJ_HIT, 44, 96, $0 + anim_wait 16 + anim_ret + +.NotGhost: + anim_1gfx ANIM_GFX_SPEED + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_FADE_MON_TO_BLACK_REPEATING, $0, BG_EFFECT_USER, $40 + anim_sound 0, 0, SFX_SHARPEN + anim_wait 64 + anim_incbgeffect ANIM_BG_FADE_MON_TO_BLACK_REPEATING + anim_wait 1 + anim_bgeffect ANIM_BG_FADE_MON_TO_LIGHT, $0, BG_EFFECT_USER, $40 +.loop + anim_sound 0, 0, SFX_SWORDS_DANCE + anim_obj ANIM_OBJ_FOCUS, 44, 108, $6 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 36, 108, $6 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 52, 108, $8 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 28, 108, $8 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 60, 108, $6 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 20, 108, $8 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 68, 108, $8 + anim_wait 2 + anim_loop 3, .loop + anim_wait 8 + anim_incbgeffect ANIM_BG_FADE_MON_TO_LIGHT + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Flail: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_1Row + anim_sound 0, 0, SFX_SUBMISSION + anim_bgeffect ANIM_BG_FLAIL, $0, BG_EFFECT_USER, $0 + anim_wait 8 + anim_obj ANIM_OBJ_HIT_YFIX, 120, 48, $0 + anim_wait 8 + anim_obj ANIM_OBJ_HIT_YFIX, 152, 48, $0 + anim_wait 8 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 48, $0 + anim_wait 8 + anim_incbgeffect ANIM_BG_FLAIL + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Conversion: + anim_1gfx ANIM_GFX_EXPLOSION + anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 + anim_sound 63, 3, SFX_SHARPEN + anim_obj ANIM_OBJ_CONVERSION, 48, 88, $0 + anim_obj ANIM_OBJ_CONVERSION, 48, 88, $8 + anim_obj ANIM_OBJ_CONVERSION, 48, 88, $10 + anim_obj ANIM_OBJ_CONVERSION, 48, 88, $18 + anim_obj ANIM_OBJ_CONVERSION, 48, 88, $20 + anim_obj ANIM_OBJ_CONVERSION, 48, 88, $28 + anim_obj ANIM_OBJ_CONVERSION, 48, 88, $30 + anim_obj ANIM_OBJ_CONVERSION, 48, 88, $38 + anim_wait 128 + anim_ret + +BattleAnim_Aeroblast: + anim_2gfx ANIM_GFX_BEAM, ANIM_GFX_AEROBLAST + anim_bgp $1b + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $50, $4, $10 + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_sound 0, 0, SFX_AEROBLAST + anim_obj ANIM_OBJ_AEROBLAST, 72, 88, $0 + anim_wait 32 + anim_sound 0, 0, SFX_HYPER_BEAM + anim_obj ANIM_OBJ_BEAM, 80, 84, $0 + anim_wait 2 + anim_sound 0, 1, SFX_HYPER_BEAM + anim_obj ANIM_OBJ_BEAM, 96, 76, $0 + anim_wait 2 + anim_sound 0, 1, SFX_HYPER_BEAM + anim_obj ANIM_OBJ_BEAM, 112, 68, $0 + anim_obj ANIM_OBJ_BEAM_TIP, 126, 62, $0 + anim_wait 48 + anim_ret + +BattleAnim_CottonSpore: + anim_obp0 $54 + anim_1gfx ANIM_GFX_MISC + anim_sound 0, 1, SFX_POWDER +.loop + anim_obj ANIM_OBJ_COTTON_SPORE, 132, 32, $0 + anim_wait 8 + anim_loop 5, .loop + anim_wait 96 + anim_ret + +BattleAnim_Reversal: + anim_2gfx ANIM_GFX_SHINE, ANIM_GFX_HIT + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $0, $0 + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT, 112, 64, $0 + anim_wait 2 + anim_sound 0, 1, SFX_SHINE + anim_obj ANIM_OBJ_FORESIGHT, 120, 56, $0 + anim_wait 2 + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT, 128, 56, $0 + anim_wait 2 + anim_sound 0, 1, SFX_SHINE + anim_obj ANIM_OBJ_FORESIGHT, 136, 48, $0 + anim_wait 2 + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT, 144, 48, $0 + anim_wait 2 + anim_sound 0, 1, SFX_SHINE + anim_obj ANIM_OBJ_FORESIGHT, 152, 40, $0 + anim_wait 24 + anim_ret + +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 + +BattleAnim_PowderSnow: + anim_1gfx ANIM_GFX_ICE +.loop + anim_sound 6, 2, SFX_SHINE + anim_obj ANIM_OBJ_POWDER_SNOW, 64, 88, $23 + anim_wait 2 + anim_sound 6, 2, SFX_SHINE + anim_obj ANIM_OBJ_POWDER_SNOW, 64, 80, $24 + anim_wait 2 + anim_sound 6, 2, SFX_SHINE + anim_obj ANIM_OBJ_POWDER_SNOW, 64, 96, $23 + anim_wait 2 + anim_loop 2, .loop + anim_bgeffect ANIM_BG_WHITE_HUES, $0, $8, $0 + anim_wait 40 + anim_call BattleAnimSub_Ice + anim_wait 32 + anim_ret + +BattleAnim_Protect: + anim_1gfx ANIM_GFX_OBJECTS + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_obj ANIM_OBJ_PROTECT, 80, 80, $0 + anim_obj ANIM_OBJ_PROTECT, 80, 80, $d + anim_obj ANIM_OBJ_PROTECT, 80, 80, $1a + anim_obj ANIM_OBJ_PROTECT, 80, 80, $27 + anim_obj ANIM_OBJ_PROTECT, 80, 80, $34 + anim_sound 0, 0, SFX_PROTECT + anim_wait 96 + anim_ret + +BattleAnim_MachPunch: + anim_2gfx ANIM_GFX_SPEED, ANIM_GFX_HIT + anim_bgeffect ANIM_BG_HIDE_MON, $0, BG_EFFECT_USER, $0 + anim_sound 0, 0, SFX_MENU + anim_obj ANIM_OBJ_SPEED_LINE, 24, 88, $2 + anim_obj ANIM_OBJ_SPEED_LINE, 32, 88, $1 + anim_obj ANIM_OBJ_SPEED_LINE, 40, 88, $0 + anim_obj ANIM_OBJ_SPEED_LINE, 48, 88, $80 + anim_obj ANIM_OBJ_SPEED_LINE, 56, 88, $81 + anim_obj ANIM_OBJ_SPEED_LINE, 64, 88, $82 + anim_wait 12 + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_PUNCH, 136, 56, $0 + anim_wait 6 + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 8 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_USER, $0 + anim_wait 16 + anim_ret + +BattleAnim_ScaryFace: + anim_1gfx ANIM_GFX_BEAM + anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_call BattleAnimSub_EyeBeams + anim_wait 64 + anim_ret + +BattleAnim_FaintAttack: + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 0, SFX_CURSE + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_FADE_MON_TO_WHITE_WAIT_FADE_BACK, $0, BG_EFFECT_USER, $80 + anim_wait 96 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT, 120, 32, $0 + anim_wait 8 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT, 152, 40, $0 + anim_wait 8 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT, 136, 48, $0 + anim_wait 32 + anim_incbgeffect ANIM_BG_FADE_MON_TO_WHITE_WAIT_FADE_BACK + anim_call BattleAnim_ShowMon_0 + anim_wait 4 + anim_ret + +BattleAnim_SweetKiss: + anim_2gfx ANIM_GFX_OBJECTS, ANIM_GFX_ANGELS + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_obj ANIM_OBJ_SWEET_KISS, 96, 40, $0 + anim_sound 0, 1, SFX_SWEET_KISS + anim_wait 32 + anim_sound 0, 1, SFX_SWEET_KISS_2 + anim_obj ANIM_OBJ_HEART, 120, 40, $0 + anim_wait 40 + anim_ret + +BattleAnim_BellyDrum: + anim_2gfx ANIM_GFX_HIT, ANIM_GFX_NOISE + anim_sound 0, 0, SFX_BELLY_DRUM + anim_obj ANIM_OBJ_BELLY_DRUM_HAND, 64, 104, $0 + anim_obj ANIM_OBJ_BELLY_DRUM_NOTE, 64, 92, $f8 + anim_wait 24 + anim_sound 0, 0, SFX_BELLY_DRUM + anim_obj ANIM_OBJ_BELLY_DRUM_HAND, 64, 104, $0 + anim_obj ANIM_OBJ_BELLY_DRUM_NOTE, 64, 92, $f8 + anim_wait 24 + anim_sound 0, 0, SFX_BELLY_DRUM + anim_obj ANIM_OBJ_BELLY_DRUM_HAND, 64, 104, $0 + anim_obj ANIM_OBJ_BELLY_DRUM_NOTE, 64, 92, $f8 + anim_wait 12 + anim_sound 0, 0, SFX_BELLY_DRUM + anim_obj ANIM_OBJ_BELLY_DRUM_HAND, 64, 104, $0 + anim_obj ANIM_OBJ_BELLY_DRUM_NOTE, 64, 92, $f8 + anim_wait 12 + anim_sound 0, 0, SFX_BELLY_DRUM + anim_obj ANIM_OBJ_BELLY_DRUM_HAND, 64, 104, $0 + anim_obj ANIM_OBJ_BELLY_DRUM_NOTE, 64, 92, $f8 + anim_wait 24 + anim_sound 0, 0, SFX_BELLY_DRUM + anim_obj ANIM_OBJ_BELLY_DRUM_HAND, 64, 104, $0 + anim_obj ANIM_OBJ_BELLY_DRUM_NOTE, 64, 92, $f8 + anim_wait 12 + anim_sound 0, 0, SFX_BELLY_DRUM + anim_obj ANIM_OBJ_BELLY_DRUM_HAND, 64, 104, $0 + anim_obj ANIM_OBJ_BELLY_DRUM_NOTE, 64, 92, $f8 + anim_wait 12 + anim_sound 0, 0, SFX_BELLY_DRUM + anim_obj ANIM_OBJ_BELLY_DRUM_HAND, 64, 104, $0 + anim_obj ANIM_OBJ_BELLY_DRUM_NOTE, 64, 92, $f8 + anim_wait 12 + anim_sound 0, 0, SFX_BELLY_DRUM + anim_obj ANIM_OBJ_BELLY_DRUM_HAND, 64, 104, $0 + anim_obj ANIM_OBJ_BELLY_DRUM_NOTE, 64, 92, $f8 + anim_wait 12 + anim_ret + +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 + anim_obj ANIM_OBJ_SLUDGE_BOMB, 64, 92, $10 + anim_wait 36 + anim_call BattleAnimSub_Sludge + anim_wait 64 + anim_ret + +BattleAnim_MudSlap: + anim_1gfx ANIM_GFX_SAND + anim_obp0 $fc + anim_call BattleAnimSub_SandOrMud + anim_ret + +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 + anim_wait 16 + anim_obj ANIM_OBJ_BALL_POOF, 132, 56, $10 + anim_wait 8 + anim_if_param_equal $0, .done +.loop + anim_obj ANIM_OBJ_SMOKE, 132, 60, $20 + anim_wait 8 + anim_loop 5, .loop + anim_wait 128 +.done + anim_ret + +BattleAnim_Spikes: + anim_1gfx ANIM_GFX_MISC + anim_sound 6, 2, SFX_MENU + anim_obj ANIM_OBJ_SPIKES, 48, 88, $20 + anim_wait 8 + anim_sound 6, 2, SFX_MENU + anim_obj ANIM_OBJ_SPIKES, 48, 88, $30 + anim_wait 8 + anim_sound 6, 2, SFX_MENU + anim_obj ANIM_OBJ_SPIKES, 48, 88, $28 + anim_wait 64 + anim_ret + +BattleAnim_ZapCannon: + anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_EXPLOSION + anim_bgp $1b + anim_obp0 $30 + anim_sound 6, 2, SFX_ZAP_CANNON + anim_obj ANIM_OBJ_ZAP_CANNON, 64, 92, $2 + anim_wait 40 + anim_sound 0, 1, SFX_THUNDERSHOCK + anim_obj ANIM_OBJ_THUNDERBOLT_BALL, 136, 56, $2 + anim_wait 16 + anim_obj ANIM_OBJ_SPARKS_CIRCLE_BIG, 136, 56, $0 + anim_wait 128 + anim_ret + +BattleAnim_Foresight: + anim_1gfx ANIM_GFX_SHINE + anim_call BattleAnim_UserObj_1Row + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $0, $0 + anim_sound 0, 1, SFX_FORESIGHT + anim_obj ANIM_OBJ_FORESIGHT, 132, 40, $0 + anim_wait 24 + anim_bgeffect ANIM_BG_FADE_MON_TO_BLACK_REPEATING, $0, BG_EFFECT_TARGET, $40 + anim_wait 64 + anim_incbgeffect ANIM_BG_FADE_MON_TO_BLACK_REPEATING + anim_call BattleAnim_ShowMon_1 + anim_wait 8 + anim_ret + +BattleAnim_DestinyBond: + anim_1gfx ANIM_GFX_ANGELS + anim_bgp $1b + anim_obp0 $0 + anim_if_param_equal $1, .fainted + anim_sound 6, 2, SFX_WHIRLWIND + anim_obj ANIM_OBJ_DESTINY_BOND, 44, 120, $2 + anim_wait 128 + anim_ret + +.fainted: + anim_obj ANIM_OBJ_DESTINY_BOND, 132, 76, $0 + anim_sound 0, 1, SFX_KINESIS + anim_bgeffect ANIM_BG_RETURN_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 32 + anim_ret + +BattleAnim_PerishSong: + anim_1gfx ANIM_GFX_NOISE + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 + anim_sound 0, 2, SFX_PERISH_SONG + anim_obj ANIM_OBJ_PERISH_SONG, 88, 0, $0 + anim_obj ANIM_OBJ_PERISH_SONG, 88, 0, $8 + anim_obj ANIM_OBJ_PERISH_SONG, 88, 0, $10 + anim_obj ANIM_OBJ_PERISH_SONG, 88, 0, $18 + anim_obj ANIM_OBJ_PERISH_SONG, 88, 0, $20 + anim_obj ANIM_OBJ_PERISH_SONG, 88, 0, $28 + anim_obj ANIM_OBJ_PERISH_SONG, 88, 0, $30 + anim_obj ANIM_OBJ_PERISH_SONG, 88, 0, $38 + anim_wait 112 + anim_ret + +BattleAnim_IcyWind: + anim_1gfx ANIM_GFX_SPEED + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 + anim_battlergfx_1row + anim_sound 0, 0, SFX_PSYCHIC +.loop + anim_wait 8 + anim_obj ANIM_OBJ_SHOOTING_SPARKLE, 64, 88, $4 + anim_wait 8 + anim_obj ANIM_OBJ_SHOOTING_SPARKLE, 64, 80, $4 + anim_wait 8 + anim_obj ANIM_OBJ_SHOOTING_SPARKLE, 64, 96, $4 + anim_wait 8 + anim_loop 2, .loop + anim_wait 16 + anim_bgeffect ANIM_BG_BATTLEROBJ_2ROW, $0, BG_EFFECT_USER, $0 + anim_wait 6 + anim_bgeffect ANIM_BG_NIGHT_SHADE, $0, BG_EFFECT_TARGET, $8 + anim_wait 64 + anim_incbgeffect ANIM_BG_NIGHT_SHADE + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_incobj 7 + anim_wait 1 + anim_ret + +BattleAnim_Detect: + anim_1gfx ANIM_GFX_SHINE + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $0, $0 + anim_sound 0, 0, SFX_FORESIGHT + anim_obj ANIM_OBJ_FORESIGHT, 64, 88, $0 + anim_wait 24 + anim_ret + +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 + anim_wait 16 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT_YFIX, 120, 48, $0 + anim_wait 16 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT_YFIX, 144, 64, $0 + anim_wait 16 + anim_ret + +BattleAnim_LockOn: + anim_1gfx ANIM_GFX_MISC + anim_sound 0, 1, SFX_MIND_READER +.loop + anim_obj ANIM_OBJ_LOCK_ON, 132, 48, $3 + anim_obj ANIM_OBJ_LOCK_ON, 132, 48, $12 + anim_obj ANIM_OBJ_LOCK_ON, 132, 48, $20 + anim_obj ANIM_OBJ_LOCK_ON, 132, 48, $31 + anim_wait 16 + anim_loop 2, .loop + anim_wait 32 + anim_ret + +BattleAnim_Outrage: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING, $0, BG_EFFECT_USER, $20 + anim_sound 0, 0, SFX_OUTRAGE + anim_wait 72 + anim_incbgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $3 + anim_sound 0, 1, SFX_MOVE_PUZZLE_PIECE + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 120, 72, $0 + anim_wait 6 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 56, $0 + anim_wait 6 + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 152, 40, $0 + anim_wait 16 + anim_ret + +BattleAnim_Sandstorm: + anim_1gfx ANIM_GFX_POWDER + anim_obj ANIM_OBJ_SANDSTORM, 88, 0, $0 + anim_wait 8 + anim_obj ANIM_OBJ_SANDSTORM, 72, 0, $1 + anim_wait 8 + anim_obj ANIM_OBJ_SANDSTORM, 56, 0, $2 +.loop + anim_sound 0, 1, SFX_MENU + anim_wait 8 + anim_loop 16, .loop + anim_wait 8 + anim_ret + +BattleAnim_GigaDrain: + anim_2gfx ANIM_GFX_BUBBLE, ANIM_GFX_CHARGE + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_FADE_MONS_TO_BLACK_REPEATING, $0, BG_EFFECT_TARGET, $10 + anim_sound 6, 3, SFX_GIGA_DRAIN + anim_call BattleAnimSub_Drain + anim_wait 48 + anim_wait 128 + anim_incbgeffect ANIM_BG_FADE_MONS_TO_BLACK_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_wait 1 + anim_1gfx ANIM_GFX_SHINE + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $0, $0 +.loop + anim_sound 0, 0, SFX_METRONOME + anim_obj ANIM_OBJ_GLIMMER, 24, 64, $0 + anim_wait 5 + anim_obj ANIM_OBJ_GLIMMER, 56, 104, $0 + anim_wait 5 + anim_obj ANIM_OBJ_GLIMMER, 24, 104, $0 + anim_wait 5 + anim_obj ANIM_OBJ_GLIMMER, 56, 64, $0 + anim_wait 5 + anim_obj ANIM_OBJ_GLIMMER, 40, 84, $0 + anim_wait 5 + anim_loop 2, .loop + anim_wait 32 + anim_ret + +BattleAnim_Endure: + anim_1gfx ANIM_GFX_SPEED + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING, $0, BG_EFFECT_USER, $20 + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 +.loop + anim_sound 0, 0, SFX_SWORDS_DANCE + anim_obj ANIM_OBJ_FOCUS, 44, 108, $6 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 36, 108, $6 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 52, 108, $8 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 28, 108, $8 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 60, 108, $6 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 20, 108, $8 + anim_wait 2 + anim_obj ANIM_OBJ_FOCUS, 68, 108, $8 + anim_wait 2 + anim_loop 5, .loop + anim_wait 8 + anim_incbgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Charm: + anim_1gfx ANIM_GFX_OBJECTS + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_WOBBLE_MON, $0, BG_EFFECT_USER, $0 + anim_sound 0, 0, SFX_ATTRACT + anim_obj ANIM_OBJ_HEART, 64, 80, $0 + anim_wait 32 + anim_incbgeffect ANIM_BG_WOBBLE_MON + anim_call BattleAnim_ShowMon_0 + anim_wait 4 + anim_ret + +BattleAnim_Rollout: + anim_1gfx ANIM_GFX_HIT + anim_sound 0, 0, SFX_SPARK + anim_call BattleAnim_TargetObj_2Row + anim_bgeffect ANIM_BG_ROLLOUT, $60, $1, $1 + anim_bgeffect ANIM_BG_BODY_SLAM, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT_BIG, 136, 40, $0 + anim_wait 8 + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_FalseSwipe: + anim_2gfx ANIM_GFX_SHINE, ANIM_GFX_CUT + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $0, $0 + anim_sound 0, 1, SFX_CUT + anim_obj ANIM_OBJ_CUT_LONG_DOWN_LEFT, 152, 40, $0 + anim_wait 4 + anim_obj ANIM_OBJ_GLIMMER, 136, 40, $0 + anim_wait 32 + anim_ret + +BattleAnim_Swagger: + anim_2gfx ANIM_GFX_MISC, ANIM_GFX_WIND +.loop + anim_sound 0, 0, SFX_MENU + anim_obj ANIM_OBJ_SWAGGER, 72, 88, $44 + anim_wait 32 + anim_loop 2, .loop + anim_wait 32 + anim_sound 0, 1, SFX_KINESIS_2 + anim_obj ANIM_OBJ_ANGER, 104, 40, $0 + anim_wait 40 + anim_ret + +BattleAnim_MilkDrink: + anim_2gfx ANIM_GFX_MISC, ANIM_GFX_BUBBLE + anim_call BattleAnim_TargetObj_1Row + anim_obj ANIM_OBJ_MILK_DRINK, 74, 104, $0 + anim_wait 16 + anim_bgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING, $0, BG_EFFECT_USER, $40 + anim_sound 0, 0, SFX_MILK_DRINK +.loop + anim_obj ANIM_OBJ_RECOVER, 44, 88, $20 + anim_wait 8 + anim_loop 8, .loop + anim_wait 128 + anim_incbgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_ret + +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 + anim_obj ANIM_OBJ_THUNDER_WAVE, 48, 92, $0 + anim_wait 24 + anim_setobj $1, $3 + anim_wait 1 + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_TACKLE, $0, BG_EFFECT_USER, $0 + anim_sound 0, 0, SFX_SPARK + anim_wait 16 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 4 + anim_incobj 2 + anim_wait 1 + anim_sound 0, 1, SFX_THUNDERSHOCK + anim_obj ANIM_OBJ_THUNDERBOLT_BALL, 136, 56, $2 + anim_obj ANIM_OBJ_SPARKS_CIRCLE, 136, 56, $0 + anim_wait 32 + anim_ret + +BattleAnim_FuryCutter: + anim_1gfx ANIM_GFX_CUT +.loop + anim_sound 0, 1, SFX_CUT + anim_if_param_and %00000001, .obj1 + anim_obj ANIM_OBJ_CUT_LONG_DOWN_LEFT, 152, 40, $0 + anim_jump .okay + +.obj1 + anim_obj ANIM_OBJ_CUT_LONG_DOWN_RIGHT, 112, 40, $0 +.okay + anim_wait 16 + anim_jumpuntil .loop + anim_ret + +BattleAnim_SteelWing: + anim_1gfx ANIM_GFX_REFLECT + anim_obp0 $0 + anim_sound 0, 0, SFX_RAGE + anim_call BattleAnim_TargetObj_1Row + anim_call BattleAnimSub_Metallic + anim_call BattleAnim_ShowMon_0 + anim_1gfx ANIM_GFX_HIT + anim_resetobp0 + anim_sound 0, 1, SFX_WING_ATTACK + anim_obj ANIM_OBJ_HIT_YFIX, 148, 56, $0 + anim_obj ANIM_OBJ_HIT_YFIX, 116, 56, $0 + anim_wait 6 + anim_sound 0, 1, SFX_WING_ATTACK + anim_obj ANIM_OBJ_HIT_YFIX, 144, 56, $0 + anim_obj ANIM_OBJ_HIT_YFIX, 120, 56, $0 + anim_wait 6 + anim_sound 0, 1, SFX_WING_ATTACK + anim_obj ANIM_OBJ_HIT_YFIX, 140, 56, $0 + anim_obj ANIM_OBJ_HIT_YFIX, 124, 56, $0 + anim_wait 16 + anim_ret + +BattleAnim_MeanLook: + anim_1gfx ANIM_GFX_PSYCHIC + anim_obp0 $e0 + anim_sound 0, 1, SFX_MEAN_LOOK + anim_obj ANIM_OBJ_MEAN_LOOK, 148, 32, $0 + anim_wait 5 + anim_obj ANIM_OBJ_MEAN_LOOK, 116, 64, $0 + anim_wait 5 + anim_obj ANIM_OBJ_MEAN_LOOK, 148, 64, $0 + anim_wait 5 + anim_obj ANIM_OBJ_MEAN_LOOK, 116, 32, $0 + anim_wait 5 + anim_obj ANIM_OBJ_MEAN_LOOK, 132, 48, $0 + anim_wait 128 + anim_ret + +BattleAnim_Attract: + anim_1gfx ANIM_GFX_OBJECTS +.loop + anim_sound 0, 0, SFX_ATTRACT + anim_obj ANIM_OBJ_ATTRACT, 44, 80, $2 + anim_wait 8 + anim_loop 5, .loop + anim_wait 128 + anim_wait 64 + anim_ret + +BattleAnim_SleepTalk: + anim_1gfx ANIM_GFX_STATUS +.loop + anim_sound 0, 0, SFX_STRENGTH + anim_obj ANIM_OBJ_ASLEEP, 64, 80, $0 + anim_wait 40 + anim_loop 2, .loop + anim_wait 32 + anim_ret + +BattleAnim_HealBell: + anim_2gfx ANIM_GFX_MISC, ANIM_GFX_NOISE + anim_obj ANIM_OBJ_HEAL_BELL, 72, 56, $0 + anim_wait 32 +.loop + anim_sound 0, 0, SFX_HEAL_BELL + anim_obj ANIM_OBJ_HEAL_BELL_NOTE, 72, 52, $0 + anim_wait 8 + anim_sound 0, 0, SFX_HEAL_BELL + anim_obj ANIM_OBJ_HEAL_BELL_NOTE, 72, 52, $1 + anim_wait 8 + anim_sound 0, 0, SFX_HEAL_BELL + anim_obj ANIM_OBJ_HEAL_BELL_NOTE, 72, 52, $2 + anim_wait 8 + anim_sound 0, 0, SFX_HEAL_BELL + anim_obj ANIM_OBJ_HEAL_BELL_NOTE, 72, 52, $0 + anim_wait 8 + anim_sound 0, 0, SFX_HEAL_BELL + anim_obj ANIM_OBJ_HEAL_BELL_NOTE, 72, 52, $2 + anim_wait 8 + anim_loop 4, .loop + anim_wait 64 + anim_ret + +BattleAnim_Return: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_2Row + anim_bgeffect ANIM_BG_BOUNCE_DOWN, $0, BG_EFFECT_USER, $0 + anim_sound 0, 0, SFX_RETURN + anim_wait 64 + anim_incbgeffect ANIM_BG_BOUNCE_DOWN + anim_wait 32 + anim_bgeffect ANIM_BG_BODY_SLAM, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT_BIG, 136, 40, $0 + anim_wait 8 + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Present: + anim_2gfx ANIM_GFX_STATUS, ANIM_GFX_BUBBLE + anim_sound 0, 1, SFX_PRESENT + anim_obj ANIM_OBJ_PRESENT, 64, 88, $6c + anim_wait 56 + anim_obj ANIM_OBJ_AMNESIA, 104, 48, $0 + anim_wait 48 + anim_incobj 2 + anim_if_param_equal $3, .heal + anim_incobj 1 + anim_wait 1 + anim_1gfx ANIM_GFX_EXPLOSION + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $12 +.loop + anim_call BattleAnimSub_Explosion2 + anim_wait 16 + anim_jumpuntil .loop + anim_ret + +.heal + anim_sound 0, 1, SFX_METRONOME +.loop2 + anim_obj ANIM_OBJ_RECOVER, 132, 48, $24 + anim_wait 8 + anim_loop 8, .loop2 + anim_wait 128 + anim_ret + +BattleAnim_Frustration: + anim_1gfx ANIM_GFX_MISC + anim_sound 0, 0, SFX_KINESIS_2 + anim_obj ANIM_OBJ_ANGER, 72, 80, $0 + anim_wait 40 + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_WOBBLE_MON, $0, BG_EFFECT_USER, $0 + anim_wait 8 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT_YFIX, 120, 48, $0 + anim_wait 8 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT_YFIX, 152, 48, $0 + anim_wait 8 + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT_YFIX, 136, 48, $0 + anim_wait 8 + anim_incbgeffect ANIM_BG_WOBBLE_MON + anim_wait 1 + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_Safeguard: + anim_1gfx ANIM_GFX_MISC + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_obj ANIM_OBJ_SAFEGUARD, 80, 80, $0 + anim_obj ANIM_OBJ_SAFEGUARD, 80, 80, $d + anim_obj ANIM_OBJ_SAFEGUARD, 80, 80, $1a + anim_obj ANIM_OBJ_SAFEGUARD, 80, 80, $27 + anim_obj ANIM_OBJ_SAFEGUARD, 80, 80, $34 + anim_sound 0, 0, SFX_PROTECT + anim_wait 96 + anim_ret + +BattleAnim_PainSplit: + anim_2gfx ANIM_GFX_HIT, ANIM_GFX_OBJECTS + anim_call BattleAnim_TargetObj_2Row + anim_bgeffect ANIM_BG_BODY_SLAM, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_sound 0, 1, SFX_TACKLE + anim_obj ANIM_OBJ_HIT, 112, 48, $0 + anim_obj ANIM_OBJ_HIT, 76, 96, $0 + anim_wait 8 + anim_call BattleAnim_ShowMon_0 + anim_wait 1 + anim_ret + +BattleAnim_SacredFire: + anim_1gfx ANIM_GFX_FIRE + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 +.loop + anim_sound 0, 0, SFX_EMBER + anim_obj ANIM_OBJ_SACRED_FIRE, 48, 104, $0 + anim_wait 8 + anim_loop 8, .loop + anim_wait 96 + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_TACKLE, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_sound 0, 1, SFX_EMBER + anim_obj ANIM_OBJ_FIRE_BLAST, 136, 48, $1 + anim_obj ANIM_OBJ_FIRE_BLAST, 136, 48, $4 + anim_obj ANIM_OBJ_FIRE_BLAST, 136, 48, $5 + anim_wait 8 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 4 + anim_incobj 9 + anim_wait 8 + anim_ret + +BattleAnim_Magnitude: + anim_1gfx ANIM_GFX_ROCKS +.loop + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $e, $4, $0 + anim_sound 0, 1, SFX_STRENGTH + anim_obj ANIM_OBJ_SMALL_ROCK, 128, 64, $40 + anim_wait 2 + anim_obj ANIM_OBJ_SMALL_ROCK, 120, 68, $30 + anim_wait 2 + anim_obj ANIM_OBJ_SMALL_ROCK, 152, 68, $30 + anim_wait 2 + anim_obj ANIM_OBJ_SMALL_ROCK, 144, 64, $40 + anim_wait 2 + anim_obj ANIM_OBJ_SMALL_ROCK, 136, 68, $30 + anim_wait 2 + anim_jumpuntil .loop + anim_wait 96 + anim_ret + +BattleAnim_Dynamicpunch: + anim_2gfx ANIM_GFX_HIT, ANIM_GFX_EXPLOSION + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_PUNCH_SHAKE, 136, 56, $43 + anim_wait 16 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $12 + anim_call BattleAnimSub_Explosion2 + anim_wait 16 + anim_ret + +BattleAnim_Megahorn: + anim_2gfx ANIM_GFX_HORN, ANIM_GFX_HIT + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $40, $2, $0 + anim_wait 48 + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $3 + anim_obj ANIM_OBJ_HORN, 72, 80, $1 + anim_sound 0, 1, SFX_HORN_ATTACK + anim_wait 16 + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 56, $0 + anim_wait 16 + anim_ret + +BattleAnim_Dragonbreath: + anim_1gfx ANIM_GFX_FIRE + anim_sound 6, 2, SFX_EMBER +.loop + anim_obj ANIM_OBJ_DRAGONBREATH, 64, 92, $4 + anim_wait 4 + anim_loop 10, .loop + anim_wait 64 + anim_ret + +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 BattleAnimSub_Return + anim_wait 64 + anim_ret + +BattleAnim_Encore: + anim_1gfx ANIM_GFX_OBJECTS + anim_obj ANIM_OBJ_ENCORE_HAND, 64, 80, $90 + anim_obj ANIM_OBJ_ENCORE_HAND, 64, 80, $10 + anim_sound 0, 0, SFX_ENCORE + anim_wait 16 + anim_obj ANIM_OBJ_ENCORE_STAR, 64, 72, $2c + anim_wait 32 + anim_obj ANIM_OBJ_ENCORE_STAR, 64, 72, $34 + anim_wait 16 + anim_ret + +BattleAnim_Pursuit: + anim_1gfx ANIM_GFX_HIT + anim_if_param_equal $1, .pursued + anim_sound 0, 1, SFX_COMET_PUNCH + anim_obj ANIM_OBJ_HIT_YFIX, 136, 56, $0 + anim_wait 16 + anim_ret + +.pursued: + anim_bgeffect ANIM_BG_HIDE_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 4 + anim_call BattleAnim_UserObj_1Row + anim_obj ANIM_OBJ_BETA_PURSUIT, 132, 64, $0 + anim_wait 64 + anim_obj ANIM_OBJ_BETA_PURSUIT, 132, 64, $1 + anim_sound 0, 1, SFX_BALL_POOF + anim_bgeffect ANIM_BG_ENTER_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 64 + anim_incobj 3 + anim_wait 16 + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 120, 56, $0 + anim_bgeffect ANIM_BG_BETA_PURSUIT, $0, BG_EFFECT_TARGET, $0 + anim_wait 16 + anim_call BattleAnim_ShowMon_1 + anim_wait 1 + anim_ret + +BattleAnim_RapidSpin: + anim_2gfx ANIM_GFX_WIND, ANIM_GFX_HIT + anim_obp0 $e4 +.loop + anim_sound 0, 0, SFX_MENU + anim_obj ANIM_OBJ_RAPID_SPIN, 44, 112, $0 + anim_wait 2 + anim_loop 5, .loop + anim_wait 24 + anim_call BattleAnim_TargetObj_2Row + anim_bgeffect ANIM_BG_BODY_SLAM, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_resetobp0 + anim_sound 0, 1, SFX_MEGA_KICK + anim_obj ANIM_OBJ_HIT, 136, 40, $0 + anim_wait 8 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 4 + anim_incobj 6 + anim_wait 1 + anim_ret + +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 + anim_wait 2 + anim_obj ANIM_OBJ_FLOWER, 64, 80, $2 + anim_wait 96 + anim_obp0 $54 + anim_sound 0, 1, SFX_SWEET_SCENT_2 + anim_obj ANIM_OBJ_COTTON, 136, 40, $15 + anim_obj ANIM_OBJ_COTTON, 136, 40, $2a + anim_obj ANIM_OBJ_COTTON, 136, 40, $3f + anim_wait 128 + anim_ret + +BattleAnim_IronTail: + anim_1gfx ANIM_GFX_REFLECT + anim_obp0 $0 + anim_sound 0, 0, SFX_RAGE + anim_call BattleAnim_TargetObj_1Row + anim_call BattleAnimSub_Metallic + anim_wait 4 + anim_1gfx ANIM_GFX_HIT + anim_resetobp0 + anim_bgeffect ANIM_BG_WOBBLE_MON, $0, BG_EFFECT_USER, $0 + anim_wait 16 + anim_sound 0, 1, SFX_MEGA_KICK + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 48, $0 + anim_wait 16 + anim_incbgeffect ANIM_BG_WOBBLE_MON + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnim_MetalClaw: + anim_1gfx ANIM_GFX_REFLECT + anim_obp0 $0 + anim_sound 0, 0, SFX_RAGE + anim_call BattleAnim_TargetObj_1Row + anim_call BattleAnimSub_Metallic + anim_call BattleAnim_ShowMon_0 + anim_1gfx ANIM_GFX_CUT + anim_resetobp0 + anim_sound 0, 1, SFX_SCRATCH + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 144, 48, $0 + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 140, 44, $0 + anim_obj ANIM_OBJ_CUT_DOWN_LEFT, 136, 40, $0 + anim_wait 32 + anim_ret + +BattleAnim_VitalThrow: + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_VITAL_THROW, $0, BG_EFFECT_USER, $0 + anim_wait 16 + anim_sound 0, 0, SFX_MENU + anim_obj ANIM_OBJ_HIT, 64, 96, $0 + anim_wait 8 + anim_sound 0, 0, SFX_MENU + anim_obj ANIM_OBJ_HIT, 56, 88, $0 + anim_wait 8 + anim_sound 0, 0, SFX_MENU + anim_obj ANIM_OBJ_HIT, 68, 104, $0 + anim_wait 8 + anim_incbgeffect ANIM_BG_VITAL_THROW + anim_wait 16 + anim_call BattleAnim_ShowMon_0 + anim_sound 0, 1, SFX_MEGA_PUNCH + anim_obj ANIM_OBJ_HIT_BIG, 132, 56, $0 + anim_wait 16 + anim_ret + +BattleAnim_MorningSun: + anim_1gfx ANIM_GFX_SHINE + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $0, $0 + anim_sound 0, 0, SFX_MORNING_SUN +.loop + anim_obj ANIM_OBJ_MORNING_SUN, 16, 48, $88 + anim_wait 6 + anim_loop 5, .loop + anim_wait 32 + anim_if_param_equal 0, .zero + anim_call BattleAnimSub_Glimmer + anim_ret + +.zero + anim_call BattleAnimSub_Glimmer2 + anim_ret + +BattleAnim_Synthesis: + anim_1gfx ANIM_GFX_SHINE + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING, $0, BG_EFFECT_USER, $40 + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $0, $0 + anim_sound 0, 0, SFX_OUTRAGE + anim_wait 72 + anim_incbgeffect ANIM_BG_FADE_MON_TO_LIGHT_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_if_param_equal $1, .one + anim_call BattleAnimSub_Glimmer + anim_ret + +.one + anim_call BattleAnimSub_Glimmer2 + anim_ret + +BattleAnim_Crunch: + anim_2gfx ANIM_GFX_CUT, ANIM_GFX_HIT + anim_bgp $1b + anim_obp0 $c0 + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $20, $2, $0 + anim_obj ANIM_OBJ_BITE, 136, 56, $a8 + anim_obj ANIM_OBJ_BITE, 136, 56, $28 + anim_wait 8 + anim_sound 0, 1, SFX_BITE + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 144, 48, $18 + anim_wait 16 + anim_sound 0, 1, SFX_BITE + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 128, 64, $18 + anim_wait 8 + anim_ret + +BattleAnim_Moonlight: + anim_1gfx ANIM_GFX_SHINE + anim_bgp $1b + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $0, $0 + anim_obj ANIM_OBJ_MOONLIGHT, 0, 40, $0 + anim_obj ANIM_OBJ_MOONLIGHT, 16, 56, $0 + anim_obj ANIM_OBJ_MOONLIGHT, 32, 72, $0 + anim_obj ANIM_OBJ_MOONLIGHT, 48, 88, $0 + anim_obj ANIM_OBJ_MOONLIGHT, 64, 104, $0 + anim_wait 1 + anim_sound 0, 0, SFX_MOONLIGHT + anim_wait 63 + anim_if_param_equal $3, .three + anim_call BattleAnimSub_Glimmer + anim_ret + +.three + anim_call BattleAnimSub_Glimmer2 + anim_ret + +BattleAnim_HiddenPower: + anim_1gfx ANIM_GFX_CHARGE + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING, $0, BG_EFFECT_USER, $20 + anim_bgeffect ANIM_BG_CYCLE_MID_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $0 + anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $8 + anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $10 + anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $18 + anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $20 + anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $28 + anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $30 + anim_obj ANIM_OBJ_HIDDEN_POWER, 44, 88, $38 +.loop + anim_sound 0, 0, SFX_SWORDS_DANCE + anim_wait 8 + anim_loop 12, .loop + anim_incbgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_wait 1 + anim_incobj 2 + anim_incobj 3 + anim_incobj 4 + anim_incobj 5 + anim_incobj 6 + anim_incobj 7 + anim_incobj 8 + anim_incobj 9 + anim_wait 16 + anim_1gfx ANIM_GFX_HIT + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 56, $0 + anim_wait 32 + anim_ret + +BattleAnim_CrossChop: + anim_1gfx ANIM_GFX_CUT + anim_sound 0, 1, SFX_CUT + anim_obj ANIM_OBJ_CROSS_CHOP1, 152, 40, $0 + anim_obj ANIM_OBJ_CROSS_CHOP2, 120, 72, $0 + anim_wait 8 + anim_bgeffect ANIM_BG_SHAKE_SCREEN_X, $58, $2, $0 + anim_wait 92 + anim_sound 0, 1, SFX_VICEGRIP + anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $8, $10 + anim_wait 16 + anim_ret + +BattleAnim_Twister: + anim_2gfx ANIM_GFX_WIND, ANIM_GFX_HIT +.loop1 + anim_sound 0, 0, SFX_RAZOR_WIND + anim_obj ANIM_OBJ_GUST, 64, 112, $0 + anim_wait 6 + anim_loop 9, .loop1 +.loop2 + anim_sound 0, 0, SFX_RAZOR_WIND + anim_wait 8 + anim_loop 8, .loop2 + anim_incobj 1 + anim_incobj 2 + anim_incobj 3 + anim_incobj 4 + anim_incobj 5 + anim_incobj 6 + anim_incobj 7 + anim_incobj 8 + anim_incobj 9 + anim_wait 64 + anim_obj ANIM_OBJ_HIT_YFIX, 144, 64, $18 +.loop3 + anim_sound 0, 1, SFX_RAZOR_WIND + anim_wait 8 + anim_loop 4, .loop3 + anim_obj ANIM_OBJ_HIT_YFIX, 128, 32, $18 +.loop4 + anim_sound 0, 1, SFX_RAZOR_WIND + anim_wait 8 + anim_loop 4, .loop4 + anim_incobj 1 + anim_incobj 2 + anim_incobj 3 + anim_incobj 4 + anim_incobj 5 + anim_incobj 6 + anim_incobj 7 + anim_incobj 8 + anim_incobj 9 + anim_wait 32 + anim_ret + +BattleAnim_RainDance: + anim_1gfx ANIM_GFX_WATER + anim_bgp $f8 + anim_obp0 $7c + anim_sound 0, 1, SFX_RAIN_DANCE + anim_obj ANIM_OBJ_RAIN, 88, 0, $0 + anim_wait 8 + anim_obj ANIM_OBJ_RAIN, 88, 0, $1 + anim_wait 8 + anim_obj ANIM_OBJ_RAIN, 88, 0, $2 + anim_wait 128 + anim_ret + +BattleAnim_SunnyDay: + anim_1gfx ANIM_GFX_WATER + anim_bgp $90 + anim_sound 0, 1, SFX_MORNING_SUN + anim_obj ANIM_OBJ_RAIN, 88, 0, $2 + anim_wait 8 + anim_obj ANIM_OBJ_RAIN, 88, 0, $2 + anim_wait 8 + anim_obj ANIM_OBJ_RAIN, 88, 0, $2 + anim_wait 128 + anim_ret + +BattleAnim_MirrorCoat: + anim_2gfx ANIM_GFX_REFLECT, ANIM_GFX_SPEED + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 +.loop + anim_sound 0, 0, SFX_SHINE + anim_obj ANIM_OBJ_SCREEN, 72, 80, $0 + anim_obj ANIM_OBJ_SHOOTING_SPARKLE, 64, 72, $4 + anim_wait 8 + anim_obj ANIM_OBJ_SHOOTING_SPARKLE, 64, 88, $4 + anim_wait 8 + anim_obj ANIM_OBJ_SHOOTING_SPARKLE, 64, 80, $4 + anim_wait 8 + anim_obj ANIM_OBJ_SHOOTING_SPARKLE, 64, 96, $4 + anim_wait 8 + anim_loop 3, .loop + anim_wait 32 + anim_ret + +BattleAnim_PsychUp: + anim_1gfx ANIM_GFX_STATUS + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING, $0, BG_EFFECT_USER, $20 + anim_sound 0, 0, SFX_PSYBEAM + anim_obj ANIM_OBJ_PSYCH_UP, 44, 88, $0 + anim_obj ANIM_OBJ_PSYCH_UP, 44, 88, $10 + anim_obj ANIM_OBJ_PSYCH_UP, 44, 88, $20 + anim_obj ANIM_OBJ_PSYCH_UP, 44, 88, $30 + anim_wait 64 + anim_incbgeffect ANIM_BG_CYCLE_MON_LIGHT_DARK_REPEATING + anim_call BattleAnim_ShowMon_0 + anim_wait 16 + anim_ret + +BattleAnim_Extremespeed: + anim_2gfx ANIM_GFX_SPEED, ANIM_GFX_CUT + anim_bgeffect ANIM_BG_HIDE_MON, $0, BG_EFFECT_USER, $0 + anim_sound 0, 0, SFX_MENU + anim_obj ANIM_OBJ_SPEED_LINE, 24, 88, $2 + anim_obj ANIM_OBJ_SPEED_LINE, 32, 88, $1 + anim_obj ANIM_OBJ_SPEED_LINE, 40, 88, $0 + anim_obj ANIM_OBJ_SPEED_LINE, 48, 88, $80 + anim_obj ANIM_OBJ_SPEED_LINE, 56, 88, $81 + anim_obj ANIM_OBJ_SPEED_LINE, 64, 88, $82 + anim_wait 12 + anim_sound 0, 1, SFX_CUT + anim_obj ANIM_OBJ_CUT_LONG_DOWN_LEFT, 152, 40, $0 + anim_wait 32 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_USER, $0 + anim_wait 16 + anim_ret + +BattleAnim_Ancientpower: + anim_2gfx ANIM_GFX_ROCKS, ANIM_GFX_HIT + anim_sound 0, 0, SFX_SPARK + anim_obj ANIM_OBJ_ANCIENTPOWER, 64, 108, $20 + anim_wait 8 + anim_sound 0, 0, SFX_SPARK + anim_obj ANIM_OBJ_ANCIENTPOWER, 75, 102, $20 + anim_wait 8 + anim_sound 0, 0, SFX_SPARK + anim_obj ANIM_OBJ_ANCIENTPOWER, 85, 97, $20 + anim_wait 8 + anim_sound 0, 0, SFX_SPARK + anim_obj ANIM_OBJ_ANCIENTPOWER, 96, 92, $20 + anim_wait 8 + anim_sound 0, 1, SFX_SPARK + anim_obj ANIM_OBJ_ANCIENTPOWER, 106, 87, $20 + anim_wait 8 + anim_sound 0, 1, SFX_SPARK + anim_obj ANIM_OBJ_ANCIENTPOWER, 116, 82, $20 + anim_wait 8 + anim_sound 0, 1, SFX_SPARK + anim_obj ANIM_OBJ_ANCIENTPOWER, 126, 77, $20 + anim_wait 8 + anim_sound 0, 1, SFX_SPARK + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 56, $0 + anim_wait 6 + anim_ret + +BattleAnim_ShadowBall: + anim_2gfx ANIM_GFX_EGG, ANIM_GFX_SMOKE + anim_bgp $1b + anim_sound 6, 2, SFX_SLUDGE_BOMB + anim_obj ANIM_OBJ_SHADOW_BALL, 64, 92, $2 + anim_wait 32 + anim_obj ANIM_OBJ_BALL_POOF, 132, 56, $10 + anim_wait 24 + anim_ret + +BattleAnim_FutureSight: + anim_1gfx ANIM_GFX_WIND + anim_bgeffect ANIM_BG_CYCLE_OBPALS_GRAY_AND_YELLOW, $0, $2, $0 + anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0 + anim_bgeffect ANIM_BG_PSYCHIC, $0, $0, $0 + anim_obj ANIM_OBJ_AGILITY, 8, 24, $10 + anim_obj ANIM_OBJ_AGILITY, 8, 48, $2 + anim_obj ANIM_OBJ_AGILITY, 8, 88, $8 + anim_wait 4 + anim_obj ANIM_OBJ_AGILITY, 8, 32, $6 + anim_obj ANIM_OBJ_AGILITY, 8, 56, $c + anim_obj ANIM_OBJ_AGILITY, 8, 80, $4 + anim_obj ANIM_OBJ_AGILITY, 8, 104, $e +.loop + anim_sound 0, 0, SFX_THROW_BALL + anim_wait 16 + anim_loop 4, .loop + anim_incbgeffect ANIM_BG_PSYCHIC + anim_ret + +BattleAnim_RockSmash: + anim_2gfx ANIM_GFX_ROCKS, ANIM_GFX_HIT + anim_sound 0, 1, SFX_SPARK + anim_obj ANIM_OBJ_HIT_YFIX, 128, 56, $0 + anim_sound 0, 1, SFX_SPARK + anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $28 + anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $5c + anim_sound 0, 1, SFX_SPARK + anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $10 + anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $e8 + anim_sound 0, 1, SFX_SPARK + anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $9c + anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $d0 + anim_wait 6 + anim_sound 0, 1, SFX_SPARK + anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $1c + anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $50 + anim_sound 0, 1, SFX_SPARK + anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $dc + anim_obj ANIM_OBJ_ROCK_SMASH, 128, 64, $90 + anim_wait 32 + anim_ret + +BattleAnim_Whirlpool: + anim_1gfx ANIM_GFX_WIND + anim_bgeffect ANIM_BG_WHIRLPOOL, $0, $0, $0 + anim_sound 0, 1, SFX_SURF + anim_wait 16 +.loop + anim_obj ANIM_OBJ_GUST, 132, 72, $0 + anim_wait 6 + anim_loop 9, .loop + anim_wait 64 + anim_incbgeffect ANIM_BG_WHIRLPOOL + anim_wait 1 + anim_ret + +BattleAnim_BeatUp: + anim_if_param_equal $0, .current_mon + anim_sound 0, 0, SFX_BALL_POOF + anim_bgeffect ANIM_BG_RETURN_MON, $0, BG_EFFECT_USER, $0 + anim_wait 16 + anim_beatup + anim_sound 0, 0, SFX_BALL_POOF + anim_bgeffect ANIM_BG_ENTER_MON, $0, BG_EFFECT_USER, $0 + anim_wait 16 +.current_mon + anim_1gfx ANIM_GFX_HIT + anim_call BattleAnim_TargetObj_1Row + anim_bgeffect ANIM_BG_TACKLE, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_sound 0, 1, SFX_BEAT_UP + anim_obj ANIM_OBJ_HIT_BIG_YFIX, 136, 48, $0 + anim_wait 8 + anim_call BattleAnim_ShowMon_0 + anim_ret + +BattleAnimSub_Drain: + anim_obj ANIM_OBJ_DRAIN, 132, 44, $0 + anim_obj ANIM_OBJ_DRAIN, 132, 44, $8 + anim_obj ANIM_OBJ_DRAIN, 132, 44, $10 + anim_obj ANIM_OBJ_DRAIN, 132, 44, $18 + anim_obj ANIM_OBJ_DRAIN, 132, 44, $20 + anim_obj ANIM_OBJ_DRAIN, 132, 44, $28 + anim_obj ANIM_OBJ_DRAIN, 132, 44, $30 + anim_obj ANIM_OBJ_DRAIN, 132, 44, $38 + anim_ret + +BattleAnimSub_EyeBeams: + anim_sound 6, 2, SFX_LEER + anim_obj ANIM_OBJ_LEER, 72, 84, $0 + anim_obj ANIM_OBJ_LEER, 64, 80, $0 + anim_obj ANIM_OBJ_LEER, 88, 76, $0 + anim_obj ANIM_OBJ_LEER, 80, 72, $0 + anim_obj ANIM_OBJ_LEER, 104, 68, $0 + anim_obj ANIM_OBJ_LEER, 96, 64, $0 + anim_obj ANIM_OBJ_LEER, 120, 60, $0 + anim_obj ANIM_OBJ_LEER, 112, 56, $0 + anim_obj ANIM_OBJ_LEER_TIP, 130, 54, $0 + anim_obj ANIM_OBJ_LEER_TIP, 122, 50, $0 + anim_ret + +BattleAnimSub_WarpAway: + anim_sound 0, 0, SFX_WARP_TO + anim_obj ANIM_OBJ_WARP, 44, 108, $0 + anim_obj ANIM_OBJ_WARP, 44, 100, $0 + anim_obj ANIM_OBJ_WARP, 44, 92, $0 + anim_obj ANIM_OBJ_WARP, 44, 84, $0 + anim_obj ANIM_OBJ_WARP, 44, 76, $0 + anim_obj ANIM_OBJ_WARP, 44, 68, $0 + anim_obj ANIM_OBJ_WARP, 44, 60, $0 + anim_ret + +BattleAnimSub_Beam: + anim_sound 0, 0, SFX_HYPER_BEAM + anim_obj ANIM_OBJ_BEAM, 64, 92, $0 + anim_wait 4 + anim_sound 0, 0, SFX_HYPER_BEAM + anim_obj ANIM_OBJ_BEAM, 80, 84, $0 + anim_wait 4 + anim_sound 0, 1, SFX_HYPER_BEAM + anim_obj ANIM_OBJ_BEAM, 96, 76, $0 + anim_wait 4 + anim_sound 0, 1, SFX_HYPER_BEAM + anim_obj ANIM_OBJ_BEAM, 112, 68, $0 + anim_obj ANIM_OBJ_BEAM_TIP, 126, 62, $0 + anim_ret + +BattleAnimSub_Explosion1: + anim_sound 0, 0, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION1, 24, 64, $0 + anim_wait 5 + anim_sound 0, 0, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION1, 56, 104, $0 + anim_wait 5 + anim_sound 0, 0, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION1, 24, 104, $0 + anim_wait 5 + anim_sound 0, 0, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION1, 56, 64, $0 + anim_wait 5 + anim_sound 0, 0, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION1, 40, 84, $0 + anim_ret + +BattleAnimSub_Explosion2: + anim_sound 0, 1, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION1, 148, 32, $0 + anim_wait 5 + anim_sound 0, 1, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION1, 116, 72, $0 + anim_wait 5 + anim_sound 0, 1, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION1, 148, 72, $0 + anim_wait 5 + anim_sound 0, 1, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION1, 116, 32, $0 + anim_wait 5 + anim_sound 0, 1, SFX_EGG_BOMB + anim_obj ANIM_OBJ_EXPLOSION1, 132, 52, $0 + anim_ret + +BattleAnimSub_Sound: + anim_obj ANIM_OBJ_SOUND, 64, 76, $0 + anim_obj ANIM_OBJ_SOUND, 64, 88, $1 + anim_obj ANIM_OBJ_SOUND, 64, 100, $2 + anim_ret + +BattleAnimSub_Fire: + anim_sound 0, 1, SFX_EMBER +.loop + anim_obj ANIM_OBJ_BURNED, 136, 56, $10 + anim_obj ANIM_OBJ_BURNED, 136, 56, $90 + anim_wait 4 + anim_loop 4, .loop + anim_ret + +BattleAnimSub_Ice: + anim_sound 0, 1, SFX_SHINE + anim_obj ANIM_OBJ_ICE, 128, 42, $0 + anim_wait 6 + anim_sound 0, 1, SFX_SHINE + anim_obj ANIM_OBJ_ICE, 144, 70, $0 + anim_wait 6 + anim_sound 0, 1, SFX_SHINE + anim_obj ANIM_OBJ_ICE, 120, 56, $0 + anim_wait 6 + anim_sound 0, 1, SFX_SHINE + anim_obj ANIM_OBJ_ICE, 152, 56, $0 + anim_wait 6 + anim_sound 0, 1, SFX_SHINE + anim_obj ANIM_OBJ_ICE, 144, 42, $0 + anim_wait 6 + anim_sound 0, 1, SFX_SHINE + anim_obj ANIM_OBJ_ICE, 128, 70, $0 + anim_ret + +BattleAnimSub_Sludge: +.loop + anim_sound 0, 1, SFX_TOXIC + anim_obj ANIM_OBJ_SLUDGE, 132, 72, $0 + anim_wait 8 + anim_sound 0, 1, SFX_TOXIC + anim_obj ANIM_OBJ_SLUDGE, 116, 72, $0 + anim_wait 8 + anim_sound 0, 1, SFX_TOXIC + anim_obj ANIM_OBJ_SLUDGE, 148, 72, $0 + anim_wait 8 + anim_loop 5, .loop + anim_ret + +BattleAnimSub_Acid: +.loop + anim_sound 6, 2, SFX_BUBBLEBEAM + anim_obj ANIM_OBJ_ACID, 64, 92, $10 + anim_wait 5 + anim_loop 8, .loop + anim_ret + +BattleAnimSub_Metallic: + anim_sound 0, 0, SFX_SHINE + anim_bgeffect ANIM_BG_FADE_MON_TO_BLACK, $0, BG_EFFECT_USER, $40 + anim_wait 8 + anim_obj ANIM_OBJ_HARDEN, 48, 84, $0 + anim_wait 32 + anim_obj ANIM_OBJ_HARDEN, 48, 84, $0 + anim_wait 64 + anim_incbgeffect ANIM_BG_FADE_MON_TO_BLACK + anim_ret + +BattleAnimSub_SandOrMud: +.loop + anim_sound 6, 2, SFX_MENU + anim_obj ANIM_OBJ_SAND, 64, 92, $4 + anim_wait 4 + anim_loop 8, .loop + anim_wait 32 + anim_ret + +BattleAnimSub_Glimmer: + anim_sound 0, 0, SFX_METRONOME + anim_obj ANIM_OBJ_GLIMMER, 44, 64, $0 + anim_wait 5 + anim_obj ANIM_OBJ_GLIMMER, 24, 96, $0 + anim_wait 5 + anim_obj ANIM_OBJ_GLIMMER, 56, 104, $0 + anim_wait 21 + anim_ret + +BattleAnimSub_Glimmer2: + anim_sound 0, 0, SFX_METRONOME +.loop + anim_obj ANIM_OBJ_GLIMMER, 24, 64, $0 + anim_wait 5 + anim_obj ANIM_OBJ_GLIMMER, 56, 104, $0 + anim_wait 5 + anim_obj ANIM_OBJ_GLIMMER, 24, 104, $0 + anim_wait 5 + anim_obj ANIM_OBJ_GLIMMER, 56, 64, $0 + anim_wait 5 + anim_obj ANIM_OBJ_GLIMMER, 40, 84, $0 + anim_wait 5 + anim_loop 2, .loop + anim_wait 16 + anim_ret + +BattleAnim_TargetObj_1Row: + anim_battlergfx_2row + anim_bgeffect ANIM_BG_BATTLEROBJ_1ROW, $0, BG_EFFECT_TARGET, $0 + anim_wait 6 + anim_ret + +BattleAnim_TargetObj_2Row: + anim_battlergfx_1row + anim_bgeffect ANIM_BG_BATTLEROBJ_2ROW, $0, BG_EFFECT_TARGET, $0 + anim_wait 6 + anim_ret + +BattleAnim_ShowMon_0: + anim_wait 1 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_TARGET, $0 + anim_wait 5 + anim_incobj 1 + anim_wait 1 + anim_ret + +BattleAnim_UserObj_1Row: + anim_battlergfx_2row + anim_bgeffect ANIM_BG_BATTLEROBJ_1ROW, $0, BG_EFFECT_USER, $0 + anim_wait 6 + anim_ret + +BattleAnim_UserObj_2Row: + anim_battlergfx_1row + anim_bgeffect ANIM_BG_BATTLEROBJ_2ROW, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_ret + +BattleAnim_ShowMon_1: + anim_wait 1 + anim_bgeffect ANIM_BG_SHOW_MON, $0, BG_EFFECT_USER, $0 + anim_wait 4 + anim_incobj 1 + anim_wait 1 + anim_ret diff --git a/data/moves/critical_hit_moves.asm b/data/moves/critical_hit_moves.asm new file mode 100644 index 0000000..f0111ed --- /dev/null +++ b/data/moves/critical_hit_moves.asm @@ -0,0 +1,9 @@ +CriticalHitMoves: + dw KARATE_CHOP + dw RAZOR_WIND + dw RAZOR_LEAF + dw CRABHAMMER + dw SLASH + dw AEROBLAST + dw CROSS_CHOP + dw -1 diff --git a/data/moves/descriptions.asm b/data/moves/descriptions.asm new file mode 100644 index 0000000..4feceab --- /dev/null +++ b/data/moves/descriptions.asm @@ -0,0 +1,1266 @@ +MoveDescriptions:: +; entries correspond to move ids (see constants/move_constants.asm) + indirect_table 2, 1 + indirect_entries NUM_ATTACKS, MoveDescriptions1 + indirect_table_end + +MoveDescriptions1: + dw PoundDescription + dw KarateChopDescription + dw DoubleslapDescription + dw CometPunchDescription + dw MegaPunchDescription + dw PayDayDescription + dw FirePunchDescription + dw IcePunchDescription + dw ThunderpunchDescription + dw ScratchDescription + dw VicegripDescription + dw GuillotineDescription + dw RazorWindDescription + dw SwordsDanceDescription + dw CutDescription + dw GustDescription + dw WingAttackDescription + dw WhirlwindDescription + dw FlyDescription + dw BindDescription + dw SlamDescription + dw VineWhipDescription + dw StompDescription + dw DoubleKickDescription + dw MegaKickDescription + dw JumpKickDescription + dw RollingKickDescription + dw SandAttackDescription + dw HeadbuttDescription + dw HornAttackDescription + dw FuryAttackDescription + dw HornDrillDescription + dw TackleDescription + dw BodySlamDescription + dw WrapDescription + dw TakeDownDescription + dw ThrashDescription + dw DoubleEdgeDescription + dw TailWhipDescription + dw PoisonStingDescription + dw TwineedleDescription + dw PinMissileDescription + dw LeerDescription + dw BiteDescription + dw GrowlDescription + dw RoarDescription + dw SingDescription + dw SupersonicDescription + dw SonicboomDescription + dw DisableDescription + dw AcidDescription + dw EmberDescription + dw FlamethrowerDescription + dw MistDescription + dw WaterGunDescription + dw HydroPumpDescription + dw SurfDescription + dw IceBeamDescription + dw BlizzardDescription + dw PsybeamDescription + dw BubblebeamDescription + dw AuroraBeamDescription + dw HyperBeamDescription + dw PeckDescription + dw DrillPeckDescription + dw SubmissionDescription + dw LowKickDescription + dw CounterDescription + dw SeismicTossDescription + dw StrengthDescription + dw AbsorbDescription + dw MegaDrainDescription + dw LeechSeedDescription + dw GrowthDescription + dw RazorLeafDescription + dw SolarbeamDescription + dw PoisonpowderDescription + dw StunSporeDescription + dw SleepPowderDescription + dw PetalDanceDescription + dw StringShotDescription + dw DragonRageDescription + dw FireSpinDescription + dw ThundershockDescription + dw ThunderboltDescription + dw ThunderWaveDescription + dw ThunderDescription + dw RockThrowDescription + dw EarthquakeDescription + dw FissureDescription + dw DigDescription + dw ToxicDescription + dw ConfusionDescription + dw PsychicMDescription + dw HypnosisDescription + dw MeditateDescription + dw AgilityDescription + dw QuickAttackDescription + dw RageDescription + dw TeleportDescription + dw NightShadeDescription + dw MimicDescription + dw ScreechDescription + dw DoubleTeamDescription + dw RecoverDescription + dw HardenDescription + dw MinimizeDescription + dw SmokescreenDescription + dw ConfuseRayDescription + dw WithdrawDescription + dw DefenseCurlDescription + dw BarrierDescription + dw LightScreenDescription + dw HazeDescription + dw ReflectDescription + dw FocusEnergyDescription + dw BideDescription + dw MetronomeDescription + dw MirrorMoveDescription + dw SelfdestructDescription + dw EggBombDescription + dw LickDescription + dw SmogDescription + dw SludgeDescription + dw BoneClubDescription + dw FireBlastDescription + dw WaterfallDescription + dw ClampDescription + dw SwiftDescription + dw SkullBashDescription + dw SpikeCannonDescription + dw ConstrictDescription + dw AmnesiaDescription + dw KinesisDescription + dw SoftboiledDescription + dw HiJumpKickDescription + dw GlareDescription + dw DreamEaterDescription + dw PoisonGasDescription + dw BarrageDescription + dw LeechLifeDescription + dw LovelyKissDescription + dw SkyAttackDescription + dw TransformDescription + dw BubbleDescription + dw DizzyPunchDescription + dw SporeDescription + dw FlashDescription + dw PsywaveDescription + dw SplashDescription + dw AcidArmorDescription + dw CrabhammerDescription + dw ExplosionDescription + dw FurySwipesDescription + dw BonemerangDescription + dw RestDescription + dw RockSlideDescription + dw HyperFangDescription + dw SharpenDescription + dw ConversionDescription + dw TriAttackDescription + dw SuperFangDescription + dw SlashDescription + dw SubstituteDescription + dw StruggleDescription + dw SketchDescription + dw TripleKickDescription + dw ThiefDescription + dw SpiderWebDescription + dw MindReaderDescription + dw NightmareDescription + dw FlameWheelDescription + dw SnoreDescription + dw CurseDescription + dw FlailDescription + dw Conversion2Description + dw AeroblastDescription + dw CottonSporeDescription + dw ReversalDescription + dw SpiteDescription + dw PowderSnowDescription + dw ProtectDescription + dw MachPunchDescription + dw ScaryFaceDescription + dw FaintAttackDescription + dw SweetKissDescription + dw BellyDrumDescription + dw SludgeBombDescription + dw MudSlapDescription + dw OctazookaDescription + dw SpikesDescription + dw ZapCannonDescription + dw ForesightDescription + dw DestinyBondDescription + dw PerishSongDescription + dw IcyWindDescription + dw DetectDescription + dw BoneRushDescription + dw LockOnDescription + dw OutrageDescription + dw SandstormDescription + dw GigaDrainDescription + dw EndureDescription + dw CharmDescription + dw RolloutDescription + dw FalseSwipeDescription + dw SwaggerDescription + dw MilkDrinkDescription + dw SparkDescription + dw FuryCutterDescription + dw SteelWingDescription + dw MeanLookDescription + dw AttractDescription + dw SleepTalkDescription + dw HealBellDescription + dw ReturnDescription + dw PresentDescription + dw FrustrationDescription + dw SafeguardDescription + dw PainSplitDescription + dw SacredFireDescription + dw MagnitudeDescription + dw DynamicpunchDescription + dw MegahornDescription + dw DragonbreathDescription + dw BatonPassDescription + dw EncoreDescription + dw PursuitDescription + dw RapidSpinDescription + dw SweetScentDescription + dw IronTailDescription + dw MetalClawDescription + dw VitalThrowDescription + dw MorningSunDescription + dw SynthesisDescription + dw MoonlightDescription + dw HiddenPowerDescription + dw CrossChopDescription + dw TwisterDescription + dw RainDanceDescription + dw SunnyDayDescription + dw CrunchDescription + dw MirrorCoatDescription + dw PsychUpDescription + dw ExtremespeedDescription + dw AncientpowerDescription + dw ShadowBallDescription + dw FutureSightDescription + dw RockSmashDescription + dw WhirlpoolDescription + dw BeatUpDescription +.IndirectEnd:: + +InvalidMoveDescription: + db "?@" + +PoundDescription: + db "Pounds with fore-" + next "legs or tail.@" + +KarateChopDescription: + db "Has a high criti-" + next "cal hit ratio.@" + +DoubleslapDescription: + db "Repeatedly slaps" + next "2-5 times.@" + +CometPunchDescription: + db "Repeatedly punches" + next "2-5 times.@" + +MegaPunchDescription: + db "A powerful punch" + next "thrown very hard.@" + +PayDayDescription: + db "Throws coins. Gets" + next "them back later.@" + +FirePunchDescription: + db "A fiery punch. May" + next "cause a burn.@" + +IcePunchDescription: + db "An icy punch. May" + next "cause freezing.@" + +ThunderpunchDescription: + db "An electric punch." + next "It may paralyze.@" + +ScratchDescription: + db "Scratches with" + next "sharp claws.@" + +VicegripDescription: + db "Grips with power-" + next "ful pincers.@" + +GuillotineDescription: + db "A one-hit KO," + next "pincer attack.@" + +RazorWindDescription: + db "1st turn: Prepare" + next "2nd turn: Attack@" + +SwordsDanceDescription: + db "A dance that in-" + next "creases ATTACK.@" + +CutDescription: + db "Cuts using claws," + next "scythes, etc.@" + +GustDescription: + db "Whips up a strong" + next "gust of wind.@" + +WingAttackDescription: + db "Strikes the target" + next "with wings.@" + +WhirlwindDescription: + db "Blows away the foe" + next "& ends battle.@" + +FlyDescription: + db "1st turn: Fly" + next "2nd turn: Attack@" + +BindDescription: + db "Binds the target" + next "for 2-5 turns.@" + +SlamDescription: + db "Slams the foe with" + next "a tail, vine, etc.@" + +VineWhipDescription: + db "Whips the foe with" + next "slender vines.@" + +StompDescription: + db "An attack that may" + next "cause flinching.@" + +DoubleKickDescription: + db "A double kicking" + next "attack.@" + +MegaKickDescription: + db "A powerful kicking" + next "attack.@" + +JumpKickDescription: + db "May miss, damaging" + next "the user.@" + +RollingKickDescription: + db "A fast, spinning" + next "kick.@" + +SandAttackDescription: + db "Reduces accuracy" + next "by throwing sand.@" + +HeadbuttDescription: + db "An attack that may" + next "make foe flinch.@" + +HornAttackDescription: + db "An attack using a" + next "horn to jab.@" + +FuryAttackDescription: + db "Jabs the target" + next "2-5 times.@" + +HornDrillDescription: + db "A one-hit KO," + next "drill attack.@" + +TackleDescription: + db "A full-body charge" + next "attack.@" + +BodySlamDescription: + db "An attack that may" + next "cause paralysis.@" + +WrapDescription: + db "Squeezes the foe" + next "for 2-5 turns.@" + +TakeDownDescription: + db "A tackle that also" + next "hurts the user.@" + +ThrashDescription: + db "Works 2-3 turns" + next "and confuses user.@" + +DoubleEdgeDescription: + db "A tackle that also" + next "hurts the user.@" + +TailWhipDescription: + db "Lowers the foe's" + next "DEFENSE.@" + +PoisonStingDescription: + db "An attack that may" + next "poison the target.@" + +TwineedleDescription: + db "Jabs the foe twice" + next "using stingers.@" + +PinMissileDescription: + db "Fires pins that" + next "strike 2-5 times.@" + +LeerDescription: + db "Reduces the foe's" + next "DEFENSE.@" + +BiteDescription: + db "An attack that may" + next "cause flinching.@" + +GrowlDescription: + db "Reduces the foe's" + next "ATTACK.@" + +RoarDescription: + db "Scares wild foes" + next "to end battle.@" + +SingDescription: + db "May cause the foe" + next "to fall asleep.@" + +SupersonicDescription: + db "Sound waves that" + next "cause confusion.@" + +SonicboomDescription: + db "Always inflicts" + next "20HP damage.@" + +DisableDescription: + db "Disables the foe's" + next "most recent move.@" + +AcidDescription: + db "An attack that may" + next "lower DEFENSE.@" + +EmberDescription: + db "An attack that may" + next "inflict a burn.@" + +FlamethrowerDescription: + db "An attack that may" + next "inflict a burn.@" + +MistDescription: + db "Prevents stat" + next "reduction.@" + +WaterGunDescription: + db "Squirts water to" + next "attack.@" + +HydroPumpDescription: + db "A powerful water-" + next "type attack.@" + +SurfDescription: + db "A strong water-" + next "type attack.@" + +IceBeamDescription: + db "An attack that may" + next "freeze the foe.@" + +BlizzardDescription: + db "An attack that may" + next "freeze the foe.@" + +PsybeamDescription: + db "An attack that may" + next "confuse the foe.@" + +BubblebeamDescription: + db "An attack that may" + next "lower SPEED.@" + +AuroraBeamDescription: + db "An attack that may" + next "lower ATTACK.@" + +HyperBeamDescription: + db "1st turn: Attack" + next "2nd turn: Rest@" + +PeckDescription: + db "Jabs the foe with" + next "a beak, etc.@" + +DrillPeckDescription: + db "A strong, spin-" + next "ning-peck attack.@" + +SubmissionDescription: + db "An attack that al-" + next "so hurts the user.@" + +LowKickDescription: + db "An attack that may" + next "cause flinching.@" + +CounterDescription: + db "Returns a physical" + next "blow double.@" + +SeismicTossDescription: + db "The user's level" + next "equals damage HP.@" + +StrengthDescription: + db "A powerful physi-" + next "cal attack.@" + +AbsorbDescription: + db "Steals 1/2 of the" + next "damage inflicted.@" + +MegaDrainDescription: + db "Steals 1/2 of the" + next "damage inflicted.@" + +LeechSeedDescription: + db "Steals HP from the" + next "foe on every turn.@" + +GrowthDescription: + db "Raises the SPCL." + next "ATK rating.@" + +RazorLeafDescription: + db "Has a high criti-" + next "cal hit ratio.@" + +SolarbeamDescription: + db "1st turn: Prepare" + next "2nd turn: Attack@" + +PoisonpowderDescription: + db "A move that may" + next "poison the foe.@" + +StunSporeDescription: + db "A move that may" + next "paralyze the foe.@" + +SleepPowderDescription: + db "May cause the foe" + next "to fall asleep.@" + +PetalDanceDescription: + db "Works 2-3 turns" + next "and confuses user.@" + +StringShotDescription: + db "A move that lowers" + next "the foe's SPEED.@" + +DragonRageDescription: + db "Always inflicts" + next "40HP damage.@" + +FireSpinDescription: + db "Traps foe in fire" + next "for 2-5 turns.@" + +ThundershockDescription: + db "An attack that may" + next "cause paralysis.@" + +ThunderboltDescription: + db "An attack that may" + next "cause paralysis.@" + +ThunderWaveDescription: + db "A move that may" + next "cause paralysis.@" + +ThunderDescription: + db "An attack that may" + next "cause paralysis.@" + +RockThrowDescription: + db "Drops rocks on the" + next "enemy.@" + +EarthquakeDescription: + db "Tough but useless" + next "vs. flying foes.@" + +FissureDescription: + db "A ground-type," + next "one-hit KO attack.@" + +DigDescription: + db "1st turn: Burrow" + next "2nd turn: Attack@" + +ToxicDescription: + db "A poison move with" + next "increasing damage.@" + +ConfusionDescription: + db "An attack that may" + next "cause confusion.@" + +PsychicMDescription: + db "An attack that may" + next "lower SPCL.DEF.@" + +HypnosisDescription: + db "May put the foe to" + next "sleep.@" + +MeditateDescription: + db "Raises the user's" + next "ATTACK.@" + +AgilityDescription: + db "Sharply increases" + next "the user's SPEED.@" + +QuickAttackDescription: + db "Lets the user get" + next "in the first hit.@" + +RageDescription: + db "Raises ATTACK if" + next "the user is hit.@" + +TeleportDescription: + db "A move for fleeing" + next "from battle.@" + +NightShadeDescription: + db "The user's level" + next "equals damage HP.@" + +MimicDescription: + db "Copies a move used" + next "by the foe.@" + +ScreechDescription: + db "Sharply reduces" + next "the foe's DEFENSE.@" + +DoubleTeamDescription: + db "Heightens evasive-" + next "ness.@" + +RecoverDescription: + db "Restores HP by 1/2" + next "the max HP.@" + +HardenDescription: + db "Raises the user's" + next "DEFENSE.@" + +MinimizeDescription: + db "Heightens evasive-" + next "ness.@" + +SmokescreenDescription: + db "Lowers the foe's" + next "accuracy.@" + +ConfuseRayDescription: + db "A move that causes" + next "confusion.@" + +WithdrawDescription: + db "Heightens the" + next "user's DEFENSE.@" + +DefenseCurlDescription: + db "Heightens the" + next "user's DEFENSE.@" + +BarrierDescription: + db "Sharply increases" + next "user's DEFENSE.@" + +LightScreenDescription: + db "Ups SPCL.DEF with" + next "a wall of light.@" + +HazeDescription: + db "Eliminates all" + next "stat changes.@" + +ReflectDescription: + db "Raises DEFENSE" + next "with a barrier.@" + +FocusEnergyDescription: + db "Raises the criti-" + next "cal hit ratio.@" + +BideDescription: + db "Waits 2-3 turns &" + next "hits back double.@" + +MetronomeDescription: + db "Randomly uses any" + next "#MON move.@" + +MirrorMoveDescription: + db "Counters with the" + next "same move.@" + +SelfdestructDescription: + db "Powerful but makes" + next "the user faint.@" + +EggBombDescription: + db "Eggs are hurled at" + next "the foe.@" + +LickDescription: + db "An attack that may" + next "cause paralysis.@" + +SmogDescription: + db "An attack that may" + next "poison the foe.@" + +SludgeDescription: + db "An attack that may" + next "poison the foe.@" + +BoneClubDescription: + db "An attack that may" + next "cause flinching.@" + +FireBlastDescription: + db "An attack that" + next "may cause a burn.@" + +WaterfallDescription: + db "An aquatic charge" + next "attack.@" + +ClampDescription: + db "Traps the foe for" + next "2-5 turns.@" + +SwiftDescription: + db "An attack that" + next "never misses.@" + +SkullBashDescription: + db "1st turn: Prepare" + next "2nd turn: Attack@" + +SpikeCannonDescription: + db "Fires spikes to" + next "hit 2-5 times.@" + +ConstrictDescription: + db "An attack that may" + next "lower SPEED.@" + +AmnesiaDescription: + db "Sharply raises the" + next "user's SPCL.DEF.@" + +KinesisDescription: + db "Reduces the foe's" + next "accuracy.@" + +SoftboiledDescription: + db "Restores HP by 1/2" + next "the user's max HP.@" + +HiJumpKickDescription: + db "May miss and hurt" + next "the user.@" + +GlareDescription: + db "A move that may" + next "cause paralysis.@" + +DreamEaterDescription: + db "Steals HP from a" + next "sleeping victim.@" + +PoisonGasDescription: + db "A move that may" + next "poison the foe.@" + +BarrageDescription: + db "Throws orbs to hit" + next "2-5 times.@" + +LeechLifeDescription: + db "Steals 1/2 of the" + next "damage inflicted.@" + +LovelyKissDescription: + db "May cause the foe" + next "to fall asleep.@" + +SkyAttackDescription: + db "1st turn: Prepare" + next "2nd turn: Attack@" + +TransformDescription: + db "The user assumes" + next "the foe's guise.@" + +BubbleDescription: + db "An attack that may" + next "reduce SPEED.@" + +DizzyPunchDescription: + db "An attack that may" + next "cause confusion.@" + +SporeDescription: + db "A move that" + next "induces sleep.@" + +FlashDescription: + db "Blinds the foe to" + next "reduce accuracy.@" + +PsywaveDescription: + db "An attack with" + next "variable power.@" + +SplashDescription: + db "Has no effect" + next "whatsoever.@" + +AcidArmorDescription: + db "Sharply raises the" + next "user's DEFENSE.@" + +CrabhammerDescription: + db "Has a high criti-" + next "cal hit ratio.@" + +ExplosionDescription: + db "Very powerful but" + next "makes user faint.@" + +FurySwipesDescription: + db "Quickly scratches" + next "2-5 times.@" + +BonemerangDescription: + db "An attack that" + next "strikes twice.@" + +RestDescription: + db "Sleep for 2 turns" + next "to fully recover.@" + +RockSlideDescription: + db "An attack that may" + next "cause flinching.@" + +HyperFangDescription: + db "An attack that may" + next "cause flinching.@" + +SharpenDescription: + db "A move that raises" + next "the user's ATTACK.@" + +ConversionDescription: + db "Change user's type" + next "to a move's type.@" + +TriAttackDescription: + db "Fires three kinds" + next "of beams at once.@" + +SuperFangDescription: + db "Cuts the foe's HP" + next "by 1/2.@" + +SlashDescription: + db "Has a high criti-" + next "cal hit ratio.@" + +SubstituteDescription: + db "Makes a decoy with" + next "1/4 user's max HP.@" + +StruggleDescription: + db "Used only if all" + next "PP are exhausted.@" + +SketchDescription: + db "Copies the foe's" + next "move permanently.@" + +TripleKickDescription: + db "Hits three times" + next "with rising power.@" + +ThiefDescription: + db "An attack that may" + next "steal a held item.@" + +SpiderWebDescription: + db "Prevents fleeing" + next "or switching.@" + +MindReaderDescription: + db "Ensures the next" + next "attack will hit.@" + +NightmareDescription: + db "A sleeper loses" + next "1/4 HP every turn.@" + +FlameWheelDescription: + db "An attack that may" + next "cause a burn.@" + +SnoreDescription: + db "An attack useable" + next "only while asleep.@" + +CurseDescription: + db "Works differently" + next "for ghost-types.@" + +FlailDescription: + db "Stronger if the" + next "user's HP is low.@" + +Conversion2Description: + db "The user's type is" + next "made resistant.@" + +AeroblastDescription: + db "Has a high criti-" + next "cal hit ratio.@" + +CottonSporeDescription: + db "Sharply reduces" + next "the foe's SPEED.@" + +ReversalDescription: + db "Stronger if the" + next "user's HP is low.@" + +SpiteDescription: + db "Cuts the PP of the" + next "foe's last move.@" + +PowderSnowDescription: + db "An attack that may" + next "cause freezing.@" + +ProtectDescription: + db "Foils attack that" + next "turn. It may fail.@" + +MachPunchDescription: + db "A fast punch that" + next "lands first.@" + +ScaryFaceDescription: + db "Sharply reduces" + next "the foe's SPEED.@" + +FaintAttackDescription: + db "An attack that" + next "never misses.@" + +SweetKissDescription: + db "A move that causes" + next "confusion.@" + +BellyDrumDescription: + db "Reduces own HP to" + next "maximize ATTACK.@" + +SludgeBombDescription: + db "An attack that may" + next "poison the foe.@" + +MudSlapDescription: + db "Reduces the foe's" + next "accuracy.@" + +OctazookaDescription: + db "An attack that may" + next "reduce accuracy.@" + +SpikesDescription: + db "Hurts foes when" + next "they switch out.@" + +ZapCannonDescription: + db "An attack that" + next "always paralyzes.@" + +ForesightDescription: + db "Negates accuracy" + next "reduction moves.@" + +DestinyBondDescription: + db "The foe faints if" + next "the user does.@" + +PerishSongDescription: + db "Both user and foe" + next "faint in 3 turns.@" + +IcyWindDescription: + db "An icy attack that" + next "lowers SPEED.@" + +DetectDescription: + db "Evades attack that" + next "turn. It may fail.@" + +BoneRushDescription: + db "An attack that" + next "hits 2-5 times.@" + +LockOnDescription: + db "Ensures the next" + next "attack will hit.@" + +OutrageDescription: + db "Works 2-3 turns" + next "and confuses user.@" + +SandstormDescription: + db "Inflicts damage" + next "every turn.@" + +GigaDrainDescription: + db "Steals 1/2 of the" + next "damage inflicted.@" + +EndureDescription: + db "Always leaves at" + next "least 1HP.@" + +CharmDescription: + db "Sharply lowers the" + next "foe's ATTACK.@" + +RolloutDescription: + db "Attacks 5 turns" + next "with rising power.@" + +FalseSwipeDescription: + db "Leaves the foe" + next "with at least 1HP.@" + +SwaggerDescription: + db "Causes confusion" + next "and raises ATTACK.@" + +MilkDrinkDescription: + db "Restores HP by 1/2" + next "the max HP.@" + +SparkDescription: + db "An attack that may" + next "cause paralysis.@" + +FuryCutterDescription: + db "Successive hits" + next "raise power.@" + +SteelWingDescription: + db "Stiff wings strike" + next "the foe.@" + +MeanLookDescription: + db "Prevents fleeing" + next "or switching.@" + +AttractDescription: + db "Makes the opposite" + next "gender infatuated.@" + +SleepTalkDescription: + db "Randomly attacks" + next "while asleep.@" + +HealBellDescription: + db "Eliminates all" + next "status problems.@" + +ReturnDescription: + db "An attack that is" + next "based on loyalty.@" + +PresentDescription: + db "A bomb that may" + next "restore HP.@" + +FrustrationDescription: + db "An attack based on" + next "lack of loyalty.@" + +SafeguardDescription: + db "Prevents all" + next "status problems.@" + +PainSplitDescription: + db "Adds user & foe's" + next "HPs. Shares total.@" + +SacredFireDescription: + db "An attack that may" + next "inflict a burn.@" + +MagnitudeDescription: + db "A ground attack" + next "with random power.@" + +DynamicpunchDescription: + db "An attack that" + next "always confuses.@" + +MegahornDescription: + db "A powerful charge" + next "attack.@" + +DragonbreathDescription: + db "A strong breath" + next "attack.@" + +BatonPassDescription: + db "Switches while" + next "keeping effects.@" + +EncoreDescription: + db "Makes the foe re-" + next "peat 2-6 times.@" + +PursuitDescription: + db "Heavily strikes" + next "switching #MON.@" + +RapidSpinDescription: + db "A high-speed" + next "spinning attack.@" + +SweetScentDescription: + db "Reduces the foe's" + next "evasiveness.@" + +IronTailDescription: + db "An attack that may" + next "reduce DEFENSE.@" + +MetalClawDescription: + db "An attack that may" + next "up user's ATTACK.@" + +VitalThrowDescription: + db "A 2nd-strike move" + next "that never misses.@" + +MorningSunDescription: + db "Restores HP" + next "(varies by time).@" + +SynthesisDescription: + db "Restores HP" + next "(varies by time).@" + +MoonlightDescription: + db "Restores HP" + next "(varies by time).@" + +HiddenPowerDescription: + db "The power varies" + next "with the #MON.@" + +CrossChopDescription: + db "Has a high criti-" + next "cal hit ratio.@" + +TwisterDescription: + db "Whips up a tornado" + next "to attack.@" + +RainDanceDescription: + db "Boosts water-type" + next "moves for 5 turns.@" + +SunnyDayDescription: + db "Boosts fire-type" + next "moves for 5 turns.@" + +CrunchDescription: + db "An attack that may" + next "lower SPCL.DEF.@" + +MirrorCoatDescription: + db "Counters a SPCL." + next "ATK move double.@" + +PsychUpDescription: + db "Copies the foe's" + next "stat changes.@" + +ExtremespeedDescription: + db "A powerful first-" + next "strike move.@" + +AncientpowerDescription: + db "An attack that may" + next "raise all stats.@" + +ShadowBallDescription: + db "An attack that may" + next "lower SPCL.DEF.@" + +FutureSightDescription: + db "An attack that" + next "hits on 3rd turn.@" + +RockSmashDescription: + db "An attack that may" + next "lower DEFENSE.@" + +WhirlpoolDescription: + db "Traps the foe for" + next "2-5 turns.@" + +BeatUpDescription: + db "Party #MON join" + next "in the attack.@" diff --git a/data/moves/effects.asm b/data/moves/effects.asm new file mode 100644 index 0000000..02305d8 --- /dev/null +++ b/data/moves/effects.asm @@ -0,0 +1,2079 @@ +INCLUDE "data/moves/effects_pointers.asm" + +MoveEffects: ; used only for BANK(MoveEffects) + +NormalHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +DoSleep: + checkobedience + usedmovetext + doturn + checkhit + checksafeguard + sleeptarget + endmove + +PoisonHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + poisontarget + endmove + +LeechHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + draintarget + checkfaint + buildopponentrage + kingsrock + endmove + +BurnHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + burntarget + endmove + +FreezeHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + freezetarget + endmove + +ParalyzeHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + paralyzetarget + endmove + +Selfdestruct: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + selfdestruct + moveanimnosub + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +DreamEater: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + eatdream + checkfaint + buildopponentrage + endmove + +MirrorMove: + checkobedience + usedmovetext + doturn + mirrormove + endmove + +AttackUp: + checkobedience + usedmovetext + doturn + attackup + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +DefenseUp: + checkobedience + usedmovetext + doturn + defenseup + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +SpeedUp: + checkobedience + usedmovetext + doturn + speedup + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +SpecialAttackUp: + checkobedience + usedmovetext + doturn + specialattackup + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +SpecialDefenseUp: + checkobedience + usedmovetext + doturn + specialdefenseup + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +AccuracyUp: + checkobedience + usedmovetext + doturn + accuracyup + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +EvasionUp: + checkobedience + usedmovetext + doturn + lowersub + evasionup + statupanim + lowersubnoanim + raisesub + statupmessage + statupfailtext + endmove + +AttackUp2: + checkobedience + usedmovetext + doturn + attackup2 + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +DefenseUp2: + checkobedience + usedmovetext + doturn + defenseup2 + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +SpeedUp2: + checkobedience + usedmovetext + doturn + speedup2 + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +SpecialAttackUp2: + checkobedience + usedmovetext + doturn + specialattackup2 + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +SpecialDefenseUp2: + checkobedience + usedmovetext + doturn + specialdefenseup2 + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +AccuracyUp2: + checkobedience + usedmovetext + doturn + accuracyup2 + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +EvasionUp2: + checkobedience + usedmovetext + doturn + evasionup2 + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove + +AttackDown: + checkobedience + usedmovetext + doturn + checkhit + attackdown + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +DefenseDown: + checkobedience + usedmovetext + doturn + checkhit + defensedown + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +SpeedDown: + checkobedience + usedmovetext + doturn + checkhit + speeddown + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +SpecialAttackDown: + checkobedience + usedmovetext + doturn + checkhit + specialattackdown + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +SpecialDefenseDown: + checkobedience + usedmovetext + doturn + checkhit + specialdefensedown + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +AccuracyDown: + checkobedience + usedmovetext + doturn + checkhit + accuracydown + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +EvasionDown: + checkobedience + usedmovetext + doturn + checkhit + evasiondown + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +AttackDown2: + checkobedience + usedmovetext + doturn + checkhit + attackdown2 + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +DefenseDown2: + checkobedience + usedmovetext + doturn + checkhit + defensedown2 + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +SpeedDown2: + checkobedience + usedmovetext + doturn + checkhit + speeddown2 + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +SpecialAttackDown2: + checkobedience + usedmovetext + doturn + checkhit + specialattackdown2 + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +SpecialDefenseDown2: + checkobedience + usedmovetext + doturn + checkhit + specialdefensedown2 + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +AccuracyDown2: + checkobedience + usedmovetext + doturn + checkhit + accuracydown2 + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +EvasionDown2: + checkobedience + usedmovetext + doturn + checkhit + evasiondown2 + lowersub + statdownanim + raisesub + statdownmessage + statdownfailtext + endmove + +AttackDownHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + attackdown + statdownmessage + endmove + +DefenseDownHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage +; BUG: Moves that lower Defense can do so after breaking a Substitute (see docs/bugs_and_glitches.md) + effectchance + defensedown + statdownmessage + endmove + +SpeedDownHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + speeddown + statdownmessage + endmove + +SpecialAttackDownHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + specialattackdown + statdownmessage + endmove + +SpecialDefenseDownHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + specialdefensedown + statdownmessage + endmove + +AccuracyDownHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + accuracydown + statdownmessage + endmove + +EvasionDownHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + evasiondown + statdownmessage + endmove + +DefenseUpHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext +; BUG: Moves that do damage and increase your stats do not increase stats after a KO (see docs/bugs_and_glitches.md) + checkfaint + buildopponentrage + defenseup + statupmessage + endmove + +AttackUpHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + attackup + statupmessage + endmove + +AllUpHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + allstatsup + endmove + +PayDay: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + payday + checkfaint + buildopponentrage + kingsrock + endmove + +Conversion: + checkobedience + usedmovetext + doturn + conversion + endmove + +ResetStats: + checkobedience + usedmovetext + doturn + resetstats + endmove + +Bide: + storeenergy + checkobedience + doturn + usedmovetext + unleashenergy + resettypematchup + checkhit + moveanim + bidefailtext + applydamage + checkfaint + buildopponentrage + kingsrock + endmove + +Rampage: + checkrampage + checkobedience + doturn + rampage + usedmovetext + checkhit + critical + damagestats + damagecalc + stab + damagevariation + clearmissdamage + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +ForceSwitch: + checkobedience + usedmovetext + doturn + checkhit + forceswitch + endmove + +MultiHit: + checkobedience + usedmovetext + doturn + startloop + lowersub + checkhit + critical + damagestats + damagecalc + stab + damagevariation + clearmissdamage + moveanimnosub + failuretext + applydamage + criticaltext + cleartext + supereffectivelooptext + checkfaint + buildopponentrage + endloop + raisesub + kingsrock + endmove + +PoisonMultiHit: + checkobedience + usedmovetext + doturn + startloop + lowersub + checkhit + effectchance + critical + damagestats + damagecalc + stab + damagevariation + clearmissdamage + moveanimnosub + failuretext + applydamage + criticaltext + cleartext + supereffectivelooptext + checkfaint + buildopponentrage + endloop + raisesub + kingsrock + poisontarget + endmove + +FlinchHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + flinchtarget + endmove + +OHKOHit: + checkobedience + usedmovetext + doturn + stab + ohko + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + endmove + +RecoilHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + recoil + checkfaint + buildopponentrage + kingsrock + endmove + +Mist: + checkobedience + usedmovetext + doturn + mist + endmove + +FocusEnergy: + checkobedience + usedmovetext + doturn + focusenergy + endmove + +DoConfuse: + checkobedience + usedmovetext + doturn + checkhit + checksafeguard + confuse + endmove + +ConfuseHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + confusetarget + endmove + +Heal: + checkobedience + usedmovetext + doturn + heal + endmove + +Transform: + checkobedience + usedmovetext + doturn + transform + endmove + +LightScreen: +Reflect: + checkobedience + usedmovetext + doturn + screen + endmove + +TriAttack: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + tristatuschance + endmove + +Toxic: +DoPoison: + checkobedience + usedmovetext + doturn + checkhit + stab + checksafeguard + poison + endmove + +DoParalyze: + checkobedience + usedmovetext + doturn + stab + checkhit + checksafeguard + paralyze + endmove + +SkyAttack: + checkcharge + checkobedience + doturn + charge + usedmovetext + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + flinchtarget + kingsrock + endmove + +Substitute: + checkobedience + usedmovetext + doturn + substitute + endmove + +HyperBeam: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + rechargenextturn + checkfaint + buildopponentrage + endmove + +Rage: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + checkhit + ragedamage + damagevariation + moveanim + failuretext + rage + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +Mimic: + checkobedience + usedmovetext + doturn + checkhit + mimic + endmove + +Metronome: + checkobedience + usedmovetext + doturn + metronome + endmove + +LeechSeed: + checkobedience + usedmovetext + doturn + checkhit + leechseed + endmove + +Splash: + checkobedience + usedmovetext + doturn + splash + endmove + +Disable: + checkobedience + usedmovetext + doturn + checkhit + disable + endmove + +RazorWind: + checkcharge + checkobedience + doturn + charge + usedmovetext + critical + damagestats + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +Fly: + checkcharge + checkobedience + doturn + charge + usedmovetext + critical + damagestats + damagecalc + stab + damagevariation + checkhit + moveanimnosub + raisesub + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +TrapTarget: + checkobedience + usedmovetext + doturn + checkhit + critical + damagestats + damagecalc + stab + damagevariation + clearmissdamage + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + traptarget + endmove + +SuperFang: +Psywave: +StaticDamage: + checkobedience + usedmovetext + doturn + constantdamage + checkhit + resettypematchup + moveanim + failuretext + applydamage + checkfaint + buildopponentrage + kingsrock + endmove + +Reversal: + checkobedience + usedmovetext + doturn + constantdamage + stab + checkhit + moveanim + failuretext + applydamage + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +Counter: + checkobedience + usedmovetext + doturn + counter + moveanim + failuretext + applydamage + checkfaint + buildopponentrage + kingsrock + endmove + +Encore: + checkobedience + usedmovetext + doturn + checkhit + encore + endmove + +PainSplit: + checkobedience + usedmovetext + doturn + checkhit + painsplit + endmove + +Snore: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + snore + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + flinchtarget + kingsrock + endmove + +Conversion2: + checkobedience + usedmovetext + doturn + checkhit + conversion2 + endmove + +LockOn: + checkobedience + usedmovetext + doturn + checkhit + lockon + endmove + +Sketch: + checkobedience + usedmovetext + doturn + sketch + endmove + +DefrostOpponent: + checkobedience + usedmovetext + doturn + defrostopponent + endmove + +SleepTalk: + checkobedience + usedmovetext + doturn + sleeptalk + endmove + +DestinyBond: + checkobedience + usedmovetext + doturn + destinybond + endmove + +Spite: + checkobedience + usedmovetext + doturn + checkhit + spite + endmove + +FalseSwipe: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + falseswipe + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +HealBell: + checkobedience + usedmovetext + doturn + healbell + endmove + +TripleKick: + checkobedience + usedmovetext + doturn + startloop + lowersub + checkhit + critical + damagestats + damagecalc + triplekick + stab + damagevariation + clearmissdamage + moveanimnosub + failuretext + applydamage + criticaltext + cleartext + supereffectivelooptext + checkfaint + buildopponentrage + kickcounter + endloop + raisesub + kingsrock + endmove + +Thief: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + thief + checkfaint + buildopponentrage + kingsrock + endmove + +MeanLook: + checkobedience + usedmovetext + doturn + arenatrap + endmove + +Nightmare: + checkobedience + usedmovetext + doturn + nightmare + endmove + +FlameWheel: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + defrost + checkfaint + buildopponentrage + burntarget + endmove + +Curse: + checkobedience + usedmovetext + doturn + curse + endmove + +Protect: + checkobedience + usedmovetext + doturn + protect + endmove + +Spikes: + checkobedience + usedmovetext + doturn + spikes + endmove + +Foresight: + checkobedience + usedmovetext + doturn + checkhit + foresight + endmove + +PerishSong: + checkobedience + usedmovetext + doturn + perishsong + endmove + +Sandstorm: + checkobedience + usedmovetext + doturn + startsandstorm + endmove + +Endure: + checkobedience + usedmovetext + doturn + endure + endmove + +Rollout: + checkcurl + checkobedience + doturn + usedmovetext + critical + damagestats + damagecalc + stab + checkhit + rolloutpower + damagevariation + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +Swagger: + checkobedience + usedmovetext + doturn + checkhit + switchturn + attackup2 + switchturn + lowersub + statupanim + raisesub + failuretext + switchturn + statupmessage + switchturn + confusetarget + endmove + +FuryCutter: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + checkhit + furycutter + damagevariation + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +Attract: + checkobedience + usedmovetext + doturn + checkhit + attract + endmove + +Return: + checkobedience + usedmovetext + doturn + critical + damagestats + happinesspower + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +Present: + checkobedience + usedmovetext + doturn + checkhit + critical + damagestats + present + damagecalc + stab + damagevariation + clearmissdamage + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +Frustration: + checkobedience + usedmovetext + doturn + critical + damagestats + frustrationpower + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +Safeguard: + checkobedience + usedmovetext + doturn + safeguard + endmove + +SacredFire: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + defrost + checkfaint + buildopponentrage + burntarget + endmove + +Magnitude: + checkobedience + usedmovetext + doturn + critical + damagestats + getmagnitude + damagecalc + stab + damagevariation + checkhit + doubleundergrounddamage + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +BatonPass: + checkobedience + usedmovetext + doturn + batonpass + endmove + +Pursuit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + pursuit + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +RapidSpin: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + clearhazards + checkfaint + buildopponentrage + kingsrock + endmove + +MorningSun: + checkobedience + usedmovetext + doturn + healmorn + endmove + +Synthesis: + checkobedience + usedmovetext + doturn + healday + endmove + +Moonlight: + checkobedience + usedmovetext + doturn + healnite + endmove + +HiddenPower: + checkobedience + usedmovetext + doturn + critical + hiddenpower + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +RainDance: + checkobedience + usedmovetext + doturn + startrain + endmove + +SunnyDay: + checkobedience + usedmovetext + doturn + startsun + endmove + +FakeOut: + checkobedience + usedmovetext + doturn + checkhit + fakeout + moveanim + failuretext + endmove + +BellyDrum: + checkobedience + usedmovetext + doturn + bellydrum + endmove + +PsychUp: + checkobedience + usedmovetext + doturn + psychup + endmove + +MirrorCoat: + checkobedience + usedmovetext + doturn + mirrorcoat + moveanim + failuretext + applydamage + checkfaint + buildopponentrage + kingsrock + endmove + +SkullBash: + checkcharge + checkobedience + doturn + charge + usedmovetext + critical + damagestats + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endturn + defenseup + statupmessage + endmove + +Twister: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + doubleflyingdamage + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + flinchtarget + endmove + +Earthquake: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + doubleundergrounddamage + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + endmove + +FutureSight: + checkfuturesight + checkobedience + usedmovetext + doturn + damagestats + damagecalc + futuresight + damagevariation ; skip here if last turn + checkhit + moveanimnosub + failuretext + applydamage + checkfaint + buildopponentrage + endmove + +Gust: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + doubleflyingdamage + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + endmove + +Stomp: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + doubleminimizedamage + checkhit + effectchance + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + flinchtarget + endmove + +Solarbeam: + checkcharge + checkobedience + doturn + skipsuncharge + charge + usedmovetext + critical + damagestats + damagecalc + stab + damagevariation + checkhit + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + kingsrock + endmove + +Thunder: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + thunderaccuracy + checkhit + effectchance + stab + damagevariation + moveanim + failuretext + applydamage + criticaltext + supereffectivetext + checkfaint + buildopponentrage + paralyzetarget + endmove + +Teleport: + checkobedience + usedmovetext + doturn + teleport + endmove + +BeatUp: + checkobedience + usedmovetext + movedelay + doturn + startloop + lowersub + checkhit + critical + beatup + damagecalc + damagevariation + clearmissdamage + moveanimnosub + failuretext + applydamage + criticaltext + cleartext + supereffectivetext + checkfaint + buildopponentrage + endloop + beatupfailtext + raisesub + kingsrock + endmove + +DefenseCurl: + checkobedience + usedmovetext + doturn + defenseup + curl + lowersub + statupanim + raisesub + statupmessage + statupfailtext + endmove diff --git a/data/moves/effects_pointers.asm b/data/moves/effects_pointers.asm new file mode 100644 index 0000000..c834926 --- /dev/null +++ b/data/moves/effects_pointers.asm @@ -0,0 +1,161 @@ +MoveEffectsPointers: +; entries correspond to EFFECT_* constants + table_width 2, MoveEffectsPointers + dw NormalHit + dw DoSleep + dw PoisonHit + dw LeechHit + dw BurnHit + dw FreezeHit + dw ParalyzeHit + dw Selfdestruct + dw DreamEater + dw MirrorMove + dw AttackUp + dw DefenseUp + dw SpeedUp + dw SpecialAttackUp + dw SpecialDefenseUp + dw AccuracyUp + dw EvasionUp + dw NormalHit + dw AttackDown + dw DefenseDown + dw SpeedDown + dw SpecialAttackDown + dw SpecialDefenseDown + dw AccuracyDown + dw EvasionDown + dw ResetStats + dw Bide + dw Rampage + dw ForceSwitch + dw MultiHit + dw Conversion + dw FlinchHit + dw Heal + dw Toxic + dw PayDay + dw LightScreen + dw TriAttack + dw NormalHit + dw OHKOHit + dw RazorWind + dw SuperFang + dw StaticDamage + dw TrapTarget + dw NormalHit + dw MultiHit + dw NormalHit + dw Mist + dw FocusEnergy + dw RecoilHit + dw DoConfuse + dw AttackUp2 + dw DefenseUp2 + dw SpeedUp2 + dw SpecialAttackUp2 + dw SpecialDefenseUp2 + dw AccuracyUp2 + dw EvasionUp2 + dw Transform + dw AttackDown2 + dw DefenseDown2 + dw SpeedDown2 + dw SpecialAttackDown2 + dw SpecialDefenseDown2 + dw AccuracyDown2 + dw EvasionDown2 + dw Reflect + dw DoPoison + dw DoParalyze + dw AttackDownHit + dw DefenseDownHit + dw SpeedDownHit + dw SpecialAttackDownHit + dw SpecialDefenseDownHit + dw AccuracyDownHit + dw EvasionDownHit + dw SkyAttack + dw ConfuseHit + dw PoisonMultiHit + dw NormalHit + dw Substitute + dw HyperBeam + dw Rage + dw Mimic + dw Metronome + dw LeechSeed + dw Splash + dw Disable + dw StaticDamage + dw Psywave + dw Counter + dw Encore + dw PainSplit + dw Snore + dw Conversion2 + dw LockOn + dw Sketch + dw DefrostOpponent + dw SleepTalk + dw DestinyBond + dw Reversal + dw Spite + dw FalseSwipe + dw HealBell + dw NormalHit + dw TripleKick + dw Thief + dw MeanLook + dw Nightmare + dw FlameWheel + dw Curse + dw NormalHit + dw Protect + dw Spikes + dw Foresight + dw PerishSong + dw Sandstorm + dw Endure + dw Rollout + dw Swagger + dw FuryCutter + dw Attract + dw Return + dw Present + dw Frustration + dw Safeguard + dw SacredFire + dw Magnitude + dw BatonPass + dw Pursuit + dw RapidSpin + dw NormalHit + dw NormalHit + dw MorningSun + dw Synthesis + dw Moonlight + dw HiddenPower + dw RainDance + dw SunnyDay + dw DefenseUpHit + dw AttackUpHit + dw AllUpHit + dw FakeOut + dw BellyDrum + dw PsychUp + dw MirrorCoat + dw SkullBash + dw Twister + dw Earthquake + dw FutureSight + dw Gust + dw Stomp + dw Solarbeam + dw Thunder + dw Teleport + dw BeatUp + dw Fly + dw DefenseCurl + assert_table_length NUM_MOVE_EFFECTS diff --git a/data/moves/effects_priorities.asm b/data/moves/effects_priorities.asm new file mode 100644 index 0000000..dfdb636 --- /dev/null +++ b/data/moves/effects_priorities.asm @@ -0,0 +1,8 @@ +MoveEffectPriorities: + db EFFECT_PROTECT, 3 + db EFFECT_ENDURE, 3 + db EFFECT_PRIORITY_HIT, 2 + db EFFECT_FORCE_SWITCH, 0 + db EFFECT_COUNTER, 0 + db EFFECT_MIRROR_COAT, 0 + db -1 diff --git a/data/moves/flail_reversal_power.asm b/data/moves/flail_reversal_power.asm new file mode 100644 index 0000000..fb91590 --- /dev/null +++ b/data/moves/flail_reversal_power.asm @@ -0,0 +1,8 @@ +FlailReversalPower: + ; hp bar pixels, power + db HP_BAR_LENGTH_PX / 48, 200 + db HP_BAR_LENGTH_PX / 12, 150 + db HP_BAR_LENGTH_PX / 5, 100 + db HP_BAR_LENGTH_PX / 3, 80 + db HP_BAR_LENGTH_PX * 2 / 3, 40 + db HP_BAR_LENGTH_PX, 20 diff --git a/data/moves/magnitude_power.asm b/data/moves/magnitude_power.asm new file mode 100644 index 0000000..632a0c0 --- /dev/null +++ b/data/moves/magnitude_power.asm @@ -0,0 +1,9 @@ +MagnitudePower: + ; chance, power, magnitude # + db 5 percent + 1, 10, 4 ; 5% + db 15 percent, 30, 5 ; 10% + db 35 percent, 50, 6 ; 20% + db 65 percent + 1, 70, 7 ; 30% + db 85 percent + 1, 90, 8 ; 20% + db 95 percent, 110, 9 ; 10% + db 100 percent, 150, 10 ; 5% diff --git a/data/moves/metronome_exception_moves.asm b/data/moves/metronome_exception_moves.asm new file mode 100644 index 0000000..7e4b91a --- /dev/null +++ b/data/moves/metronome_exception_moves.asm @@ -0,0 +1,16 @@ +; Metronome cannot turn into these moves. + +MetronomeExcepts: + dw METRONOME + dw STRUGGLE + dw SKETCH + dw MIMIC + dw COUNTER + dw MIRROR_COAT + dw PROTECT + dw DETECT + dw ENDURE + dw DESTINY_BOND + dw SLEEP_TALK + dw THIEF + dw -1 diff --git a/data/moves/moves.asm b/data/moves/moves.asm new file mode 100644 index 0000000..a9ba712 --- /dev/null +++ b/data/moves/moves.asm @@ -0,0 +1,272 @@ +; Characteristics of each move. + +MACRO move + ; the animation byte will be filled when the move is loaded + db \1 ; effect + db \2 ; power + db \3 ; type + db \4 percent ; accuracy + db \5 ; pp + db \6 percent ; effect chance + assert \5 <= 40, "PP must be 40 or less" +ENDM + +Moves:: +; entries correspond to constants/move_constants.asm + indirect_table MOVE_LENGTH - 1, 1 + indirect_entries NUM_ATTACKS, Moves1 + indirect_table_end + +Moves1: + move EFFECT_NORMAL_HIT, 40, NORMAL, 100, 35, 0 ;POUND + move EFFECT_NORMAL_HIT, 50, FIGHTING, 100, 25, 0 ;KARATE_CHOP + move EFFECT_MULTI_HIT, 15, NORMAL, 85, 10, 0 ;DOUBLESLAP + move EFFECT_MULTI_HIT, 18, NORMAL, 85, 15, 0 ;COMET_PUNCH + move EFFECT_NORMAL_HIT, 80, NORMAL, 85, 20, 0 ;MEGA_PUNCH + move EFFECT_PAY_DAY, 40, NORMAL, 100, 20, 0 ;PAY_DAY + move EFFECT_BURN_HIT, 75, FIRE, 100, 15, 10 ;FIRE_PUNCH + move EFFECT_FREEZE_HIT, 75, ICE, 100, 15, 10 ;ICE_PUNCH + move EFFECT_PARALYZE_HIT, 75, ELECTRIC, 100, 15, 10 ;THUNDERPUNCH + move EFFECT_NORMAL_HIT, 40, NORMAL, 100, 35, 0 ;SCRATCH + move EFFECT_NORMAL_HIT, 55, NORMAL, 100, 30, 0 ;VICEGRIP + move EFFECT_OHKO, 0, NORMAL, 30, 5, 0 ;GUILLOTINE + move EFFECT_RAZOR_WIND, 80, NORMAL, 75, 10, 0 ;RAZOR_WIND + move EFFECT_ATTACK_UP_2, 0, NORMAL, 100, 30, 0 ;SWORDS_DANCE + move EFFECT_NORMAL_HIT, 50, NORMAL, 95, 30, 0 ;CUT + move EFFECT_GUST, 40, FLYING, 100, 35, 0 ;GUST + move EFFECT_NORMAL_HIT, 60, FLYING, 100, 35, 0 ;WING_ATTACK + move EFFECT_FORCE_SWITCH, 0, NORMAL, 100, 20, 0 ;WHIRLWIND + move EFFECT_FLY, 70, FLYING, 95, 15, 0 ;FLY + move EFFECT_TRAP_TARGET, 15, NORMAL, 75, 20, 0 ;BIND + move EFFECT_NORMAL_HIT, 80, NORMAL, 75, 20, 0 ;SLAM + move EFFECT_NORMAL_HIT, 35, GRASS, 100, 10, 0 ;VINE_WHIP + move EFFECT_STOMP, 65, NORMAL, 100, 20, 30 ;STOMP + move EFFECT_DOUBLE_HIT, 30, FIGHTING, 100, 30, 0 ;DOUBLE_KICK + move EFFECT_NORMAL_HIT, 120, NORMAL, 75, 5, 0 ;MEGA_KICK + move EFFECT_JUMP_KICK, 70, FIGHTING, 95, 25, 0 ;JUMP_KICK + move EFFECT_FLINCH_HIT, 60, FIGHTING, 85, 15, 30 ;ROLLING_KICK + move EFFECT_ACCURACY_DOWN, 0, GROUND, 100, 15, 0 ;SAND_ATTACK + move EFFECT_FLINCH_HIT, 70, NORMAL, 100, 15, 30 ;HEADBUTT + move EFFECT_NORMAL_HIT, 65, NORMAL, 100, 25, 0 ;HORN_ATTACK + move EFFECT_MULTI_HIT, 15, NORMAL, 85, 20, 0 ;FURY_ATTACK + move EFFECT_OHKO, 1, NORMAL, 30, 5, 0 ;HORN_DRILL + move EFFECT_NORMAL_HIT, 35, NORMAL, 95, 35, 0 ;TACKLE + move EFFECT_PARALYZE_HIT, 85, NORMAL, 100, 15, 30 ;BODY_SLAM + move EFFECT_TRAP_TARGET, 15, NORMAL, 85, 20, 0 ;WRAP + move EFFECT_RECOIL_HIT, 90, NORMAL, 85, 20, 0 ;TAKE_DOWN + move EFFECT_RAMPAGE, 90, NORMAL, 100, 20, 0 ;THRASH + move EFFECT_RECOIL_HIT, 120, NORMAL, 100, 15, 0 ;DOUBLE_EDGE + move EFFECT_DEFENSE_DOWN, 0, NORMAL, 100, 30, 0 ;TAIL_WHIP + move EFFECT_POISON_HIT, 15, POISON, 100, 35, 30 ;POISON_STING + move EFFECT_POISON_MULTI_HIT, 25, BUG, 100, 20, 20 ;TWINEEDLE + move EFFECT_MULTI_HIT, 14, BUG, 85, 20, 0 ;PIN_MISSILE + move EFFECT_DEFENSE_DOWN, 0, NORMAL, 100, 30, 0 ;LEER + move EFFECT_FLINCH_HIT, 60, DARK, 100, 25, 30 ;BITE + move EFFECT_ATTACK_DOWN, 0, NORMAL, 100, 40, 0 ;GROWL + move EFFECT_FORCE_SWITCH, 0, NORMAL, 100, 20, 0 ;ROAR + move EFFECT_SLEEP, 0, NORMAL, 55, 15, 0 ;SING + move EFFECT_CONFUSE, 0, NORMAL, 55, 20, 0 ;SUPERSONIC + move EFFECT_STATIC_DAMAGE, 20, NORMAL, 90, 20, 0 ;SONICBOOM + move EFFECT_DISABLE, 0, NORMAL, 55, 20, 0 ;DISABLE + move EFFECT_DEFENSE_DOWN_HIT, 40, POISON, 100, 30, 10 ;ACID + move EFFECT_BURN_HIT, 40, FIRE, 100, 25, 10 ;EMBER + move EFFECT_BURN_HIT, 95, FIRE, 100, 15, 10 ;FLAMETHROWER + move EFFECT_MIST, 0, ICE, 100, 30, 0 ;MIST + move EFFECT_NORMAL_HIT, 40, WATER, 100, 25, 0 ;WATER_GUN + move EFFECT_NORMAL_HIT, 120, WATER, 80, 5, 0 ;HYDRO_PUMP + move EFFECT_NORMAL_HIT, 95, WATER, 100, 15, 0 ;SURF + move EFFECT_FREEZE_HIT, 95, ICE, 100, 10, 10 ;ICE_BEAM + move EFFECT_FREEZE_HIT, 120, ICE, 70, 5, 10 ;BLIZZARD + move EFFECT_CONFUSE_HIT, 65, PSYCHIC_TYPE, 100, 20, 10 ;PSYBEAM + move EFFECT_SPEED_DOWN_HIT, 65, WATER, 100, 20, 10 ;BUBBLEBEAM + move EFFECT_ATTACK_DOWN_HIT, 65, ICE, 100, 20, 10 ;AURORA_BEAM + move EFFECT_HYPER_BEAM, 150, NORMAL, 90, 5, 0 ;HYPER_BEAM + move EFFECT_NORMAL_HIT, 35, FLYING, 100, 35, 0 ;PECK + move EFFECT_NORMAL_HIT, 80, FLYING, 100, 20, 0 ;DRILL_PECK + move EFFECT_RECOIL_HIT, 80, FIGHTING, 80, 25, 0 ;SUBMISSION + move EFFECT_FLINCH_HIT, 50, FIGHTING, 90, 20, 30 ;LOW_KICK + move EFFECT_COUNTER, 1, FIGHTING, 100, 20, 0 ;COUNTER + move EFFECT_LEVEL_DAMAGE, 1, FIGHTING, 100, 20, 0 ;SEISMIC_TOSS + move EFFECT_NORMAL_HIT, 80, NORMAL, 100, 15, 0 ;STRENGTH + move EFFECT_LEECH_HIT, 20, GRASS, 100, 20, 0 ;ABSORB + move EFFECT_LEECH_HIT, 40, GRASS, 100, 10, 0 ;MEGA_DRAIN + move EFFECT_LEECH_SEED, 0, GRASS, 90, 10, 0 ;LEECH_SEED + move EFFECT_SP_ATK_UP, 0, NORMAL, 100, 40, 0 ;GROWTH + move EFFECT_NORMAL_HIT, 55, GRASS, 95, 25, 0 ;RAZOR_LEAF + move EFFECT_SOLARBEAM, 120, GRASS, 100, 10, 0 ;SOLARBEAM + move EFFECT_POISON, 0, POISON, 75, 35, 0 ;POISONPOWDER + move EFFECT_PARALYZE, 0, GRASS, 75, 30, 0 ;STUN_SPORE + move EFFECT_SLEEP, 0, GRASS, 75, 15, 0 ;SLEEP_POWDER + move EFFECT_RAMPAGE, 70, GRASS, 100, 20, 0 ;PETAL_DANCE + move EFFECT_SPEED_DOWN, 0, BUG, 95, 40, 0 ;STRING_SHOT + move EFFECT_STATIC_DAMAGE, 40, DRAGON, 100, 10, 0 ;DRAGON_RAGE + move EFFECT_TRAP_TARGET, 15, FIRE, 70, 15, 0 ;FIRE_SPIN + move EFFECT_PARALYZE_HIT, 40, ELECTRIC, 100, 30, 10 ;THUNDERSHOCK + move EFFECT_PARALYZE_HIT, 95, ELECTRIC, 100, 15, 10 ;THUNDERBOLT + move EFFECT_PARALYZE, 0, ELECTRIC, 100, 20, 0 ;THUNDER_WAVE + move EFFECT_THUNDER, 120, ELECTRIC, 70, 10, 30 ;THUNDER + move EFFECT_NORMAL_HIT, 50, ROCK, 90, 15, 0 ;ROCK_THROW + move EFFECT_EARTHQUAKE, 100, GROUND, 100, 10, 0 ;EARTHQUAKE + move EFFECT_OHKO, 1, GROUND, 30, 5, 0 ;FISSURE + move EFFECT_FLY, 60, GROUND, 100, 10, 0 ;DIG + move EFFECT_TOXIC, 0, POISON, 85, 10, 0 ;TOXIC + move EFFECT_CONFUSE_HIT, 50, PSYCHIC_TYPE, 100, 25, 10 ;CONFUSION + move EFFECT_SP_DEF_DOWN_HIT, 90, PSYCHIC_TYPE, 100, 10, 10 ;PSYCHIC_TYPE_M + move EFFECT_SLEEP, 0, PSYCHIC_TYPE, 60, 20, 0 ;HYPNOSIS + move EFFECT_ATTACK_UP, 0, PSYCHIC_TYPE, 100, 40, 0 ;MEDITATE + move EFFECT_SPEED_UP_2, 0, PSYCHIC_TYPE, 100, 30, 0 ;AGILITY + move EFFECT_PRIORITY_HIT, 40, NORMAL, 100, 30, 0 ;QUICK_ATTACK + move EFFECT_RAGE, 20, NORMAL, 100, 20, 0 ;RAGE + move EFFECT_TELEPORT, 0, PSYCHIC_TYPE, 100, 20, 0 ;TELEPORT + move EFFECT_LEVEL_DAMAGE, 1, GHOST, 100, 15, 0 ;NIGHT_SHADE + move EFFECT_MIMIC, 0, NORMAL, 100, 10, 0 ;MIMIC + move EFFECT_DEFENSE_DOWN_2, 0, NORMAL, 85, 40, 0 ;SCREECH + move EFFECT_EVASION_UP, 0, NORMAL, 100, 15, 0 ;DOUBLE_TEAM + move EFFECT_HEAL, 0, NORMAL, 100, 20, 0 ;RECOVER + move EFFECT_DEFENSE_UP, 0, NORMAL, 100, 30, 0 ;HARDEN + move EFFECT_EVASION_UP, 0, NORMAL, 100, 20, 0 ;MINIMIZE + move EFFECT_ACCURACY_DOWN, 0, NORMAL, 100, 20, 0 ;SMOKESCREEN + move EFFECT_CONFUSE, 0, GHOST, 100, 10, 0 ;CONFUSE_RAY + move EFFECT_DEFENSE_UP, 0, WATER, 100, 40, 0 ;WITHDRAW + move EFFECT_DEFENSE_CURL, 0, NORMAL, 100, 40, 0 ;DEFENSE_CURL + move EFFECT_DEFENSE_UP_2, 0, PSYCHIC_TYPE, 100, 30, 0 ;BARRIER + move EFFECT_LIGHT_SCREEN, 0, PSYCHIC_TYPE, 100, 30, 0 ;LIGHT_SCREEN + move EFFECT_RESET_STATS, 0, ICE, 100, 30, 0 ;HAZE + move EFFECT_REFLECT, 0, PSYCHIC_TYPE, 100, 20, 0 ;REFLECT + move EFFECT_FOCUS_ENERGY, 0, NORMAL, 100, 30, 0 ;FOCUS_ENERGY + move EFFECT_BIDE, 0, NORMAL, 100, 10, 0 ;BIDE + move EFFECT_METRONOME, 0, NORMAL, 100, 10, 0 ;METRONOME + move EFFECT_MIRROR_MOVE, 0, FLYING, 100, 20, 0 ;MIRROR_MOVE + move EFFECT_SELFDESTRUCT, 200, NORMAL, 100, 5, 0 ;SELFDESTRUCT + move EFFECT_NORMAL_HIT, 100, NORMAL, 75, 10, 0 ;EGG_BOMB + move EFFECT_PARALYZE_HIT, 20, GHOST, 100, 30, 30 ;LICK + move EFFECT_POISON_HIT, 20, POISON, 70, 20, 40 ;SMOG + move EFFECT_POISON_HIT, 65, POISON, 100, 20, 30 ;SLUDGE + move EFFECT_FLINCH_HIT, 65, GROUND, 85, 20, 10 ;BONE_CLUB + move EFFECT_BURN_HIT, 120, FIRE, 85, 5, 10 ;FIRE_BLAST + move EFFECT_NORMAL_HIT, 80, WATER, 100, 15, 0 ;WATERFALL + move EFFECT_TRAP_TARGET, 35, WATER, 75, 10, 0 ;CLAMP + move EFFECT_ALWAYS_HIT, 60, NORMAL, 100, 20, 0 ;SWIFT + move EFFECT_SKULL_BASH, 100, NORMAL, 100, 15, 0 ;SKULL_BASH + move EFFECT_MULTI_HIT, 20, NORMAL, 100, 15, 0 ;SPIKE_CANNON + move EFFECT_SPEED_DOWN_HIT, 10, NORMAL, 100, 35, 10 ;CONSTRICT + move EFFECT_SP_DEF_UP_2, 0, PSYCHIC_TYPE, 100, 20, 0 ;AMNESIA + move EFFECT_ACCURACY_DOWN, 0, PSYCHIC_TYPE, 80, 15, 0 ;KINESIS + move EFFECT_HEAL, 0, NORMAL, 100, 10, 0 ;SOFTBOILED + move EFFECT_JUMP_KICK, 85, FIGHTING, 90, 20, 0 ;HI_JUMP_KICK + move EFFECT_PARALYZE, 0, NORMAL, 75, 30, 0 ;GLARE + move EFFECT_DREAM_EATER, 100, PSYCHIC_TYPE, 100, 15, 0 ;DREAM_EATER + move EFFECT_POISON, 0, POISON, 55, 40, 0 ;POISON_GAS + move EFFECT_MULTI_HIT, 15, NORMAL, 85, 20, 0 ;BARRAGE + move EFFECT_LEECH_HIT, 20, BUG, 100, 15, 0 ;LEECH_LIFE + move EFFECT_SLEEP, 0, NORMAL, 75, 10, 0 ;LOVELY_KISS + move EFFECT_SKY_ATTACK, 140, FLYING, 90, 5, 0 ;SKY_ATTACK + move EFFECT_TRANSFORM, 0, NORMAL, 100, 10, 0 ;TRANSFORM + move EFFECT_SPEED_DOWN_HIT, 20, WATER, 100, 30, 10 ;BUBBLE + move EFFECT_CONFUSE_HIT, 70, NORMAL, 100, 10, 20 ;DIZZY_PUNCH + move EFFECT_SLEEP, 0, GRASS, 100, 15, 0 ;SPORE + move EFFECT_ACCURACY_DOWN, 0, NORMAL, 70, 20, 0 ;FLASH + move EFFECT_PSYWAVE, 1, PSYCHIC_TYPE, 80, 15, 0 ;PSYWAVE + move EFFECT_SPLASH, 0, NORMAL, 100, 40, 0 ;SPLASH + move EFFECT_DEFENSE_UP_2, 0, POISON, 100, 40, 0 ;ACID_ARMOR + move EFFECT_NORMAL_HIT, 90, WATER, 85, 10, 0 ;CRABHAMMER + move EFFECT_SELFDESTRUCT, 250, NORMAL, 100, 5, 0 ;EXPLOSION + move EFFECT_MULTI_HIT, 18, NORMAL, 80, 15, 0 ;FURY_SWIPES + move EFFECT_DOUBLE_HIT, 50, GROUND, 90, 10, 0 ;BONEMERANG + move EFFECT_HEAL, 0, PSYCHIC_TYPE, 100, 10, 0 ;REST + move EFFECT_FLINCH_HIT, 75, ROCK, 90, 10, 30 ;ROCK_SLIDE + move EFFECT_FLINCH_HIT, 80, NORMAL, 90, 15, 10 ;HYPER_FANG + move EFFECT_ATTACK_UP, 0, NORMAL, 100, 30, 0 ;SHARPEN + move EFFECT_CONVERSION, 0, NORMAL, 100, 30, 0 ;CONVERSION + move EFFECT_TRI_ATTACK, 80, NORMAL, 100, 10, 20 ;TRI_ATTACK + move EFFECT_SUPER_FANG, 1, NORMAL, 90, 10, 0 ;SUPER_FANG + move EFFECT_NORMAL_HIT, 70, NORMAL, 100, 20, 0 ;SLASH + move EFFECT_SUBSTITUTE, 0, NORMAL, 100, 10, 0 ;SUBSTITUTE + move EFFECT_RECOIL_HIT, 50, NORMAL, 100, 1, 0 ;STRUGGLE + move EFFECT_SKETCH, 0, NORMAL, 100, 1, 0 ;SKETCH + move EFFECT_TRIPLE_KICK, 10, FIGHTING, 90, 10, 0 ;TRIPLE_KICK + move EFFECT_THIEF, 40, DARK, 100, 10, 100 ;THIEF + move EFFECT_MEAN_LOOK, 0, BUG, 100, 10, 0 ;SPIDER_WEB + move EFFECT_LOCK_ON, 0, NORMAL, 100, 5, 0 ;MIND_READER + move EFFECT_NIGHTMARE, 0, GHOST, 100, 15, 0 ;NIGHTMARE + move EFFECT_FLAME_WHEEL, 60, FIRE, 100, 25, 10 ;FLAME_WHEEL + move EFFECT_SNORE, 40, NORMAL, 100, 15, 30 ;SNORE + move EFFECT_CURSE, 0, CURSE_TYPE, 100, 10, 0 ;CURSE + move EFFECT_REVERSAL, 1, NORMAL, 100, 15, 0 ;FLAIL + move EFFECT_CONVERSION2, 0, NORMAL, 100, 30, 0 ;CONVERSION2 + move EFFECT_NORMAL_HIT, 100, FLYING, 95, 5, 0 ;AEROBLAST + move EFFECT_SPEED_DOWN_2, 0, GRASS, 85, 40, 0 ;COTTON_SPORE + move EFFECT_REVERSAL, 1, FIGHTING, 100, 15, 0 ;REVERSAL + move EFFECT_SPITE, 0, GHOST, 100, 10, 0 ;SPITE + move EFFECT_FREEZE_HIT, 40, ICE, 100, 25, 10 ;POWDER_SNOW + move EFFECT_PROTECT, 0, NORMAL, 100, 10, 0 ;PROTECT + move EFFECT_PRIORITY_HIT, 40, FIGHTING, 100, 30, 0 ;MACH_PUNCH + move EFFECT_SPEED_DOWN_2, 0, NORMAL, 90, 10, 0 ;SCARY_FACE + move EFFECT_ALWAYS_HIT, 60, DARK, 100, 20, 0 ;FAINT_ATTACK + move EFFECT_CONFUSE, 0, NORMAL, 75, 10, 0 ;SWEET_KISS + move EFFECT_BELLY_DRUM, 0, NORMAL, 100, 10, 0 ;BELLY_DRUM + move EFFECT_POISON_HIT, 90, POISON, 100, 10, 30 ;SLUDGE_BOMB + move EFFECT_ACCURACY_DOWN_HIT, 20, GROUND, 100, 10, 100 ;MUD_SLAP + move EFFECT_ACCURACY_DOWN_HIT, 65, WATER, 85, 10, 50 ;OCTAZOOKA + move EFFECT_SPIKES, 0, GROUND, 100, 20, 0 ;SPIKES + move EFFECT_PARALYZE_HIT, 100, ELECTRIC, 50, 5, 100 ;ZAP_CANNON + move EFFECT_FORESIGHT, 0, NORMAL, 100, 40, 0 ;FORESIGHT + move EFFECT_DESTINY_BOND, 0, GHOST, 100, 5, 0 ;DESTINY_BOND + move EFFECT_PERISH_SONG, 0, NORMAL, 100, 5, 0 ;PERISH_SONG + move EFFECT_SPEED_DOWN_HIT, 55, ICE, 95, 15, 100 ;ICY_WIND + move EFFECT_PROTECT, 0, FIGHTING, 100, 5, 0 ;DETECT + move EFFECT_MULTI_HIT, 25, GROUND, 80, 10, 0 ;BONE_RUSH + move EFFECT_LOCK_ON, 0, NORMAL, 100, 5, 0 ;LOCK_ON + move EFFECT_RAMPAGE, 90, DRAGON, 100, 15, 0 ;OUTRAGE + move EFFECT_SANDSTORM, 0, ROCK, 100, 10, 0 ;SANDSTORM + move EFFECT_LEECH_HIT, 60, GRASS, 100, 5, 0 ;GIGA_DRAIN + move EFFECT_ENDURE, 0, NORMAL, 100, 10, 0 ;ENDURE + move EFFECT_ATTACK_DOWN_2, 0, NORMAL, 100, 20, 0 ;CHARM + move EFFECT_ROLLOUT, 30, ROCK, 90, 20, 0 ;ROLLOUT + move EFFECT_FALSE_SWIPE, 40, NORMAL, 100, 40, 0 ;FALSE_SWIPE + move EFFECT_SWAGGER, 0, NORMAL, 90, 15, 100 ;SWAGGER + move EFFECT_HEAL, 0, NORMAL, 100, 10, 0 ;MILK_DRINK + move EFFECT_PARALYZE_HIT, 65, ELECTRIC, 100, 20, 30 ;SPARK + move EFFECT_FURY_CUTTER, 10, BUG, 95, 20, 0 ;FURY_CUTTER + move EFFECT_DEFENSE_UP_HIT, 70, STEEL, 90, 25, 10 ;STEEL_WING + move EFFECT_MEAN_LOOK, 0, NORMAL, 100, 5, 0 ;MEAN_LOOK + move EFFECT_ATTRACT, 0, NORMAL, 100, 15, 0 ;ATTRACT + move EFFECT_SLEEP_TALK, 0, NORMAL, 100, 10, 0 ;SLEEP_TALK + move EFFECT_HEAL_BELL, 0, NORMAL, 100, 5, 0 ;HEAL_BELL + move EFFECT_RETURN, 1, NORMAL, 100, 20, 0 ;RETURN + move EFFECT_PRESENT, 1, NORMAL, 90, 15, 0 ;PRESENT + move EFFECT_FRUSTRATION, 1, NORMAL, 100, 20, 0 ;FRUSTRATION + move EFFECT_SAFEGUARD, 0, NORMAL, 100, 25, 0 ;SAFEGUARD + move EFFECT_PAIN_SPLIT, 0, NORMAL, 100, 20, 0 ;PAIN_SPLIT + move EFFECT_SACRED_FIRE, 100, FIRE, 95, 5, 50 ;SACRED_FIRE + move EFFECT_MAGNITUDE, 1, GROUND, 100, 30, 0 ;MAGNITUDE + move EFFECT_CONFUSE_HIT, 100, FIGHTING, 50, 5, 100 ;DYNAMICPUNCH + move EFFECT_NORMAL_HIT, 120, BUG, 85, 10, 0 ;MEGAHORN + move EFFECT_PARALYZE_HIT, 60, DRAGON, 100, 20, 30 ;DRAGONBREATH + move EFFECT_BATON_PASS, 0, NORMAL, 100, 40, 0 ;BATON_PASS + move EFFECT_ENCORE, 0, NORMAL, 100, 5, 0 ;ENCORE + move EFFECT_PURSUIT, 40, DARK, 100, 20, 0 ;PURSUIT + move EFFECT_RAPID_SPIN, 20, NORMAL, 100, 40, 0 ;RAPID_SPIN + move EFFECT_EVASION_DOWN, 0, NORMAL, 100, 20, 0 ;SWEET_SCENT + move EFFECT_DEFENSE_DOWN_HIT, 100, STEEL, 75, 15, 30 ;IRON_TAIL + move EFFECT_ATTACK_UP_HIT, 50, STEEL, 95, 35, 10 ;METAL_CLAW + move EFFECT_ALWAYS_HIT, 70, FIGHTING, 100, 10, 0 ;VITAL_THROW + move EFFECT_MORNING_SUN, 0, NORMAL, 100, 5, 0 ;MORNING_SUN + move EFFECT_SYNTHESIS, 0, GRASS, 100, 5, 0 ;SYNTHESIS + move EFFECT_MOONLIGHT, 0, NORMAL, 100, 5, 0 ;MOONLIGHT + move EFFECT_HIDDEN_POWER, 1, NORMAL, 100, 15, 0 ;HIDDEN_POWER + move EFFECT_NORMAL_HIT, 100, FIGHTING, 80, 5, 0 ;CROSS_CHOP + move EFFECT_TWISTER, 40, DRAGON, 100, 20, 20 ;TWISTER + move EFFECT_RAIN_DANCE, 0, WATER, 90, 5, 0 ;RAIN_DANCE + move EFFECT_SUNNY_DAY, 0, FIRE, 90, 5, 0 ;SUNNY_DAY + move EFFECT_SP_DEF_DOWN_HIT, 80, DARK, 100, 15, 20 ;CRUNCH + move EFFECT_MIRROR_COAT, 1, PSYCHIC_TYPE, 100, 20, 0 ;MIRROR_COAT + move EFFECT_PSYCH_UP, 0, NORMAL, 100, 10, 0 ;PSYCH_UP + move EFFECT_PRIORITY_HIT, 80, NORMAL, 100, 5, 0 ;EXTREMESPEED + move EFFECT_ALL_UP_HIT, 60, ROCK, 100, 5, 10 ;ANCIENTPOWER + move EFFECT_SP_DEF_DOWN_HIT, 80, GHOST, 100, 15, 20 ;SHADOW_BALL + move EFFECT_FUTURE_SIGHT, 80, PSYCHIC_TYPE, 90, 15, 0 ;FUTURE_SIGHT + move EFFECT_DEFENSE_DOWN_HIT, 20, FIGHTING, 100, 15, 50 ;ROCK_SMASH + move EFFECT_TRAP_TARGET, 15, WATER, 70, 15, 0 ;WHIRLPOOL + move EFFECT_BEAT_UP, 10, DARK, 100, 10, 0 ;BEAT_UP +.IndirectEnd:: diff --git a/data/moves/names.asm b/data/moves/names.asm new file mode 100644 index 0000000..8b61038 --- /dev/null +++ b/data/moves/names.asm @@ -0,0 +1,254 @@ +MoveNames:: + list_start MoveNames + li "POUND" + li "KARATE CHOP" + li "DOUBLESLAP" + li "COMET PUNCH" + li "MEGA PUNCH" + li "PAY DAY" + li "FIRE PUNCH" + li "ICE PUNCH" + li "THUNDERPUNCH" + li "SCRATCH" + li "VICEGRIP" + li "GUILLOTINE" + li "RAZOR WIND" + li "SWORDS DANCE" + li "CUT" + li "GUST" + li "WING ATTACK" + li "WHIRLWIND" + li "FLY" + li "BIND" + li "SLAM" + li "VINE WHIP" + li "STOMP" + li "DOUBLE KICK" + li "MEGA KICK" + li "JUMP KICK" + li "ROLLING KICK" + li "SAND-ATTACK" + li "HEADBUTT" + li "HORN ATTACK" + li "FURY ATTACK" + li "HORN DRILL" + li "TACKLE" + li "BODY SLAM" + li "WRAP" + li "TAKE DOWN" + li "THRASH" + li "DOUBLE-EDGE" + li "TAIL WHIP" + li "POISON STING" + li "TWINEEDLE" + li "PIN MISSILE" + li "LEER" + li "BITE" + li "GROWL" + li "ROAR" + li "SING" + li "SUPERSONIC" + li "SONICBOOM" + li "DISABLE" + li "ACID" + li "EMBER" + li "FLAMETHROWER" + li "MIST" + li "WATER GUN" + li "HYDRO PUMP" + li "SURF" + li "ICE BEAM" + li "BLIZZARD" + li "PSYBEAM" + li "BUBBLEBEAM" + li "AURORA BEAM" + li "HYPER BEAM" + li "PECK" + li "DRILL PECK" + li "SUBMISSION" + li "LOW KICK" + li "COUNTER" + li "SEISMIC TOSS" + li "STRENGTH" + li "ABSORB" + li "MEGA DRAIN" + li "LEECH SEED" + li "GROWTH" + li "RAZOR LEAF" + li "SOLARBEAM" + li "POISONPOWDER" + li "STUN SPORE" + li "SLEEP POWDER" + li "PETAL DANCE" + li "STRING SHOT" + li "DRAGON RAGE" + li "FIRE SPIN" + li "THUNDERSHOCK" + li "THUNDERBOLT" + li "THUNDER WAVE" + li "THUNDER" + li "ROCK THROW" + li "EARTHQUAKE" + li "FISSURE" + li "DIG" + li "TOXIC" + li "CONFUSION" + li "PSYCHIC" + li "HYPNOSIS" + li "MEDITATE" + li "AGILITY" + li "QUICK ATTACK" + li "RAGE" + li "TELEPORT" + li "NIGHT SHADE" + li "MIMIC" + li "SCREECH" + li "DOUBLE TEAM" + li "RECOVER" + li "HARDEN" + li "MINIMIZE" + li "SMOKESCREEN" + li "CONFUSE RAY" + li "WITHDRAW" + li "DEFENSE CURL" + li "BARRIER" + li "LIGHT SCREEN" + li "HAZE" + li "REFLECT" + li "FOCUS ENERGY" + li "BIDE" + li "METRONOME" + li "MIRROR MOVE" + li "SELFDESTRUCT" + li "EGG BOMB" + li "LICK" + li "SMOG" + li "SLUDGE" + li "BONE CLUB" + li "FIRE BLAST" + li "WATERFALL" + li "CLAMP" + li "SWIFT" + li "SKULL BASH" + li "SPIKE CANNON" + li "CONSTRICT" + li "AMNESIA" + li "KINESIS" + li "SOFTBOILED" + li "HI JUMP KICK" + li "GLARE" + li "DREAM EATER" + li "POISON GAS" + li "BARRAGE" + li "LEECH LIFE" + li "LOVELY KISS" + li "SKY ATTACK" + li "TRANSFORM" + li "BUBBLE" + li "DIZZY PUNCH" + li "SPORE" + li "FLASH" + li "PSYWAVE" + li "SPLASH" + li "ACID ARMOR" + li "CRABHAMMER" + li "EXPLOSION" + li "FURY SWIPES" + li "BONEMERANG" + li "REST" + li "ROCK SLIDE" + li "HYPER FANG" + li "SHARPEN" + li "CONVERSION" + li "TRI ATTACK" + li "SUPER FANG" + li "SLASH" + li "SUBSTITUTE" + li "STRUGGLE" + li "SKETCH" + li "TRIPLE KICK" + li "THIEF" + li "SPIDER WEB" + li "MIND READER" + li "NIGHTMARE" + li "FLAME WHEEL" + li "SNORE" + li "CURSE" + li "FLAIL" + li "CONVERSION2" + li "AEROBLAST" + li "COTTON SPORE" + li "REVERSAL" + li "SPITE" + li "POWDER SNOW" + li "PROTECT" + li "MACH PUNCH" + li "SCARY FACE" + li "FAINT ATTACK" + li "SWEET KISS" + li "BELLY DRUM" + li "SLUDGE BOMB" + li "MUD-SLAP" + li "OCTAZOOKA" + li "SPIKES" + li "ZAP CANNON" + li "FORESIGHT" + li "DESTINY BOND" + li "PERISH SONG" + li "ICY WIND" + li "DETECT" + li "BONE RUSH" + li "LOCK-ON" + li "OUTRAGE" + li "SANDSTORM" + li "GIGA DRAIN" + li "ENDURE" + li "CHARM" + li "ROLLOUT" + li "FALSE SWIPE" + li "SWAGGER" + li "MILK DRINK" + li "SPARK" + li "FURY CUTTER" + li "STEEL WING" + li "MEAN LOOK" + li "ATTRACT" + li "SLEEP TALK" + li "HEAL BELL" + li "RETURN" + li "PRESENT" + li "FRUSTRATION" + li "SAFEGUARD" + li "PAIN SPLIT" + li "SACRED FIRE" + li "MAGNITUDE" + li "DYNAMICPUNCH" + li "MEGAHORN" + li "DRAGONBREATH" + li "BATON PASS" + li "ENCORE" + li "PURSUIT" + li "RAPID SPIN" + li "SWEET SCENT" + li "IRON TAIL" + li "METAL CLAW" + li "VITAL THROW" + li "MORNING SUN" + li "SYNTHESIS" + li "MOONLIGHT" + li "HIDDEN POWER" + li "CROSS CHOP" + li "TWISTER" + li "RAIN DANCE" + li "SUNNY DAY" + li "CRUNCH" + li "MIRROR COAT" + li "PSYCH UP" + li "EXTREMESPEED" + li "ANCIENTPOWER" + li "SHADOW BALL" + li "FUTURE SIGHT" + li "ROCK SMASH" + li "WHIRLPOOL" + li "BEAT UP" + assert_list_length NUM_ATTACKS diff --git a/data/moves/present_power.asm b/data/moves/present_power.asm new file mode 100644 index 0000000..9f85b8a --- /dev/null +++ b/data/moves/present_power.asm @@ -0,0 +1,6 @@ +PresentPower: + ; chance, power + db 40 percent, 40 ; 40% chance + db 70 percent + 1, 80 ; 30% chance + db 80 percent, 120 ; 10% chance + db -1 ; 20% chance to heal instead diff --git a/data/moves/tmhm_moves.asm b/data/moves/tmhm_moves.asm new file mode 100644 index 0000000..633b004 --- /dev/null +++ b/data/moves/tmhm_moves.asm @@ -0,0 +1,27 @@ +; The add_tm, add_hm, and add_mt macros in constants/item_constants.asm simultaneously +; define constants for the item IDs and for the corresponding move values. + +TMHMMoves: +; entries correspond to *_TMNUM constants (see constants/item_constants.asm) + table_width 2, TMHMMoves + +; TMs +for n, 1, NUM_TMS + 1 + dw TM{02d:n}_MOVE +endr + assert_table_length NUM_TMS + +; HMs +for n, 1, NUM_HMS + 1 + dw HM{02d:n}_MOVE +endr + assert_table_length NUM_TMS + NUM_HMS + +; Move tutors +DEF n = 1 +for n, 1, NUM_TUTORS + 1 + dw MT{02d:n}_MOVE +endr + assert_table_length NUM_TM_HM_TUTOR + + dw 0 ; end diff --git a/data/party_menu_qualities.asm b/data/party_menu_qualities.asm new file mode 100644 index 0000000..0114123 --- /dev/null +++ b/data/party_menu_qualities.asm @@ -0,0 +1,40 @@ +; WritePartyMenuTilemap.Jumptable indexes (see engine/pokemon/party_menu.asm) + const_def + const PARTYMENUQUALITY_NICKNAMES + const PARTYMENUQUALITY_HP_BAR + const PARTYMENUQUALITY_HP_DIGITS + const PARTYMENUQUALITY_LEVEL + const PARTYMENUQUALITY_STATUS + const PARTYMENUQUALITY_TMHM_COMPAT + const PARTYMENUQUALITY_EVO_STONE_COMPAT + const PARTYMENUQUALITY_GENDER + const PARTYMENUQUALITY_MOBILE_SELECTION + +MACRO partymenuqualities + rept _NARG + db PARTYMENUQUALITY_\1 + shift + endr + db -1 ; end +ENDM + +PartyMenuQualityPointers: +; entries correspond to PARTYMENUACTION_* constants + table_width 2, PartyMenuQualityPointers + dw .Default ; PARTYMENUACTION_CHOOSE_POKEMON + dw .Default ; PARTYMENUACTION_HEALING_ITEM + dw .Default ; PARTYMENUACTION_SWITCH + dw .TMHM ; PARTYMENUACTION_TEACH_TMHM + dw .Default ; PARTYMENUACTION_MOVE + dw .EvoStone ; PARTYMENUACTION_EVO_STONE + dw .Gender ; PARTYMENUACTION_GIVE_MON + dw .Gender ; PARTYMENUACTION_GIVE_MON_FEMALE + dw .Default ; PARTYMENUACTION_GIVE_ITEM + dw .Mobile ; PARTYMENUACTION_MOBILE + assert_table_length NUM_PARTYMENUACTIONS + +.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 diff --git a/data/phone/non_trainer_names.asm b/data/phone/non_trainer_names.asm new file mode 100644 index 0000000..deef730 --- /dev/null +++ b/data/phone/non_trainer_names.asm @@ -0,0 +1,17 @@ +NonTrainerCallerNames: +; entries correspond to PHONECONTACT_* constants (see constants/trainer_constants.asm) + table_width 2, NonTrainerCallerNames + dw .none + dw .mom + dw .bikeshop + dw .bill + dw .elm + dw .buena + assert_table_length NUM_NONTRAINER_PHONECONTACTS + 1 + +.none: db "----------@" +.mom: db "MOM:@" +.bill: db "BILL:@" +.elm: db "PROF.ELM:@" +.bikeshop: db "BIKE SHOP:@" +.buena: db "BUENA: DISC JOCKEY@" diff --git a/data/phone/permanent_numbers.asm b/data/phone/permanent_numbers.asm new file mode 100644 index 0000000..98c6212 --- /dev/null +++ b/data/phone/permanent_numbers.asm @@ -0,0 +1,4 @@ +PermanentNumbers: + db PHONECONTACT_MOM + db PHONECONTACT_ELM + db -1 ; end diff --git a/data/phone/phone_contacts.asm b/data/phone/phone_contacts.asm new file mode 100644 index 0000000..ae6640e --- /dev/null +++ b/data/phone/phone_contacts.asm @@ -0,0 +1,52 @@ +MACRO phone +; trainer class, trainer id, map, callee time, callee script, caller time, caller script + db \1, \2 + map_id \3 + db \4 + dba \5 + db \6 + dba \7 +ENDM + +PhoneContacts: +; entries correspond to PHONE_* constants + table_width PHONE_CONTACT_SIZE, PhoneContacts + phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript + phone TRAINER_NONE, PHONECONTACT_MOM, PLAYERS_HOUSE_1F, ANYTIME, MomPhoneCalleeScript, 0, UnusedPhoneScript + phone TRAINER_NONE, PHONECONTACT_BIKESHOP, OAKS_LAB, 0, UnusedPhoneScript, 0, UnusedPhoneScript + phone TRAINER_NONE, PHONECONTACT_BILL, N_A, ANYTIME, BillPhoneCalleeScript, 0, BillPhoneCallerScript + phone TRAINER_NONE, PHONECONTACT_ELM, ELMS_LAB, ANYTIME, ElmPhoneCalleeScript, 0, ElmPhoneCallerScript + phone SCHOOLBOY, JACK1, NATIONAL_PARK, ANYTIME, JackPhoneCalleeScript, ANYTIME, JackPhoneCallerScript + phone POKEFANF, BEVERLY1, NATIONAL_PARK, ANYTIME, BeverlyPhoneCalleeScript, ANYTIME, BeverlyPhoneCallerScript + phone SAILOR, HUEY1, OLIVINE_LIGHTHOUSE_2F, ANYTIME, HueyPhoneCalleeScript, ANYTIME, HueyPhoneCallerScript + phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript + phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript + phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript + phone COOLTRAINERM, GAVEN3, ROUTE_26, ANYTIME, GavenPhoneCalleeScript, ANYTIME, GavenPhoneCallerScript + phone COOLTRAINERF, BETH1, ROUTE_26, ANYTIME, BethPhoneCalleeScript, ANYTIME, BethPhoneCallerScript + phone BIRD_KEEPER, JOSE2, ROUTE_27, ANYTIME, JosePhoneCalleeScript, ANYTIME, JosePhoneCallerScript + phone COOLTRAINERF, REENA1, ROUTE_27, ANYTIME, ReenaPhoneCalleeScript, ANYTIME, ReenaPhoneCallerScript + phone YOUNGSTER, JOEY1, ROUTE_30, ANYTIME, JoeyPhoneCalleeScript, ANYTIME, JoeyPhoneCallerScript + phone BUG_CATCHER, WADE1, ROUTE_31, ANYTIME, WadePhoneCalleeScript, ANYTIME, WadePhoneCallerScript + phone FISHER, RALPH1, ROUTE_32, ANYTIME, RalphPhoneCalleeScript, ANYTIME, RalphPhoneCallerScript + phone PICNICKER, LIZ1, ROUTE_32, ANYTIME, LizPhoneCalleeScript, ANYTIME, LizPhoneCallerScript + phone HIKER, ANTHONY2, ROUTE_33, ANYTIME, AnthonyPhoneCalleeScript, ANYTIME, AnthonyPhoneCallerScript + phone CAMPER, TODD1, ROUTE_34, ANYTIME, ToddPhoneCalleeScript, ANYTIME, ToddPhoneCallerScript + phone PICNICKER, GINA1, ROUTE_34, ANYTIME, GinaPhoneCalleeScript, ANYTIME, GinaPhoneCallerScript + phone JUGGLER, IRWIN1, ROUTE_35, ANYTIME, IrwinPhoneCalleeScript, ANYTIME, IrwinPhoneCallerScript + phone BUG_CATCHER, ARNIE1, ROUTE_35, ANYTIME, ArniePhoneCalleeScript, ANYTIME, ArniePhoneCallerScript + phone SCHOOLBOY, ALAN1, ROUTE_36, ANYTIME, AlanPhoneCalleeScript, ANYTIME, AlanPhoneCallerScript + phone TRAINER_NONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript + phone LASS, DANA1, ROUTE_38, ANYTIME, DanaPhoneCalleeScript, ANYTIME, DanaPhoneCallerScript + phone SCHOOLBOY, CHAD1, ROUTE_38, ANYTIME, ChadPhoneCalleeScript, ANYTIME, ChadPhoneCallerScript + phone POKEFANM, DEREK1, ROUTE_39, ANYTIME, DerekPhoneCalleeScript, ANYTIME, DerekPhoneCallerScript + phone FISHER, TULLY1, ROUTE_42, ANYTIME, TullyPhoneCalleeScript, ANYTIME, TullyPhoneCallerScript + phone POKEMANIAC, BRENT1, ROUTE_43, ANYTIME, BrentPhoneCalleeScript, ANYTIME, BrentPhoneCallerScript + phone PICNICKER, TIFFANY3, ROUTE_43, ANYTIME, TiffanyPhoneCalleeScript, ANYTIME, TiffanyPhoneCallerScript + phone BIRD_KEEPER, VANCE1, ROUTE_44, ANYTIME, VancePhoneCalleeScript, ANYTIME, VancePhoneCallerScript + phone FISHER, WILTON1, ROUTE_44, ANYTIME, WiltonPhoneCalleeScript, ANYTIME, WiltonPhoneCallerScript + phone BLACKBELT_T, KENJI3, ROUTE_45, ANYTIME, KenjiPhoneCalleeScript, ANYTIME, KenjiPhoneCallerScript + phone HIKER, PARRY1, ROUTE_45, ANYTIME, ParryPhoneCalleeScript, ANYTIME, ParryPhoneCallerScript + phone PICNICKER, ERIN1, ROUTE_46, ANYTIME, ErinPhoneCalleeScript, ANYTIME, ErinPhoneCallerScript + phone TRAINER_NONE, PHONECONTACT_BUENA, GOLDENROD_DEPT_STORE_ROOF, ANYTIME, BuenaPhoneCalleeScript, ANYTIME, BuenaPhoneCallerScript + assert_table_length NUM_PHONE_CONTACTS + 1 diff --git a/data/phone/special_calls.asm b/data/phone/special_calls.asm new file mode 100644 index 0000000..55c157d --- /dev/null +++ b/data/phone/special_calls.asm @@ -0,0 +1,19 @@ +MACRO specialcall +; condition, contact, script + dw \1 + db \2 + dba \3 +ENDM + +SpecialPhoneCallList: +; entries correspond to SPECIALCALL_* constants + table_width SPECIALCALL_SIZE, SpecialPhoneCallList + specialcall SpecialCallOnlyWhenOutside, PHONECONTACT_ELM, ElmPhoneCallerScript + specialcall SpecialCallOnlyWhenOutside, PHONECONTACT_ELM, ElmPhoneCallerScript + specialcall SpecialCallOnlyWhenOutside, PHONECONTACT_ELM, ElmPhoneCallerScript + specialcall SpecialCallOnlyWhenOutside, PHONECONTACT_ELM, ElmPhoneCallerScript + specialcall SpecialCallWhereverYouAre, PHONECONTACT_ELM, ElmPhoneCallerScript + specialcall SpecialCallWhereverYouAre, PHONECONTACT_BIKESHOP, BikeShopPhoneCallerScript + specialcall SpecialCallWhereverYouAre, PHONECONTACT_MOM, MomPhoneLectureScript + specialcall SpecialCallOnlyWhenOutside, PHONECONTACT_ELM, ElmPhoneCallerScript + assert_table_length NUM_SPECIALCALLS diff --git a/data/phone/text/alan_callee.asm b/data/phone/text/alan_callee.asm new file mode 100644 index 0000000..8121b8e --- /dev/null +++ b/data/phone/text/alan_callee.asm @@ -0,0 +1,59 @@ +AlanAnswerPhoneText: + text "Yup, it's @" + text_ram wStringBuffer3 + text "!" + + para "Is this ?" + line "Good morning!" + done + +AlanAnswerPhoneDayText: + text "Yup, it's @" + text_ram wStringBuffer3 + text "!" + + para "Is that ?" + done + +AlanAnswerPhoneNiteText: + text "Yup, it's @" + text_ram wStringBuffer3 + text "!" + + para "Is that ?" + line "Good evening!" + done + +AlanGreetText: + text "Hello! It's me," + line "@" + text_ram wStringBuffer3 + text "!" + done + +AlanGreetDayText: + text "Hello! It's me," + line "@" + text_ram wStringBuffer3 + text "!" + done + +AlanGreetNiteText: + text "Hello! It's me," + line "@" + text_ram wStringBuffer3 + text "!" + done + +AlanGenericText: + text ", are you" + line "raising your" + cont "#MON properly?" + + para "I read in a book" + line "that you should" + + para "raise any #MON" + line "you catch with" + cont "love and care." + done diff --git a/data/phone/text/alan_caller.asm b/data/phone/text/alan_caller.asm new file mode 100644 index 0000000..1755ffb --- /dev/null +++ b/data/phone/text/alan_caller.asm @@ -0,0 +1,98 @@ +AlanGettingStrongerText: + text "My @" + text_ram wStringBuffer4 + text "'s" + line "getting stronger," + + para "exactly as I" + line "calculated!" + done + +AlanDefeatedMonText: + text "By the way, we" + line "knocked out a wild" + + para "@" + text_ram wStringBuffer4 + text " just" + line "the other day." + + para "Studying up in" + line "advance worked!" + done + +AlanLostAMonText: + text "By the way, a wild" + line "@" + text_ram wStringBuffer4 + text " escaped" + cont "on me yesterday." + + para "A computational" + line "error on my part…" + done + +AlanBattleRematchText: + text "I've studied quite" + line "a bit since then," + + para "and I've gotten a" + line "lot better!" + + para "I'm hanging out on" + line "@" + text_ram wStringBuffer5 + text "." + + para "Can you come down" + line "for a battle?" + done + +AlanHangUpText: + text "See you later!" + done + +AlanFoundItemText: + text "Hehehe, I picked" + line "up something nice!" + + para "You can have it!" + line "Why don't you come" + + para "to @" + text_ram wStringBuffer5 + text_start + line "and pick it up?" + done + +AlanHaventPickedUpAnythingText: + text "I haven't picked" + line "up anything yet." + + para "I'll call you if I" + line "find something." + done + +AlanReminderText: + text "If we don't battle" + line "soon, I'll forget" + cont "my strategy!" + + para "I'm waiting on" + line "@" + text_ram wStringBuffer5 + text "!" + done + +AlanComePickUpGiftText: + text "I have to do my" + line "homework, so can" + + para "you come get your" + line "gift right away?" + + para "I'm waiting on" + line "@" + text_ram wStringBuffer5 + text "!" + done diff --git a/data/phone/text/alan_overworld.asm b/data/phone/text/alan_overworld.asm new file mode 100644 index 0000000..e124603 --- /dev/null +++ b/data/phone/text/alan_overworld.asm @@ -0,0 +1,71 @@ +AlanAskNumber1Text: + text "Reading textbooks" + line "is worthwhile" + cont "every so often." + + para "When I'm reading" + line "and walking, I" + cont "have to look down." + + para "So I notice items" + line "on the ground." + + para "Next time I find" + line "something, I'll" + cont "give it to you." + + para "May I have your" + line "phone number?" + done + +AlanAskNumber2Text: + text "If I find some-" + line "thing, it's yours." + + para "So may I have your" + line "phone number?" + done + +AlanNumberAcceptedText: + text "I'll call you as" + line "soon as I find" + + para "something. You can" + line "count on it!" + done + +AlanNumberDeclinedText: + text "Oh… I thought it" + line "would be a good" + + para "break to call you" + line "when I'm studying…" + done + +AlanPhoneFullText: + text "There's no room" + line "for my number." + done + +AlanRematchText: + text "I waited around" + line "for you!" + + para "I'm thoroughly" + line "prepared today!" + done + +AlanGiftText: + text "This, this! This" + line "is yours! Ta-da!" + done + +AlanPackFullText: + text "Whoops!" + + para "You can't carry" + line "any more items!" + + para "I'll hold it until" + line "next time." + done diff --git a/data/phone/text/anthony_callee.asm b/data/phone/text/anthony_callee.asm new file mode 100644 index 0000000..ab968e3 --- /dev/null +++ b/data/phone/text/anthony_callee.asm @@ -0,0 +1,73 @@ +AnthonyAnswerPhoneText: + text "Yeah, @" + text_ram wStringBuffer3 + text " the" + line "HIKER here." + + para "Ah, !" + done + +AnthonyAnswerPhoneDayText: + text "Yeah, @" + text_ram wStringBuffer3 + text " the" + line "HIKER here." + + para "Ah, ," + line "right?" + done + +AnthonyAnswerPhoneNiteText: + text "Yeah, @" + text_ram wStringBuffer3 + text " the" + line "HIKER here." + + para "Ah, , isn't" + line "it?" + done + +AnthonyGreetText: + text "Yo, ?" + + para "This is @" + text_ram wStringBuffer3 + text_start + line "the HIKER!" + done + +AnthonyGreetDayText: + text "Hey, is this" + line "?" + + para "This is @" + text_ram wStringBuffer3 + text_start + line "the HIKER!" + done + +AnthonyGreetNiteText: + text ", you still" + line "awake?" + + para "This is @" + text_ram wStringBuffer3 + text_start + line "the HIKER!" + done + +AnthonyGenericText: + text "Are your #MON" + line "as feisty as ever?" + + para "My @" + text_ram wStringBuffer4 + text " and" + line "me--we have energy" + + para "to burn. We hike" + line "up mountains every" + + para "day to work out" + line "all our energy." + done diff --git a/data/phone/text/anthony_caller.asm b/data/phone/text/anthony_caller.asm new file mode 100644 index 0000000..29b3112 --- /dev/null +++ b/data/phone/text/anthony_caller.asm @@ -0,0 +1,139 @@ +AnthonyMonAteSomeBerriesText: + text "The other day, I" + line "was watching my" + + para "@" + text_ram wStringBuffer4 + text " eat" + line "some BERRIES." + + para "It looked like it" + line "was enjoying its" + + para "meal, so I decided" + line "to try some." + + para "I'm not sure if" + line "people should eat" + + para "that stuff, but it" + line "was delicious!" + done + +AnthonyDefeatedMonText: + text "Lately, I've been" + line "running across" + + para "wild @" + text_ram wStringBuffer4 + text_start + line "quite often." + + para "They're easily" + line "taken care of." + done + +AnthonyLostAMonText: + text "Oh yeah, I was" + line "battling this" + + para "@" + text_ram wStringBuffer4 + text " the" + line "other day…" + + para "It took off when I" + line "got distracted by" + cont "a passing BEAUTY." + + para "Learn from my" + line "mistake--always" + + para "stay focused on" + line "the job at hand!" + done + +AnthonyBattleRematchText: + text "Come on--let's" + line "battle right now!" + + para "@" + text_ram wStringBuffer5 + text " is" + line "where I am." + + para "Come on down if" + line "you feel up to it!" + done + +AnthonyHangUpText: + text "All right then!" + line "Be good!" + done + +AnthonySwarmText: + text "! It's" + line "mind-blowing!" + + para "I took a hike in" + line "@" + text_ram wStringBuffer5 + text_start + cont "yesterday, see?" + + para "Well, there were" + line "tons of @" + text_ram wStringBuffer4 + text_start + para "around! You have" + line "to see it!" + + para "I get this feeling" + line "that @" + text_ram wStringBuffer4 + text_start + para "may be timid." + line "I didn't see any" + + para "where there are" + line "strong #MON." + done + +AnthonyWasntPayingAttentionText: + text "Rare #MON?" + + para "Hey, sorry! I was" + line "too focused on my" + + para "hike, so I wasn't" + line "paying attention." + done + +AnthonyReminderText: + text "Hello! You haven't" + line "forgotten about" + + para "our battle, have" + line "you?" + + para "@" + text_ram wStringBuffer5 + text "!" + line "I'm waiting!" + done + +AnthonyHurryText: + text "Hello? What? Where" + line "is DUNSPARCE?" + + para "DARK CAVE! Hurry!" + + para "I know I've said" + line "it before, but" + + para "DUNSPARCE don't" + line "appear when there" + + para "are strong #MON" + line "around." + done diff --git a/data/phone/text/anthony_overworld.asm b/data/phone/text/anthony_overworld.asm new file mode 100644 index 0000000..71e419c --- /dev/null +++ b/data/phone/text/anthony_overworld.asm @@ -0,0 +1,52 @@ +AnthonyAskNumber1Text: + text "By the way, I'm a" + line "HIKER, so I often" + + para "go to mountains" + line "and caves." + + para "I occasionally see" + line "rare #MON." + + para "I could call you" + line "the next time I" + cont "see one." + + para "Feel like swapping" + line "phone numbers?" + done + +AnthonyAskNumber2Text: + text "I could call you" + line "when I see some" + cont "rare #MON." + + para "Feel like swapping" + line "phone numbers?" + done + +AnthonyNumberAcceptedText: + text "Be patient. I'll" + line "find some rare" + cont "#MON for you!" + done + +AnthonyNumberDeclinedText: + text "You're cold. I may" + line "as well head to" + cont "the mountains…" + done + +AnthonyPhoneFullText: + text "Your phone's full." + + para "It can't register" + line "my phone number." + done + +AnthonyRematchText: + text "All righty, then!" + + para "My #MON and I" + line "are raring to go!" + done diff --git a/data/phone/text/arnie_callee.asm b/data/phone/text/arnie_callee.asm new file mode 100644 index 0000000..51a70c8 --- /dev/null +++ b/data/phone/text/arnie_callee.asm @@ -0,0 +1,62 @@ +ArnieAnswerPhoneText: + text "Yeah, hello." + line "This is @" + text_ram wStringBuffer3 + text "." + + para "…Huh, ? Yo!" + done + +ArnieAnswerPhoneDayText: + text "Yeah, hello, you" + line "got @" + text_ram wStringBuffer3 + text "." + + para "…Huh, ? Yo!" + done + +ArnieAnswerPhoneNiteText: + text "Yeah, hello, you" + line "got @" + text_ram wStringBuffer3 + text "." + + para "…Huh, ? Yo!" + done + +ArnieGreetText: + text "Yeah, hello?" + line "@" + text_ram wStringBuffer3 + text " calling." + + para "What are you up" + line "to, ?" + done + +ArnieGreetDayText: + text "Yeah, hello?" + line "@" + text_ram wStringBuffer3 + text " calling." + + para "Where are you now," + line "?" + done + +ArnieGreetNiteText: + text "Yeah, hello?" + line "@" + text_ram wStringBuffer3 + text " calling." + + para "Are you awake now," + line "?" + done + +ArnieGenericText: + text "I bet your #MON" + line "are a lot stronger" + cont "than before." + done diff --git a/data/phone/text/arnie_caller.asm b/data/phone/text/arnie_caller.asm new file mode 100644 index 0000000..96e3623 --- /dev/null +++ b/data/phone/text/arnie_caller.asm @@ -0,0 +1,106 @@ +ArnieMonIsSoCuteText: + text "I'm always with my" + line "@" + text_ram wStringBuffer4 + text "!" + + para "It's so cute!" + line "I just love it!" + done + +ArnieDefeatedMonText: + text "Changing the topic" + line "here, I saw this" + + para "@" + text_ram wStringBuffer4 + text " for the" + line "first time." + + para "It was easy to" + line "beat, actually." + done + +ArnieLostAMonText: + text "I was wondering," + line "do you happen to" + cont "have @" + text_ram wStringBuffer4 + text "?" + + para "I can't seem to" + line "catch one. What is" + + para "its weakness, I" + line "wonder." + done + +ArnieBattleRematchText: + text "Hey, let's battle" + line "our #MON!" + + para "I won't lose to" + line "you battling or in" + + para "the Bug-Catching" + line "Contest!" + + para "I'll be here on" + line "@" + text_ram wStringBuffer5 + text "!" + done + +ArnieHangUpText: + text "Let's talk again," + line "huh?" + done + +ArnieSwarmText: + text "Boy, am I glad I" + line "caught you!" + + para "A whole bunch of" + line "@" + text_ram wStringBuffer4 + text " have" + + para "appeared around" + line "@" + text_ram wStringBuffer5 + text "!" + + para "You have to see" + line "this!" + done + +ArnieHaventSeenRareMonText: + text "I haven't had any" + line "luck seeing rare" + cont "#MON lately…" + + para "But I know they're" + line "out there!" + done + +ArnieReminderText: + text "Hey, where are you" + line "now?" + + para "Let's battle. I'll" + line "be waiting for you" + cont "on @" + text_ram wStringBuffer5 + text "!" + done + +ArnieHurryText: + text "Hello? Are you" + line "coming or what?" + + para "You're missing out" + line "on seeing YANMA!" + + para "Get down to ROUTE" + line "35 right now!" + done diff --git a/data/phone/text/arnie_overworld.asm b/data/phone/text/arnie_overworld.asm new file mode 100644 index 0000000..4b12bd9 --- /dev/null +++ b/data/phone/text/arnie_overworld.asm @@ -0,0 +1,59 @@ +ArnieAskNumber1Text: + text "Do you get the" + line "feeling that there" + + para "are more rare" + line "#MON around?" + + para "I'm positive there" + line "are, so I look all" + cont "the time." + + para "If I find one, I" + line "want to share the" + + para "good news with" + line "everyone I know." + + para "I know! Give me" + line "your phone number." + done + +ArnieAskNumber2Text: + text "I want to let" + line "people know if I" + cont "see rare #MON." + + para "Please give me" + line "your phone number!" + done + +ArnieNumberAcceptedText: + text "If I spot any" + line "awesome #MON," + + para "I'll be sure to" + line "give you a call!" + done + +ArnieNumberDeclinedText: + text "Aww! I want to" + line "tell someone about" + cont "my discoveries!" + done + +ArniePhoneFullText: + text "There's no space" + line "for my number." + + para "If you make room," + line "register me!" + done + +ArnieRematchText: + text "It's my turn to" + line "win now!" + + para "I've turned over a" + line "new leaf!" + done diff --git a/data/phone/text/beth_callee.asm b/data/phone/text/beth_callee.asm new file mode 100644 index 0000000..289c3e6 --- /dev/null +++ b/data/phone/text/beth_callee.asm @@ -0,0 +1,79 @@ +BethAnswerPhoneText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "." + + para "Oh, ." + line "Good morning." + + para "" + done + +BethAnswerPhoneDayText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "." + + para "Oh. Hi, ." + done + +BethAnswerPhoneNiteText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "." + + para "Oh, ." + line "Good evening." + done + +BethGreetText: + text "Good morning," + line "!" + + para "This is @" + text_ram wStringBuffer3 + text "." + line "Were you sleeping?" + done + +BethGreetDayText: + text ", hi!" + line "This is @" + text_ram wStringBuffer3 + text "." + + para "Do you have some" + line "time?" + done + +BethGreetNiteText: + text "Hi, ." + line "Good evening." + + para "This is @" + text_ram wStringBuffer3 + text "." + + para "I hope you were" + line "awake." + done + +BethGenericText: + text "Are you the kind" + line "of person who goes" + + para "to #MON CENTERS" + line "often?" + + para "I go every day." + line "Watching out for" + + para "the health of your" + line "#MON is a basic" + + para "part of being a" + line "#MON trainer." + done diff --git a/data/phone/text/beth_caller.asm b/data/phone/text/beth_caller.asm new file mode 100644 index 0000000..b42ad99 --- /dev/null +++ b/data/phone/text/beth_caller.asm @@ -0,0 +1,98 @@ +BethExhilaratingRideText: + text "Do you remember my" + line "sweet @" + text_ram wStringBuffer4 + text "?" + + para "@" + text_ram wStringBuffer4 + text " runs" + line "very fast." + + para "It's exhilarating" + line "to ride on its" + + para "back when it" + line "really gets going." + done + +BethDefeatedMonText: + text "Oh, have you ever" + line "seen a @" + text_ram wStringBuffer4 + text_start + cont "before?" + + para "I just battled" + line "one…" + + para "It was much faster" + line "than I expected." + + para "I was a little" + line "shocked." + + para "I still won, of" + line "course." + done + +BethLostAMonText: + text "Oh, I just saw a" + line "wild @" + text_ram wStringBuffer4 + text "." + + para "I was trying to" + line "catch it when I" + + para "noticed that I was" + line "all out of #" + cont "BALLS." + + para "If you don't check" + line "your items, you" + + para "may run out at the" + line "worst time." + + para "I hope you learn" + line "from my mistake." + done + +BethBattleRematchText: + text "Do you want to" + line "battle? I'm going" + cont "to win this time!" + + para "I'll be waiting" + line "for you around" + + para "@" + text_ram wStringBuffer5 + text "." + line "Look for me, OK?" + done + +BethHangUpText: + text "OK, bye-bye!" + done + +BethLetsBattleAgainSometimeText: + text "Let's battle again" + line "sometime!" + done + +BethReminderText: + text "Um… ?" + line "What's wrong?" + + para "Did you forget our" + line "deal?" + + para "@" + text_ram wStringBuffer5 + text "." + + para "That's where I'm" + line "waiting." + done diff --git a/data/phone/text/beth_overworld.asm b/data/phone/text/beth_overworld.asm new file mode 100644 index 0000000..5c23a7a --- /dev/null +++ b/data/phone/text/beth_overworld.asm @@ -0,0 +1,56 @@ +BethAskNumber1Text: + text "It's been a while" + line "since I lost…" + + para "You're very good" + line "at battling." + + para "We should battle" + line "again sometime." + + para "By challenging a" + line "tough trainer like" + + para "you, I think I can" + line "get better too." + + para "So how about it?" + + para "Would you give me" + line "your phone number?" + done + +BethAskNumber2Text: + text "By challenging a" + line "tough trainer like" + + para "you, I think I can" + line "get better too." + + para "So how about it?" + + para "Would you give me" + line "your phone number?" + done + +BethNumberAcceptedText: + text "Let's battle again" + line "sometime!" + done + +BethNumberDeclinedText: + text "That's too bad…" + + para "Let me know if you" + line "change your mind." + done + +BethPhoneFullText: + text "Oh no. Your phone" + line "is out of memory." + done + +BethRematchText: + text "You sure kept me" + line "waiting! Let's go!" + done diff --git a/data/phone/text/beverly_callee.asm b/data/phone/text/beverly_callee.asm new file mode 100644 index 0000000..da97a75 --- /dev/null +++ b/data/phone/text/beverly_callee.asm @@ -0,0 +1,68 @@ +BeverlyAnswerPhoneText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "." + + para "Oh! Good morning," + line "." + done + +BeverlyAnswerPhoneDayText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "." + + para "Oh! Good day," + line "." + done + +BeverlyAnswerPhoneNiteText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "." + + para "Oh! Good evening," + line "." + done + +BeverlyGreetText: + text "Hello, ." + line "Good morning." + + para "This is @" + text_ram wStringBuffer3 + text "." + line "Were you asleep?" + done + +BeverlyGreetDayText: + text "Hi, ." + line "This is @" + text_ram wStringBuffer3 + text "." + + para "How are you doing?" + done + +BeverlyGreetNiteText: + text "Hi, ." + line "This is @" + text_ram wStringBuffer3 + text "." + + para "Were you awake?" + done + +BeverlyGenericText: + text "Keeping your" + line "#MON happy?" + + para "My @" + text_ram wStringBuffer4 + text " is" + line "healthy. It eats a" + cont "lot every day." + done diff --git a/data/phone/text/beverly_caller.asm b/data/phone/text/beverly_caller.asm new file mode 100644 index 0000000..761f4fe --- /dev/null +++ b/data/phone/text/beverly_caller.asm @@ -0,0 +1,82 @@ +BeverlyMadeMonEvenCuterText: + text "I fancied up my" + line "@" + text_ram wStringBuffer4 + text " and" + + para "made it even cuter" + line "than before!" + done + +BeverlyDefeatedMonText: + text "I happened to come" + line "across a wild" + cont "SNUBBULL recently." + + para "My SNUBBULL, I" + line "assure you, was" + + para "far cuter than the" + line "wild one." + done + +BeverlyLostAMonText: + text "I happened to see" + line "a wild MARILL the" + + para "other day." + line "Or so I thought." + + para "A closer look" + line "showed it was" + + para "@" + text_ram wStringBuffer4 + text ". I was" + line "quite miffed." + done + +BeverlyHangUpText: + text "You can expect a" + line "call from me." + done + +BeverlyFoundItemText: + text "My husband got" + line "some NUGGETS." + + para "If you'd like, you" + line "could have one as" + + para "thanks for helping" + line "me out." + + para "I'll be at" + line "@" + text_ram wStringBuffer5 + text "." + + para "Please come see me" + line "when you can." + done + +BeverlyLetsChatAboutMonAgainText: + text "Are your #MON" + line "in prime form?" + + para "Let's chat about" + line "#MON again." + done + +BeverlyComePickUpText: + text "Pardon?" + line "Oh, the NUGGET?" + + para "There's no need to" + line "hurry. Come see me" + + para "in @" + text_ram wStringBuffer5 + text_start + line "when you can." + done diff --git a/data/phone/text/beverly_overworld.asm b/data/phone/text/beverly_overworld.asm new file mode 100644 index 0000000..cd4b5b4 --- /dev/null +++ b/data/phone/text/beverly_overworld.asm @@ -0,0 +1,60 @@ +BeverlyAskNumber1Text: + text "Your MARILL is so" + line "cute and adorable!" + + para "You love #MON" + line "just like I do!" + + para "Want to trade" + line "phone numbers?" + + para "Let's chat! It'll" + line "be so much fun!" + done + +BeverlyAskNumber2Text: + text "Your MARILL is so" + line "cute and adorable!" + + para "We should chat, it" + line "will be fun." + + para "Can I have your" + line "phone number?" + done + +BeverlyNumberAcceptedText: + text "To be honest, I" + line "want a MARILL." + + para "But I make do with" + line "my cute SNUBBULL." + done + +BeverlyNumberDeclinedText: + text "Oh… That's" + line "disappointing…" + + para "Goodbye, MARILL…" + done + +BeverlyPhoneFullText: + text "Oh? Your phone's" + line "memory is full." + done + +BeverlyGiftText: + text "Oh? ? " + line "I waited here for" + + para "you. I brought you" + line "a little gift." + done + +BeverlyPackFullText: + text "Oh?" + line "You have no room." + + para "Please come back" + line "for it later." + done diff --git a/data/phone/text/bike_shop.asm b/data/phone/text/bike_shop.asm new file mode 100644 index 0000000..30ccfea --- /dev/null +++ b/data/phone/text/bike_shop.asm @@ -0,0 +1,19 @@ +BikeShopPhoneCallerText: + text "Hi, !" + line "Our BICYCLE sales" + + para "have gone through" + line "the roof!" + + para "We owe it all to" + line "your advertising" + + para "by riding around" + line "on our BICYCLE." + + para "As our way of say-" + line "ing thanks, please" + + para "keep that BICYCLE." + line "Thanks again!" + done diff --git a/data/phone/text/bill.asm b/data/phone/text/bill.asm new file mode 100644 index 0000000..c08e627 --- /dev/null +++ b/data/phone/text/bill.asm @@ -0,0 +1,101 @@ +BillPhoneMornGreetingText: + text "Good morning!" + + para "This is the #-" + line "MON STORAGE SYSTEM" + + para "ADMINISTRATION" + line "SERVICE." + done + +BillPhoneDayGreetingText: + text "Good day!" + + para "This is the #-" + line "MON STORAGE SYSTEM" + + para "ADMINISTRATION" + line "SERVICE." + done + +BillPhoneNiteGreetingText: + text "Good evening!" + + para "This is the #-" + line "MON STORAGE SYSTEM" + + para "ADMINISTRATION" + line "SERVICE." + done + +BillPhoneGenericText: + text "Who's calling?" + + para ", is it?" + line "Hang on a sec…" + + para "<……>" + line "<……>" + done + +BillPhoneNotFullText: + text "Thanks for" + line "waiting!" + + para ", your BOX" + line "has room for @" + text_ram wStringBuffer3 + text_start + cont "more #MON." + + para "Get out there and" + line "fill it up!" + done + +BillPhoneNearlyFullText: + text "Thanks for" + line "waiting!" + + para ", your BOX" + line "has room for only" + cont "@" + text_ram wStringBuffer3 + text " more #MON." + + para "Maybe you should" + line "switch your BOX." + done + +BillPhoneFullText: + text "Thanks for" + line "waiting!" + + para ", your BOX" + line "is full!" + + para "You'll have to" + line "switch BOXES if" + + para "you want to catch" + line "more #MON." + done + +BillPhoneNewlyFullText: + text "Hi, ?" + line "It's me, BILL!" + + para "Thanks for using" + line "my STORAGE SYSTEM." + + para "That last #MON" + line "you sent filled" + cont "your BOX up." + + para "You'll have to" + line "switch BOXES if" + + para "you want to catch" + line "more #MON." + + para "Bye now!" + done diff --git a/data/phone/text/brent_callee.asm b/data/phone/text/brent_callee.asm new file mode 100644 index 0000000..351ea6b --- /dev/null +++ b/data/phone/text/brent_callee.asm @@ -0,0 +1,79 @@ +BrentAnswerPhoneText: + text "Yes? @" + text_ram wStringBuffer3 + text " here…" + + para "Ah, . What" + line "can I do for you?" + done + +BrentAnswerPhoneDayText: + text "Yes? @" + text_ram wStringBuffer3 + text " here…" + + para "Ah, . What" + line "can I do for you?" + done + +BrentAnswerPhoneNiteText: + text "Yes? @" + text_ram wStringBuffer3 + text " here…" + + para "Ah, . What" + line "can I do for you?" + done + +BrentGreetText: + text "Hiya, . How" + line "are you doing?" + + para "Hey! It's me," + line "@" + text_ram wStringBuffer3 + text "." + done + +BrentGreetDayText: + text "Hiya, , how" + line "are you doing?" + + para "Hey, it's me," + line "@" + text_ram wStringBuffer3 + text "." + done + +BrentGreetNiteText: + text "Hiya, , how" + line "are you doing?" + + para "Hey, it's me," + line "@" + text_ram wStringBuffer3 + text "." + done + +BrentGenericText: + text "Oh yeah, I saw you" + line "coming out of a" + + para "#MON CENTER the" + line "other day." + + para "You heal your" + line "#MON regularly," + + para "don't you?" + line "I'm impressed." + + para "Heh, my @" + text_ram wStringBuffer4 + text_start + line "is so tough, it" + + para "doesn't need to go" + line "to #MON CENTERS" + cont "often. Heheh!" + done diff --git a/data/phone/text/brent_caller.asm b/data/phone/text/brent_caller.asm new file mode 100644 index 0000000..e1ef65d --- /dev/null +++ b/data/phone/text/brent_caller.asm @@ -0,0 +1,163 @@ +BrentRareTradeText: + text "Oh yeah, I got an" + line "extremely rare" + + para "#MON in a trade" + line "a while back." + + para "Do you want to" + line "know what it is?" + + para "Hehe, I'm keeping" + line "it a secret!" + done + +BrentDefeatedMonText: + text "Oh yeah, I took" + line "down this wild" + + para "@" + text_ram wStringBuffer4 + text "." + line "It wasn't rare" + + para "enough to bother" + line "catching." + done + +BrentLostAMonText: + text "Oh yeah, I saw a" + line "rare #MON about" + cont "an hour ago." + + para "It was my first" + line "sighting. But I" + + para "didn't have any" + line "# BALLS…" + + para "Would BILL laugh" + line "at my mistakes?" + done + +BrentBattleRematchText: + text "You've got time" + line "like usual, right?" + + para "Feel like having a" + line "battle?" + + para "It'll be a chance" + line "to see my rare" + + para "#MON. It'll be" + line "worth your time!" + + para "You know where--" + line "@" + text_ram wStringBuffer5 + text "." + done + +BrentHangUpText: + text "So that's it then." + done + +BrentFatherGossipText: + text "Did you know…?" + line "BILL's father is" + + para "supposed to be a" + line "great #MANIAC." + done + +BrentGrandpaGossipText: + text "Did you know…?" + line "Apparently BILL's" + + para "grandpa isn't a" + line "#MANIAC." + done + +BrentGoldenrodGossipText: + text "Did you know…?" + line "BILL's originally" + cont "from GOLDENROD." + done + +BrentRoute25GossipText: + text "Did you know…?" + line "BILL evidently" + + para "lives on ROUTE 25" + line "in KANTO." + done + +BrentAbraGossipText: + text "Did you know…?" + line "ABRA was the first" + + para "#MON that BILL" + line "ostensibly caught." + done + +BrentSisterGossipText: + text "Did you know…?" + line "BILL's younger" + + para "sister apparently" + line "can't wink." + done + +BrentMilkGossipText: + text "Did you know…?" + line "BILL supposedly" + + para "hates milk and" + line "can't drink it." + done + +BrentBattlingGossipText: + text "Did you know…?" + line "Evidently, BILL" + + para "isn't very good at" + line "battling." + done + +BrentFlowerShopGossipText: + text "Did you know…?" + line "BILL appears to" + + para "like the lady at" + line "the FLOWER SHOP." + done + +BrentKimonoGirlGossipText: + text "Did you know…?" + line "BILL's mother is" + + para "said to have been" + line "a KIMONO GIRL." + done + +BrentSorryImTooBusyText: + text "You wanted to hear" + line "about BILL?" + + para "Sorry, but I'm too" + line "busy for you." + + para "I'll call when I" + line "have time." + done + +BrentReminderText: + text "You want to see my" + line "rare #MON." + + para "Hurry over to" + line "@" + text_ram wStringBuffer5 + text "." + done diff --git a/data/phone/text/brent_overworld.asm b/data/phone/text/brent_overworld.asm new file mode 100644 index 0000000..0ece720 --- /dev/null +++ b/data/phone/text/brent_overworld.asm @@ -0,0 +1,62 @@ +BrentAskNumber1Text: + text "By the way, you're" + line "a #MANIAC…" + + para "I can tell." + line "Yes, you are." + + para "But your knowledge" + line "is shallow still!" + + para "Do you know BILL?" + line "He's an incredible" + + para "#MANIAC." + line "I revere him." + + para "I'll teach you all" + line "I know about BILL," + + para "so leave me your" + line "phone number." + done + +BrentAskNumber2Text: + text "I'll teach you all" + line "I know about BILL," + + para "so leave me your" + line "phone number." + done + +BrentNumberAcceptedText: + text "BILL--he's more" + line "than amazing!" + + para "To be a #MANIAC" + line "like him someday…" + + para "That's my dream." + done + +BrentNumberDeclinedText: + text "You're going to" + line "regret it…" + + para "And I won't care…" + done + +BrentPhoneFullText: + text "Huh? Your phone" + line "list's full." + + para "A #MANIAC has" + line "to be more tidy!" + done + +BrentRematchText: + text "I've been waiting." + + para "Look, check out my" + line "#MON!" + done diff --git a/data/phone/text/buena.asm b/data/phone/text/buena.asm new file mode 100644 index 0000000..df31110 --- /dev/null +++ b/data/phone/text/buena.asm @@ -0,0 +1,524 @@ +BuenaPhoneMorningAnswerText: + text "Hi, this is BUENA…" + + para "Oh! Good morning," + line "!" + + para "I'm kind of foggy" + line "in the morning…" + done + +BuenaPhoneDayAnswerText: + text "Hi, this is BUENA…" + line "Oh! Hi, !" + + para "Do you tune into" + line "BUENA's show?" + done + +BuenaPhoneMidnightAnswerText: + text "This is BUENA." + line "I can't come to" + + para "the phone right" + line "now." + + para "If you want to" + line "chat, tune into" + + para "BUENA's PASSWORD" + line "on the radio and" + + para "give me a call" + line "after midnight!" + done + +BuenaPhoneNiteAnswerText: + text "Hi, this is BUENA…" + line "Oh! Hi, !" + + para "I just got off" + line "work. " + + para "Let me tell you," + line "I'm exhausted!" + done + +BuenaPhoneMorningText: + text "!" + line "Hi, it's BUENA!" + + para "I got up early, so" + line "I decided to call!" + done + +BuenaPhoneDayText: + text "!" + line "Hi, it's BUENA!" + + para "I needed someone" + line "to chat with!" + done + +BuenaPhoneMidnightText: + text "!" + line "Hi, it's BUENA!" + + para "I'm just on my" + line "break." + done + +BuenaPhoneNiteText: + text "!" + line "Hi, it's BUENA!" + + para "I couldn't sleep," + line "so I called you." + done + +BuenaPhoneRocketText: + text "Oh. Hi, !" + + para "You are how?" + + para "Aiyee! This isn't" + line "the time for me to" + + para "be cracking silly" + line "gag greetings!" + + para "The RADIO TOWER is" + line "in deep trouble!" + + para ", you'd" + line "better be careful!" + done + +BuenaPhoneWentOutWithBenText: + text "The other day, I" + line "went out to eat" + + para "with DJ BEN!" + line "Isn't it great?" + + para "Not only that, he" + line "said the music on" + + para "my program is" + line "cool!" + + para "Oh, wow! Like," + line "what should I do?" + + para "…Oops, I have to" + line "get ready for my" + + para "show! I'll catch" + line "you later!" + done + +BuenaPhoneReceptionistText: + text "You know the" + line "receptionist at" + cont "the RADIO TOWER?" + + para "'Welcome,' is all" + line "she ever says." + + para "But she's really" + line "the chattiest" + + para "person at the" + line "RADIO TOWER." + + para "So she must be" + line "holding back." + + para "Isn't that fun to" + line "know?" + + para "Catch you later!" + done + +BuenaPhoneLuckyNumberShowText: + text "Tell me, ." + line "Have you ever won" + + para "a prize on the" + line "LUCKY NUMBER SHOW?" + + para "REED moans that" + line "he's never won, so" + + para "he vows to keep" + line "the show on the" + cont "air till he does." + + para "Let's chat again!" + done + +BuenaPhoneStressedFromWorkText: + text "You know, last" + line "night…" + + para "I was so stressed" + line "out from work, I" + + para "ate a ton of junk" + line "food!" + + para "MARY and I have" + line "this deal about" + cont "losing weight…" + + para "This won't do…" + + para "Huh? What's the" + line "weight?" + + para "This has to be a" + line "total secret!" + + para "MARY weighs…" + + para "Aiyee! M-MARY!" + + para "Uh… Um… I… Sorry," + line "wrong number!" + done + +BuenaPhoneProfessorOakText: + text "Yesterday, PROF." + line "OAK was in the" + + para "studio to tape his" + line "show." + + para "So I went over and" + line "introduced myself." + + para "Get this--he tunes" + line "in to my program!" + + para "Oh! Here comes" + line "PROF.OAK again!" + + para "I'm going to chat" + line "him up again!" + + para "Catch you later!" + done + +BuenaPhoneGotAColdText: + text "…Cough, cough!" + + para "Uhm sorry uh got" + line "uh code dite now." + + para "Buh uma pro so uh" + line "hav to cover id ub" + + para "so no un notice" + line "while uhm on air." + + para "Uh fidz muh voice" + line "now." + + para "I'll catch you on" + line "the fly. This has" + cont "been BUENA!" + done + +BuenaPhoneRadioCardQuestionsText: + text "Hey, ." + line "You won that RADIO" + + para "CARD by beating" + line "the quiz at the" + + para "reception desk," + line "didn't you?" + + para "Guess what? I made" + line "up the questions!" + + para "…Were they too" + line "easy for you?" + + para "Well, let's chat" + line "again!" + done + +BuenaPhonePikachuFanClubText: + text "I'm elated that" + line "more people are" + + para "taking part in my" + line "PASSWORD show." + + para "But when PIKACHU" + line "was the password," + + para "it was uh… whew…" + line "overwhelming." + + para "FAN CLUB people" + line "came in out in" + + para "droves, shouting" + line "'PIKACHU!' over" + + para "and over. I mean," + line "they were loud." + + para "Anyone tuning in" + line "around then must" + + para "have been shocked" + line "by the racket!" + + para "Anyway, back to" + line "work for me!" + + para "Let's chat again!" + done + +BuenaPhoneRadioTowerDirectorText: + text "Guess what?" + line "The RADIO TOWER's" + + para "DIRECTOR is a big" + line "fan of TV!" + + para "A while ago, a" + line "fashion show on TV" + + para "said that black" + line "suits were in." + + para "Now all he wears" + line "are black suits." + + para "But it's a secret" + line "that our DIRECTOR" + + para "is a TV fan, so if" + line "you see him, don't" + + para "you dare mention" + line "it!" + + para "Oh! The DIRECTOR" + line "will be here soon!" + + para "Later! Tune into" + line "my show!" + done + +BuenaPhoneWhenDoYouRelaxText: + text ", tell me." + + para "When do you relax" + line "the most?" + + para "For me, it has to" + line "be in the studio" + + para "right after my" + line "show, enjoying a" + + para "nice cup of tea." + line "It's so pleasant" + + para "that it gradually" + line "makes me drowsy…" + + para "<……> <……> <……>" + + para "<……> <……> <……>Zzz" + + para "Oops, I drifted" + line "off just thinking" + + para "about it! How, uh…" + line "embarrassing!" + + para "Please forget this" + line "happened! Later!" + done + +BuenaPhoneStarterPokemonText: + text ", what was" + line "the first #MON" + cont "you ever caught?" + + para "…Oh, really?" + + para "I've seen lots of" + line "#MON around," + + para "but I've never" + line "caught one." + + para "I should give it a" + line "try sometime." + + para "Did you know that" + line "the first #MON" + + para "MARY caught was a" + line "DROWZEE?" + + para "Isn't that so out" + line "of character?" + + para "But MARY's DROWZEE" + line "kept making her" + + para "fall asleep on the" + line "job, so she traded" + + para "with a fan for a" + line "MEOWTH." + + para "Let's chat about" + line "#MON again!" + + para "Bye-bye!" + done + +BuenaPhoneCompanyVacationText: + text "Guess what? All of" + line "us from the RADIO" + + para "TOWER are going on" + line "a company vacation" + + para "to the RADIO TOWER" + line "in LAVENDER." + + para "We're wasting our" + line "vacation on a trip" + + para "to another RADIO" + line "TOWER?" + + para "I'd much rather go" + line "to the beach!" + + para ", I hope" + line "you have enough" + + para "fun for both of us" + line "on your journey!" + + para "Bye-bye!" + done + +BuenaPhoneBenAndFernText: + text "Did you know…?" + + para "BEN and FERN talk" + line "on the phone for" + + para "hours about what" + line "#MON music they" + + para "should play on" + line "different days of" + cont "the week." + + para "One time, FERN's" + line "rapping style kind" + + para "of rubbed off on" + line "BEN weirdly." + + para "So we ended up" + line "enduring BEN's" + + para "silly, chilly, a" + line "willy-nilly jive-" + cont "talking shtick for" + cont "a while." + + para "Let's chat again!" + done + +BuenaPhoneGoingShoppingText: + text "I'm going shopping" + line "with MARY and LILY" + cont "soon." + + para "It'll be great if" + line "GOLDENROD DEPT." + + para "STORE has a sale" + line "on when we go…" + + para ", maybe we" + line "can hook up too!" + + para "Catch you later!" + done + +BuenaPhoneFavoriteSlotMachineAnswerText: + text "I'm thinking of" + line "going to the GAME" + + para "CORNER tomorrow." + line "It's been a while." + + para "You see, I have my" + line "favorite machine…" + + para "It pays out a lot," + line "I kid you not!" + + para "Huh? Nuh-uh, it's" + line "my secret!" + + para "You have to find" + line "it yourself!" + + para "Catch you later!" + done + +BuenaPhonePokegearAnswerText: + text "Hey, . You" + line "use your #GEAR" + + para "to listen to the" + line "radio, right?" + + para "I heard that you" + line "can even display" + + para "town maps with" + line "#GEAR." + + para "I have a bad sense" + line "of direction, so" + + para "#GEAR would be" + line "handy…" + + para "Anyway, thanks for" + line "calling! Later!" + done + +BuenaPhoneCoopedUpInRadioTowerAnswerText: + text "Is it sunny" + line "outside today?" + + para "When you're cooped" + line "up in the RADIO" + + para "TOWER as much as I" + line "am, you lose touch" + + para "with the outside." + line "It can be boring." + + para "Please call again!" + done diff --git a/data/phone/text/chad_callee.asm b/data/phone/text/chad_callee.asm new file mode 100644 index 0000000..52c711d --- /dev/null +++ b/data/phone/text/chad_callee.asm @@ -0,0 +1,78 @@ +ChadAnswerPhoneText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Hi, !" + line "Good morning!" + done + +ChadAnswerPhoneDayText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Hi, , good" + line "day!" + done + +ChadAnswerPhoneNiteText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Hi, , good" + line "evening!" + done + +ChadGreetText: + text "Hi, , good" + line "morning!" + + para "It's @" + text_ram wStringBuffer3 + text "." + line "How are you?" + done + +ChadGreetDayText: + text "Hi, , good" + line "day!" + + para "It's @" + text_ram wStringBuffer3 + text "." + line "How are you?" + done + +ChadGreetNiteText: + text "Hi, , good" + line "evening!" + + para "It's @" + text_ram wStringBuffer3 + text "." + line "How are you?" + done + +ChadGenericText: + text "How are your" + line "#MON doing?" + + para "You know PROF.OAK," + line "so of course your" + cont "#MON are fine!" + + para "My #MON are" + line "doing well too." + + para "But then, I am" + line "trying to become a" + + para "#MON professor," + line "so that shouldn't" + cont "be a big surprise." + done diff --git a/data/phone/text/chad_caller.asm b/data/phone/text/chad_caller.asm new file mode 100644 index 0000000..d4442d1 --- /dev/null +++ b/data/phone/text/chad_caller.asm @@ -0,0 +1,245 @@ +ChadObservingWildText: + text "I recently began" + line "observing wild" + cont "@" + text_ram wStringBuffer4 + text "." + + para "I've been learning" + line "all sorts of new" + + para "things through my" + line "observations." + + para "I wish I could" + line "become a #MON" + + para "researcher like" + line "PROF.OAK soon." + done + +ChadDefeatedMonText: + text "Oh yes, I managed" + line "to knock out a" + + para "wild @" + text_ram wStringBuffer4 + text " a" + line "while back." + + para "Well, considering" + line "all the studying I" + + para "do every day, it" + line "was inevitable." + done + +ChadLostAMonText: + text "Oh yes, I came" + line "close to catching" + + para "a wild @" + text_ram wStringBuffer4 + text "," + line "but it got away." + + para "For the longest" + line "time, I've been" + + para "wanting to observe" + line "@" + text_ram wStringBuffer4 + text ". Rats…" + done + +ChadBattleRematchText: + text "Want to battle?" + line "I have to battle" + + para "every so often to" + line "avoid rusting out." + + para "I'll be on" + line "@" + text_ram wStringBuffer5 + text "!" + done + +ChadHangUpText: + text "See you later!" + done + +ChadBlueGossipText: + text "Do you know BLUE?" + + para "He's PROF.OAK's" + line "grandson and a" + + para "former #MON" + line "LEAGUE CHAMPION!" + + para "He's one super" + line "#MON trainer!" + done + +ChadDaisyGossipText: + text "PROF.OAK has a" + line "granddaughter" + cont "named DAISY." + + para "When she's around," + line "even the most" + + para "ferocious #MON" + line "calm right down." + done + +ChadProfElmGossipText: + text "Everyone's talking" + line "about PROF.ELM." + + para "He used to be an" + line "assistant to the" + cont "great PROF.OAK!" + + para "That is so cool!" + line "I envy him!" + done + +ChadProfOaksDreamGossipText: + text "PROF.OAK's dream" + line "is to compile a" + + para "comprehensive" + line "#DEX." + + para "I envy you for" + line "taking part in" + cont "that project…" + done + +ChadKurtGossipText: + text "Do you know KURT," + line "the BALL creator?" + + para "He and PROF.OAK go" + line "back a long way." + + para "I guess great" + line "people attract one" + cont "another!" + done + +ChadLeagueGossipText: + text "#MON LEAGUE is" + line "the great gather-" + cont "ing place for all" + + para "trainers who wish" + line "to become CHAMP." + + para "PROF.OAK acts as" + line "an advisor to the" + + para "#MON LEAGUE's" + line "headquarters." + + para "He really is a" + line "great man." + done + +ChadPokemonTalkGossipText: + text "PROF.OAK'S #MON" + line "TALK is a popular" + cont "radio show, right?" + + para "Did you know that" + line "he was going to" + + para "turn down the show" + line "at first?" + + para "But MARY's energy" + line "and persistence" + cont "wore him down." + + para "So we have MARY to" + line "thank for it!" + done + +ChadProfOakTrainerGossipText: + text "PROF.OAK used to" + line "be a trainer a" + cont "long time ago." + + para "But rather than" + line "battling, he found" + + para "#MON themselves" + line "to be interesting." + + para "So he abandoned" + line "his training to" + + para "focus on becoming" + line "a researcher." + done + +ChadDaisyTeaGossipText: + text "PROF.OAK has a" + line "granddaughter" + cont "named DAISY." + + para "She has tea every" + line "day for an hour" + + para "from three in the" + line "afternoon." + + para "I wish I could" + line "join her for tea" + + para "and chat about" + line "PROF.OAK." + done + +ChadProfOakTravelingGossipText: + text "Did you know?" + line "PROF.OAK traveled" + + para "all over the world" + line "when he was young." + + para "While traveling," + line "he must've learned" + + para "about #MON" + line "naturally." + + para "I envy him…" + line "I'd like to travel" + + para "and learn about" + line "things too…" + done + +ChadGoingToStudyHardText: + text "I'm going to study" + line "hard so PROF.OAK" + + para "will make me his" + line "assistant!" + done + +ChadReminderText: + text "Do you remember" + line "about our battle?" + + para "The place is" + line "@" + text_ram wStringBuffer5 + text "." + + para "Hurry over--I'm" + line "waiting." + done diff --git a/data/phone/text/chad_overworld.asm b/data/phone/text/chad_overworld.asm new file mode 100644 index 0000000..883baa2 --- /dev/null +++ b/data/phone/text/chad_overworld.asm @@ -0,0 +1,56 @@ +ChadAskNumber1Text: + text "Huh? Is that thing" + line "a #DEX? Have" + cont "you met PROF.OAK?" + + para "Huh? You have? " + line "That's way cool!" + + para "I have a dream of" + line "becoming a #MON" + + para "researcher like" + line "PROF.OAK." + + para "May I please have" + line "your phone number?" + + para "We should chat" + line "about PROF.OAK." + + para "I'm sure it will" + line "be loads of fun!" + done + +ChadAskNumber2Text: + text "May I please have" + line "your phone number?" + + para "We should chat" + line "about PROF.OAK." + + para "I'm sure it will" + line "be loads of fun!" + done + +ChadNumberAcceptedText: + text "You must listen to" + line "PROF.OAK'S #MON" + cont "TALK, right?" + done + +ChadNumberDeclinedText: + text "Oh… I wish I had a" + line "chance to meet" + cont "PROF.OAK…" + done + +ChadPhoneFullText: + text "Your phone list is" + line "completely full!" + done + +ChadRematchText: + text "I've been waiting!" + line "Let's battle now!" + done diff --git a/data/phone/text/dana_callee.asm b/data/phone/text/dana_callee.asm new file mode 100644 index 0000000..350196f --- /dev/null +++ b/data/phone/text/dana_callee.asm @@ -0,0 +1,68 @@ +DanaAnswerPhoneText: + text "Hi, @" + text_ram wStringBuffer3 + text " on the" + line "line." + + para "Hey! It's !" + done + +DanaAnswerPhoneDayText: + text "Hi, @" + text_ram wStringBuffer3 + text " on the" + line "line." + + para "I know!" + line "It's !" + done + +DanaAnswerPhoneNiteText: + text "Hi, @" + text_ram wStringBuffer3 + text " on the" + line "line." + + para "?" + line "What's up?" + done + +DanaGreetText: + text "Uh, ?" + + para "It's me!" + line "It's me, @" + text_ram wStringBuffer3 + text "!" + done + +DanaGreetDayText: + text "Uh, ?" + + para "It's me!" + line "It's me, @" + text_ram wStringBuffer3 + text "!" + done + +DanaGreetNiteText: + text "Uh, ?" + + para "It's me!" + line "It's me, @" + text_ram wStringBuffer3 + text "!" + done + +DanaGenericText: + text "My @" + text_ram wStringBuffer4 + text " is" + line "so full of energy," + + para "it's a little" + line "scary." + + para "How are your" + line "#MON doing?" + done diff --git a/data/phone/text/dana_caller.asm b/data/phone/text/dana_caller.asm new file mode 100644 index 0000000..b4bb55b --- /dev/null +++ b/data/phone/text/dana_caller.asm @@ -0,0 +1,110 @@ +DanaTakingPhotosText: + text "My @" + text_ram wStringBuffer4 + text " is" + line "getting prettier!" + + para "I've been taking" + line "photos galore!" + done + +DanaDefeatedMonText: + text "It took only an" + line "instant to KO a" + cont "wild @" + text_ram wStringBuffer4 + text "." + + para "It must be because" + line "you gave me some" + + para "battling tips last" + line "time." + done + +DanaLostAMonText: + text "You know what?" + line "A wild @" + text_ram wStringBuffer4 + text_start + para "got away from me" + line "again." + + para "It was so close!" + line "Really, just a" + + para "little bit more," + line "and I would've…" + done + +DanaBattleRematchText: + text "Right now, I'm on" + line "@" + text_ram wStringBuffer5 + text "." + + para "If you're close" + line "by, let's battle!" + + para "I'll be waiting" + line "for you!" + done + +DanaHangUpText: + text "See you!" + done + +DanaFoundItemText: + text "You know what?" + line "I got a good gift!" + + para "As I promised," + line "it's yours!" + + para "I'm sure you'd" + line "like it. Come get" + + para "it! I'm waiting on" + line "@" + text_ram wStringBuffer5 + text "!" + done + +DanaCanYouWaitABitLongerText: + text "Oh! You wanted a" + line "gift, right?" + + para "I got one, but I" + line "want to keep this." + + para "Can you wait a bit" + line "longer?" + done + +DanaReminderText: + text "Hi! You haven't" + line "forgotten about" + + para "your promise to" + line "battle me?" + + para "I'm waiting on" + line "@" + text_ram wStringBuffer5 + text "!" + done + +DanaComePickUpText: + text "Hello?" + + para "If you don't come" + line "get your present" + + para "soon, I'll give it" + line "to someone else." + + para "I'm waiting on" + line "@" + text_ram wStringBuffer5 + text "!" + done diff --git a/data/phone/text/dana_overworld.asm b/data/phone/text/dana_overworld.asm new file mode 100644 index 0000000..099909e --- /dev/null +++ b/data/phone/text/dana_overworld.asm @@ -0,0 +1,72 @@ +DanaAskNumber1Text: + text "You're really good" + line "at #MON!" + + para "Boys give me items" + line "after battles, but" + + para "sometimes they" + line "give me too much." + + para "Next time, I can" + line "share some if you" + + para "want. Let me get" + line "your phone number." + done + +DanaAskNumber2Text: + text "I'll share my" + line "gifts with you." + + para "Let me get your" + line "phone number." + done + +DanaNumberAcceptedText: + text "Next time a boy" + line "gives me something" + + para "after a battle," + line "I'll share some!" + + para "Does that make me" + line "bad?" + done + +DanaNumberDeclinedText: + text "Aww, you don't" + line "want anything?" + + para "But it's all for" + line "free…" + done + +DanaPhoneFullText: + text "But your phone's" + line "out of memory!" + done + +DanaRematchText: + text "You're really" + line "late!" + + para "I'm eager to get" + line "going!" + done + +DanaGiftText: + text "Hi! Are you here" + line "for your gift?" + + para "This should really" + line "make your day!" + done + +DanaPackFullText: + text "Where are you" + line "going to put this?" + + para "I'll keep it, so" + line "come get it later!" + done diff --git a/data/phone/text/derek_callee.asm b/data/phone/text/derek_callee.asm new file mode 100644 index 0000000..e2024cb --- /dev/null +++ b/data/phone/text/derek_callee.asm @@ -0,0 +1,64 @@ +DerekAnswerPhoneText: + text "Hi, ?" + + para "Good morning pika." + line "What's up pika?" + done + +DerekAnswerPhoneDayText: + text "Hi, ?" + + para "Good day pika," + line "what's up pika?" + done + +DerekAnswerPhoneNiteText: + text "Hi, ?" + + para "Good evening pika," + line "what's up pika?" + done + +DerekGreetText: + text " pika, good" + line "morning!" + + para "It's @" + text_ram wStringBuffer3 + text ", how" + line "pika are you?" + done + +DerekGreetDayText: + text " pika, good" + line "pika day!" + + para "It's @" + text_ram wStringBuffer3 + text ", how" + line "pika are you?" + done + +DerekGreetNiteText: + text " pika, good" + line "evening!" + + para "It's @" + text_ram wStringBuffer3 + text ". Were" + line "you pika awake?" + done + +DerekGenericText: + text "You have to hear" + line "this! My lovable" + + para "@" + text_ram wStringBuffer4 + text " looked" + line "at me and grinned!" + + para "It must be because" + line "our hearts beat" + cont "together as one!" + done diff --git a/data/phone/text/derek_caller.asm b/data/phone/text/derek_caller.asm new file mode 100644 index 0000000..a6ed1ab --- /dev/null +++ b/data/phone/text/derek_caller.asm @@ -0,0 +1,105 @@ +DerekCheekPinchingText: + text "Listen to this." + line "My @" + text_ram wStringBuffer4 + text_start + para "grins happily when" + line "I pinch its cheek." + + para "But it never grins" + line "for anyone else." + + para "I must be special." + done + +DerekDefeatedMonText: + text "Oh, and recently," + line "my PIKACHU beat a" + cont "wild @" + text_ram wStringBuffer4 + text "!" + + para "A wild @" + text_ram wStringBuffer4 + text "," + line "I tell you!" + + para "Don't you think" + line "that's astounding?" + + para "My PIKACHU is" + line "awesome!" + + para "My PIKACHU is the" + line "greatest!" + done + +DerekLostAMonText: + text "Oh, and I saw a" + line "wild @" + text_ram wStringBuffer4 + text " a" + cont "little while ago." + + para "But it wasn't very" + line "cute, so I left" + + para "it…" + line "#MON have to be" + + para "cute. They're no" + line "good otherwise." + done + +DerekHangUpText: + text "Well, let's talk" + line "again!" + done + +DerekBugCatchingContestText: + text "Did you remember?" + line "The Bug-Catching" + cont "Contest is today." + + para "You're going to" + line "go, aren't you?" + + para "I think I'll" + line "participate with" + + para "PIKACHU to show" + line "off its cuteness." + done + +DerekFoundItemText: + text "I'd like you to" + line "have a NUGGET." + + para "My PIKACHU just" + line "loves it." + + para "I'm certain your" + line "PIKACHU will love" + cont "it too!" + done + +DerekLetsGetTogetherText: + text "How is your" + line "PIKACHU doing?" + + para "Let's get together" + line "and brag about our" + cont "PIKACHU!" + done + +DerekComePickUpText: + text "What's wrong?" + + para "I'm waiting on" + line "@" + text_ram wStringBuffer5 + text "." + + para "Come pick this up" + line "anytime." + done diff --git a/data/phone/text/derek_overworld.asm b/data/phone/text/derek_overworld.asm new file mode 100644 index 0000000..12472ec --- /dev/null +++ b/data/phone/text/derek_overworld.asm @@ -0,0 +1,61 @@ +DerekAskNumber1Text: + text "Oh, wow! PIKACHU!" + line "It's so soft and" + cont "furry! How cute!" + + para "Let's be friends!" + line "PIKACHU-lovers are" + cont "never bad people!" + + para "Let's chat about" + line "PIKACHU!" + + para "Can I get your" + line "phone number?" + done + +DerekAskNumber2Text: + text "Let's chat about" + line "PIKACHU!" + + para "Can I get your" + line "phone number?" + done + +DerekNumberAcceptedText: + text "PIKACHU is the" + line "one! If anything" + + para "comes up, I'll" + line "give you a jingle." + done + +DerekNumberDeclinedText: + text "You…" + + para "I bet you don't" + line "even like PIKACHU…" + done + +DerekPhoneFullText: + text "Wait a sec! Your" + line "phone list's full!" + done + +DerekGiftText: + text "I've been looking" + line "for you! Here, see" + cont "this? This is it!" + + para "I'm certain your" + line "PIKACHU will love" + cont "my gift too!" + done + +DerekPackFullText: + text "Uh-oh, too bad." + line "You don't have any" + + para "room. Be sure to" + line "get it later." + done diff --git a/data/phone/text/elm.asm b/data/phone/text/elm.asm new file mode 100644 index 0000000..611f41e --- /dev/null +++ b/data/phone/text/elm.asm @@ -0,0 +1,211 @@ +ElmPhoneHealYourMonText: + text "Hello, ?" + + para "Try not to overdo" + line "it." + + para "Be sure to heal" + line "your #MON if" + cont "they are hurt." + done + +ElmPhoneSawMrPokemonText: + text "Hello, ?" + + para "Did you meet MR." + line "#MON? Great!" + cont "Come back safely!" + done + +ElmPhonePokemonStolenText: + text "? I'm very" + line "upset now." + + para "We had a #MON" + line "stolen from here." + + para "How could anyone" + line "do that?" + done + +ElmPhoneCheckingTheEggText: + text "Hello, ?" + + para "We're checking the" + line "EGG now. It does" + + para "appear to be a" + line "#MON EGG." + done + +ElmPhoneAssistantText: + text "Hello, ?" + + para "Did you see my" + line "assistant? He's at" + + para "the #MON CENTER" + line "in VIOLET CITY." + done + +ElmPhoneHowIsTheEggText: + text "Hello, ?" + + para "How's the EGG? Has" + line "anything changed?" + + para "If anything hap-" + line "pens, please call." + done + +ElmPhoneEggHatchedText: + text "Hello, ?" + line "How is the EGG?" + + para "What? It hatched?" + line "Wow! What kind of" + cont "#MON is it?" + + para "Please come show" + line "me now!" + done + +ElmPhoneDiscoveredHatchTimeText: + text "Hello, ?" + + para "I just made a new" + line "discovery." + + para "The time it takes" + line "for an EGG to" + + para "hatch depends on" + line "the #MON." + done + +ElmPhoneInvestigatingEggMovesText: + text "Hello, ?" + + para "It's still a" + line "mystery what kinds" + + para "of moves hatched" + line "#MON have." + + para "We're investigat-" + line "ing that now." + done + +ElmPhoneDiscoveredPokerusText: + text "Hello, ?" + + para "I discovered an" + line "odd thing." + + para "Apparently there's" + line "something called" + + para "#RUS that in-" + line "fects #MON." + + para "Yes, it's like a" + line "virus, so it's" + cont "called #RUS." + + para "It multiplies fast" + line "and infects other" + + para "#MON too. But" + line "that's all." + + para "It doesn't seem to" + line "do anything, and" + + para "it goes away over" + line "time." + + para "I guess it's" + line "nothing to worry" + cont "about. Bye!" + done + +ElmPhoneDisasterText: + text "H-hello? ?" + line "It's a disaster!" + + para "Uh, um, it's just" + line "terrible!" + + para "What should I do?" + line "It… Oh, no…" + + para "Please get back" + line "here now!" + done + +ElmPhoneEggAssistantText: + text "Hello, ? We" + line "discovered some-" + + para "thing about the" + line "EGG!" + + para "My assistant is at" + line "the #MON CENTER" + + para "in VIOLET CITY. " + line "Could you talk to" + cont "him?" + done + +ElmPhoneRadioTowerRocketTakeoverText: + text ", how are" + line "things going?" + + para "I called because" + line "something weird is" + + para "happening with the" + line "radio broadcasts." + + para "They were talking" + line "about TEAM ROCKET." + + para ", do you" + line "know anything" + cont "about it?" + + para "Maybe TEAM ROCKET" + line "has returned. No," + + para "that just can't" + line "be true." + + para "Sorry to bug you." + line "Take care!" + done + +ElmPhoneGiftText: + text "Hello, ?" + + para "I have something" + line "here for you." + + para "Could you swing by" + line "my LAB?" + + para "See you later!" + done + +ElmPhoneGotAholdOfSomethingNeatText: + text "Hello, ?" + line "How's it going?" + + para "I got ahold of" + line "something neat." + + para "Swing by my LAB" + line "and pick it up!" + + para "See you later!" + done diff --git a/data/phone/text/erin_callee.asm b/data/phone/text/erin_callee.asm new file mode 100644 index 0000000..c2685ce --- /dev/null +++ b/data/phone/text/erin_callee.asm @@ -0,0 +1,68 @@ +ErinAnswerPhoneText: + text "Yes, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh. Hi, !" + line "Good morning!" + done + +ErinAnswerPhoneDayText: + text "Yes, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh, hi, !" + line "Yahoo!" + done + +ErinAnswerPhoneNiteText: + text "Yes, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh, hi, !" + done + +ErinGreetText: + text "!" + + para "It's @" + text_ram wStringBuffer3 + text "!" + line "Good morning!" + done + +ErinGreetDayText: + text "!" + + para "It's @" + text_ram wStringBuffer3 + text "!" + line "Working hard?" + done + +ErinGreetNiteText: + text "!" + + para "It's @" + text_ram wStringBuffer3 + text "!" + line "Were you up?" + done + +ErinGenericText: + text "Are you raising" + line "your #MON?" + + para "Hey, @" + text_ram wStringBuffer3 + text "'s" + line "@" + text_ram wStringBuffer4 + text " is" + cont "looking good!" + done diff --git a/data/phone/text/erin_caller.asm b/data/phone/text/erin_caller.asm new file mode 100644 index 0000000..ee54d31 --- /dev/null +++ b/data/phone/text/erin_caller.asm @@ -0,0 +1,67 @@ +ErinMonIsMuchStrongerText: + text_ram wStringBuffer3 + text "'s @" + text_ram wStringBuffer4 + text_start + line "is much stronger" + cont "than before!" + done + +ErinDefeatedMonText: + text "And, and…" + line "I just battled and" + cont "beat @" + text_ram wStringBuffer4 + text "!" + + para "I've raised my" + line "#MON properly!" + done + +ErinLostAMonText: + text "But, but…" + + para "A wild @" + text_ram wStringBuffer4 + text_start + line "got away from me" + + para "again. It's just" + line "not fair!" + done + +ErinBattleRematchText: + text "I'm ERIN. Want to" + line "battle me again?" + + para "I won't lose this" + line "time!" + + para "I'll be waiting on" + line "@" + text_ram wStringBuffer5 + text "!" + done + +ErinHangUpText: + text "See you. Bye-bye!" + done + +ErinWorkingHardText: + text "I'm working hard" + line "to raise my" + cont "#MON!" + + para "Come back for" + line "another battle!" + done + +ErinComeBattleText: + text "Oh, !" + line "Come battle ERIN!" + + para "I'll be waiting on" + line "@" + text_ram wStringBuffer5 + text "!" + done diff --git a/data/phone/text/erin_overworld.asm b/data/phone/text/erin_overworld.asm new file mode 100644 index 0000000..3cfbe74 --- /dev/null +++ b/data/phone/text/erin_overworld.asm @@ -0,0 +1,63 @@ +ErinAskNumber1Text: + text "It really made me" + line "angry to lose." + + para "I'll have to train" + line "much harder…" + + para "Here's my number." + line "I'm ERIN--don't" + + para "forget! Want to" + line "battle me again?" + done + +ErinAskNumber2Text: + text "I want to battle" + line "with you again." + + para "Do you want to" + line "exchange numbers?" + done + +ErinNumberAcceptedText: + text "I'll remember to" + line "call when I want" + cont "to battle again!" + done + +ErinNumberDeclinedText: + text "Oh… I'm sad…" + line "If you do want to" + + para "battle, come see" + line "ERIN--that's me!" + done + +ErinPhoneFullText: + text "Oh no. Your phone" + line "is all filled up." + done + +ErinRematchText: + text "Yay! I waited!" + line "Let's start now!" + done + +ErinPackFullText: + text "That's too bad!" + line "You have no room…" + + para "I'll give it to" + line "you another time." + done + +ErinRematchGiftText: + text "Aww… I lost again!" + + para "I wonder how many" + line "times that is…" + + para "Thanks for coming!" + line "Here's a present!" + done diff --git a/data/phone/text/gaven_callee.asm b/data/phone/text/gaven_callee.asm new file mode 100644 index 0000000..4e85840 --- /dev/null +++ b/data/phone/text/gaven_callee.asm @@ -0,0 +1,72 @@ +GavenAnswerPhoneText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text " speaking…" + + para "Hi, !" + line "Good morning!" + done + +GavenAnswerPhoneDayText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text " speaking…" + + para "Hi, !" + done + +GavenAnswerPhoneNiteText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text " speaking…" + + para "Hi, !" + line "Good evening!" + done + +GavenGreetText: + text ", good" + line "morning!" + + para "It's me, @" + text_ram wStringBuffer3 + text "." + line "How are you doing?" + done + +GavenGreetDayText: + text "Hi, !" + + para "It's me, @" + text_ram wStringBuffer3 + text "." + line "How are you doing?" + done + +GavenGreetNiteText: + text ", good" + line "evening!" + + para "It's me, @" + text_ram wStringBuffer3 + text "." + line "How are you doing?" + done + +GavenGenericText: + text "How are your" + line "#MON doing?" + + para "My @" + text_ram wStringBuffer4 + text "'s" + line "doing as great as" + cont "ever." + + para "Let's keep at it" + line "and become #MON" + cont "CHAMPS!" + done diff --git a/data/phone/text/gaven_caller.asm b/data/phone/text/gaven_caller.asm new file mode 100644 index 0000000..f552d41 --- /dev/null +++ b/data/phone/text/gaven_caller.asm @@ -0,0 +1,85 @@ +GavenMonGreaterThanImaginedText: + text "My @" + text_ram wStringBuffer4 + text_start + line "might be greater" + cont "than I imagined." + + para "I doubt I'll see a" + line "@" + text_ram wStringBuffer4 + text " that's" + cont "better than mine." + done + +GavenDefeatedMonText: + text "Oh, and I managed" + line "to barely defeat" + + para "@" + text_ram wStringBuffer4 + text " the" + line "other day." + + para "I've never seen a" + line "@" + text_ram wStringBuffer4 + text " get" + cont "that strong…" + + para "You shouldn't let" + line "your guard down," + + para "even against a" + line "#MON you're" + cont "used to seeing." + done + +GavenLostAMonText: + text "And a while back," + line "I tried to catch a" + cont "wild @" + text_ram wStringBuffer4 + text "." + + para "But it managed to" + line "elude me." + + para "One wrong decision" + line "could mean total" + + para "failure… You ought" + line "to be careful too." + done + +GavenBattleRematchText: + text "Let's battle!" + + para "I'll be waiting on" + line "@" + text_ram wStringBuffer5 + text "." + + para "Give me a shout" + line "when you're close." + done + +GavenHangUpText: + text "OK, I'll talk to" + line "you soon!" + done + +GavenHangUpNotThursdayText: + text "I obsess over how" + line "to beat you." + done + +GavenReminderText: + text ", why" + line "aren't you here?" + + para "I'll take you down" + line "with @" + text_ram wStringBuffer5 + text "!" + done diff --git a/data/phone/text/gaven_overworld.asm b/data/phone/text/gaven_overworld.asm new file mode 100644 index 0000000..aba0625 --- /dev/null +++ b/data/phone/text/gaven_overworld.asm @@ -0,0 +1,63 @@ +GavenAskNumber1Text: + text "Wow, you're tough." + line "I haven't battled" + + para "that seriously in" + line "a long time." + + para "Could I get your" + line "phone number?" + + para "I'd like to battle" + line "again when I heal" + + para "@" + text_ram wStringBuffer4 + text " and the" + line "rest of my team." + done + +GavenAskNumber2Text: + text "Could I get your" + line "phone number?" + + para "I'd like to battle" + line "again when I heal" + + para "@" + text_ram wStringBuffer4 + text " and the" + line "rest of my team." + done + +GavenNumberAcceptedText: + text "How should I beat" + line "you? I'm tormented" + + para "by those thoughts" + line "all the time…" + done + +GavenNumberDeclinedText: + text "OK… I understand…" + line "But if you change" + + para "your mind, give me" + line "a shout anytime." + done + +GavenPhoneFullText: + text "Your phone's" + line "memory is full." + + para "You can't register" + line "my number." + done + +GavenRematchText: + text "Hi! I've been" + line "waiting for you!" + + para "This time, I'm" + line "going to win!" + done diff --git a/data/phone/text/gina_callee.asm b/data/phone/text/gina_callee.asm new file mode 100644 index 0000000..81325f6 --- /dev/null +++ b/data/phone/text/gina_callee.asm @@ -0,0 +1,66 @@ +GinaAnswerPhoneText: + text "Hello? This is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh, !" + line "Good morning!" + done + +GinaAnswerPhoneDayText: + text "Hello? This is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh, !" + line "Hi, how are you?" + done + +GinaAnswerPhoneNiteText: + text "Hello? This is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh, !" + line "Good evening!" + done + +GinaGreetText: + text "?" + + para "It's @" + text_ram wStringBuffer3 + text "." + line "Good morning!" + done + +GinaGreetDayText: + text "?" + + para "It's @" + text_ram wStringBuffer3 + text ". Is" + line "this a bad time?" + done + +GinaGreetNiteText: + text "?" + + para "It's @" + text_ram wStringBuffer3 + text "." + line "Got time to chat?" + done + +GinaGenericText: + text "Are your #MON" + line "still tough?" + + para "I train every day" + line "with @" + text_ram wStringBuffer4 + text "." + done diff --git a/data/phone/text/gina_caller.asm b/data/phone/text/gina_caller.asm new file mode 100644 index 0000000..34bbbae --- /dev/null +++ b/data/phone/text/gina_caller.asm @@ -0,0 +1,119 @@ +GinaGettingInSyncWithMonText: + text "My @" + text_ram wStringBuffer4 + text " and" + line "I are getting more" + + para "in sync with each" + line "other." + done + +GinaDefeatedMonText: + text "We battled a wild" + line "@" + text_ram wStringBuffer4 + text " and" + + para "managed to drop it" + line "in a close match." + + para "We're getting into" + line "the groove!" + done + +GinaLostAMonText: + text "But, you know?" + + para "I still haven't" + line "caught @" + text_ram wStringBuffer4 + text "." + + para "It's getting past" + line "frustrating…" + done + +GinaBattleRematchText: + text "Would you be my" + line "practice partner" + cont "again sometime?" + + para "I'll be waiting on" + line "@" + text_ram wStringBuffer5 + text "." + + para "…Could you take it" + line "a little easier on" + cont "me next time?" + done + +GinaHangUpText: + text "Bye! Let's chat" + line "again!" + done + +GinaRocketTakeoverRumorText: + text "Have you heard" + line "about TEAM ROCKET?" + + para "They've taken over" + line "the RADIO TOWER in" + cont "GOLDENROD." + + para "Are the people" + line "inside safe?" + done + +GinaFoundItemText: + text "I picked up some-" + line "thing nice today." + + para "I want you to have" + line "it, so I called!" + + para "You will come for" + line "it, won't you?" + + para "@" + text_ram wStringBuffer5 + text " is" + line "where I am." + done + +GinaHaventFoundAnythingYetText: + text "Sorry, I haven't" + line "found anything" + + para "useful yet…" + line "I promise, if I" + + para "find anything, you" + line "can have it!" + done + +GinaReminderText: + text "Oh, !" + line "How soon can I" + + para "expect to see you" + line "for our battle?" + + para "Don't forget," + line "@" + text_ram wStringBuffer5 + text "!" + done + +GinaComePickUpText: + text "I'm getting really" + line "impatient, waiting" + + para "to give you my" + line "present!" + + para "Hurry over to" + line "@" + text_ram wStringBuffer5 + text "!" + done diff --git a/data/phone/text/gina_overworld.asm b/data/phone/text/gina_overworld.asm new file mode 100644 index 0000000..559e7fc --- /dev/null +++ b/data/phone/text/gina_overworld.asm @@ -0,0 +1,67 @@ +GinaAskNumber1Text: + text "Whenever I see a" + line "strong trainer, I" + + para "want to be their" + line "cheerleader." + + para "When I'm on my" + line "walk, I sometimes" + cont "pick up items." + + para "If I get anything," + line "you can have it!" + + para "Want to give me" + line "your number?" + + para "I'll call as soon" + line "as I get anything." + done + +GinaAskNumber2Text: + text "If I find an item," + line "you can have it!" + + para "Want to give me" + line "your number?" + done + +GinaNumberAcceptedText: + text "I'll call as soon" + line "as I get anything!" + done + +GinaNumberDeclinedText: + text "Is that so? Well," + line "I'll still be" + cont "rooting for you!" + done + +GinaPhoneFullText: + text "But your phone is" + line "all filled up!" + done + +GinaRematchText: + text "I've been waiting!" + + para "I've gotten a bit" + line "better at this!" + done + +GinaGiftText: + text "So you're finally" + line "here!" + + para "I think this will" + line "make you happy." + done + +GinaPackFullText: + text "Your PACK looks" + line "completely full." + + para "I'll have to hold" + line "on to this." + done diff --git a/data/phone/text/huey_callee.asm b/data/phone/text/huey_callee.asm new file mode 100644 index 0000000..82afaad --- /dev/null +++ b/data/phone/text/huey_callee.asm @@ -0,0 +1,59 @@ +HueyAnswerPhoneText: + text "Yeah, this is" + line "@" + text_ram wStringBuffer3 + text "." + + para "Huh? What's up," + line "?" + done + +HueyAnswerPhoneDayText: + text "Yeah, this is" + line "@" + text_ram wStringBuffer3 + text "." + + para "Huh? What's up" + line "?" + done + +HueyAnswerPhoneNiteText: + text "Yeah, this is" + line "@" + text_ram wStringBuffer3 + text "." + + para "Huh? What's up" + line "?" + done + +HueyGreetText: + text "Yo, !" + line "You awake?" + + para "It's me, @" + text_ram wStringBuffer3 + text "!" + line "How's it going?" + done + +HueyGreetDayText: + text "Yo, ! You" + line "free right now?" + + para "It's me, @" + text_ram wStringBuffer3 + text "!" + line "How's it going?" + done + +HueyGreetNiteText: + text "Yo, !" + line "Were you asleep?" + + para "It's me, @" + text_ram wStringBuffer3 + text "!" + line "How's it going?" + done diff --git a/data/phone/text/huey_caller.asm b/data/phone/text/huey_caller.asm new file mode 100644 index 0000000..b06f2be --- /dev/null +++ b/data/phone/text/huey_caller.asm @@ -0,0 +1,43 @@ +HueyBattleRematchText: + text "Hey, I challenge" + line "you to a battle!" + + para "It won't be like" + line "last time!" + + para "@" + text_ram wStringBuffer5 + text "'s" + line "where I'm waiting" + + para "for you. Hustle" + line "over here pronto!" + done + +HueyHangUpText: + text "See ya!" + done + +HueyWeHaveToBattleAgainSometimeText: + text "We have to battle" + line "again sometime." + + para "You can bet I'm" + line "going to keep" + + para "challenging you" + line "till I win." + done + +HueyReminderText: + text "Hey, you'd better" + line "not have forgotten" + cont "about our battle!" + + para "@" + text_ram wStringBuffer5 + text "!" + + para "Hustle over quick!" + line "I'm waiting!" + done diff --git a/data/phone/text/huey_overworld.asm b/data/phone/text/huey_overworld.asm new file mode 100644 index 0000000..4629f80 --- /dev/null +++ b/data/phone/text/huey_overworld.asm @@ -0,0 +1,80 @@ +HueyAskNumber1Text: + text "Cool! That's the" + line "first time I've" + cont "lost in a while!" + + para "Hey, give me your" + line "phone number." + + para "You'd be fun to" + line "battle, so I'll" + + para "call you when I" + line "get stronger!" + done + +HueyAskNumber2Text: + text "Hey, give me your" + line "phone number." + + para "You'd be fun to" + line "battle, so I'll" + + para "call you when I" + line "get stronger!" + done + +HueyNumberAcceptedText: + text "Hey, let's battle" + line "again!" + done + +HueyNumberDeclinedText: + text "Looks like you're" + line "a wimp…" + done + +HueyPhoneFullText: + text "Hey! Your phone's" + line "already full!" + done + +HueyRematchText: + text "Hey! I'm tired of" + line "waiting for you!" + done + +HueyPackFullText: + text "Oh… Your PACK's" + line "full. I'll give it" + cont "to you later." + done + +HueyRematchGiftText: + text "Man! You're as" + line "tough as ever!" + + para "I've battled you" + line "over and over, but" + + para ", I haven't" + line "won once." + + para "I bought tons of" + line "items to toughen" + + para "up my #MON, but" + line "to no avail…" + + para "Items alone aren't" + line "the answer." + + para "That must be what" + line "it is…" + + para "Here, take this," + line "." + + para "I won't be needing" + line "it anymore…" + done diff --git a/data/phone/text/irwin_callee.asm b/data/phone/text/irwin_callee.asm new file mode 100644 index 0000000..61a98b1 --- /dev/null +++ b/data/phone/text/irwin_callee.asm @@ -0,0 +1,56 @@ +IrwinAnswerPhoneText: + text "Hello? @" + text_ram wStringBuffer3 + text_start + line "here…" + + para "Hey, !" + done + +IrwinAnswerPhoneDayText: + text "Hello? @" + text_ram wStringBuffer3 + text_start + line "here…" + + para "Wow, !" + done + +IrwinAnswerPhoneNiteText: + text "Hello? @" + text_ram wStringBuffer3 + text_start + line "here…" + + para "Yippee, !" + done + +IrwinGreetText: + text "Uh, hello." + line "?" + + para "It's your pal," + line "@" + text_ram wStringBuffer3 + text "!" + done + +IrwinGreetDayText: + text "Uh, hello," + line "?" + + para "It's your buddy" + line "@" + text_ram wStringBuffer3 + text "!" + done + +IrwinGreetNiteText: + text "Uh, hello," + line "?" + + para "It's your sidekick" + line "@" + text_ram wStringBuffer3 + text "!" + done diff --git a/data/phone/text/irwin_caller.asm b/data/phone/text/irwin_caller.asm new file mode 100644 index 0000000..d456469 --- /dev/null +++ b/data/phone/text/irwin_caller.asm @@ -0,0 +1,289 @@ +IrwinHangUpText: + text "I hate having to" + line "hang up on you!" + + para "Call you later!" + done + +IrwinRocketTakeoverRumorText: + text ", have you" + line "heard?" + + para "GOLDENROD's RADIO" + line "TOWER has been" + + para "taken over by TEAM" + line "ROCKET!" + + para "…Um… What's TEAM" + line "ROCKET?" + done + +IrwinPlainBadgeGossipText: + text ", I heard!" + + para "You defeated that" + line "WHITNEY?" + + para "It makes me proud" + line "to be your friend!" + done + +IrwinJasmineReturnedGossipText: + text "Hey, I heard about" + line "you!" + + para "You saved that" + line "#MON at the" + + para "LIGHTHOUSE, didn't" + line "you?" + + para ", I wish" + line "you'd come see me" + + para "when I'm sick in" + line "bed with a cold!" + done + +IrwinRocketHideoutGossipText: + text "I heard, I heard," + line "I heard!" + + para "You smashed TEAM" + line "ROCKET's hideout!" + + para "You're like a" + line "movie hero, even!" + + para "But um… What was" + line "TEAM ROCKET?" + done + +IrwinRadioTowerGossipText: + text "I heard, I heard," + line "I heard!" + + para "About your heroic" + line "liberation of the" + + para "RADIO TOWER! You" + line "rock so hard!" + done + +IrwinRisingBadgeGossipText: + text "I saw, I saw!" + + para "I saw you go into" + line "the DRAGON'S DEN!" + + para "I'm certain you" + line "passed! Aww, no" + + para "need to be modest!" + line "You can't fail!" + done + +IrwinEliteFourGossipText: + text "Yesterday, I went" + line "out to NEW BARK" + + para "TOWN. There was a" + line "lady who looked a" + + para "lot like you," + line "." + + para "What? That lady" + line "was your mom?" + + para "Aww, I should've" + line "introduced myself!" + + para "I bet your mom's" + line "really proud of" + + para "all that you've" + line "accomplished." + + para "Heh, put it this" + line "way. I'd be proud" + + para "if I were your" + line "mom, believe me!" + done + +IrwinVermilionCityGossipText: + text "I saw, I saw," + line "I saw!" + + para "You striding onto" + line "a ship, !" + + para "I can't get over" + line "how good you look" + + para "with the sea as" + line "your backdrop!" + done + +IrwinTrainPassGossipText: + text "I heard, I heard!" + + para "You got a MAGNET" + line "TRAIN PASS!" + + para "When I saw you" + line "departing on the" + + para "ship, I felt sad" + line "that I wouldn't be" + + para "able to see you" + line "for a while." + + para "But since you have" + line "that PASS, you can" + + para "zip back anytime!" + line "That's reassuring!" + + para "What? You can FLY" + line "back anytime?" + + para "What do you mean" + line "by FLY?" + done + +IrwinSnorlaxGossipText: + text "I saw, I saw!" + + para "You waking up" + line "SNORLAX!" + + para "I was watching you" + line "from afar, so I" + + para "couldn't tell what" + line "you did exactly." + + para "Did you play a" + line "flute to wake it?" + + para "Wow! That's like" + line "magic!" + done + +IrwinMtSilverGossipText: + text "I hear rumors" + line "about you all over" + cont "the place." + + para "It just makes me" + line "sigh, ." + + para "How did you get so" + line "strong?" + + para "Go for the world" + line "championship now!" + + para "I'll always be" + line "cheering you on!" + done + +IrwinCalledRightAwayText: + text "Hehe, I called" + line "right away!" + + para "I think we can be" + line "good friends!" + done + +IrwinFogBadgeGossipText: + text "I saw, I heard!" + + para "You beat MORTY of" + line "ECRUTEAK GYM!" + + para "Th-that's just" + line "incredible!" + + para "I actually went to" + line "the GYM's entrance" + + para "to cheer you on." + line "Did you know that?" + + para "But everyone was" + line "floating, and" + + para "there were ghosts" + line "all over! So I" + + para "chickened out and" + line "took off for home…" + done + +IrwinMarshBadgeGossipText: + text ", I heard!" + + para "You're kicking up" + line "a mighty ruckus" + + para "over in KANTO!" + line "What a glorious" + + para "rampage it must" + line "be!" + + para "You so rock!" + done + +IrwinYourEscapadesRockText: + text "Hearing about your" + line "escapades rocks my" + + para "soul!" + line "It sure does!" + done + +IrwinGoodMatchText: + text "I'm so glad you" + line "called!" + + para "I was just about" + line "to call you too!" + + para "I guess we must be" + line "a good match!" + done + +IrwinSoMuchToChatAboutText: + text "How are you?" + + para "What are you" + line "doing?" + + para "Where are you?" + + para "How many BADGES do" + line "you have now?" + + para "How much money" + line "have you saved?" + + para "How's your mom?" + + para "Have you got lots" + line "of #MON?" + + para "Is it going to be" + line "sunny tomorrow?" + + para "Arrgh, there's so" + line "much I want to" + + para "chat about! This" + line "is going nowhere!" + done diff --git a/data/phone/text/irwin_overworld.asm b/data/phone/text/irwin_overworld.asm new file mode 100644 index 0000000..530ad94 --- /dev/null +++ b/data/phone/text/irwin_overworld.asm @@ -0,0 +1,53 @@ +IrwinAskNumber1Text: + text "You're the best" + line "I've ever battled!" + + para "Huh? You're the" + line "one who saved all" + cont "the SLOWPOKE?" + + para "Well, no wonder I" + line "couldn't beat you!" + + para "Would it be OK to" + line "get your number?" + + para "I don't want to" + line "miss anything you" + cont "do from now on!" + done + +IrwinAskNumber2Text: + text "You will tell me" + line "your phone number?" + done + +IrwinNumberAcceptedText: + text "Wow! Gee, thanks!" + line "Now I can call you" + + para "anytime, whether" + line "anything's up or" + + para "not. You know," + line "just to chat!" + done + +IrwinNumberDeclinedText: + text "Oh, but…" + line "I'm not dangerous!" + + para "I just want to" + line "call and chat" + + para "about everything" + line "and nothing!" + done + +IrwinPhoneFullText: + text "Your phone list is" + line "already full…" + + para "You must be really" + line "popular…" + done diff --git a/data/phone/text/jack_callee.asm b/data/phone/text/jack_callee.asm new file mode 100644 index 0000000..2559c62 --- /dev/null +++ b/data/phone/text/jack_callee.asm @@ -0,0 +1,71 @@ +JackAnswerPhoneText: + text "Hello. This is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Good morning," + line "!" + done + +JackAnswerPhoneDayText: + text "Hello. This is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "How's it going," + line "?" + done + +JackAnswerPhoneNiteText: + text "Hello. This is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Good evening," + line "!" + done + +JackGreetText: + text ", good" + line "morning!" + + para "It's me, @" + text_ram wStringBuffer3 + text "." + line "How are you doing?" + done + +JackGreetDayText: + text ", howdy!" + + para "It's me, @" + text_ram wStringBuffer3 + text "." + line "Isn't it nice out?" + done + +JackGreetNiteText: + text ", good" + line "evening!" + + para "It's me, @" + text_ram wStringBuffer3 + text "." + line "Got a minute?" + done + +JackGenericText: + text "How are your" + line "#MON doing?" + + para "My @" + text_ram wStringBuffer4 + text " is" + line "so curious, it's a" + + para "problem. Maybe" + line "it's like me…" + done diff --git a/data/phone/text/jack_caller.asm b/data/phone/text/jack_caller.asm new file mode 100644 index 0000000..92299d3 --- /dev/null +++ b/data/phone/text/jack_caller.asm @@ -0,0 +1,193 @@ +JackIntelligenceKeepsRisingText: + text "My @" + text_ram wStringBuffer4 + text "'s" + line "intelligence keeps" + + para "rising. It might" + line "be smarter than" + cont "yours!" + done + +JackDefeatedMonText: + text "The other day, I" + line "easily defeated a" + cont "@" + text_ram wStringBuffer4 + text "." + + para "I think swapping" + line "tips with you is" + cont "starting to help." + done + +JackLostAMonText: + text "Oh, and listen." + line "I missed catching" + + para "a @" + text_ram wStringBuffer4 + text " by" + line "just a tiny bit." + + para "If I'd been a bit" + line "more informed, I'm" + + para "sure I would've" + line "caught it…" + done + +JackBattleRematchText: + text "Do you want to" + line "battle? I'll show" + + para "you how to battle" + line "logically." + + para "I'll be in" + line "@" + text_ram wStringBuffer5 + text "." + + para "Give me a shout if" + line "you're nearby." + done + +JackHangUpText: + text "See you later!" + done + +JackThunderTriviaText: + text "Did you know?" + + para "When it's raining," + line "THUNDER is sure to" + cont "strike." + done + +JackRolloutTriviaText: + text "Did you know…?" + + para "If you use DEFENSE" + line "CURL, ROLLOUT's" + + para "power goes way up" + line "past normal." + done + +JackSolarbeamTriviaText: + text "Did you know…?" + + para "If the sunlight is" + line "harsh, SOLARBEAM" + + para "doesn't need to be" + line "charged up." + done + +JackStompTriviaText: + text "Did you know…?" + + para "If the opponent" + line "uses MINIMIZE," + + para "your STOMP becomes" + line "more powerful." + done + +JackGustTriviaText: + text "Did you know…?" + + para "If your opponent" + line "is FLYing, your" + + para "GUST becomes much" + line "more powerful." + done + +JackTwisterTriviaText: + text "Did you know…?" + + para "If your opponent" + line "is FLYing, your" + + para "TWISTER becomes" + line "more powerful." + done + +JackEarthquakeTriviaText: + text "Did you know…?" + + para "If your opponent" + line "uses DIG, your" + + para "EARTHQUAKE becomes" + line "more powerful." + done + +JackMagnitudeTriviaText: + text "Did you know…?" + + para "If your opponent" + line "uses DIG, your" + + para "MAGNITUDE becomes" + line "more powerful." + done + +JackSandstormTriviaText: + text "Did you know…?" + + para "The rock, ground" + line "and steel types" + + para "can't be hurt by" + line "SANDSTORM." + done + +JackSunnyDayTriviaText: + text "Did you know…?" + + para "If the sunlight is" + line "harsh, water-type" + + para "moves become much" + line "weaker." + done + +JackRainDanceTriviaText: + text "Did you know…?" + + para "When it's raining," + line "fire-type moves" + + para "become much weaker" + line "than usual." + done + +JackHeardSomeGreatTipsText: + text "My friend heard" + line "some great tips." + + para "He's going to let" + line "me in on some." + + para "When he tells me," + line "I'll call right" + cont "away and tell you." + done + +JackReminderText: + text "Hey, !" + + para "Do you remember" + line "your promise?" + + para "We have to battle" + line "soon!" + + para "I'll be at" + line "@" + text_ram wStringBuffer5 + text "." + done diff --git a/data/phone/text/jack_overworld.asm b/data/phone/text/jack_overworld.asm new file mode 100644 index 0000000..3cef012 --- /dev/null +++ b/data/phone/text/jack_overworld.asm @@ -0,0 +1,55 @@ +JackAskNumber1Text: + text "Your knowledge is" + line "impressive!" + + para "I like that!" + + para "Want to trade" + line "battle tips?" + + para "I'll phone if I" + line "get good info." + + para "Would you tell me" + line "your number?" + done + +JackAskNumber2Text: + text "Want to trade" + line "battle tips?" + + para "I'll phone if I" + line "get good info." + + para "Would you tell me" + line "your number?" + done + +JackNumberAcceptedText: + text "I'll call you if I" + line "hear anything!" + done + +JackNumberDeclinedText: + text "Oh, OK. Too bad…" + + para "Well, if you ever" + line "want my number," + cont "come see me, OK?" + done + +JackPhoneFullText: + text "Oh?" + line "Your phone's full." + + para "It can't register" + line "my number." + done + +JackRematchText: + text "Hi, I was waiting" + line "for you to show!" + + para "Let's get started" + line "right away!" + done diff --git a/data/phone/text/joey_callee.asm b/data/phone/text/joey_callee.asm new file mode 100644 index 0000000..7bbe339 --- /dev/null +++ b/data/phone/text/joey_callee.asm @@ -0,0 +1,73 @@ +JoeyAnswerPhoneText: + text "Hi, @" + text_ram wStringBuffer3 + text " here!" + + para "Oh, ? You" + line "doing well?" + done + +JoeyAnswerPhoneDayText: + text "Hi, @" + text_ram wStringBuffer3 + text " here!" + + para "Oh, ? You" + line "doing well?" + done + +JoeyAnswerPhoneNiteText: + text "Hi, @" + text_ram wStringBuffer3 + text " here!" + + para "Oh, ? You" + line "doing well?" + done + +JoeyGreetText: + text "Yo, !" + line "How're you doing?" + + para "This is @" + text_ram wStringBuffer3 + text "," + line "got a minute?" + done + +JoeyGreetDayText: + text "Yo, ! How's" + line "it going?" + + para "This is @" + text_ram wStringBuffer3 + text "." + line "Got a minute?" + done + +JoeyGreetNiteText: + text "Yo, !" + line "How're you doing?" + + para "This is @" + text_ram wStringBuffer3 + text "," + line "got a minute?" + done + +JoeyGenericText: + text "How are your" + line "#MON doing?" + + para "My @" + text_ram wStringBuffer4 + text "'s" + line "raring to go, just" + cont "like always." + + para "It's the only one" + line "I have. I'm going" + + para "to become a great" + line "trainer with it!" + done diff --git a/data/phone/text/joey_caller.asm b/data/phone/text/joey_caller.asm new file mode 100644 index 0000000..07704fd --- /dev/null +++ b/data/phone/text/joey_caller.asm @@ -0,0 +1,91 @@ +JoeyMonLookingSharperText: + text "My @" + text_ram wStringBuffer4 + text "'s" + line "looking sharper" + cont "than before!" + + para "I doubt there's a" + line "#MON as cool as" + + para "this guy in your" + line "party!" + done + +JoeyDefeatedMonText: + text "Oh yeah, I took" + line "down a @" + text_ram wStringBuffer4 + text_start + para "in the wild the" + line "other day." + + para "It was a cakewalk." + line "Well, I guess it" + + para "can't be helped," + line "us being so tough." + done + +JoeyLostAMonText: + text "Oh yeah, I saw a" + line "wild @" + text_ram wStringBuffer4 + text "!" + + para "I thought about" + line "going for it, but" + + para "I decided to work" + line "with my one-and-" + + para "only right to the" + line "extreme end." + done + +JoeyBattleRematchText: + text "Let's get together" + line "and battle!" + + para "I promise things" + line "will be different!" + + para "@" + text_ram wStringBuffer5 + text "'s" + line "where I'll be." + + para "Give me a shout" + line "when you come." + done + +JoeyHangUpText: + text "All right. Later!" + done + +JoeyDevisingStrategiesText: + text "I'm checking out" + line "@" + text_ram wStringBuffer4 + text "'s moves" + + para "and devising some" + line "strategies." + + para "When I come up" + line "with a good one," + cont "let's battle!" + done + +JoeyReminderText: + text "What's keeping" + line "you, !" + + para "Let's get down and" + line "battle already!" + + para "I'm waiting on" + line "@" + text_ram wStringBuffer5 + text "!" + done diff --git a/data/phone/text/joey_overworld.asm b/data/phone/text/joey_overworld.asm new file mode 100644 index 0000000..cb7c593 --- /dev/null +++ b/data/phone/text/joey_overworld.asm @@ -0,0 +1,71 @@ +JoeyAskNumber1Text: + text "Listen, can I get" + line "your phone number?" + + para "I'll ring you for" + line "some battles." + + para "I'm a rookie too, " + line "so I think it'd be" + cont "a good motivator." + done + +JoeyAskNumber2Text: + text "Can I get your" + line "phone number?" + + para "I don't want to" + line "lose against you!" + + para "We have to battle" + line "again, OK?" + done + +JoeyNumberAcceptedText: + text "I'll ring you" + line "whenever I get the" + cont "urge to battle!" + done + +JoeyNumberDeclinedText: + text "Oh, all right…" + + para "But I won't lose" + line "to you again!" + done + +JoeyPhoneFullText: + text "Huh, what? Your" + line "phone's full." + done + +JoeyRematchText: + text "I've been waiting!" + line "Let's battle now!" + done + +JoeyPackFullText: + text "Hey, wait! Your" + line "PACK is stuffed!" + + para "Well, we'll leave" + line "it till next time." + done + +JoeyRematchGiftText: + text "And yet another" + line "loss…" + + para "No doubt about" + line "it--you're tough." + + para "Being beaten this" + line "often actually" + cont "feels good now!" + + para "Here, take this. " + line "Use it to get even" + + para "tougher. That will" + line "toughen me up too!" + done diff --git a/data/phone/text/jose_callee.asm b/data/phone/text/jose_callee.asm new file mode 100644 index 0000000..01ae5f5 --- /dev/null +++ b/data/phone/text/jose_callee.asm @@ -0,0 +1,69 @@ +JoseAnswerPhoneText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh, ?" + line "Good morning!" + done + +JoseAnswerPhoneDayText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh, ? Hi!" + done + +JoseAnswerPhoneNiteText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh, ?" + line "Good evening!" + done + +JoseGreetText: + text "Oh, ?" + + para "Tweet! Yeah, it's" + line "me, @" + text_ram wStringBuffer3 + text "." + done + +JoseGreetDayText: + text "Oh, ?" + + para "Tweet! Yeah, it's" + line "me, @" + text_ram wStringBuffer3 + text "." + done + +JoseGreetNiteText: + text "Oh, ?" + + para "Tweet! Yeah, it's" + line "me, @" + text_ram wStringBuffer3 + text "." + done + +JoseGenericText: + text "Are your #MON" + line "still cooking?" + + para "My @" + text_ram wStringBuffer4 + text " has" + line "too much energy." + + para "Once it takes off," + line "it won't come back" + cont "for a while." + done diff --git a/data/phone/text/jose_caller.asm b/data/phone/text/jose_caller.asm new file mode 100644 index 0000000..7ab1653 --- /dev/null +++ b/data/phone/text/jose_caller.asm @@ -0,0 +1,130 @@ +JoseMonsStickHasADeliciousAromaText: + text "Hey listen, my" + line "@" + text_ram wStringBuffer4 + text "'s stick" + + para "has this really" + line "delicious aroma." + + para "That aroma gets my" + line "appetite going!" + done + +JoseDefeatedMonText: + text "A while ago, my" + line "FARFETCH'D KO'd" + cont "this @" + text_ram wStringBuffer4 + text "." + + para "You should have" + line "seen FARFETCH'D" + + para "wield that stick." + line "Amazing stuff!" + done + +JoseLostAMonText: + text "I ran into a wild" + line "@" + text_ram wStringBuffer4 + text "…" + + para "I was trying to" + line "catch it, but it" + + para "took off faster" + line "than I thought it" + + para "would. It was a" + line "bit disappointing." + done + +JoseBattleRematchText: + text "Want to battle" + line "again?" + + para "For some reason," + line "my FARFETCH'D is" + + para "all worked up and" + line "raring to go." + + para "@" + text_ram wStringBuffer5 + text "'s" + line "where I'm at." + + para "Keep an eye out" + line "for me, OK?" + done + +JoseHangUpText: + text "Be seeing you!" + done + +JoseFoundItemText: + text "My FARFETCH'D had" + line "something pretty" + cont "in its beak." + + para "Like I promised," + line "you can have it." + + para "Catch up to me on" + line "@" + text_ram wStringBuffer5 + text "," + + para "and I'll let you" + line "have it." + done + +JoseHaventGottenItemYetText: + text "I haven't gotten" + line "what I promised" + cont "you yet." + + para "I'll call you as" + line "soon as I get it," + + para "so could you wait" + line "a little longer?" + done + +JoseReminderText: + text ", could you" + line "hurry over?" + + para "FARFETCH'D is" + line "agitated." + + para "If you don't come" + line "soon, it might" + + para "smack me with its" + line "stick!" + + para "@" + text_ram wStringBuffer5 + text "!" + + para "Please come as" + line "soon as you can!" + done + +JoseComePickUpText: + text "What's wrong?" + + para "Don't you want" + line "this gift?" + + para "Catch up to me on" + line "@" + text_ram wStringBuffer5 + text "," + + para "and I'll let you" + line "have it." + done diff --git a/data/phone/text/jose_overworld.asm b/data/phone/text/jose_overworld.asm new file mode 100644 index 0000000..94db33d --- /dev/null +++ b/data/phone/text/jose_overworld.asm @@ -0,0 +1,73 @@ +JoseAskNumber1Text: + text "If my @" + text_ram wStringBuffer4 + text_start + line "sees anything" + + para "pretty, it goes" + line "and gets it." + + para "Do you like pretty" + line "things?" + + para "I could share if" + line "it gets some more." + + para "What's your phone" + line "number? I'll call." + + para "Don't expect a" + line "whole lot, OK?" + done + +JoseAskNumber2Text: + text "Do you like pretty" + line "things?" + + para "I could share if" + line "FARFETCH'D goes" + cont "and gets more." + + para "What's your phone" + line "number? I'll call." + done + +JoseNumberAcceptedText: + text "I'll call you as" + line "soon as I get" + cont "something pretty." + done + +JoseNumberDeclinedText: + text "You sure? Well," + line "tell me if you" + cont "change your mind." + done + +JosePhoneFullText: + text "Huh? Your phone" + line "list is full." + done + +JoseRematchText: + text "Tweet! Tweeeet!" + + para "Kept me waiting!" + line "Go, FARFETCH'D!" + done + +JoseGiftText: + text "Kept me waiting!" + line "Look, this is it!" + + para "See? Isn't it some" + line "kind of pretty?" + done + +JosePackFullText: + text "Huh? You don't" + line "have anywhere to" + + para "put this. Better" + line "come back for it." + done diff --git a/data/phone/text/kenji_callee.asm b/data/phone/text/kenji_callee.asm new file mode 100644 index 0000000..94adbb2 --- /dev/null +++ b/data/phone/text/kenji_callee.asm @@ -0,0 +1,44 @@ +KenjiAnswerPhoneText: + text_ram wStringBuffer3 + text " here…" + + para "! Beautiful" + line "morning, hey?" + done + +KenjiAnswerPhoneDayText: + text_ram wStringBuffer3 + text " here…" + + para "! Beautiful" + line "weather, hey?" + done + +KenjiAnswerPhoneNiteText: + text_ram wStringBuffer3 + text " here…" + + para "! Beautiful" + line "moonlight, hey?" + done + +KenjiGreetText: + text "Hey, !" + line "This is @" + text_ram wStringBuffer3 + text "!" + done + +KenjiGreetDayText: + text "Hey, !" + line "This is @" + text_ram wStringBuffer3 + text "!" + done + +KenjiGreetNiteText: + text "Hey, !" + line "This is @" + text_ram wStringBuffer3 + text "!" + done diff --git a/data/phone/text/kenji_caller.asm b/data/phone/text/kenji_caller.asm new file mode 100644 index 0000000..52eba3a --- /dev/null +++ b/data/phone/text/kenji_caller.asm @@ -0,0 +1,63 @@ +KenjiHangUpText: + text "Anyway, we'll chat" + line "again!" + done + +KenjiRemainDedicatedText: + text "Are you still on" + line "your journey?" + + para "I remain dedicated" + line "to my training." + + para "Oooooaaarrrgh!" + done + +KenjiCallMeBackAnotherTimeText: + text "I'm in training" + line "now. I apologize," + + para "but call me back" + line "another time." + + para "Oooooaaarrrgh!" + done + +KenjiIllHaveTimeToChatTomorrowText: + text "I apologize, but I" + line "don't have time to" + + para "chat while I am in" + line "training!" + + para "I'll have time to" + line "chat tomorrow!" + + para "Yiiihah!" + done + +KenjiHangUpMorningText: + text "I plan to take a" + line "lunch break, so" + + para "come see me then!" + line "Ayiiiyah!" + done + +KenjiTakingABreakText: + text "I'm taking a break" + line "on ROUTE 45!" + + para "Why not drop by if" + line "you are free?" + done + +KenjiHangUpNightText: + text "I rested up over" + line "my lunch break." + + para "Now it's time to" + line "resume training!" + + para "Oooryaah!" + done diff --git a/data/phone/text/kenji_overworld.asm b/data/phone/text/kenji_overworld.asm new file mode 100644 index 0000000..a3206b9 --- /dev/null +++ b/data/phone/text/kenji_overworld.asm @@ -0,0 +1,67 @@ +KenjiAskNumber1Text: + text "Our battle was" + line "remarkable!" + + para "I wish for some-" + line "thing to remember" + cont "you by!" + + para "Perhaps your phone" + line "number will do?" + + para "My training makes" + line "it impossible to" + cont "chat much, but…" + done + +KenjiAskNumber2Text: + text "My training makes" + line "chatting tough," + + para "but will you take" + line "down my number?" + done + +KenjiNumberAcceptedText: + text "I must train" + line "harder to become" + cont "the mightiest!" + done + +KenjiNumberDeclinedText: + text "If you decide you" + line "want my number," + cont "come see me." + done + +KenjiPhoneFullText: + text "Your phone appears" + line "to be full." + + para "Come back later!" + done + +KenjiGiftText: + text "I wish to thank" + line "you, !" + + para "I've been training" + line "all alone…" + + para "I was happy that" + line "you cared to call…" + + para "I want you to have" + line "this!" + done + +KenjiPackFullText: + text "Your strength will" + line "not let you carry" + + para "another thing!" + line "I will hold this" + + para "till you lighten" + line "your PACK!" + done diff --git a/data/phone/text/liz_callee.asm b/data/phone/text/liz_callee.asm new file mode 100644 index 0000000..57d3c95 --- /dev/null +++ b/data/phone/text/liz_callee.asm @@ -0,0 +1,81 @@ +LizAnswerPhoneText: + text "Hello, @" + text_ram wStringBuffer3 + text_start + line "speaking." + + para "Oh, ." + line "Good morning." + done + +LizAnswerPhoneDayText: + text "Hello, @" + text_ram wStringBuffer3 + text_start + line "speaking." + + para "Oh, ." + line "How are you?" + done + +LizAnswerPhoneNiteText: + text "Hello, @" + text_ram wStringBuffer3 + text_start + line "speaking." + + para "Oh, ." + line "Good evening." + done + +LizGreetText: + text "Good morning," + line "." + + para "This is @" + text_ram wStringBuffer3 + text "." + line "Were you sleeping?" + done + +LizGreetDayText: + text "Hi, ." + line "This is @" + text_ram wStringBuffer3 + text "." + + para "How are things" + line "going for you?" + done + +LizGreetNiteText: + text "Good evening," + line "." + + para "This is @" + text_ram wStringBuffer3 + text "." + line "Are you awake?" + done + +LizGenericText: + text "I had some time," + line "so I called you." + + para "So anyway, how are" + line "your #MON?" + + para "Me, I take my" + line "@" + text_ram wStringBuffer4 + text " to the" + + para "#MON CENTER in" + line "VIOLET every day," + + para "so it's doing just" + line "fantastic!" + + para "I'm friends with" + line "the receptionist!" + done diff --git a/data/phone/text/liz_caller.asm b/data/phone/text/liz_caller.asm new file mode 100644 index 0000000..154bf87 --- /dev/null +++ b/data/phone/text/liz_caller.asm @@ -0,0 +1,308 @@ +LizMonAlwaysWantsToNuzzleText: + text "Oh, you have to" + line "hear this." + + para "My @" + text_ram wStringBuffer4 + text " is" + line "so adorable!" + + para "It always wants to" + line "nuzzle me!" + done + +LizDefeatedMonText: + text "And, and! Um…" + + para "We beat a wild" + line "@" + text_ram wStringBuffer4 + text " with" + + para "just one hit a" + line "little while ago." + + para "We felt sorry for" + line "it, though." + done + +LizLostAMonText: + text "And, and! Uh…" + + para "We just saw a" + line "really gorgeous" + cont "@" + text_ram wStringBuffer4 + text "." + + para "But I was on the" + line "phone, so it got" + + para "away. It made us" + line "really angry!" + done + +LizBattleRematchText: + text "Hi! Do you have" + line "some free time?" + + para "I've got all sorts" + line "of time. If you're" + + para "free, would you" + line "like to battle?" + + para "I'll be waiting on" + line "@" + text_ram wStringBuffer5 + text "." + + para "Let me know when" + line "you get here!" + done + +LizWrongNumberText: + text "Hi, TANIA. How are" + line "you? This is LIZ." + + para "I'm fine, but I'm" + line "bored silly!" + + para "Huh… Wrong number?" + line "Oops! Sorry!" + done + +LizHangUpText: + text "OK, I'll call you" + line "later!" + done + +LizRuinsOfAlphGossipText: + text "Listen, listen!" + + para "I was listening to" + line "the radio in the" + + para "RUINS OF ALPH when" + line "an odd broadcast" + + para "suddenly cut it on" + line "the regular show." + + para "I wonder what it" + line "was. So strange!" + done + +LizFalknerGossipText: + text "Listen, listen!" + + para "Don't you think" + line "FALKNER of VIOLET" + + para "GYM is cool and" + line "handsome?" + + para "But they say his" + line "dad, who's out" + + para "training on the" + line "road, is even more" + + para "cool and handsome" + line "than FALKNER." + + para "I wish I could" + line "meet him!" + done + +LizEarlGossipText: + text "Listen, listen!" + + para "Do you know EARL," + line "the teacher who" + + para "runs the #MON" + line "ACADEMY in VIOLET?" + + para "I saw him doing" + line "pirouettes while" + + para "he was running. It" + line "was wildly funny!" + done + +LizSurfPikachuGossipText: + text "Listen, listen!" + + para "I collect #MON" + line "plush dolls." + + para "But I can't seem" + line "to get a hold of a" + + para "SURF PIKACHU DOLL." + line "None of my friends" + + para "have it. It must" + line "be totally rare!" + + para "You could really" + line "brag about it if" + cont "you had one." + done + +LizMooMooMilkGossipText: + text "Listen, listen!" + + para "Do you know about" + line "MOOMOO MILK?" + + para "You can buy it at" + line "MOOMOO FARM." + + para "It's supposed to" + line "be good for health" + + para "and beauty." + line "I really want to" + + para "try some. I bet" + line "it's delicious!" + done + +LizSalonGossipText: + text "Listen, listen!" + + para "There's a #MON" + line "SALON in GOLDENROD" + + para "that's run by two" + line "brothers." + + para "The older brother" + line "is good, but the" + + para "younger one really" + line "isn't." + + para "But sometimes the" + line "younger one does a" + + para "better job than" + line "his brother." + + para "Every time I go, I" + line "have a hard time" + + para "trying to decide" + line "whom I should use…" + done + +LizWhitneyGossipText: + text "Listen, listen!" + + para "GOLDENROD GYM's" + line "WHITNEY began" + + para "battling only a" + line "little while ago!" + + para "But the #MON" + line "LEAGUE chose her" + cont "as a GYM LEADER!" + + para "I bet she must be" + line "totally talented." + done + +LizBugCatchingContestGossipText: + text "Listen, listen!" + + para "Have you ever" + line "taken part in a" + + para "Bug-Catching" + line "Contest at the" + cont "NATIONAL PARK?" + + para "I did once, but" + line "all I could catch" + cont "was a CATERPIE." + + para "But guess what!" + + para "I won with that" + line "CATERPIE. Isn't" + cont "that great?" + done + +LizBeautifulTrainerGossipText: + text "Listen, listen!" + + para "I saw a beautiful" + line "@" + text_ram wStringBuffer4 + text "!" + + para "I wish I could" + line "become a beautiful" + cont "@" + text_ram wStringBuffer4 + text " too." + done + +LizForgotGossipText: + text "Listen, listen!" + + para "Uh… Um… Whoops!" + + para "I forgot what I" + line "was going to say!" + done + +LizFawningOverMonText: + text "Listen, listen!" + + para "My @" + text_ram wStringBuffer4 + text "…" + line "it… so pretty…" + + para "and… giggle… so" + line "awesome… yes… but…" + + para "very much… eeek!" + line "And… lovely…" + + para "Just ravishing…" + line "Oh, too much!" + + para "…Hug it… sleeping…" + line "That's right…" + + para "pretty… sigh… So" + line "nice… Cute…" + + para "…Oops! Look at the" + line "time! I chatted" + cont "too long!" + + para "I'm sorry I took" + line "so much of your" + + para "time!" + line "I love chatting!" + done + +LizReminderText: + text "I've got too much" + line "time on my hands!" + + para "Let's battle right" + line "away!" + + para "I'll be waiting on" + line "@" + text_ram wStringBuffer5 + text "!" + done diff --git a/data/phone/text/liz_overworld.asm b/data/phone/text/liz_overworld.asm new file mode 100644 index 0000000..cd840b5 --- /dev/null +++ b/data/phone/text/liz_overworld.asm @@ -0,0 +1,44 @@ +LizAskNumber1Text: + text "Oh? You're on a" + line "big journey to see" + cont "the sights? Neat!" + + para "Let's be friends!" + line "Can I have your" + cont "phone number?" + + para "I want to hear" + line "about everything" + cont "you've seen!" + done + +LizAskNumber2Text: + text "Let's be friends!" + line "Can I have your" + cont "phone number?" + + para "I want to hear" + line "about everything" + cont "you've seen!" + done + +LizNumberAcceptedText: + text "I'll telephone you" + line "if I hear anything" + cont "interesting." + done + +LizNumberDeclinedText: + text "Aww… You won't be" + line "my friend?" + done + +LizPhoneFullText: + text "Wait! Your phone" + line "list is filled up!" + done + +LizRematchText: + text "You're late! Let's" + line "get started now!" + done diff --git a/data/phone/text/mom.asm b/data/phone/text/mom.asm new file mode 100644 index 0000000..8ef8660 --- /dev/null +++ b/data/phone/text/mom.asm @@ -0,0 +1,165 @@ +MomPhoneGreetingText: + text "Hello?" + + para "Oh, hi, !" + line "Working hard?" + done + +MomPhoneLandmarkText: + text "Oh, so you're in" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Isn't that where" + line "@" + text_ram wStringBuffer4 + text_start + para "is? Did you go" + line "take a look?" + done + +MomPhoneGenericAreaText: + text "Really, you're in" + line "@" + text_ram wStringBuffer3 + text "?" + + para "I've never gone" + line "there. That's kind" + cont "of neat, ." + done + +MomPhoneNewBarkText: + text "What? You're in" + line "@" + text_ram wStringBuffer3 + text "?" + + para "Come see your MOM" + line "sometime!" + done + +MomPhoneCherrygroveText: + text "You're visiting" + line "@" + text_ram wStringBuffer3 + text "?" + + para "How about coming" + line "home for a bit?" + done + +MomOtherAreaText: + text "Wow, you're in" + line "@" + text_ram wStringBuffer3 + text "?" + + para "Good luck on your" + line "#MON quest!" + done + +MomDeterminedText: + text "That sounds really" + line "tough." + + para "But, , I" + line "know you're really" + + para "determined. You'll" + line "be OK, right?" + done + +MomCheckBalanceText: + text "By the way, you've" + line "saved up ¥@" + text_ram wStringBuffer3 + text "." + + para "Do you want to" + line "keep on saving?" + done + +MomImportantToSaveText: + text "It's important to" + line "save your money." + done + +MomYoureNotSavingText: + text "Oh, ," + line "you're not saving" + + para "any money. Would" + line "you like to save?" + done + +MomYouveSavedText: + text "By the way, you've" + line "saved up ¥@" + text_ram wStringBuffer3 + text "." + + para "Want to start" + line "saving again?" + done + +MomOKIllSaveText: + text "OK. I'll save your" + line "money." + done + +MomPhoneWontSaveMoneyText: + text "OK. I won't save" + line "your money." + done + +MomPhoneHangUpText: + text ", keep it" + line "up! I'm rooting" + cont "for you, baby!" + done + +MomPhoneNoPokemonText: + text "Hello?" + + para "Oh, hi, !" + line "Wasn't PROF.ELM" + cont "waiting for you?" + done + +MomPhoneNoPokedexText: + text "Hello?" + + para "Oh, hi, !" + line "You're on a big" + + para "mission for PROF." + line "ELM? Be good!" + done + +MomPhoneNoGymQuestText: + text "Hello?" + + para "Hi, ! If" + line "you're done with" + + para "your errand come" + line "on home, dear." + done + +MomPhoneLectureText: + text "Hello?" + + para "…… ?" + line "I heard from PROF." + + para "ELM that you went" + line "on a long trip." + + para "I wish you would" + line "have told me…" + + para "What about money?" + line "Should I save it?" + done diff --git a/data/phone/text/parry_callee.asm b/data/phone/text/parry_callee.asm new file mode 100644 index 0000000..6258bf6 --- /dev/null +++ b/data/phone/text/parry_callee.asm @@ -0,0 +1,72 @@ +ParryAnswerPhoneText: + text "Yup, yup!" + line "It's @" + text_ram wStringBuffer3 + text "!" + + para "Hah, and here's" + line "!" + done + +ParryAnswerPhoneDayText: + text "Yup, yup!" + line "It's @" + text_ram wStringBuffer3 + text "!" + + para "Hah, and here's" + line "!" + done + +ParryAnswerPhoneNiteText: + text "Yup, yup!" + line "It's @" + text_ram wStringBuffer3 + text "!" + + para "Hah, and here's" + line "!" + done + +ParryGreetText: + text ", it's" + line "@" + text_ram wStringBuffer3 + text "!" + + para "Have you had a" + line "proper breakfast?" + done + +ParryGreetDayText: + text ", it's" + line "@" + text_ram wStringBuffer3 + text "!" + + para "Have you had a" + line "proper lunch?" + done + +ParryGreetNiteText: + text ", it's" + line "@" + text_ram wStringBuffer3 + text "!" + + para "Have you had a" + line "proper dinner?" + done + +ParryGenericText: + text "Are your #MON" + line "looking good?" + + para "My @" + text_ram wStringBuffer4 + text " and" + line "me--we're looking" + + para "mighty dandy!" + line "Hahahah!" + done diff --git a/data/phone/text/parry_caller.asm b/data/phone/text/parry_caller.asm new file mode 100644 index 0000000..090b8e0 --- /dev/null +++ b/data/phone/text/parry_caller.asm @@ -0,0 +1,69 @@ +ParryNothingCanMatchText: + text "Nothing can match" + line "my @" + text_ram wStringBuffer4 + text " now." + done + +ParryDefeatedMonText: + text "Yeah, we KO'd a" + line "wild @" + text_ram wStringBuffer4 + text "!" + + para "That was OK, but I" + line "wanted to get it…" + done + +ParryLostAMonText: + text "And yesterday, we" + line "spotted a wild" + + para "@" + text_ram wStringBuffer4 + text "." + line "We were debating" + + para "whether to catch" + line "it or beat it." + + para "When along came" + line "another guy who" + + para "caught it!" + line "How about that!" + done + +ParryBattleRematchText: + text "You're thinking" + line "you'd like to" + + para "battle me. Am I" + line "right or what?" + + para "Yep! We'll meet on" + line "@" + text_ram wStringBuffer5 + text "!" + done + +ParryHangUpText: + text "OK, give me a call" + line "again!" + done + +ParryBattleWithMeText: + text "You'll battle with" + line "me again, right?" + done + +ParryHaventYouGottenToText: + text "Haven't you gotten" + line "to @" + text_ram wStringBuffer5 + text "?" + + para "Waiting here isn't" + line "bad, but I'd sure" + cont "like to battle!" + done diff --git a/data/phone/text/parry_overworld.asm b/data/phone/text/parry_overworld.asm new file mode 100644 index 0000000..6286aa2 --- /dev/null +++ b/data/phone/text/parry_overworld.asm @@ -0,0 +1,73 @@ +ParryAskNumber1Text: + text "Sheesh, the way" + line "you attacked! That" + + para "was something! We" + line "should meet again!" + + para "How about giving" + line "me your number?" + done + +ParryAskNumber2Text: + text "So you want to" + line "register my phone" + + para "number for a re-" + line "match, huh?" + done + +ParryNumberAcceptedText: + text "I'll call you" + line "whenever I feel" + cont "like battling!" + done + +ParryNumberDeclinedText: + text "No? That's fine." + + para "A definite no is" + line "easy to take!" + + para "I'll be right here" + line "when you're ready" + cont "for a rematch." + done + +ParryPhoneFullText: + text "Oh? There's no" + line "room to register" + cont "my phone number." + done + +ParryRematchText: + text "Hey, here comes" + line "the kid! Let's go!" + + para "Ready for my usual" + line "no-brainer, all-" + cont "out offense?" + done + +ParryPackFullText: + text "Your PACK looks" + line "stuffed full!" + + para "You can't have" + line "this now." + done + +ParryRematchGiftText: + text "Well, you're" + line "special all right." + + para "If only I'd begun" + line "#MON when I was" + cont "a tad younger…" + + para "I want you to work" + line "and succeed for" + + para "the both of us." + line "So take this, OK?" + done diff --git a/data/phone/text/ralph_callee.asm b/data/phone/text/ralph_callee.asm new file mode 100644 index 0000000..ec6da01 --- /dev/null +++ b/data/phone/text/ralph_callee.asm @@ -0,0 +1,59 @@ +RalphAnswerPhoneText: + text "Yes? Ah, ." + + para "You're courteous" + line "enough to state" + + para "your name when you" + line "call on the phone." + done + +RalphAnswerPhoneDayText: + text "Yes? Ah, ." + + para "You're courteous" + line "enough to state" + + para "your name when you" + line "call on the phone." + done + +RalphAnswerPhoneNiteText: + text "Yes? Ah, ." + + para "You're courteous" + line "enough to state" + + para "your name when you" + line "call on the phone." + done + +RalphGreetText: + text "Hiya, it's Uncle" + line "@" + text_ram wStringBuffer3 + text "." + done + +RalphGreetDayText: + text "Hiya, it's Uncle" + line "@" + text_ram wStringBuffer3 + text "." + done + +RalphGreetNiteText: + text "Hiya, it's Uncle" + line "@" + text_ram wStringBuffer3 + text "." + done + +RalphGenericText: + text "Are you taking" + line "good care of your" + + para "#MON? You have" + line "to be good to your" + cont "partners!" + done diff --git a/data/phone/text/ralph_caller.asm b/data/phone/text/ralph_caller.asm new file mode 100644 index 0000000..667ee18 --- /dev/null +++ b/data/phone/text/ralph_caller.asm @@ -0,0 +1,133 @@ +RalphNeglectingKidsText: + text "I've been spending" + line "more time with my" + + para "@" + text_ram wStringBuffer4 + text " than I" + line "have with my kids." + + para "That's a bit sad," + line "actually." + done + +RalphDefeatedMonText: + text "I just beat a wild" + line "@" + text_ram wStringBuffer4 + text "." + + para "I told my kid, but" + line "he scoffed that he" + + para "could do the same" + line "thing easily." + + para "Boy, has he gotten" + line "cocky…" + done + +RalphLostAMonText: + text "Yesterday a wild" + line "@" + text_ram wStringBuffer4 + text " slipped" + + para "away from me, in" + line "front of my kid." + + para "I was feeling down" + line "about it until he" + + para "shared his #" + line "BALLS with me." + + para "Hahah, that sure" + line "made my day!" + done + +RalphBattleRematchText: + text "What do you say to" + line "a battle with me?" + + para "Good, you're going" + line "to do it!" + + para "For a kid, you're" + line "quite agreeable." + + para "@" + text_ram wStringBuffer5 + text " is" + line "the spot!" + done + +RalphHangUpText: + text "You call your mom" + line "sometimes too!" + done + +RalphItemText: + text "Listen, I… Yowch!" + + para "Uh, sorry! See," + line "@" + text_ram wStringBuffer4 + text " are" + + para "biting like there" + line "is no tomorrow" + + para "over here on" + line "@" + text_ram wStringBuffer5 + text "!" + + para "Aiyee! Ouch!" + line "One jabbed me!" + + para "Heh, they're some" + line "kind of feisty!" + + para ", you have" + line "to see this rare" + + para "sight! Get ready" + line "to fish!" + done + +RalphNoItemText: + text "Yeah, I know." + + para "You're looking for" + line "rare #MON." + + para "Recently, all I've" + line "been catching are" + cont "MAGIKARP, though…" + done + +RalphReminderText: + text "So where are you?" + line "I'm waiting for" + + para "you to show up on" + line "@" + text_ram wStringBuffer5 + text "." + + para "You shouldn't make" + line "your elders wait!" + done + +RalphHurryText: + text "Hey, what's the" + line "matter with you?" + + para "Aren't you coming" + line "over to fish for" + cont "QWILFISH?" + + para "I'm on ROUTE 32," + line "so hurry up!" + done diff --git a/data/phone/text/ralph_overworld.asm b/data/phone/text/ralph_overworld.asm new file mode 100644 index 0000000..6c737cd --- /dev/null +++ b/data/phone/text/ralph_overworld.asm @@ -0,0 +1,58 @@ +RalphAskNumber1Text: + text "Don't young people" + line "fish anymore?" + + para "I've seen rare" + line "#MON while I've" + cont "been fishing…" + + para "You young people" + line "like that, right?" + + para "Want to trade" + line "phone numbers?" + + para "I'll let you know" + line "if I see anything." + done + +RalphAskNumber2Text: + text "Hm? So you do want" + line "me to phone if I" + cont "see rare #MON?" + done + +RalphNumberAcceptedText: + text "Yep, phone if I" + line "see rare #MON." + + para "Don't worry, I" + line "won't forget!" + done + +RalphNumberDeclinedText: + text "Oh…" + line "My own kids won't" + + para "even give me their" + line "phone numbers…" + + para "Is that how young" + line "people are today?" + done + +RalphPhoneFullText: + text "Your phone's" + line "memory is full." + + para "It seems that" + line "young people all" + cont "have #GEAR." + done + +RalphRematchText: + text "Hey, kid!" + + para "No losing for me" + line "this day!" + done diff --git a/data/phone/text/reena_callee.asm b/data/phone/text/reena_callee.asm new file mode 100644 index 0000000..e1a880b --- /dev/null +++ b/data/phone/text/reena_callee.asm @@ -0,0 +1,72 @@ +ReenaAnswerPhoneText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh. Hi, ." + line "What's up?" + done + +ReenaAnswerPhoneDayText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh, hi, ," + line "what's up?" + done + +ReenaAnswerPhoneNiteText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh, hi, ," + line "what's up?" + done + +ReenaGreetText: + text "You're slow! Hurry" + line "up and answer!" + + para "It's me, @" + text_ram wStringBuffer3 + text "!" + done + +ReenaGreetDayText: + text "You're slow! Hurry" + line "up and answer!" + + para "It's me, @" + text_ram wStringBuffer3 + text "!" + done + +ReenaGreetNiteText: + text "You're slow! Hurry" + line "up and answer!" + + para "It's me, @" + text_ram wStringBuffer3 + text "!" + done + +ReenaGenericText: + text "Hey, how are your" + line "#MON doing?" + + para "What? Great?" + line "I see…" + + para "What? My #MON?" + + para "Of course they're" + line "doing great! What" + + para "kind of a question" + line "is that?" + done diff --git a/data/phone/text/reena_caller.asm b/data/phone/text/reena_caller.asm new file mode 100644 index 0000000..59bb71c --- /dev/null +++ b/data/phone/text/reena_caller.asm @@ -0,0 +1,88 @@ +ReenaMonsIsAPerfectMatchText: + text "Listen, dear…" + + para "Do you recall my" + line "@" + text_ram wStringBuffer4 + text "?" + + para "Yes, exactly. That" + line "lovely @" + text_ram wStringBuffer4 + text "." + + para "Wouldn't you agree" + line "it's a perfect" + cont "match for me?" + done + +ReenaDefeatedMonText: + text "Have I ever faced" + line "a wild @" + text_ram wStringBuffer4 + text "?" + + para "You need to ask?" + + para "@" + text_ram wStringBuffer4 + text " I've" + line "beaten on numerous" + cont "occasions!" + done + +ReenaLostAMonText: + text "Have I ever failed" + line "to catch a wild" + cont "#MON?" + + para "You need to ask?" + + para "I would never fail" + line "to catch a wild" + + para "@" + text_ram wStringBuffer4 + text "…" + line "Oh! Never mind!" + done + +ReenaBattleRematchText: + text "We are going to" + line "battle!" + + para "The place shall be" + line "@" + text_ram wStringBuffer5 + text "!" + + para "Don't make me" + line "wait! Got it?" + done + +ReenaHangUpText: + text "Fine, you may go." + done + +ReenaForwardText: + text "Don't be too proud" + line "just because you" + + para "happened to beat" + line "me… " + + para "It was a fluke!" + done + +ReenaHurryText: + text "What are you" + line "doing?" + + para "I told you that" + line "the place was" + + para "@" + text_ram wStringBuffer5 + text "!" + line "Don't try to run!" + done diff --git a/data/phone/text/reena_overworld.asm b/data/phone/text/reena_overworld.asm new file mode 100644 index 0000000..04bf42c --- /dev/null +++ b/data/phone/text/reena_overworld.asm @@ -0,0 +1,45 @@ +ReenaAskNumber1Text: + text "Not bad…" + line "It's something to" + + para "beat me, even by" + line "an unlikely fluke…" + + para "I like you! Give" + line "me your number!" + + para "You can be my" + line "practice partner!" + done + +ReenaAskNumber2Text: + text "Give me your phone" + line "number!" + + para "You are going to" + line "be my practice" + cont "partner!" + done + +ReenaNumberAcceptedText: + text "Don't be too proud" + line "about beating me!" + + para "It was a fluke!" + done + +ReenaNumberDeclinedText: + text "I don't believe" + line "it! You're going" + cont "to regret this!" + done + +ReenaPhoneFullText: + text "What? Your phone" + line "list has no room!" + done + +ReenaRematchText: + text "What took you?" + line "Start right away!" + done diff --git a/data/phone/text/tiffany_callee.asm b/data/phone/text/tiffany_callee.asm new file mode 100644 index 0000000..3b6becf --- /dev/null +++ b/data/phone/text/tiffany_callee.asm @@ -0,0 +1,78 @@ +TiffanyAnswerPhoneText: + text "Yes? This is" + line "@" + text_ram wStringBuffer3 + text "." + + para "Oh, ." + line "Good morning." + done + +TiffanyAnswerPhoneDayText: + text "Yes? This is" + line "@" + text_ram wStringBuffer3 + text "." + + para "Oh, ." + line "Hello." + done + +TiffanyAnswerPhoneNiteText: + text "Yes? This is" + line "@" + text_ram wStringBuffer3 + text "." + + para "Oh, , good" + line "evening." + done + +TiffanyGreetText: + text "Is this ?" + + para "Good morning. This" + line "is @" + text_ram wStringBuffer3 + text "." + done + +TiffanyGreetDayText: + text "Is this ?" + + para "Hi, it's @" + text_ram wStringBuffer3 + text "." + done + +TiffanyGreetNiteText: + text "Is this ?" + + para "Good evening. This" + line "is @" + text_ram wStringBuffer3 + text "." + done + +TiffanyGenericText: + text "Are your #MON" + line "doing well?" + + para "I hope you take" + line "them to a #MON" + cont "CENTER every day." + + para "Don't push them" + line "too hard." + + para "My @" + text_ram wStringBuffer4 + text " is" + line "cute and lively" + + para "precisely because" + line "I take it to a" + + para "#MON CENTER" + line "every day." + done diff --git a/data/phone/text/tiffany_caller.asm b/data/phone/text/tiffany_caller.asm new file mode 100644 index 0000000..a10fe07 --- /dev/null +++ b/data/phone/text/tiffany_caller.asm @@ -0,0 +1,137 @@ +TiffanyMonIsAdorableText: + text "My @" + text_ram wStringBuffer4 + text "'s" + line "adorable, don't" + + para "you think so?" + line "I always sleep" + + para "with it--it's so" + line "fluffy and warm!" + done + +TiffanyDefeatedMonText: + text "Oh, and we had to" + line "battle a wild" + + para "@" + text_ram wStringBuffer4 + text " a while" + line "ago…" + + para "My CLEFAIRY came" + line "close to fainting!" + + para "Isn't that awful?" + + para "I hate those nasty" + line "@" + text_ram wStringBuffer4 + text "!" + done + +TiffanyLostAMonText: + text "Oh, and we had to" + line "battle a wild" + + para "@" + text_ram wStringBuffer4 + text " a while" + line "ago…" + + para "My CLEFAIRY got" + line "frightened, so we" + + para "ran away as fast" + line "as we could!" + + para "I just can't help" + line "feeling protective" + cont "of my CLEFAIRY." + done + +TiffanyBattleRematchText: + text "I know this might" + line "surprise you, but" + + para "would you like to" + line "battle?" + + para "I'll be waiting" + line "with CLEFAIRY on" + cont "@" + text_ram wStringBuffer5 + text "." + done + +TiffanyItsAwfulText: + text_ram wStringBuffer4 + text "!" + + para "It's awful." + line "My CLEFAIRY…" + + para "Huh? ?" + + para "Oh, sorry! I was" + line "in a hurry, and I…" + + para "I have to go!" + line "Bye-bye!" + done + +TiffanyHangUpText: + text "Bye-bye!" + done + +TiffanyFoundItemText: + text "I bought some PINK" + line "BOWS at GOLDENROD" + + para "DEPT.STORE for my" + line "CLEFAIRY." + + para "I got too many, so" + line "I'll give you one!" + + para "Come collect it on" + line "@" + text_ram wStringBuffer5 + text "." + done + +TiffanyNoItemText: + text "I love dressing up" + line "my CLEFAIRY!" + done + +TiffanyAsleepText: + text "What's wrong?" + line "Can't you visit?" + + para "CLEFAIRY got tired" + line "and fell asleep." + + para "I'm not sure if I" + line "can wake it up…" + + para "Please hurry to" + line "@" + text_ram wStringBuffer5 + text "!" + done + +TiffanyHurryText: + text "What's wrong?" + line "Can't you visit?" + + para "I'm sure this will" + line "look good on your" + cont "CLEFAIRY." + + para "Please hurry to" + line "@" + text_ram wStringBuffer5 + text "!" + done diff --git a/data/phone/text/tiffany_overworld.asm b/data/phone/text/tiffany_overworld.asm new file mode 100644 index 0000000..a03173d --- /dev/null +++ b/data/phone/text/tiffany_overworld.asm @@ -0,0 +1,62 @@ +TiffanyAskNumber1Text: + text "Hi! You like" + line "CLEFAIRY too?" + + para "They're so very" + line "cute, aren't they?" + + para "I think we can be" + line "good friends!" + + para "I want to know" + line "your phone number!" + + para "Let's talk about" + line "CLEFAIRY!" + done + +TiffanyAskNumber2Text: + text "I want to know" + line "your phone number!" + + para "Let's talk about" + line "CLEFAIRY!" + done + +TiffanyNumberAcceptedText: + text "Isn't my CLEFAIRY" + line "super-adorable?" + done + +TiffanyNumberDeclinedText: + text "Aww… Oh well." + line "Look for me if you" + + para "want to talk about" + line "CLEFAIRY." + done + +TiffanyPhoneFullText: + text "Oh? Your phone" + line "registry is full." + done + +TiffanyRematchText: + text "There you are!" + + para "CLEFAIRY, I want" + line "you to try hard!" + done + +TiffanyGiftText: + text "You took a long" + line "time. See this?" + + para "Isn't it cute?" + line "It's a PINK BOW." + done + +TiffanyPackFullText: + text "Uh-oh. Your PACK" + line "is crammed full." + done diff --git a/data/phone/text/todd_callee.asm b/data/phone/text/todd_callee.asm new file mode 100644 index 0000000..9ba4931 --- /dev/null +++ b/data/phone/text/todd_callee.asm @@ -0,0 +1,70 @@ +ToddAnswerPhoneText: + text "Yes? This is" + line "@" + text_ram wStringBuffer3 + text " speaking." + + para "Hey, !" + done + +ToddAnswerPhoneDayText: + text "Yes? This is" + line "@" + text_ram wStringBuffer3 + text " speaking." + + para "This must be" + line "." + done + +ToddAnswerPhoneNiteText: + text "Yes? This is" + line "@" + text_ram wStringBuffer3 + text " speaking." + + para "Ah, !" + done + +ToddGreetText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "." + + para ", right?" + done + +ToddGreetDayText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "." + + para ", what are" + line "you doing?" + done + +ToddGreetNiteText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "." + + para ", sorry to" + line "call you so late." + done + +ToddGenericText: + text "How do you raise" + line "your #MON?" + + para "I do all sorts" + line "of things, like" + + para "leaving them in" + line "DAY-CARE and" + + para "toughening them up" + line "with items." + done diff --git a/data/phone/text/todd_caller.asm b/data/phone/text/todd_caller.asm new file mode 100644 index 0000000..d713b8a --- /dev/null +++ b/data/phone/text/todd_caller.asm @@ -0,0 +1,117 @@ +ToddLooksCuteLikeMeText: + text "My @" + text_ram wStringBuffer4 + text " is" + line "looking more and" + + para "more like me. It's" + line "getting cuter!" + done + +ToddDefeatedMonText: + text "And, you know?" + + para "Now we can KO" + line "@" + text_ram wStringBuffer4 + text " easily." + + para "I should challenge" + line "the GOLDENROD GYM." + done + +ToddLostAMonText: + text "And, you know?" + line "We just failed to" + + para "beat @" + text_ram wStringBuffer4 + text " by" + line "a tiny margin." + + para "I'm guessing my" + line "#MON's levels" + + para "aren't high enough" + line "yet…" + done + +ToddBattleRematchText: + text "You must be a lot" + line "better now, huh?" + + para "How about showing" + line "me your technique" + + para "in a real battle" + line "with me?" + + para "I'll be waiting on" + line "@" + text_ram wStringBuffer5 + text "." + done + +ToddHangUpText: + text "See you later!" + done + +ToddDepartmentStoreBargainSaleText: + text "This is it--the" + line "one we've all been" + cont "waiting for!" + + para "GOLDENROD DEPT." + line "STORE's bargain" + cont "sale is on now!" + + para "Want it cheap?" + line "Want it lots?" + + para "Don't miss this" + line "GOLDENROD chance!" + + para "Huh? I sound like" + line "a huckster?" + + para "Well, yeah. I was" + line "mimicking them…" + + para "Anyway, you've got" + line "to get there as" + cont "soon as you can!" + done + +ToddSavingUpForBargainSaleText: + text "I'm saving up for" + line "the next bargain" + + para "sale. When's the" + line "next one?" + done + +ToddLookingForwardToBattleText: + text "Where are you?" + + para "Let's have our" + line "battle soon!" + + para "I'll be waiting on" + line "@" + text_ram wStringBuffer5 + text "." + done + +ToddHaveYouGoneToDepartmentStoreText: + text "Haven't you gone" + line "to GOLDENROD DEPT." + + para "STORE? I've scoped" + line "it out already!" + + para "They had some real" + line "bargains." + + para "You should get" + line "there quickly." + done diff --git a/data/phone/text/todd_overworld.asm b/data/phone/text/todd_overworld.asm new file mode 100644 index 0000000..11e34e9 --- /dev/null +++ b/data/phone/text/todd_overworld.asm @@ -0,0 +1,67 @@ +ToddAskNumber1Text: + text "From here, I can" + line "see GOLDENROD's" + + para "DEPT.STORE. They" + line "have bargain sales" + + para "up on the rooftop" + line "every so often." + + para "Could I get your" + line "phone number?" + + para "I'll call you when" + line "they have a sale." + done + +ToddAskNumber2Text: + text "If you give me" + line "your number, I'll" + + para "call you when they" + line "have a sale." + done + +ToddNumberAcceptedText: + text "I check GOLDENROD" + line "DEPT.STORE every" + + para "day, so I know" + line "when there's a" + cont "sale." + done + +ToddNumberDeclinedText: + text "Anyway…" + + para "If you're short on" + line "money, take down" + cont "my number." + + para "I'll call you when" + line "there's a sale." + done + +ToddPhoneFullText: + text "Your phone doesn't" + line "have enough memory" + cont "for more numbers." + done + +ToddRematchText: + text "I waited for you!" + line "I even cut back my" + + para "shopping to raise" + line "my #MON better!" + done + +ToddSaleText: ; unreferenced +; This is a duplicate of CamperToddSaleText in maps/Route34.asm. + text "Shopping under the" + line "sky!" + + para "It feels so nice" + line "up on a rooftop." + done diff --git a/data/phone/text/tully_callee.asm b/data/phone/text/tully_callee.asm new file mode 100644 index 0000000..92b3fb5 --- /dev/null +++ b/data/phone/text/tully_callee.asm @@ -0,0 +1,67 @@ +TullyAnswerPhoneText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "Oh, Good morning," + line "." + done + +TullyAnswerPhoneDayText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "That voice…" + line ", right?" + done + +TullyAnswerPhoneNiteText: + text "Hello, this is" + line "@" + text_ram wStringBuffer3 + text "…" + + para "This must be" + line "!" + done + +TullyGreetText: + text "Hello!" + line "@" + text_ram wStringBuffer3 + text " here…" + + para "Good morning! The" + line "weather's great!" + done + +TullyGreetDayText: + text "Hello!" + line "@" + text_ram wStringBuffer3 + text " here…" + + para "What a perfect day" + line "for fishing!" + done + +TullyGreetNiteText: + text "Hello!" + line "@" + text_ram wStringBuffer3 + text " here…" + + para "It's a great night" + line "for fishing!" + done + +TullyGenericText: + text "How's your trip" + line "coming along?" + + para "I can't complain" + line "about my fishing!" + done diff --git a/data/phone/text/tully_caller.asm b/data/phone/text/tully_caller.asm new file mode 100644 index 0000000..727c31a --- /dev/null +++ b/data/phone/text/tully_caller.asm @@ -0,0 +1,104 @@ +TullyMonHasGrownText: + text "My @" + text_ram wStringBuffer4 + text " has" + line "grown again." + + para "It was only about" + line "so big when I" + + para "caught it, but now" + line "it's way bigger." + done + +TullyDefeatedMonText: + text "Oh yeah, I KO'd a" + line "wild @" + text_ram wStringBuffer4 + text "." + + para "It was huge, like" + line "this big even." + + para "Heh, I guess you" + line "can't tell over" + cont "the phone…" + done + +TullyLostAMonText: + text "Oh yeah, I lost a" + line "wild @" + text_ram wStringBuffer4 + text "." + + para "It was huge, like" + line "this big even." + + para "Heh, I guess you" + line "can't tell over" + cont "the phone…" + done + +TullyBattleRematchText: + text "We should get a" + line "battle going!" + + para "I'll be fishing on" + line "@" + text_ram wStringBuffer5 + text "." + + para "Swing by if you" + line "have the time." + done + +TullyHangUpText: + text "Well, I'll be" + line "seeing you." + done + +TullyFoundItemText: + text "I picked up a good" + line "little thing at" + cont "the water's edge." + + para "Like I promised," + line "it's yours." + + para "I'll be waiting on" + line "@" + text_ram wStringBuffer5 + text "." + done + +TullyNoItemText: + text "Have I found" + line "anything good?" + + para "Nope, not yet." + + para "It's like fishing," + line "you need patience." + done + +TullyForwardText: + text "Yup, TULLY here…" + + para "? What?" + line "You're lost?" + + para "Our battle will be" + line "on @" + text_ram wStringBuffer5 + text "." + done + +TullyHurryText: + text "I've got something" + line "good for you." + + para "Hustle over to" + line "@" + text_ram wStringBuffer5 + text "." + done diff --git a/data/phone/text/tully_overworld.asm b/data/phone/text/tully_overworld.asm new file mode 100644 index 0000000..48d41ba --- /dev/null +++ b/data/phone/text/tully_overworld.asm @@ -0,0 +1,73 @@ +TullyAskNumber1Text: + text "Hey, you're trying" + line "to be the ultimate" + + para "trainer too? Then" + line "we're comrades!" + + para "If I find any more" + line "items by the" + + para "water, I'll give" + line "you some." + + para "Just give me your" + line "phone number." + done + +TullyAskNumber2Text: + text "If I find any more" + line "items by the" + + para "water, I'll give" + line "you some." + + para "Just give me your" + line "phone number." + done + +TullyNumberAcceptedText: + text "You'll be hearing" + line "from me if I find" + cont "something good." + done + +TullyNumberDeclinedText: + text "Is that so? Then" + line "I'll just have to" + cont "use them myself." + done + +TullyPhoneFullText: + text "Your phone list is" + line "all filled up." + + para "Come back if you" + line "make room for me." + done + +TullyRematchText: + text "I've been doing" + line "more than just" + + para "fishing since we" + line "last met." + + para "You're in for a" + line "big surprise!" + done + +TullyGiftText: + text "Hey, there you" + line "are!" + + para "Here's a gift, as" + line "promised!" + done + +TullyPackFullText: + text "Your PACK's full?" + + para "Come back later--" + line "that'll do it." + done diff --git a/data/phone/text/unknown_callee.asm b/data/phone/text/unknown_callee.asm new file mode 100644 index 0000000..02b2692 --- /dev/null +++ b/data/phone/text/unknown_callee.asm @@ -0,0 +1,30 @@ +UnknownGenericText: + text "How are your" + line "#MON doing?" + + para "My #MON are a" + line "bit too energetic." + + para "@" + text_ram wStringBuffer4 + text "," + line "especially." + + para "Every time it" + line "spots a trainer," + cont "it has to battle." + + para "It gets to be a" + line "bit much for me!" + done + +UnknownTougherThanEverText: + text "My @" + text_ram wStringBuffer4 + text "'s" + line "looking tougher" + cont "than ever." + + para "It looks even" + line "tougher than me!" + done diff --git a/data/phone/text/unused.asm b/data/phone/text/unused.asm new file mode 100644 index 0000000..cd1cf72 --- /dev/null +++ b/data/phone/text/unused.asm @@ -0,0 +1,3 @@ +UnusedPhoneText: + text "Good morning." + done diff --git a/data/phone/text/vance_callee.asm b/data/phone/text/vance_callee.asm new file mode 100644 index 0000000..0297e3a --- /dev/null +++ b/data/phone/text/vance_callee.asm @@ -0,0 +1,81 @@ +VanceAnswerPhoneText: + text "Yes, hello?" + line "@" + text_ram wStringBuffer3 + text " here!" + + para "Morning, !" + + para "Are you using bird" + line "#MON?" + done + +VanceAnswerPhoneDayText: + text "Yes, hello?" + line "@" + text_ram wStringBuffer3 + text " here!" + + para "Hi, !" + + para "Are your bird" + line "#MON flying?" + done + +VanceAnswerPhoneNiteText: + text "Yes, hello?" + line "@" + text_ram wStringBuffer3 + text " here!" + + para "Evening, !" + line "Are you letting" + + para "your bird #MON" + line "see some action?" + done + +VanceGreetText: + text "Good morning," + line "!" + + para "It's @" + text_ram wStringBuffer3 + text "!" + line "Good morning!" + done + +VanceGreetDayText: + text "Hi, !" + + para "It's @" + text_ram wStringBuffer3 + text "!" + line "Remember me?" + done + +VanceGreetNiteText: + text "Good evening," + line "!" + + para "It's @" + text_ram wStringBuffer3 + text "!" + line "Are you free now?" + done + +VanceGenericText: + text "Are you and your" + line "#MON fine?" + + para "My @" + text_ram wStringBuffer4 + text_start + line "looks like it will" + + para "get tough enough" + line "to face and beat" + + para "the legendary bird" + line "#MON!" + done diff --git a/data/phone/text/vance_caller.asm b/data/phone/text/vance_caller.asm new file mode 100644 index 0000000..bc08e4f --- /dev/null +++ b/data/phone/text/vance_caller.asm @@ -0,0 +1,64 @@ +VanceMonHasBecomeTougherText: + text "My @" + text_ram wStringBuffer4 + text "'s" + line "become tougher." + + para "We've achieved" + line "liftoff!" + done + +VanceDefeatedMonText: + text "We can easily beat" + line "@" + text_ram wStringBuffer4 + text "!" + + para "…Huh? You too?" + line "Isn't that great?" + done + +VanceLostAMonText: + text "But get this, a" + line "wild @" + text_ram wStringBuffer4 + text_start + para "just barely eluded" + line "us." + + para "I wanted to FLY" + line "after it…" + done + +VanceBattleRematchText: + text "Right now, I'm on" + line "@" + text_ram wStringBuffer5 + text "." + + para "You know, where I" + line "first met you?" + + para "Want to battle?" + line "I'll wait here." + done + +VanceHangUpText: + text "OK, bye for now!" + done + +VanceLookingForwardText: + text "I'll be looking" + line "forward to our" + cont "next battle!" + done + +VanceHurryHurryText: + text "Oh, !" + line "Hurry, hurry!" + + para "@" + text_ram wStringBuffer5 + text "!" + line "FLY over now!" + done diff --git a/data/phone/text/vance_overworld.asm b/data/phone/text/vance_overworld.asm new file mode 100644 index 0000000..b01907d --- /dev/null +++ b/data/phone/text/vance_overworld.asm @@ -0,0 +1,73 @@ +VanceAskNumber1Text: + text "You know, you are" + line "really strong." + + para "But I don't want" + line "to just slink off…" + + para "I know! Could I" + line "get your number?" + + para "Let's meet up for" + line "more battles!" + done + +VanceAskNumber2Text: + text "I want to battle" + line "tough trainers as" + cont "often as I can!" + + para "Could I get your" + line "number?" + + para "Let's meet up for" + line "more battles!" + done + +VanceNumberAcceptedText: + text "Don't forget to" + line "come see me when I" + cont "challenge you!" + done + +VanceNumberDeclinedText: + text "A bird-user friend" + line "isn't a bad thing" + cont "to have, I think…" + + para "Won't you" + line "reconsider?" + done + +VancePhoneFullText: + text "Your phone's out" + line "of memory. Delete" + cont "a number for me!" + done + +VanceRematchText: + text "Am I happy to see" + line "you! I won't lose!" + done + +VancePackFullText: + text "Oh, too bad. You" + line "don't have room." + + para "I'll give it to" + line "you next time!" + done + +VanceRematchGiftText: + text "You are really," + line "really strong!" + + para "Thanks for taking" + line "me on so often--I" + + para "learned a whole" + line "lot from you." + + para "I know! This will" + line "do as my thanks!" + done diff --git a/data/phone/text/wade_callee.asm b/data/phone/text/wade_callee.asm new file mode 100644 index 0000000..602db6f --- /dev/null +++ b/data/phone/text/wade_callee.asm @@ -0,0 +1,77 @@ +WadeAnswerPhoneText: + text "Hello? This is" + line "@" + text_ram wStringBuffer3 + text " speaking." + + para "Oh. Hi, !" + line "Good morning!" + done + +WadeAnswerPhoneDayText: + text "Hello? This is" + line "@" + text_ram wStringBuffer3 + text " speaking." + + para "Oh, hi, !" + done + +WadeAnswerPhoneNiteText: + text "Hello? This is" + line "@" + text_ram wStringBuffer3 + text " speaking." + + para "Oh, hi, !" + line "Good evening!" + done + +WadeGreetText: + text ", good" + line "morning!" + + para "It's me, @" + text_ram wStringBuffer3 + text "." + line "Isn't it nice out?" + done + +WadeGreetDayText: + text ", howdy!" + + para "It's me, @" + text_ram wStringBuffer3 + text "." + line "Isn't it nice out?" + done + +WadeGreetNiteText: + text "Good evening," + line "!" + + para "It's me, @" + text_ram wStringBuffer3 + text "." + line "Were you awake?" + done + +WadeGenericText: + text "How are your" + line "#MON doing?" + + para "My #MON have" + line "too much energy to" + + para "burn. It gets to" + line "be a problem." + + para "Of all my #MON," + line "@" + text_ram wStringBuffer4 + text " is the" + cont "hardest to handle." + + para "Working with it is" + line "exhausting." + done diff --git a/data/phone/text/wade_caller.asm b/data/phone/text/wade_caller.asm new file mode 100644 index 0000000..b00df64 --- /dev/null +++ b/data/phone/text/wade_caller.asm @@ -0,0 +1,136 @@ +WadeAreYourMonGrowingText: + text "Are your #MON" + line "growing?" + + para "My #MON are" + line "growing a bit too" + + para "quickly for me." + line "It's overwhelming!" + + para "@" + text_ram wStringBuffer4 + text "'s grow-" + line "ing especially" + + para "quickly. I think" + line "it'll get tough." + done + +WadeDefeatedMonText: + text "Oh yeah, we KO'd a" + line "wild @" + text_ram wStringBuffer4 + text_start + para "with one hit a" + line "while back." + + para "It went down so" + line "easily, I felt a" + + para "little sorry for" + line "the poor thing." + done + +WadeLostAMonText: + text "Oh yeah, a wild" + line "@" + text_ram wStringBuffer4 + text " got" + + para "away from me at" + line "the last second." + + para "I know it's a" + line "common #MON…" + + para "But it does annoy" + line "me that it got" + + para "away when I almost" + line "had it." + done + +WadeBattleRematchText: + text "Do you feel like a" + line "#MON battle?" + + para "It won't be like" + line "last time!" + + para "@" + text_ram wStringBuffer5 + text "'s" + line "where I'll be." + + para "Let me know when" + line "you get there." + done + +WadeHangUpText: + text "See you later!" + done + +WadeBugCatchingContestText: + text "The Bug-Catching" + line "Contest is at the" + + para "NATIONAL PARK" + line "today." + + para "Are you going," + line "?" + + para "I'm trying to make" + line "up my mind." + done + +WadeFoundItemText: + text "I found all kinds" + line "of BERRIES. If you" + + para "want, I'll share" + line "some with you." + + para "I'll be waiting on" + line "@" + text_ram wStringBuffer5 + text "." + done + +WadeNoBerriesText: + text "Huh? BERRIES?" + + para "Sorry, I haven't" + line "found any yet." + + para "I'll call you if I" + line "find any. Will you" + cont "please wait?" + done + +WadeQuickBattleText: + text "Let's battle" + line "already!" + + para "@" + text_ram wStringBuffer5 + text " is" + line "where I am." + + para "Please get here as" + line "soon as you can!" + done + +WadeComeQuickText: + text "How come you're" + line "not here yet?" + + para "@" + text_ram wStringBuffer5 + text " is" + line "where I am." + + para "Please get here as" + line "soon as you can!" + done diff --git a/data/phone/text/wade_overworld.asm b/data/phone/text/wade_overworld.asm new file mode 100644 index 0000000..7b0b960 --- /dev/null +++ b/data/phone/text/wade_overworld.asm @@ -0,0 +1,70 @@ +WadeAskNumber1Text: + text "You're awesome!" + line "I like you!" + + para "I look for #MON" + line "here every day." + + para "When I'm in the" + line "grass, I find all" + cont "kinds of BERRIES." + + para "If you'd like," + line "I'll share some." + + para "Could I get your" + line "phone number?" + done + +WadeAskNumber2Text: + text "When I'm in the" + line "grass, I find all" + cont "kinds of BERRIES." + + para "If you'd like," + line "I'll share some." + + para "Could I get your" + line "phone number?" + done + +WadeNumberAcceptedText: + text "You'll hear from" + line "me as soon as I" + + para "find anything that" + line "you might like." + done + +WadeNumberDeclinedText: + text "Oh well. Don't be" + line "shy if you want to" + cont "get my number." + done + +WadePhoneFullText: + text "Your phone list" + line "has no room for my" + cont "number." + done + +WadeRematchText: + text "I was waiting for" + line "you. Let's battle!" + done + +WadeGiftText: + text "Good to see you!" + line "See? This is what" + + para "I found." + line "It's for you!" + done + +WadePackFullText: + text "Oops, your PACK's" + line "full. Too bad." + + para "You should come" + line "back for it later." + done diff --git a/data/phone/text/wilton_callee.asm b/data/phone/text/wilton_callee.asm new file mode 100644 index 0000000..beed917 --- /dev/null +++ b/data/phone/text/wilton_callee.asm @@ -0,0 +1,64 @@ +WiltonAnswerPhoneText: + text "Hello, you have" + line "reached @" + text_ram wStringBuffer3 + text "…" + + para "Ah, ." + done + +WiltonAnswerPhoneDayText: + text "Hello, you have" + line "reached @" + text_ram wStringBuffer3 + text "…" + + para "Ah, , is" + line "it?" + done + +WiltonAnswerPhoneNiteText: + text "Hello, you have" + line "reached @" + text_ram wStringBuffer3 + text "…" + + para "Ah, if it isn't" + line "." + done + +WiltonGreetText: + text "Ah, it's @" + text_ram wStringBuffer3 + text "…" + + para "Have you got a" + line "moment?" + done + +WiltonGreetDayText: + text "Ah, it's @" + text_ram wStringBuffer3 + text "…" + + para "Can you talk now?" + done + +WiltonGreetNiteText: + text "Ah, it's @" + text_ram wStringBuffer3 + text "…" + + para "Sorry for calling" + line "so late." + done + +WiltonGenericText: + text "Have your #MON" + line "grown any?" + + para "My @" + text_ram wStringBuffer4 + text " has" + line "grown quite a bit." + done diff --git a/data/phone/text/wilton_caller.asm b/data/phone/text/wilton_caller.asm new file mode 100644 index 0000000..661e3f3 --- /dev/null +++ b/data/phone/text/wilton_caller.asm @@ -0,0 +1,103 @@ +WiltonMonHasGrownText: + text "My @" + text_ram wStringBuffer4 + text "'s" + line "grown impressive!" + + para "My fishing skills" + line "have improved too!" + done + +WiltonDefeatedMonText: + text "We beat a wild" + line "@" + text_ram wStringBuffer4 + text "…" + + para "You know, I have" + line "more fun fishing" + + para "than beating wild" + line "#MON." + done + +WiltonLostAMonText: + text "But a while back," + line "we came this close" + + para "to landing a wild" + line "@" + text_ram wStringBuffer4 + text "." + + para "I tell you, it was" + line "huge. Believe me." + done + +WiltonBattleRematchText: + text "I'm fishing on" + line "@" + text_ram wStringBuffer5 + text "," + + para "but nothing's" + line "biting today." + + para "Help me while my" + line "time away, come" + cont "over for a battle." + done + +WiltonHangUpText: + text "All right, later." + done + +WiltonFoundItemText: + text "I snagged an item" + line "while fishing." + + para "Come pick it up on" + line "@" + text_ram wStringBuffer5 + text "." + done + +WiltonHaventFoundAnythingText: + text "Nah, I haven't" + line "found anything" + + para "that's worth your" + line "time." + + para "You have to have" + line "patience." + done + +WiltonNotBitingText: + text "Sigh…" + line "They're not biting" + + para "like before on" + line "@" + text_ram wStringBuffer5 + text "…" + + para "You have to come" + line "for a battle!" + done + +WiltonWantThisText: + text "Don't you want" + line "this item?" + + para "Hah? You don't" + line "know where?" + + para "@" + text_ram wStringBuffer5 + text "…" + line "Just head from" + + para "MAHOGANY toward" + line "BLACKTHORN!" + done diff --git a/data/phone/text/wilton_overworld.asm b/data/phone/text/wilton_overworld.asm new file mode 100644 index 0000000..a6e43ff --- /dev/null +++ b/data/phone/text/wilton_overworld.asm @@ -0,0 +1,61 @@ +WiltonAskNumber1Text: + text "Eh, our battle was" + line "fun, I'd say…" + + para "When I'm fishing," + line "I sometimes snag" + + para "items that people" + line "have dropped." + + para "Do you want them?" + line "What's the number?" + done + +WiltonAskNumber2Text: + text "If I snag an item" + line "while I'm fishing," + + para "it's yours. What's" + line "your number?" + done + +WiltonNumberAcceptedText: + text "If I snag anything" + line "good, I'll be sure" + cont "to let you know." + done + +WiltonNumberDeclinedText: + text "All right… Come" + line "back if you have a" + cont "change of heart." + done + +WiltonPhoneFullText: + text "You can't register" + line "another number." + done + +WiltonRematchText: + text "Argh! You startled" + line "POLIWAG into" + cont "fleeing again!" + done + +WiltonGiftText: + text "So here you are." + + para "See this?" + line "I snagged it just" + + para "a little while" + line "ago. It's yours." + done + +WiltonPackFullText: + text "Your PACK's full?" + + para "I'll give it to" + line "you later." + done diff --git a/data/player_names.asm b/data/player_names.asm new file mode 100644 index 0000000..0faadf1 --- /dev/null +++ b/data/player_names.asm @@ -0,0 +1,37 @@ +ChrisNameMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 10, TEXTBOX_Y - 1 + dw .MaleNames + db 1 ; default option + db 0 ; ???? + +.MaleNames: + db STATICMENU_CURSOR | STATICMENU_PLACE_TITLE | STATICMENU_DISABLE_B ; flags + db 5 ; items + db "NEW NAME@" +MalePlayerNameArray: + db "CHRIS@" + db "MAT@" + db "ALLAN@" + db "JON@" + db 2 ; title indent + db " NAME @" ; title + +KrisNameMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 10, TEXTBOX_Y - 1 + dw .FemaleNames + db 1 ; default option + db 0 ; ???? + +.FemaleNames: + db STATICMENU_CURSOR | STATICMENU_PLACE_TITLE | STATICMENU_DISABLE_B ; flags + db 5 ; items + db "NEW NAME@" +FemalePlayerNameArray: + db "KRIS@" + db "AMANDA@" + db "JUANA@" + db "JODI@" + db 2 ; title indent + db " NAME @" ; title diff --git a/data/pokemon/base_stats.asm b/data/pokemon/base_stats.asm new file mode 100644 index 0000000..385ce3c --- /dev/null +++ b/data/pokemon/base_stats.asm @@ -0,0 +1,281 @@ +; used in data/pokemon/base_stats/*.asm +MACRO tmhm + ; initialize bytes to 0 + for n, (NUM_TM_HM_TUTOR + 7) / 8 + DEF _tm{d:n} = 0 + endr + ; set bits of bytes + rept _NARG + if DEF(\1_TMNUM) + DEF n = (\1_TMNUM - 1) / 8 + DEF i = (\1_TMNUM - 1) % 8 + DEF _tm{d:n} |= 1 << i + else + fail "\1 is not a TM, HM, or tutor move" + endc + shift + endr + ; output bytes + for n, (NUM_TM_HM_TUTOR + 7) / 8 + db _tm{d:n} + endr +ENDM + +BaseData:: + indirect_table BASE_DATA_SIZE, 1 + indirect_entries NUM_POKEMON, BaseData1 + indirect_table_end + +BaseData1: +INCLUDE "data/pokemon/base_stats/bulbasaur.asm" +INCLUDE "data/pokemon/base_stats/ivysaur.asm" +INCLUDE "data/pokemon/base_stats/venusaur.asm" +INCLUDE "data/pokemon/base_stats/charmander.asm" +INCLUDE "data/pokemon/base_stats/charmeleon.asm" +INCLUDE "data/pokemon/base_stats/charizard.asm" +INCLUDE "data/pokemon/base_stats/squirtle.asm" +INCLUDE "data/pokemon/base_stats/wartortle.asm" +INCLUDE "data/pokemon/base_stats/blastoise.asm" +INCLUDE "data/pokemon/base_stats/caterpie.asm" +INCLUDE "data/pokemon/base_stats/metapod.asm" +INCLUDE "data/pokemon/base_stats/butterfree.asm" +INCLUDE "data/pokemon/base_stats/weedle.asm" +INCLUDE "data/pokemon/base_stats/kakuna.asm" +INCLUDE "data/pokemon/base_stats/beedrill.asm" +INCLUDE "data/pokemon/base_stats/pidgey.asm" +INCLUDE "data/pokemon/base_stats/pidgeotto.asm" +INCLUDE "data/pokemon/base_stats/pidgeot.asm" +INCLUDE "data/pokemon/base_stats/rattata.asm" +INCLUDE "data/pokemon/base_stats/raticate.asm" +INCLUDE "data/pokemon/base_stats/spearow.asm" +INCLUDE "data/pokemon/base_stats/fearow.asm" +INCLUDE "data/pokemon/base_stats/ekans.asm" +INCLUDE "data/pokemon/base_stats/arbok.asm" +INCLUDE "data/pokemon/base_stats/pikachu.asm" +INCLUDE "data/pokemon/base_stats/raichu.asm" +INCLUDE "data/pokemon/base_stats/sandshrew.asm" +INCLUDE "data/pokemon/base_stats/sandslash.asm" +INCLUDE "data/pokemon/base_stats/nidoran_f.asm" +INCLUDE "data/pokemon/base_stats/nidorina.asm" +INCLUDE "data/pokemon/base_stats/nidoqueen.asm" +INCLUDE "data/pokemon/base_stats/nidoran_m.asm" +INCLUDE "data/pokemon/base_stats/nidorino.asm" +INCLUDE "data/pokemon/base_stats/nidoking.asm" +INCLUDE "data/pokemon/base_stats/clefairy.asm" +INCLUDE "data/pokemon/base_stats/clefable.asm" +INCLUDE "data/pokemon/base_stats/vulpix.asm" +INCLUDE "data/pokemon/base_stats/ninetales.asm" +INCLUDE "data/pokemon/base_stats/jigglypuff.asm" +INCLUDE "data/pokemon/base_stats/wigglytuff.asm" +INCLUDE "data/pokemon/base_stats/zubat.asm" +INCLUDE "data/pokemon/base_stats/golbat.asm" +INCLUDE "data/pokemon/base_stats/oddish.asm" +INCLUDE "data/pokemon/base_stats/gloom.asm" +INCLUDE "data/pokemon/base_stats/vileplume.asm" +INCLUDE "data/pokemon/base_stats/paras.asm" +INCLUDE "data/pokemon/base_stats/parasect.asm" +INCLUDE "data/pokemon/base_stats/venonat.asm" +INCLUDE "data/pokemon/base_stats/venomoth.asm" +INCLUDE "data/pokemon/base_stats/diglett.asm" +INCLUDE "data/pokemon/base_stats/dugtrio.asm" +INCLUDE "data/pokemon/base_stats/meowth.asm" +INCLUDE "data/pokemon/base_stats/persian.asm" +INCLUDE "data/pokemon/base_stats/psyduck.asm" +INCLUDE "data/pokemon/base_stats/golduck.asm" +INCLUDE "data/pokemon/base_stats/mankey.asm" +INCLUDE "data/pokemon/base_stats/primeape.asm" +INCLUDE "data/pokemon/base_stats/growlithe.asm" +INCLUDE "data/pokemon/base_stats/arcanine.asm" +INCLUDE "data/pokemon/base_stats/poliwag.asm" +INCLUDE "data/pokemon/base_stats/poliwhirl.asm" +INCLUDE "data/pokemon/base_stats/poliwrath.asm" +INCLUDE "data/pokemon/base_stats/abra.asm" +INCLUDE "data/pokemon/base_stats/kadabra.asm" +INCLUDE "data/pokemon/base_stats/alakazam.asm" +INCLUDE "data/pokemon/base_stats/machop.asm" +INCLUDE "data/pokemon/base_stats/machoke.asm" +INCLUDE "data/pokemon/base_stats/machamp.asm" +INCLUDE "data/pokemon/base_stats/bellsprout.asm" +INCLUDE "data/pokemon/base_stats/weepinbell.asm" +INCLUDE "data/pokemon/base_stats/victreebel.asm" +INCLUDE "data/pokemon/base_stats/tentacool.asm" +INCLUDE "data/pokemon/base_stats/tentacruel.asm" +INCLUDE "data/pokemon/base_stats/geodude.asm" +INCLUDE "data/pokemon/base_stats/graveler.asm" +INCLUDE "data/pokemon/base_stats/golem.asm" +INCLUDE "data/pokemon/base_stats/ponyta.asm" +INCLUDE "data/pokemon/base_stats/rapidash.asm" +INCLUDE "data/pokemon/base_stats/slowpoke.asm" +INCLUDE "data/pokemon/base_stats/slowbro.asm" +INCLUDE "data/pokemon/base_stats/magnemite.asm" +INCLUDE "data/pokemon/base_stats/magneton.asm" +INCLUDE "data/pokemon/base_stats/farfetch_d.asm" +INCLUDE "data/pokemon/base_stats/doduo.asm" +INCLUDE "data/pokemon/base_stats/dodrio.asm" +INCLUDE "data/pokemon/base_stats/seel.asm" +INCLUDE "data/pokemon/base_stats/dewgong.asm" +INCLUDE "data/pokemon/base_stats/grimer.asm" +INCLUDE "data/pokemon/base_stats/muk.asm" +INCLUDE "data/pokemon/base_stats/shellder.asm" +INCLUDE "data/pokemon/base_stats/cloyster.asm" +INCLUDE "data/pokemon/base_stats/gastly.asm" +INCLUDE "data/pokemon/base_stats/haunter.asm" +INCLUDE "data/pokemon/base_stats/gengar.asm" +INCLUDE "data/pokemon/base_stats/onix.asm" +INCLUDE "data/pokemon/base_stats/drowzee.asm" +INCLUDE "data/pokemon/base_stats/hypno.asm" +INCLUDE "data/pokemon/base_stats/krabby.asm" +INCLUDE "data/pokemon/base_stats/kingler.asm" +INCLUDE "data/pokemon/base_stats/voltorb.asm" +INCLUDE "data/pokemon/base_stats/electrode.asm" +INCLUDE "data/pokemon/base_stats/exeggcute.asm" +INCLUDE "data/pokemon/base_stats/exeggutor.asm" +INCLUDE "data/pokemon/base_stats/cubone.asm" +INCLUDE "data/pokemon/base_stats/marowak.asm" +INCLUDE "data/pokemon/base_stats/hitmonlee.asm" +INCLUDE "data/pokemon/base_stats/hitmonchan.asm" +INCLUDE "data/pokemon/base_stats/lickitung.asm" +INCLUDE "data/pokemon/base_stats/koffing.asm" +INCLUDE "data/pokemon/base_stats/weezing.asm" +INCLUDE "data/pokemon/base_stats/rhyhorn.asm" +INCLUDE "data/pokemon/base_stats/rhydon.asm" +INCLUDE "data/pokemon/base_stats/chansey.asm" +INCLUDE "data/pokemon/base_stats/tangela.asm" +INCLUDE "data/pokemon/base_stats/kangaskhan.asm" +INCLUDE "data/pokemon/base_stats/horsea.asm" +INCLUDE "data/pokemon/base_stats/seadra.asm" +INCLUDE "data/pokemon/base_stats/goldeen.asm" +INCLUDE "data/pokemon/base_stats/seaking.asm" +INCLUDE "data/pokemon/base_stats/staryu.asm" +INCLUDE "data/pokemon/base_stats/starmie.asm" +INCLUDE "data/pokemon/base_stats/mr__mime.asm" +INCLUDE "data/pokemon/base_stats/scyther.asm" +INCLUDE "data/pokemon/base_stats/jynx.asm" +INCLUDE "data/pokemon/base_stats/electabuzz.asm" +INCLUDE "data/pokemon/base_stats/magmar.asm" +INCLUDE "data/pokemon/base_stats/pinsir.asm" +INCLUDE "data/pokemon/base_stats/tauros.asm" +INCLUDE "data/pokemon/base_stats/magikarp.asm" +INCLUDE "data/pokemon/base_stats/gyarados.asm" +INCLUDE "data/pokemon/base_stats/lapras.asm" +INCLUDE "data/pokemon/base_stats/ditto.asm" +INCLUDE "data/pokemon/base_stats/eevee.asm" +INCLUDE "data/pokemon/base_stats/vaporeon.asm" +INCLUDE "data/pokemon/base_stats/jolteon.asm" +INCLUDE "data/pokemon/base_stats/flareon.asm" +INCLUDE "data/pokemon/base_stats/porygon.asm" +INCLUDE "data/pokemon/base_stats/omanyte.asm" +INCLUDE "data/pokemon/base_stats/omastar.asm" +INCLUDE "data/pokemon/base_stats/kabuto.asm" +INCLUDE "data/pokemon/base_stats/kabutops.asm" +INCLUDE "data/pokemon/base_stats/aerodactyl.asm" +INCLUDE "data/pokemon/base_stats/snorlax.asm" +INCLUDE "data/pokemon/base_stats/articuno.asm" +INCLUDE "data/pokemon/base_stats/zapdos.asm" +INCLUDE "data/pokemon/base_stats/moltres.asm" +INCLUDE "data/pokemon/base_stats/dratini.asm" +INCLUDE "data/pokemon/base_stats/dragonair.asm" +INCLUDE "data/pokemon/base_stats/dragonite.asm" +INCLUDE "data/pokemon/base_stats/mewtwo.asm" +INCLUDE "data/pokemon/base_stats/mew.asm" +INCLUDE "data/pokemon/base_stats/chikorita.asm" +INCLUDE "data/pokemon/base_stats/bayleef.asm" +INCLUDE "data/pokemon/base_stats/meganium.asm" +INCLUDE "data/pokemon/base_stats/cyndaquil.asm" +INCLUDE "data/pokemon/base_stats/quilava.asm" +INCLUDE "data/pokemon/base_stats/typhlosion.asm" +INCLUDE "data/pokemon/base_stats/totodile.asm" +INCLUDE "data/pokemon/base_stats/croconaw.asm" +INCLUDE "data/pokemon/base_stats/feraligatr.asm" +INCLUDE "data/pokemon/base_stats/sentret.asm" +INCLUDE "data/pokemon/base_stats/furret.asm" +INCLUDE "data/pokemon/base_stats/hoothoot.asm" +INCLUDE "data/pokemon/base_stats/noctowl.asm" +INCLUDE "data/pokemon/base_stats/ledyba.asm" +INCLUDE "data/pokemon/base_stats/ledian.asm" +INCLUDE "data/pokemon/base_stats/spinarak.asm" +INCLUDE "data/pokemon/base_stats/ariados.asm" +INCLUDE "data/pokemon/base_stats/crobat.asm" +INCLUDE "data/pokemon/base_stats/chinchou.asm" +INCLUDE "data/pokemon/base_stats/lanturn.asm" +INCLUDE "data/pokemon/base_stats/pichu.asm" +INCLUDE "data/pokemon/base_stats/cleffa.asm" +INCLUDE "data/pokemon/base_stats/igglybuff.asm" +INCLUDE "data/pokemon/base_stats/togepi.asm" +INCLUDE "data/pokemon/base_stats/togetic.asm" +INCLUDE "data/pokemon/base_stats/natu.asm" +INCLUDE "data/pokemon/base_stats/xatu.asm" +INCLUDE "data/pokemon/base_stats/mareep.asm" +INCLUDE "data/pokemon/base_stats/flaaffy.asm" +INCLUDE "data/pokemon/base_stats/ampharos.asm" +INCLUDE "data/pokemon/base_stats/bellossom.asm" +INCLUDE "data/pokemon/base_stats/marill.asm" +INCLUDE "data/pokemon/base_stats/azumarill.asm" +INCLUDE "data/pokemon/base_stats/sudowoodo.asm" +INCLUDE "data/pokemon/base_stats/politoed.asm" +INCLUDE "data/pokemon/base_stats/hoppip.asm" +INCLUDE "data/pokemon/base_stats/skiploom.asm" +INCLUDE "data/pokemon/base_stats/jumpluff.asm" +INCLUDE "data/pokemon/base_stats/aipom.asm" +INCLUDE "data/pokemon/base_stats/sunkern.asm" +INCLUDE "data/pokemon/base_stats/sunflora.asm" +INCLUDE "data/pokemon/base_stats/yanma.asm" +INCLUDE "data/pokemon/base_stats/wooper.asm" +INCLUDE "data/pokemon/base_stats/quagsire.asm" +INCLUDE "data/pokemon/base_stats/espeon.asm" +INCLUDE "data/pokemon/base_stats/umbreon.asm" +INCLUDE "data/pokemon/base_stats/murkrow.asm" +INCLUDE "data/pokemon/base_stats/slowking.asm" +INCLUDE "data/pokemon/base_stats/misdreavus.asm" +INCLUDE "data/pokemon/base_stats/unown.asm" +INCLUDE "data/pokemon/base_stats/wobbuffet.asm" +INCLUDE "data/pokemon/base_stats/girafarig.asm" +INCLUDE "data/pokemon/base_stats/pineco.asm" +INCLUDE "data/pokemon/base_stats/forretress.asm" +INCLUDE "data/pokemon/base_stats/dunsparce.asm" +INCLUDE "data/pokemon/base_stats/gligar.asm" +INCLUDE "data/pokemon/base_stats/steelix.asm" +INCLUDE "data/pokemon/base_stats/snubbull.asm" +INCLUDE "data/pokemon/base_stats/granbull.asm" +INCLUDE "data/pokemon/base_stats/qwilfish.asm" +INCLUDE "data/pokemon/base_stats/scizor.asm" +INCLUDE "data/pokemon/base_stats/shuckle.asm" +INCLUDE "data/pokemon/base_stats/heracross.asm" +INCLUDE "data/pokemon/base_stats/sneasel.asm" +INCLUDE "data/pokemon/base_stats/teddiursa.asm" +INCLUDE "data/pokemon/base_stats/ursaring.asm" +INCLUDE "data/pokemon/base_stats/slugma.asm" +INCLUDE "data/pokemon/base_stats/magcargo.asm" +INCLUDE "data/pokemon/base_stats/swinub.asm" +INCLUDE "data/pokemon/base_stats/piloswine.asm" +INCLUDE "data/pokemon/base_stats/corsola.asm" +INCLUDE "data/pokemon/base_stats/remoraid.asm" +INCLUDE "data/pokemon/base_stats/octillery.asm" +INCLUDE "data/pokemon/base_stats/delibird.asm" +INCLUDE "data/pokemon/base_stats/mantine.asm" +INCLUDE "data/pokemon/base_stats/skarmory.asm" +INCLUDE "data/pokemon/base_stats/houndour.asm" +INCLUDE "data/pokemon/base_stats/houndoom.asm" +INCLUDE "data/pokemon/base_stats/kingdra.asm" +INCLUDE "data/pokemon/base_stats/phanpy.asm" +INCLUDE "data/pokemon/base_stats/donphan.asm" +INCLUDE "data/pokemon/base_stats/porygon2.asm" +INCLUDE "data/pokemon/base_stats/stantler.asm" +INCLUDE "data/pokemon/base_stats/smeargle.asm" +INCLUDE "data/pokemon/base_stats/tyrogue.asm" +INCLUDE "data/pokemon/base_stats/hitmontop.asm" +INCLUDE "data/pokemon/base_stats/smoochum.asm" +INCLUDE "data/pokemon/base_stats/elekid.asm" +INCLUDE "data/pokemon/base_stats/magby.asm" +INCLUDE "data/pokemon/base_stats/miltank.asm" +INCLUDE "data/pokemon/base_stats/blissey.asm" +INCLUDE "data/pokemon/base_stats/raikou.asm" +INCLUDE "data/pokemon/base_stats/entei.asm" +INCLUDE "data/pokemon/base_stats/suicune.asm" +INCLUDE "data/pokemon/base_stats/larvitar.asm" +INCLUDE "data/pokemon/base_stats/pupitar.asm" +INCLUDE "data/pokemon/base_stats/tyranitar.asm" +INCLUDE "data/pokemon/base_stats/lugia.asm" +INCLUDE "data/pokemon/base_stats/ho_oh.asm" +INCLUDE "data/pokemon/base_stats/celebi.asm" +.IndirectEnd:: diff --git a/data/pokemon/base_stats/abra.asm b/data/pokemon/base_stats/abra.asm new file mode 100644 index 0000000..bfd9d31 --- /dev/null +++ b/data/pokemon/base_stats/abra.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 25, 20, 15, 90, 105, 55 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, PSYCHIC_TYPE ; type + db 200 ; catch rate + db 73 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F25 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/abra/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, FLASH + ; end diff --git a/data/pokemon/base_stats/aerodactyl.asm b/data/pokemon/base_stats/aerodactyl.asm new file mode 100644 index 0000000..2c0ee8a --- /dev/null +++ b/data/pokemon/base_stats/aerodactyl.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 80, 105, 65, 130, 60, 75 + ; hp atk def spd sat sdf + + db ROCK, FLYING ; type + db 45 ; catch rate + db 202 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 35 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/aerodactyl/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, EARTHQUAKE, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DETECT, REST, ATTRACT, STEEL_WING, FLY, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/aipom.asm b/data/pokemon/base_stats/aipom.asm new file mode 100644 index 0000000..a0819df --- /dev/null +++ b/data/pokemon/base_stats/aipom.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 70, 55, 85, 40, 55 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 45 ; catch rate + db 94 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/aipom/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, NIGHTMARE, CUT, STRENGTH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/alakazam.asm b/data/pokemon/base_stats/alakazam.asm new file mode 100644 index 0000000..90f5c15 --- /dev/null +++ b/data/pokemon/base_stats/alakazam.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 50, 45, 120, 135, 85 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, PSYCHIC_TYPE ; type + db 50 ; catch rate + db 186 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F25 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/alakazam/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DIG, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, FLASH + ; end diff --git a/data/pokemon/base_stats/ampharos.asm b/data/pokemon/base_stats/ampharos.asm new file mode 100644 index 0000000..9bda637 --- /dev/null +++ b/data/pokemon/base_stats/ampharos.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 75, 75, 55, 115, 90 + ; hp atk def spd sat sdf + + db ELECTRIC, ELECTRIC ; type + db 45 ; catch rate + db 194 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/ampharos/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, STRENGTH, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/arbok.asm b/data/pokemon/base_stats/arbok.asm new file mode 100644 index 0000000..dfecfc6 --- /dev/null +++ b/data/pokemon/base_stats/arbok.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 85, 69, 80, 65, 79 + ; hp atk def spd sat sdf + + db POISON, POISON ; type + db 90 ; catch rate + db 147 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/arbok/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, STRENGTH + ; end diff --git a/data/pokemon/base_stats/arcanine.asm b/data/pokemon/base_stats/arcanine.asm new file mode 100644 index 0000000..e196f45 --- /dev/null +++ b/data/pokemon/base_stats/arcanine.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 110, 80, 95, 100, 80 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 75 ; catch rate + db 213 ; base exp + db BURNT_BERRY, BURNT_BERRY ; items + db GENDER_F25 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/arcanine/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/ariados.asm b/data/pokemon/base_stats/ariados.asm new file mode 100644 index 0000000..7097f27 --- /dev/null +++ b/data/pokemon/base_stats/ariados.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 90, 70, 40, 60, 60 + ; hp atk def spd sat sdf + + db BUG, POISON ; type + db 90 ; catch rate + db 134 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/ariados/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, FLASH + ; end diff --git a/data/pokemon/base_stats/articuno.asm b/data/pokemon/base_stats/articuno.asm new file mode 100644 index 0000000..c561ed8 --- /dev/null +++ b/data/pokemon/base_stats/articuno.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 85, 100, 85, 95, 125 + ; hp atk def spd sat sdf + + db ICE, FLYING ; type + db 3 ; catch rate + db 215 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 80 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/articuno/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, STEEL_WING, FLY, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/azumarill.asm b/data/pokemon/base_stats/azumarill.asm new file mode 100644 index 0000000..9f66d18 --- /dev/null +++ b/data/pokemon/base_stats/azumarill.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 100, 50, 80, 50, 50, 80 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 75 ; catch rate + db 153 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/azumarill/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_WATER_1, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/bayleef.asm b/data/pokemon/base_stats/bayleef.asm new file mode 100644 index 0000000..ee7b2a1 --- /dev/null +++ b/data/pokemon/base_stats/bayleef.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 62, 80, 60, 63, 80 + ; hp atk def spd sat sdf + + db GRASS, GRASS ; type + db 45 ; catch rate + db 141 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/bayleef/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, STRENGTH, FLASH + ; end diff --git a/data/pokemon/base_stats/beedrill.asm b/data/pokemon/base_stats/beedrill.asm new file mode 100644 index 0000000..0151d55 --- /dev/null +++ b/data/pokemon/base_stats/beedrill.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 80, 40, 75, 45, 80 + ; hp atk def spd sat sdf + + db BUG, POISON ; type + db 45 ; catch rate + db 159 ; base exp + db NO_ITEM, POISON_BARB ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/beedrill/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, REST, ATTRACT, FURY_CUTTER, CUT + ; end diff --git a/data/pokemon/base_stats/bellossom.asm b/data/pokemon/base_stats/bellossom.asm new file mode 100644 index 0000000..4e3cbe1 --- /dev/null +++ b/data/pokemon/base_stats/bellossom.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 80, 85, 50, 90, 100 + ; hp atk def spd sat sdf + + db GRASS, GRASS ; type + db 45 ; catch rate + db 184 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/bellossom/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_PLANT, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/bellsprout.asm b/data/pokemon/base_stats/bellsprout.asm new file mode 100644 index 0000000..e23b5fd --- /dev/null +++ b/data/pokemon/base_stats/bellsprout.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 75, 35, 40, 70, 30 + ; hp atk def spd sat sdf + + db GRASS, POISON ; type + db 255 ; catch rate + db 84 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/bellsprout/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_PLANT, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/blastoise.asm b/data/pokemon/base_stats/blastoise.asm new file mode 100644 index 0000000..09a8c8c --- /dev/null +++ b/data/pokemon/base_stats/blastoise.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 79, 83, 100, 78, 85, 105 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 45 ; catch rate + db 210 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/blastoise/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/blissey.asm b/data/pokemon/base_stats/blissey.asm new file mode 100644 index 0000000..1d2029e --- /dev/null +++ b/data/pokemon/base_stats/blissey.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 255, 10, 10, 55, 75, 135 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 30 ; catch rate + db 255 ; base exp + db NO_ITEM, LUCKY_EGG ; items + db GENDER_F100 ; gender ratio + db 100 ; unknown 1 + db 40 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/blissey/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_FAIRY, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/bulbasaur.asm b/data/pokemon/base_stats/bulbasaur.asm new file mode 100644 index 0000000..a65d635 --- /dev/null +++ b/data/pokemon/base_stats/bulbasaur.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 45, 49, 49, 45, 65, 65 + ; hp atk def spd sat sdf + + db GRASS, POISON ; type + db 45 ; catch rate + db 64 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/bulbasaur/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FURY_CUTTER, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/butterfree.asm b/data/pokemon/base_stats/butterfree.asm new file mode 100644 index 0000000..1e3b926 --- /dev/null +++ b/data/pokemon/base_stats/butterfree.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 45, 50, 70, 80, 80 + ; hp atk def spd sat sdf + + db BUG, FLYING ; type + db 45 ; catch rate + db 160 ; base exp + db NO_ITEM, SILVERPOWDER ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/butterfree/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, NIGHTMARE, FLASH + ; end diff --git a/data/pokemon/base_stats/caterpie.asm b/data/pokemon/base_stats/caterpie.asm new file mode 100644 index 0000000..edb5b57 --- /dev/null +++ b/data/pokemon/base_stats/caterpie.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 45, 30, 35, 45, 20, 20 + ; hp atk def spd sat sdf + + db BUG, BUG ; type + db 255 ; catch rate + db 53 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/caterpie/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm + ; end diff --git a/data/pokemon/base_stats/celebi.asm b/data/pokemon/base_stats/celebi.asm new file mode 100644 index 0000000..7e68c0d --- /dev/null +++ b/data/pokemon/base_stats/celebi.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 100, 100, 100, 100, 100, 100 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, GRASS ; type + db 45 ; catch rate + db 64 ; base exp + db NO_ITEM, MIRACLEBERRY ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 120 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/celebi/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, NIGHTMARE, FLASH + ; end diff --git a/data/pokemon/base_stats/chansey.asm b/data/pokemon/base_stats/chansey.asm new file mode 100644 index 0000000..65762d9 --- /dev/null +++ b/data/pokemon/base_stats/chansey.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 250, 05, 05, 50, 35, 105 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 30 ; catch rate + db 255 ; base exp + db NO_ITEM, LUCKY_EGG ; items + db GENDER_F100 ; gender ratio + db 100 ; unknown 1 + db 40 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/chansey/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_FAIRY, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/charizard.asm b/data/pokemon/base_stats/charizard.asm new file mode 100644 index 0000000..0539647 --- /dev/null +++ b/data/pokemon/base_stats/charizard.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 78, 84, 78, 100, 109, 85 + ; hp atk def spd sat sdf + + db FIRE, FLYING ; type + db 45 ; catch rate + db 209 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/charizard/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DEFENSE_CURL, REST, ATTRACT, STEEL_WING, FIRE_PUNCH, FURY_CUTTER, CUT, FLY, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/charmander.asm b/data/pokemon/base_stats/charmander.asm new file mode 100644 index 0000000..6bc1dae --- /dev/null +++ b/data/pokemon/base_stats/charmander.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 39, 52, 43, 65, 60, 50 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 45 ; catch rate + db 65 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/charmander/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/charmeleon.asm b/data/pokemon/base_stats/charmeleon.asm new file mode 100644 index 0000000..5d07e7f --- /dev/null +++ b/data/pokemon/base_stats/charmeleon.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 58, 64, 58, 80, 80, 65 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 45 ; catch rate + db 142 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/charmeleon/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/chikorita.asm b/data/pokemon/base_stats/chikorita.asm new file mode 100644 index 0000000..9d2d899 --- /dev/null +++ b/data/pokemon/base_stats/chikorita.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 45, 49, 65, 45, 49, 65 + ; hp atk def spd sat sdf + + db GRASS, GRASS ; type + db 45 ; catch rate + db 64 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/chikorita/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/chinchou.asm b/data/pokemon/base_stats/chinchou.asm new file mode 100644 index 0000000..68a0995 --- /dev/null +++ b/data/pokemon/base_stats/chinchou.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 38, 38, 67, 56, 56 + ; hp atk def spd sat sdf + + db WATER, ELECTRIC ; type + db 190 ; catch rate + db 90 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/chinchou/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_2, EGG_WATER_2 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, SURF, FLASH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/clefable.asm b/data/pokemon/base_stats/clefable.asm new file mode 100644 index 0000000..d149301 --- /dev/null +++ b/data/pokemon/base_stats/clefable.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 95, 70, 73, 60, 85, 90 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 25 ; catch rate + db 129 ; base exp + db MYSTERYBERRY, MOON_STONE ; items + db GENDER_F75 ; gender ratio + db 100 ; unknown 1 + db 10 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/clefable/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_FAIRY, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/clefairy.asm b/data/pokemon/base_stats/clefairy.asm new file mode 100644 index 0000000..4efbc5b --- /dev/null +++ b/data/pokemon/base_stats/clefairy.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 45, 48, 35, 60, 65 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 150 ; catch rate + db 68 ; base exp + db MYSTERYBERRY, MOON_STONE ; items + db GENDER_F75 ; gender ratio + db 100 ; unknown 1 + db 10 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/clefairy/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_FAIRY, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/cleffa.asm b/data/pokemon/base_stats/cleffa.asm new file mode 100644 index 0000000..909001f --- /dev/null +++ b/data/pokemon/base_stats/cleffa.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 25, 28, 15, 45, 55 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 150 ; catch rate + db 37 ; base exp + db MYSTERYBERRY, MOON_STONE ; items + db GENDER_F75 ; gender ratio + db 100 ; unknown 1 + db 10 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/cleffa/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, NIGHTMARE, FLASH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/cloyster.asm b/data/pokemon/base_stats/cloyster.asm new file mode 100644 index 0000000..7692afa --- /dev/null +++ b/data/pokemon/base_stats/cloyster.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 95, 180, 70, 85, 45 + ; hp atk def spd sat sdf + + db WATER, ICE ; type + db 60 ; catch rate + db 203 ; base exp + db PEARL, BIG_PEARL ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/cloyster/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_3, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/corsola.asm b/data/pokemon/base_stats/corsola.asm new file mode 100644 index 0000000..89c4206 --- /dev/null +++ b/data/pokemon/base_stats/corsola.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 55, 85, 35, 65, 85 + ; hp atk def spd sat sdf + + db WATER, ROCK ; type + db 60 ; catch rate + db 113 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F75 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/corsola/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_WATER_1, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/crobat.asm b/data/pokemon/base_stats/crobat.asm new file mode 100644 index 0000000..bfc3bba --- /dev/null +++ b/data/pokemon/base_stats/crobat.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 85, 90, 80, 130, 70, 80 + ; hp atk def spd sat sdf + + db POISON, FLYING ; type + db 90 ; catch rate + db 204 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/crobat/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY + ; end diff --git a/data/pokemon/base_stats/croconaw.asm b/data/pokemon/base_stats/croconaw.asm new file mode 100644 index 0000000..53c2881 --- /dev/null +++ b/data/pokemon/base_stats/croconaw.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 80, 80, 58, 59, 63 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 45 ; catch rate + db 143 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/croconaw/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/cubone.asm b/data/pokemon/base_stats/cubone.asm new file mode 100644 index 0000000..b89e333 --- /dev/null +++ b/data/pokemon/base_stats/cubone.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 50, 95, 35, 40, 50 + ; hp atk def spd sat sdf + + db GROUND, GROUND ; type + db 190 ; catch rate + db 87 ; base exp + db NO_ITEM, THICK_CLUB ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/cubone/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MONSTER, EGG_MONSTER ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/cyndaquil.asm b/data/pokemon/base_stats/cyndaquil.asm new file mode 100644 index 0000000..50322d3 --- /dev/null +++ b/data/pokemon/base_stats/cyndaquil.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 39, 52, 43, 65, 60, 50 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 45 ; catch rate + db 65 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/cyndaquil/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, CUT, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/delibird.asm b/data/pokemon/base_stats/delibird.asm new file mode 100644 index 0000000..02c4b1a --- /dev/null +++ b/data/pokemon/base_stats/delibird.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 45, 55, 45, 75, 65, 45 + ; hp atk def spd sat sdf + + db ICE, FLYING ; type + db 45 ; catch rate + db 183 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/delibird/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_WATER_1, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, FLY, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/dewgong.asm b/data/pokemon/base_stats/dewgong.asm new file mode 100644 index 0000000..ba8aaa6 --- /dev/null +++ b/data/pokemon/base_stats/dewgong.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 70, 80, 70, 70, 95 + ; hp atk def spd sat sdf + + db WATER, ICE ; type + db 75 ; catch rate + db 176 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/dewgong/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/diglett.asm b/data/pokemon/base_stats/diglett.asm new file mode 100644 index 0000000..e29dd05 --- /dev/null +++ b/data/pokemon/base_stats/diglett.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 10, 55, 25, 95, 35, 45 + ; hp atk def spd sat sdf + + db GROUND, GROUND ; type + db 255 ; catch rate + db 81 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/diglett/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, CUT + ; end diff --git a/data/pokemon/base_stats/ditto.asm b/data/pokemon/base_stats/ditto.asm new file mode 100644 index 0000000..9744613 --- /dev/null +++ b/data/pokemon/base_stats/ditto.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 48, 48, 48, 48, 48, 48 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 35 ; catch rate + db 61 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/ditto/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_DITTO, EGG_DITTO ; egg groups + + ; tm/hm learnset + tmhm + ; end diff --git a/data/pokemon/base_stats/dodrio.asm b/data/pokemon/base_stats/dodrio.asm new file mode 100644 index 0000000..81c79fb --- /dev/null +++ b/data/pokemon/base_stats/dodrio.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 110, 70, 100, 60, 60 + ; hp atk def spd sat sdf + + db NORMAL, FLYING ; type + db 45 ; catch rate + db 158 ; base exp + db NO_ITEM, SHARP_BEAK ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/dodrio/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, THIEF, STEEL_WING, FLY + ; end diff --git a/data/pokemon/base_stats/doduo.asm b/data/pokemon/base_stats/doduo.asm new file mode 100644 index 0000000..d37bdac --- /dev/null +++ b/data/pokemon/base_stats/doduo.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 35, 85, 45, 75, 35, 35 + ; hp atk def spd sat sdf + + db NORMAL, FLYING ; type + db 190 ; catch rate + db 96 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/doduo/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, THIEF, STEEL_WING, FLY + ; end diff --git a/data/pokemon/base_stats/donphan.asm b/data/pokemon/base_stats/donphan.asm new file mode 100644 index 0000000..a58e6ec --- /dev/null +++ b/data/pokemon/base_stats/donphan.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 120, 120, 50, 60, 60 + ; hp atk def spd sat sdf + + db GROUND, GROUND ; type + db 60 ; catch rate + db 189 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/donphan/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/dragonair.asm b/data/pokemon/base_stats/dragonair.asm new file mode 100644 index 0000000..9265c25 --- /dev/null +++ b/data/pokemon/base_stats/dragonair.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 61, 84, 65, 70, 70, 70 + ; hp atk def spd sat sdf + + db DRAGON, DRAGON ; type + db 45 ; catch rate + db 144 ; base exp + db NO_ITEM, DRAGON_SCALE ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 40 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/dragonair/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_1, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DETECT, REST, ATTRACT, SURF, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/dragonite.asm b/data/pokemon/base_stats/dragonite.asm new file mode 100644 index 0000000..045ab14 --- /dev/null +++ b/data/pokemon/base_stats/dragonite.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 91, 134, 95, 80, 100, 100 + ; hp atk def spd sat sdf + + db DRAGON, FLYING ; type + db 45 ; catch rate + db 218 ; base exp + db NO_ITEM, DRAGON_SCALE ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 40 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/dragonite/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_1, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, STEEL_WING, FIRE_PUNCH, FURY_CUTTER, FLY, SURF, STRENGTH, WHIRLPOOL, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/dratini.asm b/data/pokemon/base_stats/dratini.asm new file mode 100644 index 0000000..26f7538 --- /dev/null +++ b/data/pokemon/base_stats/dratini.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 41, 64, 45, 50, 50, 50 + ; hp atk def spd sat sdf + + db DRAGON, DRAGON ; type + db 45 ; catch rate + db 67 ; base exp + db NO_ITEM, DRAGON_SCALE ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 40 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/dratini/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_1, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DETECT, REST, ATTRACT, SURF, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/drowzee.asm b/data/pokemon/base_stats/drowzee.asm new file mode 100644 index 0000000..3ec379a --- /dev/null +++ b/data/pokemon/base_stats/drowzee.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 48, 45, 42, 43, 90 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, PSYCHIC_TYPE ; type + db 190 ; catch rate + db 102 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/drowzee/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, FLASH + ; end diff --git a/data/pokemon/base_stats/dugtrio.asm b/data/pokemon/base_stats/dugtrio.asm new file mode 100644 index 0000000..52d25d1 --- /dev/null +++ b/data/pokemon/base_stats/dugtrio.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 35, 80, 50, 120, 50, 70 + ; hp atk def spd sat sdf + + db GROUND, GROUND ; type + db 50 ; catch rate + db 153 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/dugtrio/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, CUT + ; end diff --git a/data/pokemon/base_stats/dunsparce.asm b/data/pokemon/base_stats/dunsparce.asm new file mode 100644 index 0000000..2d2f5df --- /dev/null +++ b/data/pokemon/base_stats/dunsparce.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 100, 70, 70, 45, 65, 65 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 190 ; catch rate + db 75 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/dunsparce/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, FLAMETHROWER, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/eevee.asm b/data/pokemon/base_stats/eevee.asm new file mode 100644 index 0000000..6eadc63 --- /dev/null +++ b/data/pokemon/base_stats/eevee.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 55, 50, 55, 45, 65 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 45 ; catch rate + db 92 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 35 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/eevee/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT + ; end diff --git a/data/pokemon/base_stats/ekans.asm b/data/pokemon/base_stats/ekans.asm new file mode 100644 index 0000000..49ae448 --- /dev/null +++ b/data/pokemon/base_stats/ekans.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 35, 60, 44, 55, 40, 54 + ; hp atk def spd sat sdf + + db POISON, POISON ; type + db 255 ; catch rate + db 62 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/ekans/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, STRENGTH + ; end diff --git a/data/pokemon/base_stats/electabuzz.asm b/data/pokemon/base_stats/electabuzz.asm new file mode 100644 index 0000000..f9afcce --- /dev/null +++ b/data/pokemon/base_stats/electabuzz.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 83, 57, 105, 95, 85 + ; hp atk def spd sat sdf + + db ELECTRIC, ELECTRIC ; type + db 45 ; catch rate + db 156 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F25 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/electabuzz/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/electrode.asm b/data/pokemon/base_stats/electrode.asm new file mode 100644 index 0000000..e102643 --- /dev/null +++ b/data/pokemon/base_stats/electrode.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 50, 70, 140, 80, 80 + ; hp atk def spd sat sdf + + db ELECTRIC, ELECTRIC ; type + db 60 ; catch rate + db 150 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/electrode/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MINERAL, EGG_MINERAL ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/elekid.asm b/data/pokemon/base_stats/elekid.asm new file mode 100644 index 0000000..8bf3414 --- /dev/null +++ b/data/pokemon/base_stats/elekid.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 45, 63, 37, 95, 65, 55 + ; hp atk def spd sat sdf + + db ELECTRIC, ELECTRIC ; type + db 45 ; catch rate + db 106 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F25 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/elekid/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/entei.asm b/data/pokemon/base_stats/entei.asm new file mode 100644 index 0000000..c48c57a --- /dev/null +++ b/data/pokemon/base_stats/entei.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 115, 115, 85, 100, 90, 75 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 3 ; catch rate + db 217 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 80 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/entei/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DETECT, REST, CUT, STRENGTH, FLASH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/espeon.asm b/data/pokemon/base_stats/espeon.asm new file mode 100644 index 0000000..f3854d8 --- /dev/null +++ b/data/pokemon/base_stats/espeon.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 65, 60, 110, 130, 95 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, PSYCHIC_TYPE ; type + db 45 ; catch rate + db 197 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 35 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/espeon/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, NIGHTMARE, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/exeggcute.asm b/data/pokemon/base_stats/exeggcute.asm new file mode 100644 index 0000000..c1f8563 --- /dev/null +++ b/data/pokemon/base_stats/exeggcute.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 40, 80, 40, 60, 45 + ; hp atk def spd sat sdf + + db GRASS, PSYCHIC_TYPE ; type + db 90 ; catch rate + db 98 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/exeggcute/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_PLANT, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm CURSE, ROLLOUT, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, FLASH + ; end diff --git a/data/pokemon/base_stats/exeggutor.asm b/data/pokemon/base_stats/exeggutor.asm new file mode 100644 index 0000000..99ebe4c --- /dev/null +++ b/data/pokemon/base_stats/exeggutor.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 95, 95, 85, 55, 125, 65 + ; hp atk def spd sat sdf + + db GRASS, PSYCHIC_TYPE ; type + db 45 ; catch rate + db 212 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/exeggutor/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_PLANT, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, FLASH + ; end diff --git a/data/pokemon/base_stats/farfetch_d.asm b/data/pokemon/base_stats/farfetch_d.asm new file mode 100644 index 0000000..3cd6e8c --- /dev/null +++ b/data/pokemon/base_stats/farfetch_d.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 52, 65, 55, 60, 58, 62 + ; hp atk def spd sat sdf + + db NORMAL, FLYING ; type + db 45 ; catch rate + db 94 ; base exp + db NO_ITEM, STICK ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/farfetch_d/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_FLYING, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, CUT, FLY + ; end diff --git a/data/pokemon/base_stats/fearow.asm b/data/pokemon/base_stats/fearow.asm new file mode 100644 index 0000000..1b87ac6 --- /dev/null +++ b/data/pokemon/base_stats/fearow.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 90, 65, 100, 61, 61 + ; hp atk def spd sat sdf + + db NORMAL, FLYING ; type + db 90 ; catch rate + db 162 ; base exp + db NO_ITEM, SHARP_BEAK ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/fearow/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY + ; end diff --git a/data/pokemon/base_stats/feraligatr.asm b/data/pokemon/base_stats/feraligatr.asm new file mode 100644 index 0000000..7cc6894 --- /dev/null +++ b/data/pokemon/base_stats/feraligatr.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 85, 105, 100, 78, 79, 83 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 45 ; catch rate + db 210 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/feraligatr/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/flaaffy.asm b/data/pokemon/base_stats/flaaffy.asm new file mode 100644 index 0000000..ffee51b --- /dev/null +++ b/data/pokemon/base_stats/flaaffy.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 55, 55, 45, 80, 60 + ; hp atk def spd sat sdf + + db ELECTRIC, ELECTRIC ; type + db 120 ; catch rate + db 117 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/flaaffy/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, STRENGTH, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/flareon.asm b/data/pokemon/base_stats/flareon.asm new file mode 100644 index 0000000..309e305 --- /dev/null +++ b/data/pokemon/base_stats/flareon.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 130, 60, 65, 95, 110 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 45 ; catch rate + db 198 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 35 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/flareon/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DETECT, REST, ATTRACT, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/forretress.asm b/data/pokemon/base_stats/forretress.asm new file mode 100644 index 0000000..33d3ebb --- /dev/null +++ b/data/pokemon/base_stats/forretress.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 90, 140, 40, 60, 60 + ; hp atk def spd sat sdf + + db BUG, STEEL ; type + db 75 ; catch rate + db 118 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/forretress/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/furret.asm b/data/pokemon/base_stats/furret.asm new file mode 100644 index 0000000..0e055e6 --- /dev/null +++ b/data/pokemon/base_stats/furret.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 85, 76, 64, 90, 45, 55 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 90 ; catch rate + db 116 ; base exp + db BERRY, GOLD_BERRY ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/furret/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, CUT, SURF, STRENGTH + ; end diff --git a/data/pokemon/base_stats/gastly.asm b/data/pokemon/base_stats/gastly.asm new file mode 100644 index 0000000..14e1e6a --- /dev/null +++ b/data/pokemon/base_stats/gastly.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 30, 35, 30, 80, 100, 35 + ; hp atk def spd sat sdf + + db GHOST, POISON ; type + db 190 ; catch rate + db 95 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/gastly/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_INDETERMINATE, EGG_INDETERMINATE ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/gengar.asm b/data/pokemon/base_stats/gengar.asm new file mode 100644 index 0000000..b91bd85 --- /dev/null +++ b/data/pokemon/base_stats/gengar.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 65, 60, 110, 130, 75 + ; hp atk def spd sat sdf + + db GHOST, POISON ; type + db 45 ; catch rate + db 190 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/gengar/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_INDETERMINATE, EGG_INDETERMINATE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, STRENGTH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/geodude.asm b/data/pokemon/base_stats/geodude.asm new file mode 100644 index 0000000..61c40a1 --- /dev/null +++ b/data/pokemon/base_stats/geodude.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 80, 100, 20, 30, 30 + ; hp atk def spd sat sdf + + db ROCK, GROUND ; type + db 255 ; catch rate + db 86 ; base exp + db NO_ITEM, EVERSTONE ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/geodude/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MINERAL, EGG_MINERAL ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/girafarig.asm b/data/pokemon/base_stats/girafarig.asm new file mode 100644 index 0000000..8943eef --- /dev/null +++ b/data/pokemon/base_stats/girafarig.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 80, 65, 85, 90, 65 + ; hp atk def spd sat sdf + + db NORMAL, PSYCHIC_TYPE ; type + db 60 ; catch rate + db 149 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/girafarig/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/gligar.asm b/data/pokemon/base_stats/gligar.asm new file mode 100644 index 0000000..e703f28 --- /dev/null +++ b/data/pokemon/base_stats/gligar.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 75, 105, 85, 35, 65 + ; hp atk def spd sat sdf + + db GROUND, FLYING ; type + db 60 ; catch rate + db 108 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/gligar/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, SWIFT, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/gloom.asm b/data/pokemon/base_stats/gloom.asm new file mode 100644 index 0000000..15142ff --- /dev/null +++ b/data/pokemon/base_stats/gloom.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 65, 70, 40, 85, 75 + ; hp atk def spd sat sdf + + db GRASS, POISON ; type + db 120 ; catch rate + db 132 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/gloom/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_PLANT, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/golbat.asm b/data/pokemon/base_stats/golbat.asm new file mode 100644 index 0000000..f1fb84b --- /dev/null +++ b/data/pokemon/base_stats/golbat.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 80, 70, 90, 65, 75 + ; hp atk def spd sat sdf + + db POISON, FLYING ; type + db 90 ; catch rate + db 171 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/golbat/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING + ; end diff --git a/data/pokemon/base_stats/goldeen.asm b/data/pokemon/base_stats/goldeen.asm new file mode 100644 index 0000000..29cc0b4 --- /dev/null +++ b/data/pokemon/base_stats/goldeen.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 45, 67, 60, 63, 35, 50 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 225 ; catch rate + db 111 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/goldeen/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_2, EGG_WATER_2 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/golduck.asm b/data/pokemon/base_stats/golduck.asm new file mode 100644 index 0000000..0c8dbb2 --- /dev/null +++ b/data/pokemon/base_stats/golduck.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 80, 82, 78, 85, 95, 80 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 75 ; catch rate + db 174 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/golduck/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, FURY_CUTTER, SURF, STRENGTH, FLASH, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/golem.asm b/data/pokemon/base_stats/golem.asm new file mode 100644 index 0000000..e0c4538 --- /dev/null +++ b/data/pokemon/base_stats/golem.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 80, 110, 130, 45, 55, 65 + ; hp atk def spd sat sdf + + db ROCK, GROUND ; type + db 45 ; catch rate + db 177 ; base exp + db NO_ITEM, EVERSTONE ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/golem/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MINERAL, EGG_MINERAL ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/granbull.asm b/data/pokemon/base_stats/granbull.asm new file mode 100644 index 0000000..3ba4d6a --- /dev/null +++ b/data/pokemon/base_stats/granbull.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 120, 75, 45, 60, 60 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 75 ; catch rate + db 178 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F75 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/granbull/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_GROUND, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/graveler.asm b/data/pokemon/base_stats/graveler.asm new file mode 100644 index 0000000..45e66eb --- /dev/null +++ b/data/pokemon/base_stats/graveler.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 95, 115, 35, 45, 45 + ; hp atk def spd sat sdf + + db ROCK, GROUND ; type + db 120 ; catch rate + db 134 ; base exp + db NO_ITEM, EVERSTONE ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/graveler/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MINERAL, EGG_MINERAL ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, FIRE_PUNCH, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/grimer.asm b/data/pokemon/base_stats/grimer.asm new file mode 100644 index 0000000..792924b --- /dev/null +++ b/data/pokemon/base_stats/grimer.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 80, 80, 50, 25, 40, 50 + ; hp atk def spd sat sdf + + db POISON, POISON ; type + db 190 ; catch rate + db 90 ; base exp + db NO_ITEM, NUGGET ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/grimer/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_INDETERMINATE, EGG_INDETERMINATE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, FLAMETHROWER, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/growlithe.asm b/data/pokemon/base_stats/growlithe.asm new file mode 100644 index 0000000..88a049a --- /dev/null +++ b/data/pokemon/base_stats/growlithe.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 70, 45, 60, 70, 50 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 190 ; catch rate + db 91 ; base exp + db BURNT_BERRY, BURNT_BERRY ; items + db GENDER_F25 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/growlithe/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/gyarados.asm b/data/pokemon/base_stats/gyarados.asm new file mode 100644 index 0000000..99b2150 --- /dev/null +++ b/data/pokemon/base_stats/gyarados.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 95, 125, 79, 81, 60, 100 + ; hp atk def spd sat sdf + + db WATER, FLYING ; type + db 45 ; catch rate + db 214 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 5 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/gyarados/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_2, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, DRAGONBREATH, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/haunter.asm b/data/pokemon/base_stats/haunter.asm new file mode 100644 index 0000000..edc0c8a --- /dev/null +++ b/data/pokemon/base_stats/haunter.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 45, 50, 45, 95, 115, 55 + ; hp atk def spd sat sdf + + db GHOST, POISON ; type + db 90 ; catch rate + db 126 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/haunter/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_INDETERMINATE, EGG_INDETERMINATE ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/heracross.asm b/data/pokemon/base_stats/heracross.asm new file mode 100644 index 0000000..3c9d094 --- /dev/null +++ b/data/pokemon/base_stats/heracross.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 80, 125, 75, 85, 40, 95 + ; hp atk def spd sat sdf + + db BUG, FIGHTING ; type + db 45 ; catch rate + db 200 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/heracross/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/hitmonchan.asm b/data/pokemon/base_stats/hitmonchan.asm new file mode 100644 index 0000000..b6a5c70 --- /dev/null +++ b/data/pokemon/base_stats/hitmonchan.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 105, 79, 76, 35, 110 + ; hp atk def spd sat sdf + + db FIGHTING, FIGHTING ; type + db 45 ; catch rate + db 140 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F0 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/hitmonchan/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH + ; end diff --git a/data/pokemon/base_stats/hitmonlee.asm b/data/pokemon/base_stats/hitmonlee.asm new file mode 100644 index 0000000..ebc6c18 --- /dev/null +++ b/data/pokemon/base_stats/hitmonlee.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 120, 53, 87, 35, 110 + ; hp atk def spd sat sdf + + db FIGHTING, FIGHTING ; type + db 45 ; catch rate + db 139 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F0 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/hitmonlee/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STRENGTH + ; end diff --git a/data/pokemon/base_stats/hitmontop.asm b/data/pokemon/base_stats/hitmontop.asm new file mode 100644 index 0000000..79b86ef --- /dev/null +++ b/data/pokemon/base_stats/hitmontop.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 95, 95, 70, 35, 110 + ; hp atk def spd sat sdf + + db FIGHTING, FIGHTING ; type + db 45 ; catch rate + db 138 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F0 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/hitmontop/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STRENGTH + ; end diff --git a/data/pokemon/base_stats/ho_oh.asm b/data/pokemon/base_stats/ho_oh.asm new file mode 100644 index 0000000..81fd5cd --- /dev/null +++ b/data/pokemon/base_stats/ho_oh.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 106, 130, 90, 90, 110, 154 + ; hp atk def spd sat sdf + + db FIRE, FLYING ; type + db 3 ; catch rate + db 220 ; base exp + db SACRED_ASH, SACRED_ASH ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 120 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/ho_oh/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, DRAGONBREATH, THUNDER, EARTHQUAKE, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DREAM_EATER, DETECT, REST, STEEL_WING, NIGHTMARE, FLY, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/hoothoot.asm b/data/pokemon/base_stats/hoothoot.asm new file mode 100644 index 0000000..0c16981 --- /dev/null +++ b/data/pokemon/base_stats/hoothoot.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 30, 30, 50, 36, 56 + ; hp atk def spd sat sdf + + db NORMAL, FLYING ; type + db 255 ; catch rate + db 58 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/hoothoot/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, STEEL_WING, NIGHTMARE, FLY, FLASH + ; end diff --git a/data/pokemon/base_stats/hoppip.asm b/data/pokemon/base_stats/hoppip.asm new file mode 100644 index 0000000..f5b44d7 --- /dev/null +++ b/data/pokemon/base_stats/hoppip.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 35, 35, 40, 50, 35, 55 + ; hp atk def spd sat sdf + + db GRASS, FLYING ; type + db 255 ; catch rate + db 74 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/hoppip/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_FAIRY, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FLASH + ; end diff --git a/data/pokemon/base_stats/horsea.asm b/data/pokemon/base_stats/horsea.asm new file mode 100644 index 0000000..b3dfa67 --- /dev/null +++ b/data/pokemon/base_stats/horsea.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 30, 40, 70, 60, 70, 25 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 225 ; catch rate + db 83 ; base exp + db NO_ITEM, DRAGON_SCALE ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/horsea/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, DRAGONBREATH, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/houndoom.asm b/data/pokemon/base_stats/houndoom.asm new file mode 100644 index 0000000..c80310b --- /dev/null +++ b/data/pokemon/base_stats/houndoom.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 90, 50, 95, 110, 80 + ; hp atk def spd sat sdf + + db DARK, FIRE ; type + db 45 ; catch rate + db 204 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/houndoom/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/houndour.asm b/data/pokemon/base_stats/houndour.asm new file mode 100644 index 0000000..4a4568e --- /dev/null +++ b/data/pokemon/base_stats/houndour.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 45, 60, 30, 65, 80, 50 + ; hp atk def spd sat sdf + + db DARK, FIRE ; type + db 120 ; catch rate + db 114 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/houndour/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/hypno.asm b/data/pokemon/base_stats/hypno.asm new file mode 100644 index 0000000..6751436 --- /dev/null +++ b/data/pokemon/base_stats/hypno.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 85, 73, 70, 67, 73, 115 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, PSYCHIC_TYPE ; type + db 75 ; catch rate + db 165 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/hypno/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, FLASH + ; end diff --git a/data/pokemon/base_stats/igglybuff.asm b/data/pokemon/base_stats/igglybuff.asm new file mode 100644 index 0000000..31d095c --- /dev/null +++ b/data/pokemon/base_stats/igglybuff.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 30, 15, 15, 40, 20 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 170 ; catch rate + db 39 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F75 ; gender ratio + db 100 ; unknown 1 + db 10 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/igglybuff/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, NIGHTMARE, FLASH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/ivysaur.asm b/data/pokemon/base_stats/ivysaur.asm new file mode 100644 index 0000000..d5ff569 --- /dev/null +++ b/data/pokemon/base_stats/ivysaur.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 62, 63, 60, 80, 80 + ; hp atk def spd sat sdf + + db GRASS, POISON ; type + db 45 ; catch rate + db 141 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/ivysaur/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FURY_CUTTER, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/jigglypuff.asm b/data/pokemon/base_stats/jigglypuff.asm new file mode 100644 index 0000000..80d26b6 --- /dev/null +++ b/data/pokemon/base_stats/jigglypuff.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 115, 45, 20, 20, 45, 25 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 170 ; catch rate + db 76 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F75 ; gender ratio + db 100 ; unknown 1 + db 10 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/jigglypuff/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_FAIRY, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/jolteon.asm b/data/pokemon/base_stats/jolteon.asm new file mode 100644 index 0000000..a85b8e3 --- /dev/null +++ b/data/pokemon/base_stats/jolteon.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 65, 60, 130, 110, 95 + ; hp atk def spd sat sdf + + db ELECTRIC, ELECTRIC ; type + db 45 ; catch rate + db 197 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 35 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/jolteon/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/jumpluff.asm b/data/pokemon/base_stats/jumpluff.asm new file mode 100644 index 0000000..a8ae598 --- /dev/null +++ b/data/pokemon/base_stats/jumpluff.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 55, 70, 110, 55, 85 + ; hp atk def spd sat sdf + + db GRASS, FLYING ; type + db 45 ; catch rate + db 176 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/jumpluff/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_FAIRY, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FLASH + ; end diff --git a/data/pokemon/base_stats/jynx.asm b/data/pokemon/base_stats/jynx.asm new file mode 100644 index 0000000..cf0696b --- /dev/null +++ b/data/pokemon/base_stats/jynx.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 50, 35, 95, 115, 95 + ; hp atk def spd sat sdf + + db ICE, PSYCHIC_TYPE ; type + db 45 ; catch rate + db 137 ; base exp + db ICE_BERRY, ICE_BERRY ; items + db GENDER_F100 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/jynx/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SWEET_SCENT, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/kabuto.asm b/data/pokemon/base_stats/kabuto.asm new file mode 100644 index 0000000..cee333f --- /dev/null +++ b/data/pokemon/base_stats/kabuto.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 30, 80, 90, 55, 55, 45 + ; hp atk def spd sat sdf + + db ROCK, WATER ; type + db 45 ; catch rate + db 119 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 30 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/kabuto/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, THIEF, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/kabutops.asm b/data/pokemon/base_stats/kabutops.asm new file mode 100644 index 0000000..55e24e3 --- /dev/null +++ b/data/pokemon/base_stats/kabutops.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 115, 105, 80, 65, 70 + ; hp atk def spd sat sdf + + db ROCK, WATER ; type + db 45 ; catch rate + db 201 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 30 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/kabutops/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, SURF, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/kadabra.asm b/data/pokemon/base_stats/kadabra.asm new file mode 100644 index 0000000..23f11a6 --- /dev/null +++ b/data/pokemon/base_stats/kadabra.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 35, 30, 105, 120, 70 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, PSYCHIC_TYPE ; type + db 100 ; catch rate + db 145 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F25 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/kadabra/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DIG, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, FLASH + ; end diff --git a/data/pokemon/base_stats/kakuna.asm b/data/pokemon/base_stats/kakuna.asm new file mode 100644 index 0000000..08622ad --- /dev/null +++ b/data/pokemon/base_stats/kakuna.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 45, 25, 50, 35, 25, 25 + ; hp atk def spd sat sdf + + db BUG, POISON ; type + db 120 ; catch rate + db 71 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/kakuna/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm + ; end diff --git a/data/pokemon/base_stats/kangaskhan.asm b/data/pokemon/base_stats/kangaskhan.asm new file mode 100644 index 0000000..6dc424b --- /dev/null +++ b/data/pokemon/base_stats/kangaskhan.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 105, 95, 80, 90, 40, 80 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 45 ; catch rate + db 175 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F100 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/kangaskhan/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MONSTER, EGG_MONSTER ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/kingdra.asm b/data/pokemon/base_stats/kingdra.asm new file mode 100644 index 0000000..ea528b4 --- /dev/null +++ b/data/pokemon/base_stats/kingdra.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 95, 95, 85, 95, 95 + ; hp atk def spd sat sdf + + db WATER, DRAGON ; type + db 45 ; catch rate + db 207 ; base exp + db NO_ITEM, DRAGON_SCALE ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/kingdra/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, DRAGONBREATH, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/kingler.asm b/data/pokemon/base_stats/kingler.asm new file mode 100644 index 0000000..d7cf962 --- /dev/null +++ b/data/pokemon/base_stats/kingler.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 130, 115, 75, 50, 50 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 60 ; catch rate + db 206 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/kingler/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_3, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/koffing.asm b/data/pokemon/base_stats/koffing.asm new file mode 100644 index 0000000..014b976 --- /dev/null +++ b/data/pokemon/base_stats/koffing.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 65, 95, 35, 60, 45 + ; hp atk def spd sat sdf + + db POISON, POISON ; type + db 190 ; catch rate + db 114 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/koffing/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_INDETERMINATE, EGG_INDETERMINATE ; egg groups + + ; tm/hm learnset + tmhm CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, REST, ATTRACT, THIEF, FLAMETHROWER, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/krabby.asm b/data/pokemon/base_stats/krabby.asm new file mode 100644 index 0000000..43fd61a --- /dev/null +++ b/data/pokemon/base_stats/krabby.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 30, 105, 90, 50, 25, 25 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 225 ; catch rate + db 115 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/krabby/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_3, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, SURF, STRENGTH, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/lanturn.asm b/data/pokemon/base_stats/lanturn.asm new file mode 100644 index 0000000..f751c9b --- /dev/null +++ b/data/pokemon/base_stats/lanturn.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 125, 58, 58, 67, 76, 76 + ; hp atk def spd sat sdf + + db WATER, ELECTRIC ; type + db 75 ; catch rate + db 156 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/lanturn/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_2, EGG_WATER_2 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, SURF, FLASH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/lapras.asm b/data/pokemon/base_stats/lapras.asm new file mode 100644 index 0000000..6d20942 --- /dev/null +++ b/data/pokemon/base_stats/lapras.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 130, 85, 80, 60, 85, 95 + ; hp atk def spd sat sdf + + db WATER, ICE ; type + db 45 ; catch rate + db 219 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 40 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/lapras/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_MONSTER, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, NIGHTMARE, SURF, STRENGTH, WHIRLPOOL, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/larvitar.asm b/data/pokemon/base_stats/larvitar.asm new file mode 100644 index 0000000..bae9c7c --- /dev/null +++ b/data/pokemon/base_stats/larvitar.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 64, 50, 41, 45, 50 + ; hp atk def spd sat sdf + + db ROCK, GROUND ; type + db 45 ; catch rate + db 67 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 40 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/larvitar/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_MONSTER, EGG_MONSTER ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DETECT, REST, ATTRACT + ; end diff --git a/data/pokemon/base_stats/ledian.asm b/data/pokemon/base_stats/ledian.asm new file mode 100644 index 0000000..1fa90a6 --- /dev/null +++ b/data/pokemon/base_stats/ledian.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 35, 50, 85, 55, 110 + ; hp atk def spd sat sdf + + db BUG, FLYING ; type + db 90 ; catch rate + db 134 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/ledian/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, REST, ATTRACT, THIEF, FLASH + ; end diff --git a/data/pokemon/base_stats/ledyba.asm b/data/pokemon/base_stats/ledyba.asm new file mode 100644 index 0000000..696a72d --- /dev/null +++ b/data/pokemon/base_stats/ledyba.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 20, 30, 55, 40, 80 + ; hp atk def spd sat sdf + + db BUG, FLYING ; type + db 255 ; catch rate + db 54 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/ledyba/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, THUNDERPUNCH, REST, ATTRACT, THIEF, FLASH + ; end diff --git a/data/pokemon/base_stats/lickitung.asm b/data/pokemon/base_stats/lickitung.asm new file mode 100644 index 0000000..0c0d2e6 --- /dev/null +++ b/data/pokemon/base_stats/lickitung.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 55, 75, 30, 60, 75 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 45 ; catch rate + db 127 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/lickitung/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MONSTER, EGG_MONSTER ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, CUT, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/lugia.asm b/data/pokemon/base_stats/lugia.asm new file mode 100644 index 0000000..0b93213 --- /dev/null +++ b/data/pokemon/base_stats/lugia.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 106, 90, 130, 110, 90, 154 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, FLYING ; type + db 3 ; catch rate + db 220 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 120 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/lugia/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, THUNDER, EARTHQUAKE, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DREAM_EATER, DETECT, REST, STEEL_WING, NIGHTMARE, FLY, SURF, STRENGTH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/machamp.asm b/data/pokemon/base_stats/machamp.asm new file mode 100644 index 0000000..525ad51 --- /dev/null +++ b/data/pokemon/base_stats/machamp.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 130, 80, 55, 65, 85 + ; hp atk def spd sat sdf + + db FIGHTING, FIGHTING ; type + db 45 ; catch rate + db 193 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F25 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/machamp/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/machoke.asm b/data/pokemon/base_stats/machoke.asm new file mode 100644 index 0000000..ea08f0a --- /dev/null +++ b/data/pokemon/base_stats/machoke.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 80, 100, 70, 45, 50, 60 + ; hp atk def spd sat sdf + + db FIGHTING, FIGHTING ; type + db 90 ; catch rate + db 146 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F25 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/machoke/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/machop.asm b/data/pokemon/base_stats/machop.asm new file mode 100644 index 0000000..9d97596 --- /dev/null +++ b/data/pokemon/base_stats/machop.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 80, 50, 35, 35, 35 + ; hp atk def spd sat sdf + + db FIGHTING, FIGHTING ; type + db 180 ; catch rate + db 88 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F25 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/machop/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/magby.asm b/data/pokemon/base_stats/magby.asm new file mode 100644 index 0000000..f620e73 --- /dev/null +++ b/data/pokemon/base_stats/magby.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 45, 75, 37, 83, 70, 55 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 45 ; catch rate + db 117 ; base exp + db BURNT_BERRY, BURNT_BERRY ; items + db GENDER_F25 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/magby/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/magcargo.asm b/data/pokemon/base_stats/magcargo.asm new file mode 100644 index 0000000..7ceb526 --- /dev/null +++ b/data/pokemon/base_stats/magcargo.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 50, 120, 30, 80, 80 + ; hp atk def spd sat sdf + + db FIRE, ROCK ; type + db 75 ; catch rate + db 154 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/magcargo/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_INDETERMINATE, EGG_INDETERMINATE ; egg groups + + ; tm/hm learnset + tmhm CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/magikarp.asm b/data/pokemon/base_stats/magikarp.asm new file mode 100644 index 0000000..edda534 --- /dev/null +++ b/data/pokemon/base_stats/magikarp.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 20, 10, 55, 80, 15, 20 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 255 ; catch rate + db 20 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 5 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/magikarp/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_2, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm + ; end diff --git a/data/pokemon/base_stats/magmar.asm b/data/pokemon/base_stats/magmar.asm new file mode 100644 index 0000000..c7ce3d0 --- /dev/null +++ b/data/pokemon/base_stats/magmar.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 95, 57, 93, 100, 85 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 45 ; catch rate + db 167 ; base exp + db BURNT_BERRY, BURNT_BERRY ; items + db GENDER_F25 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/magmar/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/magnemite.asm b/data/pokemon/base_stats/magnemite.asm new file mode 100644 index 0000000..1844af6 --- /dev/null +++ b/data/pokemon/base_stats/magnemite.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 25, 35, 70, 45, 95, 55 + ; hp atk def spd sat sdf + + db ELECTRIC, STEEL ; type + db 190 ; catch rate + db 89 ; base exp + db NO_ITEM, METAL_COAT ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/magnemite/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MINERAL, EGG_MINERAL ; egg groups + + ; tm/hm learnset + tmhm CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/magneton.asm b/data/pokemon/base_stats/magneton.asm new file mode 100644 index 0000000..1a15373 --- /dev/null +++ b/data/pokemon/base_stats/magneton.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 60, 95, 70, 120, 70 + ; hp atk def spd sat sdf + + db ELECTRIC, STEEL ; type + db 60 ; catch rate + db 161 ; base exp + db NO_ITEM, METAL_COAT ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/magneton/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MINERAL, EGG_MINERAL ; egg groups + + ; tm/hm learnset + tmhm CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/mankey.asm b/data/pokemon/base_stats/mankey.asm new file mode 100644 index 0000000..30f66ce --- /dev/null +++ b/data/pokemon/base_stats/mankey.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 80, 35, 70, 35, 45 + ; hp atk def spd sat sdf + + db FIGHTING, FIGHTING ; type + db 190 ; catch rate + db 74 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/mankey/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/mantine.asm b/data/pokemon/base_stats/mantine.asm new file mode 100644 index 0000000..1843e03 --- /dev/null +++ b/data/pokemon/base_stats/mantine.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 40, 70, 70, 80, 140 + ; hp atk def spd sat sdf + + db WATER, FLYING ; type + db 25 ; catch rate + db 168 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/mantine/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_1, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/mareep.asm b/data/pokemon/base_stats/mareep.asm new file mode 100644 index 0000000..b2a46fe --- /dev/null +++ b/data/pokemon/base_stats/mareep.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 40, 40, 35, 65, 45 + ; hp atk def spd sat sdf + + db ELECTRIC, ELECTRIC ; type + db 235 ; catch rate + db 59 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/mareep/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/marill.asm b/data/pokemon/base_stats/marill.asm new file mode 100644 index 0000000..f548489 --- /dev/null +++ b/data/pokemon/base_stats/marill.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 20, 50, 40, 20, 50 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 190 ; catch rate + db 58 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/marill/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_WATER_1, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/marowak.asm b/data/pokemon/base_stats/marowak.asm new file mode 100644 index 0000000..7796e5a --- /dev/null +++ b/data/pokemon/base_stats/marowak.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 80, 110, 45, 50, 80 + ; hp atk def spd sat sdf + + db GROUND, GROUND ; type + db 75 ; catch rate + db 124 ; base exp + db NO_ITEM, THICK_CLUB ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/marowak/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MONSTER, EGG_MONSTER ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, FLAMETHROWER, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/meganium.asm b/data/pokemon/base_stats/meganium.asm new file mode 100644 index 0000000..29b5d28 --- /dev/null +++ b/data/pokemon/base_stats/meganium.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 80, 82, 100, 80, 83, 100 + ; hp atk def spd sat sdf + + db GRASS, GRASS ; type + db 45 ; catch rate + db 208 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/meganium/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, STRENGTH, FLASH + ; end diff --git a/data/pokemon/base_stats/meowth.asm b/data/pokemon/base_stats/meowth.asm new file mode 100644 index 0000000..8d50078 --- /dev/null +++ b/data/pokemon/base_stats/meowth.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 45, 35, 90, 40, 40 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 255 ; catch rate + db 69 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/meowth/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/metapod.asm b/data/pokemon/base_stats/metapod.asm new file mode 100644 index 0000000..92d5d02 --- /dev/null +++ b/data/pokemon/base_stats/metapod.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 20, 55, 30, 25, 25 + ; hp atk def spd sat sdf + + db BUG, BUG ; type + db 120 ; catch rate + db 72 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/metapod/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm + ; end diff --git a/data/pokemon/base_stats/mew.asm b/data/pokemon/base_stats/mew.asm new file mode 100644 index 0000000..0cf7f2b --- /dev/null +++ b/data/pokemon/base_stats/mew.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 100, 100, 100, 100, 100, 100 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, PSYCHIC_TYPE ; type + db 45 ; catch rate + db 64 ; base exp + db NO_ITEM, MIRACLEBERRY ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 120 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/mew/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, DRAGONBREATH, THUNDER, EARTHQUAKE, RETURN, DIG, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, FIRE_BLAST, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FIRE_PUNCH, FURY_CUTTER, NIGHTMARE, CUT, FLY, SURF, STRENGTH, FLASH, WHIRLPOOL, WATERFALL, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/mewtwo.asm b/data/pokemon/base_stats/mewtwo.asm new file mode 100644 index 0000000..a0b5b69 --- /dev/null +++ b/data/pokemon/base_stats/mewtwo.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 106, 110, 90, 130, 154, 90 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, PSYCHIC_TYPE ; type + db 3 ; catch rate + db 220 ; base exp + db NO_ITEM, BERSERK_GENE ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 120 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/mewtwo/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, THUNDERPUNCH, DREAM_EATER, DETECT, REST, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/miltank.asm b/data/pokemon/base_stats/miltank.asm new file mode 100644 index 0000000..c61a0a1 --- /dev/null +++ b/data/pokemon/base_stats/miltank.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 95, 80, 105, 100, 40, 70 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 45 ; catch rate + db 200 ; base exp + db MOOMOO_MILK, MOOMOO_MILK ; items + db GENDER_F100 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/miltank/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, SURF, STRENGTH, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/misdreavus.asm b/data/pokemon/base_stats/misdreavus.asm new file mode 100644 index 0000000..26fe106 --- /dev/null +++ b/data/pokemon/base_stats/misdreavus.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 60, 60, 85, 85, 85 + ; hp atk def spd sat sdf + + db GHOST, GHOST ; type + db 45 ; catch rate + db 147 ; base exp + db NO_ITEM, SPELL_TAG ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/misdreavus/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_INDETERMINATE, EGG_INDETERMINATE ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/moltres.asm b/data/pokemon/base_stats/moltres.asm new file mode 100644 index 0000000..4162156 --- /dev/null +++ b/data/pokemon/base_stats/moltres.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 100, 90, 90, 125, 85 + ; hp atk def spd sat sdf + + db FIRE, FLYING ; type + db 3 ; catch rate + db 217 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 80 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/moltres/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, SWIFT, DETECT, REST, STEEL_WING, FLY, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/mr__mime.asm b/data/pokemon/base_stats/mr__mime.asm new file mode 100644 index 0000000..70d006b --- /dev/null +++ b/data/pokemon/base_stats/mr__mime.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 45, 65, 90, 100, 120 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, PSYCHIC_TYPE ; type + db 45 ; catch rate + db 136 ; base exp + db NO_ITEM, MYSTERYBERRY ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/mr__mime/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_HUMANSHAPE, EGG_HUMANSHAPE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, THUNDERPUNCH, DREAM_EATER, REST, ATTRACT, THIEF, FIRE_PUNCH, NIGHTMARE, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/muk.asm b/data/pokemon/base_stats/muk.asm new file mode 100644 index 0000000..64ef481 --- /dev/null +++ b/data/pokemon/base_stats/muk.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 105, 105, 75, 50, 65, 100 + ; hp atk def spd sat sdf + + db POISON, POISON ; type + db 75 ; catch rate + db 157 ; base exp + db NO_ITEM, NUGGET ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/muk/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_INDETERMINATE, EGG_INDETERMINATE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, CURSE, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, FLAMETHROWER, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/murkrow.asm b/data/pokemon/base_stats/murkrow.asm new file mode 100644 index 0000000..fcc89b4 --- /dev/null +++ b/data/pokemon/base_stats/murkrow.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 85, 42, 91, 85, 42 + ; hp atk def spd sat sdf + + db DARK, FLYING ; type + db 30 ; catch rate + db 107 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/murkrow/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, STEEL_WING, NIGHTMARE, FLY + ; end diff --git a/data/pokemon/base_stats/natu.asm b/data/pokemon/base_stats/natu.asm new file mode 100644 index 0000000..4c3bb35 --- /dev/null +++ b/data/pokemon/base_stats/natu.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 50, 45, 70, 70, 45 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, FLYING ; type + db 190 ; catch rate + db 73 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/natu/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, FLASH + ; end diff --git a/data/pokemon/base_stats/nidoking.asm b/data/pokemon/base_stats/nidoking.asm new file mode 100644 index 0000000..ed21d0e --- /dev/null +++ b/data/pokemon/base_stats/nidoking.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 81, 92, 77, 85, 85, 75 + ; hp atk def spd sat sdf + + db POISON, GROUND ; type + db 45 ; catch rate + db 195 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F0 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/nidoking/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/nidoqueen.asm b/data/pokemon/base_stats/nidoqueen.asm new file mode 100644 index 0000000..b7c0d05 --- /dev/null +++ b/data/pokemon/base_stats/nidoqueen.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 82, 87, 76, 75, 85 + ; hp atk def spd sat sdf + + db POISON, GROUND ; type + db 45 ; catch rate + db 194 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F100 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/nidoqueen/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/nidoran_f.asm b/data/pokemon/base_stats/nidoran_f.asm new file mode 100644 index 0000000..7ac3ca5 --- /dev/null +++ b/data/pokemon/base_stats/nidoran_f.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 47, 52, 41, 40, 40 + ; hp atk def spd sat sdf + + db POISON, POISON ; type + db 235 ; catch rate + db 59 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F100 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/nidoran_f/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/nidoran_m.asm b/data/pokemon/base_stats/nidoran_m.asm new file mode 100644 index 0000000..c6ec661 --- /dev/null +++ b/data/pokemon/base_stats/nidoran_m.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 46, 57, 40, 50, 40, 40 + ; hp atk def spd sat sdf + + db POISON, POISON ; type + db 235 ; catch rate + db 60 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F0 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/nidoran_m/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/nidorina.asm b/data/pokemon/base_stats/nidorina.asm new file mode 100644 index 0000000..f1290f5 --- /dev/null +++ b/data/pokemon/base_stats/nidorina.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 62, 67, 56, 55, 55 + ; hp atk def spd sat sdf + + db POISON, POISON ; type + db 120 ; catch rate + db 117 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F100 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/nidorina/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, STRENGTH, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/nidorino.asm b/data/pokemon/base_stats/nidorino.asm new file mode 100644 index 0000000..c690d70 --- /dev/null +++ b/data/pokemon/base_stats/nidorino.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 61, 72, 57, 65, 55, 55 + ; hp atk def spd sat sdf + + db POISON, POISON ; type + db 120 ; catch rate + db 118 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F0 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/nidorino/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, STRENGTH, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/ninetales.asm b/data/pokemon/base_stats/ninetales.asm new file mode 100644 index 0000000..1a7e2aa --- /dev/null +++ b/data/pokemon/base_stats/ninetales.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 73, 76, 75, 100, 81, 100 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 75 ; catch rate + db 178 ; base exp + db BURNT_BERRY, BURNT_BERRY ; items + db GENDER_F75 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/ninetales/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/noctowl.asm b/data/pokemon/base_stats/noctowl.asm new file mode 100644 index 0000000..cc28df2 --- /dev/null +++ b/data/pokemon/base_stats/noctowl.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 100, 50, 50, 70, 76, 96 + ; hp atk def spd sat sdf + + db NORMAL, FLYING ; type + db 90 ; catch rate + db 162 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/noctowl/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, STEEL_WING, NIGHTMARE, FLY, FLASH + ; end diff --git a/data/pokemon/base_stats/octillery.asm b/data/pokemon/base_stats/octillery.asm new file mode 100644 index 0000000..7c931fc --- /dev/null +++ b/data/pokemon/base_stats/octillery.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 105, 75, 45, 105, 75 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 75 ; catch rate + db 164 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/octillery/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_WATER_2 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, FLAMETHROWER, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/oddish.asm b/data/pokemon/base_stats/oddish.asm new file mode 100644 index 0000000..32650e5 --- /dev/null +++ b/data/pokemon/base_stats/oddish.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 45, 50, 55, 30, 75, 65 + ; hp atk def spd sat sdf + + db GRASS, POISON ; type + db 255 ; catch rate + db 78 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/oddish/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_PLANT, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/omanyte.asm b/data/pokemon/base_stats/omanyte.asm new file mode 100644 index 0000000..d124d68 --- /dev/null +++ b/data/pokemon/base_stats/omanyte.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 35, 40, 100, 35, 90, 55 + ; hp atk def spd sat sdf + + db ROCK, WATER ; type + db 45 ; catch rate + db 120 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 30 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/omanyte/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/omastar.asm b/data/pokemon/base_stats/omastar.asm new file mode 100644 index 0000000..f613ab4 --- /dev/null +++ b/data/pokemon/base_stats/omastar.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 60, 125, 55, 115, 70 + ; hp atk def spd sat sdf + + db ROCK, WATER ; type + db 45 ; catch rate + db 199 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 30 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/omastar/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/onix.asm b/data/pokemon/base_stats/onix.asm new file mode 100644 index 0000000..a6245c5 --- /dev/null +++ b/data/pokemon/base_stats/onix.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 35, 45, 160, 70, 30, 45 + ; hp atk def spd sat sdf + + db ROCK, GROUND ; type + db 45 ; catch rate + db 108 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/onix/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MINERAL, EGG_MINERAL ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, REST, ATTRACT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/paras.asm b/data/pokemon/base_stats/paras.asm new file mode 100644 index 0000000..8842645 --- /dev/null +++ b/data/pokemon/base_stats/paras.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 35, 70, 55, 25, 45, 55 + ; hp atk def spd sat sdf + + db BUG, GRASS ; type + db 190 ; catch rate + db 70 ; base exp + db TINYMUSHROOM, BIG_MUSHROOM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/paras/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/parasect.asm b/data/pokemon/base_stats/parasect.asm new file mode 100644 index 0000000..fc9721c --- /dev/null +++ b/data/pokemon/base_stats/parasect.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 95, 80, 30, 60, 80 + ; hp atk def spd sat sdf + + db BUG, GRASS ; type + db 75 ; catch rate + db 128 ; base exp + db TINYMUSHROOM, BIG_MUSHROOM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/parasect/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/persian.asm b/data/pokemon/base_stats/persian.asm new file mode 100644 index 0000000..c098ea1 --- /dev/null +++ b/data/pokemon/base_stats/persian.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 70, 60, 115, 65, 65 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 90 ; catch rate + db 148 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/persian/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/phanpy.asm b/data/pokemon/base_stats/phanpy.asm new file mode 100644 index 0000000..6471603 --- /dev/null +++ b/data/pokemon/base_stats/phanpy.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 60, 60, 40, 40, 40 + ; hp atk def spd sat sdf + + db GROUND, GROUND ; type + db 120 ; catch rate + db 124 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/phanpy/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/pichu.asm b/data/pokemon/base_stats/pichu.asm new file mode 100644 index 0000000..0cd32e5 --- /dev/null +++ b/data/pokemon/base_stats/pichu.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 20, 40, 15, 60, 35, 35 + ; hp atk def spd sat sdf + + db ELECTRIC, ELECTRIC ; type + db 190 ; catch rate + db 42 ; base exp + db NO_ITEM, BERRY ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 10 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/pichu/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/pidgeot.asm b/data/pokemon/base_stats/pidgeot.asm new file mode 100644 index 0000000..95cdbef --- /dev/null +++ b/data/pokemon/base_stats/pidgeot.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 83, 80, 75, 91, 70, 70 + ; hp atk def spd sat sdf + + db NORMAL, FLYING ; type + db 45 ; catch rate + db 172 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/pidgeot/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY + ; end diff --git a/data/pokemon/base_stats/pidgeotto.asm b/data/pokemon/base_stats/pidgeotto.asm new file mode 100644 index 0000000..a8b9fca --- /dev/null +++ b/data/pokemon/base_stats/pidgeotto.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 63, 60, 55, 71, 50, 50 + ; hp atk def spd sat sdf + + db NORMAL, FLYING ; type + db 120 ; catch rate + db 113 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/pidgeotto/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY + ; end diff --git a/data/pokemon/base_stats/pidgey.asm b/data/pokemon/base_stats/pidgey.asm new file mode 100644 index 0000000..9a69598 --- /dev/null +++ b/data/pokemon/base_stats/pidgey.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 45, 40, 56, 35, 35 + ; hp atk def spd sat sdf + + db NORMAL, FLYING ; type + db 255 ; catch rate + db 55 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/pidgey/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY + ; end diff --git a/data/pokemon/base_stats/pikachu.asm b/data/pokemon/base_stats/pikachu.asm new file mode 100644 index 0000000..2a533a3 --- /dev/null +++ b/data/pokemon/base_stats/pikachu.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 35, 55, 30, 90, 50, 40 + ; hp atk def spd sat sdf + + db ELECTRIC, ELECTRIC ; type + db 190 ; catch rate + db 82 ; base exp + db NO_ITEM, BERRY ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 10 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/pikachu/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, STRENGTH, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/piloswine.asm b/data/pokemon/base_stats/piloswine.asm new file mode 100644 index 0000000..3ec9547 --- /dev/null +++ b/data/pokemon/base_stats/piloswine.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 100, 100, 80, 50, 60, 60 + ; hp atk def spd sat sdf + + db ICE, GROUND ; type + db 75 ; catch rate + db 160 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/piloswine/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, STRENGTH, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/pineco.asm b/data/pokemon/base_stats/pineco.asm new file mode 100644 index 0000000..fa51c0b --- /dev/null +++ b/data/pokemon/base_stats/pineco.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 65, 90, 15, 35, 35 + ; hp atk def spd sat sdf + + db BUG, BUG ; type + db 190 ; catch rate + db 60 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/pineco/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/pinsir.asm b/data/pokemon/base_stats/pinsir.asm new file mode 100644 index 0000000..5934845 --- /dev/null +++ b/data/pokemon/base_stats/pinsir.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 125, 100, 85, 55, 70 + ; hp atk def spd sat sdf + + db BUG, BUG ; type + db 45 ; catch rate + db 200 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/pinsir/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/politoed.asm b/data/pokemon/base_stats/politoed.asm new file mode 100644 index 0000000..d014f9e --- /dev/null +++ b/data/pokemon/base_stats/politoed.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 75, 75, 70, 90, 100 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 45 ; catch rate + db 185 ; base exp + db NO_ITEM, KINGS_ROCK ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/politoed/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_WATER_1, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/poliwag.asm b/data/pokemon/base_stats/poliwag.asm new file mode 100644 index 0000000..0af1802 --- /dev/null +++ b/data/pokemon/base_stats/poliwag.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 50, 40, 90, 40, 40 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 255 ; catch rate + db 77 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/poliwag/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_WATER_1, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/poliwhirl.asm b/data/pokemon/base_stats/poliwhirl.asm new file mode 100644 index 0000000..beb1b06 --- /dev/null +++ b/data/pokemon/base_stats/poliwhirl.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 65, 65, 90, 50, 50 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 120 ; catch rate + db 131 ; base exp + db NO_ITEM, KINGS_ROCK ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/poliwhirl/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_WATER_1, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/poliwrath.asm b/data/pokemon/base_stats/poliwrath.asm new file mode 100644 index 0000000..2d85bf9 --- /dev/null +++ b/data/pokemon/base_stats/poliwrath.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 85, 95, 70, 70, 90 + ; hp atk def spd sat sdf + + db WATER, FIGHTING ; type + db 45 ; catch rate + db 185 ; base exp + db NO_ITEM, KINGS_ROCK ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/poliwrath/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_WATER_1, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/ponyta.asm b/data/pokemon/base_stats/ponyta.asm new file mode 100644 index 0000000..842f08e --- /dev/null +++ b/data/pokemon/base_stats/ponyta.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 85, 55, 90, 65, 65 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 190 ; catch rate + db 152 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/ponyta/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/porygon.asm b/data/pokemon/base_stats/porygon.asm new file mode 100644 index 0000000..dd5be7f --- /dev/null +++ b/data/pokemon/base_stats/porygon.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 60, 70, 40, 85, 75 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 45 ; catch rate + db 130 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/porygon/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MINERAL, EGG_MINERAL ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, REST, THIEF, NIGHTMARE, FLASH, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/porygon2.asm b/data/pokemon/base_stats/porygon2.asm new file mode 100644 index 0000000..2494eb0 --- /dev/null +++ b/data/pokemon/base_stats/porygon2.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 85, 80, 90, 60, 105, 95 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 45 ; catch rate + db 180 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/porygon2/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MINERAL, EGG_MINERAL ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, REST, THIEF, NIGHTMARE, FLASH, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/primeape.asm b/data/pokemon/base_stats/primeape.asm new file mode 100644 index 0000000..9822a60 --- /dev/null +++ b/data/pokemon/base_stats/primeape.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 105, 60, 95, 60, 70 + ; hp atk def spd sat sdf + + db FIGHTING, FIGHTING ; type + db 75 ; catch rate + db 149 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/primeape/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/psyduck.asm b/data/pokemon/base_stats/psyduck.asm new file mode 100644 index 0000000..72118cc --- /dev/null +++ b/data/pokemon/base_stats/psyduck.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 52, 48, 55, 65, 50 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 190 ; catch rate + db 80 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/psyduck/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, STRENGTH, FLASH, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/pupitar.asm b/data/pokemon/base_stats/pupitar.asm new file mode 100644 index 0000000..4e0b9cb --- /dev/null +++ b/data/pokemon/base_stats/pupitar.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 84, 70, 51, 65, 70 + ; hp atk def spd sat sdf + + db ROCK, GROUND ; type + db 45 ; catch rate + db 144 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 40 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/pupitar/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_MONSTER, EGG_MONSTER ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DETECT, REST, ATTRACT + ; end diff --git a/data/pokemon/base_stats/quagsire.asm b/data/pokemon/base_stats/quagsire.asm new file mode 100644 index 0000000..90178df --- /dev/null +++ b/data/pokemon/base_stats/quagsire.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 95, 85, 85, 35, 65, 65 + ; hp atk def spd sat sdf + + db WATER, GROUND ; type + db 90 ; catch rate + db 137 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/quagsire/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, FLASH, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/quilava.asm b/data/pokemon/base_stats/quilava.asm new file mode 100644 index 0000000..a909a51 --- /dev/null +++ b/data/pokemon/base_stats/quilava.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 58, 64, 58, 80, 80, 65 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 45 ; catch rate + db 142 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/quilava/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, FURY_CUTTER, CUT, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/qwilfish.asm b/data/pokemon/base_stats/qwilfish.asm new file mode 100644 index 0000000..385a6c6 --- /dev/null +++ b/data/pokemon/base_stats/qwilfish.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 95, 75, 85, 55, 55 + ; hp atk def spd sat sdf + + db WATER, POISON ; type + db 45 ; catch rate + db 100 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/qwilfish/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_2, EGG_WATER_2 ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, DEFENSE_CURL, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/raichu.asm b/data/pokemon/base_stats/raichu.asm new file mode 100644 index 0000000..4624ca0 --- /dev/null +++ b/data/pokemon/base_stats/raichu.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 90, 55, 100, 90, 80 + ; hp atk def spd sat sdf + + db ELECTRIC, ELECTRIC ; type + db 75 ; catch rate + db 122 ; base exp + db NO_ITEM, BERRY ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 10 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/raichu/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, STRENGTH, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/raikou.asm b/data/pokemon/base_stats/raikou.asm new file mode 100644 index 0000000..13c703c --- /dev/null +++ b/data/pokemon/base_stats/raikou.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 85, 75, 115, 115, 100 + ; hp atk def spd sat sdf + + db ELECTRIC, ELECTRIC ; type + db 3 ; catch rate + db 216 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 80 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/raikou/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, CUT, STRENGTH, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/rapidash.asm b/data/pokemon/base_stats/rapidash.asm new file mode 100644 index 0000000..e629cb7 --- /dev/null +++ b/data/pokemon/base_stats/rapidash.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 100, 70, 105, 80, 80 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 60 ; catch rate + db 192 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/rapidash/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/raticate.asm b/data/pokemon/base_stats/raticate.asm new file mode 100644 index 0000000..02ee879 --- /dev/null +++ b/data/pokemon/base_stats/raticate.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 81, 60, 97, 50, 70 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 90 ; catch rate + db 116 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/raticate/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, THIEF, CUT, STRENGTH, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/rattata.asm b/data/pokemon/base_stats/rattata.asm new file mode 100644 index 0000000..241c91a --- /dev/null +++ b/data/pokemon/base_stats/rattata.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 30, 56, 35, 72, 25, 35 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 255 ; catch rate + db 57 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/rattata/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, THIEF + ; end diff --git a/data/pokemon/base_stats/remoraid.asm b/data/pokemon/base_stats/remoraid.asm new file mode 100644 index 0000000..67afd46 --- /dev/null +++ b/data/pokemon/base_stats/remoraid.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 35, 65, 35, 65, 65, 35 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 190 ; catch rate + db 78 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/remoraid/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_WATER_2 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, REST, ATTRACT, THIEF, SURF, WHIRLPOOL, FLAMETHROWER, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/rhydon.asm b/data/pokemon/base_stats/rhydon.asm new file mode 100644 index 0000000..b6a21d2 --- /dev/null +++ b/data/pokemon/base_stats/rhydon.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 105, 130, 120, 40, 45, 45 + ; hp atk def spd sat sdf + + db GROUND, ROCK ; type + db 60 ; catch rate + db 204 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/rhydon/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_MONSTER, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/rhyhorn.asm b/data/pokemon/base_stats/rhyhorn.asm new file mode 100644 index 0000000..0f908df --- /dev/null +++ b/data/pokemon/base_stats/rhyhorn.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 80, 85, 95, 25, 30, 30 + ; hp atk def spd sat sdf + + db GROUND, ROCK ; type + db 120 ; catch rate + db 135 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/rhyhorn/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_MONSTER, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, REST, ATTRACT, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/sandshrew.asm b/data/pokemon/base_stats/sandshrew.asm new file mode 100644 index 0000000..ac1dabf --- /dev/null +++ b/data/pokemon/base_stats/sandshrew.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 75, 85, 40, 20, 30 + ; hp atk def spd sat sdf + + db GROUND, GROUND ; type + db 255 ; catch rate + db 93 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/sandshrew/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/sandslash.asm b/data/pokemon/base_stats/sandslash.asm new file mode 100644 index 0000000..5a6c9d5 --- /dev/null +++ b/data/pokemon/base_stats/sandslash.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 100, 110, 65, 45, 55 + ; hp atk def spd sat sdf + + db GROUND, GROUND ; type + db 90 ; catch rate + db 163 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/sandslash/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DEFENSE_CURL, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, CUT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/scizor.asm b/data/pokemon/base_stats/scizor.asm new file mode 100644 index 0000000..e65fa51 --- /dev/null +++ b/data/pokemon/base_stats/scizor.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 130, 100, 65, 55, 80 + ; hp atk def spd sat sdf + + db BUG, STEEL ; type + db 25 ; catch rate + db 200 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/scizor/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FURY_CUTTER, CUT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/scyther.asm b/data/pokemon/base_stats/scyther.asm new file mode 100644 index 0000000..3850854 --- /dev/null +++ b/data/pokemon/base_stats/scyther.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 110, 80, 105, 55, 80 + ; hp atk def spd sat sdf + + db BUG, FLYING ; type + db 45 ; catch rate + db 187 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/scyther/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FURY_CUTTER, CUT + ; end diff --git a/data/pokemon/base_stats/seadra.asm b/data/pokemon/base_stats/seadra.asm new file mode 100644 index 0000000..0e164d8 --- /dev/null +++ b/data/pokemon/base_stats/seadra.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 65, 95, 85, 95, 45 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 75 ; catch rate + db 155 ; base exp + db NO_ITEM, DRAGON_SCALE ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/seadra/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_DRAGON ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, DRAGONBREATH, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/seaking.asm b/data/pokemon/base_stats/seaking.asm new file mode 100644 index 0000000..b3f3788 --- /dev/null +++ b/data/pokemon/base_stats/seaking.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 80, 92, 65, 68, 65, 80 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 60 ; catch rate + db 170 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/seaking/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_2, EGG_WATER_2 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/seel.asm b/data/pokemon/base_stats/seel.asm new file mode 100644 index 0000000..e8980ed --- /dev/null +++ b/data/pokemon/base_stats/seel.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 45, 55, 45, 45, 70 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 190 ; catch rate + db 100 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/seel/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/sentret.asm b/data/pokemon/base_stats/sentret.asm new file mode 100644 index 0000000..dc98906 --- /dev/null +++ b/data/pokemon/base_stats/sentret.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 35, 46, 34, 20, 35, 45 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 255 ; catch rate + db 57 ; base exp + db NO_ITEM, BERRY ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/sentret/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, CUT, SURF + ; end diff --git a/data/pokemon/base_stats/shellder.asm b/data/pokemon/base_stats/shellder.asm new file mode 100644 index 0000000..ebb6006 --- /dev/null +++ b/data/pokemon/base_stats/shellder.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 30, 65, 100, 40, 45, 25 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 190 ; catch rate + db 97 ; base exp + db PEARL, BIG_PEARL ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/shellder/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_3, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/shuckle.asm b/data/pokemon/base_stats/shuckle.asm new file mode 100644 index 0000000..cd0918f --- /dev/null +++ b/data/pokemon/base_stats/shuckle.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 20, 10, 230, 05, 10, 230 + ; hp atk def spd sat sdf + + db BUG, ROCK ; type + db 190 ; catch rate + db 80 ; base exp + db BERRY, BERRY ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/shuckle/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, STRENGTH, FLASH + ; end diff --git a/data/pokemon/base_stats/skarmory.asm b/data/pokemon/base_stats/skarmory.asm new file mode 100644 index 0000000..bb37890 --- /dev/null +++ b/data/pokemon/base_stats/skarmory.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 80, 140, 70, 40, 70 + ; hp atk def spd sat sdf + + db STEEL, FLYING ; type + db 25 ; catch rate + db 168 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/skarmory/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, CUT, FLY + ; end diff --git a/data/pokemon/base_stats/skiploom.asm b/data/pokemon/base_stats/skiploom.asm new file mode 100644 index 0000000..50c88b5 --- /dev/null +++ b/data/pokemon/base_stats/skiploom.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 45, 50, 80, 45, 65 + ; hp atk def spd sat sdf + + db GRASS, FLYING ; type + db 120 ; catch rate + db 136 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/skiploom/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_FAIRY, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FLASH + ; end diff --git a/data/pokemon/base_stats/slowbro.asm b/data/pokemon/base_stats/slowbro.asm new file mode 100644 index 0000000..a32ca3a --- /dev/null +++ b/data/pokemon/base_stats/slowbro.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 95, 75, 110, 30, 100, 80 + ; hp atk def spd sat sdf + + db WATER, PSYCHIC_TYPE ; type + db 75 ; catch rate + db 164 ; base exp + db NO_ITEM, KINGS_ROCK ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/slowbro/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MONSTER, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DREAM_EATER, REST, ATTRACT, FURY_CUTTER, NIGHTMARE, SURF, STRENGTH, FLASH, FLAMETHROWER, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/slowking.asm b/data/pokemon/base_stats/slowking.asm new file mode 100644 index 0000000..293c526 --- /dev/null +++ b/data/pokemon/base_stats/slowking.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 95, 75, 80, 30, 100, 110 + ; hp atk def spd sat sdf + + db WATER, PSYCHIC_TYPE ; type + db 70 ; catch rate + db 164 ; base exp + db NO_ITEM, KINGS_ROCK ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/slowking/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MONSTER, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DREAM_EATER, REST, ATTRACT, FURY_CUTTER, NIGHTMARE, SURF, STRENGTH, FLASH, WHIRLPOOL, FLAMETHROWER, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/slowpoke.asm b/data/pokemon/base_stats/slowpoke.asm new file mode 100644 index 0000000..93c1bcd --- /dev/null +++ b/data/pokemon/base_stats/slowpoke.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 65, 65, 15, 40, 40 + ; hp atk def spd sat sdf + + db WATER, PSYCHIC_TYPE ; type + db 190 ; catch rate + db 99 ; base exp + db NO_ITEM, KINGS_ROCK ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/slowpoke/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MONSTER, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DREAM_EATER, REST, ATTRACT, NIGHTMARE, SURF, STRENGTH, FLASH, FLAMETHROWER, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/slugma.asm b/data/pokemon/base_stats/slugma.asm new file mode 100644 index 0000000..69f2043 --- /dev/null +++ b/data/pokemon/base_stats/slugma.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 40, 40, 20, 70, 40 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 190 ; catch rate + db 78 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/slugma/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_INDETERMINATE, EGG_INDETERMINATE ; egg groups + + ; tm/hm learnset + tmhm CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, REST, ATTRACT, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/smeargle.asm b/data/pokemon/base_stats/smeargle.asm new file mode 100644 index 0000000..12293a1 --- /dev/null +++ b/data/pokemon/base_stats/smeargle.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 20, 35, 75, 20, 45 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 45 ; catch rate + db 106 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/smeargle/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm + ; end diff --git a/data/pokemon/base_stats/smoochum.asm b/data/pokemon/base_stats/smoochum.asm new file mode 100644 index 0000000..cb097ac --- /dev/null +++ b/data/pokemon/base_stats/smoochum.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 45, 30, 15, 65, 85, 65 + ; hp atk def spd sat sdf + + db ICE, PSYCHIC_TYPE ; type + db 45 ; catch rate + db 87 ; base exp + db ICE_BERRY, ICE_BERRY ; items + db GENDER_F100 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/smoochum/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SWEET_SCENT, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DREAM_EATER, REST, ATTRACT, THIEF, NIGHTMARE, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/sneasel.asm b/data/pokemon/base_stats/sneasel.asm new file mode 100644 index 0000000..9e46100 --- /dev/null +++ b/data/pokemon/base_stats/sneasel.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 95, 55, 115, 35, 75 + ; hp atk def spd sat sdf + + db DARK, ICE ; type + db 60 ; catch rate + db 132 ; base exp + db NO_ITEM, QUICK_CLAW ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/sneasel/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, FURY_CUTTER, NIGHTMARE, CUT, SURF, STRENGTH, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/snorlax.asm b/data/pokemon/base_stats/snorlax.asm new file mode 100644 index 0000000..154913f --- /dev/null +++ b/data/pokemon/base_stats/snorlax.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 160, 110, 65, 30, 65, 110 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 25 ; catch rate + db 154 ; base exp + db LEFTOVERS, LEFTOVERS ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 40 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/snorlax/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_MONSTER, EGG_MONSTER ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, EARTHQUAKE, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, FIRE_PUNCH, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/snubbull.asm b/data/pokemon/base_stats/snubbull.asm new file mode 100644 index 0000000..c879dbd --- /dev/null +++ b/data/pokemon/base_stats/snubbull.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 80, 50, 30, 40, 40 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 190 ; catch rate + db 63 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F75 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/snubbull/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_GROUND, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/spearow.asm b/data/pokemon/base_stats/spearow.asm new file mode 100644 index 0000000..1d47e34 --- /dev/null +++ b/data/pokemon/base_stats/spearow.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 60, 30, 70, 31, 31 + ; hp atk def spd sat sdf + + db NORMAL, FLYING ; type + db 255 ; catch rate + db 58 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/spearow/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING, FLY + ; end diff --git a/data/pokemon/base_stats/spinarak.asm b/data/pokemon/base_stats/spinarak.asm new file mode 100644 index 0000000..725b0e9 --- /dev/null +++ b/data/pokemon/base_stats/spinarak.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 60, 40, 30, 40, 40 + ; hp atk def spd sat sdf + + db BUG, POISON ; type + db 255 ; catch rate + db 54 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/spinarak/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DIG, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, FLASH + ; end diff --git a/data/pokemon/base_stats/squirtle.asm b/data/pokemon/base_stats/squirtle.asm new file mode 100644 index 0000000..92f051a --- /dev/null +++ b/data/pokemon/base_stats/squirtle.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 44, 48, 65, 43, 50, 64 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 45 ; catch rate + db 66 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/squirtle/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/stantler.asm b/data/pokemon/base_stats/stantler.asm new file mode 100644 index 0000000..7cc7c2d --- /dev/null +++ b/data/pokemon/base_stats/stantler.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 73, 95, 62, 85, 85, 65 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 45 ; catch rate + db 165 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/stantler/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, PSYCHIC_M, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, FLASH + ; end diff --git a/data/pokemon/base_stats/starmie.asm b/data/pokemon/base_stats/starmie.asm new file mode 100644 index 0000000..9352b43 --- /dev/null +++ b/data/pokemon/base_stats/starmie.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 75, 85, 115, 100, 85 + ; hp atk def spd sat sdf + + db WATER, PSYCHIC_TYPE ; type + db 60 ; catch rate + db 207 ; base exp + db STARDUST, STAR_PIECE ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/starmie/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_3, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, REST, ATTRACT, NIGHTMARE, SURF, FLASH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/staryu.asm b/data/pokemon/base_stats/staryu.asm new file mode 100644 index 0000000..f5fe063 --- /dev/null +++ b/data/pokemon/base_stats/staryu.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 30, 45, 55, 85, 70, 55 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 225 ; catch rate + db 106 ; base exp + db STARDUST, STAR_PIECE ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/staryu/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_3, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, ATTRACT, SURF, FLASH, WHIRLPOOL, WATERFALL, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/steelix.asm b/data/pokemon/base_stats/steelix.asm new file mode 100644 index 0000000..cf18201 --- /dev/null +++ b/data/pokemon/base_stats/steelix.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 85, 200, 30, 55, 65 + ; hp atk def spd sat sdf + + db STEEL, GROUND ; type + db 25 ; catch rate + db 196 ; base exp + db NO_ITEM, METAL_COAT ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/steelix/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MINERAL, EGG_MINERAL ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, CUT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/sudowoodo.asm b/data/pokemon/base_stats/sudowoodo.asm new file mode 100644 index 0000000..f188826 --- /dev/null +++ b/data/pokemon/base_stats/sudowoodo.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 100, 115, 30, 30, 65 + ; hp atk def spd sat sdf + + db ROCK, ROCK ; type + db 65 ; catch rate + db 135 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/sudowoodo/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MINERAL, EGG_MINERAL ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SANDSTORM, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, STRENGTH + ; end diff --git a/data/pokemon/base_stats/suicune.asm b/data/pokemon/base_stats/suicune.asm new file mode 100644 index 0000000..e3da0e1 --- /dev/null +++ b/data/pokemon/base_stats/suicune.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 100, 75, 115, 85, 90, 115 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 3 ; catch rate + db 215 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 80 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/suicune/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, CUT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/sunflora.asm b/data/pokemon/base_stats/sunflora.asm new file mode 100644 index 0000000..28c3218 --- /dev/null +++ b/data/pokemon/base_stats/sunflora.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 75, 55, 30, 105, 85 + ; hp atk def spd sat sdf + + db GRASS, GRASS ; type + db 120 ; catch rate + db 146 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/sunflora/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_PLANT, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/sunkern.asm b/data/pokemon/base_stats/sunkern.asm new file mode 100644 index 0000000..6d07fee --- /dev/null +++ b/data/pokemon/base_stats/sunkern.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 30, 30, 30, 30, 30, 30 + ; hp atk def spd sat sdf + + db GRASS, GRASS ; type + db 235 ; catch rate + db 52 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/sunkern/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_PLANT, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/swinub.asm b/data/pokemon/base_stats/swinub.asm new file mode 100644 index 0000000..f618899 --- /dev/null +++ b/data/pokemon/base_stats/swinub.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 50, 40, 50, 30, 30 + ; hp atk def spd sat sdf + + db ICE, GROUND ; type + db 225 ; catch rate + db 78 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/swinub/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, DETECT, REST, ATTRACT, STRENGTH, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/tangela.asm b/data/pokemon/base_stats/tangela.asm new file mode 100644 index 0000000..ca711c6 --- /dev/null +++ b/data/pokemon/base_stats/tangela.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 55, 115, 60, 100, 40 + ; hp atk def spd sat sdf + + db GRASS, GRASS ; type + db 45 ; catch rate + db 166 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/tangela/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_PLANT, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, THIEF, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/tauros.asm b/data/pokemon/base_stats/tauros.asm new file mode 100644 index 0000000..95bf8a0 --- /dev/null +++ b/data/pokemon/base_stats/tauros.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 100, 95, 110, 40, 70 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 45 ; catch rate + db 211 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F0 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/tauros/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, THUNDER, EARTHQUAKE, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, REST, ATTRACT, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/teddiursa.asm b/data/pokemon/base_stats/teddiursa.asm new file mode 100644 index 0000000..f6ed88f --- /dev/null +++ b/data/pokemon/base_stats/teddiursa.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 80, 50, 40, 50, 50 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 120 ; catch rate + db 124 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/teddiursa/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/tentacool.asm b/data/pokemon/base_stats/tentacool.asm new file mode 100644 index 0000000..bd8e2ac --- /dev/null +++ b/data/pokemon/base_stats/tentacool.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 40, 35, 70, 50, 100 + ; hp atk def spd sat sdf + + db WATER, POISON ; type + db 190 ; catch rate + db 105 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/tentacool/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_3, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, SURF, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/tentacruel.asm b/data/pokemon/base_stats/tentacruel.asm new file mode 100644 index 0000000..665b71c --- /dev/null +++ b/data/pokemon/base_stats/tentacruel.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 80, 70, 65, 100, 80, 120 + ; hp atk def spd sat sdf + + db WATER, POISON ; type + db 60 ; catch rate + db 205 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/tentacruel/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_WATER_3, EGG_WATER_3 ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, SURF, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/togepi.asm b/data/pokemon/base_stats/togepi.asm new file mode 100644 index 0000000..c4971de --- /dev/null +++ b/data/pokemon/base_stats/togepi.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 35, 20, 65, 20, 40, 65 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 190 ; catch rate + db 74 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 10 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/togepi/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, FLASH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/togetic.asm b/data/pokemon/base_stats/togetic.asm new file mode 100644 index 0000000..c3a4b10 --- /dev/null +++ b/data/pokemon/base_stats/togetic.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 40, 85, 40, 80, 105 + ; hp atk def spd sat sdf + + db NORMAL, FLYING ; type + db 75 ; catch rate + db 114 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 10 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/togetic/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_FLYING, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, ROCK_SMASH, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, DREAM_EATER, DETECT, REST, ATTRACT, STEEL_WING, FLY, FLASH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/totodile.asm b/data/pokemon/base_stats/totodile.asm new file mode 100644 index 0000000..f06b4c9 --- /dev/null +++ b/data/pokemon/base_stats/totodile.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 50, 65, 64, 43, 44, 48 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 45 ; catch rate + db 66 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/totodile/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DETECT, REST, ATTRACT, CUT, SURF, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/typhlosion.asm b/data/pokemon/base_stats/typhlosion.asm new file mode 100644 index 0000000..e766b7d --- /dev/null +++ b/data/pokemon/base_stats/typhlosion.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 78, 84, 78, 100, 109, 85 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 45 ; catch rate + db 209 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/typhlosion/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, DEFENSE_CURL, THUNDERPUNCH, DETECT, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/tyranitar.asm b/data/pokemon/base_stats/tyranitar.asm new file mode 100644 index 0000000..67d9517 --- /dev/null +++ b/data/pokemon/base_stats/tyranitar.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 100, 134, 110, 61, 95, 100 + ; hp atk def spd sat sdf + + db ROCK, DARK ; type + db 45 ; catch rate + db 218 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 40 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/tyranitar/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_MONSTER, EGG_MONSTER ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROAR, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, DRAGONBREATH, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, FIRE_BLAST, DETECT, REST, ATTRACT, FIRE_PUNCH, FURY_CUTTER, NIGHTMARE, CUT, SURF, STRENGTH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/tyrogue.asm b/data/pokemon/base_stats/tyrogue.asm new file mode 100644 index 0000000..5989979 --- /dev/null +++ b/data/pokemon/base_stats/tyrogue.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 35, 35, 35, 35, 35, 35 + ; hp atk def spd sat sdf + + db FIGHTING, FIGHTING ; type + db 75 ; catch rate + db 91 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F0 ; gender ratio + db 100 ; unknown 1 + db 25 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/tyrogue/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STRENGTH + ; end diff --git a/data/pokemon/base_stats/umbreon.asm b/data/pokemon/base_stats/umbreon.asm new file mode 100644 index 0000000..bc0f0bb --- /dev/null +++ b/data/pokemon/base_stats/umbreon.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 95, 65, 110, 65, 60, 130 + ; hp atk def spd sat sdf + + db DARK, DARK ; type + db 45 ; catch rate + db 197 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 35 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/umbreon/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, NIGHTMARE, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/unown.asm b/data/pokemon/base_stats/unown.asm new file mode 100644 index 0000000..ffe377e --- /dev/null +++ b/data/pokemon/base_stats/unown.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 48, 72, 48, 48, 72, 48 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, PSYCHIC_TYPE ; type + db 225 ; catch rate + db 61 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 40 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/unown_a/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm + ; end diff --git a/data/pokemon/base_stats/ursaring.asm b/data/pokemon/base_stats/ursaring.asm new file mode 100644 index 0000000..7a17e75 --- /dev/null +++ b/data/pokemon/base_stats/ursaring.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 130, 75, 55, 75, 75 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 60 ; catch rate + db 189 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/ursaring/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SWIFT, DEFENSE_CURL, THUNDERPUNCH, REST, ATTRACT, THIEF, FIRE_PUNCH, FURY_CUTTER, CUT, STRENGTH + ; end diff --git a/data/pokemon/base_stats/vaporeon.asm b/data/pokemon/base_stats/vaporeon.asm new file mode 100644 index 0000000..c5d24ec --- /dev/null +++ b/data/pokemon/base_stats/vaporeon.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 130, 65, 60, 65, 110, 95 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 45 ; catch rate + db 196 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 35 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/vaporeon/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, SURF, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/venomoth.asm b/data/pokemon/base_stats/venomoth.asm new file mode 100644 index 0000000..1e9cb95 --- /dev/null +++ b/data/pokemon/base_stats/venomoth.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 70, 65, 60, 90, 90, 75 + ; hp atk def spd sat sdf + + db BUG, POISON ; type + db 75 ; catch rate + db 138 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/venomoth/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, REST, ATTRACT, THIEF, FLASH + ; end diff --git a/data/pokemon/base_stats/venonat.asm b/data/pokemon/base_stats/venonat.asm new file mode 100644 index 0000000..06a799e --- /dev/null +++ b/data/pokemon/base_stats/venonat.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 60, 55, 50, 45, 40, 55 + ; hp atk def spd sat sdf + + db BUG, POISON ; type + db 190 ; catch rate + db 75 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/venonat/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SWIFT, REST, ATTRACT, THIEF + ; end diff --git a/data/pokemon/base_stats/venusaur.asm b/data/pokemon/base_stats/venusaur.asm new file mode 100644 index 0000000..9373e85 --- /dev/null +++ b/data/pokemon/base_stats/venusaur.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 80, 82, 83, 80, 100, 100 + ; hp atk def spd sat sdf + + db GRASS, POISON ; type + db 45 ; catch rate + db 208 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/venusaur/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROAR, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, FURY_CUTTER, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/victreebel.asm b/data/pokemon/base_stats/victreebel.asm new file mode 100644 index 0000000..55c2236 --- /dev/null +++ b/data/pokemon/base_stats/victreebel.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 80, 105, 65, 70, 100, 60 + ; hp atk def spd sat sdf + + db GRASS, POISON ; type + db 45 ; catch rate + db 191 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/victreebel/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_PLANT, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/vileplume.asm b/data/pokemon/base_stats/vileplume.asm new file mode 100644 index 0000000..cd91f89 --- /dev/null +++ b/data/pokemon/base_stats/vileplume.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 75, 80, 85, 50, 100, 90 + ; hp atk def spd sat sdf + + db GRASS, POISON ; type + db 45 ; catch rate + db 184 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/vileplume/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_PLANT, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/voltorb.asm b/data/pokemon/base_stats/voltorb.asm new file mode 100644 index 0000000..2551aa4 --- /dev/null +++ b/data/pokemon/base_stats/voltorb.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 30, 50, 100, 55, 55 + ; hp atk def spd sat sdf + + db ELECTRIC, ELECTRIC ; type + db 190 ; catch rate + db 103 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/voltorb/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_MINERAL, EGG_MINERAL ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, REST, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/vulpix.asm b/data/pokemon/base_stats/vulpix.asm new file mode 100644 index 0000000..2391e2b --- /dev/null +++ b/data/pokemon/base_stats/vulpix.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 38, 41, 40, 65, 50, 65 + ; hp atk def spd sat sdf + + db FIRE, FIRE ; type + db 190 ; catch rate + db 63 ; base exp + db BURNT_BERRY, BURNT_BERRY ; items + db GENDER_F75 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/vulpix/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_GROUND, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, FIRE_BLAST, SWIFT, REST, ATTRACT, FLAMETHROWER + ; end diff --git a/data/pokemon/base_stats/wartortle.asm b/data/pokemon/base_stats/wartortle.asm new file mode 100644 index 0000000..ef2a345 --- /dev/null +++ b/data/pokemon/base_stats/wartortle.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 59, 63, 80, 58, 65, 80 + ; hp atk def spd sat sdf + + db WATER, WATER ; type + db 45 ; catch rate + db 143 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F12_5 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/wartortle/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_MONSTER, EGG_WATER_1 ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, BLIZZARD, ICY_WIND, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, DEFENSE_CURL, REST, ATTRACT, SURF, STRENGTH, WHIRLPOOL, WATERFALL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/weedle.asm b/data/pokemon/base_stats/weedle.asm new file mode 100644 index 0000000..0943025 --- /dev/null +++ b/data/pokemon/base_stats/weedle.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 35, 30, 50, 20, 20 + ; hp atk def spd sat sdf + + db BUG, POISON ; type + db 255 ; catch rate + db 52 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/weedle/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm + ; end diff --git a/data/pokemon/base_stats/weepinbell.asm b/data/pokemon/base_stats/weepinbell.asm new file mode 100644 index 0000000..6c3f254 --- /dev/null +++ b/data/pokemon/base_stats/weepinbell.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 90, 50, 55, 85, 45 + ; hp atk def spd sat sdf + + db GRASS, POISON ; type + db 120 ; catch rate + db 151 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/weepinbell/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_SLOW ; growth rate + dn EGG_PLANT, EGG_PLANT ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SWEET_SCENT, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, REST, ATTRACT, CUT, FLASH + ; end diff --git a/data/pokemon/base_stats/weezing.asm b/data/pokemon/base_stats/weezing.asm new file mode 100644 index 0000000..c9ce0ac --- /dev/null +++ b/data/pokemon/base_stats/weezing.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 90, 120, 60, 85, 70 + ; hp atk def spd sat sdf + + db POISON, POISON ; type + db 60 ; catch rate + db 173 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/weezing/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_INDETERMINATE, EGG_INDETERMINATE ; egg groups + + ; tm/hm learnset + tmhm CURSE, ROLLOUT, TOXIC, ZAP_CANNON, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, ENDURE, FRUSTRATION, THUNDER, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, FIRE_BLAST, REST, ATTRACT, THIEF, FLAMETHROWER, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/wigglytuff.asm b/data/pokemon/base_stats/wigglytuff.asm new file mode 100644 index 0000000..3d82681 --- /dev/null +++ b/data/pokemon/base_stats/wigglytuff.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 140, 70, 45, 45, 75, 50 + ; hp atk def spd sat sdf + + db NORMAL, NORMAL ; type + db 50 ; catch rate + db 109 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F75 ; gender ratio + db 100 ; unknown 1 + db 10 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/wigglytuff/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_FAST ; growth rate + dn EGG_FAIRY, EGG_FAIRY ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ZAP_CANNON, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, BLIZZARD, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, SOLARBEAM, THUNDER, RETURN, PSYCHIC_M, SHADOW_BALL, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, FIRE_BLAST, DEFENSE_CURL, THUNDERPUNCH, DREAM_EATER, DETECT, REST, ATTRACT, FIRE_PUNCH, NIGHTMARE, STRENGTH, FLASH, FLAMETHROWER, THUNDERBOLT, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/wobbuffet.asm b/data/pokemon/base_stats/wobbuffet.asm new file mode 100644 index 0000000..77a85ce --- /dev/null +++ b/data/pokemon/base_stats/wobbuffet.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 190, 33, 58, 33, 33, 58 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, PSYCHIC_TYPE ; type + db 45 ; catch rate + db 177 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/wobbuffet/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_INDETERMINATE, EGG_INDETERMINATE ; egg groups + + ; tm/hm learnset + tmhm + ; end diff --git a/data/pokemon/base_stats/wooper.asm b/data/pokemon/base_stats/wooper.asm new file mode 100644 index 0000000..4446fc5 --- /dev/null +++ b/data/pokemon/base_stats/wooper.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 55, 45, 45, 15, 25, 25 + ; hp atk def spd sat sdf + + db WATER, GROUND ; type + db 255 ; catch rate + db 52 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/wooper/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_WATER_1, EGG_GROUND ; egg groups + + ; tm/hm learnset + tmhm DYNAMICPUNCH, HEADBUTT, CURSE, ROLLOUT, TOXIC, ROCK_SMASH, HIDDEN_POWER, SNORE, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, IRON_TAIL, EARTHQUAKE, RETURN, DIG, MUD_SLAP, DOUBLE_TEAM, ICE_PUNCH, SWAGGER, SLEEP_TALK, SLUDGE_BOMB, SANDSTORM, DEFENSE_CURL, REST, ATTRACT, SURF, FLASH, WHIRLPOOL, ICE_BEAM + ; end diff --git a/data/pokemon/base_stats/xatu.asm b/data/pokemon/base_stats/xatu.asm new file mode 100644 index 0000000..47d512a --- /dev/null +++ b/data/pokemon/base_stats/xatu.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 75, 70, 95, 95, 70 + ; hp atk def spd sat sdf + + db PSYCHIC_TYPE, FLYING ; type + db 75 ; catch rate + db 171 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/xatu/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, PSYCH_UP, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, PSYCHIC_M, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DREAM_EATER, DETECT, REST, ATTRACT, THIEF, NIGHTMARE, FLY, FLASH + ; end diff --git a/data/pokemon/base_stats/yanma.asm b/data/pokemon/base_stats/yanma.asm new file mode 100644 index 0000000..806a73c --- /dev/null +++ b/data/pokemon/base_stats/yanma.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 65, 65, 45, 95, 75, 45 + ; hp atk def spd sat sdf + + db BUG, FLYING ; type + db 75 ; catch rate + db 147 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 20 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/yanma/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_BUG, EGG_BUG ; egg groups + + ; tm/hm learnset + tmhm HEADBUTT, CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, SOLARBEAM, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, FLASH + ; end diff --git a/data/pokemon/base_stats/zapdos.asm b/data/pokemon/base_stats/zapdos.asm new file mode 100644 index 0000000..3724f79 --- /dev/null +++ b/data/pokemon/base_stats/zapdos.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 90, 90, 85, 100, 125, 90 + ; hp atk def spd sat sdf + + db ELECTRIC, FLYING ; type + db 3 ; catch rate + db 216 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_UNKNOWN ; gender ratio + db 100 ; unknown 1 + db 80 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/zapdos/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_SLOW ; growth rate + dn EGG_NONE, EGG_NONE ; egg groups + + ; tm/hm learnset + tmhm CURSE, ROAR, TOXIC, ZAP_CANNON, ROCK_SMASH, HIDDEN_POWER, SUNNY_DAY, SNORE, HYPER_BEAM, PROTECT, RAIN_DANCE, ENDURE, FRUSTRATION, THUNDER, RETURN, MUD_SLAP, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SANDSTORM, SWIFT, DETECT, REST, STEEL_WING, FLY, FLASH, THUNDERBOLT + ; end diff --git a/data/pokemon/base_stats/zubat.asm b/data/pokemon/base_stats/zubat.asm new file mode 100644 index 0000000..948dbd9 --- /dev/null +++ b/data/pokemon/base_stats/zubat.asm @@ -0,0 +1,21 @@ + db 0 ; species ID placeholder + + db 40, 45, 35, 55, 30, 40 + ; hp atk def spd sat sdf + + db POISON, FLYING ; type + db 255 ; catch rate + db 54 ; base exp + db NO_ITEM, NO_ITEM ; items + db GENDER_F50 ; gender ratio + db 100 ; unknown 1 + db 15 ; step cycles to hatch + db 5 ; unknown 2 + INCBIN "gfx/pokemon/zubat/front.dimensions" + dw NULL, NULL ; unused (beta front/back pics) + db GROWTH_MEDIUM_FAST ; growth rate + dn EGG_FLYING, EGG_FLYING ; egg groups + + ; tm/hm learnset + tmhm CURSE, TOXIC, HIDDEN_POWER, SUNNY_DAY, SNORE, PROTECT, GIGA_DRAIN, ENDURE, FRUSTRATION, RETURN, DOUBLE_TEAM, SWAGGER, SLEEP_TALK, SWIFT, DETECT, REST, ATTRACT, THIEF, STEEL_WING + ; end diff --git a/data/pokemon/cries.asm b/data/pokemon/cries.asm new file mode 100644 index 0000000..09c085a --- /dev/null +++ b/data/pokemon/cries.asm @@ -0,0 +1,260 @@ +MACRO mon_cry +; index, pitch, length + dw \1, \2, \3 +ENDM + +PokemonCries:: +; entries correspond to constants/pokemon_constants.asm + table_width MON_CRY_LENGTH, PokemonCries + mon_cry CRY_BULBASAUR, 128, 129 ; BULBASAUR + mon_cry CRY_BULBASAUR, 32, 256 ; IVYSAUR + mon_cry CRY_BULBASAUR, 0, 320 ; VENUSAUR + mon_cry CRY_CHARMANDER, 96, 192 ; CHARMANDER + mon_cry CRY_CHARMANDER, 32, 192 ; CHARMELEON + mon_cry CRY_CHARMANDER, 0, 256 ; CHARIZARD + mon_cry CRY_SQUIRTLE, 96, 192 ; SQUIRTLE + mon_cry CRY_SQUIRTLE, 32, 192 ; WARTORTLE + mon_cry CRY_BLASTOISE, 0, 256 ; BLASTOISE + mon_cry CRY_CATERPIE, 128, 160 ; CATERPIE + mon_cry CRY_METAPOD, 204, 129 ; METAPOD + mon_cry CRY_CATERPIE, 119, 192 ; BUTTERFREE + mon_cry CRY_WEEDLE, 238, 129 ; WEEDLE + mon_cry CRY_BLASTOISE, 255, 129 ; KAKUNA + mon_cry CRY_BLASTOISE, 96, 256 ; BEEDRILL + mon_cry CRY_PIDGEY, 223, 132 ; PIDGEY + mon_cry CRY_PIDGEOTTO, 40, 320 ; PIDGEOTTO + mon_cry CRY_PIDGEOTTO, 17, 383 ; PIDGEOT + mon_cry CRY_RATTATA, 0, 256 ; RATTATA + mon_cry CRY_RATTATA, 32, 383 ; RATICATE + mon_cry CRY_SPEAROW, 0, 256 ; SPEAROW + mon_cry CRY_FEAROW, 64, 288 ; FEAROW + mon_cry CRY_EKANS, 18, 192 ; EKANS + mon_cry CRY_EKANS, 224, 144 ; ARBOK + mon_cry CRY_BULBASAUR, 238, 129 ; PIKACHU + mon_cry CRY_RAICHU, 238, 136 ; RAICHU + mon_cry CRY_NIDORAN_M, 32, 192 ; SANDSHREW + mon_cry CRY_NIDORAN_M, 255, 383 ; SANDSLASH + mon_cry CRY_NIDORAN_F, 0, 256 ; NIDORAN_F + mon_cry CRY_NIDORAN_F, 44, 352 ; NIDORINA + mon_cry CRY_NIDOQUEEN, 0, 256 ; NIDOQUEEN + mon_cry CRY_NIDORAN_M, 0, 256 ; NIDORAN_M + mon_cry CRY_NIDORAN_M, 44, 320 ; NIDORINO + mon_cry CRY_RAICHU, 0, 256 ; NIDOKING + mon_cry CRY_CLEFAIRY, 204, 129 ; CLEFAIRY + mon_cry CRY_CLEFAIRY, 170, 160 ; CLEFABLE + mon_cry CRY_VULPIX, 79, 144 ; VULPIX + mon_cry CRY_VULPIX, 136, 224 ; NINETALES + mon_cry CRY_PIDGEY, 255, 181 ; JIGGLYPUFF + mon_cry CRY_PIDGEY, 104, 224 ; WIGGLYTUFF + mon_cry CRY_SQUIRTLE, 224, 256 ; ZUBAT + mon_cry CRY_SQUIRTLE, 250, 256 ; GOLBAT + mon_cry CRY_ODDISH, 221, 129 ; ODDISH + mon_cry CRY_ODDISH, 170, 192 ; GLOOM + mon_cry CRY_VILEPLUME, 34, 383 ; VILEPLUME + mon_cry CRY_PARAS, 32, 352 ; PARAS + mon_cry CRY_PARAS, 66, 383 ; PARASECT + mon_cry CRY_VENONAT, 68, 192 ; VENONAT + mon_cry CRY_VENONAT, 41, 256 ; VENOMOTH + mon_cry CRY_DIGLETT, 170, 129 ; DIGLETT + mon_cry CRY_DIGLETT, 42, 144 ; DUGTRIO + mon_cry CRY_CLEFAIRY, 119, 144 ; MEOWTH + mon_cry CRY_CLEFAIRY, 153, 383 ; PERSIAN + mon_cry CRY_PSYDUCK, 32, 224 ; PSYDUCK + mon_cry CRY_PSYDUCK, 255, 192 ; GOLDUCK + mon_cry CRY_NIDOQUEEN, 221, 224 ; MANKEY + mon_cry CRY_NIDOQUEEN, 175, 192 ; PRIMEAPE + mon_cry CRY_GROWLITHE, 32, 192 ; GROWLITHE + mon_cry CRY_WEEDLE, 0, 256 ; ARCANINE + mon_cry CRY_PIDGEY, 255, 383 ; POLIWAG + mon_cry CRY_PIDGEY, 119, 224 ; POLIWHIRL + mon_cry CRY_PIDGEY, 0, 383 ; POLIWRATH + mon_cry CRY_METAPOD, 192, 129 ; ABRA + mon_cry CRY_METAPOD, 168, 320 ; KADABRA + mon_cry CRY_METAPOD, 152, 383 ; ALAKAZAM + mon_cry CRY_GROWLITHE, 238, 129 ; MACHOP + mon_cry CRY_GROWLITHE, 72, 224 ; MACHOKE + mon_cry CRY_GROWLITHE, 8, 320 ; MACHAMP + mon_cry CRY_PSYDUCK, 85, 129 ; BELLSPROUT + mon_cry CRY_WEEPINBELL, 68, 160 ; WEEPINBELL + mon_cry CRY_WEEPINBELL, 102, 332 ; VICTREEBEL + mon_cry CRY_VENONAT, 0, 256 ; TENTACOOL + mon_cry CRY_VENONAT, 238, 383 ; TENTACRUEL + mon_cry CRY_VULPIX, 240, 144 ; GEODUDE + mon_cry CRY_VULPIX, 0, 256 ; GRAVELER + mon_cry CRY_GOLEM, 224, 192 ; GOLEM + mon_cry CRY_WEEPINBELL, 0, 256 ; PONYTA + mon_cry CRY_WEEPINBELL, 32, 320 ; RAPIDASH + mon_cry CRY_SLOWPOKE, 0, 256 ; SLOWPOKE + mon_cry CRY_GROWLITHE, 0, 256 ; SLOWBRO + mon_cry CRY_METAPOD, 128, 224 ; MAGNEMITE + mon_cry CRY_METAPOD, 32, 320 ; MAGNETON + mon_cry CRY_SPEAROW, 221, 129 ; FARFETCH_D + mon_cry CRY_DIGLETT, 187, 129 ; DODUO + mon_cry CRY_DIGLETT, 153, 160 ; DODRIO + mon_cry CRY_SEEL, 136, 320 ; SEEL + mon_cry CRY_SEEL, 35, 383 ; DEWGONG + mon_cry CRY_GRIMER, 0, 256 ; GRIMER + mon_cry CRY_MUK, 239, 383 ; MUK + mon_cry CRY_FEAROW, 0, 256 ; SHELLDER + mon_cry CRY_FEAROW, 111, 352 ; CLOYSTER + mon_cry CRY_METAPOD, 0, 256 ; GASTLY + mon_cry CRY_METAPOD, 48, 192 ; HAUNTER + mon_cry CRY_MUK, 0, 383 ; GENGAR + mon_cry CRY_EKANS, 255, 320 ; ONIX + mon_cry CRY_DROWZEE, 136, 160 ; DROWZEE + mon_cry CRY_DROWZEE, 238, 192 ; HYPNO + mon_cry CRY_KRABBY, 32, 352 ; KRABBY + mon_cry CRY_KRABBY, 238, 352 ; KINGLER + mon_cry CRY_VOLTORB, 237, 256 ; VOLTORB + mon_cry CRY_VOLTORB, 168, 272 ; ELECTRODE + mon_cry CRY_DIGLETT, 0, 256 ; EXEGGCUTE + mon_cry CRY_DROWZEE, 0, 256 ; EXEGGUTOR + mon_cry CRY_CLEFAIRY, 0, 256 ; CUBONE + mon_cry CRY_ODDISH, 79, 224 ; MAROWAK + mon_cry CRY_GOLEM, 128, 320 ; HITMONLEE + mon_cry CRY_SEEL, 238, 320 ; HITMONCHAN + mon_cry CRY_SEEL, 0, 256 ; LICKITUNG + mon_cry CRY_GOLEM, 230, 349 ; KOFFING + mon_cry CRY_GOLEM, 255, 383 ; WEEZING + mon_cry CRY_CHARMANDER, 0, 256 ; RHYHORN + mon_cry CRY_RHYDON, 0, 256 ; RHYDON + mon_cry CRY_PIDGEOTTO, 10, 320 ; CHANSEY + mon_cry CRY_GOLEM, 0, 256 ; TANGELA + mon_cry CRY_KANGASKHAN, 0, 256 ; KANGASKHAN + mon_cry CRY_CLEFAIRY, 153, 144 ; HORSEA + mon_cry CRY_CLEFAIRY, 60, 129 ; SEADRA + mon_cry CRY_CATERPIE, 128, 192 ; GOLDEEN + mon_cry CRY_CATERPIE, 16, 383 ; SEAKING + mon_cry CRY_PARAS, 2, 160 ; STARYU + mon_cry CRY_PARAS, 0, 256 ; STARMIE + mon_cry CRY_KRABBY, 8, 192 ; MR__MIME + mon_cry CRY_CATERPIE, 0, 256 ; SCYTHER + mon_cry CRY_DROWZEE, 255, 383 ; JYNX + mon_cry CRY_VOLTORB, 143, 383 ; ELECTABUZZ + mon_cry CRY_CHARMANDER, 255, 176 ; MAGMAR + mon_cry CRY_PIDGEOTTO, 0, 256 ; PINSIR + mon_cry CRY_SQUIRTLE, 17, 192 ; TAUROS + mon_cry CRY_EKANS, 128, 128 ; MAGIKARP + mon_cry CRY_EKANS, 0, 256 ; GYARADOS + mon_cry CRY_LAPRAS, 0, 256 ; LAPRAS + mon_cry CRY_PIDGEY, 255, 383 ; DITTO + mon_cry CRY_VENONAT, 136, 224 ; EEVEE + mon_cry CRY_VENONAT, 170, 383 ; VAPOREON + mon_cry CRY_VENONAT, 61, 256 ; JOLTEON + mon_cry CRY_VENONAT, 16, 160 ; FLAREON + mon_cry CRY_WEEPINBELL, 170, 383 ; PORYGON + mon_cry CRY_GROWLITHE, 240, 129 ; OMANYTE + mon_cry CRY_GROWLITHE, 255, 192 ; OMASTAR + mon_cry CRY_CATERPIE, 187, 192 ; KABUTO + mon_cry CRY_FEAROW, 238, 129 ; KABUTOPS + mon_cry CRY_VILEPLUME, 32, 368 ; AERODACTYL + mon_cry CRY_GRIMER, 85, 129 ; SNORLAX + mon_cry CRY_RAICHU, 128, 192 ; ARTICUNO + mon_cry CRY_FEAROW, 255, 256 ; ZAPDOS + mon_cry CRY_RAICHU, 248, 192 ; MOLTRES + mon_cry CRY_BULBASAUR, 96, 192 ; DRATINI + mon_cry CRY_BULBASAUR, 64, 256 ; DRAGONAIR + mon_cry CRY_BULBASAUR, 60, 320 ; DRAGONITE + mon_cry CRY_PARAS, 153, 383 ; MEWTWO + mon_cry CRY_PARAS, 238, 383 ; MEW + mon_cry CRY_CHIKORITA, -16, 176 ; CHIKORITA + mon_cry CRY_CHIKORITA, -34, 288 ; BAYLEEF + mon_cry CRY_CHIKORITA, -183, 512 ; MEGANIUM + mon_cry CRY_CYNDAQUIL, 839, 128 ; CYNDAQUIL + mon_cry CRY_CYNDAQUIL, 801, 288 ; QUILAVA + mon_cry CRY_TYPHLOSION, 3840, 212 ; TYPHLOSION + mon_cry CRY_TOTODILE, 1132, 232 ; TOTODILE + mon_cry CRY_TOTODILE, 1088, 272 ; CROCONAW + mon_cry CRY_TOTODILE, 1020, 384 ; FERALIGATR + mon_cry CRY_SENTRET, 138, 184 ; SENTRET + mon_cry CRY_SENTRET, 107, 258 ; FURRET + mon_cry CRY_HOOTHOOT, 145, 216 ; HOOTHOOT + mon_cry CRY_HOOTHOOT, 0, 416 ; NOCTOWL + mon_cry CRY_LEDYBA, 0, 222 ; LEDYBA + mon_cry CRY_LEDYBA, -150, 312 ; LEDIAN + mon_cry CRY_SPINARAK, 17, 512 ; SPINARAK + mon_cry CRY_SPINARAK, -174, 482 ; ARIADOS + mon_cry CRY_SQUIRTLE, -16, 320 ; CROBAT + mon_cry CRY_CYNDAQUIL, 969, 320 ; CHINCHOU + mon_cry CRY_CYNDAQUIL, 720, 272 ; LANTURN + mon_cry CRY_PICHU, 0, 320 ; PICHU + mon_cry CRY_CLEFFA, 97, 145 ; CLEFFA + mon_cry CRY_CHIKORITA, 232, 232 ; IGGLYBUFF + mon_cry CRY_TOGEPI, 16, 256 ; TOGEPI + mon_cry CRY_TOGETIC, 59, 56 ; TOGETIC + mon_cry CRY_NATU, -103, 256 ; NATU + mon_cry CRY_NATU, -167, 360 ; XATU + mon_cry CRY_MAREEP, 34, 216 ; MAREEP + mon_cry CRY_MAREEP, -7, 384 ; FLAAFFY + mon_cry CRY_AMPHAROS, -124, 232 ; AMPHAROS + mon_cry CRY_CLEFFA, 132, 336 ; BELLOSSOM + mon_cry CRY_MARILL, 283, 288 ; MARILL + mon_cry CRY_MARILL, 182, 384 ; AZUMARILL + mon_cry CRY_CLEFFA, 3904, 384 ; SUDOWOODO + mon_cry CRY_CLEFFA, -675, 456 ; POLITOED + mon_cry CRY_CLEFFA, 59, 200 ; HOPPIP + mon_cry CRY_CLEFFA, 39, 312 ; SKIPLOOM + mon_cry CRY_CLEFFA, 0, 384 ; JUMPLUFF + mon_cry CRY_AIPOM, -81, 232 ; AIPOM + mon_cry CRY_MARILL, 299, 184 ; SUNKERN + mon_cry CRY_SUNFLORA, -32, 384 ; SUNFLORA + mon_cry CRY_TOTODILE, 49, 200 ; YANMA + mon_cry CRY_WOOPER, 147, 175 ; WOOPER + mon_cry CRY_WOOPER, -198, 320 ; QUAGSIRE + mon_cry CRY_AIPOM, 162, 320 ; ESPEON + mon_cry CRY_VENONAT, -233, 240 ; UMBREON + mon_cry CRY_MARILL, -31, 384 ; MURKROW + mon_cry CRY_SLOWKING, 260, 512 ; SLOWKING + mon_cry CRY_HOOTHOOT, 304, 232 ; MISDREAVUS + mon_cry CRY_HOOTHOOT, 354, 256 ; UNOWN + mon_cry CRY_AMPHAROS, 635, 324 ; WOBBUFFET + mon_cry CRY_GIRAFARIG, 65, 512 ; GIRAFARIG + mon_cry CRY_SLOWKING, 128, 256 ; PINECO + mon_cry CRY_SLOWKING, 0, 384 ; FORRETRESS + mon_cry CRY_DUNSPARCE, 452, 256 ; DUNSPARCE + mon_cry CRY_GLIGAR, -258, 256 ; GLIGAR + mon_cry CRY_TYPHLOSION, 239, 247 ; STEELIX + mon_cry CRY_DUNSPARCE, 274, 232 ; SNUBBULL + mon_cry CRY_DUNSPARCE, 0, 384 ; GRANBULL + mon_cry CRY_SLOWKING, 352, 224 ; QWILFISH + mon_cry CRY_AMPHAROS, 0, 352 ; SCIZOR + mon_cry CRY_DUNSPARCE, 656, 168 ; SHUCKLE + mon_cry CRY_AMPHAROS, 53, 224 ; HERACROSS + mon_cry CRY_WOOPER, 83, 175 ; SNEASEL + mon_cry CRY_TEDDIURSA, 1954, 110 ; TEDDIURSA + mon_cry CRY_TEDDIURSA, 1600, 216 ; URSARING + mon_cry CRY_SLUGMA, -472, 320 ; SLUGMA + mon_cry CRY_MAGCARGO, -525, 448 ; MAGCARGO + mon_cry CRY_CYNDAQUIL, 510, 320 ; SWINUB + mon_cry CRY_MAGCARGO, -265, 256 ; PILOSWINE + mon_cry CRY_MAGCARGO, 161, 232 ; CORSOLA + mon_cry CRY_SUNFLORA, 13, 256 ; REMORAID + mon_cry CRY_TOTODILE, 0, 384 ; OCTILLERY + mon_cry CRY_TEDDIURSA, 2, 106 ; DELIBIRD + mon_cry CRY_MANTINE, -190, 240 ; MANTINE + mon_cry CRY_AMPHAROS, 2217, 384 ; SKARMORY + mon_cry CRY_CYNDAQUIL, 57, 320 ; HOUNDOUR + mon_cry CRY_TOTODILE, -266, 256 ; HOUNDOOM + mon_cry CRY_SLUGMA, 763, 256 ; KINGDRA + mon_cry CRY_SENTRET, 72, 560 ; PHANPY + mon_cry CRY_DONPHAN, 0, 416 ; DONPHAN + mon_cry CRY_GIRAFARIG, 115, 576 ; PORYGON2 + mon_cry CRY_AIPOM, -352, 384 ; STANTLER + mon_cry CRY_PICHU, -538, 496 ; SMEARGLE + mon_cry CRY_AIPOM, 44, 264 ; TYROGUE + mon_cry CRY_SLUGMA, 0, 256 ; HITMONTOP + mon_cry CRY_MARILL, 104, 256 ; SMOOCHUM + mon_cry CRY_SUNFLORA, -728, 180 ; ELEKID + mon_cry CRY_TEDDIURSA, 374, 58 ; MAGBY + mon_cry CRY_GLIGAR, -461, 416 ; MILTANK + mon_cry CRY_SLOWKING, 659, 320 ; BLISSEY + mon_cry CRY_RAIKOU, 558, 288 ; RAIKOU + mon_cry CRY_ENTEI, 0, 416 ; ENTEI + mon_cry CRY_MAGCARGO, 0, 384 ; SUICUNE + mon_cry CRY_RAIKOU, 95, 208 ; LARVITAR + mon_cry CRY_SPINARAK, -475, 336 ; PUPITAR + mon_cry CRY_RAIKOU, -256, 384 ; TYRANITAR + mon_cry CRY_TYPHLOSION, 0, 256 ; LUGIA + mon_cry CRY_AIPOM, 0, 384 ; HO_OH + mon_cry CRY_ENTEI, 330, 273 ; CELEBI + assert_table_length NUM_POKEMON diff --git a/data/pokemon/dex_entries.asm b/data/pokemon/dex_entries.asm new file mode 100644 index 0000000..dfcd875 --- /dev/null +++ b/data/pokemon/dex_entries.asm @@ -0,0 +1,265 @@ +SECTION "Pokedex Entries 001-064", ROMX + +BulbasaurPokedexEntry:: INCLUDE "data/pokemon/dex_entries/bulbasaur.asm" +IvysaurPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ivysaur.asm" +VenusaurPokedexEntry:: INCLUDE "data/pokemon/dex_entries/venusaur.asm" +CharmanderPokedexEntry:: INCLUDE "data/pokemon/dex_entries/charmander.asm" +CharmeleonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/charmeleon.asm" +CharizardPokedexEntry:: INCLUDE "data/pokemon/dex_entries/charizard.asm" +SquirtlePokedexEntry:: INCLUDE "data/pokemon/dex_entries/squirtle.asm" +WartortlePokedexEntry:: INCLUDE "data/pokemon/dex_entries/wartortle.asm" +BlastoisePokedexEntry:: INCLUDE "data/pokemon/dex_entries/blastoise.asm" +CaterpiePokedexEntry:: INCLUDE "data/pokemon/dex_entries/caterpie.asm" +MetapodPokedexEntry:: INCLUDE "data/pokemon/dex_entries/metapod.asm" +ButterfreePokedexEntry:: INCLUDE "data/pokemon/dex_entries/butterfree.asm" +WeedlePokedexEntry:: INCLUDE "data/pokemon/dex_entries/weedle.asm" +KakunaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kakuna.asm" +BeedrillPokedexEntry:: INCLUDE "data/pokemon/dex_entries/beedrill.asm" +PidgeyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pidgey.asm" +PidgeottoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pidgeotto.asm" +PidgeotPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pidgeot.asm" +RattataPokedexEntry:: INCLUDE "data/pokemon/dex_entries/rattata.asm" +RaticatePokedexEntry:: INCLUDE "data/pokemon/dex_entries/raticate.asm" +SpearowPokedexEntry:: INCLUDE "data/pokemon/dex_entries/spearow.asm" +FearowPokedexEntry:: INCLUDE "data/pokemon/dex_entries/fearow.asm" +EkansPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ekans.asm" +ArbokPokedexEntry:: INCLUDE "data/pokemon/dex_entries/arbok.asm" +PikachuPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pikachu.asm" +RaichuPokedexEntry:: INCLUDE "data/pokemon/dex_entries/raichu.asm" +SandshrewPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sandshrew.asm" +SandslashPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sandslash.asm" +NidoranFPokedexEntry:: INCLUDE "data/pokemon/dex_entries/nidoran_f.asm" +NidorinaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/nidorina.asm" +NidoqueenPokedexEntry:: INCLUDE "data/pokemon/dex_entries/nidoqueen.asm" +NidoranMPokedexEntry:: INCLUDE "data/pokemon/dex_entries/nidoran_m.asm" +NidorinoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/nidorino.asm" +NidokingPokedexEntry:: INCLUDE "data/pokemon/dex_entries/nidoking.asm" +ClefairyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/clefairy.asm" +ClefablePokedexEntry:: INCLUDE "data/pokemon/dex_entries/clefable.asm" +VulpixPokedexEntry:: INCLUDE "data/pokemon/dex_entries/vulpix.asm" +NinetalesPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ninetales.asm" +JigglypuffPokedexEntry:: INCLUDE "data/pokemon/dex_entries/jigglypuff.asm" +WigglytuffPokedexEntry:: INCLUDE "data/pokemon/dex_entries/wigglytuff.asm" +ZubatPokedexEntry:: INCLUDE "data/pokemon/dex_entries/zubat.asm" +GolbatPokedexEntry:: INCLUDE "data/pokemon/dex_entries/golbat.asm" +OddishPokedexEntry:: INCLUDE "data/pokemon/dex_entries/oddish.asm" +GloomPokedexEntry:: INCLUDE "data/pokemon/dex_entries/gloom.asm" +VileplumePokedexEntry:: INCLUDE "data/pokemon/dex_entries/vileplume.asm" +ParasPokedexEntry:: INCLUDE "data/pokemon/dex_entries/paras.asm" +ParasectPokedexEntry:: INCLUDE "data/pokemon/dex_entries/parasect.asm" +VenonatPokedexEntry:: INCLUDE "data/pokemon/dex_entries/venonat.asm" +VenomothPokedexEntry:: INCLUDE "data/pokemon/dex_entries/venomoth.asm" +DiglettPokedexEntry:: INCLUDE "data/pokemon/dex_entries/diglett.asm" +DugtrioPokedexEntry:: INCLUDE "data/pokemon/dex_entries/dugtrio.asm" +MeowthPokedexEntry:: INCLUDE "data/pokemon/dex_entries/meowth.asm" +PersianPokedexEntry:: INCLUDE "data/pokemon/dex_entries/persian.asm" +PsyduckPokedexEntry:: INCLUDE "data/pokemon/dex_entries/psyduck.asm" +GolduckPokedexEntry:: INCLUDE "data/pokemon/dex_entries/golduck.asm" +MankeyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/mankey.asm" +PrimeapePokedexEntry:: INCLUDE "data/pokemon/dex_entries/primeape.asm" +GrowlithePokedexEntry:: INCLUDE "data/pokemon/dex_entries/growlithe.asm" +ArcaninePokedexEntry:: INCLUDE "data/pokemon/dex_entries/arcanine.asm" +PoliwagPokedexEntry:: INCLUDE "data/pokemon/dex_entries/poliwag.asm" +PoliwhirlPokedexEntry:: INCLUDE "data/pokemon/dex_entries/poliwhirl.asm" +PoliwrathPokedexEntry:: INCLUDE "data/pokemon/dex_entries/poliwrath.asm" +AbraPokedexEntry:: INCLUDE "data/pokemon/dex_entries/abra.asm" +KadabraPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kadabra.asm" + + +SECTION "Pokedex Entries 065-128", ROMX + +AlakazamPokedexEntry:: INCLUDE "data/pokemon/dex_entries/alakazam.asm" +MachopPokedexEntry:: INCLUDE "data/pokemon/dex_entries/machop.asm" +MachokePokedexEntry:: INCLUDE "data/pokemon/dex_entries/machoke.asm" +MachampPokedexEntry:: INCLUDE "data/pokemon/dex_entries/machamp.asm" +BellsproutPokedexEntry:: INCLUDE "data/pokemon/dex_entries/bellsprout.asm" +WeepinbellPokedexEntry:: INCLUDE "data/pokemon/dex_entries/weepinbell.asm" +VictreebelPokedexEntry:: INCLUDE "data/pokemon/dex_entries/victreebel.asm" +TentacoolPokedexEntry:: INCLUDE "data/pokemon/dex_entries/tentacool.asm" +TentacruelPokedexEntry:: INCLUDE "data/pokemon/dex_entries/tentacruel.asm" +GeodudePokedexEntry:: INCLUDE "data/pokemon/dex_entries/geodude.asm" +GravelerPokedexEntry:: INCLUDE "data/pokemon/dex_entries/graveler.asm" +GolemPokedexEntry:: INCLUDE "data/pokemon/dex_entries/golem.asm" +PonytaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ponyta.asm" +RapidashPokedexEntry:: INCLUDE "data/pokemon/dex_entries/rapidash.asm" +SlowpokePokedexEntry:: INCLUDE "data/pokemon/dex_entries/slowpoke.asm" +SlowbroPokedexEntry:: INCLUDE "data/pokemon/dex_entries/slowbro.asm" +MagnemitePokedexEntry:: INCLUDE "data/pokemon/dex_entries/magnemite.asm" +MagnetonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/magneton.asm" +FarfetchDPokedexEntry:: INCLUDE "data/pokemon/dex_entries/farfetch_d.asm" +DoduoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/doduo.asm" +DodrioPokedexEntry:: INCLUDE "data/pokemon/dex_entries/dodrio.asm" +SeelPokedexEntry:: INCLUDE "data/pokemon/dex_entries/seel.asm" +DewgongPokedexEntry:: INCLUDE "data/pokemon/dex_entries/dewgong.asm" +GrimerPokedexEntry:: INCLUDE "data/pokemon/dex_entries/grimer.asm" +MukPokedexEntry:: INCLUDE "data/pokemon/dex_entries/muk.asm" +ShellderPokedexEntry:: INCLUDE "data/pokemon/dex_entries/shellder.asm" +CloysterPokedexEntry:: INCLUDE "data/pokemon/dex_entries/cloyster.asm" +GastlyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/gastly.asm" +HaunterPokedexEntry:: INCLUDE "data/pokemon/dex_entries/haunter.asm" +GengarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/gengar.asm" +OnixPokedexEntry:: INCLUDE "data/pokemon/dex_entries/onix.asm" +DrowzeePokedexEntry:: INCLUDE "data/pokemon/dex_entries/drowzee.asm" +HypnoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/hypno.asm" +KrabbyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/krabby.asm" +KinglerPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kingler.asm" +VoltorbPokedexEntry:: INCLUDE "data/pokemon/dex_entries/voltorb.asm" +ElectrodePokedexEntry:: INCLUDE "data/pokemon/dex_entries/electrode.asm" +ExeggcutePokedexEntry:: INCLUDE "data/pokemon/dex_entries/exeggcute.asm" +ExeggutorPokedexEntry:: INCLUDE "data/pokemon/dex_entries/exeggutor.asm" +CubonePokedexEntry:: INCLUDE "data/pokemon/dex_entries/cubone.asm" +MarowakPokedexEntry:: INCLUDE "data/pokemon/dex_entries/marowak.asm" +HitmonleePokedexEntry:: INCLUDE "data/pokemon/dex_entries/hitmonlee.asm" +HitmonchanPokedexEntry:: INCLUDE "data/pokemon/dex_entries/hitmonchan.asm" +LickitungPokedexEntry:: INCLUDE "data/pokemon/dex_entries/lickitung.asm" +KoffingPokedexEntry:: INCLUDE "data/pokemon/dex_entries/koffing.asm" +WeezingPokedexEntry:: INCLUDE "data/pokemon/dex_entries/weezing.asm" +RhyhornPokedexEntry:: INCLUDE "data/pokemon/dex_entries/rhyhorn.asm" +RhydonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/rhydon.asm" +ChanseyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/chansey.asm" +TangelaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/tangela.asm" +KangaskhanPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kangaskhan.asm" +HorseaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/horsea.asm" +SeadraPokedexEntry:: INCLUDE "data/pokemon/dex_entries/seadra.asm" +GoldeenPokedexEntry:: INCLUDE "data/pokemon/dex_entries/goldeen.asm" +SeakingPokedexEntry:: INCLUDE "data/pokemon/dex_entries/seaking.asm" +StaryuPokedexEntry:: INCLUDE "data/pokemon/dex_entries/staryu.asm" +StarmiePokedexEntry:: INCLUDE "data/pokemon/dex_entries/starmie.asm" +MrMimePokedexEntry:: INCLUDE "data/pokemon/dex_entries/mr__mime.asm" +ScytherPokedexEntry:: INCLUDE "data/pokemon/dex_entries/scyther.asm" +JynxPokedexEntry:: INCLUDE "data/pokemon/dex_entries/jynx.asm" +ElectabuzzPokedexEntry:: INCLUDE "data/pokemon/dex_entries/electabuzz.asm" +MagmarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/magmar.asm" +PinsirPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pinsir.asm" +TaurosPokedexEntry:: INCLUDE "data/pokemon/dex_entries/tauros.asm" + + +SECTION "Pokedex Entries 129-192", ROMX + +MagikarpPokedexEntry:: INCLUDE "data/pokemon/dex_entries/magikarp.asm" +GyaradosPokedexEntry:: INCLUDE "data/pokemon/dex_entries/gyarados.asm" +LaprasPokedexEntry:: INCLUDE "data/pokemon/dex_entries/lapras.asm" +DittoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ditto.asm" +EeveePokedexEntry:: INCLUDE "data/pokemon/dex_entries/eevee.asm" +VaporeonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/vaporeon.asm" +JolteonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/jolteon.asm" +FlareonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/flareon.asm" +PorygonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/porygon.asm" +OmanytePokedexEntry:: INCLUDE "data/pokemon/dex_entries/omanyte.asm" +OmastarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/omastar.asm" +KabutoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kabuto.asm" +KabutopsPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kabutops.asm" +AerodactylPokedexEntry:: INCLUDE "data/pokemon/dex_entries/aerodactyl.asm" +SnorlaxPokedexEntry:: INCLUDE "data/pokemon/dex_entries/snorlax.asm" +ArticunoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/articuno.asm" +ZapdosPokedexEntry:: INCLUDE "data/pokemon/dex_entries/zapdos.asm" +MoltresPokedexEntry:: INCLUDE "data/pokemon/dex_entries/moltres.asm" +DratiniPokedexEntry:: INCLUDE "data/pokemon/dex_entries/dratini.asm" +DragonairPokedexEntry:: INCLUDE "data/pokemon/dex_entries/dragonair.asm" +DragonitePokedexEntry:: INCLUDE "data/pokemon/dex_entries/dragonite.asm" +MewtwoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/mewtwo.asm" +MewPokedexEntry:: INCLUDE "data/pokemon/dex_entries/mew.asm" +ChikoritaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/chikorita.asm" +BayleefPokedexEntry:: INCLUDE "data/pokemon/dex_entries/bayleef.asm" +MeganiumPokedexEntry:: INCLUDE "data/pokemon/dex_entries/meganium.asm" +CyndaquilPokedexEntry:: INCLUDE "data/pokemon/dex_entries/cyndaquil.asm" +QuilavaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/quilava.asm" +TyphlosionPokedexEntry:: INCLUDE "data/pokemon/dex_entries/typhlosion.asm" +TotodilePokedexEntry:: INCLUDE "data/pokemon/dex_entries/totodile.asm" +CroconawPokedexEntry:: INCLUDE "data/pokemon/dex_entries/croconaw.asm" +FeraligatrPokedexEntry:: INCLUDE "data/pokemon/dex_entries/feraligatr.asm" +SentretPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sentret.asm" +FurretPokedexEntry:: INCLUDE "data/pokemon/dex_entries/furret.asm" +HoothootPokedexEntry:: INCLUDE "data/pokemon/dex_entries/hoothoot.asm" +NoctowlPokedexEntry:: INCLUDE "data/pokemon/dex_entries/noctowl.asm" +LedybaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ledyba.asm" +LedianPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ledian.asm" +SpinarakPokedexEntry:: INCLUDE "data/pokemon/dex_entries/spinarak.asm" +AriadosPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ariados.asm" +CrobatPokedexEntry:: INCLUDE "data/pokemon/dex_entries/crobat.asm" +ChinchouPokedexEntry:: INCLUDE "data/pokemon/dex_entries/chinchou.asm" +LanturnPokedexEntry:: INCLUDE "data/pokemon/dex_entries/lanturn.asm" +PichuPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pichu.asm" +CleffaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/cleffa.asm" +IgglybuffPokedexEntry:: INCLUDE "data/pokemon/dex_entries/igglybuff.asm" +TogepiPokedexEntry:: INCLUDE "data/pokemon/dex_entries/togepi.asm" +TogeticPokedexEntry:: INCLUDE "data/pokemon/dex_entries/togetic.asm" +NatuPokedexEntry:: INCLUDE "data/pokemon/dex_entries/natu.asm" +XatuPokedexEntry:: INCLUDE "data/pokemon/dex_entries/xatu.asm" +MareepPokedexEntry:: INCLUDE "data/pokemon/dex_entries/mareep.asm" +FlaaffyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/flaaffy.asm" +AmpharosPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ampharos.asm" +BellossomPokedexEntry:: INCLUDE "data/pokemon/dex_entries/bellossom.asm" +MarillPokedexEntry:: INCLUDE "data/pokemon/dex_entries/marill.asm" +AzumarillPokedexEntry:: INCLUDE "data/pokemon/dex_entries/azumarill.asm" +SudowoodoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sudowoodo.asm" +PolitoedPokedexEntry:: INCLUDE "data/pokemon/dex_entries/politoed.asm" +HoppipPokedexEntry:: INCLUDE "data/pokemon/dex_entries/hoppip.asm" +SkiploomPokedexEntry:: INCLUDE "data/pokemon/dex_entries/skiploom.asm" +JumpluffPokedexEntry:: INCLUDE "data/pokemon/dex_entries/jumpluff.asm" +AipomPokedexEntry:: INCLUDE "data/pokemon/dex_entries/aipom.asm" +SunkernPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sunkern.asm" +SunfloraPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sunflora.asm" + + +SECTION "Pokedex Entries 193-251", ROMX + +YanmaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/yanma.asm" +WooperPokedexEntry:: INCLUDE "data/pokemon/dex_entries/wooper.asm" +QuagsirePokedexEntry:: INCLUDE "data/pokemon/dex_entries/quagsire.asm" +EspeonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/espeon.asm" +UmbreonPokedexEntry:: INCLUDE "data/pokemon/dex_entries/umbreon.asm" +MurkrowPokedexEntry:: INCLUDE "data/pokemon/dex_entries/murkrow.asm" +SlowkingPokedexEntry:: INCLUDE "data/pokemon/dex_entries/slowking.asm" +MisdreavusPokedexEntry:: INCLUDE "data/pokemon/dex_entries/misdreavus.asm" +UnownPokedexEntry:: INCLUDE "data/pokemon/dex_entries/unown.asm" +WobbuffetPokedexEntry:: INCLUDE "data/pokemon/dex_entries/wobbuffet.asm" +GirafarigPokedexEntry:: INCLUDE "data/pokemon/dex_entries/girafarig.asm" +PinecoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pineco.asm" +ForretressPokedexEntry:: INCLUDE "data/pokemon/dex_entries/forretress.asm" +DunsparcePokedexEntry:: INCLUDE "data/pokemon/dex_entries/dunsparce.asm" +GligarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/gligar.asm" +SteelixPokedexEntry:: INCLUDE "data/pokemon/dex_entries/steelix.asm" +SnubbullPokedexEntry:: INCLUDE "data/pokemon/dex_entries/snubbull.asm" +GranbullPokedexEntry:: INCLUDE "data/pokemon/dex_entries/granbull.asm" +QwilfishPokedexEntry:: INCLUDE "data/pokemon/dex_entries/qwilfish.asm" +ScizorPokedexEntry:: INCLUDE "data/pokemon/dex_entries/scizor.asm" +ShucklePokedexEntry:: INCLUDE "data/pokemon/dex_entries/shuckle.asm" +HeracrossPokedexEntry:: INCLUDE "data/pokemon/dex_entries/heracross.asm" +SneaselPokedexEntry:: INCLUDE "data/pokemon/dex_entries/sneasel.asm" +TeddiursaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/teddiursa.asm" +UrsaringPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ursaring.asm" +SlugmaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/slugma.asm" +MagcargoPokedexEntry:: INCLUDE "data/pokemon/dex_entries/magcargo.asm" +SwinubPokedexEntry:: INCLUDE "data/pokemon/dex_entries/swinub.asm" +PiloswinePokedexEntry:: INCLUDE "data/pokemon/dex_entries/piloswine.asm" +CorsolaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/corsola.asm" +RemoraidPokedexEntry:: INCLUDE "data/pokemon/dex_entries/remoraid.asm" +OctilleryPokedexEntry:: INCLUDE "data/pokemon/dex_entries/octillery.asm" +DelibirdPokedexEntry:: INCLUDE "data/pokemon/dex_entries/delibird.asm" +MantinePokedexEntry:: INCLUDE "data/pokemon/dex_entries/mantine.asm" +SkarmoryPokedexEntry:: INCLUDE "data/pokemon/dex_entries/skarmory.asm" +HoundourPokedexEntry:: INCLUDE "data/pokemon/dex_entries/houndour.asm" +HoundoomPokedexEntry:: INCLUDE "data/pokemon/dex_entries/houndoom.asm" +KingdraPokedexEntry:: INCLUDE "data/pokemon/dex_entries/kingdra.asm" +PhanpyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/phanpy.asm" +DonphanPokedexEntry:: INCLUDE "data/pokemon/dex_entries/donphan.asm" +Porygon2PokedexEntry:: INCLUDE "data/pokemon/dex_entries/porygon2.asm" +StantlerPokedexEntry:: INCLUDE "data/pokemon/dex_entries/stantler.asm" +SmearglePokedexEntry:: INCLUDE "data/pokemon/dex_entries/smeargle.asm" +TyroguePokedexEntry:: INCLUDE "data/pokemon/dex_entries/tyrogue.asm" +HitmontopPokedexEntry:: INCLUDE "data/pokemon/dex_entries/hitmontop.asm" +SmoochumPokedexEntry:: INCLUDE "data/pokemon/dex_entries/smoochum.asm" +ElekidPokedexEntry:: INCLUDE "data/pokemon/dex_entries/elekid.asm" +MagbyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/magby.asm" +MiltankPokedexEntry:: INCLUDE "data/pokemon/dex_entries/miltank.asm" +BlisseyPokedexEntry:: INCLUDE "data/pokemon/dex_entries/blissey.asm" +RaikouPokedexEntry:: INCLUDE "data/pokemon/dex_entries/raikou.asm" +EnteiPokedexEntry:: INCLUDE "data/pokemon/dex_entries/entei.asm" +SuicunePokedexEntry:: INCLUDE "data/pokemon/dex_entries/suicune.asm" +LarvitarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/larvitar.asm" +PupitarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/pupitar.asm" +TyranitarPokedexEntry:: INCLUDE "data/pokemon/dex_entries/tyranitar.asm" +LugiaPokedexEntry:: INCLUDE "data/pokemon/dex_entries/lugia.asm" +HoOhPokedexEntry:: INCLUDE "data/pokemon/dex_entries/ho_oh.asm" +CelebiPokedexEntry:: INCLUDE "data/pokemon/dex_entries/celebi.asm" diff --git a/data/pokemon/dex_entries/abra.asm b/data/pokemon/dex_entries/abra.asm new file mode 100644 index 0000000..91f55c2 --- /dev/null +++ b/data/pokemon/dex_entries/abra.asm @@ -0,0 +1,10 @@ + db "PSI@" ; species name + dw 211, 430 ; height, weight + + db "It hypnotizes" + next "itself so that it" + next "can teleport away" + + page "when it senses" + next "danger, even" + next "if it is asleep.@" diff --git a/data/pokemon/dex_entries/aerodactyl.asm b/data/pokemon/dex_entries/aerodactyl.asm new file mode 100644 index 0000000..48f943c --- /dev/null +++ b/data/pokemon/dex_entries/aerodactyl.asm @@ -0,0 +1,10 @@ + db "FOSSIL@" ; species name + dw 511, 1300 ; height, weight + + db "In prehistoric" + next "times, this" + next "#MON flew" + + page "freely and" + next "fearlessly through" + next "the skies.@" diff --git a/data/pokemon/dex_entries/aipom.asm b/data/pokemon/dex_entries/aipom.asm new file mode 100644 index 0000000..4cb0f86 --- /dev/null +++ b/data/pokemon/dex_entries/aipom.asm @@ -0,0 +1,10 @@ + db "LONG TAIL@" ; species name + dw 207, 250 ; height, weight + + db "It uses its tail" + next "to hang on to tree" + next "branches. It uses" + + page "its momentum to" + next "swing from one" + next "branch to another.@" diff --git a/data/pokemon/dex_entries/alakazam.asm b/data/pokemon/dex_entries/alakazam.asm new file mode 100644 index 0000000..e13ef83 --- /dev/null +++ b/data/pokemon/dex_entries/alakazam.asm @@ -0,0 +1,10 @@ + db "PSI@" ; species name + dw 411, 1060 ; height, weight + + db "It has an IQ of" + next "5000. It calcu-" + next "lates many things" + + page "in order to gain" + next "the edge in every" + next "battle.@" diff --git a/data/pokemon/dex_entries/ampharos.asm b/data/pokemon/dex_entries/ampharos.asm new file mode 100644 index 0000000..dd5c186 --- /dev/null +++ b/data/pokemon/dex_entries/ampharos.asm @@ -0,0 +1,10 @@ + db "LIGHT@" ; species name + dw 407, 1360 ; height, weight + + db "When it gets dark," + next "the light from its" + next "bright, shiny tail" + + page "can be seen from" + next "far away on the" + next "ocean's surface.@" diff --git a/data/pokemon/dex_entries/arbok.asm b/data/pokemon/dex_entries/arbok.asm new file mode 100644 index 0000000..0ecab50 --- /dev/null +++ b/data/pokemon/dex_entries/arbok.asm @@ -0,0 +1,10 @@ + db "COBRA@" ; species name + dw 1106, 1430 ; height, weight + + db "To intimidate" + next "foes, it spreads" + next "its chest wide and" + + page "makes eerie sounds" + next "by expelling air" + next "from its mouth.@" diff --git a/data/pokemon/dex_entries/arcanine.asm b/data/pokemon/dex_entries/arcanine.asm new file mode 100644 index 0000000..2443a1b --- /dev/null +++ b/data/pokemon/dex_entries/arcanine.asm @@ -0,0 +1,10 @@ + db "LEGENDARY@" ; species name + dw 603, 3420 ; height, weight + + db "An ancient picture" + next "scroll shows that" + next "people were" + + page "attracted to its" + next "movement as it ran" + next "through prairies.@" diff --git a/data/pokemon/dex_entries/ariados.asm b/data/pokemon/dex_entries/ariados.asm new file mode 100644 index 0000000..bdc335f --- /dev/null +++ b/data/pokemon/dex_entries/ariados.asm @@ -0,0 +1,10 @@ + db "LONG LEG@" ; species name + dw 307, 740 ; height, weight + + db "Rather than mak-" + next "ing a nest in one" + next "specific spot, it" + + page "wanders in search" + next "of food after" + next "darkness falls.@" diff --git a/data/pokemon/dex_entries/articuno.asm b/data/pokemon/dex_entries/articuno.asm new file mode 100644 index 0000000..50439c5 --- /dev/null +++ b/data/pokemon/dex_entries/articuno.asm @@ -0,0 +1,10 @@ + db "FREEZE@" ; species name + dw 507, 1220 ; height, weight + + db "Legendary bird" + next "#MON. As it" + next "flies through the" + + page "sky, it cools the" + next "air, causing snow" + next "to fall.@" diff --git a/data/pokemon/dex_entries/azumarill.asm b/data/pokemon/dex_entries/azumarill.asm new file mode 100644 index 0000000..892ac77 --- /dev/null +++ b/data/pokemon/dex_entries/azumarill.asm @@ -0,0 +1,10 @@ + db "AQUARABBIT@" ; species name + dw 207, 630 ; height, weight + + db "The bubble-like" + next "pattern on its" + next "stomach helps it" + + page "camouflage itself" + next "when it's in the" + next "water.@" diff --git a/data/pokemon/dex_entries/bayleef.asm b/data/pokemon/dex_entries/bayleef.asm new file mode 100644 index 0000000..534c4c9 --- /dev/null +++ b/data/pokemon/dex_entries/bayleef.asm @@ -0,0 +1,10 @@ + db "LEAF@" ; species name + dw 311, 350 ; height, weight + + db "The scent that" + next "wafts from the" + next "leaves on its neck" + + page "causes anyone who" + next "smells it to" + next "become energetic.@" diff --git a/data/pokemon/dex_entries/beedrill.asm b/data/pokemon/dex_entries/beedrill.asm new file mode 100644 index 0000000..7dc8f62 --- /dev/null +++ b/data/pokemon/dex_entries/beedrill.asm @@ -0,0 +1,10 @@ + db "POISON BEE@" ; species name + dw 303, 650 ; height, weight + + db "It uses sharp," + next "poisonous stings" + next "to defeat prey," + + page "then takes the" + next "victim back to its" + next "nest for food.@" diff --git a/data/pokemon/dex_entries/bellossom.asm b/data/pokemon/dex_entries/bellossom.asm new file mode 100644 index 0000000..1e90f4b --- /dev/null +++ b/data/pokemon/dex_entries/bellossom.asm @@ -0,0 +1,10 @@ + db "FLOWER@" ; species name + dw 104, 130 ; height, weight + + db "When these dance" + next "together, their" + next "petals rub against" + + page "each other," + next "making pretty," + next "relaxing sounds.@" diff --git a/data/pokemon/dex_entries/bellsprout.asm b/data/pokemon/dex_entries/bellsprout.asm new file mode 100644 index 0000000..f279bbe --- /dev/null +++ b/data/pokemon/dex_entries/bellsprout.asm @@ -0,0 +1,10 @@ + db "FLOWER@" ; species name + dw 204, 90 ; height, weight + + db "If it notices" + next "anything that" + next "moves, it" + + page "immediately flings" + next "its vine at the" + next "object.@" diff --git a/data/pokemon/dex_entries/blastoise.asm b/data/pokemon/dex_entries/blastoise.asm new file mode 100644 index 0000000..eeb7cf2 --- /dev/null +++ b/data/pokemon/dex_entries/blastoise.asm @@ -0,0 +1,10 @@ + db "SHELLFISH@" ; species name + dw 503, 1890 ; height, weight + + db "It firmly plants" + next "its feet on the" + next "ground before" + + page "shooting water" + next "from the jets on" + next "its back.@" diff --git a/data/pokemon/dex_entries/blissey.asm b/data/pokemon/dex_entries/blissey.asm new file mode 100644 index 0000000..2496478 --- /dev/null +++ b/data/pokemon/dex_entries/blissey.asm @@ -0,0 +1,10 @@ + db "HAPPINESS@" ; species name + dw 411, 1030 ; height, weight + + db "Biting into one" + next "of the delicious" + next "eggs that BLISSEY" + + page "provides will make" + next "everyone around" + next "smile with joy.@" diff --git a/data/pokemon/dex_entries/bulbasaur.asm b/data/pokemon/dex_entries/bulbasaur.asm new file mode 100644 index 0000000..88fca15 --- /dev/null +++ b/data/pokemon/dex_entries/bulbasaur.asm @@ -0,0 +1,10 @@ + db "SEED@" ; species name + dw 204, 150 ; height, weight + + db "While it is young," + next "it uses the" + next "nutrients that are" + + page "stored in the" + next "seeds on its back" + next "in order to grow.@" diff --git a/data/pokemon/dex_entries/butterfree.asm b/data/pokemon/dex_entries/butterfree.asm new file mode 100644 index 0000000..9661cce --- /dev/null +++ b/data/pokemon/dex_entries/butterfree.asm @@ -0,0 +1,10 @@ + db "BUTTERFLY@" ; species name + dw 307, 710 ; height, weight + + db "It flits from" + next "flower to flower," + next "collecting honey." + + page "It can even" + next "identify distant" + next "flowers in bloom.@" diff --git a/data/pokemon/dex_entries/caterpie.asm b/data/pokemon/dex_entries/caterpie.asm new file mode 100644 index 0000000..2c5d74c --- /dev/null +++ b/data/pokemon/dex_entries/caterpie.asm @@ -0,0 +1,10 @@ + db "WORM@" ; species name + dw 100, 60 ; height, weight + + db "It crawls into" + next "foliage where it" + next "camouflages itself" + + page "among leaves that" + next "are the same color" + next "as its body.@" diff --git a/data/pokemon/dex_entries/celebi.asm b/data/pokemon/dex_entries/celebi.asm new file mode 100644 index 0000000..ae0bc0f --- /dev/null +++ b/data/pokemon/dex_entries/celebi.asm @@ -0,0 +1,10 @@ + db "TIMETRAVEL@" ; species name + dw 200, 110 ; height, weight + + db "Revered as a" + next "guardian of the" + next "forest, CELEBI" + + page "appears wherever" + next "beautiful forests" + next "exist.@" diff --git a/data/pokemon/dex_entries/chansey.asm b/data/pokemon/dex_entries/chansey.asm new file mode 100644 index 0000000..2cc0b27 --- /dev/null +++ b/data/pokemon/dex_entries/chansey.asm @@ -0,0 +1,10 @@ + db "EGG@" ; species name + dw 307, 760 ; height, weight + + db "People try to" + next "catch it for its" + next "extremely" + + page "nutritious eggs," + next "but it rarely can" + next "be found.@" diff --git a/data/pokemon/dex_entries/charizard.asm b/data/pokemon/dex_entries/charizard.asm new file mode 100644 index 0000000..2bd55fe --- /dev/null +++ b/data/pokemon/dex_entries/charizard.asm @@ -0,0 +1,10 @@ + db "FLAME@" ; species name + dw 507, 2000 ; height, weight + + db "It uses its wings" + next "to fly high. The" + next "temperature of its" + + page "fire increases as" + next "it gains exper-" + next "ience in battle.@" diff --git a/data/pokemon/dex_entries/charmander.asm b/data/pokemon/dex_entries/charmander.asm new file mode 100644 index 0000000..19ed15c --- /dev/null +++ b/data/pokemon/dex_entries/charmander.asm @@ -0,0 +1,10 @@ + db "LIZARD@" ; species name + dw 200, 190 ; height, weight + + db "If it's healthy," + next "the flame on the" + next "tip of its tail" + + page "will burn vigor-" + next "ously, even if it" + next "gets a bit wet.@" diff --git a/data/pokemon/dex_entries/charmeleon.asm b/data/pokemon/dex_entries/charmeleon.asm new file mode 100644 index 0000000..1786851 --- /dev/null +++ b/data/pokemon/dex_entries/charmeleon.asm @@ -0,0 +1,10 @@ + db "FLAME@" ; species name + dw 307, 420 ; height, weight + + db "If it becomes" + next "agitated during" + next "battle, it spouts" + + page "intense flames," + next "incinerating its" + next "surroundings.@" diff --git a/data/pokemon/dex_entries/chikorita.asm b/data/pokemon/dex_entries/chikorita.asm new file mode 100644 index 0000000..ecf5f85 --- /dev/null +++ b/data/pokemon/dex_entries/chikorita.asm @@ -0,0 +1,10 @@ + db "LEAF@" ; species name + dw 211, 140 ; height, weight + + db "It loves to bask" + next "in the sunlight." + next "It uses the leaf" + + page "on its head to" + next "seek out warm" + next "places.@" diff --git a/data/pokemon/dex_entries/chinchou.asm b/data/pokemon/dex_entries/chinchou.asm new file mode 100644 index 0000000..6074d49 --- /dev/null +++ b/data/pokemon/dex_entries/chinchou.asm @@ -0,0 +1,10 @@ + db "ANGLER@" ; species name + dw 108, 260 ; height, weight + + db "Its antennae, whi-" + next "ch evolved from a" + next "fin, have both po-" + + page "sitive and neg-" + next "ative charges flo-" + next "wing through them.@" diff --git a/data/pokemon/dex_entries/clefable.asm b/data/pokemon/dex_entries/clefable.asm new file mode 100644 index 0000000..3ea1664 --- /dev/null +++ b/data/pokemon/dex_entries/clefable.asm @@ -0,0 +1,10 @@ + db "FAIRY@" ; species name + dw 403, 880 ; height, weight + + db "Said to live in" + next "quiet, remote" + next "mountains, this" + + page "type of fairy has" + next "a strong aversion" + next "to being seen.@" diff --git a/data/pokemon/dex_entries/clefairy.asm b/data/pokemon/dex_entries/clefairy.asm new file mode 100644 index 0000000..ff26e3e --- /dev/null +++ b/data/pokemon/dex_entries/clefairy.asm @@ -0,0 +1,10 @@ + db "FAIRY@" ; species name + dw 200, 170 ; height, weight + + db "Though rarely" + next "seen, it becomes" + next "easier to spot," + + page "for some reason," + next "on the night of a " + next "full moon.@" diff --git a/data/pokemon/dex_entries/cleffa.asm b/data/pokemon/dex_entries/cleffa.asm new file mode 100644 index 0000000..9095f99 --- /dev/null +++ b/data/pokemon/dex_entries/cleffa.asm @@ -0,0 +1,10 @@ + db "STARSHAPE@" ; species name + dw 100, 70 ; height, weight + + db "If the impact site" + next "of a meteorite is" + next "found, this" + + page "#MON is certain" + next "to be within the" + next "immediate area.@" diff --git a/data/pokemon/dex_entries/cloyster.asm b/data/pokemon/dex_entries/cloyster.asm new file mode 100644 index 0000000..7a88783 --- /dev/null +++ b/data/pokemon/dex_entries/cloyster.asm @@ -0,0 +1,10 @@ + db "BIVALVE@" ; species name + dw 411, 2920 ; height, weight + + db "Even a missile" + next "can't break the" + next "spikes it uses to" + + page "stab opponents." + next "They're even hard-" + next "er than its shell.@" diff --git a/data/pokemon/dex_entries/corsola.asm b/data/pokemon/dex_entries/corsola.asm new file mode 100644 index 0000000..fa073f0 --- /dev/null +++ b/data/pokemon/dex_entries/corsola.asm @@ -0,0 +1,10 @@ + db "CORAL@" ; species name + dw 200, 110 ; height, weight + + db "The points on its" + next "head absorb" + next "nutrients from" + + page "clean water. They" + next "cannot survive in" + next "polluted water.@" diff --git a/data/pokemon/dex_entries/crobat.asm b/data/pokemon/dex_entries/crobat.asm new file mode 100644 index 0000000..2b7e28f --- /dev/null +++ b/data/pokemon/dex_entries/crobat.asm @@ -0,0 +1,10 @@ + db "BAT@" ; species name + dw 511, 1650 ; height, weight + + db "As a result of its" + next "pursuit of faster," + next "yet more silent" + + page "flight, a new set" + next "of wings grew on" + next "its hind legs.@" diff --git a/data/pokemon/dex_entries/croconaw.asm b/data/pokemon/dex_entries/croconaw.asm new file mode 100644 index 0000000..0cde706 --- /dev/null +++ b/data/pokemon/dex_entries/croconaw.asm @@ -0,0 +1,10 @@ + db "BIG JAW@" ; species name + dw 307, 550 ; height, weight + + db "The tips of its" + next "fangs are slanted" + next "backward. Once" + + page "those fangs clamp" + next "down, the prey has" + next "no hope of escape.@" diff --git a/data/pokemon/dex_entries/cubone.asm b/data/pokemon/dex_entries/cubone.asm new file mode 100644 index 0000000..6c8bed2 --- /dev/null +++ b/data/pokemon/dex_entries/cubone.asm @@ -0,0 +1,10 @@ + db "LONELY@" ; species name + dw 104, 140 ; height, weight + + db "It lost its mother" + next "after its birth." + next "It wears its" + + page "mother's skull," + next "never revealing" + next "its true face.@" diff --git a/data/pokemon/dex_entries/cyndaquil.asm b/data/pokemon/dex_entries/cyndaquil.asm new file mode 100644 index 0000000..2604f48 --- /dev/null +++ b/data/pokemon/dex_entries/cyndaquil.asm @@ -0,0 +1,10 @@ + db "FIRE MOUSE@" ; species name + dw 108, 170 ; height, weight + + db "The fire that" + next "spouts from its" + next "back burns hottest" + + page "when it is angry." + next "The flaring flames" + next "intimidate foes.@" diff --git a/data/pokemon/dex_entries/delibird.asm b/data/pokemon/dex_entries/delibird.asm new file mode 100644 index 0000000..47f8e2c --- /dev/null +++ b/data/pokemon/dex_entries/delibird.asm @@ -0,0 +1,10 @@ + db "DELIVERY@" ; species name + dw 211, 350 ; height, weight + + db "It always carries" + next "its food with it," + next "wherever it goes." + + page "If attacked, it" + next "throws its food at" + next "the opponent.@" diff --git a/data/pokemon/dex_entries/dewgong.asm b/data/pokemon/dex_entries/dewgong.asm new file mode 100644 index 0000000..a7a0bf1 --- /dev/null +++ b/data/pokemon/dex_entries/dewgong.asm @@ -0,0 +1,10 @@ + db "SEA LION@" ; species name + dw 507, 2650 ; height, weight + + db "It sleeps under" + next "shallow ocean" + next "waters during the" + + page "day, then looks" + next "for food at night" + next "when it's cold.@" diff --git a/data/pokemon/dex_entries/diglett.asm b/data/pokemon/dex_entries/diglett.asm new file mode 100644 index 0000000..c2b6c46 --- /dev/null +++ b/data/pokemon/dex_entries/diglett.asm @@ -0,0 +1,10 @@ + db "MOLE@" ; species name + dw 8, 20 ; height, weight + + db "It digs under-" + next "ground and chews" + next "on tree roots," + + page "sticking its head" + next "out only when the" + next "sun isn't bright.@" diff --git a/data/pokemon/dex_entries/ditto.asm b/data/pokemon/dex_entries/ditto.asm new file mode 100644 index 0000000..ffe394a --- /dev/null +++ b/data/pokemon/dex_entries/ditto.asm @@ -0,0 +1,10 @@ + db "TRANSFORM@" ; species name + dw 100, 90 ; height, weight + + db "When it encount-" + next "ers another DITTO," + next "it will move" + + page "faster than normal" + next "to duplicate that" + next "opponent exactly.@" diff --git a/data/pokemon/dex_entries/dodrio.asm b/data/pokemon/dex_entries/dodrio.asm new file mode 100644 index 0000000..767fd9a --- /dev/null +++ b/data/pokemon/dex_entries/dodrio.asm @@ -0,0 +1,10 @@ + db "TRIPLEBIRD@" ; species name + dw 511, 1880 ; height, weight + + db "An enemy that" + next "takes its eyes off" + next "any of the three" + + page "heads--even for a" + next "second--will get" + next "pecked severely.@" diff --git a/data/pokemon/dex_entries/doduo.asm b/data/pokemon/dex_entries/doduo.asm new file mode 100644 index 0000000..eba6500 --- /dev/null +++ b/data/pokemon/dex_entries/doduo.asm @@ -0,0 +1,10 @@ + db "TWIN BIRD@" ; species name + dw 407, 860 ; height, weight + + db "It lives on a" + next "grassy plain where" + next "it can see a long" + + page "way. If it sees an" + next "enemy, it runs" + next "away at 60 mph.@" diff --git a/data/pokemon/dex_entries/donphan.asm b/data/pokemon/dex_entries/donphan.asm new file mode 100644 index 0000000..eac9c54 --- /dev/null +++ b/data/pokemon/dex_entries/donphan.asm @@ -0,0 +1,10 @@ + db "ARMOR@" ; species name + dw 307, 2650 ; height, weight + + db "Because this" + next "#MON's skin is" + next "so tough, a normal" + + page "attack won't even" + next "leave a scratch on" + next "it.@" diff --git a/data/pokemon/dex_entries/dragonair.asm b/data/pokemon/dex_entries/dragonair.asm new file mode 100644 index 0000000..915db2c --- /dev/null +++ b/data/pokemon/dex_entries/dragonair.asm @@ -0,0 +1,10 @@ + db "DRAGON@" ; species name + dw 1301, 360 ; height, weight + + db "It is called the" + next "divine #MON." + next "When its entire" + + page "body brightens" + next "slightly, the" + next "weather changes.@" diff --git a/data/pokemon/dex_entries/dragonite.asm b/data/pokemon/dex_entries/dragonite.asm new file mode 100644 index 0000000..9db1bf5 --- /dev/null +++ b/data/pokemon/dex_entries/dragonite.asm @@ -0,0 +1,10 @@ + db "DRAGON@" ; species name + dw 703, 4630 ; height, weight + + db "It is said that" + next "somewhere in the" + next "ocean lies an" + + page "island where these" + next "gather. Only they" + next "live there.@" diff --git a/data/pokemon/dex_entries/dratini.asm b/data/pokemon/dex_entries/dratini.asm new file mode 100644 index 0000000..baa1294 --- /dev/null +++ b/data/pokemon/dex_entries/dratini.asm @@ -0,0 +1,10 @@ + db "DRAGON@" ; species name + dw 511, 70 ; height, weight + + db "It sheds many lay-" + next "ers of skin as it" + next "grows larger. Dur-" + + page "ing this process," + next "it is protected by" + next "a rapid waterfall.@" diff --git a/data/pokemon/dex_entries/drowzee.asm b/data/pokemon/dex_entries/drowzee.asm new file mode 100644 index 0000000..fe6f14b --- /dev/null +++ b/data/pokemon/dex_entries/drowzee.asm @@ -0,0 +1,10 @@ + db "HYPNOSIS@" ; species name + dw 303, 710 ; height, weight + + db "When it twitches" + next "its nose, it can" + next "tell where someone" + + page "is sleeping and" + next "what that person" + next "is dreaming about.@" diff --git a/data/pokemon/dex_entries/dugtrio.asm b/data/pokemon/dex_entries/dugtrio.asm new file mode 100644 index 0000000..a12c298 --- /dev/null +++ b/data/pokemon/dex_entries/dugtrio.asm @@ -0,0 +1,10 @@ + db "MOLE@" ; species name + dw 204, 730 ; height, weight + + db "These DIGLETT" + next "triplets dig over" + next "60 miles below sea" + + page "level. No one" + next "knows what it's" + next "like underground.@" diff --git a/data/pokemon/dex_entries/dunsparce.asm b/data/pokemon/dex_entries/dunsparce.asm new file mode 100644 index 0000000..5391438 --- /dev/null +++ b/data/pokemon/dex_entries/dunsparce.asm @@ -0,0 +1,10 @@ + db "LAND SNAKE@" ; species name + dw 411, 310 ; height, weight + + db "It hides deep" + next "inside caves where" + next "no light ever" + + page "reaches it and" + next "remains virtually" + next "motionless there.@" diff --git a/data/pokemon/dex_entries/eevee.asm b/data/pokemon/dex_entries/eevee.asm new file mode 100644 index 0000000..91a3d70 --- /dev/null +++ b/data/pokemon/dex_entries/eevee.asm @@ -0,0 +1,10 @@ + db "EVOLUTION@" ; species name + dw 100, 140 ; height, weight + + db "Its ability to" + next "evolve into many" + next "forms allows it to" + + page "adapt smoothly" + next "and perfectly to" + next "any environment.@" diff --git a/data/pokemon/dex_entries/ekans.asm b/data/pokemon/dex_entries/ekans.asm new file mode 100644 index 0000000..bb2fe95 --- /dev/null +++ b/data/pokemon/dex_entries/ekans.asm @@ -0,0 +1,10 @@ + db "SNAKE@" ; species name + dw 607, 150 ; height, weight + + db "It flutters the" + next "tip of its tongue" + next "to seek out the" + + page "scent of prey," + next "then swallows the" + next "prey whole.@" diff --git a/data/pokemon/dex_entries/electabuzz.asm b/data/pokemon/dex_entries/electabuzz.asm new file mode 100644 index 0000000..0eddf34 --- /dev/null +++ b/data/pokemon/dex_entries/electabuzz.asm @@ -0,0 +1,10 @@ + db "ELECTRIC@" ; species name + dw 307, 660 ; height, weight + + db "When two" + next "ELECTABUZZ touch," + next "they control the" + + page "electric currents" + next "to communicate" + next "their feelings.@" diff --git a/data/pokemon/dex_entries/electrode.asm b/data/pokemon/dex_entries/electrode.asm new file mode 100644 index 0000000..2e6378d --- /dev/null +++ b/data/pokemon/dex_entries/electrode.asm @@ -0,0 +1,10 @@ + db "BALL@" ; species name + dw 311, 1470 ; height, weight + + db "The more energy it" + next "charges up, the" + next "faster it gets." + + page "But this also" + next "makes it more" + next "likely to explode.@" diff --git a/data/pokemon/dex_entries/elekid.asm b/data/pokemon/dex_entries/elekid.asm new file mode 100644 index 0000000..a84d24d --- /dev/null +++ b/data/pokemon/dex_entries/elekid.asm @@ -0,0 +1,10 @@ + db "ELECTRIC@" ; species name + dw 200, 520 ; height, weight + + db "It loves violent" + next "thunder. The space" + next "between its horns" + + page "flickers bluish-" + next "white when it is" + next "charging energy.@" diff --git a/data/pokemon/dex_entries/entei.asm b/data/pokemon/dex_entries/entei.asm new file mode 100644 index 0000000..355bd4a --- /dev/null +++ b/data/pokemon/dex_entries/entei.asm @@ -0,0 +1,10 @@ + db "VOLCANO@" ; species name + dw 607, 4370 ; height, weight + + db "This brawny" + next "#MON courses" + next "around the earth," + + page "spouting flames" + next "hotter than a" + next "volcano's magma.@" diff --git a/data/pokemon/dex_entries/espeon.asm b/data/pokemon/dex_entries/espeon.asm new file mode 100644 index 0000000..93bde0d --- /dev/null +++ b/data/pokemon/dex_entries/espeon.asm @@ -0,0 +1,10 @@ + db "SUN@" ; species name + dw 211, 580 ; height, weight + + db "The tip of its" + next "forked tail" + next "quivers when it is" + + page "predicting its" + next "opponent's next" + next "move.@" diff --git a/data/pokemon/dex_entries/exeggcute.asm b/data/pokemon/dex_entries/exeggcute.asm new file mode 100644 index 0000000..27360dc --- /dev/null +++ b/data/pokemon/dex_entries/exeggcute.asm @@ -0,0 +1,10 @@ + db "EGG@" ; species name + dw 104, 60 ; height, weight + + db "If even one is" + next "separated from the" + next "group, the energy" + + page "bond between the" + next "six will make them" + next "rejoin instantly.@" diff --git a/data/pokemon/dex_entries/exeggutor.asm b/data/pokemon/dex_entries/exeggutor.asm new file mode 100644 index 0000000..31ba01a --- /dev/null +++ b/data/pokemon/dex_entries/exeggutor.asm @@ -0,0 +1,10 @@ + db "COCONUT@" ; species name + dw 607, 2650 ; height, weight + + db "Living in a good" + next "environment makes" + next "it grow lots of" + + page "heads. A head that" + next "drops off becomes" + next "an EXEGGCUTE.@" diff --git a/data/pokemon/dex_entries/farfetch_d.asm b/data/pokemon/dex_entries/farfetch_d.asm new file mode 100644 index 0000000..b5bd3bc --- /dev/null +++ b/data/pokemon/dex_entries/farfetch_d.asm @@ -0,0 +1,10 @@ + db "WILD DUCK@" ; species name + dw 207, 330 ; height, weight + + db "In order to pre-" + next "vent their" + next "extinction, more" + + page "people have made" + next "an effort to breed" + next "these #MON.@" diff --git a/data/pokemon/dex_entries/fearow.asm b/data/pokemon/dex_entries/fearow.asm new file mode 100644 index 0000000..b91c66e --- /dev/null +++ b/data/pokemon/dex_entries/fearow.asm @@ -0,0 +1,10 @@ + db "BEAK@" ; species name + dw 311, 840 ; height, weight + + db "It uses its long" + next "beak to attack. It" + next "has a surprisingly" + + page "long reach, so it" + next "must be treated" + next "with caution.@" diff --git a/data/pokemon/dex_entries/feraligatr.asm b/data/pokemon/dex_entries/feraligatr.asm new file mode 100644 index 0000000..3c411fe --- /dev/null +++ b/data/pokemon/dex_entries/feraligatr.asm @@ -0,0 +1,10 @@ + db "BIG JAW@" ; species name + dw 707, 1960 ; height, weight + + db "Although it has a" + next "massive body, its" + next "powerful hind legs" + + page "enable it to move" + next "quickly, even on" + next "the ground.@" diff --git a/data/pokemon/dex_entries/flaaffy.asm b/data/pokemon/dex_entries/flaaffy.asm new file mode 100644 index 0000000..d408a47 --- /dev/null +++ b/data/pokemon/dex_entries/flaaffy.asm @@ -0,0 +1,10 @@ + db "WOOL@" ; species name + dw 207, 290 ; height, weight + + db "Because of its" + next "rubbery, electric-" + next "ity-resistant" + + page "skin, it can store" + next "lots of electric-" + next "ity in its fur.@" diff --git a/data/pokemon/dex_entries/flareon.asm b/data/pokemon/dex_entries/flareon.asm new file mode 100644 index 0000000..fbab999 --- /dev/null +++ b/data/pokemon/dex_entries/flareon.asm @@ -0,0 +1,10 @@ + db "FLAME@" ; species name + dw 211, 550 ; height, weight + + db "Once it has stored" + next "up enough heat," + next "this #MON's" + + page "body temperature" + next "can reach up to" + next "1700 degrees.@" diff --git a/data/pokemon/dex_entries/forretress.asm b/data/pokemon/dex_entries/forretress.asm new file mode 100644 index 0000000..6815f6d --- /dev/null +++ b/data/pokemon/dex_entries/forretress.asm @@ -0,0 +1,10 @@ + db "BAGWORM@" ; species name + dw 311, 2770 ; height, weight + + db "Usually found" + next "hanging on to a" + next "fat tree trunk. It" + + page "shoots out bits of" + next "its shell when it" + next "sees action.@" diff --git a/data/pokemon/dex_entries/furret.asm b/data/pokemon/dex_entries/furret.asm new file mode 100644 index 0000000..b9ec74d --- /dev/null +++ b/data/pokemon/dex_entries/furret.asm @@ -0,0 +1,10 @@ + db "LONG BODY@" ; species name + dw 511, 720 ; height, weight + + db "It lives in narrow" + next "burrows that fit" + next "its slim body. The" + + page "deeper the nests" + next "go, the more maze-" + next "like they become.@" diff --git a/data/pokemon/dex_entries/gastly.asm b/data/pokemon/dex_entries/gastly.asm new file mode 100644 index 0000000..5f5420e --- /dev/null +++ b/data/pokemon/dex_entries/gastly.asm @@ -0,0 +1,10 @@ + db "GAS@" ; species name + dw 403, 2 ; height, weight + + db "It wraps its op-" + next "ponent in its gas-" + next "like body, slowly" + + page "weakening its prey" + next "by poisoning it" + next "through the skin.@" diff --git a/data/pokemon/dex_entries/gengar.asm b/data/pokemon/dex_entries/gengar.asm new file mode 100644 index 0000000..ac85e88 --- /dev/null +++ b/data/pokemon/dex_entries/gengar.asm @@ -0,0 +1,10 @@ + db "SHADOW@" ; species name + dw 411, 890 ; height, weight + + db "Hiding in people's" + next "shadows at night," + next "it absorbs their" + + page "heat. The chill it" + next "causes makes the" + next "victims shake.@" diff --git a/data/pokemon/dex_entries/geodude.asm b/data/pokemon/dex_entries/geodude.asm new file mode 100644 index 0000000..ea3c8b7 --- /dev/null +++ b/data/pokemon/dex_entries/geodude.asm @@ -0,0 +1,10 @@ + db "ROCK@" ; species name + dw 104, 440 ; height, weight + + db "Proud of their" + next "sturdy bodies," + next "they bash against" + + page "each other in a" + next "contest to prove" + next "whose is harder.@" diff --git a/data/pokemon/dex_entries/girafarig.asm b/data/pokemon/dex_entries/girafarig.asm new file mode 100644 index 0000000..caeb13d --- /dev/null +++ b/data/pokemon/dex_entries/girafarig.asm @@ -0,0 +1,10 @@ + db "LONG NECK@" ; species name + dw 411, 910 ; height, weight + + db "When it is in" + next "danger, its tail" + next "uses some sort of" + + page "mysterious powers" + next "to drive away the" + next "enemy.@" diff --git a/data/pokemon/dex_entries/gligar.asm b/data/pokemon/dex_entries/gligar.asm new file mode 100644 index 0000000..32ac0a5 --- /dev/null +++ b/data/pokemon/dex_entries/gligar.asm @@ -0,0 +1,10 @@ + db "FLYSCORPIO@" ; species name + dw 307, 1430 ; height, weight + + db "It builds its nest" + next "on a steep cliff." + next "When it is done" + + page "gliding, it hops" + next "along the ground" + next "back to its nest.@" diff --git a/data/pokemon/dex_entries/gloom.asm b/data/pokemon/dex_entries/gloom.asm new file mode 100644 index 0000000..6b2e4e5 --- /dev/null +++ b/data/pokemon/dex_entries/gloom.asm @@ -0,0 +1,10 @@ + db "WEED@" ; species name + dw 207, 190 ; height, weight + + db "The smell from its" + next "drool-like syrup" + next "and the pollen on" + + page "its petals is so" + next "bad, it may make" + next "opponents faint.@" diff --git a/data/pokemon/dex_entries/golbat.asm b/data/pokemon/dex_entries/golbat.asm new file mode 100644 index 0000000..d59b940 --- /dev/null +++ b/data/pokemon/dex_entries/golbat.asm @@ -0,0 +1,10 @@ + db "BAT@" ; species name + dw 503, 1210 ; height, weight + + db "When it plunges" + next "its fangs into its" + next "prey, it instantly" + + page "draws and gulps" + next "down more than ten" + next "ounces of blood.@" diff --git a/data/pokemon/dex_entries/goldeen.asm b/data/pokemon/dex_entries/goldeen.asm new file mode 100644 index 0000000..075a9b5 --- /dev/null +++ b/data/pokemon/dex_entries/goldeen.asm @@ -0,0 +1,10 @@ + db "GOLDFISH@" ; species name + dw 200, 330 ; height, weight + + db "During spawning" + next "season, they swim" + next "gracefully in the" + + page "water, searching" + next "for their perfect" + next "mate.@" diff --git a/data/pokemon/dex_entries/golduck.asm b/data/pokemon/dex_entries/golduck.asm new file mode 100644 index 0000000..921e4dd --- /dev/null +++ b/data/pokemon/dex_entries/golduck.asm @@ -0,0 +1,10 @@ + db "DUCK@" ; species name + dw 507, 1690 ; height, weight + + db "It swims grace-" + next "fully along on the" + next "quiet, slow-moving" + + page "rivers and lakes" + next "of which it is so" + next "fond.@" diff --git a/data/pokemon/dex_entries/golem.asm b/data/pokemon/dex_entries/golem.asm new file mode 100644 index 0000000..7d5e9af --- /dev/null +++ b/data/pokemon/dex_entries/golem.asm @@ -0,0 +1,10 @@ + db "MEGATON@" ; species name + dw 407, 6620 ; height, weight + + db "Its rock-like body" + next "is so durable," + next "even high-powered" + + page "dynamite blasts" + next "fail to scratch" + next "its rugged hide.@" diff --git a/data/pokemon/dex_entries/granbull.asm b/data/pokemon/dex_entries/granbull.asm new file mode 100644 index 0000000..de6460d --- /dev/null +++ b/data/pokemon/dex_entries/granbull.asm @@ -0,0 +1,10 @@ + db "FAIRY@" ; species name + dw 407, 1070 ; height, weight + + db "It can make most" + next "any #MON run" + next "away simply by" + + page "opening its mouth" + next "wide to reveal its" + next "big fangs.@" diff --git a/data/pokemon/dex_entries/graveler.asm b/data/pokemon/dex_entries/graveler.asm new file mode 100644 index 0000000..26b9db7 --- /dev/null +++ b/data/pokemon/dex_entries/graveler.asm @@ -0,0 +1,10 @@ + db "ROCK@" ; species name + dw 303, 2320 ; height, weight + + db "It travels by rol-" + next "ling on mountain" + next "paths. If it gains" + + page "too much speed, it" + next "stops by running" + next "into huge rocks.@" diff --git a/data/pokemon/dex_entries/grimer.asm b/data/pokemon/dex_entries/grimer.asm new file mode 100644 index 0000000..ed76b62 --- /dev/null +++ b/data/pokemon/dex_entries/grimer.asm @@ -0,0 +1,10 @@ + db "SLUDGE@" ; species name + dw 211, 660 ; height, weight + + db "When two of these" + next "#MON's bodies" + next "are combined" + + page "together, new" + next "poisons are" + next "created.@" diff --git a/data/pokemon/dex_entries/growlithe.asm b/data/pokemon/dex_entries/growlithe.asm new file mode 100644 index 0000000..af5610c --- /dev/null +++ b/data/pokemon/dex_entries/growlithe.asm @@ -0,0 +1,10 @@ + db "PUPPY@" ; species name + dw 204, 420 ; height, weight + + db "It controls a big" + next "territory. If it" + next "detects an unknown" + + page "smell, it roars" + next "loudly to force" + next "out the intruder.@" diff --git a/data/pokemon/dex_entries/gyarados.asm b/data/pokemon/dex_entries/gyarados.asm new file mode 100644 index 0000000..3f32356 --- /dev/null +++ b/data/pokemon/dex_entries/gyarados.asm @@ -0,0 +1,10 @@ + db "ATROCIOUS@" ; species name + dw 2104, 5180 ; height, weight + + db "It appears when-" + next "ever there is" + next "world conflict," + + page "burning down any" + next "place it travels" + next "through.@" diff --git a/data/pokemon/dex_entries/haunter.asm b/data/pokemon/dex_entries/haunter.asm new file mode 100644 index 0000000..b03c099 --- /dev/null +++ b/data/pokemon/dex_entries/haunter.asm @@ -0,0 +1,10 @@ + db "GAS@" ; species name + dw 503, 2 ; height, weight + + db "It hides in the" + next "dark, planning to" + next "take the life of" + + page "the next living" + next "thing that wanders" + next "close by.@" diff --git a/data/pokemon/dex_entries/heracross.asm b/data/pokemon/dex_entries/heracross.asm new file mode 100644 index 0000000..25d1e28 --- /dev/null +++ b/data/pokemon/dex_entries/heracross.asm @@ -0,0 +1,10 @@ + db "SINGLEHORN@" ; species name + dw 411, 1190 ; height, weight + + db "With its Herculean" + next "powers, it can" + next "easily throw arou-" + + page "nd an object that" + next "is 100 times its" + next "own weight.@" diff --git a/data/pokemon/dex_entries/hitmonchan.asm b/data/pokemon/dex_entries/hitmonchan.asm new file mode 100644 index 0000000..8b2f978 --- /dev/null +++ b/data/pokemon/dex_entries/hitmonchan.asm @@ -0,0 +1,10 @@ + db "PUNCHING@" ; species name + dw 407, 1110 ; height, weight + + db "To increase the" + next "strength of all" + next "its punch moves," + + page "it spins its arms" + next "just before making" + next "contact.@" diff --git a/data/pokemon/dex_entries/hitmonlee.asm b/data/pokemon/dex_entries/hitmonlee.asm new file mode 100644 index 0000000..0df1bf2 --- /dev/null +++ b/data/pokemon/dex_entries/hitmonlee.asm @@ -0,0 +1,10 @@ + db "KICKING@" ; species name + dw 411, 1100 ; height, weight + + db "It is also called" + next "the Kick Master." + next "It uses its" + + page "elastic legs to" + next "execute every" + next "known kick.@" diff --git a/data/pokemon/dex_entries/hitmontop.asm b/data/pokemon/dex_entries/hitmontop.asm new file mode 100644 index 0000000..609ccb4 --- /dev/null +++ b/data/pokemon/dex_entries/hitmontop.asm @@ -0,0 +1,10 @@ + db "HANDSTAND@" ; species name + dw 407, 1060 ; height, weight + + db "After doing a" + next "handstand to" + next "throw off the" + + page "opponent's timing," + next "it presents its" + next "fancy kick moves.@" diff --git a/data/pokemon/dex_entries/ho_oh.asm b/data/pokemon/dex_entries/ho_oh.asm new file mode 100644 index 0000000..2bc0abc --- /dev/null +++ b/data/pokemon/dex_entries/ho_oh.asm @@ -0,0 +1,10 @@ + db "RAINBOW@" ; species name + dw 1206, 4390 ; height, weight + + db "It will reveal" + next "itself before a" + next "pure-hearted" + + page "trainer by shining" + next "its bright rain-" + next "bow-colored wings.@" diff --git a/data/pokemon/dex_entries/hoothoot.asm b/data/pokemon/dex_entries/hoothoot.asm new file mode 100644 index 0000000..1df540f --- /dev/null +++ b/data/pokemon/dex_entries/hoothoot.asm @@ -0,0 +1,10 @@ + db "OWL@" ; species name + dw 204, 470 ; height, weight + + db "It begins to hoot" + next "at the same time" + next "every day. Some" + + page "trainers use them" + next "in place of" + next "clocks.@" diff --git a/data/pokemon/dex_entries/hoppip.asm b/data/pokemon/dex_entries/hoppip.asm new file mode 100644 index 0000000..3e97be0 --- /dev/null +++ b/data/pokemon/dex_entries/hoppip.asm @@ -0,0 +1,10 @@ + db "COTTONWEED@" ; species name + dw 104, 10 ; height, weight + + db "It can be carried" + next "away on even the" + next "gentlest breeze." + + page "It may even float" + next "all the way to the" + next "next town.@" diff --git a/data/pokemon/dex_entries/horsea.asm b/data/pokemon/dex_entries/horsea.asm new file mode 100644 index 0000000..53f6ec7 --- /dev/null +++ b/data/pokemon/dex_entries/horsea.asm @@ -0,0 +1,10 @@ + db "DRAGON@" ; species name + dw 104, 180 ; height, weight + + db "When they're in a" + next "safe location," + next "they can be seen" + + page "playfully tangling" + next "their tails" + next "together.@" diff --git a/data/pokemon/dex_entries/houndoom.asm b/data/pokemon/dex_entries/houndoom.asm new file mode 100644 index 0000000..a3b8f9c --- /dev/null +++ b/data/pokemon/dex_entries/houndoom.asm @@ -0,0 +1,10 @@ + db "DARK@" ; species name + dw 407, 770 ; height, weight + + db "The pungent-" + next "smelling flame" + next "that shoots from" + + page "its mouth results" + next "from toxins burn-" + next "ing in its body.@" diff --git a/data/pokemon/dex_entries/houndour.asm b/data/pokemon/dex_entries/houndour.asm new file mode 100644 index 0000000..ba89b90 --- /dev/null +++ b/data/pokemon/dex_entries/houndour.asm @@ -0,0 +1,10 @@ + db "DARK@" ; species name + dw 200, 240 ; height, weight + + db "Around dawn, its" + next "ominous howl" + next "echoes through the" + + page "area to announce" + next "that this is its" + next "territory.@" diff --git a/data/pokemon/dex_entries/hypno.asm b/data/pokemon/dex_entries/hypno.asm new file mode 100644 index 0000000..cfdd298 --- /dev/null +++ b/data/pokemon/dex_entries/hypno.asm @@ -0,0 +1,10 @@ + db "HYPNOSIS@" ; species name + dw 503, 1670 ; height, weight + + db "The longer it" + next "swings its" + next "pendulum, the" + + page "longer the effects" + next "of its hypnosis" + next "last.@" diff --git a/data/pokemon/dex_entries/igglybuff.asm b/data/pokemon/dex_entries/igglybuff.asm new file mode 100644 index 0000000..27d5a80 --- /dev/null +++ b/data/pokemon/dex_entries/igglybuff.asm @@ -0,0 +1,10 @@ + db "BALLOON@" ; species name + dw 100, 20 ; height, weight + + db "Instead of walking" + next "with its short" + next "legs, it moves" + + page "around by bouncing" + next "on its soft," + next "tender body.@" diff --git a/data/pokemon/dex_entries/ivysaur.asm b/data/pokemon/dex_entries/ivysaur.asm new file mode 100644 index 0000000..91a672c --- /dev/null +++ b/data/pokemon/dex_entries/ivysaur.asm @@ -0,0 +1,10 @@ + db "SEED@" ; species name + dw 303, 290 ; height, weight + + db "The bulb on its" + next "back grows as it" + next "absorbs nutrients." + + page "The bulb gives off" + next "a pleasant aroma" + next "when it blooms.@" diff --git a/data/pokemon/dex_entries/jigglypuff.asm b/data/pokemon/dex_entries/jigglypuff.asm new file mode 100644 index 0000000..b90ba73 --- /dev/null +++ b/data/pokemon/dex_entries/jigglypuff.asm @@ -0,0 +1,10 @@ + db "BALLOON@" ; species name + dw 108, 120 ; height, weight + + db "It rolls its cute" + next "eyes as it sings a" + next "soothing lullaby." + + page "Its gentle song" + next "puts anyone who" + next "hears it to sleep.@" diff --git a/data/pokemon/dex_entries/jolteon.asm b/data/pokemon/dex_entries/jolteon.asm new file mode 100644 index 0000000..4d6be5d --- /dev/null +++ b/data/pokemon/dex_entries/jolteon.asm @@ -0,0 +1,10 @@ + db "LIGHTNING@" ; species name + dw 207, 540 ; height, weight + + db "The negatively" + next "charged ions" + next "generated in its" + + page "fur create a" + next "constant sparking" + next "noise.@" diff --git a/data/pokemon/dex_entries/jumpluff.asm b/data/pokemon/dex_entries/jumpluff.asm new file mode 100644 index 0000000..8dacd4d --- /dev/null +++ b/data/pokemon/dex_entries/jumpluff.asm @@ -0,0 +1,10 @@ + db "COTTONWEED@" ; species name + dw 207, 70 ; height, weight + + db "Even in the fierc-" + next "est wind, it can" + next "control its fluff" + + page "to make its way to" + next "any place in the" + next "world it wants.@" diff --git a/data/pokemon/dex_entries/jynx.asm b/data/pokemon/dex_entries/jynx.asm new file mode 100644 index 0000000..6f64867 --- /dev/null +++ b/data/pokemon/dex_entries/jynx.asm @@ -0,0 +1,10 @@ + db "HUMANSHAPE@" ; species name + dw 407, 900 ; height, weight + + db "It has several" + next "different cry pat-" + next "terns, each of" + + page "which seems to" + next "have its own" + next "meaning.@" diff --git a/data/pokemon/dex_entries/kabuto.asm b/data/pokemon/dex_entries/kabuto.asm new file mode 100644 index 0000000..8a65e4c --- /dev/null +++ b/data/pokemon/dex_entries/kabuto.asm @@ -0,0 +1,10 @@ + db "SHELLFISH@" ; species name + dw 108, 250 ; height, weight + + db "Three hundred" + next "million years ago," + next "it hid on the sea" + + page "floor. It also has" + next "eyes on its back" + next "that glow.@" diff --git a/data/pokemon/dex_entries/kabutops.asm b/data/pokemon/dex_entries/kabutops.asm new file mode 100644 index 0000000..bca687d --- /dev/null +++ b/data/pokemon/dex_entries/kabutops.asm @@ -0,0 +1,10 @@ + db "SHELLFISH@" ; species name + dw 403, 890 ; height, weight + + db "It was able to" + next "swim quickly thro-" + next "ugh the water by" + + page "compactly folding" + next "up its razor-sharp" + next "sickles.@" diff --git a/data/pokemon/dex_entries/kadabra.asm b/data/pokemon/dex_entries/kadabra.asm new file mode 100644 index 0000000..01fd960 --- /dev/null +++ b/data/pokemon/dex_entries/kadabra.asm @@ -0,0 +1,10 @@ + db "PSI@" ; species name + dw 403, 1250 ; height, weight + + db "When it closes its" + next "eyes, twice as" + next "many alpha parti-" + + page "cles come out of" + next "the surface of its" + next "body.@" diff --git a/data/pokemon/dex_entries/kakuna.asm b/data/pokemon/dex_entries/kakuna.asm new file mode 100644 index 0000000..3f4a132 --- /dev/null +++ b/data/pokemon/dex_entries/kakuna.asm @@ -0,0 +1,10 @@ + db "COCOON@" ; species name + dw 200, 220 ; height, weight + + db "Nearly incapable" + next "of movement, it" + next "leans against" + + page "stout trees while" + next "waiting for its" + next "evolution.@" diff --git a/data/pokemon/dex_entries/kangaskhan.asm b/data/pokemon/dex_entries/kangaskhan.asm new file mode 100644 index 0000000..c1c9d8d --- /dev/null +++ b/data/pokemon/dex_entries/kangaskhan.asm @@ -0,0 +1,10 @@ + db "PARENT@" ; species name + dw 703, 1760 ; height, weight + + db "To avoid" + next "crushing the" + next "baby it carries in" + + page "its pouch, it" + next "always sleeps" + next "standing up.@" diff --git a/data/pokemon/dex_entries/kingdra.asm b/data/pokemon/dex_entries/kingdra.asm new file mode 100644 index 0000000..05e79a8 --- /dev/null +++ b/data/pokemon/dex_entries/kingdra.asm @@ -0,0 +1,10 @@ + db "DRAGON@" ; species name + dw 511, 3350 ; height, weight + + db "It stores energy" + next "by sleeping at" + next "underwater depths" + + page "at which no other" + next "life forms can" + next "survive.@" diff --git a/data/pokemon/dex_entries/kingler.asm b/data/pokemon/dex_entries/kingler.asm new file mode 100644 index 0000000..2c4b17a --- /dev/null +++ b/data/pokemon/dex_entries/kingler.asm @@ -0,0 +1,10 @@ + db "PINCER@" ; species name + dw 403, 1320 ; height, weight + + db "Its oversized claw" + next "is very powerful," + next "but when it's not" + + page "in battle, the" + next "claw just gets in" + next "the way.@" diff --git a/data/pokemon/dex_entries/koffing.asm b/data/pokemon/dex_entries/koffing.asm new file mode 100644 index 0000000..a3fc0da --- /dev/null +++ b/data/pokemon/dex_entries/koffing.asm @@ -0,0 +1,10 @@ + db "POISON GAS@" ; species name + dw 200, 20 ; height, weight + + db "If one gets close" + next "enough to it when" + next "it expels poison-" + + page "ous gas, the gas" + next "swirling inside it" + next "can be seen.@" diff --git a/data/pokemon/dex_entries/krabby.asm b/data/pokemon/dex_entries/krabby.asm new file mode 100644 index 0000000..0e0081a --- /dev/null +++ b/data/pokemon/dex_entries/krabby.asm @@ -0,0 +1,10 @@ + db "RIVER CRAB@" ; species name + dw 104, 140 ; height, weight + + db "If it is unable" + next "to find food, it" + next "will absorb" + + page "nutrients by" + next "swallowing a" + next "mouthful of sand.@" diff --git a/data/pokemon/dex_entries/lanturn.asm b/data/pokemon/dex_entries/lanturn.asm new file mode 100644 index 0000000..46ea41e --- /dev/null +++ b/data/pokemon/dex_entries/lanturn.asm @@ -0,0 +1,10 @@ + db "LIGHT@" ; species name + dw 311, 500 ; height, weight + + db "This #MON uses" + next "the bright part of" + next "its body, which" + + page "changed from a" + next "dorsal fin, to" + next "lure prey.@" diff --git a/data/pokemon/dex_entries/lapras.asm b/data/pokemon/dex_entries/lapras.asm new file mode 100644 index 0000000..e074cfe --- /dev/null +++ b/data/pokemon/dex_entries/lapras.asm @@ -0,0 +1,10 @@ + db "TRANSPORT@" ; species name + dw 802, 4850 ; height, weight + + db "This gentle" + next "#MON loves to" + next "give people rides" + + page "and provides a ve-" + next "ry comfortable way" + next "to get around.@" diff --git a/data/pokemon/dex_entries/larvitar.asm b/data/pokemon/dex_entries/larvitar.asm new file mode 100644 index 0000000..fa81456 --- /dev/null +++ b/data/pokemon/dex_entries/larvitar.asm @@ -0,0 +1,10 @@ + db "ROCK SKIN@" ; species name + dw 200, 1590 ; height, weight + + db "Born deep under-" + next "ground, this" + next "#MON becomes a" + + page "pupa after eating" + next "enough dirt to" + next "make a mountain.@" diff --git a/data/pokemon/dex_entries/ledian.asm b/data/pokemon/dex_entries/ledian.asm new file mode 100644 index 0000000..90a21d4 --- /dev/null +++ b/data/pokemon/dex_entries/ledian.asm @@ -0,0 +1,10 @@ + db "FIVE STAR@" ; species name + dw 407, 780 ; height, weight + + db "In the daytime" + next "when it gets warm," + next "it curls up inside" + + page "a big leaf and" + next "drifts off into" + next "a deep slumber.@" diff --git a/data/pokemon/dex_entries/ledyba.asm b/data/pokemon/dex_entries/ledyba.asm new file mode 100644 index 0000000..71ed42a --- /dev/null +++ b/data/pokemon/dex_entries/ledyba.asm @@ -0,0 +1,10 @@ + db "FIVE STAR@" ; species name + dw 303, 240 ; height, weight + + db "It is timid and" + next "clusters together" + next "with others. The" + + page "fluid secreted by" + next "its feet indicates" + next "its location.@" diff --git a/data/pokemon/dex_entries/lickitung.asm b/data/pokemon/dex_entries/lickitung.asm new file mode 100644 index 0000000..b5aa73a --- /dev/null +++ b/data/pokemon/dex_entries/lickitung.asm @@ -0,0 +1,10 @@ + db "LICKING@" ; species name + dw 311, 1440 ; height, weight + + db "It has a tongue" + next "that is over 6'6''" + next "long. It uses this" + + page "long tongue to" + next "lick its body" + next "clean.@" diff --git a/data/pokemon/dex_entries/lugia.asm b/data/pokemon/dex_entries/lugia.asm new file mode 100644 index 0000000..8fa0dcf --- /dev/null +++ b/data/pokemon/dex_entries/lugia.asm @@ -0,0 +1,10 @@ + db "DIVING@" ; species name + dw 1701, 4760 ; height, weight + + db "It has an incred-" + next "ible ability to" + next "calm raging sto-" + + page "rms. It is said" + next "that LUGIA appears" + next "when storms start.@" diff --git a/data/pokemon/dex_entries/machamp.asm b/data/pokemon/dex_entries/machamp.asm new file mode 100644 index 0000000..2a84a68 --- /dev/null +++ b/data/pokemon/dex_entries/machamp.asm @@ -0,0 +1,10 @@ + db "SUPERPOWER@" ; species name + dw 503, 2870 ; height, weight + + db "With four arms" + next "that react more" + next "quickly than it" + + page "can think, it can" + next "execute many" + next "punches at once.@" diff --git a/data/pokemon/dex_entries/machoke.asm b/data/pokemon/dex_entries/machoke.asm new file mode 100644 index 0000000..fa7642e --- /dev/null +++ b/data/pokemon/dex_entries/machoke.asm @@ -0,0 +1,10 @@ + db "SUPERPOWER@" ; species name + dw 411, 1550 ; height, weight + + db "This tough #MON" + next "always stays in" + next "the zone. Its" + + page "muscles become" + next "thicker after" + next "every battle.@" diff --git a/data/pokemon/dex_entries/machop.asm b/data/pokemon/dex_entries/machop.asm new file mode 100644 index 0000000..d50eb0a --- /dev/null +++ b/data/pokemon/dex_entries/machop.asm @@ -0,0 +1,10 @@ + db "SUPERPOWER@" ; species name + dw 207, 430 ; height, weight + + db "It trains by" + next "lifting rocks in" + next "the mountains. It" + + page "can even pick up a" + next "GRAVELER with" + next "ease.@" diff --git a/data/pokemon/dex_entries/magby.asm b/data/pokemon/dex_entries/magby.asm new file mode 100644 index 0000000..013d966 --- /dev/null +++ b/data/pokemon/dex_entries/magby.asm @@ -0,0 +1,10 @@ + db "LIVE COAL@" ; species name + dw 204, 470 ; height, weight + + db "It naturally spits" + next "an 1100-degree" + next "flame. It is said" + + page "when many appear," + next "it heralds a" + next "volcanic eruption.@" diff --git a/data/pokemon/dex_entries/magcargo.asm b/data/pokemon/dex_entries/magcargo.asm new file mode 100644 index 0000000..8bbb845 --- /dev/null +++ b/data/pokemon/dex_entries/magcargo.asm @@ -0,0 +1,10 @@ + db "LAVA@" ; species name + dw 207, 1210 ; height, weight + + db "Its body is as hot" + next "as lava and is" + next "always billowing." + + page "Flames will" + next "occasionally burst" + next "from its shell.@" diff --git a/data/pokemon/dex_entries/magikarp.asm b/data/pokemon/dex_entries/magikarp.asm new file mode 100644 index 0000000..2be156f --- /dev/null +++ b/data/pokemon/dex_entries/magikarp.asm @@ -0,0 +1,10 @@ + db "FISH@" ; species name + dw 211, 220 ; height, weight + + db "This weak and" + next "pathetic #MON" + next "gets easily pushed" + + page "along rivers when" + next "there are strong" + next "currents.@" diff --git a/data/pokemon/dex_entries/magmar.asm b/data/pokemon/dex_entries/magmar.asm new file mode 100644 index 0000000..f62544b --- /dev/null +++ b/data/pokemon/dex_entries/magmar.asm @@ -0,0 +1,10 @@ + db "SPITFIRE@" ; species name + dw 403, 980 ; height, weight + + db "It moves more" + next "frequently in hot" + next "areas. It can heal" + + page "itself by dipping" + next "its wound into" + next "lava.@" diff --git a/data/pokemon/dex_entries/magnemite.asm b/data/pokemon/dex_entries/magnemite.asm new file mode 100644 index 0000000..646bd80 --- /dev/null +++ b/data/pokemon/dex_entries/magnemite.asm @@ -0,0 +1,10 @@ + db "MAGNET@" ; species name + dw 100, 130 ; height, weight + + db "The electricity" + next "emitted by the" + next "units on each side" + + page "of its body cause" + next "it to become a" + next "strong magnet.@" diff --git a/data/pokemon/dex_entries/magneton.asm b/data/pokemon/dex_entries/magneton.asm new file mode 100644 index 0000000..fff66de --- /dev/null +++ b/data/pokemon/dex_entries/magneton.asm @@ -0,0 +1,10 @@ + db "MAGNET@" ; species name + dw 303, 1320 ; height, weight + + db "When many" + next "MAGNETON gather" + next "together, the" + + page "resulting magnetic" + next "storm disrupts" + next "radio waves.@" diff --git a/data/pokemon/dex_entries/mankey.asm b/data/pokemon/dex_entries/mankey.asm new file mode 100644 index 0000000..344e6ca --- /dev/null +++ b/data/pokemon/dex_entries/mankey.asm @@ -0,0 +1,10 @@ + db "PIG MONKEY@" ; species name + dw 108, 620 ; height, weight + + db "It lives in groups" + next "in the treetops." + next "If it loses sight" + + page "of its group, it" + next "becomes infuriated" + next "by its loneliness.@" diff --git a/data/pokemon/dex_entries/mantine.asm b/data/pokemon/dex_entries/mantine.asm new file mode 100644 index 0000000..02d4c44 --- /dev/null +++ b/data/pokemon/dex_entries/mantine.asm @@ -0,0 +1,10 @@ + db "KITE@" ; species name + dw 611, 4850 ; height, weight + + db "It swims along" + next "freely, eating" + next "things that swim" + + page "into its mouth." + next "Its whole body is" + next "very coarse.@" diff --git a/data/pokemon/dex_entries/mareep.asm b/data/pokemon/dex_entries/mareep.asm new file mode 100644 index 0000000..3f0492a --- /dev/null +++ b/data/pokemon/dex_entries/mareep.asm @@ -0,0 +1,10 @@ + db "WOOL@" ; species name + dw 200, 170 ; height, weight + + db "It stores lots of" + next "air in its soft" + next "fur, allowing it" + + page "to stay cool in" + next "summer and warm" + next "in winter.@" diff --git a/data/pokemon/dex_entries/marill.asm b/data/pokemon/dex_entries/marill.asm new file mode 100644 index 0000000..1b87ba2 --- /dev/null +++ b/data/pokemon/dex_entries/marill.asm @@ -0,0 +1,10 @@ + db "AQUAMOUSE@" ; species name + dw 104, 190 ; height, weight + + db "The fur on its" + next "body naturally" + next "repels water. It" + + page "can stay dry, even" + next "when it plays in" + next "the water.@" diff --git a/data/pokemon/dex_entries/marowak.asm b/data/pokemon/dex_entries/marowak.asm new file mode 100644 index 0000000..18b3f2e --- /dev/null +++ b/data/pokemon/dex_entries/marowak.asm @@ -0,0 +1,10 @@ + db "BONEKEEPER@" ; species name + dw 303, 990 ; height, weight + + db "Somewhere in the" + next "world is a ceme-" + next "tery just for" + + page "MAROWAK. It gets" + next "its bones from" + next "those graves.@" diff --git a/data/pokemon/dex_entries/meganium.asm b/data/pokemon/dex_entries/meganium.asm new file mode 100644 index 0000000..711c12b --- /dev/null +++ b/data/pokemon/dex_entries/meganium.asm @@ -0,0 +1,10 @@ + db "HERB@" ; species name + dw 511, 2220 ; height, weight + + db "Anyone who stands" + next "beside it becomes" + next "refreshed, just as" + + page "if they were" + next "relaxing in a" + next "sunny forest.@" diff --git a/data/pokemon/dex_entries/meowth.asm b/data/pokemon/dex_entries/meowth.asm new file mode 100644 index 0000000..9897a3b --- /dev/null +++ b/data/pokemon/dex_entries/meowth.asm @@ -0,0 +1,10 @@ + db "SCRATCHCAT@" ; species name + dw 104, 90 ; height, weight + + db "It loves things" + next "that sparkle. When" + next "it sees a shiny" + + page "object, the gold" + next "coin on its head" + next "shines too.@" diff --git a/data/pokemon/dex_entries/metapod.asm b/data/pokemon/dex_entries/metapod.asm new file mode 100644 index 0000000..9ee9b8a --- /dev/null +++ b/data/pokemon/dex_entries/metapod.asm @@ -0,0 +1,10 @@ + db "COCOON@" ; species name + dw 204, 220 ; height, weight + + db "This is its pre-" + next "evolved form. At" + next "this stage, it can" + + page "only harden, so it" + next "remains motionless" + next "to avoid attack.@" diff --git a/data/pokemon/dex_entries/mew.asm b/data/pokemon/dex_entries/mew.asm new file mode 100644 index 0000000..66682b1 --- /dev/null +++ b/data/pokemon/dex_entries/mew.asm @@ -0,0 +1,10 @@ + db "NEW SPECIE@" ; species name + dw 104, 90 ; height, weight + + db "Because it can" + next "learn any move," + next "some people began" + + page "research to see if" + next "it is the ancestor" + next "of all #MON.@" diff --git a/data/pokemon/dex_entries/mewtwo.asm b/data/pokemon/dex_entries/mewtwo.asm new file mode 100644 index 0000000..c49e553 --- /dev/null +++ b/data/pokemon/dex_entries/mewtwo.asm @@ -0,0 +1,10 @@ + db "GENETIC@" ; species name + dw 607, 2690 ; height, weight + + db "Said to rest qui-" + next "etly in an" + next "undiscovered cave," + + page "this #MON was" + next "created solely for" + next "battling.@" diff --git a/data/pokemon/dex_entries/miltank.asm b/data/pokemon/dex_entries/miltank.asm new file mode 100644 index 0000000..660f652 --- /dev/null +++ b/data/pokemon/dex_entries/miltank.asm @@ -0,0 +1,10 @@ + db "MILK COW@" ; species name + dw 311, 1660 ; height, weight + + db "In order to milk a" + next "MILTANK, one must" + next "have a knack for" + + page "rhythmically pull-" + next "ing up and down" + next "on its udders.@" diff --git a/data/pokemon/dex_entries/misdreavus.asm b/data/pokemon/dex_entries/misdreavus.asm new file mode 100644 index 0000000..6e7e510 --- /dev/null +++ b/data/pokemon/dex_entries/misdreavus.asm @@ -0,0 +1,10 @@ + db "SCREECH@" ; species name + dw 204, 20 ; height, weight + + db "It loves to watch" + next "people it's scar-" + next "ed. It frightens" + + page "them by screaming" + next "loudly or appear-" + next "ing suddenly.@" diff --git a/data/pokemon/dex_entries/moltres.asm b/data/pokemon/dex_entries/moltres.asm new file mode 100644 index 0000000..d4ec793 --- /dev/null +++ b/data/pokemon/dex_entries/moltres.asm @@ -0,0 +1,10 @@ + db "FLAME@" ; species name + dw 607, 1320 ; height, weight + + db "Legendary bird" + next "#MON. It is" + next "said to migrate" + + page "from the south" + next "along with the" + next "spring.@" diff --git a/data/pokemon/dex_entries/mr__mime.asm b/data/pokemon/dex_entries/mr__mime.asm new file mode 100644 index 0000000..d96b9b3 --- /dev/null +++ b/data/pokemon/dex_entries/mr__mime.asm @@ -0,0 +1,10 @@ + db "BARRIER@" ; species name + dw 403, 1200 ; height, weight + + db "It uses the" + next "mysterious" + next "power it has in" + + page "its fingers to" + next "solidify air into" + next "an invisible wall.@" diff --git a/data/pokemon/dex_entries/muk.asm b/data/pokemon/dex_entries/muk.asm new file mode 100644 index 0000000..6db1f18 --- /dev/null +++ b/data/pokemon/dex_entries/muk.asm @@ -0,0 +1,10 @@ + db "SLUDGE@" ; species name + dw 311, 660 ; height, weight + + db "As it moves, a" + next "very strong poison" + next "leaks from it," + + page "making the ground" + next "there barren for" + next "three years.@" diff --git a/data/pokemon/dex_entries/murkrow.asm b/data/pokemon/dex_entries/murkrow.asm new file mode 100644 index 0000000..90d90bf --- /dev/null +++ b/data/pokemon/dex_entries/murkrow.asm @@ -0,0 +1,10 @@ + db "DARKNESS@" ; species name + dw 108, 50 ; height, weight + + db "It hides any shiny" + next "object it finds in" + next "a secret location." + + page "MURKROW and" + next "MEOWTH loot one" + next "another's stashes.@" diff --git a/data/pokemon/dex_entries/natu.asm b/data/pokemon/dex_entries/natu.asm new file mode 100644 index 0000000..04c4797 --- /dev/null +++ b/data/pokemon/dex_entries/natu.asm @@ -0,0 +1,10 @@ + db "LITTLE BIRD@" ; species name + dw 8, 40 ; height, weight + + db "It is extremely" + next "good at climbing" + next "tree trunks and" + + page "likes to eat the" + next "new sprouts on" + next "the trees.@" diff --git a/data/pokemon/dex_entries/nidoking.asm b/data/pokemon/dex_entries/nidoking.asm new file mode 100644 index 0000000..a260cea --- /dev/null +++ b/data/pokemon/dex_entries/nidoking.asm @@ -0,0 +1,10 @@ + db "DRILL@" ; species name + dw 407, 1370 ; height, weight + + db "It uses its thick" + next "arms, legs and" + next "tail to attack" + + page "forcefully. Melee" + next "combat is its" + next "specialty.@" diff --git a/data/pokemon/dex_entries/nidoqueen.asm b/data/pokemon/dex_entries/nidoqueen.asm new file mode 100644 index 0000000..5345467 --- /dev/null +++ b/data/pokemon/dex_entries/nidoqueen.asm @@ -0,0 +1,10 @@ + db "DRILL@" ; species name + dw 403, 1320 ; height, weight + + db "The hard scales" + next "that cover its" + next "strong body serve" + + page "as excellent" + next "protection from" + next "any attack.@" diff --git a/data/pokemon/dex_entries/nidoran_f.asm b/data/pokemon/dex_entries/nidoran_f.asm new file mode 100644 index 0000000..9181edc --- /dev/null +++ b/data/pokemon/dex_entries/nidoran_f.asm @@ -0,0 +1,10 @@ + db "POISON PIN@" ; species name + dw 104, 150 ; height, weight + + db "Small and very" + next "docile, it pro-" + next "tects itself with" + + page "its small, poison-" + next "ous horn when" + next "attacked.@" diff --git a/data/pokemon/dex_entries/nidoran_m.asm b/data/pokemon/dex_entries/nidoran_m.asm new file mode 100644 index 0000000..51ec0a5 --- /dev/null +++ b/data/pokemon/dex_entries/nidoran_m.asm @@ -0,0 +1,10 @@ + db "POISON PIN@" ; species name + dw 108, 200 ; height, weight + + db "It constantly" + next "moves its large" + next "ears in many" + + page "directions in" + next "order to detect" + next "danger right away.@" diff --git a/data/pokemon/dex_entries/nidorina.asm b/data/pokemon/dex_entries/nidorina.asm new file mode 100644 index 0000000..e1670a1 --- /dev/null +++ b/data/pokemon/dex_entries/nidorina.asm @@ -0,0 +1,10 @@ + db "POISON PIN@" ; species name + dw 207, 440 ; height, weight + + db "It has a docile" + next "nature. If it is" + next "threatened with" + + page "attack, it raises" + next "the barbs that are" + next "all over its body.@" diff --git a/data/pokemon/dex_entries/nidorino.asm b/data/pokemon/dex_entries/nidorino.asm new file mode 100644 index 0000000..3f00ac0 --- /dev/null +++ b/data/pokemon/dex_entries/nidorino.asm @@ -0,0 +1,10 @@ + db "POISON PIN@" ; species name + dw 211, 430 ; height, weight + + db "It is easily" + next "agitated and uses" + next "its horn for" + + page "offense as soon as" + next "it notices an" + next "attacker.@" diff --git a/data/pokemon/dex_entries/ninetales.asm b/data/pokemon/dex_entries/ninetales.asm new file mode 100644 index 0000000..c0295e0 --- /dev/null +++ b/data/pokemon/dex_entries/ninetales.asm @@ -0,0 +1,10 @@ + db "FOX@" ; species name + dw 307, 440 ; height, weight + + db "It is said to live" + next "a thousand years," + next "and each of its" + + page "tails is loaded" + next "with supernatural" + next "powers.@" diff --git a/data/pokemon/dex_entries/noctowl.asm b/data/pokemon/dex_entries/noctowl.asm new file mode 100644 index 0000000..ed04cb2 --- /dev/null +++ b/data/pokemon/dex_entries/noctowl.asm @@ -0,0 +1,10 @@ + db "OWL@" ; species name + dw 503, 900 ; height, weight + + db "Its extremely soft" + next "feathers make no" + next "sound in flight." + + page "It silently sneaks" + next "up on prey without" + next "being detected.@" diff --git a/data/pokemon/dex_entries/octillery.asm b/data/pokemon/dex_entries/octillery.asm new file mode 100644 index 0000000..66c5391 --- /dev/null +++ b/data/pokemon/dex_entries/octillery.asm @@ -0,0 +1,10 @@ + db "JET@" ; species name + dw 211, 630 ; height, weight + + db "Its instinct is to" + next "bury itself in" + next "holes. It often" + + page "steals the nesting" + next "holes of others to" + next "sleep in them.@" diff --git a/data/pokemon/dex_entries/oddish.asm b/data/pokemon/dex_entries/oddish.asm new file mode 100644 index 0000000..e8a63d8 --- /dev/null +++ b/data/pokemon/dex_entries/oddish.asm @@ -0,0 +1,10 @@ + db "WEED@" ; species name + dw 108, 120 ; height, weight + + db "During the day, it" + next "stays in the cold" + next "underground to" + + page "avoid the sun." + next "It grows by bath-" + next "ing in moonlight.@" diff --git a/data/pokemon/dex_entries/omanyte.asm b/data/pokemon/dex_entries/omanyte.asm new file mode 100644 index 0000000..70c5569 --- /dev/null +++ b/data/pokemon/dex_entries/omanyte.asm @@ -0,0 +1,10 @@ + db "SPIRAL@" ; species name + dw 104, 170 ; height, weight + + db "In prehistoric" + next "times, it swam on" + next "the sea floor," + + page "eating plankton." + next "Its fossils are" + next "sometimes found.@" diff --git a/data/pokemon/dex_entries/omastar.asm b/data/pokemon/dex_entries/omastar.asm new file mode 100644 index 0000000..f2cc0ca --- /dev/null +++ b/data/pokemon/dex_entries/omastar.asm @@ -0,0 +1,10 @@ + db "SPIRAL@" ; species name + dw 303, 770 ; height, weight + + db "Its heavy shell" + next "allowed it to" + next "reach only nearby" + + page "food. This could" + next "be the reason it" + next "is extinct.@" diff --git a/data/pokemon/dex_entries/onix.asm b/data/pokemon/dex_entries/onix.asm new file mode 100644 index 0000000..12164c5 --- /dev/null +++ b/data/pokemon/dex_entries/onix.asm @@ -0,0 +1,10 @@ + db "ROCK SNAKE@" ; species name + dw 2810, 4630 ; height, weight + + db "As it digs through" + next "the ground, it" + next "absorbs many hard" + + page "objects. This is" + next "what makes its" + next "body so solid.@" diff --git a/data/pokemon/dex_entries/paras.asm b/data/pokemon/dex_entries/paras.asm new file mode 100644 index 0000000..62d473c --- /dev/null +++ b/data/pokemon/dex_entries/paras.asm @@ -0,0 +1,10 @@ + db "MUSHROOM@" ; species name + dw 100, 120 ; height, weight + + db "The tochukaso" + next "growing on this" + next "#MON's back" + + page "orders it to" + next "extract juice from" + next "tree trunks.@" diff --git a/data/pokemon/dex_entries/parasect.asm b/data/pokemon/dex_entries/parasect.asm new file mode 100644 index 0000000..6fbf4f7 --- /dev/null +++ b/data/pokemon/dex_entries/parasect.asm @@ -0,0 +1,10 @@ + db "MUSHROOM@" ; species name + dw 303, 650 ; height, weight + + db "When nothing's" + next "left to extract" + next "from the bug, the" + + page "mushrooms on its" + next "back leave spores" + next "on the bug's egg.@" diff --git a/data/pokemon/dex_entries/persian.asm b/data/pokemon/dex_entries/persian.asm new file mode 100644 index 0000000..9264eec --- /dev/null +++ b/data/pokemon/dex_entries/persian.asm @@ -0,0 +1,10 @@ + db "CLASSY CAT@" ; species name + dw 303, 710 ; height, weight + + db "Behind its lithe," + next "elegant appearance" + next "lies a barbaric" + + page "side. It will tear" + next "apart its prey on" + next "a mere whim.@" diff --git a/data/pokemon/dex_entries/phanpy.asm b/data/pokemon/dex_entries/phanpy.asm new file mode 100644 index 0000000..c32a688 --- /dev/null +++ b/data/pokemon/dex_entries/phanpy.asm @@ -0,0 +1,10 @@ + db "LONG NOSE@" ; species name + dw 108, 740 ; height, weight + + db "During the desert-" + next "ed morning hours," + next "it comes ashore" + + page "where it deftly" + next "uses its trunk to" + next "take a shower.@" diff --git a/data/pokemon/dex_entries/pichu.asm b/data/pokemon/dex_entries/pichu.asm new file mode 100644 index 0000000..2d82c6f --- /dev/null +++ b/data/pokemon/dex_entries/pichu.asm @@ -0,0 +1,10 @@ + db "TINY MOUSE@" ; species name + dw 100, 40 ; height, weight + + db "It is unskilled at" + next "storing electric" + next "power. Any kind of" + + page "shock causes it to" + next "discharge energy" + next "spontaneously.@" diff --git a/data/pokemon/dex_entries/pidgeot.asm b/data/pokemon/dex_entries/pidgeot.asm new file mode 100644 index 0000000..07df086 --- /dev/null +++ b/data/pokemon/dex_entries/pidgeot.asm @@ -0,0 +1,10 @@ + db "BIRD@" ; species name + dw 411, 870 ; height, weight + + db "Its outstanding" + next "vision allows it" + next "to spot splashing" + + page "MAGIKARP, even" + next "while flying at" + next "3300 feet.@" diff --git a/data/pokemon/dex_entries/pidgeotto.asm b/data/pokemon/dex_entries/pidgeotto.asm new file mode 100644 index 0000000..30a1cce --- /dev/null +++ b/data/pokemon/dex_entries/pidgeotto.asm @@ -0,0 +1,10 @@ + db "BIRD@" ; species name + dw 307, 660 ; height, weight + + db "It slowly flies in" + next "a circular pat-" + next "tern, all the" + + page "while keeping a" + next "sharp lookout for" + next "prey.@" diff --git a/data/pokemon/dex_entries/pidgey.asm b/data/pokemon/dex_entries/pidgey.asm new file mode 100644 index 0000000..cde05eb --- /dev/null +++ b/data/pokemon/dex_entries/pidgey.asm @@ -0,0 +1,10 @@ + db "TINY BIRD@" ; species name + dw 100, 40 ; height, weight + + db "It rapidly flaps" + next "its wings in the" + next "grass, stirring up" + + page "a dust cloud that" + next "drives insect prey" + next "out into the open.@" diff --git a/data/pokemon/dex_entries/pikachu.asm b/data/pokemon/dex_entries/pikachu.asm new file mode 100644 index 0000000..699900f --- /dev/null +++ b/data/pokemon/dex_entries/pikachu.asm @@ -0,0 +1,10 @@ + db "MOUSE@" ; species name + dw 104, 130 ; height, weight + + db "When it is anger-" + next "ed, it immediately" + next "discharges the" + + page "energy stored in" + next "the pouches in its" + next "cheeks.@" diff --git a/data/pokemon/dex_entries/piloswine.asm b/data/pokemon/dex_entries/piloswine.asm new file mode 100644 index 0000000..1c5aa36 --- /dev/null +++ b/data/pokemon/dex_entries/piloswine.asm @@ -0,0 +1,10 @@ + db "SWINE@" ; species name + dw 307, 1230 ; height, weight + + db "Although its legs" + next "are short, its" + next "rugged hooves" + + page "prevent it from" + next "slipping, even on" + next "icy ground.@" diff --git a/data/pokemon/dex_entries/pineco.asm b/data/pokemon/dex_entries/pineco.asm new file mode 100644 index 0000000..7d8d990 --- /dev/null +++ b/data/pokemon/dex_entries/pineco.asm @@ -0,0 +1,10 @@ + db "BAGWORM@" ; species name + dw 200, 160 ; height, weight + + db "It spits out a" + next "fluid that it uses" + next "to glue tree bark" + + page "to its body. The" + next "fluid hardens when" + next "it touches air.@" diff --git a/data/pokemon/dex_entries/pinsir.asm b/data/pokemon/dex_entries/pinsir.asm new file mode 100644 index 0000000..331a8d4 --- /dev/null +++ b/data/pokemon/dex_entries/pinsir.asm @@ -0,0 +1,10 @@ + db "STAGBEETLE@" ; species name + dw 411, 1210 ; height, weight + + db "When the tempera-" + next "ture drops at" + next "night, it sleeps" + + page "on treetops or" + next "among roots where" + next "it is well hidden.@" diff --git a/data/pokemon/dex_entries/politoed.asm b/data/pokemon/dex_entries/politoed.asm new file mode 100644 index 0000000..a085ad5 --- /dev/null +++ b/data/pokemon/dex_entries/politoed.asm @@ -0,0 +1,10 @@ + db "FROG@" ; species name + dw 307, 750 ; height, weight + + db "When it expands" + next "its throat to" + next "croak out a tune," + + page "nearby POLIWAG and" + next "POLIWHIRL gather" + next "immediately.@" diff --git a/data/pokemon/dex_entries/poliwag.asm b/data/pokemon/dex_entries/poliwag.asm new file mode 100644 index 0000000..9183a15 --- /dev/null +++ b/data/pokemon/dex_entries/poliwag.asm @@ -0,0 +1,10 @@ + db "TADPOLE@" ; species name + dw 200, 270 ; height, weight + + db "The swirl on its" + next "belly is its" + next "insides showing" + + page "through the skin." + next "It looks clearer" + next "after it eats.@" diff --git a/data/pokemon/dex_entries/poliwhirl.asm b/data/pokemon/dex_entries/poliwhirl.asm new file mode 100644 index 0000000..df4e0e6 --- /dev/null +++ b/data/pokemon/dex_entries/poliwhirl.asm @@ -0,0 +1,10 @@ + db "TADPOLE@" ; species name + dw 303, 440 ; height, weight + + db "Though it is" + next "skilled at walk-" + next "ing, it prefers to" + + page "live underwater" + next "where there is" + next "less danger.@" diff --git a/data/pokemon/dex_entries/poliwrath.asm b/data/pokemon/dex_entries/poliwrath.asm new file mode 100644 index 0000000..4b4f233 --- /dev/null +++ b/data/pokemon/dex_entries/poliwrath.asm @@ -0,0 +1,10 @@ + db "TADPOLE@" ; species name + dw 403, 1190 ; height, weight + + db "It can use its" + next "well-developed" + next "arms and legs to" + + page "run on the surface" + next "of the water for a" + next "split second.@" diff --git a/data/pokemon/dex_entries/ponyta.asm b/data/pokemon/dex_entries/ponyta.asm new file mode 100644 index 0000000..0d82b77 --- /dev/null +++ b/data/pokemon/dex_entries/ponyta.asm @@ -0,0 +1,10 @@ + db "FIRE HORSE@" ; species name + dw 303, 660 ; height, weight + + db "Training by" + next "jumping over grass" + next "that grows longer" + + page "every day has made" + next "it a world-class" + next "jumper.@" diff --git a/data/pokemon/dex_entries/porygon.asm b/data/pokemon/dex_entries/porygon.asm new file mode 100644 index 0000000..098a96d --- /dev/null +++ b/data/pokemon/dex_entries/porygon.asm @@ -0,0 +1,10 @@ + db "VIRTUAL@" ; species name + dw 207, 800 ; height, weight + + db "An artificial" + next "#MON created" + next "due to extensive" + + page "research, it can" + next "perform only what" + next "is in its program.@" diff --git a/data/pokemon/dex_entries/porygon2.asm b/data/pokemon/dex_entries/porygon2.asm new file mode 100644 index 0000000..e4f5a23 --- /dev/null +++ b/data/pokemon/dex_entries/porygon2.asm @@ -0,0 +1,10 @@ + db "VIRTUAL@" ; species name + dw 200, 720 ; height, weight + + db "This manmade" + next "#MON evolved" + next "from the latest" + + page "technology. It" + next "may have unprog-" + next "rammed reactions.@" diff --git a/data/pokemon/dex_entries/primeape.asm b/data/pokemon/dex_entries/primeape.asm new file mode 100644 index 0000000..3a96c93 --- /dev/null +++ b/data/pokemon/dex_entries/primeape.asm @@ -0,0 +1,10 @@ + db "PIG MONKEY@" ; species name + dw 303, 710 ; height, weight + + db "It will beat up" + next "anyone who makes" + next "it mad, even if it" + + page "has to chase them" + next "until the end of" + next "the world.@" diff --git a/data/pokemon/dex_entries/psyduck.asm b/data/pokemon/dex_entries/psyduck.asm new file mode 100644 index 0000000..6a58bc9 --- /dev/null +++ b/data/pokemon/dex_entries/psyduck.asm @@ -0,0 +1,10 @@ + db "DUCK@" ; species name + dw 207, 430 ; height, weight + + db "The only time it" + next "can use its psy-" + next "chic power is when" + + page "its sleeping brain" + next "cells happen to" + next "wake.@" diff --git a/data/pokemon/dex_entries/pupitar.asm b/data/pokemon/dex_entries/pupitar.asm new file mode 100644 index 0000000..ae8b5b3 --- /dev/null +++ b/data/pokemon/dex_entries/pupitar.asm @@ -0,0 +1,10 @@ + db "HARD SHELL@" ; species name + dw 311, 3350 ; height, weight + + db "It will not stay" + next "still, even while" + next "it's a pupa. It" + + page "already has arms" + next "and legs under its" + next "solid shell.@" diff --git a/data/pokemon/dex_entries/quagsire.asm b/data/pokemon/dex_entries/quagsire.asm new file mode 100644 index 0000000..25bb2ab --- /dev/null +++ b/data/pokemon/dex_entries/quagsire.asm @@ -0,0 +1,10 @@ + db "WATER FISH@" ; species name + dw 407, 1650 ; height, weight + + db "Its body is always" + next "slimy. It often" + next "bangs its head on" + + page "the river bottom" + next "as it swims but" + next "seems not to care.@" diff --git a/data/pokemon/dex_entries/quilava.asm b/data/pokemon/dex_entries/quilava.asm new file mode 100644 index 0000000..97363c1 --- /dev/null +++ b/data/pokemon/dex_entries/quilava.asm @@ -0,0 +1,10 @@ + db "VOLCANO@" ; species name + dw 211, 420 ; height, weight + + db "Before battle, it" + next "turns its back on" + next "its opponent to" + + page "demonstrate how" + next "ferociously its" + next "fire blazes.@" diff --git a/data/pokemon/dex_entries/qwilfish.asm b/data/pokemon/dex_entries/qwilfish.asm new file mode 100644 index 0000000..c7405b9 --- /dev/null +++ b/data/pokemon/dex_entries/qwilfish.asm @@ -0,0 +1,10 @@ + db "BALLOON@" ; species name + dw 108, 90 ; height, weight + + db "When faced with a" + next "larger opponent," + next "it swallows as" + + page "much water as it" + next "can to match the" + next "opponent's size.@" diff --git a/data/pokemon/dex_entries/raichu.asm b/data/pokemon/dex_entries/raichu.asm new file mode 100644 index 0000000..a17a5e9 --- /dev/null +++ b/data/pokemon/dex_entries/raichu.asm @@ -0,0 +1,10 @@ + db "MOUSE@" ; species name + dw 207, 660 ; height, weight + + db "If its electric" + next "pouches run empty," + next "it raises its tail" + + page "to gather electri-" + next "city from the" + next "atmosphere.@" diff --git a/data/pokemon/dex_entries/raikou.asm b/data/pokemon/dex_entries/raikou.asm new file mode 100644 index 0000000..4f30063 --- /dev/null +++ b/data/pokemon/dex_entries/raikou.asm @@ -0,0 +1,10 @@ + db "THUNDER@" ; species name + dw 603, 3920 ; height, weight + + db "This rough #MON" + next "stores energy" + next "inside its body," + + page "then sweeps across" + next "the land, shooting" + next "off electricity.@" diff --git a/data/pokemon/dex_entries/rapidash.asm b/data/pokemon/dex_entries/rapidash.asm new file mode 100644 index 0000000..051e557 --- /dev/null +++ b/data/pokemon/dex_entries/rapidash.asm @@ -0,0 +1,10 @@ + db "FIRE HORSE@" ; species name + dw 507, 2090 ; height, weight + + db "It just loves to" + next "gallop. The faster" + next "it goes, the long-" + + page "er the swaying" + next "flames of its mane" + next "will become.@" diff --git a/data/pokemon/dex_entries/raticate.asm b/data/pokemon/dex_entries/raticate.asm new file mode 100644 index 0000000..50898dd --- /dev/null +++ b/data/pokemon/dex_entries/raticate.asm @@ -0,0 +1,10 @@ + db "RAT@" ; species name + dw 204, 410 ; height, weight + + db "The webs on its" + next "hind legs enable" + next "it to cross" + + page "rivers. It search-" + next "es wide areas for" + next "food.@" diff --git a/data/pokemon/dex_entries/rattata.asm b/data/pokemon/dex_entries/rattata.asm new file mode 100644 index 0000000..f9e801b --- /dev/null +++ b/data/pokemon/dex_entries/rattata.asm @@ -0,0 +1,10 @@ + db "RAT@" ; species name + dw 100, 80 ; height, weight + + db "This #MON's" + next "impressive vital-" + next "ity allows it to" + + page "live anywhere. It" + next "also multiplies" + next "very quickly.@" diff --git a/data/pokemon/dex_entries/remoraid.asm b/data/pokemon/dex_entries/remoraid.asm new file mode 100644 index 0000000..1b9b0e5 --- /dev/null +++ b/data/pokemon/dex_entries/remoraid.asm @@ -0,0 +1,10 @@ + db "JET@" ; species name + dw 200, 260 ; height, weight + + db "To escape from an" + next "attacker, it may" + next "shoot water out of" + + page "its mouth, then" + next "use that force to" + next "swim backward.@" diff --git a/data/pokemon/dex_entries/rhydon.asm b/data/pokemon/dex_entries/rhydon.asm new file mode 100644 index 0000000..c811413 --- /dev/null +++ b/data/pokemon/dex_entries/rhydon.asm @@ -0,0 +1,10 @@ + db "DRILL@" ; species name + dw 603, 2650 ; height, weight + + db "By lightly spin-" + next "ning its drill-" + next "like horn, it can" + + page "easily shatter" + next "even a diamond in" + next "the rough.@" diff --git a/data/pokemon/dex_entries/rhyhorn.asm b/data/pokemon/dex_entries/rhyhorn.asm new file mode 100644 index 0000000..d7dd8d7 --- /dev/null +++ b/data/pokemon/dex_entries/rhyhorn.asm @@ -0,0 +1,10 @@ + db "SPIKES@" ; species name + dw 303, 2540 ; height, weight + + db "It can remember" + next "only one thing at" + next "a time. Once it" + + page "starts rushing, it" + next "forgets why it" + next "started.@" diff --git a/data/pokemon/dex_entries/sandshrew.asm b/data/pokemon/dex_entries/sandshrew.asm new file mode 100644 index 0000000..570907b --- /dev/null +++ b/data/pokemon/dex_entries/sandshrew.asm @@ -0,0 +1,10 @@ + db "MOUSE@" ; species name + dw 200, 260 ; height, weight + + db "It prefers dry," + next "sandy places" + next "because it uses" + + page "the sand to" + next "protect itself" + next "when threatened.@" diff --git a/data/pokemon/dex_entries/sandslash.asm b/data/pokemon/dex_entries/sandslash.asm new file mode 100644 index 0000000..9e7fc45 --- /dev/null +++ b/data/pokemon/dex_entries/sandslash.asm @@ -0,0 +1,10 @@ + db "MOUSE@" ; species name + dw 303, 650 ; height, weight + + db "Adept at climbing" + next "trees, it rolls" + next "into a spiny ball," + + page "then attacks its" + next "enemies from" + next "above.@" diff --git a/data/pokemon/dex_entries/scizor.asm b/data/pokemon/dex_entries/scizor.asm new file mode 100644 index 0000000..fa184c6 --- /dev/null +++ b/data/pokemon/dex_entries/scizor.asm @@ -0,0 +1,10 @@ + db "SCISSORS@" ; species name + dw 511, 2600 ; height, weight + + db "This #MON's" + next "pincers, which" + next "contain steel, can" + + page "crush any hard" + next "object it gets a" + next "hold of into bits.@" diff --git a/data/pokemon/dex_entries/scyther.asm b/data/pokemon/dex_entries/scyther.asm new file mode 100644 index 0000000..f2231dd --- /dev/null +++ b/data/pokemon/dex_entries/scyther.asm @@ -0,0 +1,10 @@ + db "MANTIS@" ; species name + dw 411, 1230 ; height, weight + + db "It's very proud of" + next "its speed. It" + next "moves so fast that" + + page "its opponent does" + next "not even know what" + next "knocked it down.@" diff --git a/data/pokemon/dex_entries/seadra.asm b/data/pokemon/dex_entries/seadra.asm new file mode 100644 index 0000000..482302a --- /dev/null +++ b/data/pokemon/dex_entries/seadra.asm @@ -0,0 +1,10 @@ + db "DRAGON@" ; species name + dw 311, 550 ; height, weight + + db "The male raises" + next "the young. If it" + next "is approached, it" + + page "uses its toxic" + next "spikes to fend off" + next "the intruder.@" diff --git a/data/pokemon/dex_entries/seaking.asm b/data/pokemon/dex_entries/seaking.asm new file mode 100644 index 0000000..1225d0b --- /dev/null +++ b/data/pokemon/dex_entries/seaking.asm @@ -0,0 +1,10 @@ + db "GOLDFISH@" ; species name + dw 403, 860 ; height, weight + + db "When autumn comes," + next "the males patrol" + next "the area around" + + page "their nests in" + next "order to protect" + next "their offspring.@" diff --git a/data/pokemon/dex_entries/seel.asm b/data/pokemon/dex_entries/seel.asm new file mode 100644 index 0000000..ac5bdbc --- /dev/null +++ b/data/pokemon/dex_entries/seel.asm @@ -0,0 +1,10 @@ + db "SEA LION@" ; species name + dw 307, 1980 ; height, weight + + db "The light blue fur" + next "that covers it" + next "keeps it protected" + + page "against the cold." + next "It loves iceberg-" + next "filled oceans.@" diff --git a/data/pokemon/dex_entries/sentret.asm b/data/pokemon/dex_entries/sentret.asm new file mode 100644 index 0000000..70f1af3 --- /dev/null +++ b/data/pokemon/dex_entries/sentret.asm @@ -0,0 +1,10 @@ + db "SCOUT@" ; species name + dw 207, 130 ; height, weight + + db "When acting as a" + next "lookout, it warns" + next "others of danger" + + page "by screeching and" + next "hitting the ground" + next "with its tail.@" diff --git a/data/pokemon/dex_entries/shellder.asm b/data/pokemon/dex_entries/shellder.asm new file mode 100644 index 0000000..43d3c05 --- /dev/null +++ b/data/pokemon/dex_entries/shellder.asm @@ -0,0 +1,10 @@ + db "BIVALVE@" ; species name + dw 100, 90 ; height, weight + + db "Clamping on to an" + next "opponent reveals" + next "its vulnerable" + + page "parts, so it uses" + next "this move only as" + next "a last resort.@" diff --git a/data/pokemon/dex_entries/shuckle.asm b/data/pokemon/dex_entries/shuckle.asm new file mode 100644 index 0000000..4eaa349 --- /dev/null +++ b/data/pokemon/dex_entries/shuckle.asm @@ -0,0 +1,10 @@ + db "MOLD@" ; species name + dw 200, 450 ; height, weight + + db "The fluid secreted" + next "by its toes carves" + next "holes in rocks for" + + page "nesting and can be" + next "mixed with BERRIES" + next "to make a drink.@" diff --git a/data/pokemon/dex_entries/skarmory.asm b/data/pokemon/dex_entries/skarmory.asm new file mode 100644 index 0000000..46f0a12 --- /dev/null +++ b/data/pokemon/dex_entries/skarmory.asm @@ -0,0 +1,10 @@ + db "ARMOR BIRD@" ; species name + dw 507, 1110 ; height, weight + + db "The feathers that" + next "it sheds are very" + next "sharp. It is said" + + page "that people once" + next "used the feathers" + next "as swords.@" diff --git a/data/pokemon/dex_entries/skiploom.asm b/data/pokemon/dex_entries/skiploom.asm new file mode 100644 index 0000000..2980679 --- /dev/null +++ b/data/pokemon/dex_entries/skiploom.asm @@ -0,0 +1,10 @@ + db "COTTONWEED@" ; species name + dw 200, 20 ; height, weight + + db "As soon as it" + next "rains, it closes" + next "its flower and" + + page "hides in the shade" + next "of a tree to avoid" + next "getting wet.@" diff --git a/data/pokemon/dex_entries/slowbro.asm b/data/pokemon/dex_entries/slowbro.asm new file mode 100644 index 0000000..f48be67 --- /dev/null +++ b/data/pokemon/dex_entries/slowbro.asm @@ -0,0 +1,10 @@ + db "HERMITCRAB@" ; species name + dw 503, 1730 ; height, weight + + db "An attached" + next "SHELLDER won't let" + next "go because of the" + + page "tasty flavor that" + next "oozes out of its" + next "tail.@" diff --git a/data/pokemon/dex_entries/slowking.asm b/data/pokemon/dex_entries/slowking.asm new file mode 100644 index 0000000..07a5c4a --- /dev/null +++ b/data/pokemon/dex_entries/slowking.asm @@ -0,0 +1,10 @@ + db "ROYAL@" ; species name + dw 607, 1750 ; height, weight + + db "Every time it ya-" + next "wns, SHELLDER" + next "injects more poi-" + + page "son into it. The" + next "poison makes it" + next "more intelligent.@" diff --git a/data/pokemon/dex_entries/slowpoke.asm b/data/pokemon/dex_entries/slowpoke.asm new file mode 100644 index 0000000..0c35e43 --- /dev/null +++ b/data/pokemon/dex_entries/slowpoke.asm @@ -0,0 +1,10 @@ + db "DOPEY@" ; species name + dw 311, 790 ; height, weight + + db "It is always so" + next "absent-minded that" + next "it won't react," + + page "even if its" + next "flavorful tail is" + next "bitten.@" diff --git a/data/pokemon/dex_entries/slugma.asm b/data/pokemon/dex_entries/slugma.asm new file mode 100644 index 0000000..d569585 --- /dev/null +++ b/data/pokemon/dex_entries/slugma.asm @@ -0,0 +1,10 @@ + db "LAVA@" ; species name + dw 204, 770 ; height, weight + + db "These group to-" + next "gether in areas" + next "that are hotter" + + page "than normal. If it" + next "cools off, its" + next "skin hardens.@" diff --git a/data/pokemon/dex_entries/smeargle.asm b/data/pokemon/dex_entries/smeargle.asm new file mode 100644 index 0000000..98b9f69 --- /dev/null +++ b/data/pokemon/dex_entries/smeargle.asm @@ -0,0 +1,10 @@ + db "PAINTER@" ; species name + dw 311, 1280 ; height, weight + + db "The color of the" + next "mysterious fluid" + next "secreted from its" + + page "tail is predeter-" + next "mined for each" + next "SMEARGLE.@" diff --git a/data/pokemon/dex_entries/smoochum.asm b/data/pokemon/dex_entries/smoochum.asm new file mode 100644 index 0000000..74dbc77 --- /dev/null +++ b/data/pokemon/dex_entries/smoochum.asm @@ -0,0 +1,10 @@ + db "KISS@" ; species name + dw 104, 130 ; height, weight + + db "The sensitivity of" + next "its lips develops" + next "most quickly." + + page "It uses them to" + next "try to identify" + next "unknown objects.@" diff --git a/data/pokemon/dex_entries/sneasel.asm b/data/pokemon/dex_entries/sneasel.asm new file mode 100644 index 0000000..b2cba47 --- /dev/null +++ b/data/pokemon/dex_entries/sneasel.asm @@ -0,0 +1,10 @@ + db "SHARP CLAW@" ; species name + dw 211, 620 ; height, weight + + db "This cunning" + next "#MON hides" + next "under the cover" + + page "of darkness," + next "waiting to attack" + next "its prey.@" diff --git a/data/pokemon/dex_entries/snorlax.asm b/data/pokemon/dex_entries/snorlax.asm new file mode 100644 index 0000000..b006777 --- /dev/null +++ b/data/pokemon/dex_entries/snorlax.asm @@ -0,0 +1,10 @@ + db "SLEEPING@" ; species name + dw 611, 10140 ; height, weight + + db "This #MON's" + next "stomach is so" + next "strong, even" + + page "eating moldy or" + next "rotten food will" + next "not affect it.@" diff --git a/data/pokemon/dex_entries/snubbull.asm b/data/pokemon/dex_entries/snubbull.asm new file mode 100644 index 0000000..ca8b9bb --- /dev/null +++ b/data/pokemon/dex_entries/snubbull.asm @@ -0,0 +1,10 @@ + db "FAIRY@" ; species name + dw 200, 170 ; height, weight + + db "In truth, it is a" + next "cowardly #MON." + next "It growls eagerly" + + page "in order to hide" + next "its fear from its" + next "opponent.@" diff --git a/data/pokemon/dex_entries/spearow.asm b/data/pokemon/dex_entries/spearow.asm new file mode 100644 index 0000000..290e721 --- /dev/null +++ b/data/pokemon/dex_entries/spearow.asm @@ -0,0 +1,10 @@ + db "TINY BIRD@" ; species name + dw 100, 40 ; height, weight + + db "To protect its" + next "territory, it" + next "flies around" + + page "ceaselessly," + next "making high-" + next "pitched cries.@" diff --git a/data/pokemon/dex_entries/spinarak.asm b/data/pokemon/dex_entries/spinarak.asm new file mode 100644 index 0000000..8adbd74 --- /dev/null +++ b/data/pokemon/dex_entries/spinarak.asm @@ -0,0 +1,10 @@ + db "STRINGSPIT@" ; species name + dw 108, 190 ; height, weight + + db "If prey becomes" + next "ensnared in its" + next "nest of spun" + + page "string, it waits" + next "motionlessly until" + next "it becomes dark.@" diff --git a/data/pokemon/dex_entries/squirtle.asm b/data/pokemon/dex_entries/squirtle.asm new file mode 100644 index 0000000..e82e6bd --- /dev/null +++ b/data/pokemon/dex_entries/squirtle.asm @@ -0,0 +1,10 @@ + db "TINYTURTLE@" ; species name + dw 108, 200 ; height, weight + + db "When it feels" + next "threatened, it" + next "draws its legs" + + page "inside its shell" + next "and sprays water" + next "from its mouth.@" diff --git a/data/pokemon/dex_entries/stantler.asm b/data/pokemon/dex_entries/stantler.asm new file mode 100644 index 0000000..cabe544 --- /dev/null +++ b/data/pokemon/dex_entries/stantler.asm @@ -0,0 +1,10 @@ + db "BIG HORN@" ; species name + dw 407, 1570 ; height, weight + + db "The round balls" + next "found on the" + next "fallen antlers can" + + page "be ground into a" + next "powder that aids" + next "in sleeping.@" diff --git a/data/pokemon/dex_entries/starmie.asm b/data/pokemon/dex_entries/starmie.asm new file mode 100644 index 0000000..c7aa783 --- /dev/null +++ b/data/pokemon/dex_entries/starmie.asm @@ -0,0 +1,10 @@ + db "MYSTERIOUS@" ; species name + dw 307, 1760 ; height, weight + + db "It is said that it" + next "uses the seven-" + next "colored core of" + + page "its body to send" + next "electric waves" + next "into outer space.@" diff --git a/data/pokemon/dex_entries/staryu.asm b/data/pokemon/dex_entries/staryu.asm new file mode 100644 index 0000000..f18678d --- /dev/null +++ b/data/pokemon/dex_entries/staryu.asm @@ -0,0 +1,10 @@ + db "STARSHAPE@" ; species name + dw 207, 760 ; height, weight + + db "When the stars" + next "twinkle at night," + next "it floats up from" + + page "the sea floor, and" + next "its body's center" + next "core flickers.@" diff --git a/data/pokemon/dex_entries/steelix.asm b/data/pokemon/dex_entries/steelix.asm new file mode 100644 index 0000000..7d9fcc2 --- /dev/null +++ b/data/pokemon/dex_entries/steelix.asm @@ -0,0 +1,10 @@ + db "IRON SNAKE@" ; species name + dw 3002, 8820 ; height, weight + + db "The many small" + next "metal particles" + next "that cover this" + + page "#MON's body" + next "reflect bright" + next "light well.@" diff --git a/data/pokemon/dex_entries/sudowoodo.asm b/data/pokemon/dex_entries/sudowoodo.asm new file mode 100644 index 0000000..f8250f5 --- /dev/null +++ b/data/pokemon/dex_entries/sudowoodo.asm @@ -0,0 +1,10 @@ + db "IMITATION@" ; species name + dw 311, 840 ; height, weight + + db "If a tree branch" + next "shakes when there" + next "is no wind, it's a" + + page "SUDOWOODO, not a" + next "tree. It hides" + next "from the rain.@" diff --git a/data/pokemon/dex_entries/suicune.asm b/data/pokemon/dex_entries/suicune.asm new file mode 100644 index 0000000..5b4aa9e --- /dev/null +++ b/data/pokemon/dex_entries/suicune.asm @@ -0,0 +1,10 @@ + db "AURORA@" ; species name + dw 607, 4120 ; height, weight + + db "This divine" + next "#MON blows" + next "around the world," + + page "always in search" + next "of a pure" + next "reservoir.@" diff --git a/data/pokemon/dex_entries/sunflora.asm b/data/pokemon/dex_entries/sunflora.asm new file mode 100644 index 0000000..2b162a5 --- /dev/null +++ b/data/pokemon/dex_entries/sunflora.asm @@ -0,0 +1,10 @@ + db "SUN@" ; species name + dw 207, 190 ; height, weight + + db "As the hot season" + next "approaches, the" + next "petals on this" + + page "#MON's face" + next "become more vivid" + next "and lively.@" diff --git a/data/pokemon/dex_entries/sunkern.asm b/data/pokemon/dex_entries/sunkern.asm new file mode 100644 index 0000000..8264891 --- /dev/null +++ b/data/pokemon/dex_entries/sunkern.asm @@ -0,0 +1,10 @@ + db "SEED@" ; species name + dw 100, 40 ; height, weight + + db "It is very weak." + next "Its only means of" + next "defense is to" + + page "shake its leaves" + next "desperately at its" + next "attacker.@" diff --git a/data/pokemon/dex_entries/swinub.asm b/data/pokemon/dex_entries/swinub.asm new file mode 100644 index 0000000..44f78aa --- /dev/null +++ b/data/pokemon/dex_entries/swinub.asm @@ -0,0 +1,10 @@ + db "PIG@" ; species name + dw 104, 140 ; height, weight + + db "It uses the tip of" + next "its nose to dig" + next "for food. Its nose" + + page "is so tough that" + next "even frozen ground" + next "poses no problem.@" diff --git a/data/pokemon/dex_entries/tangela.asm b/data/pokemon/dex_entries/tangela.asm new file mode 100644 index 0000000..6c84cbf --- /dev/null +++ b/data/pokemon/dex_entries/tangela.asm @@ -0,0 +1,10 @@ + db "VINE@" ; species name + dw 303, 770 ; height, weight + + db "During battle, it" + next "constantly moves" + next "the vines that" + + page "cover its body in" + next "order to annoy its" + next "opponent.@" diff --git a/data/pokemon/dex_entries/tauros.asm b/data/pokemon/dex_entries/tauros.asm new file mode 100644 index 0000000..04a4b5c --- /dev/null +++ b/data/pokemon/dex_entries/tauros.asm @@ -0,0 +1,10 @@ + db "WILD BULL@" ; species name + dw 407, 1950 ; height, weight + + db "These violent" + next "#MON fight" + next "with other mem-" + + page "bers of their herd" + next "in order to prove" + next "their strength.@" diff --git a/data/pokemon/dex_entries/teddiursa.asm b/data/pokemon/dex_entries/teddiursa.asm new file mode 100644 index 0000000..1d75c82 --- /dev/null +++ b/data/pokemon/dex_entries/teddiursa.asm @@ -0,0 +1,10 @@ + db "LITTLE BEAR@" ; species name + dw 200, 190 ; height, weight + + db "It always licks" + next "honey. Its palm" + next "tastes sweet" + + page "because of all the" + next "honey it has" + next "absorbed.@" diff --git a/data/pokemon/dex_entries/tentacool.asm b/data/pokemon/dex_entries/tentacool.asm new file mode 100644 index 0000000..f16523c --- /dev/null +++ b/data/pokemon/dex_entries/tentacool.asm @@ -0,0 +1,10 @@ + db "JELLYFISH@" ; species name + dw 211, 1000 ; height, weight + + db "As it floats along" + next "on the waves, it" + next "uses its toxic" + + page "feelers to stab" + next "anything it" + next "touches.@" diff --git a/data/pokemon/dex_entries/tentacruel.asm b/data/pokemon/dex_entries/tentacruel.asm new file mode 100644 index 0000000..c09f892 --- /dev/null +++ b/data/pokemon/dex_entries/tentacruel.asm @@ -0,0 +1,10 @@ + db "JELLYFISH@" ; species name + dw 503, 1210 ; height, weight + + db "When its 80 feel-" + next "ers absorb water," + next "it stretches to" + + page "become like a net" + next "to entangle its" + next "prey.@" diff --git a/data/pokemon/dex_entries/togepi.asm b/data/pokemon/dex_entries/togepi.asm new file mode 100644 index 0000000..a295acf --- /dev/null +++ b/data/pokemon/dex_entries/togepi.asm @@ -0,0 +1,10 @@ + db "SPIKE BALL@" ; species name + dw 100, 30 ; height, weight + + db "It is considered" + next "to be a symbol of" + next "good luck. Its" + + page "shell is said to" + next "be filled with" + next "happiness.@" diff --git a/data/pokemon/dex_entries/togetic.asm b/data/pokemon/dex_entries/togetic.asm new file mode 100644 index 0000000..b638ace --- /dev/null +++ b/data/pokemon/dex_entries/togetic.asm @@ -0,0 +1,10 @@ + db "HAPPINESS@" ; species name + dw 200, 70 ; height, weight + + db "Although it does" + next "not flap its wings" + next "very much, it can" + + page "stay up in the air" + next "as it tags along" + next "after its trainer.@" diff --git a/data/pokemon/dex_entries/totodile.asm b/data/pokemon/dex_entries/totodile.asm new file mode 100644 index 0000000..8be3ad2 --- /dev/null +++ b/data/pokemon/dex_entries/totodile.asm @@ -0,0 +1,10 @@ + db "BIG JAW@" ; species name + dw 200, 210 ; height, weight + + db "This rough critter" + next "chomps at any" + next "moving object it" + + page "sees. Turning your" + next "back on it is not" + next "recommended.@" diff --git a/data/pokemon/dex_entries/typhlosion.asm b/data/pokemon/dex_entries/typhlosion.asm new file mode 100644 index 0000000..52961be --- /dev/null +++ b/data/pokemon/dex_entries/typhlosion.asm @@ -0,0 +1,10 @@ + db "VOLCANO@" ; species name + dw 507, 1750 ; height, weight + + db "When heat from its" + next "body causes the" + next "air around it to" + + page "shimmer, this is a" + next "sign that it is" + next "ready to battle.@" diff --git a/data/pokemon/dex_entries/tyranitar.asm b/data/pokemon/dex_entries/tyranitar.asm new file mode 100644 index 0000000..4d5a166 --- /dev/null +++ b/data/pokemon/dex_entries/tyranitar.asm @@ -0,0 +1,10 @@ + db "ARMOR@" ; species name + dw 607, 4450 ; height, weight + + db "In just one of its" + next "mighty hands, it" + next "has the power to" + + page "make the ground" + next "shake and moun-" + next "tains crumble.@" diff --git a/data/pokemon/dex_entries/tyrogue.asm b/data/pokemon/dex_entries/tyrogue.asm new file mode 100644 index 0000000..6571e9f --- /dev/null +++ b/data/pokemon/dex_entries/tyrogue.asm @@ -0,0 +1,10 @@ + db "SCUFFLE@" ; species name + dw 204, 460 ; height, weight + + db "To brush up on its" + next "fighting skills," + next "it will challenge" + + page "anyone. It has a" + next "very strong com-" + next "petitive spirit.@" diff --git a/data/pokemon/dex_entries/umbreon.asm b/data/pokemon/dex_entries/umbreon.asm new file mode 100644 index 0000000..206ea40 --- /dev/null +++ b/data/pokemon/dex_entries/umbreon.asm @@ -0,0 +1,10 @@ + db "MOONLIGHT@" ; species name + dw 303, 600 ; height, weight + + db "On the night of a" + next "full moon, or when" + next "it gets excited," + + page "the ring patterns" + next "on its body glow" + next "yellow.@" diff --git a/data/pokemon/dex_entries/unown.asm b/data/pokemon/dex_entries/unown.asm new file mode 100644 index 0000000..60ee3b3 --- /dev/null +++ b/data/pokemon/dex_entries/unown.asm @@ -0,0 +1,10 @@ + db "SYMBOL@" ; species name + dw 108, 110 ; height, weight + + db "Because different" + next "types of UNOWN" + next "exist, it is said" + + page "that they must" + next "have a variety of" + next "abilities.@" diff --git a/data/pokemon/dex_entries/ursaring.asm b/data/pokemon/dex_entries/ursaring.asm new file mode 100644 index 0000000..c2f0706 --- /dev/null +++ b/data/pokemon/dex_entries/ursaring.asm @@ -0,0 +1,10 @@ + db "HIBERNANT@" ; species name + dw 511, 2770 ; height, weight + + db "Although it has a" + next "large body, it is" + next "quite skilled at" + + page "climbing trees. It" + next "eats and sleeps in" + next "the treetops.@" diff --git a/data/pokemon/dex_entries/vaporeon.asm b/data/pokemon/dex_entries/vaporeon.asm new file mode 100644 index 0000000..dbbce11 --- /dev/null +++ b/data/pokemon/dex_entries/vaporeon.asm @@ -0,0 +1,10 @@ + db "BUBBLE JET@" ; species name + dw 303, 640 ; height, weight + + db "As it uses the" + next "fins on the tip" + next "of its tail to" + + page "swim, it blends" + next "with the water" + next "perfectly.@" diff --git a/data/pokemon/dex_entries/venomoth.asm b/data/pokemon/dex_entries/venomoth.asm new file mode 100644 index 0000000..338f0ed --- /dev/null +++ b/data/pokemon/dex_entries/venomoth.asm @@ -0,0 +1,10 @@ + db "POISONMOTH@" ; species name + dw 411, 280 ; height, weight + + db "The scales it" + next "scatters will" + next "paralyze anyone" + + page "who touches them," + next "making that person" + next "unable to stand.@" diff --git a/data/pokemon/dex_entries/venonat.asm b/data/pokemon/dex_entries/venonat.asm new file mode 100644 index 0000000..01e4df3 --- /dev/null +++ b/data/pokemon/dex_entries/venonat.asm @@ -0,0 +1,10 @@ + db "INSECT@" ; species name + dw 303, 660 ; height, weight + + db "The small bugs it" + next "eats appear only" + next "at night, so it" + + page "sleeps in a hole" + next "in a tree until" + next "night falls.@" diff --git a/data/pokemon/dex_entries/venusaur.asm b/data/pokemon/dex_entries/venusaur.asm new file mode 100644 index 0000000..b5c843c --- /dev/null +++ b/data/pokemon/dex_entries/venusaur.asm @@ -0,0 +1,10 @@ + db "SEED@" ; species name + dw 607, 2210 ; height, weight + + db "As it warms it-" + next "self and absorbs" + next "the sunlight, its" + + page "flower petals" + next "release a pleasant" + next "fragrance.@" diff --git a/data/pokemon/dex_entries/victreebel.asm b/data/pokemon/dex_entries/victreebel.asm new file mode 100644 index 0000000..b960cf8 --- /dev/null +++ b/data/pokemon/dex_entries/victreebel.asm @@ -0,0 +1,10 @@ + db "FLYCATCHER@" ; species name + dw 507, 340 ; height, weight + + db "Once ingested into" + next "this #MON's" + next "body, even the" + + page "hardest object" + next "will melt into" + next "nothing.@" diff --git a/data/pokemon/dex_entries/vileplume.asm b/data/pokemon/dex_entries/vileplume.asm new file mode 100644 index 0000000..541fd4d --- /dev/null +++ b/data/pokemon/dex_entries/vileplume.asm @@ -0,0 +1,10 @@ + db "FLOWER@" ; species name + dw 311, 410 ; height, weight + + db "By shaking its big" + next "petals, it scat-" + next "ters toxic pollen" + + page "into the air," + next "turning the air" + next "yellow.@" diff --git a/data/pokemon/dex_entries/voltorb.asm b/data/pokemon/dex_entries/voltorb.asm new file mode 100644 index 0000000..ddc0ffa --- /dev/null +++ b/data/pokemon/dex_entries/voltorb.asm @@ -0,0 +1,10 @@ + db "BALL@" ; species name + dw 108, 230 ; height, weight + + db "During the study" + next "of this #MON," + next "it was discovered" + + page "that its compo-" + next "nents are not" + next "found in nature.@" diff --git a/data/pokemon/dex_entries/vulpix.asm b/data/pokemon/dex_entries/vulpix.asm new file mode 100644 index 0000000..0409bb9 --- /dev/null +++ b/data/pokemon/dex_entries/vulpix.asm @@ -0,0 +1,10 @@ + db "FOX@" ; species name + dw 200, 220 ; height, weight + + db "As its body grows" + next "larger, its six" + next "warm tails become" + + page "more beautiful," + next "with a more luxur-" + next "ious coat of fur.@" diff --git a/data/pokemon/dex_entries/wartortle.asm b/data/pokemon/dex_entries/wartortle.asm new file mode 100644 index 0000000..f96c6e4 --- /dev/null +++ b/data/pokemon/dex_entries/wartortle.asm @@ -0,0 +1,10 @@ + db "TURTLE@" ; species name + dw 303, 500 ; height, weight + + db "Its long, furry" + next "tail is a symbol" + next "of longevity," + + page "making it quite" + next "popular among" + next "older people.@" diff --git a/data/pokemon/dex_entries/weedle.asm b/data/pokemon/dex_entries/weedle.asm new file mode 100644 index 0000000..c7e9deb --- /dev/null +++ b/data/pokemon/dex_entries/weedle.asm @@ -0,0 +1,10 @@ + db "HAIRY BUG@" ; species name + dw 100, 70 ; height, weight + + db "The barb on top of" + next "its head secretes" + next "a strong poison." + + page "It uses this toxic" + next "barb to protect" + next "itself.@" diff --git a/data/pokemon/dex_entries/weepinbell.asm b/data/pokemon/dex_entries/weepinbell.asm new file mode 100644 index 0000000..d53be66 --- /dev/null +++ b/data/pokemon/dex_entries/weepinbell.asm @@ -0,0 +1,10 @@ + db "FLYCATCHER@" ; species name + dw 303, 140 ; height, weight + + db "When it's hungry," + next "it swings its" + next "razor-sharp" + + page "leaves, slicing up" + next "any unlucky object" + next "nearby for food.@" diff --git a/data/pokemon/dex_entries/weezing.asm b/data/pokemon/dex_entries/weezing.asm new file mode 100644 index 0000000..8e02970 --- /dev/null +++ b/data/pokemon/dex_entries/weezing.asm @@ -0,0 +1,10 @@ + db "POISON GAS@" ; species name + dw 311, 210 ; height, weight + + db "When it inhales" + next "poisonous gases" + next "from garbage, its" + + page "body expands, and" + next "its insides smell" + next "much worse.@" diff --git a/data/pokemon/dex_entries/wigglytuff.asm b/data/pokemon/dex_entries/wigglytuff.asm new file mode 100644 index 0000000..65e9f49 --- /dev/null +++ b/data/pokemon/dex_entries/wigglytuff.asm @@ -0,0 +1,10 @@ + db "BALLOON@" ; species name + dw 303, 260 ; height, weight + + db "The rich, fluffy" + next "fur that covers" + next "its body feels so" + + page "good that anyone" + next "who feels it can't" + next "stop touching it.@" diff --git a/data/pokemon/dex_entries/wobbuffet.asm b/data/pokemon/dex_entries/wobbuffet.asm new file mode 100644 index 0000000..6dcde2d --- /dev/null +++ b/data/pokemon/dex_entries/wobbuffet.asm @@ -0,0 +1,10 @@ + db "PATIENT@" ; species name + dw 403, 630 ; height, weight + + db "In order to con-" + next "ceal its black" + next "tail, it lives in" + + page "a dark cave and" + next "only moves about" + next "at night.@" diff --git a/data/pokemon/dex_entries/wooper.asm b/data/pokemon/dex_entries/wooper.asm new file mode 100644 index 0000000..00f97d0 --- /dev/null +++ b/data/pokemon/dex_entries/wooper.asm @@ -0,0 +1,10 @@ + db "WATER FISH@" ; species name + dw 104, 190 ; height, weight + + db "A mucous" + next "membrane covers" + next "its body. Touching" + + page "it barehanded will" + next "cause a shooting" + next "pain.@" diff --git a/data/pokemon/dex_entries/xatu.asm b/data/pokemon/dex_entries/xatu.asm new file mode 100644 index 0000000..c285b8c --- /dev/null +++ b/data/pokemon/dex_entries/xatu.asm @@ -0,0 +1,10 @@ + db "MYSTIC@" ; species name + dw 411, 330 ; height, weight + + db "Once it begins to" + next "meditate at sun-" + next "rise, the entire" + + page "day will pass" + next "before it will" + next "move again.@" diff --git a/data/pokemon/dex_entries/yanma.asm b/data/pokemon/dex_entries/yanma.asm new file mode 100644 index 0000000..4acf0e2 --- /dev/null +++ b/data/pokemon/dex_entries/yanma.asm @@ -0,0 +1,10 @@ + db "CLEAR WING@" ; species name + dw 311, 840 ; height, weight + + db "It can see in all" + next "directions without" + next "moving its big" + + page "eyes, helping it" + next "spot attackers and" + next "food right away.@" diff --git a/data/pokemon/dex_entries/zapdos.asm b/data/pokemon/dex_entries/zapdos.asm new file mode 100644 index 0000000..3dfa335 --- /dev/null +++ b/data/pokemon/dex_entries/zapdos.asm @@ -0,0 +1,10 @@ + db "ELECTRIC@" ; species name + dw 503, 1160 ; height, weight + + db "Legendary bird" + next "#MON. They say" + next "lightning caused" + + page "by the flapping of" + next "its wings causes" + next "summer storms.@" diff --git a/data/pokemon/dex_entries/zubat.asm b/data/pokemon/dex_entries/zubat.asm new file mode 100644 index 0000000..0f54d51 --- /dev/null +++ b/data/pokemon/dex_entries/zubat.asm @@ -0,0 +1,10 @@ + db "BAT@" ; species name + dw 207, 170 ; height, weight + + db "During the day, it" + next "gathers with" + next "others and hangs" + + page "from the ceilings" + next "of old buildings" + next "and caves.@" diff --git a/data/pokemon/dex_entry_pointers.asm b/data/pokemon/dex_entry_pointers.asm new file mode 100644 index 0000000..97d95fc --- /dev/null +++ b/data/pokemon/dex_entry_pointers.asm @@ -0,0 +1,255 @@ +PokedexDataPointerTable: +; entries correspond to constants/pokemon_constants.asm + table_width 3, PokedexDataPointerTable + dba BulbasaurPokedexEntry + dba IvysaurPokedexEntry + dba VenusaurPokedexEntry + dba CharmanderPokedexEntry + dba CharmeleonPokedexEntry + dba CharizardPokedexEntry + dba SquirtlePokedexEntry + dba WartortlePokedexEntry + dba BlastoisePokedexEntry + dba CaterpiePokedexEntry + dba MetapodPokedexEntry + dba ButterfreePokedexEntry + dba WeedlePokedexEntry + dba KakunaPokedexEntry + dba BeedrillPokedexEntry + dba PidgeyPokedexEntry + dba PidgeottoPokedexEntry + dba PidgeotPokedexEntry + dba RattataPokedexEntry + dba RaticatePokedexEntry + dba SpearowPokedexEntry + dba FearowPokedexEntry + dba EkansPokedexEntry + dba ArbokPokedexEntry + dba PikachuPokedexEntry + dba RaichuPokedexEntry + dba SandshrewPokedexEntry + dba SandslashPokedexEntry + dba NidoranFPokedexEntry + dba NidorinaPokedexEntry + dba NidoqueenPokedexEntry + dba NidoranMPokedexEntry + dba NidorinoPokedexEntry + dba NidokingPokedexEntry + dba ClefairyPokedexEntry + dba ClefablePokedexEntry + dba VulpixPokedexEntry + dba NinetalesPokedexEntry + dba JigglypuffPokedexEntry + dba WigglytuffPokedexEntry + dba ZubatPokedexEntry + dba GolbatPokedexEntry + dba OddishPokedexEntry + dba GloomPokedexEntry + dba VileplumePokedexEntry + dba ParasPokedexEntry + dba ParasectPokedexEntry + dba VenonatPokedexEntry + dba VenomothPokedexEntry + dba DiglettPokedexEntry + dba DugtrioPokedexEntry + dba MeowthPokedexEntry + dba PersianPokedexEntry + dba PsyduckPokedexEntry + dba GolduckPokedexEntry + dba MankeyPokedexEntry + dba PrimeapePokedexEntry + dba GrowlithePokedexEntry + dba ArcaninePokedexEntry + dba PoliwagPokedexEntry + dba PoliwhirlPokedexEntry + dba PoliwrathPokedexEntry + dba AbraPokedexEntry + dba KadabraPokedexEntry + dba AlakazamPokedexEntry + dba MachopPokedexEntry + dba MachokePokedexEntry + dba MachampPokedexEntry + dba BellsproutPokedexEntry + dba WeepinbellPokedexEntry + dba VictreebelPokedexEntry + dba TentacoolPokedexEntry + dba TentacruelPokedexEntry + dba GeodudePokedexEntry + dba GravelerPokedexEntry + dba GolemPokedexEntry + dba PonytaPokedexEntry + dba RapidashPokedexEntry + dba SlowpokePokedexEntry + dba SlowbroPokedexEntry + dba MagnemitePokedexEntry + dba MagnetonPokedexEntry + dba FarfetchDPokedexEntry + dba DoduoPokedexEntry + dba DodrioPokedexEntry + dba SeelPokedexEntry + dba DewgongPokedexEntry + dba GrimerPokedexEntry + dba MukPokedexEntry + dba ShellderPokedexEntry + dba CloysterPokedexEntry + dba GastlyPokedexEntry + dba HaunterPokedexEntry + dba GengarPokedexEntry + dba OnixPokedexEntry + dba DrowzeePokedexEntry + dba HypnoPokedexEntry + dba KrabbyPokedexEntry + dba KinglerPokedexEntry + dba VoltorbPokedexEntry + dba ElectrodePokedexEntry + dba ExeggcutePokedexEntry + dba ExeggutorPokedexEntry + dba CubonePokedexEntry + dba MarowakPokedexEntry + dba HitmonleePokedexEntry + dba HitmonchanPokedexEntry + dba LickitungPokedexEntry + dba KoffingPokedexEntry + dba WeezingPokedexEntry + dba RhyhornPokedexEntry + dba RhydonPokedexEntry + dba ChanseyPokedexEntry + dba TangelaPokedexEntry + dba KangaskhanPokedexEntry + dba HorseaPokedexEntry + dba SeadraPokedexEntry + dba GoldeenPokedexEntry + dba SeakingPokedexEntry + dba StaryuPokedexEntry + dba StarmiePokedexEntry + dba MrMimePokedexEntry + dba ScytherPokedexEntry + dba JynxPokedexEntry + dba ElectabuzzPokedexEntry + dba MagmarPokedexEntry + dba PinsirPokedexEntry + dba TaurosPokedexEntry + dba MagikarpPokedexEntry + dba GyaradosPokedexEntry + dba LaprasPokedexEntry + dba DittoPokedexEntry + dba EeveePokedexEntry + dba VaporeonPokedexEntry + dba JolteonPokedexEntry + dba FlareonPokedexEntry + dba PorygonPokedexEntry + dba OmanytePokedexEntry + dba OmastarPokedexEntry + dba KabutoPokedexEntry + dba KabutopsPokedexEntry + dba AerodactylPokedexEntry + dba SnorlaxPokedexEntry + dba ArticunoPokedexEntry + dba ZapdosPokedexEntry + dba MoltresPokedexEntry + dba DratiniPokedexEntry + dba DragonairPokedexEntry + dba DragonitePokedexEntry + dba MewtwoPokedexEntry + dba MewPokedexEntry + dba ChikoritaPokedexEntry + dba BayleefPokedexEntry + dba MeganiumPokedexEntry + dba CyndaquilPokedexEntry + dba QuilavaPokedexEntry + dba TyphlosionPokedexEntry + dba TotodilePokedexEntry + dba CroconawPokedexEntry + dba FeraligatrPokedexEntry + dba SentretPokedexEntry + dba FurretPokedexEntry + dba HoothootPokedexEntry + dba NoctowlPokedexEntry + dba LedybaPokedexEntry + dba LedianPokedexEntry + dba SpinarakPokedexEntry + dba AriadosPokedexEntry + dba CrobatPokedexEntry + dba ChinchouPokedexEntry + dba LanturnPokedexEntry + dba PichuPokedexEntry + dba CleffaPokedexEntry + dba IgglybuffPokedexEntry + dba TogepiPokedexEntry + dba TogeticPokedexEntry + dba NatuPokedexEntry + dba XatuPokedexEntry + dba MareepPokedexEntry + dba FlaaffyPokedexEntry + dba AmpharosPokedexEntry + dba BellossomPokedexEntry + dba MarillPokedexEntry + dba AzumarillPokedexEntry + dba SudowoodoPokedexEntry + dba PolitoedPokedexEntry + dba HoppipPokedexEntry + dba SkiploomPokedexEntry + dba JumpluffPokedexEntry + dba AipomPokedexEntry + dba SunkernPokedexEntry + dba SunfloraPokedexEntry + dba YanmaPokedexEntry + dba WooperPokedexEntry + dba QuagsirePokedexEntry + dba EspeonPokedexEntry + dba UmbreonPokedexEntry + dba MurkrowPokedexEntry + dba SlowkingPokedexEntry + dba MisdreavusPokedexEntry + dba UnownPokedexEntry + dba WobbuffetPokedexEntry + dba GirafarigPokedexEntry + dba PinecoPokedexEntry + dba ForretressPokedexEntry + dba DunsparcePokedexEntry + dba GligarPokedexEntry + dba SteelixPokedexEntry + dba SnubbullPokedexEntry + dba GranbullPokedexEntry + dba QwilfishPokedexEntry + dba ScizorPokedexEntry + dba ShucklePokedexEntry + dba HeracrossPokedexEntry + dba SneaselPokedexEntry + dba TeddiursaPokedexEntry + dba UrsaringPokedexEntry + dba SlugmaPokedexEntry + dba MagcargoPokedexEntry + dba SwinubPokedexEntry + dba PiloswinePokedexEntry + dba CorsolaPokedexEntry + dba RemoraidPokedexEntry + dba OctilleryPokedexEntry + dba DelibirdPokedexEntry + dba MantinePokedexEntry + dba SkarmoryPokedexEntry + dba HoundourPokedexEntry + dba HoundoomPokedexEntry + dba KingdraPokedexEntry + dba PhanpyPokedexEntry + dba DonphanPokedexEntry + dba Porygon2PokedexEntry + dba StantlerPokedexEntry + dba SmearglePokedexEntry + dba TyroguePokedexEntry + dba HitmontopPokedexEntry + dba SmoochumPokedexEntry + dba ElekidPokedexEntry + dba MagbyPokedexEntry + dba MiltankPokedexEntry + dba BlisseyPokedexEntry + dba RaikouPokedexEntry + dba EnteiPokedexEntry + dba SuicunePokedexEntry + dba LarvitarPokedexEntry + dba PupitarPokedexEntry + dba TyranitarPokedexEntry + dba LugiaPokedexEntry + dba HoOhPokedexEntry + dba CelebiPokedexEntry + assert_table_length NUM_POKEMON diff --git a/data/pokemon/dex_order_alpha.asm b/data/pokemon/dex_order_alpha.asm new file mode 100644 index 0000000..9dd90dc --- /dev/null +++ b/data/pokemon/dex_order_alpha.asm @@ -0,0 +1,256 @@ +; Every Pokémon sorted alphabetically by name. + +AlphabeticalPokedexOrder: + table_width 2, AlphabeticalPokedexOrder + dw ABRA + dw AERODACTYL + dw AIPOM + dw ALAKAZAM + dw AMPHAROS + dw ARBOK + dw ARCANINE + dw ARIADOS + dw ARTICUNO + dw AZUMARILL + dw BAYLEEF + dw BEEDRILL + dw BELLOSSOM + dw BELLSPROUT + dw BLASTOISE + dw BLISSEY + dw BULBASAUR + dw BUTTERFREE + dw CATERPIE + dw CELEBI + dw CHANSEY + dw CHARIZARD + dw CHARMANDER + dw CHARMELEON + dw CHIKORITA + dw CHINCHOU + dw CLEFABLE + dw CLEFAIRY + dw CLEFFA + dw CLOYSTER + dw CORSOLA + dw CROBAT + dw CROCONAW + dw CUBONE + dw CYNDAQUIL + dw DELIBIRD + dw DEWGONG + dw DIGLETT + dw DITTO + dw DODRIO + dw DODUO + dw DONPHAN + dw DRAGONAIR + dw DRAGONITE + dw DRATINI + dw DROWZEE + dw DUGTRIO + dw DUNSPARCE + dw EEVEE + dw EKANS + dw ELECTABUZZ + dw ELECTRODE + dw ELEKID + dw ENTEI + dw ESPEON + dw EXEGGCUTE + dw EXEGGUTOR + dw FARFETCH_D + dw FEAROW + dw FERALIGATR + dw FLAAFFY + dw FLAREON + dw FORRETRESS + dw FURRET + dw GASTLY + dw GENGAR + dw GEODUDE + dw GIRAFARIG + dw GLIGAR + dw GLOOM + dw GOLBAT + dw GOLDEEN + dw GOLDUCK + dw GOLEM + dw GRANBULL + dw GRAVELER + dw GRIMER + dw GROWLITHE + dw GYARADOS + dw HAUNTER + dw HERACROSS + dw HITMONCHAN + dw HITMONLEE + dw HITMONTOP + dw HO_OH + dw HOOTHOOT + dw HOPPIP + dw HORSEA + dw HOUNDOOM + dw HOUNDOUR + dw HYPNO + dw IGGLYBUFF + dw IVYSAUR + dw JIGGLYPUFF + dw JOLTEON + dw JUMPLUFF + dw JYNX + dw KABUTO + dw KABUTOPS + dw KADABRA + dw KAKUNA + dw KANGASKHAN + dw KINGDRA + dw KINGLER + dw KOFFING + dw KRABBY + dw LANTURN + dw LAPRAS + dw LARVITAR + dw LEDIAN + dw LEDYBA + dw LICKITUNG + dw LUGIA + dw MACHAMP + dw MACHOKE + dw MACHOP + dw MAGBY + dw MAGCARGO + dw MAGIKARP + dw MAGMAR + dw MAGNEMITE + dw MAGNETON + dw MANKEY + dw MANTINE + dw MAREEP + dw MARILL + dw MAROWAK + dw MEGANIUM + dw MEOWTH + dw METAPOD + dw MEW + dw MEWTWO + dw MILTANK + dw MISDREAVUS + dw MOLTRES + dw MR__MIME + dw MUK + dw MURKROW + dw NATU + dw NIDOKING + dw NIDOQUEEN + dw NIDORAN_F + dw NIDORAN_M + dw NIDORINA + dw NIDORINO + dw NINETALES + dw NOCTOWL + dw OCTILLERY + dw ODDISH + dw OMANYTE + dw OMASTAR + dw ONIX + dw PARAS + dw PARASECT + dw PERSIAN + dw PHANPY + dw PICHU + dw PIDGEOT + dw PIDGEOTTO + dw PIDGEY + dw PIKACHU + dw PILOSWINE + dw PINECO + dw PINSIR + dw POLITOED + dw POLIWAG + dw POLIWHIRL + dw POLIWRATH + dw PONYTA + dw PORYGON + dw PORYGON2 + dw PRIMEAPE + dw PSYDUCK + dw PUPITAR + dw QUAGSIRE + dw QUILAVA + dw QWILFISH + dw RAICHU + dw RAIKOU + dw RAPIDASH + dw RATICATE + dw RATTATA + dw REMORAID + dw RHYDON + dw RHYHORN + dw SANDSHREW + dw SANDSLASH + dw SCIZOR + dw SCYTHER + dw SEADRA + dw SEAKING + dw SEEL + dw SENTRET + dw SHELLDER + dw SHUCKLE + dw SKARMORY + dw SKIPLOOM + dw SLOWBRO + dw SLOWKING + dw SLOWPOKE + dw SLUGMA + dw SMEARGLE + dw SMOOCHUM + dw SNEASEL + dw SNORLAX + dw SNUBBULL + dw SPEAROW + dw SPINARAK + dw SQUIRTLE + dw STANTLER + dw STARMIE + dw STARYU + dw STEELIX + dw SUDOWOODO + dw SUICUNE + dw SUNFLORA + dw SUNKERN + dw SWINUB + dw TANGELA + dw TAUROS + dw TEDDIURSA + dw TENTACOOL + dw TENTACRUEL + dw TOGEPI + dw TOGETIC + dw TOTODILE + dw TYPHLOSION + dw TYRANITAR + dw TYROGUE + dw UMBREON + dw UNOWN + dw URSARING + dw VAPOREON + dw VENOMOTH + dw VENONAT + dw VENUSAUR + dw VICTREEBEL + dw VILEPLUME + dw VOLTORB + dw VULPIX + dw WARTORTLE + dw WEEDLE + dw WEEPINBELL + dw WEEZING + dw WIGGLYTUFF + dw WOBBUFFET + dw WOOPER + dw XATU + dw YANMA + dw ZAPDOS + dw ZUBAT + assert_table_length NUM_POKEMON diff --git a/data/pokemon/dex_order_new.asm b/data/pokemon/dex_order_new.asm new file mode 100644 index 0000000..112513d --- /dev/null +++ b/data/pokemon/dex_order_new.asm @@ -0,0 +1,256 @@ +; Every Pokémon sorted in New Pokédex Order. + +NewPokedexOrder: + table_width 2, NewPokedexOrder + dw CHIKORITA + dw BAYLEEF + dw MEGANIUM + dw CYNDAQUIL + dw QUILAVA + dw TYPHLOSION + dw TOTODILE + dw CROCONAW + dw FERALIGATR + dw PIDGEY + dw PIDGEOTTO + dw PIDGEOT + dw SPEAROW + dw FEAROW + dw HOOTHOOT + dw NOCTOWL + dw RATTATA + dw RATICATE + dw SENTRET + dw FURRET + dw PICHU + dw PIKACHU + dw RAICHU + dw CATERPIE + dw METAPOD + dw BUTTERFREE + dw WEEDLE + dw KAKUNA + dw BEEDRILL + dw LEDYBA + dw LEDIAN + dw SPINARAK + dw ARIADOS + dw GEODUDE + dw GRAVELER + dw GOLEM + dw ZUBAT + dw GOLBAT + dw CROBAT + dw CLEFFA + dw CLEFAIRY + dw CLEFABLE + dw IGGLYBUFF + dw JIGGLYPUFF + dw WIGGLYTUFF + dw TOGEPI + dw TOGETIC + dw SANDSHREW + dw SANDSLASH + dw EKANS + dw ARBOK + dw DUNSPARCE + dw MAREEP + dw FLAAFFY + dw AMPHAROS + dw WOOPER + dw QUAGSIRE + dw GASTLY + dw HAUNTER + dw GENGAR + dw UNOWN + dw ONIX + dw STEELIX + dw BELLSPROUT + dw WEEPINBELL + dw VICTREEBEL + dw HOPPIP + dw SKIPLOOM + dw JUMPLUFF + dw PARAS + dw PARASECT + dw POLIWAG + dw POLIWHIRL + dw POLIWRATH + dw POLITOED + dw MAGIKARP + dw GYARADOS + dw GOLDEEN + dw SEAKING + dw SLOWPOKE + dw SLOWBRO + dw SLOWKING + dw ODDISH + dw GLOOM + dw VILEPLUME + dw BELLOSSOM + dw DROWZEE + dw HYPNO + dw ABRA + dw KADABRA + dw ALAKAZAM + dw DITTO + dw PINECO + dw FORRETRESS + dw NIDORAN_F + dw NIDORINA + dw NIDOQUEEN + dw NIDORAN_M + dw NIDORINO + dw NIDOKING + dw YANMA + dw SUNKERN + dw SUNFLORA + dw EXEGGCUTE + dw EXEGGUTOR + dw SUDOWOODO + dw WOBBUFFET + dw VENONAT + dw VENOMOTH + dw SCYTHER + dw SCIZOR + dw PINSIR + dw HERACROSS + dw KOFFING + dw WEEZING + dw GRIMER + dw MUK + dw MAGNEMITE + dw MAGNETON + dw VOLTORB + dw ELECTRODE + dw AIPOM + dw SNUBBULL + dw GRANBULL + dw VULPIX + dw NINETALES + dw GROWLITHE + dw ARCANINE + dw STANTLER + dw MARILL + dw AZUMARILL + dw DIGLETT + dw DUGTRIO + dw MANKEY + dw PRIMEAPE + dw MEOWTH + dw PERSIAN + dw PSYDUCK + dw GOLDUCK + dw MACHOP + dw MACHOKE + dw MACHAMP + dw TYROGUE + dw HITMONLEE + dw HITMONCHAN + dw HITMONTOP + dw GIRAFARIG + dw TAUROS + dw MILTANK + dw MAGBY + dw MAGMAR + dw SMOOCHUM + dw JYNX + dw ELEKID + dw ELECTABUZZ + dw MR__MIME + dw SMEARGLE + dw FARFETCH_D + dw NATU + dw XATU + dw QWILFISH + dw TENTACOOL + dw TENTACRUEL + dw KRABBY + dw KINGLER + dw SHUCKLE + dw STARYU + dw STARMIE + dw SHELLDER + dw CLOYSTER + dw CORSOLA + dw REMORAID + dw OCTILLERY + dw CHINCHOU + dw LANTURN + dw SEEL + dw DEWGONG + dw LICKITUNG + dw TANGELA + dw EEVEE + dw VAPOREON + dw JOLTEON + dw FLAREON + dw ESPEON + dw UMBREON + dw HORSEA + dw SEADRA + dw KINGDRA + dw GLIGAR + dw DELIBIRD + dw SWINUB + dw PILOSWINE + dw TEDDIURSA + dw URSARING + dw PHANPY + dw DONPHAN + dw MANTINE + dw SKARMORY + dw DODUO + dw DODRIO + dw PONYTA + dw RAPIDASH + dw CUBONE + dw MAROWAK + dw KANGASKHAN + dw RHYHORN + dw RHYDON + dw MURKROW + dw HOUNDOUR + dw HOUNDOOM + dw SLUGMA + dw MAGCARGO + dw SNEASEL + dw MISDREAVUS + dw PORYGON + dw PORYGON2 + dw CHANSEY + dw BLISSEY + dw LAPRAS + dw OMANYTE + dw OMASTAR + dw KABUTO + dw KABUTOPS + dw AERODACTYL + dw SNORLAX + dw BULBASAUR + dw IVYSAUR + dw VENUSAUR + dw CHARMANDER + dw CHARMELEON + dw CHARIZARD + dw SQUIRTLE + dw WARTORTLE + dw BLASTOISE + dw ARTICUNO + dw ZAPDOS + dw MOLTRES + dw RAIKOU + dw ENTEI + dw SUICUNE + dw DRATINI + dw DRAGONAIR + dw DRAGONITE + dw LARVITAR + dw PUPITAR + dw TYRANITAR + dw LUGIA + dw HO_OH + dw MEWTWO + dw MEW + dw CELEBI + assert_table_length NUM_POKEMON diff --git a/data/pokemon/egg_moves.asm b/data/pokemon/egg_moves.asm new file mode 100644 index 0000000..7906078 --- /dev/null +++ b/data/pokemon/egg_moves.asm @@ -0,0 +1,18 @@ +SECTION "Egg Move Pointers", ROMX + +; All instances of Charm, Steel Wing, Sweet Scent, and Lovely Kiss were +; removed from egg move lists in Crystal. +; Sweet Scent and Steel Wing were redundant since they're TMs, and +; Charm and Lovely Kiss were unobtainable. + +; Staryu's egg moves were removed in Crystal, because Staryu is genderless +; and can only breed with Ditto. + +EggMovePointers:: + indirect_table 2, 1 + indirect_entries JOHTO_POKEMON - 1, EggMovePointers1 + indirect_entries NUM_POKEMON, EggMovePointers2 + indirect_table_end + +INCLUDE "data/pokemon/egg_moves_kanto.asm" +INCLUDE "data/pokemon/egg_moves_johto.asm" diff --git a/data/pokemon/egg_moves_johto.asm b/data/pokemon/egg_moves_johto.asm new file mode 100644 index 0000000..1dc5038 --- /dev/null +++ b/data/pokemon/egg_moves_johto.asm @@ -0,0 +1,470 @@ +SECTION "Egg Moves 2", ROMX + +EggMovePointers2:: + dw ChikoritaEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw CyndaquilEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw TotodileEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw SentretEggMoves + dw NoEggMoves2 + dw HoothootEggMoves + dw NoEggMoves2 + dw LedybaEggMoves + dw NoEggMoves2 + dw SpinarakEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw ChinchouEggMoves + dw NoEggMoves2 + dw PichuEggMoves + dw CleffaEggMoves + dw IgglybuffEggMoves + dw TogepiEggMoves + dw NoEggMoves2 + dw NatuEggMoves + dw NoEggMoves2 + dw MareepEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw NoEggMoves2 + dw MarillEggMoves + dw NoEggMoves2 + dw SudowoodoEggMoves + dw NoEggMoves2 + dw HoppipEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw AipomEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw YanmaEggMoves + dw WooperEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw NoEggMoves2 + dw MurkrowEggMoves + dw NoEggMoves2 + dw MisdreavusEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw GirafarigEggMoves + dw PinecoEggMoves + dw NoEggMoves2 + dw DunsparceEggMoves + dw GligarEggMoves + dw NoEggMoves2 + dw SnubbullEggMoves + dw NoEggMoves2 + dw QwilfishEggMoves + dw NoEggMoves2 + dw ShuckleEggMoves + dw HeracrossEggMoves + dw SneaselEggMoves + dw TeddiursaEggMoves + dw NoEggMoves2 + dw SlugmaEggMoves + dw NoEggMoves2 + dw SwinubEggMoves + dw NoEggMoves2 + dw CorsolaEggMoves + dw RemoraidEggMoves + dw NoEggMoves2 + dw DelibirdEggMoves + dw MantineEggMoves + dw SkarmoryEggMoves + dw HoundourEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw PhanpyEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw StantlerEggMoves + dw NoEggMoves2 + dw TyrogueEggMoves + dw NoEggMoves2 + dw SmoochumEggMoves + dw ElekidEggMoves + dw MagbyEggMoves + dw MiltankEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw NoEggMoves2 + dw NoEggMoves2 + dw LarvitarEggMoves + dw NoEggMoves2 + dw NoEggMoves2 + dw NoEggMoves2 + dw NoEggMoves2 + dw NoEggMoves2 +.IndirectEnd:: + +ChikoritaEggMoves: + dw VINE_WHIP + dw LEECH_SEED + dw COUNTER + dw ANCIENTPOWER + dw FLAIL + dw SWORDS_DANCE + dw -1 ; end + +CyndaquilEggMoves: + dw FURY_SWIPES + dw QUICK_ATTACK + dw REVERSAL + dw THRASH + dw FORESIGHT + dw SUBMISSION + dw -1 ; end + +TotodileEggMoves: + dw CRUNCH + dw THRASH + dw HYDRO_PUMP + dw ANCIENTPOWER + dw RAZOR_WIND + dw ROCK_SLIDE + dw -1 ; end + +SentretEggMoves: + dw DOUBLE_EDGE + dw PURSUIT + dw SLASH + dw FOCUS_ENERGY + dw REVERSAL + dw -1 ; end + +HoothootEggMoves: + dw MIRROR_MOVE + dw SUPERSONIC + dw FAINT_ATTACK + dw WING_ATTACK + dw WHIRLWIND + dw SKY_ATTACK + dw -1 ; end + +LedybaEggMoves: + dw PSYBEAM + dw BIDE + dw LIGHT_SCREEN + dw -1 ; end + +SpinarakEggMoves: + dw PSYBEAM + dw DISABLE + dw SONICBOOM + dw BATON_PASS + dw PURSUIT + dw -1 ; end + +ChinchouEggMoves: + dw FLAIL + dw SUPERSONIC + dw SCREECH + dw -1 ; end + +PichuEggMoves: + dw REVERSAL + dw BIDE + dw PRESENT + dw ENCORE + dw DOUBLESLAP + dw -1 ; end + +CleffaEggMoves: + dw PRESENT + dw METRONOME + dw AMNESIA + dw BELLY_DRUM + dw SPLASH + dw MIMIC + dw -1 ; end + +IgglybuffEggMoves: + dw PERISH_SONG + dw PRESENT + dw FAINT_ATTACK + dw -1 ; end + +TogepiEggMoves: + dw PRESENT + dw MIRROR_MOVE + dw PECK + dw FORESIGHT + dw FUTURE_SIGHT + dw -1 ; end + +NatuEggMoves: + dw HAZE + dw DRILL_PECK + dw QUICK_ATTACK + dw FAINT_ATTACK + dw STEEL_WING + dw -1 ; end + +MareepEggMoves: + dw THUNDERBOLT + dw TAKE_DOWN + dw BODY_SLAM + dw SAFEGUARD + dw SCREECH + dw REFLECT + dw -1 ; end + +MarillEggMoves: + dw LIGHT_SCREEN + dw PRESENT + dw AMNESIA + dw FUTURE_SIGHT + dw BELLY_DRUM + dw PERISH_SONG + dw SUPERSONIC + dw FORESIGHT + dw -1 ; end + +SudowoodoEggMoves: + dw SELFDESTRUCT + dw -1 ; end + +HoppipEggMoves: + dw CONFUSION + dw GROWL + dw ENCORE + dw DOUBLE_EDGE + dw REFLECT + dw AMNESIA + dw PAY_DAY + dw -1 ; end + +AipomEggMoves: + dw COUNTER + dw SCREECH + dw PURSUIT + dw AGILITY + dw SPITE + dw SLAM + dw DOUBLESLAP + dw BEAT_UP + dw -1 ; end + +YanmaEggMoves: + dw WHIRLWIND + dw REVERSAL + dw LEECH_LIFE + dw -1 ; end + +WooperEggMoves: + dw BODY_SLAM + dw ANCIENTPOWER + dw SAFEGUARD + dw -1 ; end + +MurkrowEggMoves: + dw WHIRLWIND + dw DRILL_PECK + dw QUICK_ATTACK + dw MIRROR_MOVE + dw WING_ATTACK + dw SKY_ATTACK + dw -1 ; end + +MisdreavusEggMoves: + dw SCREECH + dw DESTINY_BOND + dw -1 ; end + +GirafarigEggMoves: + dw TAKE_DOWN + dw AMNESIA + dw FORESIGHT + dw FUTURE_SIGHT + dw BEAT_UP + dw -1 ; end + +PinecoEggMoves: + dw REFLECT + dw PIN_MISSILE + dw FLAIL + dw SWIFT + dw -1 ; end + +DunsparceEggMoves: + dw BIDE + dw ANCIENTPOWER + dw ROCK_SLIDE + dw BITE + dw RAGE + dw -1 ; end + +GligarEggMoves: + dw METAL_CLAW + dw WING_ATTACK + dw RAZOR_WIND + dw COUNTER + dw -1 ; end + +SnubbullEggMoves: + dw METRONOME + dw FAINT_ATTACK + dw REFLECT + dw PRESENT + dw CRUNCH + dw HEAL_BELL + dw LICK + dw LEER + dw -1 ; end + +QwilfishEggMoves: + dw FLAIL + dw HAZE + dw BUBBLEBEAM + dw SUPERSONIC + dw -1 ; end + +ShuckleEggMoves: + dw SWEET_SCENT + dw -1 ; end + +HeracrossEggMoves: + dw HARDEN + dw BIDE + dw FLAIL + dw -1 ; end + +SneaselEggMoves: + dw COUNTER + dw SPITE + dw FORESIGHT + dw REFLECT + dw BITE + dw -1 ; end + +TeddiursaEggMoves: + dw CRUNCH + dw TAKE_DOWN + dw SEISMIC_TOSS + dw FOCUS_ENERGY + dw COUNTER + dw METAL_CLAW + dw -1 ; end + +SlugmaEggMoves: + dw ACID_ARMOR + dw -1 ; end + +SwinubEggMoves: + dw TAKE_DOWN + dw BITE + dw BODY_SLAM + dw ROCK_SLIDE + dw ANCIENTPOWER + dw -1 ; end + +CorsolaEggMoves: + dw ROCK_SLIDE + dw SAFEGUARD + dw SCREECH + dw MIST + dw AMNESIA + dw -1 ; end + +RemoraidEggMoves: + dw AURORA_BEAM + dw OCTAZOOKA + dw SUPERSONIC + dw HAZE + dw SCREECH + dw -1 ; end + +DelibirdEggMoves: + dw AURORA_BEAM + dw QUICK_ATTACK + dw FUTURE_SIGHT + dw SPLASH + dw RAPID_SPIN + dw -1 ; end + +MantineEggMoves: + dw TWISTER + dw HYDRO_PUMP + dw HAZE + dw SLAM + dw -1 ; end + +SkarmoryEggMoves: + dw DRILL_PECK + dw PURSUIT + dw WHIRLWIND + dw SKY_ATTACK + dw -1 ; end + +HoundourEggMoves: + dw FIRE_SPIN + dw RAGE + dw PURSUIT + dw COUNTER + dw SPITE + dw REVERSAL + dw BEAT_UP + dw -1 ; end + +PhanpyEggMoves: + dw FOCUS_ENERGY + dw BODY_SLAM + dw ANCIENTPOWER + dw WATER_GUN + dw -1 ; end + +StantlerEggMoves: + dw REFLECT + dw SPITE + dw DISABLE + dw LIGHT_SCREEN + dw BITE + dw -1 ; end + +TyrogueEggMoves: + dw RAPID_SPIN + dw HI_JUMP_KICK + dw MACH_PUNCH + dw MIND_READER + dw -1 ; end + +SmoochumEggMoves: + dw MEDITATE + dw -1 ; end + +ElekidEggMoves: + dw KARATE_CHOP + dw BARRIER + dw ROLLING_KICK + dw MEDITATE + dw CROSS_CHOP + dw -1 ; end + +MagbyEggMoves: + dw KARATE_CHOP + dw MEGA_PUNCH + dw BARRIER + dw SCREECH + dw CROSS_CHOP + dw -1 ; end + +MiltankEggMoves: + dw PRESENT + dw REVERSAL + dw SEISMIC_TOSS + dw -1 ; end + +LarvitarEggMoves: + dw PURSUIT + dw STOMP + dw OUTRAGE + dw FOCUS_ENERGY + dw ANCIENTPOWER +NoEggMoves2: + dw -1 ; end diff --git a/data/pokemon/egg_moves_kanto.asm b/data/pokemon/egg_moves_kanto.asm new file mode 100644 index 0000000..b047732 --- /dev/null +++ b/data/pokemon/egg_moves_kanto.asm @@ -0,0 +1,586 @@ +SECTION "Egg Moves 1", ROMX + +EggMovePointers1: + dw BulbasaurEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw CharmanderEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw SquirtleEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw PidgeyEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw RattataEggMoves + dw NoEggMoves1 + dw SpearowEggMoves + dw NoEggMoves1 + dw EkansEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw SandshrewEggMoves + dw NoEggMoves1 + dw NidoranFEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NidoranMEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw VulpixEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw ZubatEggMoves + dw NoEggMoves1 + dw OddishEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw ParasEggMoves + dw NoEggMoves1 + dw VenonatEggMoves + dw NoEggMoves1 + dw DiglettEggMoves + dw NoEggMoves1 + dw MeowthEggMoves + dw NoEggMoves1 + dw PsyduckEggMoves + dw NoEggMoves1 + dw MankeyEggMoves + dw NoEggMoves1 + dw GrowlitheEggMoves + dw NoEggMoves1 + dw PoliwagEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw AbraEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw MachopEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw BellsproutEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw TentacoolEggMoves + dw NoEggMoves1 + dw GeodudeEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw PonytaEggMoves + dw NoEggMoves1 + dw SlowpokeEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw FarfetchDEggMoves + dw DoduoEggMoves + dw NoEggMoves1 + dw SeelEggMoves + dw NoEggMoves1 + dw GrimerEggMoves + dw NoEggMoves1 + dw ShellderEggMoves + dw NoEggMoves1 + dw GastlyEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw OnixEggMoves + dw DrowzeeEggMoves + dw NoEggMoves1 + dw KrabbyEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw ExeggcuteEggMoves + dw NoEggMoves1 + dw CuboneEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw LickitungEggMoves + dw KoffingEggMoves + dw NoEggMoves1 + dw RhyhornEggMoves + dw NoEggMoves1 + dw ChanseyEggMoves + dw TangelaEggMoves + dw KangaskhanEggMoves + dw HorseaEggMoves + dw NoEggMoves1 + dw GoldeenEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw MrMimeEggMoves + dw ScytherEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw PinsirEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw LaprasEggMoves + dw NoEggMoves1 + dw EeveeEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw OmanyteEggMoves + dw NoEggMoves1 + dw KabutoEggMoves + dw NoEggMoves1 + dw AerodactylEggMoves + dw SnorlaxEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw DratiniEggMoves + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 + dw NoEggMoves1 +.IndirectEnd:: + +BulbasaurEggMoves: + dw LIGHT_SCREEN + dw SKULL_BASH + dw SAFEGUARD + dw RAZOR_WIND + dw PETAL_DANCE + dw -1 ; end + +CharmanderEggMoves: + dw BELLY_DRUM + dw ANCIENTPOWER + dw ROCK_SLIDE + dw BITE + dw OUTRAGE + dw BEAT_UP + dw -1 ; end + +SquirtleEggMoves: + dw MIRROR_COAT + dw HAZE + dw MIST + dw CONFUSION + dw FORESIGHT + dw FLAIL + dw -1 ; end + +PidgeyEggMoves: + dw PURSUIT + dw FAINT_ATTACK + dw FORESIGHT + dw -1 ; end + +RattataEggMoves: + dw SCREECH + dw FLAME_WHEEL + dw FURY_SWIPES + dw BITE + dw COUNTER + dw REVERSAL + dw -1 ; end + +SpearowEggMoves: + dw FAINT_ATTACK + dw FALSE_SWIPE + dw SCARY_FACE + dw QUICK_ATTACK + dw TRI_ATTACK + dw -1 ; end + +EkansEggMoves: + dw PURSUIT + dw SLAM + dw SPITE + dw BEAT_UP + dw CRUNCH + dw -1 ; end + +SandshrewEggMoves: + dw FLAIL + dw SAFEGUARD + dw COUNTER + dw RAPID_SPIN + dw METAL_CLAW + dw -1 ; end + +NidoranFEggMoves: + dw SUPERSONIC + dw DISABLE + dw TAKE_DOWN + dw FOCUS_ENERGY + dw CHARM + dw COUNTER + dw BEAT_UP + dw -1 ; end + +NidoranMEggMoves: + dw SUPERSONIC + dw DISABLE + dw TAKE_DOWN + dw CONFUSION + dw AMNESIA + dw COUNTER + dw BEAT_UP + dw -1 ; end + +VulpixEggMoves: + dw FAINT_ATTACK + dw HYPNOSIS + dw FLAIL + dw SPITE + dw DISABLE + dw -1 ; end + +ZubatEggMoves: + dw QUICK_ATTACK + dw PURSUIT + dw FAINT_ATTACK + dw GUST + dw WHIRLWIND + dw -1 ; end + +OddishEggMoves: + dw SWORDS_DANCE + dw RAZOR_LEAF + dw FLAIL + dw SYNTHESIS + dw -1 ; end + +ParasEggMoves: + dw FALSE_SWIPE + dw SCREECH + dw COUNTER + dw PSYBEAM + dw FLAIL + dw LIGHT_SCREEN + dw PURSUIT + dw -1 ; end + +VenonatEggMoves: + dw BATON_PASS + dw SCREECH + dw GIGA_DRAIN + dw -1 ; end + +DiglettEggMoves: + dw FAINT_ATTACK + dw SCREECH + dw ANCIENTPOWER + dw PURSUIT + dw BEAT_UP + dw -1 ; end + +MeowthEggMoves: + dw SPITE + dw CHARM + dw HYPNOSIS + dw AMNESIA + dw -1 ; end + +PsyduckEggMoves: + dw ICE_BEAM + dw HYPNOSIS + dw PSYBEAM + dw FORESIGHT + dw LIGHT_SCREEN + dw FUTURE_SIGHT + dw PSYCHIC_M + dw CROSS_CHOP + dw -1 ; end + +MankeyEggMoves: + dw ROCK_SLIDE + dw FORESIGHT + dw MEDITATE + dw COUNTER + dw REVERSAL + dw BEAT_UP + dw -1 ; end + +GrowlitheEggMoves: + dw BODY_SLAM + dw SAFEGUARD + dw CRUNCH + dw THRASH + dw FIRE_SPIN + dw -1 ; end + +PoliwagEggMoves: + dw MIST + dw SPLASH + dw BUBBLEBEAM + dw HAZE + dw MIND_READER + dw -1 ; end + +AbraEggMoves: + dw LIGHT_SCREEN + dw ENCORE + dw BARRIER + dw -1 ; end + +MachopEggMoves: + dw LIGHT_SCREEN + dw MEDITATE + dw ROLLING_KICK + dw ENCORE + dw -1 ; end + +BellsproutEggMoves: + dw SWORDS_DANCE + dw ENCORE + dw REFLECT + dw SYNTHESIS + dw LEECH_LIFE + dw -1 ; end + +TentacoolEggMoves: + dw AURORA_BEAM + dw MIRROR_COAT + dw RAPID_SPIN + dw HAZE + dw SAFEGUARD + dw -1 ; end + +GeodudeEggMoves: + dw MEGA_PUNCH + dw ROCK_SLIDE + dw -1 ; end + +PonytaEggMoves: + dw FLAME_WHEEL + dw THRASH + dw DOUBLE_KICK + dw HYPNOSIS + dw CHARM + dw QUICK_ATTACK + dw -1 ; end + +SlowpokeEggMoves: + dw SAFEGUARD + dw BELLY_DRUM + dw FUTURE_SIGHT + dw STOMP + dw -1 ; end + +FarfetchDEggMoves: + dw FORESIGHT + dw MIRROR_MOVE + dw GUST + dw QUICK_ATTACK + dw FLAIL + dw -1 ; end + +DoduoEggMoves: + dw QUICK_ATTACK + dw SUPERSONIC + dw HAZE + dw FAINT_ATTACK + dw FLAIL + dw -1 ; end + +SeelEggMoves: + dw LICK + dw PERISH_SONG + dw DISABLE + dw PECK + dw SLAM + dw ENCORE + dw -1 ; end + +GrimerEggMoves: + dw HAZE + dw MEAN_LOOK + dw LICK + dw -1 ; end + +ShellderEggMoves: + dw BUBBLEBEAM + dw TAKE_DOWN + dw BARRIER + dw RAPID_SPIN + dw SCREECH + dw -1 ; end + +GastlyEggMoves: + dw PSYWAVE + dw PERISH_SONG + dw HAZE + dw -1 ; end + +OnixEggMoves: + dw ROCK_SLIDE + dw FLAIL + dw -1 ; end + +DrowzeeEggMoves: + dw LIGHT_SCREEN + dw BARRIER + dw -1 ; end + +KrabbyEggMoves: + dw DIG + dw HAZE + dw AMNESIA + dw FLAIL + dw SLAM + dw -1 ; end + +ExeggcuteEggMoves: + dw SYNTHESIS + dw MOONLIGHT + dw REFLECT + dw MEGA_DRAIN + dw ANCIENTPOWER + dw -1 ; end + +CuboneEggMoves: + dw ROCK_SLIDE + dw ANCIENTPOWER + dw BELLY_DRUM + dw SCREECH + dw SKULL_BASH + dw PERISH_SONG + dw SWORDS_DANCE + dw -1 ; end + +LickitungEggMoves: + dw BELLY_DRUM + dw MAGNITUDE + dw BODY_SLAM + dw -1 ; end + +KoffingEggMoves: + dw SCREECH + dw PSYWAVE + dw PSYBEAM + dw DESTINY_BOND + dw PAIN_SPLIT + dw -1 ; end + +RhyhornEggMoves: + dw CRUNCH + dw REVERSAL + dw ROCK_SLIDE + dw THRASH + dw PURSUIT + dw COUNTER + dw MAGNITUDE + dw -1 ; end + +ChanseyEggMoves: + dw PRESENT + dw METRONOME + dw HEAL_BELL + dw -1 ; end + +TangelaEggMoves: + dw FLAIL + dw CONFUSION + dw MEGA_DRAIN + dw REFLECT + dw AMNESIA + dw -1 ; end + +KangaskhanEggMoves: + dw STOMP + dw FORESIGHT + dw FOCUS_ENERGY + dw SAFEGUARD + dw DISABLE + dw -1 ; end + +HorseaEggMoves: + dw FLAIL + dw AURORA_BEAM + dw OCTAZOOKA + dw DISABLE + dw SPLASH + dw DRAGON_RAGE + dw -1 ; end + +GoldeenEggMoves: + dw PSYBEAM + dw HAZE + dw HYDRO_PUMP + dw -1 ; end + +MrMimeEggMoves: + dw FUTURE_SIGHT + dw HYPNOSIS + dw MIMIC + dw -1 ; end + +ScytherEggMoves: + dw COUNTER + dw SAFEGUARD + dw BATON_PASS + dw RAZOR_WIND + dw REVERSAL + dw LIGHT_SCREEN + dw -1 ; end + +PinsirEggMoves: + dw FURY_ATTACK + dw FLAIL + dw -1 ; end + +LaprasEggMoves: + dw AURORA_BEAM + dw FORESIGHT + dw -1 ; end + +EeveeEggMoves: + dw FLAIL + dw CHARM + dw -1 ; end + +OmanyteEggMoves: + dw BUBBLEBEAM + dw AURORA_BEAM + dw SLAM + dw SUPERSONIC + dw HAZE + dw -1 ; end + +KabutoEggMoves: + dw BUBBLEBEAM + dw AURORA_BEAM + dw RAPID_SPIN + dw DIG + dw FLAIL + dw -1 ; end + +AerodactylEggMoves: + dw WHIRLWIND + dw PURSUIT + dw FORESIGHT + dw -1 ; end + +SnorlaxEggMoves: + dw LICK + dw -1 ; end + +DratiniEggMoves: + dw LIGHT_SCREEN + dw MIST + dw HAZE + dw SUPERSONIC +NoEggMoves1: + dw -1 ; end diff --git a/data/pokemon/evos_attacks.asm b/data/pokemon/evos_attacks.asm new file mode 100644 index 0000000..8e8898c --- /dev/null +++ b/data/pokemon/evos_attacks.asm @@ -0,0 +1,24 @@ +; Evolutions and attacks are grouped together since they're both checked at level-up. + +SECTION "Evolutions and Attacks Pointers", ROMX + +; Evos+attacks data structure: +; - Evolution methods: +; * dbbw EVOLVE_LEVEL, level, species +; * dbbw EVOLVE_ITEM, used item, species +; * dbbw EVOLVE_TRADE, held item (or -1 for none), species +; * dbbw EVOLVE_HAPPINESS, TR_* constant (ANYTIME, MORNDAY, NITE), species +; * dbbbw EVOLVE_STAT, level, ATK_*_DEF constant (LT, GT, EQ), species +; - db 0 ; no more evolutions +; - Learnset (in increasing level order): +; * dbw level, move +; - db 0 ; no more level-up moves + +EvosAttacksPointers:: + indirect_table 2, 1 + indirect_entries JOHTO_POKEMON - 1, EvosAttacksPointers1 + indirect_entries NUM_POKEMON, EvosAttacksPointers2 + indirect_table_end + +INCLUDE "data/pokemon/evos_attacks_kanto.asm" +INCLUDE "data/pokemon/evos_attacks_johto.asm" diff --git a/data/pokemon/evos_attacks_johto.asm b/data/pokemon/evos_attacks_johto.asm new file mode 100644 index 0000000..472eea4 --- /dev/null +++ b/data/pokemon/evos_attacks_johto.asm @@ -0,0 +1,1405 @@ +SECTION "Evolutions and Attacks 2", ROMX + +EvosAttacksPointers2:: + dw ChikoritaEvosAttacks + dw BayleefEvosAttacks + dw MeganiumEvosAttacks + dw CyndaquilEvosAttacks + dw QuilavaEvosAttacks + dw TyphlosionEvosAttacks + dw TotodileEvosAttacks + dw CroconawEvosAttacks + dw FeraligatrEvosAttacks + dw SentretEvosAttacks + dw FurretEvosAttacks + dw HoothootEvosAttacks + dw NoctowlEvosAttacks + dw LedybaEvosAttacks + dw LedianEvosAttacks + dw SpinarakEvosAttacks + dw AriadosEvosAttacks + dw CrobatEvosAttacks + dw ChinchouEvosAttacks + dw LanturnEvosAttacks + dw PichuEvosAttacks + dw CleffaEvosAttacks + dw IgglybuffEvosAttacks + dw TogepiEvosAttacks + dw TogeticEvosAttacks + dw NatuEvosAttacks + dw XatuEvosAttacks + dw MareepEvosAttacks + dw FlaaffyEvosAttacks + dw AmpharosEvosAttacks + dw BellossomEvosAttacks + dw MarillEvosAttacks + dw AzumarillEvosAttacks + dw SudowoodoEvosAttacks + dw PolitoedEvosAttacks + dw HoppipEvosAttacks + dw SkiploomEvosAttacks + dw JumpluffEvosAttacks + dw AipomEvosAttacks + dw SunkernEvosAttacks + dw SunfloraEvosAttacks + dw YanmaEvosAttacks + dw WooperEvosAttacks + dw QuagsireEvosAttacks + dw EspeonEvosAttacks + dw UmbreonEvosAttacks + dw MurkrowEvosAttacks + dw SlowkingEvosAttacks + dw MisdreavusEvosAttacks + dw UnownEvosAttacks + dw WobbuffetEvosAttacks + dw GirafarigEvosAttacks + dw PinecoEvosAttacks + dw ForretressEvosAttacks + dw DunsparceEvosAttacks + dw GligarEvosAttacks + dw SteelixEvosAttacks + dw SnubbullEvosAttacks + dw GranbullEvosAttacks + dw QwilfishEvosAttacks + dw ScizorEvosAttacks + dw ShuckleEvosAttacks + dw HeracrossEvosAttacks + dw SneaselEvosAttacks + dw TeddiursaEvosAttacks + dw UrsaringEvosAttacks + dw SlugmaEvosAttacks + dw MagcargoEvosAttacks + dw SwinubEvosAttacks + dw PiloswineEvosAttacks + dw CorsolaEvosAttacks + dw RemoraidEvosAttacks + dw OctilleryEvosAttacks + dw DelibirdEvosAttacks + dw MantineEvosAttacks + dw SkarmoryEvosAttacks + dw HoundourEvosAttacks + dw HoundoomEvosAttacks + dw KingdraEvosAttacks + dw PhanpyEvosAttacks + dw DonphanEvosAttacks + dw Porygon2EvosAttacks + dw StantlerEvosAttacks + dw SmeargleEvosAttacks + dw TyrogueEvosAttacks + dw HitmontopEvosAttacks + dw SmoochumEvosAttacks + dw ElekidEvosAttacks + dw MagbyEvosAttacks + dw MiltankEvosAttacks + dw BlisseyEvosAttacks + dw RaikouEvosAttacks + dw EnteiEvosAttacks + dw SuicuneEvosAttacks + dw LarvitarEvosAttacks + dw PupitarEvosAttacks + dw TyranitarEvosAttacks + dw LugiaEvosAttacks + dw HoOhEvosAttacks + dw CelebiEvosAttacks +.IndirectEnd:: + +ChikoritaEvosAttacks: + dbbw EVOLVE_LEVEL, 16, BAYLEEF + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 8, RAZOR_LEAF + dbw 12, REFLECT + dbw 15, POISONPOWDER + dbw 22, SYNTHESIS + dbw 29, BODY_SLAM + dbw 36, LIGHT_SCREEN + dbw 43, SAFEGUARD + dbw 50, SOLARBEAM + db 0 ; no more level-up moves + +BayleefEvosAttacks: + dbbw EVOLVE_LEVEL, 32, MEGANIUM + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 1, RAZOR_LEAF + dbw 1, REFLECT + dbw 8, RAZOR_LEAF + dbw 12, REFLECT + dbw 15, POISONPOWDER + dbw 23, SYNTHESIS + dbw 31, BODY_SLAM + dbw 39, LIGHT_SCREEN + dbw 47, SAFEGUARD + dbw 55, SOLARBEAM + db 0 ; no more level-up moves + +MeganiumEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 1, RAZOR_LEAF + dbw 1, REFLECT + dbw 8, RAZOR_LEAF + dbw 12, REFLECT + dbw 15, POISONPOWDER + dbw 23, SYNTHESIS + dbw 31, BODY_SLAM + dbw 41, LIGHT_SCREEN + dbw 51, SAFEGUARD + dbw 61, SOLARBEAM + db 0 ; no more level-up moves + +CyndaquilEvosAttacks: + dbbw EVOLVE_LEVEL, 14, QUILAVA + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, LEER + dbw 6, SMOKESCREEN + dbw 12, EMBER + dbw 19, QUICK_ATTACK + dbw 27, FLAME_WHEEL + dbw 36, SWIFT + dbw 46, FLAMETHROWER + db 0 ; no more level-up moves + +QuilavaEvosAttacks: + dbbw EVOLVE_LEVEL, 36, TYPHLOSION + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, LEER + dbw 1, SMOKESCREEN + dbw 6, SMOKESCREEN + dbw 12, EMBER + dbw 21, QUICK_ATTACK + dbw 31, FLAME_WHEEL + dbw 42, SWIFT + dbw 54, FLAMETHROWER + db 0 ; no more level-up moves + +TyphlosionEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, LEER + dbw 1, SMOKESCREEN + dbw 1, EMBER + dbw 6, SMOKESCREEN + dbw 12, EMBER + dbw 21, QUICK_ATTACK + dbw 31, FLAME_WHEEL + dbw 45, SWIFT + dbw 60, FLAMETHROWER + db 0 ; no more level-up moves + +TotodileEvosAttacks: + dbbw EVOLVE_LEVEL, 18, CROCONAW + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, LEER + dbw 7, RAGE + dbw 13, WATER_GUN + dbw 20, BITE + dbw 27, SCARY_FACE + dbw 35, SLASH + dbw 43, SCREECH + dbw 52, HYDRO_PUMP + db 0 ; no more level-up moves + +CroconawEvosAttacks: + dbbw EVOLVE_LEVEL, 30, FERALIGATR + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, LEER + dbw 1, RAGE + dbw 7, RAGE + dbw 13, WATER_GUN + dbw 21, BITE + dbw 28, SCARY_FACE + dbw 37, SLASH + dbw 45, SCREECH + dbw 55, HYDRO_PUMP + db 0 ; no more level-up moves + +FeraligatrEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, LEER + dbw 1, RAGE + dbw 1, WATER_GUN + dbw 7, RAGE + dbw 13, WATER_GUN + dbw 21, BITE + dbw 28, SCARY_FACE + dbw 38, SLASH + dbw 47, SCREECH + dbw 58, HYDRO_PUMP + db 0 ; no more level-up moves + +SentretEvosAttacks: + dbbw EVOLVE_LEVEL, 15, FURRET + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 5, DEFENSE_CURL + dbw 11, QUICK_ATTACK + dbw 17, FURY_SWIPES + dbw 25, SLAM + dbw 33, REST + dbw 41, AMNESIA + db 0 ; no more level-up moves + +FurretEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, DEFENSE_CURL + dbw 1, QUICK_ATTACK + dbw 5, DEFENSE_CURL + dbw 11, QUICK_ATTACK + dbw 18, FURY_SWIPES + dbw 28, SLAM + dbw 38, REST + dbw 48, AMNESIA + db 0 ; no more level-up moves + +HoothootEvosAttacks: + dbbw EVOLVE_LEVEL, 20, NOCTOWL + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 6, FORESIGHT + dbw 11, PECK + dbw 16, HYPNOSIS + dbw 22, REFLECT + dbw 28, TAKE_DOWN + dbw 34, CONFUSION + dbw 48, DREAM_EATER + db 0 ; no more level-up moves + +NoctowlEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 1, FORESIGHT + dbw 1, PECK + dbw 6, FORESIGHT + dbw 11, PECK + dbw 16, HYPNOSIS + dbw 25, REFLECT + dbw 33, TAKE_DOWN + dbw 41, CONFUSION + dbw 57, DREAM_EATER + db 0 ; no more level-up moves + +LedybaEvosAttacks: + dbbw EVOLVE_LEVEL, 18, LEDIAN + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 8, SUPERSONIC + dbw 15, COMET_PUNCH + dbw 22, LIGHT_SCREEN + dbw 22, REFLECT + dbw 22, SAFEGUARD + dbw 29, BATON_PASS + dbw 36, SWIFT + dbw 43, AGILITY + dbw 50, DOUBLE_EDGE + db 0 ; no more level-up moves + +LedianEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, SUPERSONIC + dbw 8, SUPERSONIC + dbw 15, COMET_PUNCH + dbw 24, LIGHT_SCREEN + dbw 24, REFLECT + dbw 24, SAFEGUARD + dbw 33, BATON_PASS + dbw 42, SWIFT + dbw 51, AGILITY + dbw 60, DOUBLE_EDGE + db 0 ; no more level-up moves + +SpinarakEvosAttacks: + dbbw EVOLVE_LEVEL, 22, ARIADOS + db 0 ; no more evolutions + dbw 1, POISON_STING + dbw 1, STRING_SHOT + dbw 6, SCARY_FACE + dbw 11, CONSTRICT + dbw 17, NIGHT_SHADE + dbw 23, LEECH_LIFE + dbw 30, FURY_SWIPES + dbw 37, SPIDER_WEB + dbw 45, AGILITY + dbw 53, PSYCHIC_M + db 0 ; no more level-up moves + +AriadosEvosAttacks: + db 0 ; no more evolutions + dbw 1, POISON_STING + dbw 1, STRING_SHOT + dbw 1, SCARY_FACE + dbw 1, CONSTRICT + dbw 6, SCARY_FACE + dbw 11, CONSTRICT + dbw 17, NIGHT_SHADE + dbw 25, LEECH_LIFE + dbw 34, FURY_SWIPES + dbw 43, SPIDER_WEB + dbw 53, AGILITY + dbw 63, PSYCHIC_M + db 0 ; no more level-up moves + +CrobatEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCREECH + dbw 1, LEECH_LIFE + dbw 1, SUPERSONIC + dbw 6, SUPERSONIC + dbw 12, BITE + dbw 19, CONFUSE_RAY + dbw 30, WING_ATTACK + dbw 42, MEAN_LOOK + dbw 55, HAZE + db 0 ; no more level-up moves + +ChinchouEvosAttacks: + dbbw EVOLVE_LEVEL, 27, LANTURN + db 0 ; no more evolutions + dbw 1, BUBBLE + dbw 1, THUNDER_WAVE + dbw 5, SUPERSONIC + dbw 13, FLAIL + dbw 17, WATER_GUN + dbw 25, SPARK + dbw 29, CONFUSE_RAY + dbw 37, TAKE_DOWN + dbw 41, HYDRO_PUMP + db 0 ; no more level-up moves + +LanturnEvosAttacks: + db 0 ; no more evolutions + dbw 1, BUBBLE + dbw 1, THUNDER_WAVE + dbw 1, SUPERSONIC + dbw 5, SUPERSONIC + dbw 13, FLAIL + dbw 17, WATER_GUN + dbw 25, SPARK + dbw 33, CONFUSE_RAY + dbw 45, TAKE_DOWN + dbw 53, HYDRO_PUMP + db 0 ; no more level-up moves + +PichuEvosAttacks: + dbbw EVOLVE_HAPPINESS, TR_ANYTIME, PIKACHU + db 0 ; no more evolutions + dbw 1, THUNDERSHOCK + dbw 1, CHARM + dbw 6, TAIL_WHIP + dbw 8, THUNDER_WAVE + dbw 11, SWEET_KISS + db 0 ; no more level-up moves + +CleffaEvosAttacks: + dbbw EVOLVE_HAPPINESS, TR_ANYTIME, CLEFAIRY + db 0 ; no more evolutions + dbw 1, POUND + dbw 1, CHARM + dbw 4, ENCORE + dbw 8, SING + dbw 13, SWEET_KISS + db 0 ; no more level-up moves + +IgglybuffEvosAttacks: + dbbw EVOLVE_HAPPINESS, TR_ANYTIME, JIGGLYPUFF + db 0 ; no more evolutions + dbw 1, SING + dbw 1, CHARM + dbw 4, DEFENSE_CURL + dbw 9, POUND + dbw 14, SWEET_KISS + db 0 ; no more level-up moves + +TogepiEvosAttacks: + dbbw EVOLVE_HAPPINESS, TR_ANYTIME, TOGETIC + db 0 ; no more evolutions + dbw 1, GROWL + dbw 1, CHARM + dbw 7, METRONOME + dbw 18, SWEET_KISS + dbw 25, ENCORE + dbw 31, SAFEGUARD + dbw 38, DOUBLE_EDGE + db 0 ; no more level-up moves + +TogeticEvosAttacks: + db 0 ; no more evolutions + dbw 1, GROWL + dbw 1, CHARM + dbw 7, METRONOME + dbw 18, SWEET_KISS + dbw 25, ENCORE + dbw 31, SAFEGUARD + dbw 38, DOUBLE_EDGE + db 0 ; no more level-up moves + +NatuEvosAttacks: + dbbw EVOLVE_LEVEL, 25, XATU + db 0 ; no more evolutions + dbw 1, PECK + dbw 1, LEER + dbw 10, NIGHT_SHADE + dbw 20, TELEPORT + dbw 30, FUTURE_SIGHT + dbw 40, CONFUSE_RAY + dbw 50, PSYCHIC_M + db 0 ; no more level-up moves + +XatuEvosAttacks: + db 0 ; no more evolutions + dbw 1, PECK + dbw 1, LEER + dbw 1, NIGHT_SHADE + dbw 10, NIGHT_SHADE + dbw 20, TELEPORT + dbw 35, FUTURE_SIGHT + dbw 50, CONFUSE_RAY + dbw 65, PSYCHIC_M + db 0 ; no more level-up moves + +MareepEvosAttacks: + dbbw EVOLVE_LEVEL, 15, FLAAFFY + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 9, THUNDERSHOCK + dbw 16, THUNDER_WAVE + dbw 23, COTTON_SPORE + dbw 30, LIGHT_SCREEN + dbw 37, THUNDER + db 0 ; no more level-up moves + +FlaaffyEvosAttacks: + dbbw EVOLVE_LEVEL, 30, AMPHAROS + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 1, THUNDERSHOCK + dbw 9, THUNDERSHOCK + dbw 18, THUNDER_WAVE + dbw 27, COTTON_SPORE + dbw 36, LIGHT_SCREEN + dbw 45, THUNDER + db 0 ; no more level-up moves + +AmpharosEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 1, THUNDERSHOCK + dbw 1, THUNDER_WAVE + dbw 9, THUNDERSHOCK + dbw 18, THUNDER_WAVE + dbw 27, COTTON_SPORE + dbw 30, THUNDERPUNCH + dbw 42, LIGHT_SCREEN + dbw 57, THUNDER + db 0 ; no more level-up moves + +BellossomEvosAttacks: + db 0 ; no more evolutions + dbw 1, ABSORB + dbw 1, SWEET_SCENT + dbw 1, STUN_SPORE + dbw 1, PETAL_DANCE + dbw 55, SOLARBEAM + db 0 ; no more level-up moves + +MarillEvosAttacks: + dbbw EVOLVE_LEVEL, 18, AZUMARILL + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 3, DEFENSE_CURL + dbw 6, TAIL_WHIP + dbw 10, WATER_GUN + dbw 15, ROLLOUT + dbw 21, BUBBLEBEAM + dbw 28, DOUBLE_EDGE + dbw 36, RAIN_DANCE + db 0 ; no more level-up moves + +AzumarillEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, DEFENSE_CURL + dbw 1, TAIL_WHIP + dbw 1, WATER_GUN + dbw 3, DEFENSE_CURL + dbw 6, TAIL_WHIP + dbw 10, WATER_GUN + dbw 15, ROLLOUT + dbw 25, BUBBLEBEAM + dbw 36, DOUBLE_EDGE + dbw 48, RAIN_DANCE + db 0 ; no more level-up moves + +SudowoodoEvosAttacks: + db 0 ; no more evolutions + dbw 1, ROCK_THROW + dbw 1, MIMIC + dbw 10, FLAIL + dbw 19, LOW_KICK + dbw 28, ROCK_SLIDE + dbw 37, FAINT_ATTACK + dbw 46, SLAM + db 0 ; no more level-up moves + +PolitoedEvosAttacks: + db 0 ; no more evolutions + dbw 1, WATER_GUN + dbw 1, HYPNOSIS + dbw 1, DOUBLESLAP + dbw 1, PERISH_SONG + dbw 35, PERISH_SONG + dbw 51, SWAGGER + db 0 ; no more level-up moves + +HoppipEvosAttacks: + dbbw EVOLVE_LEVEL, 18, SKIPLOOM + db 0 ; no more evolutions + dbw 1, SPLASH + dbw 5, SYNTHESIS + dbw 5, TAIL_WHIP + dbw 10, TACKLE + dbw 13, POISONPOWDER + dbw 15, STUN_SPORE + dbw 17, SLEEP_POWDER + dbw 20, LEECH_SEED + dbw 25, COTTON_SPORE + dbw 30, MEGA_DRAIN + db 0 ; no more level-up moves + +SkiploomEvosAttacks: + dbbw EVOLVE_LEVEL, 27, JUMPLUFF + db 0 ; no more evolutions + dbw 1, SPLASH + dbw 1, SYNTHESIS + dbw 1, TAIL_WHIP + dbw 1, TACKLE + dbw 5, SYNTHESIS + dbw 5, TAIL_WHIP + dbw 10, TACKLE + dbw 13, POISONPOWDER + dbw 15, STUN_SPORE + dbw 17, SLEEP_POWDER + dbw 22, LEECH_SEED + dbw 29, COTTON_SPORE + dbw 36, MEGA_DRAIN + db 0 ; no more level-up moves + +JumpluffEvosAttacks: + db 0 ; no more evolutions + dbw 1, SPLASH + dbw 1, SYNTHESIS + dbw 1, TAIL_WHIP + dbw 1, TACKLE + dbw 5, SYNTHESIS + dbw 5, TAIL_WHIP + dbw 10, TACKLE + dbw 13, POISONPOWDER + dbw 15, STUN_SPORE + dbw 17, SLEEP_POWDER + dbw 22, LEECH_SEED + dbw 33, COTTON_SPORE + dbw 44, MEGA_DRAIN + db 0 ; no more level-up moves + +AipomEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, TAIL_WHIP + dbw 6, SAND_ATTACK + dbw 12, BATON_PASS + dbw 19, FURY_SWIPES + dbw 27, SWIFT + dbw 36, SCREECH + dbw 46, AGILITY + db 0 ; no more level-up moves + +SunkernEvosAttacks: + dbbw EVOLVE_ITEM, SUN_STONE, SUNFLORA + db 0 ; no more evolutions + dbw 1, ABSORB + dbw 4, GROWTH + dbw 10, MEGA_DRAIN + dbw 19, SUNNY_DAY + dbw 31, SYNTHESIS + dbw 46, GIGA_DRAIN + db 0 ; no more level-up moves + +SunfloraEvosAttacks: + db 0 ; no more evolutions + dbw 1, ABSORB + dbw 1, POUND + dbw 4, GROWTH + dbw 10, RAZOR_LEAF + dbw 19, SUNNY_DAY + dbw 31, PETAL_DANCE + dbw 46, SOLARBEAM + db 0 ; no more level-up moves + +YanmaEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, FORESIGHT + dbw 7, QUICK_ATTACK + dbw 13, DOUBLE_TEAM + dbw 19, SONICBOOM + dbw 25, DETECT + dbw 31, SUPERSONIC + dbw 37, WING_ATTACK + dbw 43, SCREECH + db 0 ; no more level-up moves + +WooperEvosAttacks: + dbbw EVOLVE_LEVEL, 20, QUAGSIRE + db 0 ; no more evolutions + dbw 1, WATER_GUN + dbw 1, TAIL_WHIP + dbw 11, SLAM + dbw 21, AMNESIA + dbw 31, EARTHQUAKE + dbw 41, RAIN_DANCE + dbw 51, MIST + dbw 51, HAZE + db 0 ; no more level-up moves + +QuagsireEvosAttacks: + db 0 ; no more evolutions + dbw 1, WATER_GUN + dbw 1, TAIL_WHIP + dbw 11, SLAM + dbw 23, AMNESIA + dbw 35, EARTHQUAKE + dbw 47, RAIN_DANCE + dbw 59, MIST + dbw 59, HAZE + db 0 ; no more level-up moves + +EspeonEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, TAIL_WHIP + dbw 8, SAND_ATTACK + dbw 16, CONFUSION + dbw 23, QUICK_ATTACK + dbw 30, SWIFT + dbw 36, PSYBEAM + dbw 42, PSYCH_UP + dbw 47, PSYCHIC_M + dbw 52, MORNING_SUN + db 0 ; no more level-up moves + +UmbreonEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, TAIL_WHIP + dbw 8, SAND_ATTACK + dbw 16, PURSUIT + dbw 23, QUICK_ATTACK + dbw 30, CONFUSE_RAY + dbw 36, FAINT_ATTACK + dbw 42, MEAN_LOOK + dbw 47, SCREECH + dbw 52, MOONLIGHT + db 0 ; no more level-up moves + +MurkrowEvosAttacks: + db 0 ; no more evolutions + dbw 1, PECK + dbw 11, PURSUIT + dbw 16, HAZE + dbw 26, NIGHT_SHADE + dbw 31, FAINT_ATTACK + dbw 41, MEAN_LOOK + db 0 ; no more level-up moves + +SlowkingEvosAttacks: + db 0 ; no more evolutions + dbw 1, CURSE + dbw 1, TACKLE + dbw 6, GROWL + dbw 15, WATER_GUN + dbw 20, CONFUSION + dbw 29, DISABLE + dbw 34, HEADBUTT + dbw 43, SWAGGER + dbw 48, PSYCHIC_M + db 0 ; no more level-up moves + +MisdreavusEvosAttacks: + db 0 ; no more evolutions + dbw 1, GROWL + dbw 1, PSYWAVE + dbw 6, SPITE + dbw 12, CONFUSE_RAY + dbw 19, MEAN_LOOK + dbw 27, PSYBEAM + dbw 36, PAIN_SPLIT + dbw 46, PERISH_SONG + db 0 ; no more level-up moves + +UnownEvosAttacks: + db 0 ; no more evolutions + dbw 1, HIDDEN_POWER + db 0 ; no more level-up moves + +WobbuffetEvosAttacks: + db 0 ; no more evolutions + dbw 1, COUNTER + dbw 1, MIRROR_COAT + dbw 1, SAFEGUARD + dbw 1, DESTINY_BOND + db 0 ; no more level-up moves + +GirafarigEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 1, CONFUSION + dbw 1, STOMP + dbw 7, CONFUSION + dbw 13, STOMP + dbw 20, AGILITY + dbw 30, BATON_PASS + dbw 41, PSYBEAM + dbw 54, CRUNCH + db 0 ; no more level-up moves + +PinecoEvosAttacks: + dbbw EVOLVE_LEVEL, 31, FORRETRESS + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, PROTECT + dbw 8, SELFDESTRUCT + dbw 15, TAKE_DOWN + dbw 22, RAPID_SPIN + dbw 29, BIDE + dbw 36, EXPLOSION + dbw 43, SPIKES + dbw 50, DOUBLE_EDGE + db 0 ; no more level-up moves + +ForretressEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, PROTECT + dbw 1, SELFDESTRUCT + dbw 8, SELFDESTRUCT + dbw 15, TAKE_DOWN + dbw 22, RAPID_SPIN + dbw 29, BIDE + dbw 39, EXPLOSION + dbw 49, SPIKES + dbw 59, DOUBLE_EDGE + db 0 ; no more level-up moves + +DunsparceEvosAttacks: + db 0 ; no more evolutions + dbw 1, RAGE + dbw 5, DEFENSE_CURL + dbw 13, GLARE + dbw 18, SPITE + dbw 26, PURSUIT + dbw 30, SCREECH + dbw 38, TAKE_DOWN + db 0 ; no more level-up moves + +GligarEvosAttacks: + db 0 ; no more evolutions + dbw 1, POISON_STING + dbw 6, SAND_ATTACK + dbw 13, HARDEN + dbw 20, QUICK_ATTACK + dbw 28, FAINT_ATTACK + dbw 36, SLASH + dbw 44, SCREECH + dbw 52, GUILLOTINE + db 0 ; no more level-up moves + +SteelixEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, SCREECH + dbw 10, BIND + dbw 14, ROCK_THROW + dbw 23, HARDEN + dbw 27, RAGE + dbw 36, SANDSTORM + dbw 40, SLAM + dbw 49, CRUNCH + db 0 ; no more level-up moves + +SnubbullEvosAttacks: + dbbw EVOLVE_LEVEL, 23, GRANBULL + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, SCARY_FACE + dbw 4, TAIL_WHIP + dbw 8, CHARM + dbw 13, BITE + dbw 19, LICK + dbw 26, ROAR + dbw 34, RAGE + dbw 43, TAKE_DOWN + db 0 ; no more level-up moves + +GranbullEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, SCARY_FACE + dbw 4, TAIL_WHIP + dbw 8, CHARM + dbw 13, BITE + dbw 19, LICK + dbw 28, ROAR + dbw 38, RAGE + dbw 51, TAKE_DOWN + db 0 ; no more level-up moves + +QwilfishEvosAttacks: + db 0 ; no more evolutions + dbw 1, SPIKES + dbw 1, TACKLE + dbw 1, POISON_STING + dbw 10, HARDEN + dbw 10, MINIMIZE + dbw 19, WATER_GUN + dbw 28, PIN_MISSILE + dbw 37, TAKE_DOWN + dbw 46, HYDRO_PUMP + db 0 ; no more level-up moves + +ScizorEvosAttacks: + db 0 ; no more evolutions + dbw 1, QUICK_ATTACK + dbw 1, LEER + dbw 6, FOCUS_ENERGY + dbw 12, PURSUIT + dbw 18, FALSE_SWIPE + dbw 24, AGILITY + dbw 30, METAL_CLAW + dbw 36, SLASH + dbw 42, SWORDS_DANCE + dbw 48, DOUBLE_TEAM + db 0 ; no more level-up moves + +ShuckleEvosAttacks: + db 0 ; no more evolutions + dbw 1, CONSTRICT + dbw 1, WITHDRAW + dbw 9, WRAP + dbw 14, ENCORE + dbw 23, SAFEGUARD + dbw 28, BIDE + dbw 37, REST + db 0 ; no more level-up moves + +HeracrossEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, LEER + dbw 6, HORN_ATTACK + dbw 12, ENDURE + dbw 19, FURY_ATTACK + dbw 27, COUNTER + dbw 35, TAKE_DOWN + dbw 44, REVERSAL + dbw 54, MEGAHORN + db 0 ; no more level-up moves + +SneaselEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, LEER + dbw 9, QUICK_ATTACK + dbw 17, SCREECH + dbw 25, FAINT_ATTACK + dbw 33, FURY_SWIPES + dbw 41, AGILITY + dbw 49, SLASH + dbw 57, BEAT_UP + dbw 65, METAL_CLAW + db 0 ; no more level-up moves + +TeddiursaEvosAttacks: + dbbw EVOLVE_LEVEL, 30, URSARING + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, LEER + dbw 8, LICK + dbw 15, FURY_SWIPES + dbw 22, FAINT_ATTACK + dbw 29, REST + dbw 36, SLASH + dbw 43, SNORE + dbw 50, THRASH + db 0 ; no more level-up moves + +UrsaringEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, LEER + dbw 1, LICK + dbw 1, FURY_SWIPES + dbw 8, LICK + dbw 15, FURY_SWIPES + dbw 22, FAINT_ATTACK + dbw 29, REST + dbw 39, SLASH + dbw 49, SNORE + dbw 59, THRASH + db 0 ; no more level-up moves + +SlugmaEvosAttacks: + dbbw EVOLVE_LEVEL, 38, MAGCARGO + db 0 ; no more evolutions + dbw 1, SMOG + dbw 8, EMBER + dbw 15, ROCK_THROW + dbw 22, HARDEN + dbw 29, AMNESIA + dbw 36, FLAMETHROWER + dbw 43, ROCK_SLIDE + dbw 50, BODY_SLAM + db 0 ; no more level-up moves + +MagcargoEvosAttacks: + db 0 ; no more evolutions + dbw 1, SMOG + dbw 1, EMBER + dbw 1, ROCK_THROW + dbw 8, EMBER + dbw 15, ROCK_THROW + dbw 22, HARDEN + dbw 29, AMNESIA + dbw 36, FLAMETHROWER + dbw 48, ROCK_SLIDE + dbw 60, BODY_SLAM + db 0 ; no more level-up moves + +SwinubEvosAttacks: + dbbw EVOLVE_LEVEL, 33, PILOSWINE + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 10, POWDER_SNOW + dbw 19, ENDURE + dbw 28, TAKE_DOWN + dbw 37, MIST + dbw 46, BLIZZARD + dbw 55, AMNESIA + db 0 ; no more level-up moves + +PiloswineEvosAttacks: + db 0 ; no more evolutions + dbw 1, HORN_ATTACK + dbw 1, POWDER_SNOW + dbw 1, ENDURE + dbw 10, POWDER_SNOW + dbw 19, ENDURE + dbw 28, TAKE_DOWN + dbw 33, FURY_ATTACK + dbw 42, MIST + dbw 56, BLIZZARD + dbw 70, AMNESIA + db 0 ; no more level-up moves + +CorsolaEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 7, HARDEN + dbw 13, BUBBLE + dbw 19, RECOVER + dbw 25, BUBBLEBEAM + dbw 31, SPIKE_CANNON + dbw 37, MIRROR_COAT + dbw 43, ANCIENTPOWER + db 0 ; no more level-up moves + +RemoraidEvosAttacks: + dbbw EVOLVE_LEVEL, 25, OCTILLERY + db 0 ; no more evolutions + dbw 1, WATER_GUN + dbw 11, LOCK_ON + dbw 22, PSYBEAM + dbw 22, AURORA_BEAM + dbw 22, BUBBLEBEAM + dbw 33, FOCUS_ENERGY + dbw 44, ICE_BEAM + dbw 55, HYPER_BEAM + db 0 ; no more level-up moves + +OctilleryEvosAttacks: + db 0 ; no more evolutions + dbw 1, WATER_GUN + dbw 11, CONSTRICT + dbw 22, PSYBEAM + dbw 22, AURORA_BEAM + dbw 22, BUBBLEBEAM + dbw 25, OCTAZOOKA + dbw 38, FOCUS_ENERGY + dbw 54, ICE_BEAM + dbw 70, HYPER_BEAM + db 0 ; no more level-up moves + +DelibirdEvosAttacks: + db 0 ; no more evolutions + dbw 1, PRESENT + db 0 ; no more level-up moves + +MantineEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, BUBBLE + dbw 10, SUPERSONIC + dbw 18, BUBBLEBEAM + dbw 25, TAKE_DOWN + dbw 32, AGILITY + dbw 40, WING_ATTACK + dbw 49, CONFUSE_RAY + db 0 ; no more level-up moves + +SkarmoryEvosAttacks: + db 0 ; no more evolutions + dbw 1, LEER + dbw 1, PECK + dbw 13, SAND_ATTACK + dbw 19, SWIFT + dbw 25, AGILITY + dbw 37, FURY_ATTACK + dbw 49, STEEL_WING + db 0 ; no more level-up moves + +HoundourEvosAttacks: + dbbw EVOLVE_LEVEL, 24, HOUNDOOM + db 0 ; no more evolutions + dbw 1, LEER + dbw 1, EMBER + dbw 7, ROAR + dbw 13, SMOG + dbw 20, BITE + dbw 27, FAINT_ATTACK + dbw 35, FLAMETHROWER + dbw 43, CRUNCH + db 0 ; no more level-up moves + +HoundoomEvosAttacks: + db 0 ; no more evolutions + dbw 1, LEER + dbw 1, EMBER + dbw 7, ROAR + dbw 13, SMOG + dbw 20, BITE + dbw 30, FAINT_ATTACK + dbw 41, FLAMETHROWER + dbw 52, CRUNCH + db 0 ; no more level-up moves + +KingdraEvosAttacks: + db 0 ; no more evolutions + dbw 1, BUBBLE + dbw 1, SMOKESCREEN + dbw 1, LEER + dbw 1, WATER_GUN + dbw 8, SMOKESCREEN + dbw 15, LEER + dbw 22, WATER_GUN + dbw 29, TWISTER + dbw 40, AGILITY + dbw 51, HYDRO_PUMP + db 0 ; no more level-up moves + +PhanpyEvosAttacks: + dbbw EVOLVE_LEVEL, 25, DONPHAN + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 9, DEFENSE_CURL + dbw 17, FLAIL + dbw 25, TAKE_DOWN + dbw 33, ROLLOUT + dbw 41, ENDURE + dbw 49, DOUBLE_EDGE + db 0 ; no more level-up moves + +DonphanEvosAttacks: + db 0 ; no more evolutions + dbw 1, HORN_ATTACK + dbw 1, GROWL + dbw 9, DEFENSE_CURL + dbw 17, FLAIL + dbw 25, FURY_ATTACK + dbw 33, ROLLOUT + dbw 41, RAPID_SPIN + dbw 49, EARTHQUAKE + db 0 ; no more level-up moves + +Porygon2EvosAttacks: + db 0 ; no more evolutions + dbw 1, CONVERSION2 + dbw 1, TACKLE + dbw 1, CONVERSION + dbw 9, AGILITY + dbw 12, PSYBEAM + dbw 20, RECOVER + dbw 24, DEFENSE_CURL + dbw 32, LOCK_ON + dbw 36, TRI_ATTACK + dbw 44, ZAP_CANNON + db 0 ; no more level-up moves + +StantlerEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 8, LEER + dbw 15, HYPNOSIS + dbw 23, STOMP + dbw 31, SAND_ATTACK + dbw 40, TAKE_DOWN + dbw 49, CONFUSE_RAY + db 0 ; no more level-up moves + +SmeargleEvosAttacks: + db 0 ; no more evolutions + dbw 1, SKETCH + dbw 11, SKETCH + dbw 21, SKETCH + dbw 31, SKETCH + dbw 41, SKETCH + dbw 51, SKETCH + dbw 61, SKETCH + dbw 71, SKETCH + dbw 81, SKETCH + dbw 91, SKETCH + db 0 ; no more level-up moves + +TyrogueEvosAttacks: + dbbbw EVOLVE_STAT, 20, ATK_LT_DEF, HITMONCHAN + dbbbw EVOLVE_STAT, 20, ATK_GT_DEF, HITMONLEE + dbbbw EVOLVE_STAT, 20, ATK_EQ_DEF, HITMONTOP + db 0 ; no more evolutions + dbw 1, TACKLE + db 0 ; no more level-up moves + +HitmontopEvosAttacks: + db 0 ; no more evolutions + dbw 1, ROLLING_KICK + dbw 7, FOCUS_ENERGY + dbw 13, PURSUIT + dbw 19, QUICK_ATTACK + dbw 25, RAPID_SPIN + dbw 31, COUNTER + dbw 37, AGILITY + dbw 43, DETECT + dbw 49, TRIPLE_KICK + db 0 ; no more level-up moves + +SmoochumEvosAttacks: + dbbw EVOLVE_LEVEL, 30, JYNX + db 0 ; no more evolutions + dbw 1, POUND + dbw 1, LICK + dbw 9, SWEET_KISS + dbw 13, POWDER_SNOW + dbw 21, CONFUSION + dbw 25, SING + dbw 33, MEAN_LOOK + dbw 37, PSYCHIC_M + dbw 45, PERISH_SONG + dbw 49, BLIZZARD + db 0 ; no more level-up moves + +ElekidEvosAttacks: + dbbw EVOLVE_LEVEL, 30, ELECTABUZZ + db 0 ; no more evolutions + dbw 1, QUICK_ATTACK + dbw 1, LEER + dbw 9, THUNDERPUNCH + dbw 17, LIGHT_SCREEN + dbw 25, SWIFT + dbw 33, SCREECH + dbw 41, THUNDERBOLT + dbw 49, THUNDER + db 0 ; no more level-up moves + +MagbyEvosAttacks: + dbbw EVOLVE_LEVEL, 30, MAGMAR + db 0 ; no more evolutions + dbw 1, EMBER + dbw 7, LEER + dbw 13, SMOG + dbw 19, FIRE_PUNCH + dbw 25, SMOKESCREEN + dbw 31, SUNNY_DAY + dbw 37, FLAMETHROWER + dbw 43, CONFUSE_RAY + dbw 49, FIRE_BLAST + db 0 ; no more level-up moves + +MiltankEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 4, GROWL + dbw 8, DEFENSE_CURL + dbw 13, STOMP + dbw 19, MILK_DRINK + dbw 26, BIDE + dbw 34, ROLLOUT + dbw 43, BODY_SLAM + dbw 53, HEAL_BELL + db 0 ; no more level-up moves + +BlisseyEvosAttacks: + db 0 ; no more evolutions + dbw 1, POUND + dbw 4, GROWL + dbw 7, TAIL_WHIP + dbw 10, SOFTBOILED + dbw 13, DOUBLESLAP + dbw 18, MINIMIZE + dbw 23, SING + dbw 28, EGG_BOMB + dbw 33, DEFENSE_CURL + dbw 40, LIGHT_SCREEN + dbw 47, DOUBLE_EDGE + db 0 ; no more level-up moves + +RaikouEvosAttacks: + db 0 ; no more evolutions + dbw 1, BITE + dbw 1, LEER + dbw 11, THUNDERSHOCK + dbw 21, ROAR + dbw 31, QUICK_ATTACK + dbw 41, SPARK + dbw 51, REFLECT + dbw 61, CRUNCH + dbw 71, THUNDER + db 0 ; no more level-up moves + +EnteiEvosAttacks: + db 0 ; no more evolutions + dbw 1, BITE + dbw 1, LEER + dbw 11, EMBER + dbw 21, ROAR + dbw 31, FIRE_SPIN + dbw 41, STOMP + dbw 51, FLAMETHROWER + dbw 61, SWAGGER + dbw 71, FIRE_BLAST + db 0 ; no more level-up moves + +SuicuneEvosAttacks: + db 0 ; no more evolutions + dbw 1, BITE + dbw 1, LEER + dbw 11, BUBBLEBEAM + dbw 21, RAIN_DANCE + dbw 31, GUST + dbw 41, AURORA_BEAM + dbw 51, MIST + dbw 61, MIRROR_COAT + dbw 71, HYDRO_PUMP + db 0 ; no more level-up moves + +LarvitarEvosAttacks: + dbbw EVOLVE_LEVEL, 30, PUPITAR + db 0 ; no more evolutions + dbw 1, BITE + dbw 1, LEER + dbw 8, SANDSTORM + dbw 15, SCREECH + dbw 22, ROCK_SLIDE + dbw 29, THRASH + dbw 36, SCARY_FACE + dbw 43, CRUNCH + dbw 50, EARTHQUAKE + dbw 57, HYPER_BEAM + db 0 ; no more level-up moves + +PupitarEvosAttacks: + dbbw EVOLVE_LEVEL, 55, TYRANITAR + db 0 ; no more evolutions + dbw 1, BITE + dbw 1, LEER + dbw 1, SANDSTORM + dbw 1, SCREECH + dbw 8, SANDSTORM + dbw 15, SCREECH + dbw 22, ROCK_SLIDE + dbw 29, THRASH + dbw 38, SCARY_FACE + dbw 47, CRUNCH + dbw 56, EARTHQUAKE + dbw 65, HYPER_BEAM + db 0 ; no more level-up moves + +TyranitarEvosAttacks: + db 0 ; no more evolutions + dbw 1, BITE + dbw 1, LEER + dbw 1, SANDSTORM + dbw 1, SCREECH + dbw 8, SANDSTORM + dbw 15, SCREECH + dbw 22, ROCK_SLIDE + dbw 29, THRASH + dbw 38, SCARY_FACE + dbw 47, CRUNCH + dbw 61, EARTHQUAKE + dbw 75, HYPER_BEAM + db 0 ; no more level-up moves + +LugiaEvosAttacks: + db 0 ; no more evolutions + dbw 1, AEROBLAST + dbw 11, SAFEGUARD + dbw 22, GUST + dbw 33, RECOVER + dbw 44, HYDRO_PUMP + dbw 55, RAIN_DANCE + dbw 66, SWIFT + dbw 77, WHIRLWIND + dbw 88, ANCIENTPOWER + dbw 99, FUTURE_SIGHT + db 0 ; no more level-up moves + +HoOhEvosAttacks: + db 0 ; no more evolutions + dbw 1, SACRED_FIRE + dbw 11, SAFEGUARD + dbw 22, GUST + dbw 33, RECOVER + dbw 44, FIRE_BLAST + dbw 55, SUNNY_DAY + dbw 66, SWIFT + dbw 77, WHIRLWIND + dbw 88, ANCIENTPOWER + dbw 99, FUTURE_SIGHT + db 0 ; no more level-up moves + +CelebiEvosAttacks: + db 0 ; no more evolutions + dbw 1, LEECH_SEED + dbw 1, CONFUSION + dbw 1, RECOVER + dbw 1, HEAL_BELL + dbw 10, SAFEGUARD + dbw 20, ANCIENTPOWER + dbw 30, FUTURE_SIGHT + dbw 40, BATON_PASS + dbw 50, PERISH_SONG + db 0 ; no more level-up moves diff --git a/data/pokemon/evos_attacks_kanto.asm b/data/pokemon/evos_attacks_kanto.asm new file mode 100644 index 0000000..5ac56d2 --- /dev/null +++ b/data/pokemon/evos_attacks_kanto.asm @@ -0,0 +1,2195 @@ +SECTION "Evolutions and Attacks 1", ROMX + +EvosAttacksPointers1:: + dw BulbasaurEvosAttacks + dw IvysaurEvosAttacks + dw VenusaurEvosAttacks + dw CharmanderEvosAttacks + dw CharmeleonEvosAttacks + dw CharizardEvosAttacks + dw SquirtleEvosAttacks + dw WartortleEvosAttacks + dw BlastoiseEvosAttacks + dw CaterpieEvosAttacks + dw MetapodEvosAttacks + dw ButterfreeEvosAttacks + dw WeedleEvosAttacks + dw KakunaEvosAttacks + dw BeedrillEvosAttacks + dw PidgeyEvosAttacks + dw PidgeottoEvosAttacks + dw PidgeotEvosAttacks + dw RattataEvosAttacks + dw RaticateEvosAttacks + dw SpearowEvosAttacks + dw FearowEvosAttacks + dw EkansEvosAttacks + dw ArbokEvosAttacks + dw PikachuEvosAttacks + dw RaichuEvosAttacks + dw SandshrewEvosAttacks + dw SandslashEvosAttacks + dw NidoranFEvosAttacks + dw NidorinaEvosAttacks + dw NidoqueenEvosAttacks + dw NidoranMEvosAttacks + dw NidorinoEvosAttacks + dw NidokingEvosAttacks + dw ClefairyEvosAttacks + dw ClefableEvosAttacks + dw VulpixEvosAttacks + dw NinetalesEvosAttacks + dw JigglypuffEvosAttacks + dw WigglytuffEvosAttacks + dw ZubatEvosAttacks + dw GolbatEvosAttacks + dw OddishEvosAttacks + dw GloomEvosAttacks + dw VileplumeEvosAttacks + dw ParasEvosAttacks + dw ParasectEvosAttacks + dw VenonatEvosAttacks + dw VenomothEvosAttacks + dw DiglettEvosAttacks + dw DugtrioEvosAttacks + dw MeowthEvosAttacks + dw PersianEvosAttacks + dw PsyduckEvosAttacks + dw GolduckEvosAttacks + dw MankeyEvosAttacks + dw PrimeapeEvosAttacks + dw GrowlitheEvosAttacks + dw ArcanineEvosAttacks + dw PoliwagEvosAttacks + dw PoliwhirlEvosAttacks + dw PoliwrathEvosAttacks + dw AbraEvosAttacks + dw KadabraEvosAttacks + dw AlakazamEvosAttacks + dw MachopEvosAttacks + dw MachokeEvosAttacks + dw MachampEvosAttacks + dw BellsproutEvosAttacks + dw WeepinbellEvosAttacks + dw VictreebelEvosAttacks + dw TentacoolEvosAttacks + dw TentacruelEvosAttacks + dw GeodudeEvosAttacks + dw GravelerEvosAttacks + dw GolemEvosAttacks + dw PonytaEvosAttacks + dw RapidashEvosAttacks + dw SlowpokeEvosAttacks + dw SlowbroEvosAttacks + dw MagnemiteEvosAttacks + dw MagnetonEvosAttacks + dw FarfetchDEvosAttacks + dw DoduoEvosAttacks + dw DodrioEvosAttacks + dw SeelEvosAttacks + dw DewgongEvosAttacks + dw GrimerEvosAttacks + dw MukEvosAttacks + dw ShellderEvosAttacks + dw CloysterEvosAttacks + dw GastlyEvosAttacks + dw HaunterEvosAttacks + dw GengarEvosAttacks + dw OnixEvosAttacks + dw DrowzeeEvosAttacks + dw HypnoEvosAttacks + dw KrabbyEvosAttacks + dw KinglerEvosAttacks + dw VoltorbEvosAttacks + dw ElectrodeEvosAttacks + dw ExeggcuteEvosAttacks + dw ExeggutorEvosAttacks + dw CuboneEvosAttacks + dw MarowakEvosAttacks + dw HitmonleeEvosAttacks + dw HitmonchanEvosAttacks + dw LickitungEvosAttacks + dw KoffingEvosAttacks + dw WeezingEvosAttacks + dw RhyhornEvosAttacks + dw RhydonEvosAttacks + dw ChanseyEvosAttacks + dw TangelaEvosAttacks + dw KangaskhanEvosAttacks + dw HorseaEvosAttacks + dw SeadraEvosAttacks + dw GoldeenEvosAttacks + dw SeakingEvosAttacks + dw StaryuEvosAttacks + dw StarmieEvosAttacks + dw MrMimeEvosAttacks + dw ScytherEvosAttacks + dw JynxEvosAttacks + dw ElectabuzzEvosAttacks + dw MagmarEvosAttacks + dw PinsirEvosAttacks + dw TaurosEvosAttacks + dw MagikarpEvosAttacks + dw GyaradosEvosAttacks + dw LaprasEvosAttacks + dw DittoEvosAttacks + dw EeveeEvosAttacks + dw VaporeonEvosAttacks + dw JolteonEvosAttacks + dw FlareonEvosAttacks + dw PorygonEvosAttacks + dw OmanyteEvosAttacks + dw OmastarEvosAttacks + dw KabutoEvosAttacks + dw KabutopsEvosAttacks + dw AerodactylEvosAttacks + dw SnorlaxEvosAttacks + dw ArticunoEvosAttacks + dw ZapdosEvosAttacks + dw MoltresEvosAttacks + dw DratiniEvosAttacks + dw DragonairEvosAttacks + dw DragoniteEvosAttacks + dw MewtwoEvosAttacks + dw MewEvosAttacks +.IndirectEnd:: + +BulbasaurEvosAttacks: + dbbw EVOLVE_LEVEL, 16, IVYSAUR + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 4, GROWL + dbw 7, LEECH_SEED + dbw 10, VINE_WHIP + dbw 15, POISONPOWDER + dbw 15, SLEEP_POWDER + dbw 20, RAZOR_LEAF + dbw 25, SWEET_SCENT + dbw 32, GROWTH + dbw 39, SYNTHESIS + dbw 46, SOLARBEAM + db 0 ; no more level-up moves + +IvysaurEvosAttacks: + dbbw EVOLVE_LEVEL, 32, VENUSAUR + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 1, LEECH_SEED + dbw 4, GROWL + dbw 7, LEECH_SEED + dbw 10, VINE_WHIP + dbw 15, POISONPOWDER + dbw 15, SLEEP_POWDER + dbw 22, RAZOR_LEAF + dbw 29, SWEET_SCENT + dbw 38, GROWTH + dbw 47, SYNTHESIS + dbw 56, SOLARBEAM + db 0 ; no more level-up moves + +VenusaurEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 1, LEECH_SEED + dbw 1, VINE_WHIP + dbw 4, GROWL + dbw 7, LEECH_SEED + dbw 10, VINE_WHIP + dbw 15, POISONPOWDER + dbw 15, SLEEP_POWDER + dbw 22, RAZOR_LEAF + dbw 29, SWEET_SCENT + dbw 41, GROWTH + dbw 53, SYNTHESIS + dbw 65, SOLARBEAM + db 0 ; no more level-up moves + +CharmanderEvosAttacks: + dbbw EVOLVE_LEVEL, 16, CHARMELEON + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, GROWL + dbw 7, EMBER + dbw 13, SMOKESCREEN + dbw 19, RAGE + dbw 25, SCARY_FACE + dbw 31, FLAMETHROWER + dbw 37, SLASH + dbw 43, DRAGON_RAGE + dbw 49, FIRE_SPIN + db 0 ; no more level-up moves + +CharmeleonEvosAttacks: + dbbw EVOLVE_LEVEL, 36, CHARIZARD + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, GROWL + dbw 1, EMBER + dbw 7, EMBER + dbw 13, SMOKESCREEN + dbw 20, RAGE + dbw 27, SCARY_FACE + dbw 34, FLAMETHROWER + dbw 41, SLASH + dbw 48, DRAGON_RAGE + dbw 55, FIRE_SPIN + db 0 ; no more level-up moves + +CharizardEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, GROWL + dbw 1, EMBER + dbw 1, SMOKESCREEN + dbw 7, EMBER + dbw 13, SMOKESCREEN + dbw 20, RAGE + dbw 27, SCARY_FACE + dbw 34, FLAMETHROWER + dbw 36, WING_ATTACK + dbw 44, SLASH + dbw 54, DRAGON_RAGE + dbw 64, FIRE_SPIN + db 0 ; no more level-up moves + +SquirtleEvosAttacks: + dbbw EVOLVE_LEVEL, 16, WARTORTLE + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 4, TAIL_WHIP + dbw 7, BUBBLE + dbw 10, WITHDRAW + dbw 13, WATER_GUN + dbw 18, BITE + dbw 23, RAPID_SPIN + dbw 28, PROTECT + dbw 33, RAIN_DANCE + dbw 40, SKULL_BASH + dbw 47, HYDRO_PUMP + db 0 ; no more level-up moves + +WartortleEvosAttacks: + dbbw EVOLVE_LEVEL, 36, BLASTOISE + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, TAIL_WHIP + dbw 1, BUBBLE + dbw 4, TAIL_WHIP + dbw 7, BUBBLE + dbw 10, WITHDRAW + dbw 13, WATER_GUN + dbw 19, BITE + dbw 25, RAPID_SPIN + dbw 31, PROTECT + dbw 37, RAIN_DANCE + dbw 45, SKULL_BASH + dbw 53, HYDRO_PUMP + db 0 ; no more level-up moves + +BlastoiseEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, TAIL_WHIP + dbw 1, BUBBLE + dbw 1, WITHDRAW + dbw 4, TAIL_WHIP + dbw 7, BUBBLE + dbw 10, WITHDRAW + dbw 13, WATER_GUN + dbw 19, BITE + dbw 25, RAPID_SPIN + dbw 31, PROTECT + dbw 42, RAIN_DANCE + dbw 55, SKULL_BASH + dbw 68, HYDRO_PUMP + db 0 ; no more level-up moves + +CaterpieEvosAttacks: + dbbw EVOLVE_LEVEL, 7, METAPOD + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, STRING_SHOT + db 0 ; no more level-up moves + +MetapodEvosAttacks: + dbbw EVOLVE_LEVEL, 10, BUTTERFREE + db 0 ; no more evolutions + dbw 1, HARDEN + dbw 7, HARDEN + db 0 ; no more level-up moves + +ButterfreeEvosAttacks: + db 0 ; no more evolutions + dbw 1, CONFUSION + dbw 10, CONFUSION + dbw 13, POISONPOWDER + dbw 14, STUN_SPORE + dbw 15, SLEEP_POWDER + dbw 18, SUPERSONIC + dbw 23, WHIRLWIND + dbw 28, GUST + dbw 34, PSYBEAM + dbw 40, SAFEGUARD + db 0 ; no more level-up moves + +WeedleEvosAttacks: + dbbw EVOLVE_LEVEL, 7, KAKUNA + db 0 ; no more evolutions + dbw 1, POISON_STING + dbw 1, STRING_SHOT + db 0 ; no more level-up moves + +KakunaEvosAttacks: + dbbw EVOLVE_LEVEL, 10, BEEDRILL + db 0 ; no more evolutions + dbw 1, HARDEN + dbw 7, HARDEN + db 0 ; no more level-up moves + +BeedrillEvosAttacks: + db 0 ; no more evolutions + dbw 1, FURY_ATTACK + dbw 10, FURY_ATTACK + dbw 15, FOCUS_ENERGY + dbw 20, TWINEEDLE + dbw 25, RAGE + dbw 30, PURSUIT + dbw 35, PIN_MISSILE + dbw 40, AGILITY + db 0 ; no more level-up moves + +PidgeyEvosAttacks: + dbbw EVOLVE_LEVEL, 18, PIDGEOTTO + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 5, SAND_ATTACK + dbw 9, GUST + dbw 15, QUICK_ATTACK + dbw 21, WHIRLWIND + dbw 29, WING_ATTACK + dbw 37, AGILITY + dbw 47, MIRROR_MOVE + db 0 ; no more level-up moves + +PidgeottoEvosAttacks: + dbbw EVOLVE_LEVEL, 36, PIDGEOT + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, SAND_ATTACK + dbw 1, GUST + dbw 5, SAND_ATTACK + dbw 9, GUST + dbw 15, QUICK_ATTACK + dbw 23, WHIRLWIND + dbw 33, WING_ATTACK + dbw 43, AGILITY + dbw 55, MIRROR_MOVE + db 0 ; no more level-up moves + +PidgeotEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, SAND_ATTACK + dbw 1, GUST + dbw 1, QUICK_ATTACK + dbw 5, SAND_ATTACK + dbw 9, GUST + dbw 15, QUICK_ATTACK + dbw 23, WHIRLWIND + dbw 33, WING_ATTACK + dbw 46, AGILITY + dbw 61, MIRROR_MOVE + db 0 ; no more level-up moves + +RattataEvosAttacks: + dbbw EVOLVE_LEVEL, 20, RATICATE + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, TAIL_WHIP + dbw 7, QUICK_ATTACK + dbw 13, HYPER_FANG + dbw 20, FOCUS_ENERGY + dbw 27, PURSUIT + dbw 34, SUPER_FANG + db 0 ; no more level-up moves + +RaticateEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, TAIL_WHIP + dbw 1, QUICK_ATTACK + dbw 7, QUICK_ATTACK + dbw 13, HYPER_FANG + dbw 20, SCARY_FACE + dbw 30, PURSUIT + dbw 40, SUPER_FANG + db 0 ; no more level-up moves + +SpearowEvosAttacks: + dbbw EVOLVE_LEVEL, 20, FEAROW + db 0 ; no more evolutions + dbw 1, PECK + dbw 1, GROWL + dbw 7, LEER + dbw 13, FURY_ATTACK + dbw 25, PURSUIT + dbw 31, MIRROR_MOVE + dbw 37, DRILL_PECK + dbw 43, AGILITY + db 0 ; no more level-up moves + +FearowEvosAttacks: + db 0 ; no more evolutions + dbw 1, PECK + dbw 1, GROWL + dbw 1, LEER + dbw 1, FURY_ATTACK + dbw 7, LEER + dbw 13, FURY_ATTACK + dbw 26, PURSUIT + dbw 32, MIRROR_MOVE + dbw 40, DRILL_PECK + dbw 47, AGILITY + db 0 ; no more level-up moves + +EkansEvosAttacks: + dbbw EVOLVE_LEVEL, 22, ARBOK + db 0 ; no more evolutions + dbw 1, WRAP + dbw 1, LEER + dbw 9, POISON_STING + dbw 15, BITE + dbw 23, GLARE + dbw 29, SCREECH + dbw 37, ACID + dbw 43, HAZE + db 0 ; no more level-up moves + +ArbokEvosAttacks: + db 0 ; no more evolutions + dbw 1, WRAP + dbw 1, LEER + dbw 1, POISON_STING + dbw 1, BITE + dbw 9, POISON_STING + dbw 15, BITE + dbw 25, GLARE + dbw 33, SCREECH + dbw 43, ACID + dbw 51, HAZE + db 0 ; no more level-up moves + +PikachuEvosAttacks: + dbbw EVOLVE_ITEM, THUNDERSTONE, RAICHU + db 0 ; no more evolutions + dbw 1, THUNDERSHOCK + dbw 1, GROWL + dbw 6, TAIL_WHIP + dbw 8, THUNDER_WAVE + dbw 11, QUICK_ATTACK + dbw 15, DOUBLE_TEAM + dbw 20, SLAM + dbw 26, THUNDERBOLT + dbw 33, AGILITY + dbw 41, THUNDER + dbw 50, LIGHT_SCREEN + db 0 ; no more level-up moves + +RaichuEvosAttacks: + db 0 ; no more evolutions + dbw 1, THUNDERSHOCK + dbw 1, TAIL_WHIP + dbw 1, QUICK_ATTACK + dbw 1, THUNDERBOLT + db 0 ; no more level-up moves + +SandshrewEvosAttacks: + dbbw EVOLVE_LEVEL, 22, SANDSLASH + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 6, DEFENSE_CURL + dbw 11, SAND_ATTACK + dbw 17, POISON_STING + dbw 23, SLASH + dbw 30, SWIFT + dbw 37, FURY_SWIPES + dbw 45, SANDSTORM + db 0 ; no more level-up moves + +SandslashEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, DEFENSE_CURL + dbw 1, SAND_ATTACK + dbw 6, DEFENSE_CURL + dbw 11, SAND_ATTACK + dbw 17, POISON_STING + dbw 24, SLASH + dbw 33, SWIFT + dbw 42, FURY_SWIPES + dbw 52, SANDSTORM + db 0 ; no more level-up moves + +NidoranFEvosAttacks: + dbbw EVOLVE_LEVEL, 16, NIDORINA + db 0 ; no more evolutions + dbw 1, GROWL + dbw 1, TACKLE + dbw 8, SCRATCH + dbw 12, DOUBLE_KICK + dbw 17, POISON_STING + dbw 23, TAIL_WHIP + dbw 30, BITE + dbw 38, FURY_SWIPES + db 0 ; no more level-up moves + +NidorinaEvosAttacks: + dbbw EVOLVE_ITEM, MOON_STONE, NIDOQUEEN + db 0 ; no more evolutions + dbw 1, GROWL + dbw 1, TACKLE + dbw 8, SCRATCH + dbw 12, DOUBLE_KICK + dbw 19, POISON_STING + dbw 27, TAIL_WHIP + dbw 36, BITE + dbw 46, FURY_SWIPES + db 0 ; no more level-up moves + +NidoqueenEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, SCRATCH + dbw 1, DOUBLE_KICK + dbw 1, TAIL_WHIP + dbw 23, BODY_SLAM + db 0 ; no more level-up moves + +NidoranMEvosAttacks: + dbbw EVOLVE_LEVEL, 16, NIDORINO + db 0 ; no more evolutions + dbw 1, LEER + dbw 1, TACKLE + dbw 8, HORN_ATTACK + dbw 12, DOUBLE_KICK + dbw 17, POISON_STING + dbw 23, FOCUS_ENERGY + dbw 30, FURY_ATTACK + dbw 38, HORN_DRILL + db 0 ; no more level-up moves + +NidorinoEvosAttacks: + dbbw EVOLVE_ITEM, MOON_STONE, NIDOKING + db 0 ; no more evolutions + dbw 1, LEER + dbw 1, TACKLE + dbw 8, HORN_ATTACK + dbw 12, DOUBLE_KICK + dbw 19, POISON_STING + dbw 27, FOCUS_ENERGY + dbw 36, FURY_ATTACK + dbw 46, HORN_DRILL + db 0 ; no more level-up moves + +NidokingEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, HORN_ATTACK + dbw 1, DOUBLE_KICK + dbw 1, POISON_STING + dbw 23, THRASH + db 0 ; no more level-up moves + +ClefairyEvosAttacks: + dbbw EVOLVE_ITEM, MOON_STONE, CLEFABLE + db 0 ; no more evolutions + dbw 1, POUND + dbw 1, GROWL + dbw 4, ENCORE + dbw 8, SING + dbw 13, DOUBLESLAP + dbw 19, MINIMIZE + dbw 26, DEFENSE_CURL + dbw 34, METRONOME + dbw 43, MOONLIGHT + dbw 53, LIGHT_SCREEN + db 0 ; no more level-up moves + +ClefableEvosAttacks: + db 0 ; no more evolutions + dbw 1, SING + dbw 1, DOUBLESLAP + dbw 1, METRONOME + dbw 1, MOONLIGHT + db 0 ; no more level-up moves + +VulpixEvosAttacks: + dbbw EVOLVE_ITEM, FIRE_STONE, NINETALES + db 0 ; no more evolutions + dbw 1, EMBER + dbw 1, TAIL_WHIP + dbw 7, QUICK_ATTACK + dbw 13, ROAR + dbw 19, CONFUSE_RAY + dbw 25, SAFEGUARD + dbw 31, FLAMETHROWER + dbw 37, FIRE_SPIN + db 0 ; no more level-up moves + +NinetalesEvosAttacks: + db 0 ; no more evolutions + dbw 1, EMBER + dbw 1, QUICK_ATTACK + dbw 1, CONFUSE_RAY + dbw 1, SAFEGUARD + dbw 43, FIRE_SPIN + db 0 ; no more level-up moves + +JigglypuffEvosAttacks: + dbbw EVOLVE_ITEM, MOON_STONE, WIGGLYTUFF + db 0 ; no more evolutions + dbw 1, SING + dbw 4, DEFENSE_CURL + dbw 9, POUND + dbw 14, DISABLE + dbw 19, ROLLOUT + dbw 24, DOUBLESLAP + dbw 29, REST + dbw 34, BODY_SLAM + dbw 39, DOUBLE_EDGE + db 0 ; no more level-up moves + +WigglytuffEvosAttacks: + db 0 ; no more evolutions + dbw 1, SING + dbw 1, DISABLE + dbw 1, DEFENSE_CURL + dbw 1, DOUBLESLAP + db 0 ; no more level-up moves + +ZubatEvosAttacks: + dbbw EVOLVE_LEVEL, 22, GOLBAT + db 0 ; no more evolutions + dbw 1, LEECH_LIFE + dbw 6, SUPERSONIC + dbw 12, BITE + dbw 19, CONFUSE_RAY + dbw 27, WING_ATTACK + dbw 36, MEAN_LOOK + dbw 46, HAZE + db 0 ; no more level-up moves + +GolbatEvosAttacks: + dbbw EVOLVE_HAPPINESS, TR_ANYTIME, CROBAT + db 0 ; no more evolutions + dbw 1, SCREECH + dbw 1, LEECH_LIFE + dbw 1, SUPERSONIC + dbw 6, SUPERSONIC + dbw 12, BITE + dbw 19, CONFUSE_RAY + dbw 30, WING_ATTACK + dbw 42, MEAN_LOOK + dbw 55, HAZE + db 0 ; no more level-up moves + +OddishEvosAttacks: + dbbw EVOLVE_LEVEL, 21, GLOOM + db 0 ; no more evolutions + dbw 1, ABSORB + dbw 7, SWEET_SCENT + dbw 14, POISONPOWDER + dbw 16, STUN_SPORE + dbw 18, SLEEP_POWDER + dbw 23, ACID + dbw 32, MOONLIGHT + dbw 39, PETAL_DANCE + db 0 ; no more level-up moves + +GloomEvosAttacks: + dbbw EVOLVE_ITEM, LEAF_STONE, VILEPLUME + dbbw EVOLVE_ITEM, SUN_STONE, BELLOSSOM + db 0 ; no more evolutions + dbw 1, ABSORB + dbw 1, SWEET_SCENT + dbw 1, POISONPOWDER + dbw 7, SWEET_SCENT + dbw 14, POISONPOWDER + dbw 16, STUN_SPORE + dbw 18, SLEEP_POWDER + dbw 24, ACID + dbw 35, MOONLIGHT + dbw 44, PETAL_DANCE + db 0 ; no more level-up moves + +VileplumeEvosAttacks: + db 0 ; no more evolutions + dbw 1, ABSORB + dbw 1, SWEET_SCENT + dbw 1, STUN_SPORE + dbw 1, PETAL_DANCE + db 0 ; no more level-up moves + +ParasEvosAttacks: + dbbw EVOLVE_LEVEL, 24, PARASECT + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 7, STUN_SPORE + dbw 13, POISONPOWDER + dbw 19, LEECH_LIFE + dbw 25, SPORE + dbw 31, SLASH + dbw 37, GROWTH + dbw 43, GIGA_DRAIN + db 0 ; no more level-up moves + +ParasectEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, STUN_SPORE + dbw 1, POISONPOWDER + dbw 7, STUN_SPORE + dbw 13, POISONPOWDER + dbw 19, LEECH_LIFE + dbw 28, SPORE + dbw 37, SLASH + dbw 46, GROWTH + dbw 55, GIGA_DRAIN + db 0 ; no more level-up moves + +VenonatEvosAttacks: + dbbw EVOLVE_LEVEL, 31, VENOMOTH + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, DISABLE + dbw 1, FORESIGHT + dbw 9, SUPERSONIC + dbw 17, CONFUSION + dbw 20, POISONPOWDER + dbw 25, LEECH_LIFE + dbw 28, STUN_SPORE + dbw 33, PSYBEAM + dbw 36, SLEEP_POWDER + dbw 41, PSYCHIC_M + db 0 ; no more level-up moves + +VenomothEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, DISABLE + dbw 1, FORESIGHT + dbw 1, SUPERSONIC + dbw 9, SUPERSONIC + dbw 17, CONFUSION + dbw 20, POISONPOWDER + dbw 25, LEECH_LIFE + dbw 28, STUN_SPORE + dbw 31, GUST + dbw 36, PSYBEAM + dbw 42, SLEEP_POWDER + dbw 52, PSYCHIC_M + db 0 ; no more level-up moves + +DiglettEvosAttacks: + dbbw EVOLVE_LEVEL, 26, DUGTRIO + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 5, GROWL + dbw 9, MAGNITUDE + dbw 17, DIG + dbw 25, SAND_ATTACK + dbw 33, SLASH + dbw 41, EARTHQUAKE + dbw 49, FISSURE + db 0 ; no more level-up moves + +DugtrioEvosAttacks: + db 0 ; no more evolutions + dbw 1, TRI_ATTACK + dbw 1, SCRATCH + dbw 1, GROWL + dbw 1, MAGNITUDE + dbw 5, GROWL + dbw 9, MAGNITUDE + dbw 17, DIG + dbw 25, SAND_ATTACK + dbw 37, SLASH + dbw 49, EARTHQUAKE + dbw 61, FISSURE + db 0 ; no more level-up moves + +MeowthEvosAttacks: + dbbw EVOLVE_LEVEL, 28, PERSIAN + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, GROWL + dbw 11, BITE + dbw 20, PAY_DAY + dbw 28, FAINT_ATTACK + dbw 35, SCREECH + dbw 41, FURY_SWIPES + dbw 46, SLASH + db 0 ; no more level-up moves + +PersianEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, GROWL + dbw 1, BITE + dbw 11, BITE + dbw 20, PAY_DAY + dbw 29, FAINT_ATTACK + dbw 38, SCREECH + dbw 46, FURY_SWIPES + dbw 53, SLASH + db 0 ; no more level-up moves + +PsyduckEvosAttacks: + dbbw EVOLVE_LEVEL, 33, GOLDUCK + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 5, TAIL_WHIP + dbw 10, DISABLE + dbw 16, CONFUSION + dbw 23, SCREECH + dbw 31, PSYCH_UP + dbw 40, FURY_SWIPES + dbw 50, HYDRO_PUMP + db 0 ; no more level-up moves + +GolduckEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, TAIL_WHIP + dbw 1, DISABLE + dbw 1, CONFUSION + dbw 5, TAIL_WHIP + dbw 10, DISABLE + dbw 16, CONFUSION + dbw 23, SCREECH + dbw 31, PSYCH_UP + dbw 44, FURY_SWIPES + dbw 58, HYDRO_PUMP + db 0 ; no more level-up moves + +MankeyEvosAttacks: + dbbw EVOLVE_LEVEL, 28, PRIMEAPE + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, LEER + dbw 9, LOW_KICK + dbw 15, KARATE_CHOP + dbw 21, FURY_SWIPES + dbw 27, FOCUS_ENERGY + dbw 33, SEISMIC_TOSS + dbw 39, CROSS_CHOP + dbw 45, SCREECH + dbw 51, THRASH + db 0 ; no more level-up moves + +PrimeapeEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, LEER + dbw 1, LOW_KICK + dbw 1, RAGE + dbw 9, LOW_KICK + dbw 15, KARATE_CHOP + dbw 21, FURY_SWIPES + dbw 27, FOCUS_ENERGY + dbw 28, RAGE + dbw 36, SEISMIC_TOSS + dbw 45, CROSS_CHOP + dbw 54, SCREECH + dbw 63, THRASH + db 0 ; no more level-up moves + +GrowlitheEvosAttacks: + dbbw EVOLVE_ITEM, FIRE_STONE, ARCANINE + db 0 ; no more evolutions + dbw 1, BITE + dbw 1, ROAR + dbw 9, EMBER + dbw 18, LEER + dbw 26, TAKE_DOWN + dbw 34, FLAME_WHEEL + dbw 42, AGILITY + dbw 50, FLAMETHROWER + db 0 ; no more level-up moves + +ArcanineEvosAttacks: + db 0 ; no more evolutions + dbw 1, ROAR + dbw 1, LEER + dbw 1, TAKE_DOWN + dbw 1, FLAME_WHEEL + dbw 50, EXTREMESPEED + db 0 ; no more level-up moves + +PoliwagEvosAttacks: + dbbw EVOLVE_LEVEL, 25, POLIWHIRL + db 0 ; no more evolutions + dbw 1, BUBBLE + dbw 7, HYPNOSIS + dbw 13, WATER_GUN + dbw 19, DOUBLESLAP + dbw 25, RAIN_DANCE + dbw 31, BODY_SLAM + dbw 37, BELLY_DRUM + dbw 43, HYDRO_PUMP + db 0 ; no more level-up moves + +PoliwhirlEvosAttacks: + dbbw EVOLVE_ITEM, WATER_STONE, POLIWRATH + dbbw EVOLVE_TRADE, KINGS_ROCK, POLITOED + db 0 ; no more evolutions + dbw 1, BUBBLE + dbw 1, HYPNOSIS + dbw 1, WATER_GUN + dbw 7, HYPNOSIS + dbw 13, WATER_GUN + dbw 19, DOUBLESLAP + dbw 27, RAIN_DANCE + dbw 35, BODY_SLAM + dbw 43, BELLY_DRUM + dbw 51, HYDRO_PUMP + db 0 ; no more level-up moves + +PoliwrathEvosAttacks: + db 0 ; no more evolutions + dbw 1, WATER_GUN + dbw 1, HYPNOSIS + dbw 1, DOUBLESLAP + dbw 1, SUBMISSION + dbw 35, SUBMISSION + dbw 51, MIND_READER + db 0 ; no more level-up moves + +AbraEvosAttacks: + dbbw EVOLVE_LEVEL, 16, KADABRA + db 0 ; no more evolutions + dbw 1, TELEPORT + db 0 ; no more level-up moves + +KadabraEvosAttacks: + dbbw EVOLVE_TRADE, -1, ALAKAZAM + db 0 ; no more evolutions + dbw 1, TELEPORT + dbw 1, KINESIS + dbw 1, CONFUSION + dbw 16, CONFUSION + dbw 18, DISABLE + dbw 21, PSYBEAM + dbw 26, RECOVER + dbw 31, FUTURE_SIGHT + dbw 38, PSYCHIC_M + dbw 45, REFLECT + db 0 ; no more level-up moves + +AlakazamEvosAttacks: + db 0 ; no more evolutions + dbw 1, TELEPORT + dbw 1, KINESIS + dbw 1, CONFUSION + dbw 16, CONFUSION + dbw 18, DISABLE + dbw 21, PSYBEAM + dbw 26, RECOVER + dbw 31, FUTURE_SIGHT + dbw 38, PSYCHIC_M + dbw 45, REFLECT + db 0 ; no more level-up moves + +MachopEvosAttacks: + dbbw EVOLVE_LEVEL, 28, MACHOKE + db 0 ; no more evolutions + dbw 1, LOW_KICK + dbw 1, LEER + dbw 7, FOCUS_ENERGY + dbw 13, KARATE_CHOP + dbw 19, SEISMIC_TOSS + dbw 25, FORESIGHT + dbw 31, VITAL_THROW + dbw 37, CROSS_CHOP + dbw 43, SCARY_FACE + dbw 49, SUBMISSION + db 0 ; no more level-up moves + +MachokeEvosAttacks: + dbbw EVOLVE_TRADE, -1, MACHAMP + db 0 ; no more evolutions + dbw 1, LOW_KICK + dbw 1, LEER + dbw 1, FOCUS_ENERGY + dbw 8, FOCUS_ENERGY + dbw 15, KARATE_CHOP + dbw 19, SEISMIC_TOSS + dbw 25, FORESIGHT + dbw 34, VITAL_THROW + dbw 43, CROSS_CHOP + dbw 52, SCARY_FACE + dbw 61, SUBMISSION + db 0 ; no more level-up moves + +MachampEvosAttacks: + db 0 ; no more evolutions + dbw 1, LOW_KICK + dbw 1, LEER + dbw 1, FOCUS_ENERGY + dbw 8, FOCUS_ENERGY + dbw 15, KARATE_CHOP + dbw 19, SEISMIC_TOSS + dbw 25, FORESIGHT + dbw 34, VITAL_THROW + dbw 43, CROSS_CHOP + dbw 52, SCARY_FACE + dbw 61, SUBMISSION + db 0 ; no more level-up moves + +BellsproutEvosAttacks: + dbbw EVOLVE_LEVEL, 21, WEEPINBELL + db 0 ; no more evolutions + dbw 1, VINE_WHIP + dbw 6, GROWTH + dbw 11, WRAP + dbw 15, SLEEP_POWDER + dbw 17, POISONPOWDER + dbw 19, STUN_SPORE + dbw 23, ACID + dbw 30, SWEET_SCENT + dbw 37, RAZOR_LEAF + dbw 45, SLAM + db 0 ; no more level-up moves + +WeepinbellEvosAttacks: + dbbw EVOLVE_ITEM, LEAF_STONE, VICTREEBEL + db 0 ; no more evolutions + dbw 1, VINE_WHIP + dbw 1, GROWTH + dbw 1, WRAP + dbw 6, GROWTH + dbw 11, WRAP + dbw 15, SLEEP_POWDER + dbw 17, POISONPOWDER + dbw 19, STUN_SPORE + dbw 24, ACID + dbw 33, SWEET_SCENT + dbw 42, RAZOR_LEAF + dbw 54, SLAM + db 0 ; no more level-up moves + +VictreebelEvosAttacks: + db 0 ; no more evolutions + dbw 1, VINE_WHIP + dbw 1, SLEEP_POWDER + dbw 1, SWEET_SCENT + dbw 1, RAZOR_LEAF + db 0 ; no more level-up moves + +TentacoolEvosAttacks: + dbbw EVOLVE_LEVEL, 30, TENTACRUEL + db 0 ; no more evolutions + dbw 1, POISON_STING + dbw 6, SUPERSONIC + dbw 12, CONSTRICT + dbw 19, ACID + dbw 25, BUBBLEBEAM + dbw 30, WRAP + dbw 36, BARRIER + dbw 43, SCREECH + dbw 49, HYDRO_PUMP + db 0 ; no more level-up moves + +TentacruelEvosAttacks: + db 0 ; no more evolutions + dbw 1, POISON_STING + dbw 1, SUPERSONIC + dbw 1, CONSTRICT + dbw 6, SUPERSONIC + dbw 12, CONSTRICT + dbw 19, ACID + dbw 25, BUBBLEBEAM + dbw 30, WRAP + dbw 38, BARRIER + dbw 47, SCREECH + dbw 55, HYDRO_PUMP + db 0 ; no more level-up moves + +GeodudeEvosAttacks: + dbbw EVOLVE_LEVEL, 25, GRAVELER + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 6, DEFENSE_CURL + dbw 11, ROCK_THROW + dbw 16, MAGNITUDE + dbw 21, SELFDESTRUCT + dbw 26, HARDEN + dbw 31, ROLLOUT + dbw 36, EARTHQUAKE + dbw 41, EXPLOSION + db 0 ; no more level-up moves + +GravelerEvosAttacks: + dbbw EVOLVE_TRADE, -1, GOLEM + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, DEFENSE_CURL + dbw 1, ROCK_THROW + dbw 6, DEFENSE_CURL + dbw 11, ROCK_THROW + dbw 16, MAGNITUDE + dbw 21, SELFDESTRUCT + dbw 27, HARDEN + dbw 34, ROLLOUT + dbw 41, EARTHQUAKE + dbw 48, EXPLOSION + db 0 ; no more level-up moves + +GolemEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, DEFENSE_CURL + dbw 1, ROCK_THROW + dbw 1, MAGNITUDE + dbw 6, DEFENSE_CURL + dbw 11, ROCK_THROW + dbw 16, MAGNITUDE + dbw 21, SELFDESTRUCT + dbw 27, HARDEN + dbw 34, ROLLOUT + dbw 41, EARTHQUAKE + dbw 48, EXPLOSION + db 0 ; no more level-up moves + +PonytaEvosAttacks: + dbbw EVOLVE_LEVEL, 40, RAPIDASH + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 4, GROWL + dbw 8, TAIL_WHIP + dbw 13, EMBER + dbw 19, STOMP + dbw 26, FIRE_SPIN + dbw 34, TAKE_DOWN + dbw 43, AGILITY + dbw 53, FIRE_BLAST + db 0 ; no more level-up moves + +RapidashEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, GROWL + dbw 1, TAIL_WHIP + dbw 1, EMBER + dbw 4, GROWL + dbw 8, TAIL_WHIP + dbw 13, EMBER + dbw 19, STOMP + dbw 26, FIRE_SPIN + dbw 34, TAKE_DOWN + dbw 40, FURY_ATTACK + dbw 47, AGILITY + dbw 61, FIRE_BLAST + db 0 ; no more level-up moves + +SlowpokeEvosAttacks: + dbbw EVOLVE_LEVEL, 37, SLOWBRO + dbbw EVOLVE_TRADE, KINGS_ROCK, SLOWKING + db 0 ; no more evolutions + dbw 1, CURSE + dbw 1, TACKLE + dbw 6, GROWL + dbw 15, WATER_GUN + dbw 20, CONFUSION + dbw 29, DISABLE + dbw 34, HEADBUTT + dbw 43, AMNESIA + dbw 48, PSYCHIC_M + db 0 ; no more level-up moves + +SlowbroEvosAttacks: + db 0 ; no more evolutions + dbw 1, CURSE + dbw 1, TACKLE + dbw 1, GROWL + dbw 1, WATER_GUN + dbw 6, GROWL + dbw 15, WATER_GUN + dbw 20, CONFUSION + dbw 29, DISABLE + dbw 34, HEADBUTT + dbw 37, WITHDRAW + dbw 46, AMNESIA + dbw 54, PSYCHIC_M + db 0 ; no more level-up moves + +MagnemiteEvosAttacks: + dbbw EVOLVE_LEVEL, 30, MAGNETON + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 6, THUNDERSHOCK + dbw 11, SUPERSONIC + dbw 16, SONICBOOM + dbw 21, THUNDER_WAVE + dbw 27, LOCK_ON + dbw 33, SWIFT + dbw 39, SCREECH + dbw 45, ZAP_CANNON + db 0 ; no more level-up moves + +MagnetonEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, THUNDERSHOCK + dbw 1, SUPERSONIC + dbw 1, SONICBOOM + dbw 6, THUNDERSHOCK + dbw 11, SUPERSONIC + dbw 16, SONICBOOM + dbw 21, THUNDER_WAVE + dbw 27, LOCK_ON + dbw 35, TRI_ATTACK + dbw 43, SCREECH + dbw 53, ZAP_CANNON + db 0 ; no more level-up moves + +FarfetchDEvosAttacks: + db 0 ; no more evolutions + dbw 1, PECK + dbw 7, SAND_ATTACK + dbw 13, LEER + dbw 19, FURY_ATTACK + dbw 25, SWORDS_DANCE + dbw 31, AGILITY + dbw 37, SLASH + dbw 44, FALSE_SWIPE + db 0 ; no more level-up moves + +DoduoEvosAttacks: + dbbw EVOLVE_LEVEL, 31, DODRIO + db 0 ; no more evolutions + dbw 1, PECK + dbw 1, GROWL + dbw 9, PURSUIT + dbw 13, FURY_ATTACK + dbw 21, TRI_ATTACK + dbw 25, RAGE + dbw 33, DRILL_PECK + dbw 37, AGILITY + db 0 ; no more level-up moves + +DodrioEvosAttacks: + db 0 ; no more evolutions + dbw 1, PECK + dbw 1, GROWL + dbw 1, PURSUIT + dbw 1, FURY_ATTACK + dbw 9, PURSUIT + dbw 13, FURY_ATTACK + dbw 21, TRI_ATTACK + dbw 25, RAGE + dbw 38, DRILL_PECK + dbw 47, AGILITY + db 0 ; no more level-up moves + +SeelEvosAttacks: + dbbw EVOLVE_LEVEL, 34, DEWGONG + db 0 ; no more evolutions + dbw 1, HEADBUTT + dbw 5, GROWL + dbw 16, AURORA_BEAM + dbw 21, REST + dbw 32, TAKE_DOWN + dbw 37, ICE_BEAM + dbw 48, SAFEGUARD + db 0 ; no more level-up moves + +DewgongEvosAttacks: + db 0 ; no more evolutions + dbw 1, HEADBUTT + dbw 1, GROWL + dbw 1, AURORA_BEAM + dbw 5, GROWL + dbw 16, AURORA_BEAM + dbw 21, REST + dbw 32, TAKE_DOWN + dbw 43, ICE_BEAM + dbw 60, SAFEGUARD + db 0 ; no more level-up moves + +GrimerEvosAttacks: + dbbw EVOLVE_LEVEL, 38, MUK + db 0 ; no more evolutions + dbw 1, POISON_GAS + dbw 1, POUND + dbw 5, HARDEN + dbw 10, DISABLE + dbw 16, SLUDGE + dbw 23, MINIMIZE + dbw 31, SCREECH + dbw 40, ACID_ARMOR + dbw 50, SLUDGE_BOMB + db 0 ; no more level-up moves + +MukEvosAttacks: + db 0 ; no more evolutions + dbw 1, POISON_GAS + dbw 1, POUND + dbw 1, HARDEN + dbw 33, HARDEN + dbw 37, DISABLE + dbw 45, SLUDGE + dbw 23, MINIMIZE + dbw 31, SCREECH + dbw 45, ACID_ARMOR + dbw 60, SLUDGE_BOMB + db 0 ; no more level-up moves + +ShellderEvosAttacks: + dbbw EVOLVE_ITEM, WATER_STONE, CLOYSTER + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, WITHDRAW + dbw 9, SUPERSONIC + dbw 17, AURORA_BEAM + dbw 25, PROTECT + dbw 33, LEER + dbw 41, CLAMP + dbw 49, ICE_BEAM + db 0 ; no more level-up moves + +CloysterEvosAttacks: + db 0 ; no more evolutions + dbw 1, WITHDRAW + dbw 1, SUPERSONIC + dbw 1, AURORA_BEAM + dbw 1, PROTECT + dbw 33, SPIKES + dbw 41, SPIKE_CANNON + db 0 ; no more level-up moves + +GastlyEvosAttacks: + dbbw EVOLVE_LEVEL, 25, HAUNTER + db 0 ; no more evolutions + dbw 1, HYPNOSIS + dbw 1, LICK + dbw 8, SPITE + dbw 13, MEAN_LOOK + dbw 16, CURSE + dbw 21, NIGHT_SHADE + dbw 28, CONFUSE_RAY + dbw 33, DREAM_EATER + dbw 36, DESTINY_BOND + db 0 ; no more level-up moves + +HaunterEvosAttacks: + dbbw EVOLVE_TRADE, -1, GENGAR + db 0 ; no more evolutions + dbw 1, HYPNOSIS + dbw 1, LICK + dbw 1, SPITE + dbw 8, SPITE + dbw 13, MEAN_LOOK + dbw 16, CURSE + dbw 21, NIGHT_SHADE + dbw 31, CONFUSE_RAY + dbw 39, DREAM_EATER + dbw 48, DESTINY_BOND + db 0 ; no more level-up moves + +GengarEvosAttacks: + db 0 ; no more evolutions + dbw 1, HYPNOSIS + dbw 1, LICK + dbw 1, SPITE + dbw 8, SPITE + dbw 13, MEAN_LOOK + dbw 16, CURSE + dbw 21, NIGHT_SHADE + dbw 31, CONFUSE_RAY + dbw 39, DREAM_EATER + dbw 48, DESTINY_BOND + db 0 ; no more level-up moves + +OnixEvosAttacks: + dbbw EVOLVE_TRADE, METAL_COAT, STEELIX + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, SCREECH + dbw 10, BIND + dbw 14, ROCK_THROW + dbw 23, HARDEN + dbw 27, RAGE + dbw 36, SANDSTORM + dbw 40, SLAM + db 0 ; no more level-up moves + +DrowzeeEvosAttacks: + dbbw EVOLVE_LEVEL, 26, HYPNO + db 0 ; no more evolutions + dbw 1, POUND + dbw 1, HYPNOSIS + dbw 10, DISABLE + dbw 18, CONFUSION + dbw 25, HEADBUTT + dbw 31, POISON_GAS + dbw 36, MEDITATE + dbw 40, PSYCHIC_M + dbw 43, PSYCH_UP + dbw 45, FUTURE_SIGHT + db 0 ; no more level-up moves + +HypnoEvosAttacks: + db 0 ; no more evolutions + dbw 1, POUND + dbw 1, HYPNOSIS + dbw 1, DISABLE + dbw 1, CONFUSION + dbw 10, DISABLE + dbw 18, CONFUSION + dbw 25, HEADBUTT + dbw 33, POISON_GAS + dbw 40, MEDITATE + dbw 49, PSYCHIC_M + dbw 55, PSYCH_UP + dbw 60, FUTURE_SIGHT + db 0 ; no more level-up moves + +KrabbyEvosAttacks: + dbbw EVOLVE_LEVEL, 28, KINGLER + db 0 ; no more evolutions + dbw 1, BUBBLE + dbw 5, LEER + dbw 12, VICEGRIP + dbw 16, HARDEN + dbw 23, STOMP + dbw 27, GUILLOTINE + dbw 34, PROTECT + dbw 41, CRABHAMMER + db 0 ; no more level-up moves + +KinglerEvosAttacks: + db 0 ; no more evolutions + dbw 1, BUBBLE + dbw 1, LEER + dbw 1, VICEGRIP + dbw 5, LEER + dbw 12, VICEGRIP + dbw 16, HARDEN + dbw 23, STOMP + dbw 27, GUILLOTINE + dbw 38, PROTECT + dbw 49, CRABHAMMER + db 0 ; no more level-up moves + +VoltorbEvosAttacks: + dbbw EVOLVE_LEVEL, 30, ELECTRODE + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 9, SCREECH + dbw 17, SONICBOOM + dbw 23, SELFDESTRUCT + dbw 29, ROLLOUT + dbw 33, LIGHT_SCREEN + dbw 37, SWIFT + dbw 39, EXPLOSION + dbw 41, MIRROR_COAT + db 0 ; no more level-up moves + +ElectrodeEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, SCREECH + dbw 1, SONICBOOM + dbw 1, SELFDESTRUCT + dbw 9, SCREECH + dbw 17, SONICBOOM + dbw 23, SELFDESTRUCT + dbw 29, ROLLOUT + dbw 34, LIGHT_SCREEN + dbw 40, SWIFT + dbw 44, EXPLOSION + dbw 48, MIRROR_COAT + db 0 ; no more level-up moves + +ExeggcuteEvosAttacks: + dbbw EVOLVE_ITEM, LEAF_STONE, EXEGGUTOR + db 0 ; no more evolutions + dbw 1, BARRAGE + dbw 1, HYPNOSIS + dbw 7, REFLECT + dbw 13, LEECH_SEED + dbw 19, CONFUSION + dbw 25, STUN_SPORE + dbw 31, POISONPOWDER + dbw 37, SLEEP_POWDER + dbw 43, SOLARBEAM + db 0 ; no more level-up moves + +ExeggutorEvosAttacks: + db 0 ; no more evolutions + dbw 1, BARRAGE + dbw 1, HYPNOSIS + dbw 1, CONFUSION + dbw 19, STOMP + dbw 31, EGG_BOMB + db 0 ; no more level-up moves + +CuboneEvosAttacks: + dbbw EVOLVE_LEVEL, 28, MAROWAK + db 0 ; no more evolutions + dbw 1, GROWL + dbw 5, TAIL_WHIP + dbw 9, BONE_CLUB + dbw 13, HEADBUTT + dbw 17, LEER + dbw 21, FOCUS_ENERGY + dbw 25, BONEMERANG + dbw 29, RAGE + dbw 33, FALSE_SWIPE + dbw 37, THRASH + dbw 41, BONE_RUSH + db 0 ; no more level-up moves + +MarowakEvosAttacks: + db 0 ; no more evolutions + dbw 1, GROWL + dbw 1, TAIL_WHIP + dbw 1, BONE_CLUB + dbw 1, HEADBUTT + dbw 5, TAIL_WHIP + dbw 9, BONE_CLUB + dbw 13, HEADBUTT + dbw 17, LEER + dbw 21, FOCUS_ENERGY + dbw 25, BONEMERANG + dbw 32, RAGE + dbw 39, FALSE_SWIPE + dbw 46, THRASH + dbw 53, BONE_RUSH + db 0 ; no more level-up moves + +HitmonleeEvosAttacks: + db 0 ; no more evolutions + dbw 1, DOUBLE_KICK + dbw 6, MEDITATE + dbw 11, ROLLING_KICK + dbw 16, JUMP_KICK + dbw 21, FOCUS_ENERGY + dbw 26, HI_JUMP_KICK + dbw 31, MIND_READER + dbw 36, FORESIGHT + dbw 41, ENDURE + dbw 46, MEGA_KICK + dbw 51, REVERSAL + db 0 ; no more level-up moves + +HitmonchanEvosAttacks: + db 0 ; no more evolutions + dbw 1, COMET_PUNCH + dbw 7, AGILITY + dbw 13, PURSUIT + dbw 26, THUNDERPUNCH + dbw 26, ICE_PUNCH + dbw 26, FIRE_PUNCH + dbw 32, MACH_PUNCH + dbw 38, MEGA_PUNCH + dbw 44, DETECT + dbw 50, COUNTER + db 0 ; no more level-up moves + +LickitungEvosAttacks: + db 0 ; no more evolutions + dbw 1, LICK + dbw 7, SUPERSONIC + dbw 13, DEFENSE_CURL + dbw 19, STOMP + dbw 25, WRAP + dbw 31, DISABLE + dbw 37, SLAM + dbw 43, SCREECH + db 0 ; no more level-up moves + +KoffingEvosAttacks: + dbbw EVOLVE_LEVEL, 35, WEEZING + db 0 ; no more evolutions + dbw 1, POISON_GAS + dbw 1, TACKLE + dbw 9, SMOG + dbw 17, SELFDESTRUCT + dbw 21, SLUDGE + dbw 25, SMOKESCREEN + dbw 33, HAZE + dbw 41, EXPLOSION + dbw 45, DESTINY_BOND + db 0 ; no more level-up moves + +WeezingEvosAttacks: + db 0 ; no more evolutions + dbw 1, POISON_GAS + dbw 1, TACKLE + dbw 1, SMOG + dbw 1, SELFDESTRUCT + dbw 9, SMOG + dbw 17, SELFDESTRUCT + dbw 21, SLUDGE + dbw 25, SMOKESCREEN + dbw 33, HAZE + dbw 44, EXPLOSION + dbw 51, DESTINY_BOND + db 0 ; no more level-up moves + +RhyhornEvosAttacks: + dbbw EVOLVE_LEVEL, 42, RHYDON + db 0 ; no more evolutions + dbw 1, HORN_ATTACK + dbw 1, TAIL_WHIP + dbw 13, STOMP + dbw 19, FURY_ATTACK + dbw 31, SCARY_FACE + dbw 37, HORN_DRILL + dbw 49, TAKE_DOWN + dbw 55, EARTHQUAKE + db 0 ; no more level-up moves + +RhydonEvosAttacks: + db 0 ; no more evolutions + dbw 1, HORN_ATTACK + dbw 1, TAIL_WHIP + dbw 1, STOMP + dbw 1, FURY_ATTACK + dbw 13, STOMP + dbw 19, FURY_ATTACK + dbw 31, SCARY_FACE + dbw 37, HORN_DRILL + dbw 54, TAKE_DOWN + dbw 65, EARTHQUAKE + db 0 ; no more level-up moves + +ChanseyEvosAttacks: + dbbw EVOLVE_HAPPINESS, TR_ANYTIME, BLISSEY + db 0 ; no more evolutions + dbw 1, POUND + dbw 5, GROWL + dbw 9, TAIL_WHIP + dbw 13, SOFTBOILED + dbw 17, DOUBLESLAP + dbw 23, MINIMIZE + dbw 29, SING + dbw 35, EGG_BOMB + dbw 41, DEFENSE_CURL + dbw 49, LIGHT_SCREEN + dbw 57, DOUBLE_EDGE + db 0 ; no more level-up moves + +TangelaEvosAttacks: + db 0 ; no more evolutions + dbw 1, CONSTRICT + dbw 4, SLEEP_POWDER + dbw 10, ABSORB + dbw 13, POISONPOWDER + dbw 19, VINE_WHIP + dbw 25, BIND + dbw 31, MEGA_DRAIN + dbw 34, STUN_SPORE + dbw 40, SLAM + dbw 46, GROWTH + db 0 ; no more level-up moves + +KangaskhanEvosAttacks: + db 0 ; no more evolutions + dbw 1, COMET_PUNCH + dbw 7, LEER + dbw 13, BITE + dbw 19, TAIL_WHIP + dbw 25, MEGA_PUNCH + dbw 31, RAGE + dbw 37, ENDURE + dbw 43, DIZZY_PUNCH + dbw 49, REVERSAL + db 0 ; no more level-up moves + +HorseaEvosAttacks: + dbbw EVOLVE_LEVEL, 32, SEADRA + db 0 ; no more evolutions + dbw 1, BUBBLE + dbw 8, SMOKESCREEN + dbw 15, LEER + dbw 22, WATER_GUN + dbw 29, TWISTER + dbw 36, AGILITY + dbw 43, HYDRO_PUMP + db 0 ; no more level-up moves + +SeadraEvosAttacks: + dbbw EVOLVE_TRADE, DRAGON_SCALE, KINGDRA + db 0 ; no more evolutions + dbw 1, BUBBLE + dbw 1, SMOKESCREEN + dbw 1, LEER + dbw 1, WATER_GUN + dbw 8, SMOKESCREEN + dbw 15, LEER + dbw 22, WATER_GUN + dbw 29, TWISTER + dbw 40, AGILITY + dbw 51, HYDRO_PUMP + db 0 ; no more level-up moves + +GoldeenEvosAttacks: + dbbw EVOLVE_LEVEL, 33, SEAKING + db 0 ; no more evolutions + dbw 1, PECK + dbw 1, TAIL_WHIP + dbw 10, SUPERSONIC + dbw 15, HORN_ATTACK + dbw 24, FLAIL + dbw 29, FURY_ATTACK + dbw 38, WATERFALL + dbw 43, HORN_DRILL + dbw 52, AGILITY + db 0 ; no more level-up moves + +SeakingEvosAttacks: + db 0 ; no more evolutions + dbw 1, PECK + dbw 1, TAIL_WHIP + dbw 1, TAIL_WHIP + dbw 10, SUPERSONIC + dbw 15, HORN_ATTACK + dbw 24, FLAIL + dbw 29, FURY_ATTACK + dbw 41, WATERFALL + dbw 49, HORN_DRILL + dbw 61, AGILITY + db 0 ; no more level-up moves + +StaryuEvosAttacks: + dbbw EVOLVE_ITEM, WATER_STONE, STARMIE + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, HARDEN + dbw 7, WATER_GUN + dbw 13, RAPID_SPIN + dbw 19, RECOVER + dbw 25, SWIFT + dbw 31, BUBBLEBEAM + dbw 37, MINIMIZE + dbw 43, LIGHT_SCREEN + dbw 50, HYDRO_PUMP + db 0 ; no more level-up moves + +StarmieEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, RAPID_SPIN + dbw 1, RECOVER + dbw 1, BUBBLEBEAM + dbw 37, CONFUSE_RAY + db 0 ; no more level-up moves + +MrMimeEvosAttacks: + db 0 ; no more evolutions + dbw 1, BARRIER + dbw 6, CONFUSION + dbw 11, SUBSTITUTE + dbw 16, MEDITATE + dbw 21, DOUBLESLAP + dbw 26, LIGHT_SCREEN + dbw 26, REFLECT + dbw 31, ENCORE + dbw 36, PSYBEAM + dbw 41, BATON_PASS + dbw 46, SAFEGUARD + db 0 ; no more level-up moves + +ScytherEvosAttacks: + dbbw EVOLVE_TRADE, METAL_COAT, SCIZOR + db 0 ; no more evolutions + dbw 1, QUICK_ATTACK + dbw 1, LEER + dbw 6, FOCUS_ENERGY + dbw 12, PURSUIT + dbw 18, FALSE_SWIPE + dbw 24, AGILITY + dbw 30, WING_ATTACK + dbw 36, SLASH + dbw 42, SWORDS_DANCE + dbw 48, DOUBLE_TEAM + db 0 ; no more level-up moves + +JynxEvosAttacks: + db 0 ; no more evolutions + dbw 1, POUND + dbw 1, LICK + dbw 1, LOVELY_KISS + dbw 1, POWDER_SNOW + dbw 9, LOVELY_KISS + dbw 13, POWDER_SNOW + dbw 21, DOUBLESLAP + dbw 25, ICE_PUNCH + dbw 35, MEAN_LOOK + dbw 41, BODY_SLAM + dbw 51, PERISH_SONG + dbw 57, BLIZZARD + db 0 ; no more level-up moves + +ElectabuzzEvosAttacks: + db 0 ; no more evolutions + dbw 1, QUICK_ATTACK + dbw 1, LEER + dbw 1, THUNDERPUNCH + dbw 9, THUNDERPUNCH + dbw 17, LIGHT_SCREEN + dbw 25, SWIFT + dbw 36, SCREECH + dbw 47, THUNDERBOLT + dbw 58, THUNDER + db 0 ; no more level-up moves + +MagmarEvosAttacks: + db 0 ; no more evolutions + dbw 1, EMBER + dbw 1, LEER + dbw 1, SMOG + dbw 1, FIRE_PUNCH + dbw 7, LEER + dbw 13, SMOG + dbw 19, FIRE_PUNCH + dbw 25, SMOKESCREEN + dbw 33, SUNNY_DAY + dbw 41, FLAMETHROWER + dbw 49, CONFUSE_RAY + dbw 57, FIRE_BLAST + db 0 ; no more level-up moves + +PinsirEvosAttacks: + db 0 ; no more evolutions + dbw 1, VICEGRIP + dbw 7, FOCUS_ENERGY + dbw 13, BIND + dbw 19, SEISMIC_TOSS + dbw 25, HARDEN + dbw 31, GUILLOTINE + dbw 37, SUBMISSION + dbw 43, SWORDS_DANCE + db 0 ; no more level-up moves + +TaurosEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 4, TAIL_WHIP + dbw 8, RAGE + dbw 13, HORN_ATTACK + dbw 19, SCARY_FACE + dbw 26, PURSUIT + dbw 34, REST + dbw 43, THRASH + dbw 53, TAKE_DOWN + db 0 ; no more level-up moves + +MagikarpEvosAttacks: + dbbw EVOLVE_LEVEL, 20, GYARADOS + db 0 ; no more evolutions + dbw 1, SPLASH + dbw 15, TACKLE + dbw 30, FLAIL + db 0 ; no more level-up moves + +GyaradosEvosAttacks: + db 0 ; no more evolutions + dbw 1, THRASH + dbw 20, BITE + dbw 25, DRAGON_RAGE + dbw 30, LEER + dbw 35, TWISTER + dbw 40, HYDRO_PUMP + dbw 45, RAIN_DANCE + dbw 50, HYPER_BEAM + db 0 ; no more level-up moves + +LaprasEvosAttacks: + db 0 ; no more evolutions + dbw 1, WATER_GUN + dbw 1, GROWL + dbw 1, SING + dbw 8, MIST + dbw 15, BODY_SLAM + dbw 22, CONFUSE_RAY + dbw 29, PERISH_SONG + dbw 36, ICE_BEAM + dbw 43, RAIN_DANCE + dbw 50, SAFEGUARD + dbw 57, HYDRO_PUMP + db 0 ; no more level-up moves + +DittoEvosAttacks: + db 0 ; no more evolutions + dbw 1, TRANSFORM + db 0 ; no more level-up moves + +EeveeEvosAttacks: + dbbw EVOLVE_ITEM, THUNDERSTONE, JOLTEON + dbbw EVOLVE_ITEM, WATER_STONE, VAPOREON + dbbw EVOLVE_ITEM, FIRE_STONE, FLAREON + dbbw EVOLVE_HAPPINESS, TR_MORNDAY, ESPEON + dbbw EVOLVE_HAPPINESS, TR_NITE, UMBREON + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, TAIL_WHIP + dbw 8, SAND_ATTACK + dbw 16, GROWL + dbw 23, QUICK_ATTACK + dbw 30, BITE + dbw 36, BATON_PASS + dbw 42, TAKE_DOWN + db 0 ; no more level-up moves + +VaporeonEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, TAIL_WHIP + dbw 8, SAND_ATTACK + dbw 16, WATER_GUN + dbw 23, QUICK_ATTACK + dbw 30, BITE + dbw 36, AURORA_BEAM + dbw 42, HAZE + dbw 47, ACID_ARMOR + dbw 52, HYDRO_PUMP + db 0 ; no more level-up moves + +JolteonEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, TAIL_WHIP + dbw 8, SAND_ATTACK + dbw 16, THUNDERSHOCK + dbw 23, QUICK_ATTACK + dbw 30, DOUBLE_KICK + dbw 36, PIN_MISSILE + dbw 42, THUNDER_WAVE + dbw 47, AGILITY + dbw 52, THUNDER + db 0 ; no more level-up moves + +FlareonEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 1, TAIL_WHIP + dbw 8, SAND_ATTACK + dbw 16, EMBER + dbw 23, QUICK_ATTACK + dbw 30, BITE + dbw 36, FIRE_SPIN + dbw 42, SMOG + dbw 47, LEER + dbw 52, FLAMETHROWER + db 0 ; no more level-up moves + +PorygonEvosAttacks: + dbbw EVOLVE_TRADE, UP_GRADE, PORYGON2 + db 0 ; no more evolutions + dbw 1, CONVERSION2 + dbw 1, TACKLE + dbw 1, CONVERSION + dbw 9, AGILITY + dbw 12, PSYBEAM + dbw 20, RECOVER + dbw 24, SHARPEN + dbw 32, LOCK_ON + dbw 36, TRI_ATTACK + dbw 44, ZAP_CANNON + db 0 ; no more level-up moves + +OmanyteEvosAttacks: + dbbw EVOLVE_LEVEL, 40, OMASTAR + db 0 ; no more evolutions + dbw 1, CONSTRICT + dbw 1, WITHDRAW + dbw 13, BITE + dbw 19, WATER_GUN + dbw 31, LEER + dbw 37, PROTECT + dbw 49, ANCIENTPOWER + dbw 55, HYDRO_PUMP + db 0 ; no more level-up moves + +OmastarEvosAttacks: + db 0 ; no more evolutions + dbw 1, CONSTRICT + dbw 1, WITHDRAW + dbw 1, BITE + dbw 13, BITE + dbw 19, WATER_GUN + dbw 31, LEER + dbw 37, PROTECT + dbw 40, SPIKE_CANNON + dbw 54, ANCIENTPOWER + dbw 65, HYDRO_PUMP + db 0 ; no more level-up moves + +KabutoEvosAttacks: + dbbw EVOLVE_LEVEL, 40, KABUTOPS + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, HARDEN + dbw 10, ABSORB + dbw 19, LEER + dbw 28, SAND_ATTACK + dbw 37, ENDURE + dbw 46, MEGA_DRAIN + dbw 55, ANCIENTPOWER + db 0 ; no more level-up moves + +KabutopsEvosAttacks: + db 0 ; no more evolutions + dbw 1, SCRATCH + dbw 1, HARDEN + dbw 1, ABSORB + dbw 10, ABSORB + dbw 19, LEER + dbw 28, SAND_ATTACK + dbw 37, ENDURE + dbw 40, SLASH + dbw 51, MEGA_DRAIN + dbw 65, ANCIENTPOWER + db 0 ; no more level-up moves + +AerodactylEvosAttacks: + db 0 ; no more evolutions + dbw 1, WING_ATTACK + dbw 8, AGILITY + dbw 15, BITE + dbw 22, SUPERSONIC + dbw 29, ANCIENTPOWER + dbw 36, SCARY_FACE + dbw 43, TAKE_DOWN + dbw 50, HYPER_BEAM + db 0 ; no more level-up moves + +SnorlaxEvosAttacks: + db 0 ; no more evolutions + dbw 1, TACKLE + dbw 8, AMNESIA + dbw 15, DEFENSE_CURL + dbw 22, BELLY_DRUM + dbw 29, HEADBUTT + dbw 36, SNORE + dbw 36, REST + dbw 43, BODY_SLAM + dbw 50, ROLLOUT + dbw 57, HYPER_BEAM + db 0 ; no more level-up moves + +ArticunoEvosAttacks: + db 0 ; no more evolutions + dbw 1, GUST + dbw 1, POWDER_SNOW + dbw 13, MIST + dbw 25, AGILITY + dbw 37, MIND_READER + dbw 49, ICE_BEAM + dbw 61, REFLECT + dbw 73, BLIZZARD + db 0 ; no more level-up moves + +ZapdosEvosAttacks: + db 0 ; no more evolutions + dbw 1, PECK + dbw 1, THUNDERSHOCK + dbw 13, THUNDER_WAVE + dbw 25, AGILITY + dbw 37, DETECT + dbw 49, DRILL_PECK + dbw 61, LIGHT_SCREEN + dbw 73, THUNDER + db 0 ; no more level-up moves + +MoltresEvosAttacks: + db 0 ; no more evolutions + dbw 1, WING_ATTACK + dbw 1, EMBER + dbw 13, FIRE_SPIN + dbw 25, AGILITY + dbw 37, ENDURE + dbw 49, FLAMETHROWER + dbw 61, SAFEGUARD + dbw 73, SKY_ATTACK + db 0 ; no more level-up moves + +DratiniEvosAttacks: + dbbw EVOLVE_LEVEL, 30, DRAGONAIR + db 0 ; no more evolutions + dbw 1, WRAP + dbw 1, LEER + dbw 8, THUNDER_WAVE + dbw 15, TWISTER + dbw 22, DRAGON_RAGE + dbw 29, SLAM + dbw 36, AGILITY + dbw 43, SAFEGUARD + dbw 50, OUTRAGE + dbw 57, HYPER_BEAM + db 0 ; no more level-up moves + +DragonairEvosAttacks: + dbbw EVOLVE_LEVEL, 55, DRAGONITE + db 0 ; no more evolutions + dbw 1, WRAP + dbw 1, LEER + dbw 1, THUNDER_WAVE + dbw 1, TWISTER + dbw 8, THUNDER_WAVE + dbw 15, TWISTER + dbw 22, DRAGON_RAGE + dbw 29, SLAM + dbw 38, AGILITY + dbw 47, SAFEGUARD + dbw 56, OUTRAGE + dbw 65, HYPER_BEAM + db 0 ; no more level-up moves + +DragoniteEvosAttacks: + db 0 ; no more evolutions + dbw 1, WRAP + dbw 1, LEER + dbw 1, THUNDER_WAVE + dbw 1, TWISTER + dbw 8, THUNDER_WAVE + dbw 15, TWISTER + dbw 22, DRAGON_RAGE + dbw 29, SLAM + dbw 38, AGILITY + dbw 47, SAFEGUARD + dbw 55, WING_ATTACK + dbw 61, OUTRAGE + dbw 75, HYPER_BEAM + db 0 ; no more level-up moves + +MewtwoEvosAttacks: + db 0 ; no more evolutions + dbw 1, CONFUSION + dbw 1, DISABLE + dbw 11, BARRIER + dbw 22, SWIFT + dbw 33, PSYCH_UP + dbw 44, FUTURE_SIGHT + dbw 55, MIST + dbw 66, PSYCHIC_M + dbw 77, AMNESIA + dbw 88, RECOVER + dbw 99, SAFEGUARD + db 0 ; no more level-up moves + +MewEvosAttacks: + db 0 ; no more evolutions + dbw 1, POUND + dbw 10, TRANSFORM + dbw 20, MEGA_PUNCH + dbw 30, METRONOME + dbw 40, PSYCHIC_M + dbw 50, ANCIENTPOWER + db 0 ; no more level-up moves diff --git a/data/pokemon/ezchat_order.asm b/data/pokemon/ezchat_order.asm new file mode 100644 index 0000000..cb9a60d --- /dev/null +++ b/data/pokemon/ezchat_order.asm @@ -0,0 +1,95 @@ +; Every Pokémon sorted by their Japanese names in gojūon order. +; Notably, Rhydon is missing (it should be before Rhyhorn). + +EZChat_SortedPokemon: + dw .a + dw .i + dw .u + dw .e + dw .o + dw .ka_ga + dw .ki_gi + dw .ku_gu + dw .ke_ge + dw .ko_go + dw .sa_za + dw .shi_ji + dw .su_zu + dw .se_ze + dw .so_zo + dw .ta_da + dw .chi_dhi + dw .tsu_du + dw .te_de + dw .to_do + dw .na + dw .ni + dw .nu + dw .ne + dw .no + dw .ha_ba_pa + dw .hi_bi_pi + dw .fu_bu_pu + dw .he_be_pe + dw .ho_bo_po + dw .ma + dw .mi + dw .mu + dw .me + dw .mo + dw .ya + dw .yu + dw .yo + dw .ra + dw .ri + dw .ru + dw .re + dw .ro + dw .wa + dw .end + +.a: db EKANS, ARBOK, SEAKING, ARIADOS, CROCONAW, UNOWN, -1 +.i: db EEVEE, GEODUDE, SPINARAK, PILOSWINE, ONIX, -1 +.u: db ARCANINE, SUDOWOODO, WEEPINBELL, VICTREEBEL, WOOPER, SWINUB, -1 +.e: db SKARMORY, AIPOM, ESPEON, HITMONCHAN, ELEKID, ELECTABUZZ, ENTEI, -1 +.o: db FERALIGATR, FURRET, OCTILLERY, PRIMEAPE, SENTRET, STANTLER, SPEAROW, FEAROW, OMASTAR, OMANYTE, -1 +.ka_ga: db GROWLITHE, MACHAMP, DRAGONITE, PINSIR, SNORLAX, KABUTO, KABUTOPS, HITMONTOP, WARTORTLE, BLASTOISE, FARFETCH_D, CUBONE, MAROWAK, KANGASKHAN, -1 +.ki_gi: db SUNFLORA, CATERPIE, GYARADOS, RAPIDASH, NINETALES, GIRAFARIG, BELLOSSOM, KINGDRA, KINGLER, -1 +.ku_gu: db GLOOM, PINECO, GLIGAR, KRABBY, GRANBULL, CROBAT, -1 +.ke_ge: db ABRA, GENGAR, TAUROS, -1 +.ko_go: db MAGIKARP, MAGNEMITE, GASTLY, HAUNTER, MACHOKE, KAKUNA, PSYDUCK, PHANPY, RATTATA, GOLDUCK, GOLBAT, GOLEM, GRAVELER, VENONAT, -1 +.sa_za: db RHYHORN, PUPITAR, CORSOLA, HITMONLEE, ZAPDOS, JOLTEON, SANDSHREW, SANDSLASH, -1 ; RHYDON should lead this list +.shi_ji: db SEADRA, SHELLDER, VAPOREON, DEWGONG, -1 +.su_zu: db SUICUNE, STARMIE, SCYTHER, ZUBAT, BEEDRILL, HYPNO, DROWZEE, -1 +.se_ze: db SQUIRTLE, CELEBI, -1 +.so_zo: db WOBBUFFET, -1 +.ta_da: db DUGTRIO, HORSEA, EXEGGCUTE, -1 +.chi_dhi: db CHIKORITA, CHINCHOU, -1 +.tsu_du: db SHUCKLE, -1 +.te_de: db DIGLETT, REMORAID, DELIBIRD, HOUNDOUR, AMPHAROS, -1 +.to_do: db DODUO, DODRIO, SMEARGLE, KOFFING, TENTACRUEL, TOGETIC, TOGEPI, GOLDEEN, METAPOD, DONPHAN, -1 +.na: db ODDISH, EXEGGUTOR, -1 +.ni: db NIDOKING, NIDOQUEEN, NIDORAN_M, NIDORAN_F, NIDORINA, NIDORINO, MEOWTH, SNEASEL, POLIWHIRL, POLITOED, POLIWRATH, POLIWAG, -1 +.nu: db QUAGSIRE, -1 +.ne: db NATU, XATU, -1 +.no: db DUNSPARCE, -1 +.ha_ba_pa: db SEEL, STEELIX, TYPHLOSION, DRAGONAIR, BUTTERFREE, SCIZOR, HOPPIP, BLISSEY, PARAS, PARASECT, QWILFISH, MR__MIME, TYROGUE, CLOYSTER, TYRANITAR, -1 +.hi_bi_pi: db CLEFFA, WEEDLE, PIKACHU, CLEFABLE, PIDGEOT, PIDGEOTTO, PICHU, CLEFAIRY, CHARMANDER, STARYU, CYNDAQUIL, SUNKERN, TEDDIURSA, VOLTORB, -1 +.fu_bu_pu: db MOLTRES, FLAREON, ALAKAZAM, MAGMAR, FORRETRESS, WIGGLYTUFF, IVYSAUR, BULBASAUR, VENUSAUR, AERODACTYL, MAGBY, IGGLYBUFF, UMBREON, ARTICUNO, JIGGLYPUFF, SNUBBULL, -1 +.he_be_pe: db BAYLEEF, GRIMER, MUK, HERACROSS, HOUNDOOM, PERSIAN, LICKITUNG, -1 +.ho_bo_po: db HO_OH, HOOTHOOT, PIDGEY, PONYTA, SKIPLOOM, PORYGON, PORYGON2, -1 +.ma: db MAGCARGO, SLUGMA, QUILAVA, BELLSPROUT, WEEZING, MARILL, AZUMARILL, ELECTRODE, MANKEY, MANTINE, -1 +.mi: db DRATINI, MEW, MEWTWO, MILTANK, -1 +.mu: db MISDREAVUS, SMOOCHUM, -1 +.me: db MEGANIUM, DITTO, TENTACOOL, MAREEP, -1 +.mo: db FLAAFFY, VENOMOTH, TANGELA, -1 +.ya: db SLOWKING, SLOWBRO, SLOWPOKE, MURKROW, YANMA, -1 +.yu: db KADABRA, -1 +.yo: db LARVITAR, NOCTOWL, -1 +.ra: db RAIKOU, RAICHU, CHANSEY, RATICATE, LAPRAS, VILEPLUME, LANTURN, -1 +.ri: db CHARMELEON, CHARIZARD, URSARING, -1 +.ru: db JYNX, LUGIA, -1 +.re: db MAGNETON, LEDIAN, LEDYBA, -1 +.ro: db VULPIX, -1 +.wa: db JUMPLUFF, TOTODILE, MACHOP ;, -1 +.end: db -1 diff --git a/data/pokemon/first_stages.asm b/data/pokemon/first_stages.asm new file mode 100644 index 0000000..9b104f4 --- /dev/null +++ b/data/pokemon/first_stages.asm @@ -0,0 +1,255 @@ +FirstEvoStages:: + ; lists the lowest stage for each Pokémon + table_width 2, FirstEvoStages + dw BULBASAUR + dw BULBASAUR + dw BULBASAUR + dw CHARMANDER + dw CHARMANDER + dw CHARMANDER + dw SQUIRTLE + dw SQUIRTLE ;08 + dw SQUIRTLE + dw CATERPIE + dw CATERPIE + dw CATERPIE + dw WEEDLE + dw WEEDLE + dw WEEDLE + dw PIDGEY ;10 + dw PIDGEY + dw PIDGEY + dw RATTATA + dw RATTATA + dw SPEAROW + dw SPEAROW + dw EKANS + dw EKANS ;18 + dw PICHU + dw PICHU + dw SANDSHREW + dw SANDSHREW + dw NIDORAN_F + dw NIDORAN_F + dw NIDORAN_F + dw NIDORAN_M ;20 + dw NIDORAN_M + dw NIDORAN_M + dw CLEFFA + dw CLEFFA + dw VULPIX + dw VULPIX + dw IGGLYBUFF + dw IGGLYBUFF ;28 + dw ZUBAT + dw ZUBAT + dw ODDISH + dw ODDISH + dw ODDISH + dw PARAS + dw PARAS + dw VENONAT ;30 + dw VENONAT + dw DIGLETT + dw DIGLETT + dw MEOWTH + dw MEOWTH + dw PSYDUCK + dw PSYDUCK + dw MANKEY ;38 + dw MANKEY + dw GROWLITHE + dw GROWLITHE + dw POLIWAG + dw POLIWAG + dw POLIWAG + dw ABRA + dw ABRA ;40 + dw ABRA + dw MACHOP + dw MACHOP + dw MACHOP + dw BELLSPROUT + dw BELLSPROUT + dw BELLSPROUT + dw TENTACOOL ;48 + dw TENTACOOL + dw GEODUDE + dw GEODUDE + dw GEODUDE + dw PONYTA + dw PONYTA + dw SLOWPOKE + dw SLOWPOKE ;50 + dw MAGNEMITE + dw MAGNEMITE + dw FARFETCH_D + dw DODUO + dw DODUO + dw SEEL + dw SEEL + dw GRIMER ;58 + dw GRIMER + dw SHELLDER + dw SHELLDER + dw GASTLY + dw GASTLY + dw GASTLY + dw ONIX + dw DROWZEE ;60 + dw DROWZEE + dw KRABBY + dw KRABBY + dw VOLTORB + dw VOLTORB + dw EXEGGCUTE + dw EXEGGCUTE + dw CUBONE ;68 + dw CUBONE + dw TYROGUE + dw TYROGUE + dw LICKITUNG + dw KOFFING + dw KOFFING + dw RHYHORN + dw RHYHORN ;70 + dw CHANSEY + dw TANGELA + dw KANGASKHAN + dw HORSEA + dw HORSEA + dw GOLDEEN + dw GOLDEEN + dw STARYU ;78 + dw STARYU + dw MR__MIME + dw SCYTHER + dw SMOOCHUM + dw ELEKID + dw MAGBY + dw PINSIR + dw TAUROS ;80 + dw MAGIKARP + dw MAGIKARP + dw LAPRAS + dw DITTO + dw EEVEE + dw EEVEE + dw EEVEE + dw EEVEE ;88 + dw PORYGON + dw OMANYTE + dw OMANYTE + dw KABUTO + dw KABUTO + dw AERODACTYL + dw SNORLAX + dw ARTICUNO ;90 + dw ZAPDOS + dw MOLTRES + dw DRATINI + dw DRATINI + dw DRATINI + dw MEWTWO + dw MEW + dw CHIKORITA ;98 + dw CHIKORITA + dw CHIKORITA + dw CYNDAQUIL + dw CYNDAQUIL + dw CYNDAQUIL + dw TOTODILE + dw TOTODILE + dw TOTODILE ;a0 + dw SENTRET + dw SENTRET + dw HOOTHOOT + dw HOOTHOOT + dw LEDYBA + dw LEDYBA + dw SPINARAK + dw SPINARAK ;a8 + dw ZUBAT + dw CHINCHOU + dw CHINCHOU + dw PICHU + dw CLEFFA + dw IGGLYBUFF + dw TOGEPI + dw TOGEPI ;b0 + dw NATU + dw NATU + dw MAREEP + dw MAREEP + dw MAREEP + dw ODDISH + dw MARILL + dw MARILL ;b8 + dw SUDOWOODO + dw POLIWAG + dw HOPPIP + dw HOPPIP + dw HOPPIP + dw AIPOM + dw SUNKERN + dw SUNKERN ;c0 + dw YANMA + dw WOOPER + dw WOOPER + dw EEVEE + dw EEVEE + dw MURKROW + dw SLOWPOKE + dw MISDREAVUS ;c8 + dw UNOWN + dw WOBBUFFET + dw GIRAFARIG + dw PINECO + dw PINECO + dw DUNSPARCE + dw GLIGAR + dw ONIX ;d0 + dw SNUBBULL + dw SNUBBULL + dw QWILFISH + dw SCYTHER + dw SHUCKLE + dw HERACROSS + dw SNEASEL + dw TEDDIURSA ;d8 + dw TEDDIURSA + dw SLUGMA + dw SLUGMA + dw SWINUB + dw SWINUB + dw CORSOLA + dw REMORAID + dw REMORAID ;e0 + dw DELIBIRD + dw MANTINE + dw SKARMORY + dw HOUNDOUR + dw HOUNDOUR + dw HORSEA + dw PHANPY + dw PHANPY ;e8 + dw PORYGON + dw STANTLER + dw SMEARGLE + dw TYROGUE + dw TYROGUE + dw SMOOCHUM + dw ELEKID + dw MAGBY ;f0 + dw MILTANK + dw CHANSEY + dw RAIKOU + dw ENTEI + dw SUICUNE + dw LARVITAR + dw LARVITAR + dw LARVITAR ;f8 + dw LUGIA + dw HO_OH + dw CELEBI + assert_table_length NUM_POKEMON diff --git a/data/pokemon/gen1_base_special.asm b/data/pokemon/gen1_base_special.asm new file mode 100644 index 0000000..1c523a0 --- /dev/null +++ b/data/pokemon/gen1_base_special.asm @@ -0,0 +1,156 @@ +; The original base Special stat for each Pokémon from Red/Blue + +KantoMonSpecials: + table_width 1, KantoMonSpecials + db 65 ; BULBASAUR + db 80 ; IVYSAUR + db 100 ; VENUSAUR + db 50 ; CHARMANDER + db 65 ; CHARMELEON + db 85 ; CHARIZARD + db 50 ; SQUIRTLE + db 65 ; WARTORTLE + db 85 ; BLASTOISE + db 20 ; CATERPIE + db 25 ; METAPOD + db 80 ; BUTTERFREE + db 20 ; WEEDLE + db 25 ; KAKUNA + db 45 ; BEEDRILL + db 35 ; PIDGEY + db 50 ; PIDGEOTTO + db 70 ; PIDGEOT + db 25 ; RATTATA + db 50 ; RATICATE + db 31 ; SPEAROW + db 61 ; FEAROW + db 40 ; EKANS + db 65 ; ARBOK + db 50 ; PIKACHU + db 90 ; RAICHU + db 30 ; SANDSHREW + db 55 ; SANDSLASH + db 40 ; NIDORAN_F + db 55 ; NIDORINA + db 75 ; NIDOQUEEN + db 40 ; NIDORAN_M + db 55 ; NIDORINO + db 75 ; NIDOKING + db 60 ; CLEFAIRY + db 85 ; CLEFABLE + db 65 ; VULPIX + db 100 ; NINETALES + db 25 ; JIGGLYPUFF + db 50 ; WIGGLYTUFF + db 40 ; ZUBAT + db 75 ; GOLBAT + db 75 ; ODDISH + db 85 ; GLOOM + db 100 ; VILEPLUME + db 55 ; PARAS + db 80 ; PARASECT + db 40 ; VENONAT + db 90 ; VENOMOTH + db 45 ; DIGLETT + db 70 ; DUGTRIO + db 40 ; MEOWTH + db 65 ; PERSIAN + db 50 ; PSYDUCK + db 80 ; GOLDUCK + db 35 ; MANKEY + db 60 ; PRIMEAPE + db 50 ; GROWLITHE + db 80 ; ARCANINE + db 40 ; POLIWAG + db 50 ; POLIWHIRL + db 70 ; POLIWRATH + db 105 ; ABRA + db 120 ; KADABRA + db 135 ; ALAKAZAM + db 35 ; MACHOP + db 50 ; MACHOKE + db 65 ; MACHAMP + db 70 ; BELLSPROUT + db 85 ; WEEPINBELL + db 100 ; VICTREEBEL + db 100 ; TENTACOOL + db 120 ; TENTACRUEL + db 30 ; GEODUDE + db 45 ; GRAVELER + db 55 ; GOLEM + db 65 ; PONYTA + db 80 ; RAPIDASH + db 40 ; SLOWPOKE + db 80 ; SLOWBRO + db 95 ; MAGNEMITE + db 120 ; MAGNETON + db 58 ; FARFETCH_D + db 35 ; DODUO + db 60 ; DODRIO + db 70 ; SEEL + db 95 ; DEWGONG + db 40 ; GRIMER + db 65 ; MUK + db 45 ; SHELLDER + db 85 ; CLOYSTER + db 100 ; GASTLY + db 115 ; HAUNTER + db 130 ; GENGAR + db 30 ; ONIX + db 90 ; DROWZEE + db 115 ; HYPNO + db 25 ; KRABBY + db 50 ; KINGLER + db 55 ; VOLTORB + db 80 ; ELECTRODE + db 60 ; EXEGGCUTE + db 125 ; EXEGGUTOR + db 40 ; CUBONE + db 50 ; MAROWAK + db 35 ; HITMONLEE + db 35 ; HITMONCHAN + db 60 ; LICKITUNG + db 60 ; KOFFING + db 85 ; WEEZING + db 30 ; RHYHORN + db 45 ; RHYDON + db 105 ; CHANSEY + db 100 ; TANGELA + db 40 ; KANGASKHAN + db 70 ; HORSEA + db 95 ; SEADRA + db 50 ; GOLDEEN + db 80 ; SEAKING + db 70 ; STARYU + db 100 ; STARMIE + db 100 ; MR__MIME + db 55 ; SCYTHER + db 95 ; JYNX + db 85 ; ELECTABUZZ + db 85 ; MAGMAR + db 55 ; PINSIR + db 70 ; TAUROS + db 20 ; MAGIKARP + db 100 ; GYARADOS + db 95 ; LAPRAS + db 48 ; DITTO + db 65 ; EEVEE + db 110 ; VAPOREON + db 110 ; JOLTEON + db 110 ; FLAREON + db 75 ; PORYGON + db 90 ; OMANYTE + db 115 ; OMASTAR + db 45 ; KABUTO + db 70 ; KABUTOPS + db 60 ; AERODACTYL + db 65 ; SNORLAX + db 125 ; ARTICUNO + db 125 ; ZAPDOS + db 125 ; MOLTRES + db 50 ; DRATINI + db 70 ; DRAGONAIR + db 100 ; DRAGONITE + db 154 ; MEWTWO + db 100 ; MEW + assert_table_length JOHTO_POKEMON - 1 diff --git a/data/pokemon/gen1_order.asm b/data/pokemon/gen1_order.asm new file mode 100644 index 0000000..ca40398 --- /dev/null +++ b/data/pokemon/gen1_order.asm @@ -0,0 +1,256 @@ +Pokered_MonIndices: + table_width 1, Pokered_MonIndices + db RHYDON + db KANGASKHAN + db NIDORAN_M + db CLEFAIRY + db SPEAROW + db VOLTORB + db NIDOKING + db SLOWBRO + db IVYSAUR + db EXEGGUTOR + db LICKITUNG + db EXEGGCUTE + db GRIMER + db GENGAR + db NIDORAN_F + db NIDOQUEEN + db CUBONE + db RHYHORN + db LAPRAS + db ARCANINE + db MEW + db GYARADOS + db SHELLDER + db TENTACOOL + db GASTLY + db SCYTHER + db STARYU + db BLASTOISE + db PINSIR + db TANGELA + db SCIZOR ; MISSINGNO. + db SHUCKLE ; MISSINGNO. + db GROWLITHE + db ONIX + db FEAROW + db PIDGEY + db SLOWPOKE + db KADABRA + db GRAVELER + db CHANSEY + db MACHOKE + db MR__MIME + db HITMONLEE + db HITMONCHAN + db ARBOK + db PARASECT + db PSYDUCK + db DROWZEE + db GOLEM + db HERACROSS ; MISSINGNO. + db MAGMAR + db HO_OH ; MISSINGNO. + db ELECTABUZZ + db MAGNETON + db KOFFING + db SNEASEL ; MISSINGNO. + db MANKEY + db SEEL + db DIGLETT + db TAUROS + db TEDDIURSA ; MISSINGNO. + db URSARING ; MISSINGNO. + db SLUGMA ; MISSINGNO. + db FARFETCH_D + db VENONAT + db DRAGONITE + db MAGCARGO ; MISSINGNO. + db SWINUB ; MISSINGNO. + db PILOSWINE ; MISSINGNO. + db DODUO + db POLIWAG + db JYNX + db MOLTRES + db ARTICUNO + db ZAPDOS + db DITTO + db MEOWTH + db KRABBY + db CORSOLA ; MISSINGNO. + db REMORAID ; MISSINGNO. + db OCTILLERY ; MISSINGNO. + db VULPIX + db NINETALES + db PIKACHU + db RAICHU + db DELIBIRD ; MISSINGNO. + db MANTINE ; MISSINGNO. + db DRATINI + db DRAGONAIR + db KABUTO + db KABUTOPS + db HORSEA + db SEADRA + db SKARMORY ; MISSINGNO. + db HOUNDOUR ; MISSINGNO. + db SANDSHREW + db SANDSLASH + db OMANYTE + db OMASTAR + db JIGGLYPUFF + db WIGGLYTUFF + db EEVEE + db FLAREON + db JOLTEON + db VAPOREON + db MACHOP + db ZUBAT + db EKANS + db PARAS + db POLIWHIRL + db POLIWRATH + db WEEDLE + db KAKUNA + db BEEDRILL + db HOUNDOOM ; MISSINGNO. + db DODRIO + db PRIMEAPE + db DUGTRIO + db VENOMOTH + db DEWGONG + db KINGDRA ; MISSINGNO. + db PHANPY ; MISSINGNO. + db CATERPIE + db METAPOD + db BUTTERFREE + db MACHAMP + db DONPHAN ; MISSINGNO. + db GOLDUCK + db HYPNO + db GOLBAT + db MEWTWO + db SNORLAX + db MAGIKARP + db PORYGON2 ; MISSINGNO. + db STANTLER ; MISSINGNO. + db MUK + db SMEARGLE ; MISSINGNO. + db KINGLER + db CLOYSTER + db TYROGUE ; MISSINGNO. + db ELECTRODE + db CLEFABLE + db WEEZING + db PERSIAN + db MAROWAK + db HITMONTOP ; MISSINGNO. + db HAUNTER + db ABRA + db ALAKAZAM + db PIDGEOTTO + db PIDGEOT + db STARMIE + db BULBASAUR + db VENUSAUR + db TENTACRUEL + db SMOOCHUM ; MISSINGNO. + db GOLDEEN + db SEAKING + db ELEKID ; MISSINGNO. + db MAGBY ; MISSINGNO. + db MILTANK ; MISSINGNO. + db BLISSEY ; MISSINGNO. + db PONYTA + db RAPIDASH + db RATTATA + db RATICATE + db NIDORINO + db NIDORINA + db GEODUDE + db PORYGON + db AERODACTYL + db RAIKOU ; MISSINGNO. + db MAGNEMITE + db ENTEI ; MISSINGNO. + db SUICUNE ; MISSINGNO. + db CHARMANDER + db SQUIRTLE + db CHARMELEON + db WARTORTLE + db CHARIZARD + db LARVITAR ; MISSINGNO. + db PUPITAR ; MISSINGNO. KABUTOPS FOSSIL + db TYRANITAR ; MISSINGNO. AERODACTYL FOSSIL + db LUGIA ; MISSINGNO. GHOST + db ODDISH + db GLOOM + db VILEPLUME + db BELLSPROUT + db WEEPINBELL + db VICTREEBEL + assert_table_length 190 ; gen 1 mon indexes + db CHIKORITA + db BAYLEEF + db MEGANIUM + db CYNDAQUIL + db QUILAVA + db TYPHLOSION + db TOTODILE + db CROCONAW + db FERALIGATR + db SENTRET + db FURRET + db HOOTHOOT + db NOCTOWL + db LEDYBA + db LEDIAN + db SPINARAK + db ARIADOS + db CROBAT + db CHINCHOU + db LANTURN + db PICHU + db CLEFFA + db IGGLYBUFF + db TOGEPI + db TOGETIC + db NATU + db XATU + db MAREEP + db FLAAFFY + db AMPHAROS + db BELLOSSOM + db MARILL + db AZUMARILL + db SUDOWOODO + db POLITOED + db HOPPIP + db SKIPLOOM + db JUMPLUFF + db AIPOM + db SUNKERN + db SUNFLORA + db YANMA + db WOOPER + db QUAGSIRE + db ESPEON + db UMBREON + db MURKROW + db SLOWKING + db MISDREAVUS + db UNOWN + db WOBBUFFET + db GIRAFARIG + db PINECO + db FORRETRESS + db DUNSPARCE + db GLIGAR + db STEELIX + db SNUBBULL + db GRANBULL + db QWILFISH + db WOBBUFFET + db WOBBUFFET + assert_table_length NUM_POKEMON + 1 diff --git a/data/pokemon/menu_icons.asm b/data/pokemon/menu_icons.asm new file mode 100644 index 0000000..506d060 --- /dev/null +++ b/data/pokemon/menu_icons.asm @@ -0,0 +1,256 @@ +; party menu icons + +MonMenuIcons: + table_width 1, MonMenuIcons + db ICON_BULBASAUR ; BULBASAUR + db ICON_BULBASAUR ; IVYSAUR + db ICON_BULBASAUR ; VENUSAUR + db ICON_CHARMANDER ; CHARMANDER + db ICON_CHARMANDER ; CHARMELEON + db ICON_BIGMON ; CHARIZARD + db ICON_SQUIRTLE ; SQUIRTLE + db ICON_SQUIRTLE ; WARTORTLE + db ICON_SQUIRTLE ; BLASTOISE + db ICON_CATERPILLAR ; CATERPIE + db ICON_CATERPILLAR ; METAPOD + db ICON_MOTH ; BUTTERFREE + db ICON_CATERPILLAR ; WEEDLE + db ICON_CATERPILLAR ; KAKUNA + db ICON_BUG ; BEEDRILL + db ICON_BIRD ; PIDGEY + db ICON_BIRD ; PIDGEOTTO + db ICON_BIRD ; PIDGEOT + db ICON_FOX ; RATTATA + db ICON_FOX ; RATICATE + db ICON_BIRD ; SPEAROW + db ICON_BIRD ; FEAROW + db ICON_SERPENT ; EKANS + db ICON_SERPENT ; ARBOK + db ICON_PIKACHU ; PIKACHU + db ICON_PIKACHU ; RAICHU + db ICON_MONSTER ; SANDSHREW + db ICON_MONSTER ; SANDSLASH + db ICON_FOX ; NIDORAN_F + db ICON_FOX ; NIDORINA + db ICON_MONSTER ; NIDOQUEEN + db ICON_FOX ; NIDORAN_M + db ICON_FOX ; NIDORINO + db ICON_MONSTER ; NIDOKING + db ICON_CLEFAIRY ; CLEFAIRY + db ICON_CLEFAIRY ; CLEFABLE + db ICON_FOX ; VULPIX + db ICON_FOX ; NINETALES + db ICON_JIGGLYPUFF ; JIGGLYPUFF + db ICON_JIGGLYPUFF ; WIGGLYTUFF + db ICON_BAT ; ZUBAT + db ICON_BAT ; GOLBAT + db ICON_ODDISH ; ODDISH + db ICON_ODDISH ; GLOOM + db ICON_ODDISH ; VILEPLUME + db ICON_BUG ; PARAS + db ICON_BUG ; PARASECT + db ICON_CATERPILLAR ; VENONAT + db ICON_MOTH ; VENOMOTH + db ICON_DIGLETT ; DIGLETT + db ICON_DIGLETT ; DUGTRIO + db ICON_FOX ; MEOWTH + db ICON_FOX ; PERSIAN + db ICON_MONSTER ; PSYDUCK + db ICON_MONSTER ; GOLDUCK + db ICON_FIGHTER ; MANKEY + db ICON_FIGHTER ; PRIMEAPE + db ICON_FOX ; GROWLITHE + db ICON_FOX ; ARCANINE + db ICON_POLIWAG ; POLIWAG + db ICON_POLIWAG ; POLIWHIRL + db ICON_POLIWAG ; POLIWRATH + db ICON_HUMANSHAPE ; ABRA + db ICON_HUMANSHAPE ; KADABRA + db ICON_HUMANSHAPE ; ALAKAZAM + db ICON_FIGHTER ; MACHOP + db ICON_FIGHTER ; MACHOKE + db ICON_FIGHTER ; MACHAMP + db ICON_ODDISH ; BELLSPROUT + db ICON_ODDISH ; WEEPINBELL + db ICON_ODDISH ; VICTREEBEL + db ICON_JELLYFISH ; TENTACOOL + db ICON_JELLYFISH ; TENTACRUEL + db ICON_GEODUDE ; GEODUDE + db ICON_GEODUDE ; GRAVELER + db ICON_GEODUDE ; GOLEM + db ICON_EQUINE ; PONYTA + db ICON_EQUINE ; RAPIDASH + db ICON_SLOWPOKE ; SLOWPOKE + db ICON_SLOWPOKE ; SLOWBRO + db ICON_VOLTORB ; MAGNEMITE + db ICON_VOLTORB ; MAGNETON + db ICON_BIRD ; FARFETCH_D + db ICON_BIRD ; DODUO + db ICON_BIRD ; DODRIO + db ICON_LAPRAS ; SEEL + db ICON_LAPRAS ; DEWGONG + db ICON_BLOB ; GRIMER + db ICON_BLOB ; MUK + db ICON_SHELL ; SHELLDER + db ICON_SHELL ; CLOYSTER + db ICON_GHOST ; GASTLY + db ICON_GHOST ; HAUNTER + db ICON_GHOST ; GENGAR + db ICON_SERPENT ; ONIX + db ICON_HUMANSHAPE ; DROWZEE + db ICON_HUMANSHAPE ; HYPNO + db ICON_SHELL ; KRABBY + db ICON_SHELL ; KINGLER + db ICON_VOLTORB ; VOLTORB + db ICON_VOLTORB ; ELECTRODE + db ICON_ODDISH ; EXEGGCUTE + db ICON_ODDISH ; EXEGGUTOR + db ICON_MONSTER ; CUBONE + db ICON_MONSTER ; MAROWAK + db ICON_FIGHTER ; HITMONLEE + db ICON_FIGHTER ; HITMONCHAN + db ICON_MONSTER ; LICKITUNG + db ICON_BLOB ; KOFFING + db ICON_BLOB ; WEEZING + db ICON_EQUINE ; RHYHORN + db ICON_MONSTER ; RHYDON + db ICON_CLEFAIRY ; CHANSEY + db ICON_ODDISH ; TANGELA + db ICON_MONSTER ; KANGASKHAN + db ICON_FISH ; HORSEA + db ICON_FISH ; SEADRA + db ICON_FISH ; GOLDEEN + db ICON_FISH ; SEAKING + db ICON_STARYU ; STARYU + db ICON_STARYU ; STARMIE + db ICON_HUMANSHAPE ; MR__MIME + db ICON_BUG ; SCYTHER + db ICON_HUMANSHAPE ; JYNX + db ICON_HUMANSHAPE ; ELECTABUZZ + db ICON_HUMANSHAPE ; MAGMAR + db ICON_BUG ; PINSIR + db ICON_EQUINE ; TAUROS + db ICON_FISH ; MAGIKARP + db ICON_GYARADOS ; GYARADOS + db ICON_LAPRAS ; LAPRAS + db ICON_BLOB ; DITTO + db ICON_FOX ; EEVEE + db ICON_FOX ; VAPOREON + db ICON_FOX ; JOLTEON + db ICON_FOX ; FLAREON + db ICON_VOLTORB ; PORYGON + db ICON_SHELL ; OMANYTE + db ICON_SHELL ; OMASTAR + db ICON_SHELL ; KABUTO + db ICON_SHELL ; KABUTOPS + db ICON_BIRD ; AERODACTYL + db ICON_SNORLAX ; SNORLAX + db ICON_BIRD ; ARTICUNO + db ICON_BIRD ; ZAPDOS + db ICON_BIRD ; MOLTRES + db ICON_SERPENT ; DRATINI + db ICON_SERPENT ; DRAGONAIR + db ICON_BIGMON ; DRAGONITE + db ICON_HUMANSHAPE ; MEWTWO + db ICON_HUMANSHAPE ; MEW + db ICON_ODDISH ; CHIKORITA + db ICON_ODDISH ; BAYLEEF + db ICON_ODDISH ; MEGANIUM + db ICON_FOX ; CYNDAQUIL + db ICON_FOX ; QUILAVA + db ICON_FOX ; TYPHLOSION + db ICON_MONSTER ; TOTODILE + db ICON_MONSTER ; CROCONAW + db ICON_MONSTER ; FERALIGATR + db ICON_FOX ; SENTRET + db ICON_FOX ; FURRET + db ICON_BIRD ; HOOTHOOT + db ICON_BIRD ; NOCTOWL + db ICON_BUG ; LEDYBA + db ICON_BUG ; LEDIAN + db ICON_BUG ; SPINARAK + db ICON_BUG ; ARIADOS + db ICON_BAT ; CROBAT + db ICON_FISH ; CHINCHOU + db ICON_FISH ; LANTURN + db ICON_PIKACHU ; PICHU + db ICON_CLEFAIRY ; CLEFFA + db ICON_JIGGLYPUFF ; IGGLYBUFF + db ICON_CLEFAIRY ; TOGEPI + db ICON_BIRD ; TOGETIC + db ICON_BIRD ; NATU + db ICON_BIRD ; XATU + db ICON_FOX ; MAREEP + db ICON_MONSTER ; FLAAFFY + db ICON_MONSTER ; AMPHAROS + db ICON_ODDISH ; BELLOSSOM + db ICON_JIGGLYPUFF ; MARILL + db ICON_JIGGLYPUFF ; AZUMARILL + db ICON_SUDOWOODO ; SUDOWOODO + db ICON_POLIWAG ; POLITOED + db ICON_ODDISH ; HOPPIP + db ICON_ODDISH ; SKIPLOOM + db ICON_ODDISH ; JUMPLUFF + db ICON_MONSTER ; AIPOM + db ICON_ODDISH ; SUNKERN + db ICON_ODDISH ; SUNFLORA + db ICON_BUG ; YANMA + db ICON_MONSTER ; WOOPER + db ICON_MONSTER ; QUAGSIRE + db ICON_FOX ; ESPEON + db ICON_FOX ; UMBREON + db ICON_BIRD ; MURKROW + db ICON_SLOWPOKE ; SLOWKING + db ICON_GHOST ; MISDREAVUS + db ICON_UNOWN ; UNOWN + db ICON_GHOST ; WOBBUFFET + db ICON_EQUINE ; GIRAFARIG + db ICON_BUG ; PINECO + db ICON_BUG ; FORRETRESS + db ICON_SERPENT ; DUNSPARCE + db ICON_BUG ; GLIGAR + db ICON_SERPENT ; STEELIX + db ICON_MONSTER ; SNUBBULL + db ICON_MONSTER ; GRANBULL + db ICON_FISH ; QWILFISH + db ICON_BUG ; SCIZOR + db ICON_BUG ; SHUCKLE + db ICON_BUG ; HERACROSS + db ICON_FOX ; SNEASEL + db ICON_MONSTER ; TEDDIURSA + db ICON_MONSTER ; URSARING + db ICON_BLOB ; SLUGMA + db ICON_BLOB ; MAGCARGO + db ICON_EQUINE ; SWINUB + db ICON_EQUINE ; PILOSWINE + db ICON_SHELL ; CORSOLA + db ICON_FISH ; REMORAID + db ICON_FISH ; OCTILLERY + db ICON_MONSTER ; DELIBIRD + db ICON_FISH ; MANTINE + db ICON_BIRD ; SKARMORY + db ICON_FOX ; HOUNDOUR + db ICON_FOX ; HOUNDOOM + db ICON_BIGMON ; KINGDRA + db ICON_EQUINE ; PHANPY + db ICON_EQUINE ; DONPHAN + db ICON_VOLTORB ; PORYGON2 + db ICON_EQUINE ; STANTLER + db ICON_MONSTER ; SMEARGLE + db ICON_FIGHTER ; TYROGUE + db ICON_FIGHTER ; HITMONTOP + db ICON_HUMANSHAPE ; SMOOCHUM + db ICON_HUMANSHAPE ; ELEKID + db ICON_HUMANSHAPE ; MAGBY + db ICON_EQUINE ; MILTANK + db ICON_CLEFAIRY ; BLISSEY + db ICON_FOX ; RAIKOU + db ICON_FOX ; ENTEI + db ICON_FOX ; SUICUNE + db ICON_MONSTER ; LARVITAR + db ICON_MONSTER ; PUPITAR + db ICON_MONSTER ; TYRANITAR + db ICON_LUGIA ; LUGIA + db ICON_HO_OH ; HO_OH + db ICON_HUMANSHAPE ; CELEBI + assert_table_length NUM_POKEMON diff --git a/data/pokemon/names.asm b/data/pokemon/names.asm new file mode 100644 index 0000000..9639a27 --- /dev/null +++ b/data/pokemon/names.asm @@ -0,0 +1,258 @@ + db "EGG@@@@@@@" + db "?????@@@@@" + db "?????@@@@@" + db "?????@@@@@" +PokemonNames:: + table_width NAME_LENGTH - 1, PokemonNames + db "BULBASAUR@" + db "IVYSAUR@@@" + db "VENUSAUR@@" + db "CHARMANDER" + db "CHARMELEON" + db "CHARIZARD@" + db "SQUIRTLE@@" + db "WARTORTLE@" + db "BLASTOISE@" + db "CATERPIE@@" + db "METAPOD@@@" + db "BUTTERFREE" + db "WEEDLE@@@@" + db "KAKUNA@@@@" + db "BEEDRILL@@" + db "PIDGEY@@@@" + db "PIDGEOTTO@" + db "PIDGEOT@@@" + db "RATTATA@@@" + db "RATICATE@@" + db "SPEAROW@@@" + db "FEAROW@@@@" + db "EKANS@@@@@" + db "ARBOK@@@@@" + db "PIKACHU@@@" + db "RAICHU@@@@" + db "SANDSHREW@" + db "SANDSLASH@" + db "NIDORAN♀@@" + db "NIDORINA@@" + db "NIDOQUEEN@" + db "NIDORAN♂@@" + db "NIDORINO@@" + db "NIDOKING@@" + db "CLEFAIRY@@" + db "CLEFABLE@@" + db "VULPIX@@@@" + db "NINETALES@" + db "JIGGLYPUFF" + db "WIGGLYTUFF" + db "ZUBAT@@@@@" + db "GOLBAT@@@@" + db "ODDISH@@@@" + db "GLOOM@@@@@" + db "VILEPLUME@" + db "PARAS@@@@@" + db "PARASECT@@" + db "VENONAT@@@" + db "VENOMOTH@@" + db "DIGLETT@@@" + db "DUGTRIO@@@" + db "MEOWTH@@@@" + db "PERSIAN@@@" + db "PSYDUCK@@@" + db "GOLDUCK@@@" + db "MANKEY@@@@" + db "PRIMEAPE@@" + db "GROWLITHE@" + db "ARCANINE@@" + db "POLIWAG@@@" + db "POLIWHIRL@" + db "POLIWRATH@" + db "ABRA@@@@@@" + db "KADABRA@@@" + db "ALAKAZAM@@" + db "MACHOP@@@@" + db "MACHOKE@@@" + db "MACHAMP@@@" + db "BELLSPROUT" + db "WEEPINBELL" + db "VICTREEBEL" + db "TENTACOOL@" + db "TENTACRUEL" + db "GEODUDE@@@" + db "GRAVELER@@" + db "GOLEM@@@@@" + db "PONYTA@@@@" + db "RAPIDASH@@" + db "SLOWPOKE@@" + db "SLOWBRO@@@" + db "MAGNEMITE@" + db "MAGNETON@@" + db "FARFETCH'D" + db "DODUO@@@@@" + db "DODRIO@@@@" + db "SEEL@@@@@@" + db "DEWGONG@@@" + db "GRIMER@@@@" + db "MUK@@@@@@@" + db "SHELLDER@@" + db "CLOYSTER@@" + db "GASTLY@@@@" + db "HAUNTER@@@" + db "GENGAR@@@@" + db "ONIX@@@@@@" + db "DROWZEE@@@" + db "HYPNO@@@@@" + db "KRABBY@@@@" + db "KINGLER@@@" + db "VOLTORB@@@" + db "ELECTRODE@" + db "EXEGGCUTE@" + db "EXEGGUTOR@" + db "CUBONE@@@@" + db "MAROWAK@@@" + db "HITMONLEE@" + db "HITMONCHAN" + db "LICKITUNG@" + db "KOFFING@@@" + db "WEEZING@@@" + db "RHYHORN@@@" + db "RHYDON@@@@" + db "CHANSEY@@@" + db "TANGELA@@@" + db "KANGASKHAN" + db "HORSEA@@@@" + db "SEADRA@@@@" + db "GOLDEEN@@@" + db "SEAKING@@@" + db "STARYU@@@@" + db "STARMIE@@@" + db "MR.MIME@@@" + db "SCYTHER@@@" + db "JYNX@@@@@@" + db "ELECTABUZZ" + db "MAGMAR@@@@" + db "PINSIR@@@@" + db "TAUROS@@@@" + db "MAGIKARP@@" + db "GYARADOS@@" + db "LAPRAS@@@@" + db "DITTO@@@@@" + db "EEVEE@@@@@" + db "VAPOREON@@" + db "JOLTEON@@@" + db "FLAREON@@@" + db "PORYGON@@@" + db "OMANYTE@@@" + db "OMASTAR@@@" + db "KABUTO@@@@" + db "KABUTOPS@@" + db "AERODACTYL" + db "SNORLAX@@@" + db "ARTICUNO@@" + db "ZAPDOS@@@@" + db "MOLTRES@@@" + db "DRATINI@@@" + db "DRAGONAIR@" + db "DRAGONITE@" + db "MEWTWO@@@@" + db "MEW@@@@@@@" + db "CHIKORITA@" + db "BAYLEEF@@@" + db "MEGANIUM@@" + db "CYNDAQUIL@" + db "QUILAVA@@@" + db "TYPHLOSION" + db "TOTODILE@@" + db "CROCONAW@@" + db "FERALIGATR" + db "SENTRET@@@" + db "FURRET@@@@" + db "HOOTHOOT@@" + db "NOCTOWL@@@" + db "LEDYBA@@@@" + db "LEDIAN@@@@" + db "SPINARAK@@" + db "ARIADOS@@@" + db "CROBAT@@@@" + db "CHINCHOU@@" + db "LANTURN@@@" + db "PICHU@@@@@" + db "CLEFFA@@@@" + db "IGGLYBUFF@" + db "TOGEPI@@@@" + db "TOGETIC@@@" + db "NATU@@@@@@" + db "XATU@@@@@@" + db "MAREEP@@@@" + db "FLAAFFY@@@" + db "AMPHAROS@@" + db "BELLOSSOM@" + db "MARILL@@@@" + db "AZUMARILL@" + db "SUDOWOODO@" + db "POLITOED@@" + db "HOPPIP@@@@" + db "SKIPLOOM@@" + db "JUMPLUFF@@" + db "AIPOM@@@@@" + db "SUNKERN@@@" + db "SUNFLORA@@" + db "YANMA@@@@@" + db "WOOPER@@@@" + db "QUAGSIRE@@" + db "ESPEON@@@@" + db "UMBREON@@@" + db "MURKROW@@@" + db "SLOWKING@@" + db "MISDREAVUS" + db "UNOWN@@@@@" + db "WOBBUFFET@" + db "GIRAFARIG@" + db "PINECO@@@@" + db "FORRETRESS" + db "DUNSPARCE@" + db "GLIGAR@@@@" + db "STEELIX@@@" + db "SNUBBULL@@" + db "GRANBULL@@" + db "QWILFISH@@" + db "SCIZOR@@@@" + db "SHUCKLE@@@" + db "HERACROSS@" + db "SNEASEL@@@" + db "TEDDIURSA@" + db "URSARING@@" + db "SLUGMA@@@@" + db "MAGCARGO@@" + db "SWINUB@@@@" + db "PILOSWINE@" + db "CORSOLA@@@" + db "REMORAID@@" + db "OCTILLERY@" + db "DELIBIRD@@" + db "MANTINE@@@" + db "SKARMORY@@" + db "HOUNDOUR@@" + db "HOUNDOOM@@" + db "KINGDRA@@@" + db "PHANPY@@@@" + db "DONPHAN@@@" + db "PORYGON2@@" + db "STANTLER@@" + db "SMEARGLE@@" + db "TYROGUE@@@" + db "HITMONTOP@" + db "SMOOCHUM@@" + db "ELEKID@@@@" + db "MAGBY@@@@@" + db "MILTANK@@@" + db "BLISSEY@@@" + db "RAIKOU@@@@" + db "ENTEI@@@@@" + db "SUICUNE@@@" + db "LARVITAR@@" + db "PUPITAR@@@" + db "TYRANITAR@" + db "LUGIA@@@@@" + db "HO-OH@@@@@" + db "CELEBI@@@@" + assert_table_length NUM_POKEMON diff --git a/data/pokemon/palettes.asm b/data/pokemon/palettes.asm new file mode 100644 index 0000000..a70009e --- /dev/null +++ b/data/pokemon/palettes.asm @@ -0,0 +1,539 @@ +; Eggs are negative now +INCBIN "gfx/pokemon/egg/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/egg/shiny.pal" + +; -2 + RGB 30, 26, 11 + RGB 23, 16, 00 +; -2 shiny + RGB 30, 26, 11 + RGB 23, 16, 00 + +; -1 + RGB 23, 23, 23 + RGB 17, 17, 17 +; -1 shiny + RGB 23, 23, 23 + RGB 17, 17, 17 + +PokemonPalettes: +; entries correspond to Pokémon species, two apiece + +; Each front.gbcpal is generated from the corresponding .png, and +; only the middle two colors are included, not black or white. +; Shiny palettes are defined directly, not generated. + + ; 2 middle palettes, front and shiny, with 2 colors each + table_width PAL_COLOR_SIZE * 2 * 2, PokemonPalettes + +; 000 + RGB 30, 22, 17 + RGB 16, 14, 19 +; 000 shiny + RGB 30, 22, 17 + RGB 16, 14, 19 + +INCBIN "gfx/pokemon/bulbasaur/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/bulbasaur/shiny.pal" +INCBIN "gfx/pokemon/ivysaur/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/ivysaur/shiny.pal" +INCBIN "gfx/pokemon/venusaur/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/venusaur/shiny.pal" +INCBIN "gfx/pokemon/charmander/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/charmander/shiny.pal" +INCBIN "gfx/pokemon/charmeleon/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/charmeleon/shiny.pal" +INCBIN "gfx/pokemon/charizard/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/charizard/shiny.pal" +INCBIN "gfx/pokemon/squirtle/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/squirtle/shiny.pal" +INCBIN "gfx/pokemon/wartortle/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/wartortle/shiny.pal" +INCBIN "gfx/pokemon/blastoise/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/blastoise/shiny.pal" +INCBIN "gfx/pokemon/caterpie/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/caterpie/shiny.pal" +INCBIN "gfx/pokemon/metapod/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/metapod/shiny.pal" +INCBIN "gfx/pokemon/butterfree/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/butterfree/shiny.pal" +INCBIN "gfx/pokemon/weedle/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/weedle/shiny.pal" +INCBIN "gfx/pokemon/kakuna/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/kakuna/shiny.pal" +INCBIN "gfx/pokemon/beedrill/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/beedrill/shiny.pal" +INCBIN "gfx/pokemon/pidgey/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/pidgey/shiny.pal" +INCBIN "gfx/pokemon/pidgeotto/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/pidgeotto/shiny.pal" +INCBIN "gfx/pokemon/pidgeot/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/pidgeot/shiny.pal" +INCBIN "gfx/pokemon/rattata/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/rattata/shiny.pal" +INCBIN "gfx/pokemon/raticate/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/raticate/shiny.pal" +INCBIN "gfx/pokemon/spearow/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/spearow/shiny.pal" +INCBIN "gfx/pokemon/fearow/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/fearow/shiny.pal" +INCBIN "gfx/pokemon/ekans/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/ekans/shiny.pal" +INCBIN "gfx/pokemon/arbok/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/arbok/shiny.pal" +INCBIN "gfx/pokemon/pikachu/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/pikachu/shiny.pal" +INCBIN "gfx/pokemon/raichu/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/raichu/shiny.pal" +INCBIN "gfx/pokemon/sandshrew/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/sandshrew/shiny.pal" +INCBIN "gfx/pokemon/sandslash/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/sandslash/shiny.pal" +INCBIN "gfx/pokemon/nidoran_f/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/nidoran_f/shiny.pal" +INCBIN "gfx/pokemon/nidorina/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/nidorina/shiny.pal" +INCBIN "gfx/pokemon/nidoqueen/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/nidoqueen/shiny.pal" +INCBIN "gfx/pokemon/nidoran_m/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/nidoran_m/shiny.pal" +INCBIN "gfx/pokemon/nidorino/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/nidorino/shiny.pal" +INCBIN "gfx/pokemon/nidoking/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/nidoking/shiny.pal" +INCBIN "gfx/pokemon/clefairy/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/clefairy/shiny.pal" +INCBIN "gfx/pokemon/clefable/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/clefable/shiny.pal" +INCBIN "gfx/pokemon/vulpix/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/vulpix/shiny.pal" +INCBIN "gfx/pokemon/ninetales/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/ninetales/shiny.pal" +INCBIN "gfx/pokemon/jigglypuff/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/jigglypuff/shiny.pal" +INCBIN "gfx/pokemon/wigglytuff/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/wigglytuff/shiny.pal" +INCBIN "gfx/pokemon/zubat/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/zubat/shiny.pal" +INCBIN "gfx/pokemon/golbat/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/golbat/shiny.pal" +INCBIN "gfx/pokemon/oddish/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/oddish/shiny.pal" +INCBIN "gfx/pokemon/gloom/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/gloom/shiny.pal" +INCBIN "gfx/pokemon/vileplume/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/vileplume/shiny.pal" +INCBIN "gfx/pokemon/paras/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/paras/shiny.pal" +INCBIN "gfx/pokemon/parasect/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/parasect/shiny.pal" +INCBIN "gfx/pokemon/venonat/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/venonat/shiny.pal" +INCBIN "gfx/pokemon/venomoth/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/venomoth/shiny.pal" +INCBIN "gfx/pokemon/diglett/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/diglett/shiny.pal" +INCBIN "gfx/pokemon/dugtrio/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/dugtrio/shiny.pal" +INCBIN "gfx/pokemon/meowth/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/meowth/shiny.pal" +INCBIN "gfx/pokemon/persian/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/persian/shiny.pal" +INCBIN "gfx/pokemon/psyduck/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/psyduck/shiny.pal" +INCBIN "gfx/pokemon/golduck/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/golduck/shiny.pal" +INCBIN "gfx/pokemon/mankey/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/mankey/shiny.pal" +INCBIN "gfx/pokemon/primeape/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/primeape/shiny.pal" +INCBIN "gfx/pokemon/growlithe/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/growlithe/shiny.pal" +INCBIN "gfx/pokemon/arcanine/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/arcanine/shiny.pal" +INCBIN "gfx/pokemon/poliwag/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/poliwag/shiny.pal" +INCBIN "gfx/pokemon/poliwhirl/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/poliwhirl/shiny.pal" +INCBIN "gfx/pokemon/poliwrath/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/poliwrath/shiny.pal" +INCBIN "gfx/pokemon/abra/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/abra/shiny.pal" +INCBIN "gfx/pokemon/kadabra/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/kadabra/shiny.pal" +INCBIN "gfx/pokemon/alakazam/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/alakazam/shiny.pal" +INCBIN "gfx/pokemon/machop/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/machop/shiny.pal" +INCBIN "gfx/pokemon/machoke/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/machoke/shiny.pal" +INCBIN "gfx/pokemon/machamp/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/machamp/shiny.pal" +INCBIN "gfx/pokemon/bellsprout/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/bellsprout/shiny.pal" +INCBIN "gfx/pokemon/weepinbell/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/weepinbell/shiny.pal" +INCBIN "gfx/pokemon/victreebel/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/victreebel/shiny.pal" +INCBIN "gfx/pokemon/tentacool/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/tentacool/shiny.pal" +INCBIN "gfx/pokemon/tentacruel/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/tentacruel/shiny.pal" +INCBIN "gfx/pokemon/geodude/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/geodude/shiny.pal" +INCBIN "gfx/pokemon/graveler/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/graveler/shiny.pal" +INCBIN "gfx/pokemon/golem/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/golem/shiny.pal" +INCBIN "gfx/pokemon/ponyta/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/ponyta/shiny.pal" +INCBIN "gfx/pokemon/rapidash/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/rapidash/shiny.pal" +INCBIN "gfx/pokemon/slowpoke/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/slowpoke/shiny.pal" +INCBIN "gfx/pokemon/slowbro/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/slowbro/shiny.pal" +INCBIN "gfx/pokemon/magnemite/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/magnemite/shiny.pal" +INCBIN "gfx/pokemon/magneton/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/magneton/shiny.pal" +INCBIN "gfx/pokemon/farfetch_d/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/farfetch_d/shiny.pal" +INCBIN "gfx/pokemon/doduo/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/doduo/shiny.pal" +INCBIN "gfx/pokemon/dodrio/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/dodrio/shiny.pal" +INCBIN "gfx/pokemon/seel/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/seel/shiny.pal" +INCBIN "gfx/pokemon/dewgong/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/dewgong/shiny.pal" +INCBIN "gfx/pokemon/grimer/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/grimer/shiny.pal" +INCBIN "gfx/pokemon/muk/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/muk/shiny.pal" +INCBIN "gfx/pokemon/shellder/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/shellder/shiny.pal" +INCBIN "gfx/pokemon/cloyster/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/cloyster/shiny.pal" +INCBIN "gfx/pokemon/gastly/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/gastly/shiny.pal" +INCBIN "gfx/pokemon/haunter/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/haunter/shiny.pal" +INCBIN "gfx/pokemon/gengar/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/gengar/shiny.pal" +INCBIN "gfx/pokemon/onix/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/onix/shiny.pal" +INCBIN "gfx/pokemon/drowzee/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/drowzee/shiny.pal" +INCBIN "gfx/pokemon/hypno/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/hypno/shiny.pal" +INCBIN "gfx/pokemon/krabby/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/krabby/shiny.pal" +INCBIN "gfx/pokemon/kingler/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/kingler/shiny.pal" +INCBIN "gfx/pokemon/voltorb/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/voltorb/shiny.pal" +INCBIN "gfx/pokemon/electrode/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/electrode/shiny.pal" +INCBIN "gfx/pokemon/exeggcute/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/exeggcute/shiny.pal" +INCBIN "gfx/pokemon/exeggutor/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/exeggutor/shiny.pal" +INCBIN "gfx/pokemon/cubone/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/cubone/shiny.pal" +INCBIN "gfx/pokemon/marowak/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/marowak/shiny.pal" +INCBIN "gfx/pokemon/hitmonlee/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/hitmonlee/shiny.pal" +INCBIN "gfx/pokemon/hitmonchan/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/hitmonchan/shiny.pal" +INCBIN "gfx/pokemon/lickitung/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/lickitung/shiny.pal" +INCBIN "gfx/pokemon/koffing/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/koffing/shiny.pal" +INCBIN "gfx/pokemon/weezing/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/weezing/shiny.pal" +INCBIN "gfx/pokemon/rhyhorn/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/rhyhorn/shiny.pal" +INCBIN "gfx/pokemon/rhydon/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/rhydon/shiny.pal" +INCBIN "gfx/pokemon/chansey/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/chansey/shiny.pal" +INCBIN "gfx/pokemon/tangela/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/tangela/shiny.pal" +INCBIN "gfx/pokemon/kangaskhan/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/kangaskhan/shiny.pal" +INCBIN "gfx/pokemon/horsea/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/horsea/shiny.pal" +INCBIN "gfx/pokemon/seadra/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/seadra/shiny.pal" +INCBIN "gfx/pokemon/goldeen/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/goldeen/shiny.pal" +INCBIN "gfx/pokemon/seaking/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/seaking/shiny.pal" +INCBIN "gfx/pokemon/staryu/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/staryu/shiny.pal" +INCBIN "gfx/pokemon/starmie/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/starmie/shiny.pal" +INCBIN "gfx/pokemon/mr__mime/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/mr__mime/shiny.pal" +INCBIN "gfx/pokemon/scyther/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/scyther/shiny.pal" +INCBIN "gfx/pokemon/jynx/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/jynx/shiny.pal" +INCBIN "gfx/pokemon/electabuzz/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/electabuzz/shiny.pal" +INCBIN "gfx/pokemon/magmar/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/magmar/shiny.pal" +INCBIN "gfx/pokemon/pinsir/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/pinsir/shiny.pal" +INCBIN "gfx/pokemon/tauros/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/tauros/shiny.pal" +INCBIN "gfx/pokemon/magikarp/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/magikarp/shiny.pal" +INCBIN "gfx/pokemon/gyarados/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/gyarados/shiny.pal" +INCBIN "gfx/pokemon/lapras/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/lapras/shiny.pal" +INCBIN "gfx/pokemon/ditto/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/ditto/shiny.pal" +INCBIN "gfx/pokemon/eevee/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/eevee/shiny.pal" +INCBIN "gfx/pokemon/vaporeon/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/vaporeon/shiny.pal" +INCBIN "gfx/pokemon/jolteon/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/jolteon/shiny.pal" +INCBIN "gfx/pokemon/flareon/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/flareon/shiny.pal" +INCBIN "gfx/pokemon/porygon/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/porygon/shiny.pal" +INCBIN "gfx/pokemon/omanyte/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/omanyte/shiny.pal" +INCBIN "gfx/pokemon/omastar/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/omastar/shiny.pal" +INCBIN "gfx/pokemon/kabuto/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/kabuto/shiny.pal" +INCBIN "gfx/pokemon/kabutops/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/kabutops/shiny.pal" +INCBIN "gfx/pokemon/aerodactyl/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/aerodactyl/shiny.pal" +INCBIN "gfx/pokemon/snorlax/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/snorlax/shiny.pal" +INCBIN "gfx/pokemon/articuno/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/articuno/shiny.pal" +INCBIN "gfx/pokemon/zapdos/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/zapdos/shiny.pal" +INCBIN "gfx/pokemon/moltres/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/moltres/shiny.pal" +INCBIN "gfx/pokemon/dratini/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/dratini/shiny.pal" +INCBIN "gfx/pokemon/dragonair/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/dragonair/shiny.pal" +INCBIN "gfx/pokemon/dragonite/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/dragonite/shiny.pal" +INCBIN "gfx/pokemon/mewtwo/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/mewtwo/shiny.pal" +INCBIN "gfx/pokemon/mew/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/mew/shiny.pal" +INCBIN "gfx/pokemon/chikorita/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/chikorita/shiny.pal" +INCBIN "gfx/pokemon/bayleef/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/bayleef/shiny.pal" +INCBIN "gfx/pokemon/meganium/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/meganium/shiny.pal" +INCBIN "gfx/pokemon/cyndaquil/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/cyndaquil/shiny.pal" +INCBIN "gfx/pokemon/quilava/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/quilava/shiny.pal" +INCBIN "gfx/pokemon/typhlosion/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/typhlosion/shiny.pal" +INCBIN "gfx/pokemon/totodile/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/totodile/shiny.pal" +INCBIN "gfx/pokemon/croconaw/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/croconaw/shiny.pal" +INCBIN "gfx/pokemon/feraligatr/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/feraligatr/shiny.pal" +INCBIN "gfx/pokemon/sentret/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/sentret/shiny.pal" +INCBIN "gfx/pokemon/furret/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/furret/shiny.pal" +INCBIN "gfx/pokemon/hoothoot/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/hoothoot/shiny.pal" +INCBIN "gfx/pokemon/noctowl/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/noctowl/shiny.pal" +INCBIN "gfx/pokemon/ledyba/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/ledyba/shiny.pal" +INCBIN "gfx/pokemon/ledian/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/ledian/shiny.pal" +INCBIN "gfx/pokemon/spinarak/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/spinarak/shiny.pal" +INCBIN "gfx/pokemon/ariados/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/ariados/shiny.pal" +INCBIN "gfx/pokemon/crobat/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/crobat/shiny.pal" +INCBIN "gfx/pokemon/chinchou/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/chinchou/shiny.pal" +INCBIN "gfx/pokemon/lanturn/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/lanturn/shiny.pal" +INCBIN "gfx/pokemon/pichu/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/pichu/shiny.pal" +INCBIN "gfx/pokemon/cleffa/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/cleffa/shiny.pal" +INCBIN "gfx/pokemon/igglybuff/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/igglybuff/shiny.pal" +INCBIN "gfx/pokemon/togepi/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/togepi/shiny.pal" +INCBIN "gfx/pokemon/togetic/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/togetic/shiny.pal" +INCBIN "gfx/pokemon/natu/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/natu/shiny.pal" +INCBIN "gfx/pokemon/xatu/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/xatu/shiny.pal" +INCBIN "gfx/pokemon/mareep/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/mareep/shiny.pal" +INCBIN "gfx/pokemon/flaaffy/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/flaaffy/shiny.pal" +INCBIN "gfx/pokemon/ampharos/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/ampharos/shiny.pal" +INCBIN "gfx/pokemon/bellossom/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/bellossom/shiny.pal" +INCBIN "gfx/pokemon/marill/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/marill/shiny.pal" +INCBIN "gfx/pokemon/azumarill/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/azumarill/shiny.pal" +INCBIN "gfx/pokemon/sudowoodo/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/sudowoodo/shiny.pal" +INCBIN "gfx/pokemon/politoed/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/politoed/shiny.pal" +INCBIN "gfx/pokemon/hoppip/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/hoppip/shiny.pal" +INCBIN "gfx/pokemon/skiploom/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/skiploom/shiny.pal" +INCBIN "gfx/pokemon/jumpluff/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/jumpluff/shiny.pal" +INCBIN "gfx/pokemon/aipom/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/aipom/shiny.pal" +INCBIN "gfx/pokemon/sunkern/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/sunkern/shiny.pal" +INCBIN "gfx/pokemon/sunflora/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/sunflora/shiny.pal" +INCBIN "gfx/pokemon/yanma/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/yanma/shiny.pal" +INCBIN "gfx/pokemon/wooper/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/wooper/shiny.pal" +INCBIN "gfx/pokemon/quagsire/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/quagsire/shiny.pal" +INCBIN "gfx/pokemon/espeon/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/espeon/shiny.pal" +INCBIN "gfx/pokemon/umbreon/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/umbreon/shiny.pal" +INCBIN "gfx/pokemon/murkrow/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/murkrow/shiny.pal" +INCBIN "gfx/pokemon/slowking/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/slowking/shiny.pal" +INCBIN "gfx/pokemon/misdreavus/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/misdreavus/shiny.pal" +INCLUDE "gfx/pokemon/unown/normal.pal" ; not front.gbcpal +INCLUDE "gfx/pokemon/unown/shiny.pal" +INCBIN "gfx/pokemon/wobbuffet/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/wobbuffet/shiny.pal" +INCBIN "gfx/pokemon/girafarig/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/girafarig/shiny.pal" +INCBIN "gfx/pokemon/pineco/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/pineco/shiny.pal" +INCBIN "gfx/pokemon/forretress/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/forretress/shiny.pal" +INCBIN "gfx/pokemon/dunsparce/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/dunsparce/shiny.pal" +INCBIN "gfx/pokemon/gligar/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/gligar/shiny.pal" +INCBIN "gfx/pokemon/steelix/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/steelix/shiny.pal" +INCBIN "gfx/pokemon/snubbull/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/snubbull/shiny.pal" +INCBIN "gfx/pokemon/granbull/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/granbull/shiny.pal" +INCBIN "gfx/pokemon/qwilfish/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/qwilfish/shiny.pal" +INCBIN "gfx/pokemon/scizor/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/scizor/shiny.pal" +INCBIN "gfx/pokemon/shuckle/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/shuckle/shiny.pal" +INCBIN "gfx/pokemon/heracross/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/heracross/shiny.pal" +INCBIN "gfx/pokemon/sneasel/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/sneasel/shiny.pal" +INCBIN "gfx/pokemon/teddiursa/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/teddiursa/shiny.pal" +INCBIN "gfx/pokemon/ursaring/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/ursaring/shiny.pal" +INCBIN "gfx/pokemon/slugma/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/slugma/shiny.pal" +INCBIN "gfx/pokemon/magcargo/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/magcargo/shiny.pal" +INCBIN "gfx/pokemon/swinub/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/swinub/shiny.pal" +INCBIN "gfx/pokemon/piloswine/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/piloswine/shiny.pal" +INCBIN "gfx/pokemon/corsola/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/corsola/shiny.pal" +INCBIN "gfx/pokemon/remoraid/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/remoraid/shiny.pal" +INCBIN "gfx/pokemon/octillery/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/octillery/shiny.pal" +INCBIN "gfx/pokemon/delibird/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/delibird/shiny.pal" +INCBIN "gfx/pokemon/mantine/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/mantine/shiny.pal" +INCBIN "gfx/pokemon/skarmory/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/skarmory/shiny.pal" +INCBIN "gfx/pokemon/houndour/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/houndour/shiny.pal" +INCBIN "gfx/pokemon/houndoom/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/houndoom/shiny.pal" +INCBIN "gfx/pokemon/kingdra/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/kingdra/shiny.pal" +INCBIN "gfx/pokemon/phanpy/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/phanpy/shiny.pal" +INCBIN "gfx/pokemon/donphan/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/donphan/shiny.pal" +INCBIN "gfx/pokemon/porygon2/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/porygon2/shiny.pal" +INCBIN "gfx/pokemon/stantler/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/stantler/shiny.pal" +INCBIN "gfx/pokemon/smeargle/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/smeargle/shiny.pal" +INCBIN "gfx/pokemon/tyrogue/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/tyrogue/shiny.pal" +INCBIN "gfx/pokemon/hitmontop/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/hitmontop/shiny.pal" +INCBIN "gfx/pokemon/smoochum/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/smoochum/shiny.pal" +INCBIN "gfx/pokemon/elekid/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/elekid/shiny.pal" +INCBIN "gfx/pokemon/magby/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/magby/shiny.pal" +INCBIN "gfx/pokemon/miltank/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/miltank/shiny.pal" +INCBIN "gfx/pokemon/blissey/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/blissey/shiny.pal" +INCBIN "gfx/pokemon/raikou/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/raikou/shiny.pal" +INCBIN "gfx/pokemon/entei/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/entei/shiny.pal" +INCBIN "gfx/pokemon/suicune/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/suicune/shiny.pal" +INCBIN "gfx/pokemon/larvitar/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/larvitar/shiny.pal" +INCBIN "gfx/pokemon/pupitar/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/pupitar/shiny.pal" +INCBIN "gfx/pokemon/tyranitar/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/tyranitar/shiny.pal" +INCBIN "gfx/pokemon/lugia/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/lugia/shiny.pal" +INCBIN "gfx/pokemon/ho_oh/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/ho_oh/shiny.pal" +INCBIN "gfx/pokemon/celebi/front.gbcpal", middle_colors +INCLUDE "gfx/pokemon/celebi/shiny.pal" + + assert_table_length NUM_POKEMON + 1 diff --git a/data/pokemon/pic_pointers.asm b/data/pokemon/pic_pointers.asm new file mode 100644 index 0000000..f4e9ba5 --- /dev/null +++ b/data/pokemon/pic_pointers.asm @@ -0,0 +1,521 @@ +; Pics are defined in gfx/pics.asm +: + table_width 3 * 2, :- + dba EggPic ; EGG is now -3, so it must go *above* the label + dbw -1, -1 ; unused + dbw -1, -1 ; unused + dbw -1, -1 ; unused + dbw -1, -1 ; unused + dbw -1, -1 ; unused + assert_table_length -EGG +PokemonPicPointers:: +; entries correspond to Pokémon species, two apiece (first index is 0) + table_width 3 * 2, PokemonPicPointers + dbw -1, -1 ; unused + dbw -1, -1 ; unused + dba BulbasaurFrontpic + dba BulbasaurBackpic + dba IvysaurFrontpic + dba IvysaurBackpic + dba VenusaurFrontpic + dba VenusaurBackpic + dba CharmanderFrontpic + dba CharmanderBackpic + dba CharmeleonFrontpic + dba CharmeleonBackpic + dba CharizardFrontpic + dba CharizardBackpic + dba SquirtleFrontpic + dba SquirtleBackpic + dba WartortleFrontpic + dba WartortleBackpic + dba BlastoiseFrontpic + dba BlastoiseBackpic + dba CaterpieFrontpic + dba CaterpieBackpic + dba MetapodFrontpic + dba MetapodBackpic + dba ButterfreeFrontpic + dba ButterfreeBackpic + dba WeedleFrontpic + dba WeedleBackpic + dba KakunaFrontpic + dba KakunaBackpic + dba BeedrillFrontpic + dba BeedrillBackpic + dba PidgeyFrontpic + dba PidgeyBackpic + dba PidgeottoFrontpic + dba PidgeottoBackpic + dba PidgeotFrontpic + dba PidgeotBackpic + dba RattataFrontpic + dba RattataBackpic + dba RaticateFrontpic + dba RaticateBackpic + dba SpearowFrontpic + dba SpearowBackpic + dba FearowFrontpic + dba FearowBackpic + dba EkansFrontpic + dba EkansBackpic + dba ArbokFrontpic + dba ArbokBackpic + dba PikachuFrontpic + dba PikachuBackpic + dba RaichuFrontpic + dba RaichuBackpic + dba SandshrewFrontpic + dba SandshrewBackpic + dba SandslashFrontpic + dba SandslashBackpic + dba NidoranFFrontpic + dba NidoranFBackpic + dba NidorinaFrontpic + dba NidorinaBackpic + dba NidoqueenFrontpic + dba NidoqueenBackpic + dba NidoranMFrontpic + dba NidoranMBackpic + dba NidorinoFrontpic + dba NidorinoBackpic + dba NidokingFrontpic + dba NidokingBackpic + dba ClefairyFrontpic + dba ClefairyBackpic + dba ClefableFrontpic + dba ClefableBackpic + dba VulpixFrontpic + dba VulpixBackpic + dba NinetalesFrontpic + dba NinetalesBackpic + dba JigglypuffFrontpic + dba JigglypuffBackpic + dba WigglytuffFrontpic + dba WigglytuffBackpic + dba ZubatFrontpic + dba ZubatBackpic + dba GolbatFrontpic + dba GolbatBackpic + dba OddishFrontpic + dba OddishBackpic + dba GloomFrontpic + dba GloomBackpic + dba VileplumeFrontpic + dba VileplumeBackpic + dba ParasFrontpic + dba ParasBackpic + dba ParasectFrontpic + dba ParasectBackpic + dba VenonatFrontpic + dba VenonatBackpic + dba VenomothFrontpic + dba VenomothBackpic + dba DiglettFrontpic + dba DiglettBackpic + dba DugtrioFrontpic + dba DugtrioBackpic + dba MeowthFrontpic + dba MeowthBackpic + dba PersianFrontpic + dba PersianBackpic + dba PsyduckFrontpic + dba PsyduckBackpic + dba GolduckFrontpic + dba GolduckBackpic + dba MankeyFrontpic + dba MankeyBackpic + dba PrimeapeFrontpic + dba PrimeapeBackpic + dba GrowlitheFrontpic + dba GrowlitheBackpic + dba ArcanineFrontpic + dba ArcanineBackpic + dba PoliwagFrontpic + dba PoliwagBackpic + dba PoliwhirlFrontpic + dba PoliwhirlBackpic + dba PoliwrathFrontpic + dba PoliwrathBackpic + dba AbraFrontpic + dba AbraBackpic + dba KadabraFrontpic + dba KadabraBackpic + dba AlakazamFrontpic + dba AlakazamBackpic + dba MachopFrontpic + dba MachopBackpic + dba MachokeFrontpic + dba MachokeBackpic + dba MachampFrontpic + dba MachampBackpic + dba BellsproutFrontpic + dba BellsproutBackpic + dba WeepinbellFrontpic + dba WeepinbellBackpic + dba VictreebelFrontpic + dba VictreebelBackpic + dba TentacoolFrontpic + dba TentacoolBackpic + dba TentacruelFrontpic + dba TentacruelBackpic + dba GeodudeFrontpic + dba GeodudeBackpic + dba GravelerFrontpic + dba GravelerBackpic + dba GolemFrontpic + dba GolemBackpic + dba PonytaFrontpic + dba PonytaBackpic + dba RapidashFrontpic + dba RapidashBackpic + dba SlowpokeFrontpic + dba SlowpokeBackpic + dba SlowbroFrontpic + dba SlowbroBackpic + dba MagnemiteFrontpic + dba MagnemiteBackpic + dba MagnetonFrontpic + dba MagnetonBackpic + dba FarfetchDFrontpic + dba FarfetchDBackpic + dba DoduoFrontpic + dba DoduoBackpic + dba DodrioFrontpic + dba DodrioBackpic + dba SeelFrontpic + dba SeelBackpic + dba DewgongFrontpic + dba DewgongBackpic + dba GrimerFrontpic + dba GrimerBackpic + dba MukFrontpic + dba MukBackpic + dba ShellderFrontpic + dba ShellderBackpic + dba CloysterFrontpic + dba CloysterBackpic + dba GastlyFrontpic + dba GastlyBackpic + dba HaunterFrontpic + dba HaunterBackpic + dba GengarFrontpic + dba GengarBackpic + dba OnixFrontpic + dba OnixBackpic + dba DrowzeeFrontpic + dba DrowzeeBackpic + dba HypnoFrontpic + dba HypnoBackpic + dba KrabbyFrontpic + dba KrabbyBackpic + dba KinglerFrontpic + dba KinglerBackpic + dba VoltorbFrontpic + dba VoltorbBackpic + dba ElectrodeFrontpic + dba ElectrodeBackpic + dba ExeggcuteFrontpic + dba ExeggcuteBackpic + dba ExeggutorFrontpic + dba ExeggutorBackpic + dba CuboneFrontpic + dba CuboneBackpic + dba MarowakFrontpic + dba MarowakBackpic + dba HitmonleeFrontpic + dba HitmonleeBackpic + dba HitmonchanFrontpic + dba HitmonchanBackpic + dba LickitungFrontpic + dba LickitungBackpic + dba KoffingFrontpic + dba KoffingBackpic + dba WeezingFrontpic + dba WeezingBackpic + dba RhyhornFrontpic + dba RhyhornBackpic + dba RhydonFrontpic + dba RhydonBackpic + dba ChanseyFrontpic + dba ChanseyBackpic + dba TangelaFrontpic + dba TangelaBackpic + dba KangaskhanFrontpic + dba KangaskhanBackpic + dba HorseaFrontpic + dba HorseaBackpic + dba SeadraFrontpic + dba SeadraBackpic + dba GoldeenFrontpic + dba GoldeenBackpic + dba SeakingFrontpic + dba SeakingBackpic + dba StaryuFrontpic + dba StaryuBackpic + dba StarmieFrontpic + dba StarmieBackpic + dba MrMimeFrontpic + dba MrMimeBackpic + dba ScytherFrontpic + dba ScytherBackpic + dba JynxFrontpic + dba JynxBackpic + dba ElectabuzzFrontpic + dba ElectabuzzBackpic + dba MagmarFrontpic + dba MagmarBackpic + dba PinsirFrontpic + dba PinsirBackpic + dba TaurosFrontpic + dba TaurosBackpic + dba MagikarpFrontpic + dba MagikarpBackpic + dba GyaradosFrontpic + dba GyaradosBackpic + dba LaprasFrontpic + dba LaprasBackpic + dba DittoFrontpic + dba DittoBackpic + dba EeveeFrontpic + dba EeveeBackpic + dba VaporeonFrontpic + dba VaporeonBackpic + dba JolteonFrontpic + dba JolteonBackpic + dba FlareonFrontpic + dba FlareonBackpic + dba PorygonFrontpic + dba PorygonBackpic + dba OmanyteFrontpic + dba OmanyteBackpic + dba OmastarFrontpic + dba OmastarBackpic + dba KabutoFrontpic + dba KabutoBackpic + dba KabutopsFrontpic + dba KabutopsBackpic + dba AerodactylFrontpic + dba AerodactylBackpic + dba SnorlaxFrontpic + dba SnorlaxBackpic + dba ArticunoFrontpic + dba ArticunoBackpic + dba ZapdosFrontpic + dba ZapdosBackpic + dba MoltresFrontpic + dba MoltresBackpic + dba DratiniFrontpic + dba DratiniBackpic + dba DragonairFrontpic + dba DragonairBackpic + dba DragoniteFrontpic + dba DragoniteBackpic + dba MewtwoFrontpic + dba MewtwoBackpic + dba MewFrontpic + dba MewBackpic + dba ChikoritaFrontpic + dba ChikoritaBackpic + dba BayleefFrontpic + dba BayleefBackpic + dba MeganiumFrontpic + dba MeganiumBackpic + dba CyndaquilFrontpic + dba CyndaquilBackpic + dba QuilavaFrontpic + dba QuilavaBackpic + dba TyphlosionFrontpic + dba TyphlosionBackpic + dba TotodileFrontpic + dba TotodileBackpic + dba CroconawFrontpic + dba CroconawBackpic + dba FeraligatrFrontpic + dba FeraligatrBackpic + dba SentretFrontpic + dba SentretBackpic + dba FurretFrontpic + dba FurretBackpic + dba HoothootFrontpic + dba HoothootBackpic + dba NoctowlFrontpic + dba NoctowlBackpic + dba LedybaFrontpic + dba LedybaBackpic + dba LedianFrontpic + dba LedianBackpic + dba SpinarakFrontpic + dba SpinarakBackpic + dba AriadosFrontpic + dba AriadosBackpic + dba CrobatFrontpic + dba CrobatBackpic + dba ChinchouFrontpic + dba ChinchouBackpic + dba LanturnFrontpic + dba LanturnBackpic + dba PichuFrontpic + dba PichuBackpic + dba CleffaFrontpic + dba CleffaBackpic + dba IgglybuffFrontpic + dba IgglybuffBackpic + dba TogepiFrontpic + dba TogepiBackpic + dba TogeticFrontpic + dba TogeticBackpic + dba NatuFrontpic + dba NatuBackpic + dba XatuFrontpic + dba XatuBackpic + dba MareepFrontpic + dba MareepBackpic + dba FlaaffyFrontpic + dba FlaaffyBackpic + dba AmpharosFrontpic + dba AmpharosBackpic + dba BellossomFrontpic + dba BellossomBackpic + dba MarillFrontpic + dba MarillBackpic + dba AzumarillFrontpic + dba AzumarillBackpic + dba SudowoodoFrontpic + dba SudowoodoBackpic + dba PolitoedFrontpic + dba PolitoedBackpic + dba HoppipFrontpic + dba HoppipBackpic + dba SkiploomFrontpic + dba SkiploomBackpic + dba JumpluffFrontpic + dba JumpluffBackpic + dba AipomFrontpic + dba AipomBackpic + dba SunkernFrontpic + dba SunkernBackpic + dba SunfloraFrontpic + dba SunfloraBackpic + dba YanmaFrontpic + dba YanmaBackpic + dba WooperFrontpic + dba WooperBackpic + dba QuagsireFrontpic + dba QuagsireBackpic + dba EspeonFrontpic + dba EspeonBackpic + dba UmbreonFrontpic + dba UmbreonBackpic + dba MurkrowFrontpic + dba MurkrowBackpic + dba SlowkingFrontpic + dba SlowkingBackpic + dba MisdreavusFrontpic + dba MisdreavusBackpic + + ; Unown pics have their own table. See UnownPicPointers + dbw -1, -1 + dbw -1, -1 + + dba WobbuffetFrontpic + dba WobbuffetBackpic + dba GirafarigFrontpic + dba GirafarigBackpic + dba PinecoFrontpic + dba PinecoBackpic + dba ForretressFrontpic + dba ForretressBackpic + dba DunsparceFrontpic + dba DunsparceBackpic + dba GligarFrontpic + dba GligarBackpic + dba SteelixFrontpic + dba SteelixBackpic + dba SnubbullFrontpic + dba SnubbullBackpic + dba GranbullFrontpic + dba GranbullBackpic + dba QwilfishFrontpic + dba QwilfishBackpic + dba ScizorFrontpic + dba ScizorBackpic + dba ShuckleFrontpic + dba ShuckleBackpic + dba HeracrossFrontpic + dba HeracrossBackpic + dba SneaselFrontpic + dba SneaselBackpic + dba TeddiursaFrontpic + dba TeddiursaBackpic + dba UrsaringFrontpic + dba UrsaringBackpic + dba SlugmaFrontpic + dba SlugmaBackpic + dba MagcargoFrontpic + dba MagcargoBackpic + dba SwinubFrontpic + dba SwinubBackpic + dba PiloswineFrontpic + dba PiloswineBackpic + dba CorsolaFrontpic + dba CorsolaBackpic + dba RemoraidFrontpic + dba RemoraidBackpic + dba OctilleryFrontpic + dba OctilleryBackpic + dba DelibirdFrontpic + dba DelibirdBackpic + dba MantineFrontpic + dba MantineBackpic + dba SkarmoryFrontpic + dba SkarmoryBackpic + dba HoundourFrontpic + dba HoundourBackpic + dba HoundoomFrontpic + dba HoundoomBackpic + dba KingdraFrontpic + dba KingdraBackpic + dba PhanpyFrontpic + dba PhanpyBackpic + dba DonphanFrontpic + dba DonphanBackpic + dba Porygon2Frontpic + dba Porygon2Backpic + dba StantlerFrontpic + dba StantlerBackpic + dba SmeargleFrontpic + dba SmeargleBackpic + dba TyrogueFrontpic + dba TyrogueBackpic + dba HitmontopFrontpic + dba HitmontopBackpic + dba SmoochumFrontpic + dba SmoochumBackpic + dba ElekidFrontpic + dba ElekidBackpic + dba MagbyFrontpic + dba MagbyBackpic + dba MiltankFrontpic + dba MiltankBackpic + dba BlisseyFrontpic + dba BlisseyBackpic + dba RaikouFrontpic + dba RaikouBackpic + dba EnteiFrontpic + dba EnteiBackpic + dba SuicuneFrontpic + dba SuicuneBackpic + dba LarvitarFrontpic + dba LarvitarBackpic + dba PupitarFrontpic + dba PupitarBackpic + dba TyranitarFrontpic + dba TyranitarBackpic + dba LugiaFrontpic + dba LugiaBackpic + dba HoOhFrontpic + dba HoOhBackpic + dba CelebiFrontpic + dba CelebiBackpic + assert_table_length NUM_POKEMON + 1 diff --git a/data/pokemon/unown_pic_pointers.asm b/data/pokemon/unown_pic_pointers.asm new file mode 100644 index 0000000..3617ddf --- /dev/null +++ b/data/pokemon/unown_pic_pointers.asm @@ -0,0 +1,56 @@ +UnownPicPointers:: +; entries correspond to Unown letters, two apiece + table_width 3 * 2, UnownPicPointers + dba UnownAFrontpic + dba UnownABackpic + dba UnownBFrontpic + dba UnownBBackpic + dba UnownCFrontpic + dba UnownCBackpic + dba UnownDFrontpic + dba UnownDBackpic + dba UnownEFrontpic + dba UnownEBackpic + dba UnownFFrontpic + dba UnownFBackpic + dba UnownGFrontpic + dba UnownGBackpic + dba UnownHFrontpic + dba UnownHBackpic + dba UnownIFrontpic + dba UnownIBackpic + dba UnownJFrontpic + dba UnownJBackpic + dba UnownKFrontpic + dba UnownKBackpic + dba UnownLFrontpic + dba UnownLBackpic + dba UnownMFrontpic + dba UnownMBackpic + dba UnownNFrontpic + dba UnownNBackpic + dba UnownOFrontpic + dba UnownOBackpic + dba UnownPFrontpic + dba UnownPBackpic + dba UnownQFrontpic + dba UnownQBackpic + dba UnownRFrontpic + dba UnownRBackpic + dba UnownSFrontpic + dba UnownSBackpic + dba UnownTFrontpic + dba UnownTBackpic + dba UnownUFrontpic + dba UnownUBackpic + dba UnownVFrontpic + dba UnownVBackpic + dba UnownWFrontpic + dba UnownWBackpic + dba UnownXFrontpic + dba UnownXBackpic + dba UnownYFrontpic + dba UnownYBackpic + dba UnownZFrontpic + dba UnownZBackpic + assert_table_length NUM_UNOWN diff --git a/data/pokemon/unown_words.asm b/data/pokemon/unown_words.asm new file mode 100644 index 0000000..f6acb4a --- /dev/null +++ b/data/pokemon/unown_words.asm @@ -0,0 +1,65 @@ +MACRO unownword +for n, CHARLEN(\1) + db CHARSUB(\1, n + 1) - "A" + FIRST_UNOWN_CHAR +endr + db -1 +ENDM + +UnownWords: +; entries correspond to UNOWN_* form constants + table_width 2, UnownWords + dw UnownWordA ; unused + dw UnownWordA + dw UnownWordB + dw UnownWordC + dw UnownWordD + dw UnownWordE + dw UnownWordF + dw UnownWordG + dw UnownWordH + dw UnownWordI + dw UnownWordJ + dw UnownWordK + dw UnownWordL + dw UnownWordM + dw UnownWordN + dw UnownWordO + dw UnownWordP + dw UnownWordQ + dw UnownWordR + dw UnownWordS + dw UnownWordT + dw UnownWordU + dw UnownWordV + dw UnownWordW + dw UnownWordX + dw UnownWordY + dw UnownWordZ + assert_table_length NUM_UNOWN + 1 + +UnownWordA: unownword "ANGRY" +UnownWordB: unownword "BEAR" +UnownWordC: unownword "CHASE" +UnownWordD: unownword "DIRECT" +UnownWordE: unownword "ENGAGE" +UnownWordF: unownword "FIND" +UnownWordG: unownword "GIVE" +UnownWordH: unownword "HELP" +UnownWordI: unownword "INCREASE" +UnownWordJ: unownword "JOIN" +UnownWordK: unownword "KEEP" +UnownWordL: unownword "LAUGH" +UnownWordM: unownword "MAKE" +UnownWordN: unownword "NUZZLE" +UnownWordO: unownword "OBSERVE" +UnownWordP: unownword "PERFORM" +UnownWordQ: unownword "QUICKEN" +UnownWordR: unownword "REASSURE" +UnownWordS: unownword "SEARCH" +UnownWordT: unownword "TELL" +UnownWordU: unownword "UNDO" +UnownWordV: unownword "VANISH" +UnownWordW: unownword "WANT" +UnownWordX: unownword "XXXXX" +UnownWordY: unownword "YIELD" +UnownWordZ: unownword "ZOOM" diff --git a/data/predef_pointers.asm b/data/predef_pointers.asm new file mode 100644 index 0000000..7a8e799 --- /dev/null +++ b/data/predef_pointers.asm @@ -0,0 +1,83 @@ +; Predef routines can be used with the "predef" and "predef_jump" macros. +; This preserves registers bc, de, hl and f. + +MACRO add_predef +\1Predef:: + dab \1 +ENDM + +PredefPointers:: + add_predef LearnMove + add_predef DummyPredef1 + add_predef HealParty ; this is both a special and a predef + add_predef SmallFarFlagAction + add_predef ComputeHPBarPixels + add_predef FillPP + add_predef TryAddMonToParty + add_predef AddTempmonToParty + add_predef SendGetMonIntoFromBox + add_predef SendMonIntoBox + add_predef GiveEgg + add_predef AnimateHPBar + add_predef CalcMonStats + add_predef CalcMonStatC + add_predef CanLearnTMHMMove + add_predef GetTMHMMove + add_predef LinkTextboxAtHL + add_predef PrintMoveDescription + add_predef UpdatePlayerHUD + add_predef PlaceGraphic + add_predef CheckPlayerPartyForFitMon + add_predef UpdateEnemyHUD + add_predef StartBattle + add_predef FillInExpBar + add_predef GetBattleMonBackpic + add_predef GetEnemyMonFrontpic + add_predef LearnLevelMoves + add_predef FillMoves + add_predef EvolveAfterBattle + add_predef TradeAnimationPlayer2 + add_predef TradeAnimation + add_predef CopyMonToTempMon + add_predef ListMoves + add_predef PlaceNonFaintStatus + add_predef Unused_PlaceEnemyHPLevel + add_predef ListMovePP + add_predef GetGender + add_predef StatsScreenInit + add_predef DrawPlayerHP + add_predef DrawEnemyHP + add_predef PrintTempMonStats + add_predef GetTypeName + add_predef PrintMoveType + add_predef PrintType + add_predef PrintMonTypes + add_predef GetUnownLetter + add_predef LoadPoisonBGPals + add_predef DummyPredef2F + add_predef InitSGBBorder + add_predef LoadSGBLayout + add_predef Pokedex_GetArea + add_predef Unused_CheckShininess + add_predef DoBattleTransition + add_predef DummyPredef35 + add_predef DummyPredef36 + add_predef PlayBattleAnim + add_predef DummyPredef38 + add_predef DummyPredef39 + add_predef DummyPredef3A + add_predef PartyMonItemName + add_predef GetMonFrontpic + add_predef GetMonBackpic + add_predef GetAnimatedFrontpic + add_predef GetTrainerPic + add_predef DecompressGet2bpp + add_predef CheckTypeMatchup + add_predef ConvertMon_1to2 + add_predef NewPokedexEntry + add_predef Unused_AnimateMon_Slow_Normal + add_predef PlaceStatusString + add_predef LoadMonAnimation + add_predef AnimateFrontpic + add_predef Unused_HOF_AnimateAlignedFrontpic + add_predef HOF_AnimateFrontpic diff --git a/data/radio/buenas_passwords.asm b/data/radio/buenas_passwords.asm new file mode 100644 index 0000000..df90214 --- /dev/null +++ b/data/radio/buenas_passwords.asm @@ -0,0 +1,31 @@ +BuenasPasswordTable: + table_width 2, BuenasPasswordTable + dw .JohtoStarters + dw .Beverages + dw .HealingItems + dw .Balls + dw .Pokemon1 + dw .Pokemon2 + dw .JohtoTowns + dw .Types + dw .Moves + dw .XItems + dw .RadioStations + assert_table_length NUM_PASSWORD_CATEGORIES + + ; string type, points, option 1, option 2, option 3 +.JohtoStarters: db BUENA_MON, 10 + dw CYNDAQUIL, TOTODILE, CHIKORITA +.Beverages: db BUENA_ITEM, 12, FRESH_WATER, SODA_POP, LEMONADE +.HealingItems: db BUENA_ITEM, 12, POTION, ANTIDOTE, PARLYZ_HEAL +.Balls: db BUENA_ITEM, 12, POKE_BALL, GREAT_BALL, ULTRA_BALL +.Pokemon1: db BUENA_MON, 10 + dw PIKACHU, RATTATA, GEODUDE +.Pokemon2: db BUENA_MON, 10 + dw HOOTHOOT, SPINARAK, DROWZEE +.JohtoTowns: db BUENA_STRING, 16, "NEW BARK TOWN@", "CHERRYGROVE CITY@", "AZALEA TOWN@" +.Types: db BUENA_STRING, 6, "FLYING@", "BUG@", "GRASS@" +.Moves: db BUENA_MOVE, 12 + dw TACKLE, GROWL, MUD_SLAP +.XItems: db BUENA_ITEM, 12, X_ATTACK, X_DEFEND, X_SPEED +.RadioStations: db BUENA_STRING, 13, "#MON Talk@", "#MON Music@", "Lucky Channel@" diff --git a/data/radio/channel_music.asm b/data/radio/channel_music.asm new file mode 100644 index 0000000..5a74ea7 --- /dev/null +++ b/data/radio/channel_music.asm @@ -0,0 +1,15 @@ +RadioChannelSongs: +; entries correspond to radio channel ids (see constants/radio_constants.asm) + table_width 2, RadioChannelSongs + dw MUSIC_POKEMON_TALK + dw MUSIC_POKEMON_CENTER + dw MUSIC_TITLE + dw MUSIC_GAME_CORNER + dw MUSIC_BUENAS_PASSWORD + dw MUSIC_VIRIDIAN_CITY + dw MUSIC_BICYCLE + dw MUSIC_ROCKET_OVERTURE + dw MUSIC_POKE_FLUTE_CHANNEL + dw MUSIC_RUINS_OF_ALPH_RADIO + dw MUSIC_LAKE_OF_RAGE_ROCKET_RADIO + assert_table_length NUM_RADIO_CHANNELS diff --git a/data/radio/oaks_pkmn_talk_routes.asm b/data/radio/oaks_pkmn_talk_routes.asm new file mode 100644 index 0000000..acef4bd --- /dev/null +++ b/data/radio/oaks_pkmn_talk_routes.asm @@ -0,0 +1,19 @@ +; Oak's Pokémon Talk will list wild Pokémon on these maps. + +OaksPKMNTalkRoutes: + map_id ROUTE_29 + map_id ROUTE_46 + map_id ROUTE_30 + map_id ROUTE_32 + map_id ROUTE_34 + map_id ROUTE_35 + map_id ROUTE_37 + map_id ROUTE_38 + map_id ROUTE_39 + map_id ROUTE_42 + map_id ROUTE_43 + map_id ROUTE_44 + map_id ROUTE_45 + map_id ROUTE_36 + map_id ROUTE_31 +.End diff --git a/data/radio/pnp_hidden_people.asm b/data/radio/pnp_hidden_people.asm new file mode 100644 index 0000000..5eb1785 --- /dev/null +++ b/data/radio/pnp_hidden_people.asm @@ -0,0 +1,26 @@ +; Places and People will not describe these trainers. + +PnP_HiddenPeople: + db WILL + db BRUNO + db KAREN + db KOGA + db CHAMPION + ; fallthrough +PnP_HiddenPeople_BeatE4: + db BROCK + db MISTY + db LT_SURGE + db ERIKA + db JANINE + db SABRINA + db BLAINE + db BLUE + ; fallthrough +PnP_HiddenPeople_BeatKanto: + db RIVAL1 + db POKEMON_PROF + db CAL + db RIVAL2 + db RED + db -1 diff --git a/data/radio/pnp_places.asm b/data/radio/pnp_places.asm new file mode 100644 index 0000000..540078e --- /dev/null +++ b/data/radio/pnp_places.asm @@ -0,0 +1,13 @@ +; Places and People will describe the landmarks of these maps. + +PnP_Places: + map_id PALLET_TOWN ; PALLET_TOWN + map_id ROUTE_22 ; ROUTE_22 + map_id PEWTER_CITY ; PEWTER_CITY + map_id CERULEAN_POLICE_STATION ; CERULEAN_CITY + map_id ROUTE_12 ; ROUTE_12 + map_id ROUTE_11 ; ROUTE_11 + map_id ROUTE_16 ; ROUTE_16 + map_id ROUTE_14 ; ROUTE_14 + map_id CINNABAR_POKECENTER_2F_BETA ; CINNABAR_ISLAND +.End diff --git a/data/sgb_ctrl_packets.asm b/data/sgb_ctrl_packets.asm new file mode 100644 index 0000000..fa3ce5e --- /dev/null +++ b/data/sgb_ctrl_packets.asm @@ -0,0 +1,133 @@ +; macros taken from pokered's data/sgb_packets.asm +; names taken from pandocs +; http://gbdev.gg8.se/wiki/articles/SGB_Functions#SGB_Palette_Commands + +MACRO sgb_pal_trn + db (SGB_PAL_TRN << 3) + 1 + ds 15 +ENDM + +MACRO sgb_mlt_req + db (SGB_MLT_REQ << 3) + 1 + db \1 - 1 + ds 14 +ENDM + +MACRO sgb_chr_trn + db (SGB_CHR_TRN << 3) + 1 + db \1 + (\2 << 1) + ds 14 +ENDM + +MACRO sgb_pct_trn + db (SGB_PCT_TRN << 3) + 1 + ds 15 +ENDM + +MACRO sgb_mask_en + db (SGB_MASK_EN << 3) + 1 + db \1 + ds 14 +ENDM + +MACRO sgb_data_snd + db (SGB_DATA_SND << 3) + 1 + dw \1 ; address + db \2 ; bank + db \3 ; length (1-11) +ENDM + +; Crystal does not support SGB, so this is unused. + +PalTrnPacket: sgb_pal_trn +MltReq1Packet: sgb_mlt_req 1 +MltReq2Packet: sgb_mlt_req 2 +ChrTrnPacket: sgb_chr_trn 0, 0 +PctTrnPacket: sgb_pct_trn + +MaskEnFreezePacket: sgb_mask_en 1 +MaskEnCancelPacket: sgb_mask_en 0 + +; These are packets containing SNES code. +; This set of packets is found in several Japanese SGB-compatible titles. +; It appears to be part of NCL's SGB devkit. + +DataSndPacket1: + sgb_data_snd $085d, $0, 11 + db $8c ; cpx #$8c (2) + db $d0, $f4 ; bne -$0c + db $60 ; rts + ds 7 + +DataSndPacket2: + sgb_data_snd $0852, $0, 11 + db $a9, $e7 ; lda #$e7 + db $9f, $01, $c0, $7e ; sta $7ec001, x + db $e8 ; inx + db $e8 ; inx + db $e8 ; inx + db $e8 ; inx + db $e0 ; cpx #$8c (1) + +DataSndPacket3: + sgb_data_snd $0847, $0, 11 + db $c4 ; cmp #$c4 (2) + db $d0, $16 ; bne +$16 + db $a5 ; lda dp + db $cb ; wai + db $c9, $05 ; cmp #$05 + db $d0, $10 ; bne +$10 + db $a2, $28 ; ldx #$28 + +DataSndPacket4: + sgb_data_snd $083c, $0, 11 + db $f0, $12 ; beq +$12 + db $a5 ; lda dp + db $c9, $c9 ; cmp #$c9 + db $c8 ; iny + db $d0, $1c ; bne +$1c + db $a5 ; lda dp + db $ca ; dex + db $c9 ; cmp #$c4 (1) + +DataSndPacket5: + sgb_data_snd $0831, $0, 11 + dbw $0c, $caa5 ; tsb $caa5 + db $c9, $7e ; cmp #$7e + db $d0, $06 ; bne +$06 + db $a5 ; lda dp + db $cb ; wai + db $c9, $7e ; cmp #$7e + +DataSndPacket6: + sgb_data_snd $0826, $0, 11 + db $39 ; bne +$39 (2) + dbw $cd, $0c48 ; cmp $0c48 + db $d0, $34 ; bne +$34 + db $a5 ; lda dp + db $c9, $c9 ; cmp #$c9 + db $80, $d0 ; bra -$30 + +DataSndPacket7: + sgb_data_snd $081b, $0, 11 + db $ea ; nop + db $ea ; nop + db $ea ; nop + db $ea ; nop + db $ea ; nop + ; $0820: + db $a9, $01 ; lda #01 + dbw $cd, $0c4f ; cmp $c4f + db $d0 ; bne +$39 (1) + +DataSndPacket8: + sgb_data_snd $0810, $0, 11 + dbw $4c, $0820 ; jmp $0820 + db $ea ; nop + db $ea ; nop + db $ea ; nop + db $ea ; nop + db $ea ; nop + db $60 ; rts + db $ea ; nop + db $ea ; nop diff --git a/data/sprite_anims/framesets.asm b/data/sprite_anims/framesets.asm new file mode 100644 index 0000000..115d82d --- /dev/null +++ b/data/sprite_anims/framesets.asm @@ -0,0 +1,499 @@ +SpriteAnimFrameData: +; entries correspond to SPRITE_ANIM_FRAMESET_* constants (see constants/sprite_anim_constants.asm) + table_width 2, SpriteAnimFrameData + dw .Frameset_00 + dw .Frameset_PartyMon + dw .Frameset_PartyMonWithMail + dw .Frameset_PartyMonWithItem + dw .Frameset_PartyMonFast + dw .Frameset_PartyMonWithMailFast + dw .Frameset_PartyMonWithItemFast + dw .Frameset_GSTitleTrail + dw .Frameset_TextEntryCursor + dw .Frameset_TextEntryCursorBig + dw .Frameset_GameFreakLogo + dw .Frameset_GSGameFreakLogoStar + dw .Frameset_GSGameFreakLogoSparkle + dw .Frameset_SlotsGolem + dw .Frameset_SlotsChansey + dw .Frameset_SlotsChansey2 + dw .Frameset_SlotsEgg + dw .Frameset_RedWalk + dw .Frameset_StillCursor + dw .Frameset_TradePokeBall + dw .Frameset_TradePokeBallWobble + dw .Frameset_TradePoof + dw .Frameset_TradeTubeBulge + dw .Frameset_TrademonIcon + dw .Frameset_TrademonBubble + dw .Frameset_EvolutionBallOfLight + dw .Frameset_RadioTuningKnob + dw .Frameset_MagnetTrainRed + dw .Frameset_Unused1C + dw .Frameset_Leaf + dw .Frameset_CutTree + dw .Frameset_EggCrack + dw .Frameset_EggHatch1 + dw .Frameset_EggHatch2 + dw .Frameset_EggHatch3 + dw .Frameset_EggHatch4 + dw .Frameset_GSIntroHoOhLugia + dw .Frameset_HeadbuttTree + dw .Frameset_EZChatCursor1 + dw .Frameset_EZChatCursor2 + dw .Frameset_EZChatCursor3 + dw .Frameset_EZChatCursor4 + dw .Frameset_EZChatCursor5 + dw .Frameset_EZChatCursor6 + dw .Frameset_EZChatCursor7 + dw .Frameset_BlueWalk + dw .Frameset_MagnetTrainBlue + dw .Frameset_MobileTradeSentBall + dw .Frameset_MobileTradeOTBall + dw .Frameset_MobileTradeCableBulge + dw .Frameset_MobileTradeSentPulse + dw .Frameset_MobileTradeOTPulse + dw .Frameset_MobileTradePing + dw .Frameset_IntroSuicune + dw .Frameset_IntroSuicune2 + dw .Frameset_IntroPichu + dw .Frameset_IntroWooper + dw .Frameset_IntroUnown1 + dw .Frameset_IntroUnown2 + dw .Frameset_IntroUnown3 + dw .Frameset_IntroUnown4 + dw .Frameset_IntroUnownF2 + dw .Frameset_IntroSuicuneAway + dw .Frameset_IntroUnownF + dw .Frameset_CelebiLeft + dw .Frameset_CelebiRight + assert_table_length NUM_SPRITE_ANIM_FRAMESETS + +.Frameset_00: + oamframe SPRITE_ANIM_OAMSET_RED_WALK_1, 32 + oamend + +.Frameset_PartyMon: + oamframe SPRITE_ANIM_OAMSET_RED_WALK_1, 8 + oamframe SPRITE_ANIM_OAMSET_RED_WALK_2, 8 + oamrestart + +.Frameset_PartyMonWithMail: + oamframe SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_1, 8 + oamframe SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_2, 8 + oamrestart + +.Frameset_PartyMonWithItem: + oamframe SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_1, 8 + oamframe SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_2, 8 + oamrestart + +.Frameset_PartyMonFast: + oamframe SPRITE_ANIM_OAMSET_RED_WALK_1, 4 + oamframe SPRITE_ANIM_OAMSET_RED_WALK_2, 4 + oamrestart + +.Frameset_PartyMonWithMailFast: + oamframe SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_1, 4 + oamframe SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_2, 4 + oamrestart + +.Frameset_PartyMonWithItemFast: + oamframe SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_1, 4 + oamframe SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_2, 4 + oamrestart + +.Frameset_RedWalk: + oamframe SPRITE_ANIM_OAMSET_RED_WALK_1, 8 + oamframe SPRITE_ANIM_OAMSET_RED_WALK_2, 8 + oamframe SPRITE_ANIM_OAMSET_RED_WALK_1, 8 + oamframe SPRITE_ANIM_OAMSET_RED_WALK_2, 8, OAM_X_FLIP + oamrestart + +.Frameset_BlueWalk: + oamframe SPRITE_ANIM_OAMSET_BLUE_WALK_1, 8 + oamframe SPRITE_ANIM_OAMSET_BLUE_WALK_2, 8 + oamframe SPRITE_ANIM_OAMSET_BLUE_WALK_1, 8 + oamframe SPRITE_ANIM_OAMSET_BLUE_WALK_2, 8, OAM_X_FLIP + oamrestart + +.Frameset_MagnetTrainBlue: + oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_1, 8 + oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2, 8 + oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_1, 8 + oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2, 8, OAM_X_FLIP + oamrestart + +.Frameset_GSTitleTrail: + oamframe SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_1, 1 + oamframe SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_2, 1 + oamrestart + +.Frameset_TextEntryCursor: + oamframe SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR, 1 + oamwait 1 + oamrestart + +.Frameset_TextEntryCursorBig: + oamframe SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR_BIG, 1 + oamwait 1 + oamrestart + +.Frameset_GameFreakLogo: + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_1, 12 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_2, 1 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_3, 1 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_2, 4 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_1, 12 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_2, 12 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_3, 4 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_4, 32 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_5, 3 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_6, 3 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_7, 4 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_8, 4 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_9, 4 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_10, 10 + oamframe SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_11, 7 + oamend + +.Frameset_GSGameFreakLogoStar: + oamframe SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_STAR, 3 + oamframe SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_STAR, 3, OAM_Y_FLIP + oamrestart + +.Frameset_GSGameFreakLogoSparkle: + oamframe SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_SPARKLE_1, 2 + oamframe SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_SPARKLE_2, 2 + oamframe SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_SPARKLE_3, 2 + oamframe SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_SPARKLE_2, 2 + oamrestart + +.Frameset_SlotsGolem: + oamframe SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1, 7 + oamframe SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2, 7 + oamframe SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1, 7, OAM_Y_FLIP + oamframe SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2, 7, OAM_X_FLIP + oamrestart + +.Frameset_SlotsChansey: + oamframe SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_1, 7 + oamframe SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_2, 7 + oamframe SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_1, 7 + oamframe SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_3, 7 + oamrestart + +.Frameset_SlotsChansey2: + oamframe SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_1, 7 + oamframe SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_4, 7 + oamframe SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_5, 7 + oamframe SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_4, 7 + oamframe SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_1, 7 + oamend + +.Frameset_SlotsEgg: + oamframe SPRITE_ANIM_OAMSET_SLOTS_EGG, 20 + oamend + +.Frameset_StillCursor: + oamframe SPRITE_ANIM_OAMSET_STILL_CURSOR, 32 + oamend + +.Frameset_TradePokeBall: + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 32 + oamend + +.Frameset_TradePokeBallWobble: + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamrestart + +.Frameset_TradePoof: + oamframe SPRITE_ANIM_OAMSET_TRADE_POOF_1, 4 + oamframe SPRITE_ANIM_OAMSET_TRADE_POOF_2, 4 + oamframe SPRITE_ANIM_OAMSET_TRADE_POOF_3, 4 + oamdelete + +.Frameset_TradeTubeBulge: + oamframe SPRITE_ANIM_OAMSET_TRADE_TUBE_BULGE_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_TUBE_BULGE_2, 3 + oamrestart + +.Frameset_TrademonIcon: + oamframe SPRITE_ANIM_OAMSET_TRADEMON_ICON_1, 7 + oamframe SPRITE_ANIM_OAMSET_TRADEMON_ICON_2, 7 + oamrestart + +.Frameset_TrademonBubble: + oamframe SPRITE_ANIM_OAMSET_TRADEMON_BUBBLE, 32 + oamend + +.Frameset_EvolutionBallOfLight: + oamframe SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_2, 2 + oamframe SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_1, 2 + oamframe SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_2, 2 + oamend + +.Frameset_RadioTuningKnob: + oamframe SPRITE_ANIM_OAMSET_RADIO_TUNING_KNOB, 32 + oamend + +.Frameset_MagnetTrainRed: + oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_1, 8 + oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2, 8 + oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_1, 8 + oamframe SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2, 8, OAM_X_FLIP + oamrestart + +.Frameset_Unknown1: ; unreferenced + oamframe SPRITE_ANIM_OAMSET_UNUSED_43, 8 + oamframe SPRITE_ANIM_OAMSET_UNUSED_44, 8 + oamrestart + +.Frameset_Unknown2: ; unreferenced + oamframe SPRITE_ANIM_OAMSET_UNUSED_45, 8 + oamframe SPRITE_ANIM_OAMSET_UNUSED_46, 8 + oamrestart + +.Frameset_Unknown3: ; unreferenced + oamframe SPRITE_ANIM_OAMSET_UNUSED_47, 8 + oamframe SPRITE_ANIM_OAMSET_UNUSED_48, 8 + oamrestart + +.Frameset_Unknown4: ; unreferenced + oamframe SPRITE_ANIM_OAMSET_UNUSED_49, 1 + oamframe SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_X_FLIP, OAM_Y_FLIP + oamframe SPRITE_ANIM_OAMSET_UNUSED_49, 1, OAM_Y_FLIP + oamrestart + +.Frameset_Unknown5: ; unreferenced + oamframe SPRITE_ANIM_OAMSET_UNUSED_4A, 32 + oamend + +.Frameset_Unknown6: ; unreferenced + oamframe SPRITE_ANIM_OAMSET_UNUSED_4B, 32 + oamend + +.Frameset_Unknown7: ; unreferenced + oamframe SPRITE_ANIM_OAMSET_UNUSED_4C, 32 + oamend + +.Frameset_Unknown8: ; unreferenced + oamframe SPRITE_ANIM_OAMSET_UNUSED_4D, 32 + oamend + +.Frameset_Unknown9: ; unreferenced + oamframe SPRITE_ANIM_OAMSET_UNUSED_4E, 3 + oamwait 3 + oamrestart + +.Frameset_Unused1C: + oamwait 32 + oamend + +.Frameset_Leaf: + oamframe SPRITE_ANIM_OAMSET_LEAF, 32 + oamend + +.Frameset_CutTree: + oamframe SPRITE_ANIM_OAMSET_TREE_1, 2 + oamframe SPRITE_ANIM_OAMSET_CUT_TREE_2, 16 + oamwait 1 + oamframe SPRITE_ANIM_OAMSET_CUT_TREE_3, 1 + oamwait 1 + oamframe SPRITE_ANIM_OAMSET_CUT_TREE_4, 1 + oamdelete + +.Frameset_EggCrack: + oamframe SPRITE_ANIM_OAMSET_EGG_CRACK, 32 + oamend + +.Frameset_EggHatch1: + oamframe SPRITE_ANIM_OAMSET_EGG_HATCH, 32 + oamend + +.Frameset_EggHatch2: + oamframe SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAM_X_FLIP + oamend + +.Frameset_EggHatch3: + oamframe SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAM_Y_FLIP + oamend + +.Frameset_EggHatch4: + oamframe SPRITE_ANIM_OAMSET_EGG_HATCH, 32, OAM_X_FLIP, OAM_Y_FLIP + oamend + +.Frameset_GSIntroHoOhLugia: + oamframe SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_1, 10 + oamframe SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_2, 9 + oamframe SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_3, 10 + oamframe SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_4, 10 + oamframe SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_3, 9 + oamframe SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_5, 10 + oamrestart + +.Frameset_HeadbuttTree: + oamframe SPRITE_ANIM_OAMSET_TREE_1, 2 + oamframe SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2, 2 + oamframe SPRITE_ANIM_OAMSET_TREE_1, 2 + oamframe SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2, 2, OAM_X_FLIP + oamrestart + +.Frameset_EZChatCursor1: + oamframe SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_1, 2 + oamend + +.Frameset_EZChatCursor2: + oamframe SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_2, 2 + oamend + +.Frameset_EZChatCursor3: + oamframe SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_3, 2 + oamend + +.Frameset_EZChatCursor4: + oamframe SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_4, 2 + oamend + +.Frameset_EZChatCursor5: + oamframe SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_5, 2 + oamend + +.Frameset_EZChatCursor6: + oamframe SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_6, 2 + oamend + +.Frameset_EZChatCursor7: + oamframe SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_7, 2 + oamend + +.Frameset_MobileTradeSentBall: + oamframe SPRITE_ANIM_OAMSET_TRADE_POOF_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POOF_2, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POOF_3, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamend + +.Frameset_MobileTradeOTBall: + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_TRADE_POOF_1, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POOF_2, 3 + oamframe SPRITE_ANIM_OAMSET_TRADE_POOF_3, 3 + oamdelete + +.Frameset_MobileTradeCableBulge: + oamframe SPRITE_ANIM_OAMSET_MOBILE_TRADE_CABLE_BULGE_1, 3 + oamframe SPRITE_ANIM_OAMSET_MOBILE_TRADE_CABLE_BULGE_2, 3 + oamrestart + +.Frameset_MobileTradeSentPulse: + oamframe SPRITE_ANIM_OAMSET_MOBILE_TRADE_SENT_PULSE, 3 + oamend + +.Frameset_MobileTradeOTPulse: + oamframe SPRITE_ANIM_OAMSET_MOBILE_TRADE_OT_PULSE, 3 + oamend + +.Frameset_MobileTradePing: + oamframe SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_1, 2 + oamframe SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_2, 2 + oamframe SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_3, 2 + oamdelete + +.Frameset_IntroSuicune: + oamframe SPRITE_ANIM_OAMSET_INTRO_SUICUNE_1, 3 + oamframe SPRITE_ANIM_OAMSET_INTRO_SUICUNE_2, 3 + oamframe SPRITE_ANIM_OAMSET_INTRO_SUICUNE_3, 3 + oamframe SPRITE_ANIM_OAMSET_INTRO_SUICUNE_4, 3 + oamrestart + +.Frameset_IntroSuicune2: + oamframe SPRITE_ANIM_OAMSET_INTRO_SUICUNE_4, 3 + oamframe SPRITE_ANIM_OAMSET_INTRO_SUICUNE_1, 7 + oamend + +.Frameset_IntroPichu: + oamframe SPRITE_ANIM_OAMSET_INTRO_PICHU_1, 32 + oamframe SPRITE_ANIM_OAMSET_INTRO_PICHU_2, 7 + oamframe SPRITE_ANIM_OAMSET_INTRO_PICHU_3, 7 + oamend + +.Frameset_IntroWooper: + oamframe SPRITE_ANIM_OAMSET_INTRO_WOOPER, 3 + oamend + +.Frameset_IntroUnown1: + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3 + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3 + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7 + oamdelete + +.Frameset_IntroUnown2: + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, OAM_X_FLIP + oamdelete + +.Frameset_IntroUnown3: + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, OAM_Y_FLIP + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, OAM_Y_FLIP + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, OAM_Y_FLIP + oamdelete + +.Frameset_IntroUnown4: + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_1, 3, OAM_X_FLIP, OAM_Y_FLIP + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_2, 3, OAM_X_FLIP, OAM_Y_FLIP + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_3, 7, OAM_X_FLIP, OAM_Y_FLIP + oamdelete + +.Frameset_IntroUnownF2: + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_1, 3 + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_2, 3 + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_3, 3 + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_4, 7 + oamframe SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_5, 7 + oamend + +.Frameset_IntroSuicuneAway: + oamframe SPRITE_ANIM_OAMSET_INTRO_SUICUNE_AWAY, 3 + oamend + +.Frameset_IntroUnownF: + oamwait 0 + oamend + +.Frameset_CelebiLeft: + oamframe SPRITE_ANIM_OAMSET_CELEBI_1, 8 + oamframe SPRITE_ANIM_OAMSET_CELEBI_2, 8 + oamend + +.Frameset_CelebiRight: + oamframe SPRITE_ANIM_OAMSET_CELEBI_1, 8, OAM_X_FLIP + oamframe SPRITE_ANIM_OAMSET_CELEBI_2, 8, OAM_X_FLIP + oamend diff --git a/data/sprite_anims/oam.asm b/data/sprite_anims/oam.asm new file mode 100644 index 0000000..e7099b0 --- /dev/null +++ b/data/sprite_anims/oam.asm @@ -0,0 +1,1135 @@ +MACRO spriteanimoam +; vtile offset, data pointer + db \1 + dw \2 +ENDM + +SpriteAnimOAMData: +; entries correspond to SPRITE_ANIM_OAMSET_* constants (see constants/sprite_anim_constants.asm) + table_width 3, SpriteAnimOAMData + spriteanimoam $00, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_RED_WALK_1 + spriteanimoam $04, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_RED_WALK_2 + spriteanimoam $4c, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_INTRO_BUBBLE_1 + spriteanimoam $5c, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_INTRO_BUBBLE_2 + spriteanimoam $6c, .OAMData_GSIntroShellder ; SPRITE_ANIM_OAMSET_GS_INTRO_SHELLDER_1 + spriteanimoam $6e, .OAMData_GSIntroShellder ; SPRITE_ANIM_OAMSET_GS_INTRO_SHELLDER_2 + spriteanimoam $2d, .OAMData_GSIntroMagikarp ; SPRITE_ANIM_OAMSET_GS_INTRO_MAGIKARP_1 + spriteanimoam $4d, .OAMData_GSIntroMagikarp ; SPRITE_ANIM_OAMSET_GS_INTRO_MAGIKARP_2 + spriteanimoam $60, .OAMData_GSIntroLapras ; SPRITE_ANIM_OAMSET_GS_INTRO_UNUSED_LAPRAS + spriteanimoam $00, .OAMData_GSIntroLapras ; SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_1 + spriteanimoam $00, .OAMData_GSIntroLapras ; SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_2 + spriteanimoam $06, .OAMData_GSIntroLapras ; SPRITE_ANIM_OAMSET_GS_INTRO_LAPRAS_3 + spriteanimoam $0c, .OAMData_GSIntroNote ; SPRITE_ANIM_OAMSET_GS_INTRO_NOTE + spriteanimoam $0d, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_INTRO_INVISIBLE_NOTE + spriteanimoam $00, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_JIGGLYPUFF_1 + spriteanimoam $04, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_JIGGLYPUFF_2 + spriteanimoam $08, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_JIGGLYPUFF_3 + spriteanimoam $40, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_1 + spriteanimoam $44, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_2 + spriteanimoam $48, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_3 + spriteanimoam $4c, .OAMData_GSIntroJigglypuffPikachu ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_4 + spriteanimoam $80, .OAMData_GSIntroPikachuTail ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_TAIL_1 + spriteanimoam $85, .OAMData_GSIntroPikachuTail ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_TAIL_2 + spriteanimoam $8a, .OAMData_GSIntroPikachuTail ; SPRITE_ANIM_OAMSET_GS_INTRO_PIKACHU_TAIL_3 + spriteanimoam $00, .OAMData_IntroUnownF2_1 ; SPRITE_ANIM_OAMSET_GS_INTRO_SMALL_FIREBALL + spriteanimoam $01, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_GS_INTRO_MED_FIREBALL + spriteanimoam $09, .OAMData_GSIntroBigFireball ; SPRITE_ANIM_OAMSET_GS_INTRO_BIG_FIREBALL + spriteanimoam $10, .OAMData_GSIntroStarter ; SPRITE_ANIM_OAMSET_GS_INTRO_CHIKORITA + spriteanimoam $29, .OAMData_GSIntroStarter ; SPRITE_ANIM_OAMSET_GS_INTRO_CYNDAQUIL + spriteanimoam $42, .OAMData_GSIntroStarter ; SPRITE_ANIM_OAMSET_GS_INTRO_TOTODILE + spriteanimoam $f8, .OAMData_GSTitleTrail ; SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_1 + spriteanimoam $fa, .OAMData_GSTitleTrail ; SPRITE_ANIM_OAMSET_GS_TITLE_TRAIL_2 + spriteanimoam $00, .OAMData_TextEntryCursor ; SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR + spriteanimoam $00, .OAMData_TextEntryCursorBig ; SPRITE_ANIM_OAMSET_TEXT_ENTRY_CURSOR_BIG + spriteanimoam $00, .OAMData_GSGameFreakLogo ; SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO + spriteanimoam $0f, .OAMData_GSGameFreakLogoStar ; SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_STAR + spriteanimoam $11, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_SPARKLE_1 + spriteanimoam $12, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_SPARKLE_2 + spriteanimoam $13, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_GS_GAMEFREAK_LOGO_SPARKLE_3 + spriteanimoam $00, .OAMData_SlotsGolem ; SPRITE_ANIM_OAMSET_SLOTS_GOLEM_1 + spriteanimoam $08, .OAMData_SlotsGolem ; SPRITE_ANIM_OAMSET_SLOTS_GOLEM_2 + spriteanimoam $10, .OAMData_SlotsChansey1 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_1 + spriteanimoam $10, .OAMData_SlotsChansey2 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_2 + spriteanimoam $10, .OAMData_SlotsChansey3 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_3 + spriteanimoam $10, .OAMData_SlotsChansey4 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_4 + spriteanimoam $10, .OAMData_SlotsChansey5 ; SPRITE_ANIM_OAMSET_SLOTS_CHANSEY_5 + spriteanimoam $3a, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_SLOTS_EGG + spriteanimoam $00, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_STILL_CURSOR + spriteanimoam $00, .OAMData_TradePokeBall1 ; SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_1 + spriteanimoam $02, .OAMData_MagnetTrainRed ; SPRITE_ANIM_OAMSET_TRADE_POKE_BALL_2 + spriteanimoam $06, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_TRADE_POOF_1 + spriteanimoam $0a, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_TRADE_POOF_2 + spriteanimoam $0e, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_TRADE_POOF_3 + spriteanimoam $12, .OAMData_TradeTubeBulge ; SPRITE_ANIM_OAMSET_TRADE_TUBE_BULGE_1 + spriteanimoam $13, .OAMData_TradeTubeBulge ; SPRITE_ANIM_OAMSET_TRADE_TUBE_BULGE_2 + spriteanimoam $00, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_TRADEMON_ICON_1 + spriteanimoam $04, .OAMData_RedWalk ; SPRITE_ANIM_OAMSET_TRADEMON_ICON_2 + spriteanimoam $10, .OAMData_TradePoofBubble ; SPRITE_ANIM_OAMSET_TRADEMON_BUBBLE + spriteanimoam $00, .OAMData_MagnetTrainRed ; SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_1 + spriteanimoam $04, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_EVOLUTION_BALL_OF_LIGHT_2 + spriteanimoam $00, .OAMData_RadioTuningKnob ; SPRITE_ANIM_OAMSET_RADIO_TUNING_KNOB + spriteanimoam $00, .OAMData_PartyMonWithMail1 ; SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_1 + spriteanimoam $00, .OAMData_PartyMonWithMail2 ; SPRITE_ANIM_OAMSET_PARTY_MON_WITH_MAIL_2 + spriteanimoam $00, .OAMData_PartyMonWithItem1 ; SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_1 + spriteanimoam $00, .OAMData_PartyMonWithItem2 ; SPRITE_ANIM_OAMSET_PARTY_MON_WITH_ITEM_2 + spriteanimoam $00, .OAMData_MagnetTrainRed ; SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_1 + spriteanimoam $04, .OAMData_MagnetTrainRed ; SPRITE_ANIM_OAMSET_MAGNET_TRAIN_RED_2 + spriteanimoam $00, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_43 + spriteanimoam $30, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_44 + spriteanimoam $03, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_45 + spriteanimoam $33, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_46 + spriteanimoam $06, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_47 + spriteanimoam $36, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_48 + spriteanimoam $09, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_49 + spriteanimoam $39, .OAMData_Unused43_4A ; SPRITE_ANIM_OAMSET_UNUSED_4A + spriteanimoam $0c, .OAMData_Unused4B ; SPRITE_ANIM_OAMSET_UNUSED_4B + spriteanimoam $0c, .OAMData_Unused4C ; SPRITE_ANIM_OAMSET_UNUSED_4C + spriteanimoam $3c, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_UNUSED_4D + spriteanimoam $3e, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_UNUSED_4E + spriteanimoam $00, .OAMData_Leaf ; SPRITE_ANIM_OAMSET_LEAF + spriteanimoam $00, .OAMData_Tree ; SPRITE_ANIM_OAMSET_TREE_1 + spriteanimoam $00, .OAMData_CutTree2 ; SPRITE_ANIM_OAMSET_CUT_TREE_2 + spriteanimoam $00, .OAMData_CutTree3 ; SPRITE_ANIM_OAMSET_CUT_TREE_3 + spriteanimoam $00, .OAMData_CutTree4 ; SPRITE_ANIM_OAMSET_CUT_TREE_4 + spriteanimoam $00, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_EGG_CRACK + spriteanimoam $01, .OAMData_1x1_Palette0 ; SPRITE_ANIM_OAMSET_EGG_HATCH + spriteanimoam $00, .OAMData_GSIntroHoOhLugia1 ; SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_1 + spriteanimoam $00, .OAMData_GSIntroHoOhLugia2 ; SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_2 + spriteanimoam $00, .OAMData_GSIntroHoOhLugia3 ; SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_3 + spriteanimoam $00, .OAMData_GSIntroHoOhLugia4 ; SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_4 + spriteanimoam $00, .OAMData_GSIntroHoOhLugia5 ; SPRITE_ANIM_OAMSET_GS_INTRO_HO_OH_LUGIA_5 + spriteanimoam $04, .OAMData_Tree ; SPRITE_ANIM_OAMSET_HEADBUTT_TREE_2 + spriteanimoam $00, .OAMData_EZChatCursor1 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_1 + spriteanimoam $00, .OAMData_EZChatCursor2 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_2 + spriteanimoam $00, .OAMData_EZChatCursor3 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_3 + spriteanimoam $00, .OAMData_EZChatCursor4 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_4 + spriteanimoam $00, .OAMData_EZChatCursor5 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_5 + spriteanimoam $00, .OAMData_EZChatCursor6 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_6 + spriteanimoam $00, .OAMData_EZChatCursor7 ; SPRITE_ANIM_OAMSET_EZCHAT_CURSOR_7 + spriteanimoam $00, .OAMData_BlueWalk ; SPRITE_ANIM_OAMSET_BLUE_WALK_1 + spriteanimoam $04, .OAMData_BlueWalk ; SPRITE_ANIM_OAMSET_BLUE_WALK_2 + spriteanimoam $00, .OAMData_MagnetTrainBlue ; SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_1 + spriteanimoam $04, .OAMData_MagnetTrainBlue ; SPRITE_ANIM_OAMSET_MAGNET_TRAIN_BLUE_2 + spriteanimoam $20, .OAMData_MobileTradeCableBulge ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_CABLE_BULGE_1 + spriteanimoam $21, .OAMData_MobileTradeCableBulge ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_CABLE_BULGE_2 + spriteanimoam $22, .OAMData_MobileTradePing1 ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_1 + spriteanimoam $23, .OAMData_MobileTradePing2 ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_2 + spriteanimoam $27, .OAMData_MobileTradePing3 ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_PING_3 + spriteanimoam $2a, .OAMData_MobileTradeSentPulse ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_SENT_PULSE + spriteanimoam $2a, .OAMData_MobileTradeOTPulse ; SPRITE_ANIM_OAMSET_MOBILE_TRADE_OT_PULSE + spriteanimoam $00, .OAMData_IntroSuicune1 ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_1 + spriteanimoam $08, .OAMData_IntroSuicune2 ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_2 + spriteanimoam $60, .OAMData_IntroSuicune3 ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_3 + spriteanimoam $68, .OAMData_IntroSuicune4 ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_4 + spriteanimoam $00, .OAMData_IntroPichu ; SPRITE_ANIM_OAMSET_INTRO_PICHU_1 + spriteanimoam $05, .OAMData_IntroPichu ; SPRITE_ANIM_OAMSET_INTRO_PICHU_2 + spriteanimoam $0a, .OAMData_IntroPichu ; SPRITE_ANIM_OAMSET_INTRO_PICHU_3 + spriteanimoam $50, .OAMData_IntroWooper ; SPRITE_ANIM_OAMSET_INTRO_WOOPER + spriteanimoam $00, .OAMData_IntroUnown1 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_1 + spriteanimoam $01, .OAMData_IntroUnown2 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_2 + spriteanimoam $04, .OAMData_IntroUnown3 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_3 + spriteanimoam $00, .OAMData_IntroUnownF2_1 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_1 + spriteanimoam $01, .OAMData_IntroUnownF2_2 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_2 + spriteanimoam $03, .OAMData_IntroUnownF2_3 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_3 + spriteanimoam $08, .OAMData_IntroUnownF2_4_5 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_4 + spriteanimoam $1c, .OAMData_IntroUnownF2_4_5 ; SPRITE_ANIM_OAMSET_INTRO_UNOWN_F_2_5 + spriteanimoam $80, .OAMData_IntroSuicuneAway ; SPRITE_ANIM_OAMSET_INTRO_SUICUNE_AWAY + spriteanimoam $00, .OAMData_Celebi ; SPRITE_ANIM_OAMSET_CELEBI_1 + spriteanimoam $04, .OAMData_Celebi ; SPRITE_ANIM_OAMSET_CELEBI_2 + spriteanimoam $d0, .OAMData_GameFreakLogo1_3 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_1 + spriteanimoam $d3, .OAMData_GameFreakLogo1_3 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_2 + spriteanimoam $d6, .OAMData_GameFreakLogo1_3 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_3 + spriteanimoam $6c, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_4 + spriteanimoam $68, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_5 + spriteanimoam $64, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_6 + spriteanimoam $60, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_7 + spriteanimoam $0c, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_8 + spriteanimoam $08, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_9 + spriteanimoam $04, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_10 + spriteanimoam $00, .OAMData_GameFreakLogo4_11 ; SPRITE_ANIM_OAMSET_GAMEFREAK_LOGO_11 + assert_table_length NUM_SPRITE_ANIM_OAMSETS + +.OAMData_1x1_Palette0: + db 1 + dbsprite -1, -1, 4, 4, $00, 0 + +.OAMData_GSIntroShellder: + db 4 + dbsprite -1, -1, 0, 0, $00, 0 + dbsprite 0, -1, 0, 0, $01, 0 + dbsprite -1, 0, 0, 0, $10, 0 + dbsprite 0, 0, 0, 0, $11, 0 + +.OAMData_GSGameFreakLogoStar: + db 4 + dbsprite -1, -1, 0, 0, $00, 0 + dbsprite 0, -1, 0, 0, $00, 0 | X_FLIP + dbsprite -1, 0, 0, 0, $01, 0 + dbsprite 0, 0, 0, 0, $01, 0 | X_FLIP + +.OAMData_TradePokeBall1: + db 4 + dbsprite -1, -1, 0, 0, $00, 0 | PRIORITY + dbsprite 0, -1, 0, 0, $00, 0 | X_FLIP | PRIORITY + dbsprite -1, 0, 0, 0, $01, 0 | PRIORITY + dbsprite 0, 0, 0, 0, $01, 0 | X_FLIP | PRIORITY + +.OAMData_IntroUnownF2_1: + db 4 + dbsprite -1, -1, 0, 0, $00, 0 + dbsprite 0, -1, 0, 0, $00, 0 | X_FLIP + dbsprite -1, 0, 0, 0, $00, 0 | Y_FLIP + dbsprite 0, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP + +.OAMData_TradeTubeBulge: + db 4 + dbsprite -1, -1, 0, 0, $00, 7 + dbsprite 0, -1, 0, 0, $00, 7 | X_FLIP + dbsprite -1, 0, 0, 0, $00, 7 | Y_FLIP + dbsprite 0, 0, 0, 0, $00, 7 | X_FLIP | Y_FLIP + +.OAMData_Unknown1: ; unreferenced + db 4 + dbsprite -1, -1, 0, 0, $00, 0 | PRIORITY + dbsprite 0, -1, 0, 0, $00, 0 | X_FLIP | PRIORITY + dbsprite -1, 0, 0, 0, $00, 0 | Y_FLIP | PRIORITY + dbsprite 0, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP | PRIORITY + +.OAMData_TradePoofBubble: + db 16 + dbsprite -2, -2, 0, 0, $00, 0 + dbsprite -1, -2, 0, 0, $01, 0 + dbsprite -2, -1, 0, 0, $02, 0 + dbsprite -1, -1, 0, 0, $03, 0 + dbsprite 0, -2, 0, 0, $01, 0 | X_FLIP + dbsprite 1, -2, 0, 0, $00, 0 | X_FLIP + dbsprite 0, -1, 0, 0, $03, 0 | X_FLIP + dbsprite 1, -1, 0, 0, $02, 0 | X_FLIP + dbsprite -2, 0, 0, 0, $02, 0 | Y_FLIP + dbsprite -1, 0, 0, 0, $03, 0 | Y_FLIP + dbsprite -2, 1, 0, 0, $00, 0 | Y_FLIP + dbsprite -1, 1, 0, 0, $01, 0 | Y_FLIP + dbsprite 0, 0, 0, 0, $03, 0 | X_FLIP | Y_FLIP + dbsprite 1, 0, 0, 0, $02, 0 | X_FLIP | Y_FLIP + dbsprite 0, 1, 0, 0, $01, 0 | X_FLIP | Y_FLIP + dbsprite 1, 1, 0, 0, $00, 0 | X_FLIP | Y_FLIP + +.OAMData_GSIntroBigFireball: + db 36 + dbsprite -3, -3, 0, 0, $00, 0 + dbsprite -2, -3, 0, 0, $01, 0 + dbsprite -1, -3, 0, 0, $02, 0 + dbsprite -3, -2, 0, 0, $03, 0 + dbsprite -2, -2, 0, 0, $04, 0 + dbsprite -1, -2, 0, 0, $05, 0 + dbsprite -3, -1, 0, 0, $06, 0 + dbsprite -2, -1, 0, 0, $05, 0 + dbsprite -1, -1, 0, 0, $05, 0 + dbsprite 0, -3, 0, 0, $02, 0 | X_FLIP + dbsprite 1, -3, 0, 0, $01, 0 | X_FLIP + dbsprite 2, -3, 0, 0, $00, 0 | X_FLIP + dbsprite 0, -2, 0, 0, $05, 0 | X_FLIP + dbsprite 1, -2, 0, 0, $04, 0 | X_FLIP + dbsprite 2, -2, 0, 0, $03, 0 | X_FLIP + dbsprite 0, -1, 0, 0, $05, 0 | X_FLIP + dbsprite 1, -1, 0, 0, $05, 0 | X_FLIP + dbsprite 2, -1, 0, 0, $06, 0 | X_FLIP + dbsprite -3, 0, 0, 0, $06, 0 | Y_FLIP + dbsprite -2, 0, 0, 0, $05, 0 | Y_FLIP + dbsprite -1, 0, 0, 0, $05, 0 | Y_FLIP + dbsprite -3, 1, 0, 0, $03, 0 | Y_FLIP + dbsprite -2, 1, 0, 0, $04, 0 | Y_FLIP + dbsprite -1, 1, 0, 0, $05, 0 | Y_FLIP + dbsprite -3, 2, 0, 0, $00, 0 | Y_FLIP + dbsprite -2, 2, 0, 0, $01, 0 | Y_FLIP + dbsprite -1, 2, 0, 0, $02, 0 | Y_FLIP + dbsprite 0, 0, 0, 0, $05, 0 | X_FLIP | Y_FLIP + dbsprite 1, 0, 0, 0, $05, 0 | X_FLIP | Y_FLIP + dbsprite 2, 0, 0, 0, $06, 0 | X_FLIP | Y_FLIP + dbsprite 0, 1, 0, 0, $05, 0 | X_FLIP | Y_FLIP + dbsprite 1, 1, 0, 0, $04, 0 | X_FLIP | Y_FLIP + dbsprite 2, 1, 0, 0, $03, 0 | X_FLIP | Y_FLIP + dbsprite 0, 2, 0, 0, $02, 0 | X_FLIP | Y_FLIP + dbsprite 1, 2, 0, 0, $01, 0 | X_FLIP | Y_FLIP + dbsprite 2, 2, 0, 0, $00, 0 | X_FLIP | Y_FLIP + +.OAMData_Unused43_4A: + db 9 + dbsprite -2, -2, 4, 4, $00, 0 + dbsprite -1, -2, 4, 4, $01, 0 + dbsprite 0, -2, 4, 4, $02, 0 + dbsprite -2, -1, 4, 4, $10, 0 + dbsprite -1, -1, 4, 4, $11, 0 + dbsprite 0, -1, 4, 4, $12, 0 + dbsprite -2, 0, 4, 4, $20, 0 + dbsprite -1, 0, 4, 4, $21, 0 + dbsprite 0, 0, 4, 4, $22, 0 + +.OAMData_GSIntroJigglypuffPikachu: + db 16 + dbsprite -2, -2, 0, 0, $00, 0 + dbsprite -1, -2, 0, 0, $01, 0 + dbsprite 0, -2, 0, 0, $02, 0 + dbsprite 1, -2, 0, 0, $03, 0 + dbsprite -2, -1, 0, 0, $10, 0 + dbsprite -1, -1, 0, 0, $11, 0 + dbsprite 0, -1, 0, 0, $12, 0 + dbsprite 1, -1, 0, 0, $13, 0 + dbsprite -2, 0, 0, 0, $20, 0 + dbsprite -1, 0, 0, 0, $21, 0 + dbsprite 0, 0, 0, 0, $22, 0 + dbsprite 1, 0, 0, 0, $23, 0 + dbsprite -2, 1, 0, 0, $30, 0 + dbsprite -1, 1, 0, 0, $31, 0 + dbsprite 0, 1, 0, 0, $32, 0 + dbsprite 1, 1, 0, 0, $33, 0 + +.OAMData_GSIntroStarter: + db 25 + dbsprite -3, -3, 4, 4, $00, 0 + dbsprite -3, -2, 4, 4, $01, 0 + dbsprite -3, -1, 4, 4, $02, 0 + dbsprite -3, 0, 4, 4, $03, 0 + dbsprite -3, 1, 4, 4, $04, 0 + dbsprite -2, -3, 4, 4, $05, 0 + dbsprite -2, -2, 4, 4, $06, 0 + dbsprite -2, -1, 4, 4, $07, 0 + dbsprite -2, 0, 4, 4, $08, 0 + dbsprite -2, 1, 4, 4, $09, 0 + dbsprite -1, -3, 4, 4, $0a, 0 + dbsprite -1, -2, 4, 4, $0b, 0 + dbsprite -1, -1, 4, 4, $0c, 0 + dbsprite -1, 0, 4, 4, $0d, 0 + dbsprite -1, 1, 4, 4, $0e, 0 + dbsprite 0, -3, 4, 4, $0f, 0 + dbsprite 0, -2, 4, 4, $10, 0 + dbsprite 0, -1, 4, 4, $11, 0 + dbsprite 0, 0, 4, 4, $12, 0 + dbsprite 0, 1, 4, 4, $13, 0 + dbsprite 1, -3, 4, 4, $14, 0 + dbsprite 1, -2, 4, 4, $15, 0 + dbsprite 1, -1, 4, 4, $16, 0 + dbsprite 1, 0, 4, 4, $17, 0 + dbsprite 1, 1, 4, 4, $18, 0 + +.OAMData_Unknown2: ; unreferenced + db 36 + dbsprite -3, -3, 0, 0, $00, 0 + dbsprite -2, -3, 0, 0, $01, 0 + dbsprite -1, -3, 0, 0, $02, 0 + dbsprite 0, -3, 0, 0, $03, 0 + dbsprite 1, -3, 0, 0, $04, 0 + dbsprite 2, -3, 0, 0, $05, 0 + dbsprite -3, -2, 0, 0, $06, 0 + dbsprite -2, -2, 0, 0, $07, 0 + dbsprite -1, -2, 0, 0, $08, 0 + dbsprite 0, -2, 0, 0, $09, 0 + dbsprite 1, -2, 0, 0, $0a, 0 + dbsprite 2, -2, 0, 0, $0b, 0 + dbsprite -3, -1, 0, 0, $0c, 0 + dbsprite -2, -1, 0, 0, $0d, 0 + dbsprite -1, -1, 0, 0, $0e, 0 + dbsprite 0, -1, 0, 0, $0f, 0 + dbsprite 1, -1, 0, 0, $10, 0 + dbsprite 2, -1, 0, 0, $11, 0 + dbsprite -3, 0, 0, 0, $12, 0 + dbsprite -2, 0, 0, 0, $13, 0 + dbsprite -1, 0, 0, 0, $14, 0 + dbsprite 0, 0, 0, 0, $15, 0 + dbsprite 1, 0, 0, 0, $16, 0 + dbsprite 2, 0, 0, 0, $17, 0 + dbsprite -3, 1, 0, 0, $18, 0 + dbsprite -2, 1, 0, 0, $19, 0 + dbsprite -1, 1, 0, 0, $1a, 0 + dbsprite 0, 1, 0, 0, $1b, 0 + dbsprite 1, 1, 0, 0, $1c, 0 + dbsprite 2, 1, 0, 0, $1d, 0 + dbsprite -3, 2, 0, 0, $1e, 0 + dbsprite -2, 2, 0, 0, $1f, 0 + dbsprite -1, 2, 0, 0, $20, 0 + dbsprite 0, 2, 0, 0, $21, 0 + dbsprite 1, 2, 0, 0, $22, 0 + dbsprite 2, 2, 0, 0, $23, 0 + +.OAMData_RedWalk: + db 4 + dbsprite -1, -1, 0, 0, $00, PAL_OW_RED + dbsprite 0, -1, 0, 0, $01, PAL_OW_RED + dbsprite -1, 0, 0, 0, $02, PAL_OW_RED + dbsprite 0, 0, 0, 0, $03, PAL_OW_RED + +.OAMData_MagnetTrainRed: + db 4 + dbsprite -1, -1, 0, 0, $00, PAL_OW_RED | PRIORITY + dbsprite 0, -1, 0, 0, $01, PAL_OW_RED | PRIORITY + dbsprite -1, 0, 0, 0, $02, PAL_OW_RED | PRIORITY + dbsprite 0, 0, 0, 0, $03, PAL_OW_RED | PRIORITY + +.OAMData_PartyMonWithMail1: + db 4 + dbsprite -1, -1, 0, 0, $00, PAL_OW_RED + dbsprite 0, -1, 0, 0, $01, PAL_OW_RED + dbsprite -1, 0, 0, 0, $08, PAL_OW_RED + dbsprite 0, 0, 0, 0, $03, PAL_OW_RED + +.OAMData_PartyMonWithMail2: + db 4 + dbsprite -1, -1, 0, 0, $04, PAL_OW_RED + dbsprite 0, -1, 0, 0, $05, PAL_OW_RED + dbsprite -1, 0, 0, 0, $08, PAL_OW_RED + dbsprite 0, 0, 0, 0, $07, PAL_OW_RED + +.OAMData_PartyMonWithItem1: + db 4 + dbsprite -1, -1, 0, 0, $00, PAL_OW_RED + dbsprite 0, -1, 0, 0, $01, PAL_OW_RED + dbsprite -1, 0, 0, 0, $09, PAL_OW_RED + dbsprite 0, 0, 0, 0, $03, PAL_OW_RED + +.OAMData_PartyMonWithItem2: + db 4 + dbsprite -1, -1, 0, 0, $04, PAL_OW_RED + dbsprite 0, -1, 0, 0, $05, PAL_OW_RED + dbsprite -1, 0, 0, 0, $09, PAL_OW_RED + dbsprite 0, 0, 0, 0, $07, PAL_OW_RED + +.OAMData_GSIntroMagikarp: + db 6 + dbsprite -2, -1, 4, 0, $00, 1 + dbsprite -1, -1, 4, 0, $01, 1 + dbsprite 0, -1, 4, 0, $02, 1 + dbsprite -2, 0, 4, 0, $10, 1 + dbsprite -1, 0, 4, 0, $11, 1 + dbsprite 0, 0, 4, 0, $12, 1 + +.OAMData_GSIntroLapras: + db 29 + dbsprite -3, -3, 0, 0, $00, 0 + dbsprite -2, -3, 0, 0, $01, 0 + dbsprite -1, -3, 0, 0, $02, 0 + dbsprite 0, -3, 0, 0, $03, 0 + dbsprite -3, -2, 0, 0, $10, 0 + dbsprite -2, -2, 0, 0, $11, 0 + dbsprite -1, -2, 0, 0, $12, 0 + dbsprite 0, -2, 0, 0, $13, 0 + dbsprite -3, -1, 0, 0, $20, 0 + dbsprite -2, -1, 0, 0, $21, 0 + dbsprite -1, -1, 0, 0, $22, 0 + dbsprite 0, -1, 0, 0, $23, 0 + dbsprite 1, -1, 0, 0, $24, 0 + dbsprite -3, 0, 0, 0, $30, 0 | PRIORITY + dbsprite -2, 0, 0, 0, $31, 0 | PRIORITY + dbsprite -1, 0, 0, 0, $32, 0 | PRIORITY + dbsprite 0, 0, 0, 0, $33, 0 | PRIORITY + dbsprite 1, 0, 0, 0, $34, 0 | PRIORITY + dbsprite -3, 1, 0, 0, $40, 0 | PRIORITY + dbsprite -2, 1, 0, 0, $41, 0 | PRIORITY + dbsprite -1, 1, 0, 0, $42, 0 | PRIORITY + dbsprite 0, 1, 0, 0, $43, 0 | PRIORITY + dbsprite 1, 1, 0, 0, $44, 0 | PRIORITY + dbsprite 2, 1, 0, 0, $45, 0 | PRIORITY + dbsprite -2, 2, 0, 0, $51, 0 | PRIORITY + dbsprite -1, 2, 0, 0, $52, 0 | PRIORITY + dbsprite 0, 2, 0, 0, $53, 0 | PRIORITY + dbsprite 1, 2, 0, 0, $54, 0 | PRIORITY + dbsprite 2, 2, 0, 0, $55, 0 | PRIORITY + +.OAMData_GSIntroNote: + db 2 + dbsprite -1, -1, 4, 0, $00, 0 + dbsprite -1, 0, 4, 0, $10, 0 + +.OAMData_GSIntroPikachuTail: + db 5 + dbsprite 3, -2, 0, 0, $00, 0 + dbsprite 4, -2, 0, 0, $01, 0 + dbsprite 2, -1, 0, 0, $02, 0 + dbsprite 3, -1, 0, 0, $03, 0 + dbsprite 2, 0, 0, 0, $04, 0 + +.OAMData_Leaf: + db 1 + dbsprite -1, -1, 4, 4, $00, PAL_OW_TREE + +.OAMData_Tree: + db 4 + dbsprite -1, -1, 0, 0, $00, PAL_OW_TREE + dbsprite 0, -1, 0, 0, $01, PAL_OW_TREE + dbsprite -1, 0, 0, 0, $02, PAL_OW_TREE + dbsprite 0, 0, 0, 0, $03, PAL_OW_TREE + +.OAMData_TextEntryCursor: + db 4 + dbsprite -1, -1, 7, 7, $00, 0 + dbsprite 0, -1, 0, 7, $00, 0 | X_FLIP + dbsprite -1, 0, 7, 0, $00, 0 | Y_FLIP + dbsprite 0, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP + +.OAMData_TextEntryCursorBig: + db 10 + dbsprite 0, -1, 0, 7, $00, 0 + dbsprite 1, -1, 0, 7, $01, 0 + dbsprite 2, -1, 0, 7, $01, 0 + dbsprite 3, -1, 0, 7, $01, 0 + dbsprite 4, -1, 0, 7, $00, 0 | X_FLIP + dbsprite 0, 0, 0, 0, $00, 0 | Y_FLIP + dbsprite 1, 0, 0, 0, $01, 0 | Y_FLIP + dbsprite 2, 0, 0, 0, $01, 0 | Y_FLIP + dbsprite 3, 0, 0, 0, $01, 0 | Y_FLIP + dbsprite 4, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP + +.OAMData_GSGameFreakLogo: + db 15 + dbsprite -2, -3, 4, 4, $00, 1 | OBP_NUM + dbsprite -1, -3, 4, 4, $01, 1 | OBP_NUM + dbsprite 0, -3, 4, 4, $02, 1 | OBP_NUM + dbsprite -2, -2, 4, 4, $03, 1 | OBP_NUM + dbsprite -1, -2, 4, 4, $04, 1 | OBP_NUM + dbsprite 0, -2, 4, 4, $05, 1 | OBP_NUM + dbsprite -2, -1, 4, 4, $06, 1 | OBP_NUM + dbsprite -1, -1, 4, 4, $07, 1 | OBP_NUM + dbsprite 0, -1, 4, 4, $08, 1 | OBP_NUM + dbsprite -2, 0, 4, 4, $09, 1 | OBP_NUM + dbsprite -1, 0, 4, 4, $0a, 1 | OBP_NUM + dbsprite 0, 0, 4, 4, $0b, 1 | OBP_NUM + dbsprite -2, 1, 4, 4, $0c, 1 | OBP_NUM + dbsprite -1, 1, 4, 4, $0d, 1 | OBP_NUM + dbsprite 0, 1, 4, 4, $0e, 1 | OBP_NUM + +.OAMData_SlotsGolem: + db 6 + dbsprite -2, -2, 4, 4, $00, 5 | OBP_NUM + dbsprite -1, -2, 4, 4, $02, 5 | OBP_NUM + dbsprite 0, -2, 4, 4, $00, 5 | OBP_NUM | X_FLIP + dbsprite -2, 0, 4, 4, $04, 5 | OBP_NUM + dbsprite -1, 0, 4, 4, $06, 5 | OBP_NUM + dbsprite 0, 0, 4, 4, $04, 5 | OBP_NUM | X_FLIP + +.OAMData_SlotsChansey1: + db 6 + dbsprite -2, -2, 4, 4, $00, 6 | OBP_NUM + dbsprite -1, -2, 4, 4, $02, 6 | OBP_NUM + dbsprite 0, -2, 4, 4, $04, 6 | OBP_NUM + dbsprite -2, 0, 4, 4, $06, 6 | OBP_NUM + dbsprite -1, 0, 4, 4, $08, 6 | OBP_NUM + dbsprite 0, 0, 4, 4, $0a, 6 | OBP_NUM + +.OAMData_SlotsChansey2: + db 6 + dbsprite -2, -2, 4, 4, $00, 6 | OBP_NUM + dbsprite -1, -2, 4, 4, $02, 6 | OBP_NUM + dbsprite 0, -2, 4, 4, $04, 6 | OBP_NUM + dbsprite -2, 0, 4, 4, $0c, 6 | OBP_NUM + dbsprite -1, 0, 4, 4, $0e, 6 | OBP_NUM + dbsprite 0, 0, 4, 4, $10, 6 | OBP_NUM + +.OAMData_SlotsChansey3: + db 6 + dbsprite -2, -2, 4, 4, $00, 6 | OBP_NUM + dbsprite -1, -2, 4, 4, $02, 6 | OBP_NUM + dbsprite 0, -2, 4, 4, $04, 6 | OBP_NUM + dbsprite -2, 0, 4, 4, $12, 6 | OBP_NUM + dbsprite -1, 0, 4, 4, $14, 6 | OBP_NUM + dbsprite 0, 0, 4, 4, $16, 6 | OBP_NUM + +.OAMData_SlotsChansey4: + db 6 + dbsprite -2, -2, 4, 4, $00, 6 | OBP_NUM + dbsprite -1, -2, 4, 4, $02, 6 | OBP_NUM + dbsprite 0, -2, 4, 4, $04, 6 | OBP_NUM + dbsprite -2, 0, 4, 4, $18, 6 | OBP_NUM + dbsprite -1, 0, 4, 4, $1a, 6 | OBP_NUM + dbsprite 0, 0, 4, 4, $1c, 6 | OBP_NUM + +.OAMData_SlotsChansey5: + db 6 + dbsprite -2, -2, 4, 4, $1e, 6 | OBP_NUM + dbsprite -1, -2, 4, 4, $20, 6 | OBP_NUM + dbsprite 0, -2, 4, 4, $22, 6 | OBP_NUM + dbsprite -2, 0, 4, 4, $24, 6 | OBP_NUM + dbsprite -1, 0, 4, 4, $26, 6 | OBP_NUM + dbsprite 0, 0, 4, 4, $28, 6 | OBP_NUM + +.OAMData_RadioTuningKnob: + db 3 + dbsprite -1, -2, 4, 4, $00, 0 | OBP_NUM + dbsprite -1, -1, 4, 4, $00, 0 | OBP_NUM + dbsprite -1, 0, 4, 4, $00, 0 | OBP_NUM + +.OAMData_Unused4B: + db 6 + dbsprite 0, 0, 0, 0, $00, 0 + dbsprite 1, 0, 0, 0, $01, 0 + dbsprite 2, 0, 0, 0, $01, 0 + dbsprite 3, 0, 0, 0, $01, 0 + dbsprite 4, 0, 0, 0, $02, 0 + dbsprite 5, 0, 0, 0, $03, 0 + +.OAMData_Unused4C: + db 4 + dbsprite 0, 0, 0, 0, $00, 0 + dbsprite 1, 0, 0, 0, $01, 0 + dbsprite 2, 0, 0, 0, $02, 0 + dbsprite 3, 0, 0, 0, $03, 0 + +.OAMData_CutTree2: + db 4 + dbsprite -2, -1, 6, 0, $00, PAL_OW_TREE + dbsprite 0, -1, 2, 0, $01, PAL_OW_TREE + dbsprite -2, 0, 6, 0, $02, PAL_OW_TREE + dbsprite 0, 0, 2, 0, $03, PAL_OW_TREE + +.OAMData_CutTree3: + db 4 + dbsprite -2, -1, 4, 0, $00, PAL_OW_TREE + dbsprite 0, -1, 4, 0, $01, PAL_OW_TREE + dbsprite -2, 0, 4, 0, $02, PAL_OW_TREE + dbsprite 0, 0, 4, 0, $03, PAL_OW_TREE + +.OAMData_CutTree4: + db 4 + dbsprite -2, -1, 0, 0, $00, PAL_OW_TREE + dbsprite 1, -1, 0, 0, $01, PAL_OW_TREE + dbsprite -2, 0, 0, 0, $02, PAL_OW_TREE + dbsprite 1, 0, 0, 0, $03, PAL_OW_TREE + +.OAMData_GSIntroHoOhLugia1: + db 19 + dbsprite -4, -1, 0, 0, $00, 0 + dbsprite -3, -2, 0, 0, $02, 0 + dbsprite -3, 0, 0, 0, $04, 0 + dbsprite -2, -3, 0, 0, $06, 0 + dbsprite -2, -1, 0, 0, $08, 0 + dbsprite -2, 1, 0, 0, $0a, 0 + dbsprite -1, -3, 0, 0, $0c, 0 + dbsprite -1, -1, 0, 0, $0e, 0 + dbsprite -1, 1, 0, 0, $10, 0 + dbsprite 0, -3, 0, 0, $12, 0 + dbsprite 0, -1, 0, 0, $14, 0 + dbsprite 0, 1, 0, 0, $16, 0 + dbsprite 1, -3, 0, 0, $18, 0 + dbsprite 1, -1, 0, 0, $1a, 0 + dbsprite 1, 1, 0, 0, $1c, 0 + dbsprite 2, -1, 0, 0, $1e, 0 + dbsprite 2, 1, 0, 0, $20, 0 + dbsprite 3, -2, 0, 0, $22, 0 + dbsprite 3, 0, 0, 0, $24, 0 + +.OAMData_GSIntroHoOhLugia2: + db 16 + dbsprite -4, -1, 0, 0, $00, 0 + dbsprite -3, -2, 0, 0, $02, 0 + dbsprite -3, 0, 0, 0, $04, 0 + dbsprite -2, -1, 0, 0, $26, 0 + dbsprite -2, 1, 0, 0, $0a, 0 + dbsprite -1, -3, 0, 0, $28, 0 + dbsprite -1, -1, 0, 0, $2a, 0 + dbsprite -1, 1, 0, 0, $10, 0 + dbsprite 0, -1, 0, 0, $2c, 0 + dbsprite 0, 1, 0, 0, $16, 0 + dbsprite 1, -1, 0, 0, $30, 0 + dbsprite 1, 1, 0, 0, $1c, 0 + dbsprite 2, -1, 0, 0, $1e, 0 + dbsprite 2, 1, 0, 0, $20, 0 + dbsprite 3, -2, 0, 0, $22, 0 + dbsprite 3, 0, 0, 0, $24, 0 + +.OAMData_GSIntroHoOhLugia3: + db 15 + dbsprite -4, -1, 0, 0, $00, 0 + dbsprite -3, -2, 0, 0, $02, 0 + dbsprite -3, 0, 0, 0, $32, 0 + dbsprite -2, -1, 0, 0, $34, 0 + dbsprite -2, 1, 0, 0, $36, 0 + dbsprite -1, -1, 0, 0, $38, 0 + dbsprite -1, 1, 0, 0, $3a, 0 + dbsprite 0, -1, 0, 0, $3c, 0 + dbsprite 0, 1, 0, 0, $3e, 0 + dbsprite 1, -1, 0, 0, $30, 0 + dbsprite 1, 1, 0, 0, $1c, 0 + dbsprite 2, -1, 0, 0, $1e, 0 + dbsprite 2, 1, 0, 0, $20, 0 + dbsprite 3, -2, 0, 0, $22, 0 + dbsprite 3, 0, 0, 0, $24, 0 + +.OAMData_GSIntroHoOhLugia4: + db 17 + dbsprite -4, -1, 0, 0, $00, 0 + dbsprite -3, -2, 0, 0, $02, 0 + dbsprite -3, 0, 0, 0, $04, 0 + dbsprite -2, -1, 0, 0, $40, 0 + dbsprite -2, 1, 0, 0, $42, 0 + dbsprite -2, 3, 0, 0, $44, 0 + dbsprite -1, -1, 0, 0, $46, 0 + dbsprite -1, 1, 0, 0, $48, 0 + dbsprite -1, 3, 0, 0, $4a, 0 + dbsprite 0, -1, 0, 0, $4c, 0 + dbsprite 0, 1, 0, 0, $4e, 0 + dbsprite 1, -1, 0, 0, $30, 0 + dbsprite 1, 1, 0, 0, $1c, 0 + dbsprite 2, -1, 0, 0, $1e, 0 + dbsprite 2, 1, 0, 0, $20, 0 + dbsprite 3, -2, 0, 0, $22, 0 + dbsprite 3, 0, 0, 0, $24, 0 + +.OAMData_GSIntroHoOhLugia5: + db 17 + dbsprite -4, -1, 0, 0, $00, 0 + dbsprite -3, -2, 0, 0, $02, 0 + dbsprite -3, 0, 0, 0, $04, 0 + dbsprite -2, -1, 0, 0, $50, 0 + dbsprite -2, 1, 0, 0, $0a, 0 + dbsprite -1, -3, 0, 0, $52, 0 + dbsprite -1, -1, 0, 0, $54, 0 + dbsprite -1, 1, 0, 0, $10, 0 + dbsprite 0, -3, 0, 0, $56, 0 + dbsprite 0, -1, 0, 0, $2e, 0 + dbsprite 0, 1, 0, 0, $16, 0 + dbsprite 1, -1, 0, 0, $30, 0 + dbsprite 1, 1, 0, 0, $1c, 0 + dbsprite 2, -1, 0, 0, $1e, 0 + dbsprite 2, 1, 0, 0, $20, 0 + dbsprite 3, -2, 0, 0, $22, 0 + dbsprite 3, 0, 0, 0, $24, 0 + +.OAMData_GSTitleTrail: + db 1 + dbsprite -1, -1, 4, 4, $00, 1 | OBP_NUM + +.OAMData_EZChatCursor1: + db 12 + dbsprite 0, 0, 0, 0, $30, 0 + dbsprite 1, 0, 0, 0, $31, 0 + dbsprite 2, 0, 0, 0, $31, 0 + dbsprite 3, 0, 0, 0, $31, 0 + dbsprite 4, 0, 0, 0, $31, 0 + dbsprite 5, 0, 0, 0, $32, 0 + dbsprite 0, 1, 0, 0, $33, 0 + dbsprite 1, 1, 0, 0, $34, 0 + dbsprite 2, 1, 0, 0, $34, 0 + dbsprite 3, 1, 0, 0, $34, 0 + dbsprite 4, 1, 0, 0, $34, 0 + dbsprite 5, 1, 0, 0, $35, 0 + +.OAMData_EZChatCursor2: + db 1 + dbsprite 0, 0, 0, 0, $ed, 0 + +.OAMData_EZChatCursor3: + db 4 + dbsprite -1, -1, 7, 7, $30, 0 + dbsprite 0, -1, 1, 7, $32, 0 + dbsprite -1, 0, 7, 1, $33, 0 + dbsprite 0, 0, 1, 1, $35, 0 + +.OAMData_EZChatCursor4: + db 8 + dbsprite -1, -1, 7, 7, $30, 0 + dbsprite 0, -1, 4, 7, $31, 0 + dbsprite 1, -1, 4, 7, $31, 0 + dbsprite 2, -1, 1, 7, $32, 0 + dbsprite -1, 0, 7, 1, $33, 0 + dbsprite 0, 0, 4, 1, $34, 0 + dbsprite 1, 0, 4, 1, $34, 0 + dbsprite 2, 0, 1, 1, $35, 0 + +.OAMData_EZChatCursor5: + db 1 + dbsprite 0, 0, 0, 0, $34, 0 + +.OAMData_EZChatCursor6: + db 2 + dbsprite 0, 0, 0, 0, $30, 0 + dbsprite 0, 1, 0, 0, $33, 0 + +.OAMData_EZChatCursor7: + db 2 + dbsprite 0, 0, 0, 0, $32, 0 + dbsprite 0, 1, 0, 0, $35, 0 + +.OAMData_BlueWalk: + db 4 + dbsprite -1, -1, 0, 0, $00, PAL_OW_BLUE + dbsprite 0, -1, 0, 0, $01, PAL_OW_BLUE + dbsprite -1, 0, 0, 0, $02, PAL_OW_BLUE + dbsprite 0, 0, 0, 0, $03, PAL_OW_BLUE + +.OAMData_MagnetTrainBlue: + db 4 + dbsprite -1, -1, 0, 0, $00, PAL_OW_BLUE | PRIORITY + dbsprite 0, -1, 0, 0, $01, PAL_OW_BLUE | PRIORITY + dbsprite -1, 0, 0, 0, $02, PAL_OW_BLUE | PRIORITY + dbsprite 0, 0, 0, 0, $03, PAL_OW_BLUE | PRIORITY + +.OAMData_MobileTradeCableBulge: + db 1 + dbsprite -1, -1, 4, 4, $00, 2 + +.OAMData_MobileTradeSentPulse: + db 4 + dbsprite -1, -2, 4, 0, $00, 3 + dbsprite -1, -1, 4, 0, $01, 3 + dbsprite -1, 0, 4, 0, $02, 3 + dbsprite -1, 1, 4, 0, $03, 3 + +.OAMData_MobileTradeOTPulse: + db 4 + dbsprite -1, -2, 4, 0, $03, 4 | Y_FLIP + dbsprite -1, -1, 4, 0, $02, 4 | Y_FLIP + dbsprite -1, 0, 4, 0, $01, 4 | Y_FLIP + dbsprite -1, 1, 4, 0, $00, 4 | Y_FLIP + +.OAMData_MobileTradePing1: + db 4 + dbsprite -1, -1, 0, 0, $00, 1 + dbsprite 0, -1, 0, 0, $00, 1 | X_FLIP + dbsprite -1, 0, 0, 0, $00, 1 | Y_FLIP + dbsprite 0, 0, 0, 0, $00, 1 | X_FLIP | Y_FLIP + +.OAMData_MobileTradePing2: + db 8 + dbsprite -2, -2, 4, 4, $00, 1 + dbsprite -1, -2, 4, 4, $01, 1 + dbsprite 0, -2, 4, 4, $00, 1 | X_FLIP + dbsprite -2, -1, 4, 4, $02, 1 + dbsprite 0, -1, 4, 4, $02, 1 | X_FLIP + dbsprite -2, 0, 4, 4, $00, 1 | Y_FLIP + dbsprite -1, 0, 4, 4, $01, 1 | Y_FLIP + dbsprite 0, 0, 4, 4, $00, 1 | X_FLIP | Y_FLIP + +.OAMData_MobileTradePing3: + db 12 + dbsprite -2, -2, 0, 0, $00, 1 + dbsprite -1, -2, 0, 0, $01, 1 + dbsprite -2, -1, 0, 0, $02, 1 + dbsprite 0, -2, 0, 0, $01, 1 | X_FLIP + dbsprite 1, -2, 0, 0, $00, 1 | X_FLIP + dbsprite 1, -1, 0, 0, $02, 1 | X_FLIP + dbsprite -2, 0, 0, 0, $02, 1 | Y_FLIP + dbsprite -2, 1, 0, 0, $00, 1 | Y_FLIP + dbsprite -1, 1, 0, 0, $01, 1 | Y_FLIP + dbsprite 1, 0, 0, 0, $02, 1 | X_FLIP | Y_FLIP + dbsprite 0, 1, 0, 0, $01, 1 | X_FLIP | Y_FLIP + dbsprite 1, 1, 0, 0, $00, 1 | X_FLIP | Y_FLIP + +.OAMData_IntroSuicune1: + db 36 + dbsprite 1, -3, 0, 0, $05, 0 + dbsprite 2, -3, 0, 0, $06, 0 + dbsprite 3, -3, 0, 0, $07, 0 + dbsprite -3, -2, 0, 0, $11, 0 + dbsprite -2, -2, 0, 0, $12, 0 + dbsprite -1, -2, 0, 0, $13, 0 + dbsprite 0, -2, 0, 0, $14, 0 + dbsprite 1, -2, 0, 0, $15, 0 + dbsprite 2, -2, 0, 0, $16, 0 + dbsprite 3, -2, 0, 0, $17, 0 + dbsprite -4, -1, 0, 0, $20, 0 + dbsprite -3, -1, 0, 0, $21, 0 + dbsprite -2, -1, 0, 0, $22, 0 + dbsprite -1, -1, 0, 0, $23, 0 + dbsprite 0, -1, 0, 0, $24, 0 + dbsprite 1, -1, 0, 0, $25, 0 + dbsprite 2, -1, 0, 0, $26, 0 + dbsprite 3, -1, 0, 0, $27, 0 + dbsprite -4, 0, 0, 0, $30, 0 + dbsprite -3, 0, 0, 0, $31, 0 + dbsprite -2, 0, 0, 0, $32, 0 + dbsprite -1, 0, 0, 0, $33, 0 + dbsprite 0, 0, 0, 0, $34, 0 + dbsprite 1, 0, 0, 0, $35, 0 + dbsprite 2, 0, 0, 0, $36, 0 + dbsprite -4, 1, 0, 0, $40, 0 + dbsprite -3, 1, 0, 0, $41, 0 + dbsprite -2, 1, 0, 0, $42, 0 + dbsprite -1, 1, 0, 0, $43, 0 + dbsprite 0, 1, 0, 0, $44, 0 + dbsprite 1, 1, 0, 0, $45, 0 + dbsprite 2, 1, 0, 0, $46, 0 + dbsprite 3, 1, 0, 0, $47, 0 + dbsprite -4, 2, 0, 0, $50, 0 + dbsprite -3, 2, 0, 0, $51, 0 + dbsprite 3, 2, 0, 0, $57, 0 + +.OAMData_IntroSuicune2: + db 28 + dbsprite 0, -3, 0, 0, $04, 0 + dbsprite 1, -3, 0, 0, $05, 0 + dbsprite 2, -3, 0, 0, $06, 0 + dbsprite -3, -2, 0, 0, $11, 0 + dbsprite -2, -2, 0, 0, $12, 0 + dbsprite -1, -2, 0, 0, $13, 0 + dbsprite 0, -2, 0, 0, $14, 0 + dbsprite 1, -2, 0, 0, $15, 0 + dbsprite 2, -2, 0, 0, $16, 0 + dbsprite -3, -1, 0, 0, $21, 0 + dbsprite -2, -1, 0, 0, $22, 0 + dbsprite -1, -1, 0, 0, $23, 0 + dbsprite 0, -1, 0, 0, $24, 0 + dbsprite 1, -1, 0, 0, $25, 0 + dbsprite 2, -1, 0, 0, $26, 0 + dbsprite -4, 0, 0, 0, $30, 0 + dbsprite -3, 0, 0, 0, $31, 0 + dbsprite -2, 0, 0, 0, $32, 0 + dbsprite -1, 0, 0, 0, $33, 0 + dbsprite 0, 0, 0, 0, $34, 0 + dbsprite 1, 0, 0, 0, $35, 0 + dbsprite -2, 1, 0, 0, $42, 0 + dbsprite -1, 1, 0, 0, $43, 0 + dbsprite 0, 1, 0, 0, $44, 0 + dbsprite 1, 1, 0, 0, $45, 0 + dbsprite -1, 2, 0, 0, $53, 0 + dbsprite 0, 2, 0, 0, $54, 0 + dbsprite 1, 2, 0, 0, $55, 0 + +.OAMData_IntroSuicune3: + db 30 + dbsprite 0, -3, 0, 0, $04, 0 + dbsprite 1, -3, 0, 0, $05, 0 + dbsprite -3, -2, 0, 0, $11, 0 + dbsprite -2, -2, 0, 0, $12, 0 + dbsprite -1, -2, 0, 0, $13, 0 + dbsprite 0, -2, 0, 0, $14, 0 + dbsprite 1, -2, 0, 0, $15, 0 + dbsprite 2, -2, 0, 0, $16, 0 + dbsprite 3, -2, 0, 0, $17, 0 + dbsprite -4, -1, 0, 0, $20, 0 + dbsprite -3, -1, 0, 0, $21, 0 + dbsprite -2, -1, 0, 0, $22, 0 + dbsprite -1, -1, 0, 0, $23, 0 + dbsprite 0, -1, 0, 0, $24, 0 + dbsprite 1, -1, 0, 0, $25, 0 + dbsprite 2, -1, 0, 0, $26, 0 + dbsprite -4, 0, 0, 0, $30, 0 + dbsprite -3, 0, 0, 0, $31, 0 + dbsprite -2, 0, 0, 0, $32, 0 + dbsprite -1, 0, 0, 0, $33, 0 + dbsprite 0, 0, 0, 0, $34, 0 + dbsprite 1, 0, 0, 0, $35, 0 + dbsprite -2, 1, 0, 0, $42, 0 + dbsprite -1, 1, 0, 0, $43, 0 + dbsprite 0, 1, 0, 0, $44, 0 + dbsprite 1, 1, 0, 0, $45, 0 + dbsprite -2, 2, 0, 0, $52, 0 + dbsprite -1, 2, 0, 0, $53, 0 + dbsprite 0, 2, 0, 0, $54, 0 + dbsprite 1, 2, 0, 0, $55, 0 + +.OAMData_IntroSuicune4: + db 31 + dbsprite -3, -2, 0, 0, $11, 0 + dbsprite -2, -2, 0, 0, $12, 0 + dbsprite -1, -2, 0, 0, $13, 0 + dbsprite 0, -2, 0, 0, $14, 0 + dbsprite 1, -2, 0, 0, $15, 0 + dbsprite 2, -2, 0, 0, $16, 0 + dbsprite 3, -2, 0, 0, $17, 0 + dbsprite -4, -1, 0, 0, $20, 0 + dbsprite -3, -1, 0, 0, $21, 0 + dbsprite -2, -1, 0, 0, $22, 0 + dbsprite -1, -1, 0, 0, $23, 0 + dbsprite 0, -1, 0, 0, $24, 0 + dbsprite 1, -1, 0, 0, $25, 0 + dbsprite 2, -1, 0, 0, $26, 0 + dbsprite 3, -1, 0, 0, $27, 0 + dbsprite -4, 0, 0, 0, $30, 0 + dbsprite -3, 0, 0, 0, $31, 0 + dbsprite -2, 0, 0, 0, $32, 0 + dbsprite -1, 0, 0, 0, $33, 0 + dbsprite 0, 0, 0, 0, $34, 0 + dbsprite 1, 0, 0, 0, $35, 0 + dbsprite 2, 0, 0, 0, $36, 0 + dbsprite -3, 1, 0, 0, $41, 0 + dbsprite -2, 1, 0, 0, $42, 0 + dbsprite -1, 1, 0, 0, $43, 0 + dbsprite 0, 1, 0, 0, $44, 0 + dbsprite 1, 1, 0, 0, $45, 0 + dbsprite -3, 2, 0, 0, $51, 0 + dbsprite -2, 2, 0, 0, $52, 0 + dbsprite 0, 2, 0, 0, $54, 0 + dbsprite 1, 2, 0, 0, $55, 0 + +.OAMData_IntroPichu: + db 25 + dbsprite -3, -3, 4, 4, $00, 1 | VRAM_BANK_1 + dbsprite -2, -3, 4, 4, $01, 1 | VRAM_BANK_1 + dbsprite -1, -3, 4, 4, $02, 1 | VRAM_BANK_1 + dbsprite 0, -3, 4, 4, $03, 1 | VRAM_BANK_1 + dbsprite 1, -3, 4, 4, $04, 1 | VRAM_BANK_1 + dbsprite -3, -2, 4, 4, $10, 1 | VRAM_BANK_1 + dbsprite -2, -2, 4, 4, $11, 1 | VRAM_BANK_1 + dbsprite -1, -2, 4, 4, $12, 1 | VRAM_BANK_1 + dbsprite 0, -2, 4, 4, $13, 1 | VRAM_BANK_1 + dbsprite 1, -2, 4, 4, $14, 1 | VRAM_BANK_1 + dbsprite -3, -1, 4, 4, $20, 1 | VRAM_BANK_1 + dbsprite -2, -1, 4, 4, $21, 1 | VRAM_BANK_1 + dbsprite -1, -1, 4, 4, $22, 1 | VRAM_BANK_1 + dbsprite 0, -1, 4, 4, $23, 1 | VRAM_BANK_1 + dbsprite 1, -1, 4, 4, $24, 1 | VRAM_BANK_1 + dbsprite -3, 0, 4, 4, $30, 1 | VRAM_BANK_1 + dbsprite -2, 0, 4, 4, $31, 1 | VRAM_BANK_1 + dbsprite -1, 0, 4, 4, $32, 1 | VRAM_BANK_1 + dbsprite 0, 0, 4, 4, $33, 1 | VRAM_BANK_1 + dbsprite 1, 0, 4, 4, $34, 1 | VRAM_BANK_1 + dbsprite -3, 1, 4, 4, $40, 1 | VRAM_BANK_1 + dbsprite -2, 1, 4, 4, $41, 1 | VRAM_BANK_1 + dbsprite -1, 1, 4, 4, $42, 1 | VRAM_BANK_1 + dbsprite 0, 1, 4, 4, $43, 1 | VRAM_BANK_1 + dbsprite 1, 1, 4, 4, $44, 1 | VRAM_BANK_1 + +.OAMData_IntroWooper: + db 16 + dbsprite -3, -2, 4, 0, $00, 2 | VRAM_BANK_1 + dbsprite -2, -2, 4, 0, $01, 2 | VRAM_BANK_1 + dbsprite -1, -2, 4, 0, $02, 2 | VRAM_BANK_1 + dbsprite 0, -2, 4, 0, $03, 2 | VRAM_BANK_1 + dbsprite -3, -1, 4, 0, $04, 2 | VRAM_BANK_1 + dbsprite -2, -1, 4, 0, $05, 2 | VRAM_BANK_1 + dbsprite -1, -1, 4, 0, $06, 2 | VRAM_BANK_1 + dbsprite 0, -1, 4, 0, $07, 2 | VRAM_BANK_1 + dbsprite -3, 0, 4, 0, $08, 2 | VRAM_BANK_1 + dbsprite -2, 0, 4, 0, $09, 2 | VRAM_BANK_1 + dbsprite -1, 0, 4, 0, $0a, 2 | VRAM_BANK_1 + dbsprite 0, 0, 4, 0, $0b, 2 | VRAM_BANK_1 + dbsprite -3, 1, 4, 0, $0c, 2 | VRAM_BANK_1 + dbsprite -2, 1, 4, 0, $0d, 2 | VRAM_BANK_1 + dbsprite -1, 1, 4, 0, $0e, 2 | VRAM_BANK_1 + dbsprite 0, 1, 4, 0, $0f, 2 | VRAM_BANK_1 + +.OAMData_IntroUnown1: + db 1 + dbsprite -1, -1, 4, 4, $00, 0 + +.OAMData_IntroUnown2: + db 3 + dbsprite -1, 0, 0, 0, $00, 0 + dbsprite -1, -1, 0, 0, $01, 0 + dbsprite 0, -1, 0, 0, $02, 0 + +.OAMData_IntroUnown3: + db 7 + dbsprite -2, 1, 0, 0, $00, 0 + dbsprite -2, 0, 0, 0, $01, 0 + dbsprite -2, -1, 0, 0, $02, 0 + dbsprite -1, -1, 0, 0, $03, 0 + dbsprite -1, -2, 0, 0, $04, 0 + dbsprite 0, -2, 0, 0, $05, 0 + dbsprite 1, -2, 0, 0, $06, 0 + +.OAMData_IntroUnownF2_2: + db 8 + dbsprite -2, -1, 0, 0, $00, 0 + dbsprite -1, -1, 0, 0, $01, 0 + dbsprite 0, -1, 0, 0, $01, 0 | X_FLIP + dbsprite 1, -1, 0, 0, $00, 0 | X_FLIP + dbsprite -2, 0, 0, 0, $00, 0 | Y_FLIP + dbsprite -1, 0, 0, 0, $01, 0 | Y_FLIP + dbsprite 0, 0, 0, 0, $01, 0 | X_FLIP | Y_FLIP + dbsprite 1, 0, 0, 0, $00, 0 | X_FLIP | Y_FLIP + +.OAMData_IntroUnownF2_3: + db 12 + dbsprite -1, -3, 0, 0, $00, 0 + dbsprite -1, -2, 0, 0, $01, 0 + dbsprite -1, -1, 0, 0, $02, 0 + dbsprite 0, -3, 0, 0, $00, 0 | X_FLIP + dbsprite 0, -2, 0, 0, $01, 0 | X_FLIP + dbsprite 0, -1, 0, 0, $02, 0 | X_FLIP + dbsprite -1, 0, 0, 0, $02, 0 | Y_FLIP + dbsprite -1, 1, 0, 0, $01, 0 | Y_FLIP + dbsprite -1, 2, 0, 0, $00, 0 | Y_FLIP + dbsprite 0, 0, 0, 0, $02, 0 | X_FLIP | Y_FLIP + dbsprite 0, 1, 0, 0, $01, 0 | X_FLIP | Y_FLIP + dbsprite 0, 2, 0, 0, $00, 0 | X_FLIP | Y_FLIP + +.OAMData_IntroUnownF2_4_5: + db 20 + dbsprite -2, -3, 0, 4, $00, 0 + dbsprite -1, -3, 0, 4, $01, 0 + dbsprite 0, -3, 0, 4, $02, 0 + dbsprite 1, -3, 0, 4, $03, 0 + dbsprite -2, -2, 0, 4, $04, 0 + dbsprite -1, -2, 0, 4, $05, 0 + dbsprite 0, -2, 0, 4, $06, 0 + dbsprite 1, -2, 0, 4, $07, 0 + dbsprite -2, -1, 0, 4, $08, 0 + dbsprite -1, -1, 0, 4, $09, 0 + dbsprite 0, -1, 0, 4, $0a, 0 + dbsprite 1, -1, 0, 4, $0b, 0 + dbsprite -2, 0, 0, 4, $0c, 0 + dbsprite -1, 0, 0, 4, $0d, 0 + dbsprite 0, 0, 0, 4, $0e, 0 + dbsprite 1, 0, 0, 4, $0f, 0 + dbsprite -2, 1, 0, 4, $10, 0 + dbsprite -1, 1, 0, 4, $11, 0 + dbsprite 0, 1, 0, 4, $12, 0 + dbsprite 1, 1, 0, 4, $13, 0 + +.OAMData_IntroSuicuneAway: + db 20 + dbsprite 1, 0, 0, 0, $00, 1 | PRIORITY + dbsprite 2, 1, 0, 0, $00, 1 | PRIORITY + dbsprite 3, 2, 0, 0, $00, 1 | PRIORITY + dbsprite 4, 3, 0, 0, $00, 1 | PRIORITY + dbsprite 5, 4, 0, 0, $00, 1 | PRIORITY + dbsprite 6, 3, 0, 0, $00, 1 | PRIORITY + dbsprite 7, 2, 0, 0, $00, 1 | PRIORITY + dbsprite 8, 1, 0, 0, $00, 1 | PRIORITY + dbsprite 9, 0, 0, 0, $00, 1 | PRIORITY + dbsprite 10, 1, 0, 0, $00, 1 | PRIORITY + dbsprite 11, 2, 0, 0, $00, 1 | PRIORITY + dbsprite 12, 3, 0, 0, $00, 1 | PRIORITY + dbsprite 13, 4, 0, 0, $00, 1 | PRIORITY + dbsprite 14, 3, 0, 0, $00, 1 | PRIORITY + dbsprite 15, 2, 0, 0, $00, 1 | PRIORITY + dbsprite 16, 1, 0, 0, $00, 1 | PRIORITY + dbsprite -15, 0, 0, 0, $00, 1 | PRIORITY + dbsprite -14, 1, 0, 0, $00, 1 | PRIORITY + dbsprite -13, 2, 0, 0, $00, 1 | PRIORITY + dbsprite -12, 3, 0, 0, $00, 1 | PRIORITY + +.OAMData_Celebi: + db 4 + dbsprite -1, -1, 0, 0, $00, PAL_OW_GREEN + dbsprite 0, -1, 0, 0, $01, PAL_OW_GREEN + dbsprite -1, 0, 0, 0, $02, PAL_OW_GREEN + dbsprite 0, 0, 0, 0, $03, PAL_OW_GREEN + +.OAMData_GameFreakLogo1_3: + db 9 + dbsprite -2, -2, 4, 0, $00, 1 + dbsprite -1, -2, 4, 0, $01, 1 + dbsprite 0, -2, 4, 0, $02, 1 + dbsprite -2, -1, 4, 0, $10, 1 + dbsprite -1, -1, 4, 0, $11, 1 + dbsprite 0, -1, 4, 0, $12, 1 + dbsprite -2, 0, 4, 0, $20, 1 + dbsprite -1, 0, 4, 0, $21, 1 + dbsprite 0, 0, 4, 0, $22, 1 + +.OAMData_GameFreakLogo4_11: + db 24 + dbsprite -2, -5, 4, 0, $00, 1 + dbsprite -1, -5, 4, 0, $01, 1 + dbsprite 0, -5, 4, 0, $02, 1 + dbsprite 1, -5, 4, 0, $03, 1 + dbsprite -2, -4, 4, 0, $10, 1 + dbsprite -1, -4, 4, 0, $11, 1 + dbsprite 0, -4, 4, 0, $12, 1 + dbsprite 1, -4, 4, 0, $13, 1 + dbsprite -2, -3, 4, 0, $20, 1 + dbsprite -1, -3, 4, 0, $21, 1 + dbsprite 0, -3, 4, 0, $22, 1 + dbsprite 1, -3, 4, 0, $23, 1 + dbsprite -2, -2, 4, 0, $30, 1 + dbsprite -1, -2, 4, 0, $31, 1 + dbsprite 0, -2, 4, 0, $32, 1 + dbsprite 1, -2, 4, 0, $33, 1 + dbsprite -2, -1, 4, 0, $40, 1 + dbsprite -1, -1, 4, 0, $41, 1 + dbsprite 0, -1, 4, 0, $42, 1 + dbsprite 1, -1, 4, 0, $43, 1 + dbsprite -2, 0, 4, 0, $50, 1 + dbsprite -1, 0, 4, 0, $51, 1 + dbsprite 0, 0, 4, 0, $52, 1 + dbsprite 1, 0, 4, 0, $53, 1 diff --git a/data/sprite_anims/sequences.asm b/data/sprite_anims/sequences.asm new file mode 100644 index 0000000..c41e96c --- /dev/null +++ b/data/sprite_anims/sequences.asm @@ -0,0 +1,95 @@ +SpriteAnimSeqData: +; entries correspond to SPRITE_ANIM_INDEX_* constants (see constants/sprite_anim_constants.asm) + table_width 3, SpriteAnimSeqData + ; frameset, sequence, tile +; SPRITE_ANIM_INDEX_PARTY_MON + db SPRITE_ANIM_FRAMESET_PARTY_MON, SPRITE_ANIM_SEQ_PARTY_MON, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_GS_TITLE_TRAIL + db SPRITE_ANIM_FRAMESET_GS_TITLE_TRAIL, SPRITE_ANIM_SEQ_GS_TITLE_TRAIL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR + db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_NAMING_SCREEN_CURSOR, SPRITE_ANIM_DICT_TEXT_CURSOR +; SPRITE_ANIM_INDEX_GAMEFREAK_LOGO + db SPRITE_ANIM_FRAMESET_GAMEFREAK_LOGO, SPRITE_ANIM_SEQ_GAMEFREAK_LOGO, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_GS_GAMEFREAK_LOGO_STAR + db SPRITE_ANIM_FRAMESET_GS_GAMEFREAK_LOGO_STAR, SPRITE_ANIM_SEQ_GS_GAMEFREAK_LOGO_STAR, SPRITE_ANIM_DICT_GS_SPLASH +; SPRITE_ANIM_INDEX_GS_GAMEFREAK_LOGO_SPARKLE + db SPRITE_ANIM_FRAMESET_GS_GAMEFREAK_LOGO_SPARKLE, SPRITE_ANIM_SEQ_GS_GAMEFREAK_LOGO_SPARKLE, SPRITE_ANIM_DICT_GS_SPLASH +; SPRITE_ANIM_INDEX_SLOTS_GOLEM + db SPRITE_ANIM_FRAMESET_SLOTS_GOLEM, SPRITE_ANIM_SEQ_SLOTS_GOLEM, SPRITE_ANIM_DICT_SLOTS +; SPRITE_ANIM_INDEX_SLOTS_CHANSEY + db SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY, SPRITE_ANIM_SEQ_SLOTS_CHANSEY, SPRITE_ANIM_DICT_SLOTS +; SPRITE_ANIM_INDEX_SLOTS_EGG + db SPRITE_ANIM_FRAMESET_SLOTS_EGG, SPRITE_ANIM_SEQ_SLOTS_EGG, SPRITE_ANIM_DICT_SLOTS +; SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR + db SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR, SPRITE_ANIM_SEQ_MAIL_CURSOR, SPRITE_ANIM_DICT_TEXT_CURSOR +; SPRITE_ANIM_INDEX_RED_WALK + db SPRITE_ANIM_FRAMESET_RED_WALK, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_UNUSED_CURSOR + db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_UNUSED_CURSOR, SPRITE_ANIM_DICT_ARROW_CURSOR +; SPRITE_ANIM_INDEX_MEMORY_GAME_CURSOR + db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_MEMORY_GAME_CURSOR, SPRITE_ANIM_DICT_ARROW_CURSOR +; SPRITE_ANIM_INDEX_POKEGEAR_ARROW + db SPRITE_ANIM_FRAMESET_STILL_CURSOR, SPRITE_ANIM_SEQ_POKEGEAR_ARROW, SPRITE_ANIM_DICT_ARROW_CURSOR +; SPRITE_ANIM_INDEX_TRADE_POKE_BALL + db SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL, SPRITE_ANIM_SEQ_TRADE_POKE_BALL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_TRADE_POOF + db SPRITE_ANIM_FRAMESET_TRADE_POOF, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_TRADE_TUBE_BULGE + db SPRITE_ANIM_FRAMESET_TRADE_TUBE_BULGE, SPRITE_ANIM_SEQ_TRADE_TUBE_BULGE, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_TRADEMON_ICON + db SPRITE_ANIM_FRAMESET_TRADEMON_ICON, SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_TRADEMON_BUBBLE + db SPRITE_ANIM_FRAMESET_TRADEMON_BUBBLE, SPRITE_ANIM_SEQ_TRADEMON_IN_TUBE, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_EVOLUTION_BALL_OF_LIGHT + db SPRITE_ANIM_FRAMESET_EVOLUTION_BALL_OF_LIGHT, SPRITE_ANIM_SEQ_REVEAL_NEW_MON, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_RADIO_TUNING_KNOB + db SPRITE_ANIM_FRAMESET_RADIO_TUNING_KNOB, SPRITE_ANIM_SEQ_RADIO_TUNING_KNOB, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_MAGNET_TRAIN_RED + db SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_RED, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_LEAF + db SPRITE_ANIM_FRAMESET_LEAF, SPRITE_ANIM_SEQ_CUT_LEAVES, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_CUT_TREE + db SPRITE_ANIM_FRAMESET_CUT_TREE, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_FLY_LEAF + db SPRITE_ANIM_FRAMESET_LEAF, SPRITE_ANIM_SEQ_FLY_LEAF, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_EGG_CRACK + db SPRITE_ANIM_FRAMESET_EGG_CRACK, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_GS_INTRO_HO_OH_LUGIA + db SPRITE_ANIM_FRAMESET_GS_INTRO_HO_OH_LUGIA, SPRITE_ANIM_SEQ_GS_INTRO_HO_OH_LUGIA, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_HEADBUTT + db SPRITE_ANIM_FRAMESET_HEADBUTT, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_EGG_HATCH + db SPRITE_ANIM_FRAMESET_EGG_HATCH_1, SPRITE_ANIM_SEQ_REVEAL_NEW_MON, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_EZCHAT_CURSOR + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1, SPRITE_ANIM_SEQ_EZCHAT_CURSOR, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_BLUE_WALK + db SPRITE_ANIM_FRAMESET_BLUE_WALK, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE + db SPRITE_ANIM_FRAMESET_MAGNET_TRAIN_BLUE, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL + db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_BALL, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL + db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_BALL, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE + db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_CABLE_BULGE, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_PULSE + db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_SENT_PULSE, SPRITE_ANIM_SEQ_MOBILE_TRADE_SENT_PULSE, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_PULSE + db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_OT_PULSE, SPRITE_ANIM_SEQ_MOBILE_TRADE_OT_PULSE, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_MOBILE_TRADE_PING + db SPRITE_ANIM_FRAMESET_MOBILE_TRADE_PING, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_INTRO_SUICUNE + db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE, SPRITE_ANIM_SEQ_INTRO_SUICUNE, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_INTRO_PICHU + db SPRITE_ANIM_FRAMESET_INTRO_PICHU, SPRITE_ANIM_SEQ_INTRO_PICHU_WOOPER, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_INTRO_WOOPER + db SPRITE_ANIM_FRAMESET_INTRO_WOOPER, SPRITE_ANIM_SEQ_INTRO_PICHU_WOOPER, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_INTRO_UNOWN + db SPRITE_ANIM_FRAMESET_INTRO_UNOWN_1, SPRITE_ANIM_SEQ_INTRO_UNOWN, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_INTRO_UNOWN_F + db SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F, SPRITE_ANIM_SEQ_INTRO_UNOWN_F, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY + db SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_AWAY, SPRITE_ANIM_SEQ_INTRO_SUICUNE_AWAY, SPRITE_ANIM_DICT_DEFAULT +; SPRITE_ANIM_INDEX_CELEBI + db SPRITE_ANIM_FRAMESET_CELEBI_LEFT, SPRITE_ANIM_SEQ_NULL, SPRITE_ANIM_DICT_DEFAULT + assert_table_length NUM_SPRITE_ANIM_INDEXES diff --git a/data/sprite_anims/unused_gfx.asm b/data/sprite_anims/unused_gfx.asm new file mode 100644 index 0000000..9dae35b --- /dev/null +++ b/data/sprite_anims/unused_gfx.asm @@ -0,0 +1,23 @@ +MACRO sprite_anim_obj_gfx +; # tiles, gfx pointer + db \1 + dbw \2, \3 +ENDM + +UnusedSpriteAnimGFX: +; entries correspond to SPRITE_ANIM_DICT_* constants + table_width 4, UnusedSpriteAnimGFX + ; # tiles, gfx bank, gfx pointer + ; (all pointers were dummied out to .DeletedGFX) + sprite_anim_obj_gfx 128, $01, .DeletedGFX ; SPRITE_ANIM_DICT_DEFAULT + sprite_anim_obj_gfx 128, $01, .DeletedGFX ; unused + sprite_anim_obj_gfx 128, $01, .DeletedGFX ; unused + sprite_anim_obj_gfx 128, $01, .DeletedGFX ; unused + sprite_anim_obj_gfx 16, $37, .DeletedGFX ; unused + sprite_anim_obj_gfx 16, $11, .DeletedGFX ; SPRITE_ANIM_DICT_TEXT_CURSOR + sprite_anim_obj_gfx 16, $39, .DeletedGFX ; SPRITE_ANIM_DICT_GS_SPLASH (the bank includes engine/movie/splash.asm) + sprite_anim_obj_gfx 16, $24, .DeletedGFX ; SPRITE_ANIM_DICT_SLOTS (the bank includes engine/games/slot_machine.asm) + sprite_anim_obj_gfx 16, $21, .DeletedGFX ; SPRITE_ANIM_DICT_ARROW_CURSOR + assert_table_length NUM_SPRITE_ANIM_GFX + +.DeletedGFX diff --git a/data/sprites/emotes.asm b/data/sprites/emotes.asm new file mode 100644 index 0000000..ef4485b --- /dev/null +++ b/data/sprites/emotes.asm @@ -0,0 +1,23 @@ +MACRO emote +; graphics pointer, length, starting tile + dw \1 + db \2 tiles, BANK(\1) + dw vTiles0 tile \3 +ENDM + +Emotes: +; entries correspond to EMOTE_* constants + table_width EMOTE_LENGTH, Emotes + emote ShockEmote, 4, $f8 + emote QuestionEmote, 4, $f8 + emote HappyEmote, 4, $f8 + emote SadEmote, 4, $f8 + emote HeartEmote, 4, $f8 + emote BoltEmote, 4, $f8 + emote SleepEmote, 4, $f8 + emote FishEmote, 4, $f8 + emote JumpShadowGFX, 1, $fc + emote FishingRodGFX, 2, $fc + emote BoulderDustGFX, 2, $fe + emote GrassRustleGFX, 1, $fe + assert_table_length NUM_EMOTES diff --git a/data/sprites/facings.asm b/data/sprites/facings.asm new file mode 100644 index 0000000..b1bc7ab --- /dev/null +++ b/data/sprites/facings.asm @@ -0,0 +1,238 @@ +Facings: +; entries correspond to FACING_* constants (see constants/map_object_constants.asm) + table_width 2, Facings + dw FacingStepDown0 + dw FacingStepDown1 + dw FacingStepDown2 + dw FacingStepDown3 + dw FacingStepUp0 + dw FacingStepUp1 + dw FacingStepUp2 + dw FacingStepUp3 + dw FacingStepLeft0 + dw FacingStepLeft1 + dw FacingStepLeft2 + dw FacingStepLeft3 + dw FacingStepRight0 + dw FacingStepRight1 + dw FacingStepRight2 + dw FacingStepRight3 + dw FacingFishDown + dw FacingFishUp + dw FacingFishLeft + dw FacingFishRight + dw FacingEmote + dw FacingShadow + dw FacingBigDollAsymmetric + dw FacingBigDollSymmetric + dw FacingWeirdTree0 + dw FacingWeirdTree1 + dw FacingWeirdTree2 + dw FacingWeirdTree3 + dw FacingBoulderDust1 + dw FacingBoulderDust2 + dw FacingGrass1 + dw FacingGrass2 + assert_table_length NUM_FACINGS + dw 0 ; end + +; Tables used as a reference to transform OAM data. + +; Format: +; db y, x, attributes, tile index + +FacingStepDown0: +FacingStepDown2: +FacingWeirdTree0: +FacingWeirdTree2: ; standing down + db 4 ; # + db 0, 0, 0, $00 + db 0, 8, 0, $01 + db 8, 0, RELATIVE_ATTRIBUTES, $02 + db 8, 8, RELATIVE_ATTRIBUTES, $03 + +FacingStepDown1: ; walking down 1 + db 4 ; # + db 0, 0, 0, $80 + db 0, 8, 0, $81 + db 8, 0, RELATIVE_ATTRIBUTES, $82 + db 8, 8, RELATIVE_ATTRIBUTES, $83 + +FacingStepDown3: ; walking down 2 + db 4 ; # + db 0, 8, X_FLIP, $80 + db 0, 0, X_FLIP, $81 + db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $82 + db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $83 + +FacingStepUp0: +FacingStepUp2: ; standing up + db 4 ; # + db 0, 0, 0, $04 + db 0, 8, 0, $05 + db 8, 0, RELATIVE_ATTRIBUTES, $06 + db 8, 8, RELATIVE_ATTRIBUTES, $07 + +FacingStepUp1: ; walking up 1 + db 4 ; # + db 0, 0, 0, $84 + db 0, 8, 0, $85 + db 8, 0, RELATIVE_ATTRIBUTES, $86 + db 8, 8, RELATIVE_ATTRIBUTES, $87 + +FacingStepUp3: ; walking up 2 + db 4 ; # + db 0, 8, X_FLIP, $84 + db 0, 0, X_FLIP, $85 + db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $86 + db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $87 + +FacingStepLeft0: +FacingStepLeft2: ; standing left + db 4 ; # + db 0, 0, 0, $08 + db 0, 8, 0, $09 + db 8, 0, RELATIVE_ATTRIBUTES, $0a + db 8, 8, RELATIVE_ATTRIBUTES, $0b + +FacingStepRight0: +FacingStepRight2: ; standing right + db 4 ; # + db 0, 8, X_FLIP, $08 + db 0, 0, X_FLIP, $09 + db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $0a + db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $0b + +FacingStepLeft1: +FacingStepLeft3: ; walking left + db 4 ; # + db 0, 0, 0, $88 + db 0, 8, 0, $89 + db 8, 0, RELATIVE_ATTRIBUTES, $8a + db 8, 8, RELATIVE_ATTRIBUTES, $8b + +FacingStepRight1: +FacingStepRight3: ; walking right + db 4 ; # + db 0, 8, X_FLIP, $88 + db 0, 0, X_FLIP, $89 + db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $8a + db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $8b + +FacingFishDown: ; fishing down + db 5 ; # + db 0, 0, 0, $00 + db 0, 8, 0, $01 + db 8, 0, RELATIVE_ATTRIBUTES, $02 + db 8, 8, RELATIVE_ATTRIBUTES, $03 + db 16, 0, ABSOLUTE_TILE_ID, $fc + +FacingFishUp: ; fishing up + db 5 ; # + db 0, 0, 0, $04 + db 0, 8, 0, $05 + db 8, 0, RELATIVE_ATTRIBUTES, $06 + db 8, 8, RELATIVE_ATTRIBUTES, $07 + db -8, 0, ABSOLUTE_TILE_ID, $fc + +FacingFishLeft: ; fishing left + db 5 ; # + db 0, 0, 0, $08 + db 0, 8, 0, $09 + db 8, 0, RELATIVE_ATTRIBUTES, $0a + db 8, 8, RELATIVE_ATTRIBUTES, $0b + db 5, -8, ABSOLUTE_TILE_ID | X_FLIP, $fd + +FacingFishRight: ; fishing right + db 5 ; # + db 0, 8, X_FLIP, $08 + db 0, 0, X_FLIP, $09 + db 8, 8, RELATIVE_ATTRIBUTES | X_FLIP, $0a + db 8, 0, RELATIVE_ATTRIBUTES | X_FLIP, $0b + db 5, 16, ABSOLUTE_TILE_ID, $fd + +FacingEmote: ; emote + db 4 ; # + db 0, 0, ABSOLUTE_TILE_ID, $f8 + db 0, 8, ABSOLUTE_TILE_ID, $f9 + db 8, 0, ABSOLUTE_TILE_ID, $fa + db 8, 8, ABSOLUTE_TILE_ID, $fb + +FacingShadow: ; shadow + db 2 ; # + db 0, 0, ABSOLUTE_TILE_ID, $fc + db 0, 8, ABSOLUTE_TILE_ID | X_FLIP, $fc + +FacingBigDollSymmetric: ; big snorlax or lapras doll + db 16 ; # + db 0, 0, 0, $00 + db 0, 8, 0, $01 + db 8, 0, 0, $02 + db 8, 8, 0, $03 + db 16, 0, 0, $04 + db 16, 8, 0, $05 + db 24, 0, 0, $06 + db 24, 8, 0, $07 + db 0, 24, X_FLIP, $00 + db 0, 16, X_FLIP, $01 + db 8, 24, X_FLIP, $02 + db 8, 16, X_FLIP, $03 + db 16, 24, X_FLIP, $04 + db 16, 16, X_FLIP, $05 + db 24, 24, X_FLIP, $06 + db 24, 16, X_FLIP, $07 + +FacingWeirdTree1: + db 4 ; # + db 0, 0, 0, $04 + db 0, 8, 0, $05 + db 8, 0, 0, $06 + db 8, 8, 0, $07 + +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 + +FacingBigDollAsymmetric: ; big doll other than snorlax or lapras + db 14 ; # + db 0, 0, 0, $00 + db 0, 8, 0, $01 + db 8, 0, 0, $04 + db 8, 8, 0, $05 + db 16, 8, 0, $07 + db 24, 8, 0, $0a + db 0, 24, 0, $03 + db 0, 16, 0, $02 + db 8, 24, X_FLIP, $02 + db 8, 16, 0, $06 + db 16, 24, 0, $09 + db 16, 16, 0, $08 + db 24, 24, X_FLIP, $04 + db 24, 16, 0, $0b + +FacingBoulderDust1: ; boulder dust 1 + db 4 ; # + db 0, 0, ABSOLUTE_TILE_ID, $fe + db 0, 8, ABSOLUTE_TILE_ID, $fe + db 8, 0, ABSOLUTE_TILE_ID, $fe + db 8, 8, ABSOLUTE_TILE_ID, $fe + +FacingBoulderDust2: ; boulder dust 2 + db 4 ; # + db 0, 0, ABSOLUTE_TILE_ID, $ff + db 0, 8, ABSOLUTE_TILE_ID, $ff + db 8, 0, ABSOLUTE_TILE_ID, $ff + db 8, 8, ABSOLUTE_TILE_ID, $ff + +FacingGrass1: + db 2 ; # + db 8, 0, ABSOLUTE_TILE_ID, $fe + db 8, 8, ABSOLUTE_TILE_ID | X_FLIP, $fe + +FacingGrass2: + db 2 ; # + db 9, -1, ABSOLUTE_TILE_ID, $fe + db 9, 9, ABSOLUTE_TILE_ID | X_FLIP, $fe diff --git a/data/sprites/map_objects.asm b/data/sprites/map_objects.asm new file mode 100644 index 0000000..5bc0e0e --- /dev/null +++ b/data/sprites/map_objects.asm @@ -0,0 +1,309 @@ +SpriteMovementData:: +; entries correspond to SPRITEMOVEDATA_* constants + table_width NUM_SPRITEMOVEDATA_FIELDS, SpriteMovementData + +; SPRITEMOVEDATA_00 + db SPRITEMOVEFN_00 ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db WONT_DELETE ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_STILL + db SPRITEMOVEFN_STANDING ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db FIXED_FACING | SLIDING ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_WANDER + db SPRITEMOVEFN_RANDOM_WALK_XY ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_SPINRANDOM_SLOW + db SPRITEMOVEFN_SLOW_RANDOM_SPIN ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_WALK_UP_DOWN + db SPRITEMOVEFN_RANDOM_WALK_Y ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_WALK_LEFT_RIGHT + db SPRITEMOVEFN_RANDOM_WALK_X ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_STANDING_DOWN + db SPRITEMOVEFN_STANDING ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_STANDING_UP + db SPRITEMOVEFN_STANDING ; movement function + db UP ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_STANDING_LEFT + db SPRITEMOVEFN_STANDING ; movement function + db LEFT ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_STANDING_RIGHT + db SPRITEMOVEFN_STANDING ; movement function + db RIGHT ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_SPINRANDOM_FAST + db SPRITEMOVEFN_FAST_RANDOM_SPIN ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_PLAYER + db SPRITEMOVEFN_OBEY_DPAD ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db WONT_DELETE ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_INDEXED_1 + db SPRITEMOVEFN_INDEXED_1 ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_INDEXED_2 + db SPRITEMOVEFN_INDEXED_2 ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_0E + db SPRITEMOVEFN_0A ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_0F + db SPRITEMOVEFN_0B ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_10 + db SPRITEMOVEFN_0C ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_11 + db SPRITEMOVEFN_0D ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_12 + db SPRITEMOVEFN_0E ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_FOLLOWING + db SPRITEMOVEFN_FOLLOW ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db WONT_DELETE ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_SCRIPTED + db SPRITEMOVEFN_SCRIPTED ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db WONT_DELETE ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_BIGDOLLSYM + db SPRITEMOVEFN_BIG_SNORLAX ; movement function + db DOWN ; facing + db OBJECT_ACTION_BIG_DOLL_SYM ; action + db WONT_DELETE | FIXED_FACING | SLIDING | MOVE_ANYWHERE ; flags1 + db LOW_PRIORITY ; flags2 + db STRENGTH_BOULDER | BIG_OBJECT ; palette flags + +; SPRITEMOVEDATA_POKEMON + db SPRITEMOVEFN_BOUNCE ; movement function + db DOWN ; facing + db OBJECT_ACTION_BOUNCE ; action + db WONT_DELETE | FIXED_FACING | SLIDING | MOVE_ANYWHERE ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_SUDOWOODO + db SPRITEMOVEFN_STANDING ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db FIXED_FACING | SLIDING ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_SMASHABLE_ROCK + db SPRITEMOVEFN_STANDING ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db WONT_DELETE | FIXED_FACING | SLIDING | MOVE_ANYWHERE ; flags1 + db USE_OBP1 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_STRENGTH_BOULDER + db SPRITEMOVEFN_STRENGTH ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db WONT_DELETE | FIXED_FACING | SLIDING | MOVE_ANYWHERE ; flags1 + db 0 ; flags2 + db STRENGTH_BOULDER ; palette flags + +; SPRITEMOVEDATA_FOLLOWNOTEXACT + db SPRITEMOVEFN_FOLLOWNOTEXACT ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db WONT_DELETE ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_SHADOW + db SPRITEMOVEFN_SHADOW ; movement function + db DOWN ; facing + db OBJECT_ACTION_00 ; action + db WONT_DELETE | FIXED_FACING | SLIDING | EMOTE_OBJECT ; flags1 + db LOW_PRIORITY ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_EMOTE + db SPRITEMOVEFN_EMOTE ; movement function + db DOWN ; facing + db OBJECT_ACTION_EMOTE ; action + db WONT_DELETE | FIXED_FACING | SLIDING | EMOTE_OBJECT ; flags1 + db HIGH_PRIORITY ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_SCREENSHAKE + db SPRITEMOVEFN_SCREENSHAKE ; movement function + db DOWN ; facing + db OBJECT_ACTION_00 ; action + db WONT_DELETE | EMOTE_OBJECT ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE + db SPRITEMOVEFN_SPIN_COUNTERCLOCKWISE ; movement function + db LEFT ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_SPINCLOCKWISE + db SPRITEMOVEFN_SPIN_CLOCKWISE ; movement function + db RIGHT ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_BIGDOLLASYM + db SPRITEMOVEFN_STRENGTH ; movement function + db DOWN ; facing + db OBJECT_ACTION_BIG_DOLL_ASYM ; action + db WONT_DELETE | FIXED_FACING | SLIDING | MOVE_ANYWHERE ; flags1 + db LOW_PRIORITY ; flags2 + db STRENGTH_BOULDER | BIG_OBJECT ; palette flags + +; SPRITEMOVEDATA_BIGDOLL + db SPRITEMOVEFN_STRENGTH ; movement function + db DOWN ; facing + db OBJECT_ACTION_BIG_DOLL ; action + db WONT_DELETE | FIXED_FACING | SLIDING | MOVE_ANYWHERE ; flags1 + db LOW_PRIORITY ; flags2 + db STRENGTH_BOULDER | BIG_OBJECT ; palette flags + +; SPRITEMOVEDATA_BOULDERDUST + db SPRITEMOVEFN_BOULDERDUST ; movement function + db DOWN ; facing + db OBJECT_ACTION_BOULDER_DUST ; action + db WONT_DELETE | FIXED_FACING | SLIDING | EMOTE_OBJECT ; flags1 + db LOW_PRIORITY ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_GRASS + db SPRITEMOVEFN_GRASS ; movement function + db DOWN ; facing + db OBJECT_ACTION_GRASS_SHAKE ; action + db WONT_DELETE | FIXED_FACING | SLIDING | EMOTE_OBJECT ; flags1 + db HIGH_PRIORITY ; flags2 + db 0 ; palette flags + +; SPRITEMOVEDATA_SWIM_WANDER + db SPRITEMOVEFN_RANDOM_WALK_XY ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db SWIMMING ; palette flags + + assert_table_length NUM_SPRITEMOVEDATA + +; unused + db SPRITEMOVEFN_00 ; movement function + db DOWN ; facing + db OBJECT_ACTION_STAND ; action + db 0 ; flags1 + db 0 ; flags2 + db 0 ; palette flags diff --git a/data/sprites/player_sprites.asm b/data/sprites/player_sprites.asm new file mode 100644 index 0000000..89eb6e8 --- /dev/null +++ b/data/sprites/player_sprites.asm @@ -0,0 +1,13 @@ +ChrisStateSprites: + db PLAYER_NORMAL, SPRITE_CHRIS + db PLAYER_BIKE, SPRITE_CHRIS_BIKE + db PLAYER_SURF, SPRITE_SURF + db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU + db -1 ; end + +KrisStateSprites: + db PLAYER_NORMAL, SPRITE_KRIS + db PLAYER_BIKE, SPRITE_KRIS_BIKE + db PLAYER_SURF, SPRITE_SURF + db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU + db -1 ; end diff --git a/data/sprites/sprite_mons.asm b/data/sprites/sprite_mons.asm new file mode 100644 index 0000000..d590011 --- /dev/null +++ b/data/sprites/sprite_mons.asm @@ -0,0 +1,39 @@ +SpriteMons: +; entries correspond to SPRITE_* constants past SPRITE_POKEMON + table_width 2, SpriteMons + dw UNOWN + dw GEODUDE + dw GROWLITHE + dw WEEDLE + dw SHELLDER + dw ODDISH + dw GENGAR + dw ZUBAT + dw MAGIKARP + dw SQUIRTLE + dw TOGEPI + dw BUTTERFREE + dw DIGLETT + dw POLIWAG + dw PIKACHU + dw CLEFAIRY + dw CHARMANDER + dw JYNX + dw STARMIE + dw BULBASAUR + dw JIGGLYPUFF + dw GRIMER + dw EKANS + dw PARAS + dw TENTACOOL + dw TAUROS + dw MACHOP + dw VOLTORB + dw LAPRAS + dw RHYDON + dw MOLTRES + dw SNORLAX + dw GYARADOS + dw LUGIA + dw HO_OH + assert_table_length NUM_POKEMON_SPRITES diff --git a/data/sprites/sprites.asm b/data/sprites/sprites.asm new file mode 100644 index 0000000..25281c2 --- /dev/null +++ b/data/sprites/sprites.asm @@ -0,0 +1,112 @@ +MACRO overworld_sprite +; pointer, length, type, palette + dw \1 + db \2 tiles, BANK(\1), \3, \4 +ENDM + +OverworldSprites: +; entries correspond to SPRITE_* constants + table_width NUM_SPRITEDATA_FIELDS, OverworldSprites + overworld_sprite ChrisSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite ChrisBikeSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite GameboyKidSpriteGFX, 12, STANDING_SPRITE, PAL_OW_GREEN + overworld_sprite RivalSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite OakSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite RedSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite BlueSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite BillSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite ElderSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite JanineSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite KurtSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite MomSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite BlaineSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite RedsMomSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite DaisySpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite ElmSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite WillSpriteGFX, 12, STANDING_SPRITE, PAL_OW_RED + overworld_sprite FalknerSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite WhitneySpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite BugsySpriteGFX, 12, WALKING_SPRITE, PAL_OW_GREEN + overworld_sprite MortySpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite ChuckSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite JasmineSpriteGFX, 12, WALKING_SPRITE, PAL_OW_GREEN + overworld_sprite PryceSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite ClairSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite BrockSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite KarenSpriteGFX, 12, STANDING_SPRITE, PAL_OW_BLUE + overworld_sprite BrunoSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite MistySpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite LanceSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite SurgeSpriteGFX, 12, WALKING_SPRITE, PAL_OW_GREEN + overworld_sprite ErikaSpriteGFX, 12, WALKING_SPRITE, PAL_OW_GREEN + overworld_sprite KogaSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite SabrinaSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite CooltrainerMSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite CooltrainerFSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite BugCatcherSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite TwinSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite YoungsterSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite LassSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite TeacherSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite BeautySpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite SuperNerdSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite RockerSpriteGFX, 12, WALKING_SPRITE, PAL_OW_GREEN + overworld_sprite PokefanMSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite PokefanFSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite GrampsSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite GrannySpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite SwimmerGuySpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite SwimmerGirlSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite BigSnorlaxSpriteGFX, 12, STANDING_SPRITE, PAL_OW_BLUE + overworld_sprite SurfingPikachuSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite RocketSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite RocketGirlSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite NurseSpriteGFX, 12, STANDING_SPRITE, PAL_OW_RED + overworld_sprite LinkReceptionistSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite ClerkSpriteGFX, 12, WALKING_SPRITE, PAL_OW_GREEN + overworld_sprite FisherSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite FishingGuruSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite ScientistSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite KimonoGirlSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite SageSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite UnusedGuySpriteGFX, 12, STANDING_SPRITE, PAL_OW_RED + overworld_sprite GentlemanSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite BlackBeltSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite ReceptionistSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite OfficerSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite CalSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite SlowpokeSpriteGFX, 4, STILL_SPRITE, PAL_OW_RED + overworld_sprite CaptainSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite BigLaprasSpriteGFX, 12, STANDING_SPRITE, PAL_OW_BLUE + overworld_sprite GymGuideSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite SailorSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite BikerSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BROWN + overworld_sprite PharmacistSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite MonsterSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite FairySpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite BirdSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite DragonSpriteGFX, 12, WALKING_SPRITE, PAL_OW_RED + overworld_sprite BigOnixSpriteGFX, 12, STANDING_SPRITE, PAL_OW_BROWN + overworld_sprite N64SpriteGFX, 4, STILL_SPRITE, PAL_OW_BROWN + overworld_sprite SudowoodoSpriteGFX, 12, STANDING_SPRITE, PAL_OW_GREEN + overworld_sprite SurfSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite PokeBallSpriteGFX, 4, STILL_SPRITE, PAL_OW_RED + overworld_sprite PokedexSpriteGFX, 4, STILL_SPRITE, PAL_OW_BROWN + overworld_sprite PaperSpriteGFX, 4, STILL_SPRITE, PAL_OW_BLUE + overworld_sprite VirtualBoySpriteGFX, 4, STILL_SPRITE, PAL_OW_RED + overworld_sprite OldLinkReceptionistSpriteGFX, 12, STANDING_SPRITE, PAL_OW_RED + overworld_sprite RockSpriteGFX, 4, STILL_SPRITE, PAL_OW_ROCK + overworld_sprite BoulderSpriteGFX, 4, STILL_SPRITE, PAL_OW_ROCK + overworld_sprite SnesSpriteGFX, 4, STILL_SPRITE, PAL_OW_BLUE + overworld_sprite FamicomSpriteGFX, 4, STILL_SPRITE, PAL_OW_RED + overworld_sprite FruitTreeSpriteGFX, 4, STILL_SPRITE, PAL_OW_TREE + overworld_sprite GoldTrophySpriteGFX, 4, STILL_SPRITE, PAL_OW_BROWN + overworld_sprite SilverTrophySpriteGFX, 4, STILL_SPRITE, PAL_OW_EMOTE + overworld_sprite KrisSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite KrisBikeSpriteGFX, 12, WALKING_SPRITE, PAL_OW_BLUE + overworld_sprite KurtOutsideSpriteGFX, 12, STANDING_SPRITE, PAL_OW_BROWN + overworld_sprite SuicuneSpriteGFX, 4, STILL_SPRITE, PAL_OW_BLUE + overworld_sprite EnteiSpriteGFX, 4, STILL_SPRITE, PAL_OW_RED + overworld_sprite RaikouSpriteGFX, 4, STILL_SPRITE, PAL_OW_RED + overworld_sprite StandingYoungsterSpriteGFX, 12, STANDING_SPRITE, PAL_OW_BLUE + assert_table_length NUM_OVERWORLD_SPRITES diff --git a/data/text/battle.asm b/data/text/battle.asm new file mode 100644 index 0000000..f9328e8 --- /dev/null +++ b/data/text/battle.asm @@ -0,0 +1,1108 @@ +BattleText:: ; used only for BANK(BattleText) + +BattleText_PlayerPickedUpPayDayMoney: + text " picked up" + line "¥@" + text_decimal wPayDayMoney, 3, 6 + text "!" + prompt + +WildPokemonAppearedText: + text "Wild @" + text_ram wEnemyMonNickname + text_start + line "appeared!" + prompt + +HookedPokemonAttackedText: + text "The hooked" + line "@" + text_ram wEnemyMonNickname + text_start + cont "attacked!" + prompt + +PokemonFellFromTreeText: + text_ram wEnemyMonNickname + text " fell" + line "out of the tree!" + prompt + +WildCelebiAppearedText: + text "Wild @" + text_ram wEnemyMonNickname + text_start + line "appeared!" + prompt + +WantsToBattleText:: + text "" + line "wants to battle!" + prompt + +BattleText_WildFled: + text "Wild @" + text_ram wEnemyMonNickname + text_start + line "fled!" + prompt + +BattleText_EnemyFled: + text "Enemy @" + text_ram wEnemyMonNickname + text_start + line "fled!" + prompt + +HurtByPoisonText: + text "" + line "is hurt by poison!" + prompt + +HurtByBurnText: + text "'s" + line "hurt by its burn!" + prompt + +LeechSeedSapsText: + text "LEECH SEED saps" + line "!" + prompt + +HasANightmareText: + text "" + line "has a NIGHTMARE!" + prompt + +HurtByCurseText: + text "'s" + line "hurt by the CURSE!" + prompt + +SandstormHitsText: + text "The SANDSTORM hits" + line "!" + prompt + +PerishCountText: + text "'s" + line "PERISH count is @" + text_decimal wTextDecimalByte, 1, 1 + text "!" + prompt + +BattleText_TargetRecoveredWithItem: + text "" + line "recovered with" + cont "@" + text_ram wStringBuffer1 + text "." + prompt + +BattleText_UserRecoveredPPUsing: + text "" + line "recovered PP using" + cont "@" + text_ram wStringBuffer1 + text "." + prompt + +BattleText_TargetWasHitByFutureSight: + text "" + line "was hit by FUTURE" + cont "SIGHT!" + prompt + +BattleText_SafeguardFaded: + text "'s" + line "SAFEGUARD faded!" + prompt + +BattleText_MonsLightScreenFell: + text_ram wStringBuffer1 + text " #MON's" + line "LIGHT SCREEN fell!" + prompt + +BattleText_MonsReflectFaded: + text_ram wStringBuffer1 + text " #MON's" + line "REFLECT faded!" + prompt + +BattleText_RainContinuesToFall: + text "Rain continues to" + line "fall." + prompt + +BattleText_TheSunlightIsStrong: + text "The sunlight is" + line "strong." + prompt + +BattleText_TheSandstormRages: + text "The SANDSTORM" + line "rages." + prompt + +BattleText_TheRainStopped: + text "The rain stopped." + prompt + +BattleText_TheSunlightFaded: + text "The sunlight" + line "faded." + prompt + +BattleText_TheSandstormSubsided: + text "The SANDSTORM" + line "subsided." + prompt + +BattleText_EnemyMonFainted: + text "Enemy @" + text_ram wEnemyMonNickname + text_start + line "fainted!" + prompt + +GotMoneyForWinningText: + text " got ¥@" + text_decimal wBattleReward, 3, 6 + text_start + line "for winning!" + prompt + +BattleText_EnemyWasDefeated: + text "" + line "was defeated!" + prompt + +TiedAgainstText: + text "Tied against" + line "!" + prompt + +SentSomeToMomText: + text " got ¥@" + text_decimal wBattleReward, 3, 6 + text_start + line "for winning!" + cont "Sent some to MOM!" + prompt + +SentHalfToMomText: + text "Sent half to MOM!" + prompt + +SentAllToMomText: + text "Sent all to MOM!" + prompt + +UnusedRivalLossText: ; unreferenced + text ": Huh? I" + line "should've chosen" + cont "your #MON!" + prompt + +BattleText_MonFainted: + text_ram wBattleMonNickname + text_start + line "fainted!" + prompt + +BattleText_UseNextMon: + text "Use next #MON?" + done + +UnusedRivalWinText: ; unreferenced + text ": Yes!" + line "I guess I chose a" + cont "good #MON!" + prompt + +LostAgainstText: + text "Lost against" + line "!" + prompt + +BattleText_EnemyIsAboutToUseWillPlayerChangeMon: + text "" + line "is about to use" + cont "@" + text_ram wEnemyMonNickname + text "." + + para "Will " + line "change #MON?" + done + +BattleText_EnemySentOut: + text "" + line "sent out" + cont "@" + text_ram wEnemyMonNickname + text "!" + done + +BattleText_TheresNoWillToBattle: + text "There's no will to" + line "battle!" + prompt + +BattleText_AnEGGCantBattle: + text "An EGG can't" + line "battle!" + prompt + +BattleText_CantEscape2: + text "Can't escape!" + prompt + +BattleText_TheresNoEscapeFromTrainerBattle: + text "No! There's no" + line "running from a" + cont "trainer battle!" + prompt + +BattleText_GotAwaySafely: + text "Got away safely!" + prompt + +BattleText_UserFledUsingAStringBuffer1: + text "" + line "fled using a" + cont "@" + text_ram wStringBuffer1 + text "!" + prompt + +BattleText_CantEscape: + text "Can't escape!" + prompt + +BattleText_UserHurtBySpikes: + text "'s" + line "hurt by SPIKES!" + prompt + +RecoveredUsingText: + text "" + line "recovered using a" + cont "@" + text_ram wStringBuffer1 + text "!" + prompt + +BattleText_UsersStringBuffer1Activated: + text "'s" + line "@" + text_ram wStringBuffer1 + text_start + cont "activated!" + prompt + +BattleText_ItemsCantBeUsedHere: + text "Items can't be" + line "used here." + prompt + +BattleText_MonIsAlreadyOut: + text_ram wBattleMonNickname + text_start + line "is already out." + prompt + +BattleText_MonCantBeRecalled: + text_ram wBattleMonNickname + text_start + line "can't be recalled!" + prompt + +BattleText_TheresNoPPLeftForThisMove: + text "There's no PP left" + line "for this move!" + prompt + +BattleText_TheMoveIsDisabled: + text "The move is" + line "DISABLED!" + prompt + +BattleText_MonHasNoMovesLeft: + text_ram wBattleMonNickname + text_start + line "has no moves left!" + done + +BattleText_TargetsEncoreEnded: + text "'s" + line "ENCORE ended!" + prompt + +BattleText_StringBuffer1GrewToLevel: + text_ram wStringBuffer1 + text " grew to" + line "level @" + text_decimal wCurPartyLevel, 1, 3 + text "!@" + sound_dex_fanfare_50_79 + text_end + + text_end ; unreferenced + +BattleText_WildMonIsEating: + text "Wild @" + text_ram wEnemyMonNickname + text_start + line "is eating!" + prompt + +BattleText_WildMonIsAngry: + text "Wild @" + text_ram wEnemyMonNickname + text_start + line "is angry!" + prompt + +FastAsleepText: + text "" + line "is fast asleep!" + prompt + +WokeUpText: + text "" + line "woke up!" + prompt + +FrozenSolidText: + text "" + line "is frozen solid!" + prompt + +FlinchedText: + text "" + line "flinched!" + prompt + +MustRechargeText: + text "" + line "must recharge!" + prompt + +DisabledNoMoreText: + text "'s" + line "disabled no more!" + prompt + +IsConfusedText: + text "" + line "is confused!" + prompt + +HurtItselfText: + text "It hurt itself in" + line "its confusion!" + prompt + +ConfusedNoMoreText: + text "'s" + line "confused no more!" + prompt + +BecameConfusedText: + text "" + line "became confused!" + prompt + +BattleText_ItemHealedConfusion: + text "A @" + text_ram wStringBuffer1 + text " rid" + line "" + cont "of its confusion." + prompt + +AlreadyConfusedText: + text "'s" + line "already confused!" + prompt + +BattleText_UsersHurtByStringBuffer1: + text "'s" + line "hurt by" + cont "@" + text_ram wStringBuffer1 + text "!" + prompt + +BattleText_UserWasReleasedFromStringBuffer1: + text "" + line "was released from" + cont "@" + text_ram wStringBuffer1 + text "!" + prompt + +UsedBindText: + text "" + line "used BIND on" + cont "!" + prompt + +WhirlpoolTrapText: + text "" + line "was trapped!" + prompt + +FireSpinTrapText: + text "" + line "was trapped!" + prompt + +WrappedByText: + text "" + line "was WRAPPED by" + cont "!" + prompt + +ClampedByText: + text "" + line "was CLAMPED by" + cont "!" + prompt + +StoringEnergyText: + text "" + line "is storing energy!" + prompt + +UnleashedEnergyText: + text "" + line "unleashed energy!" + prompt + +HungOnText: + text "" + line "hung on with" + cont "@" + text_ram wStringBuffer1 + text "!" + prompt + +EnduredText: + text "" + line "ENDURED the hit!" + prompt + +InLoveWithText: + text "" + line "is in love with" + cont "!" + prompt + +InfatuationText: + text "'s" + line "infatuation kept" + cont "it from attacking!" + prompt + +DisabledMoveText: + text "'s" + line "@" + text_ram wStringBuffer1 + text " is" + cont "DISABLED!" + prompt + +LoafingAroundText: + text_ram wBattleMonNickname + text " is" + line "loafing around." + prompt + +BeganToNapText: + text_ram wBattleMonNickname + text " began" + line "to nap!" + prompt + +WontObeyText: + text_ram wBattleMonNickname + text " won't" + line "obey!" + prompt + +TurnedAwayText: + text_ram wBattleMonNickname + text " turned" + line "away!" + prompt + +IgnoredOrdersText: + text_ram wBattleMonNickname + text " ignored" + line "orders!" + prompt + +IgnoredSleepingText: + text_ram wBattleMonNickname + text " ignored" + line "orders…sleeping!" + prompt + +NoPPLeftText: + text "But no PP is left" + line "for the move!" + prompt + +HasNoPPLeftText: + text "" + line "has no PP left for" + cont "@" + text_ram wStringBuffer2 + text "!" + prompt + +WentToSleepText: + text "" + line "went to sleep!" + done + +RestedText: + text "" + line "fell asleep and" + cont "became healthy!" + done + +RegainedHealthText: + text "" + line "regained health!" + prompt + +AttackMissedText: + text "'s" + line "attack missed!" + prompt + +AttackMissed2Text: + text "'s" + line "attack missed!" + prompt + +CrashedText: + text "" + line "kept going and" + cont "crashed!" + prompt + +UnaffectedText: + text "'s" + line "unaffected!" + prompt + +DoesntAffectText: + text "It doesn't affect" + line "!" + prompt + +CriticalHitText: + text "A critical hit!" + prompt + +OneHitKOText: + text "It's a one-hit KO!" + prompt + +SuperEffectiveText: + text "It's super-" + line "effective!" + prompt + +NotVeryEffectiveText: + text "It's not very" + line "effective…" + prompt + +TookDownWithItText: + text "" + line "took down with it," + cont "!" + prompt + +RageBuildingText: + text "'s" + line "RAGE is building!" + prompt + +GotAnEncoreText: + text "" + line "got an ENCORE!" + prompt + +SharedPainText: + text "The battlers" + line "shared pain!" + prompt + +TookAimText: + text "" + line "took aim!" + prompt + +SketchedText: + text "" + line "SKETCHED" + cont "@" + text_ram wStringBuffer1 + text "!" + prompt + +DestinyBondEffectText: + text "'s" + line "trying to take its" + cont "opponent with it!" + prompt + +SpiteEffectText: + text "'s" + line "@" + text_ram wStringBuffer1 + text " was" + cont "reduced by @" + text_decimal wTextDecimalByte, 1, 1 + text "!" + prompt + +BellChimedText: + text "A bell chimed!" + line "" + prompt + +FellAsleepText: + text "" + line "fell asleep!" + prompt + +AlreadyAsleepText: + text "'s" + line "already asleep!" + prompt + +WasPoisonedText: + text "" + line "was poisoned!" + prompt + +BadlyPoisonedText: + text "'s" + line "badly poisoned!" + prompt + +AlreadyPoisonedText: + text "'s" + line "already poisoned!" + prompt + +SuckedHealthText: + text "Sucked health from" + line "!" + prompt + +DreamEatenText: + text "'s" + line "dream was eaten!" + prompt + +WasBurnedText: + text "" + line "was burned!" + prompt + +DefrostedOpponentText: + text "" + line "was defrosted!" + prompt + +WasFrozenText: + text "" + line "was frozen solid!" + prompt + +WontRiseAnymoreText: + text "'s" + line "@" + text_ram wStringBuffer2 + text " won't" + cont "rise anymore!" + prompt + +WontDropAnymoreText: + text "'s" + line "@" + text_ram wStringBuffer2 + text " won't" + cont "drop anymore!" + prompt + +FledFromBattleText:: + text "" + line "fled from battle!" + prompt + +FledInFearText: + text "" + line "fled in fear!" + prompt + +BlownAwayText: + text "" + line "was blown away!" + prompt + +PlayerHitTimesText: + text "Hit @" + text_decimal wPlayerDamageTaken, 1, 1 + text " times!" + prompt + +EnemyHitTimesText: + text "Hit @" + text_decimal wEnemyDamageTaken, 1, 1 + text " times!" + prompt + +MistText: + text "'s" + line "shrouded in MIST!" + prompt + +ProtectedByMistText: + text "'s" + line "protected by MIST." + prompt + +GettingPumpedText: + text_pause + text "'s" + line "getting pumped!" + prompt + +RecoilText: + text "'s" + line "hit with recoil!" + prompt + +MadeSubstituteText: + text "" + line "made a SUBSTITUTE!" + prompt + +HasSubstituteText: + text "" + line "has a SUBSTITUTE!" + prompt + +TooWeakSubText: + text "Too weak to make" + line "a SUBSTITUTE!" + prompt + +SubTookDamageText: + text "The SUBSTITUTE" + line "took damage for" + cont "!" + prompt + +SubFadedText: + text "'s" + line "SUBSTITUTE faded!" + prompt + +MimicLearnedMoveText: + text "" + line "learned" + cont "@" + text_ram wStringBuffer1 + text "!" + prompt + +WasSeededText: + text "" + line "was seeded!" + prompt + +EvadedText: + text "" + line "evaded the attack!" + prompt + +WasDisabledText: + text "'s" + line "@" + text_ram wStringBuffer1 + text " was" + cont "DISABLED!" + prompt + +CoinsScatteredText: + text "Coins scattered" + line "everywhere!" + prompt + +TransformedTypeText: + text "" + line "transformed into" + cont "the @" + text_ram wStringBuffer1 + text "-type!" + prompt + +EliminatedStatsText: + text "All stat changes" + line "were eliminated!" + prompt + +TransformedText: + text "" + line "TRANSFORMED into" + cont "@" + text_ram wStringBuffer1 + text "!" + prompt + +LightScreenEffectText: + text "'s" + line "SPCL.DEF rose!" + prompt + +ReflectEffectText: + text "'s" + line "DEFENSE rose!" + prompt + +NothingHappenedText: + text "But nothing" + line "happened." + prompt + +ButItFailedText: + text "But it failed!" + prompt + +ItFailedText: + text "It failed!" + prompt + +DidntAffect1Text: + text "It didn't affect" + line "!" + prompt + +DidntAffect2Text: + text "It didn't affect" + line "!" + prompt + +HPIsFullText: + text "'s" + line "HP is full!" + prompt + +DraggedOutText: + text "" + line "was dragged out!" + prompt + +ParalyzedText: + text "'s" + line "paralyzed! Maybe" + cont "it can't attack!" + prompt + +FullyParalyzedText: + text "'s" + line "fully paralyzed!" + prompt + +AlreadyParalyzedText: + text "'s" + line "already paralyzed!" + prompt + +ProtectedByText: + text "'s" + line "protected by" + cont "@" + text_ram wStringBuffer1 + text "!" + prompt + +MirrorMoveFailedText: + text "The MIRROR MOVE" + next "failed!" + prompt + +StoleText: + text "" + line "stole @" + text_ram wStringBuffer1 + text_start + cont "from its foe!" + prompt + +CantEscapeNowText: + text "" + line "can't escape now!" + prompt + +StartedNightmareText: + text "" + line "started to have a" + cont "NIGHTMARE!" + prompt + +WasDefrostedText: + text "" + line "was defrosted!" + prompt + +PutACurseText: + text "" + line "cut its own HP and" + + para "put a CURSE on" + line "!" + prompt + +ProtectedItselfText: + text "" + line "PROTECTED itself!" + prompt + +ProtectingItselfText: + text "'s" + line "PROTECTING itself!" + done + +SpikesText: + text "SPIKES scattered" + line "all around" + cont "!" + prompt + +IdentifiedText: + text "" + line "identified" + cont "!" + prompt + +StartPerishText: + text "Both #MON will" + line "faint in 3 turns!" + prompt + +SandstormBrewedText: + text "A SANDSTORM" + line "brewed!" + prompt + +BracedItselfText: + text "" + line "braced itself!" + prompt + +FellInLoveText: + text "" + line "fell in love!" + prompt + +CoveredByVeilText: + text "'s" + line "covered by a veil!" + prompt + +SafeguardProtectText: + text "" + line "is protected by" + cont "SAFEGUARD!" + prompt + +MagnitudeText: + text "Magnitude @" + text_decimal wTextDecimalByte, 1, 1 + text "!" + prompt + +ReleasedByText: + text "" + line "was released by" + cont "!" + prompt + +ShedLeechSeedText: + text "" + line "shed LEECH SEED!" + prompt + +BlewSpikesText: + text "" + line "blew away SPIKES!" + prompt + +DownpourText: + text "A downpour" + line "started!" + prompt + +SunGotBrightText: + text "The sunlight got" + line "bright!" + prompt + +BellyDrumText: + text "" + line "cut its HP and" + cont "maximized ATTACK!" + prompt + +CopiedStatsText: + text "" + line "copied the stat" + + para "changes of" + line "!" + prompt + +ForesawAttackText: + text "" + line "foresaw an attack!" + prompt + +BeatUpAttackText: + text_ram wStringBuffer1 + text "'s" + line "attack!" + done + +PresentFailedText: + text "" + line "refused the gift!" + prompt + +IgnoredOrders2Text: + text "" + line "ignored orders!" + prompt + +BattleText_LinkErrorBattleCanceled: + text "Link error…" + + para "The battle has" + line "been canceled…" + prompt + +BattleText_NoTimeLeftToday: ; unreferenced + text "There is no time" + line "left today!" + done diff --git a/data/text/common.asm b/data/text/common.asm new file mode 100644 index 0000000..301eecb --- /dev/null +++ b/data/text/common.asm @@ -0,0 +1,13 @@ +SECTION "Text 1", ROMX + +INCLUDE "data/text/common_1.asm" + + +SECTION "Text 2", ROMX + +INCLUDE "data/text/common_2.asm" + + +SECTION "Text 3", ROMX + +INCLUDE "data/text/common_3.asm" diff --git a/data/text/common_1.asm b/data/text/common_1.asm new file mode 100644 index 0000000..34c463c --- /dev/null +++ b/data/text/common_1.asm @@ -0,0 +1,1878 @@ +_FruitBearingTreeText:: + text "It's a fruit-" + line "bearing tree." + done + +_HeyItsFruitText:: + text "Hey! It's" + line "@" + text_ram wStringBuffer3 + text "!" + done + +_ObtainedFruitText:: + text "Obtained" + line "@" + text_ram wStringBuffer3 + text "!" + done + +_FruitPackIsFullText:: + text "But the PACK is" + line "full…" + done + +_NothingHereText:: + text "There's nothing" + line "here…" + done + +_WhichApricornText:: + text "Which APRICORN" + line "should I use?" + done + +_HowManyShouldIMakeText:: + text "How many should I" + line "make?" + done + +_RecoveredSomeHPText:: + text_ram wStringBuffer1 + text_start + line "recovered @" + text_decimal wCurHPAnimDeltaHP, 2, 3 + text "HP!" + done + +_CuredOfPoisonText:: + text_ram wStringBuffer1 + text "'s" + line "cured of poison." + done + +_RidOfParalysisText:: + text_ram wStringBuffer1 + text "'s" + line "rid of paralysis." + done + +_BurnWasHealedText:: + text_ram wStringBuffer1 + text "'s" + line "burn was healed." + done + +_WasDefrostedText:: + text_ram wStringBuffer1 + text_start + line "was defrosted." + done + +_WokeUpText:: + text_ram wStringBuffer1 + text_start + line "woke up." + done + +_HealthReturnedText:: + text_ram wStringBuffer1 + text "'s" + line "health returned." + done + +_RevitalizedText:: + text_ram wStringBuffer1 + text_start + line "is revitalized." + done + +_GrewToLevelText:: + text_ram wStringBuffer1 + text " grew to" + line "level @" + text_decimal wCurPartyLevel, 1, 3 + text "!@" + sound_dex_fanfare_50_79 ; plays SFX_DEX_FANFARE_50_79, identical to SFX_LEVEL_UP + text_promptbutton + text_end + + text_end ; unreferenced + +_CameToItsSensesText:: + text_ram wStringBuffer1 + text " came" + line "to its senses." + done + +_EnterNewPasscodeText:: + text "Please enter any" + line "four-digit number." + done + +_ConfirmPasscodeText:: + text "Enter the same" + line "number to confirm." + done + +_PasscodesNotSameText:: + text "That's not the" + line "same number." + done + +_PasscodeSetText:: + text "Your PASSCODE has" + line "been set." + + para "Enter this number" + line "next time to open" + cont "the CARD FOLDER." + + para "" + done + +_FourZerosInvalidText:: + text "0000 is invalid!" + + para "" + done + +_EnterPasscodeText:: + text "Enter the CARD" + next "FOLDER PASSCODE." + done + +_IncorrectPasscodeText:: + text "Incorrect" + line "PASSCODE!" + + para "" + done + +_CardFolderOpenText:: + text "CARD FOLDER open.@" + text_end + +_OakTimeWokeUpText:: + text "<……><……><……><……><……><……>" + line "<……><……><……><……><……><……>" + + para "Zzz… Hm? Wha…?" + line "You woke me up!" + + para "Will you check the" + line "clock for me?" + prompt + +_OakTimeWhatTimeIsItText:: + text "What time is it?" + done + +_OakTimeWhatHoursText:: + text "What?@" + text_end + +_OakTimeHoursQuestionMarkText:: + text "?" + done + +_OakTimeHowManyMinutesText:: + text "How many minutes?" + done + +_OakTimeWhoaMinutesText:: + text "Whoa!@" + text_end + +_OakTimeMinutesQuestionMarkText:: + text "?" + done + +_OakTimeOversleptText:: + text "!" + line "I overslept!" + done + +_OakTimeYikesText:: + text "!" + line "Yikes! I over-" + cont "slept!" + done + +_OakTimeSoDarkText:: + text "!" + line "No wonder it's so" + cont "dark!" + done + +_OakTimeWhatDayIsItText:: + text "What day is it?" + done + +_OakTimeIsItText:: + text ", is it?" + done + +; Mobile Adapter + +_ThereIsNothingConnectedText:: ; unreferenced + text "There is nothing" + line "connected." + done + +_CheckCellPhoneAdapterText:: ; unreferenced + text "Check cell phone" + line "adapter." + done + +_CheckCDMAAdapterText:: ; unreferenced + text "Check CDMA" + line "adapter." + done + +_CheckDOCOMOPHSAdapterText:: ; unreferenced + text "Check DOCOMO PHS" + line "adapter." + done + +_CheckDDIPHSAdapterText:: ; unreferenced + text "Check DDI PHS" + line "adapter." + done + +_CheckMobileAdapterText:: ; unreferenced + text "Check unlimited" + line "battle mobile" + cont "adapter." + done + +; Mobile Adapter End + +_ThePasswordIsText:: ; unreferenced + text "The password is:" + line "" + done + +_IsThisOKText:: ; unreferenced + text "Is this OK?" + done + +_EnterTheIDNoText:: ; unreferenced + text "Enter the" + line "ID no." + done + +_EnterTheAmountText:: ; unreferenced + text "Enter the" + line "amount." + done + +_NothingToChooseText:: + text "There's nothing to" + line "choose." + prompt + +_WhichSidePutOnText:: + text "Which side do you" + line "want to put it on?" + done + +_WhichSidePutAwayText:: + text "Which side do you" + line "want to put away?" + done + +_PutAwayTheDecoText:: + text "Put away the" + line "@" + text_ram wStringBuffer3 + text "." + prompt + +_NothingToPutAwayText:: + text "There's nothing to" + line "put away." + prompt + +_SetUpTheDecoText:: + text "Set up the" + line "@" + text_ram wStringBuffer3 + text "." + prompt + +_PutAwayAndSetUpText:: + text "Put away the" + line "@" + text_ram wStringBuffer3 + text_start + + para "and set up the" + line "@" + text_ram wStringBuffer4 + text "." + prompt + +_AlreadySetUpText:: + text "That's already set" + line "up." + prompt + +_LookTownMapText:: + text "It's the TOWN MAP." + done + +_LookPikachuPosterText:: + text "It's a poster of a" + line "cute PIKACHU." + done + +_LookClefairyPosterText:: + text "It's a poster of a" + line "cute CLEFAIRY." + done + +_LookJigglypuffPosterText:: + text "It's a poster of a" + line "cute JIGGLYPUFF." + done + +_LookAdorableDecoText:: + text "It's an adorable" + line "@" + text_ram wStringBuffer3 + text "." + done + +_LookGiantDecoText:: + text "A giant doll! It's" + line "fluffy and cuddly." + done + +_MomHiHowAreYouText:: + text "Hi, !" + line "How are you?" + prompt + +_MomFoundAnItemText:: + text "I found a useful" + line "item shopping, so" + prompt + +_MomBoughtWithYourMoneyText:: + text "I bought it with" + line "your money. Sorry!" + prompt + +_MomItsInPCText:: + text "It's in your PC." + line "You'll like it!" + done + +_MomFoundADollText:: + text "While shopping" + line "today, I saw this" + cont "adorable doll, so" + prompt + +_MomItsInYourRoomText:: + text "It's in your room." + line "You'll love it!" + done + +_MonWasSentToText:: + text_ram wPlayerTrademonSpeciesName + text " was" + line "sent to @" + text_ram wOTTrademonSenderName + text "." + done + +_MonNameSentToText:: + text_start + done + +_BidsFarewellToMonText:: + text_ram wOTTrademonSenderName + text " bids" + line "farewell to" + done + +_MonNameBidsFarewellText:: + text_ram wOTTrademonSpeciesName + text "." + done + +_TakeGoodCareOfMonText:: + text "Take good care of" + line "@" + text_ram wOTTrademonSpeciesName + text "." + done + +_ForYourMonSendsText:: + text "For @" + text_ram wPlayerTrademonSenderName + text "'s" + line "@" + text_ram wPlayerTrademonSpeciesName + text "," + done + +_OTSendsText:: + text_ram wOTTrademonSenderName + text " sends" + line "@" + text_ram wOTTrademonSpeciesName + text "." + done + +_WillTradeText:: + text_ram wOTTrademonSenderName + text " will" + line "trade @" + text_ram wOTTrademonSpeciesName + text_end + + text_end ; unreferenced + +_ForYourMonWillTradeText:: + text "for @" + text_ram wPlayerTrademonSenderName + text "'s" + line "@" + text_ram wPlayerTrademonSpeciesName + text "." + done + +_MobilePlayerWillTradeMonText:: + text_ram wPlayerTrademonSenderName + text " will" + line "trade @" + text_ram wPlayerTrademonSpeciesName + text_end + + text_end ; unreferenced + +_MobileForPartnersMonText:: + text "for @" + text_ram wOTTrademonSenderName + text "'s" + line "@" + text_ram wOTTrademonSpeciesName + text "." + done + +_MobilePlayersMonTradeText:: + text_ram wPlayerTrademonSenderName + text "'s" + line "@" + text_ram wPlayerTrademonSpeciesName + text " trade…" + done + +_MobileTakeGoodCareOfMonText:: + text "Take good care of" + line "@" + text_ram wOTTrademonSpeciesName + text "." + done + +_MobilePlayersMonTrade2Text:: + text_ram wPlayerTrademonSenderName + text "'s" + line "@" + text_ram wPlayerTrademonSpeciesName + text " trade…" + done + +_MobileTakeGoodCareOfText:: + text "Take good care of" + line "@" + text_ram wOTTrademonSpeciesName + text "." + done + +_MobileTradeCameBackText:: + text_ram wOTTrademonSpeciesName + text " came" + line "back!" + done + +; Oak's Pokémon Talk + +_OPT_IntroText1:: + text_start + line "MARY: PROF.OAK'S" + done + +_OPT_IntroText2:: + text_start + line "#MON TALK!" + done + +_OPT_IntroText3:: + text_start + line "With me, MARY!" + done + +_OPT_OakText1:: + text_start + line "OAK: @" + text_ram wMonOrItemNameBuffer + text_end + + text_end ; unreferenced + +_OPT_OakText2:: + text_start + line "may be seen around" + done + +_OPT_OakText3:: + text_start + line "@" + text_ram wStringBuffer1 + text "." + done + +_OPT_MaryText1:: + text_start + line "MARY: @" + text_ram wStringBuffer1 + text "'s" + done + +_OPT_SweetAdorablyText:: + text_start + line "sweet and adorably" + done + +_OPT_WigglySlicklyText:: + text_start + line "wiggly and slickly" + done + +_OPT_AptlyNamedText:: + text_start + line "aptly named and" + done + +_OPT_UndeniablyKindOfText:: + text_start + line "undeniably kind of" + done + +_OPT_UnbearablyText:: + text_start + line "so, so unbearably" + done + +_OPT_WowImpressivelyText:: + text_start + line "wow, impressively" + done + +_OPT_AlmostPoisonouslyText:: + text_start + line "almost poisonously" + done + +_OPT_SensuallyText:: + text_start + line "ooh, so sensually" + done + +_OPT_MischievouslyText:: + text_start + line "so mischievously" + done + +_OPT_TopicallyText:: + text_start + line "so very topically" + done + +_OPT_AddictivelyText:: + text_start + line "sure addictively" + done + +_OPT_LooksInWaterText:: + text_start + line "looks in water is" + done + +_OPT_EvolutionMustBeText:: + text_start + line "evolution must be" + done + +_OPT_ProvocativelyText:: + text_start + line "provocatively" + done + +_OPT_FlippedOutText:: + text_start + line "so flipped out and" + done + +_OPT_HeartMeltinglyText:: + text_start + line "heart-meltingly" + done + +_OPT_CuteText:: + text_start + line "cute." + done + +_OPT_WeirdText:: + text_start + line "weird." + done + +_OPT_PleasantText:: + text_start + line "pleasant." + done + +_OPT_BoldSortOfText:: + text_start + line "bold, sort of." + done + +_OPT_FrighteningText:: + text_start + line "frightening." + done + +_OPT_SuaveDebonairText:: + text_start + line "suave & debonair!" + done + +_OPT_PowerfulText:: + text_start + line "powerful." + done + +_OPT_ExcitingText:: + text_start + line "exciting." + done + +_OPT_GroovyText:: + text_start + line "groovy!" + done + +_OPT_InspiringText:: + text_start + line "inspiring." + done + +_OPT_FriendlyText:: + text_start + line "friendly." + done + +_OPT_HotHotHotText:: + text_start + line "hot, hot, hot!" + done + +_OPT_StimulatingText:: + text_start + line "stimulating." + done + +_OPT_GuardedText:: + text_start + line "guarded." + done + +_OPT_LovelyText:: + text_start + line "lovely." + done + +_OPT_SpeedyText:: + text_start + line "speedy." + done + +_OPT_PokemonChannelText:: + text "#MON" + done + +_PokedexShowText:: + text_start + line "@" + text_ram wStringBuffer1 + text_end + + text_end ; unreferenced + +; Pokémon Music Channel / Pokémusic + +_BenIntroText1:: + text_start + line "BEN: #MON MUSIC" + done + +_BenIntroText2:: + text_start + line "CHANNEL!" + done + +_BenIntroText3:: + text_start + line "It's me, DJ BEN!" + done + +_FernIntroText1:: + text_start + line "FERN: #MUSIC!" + done + +_FernIntroText2:: + text_start + line "With DJ FERN!" + done + +_BenFernText1:: + text_start + line "Today's @" + text_today + text "," + done + +_BenFernText2A:: + text_start + line "so let us jam to" + done + +_BenFernText2B:: + text_start + line "so chill out to" + done + +_BenFernText3A:: + text_start + line "#MON March!" + done + +_BenFernText3B:: + text_start + line "#MON Lullaby!" + done + +; Lucky Channel + +_LC_Text1:: + text_start + line "REED: Yeehaw! How" + done + +_LC_Text2:: + text_start + line "y'all doin' now?" + done + +_LC_Text3:: + text_start + line "Whether you're up" + done + +_LC_Text4:: + text_start + line "or way down low," + done + +_LC_Text5:: + text_start + line "don't you miss the" + done + +_LC_Text6:: + text_start + line "LUCKY NUMBER SHOW!" + done + +_LC_Text7:: + text_start + line "This week's Lucky" + done + +_LC_Text8:: + text_start + line "Number is @" + text_pause + text_ram wStringBuffer1 + text "!" + done + +_LC_Text9:: + text_start + line "I'll repeat that!" + done + +_LC_Text10:: + text_start + line "Match it and go to" + done + +_LC_Text11:: + text_start + line "the RADIO TOWER!" + done + +_LC_DragText1:: + text_start + line "…Repeating myself" + done + +_LC_DragText2:: + text_start + line "gets to be a drag…" + done + +; Places and People + +_PnP_Text1:: + text_start + line "PLACES AND PEOPLE!" + done + +_PnP_Text2:: + text_start + line "Brought to you by" + done + +_PnP_Text3:: + text_start + line "me, DJ LILY!" + done + +_PnP_Text4:: + text_start + line "@" + text_ram wStringBuffer2 + text " @" + text_ram wStringBuffer1 + text_end + + text_end ; unreferenced + +_PnP_CuteText:: + text_start + line "is cute." + done + +_PnP_LazyText:: + text_start + line "is sort of lazy." + done + +_PnP_HappyText:: + text_start + line "is always happy." + done + +_PnP_NoisyText:: + text_start + line "is quite noisy." + done + +_PnP_PrecociousText:: + text_start + line "is precocious." + done + +_PnP_BoldText:: + text_start + line "is somewhat bold." + done + +_PnP_PickyText:: + text_start + line "is too picky!" + done + +_PnP_SortOfOKText:: + text_start + line "is sort of OK." + done + +_PnP_SoSoText:: + text_start + line "is just so-so." + done + +_PnP_GreatText:: + text_start + line "is actually great." + done + +_PnP_MyTypeText:: + text_start + line "is just my type." + done + +_PnP_CoolText:: + text_start + line "is so cool, no?" + done + +_PnP_InspiringText:: + text_start + line "is inspiring!" + done + +_PnP_WeirdText:: + text_start + line "is kind of weird." + done + +_PnP_RightForMeText:: + text_start + line "is right for me?" + done + +_PnP_OddText:: + text_start + line "is definitely odd!" + done + +_PnP_Text5:: + text_start + line "@" + text_ram wStringBuffer1 + text_end + + text_end ; unreferenced + +_RocketRadioText1:: + text_start + line "… …Ahem, we are" + done + +_RocketRadioText2:: + text_start + line "TEAM ROCKET!" + done + +_RocketRadioText3:: + text_start + line "After three years" + done + +_RocketRadioText4:: + text_start + line "of preparation, we" + done + +_RocketRadioText5:: + text_start + line "have risen again" + done + +_RocketRadioText6:: + text_start + line "from the ashes!" + done + +_RocketRadioText7:: + text_start + line "GIOVANNI! @" + text_pause + text "Can you" + done + +_RocketRadioText8:: + text_start + line "hear?@" + text_pause + text " We did it!" + done + +_RocketRadioText9:: + text_start + line "@" + text_pause + text "Where is our boss?" + done + +_RocketRadioText10:: + text_start + line "@" + text_pause + text "Is he listening?" + done + +_BuenaRadioText1:: + text_start + line "BUENA: BUENA here!" + done + +_BuenaRadioText2:: + text_start + line "Today's password!" + done + +_BuenaRadioText3:: + text_start + line "Let me think… It's" + done + +_BuenaRadioText4:: + text_start + line "@" + text_ram wStringBuffer1 + text "!" + done + +_BuenaRadioText5:: + text_start + line "Don't forget it!" + done + +_BuenaRadioText6:: + text_start + line "I'm in GOLDENROD's" + done + +_BuenaRadioText7:: + text_start + line "RADIO TOWER!" + done + +_BuenaRadioMidnightText1:: + text_start + line "BUENA: Oh my…" + done + +_BuenaRadioMidnightText2:: + text_start + line "It's midnight! I" + done + +_BuenaRadioMidnightText3:: + text_start + line "have to shut down!" + done + +_BuenaRadioMidnightText4:: + text_start + line "Thanks for tuning" + done + +_BuenaRadioMidnightText5:: + text_start + line "in to the end! But" + done + +_BuenaRadioMidnightText6:: + text_start + line "don't stay up too" + done + +_BuenaRadioMidnightText7:: + text_start + line "late! Presented to" + done + +_BuenaRadioMidnightText8:: + text_start + line "you by DJ BUENA!" + done + +_BuenaRadioMidnightText9:: + text "I'm outta here!" + done + +_BuenaRadioMidnightText10:: + text "…" + done + +_BuenaOffTheAirText:: + text_start + line "" + done + +_EnemyWithdrewText:: + text "" + line "withdrew" + cont "@" + text_ram wEnemyMonNickname + text "!" + prompt + +_EnemyUsedOnText:: + text "" + line "used @" + text_ram wMonOrItemNameBuffer + text_start + cont "on @" + text_ram wEnemyMonNickname + text "!" + prompt + +_ThatCantBeUsedRightNowText:: ; unreferenced + text "That can't be used" + line "right now." + prompt + +_ThatItemCantBePutInThePackText:: ; unreferenced + text "That item can't be" + line "put in the PACK." + done + +_TheItemWasPutInThePackText:: ; unreferenced + text "The @" + text_ram wStringBuffer1 + text_start + line "was put in the" + cont "PACK." + done + +_RemainingTimeText:: ; unreferenced + text "Remaining Time" + done + +_YourMonsHPWasHealedText:: ; unreferenced + text "Your #MON's HP" + line "was healed." + prompt + +_WarpingText:: ; unreferenced + text "Warping…" + done + +_ChangeWhichNumberText:: ; unreferenced + text "Which number" + line "should be changed?" + done + +_WillYouPlayWithMonText:: ; unreferenced + text "Will you play with" + line "@" + text_ram wStringBuffer2 + text "?" + done + +_YouNeedTwoMonForBreedingText:: ; unreferenced + text "You need two #-" + line "MON for breeding." + prompt + +_BreedingIsNotPossibleText:: ; unreferenced + text "Breeding is not" + line "possible." + prompt + +_CompatibilityShouldTheyBreedText:: ; unreferenced + text "The compatibility" + line "is @" + text_decimal wBreedingCompatibility, 1, 3 + text "." + cont "Should they breed?" + done + +_ThereIsNoEggText:: ; unreferenced + text "There is no EGG." + line "" + prompt + +_ItsGoingToHatchText:: ; unreferenced + text "It's going to" + line "hatch!" + prompt + +_TestEventText:: ; unreferenced + text "Test event" + line "@" + text_decimal wStringBuffer2, 1, 2 + text "?" + done + +_StartText:: ; unreferenced + text "Start!" + done + +_EndText:: ; unreferenced + text "End!" + done + +_ForABoyText:: ; unreferenced + text "For a boy!" + done + +_ForAGirlText:: ; unreferenced + text "For a girl!" + done + +_DoesntConcernABoyText:: ; unreferenced + text "This doesn't" + line "concern a boy!" + done + +_TheBoxIsFullText:: ; unreferenced + text "The BOX is full!" + done + +; Mobile Adapter + +_NewCardArrivedText:: + text "A new CARD arrived" + line "from @" + text_ram wStringBuffer2 + text "." + done + +_PutCardInCardFolderText:: + text "Put this CARD in" + line "the CARD FOLDER?" + done + +_CardWasListedText:: + text_ram wStringBuffer2 + text "'s CARD was" + line "listed as no.@" + text_decimal wStringBuffer1, 1, 2 + text "." + prompt + +_StartingLinkText:: + text "Starting link." + done + +_LinkTerminatedText:: + text "Link terminated." + done + +_ClosingLinkText:: + text "Closing link." + done + +_ClearTimeLimitText:: ; unreferenced + text "Clear the time" + line "limit?" + done + +_TimeLimitWasClearedText:: ; unreferenced + text "The time limit was" + line "cleared." + done + +_PickErrorPacketText:: ; unreferenced + text "Pick which packet" + line "as an error?" + done + +_TradingMonForOTMonText:: + text "Trading @" + text_ram wStringBuffer2 + text_start + line "for @" + text_ram wStringBuffer1 + text "…" + done + +; Mobile Adapter End + +_ObtainedTheVoltorbBadgeText:: ; unreferenced + text "Obtained the" + line "VOLTORBBADGE!" + done + +_AskFloorElevatorText:: + text "Which floor?" + done + +_BugCatchingContestTimeUpText:: + text "ANNOUNCER: BEEEP!" + + para "Time's up!" + done + +_BugCatchingContestIsOverText:: + text "ANNOUNCER: The" + line "Contest is over!" + done + +_RepelWoreOffText:: + text "REPEL's effect" + line "wore off." + done + +_PlayerFoundItemText:: + text " found" + line "@" + text_ram wStringBuffer3 + text "!" + done + +_ButNoSpaceText:: + text "But has" + line "no space left…" + done + +_JustSawSomeRareMonText:: + text "I just saw some" + line "rare @" + text_ram wStringBuffer1 + text " in" + cont "@" + text_ram wStringBuffer2 + text "." + + para "I'll call you if I" + line "see another rare" + cont "#MON, OK?" + prompt + +_SavingRecordText:: + text "SAVING RECORD…" + line "DON'T TURN OFF!" + done + +_ReceiveItemText:: + text_ram wPlayerName + text " received" + line "@" + text_ram wStringBuffer1 + text "!@" + sound_item + text_promptbutton + text_end + + text_end ; unreferenced + +_NoCoinsText:: + text "You have no coins." + prompt + +_NoCoinCaseText:: + text "You don't have a" + line "COIN CASE." + prompt + +_NPCTradeCableText:: + text "OK, connect the" + line "Game Link Cable." + prompt + +Text_NPCTraded:: + text " traded" + line "@" + text_ram wMonOrItemNameBuffer + text " for" + cont "@" + text_ram wStringBuffer2 + text ".@" + text_end + +_NPCTradeFanfareText:: + sound_dex_fanfare_80_109 + text_pause + text_end + + text_end ; unreferenced + +_NPCTradeIntroText1:: + text "I collect #MON." + line "Do you have" + cont "@" + text_ram wStringBuffer1 + text "?" + + para "Want to trade it" + line "for my @" + text_ram wStringBuffer2 + text "?" + done + +_NPCTradeCancelText1:: + text "You don't want to" + line "trade? Aww…" + done + +_NPCTradeWrongText1:: + text "Huh? That's not" + line "@" + text_ram wStringBuffer1 + text ". " + cont "What a letdown…" + done + +_NPCTradeCompleteText1:: + text "Yay! I got myself" + line "@" + text_ram wStringBuffer1 + text "!" + cont "Thanks!" + done + +_NPCTradeAfterText1:: + text "Hi, how's my old" + line "@" + text_ram wStringBuffer2 + text " doing?" + done + +_NPCTradeIntroText2:: + text "Hi, I'm looking" + line "for this #MON." + + para "If you have" + line "@" + text_ram wStringBuffer1 + text ", would" + + para "you trade it for" + line "my @" + text_ram wStringBuffer2 + text "?" + done + +_NPCTradeCancelText2:: + text "You don't have" + line "one either?" + + para "Gee, that's really" + line "disappointing…" + done + +_NPCTradeWrongText2:: + text "You don't have" + line "@" + text_ram wStringBuffer1 + text "? That's" + cont "too bad, then." + done + +_NPCTradeCompleteText2:: + text "Great! Thank you!" + + para "I finally got" + line "@" + text_ram wStringBuffer1 + text "." + done + +_NPCTradeAfterText2:: + text "Hi! The @" + text_ram wMonOrItemNameBuffer + text_start + line "you traded me is" + cont "doing great!" + done + +_NPCTradeIntroText3:: + text_ram wMonOrItemNameBuffer + text "'s cute," + line "but I don't have" + + para "it. Do you have" + line "@" + text_ram wStringBuffer1 + text "?" + + para "Want to trade it" + line "for my @" + text_ram wStringBuffer2 + text "?" + done + +_NPCTradeCancelText3:: + text "You don't want to" + line "trade? Oh, darn…" + done + +_NPCTradeWrongText3:: + text "That's not" + line "@" + text_ram wStringBuffer1 + text "." + + para "Please trade with" + line "me if you get one." + done + +_NPCTradeCompleteText3:: + text "Wow! Thank you!" + line "I always wanted" + cont "@" + text_ram wMonOrItemNameBuffer + text "!" + done + +_NPCTradeAfterText3:: + text "How is that" + line "@" + text_ram wStringBuffer2 + text " I" + cont "traded you doing?" + + para "Your @" + text_ram wMonOrItemNameBuffer + text "'s" + line "so cute!" + done + +_NPCTradeCompleteText4:: + text "Uh? What happened?" + done + +_NPCTradeAfterText4:: + text "Trading is so odd…" + + para "I still have a lot" + line "to learn about it." + done + +_MomLeavingText1:: + text "Wow, that's a cute" + line "#MON." + + para "Where did you get" + line "it?" + + para "…" + + para "So, you're leaving" + line "on an adventure…" + + para "OK!" + line "I'll help too." + + para "But what can I do" + line "for you?" + + para "I know! I'll save" + line "money for you." + + para "On a long journey," + line "money's important." + + para "Do you want me to" + line "save your money?" + done + +_MomLeavingText2:: + text "OK, I'll take care" + line "of your money." + + para "<……><……><……>" + prompt + +_MomLeavingText3:: + text "Be careful." + + para "#MON are your" + line "friends. You need" + cont "to work as a team." + + para "Now, go on!" + done + +_MomIsThisAboutYourMoneyText:: + text "Hi! Welcome home!" + line "You're trying very" + cont "hard, I see." + + para "I've kept your" + line "room tidy." + + para "Or is this about" + line "your money?" + done + +_MomBankWhatDoYouWantToDoText:: + text "What do you want" + line "to do?" + done + +_MomStoreMoneyText:: + text "How much do you" + line "want to save?" + done + +_MomTakeMoneyText:: + text "How much do you" + line "want to take?" + done + +_MomSaveMoneyText:: + text "Do you want to" + line "save some money?" + done + +_MomHaventSavedThatMuchText:: + text "You haven't saved" + line "that much." + prompt + +_MomNotEnoughRoomInWalletText:: + text "You can't take" + line "that much." + prompt + +_MomInsufficientFundsInWalletText:: + text "You don't have" + line "that much." + prompt + +_MomNotEnoughRoomInBankText:: + text "You can't save" + line "that much." + prompt + +_MomStartSavingMoneyText:: + text "OK, I'll save your" + line "money. Trust me!" + + para ", stick" + line "with it!" + done + +_MomStoredMoneyText:: + text "Your money's safe" + line "here! Get going!" + done + +_MomTakenMoneyText:: + text ", don't" + line "give up!" + done + +_MomJustDoWhatYouCanText:: + text "Just do what" + line "you can." + done + +_DaycareDummyText:: + text_start + done + +_DayCareManIntroText:: + text "I'm the DAY-CARE" + line "MAN. Want me to" + cont "raise a #MON?" + done + +_DayCareManIntroEggText:: + text "I'm the DAY-CARE" + line "MAN. Do you know" + cont "about EGGS?" + + para "I was raising" + line "#MON with my" + cont "wife, you see." + + para "We were shocked to" + line "find an EGG!" + + para "How incredible is" + line "that?" + + para "So, want me to" + line "raise a #MON?" + done + +_DayCareLadyIntroText:: + text "I'm the DAY-CARE" + line "LADY." + + para "Should I raise a" + line "#MON for you?" + done + +_DayCareLadyIntroEggText:: + text "I'm the DAY-CARE" + line "LADY. Do you know" + cont "about EGGS?" + + para "My husband and I" + line "were raising some" + cont "#MON, you see." + + para "We were shocked to" + line "find an EGG!" + + para "How incredible" + line "could that be?" + + para "Should I raise a" + line "#MON for you?" + done + +_WhatShouldIRaiseText:: + text "What should I" + line "raise for you?" + prompt + +_OnlyOneMonText:: + text "Oh? But you have" + line "just one #MON." + prompt + +_CantAcceptEggText:: + text "Sorry, but I can't" + line "accept an EGG." + prompt + +_RemoveMailText:: + text "Remove MAIL before" + line "you come see me." + prompt + +_LastHealthyMonText:: + text "If you give me" + line "that, what will" + cont "you battle with?" + prompt + +_IllRaiseYourMonText:: + text "OK. I'll raise" + line "your @" + text_ram wStringBuffer1 + text "." + prompt + +_ComeBackLaterText:: + text "Come back for it" + line "later." + done + +_AreWeGeniusesText:: + text "Are we geniuses or" + line "what? Want to see" + cont "your @" + text_ram wStringBuffer1 + text "?" + done + +_YourMonHasGrownText:: + text "Your @" + text_ram wStringBuffer1 + text_start + line "has grown a lot." + + para "By level, it's" + line "grown by @" + text_decimal wStringBuffer2 + 1, 1, 3 + text "." + + para "If you want your" + line "#MON back, it" + cont "will cost ¥@" + text_decimal wStringBuffer2 + 2, 3, 4 + text "." + done + +_PerfectHeresYourMonText:: + text "Perfect! Here's" + line "your #MON." + prompt + +_GotBackMonText:: + text " got back" + line "@" + text_ram wStringBuffer1 + text "." + prompt + +_BackAlreadyText:: + text "Huh? Back already?" + line "Your @" + text_ram wStringBuffer1 + text_start + para "needs a little" + line "more time with us." + + para "If you want your" + line "#MON back, it" + cont "will cost ¥100." + done + +_HaveNoRoomText:: + text "You have no room" + line "for it." + prompt + +_NotEnoughMoneyText:: + text "You don't have" + line "enough money." + prompt + +_OhFineThenText:: + text "Oh, fine then." + prompt + +_ComeAgainText:: + text "Come again." + done + +_NotYetText:: + text "Not yet…" + done + +_FoundAnEggText:: + text "Ah, it's you!" + + para "We were raising" + line "your #MON, and" + + para "my goodness, were" + line "we surprised!" + + para "Your #MON had" + line "an EGG!" + + para "We don't know how" + line "it got there, but" + + para "your #MON had" + line "it. You want it?" + done + +_ReceivedEggText:: + text " received" + line "the EGG!" + done + +_TakeGoodCareOfEggText:: + text "Take good care of" + line "it." + done + +_IllKeepItThanksText:: + text "Well then, I'll" + line "keep it. Thanks!" + done + +_NoRoomForEggText:: + text "You have no room" + line "in your party." + cont "Come back later." + done + +_WhichMonPhotoText:: + text "Which #MON" + line "should I photo-" + cont "graph?" + prompt + +_HoldStillText:: + text "All righty. Hold" + line "still for a bit." + prompt + +_PrestoAllDoneText:: + text "Presto! All done." + line "Come again, OK?" + done diff --git a/data/text/common_2.asm b/data/text/common_2.asm new file mode 100644 index 0000000..5399a87 --- /dev/null +++ b/data/text/common_2.asm @@ -0,0 +1,1551 @@ +_NoPhotoText:: + text "Oh, no picture?" + line "Come again, OK?" + done + +_EggPhotoText:: + text "An EGG? My talent" + line "is worth more…" + done + +_NameRaterHelloText:: + text "Hello, hello! I'm" + line "the NAME RATER." + + para "I rate the names" + line "of #MON." + + para "Would you like me" + line "to rate names?" + done + +_NameRaterWhichMonText:: + text "Which #MON's" + line "nickname should I" + cont "rate for you?" + prompt + +_NameRaterBetterNameText:: + text "Hm… @" + text_ram wStringBuffer1 + text "…" + line "That's a fairly" + cont "decent name." + + para "But, how about a" + line "slightly better" + cont "nickname?" + + para "Want me to give it" + line "a better name?" + done + +_NameRaterWhatNameText:: + text "All right. What" + line "name should we" + cont "give it, then?" + prompt + +_NameRaterFinishedText:: + text "That's a better" + line "name than before!" + + para "Well done!" + done + +_NameRaterComeAgainText:: + text "OK, then. Come" + line "again sometime." + done + +_NameRaterPerfectNameText:: + text "Hm… @" + text_ram wStringBuffer1 + text "?" + line "What a great name!" + cont "It's perfect." + + para "Treat @" + text_ram wStringBuffer1 + text_start + line "with loving care." + done + +_NameRaterEggText:: + text "Whoa… That's just" + line "an EGG." + done + +_NameRaterSameNameText:: + text "It might look the" + line "same as before," + + para "but this new name" + line "is much better!" + + para "Well done!" + done + +_NameRaterNamedText:: + text "All right. This" + line "#MON is now" + cont "named @" + text_ram wStringBuffer1 + text "." + prompt + +Text_Gained:: + text_ram wStringBuffer1 + text " gained@" + text_end + +_BoostedExpPointsText:: +; BUG: Five-digit experience gain is printed incorrectly (see docs/bugs_and_glitches.md) + text_start + line "a boosted" + cont "@" + text_decimal wStringBuffer2, 2, 4 + text " EXP. Points!" + prompt + +_ExpPointsText:: +; BUG: Five-digit experience gain is printed incorrectly (see docs/bugs_and_glitches.md) + text_start + line "@" + text_decimal wStringBuffer2, 2, 4 + text " EXP. Points!" + prompt + +_GoMonText:: + text "Go! @" + text_end + +_DoItMonText:: + text "Do it! @" + text_end + +_GoForItMonText:: + text "Go for it," + line "@" + text_end + +_YourFoesWeakGetmMonText:: + text "Your foe's weak!" + line "Get'm, @" + text_end + +_BattleMonNicknameText:: + text_ram wBattleMonNickname + text "!" + done + +_BattleMonNickCommaText:: + text_ram wBattleMonNickname + text ",@" + text_end + +_ThatsEnoughComeBackText:: + text " that's" + line "enough! Come back!@" + text_end + +_OKComeBackText:: + text " OK!" + line "Come back!@" + text_end + +_GoodComeBackText:: + text " good!" + line "Come back!@" + text_end + +_ComeBackText:: + text " come" + line "back!" + done + +_BootedTMText:: + text "Booted up a TM." + prompt + +_BootedHMText:: + text "Booted up an HM." + prompt + +_ContainedMoveText:: + text "It contained" + line "@" + text_ram wStringBuffer2 + text "." + + para "Teach @" + text_ram wStringBuffer2 + text_start + line "to a #MON?" + done + +_TMHMNotCompatibleText:: + text_ram wStringBuffer2 + text " is" + line "not compatible" + cont "with @" + text_ram wStringBuffer1 + text "." + + para "It can't learn" + line "@" + text_ram wStringBuffer2 + text "." + prompt + +_NoRoomTMHMText:: + text "You have no room" + line "for any more" + cont "@" + text_ram wStringBuffer1 + text "S." + prompt + +_ReceivedTMHMText:: + text "You received" + line "@" + text_ram wStringBuffer1 + text "!" + prompt + +_MysteryGiftCanceledText:: + text "The link has been" + line "cancelled." + prompt + +_MysteryGiftCommErrorText:: + text "Communication" + line "error." + prompt + +_RetrieveMysteryGiftText:: + text "Must retrieve GIFT" + line "at #MON CENTER." + prompt + +_YourFriendIsNotReadyText:: + text "Your friend isn't" + line "ready." + prompt + +_MysteryGiftFiveADayText:: + text "Sorry--only five" + line "GIFTS a day." + prompt + +_MysteryGiftOneADayText:: + text "Sorry. One GIFT" + line "a day per person." + prompt + +_MysteryGiftSentText:: + text_ram wMysteryGiftPartnerName + text " sent" + line "@" + text_ram wStringBuffer1 + text "." + prompt + +_MysteryGiftSentHomeText:: + text_ram wMysteryGiftPartnerName + text " sent" + line "@" + text_ram wStringBuffer1 + text_start + cont "to @" + text_ram wMysteryGiftPlayerName + text "'s home." + prompt + +_NameCardReceivedCardText:: + text "Received" + line "@" + text_ram wMysteryGiftCardHolderName + text "'s CARD." + prompt + +_NameCardListedCardText:: + text_ram wMysteryGiftCardHolderName + text "'s CARD was" + line "listed as no.@" + text_decimal wTextDecimalByte, 1, 2 + text "." + prompt + +_NameCardNotRegisteredCardText:: + text "The CARD was not" + line "registered." + prompt + +_NameCardLinkCancelledText:: + text "The link has been" + line "cancelled." + prompt + +_NameCardLinkCommErrorText:: + text "Communication" + line "error." + prompt + +_BadgeRequiredText:: + text "Sorry! A new BADGE" + line "is required." + prompt + +_CantUseItemText:: + text "Can't use that" + line "here." + prompt + +_UseCutText:: + text_ram wStringBuffer2 + text " used" + line "CUT!" + prompt + +_CutNothingText:: + text "There's nothing to" + line "CUT here." + prompt + +_BlindingFlashText:: + text "A blinding FLASH" + line "lights the area!@" + text_promptbutton + text_end + + text_end ; unreferenced + +_UsedSurfText:: + text_ram wStringBuffer2 + text " used" + line "SURF!" + done + +_CantSurfText:: + text "You can't SURF" + line "here." + prompt + +_AlreadySurfingText:: + text "You're already" + line "SURFING." + prompt + +_AskSurfText:: + text "The water is calm." + line "Want to SURF?" + done + +_UseWaterfallText:: + text_ram wStringBuffer2 + text " used" + line "WATERFALL!" + done + +_HugeWaterfallText:: + text "Wow, it's a huge" + line "waterfall." + done + +_AskWaterfallText:: + text "Do you want to use" + line "WATERFALL?" + done + +_UseDigText:: + text_ram wStringBuffer2 + text " used" + line "DIG!" + done + +_UseEscapeRopeText:: + text " used an" + line "ESCAPE ROPE." + done + +_CantUseDigText:: + text "Can't use that" + line "here." + done + +_TeleportReturnText:: + text "Return to the last" + line "#MON CENTER." + done + +_CantUseTeleportText:: + text "Can't use that" + line "here." + + para "" + done + +_AlreadyUsingStrengthText:: + text "A #MON is using" + line "STRENGTH already." + prompt + +_UseStrengthText:: + text_ram wStringBuffer2 + text " used" + line "STRENGTH!" + done + +_MoveBoulderText:: + text_ram wStringBuffer1 + text " can" + line "move boulders." + prompt + +_AskStrengthText:: + text "A #MON may be" + line "able to move this." + + para "Want to use" + line "STRENGTH?" + done + +_BouldersMoveText:: + text "Boulders may now" + line "be moved!" + done + +_BouldersMayMoveText:: + text "A #MON may be" + line "able to move this." + done + +_UseWhirlpoolText:: + text_ram wStringBuffer2 + text " used" + line "WHIRLPOOL!" + prompt + +_MayPassWhirlpoolText:: + text "It's a vicious" + line "whirlpool!" + + para "A #MON may be" + line "able to pass it." + done + +_AskWhirlpoolText:: + text "A whirlpool is in" + line "the way." + + para "Want to use" + line "WHIRLPOOL?" + done + +_UseHeadbuttText:: + text_ram wStringBuffer2 + text " did a" + line "HEADBUTT!" + prompt + +_HeadbuttNothingText:: + text "Nope. Nothing…" + done + +_AskHeadbuttText:: + text "A #MON could be" + line "in this tree." + + para "Want to HEADBUTT" + line "it?" + done + +_UseRockSmashText:: + text_ram wStringBuffer2 + text " used" + line "ROCK SMASH!" + prompt + +_MaySmashText:: + text "Maybe a #MON" + line "can break this." + done + +_AskRockSmashText:: + text "This rock looks" + line "breakable." + + para "Want to use ROCK" + line "SMASH?" + done + +_RodBiteText:: + text "Oh!" + line "A bite!" + prompt + +_RodNothingText:: + text "Not even a nibble!" + prompt + +_UnusedNothingHereText:: + text "Looks like there's" + line "nothing here." + prompt + +_CantGetOffBikeText:: + text "You can't get off" + line "here!" + done + +_GotOnBikeText:: + text " got on the" + line "@" + text_ram wStringBuffer2 + text "." + done + +_GotOffBikeText:: + text " got off" + line "the @" + text_ram wStringBuffer2 + text "." + done + +_AskCutText:: + text "This tree can be" + line "CUT!" + + para "Want to use CUT?" + done + +_CanCutText:: + text "This tree can be" + line "CUT!" + done + +_FoundItemText:: + text " found" + line "@" + text_ram wStringBuffer3 + text "!" + done + +_CantCarryItemText:: + text "But can't" + line "carry any more" + cont "items." + done + +_WhitedOutText:: + text " is out of" + line "useable #MON!" + + para " whited" + line "out!" + done + +_ItemfinderItemNearbyText:: + text "Yes! ITEMFINDER" + line "indicates there's" + cont "an item nearby." + prompt + +_ItemfinderNopeText:: + text "Nope! ITEMFINDER" + line "isn't responding." + prompt + +_PoisonFaintText:: + text_ram wStringBuffer3 + text_start + line "fainted!" + prompt + +_PoisonWhiteoutText:: + text " is out of" + line "useable #MON!" + + para " whited" + line "out!" + prompt + +_UseSweetScentText:: + text_ram wStringBuffer3 + text " used" + line "SWEET SCENT!" + done + +_SweetScentNothingText:: + text "Looks like there's" + line "nothing here…" + done + +_SquirtbottleNothingText:: + text " sprinkled" + line "water." + + para "But nothing" + line "happened…" + done + +_UseSacredAshText:: + text "'s #MON" + line "were all healed!" + done + +_AnEggCantHoldAnItemText:: + text "An EGG can't hold" + line "an item." + prompt + +_PackNoItemText:: + text "No items." + done + +_AskThrowAwayText:: + text "Throw away how" + line "many?" + done + +_AskQuantityThrowAwayText:: + text "Throw away @" + text_decimal wItemQuantityChange, 1, 2 + text_start + line "@" + text_ram wStringBuffer2 + text "(S)?" + done + +_ThrewAwayText:: + text "Threw away" + line "@" + text_ram wStringBuffer2 + text "(S)." + prompt + +_OakThisIsntTheTimeText:: + text "OAK: !" + line "This isn't the" + cont "time to use that!" + prompt + +_YouDontHaveAMonText:: + text "You don't have a" + line "#MON!" + prompt + +_RegisteredItemText:: + text "Registered the" + line "@" + text_ram wStringBuffer2 + text "." + prompt + +_CantRegisterText:: + text "You can't register" + line "that item." + prompt + +_AskItemMoveText:: + text "Where should this" + line "be moved to?" + done + +_PackEmptyText:: + text_start + done + +_YouCantUseItInABattleText:: + text "You can't use it" + line "in a battle." + prompt + +_AreYouABoyOrAreYouAGirlText:: + text "Are you a boy?" + line "Or are you a girl?" + done + +Text_BattleEffectActivate:: + text "'s" + line "@" + text_ram wStringBuffer2 + text_end + + text_end ; unreferenced + +_BattleStatWentWayUpText:: + text_pause + text "went way up!" + prompt + +_BattleStatWentUpText:: + text " went up!" + prompt + +Text_BattleFoeEffectActivate:: + text "'s" + line "@" + text_ram wStringBuffer2 + text_end + + text_end ; unreferenced + +_BattleStatSharplyFellText:: + text_pause + text "sharply fell!" + prompt + +_BattleStatFellText:: + text " fell!" + prompt + +Text_BattleUser:: + text "@" + text_end + +_BattleMadeWhirlwindText:: + text_start + line "made a whirlwind!" + prompt + +_BattleTookSunlightText:: + text_start + line "took in sunlight!" + prompt + +_BattleLoweredHeadText:: + text_start + line "lowered its head!" + prompt + +_BattleGlowingText:: + text_start + line "is glowing!" + prompt + +_BattleFlewText:: + text_start + line "flew up high!" + prompt + +_BattleDugText:: + text_start + line "dug a hole!" + prompt + +_ActorNameText:: + text "@" + text_end + +_UsedMoveText:: + text_start + line "used @" + text_end + +_UsedInsteadText:: + text "instead," + cont "@" + text_end + +_MoveNameText:: + text_ram wStringBuffer2 + text "!" + done + +Text_BreedHuh:: + text "Huh?" + + para "@" + text_end + +_BreedClearboxText:: + text_start + done + +_BreedEggHatchText:: + text_ram wStringBuffer1 + text " came" + line "out of its EGG!@" + sound_caught_mon + text_promptbutton + text_end + + text_end ; unreferenced + +_BreedAskNicknameText:: + text "Give a nickname to" + line "@" + text_ram wStringBuffer1 + text "?" + done + +_LeftWithDayCareLadyText:: + text "It's @" + text_ram wBreedMon2Nickname + text_start + line "that was left with" + cont "the DAY-CARE LADY." + done + +_LeftWithDayCareManText:: + text "It's @" + text_ram wBreedMon1Nickname + text_start + line "that was left with" + cont "the DAY-CARE MAN." + done + +_BreedBrimmingWithEnergyText:: + text "It's brimming with" + line "energy." + prompt + +_BreedNoInterestText:: + text "It has no interest" + line "in @" + text_ram wStringBuffer1 + text "." + prompt + +_BreedAppearsToCareForText:: + text "It appears to care" + line "for @" + text_ram wStringBuffer1 + text "." + prompt + +_BreedFriendlyText:: + text "It's friendly with" + line "@" + text_ram wStringBuffer1 + text "." + prompt + +_BreedShowsInterestText:: + text "It shows interest" + line "in @" + text_ram wStringBuffer1 + text "." + prompt + +_EmptyMailboxText:: + text "There's no MAIL" + line "here." + prompt + +_MailClearedPutAwayText:: + text "The cleared MAIL" + line "was put away." + prompt + +_MailPackFullText:: + text "The PACK is full." + prompt + +_MailMessageLostText:: + text "The MAIL's message" + line "will be lost. OK?" + done + +_MailAlreadyHoldingItemText:: + text "It's already hold-" + line "ing an item." + prompt + +_MailEggText:: + text "An EGG can't hold" + line "any MAIL." + prompt + +_MailMovedFromBoxText:: + text "The MAIL was moved" + line "from the MAILBOX." + prompt + +_YesPromptText:: ; unreferenced + text "Yes" + prompt + +_NoPromptText:: ; unreferenced + text "No" + prompt + +_AnimationTypeText:: ; unreferenced + text_decimal wcf64, 1, 3 + text " @" + text_ram wStringBuffer1 + text_start + line "Animation type @" + text_ram wStringBuffer2 + text_end + + text_end ; unreferenced + +_MonNumberText:: ; unreferenced + text "#MON number?" + done + +_WasSentToBillsPCText:: + text_ram wStringBuffer1 + text " was" + line "sent to BILL's PC." + prompt + +_PCGottaHavePokemonText:: + text "You gotta have" + line "#MON to call!" + prompt + +_PCWhatText:: + text "What?" + done + +_PCMonHoldingMailText:: + text "There is a #MON" + line "holding MAIL." + + para "Please remove the" + line "MAIL." + prompt + +_PCNoSingleMonText:: + text "You don't have a" + line "single #MON!" + prompt + +_PCCantDepositLastMonText:: + text "You can't deposit" + line "your last #MON!" + prompt + +_PCCantTakeText:: + text "You can't take any" + line "more #MON." + prompt + +_ContestCaughtMonText:: + text "Caught @" + text_ram wStringBuffer1 + text "!" + prompt + +_ContestAskSwitchText:: + text "Switch #MON?" + done + +_ContestAlreadyCaughtText:: + text "You already caught" + line "a @" + text_ram wStringBuffer1 + text "." + prompt + +_ContestJudging_FirstPlaceText:: + text "This Bug-Catching" + line "Contest winner is@" + text_pause + text "…" + + para "@" + text_ram wBugContestWinnerName + text "," + line "who caught a" + cont "@" + text_ram wStringBuffer1 + text "!@" + text_end + +_ContestJudging_FirstPlaceScoreText:: + text_start + + para "The winning score" + line "was @" + text_decimal wBugContestFirstPlaceScore, 2, 3 + text " points!" + prompt + +_ContestJudging_SecondPlaceText:: + text "Placing second was" + line "@" + text_ram wBugContestWinnerName + text "," + + para "who caught a" + line "@" + text_ram wStringBuffer1 + text "!@" + text_end + +_ContestJudging_SecondPlaceScoreText:: + text_start + + para "The score was" + line "@" + text_decimal wBugContestSecondPlaceScore, 2, 3 + text " points!" + prompt + +_ContestJudging_ThirdPlaceText:: + text "Placing third was" + line "@" + text_ram wBugContestWinnerName + text "," + + para "who caught a" + line "@" + text_ram wStringBuffer1 + text "!@" + text_end + +_ContestJudging_ThirdPlaceScoreText:: + text_start + + para "The score was" + line "@" + text_decimal wBugContestThirdPlaceScore, 2, 3 + text " points!" + prompt + +_MagikarpGuruMeasureText:: + text "Let me measure" + line "that MAGIKARP." + + para "…Hm, it measures" + line "@" + text_ram wStringBuffer1 + text "." + prompt + +_KarpGuruRecordText:: + text "CURRENT RECORD" + + para "@" + text_ram wStringBuffer1 + text " caught by" + line "@" + text_ram wMagikarpRecordHoldersName + text_promptbutton + text_end + + text_end ; unreferenced + +_LuckyNumberMatchPartyText:: + text "Congratulations!" + + para "We have a match" + line "with the ID number" + + para "of @" + text_ram wStringBuffer1 + text " in" + line "your party." + prompt + +_LuckyNumberMatchPCText:: + text "Congratulations!" + + para "We have a match" + line "with the ID number" + + para "of @" + text_ram wStringBuffer1 + text " in" + line "your PC BOX." + prompt + +_CaughtAskNicknameText:: + text "Give a nickname to" + line "the @" + text_ram wStringBuffer1 + text " you" + cont "received?" + done + +_PokecenterPCCantUseText:: + text "Bzzzzt! You must" + line "have a #MON to" + cont "use this!" + prompt + +_PlayersPCTurnOnText:: + text " turned on" + line "the PC." + prompt + +_PlayersPCAskWhatDoText:: + text "What do you want" + line "to do?" + done + +_PlayersPCHowManyWithdrawText:: + text "How many do you" + line "want to withdraw?" + done + +_PlayersPCWithdrewItemsText:: + text "Withdrew @" + text_decimal wItemQuantityChange, 1, 2 + text_start + line "@" + text_ram wStringBuffer2 + text "(S)." + prompt + +_PlayersPCNoRoomWithdrawText:: + text "There's no room" + line "for more items." + prompt + +_PlayersPCNoItemsText:: + text "No items here!" + prompt + +_PlayersPCHowManyDepositText:: + text "How many do you" + line "want to deposit?" + done + +_PlayersPCDepositItemsText:: + text "Deposited @" + text_decimal wItemQuantityChange, 1, 2 + text_start + line "@" + text_ram wStringBuffer2 + text "(S)." + prompt + +_PlayersPCNoRoomDepositText:: + text "There's no room to" + line "store items." + prompt + +_PokecenterPCTurnOnText:: + text " turned on" + line "the PC." + prompt + +_PokecenterPCWhoseText:: + text "Access whose PC?" + done + +_PokecenterBillsPCText:: + text "BILL's PC" + line "accessed." + + para "#MON Storage" + line "System opened." + prompt + +_PokecenterPlayersPCText:: + text "Accessed own PC." + + para "Item Storage" + line "System opened." + prompt + +_PokecenterOaksPCText:: + text "PROF.OAK's PC" + line "accessed." + + para "#DEX Rating" + line "System opened." + prompt + +_PokecenterPCOaksClosedText:: + text "…" + line "Link closed…" + done + +_OakPCText1:: + text "Want to get your" + line "#DEX rated?" + done + +_OakPCText2:: + text "Current #DEX" + line "completion level:" + prompt + +_OakPCText3:: + text_ram wStringBuffer3 + text " #MON seen" + line "@" + text_ram wStringBuffer4 + text " #MON owned" + + para "PROF.OAK's" + line "Rating:" + done + +_OakRating01:: + text "Look for #MON" + line "in grassy areas!" + done + +_OakRating02:: + text "Good. I see you" + line "understand how to" + cont "use # BALLS." + done + +_OakRating03:: + text "You're getting" + line "good at this." + + para "But you have a" + line "long way to go." + done + +_OakRating04:: + text "You need to fill" + line "up the #DEX." + + para "Catch different" + line "kinds of #MON!" + done + +_OakRating05:: + text "You're trying--I" + line "can see that." + + para "Your #DEX is" + line "coming together." + done + +_OakRating06:: + text "To evolve, some" + line "#MON grow," + + para "others use the" + line "effects of STONES." + done + +_OakRating07:: + text "Have you gotten a" + line "fishing ROD? You" + + para "can catch #MON" + line "by fishing." + done + +_OakRating08:: + text "Excellent! You" + line "seem to like col-" + cont "lecting things!" + done + +_OakRating09:: + text "Some #MON only" + line "appear during" + + para "certain times of" + line "the day." + done + +_OakRating10:: + text "Your #DEX is" + line "filling up. Keep" + cont "up the good work!" + done + +_OakRating11:: + text "I'm impressed." + line "You're evolving" + + para "#MON, not just" + line "catching them." + done + +_OakRating12:: + text "Have you met KURT?" + line "His custom BALLS" + cont "should help." + done + +_OakRating13:: + text "Wow. You've found" + line "more #MON than" + + para "the last #DEX" + line "research project." + done + +_OakRating14:: + text "Are you trading" + line "your #MON?" + + para "It's tough to do" + line "this alone!" + done + +_OakRating15:: + text "Wow! You've hit" + line "200! Your #DEX" + cont "is looking great!" + done + +_OakRating16:: + text "You've found so" + line "many #MON!" + + para "You've really" + line "helped my studies!" + done + +_OakRating17:: + text "Magnificent! You" + line "could become a" + + para "#MON professor" + line "right now!" + done + +_OakRating18:: + text "Your #DEX is" + line "amazing! You're" + + para "ready to turn" + line "professional!" + done + +_OakRating19:: + text "Whoa! A perfect" + line "#DEX! I've" + + para "dreamt about this!" + line "Congratulations!" + done + +_OakPCText4:: + text "The link to PROF." + line "OAK's PC closed." + done + +_TrainerRankingExplanationText:: ; unreferenced + text "Triple-theme" + line "trainer ranking!" + + para "The SAVE file you" + line "just sent might" + cont "make the rankings!" + + para "" + done + +_TrainerRankingNoDataText:: ; unreferenced + text "There is no" + line "ranking data." + + para "Link to obtain" + line "ranking data." + + para "" + done + +_MemoryGameYeahText:: + text " , yeah!" + done + +_MemoryGameDarnText:: + text "Darn…" + done + +_StartMenuContestEndText:: + text "Would you like to" + line "end the Contest?" + done + +_ItemsTossOutHowManyText:: + text "Toss out how many" + line "@" + text_ram wStringBuffer2 + text "(S)?" + done + +_ItemsThrowAwayText:: + text "Throw away @" + text_decimal wItemQuantityChange, 1, 2 + text_start + line "@" + text_ram wStringBuffer2 + text "(S)?" + done + +_ItemsDiscardedText:: + text "Discarded" + line "@" + text_ram wStringBuffer1 + text "(S)." + prompt + +_ItemsTooImportantText:: + text "That's too impor-" + line "tant to toss out!" + prompt + +_ItemsOakWarningText:: + text "OAK: !" + line "This isn't the" + cont "time to use that!" + done + +_PokemonSwapItemText:: + text "Took @" + text_ram wMonOrItemNameBuffer + text "'s" + line "@" + text_ram wStringBuffer1 + text " and" + + para "made it hold" + line "@" + text_ram wStringBuffer2 + text "." + prompt + +_PokemonHoldItemText:: + text "Made @" + text_ram wMonOrItemNameBuffer + text_start + line "hold @" + text_ram wStringBuffer2 + text "." + prompt + +_PokemonRemoveMailText:: + text "Please remove the" + line "MAIL first." + prompt + +_PokemonNotHoldingText:: + text_ram wMonOrItemNameBuffer + text " isn't" + line "holding anything." + prompt + +_ItemStorageFullText:: + text "Item storage space" + line "full." + prompt + +_PokemonTookItemText:: + text "Took @" + text_ram wStringBuffer1 + text_start + line "from @" + text_ram wMonOrItemNameBuffer + text "." + prompt + +_PokemonAskSwapItemText:: + text_ram wMonOrItemNameBuffer + text " is" + line "already holding" + + para "@" + text_ram wStringBuffer1 + text "." + line "Switch items?" + done + +_ItemCantHeldText:: + text "This item can't be" + line "held." + prompt + +_MailLoseMessageText:: + text "The MAIL will lose" + line "its message. OK?" + done + +_MailDetachedText:: + text "MAIL detached from" + line "@" + text_ram wStringBuffer1 + text "." + prompt + +_MailNoSpaceText:: + text "There's no space" + line "for removing MAIL." + prompt + +_MailAskSendToPCText:: + text "Send the removed" + line "MAIL to your PC?" + done + +_MailboxFullText:: + text "Your PC's MAILBOX" + line "is full." + prompt + +_MailSentToPCText:: + text "The MAIL was sent" + line "to your PC." + prompt + +_PokemonNotEnoughHPText:: + text "Not enough HP!" + prompt + +_MayRegisterItemText:: + text "An item in your" + line "PACK may be" + + para "registered for use" + line "on SELECT Button." + done + +_OakText1:: + text "Hello! Sorry to" + line "keep you waiting!" + + para "Welcome to the" + line "world of #MON!" + + para "My name is OAK." + + para "People call me the" + line "#MON PROF." + prompt + +_OakText2:: + text "This world is in-" + line "habited by crea-" + cont "tures that we call" + cont "#MON.@" + text_end + +_OakText3:: + text_promptbutton + text_end + + text_end ; unreferenced + +_OakText4:: + text "People and #MON" + line "live together by" + + para "supporting each" + line "other." + + para "Some people play" + line "with #MON, some" + cont "battle with them." + prompt + +_OakText5:: + text "But we don't know" + line "everything about" + cont "#MON yet." + + para "There are still" + line "many mysteries to" + cont "solve." + + para "That's why I study" + line "#MON every day." + prompt diff --git a/data/text/common_3.asm b/data/text/common_3.asm new file mode 100644 index 0000000..528d698 --- /dev/null +++ b/data/text/common_3.asm @@ -0,0 +1,1515 @@ +_OakText6:: + text "Now, what did you" + line "say your name was?" + prompt + +_OakText7:: + text ", are you" + line "ready?" + + para "Your very own" + line "#MON story is" + cont "about to unfold." + + para "You'll face fun" + line "times and tough" + cont "challenges." + + para "A world of dreams" + line "and adventures" + + para "with #MON" + line "awaits! Let's go!" + + para "I'll be seeing you" + line "later!" + done + +_ClockTimeMayBeWrongText:: + text "The clock's time" + line "may be wrong." + + para "Please reset the" + line "time." + prompt + +_ClockSetWithControlPadText:: + text "Set with the" + line "Control Pad." + + para "Confirm: A Button" + line "Cancel: B Button" + done + +_ClockIsThisOKText:: + text "Is this OK?" + done + +_ClockHasResetText:: + text "The clock has been" + line "reset." + done + +_LinkTimeoutText:: + text "Too much time has" + line "elapsed. Please" + cont "try again." + prompt + +_LinkTradeCantBattleText:: + text "If you trade that" + line "#MON, you won't" + cont "be able to battle." + prompt + +_LinkAbnormalMonText:: + text "Your friend's" + line "@" + text_ram wStringBuffer1 + text " appears" + cont "to be abnormal!" + prompt + +_LinkAskTradeForText:: + text "Trade @" + text_ram wBufferTrademonNickname + text_start + line "for @" + text_ram wStringBuffer1 + text "?" + done + +_MobileBattleMustPickThreeMonText:: + text "To enter a mobile" + line "battle, you must" + + para "pick a team of" + line "three #MON." + + para "Is that OK?" + done + +_MobileBattleMoreInfoText:: + text "Need more info on" + line "mobile battles?" + done + +_MobileBattleRulesText:: + text "For a mobile" + line "battle, choose" + cont "three #MON." + + para "The maximum daily" + line "play time is ten" + + para "minutes for each" + line "linked player." + + para "If a battle isn't" + line "finished within" + + para "the time limit," + line "the player with" + + para "the fewest fainted" + line "#MON wins." + + para "If tied, the team" + line "that lost the" + + para "least amount of HP" + line "wins." + done + +_WouldYouLikeToMobileBattleText:: + text "Today's remaining" + line "time is @" + text_decimal wStringBuffer2, 1, 2 + text " min." + + para "Would you like to" + line "battle?" + done + +_WantAQuickMobileBattleText:: + text "There are only @" + text_decimal wStringBuffer2, 1, 2 + text_start + line "min. left today." + + para "Want a quick" + line "battle?" + done + +_WantToRushThroughAMobileBattleText:: + text "There is only" + line "1 min. left today!" + + para "Want to rush" + line "through a battle?" + done + +_PleaseTryAgainTomorrowText:: + text "There is less than" + line "1 min. left today!" + + para "Please try again" + line "tomorrow." + done + +_TryAgainUsingSameSettingsText:: + text "Try again using" + line "the same settings?" + done + +_MobileBattleLessThanOneMinuteLeftText:: + text "There is less than" + line "1 min. left today!" + done + +_MobileBattleNoTimeLeftForLinkingText:: + text "No time left for" + line "linking today." + done + +_PickThreeMonForMobileBattleText:: + text "Pick three #MON" + line "for battle." + done + +_MobileBattleRemainingTimeText:: + text "Today's remaining" + line "time is @" + text_decimal wStringBuffer2, 1, 2 + text " min." + done + +_WouldYouLikeToSaveTheGameText:: + text "Would you like to" + line "save the game?" + done + +_SavedTheGameText:: + text " saved" + line "the game." + done + +_AnotherSaveFileText:: + text "There is another" + line "save file. Is it" + cont "OK to overwrite?" + done + +_SaveFileCorruptedText:: + text "The save file is" + line "corrupted!" + prompt + +_ChangeBoxSaveText:: + text "When you change a" + line "#MON BOX, data" + cont "will be saved. OK?" + done + +_MoveMonWOMailSaveText:: + text "Each time you move" + line "a #MON, data" + cont "will be saved. OK?" + done + +_WindowAreaExceededErrorText:: ; unreferenced + text "The window save" + line "area was exceeded." + done + +_WindowPoppingErrorText:: + text "No windows avail-" + line "able for popping." + done + +_CorruptedEventText:: ; unreferenced + text "Corrupted event!" + prompt + +_ObjectEventText:: + text "Object event" + done + +_BGEventText:: + text "BG event" + done + +_CoordinatesEventText:: + text "Coordinates event" + done + +_ReceivedItemText:: + text " received" + line "@" + text_ram wStringBuffer4 + text "." + done + +_PutItemInPocketText:: + text " put the" + line "@" + text_ram wStringBuffer1 + text " in" + cont "the @" + text_ram wStringBuffer3 + text "." + prompt + +_PocketIsFullText:: + text "The @" + text_ram wStringBuffer3 + text_start + line "is full…" + prompt + +_SeerSeeAllText:: + text "I see all." + line "I know all…" + + para "Certainly, I know" + line "of your #MON!" + done + +_SeerCantTellAThingText:: + text "Whaaaat? I can't" + line "tell a thing!" + + para "How could I not" + line "know of this?" + done + +_SeerNameLocationText:: + text "Hm… I see you met" + line "@" + text_ram wSeerNickname + text " here:" + cont "@" + text_ram wSeerCaughtLocation + text "!" + prompt + +_SeerTimeLevelText:: + text "The time was" + line "@" + text_ram wSeerTimeOfDay + text "!" + + para "Its level was @" + text_ram wSeerCaughtLevelString + text "!" + + para "Am I good or what?" + prompt + +_SeerTradeText:: + text "Hm… @" + text_ram wSeerNickname + text_start + line "came from @" + text_ram wSeerOT + text_start + cont "in a trade?" + + para "@" + text_ram wSeerCaughtLocation + text_start + line "was where @" + text_ram wSeerOT + text_start + cont "met @" + text_ram wSeerNickname + text "!" + prompt + +_SeerNoLocationText:: + text "What!? Incredible!" + + para "I don't understand" + line "how, but it is" + + para "incredible!" + line "You are special." + + para "I can't tell where" + line "you met it, but it" + cont "was at level @" + text_ram wSeerCaughtLevelString + text "." + + para "Am I good or what?" + prompt + +_SeerEggText:: + text "Hey!" + + para "That's an EGG!" + + para "You can't say that" + line "you've met it yet…" + done + +_SeerDoNothingText:: + text "Fufufu! I saw that" + line "you'd do nothing!" + done + +_SeerMoreCareText:: + text "Incidentally…" + + para "It would be wise" + line "to raise your" + + para "#MON with a" + line "little more care." + done + +_SeerMoreConfidentText:: + text "Incidentally…" + + para "It seems to have" + line "grown a little." + + para "@" + text_ram wSeerNickname + text " seems" + line "to be becoming" + cont "more confident." + done + +_SeerMuchStrengthText:: + text "Incidentally…" + + para "@" + text_ram wSeerNickname + text " has" + line "grown. It's gained" + cont "much strength." + done + +_SeerMightyText:: + text "Incidentally…" + + para "It certainly has" + line "grown mighty!" + + para "This @" + text_ram wSeerNickname + text_start + line "must have come" + + para "through numerous" + line "#MON battles." + + para "It looks brimming" + line "with confidence." + done + +_SeerImpressedText:: + text "Incidentally…" + + para "I'm impressed by" + line "your dedication." + + para "It's been a long" + line "time since I've" + + para "seen a #MON as" + line "mighty as this" + cont "@" + text_ram wSeerNickname + text "." + + para "I'm sure that" + line "seeing @" + text_ram wSeerNickname + text_start + + para "in battle would" + line "excite anyone." + done + +_CongratulationsYourPokemonText:: + text "Congratulations!" + line "Your @" + text_ram wStringBuffer2 + text_end + + text_end ; unreferenced + +_EvolvedIntoText:: + text_start + + para "evolved into" + line "@" + text_ram wStringBuffer1 + text "!" + done + +_StoppedEvolvingText:: + text "Huh? @" + text_ram wStringBuffer2 + text_start + line "stopped evolving!" + prompt + +_EvolvingText:: + text "What? @" + text_ram wStringBuffer2 + text_start + line "is evolving!" + done + +_MartHowManyText:: + text "How many?" + done + +_MartFinalPriceText:: + text_decimal wItemQuantityChange, 1, 2 + text " @" + text_ram wStringBuffer2 + text "(S)" + line "will be ¥@" + text_decimal hMoneyTemp, 3, 6 + text "." + done + +_HerbShopLadyIntroText:: + text "Hello, dear." + + para "I sell inexpensive" + line "herbal medicine." + + para "They're good, but" + line "a trifle bitter." + + para "Your #MON may" + line "not like them." + + para "Hehehehe…" + done + +_HerbalLadyHowManyText:: + text "How many?" + done + +_HerbalLadyFinalPriceText:: + text_decimal wItemQuantityChange, 1, 2 + text " @" + text_ram wStringBuffer2 + text "(S)" + line "will be ¥@" + text_decimal hMoneyTemp, 3, 6 + text "." + done + +_HerbalLadyThanksText:: + text "Thank you, dear." + line "Hehehehe…" + done + +_HerbalLadyPackFullText:: + text "Oh? Your PACK is" + line "full, dear." + done + +_HerbalLadyNoMoneyText:: + text "Hehehe… You don't" + line "have the money." + done + +_HerbalLadyComeAgainText:: + text "Come again, dear." + line "Hehehehe…" + done + +_BargainShopIntroText:: + text "Hiya! Care to see" + line "some bargains?" + + para "I sell rare items" + line "that nobody else" + + para "carries--but only" + line "one of each item." + done + +_BargainShopFinalPriceText:: + text_ram wStringBuffer2 + text " costs" + line "¥@" + text_decimal hMoneyTemp, 3, 6 + text ". Want it?" + done + +_BargainShopThanksText:: + text "Thanks." + done + +_BargainShopPackFullText:: + text "Uh-oh, your PACK" + line "is chock-full." + done + +_BargainShopSoldOutText:: + text "You bought that" + line "already. I'm all" + cont "sold out of it." + done + +_BargainShopNoFundsText:: + text "Uh-oh, you're" + line "short on funds." + done + +_BargainShopComeAgainText:: + text "Come by again" + line "sometime." + done + +_PharmacyIntroText:: + text "What's up? Need" + line "some medicine?" + done + +_PharmacyHowManyText:: + text "How many?" + done + +_PharmacyFinalPriceText:: + text_decimal wItemQuantityChange, 1, 2 + text " @" + text_ram wStringBuffer2 + text "(S)" + line "will cost ¥@" + text_decimal hMoneyTemp, 3, 6 + text "." + done + +_PharmacyThanksText:: + text "Thanks much!" + done + +_PharmacyPackFullText:: + text "You don't have any" + line "more space." + done + +_PharmacyNoMoneyText:: + text "Huh? That's not" + line "enough money." + done + +_PharmacyComeAgainText:: + text "All right." + line "See you around." + done + +_NothingToSellText:: + text "You don't have" + line "anything to sell." + prompt + +_MartSellHowManyText:: + text "How many?" + done + +_MartSellPriceText:: + text "I can pay you" + line "¥@" + text_decimal hMoneyTemp, 3, 6 + text "." + + para "Is that OK?" + done + +_MartWelcomeText:: + text "Welcome! How may I" + line "help you?" + done + +_MartThanksText:: + text "Here you are." + line "Thank you!" + done + +_MartNoMoneyText:: + text "You don't have" + line "enough money." + done + +_MartPackFullText:: + text "You can't carry" + line "any more items." + done + +_MartCantBuyText:: + text "Sorry, I can't buy" + line "that from you." + prompt + +_MartComeAgainText:: + text "Please come again!" + done + +_MartAskMoreText:: + text "Can I do anything" + line "else for you?" + done + +_MartBoughtText:: + text "Got ¥@" + text_decimal hMoneyTemp, 3, 6 + text " for" + line "@" + text_ram wStringBuffer2 + text "(S)." + done + +_SlotsBetHowManyCoinsText:: + text "Bet how many" + line "coins?" + done + +_SlotsStartText:: + text "Start!" + done + +_SlotsNotEnoughCoinsText:: + text "Not enough" + line "coins." + prompt + +_SlotsRanOutOfCoinsText:: + text "Darn… Ran out of" + line "coins…" + done + +_SlotsPlayAgainText:: + text "Play again?" + done + +_SlotsLinedUpText:: + text "lined up!" + line "Won @" + text_ram wStringBuffer2 + text " coins!" + done + +_SlotsDarnText:: + text "Darn!" + done + +_MobileStadiumEntryText:: + text "Data for use in" + line "the MOBILE STADIUM" + + para "of the N64 #MON" + line "STADIUM 2 can be" + cont "read here." + + para "Read the data?" + done + +_MobileStadiumSuccessText:: + text "Data transfer is" + line "complete." + + para "We hope you enjoy" + line "MOBILE STADIUM" + + para "battles in the N64" + line "#MON STADIUM 2." + + para "" + done + +_MainMenuTimeUnknownText:: + text "Clock time unknown" + done + +_DeleteSavedLoginPasswordText:: + text "Delete the saved" + line "LOG-IN PASSWORD?" + done + +_DeletedTheLoginPasswordText:: + text "Deleted the LOG-IN" + line "PASSWORD." + done + +_MobilePickThreeMonForBattleText:: + text "Pick three #MON" + line "for battle." + prompt + +_MobileUseTheseThreeMonText:: + text_ram wMobileParticipant1Nickname + text "," + line "@" + text_ram wMobileParticipant2Nickname + text " and" + cont "@" + text_ram wMobileParticipant3Nickname + text "." + + para "Use these three?" + done + +_MobileOnlyThreeMonMayEnterText:: + text "Only three #MON" + line "may enter." + prompt + +_MobileCardFolderIntro1Text:: + text "The CARD FOLDER" + line "stores your and" + + para "your friends'" + line "CARDS." + + para "A CARD contains" + line "information like" + + para "the person's name," + line "phone number and" + cont "profile." + + para "" + done + +_MobileCardFolderIntro2Text:: + text "This is your CARD." + + para "Once you've" + line "entered your phone" + + para "number, you can" + line "trade CARDS with" + cont "your friends." + + para "" + done + +_MobileCardFolderIntro3Text:: + text "If you have your" + line "friend's CARD, you" + + para "can use it to make" + line "a call from a" + + para "mobile phone on" + line "the 2nd floor of a" + cont "#MON CENTER." + + para "" + done + +_MobileCardFolderIntro4Text:: + text "To safely store" + line "your collection of" + + para "CARDS, you must" + line "set a PASSCODE for" + cont "your CARD FOLDER." + + para "" + done + +_MobileCardFolderAskDeleteText:: + text "If the CARD FOLDER" + line "is deleted, all" + + para "its CARDS and the" + line "PASSCODE will also" + cont "be deleted." + + para "Beware--a deleted" + line "CARD FOLDER can't" + cont "be restored." + + para "Want to delete" + line "your CARD FOLDER?" + done + +_MobileCardFolderDeleteAreYouSureText:: + text "Are you sure you" + line "want to delete it?" + done + +_MobileCardFolderDeletedText:: + text "The CARD FOLDER" + line "has been deleted." + + para "" + done + +_MobileCardFolderAskOpenOldText:: + text "There is an older" + line "CARD FOLDER from a" + cont "previous journey." + + para "Do you want to" + line "open it?" + done + +_MobileCardFolderAskDeleteOldText:: + text "Delete the old" + line "CARD FOLDER?" + done + +_MobileCardFolderFinishRegisteringCardsText:: + text "Finish registering" + line "CARDS?" + done + +_PhoneWrongNumberText:: + text "Huh? Sorry, wrong" + line "number!" + done + +_PhoneClickText:: + text "Click!" + done + +_PhoneEllipseText:: + text "<……>" + done + +_PhoneOutOfAreaText:: + text "That number is out" + line "of the area." + done + +_PhoneJustTalkToThemText:: + text "Just go talk to" + line "that person!" + done + +_PhoneThankYouText:: + text "Thank you!" + done + +_SpaceSpaceColonText:: ; unreferenced + text " :" + done + +_PasswordAskResetText:: + text "Password OK." + line "Select CONTINUE &" + cont "reset settings." + prompt + +_PasswordWrongText:: + text "Wrong password!" + prompt + +_PasswordAskResetClockText:: + text "Reset the clock?" + done + +_PasswordAskEnterText:: + text "Please enter the" + line "password." + done + +_ClearAllSaveDataText:: + text "Clear all save" + line "data?" + done + +_LearnedMoveText:: + text_ram wMonOrItemNameBuffer + text " learned" + line "@" + text_ram wStringBuffer2 + text "!@" + sound_dex_fanfare_50_79 + text_promptbutton + text_end + + text_end ; unreferenced + +_MoveAskForgetText:: + text "Which move should" + next "be forgotten?" + done + +_StopLearningMoveText:: + text "Stop learning" + line "@" + text_ram wStringBuffer2 + text "?" + done + +_DidNotLearnMoveText:: + text_ram wMonOrItemNameBuffer + text_start + line "did not learn" + cont "@" + text_ram wStringBuffer2 + text "." + prompt + +_AskForgetMoveText:: + text_ram wMonOrItemNameBuffer + text " is" + line "trying to learn" + cont "@" + text_ram wStringBuffer2 + text "." + + para "But @" + text_ram wMonOrItemNameBuffer + text_start + line "can't learn more" + cont "than four moves." + + para "Delete an older" + line "move to make room" + cont "for @" + text_ram wStringBuffer2 + text "?" + done + +Text_MoveForgetCount:: + text "1, 2 and…@" + text_pause + text_end + + text_end ; unreferenced + +_MoveForgotText:: + text " Poof!@" + text_pause + text_start + + para "@" + text_ram wMonOrItemNameBuffer + text " forgot" + line "@" + text_ram wStringBuffer1 + text "." + + para "And…" + prompt + +_MoveCantForgetHMText:: + text "HM moves can't be" + line "forgotten now." + prompt + +_CardFlipPlayWithThreeCoinsText:: + text "Play with three" + line "coins?" + done + +_CardFlipNotEnoughCoinsText:: + text "Not enough coins…" + prompt + +_CardFlipChooseACardText:: + text "Choose a card." + done + +_CardFlipPlaceYourBetText:: + text "Place your bet." + done + +_CardFlipPlayAgainText:: + text "Want to play" + line "again?" + done + +_CardFlipShuffledText:: + text "The cards have" + line "been shuffled." + prompt + +_CardFlipYeahText:: + text "Yeah!" + done + +_CardFlipDarnText:: + text "Darn…" + done + +_GearTodayText:: + text_today + text_end + + text_end ; unreferenced + +_GearEllipseText:: + text "<……>" + done + +_GearOutOfServiceText:: + text "You're out of the" + line "service area." + prompt + +_PokegearAskWhoCallText:: + text "Whom do you want" + line "to call?" + done + +_PokegearPressButtonText:: + text "Press any button" + line "to exit." + done + +_PokegearAskDeleteText:: + text "Delete this stored" + line "phone number?" + done + +_BuenaAskWhichPrizeText:: + text "Which prize would" + line "you like?" + done + +_BuenaIsThatRightText:: + text_ram wStringBuffer1 + text "?" + line "Is that right?" + done + +_BuenaHereYouGoText:: + text "Here you go!" + + para "" + done + +_BuenaNotEnoughPointsText:: + text "You don't have" + line "enough points." + + para "" + done + +_BuenaNoRoomText:: + text "You have no room" + line "for it." + + para "" + done + +_BuenaComeAgainText:: + text "Oh. Please come" + line "back again!" + done + +_BTExcuseMeText:: + text "Excuse me!" + + para "" + done + +_ExcuseMeYoureNotReadyText:: + text "Excuse me." + line "You're not ready." + + para "" + done + +_BattleTowerReturnWhenReadyText:: + text "Please return when" + line "you're ready." + done + +_NeedAtLeastThreeMonText:: + text "You need at least" + line "three #MON." + + para "" + done + +_EggDoesNotQualifyText:: + text "Sorry, an EGG" + line "doesn't qualify." + + para "" + done + +_OnlyThreeMonMayBeEnteredText:: + text "Only three #MON" + line "may be entered." + + para "" + done + +_TheMonMustAllBeDifferentKindsText:: + text "The @" + text_ram wStringBuffer2 + text " #MON" + line "must all be" + cont "different kinds." + + para "" + done + +_TheMonMustNotHoldTheSameItemsText:: + text "The @" + text_ram wStringBuffer2 + text " #MON" + line "must not hold the" + cont "same items." + + para "" + done + +_YouCantTakeAnEggText:: + text "You can't take an" + line "EGG!" + + para "" + done + +_BallDodgedText:: + text "It dodged the" + line "thrown BALL!" + + para "This #MON" + line "can't be caught!" + prompt + +_BallMissedText:: + text "You missed the" + line "#MON!" + prompt + +_BallBrokeFreeText:: + text "Oh no! The #MON" + line "broke free!" + prompt + +_BallAppearedCaughtText:: + text "Aww! It appeared" + line "to be caught!" + prompt + +_BallAlmostHadItText:: + text "Aargh!" + line "Almost had it!" + prompt + +_BallSoCloseText:: + text "Shoot! It was so" + line "close too!" + prompt + +Text_BallCaught:: + text "Gotcha! @" + text_ram wEnemyMonNickname + text_start + line "was caught!@" + sound_caught_mon + text_end + + text_end ; unreferenced + +_WaitButtonText:: + text_promptbutton + text_end + + text_end ; unreferenced + +_BallSentToPCText:: + text_ram wMonOrItemNameBuffer + text " was" + line "sent to BILL's PC." + prompt + +_NewDexDataText:: + text_ram wEnemyMonNickname + text "'s data" + line "was newly added to" + cont "the #DEX.@" + sound_slot_machine_start + text_promptbutton + text_end + + text_end ; unreferenced + +_AskGiveNicknameText:: + text "Give a nickname to" + line "@" + text_ram wStringBuffer1 + text "?" + done + +_ItemStatRoseText:: + text_ram wStringBuffer1 + text "'s" + line "@" + text_ram wStringBuffer2 + text " rose." + prompt + +_ItemCantUseOnMonText:: + text "That can't be used" + line "on this #MON." + prompt + +_RepelUsedEarlierIsStillInEffectText:: + text "The REPEL used" + line "earlier is still" + cont "in effect." + prompt + +_PlayedFluteText:: + text "Played the #" + line "FLUTE." + + para "Now, that's a" + line "catchy tune!" + prompt + +_FluteWakeUpText:: + text "All sleeping" + line "#MON woke up." + prompt + +Text_PlayedPokeFlute:: + text " played the" + line "# FLUTE.@" + text_promptbutton + text_end + + text_end ; unreferenced + +_BlueCardBalanceText:: + text "You now have" + line "@" + text_decimal wBlueCardBalance, 1, 2 + text " points." + done + +_CoinCaseCountText:: + text "Coins:" + line "@" + text_decimal wCoins, 2, 4 + text_end + + text_end ; unreferenced + +_RaiseThePPOfWhichMoveText:: + text "Raise the PP of" + line "which move?" + done + +_RestoreThePPOfWhichMoveText:: + text "Restore the PP of" + line "which move?" + done + +_PPIsMaxedOutText:: + text_ram wStringBuffer2 + text "'s PP" + line "is maxed out." + prompt + +_PPsIncreasedText:: + text_ram wStringBuffer2 + text "'s PP" + line "increased." + prompt + +_PPRestoredText:: + text "PP was restored." + prompt + +_SentTrophyHomeText:: + text "There was a trophy" + line "inside!@" + sound_dex_fanfare_50_79 + text_start + + para "@" + text_ram wPlayerName + text " sent the" + line "trophy home." + prompt + +_ItemLooksBitterText:: + text "It looks bitter…" + prompt + +_ItemCantUseOnEggText:: + text "That can't be used" + line "on an EGG." + prompt + +_ItemOakWarningText:: + text "OAK: !" + line "This isn't the" + cont "time to use that!" + prompt + +_ItemBelongsToSomeoneElseText:: + text "That belongs to" + line "someone else!" + prompt + +_ItemWontHaveEffectText:: + text "It won't have any" + line "effect." + prompt + +_BallBlockedText:: + text "The trainer" + line "blocked the BALL!" + prompt + +_BallDontBeAThiefText:: + text "Don't be a thief!" + prompt + +_NoCyclingText:: + text "Cycling isn't" + line "allowed here." + prompt + +_ItemCantGetOnText:: + text "Can't get on your" + line "@" + text_ram wStringBuffer1 + text " now." + prompt + +_BallBoxFullText:: + text "The #MON BOX" + line "is full. That" + cont "can't be used now." + prompt + +_ItemUsedText:: + text " used the@" + text_low + text_ram wStringBuffer2 + text "." + done + +_ItemGotOnText:: + text " got on the@" + text_low + text_ram wStringBuffer2 + text "." + prompt + +_ItemGotOffText:: + text " got off@" + text_low + text "the @" + text_ram wStringBuffer2 + text "." + prompt + +_KnowsMoveText:: + text_ram wStringBuffer1 + text " knows" + line "@" + text_ram wStringBuffer2 + text "." + prompt + +_MoveKnowsOneText:: + text "That #MON knows" + line "only one move." + done + +_AskDeleteMoveText:: + text "Oh, make it forget" + line "@" + text_ram wStringBuffer1 + text "?" + done + +_DeleterForgotMoveText:: + text "Done! Your #MON" + line "forgot the move." + done + +_DeleterEggText:: + text "An EGG doesn't" + line "know any moves!" + done + +_DeleterNoComeAgainText:: + text "No? Come visit me" + line "again." + done + +_DeleterAskWhichMoveText:: + text "Which move should" + line "it forget, then?" + prompt + +_DeleterIntroText:: + text "Um… Oh, yes, I'm" + line "the MOVE DELETER." + + para "I can make #MON" + line "forget moves." + + para "Shall I make a" + line "#MON forget?" + done + +_DeleterAskWhichMonText:: + text "Which #MON?" + prompt + +_DSTIsThatOKText:: + text " DST," + line "is that OK?" + done + +_TimeAskOkayText:: + text "," + line "is that OK?" + done + +_TimesetAskDSTText:: + text "Do you want to" + line "switch to Daylight" + cont "Saving Time?" + done + +_TimesetDSTText:: + text "I set the clock" + line "forward by one" + cont "hour." + prompt + +_TimesetAskNotDSTText:: + text "Is Daylight Saving" + line "Time over?" + done + +_TimesetNotDSTText:: + text "I put the clock" + line "back one hour." + prompt + +_TimesetAskAdjustDSTText:: + text "Do you want to" + line "adjust your clock" + + para "for Daylight" + line "Saving Time?" + done + +_MomLostGearBookletText:: + text "I lost the in-" + line "struction booklet" + cont "for the #GEAR." + + para "Come back again in" + line "a while." + prompt diff --git a/data/text/mail_input_chars.asm b/data/text/mail_input_chars.asm new file mode 100644 index 0000000..db5737b --- /dev/null +++ b/data/text/mail_input_chars.asm @@ -0,0 +1,17 @@ +; see engine/menus/naming_screen.asm + +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 " + +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 " diff --git a/data/text/name_input_chars.asm b/data/text/name_input_chars.asm new file mode 100644 index 0000000..5ecbab2 --- /dev/null +++ b/data/text/name_input_chars.asm @@ -0,0 +1,31 @@ +; see engine/menus/naming_screen.asm + +NameInputLower: + db "a b c d e f g h i" + db "j k l m n o p q r" + db "s t u v w x y z " + db "× ( ) : ; [ ] " + db "UPPER DEL END " + +BoxNameInputLower: + db "a b c d e f g h i" + db "j k l m n o p q r" + db "s t u v w x y z " + db "é 'd 'l 'm 'r 's 't 'v 0" + db "1 2 3 4 5 6 7 8 9" + db "UPPER DEL END " + +NameInputUpper: + db "A B C D E F G H I" + db "J K L M N O P Q R" + db "S T U V W X Y Z " + db "- ? ! / . , " + db "lower DEL END " + +BoxNameInputUpper: + db "A B C D E F G H I" + db "J K L M N O P Q R" + db "S T U V W X Y Z " + db "× ( ) : ; [ ] " + db "- ? ! ♂ ♀ / . , &" + db "lower DEL END " diff --git a/data/text/std_text.asm b/data/text/std_text.asm new file mode 100644 index 0000000..5415c48 --- /dev/null +++ b/data/text/std_text.asm @@ -0,0 +1,388 @@ +NurseMornText: + text "Good morning!" + line "Welcome to our" + cont "#MON CENTER." + done + +NurseDayText: + text "Hello!" + line "Welcome to our" + cont "#MON CENTER." + done + +NurseNiteText: + text "Good evening!" + line "You're out late." + + para "Welcome to our" + line "#MON CENTER." + done + +PokeComNurseMornText: + text "Good morning!" + + para "This is the #-" + line "MON COMMUNICATION" + + para "CENTER--or the" + line "#COM CENTER." + done + +PokeComNurseDayText: + text "Hello!" + + para "This is the #-" + line "MON COMMUNICATION" + + para "CENTER--or the" + line "#COM CENTER." + done + +PokeComNurseNiteText: + text "Good to see you" + line "working so late." + + para "This is the #-" + line "MON COMMUNICATION" + + para "CENTER--or the" + line "#COM CENTER." + done + +NurseAskHealText: + text "We can heal your" + line "#MON to perfect" + cont "health." + + para "Shall we heal your" + line "#MON?" + done + +NurseTakePokemonText: + text "OK, may I see your" + line "#MON?" + done + +NurseReturnPokemonText: + text "Thank you for" + line "waiting." + + para "Your #MON are" + line "fully healed." + done + +NurseGoodbyeText: + text "We hope to see you" + line "again." + done + +; not used + text "We hope to see you" + line "again." + done + +NursePokerusText: + text "Your #MON" + line "appear to be" + + para "infected by tiny" + line "life forms." + + para "Your #MON are" + line "healthy and seem" + cont "to be fine." + + para "But we can't tell" + line "you anything more" + + para "at a #MON" + line "CENTER." + done + +PokeComNursePokerusText: + text "Your #MON" + line "appear to be" + + para "infected by tiny" + line "life forms." + + para "Your #MON are" + line "healthy and seem" + cont "to be fine." + + para "But we can't tell" + line "you anything more." + done + +DifficultBookshelfText: + text "It's full of" + line "difficult books." + done + +PictureBookshelfText: + text "A whole collection" + line "of #MON picture" + cont "books!" + done + +MagazineBookshelfText: + text "#MON magazines…" + line "#MON PAL," + + para "#MON HANDBOOK," + line "#MON GRAPH…" + done + +TeamRocketOathText: + text "TEAM ROCKET OATH" + + para "Steal #MON for" + line "profit!" + + para "Exploit #MON" + line "for profit!" + + para "All #MON exist" + line "for the glory of" + cont "TEAM ROCKET!" + done + +IncenseBurnerText: + text "What is this?" + + para "Oh, it's an" + line "incense burner!" + done + +MerchandiseShelfText: + text "Lots of #MON" + line "merchandise!" + done + +LookTownMapText: + text "It's the TOWN MAP." + done + +WindowText: + text "My reflection!" + line "Lookin' good!" + done + +TVText: + text "It's a TV." + done + +HomepageText: + text "#MON JOURNAL" + line "HOME PAGE…" + + para "It hasn't been" + line "updated…" + done + +; not used + text "#MON RADIO!" + + para "Call in with your" + line "requests now!" + done + +TrashCanText: + text "There's nothing in" + line "here…" + done + +; not used + text "A #MON may be" + line "able to move this." + done + +; not used + text "Maybe a #MON" + line "can break this." + done + +PokecenterSignText: + text "Heal Your #MON!" + line "#MON CENTER" + done + +MartSignText: + text "For All Your" + line "#MON Needs" + + para "#MON MART" + done + +ContestResults_ReadyToJudgeText: + text "We will now judge" + line "the #MON you've" + cont "caught." + + para "<……>" + line "<……>" + + para "We have chosen the" + line "winners!" + + para "Are you ready for" + line "this?" + done + +ContestResults_PlayerWonAPrizeText: + text ", the No.@" + text_ram wStringBuffer3 + text_start + line "finisher, wins" + cont "@" + text_ram wStringBuffer4 + text "!" + done + +ReceivedItemText: + text " received" + line "@" + text_ram wStringBuffer4 + text "." + done + +ContestResults_JoinUsNextTimeText: + text "Please join us for" + line "the next Contest!" + done + +ContestResults_ConsolationPrizeText: + text "Everyone else gets" + line "a BERRY as a con-" + cont "solation prize!" + done + +ContestResults_DidNotWinText: + text "We hope you do" + line "better next time." + done + +ContestResults_ReturnPartyText: + text "We'll return the" + line "#MON we kept" + + para "for you." + line "Here you go!" + done + +ContestResults_PartyFullText: + text "Your party's full," + line "so the #MON was" + + para "sent to your BOX" + line "in BILL's PC." + done + +GymStatue_CityGymText: + text_ram wStringBuffer3 + text_start + line "#MON GYM" + done + +GymStatue_WinningTrainersText: + text "LEADER: @" + text_ram wStringBuffer4 + text_start + para "WINNING TRAINERS:" + line "" + done + +CoinVendor_WelcomeText: + text "Welcome to the" + line "GAME CORNER." + done + +CoinVendor_NoCoinCaseText: + text "Do you need game" + line "coins?" + + para "Oh, you don't have" + line "a COIN CASE for" + cont "your coins." + done + +CoinVendor_IntroText: + text "Do you need some" + line "game coins?" + + para "It costs ¥1000 for" + line "50 coins. Do you" + cont "want some?" + done + +CoinVendor_Buy50CoinsText: + text "Thank you!" + line "Here are 50 coins." + done + +CoinVendor_Buy500CoinsText: + text "Thank you! Here" + line "are 500 coins." + done + +CoinVendor_NotEnoughMoneyText: + text "You don't have" + line "enough money." + done + +CoinVendor_CoinCaseFullText: + text "Whoops! Your COIN" + line "CASE is full." + done + +CoinVendor_CancelText: + text "No coins for you?" + line "Come again!" + done + +BugContestPrizeNoRoomText: + text "Oh? Your PACK is" + line "full." + + para "We'll keep this" + line "for you today, so" + + para "come back when you" + line "make room for it." + done + +HappinessText3: + text "Wow! You and your" + line "#MON are really" + cont "close!" + done + +HappinessText2: + text "#MON get more" + line "friendly if you" + + para "spend time with" + line "them." + done + +HappinessText1: + text "You haven't tamed" + line "your #MON." + + para "If you aren't" + line "nice, it'll pout." + done + +RegisteredNumber1Text: + text " registered" + line "@" + text_ram wStringBuffer3 + text "'s number." + done + +RegisteredNumber2Text: + text " registered" + line "@" + text_ram wStringBuffer3 + text "'s number." + done diff --git a/data/text_buffers.asm b/data/text_buffers.asm new file mode 100644 index 0000000..2f68100 --- /dev/null +++ b/data/text_buffers.asm @@ -0,0 +1,9 @@ +StringBufferPointers:: +; entries correspond to arguments for text_buffer (TX_STRINGBUFFER) + dw wStringBuffer3 ; 0 + dw wStringBuffer4 ; 1 + dw wStringBuffer5 ; 2 + dw wStringBuffer2 ; 3 + dw wStringBuffer1 ; 4 + dw wEnemyMonNickname ; 5 + dw wBattleMonNickname ; 6 diff --git a/data/tilesets.asm b/data/tilesets.asm new file mode 100644 index 0000000..fd19928 --- /dev/null +++ b/data/tilesets.asm @@ -0,0 +1,53 @@ +MACRO tileset + dba \1GFX, \1Meta, \1Coll + dw \1Anim + dw NULL + dw \1PalMap +ENDM + +; Associated data: +; - The *GFX, *Meta, and *Coll are defined in gfx/tilesets.asm +; - The *PalMap are defined in gfx/tileset_palette_maps.asm +; - The *Anim are defined in engine/tilesets/tileset_anims.asm + +Tilesets:: +; entries correspond to TILESET_* constants (see constants/tileset_constants.asm) + table_width TILESET_LENGTH, Tilesets + tileset Tileset0 + tileset TilesetJohto + tileset TilesetJohtoModern + tileset TilesetKanto + tileset TilesetBattleTowerOutside + tileset TilesetHouse + tileset TilesetPlayersHouse + tileset TilesetPokecenter + tileset TilesetGate + tileset TilesetPort + tileset TilesetLab + tileset TilesetFacility + tileset TilesetMart + tileset TilesetMansion + tileset TilesetGameCorner + tileset TilesetEliteFourRoom + tileset TilesetTraditionalHouse + tileset TilesetTrainStation + tileset TilesetChampionsRoom + tileset TilesetLighthouse + tileset TilesetPlayersRoom + tileset TilesetPokeComCenter + tileset TilesetBattleTowerInside + tileset TilesetTower + tileset TilesetCave + tileset TilesetPark + tileset TilesetRuinsOfAlph + tileset TilesetRadioTower + tileset TilesetUnderground + tileset TilesetIcePath + tileset TilesetDarkCave + tileset TilesetForest + tileset TilesetBetaWordRoom + tileset TilesetHoOhWordRoom + tileset TilesetKabutoWordRoom + tileset TilesetOmanyteWordRoom + tileset TilesetAerodactylWordRoom + assert_table_length NUM_TILESETS + 1 diff --git a/data/tilesets/aerodactyl_word_room_collision.asm b/data/tilesets/aerodactyl_word_room_collision.asm new file mode 100644 index 0000000..58bdacc --- /dev/null +++ b/data/tilesets/aerodactyl_word_room_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13 + tilecoll WALL, WALL, WALL, FLOOR ; 14 + tilecoll WALL, WALL, FLOOR, FLOOR ; 15 + tilecoll WALL, WALL, FLOOR, FLOOR ; 16 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 17 + tilecoll WALL, WALL, FLOOR, FLOOR ; 18 + tilecoll WALL, WALL, FLOOR, WALL ; 19 + tilecoll WALL, FLOOR, WALL, FLOOR ; 1a + tilecoll FLOOR, WALL, FLOOR, WALL ; 1b + tilecoll FLOOR, FLOOR, FLOOR, PIT ; 1c + tilecoll WALL, WALL, WALL, WALL ; 1d + tilecoll WALL, WALL, WALL, WALL ; 1e + tilecoll WALL, WALL, WALL, WALL ; 1f + tilecoll WALL, WALL, WALL, WALL ; 20 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 21 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 25 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f diff --git a/data/tilesets/aerodactyl_word_room_metatiles.bin b/data/tilesets/aerodactyl_word_room_metatiles.bin new file mode 100644 index 0000000..0538baa --- /dev/null +++ b/data/tilesets/aerodactyl_word_room_metatiles.bin @@ -0,0 +1,17 @@ +ǎמŎ՞Øǐ  +  +  +  !"#Ɉ٘@ABC 89 +  +  + +  +  +  +  +  +  +  + TVXY  + C 6!@ #8 + 6"7Šհ \ No newline at end of file diff --git a/data/tilesets/battle_tower_inside_collision.asm b/data/tilesets/battle_tower_inside_collision.asm new file mode 100644 index 0000000..97e09bf --- /dev/null +++ b/data/tilesets/battle_tower_inside_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll WALL, WALL, FLOOR, FLOOR ; 02 + tilecoll WALL, WALL, FLOOR, FLOOR ; 03 + tilecoll WALL, DOOR, FLOOR, FLOOR ; 04 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 05 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 06 + tilecoll WALL, WALL, FLOOR, FLOOR ; 07 + tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 08 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 09 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a + tilecoll WALL, WALL, FLOOR, FLOOR ; 0b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f + tilecoll DOOR, WALL, FLOOR, FLOOR ; 10 + tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 11 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 12 + tilecoll WALL, WALL, WALL, WALL ; 13 + tilecoll WALL, FLOOR, WALL, FLOOR ; 14 + tilecoll FLOOR, WALL, FLOOR, WALL ; 15 + tilecoll FLOOR, WALL, FLOOR, WALL ; 16 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 17 + tilecoll WALL, FLOOR, WALL, FLOOR ; 18 + tilecoll FLOOR, WALL, FLOOR, WALL ; 19 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 1a + tilecoll WALL, WALL, FLOOR, FLOOR ; 1b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1c + tilecoll WALL, WALL, FLOOR, FLOOR ; 1d + tilecoll WALL, WALL, FLOOR, FLOOR ; 1e + tilecoll WALL, WALL, FLOOR, WALL ; 1f + tilecoll WALL, WALL, WALL, FLOOR ; 20 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 21 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 22 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23 + tilecoll FLOOR, FLOOR, WALL, WALL ; 24 + tilecoll WALL, FLOOR, FLOOR, DOOR ; 25 + tilecoll WALL, WALL, FLOOR, FLOOR ; 26 + tilecoll WALL, WALL, FLOOR, FLOOR ; 27 + tilecoll WALL, PC, FLOOR, FLOOR ; 28 + tilecoll WALL, WALL, FLOOR, FLOOR ; 29 + tilecoll WALL, WALL, WALL, FLOOR ; 2a + tilecoll WALL, WALL, FLOOR, WALL ; 2b + tilecoll FLOOR, FLOOR, FLOOR, DOOR ; 2c + tilecoll FLOOR, FLOOR, DOOR, FLOOR ; 2d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 34 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35 + tilecoll WALL, WALL, FLOOR, WALL ; 36 + tilecoll WALL, WALL, WALL, FLOOR ; 37 + tilecoll WALL, WALL, FLOOR, WALL ; 38 + tilecoll WALL, WALL, WALL, WALL ; 39 + tilecoll WALL, WALL, WALL, FLOOR ; 3a + tilecoll WALL, WALL, WALL, WALL ; 3b + tilecoll WALL, WALL, FLOOR, WALL ; 3c + tilecoll WALL, WALL, FLOOR, WALL ; 3d + tilecoll WALL, WALL, WALL, FLOOR ; 3e + tilecoll WALL, WALL, FLOOR, WALL ; 3f diff --git a/data/tilesets/battle_tower_inside_metatiles.bin b/data/tilesets/battle_tower_inside_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..c64ef0a12434d171885be452a3968bb03f526d95 GIT binary patch literal 1024 zcmXp<1A=IPjf;y*OiD_Mk&%%RBoz`G5*iQ~5QyM2F$V++3B&k2yn=!L{vmnRaI3LDy3wg z1P97W1_mH52rH>5DJdBl85tWH85tRXuz`V*35Wy121W)3229K>tU|&l=0S~BR5UO! zG=y>tU_7+oGB@RB6hy{?f~MT4SVvb-(8g9!5JrQ12gcTdf>yeE`htRX_JV>i8lhK1 zQ&7;t60A~CP|!h8P*BfNP|(@c#Wff$4g}rY1qH*x!Af0RU0jjl2*mgB^n%A33oE<0 zh$suIs;Y>nfq|+jyEv8*1$#Oo!oa}X9LzK@FhJqCxf>XSg@dKQmO_chC~qHUS6A1N zP(+%D27{QG7(cLb0}wYR#y8f$AT98Rbg%}0^fFy9C literal 0 HcmV?d00001 diff --git a/data/tilesets/battle_tower_outside_collision.asm b/data/tilesets/battle_tower_outside_collision.asm new file mode 100644 index 0000000..03dec85 --- /dev/null +++ b/data/tilesets/battle_tower_outside_collision.asm @@ -0,0 +1,128 @@ + tilecoll 01, 01, 01, 01 ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll WALL, WALL, WALL, WALL ; 05 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07 + tilecoll WALL, WALL, WALL, WALL ; 08 + tilecoll WALL, WALL, WALL, WALL ; 09 + tilecoll WALL, WALL, WALL, WALL ; 0a + tilecoll WALL, WALL, WALL, WALL ; 0b + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0c + tilecoll FLOOR, WALL, WALL, WALL ; 0d + tilecoll WALL, WALL, WALL, WALL ; 0e + tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll WALL, WALL, FLOOR, FLOOR ; 10 + tilecoll WALL, WALL, FLOOR, WALL ; 11 + tilecoll WALL, WALL, DOOR, DOOR ; 12 + tilecoll WALL, WALL, WALL, FLOOR ; 13 + tilecoll WALL, WALL, FLOOR, FLOOR ; 14 + tilecoll WALL, WALL, WALL, WALL ; 15 + tilecoll WALL, WALL, DOOR, WALL ; 16 + tilecoll WALL, WALL, WALL, WALL ; 17 + tilecoll WALL, WALL, WALL, WALL ; 18 + tilecoll WALL, WALL, WALL, WALL ; 19 + tilecoll WALL, WALL, WALL, WALL ; 1a + tilecoll WALL, WALL, WALL, WALL ; 1b + tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, FLOOR ; 1c + tilecoll FLOOR, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 1d + tilecoll WALL, WALL, WALL, WALL ; 1e + tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 1f + tilecoll FLOOR, FLOOR, WALL, WALL ; 20 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 21 + tilecoll WALL, WALL, WALL, WALL ; 22 + tilecoll WALL, WALL, WALL, WALL ; 23 + tilecoll WALL, WALL, WALL, WALL ; 24 + tilecoll WALL, WALL, WALL, WALL ; 25 + tilecoll WALL, WALL, WALL, WALL ; 26 + tilecoll WALL, WALL, WALL, WALL ; 27 + tilecoll WALL, WALL, WALL, WALL ; 28 + tilecoll WALL, WALL, WALL, WALL ; 29 + tilecoll WALL, WALL, WALL, WALL ; 2a + tilecoll WALL, WALL, WALL, WALL ; 2b + tilecoll WALL, WALL, WALL, WALL ; 2c + tilecoll WALL, FLOOR, WALL, WALL ; 2d + tilecoll WALL, WALL, WALL, WALL ; 2e + tilecoll WALL, FLOOR, WALL, WALL ; 2f + tilecoll WALL, WALL, WALL, WALL ; 30 + tilecoll WALL, FLOOR, WALL, FLOOR ; 31 + tilecoll WALL, HEADBUTT_TREE, WALL, HEADBUTT_TREE ; 32 + tilecoll WALL, WALL, WALL, WALL ; 33 + tilecoll WHIRLPOOL, FLOOR, WHIRLPOOL, FLOOR ; 34 + tilecoll WHIRLPOOL, FLOOR, FLOOR, FLOOR ; 35 + tilecoll 5B, FLOOR, FLOOR, FLOOR ; 36 + tilecoll 5B, 01, FLOOR, FLOOR ; 37 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 40 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 41 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 42 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 43 + tilecoll FLOOR, FLOOR, BRAKE_45, FLOOR ; 44 + tilecoll FLOOR, FLOOR, BRAKE_45, FLOOR ; 45 + tilecoll FLOOR, FLOOR, BRAKE_45, FLOOR ; 46 + tilecoll FLOOR, FLOOR, BRAKE_45, FLOOR ; 47 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 48 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 49 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 4f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 50 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 51 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 52 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 53 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 54 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 55 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 56 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 57 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 58 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 59 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 60 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 61 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 62 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 63 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 64 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 65 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 66 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 67 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 68 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 69 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 6a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 6b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 6c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 6d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 6e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 6f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 70 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 71 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 72 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 73 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 74 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 75 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 76 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 77 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 78 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 79 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7f diff --git a/data/tilesets/battle_tower_outside_metatiles.bin b/data/tilesets/battle_tower_outside_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..c4390bcba4b3c49bd0eaebdce44da93f1b4a5005 GIT binary patch literal 2048 zcmZQT18iu36%DYU0kAYPD>E}IGngqSFDEZ73W0X^cJ}&c0Aw8-h+u$_^BNj^8|F=z z2%~#@o0=z1oHQ9mYwPIfTHDyzg0Q!bk8ewBTg#NG)26^^uu%+b3=UAhz#u2jz#uFd z6(uYh8EI$V-PqeZXTrpZFuJ#?XYRyFb9-QPLqlWl?uN!*w%vR7g1o+b0mH(T8#ZoQ zJ^#W^Hnxkq7A;<~Xw#-mo3?J-x^4T8?K_q-EL*W@^OjXRFRxv*>k=DVZ+}luUw_a3 zz5Diqw6h&Jc<|uy6ATRV)*U(0Fz@VHX$Vj=w~&^$v|?g9c<|sc28PpT4j*1W_w3oZ zJ%WOQf_zZG&CSiNYhz<$t7~IpYYV{#4<2e}U^qGX$dPl+XV0FU+7wRLo~k<{qu=&~aF0It{D$H&{p#|Nh0$H&*!$H&Ll1`0qjKGskUm;#B| z`snEB=zzI62=w@Y#6Bbi*x5%$%E=1|3XAgcfv}xD7q_4g0|OsF2uDS6^MK@~q=iKx z*v_7jNm_=DO-+W44Ma1Ev9ame$jRI4+S%LM%E{Z>!f0VpTU!vev;RK|MnhmU1V%$( Hh=u?F)M=gP literal 0 HcmV?d00001 diff --git a/data/tilesets/beta_word_room_collision.asm b/data/tilesets/beta_word_room_collision.asm new file mode 100644 index 0000000..58bdacc --- /dev/null +++ b/data/tilesets/beta_word_room_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13 + tilecoll WALL, WALL, WALL, FLOOR ; 14 + tilecoll WALL, WALL, FLOOR, FLOOR ; 15 + tilecoll WALL, WALL, FLOOR, FLOOR ; 16 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 17 + tilecoll WALL, WALL, FLOOR, FLOOR ; 18 + tilecoll WALL, WALL, FLOOR, WALL ; 19 + tilecoll WALL, FLOOR, WALL, FLOOR ; 1a + tilecoll FLOOR, WALL, FLOOR, WALL ; 1b + tilecoll FLOOR, FLOOR, FLOOR, PIT ; 1c + tilecoll WALL, WALL, WALL, WALL ; 1d + tilecoll WALL, WALL, WALL, WALL ; 1e + tilecoll WALL, WALL, WALL, WALL ; 1f + tilecoll WALL, WALL, WALL, WALL ; 20 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 21 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 25 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f diff --git a/data/tilesets/beta_word_room_metatiles.bin b/data/tilesets/beta_word_room_metatiles.bin new file mode 100644 index 0000000..47c531b --- /dev/null +++ b/data/tilesets/beta_word_room_metatiles.bin @@ -0,0 +1,17 @@ +ÀӐǦ׶ǀא  +  +  +  !"#@ABC 89 +  +  + +  +  +  +  +  +  +  + TVXY  + C 6!@ #8 + 6"7𠡀ŐѲ \ No newline at end of file diff --git a/data/tilesets/cave_collision.asm b/data/tilesets/cave_collision.asm new file mode 100644 index 0000000..18f9b80 --- /dev/null +++ b/data/tilesets/cave_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll WALL, WALL, WALL, WALL ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 03 + tilecoll WALL, UP_WALL, WALL, FLOOR ; 04 + tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 05 + tilecoll UP_WALL, WALL, FLOOR, WALL ; 06 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 07 + tilecoll WALL, FLOOR, WALL, FLOOR ; 08 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09 + tilecoll FLOOR, WALL, FLOOR, WALL ; 0a + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 0b + tilecoll WALL, FLOOR, WALL, WALL ; 0c + tilecoll FLOOR, FLOOR, WALL, WALL ; 0d + tilecoll FLOOR, WALL, WALL, WALL ; 0e + tilecoll WATER, WATER, WATER, WATER ; 0f + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 10 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 11 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 12 + tilecoll FLOOR, FLOOR, WALL, CAVE ; 13 + tilecoll UP_WALL, UP_WALL, FLOOR, LADDER ; 14 + tilecoll UP_WALL, UP_WALL, FLOOR, LADDER ; 15 + tilecoll WALL, FLOOR, WALL, WARP_CARPET_DOWN ; 16 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 17 + tilecoll WALL, WALL, WALL, FLOOR ; 18 + tilecoll WALL, WALL, FLOOR, FLOOR ; 19 + tilecoll WALL, WALL, FLOOR, WALL ; 1a + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 1b + tilecoll WALL, FLOOR, WALL, FLOOR ; 1c + tilecoll WALL, WALL, WALL, WALL ; 1d + tilecoll FLOOR, WALL, FLOOR, WALL ; 1e + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 1f + tilecoll WALL, FLOOR, WALL, WALL ; 20 + tilecoll FLOOR, FLOOR, WALL, WALL ; 21 + tilecoll FLOOR, WALL, WALL, WALL ; 22 + tilecoll UP_WALL, WALL, FLOOR, FLOOR ; 23 + tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 24 + tilecoll WATER, WATER, WATER, WATER ; 25 + tilecoll WATER, WATER, WATER, WATER ; 26 + tilecoll WATER, WATER, WATER, WATER ; 27 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 28 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 29 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 2a + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 2b + tilecoll WATERFALL, WATERFALL, WATERFALL, WATERFALL ; 2c + tilecoll WALL, WALL, WALL, WALL ; 2d + tilecoll WALL, WALL, WALL, WALL ; 2e + tilecoll WALL, WALL, WALL, WALL ; 2f + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 30 + tilecoll WALL, WALL, WALL, WALL ; 31 + tilecoll WATER, WATER, WATER, WATER ; 32 + tilecoll WATER, WATER, WATER, WATER ; 33 + tilecoll WALL, WALL, WALL, WALL ; 34 + tilecoll FLOOR, WALL, FLOOR, WALL ; 35 + tilecoll FLOOR, WALL, FLOOR, WALL ; 36 + tilecoll WALL, WALL, WALL, CAVE ; 37 + tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 38 + tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 39 + tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 3a + tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 3b + tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 3c + tilecoll WATER, WATER, WATER, WATER ; 3d + tilecoll WATER, WATER, WATER, WATER ; 3e + tilecoll FLOOR, FLOOR, PIT, FLOOR ; 3f diff --git a/data/tilesets/cave_metatiles.bin b/data/tilesets/cave_metatiles.bin new file mode 100644 index 0000000..a41b5b0 --- /dev/null +++ b/data/tilesets/cave_metatiles.bin @@ -0,0 +1,6 @@ +$$$$$$$$*+:;"#23%&&%&&&&&&&&&&&&&'&&&' +& +&  &&67&&67&&&&$$$$*+:;$$$$"#23     ()89       !01     $$&&&&    @@@@@@@@@@@@@@@@%&&&%&&&%&&&%&&&&&&&&&&&&&&&&&&&&&&'&&&'&&&'&&&'67&&67&&$$%&&'%' &&&&&&&&  +& +67'67&'&&&&&&&&&&&&%&&&&&&&&&&'&&&  +&&& \ No newline at end of file diff --git a/data/tilesets/champions_room_collision.asm b/data/tilesets/champions_room_collision.asm new file mode 100644 index 0000000..bb3201d --- /dev/null +++ b/data/tilesets/champions_room_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll WALL, WALL, FLOOR, WALL ; 01 + tilecoll WALL, WALL, WALL, FLOOR ; 02 + tilecoll FLOOR, FLOOR, WALL, WALL ; 03 + tilecoll WALL, WALL, WALL, WALL ; 04 + tilecoll WALL, WALL, COUNTER, FLOOR ; 05 + tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 06 + tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 07 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 08 + tilecoll WALL, FLOOR, FLOOR, WALL ; 09 + tilecoll WALL, WALL, WALL, WALL ; 0a + tilecoll WALL, WALL, LADDER, LADDER ; 0b + tilecoll WALL, WALL, FLOOR, FLOOR ; 0c + tilecoll WALL, WALL, WALL, WALL ; 0d + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 0e + tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10 + tilecoll WALL, WALL, WALL, FLOOR ; 11 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12 + tilecoll WALL, WALL, FLOOR, WALL ; 13 + tilecoll WALL, FLOOR, WALL, WALL ; 14 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 15 + tilecoll FLOOR, FLOOR, WALL, WALL ; 16 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 17 + tilecoll WALL, FLOOR, WALL, FLOOR ; 18 + tilecoll FLOOR, WALL, FLOOR, WALL ; 19 + tilecoll WALL, FLOOR, WALL, FLOOR ; 1a + tilecoll FLOOR, WALL, FLOOR, WALL ; 1b + tilecoll WALL, UP_WALL, WALL, FLOOR ; 1c + tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 1d + tilecoll UP_WALL, WALL, FLOOR, WALL ; 1e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1f + tilecoll WALL, FLOOR, WALL, WALL ; 20 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 21 + tilecoll FLOOR, WALL, WALL, WALL ; 22 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 23 + tilecoll WALL, FLOOR, WALL, FLOOR ; 24 + tilecoll WALL, WALL, WALL, WALL ; 25 + tilecoll WALL, WALL, WALL, WALL ; 26 + tilecoll FLOOR, WALL, FLOOR, WALL ; 27 + tilecoll WALL, WALL, WALL, WALL ; 28 + tilecoll WALL, WALL, WALL, WALL ; 29 + tilecoll WALL, WALL, WALL, WALL ; 2a + tilecoll FLOOR, FLOOR, WALL, WALL ; 2b + tilecoll WALL, WALL, WALL, WALL ; 2c + tilecoll WALL, WALL, WALL, WALL ; 2d + tilecoll WALL, WALL, WALL, WALL ; 2e + tilecoll WALL, FLOOR, WALL, FLOOR ; 2f + tilecoll FLOOR, WALL, FLOOR, WALL ; 30 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32 + tilecoll WALL, WALL, FLOOR, FLOOR ; 33 + tilecoll FLOOR, FLOOR, WALL, WALL ; 34 + tilecoll WALL, FLOOR, WALL, FLOOR ; 35 + tilecoll FLOOR, WALL, FLOOR, WALL ; 36 + tilecoll FLOOR, WALL, WALL, WALL ; 37 + tilecoll WALL, FLOOR, WALL, FLOOR ; 38 + tilecoll FLOOR, WALL, FLOOR, WALL ; 39 + tilecoll WALL, WALL, WALL, WALL ; 3a + tilecoll WALL, WALL, WALL, WALL ; 3b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d + tilecoll WALL, FLOOR, WALL, WALL ; 3e + tilecoll FLOOR, WALL, WALL, WALL ; 3f diff --git a/data/tilesets/champions_room_metatiles.bin b/data/tilesets/champions_room_metatiles.bin new file mode 100644 index 0000000..a2adb19 --- /dev/null +++ b/data/tilesets/champions_room_metatiles.bin @@ -0,0 +1,15 @@ +  *() 89+,!!   %'!!  5 5 5 5 5&&01    %&&'677:"##$2334ַ  +,+, *() 89 SSSSSSSSSSSSSSSSFGFGVWVWFGSSVWSS FGFGVWVWSSFGSSVW]]]]%&&'XYXYѣѥSSSSSSSSFGFGVWVWFGSSVWSSFGSSVWSSSSFGSSVWSSFGSSVW./SS>?SSNOSS^_SSSS./SS>?SSNOSS^_S@HH@PQQPPQQPPQQHHHHQQQQQQQQQQQQHHBSQQRBQQRRQQRR----------------PPQQPPQQPCDDCDDDQQQQQQQQTUTUTUTUQQRRQQRRDDERDDDESSSSSSSS + SS + SS + SSSS + FG + VW + FG + VWFG + VW + FG + VW + SS + SS + SS + SSʰ˱ݱ̲޲αݱϲ޲FGFGVWVWFGFGVWVW]]]]%&&'XYXYݱ޲°ıƲ]]]]]]]];<<=;<<=;<<=;<<=````````````````;<<=;<<=%&&'XYXY]]]]%&&'XYXY]]]]]]]]]]]]]]]]]]]];<<=ӢґӡӢ \ No newline at end of file diff --git a/data/tilesets/dark_cave_collision.asm b/data/tilesets/dark_cave_collision.asm new file mode 100644 index 0000000..18f9b80 --- /dev/null +++ b/data/tilesets/dark_cave_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll WALL, WALL, WALL, WALL ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 03 + tilecoll WALL, UP_WALL, WALL, FLOOR ; 04 + tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 05 + tilecoll UP_WALL, WALL, FLOOR, WALL ; 06 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 07 + tilecoll WALL, FLOOR, WALL, FLOOR ; 08 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09 + tilecoll FLOOR, WALL, FLOOR, WALL ; 0a + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 0b + tilecoll WALL, FLOOR, WALL, WALL ; 0c + tilecoll FLOOR, FLOOR, WALL, WALL ; 0d + tilecoll FLOOR, WALL, WALL, WALL ; 0e + tilecoll WATER, WATER, WATER, WATER ; 0f + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 10 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 11 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 12 + tilecoll FLOOR, FLOOR, WALL, CAVE ; 13 + tilecoll UP_WALL, UP_WALL, FLOOR, LADDER ; 14 + tilecoll UP_WALL, UP_WALL, FLOOR, LADDER ; 15 + tilecoll WALL, FLOOR, WALL, WARP_CARPET_DOWN ; 16 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 17 + tilecoll WALL, WALL, WALL, FLOOR ; 18 + tilecoll WALL, WALL, FLOOR, FLOOR ; 19 + tilecoll WALL, WALL, FLOOR, WALL ; 1a + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 1b + tilecoll WALL, FLOOR, WALL, FLOOR ; 1c + tilecoll WALL, WALL, WALL, WALL ; 1d + tilecoll FLOOR, WALL, FLOOR, WALL ; 1e + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 1f + tilecoll WALL, FLOOR, WALL, WALL ; 20 + tilecoll FLOOR, FLOOR, WALL, WALL ; 21 + tilecoll FLOOR, WALL, WALL, WALL ; 22 + tilecoll UP_WALL, WALL, FLOOR, FLOOR ; 23 + tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 24 + tilecoll WATER, WATER, WATER, WATER ; 25 + tilecoll WATER, WATER, WATER, WATER ; 26 + tilecoll WATER, WATER, WATER, WATER ; 27 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 28 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 29 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 2a + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 2b + tilecoll WATERFALL, WATERFALL, WATERFALL, WATERFALL ; 2c + tilecoll WALL, WALL, WALL, WALL ; 2d + tilecoll WALL, WALL, WALL, WALL ; 2e + tilecoll WALL, WALL, WALL, WALL ; 2f + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 30 + tilecoll WALL, WALL, WALL, WALL ; 31 + tilecoll WATER, WATER, WATER, WATER ; 32 + tilecoll WATER, WATER, WATER, WATER ; 33 + tilecoll WALL, WALL, WALL, WALL ; 34 + tilecoll FLOOR, WALL, FLOOR, WALL ; 35 + tilecoll FLOOR, WALL, FLOOR, WALL ; 36 + tilecoll WALL, WALL, WALL, CAVE ; 37 + tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 38 + tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 39 + tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 3a + tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 3b + tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 3c + tilecoll WATER, WATER, WATER, WATER ; 3d + tilecoll WATER, WATER, WATER, WATER ; 3e + tilecoll FLOOR, FLOOR, PIT, FLOOR ; 3f diff --git a/data/tilesets/dark_cave_metatiles.bin b/data/tilesets/dark_cave_metatiles.bin new file mode 100644 index 0000000..a41b5b0 --- /dev/null +++ b/data/tilesets/dark_cave_metatiles.bin @@ -0,0 +1,6 @@ +$$$$$$$$*+:;"#23%&&%&&&&&&&&&&&&&'&&&' +& +&  &&67&&67&&&&$$$$*+:;$$$$"#23     ()89       !01     $$&&&&    @@@@@@@@@@@@@@@@%&&&%&&&%&&&%&&&&&&&&&&&&&&&&&&&&&&'&&&'&&&'&&&'67&&67&&$$%&&'%' &&&&&&&&  +& +67'67&'&&&&&&&&&&&&%&&&&&&&&&&'&&&  +&&& \ No newline at end of file diff --git a/data/tilesets/elite_four_room_collision.asm b/data/tilesets/elite_four_room_collision.asm new file mode 100644 index 0000000..59b5d22 --- /dev/null +++ b/data/tilesets/elite_four_room_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 03 + tilecoll WALL, WALL, WALL, FLOOR ; 04 + tilecoll WALL, WALL, FLOOR, FLOOR ; 05 + tilecoll WALL, WALL, FLOOR, WALL ; 06 + tilecoll WALL, WALL, WALL, WALL ; 07 + tilecoll WALL, FLOOR, WALL, FLOOR ; 08 + tilecoll FLOOR, FLOOR, PIT, FLOOR ; 09 + tilecoll FLOOR, WALL, FLOOR, WALL ; 0a + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 0b + tilecoll WALL, FLOOR, WALL, WALL ; 0c + tilecoll FLOOR, FLOOR, WALL, WALL ; 0d + tilecoll FLOOR, WALL, WALL, WALL ; 0e + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 0f + tilecoll WALL, FLOOR, WALL, FLOOR ; 10 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 11 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 13 + tilecoll WALL, WALL, WALL, WALL ; 14 + tilecoll WALL, WALL, FLOOR, FLOOR ; 15 + tilecoll LADDER, LADDER, FLOOR, FLOOR ; 16 + tilecoll WALL, WALL, WALL, WALL ; 17 + tilecoll FLOOR, FLOOR, WALL, WALL ; 18 + tilecoll FLOOR, FLOOR, WALL, WALL ; 19 + tilecoll FLOOR, WALL, FLOOR, WALL ; 1a + tilecoll WALL, FLOOR, WALL, WALL ; 1b + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 1c + tilecoll WALL, FLOOR, WALL, FLOOR ; 1d + tilecoll FLOOR, WALL, FLOOR, WALL ; 1e + tilecoll WALL, WALL, WALL, WALL ; 1f + tilecoll WALL, FLOOR, WALL, FLOOR ; 20 + tilecoll WALL, WALL, FLOOR, FLOOR ; 21 + tilecoll WALL, WALL, FLOOR, FLOOR ; 22 + tilecoll WALL, WALL, FLOOR, FLOOR ; 23 + tilecoll WALL, WALL, WALL, WALL ; 24 + tilecoll FLOOR, WALL, FLOOR, WALL ; 25 + tilecoll WALL, FLOOR, WALL, FLOOR ; 26 + tilecoll WALL, WALL, WALL, WALL ; 27 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 28 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 29 + tilecoll WALL, WALL, WALL, WALL ; 2a + tilecoll WALL, WALL, WALL, WALL ; 2b + tilecoll WALL, WALL, WALL, WALL ; 2c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d + tilecoll ICE, ICE, ICE, FLOOR ; 2e + tilecoll ICE, ICE, FLOOR, ICE ; 2f + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 30 + tilecoll FLOOR, ICE, ICE, ICE ; 31 + tilecoll ICE, FLOOR, ICE, ICE ; 32 + tilecoll WALL, WALL, FLOOR, FLOOR ; 33 + tilecoll WALL, WALL, FLOOR, FLOOR ; 34 + tilecoll ICE, WALL, ICE, WALL ; 35 + tilecoll WALL, ICE, WALL, ICE ; 36 + tilecoll WALL, WALL, WALL, WALL ; 37 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38 + tilecoll ICE, ICE, ICE, ICE ; 39 + tilecoll WALL, FLOOR, FLOOR, WALL ; 3a + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 3b + tilecoll DOOR, DOOR, FLOOR, FLOOR ; 3c + tilecoll WALL, FLOOR, WALL, FLOOR ; 3d + tilecoll WALL, WALL, WALL, WALL ; 3e + tilecoll WALL, WALL, WALL, WALL ; 3f diff --git a/data/tilesets/elite_four_room_metatiles.bin b/data/tilesets/elite_four_room_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..a9df6062c4cafaf85d5fe1855c68762b52d49623 GIT binary patch literal 1024 zcmZQT1HmDY!N`~y2Vh}gVG$7#5wWvp=Ma|=mtf~$W)_!VW@hKGvj_2E+7Nt*3U&^N zdOLfFIy-xaJ{Zji1;WCNj6y<;jLgh185j*Q8Dbj9KA3)pxe!^9E*Kx866OvF52lKl zSxcLd(aM^U5k@0Sgs71R137s)2rUN@1(6Vw)YVkg&CN{BRn^tiOwG;B1fW1rP*4!$ z6&MX-gD_ffGl0ZE*wWI{k|~;r3B(3rVPRomAt6u*z+48QK`NLm7#W$EEG?s%n4&>y zK^PVv3W|)328N7`O3I9kM#dl+R1uK5ARG`75TK%>q7uynG7Ew&m>3zkd3fceWn|^` z^tr%3_VD!Z^z!!dhWSHFTT9!@8Wdt6vl$urV)^*^qGI@B_+q2@_@eljnH3b7nGFn? znU$28nT?E5dCbf(drhDKVhV_KaAah3at5&=SVxzU(Z&`%T$z|Gm@Gg6#l*w}qCnvW z!eE{SD0CpYVI(UXE1Rg8s2D4ohK8t^h6aoeVu3{b{23YJ;$f;88DZiub?Ev+!$QNt zBf=wKIzV=VaA06yU{Fv{5G$LOwy2nuHH_BMW@WRo78QfhF#q`YLJ|r{4>CsB3voBd zN1*t2akaE`a|ihn5?3y+jErvXjEv~?&"",-""<=&./&>? &&&&''''7777,-&<=&./&>?&&,-&<=&./&>?@AABPQQRPHIRS::T&&&@A&PQ&&AAABQQQREEFEUUVU + K +[EFEEUVUU K + [&PQ&S:&&QQQR:::T&&EFE;UVU;JKJ;Z[Z;6666666666666666AAABMMMN88889999""""""""#$$%WXXY""""@B""PRPRPRPRPR""23""CD&&&&""""""@B&PR&PR;;;;;;;;&&&&&&&&;;;;;;;;""""@B""PR&PR&PR&PR&PR&PR&PR&PR&PR@APRLM&&&&&@A&LM&&&&AB&MN&&&&&@B@APRLM&&&& &&@AABPHIR &&&&&&@B&PR&PR&PR&PR&&@BPR#$$%WXXY&&&&PRPRPRPR@B&PR&PR&PR&@AAALMMM&&&&AAABMMMN&&&&&@B&PR&PR&PR&&&&AAAAMMMM""""""""&&AAAAMMMM&&&&&PR&PR&PR&PR&@A&PQ&PQ&S:@AAALMMM88889999&PR&PRABPRMNPR""""""\]&^_&@B@APRLMPR&PR&AB@BMNPR&PR&PRPR&PR&PR@ALM&PR&PRABPRMN \ No newline at end of file diff --git a/data/tilesets/forest_collision.asm b/data/tilesets/forest_collision.asm new file mode 100644 index 0000000..0b9aa78 --- /dev/null +++ b/data/tilesets/forest_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll WATER, WATER, WATER, WATER ; 02 + tilecoll WATER, WATER, WATER, WATER ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll WALL, WALL, WALL, WALL ; 05 + tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 06 + tilecoll WATER, WATER, WATER, WATER ; 07 + tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, FLOOR ; 08 + tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, FLOOR ; 09 + tilecoll WATER, WATER, WATER, WATER ; 0a + tilecoll WATER, WATER, WATER, WATER ; 0b + tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, FLOOR ; 0c + tilecoll WATER, WATER, WATER, WATER ; 0d + tilecoll FLOOR, HEADBUTT_TREE, FLOOR, HEADBUTT_TREE ; 0e + tilecoll FLOOR, FLOOR, CUT_TREE, HEADBUTT_TREE ; 0f + tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 10 + tilecoll FLOOR, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 11 + tilecoll FLOOR, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 12 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 13 + tilecoll HEADBUTT_TREE, FLOOR, FLOOR, FLOOR ; 14 + tilecoll FLOOR, HEADBUTT_TREE, FLOOR, FLOOR ; 15 + tilecoll FLOOR, FLOOR, HEADBUTT_TREE, FLOOR ; 16 + tilecoll FLOOR, FLOOR, FLOOR, HEADBUTT_TREE ; 17 + tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 18 + tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 19 + tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 1a + tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 1b + tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 1c + tilecoll WALL, WALL, WALL, WALL ; 1d + tilecoll WALL, WALL, WALL, WALL ; 1e + tilecoll WALL, WALL, WALL, WALL ; 1f + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 20 + tilecoll WALL, WALL, WALL, WALL ; 21 + tilecoll WALL, WALL, WALL, WALL ; 22 + tilecoll WALL, WALL, WALL, WALL ; 23 + tilecoll WALL, WALL, WALL, DOOR ; 24 + tilecoll WALL, WALL, WALL, WALL ; 25 + tilecoll WALL, WALL, WALL, WALL ; 26 + tilecoll WALL, WALL, WALL, WALL ; 27 + tilecoll WALL, FLOOR, WALL, FLOOR ; 28 + tilecoll WALL, FLOOR, WALL, FLOOR ; 29 + tilecoll WALL, FLOOR, WALL, FLOOR ; 2a + tilecoll WALL, FLOOR, WALL, FLOOR ; 2b + tilecoll WALL, FLOOR, WALL, FLOOR ; 2c + tilecoll WALL, FLOOR, WALL, FLOOR ; 2d + tilecoll WALL, FLOOR, WALL, FLOOR ; 2e + tilecoll WALL, FLOOR, WALL, FLOOR ; 2f + tilecoll WALL, FLOOR, WALL, FLOOR ; 30 + tilecoll WALL, FLOOR, WALL, FLOOR ; 31 + tilecoll WALL, FLOOR, WALL, FLOOR ; 32 + tilecoll WALL, FLOOR, WALL, FLOOR ; 33 + tilecoll WALL, FLOOR, WALL, FLOOR ; 34 + tilecoll WALL, FLOOR, WALL, FLOOR ; 35 + tilecoll WALL, FLOOR, WALL, FLOOR ; 36 + tilecoll WALL, FLOOR, WALL, FLOOR ; 37 + tilecoll WALL, FLOOR, WALL, FLOOR ; 38 + tilecoll WALL, FLOOR, WALL, FLOOR ; 39 + tilecoll WALL, FLOOR, WALL, FLOOR ; 3a + tilecoll WALL, FLOOR, WALL, FLOOR ; 3b + tilecoll WALL, FLOOR, WALL, FLOOR ; 3c + tilecoll WALL, FLOOR, WALL, FLOOR ; 3d + tilecoll WALL, FLOOR, WALL, FLOOR ; 3e + tilecoll WALL, FLOOR, WALL, FLOOR ; 3f diff --git a/data/tilesets/forest_metatiles.bin b/data/tilesets/forest_metatiles.bin new file mode 100644 index 0000000..a8b82d8 --- /dev/null +++ b/data/tilesets/forest_metatiles.bin @@ -0,0 +1 @@ + ,-./<=>?**** ,-./<=>? ***&'&'6767&'67&'&'6767&'67&'67*** &'67&'67(9&'8:67&'67&'&'6767&'&'6767&'67&'&'6767&'67&'67&'67&'67)**********+** !!! !!! !!!!!!!!!!!!!!!!!!"!!!"!!!"02 !!!0111#$$$#$!!!!1111$$$$$$!!!"1112$$$%$%#$$$#$$$#$34#$$$#$$$#$$$3444$$$$$$$$$$$$4444$$$%$$$%$$$%4445 \ No newline at end of file diff --git a/data/tilesets/game_corner_collision.asm b/data/tilesets/game_corner_collision.asm new file mode 100644 index 0000000..9bcc3fe --- /dev/null +++ b/data/tilesets/game_corner_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll WALL, WALL, FLOOR, FLOOR ; 02 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03 + tilecoll WALL, WALL, FLOOR, FLOOR ; 04 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06 + tilecoll COUNTER, COUNTER, COUNTER, COUNTER ; 07 + tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 08 + tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 09 + tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 0a + tilecoll WALL, WALL, WALL, WALL ; 0b + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0c + tilecoll WALL, WALL, FLOOR, FLOOR ; 0d + tilecoll WALL, WALL, WALL, WALL ; 0e + tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll WALL, WALL, COUNTER, COUNTER ; 10 + tilecoll WALL, WALL, COUNTER, COUNTER ; 11 + tilecoll WALL, WALL, WALL, WALL ; 12 + tilecoll WALL, WALL, COUNTER, FLOOR ; 13 + tilecoll COUNTER, FLOOR, COUNTER, COUNTER ; 14 + tilecoll WALL, WALL, WALL, WALL ; 15 + tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 16 + tilecoll COUNTER, FLOOR, COUNTER, COUNTER ; 17 + tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 18 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 19 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1a + tilecoll FLOOR, COUNTER, COUNTER, COUNTER ; 1b + tilecoll WALL, WALL, FLOOR, COUNTER ; 1c + tilecoll FLOOR, WALL, FLOOR, WALL ; 1d + tilecoll WALL, FLOOR, WALL, FLOOR ; 1e + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 1f + tilecoll WALL, WALL, WALL, WALL ; 20 + tilecoll WALL, WALL, WALL, WALL ; 21 + tilecoll WALL, WALL, WALL, WALL ; 22 + tilecoll WALL, WALL, WALL, WALL ; 23 + tilecoll WALL, WALL, WALL, WALL ; 24 + tilecoll WALL, WALL, WALL, WALL ; 25 + tilecoll WALL, WALL, FLOOR, FLOOR ; 26 + tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 27 + tilecoll WALL, WALL, FLOOR, FLOOR ; 28 + tilecoll WALL, WALL, FLOOR, WALL ; 29 + tilecoll WALL, FLOOR, WALL, FLOOR ; 2a + tilecoll WALL, WALL, FLOOR, WALL ; 2b + tilecoll FLOOR, FLOOR, WALL, WALL ; 2c + tilecoll WALL, WALL, WALL, WALL ; 2d + tilecoll WALL, WALL, WALL, WALL ; 2e + tilecoll WALL, WALL, FLOOR, WALL ; 2f + tilecoll WALL, WALL, WALL, FLOOR ; 30 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f diff --git a/data/tilesets/game_corner_metatiles.bin b/data/tilesets/game_corner_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..24beba2d38c24405851e5fd8f072e6a6530f3698 GIT binary patch literal 1024 zcmdNz1B?QU0)j$(sVTdt(6q^zZ_rEO(xWsT-tU0+{c-y?y(zA*dRJA8eo&p_}c zbtH8(Z8U8x`7QZXR8>?#=CiOeF^PyW3W$gb3c=|XK0aGHIXOLEUVRxJ9$CA90Q(hw z{wv|~IMl=33A3Mzn~PgY8Wetzct8to21bF_HbJ4*Hae#Z^!!B-F{7Q6MN-P{_rVQ6MA~5wDB_Ztj9YVc{O0o}Lkrk&!XJzP@qM(b1ls zo?elWkx{WkR1aqIH4x@mkji8VvKcj$(s-O@=e#ufsfh}7Fg^Y}0`am=&>>=_X y{fq)2zKnvRtc-ynJU$@uon2hqJ-t%WGiQPLUENGfy?tEVv*$=jqlfo!=K}yUj)Hyw literal 0 HcmV?d00001 diff --git a/data/tilesets/gate_collision.asm b/data/tilesets/gate_collision.asm new file mode 100644 index 0000000..1a7501f --- /dev/null +++ b/data/tilesets/gate_collision.asm @@ -0,0 +1,64 @@ + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll WALL, WALL, FLOOR, FLOOR ; 02 + tilecoll WALL, WALL, WALL, WALL ; 03 + tilecoll DOOR, DOOR, FLOOR, FLOOR ; 04 + tilecoll WALL, WALL, WALL, WALL ; 05 + tilecoll WALL, WALL, FLOOR, FLOOR ; 06 + tilecoll WALL, WALL, FLOOR, FLOOR ; 07 + tilecoll COUNTER, COUNTER, COUNTER, FLOOR ; 08 + tilecoll COUNTER, COUNTER, FLOOR, COUNTER ; 09 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0a + tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 0b + tilecoll COUNTER, FLOOR, COUNTER, COUNTER ; 0c + tilecoll FLOOR, COUNTER, COUNTER, COUNTER ; 0d + tilecoll WALL, WALL, COUNTER, FLOOR ; 0e + tilecoll WALL, WALL, FLOOR, COUNTER ; 0f + tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 10 + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 11 + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 12 + tilecoll WALL, WALL, FLOOR, COUNTER ; 13 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 14 + tilecoll WALL, WALL, WALL, WALL ; 15 + tilecoll WALL, WALL, FLOOR, FLOOR ; 16 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 17 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 18 + tilecoll FLOOR, FLOOR, WALL, WALL ; 19 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1a + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 1b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1c + tilecoll WALL, WALL, FLOOR, FLOOR ; 1d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 20 + tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 21 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22 + tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 23 + tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 24 + tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 25 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 26 + tilecoll WALL, WALL, WALL, WALL ; 27 + tilecoll FLOOR, COUNTER, FLOOR, COUNTER ; 28 + tilecoll WALL, DOOR, FLOOR, FLOOR ; 29 + tilecoll DOOR, WALL, FLOOR, FLOOR ; 2a + tilecoll FLOOR, COUNTER, FLOOR, COUNTER ; 2b + tilecoll WALL, WALL, FLOOR, PC ; 2c + tilecoll WALL, WALL, FLOOR, FLOOR ; 2d + tilecoll DOOR, WALL, FLOOR, FLOOR ; 2e + tilecoll WALL, WALL, FLOOR, FLOOR ; 2f + tilecoll FLOOR, FLOOR, FLOOR, COUNTER ; 30 + tilecoll FLOOR, LADDER, FLOOR, FLOOR ; 31 + tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 32 + tilecoll COUNTER, FLOOR, FLOOR, WALL ; 33 + tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 34 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37 + tilecoll WALL, FLOOR, WALL, FLOOR ; 38 + tilecoll WALL, WALL, WALL, WALL ; 39 + tilecoll FLOOR, WALL, FLOOR, WALL ; 3a + tilecoll FLOOR, FLOOR, LADDER, FLOOR ; 3b + tilecoll FLOOR, FLOOR, COUNTER, FLOOR ; 3c + tilecoll WALL, WALL, FLOOR, FLOOR ; 3d + tilecoll COUNTER, COUNTER, FLOOR, COUNTER ; 3e + tilecoll FLOOR, COUNTER, COUNTER, COUNTER ; 3f diff --git a/data/tilesets/gate_metatiles.bin b/data/tilesets/gate_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..74076ff58b462183e07b7aba82eec54a06e49c92 GIT binary patch literal 1024 zcmZQT1B_@OCN?HkKtMo1P*6}1B&CD~n3$QEg@lEKamk}8$KY~sva?G_s;Ejx3JOX{ z3No^@b8xDt^6?7_Dkw5CN=Sn21Ys5y78Vf^5fKm@gxT5I*;Q1*`WQj_BqSkxh#n9R zWU7iP$o(9g0s=7eL3{xL4o;A5jDjF_5PdNB$HemR3JA!^BKTa~0s>Of2tFu0p!z{J zL&F8+CJ<(2Lxm9g5a9<>gNB_M8J(ROot<5rolQ(!kbsGvzKIhfBcqcOBcqFx6QhZV zlanhHz{11L&B4*l&CcG*$;5=w$;nkqTSwQ*+Q!zz#KZ)o)WOl+-Ok?K-NeM%+11$@ zY8oTRSg{v zUoak8a${g*#gv57DEEBVU03tmxF~`IT2_uIeC`}+RBz!$Q1qHpl85#Zj z#Z5u+gHX@JEN+UdA3eRoT+7JF!OqC2qRPk^5Xi_F6buswxej7mNT`HlSU89cQpLz< zVadoSDh5e=f}oTD#*B<1p^S`S;RqUH5=<0b9ApYB8zUnKi;6KaLi{5jU}0%tDJljM nL017WFCvnWF)A9u29fNX5Z9yo7m}YKsUMOzAYl#3bt#H^++By6S+8iboC4jM#c;b28N7`AS@@3<~#wA2_VeE!ongVA|k@X z%&IRWY-0ry17UqpCT1&ZAz=_3gc%rg^%xjz?Lcg7*ujy3K|#?--O1TZUrye}3gkU? zV+IC&OGZX3Yeq%}1`kgLhKNX*UQcfZhNx%;1{fbftEn?Gy1B#n>Y9vcJwJjlHa3=WQrj0%d3 zj84uFJ`XP=ql_#gBPc#}_1M^L?Zm`EJVr)!b#--p5KvOq*AEKT*H<+K@xa*1%E}56 z@1VFh(}%@7$S)ww#B8PyNf)g8Ab0CqLed4y-9EmIj4`n=*MaRbwz4v_WMssS%{9z5 zEbJ}(82ur77#Lh!L4JVn7#YFxeirtOj1U!2z8_3pOIu4jBs4BQBveZ~E literal 0 HcmV?d00001 diff --git a/data/tilesets/ice_path_collision.asm b/data/tilesets/ice_path_collision.asm new file mode 100644 index 0000000..3621269 --- /dev/null +++ b/data/tilesets/ice_path_collision.asm @@ -0,0 +1,64 @@ + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 00 + tilecoll WALL, WALL, WALL, WALL ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 03 + tilecoll WALL, UP_WALL, WALL, FLOOR ; 04 + tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 05 + tilecoll UP_WALL, WALL, FLOOR, WALL ; 06 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 07 + tilecoll WALL, FLOOR, WALL, FLOOR ; 08 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09 + tilecoll FLOOR, WALL, FLOOR, WALL ; 0a + tilecoll WALL, WALL, WALL, WALL ; 0b + tilecoll WALL, FLOOR, WALL, WALL ; 0c + tilecoll FLOOR, FLOOR, WALL, WALL ; 0d + tilecoll FLOOR, WALL, WALL, WALL ; 0e + tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 10 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 11 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 12 + tilecoll FLOOR, FLOOR, WALL, CAVE ; 13 + tilecoll WALL, WALL, WALL, FLOOR ; 14 + tilecoll WALL, WALL, FLOOR, FLOOR ; 15 + tilecoll WALL, WALL, FLOOR, WALL ; 16 + tilecoll FLOOR, FLOOR, PIT, FLOOR ; 17 + tilecoll WALL, FLOOR, WALL, FLOOR ; 18 + tilecoll WALL, WALL, WALL, WALL ; 19 + tilecoll FLOOR, WALL, FLOOR, WALL ; 1a + tilecoll FLOOR, PIT, FLOOR, FLOOR ; 1b + tilecoll WALL, FLOOR, WALL, WALL ; 1c + tilecoll FLOOR, FLOOR, WALL, WALL ; 1d + tilecoll FLOOR, WALL, WALL, WALL ; 1e + tilecoll ICE, ICE, ICE, ICE ; 1f + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 20 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 21 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 22 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 23 + tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 24 + tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 25 + tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 26 + tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 27 + tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 28 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 29 + tilecoll WALL, WALL, WALL, WALL ; 2a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b + tilecoll WALL, ICE, ICE, ICE ; 2c + tilecoll ICE, ICE, WALL, ICE ; 2d + tilecoll ICE, WALL, ICE, ICE ; 2e + tilecoll ICE, ICE, ICE, WALL ; 2f + tilecoll WALL, WALL, FLOOR, WALL ; 30 + tilecoll WALL, WALL, WALL, WALL ; 31 + tilecoll WALL, WALL, WALL, FLOOR ; 32 + tilecoll WALL, WALL, FLOOR, FLOOR ; 33 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 34 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 36 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 37 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 38 + tilecoll WALL, FLOOR, WALL, FLOOR ; 39 + tilecoll FLOOR, WALL, FLOOR, WALL ; 3a + tilecoll WALL, WALL, WALL, WALL ; 3b + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 3c + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 3d + tilecoll FLOOR, FLOOR, WALL, WALL ; 3e + tilecoll ICE, ICE, ICE, LADDER ; 3f diff --git a/data/tilesets/ice_path_metatiles.bin b/data/tilesets/ice_path_metatiles.bin new file mode 100644 index 0000000..c92246e --- /dev/null +++ b/data/tilesets/ice_path_metatiles.bin @@ -0,0 +1,3 @@ + + *+:;Өʚʛ śժժū՚Ū՚ŪŚՙȺ͘BC  ǒׂǒǂגǂגRRRRSS(S >8(TRRRR,--.IJHKRRRRS)SS9? V)RRRRSSSS  >TLM \]XYZ[8//9WGGGU? NO^_  + *+:;ɾ͈&' 67EF   4444444444444444 \ No newline at end of file diff --git a/data/tilesets/johto_collision.asm b/data/tilesets/johto_collision.asm new file mode 100644 index 0000000..8da65db --- /dev/null +++ b/data/tilesets/johto_collision.asm @@ -0,0 +1,128 @@ + tilecoll 01, 01, 01, 01 ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll WALL, WALL, WALL, WALL ; 05 + tilecoll LADDER, LADDER, LADDER, LADDER ; 06 + tilecoll WHIRLPOOL, BUOY, WATER, BUOY ; 07 + tilecoll WALL, WALL, WALL, WALL ; 08 + tilecoll WALL, WALL, WALL, WALL ; 09 + tilecoll WALL, WALL, WALL, WALL ; 0a + tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 0b + tilecoll FLOOR, FLOOR, WALL, WARP_CARPET_DOWN ; 0c + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WALL ; 0d + tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 0e + tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll WALL, WALL, WALL, WALL ; 10 + tilecoll WALL, WALL, WALL, WALL ; 11 + tilecoll WALL, WALL, WALL, WALL ; 12 + tilecoll WALL, WALL, WALL, WALL ; 13 + tilecoll WALL, WALL, WALL, DOOR ; 14 + tilecoll WALL, WALL, WALL, WALL ; 15 + tilecoll WALL, WALL, WALL, DOOR ; 16 + tilecoll WALL, WALL, WALL, WALL ; 17 + tilecoll WALL, WALL, WALL, WALL ; 18 + tilecoll WALL, WALL, WALL, WALL ; 19 + tilecoll WALL, WALL, WALL, DOOR ; 1a + tilecoll WALL, WALL, WALL, WALL ; 1b + tilecoll WALL, WALL, WALL, WALL ; 1c + tilecoll WALL, WALL, DOOR, WALL ; 1d + tilecoll WALL, WALL, WALL, WALL ; 1e + tilecoll WALL, WALL, WALL, WALL ; 1f + tilecoll WALL, WALL, WALL, WALL ; 20 + tilecoll WALL, WALL, WALL, WALL ; 21 + tilecoll WALL, WALL, WALL, WALL ; 22 + tilecoll WALL, WALL, WALL, WALL ; 23 + tilecoll WALL, WALL, WALL, WALL ; 24 + tilecoll WALL, WALL, WALL, WALL ; 25 + tilecoll WALL, WALL, WALL, WALL ; 26 + tilecoll WALL, WALL, DOOR, WALL ; 27 + tilecoll WALL, WALL, WALL, DOOR ; 28 + tilecoll WALL, WALL, WALL, WALL ; 29 + tilecoll HEADBUTT_TREE, HEADBUTT_TREE, WALL, WALL ; 2a + tilecoll WALL, WALL, WALL, WALL ; 2b + tilecoll HEADBUTT_TREE, HEADBUTT_TREE, WALL, WALL ; 2c + tilecoll HEADBUTT_TREE, HEADBUTT_TREE, WALL, WALL ; 2d + tilecoll WALL, WALL, WALL, DOOR ; 2e + tilecoll WALL, WALL, WALL, WALL ; 2f + tilecoll BUOY, BUOY, BUOY, WATER ; 30 + tilecoll BUOY, BUOY, WATER, WATER ; 31 + tilecoll BUOY, BUOY, WATER, BUOY ; 32 + tilecoll FLOOR, FLOOR, WALL, WALL ; 33 + tilecoll BUOY, WATER, BUOY, WATER ; 34 + tilecoll WATER, WATER, WATER, WATER ; 35 + tilecoll WATER, BUOY, WATER, BUOY ; 36 + tilecoll WALL, WALL, WALL, DOOR ; 37 + tilecoll BUOY, WATER, BUOY, BUOY ; 38 + tilecoll WATER, WATER, BUOY, BUOY ; 39 + tilecoll WATER, BUOY, BUOY, BUOY ; 3a + tilecoll WALL, WALL, WALL, WALL ; 3b + tilecoll HEADBUTT_TREE, FLOOR, FLOOR, FLOOR ; 3c + tilecoll FLOOR, HEADBUTT_TREE, FLOOR, FLOOR ; 3d + tilecoll FLOOR, FLOOR, HEADBUTT_TREE, FLOOR ; 3e + tilecoll FLOOR, FLOOR, FLOOR, HEADBUTT_TREE ; 3f + tilecoll WALL, WALL, WALL, FLOOR ; 40 + tilecoll WALL, WALL, FLOOR, FLOOR ; 41 + tilecoll WALL, WALL, FLOOR, WALL ; 42 + tilecoll WATER, WATER, WATER, WATER ; 43 + tilecoll WALL, FLOOR, WALL, FLOOR ; 44 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 45 + tilecoll FLOOR, WALL, FLOOR, WALL ; 46 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 47 + tilecoll WALL, FLOOR, WALL, WALL ; 48 + tilecoll FLOOR, FLOOR, WALL, WALL ; 49 + tilecoll FLOOR, WALL, WALL, WALL ; 4a + tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 4b + tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 4c + tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 4d + tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 4e + tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 4f + tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 50 + tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 51 + tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 52 + tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 53 + tilecoll WATER, WATER, WATER, WATER ; 54 + tilecoll WATER, WATER, WATER, WATER ; 55 + tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 56 + tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 57 + tilecoll WATER, WATER, WATER, WATER ; 58 + tilecoll WATER, WATER, WATER, WATER ; 59 + tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 5a + tilecoll HEADBUTT_TREE, CUT_TREE, FLOOR, FLOOR ; 5b + tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, FLOOR ; 5c + tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, FLOOR ; 5d + tilecoll HEADBUTT_TREE, HEADBUTT_TREE, FLOOR, HEADBUTT_TREE ; 5e + tilecoll FLOOR, HEADBUTT_TREE, FLOOR, CUT_TREE ; 5f + tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, FLOOR ; 60 + tilecoll HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 61 + tilecoll FLOOR, HEADBUTT_TREE, FLOOR, HEADBUTT_TREE ; 62 + tilecoll FLOOR, FLOOR, CUT_TREE, HEADBUTT_TREE ; 63 + tilecoll HEADBUTT_TREE, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 64 + tilecoll FLOOR, FLOOR, HEADBUTT_TREE, HEADBUTT_TREE ; 65 + tilecoll FLOOR, HEADBUTT_TREE, HEADBUTT_TREE, HEADBUTT_TREE ; 66 + tilecoll CUT_TREE, FLOOR, HEADBUTT_TREE, FLOOR ; 67 + tilecoll WALL, FLOOR, WALL, FLOOR ; 68 + tilecoll FLOOR, WALL, FLOOR, WALL ; 69 + tilecoll WALL, UP_WALL, WALL, FLOOR ; 6a + tilecoll UP_WALL, WALL, FLOOR, WALL ; 6b + tilecoll WALL, FLOOR, WALL, WALL ; 6c + tilecoll FLOOR, WALL, WALL, WALL ; 6d + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 6e + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 6f + tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 70 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 71 + tilecoll FLOOR, FLOOR, WALL, WALL ; 72 + tilecoll FLOOR, FLOOR, CAVE, WALL ; 73 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 74 + tilecoll WALL, WALL, FLOOR, FLOOR ; 75 + tilecoll WATER, WATER, WATER, WATER ; 76 + tilecoll WALL, WALL, DOOR, WALL ; 77 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 78 + tilecoll WATER, WATER, WATER, WATER ; 79 + tilecoll WATER, WATER, WATER, WATER ; 7a + tilecoll WALL, WALL, WALL, WALL ; 7b + tilecoll WALL, WALL, WALL, WALL ; 7c + tilecoll WALL, WALL, WALL, WALL ; 7d + tilecoll WALL, WALL, WALL, WALL ; 7e + tilecoll WALL, WALL, WALL, WALL ; 7f diff --git a/data/tilesets/johto_metatiles.bin b/data/tilesets/johto_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..9024f2ad6c761ca47759645ed12017236ed7e208 GIT binary patch literal 2048 zcmZQT18iu36%DYU0kAYPD>E}IGngqSFDI|34}o^}cJ}OOz{ofv!pS)zLPP|D4b9BV z96dZdKsYccD9Fsr%*4aP!v%zcf`US{b#!#CZES2o*xSd)*TI2}4H?6n8x`f?5E%)Q zfrvObKtxbgJ2Jta z=jG$$17VOoApLxNeEc8`G6!S_1f%Nb;DqQ0o2{lM4WdErQ&y1%19J;$X-g|6CXhR% z)zoA_G{`-If`Wp4P{7U2&23|2W3yo4qQx6FZrZ$J<*L;n{*tB3mT%d*ZTp(F>()C4 z2M2@VMagl>)PTUCpy1$O7f`%Ro#vt%6ciE)6Nk|-aTpELFEwTAwCOWu%m@w+4h{+m z3R2gYGF4M+#tfJ~YbkXN>*<}$=J@AG1C^5o`88cw= zhQYzXAiH4v;NV~rkXu1wAooj6Ro9q4LsJVR26q3{X)-fr%$OMg2e1?g5fFg_2oI80 zK`OwBoRyUo7LEuRkStUa3Wcg-$Ie~5=L7}?S~1BqSHHu|fGDDKPf*^z?+e z5k!Lpp?X1VKYup1xOkXuFbxuhV~|@Q*w3GpH7*_|0ksF+UJxIw1SSvB3n6`cSXr&v z*w~OU8ylM~GPY)AWktrUtgN=k7+J5kkB<+sULPMHUu3-?d1SpH`4}G`A6pR-5g7LI z@re}?5wV70a0oyNA0Lp5A#MkeAU;eVjE3oh(NL{m3gkLDd0|mIdskVIeh`MGcSvlq zvcmWvIS@wh5h@_*Ls*oR)m0W<6s8_VgG_{|hp7aa%E~G%DktwMYiAD=MW~0!Blr*% zFh0aqgsIlnHa5uE#>Unb1#9c*Xd|i7(b2WBv9Z;Kse$YD_VEG54@}(0$JZ7VKcMmq zgnfK$Y<#RiEEoof*!t+`=;**i@X?^S0%4dMH+LVOuy7wAQ2O!qnKcU>K@b9LFNDd) z2GRq{Col{yoTa6uVdXPS9UB`Y=lH@DB4}>}Q$)nf%*@OK3P9x`sN6@!pmH7=H#9aj iHn&V}?dE}IGngqSFDEZ73W0X^cJ}&c0Aw8-h+u$_hDJt4j&5#l zARHJJ6l7#%Wa8%L<^sY&K|vwfIy$=6Ha4~(?Cs;@>)^n^0Ksfv8e|m6q^Kwdhsa2f z3N8v$IR7sj-7-MkXdEc6N3db~QB_5Y5EIBqksz zD9FXl%`GJ@Ee(J6cfz4J^lLpZs_bIDLgMqn)v^2qEvC>tE0 zriMYo+^?plrUqi)xpU{v&6_uFm|NVuX=!!;K9WAg05vr=ka@BO#=)|RvcYOU$CiZK(MK)f+`yuNFUfu zin759in6Mp^a)Cr;Ka(x${GO&A|eqHAPf-@fdU8*A_I~IxfO&ZBq8CCkO9d;HK9-F~W@j=$>U5O!_-t$i4rOCwgQbHjSM~2*yM9j}LhI`b2nq^uadY!XNlVKx zGBJr+Tie(mV;dV=TV%|tt)rujq((2@| NGmvr+4YCWJ1^@||NgMzG literal 0 HcmV?d00001 diff --git a/data/tilesets/kabuto_word_room_collision.asm b/data/tilesets/kabuto_word_room_collision.asm new file mode 100644 index 0000000..58bdacc --- /dev/null +++ b/data/tilesets/kabuto_word_room_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13 + tilecoll WALL, WALL, WALL, FLOOR ; 14 + tilecoll WALL, WALL, FLOOR, FLOOR ; 15 + tilecoll WALL, WALL, FLOOR, FLOOR ; 16 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 17 + tilecoll WALL, WALL, FLOOR, FLOOR ; 18 + tilecoll WALL, WALL, FLOOR, WALL ; 19 + tilecoll WALL, FLOOR, WALL, FLOOR ; 1a + tilecoll FLOOR, WALL, FLOOR, WALL ; 1b + tilecoll FLOOR, FLOOR, FLOOR, PIT ; 1c + tilecoll WALL, WALL, WALL, WALL ; 1d + tilecoll WALL, WALL, WALL, WALL ; 1e + tilecoll WALL, WALL, WALL, WALL ; 1f + tilecoll WALL, WALL, WALL, WALL ; 20 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 21 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 25 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f diff --git a/data/tilesets/kabuto_word_room_metatiles.bin b/data/tilesets/kabuto_word_room_metatiles.bin new file mode 100644 index 0000000..14d082e --- /dev/null +++ b/data/tilesets/kabuto_word_room_metatiles.bin @@ -0,0 +1,17 @@ +ɼͬݼÆӖŎ՞ÈӘØǎמ  +  +  +  !"#@ABC 89 +  +  + +  +  +  +  +  +  +  + TVXY  + C 6!@ #8 + 6"7Ř \ No newline at end of file diff --git a/data/tilesets/kanto_collision.asm b/data/tilesets/kanto_collision.asm new file mode 100644 index 0000000..275c2b0 --- /dev/null +++ b/data/tilesets/kanto_collision.asm @@ -0,0 +1,128 @@ + tilecoll CUT_TREE, CUT_TREE, CUT_TREE, CUT_TREE ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll WALL, WALL, WALL, DOOR ; 02 + tilecoll WALL, WALL, WALL, WALL ; 03 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 04 + tilecoll LADDER, LADDER, LADDER, LADDER ; 05 + tilecoll FLOOR, FLOOR, CAVE, WALL ; 06 + tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 07 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 08 + tilecoll WALL, WALL, WALL, WALL ; 09 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a + tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 0b + tilecoll WALL, WALL, WALL, WALL ; 0c + tilecoll WALL, WALL, WALL, WALL ; 0d + tilecoll WALL, WALL, WALL, WALL ; 0e + tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll WALL, WALL, WALL, WALL ; 10 + tilecoll WALL, WALL, WALL, WALL ; 11 + tilecoll WALL, WALL, DOOR, WALL ; 12 + tilecoll WALL, WALL, WALL, WALL ; 13 + tilecoll WALL, WATER, WALL, WALL ; 14 + tilecoll WATER, WALL, WALL, WALL ; 15 + tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 16 + tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 17 + tilecoll WALL, WATER, WALL, WATER ; 18 + tilecoll WATER, WALL, WATER, WALL ; 19 + tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 1a + tilecoll WALL, FLOOR, WALL, FLOOR ; 1b + tilecoll FLOOR, FLOOR, WALL, WALL ; 1c + tilecoll WATER, WATER, WATER, WATER ; 1d + tilecoll WATER, WATER, WATER, WATER ; 1e + tilecoll WATER, WATER, WATER, WATER ; 1f + tilecoll WALL, WALL, WALL, WALL ; 20 + tilecoll WALL, WALL, WALL, WALL ; 21 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23 + tilecoll WALL, FLOOR, WALL, WALL ; 24 + tilecoll FLOOR, WALL, WALL, WALL ; 25 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27 + tilecoll WALL, FLOOR, WALL, FLOOR ; 28 + tilecoll FLOOR, WALL, FLOOR, WALL ; 29 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 2a + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 2b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c + tilecoll WATER, WATER, WATER, WATER ; 2d + tilecoll WATER, WATER, WATER, WATER ; 2e + tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 2f + tilecoll WALL, WALL, WALL, WALL ; 30 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 + tilecoll WALL, CUT_TREE, WALL, FLOOR ; 32 + tilecoll WALL, WALL, FLOOR, CUT_TREE ; 33 + tilecoll CUT_TREE, FLOOR, WALL, WALL ; 34 + tilecoll FLOOR, CUT_TREE, WALL, FLOOR ; 35 + tilecoll WALL, WALL, FLOOR, WALL ; 36 + tilecoll WALL, WALL, WALL, WALL ; 37 + tilecoll FLOOR, FLOOR, WALL, WALL ; 38 + tilecoll FLOOR, FLOOR, WALL, WALL ; 39 + tilecoll WALL, WALL, DOOR, WALL ; 3a + tilecoll UP_WALL, WALL, FLOOR, WALL ; 3b + tilecoll WALL, WALL, WALL, DOOR ; 3c + tilecoll WALL, WALL, WALL, WALL ; 3d + tilecoll WALL, UP_WALL, WALL, FLOOR ; 3e + tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 3f + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 40 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 41 + tilecoll HOP_DOWN, WALL, WALL, WALL ; 42 + tilecoll WATER, WATER, WATER, WATER ; 43 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 44 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 45 + tilecoll FLOOR, FLOOR, WALL, WARP_CARPET_DOWN ; 46 + tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 47 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 48 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 49 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WALL ; 4a + tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 4b + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 4c + tilecoll FLOOR, WALL, FLOOR, WALL ; 4d + tilecoll WALL, FLOOR, WALL, FLOOR ; 4e + tilecoll FLOOR, WALL, WALL, WALL ; 4f + tilecoll WALL, FLOOR, WALL, WALL ; 50 + tilecoll WALL, WALL, FLOOR, FLOOR ; 51 + tilecoll FLOOR, FLOOR, WALL, WALL ; 52 + tilecoll WALL, WALL, WALL, DOOR ; 53 + tilecoll WALL, WALL, WALL, WALL ; 54 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 55 + tilecoll FLOOR, FLOOR, WALL, WALL ; 56 + tilecoll FLOOR, FLOOR, WALL, WALL ; 57 + tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 58 + tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 59 + tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 5a + tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 5b + tilecoll FLOOR, HOP_DOWN, FLOOR, WALL ; 5c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 5e + tilecoll FLOOR, WALL, FLOOR, WALL ; 5f + tilecoll FLOOR, WALL, CUT_TREE, WALL ; 60 + tilecoll FLOOR, FLOOR, WALL, WALL ; 61 + tilecoll WALL, WALL, WALL, FLOOR ; 62 + tilecoll WALL, WALL, FLOOR, WALL ; 63 + tilecoll WATER, WATER, WATER, WATER ; 64 + tilecoll WATER, WATER, WATER, WATER ; 65 + tilecoll WALL, WALL, WALL, WALL ; 66 + tilecoll WALL, WATER, WALL, WATER ; 67 + tilecoll WALL, WALL, WALL, WALL ; 68 + tilecoll WALL, WALL, WALL, WALL ; 69 + tilecoll WATER, WALL, WATER, WALL ; 6a + tilecoll WATER, WATER, WALL, WALL ; 6b + tilecoll WALL, WALL, FLOOR, FLOOR ; 6c + tilecoll WALL, FLOOR, WALL, FLOOR ; 6d + tilecoll FLOOR, WALL, FLOOR, WALL ; 6e + tilecoll FLOOR, FLOOR, WALL, WALL ; 6f + tilecoll FLOOR, WALL, CAVE, WALL ; 70 + tilecoll WALL, WALL, WALL, WALL ; 71 + tilecoll WALL, WALL, WALL, WALL ; 72 + tilecoll WALL, WALL, WALL, WALL ; 73 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 74 + tilecoll WALL, WALL, WALL, WALL ; 75 + tilecoll WALL, WALL, WALL, WALL ; 76 + tilecoll FLOOR, FLOOR, WALL, WALL ; 77 + tilecoll WATER, WATER, WATER, WATER ; 78 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 79 + tilecoll WALL, WALL, WALL, WALL ; 7a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 7b + tilecoll WALL, WALL, WALL, DOOR ; 7c + tilecoll WALL, WALL, WALL, WALL ; 7d + tilecoll WALL, WALL, WALL, WALL ; 7e + tilecoll WALL, WALL, WALL, WALL ; 7f diff --git a/data/tilesets/kanto_metatiles.bin b/data/tilesets/kanto_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..41b0cfffd435a479a313984a5191fe86e76040ac GIT binary patch literal 2048 zcmZQT1Io(E%9bDkj4hQ}+1S}d#l*!`)wp?NrKDxp**Q4H#U&)UxHL4Sq@-*>%0TM< zp}-pr2tt8}r@47Vq`A2c5->M6H@AcXH+M_RuyA&Ec6M=badBlME@dexDJdl7U}g{+ zU}Xyq7PSx(0%I|8@!;U#U?C^~nG+n$!6_tUAqm1DcRM&bI0gg;1j1-lH7+iGB_$<( zE-o%vDJdx>eS0Mk;Ns%q0@)Apr;?JAJU0)QytIszjh42Sww1M&HG&oqv9cBsf$>2s zkO++L@2{+kz>tu#L=w@`2C0VW5)nbLATsdav9z=Vg%=;6vT|ssvNDW@g+I(bV-OG# z5iy2gV`C6AL_|acjG@vXi@?~&&(AL^E-ns)W8&lE{rvoVq1>qW`1n{wWn}?nCY&5|(GM~Mf)6ucDgOHfwnCc-S{6<_{{NCQ) zAPlk(6po-&0doh856fpp-rh!_EXB>k#U(8xCB?|dBq%7T!UPE$6%|!ABc&K|adCbn zNd7c3($Ewa7mwxQQj!PdPeD0GMmePLWn^SzgoPD|*3#C|v9g8+2oi-5hqxQ$LvxdW zKv+1!Xyo`+R8UX=r4d+qfp8(^iI%p%zm>JWzojLw3NnVO0VffVUXU4J4#W^eSa|sR zLrg%{Yi4e40&_CVl{z{wmqTa>i4cXcVEF|hkD9Mx=E7*0dM;>ua2av)NJ&Y{`1$$y z#X&)Qe0+Q~8UUps5a#1^a}Ny-3kQWc2!rx62&?Pp=pbVq9UT>9j4TJrU&wNx`~@-_ zhFMt5%oVZZF<5>B$stM(NC^UpS5V5<)pKyPwF?M@nFaGNf`+6M7#|jnuyO@PgYp|P zHsaFIgp{8~(DKvR7*bwB$~}HABO_2=;5Xs|(?(oI^4{Lw@?1t-VA|LiQVt@@MM%nn zxdV|OAu$C@2QV7uKLia^2dM{O`N+f5L?t59+yq*62!ZMjXgvUShm*6nyqA}h4Hp;0 zT`sN=KG-y79cE@7W-t?64}t0a7B0ug$fPbPr~<;E^p22+sN?4{f|e(c{Lf{?#RV!aKp0ei U!NL<1rl9h`h|35p&t(Lm0S3QQJOBUy literal 0 HcmV?d00001 diff --git a/data/tilesets/lab_collision.asm b/data/tilesets/lab_collision.asm new file mode 100644 index 0000000..b3aa6ef --- /dev/null +++ b/data/tilesets/lab_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 02 + tilecoll WALL, WALL, WALL, WALL ; 03 + tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 04 + tilecoll WALL, WALL, FLOOR, FLOOR ; 05 + tilecoll FLOOR, FLOOR, WALL, WALL ; 06 + tilecoll FLOOR, FLOOR, WALL, WALL ; 07 + tilecoll WALL, WALL, WALL, WALL ; 08 + tilecoll WINDOW, WALL, FLOOR, FLOOR ; 09 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c + tilecoll WALL, WALL, FLOOR, FLOOR ; 0d + tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 0e + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 0f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10 + tilecoll WALL, WALL, FLOOR, FLOOR ; 11 + tilecoll WALL, WALL, FLOOR, FLOOR ; 12 + tilecoll WALL, WALL, FLOOR, FLOOR ; 13 + tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 14 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 15 + tilecoll WALL, WALL, FLOOR, FLOOR ; 16 + tilecoll WALL, WALL, WALL, WALL ; 17 + tilecoll WALL, WALL, FLOOR, FLOOR ; 18 + tilecoll FLOOR, LADDER, FLOOR, FLOOR ; 19 + tilecoll FLOOR, WALL, FLOOR, WALL ; 1a + tilecoll WALL, FLOOR, WALL, FLOOR ; 1b + tilecoll WALL, WALL, FLOOR, FLOOR ; 1c + tilecoll WALL, FLOOR, WALL, FLOOR ; 1d + tilecoll FLOOR, WALL, FLOOR, WALL ; 1e + tilecoll FLOOR, FLOOR, WALL, WALL ; 1f + tilecoll WINDOW, WINDOW, FLOOR, FLOOR ; 20 + tilecoll FLOOR, FLOOR, WALL, WALL ; 21 + tilecoll WALL, WALL, WALL, WALL ; 22 + tilecoll WALL, WALL, WALL, WALL ; 23 + tilecoll WALL, WALL, WALL, WALL ; 24 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 25 + tilecoll WALL, WALL, WALL, WALL ; 26 + tilecoll WALL, WALL, WALL, WALL ; 27 + tilecoll WALL, WALL, WALL, WALL ; 28 + tilecoll WALL, WALL, FLOOR, FLOOR ; 29 + tilecoll WALL, WALL, FLOOR, FLOOR ; 2a + tilecoll WALL, WALL, FLOOR, FLOOR ; 2b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 2e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f diff --git a/data/tilesets/lab_metatiles.bin b/data/tilesets/lab_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..62da01e8b79d9335e4f8e89e7a47341e89029901 GIT binary patch literal 1024 zcmZQT0|Gbz6B84YkdTlNnsNqKc2;&~76=p;5fhLw$tO;k)w3?|OT z&c`n%E+@~($jB%tC@9Fq&BH4tEhDR-sHALQXk-jir>dr=24jP0HFXe)z^ZDfA~5q{ zDpcTriAhC8NC?J7<-tT%R7`aB^h|8+>`Y8dOhBS~dio}IcJ?4Hm=9(^36MOp|4q$I z%~Vua*;Q18ML=>Otfj53V`Xh^s4vx{p`a7d_|ySrytctj-3y#fMW z-U0$q(FneeuYf>Itbl-@zkonoJStB>z#Ix->dnnTVhD_2!DJvRq1wz96crQ=3=Iq+ zq9C%ht+A=OW#XjCQx+~-yriSEvwgt=o6H_U_vcQs2?t(>`PNoarli`<8djod+>* z=B()}R<2qOG76;s?78z@UH9&TxLsiV8k!zm7M5WChK-vxA2@jE@P&()E^pboZTq@) b>(;GbzkdDNwQJXc6+j7C`u#r&P(lCzNxsq* literal 0 HcmV?d00001 diff --git a/data/tilesets/lighthouse_collision.asm b/data/tilesets/lighthouse_collision.asm new file mode 100644 index 0000000..81781fa --- /dev/null +++ b/data/tilesets/lighthouse_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll WALL, WALL, WALL, WALL ; 01 + tilecoll WALL, WALL, WALL, WALL ; 02 + tilecoll WALL, WALL, WALL, WALL ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll WALL, WALL, WALL, WALL ; 05 + tilecoll FLOOR, FLOOR, WALL, WALL ; 06 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08 + tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 09 + tilecoll WALL, WALL, FLOOR, FLOOR ; 0a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b + tilecoll WALL, WALL, WALL, WALL ; 0c + tilecoll WALL, WALL, WALL, WALL ; 0d + tilecoll WALL, WALL, WALL, WALL ; 0e + tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll 9C, FLOOR, COUNTER, FLOOR ; 10 + tilecoll WALL, WALL, WALL, WALL ; 11 + tilecoll WALL, WALL, WALL, WALL ; 12 + tilecoll WALL, WALL, WALL, WALL ; 13 + tilecoll WALL, WARP_CARPET_DOWN, WALL, WALL ; 14 + tilecoll WALL, WALL, WALL, WALL ; 15 + tilecoll 9C, FLOOR, COUNTER, FLOOR ; 16 + tilecoll WALL, WALL, WALL, WALL ; 17 + tilecoll FLOOR, WALL, FLOOR, WALL ; 18 + tilecoll WALL, WALL, WALL, STAIRCASE ; 19 + tilecoll LADDER, FLOOR, FLOOR, FLOOR ; 1a + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 1b + tilecoll WALL, WALL, WALL, WALL ; 1c + tilecoll WALL, WALL, FLOOR, FLOOR ; 1d + tilecoll WALL, WALL, WALL, WALL ; 1e + tilecoll WALL, WALL, WALL, WALL ; 1f + tilecoll WALL, FLOOR, WALL, FLOOR ; 20 + tilecoll FLOOR, WALL, FLOOR, WALL ; 21 + tilecoll WALL, FLOOR, WALL, WALL ; 22 + tilecoll FLOOR, WALL, WALL, WALL ; 23 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24 + tilecoll FLOOR, FLOOR, WALL, WALL ; 25 + tilecoll WALL, WALL, WALL, WALL ; 26 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27 + tilecoll FLOOR, FLOOR, PIT, PIT ; 28 + tilecoll WALL, WALL, WINDOW, WINDOW ; 29 + tilecoll WALL, WALL, WALL, WALL ; 2a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b + tilecoll WALL, WALL, FLOOR, FLOOR ; 2c + tilecoll WALL, WALL, WALL, WALL ; 2d + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 2e + tilecoll WALL, WALL, WALL, BOOKSHELF ; 2f + tilecoll WALL, WALL, FLOOR, WALL ; 30 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 31 + tilecoll WALL, WALL, WALL, WALL ; 32 + tilecoll WALL, FLOOR, WALL, FLOOR ; 33 + tilecoll WALL, WALL, PC, FLOOR ; 34 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 35 + tilecoll FLOOR, WALL, FLOOR, WALL ; 36 + tilecoll WALL, WALL, WALL, WALL ; 37 + tilecoll WALL, WALL, FLOOR, WALL ; 38 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 39 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 3a + tilecoll WALL, WALL, WALL, WALL ; 3b + tilecoll WALL, WALL, WALL, WALL ; 3c + tilecoll WALL, WALL, WINDOW, WALL ; 3d + tilecoll WALL, WALL, WALL, WALL ; 3e + tilecoll WALL, WALL, WALL, WALL ; 3f diff --git a/data/tilesets/lighthouse_metatiles.bin b/data/tilesets/lighthouse_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..21ca0f09a4cf9b43f0470246e7c3c4ca0262dfac GIT binary patch literal 1024 zcmZQX1FXiz#-fajj4*6$Y;26I#Ms!FjggU242D_I07$K%pr9ZVvw(n*kdP3sEU&CA zuPiSo7Z;DDl#UFH&nwH$A3kb-`BlMx015*#9LG~eIn7d&# z%$+bAByJ=qD5xMHAYdRQB*cIQU}k~TfiR2@(+{Er1qGD^1Oya?goF%@*;rT@#gvs9 z)ga*n3qMt;Ml|CYK;eh1Ur*o7U0*LOTu;BbMPIMA4Wtbceti5wLUQuz8Z0d47KlKG z`CCOrMa9I#!~|p?vVUOig6ROsi!urdii!ych>8gbLF{LQ@PX2*>gdQw+uPeC>lbNiGUaY)ryCQPEM+ apzwn6{rph*FmYC6V>VGnMln@r9tHr`XLNi3 literal 0 HcmV?d00001 diff --git a/data/tilesets/mansion_collision.asm b/data/tilesets/mansion_collision.asm new file mode 100644 index 0000000..2c8edd7 --- /dev/null +++ b/data/tilesets/mansion_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll WALL, WALL, WALL, WALL ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03 + tilecoll WALL, WALL, FLOOR, FLOOR ; 04 + tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 05 + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 06 + tilecoll WALL, WALL, FLOOR, FLOOR ; 07 + tilecoll WALL, WALL, FLOOR, FLOOR ; 08 + tilecoll WALL, WALL, FLOOR, FLOOR ; 09 + tilecoll WALL, WALL, FLOOR, WALL ; 0a + tilecoll FLOOR, WALL, FLOOR, WALL ; 0b + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 0c + tilecoll WALL, WALL, FLOOR, WALL ; 0d + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0e + tilecoll WALL, WALL, BOOKSHELF, INCENSE_BURNER ; 0f + tilecoll WALL, WALL, WALL, WALL ; 10 + tilecoll WALL, WALL, BOOKSHELF, WALL ; 11 + tilecoll WALL, WALL, WALL, WALL ; 12 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13 + tilecoll WALL, FLOOR, WALL, FLOOR ; 14 + tilecoll STAIRCASE, STAIRCASE, FLOOR, FLOOR ; 15 + tilecoll STAIRCASE, STAIRCASE, FLOOR, FLOOR ; 16 + tilecoll WALL, DOOR, FLOOR, FLOOR ; 17 + tilecoll WALL, WALL, BOOKSHELF, WALL ; 18 + tilecoll WALL, WALL, WALL, WALL ; 19 + tilecoll FLOOR, WALL, FLOOR, WALL ; 1a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1b + tilecoll WALL, WALL, FLOOR, FLOOR ; 1c + tilecoll FLOOR, FLOOR, WALL, WALL ; 1d + tilecoll FLOOR, FLOOR, WALL, WALL ; 1e + tilecoll FLOOR, FLOOR, WALL, WALL ; 1f + tilecoll FLOOR, WALL, FLOOR, WALL ; 20 + tilecoll RIGHT_WALL, LEFT_WALL, WALL, FLOOR ; 21 + tilecoll WALL, WALL, FLOOR, WALL ; 22 + tilecoll WALL, WALL, STAIRCASE, LEFT_WALL ; 23 + tilecoll WALL, WALL, WALL, STAIRCASE ; 24 + tilecoll WALL, WALL, LEFT_WALL, FLOOR ; 25 + tilecoll FLOOR, WALL, FLOOR, WALL ; 26 + tilecoll WALL, WALL, DOOR, WALL ; 27 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 28 + tilecoll FLOOR, FLOOR, WALL, WALL ; 29 + tilecoll FLOOR, FLOOR, WALL, WALL ; 2a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b + tilecoll RIGHT_WALL, LEFT_WALL, RIGHT_WALL, LEFT_WALL ; 2c + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 2d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e + tilecoll WALL, WALL, WALL, FLOOR ; 2f + tilecoll WALL, WALL, FLOOR, WALL ; 30 + tilecoll WALL, WALL, FLOOR, WALL ; 31 + tilecoll WALL, WALL, WALL, WALL ; 32 + tilecoll WALL, WALL, WALL, FLOOR ; 33 + tilecoll WALL, WALL, WALL, WALL ; 34 + tilecoll FLOOR, WALL, WALL, WALL ; 35 + tilecoll WALL, WALL, FLOOR, WALL ; 36 + tilecoll WALL, FLOOR, WALL, WALL ; 37 + tilecoll WALL, WALL, FLOOR, WALL ; 38 + tilecoll WALL, FLOOR, WALL, FLOOR ; 39 + tilecoll FLOOR, WALL, FLOOR, WALL ; 3a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c + tilecoll WALL, FLOOR, WALL, WALL ; 3d + tilecoll FLOOR, WALL, WALL, WALL ; 3e + tilecoll FLOOR, FLOOR, WALL, WALL ; 3f diff --git a/data/tilesets/mansion_metatiles.bin b/data/tilesets/mansion_metatiles.bin new file mode 100644 index 0000000..d450632 --- /dev/null +++ b/data/tilesets/mansion_metatiles.bin @@ -0,0 +1,5 @@ + +  +  EU((((6868$%"#4523236778FGGHFGGHVWWX68"#./23^_*+,-:;<=JKLMZ[&' +   +  !0168"#*+23:; ,-<=LMJKZ[*+,-:;<=JKLMZ[ƒ‡‡€¡±µFGFG\\GGGHGGGH !]01]67FG7778GGGH((((ŎŞ)ITTחׇ9TTYԇǝ9ӊTT߫ݻ&')TTߗ݇&'ˇؐͯ߇܇ڐɬʿřׇׇׇׇԇǝԇǝ‡‡‡‡‡‡‡ׇׇ׃דԇǝԐǝ‡ \ No newline at end of file diff --git a/data/tilesets/mart_collision.asm b/data/tilesets/mart_collision.asm new file mode 100644 index 0000000..ee4f1e4 --- /dev/null +++ b/data/tilesets/mart_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 01 + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 02 + tilecoll WALL, WALL, FLOOR, FLOOR ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 05 + tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 06 + tilecoll WALL, FLOOR, WALL, FLOOR ; 07 + tilecoll WALL, WALL, FLOOR, COUNTER ; 08 + tilecoll WALL, WALL, FLOOR, FLOOR ; 09 + tilecoll WALL, WALL, COUNTER, FLOOR ; 0a + tilecoll WALL, FLOOR, WALL, FLOOR ; 0b + tilecoll FLOOR, COUNTER, FLOOR, FLOOR ; 0c + tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 0d + tilecoll COUNTER, FLOOR, FLOOR, FLOOR ; 0e + tilecoll FLOOR, WALL, WALL, WALL ; 0f + tilecoll COUNTER, COUNTER, COUNTER, FLOOR ; 10 + tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 11 + tilecoll FLOOR, MART_SHELF, FLOOR, MART_SHELF ; 12 + tilecoll WALL, WALL, MART_SHELF, MART_SHELF ; 13 + tilecoll WALL, WALL, MART_SHELF, MART_SHELF ; 14 + tilecoll WALL, WALL, MART_SHELF, MART_SHELF ; 15 + tilecoll WALL, WALL, FLOOR, FLOOR ; 16 + tilecoll WALL, WALL, FLOOR, COUNTER ; 17 + tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 18 + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 19 + tilecoll COUNTER, COUNTER, COUNTER, FLOOR ; 1a + tilecoll COUNTER, COUNTER, FLOOR, COUNTER ; 1b + tilecoll WALL, WALL, WALL, WALL ; 1c + tilecoll WALL, WALL, WALL, WALL ; 1d + tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 1e + tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 1f + tilecoll FLOOR, WALL, FLOOR, WALL ; 20 + tilecoll WALL, WALL, WALL, WALL ; 21 + tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 22 + tilecoll FLOOR, MART_SHELF, FLOOR, MART_SHELF ; 23 + tilecoll WALL, WALL, WALL, WALL ; 24 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 25 + tilecoll WALL, WALL, FLOOR, FLOOR ; 26 + tilecoll WALL, WALL, COUNTER, MART_SHELF ; 27 + tilecoll FLOOR, MART_SHELF, FLOOR, MART_SHELF ; 28 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 29 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 2a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b + tilecoll COUNTER, COUNTER, FLOOR, MART_SHELF ; 2c + tilecoll FLOOR, MART_SHELF, COUNTER, COUNTER ; 2d + tilecoll COUNTER, FLOOR, COUNTER, COUNTER ; 2e + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 2f + tilecoll WALL, WALL, WALL, WALL ; 30 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 + tilecoll WALL, WALL, WALL, WALL ; 32 + tilecoll WALL, FLOOR, WALL, WALL ; 33 + tilecoll FLOOR, FLOOR, WALL, WALL ; 34 + tilecoll FLOOR, WALL, WALL, WALL ; 35 + tilecoll FLOOR, WALL, FLOOR, WALL ; 36 + tilecoll FLOOR, WALL, FLOOR, WALL ; 37 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38 + tilecoll FLOOR, FLOOR, FLOOR, STAIRCASE ; 39 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a + tilecoll WALL, WALL, WALL, WALL ; 3b + tilecoll WALL, WALL, WALL, WALL ; 3c + tilecoll WALL, WALL, WALL, WALL ; 3d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e + tilecoll WALL, WALL, WALL, WALL ; 3f diff --git a/data/tilesets/mart_metatiles.bin b/data/tilesets/mart_metatiles.bin new file mode 100644 index 0000000..63b2f62 --- /dev/null +++ b/data/tilesets/mart_metatiles.bin @@ -0,0 +1,3 @@ +,-<= +II "#23$%45*+>?>?*+ !01JK ./*;;;>?>?>?;;;;&'67()89@AB+PQRECD\]STU VWVWXYXYZ[Z[ PQPQPQPQ^_^_ؑ*+>?>?,-<=*;;;>?>?::>?::;;;+>?::>?::>?>?:: ::>? F:F:F::G:G:G"#23$%45 LMLMLMLMNONO !HH01HH>?HH>?HHHH&'HH67HH()HH89  +II *+PQ>?PQ>?^_HH&'HH67HH()HH89/HHHHHHHHHHHHHHHHHHHH HHHHHHHHHHHHHHHH;;;;&'67()89>?>?.Ӑڐ܁"#23$% \ No newline at end of file diff --git a/data/tilesets/omanyte_word_room_collision.asm b/data/tilesets/omanyte_word_room_collision.asm new file mode 100644 index 0000000..58bdacc --- /dev/null +++ b/data/tilesets/omanyte_word_room_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 08 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13 + tilecoll WALL, WALL, WALL, FLOOR ; 14 + tilecoll WALL, WALL, FLOOR, FLOOR ; 15 + tilecoll WALL, WALL, FLOOR, FLOOR ; 16 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 17 + tilecoll WALL, WALL, FLOOR, FLOOR ; 18 + tilecoll WALL, WALL, FLOOR, WALL ; 19 + tilecoll WALL, FLOOR, WALL, FLOOR ; 1a + tilecoll FLOOR, WALL, FLOOR, WALL ; 1b + tilecoll FLOOR, FLOOR, FLOOR, PIT ; 1c + tilecoll WALL, WALL, WALL, WALL ; 1d + tilecoll WALL, WALL, WALL, WALL ; 1e + tilecoll WALL, WALL, WALL, WALL ; 1f + tilecoll WALL, WALL, WALL, WALL ; 20 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 21 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 22 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 24 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 25 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f diff --git a/data/tilesets/omanyte_word_room_metatiles.bin b/data/tilesets/omanyte_word_room_metatiles.bin new file mode 100644 index 0000000..3cc62f5 --- /dev/null +++ b/data/tilesets/omanyte_word_room_metatiles.bin @@ -0,0 +1,17 @@ +ǎמ[\M]żň՘ÜŠհ  +  +  +  !"#ÈӘ@ABC 89 +  +  + +  +  +  +  +  +  +  + TVXY  + C 6!@ #8 + 6"7ɚň՘ɼͬݼæӶ \ No newline at end of file diff --git a/data/tilesets/park_collision.asm b/data/tilesets/park_collision.asm new file mode 100644 index 0000000..d24de1e --- /dev/null +++ b/data/tilesets/park_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll TALL_GRASS, TALL_GRASS, TALL_GRASS, TALL_GRASS ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05 + tilecoll WALL, WALL, WALL, WALL ; 06 + tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 07 + tilecoll WALL, WALL, WALL, WALL ; 08 + tilecoll WALL, WALL, WALL, WALL ; 09 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 0a + tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 0b + tilecoll WALL, WALL, WALL, WALL ; 0c + tilecoll WALL, WALL, WALL, WALL ; 0d + tilecoll WALL, WALL, FLOOR, FLOOR ; 0e + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 0f + tilecoll WALL, WALL, WALL, FLOOR ; 10 + tilecoll WALL, WALL, FLOOR, FLOOR ; 11 + tilecoll WALL, WALL, FLOOR, WALL ; 12 + tilecoll LONG_GRASS, LONG_GRASS, LONG_GRASS, LONG_GRASS ; 13 + tilecoll WALL, FLOOR, WALL, FLOOR ; 14 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 15 + tilecoll FLOOR, WALL, FLOOR, WALL ; 16 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 17 + tilecoll WALL, FLOOR, WALL, WALL ; 18 + tilecoll FLOOR, FLOOR, WALL, WALL ; 19 + tilecoll FLOOR, WALL, WALL, WALL ; 1a + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 1b + tilecoll WALL, WALL, WALL, FLOOR ; 1c + tilecoll WALL, WALL, FLOOR, FLOOR ; 1d + tilecoll WALL, WALL, FLOOR, WALL ; 1e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1f + tilecoll WALL, FLOOR, WALL, FLOOR ; 20 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 21 + tilecoll FLOOR, WALL, FLOOR, WALL ; 22 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23 + tilecoll WALL, FLOOR, WALL, WALL ; 24 + tilecoll FLOOR, FLOOR, WALL, WALL ; 25 + tilecoll FLOOR, WALL, WALL, WALL ; 26 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27 + tilecoll WALL, WALL, WALL, WALL ; 28 + tilecoll WALL, WALL, WALL, WALL ; 29 + tilecoll WALL, WALL, WALL, WALL ; 2a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b + tilecoll WALL, WALL, WALL, WALL ; 2c + tilecoll WALL, WALL, WALL, WALL ; 2d + tilecoll WALL, WALL, WALL, WALL ; 2e + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 2f + tilecoll WALL, WALL, WALL, WALL ; 30 + tilecoll WALL, WALL, WALL, WALL ; 31 + tilecoll WALL, WALL, WALL, WALL ; 32 + tilecoll LONG_GRASS, LONG_GRASS, LONG_GRASS, LONG_GRASS ; 33 + tilecoll WALL, WALL, WALL, WALL ; 34 + tilecoll WALL, WALL, WALL, WALL ; 35 + tilecoll WALL, WALL, WALL, WALL ; 36 + tilecoll WALL, WALL, WALL, WALL ; 37 + tilecoll WALL, WALL, WALL, WALL ; 38 + tilecoll WALL, WALL, WALL, WALL ; 39 + tilecoll WALL, WALL, WALL, WALL ; 3a + tilecoll WALL, WALL, WALL, WALL ; 3b + tilecoll WALL, WALL, WALL, WALL ; 3c + tilecoll WALL, WALL, WALL, WALL ; 3d + tilecoll WALL, WALL, WALL, WALL ; 3e + tilecoll LONG_GRASS, LONG_GRASS, LONG_GRASS, LONG_GRASS ; 3f diff --git a/data/tilesets/park_metatiles.bin b/data/tilesets/park_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..1fe93164077396a5d16a8bf62333bf5c08a8ea1e GIT binary patch literal 1024 zcmd<#<>Qx;m6O-e)zi1JwX|@E@zTsv4`bsTr#?BO_}tBcrOCs+y^psTtVuj3B-?tErhZD8V-O1sLzvIV2-6GE5AzR$n5!EbLueRWf3UI& ztG2NT%wA;`Wffx+5FesnStXd&*hHHZA}A%*>w5jLe?Q%#5DeFaw~pJ0nOROg|$tGgvc-f-^k9`k9%*G$SJ;iV;Zq znZqL@B0xGBA@R=~0pWWxGBbkhkBEqfgjx%uv;_nO1r-z(6=7IVP*6}22?z=b3Mnco zD#0*JBZvk$1f*o5s9AwVgmq{IBj77 literal 0 HcmV?d00001 diff --git a/data/tilesets/players_house_collision.asm b/data/tilesets/players_house_collision.asm new file mode 100644 index 0000000..34c8c23 --- /dev/null +++ b/data/tilesets/players_house_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll WINDOW, WALL, FLOOR, FLOOR ; 01 + tilecoll WALL, WALL, FLOOR, TV ; 02 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 03 + tilecoll WALL, WALL, WALL, WALL ; 04 + tilecoll WALL, WALL, FLOOR, FLOOR ; 05 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 06 + tilecoll WALL, WALL, WALL, WALL ; 07 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 08 + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 09 + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 0a + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 0b + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 0c + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 0d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e + tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll WALL, WALL, PC, FLOOR ; 10 + tilecoll WALL, WALL, TV, WALL ; 11 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12 + tilecoll FLOOR, TV, FLOOR, WALL ; 13 + tilecoll FLOOR, WALL, FLOOR, WALL ; 14 + tilecoll WALL, WALL, FLOOR, WALL ; 15 + tilecoll FLOOR, WALL, FLOOR, WALL ; 16 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 17 + tilecoll WALL, WALL, RADIO, PC ; 18 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 19 + tilecoll WALL, WALL, RADIO, FLOOR ; 1a + tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 1b + tilecoll WALL, FLOOR, WALL, FLOOR ; 1c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1d + tilecoll WALL, WALL, VIRTUAL_BOY, FLOOR ; 1e + tilecoll WALL, WALL, PC, RADIO ; 1f + tilecoll WALL, WALL, WALL, WALL ; 20 + tilecoll WALL, WALL, TV, BOOKSHELF ; 21 + tilecoll WALL, FLOOR, WALL, FLOOR ; 22 + tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 23 + tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 24 + tilecoll FLOOR, FLOOR, WALL, WALL ; 25 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 26 + tilecoll WALL, WALL, FLOOR, FLOOR ; 27 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 30 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 32 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 33 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 34 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 36 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 37 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 38 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 39 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f diff --git a/data/tilesets/players_house_metatiles.bin b/data/tilesets/players_house_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..f316eb8c1cba392b1551e267a673d3eb54f6058e GIT binary patch literal 1024 zcmZ=k13J2bV893kV2&UgJ0qi*I3uHkBvcqqp=o!4s23E3D}XXsSXfv@L_|c4jf_k{ zY61eCU4w!V<}ooVD+vj!ib9n$Dyc9ri<$}v3kv%93JS)=!o&py{rm+5d3Ztcf`V-9f`Ve=eEb}oR@O2OFq2>=z{0}In~^apnvqe}6d8le2VrC}Mn+>3 zkjW4X(+4pRWWS)Gf})zbfuWf>4=<*B1qIdA1qIE_85ub^85#Nb`S|7J_4M`hIXERG zt*kXPSy?SCSy??iSy>|@S-}8eGK7SfFDU5d&d3-R4srp=HjsbS)OmQ#%wh7%N=hn_ zxZ&exW0#W`6NlKKp~=W-Vadqo;mODt5y{91i48>jLSh5KhuF%<2r^GqRMZs4XJTe# f6cT1+1lfTcrZ91sx>c)Jt=`43i-BG=!w3fesA_Ux literal 0 HcmV?d00001 diff --git a/data/tilesets/players_room_collision.asm b/data/tilesets/players_room_collision.asm new file mode 100644 index 0000000..713f06c --- /dev/null +++ b/data/tilesets/players_room_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll WALL, WALL, WALL, WALL ; 01 + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 02 + tilecoll WALL, WALL, TV, BOOKSHELF ; 03 + tilecoll WALL, WALL, FLOOR, FLOOR ; 04 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06 + tilecoll WALL, WALL, FLOOR, FLOOR ; 07 + tilecoll WALL, WALL, FLOOR, FLOOR ; 08 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0a + tilecoll WALL, WALL, FLOOR, FLOOR ; 0b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d + tilecoll WALL, WALL, FLOOR, FLOOR ; 0e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10 + tilecoll WALL, WALL, FLOOR, FLOOR ; 11 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 12 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13 + tilecoll WALL, WALL, FLOOR, FLOOR ; 14 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 15 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 16 + tilecoll WALL, WALL, FLOOR, FLOOR ; 17 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 18 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 19 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1a + tilecoll WALL, FLOOR, WALL, FLOOR ; 1b + tilecoll WALL, FLOOR, WALL, FLOOR ; 1c + tilecoll WALL, FLOOR, WALL, FLOOR ; 1d + tilecoll WALL, FLOOR, WALL, FLOOR ; 1e + tilecoll TOWN_MAP, STAIRCASE, FLOOR, FLOOR ; 1f + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 20 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 21 + tilecoll FLOOR, WALL, FLOOR, WALL ; 22 + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 23 + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 24 + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 25 + tilecoll FF, FF, FF, FF ; 26 + tilecoll FF, FF, FF, FF ; 27 + tilecoll FF, FF, FF, FF ; 28 + tilecoll FF, FF, FF, FF ; 29 + tilecoll FF, FF, FF, FF ; 2a + tilecoll FF, FF, FF, FF ; 2b + tilecoll FF, FF, FF, FF ; 2c + tilecoll FF, FF, FF, FF ; 2d + tilecoll FF, FF, FF, FF ; 2e + tilecoll FF, FF, FF, FF ; 2f + tilecoll FF, FF, FF, FF ; 30 + tilecoll FF, FF, FF, FF ; 31 + tilecoll FF, FF, FF, FF ; 32 + tilecoll FF, FF, FF, FF ; 33 + tilecoll FF, FF, FF, FF ; 34 + tilecoll FF, FF, FF, FF ; 35 + tilecoll FF, FF, FF, FF ; 36 + tilecoll FF, FF, FF, FF ; 37 + tilecoll FF, FF, FF, FF ; 38 + tilecoll FF, FF, FF, FF ; 39 + tilecoll FF, FF, FF, FF ; 3a + tilecoll FF, FF, FF, FF ; 3b + tilecoll FF, FF, FF, FF ; 3c + tilecoll FF, FF, FF, FF ; 3d + tilecoll FF, FF, FF, FF ; 3e + tilecoll FF, FF, FF, FF ; 3f diff --git a/data/tilesets/players_room_metatiles.bin b/data/tilesets/players_room_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..0839798fe55f24ad3d87c6339192f3440178bfa7 GIT binary patch literal 1024 zcmZQT158XzOx!$7Owuw=&e}Rb!AwjJj!aAefs9bV#Kg*GZ6hk??W3v|9b;++QV+sV zX$;E1(9j53P(V;nNI_9i2__EG3&OlO07xCO6i6)y%i;ha^~h2nwIHmE1Ax>cOM%pa zuq_S%QjaVJQVYVqH~>gJvJ^-y2*=_8AoVz;z{1QdjEuq}jEu@EjEu%6jEo>YCl@25 zq!fa$sl~`>X@%f>dNDFaMnU*4t`3eNp@{foWK`E+WHh&6WONII#FM)RBV%|3g3r#u q$S5uW!ERxG{tk|D@d*8V{0@$C@(8}3zJsHkJ%W#xyhgc$ECc{kC{ZK; literal 0 HcmV?d00001 diff --git a/data/tilesets/pokecenter_collision.asm b/data/tilesets/pokecenter_collision.asm new file mode 100644 index 0000000..d768609 --- /dev/null +++ b/data/tilesets/pokecenter_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll WALL, WALL, WALL, WALL ; 01 + tilecoll WALL, WALL, WALL, FLOOR ; 02 + tilecoll WALL, WALL, FLOOR, WALL ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 05 + tilecoll WALL, COUNTER, FLOOR, FLOOR ; 06 + tilecoll COUNTER, WALL, FLOOR, FLOOR ; 07 + tilecoll WALL, WALL, FLOOR, PC ; 08 + tilecoll WALL, WALL, FLOOR, WALL ; 09 + tilecoll WALL, DOOR, FLOOR, FLOOR ; 0a + tilecoll WALL, WALL, WALL, WALL ; 0b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0c + tilecoll FLOOR, WALL, FLOOR, WALL ; 0d + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 0e + tilecoll WALL, WALL, FLOOR, WALL ; 0f + tilecoll FLOOR, FLOOR, LADDER, FLOOR ; 10 + tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 11 + tilecoll FLOOR, FLOOR, LADDER, FLOOR ; 12 + tilecoll WALL, WALL, FLOOR, FLOOR ; 13 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 14 + tilecoll WALL, DOOR, FLOOR, FLOOR ; 15 + tilecoll WALL, WALL, FLOOR, WALL ; 16 + tilecoll WALL, WALL, WALL, WALL ; 17 + tilecoll WALL, WALL, WALL, WALL ; 18 + tilecoll WALL, WALL, WALL, WALL ; 19 + tilecoll WALL, WALL, WALL, WALL ; 1a + tilecoll WALL, WALL, WALL, WALL ; 1b + tilecoll WALL, WALL, WALL, WALL ; 1c + tilecoll WALL, WALL, FLOOR, FLOOR ; 1d + tilecoll WALL, WALL, FLOOR, FLOOR ; 1e + tilecoll WALL, WALL, FLOOR, FLOOR ; 1f + tilecoll WALL, WALL, WALL, WALL ; 20 + tilecoll WALL, WALL, FLOOR, PC ; 21 + tilecoll WALL, WALL, WALL, FLOOR ; 22 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 23 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 24 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 25 + tilecoll WALL, WALL, FLOOR, FLOOR ; 26 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 27 + tilecoll WALL, WALL, FLOOR, WALL ; 28 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 29 + tilecoll WALL, WALL, WALL, FLOOR ; 2a + tilecoll WALL, DOOR, FLOOR, FLOOR ; 2b + tilecoll WALL, WALL, WALL, WALL ; 2c + tilecoll WALL, WALL, FLOOR, FLOOR ; 2d + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 2e + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 2f + tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 30 + tilecoll WALL, WALL, FLOOR, WALL ; 31 + tilecoll PC, WALL, FLOOR, WALL ; 32 + tilecoll FLOOR, WARP_PANEL, FLOOR, FLOOR ; 33 + tilecoll DOOR, WALL, FLOOR, FLOOR ; 34 + tilecoll DOOR, WALL, FLOOR, WALL ; 35 + tilecoll DOOR, WALL, FLOOR, FLOOR ; 36 + tilecoll DOOR, WALL, FLOOR, WALL ; 37 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 38 + tilecoll WALL, WALL, FLOOR, WALL ; 39 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 3a + tilecoll WALL, WALL, FLOOR, WALL ; 3b + tilecoll WARP_PANEL, FLOOR, FLOOR, FLOOR ; 3c + tilecoll WARP_PANEL, FLOOR, FLOOR, FLOOR ; 3d + tilecoll WARP_PANEL, WARP_PANEL, FLOOR, FLOOR ; 3e + tilecoll FLOOR, WARP_PANEL, FLOOR, FLOOR ; 3f diff --git a/data/tilesets/pokecenter_metatiles.bin b/data/tilesets/pokecenter_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..c96c4843b3ba046ec1494f049fb671c32180daf2 GIT binary patch literal 1024 zcmcCT12VF5@;bVD`Zl(<_CCIT{w%CaOd_I8OkCWIj8f8qf=m#=&&bHgFDS^YDu@P5 zOiWBvR8&+L85tQtQan7Ud=nmFQxz3AcbGiHI0Z#UMgv1ZK?g@BCNXgkW@Ho-7Zl{> zQ&U$`*3dLEMyMAPXW|zVXXFw&KvlbIKGw0<)S5Jr!3x6+f zFYl=6sAx#|GBLsUX67a)Ztf~72)>N0nYoUxnYoRvnYoWIM8ATfm$!joRJ4PmoIDeg zo<0+kt-Y7GpMO*|OdmQO7#J8B5D*YxV&dhkqJmJz#AIs=!Z7uqumoXP=py37!ctJs z&E3OOP%t7AqymCL?&oJ>VuB_(K@LtOWeG_{_{PM>#Ky%#pq93lwuh&OXGA2j2@rDx z1yN0g@dQjvOoWiqD=6)OFev>gDDv_d7@C 444444^_^_()89:;$$$$ǂׁ()$$89:;ׂ BCSϾ߁ 4$$$ 444$4444$$$$ \ No newline at end of file diff --git a/data/tilesets/port_collision.asm b/data/tilesets/port_collision.asm new file mode 100644 index 0000000..8abc712 --- /dev/null +++ b/data/tilesets/port_collision.asm @@ -0,0 +1,64 @@ + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 00 + tilecoll WALL, WALL, WALL, WALL ; 01 + tilecoll BUOY, WATER, BUOY, WATER ; 02 + tilecoll WATER, BUOY, WATER, BUOY ; 03 + tilecoll LADDER, LADDER, LADDER, LADDER ; 04 + tilecoll WALL, WALL, WALL, WATER ; 05 + tilecoll WALL, WALL, WATER, WATER ; 06 + tilecoll WALL, WALL, WATER, WALL ; 07 + tilecoll WATER, WATER, WATER, WATER ; 08 + tilecoll WALL, WATER, WALL, WATER ; 09 + tilecoll WATER, WATER, WATER, WATER ; 0a + tilecoll WATER, WALL, WATER, WALL ; 0b + tilecoll WATER, WATER, FLOOR, FLOOR ; 0c + tilecoll WALL, WATER, WALL, WALL ; 0d + tilecoll WATER, WATER, WALL, WALL ; 0e + tilecoll WATER, WALL, WALL, WALL ; 0f + tilecoll WATER, WATER, WATER, WATER ; 10 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 11 + tilecoll WATER, WATER, WATER, WATER ; 12 + tilecoll WATER, FLOOR, WATER, FLOOR ; 13 + tilecoll WATER, FLOOR, WATER, FLOOR ; 14 + tilecoll WATER, WATER, WATER, WATER ; 15 + tilecoll WATER, WATER, WATER, WATER ; 16 + tilecoll WATER, FLOOR, WALL, WARP_CARPET_DOWN ; 17 + tilecoll WATER, WATER, WALL, WALL ; 18 + tilecoll WATER, FLOOR, WALL, WALL ; 19 + tilecoll WALL, WALL, WALL, WALL ; 1a + tilecoll WALL, WATER, WALL, WALL ; 1b + tilecoll WATER_21, WATER_21, WALL, WALL ; 1c + tilecoll WATER_21, WATER_21, WALL, WALL ; 1d + tilecoll WATER_21, WATER_21, WALL, WALL ; 1e + tilecoll WALL, WALL, WALL, WATER ; 1f + tilecoll WALL, FLOOR, WATER, WARP_CARPET_DOWN ; 20 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 21 + tilecoll BUOY, BUOY, BUOY, WATER ; 22 + tilecoll BUOY, BUOY, WATER, BUOY ; 23 + tilecoll BUOY, BUOY, WATER, WATER ; 24 + tilecoll BUOY, BUOY, WATER, WATER ; 25 + tilecoll LADDER, LADDER, LADDER, LADDER ; 26 + tilecoll FLOOR, FLOOR, WATER, WATER ; 27 + tilecoll FLOOR, FLOOR, FLOOR, WATER ; 28 + tilecoll FLOOR, FLOOR, WATER, FLOOR ; 29 + tilecoll WALL, WALL, WALL, WALL ; 2a + tilecoll WALL, WALL, FLOOR, FLOOR ; 2b + tilecoll FLOOR, WATER, FLOOR, FLOOR ; 2c + tilecoll WATER, FLOOR, FLOOR, FLOOR ; 2d + tilecoll FLOOR, WATER, FLOOR, WATER ; 2e + tilecoll WATER, FLOOR, WATER, FLOOR ; 2f + tilecoll FLOOR, FLOOR, WATER, WATER ; 30 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 31 + tilecoll WALL, FLOOR, WALL, FLOOR ; 32 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 33 + tilecoll FLOOR, WATER, FLOOR, WATER ; 34 + tilecoll WALL, WALL, FLOOR, LADDER ; 35 + tilecoll WATER, WATER, WATER, WATER ; 36 + tilecoll FLOOR, WATER, FLOOR, WATER ; 37 + tilecoll WATER, FLOOR, WATER, FLOOR ; 38 + tilecoll WATER, WATER, FLOOR, FLOOR ; 39 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3a + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3b + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3c + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3d + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3e + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3f diff --git a/data/tilesets/port_metatiles.bin b/data/tilesets/port_metatiles.bin new file mode 100644 index 0000000..69a6007 --- /dev/null +++ b/data/tilesets/port_metatiles.bin @@ -0,0 +1,65 @@ +""""!!!!1111111111111111    ""  !!!!+,--9::3#$%./02;<=>&'()345?@AB*678CDE+,-39:PQXYZFGHIRRSSZ[\\IJKLT,-U]^^^MNOVW_"""""""" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +  ""1111  + + + + + + + + + + + + + + + +  \ No newline at end of file diff --git a/data/tilesets/radio_tower_collision.asm b/data/tilesets/radio_tower_collision.asm new file mode 100644 index 0000000..2c28130 --- /dev/null +++ b/data/tilesets/radio_tower_collision.asm @@ -0,0 +1,64 @@ + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll WALL, WALL, FLOOR, FLOOR ; 02 + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 03 + tilecoll WALL, WALL, FLOOR, FLOOR ; 04 + tilecoll FLOOR, FLOOR, WALL, COUNTER ; 05 + tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 06 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 07 + tilecoll COUNTER, COUNTER, FLOOR, FLOOR ; 08 + tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 09 + tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 0a + tilecoll WALL, WALL, WALL, WALL ; 0b + tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 0c + tilecoll WALL, STAIRCASE, FLOOR, FLOOR ; 0d + tilecoll FLOOR, FLOOR, FLOOR, COUNTER ; 0e + tilecoll FLOOR, FLOOR, COUNTER, FLOOR ; 0f + tilecoll FLOOR, COUNTER, FLOOR, FLOOR ; 10 + tilecoll WALL, WALL, FLOOR, FLOOR ; 11 + tilecoll WALL, WALL, PC, FLOOR ; 12 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 13 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 14 + tilecoll FLOOR, FLOOR, WALL, WALL ; 15 + tilecoll WALL, WALL, WALL, WALL ; 16 + tilecoll FLOOR, FLOOR, COUNTER, FLOOR ; 17 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 18 + tilecoll WALL, WALL, FLOOR, COUNTER ; 19 + tilecoll WALL, COUNTER, FLOOR, COUNTER ; 1a + tilecoll COUNTER, FLOOR, FLOOR, FLOOR ; 1b + tilecoll FLOOR, WALL, FLOOR, WALL ; 1c + tilecoll STAIRCASE, WALL, FLOOR, FLOOR ; 1d + tilecoll WALL, WALL, FLOOR, FLOOR ; 1e + tilecoll WALL, FLOOR, WALL, FLOOR ; 1f + tilecoll FLOOR, WALL, FLOOR, WALL ; 20 + tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 21 + tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 22 + tilecoll WALL, WALL, WALL, WALL ; 23 + tilecoll WALL, WALL, FLOOR, BOOKSHELF ; 24 + tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 25 + tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 26 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 27 + tilecoll WALL, WALL, FLOOR, WALL ; 28 + tilecoll FLOOR, WALL, FLOOR, WALL ; 29 + tilecoll WALL, WALL, FLOOR, FLOOR ; 2a + tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 2b + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2c + tilecoll FLOOR, COUNTER, FLOOR, COUNTER ; 2d + tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 2e + tilecoll WALL, WALL, WALL, WALL ; 2f + tilecoll WALL, FLOOR, WALL, FLOOR ; 30 + tilecoll WALL, WALL, FLOOR, WALL ; 31 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 32 + tilecoll WALL, WALL, WALL, FLOOR ; 33 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 34 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 35 + tilecoll WALL, WALL, FLOOR, FLOOR ; 36 + tilecoll FLOOR, WALL, FLOOR, WALL ; 37 + tilecoll FLOOR, FLOOR, COUNTER, COUNTER ; 38 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 39 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3a + tilecoll WALL, WALL, WALL, WALL ; 3b + tilecoll WALL, FLOOR, WALL, FLOOR ; 3c + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3d + tilecoll FLOOR, WALL, FLOOR, WALL ; 3e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 3f diff --git a/data/tilesets/radio_tower_metatiles.bin b/data/tilesets/radio_tower_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..01c0b4aa55ac97a611101aa2c1c322445ec835c2 GIT binary patch literal 1024 zcmcCS1B_@uP>`8LKtNaoCM+n(!z&;lBa7e*3JM4a2*CI-nw5>6or6baWXRZEP7CIXDqmRE&|)z|g=@N*V&WxVgC9+}+$g zJUu*JTwPqfyuG}6cm)MzWD)iY3i9y_2*}C9>_O11?2L>c6ColhY>bRPz92TpMufPa zprBw-aF9trU_c;97R1-n7Z9+sXJoXphUo#xKrqbR5FUaAxm!U|K@p^1FeEITH8dhp z6v_XrY!H7kGAbxCGHPnUbSfz;C>j~7su>xZnmIXhNGd3DaB6CS+z7%3h9DB*T9~e| za7M<6NRaFJ_yq;!XGB!0cGP<}jGJ1J~^>;BcGIldEGJ;CXlZIWK*OJr5oRM&3@|b> zMzO1a^M{UZZ=a1VB<+Fxgc@3mj1wkKnmlFdwCOWu&YC@E?!5WfO#|tK#HW+9QljWRf zVJwI_hT;fyY;2BFvIfX}5hZhJh%H>)Y-}8yq6Q${5O=}UfkZ&=fYC7ZFq(rC!h)%1 zV&>pvW&){3H3yeEkV=sG5cgV2!OX#>9%38Bz2b&k+=%dIWVEwqWQ2t`Bcq-^NCak{ znmQA+h9)x;A3qbboIEp=o<0+^ojo%X6Ehz_Gn1S=6SJN^Gn1V?Og&5;j1N*z5&nX>7-0@-_(1&aAOn*J#e<79NH@fMh`h4`ESZ7g-%L!=0m0|sRJP#ahVjv9 zuzDFKbC@{H9sxlPPC)@=djtfzxCI43>YYTCy^Fr1`}suW@Kb$0-4Ij7R8K6 zj{$*9%t67RaD}*^i8&yUnJFk3rjG#)K;q9#Mo&K^)XqKv9DhpYa`Iu}diso!cJ^q> H2OSpx5O*sW literal 0 HcmV?d00001 diff --git a/data/tilesets/tower_collision.asm b/data/tilesets/tower_collision.asm new file mode 100644 index 0000000..30e74a5 --- /dev/null +++ b/data/tilesets/tower_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll WALL, WALL, WALL, WALL ; 01 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 02 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 03 + tilecoll WALL, WALL, WALL, FLOOR ; 04 + tilecoll WALL, WALL, FLOOR, FLOOR ; 05 + tilecoll WALL, WALL, FLOOR, WALL ; 06 + tilecoll WALL, WALL, WALL, WALL ; 07 + tilecoll WALL, FLOOR, WALL, FLOOR ; 08 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09 + tilecoll FLOOR, WALL, FLOOR, WALL ; 0a + tilecoll WALL, WALL, WALL, WALL ; 0b + tilecoll WALL, FLOOR, WALL, WALL ; 0c + tilecoll FLOOR, FLOOR, WALL, WALL ; 0d + tilecoll FLOOR, WALL, WALL, WALL ; 0e + tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll FLOOR, WALL, FLOOR, WALL ; 10 + tilecoll WALL, FLOOR, WALL, FLOOR ; 11 + tilecoll WALL, FLOOR, WALL, FLOOR ; 12 + tilecoll FLOOR, WALL, FLOOR, WALL ; 13 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 14 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 15 + tilecoll WALL, FLOOR, WALL, WALL ; 16 + tilecoll FLOOR, WALL, WALL, WALL ; 17 + tilecoll WALL, WALL, WALL, WALL ; 18 + tilecoll WALL, FLOOR, WALL, FLOOR ; 19 + tilecoll FLOOR, WALL, FLOOR, WALL ; 1a + tilecoll WALL, WALL, WALL, WALL ; 1b + tilecoll WALL, WALL, WALL, WALL ; 1c + tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 1d + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 1e + tilecoll LADDER, FLOOR, FLOOR, FLOOR ; 1f + tilecoll LADDER, FLOOR, FLOOR, FLOOR ; 20 + tilecoll WALL, WALL, WALL, FLOOR ; 21 + tilecoll WALL, WALL, FLOOR, WALL ; 22 + tilecoll WALL, WALL, WALL, WALL ; 23 + tilecoll FLOOR, FLOOR, WARP_PANEL, FLOOR ; 24 + tilecoll WALL, WALL, PIT, FLOOR ; 25 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, WARP_CARPET_DOWN ; 26 + tilecoll WARP_CARPET_UP, WARP_CARPET_UP, FLOOR, FLOOR ; 27 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 28 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 29 + tilecoll WALL, WALL, WALL, WALL ; 2a + tilecoll WALL, HOP_LEFT, WALL, WALL ; 2b + tilecoll HOP_RIGHT, WALL, WALL, WALL ; 2c + tilecoll WALL, WALL, FLOOR, FLOOR ; 2d + tilecoll WALL, WALL, WALL, FLOOR ; 2e + tilecoll WALL, WALL, FLOOR, WALL ; 2f + tilecoll WALL, FLOOR, WALL, FLOOR ; 30 + tilecoll FLOOR, WALL, FLOOR, WALL ; 31 + tilecoll WALL, WALL, FLOOR, FLOOR ; 32 + tilecoll WALL, WALL, WALL, FLOOR ; 33 + tilecoll WALL, WALL, FLOOR, WALL ; 34 + tilecoll WALL, FLOOR, WALL, FLOOR ; 35 + tilecoll FLOOR, WALL, FLOOR, WALL ; 36 + tilecoll PIT, PIT, FLOOR, FLOOR ; 37 + tilecoll FLOOR, PIT, FLOOR, PIT ; 38 + tilecoll PIT, FLOOR, PIT, FLOOR ; 39 + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 3a + tilecoll WALL, WALL, FLOOR, FLOOR ; 3b + tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 3c + tilecoll WALL, HOP_DOWN, WALL, WALL ; 3d + tilecoll HOP_DOWN, WALL, WALL, WALL ; 3e + tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 3f diff --git a/data/tilesets/tower_metatiles.bin b/data/tilesets/tower_metatiles.bin new file mode 100644 index 0000000..b6668fc --- /dev/null +++ b/data/tilesets/tower_metatiles.bin @@ -0,0 +1,2 @@ + @ !!A1A1!!!!!!@ A1A1 + A1A1A1A1A1A1A1A1A1A1!!!!!!!!A1A1!!!! -.=><>MN./>?,NO()89*+:;()89*+:;MN]^NO^_A1A1@ !!A1A1!!@ !!!!^^^^"#23&'67"#23&'67PQPQPQPQPQPQPQPQ$$$$  "#23!!67"#!!2367%545%545%545%545 ^^  FV GW PQPQRSRSBCHZ[!XL\67IBCY!Z[L\67JKZ[L\67JKZ[L\67DETU!!!!PPPPPPPPFV   GW  \ No newline at end of file diff --git a/data/tilesets/traditional_house_collision.asm b/data/tilesets/traditional_house_collision.asm new file mode 100644 index 0000000..72db9bd --- /dev/null +++ b/data/tilesets/traditional_house_collision.asm @@ -0,0 +1,64 @@ + tilecoll WALL, WALL, WALL, WALL ; 00 + tilecoll WALL, WALL, RADIO, FLOOR ; 01 + tilecoll WALL, WALL, MART_SHELF, MART_SHELF ; 02 + tilecoll WALL, WALL, FLOOR, FLOOR ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 05 + tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 06 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 07 + tilecoll WALL, WALL, FLOOR, FLOOR ; 08 + tilecoll WALL, WALL, WALL, WALL ; 09 + tilecoll FLOOR, WALL, FLOOR, WALL ; 0a + tilecoll WALL, FLOOR, WALL, FLOOR ; 0b + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 0c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0e + tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 10 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 11 + tilecoll COUNTER, FLOOR, COUNTER, FLOOR ; 12 + tilecoll WALL, WALL, INCENSE_BURNER, BOOKSHELF ; 13 + tilecoll WALL, WALL, FLOOR, FLOOR ; 14 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 15 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 16 + tilecoll WALL, WALL, WALL, WALL ; 17 + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 18 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 19 + tilecoll WALL, WALL, BOOKSHELF, BOOKSHELF ; 1a + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 1b + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 1c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1d + tilecoll FLOOR, FLOOR, FLOOR, LADDER ; 1e + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 1f + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 20 + tilecoll FLOOR, FLOOR, FLOOR, WARP_CARPET_DOWN ; 21 + tilecoll FLOOR, FLOOR, WARP_CARPET_DOWN, FLOOR ; 22 + tilecoll WALL, WALL, RADIO, FLOOR ; 23 + tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 24 + tilecoll WALL, WALL, FLOOR, FLOOR ; 25 + tilecoll FLOOR, FLOOR, WALL, WALL ; 26 + tilecoll LADDER, FLOOR, FLOOR, FLOOR ; 27 + tilecoll WALL, WALL, FLOOR, FLOOR ; 28 + tilecoll WALL, WALL, WALL, WALL ; 29 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2a + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 2b + tilecoll FLOOR, FLOOR, HOP_DOWN, HOP_DOWN ; 2c + tilecoll WALL, WALL, FLOOR, FLOOR ; 2d + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 2e + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 2f + tilecoll WALL, WALL, FLOOR, FLOOR ; 30 + tilecoll WALL, WALL, WALL, WALL ; 31 + tilecoll WALL, WALL, WALL, WALL ; 32 + tilecoll WALL, WALL, WALL, FLOOR ; 33 + tilecoll WALL, WALL, WALL, FLOOR ; 34 + tilecoll WALL, WALL, FLOOR, FLOOR ; 35 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 36 + tilecoll WALL, WALL, FLOOR, WALL ; 37 + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 38 + tilecoll FLOOR, LADDER, FLOOR, FLOOR ; 39 + tilecoll 04, 03, 03, 03 ; 3a + tilecoll 03, 03, 03, 03 ; 3b + tilecoll 03, 03, 04, 04 ; 3c + tilecoll 04, 04, 04, 04 ; 3d + tilecoll 03, 03, 03, 03 ; 3e + tilecoll WARP_CARPET_DOWN, 04, 03, 03 ; 3f diff --git a/data/tilesets/traditional_house_metatiles.bin b/data/tilesets/traditional_house_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..3f6b41bd136d8020ce60a7b32dfda243526fb97a GIT binary patch literal 1024 zcmZQY1Au&A?(tC2}asIp3+nz2b}n5r7Ye$~K0HDvcNF}u162_xKxX+9HkNT`r7%>BCF zu5Px`p<#hg^ORLw-JG05!JP+283%-F=mRTb@2P9?5u6<>=1ko4r?0;37Elre0+Rza&mI!76t~$7}*+-y#ax?wn4!V91?14%fyU; zLc&7AwzjA$(7bCX&&tLnA}S`OqN=8@Ag?FS#l^`bB_%1vuCJ*s&Y&mH#mU7bB`GDP zrOB=@uP4sH#myrxB`qVXrLChYuP4thFE1|-GE)!=xVX5uq@<*zG&D3cKyn6X0O2|a z3+7)K9gYTke0_XlVq;=qG|V^{KMW0cc!q^VM23ZVd548XMS~v_8(15`3@StD_4haQ022}*49;6N=1Hv%(fXoD8KYu^}xcInu5F3PHwhJ(#y9XlT z;b~wH5ourm;e~}67(hhA!XP3{%%C`hU{GvASTIqLh)aX5t!tyLEjsPiWNYi*3<_mX zI)KqI_rt;)=6)F8!_(F_BGT5@%iGpADjFn;DgsMQptJ^(g}DSqqq+}dD+mh-!{i}6 zkh?*;L8_UUQDs45APf=*$uKc9DJp_fHOL?./>?@ANOP]^_&'67             01 01@AAAPQQQPQQQAAABQQQRQQQR@AABPQQRPQQRPQQRPQQRPQQRPQQRPQQRPQQRPQQRPQQR@B@B()89()89 \ No newline at end of file diff --git a/data/tilesets/unused_johto_collision.asm b/data/tilesets/unused_johto_collision.asm new file mode 100644 index 0000000..8bbc11f --- /dev/null +++ b/data/tilesets/unused_johto_collision.asm @@ -0,0 +1,128 @@ + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 00 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 01 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 02 + tilecoll TALL_GRASS_10, TALL_GRASS_10, TALL_GRASS_10, TALL_GRASS_10 ; 03 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 04 + tilecoll WALL, WALL, WALL, WALL ; 05 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 06 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 07 + tilecoll WALL, WALL, WALL, WALL ; 08 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 09 + tilecoll WALL, WALL, WALL, WALL ; 0a + tilecoll WARP_CARPET_LEFT, FLOOR, WARP_CARPET_LEFT, FLOOR ; 0b + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 0c + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 0d + tilecoll FLOOR, WARP_CARPET_RIGHT, FLOOR, WARP_CARPET_RIGHT ; 0e + tilecoll WALL, WALL, WALL, WALL ; 0f + tilecoll WALL, WALL, WALL, WALL ; 10 + tilecoll WALL, WALL, WALL, WALL ; 11 + tilecoll WALL, WALL, WALL, WALL ; 12 + tilecoll WALL, WALL, WALL, WALL ; 13 + tilecoll WALL, WALL, WALL, DOOR ; 14 + tilecoll WALL, WALL, WALL, WALL ; 15 + tilecoll WALL, WALL, WALL, DOOR ; 16 + tilecoll WALL, WALL, TOWN_MAP, WALL ; 17 + tilecoll WALL, WALL, WALL, WALL ; 18 + tilecoll WALL, WALL, WALL, WALL ; 19 + tilecoll WALL, WALL, WALL, DOOR ; 1a + tilecoll WALL, WALL, TOWN_MAP, WALL ; 1b + tilecoll WALL, WALL, WALL, WALL ; 1c + tilecoll WALL, WALL, DOOR, WALL ; 1d + tilecoll WALL, WALL, WALL, WALL ; 1e + tilecoll WALL, WALL, WALL, WALL ; 1f + tilecoll WALL, WALL, WALL, WALL ; 20 + tilecoll WALL, WALL, WALL, WALL ; 21 + tilecoll WALL, WALL, WALL, WALL ; 22 + tilecoll WALL, WALL, WALL, WALL ; 23 + tilecoll WALL, WALL, WALL, WALL ; 24 + tilecoll WALL, WALL, WALL, WALL ; 25 + tilecoll WALL, WALL, WALL, WALL ; 26 + tilecoll WALL, WALL, WALL, WALL ; 27 + tilecoll WALL, WALL, WALL, DOOR ; 28 + tilecoll WALL, WALL, WALL, WALL ; 29 + tilecoll WALL, WALL, WALL, DOOR ; 2a + tilecoll WALL, WALL, WALL, WALL ; 2b + tilecoll FLOOR, FLOOR, WALL, WALL ; 2c + tilecoll FLOOR, FLOOR, WALL, WALL ; 2d + tilecoll WALL, WALL, WALL, DOOR ; 2e + tilecoll WALL, WALL, WALL, WALL ; 2f + tilecoll BUOY, BUOY, BUOY, WATER_21 ; 30 + tilecoll BUOY, BUOY, WATER_21, WATER_21 ; 31 + tilecoll BUOY, BUOY, WATER_21, BUOY ; 32 + tilecoll FLOOR, FLOOR, WALL, WALL ; 33 + tilecoll BUOY, WATER_21, BUOY, WATER_21 ; 34 + tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 35 + tilecoll WATER_21, BUOY, WATER_21, BUOY ; 36 + tilecoll WALL, WALL, WALL, WALL ; 37 + tilecoll BUOY, WATER_21, BUOY, BUOY ; 38 + tilecoll WATER_21, WATER_21, BUOY, BUOY ; 39 + tilecoll WATER_21, BUOY, BUOY, BUOY ; 3a + tilecoll WALL, WALL, WALL, WALL ; 3b + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 3c + tilecoll FLOOR, WALL, FLOOR, FLOOR ; 3d + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 3e + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 3f + tilecoll WALL, WALL, WALL, FLOOR ; 40 + tilecoll WALL, WALL, FLOOR, FLOOR ; 41 + tilecoll WALL, WALL, FLOOR, WALL ; 42 + tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 43 + tilecoll WALL, FLOOR, WALL, FLOOR ; 44 + tilecoll TOWN_MAP, FLOOR, FLOOR, FLOOR ; 45 + tilecoll FLOOR, WALL, FLOOR, WALL ; 46 + tilecoll FLOOR, FLOOR, FLOOR, TOWN_MAP ; 47 + tilecoll WALL, FLOOR, WALL, WALL ; 48 + tilecoll FLOOR, FLOOR, WALL, WALL ; 49 + tilecoll FLOOR, WALL, WALL, WALL ; 4a + tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 4b + tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 4c + tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 4d + tilecoll WALL, HOP_LEFT, WALL, HOP_LEFT ; 4e + tilecoll HOP_RIGHT, WALL, HOP_RIGHT, WALL ; 4f + tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 50 + tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 51 + tilecoll WALL, HOP_DOWN_LEFT, WALL, WALL ; 52 + tilecoll HOP_DOWN_RIGHT, WALL, WALL, WALL ; 53 + tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 54 + tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 55 + tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 56 + tilecoll HOP_DOWN, HOP_DOWN, WALL, WALL ; 57 + tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 58 + tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 59 + tilecoll HOP_DOWN, FLOOR, WALL, FLOOR ; 5a + tilecoll WALL, CUT_TREE, FLOOR, FLOOR ; 5b + tilecoll WALL, WALL, WALL, FLOOR ; 5c + tilecoll WALL, WALL, FLOOR, FLOOR ; 5d + tilecoll WALL, WALL, FLOOR, WALL ; 5e + tilecoll FLOOR, WALL, FLOOR, CUT_TREE ; 5f + tilecoll WALL, FLOOR, WALL, FLOOR ; 60 + tilecoll WALL, WALL, WALL, WALL ; 61 + tilecoll FLOOR, WALL, FLOOR, WALL ; 62 + tilecoll FLOOR, FLOOR, CUT_TREE, WALL ; 63 + tilecoll WALL, FLOOR, WALL, WALL ; 64 + tilecoll FLOOR, FLOOR, WALL, WALL ; 65 + tilecoll FLOOR, WALL, WALL, WALL ; 66 + tilecoll CUT_TREE, FLOOR, WALL, FLOOR ; 67 + tilecoll WALL, FLOOR, WALL, FLOOR ; 68 + tilecoll FLOOR, WALL, FLOOR, WALL ; 69 + tilecoll WALL, UP_WALL, WALL, FLOOR ; 6a + tilecoll UP_WALL, WALL, FLOOR, WALL ; 6b + tilecoll WALL, FLOOR, WALL, WALL ; 6c + tilecoll FLOOR, WALL, WALL, WALL ; 6d + tilecoll FLOOR, FLOOR, WALL, FLOOR ; 6e + tilecoll FLOOR, FLOOR, FLOOR, WALL ; 6f + tilecoll UP_WALL, UP_WALL, FLOOR, FLOOR ; 70 + tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; 71 + tilecoll FLOOR, FLOOR, WALL, WALL ; 72 + tilecoll FLOOR, FLOOR, DOOR, WALL ; 73 + tilecoll WALL, FLOOR, FLOOR, FLOOR ; 74 + tilecoll WALL, WALL, FLOOR, FLOOR ; 75 + tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 76 + tilecoll WALL, WALL, WALL, WALL ; 77 + tilecoll WALL, WALL, WALL, WALL ; 78 + tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 79 + tilecoll WATER_21, WATER_21, WATER_21, WATER_21 ; 7a + tilecoll WALL, WALL, WALL, WALL ; 7b + tilecoll WALL, WALL, WALL, WALL ; 7c + tilecoll WALL, WALL, WALL, WALL ; 7d + tilecoll WALL, WALL, WALL, WALL ; 7e + tilecoll WALL, WALL, WALL, WALL ; 7f diff --git a/data/tilesets/unused_johto_metatiles.bin b/data/tilesets/unused_johto_metatiles.bin new file mode 100644 index 0000000000000000000000000000000000000000..b70f1a0e68c15225e50760865a093a7ce3d87f27 GIT binary patch literal 2048 zcmZQT18iu36%DYU0kAYPD>E}IGngqSFDI|34}o^}cJ}OO0Aw8-h+u$_W@ct)9v&VZ zAR1&fI<2jvqibzrV++FGK0dze>}(7Wnt=gqDJv^$bhM8T2>(X|sH#yN!^FhI zB*o6oE~Tc%4x$;En3&kv*=5+()MP+36BCn|fS{lt7dJPzl(e)oNM2A-P>7qGn@3t& zS_W0#+=7wG(h6N3qz{52@*s0TSVEFrMqC_XzOaXf2MB}g0qOVf@DK%IkUb!GK`^R* z4o--Eu-R&A(jXe-K4leYFfg}}mbSEFVgk8ST1`y`M1$NbC@3fh3U3hR=H}*>lV@eM zvu9OcH83<{RdO_9WtEdxWVN$5HZf&2c2Q*o85R^26a=C{;pONQ92^)F6a=%+z`@Z; zDIhRN$6C6wx2&6TU;TYr=2=?=5WsQr6NkHvEw->|* zD}l*F^g>8bj<;rGV?)MlY;3m3*qW7<6&bU#vf3hJWWC-#K0e5LeSCa;k@bS)k@bS) zV|;vkY(+#wVA#jUCsss6#2SX-p}@w*=Huhz193To1o2_|U^Gl0j7HTT9W5u%$8TrP zD+@6J6x(w0pmG)#zo7CL#7CD0sf45pm`Xl=R#skF7!N_i%!AOF`XDCr@yp5c%G%kZ z>x0OGbfM~pxeH<|NFL%EYim|kWX#HHYm0)lb#%0m)adBwf}%hdrUtIp+s6kIKM?&s zKEAe~_<^|x6!Jcx$b<>7f<$b6baZrd;6iv9ptu5Im=ZU4AD^&rA0JTq@%D+1Mv5n} zy)ZsV4=A6&ur;fkyfv$xJ&cxYN`?d)xBVYH!xgM*{1t1AeD%25Xg2NPFUR~HZlmA?Q%W*5r< literal 0 HcmV?d00001 diff --git a/data/trainers/attributes.asm b/data/trainers/attributes.asm new file mode 100644 index 0000000..7054497 --- /dev/null +++ b/data/trainers/attributes.asm @@ -0,0 +1,407 @@ +TrainerClassAttributes: +; entries correspond to trainer classes (see constants/trainer_constants.asm) + table_width NUM_TRAINER_ATTRIBUTES, TrainerClassAttributes + +; Falkner + db NO_ITEM, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Whitney + db NO_ITEM, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Bugsy + db NO_ITEM, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Morty + db NO_ITEM, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Pryce + db HYPER_POTION, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Jasmine + db HYPER_POTION, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Chuck + db FULL_HEAL, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Clair + db FULL_HEAL, HYPER_POTION ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Rival1 + db NO_ITEM, NO_ITEM ; items + db 15 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Pokemon Prof + db NO_ITEM, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_AGGRESSIVE | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Will + db MAX_POTION, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Cal + db NO_ITEM, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Bruno + db MAX_POTION, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Karen + db FULL_HEAL, MAX_POTION ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Koga + db FULL_HEAL, FULL_RESTORE ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Champion + db FULL_HEAL, FULL_RESTORE ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Brock + db HYPER_POTION, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Misty + db FULL_HEAL, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Lt Surge + db HYPER_POTION, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Scientist + db NO_ITEM, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_TYPES | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Erika + db HYPER_POTION, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Youngster + db NO_ITEM, NO_ITEM ; items + db 4 ; base reward + dw AI_BASIC | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Schoolboy + db NO_ITEM, NO_ITEM ; items + db 8 ; base reward + dw AI_BASIC | AI_SETUP | AI_TYPES | AI_OPPORTUNIST | AI_CAUTIOUS | AI_STATUS + dw CONTEXT_USE | SWITCH_OFTEN + +; Bird Keeper + db NO_ITEM, NO_ITEM ; items + db 6 ; base reward + dw AI_BASIC | AI_TYPES | AI_OFFENSIVE | AI_OPPORTUNIST | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Lass + db NO_ITEM, NO_ITEM ; items + db 6 ; base reward + dw AI_BASIC | AI_CAUTIOUS | AI_STATUS + dw CONTEXT_USE | SWITCH_OFTEN + +; Janine + db DIRE_HIT, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Cooltrainerm + db NO_ITEM, NO_ITEM ; items + db 12 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Cooltrainerf + db NO_ITEM, NO_ITEM ; items + db 12 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Beauty + db NO_ITEM, NO_ITEM ; items + db 22 ; base reward + dw AI_BASIC | AI_TYPES | AI_OPPORTUNIST | AI_CAUTIOUS | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Pokemaniac + db NO_ITEM, NO_ITEM ; items + db 15 ; base reward + dw AI_BASIC | AI_SETUP | AI_OFFENSIVE | AI_AGGRESSIVE | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Gruntm + db NO_ITEM, NO_ITEM ; items + db 10 ; base reward + dw AI_BASIC | AI_SETUP | AI_TYPES | AI_OPPORTUNIST | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Gentleman + db NO_ITEM, NO_ITEM ; items + db 18 ; base reward + dw AI_BASIC | AI_SETUP | AI_AGGRESSIVE | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Skier + db NO_ITEM, NO_ITEM ; items + db 18 ; base reward + dw AI_BASIC | AI_SETUP | AI_TYPES | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Teacher + db NO_ITEM, NO_ITEM ; items + db 18 ; base reward + dw AI_BASIC | AI_OPPORTUNIST | AI_AGGRESSIVE | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Sabrina + db HYPER_POTION, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Bug Catcher + db NO_ITEM, NO_ITEM ; items + db 4 ; base reward + dw AI_BASIC | AI_SETUP | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Fisher + db NO_ITEM, NO_ITEM ; items + db 10 ; base reward + dw AI_BASIC | AI_TYPES | AI_OPPORTUNIST | AI_CAUTIOUS | AI_STATUS + dw CONTEXT_USE | SWITCH_OFTEN + +; Swimmerm + db NO_ITEM, NO_ITEM ; items + db 2 ; base reward + dw AI_BASIC | AI_SETUP | AI_TYPES | AI_OFFENSIVE | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Swimmerf + db NO_ITEM, NO_ITEM ; items + db 5 ; base reward + dw AI_BASIC | AI_SETUP | AI_TYPES | AI_CAUTIOUS | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Sailor + db NO_ITEM, NO_ITEM ; items + db 10 ; base reward + dw AI_BASIC | AI_OFFENSIVE | AI_OPPORTUNIST | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Super Nerd + db NO_ITEM, NO_ITEM ; items + db 8 ; base reward + dw AI_BASIC | AI_TYPES | AI_SMART | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Rival2 + db NO_ITEM, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Guitarist + db NO_ITEM, NO_ITEM ; items + db 8 ; base reward + dw AI_BASIC | AI_SETUP | AI_TYPES | AI_CAUTIOUS | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Hiker + db NO_ITEM, NO_ITEM ; items + db 8 ; base reward + dw AI_BASIC | AI_OFFENSIVE | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Biker + db NO_ITEM, NO_ITEM ; items + db 8 ; base reward + dw AI_BASIC | AI_TYPES | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Blaine + db MAX_POTION, FULL_HEAL ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Burglar + db NO_ITEM, NO_ITEM ; items + db 22 ; base reward + dw AI_BASIC | AI_OFFENSIVE | AI_CAUTIOUS | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Firebreather + db NO_ITEM, NO_ITEM ; items + db 12 ; base reward + dw AI_BASIC | AI_SETUP | AI_OFFENSIVE | AI_OPPORTUNIST | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Juggler + db NO_ITEM, NO_ITEM ; items + db 10 ; base reward + dw AI_BASIC | AI_TYPES | AI_SMART | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Blackbelt T + db NO_ITEM, NO_ITEM ; items + db 6 ; base reward + dw AI_BASIC | AI_OFFENSIVE | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Executivem + db NO_ITEM, NO_ITEM ; items + db 18 ; base reward + dw AI_BASIC | AI_SETUP | AI_TYPES | AI_SMART | AI_OPPORTUNIST | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Psychic T + db NO_ITEM, NO_ITEM ; items + db 8 ; base reward + dw AI_BASIC | AI_TYPES | AI_OPPORTUNIST | AI_CAUTIOUS | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Picnicker + db NO_ITEM, NO_ITEM ; items + db 5 ; base reward + dw AI_BASIC | AI_CAUTIOUS | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Camper + db NO_ITEM, NO_ITEM ; items + db 5 ; base reward + dw AI_BASIC | AI_CAUTIOUS | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Executivef + db NO_ITEM, NO_ITEM ; items + db 18 ; base reward + dw AI_BASIC | AI_SETUP | AI_TYPES | AI_SMART | AI_OPPORTUNIST | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Sage + db NO_ITEM, NO_ITEM ; items + db 8 ; base reward + dw AI_BASIC | AI_SETUP | AI_TYPES | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Medium + db NO_ITEM, NO_ITEM ; items + db 10 ; base reward + dw AI_BASIC | AI_SETUP | AI_TYPES | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Boarder + db NO_ITEM, NO_ITEM ; items + db 18 ; base reward + dw AI_BASIC | AI_TYPES | AI_OPPORTUNIST | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Pokefanm + db NO_ITEM, NO_ITEM ; items + db 20 ; base reward + dw AI_BASIC | AI_TYPES | AI_SMART | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Kimono Girl + db NO_ITEM, NO_ITEM ; items + db 18 ; base reward + dw AI_BASIC | AI_TYPES | AI_OPPORTUNIST | AI_CAUTIOUS | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Twins + db NO_ITEM, NO_ITEM ; items + db 5 ; base reward + dw NO_AI + dw CONTEXT_USE | SWITCH_OFTEN + +; Pokefanf + db NO_ITEM, NO_ITEM ; items + db 20 ; base reward + dw AI_BASIC | AI_TYPES | AI_SMART | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Red + db FULL_RESTORE, FULL_RESTORE ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Blue + db FULL_RESTORE, FULL_RESTORE ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Officer + db NO_ITEM, NO_ITEM ; items + db 10 ; base reward + dw AI_BASIC | AI_TYPES | AI_OPPORTUNIST | AI_STATUS + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Gruntf + db NO_ITEM, NO_ITEM ; items + db 10 ; base reward + dw AI_BASIC | AI_TYPES | AI_OPPORTUNIST | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + +; Mysticalman + db NO_ITEM, NO_ITEM ; items + db 25 ; base reward + dw AI_BASIC | AI_SETUP | AI_SMART | AI_AGGRESSIVE | AI_CAUTIOUS | AI_STATUS | AI_RISKY + dw CONTEXT_USE | SWITCH_SOMETIMES + + assert_table_length NUM_TRAINER_CLASSES diff --git a/data/trainers/class_names.asm b/data/trainers/class_names.asm new file mode 100644 index 0000000..513d15e --- /dev/null +++ b/data/trainers/class_names.asm @@ -0,0 +1,71 @@ +TrainerClassNames:: +; entries correspond to trainer classes (see constants/trainer_constants.asm) + list_start TrainerClassNames + li "LEADER" + li "LEADER" + li "LEADER" + li "LEADER" + li "LEADER" + li "LEADER" + li "LEADER" + li "LEADER" + li "RIVAL" + li "#MON PROF." + li "ELITE FOUR" + li " TRAINER" + li "ELITE FOUR" + li "ELITE FOUR" + li "ELITE FOUR" + li "CHAMPION" + li "LEADER" + li "LEADER" + li "LEADER" + li "SCIENTIST" + li "LEADER" + li "YOUNGSTER" + li "SCHOOLBOY" + li "BIRD KEEPER" + li "LASS" + li "LEADER" + li "COOLTRAINER" + li "COOLTRAINER" + li "BEAUTY" + li "#MANIAC" + li "ROCKET" + li "GENTLEMAN" + li "SKIER" + li "TEACHER" + li "LEADER" + li "BUG CATCHER" + li "FISHER" + li "SWIMMER♂" + li "SWIMMER♀" + li "SAILOR" + li "SUPER NERD" + li "RIVAL" + li "GUITARIST" + li "HIKER" + li "BIKER" + li "LEADER" + li "BURGLAR" + li "FIREBREATHER" + li "JUGGLER" + li "BLACKBELT" + li "ROCKET" + li "PSYCHIC" + li "PICNICKER" + li "CAMPER" + li "ROCKET" + li "SAGE" + li "MEDIUM" + li "BOARDER" + li "#FAN" + li "KIMONO GIRL" + li "TWINS" + li "#FAN" + li " TRAINER" + li "LEADER" + li "OFFICER" + li "ROCKET" + li "MYSTICALMAN" + assert_list_length NUM_TRAINER_CLASSES diff --git a/data/trainers/dvs.asm b/data/trainers/dvs.asm new file mode 100644 index 0000000..3e4999a --- /dev/null +++ b/data/trainers/dvs.asm @@ -0,0 +1,73 @@ +TrainerClassDVs: +; entries correspond to trainer classes (see constants/trainer_constants.asm) + table_width 2, TrainerClassDVs + ; atk,def,spd,spc + dn 9, 10, 7, 7 ; FALKNER + dn 8, 8, 8, 8 ; WHITNEY + dn 9, 8, 8, 8 ; BUGSY + dn 9, 8, 8, 8 ; MORTY + dn 9, 8, 8, 8 ; PRYCE + dn 9, 8, 8, 8 ; JASMINE + dn 9, 8, 8, 8 ; CHUCK + dn 7, 12, 13, 13 ; CLAIR + dn 13, 13, 13, 13 ; RIVAL1 + dn 9, 8, 8, 8 ; POKEMON_PROF + dn 13, 12, 13, 13 ; WILL + dn 13, 12, 13, 13 ; CAL + dn 13, 12, 13, 13 ; BRUNO + dn 7, 15, 13, 15 ; KAREN + dn 13, 12, 13, 13 ; KOGA + dn 13, 12, 13, 13 ; CHAMPION + dn 9, 8, 8, 8 ; BROCK + dn 7, 8, 8, 8 ; MISTY + dn 9, 8, 8, 8 ; LT_SURGE + dn 9, 8, 8, 8 ; SCIENTIST + dn 7, 8, 8, 8 ; ERIKA + dn 9, 8, 8, 8 ; YOUNGSTER + dn 9, 8, 8, 8 ; SCHOOLBOY + dn 9, 8, 8, 8 ; BIRD_KEEPER + dn 5, 8, 8, 8 ; LASS + dn 9, 8, 8, 8 ; JANINE + dn 13, 8, 12, 8 ; COOLTRAINERM + dn 7, 12, 12, 8 ; COOLTRAINERF + dn 6, 9, 12, 8 ; BEAUTY + dn 9, 8, 8, 8 ; POKEMANIAC + dn 13, 8, 10, 8 ; GRUNTM + dn 9, 8, 8, 8 ; GENTLEMAN + dn 9, 8, 8, 8 ; SKIER + dn 6, 8, 8, 8 ; TEACHER + dn 7, 13, 8, 7 ; SABRINA + dn 9, 8, 8, 8 ; BUG_CATCHER + dn 9, 8, 8, 8 ; FISHER + dn 9, 8, 8, 8 ; SWIMMERM + dn 7, 8, 8, 8 ; SWIMMERF + dn 9, 8, 8, 8 ; SAILOR + dn 9, 8, 8, 8 ; SUPER_NERD +; BUG: RIVAL2 has lower DVs than RIVAL1 (see docs/bugs_and_glitches.md) + dn 9, 8, 8, 8 ; RIVAL2 + dn 9, 8, 8, 8 ; GUITARIST + dn 10, 8, 8, 8 ; HIKER + dn 9, 8, 8, 8 ; BIKER + dn 9, 8, 8, 8 ; BLAINE + dn 9, 8, 8, 8 ; BURGLAR + dn 9, 8, 8, 8 ; FIREBREATHER + dn 9, 8, 8, 8 ; JUGGLER + dn 9, 8, 8, 8 ; BLACKBELT_T + dn 13, 8, 10, 8 ; EXECUTIVEM + dn 9, 8, 8, 8 ; PSYCHIC_T + dn 6, 10, 10, 8 ; PICNICKER + dn 9, 8, 8, 8 ; CAMPER + dn 7, 14, 10, 8 ; EXECUTIVEF + dn 9, 8, 8, 8 ; SAGE + dn 7, 8, 8, 8 ; MEDIUM + dn 9, 8, 8, 8 ; BOARDER + dn 9, 8, 8, 8 ; POKEFANM + dn 6, 8, 8, 10 ; KIMONO_GIRL + dn 6, 8, 10, 8 ; TWINS + dn 6, 13, 8, 8 ; POKEFANF + dn 15, 13, 13, 14 ; RED + dn 9, 13, 13, 13 ; BLUE + dn 9, 8, 8, 8 ; OFFICER + dn 7, 14, 10, 8 ; GRUNTF + dn 9, 8, 8, 8 ; MYSTICALMAN + assert_table_length NUM_TRAINER_CLASSES diff --git a/data/trainers/encounter_music.asm b/data/trainers/encounter_music.asm new file mode 100644 index 0000000..0266469 --- /dev/null +++ b/data/trainers/encounter_music.asm @@ -0,0 +1,77 @@ +; What music plays when a trainer notices you + +TrainerEncounterMusic:: +; entries correspond to trainer classes (see constants/trainer_constants.asm) + table_width 1, TrainerEncounterMusic + db MUSIC_HIKER_ENCOUNTER ; none + db MUSIC_YOUNGSTER_ENCOUNTER ; falkner + db MUSIC_LASS_ENCOUNTER ; whitney + db MUSIC_YOUNGSTER_ENCOUNTER ; bugsy + db MUSIC_OFFICER_ENCOUNTER ; morty + db MUSIC_OFFICER_ENCOUNTER ; pryce + db MUSIC_LASS_ENCOUNTER ; jasmine + db MUSIC_OFFICER_ENCOUNTER ; chuck + db MUSIC_BEAUTY_ENCOUNTER ; clair + db MUSIC_RIVAL_ENCOUNTER ; rival1 + db MUSIC_HIKER_ENCOUNTER ; pokemon_prof + db MUSIC_HIKER_ENCOUNTER ; will + db MUSIC_HIKER_ENCOUNTER ; cal + db MUSIC_OFFICER_ENCOUNTER ; bruno + db MUSIC_HIKER_ENCOUNTER ; karen + db MUSIC_HIKER_ENCOUNTER ; koga + db MUSIC_OFFICER_ENCOUNTER ; champion + db MUSIC_YOUNGSTER_ENCOUNTER ; brock + db MUSIC_LASS_ENCOUNTER ; misty + db MUSIC_OFFICER_ENCOUNTER ; lt_surge + db MUSIC_ROCKET_ENCOUNTER ; scientist + db MUSIC_OFFICER_ENCOUNTER ; erika + db MUSIC_YOUNGSTER_ENCOUNTER ; youngster + db MUSIC_YOUNGSTER_ENCOUNTER ; schoolboy + db MUSIC_YOUNGSTER_ENCOUNTER ; bird_keeper + db MUSIC_LASS_ENCOUNTER ; lass + db MUSIC_LASS_ENCOUNTER ; janine + db MUSIC_HIKER_ENCOUNTER ; cooltrainerm + db MUSIC_BEAUTY_ENCOUNTER ; cooltrainerf + db MUSIC_BEAUTY_ENCOUNTER ; beauty + db MUSIC_POKEMANIAC_ENCOUNTER ; pokemaniac + db MUSIC_ROCKET_ENCOUNTER ; gruntm + db MUSIC_HIKER_ENCOUNTER ; gentleman + db MUSIC_BEAUTY_ENCOUNTER ; skier + db MUSIC_BEAUTY_ENCOUNTER ; teacher + db MUSIC_BEAUTY_ENCOUNTER ; sabrina + db MUSIC_YOUNGSTER_ENCOUNTER ; bug_catcher + db MUSIC_HIKER_ENCOUNTER ; fisher + db MUSIC_HIKER_ENCOUNTER ; swimmerm + db MUSIC_BEAUTY_ENCOUNTER ; swimmerf + db MUSIC_HIKER_ENCOUNTER ; sailor + db MUSIC_POKEMANIAC_ENCOUNTER ; super_nerd + db MUSIC_RIVAL_ENCOUNTER ; rival2 + db MUSIC_HIKER_ENCOUNTER ; guitarist + db MUSIC_HIKER_ENCOUNTER ; hiker + db MUSIC_HIKER_ENCOUNTER ; biker + db MUSIC_OFFICER_ENCOUNTER ; blaine + db MUSIC_POKEMANIAC_ENCOUNTER ; burglar + db MUSIC_HIKER_ENCOUNTER ; firebreather + db MUSIC_POKEMANIAC_ENCOUNTER ; juggler + db MUSIC_HIKER_ENCOUNTER ; blackbelt_t + db MUSIC_ROCKET_ENCOUNTER ; executivem + db MUSIC_YOUNGSTER_ENCOUNTER ; psychic_t + db MUSIC_LASS_ENCOUNTER ; picnicker + db MUSIC_YOUNGSTER_ENCOUNTER ; camper + db MUSIC_ROCKET_ENCOUNTER ; executivef + db MUSIC_SAGE_ENCOUNTER ; sage + db MUSIC_SAGE_ENCOUNTER ; medium + db MUSIC_HIKER_ENCOUNTER ; boarder + db MUSIC_HIKER_ENCOUNTER ; pokefanm + db MUSIC_KIMONO_ENCOUNTER ; kimono_girl + db MUSIC_LASS_ENCOUNTER ; twins + db MUSIC_BEAUTY_ENCOUNTER ; pokefanf + db MUSIC_HIKER_ENCOUNTER ; red + db MUSIC_RIVAL_ENCOUNTER ; blue + db MUSIC_HIKER_ENCOUNTER ; officer + db MUSIC_ROCKET_ENCOUNTER ; gruntf + db MUSIC_HIKER_ENCOUNTER ; mysticalman + assert_table_length NUM_TRAINER_CLASSES + 1 + db MUSIC_HIKER_ENCOUNTER ; unused + db MUSIC_HIKER_ENCOUNTER ; unused + db MUSIC_HIKER_ENCOUNTER ; unused diff --git a/data/trainers/gendered_trainers.asm b/data/trainers/gendered_trainers.asm new file mode 100644 index 0000000..c3ff6ff --- /dev/null +++ b/data/trainers/gendered_trainers.asm @@ -0,0 +1,42 @@ +; Used by GetMobileOTTrainerClass + +MaleTrainers: + db BURGLAR + db YOUNGSTER + db SCHOOLBOY + db BIRD_KEEPER + db POKEMANIAC + db GENTLEMAN + db BUG_CATCHER + db FISHER + db SWIMMERM + db SAILOR + db SUPER_NERD + db GUITARIST + db HIKER + db FIREBREATHER + db BLACKBELT_T + db PSYCHIC_T + db CAMPER + db COOLTRAINERM + db BOARDER + db JUGGLER + db POKEFANM + db OFFICER + db SAGE + db BIKER + db SCIENTIST +.End + +FemaleTrainers: + db MEDIUM + db LASS + db BEAUTY + db SKIER + db TEACHER + db SWIMMERF + db PICNICKER + db KIMONO_GIRL + db POKEFANF + db COOLTRAINERF +.End diff --git a/data/trainers/genders.asm b/data/trainers/genders.asm new file mode 100644 index 0000000..230b292 --- /dev/null +++ b/data/trainers/genders.asm @@ -0,0 +1,72 @@ +; Used by BattleTowerText + +BTTrainerClassGenders: +; entries correspond to trainer classes + table_width 1, BTTrainerClassGenders + db MALE ; FALKNER + db FEMALE ; WHITNEY + db FEMALE ; BUGSY + db MALE ; MORTY + db MALE ; PRYCE + db FEMALE ; JASMINE + db MALE ; CHUCK + db FEMALE ; CLAIR + db MALE ; RIVAL1 + db MALE ; POKEMON_PROF + db FEMALE ; WILL + db MALE ; CAL + db MALE ; BRUNO + db FEMALE ; KAREN + db MALE ; KOGA + db MALE ; CHAMPION + db MALE ; BROCK + db FEMALE ; MISTY + db MALE ; LT_SURGE + db MALE ; SCIENTIST + db FEMALE ; ERIKA + db MALE ; YOUNGSTER + db MALE ; SCHOOLBOY + db MALE ; BIRD_KEEPER + db FEMALE ; LASS + db FEMALE ; JANINE + db MALE ; COOLTRAINERM + db FEMALE ; COOLTRAINERF + db FEMALE ; BEAUTY + db MALE ; POKEMANIAC + db MALE ; GRUNTM + db MALE ; GENTLEMAN + db FEMALE ; SKIER + db FEMALE ; TEACHER + db FEMALE ; SABRINA + db MALE ; BUG_CATCHER + db MALE ; FISHER + db MALE ; SWIMMERM + db FEMALE ; SWIMMERF + db MALE ; SAILOR + db MALE ; SUPER_NERD + db MALE ; RIVAL2 + db MALE ; GUITARIST + db MALE ; HIKER + db MALE ; BIKER + db MALE ; BLAINE + db MALE ; BURGLAR + db MALE ; FIREBREATHER + db MALE ; JUGGLER + db MALE ; BLACKBELT_T + db MALE ; EXECUTIVEM + db MALE ; PSYCHIC_T + db FEMALE ; PICNICKER + db MALE ; CAMPER + db FEMALE ; EXECUTIVEF + db MALE ; SAGE + db FEMALE ; MEDIUM + db MALE ; BOARDER + db MALE ; POKEFANM + db FEMALE ; KIMONO_GIRL + db FEMALE ; TWINS + db FEMALE ; POKEFANF + db MALE ; RED + db MALE ; BLUE + db MALE ; OFFICER + db FEMALE ; GRUNTF + assert_table_length NUM_TRAINER_CLASSES - 1 ; exclude MYSTICALMAN diff --git a/data/trainers/leaders.asm b/data/trainers/leaders.asm new file mode 100644 index 0000000..a41f641 --- /dev/null +++ b/data/trainers/leaders.asm @@ -0,0 +1,32 @@ +; These lists determine the battle music and victory music, and whether to +; award HAPPINESS_GYMBATTLE for winning. + +; Note: CHAMPION and RED are unused for battle music checks, since they are +; accounted for prior to the list check. + +GymLeaders: + db FALKNER + db WHITNEY + db BUGSY + db MORTY + db PRYCE + db JASMINE + db CHUCK + db CLAIR + db WILL + db BRUNO + db KAREN + db KOGA + db CHAMPION + db RED +; fallthrough +KantoGymLeaders: + db BROCK + db MISTY + db LT_SURGE + db ERIKA + db JANINE + db SABRINA + db BLAINE + db BLUE + db -1 diff --git a/data/trainers/palettes.asm b/data/trainers/palettes.asm new file mode 100644 index 0000000..3429996 --- /dev/null +++ b/data/trainers/palettes.asm @@ -0,0 +1,80 @@ +TrainerPalettes: +; entries correspond to trainer classes + +; Each .gbcpal is generated from the corresponding .png, and +; only the middle two colors are included, not black or white. + + table_width PAL_COLOR_SIZE * 2, TrainerPalettes + +PlayerPalette: ; Chris uses the same colors as Cal +INCBIN "gfx/trainers/cal.gbcpal", middle_colors +KrisPalette: ; Kris shares Falkner's palette +INCBIN "gfx/trainers/falkner.gbcpal", middle_colors +INCBIN "gfx/trainers/whitney.gbcpal", middle_colors +INCBIN "gfx/trainers/bugsy.gbcpal", middle_colors +INCBIN "gfx/trainers/morty.gbcpal", middle_colors +INCBIN "gfx/trainers/pryce.gbcpal", middle_colors +INCBIN "gfx/trainers/jasmine.gbcpal", middle_colors +INCBIN "gfx/trainers/chuck.gbcpal", middle_colors +INCBIN "gfx/trainers/clair.gbcpal", middle_colors +INCBIN "gfx/trainers/rival1.gbcpal", middle_colors +INCBIN "gfx/trainers/oak.gbcpal", middle_colors +INCBIN "gfx/trainers/will.gbcpal", middle_colors +INCBIN "gfx/trainers/cal.gbcpal", middle_colors +INCBIN "gfx/trainers/bruno.gbcpal", middle_colors +INCBIN "gfx/trainers/karen.gbcpal", middle_colors +INCBIN "gfx/trainers/koga.gbcpal", middle_colors +INCBIN "gfx/trainers/champion.gbcpal", middle_colors +INCBIN "gfx/trainers/brock.gbcpal", middle_colors +INCBIN "gfx/trainers/misty.gbcpal", middle_colors +INCBIN "gfx/trainers/lt_surge.gbcpal", middle_colors +INCBIN "gfx/trainers/scientist.gbcpal", middle_colors +INCBIN "gfx/trainers/erika.gbcpal", middle_colors +INCBIN "gfx/trainers/youngster.gbcpal", middle_colors +INCBIN "gfx/trainers/schoolboy.gbcpal", middle_colors +INCBIN "gfx/trainers/bird_keeper.gbcpal", middle_colors +INCBIN "gfx/trainers/lass.gbcpal", middle_colors +INCBIN "gfx/trainers/janine.gbcpal", middle_colors +INCBIN "gfx/trainers/cooltrainer_m.gbcpal", middle_colors +INCBIN "gfx/trainers/cooltrainer_f.gbcpal", middle_colors +INCBIN "gfx/trainers/beauty.gbcpal", middle_colors +INCBIN "gfx/trainers/pokemaniac.gbcpal", middle_colors +INCBIN "gfx/trainers/grunt_m.gbcpal", middle_colors +INCBIN "gfx/trainers/gentleman.gbcpal", middle_colors +INCBIN "gfx/trainers/skier.gbcpal", middle_colors +INCBIN "gfx/trainers/teacher.gbcpal", middle_colors +INCBIN "gfx/trainers/sabrina.gbcpal", middle_colors +INCBIN "gfx/trainers/bug_catcher.gbcpal", middle_colors +INCBIN "gfx/trainers/fisher.gbcpal", middle_colors +INCBIN "gfx/trainers/swimmer_m.gbcpal", middle_colors +INCBIN "gfx/trainers/swimmer_f.gbcpal", middle_colors +INCBIN "gfx/trainers/sailor.gbcpal", middle_colors +INCBIN "gfx/trainers/super_nerd.gbcpal", middle_colors +INCBIN "gfx/trainers/rival2.gbcpal", middle_colors +INCBIN "gfx/trainers/guitarist.gbcpal", middle_colors +INCBIN "gfx/trainers/hiker.gbcpal", middle_colors +INCBIN "gfx/trainers/biker.gbcpal", middle_colors +INCBIN "gfx/trainers/blaine.gbcpal", middle_colors +INCBIN "gfx/trainers/burglar.gbcpal", middle_colors +INCBIN "gfx/trainers/firebreather.gbcpal", middle_colors +INCBIN "gfx/trainers/juggler.gbcpal", middle_colors +INCBIN "gfx/trainers/blackbelt_t.gbcpal", middle_colors +INCBIN "gfx/trainers/executive_m.gbcpal", middle_colors +INCBIN "gfx/trainers/psychic_t.gbcpal", middle_colors +INCBIN "gfx/trainers/picnicker.gbcpal", middle_colors +INCBIN "gfx/trainers/camper.gbcpal", middle_colors +INCBIN "gfx/trainers/executive_f.gbcpal", middle_colors +INCBIN "gfx/trainers/sage.gbcpal", middle_colors +INCBIN "gfx/trainers/medium.gbcpal", middle_colors +INCBIN "gfx/trainers/boarder.gbcpal", middle_colors +INCBIN "gfx/trainers/pokefan_m.gbcpal", middle_colors +INCBIN "gfx/trainers/kimono_girl.gbcpal", middle_colors +INCBIN "gfx/trainers/twins.gbcpal", middle_colors +INCBIN "gfx/trainers/pokefan_f.gbcpal", middle_colors +INCBIN "gfx/trainers/red.gbcpal", middle_colors +INCBIN "gfx/trainers/blue.gbcpal", middle_colors +INCBIN "gfx/trainers/officer.gbcpal", middle_colors +INCBIN "gfx/trainers/grunt_f.gbcpal", middle_colors +INCBIN "gfx/trainers/mysticalman.gbcpal", middle_colors + + assert_table_length NUM_TRAINER_CLASSES + 1 diff --git a/data/trainers/parties.asm b/data/trainers/parties.asm new file mode 100644 index 0000000..6a02c15 --- /dev/null +++ b/data/trainers/parties.asm @@ -0,0 +1,5276 @@ +; Trainer data structure: +; - db "NAME@", TRAINERTYPE_* constant +; - 1 to 6 Pokémon: +; * for TRAINERTYPE_NORMAL: db level, species +; * for TRAINERTYPE_MOVES: db level, species, 4 moves +; * for TRAINERTYPE_ITEM: db level, species, item +; * for TRAINERTYPE_ITEM_MOVES: db level, species, item, 4 moves +; - db -1 ; end + +SECTION "Enemy Trainer Parties 1", ROMX + +FalknerGroup: + next_list_item ; FALKNER (1) + db "FALKNER@", TRAINERTYPE_MOVES + db 7 + dw PIDGEY + dw TACKLE, MUD_SLAP, NO_MOVE, NO_MOVE + db 9 + dw PIDGEOTTO + dw TACKLE, MUD_SLAP, GUST, NO_MOVE + db -1 ; end + + end_list_items + +WhitneyGroup: + next_list_item ; WHITNEY (1) + db "WHITNEY@", TRAINERTYPE_MOVES + db 18 + dw CLEFAIRY + dw DOUBLESLAP, MIMIC, ENCORE, METRONOME + db 20 + dw MILTANK + dw ROLLOUT, ATTRACT, STOMP, MILK_DRINK + db -1 ; end + + end_list_items + +BugsyGroup: + next_list_item ; BUGSY (1) + db "BUGSY@", TRAINERTYPE_MOVES + db 14 + dw METAPOD + dw TACKLE, STRING_SHOT, HARDEN, NO_MOVE + db 14 + dw KAKUNA + dw POISON_STING, STRING_SHOT, HARDEN, NO_MOVE + db 16 + dw SCYTHER + dw QUICK_ATTACK, LEER, FURY_CUTTER, NO_MOVE + db -1 ; end + + end_list_items + +MortyGroup: + next_list_item ; MORTY (1) + db "MORTY@", TRAINERTYPE_MOVES + db 21 + dw GASTLY + dw LICK, SPITE, MEAN_LOOK, CURSE + db 21 + dw HAUNTER + dw HYPNOSIS, MIMIC, CURSE, NIGHT_SHADE + db 25 + dw GENGAR + dw HYPNOSIS, SHADOW_BALL, MEAN_LOOK, DREAM_EATER + db 23 + dw HAUNTER + dw SPITE, MEAN_LOOK, MIMIC, NIGHT_SHADE + db -1 ; end + + end_list_items + +PryceGroup: + next_list_item ; PRYCE (1) + db "PRYCE@", TRAINERTYPE_MOVES + db 27 + dw SEEL + dw HEADBUTT, ICY_WIND, AURORA_BEAM, REST + db 29 + dw DEWGONG + dw HEADBUTT, ICY_WIND, AURORA_BEAM, REST + db 31 + dw PILOSWINE + dw ICY_WIND, FURY_ATTACK, MIST, BLIZZARD + db -1 ; end + + end_list_items + +JasmineGroup: + next_list_item ; JASMINE (1) + db "JASMINE@", TRAINERTYPE_MOVES + db 30 + dw MAGNEMITE + dw THUNDERBOLT, SUPERSONIC, SONICBOOM, THUNDER_WAVE + db 30 + dw MAGNEMITE + dw THUNDERBOLT, SUPERSONIC, SONICBOOM, THUNDER_WAVE + db 35 + dw STEELIX + dw SCREECH, SUNNY_DAY, ROCK_THROW, IRON_TAIL + db -1 ; end + + end_list_items + +ChuckGroup: + next_list_item ; CHUCK (1) + db "CHUCK@", TRAINERTYPE_MOVES + db 27 + dw PRIMEAPE + dw LEER, RAGE, KARATE_CHOP, FURY_SWIPES + db 30 + dw POLIWRATH + dw HYPNOSIS, MIND_READER, SURF, DYNAMICPUNCH + db -1 ; end + + end_list_items + +ClairGroup: + next_list_item ; CLAIR (1) + db "CLAIR@", TRAINERTYPE_MOVES + db 37 + dw DRAGONAIR + dw THUNDER_WAVE, SURF, SLAM, DRAGONBREATH + db 37 + dw DRAGONAIR + dw THUNDER_WAVE, THUNDERBOLT, SLAM, DRAGONBREATH + db 37 + dw DRAGONAIR + dw THUNDER_WAVE, ICE_BEAM, SLAM, DRAGONBREATH + db 40 + dw KINGDRA + dw SMOKESCREEN, SURF, HYPER_BEAM, DRAGONBREATH + db -1 ; end + + end_list_items + +Rival1Group: + next_list_item ; RIVAL1 (1) + db "?@", TRAINERTYPE_NORMAL + db 5 + dw CHIKORITA + db -1 ; end + + next_list_item ; RIVAL1 (2) + db "?@", TRAINERTYPE_NORMAL + db 5 + dw CYNDAQUIL + db -1 ; end + + next_list_item ; RIVAL1 (3) + db "?@", TRAINERTYPE_NORMAL + db 5 + dw TOTODILE + db -1 ; end + + next_list_item ; RIVAL1 (4) + db "?@", TRAINERTYPE_NORMAL + db 12 + dw GASTLY + db 14 + dw ZUBAT + db 16 + dw BAYLEEF + db -1 ; end + + next_list_item ; RIVAL1 (5) + db "?@", TRAINERTYPE_NORMAL + db 12 + dw GASTLY + db 14 + dw ZUBAT + db 16 + dw QUILAVA + db -1 ; end + + next_list_item ; RIVAL1 (6) + db "?@", TRAINERTYPE_NORMAL + db 12 + dw GASTLY + db 14 + dw ZUBAT + db 16 + dw CROCONAW + db -1 ; end + + next_list_item ; RIVAL1 (7) + db "?@", TRAINERTYPE_MOVES + db 20 + dw HAUNTER + dw LICK, SPITE, MEAN_LOOK, CURSE + db 18 + dw MAGNEMITE + dw TACKLE, THUNDERSHOCK, SUPERSONIC, SONICBOOM + db 20 + dw ZUBAT + dw LEECH_LIFE, SUPERSONIC, BITE, CONFUSE_RAY + db 22 + dw BAYLEEF + dw GROWL, REFLECT, RAZOR_LEAF, POISONPOWDER + db -1 ; end + + next_list_item ; RIVAL1 (8) + db "?@", TRAINERTYPE_MOVES + db 20 + dw HAUNTER + dw LICK, SPITE, MEAN_LOOK, CURSE + db 18 + dw MAGNEMITE + dw TACKLE, THUNDERSHOCK, SUPERSONIC, SONICBOOM + db 20 + dw ZUBAT + dw LEECH_LIFE, SUPERSONIC, BITE, CONFUSE_RAY + db 22 + dw QUILAVA + dw LEER, SMOKESCREEN, EMBER, QUICK_ATTACK + db -1 ; end + + next_list_item ; RIVAL1 (9) + db "?@", TRAINERTYPE_MOVES + db 20 + dw HAUNTER + dw LICK, SPITE, MEAN_LOOK, CURSE + db 18 + dw MAGNEMITE + dw TACKLE, THUNDERSHOCK, SUPERSONIC, SONICBOOM + db 20 + dw ZUBAT + dw LEECH_LIFE, SUPERSONIC, BITE, CONFUSE_RAY + db 22 + dw CROCONAW + dw LEER, RAGE, WATER_GUN, BITE + db -1 ; end + + next_list_item ; RIVAL1 (10) + db "?@", TRAINERTYPE_MOVES + db 30 + dw GOLBAT + dw LEECH_LIFE, BITE, CONFUSE_RAY, WING_ATTACK + db 28 + dw MAGNEMITE + dw TACKLE, THUNDERSHOCK, SONICBOOM, THUNDER_WAVE + db 30 + dw HAUNTER + dw LICK, MEAN_LOOK, CURSE, SHADOW_BALL + db 32 + dw SNEASEL + dw LEER, QUICK_ATTACK, SCREECH, FAINT_ATTACK + db 32 + dw MEGANIUM + dw REFLECT, RAZOR_LEAF, POISONPOWDER, BODY_SLAM + db -1 ; end + + next_list_item ; RIVAL1 (11) + db "?@", TRAINERTYPE_MOVES + db 30 + dw GOLBAT + dw LEECH_LIFE, BITE, CONFUSE_RAY, WING_ATTACK + db 28 + dw MAGNEMITE + dw TACKLE, THUNDERSHOCK, SONICBOOM, THUNDER_WAVE + db 30 + dw HAUNTER + dw LICK, MEAN_LOOK, CURSE, SHADOW_BALL + db 32 + dw SNEASEL + dw LEER, QUICK_ATTACK, SCREECH, FAINT_ATTACK + db 32 + dw QUILAVA + dw SMOKESCREEN, EMBER, QUICK_ATTACK, FLAME_WHEEL + db -1 ; end + + next_list_item ; RIVAL1 (12) + db "?@", TRAINERTYPE_MOVES + db 30 + dw GOLBAT + dw LEECH_LIFE, BITE, CONFUSE_RAY, WING_ATTACK + db 28 + dw MAGNEMITE + dw TACKLE, THUNDERSHOCK, SONICBOOM, THUNDER_WAVE + db 30 + dw HAUNTER + dw LICK, MEAN_LOOK, CURSE, SHADOW_BALL + db 32 + dw SNEASEL + dw LEER, QUICK_ATTACK, SCREECH, FAINT_ATTACK + db 32 + dw FERALIGATR + dw RAGE, WATER_GUN, BITE, SCARY_FACE + db -1 ; end + + next_list_item ; RIVAL1 (13) + db "?@", TRAINERTYPE_MOVES + db 34 + dw SNEASEL + dw QUICK_ATTACK, SCREECH, FAINT_ATTACK, FURY_CUTTER + db 36 + dw GOLBAT + dw LEECH_LIFE, BITE, CONFUSE_RAY, WING_ATTACK + db 35 + dw MAGNETON + dw THUNDERSHOCK, SONICBOOM, THUNDER_WAVE, SWIFT + db 35 + dw HAUNTER + dw MEAN_LOOK, CURSE, SHADOW_BALL, CONFUSE_RAY + db 35 + dw KADABRA + dw DISABLE, PSYBEAM, RECOVER, FUTURE_SIGHT + db 38 + dw MEGANIUM + dw REFLECT, RAZOR_LEAF, POISONPOWDER, BODY_SLAM + db -1 ; end + + next_list_item ; RIVAL1 (14) + db "?@", TRAINERTYPE_MOVES + db 34 + dw SNEASEL + dw QUICK_ATTACK, SCREECH, FAINT_ATTACK, FURY_CUTTER + db 36 + dw GOLBAT + dw LEECH_LIFE, BITE, CONFUSE_RAY, WING_ATTACK + db 35 + dw MAGNETON + dw THUNDERSHOCK, SONICBOOM, THUNDER_WAVE, SWIFT + db 35 + dw HAUNTER + dw MEAN_LOOK, CURSE, SHADOW_BALL, CONFUSE_RAY + db 35 + dw KADABRA + dw DISABLE, PSYBEAM, RECOVER, FUTURE_SIGHT + db 38 + dw TYPHLOSION + dw SMOKESCREEN, EMBER, QUICK_ATTACK, FLAME_WHEEL + db -1 ; end + + next_list_item ; RIVAL1 (15) + db "?@", TRAINERTYPE_MOVES + db 34 + dw SNEASEL + dw QUICK_ATTACK, SCREECH, FAINT_ATTACK, FURY_CUTTER + db 36 + dw GOLBAT + dw LEECH_LIFE, BITE, CONFUSE_RAY, WING_ATTACK + db 34 + dw MAGNETON + dw THUNDERSHOCK, SONICBOOM, THUNDER_WAVE, SWIFT + db 35 + dw HAUNTER + dw MEAN_LOOK, CURSE, SHADOW_BALL, CONFUSE_RAY + db 35 + dw KADABRA + dw DISABLE, PSYBEAM, RECOVER, FUTURE_SIGHT + db 38 + dw FERALIGATR + dw RAGE, WATER_GUN, SCARY_FACE, SLASH + db -1 ; end + + end_list_items + +PokemonProfGroup: + +WillGroup: + next_list_item ; WILL (1) + db "WILL@", TRAINERTYPE_MOVES + db 40 + dw XATU + dw QUICK_ATTACK, FUTURE_SIGHT, CONFUSE_RAY, PSYCHIC_M + db 41 + dw JYNX + dw DOUBLESLAP, LOVELY_KISS, ICE_PUNCH, PSYCHIC_M + db 41 + dw EXEGGUTOR + dw REFLECT, LEECH_SEED, EGG_BOMB, PSYCHIC_M + db 41 + dw SLOWBRO + dw CURSE, AMNESIA, BODY_SLAM, PSYCHIC_M + db 42 + dw XATU + dw QUICK_ATTACK, FUTURE_SIGHT, CONFUSE_RAY, PSYCHIC_M + db -1 ; end + + end_list_items + +PKMNTrainerGroup: + next_list_item ; CAL (1) + db "CAL@", TRAINERTYPE_NORMAL + db 10 + dw CHIKORITA + db 10 + dw CYNDAQUIL + db 10 + dw TOTODILE + db -1 ; end + + next_list_item ; CAL (2) + db "CAL@", TRAINERTYPE_NORMAL + db 30 + dw BAYLEEF + db 30 + dw QUILAVA + db 30 + dw CROCONAW + db -1 ; end + + next_list_item ; CAL (3) + db "CAL@", TRAINERTYPE_NORMAL + db 50 + dw MEGANIUM + db 50 + dw TYPHLOSION + db 50 + dw FERALIGATR + db -1 ; end + + end_list_items + +BrunoGroup: + next_list_item ; BRUNO (1) + db "BRUNO@", TRAINERTYPE_MOVES + db 42 + dw HITMONTOP + dw PURSUIT, QUICK_ATTACK, DIG, DETECT + db 42 + dw HITMONLEE + dw SWAGGER, DOUBLE_KICK, HI_JUMP_KICK, FORESIGHT + db 42 + dw HITMONCHAN + dw THUNDERPUNCH, ICE_PUNCH, FIRE_PUNCH, MACH_PUNCH + db 43 + dw ONIX + dw BIND, EARTHQUAKE, SANDSTORM, ROCK_SLIDE + db 46 + dw MACHAMP + dw ROCK_SLIDE, FORESIGHT, VITAL_THROW, CROSS_CHOP + db -1 ; end + + end_list_items + +KarenGroup: + next_list_item ; KAREN (1) + db "KAREN@", TRAINERTYPE_MOVES + db 42 + dw UMBREON + dw SAND_ATTACK, CONFUSE_RAY, FAINT_ATTACK, MEAN_LOOK + db 42 + dw VILEPLUME + dw STUN_SPORE, ACID, MOONLIGHT, PETAL_DANCE + db 45 + dw GENGAR + dw LICK, SPITE, CURSE, DESTINY_BOND + db 44 + dw MURKROW + dw QUICK_ATTACK, WHIRLWIND, PURSUIT, FAINT_ATTACK + db 47 + dw HOUNDOOM + dw ROAR, PURSUIT, FLAMETHROWER, CRUNCH + db -1 ; end + + end_list_items + +KogaGroup: + next_list_item ; KOGA (1) + db "KOGA@", TRAINERTYPE_MOVES + db 40 + dw ARIADOS + dw DOUBLE_TEAM, SPIDER_WEB, BATON_PASS, GIGA_DRAIN + db 41 + dw VENOMOTH + dw SUPERSONIC, GUST, PSYCHIC_M, TOXIC + db 43 + dw FORRETRESS + dw PROTECT, SWIFT, EXPLOSION, SPIKES + db 42 + dw MUK + dw MINIMIZE, ACID_ARMOR, SLUDGE_BOMB, TOXIC + db 44 + dw CROBAT + dw DOUBLE_TEAM, QUICK_ATTACK, WING_ATTACK, TOXIC + db -1 ; end + + end_list_items + +ChampionGroup: + next_list_item ; CHAMPION (1) + db "LANCE@", TRAINERTYPE_MOVES + db 44 + dw GYARADOS + dw FLAIL, RAIN_DANCE, SURF, HYPER_BEAM + db 47 + dw DRAGONITE + dw THUNDER_WAVE, TWISTER, THUNDER, HYPER_BEAM + db 47 + dw DRAGONITE + dw THUNDER_WAVE, TWISTER, BLIZZARD, HYPER_BEAM + db 46 + dw AERODACTYL + dw WING_ATTACK, ANCIENTPOWER, ROCK_SLIDE, HYPER_BEAM + db 46 + dw CHARIZARD + dw FLAMETHROWER, WING_ATTACK, SLASH, HYPER_BEAM + db 50 + dw DRAGONITE + dw FIRE_BLAST, SAFEGUARD, OUTRAGE, HYPER_BEAM + db -1 ; end + + end_list_items + +BrockGroup: + next_list_item ; BROCK (1) + db "BROCK@", TRAINERTYPE_MOVES + db 41 + dw GRAVELER + dw DEFENSE_CURL, ROCK_SLIDE, ROLLOUT, EARTHQUAKE + db 41 + dw RHYHORN + dw FURY_ATTACK, SCARY_FACE, EARTHQUAKE, HORN_DRILL + db 42 + dw OMASTAR + dw BITE, SURF, PROTECT, SPIKE_CANNON + db 44 + dw ONIX + dw BIND, ROCK_SLIDE, BIDE, SANDSTORM + db 42 + dw KABUTOPS + dw SLASH, SURF, ENDURE, GIGA_DRAIN + db -1 ; end + + end_list_items + +MistyGroup: + next_list_item ; MISTY (1) + db "MISTY@", TRAINERTYPE_MOVES + db 42 + dw GOLDUCK + dw SURF, DISABLE, PSYCH_UP, PSYCHIC_M + db 42 + dw QUAGSIRE + dw SURF, AMNESIA, EARTHQUAKE, RAIN_DANCE + db 44 + dw LAPRAS + dw SURF, PERISH_SONG, BLIZZARD, RAIN_DANCE + db 47 + dw STARMIE + dw SURF, CONFUSE_RAY, RECOVER, ICE_BEAM + db -1 ; end + + end_list_items + +LtSurgeGroup: + next_list_item ; LT_SURGE (1) + db "LT.SURGE@", TRAINERTYPE_MOVES + db 44 + dw RAICHU + dw THUNDER_WAVE, QUICK_ATTACK, THUNDERBOLT, THUNDER + db 40 + dw ELECTRODE + dw SCREECH, DOUBLE_TEAM, SWIFT, EXPLOSION + db 40 + dw MAGNETON + dw LOCK_ON, DOUBLE_TEAM, SWIFT, ZAP_CANNON + db 40 + dw ELECTRODE + dw SCREECH, DOUBLE_TEAM, SWIFT, EXPLOSION + db 46 + dw ELECTABUZZ + dw QUICK_ATTACK, THUNDERPUNCH, LIGHT_SCREEN, THUNDER + db -1 ; end + + end_list_items + +ScientistGroup: + next_list_item ; SCIENTIST (1) + db "ROSS@", TRAINERTYPE_NORMAL + db 22 + dw KOFFING + db 22 + dw KOFFING + db -1 ; end + + next_list_item ; SCIENTIST (2) + db "MITCH@", TRAINERTYPE_NORMAL + db 24 + dw DITTO + db -1 ; end + + next_list_item ; SCIENTIST (3) + db "JED@", TRAINERTYPE_NORMAL + db 20 + dw MAGNEMITE + db 20 + dw MAGNEMITE + db 20 + dw MAGNEMITE + db -1 ; end + + next_list_item ; SCIENTIST (4) + db "MARC@", TRAINERTYPE_NORMAL + db 27 + dw MAGNEMITE + db 27 + dw MAGNEMITE + db 27 + dw MAGNEMITE + db -1 ; end + + next_list_item ; SCIENTIST (5) + db "RICH@", TRAINERTYPE_MOVES + db 30 + dw PORYGON + dw CONVERSION, CONVERSION2, RECOVER, TRI_ATTACK + db -1 ; end + + end_list_items + +ErikaGroup: + next_list_item ; ERIKA (1) + db "ERIKA@", TRAINERTYPE_MOVES + db 42 + dw TANGELA + dw VINE_WHIP, BIND, GIGA_DRAIN, SLEEP_POWDER + db 41 + dw JUMPLUFF + dw MEGA_DRAIN, LEECH_SEED, COTTON_SPORE, GIGA_DRAIN + db 46 + dw VICTREEBEL + dw SUNNY_DAY, SYNTHESIS, ACID, RAZOR_LEAF + db 46 + dw BELLOSSOM + dw SUNNY_DAY, SYNTHESIS, PETAL_DANCE, SOLARBEAM + db -1 ; end + + end_list_items + +YoungsterGroup: + next_list_item ; YOUNGSTER (1) + db "JOEY@", TRAINERTYPE_NORMAL + db 4 + dw RATTATA + db -1 ; end + + next_list_item ; YOUNGSTER (2) + db "MIKEY@", TRAINERTYPE_NORMAL + db 2 + dw PIDGEY + db 4 + dw RATTATA + db -1 ; end + + next_list_item ; YOUNGSTER (3) + db "ALBERT@", TRAINERTYPE_NORMAL + db 6 + dw RATTATA + db 8 + dw ZUBAT + db -1 ; end + + next_list_item ; YOUNGSTER (4) + db "GORDON@", TRAINERTYPE_NORMAL + db 10 + dw WOOPER + db -1 ; end + + next_list_item ; YOUNGSTER (5) + db "SAMUEL@", TRAINERTYPE_NORMAL + db 7 + dw RATTATA + db 10 + dw SANDSHREW + db 8 + dw SPEAROW + db 8 + dw SPEAROW + db -1 ; end + + next_list_item ; YOUNGSTER (6) + db "IAN@", TRAINERTYPE_NORMAL + db 10 + dw MANKEY + db 12 + dw DIGLETT + db -1 ; end + + next_list_item ; YOUNGSTER (7) + db "JOEY@", TRAINERTYPE_NORMAL + db 15 + dw RATTATA + db -1 ; end + + next_list_item ; YOUNGSTER (8) + db "JOEY@", TRAINERTYPE_MOVES + db 21 + dw RATICATE + dw TAIL_WHIP, QUICK_ATTACK, HYPER_FANG, SCARY_FACE + db -1 ; end + + next_list_item ; YOUNGSTER (9) + db "WARREN@", TRAINERTYPE_NORMAL + db 35 + dw FEAROW + db -1 ; end + + next_list_item ; YOUNGSTER (10) + db "JIMMY@", TRAINERTYPE_NORMAL + db 33 + dw RATICATE + db 33 + dw ARBOK + db -1 ; end + + next_list_item ; YOUNGSTER (11) + db "OWEN@", TRAINERTYPE_NORMAL + db 35 + dw GROWLITHE + db -1 ; end + + next_list_item ; YOUNGSTER (12) + db "JASON@", TRAINERTYPE_NORMAL + db 33 + dw SANDSLASH + db 33 + dw CROBAT + db -1 ; end + + next_list_item ; YOUNGSTER (13) + db "JOEY@", TRAINERTYPE_MOVES + db 30 + dw RATICATE + dw TAIL_WHIP, QUICK_ATTACK, HYPER_FANG, PURSUIT + db -1 ; end + + next_list_item ; YOUNGSTER (14) + db "JOEY@", TRAINERTYPE_MOVES + db 37 + dw RATICATE + dw HYPER_BEAM, QUICK_ATTACK, HYPER_FANG, PURSUIT + db -1 ; end + + end_list_items + +SECTION "Enemy Trainer Parties 2", ROMX + +SchoolboyGroup: + next_list_item ; SCHOOLBOY (1) + db "JACK@", TRAINERTYPE_NORMAL + db 12 + dw ODDISH + db 15 + dw VOLTORB + db -1 ; end + + next_list_item ; SCHOOLBOY (2) + db "KIPP@", TRAINERTYPE_NORMAL + db 27 + dw VOLTORB + db 27 + dw MAGNEMITE + db 31 + dw VOLTORB + db 31 + dw MAGNETON + db -1 ; end + + next_list_item ; SCHOOLBOY (3) + db "ALAN@", TRAINERTYPE_NORMAL + db 16 + dw TANGELA + db -1 ; end + + next_list_item ; SCHOOLBOY (4) + db "JOHNNY@", TRAINERTYPE_NORMAL + db 29 + dw BELLSPROUT + db 31 + dw WEEPINBELL + db 33 + dw VICTREEBEL + db -1 ; end + + next_list_item ; SCHOOLBOY (5) + db "DANNY@", TRAINERTYPE_NORMAL + db 31 + dw JYNX + db 31 + dw ELECTABUZZ + db 31 + dw MAGMAR + db -1 ; end + + next_list_item ; SCHOOLBOY (6) + db "TOMMY@", TRAINERTYPE_NORMAL + db 32 + dw XATU + db 34 + dw ALAKAZAM + db -1 ; end + + next_list_item ; SCHOOLBOY (7) + db "DUDLEY@", TRAINERTYPE_NORMAL + db 35 + dw ODDISH + db -1 ; end + + next_list_item ; SCHOOLBOY (8) + db "JOE@", TRAINERTYPE_NORMAL + db 33 + dw TANGELA + db 33 + dw VAPOREON + db -1 ; end + + next_list_item ; SCHOOLBOY (9) + db "BILLY@", TRAINERTYPE_NORMAL + db 27 + dw PARAS + db 27 + dw PARAS + db 27 + dw POLIWHIRL + db 35 + dw DITTO + db -1 ; end + + next_list_item ; SCHOOLBOY (10) + db "CHAD@", TRAINERTYPE_NORMAL + db 19 + dw MR__MIME + db -1 ; end + + next_list_item ; SCHOOLBOY (11) + db "NATE@", TRAINERTYPE_NORMAL + db 32 + dw LEDIAN + db 32 + dw EXEGGUTOR + db -1 ; end + + next_list_item ; SCHOOLBOY (12) + db "RICKY@", TRAINERTYPE_NORMAL + db 32 + dw AIPOM + db 32 + dw DITTO + db -1 ; end + + next_list_item ; SCHOOLBOY (13) + db "JACK@", TRAINERTYPE_NORMAL + db 14 + dw ODDISH + db 17 + dw VOLTORB + db -1 ; end + + next_list_item ; SCHOOLBOY (14) + db "JACK@", TRAINERTYPE_NORMAL + db 28 + dw GLOOM + db 31 + dw ELECTRODE + db -1 ; end + + next_list_item ; SCHOOLBOY (15) + db "ALAN@", TRAINERTYPE_NORMAL + db 17 + dw TANGELA + db 17 + dw YANMA + db -1 ; end + + next_list_item ; SCHOOLBOY (16) + db "ALAN@", TRAINERTYPE_NORMAL + db 20 + dw NATU + db 22 + dw TANGELA + db 20 + dw QUAGSIRE + db 25 + dw YANMA + db -1 ; end + + next_list_item ; SCHOOLBOY (17) + db "CHAD@", TRAINERTYPE_NORMAL + db 19 + dw MR__MIME + db 19 + dw MAGNEMITE + db -1 ; end + + next_list_item ; SCHOOLBOY (18) + db "CHAD@", TRAINERTYPE_NORMAL + db 27 + dw MR__MIME + db 31 + dw MAGNETON + db -1 ; end + + next_list_item ; SCHOOLBOY (19) + db "JACK@", TRAINERTYPE_NORMAL + db 30 + dw GLOOM + db 33 + dw GROWLITHE + db 33 + dw ELECTRODE + db -1 ; end + + next_list_item ; SCHOOLBOY (20) + db "JACK@", TRAINERTYPE_MOVES + db 35 + dw ELECTRODE + dw SCREECH, SONICBOOM, ROLLOUT, LIGHT_SCREEN + db 35 + dw GROWLITHE + dw SUNNY_DAY, LEER, TAKE_DOWN, FLAME_WHEEL + db 37 + dw VILEPLUME + dw SOLARBEAM, SLEEP_POWDER, ACID, MOONLIGHT + db -1 ; end + + next_list_item ; SCHOOLBOY (21) + db "ALAN@", TRAINERTYPE_NORMAL + db 27 + dw NATU + db 27 + dw TANGELA + db 30 + dw QUAGSIRE + db 30 + dw YANMA + db -1 ; end + + next_list_item ; SCHOOLBOY (22) + db "ALAN@", TRAINERTYPE_MOVES + db 35 + dw XATU + dw PECK, NIGHT_SHADE, SWIFT, FUTURE_SIGHT + db 32 + dw TANGELA + dw POISONPOWDER, VINE_WHIP, BIND, MEGA_DRAIN + db 32 + dw YANMA + dw QUICK_ATTACK, DOUBLE_TEAM, SONICBOOM, SUPERSONIC + db 35 + dw QUAGSIRE + dw TAIL_WHIP, SLAM, AMNESIA, EARTHQUAKE + db -1 ; end + + next_list_item ; SCHOOLBOY (23) + db "CHAD@", TRAINERTYPE_NORMAL + db 30 + dw MR__MIME + db 34 + dw MAGNETON + db -1 ; end + + next_list_item ; SCHOOLBOY (24) + db "CHAD@", TRAINERTYPE_MOVES + db 34 + dw MR__MIME + dw PSYCHIC_M, LIGHT_SCREEN, REFLECT, ENCORE + db 38 + dw MAGNETON + dw ZAP_CANNON, THUNDER_WAVE, LOCK_ON, SWIFT + db -1 ; end + + end_list_items + +BirdKeeperGroup: + next_list_item ; BIRD_KEEPER (1) + db "ROD@", TRAINERTYPE_NORMAL + db 7 + dw PIDGEY + db 7 + dw PIDGEY + db -1 ; end + + next_list_item ; BIRD_KEEPER (2) + db "ABE@", TRAINERTYPE_NORMAL + db 9 + dw SPEAROW + db -1 ; end + + next_list_item ; BIRD_KEEPER (3) + db "BRYAN@", TRAINERTYPE_NORMAL + db 12 + dw PIDGEY + db 14 + dw PIDGEOTTO + db -1 ; end + + next_list_item ; BIRD_KEEPER (4) + db "THEO@", TRAINERTYPE_NORMAL + db 17 + dw PIDGEY + db 15 + dw PIDGEY + db 19 + dw PIDGEY + db 15 + dw PIDGEY + db 15 + dw PIDGEY + db -1 ; end + + next_list_item ; BIRD_KEEPER (5) + db "TOBY@", TRAINERTYPE_NORMAL + db 15 + dw DODUO + db 16 + dw DODUO + db 17 + dw DODUO + db -1 ; end + + next_list_item ; BIRD_KEEPER (6) + db "DENIS@", TRAINERTYPE_NORMAL + db 18 + dw SPEAROW + db 20 + dw FEAROW + db 18 + dw SPEAROW + db -1 ; end + + next_list_item ; BIRD_KEEPER (7) + db "VANCE@", TRAINERTYPE_NORMAL + db 25 + dw PIDGEOTTO + db 25 + dw PIDGEOTTO + db -1 ; end + + next_list_item ; BIRD_KEEPER (8) + db "HANK@", TRAINERTYPE_NORMAL + db 12 + dw PIDGEY + db 34 + dw PIDGEOT + db -1 ; end + + next_list_item ; BIRD_KEEPER (9) + db "ROY@", TRAINERTYPE_NORMAL + db 29 + dw FEAROW + db 35 + dw FEAROW + db -1 ; end + + next_list_item ; BIRD_KEEPER (10) + db "BORIS@", TRAINERTYPE_NORMAL + db 30 + dw DODUO + db 28 + dw DODUO + db 32 + dw DODRIO + db -1 ; end + + next_list_item ; BIRD_KEEPER (11) + db "BOB@", TRAINERTYPE_NORMAL + db 34 + dw NOCTOWL + db -1 ; end + + next_list_item ; BIRD_KEEPER (12) + db "JOSE@", TRAINERTYPE_NORMAL + db 36 + dw FARFETCH_D + db -1 ; end + + next_list_item ; BIRD_KEEPER (13) + db "PETER@", TRAINERTYPE_NORMAL + db 6 + dw PIDGEY + db 6 + dw PIDGEY + db 8 + dw SPEAROW + db -1 ; end + + next_list_item ; BIRD_KEEPER (14) + db "JOSE@", TRAINERTYPE_NORMAL + db 34 + dw FARFETCH_D + db -1 ; end + + next_list_item ; BIRD_KEEPER (15) + db "PERRY@", TRAINERTYPE_NORMAL + db 34 + dw FARFETCH_D + db -1 ; end + + next_list_item ; BIRD_KEEPER (16) + db "BRET@", TRAINERTYPE_NORMAL + db 32 + dw PIDGEOTTO + db 32 + dw FEAROW + db -1 ; end + + next_list_item ; BIRD_KEEPER (17) + db "JOSE@", TRAINERTYPE_MOVES + db 40 + dw FARFETCH_D + dw FURY_ATTACK, DETECT, FLY, SLASH + db -1 ; end + + next_list_item ; BIRD_KEEPER (18) + db "VANCE@", TRAINERTYPE_NORMAL + db 32 + dw PIDGEOTTO + db 32 + dw PIDGEOTTO + db -1 ; end + + next_list_item ; BIRD_KEEPER (19) + db "VANCE@", TRAINERTYPE_MOVES + db 38 + dw PIDGEOT + dw TOXIC, QUICK_ATTACK, WHIRLWIND, FLY + db 38 + dw PIDGEOT + dw SWIFT, DETECT, STEEL_WING, FLY + db -1 ; end + + end_list_items + +LassGroup: + next_list_item ; LASS (1) + db "CARRIE@", TRAINERTYPE_MOVES + db 18 + dw SNUBBULL + dw SCARY_FACE, CHARM, BITE, LICK + db -1 ; end + + next_list_item ; LASS (2) + db "BRIDGET@", TRAINERTYPE_NORMAL + db 15 + dw JIGGLYPUFF + db 15 + dw JIGGLYPUFF + db 15 + dw JIGGLYPUFF + db -1 ; end + + next_list_item ; LASS (3) + db "ALICE@", TRAINERTYPE_NORMAL + db 30 + dw GLOOM + db 34 + dw ARBOK + db 30 + dw GLOOM + db -1 ; end + + next_list_item ; LASS (4) + db "KRISE@", TRAINERTYPE_NORMAL + db 12 + dw ODDISH + db 15 + dw CUBONE + db -1 ; end + + next_list_item ; LASS (5) + db "CONNIE@", TRAINERTYPE_NORMAL + db 21 + dw MARILL + db -1 ; end + + next_list_item ; LASS (6) + db "LINDA@", TRAINERTYPE_NORMAL + db 30 + dw BULBASAUR + db 32 + dw IVYSAUR + db 34 + dw VENUSAUR + db -1 ; end + + next_list_item ; LASS (7) + db "LAURA@", TRAINERTYPE_NORMAL + db 28 + dw GLOOM + db 31 + dw PIDGEOTTO + db 31 + dw BELLOSSOM + db -1 ; end + + next_list_item ; LASS (8) + db "SHANNON@", TRAINERTYPE_NORMAL + db 29 + dw PARAS + db 29 + dw PARAS + db 32 + dw PARASECT + db -1 ; end + + next_list_item ; LASS (9) + db "MICHELLE@", TRAINERTYPE_NORMAL + db 32 + dw SKIPLOOM + db 33 + dw HOPPIP + db 34 + dw JUMPLUFF + db -1 ; end + + next_list_item ; LASS (10) + db "DANA@", TRAINERTYPE_MOVES + db 18 + dw FLAAFFY + dw TACKLE, GROWL, THUNDERSHOCK, THUNDER_WAVE + db 18 + dw PSYDUCK + dw SCRATCH, TAIL_WHIP, DISABLE, CONFUSION + db -1 ; end + + next_list_item ; LASS (11) + db "ELLEN@", TRAINERTYPE_NORMAL + db 30 + dw WIGGLYTUFF + db 34 + dw GRANBULL + db -1 ; end + + next_list_item ; LASS (12) + db "CONNIE@", TRAINERTYPE_NORMAL + db 21 + dw MARILL + db -1 ; end + + next_list_item ; LASS (13) + db "CONNIE@", TRAINERTYPE_NORMAL + db 21 + dw MARILL + db -1 ; end + + next_list_item ; LASS (14) + db "DANA@", TRAINERTYPE_MOVES + db 21 + dw FLAAFFY + dw TACKLE, GROWL, THUNDERSHOCK, THUNDER_WAVE + db 21 + dw PSYDUCK + dw SCRATCH, TAIL_WHIP, DISABLE, CONFUSION + db -1 ; end + + next_list_item ; LASS (15) + db "DANA@", TRAINERTYPE_MOVES + db 29 + dw PSYDUCK + dw SCRATCH, DISABLE, CONFUSION, SCREECH + db 29 + dw AMPHAROS + dw TACKLE, THUNDERSHOCK, THUNDER_WAVE, COTTON_SPORE + db -1 ; end + + next_list_item ; LASS (16) + db "DANA@", TRAINERTYPE_MOVES + db 32 + dw PSYDUCK + dw SCRATCH, DISABLE, CONFUSION, SCREECH + db 32 + dw AMPHAROS + dw TACKLE, THUNDERPUNCH, THUNDER_WAVE, COTTON_SPORE + db -1 ; end + + next_list_item ; LASS (17) + db "DANA@", TRAINERTYPE_MOVES + db 36 + dw AMPHAROS + dw SWIFT, THUNDERPUNCH, THUNDER_WAVE, COTTON_SPORE + db 36 + dw GOLDUCK + dw DISABLE, SURF, PSYCHIC_M, SCREECH + db -1 ; end + + end_list_items + +JanineGroup: + next_list_item ; JANINE (1) + db "JANINE@", TRAINERTYPE_MOVES + db 36 + dw CROBAT + dw SCREECH, SUPERSONIC, CONFUSE_RAY, WING_ATTACK + db 36 + dw WEEZING + dw SMOG, SLUDGE_BOMB, TOXIC, EXPLOSION + db 36 + dw WEEZING + dw SMOG, SLUDGE_BOMB, TOXIC, EXPLOSION + db 33 + dw ARIADOS + dw SCARY_FACE, GIGA_DRAIN, STRING_SHOT, NIGHT_SHADE + db 39 + dw VENOMOTH + dw FORESIGHT, DOUBLE_TEAM, GUST, PSYCHIC_M + db -1 ; end + + end_list_items + +CooltrainerMGroup: + next_list_item ; COOLTRAINERM (1) + db "NICK@", TRAINERTYPE_MOVES + db 26 + dw CHARMANDER + dw EMBER, SMOKESCREEN, RAGE, SCARY_FACE + db 26 + dw SQUIRTLE + dw WITHDRAW, WATER_GUN, BITE, CURSE + db 26 + dw BULBASAUR + dw LEECH_SEED, POISONPOWDER, SLEEP_POWDER, RAZOR_LEAF + db -1 ; end + + next_list_item ; COOLTRAINERM (2) + db "AARON@", TRAINERTYPE_NORMAL + db 24 + dw IVYSAUR + db 24 + dw CHARMELEON + db 24 + dw WARTORTLE + db -1 ; end + + next_list_item ; COOLTRAINERM (3) + db "PAUL@", TRAINERTYPE_NORMAL + db 34 + dw DRATINI + db 34 + dw DRATINI + db 34 + dw DRATINI + db -1 ; end + + next_list_item ; COOLTRAINERM (4) + db "CODY@", TRAINERTYPE_NORMAL + db 34 + dw HORSEA + db 36 + dw SEADRA + db -1 ; end + + next_list_item ; COOLTRAINERM (5) + db "MIKE@", TRAINERTYPE_NORMAL + db 37 + dw DRAGONAIR + db -1 ; end + + next_list_item ; COOLTRAINERM (6) + db "GAVEN@", TRAINERTYPE_MOVES + db 35 + dw VICTREEBEL + dw WRAP, TOXIC, ACID, RAZOR_LEAF + db 35 + dw KINGLER + dw BUBBLEBEAM, STOMP, GUILLOTINE, PROTECT + db 35 + dw FLAREON + dw SAND_ATTACK, QUICK_ATTACK, BITE, FIRE_SPIN + db -1 ; end + + next_list_item ; COOLTRAINERM (7) + db "GAVEN@", TRAINERTYPE_ITEM_MOVES + db 39 + dw VICTREEBEL + db NO_ITEM + dw GIGA_DRAIN, TOXIC, SLUDGE_BOMB, RAZOR_LEAF + db 39 + dw KINGLER + db KINGS_ROCK + dw SURF, STOMP, GUILLOTINE, BLIZZARD + db 39 + dw FLAREON + db NO_ITEM + dw FLAMETHROWER, QUICK_ATTACK, BITE, FIRE_SPIN + db -1 ; end + + next_list_item ; COOLTRAINERM (8) + db "RYAN@", TRAINERTYPE_MOVES + db 25 + dw PIDGEOT + dw SAND_ATTACK, QUICK_ATTACK, WHIRLWIND, WING_ATTACK + db 27 + dw ELECTABUZZ + dw THUNDERPUNCH, LIGHT_SCREEN, SWIFT, SCREECH + db -1 ; end + + next_list_item ; COOLTRAINERM (9) + db "JAKE@", TRAINERTYPE_MOVES + db 33 + dw PARASECT + dw LEECH_LIFE, SPORE, SLASH, SWORDS_DANCE + db 35 + dw GOLDUCK + dw CONFUSION, SCREECH, PSYCH_UP, FURY_SWIPES + db -1 ; end + + next_list_item ; COOLTRAINERM (10) + db "GAVEN@", TRAINERTYPE_MOVES + db 32 + dw VICTREEBEL + dw WRAP, TOXIC, ACID, RAZOR_LEAF + db 32 + dw KINGLER + dw BUBBLEBEAM, STOMP, GUILLOTINE, PROTECT + db 32 + dw FLAREON + dw SAND_ATTACK, QUICK_ATTACK, BITE, FIRE_SPIN + db -1 ; end + + next_list_item ; COOLTRAINERM (11) + db "BLAKE@", TRAINERTYPE_MOVES + db 33 + dw MAGNETON + dw THUNDERBOLT, SUPERSONIC, SWIFT, SCREECH + db 31 + dw QUAGSIRE + dw WATER_GUN, SLAM, AMNESIA, EARTHQUAKE + db 31 + dw EXEGGCUTE + dw LEECH_SEED, CONFUSION, SLEEP_POWDER, SOLARBEAM + db -1 ; end + + next_list_item ; COOLTRAINERM (12) + db "BRIAN@", TRAINERTYPE_MOVES + db 35 + dw SANDSLASH + dw SAND_ATTACK, POISON_STING, SLASH, SWIFT + db -1 ; end + + next_list_item ; COOLTRAINERM (13) + db "ERICK@", TRAINERTYPE_NORMAL + db 10 + dw BULBASAUR + db 10 + dw CHARMANDER + db 10 + dw SQUIRTLE + db -1 ; end + + next_list_item ; COOLTRAINERM (14) + db "ANDY@", TRAINERTYPE_NORMAL + db 10 + dw BULBASAUR + db 10 + dw CHARMANDER + db 10 + dw SQUIRTLE + db -1 ; end + + next_list_item ; COOLTRAINERM (15) + db "TYLER@", TRAINERTYPE_NORMAL + db 10 + dw BULBASAUR + db 10 + dw CHARMANDER + db 10 + dw SQUIRTLE + db -1 ; end + + next_list_item ; COOLTRAINERM (16) + db "SEAN@", TRAINERTYPE_NORMAL + db 35 + dw FLAREON + db 35 + dw TANGELA + db 35 + dw TAUROS + db -1 ; end + + next_list_item ; COOLTRAINERM (17) + db "KEVIN@", TRAINERTYPE_NORMAL + db 38 + dw RHYHORN + db 35 + dw CHARMELEON + db 35 + dw WARTORTLE + db -1 ; end + + next_list_item ; COOLTRAINERM (18) + db "STEVE@", TRAINERTYPE_NORMAL + db 14 + dw BULBASAUR + db 14 + dw CHARMANDER + db 14 + dw SQUIRTLE + db -1 ; end + + next_list_item ; COOLTRAINERM (19) + db "ALLEN@", TRAINERTYPE_MOVES + db 27 + dw CHARMELEON + dw EMBER, SMOKESCREEN, RAGE, SCARY_FACE + db -1 ; end + + next_list_item ; COOLTRAINERM (20) + db "DARIN@", TRAINERTYPE_MOVES + db 37 + dw DRAGONAIR + dw WRAP, SURF, DRAGON_RAGE, SLAM + db -1 ; end + + end_list_items + +CooltrainerFGroup: + next_list_item ; COOLTRAINERF (1) + db "GWEN@", TRAINERTYPE_NORMAL + db 26 + dw EEVEE + db 22 + dw FLAREON + db 22 + dw VAPOREON + db 22 + dw JOLTEON + db -1 ; end + + next_list_item ; COOLTRAINERF (2) + db "LOIS@", TRAINERTYPE_MOVES + db 25 + dw SKIPLOOM + dw SYNTHESIS, POISONPOWDER, MEGA_DRAIN, LEECH_SEED + db 25 + dw NINETALES + dw EMBER, QUICK_ATTACK, CONFUSE_RAY, SAFEGUARD + db -1 ; end + + next_list_item ; COOLTRAINERF (3) + db "FRAN@", TRAINERTYPE_NORMAL + db 37 + dw SEADRA + db -1 ; end + + next_list_item ; COOLTRAINERF (4) + db "LOLA@", TRAINERTYPE_NORMAL + db 34 + dw DRATINI + db 36 + dw DRAGONAIR + db -1 ; end + + next_list_item ; COOLTRAINERF (5) + db "KATE@", TRAINERTYPE_NORMAL + db 26 + dw SHELLDER + db 28 + dw CLOYSTER + db -1 ; end + + next_list_item ; COOLTRAINERF (6) + db "IRENE@", TRAINERTYPE_NORMAL + db 22 + dw GOLDEEN + db 24 + dw SEAKING + db -1 ; end + + next_list_item ; COOLTRAINERF (7) + db "KELLY@", TRAINERTYPE_NORMAL + db 27 + dw MARILL + db 24 + dw WARTORTLE + db 24 + dw WARTORTLE + db -1 ; end + + next_list_item ; COOLTRAINERF (8) + db "JOYCE@", TRAINERTYPE_MOVES + db 36 + dw PIKACHU + dw QUICK_ATTACK, DOUBLE_TEAM, THUNDERBOLT, THUNDER + db 32 + dw BLASTOISE + dw BITE, CURSE, SURF, RAIN_DANCE + db -1 ; end + + next_list_item ; COOLTRAINERF (9) + db "BETH@", TRAINERTYPE_MOVES + db 36 + dw RAPIDASH + dw STOMP, FIRE_SPIN, FURY_ATTACK, AGILITY + db -1 ; end + + next_list_item ; COOLTRAINERF (10) + db "REENA@", TRAINERTYPE_NORMAL + db 31 + dw STARMIE + db 33 + dw NIDOQUEEN + db 31 + dw STARMIE + db -1 ; end + + next_list_item ; COOLTRAINERF (11) + db "MEGAN@", TRAINERTYPE_MOVES + db 32 + dw BULBASAUR + dw GROWL, LEECH_SEED, POISONPOWDER, RAZOR_LEAF + db 32 + dw IVYSAUR + dw GROWL, LEECH_SEED, POISONPOWDER, RAZOR_LEAF + db 32 + dw VENUSAUR + dw BODY_SLAM, SLEEP_POWDER, RAZOR_LEAF, SWEET_SCENT + db -1 ; end + + next_list_item ; COOLTRAINERF (12) + db "BETH@", TRAINERTYPE_MOVES + db 39 + dw RAPIDASH + dw STOMP, FIRE_SPIN, FURY_ATTACK, AGILITY + db -1 ; end + + next_list_item ; COOLTRAINERF (13) + db "CAROL@", TRAINERTYPE_NORMAL + db 35 + dw ELECTRODE + db 35 + dw STARMIE + db 35 + dw NINETALES + db -1 ; end + + next_list_item ; COOLTRAINERF (14) + db "QUINN@", TRAINERTYPE_NORMAL + db 38 + dw IVYSAUR + db 38 + dw STARMIE + db -1 ; end + + next_list_item ; COOLTRAINERF (15) + db "EMMA@", TRAINERTYPE_NORMAL + db 28 + dw POLIWHIRL + db -1 ; end + + next_list_item ; COOLTRAINERF (16) + db "CYBIL@", TRAINERTYPE_MOVES + db 25 + dw BUTTERFREE + dw CONFUSION, SLEEP_POWDER, WHIRLWIND, GUST + db 25 + dw BELLOSSOM + dw ABSORB, STUN_SPORE, ACID, SOLARBEAM + db -1 ; end + + next_list_item ; COOLTRAINERF (17) + db "JENN@", TRAINERTYPE_NORMAL + db 24 + dw STARYU + db 26 + dw STARMIE + db -1 ; end + + next_list_item ; COOLTRAINERF (18) + db "BETH@", TRAINERTYPE_ITEM_MOVES + db 43 + dw RAPIDASH + db FOCUS_BAND + dw STOMP, FIRE_SPIN, FURY_ATTACK, FIRE_BLAST + db -1 ; end + + next_list_item ; COOLTRAINERF (19) + db "REENA@", TRAINERTYPE_NORMAL + db 34 + dw STARMIE + db 36 + dw NIDOQUEEN + db 34 + dw STARMIE + db -1 ; end + + next_list_item ; COOLTRAINERF (20) + db "REENA@", TRAINERTYPE_ITEM_MOVES + db 38 + dw STARMIE + db NO_ITEM + dw DOUBLE_TEAM, PSYCHIC_M, WATERFALL, CONFUSE_RAY + db 40 + dw NIDOQUEEN + db PINK_BOW + dw EARTHQUAKE, DOUBLE_KICK, TOXIC, BODY_SLAM + db 38 + dw STARMIE + db NO_ITEM + dw BLIZZARD, PSYCHIC_M, WATERFALL, RECOVER + db -1 ; end + + next_list_item ; COOLTRAINERF (21) + db "CARA@", TRAINERTYPE_MOVES + db 33 + dw HORSEA + dw SMOKESCREEN, LEER, WHIRLPOOL, TWISTER + db 33 + dw HORSEA + dw SMOKESCREEN, LEER, WHIRLPOOL, TWISTER + db 35 + dw SEADRA + dw SWIFT, LEER, WATERFALL, TWISTER + db -1 ; end + + end_list_items + +BeautyGroup: + next_list_item ; BEAUTY (1) + db "VICTORIA@", TRAINERTYPE_NORMAL + db 9 + dw SENTRET + db 13 + dw SENTRET + db 17 + dw SENTRET + db -1 ; end + + next_list_item ; BEAUTY (2) + db "SAMANTHA@", TRAINERTYPE_MOVES + db 16 + dw MEOWTH + dw SCRATCH, GROWL, BITE, PAY_DAY + db 16 + dw MEOWTH + dw SCRATCH, GROWL, BITE, SLASH + db -1 ; end + + next_list_item ; BEAUTY (3) + db "JULIE@", TRAINERTYPE_NORMAL + db 15 + dw SENTRET + db -1 ; end + + next_list_item ; BEAUTY (4) + db "JACLYN@", TRAINERTYPE_NORMAL + db 15 + dw SENTRET + db -1 ; end + + next_list_item ; BEAUTY (5) + db "BRENDA@", TRAINERTYPE_NORMAL + db 16 + dw FURRET + db -1 ; end + + next_list_item ; BEAUTY (6) + db "CASSIE@", TRAINERTYPE_NORMAL + db 28 + dw VILEPLUME + db 34 + dw BUTTERFREE + db -1 ; end + + next_list_item ; BEAUTY (7) + db "CAROLINE@", TRAINERTYPE_NORMAL + db 30 + dw MARILL + db 32 + dw SEEL + db 30 + dw MARILL + db -1 ; end + + next_list_item ; BEAUTY (8) + db "CARLENE@", TRAINERTYPE_NORMAL + db 15 + dw SENTRET + db -1 ; end + + next_list_item ; BEAUTY (9) + db "JESSICA@", TRAINERTYPE_NORMAL + db 15 + dw SENTRET + db -1 ; end + + next_list_item ; BEAUTY (10) + db "RACHAEL@", TRAINERTYPE_NORMAL + db 15 + dw SENTRET + db -1 ; end + + next_list_item ; BEAUTY (11) + db "ANGELICA@", TRAINERTYPE_NORMAL + db 15 + dw SENTRET + db -1 ; end + + next_list_item ; BEAUTY (12) + db "KENDRA@", TRAINERTYPE_NORMAL + db 15 + dw SENTRET + db -1 ; end + + next_list_item ; BEAUTY (13) + db "VERONICA@", TRAINERTYPE_NORMAL + db 15 + dw SENTRET + db -1 ; end + + next_list_item ; BEAUTY (14) + db "JULIA@", TRAINERTYPE_NORMAL + db 32 + dw PARAS + db 32 + dw EXEGGCUTE + db 35 + dw PARASECT + db -1 ; end + + next_list_item ; BEAUTY (15) + db "THERESA@", TRAINERTYPE_NORMAL + db 15 + dw SENTRET + db -1 ; end + + next_list_item ; BEAUTY (16) + db "VALERIE@", TRAINERTYPE_MOVES + db 17 + dw HOPPIP + dw SYNTHESIS, TAIL_WHIP, TACKLE, POISONPOWDER + db 17 + dw SKIPLOOM + dw SYNTHESIS, TAIL_WHIP, TACKLE, STUN_SPORE + db -1 ; end + + next_list_item ; BEAUTY (17) + db "OLIVIA@", TRAINERTYPE_NORMAL + db 19 + dw CORSOLA + db -1 ; end + + end_list_items + +PokemaniacGroup: + next_list_item ; POKEMANIAC (1) + db "LARRY@", TRAINERTYPE_NORMAL + db 10 + dw SLOWPOKE + db -1 ; end + + next_list_item ; POKEMANIAC (2) + db "ANDREW@", TRAINERTYPE_NORMAL + db 24 + dw MAROWAK + db 24 + dw MAROWAK + db -1 ; end + + next_list_item ; POKEMANIAC (3) + db "CALVIN@", TRAINERTYPE_NORMAL + db 26 + dw KANGASKHAN + db -1 ; end + + next_list_item ; POKEMANIAC (4) + db "SHANE@", TRAINERTYPE_NORMAL + db 16 + dw NIDORINA + db 16 + dw NIDORINO + db -1 ; end + + next_list_item ; POKEMANIAC (5) + db "BEN@", TRAINERTYPE_NORMAL + db 19 + dw SLOWBRO + db -1 ; end + + next_list_item ; POKEMANIAC (6) + db "BRENT@", TRAINERTYPE_NORMAL + db 19 + dw LICKITUNG + db -1 ; end + + next_list_item ; POKEMANIAC (7) + db "RON@", TRAINERTYPE_NORMAL + db 19 + dw NIDOKING + db -1 ; end + + next_list_item ; POKEMANIAC (8) + db "ETHAN@", TRAINERTYPE_NORMAL + db 31 + dw RHYHORN + db 31 + dw RHYDON + db -1 ; end + + next_list_item ; POKEMANIAC (9) + db "BRENT@", TRAINERTYPE_NORMAL + db 25 + dw KANGASKHAN + db -1 ; end + + next_list_item ; POKEMANIAC (10) + db "BRENT@", TRAINERTYPE_MOVES + db 36 + dw PORYGON + dw RECOVER, PSYCHIC_M, CONVERSION2, TRI_ATTACK + db -1 ; end + + next_list_item ; POKEMANIAC (11) + db "ISSAC@", TRAINERTYPE_MOVES + db 12 + dw LICKITUNG + dw LICK, SUPERSONIC, CUT, NO_MOVE + db -1 ; end + + next_list_item ; POKEMANIAC (12) + db "DONALD@", TRAINERTYPE_NORMAL + db 10 + dw SLOWPOKE + db 10 + dw SLOWPOKE + db -1 ; end + + next_list_item ; POKEMANIAC (13) + db "ZACH@", TRAINERTYPE_NORMAL + db 27 + dw RHYHORN + db -1 ; end + + next_list_item ; POKEMANIAC (14) + db "BRENT@", TRAINERTYPE_MOVES + db 41 + dw CHANSEY + dw ROLLOUT, ATTRACT, EGG_BOMB, SOFTBOILED + db -1 ; end + + next_list_item ; POKEMANIAC (15) + db "MILLER@", TRAINERTYPE_NORMAL + db 17 + dw NIDOKING + db 17 + dw NIDOQUEEN + db -1 ; end + + end_list_items + +GruntMGroup: + next_list_item ; GRUNTM (1) + db "GRUNT@", TRAINERTYPE_NORMAL + db 14 + dw KOFFING + db -1 ; end + + next_list_item ; GRUNTM (2) + db "GRUNT@", TRAINERTYPE_NORMAL + db 7 + dw RATTATA + db 9 + dw ZUBAT + db 9 + dw ZUBAT + db -1 ; end + + next_list_item ; GRUNTM (3) + db "GRUNT@", TRAINERTYPE_NORMAL + db 24 + dw RATICATE + db 24 + dw RATICATE + db -1 ; end + + next_list_item ; GRUNTM (4) + db "GRUNT@", TRAINERTYPE_NORMAL + db 23 + dw GRIMER + db 23 + dw GRIMER + db 25 + dw MUK + db -1 ; end + + next_list_item ; GRUNTM (5) + db "GRUNT@", TRAINERTYPE_NORMAL + db 21 + dw RATTATA + db 21 + dw RATTATA + db 23 + dw RATTATA + db 23 + dw RATTATA + db 23 + dw RATTATA + db -1 ; end + + next_list_item ; GRUNTM (6) + db "GRUNT@", TRAINERTYPE_NORMAL + db 26 + dw ZUBAT + db 26 + dw ZUBAT + db -1 ; end + + next_list_item ; GRUNTM (7) + db "GRUNT@", TRAINERTYPE_NORMAL + db 23 + dw KOFFING + db 23 + dw GRIMER + db 23 + dw ZUBAT + db 23 + dw RATTATA + db -1 ; end + + next_list_item ; GRUNTM (8) + db "GRUNT@", TRAINERTYPE_NORMAL + db 26 + dw WEEZING + db -1 ; end + + next_list_item ; GRUNTM (9) + db "GRUNT@", TRAINERTYPE_NORMAL + db 24 + dw RATICATE + db 26 + dw KOFFING + db -1 ; end + + next_list_item ; GRUNTM (10) + db "GRUNT@", TRAINERTYPE_NORMAL + db 22 + dw ZUBAT + db 24 + dw GOLBAT + db 22 + dw GRIMER + db -1 ; end + + next_list_item ; GRUNTM (11) + db "GRUNT@", TRAINERTYPE_NORMAL + db 23 + dw MUK + db 23 + dw KOFFING + db 25 + dw RATTATA + db -1 ; end + + next_list_item ; GRUNTM (12) + db "EXECUTIVE@", TRAINERTYPE_NORMAL + db 33 + dw HOUNDOUR + db -1 ; end + + next_list_item ; GRUNTM (13) + db "GRUNT@", TRAINERTYPE_NORMAL + db 27 + dw RATTATA + db -1 ; end + + next_list_item ; GRUNTM (14) + db "GRUNT@", TRAINERTYPE_NORMAL + db 24 + dw RATICATE + db 24 + dw GOLBAT + db -1 ; end + + next_list_item ; GRUNTM (15) + db "GRUNT@", TRAINERTYPE_NORMAL + db 26 + dw GRIMER + db 23 + dw WEEZING + db -1 ; end + + next_list_item ; GRUNTM (16) + db "GRUNT@", TRAINERTYPE_NORMAL + db 16 + dw RATTATA + db 16 + dw RATTATA + db 16 + dw RATTATA + db 16 + dw RATTATA + db -1 ; end + + next_list_item ; GRUNTM (17) + db "GRUNT@", TRAINERTYPE_NORMAL + db 18 + dw GOLBAT + db -1 ; end + + next_list_item ; GRUNTM (18) + db "GRUNT@", TRAINERTYPE_NORMAL + db 17 + dw RATTATA + db 17 + dw ZUBAT + db 17 + dw RATTATA + db -1 ; end + + next_list_item ; GRUNTM (19) + db "GRUNT@", TRAINERTYPE_NORMAL + db 18 + dw VENONAT + db 18 + dw VENONAT + db -1 ; end + + next_list_item ; GRUNTM (20) + db "GRUNT@", TRAINERTYPE_NORMAL + db 17 + dw DROWZEE + db 19 + dw ZUBAT + db -1 ; end + + next_list_item ; GRUNTM (21) + db "GRUNT@", TRAINERTYPE_NORMAL + db 16 + dw ZUBAT + db 17 + dw GRIMER + db 18 + dw RATTATA + db -1 ; end + + next_list_item ; GRUNTM (22) + db "EXECUTIVE@", TRAINERTYPE_NORMAL + db 36 + dw GOLBAT + db -1 ; end + + next_list_item ; GRUNTM (23) + db "EXECUTIVE@", TRAINERTYPE_NORMAL + db 30 + dw KOFFING + db -1 ; end + + next_list_item ; GRUNTM (24) + db "GRUNT@", TRAINERTYPE_NORMAL + db 25 + dw KOFFING + db 25 + dw KOFFING + db -1 ; end + + next_list_item ; GRUNTM (25) + db "GRUNT@", TRAINERTYPE_NORMAL + db 24 + dw KOFFING + db 24 + dw MUK + db -1 ; end + + next_list_item ; GRUNTM (26) + db "GRUNT@", TRAINERTYPE_NORMAL + db 15 + dw RATTATA + db 15 + dw RATTATA + db -1 ; end + + next_list_item ; GRUNTM (27) + db "EXECUTIVE@", TRAINERTYPE_NORMAL + db 22 + dw ZUBAT + db -1 ; end + + next_list_item ; GRUNTM (28) + db "GRUNT@", TRAINERTYPE_NORMAL + db 19 + dw RATICATE + db -1 ; end + + next_list_item ; GRUNTM (29) + db "GRUNT@", TRAINERTYPE_NORMAL + db 9 + dw RATTATA + db 9 + dw RATTATA + db -1 ; end + + next_list_item ; GRUNTM (30) + db "GRUNT@", TRAINERTYPE_NORMAL + db 25 + dw GOLBAT + db 25 + dw GOLBAT + db 30 + dw ARBOK + db -1 ; end + + next_list_item ; GRUNTM (31) + db "GRUNT@", TRAINERTYPE_NORMAL + db 30 + dw GOLBAT + db -1 ; end + + end_list_items + +GentlemanGroup: + next_list_item ; GENTLEMAN (1) + db "PRESTON@", TRAINERTYPE_NORMAL + db 18 + dw GROWLITHE + db 18 + dw GROWLITHE + db -1 ; end + + next_list_item ; GENTLEMAN (2) + db "EDWARD@", TRAINERTYPE_NORMAL + db 33 + dw PERSIAN + db -1 ; end + + next_list_item ; GENTLEMAN (3) + db "GREGORY@", TRAINERTYPE_NORMAL + db 37 + dw PIKACHU + db 33 + dw FLAAFFY + db -1 ; end + + next_list_item ; GENTLEMAN (4) + db "VIRGIL@", TRAINERTYPE_NORMAL + db 20 + dw PONYTA + db -1 ; end + + next_list_item ; GENTLEMAN (5) + db "ALFRED@", TRAINERTYPE_NORMAL + db 20 + dw NOCTOWL + db -1 ; end + + end_list_items + +SkierGroup: + next_list_item ; SKIER (1) + db "ROXANNE@", TRAINERTYPE_NORMAL + db 28 + dw JYNX + db -1 ; end + + next_list_item ; SKIER (2) + db "CLARISSA@", TRAINERTYPE_NORMAL + db 28 + dw DEWGONG + db -1 ; end + + end_list_items + +TeacherGroup: + next_list_item ; TEACHER (1) + db "COLETTE@", TRAINERTYPE_NORMAL + db 36 + dw CLEFAIRY + db -1 ; end + + next_list_item ; TEACHER (2) + db "HILLARY@", TRAINERTYPE_NORMAL + db 32 + dw AIPOM + db 36 + dw CUBONE + db -1 ; end + + next_list_item ; TEACHER (3) + db "SHIRLEY@", TRAINERTYPE_NORMAL + db 35 + dw JIGGLYPUFF + db -1 ; end + + end_list_items + +SabrinaGroup: + next_list_item ; SABRINA (1) + db "SABRINA@", TRAINERTYPE_MOVES + db 46 + dw ESPEON + dw SAND_ATTACK, QUICK_ATTACK, SWIFT, PSYCHIC_M + db 46 + dw MR__MIME + dw BARRIER, REFLECT, BATON_PASS, PSYCHIC_M + db 48 + dw ALAKAZAM + dw RECOVER, FUTURE_SIGHT, PSYCHIC_M, REFLECT + db -1 ; end + + end_list_items + +BugCatcherGroup: + next_list_item ; BUG_CATCHER (1) + db "DON@", TRAINERTYPE_NORMAL + db 3 + dw CATERPIE + db 3 + dw CATERPIE + db -1 ; end + + next_list_item ; BUG_CATCHER (2) + db "ROB@", TRAINERTYPE_NORMAL + db 32 + dw BEEDRILL + db 32 + dw BUTTERFREE + db -1 ; end + + next_list_item ; BUG_CATCHER (3) + db "ED@", TRAINERTYPE_NORMAL + db 30 + dw BEEDRILL + db 30 + dw BEEDRILL + db 30 + dw BEEDRILL + db -1 ; end + + next_list_item ; BUG_CATCHER (4) + db "WADE@", TRAINERTYPE_NORMAL + db 2 + dw CATERPIE + db 2 + dw CATERPIE + db 3 + dw WEEDLE + db 2 + dw CATERPIE + db -1 ; end + + next_list_item ; BUG_CATCHER (5) + db "BENNY@", TRAINERTYPE_NORMAL + db 7 + dw WEEDLE + db 9 + dw KAKUNA + db 12 + dw BEEDRILL + db -1 ; end + + next_list_item ; BUG_CATCHER (6) + db "AL@", TRAINERTYPE_NORMAL + db 12 + dw CATERPIE + db 12 + dw WEEDLE + db -1 ; end + + next_list_item ; BUG_CATCHER (7) + db "JOSH@", TRAINERTYPE_NORMAL + db 13 + dw PARAS + db -1 ; end + + next_list_item ; BUG_CATCHER (8) + db "ARNIE@", TRAINERTYPE_NORMAL + db 15 + dw VENONAT + db -1 ; end + + next_list_item ; BUG_CATCHER (9) + db "KEN@", TRAINERTYPE_NORMAL + db 30 + dw ARIADOS + db 32 + dw PINSIR + db -1 ; end + + next_list_item ; BUG_CATCHER (10) + db "WADE@", TRAINERTYPE_NORMAL + db 9 + dw METAPOD + db 9 + dw METAPOD + db 10 + dw KAKUNA + db 9 + dw METAPOD + db -1 ; end + + next_list_item ; BUG_CATCHER (11) + db "WADE@", TRAINERTYPE_NORMAL + db 14 + dw BUTTERFREE + db 14 + dw BUTTERFREE + db 15 + dw BEEDRILL + db 14 + dw BUTTERFREE + db -1 ; end + + next_list_item ; BUG_CATCHER (12) + db "DOUG@", TRAINERTYPE_NORMAL + db 34 + dw ARIADOS + db -1 ; end + + next_list_item ; BUG_CATCHER (13) + db "ARNIE@", TRAINERTYPE_NORMAL + db 19 + dw VENONAT + db -1 ; end + + next_list_item ; BUG_CATCHER (14) + db "ARNIE@", TRAINERTYPE_MOVES + db 28 + dw VENOMOTH + dw DISABLE, SUPERSONIC, CONFUSION, LEECH_LIFE + db -1 ; end + + next_list_item ; BUG_CATCHER (15) + db "WADE@", TRAINERTYPE_MOVES + db 24 + dw BUTTERFREE + dw CONFUSION, POISONPOWDER, SUPERSONIC, WHIRLWIND + db 24 + dw BUTTERFREE + dw CONFUSION, STUN_SPORE, SUPERSONIC, WHIRLWIND + db 25 + dw BEEDRILL + dw FURY_ATTACK, FOCUS_ENERGY, TWINEEDLE, RAGE + db 24 + dw BUTTERFREE + dw CONFUSION, SLEEP_POWDER, SUPERSONIC, WHIRLWIND + db -1 ; end + + next_list_item ; BUG_CATCHER (16) + db "WADE@", TRAINERTYPE_MOVES + db 30 + dw BUTTERFREE + dw CONFUSION, POISONPOWDER, SUPERSONIC, GUST + db 30 + dw BUTTERFREE + dw CONFUSION, STUN_SPORE, SUPERSONIC, GUST + db 32 + dw BEEDRILL + dw FURY_ATTACK, PURSUIT, TWINEEDLE, DOUBLE_TEAM + db 34 + dw BUTTERFREE + dw PSYBEAM, SLEEP_POWDER, GUST, WHIRLWIND + db -1 ; end + + next_list_item ; BUG_CATCHER (17) + db "ARNIE@", TRAINERTYPE_MOVES + db 36 + dw VENOMOTH + dw GUST, SUPERSONIC, PSYBEAM, LEECH_LIFE + db -1 ; end + + next_list_item ; BUG_CATCHER (18) + db "ARNIE@", TRAINERTYPE_MOVES + db 40 + dw VENOMOTH + dw GUST, SUPERSONIC, PSYCHIC_M, TOXIC + db -1 ; end + + next_list_item ; BUG_CATCHER (19) + db "WAYNE@", TRAINERTYPE_NORMAL + db 8 + dw LEDYBA + db 10 + dw PARAS + db -1 ; end + + end_list_items + +FisherGroup: + next_list_item ; FISHER (1) + db "JUSTIN@", TRAINERTYPE_NORMAL + db 5 + dw MAGIKARP + db 5 + dw MAGIKARP + db 15 + dw MAGIKARP + db 5 + dw MAGIKARP + db -1 ; end + + next_list_item ; FISHER (2) + db "RALPH@", TRAINERTYPE_NORMAL + db 10 + dw GOLDEEN + db -1 ; end + + next_list_item ; FISHER (3) + db "ARNOLD@", TRAINERTYPE_NORMAL + db 34 + dw TENTACRUEL + db -1 ; end + + next_list_item ; FISHER (4) + db "KYLE@", TRAINERTYPE_NORMAL + db 28 + dw SEAKING + db 31 + dw POLIWHIRL + db 31 + dw SEAKING + db -1 ; end + + next_list_item ; FISHER (5) + db "HENRY@", TRAINERTYPE_NORMAL + db 8 + dw POLIWAG + db 8 + dw POLIWAG + db -1 ; end + + next_list_item ; FISHER (6) + db "MARVIN@", TRAINERTYPE_NORMAL + db 10 + dw MAGIKARP + db 10 + dw GYARADOS + db 15 + dw MAGIKARP + db 15 + dw GYARADOS + db -1 ; end + + next_list_item ; FISHER (7) + db "TULLY@", TRAINERTYPE_NORMAL + db 18 + dw QWILFISH + db -1 ; end + + next_list_item ; FISHER (8) + db "ANDRE@", TRAINERTYPE_NORMAL + db 27 + dw GYARADOS + db -1 ; end + + next_list_item ; FISHER (9) + db "RAYMOND@", TRAINERTYPE_NORMAL + db 22 + dw MAGIKARP + db 22 + dw MAGIKARP + db 22 + dw MAGIKARP + db 22 + dw MAGIKARP + db -1 ; end + + next_list_item ; FISHER (10) + db "WILTON@", TRAINERTYPE_NORMAL + db 23 + dw GOLDEEN + db 23 + dw GOLDEEN + db 25 + dw SEAKING + db -1 ; end + + next_list_item ; FISHER (11) + db "EDGAR@", TRAINERTYPE_MOVES + db 25 + dw REMORAID + dw LOCK_ON, PSYBEAM, AURORA_BEAM, BUBBLEBEAM + db 25 + dw REMORAID + dw LOCK_ON, PSYBEAM, AURORA_BEAM, BUBBLEBEAM + db -1 ; end + + next_list_item ; FISHER (12) + db "JONAH@", TRAINERTYPE_NORMAL + db 25 + dw SHELLDER + db 29 + dw OCTILLERY + db 25 + dw REMORAID + db 29 + dw CLOYSTER + db -1 ; end + + next_list_item ; FISHER (13) + db "MARTIN@", TRAINERTYPE_NORMAL + db 32 + dw REMORAID + db 32 + dw REMORAID + db -1 ; end + + next_list_item ; FISHER (14) + db "STEPHEN@", TRAINERTYPE_NORMAL + db 25 + dw MAGIKARP + db 25 + dw MAGIKARP + db 31 + dw QWILFISH + db 31 + dw TENTACRUEL + db -1 ; end + + next_list_item ; FISHER (15) + db "BARNEY@", TRAINERTYPE_NORMAL + db 30 + dw GYARADOS + db 30 + dw GYARADOS + db 30 + dw GYARADOS + db -1 ; end + + next_list_item ; FISHER (16) + db "RALPH@", TRAINERTYPE_NORMAL + db 17 + dw GOLDEEN + db -1 ; end + + next_list_item ; FISHER (17) + db "RALPH@", TRAINERTYPE_NORMAL + db 17 + dw QWILFISH + db 19 + dw GOLDEEN + db -1 ; end + + next_list_item ; FISHER (18) + db "TULLY@", TRAINERTYPE_NORMAL + db 23 + dw QWILFISH + db -1 ; end + + next_list_item ; FISHER (19) + db "TULLY@", TRAINERTYPE_NORMAL + db 32 + dw GOLDEEN + db 32 + dw GOLDEEN + db 32 + dw QWILFISH + db -1 ; end + + next_list_item ; FISHER (20) + db "WILTON@", TRAINERTYPE_NORMAL + db 29 + dw GOLDEEN + db 29 + dw GOLDEEN + db 32 + dw SEAKING + db -1 ; end + + next_list_item ; FISHER (21) + db "SCOTT@", TRAINERTYPE_NORMAL + db 30 + dw QWILFISH + db 30 + dw QWILFISH + db 34 + dw SEAKING + db -1 ; end + + next_list_item ; FISHER (22) + db "WILTON@", TRAINERTYPE_MOVES + db 34 + dw SEAKING + dw SUPERSONIC, WATERFALL, FLAIL, FURY_ATTACK + db 34 + dw SEAKING + dw SUPERSONIC, WATERFALL, FLAIL, FURY_ATTACK + db 38 + dw REMORAID + dw PSYBEAM, AURORA_BEAM, BUBBLEBEAM, HYPER_BEAM + db -1 ; end + + next_list_item ; FISHER (23) + db "RALPH@", TRAINERTYPE_NORMAL + db 30 + dw QWILFISH + db 32 + dw GOLDEEN + db -1 ; end + + next_list_item ; FISHER (24) + db "RALPH@", TRAINERTYPE_MOVES + db 35 + dw QWILFISH + dw TOXIC, MINIMIZE, SURF, PIN_MISSILE + db 39 + dw SEAKING + dw ENDURE, FLAIL, FURY_ATTACK, WATERFALL + db -1 ; end + + next_list_item ; FISHER (25) + db "TULLY@", TRAINERTYPE_MOVES + db 34 + dw SEAKING + dw SUPERSONIC, RAIN_DANCE, WATERFALL, FURY_ATTACK + db 34 + dw SEAKING + dw SUPERSONIC, RAIN_DANCE, WATERFALL, FURY_ATTACK + db 37 + dw QWILFISH + dw ROLLOUT, SURF, PIN_MISSILE, TAKE_DOWN + db -1 ; end + + end_list_items + +SwimmerMGroup: + next_list_item ; SWIMMERM (1) + db "HAROLD@", TRAINERTYPE_NORMAL + db 32 + dw REMORAID + db 30 + dw SEADRA + db -1 ; end + + next_list_item ; SWIMMERM (2) + db "SIMON@", TRAINERTYPE_NORMAL + db 20 + dw TENTACOOL + db 20 + dw TENTACOOL + db -1 ; end + + next_list_item ; SWIMMERM (3) + db "RANDALL@", TRAINERTYPE_NORMAL + db 18 + dw SHELLDER + db 20 + dw WARTORTLE + db 18 + dw SHELLDER + db -1 ; end + + next_list_item ; SWIMMERM (4) + db "CHARLIE@", TRAINERTYPE_NORMAL + db 21 + dw SHELLDER + db 19 + dw TENTACOOL + db 19 + dw TENTACRUEL + db -1 ; end + + next_list_item ; SWIMMERM (5) + db "GEORGE@", TRAINERTYPE_NORMAL + db 16 + dw TENTACOOL + db 17 + dw TENTACOOL + db 16 + dw TENTACOOL + db 19 + dw STARYU + db 17 + dw TENTACOOL + db 19 + dw REMORAID + db -1 ; end + + next_list_item ; SWIMMERM (6) + db "BERKE@", TRAINERTYPE_NORMAL + db 23 + dw QWILFISH + db -1 ; end + + next_list_item ; SWIMMERM (7) + db "KIRK@", TRAINERTYPE_NORMAL + db 20 + dw GYARADOS + db 20 + dw GYARADOS + db -1 ; end + + next_list_item ; SWIMMERM (8) + db "MATHEW@", TRAINERTYPE_NORMAL + db 23 + dw KRABBY + db -1 ; end + + next_list_item ; SWIMMERM (9) + db "HAL@", TRAINERTYPE_NORMAL + db 24 + dw SEEL + db 25 + dw DEWGONG + db 24 + dw SEEL + db -1 ; end + + next_list_item ; SWIMMERM (10) + db "PATON@", TRAINERTYPE_NORMAL + db 26 + dw PILOSWINE + db 26 + dw PILOSWINE + db -1 ; end + + next_list_item ; SWIMMERM (11) + db "DARYL@", TRAINERTYPE_NORMAL + db 24 + dw SHELLDER + db 25 + dw CLOYSTER + db 24 + dw SHELLDER + db -1 ; end + + next_list_item ; SWIMMERM (12) + db "WALTER@", TRAINERTYPE_NORMAL + db 15 + dw HORSEA + db 15 + dw HORSEA + db 20 + dw SEADRA + db -1 ; end + + next_list_item ; SWIMMERM (13) + db "TONY@", TRAINERTYPE_NORMAL + db 13 + dw STARYU + db 18 + dw STARMIE + db 16 + dw HORSEA + db -1 ; end + + next_list_item ; SWIMMERM (14) + db "JEROME@", TRAINERTYPE_NORMAL + db 26 + dw SEADRA + db 28 + dw TENTACOOL + db 30 + dw TENTACRUEL + db 28 + dw GOLDEEN + db -1 ; end + + next_list_item ; SWIMMERM (15) + db "TUCKER@", TRAINERTYPE_NORMAL + db 30 + dw SHELLDER + db 34 + dw CLOYSTER + db -1 ; end + + next_list_item ; SWIMMERM (16) + db "RICK@", TRAINERTYPE_NORMAL + db 13 + dw STARYU + db 18 + dw STARMIE + db 16 + dw HORSEA + db -1 ; end + + next_list_item ; SWIMMERM (17) + db "CAMERON@", TRAINERTYPE_NORMAL + db 34 + dw MARILL + db -1 ; end + + next_list_item ; SWIMMERM (18) + db "SETH@", TRAINERTYPE_NORMAL + db 29 + dw QUAGSIRE + db 29 + dw OCTILLERY + db 32 + dw QUAGSIRE + db -1 ; end + + next_list_item ; SWIMMERM (19) + db "JAMES@", TRAINERTYPE_NORMAL + db 13 + dw STARYU + db 18 + dw STARMIE + db 16 + dw HORSEA + db -1 ; end + + next_list_item ; SWIMMERM (20) + db "LEWIS@", TRAINERTYPE_NORMAL + db 13 + dw STARYU + db 18 + dw STARMIE + db 16 + dw HORSEA + db -1 ; end + + next_list_item ; SWIMMERM (21) + db "PARKER@", TRAINERTYPE_NORMAL + db 32 + dw HORSEA + db 32 + dw HORSEA + db 35 + dw SEADRA + db -1 ; end + + end_list_items + +SwimmerFGroup: + next_list_item ; SWIMMERF (1) + db "ELAINE@", TRAINERTYPE_NORMAL + db 21 + dw STARYU + db -1 ; end + + next_list_item ; SWIMMERF (2) + db "PAULA@", TRAINERTYPE_NORMAL + db 19 + dw STARYU + db 19 + dw SHELLDER + db -1 ; end + + next_list_item ; SWIMMERF (3) + db "KAYLEE@", TRAINERTYPE_NORMAL + db 18 + dw GOLDEEN + db 20 + dw GOLDEEN + db 20 + dw SEAKING + db -1 ; end + + next_list_item ; SWIMMERF (4) + db "SUSIE@", TRAINERTYPE_MOVES + db 20 + dw PSYDUCK + dw SCRATCH, TAIL_WHIP, DISABLE, CONFUSION + db 22 + dw GOLDEEN + dw PECK, TAIL_WHIP, SUPERSONIC, HORN_ATTACK + db -1 ; end + + next_list_item ; SWIMMERF (5) + db "DENISE@", TRAINERTYPE_NORMAL + db 22 + dw SEEL + db -1 ; end + + next_list_item ; SWIMMERF (6) + db "KARA@", TRAINERTYPE_NORMAL + db 20 + dw STARYU + db 20 + dw STARMIE + db -1 ; end + + next_list_item ; SWIMMERF (7) + db "WENDY@", TRAINERTYPE_MOVES + db 21 + dw HORSEA + dw BUBBLE, SMOKESCREEN, LEER, WATER_GUN + db 21 + dw HORSEA + dw DRAGON_RAGE, SMOKESCREEN, LEER, WATER_GUN + db -1 ; end + + next_list_item ; SWIMMERF (8) + db "LISA@", TRAINERTYPE_NORMAL + db 28 + dw JYNX + db -1 ; end + + next_list_item ; SWIMMERF (9) + db "JILL@", TRAINERTYPE_NORMAL + db 28 + dw DEWGONG + db -1 ; end + + next_list_item ; SWIMMERF (10) + db "MARY@", TRAINERTYPE_NORMAL + db 20 + dw SEAKING + db -1 ; end + + next_list_item ; SWIMMERF (11) + db "KATIE@", TRAINERTYPE_NORMAL + db 33 + dw DEWGONG + db -1 ; end + + next_list_item ; SWIMMERF (12) + db "DAWN@", TRAINERTYPE_NORMAL + db 34 + dw SEAKING + db -1 ; end + + next_list_item ; SWIMMERF (13) + db "TARA@", TRAINERTYPE_NORMAL + db 20 + dw SEAKING + db -1 ; end + + next_list_item ; SWIMMERF (14) + db "NICOLE@", TRAINERTYPE_NORMAL + db 29 + dw MARILL + db 29 + dw MARILL + db 32 + dw LAPRAS + db -1 ; end + + next_list_item ; SWIMMERF (15) + db "LORI@", TRAINERTYPE_NORMAL + db 32 + dw STARMIE + db 32 + dw STARMIE + db -1 ; end + + next_list_item ; SWIMMERF (16) + db "JODY@", TRAINERTYPE_NORMAL + db 20 + dw SEAKING + db -1 ; end + + next_list_item ; SWIMMERF (17) + db "NIKKI@", TRAINERTYPE_NORMAL + db 28 + dw SEEL + db 28 + dw SEEL + db 28 + dw SEEL + db 28 + dw DEWGONG + db -1 ; end + + next_list_item ; SWIMMERF (18) + db "DIANA@", TRAINERTYPE_NORMAL + db 37 + dw GOLDUCK + db -1 ; end + + next_list_item ; SWIMMERF (19) + db "BRIANA@", TRAINERTYPE_NORMAL + db 35 + dw SEAKING + db 35 + dw SEAKING + db -1 ; end + + end_list_items + +SailorGroup: + next_list_item ; SAILOR (1) + db "EUGENE@", TRAINERTYPE_NORMAL + db 17 + dw POLIWHIRL + db 17 + dw RATICATE + db 19 + dw KRABBY + db -1 ; end + + next_list_item ; SAILOR (2) + db "HUEY@", TRAINERTYPE_NORMAL + db 18 + dw POLIWAG + db 18 + dw POLIWHIRL + db -1 ; end + + next_list_item ; SAILOR (3) + db "TERRELL@", TRAINERTYPE_NORMAL + db 20 + dw POLIWHIRL + db -1 ; end + + next_list_item ; SAILOR (4) + db "KENT@", TRAINERTYPE_MOVES + db 18 + dw KRABBY + dw BUBBLE, LEER, VICEGRIP, HARDEN + db 20 + dw KRABBY + dw BUBBLEBEAM, LEER, VICEGRIP, HARDEN + db -1 ; end + + next_list_item ; SAILOR (5) + db "ERNEST@", TRAINERTYPE_NORMAL + db 18 + dw MACHOP + db 18 + dw MACHOP + db 18 + dw POLIWHIRL + db -1 ; end + + next_list_item ; SAILOR (6) + db "JEFF@", TRAINERTYPE_NORMAL + db 32 + dw RATICATE + db 32 + dw RATICATE + db -1 ; end + + next_list_item ; SAILOR (7) + db "GARRETT@", TRAINERTYPE_NORMAL + db 34 + dw KINGLER + db -1 ; end + + next_list_item ; SAILOR (8) + db "KENNETH@", TRAINERTYPE_NORMAL + db 28 + dw MACHOP + db 28 + dw MACHOP + db 28 + dw POLIWRATH + db 28 + dw MACHOP + db -1 ; end + + next_list_item ; SAILOR (9) + db "STANLY@", TRAINERTYPE_NORMAL + db 31 + dw MACHOP + db 33 + dw MACHOKE + db 26 + dw PSYDUCK + db -1 ; end + + next_list_item ; SAILOR (10) + db "HARRY@", TRAINERTYPE_NORMAL + db 19 + dw WOOPER + db -1 ; end + + next_list_item ; SAILOR (11) + db "HUEY@", TRAINERTYPE_NORMAL + db 28 + dw POLIWHIRL + db 28 + dw POLIWHIRL + db -1 ; end + + next_list_item ; SAILOR (12) + db "HUEY@", TRAINERTYPE_NORMAL + db 34 + dw POLIWHIRL + db 34 + dw POLIWRATH + db -1 ; end + + next_list_item ; SAILOR (13) + db "HUEY@", TRAINERTYPE_MOVES + db 38 + dw POLITOED + dw WHIRLPOOL, RAIN_DANCE, BODY_SLAM, PERISH_SONG + db 38 + dw POLIWRATH + dw SURF, STRENGTH, ICE_PUNCH, SUBMISSION + db -1 ; end + + end_list_items + +SuperNerdGroup: + next_list_item ; SUPER_NERD (1) + db "STAN@", TRAINERTYPE_NORMAL + db 20 + dw GRIMER + db -1 ; end + + next_list_item ; SUPER_NERD (2) + db "ERIC@", TRAINERTYPE_NORMAL + db 11 + dw GRIMER + db 11 + dw GRIMER + db -1 ; end + + next_list_item ; SUPER_NERD (3) + db "GREGG@", TRAINERTYPE_NORMAL + db 20 + dw MAGNEMITE + db 20 + dw MAGNEMITE + db 20 + dw MAGNEMITE + db -1 ; end + + next_list_item ; SUPER_NERD (4) + db "JAY@", TRAINERTYPE_NORMAL + db 22 + dw KOFFING + db 22 + dw KOFFING + db -1 ; end + + next_list_item ; SUPER_NERD (5) + db "DAVE@", TRAINERTYPE_NORMAL + db 24 + dw DITTO + db -1 ; end + + next_list_item ; SUPER_NERD (6) + db "SAM@", TRAINERTYPE_NORMAL + db 34 + dw GRIMER + db 34 + dw MUK + db -1 ; end + + next_list_item ; SUPER_NERD (7) + db "TOM@", TRAINERTYPE_NORMAL + db 32 + dw MAGNEMITE + db 32 + dw MAGNEMITE + db 32 + dw MAGNEMITE + db -1 ; end + + next_list_item ; SUPER_NERD (8) + db "PAT@", TRAINERTYPE_NORMAL + db 36 + dw PORYGON + db -1 ; end + + next_list_item ; SUPER_NERD (9) + db "SHAWN@", TRAINERTYPE_NORMAL + db 31 + dw MAGNEMITE + db 33 + dw MUK + db 31 + dw MAGNEMITE + db -1 ; end + + next_list_item ; SUPER_NERD (10) + db "TERU@", TRAINERTYPE_NORMAL + db 7 + dw MAGNEMITE + db 11 + dw VOLTORB + db 7 + dw MAGNEMITE + db 9 + dw MAGNEMITE + db -1 ; end + + next_list_item ; SUPER_NERD (11) + db "RUSS@", TRAINERTYPE_NORMAL + db 27 + dw MAGNEMITE + db 27 + dw MAGNEMITE + db 27 + dw MAGNEMITE + db -1 ; end + + next_list_item ; SUPER_NERD (12) + db "NORTON@", TRAINERTYPE_MOVES + db 30 + dw PORYGON + dw CONVERSION, CONVERSION2, RECOVER, TRI_ATTACK + db -1 ; end + + next_list_item ; SUPER_NERD (13) + db "HUGH@", TRAINERTYPE_MOVES + db 39 + dw SEADRA + dw SMOKESCREEN, TWISTER, SURF, WATERFALL + db -1 ; end + + next_list_item ; SUPER_NERD (14) + db "MARKUS@", TRAINERTYPE_MOVES + db 19 + dw SLOWPOKE + dw CURSE, WATER_GUN, GROWL, STRENGTH + db -1 ; end + + end_list_items + +Rival2Group: + next_list_item ; RIVAL2 (1) + db "?@", TRAINERTYPE_MOVES + db 41 + dw SNEASEL + dw QUICK_ATTACK, SCREECH, FAINT_ATTACK, FURY_CUTTER + db 42 + dw GOLBAT + dw LEECH_LIFE, BITE, CONFUSE_RAY, WING_ATTACK + db 41 + dw MAGNETON + dw THUNDERSHOCK, SONICBOOM, THUNDER_WAVE, SWIFT + db 43 + dw GENGAR + dw MEAN_LOOK, CURSE, SHADOW_BALL, CONFUSE_RAY + db 43 + dw ALAKAZAM + dw DISABLE, RECOVER, FUTURE_SIGHT, PSYCHIC_M + db 45 + dw MEGANIUM + dw RAZOR_LEAF, POISONPOWDER, BODY_SLAM, LIGHT_SCREEN + db -1 ; end + + next_list_item ; RIVAL2 (2) + db "?@", TRAINERTYPE_MOVES + db 41 + dw SNEASEL + dw QUICK_ATTACK, SCREECH, FAINT_ATTACK, FURY_CUTTER + db 42 + dw GOLBAT + dw LEECH_LIFE, BITE, CONFUSE_RAY, WING_ATTACK + db 41 + dw MAGNETON + dw THUNDERSHOCK, SONICBOOM, THUNDER_WAVE, SWIFT + db 43 + dw GENGAR + dw MEAN_LOOK, CURSE, SHADOW_BALL, CONFUSE_RAY + db 43 + dw ALAKAZAM + dw DISABLE, RECOVER, FUTURE_SIGHT, PSYCHIC_M + db 45 + dw TYPHLOSION + dw SMOKESCREEN, QUICK_ATTACK, FLAME_WHEEL, SWIFT + db -1 ; end + + next_list_item ; RIVAL2 (3) + db "?@", TRAINERTYPE_MOVES + db 41 + dw SNEASEL + dw QUICK_ATTACK, SCREECH, FAINT_ATTACK, FURY_CUTTER + db 42 + dw GOLBAT + dw LEECH_LIFE, BITE, CONFUSE_RAY, WING_ATTACK + db 41 + dw MAGNETON + dw THUNDERSHOCK, SONICBOOM, THUNDER_WAVE, SWIFT + db 43 + dw GENGAR + dw MEAN_LOOK, CURSE, SHADOW_BALL, CONFUSE_RAY + db 43 + dw ALAKAZAM + dw DISABLE, RECOVER, FUTURE_SIGHT, PSYCHIC_M + db 45 + dw FERALIGATR + dw RAGE, WATER_GUN, SCARY_FACE, SLASH + db -1 ; end + + next_list_item ; RIVAL2 (4) + db "?@", TRAINERTYPE_MOVES + db 45 + dw SNEASEL + dw QUICK_ATTACK, SCREECH, FAINT_ATTACK, FURY_CUTTER + db 48 + dw CROBAT + dw TOXIC, BITE, CONFUSE_RAY, WING_ATTACK + db 45 + dw MAGNETON + dw THUNDER, SONICBOOM, THUNDER_WAVE, SWIFT + db 46 + dw GENGAR + dw MEAN_LOOK, CURSE, SHADOW_BALL, CONFUSE_RAY + db 46 + dw ALAKAZAM + dw RECOVER, FUTURE_SIGHT, PSYCHIC_M, REFLECT + db 50 + dw MEGANIUM + dw GIGA_DRAIN, BODY_SLAM, LIGHT_SCREEN, SAFEGUARD + db -1 ; end + + next_list_item ; RIVAL2 (5) + db "?@", TRAINERTYPE_MOVES + db 45 + dw SNEASEL + dw QUICK_ATTACK, SCREECH, FAINT_ATTACK, FURY_CUTTER + db 48 + dw CROBAT + dw TOXIC, BITE, CONFUSE_RAY, WING_ATTACK + db 45 + dw MAGNETON + dw THUNDER, SONICBOOM, THUNDER_WAVE, SWIFT + db 46 + dw GENGAR + dw MEAN_LOOK, CURSE, SHADOW_BALL, CONFUSE_RAY + db 46 + dw ALAKAZAM + dw RECOVER, FUTURE_SIGHT, PSYCHIC_M, REFLECT + db 50 + dw TYPHLOSION + dw SMOKESCREEN, QUICK_ATTACK, FIRE_BLAST, SWIFT + db -1 ; end + + next_list_item ; RIVAL2 (6) + db "?@", TRAINERTYPE_MOVES + db 45 + dw SNEASEL + dw QUICK_ATTACK, SCREECH, FAINT_ATTACK, FURY_CUTTER + db 48 + dw CROBAT + dw TOXIC, BITE, CONFUSE_RAY, WING_ATTACK + db 45 + dw MAGNETON + dw THUNDER, SONICBOOM, THUNDER_WAVE, SWIFT + db 46 + dw GENGAR + dw MEAN_LOOK, CURSE, SHADOW_BALL, CONFUSE_RAY + db 46 + dw ALAKAZAM + dw RECOVER, FUTURE_SIGHT, PSYCHIC_M, REFLECT + db 50 + dw FERALIGATR + dw SURF, RAIN_DANCE, SLASH, SCREECH + db -1 ; end + + end_list_items + +GuitaristGroup: + next_list_item ; GUITARIST (1) + db "CLYDE@", TRAINERTYPE_NORMAL + db 34 + dw ELECTABUZZ + db -1 ; end + + next_list_item ; GUITARIST (2) + db "VINCENT@", TRAINERTYPE_NORMAL + db 27 + dw MAGNEMITE + db 33 + dw VOLTORB + db 32 + dw MAGNEMITE + db 32 + dw MAGNEMITE + db -1 ; end + + end_list_items + +HikerGroup: + next_list_item ; HIKER (1) + db "ANTHONY@", TRAINERTYPE_NORMAL + db 16 + dw GEODUDE + db 18 + dw MACHAMP + db -1 ; end + + next_list_item ; HIKER (2) + db "RUSSELL@", TRAINERTYPE_NORMAL + db 4 + dw GEODUDE + db 6 + dw GEODUDE + db 8 + dw GEODUDE + db -1 ; end + + next_list_item ; HIKER (3) + db "PHILLIP@", TRAINERTYPE_NORMAL + db 23 + dw GEODUDE + db 23 + dw GEODUDE + db 23 + dw GRAVELER + db -1 ; end + + next_list_item ; HIKER (4) + db "LEONARD@", TRAINERTYPE_NORMAL + db 23 + dw GEODUDE + db 25 + dw MACHOP + db -1 ; end + + next_list_item ; HIKER (5) + db "ANTHONY@", TRAINERTYPE_NORMAL + db 11 + dw GEODUDE + db 11 + dw MACHOP + db -1 ; end + + next_list_item ; HIKER (6) + db "BENJAMIN@", TRAINERTYPE_NORMAL + db 14 + dw DIGLETT + db 14 + dw GEODUDE + db 16 + dw DUGTRIO + db -1 ; end + + next_list_item ; HIKER (7) + db "ERIK@", TRAINERTYPE_NORMAL + db 24 + dw MACHOP + db 27 + dw GRAVELER + db 27 + dw MACHOP + db -1 ; end + + next_list_item ; HIKER (8) + db "MICHAEL@", TRAINERTYPE_NORMAL + db 25 + dw GEODUDE + db 25 + dw GRAVELER + db 25 + dw GOLEM + db -1 ; end + + next_list_item ; HIKER (9) + db "PARRY@", TRAINERTYPE_NORMAL + db 35 + dw ONIX + db 33 + dw SWINUB + db -1 ; end + + next_list_item ; HIKER (10) + db "TIMOTHY@", TRAINERTYPE_MOVES + db 27 + dw DIGLETT + dw MAGNITUDE, DIG, SAND_ATTACK, SLASH + db 27 + dw DUGTRIO + dw MAGNITUDE, DIG, SAND_ATTACK, SLASH + db -1 ; end + + next_list_item ; HIKER (11) + db "BAILEY@", TRAINERTYPE_NORMAL + db 13 + dw GEODUDE + db 13 + dw GEODUDE + db 13 + dw GEODUDE + db 13 + dw GEODUDE + db 13 + dw GEODUDE + db -1 ; end + + next_list_item ; HIKER (12) + db "ANTHONY@", TRAINERTYPE_NORMAL + db 25 + dw GRAVELER + db 27 + dw GRAVELER + db 29 + dw MACHOKE + db -1 ; end + + next_list_item ; HIKER (13) + db "TIM@", TRAINERTYPE_NORMAL + db 31 + dw GRAVELER + db 31 + dw GRAVELER + db 31 + dw GRAVELER + db -1 ; end + + next_list_item ; HIKER (14) + db "NOLAND@", TRAINERTYPE_NORMAL + db 31 + dw SANDSLASH + db 33 + dw GOLEM + db -1 ; end + + next_list_item ; HIKER (15) + db "SIDNEY@", TRAINERTYPE_NORMAL + db 34 + dw DUGTRIO + db 32 + dw ONIX + db -1 ; end + + next_list_item ; HIKER (16) + db "KENNY@", TRAINERTYPE_NORMAL + db 27 + dw SANDSLASH + db 29 + dw GRAVELER + db 31 + dw GOLEM + db 29 + dw GRAVELER + db -1 ; end + + next_list_item ; HIKER (17) + db "JIM@", TRAINERTYPE_NORMAL + db 35 + dw MACHAMP + db -1 ; end + + next_list_item ; HIKER (18) + db "DANIEL@", TRAINERTYPE_NORMAL + db 11 + dw ONIX + db -1 ; end + + next_list_item ; HIKER (19) + db "PARRY@", TRAINERTYPE_MOVES + db 35 + dw PILOSWINE + dw EARTHQUAKE, BLIZZARD, REST, TAKE_DOWN + db 35 + dw DUGTRIO + dw MAGNITUDE, DIG, MUD_SLAP, SLASH + db 38 + dw STEELIX + dw DIG, IRON_TAIL, SANDSTORM, SLAM + db -1 ; end + + next_list_item ; HIKER (20) + db "PARRY@", TRAINERTYPE_NORMAL + db 29 + dw ONIX + db -1 ; end + + next_list_item ; HIKER (21) + db "ANTHONY@", TRAINERTYPE_NORMAL + db 30 + dw GRAVELER + db 30 + dw GRAVELER + db 32 + dw MACHOKE + db -1 ; end + + next_list_item ; HIKER (22) + db "ANTHONY@", TRAINERTYPE_MOVES + db 34 + dw GRAVELER + dw MAGNITUDE, SELFDESTRUCT, DEFENSE_CURL, ROLLOUT + db 36 + dw GOLEM + dw MAGNITUDE, SELFDESTRUCT, DEFENSE_CURL, ROLLOUT + db 34 + dw MACHOKE + dw KARATE_CHOP, VITAL_THROW, HEADBUTT, DIG + db -1 ; end + + end_list_items + +BikerGroup: + next_list_item ; BIKER (1) + db "BENNY@", TRAINERTYPE_NORMAL + db 20 + dw KOFFING + db 20 + dw KOFFING + db 20 + dw KOFFING + db -1 ; end + + next_list_item ; BIKER (2) + db "KAZU@", TRAINERTYPE_NORMAL + db 20 + dw KOFFING + db 20 + dw KOFFING + db 20 + dw KOFFING + db -1 ; end + + next_list_item ; BIKER (3) + db "DWAYNE@", TRAINERTYPE_NORMAL + db 27 + dw KOFFING + db 28 + dw KOFFING + db 29 + dw KOFFING + db 30 + dw KOFFING + db -1 ; end + + next_list_item ; BIKER (4) + db "HARRIS@", TRAINERTYPE_NORMAL + db 34 + dw FLAREON + db -1 ; end + + next_list_item ; BIKER (5) + db "ZEKE@", TRAINERTYPE_NORMAL + db 32 + dw KOFFING + db 32 + dw KOFFING + db -1 ; end + + next_list_item ; BIKER (6) + db "CHARLES@", TRAINERTYPE_NORMAL + db 30 + dw KOFFING + db 30 + dw CHARMELEON + db 30 + dw WEEZING + db -1 ; end + + next_list_item ; BIKER (7) + db "RILEY@", TRAINERTYPE_NORMAL + db 34 + dw WEEZING + db -1 ; end + + next_list_item ; BIKER (8) + db "JOEL@", TRAINERTYPE_NORMAL + db 32 + dw MAGMAR + db 32 + dw MAGMAR + db -1 ; end + + next_list_item ; BIKER (9) + db "GLENN@", TRAINERTYPE_NORMAL + db 28 + dw KOFFING + db 30 + dw MAGMAR + db 32 + dw WEEZING + db -1 ; end + + end_list_items + +BlaineGroup: + next_list_item ; BLAINE (1) + db "BLAINE@", TRAINERTYPE_MOVES + db 45 + dw MAGCARGO + dw CURSE, SMOG, FLAMETHROWER, ROCK_SLIDE + db 45 + dw MAGMAR + dw THUNDERPUNCH, FIRE_PUNCH, SUNNY_DAY, CONFUSE_RAY + db 50 + dw RAPIDASH + dw QUICK_ATTACK, FIRE_SPIN, FURY_ATTACK, FIRE_BLAST + db -1 ; end + + end_list_items + +BurglarGroup: + next_list_item ; BURGLAR (1) + db "DUNCAN@", TRAINERTYPE_NORMAL + db 23 + dw KOFFING + db 25 + dw MAGMAR + db 23 + dw KOFFING + db -1 ; end + + next_list_item ; BURGLAR (2) + db "EDDIE@", TRAINERTYPE_MOVES + db 26 + dw GROWLITHE + dw ROAR, EMBER, LEER, TAKE_DOWN + db 24 + dw KOFFING + dw TACKLE, SMOG, SLUDGE, SMOKESCREEN + db -1 ; end + + next_list_item ; BURGLAR (3) + db "COREY@", TRAINERTYPE_NORMAL + db 25 + dw KOFFING + db 28 + dw MAGMAR + db 25 + dw KOFFING + db 30 + dw KOFFING + db -1 ; end + + end_list_items + +FirebreatherGroup: + next_list_item ; FIREBREATHER (1) + db "OTIS@", TRAINERTYPE_NORMAL + db 29 + dw MAGMAR + db 32 + dw WEEZING + db 29 + dw MAGMAR + db -1 ; end + + next_list_item ; FIREBREATHER (2) + db "DICK@", TRAINERTYPE_NORMAL + db 17 + dw CHARMELEON + db -1 ; end + + next_list_item ; FIREBREATHER (3) + db "NED@", TRAINERTYPE_NORMAL + db 15 + dw KOFFING + db 16 + dw GROWLITHE + db 15 + dw KOFFING + db -1 ; end + + next_list_item ; FIREBREATHER (4) + db "BURT@", TRAINERTYPE_NORMAL + db 32 + dw KOFFING + db 32 + dw SLUGMA + db -1 ; end + + next_list_item ; FIREBREATHER (5) + db "BILL@", TRAINERTYPE_NORMAL + db 6 + dw KOFFING + db 6 + dw KOFFING + db -1 ; end + + next_list_item ; FIREBREATHER (6) + db "WALT@", TRAINERTYPE_NORMAL + db 11 + dw MAGMAR + db 13 + dw MAGMAR + db -1 ; end + + next_list_item ; FIREBREATHER (7) + db "RAY@", TRAINERTYPE_NORMAL + db 9 + dw VULPIX + db -1 ; end + + next_list_item ; FIREBREATHER (8) + db "LYLE@", TRAINERTYPE_NORMAL + db 28 + dw KOFFING + db 31 + dw FLAREON + db 28 + dw KOFFING + db -1 ; end + + end_list_items + +JugglerGroup: + next_list_item ; JUGGLER (1) + db "IRWIN@", TRAINERTYPE_NORMAL + db 2 + dw VOLTORB + db 6 + dw VOLTORB + db 10 + dw VOLTORB + db 14 + dw VOLTORB + db -1 ; end + + next_list_item ; JUGGLER (2) + db "FRITZ@", TRAINERTYPE_NORMAL + db 29 + dw MR__MIME + db 29 + dw MAGMAR + db 29 + dw MACHOKE + db -1 ; end + + next_list_item ; JUGGLER (3) + db "HORTON@", TRAINERTYPE_NORMAL + db 33 + dw ELECTRODE + db 33 + dw ELECTRODE + db 33 + dw ELECTRODE + db 33 + dw ELECTRODE + db -1 ; end + + next_list_item ; JUGGLER (4) + db "IRWIN@", TRAINERTYPE_NORMAL + db 6 + dw VOLTORB + db 10 + dw VOLTORB + db 14 + dw VOLTORB + db 18 + dw VOLTORB + db -1 ; end + + next_list_item ; JUGGLER (5) + db "IRWIN@", TRAINERTYPE_NORMAL + db 18 + dw VOLTORB + db 22 + dw VOLTORB + db 26 + dw VOLTORB + db 30 + dw ELECTRODE + db -1 ; end + + next_list_item ; JUGGLER (6) + db "IRWIN@", TRAINERTYPE_NORMAL + db 18 + dw VOLTORB + db 22 + dw VOLTORB + db 26 + dw VOLTORB + db 30 + dw ELECTRODE + db -1 ; end + + end_list_items + +BlackbeltGroup: + next_list_item ; BLACKBELT_T (1) + db "KENJI@", TRAINERTYPE_NORMAL + db 27 + dw ONIX + db 30 + dw HITMONLEE + db 27 + dw ONIX + db 32 + dw MACHOKE + db -1 ; end + + next_list_item ; BLACKBELT_T (2) + db "YOSHI@", TRAINERTYPE_MOVES + db 27 + dw HITMONLEE + dw DOUBLE_KICK, MEDITATE, JUMP_KICK, FOCUS_ENERGY + db -1 ; end + + next_list_item ; BLACKBELT_T (3) + db "KENJI@", TRAINERTYPE_MOVES + db 33 + dw ONIX + dw BIND, ROCK_THROW, TOXIC, DIG + db 38 + dw MACHAMP + dw HEADBUTT, SWAGGER, THUNDERPUNCH, VITAL_THROW + db 33 + dw STEELIX + dw EARTHQUAKE, ROCK_THROW, IRON_TAIL, SANDSTORM + db 36 + dw HITMONLEE + dw DOUBLE_TEAM, HI_JUMP_KICK, MUD_SLAP, SWIFT + db -1 ; end + + next_list_item ; BLACKBELT_T (4) + db "LAO@", TRAINERTYPE_MOVES + db 27 + dw HITMONCHAN + dw COMET_PUNCH, THUNDERPUNCH, ICE_PUNCH, FIRE_PUNCH + db -1 ; end + + next_list_item ; BLACKBELT_T (5) + db "NOB@", TRAINERTYPE_MOVES + db 25 + dw MACHOP + dw LEER, FOCUS_ENERGY, KARATE_CHOP, SEISMIC_TOSS + db 25 + dw MACHOKE + dw LEER, KARATE_CHOP, SEISMIC_TOSS, ROCK_SLIDE + db -1 ; end + + next_list_item ; BLACKBELT_T (6) + db "KIYO@", TRAINERTYPE_NORMAL + db 34 + dw HITMONLEE + db 34 + dw HITMONCHAN + db -1 ; end + + next_list_item ; BLACKBELT_T (7) + db "LUNG@", TRAINERTYPE_NORMAL + db 23 + dw MANKEY + db 23 + dw MANKEY + db 25 + dw PRIMEAPE + db -1 ; end + + next_list_item ; BLACKBELT_T (8) + db "KENJI@", TRAINERTYPE_NORMAL + db 28 + dw MACHOKE + db -1 ; end + + next_list_item ; BLACKBELT_T (9) + db "WAI@", TRAINERTYPE_NORMAL + db 30 + dw MACHOKE + db 32 + dw MACHOKE + db 34 + dw MACHOKE + db -1 ; end + + end_list_items + +ExecutiveMGroup: + next_list_item ; EXECUTIVEM (1) + db "EXECUTIVE@", TRAINERTYPE_MOVES + db 33 + dw HOUNDOUR + dw EMBER, ROAR, BITE, FAINT_ATTACK + db 33 + dw KOFFING + dw TACKLE, SLUDGE, SMOKESCREEN, HAZE + db 35 + dw HOUNDOOM + dw EMBER, SMOG, BITE, FAINT_ATTACK + db -1 ; end + + next_list_item ; EXECUTIVEM (2) + db "EXECUTIVE@", TRAINERTYPE_MOVES + db 36 + dw GOLBAT + dw LEECH_LIFE, BITE, CONFUSE_RAY, WING_ATTACK + db -1 ; end + + next_list_item ; EXECUTIVEM (3) + db "EXECUTIVE@", TRAINERTYPE_MOVES + db 30 + dw KOFFING + dw TACKLE, SELFDESTRUCT, SLUDGE, SMOKESCREEN + db 30 + dw KOFFING + dw TACKLE, SELFDESTRUCT, SLUDGE, SMOKESCREEN + db 30 + dw KOFFING + dw TACKLE, SELFDESTRUCT, SLUDGE, SMOKESCREEN + db 32 + dw WEEZING + dw TACKLE, EXPLOSION, SLUDGE, SMOKESCREEN + db 30 + dw KOFFING + dw TACKLE, SELFDESTRUCT, SLUDGE, SMOKESCREEN + db 30 + dw KOFFING + dw TACKLE, SMOG, SLUDGE, SMOKESCREEN + db -1 ; end + + next_list_item ; EXECUTIVEM (4) + db "EXECUTIVE@", TRAINERTYPE_NORMAL + db 22 + dw ZUBAT + db 24 + dw RATICATE + db 22 + dw KOFFING + db -1 ; end + + end_list_items + +PsychicGroup: + next_list_item ; PSYCHIC_T (1) + db "NATHAN@", TRAINERTYPE_NORMAL + db 26 + dw GIRAFARIG + db -1 ; end + + next_list_item ; PSYCHIC_T (2) + db "FRANKLIN@", TRAINERTYPE_NORMAL + db 37 + dw KADABRA + db -1 ; end + + next_list_item ; PSYCHIC_T (3) + db "HERMAN@", TRAINERTYPE_NORMAL + db 30 + dw EXEGGCUTE + db 30 + dw EXEGGCUTE + db 30 + dw EXEGGUTOR + db -1 ; end + + next_list_item ; PSYCHIC_T (4) + db "FIDEL@", TRAINERTYPE_NORMAL + db 34 + dw XATU + db -1 ; end + + next_list_item ; PSYCHIC_T (5) + db "GREG@", TRAINERTYPE_MOVES + db 17 + dw DROWZEE + dw HYPNOSIS, DISABLE, DREAM_EATER, NO_MOVE + db -1 ; end + + next_list_item ; PSYCHIC_T (6) + db "NORMAN@", TRAINERTYPE_MOVES + db 17 + dw SLOWPOKE + dw TACKLE, GROWL, WATER_GUN, NO_MOVE + db 20 + dw SLOWPOKE + dw CURSE, BODY_SLAM, WATER_GUN, CONFUSION + db -1 ; end + + next_list_item ; PSYCHIC_T (7) + db "MARK@", TRAINERTYPE_MOVES + db 13 + dw ABRA + dw TELEPORT, FLASH, NO_MOVE, NO_MOVE + db 13 + dw ABRA + dw TELEPORT, FLASH, NO_MOVE, NO_MOVE + db 15 + dw KADABRA + dw TELEPORT, KINESIS, CONFUSION, NO_MOVE + db -1 ; end + + next_list_item ; PSYCHIC_T (8) + db "PHIL@", TRAINERTYPE_MOVES + db 24 + dw NATU + dw LEER, NIGHT_SHADE, FUTURE_SIGHT, CONFUSE_RAY + db 26 + dw KADABRA + dw DISABLE, PSYBEAM, RECOVER, FUTURE_SIGHT + db -1 ; end + + next_list_item ; PSYCHIC_T (9) + db "RICHARD@", TRAINERTYPE_NORMAL + db 36 + dw ESPEON + db -1 ; end + + next_list_item ; PSYCHIC_T (10) + db "GILBERT@", TRAINERTYPE_NORMAL + db 30 + dw STARMIE + db 30 + dw EXEGGCUTE + db 34 + dw GIRAFARIG + db -1 ; end + + next_list_item ; PSYCHIC_T (11) + db "JARED@", TRAINERTYPE_NORMAL + db 32 + dw MR__MIME + db 32 + dw EXEGGCUTE + db 35 + dw EXEGGCUTE + db -1 ; end + + next_list_item ; PSYCHIC_T (12) + db "RODNEY@", TRAINERTYPE_NORMAL + db 29 + dw DROWZEE + db 33 + dw HYPNO + db -1 ; end + + end_list_items + +PicnickerGroup: + next_list_item ; PICNICKER (1) + db "LIZ@", TRAINERTYPE_NORMAL + db 9 + dw NIDORAN_F + db -1 ; end + + next_list_item ; PICNICKER (2) + db "GINA@", TRAINERTYPE_NORMAL + db 9 + dw HOPPIP + db 9 + dw HOPPIP + db 12 + dw BULBASAUR + db -1 ; end + + next_list_item ; PICNICKER (3) + db "BROOKE@", TRAINERTYPE_MOVES + db 16 + dw PIKACHU + dw THUNDERSHOCK, GROWL, QUICK_ATTACK, DOUBLE_TEAM + db -1 ; end + + next_list_item ; PICNICKER (4) + db "KIM@", TRAINERTYPE_NORMAL + db 15 + dw VULPIX + db -1 ; end + + next_list_item ; PICNICKER (5) + db "CINDY@", TRAINERTYPE_NORMAL + db 36 + dw NIDOQUEEN + db -1 ; end + + next_list_item ; PICNICKER (6) + db "HOPE@", TRAINERTYPE_NORMAL + db 34 + dw FLAAFFY + db -1 ; end + + next_list_item ; PICNICKER (7) + db "SHARON@", TRAINERTYPE_NORMAL + db 31 + dw FURRET + db 33 + dw RAPIDASH + db -1 ; end + + next_list_item ; PICNICKER (8) + db "DEBRA@", TRAINERTYPE_NORMAL + db 33 + dw SEAKING + db -1 ; end + + next_list_item ; PICNICKER (9) + db "GINA@", TRAINERTYPE_NORMAL + db 14 + dw HOPPIP + db 14 + dw HOPPIP + db 17 + dw IVYSAUR + db -1 ; end + + next_list_item ; PICNICKER (10) + db "ERIN@", TRAINERTYPE_NORMAL + db 16 + dw PONYTA + db 16 + dw PONYTA + db -1 ; end + + next_list_item ; PICNICKER (11) + db "LIZ@", TRAINERTYPE_NORMAL + db 15 + dw WEEPINBELL + db 15 + dw NIDORINA + db -1 ; end + + next_list_item ; PICNICKER (12) + db "LIZ@", TRAINERTYPE_NORMAL + db 19 + dw WEEPINBELL + db 19 + dw NIDORINO + db 21 + dw NIDOQUEEN + db -1 ; end + + next_list_item ; PICNICKER (13) + db "HEIDI@", TRAINERTYPE_NORMAL + db 32 + dw SKIPLOOM + db 32 + dw SKIPLOOM + db -1 ; end + + next_list_item ; PICNICKER (14) + db "EDNA@", TRAINERTYPE_NORMAL + db 30 + dw NIDORINA + db 34 + dw RAICHU + db -1 ; end + + next_list_item ; PICNICKER (15) + db "GINA@", TRAINERTYPE_NORMAL + db 26 + dw SKIPLOOM + db 26 + dw SKIPLOOM + db 29 + dw IVYSAUR + db -1 ; end + + next_list_item ; PICNICKER (16) + db "TIFFANY@", TRAINERTYPE_MOVES + db 31 + dw CLEFAIRY + dw ENCORE, SING, DOUBLESLAP, MINIMIZE + db -1 ; end + + next_list_item ; PICNICKER (17) + db "TIFFANY@", TRAINERTYPE_MOVES + db 37 + dw CLEFAIRY + dw ENCORE, DOUBLESLAP, MINIMIZE, METRONOME + db -1 ; end + + next_list_item ; PICNICKER (18) + db "ERIN@", TRAINERTYPE_NORMAL + db 32 + dw PONYTA + db 32 + dw PONYTA + db -1 ; end + + next_list_item ; PICNICKER (19) + db "TANYA@", TRAINERTYPE_NORMAL + db 37 + dw EXEGGUTOR + db -1 ; end + + next_list_item ; PICNICKER (20) + db "TIFFANY@", TRAINERTYPE_MOVES + db 20 + dw CLEFAIRY + dw ENCORE, SING, DOUBLESLAP, MINIMIZE + db -1 ; end + + next_list_item ; PICNICKER (21) + db "ERIN@", TRAINERTYPE_MOVES + db 36 + dw PONYTA + dw DOUBLE_TEAM, STOMP, FIRE_SPIN, SUNNY_DAY + db 34 + dw RAICHU + dw SWIFT, MUD_SLAP, QUICK_ATTACK, THUNDERBOLT + db 36 + dw PONYTA + dw DOUBLE_TEAM, STOMP, FIRE_SPIN, SUNNY_DAY + db -1 ; end + + next_list_item ; PICNICKER (22) + db "LIZ@", TRAINERTYPE_NORMAL + db 24 + dw WEEPINBELL + db 26 + dw NIDORINO + db 26 + dw NIDOQUEEN + db -1 ; end + + next_list_item ; PICNICKER (23) + db "LIZ@", TRAINERTYPE_MOVES + db 30 + dw WEEPINBELL + dw SLEEP_POWDER, POISONPOWDER, STUN_SPORE, SLUDGE_BOMB + db 32 + dw NIDOKING + dw EARTHQUAKE, DOUBLE_KICK, POISON_STING, IRON_TAIL + db 32 + dw NIDOQUEEN + dw EARTHQUAKE, DOUBLE_KICK, TAIL_WHIP, BODY_SLAM + db -1 ; end + + next_list_item ; PICNICKER (24) + db "GINA@", TRAINERTYPE_NORMAL + db 30 + dw SKIPLOOM + db 30 + dw SKIPLOOM + db 32 + dw IVYSAUR + db -1 ; end + + next_list_item ; PICNICKER (25) + db "GINA@", TRAINERTYPE_MOVES + db 33 + dw JUMPLUFF + dw STUN_SPORE, SUNNY_DAY, LEECH_SEED, COTTON_SPORE + db 33 + dw JUMPLUFF + dw SUNNY_DAY, SLEEP_POWDER, LEECH_SEED, COTTON_SPORE + db 38 + dw VENUSAUR + dw SOLARBEAM, RAZOR_LEAF, HEADBUTT, MUD_SLAP + db -1 ; end + + next_list_item ; PICNICKER (26) + db "TIFFANY@", TRAINERTYPE_MOVES + db 43 + dw CLEFAIRY + dw METRONOME, ENCORE, MOONLIGHT, MINIMIZE + db -1 ; end + + end_list_items + +CamperGroup: + next_list_item ; CAMPER (1) + db "ROLAND@", TRAINERTYPE_NORMAL + db 9 + dw NIDORAN_M + db -1 ; end + + next_list_item ; CAMPER (2) + db "TODD@", TRAINERTYPE_NORMAL + db 14 + dw PSYDUCK + db -1 ; end + + next_list_item ; CAMPER (3) + db "IVAN@", TRAINERTYPE_NORMAL + db 10 + dw DIGLETT + db 10 + dw ZUBAT + db 14 + dw DIGLETT + db -1 ; end + + next_list_item ; CAMPER (4) + db "ELLIOT@", TRAINERTYPE_NORMAL + db 13 + dw SANDSHREW + db 15 + dw MARILL + db -1 ; end + + next_list_item ; CAMPER (5) + db "BARRY@", TRAINERTYPE_NORMAL + db 36 + dw NIDOKING + db -1 ; end + + next_list_item ; CAMPER (6) + db "LLOYD@", TRAINERTYPE_NORMAL + db 34 + dw NIDOKING + db -1 ; end + + next_list_item ; CAMPER (7) + db "DEAN@", TRAINERTYPE_NORMAL + db 33 + dw GOLDUCK + db 31 + dw SANDSLASH + db -1 ; end + + next_list_item ; CAMPER (8) + db "SID@", TRAINERTYPE_NORMAL + db 32 + dw DUGTRIO + db 29 + dw PRIMEAPE + db 29 + dw POLIWRATH + db -1 ; end + + next_list_item ; CAMPER (9) + db "HARVEY@", TRAINERTYPE_NORMAL + db 15 + dw NIDORINO + db -1 ; end + + next_list_item ; CAMPER (10) + db "DALE@", TRAINERTYPE_NORMAL + db 15 + dw NIDORINO + db -1 ; end + + next_list_item ; CAMPER (11) + db "TED@", TRAINERTYPE_NORMAL + db 17 + dw MANKEY + db -1 ; end + + next_list_item ; CAMPER (12) + db "TODD@", TRAINERTYPE_NORMAL + db 17 + dw GEODUDE + db 17 + dw GEODUDE + db 23 + dw PSYDUCK + db -1 ; end + + next_list_item ; CAMPER (13) + db "TODD@", TRAINERTYPE_NORMAL + db 23 + dw GEODUDE + db 23 + dw GEODUDE + db 26 + dw PSYDUCK + db -1 ; end + + next_list_item ; CAMPER (14) + db "THOMAS@", TRAINERTYPE_NORMAL + db 33 + dw GRAVELER + db 36 + dw GRAVELER + db 40 + dw GOLBAT + db 42 + dw GOLDUCK + db -1 ; end + + next_list_item ; CAMPER (15) + db "LEROY@", TRAINERTYPE_NORMAL + db 33 + dw GRAVELER + db 36 + dw GRAVELER + db 40 + dw GOLBAT + db 42 + dw GOLDUCK + db -1 ; end + + next_list_item ; CAMPER (16) + db "DAVID@", TRAINERTYPE_NORMAL + db 33 + dw GRAVELER + db 36 + dw GRAVELER + db 40 + dw GOLBAT + db 42 + dw GOLDUCK + db -1 ; end + + next_list_item ; CAMPER (17) + db "JOHN@", TRAINERTYPE_NORMAL + db 33 + dw GRAVELER + db 36 + dw GRAVELER + db 40 + dw GOLBAT + db 42 + dw GOLDUCK + db -1 ; end + + next_list_item ; CAMPER (18) + db "JERRY@", TRAINERTYPE_NORMAL + db 37 + dw SANDSLASH + db -1 ; end + + next_list_item ; CAMPER (19) + db "SPENCER@", TRAINERTYPE_NORMAL + db 17 + dw SANDSHREW + db 17 + dw SANDSLASH + db 19 + dw ZUBAT + db -1 ; end + + next_list_item ; CAMPER (20) + db "TODD@", TRAINERTYPE_NORMAL + db 30 + dw GRAVELER + db 30 + dw GRAVELER + db 30 + dw SLUGMA + db 32 + dw PSYDUCK + db -1 ; end + + next_list_item ; CAMPER (21) + db "TODD@", TRAINERTYPE_MOVES + db 33 + dw GRAVELER + dw SELFDESTRUCT, ROCK_THROW, HARDEN, MAGNITUDE + db 33 + dw GRAVELER + dw SELFDESTRUCT, ROCK_THROW, HARDEN, MAGNITUDE + db 36 + dw MAGCARGO + dw ROCK_THROW, HARDEN, AMNESIA, FLAMETHROWER + db 34 + dw GOLDUCK + dw DISABLE, PSYCHIC_M, SURF, PSYCH_UP + db -1 ; end + + next_list_item ; CAMPER (22) + db "QUENTIN@", TRAINERTYPE_NORMAL + db 30 + dw FEAROW + db 30 + dw PRIMEAPE + db 30 + dw TAUROS + db -1 ; end + + end_list_items + +ExecutiveFGroup: + next_list_item ; EXECUTIVEF (1) + db "EXECUTIVE@", TRAINERTYPE_MOVES + db 32 + dw ARBOK + dw WRAP, POISON_STING, BITE, GLARE + db 32 + dw VILEPLUME + dw ABSORB, SWEET_SCENT, SLEEP_POWDER, ACID + db 32 + dw MURKROW + dw PECK, PURSUIT, HAZE, NIGHT_SHADE + db -1 ; end + + next_list_item ; EXECUTIVEF (2) + db "EXECUTIVE@", TRAINERTYPE_MOVES + db 23 + dw ARBOK + dw WRAP, LEER, POISON_STING, BITE + db 23 + dw GLOOM + dw ABSORB, SWEET_SCENT, SLEEP_POWDER, ACID + db 25 + dw MURKROW + dw PECK, PURSUIT, HAZE, NO_MOVE + db -1 ; end + + end_list_items + +SageGroup: + next_list_item ; SAGE (1) + db "CHOW@", TRAINERTYPE_NORMAL + db 3 + dw BELLSPROUT + db 3 + dw BELLSPROUT + db 3 + dw BELLSPROUT + db -1 ; end + + next_list_item ; SAGE (2) + db "NICO@", TRAINERTYPE_NORMAL + db 3 + dw BELLSPROUT + db 3 + dw BELLSPROUT + db 3 + dw BELLSPROUT + db -1 ; end + + next_list_item ; SAGE (3) + db "JIN@", TRAINERTYPE_NORMAL + db 6 + dw BELLSPROUT + db -1 ; end + + next_list_item ; SAGE (4) + db "TROY@", TRAINERTYPE_NORMAL + db 7 + dw BELLSPROUT + db 7 + dw HOOTHOOT + db -1 ; end + + next_list_item ; SAGE (5) + db "JEFFREY@", TRAINERTYPE_NORMAL + db 22 + dw HAUNTER + db -1 ; end + + next_list_item ; SAGE (6) + db "PING@", TRAINERTYPE_NORMAL + db 16 + dw GASTLY + db 16 + dw GASTLY + db 16 + dw GASTLY + db 16 + dw GASTLY + db 16 + dw GASTLY + db -1 ; end + + next_list_item ; SAGE (7) + db "EDMOND@", TRAINERTYPE_NORMAL + db 3 + dw BELLSPROUT + db 3 + dw BELLSPROUT + db 3 + dw BELLSPROUT + db -1 ; end + + next_list_item ; SAGE (8) + db "NEAL@", TRAINERTYPE_NORMAL + db 6 + dw BELLSPROUT + db -1 ; end + + next_list_item ; SAGE (9) + db "LI@", TRAINERTYPE_NORMAL + db 7 + dw BELLSPROUT + db 7 + dw BELLSPROUT + db 10 + dw HOOTHOOT + db -1 ; end + + next_list_item ; SAGE (10) + db "GAKU@", TRAINERTYPE_NORMAL + db 32 + dw NOCTOWL + db 32 + dw FLAREON + db -1 ; end + + next_list_item ; SAGE (11) + db "MASA@", TRAINERTYPE_NORMAL + db 32 + dw NOCTOWL + db 32 + dw JOLTEON + db -1 ; end + + next_list_item ; SAGE (12) + db "KOJI@", TRAINERTYPE_NORMAL + db 32 + dw NOCTOWL + db 32 + dw VAPOREON + db -1 ; end + + end_list_items + +MediumGroup: + next_list_item ; MEDIUM (1) + db "MARTHA@", TRAINERTYPE_NORMAL + db 18 + dw GASTLY + db 20 + dw HAUNTER + db 20 + dw GASTLY + db -1 ; end + + next_list_item ; MEDIUM (2) + db "GRACE@", TRAINERTYPE_NORMAL + db 20 + dw HAUNTER + db 20 + dw HAUNTER + db -1 ; end + + next_list_item ; MEDIUM (3) + db "BETHANY@", TRAINERTYPE_NORMAL + db 25 + dw HAUNTER + db -1 ; end + + next_list_item ; MEDIUM (4) + db "MARGRET@", TRAINERTYPE_NORMAL + db 25 + dw HAUNTER + db -1 ; end + + next_list_item ; MEDIUM (5) + db "ETHEL@", TRAINERTYPE_NORMAL + db 25 + dw HAUNTER + db -1 ; end + + next_list_item ; MEDIUM (6) + db "REBECCA@", TRAINERTYPE_NORMAL + db 35 + dw DROWZEE + db 35 + dw HYPNO + db -1 ; end + + next_list_item ; MEDIUM (7) + db "DORIS@", TRAINERTYPE_NORMAL + db 34 + dw SLOWPOKE + db 36 + dw SLOWBRO + db -1 ; end + + end_list_items + +BoarderGroup: + next_list_item ; BOARDER (1) + db "RONALD@", TRAINERTYPE_NORMAL + db 24 + dw SEEL + db 25 + dw DEWGONG + db 24 + dw SEEL + db -1 ; end + + next_list_item ; BOARDER (2) + db "BRAD@", TRAINERTYPE_NORMAL + db 26 + dw SWINUB + db 26 + dw SWINUB + db -1 ; end + + next_list_item ; BOARDER (3) + db "DOUGLAS@", TRAINERTYPE_NORMAL + db 24 + dw SHELLDER + db 25 + dw CLOYSTER + db 24 + dw SHELLDER + db -1 ; end + + end_list_items + +PokefanMGroup: + next_list_item ; POKEFANM (1) + db "WILLIAM@", TRAINERTYPE_ITEM + db 14 + dw RAICHU + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (2) + db "DEREK@", TRAINERTYPE_ITEM + db 17 + dw PIKACHU + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (3) + db "ROBERT@", TRAINERTYPE_ITEM + db 33 + dw QUAGSIRE + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (4) + db "JOSHUA@", TRAINERTYPE_ITEM + db 23 + dw PIKACHU + db BERRY + db 23 + dw PIKACHU + db BERRY + db 23 + dw PIKACHU + db BERRY + db 23 + dw PIKACHU + db BERRY + db 23 + dw PIKACHU + db BERRY + db 23 + dw PIKACHU + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (5) + db "CARTER@", TRAINERTYPE_ITEM + db 29 + dw BULBASAUR + db BERRY + db 29 + dw CHARMANDER + db BERRY + db 29 + dw SQUIRTLE + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (6) + db "TREVOR@", TRAINERTYPE_ITEM + db 33 + dw PSYDUCK + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (7) + db "BRANDON@", TRAINERTYPE_ITEM + db 13 + dw SNUBBULL + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (8) + db "JEREMY@", TRAINERTYPE_ITEM + db 28 + dw MEOWTH + db BERRY + db 28 + dw MEOWTH + db BERRY + db 28 + dw MEOWTH + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (9) + db "COLIN@", TRAINERTYPE_ITEM + db 32 + dw DELIBIRD + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (10) + db "DEREK@", TRAINERTYPE_ITEM + db 19 + dw PIKACHU + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (11) + db "DEREK@", TRAINERTYPE_ITEM + db 36 + dw PIKACHU + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (12) + db "ALEX@", TRAINERTYPE_ITEM + db 29 + dw NIDOKING + db BERRY + db 29 + dw SLOWKING + db BERRY + db 29 + dw SEAKING + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (13) + db "REX@", TRAINERTYPE_ITEM + db 35 + dw PHANPY + db BERRY + db -1 ; end + + next_list_item ; POKEFANM (14) + db "ALLAN@", TRAINERTYPE_ITEM + db 35 + dw TEDDIURSA + db BERRY + db -1 ; end + + end_list_items + +KimonoGirlGroup: + next_list_item ; KIMONO_GIRL (1) + db "NAOKO@", TRAINERTYPE_NORMAL + db 20 + dw SKIPLOOM + db 20 + dw VULPIX + db 18 + dw SKIPLOOM + db -1 ; end + + next_list_item ; KIMONO_GIRL (2) + db "NAOKO@", TRAINERTYPE_NORMAL + db 17 + dw FLAREON + db -1 ; end + + next_list_item ; KIMONO_GIRL (3) + db "SAYO@", TRAINERTYPE_NORMAL + db 17 + dw ESPEON + db -1 ; end + + next_list_item ; KIMONO_GIRL (4) + db "ZUKI@", TRAINERTYPE_NORMAL + db 17 + dw UMBREON + db -1 ; end + + next_list_item ; KIMONO_GIRL (5) + db "KUNI@", TRAINERTYPE_NORMAL + db 17 + dw VAPOREON + db -1 ; end + + next_list_item ; KIMONO_GIRL (6) + db "MIKI@", TRAINERTYPE_NORMAL + db 17 + dw JOLTEON + db -1 ; end + + end_list_items + +TwinsGroup: + next_list_item ; TWINS (1) + db "AMY & MAY@", TRAINERTYPE_NORMAL + db 10 + dw SPINARAK + db 10 + dw LEDYBA + db -1 ; end + + next_list_item ; TWINS (2) + db "ANN & ANNE@", TRAINERTYPE_MOVES + db 16 + dw CLEFAIRY + dw GROWL, ENCORE, DOUBLESLAP, METRONOME + db 16 + dw JIGGLYPUFF + dw SING, DEFENSE_CURL, POUND, DISABLE + db -1 ; end + + next_list_item ; TWINS (3) + db "ANN & ANNE@", TRAINERTYPE_MOVES + db 16 + dw JIGGLYPUFF + dw SING, DEFENSE_CURL, POUND, DISABLE + db 16 + dw CLEFAIRY + dw GROWL, ENCORE, DOUBLESLAP, METRONOME + db -1 ; end + + next_list_item ; TWINS (4) + db "AMY & MAY@", TRAINERTYPE_NORMAL + db 10 + dw LEDYBA + db 10 + dw SPINARAK + db -1 ; end + + next_list_item ; TWINS (5) + db "JO & ZOE@", TRAINERTYPE_NORMAL + db 35 + dw VICTREEBEL + db 35 + dw VILEPLUME + db -1 ; end + + next_list_item ; TWINS (6) + db "JO & ZOE@", TRAINERTYPE_NORMAL + db 35 + dw VILEPLUME + db 35 + dw VICTREEBEL + db -1 ; end + + next_list_item ; TWINS (7) + db "MEG & PEG@", TRAINERTYPE_NORMAL + db 31 + dw TEDDIURSA + db 31 + dw PHANPY + db -1 ; end + + next_list_item ; TWINS (8) + db "MEG & PEG@", TRAINERTYPE_NORMAL + db 31 + dw PHANPY + db 31 + dw TEDDIURSA + db -1 ; end + + next_list_item ; TWINS (9) + db "LEA & PIA@", TRAINERTYPE_MOVES + db 35 + dw DRATINI + dw THUNDER_WAVE, TWISTER, FLAMETHROWER, HEADBUTT + db 35 + dw DRATINI + dw THUNDER_WAVE, TWISTER, ICE_BEAM, HEADBUTT + db -1 ; end + + next_list_item ; TWINS (10) + db "LEA & PIA@", TRAINERTYPE_MOVES + db 38 + dw DRATINI + dw THUNDER_WAVE, TWISTER, ICE_BEAM, HEADBUTT + db 38 + dw DRATINI + dw THUNDER_WAVE, TWISTER, FLAMETHROWER, HEADBUTT + db -1 ; end + + end_list_items + +PokefanFGroup: + next_list_item ; POKEFANF (1) + db "BEVERLY@", TRAINERTYPE_ITEM + db 14 + dw SNUBBULL + db BERRY + db -1 ; end + + next_list_item ; POKEFANF (2) + db "RUTH@", TRAINERTYPE_ITEM + db 17 + dw PIKACHU + db BERRY + db -1 ; end + + next_list_item ; POKEFANF (3) + db "BEVERLY@", TRAINERTYPE_ITEM + db 18 + dw SNUBBULL + db BERRY + db -1 ; end + + next_list_item ; POKEFANF (4) + db "BEVERLY@", TRAINERTYPE_ITEM + db 30 + dw GRANBULL + db BERRY + db -1 ; end + + next_list_item ; POKEFANF (5) + db "GEORGIA@", TRAINERTYPE_ITEM + db 23 + dw SENTRET + db BERRY + db 23 + dw SENTRET + db BERRY + db 23 + dw SENTRET + db BERRY + db 28 + dw FURRET + db BERRY + db 23 + dw SENTRET + db BERRY + db -1 ; end + + next_list_item ; POKEFANF (6) + db "JAIME@", TRAINERTYPE_ITEM + db 16 + dw MEOWTH + db BERRY + db -1 ; end + + end_list_items + +RedGroup: + next_list_item ; RED (1) + db "RED@", TRAINERTYPE_MOVES + db 81 + dw PIKACHU + dw CHARM, QUICK_ATTACK, THUNDERBOLT, THUNDER + db 73 + dw ESPEON + dw MUD_SLAP, REFLECT, SWIFT, PSYCHIC_M + db 75 + dw SNORLAX + dw AMNESIA, SNORE, REST, BODY_SLAM + db 77 + dw VENUSAUR + dw SUNNY_DAY, GIGA_DRAIN, SYNTHESIS, SOLARBEAM + db 77 + dw CHARIZARD + dw FLAMETHROWER, WING_ATTACK, SLASH, FIRE_SPIN + db 77 + dw BLASTOISE + dw RAIN_DANCE, SURF, BLIZZARD, WHIRLPOOL + db -1 ; end + + end_list_items + +BlueGroup: + next_list_item ; BLUE (1) + db "BLUE@", TRAINERTYPE_MOVES + db 56 + dw PIDGEOT + dw QUICK_ATTACK, WHIRLWIND, WING_ATTACK, MIRROR_MOVE + db 54 + dw ALAKAZAM + dw DISABLE, RECOVER, PSYCHIC_M, REFLECT + db 56 + dw RHYDON + dw FURY_ATTACK, SANDSTORM, ROCK_SLIDE, EARTHQUAKE + db 58 + dw GYARADOS + dw TWISTER, HYDRO_PUMP, RAIN_DANCE, HYPER_BEAM + db 58 + dw EXEGGUTOR + dw SUNNY_DAY, LEECH_SEED, EGG_BOMB, SOLARBEAM + db 58 + dw ARCANINE + dw ROAR, SWIFT, FLAMETHROWER, EXTREMESPEED + db -1 ; end + + end_list_items + +OfficerGroup: + next_list_item ; OFFICER (1) + db "KEITH@", TRAINERTYPE_NORMAL + db 17 + dw GROWLITHE + db -1 ; end + + next_list_item ; OFFICER (2) + db "DIRK@", TRAINERTYPE_NORMAL + db 14 + dw GROWLITHE + db 14 + dw GROWLITHE + db -1 ; end + + end_list_items + +GruntFGroup: + next_list_item ; GRUNTF (1) + db "GRUNT@", TRAINERTYPE_NORMAL + db 9 + dw ZUBAT + db 11 + dw EKANS + db -1 ; end + + next_list_item ; GRUNTF (2) + db "GRUNT@", TRAINERTYPE_NORMAL + db 26 + dw ARBOK + db -1 ; end + + next_list_item ; GRUNTF (3) + db "GRUNT@", TRAINERTYPE_NORMAL + db 25 + dw GLOOM + db 25 + dw GLOOM + db -1 ; end + + next_list_item ; GRUNTF (4) + db "GRUNT@", TRAINERTYPE_NORMAL + db 21 + dw EKANS + db 23 + dw ODDISH + db 21 + dw EKANS + db 24 + dw GLOOM + db -1 ; end + + next_list_item ; GRUNTF (5) + db "GRUNT@", TRAINERTYPE_MOVES + db 18 + dw EKANS + dw WRAP, LEER, POISON_STING, BITE + db 18 + dw GLOOM + dw ABSORB, SWEET_SCENT, STUN_SPORE, SLEEP_POWDER + db -1 ; end + + end_list_items + +MysticalmanGroup: + next_list_item ; MYSTICALMAN (1) + db "EUSINE@", TRAINERTYPE_MOVES + db 23 + dw DROWZEE + dw DREAM_EATER, HYPNOSIS, DISABLE, CONFUSION + db 23 + dw HAUNTER + dw LICK, HYPNOSIS, MEAN_LOOK, CURSE + db 25 + dw ELECTRODE + dw SCREECH, SONICBOOM, THUNDER, ROLLOUT + db -1 ; end + + end_list_items diff --git a/data/trainers/party_pointers.asm b/data/trainers/party_pointers.asm new file mode 100644 index 0000000..c811b14 --- /dev/null +++ b/data/trainers/party_pointers.asm @@ -0,0 +1,73 @@ +; Groups are defined in data/trainers/parties.asm. + +TrainerGroups: +; entries correspond to trainer classes (see constants/trainer_constants.asm) + table_width 3, TrainerGroups + dba FalknerGroup + dba WhitneyGroup + dba BugsyGroup + dba MortyGroup + dba PryceGroup + dba JasmineGroup + dba ChuckGroup + dba ClairGroup + dba Rival1Group + dba PokemonProfGroup + dba WillGroup + dba PKMNTrainerGroup + dba BrunoGroup + dba KarenGroup + dba KogaGroup + dba ChampionGroup + dba BrockGroup + dba MistyGroup + dba LtSurgeGroup + dba ScientistGroup + dba ErikaGroup + dba YoungsterGroup + dba SchoolboyGroup + dba BirdKeeperGroup + dba LassGroup + dba JanineGroup + dba CooltrainerMGroup + dba CooltrainerFGroup + dba BeautyGroup + dba PokemaniacGroup + dba GruntMGroup + dba GentlemanGroup + dba SkierGroup + dba TeacherGroup + dba SabrinaGroup + dba BugCatcherGroup + dba FisherGroup + dba SwimmerMGroup + dba SwimmerFGroup + dba SailorGroup + dba SuperNerdGroup + dba Rival2Group + dba GuitaristGroup + dba HikerGroup + dba BikerGroup + dba BlaineGroup + dba BurglarGroup + dba FirebreatherGroup + dba JugglerGroup + dba BlackbeltGroup + dba ExecutiveMGroup + dba PsychicGroup + dba PicnickerGroup + dba CamperGroup + dba ExecutiveFGroup + dba SageGroup + dba MediumGroup + dba BoarderGroup + dba PokefanMGroup + dba KimonoGirlGroup + dba TwinsGroup + dba PokefanFGroup + dba RedGroup + dba BlueGroup + dba OfficerGroup + dba GruntFGroup + dba MysticalmanGroup + assert_table_length NUM_TRAINER_CLASSES diff --git a/data/trainers/pic_pointers.asm b/data/trainers/pic_pointers.asm new file mode 100644 index 0000000..c22072c --- /dev/null +++ b/data/trainers/pic_pointers.asm @@ -0,0 +1,73 @@ +; Pics are defined in gfx/pics.asm + +TrainerPicPointers:: +; entries correspond to trainer classes (see constants/trainer_constants.asm) + table_width 3, TrainerPicPointers + dba FalknerPic + dba WhitneyPic + dba BugsyPic + dba MortyPic + dba PrycePic + dba JasminePic + dba ChuckPic + dba ClairPic + dba Rival1Pic + dba PokemonProfPic + dba WillPic + dba CalPic + dba BrunoPic + dba KarenPic + dba KogaPic + dba ChampionPic + dba BrockPic + dba MistyPic + dba LtSurgePic + dba ScientistPic + dba ErikaPic + dba YoungsterPic + dba SchoolboyPic + dba BirdKeeperPic + dba LassPic + dba JaninePic + dba CooltrainermPic + dba CooltrainerfPic + dba BeautyPic + dba PokemaniacPic + dba GruntmPic + dba GentlemanPic + dba SkierPic + dba TeacherPic + dba SabrinaPic + dba BugCatcherPic + dba FisherPic + dba SwimmermPic + dba SwimmerfPic + dba SailorPic + dba SuperNerdPic + dba Rival2Pic + dba GuitaristPic + dba HikerPic + dba BikerPic + dba BlainePic + dba BurglarPic + dba FirebreatherPic + dba JugglerPic + dba BlackbeltTPic + dba ExecutivemPic + dba PsychicTPic + dba PicnickerPic + dba CamperPic + dba ExecutivefPic + dba SagePic + dba MediumPic + dba BoarderPic + dba PokefanmPic + dba KimonoGirlPic + dba TwinsPic + dba PokefanfPic + dba RedPic + dba BluePic + dba OfficerPic + dba GruntfPic + dba MysticalmanPic + assert_table_length NUM_TRAINER_CLASSES diff --git a/data/trainers/sprites.asm b/data/trainers/sprites.asm new file mode 100644 index 0000000..e1ce653 --- /dev/null +++ b/data/trainers/sprites.asm @@ -0,0 +1,70 @@ +BTTrainerClassSprites: +; entries correspond to trainer classes + table_width 1, BTTrainerClassSprites + db SPRITE_FALKNER + db SPRITE_WHITNEY + db SPRITE_BUGSY + db SPRITE_MORTY + db SPRITE_PRYCE + db SPRITE_JASMINE + db SPRITE_CHUCK + db SPRITE_CLAIR + db SPRITE_RIVAL + db SPRITE_OAK + db SPRITE_WILL + db SPRITE_CHRIS + db SPRITE_BRUNO + db SPRITE_KAREN + db SPRITE_KOGA + db SPRITE_LANCE + db SPRITE_BROCK + db SPRITE_MISTY + db SPRITE_SURGE + db SPRITE_SCIENTIST + db SPRITE_ERIKA + db SPRITE_YOUNGSTER + db SPRITE_YOUNGSTER + db SPRITE_YOUNGSTER + db SPRITE_LASS + db SPRITE_JANINE + db SPRITE_COOLTRAINER_M + db SPRITE_COOLTRAINER_F + db SPRITE_BEAUTY + db SPRITE_SUPER_NERD + db SPRITE_ROCKET + db SPRITE_GENTLEMAN + db SPRITE_BEAUTY + db SPRITE_TEACHER + db SPRITE_SABRINA + db SPRITE_BUG_CATCHER + db SPRITE_FISHER + db SPRITE_SUPER_NERD + db SPRITE_COOLTRAINER_F + db SPRITE_SAILOR + db SPRITE_SUPER_NERD + db SPRITE_BLUE + db SPRITE_ROCKER + db SPRITE_POKEFAN_M + db SPRITE_BIKER + db SPRITE_BLAINE + db SPRITE_PHARMACIST + db SPRITE_FISHER + db SPRITE_SUPER_NERD + db SPRITE_BLACK_BELT + db SPRITE_ROCKET + db SPRITE_YOUNGSTER + db SPRITE_LASS + db SPRITE_YOUNGSTER + db SPRITE_ROCKET_GIRL + db SPRITE_SAGE + db SPRITE_GRANNY + db SPRITE_ROCKER + db SPRITE_POKEFAN_M + db SPRITE_KIMONO_GIRL + db SPRITE_TWIN + db SPRITE_POKEFAN_F + db SPRITE_RED + db SPRITE_BLUE + db SPRITE_OFFICER + db SPRITE_ROCKET_GIRL + assert_table_length NUM_TRAINER_CLASSES - 1 ; exclude MYSTICALMAN diff --git a/data/types/badge_type_boosts.asm b/data/types/badge_type_boosts.asm new file mode 100644 index 0000000..fb353df --- /dev/null +++ b/data/types/badge_type_boosts.asm @@ -0,0 +1,21 @@ +BadgeTypeBoosts: +; entries correspond to wJohtoBadges constants + db FLYING ; ZEPHYRBADGE + db BUG ; HIVEBADGE + db NORMAL ; PLAINBADGE + db GHOST ; FOGBADGE + db STEEL ; MINERALBADGE + db FIGHTING ; STORMBADGE + db ICE ; GLACIERBADGE + db DRAGON ; RISINGBADGE + ; fallthrough +; entries correspond to wKantoBadges constants + db ROCK ; BOULDERBADGE + db WATER ; CASCADEBADGE + db ELECTRIC ; THUNDERBADGE + db GRASS ; RAINBOWBADGE + db POISON ; SOULBADGE + db PSYCHIC_TYPE ; MARSHBADGE + db FIRE ; VOLCANOBADGE + db GROUND ; EARTHBADGE + db -1 ; end diff --git a/data/types/names.asm b/data/types/names.asm new file mode 100644 index 0000000..94fe67e --- /dev/null +++ b/data/types/names.asm @@ -0,0 +1,54 @@ +TypeNames: +; entries correspond to types (see constants/type_constants.asm) + table_width 2, TypeNames + dw Normal + dw Fighting + dw Flying + dw Poison + dw Ground + dw Rock + dw Bird + dw Bug + dw Ghost + dw Steel + assert_table_length UNUSED_TYPES + dw Normal + dw Normal + dw Normal + dw Normal + dw Normal + dw Normal + dw Normal + dw Normal + dw Normal + dw CurseType + assert_table_length UNUSED_TYPES_END + dw Fire + dw Water + dw Grass + dw Electric + dw Psychic + dw Ice + dw Dragon + dw Dark + assert_table_length TYPES_END + +Normal: db "NORMAL@" +Fighting: db "FIGHTING@" +Flying: db "FLYING@" +Poison: db "POISON@" +CurseType: db "???@" +Fire: db "FIRE@" +Water: db "WATER@" +Grass: db "GRASS@" +Electric: db "ELECTRIC@" +Psychic: db "PSYCHIC@" +Ice: db "ICE@" +Ground: db "GROUND@" +Rock: db "ROCK@" +Bird: db "BIRD@" +Bug: db "BUG@" +Ghost: db "GHOST@" +Steel: db "STEEL@" +Dragon: db "DRAGON@" +Dark: db "DARK@" diff --git a/data/types/search_strings.asm b/data/types/search_strings.asm new file mode 100644 index 0000000..1345c27 --- /dev/null +++ b/data/types/search_strings.asm @@ -0,0 +1,22 @@ +PokedexTypeSearchStrings: +; entries correspond with PokedexTypeSearchConversionTable (see data/types/search_types.asm) + table_width POKEDEX_TYPE_STRING_LENGTH, PokedexTypeSearchStrings + db " ---- @" + db " NORMAL @" + db " FIRE @" + db " WATER @" + db " GRASS @" + db "ELECTRIC@" + db " ICE @" + db "FIGHTING@" + db " POISON @" + db " GROUND @" + db " FLYING @" + db "PSYCHIC @" + db " BUG @" + db " ROCK @" + db " GHOST @" + db " DRAGON @" + db " DARK @" + db " STEEL @" + assert_table_length NUM_TYPES + 1 diff --git a/data/types/search_types.asm b/data/types/search_types.asm new file mode 100644 index 0000000..dd9ea56 --- /dev/null +++ b/data/types/search_types.asm @@ -0,0 +1,21 @@ +PokedexTypeSearchConversionTable: +; entries correspond with PokedexTypeSearchStrings (see data/types/search_strings.asm) + table_width 1, PokedexTypeSearchConversionTable + db NORMAL + db FIRE + db WATER + db GRASS + db ELECTRIC + db ICE + db FIGHTING + db POISON + db GROUND + db FLYING + db PSYCHIC_TYPE + db BUG + db ROCK + db GHOST + db DRAGON + db DARK + db STEEL + assert_table_length NUM_TYPES diff --git a/data/types/type_boost_items.asm b/data/types/type_boost_items.asm new file mode 100644 index 0000000..85a58db --- /dev/null +++ b/data/types/type_boost_items.asm @@ -0,0 +1,19 @@ +TypeBoostItems: + db HELD_NORMAL_BOOST, NORMAL ; PINK_BOW/POLKADOT_BOW + db HELD_FIGHTING_BOOST, FIGHTING ; BLACKBELT_I + db HELD_FLYING_BOOST, FLYING ; SHARP_BEAK + db HELD_POISON_BOOST, POISON ; POISON BARB + db HELD_GROUND_BOOST, GROUND ; SOFT_SAND + db HELD_ROCK_BOOST, ROCK ; HARD_STONE + db HELD_BUG_BOOST, BUG ; SILVERPOWDER + db HELD_GHOST_BOOST, GHOST ; SPELL_TAG + db HELD_FIRE_BOOST, FIRE ; CHARCOAL + db HELD_WATER_BOOST, WATER ; MYSTIC WATER + db HELD_GRASS_BOOST, GRASS ; MIRACLE_SEED + db HELD_ELECTRIC_BOOST, ELECTRIC ; MAGNET + db HELD_PSYCHIC_BOOST, PSYCHIC_TYPE ; TWISTEDSPOON + db HELD_ICE_BOOST, ICE ; NEVERMELTICE + db HELD_DRAGON_BOOST, DRAGON ; DRAGON_SCALE + db HELD_DARK_BOOST, DARK ; BLACKGLASSES + db HELD_STEEL_BOOST, STEEL ; METAL_COAT + db -1 diff --git a/data/types/type_matchups.asm b/data/types/type_matchups.asm new file mode 100644 index 0000000..81906b0 --- /dev/null +++ b/data/types/type_matchups.asm @@ -0,0 +1,118 @@ +TypeMatchups: + ; attacker, defender, *= + db NORMAL, ROCK, NOT_VERY_EFFECTIVE + db NORMAL, STEEL, NOT_VERY_EFFECTIVE + db FIRE, FIRE, NOT_VERY_EFFECTIVE + db FIRE, WATER, NOT_VERY_EFFECTIVE + db FIRE, GRASS, SUPER_EFFECTIVE + db FIRE, ICE, SUPER_EFFECTIVE + db FIRE, BUG, SUPER_EFFECTIVE + db FIRE, ROCK, NOT_VERY_EFFECTIVE + db FIRE, DRAGON, NOT_VERY_EFFECTIVE + db FIRE, STEEL, SUPER_EFFECTIVE + db WATER, FIRE, SUPER_EFFECTIVE + db WATER, WATER, NOT_VERY_EFFECTIVE + db WATER, GRASS, NOT_VERY_EFFECTIVE + db WATER, GROUND, SUPER_EFFECTIVE + db WATER, ROCK, SUPER_EFFECTIVE + db WATER, DRAGON, NOT_VERY_EFFECTIVE + db ELECTRIC, WATER, SUPER_EFFECTIVE + db ELECTRIC, ELECTRIC, NOT_VERY_EFFECTIVE + db ELECTRIC, GRASS, NOT_VERY_EFFECTIVE + db ELECTRIC, GROUND, NO_EFFECT + db ELECTRIC, FLYING, SUPER_EFFECTIVE + db ELECTRIC, DRAGON, NOT_VERY_EFFECTIVE + db GRASS, FIRE, NOT_VERY_EFFECTIVE + db GRASS, WATER, SUPER_EFFECTIVE + db GRASS, GRASS, NOT_VERY_EFFECTIVE + db GRASS, POISON, NOT_VERY_EFFECTIVE + db GRASS, GROUND, SUPER_EFFECTIVE + db GRASS, FLYING, NOT_VERY_EFFECTIVE + db GRASS, BUG, NOT_VERY_EFFECTIVE + db GRASS, ROCK, SUPER_EFFECTIVE + db GRASS, DRAGON, NOT_VERY_EFFECTIVE + db GRASS, STEEL, NOT_VERY_EFFECTIVE + db ICE, WATER, NOT_VERY_EFFECTIVE + db ICE, GRASS, SUPER_EFFECTIVE + db ICE, ICE, NOT_VERY_EFFECTIVE + db ICE, GROUND, SUPER_EFFECTIVE + db ICE, FLYING, SUPER_EFFECTIVE + db ICE, DRAGON, SUPER_EFFECTIVE + db ICE, STEEL, NOT_VERY_EFFECTIVE + db ICE, FIRE, NOT_VERY_EFFECTIVE + db FIGHTING, NORMAL, SUPER_EFFECTIVE + db FIGHTING, ICE, SUPER_EFFECTIVE + db FIGHTING, POISON, NOT_VERY_EFFECTIVE + db FIGHTING, FLYING, NOT_VERY_EFFECTIVE + db FIGHTING, PSYCHIC_TYPE, NOT_VERY_EFFECTIVE + db FIGHTING, BUG, NOT_VERY_EFFECTIVE + db FIGHTING, ROCK, SUPER_EFFECTIVE + db FIGHTING, DARK, SUPER_EFFECTIVE + db FIGHTING, STEEL, SUPER_EFFECTIVE + db POISON, GRASS, SUPER_EFFECTIVE + db POISON, POISON, NOT_VERY_EFFECTIVE + db POISON, GROUND, NOT_VERY_EFFECTIVE + db POISON, ROCK, NOT_VERY_EFFECTIVE + db POISON, GHOST, NOT_VERY_EFFECTIVE + db POISON, STEEL, NO_EFFECT + db GROUND, FIRE, SUPER_EFFECTIVE + db GROUND, ELECTRIC, SUPER_EFFECTIVE + db GROUND, GRASS, NOT_VERY_EFFECTIVE + db GROUND, POISON, SUPER_EFFECTIVE + db GROUND, FLYING, NO_EFFECT + db GROUND, BUG, NOT_VERY_EFFECTIVE + db GROUND, ROCK, SUPER_EFFECTIVE + db GROUND, STEEL, SUPER_EFFECTIVE + db FLYING, ELECTRIC, NOT_VERY_EFFECTIVE + db FLYING, GRASS, SUPER_EFFECTIVE + db FLYING, FIGHTING, SUPER_EFFECTIVE + db FLYING, BUG, SUPER_EFFECTIVE + db FLYING, ROCK, NOT_VERY_EFFECTIVE + db FLYING, STEEL, NOT_VERY_EFFECTIVE + db PSYCHIC_TYPE, FIGHTING, SUPER_EFFECTIVE + db PSYCHIC_TYPE, POISON, SUPER_EFFECTIVE + db PSYCHIC_TYPE, PSYCHIC_TYPE, NOT_VERY_EFFECTIVE + db PSYCHIC_TYPE, DARK, NO_EFFECT + db PSYCHIC_TYPE, STEEL, NOT_VERY_EFFECTIVE + db BUG, FIRE, NOT_VERY_EFFECTIVE + db BUG, GRASS, SUPER_EFFECTIVE + db BUG, FIGHTING, NOT_VERY_EFFECTIVE + db BUG, POISON, NOT_VERY_EFFECTIVE + db BUG, FLYING, NOT_VERY_EFFECTIVE + db BUG, PSYCHIC_TYPE, SUPER_EFFECTIVE + db BUG, GHOST, NOT_VERY_EFFECTIVE + db BUG, DARK, SUPER_EFFECTIVE + db BUG, STEEL, NOT_VERY_EFFECTIVE + db ROCK, FIRE, SUPER_EFFECTIVE + db ROCK, ICE, SUPER_EFFECTIVE + db ROCK, FIGHTING, NOT_VERY_EFFECTIVE + db ROCK, GROUND, NOT_VERY_EFFECTIVE + db ROCK, FLYING, SUPER_EFFECTIVE + db ROCK, BUG, SUPER_EFFECTIVE + db ROCK, STEEL, NOT_VERY_EFFECTIVE + db GHOST, NORMAL, NO_EFFECT + db GHOST, PSYCHIC_TYPE, SUPER_EFFECTIVE + db GHOST, DARK, NOT_VERY_EFFECTIVE + db GHOST, STEEL, NOT_VERY_EFFECTIVE + db GHOST, GHOST, SUPER_EFFECTIVE + db DRAGON, DRAGON, SUPER_EFFECTIVE + db DRAGON, STEEL, NOT_VERY_EFFECTIVE + db DARK, FIGHTING, NOT_VERY_EFFECTIVE + db DARK, PSYCHIC_TYPE, SUPER_EFFECTIVE + db DARK, GHOST, SUPER_EFFECTIVE + db DARK, DARK, NOT_VERY_EFFECTIVE + db DARK, STEEL, NOT_VERY_EFFECTIVE + db STEEL, FIRE, NOT_VERY_EFFECTIVE + db STEEL, WATER, NOT_VERY_EFFECTIVE + db STEEL, ELECTRIC, NOT_VERY_EFFECTIVE + db STEEL, ICE, SUPER_EFFECTIVE + db STEEL, ROCK, SUPER_EFFECTIVE + db STEEL, STEEL, NOT_VERY_EFFECTIVE + + db -2 ; end (with Foresight) + +; Foresight removes Ghost's immunities. + db NORMAL, GHOST, NO_EFFECT + db FIGHTING, GHOST, NO_EFFECT + + db -1 ; end diff --git a/data/wild/bug_contest_mons.asm b/data/wild/bug_contest_mons.asm new file mode 100644 index 0000000..67f92bf --- /dev/null +++ b/data/wild/bug_contest_mons.asm @@ -0,0 +1,13 @@ +ContestMons: + ; %, species, min, max + dbwbb 20, CATERPIE, 7, 18 + dbwbb 20, WEEDLE, 7, 18 + dbwbb 10, METAPOD, 9, 18 + dbwbb 10, KAKUNA, 9, 18 + dbwbb 5, BUTTERFREE, 12, 15 + dbwbb 5, BEEDRILL, 12, 15 + dbwbb 10, VENONAT, 10, 16 + dbwbb 10, PARAS, 10, 17 + dbwbb 5, SCYTHER, 13, 14 + dbwbb 5, PINSIR, 13, 14 + dbwbb -1, VENOMOTH, 30, 40 diff --git a/data/wild/fish.asm b/data/wild/fish.asm new file mode 100644 index 0000000..25a7cf7 --- /dev/null +++ b/data/wild/fish.asm @@ -0,0 +1,233 @@ +DEF TIME_GROUP EQU 0 ; use the nth TimeFishGroups entry + +MACRO fishgroup +; chance, old rod, good rod, super rod + db \1 + dw \2, \3, \4 +ENDM + +FishGroups: +; entries correspond to FISHGROUP_* constants + table_width FISHGROUP_DATA_LENGTH, FishGroups + fishgroup 50 percent + 1, .Shore_Old, .Shore_Good, .Shore_Super + fishgroup 50 percent + 1, .Ocean_Old, .Ocean_Good, .Ocean_Super + fishgroup 50 percent + 1, .Lake_Old, .Lake_Good, .Lake_Super + fishgroup 50 percent + 1, .Pond_Old, .Pond_Good, .Pond_Super + fishgroup 50 percent + 1, .Dratini_Old, .Dratini_Good, .Dratini_Super + fishgroup 50 percent + 1, .Qwilfish_Swarm_Old, .Qwilfish_Swarm_Good, .Qwilfish_Swarm_Super + fishgroup 50 percent + 1, .Remoraid_Swarm_Old, .Remoraid_Swarm_Good, .Remoraid_Swarm_Super + fishgroup 50 percent + 1, .Gyarados_Old, .Gyarados_Good, .Gyarados_Super + fishgroup 50 percent + 1, .Dratini_2_Old, .Dratini_2_Good, .Dratini_2_Super + fishgroup 50 percent + 1, .WhirlIslands_Old, .WhirlIslands_Good, .WhirlIslands_Super + fishgroup 50 percent + 1, .Qwilfish_Old, .Qwilfish_Good, .Qwilfish_Super + fishgroup 50 percent + 1, .Remoraid_Old, .Remoraid_Good, .Remoraid_Super + fishgroup 50 percent + 1, .Qwilfish_NoSwarm_Old, .Qwilfish_NoSwarm_Good, .Qwilfish_NoSwarm_Super + assert_table_length NUM_FISHGROUPS + +.Shore_Old: + dbbw 70 percent + 1, 10, MAGIKARP + dbbw 85 percent + 1, 10, MAGIKARP + dbbw 100 percent, 10, KRABBY +.Shore_Good: + dbbw 35 percent, 20, MAGIKARP + dbbw 70 percent, 20, KRABBY + dbbw 90 percent + 1, 20, KRABBY + dbbw 100 percent, 0, TIME_GROUP +.Shore_Super: + dbbw 40 percent, 40, KRABBY + dbbw 70 percent, 1, TIME_GROUP + dbbw 90 percent + 1, 40, KRABBY + dbbw 100 percent, 40, KINGLER + +.Ocean_Old: + dbbw 70 percent + 1, 10, MAGIKARP + dbbw 85 percent + 1, 10, MAGIKARP + dbbw 100 percent, 10, TENTACOOL +.Ocean_Good: + dbbw 35 percent, 20, MAGIKARP + dbbw 70 percent, 20, TENTACOOL + dbbw 90 percent + 1, 20, CHINCHOU + dbbw 100 percent, 2, TIME_GROUP +.Ocean_Super: + dbbw 40 percent, 40, CHINCHOU + dbbw 70 percent, 3, TIME_GROUP + dbbw 90 percent + 1, 40, TENTACRUEL + dbbw 100 percent, 40, LANTURN + +.Lake_Old: + dbbw 70 percent + 1, 10, MAGIKARP + dbbw 85 percent + 1, 10, MAGIKARP + dbbw 100 percent, 10, GOLDEEN +.Lake_Good: + dbbw 35 percent, 20, MAGIKARP + dbbw 70 percent, 20, GOLDEEN + dbbw 90 percent + 1, 20, GOLDEEN + dbbw 100 percent, 4, TIME_GROUP +.Lake_Super: + dbbw 40 percent, 40, GOLDEEN + dbbw 70 percent, 5, TIME_GROUP + dbbw 90 percent + 1, 40, MAGIKARP + dbbw 100 percent, 40, SEAKING + +.Pond_Old: + dbbw 70 percent + 1, 10, MAGIKARP + dbbw 85 percent + 1, 10, MAGIKARP + dbbw 100 percent, 10, POLIWAG +.Pond_Good: + dbbw 35 percent, 20, MAGIKARP + dbbw 70 percent, 20, POLIWAG + dbbw 90 percent + 1, 20, POLIWAG + dbbw 100 percent, 6, TIME_GROUP +.Pond_Super: + dbbw 40 percent, 40, POLIWAG + dbbw 70 percent, 7, TIME_GROUP + dbbw 90 percent + 1, 40, MAGIKARP + dbbw 100 percent, 40, POLIWAG + +.Dratini_Old: + dbbw 70 percent + 1, 10, MAGIKARP + dbbw 85 percent + 1, 10, MAGIKARP + dbbw 100 percent, 10, MAGIKARP +.Dratini_Good: + dbbw 35 percent, 20, MAGIKARP + dbbw 70 percent, 20, MAGIKARP + dbbw 90 percent + 1, 20, MAGIKARP + dbbw 100 percent, 8, TIME_GROUP +.Dratini_Super: + dbbw 40 percent, 40, MAGIKARP + dbbw 70 percent, 9, TIME_GROUP + dbbw 90 percent + 1, 40, MAGIKARP + dbbw 100 percent, 40, DRAGONAIR + +.Qwilfish_Swarm_Old: + dbbw 70 percent + 1, 5, MAGIKARP + dbbw 85 percent + 1, 5, MAGIKARP + dbbw 100 percent, 5, QWILFISH +.Qwilfish_Swarm_Good: + dbbw 35 percent, 20, MAGIKARP + dbbw 70 percent, 20, QWILFISH + dbbw 90 percent + 1, 20, QWILFISH + dbbw 100 percent, 10, TIME_GROUP +.Qwilfish_Swarm_Super: + dbbw 40 percent, 40, QWILFISH + dbbw 70 percent, 11, TIME_GROUP + dbbw 90 percent + 1, 40, QWILFISH + dbbw 100 percent, 40, QWILFISH + +.Remoraid_Swarm_Old: + dbbw 70 percent + 1, 10, MAGIKARP + dbbw 85 percent + 1, 10, MAGIKARP + dbbw 100 percent, 10, REMORAID +.Remoraid_Swarm_Good: + dbbw 35 percent, 20, MAGIKARP + dbbw 70 percent, 20, REMORAID + dbbw 90 percent + 1, 20, REMORAID + dbbw 100 percent, 12, TIME_GROUP +.Remoraid_Swarm_Super: + dbbw 40 percent, 40, REMORAID + dbbw 70 percent, 13, TIME_GROUP + dbbw 90 percent + 1, 40, REMORAID + dbbw 100 percent, 40, REMORAID + +.Gyarados_Old: + dbbw 70 percent + 1, 10, MAGIKARP + dbbw 85 percent + 1, 10, MAGIKARP + dbbw 100 percent, 10, MAGIKARP +.Gyarados_Good: + dbbw 35 percent, 20, MAGIKARP + dbbw 70 percent, 20, MAGIKARP + dbbw 90 percent + 1, 20, MAGIKARP + dbbw 100 percent, 14, TIME_GROUP +.Gyarados_Super: + dbbw 40 percent, 40, MAGIKARP + dbbw 70 percent, 15, TIME_GROUP + dbbw 90 percent + 1, 40, MAGIKARP + dbbw 100 percent, 40, MAGIKARP + +.Dratini_2_Old: + dbbw 70 percent + 1, 10, MAGIKARP + dbbw 85 percent + 1, 10, MAGIKARP + dbbw 100 percent, 10, MAGIKARP +.Dratini_2_Good: + dbbw 35 percent, 10, MAGIKARP + dbbw 70 percent, 10, MAGIKARP + dbbw 90 percent + 1, 10, MAGIKARP + dbbw 100 percent, 16, TIME_GROUP +.Dratini_2_Super: + dbbw 40 percent, 10, MAGIKARP + dbbw 70 percent, 17, TIME_GROUP + dbbw 90 percent + 1, 10, MAGIKARP + dbbw 100 percent, 10, DRAGONAIR + +.WhirlIslands_Old: + dbbw 70 percent + 1, 10, MAGIKARP + dbbw 85 percent + 1, 10, MAGIKARP + dbbw 100 percent, 10, KRABBY +.WhirlIslands_Good: + dbbw 35 percent, 20, MAGIKARP + dbbw 70 percent, 20, KRABBY + dbbw 90 percent + 1, 20, KRABBY + dbbw 100 percent, 18, TIME_GROUP +.WhirlIslands_Super: + dbbw 40 percent, 40, KRABBY + dbbw 70 percent, 19, TIME_GROUP + dbbw 90 percent + 1, 40, KINGLER + dbbw 100 percent, 40, SEADRA + +.Qwilfish_NoSwarm_Old: +.Qwilfish_Old: + dbbw 70 percent + 1, 10, MAGIKARP + dbbw 85 percent + 1, 10, MAGIKARP + dbbw 100 percent, 10, TENTACOOL +.Qwilfish_NoSwarm_Good: +.Qwilfish_Good: + dbbw 35 percent, 20, MAGIKARP + dbbw 70 percent, 20, TENTACOOL + dbbw 90 percent + 1, 20, TENTACOOL + dbbw 100 percent, 20, TIME_GROUP +.Qwilfish_NoSwarm_Super: +.Qwilfish_Super: + dbbw 40 percent, 40, TENTACOOL + dbbw 70 percent, 21, TIME_GROUP + dbbw 90 percent + 1, 40, MAGIKARP + dbbw 100 percent, 40, QWILFISH + +.Remoraid_Old: + dbbw 70 percent + 1, 10, MAGIKARP + dbbw 85 percent + 1, 10, MAGIKARP + dbbw 100 percent, 10, POLIWAG +.Remoraid_Good: + dbbw 35 percent, 20, MAGIKARP + dbbw 70 percent, 20, POLIWAG + dbbw 90 percent + 1, 20, POLIWAG + dbbw 100 percent, 6, TIME_GROUP +.Remoraid_Super: + dbbw 40 percent, 40, POLIWAG + dbbw 70 percent, 7, TIME_GROUP + dbbw 90 percent + 1, 40, MAGIKARP + dbbw 100 percent, 40, REMORAID + +TimeFishGroups: + ; day nite + dbwbw 20, CORSOLA, 20, STARYU ; 0 + dbwbw 40, CORSOLA, 40, STARYU ; 1 + dbwbw 20, SHELLDER, 20, SHELLDER ; 2 + dbwbw 40, SHELLDER, 40, SHELLDER ; 3 + dbwbw 20, GOLDEEN, 20, GOLDEEN ; 4 + dbwbw 40, GOLDEEN, 40, GOLDEEN ; 5 + dbwbw 20, POLIWAG, 20, POLIWAG ; 6 + dbwbw 40, POLIWAG, 40, POLIWAG ; 7 + dbwbw 20, DRATINI, 20, DRATINI ; 8 + dbwbw 40, DRATINI, 40, DRATINI ; 9 + dbwbw 20, QWILFISH, 20, QWILFISH ; 10 + dbwbw 40, QWILFISH, 40, QWILFISH ; 11 + dbwbw 20, REMORAID, 20, REMORAID ; 12 + dbwbw 40, REMORAID, 40, REMORAID ; 13 + dbwbw 20, GYARADOS, 20, GYARADOS ; 14 + dbwbw 40, GYARADOS, 40, GYARADOS ; 15 + dbwbw 10, DRATINI, 10, DRATINI ; 16 + dbwbw 10, DRATINI, 10, DRATINI ; 17 + dbwbw 20, HORSEA, 20, HORSEA ; 18 + dbwbw 40, HORSEA, 40, HORSEA ; 19 + dbwbw 20, TENTACOOL, 20, TENTACOOL ; 20 + dbwbw 40, TENTACOOL, 40, TENTACOOL ; 21 diff --git a/data/wild/flee_mons.asm b/data/wild/flee_mons.asm new file mode 100644 index 0000000..3c806dd --- /dev/null +++ b/data/wild/flee_mons.asm @@ -0,0 +1,34 @@ +FleeMons: +; referenced by TryEnemyFlee and FastBallMultiplier + +SometimesFleeMons: + dw MAGNEMITE + dw GRIMER + dw TANGELA + dw MR__MIME + dw EEVEE + dw PORYGON + dw DRATINI + dw DRAGONAIR + dw TOGETIC + dw UMBREON + dw UNOWN + dw SNUBBULL + dw HERACROSS + dw -1 + +OftenFleeMons: + dw CUBONE + dw ARTICUNO + dw ZAPDOS + dw MOLTRES + dw QUAGSIRE + dw DELIBIRD + dw PHANPY + dw TEDDIURSA + dw -1 + +AlwaysFleeMons: + dw RAIKOU + dw ENTEI + dw -1 diff --git a/data/wild/johto_grass.asm b/data/wild/johto_grass.asm new file mode 100644 index 0000000..44b6550 --- /dev/null +++ b/data/wild/johto_grass.asm @@ -0,0 +1,1713 @@ +; Johto Pokémon in grass + +JohtoGrassWildMons: + + def_grass_wildmons SPROUT_TOWER_2F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 3, RATTATA + dbw 4, RATTATA + dbw 5, RATTATA + dbw 3, RATTATA + dbw 6, RATTATA + dbw 5, RATTATA + dbw 5, RATTATA + ; day + dbw 3, RATTATA + dbw 4, RATTATA + dbw 5, RATTATA + dbw 3, RATTATA + dbw 6, RATTATA + dbw 5, RATTATA + dbw 5, RATTATA + ; nite + dbw 3, GASTLY + dbw 4, GASTLY + dbw 5, GASTLY + dbw 3, RATTATA + dbw 6, GASTLY + dbw 5, RATTATA + dbw 5, RATTATA + end_grass_wildmons + + def_grass_wildmons SPROUT_TOWER_3F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 3, RATTATA + dbw 4, RATTATA + dbw 5, RATTATA + dbw 3, RATTATA + dbw 6, RATTATA + dbw 5, RATTATA + dbw 5, RATTATA + ; day + dbw 3, RATTATA + dbw 4, RATTATA + dbw 5, RATTATA + dbw 3, RATTATA + dbw 6, RATTATA + dbw 5, RATTATA + dbw 5, RATTATA + ; nite + dbw 3, GASTLY + dbw 4, GASTLY + dbw 5, GASTLY + dbw 3, RATTATA + dbw 6, GASTLY + dbw 5, RATTATA + dbw 5, RATTATA + end_grass_wildmons + + def_grass_wildmons TIN_TOWER_2F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; day + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; nite + dbw 20, GASTLY + dbw 21, GASTLY + dbw 22, GASTLY + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + end_grass_wildmons + + def_grass_wildmons TIN_TOWER_3F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; day + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; nite + dbw 20, GASTLY + dbw 21, GASTLY + dbw 22, GASTLY + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + end_grass_wildmons + + def_grass_wildmons TIN_TOWER_4F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; day + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; nite + dbw 20, GASTLY + dbw 21, GASTLY + dbw 22, GASTLY + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + end_grass_wildmons + + def_grass_wildmons TIN_TOWER_5F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; day + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; nite + dbw 20, GASTLY + dbw 21, GASTLY + dbw 22, GASTLY + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + end_grass_wildmons + + def_grass_wildmons TIN_TOWER_6F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; day + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; nite + dbw 20, GASTLY + dbw 21, GASTLY + dbw 22, GASTLY + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + end_grass_wildmons + + def_grass_wildmons TIN_TOWER_7F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; day + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; nite + dbw 20, GASTLY + dbw 21, GASTLY + dbw 22, GASTLY + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + end_grass_wildmons + + def_grass_wildmons TIN_TOWER_8F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; day + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; nite + dbw 20, GASTLY + dbw 21, GASTLY + dbw 22, GASTLY + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + end_grass_wildmons + + def_grass_wildmons TIN_TOWER_9F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; day + dbw 20, RATTATA + dbw 21, RATTATA + dbw 22, RATTATA + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + ; nite + dbw 20, GASTLY + dbw 21, GASTLY + dbw 22, GASTLY + dbw 22, RATTATA + dbw 23, RATTATA + dbw 24, RATTATA + dbw 24, RATTATA + end_grass_wildmons + + def_grass_wildmons BURNED_TOWER_1F + db 4 percent, 4 percent, 4 percent ; encounter rates: morn/day/nite + ; morn + dbw 13, RATTATA + dbw 14, KOFFING + dbw 15, RATTATA + dbw 14, ZUBAT + dbw 15, RATTATA + dbw 15, RATICATE + dbw 15, RATICATE + ; day + dbw 13, RATTATA + dbw 14, KOFFING + dbw 15, RATTATA + dbw 14, ZUBAT + dbw 15, RATTATA + dbw 15, RATICATE + dbw 15, RATICATE + ; nite + dbw 13, RATTATA + dbw 14, KOFFING + dbw 15, RATTATA + dbw 14, ZUBAT + dbw 15, RATTATA + dbw 15, RATICATE + dbw 15, RATICATE + end_grass_wildmons + + def_grass_wildmons BURNED_TOWER_B1F + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 14, RATTATA + dbw 14, KOFFING + dbw 16, KOFFING + dbw 15, ZUBAT + dbw 12, KOFFING + dbw 16, KOFFING + dbw 16, WEEZING + ; day + dbw 14, RATTATA + dbw 14, KOFFING + dbw 16, KOFFING + dbw 15, ZUBAT + dbw 12, KOFFING + dbw 16, KOFFING + dbw 16, WEEZING + ; nite + dbw 14, RATTATA + dbw 14, KOFFING + dbw 16, KOFFING + dbw 15, ZUBAT + dbw 12, KOFFING + dbw 16, KOFFING + dbw 16, WEEZING + end_grass_wildmons + + def_grass_wildmons NATIONAL_PARK + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 12, NIDORAN_M + dbw 12, NIDORAN_F + dbw 14, LEDYBA + dbw 13, PIDGEY + dbw 10, CATERPIE + dbw 10, WEEDLE + dbw 10, WEEDLE + ; day + dbw 12, NIDORAN_F + dbw 12, NIDORAN_M + dbw 14, SUNKERN + dbw 13, PIDGEY + dbw 10, CATERPIE + dbw 10, WEEDLE + dbw 10, WEEDLE + ; nite + dbw 12, PSYDUCK + dbw 13, HOOTHOOT + dbw 14, SPINARAK + dbw 15, HOOTHOOT + dbw 10, VENONAT + dbw 12, VENONAT + dbw 12, VENONAT + end_grass_wildmons + + def_grass_wildmons RUINS_OF_ALPH_OUTSIDE + db 4 percent, 4 percent, 4 percent ; encounter rates: morn/day/nite + ; morn + dbw 20, NATU + dbw 22, NATU + dbw 18, NATU + dbw 24, NATU + dbw 20, SMEARGLE + dbw 22, SMEARGLE + dbw 22, SMEARGLE + ; day + dbw 20, NATU + dbw 22, NATU + dbw 18, NATU + dbw 24, NATU + dbw 20, SMEARGLE + dbw 22, SMEARGLE + dbw 22, SMEARGLE + ; nite + dbw 20, NATU + dbw 22, NATU + dbw 18, NATU + dbw 24, NATU + dbw 22, WOOPER + dbw 22, QUAGSIRE + dbw 22, QUAGSIRE + end_grass_wildmons + + def_grass_wildmons RUINS_OF_ALPH_INNER_CHAMBER + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + ; day + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + ; nite + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + dbw 5, UNOWN + end_grass_wildmons + + def_grass_wildmons UNION_CAVE_1F + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 6, GEODUDE + dbw 6, SANDSHREW + dbw 5, ZUBAT + dbw 4, RATTATA + dbw 7, ZUBAT + dbw 6, ONIX + dbw 6, ONIX + ; day + dbw 6, GEODUDE + dbw 6, SANDSHREW + dbw 5, ZUBAT + dbw 4, RATTATA + dbw 7, ZUBAT + dbw 6, ONIX + dbw 6, ONIX + ; nite + dbw 6, GEODUDE + dbw 6, RATTATA + dbw 5, WOOPER + dbw 4, RATTATA + dbw 7, ZUBAT + dbw 6, ONIX + dbw 6, ONIX + end_grass_wildmons + + def_grass_wildmons UNION_CAVE_B1F + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 8, GEODUDE + dbw 6, ZUBAT + dbw 8, ZUBAT + dbw 8, ONIX + dbw 6, RATTATA + dbw 8, RATTATA + dbw 8, RATTATA + ; day + dbw 8, GEODUDE + dbw 6, ZUBAT + dbw 8, ZUBAT + dbw 8, ONIX + dbw 6, RATTATA + dbw 8, RATTATA + dbw 8, RATTATA + ; nite + dbw 8, GEODUDE + dbw 6, ZUBAT + dbw 8, WOOPER + dbw 8, ONIX + dbw 6, RATTATA + dbw 8, RATTATA + dbw 8, RATTATA + end_grass_wildmons + + def_grass_wildmons UNION_CAVE_B2F + db 4 percent, 4 percent, 4 percent ; encounter rates: morn/day/nite + ; morn + dbw 22, ZUBAT + dbw 22, GOLBAT + dbw 22, ZUBAT + dbw 21, RATICATE + dbw 20, GEODUDE + dbw 23, ONIX + dbw 23, ONIX + ; day + dbw 22, ZUBAT + dbw 22, GOLBAT + dbw 22, ZUBAT + dbw 21, RATICATE + dbw 20, GEODUDE + dbw 23, ONIX + dbw 23, ONIX + ; nite + dbw 22, ZUBAT + dbw 22, GOLBAT + dbw 22, QUAGSIRE + dbw 21, RATICATE + dbw 20, GEODUDE + dbw 23, ONIX + dbw 23, ONIX + end_grass_wildmons + + def_grass_wildmons SLOWPOKE_WELL_B1F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 5, ZUBAT + dbw 6, ZUBAT + dbw 7, ZUBAT + dbw 6, SLOWPOKE + dbw 8, ZUBAT + dbw 8, SLOWPOKE + dbw 8, SLOWPOKE + ; day + dbw 5, ZUBAT + dbw 6, ZUBAT + dbw 7, ZUBAT + dbw 6, SLOWPOKE + dbw 8, ZUBAT + dbw 8, SLOWPOKE + dbw 8, SLOWPOKE + ; nite + dbw 5, ZUBAT + dbw 6, ZUBAT + dbw 7, ZUBAT + dbw 6, SLOWPOKE + dbw 8, ZUBAT + dbw 8, SLOWPOKE + dbw 8, SLOWPOKE + end_grass_wildmons + + def_grass_wildmons SLOWPOKE_WELL_B2F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 21, ZUBAT + dbw 23, ZUBAT + dbw 19, ZUBAT + dbw 21, SLOWPOKE + dbw 23, GOLBAT + dbw 23, SLOWPOKE + dbw 23, SLOWPOKE + ; day + dbw 21, ZUBAT + dbw 23, ZUBAT + dbw 19, ZUBAT + dbw 21, SLOWPOKE + dbw 23, GOLBAT + dbw 23, SLOWPOKE + dbw 23, SLOWPOKE + ; nite + dbw 21, ZUBAT + dbw 23, ZUBAT + dbw 19, ZUBAT + dbw 21, SLOWPOKE + dbw 23, GOLBAT + dbw 23, SLOWPOKE + dbw 23, SLOWPOKE + end_grass_wildmons + + def_grass_wildmons ILEX_FOREST + db 4 percent, 4 percent, 4 percent ; encounter rates: morn/day/nite + ; morn + dbw 5, CATERPIE + dbw 5, WEEDLE + dbw 7, METAPOD + dbw 7, KAKUNA + dbw 7, PIDGEY + dbw 6, PARAS + dbw 6, PARAS + ; day + dbw 5, CATERPIE + dbw 5, WEEDLE + dbw 7, METAPOD + dbw 7, KAKUNA + dbw 7, PIDGEY + dbw 6, PARAS + dbw 6, PARAS + ; nite + dbw 5, ODDISH + dbw 5, VENONAT + dbw 7, ODDISH + dbw 7, PSYDUCK + dbw 7, HOOTHOOT + dbw 6, PARAS + dbw 6, PARAS + end_grass_wildmons + + def_grass_wildmons MOUNT_MORTAR_1F_OUTSIDE + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 14, RATTATA + dbw 13, ZUBAT + dbw 14, MACHOP + dbw 13, GOLBAT + dbw 14, GEODUDE + dbw 16, RATICATE + dbw 16, RATICATE + ; day + dbw 14, RATTATA + dbw 13, ZUBAT + dbw 14, MACHOP + dbw 13, GOLBAT + dbw 14, GEODUDE + dbw 16, RATICATE + dbw 16, RATICATE + ; nite + dbw 14, RATTATA + dbw 13, ZUBAT + dbw 14, MARILL + dbw 13, GOLBAT + dbw 14, GEODUDE + dbw 16, RATICATE + dbw 16, RATICATE + end_grass_wildmons + + def_grass_wildmons MOUNT_MORTAR_1F_INSIDE + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 13, GEODUDE + dbw 14, RATTATA + dbw 15, MACHOP + dbw 14, RATICATE + dbw 15, ZUBAT + dbw 15, GOLBAT + dbw 15, GOLBAT + ; day + dbw 13, GEODUDE + dbw 14, RATTATA + dbw 15, MACHOP + dbw 14, RATICATE + dbw 15, ZUBAT + dbw 15, GOLBAT + dbw 15, GOLBAT + ; nite + dbw 13, GEODUDE + dbw 14, RATTATA + dbw 15, RATICATE + dbw 14, ZUBAT + dbw 15, MARILL + dbw 15, GOLBAT + dbw 15, GOLBAT + end_grass_wildmons + + def_grass_wildmons MOUNT_MORTAR_2F_INSIDE + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 31, GRAVELER + dbw 32, MACHOKE + dbw 31, GEODUDE + dbw 30, RATICATE + dbw 28, MACHOP + dbw 30, GOLBAT + dbw 30, GOLBAT + ; day + dbw 31, GRAVELER + dbw 32, MACHOKE + dbw 31, GEODUDE + dbw 30, RATICATE + dbw 28, MACHOP + dbw 30, GOLBAT + dbw 30, GOLBAT + ; nite + dbw 31, GRAVELER + dbw 31, GEODUDE + dbw 30, RATICATE + dbw 30, GOLBAT + dbw 28, MARILL + dbw 32, GOLBAT + dbw 32, GOLBAT + end_grass_wildmons + + def_grass_wildmons MOUNT_MORTAR_B1F + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 15, ZUBAT + dbw 17, ZUBAT + dbw 17, GOLBAT + dbw 16, MACHOP + dbw 16, GEODUDE + dbw 18, RATICATE + dbw 18, RATICATE + ; day + dbw 15, ZUBAT + dbw 17, ZUBAT + dbw 17, GOLBAT + dbw 16, MACHOP + dbw 16, GEODUDE + dbw 18, RATICATE + dbw 18, RATICATE + ; nite + dbw 15, ZUBAT + dbw 17, ZUBAT + dbw 17, GOLBAT + dbw 16, MARILL + dbw 16, GEODUDE + dbw 18, RATICATE + dbw 18, RATICATE + end_grass_wildmons + + def_grass_wildmons ICE_PATH_1F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 21, SWINUB + dbw 22, ZUBAT + dbw 22, GOLBAT + dbw 23, SWINUB + dbw 24, GOLBAT + dbw 22, GOLBAT + dbw 22, GOLBAT + ; day + dbw 21, SWINUB + dbw 22, ZUBAT + dbw 22, GOLBAT + dbw 23, SWINUB + dbw 24, GOLBAT + dbw 22, GOLBAT + dbw 22, GOLBAT + ; nite + dbw 21, DELIBIRD + dbw 22, ZUBAT + dbw 22, GOLBAT + dbw 23, DELIBIRD + dbw 24, GOLBAT + dbw 22, GOLBAT + dbw 22, GOLBAT + end_grass_wildmons + + def_grass_wildmons ICE_PATH_B1F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 22, SWINUB + dbw 23, ZUBAT + dbw 23, GOLBAT + dbw 24, SWINUB + dbw 25, GOLBAT + dbw 23, GOLBAT + dbw 22, JYNX + ; day + dbw 22, SWINUB + dbw 23, ZUBAT + dbw 23, GOLBAT + dbw 24, SWINUB + dbw 25, GOLBAT + dbw 23, GOLBAT + dbw 22, JYNX + ; nite + dbw 22, DELIBIRD + dbw 23, ZUBAT + dbw 23, GOLBAT + dbw 24, DELIBIRD + dbw 25, GOLBAT + dbw 23, GOLBAT + dbw 22, SNEASEL + end_grass_wildmons + + def_grass_wildmons ICE_PATH_B2F_MAHOGANY_SIDE + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 23, SWINUB + dbw 24, ZUBAT + dbw 24, GOLBAT + dbw 25, SWINUB + dbw 26, GOLBAT + dbw 22, JYNX + dbw 24, JYNX + ; day + dbw 23, SWINUB + dbw 24, ZUBAT + dbw 24, GOLBAT + dbw 25, SWINUB + dbw 26, GOLBAT + dbw 22, JYNX + dbw 24, JYNX + ; nite + dbw 23, DELIBIRD + dbw 24, ZUBAT + dbw 24, GOLBAT + dbw 25, DELIBIRD + dbw 26, GOLBAT + dbw 22, SNEASEL + dbw 24, SNEASEL + end_grass_wildmons + + def_grass_wildmons ICE_PATH_B2F_BLACKTHORN_SIDE + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 23, SWINUB + dbw 24, ZUBAT + dbw 24, GOLBAT + dbw 25, SWINUB + dbw 26, GOLBAT + dbw 22, JYNX + dbw 24, JYNX + ; day + dbw 23, SWINUB + dbw 24, ZUBAT + dbw 24, GOLBAT + dbw 25, SWINUB + dbw 26, GOLBAT + dbw 22, JYNX + dbw 24, JYNX + ; nite + dbw 23, DELIBIRD + dbw 24, ZUBAT + dbw 24, GOLBAT + dbw 25, DELIBIRD + dbw 26, GOLBAT + dbw 22, SNEASEL + dbw 24, SNEASEL + end_grass_wildmons + + def_grass_wildmons ICE_PATH_B3F + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 24, SWINUB + dbw 25, ZUBAT + dbw 25, GOLBAT + dbw 26, SWINUB + dbw 22, JYNX + dbw 24, JYNX + dbw 26, JYNX + ; day + dbw 24, SWINUB + dbw 25, ZUBAT + dbw 25, GOLBAT + dbw 26, SWINUB + dbw 22, JYNX + dbw 24, JYNX + dbw 26, JYNX + ; nite + dbw 24, DELIBIRD + dbw 25, ZUBAT + dbw 25, GOLBAT + dbw 26, DELIBIRD + dbw 22, SNEASEL + dbw 24, SNEASEL + dbw 26, SNEASEL + end_grass_wildmons + + def_grass_wildmons WHIRL_ISLAND_NW + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, SEEL + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, SEEL + dbw 24, SEEL + ; day + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, SEEL + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, SEEL + dbw 24, SEEL + ; nite + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, KRABBY + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, GOLBAT + dbw 24, GOLBAT + end_grass_wildmons + + def_grass_wildmons WHIRL_ISLAND_NE + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, SEEL + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, SEEL + dbw 24, SEEL + ; day + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, SEEL + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, SEEL + dbw 24, SEEL + ; nite + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, KRABBY + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, GOLBAT + dbw 24, GOLBAT + end_grass_wildmons + + def_grass_wildmons WHIRL_ISLAND_SW + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, SEEL + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, SEEL + dbw 24, SEEL + ; day + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, SEEL + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, SEEL + dbw 24, SEEL + ; nite + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, KRABBY + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, GOLBAT + dbw 24, GOLBAT + end_grass_wildmons + + def_grass_wildmons WHIRL_ISLAND_CAVE + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, SEEL + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, SEEL + dbw 24, SEEL + ; day + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, SEEL + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, SEEL + dbw 24, SEEL + ; nite + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, KRABBY + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, GOLBAT + dbw 24, GOLBAT + end_grass_wildmons + + def_grass_wildmons WHIRL_ISLAND_SE + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, SEEL + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, SEEL + dbw 24, SEEL + ; day + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, SEEL + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, SEEL + dbw 24, SEEL + ; nite + dbw 22, KRABBY + dbw 23, ZUBAT + dbw 22, KRABBY + dbw 24, KRABBY + dbw 25, GOLBAT + dbw 24, GOLBAT + dbw 24, GOLBAT + end_grass_wildmons + + def_grass_wildmons WHIRL_ISLAND_B1F + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 23, KRABBY + dbw 24, ZUBAT + dbw 23, SEEL + dbw 25, KRABBY + dbw 26, GOLBAT + dbw 25, SEEL + dbw 25, SEEL + ; day + dbw 23, KRABBY + dbw 24, ZUBAT + dbw 23, SEEL + dbw 25, KRABBY + dbw 26, GOLBAT + dbw 25, SEEL + dbw 25, SEEL + ; nite + dbw 23, KRABBY + dbw 24, ZUBAT + dbw 23, KRABBY + dbw 25, KRABBY + dbw 26, GOLBAT + dbw 25, GOLBAT + dbw 25, GOLBAT + end_grass_wildmons + + def_grass_wildmons WHIRL_ISLAND_B2F + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 24, KRABBY + dbw 25, ZUBAT + dbw 24, SEEL + dbw 26, KRABBY + dbw 27, GOLBAT + dbw 26, SEEL + dbw 26, SEEL + ; day + dbw 24, KRABBY + dbw 25, ZUBAT + dbw 24, SEEL + dbw 26, KRABBY + dbw 27, GOLBAT + dbw 26, SEEL + dbw 26, SEEL + ; nite + dbw 24, KRABBY + dbw 25, ZUBAT + dbw 24, KRABBY + dbw 26, KRABBY + dbw 27, GOLBAT + dbw 26, GOLBAT + dbw 26, GOLBAT + end_grass_wildmons + + def_grass_wildmons WHIRL_ISLAND_LUGIA_CHAMBER + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 25, KRABBY + dbw 26, ZUBAT + dbw 25, SEEL + dbw 27, KRABBY + dbw 28, GOLBAT + dbw 27, SEEL + dbw 27, SEEL + ; day + dbw 25, KRABBY + dbw 26, ZUBAT + dbw 25, SEEL + dbw 27, KRABBY + dbw 28, GOLBAT + dbw 27, SEEL + dbw 27, SEEL + ; nite + dbw 25, KRABBY + dbw 26, ZUBAT + dbw 25, KRABBY + dbw 27, KRABBY + dbw 28, GOLBAT + dbw 27, GOLBAT + dbw 27, GOLBAT + end_grass_wildmons + + def_grass_wildmons SILVER_CAVE_ROOM_1 + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 43, GRAVELER + dbw 44, URSARING + dbw 42, ONIX + dbw 45, MAGMAR + dbw 45, GOLBAT + dbw 20, LARVITAR + dbw 15, LARVITAR + ; day + dbw 43, GRAVELER + dbw 44, URSARING + dbw 42, ONIX + dbw 45, MAGMAR + dbw 45, GOLBAT + dbw 20, LARVITAR + dbw 15, LARVITAR + ; nite + dbw 43, GRAVELER + dbw 44, GOLBAT + dbw 42, ONIX + dbw 42, GOLBAT + dbw 45, GOLDUCK + dbw 46, GOLBAT + dbw 46, GOLBAT + end_grass_wildmons + + def_grass_wildmons SILVER_CAVE_ROOM_2 + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 48, GOLBAT + dbw 48, MACHOKE + dbw 47, URSARING + dbw 46, PARASECT + dbw 48, PARASECT + dbw 15, LARVITAR + dbw 20, LARVITAR + ; day + dbw 48, GOLBAT + dbw 48, MACHOKE + dbw 47, URSARING + dbw 46, PARASECT + dbw 48, PARASECT + dbw 15, LARVITAR + dbw 20, LARVITAR + ; nite + dbw 48, GOLBAT + dbw 48, GOLDUCK + dbw 46, GOLBAT + dbw 46, PARASECT + dbw 48, PARASECT + dbw 45, MISDREAVUS + dbw 45, MISDREAVUS + end_grass_wildmons + + def_grass_wildmons SILVER_CAVE_ROOM_3 + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 51, GOLBAT + dbw 48, ONIX + dbw 48, GRAVELER + dbw 50, URSARING + dbw 20, LARVITAR + dbw 15, LARVITAR + dbw 20, PUPITAR + ; day + dbw 51, GOLBAT + dbw 48, ONIX + dbw 48, GRAVELER + dbw 50, URSARING + dbw 20, LARVITAR + dbw 15, LARVITAR + dbw 20, PUPITAR + ; nite + dbw 51, GOLBAT + dbw 48, ONIX + dbw 48, GRAVELER + dbw 49, GOLBAT + dbw 45, GOLDUCK + dbw 53, GOLBAT + dbw 53, GOLBAT + end_grass_wildmons + + def_grass_wildmons SILVER_CAVE_ITEM_ROOMS + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 48, GOLBAT + dbw 46, GOLBAT + dbw 50, GOLBAT + dbw 46, PARASECT + dbw 48, PARASECT + dbw 50, PARASECT + dbw 52, PARASECT + ; day + dbw 48, GOLBAT + dbw 46, GOLBAT + dbw 50, GOLBAT + dbw 46, PARASECT + dbw 48, PARASECT + dbw 50, PARASECT + dbw 52, PARASECT + ; nite + dbw 45, MISDREAVUS + dbw 48, GOLBAT + dbw 50, GOLBAT + dbw 46, PARASECT + dbw 48, PARASECT + dbw 50, PARASECT + dbw 52, PARASECT + end_grass_wildmons + + def_grass_wildmons DARK_CAVE_VIOLET_ENTRANCE + db 4 percent, 4 percent, 4 percent ; encounter rates: morn/day/nite + ; morn + dbw 3, GEODUDE + dbw 2, ZUBAT + dbw 2, GEODUDE + dbw 4, GEODUDE + dbw 2, TEDDIURSA + dbw 4, ZUBAT + dbw 4, DUNSPARCE + ; day + dbw 3, GEODUDE + dbw 2, ZUBAT + dbw 2, GEODUDE + dbw 4, GEODUDE + dbw 2, ZUBAT + dbw 4, ZUBAT + dbw 4, DUNSPARCE + ; nite + dbw 3, GEODUDE + dbw 2, ZUBAT + dbw 2, GEODUDE + dbw 4, GEODUDE + dbw 2, ZUBAT + dbw 4, ZUBAT + dbw 4, DUNSPARCE + end_grass_wildmons + + def_grass_wildmons DARK_CAVE_BLACKTHORN_ENTRANCE + db 4 percent, 4 percent, 4 percent ; encounter rates: morn/day/nite + ; morn + dbw 23, GEODUDE + dbw 23, ZUBAT + dbw 25, GRAVELER + dbw 25, URSARING + dbw 20, TEDDIURSA + dbw 23, GOLBAT + dbw 23, GOLBAT + ; day + dbw 23, GEODUDE + dbw 23, ZUBAT + dbw 25, GRAVELER + dbw 25, URSARING + dbw 30, URSARING + dbw 23, GOLBAT + dbw 23, GOLBAT + ; nite + dbw 23, GEODUDE + dbw 23, ZUBAT + dbw 25, GRAVELER + dbw 20, WOBBUFFET + dbw 25, WOBBUFFET + dbw 23, GOLBAT + dbw 23, GOLBAT + end_grass_wildmons + + def_grass_wildmons ROUTE_29 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 2, PIDGEY + dbw 2, SENTRET + dbw 3, PIDGEY + dbw 3, SENTRET + dbw 2, RATTATA + dbw 3, HOPPIP + dbw 3, HOPPIP + ; day + dbw 2, PIDGEY + dbw 2, SENTRET + dbw 3, PIDGEY + dbw 3, SENTRET + dbw 2, RATTATA + dbw 3, HOPPIP + dbw 3, HOPPIP + ; nite + dbw 2, HOOTHOOT + dbw 2, RATTATA + dbw 3, HOOTHOOT + dbw 3, RATTATA + dbw 2, RATTATA + dbw 3, HOOTHOOT + dbw 3, HOOTHOOT + end_grass_wildmons + + def_grass_wildmons ROUTE_30 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 3, LEDYBA + dbw 3, CATERPIE + dbw 4, CATERPIE + dbw 4, PIDGEY + dbw 3, WEEDLE + dbw 4, HOPPIP + dbw 4, HOPPIP + ; day + dbw 3, PIDGEY + dbw 3, CATERPIE + dbw 4, CATERPIE + dbw 4, PIDGEY + dbw 3, WEEDLE + dbw 4, HOPPIP + dbw 4, HOPPIP + ; nite + dbw 3, SPINARAK + dbw 3, HOOTHOOT + dbw 4, POLIWAG + dbw 4, HOOTHOOT + dbw 3, ZUBAT + dbw 4, HOOTHOOT + dbw 4, HOOTHOOT + end_grass_wildmons + + def_grass_wildmons ROUTE_31 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 4, LEDYBA + dbw 4, CATERPIE + dbw 5, BELLSPROUT + dbw 5, PIDGEY + dbw 4, WEEDLE + dbw 5, HOPPIP + dbw 5, HOPPIP + ; day + dbw 4, PIDGEY + dbw 4, CATERPIE + dbw 5, BELLSPROUT + dbw 5, PIDGEY + dbw 4, WEEDLE + dbw 5, HOPPIP + dbw 5, HOPPIP + ; nite + dbw 4, SPINARAK + dbw 4, POLIWAG + dbw 5, BELLSPROUT + dbw 5, HOOTHOOT + dbw 4, ZUBAT + dbw 5, GASTLY + dbw 5, GASTLY + end_grass_wildmons + + def_grass_wildmons ROUTE_32 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 4, EKANS + dbw 5, RATTATA + dbw 7, BELLSPROUT + dbw 6, HOPPIP + dbw 7, PIDGEY + dbw 7, HOPPIP + dbw 7, HOPPIP + ; day + dbw 4, EKANS + dbw 5, RATTATA + dbw 7, BELLSPROUT + dbw 6, HOPPIP + dbw 7, PIDGEY + dbw 7, HOPPIP + dbw 7, HOPPIP + ; nite + dbw 4, WOOPER + dbw 5, RATTATA + dbw 7, BELLSPROUT + dbw 6, ZUBAT + dbw 7, HOOTHOOT + dbw 7, GASTLY + dbw 7, GASTLY + end_grass_wildmons + + def_grass_wildmons ROUTE_33 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 6, RATTATA + dbw 6, SPEAROW + dbw 6, GEODUDE + dbw 6, HOPPIP + dbw 7, EKANS + dbw 7, HOPPIP + dbw 7, HOPPIP + ; day + dbw 6, RATTATA + dbw 6, SPEAROW + dbw 6, GEODUDE + dbw 6, HOPPIP + dbw 7, EKANS + dbw 7, HOPPIP + dbw 7, HOPPIP + ; nite + dbw 6, RATTATA + dbw 6, ZUBAT + dbw 6, GEODUDE + dbw 6, ZUBAT + dbw 7, RATTATA + dbw 7, RATTATA + dbw 7, RATTATA + end_grass_wildmons + + def_grass_wildmons ROUTE_34 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 10, SNUBBULL + dbw 11, RATTATA + dbw 12, PIDGEY + dbw 10, ABRA + dbw 12, JIGGLYPUFF + dbw 10, DITTO + dbw 10, DITTO + ; day + dbw 10, SNUBBULL + dbw 11, RATTATA + dbw 12, PIDGEY + dbw 10, ABRA + dbw 12, JIGGLYPUFF + dbw 10, DITTO + dbw 10, DITTO + ; nite + dbw 12, DROWZEE + dbw 11, RATTATA + dbw 12, HOOTHOOT + dbw 10, ABRA + dbw 12, JIGGLYPUFF + dbw 10, DITTO + dbw 10, DITTO + end_grass_wildmons + + def_grass_wildmons ROUTE_35 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 12, SNUBBULL + dbw 14, PIDGEY + dbw 13, GROWLITHE + dbw 10, ABRA + dbw 12, JIGGLYPUFF + dbw 10, DITTO + dbw 12, YANMA + ; day + dbw 12, SNUBBULL + dbw 14, PIDGEY + dbw 13, GROWLITHE + dbw 10, ABRA + dbw 12, JIGGLYPUFF + dbw 10, DITTO + dbw 12, YANMA + ; nite + dbw 12, DROWZEE + dbw 14, HOOTHOOT + dbw 13, PSYDUCK + dbw 10, ABRA + dbw 12, JIGGLYPUFF + dbw 10, DITTO + dbw 12, YANMA + end_grass_wildmons + + def_grass_wildmons ROUTE_36 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 4, LEDYBA + dbw 4, PIDGEY + dbw 5, BELLSPROUT + dbw 5, GROWLITHE + dbw 5, PIDGEY + dbw 6, PIDGEY + dbw 6, PIDGEY + ; day + dbw 4, PIDGEY + dbw 4, PIDGEY + dbw 5, BELLSPROUT + dbw 5, GROWLITHE + dbw 5, PIDGEY + dbw 6, PIDGEY + dbw 6, PIDGEY + ; nite + dbw 4, SPINARAK + dbw 4, HOOTHOOT + dbw 5, BELLSPROUT + dbw 5, HOOTHOOT + dbw 5, HOOTHOOT + dbw 5, GASTLY + dbw 5, GASTLY + end_grass_wildmons + + def_grass_wildmons ROUTE_37 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 13, LEDYBA + dbw 14, GROWLITHE + dbw 15, PIDGEY + dbw 16, GROWLITHE + dbw 15, PIDGEOTTO + dbw 15, LEDIAN + dbw 15, LEDIAN + ; day + dbw 13, PIDGEY + dbw 14, GROWLITHE + dbw 15, PIDGEY + dbw 16, GROWLITHE + dbw 15, PIDGEOTTO + dbw 15, PIDGEY + dbw 15, PIDGEY + ; nite + dbw 13, SPINARAK + dbw 14, STANTLER + dbw 15, HOOTHOOT + dbw 16, STANTLER + dbw 15, NOCTOWL + dbw 15, ARIADOS + dbw 15, ARIADOS + end_grass_wildmons + + def_grass_wildmons ROUTE_38 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 16, RATTATA + dbw 16, RATICATE + dbw 16, MAGNEMITE + dbw 16, PIDGEOTTO + dbw 13, TAUROS + dbw 13, MILTANK + dbw 13, MILTANK + ; day + dbw 16, RATTATA + dbw 16, RATICATE + dbw 16, MAGNEMITE + dbw 16, PIDGEOTTO + dbw 13, TAUROS + dbw 13, MILTANK + dbw 13, MILTANK + ; nite + dbw 16, MEOWTH + dbw 16, RATICATE + dbw 16, MAGNEMITE + dbw 16, NOCTOWL + dbw 16, MEOWTH + dbw 16, MEOWTH + dbw 16, MEOWTH + end_grass_wildmons + + def_grass_wildmons ROUTE_39 + db 2 percent, 2 percent, 2 percent ; encounter rates: morn/day/nite + ; morn + dbw 16, RATTATA + dbw 16, RATICATE + dbw 16, MAGNEMITE + dbw 16, PIDGEOTTO + dbw 15, MILTANK + dbw 15, TAUROS + dbw 15, TAUROS + ; day + dbw 16, RATTATA + dbw 16, RATICATE + dbw 16, MAGNEMITE + dbw 16, PIDGEOTTO + dbw 15, MILTANK + dbw 15, TAUROS + dbw 15, TAUROS + ; nite + dbw 16, MEOWTH + dbw 16, RATICATE + dbw 16, MAGNEMITE + dbw 16, NOCTOWL + dbw 18, MEOWTH + dbw 18, MEOWTH + dbw 18, MEOWTH + end_grass_wildmons + + def_grass_wildmons ROUTE_42 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 13, EKANS + dbw 14, SPEAROW + dbw 15, RATTATA + dbw 16, RATICATE + dbw 15, ARBOK + dbw 16, FEAROW + dbw 16, FEAROW + ; day + dbw 13, EKANS + dbw 14, SPEAROW + dbw 15, RATTATA + dbw 16, RATICATE + dbw 15, ARBOK + dbw 16, FEAROW + dbw 16, FEAROW + ; nite + dbw 13, RATTATA + dbw 14, ZUBAT + dbw 15, RATICATE + dbw 16, GOLBAT + dbw 15, MARILL + dbw 16, GOLBAT + dbw 16, GOLBAT + end_grass_wildmons + + def_grass_wildmons ROUTE_43 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 15, SENTRET + dbw 16, PIDGEOTTO + dbw 16, FARFETCH_D + dbw 15, FURRET + dbw 17, RATICATE + dbw 17, FURRET + dbw 17, FURRET + ; day + dbw 15, SENTRET + dbw 16, PIDGEOTTO + dbw 16, FARFETCH_D + dbw 15, FURRET + dbw 17, RATICATE + dbw 17, FURRET + dbw 17, FURRET + ; nite + dbw 15, VENONAT + dbw 16, NOCTOWL + dbw 16, RATICATE + dbw 17, VENONAT + dbw 17, RATICATE + dbw 17, VENOMOTH + dbw 17, VENOMOTH + end_grass_wildmons + + def_grass_wildmons ROUTE_44 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 23, TANGELA + dbw 22, LICKITUNG + dbw 22, BELLSPROUT + dbw 24, WEEPINBELL + dbw 24, LICKITUNG + dbw 26, LICKITUNG + dbw 26, LICKITUNG + ; day + dbw 23, TANGELA + dbw 22, LICKITUNG + dbw 22, BELLSPROUT + dbw 24, WEEPINBELL + dbw 24, LICKITUNG + dbw 26, LICKITUNG + dbw 26, LICKITUNG + ; nite + dbw 23, TANGELA + dbw 22, POLIWAG + dbw 22, BELLSPROUT + dbw 24, WEEPINBELL + dbw 24, POLIWHIRL + dbw 26, POLIWHIRL + dbw 26, POLIWHIRL + end_grass_wildmons + + def_grass_wildmons ROUTE_45 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 23, GEODUDE + dbw 23, GRAVELER + dbw 24, GLIGAR + dbw 25, DONPHAN + dbw 20, PHANPY + dbw 27, SKARMORY + dbw 27, SKARMORY + ; day + dbw 23, GEODUDE + dbw 23, GRAVELER + dbw 24, GLIGAR + dbw 25, DONPHAN + dbw 30, DONPHAN + dbw 27, SKARMORY + dbw 27, SKARMORY + ; nite + dbw 23, GEODUDE + dbw 23, GRAVELER + dbw 24, GLIGAR + dbw 25, GRAVELER + dbw 27, GRAVELER + dbw 27, GRAVELER + dbw 27, GRAVELER + end_grass_wildmons + + def_grass_wildmons ROUTE_46 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 2, GEODUDE + dbw 2, SPEAROW + dbw 3, GEODUDE + dbw 3, RATTATA + dbw 2, PHANPY + dbw 2, RATTATA + dbw 2, RATTATA + ; day + dbw 2, GEODUDE + dbw 2, SPEAROW + dbw 3, GEODUDE + dbw 3, RATTATA + dbw 2, RATTATA + dbw 2, RATTATA + dbw 2, RATTATA + ; nite + dbw 2, GEODUDE + dbw 2, RATTATA + dbw 3, GEODUDE + dbw 3, RATTATA + dbw 2, RATTATA + dbw 2, RATTATA + dbw 2, RATTATA + end_grass_wildmons + + def_grass_wildmons SILVER_CAVE_OUTSIDE + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 41, TANGELA + dbw 42, PONYTA + dbw 42, ARBOK + dbw 44, RAPIDASH + dbw 41, DODUO + dbw 43, DODRIO + dbw 43, DODRIO + ; day + dbw 41, TANGELA + dbw 42, PONYTA + dbw 42, ARBOK + dbw 44, RAPIDASH + dbw 41, DODUO + dbw 43, DODRIO + dbw 43, DODRIO + ; nite + dbw 41, TANGELA + dbw 42, POLIWHIRL + dbw 42, GOLBAT + dbw 44, POLIWHIRL + dbw 40, GOLBAT + dbw 44, GOLBAT + dbw 44, GOLBAT + end_grass_wildmons + + db -1 ; end diff --git a/data/wild/johto_water.asm b/data/wild/johto_water.asm new file mode 100644 index 0000000..aabc536 --- /dev/null +++ b/data/wild/johto_water.asm @@ -0,0 +1,271 @@ +; Johto Pokémon in water + +JohtoWaterWildMons: + + def_water_wildmons RUINS_OF_ALPH_OUTSIDE + db 2 percent ; encounter rate + dbw 15, WOOPER + dbw 20, QUAGSIRE + dbw 15, QUAGSIRE + end_water_wildmons + + def_water_wildmons UNION_CAVE_1F + db 2 percent ; encounter rate + dbw 15, WOOPER + dbw 20, QUAGSIRE + dbw 15, QUAGSIRE + end_water_wildmons + + def_water_wildmons UNION_CAVE_B1F + db 2 percent ; encounter rate + dbw 15, WOOPER + dbw 20, QUAGSIRE + dbw 15, QUAGSIRE + end_water_wildmons + + def_water_wildmons UNION_CAVE_B2F + db 4 percent ; encounter rate + dbw 15, TENTACOOL + dbw 20, QUAGSIRE + dbw 20, TENTACRUEL + end_water_wildmons + + def_water_wildmons SLOWPOKE_WELL_B1F + db 2 percent ; encounter rate + dbw 15, SLOWPOKE + dbw 20, SLOWPOKE + dbw 10, SLOWPOKE + end_water_wildmons + + def_water_wildmons SLOWPOKE_WELL_B2F + db 2 percent ; encounter rate + dbw 15, SLOWPOKE + dbw 20, SLOWPOKE + dbw 20, SLOWBRO + end_water_wildmons + + def_water_wildmons ILEX_FOREST + db 2 percent ; encounter rate + dbw 15, PSYDUCK + dbw 10, PSYDUCK + dbw 15, GOLDUCK + end_water_wildmons + + def_water_wildmons MOUNT_MORTAR_1F_OUTSIDE + db 4 percent ; encounter rate + dbw 15, GOLDEEN + dbw 20, MARILL + dbw 20, SEAKING + end_water_wildmons + + def_water_wildmons MOUNT_MORTAR_2F_INSIDE + db 2 percent ; encounter rate + dbw 20, GOLDEEN + dbw 25, MARILL + dbw 25, SEAKING + end_water_wildmons + + def_water_wildmons MOUNT_MORTAR_B1F + db 2 percent ; encounter rate + dbw 15, GOLDEEN + dbw 20, MARILL + dbw 20, SEAKING + end_water_wildmons + + def_water_wildmons WHIRL_ISLAND_SW + db 4 percent ; encounter rate + dbw 20, TENTACOOL + dbw 15, HORSEA + dbw 20, TENTACRUEL + end_water_wildmons + + def_water_wildmons WHIRL_ISLAND_B2F + db 4 percent ; encounter rate + dbw 15, HORSEA + dbw 20, HORSEA + dbw 20, TENTACRUEL + end_water_wildmons + + def_water_wildmons WHIRL_ISLAND_LUGIA_CHAMBER + db 4 percent ; encounter rate + dbw 20, HORSEA + dbw 20, TENTACRUEL + dbw 20, SEADRA + end_water_wildmons + + def_water_wildmons SILVER_CAVE_ROOM_2 + db 2 percent ; encounter rate + dbw 35, SEAKING + dbw 35, GOLDUCK + dbw 35, GOLDEEN + end_water_wildmons + + def_water_wildmons DARK_CAVE_VIOLET_ENTRANCE + db 2 percent ; encounter rate + dbw 15, MAGIKARP + dbw 10, MAGIKARP + dbw 5, MAGIKARP + end_water_wildmons + + def_water_wildmons DARK_CAVE_BLACKTHORN_ENTRANCE + db 2 percent ; encounter rate + dbw 15, MAGIKARP + dbw 10, MAGIKARP + dbw 5, MAGIKARP + end_water_wildmons + + def_water_wildmons DRAGONS_DEN_B1F + db 4 percent ; encounter rate + dbw 15, MAGIKARP + dbw 10, MAGIKARP + dbw 10, DRATINI + end_water_wildmons + + def_water_wildmons OLIVINE_PORT + db 2 percent ; encounter rate + dbw 20, TENTACOOL + dbw 15, TENTACOOL + dbw 20, TENTACRUEL + end_water_wildmons + + def_water_wildmons ROUTE_30 + db 2 percent ; encounter rate + dbw 20, POLIWAG + dbw 15, POLIWAG + dbw 20, POLIWHIRL + end_water_wildmons + + def_water_wildmons ROUTE_31 + db 2 percent ; encounter rate + dbw 20, POLIWAG + dbw 15, POLIWAG + dbw 20, POLIWHIRL + end_water_wildmons + + def_water_wildmons ROUTE_32 + db 6 percent ; encounter rate + dbw 15, TENTACOOL + dbw 20, QUAGSIRE + dbw 20, TENTACRUEL + end_water_wildmons + + def_water_wildmons ROUTE_34 + db 6 percent ; encounter rate + dbw 20, TENTACOOL + dbw 15, TENTACOOL + dbw 20, TENTACRUEL + end_water_wildmons + + def_water_wildmons ROUTE_35 + db 4 percent ; encounter rate + dbw 20, PSYDUCK + dbw 15, PSYDUCK + dbw 20, GOLDUCK + end_water_wildmons + + def_water_wildmons ROUTE_40 + db 6 percent ; encounter rate + dbw 20, TENTACOOL + dbw 15, TENTACOOL + dbw 20, TENTACRUEL + end_water_wildmons + + def_water_wildmons ROUTE_41 + db 6 percent ; encounter rate + dbw 20, TENTACOOL + dbw 20, TENTACRUEL + dbw 20, MANTINE + end_water_wildmons + + def_water_wildmons ROUTE_42 + db 4 percent ; encounter rate + dbw 20, GOLDEEN + dbw 15, GOLDEEN + dbw 20, SEAKING + end_water_wildmons + + def_water_wildmons ROUTE_43 + db 2 percent ; encounter rate + dbw 20, MAGIKARP + dbw 15, MAGIKARP + dbw 10, MAGIKARP + end_water_wildmons + + def_water_wildmons ROUTE_44 + db 2 percent ; encounter rate + dbw 25, POLIWAG + dbw 20, POLIWAG + dbw 25, POLIWHIRL + end_water_wildmons + + def_water_wildmons ROUTE_45 + db 2 percent ; encounter rate + dbw 20, MAGIKARP + dbw 15, MAGIKARP + dbw 5, MAGIKARP + end_water_wildmons + + def_water_wildmons NEW_BARK_TOWN + db 6 percent ; encounter rate + dbw 20, TENTACOOL + dbw 15, TENTACOOL + dbw 20, TENTACRUEL + end_water_wildmons + + def_water_wildmons CHERRYGROVE_CITY + db 6 percent ; encounter rate + dbw 20, TENTACOOL + dbw 15, TENTACOOL + dbw 20, TENTACRUEL + end_water_wildmons + + def_water_wildmons VIOLET_CITY + db 2 percent ; encounter rate + dbw 20, POLIWAG + dbw 15, POLIWAG + dbw 20, POLIWHIRL + end_water_wildmons + + def_water_wildmons CIANWOOD_CITY + db 6 percent ; encounter rate + dbw 20, TENTACOOL + dbw 15, TENTACOOL + dbw 20, TENTACRUEL + end_water_wildmons + + def_water_wildmons OLIVINE_CITY + db 6 percent ; encounter rate + dbw 20, TENTACOOL + dbw 15, TENTACOOL + dbw 20, TENTACRUEL + end_water_wildmons + + def_water_wildmons ECRUTEAK_CITY + db 2 percent ; encounter rate + dbw 20, POLIWAG + dbw 15, POLIWAG + dbw 20, POLIWHIRL + end_water_wildmons + + def_water_wildmons LAKE_OF_RAGE + db 6 percent ; encounter rate + dbw 15, MAGIKARP + dbw 10, MAGIKARP + dbw 15, GYARADOS + end_water_wildmons + + def_water_wildmons BLACKTHORN_CITY + db 4 percent ; encounter rate + dbw 15, MAGIKARP + dbw 10, MAGIKARP + dbw 5, MAGIKARP + end_water_wildmons + + def_water_wildmons SILVER_CAVE_OUTSIDE + db 2 percent ; encounter rate + dbw 35, POLIWHIRL + dbw 40, POLIWHIRL + dbw 35, POLIWAG + end_water_wildmons + + db -1 ; end diff --git a/data/wild/kanto_grass.asm b/data/wild/kanto_grass.asm new file mode 100644 index 0000000..4e9f20b --- /dev/null +++ b/data/wild/kanto_grass.asm @@ -0,0 +1,845 @@ +; Kanto Pokémon in grass + +KantoGrassWildMons: + + def_grass_wildmons DIGLETTS_CAVE + db 4 percent, 2 percent, 8 percent ; encounter rates: morn/day/nite + ; morn + dbw 3, DIGLETT + dbw 6, DIGLETT + dbw 12, DIGLETT + dbw 24, DIGLETT + dbw 24, DUGTRIO + dbw 24, DUGTRIO + dbw 24, DUGTRIO + ; day + dbw 2, DIGLETT + dbw 4, DIGLETT + dbw 8, DIGLETT + dbw 16, DIGLETT + dbw 16, DUGTRIO + dbw 16, DUGTRIO + dbw 16, DUGTRIO + ; nite + dbw 4, DIGLETT + dbw 8, DIGLETT + dbw 16, DIGLETT + dbw 32, DIGLETT + dbw 32, DUGTRIO + dbw 32, DUGTRIO + dbw 32, DUGTRIO + end_grass_wildmons + + def_grass_wildmons MOUNT_MOON + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 6, ZUBAT + dbw 8, GEODUDE + dbw 8, SANDSHREW + dbw 12, PARAS + dbw 10, GEODUDE + dbw 8, CLEFAIRY + dbw 8, CLEFAIRY + ; day + dbw 6, ZUBAT + dbw 8, GEODUDE + dbw 8, SANDSHREW + dbw 12, PARAS + dbw 10, GEODUDE + dbw 8, CLEFAIRY + dbw 8, CLEFAIRY + ; nite + dbw 6, ZUBAT + dbw 8, GEODUDE + dbw 8, CLEFAIRY + dbw 12, PARAS + dbw 10, GEODUDE + dbw 12, CLEFAIRY + dbw 12, CLEFAIRY + end_grass_wildmons + + def_grass_wildmons ROCK_TUNNEL_1F + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 10, CUBONE + dbw 11, GEODUDE + dbw 12, MACHOP + dbw 12, ZUBAT + dbw 15, MACHOKE + dbw 12, MAROWAK + dbw 12, MAROWAK + ; day + dbw 10, CUBONE + dbw 11, GEODUDE + dbw 12, MACHOP + dbw 12, ZUBAT + dbw 15, MACHOKE + dbw 12, MAROWAK + dbw 12, MAROWAK + ; nite + dbw 12, ZUBAT + dbw 11, GEODUDE + dbw 12, GEODUDE + dbw 17, HAUNTER + dbw 15, ZUBAT + dbw 15, ZUBAT + dbw 15, ZUBAT + end_grass_wildmons + + def_grass_wildmons ROCK_TUNNEL_B1F + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 12, CUBONE + dbw 14, GEODUDE + dbw 16, ONIX + dbw 12, ZUBAT + dbw 15, MAROWAK + dbw 15, KANGASKHAN + dbw 15, KANGASKHAN + ; day + dbw 12, CUBONE + dbw 14, GEODUDE + dbw 16, ONIX + dbw 12, ZUBAT + dbw 15, MAROWAK + dbw 15, KANGASKHAN + dbw 15, KANGASKHAN + ; nite + dbw 12, ZUBAT + dbw 14, GEODUDE + dbw 16, ONIX + dbw 15, ZUBAT + dbw 15, HAUNTER + dbw 15, GOLBAT + dbw 15, GOLBAT + end_grass_wildmons + + def_grass_wildmons VICTORY_ROAD + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 34, GRAVELER + dbw 32, RHYHORN + dbw 33, ONIX + dbw 34, GOLBAT + dbw 35, SANDSLASH + dbw 35, RHYDON + dbw 35, RHYDON + ; day + dbw 34, GRAVELER + dbw 32, RHYHORN + dbw 33, ONIX + dbw 34, GOLBAT + dbw 35, SANDSLASH + dbw 35, RHYDON + dbw 35, RHYDON + ; nite + dbw 34, GOLBAT + dbw 34, GRAVELER + dbw 32, ONIX + dbw 36, GRAVELER + dbw 38, GRAVELER + dbw 40, GRAVELER + dbw 40, GRAVELER + end_grass_wildmons + + def_grass_wildmons TOHJO_FALLS + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 22, ZUBAT + dbw 22, RATICATE + dbw 24, GOLBAT + dbw 21, SLOWPOKE + dbw 20, RATTATA + dbw 23, SLOWPOKE + dbw 23, SLOWPOKE + ; day + dbw 22, ZUBAT + dbw 22, RATICATE + dbw 24, GOLBAT + dbw 21, SLOWPOKE + dbw 20, RATTATA + dbw 23, SLOWPOKE + dbw 23, SLOWPOKE + ; nite + dbw 22, ZUBAT + dbw 22, RATICATE + dbw 24, GOLBAT + dbw 21, SLOWPOKE + dbw 20, RATTATA + dbw 23, SLOWPOKE + dbw 23, SLOWPOKE + end_grass_wildmons + + def_grass_wildmons ROUTE_1 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 2, PIDGEY + dbw 2, RATTATA + dbw 3, SENTRET + dbw 3, PIDGEY + dbw 6, FURRET + dbw 4, PIDGEY + dbw 4, PIDGEY + ; day + dbw 2, PIDGEY + dbw 2, RATTATA + dbw 3, SENTRET + dbw 3, PIDGEY + dbw 6, FURRET + dbw 4, PIDGEY + dbw 4, PIDGEY + ; nite + dbw 2, HOOTHOOT + dbw 2, RATTATA + dbw 3, RATTATA + dbw 3, HOOTHOOT + dbw 6, RATICATE + dbw 4, HOOTHOOT + dbw 4, HOOTHOOT + end_grass_wildmons + + def_grass_wildmons ROUTE_2 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 3, CATERPIE + dbw 3, LEDYBA + dbw 5, PIDGEY + dbw 7, BUTTERFREE + dbw 7, LEDIAN + dbw 4, PIKACHU + dbw 4, PIKACHU + ; day + dbw 3, CATERPIE + dbw 3, PIDGEY + dbw 5, PIDGEY + dbw 7, BUTTERFREE + dbw 7, PIDGEOTTO + dbw 4, PIKACHU + dbw 4, PIKACHU + ; nite + dbw 3, HOOTHOOT + dbw 3, SPINARAK + dbw 5, HOOTHOOT + dbw 7, NOCTOWL + dbw 7, ARIADOS + dbw 4, NOCTOWL + dbw 4, NOCTOWL + end_grass_wildmons + + def_grass_wildmons ROUTE_3 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 5, SPEAROW + dbw 5, RATTATA + dbw 8, EKANS + dbw 10, RATICATE + dbw 10, ARBOK + dbw 10, SANDSHREW + dbw 10, SANDSHREW + ; day + dbw 5, SPEAROW + dbw 5, RATTATA + dbw 8, EKANS + dbw 10, RATICATE + dbw 10, ARBOK + dbw 10, SANDSHREW + dbw 10, SANDSHREW + ; nite + dbw 5, RATTATA + dbw 10, RATTATA + dbw 10, RATICATE + dbw 6, ZUBAT + dbw 5, RATTATA + dbw 6, CLEFAIRY + dbw 6, CLEFAIRY + end_grass_wildmons + + def_grass_wildmons ROUTE_4 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 5, SPEAROW + dbw 5, RATTATA + dbw 8, EKANS + dbw 10, RATICATE + dbw 10, ARBOK + dbw 10, SANDSHREW + dbw 10, SANDSHREW + ; day + dbw 5, SPEAROW + dbw 5, RATTATA + dbw 8, EKANS + dbw 10, RATICATE + dbw 10, ARBOK + dbw 10, SANDSHREW + dbw 10, SANDSHREW + ; nite + dbw 5, RATTATA + dbw 10, RATTATA + dbw 10, RATICATE + dbw 6, ZUBAT + dbw 5, RATTATA + dbw 6, CLEFAIRY + dbw 6, CLEFAIRY + end_grass_wildmons + + def_grass_wildmons ROUTE_5 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 13, PIDGEY + dbw 13, SNUBBULL + dbw 15, PIDGEOTTO + dbw 12, ABRA + dbw 14, JIGGLYPUFF + dbw 14, ABRA + dbw 14, ABRA + ; day + dbw 13, PIDGEY + dbw 13, SNUBBULL + dbw 15, PIDGEOTTO + dbw 12, ABRA + dbw 14, JIGGLYPUFF + dbw 14, ABRA + dbw 14, ABRA + ; nite + dbw 13, HOOTHOOT + dbw 13, MEOWTH + dbw 15, NOCTOWL + dbw 12, ABRA + dbw 14, JIGGLYPUFF + dbw 14, ABRA + dbw 14, ABRA + end_grass_wildmons + + def_grass_wildmons ROUTE_6 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 13, RATTATA + dbw 13, SNUBBULL + dbw 14, MAGNEMITE + dbw 15, RATICATE + dbw 12, JIGGLYPUFF + dbw 15, GRANBULL + dbw 15, GRANBULL + ; day + dbw 13, RATTATA + dbw 13, SNUBBULL + dbw 14, MAGNEMITE + dbw 15, RATICATE + dbw 12, JIGGLYPUFF + dbw 15, GRANBULL + dbw 15, GRANBULL + ; nite + dbw 13, MEOWTH + dbw 13, DROWZEE + dbw 14, MAGNEMITE + dbw 15, PSYDUCK + dbw 12, JIGGLYPUFF + dbw 15, RATICATE + dbw 15, RATICATE + end_grass_wildmons + + def_grass_wildmons ROUTE_7 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 17, RATTATA + dbw 17, SPEAROW + dbw 18, SNUBBULL + dbw 18, RATICATE + dbw 18, JIGGLYPUFF + dbw 16, ABRA + dbw 16, ABRA + ; day + dbw 17, RATTATA + dbw 17, SPEAROW + dbw 18, SNUBBULL + dbw 18, RATICATE + dbw 18, JIGGLYPUFF + dbw 16, ABRA + dbw 16, ABRA + ; nite + dbw 17, MEOWTH + dbw 17, MURKROW + dbw 18, HOUNDOUR + dbw 18, PERSIAN + dbw 18, JIGGLYPUFF + dbw 16, ABRA + dbw 16, ABRA + end_grass_wildmons + + def_grass_wildmons ROUTE_8 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 17, SNUBBULL + dbw 19, PIDGEOTTO + dbw 16, ABRA + dbw 17, GROWLITHE + dbw 16, JIGGLYPUFF + dbw 18, KADABRA + dbw 18, KADABRA + ; day + dbw 17, SNUBBULL + dbw 19, PIDGEOTTO + dbw 16, ABRA + dbw 17, GROWLITHE + dbw 16, JIGGLYPUFF + dbw 18, KADABRA + dbw 18, KADABRA + ; nite + dbw 17, MEOWTH + dbw 20, NOCTOWL + dbw 16, ABRA + dbw 17, HAUNTER + dbw 16, JIGGLYPUFF + dbw 18, KADABRA + dbw 18, KADABRA + end_grass_wildmons + + def_grass_wildmons ROUTE_9 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 15, RATTATA + dbw 15, SPEAROW + dbw 15, RATICATE + dbw 15, FEAROW + dbw 15, FEAROW + dbw 18, MAROWAK + dbw 18, MAROWAK + ; day + dbw 15, RATTATA + dbw 15, SPEAROW + dbw 15, RATICATE + dbw 15, FEAROW + dbw 15, FEAROW + dbw 18, MAROWAK + dbw 18, MAROWAK + ; nite + dbw 15, RATTATA + dbw 15, VENONAT + dbw 15, RATICATE + dbw 15, VENOMOTH + dbw 15, ZUBAT + dbw 18, RATICATE + dbw 18, RATICATE + end_grass_wildmons + + def_grass_wildmons ROUTE_10_NORTH + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 15, SPEAROW + dbw 17, VOLTORB + dbw 15, RATICATE + dbw 15, FEAROW + dbw 15, MAROWAK + dbw 16, ELECTABUZZ + dbw 16, ELECTABUZZ + ; day + dbw 15, SPEAROW + dbw 17, VOLTORB + dbw 15, RATICATE + dbw 15, FEAROW + dbw 15, MAROWAK + dbw 18, ELECTABUZZ + dbw 18, ELECTABUZZ + ; nite + dbw 15, VENONAT + dbw 17, VOLTORB + dbw 15, RATICATE + dbw 15, VENOMOTH + dbw 15, ZUBAT + dbw 16, ELECTABUZZ + dbw 16, ELECTABUZZ + end_grass_wildmons + + def_grass_wildmons ROUTE_11 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 14, HOPPIP + dbw 13, RATICATE + dbw 15, MAGNEMITE + dbw 16, PIDGEOTTO + dbw 16, RATTATA + dbw 16, HOPPIP + dbw 16, HOPPIP + ; day + dbw 14, HOPPIP + dbw 13, RATICATE + dbw 15, MAGNEMITE + dbw 16, PIDGEOTTO + dbw 16, RATTATA + dbw 16, HOPPIP + dbw 16, HOPPIP + ; nite + dbw 14, DROWZEE + dbw 13, MEOWTH + dbw 15, MAGNEMITE + dbw 16, NOCTOWL + dbw 16, RATICATE + dbw 16, HYPNO + dbw 16, HYPNO + end_grass_wildmons + + def_grass_wildmons ROUTE_13 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 23, NIDORINO + dbw 23, NIDORINA + dbw 25, PIDGEOTTO + dbw 25, HOPPIP + dbw 27, HOPPIP + dbw 27, HOPPIP + dbw 25, CHANSEY + ; day + dbw 23, NIDORINO + dbw 23, NIDORINA + dbw 25, PIDGEOTTO + dbw 25, HOPPIP + dbw 27, HOPPIP + dbw 27, HOPPIP + dbw 25, CHANSEY + ; nite + dbw 23, VENONAT + dbw 23, QUAGSIRE + dbw 25, NOCTOWL + dbw 25, VENOMOTH + dbw 25, QUAGSIRE + dbw 25, QUAGSIRE + dbw 25, CHANSEY + end_grass_wildmons + + def_grass_wildmons ROUTE_14 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 26, NIDORINO + dbw 26, NIDORINA + dbw 28, PIDGEOTTO + dbw 28, HOPPIP + dbw 30, SKIPLOOM + dbw 30, SKIPLOOM + dbw 28, CHANSEY + ; day + dbw 26, NIDORINO + dbw 26, NIDORINA + dbw 28, PIDGEOTTO + dbw 28, HOPPIP + dbw 30, SKIPLOOM + dbw 30, SKIPLOOM + dbw 28, CHANSEY + ; nite + dbw 26, VENONAT + dbw 26, QUAGSIRE + dbw 28, NOCTOWL + dbw 28, VENOMOTH + dbw 28, QUAGSIRE + dbw 28, QUAGSIRE + dbw 28, CHANSEY + end_grass_wildmons + + def_grass_wildmons ROUTE_15 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 23, NIDORINO + dbw 23, NIDORINA + dbw 25, PIDGEOTTO + dbw 25, HOPPIP + dbw 27, HOPPIP + dbw 27, HOPPIP + dbw 25, CHANSEY + ; day + dbw 23, NIDORINO + dbw 23, NIDORINA + dbw 25, PIDGEOTTO + dbw 25, HOPPIP + dbw 27, HOPPIP + dbw 27, HOPPIP + dbw 25, CHANSEY + ; nite + dbw 23, VENONAT + dbw 23, QUAGSIRE + dbw 25, NOCTOWL + dbw 25, VENOMOTH + dbw 25, QUAGSIRE + dbw 25, QUAGSIRE + dbw 25, CHANSEY + end_grass_wildmons + + def_grass_wildmons ROUTE_16 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 26, GRIMER + dbw 27, FEAROW + dbw 28, GRIMER + dbw 29, FEAROW + dbw 29, FEAROW + dbw 30, MUK + dbw 30, MUK + ; day + dbw 26, GRIMER + dbw 27, FEAROW + dbw 28, GRIMER + dbw 29, FEAROW + dbw 29, SLUGMA + dbw 30, MUK + dbw 30, MUK + ; nite + dbw 26, GRIMER + dbw 27, GRIMER + dbw 28, GRIMER + dbw 29, MURKROW + dbw 29, MURKROW + dbw 30, MUK + dbw 30, MUK + end_grass_wildmons + + def_grass_wildmons ROUTE_17 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 30, FEAROW + dbw 29, GRIMER + dbw 31, GRIMER + dbw 32, FEAROW + dbw 33, GRIMER + dbw 33, MUK + dbw 33, MUK + ; day + dbw 30, FEAROW + dbw 29, SLUGMA + dbw 29, GRIMER + dbw 32, FEAROW + dbw 32, SLUGMA + dbw 33, MUK + dbw 33, MUK + ; nite + dbw 30, GRIMER + dbw 29, GRIMER + dbw 31, GRIMER + dbw 32, GRIMER + dbw 33, GRIMER + dbw 33, MUK + dbw 33, MUK + end_grass_wildmons + + def_grass_wildmons ROUTE_18 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 26, GRIMER + dbw 27, FEAROW + dbw 28, GRIMER + dbw 29, FEAROW + dbw 29, FEAROW + dbw 30, MUK + dbw 30, MUK + ; day + dbw 26, GRIMER + dbw 27, FEAROW + dbw 28, GRIMER + dbw 29, FEAROW + dbw 29, SLUGMA + dbw 30, MUK + dbw 30, MUK + ; nite + dbw 26, GRIMER + dbw 27, GRIMER + dbw 28, GRIMER + dbw 29, GRIMER + dbw 29, GRIMER + dbw 30, MUK + dbw 30, MUK + end_grass_wildmons + + def_grass_wildmons ROUTE_21 + db 6 percent, 6 percent, 6 percent ; encounter rates: morn/day/nite + ; morn + dbw 30, TANGELA + dbw 25, RATTATA + dbw 35, TANGELA + dbw 20, RATICATE + dbw 30, MR__MIME + dbw 28, MR__MIME + dbw 28, MR__MIME + ; day + dbw 30, TANGELA + dbw 25, RATTATA + dbw 35, TANGELA + dbw 20, RATICATE + dbw 28, MR__MIME + dbw 30, MR__MIME + dbw 30, MR__MIME + ; nite + dbw 30, TANGELA + dbw 25, RATTATA + dbw 35, TANGELA + dbw 20, RATICATE + dbw 30, TANGELA + dbw 28, TANGELA + dbw 28, TANGELA + end_grass_wildmons + + def_grass_wildmons ROUTE_22 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 3, RATTATA + dbw 3, SPEAROW + dbw 5, SPEAROW + dbw 4, DODUO + dbw 6, PONYTA + dbw 7, FEAROW + dbw 7, FEAROW + ; day + dbw 3, RATTATA + dbw 3, SPEAROW + dbw 5, SPEAROW + dbw 4, DODUO + dbw 6, PONYTA + dbw 7, FEAROW + dbw 7, FEAROW + ; nite + dbw 3, RATTATA + dbw 3, POLIWAG + dbw 5, RATTATA + dbw 4, POLIWAG + dbw 6, RATTATA + dbw 7, RATTATA + dbw 7, RATTATA + end_grass_wildmons + + def_grass_wildmons ROUTE_24 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 8, CATERPIE + dbw 10, CATERPIE + dbw 12, METAPOD + dbw 12, ABRA + dbw 10, BELLSPROUT + dbw 14, BUTTERFREE + dbw 14, BUTTERFREE + ; day + dbw 8, CATERPIE + dbw 12, SUNKERN + dbw 10, CATERPIE + dbw 12, ABRA + dbw 10, BELLSPROUT + dbw 14, BUTTERFREE + dbw 14, BUTTERFREE + ; nite + dbw 10, VENONAT + dbw 10, ODDISH + dbw 12, ODDISH + dbw 12, ABRA + dbw 10, BELLSPROUT + dbw 14, GLOOM + dbw 14, GLOOM + end_grass_wildmons + + def_grass_wildmons ROUTE_25 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 10, CATERPIE + dbw 10, PIDGEY + dbw 12, PIDGEOTTO + dbw 12, METAPOD + dbw 10, BELLSPROUT + dbw 14, BUTTERFREE + dbw 14, BUTTERFREE + ; day + dbw 10, CATERPIE + dbw 10, PIDGEY + dbw 12, PIDGEOTTO + dbw 12, METAPOD + dbw 10, BELLSPROUT + dbw 14, BUTTERFREE + dbw 14, BUTTERFREE + ; nite + dbw 10, ODDISH + dbw 10, HOOTHOOT + dbw 10, VENONAT + dbw 12, NOCTOWL + dbw 10, BELLSPROUT + dbw 14, NOCTOWL + dbw 14, NOCTOWL + end_grass_wildmons + + def_grass_wildmons ROUTE_26 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 28, DODUO + dbw 28, SANDSLASH + dbw 32, PONYTA + dbw 30, RATICATE + dbw 30, DODUO + dbw 30, ARBOK + dbw 30, ARBOK + ; day + dbw 28, DODUO + dbw 28, SANDSLASH + dbw 32, PONYTA + dbw 30, RATICATE + dbw 30, DODUO + dbw 30, ARBOK + dbw 30, ARBOK + ; nite + dbw 28, NOCTOWL + dbw 28, RATICATE + dbw 32, NOCTOWL + dbw 30, RATICATE + dbw 30, QUAGSIRE + dbw 30, QUAGSIRE + dbw 30, QUAGSIRE + end_grass_wildmons + + def_grass_wildmons ROUTE_27 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 28, DODUO + dbw 28, ARBOK + dbw 30, RATICATE + dbw 30, DODUO + dbw 32, PONYTA + dbw 30, DODRIO + dbw 30, DODRIO + ; day + dbw 28, DODUO + dbw 28, ARBOK + dbw 30, RATICATE + dbw 30, DODUO + dbw 32, PONYTA + dbw 30, DODRIO + dbw 30, DODRIO + ; nite + dbw 28, QUAGSIRE + dbw 28, NOCTOWL + dbw 30, RATICATE + dbw 30, QUAGSIRE + dbw 32, NOCTOWL + dbw 32, NOCTOWL + dbw 32, NOCTOWL + end_grass_wildmons + + def_grass_wildmons ROUTE_28 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 39, TANGELA + dbw 40, PONYTA + dbw 40, RAPIDASH + dbw 42, ARBOK + dbw 41, DODUO + dbw 43, DODRIO + dbw 43, DODRIO + ; day + dbw 39, TANGELA + dbw 40, PONYTA + dbw 40, RAPIDASH + dbw 42, ARBOK + dbw 41, DODUO + dbw 43, DODRIO + dbw 43, DODRIO + ; nite + dbw 39, TANGELA + dbw 40, POLIWHIRL + dbw 40, GOLBAT + dbw 40, POLIWHIRL + dbw 42, GOLBAT + dbw 42, GOLBAT + dbw 42, GOLBAT + end_grass_wildmons + + db -1 ; end diff --git a/data/wild/kanto_water.asm b/data/wild/kanto_water.asm new file mode 100644 index 0000000..555d75f --- /dev/null +++ b/data/wild/kanto_water.asm @@ -0,0 +1,173 @@ +; Kanto Pokémon in water + +KantoWaterWildMons: + + def_water_wildmons TOHJO_FALLS + db 4 percent ; encounter rate + dbw 20, GOLDEEN + dbw 20, SLOWPOKE + dbw 20, SEAKING + end_water_wildmons + + def_water_wildmons VERMILION_PORT + db 2 percent ; encounter rate + dbw 35, TENTACOOL + dbw 30, TENTACOOL + dbw 35, TENTACRUEL + end_water_wildmons + + def_water_wildmons ROUTE_4 + db 4 percent ; encounter rate + dbw 10, GOLDEEN + dbw 5, GOLDEEN + dbw 10, SEAKING + end_water_wildmons + + def_water_wildmons ROUTE_6 + db 2 percent ; encounter rate + dbw 10, PSYDUCK + dbw 5, PSYDUCK + dbw 10, GOLDUCK + end_water_wildmons + + def_water_wildmons ROUTE_9 + db 4 percent ; encounter rate + dbw 15, GOLDEEN + dbw 10, GOLDEEN + dbw 15, SEAKING + end_water_wildmons + + def_water_wildmons ROUTE_10_NORTH + db 4 percent ; encounter rate + dbw 15, GOLDEEN + dbw 10, GOLDEEN + dbw 15, SEAKING + end_water_wildmons + + def_water_wildmons ROUTE_12 + db 6 percent ; encounter rate + dbw 25, TENTACOOL + dbw 25, QUAGSIRE + dbw 25, TENTACRUEL + end_water_wildmons + + def_water_wildmons ROUTE_13 + db 6 percent ; encounter rate + dbw 25, TENTACOOL + dbw 25, QUAGSIRE + dbw 25, TENTACRUEL + end_water_wildmons + + def_water_wildmons ROUTE_19 + db 6 percent ; encounter rate + dbw 35, TENTACOOL + dbw 30, TENTACOOL + dbw 35, TENTACRUEL + end_water_wildmons + + def_water_wildmons ROUTE_20 + db 6 percent ; encounter rate + dbw 35, TENTACOOL + dbw 30, TENTACOOL + dbw 35, TENTACRUEL + end_water_wildmons + + def_water_wildmons ROUTE_21 + db 6 percent ; encounter rate + dbw 35, TENTACOOL + dbw 30, TENTACOOL + dbw 35, TENTACRUEL + end_water_wildmons + + def_water_wildmons ROUTE_22 + db 2 percent ; encounter rate + dbw 10, POLIWAG + dbw 5, POLIWAG + dbw 10, POLIWHIRL + end_water_wildmons + + def_water_wildmons ROUTE_24 + db 4 percent ; encounter rate + dbw 10, GOLDEEN + dbw 5, GOLDEEN + dbw 10, SEAKING + end_water_wildmons + + def_water_wildmons ROUTE_25 + db 4 percent ; encounter rate + dbw 10, GOLDEEN + dbw 5, GOLDEEN + dbw 10, SEAKING + end_water_wildmons + + def_water_wildmons ROUTE_26 + db 6 percent ; encounter rate + dbw 30, TENTACOOL + dbw 25, TENTACOOL + dbw 30, TENTACRUEL + end_water_wildmons + + def_water_wildmons ROUTE_27 + db 6 percent ; encounter rate + dbw 20, TENTACOOL + dbw 15, TENTACOOL + dbw 20, TENTACRUEL + end_water_wildmons + + def_water_wildmons ROUTE_28 + db 2 percent ; encounter rate + dbw 40, POLIWAG + dbw 35, POLIWAG + dbw 40, POLIWHIRL + end_water_wildmons + + def_water_wildmons PALLET_TOWN + db 6 percent ; encounter rate + dbw 35, TENTACOOL + dbw 30, TENTACOOL + dbw 35, TENTACRUEL + end_water_wildmons + + def_water_wildmons VIRIDIAN_CITY + db 2 percent ; encounter rate + dbw 10, POLIWAG + dbw 5, POLIWAG + dbw 10, POLIWHIRL + end_water_wildmons + + def_water_wildmons CERULEAN_CITY + db 4 percent ; encounter rate + dbw 10, GOLDEEN + dbw 5, GOLDEEN + dbw 10, SEAKING + end_water_wildmons + + def_water_wildmons VERMILION_CITY + db 6 percent ; encounter rate + dbw 35, TENTACOOL + dbw 30, TENTACOOL + dbw 35, TENTACRUEL + end_water_wildmons + + def_water_wildmons CELADON_CITY + db 2 percent ; encounter rate + dbw 20, GRIMER + dbw 15, GRIMER + dbw 15, MUK + end_water_wildmons + + def_water_wildmons FUCHSIA_CITY + db 2 percent ; encounter rate + dbw 20, MAGIKARP + dbw 15, MAGIKARP + dbw 10, MAGIKARP + end_water_wildmons + + def_water_wildmons CINNABAR_ISLAND + db 6 percent ; encounter rate + dbw 35, TENTACOOL + dbw 30, TENTACOOL + dbw 35, TENTACRUEL + end_water_wildmons + + db -1 ; end diff --git a/data/wild/probabilities.asm b/data/wild/probabilities.asm new file mode 100644 index 0000000..e8157ca --- /dev/null +++ b/data/wild/probabilities.asm @@ -0,0 +1,22 @@ +MACRO mon_prob +; percent, index + db \1, \2 * 3 +ENDM + +GrassMonProbTable: + table_width 2, GrassMonProbTable + mon_prob 30, 0 ; 30% chance + mon_prob 60, 1 ; 30% chance + mon_prob 80, 2 ; 20% chance + mon_prob 90, 3 ; 10% chance + mon_prob 95, 4 ; 5% chance + mon_prob 99, 5 ; 4% chance + mon_prob 100, 6 ; 1% chance + assert_table_length NUM_GRASSMON + +WaterMonProbTable: + table_width 2, WaterMonProbTable + mon_prob 60, 0 ; 60% chance + mon_prob 90, 1 ; 30% chance + mon_prob 100, 2 ; 10% chance + assert_table_length NUM_WATERMON diff --git a/data/wild/roammon_maps.asm b/data/wild/roammon_maps.asm new file mode 100644 index 0000000..d473e31 --- /dev/null +++ b/data/wild/roammon_maps.asm @@ -0,0 +1,35 @@ +; Maps that roaming monsters can be on, and possible maps they can jump to. +; Notably missing are Route 40 and Route 41, which are water routes. + +MACRO roam_map + map_id \1 + db _NARG - 1 + rept _NARG - 1 + map_id \2 + shift + endr + db 0 + DEF list_index += 1 +ENDM + +RoamMaps: + list_start RoamMaps + ; start map, ...other maps + roam_map ROUTE_29, ROUTE_30, ROUTE_46 + roam_map ROUTE_30, ROUTE_29, ROUTE_31 + roam_map ROUTE_31, ROUTE_30, ROUTE_32, ROUTE_36 + roam_map ROUTE_32, ROUTE_36, ROUTE_31, ROUTE_33 + roam_map ROUTE_33, ROUTE_32, ROUTE_34 + roam_map ROUTE_34, ROUTE_33, ROUTE_35 + roam_map ROUTE_35, ROUTE_34, ROUTE_36 + roam_map ROUTE_36, ROUTE_35, ROUTE_31, ROUTE_32, ROUTE_37 + roam_map ROUTE_37, ROUTE_36, ROUTE_38, ROUTE_42 + roam_map ROUTE_38, ROUTE_37, ROUTE_39, ROUTE_42 + roam_map ROUTE_39, ROUTE_38 + roam_map ROUTE_42, ROUTE_43, ROUTE_44, ROUTE_37, ROUTE_38 + roam_map ROUTE_43, ROUTE_42, ROUTE_44 + roam_map ROUTE_44, ROUTE_42, ROUTE_43, ROUTE_45 + roam_map ROUTE_45, ROUTE_44, ROUTE_46 + roam_map ROUTE_46, ROUTE_45, ROUTE_29 + assert_list_length NUM_ROAMMON_MAPS + db -1 ; end diff --git a/data/wild/swarm_grass.asm b/data/wild/swarm_grass.asm new file mode 100644 index 0000000..696bc60 --- /dev/null +++ b/data/wild/swarm_grass.asm @@ -0,0 +1,61 @@ +; Pokémon swarms in grass + +SwarmGrassWildMons: + +; Dunsparce swarm + map_id DARK_CAVE_VIOLET_ENTRANCE + db 4 percent, 4 percent, 4 percent ; encounter rates: morn/day/nite + ; morn + dbw 3, GEODUDE + dbw 3, DUNSPARCE + dbw 2, ZUBAT + dbw 2, GEODUDE + dbw 2, DUNSPARCE + dbw 4, DUNSPARCE + dbw 4, DUNSPARCE + ; day + dbw 3, GEODUDE + dbw 3, DUNSPARCE + dbw 2, ZUBAT + dbw 2, GEODUDE + dbw 2, DUNSPARCE + dbw 4, DUNSPARCE + dbw 4, DUNSPARCE + ; nite + dbw 3, GEODUDE + dbw 3, DUNSPARCE + dbw 2, ZUBAT + dbw 2, GEODUDE + dbw 2, DUNSPARCE + dbw 4, DUNSPARCE + dbw 4, DUNSPARCE + +; Yanma swarm + map_id ROUTE_35 + db 10 percent, 10 percent, 10 percent ; encounter rates: morn/day/nite + ; morn + dbw 12, NIDORAN_M + dbw 12, NIDORAN_F + dbw 12, YANMA + dbw 14, YANMA + dbw 14, PIDGEY + dbw 10, DITTO + dbw 10, DITTO + ; day + dbw 12, NIDORAN_M + dbw 12, NIDORAN_F + dbw 12, YANMA + dbw 14, YANMA + dbw 14, PIDGEY + dbw 10, DITTO + dbw 10, DITTO + ; nite + dbw 12, NIDORAN_M + dbw 12, NIDORAN_F + dbw 12, YANMA + dbw 14, YANMA + dbw 14, HOOTHOOT + dbw 10, DITTO + dbw 10, DITTO + + db -1 ; end diff --git a/data/wild/swarm_water.asm b/data/wild/swarm_water.asm new file mode 100644 index 0000000..ec105c0 --- /dev/null +++ b/data/wild/swarm_water.asm @@ -0,0 +1,7 @@ +; Pokémon swarms in water + +SwarmWaterWildMons: + + ; No swarms encountered while surfing in Crystal + + db -1 ; end diff --git a/data/wild/treemon_maps.asm b/data/wild/treemon_maps.asm new file mode 100644 index 0000000..2fbb93c --- /dev/null +++ b/data/wild/treemon_maps.asm @@ -0,0 +1,48 @@ +MACRO treemon_map + map_id \1 + db \2 ; treemon set +ENDM + +TreeMonMaps: + treemon_map ROUTE_26, TREEMON_SET_KANTO + treemon_map ROUTE_27, TREEMON_SET_KANTO + treemon_map ROUTE_28, TREEMON_SET_CITY + treemon_map ROUTE_29, TREEMON_SET_ROUTE + treemon_map ROUTE_30, TREEMON_SET_ROUTE + treemon_map ROUTE_31, TREEMON_SET_ROUTE + treemon_map ROUTE_32, TREEMON_SET_KANTO + treemon_map ROUTE_33, TREEMON_SET_TOWN + treemon_map ROUTE_34, TREEMON_SET_ROUTE + treemon_map ROUTE_35, TREEMON_SET_ROUTE + treemon_map ROUTE_36, TREEMON_SET_ROUTE + treemon_map ROUTE_37, TREEMON_SET_ROUTE + treemon_map ROUTE_38, TREEMON_SET_ROUTE + treemon_map ROUTE_39, TREEMON_SET_ROUTE + treemon_map ROUTE_40, TREEMON_SET_CITY + treemon_map ROUTE_41, TREEMON_SET_CITY + treemon_map ROUTE_42, TREEMON_SET_TOWN + treemon_map ROUTE_43, TREEMON_SET_LAKE + treemon_map ROUTE_44, TREEMON_SET_CANYON + treemon_map ROUTE_45, TREEMON_SET_CANYON + treemon_map ROUTE_46, TREEMON_SET_CANYON + treemon_map NEW_BARK_TOWN, TREEMON_SET_CITY + treemon_map CHERRYGROVE_CITY, TREEMON_SET_CITY + treemon_map VIOLET_CITY, TREEMON_SET_CITY + treemon_map AZALEA_TOWN, TREEMON_SET_TOWN + treemon_map CIANWOOD_CITY, TREEMON_SET_CITY + treemon_map GOLDENROD_CITY, TREEMON_SET_CITY + treemon_map OLIVINE_CITY, TREEMON_SET_CITY + treemon_map ECRUTEAK_CITY, TREEMON_SET_CITY + treemon_map MAHOGANY_TOWN, TREEMON_SET_CITY + treemon_map LAKE_OF_RAGE, TREEMON_SET_LAKE + treemon_map BLACKTHORN_CITY, TREEMON_SET_CITY + treemon_map SILVER_CAVE_OUTSIDE, TREEMON_SET_CITY + treemon_map ILEX_FOREST, TREEMON_SET_FOREST + db -1 + +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 diff --git a/data/wild/treemons.asm b/data/wild/treemons.asm new file mode 100644 index 0000000..50faa8c --- /dev/null +++ b/data/wild/treemons.asm @@ -0,0 +1,131 @@ +TreeMons: +; entries correspond to TREEMON_SET_* constants + table_width 2, TreeMons + dw TreeMonSet_City + dw TreeMonSet_Canyon + dw TreeMonSet_Town + dw TreeMonSet_Route + dw TreeMonSet_Kanto + dw TreeMonSet_Lake + dw TreeMonSet_Forest + dw TreeMonSet_Rock + assert_table_length NUM_TREEMON_SETS + dw TreeMonSet_City ; unused + +; Two tables each (common, rare). +; Structure: +; db %, species, level + +TreeMonSet_City: +TreeMonSet_Canyon: +; common + dbbw 50, 10, SPEAROW + dbbw 15, 10, SPEAROW + dbbw 15, 10, SPEAROW + dbbw 10, 10, AIPOM + dbbw 5, 10, AIPOM + dbbw 5, 10, AIPOM + db -1 +; rare + dbbw 50, 10, SPEAROW + dbbw 15, 10, HERACROSS + dbbw 15, 10, HERACROSS + dbbw 10, 10, AIPOM + dbbw 5, 10, AIPOM + dbbw 5, 10, AIPOM + db -1 + +TreeMonSet_Town: +; common + dbbw 50, 10, SPEAROW + dbbw 15, 10, EKANS + dbbw 15, 10, SPEAROW + dbbw 10, 10, AIPOM + dbbw 5, 10, AIPOM + dbbw 5, 10, AIPOM + db -1 +; rare + dbbw 50, 10, SPEAROW + dbbw 15, 10, HERACROSS + dbbw 15, 10, HERACROSS + dbbw 10, 10, AIPOM + dbbw 5, 10, AIPOM + dbbw 5, 10, AIPOM + db -1 + +TreeMonSet_Route: +; common + dbbw 50, 10, HOOTHOOT + dbbw 15, 10, SPINARAK + dbbw 15, 10, LEDYBA + dbbw 10, 10, EXEGGCUTE + dbbw 5, 10, EXEGGCUTE + dbbw 5, 10, EXEGGCUTE + db -1 +; rare + dbbw 50, 10, HOOTHOOT + dbbw 15, 10, PINECO + dbbw 15, 10, PINECO + dbbw 10, 10, EXEGGCUTE + dbbw 5, 10, EXEGGCUTE + dbbw 5, 10, EXEGGCUTE + db -1 + +TreeMonSet_Kanto: +; common + dbbw 50, 10, HOOTHOOT + dbbw 15, 10, EKANS + dbbw 15, 10, HOOTHOOT + dbbw 10, 10, EXEGGCUTE + dbbw 5, 10, EXEGGCUTE + dbbw 5, 10, EXEGGCUTE + db -1 +; rare + dbbw 50, 10, HOOTHOOT + dbbw 15, 10, PINECO + dbbw 15, 10, PINECO + dbbw 10, 10, EXEGGCUTE + dbbw 5, 10, EXEGGCUTE + dbbw 5, 10, EXEGGCUTE + db -1 + +TreeMonSet_Lake: +; common + dbbw 50, 10, HOOTHOOT + dbbw 15, 10, VENONAT + dbbw 15, 10, HOOTHOOT + dbbw 10, 10, EXEGGCUTE + dbbw 5, 10, EXEGGCUTE + dbbw 5, 10, EXEGGCUTE + db -1 +; rare + dbbw 50, 10, HOOTHOOT + dbbw 15, 10, PINECO + dbbw 15, 10, PINECO + dbbw 10, 10, EXEGGCUTE + dbbw 5, 10, EXEGGCUTE + dbbw 5, 10, EXEGGCUTE + db -1 + +TreeMonSet_Forest: +; common + dbbw 50, 10, HOOTHOOT + dbbw 15, 10, PINECO + dbbw 15, 10, PINECO + dbbw 10, 10, NOCTOWL + dbbw 5, 10, BUTTERFREE + dbbw 5, 10, BEEDRILL + db -1 +; rare + dbbw 50, 10, HOOTHOOT + dbbw 15, 10, CATERPIE + dbbw 15, 10, WEEDLE + dbbw 10, 10, HOOTHOOT + dbbw 5, 10, METAPOD + dbbw 5, 10, KAKUNA + db -1 + +TreeMonSet_Rock: + dbbw 90, 15, KRABBY + dbbw 10, 15, SHUCKLE + db -1 diff --git a/data/wild/treemons_asleep.asm b/data/wild/treemons_asleep.asm new file mode 100644 index 0000000..7edddae --- /dev/null +++ b/data/wild/treemons_asleep.asm @@ -0,0 +1,31 @@ +; Used by CheckSleepingTreeMon + +AsleepTreeMonsNite: + dw CATERPIE + dw METAPOD + dw BUTTERFREE + dw WEEDLE + dw KAKUNA + dw BEEDRILL + dw SPEAROW + dw EKANS + dw EXEGGCUTE + dw LEDYBA + dw AIPOM + dw -1 ; end + +AsleepTreeMonsDay: + dw VENONAT + dw HOOTHOOT + dw NOCTOWL + dw SPINARAK + dw HERACROSS + dw -1 ; end + +AsleepTreeMonsMorn: + dw VENONAT + dw HOOTHOOT + dw NOCTOWL + dw SPINARAK + dw HERACROSS + dw -1 ; end diff --git a/data/wild/unlocked_unowns.asm b/data/wild/unlocked_unowns.asm new file mode 100644 index 0000000..4c0d838 --- /dev/null +++ b/data/wild/unlocked_unowns.asm @@ -0,0 +1,25 @@ +MACRO unown_set +rept _NARG + db UNOWN_\1 + shift +endr + db -1 +ENDM + +UnlockedUnownLetterSets: +; entries correspond to UNLOCKED_UNOWNS_* constants + table_width 2, UnlockedUnownLetterSets + dw .Set_A_K ; UNLOCKED_UNOWNS_A_TO_K_F + dw .Set_L_R ; UNLOCKED_UNOWNS_L_TO_R_F + dw .Set_S_W ; UNLOCKED_UNOWNS_S_TO_W_F + dw .Set_X_Z ; UNLOCKED_UNOWNS_X_TO_Z_F + assert_table_length NUM_UNLOCKED_UNOWN_SETS + +.Set_A_K: + unown_set A, B, C, D, E, F, G, H, I, J, K +.Set_L_R: + unown_set L, M, N, O, P, Q, R +.Set_S_W: + unown_set S, T, U, V, W +.Set_X_Z: + unown_set X, Y, Z diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000..223aabb --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1 @@ +markdown: gfm diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss new file mode 100644 index 0000000..cb6c5d5 --- /dev/null +++ b/docs/assets/css/style.scss @@ -0,0 +1,112 @@ +--- +--- + +@import "{{ site.theme }}"; + +@media (prefers-color-scheme: dark) { + +body { color: #a9bacb; background-color: #14171a; } + +a, +.markdown-body h1 .octicon-link, +.markdown-body h2 .octicon-link, +.markdown-body h3 .octicon-link, +.markdown-body h4 .octicon-link, +.markdown-body h5 .octicon-link, +.markdown-body h6 .octicon-link { color: #3689b2; } + +.markdown-body hr { background-color: #64757f; } +.markdown-body blockquote { color: #667380; border-left-color: #3d454b; } +.markdown-body kbd { color: #8896a4; background-color: #181d20; border-color: #393f46; border-bottom-color: #4e565f; box-shadow: inset 0 -1px 0 #4e565f; } +.markdown-body h1, +.markdown-body h2 { border-bottom: 1px solid #64757f; } +.markdown-body h6 { color: #717d89; } /* ok */ +.markdown-body table th, +.markdown-body table td { border-color: #30373c; } +.markdown-body table tr { background-color: #14171a; border-top-color: #393f46; } +.markdown-body table tr:nth-child(2n) { background-color: #23292d; } +.markdown-body img { background-color: #14171a; } +.markdown-body span.frame > span { border-color: #30373c; } +.markdown-body span.frame span span { color: #a9bacb; } +.markdown-body code, +.markdown-body tt { background-color: rgba(229,225,221,0.05); } +.markdown-body .highlight pre, +.markdown-body pre { background-color: #23292d; } +.markdown-body .csv-data .blob-num { background-color: #14171a; } +.markdown-body .csv-data th { background-color: #23292d; } + +.highlight { background-color: #181d20; } + +.highlight .w { color: #242424; } /* Text.Whitespace */ + +.highlight .err { color: #f61717; background-color: #330000; } /* Error */ + +.highlight .gi { color: #ffffff; background-color: #225522; } /* Generic.Inserted */ +.highlight .gd { color: #ffffff; background-color: #662222; } /* Generic.Deleted */ +.highlight .ge { color: #ffffff; } /* Generic.Emph */ +.highlight .gr { color: #b22518; } /* Generic.Error */ +.highlight .gh { color: #253b22; } /* Generic.Heading */ +.highlight .go { color: #777777; } /* Generic.Output */ +.highlight .gp { color: #cccccc; } /* Generic.Prompt */ +.highlight .gu { color: #555555; } /* Generic.Subheading */ +.highlight .gt { color: #aa0000; } /* Generic.Traceback */ + +.highlight .c { color: #5f5a60; } /* Comment */ +.highlight .cm { color: #5f5a60; } /* Comment.Multiline */ +.highlight .cp { color: #5f5a60; } /* Comment.Preproc */ +.highlight .c1 { color: #5f5a60; } /* Comment.Single */ +.highlight .cs { color: #5f5a60; } /* Comment.Special */ +.highlight .cd { color: #5f5a60; } + +.highlight .k { color: #ffffff; } /* Keyword */ +.highlight .kc { color: #ffffff; } /* Keyword.Constant */ +.highlight .kd { color: #ffffff; } /* Keyword.Declaration */ +.highlight .kn { color: #ffffff; } /* Keyword.Namespace */ +.highlight .kp { color: #ffffff; } /* Keyword.Pseudo */ +.highlight .kr { color: #ffffff; } /* Keyword.Reserved */ +.highlight .kt { color: #ffffff; } /* Keyword.Type */ +.highlight .kv { color: #ffffff; } + +.highlight .o { color: #ffffff; } /* Operator */ +.highlight .ow { color: #aa22ff; } /* Operator.Word */ + +.highlight .m { color: #cf6a4c; } /* Literal.Number */ +.highlight .mb { color: #cf6a4c; } /* Literal.Number.Bin */ +.highlight .mf { color: #cf6a4c; } /* Literal.Number.Float */ +.highlight .mh { color: #cf6a4c; } /* Literal.Number.Hex */ +.highlight .mi { color: #cf6a4c; } /* Literal.Number.Integer */ +.highlight .mo { color: #cf6a4c; } /* Literal.Number.Oct */ +.highlight .mx { color: #cf6a4c; } +.highlight .il { color: #cf6a4c; } /* Literal.Number.Integer.Long */ + +.highlight .s { color: #8f9d6a; } /* Literal.String */ +.highlight .sb { color: #8f9d6a; } /* Literal.String.Backtick */ +.highlight .sc { color: #8f9d6a; } /* Literal.String.Char */ +.highlight .sd { color: #8f9d6a; } /* Literal.String.Doc */ +.highlight .s2 { color: #8f9d6a; } /* Literal.String.Double */ +.highlight .se { color: #8f9d6a; } /* Literal.String.Escape */ +.highlight .sh { color: #8f9d6a; } /* Literal.String.Heredoc */ +.highlight .si { color: #8f9d6a; } /* Literal.String.Interpol */ +.highlight .sx { color: #8f9d6a; } /* Literal.String.Other */ +.highlight .sr { color: #e9c062; } /* Literal.String.Regex */ +.highlight .s1 { color: #8f9d6a; } /* Literal.String.Single */ +.highlight .ss { color: #daefa3; } /* Literal.String.Symbol */ + +.highlight .vc { color: #7587a6; } /* Name.Variable.Class */ +.highlight .vg { color: #7587a6; } /* Name.Variable.Global */ +.highlight .vi { color: #7587a6; } /* Name.Variable.Instance */ +.highlight .na { color: #f9ee98; } /* Name.Attribute */ +.highlight .nb { color: #cda869; } /* Name.Builtin */ +.highlight .nc { color: #9b859d; } /* Name.Class */ +.highlight .no { color: #9b859d; } /* Name.Constant */ +.highlight .nd { color: #7587a6; } /* Name.Decorator */ +.highlight .ni { color: #cf6a4c; } /* Name.Entity */ +.highlight .ne { color: #9b703f; } /* Name.Exception */ +.highlight .nf { color: #9b703f; } /* Name.Function */ +.highlight .nl { color: #9b703f; } /* Name.Label */ +.highlight .nn { color: #9b859d; } /* Name.Namespace */ +.highlight .nt { color: #cda869; } /* Name.Tag */ +.highlight .nv { color: #7587a6; } /* Name.Variable */ +.highlight .bp { color: #00aaaa; } /* Name.Builtin.Pseudo */ + +} diff --git a/docs/battle_anim_commands.md b/docs/battle_anim_commands.md new file mode 100644 index 0000000..7cac1a4 --- /dev/null +++ b/docs/battle_anim_commands.md @@ -0,0 +1,261 @@ +# Battle Animation Commands + +Defined in [macros/scripts/battle_anims.asm](https://github.com/pret/pokecrystal/blob/master/macros/scripts/battle_anims.asm) and [engine/battle_anims/anim_commands.asm:BattleAnimCommands](https://github.com/pret/pokecrystal/blob/master/engine/battle_anims/anim_commands.asm). + + +## `$00`−`$CF`: anim_wait length + +- *length*: duration in frames + + +## `$D0`: anim_obj object, x, y, param + +***Alternate*: anim_obj object, x_tile, x, y_tile, y, param** + +Spawns an *object* at coordinate (*x*, *y*). + +- *object*: `ANIM_OBJ` constants (see [constants/battle_anim_constants.asm](https://github.com/pret/pokecrystal/blob/master/constants/battle_anim_constants.asm)) +- *x*: the x position in pixels +- *y*: the y position in pixels +- *x_tile*: an added x position in tiles (8 pixels) +- *y_tile*: an added y position in tiles (8 pixels) +- *param*: modifies the behavior of *object*. The meaning differs for each object. + +The y position also depends on the y offset defined by the object. + +- *TODO: what happens for x/y values greater than 160/144 respectively? Is it 1:1 with screen coordinates?* +- *TODO: how are the x/y values mirrored when the opponent is attacking?* +- *TODO: useful positions* +- *TODO: document each object* + + +## `$D1`: anim_1gfx gfx + + +## `$D2`: anim_2gfx gfx1, gfx2 + + +## `$D3`: anim_3gfx gfx1, gfx2, gfx3 + + +## `$D4`: anim_4gfx gfx1, gfx2, gfx3, gfx4 + + +## `$D5`: anim_5gfx gfx1, gfx2, gfx3, gfx4, gfx5 + +Loads 1-5 sets of graphics. Will overwrite any previously loaded sets. + +- *gfx*: `ANIM_GFX` constants (see [constants/battle_anim_constants.asm](https://github.com/pret/pokecrystal/blob/master/constants/battle_anim_constants.asm)) + +Caveats: +- These will override any currently-loaded GFX. + + +## `$D6`: anim_incobj object_id + +Increments an object's state. + +- *object_id*: the nth object in order of creation + +Objects are state machines. `anim_incobj` progresses the state of an object. + + +## `$D7`: anim_setobj object_id, state + +Sets an object's state to a specific value. + +- *object_id*: the nth object in order of creation +- *state*: the state index + +Objects are state machines. `anim_setobj` changes the state of an object. + + +## `$D8`: anim_incbgeffect bg_effect + +Increments a bg effect's state. + +- *bg_effect*: `ANIM_BG` constants (see [constants/battle_anim_constants.asm](https://github.com/pret/pokecrystal/blob/master/constants/battle_anim_constants.asm)) + +Since there can't be two of the same bg effect, the effect type is used. This is distinct from `anim_incobj`. + + +## `$D9`: `anim_battlergfx_2row` + + +## `$DA`: `anim_battlergfx_1row` + +Loads animation graphics for the bottom one or two rows of the enemy pokemon and the top one or two rows of the player's. +These graphics are identified through `ANIM_GFX_ENEMYFEET` and `ANIM_GFX_PLAYERHEAD`. + +Caveats: +- Doesn't work with `anim_4gfx` and `anim_5gfx`. +- This overwrites previously loaded animation graphics if you've loaded more than 53 tiles (2row) or 66 tiles (1row). + + +## `$DB`: `anim_checkpokeball` + +Sets `BattleAnimVar` to the result of [GetPokeBallWobble](https://github.com/pret/pokecrystal/blob/master/engine/battle_anims/pokeball_wobble.asm). + + +## `$DC`: `anim_transform` + + +## `$DD`: `anim_raisesub` + + +## `$DE`: `anim_dropsub` + + +## `$DF`: `anim_resetobp0` + +Resets rOBP0 to the default (`q0123` or `%00011011`). + + +## `$E0`: anim_sound duration, tracks, sound_id + +Plays a sound. + + +## `$E1`: anim_cry pitch + +Plays the user's cry. + + +## `$E2`: `anim_minimizeopp` + + +## `$E3`: `anim_oamon` + + +## `$E4`: `anim_oamoff` + + +## `$E5`: `anim_clearobjs` + +Removes all active objects. + + +## `$E6`: `anim_beatup` + + +## `$E7`: `anim_0xe7` + +Does nothing. Unused. + + +## `$E8`: `anim_updateactorpic` + + +## `$E9`: `anim_minimize` + + +## `$EA`: `anim_0xea` + +Does nothing. Unused. + + +## `$EB`: `anim_0xeb` + +Does nothing. Unused. + + +## `$EC`: `anim_0xec` + +Does nothing. Unused. + + +## `$ED`: `anim_0xed` + +Does nothing. Unused. + + +## `$EE`: anim_if_param_and value, address + + +## `$EF`: anim_jumpuntil address + +Jumps to another script and decrements `param` until it reaches 0. Similar to `anim_loop`. + + +## `$F0`: anim_bgeffect bg_effect, unknown1, unknown2, unknown3 + +- *bg_effect*: `ANIM_BG` constants (see [constants/battle_anim_constants.asm](https://github.com/pret/pokecrystal/blob/master/constants/battle_anim_constants.asm)) + + +## `$F1`: anim_bgp colors + +Sets `rBGP` to *colors*. + + +## `$F2`: anim_obp0 colors + +Sets `rOBP0` to *colors*. + + +## `$F3`: anim_obp1 colors + +Sets `rOBP1` to *colors*. + + +## `$F4`: `anim_keepsprites` + +Causes only the palettes to be cleared from the OAM memory when the animation ends, instead of clearing all of the OAM memory. This causes all objects to start using palette 0 (monochrome) when the animation script ends, and whatever objects were on the screen before the last `anim_ret` will stay on the screen. + +This is only used for the Poke Ball animation. + + +## `$F5`: `anim_0xf5` + +Does nothing. Unused. + + +## `$F6`: `anim_0xf6` + +Does nothing. Unused. + + +## `$F7`: `anim_0xf7` + +Does nothing. Unused. + + +## `$F8`: anim_if_param_equal value, address + +Jumps to another script if `wBattleAnimParam` is equal to *value*. + + +## `$F9`: anim_setvar value + +Sets `BattleAnimVar` to *value*. + + +## `$FA`: `anim_incvar` + +Increments `BattleAnimVar` by 1. + + +## `$FB`: anim_if_var_equal value, address + +Jumps to another script if `BattleAnimVar` is equal to *value*. + + +## `$FC`: anim_jump address + +Jumps to another script. + + +## `$FD`: anim_loop count, address + +Jumps to another script up to *count* times. Then does nothing, allowing execution to continue. + + +## `$FE`: anim_call address + +Calls a script. + +There is no call stack. The return address is overwritten, so the maximum call depth is 1. + + +## `$FF`: `anim_ret` + +Ends the script and returns to where it was called from. If there was no caller, the animation ends. diff --git a/docs/bugs_and_glitches.md b/docs/bugs_and_glitches.md new file mode 100644 index 0000000..6ccc1ff --- /dev/null +++ b/docs/bugs_and_glitches.md @@ -0,0 +1,2700 @@ +# Bugs and Glitches + +These are known bugs and glitches in the original Pokémon Crystal game: code that clearly does not work as intended, or that only works in limited circumstances but has the possibility to fail or crash. + +Fixes are written in the `diff` format. If you've used Git before, this should look familiar: + +```diff + this is some code +-delete red - lines ++add green + lines +``` + +Fixes in the [multi-player battle engine](#multi-player-battle-engine) category will break compatibility with standard Pokémon Gold/Silver/Crystal for link battles, unless otherwise noted. This can be avoided by writing more complicated fixes that only apply if the value at `[wLinkMode]` is not `LINK_COLOSSEUM`. That's how Crystal itself fixed two bugs in Gold and Silver regarding the moves [Reflect and Light Screen](#reflect-and-light-screen-can-make-special-defense-wrap-around-above-1024) and [Present](#present-damage-is-incorrect-in-link-battles). + + +## Contents + +- [Multi-player battle engine](#multi-player-battle-engine) + - [Perish Song and Spikes can leave a Pokémon with 0 HP and not faint](#perish-song-and-spikes-can-leave-a-pok%C3%A9mon-with-0-hp-and-not-faint) + - [Thick Club and Light Ball can make (Special) Attack wrap around above 1024](#thick-club-and-light-ball-can-make-special-attack-wrap-around-above-1024) + - [Metal Powder can increase damage taken with boosted (Special) Defense](#metal-powder-can-increase-damage-taken-with-boosted-special-defense) + - [Reflect and Light Screen can make (Special) Defense wrap around above 1024](#reflect-and-light-screen-can-make-special-defense-wrap-around-above-1024) + - [Moves with a 100% secondary effect chance will not trigger it in 1/256 uses](#moves-with-a-100-secondary-effect-chance-will-not-trigger-it-in-1256-uses) + - [Belly Drum sharply boosts Attack even with under 50% HP](#belly-drum-sharply-boosts-attack-even-with-under-50-hp) + - [Berserk Gene's confusion lasts for 256 turns or the previous Pokémon's confusion count](#berserk-genes-confusion-lasts-for-256-turns-or-the-previous-pok%C3%A9mons-confusion-count) + - [Confusion damage is affected by type-boosting items and Explosion/Self-Destruct doubling](#confusion-damage-is-affected-by-type-boosting-items-and-explosionself-destruct-doubling) + - [Moves that lower Defense can do so after breaking a Substitute](#moves-that-lower-defense-can-do-so-after-breaking-a-substitute) + - [Counter and Mirror Coat still work if the opponent uses an item](#counter-and-mirror-coat-still-work-if-the-opponent-uses-an-item) + - [A Disabled but PP Up–enhanced move may not trigger Struggle](#a-disabled-but-pp-upenhanced-move-may-not-trigger-struggle) + - [A Pokémon that fainted from Pursuit will have its old status condition when revived](#a-pok%C3%A9mon-that-fainted-from-pursuit-will-have-its-old-status-condition-when-revived) + - [Lock-On and Mind Reader don't always bypass Fly and Dig](#lock-on-and-mind-reader-dont-always-bypass-fly-and-dig) + - [Beat Up can desynchronize link battles](#beat-up-can-desynchronize-link-battles) + - [Beat Up works incorrectly with only one Pokémon in the party](#beat-up-works-incorrectly-with-only-one-pok%C3%A9mon-in-the-party) + - [Beat Up may fail to raise Substitute](#beat-up-may-fail-to-raise-substitute) + - [Beat Up may trigger King's Rock even if it failed](#beat-up-may-trigger-kings-rock-even-if-it-failed) + - [Present damage is incorrect in link battles](#present-damage-is-incorrect-in-link-battles) + - [Return and Frustration deal no damage when the user's happiness is low or high, respectively](#return-and-frustration-deal-no-damage-when-the-users-happiness-is-low-or-high-respectively) + - [Dragon Scale, not Dragon Fang, boosts Dragon-type moves](#dragon-scale-not-dragon-fang-boosts-dragon-type-moves) + - [Switching out or switching against a Pokémon with max HP below 4 freezes the game](#switching-out-or-switching-against-a-pok%C3%A9mon-with-max-HP-below-4-freezes-the-game) + - [Moves that do damage and increase your stats do not increase stats after a KO](#moves-that-do-damage-and-increase-your-stats-do-not-increase-stats-after-a-ko) + - [HP bar animation is slow for high HP](#hp-bar-animation-is-slow-for-high-hp) + - [HP bar animation off-by-one error for low HP](#hp-bar-animation-off-by-one-error-for-low-hp) +- [Single-player battle engine](#single-player-battle-engine) + - [A Transformed Pokémon can use Sketch and learn otherwise unobtainable moves](#a-transformed-pok%C3%A9mon-can-use-sketch-and-learn-otherwise-unobtainable-moves) + - [Catching a Transformed Pokémon always catches a Ditto](#catching-a-transformed-pok%C3%A9mon-always-catches-a-ditto) + - [Experience underflow for level 1 Pokémon with Medium-Slow growth rate](#experience-underflow-for-level-1-pok%C3%A9mon-with-medium-slow-growth-rate) + - [The Dude's catching tutorial may crash if his Poké Ball can't be used](#the-dudes-catching-tutorial-may-crash-if-his-pok%C3%A9-ball-cant-be-used) + - [BRN/PSN/PAR do not affect catch rate](#brnpsnpar-do-not-affect-catch-rate) + - [Moon Ball does not boost catch rate](#moon-ball-does-not-boost-catch-rate) + - [Love Ball boosts catch rate for the wrong gender](#love-ball-boosts-catch-rate-for-the-wrong-gender) + - [Fast Ball only boosts catch rate for three Pokémon](#fast-ball-only-boosts-catch-rate-for-three-pok%C3%A9mon) + - [Heavy Ball uses wrong weight value for three Pokémon](#heavy-ball-uses-wrong-weight-value-for-three-pok%C3%A9mon) + - [PRZ and BRN stat reductions don't apply to switched Pokémon](#prz-and-brn-stat-reductions-dont-apply-to-switched-pok%C3%A9mon) + - [Glacier Badge may not boost Special Defense depending on the value of Special Attack](#glacier-badge-may-not-boost-special-defense-depending-on-the-value-of-special-attack) + - ["Smart" AI encourages Mean Look if its own Pokémon is badly poisoned](#smart-ai-encourages-mean-look-if-its-own-pok%C3%A9mon-is-badly-poisoned) + - ["Smart" AI discourages Conversion2 after the first turn](#smart-ai-discourages-conversion2-after-the-first-turn) + - ["Smart" AI does not encourage Solar Beam, Flame Wheel, or Moonlight during Sunny Day](#smart-ai-does-not-encourage-solar-beam-flame-wheel-or-moonlight-during-sunny-day) + - [AI does not discourage Future Sight when it's already been used](#ai-does-not-discourage-future-sight-when-its-already-been-used) + - [AI makes a false assumption about `CheckTypeMatchup`](#ai-makes-a-false-assumption-about-checktypematchup) + - [AI use of Full Heal or Full Restore does not cure Nightmare status](#ai-use-of-full-heal-or-full-restore-does-not-cure-nightmare-status) + - [AI use of Full Heal does not cure confusion status](#ai-use-of-full-heal-does-not-cure-confusion-status) + - [Wild Pokémon can always Teleport regardless of level difference](#wild-pok%C3%A9mon-can-always-teleport-regardless-of-level-difference) + - [`RIVAL2` has lower DVs than `RIVAL1`](#rival2-has-lower-dvs-than-rival1) + - [`HELD_CATCH_CHANCE` has no effect](#held_catch_chance-has-no-effect) + - [Credits sequence changes move selection menu behavior](#credits-sequence-changes-move-selection-menu-behavior) +- [Game engine](#game-engine) + - [`LoadMetatiles` wraps around past 128 blocks](#loadmetatiles-wraps-around-past-128-blocks) + - [Surfing directly across a map connection does not load the new map](#surfing-directly-across-a-map-connection-does-not-load-the-new-map) + - [Swimming NPCs aren't limited by their movement radius](#swimming-npcs-arent-limited-by-their-movement-radius) + - [You can fish on top of NPCs](#you-can-fish-on-top-of-npcs) + - [Pokémon deposited in the Day-Care might lose experience](#pok%C3%A9mon-deposited-in-the-day-care-might-lose-experience) +- [Graphics](#graphics) + - [In-battle “`…`” ellipsis is too high](#in-battle--ellipsis-is-too-high) + - [Two tiles in the `port` tileset are drawn incorrectly](#two-tiles-in-the-port-tileset-are-drawn-incorrectly) + - [The Ruins of Alph research center's roof color at night looks wrong](#the-ruins-of-alph-research-centers-roof-color-at-night-looks-wrong) + - [A hatching Unown egg would not show the right letter](#a-hatching-unown-egg-would-not-show-the-right-letter) + - [Using a Park Ball in non-Contest battles has a corrupt animation](#using-a-park-ball-in-non-contest-battles-has-a-corrupt-animation) + - [Battle transitions fail to account for the enemy's level](#battle-transitions-fail-to-account-for-the-enemys-level) + - [Some trainer NPCs have inconsistent overworld sprites](#some-trainer-npcs-have-inconsistent-overworld-sprites) +- [Audio](#audio) + - [Slot machine payout sound effects cut each other off](#slot-machine-payout-sound-effects-cut-each-other-off) + - [Team Rocket battle music is not used for Executives or Scientists](#team-rocket-battle-music-is-not-used-for-executives-or-scientists) + - [No bump noise if standing on tile `$3E`](#no-bump-noise-if-standing-on-tile-3e) + - [Playing Entei's Pokédex cry can distort Raikou's and Suicune's](#playing-enteis-pok%C3%A9dex-cry-can-distort-raikous-and-suicunes) +- [Text](#text) + - [Five-digit experience gain is printed incorrectly](#five-digit-experience-gain-is-printed-incorrectly) + - [Only the first three evolution entries can have Stone compatibility reported correctly](#only-the-first-three-evolution-entries-can-have-stone-compatibility-reported-correctly) + - [`EVOLVE_STAT` can break Stone compatibility reporting](#evolve_stat-can-break-stone-compatibility-reporting) + - [A "HOF Master!" title for 200-Time Famers is defined but inaccessible](#a-hof-master-title-for-200-time-famers-is-defined-but-inaccessible) +- [Scripted events](#scripted-events) + - [Clair can give TM24 Dragonbreath twice](#clair-can-give-tm24-dragonbreath-twice) + - [Daisy's grooming doesn't always increase happiness](#daisys-grooming-doesnt-always-increase-happiness) + - [Magikarp in Lake of Rage are shorter, not longer](#magikarp-in-lake-of-rage-are-shorter-not-longer) + - [Magikarp length limits have a unit conversion error](#magikarp-length-limits-have-a-unit-conversion-error) + - [Magikarp lengths can be miscalculated](#magikarp-lengths-can-be-miscalculated) + - [`CheckOwnMon` only checks the first five letters of OT names](#checkownmon-only-checks-the-first-five-letters-of-ot-names) + - [`CheckOwnMonAnywhere` does not check the Day-Care](#checkownmonanywhere-does-not-check-the-day-care) + - [The unused `phonecall` script command may crash](#the-unused-phonecall-script-command-may-crash) +- [Internal engine routines](#internal-engine-routines) + - [Saves corrupted by mid-save shutoff are not handled](#saves-corrupted-by-mid-save-shutoff-are-not-handled) + - [`ScriptCall` can overflow `wScriptStack` and crash](#scriptcall-can-overflow-wscriptstack-and-crash) + - [`LoadSpriteGFX` does not limit the capacity of `UsedSprites`](#loadspritegfx-does-not-limit-the-capacity-of-usedsprites) + - [`ChooseWildEncounter` doesn't really validate the wild Pokémon species](#choosewildencounter-doesnt-really-validate-the-wild-pok%C3%A9mon-species) + - [`TryObjectEvent` arbitrary code execution](#tryobjectevent-arbitrary-code-execution) + - [`ReadObjectEvents` overflows into `wObjectMasks`](#readobjectevents-overflows-into-wobjectmasks) + - [`ClearWRAM` only clears WRAM bank 1](#clearwram-only-clears-wram-bank-1) + - [`BattleAnimCmd_ClearObjs` only clears the first 6⅔ objects](#battleanimcmd_clearobjs-only-clears-the-first-6-objects) + - [Options menu fails to clear joypad state on initialization](#options-menu-fails-to-clear-joypad-state-on-initialization) + + +## Multi-player battle engine + + +### Perish Song and Spikes can leave a Pokémon with 0 HP and not faint + +([Video](https://www.youtube.com/watch?v=1IiPWw5fMf8&t=85)) + +**Fix:** Edit `CheckFaint_PlayerThenEnemy` and `CheckFaint_EnemyThenPlayer` in [engine/battle/core.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm): + +```diff + jp HandleEncore + ++HasAnyoneFainted: ++ call HasPlayerFainted ++ jp nz, HasEnemyFainted ++ ret ++ + CheckFaint_PlayerThenEnemy: +-; BUG: Perish Song and Spikes can leave a Pokemon with 0 HP and not faint (see docs/bugs_and_glitches.md) ++.faint_loop ++ call .Function ++ ret c ++ call HasAnyoneFainted ++ ret nz ++ jr .faint_loop ++ ++.Function: + call HasPlayerFainted + jr nz, .PlayerNotFainted + call HandlePlayerMonFaint + ... +``` + +```diff + CheckFaint_EnemyThenPlayer: +-; BUG: Perish Song and Spikes can leave a Pokemon with 0 HP and not faint (see docs/bugs_and_glitches.md) ++.faint_loop ++ call .Function ++ ret c ++ call HasAnyoneFainted ++ ret nz ++ jr .faint_loop ++ ++.Function: + call HasEnemyFainted + jr nz, .EnemyNotFainted + call HandleEnemyMonFaint + ... +``` + + +### Thick Club and Light Ball can make (Special) Attack wrap around above 1024 + +([Video](https://www.youtube.com/watch?v=rGqu3d3pdok&t=450)) + +**Fix:** Edit `SpeciesItemBoost` in [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm): + +```diff + ; Double the stat +-; BUG: Thick Club and Light Ball can make (Special) Attack wrap around above 1024 (see docs/bugs_and_glitches.md) + sla l + rl h ++ ++ ld a, HIGH(MAX_STAT_VALUE) ++ cp h ++ jr c, .cap ++ ret nz ++ ld a, LOW(MAX_STAT_VALUE) ++ cp l ++ ret nc ++ ++.cap ++ ld hl, MAX_STAT_VALUE + ret +``` + + +### Metal Powder can increase damage taken with boosted (Special) Defense + +([Video](https://www.youtube.com/watch?v=rGqu3d3pdok&t=450)) + +**Fix:** Edit [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm): + +```diff + DittoMetalPowder: + ... + +-; BUG: Metal Powder can increase damage taken with boosted (Special) Defense (see docs/bugs_and_glitches.md) +- ld a, c +- srl a +- add c +- ld c, a +- ret nc +- +- srl b +- ld a, b +- and a +- jr nz, .done +- inc b +-.done +- scf +- rr c ++ ld h, b ++ ld l, c ++ srl b ++ rr c ++ add hl, bc ++ ld b, h ++ ld c, l ++ ++ ld a, HIGH(MAX_STAT_VALUE) ++ cp b ++ jr c, .cap ++ ret nz ++ ld a, LOW(MAX_STAT_VALUE) ++ cp c ++ ret nc ++ ++.cap ++ ld bc, MAX_STAT_VALUE + ret +``` + +```diff + PlayerAttackDamage: + ... + + .done ++ push hl ++ call DittoMetalPowder ++ pop hl + + call TruncateHL_BC + + ld a, [wBattleMonLevel] + ld e, a +- call DittoMetalPowder + + ld a, 1 + and a + ret +``` + +```diff + EnemyAttackDamage: + ... + + .done ++ push hl ++ call DittoMetalPowder ++ pop hl + + call TruncateHL_BC + + ld a, [wBattleMonLevel] + ld e, a +- call DittoMetalPowder + + ld a, 1 + and a + ret +``` + + +### Reflect and Light Screen can make (Special) Defense wrap around above 1024 + +This bug existed for all battles in Gold and Silver, and was only fixed for single-player battles in Crystal to preserve link compatibility. + +**Fix:** Edit `TruncateHL_BC` in [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm): + +```diff + .finish +-; BUG: Reflect and Light Screen can make (Special) Defense wrap around above 1024 (see docs/bugs_and_glitches.md) +- ld a, [wLinkMode] +- cp LINK_COLOSSEUM +- jr z, .done + ; If we go back to the loop point, + ; it's the same as doing this exact + ; same check twice. + ld a, h + or b + jr nz, .loop + +-.done + ld b, l + ret +``` + +(This fix also affects Thick Club, Light Ball, and Metal Powder, as described above, but their specific fixes in the above bugs allow more accurate damage calculations.) + + +### Moves with a 100% secondary effect chance will not trigger it in 1/256 uses + +([Video](https://www.youtube.com/watch?v=mHkyO5T5wZU&t=206)) + +**Fix:** Edit `BattleCommand_EffectChance` in [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm): + +```diff + .got_move_chance +-; BUG: Moves with a 100% secondary effect chance will not trigger it in 1/256 uses (see docs/bugs_and_glitches.md) +- call BattleRandom ++ ld a, [hl] ++ sub 100 percent ++ ; If chance was 100%, RNG won't be called (carry not set) ++ ; Thus chance will be subtracted from 0, guaranteeing a carry ++ call c, BattleRandom + cp [hl] + pop hl + ret c + + .failed + ld a, 1 + ld [wEffectFailed], a + and a + ret +``` + +**Compatibility preservation:** If you wish to keep compatibility with standard Pokémon Crystal, you can disable the fix during link battles by also applying the following edit in the same place: + +```diff ++ ld a, [wLinkMode] ++ cp LINK_COLOSSEUM ++ scf ; Force RNG to be called ++ jr z, .nofix ; Don't apply fix in link battles, for compatibility + ld a, [hl] + sub 100 percent + ; If chance was 100%, RNG won't be called (carry not set) + ; Thus chance will be subtracted from 0, guaranteeing a carry ++.nofix + call c, BattleRandom +``` + +### Belly Drum sharply boosts Attack even with under 50% HP + +([Video](https://www.youtube.com/watch?v=zuCLMikWo4Y)) + +**Fix:** Edit `BattleCommand_BellyDrum` in [engine/battle/move_effects/belly_drum.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/move_effects/belly_drum.asm): + +```diff + BattleCommand_BellyDrum: +-; BUG: Belly Drum sharply boosts Attack even with under 50% HP (see docs/bugs_and_glitches.md) +- call BattleCommand_AttackUp2 +- ld a, [wAttackMissed] +- and a +- jr nz, .failed +- + callfar GetHalfMaxHP + callfar CheckUserHasEnoughHP + jr nc, .failed ++ ++ push bc ++ call BattleCommand_AttackUp2 ++ pop bc ++ ld a, [wAttackMissed] ++ and a ++ jr nz, .failed +``` + + +### Berserk Gene's confusion lasts for 256 turns or the previous Pokémon's confusion count + +([Video](https://youtube.com/watch?v=Pru3mohq20A)) + +**Fix:** Edit `HandleBerserkGene` in [engine/battle/core.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm): + +```diff + HandleBerserkGene: + ... +-; BUG: Berserk Gene's confusion lasts for 256 turns or the previous Pokémon's confusion count (see docs/bugs_and_glitches.md) + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + push af + set SUBSTATUS_CONFUSED, [hl] ++ ldh a, [hBattleTurn] ++ and a ++ ld hl, wPlayerConfuseCount ++ jr z, .set_confuse_count ++ ld hl, wEnemyConfuseCount ++.set_confuse_count ++ call BattleRandom ++ and %11 ++ add 2 ++ ld [hl], a + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVarAddr + ... +``` + +This makes the Berserk Gene use the regular confusion duration (2–5 turns). + + +### Confusion damage is affected by type-boosting items and Explosion/Self-Destruct doubling + +([Video](https://twitter.com/crystal_rby/status/874626362287562752)) + +**Fix:** + +First, edit [wram.asm](https://github.com/pret/pokecrystal/blob/master/wram.asm): + +```diff + wTurnEnded:: db + +- ds 1 ++wIsConfusionDamage:: db + + wPlayerStats:: +``` + +Then edit four routines in [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm): + +```diff + HitSelfInConfusion: + ... + call TruncateHL_BC + ld d, 40 + pop af + ld e, a ++ ld a, TRUE ++ ld [wIsConfusionDamage], a + ret +``` + +```diff + BattleCommand_DamageCalc: + ; Return a damage value for move power d, player level e, enemy defense c and player attack b. +-; BUG: Confusion damage is affected by type-boosting items and Explosion/Self-Destruct doubling (see docs/bugs_and_glitches.md) + ... + .skip_zero_damage_check ++ xor a ; Not confusion damage ++ ld [wIsConfusionDamage], a ++ ; fallthrough ++ ++ConfusionDamageCalc: + ; Minimum defense value is 1. + ld a, c + and a + jr nz, .not_dividing_by_zero + ld c, 1 + .not_dividing_by_zero + + ... + + ; Item boosts ++ ++; Item boosts don't apply to confusion damage ++ ld a, [wIsConfusionDamage] ++ and a ++ jr nz, .DoneItem ++ + call GetUserItem + + ... +``` + +```diff + CheckEnemyTurn: + ... + + ld hl, HurtItselfText + call StdBattleTextbox + + call HitSelfInConfusion +- call BattleCommand_DamageCalc ++ call ConfusionDamageCalc + call BattleCommand_LowerSub + + ... +``` + +```diff + HitConfusion: + ld hl, HurtItselfText + call StdBattleTextbox + + xor a + ld [wCriticalHit], a + + call HitSelfInConfusion +- call BattleCommand_DamageCalc ++ call ConfusionDamageCalc + call BattleCommand_LowerSub +``` + + +### Moves that lower Defense can do so after breaking a Substitute + +([Video](https://www.youtube.com/watch?v=OGwKPRJLaaI)) + +This bug affects Acid, Iron Tail, and Rock Smash. + +**Fix:** Edit `DefenseDownHit` in [data/moves/effects.asm](https://github.com/pret/pokecrystal/blob/master/data/moves/effects.asm): + +```diff + DefenseDownHit: + checkobedience + usedmovetext + doturn + critical + damagestats + damagecalc + stab + damagevariation + checkhit + effectchance + hittarget + failuretext + checkfaint + criticaltext + supereffectivetext + checkfaint + buildopponentrage +-; BUG: Moves that lower Defense can do so after breaking a Substitute (see docs/bugs_and_glitches.md) +- effectchance + defensedown + statdownmessage + endmove +``` + + +### Counter and Mirror Coat still work if the opponent uses an item + +([Video](https://www.youtube.com/watch?v=uRYyzKRatFk)) + +**Fix:** Edit `BattleCommand_Counter` in [engine/battle/move_effects/counter.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/move_effects/counter.asm) and `BattleCommand_MirrorCoat` in [engine/battle/move_effects/mirror_coat.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/move_effects/mirror_coat.asm): + +```diff +-; BUG: Counter and Mirror Coat still work if the opponent uses an item (see docs/bugs_and_glitches.md) + ld hl, wCurDamage + ld a, [hli] + or [hl] +- ret z ++ jr z, .failed +``` + +Add this to the end of each file: + +```diff ++.failed ++ ld a, 1 ++ ld [wEffectFailed], a ++ and a ++ ret +``` + + +### A Disabled but PP Up–enhanced move may not trigger Struggle + +([Video](https://www.youtube.com/watch?v=1v9x4SgMggs)) + +**Fix:** Edit `CheckPlayerHasUsableMoves` in [engine/battle/core.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm): + +```diff + .done +-; BUG: A Disabled but PP Up–enhanced move may not trigger Struggle (see docs/bugs_and_glitches.md) +- and a ++ and PP_MASK + ret nz + + .force_struggle + ld hl, BattleText_MonHasNoMovesLeft + call StdBattleTextbox + ld c, 60 + call DelayFrames + xor a + ret +``` + + +### A Pokémon that fainted from Pursuit will have its old status condition when revived + +([Video](https://www.youtube.com/watch?v=tiRvw-Nb2ME)) + +**Fix:** Edit `PursuitSwitch` in [engine/battle/core.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm): + +```diff +-; BUG: A Pokémon that fainted from Pursuit will have its old status condition when revived (see docs/bugs_and_glitches.md) + ld a, $f0 + ld [wCryTracks], a + ld a, [wBattleMonSpecies] + call PlayStereoCry ++ ld a, [wCurBattleMon] ++ push af + ld a, [wLastPlayerMon] ++ ld [wCurBattleMon], a ++ call UpdateFaintedPlayerMon ++ pop af ++ ld [wCurBattleMon], a +- ld c, a +- ld hl, wBattleParticipantsNotFainted +- ld b, RESET_FLAG +- predef SmallFarFlagAction + call PlayerMonFaintedAnimation + ld hl, BattleText_MonFainted + jr .done_fainted +``` + + +### Lock-On and Mind Reader don't always bypass Fly and Dig + +This bug affects Attract, Curse, Foresight, Mean Look, Mimic, Nightmare, Spider Web, Transform, and stat-lowering effects of moves like String Shot or Bubble during the semi-invulnerable turn of Fly or Dig. + +**Fix:** Edit `CheckHiddenOpponent` in [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm): + +```diff + CheckHiddenOpponent: +-; BUG: Lock-On and Mind Reader don't always bypass Fly and Dig (see docs/bugs_and_glitches.md) ++ ld a, BATTLE_VARS_SUBSTATUS5_OPP ++ call GetBattleVar ++ cpl ++ and 1 << SUBSTATUS_LOCK_ON ++ ret z ++ + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVar + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + ret +``` + + +### Beat Up can desynchronize link battles + +([Video](https://www.youtube.com/watch?v=202-iAsrIa8)) + +**Fix:** Edit `BattleCommand_BeatUp` in [engine/battle/move_effects/beat_up.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/move_effects/beat_up.asm): + +```diff + .got_mon +-; BUG: Beat Up can desynchronize link battles (see docs/bugs_and_glitches.md) + ld a, [wCurBeatUpPartyMon] + ld hl, wPartyMonNicknames + call GetNickname + ld a, MON_HP + call GetBeatupMonLocation + ld a, [hli] + or [hl] + jp z, .beatup_fail ; fainted + ld a, [wCurBeatUpPartyMon] + ld c, a + ld a, [wCurBattleMon] +- cp [hl] ++ cp c + ld hl, wBattleMonStatus + jr z, .active_mon + ld a, MON_STATUS + call GetBeatupMonLocation + .active_mon + ld a, [hl] + and a + jp nz, .beatup_fail +``` + + +### Beat Up works incorrectly with only one Pokémon in the party + +This bug prevents the rest of Beat Up's effect from being executed if the player or enemy only has one Pokémon in their party while using it. It prevents Substitute from being raised and King's Rock from working. + +**Fix:** Edit `BattleCommand_EndLoop` in [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm): + +```diff + .only_one_beatup +-; BUG: Beat Up works incorrectly with only one Pokémon in the party (see docs/bugs_and_glitches.md) + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + res SUBSTATUS_IN_LOOP, [hl] +- call BattleCommand_BeatUpFailText +- jp EndMoveEffect ++ ret +``` + +**Cosmetic fix:** This fix does not break compatibility, but it only affects what's shown on the screen for the patched game. + +```diff + .only_one_beatup + ; BUG: Beat Up works incorrectly with only one Pokemon in the party (see docs/bugs_and_glitches.md) + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + res SUBSTATUS_IN_LOOP, [hl] + call BattleCommand_BeatUpFailText ++ call BattleCommand_RaiseSub + jp EndMoveEffect +``` + + +### Beat Up may fail to raise Substitute + +*Fixing this cosmetic bug will* **not** *break link battle compatibility.* + +This bug prevents Substitute from being raised if Beat Up was blocked by Protect or Detect. + +**Fix:** Edit `BattleCommand_FailureText` in [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm). + +```diff +-; BUG: Beat Up may fail to raise Substitute (see docs/bugs_and_glitches.md) + cp EFFECT_MULTI_HIT + jr z, .multihit + cp EFFECT_DOUBLE_HIT + jr z, .multihit + cp EFFECT_POISON_MULTI_HIT + jr z, .multihit ++ cp EFFECT_BEAT_UP ++ jr z, .multihit + jp EndMoveEffect + + .multihit + call BattleCommand_RaiseSub + jp EndMoveEffect +``` + + +### Beat Up may trigger King's Rock even if it failed + +**Fix:** Edit `BattleCommand_BeatUpFailText` in [engine/battle/move_effects/beat_up.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/move_effects/beat_up.asm): + +```diff + BattleCommand_BeatUpFailText: +-; BUG: Beat Up may trigger King's Rock even if it failed (see docs/bugs_and_glitches.md) + ld a, [wBeatUpHitAtLeastOnce] + and a + ret nz ++ ++ inc a ++ ld [wAttackMissed], a + + jp PrintButItFailed +``` + + +### Present damage is incorrect in link battles + +([Video](https://www.youtube.com/watch?v=XJaQoKtrEuw)) + +This bug existed for all battles in Gold and Silver, and was only fixed for single-player battles in Crystal to preserve link compatibility. + +**Fix:** Edit `BattleCommand_Present` in [engine/battle/move_effects/present.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/move_effects/present.asm): + +```diff + BattleCommand_Present: +-; BUG: Present damage is incorrect in link battles (see docs/bugs_and_glitches.md) +- ld a, [wLinkMode] +- cp LINK_COLOSSEUM +- jr z, .colosseum_skippush + push bc + push de +-.colosseum_skippush +- + call BattleCommand_Stab +- +- ld a, [wLinkMode] +- cp LINK_COLOSSEUM +- jr z, .colosseum_skippop + pop de + pop bc +-.colosseum_skippop +``` + + +### Return and Frustration deal no damage when the user's happiness is low or high, respectively + +This happens because the user's happiness (or 255 − happiness for Frustration) is multiplied by 10 and divided by 25, which rounds down to zero when the happiness is 0–2 (or 253–255 for Frustration). + +**Fix:** + +Edit [engine/battle/move_effects/return.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/move_effects/return.asm): + +```diff + BattleCommand_HappinessPower: +-; BUG: Return and Frustration deal no damage when the user's happiness is low or high, respectively (see docs/bugs_and_glitches.md) + ... + call Multiply + ld a, 25 + ldh [hDivisor], a + ld b, 4 + call Divide + ldh a, [hQuotient + 3] ++ and a ++ jr nz, .done ++ inc a ++.done + ld d, a + pop bc + ret +``` + +And edit [engine/battle/move_effects/frustration.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/move_effects/frustration.asm): + +```diff + BattleCommand_FrustrationPower: +-; BUG: Return and Frustration deal no damage when the user's happiness is low or high, respectively (see docs/bugs_and_glitches.md) + ... + call Multiply + ld a, 25 + ldh [hDivisor], a + ld b, 4 + call Divide + ldh a, [hQuotient + 3] ++ and a ++ jr nz, .done ++ inc a ++.done + ld d, a + pop bc + ret +``` + + +### Dragon Scale, not Dragon Fang, boosts Dragon-type moves + +**Fix:** Edit `ItemAttributes` in [data/items/attributes.asm](https://github.com/pret/pokecrystal/blob/master/data/items/attributes.asm): + +```diff +-; BUG: Dragon Scale, not Dragon Fang, boosts Dragon-type moves (see docs/bugs_and_glitches.md) + ; DRAGON_FANG +- item_attribute 100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE ++ item_attribute 100, HELD_DRAGON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE + ... + ; DRAGON_SCALE +- item_attribute 2100, HELD_DRAGON_BOOST, 10, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE ++ item_attribute 2100, HELD_NONE, 0, CANT_SELECT, ITEM, ITEMMENU_NOUSE, ITEMMENU_NOUSE +``` + + +### Switching out or switching against a Pokémon with max HP below 4 freezes the game + +This happens because switching involves calculating a percentage of maximum enemy HP. Directly calculating *HP* × 100 / *max HP* would require a two-byte denominator, so instead the game calculates *HP* × 25 / (*max HP* / 4), since even a maximum HP of 999 divided by 4 is 249, which fits in one byte. However, if the maximum HP is below 4 this will divide by 0, which enters an infinite loop in `_Divide`. + +**Fix:** First, edit `SendOutMonText` in [engine/battle/core.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm): + +```diff +-; BUG: Switching out or switching against a Pokémon with max HP below 4 freezes the game (see docs/bugs_and_glitches.md) + ; compute enemy health remaining as a percentage + xor a + ldh [hMultiplicand + 0], a + ld hl, wEnemyMonHP + ld a, [hli] + ld [wEnemyHPAtTimeOfPlayerSwitch], a + ldh [hMultiplicand + 1], a + ld a, [hl] + ld [wEnemyHPAtTimeOfPlayerSwitch + 1], a + ldh [hMultiplicand + 2], a +- ld a, 25 +- ldh [hMultiplier], a +- call Multiply + ld hl, wEnemyMonMaxHP + ld a, [hli] + ld b, [hl] +- srl a +- rr b +- srl a +- rr b ++ ld c, 100 ++ and a ++ jr z, .shift_done ++.shift ++ rra ++ rr b ++ srl c ++ and a ++ jr nz, .shift ++.shift_done ++ ld a, c ++ ldh [hMultiplier], a ++ call Multiply + ld a, b + ld b, 4 + ldh [hDivisor], a + call Divide +``` + +Then edit `WithdrawMonText` in the same file: + +```diff + ; compute enemy health lost as a percentage + ld hl, wEnemyMonHP + 1 + ld de, wEnemyHPAtTimeOfPlayerSwitch + 1 + ld b, [hl] + dec hl + ld a, [de] + sub b + ldh [hMultiplicand + 2], a + dec de + ld b, [hl] + ld a, [de] + sbc b + ldh [hMultiplicand + 1], a +- ld a, 25 +- ldh [hMultiplier], a +- call Multiply + ld hl, wEnemyMonMaxHP + ld a, [hli] + ld b, [hl] +- srl a +- rr b +- srl a +- rr b ++ ld c, 100 ++ and a ++ jr z, .shift_done ++.shift ++ rra ++ rr b ++ srl c ++ and a ++ jr nz, .shift ++.shift_done ++ ld a, c ++ ldh [hMultiplier], a ++ call Multiply + ld a, b + ld b, 4 + ldh [hDivisor], a + call Divide +``` + +This changes both calculations to *HP* × (100 / *N*) / (*max HP* / *N*) for the smallest necessary *N*, which will be at least 1, so it avoids dividing by zero and is also more accurate. + + +### Moves that do damage and increase your stats do not increase stats after a KO + +`BattleCommand_CheckFaint` "ends the move effect if the opponent faints", and these moves attempt to raise the user's stats *after* `checkfaint`. Note that fixing this can lead to stats being increased at the end of battle, but will not have any negative effects. + +**Fix:** Edit [data/moves/effects.asm](https://github.com/pret/pokecrystal/blob/master/data/moves/effects.asm): + +```diff + DefenseUpHit: + ... + criticaltext + supereffectivetext +-; BUG: Moves that do damage and increase your stats do not increase stats after a KO (see docs/bugs_and_glitches.md) ++ defenseup ++ statupmessage + checkfaint + buildopponentrage +- defenseup +- statupmessage + endmove + + AttackUpHit: + ... + criticaltext + supereffectivetext ++ attackup ++ statupmessage + checkfaint + buildopponentrage +- attackup +- statupmessage + endmove + + AllUpHit: + ... + criticaltext + supereffectivetext ++ allstatsup + checkfaint + buildopponentrage +- allstatsup + endmove +``` + + +### HP bar animation is slow for high HP + +*Fixing this cosmetic bug will* **not** *break link battle compatibility.* + +([Video](https://www.youtube.com/watch?v=SE-BfsFgZVM)) + +**Fix:** Edit `LongAnim_UpdateVariables` in [engine/battle/anim_hp_bar.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/anim_hp_bar.asm): + +```diff +-; BUG: HP bar animation is slow for high HP (see docs/bugs_and_glitches.md) + call ComputeHPBarPixels ++ ld a, e + pop bc + pop de + pop hl +- ld a, e + ld hl, wCurHPBarPixels + cp [hl] + jr z, .loop + ld [hl], a + and a + ret +``` + + +### HP bar animation off-by-one error for low HP + +*Fixing this cosmetic bug will* **not** *break link battle compatibility.* + +([Video](https://www.youtube.com/watch?v=9KyNVIZxJvI)) + +**Fix:** Edit `ShortHPBar_CalcPixelFrame` in [engine/battle/anim_hp_bar.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/anim_hp_bar.asm): + +```diff + ld b, 0 + .loop +-; BUG: HP bar animation off-by-one error for low HP (see docs/bugs_and_glitches.md) + ld a, l + sub HP_BAR_LENGTH_PX + ld l, a + ld a, h + sbc $0 + ld h, a ++ jr z, .done + jr c, .done + inc b + jr .loop +``` + + +## Single-player battle engine + + +### A Transformed Pokémon can use Sketch and learn otherwise unobtainable moves + +([Video](https://www.youtube.com/watch?v=AFiBxAOkCGI)) + +**Fix:** Edit `BattleCommand_Sketch` in [engine/battle/move_effects/sketch.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/move_effects/sketch.asm): + +```diff +-; If the opponent is transformed, fail. +-; BUG: A Transformed Pokémon can use Sketch and learn otherwise unobtainable moves (see docs/bugs_and_glitches.md) ++; If the user is transformed, fail. +- ld a, BATTLE_VARS_SUBSTATUS5_OPP ++ ld a, BATTLE_VARS_SUBSTATUS5 + call GetBattleVarAddr + bit SUBSTATUS_TRANSFORMED, [hl] + jp nz, .fail +``` + + +### Catching a Transformed Pokémon always catches a Ditto + +**Fix:** Edit `PokeBallEffect` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm): + +```diff + ld hl, wEnemySubStatus5 + ld a, [hl] + push af + set SUBSTATUS_TRANSFORMED, [hl] + +-; BUG: Catching a Transformed Pokémon always catches a Ditto (see docs/bugs_and_glitches.md) + bit SUBSTATUS_TRANSFORMED, a +- jr nz, .ditto +- jr .not_ditto ++ jr nz, .load_data + +-.ditto +- ld a, DITTO +- ld [wTempEnemyMonSpecies], a +- jr .load_data +- +-.not_ditto +- set SUBSTATUS_TRANSFORMED, [hl] + ld hl, wEnemyBackupDVs + ld a, [wEnemyMonDVs] + ld [hli], a + ld a, [wEnemyMonDVs + 1] + ld [hl], a + + .load_data + ld a, [wTempEnemyMonSpecies] + ld [wCurPartySpecies], a + ld a, [wEnemyMonLevel] + ld [wCurPartyLevel], a + farcall LoadEnemyMon + + pop af + ld [wEnemySubStatus5], a +``` + + +### Experience underflow for level 1 Pokémon with Medium-Slow growth rate + +([Video](https://www.youtube.com/watch?v=SXH8u0plHrE)) + +**Fix:** Edit `CalcExpAtLevel` in [engine/pokemon/experience.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokemon/experience.asm): + +```diff + CalcExpAtLevel: + ; (a/b)*n**3 + c*n**2 + d*n - e +-; BUG: Experience underflow for level 1 Pokémon with Medium-Slow growth rate (see docs/bugs_and_glitches.md) ++ ld a, d ++ dec a ++ jr nz, .UseExpFormula ++; Pokémon have 0 experience at level 1 ++ ld hl, hProduct ++ ld [hli], a ++ ld [hli], a ++ ld [hli], a ++ ld [hl], a ++ ret ++ ++.UseExpFormula + ld a, [wBaseGrowthRate] + add a + add a + ld c, a + ld b, 0 + ld hl, GrowthRates + add hl, bc +``` + + +### The Dude's catching tutorial may crash if his Poké Ball can't be used + +([Video](https://www.youtube.com/watch?v=A8zaTOkjKS4&t=407)) + +This can occur if your party and current PC box are both full when you start the tutorial. + +**Fix:** Edit `PokeBallEffect` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm): + +```diff + PokeBallEffect: +-; BUG: The Dude's catching tutorial may crash if his Poké Ball can't be used (see docs/bugs_and_glitches.md) + ld a, [wBattleMode] + dec a + jp nz, UseBallInTrainerBattle + ++ ld a, [wBattleType] ++ cp BATTLETYPE_TUTORIAL ++ jr z, .room_in_party ++ + ld a, [wPartyCount] + cp PARTY_LENGTH + jr nz, .room_in_party + + ld a, BANK(sBoxCount) + call OpenSRAM + ld a, [sBoxCount] + cp MONS_PER_BOX + call CloseSRAM + jp z, Ball_BoxIsFullMessage +``` + + +### BRN/PSN/PAR do not affect catch rate + +**Fix:** Edit `PokeBallEffect` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm): + +```diff + .statuscheck +-; BUG: BRN/PSN/PAR do not affect catch rate (see docs/bugs_and_glitches.md) + ld b, a + ld a, [wEnemyMonStatus] + and 1 << FRZ | SLP_MASK + ld c, 10 + jr nz, .addstatus ++ ld a, [wEnemyMonStatus] + and a + ld c, 5 + jr nz, .addstatus + ld c, 0 + .addstatus + ld a, b + add c + jr nc, .max_1 + ld a, $ff + .max_1 +``` + + +### Moon Ball does not boost catch rate + +**Fix:** Edit `MoonBallMultiplier` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm): + +```diff +-; BUG: Moon Ball does not boost catch rate (see docs/bugs_and_glitches.md) + push bc + ld a, BANK("Evolutions and Attacks") + call GetFarByte +- cp MOON_STONE_RED ; BURN_HEAL ++ cp MOON_STONE + pop bc + ret nz +``` + + +### Love Ball boosts catch rate for the wrong gender + +**Fix:** Edit `LoveBallMultiplier` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm): + +```diff + .got_wild_gender + +-; BUG: Love Ball boosts catch rate for the wrong gender (see docs/bugs_and_glitches.md) + ld a, d + pop de + cp d + pop bc +- ret nz ++ ret z +``` + + +### Fast Ball only boosts catch rate for three Pokémon + +**Fix:** Edit `FastBallMultiplier` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm): + +```diff + .loop +-; BUG: Fast Ball only boosts catch rate for three Pokémon (see docs/bugs_and_glitches.md) + ld a, BANK(FleeMons) + call GetFarByte + + inc hl + cp -1 + jr z, .next + cp c +- jr nz, .next ++ jr nz, .loop + sla b + jr c, .max +``` + + +### Heavy Ball uses wrong weight value for three Pokémon + +`HeavyBall_GetDexEntryBank` gets the wrong bank for Kadabra (64), Tauros (128), and Sunflora (192). + +**Fix:** Edit `HeavyBall_GetDexEntryBank` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm): + +```diff + HeavyBall_GetDexEntryBank: +-; BUG: Heavy Ball uses wrong weight value for three Pokemon (see docs/bugs_and_glitches.md) + push hl + push de + ld a, [wEnemyMonSpecies] ++ dec a + rlca + rlca + maskbits NUM_DEX_ENTRY_BANKS + ld hl, .PokedexEntryBanks + ld d, 0 + ld e, a + add hl, de + ld a, [hl] + pop de + pop hl + ret + + .PokedexEntryBanks: + db BANK("Pokedex Entries 001-064") + db BANK("Pokedex Entries 065-128") + db BANK("Pokedex Entries 129-192") + db BANK("Pokedex Entries 193-251") +``` + + +### PRZ and BRN stat reductions don't apply to switched Pokémon + +This does not affect link battles or Battle Tower battles because those jump from `LoadEnemyMon` to `InitEnemyMon`, which already calls `ApplyStatusEffectOnEnemyStats`. + +**Fix:** Edit `LoadEnemyMon` in [engine/battle/core.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm): + +```diff + ld hl, wEnemyMonStats + ld de, wEnemyStats + ld bc, NUM_EXP_STATS * 2 + call CopyBytes + +-; BUG: PRZ and BRN stat reductions don't apply to switched Pokémon (see docs/bugs_and_glitches.md) ++ call ApplyStatusEffectOnEnemyStats + ret +``` + + +### Glacier Badge may not boost Special Defense depending on the value of Special Attack + +Pryce's dialog ("That BADGE will raise the SPECIAL stats of POKéMON.") implies that Glacier Badge is intended to boost both Special Attack and Special Defense, but the Special Defense boost will not happen unless the unboosted Special Attack stat is 206–432, or 661 or above. + +**Fix:** Edit `BadgeStatBoosts.CheckBadge` in [engine/battle/core.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm): + +```diff + .CheckBadge: +-; BUG: Glacier Badge may not boost Special Defense depending on the value of Special Attack (see docs/bugs_and_glitches.md) + ld a, b + srl b ++ push af + call c, BoostStat ++ pop af + inc hl + inc hl + ; Check every other badge. + srl b + dec c + jr nz, .CheckBadge + srl a + call c, BoostStat + ret +``` + + +### "Smart" AI encourages Mean Look if its own Pokémon is badly poisoned + +([Video](https://www.youtube.com/watch?v=cygMO-zHTls)) + +**Fix:** Edit `AI_Smart_MeanLook` in [engine/battle/ai/scoring.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/ai/scoring.asm): + +```diff + ; 80% chance to greatly encourage this move if the enemy is badly poisoned. +-; BUG: "Smart" AI encourages Mean Look if its own Pokémon is badly poisoned (see docs/bugs_and_glitches.md) +- ld a, [wEnemySubStatus5] ++ ld a, [wPlayerSubStatus5] + bit SUBSTATUS_TOXIC, a + jr nz, .asm_38e26 +``` + + +### "Smart" AI discourages Conversion2 after the first turn + +**Fix:** Edit `AI_Smart_Conversion2` in [engine/battle/ai/scoring.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/ai/scoring.asm): + +```diff + AI_Smart_Conversion2: +-; BUG: "Smart" AI discourages Conversion2 after the first turn (see docs/bugs_and_glitches.md) + ld a, [wLastPlayerMove] + and a +- jr nz, .discourage ++ jr z, .discourage +``` + + +### "Smart" AI does not encourage Solar Beam, Flame Wheel, or Moonlight during Sunny Day + +**Fix:** Edit `SunnyDayMoves` in [data/battle/ai/sunny_day_moves.asm](https://github.com/pret/pokecrystal/blob/master/data/battle/ai/sunny_day_moves.asm): + +```diff + SunnyDayMoves: +-; BUG: "Smart" AI does not encourage Solar Beam, Flame Wheel, or Moonlight during Sunny Day (see docs/bugs_and_glitches.md) + db FIRE_PUNCH + db EMBER + db FLAMETHROWER ++ db SOLARBEAM + db FIRE_SPIN + db FIRE_BLAST ++ db FLAME_WHEEL + db SACRED_FIRE + db MORNING_SUN + db SYNTHESIS ++ db MOONLIGHT + db -1 ; end +``` + + +### AI does not discourage Future Sight when it's already been used + +**Fix:** Edit `AI_Redundant` in [engine/battle/ai/redundant.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/ai/redundant.asm): + +```diff + .FutureSight: +-; BUG: AI does not discourage Future Sight when it's already been used (see docs/bugs_and_glitches.md) +- ld a, [wEnemyScreens] +- bit 5, a ++ ld a, [wEnemyFutureSightCount] ++ and a + ret +``` + + +### AI makes a false assumption about `CheckTypeMatchup` + +**Fix:** Edit `BattleCheckTypeMatchup` in [engine/battle/effect_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/effect_commands.asm): + +```diff + BattleCheckTypeMatchup: + ld hl, wEnemyMonType1 + ldh a, [hBattleTurn] + and a +- jr z, CheckTypeMatchup ++ jr z, .get_type + ld hl, wBattleMonType1 ++.get_type ++ ld a, BATTLE_VARS_MOVE_TYPE ++ call GetBattleVar ; preserves hl, de, and bc + ; fallthrough + CheckTypeMatchup: +-; BUG: AI makes a false assumption about CheckTypeMatchup (see docs/bugs_and_glitches.md) + push hl + push de + push bc +- ld a, BATTLE_VARS_MOVE_TYPE +- call GetBattleVar + ld d, a + ... +``` + + +### AI use of Full Heal or Full Restore does not cure Nightmare status + +([Video](https://www.youtube.com/watch?v=rGqu3d3pdok&t=322)) + +**Fix:** Edit `AI_HealStatus` in [engine/battle/ai/items.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/ai/items.asm): + +```diff + AI_HealStatus: +-; BUG: AI use of Full Heal or Full Restore does not cure Nightmare status (see docs/bugs_and_glitches.md) + ld a, [wCurOTMon] + ld hl, wOTPartyMon1Status + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + xor a + ld [hl], a + ld [wEnemyMonStatus], a ++ ld hl, wEnemySubStatus1 ++ res SUBSTATUS_NIGHTMARE, [hl] + ld hl, wEnemySubStatus5 + res SUBSTATUS_TOXIC, [hl] + ret +``` + + +### AI use of Full Heal does not cure confusion status + +**Fix:** Edit `EnemyUsedFullRestore`, and `AI_HealStatus` in [engine/battle/ai/items.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/ai/items.asm): + +```diff + EnemyUsedFullRestore: +-; BUG: AI use of Full Heal does not cure confusion status (see docs/bugs_and_glitches.md) + call AI_HealStatus + ld a, FULL_RESTORE + ld [wCurEnemyItem], a +- ld hl, wEnemySubStatus3 +- res SUBSTATUS_CONFUSED, [hl] +- xor a +- ld [wEnemyConfuseCount], a + ; fallthrough +``` + +```diff + AI_HealStatus: + ; BUG: AI use of Full Heal or Full Restore does not cure Nightmare status (see docs/bugs_and_glitches.md) + ld a, [wCurOTMon] + ld hl, wOTPartyMon1Status + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + xor a + ld [hl], a + ld [wEnemyMonStatus], a ++ ld [wEnemyConfuseCount], a ++ ld hl, wEnemySubStatus3 ++ res SUBSTATUS_CONFUSED, [hl] + ld hl, wEnemySubStatus5 + res SUBSTATUS_TOXIC, [hl] + ret +``` + + +### Wild Pokémon can always Teleport regardless of level difference + +**Fix:** Edit `BattleCommand_Teleport` in [engine/battle/move_effects/teleport.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/move_effects/teleport.asm): + +```diff + .loop_enemy +-; BUG: Wild Pokémon can always Teleport regardless of level difference (see docs/bugs_and_glitches.md) ++; If a random number >= player level / 4, Teleport will succeed + call BattleRandom + cp c + jr nc, .loop_enemy + ; b = player level / 4 + srl b + srl b + cp b +- jr nc, .run_away ++ jr c, .failed +``` + + +### `RIVAL2` has lower DVs than `RIVAL1` + +`RIVAL1` is battled throughout the game. `RIVAL2` is battled at Indigo Plateau, and would not be expected to have worse DVs. + +**Fix:** Edit `TrainerClassDVs` in [data/trainers/dvs.asm](https://github.com/pret/pokecrystal/blob/master/data/trainers/dvs.asm): + +```diff + dn 13, 13, 13, 13 ; RIVAL1 + ... +-; BUG: RIVAL2 has lower DVs than RIVAL1 (see docs/bugs_and_glitches.md) +- dn 9, 8, 8, 8 ; RIVAL2 ++ dn 13, 13, 13, 13 ; RIVAL2 +``` + + +### `HELD_CATCH_CHANCE` has no effect + +**Fix:** Edit `PokeBallEffect` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm): + +```diff +-; BUG: HELD_CATCH_CHANCE has no effect (see docs/bugs_and_glitches.md) + ld d, a + push de + ld a, [wBattleMonItem] ++ ld b, a + farcall GetItemHeldEffect + ld a, b + cp HELD_CATCH_CHANCE + pop de + ld a, d + jr nz, .max_2 + add c + jr nc, .max_2 + ld a, $ff + .max_2 +``` + + +### Credits sequence changes move selection menu behavior + +([Video](https://www.youtube.com/watch?v=vjFUo6Jr4po&t=438)) + +To select a move in battle, you have to press and release the Up or Down buttons. However, after playing the credits sequence, holding down either button will continuously scroll through the moves. + +**Fix:** Edit `Credits` in [engine/movie/credits.asm](https://github.com/pret/pokecrystal/blob/master/engine/movie/credits.asm): + +```diff +-; BUG: Credits sequence changes move selection menu behavior (see docs/bugs_and_glitches.md) + ldh a, [hVBlank] + push af + ld a, $5 + ldh [hVBlank], a ++ ldh a, [hInMenu] ++ push af + ld a, TRUE + ldh [hInMenu], a + + ... + + ldh [hLCDCPointer], a + ldh [hBGMapAddress], a ++ pop af ++ ldh [hInMenu], a + pop af + ldh [hVBlank], a + pop af + ldh [rSVBK], a +``` + +The `[hInMenu]` value determines this button behavior. However, the battle moves menu doesn't actually set `[hInMenu]` to anything, so either behavior *may* have been intentional. The default 0 prevents continuous scrolling; a value of 1 allows it. (The Japanese release sets it to 0.) + +**Optional fix:** To explicitly set a `[hInMenu]` for the moves menu, edit `BattleTurn` in [engine/battle/core.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm): + +```diff + BattleTurn: ++ ldh a, [hInMenu] ++ push af ++ ld a, 1 ; or "xor a" for the value 0 ++ ldh [hInMenu], a ++ + .loop + + ... + + jp .loop + + .quit ++ pop af ++ ldh [hInMenu], a + ret +``` + + +## Game engine + + +### `LoadMetatiles` wraps around past 128 blocks + +This bug prevents you from using blocksets with more than 128 blocks. + +**Fix:** Edit `LoadMetatiles` in [home/map.asm](https://github.com/pret/pokecrystal/blob/master/home/map.asm): + +```diff + ; Set hl to the address of the current metatile data ([wTilesetBlocksAddress] + (a) tiles). +-; BUG: LoadMetatiles wraps around past 128 blocks (see docs/bugs_and_glitches.md) +- add a + ld l, a + ld h, 0 ++ add hl, hl + add hl, hl + add hl, hl + add hl, hl + ld a, [wTilesetBlocksAddress] + add l + ld l, a + ld a, [wTilesetBlocksAddress + 1] + adc h + ld h, a +``` + + +### Surfing directly across a map connection does not load the new map + +([Video](https://www.youtube.com/watch?v=XFOWvMNG-zw)) + +**Fix:** + +First, edit `UsedSurfScript` in [engine/events/overworld.asm](https://github.com/pret/pokecrystal/blob/master/engine/events/overworld.asm): + +```diff + UsedSurfScript: +-; BUG: Surfing directly across a map connection does not load the new map (see docs/bugs_and_glitches.md) + writetext UsedSurfText ; "used SURF!" + waitbutton + closetext + + callasm .empty_fn ; empty function + + readmem wSurfingPlayerState + writevar VAR_MOVEMENT + + special UpdatePlayerSprite + special PlayMapMusic +-; step into the water (slow_step DIR, step_end) + special SurfStartStep +- applymovement PLAYER, wMovementBuffer + end +``` + +Then edit `SurfStartStep` in [engine/overworld/player_object.asm](https://github.com/pret/pokecrystal/blob/master/engine/overworld/player_object.asm): + +```diff + SurfStartStep: +- call InitMovementBuffer +- call .GetMovementData +- call AppendToMovementBuffer +- ld a, movement_step_end +- call AppendToMovementBuffer +- ret +- +-.GetMovementData: + ld a, [wPlayerDirection] + srl a + srl a + maskbits NUM_DIRECTIONS + ld e, a + ld d, 0 + ld hl, .movement_data + add hl, de +- ld a, [hl] +- ret ++ add hl, de ++ add hl, de ++ ld a, BANK(.movement_data) ++ jp StartAutoInput + + .movement_data +- slow_step DOWN +- slow_step UP +- slow_step LEFT +- slow_step RIGHT ++ db D_DOWN, 0, -1 ++ db D_UP, 0, -1 ++ db D_LEFT, 0, -1 ++ db D_RIGHT, 0, -1 +``` + +This fix will make the player enter the water at a normal walking speed, not with a slow step. + + +### Swimming NPCs aren't limited by their movement radius + +This bug is why the Lapras in [maps/UnionCaveB2F.asm](https://github.com/pret/pokecrystal/blob/master/maps/UnionCaveB2F.asm), which uses `SPRITEMOVEDATA_SWIM_WANDER`, is not restricted by its `1, 1` movement radius. + +**Fix:** Edit `CanObjectMoveInDirection` in [engine/overworld/npc_movement.asm](https://github.com/pret/pokecrystal/blob/master/engine/overworld/npc_movement.asm): + +```diff +-; BUG: Swimming NPCs aren't limited by their movement radius (see docs/bugs_and_glitches.md) + ld hl, OBJECT_FLAGS1 + add hl, bc + bit NOCLIP_TILES_F, [hl] ++ jr nz, .noclip_tiles +``` + + +### You can fish on top of NPCs + +**Fix**: Edit [engine/events/overworld.asm](https://github.com/pret/pokecrystal/blob/master/engine/events/overworld.asm): + +```diff + FishFunction: + ... + + .TryFish: +-; BUG: You can fish on top of NPCs (see docs/bugs_and_glitches.md) + ld a, [wPlayerState] + cp PLAYER_SURF + jr z, .fail + cp PLAYER_SURF_PIKA + jr z, .fail + call GetFacingTileCoord + call GetTileCollision + cp WATER_TILE +- jr z, .facingwater ++ jr nz, .fail ++ farcall CheckFacingObject ++ jr nc, .facingwater + .fail + ld a, $3 + ret +``` + + +### Pokémon deposited in the Day-Care might lose experience + +When a Pokémon is withdrawn from the Day-Care, its Exp. Points are reset to the minimum required for its level. This means that if it hasn't gained any levels, it may lose experience. + +**Fix:** Edit `RetrieveBreedmon` in [engine/pokemon/move_mon.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokemon/move_mon.asm): + +```diff + RetrieveBreedmon: + + ... +-; BUG: Pokémon deposited in the Day-Care might lose experience (see docs/bugs_and_glitches.md) + ld a, [wPartyCount] + dec a + ld [wCurPartyMon], a + farcall HealPartyMon +- ld a, [wCurPartyLevel] +- ld d, a ++ ld d, MAX_LEVEL + callfar CalcExpAtLevel + pop bc +- ld hl, MON_EXP ++ ld hl, MON_EXP + 2 + add hl, bc + ldh a, [hMultiplicand] +- ld [hli], a ++ ld b, a + ldh a, [hMultiplicand + 1] +- ld [hli], a ++ ld c, a + ldh a, [hMultiplicand + 2] ++ ld d, a ++ ld a, [hld] ++ sub d ++ ld a, [hld] ++ sbc c ++ ld a, [hl] ++ sbc b ++ jr c, .not_max_exp ++ ld a, b ++ ld [hli], a ++ ld a, c ++ ld [hli], a ++ ld a, d + ld [hl], a ++.not_max_exp + and a + ret +``` + + +## Graphics + + +### In-battle “`…`” ellipsis is too high + +This is a mistake with the “`…`” tile in [gfx/battle/hp_exp_bar_border.png](https://github.com/pret/pokecrystal/blob/master/gfx/battle/hp_exp_bar_border.png): + +![image](https://raw.githubusercontent.com/pret/pokecrystal/master/gfx/battle/hp_exp_bar_border.png) + +**Fix:** Lower the ellipsis by two pixels: + +![image](https://raw.githubusercontent.com/pret/pokecrystal/master/docs/images/hp_exp_bar_border.png) + + +### Two tiles in the `port` tileset are drawn incorrectly + +This is a mistake with the left-hand warp carpet corner tiles in [gfx/tilesets/port.png](https://github.com/pret/pokecrystal/blob/master/gfx/tilesets/port.png): + +![image](https://raw.githubusercontent.com/pret/pokecrystal/master/gfx/tilesets/port.png) + +**Fix:** Adjust them to match the right-hand corner tiles: + +![image](https://raw.githubusercontent.com/pret/pokecrystal/master/docs/images/port.png) + + +### The Ruins of Alph research center's roof color at night looks wrong + +The dungeons' map group mostly has indoor maps that don't need roof colors, but [maps/RuinsOfAlphOutside.blk](https://github.com/pret/pokecrystal/blob/master/maps/RuinsOfAlphOutside.blk) is an exception. It appears to have poorly-chosen roof colors: the morning/day colors are the same default gray as the unused group 0, and the night colors combine the light default gray and the dark red of Cinnabar's night roofs. + +![image](https://raw.githubusercontent.com/pret/pokecrystal/master/docs/images/ruins_of_alph_outside.png) + +**Fix:** Edit [gfx/tilesets/roofs.pal](https://github.com/pret/pokecrystal/blob/master/gfx/tilesets/roofs.pal) to use the same red colors as Cinnabar (which are not actually seen in-game): + +```diff + ; group 3 (dungeons) +- RGB 21,21,21, 11,11,11 ; morn/day +- RGB 21,21,21, 17,08,07 ; nite ++ RGB 31,10,00, 18,06,00 ; morn/day ++ RGB 18,05,09, 17,08,07 ; nite +``` + +![image](https://raw.githubusercontent.com/pret/pokecrystal/master/docs/images/ruins_of_alph_outside_cinnabar.png) + + +### A hatching Unown egg would not show the right letter + +**Fix:** Edit both functions in [engine/pokemon/breeding.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokemon/breeding.asm): + +```diff + GetEggFrontpic: +-; BUG: A hatching Unown egg would not show the right letter (see docs/bugs_and_glitches.md) + push de + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call GetBaseData +- ld hl, wBattleMonDVs ++ ld a, MON_DVS ++ call GetPartyParamLocation + predef GetUnownLetter + pop de + predef_jump GetMonFrontpic + + GetHatchlingFrontpic: + push de + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call GetBaseData +- ld hl, wBattleMonDVs ++ ld a, MON_DVS ++ call GetPartyParamLocation + predef GetUnownLetter + pop de + predef_jump GetAnimatedFrontpic +``` + + +### Using a Park Ball in non-Contest battles has a corrupt animation + +([Video](https://www.youtube.com/watch?v=v1ErZdLCIyU)) + +**Fix:** Edit `PokeBallEffect` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm): + +```diff + .room_in_party +-; BUG: Using a Park Ball in non-Contest battles has a corrupt animation (see docs/bugs_and_glitches.md) + xor a + ld [wWildMon], a +- ld a, [wCurItem] +- cp PARK_BALL ++ ld a, [wBattleType] ++ cp BATTLETYPE_CONTEST + call nz, ReturnToBattle_UseBall +``` + + +### Battle transitions fail to account for the enemy's level + +([Video](https://www.youtube.com/watch?v=eij_1060SMc)) + +There are three things wrong here: + +- `wEnemyMonLevel` isn't initialized yet +- `wBattleMonLevel` gets overwritten after it's initialized by `FindFirstAliveMonAndStartBattle` +- `wBattleMonLevel` isn't initialized until much later when the battle is with a trainer + +**Fix:** + +First, edit [engine/battle/battle_transition.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/battle_transition.asm): + +```diff + StartTrainerBattle_DetermineWhichAnimation: + ; The screen flashes a different number of times depending on the level of + ; your lead Pokemon relative to the opponent's. +-; BUG: Battle transitions fail to account for enemy's level (see docs/bugs_and_glitches.md) ++ ld a, [wOtherTrainerClass] ++ and a ++ jr z, .wild ++ farcall SetTrainerBattleLevel ++ ++.wild ++ ld b, PARTY_LENGTH ++ ld hl, wPartyMon1HP ++ ld de, PARTYMON_STRUCT_LENGTH - 1 ++ ++.loop ++ ld a, [hli] ++ or [hl] ++ jr nz, .okay ++ add hl, de ++ dec b ++ jr nz, .loop ++ ++.okay ++ ld de, MON_LEVEL - MON_HP - 1 ++ add hl, de + ld de, 0 +- ld a, [wBattleMonLevel] ++ ld a, [hl] + add 3 +- ld hl, wEnemyMonLevel ++ ld hl, wCurPartyLevel + cp [hl] + jr nc, .not_stronger + set TRANS_STRONGER_F, e + .not_stronger + ld a, [wEnvironment] + cp CAVE + jr z, .cave + cp ENVIRONMENT_5 + jr z, .cave + cp DUNGEON + jr z, .cave + set TRANS_NO_CAVE_F, e + .cave + ld hl, .StartingPoints + add hl, de + ld a, [hl] + ld [wJumptableIndex], a + ret + + .StartingPoints: + ; entries correspond to TRANS_* constants + db BATTLETRANSITION_CAVE + db BATTLETRANSITION_CAVE_STRONGER + db BATTLETRANSITION_NO_CAVE + db BATTLETRANSITION_NO_CAVE_STRONGER +``` + +Then edit [engine/battle/start_battle.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/start_battle.asm): + +```diff + FindFirstAliveMonAndStartBattle: + xor a + ldh [hMapAnims], a + call DelayFrame +- ld b, PARTY_LENGTH +- ld hl, wPartyMon1HP +- ld de, PARTYMON_STRUCT_LENGTH - 1 +- +-.loop +- ld a, [hli] +- or [hl] +- jr nz, .okay +- add hl, de +- dec b +- jr nz, .loop +- +-.okay +- ld de, MON_LEVEL - MON_HP +- add hl, de +- ld a, [hl] +- ld [wBattleMonLevel], a + predef DoBattleTransition +``` + +Finally, edit [engine/battle/read_trainer_party.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/read_trainer_party.asm): + +```diff + INCLUDE "data/trainers/parties.asm" ++ ++SetTrainerBattleLevel: ++ ld a, 255 ++ ld [wCurPartyLevel], a ++ ++ ld a, [wInBattleTowerBattle] ++ bit 0, a ++ ret nz ++ ++ ld a, [wLinkMode] ++ and a ++ ret nz ++ ++ ld a, [wOtherTrainerClass] ++ dec a ++ ld c, a ++ ld b, 0 ++ ld hl, TrainerGroups ++ add hl, bc ++ add hl, bc ++ ld a, [hli] ++ ld h, [hl] ++ ld l, a ++ ++ ld a, [wOtherTrainerID] ++ ld b, a ++.skip_trainer ++ dec b ++ jr z, .got_trainer ++.skip_party ++ ld a, [hli] ++ cp $ff ++ jr nz, .skip_party ++ jr .skip_trainer ++.got_trainer ++ ++.skip_name ++ ld a, [hli] ++ cp "@" ++ jr nz, .skip_name ++ ++ inc hl ++ ld a, [hl] ++ ld [wCurPartyLevel], a ++ ret +``` + + +### Some trainer NPCs have inconsistent overworld sprites + +*Some of these may have been intentional behavior; use your own judgment for whether to fix them.* + +Most trainer classes always use the same sprite and color for their overworld NPCs. There are some exceptions: + +- [maps/FastShipCabins_SE_SSE_CaptainsCabin.asm](https://github.com/pret/pokecrystal/blob/master/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm): `TrainerPsychicRodney` should use `SPRITE_YOUNGSTER`, not `SPRITE_SUPER_NERD` +- [maps/LakeOfRage.asm](https://github.com/pret/pokecrystal/blob/master/maps/LakeOfRage.asm): `TrainerFisherAndre` and `TrainerFisherRaymond` should use `PAL_NPC_GREEN`, not `PAL_NPC_BLUE` +- [maps/Route13.asm](https://github.com/pret/pokecrystal/blob/master/maps/Route13.asm): `TrainerHikerKenny` should use `PAL_NPC_BROWN`, not `PAL_NPC_RED` +- [maps/Route44.asm](https://github.com/pret/pokecrystal/blob/master/maps/Route44.asm): `TrainerBirdKeeperVance1` should use `PAL_NPC_BLUE`, not `PAL_NPC_GREEN` +- [maps/Route44.asm](https://github.com/pret/pokecrystal/blob/master/maps/Route44.asm): `TrainerPokemaniacZach` should use `PAL_NPC_BLUE`, not `PAL_NPC_GREEN` +- [maps/UnionCaveB2F.asm](https://github.com/pret/pokecrystal/blob/master/maps/UnionCaveB2F.asm): `TrainerCooltrainermNick` should use `SPRITE_COOLTRAINER_M`, not `SPRITE_ROCKER` +- [maps/FuchsiaPokecenter1F.asm](https://github.com/pret/pokecrystal/blob/master/maps/FuchsiaPokecenter1F.asm): `FuchsiaPokecenter1FNurseScript` should use `PAL_NPC_RED`, not `PAL_NPC_GREEN` + +Most of the NPCs in [maps/NationalParkBugContest.asm](https://github.com/pret/pokecrystal/blob/master/maps/NationalParkBugContest.asm) and [maps/Route36NationalParkGate.asm](https://github.com/pret/pokecrystal/blob/master/maps/Route36NationalParkGate.asm) are also inconsistent with their trainers from other maps: + +- `BugCatchingContestant1AScript` and `BugCatchingContestant1BScript`: `BUG_CATCHER DON` from [maps/Route30.asm](https://github.com/pret/pokecrystal/blob/master/maps/Route30.asm) should use `SPRITE_BUG_CATCHER` and `PAL_NPC_BROWN`, not `SPRITE_YOUNGSTER` and `PAL_NPC_RED` +- `BugCatchingContestant2AScript` and `BugCatchingContestant2BScript`: `BUG_CATCHER ED` from [maps/Route2.asm](https://github.com/pret/pokecrystal/blob/master/maps/Route2.asm) should use `SPRITE_BUG_CATCHER` and `PAL_NPC_BROWN`, not `SPRITE_YOUNGSTER` and `PAL_NPC_GREEN` +- `BugCatchingContestant3AScript` and `BugCatchingContestant3BScript`: `COOLTRAINERM NICK` from [maps/UnionCaveB2F.asm](https://github.com/pret/pokecrystal/blob/master/maps/UnionCaveB2F.asm) should use `SPRITE_COOLTRAINER_M` and `PAL_NPC_RED`, not `SPRITE_ROCKER` and `PAL_NPC_BLUE` +- `BugCatchingContestant4AScript` and `BugCatchingContestant4BScript`: `POKEFANM WILLIAM` from [maps/NationalPark.asm](https://github.com/pret/pokecrystal/blob/master/maps/NationalPark.asm) should use `PAL_NPC_RED`, not `PAL_NPC_BROWN` +- `BugCatchingContestant5AScript` and `BugCatchingContestant5BScript`: `BUG_CATCHER BENNY` from [maps/AzaleaGym.asm](https://github.com/pret/pokecrystal/blob/master/maps/AzaleaGym.asm) should use `SPRITE_BUG_CATCHER` and `PAL_NPC_BROWN`, not `SPRITE_YOUNGSTER` and `PAL_NPC_RED` +- `BugCatchingContestant7AScript` and `BugCatchingContestant7BScript`: `PICNICKER CINDY` from [maps/FuchsiaGym.asm](https://github.com/pret/pokecrystal/blob/master/maps/FuchsiaGym.asm) should use `PAL_NPC_GREEN`, not `PAL_NPC_BLUE` +- `BugCatchingContestant8AScript` and `BugCatchingContestant8BScript`: `BUG_CATCHER JOSH` from [maps/AzaleaGym.asm](https://github.com/pret/pokecrystal/blob/master/maps/AzaleaGym.asm) should use `SPRITE_BUG_CATCHER` and `PAL_NPC_BROWN`, not `SPRITE_YOUNGSTER` and `PAL_NPC_RED` +- `BugCatchingContestant9AScript` and `BugCatchingContestant9BScript`: `YOUNGSTER SAMUEL` from [maps/Route34.asm](https://github.com/pret/pokecrystal/blob/master/maps/Route34.asm) should use `PAL_NPC_BLUE`, not `PAL_NPC_GREEN` + +(Note that [maps/Route8.asm](https://github.com/pret/pokecrystal/blob/master/maps/Route8.asm) has three `BIKER`s, `DWAYNE`, `HARRIS`, and `ZEKE`, that use `PAL_NPC_RED`, `PAL_NPC_GREEN`, and `PAL_NPC_BLUE` instead of `PAL_NPC_BROWN`; this is intentional since they're the "Kanto Pokémon Federation".) + +(The use of `SPRITE_ROCKER` instead of `SPRITE_COOLTRAINER_M` for `COOLTRAINERM NICK` may also be an intentional reference to the player's brother from the [Space World '97 beta](https://github.com/pret/pokegold-spaceworld).) + + +## Audio + + +### Slot machine payout sound effects cut each other off + +([Video](https://www.youtube.com/watch?v=ojq3xqfRF6I)) + +**Fix:** Edit `SlotsAction_PayoutAnim` in [engine/games/slot_machine.asm](https://github.com/pret/pokecrystal/blob/master/engine/games/slot_machine.asm): + +```diff + .okay +-; BUG: Slot machine payout sound effects cut each other off (see docs/bugs_and_glitches.md) + ld [hl], e + dec hl + ld [hl], d + ld a, [wSlotsDelay] + and $7 +- ret z ++ ret nz + ld de, SFX_GET_COIN_FROM_SLOTS + call PlaySFX + ret +``` + + +### Team Rocket battle music is not used for Executives or Scientists + +**Fix:** Edit `PlayBattleMusic` in [engine/battle/start_battle.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/start_battle.asm): + +```diff +-; BUG: Team Rocket battle music is not used for Executives or Scientists (see docs/bugs_and_glitches.md) + ld de, MUSIC_ROCKET_BATTLE + cp GRUNTM + jr z, .done + cp GRUNTF + jr z, .done ++ cp EXECUTIVEM ++ jr z, .done ++ cp EXECUTIVEF ++ jr z, .done ++ cp SCIENTIST ++ jr z, .done +``` + + +### No bump noise if standing on tile `$3E` + +If `[wWalkingDirection]` is `STANDING` (`$FF`), this will check `[.EdgeWarps + $ff]`, which happens to be `$3E`. + +**Fix:** Edit `DoPlayerMovement.CheckWarp` in [engine/overworld/player_movement.asm](https://github.com/pret/pokecrystal/blob/master/engine/overworld/player_movement.asm): + +```diff + .CheckWarp: +-; BUG: No bump noise if standing on tile $3E (see docs/bugs_and_glitches.md) + + ld a, [wWalkingDirection] ++ cp STANDING ++ jr z, .not_warp + ld e, a + ld d, 0 + ld hl, .EdgeWarps + add hl, de + ld a, [wPlayerTile] + cp [hl] + jr nz, .not_warp + + ld a, TRUE + ld [wWalkingIntoEdgeWarp], a + ld a, [wWalkingDirection] +- cp STANDING +- jr z, .not_warp +``` + + +### Playing Entei's Pokédex cry can distort Raikou's and Suicune's + +([Video](https://www.youtube.com/watch?v=z305e4sIO24)) + +The exact cause of this bug is unknown. + +**Workaround:** Edit `DexEntryScreen_MenuActionJumptable.Cry` in [engine/pokedex/pokedex.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokedex/pokedex.asm): + +```diff + .Cry: +-; BUG: Playing Entei's Pokédex cry can distort Raikou's and Suicune's (see docs/bugs_and_glitches.md) +- call Pokedex_GetSelectedMon +- ld a, [wTempSpecies] +- call GetCryIndex +- ld e, c +- ld d, b +- call PlayCry ++ ld a, [wCurPartySpecies] ++ call PlayMonCry + ret +``` + + +## Text + + +### Five-digit experience gain is printed incorrectly + +([Video](https://www.youtube.com/watch?v=o54VjpAEoO8)) + +**Fix:** Edit `_BoostedExpPointsText` and `_ExpPointsText` in [data/text/common_2.asm](https://github.com/pret/pokecrystal/blob/master/data/text/common_2.asm): + +```diff + _BoostedExpPointsText:: +-; BUG: Five-digit experience gain is printed incorrectly (see docs/bugs_and_glitches.md) + text_start + line "a boosted" + cont "@" +- text_decimal wStringBuffer2, 2, 4 ++ text_decimal wStringBuffer2, 2, 5 + text " EXP. Points!" + prompt + + _ExpPointsText:: +-; BUG: Five-digit experience gain is printed incorrectly (see docs/bugs_and_glitches.md) + text_start + line "@" +- text_decimal wStringBuffer2, 2, 4 ++ text_decimal wStringBuffer2, 2, 5 + text " EXP. Points!" + prompt +``` + + +### Only the first three evolution entries can have Stone compatibility reported correctly + +**Workaround:** Edit `PlacePartyMonEvoStoneCompatibility.DetermineCompatibility` in [engine/pokemon/party_menu.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokemon/party_menu.asm): + +```diff + .DetermineCompatibility: +-; BUG: Only the first three evolution entries can have Stone compatibility reported correctly (see docs/bugs_and_glitches.md) + ld de, wStringBuffer1 + ld a, BANK(EvosAttacksPointers) + ld bc, 2 + call FarCopyBytes + ld hl, wStringBuffer1 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wStringBuffer1 + ld a, BANK("Evolutions and Attacks") +- ld bc, 10 ++ ld bc, STRING_BUFFER_LENGTH + call FarCopyBytes +``` + +This supports up to six entries. + + +### `EVOLVE_STAT` can break Stone compatibility reporting + +**Fix:** Edit `PlacePartyMonEvoStoneCompatibility.DetermineCompatibility` in [engine/pokemon/party_menu.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokemon/party_menu.asm): + +```diff + .loop2 +-; BUG: EVOLVE_STAT can break Stone compatibility reporting (see docs/bugs_and_glitches.md) + ld a, [hli] + and a + jr z, .nope ++ cp EVOLVE_STAT ++ jr nz, .not_four_bytes ++ inc hl ++.not_four_bytes + inc hl + inc hl + cp EVOLVE_ITEM + jr nz, .loop2 +``` + + +### A "HOF Master!" title for 200-Time Famers is defined but inaccessible + +([Video](https://www.youtube.com/watch?v=iHkWubvxmSg)) + +**Fix:** Edit `_HallOfFamePC.DisplayMonAndStrings` in [engine/events/halloffame.asm](https://github.com/pret/pokecrystal/blob/master/engine/events/halloffame.asm): + +```diff +-; BUG: A "HOF Master!" title for 200-Time Famers is defined but inaccessible (see docs/bugs_and_glitches.md) + ld a, [wHallOfFameTempWinCount] +- cp HOF_MASTER_COUNT + 1 ++ cp HOF_MASTER_COUNT + jr c, .print_num_hof + ld de, .HOFMaster + hlcoord 1, 2 + call PlaceString + hlcoord 13, 2 + jr .finish +``` + + +## Scripted events + + +### Clair can give TM24 Dragonbreath twice + +([Video](https://www.youtube.com/watch?v=8BvBjqxmyOk)) + +**Fix:** + +Edit `DragonsDen1F_MapScripts` in [maps/DragonsDen1F.asm](https://github.com/pret/pokecrystal/blob/master/maps/DragonsDen1F.asm): + +```diff + def_callbacks ++ callback MAPCALLBACK_NEWMAP, .UnsetClairScene ++ ++.UnsetClairScene: ++ setmapscene DRAGONS_DEN_B1F, SCENE_DRAGONSDENB1F_NOOP ++ endcallback +``` + +And edit [maps/DragonsDenB1F.asm](https://github.com/pret/pokecrystal/blob/master/maps/DragonsDenB1F.asm): + +```diff + DragonsDenB1F_ClairScene: +-; BUG: Clair can give TM24 Dragonbreath twice (see docs/bugs_and_glitches.md) +``` + + +### Daisy's grooming doesn't always increase happiness + +Subtracting `$FF` from `$FF` fails to set the carry flag, which results in a 0.4% chance that Daisy's grooming will not affect your Pokémon's happiness. + +This is a bug with `HaircutOrGrooming` in [engine/events/haircut.asm](https://github.com/pret/pokecrystal/blob/master/engine/events/haircut.asm): + +```asm +.loop + sub [hl] + jr c, .ok + inc hl + inc hl + inc hl + jr .loop + +.ok + inc hl + ld a, [hli] + ld [wScriptVar], a + ld c, [hl] + call ChangeHappiness + ret + +... + +INCLUDE "data/events/happiness_probabilities.asm" + +CopyPokemonName_Buffer1_Buffer3: + ld hl, wStringBuffer1 + ld de, wStringBuffer3 + ld bc, MON_NAME_LENGTH + jp CopyBytes +``` + +**Fix:** Edit [data/events/happiness_probabilities.asm](https://github.com/pret/pokecrystal/blob/master/data/events/happiness_probabilities.asm): + +```diff + HappinessData_DaisysGrooming: +-; BUG: Daisy's grooming doesn't always increase happiness (see docs/bugs_and_glitches.md) +- db -1, 2, HAPPINESS_GROOMING ; 99.6% chance ++ db 50 percent, 2, HAPPINESS_GROOMING ; 50% chance ++ db -1, 2, HAPPINESS_GROOMING ; 50% chance +``` + + +### Magikarp in Lake of Rage are shorter, not longer + +`cp HIGH(1024)` should be `cp 3`, since 1024 mm = 3'4", but `HIGH(1024)` = 4. + +**Fix:** Edit `LoadEnemyMon.CheckMagikarpArea` in [engine/battle/core.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm): + +```diff + .CheckMagikarpArea: +-; BUG: Magikarp in Lake of Rage are shorter, not longer (see docs/bugs_and_glitches.md) + ld a, [wMapGroup] + cp GROUP_LAKE_OF_RAGE +- jr z, .Happiness ++ jr nz, .Happiness + ld a, [wMapNumber] + cp MAP_LAKE_OF_RAGE +- jr z, .Happiness ++ jr nz, .Happiness + ; 40% chance of not flooring + call Random + cp 39 percent + 1 + jr c, .Happiness + ; Try again if length < 1024 mm (i.e. if HIGH(length) < 3 feet) + ld a, [wMagikarpLength] +- cp HIGH(1024) ++ cp 3 + jr c, .GenerateDVs ; try again +``` + + +### Magikarp length limits have a unit conversion error + +- `cp HIGH(1536)` should be `cp 5`, since 1536 mm = 5'0", but `HIGH(1536)` = 6. +- `cp LOW(1616)` should be `cp 4`, since 1616 mm = 5'4", but `LOW(1616)` = 80. +- `cp LOW(1600)` should be `cp 3`, since 1600 mm = 5'3", but `LOW(1600)` = 64. + +**Fix:** Edit `LoadEnemyMon.CheckMagikarpArea` in [engine/battle/core.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/core.asm): + +```diff + ; Get Magikarp's length +-; BUG: Magikarp length limits have a unit conversion error (see docs/bugs_and_glitches.md) + ld de, wEnemyMonDVs + ld bc, wPlayerID + callfar CalcMagikarpLength + + ; No reason to keep going if length > 1536 mm (i.e. if HIGH(length) > 6 feet) + ld a, [wMagikarpLength] +- cp HIGH(1536) ++ cp 5 + jr nz, .CheckMagikarpArea + + ; 5% chance of skipping both size checks + call Random + cp 5 percent + jr c, .CheckMagikarpArea + ; Try again if length >= 1616 mm (i.e. if LOW(length) >= 4 inches) + ld a, [wMagikarpLength + 1] +- cp LOW(1616) ++ cp 4 + jr nc, .GenerateDVs + + ; 20% chance of skipping this check + call Random + cp 20 percent - 1 + jr c, .CheckMagikarpArea + ; Try again if length >= 1600 mm (i.e. if LOW(length) >= 3 inches) + ld a, [wMagikarpLength + 1] +- cp LOW(1600) ++ cp 3 + jr nc, .GenerateDVs +``` + +**Better fix:** Rewrite the whole system to use millimeters instead of feet and inches, since they have better precision (1 in = 25.4 mm); and only convert from metric to imperial units for display purposes (or don't, of course). + + +### Magikarp lengths can be miscalculated + +**Fix:** Edit `CalcMagikarpLength.BCLessThanDE` in [engine/events/magikarp.asm](https://github.com/pret/pokecrystal/blob/master/engine/events/magikarp.asm): + +```diff + .BCLessThanDE: +-; BUG: Magikarp lengths can be miscalculated (see docs/bugs_and_glitches.md) + ld a, b + cp d + ret c +- ret nc + ld a, c + cp e + ret +``` + + +### `CheckOwnMon` only checks the first five letters of OT names + +([Video](https://www.youtube.com/watch?v=GVTTmReM4nQ)) + +This bug can allow you to talk to Eusine in Celadon City and encounter Ho-Oh with only traded legendary beasts. + +**Fix:** Edit `CheckOwnMon` in [engine/pokemon/search_owned.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokemon/search_owned.asm): + +```diff + ; check OT + + ld hl, wPlayerName + +-; BUG: CheckOwnMon only checks the first five letters of OT names (see docs/bugs_and_glitches.md) +-rept NAME_LENGTH_JAPANESE - 2 ++rept PLAYER_NAME_LENGTH - 2 + ld a, [de] + cp [hl] + jr nz, .notfound + cp "@" + jr z, .found ; reached end of string + inc hl + inc de + endr + + ld a, [de] + cp [hl] + jr z, .found +``` + + +### `CheckOwnMonAnywhere` does not check the Day-Care + +*This may have been intentional behavior; use your own judgment for whether to fix it.* + +This bug can prevent you from talking to Eusine in Celadon City or encountering Ho-Oh when a caught legendary beast is in the Day-Care. + +**Fix:** Edit `CheckOwnMonAnywhere` in [engine/pokemon/search_owned.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokemon/search_owned.asm): + +```diff +-; BUG: CheckOwnMon does not check the Day-Care (see docs/bugs_and_glitches.md) ++ ld hl, wBreedMon1Species ++ ld bc, wBreedMon1OT ++ call CheckOwnMon ++ ret c ; found! ++ ++ ld hl, wBreedMon2Species ++ ld bc, wBreedMon2OT ++ call CheckOwnMon ++ ret c ; found! ++ + ld d, a + ld e, 0 + ld hl, wPartyMon1Species + ld bc, wPartyMonOTs +``` + + +### The unused `phonecall` script command may crash + +The `phonecall` script command calls the `PhoneCall` routine, which calls the `BrokenPlaceFarString` routine; this switches banks without being in bank 0, so it would start running arbitrary data as code. + +**Fix:** Edit `PhoneCall.CallerTextboxWithName` in [engine/phone/phone.asm](https://github.com/pret/pokecrystal/blob/master/engine/phone/phone.asm): + +```diff +-; BUG: The unused phonecall script command may crash (see docs/bugs_and_glitches.md) +- ld a, [wPhoneScriptBank] +- ld b, a + ld a, [wPhoneCaller] + ld e, a + ld a, [wPhoneCaller + 1] + ld d, a +- call BrokenPlaceFarString ++ ld a, [wPhoneScriptBank] ++ call PlaceFarString + ret +``` + +You can also delete the now-unused `BrokenPlaceFarString` routine in the same file. + + +## Internal engine routines + + +### Saves corrupted by mid-save shutoff are not handled + +([Video 1](https://www.youtube.com/watch?v=ukqtK0l6bu0), [Video 2](https://www.youtube.com/watch?v=c2zHd1BPtvc)) + +This allows Pokémon to be duplicated, among other effects. It does not have a simple and accurate fix. A fix would involve redesigning parts of the save system for Pokémon boxes. + + +### `ScriptCall` can overflow `wScriptStack` and crash + +**Fix:** Edit `ScriptCall` in [engine/overworld/scripting.asm](https://github.com/pret/pokecrystal/blob/master/engine/overworld/scripting.asm): + +```diff + ScriptCall: +-; BUG: ScriptCall can overflow wScriptStack and crash (see docs/bugs_and_glitches.md) +- ++ ld hl, wScriptStackSize ++ ld a, [hl] ++ cp 5 ++ ret nc + push de +- ld hl, wScriptStackSize +- ld e, [hl] + inc [hl] ++ ld e, a + ld d, 0 + ld hl, wScriptStack + add hl, de + add hl, de + add hl, de + pop de + ld a, [wScriptBank] + ld [hli], a + ld a, [wScriptPos] + ld [hli], a + ld a, [wScriptPos + 1] + ld [hl], a + ld a, b + ld [wScriptBank], a + ld a, e + ld [wScriptPos], a + ld a, d + ld [wScriptPos + 1], a + ret +``` + + +### `LoadSpriteGFX` does not limit the capacity of `UsedSprites` + +**Fix:** Edit `LoadSpriteGFX` in [engine/overworld/overworld.asm](https://github.com/pret/pokecrystal/blob/master/engine/overworld/overworld.asm): + +```diff + LoadSpriteGFX: +-; BUG: LoadSpriteGFX does not limit the capacity of UsedSprites (see docs/bugs_and_glitches.md) +- + ld hl, wUsedSprites + ld b, SPRITE_GFX_LIST_CAPACITY + .loop + ld a, [hli] + and a + jr z, .done + push hl + call .LoadSprite + pop hl + ld [hli], a + dec b + jr nz, .loop + + .done + ret + + .LoadSprite: ++ push bc + call GetSprite ++ pop bc + ld a, l + ret +``` + + +### `ChooseWildEncounter` doesn't really validate the wild Pokémon species + +**Fix:** Edit `ChooseWildEncounter` in [engine/overworld/wildmons.asm](https://github.com/pret/pokecrystal/blob/master/engine/overworld/wildmons.asm): + +```diff + .ok +-; BUG: ChooseWildEncounter doesn't really validate the wild Pokemon species (see docs/bugs_and_glitches.md) + ld a, b + ld [wCurPartyLevel], a + ld b, [hl] ++ ld a, b + call ValidateTempWildMonSpecies + jr c, .nowildbattle + +- ld a, b + cp UNOWN + jr nz, .done +``` + + +### `TryObjectEvent` arbitrary code execution + +If `IsInArray` returns `nc`, data at `bc` will be executed as code. + +**Fix:** Edit `TryObjectEvent` in [engine/overworld/events.asm](https://github.com/pret/pokecrystal/blob/master/engine/overworld/events.asm): + +```diff +-; BUG: TryObjectEvent arbitrary code execution (see docs/bugs_and_glitches.md) + push bc + ld de, 3 + ld hl, ObjectEventTypeArray + call IsInArray +- jr nc, .nope + pop bc ++ jr nc, .nope + + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + + .nope + xor a + ret +``` + + +### `ReadObjectEvents` overflows into `wObjectMasks` + +**Fix:** Edit `ReadObjectEvents` in [home/map.asm](https://github.com/pret/pokecrystal/blob/master/home/map.asm): + +```diff +-; get NUM_OBJECTS - [wCurMapObjectEventCount] ++; get NUM_OBJECTS - [wCurMapObjectEventCount] - 1 +-; BUG: ReadObjectEvents overflows into wObjectMasks (see docs/bugs_and_glitches.md) + ld a, [wCurMapObjectEventCount] + ld c, a +- ld a, NUM_OBJECTS ++ ld a, NUM_OBJECTS - 1 + sub c + jr z, .skip ++ jr c, .skip + + ; could have done "inc hl" instead + ld bc, 1 + add hl, bc + ld bc, MAPOBJECT_LENGTH + .loop + ld [hl], 0 + inc hl + ld [hl], -1 + dec hl + add hl, bc + dec a + jr nz, .loop +``` + + +### `ClearWRAM` only clears WRAM bank 1 + +**Fix:** Edit `ClearWRAM` in [home/init.asm](https://github.com/pret/pokecrystal/blob/master/home/init.asm): + +```diff + ClearWRAM:: + ; Wipe swappable WRAM banks (1-7) + ; Assumes CGB or AGB +-; BUG: ClearWRAM only clears WRAM bank 1 (see docs/bugs_and_glitches.md) + + ld a, 1 + .bank_loop + push af + ldh [rSVBK], a + xor a + ld hl, WRAM1_Begin + ld bc, WRAM1_End - WRAM1_Begin + call ByteFill + pop af + inc a + cp 8 +- jr nc, .bank_loop ++ jr c, .bank_loop + ret +``` + + +### `BattleAnimCmd_ClearObjs` only clears the first 6⅔ objects + +**Fix:** Edit `BattleAnimCmd_ClearObjs` in [engine/battle_anims/anim_commands.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle_anims/anim_commands.asm): + +```diff + BattleAnimCmd_ClearObjs: +-; BUG: BattleAnimCmd only clears the first 6⅔ objects (see docs/bugs_and_glitches.md) + ld hl, wActiveAnimObjects +- ld a, $a0 ++ ld a, NUM_ANIM_OBJECTS * BATTLEANIMSTRUCT_LENGTH + .loop + ld [hl], 0 + inc hl + dec a + jr nz, .loop + ret +``` + + +### Options menu fails to clear joypad state on initialization + +([Video](https://www.youtube.com/watch?v=uhDSIkXkl3g)) + +This bug allows all the options to be updated at once if the left or right buttons are pressed on the same frame that the options menu is opened. + +**Fix:** Edit `_Option` in [engine/menus/options_menu.asm](https://github.com/pret/pokecrystal/blob/master/engine/menus/options_menu.asm): + +```diff + _Option: +-; BUG: Options menu fails to clear joypad state on initialization (see docs/bugs_and_glitches.md) ++ call ClearJoypad + ld hl, hInMenu + ld a, [hl] + push af +``` diff --git a/docs/design_flaws.md b/docs/design_flaws.md new file mode 100644 index 0000000..213c35f --- /dev/null +++ b/docs/design_flaws.md @@ -0,0 +1,852 @@ +# Design Flaws + +These are parts of the code that do not work *incorrectly*, like [bugs and glitches](https://github.com/pret/pokecrystal/blob/master/docs/bugs_and_glitches.md), but that clearly exist just to work around a problem. In other words, with a slightly different design, the code would not need to exist at all. Design flaws may be exceptions to a usual rule, such as "tables of pointers in different banks use `dba`" ([one exception](#pic-banks-are-offset-by-pics_fix), [and another](#pok%C3%A9dex-entry-banks-are-derived-from-their-species-ids)) or "graphics used as a unit are stored and loaded contiguously" ([a notable exception](#footprints-are-split-into-top-and-bottom-halves)). + + +## Contents + +- [Pic banks are offset by `PICS_FIX`](#pic-banks-are-offset-by-pics_fix) +- [`PokemonPicPointers` and `UnownPicPointers` are assumed to start at the same address](#pokemonpicpointers-and-unownpicpointers-are-assumed-to-start-at-the-same-address) +- [Footprints are split into top and bottom halves](#footprints-are-split-into-top-and-bottom-halves) +- [Music IDs $64 and $80 or above have special behavior](#music-ids-64-and-80-or-above-have-special-behavior) +- [`ITEM_C3` and `ITEM_DC` break up the continuous sequence of TM items](#item_c3-and-item_dc-break-up-the-continuous-sequence-of-tm-items) +- [Pokédex entry banks are derived from their species IDs](#pok%C3%A9dex-entry-banks-are-derived-from-their-species-ids) +- [The 6-bit caught level can only record up to level 63](#the-6-bit-caught-level-can-only-record-up-to-level-63) +- [Identical sine wave code and data is repeated five times](#identical-sine-wave-code-and-data-is-repeated-five-times) +- [`GetForestTreeFrame` works, but it's still bad](#getforesttreeframe-works-but-its-still-bad) +- [The overworld scripting engine assumes no more than 127 banks](#the-overworld-scripting-engine-assumes-no-more-than-127-banks) + + +## Pic banks are offset by `PICS_FIX` + +[data/pokemon/pic_pointers.asm](https://github.com/pret/pokecrystal/blob/master/data/pokemon/pic_pointers.asm), [data/pokemon/unown_pic_pointers.asm](https://github.com/pret/pokecrystal/blob/master/data/pokemon/unown_pic_pointers.asm), and [data/trainers/pic_pointers.asm](https://github.com/pret/pokecrystal/blob/master/data/trainers/pic_pointers.asm) all have to use `dba_pic` instead of `dba`. This is a macro in [macros/data.asm](https://github.com/pret/pokecrystal/blob/master/macros/data.asm) that offsets banks by `PICS_FIX`: + +```asm +MACRO dba_pic ; dbw bank, address + db BANK(\1) - PICS_FIX + dw \1 +ENDM +``` + +The offset is translated into a correct bank by `FixPicBank` in [engine/gfx/load_pics.asm](https://github.com/pret/pokecrystal/blob/master/engine/gfx/load_pics.asm): + +```asm +FixPicBank: +; This is a thing for some reason. + +DEF PICS_FIX EQU $36 +GLOBAL PICS_FIX + + push hl + push bc + sub BANK("Pics 1") - PICS_FIX + ld c, a + ld b, 0 + ld hl, .PicsBanks + add hl, bc + ld a, [hl] + pop bc + pop hl + ret + +.PicsBanks: + db BANK("Pics 1") ; BANK("Pics 1") + 0 + ... + db BANK("Pics 24") ; BANK("Pics 1") + 23 +``` + +**Fix:** Delete `FixPicBank` and remove all four calls to `FixPicBank` in [engine/gfx/load_pics.asm](https://github.com/pret/pokecrystal/blob/master/engine/gfx/load_pics.asm). Then use `dba` instead of `dba_pic` everywhere. + + +## `PokemonPicPointers` and `UnownPicPointers` are assumed to start at the same address + +`GetFrontpicPointer` and `GetMonBackpic` in [engine/gfx/load_pics.asm](https://github.com/pret/pokecrystal/blob/master/engine/gfx/load_pics.asm) make this assumption, which has to be accounted for in the data files. + +In [gfx/pics.asm](https://github.com/pret/pokecrystal/blob/master/gfx/pics.asm): + +```asm +; PokemonPicPointers and UnownPicPointers are assumed to start at the same +; address, but in different banks. This is enforced in layout.link. + + +SECTION "Pic Pointers", ROMX + +INCLUDE "data/pokemon/pic_pointers.asm" + + +SECTION "Unown Pic Pointers", ROMX + +INCLUDE "data/pokemon/unown_pic_pointers.asm" +``` + +In [layout.link](https://github.com/pret/pokecrystal/blob/master/layout.link): + +``` +ROMX $48 + org $4000 + "Pic Pointers" + "Pics 1" +ROMX $49 + org $4000 + "Unown Pic Pointers" + "Pics 2" +``` + +**Fix:** + +Don't enforce `org $4000` in [layout.link](https://github.com/pret/pokecrystal/blob/master/layout.link). + +Edit `GetFrontpicPointer`: + +```diff + ld a, [wCurPartySpecies] + cp UNOWN + jr z, .unown ++ ld hl, PokemonPicPointers + ld a, [wCurPartySpecies] + ld d, BANK(PokemonPicPointers) + jr .ok + .unown ++ ld hl, UnownPicPointers + ld a, [wUnownLetter] + ld d, BANK(UnownPicPointers) + .ok +- ; These are assumed to be at the same address in their respective banks. +- assert PokemonPicPointers == UnownPicPointers +- ld hl, PokemonPicPointers + dec a + ld bc, 6 + call AddNTimes +``` + +And `GetMonBackpic`: + +```diff +- ; These are assumed to be at the same address in their respective banks. +- assert PokemonPicPointers == UnownPicPointers + ld hl, PokemonPicPointers + ld a, b + ld d, BANK(PokemonPicPointers) + cp UNOWN + jr nz, .ok ++ ld hl, UnownPicPointers + ld a, c + ld d, BANK(UnownPicPointers) + .ok + dec a + ld bc, 6 + call AddNTimes +``` + + +## Footprints are split into top and bottom halves + +In [gfx/footprints.asm](https://github.com/pret/pokecrystal/blob/master/gfx/footprints.asm): + +```asm +; Footprints are 2x2 tiles each, but are stored as a 16x64-tile image +; (32 rows of 8 footprints per row). +; That means there's a row of the top two tiles for eight footprints, +; then a row of the bottom two tiles for those eight footprints. + +; These macros help extract the first and the last two tiles, respectively. +DEF footprint_top EQUS "0, 2 * LEN_1BPP_TILE" +DEF footprint_bottom EQUS "2 * LEN_1BPP_TILE, 2 * LEN_1BPP_TILE" + +Footprints: +; Entries correspond to Pokémon species, two apiece, 8 tops then 8 bottoms + table_width LEN_1BPP_TILE * 4, Footprints + +; 001-008 top halves +INCBIN "gfx/footprints/bulbasaur.1bpp", footprint_top +INCBIN "gfx/footprints/ivysaur.1bpp", footprint_top +INCBIN "gfx/footprints/venusaur.1bpp", footprint_top +INCBIN "gfx/footprints/charmander.1bpp", footprint_top +INCBIN "gfx/footprints/charmeleon.1bpp", footprint_top +INCBIN "gfx/footprints/charizard.1bpp", footprint_top +INCBIN "gfx/footprints/squirtle.1bpp", footprint_top +INCBIN "gfx/footprints/wartortle.1bpp", footprint_top +; 001-008 bottom halves +INCBIN "gfx/footprints/bulbasaur.1bpp", footprint_bottom +INCBIN "gfx/footprints/ivysaur.1bpp", footprint_bottom +INCBIN "gfx/footprints/venusaur.1bpp", footprint_bottom +INCBIN "gfx/footprints/charmander.1bpp", footprint_bottom +INCBIN "gfx/footprints/charmeleon.1bpp", footprint_bottom +INCBIN "gfx/footprints/charizard.1bpp", footprint_bottom +INCBIN "gfx/footprints/squirtle.1bpp", footprint_bottom +INCBIN "gfx/footprints/wartortle.1bpp", footprint_bottom +... +``` + +`Pokedex_LoadAnyFootprint` in [engine/pokedex/pokedex.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokedex/pokedex.asm) has to load the halves separately. + +**Fix:** + +Store footprints contiguously: + +```asm + +Footprints: + table_width LEN_1BPP_TILE * 4, Footprints + +INCBIN "gfx/footprints/bulbasaur.1bpp" +INCBIN "gfx/footprints/ivysaur.1bpp" +INCBIN "gfx/footprints/venusaur.1bpp" +INCBIN "gfx/footprints/charmander.1bpp" +INCBIN "gfx/footprints/charmeleon.1bpp" +INCBIN "gfx/footprints/charizard.1bpp" +INCBIN "gfx/footprints/squirtle.1bpp" +INCBIN "gfx/footprints/wartortle.1bpp" +... +``` + +Edit `Pokedex_LoadAnyFootprint`: + +```diff + ld a, [wTempSpecies] + dec a + and %111 + swap a ; * $10 ++ add a, a + ld l, a + ld h, 0 + add hl, de + ld de, Footprints + add hl, de + +- push hl + ld e, l + ld d, h + ld hl, vTiles2 tile $62 +- lb bc, BANK(Footprints), 2 ++ lb bc, BANK(Footprints), 4 + call Request1bpp +- pop hl +- +- ; Whoever was editing footprints forgot to fix their +- ; tile editor. Now each bottom half is 8 tiles off. +- ld de, 8 tiles +- add hl, de +- +- ld e, l +- ld d, h +- ld hl, vTiles2 tile $64 +- lb bc, BANK(Footprints), 2 +- call Request1bpp +``` + + +## Music IDs $64 and $80 or above have special behavior + +If a map's music ID in [data/maps/maps.asm](https://github.com/pret/pokecrystal/blob/master/master/data/maps/maps.asm) is $64 (the value of `MUSIC_MAHOGANY_MART` or `MUSIC_SUICUNE_BATTLE`) it will play either `MUSIC_ROCKET_HIDEOUT` or `MUSIC_CHERRYGROVE_CITY`. Moreover, if a map's music ID is $80 or above (the value of `RADIO_TOWER_MUSIC`) it might play `MUSIC_ROCKET_OVERTURE` or something else. This is caused by `GetMapMusic` in [home/map.asm](https://github.com/pret/pokecrystal/blob/master/master/home/map.asm). + +**Fix:** + +Replace `RADIO_TOWER_MUSIC | MUSIC_GOLDENROD_CITY` with `MUSIC_RADIO_TOWER` in [data/maps/maps.asm](https://github.com/pret/pokecrystal/blob/master/master/data/maps/maps.asm). + +Redefine the special music constants in [constants/music_constants.asm](https://github.com/pret/pokecrystal/blob/master/master/constants/music_constants.asm): + +```diff +-; GetMapMusic picks music for this value (see home/map.asm) +-DEF MUSIC_MAHOGANY_MART EQU $64 ++; GetMapMusic picks music for these values (see home/map.asm) ++DEF MUSIC_MAHOGANY_MART EQU $fc ++DEF MUSIC_RADIO_TOWER EQU $fd + + ; ExitPokegearRadio_HandleMusic uses these values + DEF RESTART_MAP_MUSIC EQU $fe + DEF ENTER_MAP_MUSIC EQU $ff +- +-; GetMapMusic picks music for this bit flag +-DEF RADIO_TOWER_MUSIC_F EQU 7 +-DEF RADIO_TOWER_MUSIC EQU 1 << RADIO_TOWER_MUSIC_F +``` + +Edit `GetMapMusic`: + +```diff + GetMapMusic:: + push hl + push bc + ld de, MAP_MUSIC + call GetMapField + ld a, c + cp MUSIC_MAHOGANY_MART + jr z, .mahoganymart +- bit RADIO_TOWER_MUSIC_F, c +- jr nz, .radiotower ++ cp MUSIC_RADIO_TOWER ++ jr z, .radiotower + farcall Function8b342 + ld e, c + ld d, 0 + .done + pop bc + pop hl + ret + + .radiotower + ld a, [wStatusFlags2] + bit STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F, a + jr z, .clearedradiotower + ld de, MUSIC_ROCKET_OVERTURE + jr .done + + .clearedradiotower +- ; the rest of the byte +- ld a, c +- and RADIO_TOWER_MUSIC - 1 +- ld e, a +- ld d, 0 ++ ld de, MUSIC_GOLDENROD_CITY + jr .done + + .mahoganymart + ld a, [wStatusFlags2] + bit STATUSFLAGS2_ROCKETS_IN_MAHOGANY_F, a + jr z, .clearedmahogany + ld de, MUSIC_ROCKET_HIDEOUT + jr .done + + .clearedmahogany + ld de, MUSIC_CHERRYGROVE_CITY + jr .done +``` + + +## `ITEM_C3` and `ITEM_DC` break up the continuous sequence of TM items + +[constants/item_constants.asm](https://github.com/pret/pokecrystal/blob/master/constants/item_constants.asm) defined the 50 TMs in order with `add_tm`, but `ITEM_C3` and `ITEM_DC` break up that sequence. + +```asm + add_tm DYNAMICPUNCH ; bf + ... + add_tm ROLLOUT ; c2 + const ITEM_C3 ; c3 + add_tm ROAR ; c4 + ... + add_tm DIG ; db + const ITEM_DC ; dc + add_tm PSYCHIC_M ; dd + ... + add_tm NIGHTMARE ; f2 +DEF NUM_TMS EQU const_value - TM01 - 2 ; discount ITEM_C3 and ITEM_DC +``` + +`GetTMHMNumber` and `GetNumberedTMHM` in [engine/items/items.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/items.asm) have to compensate for this. + +> There was originally a good reason for these two gaps! +> +> Pokémon traded from RBY to GSC have their catch rate interpreted as their new held item. This was planned early on in development, so some items were given indexes corresponding to appropriate Gen 1 catch rates: +> +> - $03 = 3: `BRIGHTPOWDER` is for Articuno, Zapdos, Moltres, and Mewtwo +> - $1E = 30: `LUCKY_PUNCH` is for Chansey +> - $23 = 35: `METAL_POWDER` is for Ditto +> - $3C = 60: `SILVER_LEAF` is for 10 Pokémon +> - $4B = 75: `GOLD_LEAF` is for 13 Pokémon +> - $96 = 150: `MYSTERYBERRY` is for Clefairy +> - $AA = 170: `POLKADOT_BOW` is for Jigglypuff +> - $B4 = 180: `BRICK_PIECE` is for Machop +> +> Yellow was also being developed then, and it did the reverse, altering some Pokémon's data after they're caught to correspond to appropriate Gen 2 items: +> +> - Starter Pikachu's catch rate byte is overwritten with 163 = $A3 for `LIGHT_BALL` +> - Wild-caught Kadabra's catch rate byte is overwritten with 96 = $60 for `TWISTEDSPOON` +> +> (Yellow also directly changed Dragonair's catch rate to 27 and Dragonite's to 9, but this seems to have been only for adjusting their difficulty, since those meaninglessly correspond to `PROTEIN` and `ANTIDOTE`.) +> +> Most catch rates were left as gaps in the item list, and transformed into held items via the `TimeCapsule_CatchRateItems` table in [data/items/catch_rate_items.asm](https://github.com/pret/pokecrystal/blob/master/data/items/catch_rate_items.asm). For example, the 52 Pokémon with catch rate 45 would hold the gap `ITEM_2D`, except that gets transformed into `BITTER_BERRY`. +> +> But a few Pokémon end up with weird items. Abra has a catch rate of 200, or $C8; and Krabby, Horsea, Goldeen, and Staryu have a catch rate of 225, or $E1. Those indexes correspond to the items `TM_PSYCH_UP` and `TM_ICE_PUNCH`, which seem like random choices—because they are. +> +> The TMs and HMs span from indexes $BF to $F9. However, as we can see in [pokegold-spaceworld](https://github.com/pret/pokegold-spaceworld/blob/master/constants/item_constants.asm), they *originally* spanned $C4 to $FF. For some reason they were shifted down by 5 during development. +> +> Before the index shift, the gap `ITEM_C3` would have been at index $C8, and `ITEM_DC` at $E1. In other words, they would have neatly corresponded to the catch rates for those five Pokémon! Then they would have held `BERRY` when traded through the Time Capsule (since the gap items get transformed via `TimeCapsule_CatchRateItems`). + +**Fix:** + +Move `ITEM_C3` and `ITEM_DC` above all the TMs in every table of item data. + +Edit [engine/items/items.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/items.asm): + +```diff + GetTMHMNumber:: + ; Return the number of a TM/HM by item id c. + ld a, c +-; Skip any dummy items. +- cp ITEM_C3 ; TM04-05 +- jr c, .done +- cp ITEM_DC ; TM28-29 +- jr c, .skip +- dec a +-.skip +- dec a +-.done + sub TM01 + inc a + ld c, a + ret + + GetNumberedTMHM: + ; Return the item id of a TM/HM by number c. + ld a, c +-; Skip any gaps. +- cp ITEM_C3 - (TM01 - 1) +- jr c, .done +- cp ITEM_DC - (TM01 - 1) - 1 +- jr c, .skip_one +-.skip_two +- inc a +-.skip_one +- inc a +-.done + add TM01 + dec a + ld c, a + ret +``` + + +## Pokédex entry banks are derived from their species IDs + +`PokedexDataPointerTable` in [data/pokemon/dex_entry_pointers.asm](https://github.com/pret/pokecrystal/blob/master/data/pokemon/dex_entry_pointers.asm) is a table of `dw`, not `dba`, yet there are four banks used for Pokédex entries. The correct bank is derived from the species ID at the beginning of each Pokémon's base stats. (This is the only use the base stat species ID has.) + +Three separate routines do the same derivation: `GetDexEntryPointer` in [engine/pokedex/pokedex_2.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokedex/pokedex_2.asm): + +```asm +GetDexEntryPointer: +; return dex entry pointer b:de + push hl + ld hl, PokedexDataPointerTable + ld a, b + dec a + ld d, 0 + ld e, a + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + push de + rlca + rlca + maskbits NUM_DEX_ENTRY_BANKS + ld hl, .PokedexEntryBanks + ld d, 0 + ld e, a + add hl, de + ld b, [hl] + pop de + pop hl + ret + +.PokedexEntryBanks: + db BANK("Pokedex Entries 001-064") + db BANK("Pokedex Entries 065-128") + db BANK("Pokedex Entries 129-192") + db BANK("Pokedex Entries 193-251") +``` + +`HeavyBall_GetDexEntryBank` in [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm): + +```asm +HeavyBall_GetDexEntryBank: + push hl + push de + ld a, [wEnemyMonSpecies] + rlca + rlca + maskbits NUM_DEX_ENTRY_BANKS + ld hl, .PokedexEntryBanks + ld d, 0 + ld e, a + add hl, de + ld a, [hl] + pop de + pop hl + ret + +.PokedexEntryBanks: + db BANK("Pokedex Entries 001-064") + db BANK("Pokedex Entries 065-128") + db BANK("Pokedex Entries 129-192") + db BANK("Pokedex Entries 193-251") +``` + +And `PokedexShow_GetDexEntryBank` in [engine/pokegear/radio.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokegear/radio.asm): + +```asm +PokedexShow_GetDexEntryBank: + push hl + push de + ld a, [wCurPartySpecies] + dec a + rlca + rlca + maskbits NUM_DEX_ENTRY_BANKS + ld hl, .PokedexEntryBanks + ld d, 0 + ld e, a + add hl, de + ld a, [hl] + pop de + pop hl + ret + +.PokedexEntryBanks: + db BANK("Pokedex Entries 001-064") + db BANK("Pokedex Entries 065-128") + db BANK("Pokedex Entries 129-192") + db BANK("Pokedex Entries 193-251") +``` + +**Fix:** + +Use `dba` instead of `dw` in `PokedexDataPointerTable`. Make sure to edit the `table_width` line to specify a width of 3 instead of 2. + +Delete `HeavyBall_GetDexEntryBank` and `PokedexShow_GetDexEntryBank`. You can also delete `NUM_DEX_ENTRY_BANKS` from [constants/pokemon_data_constants.asm](https://github.com/pret/pokecrystal/blob/master/constants/pokemon_data_constants.asm). + +Edit [engine/pokedex/pokedex_2.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokedex/pokedex_2.asm): + +```diff + GetDexEntryPointer: + ; return dex entry pointer b:de + push hl + ld hl, PokedexDataPointerTable + ld a, b + dec a + ld d, 0 + ld e, a + add hl, de + add hl, de +- ld e, [hl] +- inc hl +- ld d, [hl] +- push de +- rlca +- rlca +- maskbits NUM_DEX_ENTRY_BANKS +- ld hl, .PokedexEntryBanks +- ld d, 0 +- ld e, a +- add hl, de +- ld b, [hl] +- pop de ++ add hl, de ++ ; b = bank ++ ld a, [hli] ++ ld b, a ++ ; de = address ++ ld a, [hli] ++ ld e, a ++ ld d, [hl] + pop hl + ret +- +-.PokedexEntryBanks: +- db BANK("Pokedex Entries 001-064") +- db BANK("Pokedex Entries 065-128") +- db BANK("Pokedex Entries 129-192") +- db BANK("Pokedex Entries 193-251") +``` + +Edit [engine/items/item_effects.asm](https://github.com/pret/pokecrystal/blob/master/engine/items/item_effects.asm): + +```diff + HeavyBallMultiplier: + ; subtract 20 from catch rate if weight < 102.4 kg + ; else add 0 to catch rate if weight < 204.8 kg + ; else add 20 to catch rate if weight < 307.2 kg + ; else add 30 to catch rate if weight < 409.6 kg + ; else add 40 to catch rate + ld a, [wEnemyMonSpecies] + ld hl, PokedexDataPointerTable + dec a + ld e, a + ld d, 0 + add hl, de + add hl, de ++ add hl, de ++ ; d = bank, hl = address ++ ld a, BANK(PokedexDataPointerTable) ++ call GetFarByte ++ push af ++ inc hl + ld a, BANK(PokedexDataPointerTable) + call GetFarWord ++ pop de + + .SkipText: +- call HeavyBall_GetDexEntryBank ++ ld a, d + call GetFarByte + inc hl + cp "@" + jr nz, .SkipText + +- call HeavyBall_GetDexEntryBank ++ ld a, d + push bc + inc hl + inc hl + call GetFarWord +``` + +And edit [engine/pokegear/radio.asm](https://github.com/pret/pokecrystal/blob/master/engine/pokegear/radio.asm): + +```diff + PokedexShow2: + ld a, [wCurPartySpecies] + dec a + ld hl, PokedexDataPointerTable + ld c, a + ld b, 0 + add hl, bc + add hl, bc ++ add hl, bc ++ ; b = bank ++ ld a, BANK(PokedexDataPointerTable) ++ call GetFarByte ++ ld b, a ++ inc hl ++ ; hl = address + ld a, BANK(PokedexDataPointerTable) + call GetFarWord +- call PokedexShow_GetDexEntryBank ++ ld a, b + push af + push hl + call CopyDexEntryPart1 +``` + + +## The 6-bit caught level can only record up to level 63 + +Crystal added the Poké Seer, who tells you your Pokémon's caught data: where it was caught, what time, and at what level. The status screen also displays the gender of its Original Trainer, since Crystal added player genders. This data is packed into two previously-unused bytes in the `box_struct`; from [macros/ram.asm](https://github.com/pret/pokecrystal/blob/master/macros/ram.asm): + +```asm +MACRO box_struct +\1Species:: db +... +\1CaughtData:: +\1CaughtTime:: +\1CaughtLevel:: db +\1CaughtGender:: +\1CaughtLocation:: db +\1Level:: db +\1BoxEnd:: +ENDM +``` + +These four pieces of data are packed into two bytes using the bitmasks in [constants/pokemon_data_constants.asm](https://github.com/pret/pokecrystal/blob/master/constants/pokemon_data_constants.asm): + +```asm +DEF CAUGHT_TIME_MASK EQU %11000000 +DEF CAUGHT_LEVEL_MASK EQU %00111111 + +DEF CAUGHT_GENDER_MASK EQU %10000000 +DEF CAUGHT_LOCATION_MASK EQU %01111111 +``` + +The caught level only uses six bits, so it can only record levels as high as 2^6 − 1 = 63. If a Pokémon is caught at level 64 or higher, its level overflows into the two bits used for the caught time, before the actual caught time is stored in the same byte with a bitwise `or` operation. For example, a Pokémon caught at level 70 (`%01000110`) in the morning (`%00000000`) would be reported as caught at level 6 (`%000110` in the low six bits) during the day (`%01` in the high two bits). + +This limitation is probably why Lugia and Ho-Oh are both encountered at level 60 in Crystal, instead of level 70 in GS. + +**Possible fixes:** + +- Record any level higher than 63 as level 0, and have the Poké Seer report 0 as "very high". +- Use seven bits for the level (which can store up to level 2^7 − 1 = 127) and one for the time, simply recording 0 for morning or day and 1 for night. +- Move some data around into unused bits elsewhere in the `box_struct`, such as the high bit of `MON_LEVEL`, or the three high bits of `MON_EXP`. +- Add another byte for more caught data, making the `box_struct` larger; this would affect PC Box storage. +- Free up some other bytes in the `box_struct` (e.g. by [replacing](https://github.com/pret/pokecrystal/wiki/Replace-stat-experience-with-EVs) 2-byte stat experience with 1-byte EVs). + + +## Identical sine wave code and data is repeated five times + +`_Sine` in [engine/math/sine.asm](https://github.com/pret/pokecrystal/blob/master/engine/math/sine.asm): + +```asm +_Sine:: +; a = d * sin(e * pi/32) + ld a, e + calc_sine_wave +``` + +`Sprites_Cosine` and `Sprites_Sine` in [engine/gfx/sprites.asm](https://github.com/pret/pokecrystal/blob/master/engine/gfx/sprites.asm): + +```asm +Sprites_Cosine: +; a = d * cos(a * pi/32) + add %010000 ; cos(x) = sin(x + pi/2) + ; fallthrough +Sprites_Sine: +; a = d * sin(a * pi/32) + calc_sine_wave +``` + +`BattleAnim_Cosine` and `BattleAnim_Sine` in [engine/battle_anims/functions.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle_anims/functions.asm): + +```asm +BattleAnim_Cosine: +; a = d * cos(a * pi/32) + add %010000 ; cos(x) = sin(x + pi/2) + ; fallthrough +BattleAnim_Sine: +; a = d * sin(a * pi/32) + calc_sine_wave BattleAnimSineWave + +... + +BattleAnimSineWave: + sine_table 32 +``` + +`StartTrainerBattle_DrawSineWave` in [engine/battle/battle_transition.asm](https://github.com/pret/pokecrystal/blob/master/engine/battle/battle_transition.asm): + +```asm +StartTrainerBattle_DrawSineWave: + calc_sine_wave +``` + +And `CelebiEvent_Cosine` in [engine/events/celebi.asm](https://github.com/pret/pokecrystal/blob/master/engine/events/celebi.asm): + +```asm +CelebiEvent_Cosine: +; a = d * cos(a * pi/32) + add %010000 ; cos(x) = sin(x + pi/2) + calc_sine_wave +``` + +They all rely on `calc_sine_wave` in [macros/code.asm](https://github.com/pret/pokecrystal/blob/master/macros/code.asm): + +```asm +MACRO calc_sine_wave +; input: a = a signed 6-bit value +; output: a = d * sin(a * pi/32) + and %111111 + cp %100000 + jr nc, .negative\@ + call .apply\@ + ld a, h + ret +.negative\@ + and %011111 + call .apply\@ + ld a, h + xor $ff + inc a + ret +.apply\@ + ld e, a + ld a, d + ld d, 0 +if _NARG == 1 + ld hl, \1 +else + ld hl, .sinetable\@ +endc + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + ld hl, 0 +.multiply\@ ; factor amplitude + srl a + jr nc, .even\@ + add hl, de +.even\@ + sla e + rl d + and a + jr nz, .multiply\@ + ret +if _NARG == 0 +.sinetable\@ + sine_table 32 +endc +ENDM +``` + +And on `sine_table` in [macros/data.asm](https://github.com/pret/pokecrystal/blob/master/macros/data.asm): + +```asm +MACRO sine_table +; \1 samples of sin(x) from x=0 to x<0.5 turns (pi radians) + for x, \1 + dw sin(x * 0.5 / (\1)) + endr +ENDM +``` + +**Fix:** Edit [home/sine.asm](https://github.com/pret/pokecrystal/blob/master/home/sine.asm) to contain a single copy of the (co)sine code in bank 0, and call it from those five sites. + + +## `GetForestTreeFrame` works, but it's still bad + +The routine `GetForestTreeFrame` in [engine/tilesets/tileset_anims.asm](https://github.com/pret/pokecrystal/blob/master/engine/tilesets/tileset_anims.asm) is hilariously inefficient. + +**Fix:** + +Edit `GetForestTreeFrame`: + +```diff + GetForestTreeFrame: + ; Return 0 if a is even, or 2 if odd. +- and a +- jr z, .even +- cp 1 +- jr z, .odd +- cp 2 +- jr z, .even +- cp 3 +- jr z, .odd +- cp 4 +- jr z, .even +- cp 5 +- jr z, .odd +- cp 6 +- jr z, .even +-.odd +- ld a, 2 +- scf +- ret +-.even +- xor a ++ and 1 ++ add a + ret +``` + + +## The overworld scripting engine assumes no more than 127 banks + +The `CallCallback` and `ExitScriptSubroutine` functions in [engine/overworld/scripting.asm](https://github.com/pret/pokecrystal/blob/master/engine/overworld/scripting.asm) use the highest bit of the bank value, to store whether a certain script stack position should be treated as a return from a callback. However, it seems it was opted to explicitly use the `endcallback` command for this purpose, instead. + +As such, this bit serves no purpose but to make map scripts living in the higher banks of mappers such as Japanese Crystal's MBC30 crash for weird reasons. + +**Fix:** + +Remove the bit mask for the bank value in `ExitScriptSubroutine`: + +```diff + ExitScriptSubroutine: + ... + add hl, de + ld a, [hli] + ld b, a +- and $7f + ld [wScriptBank], a + ld a, [hli] + ld e, a +``` + +And in `CallCallback`: + +```diff + CallCallback:: +- ld a, [wScriptBank] +- or $80 +- ld [wScriptBank], a + jp ScriptCall +``` diff --git a/docs/event_commands.md b/docs/event_commands.md new file mode 100644 index 0000000..8e878a7 --- /dev/null +++ b/docs/event_commands.md @@ -0,0 +1,563 @@ +# Event Commands + +Defined in [macros/scripts/events.asm](https://github.com/pret/pokecrystal/blob/master/macros/scripts/events.asm) and [engine/overworld/scripting.asm:ScriptCommandTable](https://github.com/pret/pokecrystal/blob/master/engine/overworld/scripting.asm). + +Until this document is filled out, the [G/S Scripting Compendium](https://hax.iimarckus.org/files/scriptingcodes_eng.htm) has descriptions for most of these commands. It was written for G/S binary hacking and not Crystal assembly hacking, so it's not 100% accurate for pokecrystal. + + +## `$00`: scall script + + +## `$01`: farscall script + + +## `$02`: memcall script + + +## `$03`: sjump script + + +## `$04`: farsjump script + + +## `$05`: memjump script + + +## `$06`: ifequal byte, script + + +## `$07`: ifnotequal byte, script + + +## `$08`: iffalse script + + +## `$09`: iftrue script + + +## `$0A`: ifgreater byte, script + + +## `$0B`: ifless byte, script + + +## `$0C`: jumpstd std_script + + +## `$0D`: callstd std_script + + +## `$0E`: callasm asm + + +## `$0F`: special special_pointer + + +## `$10`: memcallasm asm + + +## `$11`: checkmapscene map + + +## `$12`: setmapscene map, scene_id + + +## `$13`: `checkscene` + + +## `$14`: setscene scene_id + + +## `$15`: setval value + +[wScriptVar] = value + + +## `$16`: addval value + +[wScriptVar] += value + + +## `$17`: random value + + +## `$18`: `checkver` + + +## `$19`: readmem address + +[wScriptVar] = [address] + + +## `$1A`: writemem address + +[address] = [wScriptVar] + + +## `$1B`: loadmem address, value + +[address] = value + + +## `$1C`: readvar variable + +[wScriptVar] = GetVarAction(variable) + + +## `$1D`: writevar variable + +GetVarAction(variable) = [wScriptVar] + + +## `$1E`: loadvar variable, value + +GetVarAction(variable) = value + + +## `$1F`: giveitem item_id[, quantity=1] + + +## `$20`: takeitem item_id[, quantity=1] + + +## `$21`: checkitem item_id + + +## `$22`: givemoney account, value + + +## `$23`: takemoney account, value + + +## `$24`: checkmoney account, value + + +## `$25`: givecoins value + + +## `$26`: takecoins value + + +## `$27`: checkcoins value + + +## `$28`: addcellnum contact_id + + +## `$29`: delcellnum contact_id + + +## `$2A`: checkcellnum contact_id + + +## `$2B`: checktime time + + +## `$2C`: checkpoke mon_id + + +## `$2D`: givepoke mon_id, level[, item=0[, ot_name, nickname]] + + +## `$2E`: giveegg mon_id, level + + +## `$2F`: givepokemail pointer + + +## `$30`: checkpokemail pointer + + +## `$31`: checkevent event_flag + + +## `$32`: clearevent event_flag + + +## `$33`: setevent event_flag + + +## `$34`: checkflag engine_flag + + +## `$35`: clearflag engine_flag + + +## `$36`: setflag engine_flag + + +## `$37`: `wildon` + + +## `$38`: `wildoff` + + +## `$39`: xycompare pointer + + +## `$3A`: warpmod warp_id, map + + +## `$3B`: blackoutmod map + + +## `$3C`: warp map, x, y + + +## `$3D`: getmoney string_buffer, account + +GetStringBuffer(string_buffer) = PrintNum(GetMoneyAccount(account)) + + +## `$3E`: getcoins string_buffer + +GetStringBuffer(string_buffer) = PrintNum([wCoins]) + + +## `$3F`: getnum string_buffer + +GetStringBuffer(string_buffer) = PrintNum([wScriptVar]) + + +## `$40`: getmonname string_buffer, mon_id + +GetStringBuffer(string_buffer) = GetPokemonName(mon_id) + +If mon_id = `USE_SCRIPT_VAR`, then it uses `[wScriptVar]` instead. + + +## `$41`: getitemname string_buffer, item_id + +GetStringBuffer(string_buffer) = GetItemName(item_id) + +If item_id = `USE_SCRIPT_VAR`, then it uses `[wScriptVar]` instead. + + +## `$42`: getcurlandmarkname string_buffer + +GetStringBuffer(string_buffer) = GetLandmarkName(GetWorldMapLocation()) + + +## `$43`: gettrainername string_buffer, trainer_group, trainer_id + +GetStringBuffer(string_buffer) = GetTrainerName(trainer_group, trainer_id) + + +## `$44`: getstring string_buffer, text_pointer + +GetStringBuffer(string_buffer) = CopyName1([wScriptBank], text_pointer) + + +## `$45`: `itemnotify` + + +## `$46`: `pocketisfull` + + +## `$47`: `opentext` + + +## `$48`: refreshscreen [dummy=0] + + +## `$49`: `closetext` + + +## `$4A`: writeunusedbyte byte + +[wUnusedScriptByte] = byte + + +## `$4B`: farwritetext text_pointer + + +## `$4C`: writetext text_pointer + + +## `$4D`: repeattext byte1, byte2 + + +## `$4E`: `yesorno` + + +## `$4F`: loadmenu menu_header + + +## `$50`: `closewindow` + + +## `$51`: jumptextfaceplayer text_pointer + + +## `$52`: farjumptext text_pointer + + +## `$53`: jumptext text_pointer + + +## `$54`: `waitbutton` + + +## `$55`: `promptbutton` + + +## `$56`: pokepic mon_id + + +## `$57`: `closepokepic` + + +## `$58`: `_2dmenu` + + +## `$59`: `verticalmenu` + + +## `$5A`: `loadpikachudata` + + +## `$5B`: `randomwildmon` + + +## `$5C`: `loadtemptrainer` + +`[wOtherTrainer] = [wTempTrainer]` + + +## `$5D`: loadwildmon mon_id, level + + +## `$5E`: loadtrainer trainer_group, trainer_id + + +## `$5F`: `startbattle` + + +## `$60`: `reloadmapafterbattle` + + +## `$61`: catchtutorial byte + + +## `$62`: trainertext text_id + + +## `$63`: trainerflagaction action + + +## `$64`: winlosstext win_text_pointer, loss_text_pointer + + +## `$65`: `scripttalkafter` + + +## `$66`: `endifjustbattled` + + +## `$67`: `checkjustbattled` + + +## `$68`: setlasttalked object_id + + +## `$69`: applymovement object_id, data_pointer + + +## `$6A`: applymovementlasttalked data_pointer + + +## `$6B`: `faceplayer` + + +## `$6C`: faceobject object1, object2 + + +## `$6D`: variablesprite variable_sprite_id, sprite_id + + +## `$6E`: disappear object_id + + +## `$6F`: appear object_id + + +## `$70`: follow object2, object1 + + +## `$71`: `stopfollow` + + +## `$72`: moveobject object_id, x, y + + +## `$73`: writeobjectxy object_id + + +## `$74`: loademote emote_id + + +## `$75`: showemote emote_id, object_id, length + + +## `$76`: turnobject object_id, facing + + +## `$77`: follownotexact object2, object1 + + +## `$78`: earthquake param + + +## `$79`: changemapblocks blockdata_pointer + +ChangeMap(blockdata_pointer) + + +## `$7A`: changeblock x, y, block + + +## `$7B`: `reloadmap` + + +## `$7C`: `reloadmappart` + + +## `$7D`: writecmdqueue queue_pointer + + +## `$7E`: delcmdqueue byte + + +## `$7F`: playmusic music_id + + +## `$80`: `encountermusic` + + +## `$81`: musicfadeout music_id, length + + +## `$82`: `playmapmusic` + + +## `$83`: `dontrestartmapmusic` + + +## `$84`: cry mon_id + + +## `$85`: playsound sfx_id + + +## `$86`: `waitsfx` + + +## `$87`: `warpsound` + + +## `$88`: `specialsound` + + +## `$89`: autoinput input_pointer + + +## `$8A`: newloadmap which_method + + +## `$8B`: pause length + + +## `$8C`: deactivatefacing length + + +## `$8D`: sdefer script + + +## `$8E`: `warpcheck` + + +## `$8F`: stopandsjump script + + +## `$90`: `endcallback` + + +## `$91`: `end` + + +## `$92`: reloadend which_method + + +## `$93`: `endall` + + +## `$94`: pokemart mart_type, mart_id + + +## `$95`: elevator floor_list + + +## `$96`: trade trade_id + + +## `$97`: askforphonenumber contact_id + + +## `$98`: phonecall call_id + + +## `$99`: `hangup` + + +## `$9A`: describedecoration byte + + +## `$9B`: fruittree tree_id + + +## `$9C`: specialphonecall call_id + + +## `$9D`: `checkphonecall` + + +## `$9E`: verbosegiveitem item_id[, quantity=1] + + +## `$9F`: verbosegiveitemvar item_id, variable + + +## `$A0`: swarm swarm_id, map + + +## `$A1`: `halloffame` + + +## `$A2`: `credits` + + +## `$A3`: warpfacing facing, map, x, y + + +## `$A4`: battletowertext bttext_id + + +## `$A5`: getlandmarkname string_buffer, landmark_id + +GetStringBuffer(string_buffer) = GetLandmarkName(landmark_id) + + +## `$A6`: gettrainerclassname string_buffer, trainer_group + +GetStringBuffer(string_buffer) = GetName(TRAINER_NAME, trainer_group) + + +## `$A7`: getname string_buffer, type, id + +GetStringBuffer(string_buffer) = GetName(type, id) + + +## `$A8`: wait duration + + +## `$A9`: `checksave` diff --git a/docs/images/hp_exp_bar_border.png b/docs/images/hp_exp_bar_border.png new file mode 100644 index 0000000000000000000000000000000000000000..dd79d66363e77833667aa9a054408d71893d9fc7 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VBp|jV_;y|uU+HLz`($g?&#~tz_78O`%fY( z0|NtNage(c!@6@aFBupZ0z6$DLo7}w|LA9tkdO#4P%O-1E_#zF@%2E!7Y0+?#=-2AcCz_8INz;@}(j0KDgmIayT VWBQ67GB7YOc)I$ztaD0e0su1OGuQwC literal 0 HcmV?d00001 diff --git a/docs/images/port.png b/docs/images/port.png new file mode 100644 index 0000000000000000000000000000000000000000..45fa26338846e113230333d112bee30b6b59d4d1 GIT binary patch literal 1526 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU@+idV_;yo`K4$d0|Ns~x}&cn1H;CC?mvmF z3=9m6#X;^)4C~IxykuZtUEt~B7*cWTZ4CFiTLuDWRClUO&vCuFAa%yy^|CLtgIew# z_RKl|rhf9{>7RGr&C5StD3i}FZT@lNy5e)Lzo!*{K6dy0_bY|-(re`&-`MxY;>o`m z?rjWWH$ItH-ut=#)w8I_=c-Q>OIW-ymzl2EsM2qGTqB}?qb%c1Ck8f^yje2hioI@& zii4M`WJ>o4^*osK;E~jp!imo3%9|L(Cde;l6v){r>0>oxX9rV#ocb=qNj-8upF~^{ z3FQ6om}9}p!awp^+-8j&A2enPDg5zx5P0ch+zzol{VJ_xe&DU9sZ)jGu^1!eQDPt4#5LOEjmmthaB}|Ugq_%`2XwWo|?vZ z@LfxzQO{-;m*4M%4hZY~;eB77VRloALGQpNhDjV3Hw5H$EPo`S;M2R=aK$I>#0BmQ z+%=ik)Kp?GujqKp%{aq$E60LHd0#O_h2X5qpKaF^&NbMuigB5bgUh4CEE{B2_px1= zvsRPoLG9+1kEgO6kU6r2Utr=76UK;)>5TJrJ5qnlSh=Fb^2LnEIGZ%)a-oD);f`B6 zP7UJs)i*^v3(a2T6U}246>HqU;t-nAc>df;A%@n+(HtMdI8((}uZ%ct>?(A^GsL`6 z&>@UJQl!D| z&Q%z7?W-i4n+(sk2OV7LvzxXSo$o&8!aHlx>VA(^x23CZF06d=oN2~qm8&bh|GdsA z;3?~VY~7CtzmJzWQ;v#!S@SXJ%;$3+j%^GacJu1DPKk7JFBTS^H1)v#hW`@FORsJa z;Hy7A;RKg_xq!l@Wu}_3aX(IM>a{-5-}iHOJbS4`L{V$#e-ow%At_ac*P;n59~$C! zo?K(wn;K?XuqJKR)Cc=B8dj9|EM#vwaB5lD`ui%3>saEWwa?vTUU4}@`fAORZ-pyP zimbiSB*>tAV5b7hWo3rV8-=&kMjcu+r@ocpZr>|0Mu`(^3YoMcW>lw7?iX-aeRcC^ z>q*^d*;0S_7{hMYhBJrgTd@X&9$KrBpmpZ;tUfh|XMauQwF~!umri)-w);g&kMv$Q zmY8c#0#!xd`KQj+=DhH=*okF>RdKnngZCx_cVnTpN|nP*V!}MHcNe|aVVuCC%M|gz zpUI+dpX%NOjBASC^}SPEKPTtx#!dD4`X_F9GCaFc z!^F6T_uaDPw)Yos*;Su+%*=c7!RL0p_L4bD2U;XAoVv&ySGKC#gL%H_Y^%zy=R2=1 za-YU9*(_%gLzwxcDQ+ic%=X#ucs#vQ(ZS?n@W+4Uf(x9O)=Pdp#dg_azhf&ymYjl9 z!^`khzQPL8$Nrgp*!WXzGFQ0sMNwX^iRLw_Z*z_%_uGAr@4dhGxtv-NTOeot{Ow#d ztIulR(mSg)MKU*7wc*>A3tjE*Y91G6d2ibnyRzLsWuw(u8OZ>p{JT3oNz@x^HUuE(}c;4#S=We-j9+1=O-BVxj>cze%E0e4K#rzlM zn9$2&bp6YL^!^=hC;ixHUTgZU{!LZS&8QexX_n+W8^R*?-jw<<^Z4iG@BdHYOi{U! v$+T*&%}kk^XJ7TTIWFG3-D$b8`ac_s`HHhz5>izZU|=u^@Ck9f_y3-yrDb*T zF$M;PwQJW#MMd>ESst5WxwKm1|9{K>EgZ>S)lQ0ii5s?kIF6DDb2vZSn28F z7*Y}U_QFQLLkLCF>hDTE*Rbb)~p@mPDia1apHk$3xs^zPKf5?k;;eLQV4J zHA(UGTGpTMvh`wo-%FG{xgJyH{r~T~4(GKo^P^i^gl3C9J+tgMXD+Y&ne!c=?tQrU zr{}+R0pA?v#htuQAFt$P@q3^?;dJNKyJxSw`uARVOZpSfhUcPHqO-U!2_BraH~m3! z|30I$rmxc_6mp${x@>lad$UFyh&UOj@;ytIS)tZh&eDp_;b*VXvX%ZHnwV#(|2V=p zOI<+0m-Bax-*YH@pmQWV*`yT9)Mz>r|Pp zm{qTjDV^9J^U0EHXWoR<4y~)gWm&Xh_P*N0EcCBH@yZd4TMP^g44$rjF6*2Ung9(5 B(WL+Y literal 0 HcmV?d00001 diff --git a/docs/images/ruins_of_alph_outside_cinnabar.png b/docs/images/ruins_of_alph_outside_cinnabar.png new file mode 100644 index 0000000000000000000000000000000000000000..bbbd049af7d790170971a108c4e08d27ae86ea73 GIT binary patch literal 485 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU{K&-W?*1=`=>#ifq}s|z$e7@-v4{YrdTem zmiYhQ@_!3QvRAc}qGn6+l$PS4@86@QXnOqz>1D9AwCr)RoMOmOU3@G%O>8;?17ohI zi(^Pd+?xxAd + object_const_def + const MAPNAME_OBJECTNAME + + + +## Map scripts + +
+MapName_MapScripts:
+
+ + +### Scene scripts + +
+	def_scene_scripts
+	scene_script script, SCENE_MAPNAME_SCENE_NAME
+
+ + +### Callbacks + +
+	def_callbacks
+	callback type, script
+
+ +#### Callback types + +- `MAPCALLBACK_NEWMAP` + +- `MAPCALLBACK_TILES` + +- `MAPCALLBACK_OBJECTS` + +- `MAPCALLBACK_SPRITES` + +- `MAPCALLBACK_CMDQUEUE` + +
+	callback MAPCALLBACK_CMDQUEUE, MapNameBouldersCallback
+
+MapNameBouldersCallback:
+	writecmdqueue .BoulderCmdQueue
+	endcallback
+
+.BoulderCmdQueue:
+	cmdqueue CMDQUEUE_STONETABLE, .BoulderTable
+
+.BoulderTable:
+	stonetable warp_id, person, script
+	db -1 ; end
+
+ + +## Event scripts + +[Event commands](event_commands.md) + + +## Text + +[Text commands](text_commands.md) + + +## Movement data + +[Movement commands](movement_commands.md) + + +## Map events + +
+MapName_MapEvents:
+	db 0, 0 ; filler
+
+ + +### Warp events + +
+	def_warp_events
+	warp_event x, y, map, warp_id
+
+ + +### Coord events + +
+	def_coord_events
+	coord_event x, y, scene_id, script
+
+ + +### BG events + +
+	def_bg_events
+	bg_event x, y, type, script
+
+ +#### BG event types + +- `BGEVENT_READ` + +- `BGEVENT_UP/DOWN/LEFT/RIGHT` + +- `BGEVENT_IFSET/IFNOTSET` + +
+	conditional_event event_flag, script
+
+ +- `BGEVENT_ITEM` + +
+	hiddenitem item_id, event_flag
+
+ +- `BGEVENT_COPY` + +### Object events + +
+	def_object_events
+	object_event x, y, sprite, movement, rx, ry, h1, h2, palette, type, range, script, event_flag
+
+ +#### Movement types + +- `SPRITEMOVEDATA_STILL` + +- `SPRITEMOVEDATA_WANDER` + +- `SPRITEMOVEDATA_SPINRANDOM_SLOW` + +- `SPRITEMOVEDATA_WALK_UP_DOWN` + +- `SPRITEMOVEDATA_WALK_LEFT_RIGHT` + +- `SPRITEMOVEDATA_STANDING_UP/DOWN/LEFT/RIGHT` + +- `SPRITEMOVEDATA_SPINRANDOM_FAST` + +- `SPRITEMOVEDATA_BIGDOLLSYM` + +- `SPRITEMOVEDATA_POKEMON` + +- `SPRITEMOVEDATA_SUDOWOODO` + +- `SPRITEMOVEDATA_SMASHABLE_ROCK` + +- `SPRITEMOVEDATA_STRENGTH_BOULDER` + +- `SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE` + +- `SPRITEMOVEDATA_SPINCLOCKWISE` + +- `SPRITEMOVEDATA_BIGDOLLASYM` + +- `SPRITEMOVEDATA_BIGDOLL` + +- `SPRITEMOVEDATA_SWIM_WANDER` + +#### Object types + +- `OBJECTTYPE_SCRIPT` + +- `OBJECTTYPE_ITEMBALL` + +
+	itemball item_id[, quantity=1]
+
+ +- `OBJECTTYPE_TRAINER` + +
+	trainer group_id, trainer_id, event_flag, seen_text, beaten_text, loss_text, script
+
+ + +## Template + +
+	object_const_def
+;	const MAPNAME_OBJECTNAME
+
+MapName_MapScripts:
+	def_scene_scripts
+;	scene_script script, SCENE_MAPNAME_SCENE_NAME
+
+	def_callbacks
+;	callback type, script
+
+MapName_MapEvents:
+	db 0, 0 ; filler
+
+	def_warp_events
+;	warp_event x, y, map, warp_id
+
+	def_coord_events
+;	coord_event x, y, scene_id, script
+
+	def_bg_events
+;	bg_event x, y, type, script
+
+	def_object_events
+;	object_event x, y, sprite, movement, rx, ry, h1, h2, palette, type, range, script, event_flag
+
diff --git a/docs/map_setup_scripts.md b/docs/map_setup_scripts.md new file mode 100644 index 0000000..f977151 --- /dev/null +++ b/docs/map_setup_scripts.md @@ -0,0 +1,144 @@ +# Map Setup Commands + +Defined in [macros/scripts/map_setup.asm](https://github.com/pret/pokecrystal/blob/master/macros/scripts/map_setup.asm) and [data/maps/setup_script_pointers.asm:MapSetupCommands](https://github.com/pret/pokecrystal/blob/master/data/maps/setup_script_pointers.asm). + + +## `$00`: `map_enable_lcd` + + +## `$01`: `map_disable_lcd` + + +## `$02`: `map_init_sound` + + +## `$03`: `map_play_music` + + +## `$04`: `map_restart_music` + + +## `$05`: `map_fade_to_music` + + +## `$06`: `map_fade_music_and_palettes` + + +## `$07`: `map_play_music_bike` + + +## `$08`: `map_force_music` + + +## `$09`: `map_fade_in_to_music` + + +## `$0A`: `map_load_block_data` + + +## `$0B`: `map_load_connection_block_data` + + +## `$0C`: `map_save_screen` + + +## `$0D`: `map_buffer_screen` + + +## `$0E`: `map_load_graphics` + + +## `$0F`: `map_load_tileset` + + +## `$10`: `map_load_time_of_day` + + +## `$11`: `map_load_palettes` + + +## `$12`: `map_load_wild_mon_data` + + +## `$13`: `map_refresh_sprites` + + +## `$14`: `map_handle_new` + + +## `$15`: `map_handle_continue` + + +## `$16`: `map_load_objects` + + +## `$17`: `map_enter_spawn_point` + + +## `$18`: `map_enter_connection` + + +## `$19`: `map_enter_warp` + + +## `$1A`: `map_load_attributes` + + +## `$1B`: `map_load_attributes_no_objects` + + +## `$1C`: `map_clear_bg_palettes` + + +## `$1D`: `map_fade_out_palettes` + + +## `$1E`: `map_fade_in_palettes` + + +## `$1F`: `map_get_screen_coords` + + +## `$20`: `map_get_warp_dest_coords` + + +## `$21`: `map_spawn_in_facing_down` + + +## `$22`: `map_spawn_player` + + +## `$23`: `map_refresh_player_coords` + + +## `$24`: `map_reset_player_object_action` + + +## `$25`: `map_skip_update_sprites` + + +## `$26`: `map_update_roam_mons` + + +## `$27`: `map_jump_roam_mons` + + +## `$28`: `map_fade_out_music` + + +## `$29`: `map_activate_anims` + + +## `$2A`: `map_suspend_anims` + + +## `$2B`: `map_apply_palettes` + + +## `$2C`: `map_enable_text_acceleration` + + +## `$2D`: `map_init_name_sign` + + +## `$FF`: `map_end` diff --git a/docs/menus.md b/docs/menus.md new file mode 100644 index 0000000..cd78329 --- /dev/null +++ b/docs/menus.md @@ -0,0 +1,297 @@ +# Menu Data + + +## Contents + +- [ScrollingMenu](#scrollingmenu) +- [\_2DMenu](#_2dmenu) +- [DoNthMenu/SetUpMenu](#donthmenusetupmenu) +- [VerticalMenu](#verticalmenu) +- [Misc/Generic](#miscgeneric) + + +## `ScrollingMenu` + +This is the only menu that does scrolling. It doesn't draw any `Textbox` around the menu. + +Structure: + +```asm +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 2, 4, SCREEN_WIDTH - 1, 13 + dw .MenuData + db 1 ; default option + +.MenuData: + db 0 ; flags + db 5, 0 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dba Items + dba Function1 + dba Function2 + dba Function3 +``` + +`wMenuDataFlags`: + +``` +7: Select is functional +6: Start is functional +5: Call Function3 +4: Show arrows on the right-hand side +3: D-Left is functional +2: D-Right is functional +1: Call Function3 only if [wSwitchItem] is 0 +0: Call Function1 to display the cancel entry +``` + +If the columns entry in `MenuData` of a scrolling menu is 0, `Function2` isn't called either. It doesn't affect the position of the arrows. + +Call state for functions in `MenuData` of `ScrollingMenu`: + +``` +All of them: +[wMenuSelection] = Current item. -1 is the CANCEL item. +[wMenuSelectionQuantity] = Quantity of the current item. + +Function1: Called to display a menu entry. +de = Cursor position in TileMap + +Function2: Called to display the quantity of a menu entry. +de = Cursor position in TileMap + columns + +Function3: Called to display anything else, whenever the cursor is moved. +``` + +There is no register of importance that should be preserved in any of these functions. + +The `; item format` entry in each `MenuData` changes how the `Items` struct looks. + +If it's `SCROLLINGMENU_ITEMS_NORMAL` (1): + +``` +db entries not including cancel +db entry1 +db entry2 +db -1 ; cancel +... +``` + +If it's `SCROLLINGMENU_ITEMS_QUANTITY` (2): + +``` +db entries not including cancel +db entry1, quantity1 +db entry2, quantity2 +db -1 ; cancel +... +``` + +In case it's 1, `[wMenuSelectionQuantity]` will simply contain the next entry. + +## `_2DMenu` + +This, like is implied by the name, is a 2-dimensional menu, where you can move your cursor in all 4 directions. It's only used for the battle menus as well as Earl's academy. + +Structure: + +```asm +.MenuHeader: + db MENU_BACKUP_TILES ; flags + db 12, 08 ; start coords + db 17, 19 ; end coords + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + dn 2, 2 ; rows, columns + db 6 ; spacing + dba Strings + dba Function +``` + +`wMenuDataFlags`: + +``` +7: Leave one tile of spacing between the left textbox border and the text, enabling the cursor. +6: Don't leave one tile of spacing between the top textbox border and the text +5: Set bits 4 and 5 in w2DMenuFlags1 (Wrap around horizontally and vertically) +4: Unused +3: Unused +2: Unused +1: Select is functional +0: Disable B button +``` + +The bank for the `Strings` is generated when you call `_2DMenu`, and as such it doesn't really matter what bank you specify there (unless you callba `_2DMenu_` directly, of course). + +`; spacing` is not a misnomer here, it's used to define how much space there is between columns. + +`Function` is called after printing all the strings. `hl` will be pointed at the row below the last in the menu in `TileMap`. We don't know of its purpose, since it's never actually used anywhere. Only the bank number is always set to the same bank as the menu, but not used otherwise, since the address is 0. + + +## `DoNthMenu`/`SetUpMenu` + +These are like the regular `VerticalMenu`, except they allow for creating slightly more "dynamic" menus, where the options aren't predefined, much like the `ScrollingMenu`. + +Structure: + +``` +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 10, 7 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags + db 0 ; items + dw Items + dw DisplayFunction + dw StringPointers +``` + +`wMenuDataFlags`: + +``` +7: Unused +6: Unused +5: Set bit 5 in w2DMenuFlags1 (Wrap around vertically) +4: Unused +3: Start is functional +2: D-left and D-right are functional +1: Unused +0: Unused +``` + +The `; items` entry should be left empty, as it's autogenerated with the `Items` array in `GetMenuIndexSet`. + +The bottom coord (`07` in the example) is autogenerated regardless of what you specify when building the MenuBox in `AutomaticGetMenuBottomCoord`, which also calculates the `bc` passed to MenuBox, which is useless because it's calculated again by MenuBox in `GetMenuBoxDims`. + +`[wWhichIndexSet]` decides which menu is used through `GetMenuIndexSet`. You can define multiple menus at the Items pointer as such: + +``` +Items: +db entries not including cancel +db entry1, entry2, entry3 +db -1 ; cancel +db entries not including cancel for 2nd menu +db entry1, entry2, entry3, entry4 +db -1 ; cancel +``` + +This is actively used in `MainMenu`. + +`StringPointers` isn't handled by `DoNthMenu` internally. It's handled by different `DisplayFunction`s. A custom one could choose to completely ignore it. + +`StringPointers` struct handled through `PlaceNthMenuStrings` as `DisplayFunction` and `MenuJumptable`: + +```asm +StringPointers: + dw FunctionToCall, PointerToString ; index 1 + dw FunctionToCall, PointerToString ; index 2 +... +``` + +`StringPointers` struct handled through `PlaceMenuStrings`: + +```asm +StringPointers: + db "STRING1@" + db "STRING2@" +... +``` + +Call state for `DisplayFunction`: +``` +[wMenuSelection] = Current item. -1 is the CANCEL item. +de = Cursor position in TileMap +``` + +## `VerticalMenu` + +This is the simplest menu. Like, the most boring. Nothing special. Just normal. …nooooooormal… + +Structure: + +```asm +.MenuHeader: + db MENU_SPRITE_ANIMS | MENU_BACKUP_TILES ; flags + menu_coords 12, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 2 ; # items + db "GIVE@" + db "TAKE@" +``` + +`wMenuDataFlags`: + +``` +7: Leave one tile of spacing between the left textbox border and the text +6: Don't leave one tile of spacing between the top textbox border and the text +5: Set bit 5 in w2DMenuFlags1 (Wrap around vertically) +4: Place menubox "title". See notes. +3: Unused +2: Unused +1: Select is functional +0: Disable B button +``` + +If bit 4 is set, a string at the end of the items array will be put at an offset from the start coord of the menu box. This string is defined like this: + +```asm + db 2 ; # items + db "GIVE@" + db "TAKE@" + db 2 ; x offset + db "TEST@" +``` + +This is used in the menu for selecting the character's name. + +## Misc/Generic + +`MenuHeader` flags (`wMenuFlags`): + +``` +7: Save a backup of the tiles +6: Save a backup of the tiles +5: Unused +4: Set bit 6 in w2DMenuFlags1 (Enable sprite animations) +3: Disable click sound +2: Unused +1: Unused +0: Call RestoreTileBackup when exiting the menu. This bit depends on whether bit 6 or 7 are set. +``` + +`w2DMenuFlags1`: + +``` +7: Disable checking of wMenuJoypadFilter +6: Enable sprite animations +5: Wrap around vertically +4: Wrap around horizontally +3: Set bit 7 in w2DMenuFlags2 and exit the loop if bit 5 is disabled and we tried to go too far down +2: Set bit 7 in w2DMenuFlags2 and exit the loop if bit 5 is disabled and we tried to go too far up +1: Set bit 7 in w2DMenuFlags2 and exit the loop if bit 4 is disabled and we tried to go too far left +0: Set bit 7 in w2DMenuFlags2 and exit the loop if bit 4 is disabled and we tried to go too far right +``` + +`w2DMenuFlags2`: + +``` +7: ????? +6: ????? +5: ????? +4: ????? +3: ????? +2: ????? +1: ????? +0: ????? +``` diff --git a/docs/move_effect_commands.md b/docs/move_effect_commands.md new file mode 100644 index 0000000..f2d365f --- /dev/null +++ b/docs/move_effect_commands.md @@ -0,0 +1,534 @@ +# Move Effect Commands + +Defined in [macros/scripts/battle_commands.asm](https://github.com/pret/pokecrystal/blob/master/macros/scripts/battle_commands.asm) and [data/battle/effect_command_pointers.asm:BattleCommandPointers](https://github.com/pret/pokecrystal/blob/master/data/battle/effect_command_pointers.asm). + + +## `$01`: `checkturn` + + +## `$02`: `checkobedience` + + +## `$03`: `usedmovetext` + + +## `$04`: `doturn` + + +## `$05`: `critical` + + +## `$06`: `damagestats` + + +## `$07`: `stab` + + +## `$08`: `damagevariation` + + +## `$09`: `checkhit` + + +## `$0A`: `lowersub` + + +## `$0B`: `hittargetnosub` + + +## `$0C`: `raisesub` + + +## `$0D`: `failuretext` + + +## `$0E`: `applydamage` + + +## `$0F`: `criticaltext` + + +## `$10`: `supereffectivetext` + + +## `$11`: `checkfaint` + + +## `$12`: `buildopponentrage` + + +## `$13`: `poisontarget` + + +## `$14`: `sleeptarget` + + +## `$15`: `draintarget` + + +## `$16`: `eatdream` + + +## `$17`: `burntarget` + + +## `$18`: `freezetarget` + + +## `$19`: `paralyzetarget` + + +## `$1A`: `selfdestruct` + + +## `$1B`: `mirrormove` + + +## `$1C`: `statup` + + +## `$1D`: `statdown` + + +## `$1E`: `payday` + + +## `$1F`: `conversion` + + +## `$20`: `resetstats` + + +## `$21`: `storeenergy` + + +## `$22`: `unleashenergy` + + +## `$23`: `forceswitch` + + +## `$24`: `endloop` + + +## `$25`: `flinchtarget` + + +## `$26`: `ohko` + + +## `$27`: `recoil` + + +## `$28`: `mist` + + +## `$29`: `focusenergy` + + +## `$2A`: `confuse` + + +## `$2B`: `confusetarget` + + +## `$2C`: `heal` + + +## `$2D`: `transform` + + +## `$2E`: `screen` + + +## `$2F`: `poison` + + +## `$30`: `paralyze` + + +## `$31`: `substitute` + + +## `$32`: `rechargenextturn` + + +## `$33`: `mimic` + + +## `$34`: `metronome` + + +## `$35`: `leechseed` + + +## `$36`: `splash` + + +## `$37`: `disable` + + +## `$38`: `cleartext` + + +## `$39`: `charge` + + +## `$3A`: `checkcharge` + + +## `$3B`: `traptarget` + + +## `$3C`: `effect0x3c` + + +## `$3D`: `rampage` + + +## `$3E`: `checkrampage` + + +## `$3F`: `constantdamage` + + +## `$40`: `counter` + + +## `$41`: `encore` + + +## `$42`: `painsplit` + + +## `$43`: `snore` + + +## `$44`: `conversion2` + + +## `$45`: `lockon` + + +## `$46`: `sketch` + + +## `$47`: `defrostopponent` + + +## `$48`: `sleeptalk` + + +## `$49`: `destinybond` + + +## `$4A`: `spite` + + +## `$4B`: `falseswipe` + + +## `$4C`: `healbell` + + +## `$4D`: `kingsrock` + + +## `$4E`: `triplekick` + + +## `$4F`: `kickcounter` + + +## `$50`: `thief` + + +## `$51`: `arenatrap` + + +## `$52`: `nightmare` + + +## `$53`: `defrost` + + +## `$54`: `curse` + + +## `$55`: `protect` + + +## `$56`: `spikes` + + +## `$57`: `foresight` + + +## `$58`: `perishsong` + + +## `$59`: `startsandstorm` + + +## `$5A`: `endure` + + +## `$5B`: `checkcurl` + + +## `$5C`: `rolloutpower` + + +## `$5D`: `effect0x5d` + + +## `$5E`: `furycutter` + + +## `$5F`: `attract` + + +## `$60`: `happinesspower` + + +## `$61`: `present` + + +## `$62`: `damagecalc` + + +## `$63`: `frustrationpower` + + +## `$64`: `safeguard` + + +## `$65`: `checksafeguard` + + +## `$66`: `getmagnitude` + + +## `$67`: `batonpass` + + +## `$68`: `pursuit` + + +## `$69`: `clearhazards` + + +## `$6A`: `healmorn` + + +## `$6B`: `healday` + + +## `$6C`: `healnite` + + +## `$6D`: `hiddenpower` + + +## `$6E`: `startrain` + + +## `$6F`: `startsun` + + +## `$70`: `attackup` + + +## `$71`: `defenseup` + + +## `$72`: `speedup` + + +## `$73`: `specialattackup` + + +## `$74`: `specialdefenseup` + + +## `$75`: `accuracyup` + + +## `$76`: `evasionup` + + +## `$77`: `attackup2` + + +## `$78`: `defenseup2` + + +## `$79`: `speedup2` + + +## `$7A`: `specialattackup2` + + +## `$7B`: `specialdefenseup2` + + +## `$7C`: `accuracyup2` + + +## `$7D`: `evasionup2` + + +## `$7E`: `attackdown` + + +## `$7F`: `defensedown` + + +## `$80`: `speeddown` + + +## `$81`: `specialattackdown` + + +## `$82`: `specialdefensedown` + + +## `$83`: `accuracydown` + + +## `$84`: `evasiondown` + + +## `$85`: `attackdown2` + + +## `$86`: `defensedown2` + + +## `$87`: `speeddown2` + + +## `$88`: `specialattackdown2` + + +## `$89`: `specialdefensedown2` + + +## `$8A`: `accuracydown2` + + +## `$8B`: `evasiondown2` + + +## `$8C`: `statupmessage` + + +## `$8D`: `statdownmessage` + + +## `$8E`: `statupfailtext` + + +## `$8F`: `statdownfailtext` + + +## `$90`: `effectchance` + + +## `$91`: `statdownanim` + + +## `$92`: `statupanim` + + +## `$93`: `switchturn` + + +## `$94`: `fakeout` + + +## `$95`: `bellydrum` + + +## `$96`: `psychup` + + +## `$97`: `rage` + + +## `$98`: `doubleflyingdamage` + + +## `$99`: `doubleundergrounddamage` + + +## `$9A`: `mirrorcoat` + + +## `$9B`: `checkfuturesight` + + +## `$9C`: `futuresight` + + +## `$9D`: `doubleminimizedamage` + + +## `$9E`: `skipsuncharge` + + +## `$9F`: `thunderaccuracy` + + +## `$A0`: `teleport` + + +## `$A1`: `beatup` + + +## `$A2`: `ragedamage` + + +## `$A3`: `resettypematchup` + + +## `$A4`: `allstatsup` + + +## `$A5`: `bidefailtext` + + +## `$A6`: `raisesubnoanim` + + +## `$A7`: `lowersubnoanim` + + +## `$A8`: `beatupfailtext` + + +## `$A9`: `clearmissdamage` + + +## `$AA`: `movedelay` + + +## `$AB`: `hittarget` + + +## `$AC`: `tristatuschance` + + +## `$AD`: `supereffectivelooptext` + + +## `$AE`: `startloop` + + +## `$AF`: `curl` + + +## `$FE`: `endturn` + + +## `$FF`: `endmove` diff --git a/docs/movement_commands.md b/docs/movement_commands.md new file mode 100644 index 0000000..61ebf58 --- /dev/null +++ b/docs/movement_commands.md @@ -0,0 +1,123 @@ +# Movement Commands + +Defined in [macros/scripts/movement.asm](https://github.com/pret/pokecrystal/blob/master/macros/scripts/movement.asm) and [engine/overworld/movement.asm:MovementPointers](https://github.com/pret/pokecrystal/blob/master/engine/overworld/movement.asm). + + +## `$00`−`$03`: turn_head direction + + +## `$04`−`$07`: turn_step direction + + +## `$08`−`$0B`: slow_step direction + + +## `$0C`−`$0F`: step direction + + +## `$10`−`$13`: big_step direction + + +## `$14`−`$17`: slow_slide_step direction + + +## `$18`−`$1B`: slide_step direction + + +## `$1C`−`$1F`: fast_slide_step direction + + +## `$20`−`$23`: turn_away direction + + +## `$24`−`$27`: turn_in direction + + +## `$28`−`$2B`: turn_waterfall direction + + +## `$2C`−`$2F`: slow_jump_step direction + + +## `$30`−`$33`: jump_step direction + + +## `$34`−`$37`: fast_jump_step direction + + +## `$38`: `remove_sliding` + + +## `$39`: `set_sliding` + + +## `$3A`: `remove_fixed_facing` + + +## `$3B`: `fix_facing` + + +## `$3C`: `show_object` + + +## `$3D`: `hide_object` + + +## `$3E`−`$46`: step_sleep length + + +## `$47`: `step_end` + + +## `$48`: step_48 param + + +## `$49`: `remove_object` + + +## `$4A`: `step_loop` + + +## `$4B`: `step_4b` + + +## `$4C`: `teleport_from` + + +## `$4D`: `teleport_to` + + +## `$4E`: `skyfall` + + +## `$4F`: step_dig length + + +## `$50`: `step_bump` + + +## `$51`: `fish_got_bite` + + +## `$52`: `fish_cast_rod` + + +## `$53`: `hide_emote` + + +## `$54`: `show_emote` + + +## `$55`: step_shake displacement + + +## `$56`: `tree_shake` + + +## `$57`: rock_smash length + + +## `$58`: return_dig length + + +## `$59`: `skyfall_top` diff --git a/docs/music_commands.md b/docs/music_commands.md new file mode 100644 index 0000000..de13775 --- /dev/null +++ b/docs/music_commands.md @@ -0,0 +1,290 @@ +# Music Commands + +Defined in [macros/scripts/audio.asm](https://github.com/pret/pokecrystal/blob/master/macros/scripts/audio.asm) and [audio/engine.asm:MusicCommands](https://github.com/pret/pokecrystal/blob/master/audio/engine.asm). + +Note: Commands that are intended for the song channels (1-4) can be used by the sound effect channels (5-8) if the sound effect channel exits sound effect mode with the `toggle_sfx` command. + + +## channel_count n + +Used at the start of each sound header to specify how many channels are used in the sound. +`n`: Number of channels [`1`, `4`] + + +## channel index, address + +Used for each channel in a sound header. +`index`: Channel number [`1`, `8`] +`address`: Pointer to the sound data + + +## note pitch, length + +Play a basic note. Used by channels 1-3. +`pitch`: Pitch of note (see [constants/audio_constants.asm](https://github.com/pret/pokecrystal/blob/master/constants/audio_constants.asm)) +`length`: Length of note in "ticks" [`1`, `16`]. The exact duration of a tick is dependant on the current "speed" (see `note_type` and `drum_speed`) and the current "tempo" (see `tempo`). + + +## drum_note instrument, length + +Play a predefined drum note. Used by channel 4. +`instrument`: Instrument ID [`1`, `12`] (see `toggle_noise`) +`length`: Length of note [`1`, `16`] + + +## rest length + +Basic rest. Used by channels 1-4. +`length`: Length of rest [`1`, `16`] + + +## square_note length, volume, fade, frequency + +Sound effect square note. Used by channels 5-7. +`length`: Length of note [`0`, `255`] +`volume`: Initial volume [`0`, `15`] +`fade`: Volume fade [`-7`, `7`] +`frequency`: Note frequency [`0`, `65535`] + + +## noise_note length, volume, fade, frequency + +Sound effect noise note. Used by channel 8. +`length`: Length of note [`0`, `255`] +`volume`: Initial volume [`0`, `15`] +`fade`: Volume fade [`-7`, `7`] +`frequency`: Note frequency [`0`, `255`] + + +## `$D0`−`$D7`: octave n + +Set the octave for the notes played on the current channel. Used by channels 1-3. +`n`: New octave [`1`, `8`] + + +## `$D8`: note_type length, volume, fade/wave_instrument + +Set persistent note properties. Used by channels 1-3. +`length`: Base note length [`1`, `15`] (`12` is often used for 4/4 common time because `12` is factorable by both `3` and `4`. Therefore it works very well for quarter notes, eighth notes, sixteenth notes, and triplets.) +`volume`: Initial volume [`0`, `15`] for channels 1-2, [`0`, `3`] for channel 3 (see `volume_envelope`) +`fade`: Volume fade [`-7`, `7`] (applies to channels 1-2) +`wave_instrument`: Wave instrument ID (applies to channel 3) (see [audio/wave_samples.asm](https://github.com/pret/pokecrystal/blob/master/audio/wave_samples.asm)) + + +## `$D8`: drum_speed length + +Set persistent note properties. Used by channel 4. +`length`: Base note length [`1`, `15`] (use `12` for common time) + + +## `$D9`: transpose num_octaves, num_pitches + +Transpose all notes played on the current channel. Used by channels 1-3. +`num_octaves`: Number of octaves to subtract from each note +`num_pitches`: Number of pitches to add to each note + + +## `$DA`: tempo tempo + +Set the tempo for all playing channels. This should only be used by channel 1. + +The formula to convert from this tempo to BPM is: BPM = 19200 / `tempo` +This formula also works backwards to convert BPM to tempo: `tempo` = 19200 / BPM + +Only set or change this value when all playing channels are triggering a note or rest at the same time, otherwise desyncs may happen. + + +## `$DB`: duty_cycle duty_cycle + +Set the square duty (sound) for the current channel. Used by channels 1-2. +The only accepted values are 0-3. + +- 0 = 12.5% waveform: `_______¯` +- 1 = 25% waveform: `______¯¯` +- 2 = 50% waveform: `____¯¯¯¯` +- 3 = 75% waveform: `__¯¯¯¯¯¯` (sounds the same as 25%) + +To change the sound for channel 3, use `note_type` or `volume_envelope`. + + +## `$DC`: volume_envelope volume, fade/wave_instrument + +Set the volume envelope for the current channel. Used by channels 1-3. +`volume`: Initial volume [`0`, `15`] for channels 1-2, [`0`, `3`] for channel 3 +`fade`: Volume fade [`-7`, `7`] (applies to channels 1-2) +`wave_instrument`: Wave instrument ID (applies to channel 3) (see [audio/wave_samples.asm](https://github.com/pret/pokecrystal/blob/master/audio/wave_samples.asm)) + +For channel 3, the only accepted `volume` values are 0-3. + +- 0 = Mute +- 1 = 100% volume +- 2 = 50% volume +- 3 = 25% volume + +Note about `fade`: A positive value means a decrease in volume; a negative value means an increase in volume. A small magnitude means a quick change; a large magnitude means a slow change. It is stored in signed magnitude representation, so a value of `8` is the same as (negative) `0`. + + +## `$DD`: pitch_sweep length, pitch_change + +Set pitch sweep properties. Used by channel 5. +`length`: Duration of effect [`0`, `15`] +`pitch_change`: Extent of effect [`-7`, `8`] Note: `8` is used in place of `0` + + +## `$DE`: duty_cycle_pattern a, b, c, d + +Set duty cycle pattern (ie, pulse width modulation). Used by channels 5-6. + +This cycles the channel through 4 duty cycles, one per frame. +Each argument defines a duty cycle, same as the `duty_cycle` command. + + +## `$DF`: toggle_sfx + +Toggle between pitch-based songs and frequency-based sound effects. Can be used by any channel. + +Note: Similar to the pokered command `execute_music`, however `execute_music` can only be used on channels 5-8 and can not be disabled for the duration of the sound once it is enabled. + + +## `$E0`: pitch_slide duration, octave, pitch + +Bend the pitch of the next note played, and only that note. Used by channel 1. +`duration`: Duration of the target note after slide effect +`octave`: Target octave +`pitch`: Target pitch (see [constants/audio_constants.asm](https://github.com/pret/pokecrystal/blob/master/constants/audio_constants.asm)) + + +## `$E1`: vibrato delay, extent, rate + +Apply vibrato to current channel. Used by channels 1-3. +`delay`: Delay until vibrato effect begins for each note [`0`, `255`] +`extent`: Amplitude of vibrato [`0`, `15`] +`rate`: Frequency of vibrato [`0`, `15`] + + +## `$E2`: unknownmusic0xe2 unknown + + +## `$E3`: toggle_noise id + +Set the "drum kit" to be used if it is currently unset. Mute the channel otherwise. Used by channel 4. +`id`: Drum kit ID [`0`, `5`] (see [audio/drumkits.asm](https://github.com/pret/pokecrystal/blob/master/audio/drumkits.asm)) + +Note: The drum kit ID is initially unset at the start of a song. When muting the channel, the `id` argument must not be present. + + +## `$E4`: force_stereo_panning left_enable, right_enable + +Set left/right stereo output for the current channel, regardless of user's stereo setting. Used by channels 1-4. +`left_enable`: `TRUE`/`FALSE` +`right_enable`: `TRUE`/`FALSE` + + +## `$E5`: volume left_volume, right_volume + +Set master volume for left/right speakers. Typically only used by channel 1. +`left_volume`: Left speaker volume [`0`, `7`] +`right_volume`: Right speaker volume [`0`, `7`] + +Note: Minimum volume, `0`, is not muted. + + +## `$E6`: pitch_offset pitch_offset + +Adjust the pitch of all notes on the current channel. Used by channels 1-3. +`pitch_offset`: Frequency adjustment of each pitch + +Note: Similar to the pokered command `toggle_perfect_pitch`. `toggle_perfect_pitch` can be replaced with a combination of `pitch_offset 1` and `pitch_offset 0`. + + +## `$E7`: unknownmusic0xe7 unknown + + +## `$E8`: unknownmusic0xe8 unknown + + +## `$E9`: tempo_relative value + + +## `$EA`: restart_channel address + + +## `$EB`: new_song id + + +## `$EC`: sfx_priority_on + + +## `$ED`: sfx_priority_off + + +## `$EE`: unknownmusic0xee address + + +## `$EF`: stereo_panning left_enable, right_enable + +Set left/right stereo output for the current channel, if the user has stereo mode enabled. Used by channels 1-4. +`left_enable`: `TRUE`/`FALSE` +`right_enable`: `TRUE`/`FALSE` + + +## `$F0`: sfx_toggle_noise id + +Set the "drum kit" to be used if it is currently unset. Mute the channel otherwise. Used by channel 8. +`id`: Drum kit ID [`0`, `5`] (see [audio/drumkits.asm](https://github.com/pret/pokecrystal/blob/master/audio/drumkits.asm)) + +Note: The drum kit ID is initially unset at the start of a song. When muting the channel, the `id` argument must not be present. + + +## `$F1`: music0xf1 + + +## `$F2`: music0xf2 + + +## `$F3`: music0xf3 + + +## `$F4`: music0xf4 + + +## `$F5`: music0xf5 + + +## `$F6`: music0xf6 + + +## `$F7`: music0xf7 + + +## `$F8`: music0xf8 + + +## `$F9`: unknownmusic0xf9 + + +## `$FA`: set_condition condition + + +## `$FB`: sound_jump_if condition, address + + +## `$FC`: sound_jump address + + +## `$FD`: sound_loop count, address + +Execute a branch of sound commands a total of `count` times. +`count`: Number of times to execute the loop (including the first execution) (use `0` for an infinite loop) +`address`: Pointer to the start of the loop of sound commands + + +## `$FE`: sound_call address + +Execute a branch of sound commands, returning to the call point once a `sound_ret` command is reached. +`address`: Pointer to the branch of sound commands to call + + +## `$FF`: sound_ret + +Return to the caller (ie, `sound_call`) if in a sub branch. End the sound otherwise. diff --git a/docs/pic_animations.md b/docs/pic_animations.md new file mode 100644 index 0000000..dd17389 --- /dev/null +++ b/docs/pic_animations.md @@ -0,0 +1,30 @@ +# Pic Animations + +Defined in [macros/scripts/pic_anims.asm](https://github.com/pret/pokecrystal/blob/master/macros/scripts/pic_anims.asm). + +Pic animations are assembled in 3 parts: + +- Top-level animations: + - frame N, duration: Frame #0 is the original pic (no change) + - setrepeat N: Sets the number of times to repeat + - dorepeat I: Repeats from command #I (with the first command being #0) + - `endanim` + +- Bitmasks: + Layered over the pic to designate affected tiles + +- Frame definitions: + first byte is the bitmask used for this frame + following bytes are tile ids mapped to each bit in the mask + +Animation data is in these files: + +- [gfx/pokemon/anims.asm](https://github.com/pret/pokecrystal/blob/master/gfx/pokemon/anims.asm): + Main animations (played everywhere) + +- [gfx/pokemon/idles.asm](https://github.com/pret/pokecrystal/blob/master/gfx/pokemon/idles.asm): + Idle animations, appended to the main animation. + Used in the status screen (blinking, tail wags etc.) + +- [gfx/pokemon/unown_anims.asm](https://github.com/pret/pokecrystal/blob/master/gfx/pokemon/unown_anims.asm) and [gfx/pokemon/unown_idles.asm](https://github.com/pret/pokecrystal/blob/master/gfx/pokemon/unown_idles.asm): + Unown has its own animation data despite having an entry in the main tables. diff --git a/docs/text_commands.md b/docs/text_commands.md new file mode 100644 index 0000000..eaccf96 --- /dev/null +++ b/docs/text_commands.md @@ -0,0 +1,179 @@ +# Text Commands + +Defined in [macros/scripts/text.asm](https://github.com/pret/pokecrystal/blob/master/macros/scripts/text.asm) and [home/text.asm:TextCommands](https://github.com/pret/pokecrystal/blob/master/home/text.asm). + + +## `$00`: `text_start` + +Start writing text until `"@"`. The text can use [control characters](#control-characters). + + +## `$01`: text_ram address + +Write text from a RAM address. + + +## `$02`: text_bcd address, flags + +Write [BCD][bcd] from an address, typically RAM. + +[bcd]: https://en.wikipedia.org/wiki/Binary-coded_decimal + + +## `$03`: text_move address + +Move to a new tile. + + +## `$04`: text_box address, height, width + +Draw a box. + + +## `$05`: `text_low` + +Write text at (1, 16). + + +## `$06`: `text_promptbutton` + +Wait for button press; show arrow. + + +## `$07`: `text_scroll` + +Pushes text up two lines and sets the `bc` cursor to the border tile below the +first character column of the text box. + + +## `$08`: `text_asm` + +Start interpreting assembly code. + + +## `$09`: text_decimal address, bytes, digits + +Read *bytes* bytes from *address* and print them as a *digits*-digit number. + + +## `$0A`: `text_pause` + +Pause for 30 frames unless A or B is pressed. + + +## `$0B`: `sound_dex_fanfare_50_79` + +Play `SFX_DEX_FANFARE_50_79`. + + +## `$0C`: text_dots n + +Print *n* `"…"`s, pausing for 10 frames after each; interrupt if A or B is pressed. + + +## `$0D`: `text_waitbutton` + +Wait for button press; don't show arrow. + + +## `$0E`: `sound_dex_fanfare_20_49` + +Play `SFX_DEX_FANFARE_20_49`. + + +## `$0F`: `sound_item` + +Play `SFX_ITEM`. + + +## `$10`: `sound_caught_mon` + +Play `SFX_CAUGHT_MON`. + + +## `$11`: `sound_dex_fanfare_80_109` + +Play `SFX_DEX_FANFARE_80_109`. + + +## `$12`: `sound_fanfare` + +Play `SFX_FANFARE`. + + +## `$13`: `sound_slot_machine_start` + +Play `SFX_SLOT_MACHINE_START`. + + +## `$14`: text_buffer id + +Write text from one of the following addresses (listed in [data/text_buffers.asm](https://github.com/pret/pokecrystal/blob/master/data/text_buffers.asm)): + +0. `wStringBuffer3` +1. `wStringBuffer4` +2. `wStringBuffer5` +3. `wStringBuffer2` +4. `wStringBuffer1` +5. `wEnemyMonNickname` +6. `wBattleMonNickname` + + +## `$15`: `text_today` + +Print the weekday. + + +## `$16`: text_far address + +Write text from a different bank. + + +## `$50`: `text_end` + +Stops processing text commands. + + +# Control characters + +These get interpreted in the context of printing regular text. Macros exist to conveniently place the control characters. + + +## `$00`: text text + +Start writing text until `"@"`. (Not actually a control character, but shorter than `text_start` followed by `db`.) + + +## `$4E`, `""`: next text + +Move a line down. + + +## `$4F`, `""`: line text + +Start writing at the bottom line. + + +## `$50`, `"@"`: page text + +Start a new Pokédex page. + + +## `$51`, `""`: para text + +Start a new paragraph. + + +## `$55`, `""`: cont text + +Scroll to the next line. + + +## `$57`, `""`: `done` + +End a text box. + + +## `$58`, `""`: `prompt` + +Prompt the player to end a text box (initiating some other event). diff --git a/docs/vc_patch.md b/docs/vc_patch.md new file mode 100644 index 0000000..cc0e916 --- /dev/null +++ b/docs/vc_patch.md @@ -0,0 +1,124 @@ +# Nintendo 2DS/3DS Virtual Console Patch + +The Nintendo Virtual Console is an emulator on the 2DS and 3DS consoles. It can emulate the Game Boy Color (among other consoles), while applying enhancements or modifications to some games, such as replacing Link Cable functionality with the DS' Wireless Link capabilities, or disabling Game Boy Printer features. + +Game-specific enhancements are determined by a `.patch` file corresponding to the `.gbc` ROM file. These files are bundled together in a `.cia` file; creating such a file is outside the scope of this project. + + +## Build pokecrystal11.patch + +To build **pokecrystal11.patch**: + +```bash +make crystal11_vc +``` + +This will also create two ROM files, **pokecrystal11.gbc** and **pokecrystal11_vc.gbc**. The pokecrystal11_vc.gbc file has the patches already applied to it; do *not* use this file! The ROM file and patch file must share the same name, so use pokecrystal11.patch together with pokecrystal11.gbc. + + +## Custom files + +There are a few files involved with building the `.patch` file, in addition to the ones used for building ROMs. + + +### vc/pokecrystal11.patch.template + +The `.patch.template` file is the basis for the `.patch` file. Many numeric values in the `.patch` file are derived from the values of labels, constants, and ROM content; these values are abstracted into *commands* that get evaluated by `tools/make_patch` to output symbolic names as their actual values, formatted to match the original `.patch` file. + + +### vc/pokecrystal11.constants.asm + +The `.constants.asm` file is used to create a `.constants.sym` file. Typical `.sym` files only list the values of *labels* (ROM banks and addresses); this file is used to list *constants* that are needed by the `.patch.template`. Any constants that the `.patch.template` refers to must be explicitly printed here with the `vc_const` macro. + + +### tools/make_patch.c + +The program used to convert a `.patch.template` into a `.patch` file. + +To convert `vc.patch.template` into `vc.patch`: + +```bash +tools/make_patch labels.sym constants.sym patched.gbc original.gbc vc.patch.template vc.patch +``` + +For example, this is what `make crystal11_vc` does: + +```bash +tools/make_patch pokecrystal11_vc.sym vc/pokecrystal11.constants.sym pokecrystal11_vc.gbc pokecrystal11.gbc vc/pokecrystal11.patch.template pokecrystal11.patch +``` + + +## Patch types + +**Hooks** do not directly modify the ROM; they just identify locations within the ROM code. When the emulated code execution reaches a hook, the emulator performs an emulation function. For example, the `Enable_GS_Ball_mobile_event` hook is located after the code to add a new Hall of Fame entry, and causes the emulator to edit the save file to enable the GS Ball event. + +Hooks are defined with the `vc_hook` macro, which defines a label starting with "`.VC_`" for the patch template file to use. + +**Patches** directly modify the contents of the ROM. This is done before emulation begins. For example, the `print_forbid_1` patch modifies an "`and A_BUTTON`" instruction to "`and 0`", so pressing A will not print Unown on the Game Boy Printer. + +Patches are defined with the `vc_patch` and `vc_patch_end` macros; `vc_patch` defines a label starting with "`.VC_`", `vc_patch_end` defines a corresponding label with "`_End`" appended. Between these two macros, the code or data is conditionally different depending on whether or not a patch file is being built. + +The sole purpose of creating `pokecrystal11_vc.gbc` and `pokecrystal11_vc.sym` is to make these labels and modifications available to `make_patch` for use in the patch template. + + +## Patch template syntax + +**Comments** start at a semicolon "`;`" and continue until the end of the line. They are output as-is, without interpreting commands. + +**Patch names** are contained in "`[`" brackets "`]`". They are output as-is, without interpreting commands. + +Patch names also set the **current patch label**. This is the label starting with "`.VC_`" followed by the patch name, with any invalid characters (not letters "`A-Z`", digits "`0-9`", or underscore "`_`") converted to underscores "`_`". These labels are conditionally defined only when building the patch file with the `vc_hook` and `vc_patch` macros. For example, the patch name "`[fight begin]`" corresponds to the patch label "`.VC_fight_begin`", generated by the "`vc_hook fight_begin`" macro. + +Patch names may designate an alternate for the label with an at-sign "`@`". This allows the label in the assembly source to have a more descriptive name, while still reproducing the original `.patch` file. For example, the patch name "`[BiographySave_ret@Enable_GS_Ball_mobile_event]`" corresponds to the label "`.VC_Enable_GS_Ball_mobile_event`" but is output as "`[BiographySave_ret]`". + +**Commands** are contained in "`{`" braces "`}`". They are not output themselves, but may produce their own output when interpreted. + +Commands are interpreted with a series of arguments, separated by whitespace (spaces, tabs, or newlines). Leading and trailing whitespace is ignored; for example, "`{ hex @ 4 }`" is interpreted the same as "`{hex @ 4}`". + +Command names have variants to allow reproducing the exact formatting in a `.patch` file. If the command name is all lowercase, the output byte values use lowercase for hexadecimal digits A-F; if it is all uppercase, they use uppercase. + +Some commands may output a **value series**, which is a series of two-digit hexadecimal bytes separated by spaces, preceded by a decimal count and a colon "`:`": "a*N*: v1 v2 [...] vN". These commands have additional variants: if the command name ends in a slash "`/`", the count and colon are not output; or else, if it ends in an underscore "`_`", a space is output after the colon; otherwise, the count and colon are output without a space. + +**Arguments** evaluate to numeric values. They may be any of the following: + +- Literal numbers in decimal (base 10, e.g. "`42`"), hexadecimal (base 16, e.g. "`0x2a`"), or octal (base 8, e.g. "`052`"). They may start with a plus sign "`+`". Numbers should not be negative. +- Comparison operators: "`==`" is 0, "`>`" is 1, "`<`" is 2, "`>=`" is 3, "`<=`" is 4, "`!=`" is 5, and "`||`" is 0x11. +- Symbol names from the two `.sym` files provided to `make_patch` may evaluate as their relative address or their absolute offset, depending on the command. (Addresses are relative to the symbol's bank for ROM addresses, or to 0x8000, the start of all RAM, for RAM addresses.) They may also be followed by a plus sign and a literal number that gets added to the value. +- "`@`" evaluates as the address or absolute offset of the current patch/hook label, depending on the command. + +Any other characters are output as-is. + + +## Patch template commands + + +### {patch[ offset[ length]]} + +Outputs the bytes of the current patch as a value series, or as a hexadecimal number if there is only one byte. The bytes are found between the current patch label, and the label which is the current patch label plus "`_End`". An optional first argument is an *offset* to add to the current patch label before gathering the contents between it and the end label. An optional second argument is a *length* of bytes to output instead of the length between the start and end labels. + +For example, if "`{patch}`" outputs "`a3:ab cd ef`", then "`{patch +1}`" outputs "`a2:cd ef`", and "`{patch 0 1}`" outputs "`0xab`". + +Converting the patch template will print a warning if any differences exist between the original and patched ROMs, which are not covered by "`patch`" commands. + + +### {dws args...} + +Outputs its arguments as a value series of little-endian 16-bit words. Symbol names or "`@`" are evaluated as their relative address. + +For example, if "`{dws 42 0xabcd wCurSpecies}`" outputs "`a6:2a 00 cd ab 60 cf`", then "`{dws >= wCurSpecies+3}`" outputs "`a4:04 00 63 cf`". + + +### {db arg} + +Outputs its argument as a single-byte value series. Symbol names or "`@`" are evaluated as their relative address. + +For example, "`{db 0xEF}`" outputs "`a1:ef`". + + +### {hex arg[ padding]} + +Outputs its first argument as a hexadecimal number. An optional second argument is the minimum length in digits; values shorter than it will be padded with leading zeros. Symbol names or "`@`" are evaluated as their absolute offset, or as their relative address if the command name ends in a tilde "`~`". + +For example, if "`{hex @}`" outputs "`0x6789`", then "`{hex @+1 5}`" outputs "`0x0678a`". + +This command has extra variants to reproduce inconsistent output casing: "`Hex`" prints the last three digits in lowercase and the rest uppercase; "`HEx`" prints the last two digits in lowercase and the rest uppercase; "`hEX`" prints the last three digits in uppercase and the rest lowercase; and "`heX`" prints the last two digits in uppercase and the rest lowercase. diff --git a/engine/16/macros.asm b/engine/16/macros.asm new file mode 100644 index 0000000..55842c3 --- /dev/null +++ b/engine/16/macros.asm @@ -0,0 +1,465 @@ +; Some functions are defined as macros so they can be reused for multiple 16-bit tables +; (they are not parameterized due to performance constraints; loads and non-evicting stores should be as fast as possible) + +MACRO ___conversion_table_load + ; macro arguments: WRAM prefix, constant prefix + ; in: a: 8-bit index + ; out: hl: 16-bit index; a: clobbered + ld l, a + ld h, $ff + cp \2_MINIMUM_RESERVED_INDEX + ret nc + inc h + and a + ret z + if (\2_ENTRIES + 1) < \2_MINIMUM_RESERVED_INDEX + cp \2_ENTRIES + 1 + ld l, h ;return zero for invalid entries (since they will never be allocated) + ret nc + endc + add a, a + ld l, a + if \2_ENTRIES >= $80 + ; if there are $80 entries or more, we have to deal with carry + adc HIGH(\1Entries) + sub l + ld h, a + else + ld h, HIGH(\1Entries) + endc + ldh a, [rSVBK] + push af + ld a, BANK(\1) + ldh [rSVBK], a + ld a, [hli] + ld h, [hl] + ld l, a + pop af + ldh [rSVBK], a + ret +ENDM + +MACRO ___conversion_table_store + ; macro arguments: WRAM prefix, constant prefix + ; in: hl: 16-bit index + ; out: a: 8-bit index; hl: clobbered + ; This macro must be followed by garbage collection code! The code will call the function at the end of the macro + ; when garbage collection is needed. That code must preserve de and rSVBK. + ld a, l + cp \2_MINIMUM_RESERVED_INDEX + jr c, .not_reserved + inc h + ret z + dec h +.not_reserved + or h + ret z + + ; we know it's a real index (not zero or a negative reserved value), so check if it is already in the table + ldh a, [rSVBK] + push de + push bc + push af + ld e, l + ld d, h + ld a, BANK(\1) + ldh [rSVBK], a + + if \2_CACHE_SIZE + ; if we have a cache, check it first, as it is the fastest way + if \2_CACHE_SIZE > 1 + ld a, l + xor h + and \2_CACHE_SIZE - 1 + add a, LOW(\1EntryCache) + ld l, a + ld h, HIGH(\1EntryCache) + ld a, [hl] + else + ld a, [\1EntryCache] + endc + and a + jr z, .cache_miss + cp \2_ENTRIES + 1 + jr nc, .cache_miss + ld c, a + add a, a + ld l, a + if \2_ENTRIES >= $80 + ; if there are at least $80 entries, we have to deal with carry + adc HIGH(\1Entries) + sub l + ld h, a + else + ld h, HIGH(\1Entries) + endc + ld a, [hli] + cp e + jr nz, .cache_miss + ld a, [hl] + cp d + jp z, .done + .cache_miss + endc + + ; it's not in the cache (perhaps because we don't even have one), so look for the index in the table + ld hl, \1Entries + ld b, h ;not $FF = don't add to the recent indexes list + DEF ___unroll = 8 + if \2_ENTRIES % ___unroll + ; Duff's device, gbz80 edition + ; note that the block inside the rept is 8 bytes long + db $18, 8 * (___unroll - (\2_ENTRIES % ___unroll)) ;jr + endc +.search_loop + rept ___unroll + ld a, [hli] + cp e + ld a, [hli] + jr nz, :+ + cp d + jr z, .found + : + endr + ld a, l + cp LOW(\1EntriesEnd) + jr nz, .search_loop + if \2_ENTRIES >= $80 + bit 0, h + ; if HIGH(\1EntriesEnd) is odd, we jump on z; otherwise, we jump on nz + ; so we have to encode a "jr z/nz, .search_loop" instruction according to that value - jr z = $28, jr nz = $20 + db 8 * (HIGH(\1EntriesEnd) & 1) + $20 + db .search_loop - (@ + 1) + endc + + ; not found - we have to allocate the 16-bit ID on the table and return the new 8-bit ID for it + call .allocate ;returns hl = position + 2 + push hl + dec hl + ld a, d + ld [hld], a + ld [hl], e + if \2_ENTRIES >= $80 + ld hl, \1UsedSlots + else + ld l, LOW(\1UsedSlots) + endc + inc [hl] + pop hl + ld b, -1 ;$FF = add to the recent indexes list + +.found + ; hl points past the entry + ld a, l + if \2_ENTRIES >= $7F + ; if there enough entries, the offset to \1 is 9 bits wide, capping at $1FE for the maximum $FE entries + ; so we set the carry to the value of the top bit of the offset, and then rra this bit into a + srl h + ; if HIGH(\1) is even, srl h is correct; otherwise, we have to invert it. Since we can't conditionally include a + ; ccf instruction (as it would create a circular dependency between assembler and linker), we have no choice but + ; to execute a ccf on odd HIGH(\1) and a nop on even HIGH(\1) by inserting the correct instruction dynamically + ; using a db. Note that ccf = $3F and nop = $00. + db (HIGH(\1) & 1) * $3F + rra + else + ; with less than $7F entries, the offset is 8 bits wide and always even, so handling it is simpler + rrca + endc + dec a + ld c, a + ; if there is a cache, store the found ID in it + if \2_CACHE_SIZE > 1 + ld a, e + xor d + and \2_CACHE_SIZE - 1 + add a, LOW(\1EntryCache) + ld l, a + ld h, HIGH(\1EntryCache) + ld [hl], c + elif \2_CACHE_SIZE == 1 + ld [\1EntryCache], a + endc + + ; if the found ID was just allocated, record it as a recent allocation + inc b + jr nz, .done + ld hl, \1LastAllocatedIndex + ld a, [hl] + inc a + if \2_SAVED_RECENT_INDEXES & (\2_SAVED_RECENT_INDEXES - 1) + ; if the number of recent indexes is not a power of 2, constrain the index to range via a simple comparison... + cp \2_SAVED_RECENT_INDEXES + jr c, .no_recent_overflow + xor a + .no_recent_overflow + else + ; ...but if it is a power of 2, it's simpler to just use an and + and \2_SAVED_RECENT_INDEXES - 1 + endc + ld [hl], a + add a, LOW(\1LastAllocated) + ld l, a + ld h, HIGH(\1LastAllocated) + ld [hl], c + +.done + pop af + ldh [rSVBK], a + ld a, c + pop bc + pop de + ret + +.allocate + ; check if the table isn't already full + ld hl, \1 + ld a, [hli] + cp \2_ENTRIES + jr nc, .no_room + ; try starting at the last allocated position + 1 + ld c, l ;fallback position in case we don't get a valid one; l = LOW(\1LastAllocatedIndex) = 1 here + ld a, [hl] + add a, LOW(\1LastAllocated) + ld l, a + ld h, HIGH(\1LastAllocated) + ld a, [hl] + and a + jr z, .start_allocation_loop + cp \2_ENTRIES + 1 + jr nc, .start_allocation_loop + ld c, a + +.start_allocation_loop + ; go from position c until the end of the table, trying to find an empty position + ld a, \2_ENTRIES + 1 + sub c + ld b, a + ld l, c + sla l + ld h, HIGH(\1Entries) + if \2_ENTRIES >= $80 + jr nc, .allocation_loop + inc h + endc +.allocation_loop + ld a, [hli] + or [hl] + inc hl ;even if there is no chance of carry, we need to preserve flags + ret z + dec b + jr nz, .allocation_loop + + ; no room was found; if we didn't start at c = 1, try with the rest of the table + ld b, c + ld c, 1 + if \2_ENTRIES >= $7F + ld hl, \1Entries + else + ld l, LOW(\1Entries) + endc + dec b + jr nz, .allocation_loop + +.no_room + ; the table is really full; free up slots and try again (WARNING: the loop won't exit until some slots are freed) + call .collect_garbage + ld c, 1 + jr .start_allocation_loop + +.collect_garbage + ; as stated at the top, this macro must be followed by garbage-collection code, which must preserve de and rSVBK + ; all other registers are free/clobbers; this code will be called as a function when needed +ENDM + +MACRO ___conversion_bitmap_initialize + ; macro arguments: WRAM prefix, constant prefix, bit setting function (must preserve de; may be a local label) + ; falls through; clobbers all registers (make sure to push de before invoking!) + xor a + ld hl, wConversionTableBitmap + DEF ___unroll = 4 + ld c, (\2_ENTRIES + 8 * ___unroll - 1) / (8 * ___unroll) +.initialization_clear_loop + rept ___unroll + ld [hli], a + endr + dec c + jr nz, .initialization_clear_loop + if \2_LOCKED_ENTRIES + ld de, \1LockedEntries + else + ld de, \1LastAllocated + endc +.initialization_locked_loop + ld a, [de] + call \3 + inc e + jr nz, .initialization_locked_loop +ENDM + +MACRO ___conversion_bitmap_check_structs + ; macro arguments: struct pointer, struct length, struct count, bit setting function + ; may clobber anything; falls through + DEF ___unroll = 8 + if (\3) <= ___unroll + FOR ___iteration, \3 + ld a, [(\1) + ___iteration * (\2)] + call \4 + endr + else + ld de, \1 + ld hl, wTempLoopCounter + ld [hl], ((\3) + ___unroll - 1) / ___unroll + if (\3) % ___unroll + ; again, Duff's device - the body of the rept is 10 bytes long + db $18, 10 * (___unroll - ((\3) % ___unroll)) + endc + .check_loop\@ + rept ___unroll + ld a, [de] + ld hl, \2 + add hl, de + ld d, h + ld e, l + call \4 + endr + ld hl, wTempLoopCounter + dec [hl] + jr nz, .check_loop\@ + endc +ENDM + +MACRO ___conversion_bitmap_check_values + ; macro arguments: bit setting function, address, address, address... + for ___unroll, 2, _NARG + 1 + ld a, [\<___unroll>] + call \1 + endr +ENDM + +MACRO ___conversion_bitmap_free_unused + ; macro arguments: WRAM prefix, constant prefix + ld bc, \2_ENTRIES >> 3 + ld de, wConversionTableBitmap + ld a, [de] + inc e + ld hl, \1Entries +.value_removal_loop + push de + ld e, a + ; no ___unroll here since we rely on there being 8 bits per byte + FOR ___iteration, 8 + srl e + ld a, [hli] + jr nc, :+ + or [hl] + jr nz, :++ + : + xor a + ld [hld], a + ld [hl], a + dec b + : + set 0, l ;so hl points to the second byte of the entry regardless of whether it was cleared + if (\2_ENTRIES >= $80) && (___iteration == 6) + inc hl ;the only iteration with any chance of carry is this one + else + inc l + endc + endr + pop de + ld a, [de] + inc e + dec c + jr nz, .value_removal_loop + if \2_ENTRIES & 7 + ; handle the few remaining entries that couldn't be handled by the loop + ld e, a + FOR ___iteration, \2_ENTRIES & 7 + ; same loop as above + srl e + ld a, [hli] + db $30, 3 ;jr nc, + or [hl] + db $20, 4 ;jr nz, + xor a + ld [hld], a + ld [hl], a + dec b + if (___iteration + 1) < (\2_ENTRIES & 7) + ; no point incrementing the pointer if it is the last iteration + set 0, l + inc l ;no overflow is possible here + endc + endr + endc + ; b contains minus the number of cleared entries now + ld a, \2_ENTRIES + add a, b + ld [\1UsedSlots], a +ENDM + +MACRO ___conversion_bitmap_set + ; macro argument: constant prefix + ; in: a: index - sets the corresponding bit in wConversionTableBitmap if the index is in range + dec a + cp \1_ENTRIES + ret nc + ; what follows duplicates FlagAction in part, but calling the function is slow + swap a + rlca + ld b, a + and $1f + add a, LOW(wConversionTableBitmap) + ld l, a + ld a, b + ld h, HIGH(wConversionTableBitmap) + ld c, [hl] + inc c + ret z + rlca + add a, a + ld b, a + sbc a + and 3 + inc a + sla b + jr nc, .bitmap_set_skip_shift + add a, a +.bitmap_set_skip_shift + bit 2, b + jr z, .bitmap_set_skip_swap + swap a +.bitmap_set_skip_swap + or [hl] + ld [hl], a + ret +ENDM + +MACRO ___conversion_table_lock_ID + ; macro arguments: WRAM prefix, constant prefix + ; in: h = 8-bit index or zero (to clear), l = position + ; out: a = original h, hl = clobbered, carry = set if error + ld a, l + cp \2_LOCKED_ENTRIES + ccf + ld a, h + ret c + cp \2_ENTRIES + 1 + ccf + ret c + ldh a, [rSVBK] + push af + ld a, BANK(\1) + ldh [rSVBK], a + ld a, LOW(\1LockedEntries) + add a, l + ld l, a + ld a, h + ld h, HIGH(\1LockedEntries) + ld [hl], a + ld h, a + pop af ;carry was clear when pushed, so it remains clear + ldh [rSVBK], a + ld a, h + ret +ENDM diff --git a/engine/16/table_functions.asm b/engine/16/table_functions.asm new file mode 100644 index 0000000..e1d9c3c --- /dev/null +++ b/engine/16/table_functions.asm @@ -0,0 +1,111 @@ +INCLUDE "engine/16/macros.asm" + +ForceGarbageCollection:: + push bc + ldh a, [rSVBK] + push af + ld a, BANK("16-bit WRAM tables") + ldh [rSVBK], a + call PokemonTableGarbageCollection + call MoveTableGarbageCollection + pop af + ldh [rSVBK], a + pop bc + ret + +; Note: ID = 8-bit ID used in memory, etc.; index = true 16-bit index into tables + +_GetPokemonIndexFromID:: + ___conversion_table_load wPokemonIndexTable, MON_TABLE + +_GetPokemonIDFromIndex:: + ___conversion_table_store wPokemonIndexTable, MON_TABLE + ; fallthrough - as required by the macro +PokemonTableGarbageCollection: + ; must preserve de and rSVBK + push de + ldh a, [rSVBK] + push af + ___conversion_bitmap_initialize wPokemonIndexTable, MON_TABLE, .set_bit + ld a, 1 + ldh [rSVBK], a + ___conversion_bitmap_check_structs wPartyMons, PARTYMON_STRUCT_LENGTH, PARTY_LENGTH, .set_bit + ___conversion_bitmap_check_structs wBreedMon1Species, wBreedMon2 - wBreedMon1Species, 2, .set_bit + ld a, [wEggMonSpecies] + call .set_bit + ; may or may not be valid, but marking them in use is free + ___conversion_bitmap_check_structs wOTPartyMons, PARTYMON_STRUCT_LENGTH, PARTY_LENGTH, .set_bit + ___conversion_bitmap_check_structs wRoamMon1, wRoamMon2 - wRoamMon1, 3, .set_bit + ___conversion_bitmap_check_structs wBugContestFirstPlaceMon, wBugContestSecondPlaceMon - wBugContestFirstPlaceMon, 3, .set_bit + ___conversion_bitmap_check_values .set_bit, wBufferMonSpecies, wTempMonSpecies, wContestMonSpecies, \ + wBattleMonSpecies, wEnemyMonSpecies, wOddEggSpecies, wBaseSpecies + pop af + ldh [rSVBK], a + ldh a, [hSRAMBank] + push af + ld a, BANK(sBox) + call OpenSRAM + ___conversion_bitmap_check_structs sBoxMons, BOXMON_STRUCT_LENGTH, MONS_PER_BOX, .set_bit + pop af + call OpenSRAM ;will close SRAM if hSRAMBank was -1 + ___conversion_bitmap_free_unused wPokemonIndexTable, MON_TABLE + pop de + ret + +.set_bit + ___conversion_bitmap_set MON_TABLE + +_LockPokemonID:: + ___conversion_table_lock_ID wPokemonIndexTable, MON_TABLE + +_GetMoveIndexFromID:: + ___conversion_table_load wMoveIndexTable, MOVE_TABLE + +_GetMoveIDFromIndex:: + ___conversion_table_store wMoveIndexTable, MOVE_TABLE + ; fallthrough +MoveTableGarbageCollection: + ; must preserve de and rSVBK + push de + ldh a, [rSVBK] + push af + ld a, 1 + ldh [rSVBK], a + FOR ___move, NUM_MOVES + ___conversion_bitmap_check_structs wPartyMon1Moves + ___move, PARTYMON_STRUCT_LENGTH, PARTY_LENGTH, .set_bit + ___conversion_bitmap_check_structs wBreedMon1Moves + ___move, wBreedMon2 - wBreedMon1, 2, .set_bit + ld a, [wEggMonMoves + ___move] + call .set_bit + ; may or may not be valid + ___conversion_bitmap_check_structs wOTPartyMon1Moves + ___move, PARTYMON_STRUCT_LENGTH, PARTY_LENGTH, .set_bit + ___conversion_bitmap_check_values .set_bit, wBufferMonMoves + ___move, wTempMonMoves + ___move, wContestMonMoves + ___move, \ + wBattleMonMoves + ___move, wEnemyMonMoves + ___move, wWildMonMoves + ___move, \ + wPlayerUsedMoves + ___move + endr + ld a, [wNamedObjectIndex] ;or any of its aliases... + call .set_bit + ; only valid sometimes + ___conversion_bitmap_check_values .set_bit, wCurPlayerMove, wCurEnemyMove, wDisabledMove, wEnemyDisabledMove, wUnusedPlayerLockedMove, \ + wLastPlayerMove, wLastEnemyMove, wLastPlayerCounterMove, wLastEnemyCounterMove, \ + wPlayerTrappingMove, wEnemyTrappingMove, wPlayerMoveStructAnimation, wEnemyMoveStructAnimation, \ + wPutativeTMHMMove + pop af + ldh [rSVBK], a + ldh a, [hSRAMBank] + push af + ld a, BANK(sBox) + call OpenSRAM + FOR ___move, NUM_MOVES + ___conversion_bitmap_check_structs sBoxMon1Moves + ___move, BOXMON_STRUCT_LENGTH, MONS_PER_BOX, .set_bit + endr + pop af + call OpenSRAM + ___conversion_bitmap_free_unused wMoveIndexTable, MOVE_TABLE + pop de + ret + +.set_bit + ___conversion_bitmap_set MOVE_TABLE + +_LockMoveID:: + ___conversion_table_lock_ID wMoveIndexTable, MOVE_TABLE diff --git a/engine/battle/ai/items.asm b/engine/battle/ai/items.asm new file mode 100644 index 0000000..7e5c5ef --- /dev/null +++ b/engine/battle/ai/items.asm @@ -0,0 +1,845 @@ +AI_SwitchOrTryItem: + and a + + ld a, [wBattleMode] + dec a + ret z + + ld a, [wLinkMode] + and a + ret nz + + farcall CheckEnemyLockedIn + ret nz + + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_CANT_RUN, a + jr nz, DontSwitch + + ld a, [wEnemyWrapCount] + and a + jr nz, DontSwitch + + ; always load the first trainer class in wTrainerClass for Battle Tower trainers + ld hl, TrainerClassAttributes + TRNATTR_AI_ITEM_SWITCH + ld a, [wInBattleTowerBattle] + and a + jr nz, .ok + + ld a, [wTrainerClass] + dec a + ld bc, NUM_TRAINER_ATTRIBUTES + call AddNTimes + +.ok + bit SWITCH_OFTEN_F, [hl] + jp nz, SwitchOften + bit SWITCH_RARELY_F, [hl] + jp nz, SwitchRarely + bit SWITCH_SOMETIMES_F, [hl] + jp nz, SwitchSometimes + ; fallthrough + +DontSwitch: + call AI_TryItem + ret + +SwitchOften: + callfar CheckAbleToSwitch + ld a, [wEnemySwitchMonParam] + and $f0 + jp z, DontSwitch + + cp $10 + jr nz, .not_10 + call Random + cp 50 percent + 1 + jr c, .switch + jp DontSwitch +.not_10 + + cp $20 + jr nz, .not_20 + call Random + cp 79 percent - 1 + jr c, .switch + jp DontSwitch +.not_20 + + ; $30 + call Random + cp 4 percent + jp c, DontSwitch + +.switch + ld a, [wEnemySwitchMonParam] + and $f + inc a + ; In register 'a' is the number (1-6) of the mon to switch to + ld [wEnemySwitchMonIndex], a + jp AI_TrySwitch + +SwitchRarely: + callfar CheckAbleToSwitch + ld a, [wEnemySwitchMonParam] + and $f0 + jp z, DontSwitch + + cp $10 + jr nz, .not_10 + call Random + cp 8 percent + jr c, .switch + jp DontSwitch +.not_10 + + cp $20 + jr nz, .not_20 + call Random + cp 12 percent + jr c, .switch + jp DontSwitch +.not_20 + + ; $30 + call Random + cp 79 percent - 1 + jp c, DontSwitch + +.switch + ld a, [wEnemySwitchMonParam] + and $f + inc a + ld [wEnemySwitchMonIndex], a + jp AI_TrySwitch + +SwitchSometimes: + callfar CheckAbleToSwitch + ld a, [wEnemySwitchMonParam] + and $f0 + jp z, DontSwitch + + cp $10 + jr nz, .not_10 + call Random + cp 20 percent - 1 + jr c, .switch + jp DontSwitch +.not_10 + + cp $20 + jr nz, .not_20 + call Random + cp 50 percent + 1 + jr c, .switch + jp DontSwitch +.not_20 + + ; $30 + call Random + cp 20 percent - 1 + jp c, DontSwitch + +.switch + ld a, [wEnemySwitchMonParam] + and $f + inc a + ld [wEnemySwitchMonIndex], a + jp AI_TrySwitch + +CheckSubstatusCantRun: ; unreferenced + ld a, [wEnemySubStatus5] + bit SUBSTATUS_CANT_RUN, a + ret + +AI_TryItem: + ; items are not allowed in the Battle Tower + ld a, [wInBattleTowerBattle] + and a + ret nz + + ld a, [wEnemyTrainerItem1] + ld b, a + ld a, [wEnemyTrainerItem2] + or b + ret z + + call .IsHighestLevel + ret nc + + ld a, [wTrainerClass] + dec a + ld hl, TrainerClassAttributes + TRNATTR_AI_ITEM_SWITCH + ld bc, NUM_TRAINER_ATTRIBUTES + call AddNTimes + ld b, h + ld c, l + ld hl, AI_Items + ld de, wEnemyTrainerItem1 +.loop + ld a, [hl] + and a + inc a + ret z + + ld a, [de] + cp [hl] + jr z, .has_item + inc de + ld a, [de] + cp [hl] + jr z, .has_item + + dec de + inc hl + inc hl + inc hl + jr .loop + +.has_item + inc hl + + push hl + push de + ld de, .callback + push de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl +.callback + pop de + pop hl + + inc hl + inc hl + jr c, .loop + +; used item + xor a + ld [de], a + inc a + ld [wEnemyGoesFirst], a + + ld hl, wEnemySubStatus3 + res SUBSTATUS_BIDE, [hl] + + xor a + ld [wEnemyFuryCutterCount], a + ld [wEnemyProtectCount], a + ld [wEnemyRageCounter], a + + ld hl, wEnemySubStatus4 + res SUBSTATUS_RAGE, [hl] + + xor a + ld [wLastEnemyCounterMove], a + + scf + ret + +.IsHighestLevel: + ld a, [wOTPartyCount] + ld d, a + ld e, 0 + ld hl, wOTPartyMon1Level + ld bc, PARTYMON_STRUCT_LENGTH +.next + ld a, [hl] + cp e + jr c, .ok + ld e, a +.ok + add hl, bc + dec d + jr nz, .next + + ld a, [wCurOTMon] + ld hl, wOTPartyMon1Level + call AddNTimes + ld a, [hl] + cp e + jr nc, .yes + +.no ; unreferenced + and a + ret + +.yes + scf + ret + +AI_Items: + dbw FULL_RESTORE, .FullRestore + dbw MAX_POTION, .MaxPotion + dbw HYPER_POTION, .HyperPotion + dbw SUPER_POTION, .SuperPotion + dbw POTION, .Potion + dbw X_ACCURACY, .XAccuracy + dbw FULL_HEAL, .FullHeal + dbw GUARD_SPEC, .GuardSpec + dbw DIRE_HIT, .DireHit + dbw X_ATTACK, .XAttack + dbw X_DEFEND, .XDefend + dbw X_SPEED, .XSpeed + dbw X_SPECIAL, .XSpecial + db -1 ; end + +.FullHeal: + call .Status + jp c, .DontUse + call EnemyUsedFullHeal + jp .Use + +.Status: + ld a, [wEnemyMonStatus] + and a + jp z, .DontUse + + ld a, [bc] + bit CONTEXT_USE_F, a + jr nz, .StatusCheckContext + ld a, [bc] + bit ALWAYS_USE_F, a + jp nz, .Use + call Random + cp 20 percent - 1 + jp c, .Use + jp .DontUse + +.StatusCheckContext: + ld a, [wEnemySubStatus5] + bit SUBSTATUS_TOXIC, a + jr z, .FailToxicCheck + ld a, [wEnemyToxicCount] + cp 4 + jr c, .FailToxicCheck + call Random + cp 50 percent + 1 + jp c, .Use +.FailToxicCheck: + ld a, [wEnemyMonStatus] + and 1 << FRZ | SLP_MASK + jp z, .DontUse + jp .Use + +.FullRestore: + call .HealItem + jp nc, .UseFullRestore + ld a, [bc] + bit CONTEXT_USE_F, a + jp z, .DontUse + call .Status + jp c, .DontUse + +.UseFullRestore: + call EnemyUsedFullRestore + jp .Use + +.MaxPotion: + call .HealItem + jp c, .DontUse + call EnemyUsedMaxPotion + jp .Use + +.HealItem: + ld a, [bc] + bit CONTEXT_USE_F, a + jr nz, .CheckHalfOrQuarterHP + callfar AICheckEnemyHalfHP + jp c, .DontUse + ld a, [bc] + bit UNKNOWN_USE_F, a + jp nz, .CheckQuarterHP + callfar AICheckEnemyQuarterHP + jp nc, .UseHealItem + call Random + cp 50 percent + 1 + jp c, .UseHealItem + jp .DontUse + +.CheckQuarterHP: + callfar AICheckEnemyQuarterHP + jp c, .DontUse + call Random + cp 20 percent - 1 + jp c, .DontUse + jr .UseHealItem + +.CheckHalfOrQuarterHP: + callfar AICheckEnemyHalfHP + jp c, .DontUse + callfar AICheckEnemyQuarterHP + jp nc, .UseHealItem + call Random + cp 20 percent - 1 + jp nc, .DontUse + +.UseHealItem: + jp .Use + +.HyperPotion: + call .HealItem + jp c, .DontUse + ld b, 200 + call EnemyUsedHyperPotion + jp .Use + +.SuperPotion: + call .HealItem + jp c, .DontUse + ld b, 50 + call EnemyUsedSuperPotion + jp .Use + +.Potion: + call .HealItem + jp c, .DontUse + ld b, 20 + call EnemyUsedPotion + jp .Use + +; Everything up to "End unused" is unused + +.UnusedHealItem: ; unreferenced +; This has similar conditions to .HealItem + callfar AICheckEnemyMaxHP + jr c, .dont_use + push bc + ld de, wEnemyMonMaxHP + 1 + ld hl, wEnemyMonHP + 1 + ld a, [de] + sub [hl] + jr z, .check_40_percent + dec hl + dec de + ld c, a + sbc [hl] + and a + jr nz, .check_40_percent + ld a, c + cp b + jp c, .check_50_percent + callfar AICheckEnemyQuarterHP + jr c, .check_40_percent + +.check_50_percent + pop bc + ld a, [bc] + bit UNKNOWN_USE_F, a + jp z, .Use + call Random + cp 50 percent + 1 + jp c, .Use + +.dont_use + jp .DontUse + +.check_40_percent + pop bc + ld a, [bc] + bit UNKNOWN_USE_F, a + jp z, .DontUse + call Random + cp 39 percent + 1 + jp c, .Use + jp .DontUse + +; End unused + +.XAccuracy: + call .XItem + jp c, .DontUse + call EnemyUsedXAccuracy + jp .Use + +.GuardSpec: + call .XItem + jp c, .DontUse + call EnemyUsedGuardSpec + jp .Use + +.DireHit: + call .XItem + jp c, .DontUse + call EnemyUsedDireHit + jp .Use + +.XAttack: + call .XItem + jp c, .DontUse + call EnemyUsedXAttack + jp .Use + +.XDefend: + call .XItem + jp c, .DontUse + call EnemyUsedXDefend + jp .Use + +.XSpeed: + call .XItem + jp c, .DontUse + call EnemyUsedXSpeed + jp .Use + +.XSpecial: + call .XItem + jp c, .DontUse + call EnemyUsedXSpecial + jp .Use + +.XItem: + ld a, [wEnemyTurnsTaken] + and a + jr nz, .notfirstturnout + ld a, [bc] + bit ALWAYS_USE_F, a + jp nz, .Use + call Random + cp 50 percent + 1 + jp c, .DontUse + ld a, [bc] + bit CONTEXT_USE_F, a + jp nz, .Use + call Random + cp 50 percent + 1 + jp c, .DontUse + jp .Use +.notfirstturnout + ld a, [bc] + bit ALWAYS_USE_F, a + jp z, .DontUse + call Random + cp 20 percent - 1 + jp nc, .DontUse + jp .Use + +.DontUse: + scf + ret + +.Use: + and a + ret + +AIUpdateHUD: + call UpdateEnemyMonInParty + farcall UpdateEnemyHUD + ld a, $1 + ldh [hBGMapMode], a + ld hl, wEnemyItemState + dec [hl] + scf + ret + +AIUsedItemSound: + push de + ld de, SFX_FULL_HEAL + call PlaySFX + pop de + ret + +EnemyUsedFullHeal: + call AIUsedItemSound + call AI_HealStatus + ld a, FULL_HEAL + jp PrintText_UsedItemOn_AND_AIUpdateHUD + +EnemyUsedMaxPotion: + ld a, MAX_POTION + ld [wCurEnemyItem], a + jr FullRestoreContinue + +EnemyUsedFullRestore: +; BUG: AI use of Full Heal does not cure confusion status (see docs/bugs_and_glitches.md) + call AI_HealStatus + ld a, FULL_RESTORE + ld [wCurEnemyItem], a + ld hl, wEnemySubStatus3 + res SUBSTATUS_CONFUSED, [hl] + xor a + ld [wEnemyConfuseCount], a + ; fallthrough + +FullRestoreContinue: + ld de, wCurHPAnimOldHP + ld hl, wEnemyMonHP + 1 + ld a, [hld] + ld [de], a + inc de + ld a, [hl] + ld [de], a + inc de + ld hl, wEnemyMonMaxHP + 1 + ld a, [hld] + ld [de], a + inc de + ld [wCurHPAnimMaxHP], a + ld [wEnemyMonHP + 1], a + ld a, [hl] + ld [de], a + ld [wCurHPAnimMaxHP + 1], a + ld [wEnemyMonHP], a + jr EnemyPotionFinish + +EnemyUsedPotion: + ld a, POTION + ld b, 20 + jr EnemyPotionContinue + +EnemyUsedSuperPotion: + ld a, SUPER_POTION + ld b, 50 + jr EnemyPotionContinue + +EnemyUsedHyperPotion: + ld a, HYPER_POTION + ld b, 200 + +EnemyPotionContinue: + ld [wCurEnemyItem], a + ld hl, wEnemyMonHP + 1 + ld a, [hl] + ld [wCurHPAnimOldHP], a + add b + ld [hld], a + ld [wCurHPAnimNewHP], a + ld a, [hl] + ld [wCurHPAnimOldHP + 1], a + ld [wCurHPAnimNewHP + 1], a + jr nc, .ok + inc a + ld [hl], a + ld [wCurHPAnimNewHP + 1], a +.ok + inc hl + ld a, [hld] + ld b, a + ld de, wEnemyMonMaxHP + 1 + ld a, [de] + dec de + ld [wCurHPAnimMaxHP], a + sub b + ld a, [hli] + ld b, a + ld a, [de] + ld [wCurHPAnimMaxHP + 1], a + sbc b + jr nc, EnemyPotionFinish + inc de + ld a, [de] + dec de + ld [hld], a + ld [wCurHPAnimNewHP], a + ld a, [de] + ld [hl], a + ld [wCurHPAnimNewHP + 1], a + +EnemyPotionFinish: + call PrintText_UsedItemOn + hlcoord 2, 2 + xor a + ld [wWhichHPBar], a + call AIUsedItemSound + predef AnimateHPBar + jp AIUpdateHUD + +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] + ld c, a + ld hl, wOTPartyMon1HP + ld d, 0 +.SwitchLoop: + ld a, [hli] + ld b, a + ld a, [hld] + or b + jr z, .fainted + inc d +.fainted + push bc + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop bc + dec c + jr nz, .SwitchLoop + + ld a, d + cp 2 + jp nc, AI_Switch + and a + ret + +AI_Switch: + ld a, $1 + ld [wEnemyIsSwitching], a + ld [wEnemyGoesFirst], a + ld hl, wEnemySubStatus4 + res SUBSTATUS_RAGE, [hl] + xor a + ldh [hBattleTurn], a + callfar PursuitSwitch + + push af + ld a, [wCurOTMon] + ld hl, wOTPartyMon1Status + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld d, h + ld e, l + ld hl, wEnemyMonStatus + ld bc, MON_MAXHP - MON_STATUS + call CopyBytes + pop af + + jr c, .skiptext + ld hl, EnemyWithdrewText + call PrintText + +.skiptext + ld a, 1 + ld [wBattleHasJustStarted], a + callfar NewEnemyMonStatus + callfar ResetEnemyStatLevels + ld hl, wPlayerSubStatus1 + res SUBSTATUS_IN_LOVE, [hl] + farcall EnemySwitch + farcall ResetBattleParticipants + xor a + ld [wBattleHasJustStarted], a + ld a, [wLinkMode] + and a + ret nz + scf + ret + +EnemyWithdrewText: + text_far _EnemyWithdrewText + text_end + +EnemyUsedFullHealRed: ; unreferenced + call AIUsedItemSound + call AI_HealStatus + ld a, FULL_HEAL_RED ; X_SPEED + jp PrintText_UsedItemOn_AND_AIUpdateHUD + +AI_HealStatus: +; BUG: AI use of Full Heal or Full Restore does not cure Nightmare status (see docs/bugs_and_glitches.md) + ld a, [wCurOTMon] + ld hl, wOTPartyMon1Status + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + xor a + ld [hl], a + ld [wEnemyMonStatus], a + ld hl, wEnemySubStatus5 + res SUBSTATUS_TOXIC, [hl] + ret + +EnemyUsedXAccuracy: + call AIUsedItemSound + ld hl, wEnemySubStatus4 + set SUBSTATUS_X_ACCURACY, [hl] + ld a, X_ACCURACY + jp PrintText_UsedItemOn_AND_AIUpdateHUD + +EnemyUsedGuardSpec: + call AIUsedItemSound + ld hl, wEnemySubStatus4 + set SUBSTATUS_MIST, [hl] + ld a, GUARD_SPEC + jp PrintText_UsedItemOn_AND_AIUpdateHUD + +EnemyUsedDireHit: + call AIUsedItemSound + ld hl, wEnemySubStatus4 + set SUBSTATUS_FOCUS_ENERGY, [hl] + ld a, DIRE_HIT + jp PrintText_UsedItemOn_AND_AIUpdateHUD + +AICheckEnemyFractionMaxHP: ; unreferenced +; Input: a = divisor +; Work: bc = [wEnemyMonMaxHP] / a +; Work: de = [wEnemyMonHP] +; Output: +; - c, nz if [wEnemyMonHP] > [wEnemyMonMaxHP] / a +; - nc, z if [wEnemyMonHP] = [wEnemyMonMaxHP] / a +; - nc, nz if [wEnemyMonHP] < [wEnemyMonMaxHP] / a + ldh [hDivisor], a + ld hl, wEnemyMonMaxHP + ld a, [hli] + ldh [hDividend], a + ld a, [hl] + ldh [hDividend + 1], a + ld b, 2 + call Divide + ldh a, [hQuotient + 3] + ld c, a + ldh a, [hQuotient + 2] + ld b, a + ld hl, wEnemyMonHP + 1 + ld a, [hld] + ld e, a + ld a, [hl] + ld d, a + ld a, d + sub b + ret nz + ld a, e + sub c + ret + +EnemyUsedXAttack: + ld b, ATTACK + ld a, X_ATTACK + jr EnemyUsedXItem + +EnemyUsedXDefend: + ld b, DEFENSE + ld a, X_DEFEND + jr EnemyUsedXItem + +EnemyUsedXSpeed: + ld b, SPEED + ld a, X_SPEED + jr EnemyUsedXItem + +EnemyUsedXSpecial: + ld b, SP_ATTACK + ld a, X_SPECIAL + +; Parameter +; a = ITEM_CONSTANT +; b = BATTLE_CONSTANT (ATTACK, DEFENSE, SPEED, SP_ATTACK, SP_DEFENSE, ACCURACY, EVASION) +EnemyUsedXItem: + ld [wCurEnemyItem], a + push bc + call PrintText_UsedItemOn + pop bc + farcall RaiseStat + jp AIUpdateHUD + +; Parameter +; a = ITEM_CONSTANT +PrintText_UsedItemOn_AND_AIUpdateHUD: + ld [wCurEnemyItem], a + call PrintText_UsedItemOn + jp AIUpdateHUD + +PrintText_UsedItemOn: + ld a, [wCurEnemyItem] + ld [wNamedObjectIndex], a + call GetItemName + ld hl, wStringBuffer1 + ld de, wMonOrItemNameBuffer + ld bc, ITEM_NAME_LENGTH + call CopyBytes + ld hl, EnemyUsedOnText + jp PrintText + +EnemyUsedOnText: + text_far _EnemyUsedOnText + text_end diff --git a/engine/battle/ai/move.asm b/engine/battle/ai/move.asm new file mode 100644 index 0000000..cf0c09b --- /dev/null +++ b/engine/battle/ai/move.asm @@ -0,0 +1,217 @@ +AIChooseMove: +; Score each move of wEnemyMonMoves in wEnemyAIMoveScores. Lower is better. +; Pick the move with the lowest score. + +; Wildmons attack at random. + ld a, [wBattleMode] + dec a + ret z + + ld a, [wLinkMode] + and a + ret nz + +; No use picking a move if there's no choice. + farcall CheckEnemyLockedIn + ret nz + +; The default score is 20. Unusable moves are given a score of 80. + ld a, 20 + ld hl, wEnemyAIMoveScores + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + +; Don't pick disabled moves. + ld a, [wEnemyDisabledMove] + and a + jr z, .CheckPP + + ld hl, wEnemyMonMoves + ld c, 0 +.CheckDisabledMove: + cp [hl] + jr z, .ScoreDisabledMove + inc c + inc hl + jr .CheckDisabledMove +.ScoreDisabledMove: + ld hl, wEnemyAIMoveScores + ld b, 0 + add hl, bc + ld [hl], 80 + +; Don't pick moves with 0 PP. +.CheckPP: + ld hl, wEnemyAIMoveScores - 1 + ld de, wEnemyMonPP + ld b, 0 +.CheckMovePP: + inc b + ld a, b + cp NUM_MOVES + 1 + jr z, .ApplyLayers + inc hl + ld a, [de] + inc de + and PP_MASK + jr nz, .CheckMovePP + ld [hl], 80 + jr .CheckMovePP + +; Apply AI scoring layers depending on the trainer class. +.ApplyLayers: + ld hl, TrainerClassAttributes + TRNATTR_AI_MOVE_WEIGHTS + + ; If we have a battle in BattleTower just load the Attributes of the first trainer class in wTrainerClass (Falkner) + ; so we have always the same AI, regardless of the loaded class of trainer + ld a, [wInBattleTowerBattle] + bit 0, a + jr nz, .battle_tower_skip + + ld a, [wTrainerClass] + dec a + ld bc, 7 ; Trainer2AI - Trainer1AI + call AddNTimes + +.battle_tower_skip + lb bc, CHECK_FLAG, 0 + push bc + push hl + +.CheckLayer: + pop hl + pop bc + + ld a, c + cp 16 ; up to 16 scoring layers + jr z, .DecrementScores + + push bc + ld d, BANK(TrainerClassAttributes) + predef SmallFarFlagAction + ld d, c + pop bc + + inc c + push bc + push hl + + ld a, d + and a + jr z, .CheckLayer + + ld hl, AIScoringPointers + dec c + ld b, 0 + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld a, BANK(AIScoring) + call FarCall_hl + + jr .CheckLayer + +; Decrement the scores of all moves one by one until one reaches 0. +.DecrementScores: + ld hl, wEnemyAIMoveScores + ld de, wEnemyMonMoves + ld c, NUM_MOVES + +.DecrementNextScore: + ; If the enemy has no moves, this will infinite. + ld a, [de] + inc de + and a + jr z, .DecrementScores + + ; We are done whenever a score reaches 0 + dec [hl] + jr z, .PickLowestScoreMoves + + ; If we just decremented the fourth move's score, go back to the first move + inc hl + dec c + jr z, .DecrementScores + + jr .DecrementNextScore + +; In order to avoid bias towards the moves located first in memory, increment the scores +; that were decremented one more time than the rest (in case there was a tie). +; This means that the minimum score will be 1. +.PickLowestScoreMoves: + ld a, c + +.move_loop + inc [hl] + dec hl + inc a + cp NUM_MOVES + 1 + jr nz, .move_loop + + ld hl, wEnemyAIMoveScores + ld de, wEnemyMonMoves + ld c, NUM_MOVES + +; Give a score of 0 to a blank move +.loop2 + ld a, [de] + and a + jr nz, .skip_load + ld [hl], a + +; Disregard the move if its score is not 1 +.skip_load + ld a, [hl] + dec a + jr z, .keep + xor a + ld [hli], a + jr .after_toss + +.keep + ld a, [de] + ld [hli], a +.after_toss + inc de + dec c + jr nz, .loop2 + +; Randomly choose one of the moves with a score of 1 +.ChooseMove: + ld hl, wEnemyAIMoveScores + call Random + maskbits NUM_MOVES + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + and a + jr z, .ChooseMove + + ld [wCurEnemyMove], a + ld a, c + ld [wCurEnemyMoveNum], a + ret + +AIScoringPointers: +; entries correspond to AI_* constants + dw AI_Basic + dw AI_Setup + dw AI_Types + dw AI_Offensive + dw AI_Smart + dw AI_Opportunist + dw AI_Aggressive + dw AI_Cautious + dw AI_Status + dw AI_Risky + dw AI_None + dw AI_None + dw AI_None + dw AI_None + dw AI_None + dw AI_None diff --git a/engine/battle/ai/redundant.asm b/engine/battle/ai/redundant.asm new file mode 100644 index 0000000..6525bde --- /dev/null +++ b/engine/battle/ai/redundant.asm @@ -0,0 +1,199 @@ +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. + ld a, c + ld de, 3 + ld hl, .Moves + call IsInArray + jp nc, .NotRedundant + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Moves: + dbw EFFECT_DREAM_EATER, .DreamEater + dbw EFFECT_HEAL, .Heal + dbw EFFECT_LIGHT_SCREEN, .LightScreen + dbw EFFECT_MIST, .Mist + dbw EFFECT_FOCUS_ENERGY, .FocusEnergy + dbw EFFECT_CONFUSE, .Confuse + dbw EFFECT_TRANSFORM, .Transform + dbw EFFECT_REFLECT, .Reflect + dbw EFFECT_SUBSTITUTE, .Substitute + dbw EFFECT_LEECH_SEED, .LeechSeed + dbw EFFECT_DISABLE, .Disable + dbw EFFECT_ENCORE, .Encore + dbw EFFECT_SNORE, .Snore + dbw EFFECT_SLEEP_TALK, .SleepTalk + dbw EFFECT_MEAN_LOOK, .MeanLook + dbw EFFECT_NIGHTMARE, .Nightmare + dbw EFFECT_SPIKES, .Spikes + dbw EFFECT_FORESIGHT, .Foresight + dbw EFFECT_PERISH_SONG, .PerishSong + dbw EFFECT_SANDSTORM, .Sandstorm + dbw EFFECT_ATTRACT, .Attract + dbw EFFECT_SAFEGUARD, .Safeguard + dbw EFFECT_RAIN_DANCE, .RainDance + dbw EFFECT_SUNNY_DAY, .SunnyDay + dbw EFFECT_TELEPORT, .Teleport + dbw EFFECT_MORNING_SUN, .MorningSun + dbw EFFECT_SYNTHESIS, .Synthesis + dbw EFFECT_MOONLIGHT, .Moonlight + dbw EFFECT_SWAGGER, .Swagger + dbw EFFECT_FUTURE_SIGHT, .FutureSight + db -1 + +.LightScreen: + ld a, [wEnemyScreens] + bit SCREENS_LIGHT_SCREEN, a + ret + +.Mist: + ld a, [wEnemySubStatus4] + bit SUBSTATUS_MIST, a + ret + +.FocusEnergy: + ld a, [wEnemySubStatus4] + bit SUBSTATUS_FOCUS_ENERGY, a + ret + +.Confuse: + ld a, [wPlayerSubStatus3] + bit SUBSTATUS_CONFUSED, a + ret nz + ld a, [wPlayerScreens] + bit SCREENS_SAFEGUARD, a + ret + +.Transform: + ld a, [wEnemySubStatus5] + bit SUBSTATUS_TRANSFORMED, a + ret + +.Reflect: + ld a, [wEnemyScreens] + bit SCREENS_REFLECT, a + ret + +.Substitute: + ld a, [wEnemySubStatus4] + bit SUBSTATUS_SUBSTITUTE, a + ret + +.LeechSeed: + ld a, [wPlayerSubStatus4] + bit SUBSTATUS_LEECH_SEED, a + ret + +.Disable: + ld a, [wPlayerDisableCount] + and a + ret + +.Encore: + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_ENCORED, a + ret + +.Snore: +.SleepTalk: + ld a, [wEnemyMonStatus] + and SLP_MASK + jr z, .Redundant + jr .NotRedundant + +.MeanLook: + ld a, [wEnemySubStatus5] + bit SUBSTATUS_CANT_RUN, a + ret + +.Nightmare: + ld a, [wBattleMonStatus] + and a + jr z, .Redundant + ld a, [wPlayerSubStatus1] + bit SUBSTATUS_NIGHTMARE, a + ret + +.Spikes: + ld a, [wPlayerScreens] + bit SCREENS_SPIKES, a + ret + +.Foresight: + ld a, [wPlayerSubStatus1] + bit SUBSTATUS_IDENTIFIED, a + ret + +.PerishSong: + ld a, [wPlayerSubStatus1] + bit SUBSTATUS_PERISH, a + ret + +.Sandstorm: + ld a, [wBattleWeather] + cp WEATHER_SANDSTORM + jr z, .Redundant + jr .NotRedundant + +.Attract: + farcall CheckOppositeGender + jr c, .Redundant + ld a, [wPlayerSubStatus1] + bit SUBSTATUS_IN_LOVE, a + ret + +.Safeguard: + ld a, [wEnemyScreens] + bit SCREENS_SAFEGUARD, a + ret + +.RainDance: + ld a, [wBattleWeather] + cp WEATHER_RAIN + jr z, .Redundant + jr .NotRedundant + +.SunnyDay: + ld a, [wBattleWeather] + cp WEATHER_SUN + jr z, .Redundant + jr .NotRedundant + +.DreamEater: + ld a, [wBattleMonStatus] + and SLP_MASK + jr z, .Redundant + jr .NotRedundant + +.Swagger: + ld a, [wPlayerSubStatus3] + bit SUBSTATUS_CONFUSED, a + ret + +.FutureSight: +; BUG: AI does not discourage Future Sight when it's already been used (see docs/bugs_and_glitches.md) + ld a, [wEnemyScreens] + bit 5, a + ret + +.Heal: +.MorningSun: +.Synthesis: +.Moonlight: + farcall AICheckEnemyMaxHP + jr nc, .NotRedundant + +.Teleport: +.Redundant: + ld a, 1 + and a + ret + +.NotRedundant: + xor a + ret diff --git a/engine/battle/ai/scoring.asm b/engine/battle/ai/scoring.asm new file mode 100644 index 0000000..024bb72 --- /dev/null +++ b/engine/battle/ai/scoring.asm @@ -0,0 +1,3293 @@ +AIScoring: ; used only for BANK(AIScoring) + + +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 + + ld hl, wEnemyAIMoveScores - 1 + ld de, wEnemyMonMoves + ld b, NUM_MOVES + 1 +.checkmove + dec b + ret z + + inc hl + ld a, [de] + and a + ret z + + inc de + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + ld c, a + +; Dismiss moves with special effects if they are +; useless or not a good choice right now. +; For example, healing moves, weather moves, Dream Eater... + push hl + push de + push bc + farcall AI_Redundant + pop bc + pop de + pop hl + jr nz, .discourage + +; Dismiss status-only moves if the player can't be statused. + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + push hl + push de + push bc + ld hl, StatusOnlyEffects + ld de, 1 + call IsInArray + + pop bc + pop de + pop hl + jr nc, .checkmove + + ld a, [wBattleMonStatus] + and a + jr nz, .discourage + +; Dismiss Safeguard if it's already active. + ld a, [wPlayerScreens] + bit SCREENS_SAFEGUARD, a + jr z, .checkmove + +.discourage + call AIDiscourageMove + jr .checkmove + +INCLUDE "data/battle/ai/status_only_effects.asm" + + +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. +; 50% chance to greatly encourage stat-down moves during the first turn of player's Pokemon. +; Almost 90% chance to greatly discourage stat-modifying moves otherwise. + + ld hl, wEnemyAIMoveScores - 1 + ld de, wEnemyMonMoves + ld b, NUM_MOVES + 1 +.checkmove + dec b + ret z + + inc hl + ld a, [de] + and a + ret z + + inc de + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + + cp EFFECT_ATTACK_UP + jr c, .checkmove + cp EFFECT_EVASION_UP + 1 + jr c, .statup + +; cp EFFECT_ATTACK_DOWN - 1 + jr z, .checkmove + cp EFFECT_EVASION_DOWN + 1 + jr c, .statdown + + cp EFFECT_ATTACK_UP_2 + jr c, .checkmove + cp EFFECT_EVASION_UP_2 + 1 + jr c, .statup + +; cp EFFECT_ATTACK_DOWN_2 - 1 + jr z, .checkmove + cp EFFECT_EVASION_DOWN_2 + 1 + jr c, .statdown + + jr .checkmove + +.statup + ld a, [wEnemyTurnsTaken] + and a + jr nz, .discourage + + jr .encourage + +.statdown + ld a, [wPlayerTurnsTaken] + and a + jr nz, .discourage + +.encourage + call AI_50_50 + jr c, .checkmove + + dec [hl] + dec [hl] + jr .checkmove + +.discourage + call Random + cp 12 percent + jr c, .checkmove + inc [hl] + inc [hl] + jr .checkmove + + +AI_Types: +; Dismiss any move that the player is immune to. +; Encourage super-effective moves. +; Discourage not very effective moves unless +; all damaging moves are of the same type. + + ld hl, wEnemyAIMoveScores - 1 + ld de, wEnemyMonMoves + ld b, NUM_MOVES + 1 +.checkmove + dec b + ret z + + inc hl + ld a, [de] + and a + ret z + + inc de + call AIGetEnemyMove + + push hl + push bc + push de + ld a, 1 + ldh [hBattleTurn], a + callfar BattleCheckTypeMatchup + pop de + pop bc + pop hl + + ld a, [wTypeMatchup] + and a + jr z, .immune + cp EFFECTIVE + jr z, .checkmove + jr c, .noteffective + +; effective + ld a, [wEnemyMoveStruct + MOVE_POWER] + and a + jr z, .checkmove + dec [hl] + jr .checkmove + +.noteffective +; Discourage this move if there are any moves +; that do damage of a different type. + push hl + push de + push bc + ld a, [wEnemyMoveStruct + MOVE_TYPE] + ld d, a + ld hl, wEnemyMonMoves + ld b, NUM_MOVES + 1 + ld c, 0 +.checkmove2 + dec b + jr z, .movesdone + + ld a, [hli] + and a + jr z, .movesdone + + call AIGetEnemyMove + ld a, [wEnemyMoveStruct + MOVE_TYPE] + cp d + jr z, .checkmove2 + ld a, [wEnemyMoveStruct + MOVE_POWER] + and a + jr nz, .damaging + jr .checkmove2 + +.damaging + ld c, a +.movesdone + ld a, c + pop bc + pop de + pop hl + and a + jr z, .checkmove + inc [hl] + jr .checkmove + +.immune + call AIDiscourageMove + jr .checkmove + + +AI_Offensive: +; Greatly discourage non-damaging moves. + + ld hl, wEnemyAIMoveScores - 1 + ld de, wEnemyMonMoves + ld b, NUM_MOVES + 1 +.checkmove + dec b + ret z + + inc hl + ld a, [de] + and a + ret z + + inc de + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_POWER] + and a + jr nz, .checkmove + + inc [hl] + inc [hl] + jr .checkmove + + +AI_Smart: +; Context-specific scoring. + + ld hl, wEnemyAIMoveScores + ld de, wEnemyMonMoves + ld b, NUM_MOVES + 1 +.checkmove + dec b + ret z + + ld a, [de] + inc de + and a + ret z + + push de + push bc + push hl + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + ld hl, AI_Smart_EffectHandlers + ld de, 3 + call IsInArray + + inc hl + jr nc, .nextmove + + ld a, [hli] + ld e, a + ld d, [hl] + + pop hl + push hl + + ld bc, .nextmove + push bc + + push de + ret + +.nextmove + pop hl + pop bc + pop de + inc hl + jr .checkmove + +AI_Smart_EffectHandlers: + dbw EFFECT_SLEEP, AI_Smart_Sleep + dbw EFFECT_LEECH_HIT, AI_Smart_LeechHit + dbw EFFECT_SELFDESTRUCT, AI_Smart_Selfdestruct + dbw EFFECT_DREAM_EATER, AI_Smart_DreamEater + dbw EFFECT_MIRROR_MOVE, AI_Smart_MirrorMove + dbw EFFECT_EVASION_UP, AI_Smart_EvasionUp + dbw EFFECT_ALWAYS_HIT, AI_Smart_AlwaysHit + dbw EFFECT_ACCURACY_DOWN, AI_Smart_AccuracyDown + dbw EFFECT_RESET_STATS, AI_Smart_ResetStats + dbw EFFECT_BIDE, AI_Smart_Bide + dbw EFFECT_FORCE_SWITCH, AI_Smart_ForceSwitch + dbw EFFECT_HEAL, AI_Smart_Heal + dbw EFFECT_TOXIC, AI_Smart_Toxic + dbw EFFECT_LIGHT_SCREEN, AI_Smart_LightScreen + dbw EFFECT_OHKO, AI_Smart_Ohko + dbw EFFECT_RAZOR_WIND, AI_Smart_RazorWind + dbw EFFECT_SUPER_FANG, AI_Smart_SuperFang + dbw EFFECT_TRAP_TARGET, AI_Smart_TrapTarget + dbw EFFECT_UNUSED_2B, AI_Smart_Unused2B + dbw EFFECT_CONFUSE, AI_Smart_Confuse + dbw EFFECT_SP_DEF_UP_2, AI_Smart_SpDefenseUp2 + dbw EFFECT_REFLECT, AI_Smart_Reflect + dbw EFFECT_PARALYZE, AI_Smart_Paralyze + dbw EFFECT_SPEED_DOWN_HIT, AI_Smart_SpeedDownHit + dbw EFFECT_SUBSTITUTE, AI_Smart_Substitute + dbw EFFECT_HYPER_BEAM, AI_Smart_HyperBeam + dbw EFFECT_RAGE, AI_Smart_Rage + dbw EFFECT_MIMIC, AI_Smart_Mimic + dbw EFFECT_LEECH_SEED, AI_Smart_LeechSeed + dbw EFFECT_DISABLE, AI_Smart_Disable + dbw EFFECT_COUNTER, AI_Smart_Counter + dbw EFFECT_ENCORE, AI_Smart_Encore + dbw EFFECT_PAIN_SPLIT, AI_Smart_PainSplit + dbw EFFECT_SNORE, AI_Smart_Snore + dbw EFFECT_CONVERSION2, AI_Smart_Conversion2 + dbw EFFECT_LOCK_ON, AI_Smart_LockOn + dbw EFFECT_DEFROST_OPPONENT, AI_Smart_DefrostOpponent + dbw EFFECT_SLEEP_TALK, AI_Smart_SleepTalk + dbw EFFECT_DESTINY_BOND, AI_Smart_DestinyBond + dbw EFFECT_REVERSAL, AI_Smart_Reversal + dbw EFFECT_SPITE, AI_Smart_Spite + dbw EFFECT_HEAL_BELL, AI_Smart_HealBell + dbw EFFECT_PRIORITY_HIT, AI_Smart_PriorityHit + dbw EFFECT_THIEF, AI_Smart_Thief + dbw EFFECT_MEAN_LOOK, AI_Smart_MeanLook + dbw EFFECT_NIGHTMARE, AI_Smart_Nightmare + dbw EFFECT_FLAME_WHEEL, AI_Smart_FlameWheel + dbw EFFECT_CURSE, AI_Smart_Curse + dbw EFFECT_PROTECT, AI_Smart_Protect + dbw EFFECT_FORESIGHT, AI_Smart_Foresight + dbw EFFECT_PERISH_SONG, AI_Smart_PerishSong + dbw EFFECT_SANDSTORM, AI_Smart_Sandstorm + dbw EFFECT_ENDURE, AI_Smart_Endure + dbw EFFECT_ROLLOUT, AI_Smart_Rollout + dbw EFFECT_SWAGGER, AI_Smart_Swagger + dbw EFFECT_FURY_CUTTER, AI_Smart_FuryCutter + dbw EFFECT_ATTRACT, AI_Smart_Attract + dbw EFFECT_SAFEGUARD, AI_Smart_Safeguard + dbw EFFECT_MAGNITUDE, AI_Smart_Magnitude + dbw EFFECT_BATON_PASS, AI_Smart_BatonPass + dbw EFFECT_PURSUIT, AI_Smart_Pursuit + dbw EFFECT_RAPID_SPIN, AI_Smart_RapidSpin + dbw EFFECT_MORNING_SUN, AI_Smart_MorningSun + dbw EFFECT_SYNTHESIS, AI_Smart_Synthesis + dbw EFFECT_MOONLIGHT, AI_Smart_Moonlight + dbw EFFECT_HIDDEN_POWER, AI_Smart_HiddenPower + dbw EFFECT_RAIN_DANCE, AI_Smart_RainDance + dbw EFFECT_SUNNY_DAY, AI_Smart_SunnyDay + dbw EFFECT_BELLY_DRUM, AI_Smart_BellyDrum + dbw EFFECT_PSYCH_UP, AI_Smart_PsychUp + dbw EFFECT_MIRROR_COAT, AI_Smart_MirrorCoat + dbw EFFECT_SKULL_BASH, AI_Smart_SkullBash + dbw EFFECT_TWISTER, AI_Smart_Twister + dbw EFFECT_EARTHQUAKE, AI_Smart_Earthquake + dbw EFFECT_FUTURE_SIGHT, AI_Smart_FutureSight + dbw EFFECT_GUST, AI_Smart_Gust + dbw EFFECT_STOMP, AI_Smart_Stomp + dbw EFFECT_SOLARBEAM, AI_Smart_Solarbeam + dbw EFFECT_THUNDER, AI_Smart_Thunder + dbw EFFECT_FLY, AI_Smart_Fly + db -1 ; end + +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. + + ld b, EFFECT_DREAM_EATER + call AIHasMoveEffect + jr c, .encourage + + ld b, EFFECT_NIGHTMARE + call AIHasMoveEffect + ret nc + +.encourage + call AI_50_50 + ret c + dec [hl] + dec [hl] + ret + +AI_Smart_LeechHit: + push hl + ld a, 1 + ldh [hBattleTurn], a + callfar BattleCheckTypeMatchup + pop hl + +; 60% chance to discourage this move if not very effective. + ld a, [wTypeMatchup] + cp EFFECTIVE + jr c, .discourage + +; Do nothing if effectiveness is neutral. + ret z + +; Do nothing if enemy's HP is full. + call AICheckEnemyMaxHP + ret c + +; 80% chance to encourage this move otherwise. + call AI_80_20 + ret c + + dec [hl] + ret + +.discourage + call Random + cp 39 percent + 1 + ret c + + inc [hl] + ret + +AI_Smart_LockOn: + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_LOCK_ON, a + jr nz, .player_locked_on + + push hl + call AICheckEnemyQuarterHP + jr nc, .discourage + + call AICheckEnemyHalfHP + jr c, .skip_speed_check + + call AICompareSpeed + jr nc, .discourage + +.skip_speed_check + ld a, [wPlayerEvaLevel] + cp BASE_STAT_LEVEL + 3 + jr nc, .maybe_encourage + cp BASE_STAT_LEVEL + 1 + jr nc, .do_nothing + + ld a, [wEnemyAccLevel] + cp BASE_STAT_LEVEL - 2 + jr c, .maybe_encourage + cp BASE_STAT_LEVEL + jr c, .do_nothing + + ld hl, wEnemyMonMoves + ld c, NUM_MOVES + 1 +.checkmove + dec c + jr z, .discourage + + ld a, [hli] + and a + jr z, .discourage + + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_ACC] + cp 71 percent - 1 + jr nc, .checkmove + + ld a, 1 + ldh [hBattleTurn], a + + push hl + push bc + farcall BattleCheckTypeMatchup + ld a, [wTypeMatchup] + cp EFFECTIVE + pop bc + pop hl + jr c, .checkmove + +.do_nothing + pop hl + ret + +.discourage + pop hl + inc [hl] + ret + +.maybe_encourage + pop hl + call AI_50_50 + ret c + + dec [hl] + dec [hl] + ret + +.player_locked_on + push hl + ld hl, wEnemyAIMoveScores - 1 + ld de, wEnemyMonMoves + ld c, NUM_MOVES + 1 + +.checkmove2 + inc hl + dec c + jr z, .dismiss + + ld a, [de] + and a + jr z, .dismiss + + inc de + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_ACC] + cp 71 percent - 1 + jr nc, .checkmove2 + + dec [hl] + dec [hl] + jr .checkmove2 + +.dismiss + pop hl + jp AIDiscourageMove + +AI_Smart_Selfdestruct: +; Selfdestruct, Explosion + +; Unless this is the enemy's last Pokemon... + push hl + farcall FindAliveEnemyMons + pop hl + jr nc, .notlastmon + +; ...greatly discourage this move unless this is the player's last Pokemon too. + push hl + call AICheckLastPlayerMon + pop hl + jr nz, .discourage + +.notlastmon +; Greatly discourage this move if enemy's HP is above 50%. + call AICheckEnemyHalfHP + jr c, .discourage + +; Do nothing if enemy's HP is below 25%. + call AICheckEnemyQuarterHP + ret nc + +; If enemy's HP is between 25% and 50%, +; over 90% chance to greatly discourage this move. + call Random + cp 8 percent + ret c + +.discourage + inc [hl] + inc [hl] + inc [hl] + ret + +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. + call Random + cp 10 percent + ret c + dec [hl] + dec [hl] + dec [hl] + ret + +AI_Smart_EvasionUp: +; Dismiss this move if enemy's evasion can't raise anymore. + ld a, [wEnemyEvaLevel] + cp MAX_STAT_LEVEL + jp nc, AIDiscourageMove + +; If enemy's HP is full... + call AICheckEnemyMaxHP + jr nc, .hp_mismatch_1 + +; ...greatly encourage this move if player is badly poisoned. + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_TOXIC, a + jr nz, .greatly_encourage + +; ...70% chance to greatly encourage this move if player is not badly poisoned. + call Random + cp 70 percent + jr nc, .not_encouraged + +.greatly_encourage + dec [hl] + dec [hl] + ret + +.hp_mismatch_1 + +; Greatly discourage this move if enemy's HP is below 25%. + call AICheckEnemyQuarterHP + jr nc, .hp_mismatch_2 + +; If enemy's HP is above 25% but not full, 4% chance to greatly encourage this move. + call Random + cp 4 percent + jr c, .greatly_encourage + +; If enemy's HP is between 25% and 50%,... + call AICheckEnemyHalfHP + jr nc, .hp_mismatch_3 + +; If enemy's HP is above 50% but not full, 20% chance to greatly encourage this move. + call AI_80_20 + jr c, .greatly_encourage + jr .not_encouraged + +.hp_mismatch_3 +; ...50% chance to greatly discourage this move. + call AI_50_50 + jr c, .not_encouraged + +.hp_mismatch_2 + inc [hl] + inc [hl] + +; 30% chance to end up here if enemy's HP is full and player is not badly poisoned. +; 77% chance to end up here if enemy's HP is above 50% but not full. +; 96% chance to end up here if enemy's HP is between 25% and 50%. +; 100% chance to end up here if enemy's HP is below 25%. +; In other words, we only end up here if the move has not been encouraged or dismissed. +.not_encouraged + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_TOXIC, a + jr nz, .maybe_greatly_encourage + + ld a, [wPlayerSubStatus4] + bit SUBSTATUS_LEECH_SEED, a + jr nz, .maybe_encourage + +; Discourage this move if enemy's evasion level is higher than player's accuracy level. + ld a, [wEnemyEvaLevel] + ld b, a + ld a, [wPlayerAccLevel] + cp b + jr c, .discourage + +; Greatly encourage this move if the player is in the middle of Fury Cutter or Rollout. + ld a, [wPlayerFuryCutterCount] + and a + jr nz, .greatly_encourage + + ld a, [wPlayerSubStatus1] + bit SUBSTATUS_ROLLOUT, a + jr nz, .greatly_encourage + +.discourage + inc [hl] + ret + +; Player is badly poisoned. +; 70% chance to greatly encourage this move. +; This would counter any previous discouragement. +.maybe_greatly_encourage + call Random + cp 31 percent + 1 + ret c + + dec [hl] + dec [hl] + ret + +; Player is seeded. +; 50% chance to encourage this move. +; This would partly counter any previous discouragement. +.maybe_encourage + call AI_50_50 + ret c + + dec [hl] + ret + +AI_Smart_AlwaysHit: +; 80% chance to greatly encourage this move if either... + +; ...enemy's accuracy level has been lowered three or more stages + ld a, [wEnemyAccLevel] + cp BASE_STAT_LEVEL - 2 + jr c, .encourage + +; ...or player's evasion level has been raised three or more stages. + ld a, [wPlayerEvaLevel] + cp BASE_STAT_LEVEL + 3 + ret c + +.encourage + call AI_80_20 + ret c + + dec [hl] + dec [hl] + ret + +AI_Smart_MirrorMove: +; If the player did not use any move last turn... + ld a, [wLastPlayerCounterMove] + and a + jr nz, .usedmove + +; ...do nothing if enemy is slower than player + call AICompareSpeed + ret nc + +; ...or dismiss this move if enemy is faster than player. + jp AIDiscourageMove + +; If the player did use a move last turn... +.usedmove + push hl + ld hl, UsefulMoves + call AI_CheckMoveInList + pop hl + +; ...do nothing if he didn't use a useful move. + ret nc + +; If he did, 50% chance to encourage this move... + call AI_50_50 + ret c + + dec [hl] + +; ...and 90% chance to encourage this move again if the enemy is faster. + call AICompareSpeed + ret nc + + call Random + cp 10 percent + ret c + + dec [hl] + ret + +AI_Smart_AccuracyDown: +; If player's HP is full... + call AICheckPlayerMaxHP + jr nc, .hp_mismatch_1 + +; ...and enemy's HP is above 50%... + call AICheckEnemyHalfHP + jr nc, .hp_mismatch_1 + +; ...greatly encourage this move if player is badly poisoned. + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_TOXIC, a + jr nz, .greatly_encourage + +; ...70% chance to greatly encourage this move if player is not badly poisoned. + call Random + cp 70 percent + jr nc, .not_encouraged + +.greatly_encourage + dec [hl] + dec [hl] + ret + +.hp_mismatch_1 + +; Greatly discourage this move if player's HP is below 25%. + call AICheckPlayerQuarterHP + jr nc, .hp_mismatch_2 + +; If player's HP is above 25% but not full, 4% chance to greatly encourage this move. + call Random + cp 4 percent + jr c, .greatly_encourage + +; If player's HP is between 25% and 50%,... + call AICheckPlayerHalfHP + jr nc, .hp_mismatch_3 + +; If player's HP is above 50% but not full, 20% chance to greatly encourage this move. + call AI_80_20 + jr c, .greatly_encourage + jr .not_encouraged + +; ...50% chance to greatly discourage this move. +.hp_mismatch_3 + call AI_50_50 + jr c, .not_encouraged + +.hp_mismatch_2 + inc [hl] + inc [hl] + +; We only end up here if the move has not been already encouraged. +.not_encouraged + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_TOXIC, a + jr nz, .maybe_greatly_encourage + + ld a, [wPlayerSubStatus4] + bit SUBSTATUS_LEECH_SEED, a + jr nz, .encourage + +; Discourage this move if enemy's evasion level is higher than player's accuracy level. + ld a, [wEnemyEvaLevel] + ld b, a + ld a, [wPlayerAccLevel] + cp b + jr c, .discourage + +; Greatly encourage this move if the player is in the middle of Fury Cutter or Rollout. + ld a, [wPlayerFuryCutterCount] + and a + jr nz, .greatly_encourage + + ld a, [wPlayerSubStatus1] + bit SUBSTATUS_ROLLOUT, a + jr nz, .greatly_encourage + +.discourage + inc [hl] + ret + +; Player is badly poisoned. +; 70% chance to greatly encourage this move. +; This would counter any previous discouragement. +.maybe_greatly_encourage + call Random + cp 31 percent + 1 + ret c + + dec [hl] + dec [hl] + ret + +; Player is seeded. +; 50% chance to encourage this move. +; This would partly counter any previous discouragement. +.encourage + call AI_50_50 + ret c + + dec [hl] + ret + +AI_Smart_ResetStats: +; 85% chance to encourage this move if any of enemy's stat levels is lower than -2. + push hl + ld hl, wEnemyAtkLevel + ld c, NUM_LEVEL_STATS +.enemystatsloop + dec c + jr z, .enemystatsdone + ld a, [hli] + cp BASE_STAT_LEVEL - 2 + jr c, .encourage + jr .enemystatsloop + +; 85% chance to encourage this move if any of player's stat levels is higher than +2. +.enemystatsdone + ld hl, wPlayerAtkLevel + ld c, NUM_LEVEL_STATS +.playerstatsloop + dec c + jr z, .discourage + ld a, [hli] + cp BASE_STAT_LEVEL + 3 + jr c, .playerstatsloop + +.encourage + pop hl + call Random + cp 16 percent + ret c + dec [hl] + ret + +; Discourage this move if neither: +; Any of enemy's stat levels is lower than -2. +; Any of player's stat levels is higher than +2. +.discourage + pop hl + inc [hl] + ret + +AI_Smart_Bide: +; 90% chance to discourage this move unless enemy's HP is full. + + call AICheckEnemyMaxHP + ret c + call Random + cp 10 percent + ret c + inc [hl] + ret + +AI_Smart_ForceSwitch: +; Whirlwind, Roar. + +; Discourage this move if the player has not shown +; a super-effective move against the enemy. +; Consider player's type(s) if its moves are unknown. + + push hl + callfar CheckPlayerMoveTypeMatchups + ld a, [wEnemyAISwitchScore] + cp BASE_AI_SWITCH_SCORE + pop hl + ret c + inc [hl] + ret + +AI_Smart_Heal: +AI_Smart_MorningSun: +AI_Smart_Synthesis: +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. + + call AICheckEnemyQuarterHP + jr nc, .encourage + call AICheckEnemyHalfHP + ret nc + inc [hl] + ret + +.encourage + call Random + cp 10 percent + ret c + dec [hl] + dec [hl] + ret + +AI_Smart_Toxic: +AI_Smart_LeechSeed: +; Discourage this move if player's HP is below 50%. + + call AICheckPlayerHalfHP + ret c + inc [hl] + ret + +AI_Smart_LightScreen: +AI_Smart_Reflect: +; Over 90% chance to discourage this move unless enemy's HP is full. + + call AICheckEnemyMaxHP + ret c + call Random + cp 8 percent + ret c + inc [hl] + ret + +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%. + + ld a, [wBattleMonLevel] + ld b, a + ld a, [wEnemyMonLevel] + cp b + jp c, AIDiscourageMove + call AICheckPlayerHalfHP + ret c + inc [hl] + ret + +AI_Smart_TrapTarget: +; Bind, Wrap, Fire Spin, Clamp + +; 50% chance to discourage this move if the player is already trapped. + ld a, [wPlayerWrapCount] + and a + jr nz, .discourage + +; 50% chance to greatly encourage this move if player is either +; badly poisoned, in love, identified, stuck in Rollout, or has a Nightmare. + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_TOXIC, a + jr nz, .encourage + + ld a, [wPlayerSubStatus1] + and 1 << SUBSTATUS_IN_LOVE | 1 << SUBSTATUS_ROLLOUT | 1 << SUBSTATUS_IDENTIFIED | 1 << SUBSTATUS_NIGHTMARE + jr nz, .encourage + +; Else, 50% chance to greatly encourage this move if it's the player's Pokemon first turn. + ld a, [wPlayerTurnsTaken] + and a + jr z, .encourage + +; 50% chance to discourage this move otherwise. +.discourage + call AI_50_50 + ret c + inc [hl] + ret + +.encourage + call AICheckEnemyQuarterHP + ret nc + call AI_50_50 + ret c + dec [hl] + dec [hl] + ret + +AI_Smart_RazorWind: +AI_Smart_Unused2B: + ld a, [wEnemySubStatus1] + bit SUBSTATUS_PERISH, a + jr z, .no_perish_count + + ld a, [wEnemyPerishCount] + cp 3 + jr c, .discourage + +.no_perish_count + push hl + ld hl, wPlayerUsedMoves + ld c, NUM_MOVES + +.checkmove + ld a, [hli] + and a + jr z, .movesdone + + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + cp EFFECT_PROTECT + jr z, .dismiss + dec c + jr nz, .checkmove + +.movesdone + pop hl + ld a, [wEnemySubStatus3] + bit SUBSTATUS_CONFUSED, a + jr nz, .maybe_discourage + + call AICheckEnemyHalfHP + ret c + +.maybe_discourage + call Random + cp 79 percent - 1 + ret c + +.discourage + inc [hl] + ret + +.dismiss + pop hl + ld a, [hl] + add 6 + ld [hl], a + ret + +AI_Smart_Confuse: +; 90% chance to discourage this move if player's HP is between 25% and 50%. + call AICheckPlayerHalfHP + ret c + call Random + cp 10 percent + jr c, .skipdiscourage + inc [hl] + +.skipdiscourage +; Discourage again if player's HP is below 25%. + call AICheckPlayerQuarterHP + ret c + inc [hl] + ret + +AI_Smart_SpDefenseUp2: +; Discourage this move if enemy's HP is lower than 50%. + call AICheckEnemyHalfHP + jr nc, .discourage + +; Discourage this move if enemy's special defense level is higher than +3. + ld a, [wEnemySDefLevel] + cp BASE_STAT_LEVEL + 4 + jr nc, .discourage + +; 80% chance to greatly encourage this move if +; enemy's Special Defense level is lower than +2, and the player is of a special type. + cp BASE_STAT_LEVEL + 2 + ret nc + + ld a, [wBattleMonType1] + cp SPECIAL + jr nc, .encourage + ld a, [wBattleMonType2] + cp SPECIAL + ret c + +.encourage + call AI_80_20 + ret c + dec [hl] + dec [hl] + ret + +.discourage + inc [hl] + ret + +AI_Smart_Fly: +; Fly, Dig + +; Greatly encourage this move if the player is +; flying or underground, and slower than the enemy. + + ld a, [wPlayerSubStatus3] + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + ret z + + call AICompareSpeed + ret nc + + dec [hl] + dec [hl] + dec [hl] + ret + +AI_Smart_SuperFang: +; Discourage this move if player's HP is below 25%. + + call AICheckPlayerQuarterHP + ret c + inc [hl] + ret + +AI_Smart_Paralyze: +; 50% chance to discourage this move if player's HP is below 25%. + call AICheckPlayerQuarterHP + jr nc, .discourage + +; 80% chance to greatly encourage this move +; if enemy is slower than player and its HP is above 25%. + call AICompareSpeed + ret c + call AICheckEnemyQuarterHP + ret nc + call AI_80_20 + ret c + dec [hl] + dec [hl] + ret + +.discourage + call AI_50_50 + ret c + inc [hl] + ret + +AI_Smart_SpeedDownHit: +; Icy Wind + +; Almost 90% chance to greatly encourage this move if the following conditions all meet: +; Enemy's HP is higher than 25%. +; It's the first turn of player's Pokemon. +; Player is faster than enemy. + + ld a, [wEnemyMoveStruct + MOVE_ANIM] + push hl + call GetMoveIDFromIndex + ld a, h + if HIGH(ICY_WIND) + cp HIGH(ICY_WIND) + else + and a + endc + ld a, l + pop hl + ret nz + cp LOW(ICY_WIND) + ret nz + call AICheckEnemyQuarterHP + ret nc + ld a, [wPlayerTurnsTaken] + and a + ret nz + call AICompareSpeed + ret c + call Random + cp 12 percent + ret c + dec [hl] + dec [hl] + ret + +AI_Smart_Substitute: +; Dismiss this move if enemy's HP is below 50%. + + call AICheckEnemyHalfHP + ret c + jp AIDiscourageMove + +AI_Smart_HyperBeam: + call AICheckEnemyHalfHP + jr c, .discourage + +; 50% chance to encourage this move if enemy's HP is below 25%. + call AICheckEnemyQuarterHP + ret c + call AI_50_50 + ret c + dec [hl] + ret + +.discourage +; If enemy's HP is above 50%, discourage this move at random + call Random + cp 16 percent + ret c + inc [hl] + call AI_50_50 + ret c + inc [hl] + ret + +AI_Smart_Rage: + ld a, [wEnemySubStatus4] + bit SUBSTATUS_RAGE, a + jr z, .notbuilding + +; If enemy's Rage is building, 50% chance to encourage this move. + call AI_50_50 + jr c, .skipencourage + + dec [hl] + +; Encourage this move based on Rage's counter. +.skipencourage + ld a, [wEnemyRageCounter] + cp 2 + ret c + dec [hl] + ld a, [wEnemyRageCounter] + cp 3 + ret c + dec [hl] + ret + +.notbuilding +; If enemy's Rage is not building, discourage this move if enemy's HP is below 50%. + call AICheckEnemyHalfHP + jr nc, .discourage + +; 20% chance to encourage this move otherwise. + call AI_80_20 + ret nc + dec [hl] + ret + +.discourage + inc [hl] + ret + +AI_Smart_Mimic: +; Discourage this move if the player did not use any move last turn. + ld a, [wLastPlayerCounterMove] + and a + jr z, .dismiss + + call AICheckEnemyHalfHP + jr nc, .discourage + + push hl + ld a, [wLastPlayerCounterMove] + call AIGetEnemyMove + + ld a, 1 + ldh [hBattleTurn], a + callfar BattleCheckTypeMatchup + + ld a, [wTypeMatchup] + cp EFFECTIVE + pop hl + jr c, .discourage + jr z, .skip_encourage + + call AI_50_50 + jr c, .skip_encourage + + dec [hl] + +.skip_encourage + ld a, [wLastPlayerCounterMove] + push hl + ld hl, UsefulMoves + call AI_CheckMoveInList + + pop hl + ret nc + call AI_50_50 + ret c + dec [hl] + ret + +.dismiss +; Dismiss this move if the enemy is faster than the player. + call AICompareSpeed + jp c, AIDiscourageMove + +.discourage + inc [hl] + ret + +AI_Smart_Counter: + push hl + ld hl, wPlayerUsedMoves + ld c, NUM_MOVES + ld b, 0 + +.playermoveloop + ld a, [hli] + and a + jr z, .skipmove + + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_POWER] + and a + jr z, .skipmove + + ld a, [wEnemyMoveStruct + MOVE_TYPE] + cp SPECIAL + jr nc, .skipmove + + inc b + +.skipmove + dec c + jr nz, .playermoveloop + + pop hl + ld a, b + and a + jr z, .discourage + + cp 3 + jr nc, .encourage + + ld a, [wLastPlayerCounterMove] + and a + jr z, .done + + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_POWER] + and a + jr z, .done + + ld a, [wEnemyMoveStruct + MOVE_TYPE] + cp SPECIAL + jr nc, .done + +.encourage + call Random + cp 39 percent + 1 + jr c, .done + + dec [hl] + +.done + ret + +.discourage + inc [hl] + ret + +AI_Smart_Encore: + call AICompareSpeed + jr nc, .discourage + + ld a, [wLastPlayerMove] + and a + jp z, AIDiscourageMove + + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_POWER] + and a + jr z, .weakmove + + push hl + ld a, [wEnemyMoveStruct + MOVE_TYPE] + ld hl, wEnemyMonType1 + predef CheckTypeMatchup + + pop hl + ld a, [wTypeMatchup] + cp EFFECTIVE + jr nc, .weakmove + + and a + ret nz + jr .encourage + +.weakmove + push hl + ld a, [wLastPlayerCounterMove] + ld hl, EncoreMoves + call AI_CheckMoveInList + pop hl + jr nc, .discourage + +.encourage + call Random + cp 28 percent - 1 + ret c + dec [hl] + dec [hl] + ret + +.discourage + inc [hl] + inc [hl] + inc [hl] + ret + +INCLUDE "data/battle/ai/encore_moves.asm" + +AI_Smart_PainSplit: +; Discourage this move if [enemy's current HP * 2 > player's current HP]. + + push hl + ld hl, wEnemyMonHP + ld b, [hl] + inc hl + ld c, [hl] + sla c + rl b + ld hl, wBattleMonHP + 1 + ld a, [hld] + cp c + ld a, [hl] + sbc b + pop hl + ret nc + inc [hl] + ret + +AI_Smart_Snore: +AI_Smart_SleepTalk: +; Greatly encourage this move if enemy is fast asleep. +; Greatly discourage this move otherwise. + + ld a, [wEnemyMonStatus] + and SLP_MASK + cp 1 + jr z, .discourage + + dec [hl] + dec [hl] + dec [hl] + ret + +.discourage + inc [hl] + inc [hl] + inc [hl] + ret + +AI_Smart_DefrostOpponent: +; Greatly encourage this move if enemy is frozen. +; No move has EFFECT_DEFROST_OPPONENT, so this layer is unused. + + ld a, [wEnemyMonStatus] + and 1 << FRZ + ret z + dec [hl] + dec [hl] + dec [hl] + ret + +AI_Smart_Spite: + ld a, [wLastPlayerCounterMove] + and a + jr nz, .usedmove + + call AICompareSpeed + jp c, AIDiscourageMove + + call AI_50_50 + ret c + inc [hl] + ret + +.usedmove + push hl + ld b, a + ld c, NUM_MOVES + ld hl, wBattleMonMoves + ld de, wBattleMonPP + +.moveloop + ld a, [hli] + cp b + jr z, .foundmove + + inc de + dec c + jr nz, .moveloop + + pop hl + ret + +.foundmove + pop hl + ld a, [de] + cp 6 + jr c, .encourage + cp 15 + jr nc, .discourage + + call Random + cp 39 percent + 1 + ret nc + +.discourage + inc [hl] + ret + +.encourage + call Random + cp 39 percent + 1 + ret c + dec [hl] + dec [hl] + ret + +.dismiss ; unreferenced + jp AIDiscourageMove + +AI_Smart_DestinyBond: +AI_Smart_Reversal: +AI_Smart_SkullBash: +; Discourage this move if enemy's HP is above 25%. + + call AICheckEnemyQuarterHP + ret nc + inc [hl] + ret + +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. + + push hl + ld a, [wOTPartyCount] + ld b, a + ld c, 0 + ld hl, wOTPartyMon1HP + ld de, PARTYMON_STRUCT_LENGTH + +.loop + push hl + ld a, [hli] + or [hl] + jr z, .next + + ; status + dec hl + dec hl + dec hl + ld a, [hl] + or c + ld c, a + +.next + pop hl + add hl, de + dec b + jr nz, .loop + + pop hl + ld a, c + and a + jr z, .no_status + + ld a, [wEnemyMonStatus] + and a + jr z, .ok + dec [hl] +.ok + and 1 << FRZ | SLP_MASK + ret z + call AI_50_50 + ret c + dec [hl] + dec [hl] + ret + +.no_status + ld a, [wEnemyMonStatus] + and a + ret nz + jp AIDiscourageMove + + +AI_Smart_PriorityHit: + call AICompareSpeed + ret c + +; Dismiss this move if the player is flying or underground. + ld a, [wPlayerSubStatus3] + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + jp nz, AIDiscourageMove + +; Greatly encourage this move if it will KO the player. + ld a, 1 + ldh [hBattleTurn], a + push hl + callfar EnemyAttackDamage + callfar BattleCommand_DamageCalc + callfar BattleCommand_Stab + pop hl + ld a, [wCurDamage + 1] + ld c, a + ld a, [wCurDamage] + ld b, a + ld a, [wBattleMonHP + 1] + cp c + ld a, [wBattleMonHP] + sbc b + ret nc + dec [hl] + dec [hl] + dec [hl] + ret + +AI_Smart_Thief: +; Don't use Thief unless it's the only move available. + + ld a, [hl] + add $1e + ld [hl], a + ret + +AI_Smart_Conversion2: +; BUG: "Smart" AI discourages Conversion2 after the first turn (see docs/bugs_and_glitches.md) + ld a, [wLastPlayerMove] + and a + jr nz, .discourage + + push hl + ld l, a + ld a, MOVE_TYPE + call GetMoveAttribute + ld [wPlayerMoveStruct + MOVE_TYPE], a + + xor a + ldh [hBattleTurn], a + + callfar BattleCheckTypeMatchup + + ld a, [wTypeMatchup] + cp EFFECTIVE + pop hl + jr c, .discourage + ret z + + call AI_50_50 + ret c + + dec [hl] + ret + +.discourage + call Random + cp 10 percent + ret c + inc [hl] + ret + +AI_Smart_Disable: + call AICompareSpeed + jr nc, .discourage + + push hl + ld a, [wLastPlayerCounterMove] + ld hl, UsefulMoves + call AI_CheckMoveInList + + pop hl + jr nc, .notencourage + + call Random + cp 39 percent + 1 + ret c + dec [hl] + ret + +.notencourage + ld a, [wEnemyMoveStruct + MOVE_POWER] + and a + ret nz + +.discourage + call Random + cp 8 percent + ret c + inc [hl] + ret + +AI_Smart_MeanLook: + call AICheckEnemyHalfHP + jr nc, .discourage + + push hl + call AICheckLastPlayerMon + pop hl + jp z, AIDiscourageMove + +; 80% chance to greatly encourage this move if the enemy is badly poisoned. +; BUG: "Smart" AI encourages Mean Look if its own Pokémon is badly poisoned (see docs/bugs_and_glitches.md) + ld a, [wEnemySubStatus5] + bit SUBSTATUS_TOXIC, a + jr nz, .encourage + +; 80% chance to greatly encourage this move if the player is either +; in love, identified, stuck in Rollout, or has a Nightmare. + ld a, [wPlayerSubStatus1] + and 1 << SUBSTATUS_IN_LOVE | 1 << SUBSTATUS_ROLLOUT | 1 << SUBSTATUS_IDENTIFIED | 1 << SUBSTATUS_NIGHTMARE + jr nz, .encourage + +; Otherwise, discourage this move unless the player only has not very effective moves against the enemy. + push hl + callfar CheckPlayerMoveTypeMatchups + ld a, [wEnemyAISwitchScore] + cp BASE_AI_SWITCH_SCORE + 1 ; not very effective + pop hl + ret nc + +.discourage + inc [hl] + ret + +.encourage + call AI_80_20 + ret c + dec [hl] + dec [hl] + dec [hl] + ret + +AICheckLastPlayerMon: + ld a, [wPartyCount] + ld b, a + ld c, 0 + ld hl, wPartyMon1HP + ld de, PARTYMON_STRUCT_LENGTH + +.loop + ld a, [wCurBattleMon] + cp c + jr z, .skip + + ld a, [hli] + or [hl] + ret nz + dec hl + +.skip + add hl, de + inc c + dec b + jr nz, .loop + + ret + +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. + + call AI_50_50 + ret c + dec [hl] + ret + +AI_Smart_FlameWheel: +; Use this move if the enemy is frozen. + + ld a, [wEnemyMonStatus] + bit FRZ, a + ret z +rept 5 + dec [hl] +endr + ret + +AI_Smart_Curse: + ld a, [wEnemyMonType1] + cp GHOST + jr z, .ghost_curse + ld a, [wEnemyMonType2] + cp GHOST + jr z, .ghost_curse + + call AICheckEnemyHalfHP + jr nc, .encourage + + ld a, [wEnemyAtkLevel] + cp BASE_STAT_LEVEL + 4 + jr nc, .encourage + cp BASE_STAT_LEVEL + 2 + ret nc + + ld a, [wBattleMonType1] + cp GHOST + jr z, .greatly_encourage + cp SPECIAL + ret nc + ld a, [wBattleMonType2] + cp SPECIAL + ret nc + call AI_80_20 + ret c + dec [hl] + dec [hl] + ret + +.approve + inc [hl] + inc [hl] +.greatly_encourage + inc [hl] +.encourage + inc [hl] + ret + +.ghost_curse + ld a, [wPlayerSubStatus1] + bit SUBSTATUS_CURSE, a + jp nz, AIDiscourageMove + + push hl + farcall FindAliveEnemyMons + pop hl + jr nc, .notlastmon + + push hl + call AICheckLastPlayerMon + pop hl + jr nz, .approve + + jr .ghost_continue + +.notlastmon + push hl + call AICheckLastPlayerMon + pop hl + jr z, .maybe_greatly_encourage + +.ghost_continue + call AICheckEnemyQuarterHP + jp nc, .approve + + call AICheckEnemyHalfHP + jr nc, .greatly_encourage + + call AICheckEnemyMaxHP + ret nc + + ld a, [wPlayerTurnsTaken] + and a + ret nz + +.maybe_greatly_encourage + call AI_50_50 + ret c + + dec [hl] + dec [hl] + ret + +AI_Smart_Protect: +; Greatly discourage this move if the enemy already used Protect. + ld a, [wEnemyProtectCount] + and a + jr nz, .greatly_discourage + +; Discourage this move if the player is locked on. + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_LOCK_ON, a + jr nz, .discourage + +; Encourage this move if the player's Fury Cutter is boosted enough. + ld a, [wPlayerFuryCutterCount] + cp 3 + jr nc, .encourage + +; Encourage this move if the player has charged a two-turn move. + ld a, [wPlayerSubStatus3] + bit SUBSTATUS_CHARGED, a + jr nz, .encourage + +; Encourage this move if the player is affected by Toxic, Leech Seed, or Curse. + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_TOXIC, a + jr nz, .encourage + ld a, [wPlayerSubStatus4] + bit SUBSTATUS_LEECH_SEED, a + jr nz, .encourage + ld a, [wPlayerSubStatus1] + bit SUBSTATUS_CURSE, a + jr nz, .encourage + +; Discourage this move if the player's Rollout count is not boosted enough. + bit SUBSTATUS_ROLLOUT, a + jr z, .discourage + ld a, [wPlayerRolloutCount] + cp 3 + jr c, .discourage + +; 80% chance to encourage this move otherwise. +.encourage + call AI_80_20 + ret c + + dec [hl] + ret + +.greatly_discourage + inc [hl] + +.discourage + call Random + cp 8 percent + ret c + + inc [hl] + inc [hl] + ret + +AI_Smart_Foresight: +; 60% chance to encourage this move if the enemy's accuracy is sharply lowered. + ld a, [wEnemyAccLevel] + cp BASE_STAT_LEVEL - 2 + jr c, .encourage + +; 60% chance to encourage this move if the player's evasion is sharply raised. + ld a, [wPlayerEvaLevel] + cp BASE_STAT_LEVEL + 3 + jr nc, .encourage + +; 60% chance to encourage this move if the player is a Ghost type. + ld a, [wBattleMonType1] + cp GHOST + jr z, .encourage + ld a, [wBattleMonType2] + cp GHOST + jr z, .encourage + +; 92% chance to discourage this move otherwise. + call Random + cp 8 percent + ret c + + inc [hl] + ret + +.encourage + call Random + cp 39 percent + 1 + ret c + + dec [hl] + dec [hl] + ret + +AI_Smart_PerishSong: + push hl + callfar FindAliveEnemyMons + pop hl + jr c, .no + + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_CANT_RUN, a + jr nz, .yes + + push hl + callfar CheckPlayerMoveTypeMatchups + ld a, [wEnemyAISwitchScore] + cp BASE_AI_SWITCH_SCORE + pop hl + ret c + + call AI_50_50 + ret c + + inc [hl] + ret + +.yes + call AI_50_50 + ret c + + dec [hl] + ret + +.no + ld a, [hl] + add 5 + ld [hl], a + ret + +AI_Smart_Sandstorm: +; Greatly discourage this move if the player is immune to Sandstorm damage. + ld a, [wBattleMonType1] + push hl + ld hl, .SandstormImmuneTypes + ld de, 1 + call IsInArray + pop hl + jr c, .greatly_discourage + + ld a, [wBattleMonType2] + push hl + ld hl, .SandstormImmuneTypes + ld de, 1 + call IsInArray + pop hl + jr c, .greatly_discourage + +; Discourage this move if player's HP is below 50%. + call AICheckPlayerHalfHP + jr nc, .discourage + +; 50% chance to encourage this move otherwise. + call AI_50_50 + ret c + + dec [hl] + ret + +.greatly_discourage + inc [hl] +.discourage + inc [hl] + ret + +.SandstormImmuneTypes: + db ROCK + db GROUND + db STEEL + db -1 ; end + +AI_Smart_Endure: +; Greatly discourage this move if the enemy already used Protect. + ld a, [wEnemyProtectCount] + and a + jr nz, .greatly_discourage + +; Greatly discourage this move if the enemy's HP is full. + call AICheckEnemyMaxHP + jr c, .greatly_discourage + +; Discourage this move if the enemy's HP is at least 25%. + call AICheckEnemyQuarterHP + jr c, .discourage + +; If the enemy has Reversal... + ld b, EFFECT_REVERSAL + call AIHasMoveEffect + jr nc, .no_reversal + +; ...80% chance to greatly encourage this move. + call AI_80_20 + ret c + + dec [hl] + dec [hl] + dec [hl] + ret + +.no_reversal +; If the enemy is not locked on, do nothing. + ld a, [wEnemySubStatus5] + bit SUBSTATUS_LOCK_ON, a + ret z + +; 50% chance to greatly encourage this move. + call AI_50_50 + ret c + + dec [hl] + dec [hl] + ret + +.greatly_discourage + inc [hl] +.discourage + inc [hl] + ret + +AI_Smart_FuryCutter: +; Encourage this move based on Fury Cutter's count. + + ld a, [wEnemyFuryCutterCount] + and a + jr z, AI_Smart_Rollout + dec [hl] + + cp 2 + jr c, AI_Smart_Rollout + dec [hl] + dec [hl] + + cp 3 + jr c, AI_Smart_Rollout + dec [hl] + dec [hl] + dec [hl] + + ; fallthrough + +AI_Smart_Rollout: +; Rollout, Fury Cutter + +; 80% chance to discourage this move if the enemy is in love, confused, or paralyzed. + ld a, [wEnemySubStatus1] + bit SUBSTATUS_IN_LOVE, a + jr nz, .maybe_discourage + + ld a, [wEnemySubStatus3] + bit SUBSTATUS_CONFUSED, a + jr nz, .maybe_discourage + + ld a, [wEnemyMonStatus] + bit PAR, a + jr nz, .maybe_discourage + +; 80% chance to discourage this move if the enemy's HP is below 25%, +; or if accuracy or evasion modifiers favour the player. + call AICheckEnemyQuarterHP + jr nc, .maybe_discourage + + ld a, [wEnemyAccLevel] + cp BASE_STAT_LEVEL + jr c, .maybe_discourage + ld a, [wPlayerEvaLevel] + cp BASE_STAT_LEVEL + 1 + jr nc, .maybe_discourage + +; 80% chance to greatly encourage this move otherwise. + call Random + cp 79 percent - 1 + ret nc + dec [hl] + dec [hl] + ret + +.maybe_discourage + call AI_80_20 + ret c + inc [hl] + ret + +AI_Smart_Swagger: +AI_Smart_Attract: +; 80% chance to encourage this move during the first turn of player's Pokemon. +; 80% chance to discourage this move otherwise. + + ld a, [wPlayerTurnsTaken] + and a + jr z, .first_turn + + call AI_80_20 + ret c + inc [hl] + ret + +.first_turn + call Random + cp 79 percent - 1 + ret nc + dec [hl] + ret + +AI_Smart_Safeguard: +; 80% chance to discourage this move if player's HP is below 50%. + + call AICheckPlayerHalfHP + ret c + call AI_80_20 + ret c + inc [hl] + ret + +AI_Smart_Magnitude: +AI_Smart_Earthquake: +; Greatly encourage this move if the player is underground and the enemy is faster. + ld a, [wLastPlayerCounterMove] + push hl + call GetMoveIndexFromID + ld a, h + if HIGH(DIG) + cp HIGH(DIG) + else + and a + endc + ld a, l + pop hl + ret nz + cp LOW(DIG) + ret nz + + ld a, [wPlayerSubStatus3] + bit SUBSTATUS_UNDERGROUND, a + jr z, .could_dig + + call AICompareSpeed + ret nc + dec [hl] + dec [hl] + ret + +.could_dig + ; Try to predict if the player will use Dig this turn. + + ; 50% chance to encourage this move if the enemy is slower than the player. + call AICompareSpeed + ret c + + call AI_50_50 + ret c + + dec [hl] + ret + +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. + + push hl + callfar CheckPlayerMoveTypeMatchups + ld a, [wEnemyAISwitchScore] + cp BASE_AI_SWITCH_SCORE + pop hl + ret c + inc [hl] + ret + +AI_Smart_Pursuit: +; 50% chance to greatly encourage this move if player's HP is below 25%. +; 80% chance to discourage this move otherwise. + + call AICheckPlayerQuarterHP + jr nc, .encourage + call AI_80_20 + ret c + inc [hl] + ret + +.encourage + call AI_50_50 + ret c + dec [hl] + dec [hl] + ret + +AI_Smart_RapidSpin: +; 80% chance to greatly encourage this move if the enemy is +; trapped (Bind effect), seeded, or scattered with spikes. + + ld a, [wEnemyWrapCount] + and a + jr nz, .encourage + + ld a, [wEnemySubStatus4] + bit SUBSTATUS_LEECH_SEED, a + jr nz, .encourage + + ld a, [wEnemyScreens] + bit SCREENS_SPIKES, a + ret z + +.encourage + call AI_80_20 + ret c + + dec [hl] + dec [hl] + ret + +AI_Smart_HiddenPower: + push hl + ld a, 1 + ldh [hBattleTurn], a + +; Calculate Hidden Power's type and base power based on enemy's DVs. + callfar HiddenPowerDamage + callfar BattleCheckTypeMatchup + pop hl + +; Discourage Hidden Power if not very effective. + ld a, [wTypeMatchup] + cp EFFECTIVE + jr c, .bad + +; Discourage Hidden Power if its base power is lower than 50. + ld a, d + cp 50 + jr c, .bad + +; Encourage Hidden Power if super-effective. + ld a, [wTypeMatchup] + cp EFFECTIVE + 1 + jr nc, .good + +; Encourage Hidden Power if its base power is 70. + ld a, d + cp 70 + ret c + +.good + dec [hl] + ret + +.bad + inc [hl] + ret + +AI_Smart_RainDance: +; Greatly discourage this move if it would favour the player type-wise. +; Particularly, if the player is a Water-type. + ld a, [wBattleMonType1] + cp WATER + jr z, AIBadWeatherType + cp FIRE + jr z, AIGoodWeatherType + + ld a, [wBattleMonType2] + cp WATER + jr z, AIBadWeatherType + cp FIRE + jr z, AIGoodWeatherType + + push hl + ld hl, RainDanceMoves + jr AI_Smart_WeatherMove + +INCLUDE "data/battle/ai/rain_dance_moves.asm" + +AI_Smart_SunnyDay: +; Greatly discourage this move if it would favour the player type-wise. +; Particularly, if the player is a Fire-type. + ld a, [wBattleMonType1] + cp FIRE + jr z, AIBadWeatherType + cp WATER + jr z, AIGoodWeatherType + + ld a, [wBattleMonType2] + cp FIRE + jr z, AIBadWeatherType + cp WATER + jr z, AIGoodWeatherType + + push hl + ld hl, SunnyDayMoves + + ; fallthrough + +AI_Smart_WeatherMove: +; Rain Dance, Sunny Day + +; Greatly discourage this move if the enemy doesn't have +; one of the useful Rain Dance or Sunny Day moves. + call AIHasMoveInArray + pop hl + jr nc, AIBadWeatherType + +; Greatly discourage this move if player's HP is below 50%. + call AICheckPlayerHalfHP + jr nc, AIBadWeatherType + +; 50% chance to encourage this move otherwise. + call AI_50_50 + ret c + + dec [hl] + ret + +AIBadWeatherType: + inc [hl] + inc [hl] + inc [hl] + ret + +AIGoodWeatherType: +; Rain Dance, Sunny Day + +; Greatly encourage this move if it would disfavour the player type-wise and player's HP is above 50%... + call AICheckPlayerHalfHP + ret nc + +; ...as long as one of the following conditions meet: +; It's the first turn of the player's Pokemon. + ld a, [wPlayerTurnsTaken] + and a + jr z, .good + +; Or it's the first turn of the enemy's Pokemon. + ld a, [wEnemyTurnsTaken] + and a + ret nz + +.good + dec [hl] + dec [hl] + ret + +INCLUDE "data/battle/ai/sunny_day_moves.asm" + +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. + + ld a, [wEnemyAtkLevel] + cp BASE_STAT_LEVEL + 3 + jr nc, .discourage + + call AICheckEnemyMaxHP + ret c + + inc [hl] + + call AICheckEnemyHalfHP + ret c + +.discourage + ld a, [hl] + add 5 + ld [hl], a + ret + +AI_Smart_PsychUp: + push hl + ld hl, wEnemyAtkLevel + ld b, NUM_LEVEL_STATS + ld c, 100 + +; Calculate the sum of all enemy's stat level modifiers. Add 100 first to prevent underflow. +; Put the result in c. c will range between 58 and 142. +.enemy_loop + ld a, [hli] + sub BASE_STAT_LEVEL + add c + ld c, a + dec b + jr nz, .enemy_loop + +; Calculate the sum of all player's stat level modifiers. Add 100 first to prevent underflow. +; Put the result in d. d will range between 58 and 142. + ld hl, wPlayerAtkLevel + ld b, NUM_LEVEL_STATS + ld d, 100 + +.player_loop + ld a, [hli] + sub BASE_STAT_LEVEL + add d + ld d, a + dec b + jr nz, .player_loop + +; Greatly discourage this move if enemy's stat levels are higher than player's (if c>=d). + ld a, c + sub d + pop hl + jr nc, .discourage + +; Else, 80% chance to encourage this move unless player's accuracy level is lower than -1... + ld a, [wPlayerAccLevel] + cp BASE_STAT_LEVEL - 1 + ret c + +; ...or enemy's evasion level is higher than +0. + ld a, [wEnemyEvaLevel] + cp BASE_STAT_LEVEL + 1 + ret nc + + call AI_80_20 + ret c + + dec [hl] + ret + +.discourage + inc [hl] + inc [hl] + ret + +AI_Smart_MirrorCoat: + push hl + ld hl, wPlayerUsedMoves + ld c, NUM_MOVES + ld b, 0 + +.playermoveloop + ld a, [hli] + and a + jr z, .skipmove + + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_POWER] + and a + jr z, .skipmove + + ld a, [wEnemyMoveStruct + MOVE_TYPE] + cp SPECIAL + jr c, .skipmove + + inc b + +.skipmove + dec c + jr nz, .playermoveloop + + pop hl + ld a, b + and a + jr z, .discourage + + cp 3 + jr nc, .encourage + + ld a, [wLastPlayerCounterMove] + and a + jr z, .done + + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_POWER] + and a + jr z, .done + + ld a, [wEnemyMoveStruct + MOVE_TYPE] + cp SPECIAL + jr c, .done + +.encourage + call Random + cp 39 percent + 1 + jr c, .done + dec [hl] + +.done + ret + +.discourage + inc [hl] + ret + +AI_Smart_Twister: +AI_Smart_Gust: +; Greatly encourage this move if the player is flying and the enemy is faster. + ld a, [wLastPlayerCounterMove] + push hl + call GetMoveIndexFromID + ld a, h + if HIGH(FLY) + cp HIGH(FLY) + else + and a + endc + ld a, l + pop hl + ret nz + cp LOW(FLY) + ret nz + + ld a, [wPlayerSubStatus3] + bit SUBSTATUS_FLYING, a + jr z, .couldFly + + call AICompareSpeed + ret nc + + dec [hl] + dec [hl] + ret + +; Try to predict if the player will use Fly this turn. +.couldFly + +; 50% chance to encourage this move if the enemy is slower than the player. + call AICompareSpeed + ret c + call AI_50_50 + ret c + dec [hl] + ret + +AI_Smart_FutureSight: +; Greatly encourage this move if the player is +; flying or underground, and slower than the enemy. + + call AICompareSpeed + ret nc + + ld a, [wPlayerSubStatus3] + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + ret z + + dec [hl] + dec [hl] + ret + +AI_Smart_Stomp: +; 80% chance to encourage this move if the player has used Minimize. + + ld a, [wPlayerMinimized] + and a + ret z + + call AI_80_20 + ret c + + dec [hl] + ret + +AI_Smart_Solarbeam: +; 80% chance to encourage this move when it's sunny. +; 90% chance to discourage this move when it's raining. + + ld a, [wBattleWeather] + cp WEATHER_SUN + jr z, .encourage + + cp WEATHER_RAIN + ret nz + + call Random + cp 10 percent + ret c + + inc [hl] + inc [hl] + ret + +.encourage + call AI_80_20 + ret c + + dec [hl] + dec [hl] + ret + +AI_Smart_Thunder: +; 90% chance to discourage this move when it's sunny. + + ld a, [wBattleWeather] + cp WEATHER_SUN + ret nz + + call Random + cp 10 percent + ret c + + inc [hl] + ret + +AICompareSpeed: +; Return carry if enemy is faster than player. + + push bc + ld a, [wEnemyMonSpeed + 1] + ld b, a + ld a, [wBattleMonSpeed + 1] + cp b + ld a, [wEnemyMonSpeed] + ld b, a + ld a, [wBattleMonSpeed] + sbc b + pop bc + ret + +AICheckPlayerMaxHP: + push hl + push de + push bc + ld de, wBattleMonHP + ld hl, wBattleMonMaxHP + jr AICheckMaxHP + +AICheckEnemyMaxHP: + push hl + push de + push bc + ld de, wEnemyMonHP + ld hl, wEnemyMonMaxHP + ; fallthrough + +AICheckMaxHP: +; Return carry if hp at de matches max hp at hl. + + ld a, [de] + inc de + cp [hl] + jr nz, .not_max + + inc hl + ld a, [de] + cp [hl] + jr nz, .not_max + + pop bc + pop de + pop hl + scf + ret + +.not_max + pop bc + pop de + pop hl + and a + ret + +AICheckPlayerHalfHP: + push hl + ld hl, wBattleMonHP + ld b, [hl] + inc hl + ld c, [hl] + sla c + rl b + inc hl + inc hl + ld a, [hld] + cp c + ld a, [hl] + sbc b + pop hl + ret + +AICheckEnemyHalfHP: + push hl + push de + push bc + ld hl, wEnemyMonHP + ld b, [hl] + inc hl + ld c, [hl] + sla c + rl b + inc hl + inc hl + ld a, [hld] + cp c + ld a, [hl] + sbc b + pop bc + pop de + pop hl + ret + +AICheckEnemyQuarterHP: + push hl + push de + push bc + ld hl, wEnemyMonHP + ld b, [hl] + inc hl + ld c, [hl] + sla c + rl b + sla c + rl b + inc hl + inc hl + ld a, [hld] + cp c + ld a, [hl] + sbc b + pop bc + pop de + pop hl + ret + +AICheckPlayerQuarterHP: + push hl + ld hl, wBattleMonHP + ld b, [hl] + inc hl + ld c, [hl] + sla c + rl b + sla c + rl b + inc hl + inc hl + ld a, [hld] + cp c + ld a, [hl] + sbc b + pop hl + ret + +AIHasMoveEffect: +; Return carry if the enemy has move b. + + push hl + ld hl, wEnemyMonMoves + ld c, NUM_MOVES + +.checkmove + ld a, [hli] + and a + jr z, .no + + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + cp b + jr z, .yes + + dec c + jr nz, .checkmove + +.no + pop hl + and a + ret + +.yes + pop hl + scf + ret + +AIHasMoveInArray: +; Return carry if the enemy has a move in array hl. + + push de + push bc + push hl + ld b, NUM_MOVES + ld de, wEnemyMonMoves +.loop + ld a, [de] + inc de + and a + jr z, .next + call GetMoveIndexFromID + ld a, h + ld c, l + pop hl + push hl + push bc + push de + ld b, a + ld de, 2 + call IsInWordArray + pop de + pop bc + jr c, .done +.next + dec b + jr nz, .loop +.done + pop hl + pop bc + pop de + ret + +INCLUDE "data/battle/ai/useful_moves.asm" + +AI_Opportunist: +; Discourage stall moves when the enemy's HP is low. + +; Do nothing if enemy's HP is above 50%. + call AICheckEnemyHalfHP + ret c + +; Discourage stall moves if enemy's HP is below 25%. + call AICheckEnemyQuarterHP + jr nc, .lowhp + +; 50% chance to discourage stall moves if enemy's HP is between 25% and 50%. + call AI_50_50 + ret c + +.lowhp + ld hl, wEnemyAIMoveScores - 1 + ld de, wEnemyMonMoves + ld c, NUM_MOVES + 1 +.checkmove + inc hl + dec c + jr z, .done + + ld a, [de] + inc de + and a + jr z, .done + + push hl + push de + push bc + ld hl, StallMoves + call AI_CheckMoveInList + + pop bc + pop de + pop hl + jr nc, .checkmove + + inc [hl] + jr .checkmove + +.done + ret + +INCLUDE "data/battle/ai/stall_moves.asm" + + +AI_Aggressive: +; Use whatever does the most damage. + +; Discourage all damaging moves but the one that does the most damage. +; If no damaging move deals damage to the player (immune), +; no move will be discouraged + +; Figure out which attack does the most damage and put it in c. + ld hl, wEnemyMonMoves + ld bc, 0 + ld de, 0 +.checkmove + inc b + ld a, b + cp NUM_MOVES + 1 + jr z, .gotstrongestmove + + ld a, [hli] + and a + jr z, .gotstrongestmove + + push hl + push de + push bc + call AIGetEnemyMove + ld a, [wEnemyMoveStruct + MOVE_POWER] + and a + jr z, .nodamage + call AIDamageCalc + pop bc + pop de + pop hl + +; Update current move if damage is highest so far + ld a, [wCurDamage + 1] + cp e + ld a, [wCurDamage] + sbc d + jr c, .checkmove + + ld a, [wCurDamage + 1] + ld e, a + ld a, [wCurDamage] + ld d, a + ld c, b + jr .checkmove + +.nodamage + pop bc + pop de + pop hl + jr .checkmove + +.gotstrongestmove +; Nothing we can do if no attacks did damage. + ld a, c + and a + ret z + +; Discourage moves that do less damage unless they're reckless too. + ld hl, wEnemyAIMoveScores - 1 + ld de, wEnemyMonMoves + ld b, 0 +.checkmove2 + inc b + ld a, b + cp NUM_MOVES + 1 + ret z + +; Ignore this move if it is the highest damaging one. + cp c + ld a, [de] + inc de + inc hl + jr z, .checkmove2 + + call AIGetEnemyMove + +; Ignore this move if its power is 0 or 1. +; Moves such as Seismic Toss, Hidden Power, +; Counter and Fissure have a base power of 1. + ld a, [wEnemyMoveStruct + MOVE_POWER] + cp 2 + jr c, .checkmove2 + +; Ignore this move if it is reckless. + push hl + push de + push bc + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + ld hl, RecklessMoves + ld de, 1 + call IsInArray + pop bc + pop de + pop hl + jr c, .checkmove2 + +; If we made it this far, discourage this move. + inc [hl] + jr .checkmove2 + +INCLUDE "data/battle/ai/reckless_moves.asm" + +AIDamageCalc: + ld a, 1 + ldh [hBattleTurn], a + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + ld de, 1 + ld hl, ConstantDamageEffects + call IsInArray + jr nc, .notconstant + callfar BattleCommand_ConstantDamage + ret + +.notconstant + callfar EnemyAttackDamage + callfar BattleCommand_DamageCalc + callfar BattleCommand_Stab + ret + +INCLUDE "data/battle/ai/constant_damage_effects.asm" + +AI_Cautious: +; 90% chance to discourage moves with residual effects after the first turn. + + ld a, [wEnemyTurnsTaken] + and a + ret z + + ld hl, wEnemyAIMoveScores - 1 + ld de, wEnemyMonMoves + ld c, NUM_MOVES + 1 +.loop + inc hl + dec c + ret z + + ld a, [de] + inc de + and a + ret z + + push hl + push de + push bc + ld hl, ResidualMoves + call AI_CheckMoveInList + + pop bc + pop de + pop hl + jr nc, .loop + + call Random + cp 90 percent + 1 + ret nc + + inc [hl] + jr .loop + +INCLUDE "data/battle/ai/residual_moves.asm" + + +AI_Status: +; Dismiss status moves that don't affect the player. + + ld hl, wEnemyAIMoveScores - 1 + ld de, wEnemyMonMoves + ld b, NUM_MOVES + 1 +.checkmove + dec b + ret z + + inc hl + ld a, [de] + and a + ret z + + inc de + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + cp EFFECT_TOXIC + jr z, .poisonimmunity + cp EFFECT_POISON + jr z, .poisonimmunity + cp EFFECT_SLEEP + jr z, .typeimmunity + cp EFFECT_PARALYZE + jr z, .typeimmunity + + ld a, [wEnemyMoveStruct + MOVE_POWER] + and a + jr z, .checkmove + + jr .typeimmunity + +.poisonimmunity + ld a, [wBattleMonType1] + cp POISON + jr z, .immune + ld a, [wBattleMonType2] + cp POISON + jr z, .immune + +.typeimmunity + push hl + push bc + push de + ld a, 1 + ldh [hBattleTurn], a + callfar BattleCheckTypeMatchup + pop de + pop bc + pop hl + + ld a, [wTypeMatchup] + and a + jr nz, .checkmove + +.immune + call AIDiscourageMove + jr .checkmove + + +AI_Risky: +; Use any move that will KO the target. +; Risky moves will often be an exception (see below). + + ld hl, wEnemyAIMoveScores - 1 + ld de, wEnemyMonMoves + ld c, NUM_MOVES + 1 +.checkmove + inc hl + dec c + ret z + + ld a, [de] + inc de + and a + ret z + + push de + push bc + push hl + call AIGetEnemyMove + + ld a, [wEnemyMoveStruct + MOVE_POWER] + and a + jr z, .nextmove + +; Don't use risky moves at max hp. + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + ld de, 1 + ld hl, RiskyEffects + call IsInArray + jr nc, .checkko + + call AICheckEnemyMaxHP + jr c, .nextmove + +; Else, 80% chance to exclude them. + call Random + cp 79 percent - 1 + jr c, .nextmove + +.checkko + call AIDamageCalc + + ld a, [wCurDamage + 1] + ld e, a + ld a, [wCurDamage] + ld d, a + ld a, [wBattleMonHP + 1] + cp e + ld a, [wBattleMonHP] + sbc d + jr nc, .nextmove + + pop hl +rept 5 + dec [hl] +endr + push hl + +.nextmove + pop hl + pop bc + pop de + jr .checkmove + +INCLUDE "data/battle/ai/risky_effects.asm" + + +AI_None: + ret + +AIDiscourageMove: + ld a, [hl] + add 10 + ld [hl], a + ret + +AIGetEnemyMove: +; Load attributes of move a into ram + + push hl + push de + push bc + + ld de, wEnemyMoveStruct + call GetMoveData + + pop bc + pop de + pop hl + ret + +AI_80_20: + call Random + cp 20 percent - 1 + ret + +AI_50_50: + call Random + cp 50 percent + 1 + ret + +AI_CheckMoveInList: + push hl + call GetMoveIndexFromID + ld b, h + ld c, l + pop hl + ld de, 2 + jp IsInWordArray diff --git a/engine/battle/ai/switch.asm b/engine/battle/ai/switch.asm new file mode 100644 index 0000000..4e5d9b4 --- /dev/null +++ b/engine/battle/ai/switch.asm @@ -0,0 +1,650 @@ +CheckPlayerMoveTypeMatchups: +; Check how well the moves you've already used +; fare against the enemy's Pokemon. Used to +; score a potential switch. + push hl + push de + push bc + ld a, BASE_AI_SWITCH_SCORE + ld [wEnemyAISwitchScore], a + ld hl, wPlayerUsedMoves + ld a, [hl] + and a + jr z, .unknown_moves + + ld d, NUM_MOVES + ld e, 0 +.loop + ld a, [hli] + and a + jr z, .exit + push hl + call GetMoveTypeIfDamaging + jr z, .next + + ld hl, wEnemyMonType + call CheckTypeMatchup + ld a, [wTypeMatchup] + cp EFFECTIVE + 1 ; 1.0 + 0.1 + jr nc, .super_effective + and a + jr z, .next + cp EFFECTIVE ; 1.0 + jr nc, .neutral + +; not very effective + ld a, e + cp 1 ; 0.1 + jr nc, .next + ld e, 1 + jr .next + +.neutral + ld e, 2 + jr .next + +.super_effective + call .DecreaseScore + pop hl + jr .done + +.next + pop hl + dec d + jr nz, .loop + +.exit + ld a, e + cp 2 + jr z, .done + call .IncreaseScore + ld a, e + and a + jr nz, .done + call .IncreaseScore + jr .done + +.unknown_moves + ld a, [wBattleMonType1] + ld b, a + ld hl, wEnemyMonType1 + call CheckTypeMatchup + ld a, [wTypeMatchup] + cp EFFECTIVE + 1 ; 1.0 + 0.1 + jr c, .ok + call .DecreaseScore +.ok + ld a, [wBattleMonType2] + cp b + jr z, .ok2 + call CheckTypeMatchup + ld a, [wTypeMatchup] + cp EFFECTIVE + 1 ; 1.0 + 0.1 + jr c, .ok2 + call .DecreaseScore +.ok2 + +.done + call .CheckEnemyMoveMatchups + pop bc + pop de + pop hl + ret + +.CheckEnemyMoveMatchups: + ld de, wEnemyMonMoves + ld b, NUM_MOVES + 1 + ld c, 0 + + ld a, [wTypeMatchup] + push af +.loop2 + dec b + jr z, .exit2 + + ld a, [de] + and a + jr z, .exit2 + + inc de + call GetMoveTypeIfDamaging + jr z, .loop2 + + ld hl, wBattleMonType1 + call CheckTypeMatchup + + ld a, [wTypeMatchup] + ; immune + and a + jr z, .loop2 + + ; not very effective + inc c + cp EFFECTIVE + jr c, .loop2 + + ; neutral + inc c + inc c + inc c + inc c + inc c + cp EFFECTIVE + jr z, .loop2 + + ; super effective + ld c, 100 + jr .loop2 + +.exit2 + pop af + ld [wTypeMatchup], a + + ld a, c + and a + jr z, .doubledown ; double down + cp 5 + jr c, .DecreaseScore ; down + cp 100 + ret c + jr .IncreaseScore ; up + +.doubledown + call .DecreaseScore +.DecreaseScore: + ld a, [wEnemyAISwitchScore] + dec a + ld [wEnemyAISwitchScore], a + ret + +.IncreaseScore: + ld a, [wEnemyAISwitchScore] + inc a + ld [wEnemyAISwitchScore], a + ret + +CheckAbleToSwitch: + xor a + ld [wEnemySwitchMonParam], a + call FindAliveEnemyMons + ret c + + ld a, [wEnemySubStatus1] + bit SUBSTATUS_PERISH, a + jr z, .no_perish + + ld a, [wEnemyPerishCount] + cp 1 + jr nz, .no_perish + + ; Perish count is 1 + + call FindAliveEnemyMons + call FindEnemyMonsWithAtLeastQuarterMaxHP + call FindEnemyMonsThatResistPlayer + call FindAliveEnemyMonsWithASuperEffectiveMove + + ld a, e + cp 2 + jr nz, .not_2 + + ld a, [wEnemyAISwitchScore] + add $30 ; maximum chance + ld [wEnemySwitchMonParam], a + ret + +.not_2 + call FindAliveEnemyMons + sla c + sla c + ld b, $ff + +.loop1 + inc b + sla c + jr nc, .loop1 + + ld a, b + add $30 ; maximum chance + ld [wEnemySwitchMonParam], a + ret + +.no_perish + call CheckPlayerMoveTypeMatchups + ld a, [wEnemyAISwitchScore] + cp 11 + ret nc + + ld a, [wLastPlayerCounterMove] + and a + jr z, .no_last_counter_move + + call FindEnemyMonsImmuneToLastCounterMove + ld a, [wEnemyAISwitchScore] + and a + jr z, .no_last_counter_move + + ld c, a + call FindEnemyMonsWithASuperEffectiveMove + ld a, [wEnemyAISwitchScore] + cp $ff + ret z + + ld b, a + ld a, e + cp 2 + jr z, .not_2_again + + call CheckPlayerMoveTypeMatchups + ld a, [wEnemyAISwitchScore] + cp 10 + ret nc + + ld a, b + add $10 + ld [wEnemySwitchMonParam], a + ret + +.not_2_again + ld c, $10 + call CheckPlayerMoveTypeMatchups + ld a, [wEnemyAISwitchScore] + cp 10 + jr nc, .okay + ld c, $20 + +.okay + ld a, b + add c + ld [wEnemySwitchMonParam], a + ret + +.no_last_counter_move + call CheckPlayerMoveTypeMatchups + ld a, [wEnemyAISwitchScore] + cp 10 + ret nc + + call FindAliveEnemyMons + call FindEnemyMonsWithAtLeastQuarterMaxHP + call FindEnemyMonsThatResistPlayer + call FindAliveEnemyMonsWithASuperEffectiveMove + + ld a, e + cp $2 + ret nz + + ld a, [wEnemyAISwitchScore] + add $10 + ld [wEnemySwitchMonParam], a + ret + +FindAliveEnemyMons: + ld a, [wOTPartyCount] + cp 2 + jr c, .only_one + + ld d, a + ld e, 0 + ld b, 1 << (PARTY_LENGTH - 1) + ld c, 0 + ld hl, wOTPartyMon1HP + +.loop + ld a, [wCurOTMon] + cp e + jr z, .next + + push bc + ld b, [hl] + inc hl + ld a, [hld] + or b + pop bc + jr z, .next + + ld a, c + or b + ld c, a + +.next + srl b + push bc + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop bc + inc e + dec d + jr nz, .loop + + ld a, c + and a + jr nz, .more_than_one + +.only_one + scf + ret + +.more_than_one + and a + ret + +FindEnemyMonsImmuneToLastCounterMove: + ld hl, wOTPartyMon1 + ld a, [wOTPartyCount] + ld b, a + ld c, 1 << (PARTY_LENGTH - 1) + ld d, 0 + xor a + ld [wEnemyAISwitchScore], a + +.loop + ld a, [wCurOTMon] + cp d + push hl + jr z, .next + + push hl + push bc + + ; If the Pokemon has at least 1 HP... + ld bc, MON_HP + add hl, bc + pop bc + ld a, [hli] + or [hl] + pop hl + jr z, .next + + ld a, [hl] + ld [wCurSpecies], a + call GetBaseData + + ; the player's last move is damaging... + ld a, [wLastPlayerCounterMove] + call GetMoveTypeIfDamaging + jr z, .next + + ; and the Pokemon is immune to it... + ld hl, wBaseType + call CheckTypeMatchup + ld a, [wTypeMatchup] + and a + jr nz, .next + + ; ... encourage that Pokemon. + ld a, [wEnemyAISwitchScore] + or c + ld [wEnemyAISwitchScore], a +.next + pop hl + dec b + ret z + + push bc + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop bc + + inc d + srl c + jr .loop + +FindAliveEnemyMonsWithASuperEffectiveMove: + push bc + ld a, [wOTPartyCount] + ld e, a + ld hl, wOTPartyMon1HP + ld b, 1 << (PARTY_LENGTH - 1) + ld c, 0 +.loop + ld a, [hli] + or [hl] + jr z, .next + + ld a, b + or c + ld c, a + +.next + srl b + push bc + ld bc, wPartyMon2HP - (wPartyMon1HP + 1) + add hl, bc + pop bc + dec e + jr nz, .loop + + ld a, c + pop bc + + and c + ld c, a + ; fallthrough + +FindEnemyMonsWithASuperEffectiveMove: + ld a, -1 + ld [wEnemyAISwitchScore], a + ld hl, wOTPartyMon1Moves + ld b, 1 << (PARTY_LENGTH - 1) + ld d, 0 + ld e, 0 +.loop + ld a, b + and c + jr z, .next + + push hl + push bc + ; for move on mon: + ld b, NUM_MOVES + ld c, 0 +.loop3 + ; if move is None: break + ld a, [hli] + and a + push hl + jr z, .break3 + + ; if move has no power: continue + call GetMoveTypeIfDamaging + jr z, .nope + + ; check type matchups + ld hl, wBattleMonType1 + call CheckTypeMatchup + + ; if immune or not very effective: continue + ld a, [wTypeMatchup] + cp 10 + jr c, .nope + + ; if neutral: load 1 and continue + ld e, 1 + cp EFFECTIVE + 1 + jr c, .nope + + ; if super-effective: load 2 and break + ld e, 2 + jr .break3 + +.nope + pop hl + dec b + jr nz, .loop3 + + jr .done + +.break3 + pop hl +.done + ld a, e + pop bc + pop hl + cp 2 + jr z, .done2 ; at least one move is super-effective + cp 1 + jr nz, .next ; no move does more than half damage + + ; encourage this pokemon + ld a, d + or b + ld d, a + jr .next ; such a long jump + +.next + ; next pokemon? + push bc + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop bc + srl b + jr nc, .loop + + ; if no pokemon has a super-effective move: return + ld a, d + ld b, a + and a + ret z + +.done2 + ; convert the bit flag to an int and return + push bc + sla b + sla b + ld c, $ff +.loop2 + inc c + sla b + jr nc, .loop2 + + ld a, c + ld [wEnemyAISwitchScore], a + pop bc + ret + +FindEnemyMonsThatResistPlayer: + push bc + ld hl, wOTPartySpecies + ld b, 1 << (PARTY_LENGTH - 1) + ld c, 0 + +.loop + ld a, [hli] + cp $ff + jr z, .done + + push hl + ld [wCurSpecies], a + call GetBaseData + ld a, [wLastPlayerCounterMove] + and a + jr z, .skip_move + + call GetMoveTypeIfDamaging + jr nz, .check_type + +.skip_move + ld a, [wBattleMonType1] + ld hl, wBaseType + call CheckTypeMatchup + ld a, [wTypeMatchup] + cp 10 + 1 + jr nc, .dont_choose_mon + ld a, [wBattleMonType2] + +.check_type + ld hl, wBaseType + call CheckTypeMatchup + ld a, [wTypeMatchup] + cp EFFECTIVE + 1 + jr nc, .dont_choose_mon + + ld a, b + or c + ld c, a + +.dont_choose_mon + srl b + pop hl + jr .loop + +.done + ld a, c + pop bc + and c + ld c, a + ret + +FindEnemyMonsWithAtLeastQuarterMaxHP: + push bc + ld de, wOTPartySpecies + ld b, 1 << (PARTY_LENGTH - 1) + ld c, 0 + ld hl, wOTPartyMon1HP + +.loop + ld a, [de] + inc de + cp $ff + jr z, .done + + push hl + push bc + ld b, [hl] + inc hl + ld c, [hl] + inc hl + inc hl +; hl = MaxHP + 1 +; bc = [CurHP] * 4 + srl c + rl b + srl c + rl b +; if bc >= [hl], encourage + ld a, [hld] + cp c + ld a, [hl] + sbc b + pop bc + jr nc, .next + + ld a, b + or c + ld c, a + +.next + srl b + pop hl + push bc + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop bc + jr .loop + +.done + ld a, c + pop bc + and c + ld c, a + ret + +GetMoveTypeIfDamaging: +; returns the type of move a in a, and sets the zero flag depending on whether the move causes damage +; clobbers hl + push bc + call GetMoveAddress + ld b, a + rept MOVE_POWER - 1 + inc hl + endr + call GetFarByte + ld c, a + ld a, b + inc hl + call GetFarByte + inc c + dec c + pop bc + ret diff --git a/engine/battle/anim_hp_bar.asm b/engine/battle/anim_hp_bar.asm new file mode 100644 index 0000000..3e413f9 --- /dev/null +++ b/engine/battle/anim_hp_bar.asm @@ -0,0 +1,417 @@ +_AnimateHPBar: + call .IsMaximumMoreThan48Pixels + jr c, .MoreThan48Pixels + call .ComputePixels +.ShortAnimLoop: + push bc + push hl + call ShortAnim_UpdateVariables + pop hl + pop bc + push af + push bc + push hl + call ShortHPBarAnim_UpdateTiles + call HPBarAnim_BGMapUpdate + pop hl + pop bc + pop af + jr nc, .ShortAnimLoop + ret + +.MoreThan48Pixels: + call .ComputePixels +.LongAnimLoop: + push bc + push hl + call LongAnim_UpdateVariables + pop hl + pop bc + ret c + push af + push bc + push hl + call LongHPBarAnim_UpdateTiles + call HPBarAnim_BGMapUpdate + pop hl + pop bc + pop af + jr nc, .LongAnimLoop + ret + +.IsMaximumMoreThan48Pixels: + ld a, [wCurHPAnimMaxHP + 1] + and a + jr nz, .player + ld a, [wCurHPAnimMaxHP] + cp HP_BAR_LENGTH_PX + jr nc, .player + and a + ret + +.player + scf + ret + +.ComputePixels: + push hl + ld hl, wCurHPAnimMaxHP + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + pop hl + call ComputeHPBarPixels + ld a, e + ld [wCurHPBarPixels], a + + ld a, [wCurHPAnimNewHP] + ld c, a + ld a, [wCurHPAnimNewHP + 1] + ld b, a + ld a, [wCurHPAnimMaxHP] + ld e, a + ld a, [wCurHPAnimMaxHP + 1] + ld d, a + call ComputeHPBarPixels + ld a, e + ld [wNewHPBarPixels], a + + push hl + ld hl, wCurHPAnimOldHP + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + pop hl + ld a, e + sub c + ld e, a + ld a, d + sbc b + ld d, a + jr c, .negative + ld a, [wCurHPAnimOldHP] + ld [wCurHPAnimLowHP], a + ld a, [wCurHPAnimNewHP] + ld [wCurHPAnimHighHP], a + ld bc, 1 + jr .got_direction + +.negative + ld a, [wCurHPAnimOldHP] + ld [wCurHPAnimHighHP], a + ld a, [wCurHPAnimNewHP] + ld [wCurHPAnimLowHP], a + ld a, e + xor $ff + inc a + ld e, a + ld a, d + xor $ff + ld d, a + ld bc, -1 +.got_direction + ld a, d + ld [wCurHPAnimDeltaHP], a + ld a, e + ld [wCurHPAnimDeltaHP + 1], a + ret + +ShortAnim_UpdateVariables: + ld hl, wCurHPBarPixels + ld a, [wNewHPBarPixels] + cp [hl] + jr nz, .not_finished + scf + ret + +.not_finished + ld a, c + add [hl] + ld [hl], a + call ShortHPBar_CalcPixelFrame + and a + ret + +LongAnim_UpdateVariables: +.loop + ld hl, wCurHPAnimOldHP + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, e + cp [hl] + jr nz, .next + inc hl + ld a, d + cp [hl] + jr nz, .next + scf + ret + +.next + ld l, e + ld h, d + add hl, bc + ld a, l + ld [wCurHPAnimOldHP], a + ld a, h + ld [wCurHPAnimOldHP + 1], a + push hl + push de + push bc + ld hl, wCurHPAnimMaxHP + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a +; BUG: HP bar animation is slow for high HP (see docs/bugs_and_glitches.md) + call ComputeHPBarPixels + pop bc + pop de + pop hl + ld a, e + ld hl, wCurHPBarPixels + cp [hl] + jr z, .loop + ld [hl], a + and a + ret + +ShortHPBarAnim_UpdateTiles: + call HPBarAnim_UpdateHPRemaining + ld d, HP_BAR_LENGTH + ld a, [wWhichHPBar] + and $1 + ld b, a + ld a, [wCurHPBarPixels] + ld e, a + ld c, a + push de + call HPBarAnim_RedrawHPBar + pop de + call HPBarAnim_PaletteUpdate + ret + +LongHPBarAnim_UpdateTiles: + call HPBarAnim_UpdateHPRemaining + ld a, [wCurHPAnimOldHP] + ld c, a + ld a, [wCurHPAnimOldHP + 1] + ld b, a + ld a, [wCurHPAnimMaxHP] + ld e, a + ld a, [wCurHPAnimMaxHP + 1] + ld d, a + call ComputeHPBarPixels + ld c, e + ld d, HP_BAR_LENGTH + ld a, [wWhichHPBar] + and $1 + ld b, a + push de + call HPBarAnim_RedrawHPBar + pop de + call HPBarAnim_PaletteUpdate + ret + +HPBarAnim_RedrawHPBar: + ld a, [wWhichHPBar] + cp $2 + jr nz, .skip + ld a, 2 * SCREEN_WIDTH + add l + ld l, a + ld a, 0 + adc h + ld h, a +.skip + call DrawBattleHPBar + ret + +HPBarAnim_UpdateHPRemaining: + ld a, [wWhichHPBar] + and a + ret z + cp $1 + jr z, .load_15 + ld de, SCREEN_WIDTH + 2 + jr .loaded_de + +.load_15 + ld de, SCREEN_WIDTH + 1 +.loaded_de + push hl + add hl, de + ld a, " " + ld [hli], a + ld [hli], a + ld [hld], a + dec hl + ld a, [wCurHPAnimOldHP] + ld [wStringBuffer2 + 1], a + ld a, [wCurHPAnimOldHP + 1] + ld [wStringBuffer2], a + ld de, wStringBuffer2 + lb bc, 2, 3 + call PrintNum + pop hl + ret + +HPBarAnim_PaletteUpdate: + ldh a, [hCGB] + and a + ret z + ld hl, wCurHPAnimPal + call SetHPPal + ld a, [wCurHPAnimPal] + ld c, a + farcall ApplyHPBarPals + ret + +HPBarAnim_BGMapUpdate: + ldh a, [hCGB] + and a + jr nz, .cgb + call DelayFrame + call DelayFrame + ret + +.cgb + ld a, [wWhichHPBar] + and a + jr z, .load_0 + cp $1 + jr z, .load_1 + ld a, [wCurPartyMon] + cp $3 + jr nc, .bottom_half_of_screen + ld c, $0 + jr .got_third + +.bottom_half_of_screen + ld c, $1 +.got_third + push af + cp $2 + jr z, .skip_delay + cp $5 + jr z, .skip_delay + ld a, $2 + ldh [hBGMapMode], a + ld a, c + ldh [hBGMapThird], a + call DelayFrame +.skip_delay + ld a, $1 + ldh [hBGMapMode], a + ld a, c + ldh [hBGMapThird], a + call DelayFrame + pop af + cp $2 + jr z, .two_frames + cp $5 + jr z, .two_frames + ret + +.two_frames + inc c + ld a, $2 + ldh [hBGMapMode], a + ld a, c + ldh [hBGMapThird], a + call DelayFrame + ld a, $1 + ldh [hBGMapMode], a + ld a, c + ldh [hBGMapThird], a + call DelayFrame + ret + +.load_0 + ld c, $0 + jr .finish + +.load_1 + ld c, $1 +.finish + call DelayFrame + ld a, c + ldh [hBGMapThird], a + call DelayFrame + ret + +ShortHPBar_CalcPixelFrame: + ld a, [wCurHPAnimMaxHP] + ld c, a + ld b, 0 + ld hl, 0 + ld a, [wCurHPBarPixels] + cp HP_BAR_LENGTH_PX + jr nc, .return_max + and a + jr z, .return_zero + call AddNTimes + + ld b, 0 +.loop +; BUG: HP bar animation off-by-one error for low HP (see docs/bugs_and_glitches.md) + ld a, l + sub HP_BAR_LENGTH_PX + ld l, a + ld a, h + sbc $0 + ld h, a + jr c, .done + inc b + jr .loop + +.done + push bc + ld bc, $80 + add hl, bc + pop bc + ld a, l + sub HP_BAR_LENGTH_PX + ld l, a + ld a, h + sbc $0 + ld h, a + jr c, .no_carry + inc b +.no_carry + ld a, [wCurHPAnimLowHP] + cp b + jr nc, .finish + ld a, [wCurHPAnimHighHP] + cp b + jr c, .finish + ld a, b +.finish + ld [wCurHPAnimOldHP], a + ret + +.return_zero + xor a + ld [wCurHPAnimOldHP], a + ret + +.return_max + ld a, [wCurHPAnimMaxHP] + ld [wCurHPAnimOldHP], a + ret diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm new file mode 100644 index 0000000..74c5304 --- /dev/null +++ b/engine/battle/battle_transition.asm @@ -0,0 +1,840 @@ +; BattleTransitionJumptable.Jumptable indexes +DEF BATTLETRANSITION_CAVE EQU $01 +DEF BATTLETRANSITION_CAVE_STRONGER EQU $09 +DEF BATTLETRANSITION_NO_CAVE EQU $10 +DEF BATTLETRANSITION_NO_CAVE_STRONGER EQU $18 +DEF BATTLETRANSITION_FINISH EQU $20 +DEF BATTLETRANSITION_END EQU $80 + +DEF BATTLETRANSITION_SQUARE EQU "8" ; $fe +DEF BATTLETRANSITION_BLACK EQU "9" ; $ff + +DoBattleTransition: + call .InitGFX + ldh a, [rBGP] + ld [wBGP], a + ldh a, [rOBP0] + ld [wOBP0], a + ldh a, [rOBP1] + ld [wOBP1], a + call DelayFrame + ld hl, hVBlank + ld a, [hl] + push af + vc_hook Reduce_battle_transition_flashing + ld [hl], $1 + +.loop + ld a, [wJumptableIndex] + bit 7, a ; BATTLETRANSITION_END? + jr nz, .done + call BattleTransitionJumptable + call DelayFrame + jr .loop + +.done + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + + ld hl, wBGPals1 + ld bc, 8 palettes + xor a + call ByteFill + + pop af + ldh [rSVBK], a + + ld a, %11111111 + ld [wBGP], a + call DmgToCgbBGPals + call DelayFrame + xor a + ldh [hLCDCPointer], a + ldh [hLYOverrideStart], a + ldh [hLYOverrideEnd], a + ldh [hSCY], a + + ld a, $1 ; unnecessary bankswitch? + ldh [rSVBK], a + pop af + vc_hook Stop_reducing_battle_transition_flashing + ldh [hVBlank], a + call DelayFrame + ret + +.InitGFX: + ld a, [wLinkMode] + cp LINK_MOBILE + jr z, .mobile + farcall ReanchorBGMap_NoOAMUpdate + call UpdateSprites + call DelayFrame + call .NonMobile_LoadPokeballTiles + call BattleStart_CopyTilemapAtOnce + jr .resume + +.mobile + call LoadTrainerBattlePokeballTiles + +.resume + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + call DelayFrame + xor a + ldh [hBGMapMode], a + ld hl, wJumptableIndex + xor a + ld [hli], a + ld [hli], a + ld [hl], a + call WipeLYOverrides + ret + +.NonMobile_LoadPokeballTiles: + call LoadTrainerBattlePokeballTiles + hlbgcoord 0, 0 + call ConvertTrainerBattlePokeballTilesTo2bpp + ret + +LoadTrainerBattlePokeballTiles: +; Load the tiles used in the Pokeball Graphic that fills the screen +; at the start of every Trainer battle. + ld de, TrainerBattlePokeballTiles + ld hl, vTiles0 tile BATTLETRANSITION_SQUARE + ld b, BANK(TrainerBattlePokeballTiles) + ld c, 2 + call Request2bpp + + ldh a, [rVBK] + push af + ld a, $1 + ldh [rVBK], a + + ld de, TrainerBattlePokeballTiles + ld hl, vTiles3 tile BATTLETRANSITION_SQUARE + ld b, BANK(TrainerBattlePokeballTiles) + ld c, 2 + call Request2bpp + + pop af + ldh [rVBK], a + ret + +ConvertTrainerBattlePokeballTilesTo2bpp: + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + push hl + ld hl, wDecompressScratch + ld bc, $28 tiles + +.loop + ld [hl], -1 + inc hl + dec bc + ld a, c + or b + jr nz, .loop + + pop hl + ld de, wDecompressScratch + ld b, BANK(@) + ld c, $28 + call Request2bpp + pop af + ldh [rSVBK], a + ret + +TrainerBattlePokeballTiles: +INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp" + +BattleTransitionJumptable: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + dw StartTrainerBattle_DetermineWhichAnimation ; 00 + + ; BATTLETRANSITION_CAVE + dw StartTrainerBattle_LoadPokeBallGraphics ; 01 + dw StartTrainerBattle_SetUpBGMap ; 02 + dw StartTrainerBattle_Flash ; 03 + dw StartTrainerBattle_Flash ; 04 + dw StartTrainerBattle_Flash ; 05 + dw StartTrainerBattle_NextScene ; 06 + dw StartTrainerBattle_SetUpForWavyOutro ; 07 + dw StartTrainerBattle_SineWave ; 08 + + ; BATTLETRANSITION_CAVE_STRONGER + dw StartTrainerBattle_LoadPokeBallGraphics ; 09 + dw StartTrainerBattle_SetUpBGMap ; 0a + dw StartTrainerBattle_Flash ; 0b + dw StartTrainerBattle_Flash ; 0c + dw StartTrainerBattle_Flash ; 0d + dw StartTrainerBattle_NextScene ; 0e + ; There is no setup for this one + dw StartTrainerBattle_ZoomToBlack ; 0f + + ; BATTLETRANSITION_NO_CAVE + dw StartTrainerBattle_LoadPokeBallGraphics ; 10 + dw StartTrainerBattle_SetUpBGMap ; 11 + dw StartTrainerBattle_Flash ; 12 + dw StartTrainerBattle_Flash ; 13 + dw StartTrainerBattle_Flash ; 14 + dw StartTrainerBattle_NextScene ; 15 + dw StartTrainerBattle_SetUpForSpinOutro ; 16 + dw StartTrainerBattle_SpinToBlack ; 17 + + ; BATTLETRANSITION_NO_CAVE_STRONGER + dw StartTrainerBattle_LoadPokeBallGraphics ; 18 + dw StartTrainerBattle_SetUpBGMap ; 19 + dw StartTrainerBattle_Flash ; 1a + dw StartTrainerBattle_Flash ; 1b + dw StartTrainerBattle_Flash ; 1c + dw StartTrainerBattle_NextScene ; 1d + dw StartTrainerBattle_SetUpForRandomScatterOutro ; 1e + dw StartTrainerBattle_SpeckleToBlack ; 1f + + ; BATTLETRANSITION_FINISH + dw StartTrainerBattle_Finish ; 20 + +; transition animations + const_def + const TRANS_CAVE + const TRANS_CAVE_STRONGER + const TRANS_NO_CAVE + const TRANS_NO_CAVE_STRONGER + +; transition animation bits +DEF TRANS_STRONGER_F EQU 0 ; bit set in TRANS_CAVE_STRONGER and TRANS_NO_CAVE_STRONGER +DEF TRANS_NO_CAVE_F EQU 1 ; bit set in TRANS_NO_CAVE and TRANS_NO_CAVE_STRONGER + +StartTrainerBattle_DetermineWhichAnimation: +; The screen flashes a different number of times depending on the level of +; your lead Pokemon relative to the opponent's. +; BUG: Battle transitions fail to account for enemy's level (see docs/bugs_and_glitches.md) + ld de, 0 + ld a, [wBattleMonLevel] + add 3 + ld hl, wEnemyMonLevel + cp [hl] + jr nc, .not_stronger + set TRANS_STRONGER_F, e +.not_stronger + ld a, [wEnvironment] + cp CAVE + jr z, .cave + cp ENVIRONMENT_5 + jr z, .cave + cp DUNGEON + jr z, .cave + set TRANS_NO_CAVE_F, e +.cave + ld hl, .StartingPoints + add hl, de + ld a, [hl] + ld [wJumptableIndex], a + ret + +.StartingPoints: +; entries correspond to TRANS_* constants + db BATTLETRANSITION_CAVE + db BATTLETRANSITION_CAVE_STRONGER + db BATTLETRANSITION_NO_CAVE + db BATTLETRANSITION_NO_CAVE_STRONGER + +StartTrainerBattle_Finish: + call ClearSprites + ld a, BATTLETRANSITION_END + ld [wJumptableIndex], a + ret + +StartTrainerBattle_NextScene: + ld hl, wJumptableIndex + inc [hl] + ret + +StartTrainerBattle_SetUpBGMap: + call StartTrainerBattle_NextScene + xor a + ld [wBattleTransitionCounter], a + ldh [hBGMapMode], a + ret + +StartTrainerBattle_Flash: + call .DoFlashAnimation + ret nc + call StartTrainerBattle_NextScene + ret + +.DoFlashAnimation: + ld a, [wTimeOfDayPalset] + cp DARKNESS_PALSET + jr z, .done + ld hl, wBattleTransitionCounter + ld a, [hl] + inc [hl] + srl a + ld e, a + ld d, 0 + ld hl, .pals + add hl, de + ld a, [hl] + cp %00000001 + jr z, .done + ld [wBGP], a + call DmgToCgbBGPals + and a + ret + +.done + xor a + ld [wBattleTransitionCounter], a + scf + ret + +.pals: + dc 3, 3, 2, 1 + dc 3, 3, 3, 2 + dc 3, 3, 3, 3 + dc 3, 3, 3, 2 + dc 3, 3, 2, 1 + dc 3, 2, 1, 0 + dc 2, 1, 0, 0 + dc 1, 0, 0, 0 + dc 0, 0, 0, 0 + dc 1, 0, 0, 0 + dc 2, 1, 0, 0 + dc 3, 2, 1, 0 + dc 0, 0, 0, 1 + +StartTrainerBattle_SetUpForWavyOutro: + vc_hook Stop_reducing_battle_transition_flashing_WavyOutro + farcall RespawnPlayerAndOpponent + ld a, BANK(wLYOverrides) + ldh [rSVBK], a + call StartTrainerBattle_NextScene + + ld a, LOW(rSCX) + ldh [hLCDCPointer], a + xor a + ldh [hLYOverrideStart], a + ld a, $90 + ldh [hLYOverrideEnd], a + xor a + ld [wBattleTransitionCounter], a + ld [wBattleTransitionSineWaveOffset], a + ret + +StartTrainerBattle_SineWave: + ld a, [wBattleTransitionCounter] + cp $60 + jr nc, .end + call .DoSineWave + ret + +.end + ld a, BATTLETRANSITION_FINISH + ld [wJumptableIndex], a + ret + +.DoSineWave: + ld hl, wBattleTransitionSineWaveOffset + ld a, [hl] + inc [hl] + ld hl, wBattleTransitionCounter + ld d, [hl] + add [hl] + ld [hl], a + ld a, wLYOverridesEnd - wLYOverrides + ld bc, wLYOverrides + ld e, 0 + +.loop + push af + push de + ld a, e + call StartTrainerBattle_DrawSineWave + ld [bc], a + inc bc + pop de + ld a, e + add 2 + ld e, a + pop af + dec a + jr nz, .loop + ret + +StartTrainerBattle_SetUpForSpinOutro: + vc_hook Stop_reducing_battle_transition_flashing_SpinOutro + farcall RespawnPlayerAndOpponent + ld a, BANK(wLYOverrides) + ldh [rSVBK], a + call StartTrainerBattle_NextScene + xor a + ld [wBattleTransitionCounter], a + ret + +StartTrainerBattle_SpinToBlack: + xor a + ldh [hBGMapMode], a + ld a, [wBattleTransitionCounter] + ld e, a + ld d, 0 + ld hl, .spin_quadrants +rept 5 + add hl, de +endr + ld a, [hli] + cp -1 + jr z, .end + ld [wBattleTransitionSineWaveOffset], a + call .load + ld a, 1 + ldh [hBGMapMode], a + call DelayFrame + call DelayFrame + ld hl, wBattleTransitionCounter + inc [hl] + ret + +.end + ld a, 1 + ldh [hBGMapMode], a + call DelayFrame + call DelayFrame + call DelayFrame + xor a + ldh [hBGMapMode], a + ld a, BATTLETRANSITION_FINISH + ld [wJumptableIndex], a + ret + +; quadrants + const_def + const UPPER_LEFT + const UPPER_RIGHT + const LOWER_LEFT + const LOWER_RIGHT + +; quadrant bits +DEF RIGHT_QUADRANT_F EQU 0 ; bit set in UPPER_RIGHT and LOWER_RIGHT +DEF LOWER_QUADRANT_F EQU 1 ; bit set in LOWER_LEFT and LOWER_RIGHT + +.spin_quadrants: +MACRO spin_quadrant + db \1 + dw \2 + dwcoord \3, \4 +ENDM + spin_quadrant UPPER_LEFT, .wedge1, 1, 6 + spin_quadrant UPPER_LEFT, .wedge2, 0, 3 + spin_quadrant UPPER_LEFT, .wedge3, 1, 0 + spin_quadrant UPPER_LEFT, .wedge4, 5, 0 + spin_quadrant UPPER_LEFT, .wedge5, 9, 0 + spin_quadrant UPPER_RIGHT, .wedge5, 10, 0 + spin_quadrant UPPER_RIGHT, .wedge4, 14, 0 + spin_quadrant UPPER_RIGHT, .wedge3, 18, 0 + spin_quadrant UPPER_RIGHT, .wedge2, 19, 3 + spin_quadrant UPPER_RIGHT, .wedge1, 18, 6 + spin_quadrant LOWER_RIGHT, .wedge1, 18, 11 + spin_quadrant LOWER_RIGHT, .wedge2, 19, 14 + spin_quadrant LOWER_RIGHT, .wedge3, 18, 17 + spin_quadrant LOWER_RIGHT, .wedge4, 14, 17 + spin_quadrant LOWER_RIGHT, .wedge5, 10, 17 + spin_quadrant LOWER_LEFT, .wedge5, 9, 17 + spin_quadrant LOWER_LEFT, .wedge4, 5, 17 + spin_quadrant LOWER_LEFT, .wedge3, 1, 17 + spin_quadrant LOWER_LEFT, .wedge2, 0, 14 + spin_quadrant LOWER_LEFT, .wedge1, 1, 11 + db -1 + +.load: + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld h, [hl] + ld l, a +.loop + push hl + ld a, [de] + ld c, a + inc de +.loop1 + ld [hl], BATTLETRANSITION_BLACK + ld a, [wBattleTransitionSineWaveOffset] + bit RIGHT_QUADRANT_F, a + jr z, .leftside + inc hl + jr .okay1 +.leftside + dec hl +.okay1 + dec c + jr nz, .loop1 + pop hl + ld a, [wBattleTransitionSineWaveOffset] + bit LOWER_QUADRANT_F, a + ld bc, SCREEN_WIDTH + jr z, .upper + ld bc, -SCREEN_WIDTH +.upper + add hl, bc + ld a, [de] + inc de + cp -1 + ret z + and a + jr z, .loop + ld c, a +.loop2 + ld a, [wBattleTransitionSineWaveOffset] + bit RIGHT_QUADRANT_F, a + jr z, .leftside2 + dec hl + jr .okay2 +.leftside2 + inc hl +.okay2 + dec c + jr nz, .loop2 + jr .loop + +.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 + +StartTrainerBattle_SetUpForRandomScatterOutro: + vc_hook Stop_reducing_battle_transition_flashing_ScatterOutro + farcall RespawnPlayerAndOpponent + ld a, BANK(wLYOverrides) + ldh [rSVBK], a + call StartTrainerBattle_NextScene + ld a, $10 + ld [wBattleTransitionCounter], a + ld a, 1 + ldh [hBGMapMode], a + ret + +StartTrainerBattle_SpeckleToBlack: + ld hl, wBattleTransitionCounter + ld a, [hl] + and a + jr z, .done + dec [hl] + ld c, $c +.loop + push bc + call .BlackOutRandomTile + pop bc + dec c + jr nz, .loop + ret + +.done + ld a, $1 + ldh [hBGMapMode], a + call DelayFrame + call DelayFrame + call DelayFrame + xor a + ldh [hBGMapMode], a + ld a, BATTLETRANSITION_FINISH + ld [wJumptableIndex], a + ret + +.BlackOutRandomTile: +.y_loop + call Random + cp SCREEN_HEIGHT + jr nc, .y_loop + ld b, a + +.x_loop + call Random + cp SCREEN_WIDTH + jr nc, .x_loop + ld c, a + + hlcoord 0, -1 + ld de, SCREEN_WIDTH + inc b + +.row_loop + add hl, de + dec b + jr nz, .row_loop + add hl, bc + +; If the tile has already been blacked out, +; sample a new tile + ld a, [hl] + cp BATTLETRANSITION_BLACK + jr z, .y_loop + ld [hl], BATTLETRANSITION_BLACK + ret + +StartTrainerBattle_LoadPokeBallGraphics: + ld a, [wOtherTrainerClass] + and a + jp z, .nextscene ; don't need to be here if wild + + xor a + ldh [hBGMapMode], a + + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + inc b + inc c + jr .enter_loop_midway + +.pal_loop +; set all pals to 7 + ld a, [hl] + or PAL_BG_TEXT + ld [hli], a +.enter_loop_midway + dec c + jr nz, .pal_loop + dec b + jr nz, .pal_loop + + call .loadpokeballgfx + hlcoord 2, 1 + + ld b, SCREEN_WIDTH - 4 +.tile_loop + push hl + ld c, 2 +.row_loop + push hl + ld a, [de] + inc de +.col_loop +; Loading is done bit by bit + and a + jr z, .done + sla a + jr nc, .no_load + ld [hl], BATTLETRANSITION_SQUARE +.no_load + inc hl + jr .col_loop + +.done + pop hl + push bc + ld bc, (SCREEN_WIDTH - 4) / 2 + add hl, bc + pop bc + dec c + jr nz, .row_loop + + pop hl + push bc + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .tile_loop + + ldh a, [hCGB] + and a + jr nz, .cgb + ld a, 1 + ldh [hBGMapMode], a + call DelayFrame + call DelayFrame + jr .nextscene + +.cgb + ld hl, .pals + ld a, [wTimeOfDayPal] + maskbits NUM_DAYTIMES + cp DARKNESS_F + jr nz, .not_dark + ld hl, .darkpals +.not_dark + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + call .copypals + push hl + ld de, wBGPals1 palette PAL_BG_TEXT + ld bc, 1 palettes + call CopyBytes + pop hl + ld de, wBGPals2 palette PAL_BG_TEXT + ld bc, 1 palettes + call CopyBytes + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + call DelayFrame + call BattleStart_CopyTilemapAtOnce + +.nextscene + call StartTrainerBattle_NextScene + ret + +.copypals + ld de, wBGPals1 palette PAL_BG_TEXT + call .copy + ld de, wBGPals2 palette PAL_BG_TEXT + call .copy + ld de, wOBPals1 palette PAL_OW_TREE + call .copy + ld de, wOBPals2 palette PAL_OW_TREE + call .copy + ld de, wOBPals1 palette PAL_OW_ROCK + call .copy + ld de, wOBPals2 palette PAL_OW_ROCK + +.copy + push hl + ld bc, 1 palettes + call CopyBytes + pop hl + ret + +.pals: +INCLUDE "gfx/overworld/trainer_battle.pal" + +.darkpals: +INCLUDE "gfx/overworld/trainer_battle_dark.pal" + +.loadpokeballgfx: + ld a, [wOtherTrainerClass] + ld de, PokeBallTransition + ret + +PokeBallTransition: +; 16x16 overlay of a Poke Ball +pusho +opt b.X ; . = 0, X = 1 + bigdw %......XXXX...... + bigdw %....XXXXXXXX.... + bigdw %..XXXX....XXXX.. + bigdw %..XX........XX.. + bigdw %.XX..........XX. + bigdw %.XX...XXXX...XX. + bigdw %XX...XX..XX...XX + bigdw %XXXXXX....XXXXXX + bigdw %XXXXXX....XXXXXX + bigdw %XX...XX..XX...XX + bigdw %.XX...XXXX...XX. + bigdw %.XX..........XX. + bigdw %..XX........XX.. + bigdw %..XXXX....XXXX.. + bigdw %....XXXXXXXX.... + bigdw %......XXXX...... +popo + +WipeLYOverrides: + ldh a, [rSVBK] + push af + ld a, BANK(wLYOverrides) + ldh [rSVBK], a + + ld hl, wLYOverrides + call .wipe + ld hl, wLYOverridesBackup + call .wipe + + pop af + ldh [rSVBK], a + ret + +.wipe + xor a + ld c, SCREEN_HEIGHT_PX +.loop + ld [hli], a + dec c + jr nz, .loop + ret + +StartTrainerBattle_DrawSineWave: + calc_sine_wave + +StartTrainerBattle_ZoomToBlack: + vc_hook Stop_reducing_battle_transition_flashing_ZoomToBlack + farcall RespawnPlayerAndOpponent + ld de, .boxes + +.loop + ld a, [de] + cp -1 + jr z, .done + inc de + ld c, a + ld a, [de] + inc de + ld b, a + ld a, [de] + inc de + ld l, a + ld a, [de] + inc de + ld h, a + xor a + ldh [hBGMapMode], a + call .Copy + call WaitBGMap + jr .loop + +.done + ld a, BATTLETRANSITION_FINISH + ld [wJumptableIndex], a + ret + +.boxes +MACRO zoombox +; width, height, start y, start x + db \1, \2 + dwcoord \3, \4 +ENDM + zoombox 4, 2, 8, 8 + zoombox 6, 4, 7, 7 + zoombox 8, 6, 6, 6 + zoombox 10, 8, 5, 5 + zoombox 12, 10, 4, 4 + zoombox 14, 12, 3, 3 + zoombox 16, 14, 2, 2 + zoombox 18, 16, 1, 1 + zoombox 20, 18, 0, 0 + db -1 + +.Copy: + ld a, BATTLETRANSITION_BLACK +.row + push bc + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + ret + +UnusedWaitBGMapOnce: ; unreferenced + ld a, 1 + ldh [hBGMapMode], a ; redundant + call WaitBGMap + xor a + ldh [hBGMapMode], a + ret diff --git a/engine/battle/battlestart_copytilemapatonce.asm b/engine/battle/battlestart_copytilemapatonce.asm new file mode 100644 index 0000000..9d4d48d --- /dev/null +++ b/engine/battle/battlestart_copytilemapatonce.asm @@ -0,0 +1,3 @@ +BattleStart_CopyTilemapAtOnce: + call CGBOnly_CopyTilemapAtOnce + ret diff --git a/engine/battle/check_battle_scene.asm b/engine/battle/check_battle_scene.asm new file mode 100644 index 0000000..b7add82 --- /dev/null +++ b/engine/battle/check_battle_scene.asm @@ -0,0 +1,47 @@ +CheckBattleScene: +; Return carry if battle scene is turned off. + + ld a, BANK(wLinkMode) + ld hl, wLinkMode + call GetFarWRAMByte + cp LINK_MOBILE + jr z, .mobile + + ld a, [wOptions] + bit BATTLE_SCENE, a + jr nz, .off + + and a + ret + +.mobile + ld a, [wcd2f] + and a + jr nz, .from_wram + + ld a, BANK(s4_a60c) ; MBC30 bank used by JP Crystal; inaccessible by MBC3 + call OpenSRAM + ld a, [s4_a60c] + ld c, a + call CloseSRAM + + ld a, c + bit 0, c + jr z, .off + + and a + ret + +.from_wram + ld a, BANK(w5_dc00) + ld hl, w5_dc00 + call GetFarWRAMByte + bit 0, a + jr z, .off + + and a + ret + +.off + scf + ret diff --git a/engine/battle/consume_held_item.asm b/engine/battle/consume_held_item.asm new file mode 100644 index 0000000..c5e3b20 --- /dev/null +++ b/engine/battle/consume_held_item.asm @@ -0,0 +1,57 @@ +ConsumeHeldItem: + push hl + push de + push bc + ldh a, [hBattleTurn] + and a + ld hl, wOTPartyMon1Item + ld de, wEnemyMonItem + ld a, [wCurOTMon] + jr z, .theirturn + ld hl, wPartyMon1Item + ld de, wBattleMonItem + ld a, [wCurBattleMon] + +.theirturn + push hl + push af + ld a, [de] + ld b, a + farcall GetItemHeldEffect + ld hl, ConsumableEffects +.loop + ld a, [hli] + cp b + jr z, .ok + inc a + jr nz, .loop + pop af + pop hl + pop bc + pop de + pop hl + ret + +.ok + xor a + ld [de], a + pop af + pop hl + call GetPartyLocation + ldh a, [hBattleTurn] + and a + jr nz, .ourturn + ld a, [wBattleMode] + dec a + jr z, .done + +.ourturn + ld [hl], NO_ITEM + +.done + pop bc + pop de + pop hl + ret + +INCLUDE "data/battle/held_consumables.asm" diff --git a/engine/battle/core.asm b/engine/battle/core.asm new file mode 100644 index 0000000..4b49d14 --- /dev/null +++ b/engine/battle/core.asm @@ -0,0 +1,9236 @@ +; Core components of the battle engine. + +DoBattle: + xor a + ld [wBattleParticipantsNotFainted], a + ld [wBattleParticipantsIncludingFainted], a + ld [wBattlePlayerAction], a + ld [wBattleEnded], a + inc a + ld [wBattleHasJustStarted], a + ld hl, wOTPartyMon1HP + ld bc, PARTYMON_STRUCT_LENGTH - 1 + ld d, BATTLEACTION_SWITCH1 - 1 +.loop + inc d + ld a, [hli] + or [hl] + jr nz, .alive + add hl, bc + jr .loop + +.alive + ld a, d + ld [wBattleAction], a + ld a, [wLinkMode] + and a + jr z, .not_linked + + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr z, .player_2 + +.not_linked + ld a, [wBattleMode] + dec a + jr z, .wild + xor a + ld [wEnemySwitchMonIndex], a + call NewEnemyMonStatus + call ResetEnemyStatLevels + call BreakAttraction + call EnemySwitch + +.wild + ld c, 40 + call DelayFrames + +.player_2 + call LoadTilemapToTempTilemap + call CheckPlayerPartyForFitMon + ld a, d + and a + jp z, LostBattle + call SafeLoadTempTilemapToTilemap + ld a, [wBattleType] + cp BATTLETYPE_DEBUG + jp z, .tutorial_debug + cp BATTLETYPE_TUTORIAL + jp z, .tutorial_debug + xor a + ld [wCurPartyMon], a +.loop2 + call CheckIfCurPartyMonIsFitToFight + jr nz, .alive2 + ld hl, wCurPartyMon + inc [hl] + jr .loop2 + +.alive2 + ld a, [wCurBattleMon] + ld [wLastPlayerMon], a + ld a, [wCurPartyMon] + ld [wCurBattleMon], a + inc a + ld hl, wPartySpecies - 1 + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ld [wCurPartySpecies], a + ld [wTempBattleMonSpecies], a + hlcoord 1, 5 + ld a, 9 + call SlideBattlePicOut + call LoadTilemapToTempTilemap + call ResetBattleParticipants + call InitBattleMon + call ResetPlayerStatLevels + call SendOutMonText + call NewBattleMonStatus + call BreakAttraction + call SendOutPlayerMon + call EmptyBattleTextbox + call LoadTilemapToTempTilemap + call SetPlayerTurn + call SpikesDamage + ld a, [wLinkMode] + and a + jr z, .not_linked_2 + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr nz, .not_linked_2 + xor a + ld [wEnemySwitchMonIndex], a + call NewEnemyMonStatus + call ResetEnemyStatLevels + call BreakAttraction + call EnemySwitch + call SetEnemyTurn + call SpikesDamage + +.not_linked_2 + jp BattleTurn + +.tutorial_debug + jp BattleMenu + +WildFled_EnemyFled_LinkBattleCanceled: + call SafeLoadTempTilemapToTilemap + ld a, [wBattleResult] + and BATTLERESULT_BITMASK + add DRAW + ld [wBattleResult], a + ld a, [wLinkMode] + and a + ld hl, BattleText_WildFled + jr z, .print_text + + ld a, [wBattleResult] + and BATTLERESULT_BITMASK + ld [wBattleResult], a ; WIN + ld hl, BattleText_EnemyFled + call CheckMobileBattleError + jr nc, .print_text + + ld hl, wcd2a + bit 4, [hl] + jr nz, .skip_text + + ld hl, BattleText_LinkErrorBattleCanceled + +.print_text + call StdBattleTextbox + +.skip_text + call StopDangerSound + call CheckMobileBattleError + jr c, .skip_sfx + + ld de, SFX_RUN + call PlaySFX + +.skip_sfx + call SetPlayerTurn + ld a, 1 + ld [wBattleEnded], a + ret + +BattleTurn: +.loop + call Stubbed_Increments5_a89a + call CheckContestBattleOver + jp c, .quit + + xor a + ld [wPlayerIsSwitching], a + ld [wEnemyIsSwitching], a + ld [wBattleHasJustStarted], a + ld [wPlayerJustGotFrozen], a + ld [wEnemyJustGotFrozen], a + ld [wCurDamage], a + ld [wCurDamage + 1], a + + call HandleBerserkGene + call UpdateBattleMonInParty + farcall AIChooseMove + + call IsMobileBattle + jr nz, .not_disconnected + farcall Function100da5 + farcall StartMobileInactivityTimer + farcall Function100dd8 + jp c, .quit +.not_disconnected + + call CheckPlayerLockedIn + jr c, .skip_iteration +.loop1 + call BattleMenu + jr c, .quit + ld a, [wBattleEnded] + and a + jr nz, .quit + ld a, [wForcedSwitch] ; roared/whirlwinded/teleported + and a + jr nz, .quit +.skip_iteration + call ParsePlayerAction + jr nz, .loop1 + + call EnemyTriesToFlee + jr c, .quit + + call DetermineMoveOrder + jr c, .false + call Battle_EnemyFirst + jr .proceed +.false + call Battle_PlayerFirst +.proceed + call CheckMobileBattleError + jr c, .quit + + ld a, [wForcedSwitch] + and a + jr nz, .quit + + ld a, [wBattleEnded] + and a + jr nz, .quit + + call HandleBetweenTurnEffects + ld a, [wBattleEnded] + and a + jr nz, .quit + jp .loop + +.quit + ret + +Stubbed_Increments5_a89a: + ret + ld a, BANK(s5_a89a) ; MBC30 bank used by JP Crystal; inaccessible by MBC3 + call OpenSRAM + ld hl, s5_a89a + 1 ; address of MBC30 bank + inc [hl] + jr nz, .finish + dec hl + inc [hl] + jr nz, .finish + dec [hl] + inc hl + dec [hl] + +.finish + call CloseSRAM + ret + +HandleBetweenTurnEffects: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .CheckEnemyFirst + call CheckFaint_PlayerThenEnemy + ret c + call HandleFutureSight + call CheckFaint_PlayerThenEnemy + ret c + call HandleWeather + call CheckFaint_PlayerThenEnemy + ret c + call HandleWrap + call CheckFaint_PlayerThenEnemy + ret c + call HandlePerishSong + call CheckFaint_PlayerThenEnemy + ret c + jr .NoMoreFaintingConditions + +.CheckEnemyFirst: + call CheckFaint_EnemyThenPlayer + ret c + call HandleFutureSight + call CheckFaint_EnemyThenPlayer + ret c + call HandleWeather + call CheckFaint_EnemyThenPlayer + ret c + call HandleWrap + call CheckFaint_EnemyThenPlayer + ret c + call HandlePerishSong + call CheckFaint_EnemyThenPlayer + ret c + +.NoMoreFaintingConditions: + call HandleLeftovers + call HandleMysteryberry + call HandleDefrost + call HandleSafeguard + call HandleScreens + call HandleStatBoostingHeldItems + call HandleHealingItems + call UpdateBattleMonInParty + call LoadTilemapToTempTilemap + jp HandleEncore + +CheckFaint_PlayerThenEnemy: +; BUG: Perish Song and Spikes can leave a Pokemon with 0 HP and not faint (see docs/bugs_and_glitches.md) + call HasPlayerFainted + jr nz, .PlayerNotFainted + call HandlePlayerMonFaint + ld a, [wBattleEnded] + and a + jr nz, .BattleIsOver + +.PlayerNotFainted: + call HasEnemyFainted + jr nz, .BattleContinues + call HandleEnemyMonFaint + ld a, [wBattleEnded] + and a + jr nz, .BattleIsOver + +.BattleContinues: + and a + ret + +.BattleIsOver: + scf + ret + +CheckFaint_EnemyThenPlayer: +; BUG: Perish Song and Spikes can leave a Pokemon with 0 HP and not faint (see docs/bugs_and_glitches.md) + call HasEnemyFainted + jr nz, .EnemyNotFainted + call HandleEnemyMonFaint + ld a, [wBattleEnded] + and a + jr nz, .BattleIsOver + +.EnemyNotFainted: + call HasPlayerFainted + jr nz, .BattleContinues + call HandlePlayerMonFaint + ld a, [wBattleEnded] + and a + jr nz, .BattleIsOver + +.BattleContinues: + and a + ret + +.BattleIsOver: + scf + ret + +HandleBerserkGene: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .reverse + + call .player + jr .enemy + +.reverse + call .enemy + ; fallthrough + +.player + call SetPlayerTurn + ld de, wPartyMon1Item + ld a, [wCurBattleMon] + ld b, a + jr .go + +.enemy + call SetEnemyTurn + ld de, wOTPartyMon1Item + ld a, [wCurOTMon] + ld b, a + ; fallthrough + +.go + push de + push bc + callfar GetUserItem + ld a, [hl] + ld [wNamedObjectIndex], a + sub BERSERK_GENE + pop bc + pop de + ret nz + + ld [hl], a + + ld h, d + ld l, e + ld a, b + call GetPartyLocation + xor a + ld [hl], a +; BUG: Berserk Gene's confusion lasts for 256 turns or the previous Pokémon's confusion count (see docs/bugs_and_glitches.md) + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + push af + set SUBSTATUS_CONFUSED, [hl] + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVarAddr + push hl + push af + xor a + ld [hl], a + ld [wAttackMissed], a + ld [wEffectFailed], a + farcall BattleCommand_AttackUp2 + pop af + pop hl + ld [hl], a + call GetItemName + ld hl, BattleText_UsersStringBuffer1Activated + call StdBattleTextbox + callfar BattleCommand_StatUpMessage + pop af + bit SUBSTATUS_CONFUSED, a + ret nz + xor a + ld [wNumHits], a + ld de, ANIM_CONFUSED + call Call_PlayBattleAnim_OnlyIfVisible + call SwitchTurnCore + ld hl, BecameConfusedText + jp StdBattleTextbox + +EnemyTriesToFlee: + ld a, [wLinkMode] + and a + jr z, .not_linked + ld a, [wBattleAction] + cp BATTLEACTION_FORFEIT + jr z, .forfeit + +.not_linked + and a + ret + +.forfeit + call WildFled_EnemyFled_LinkBattleCanceled + scf + ret + +DetermineMoveOrder: + ld a, [wLinkMode] + and a + jr z, .use_move + ld a, [wBattleAction] + cp BATTLEACTION_STRUGGLE + jr z, .use_move + cp BATTLEACTION_SKIPTURN + jr z, .use_move + sub BATTLEACTION_SWITCH1 + jr c, .use_move + ld a, [wBattlePlayerAction] + cp BATTLEPLAYERACTION_SWITCH + jr nz, .switch + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr z, .player_2 + + call BattleRandom + cp 50 percent + 1 + jp c, .player_first + jp .enemy_first + +.player_2 + call BattleRandom + cp 50 percent + 1 + jp c, .enemy_first + jp .player_first + +.switch + callfar AI_Switch + call SetEnemyTurn + call SpikesDamage + jp .enemy_first + +.use_move + ld a, [wBattlePlayerAction] + and a ; BATTLEPLAYERACTION_USEMOVE? + jp nz, .player_first + call CompareMovePriority + jr z, .equal_priority + jp c, .player_first ; player goes first + jp .enemy_first + +.equal_priority + call SetPlayerTurn + callfar GetUserItem + push bc + callfar GetOpponentItem + pop de + ld a, d + cp HELD_QUICK_CLAW + jr nz, .player_no_quick_claw + ld a, b + cp HELD_QUICK_CLAW + jr z, .both_have_quick_claw + call BattleRandom + cp e + jr nc, .speed_check + jp .player_first + +.player_no_quick_claw + ld a, b + cp HELD_QUICK_CLAW + jr nz, .speed_check + call BattleRandom + cp c + jr nc, .speed_check + jp .enemy_first + +.both_have_quick_claw + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr z, .player_2b + call BattleRandom + cp c + jp c, .enemy_first + call BattleRandom + cp e + jp c, .player_first + jr .speed_check + +.player_2b + call BattleRandom + cp e + jp c, .player_first + call BattleRandom + cp c + jp c, .enemy_first + jr .speed_check + +.speed_check + ld de, wBattleMonSpeed + ld hl, wEnemyMonSpeed + ld c, 2 + call CompareBytes + jr z, .speed_tie + jp nc, .player_first + jp .enemy_first + +.speed_tie + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr z, .player_2c + call BattleRandom + cp 50 percent + 1 + jp c, .player_first + jp .enemy_first + +.player_2c + call BattleRandom + cp 50 percent + 1 + jp c, .enemy_first +.player_first + scf + ret + +.enemy_first + and a + ret + +CheckContestBattleOver: + ld a, [wBattleType] + cp BATTLETYPE_CONTEST + jr nz, .contest_not_over + ld a, [wParkBallsRemaining] + and a + jr nz, .contest_not_over + ld a, [wBattleResult] + and BATTLERESULT_BITMASK + add DRAW + ld [wBattleResult], a + scf + ret + +.contest_not_over + and a + ret + +CheckPlayerLockedIn: + ld a, [wPlayerSubStatus4] + and 1 << SUBSTATUS_RECHARGE + jp nz, .quit + + ld hl, wEnemySubStatus3 + res SUBSTATUS_FLINCHED, [hl] + ld hl, wPlayerSubStatus3 + res SUBSTATUS_FLINCHED, [hl] + + ld a, [hl] + and 1 << SUBSTATUS_CHARGED | 1 << SUBSTATUS_RAMPAGE + jp nz, .quit + + ld hl, wPlayerSubStatus1 + bit SUBSTATUS_ROLLOUT, [hl] + jp nz, .quit + + and a + ret + +.quit + scf + ret + +ParsePlayerAction: + call CheckPlayerLockedIn + jp c, .locked_in + ld hl, wPlayerSubStatus5 + bit SUBSTATUS_ENCORED, [hl] + jr z, .not_encored + ld a, [wLastPlayerMove] + ld [wCurPlayerMove], a + jr .encored + +.not_encored + ld a, [wBattlePlayerAction] + cp BATTLEPLAYERACTION_SWITCH + jp z, .reset_rage + and a + jr nz, .reset_bide + ld a, [wPlayerSubStatus3] + and 1 << SUBSTATUS_BIDE + jr nz, .locked_in + xor a + ld [wMoveSelectionMenuType], a + if HIGH(POUND) + ld a, HIGH(POUND) + endc + ld [wFXAnimID + 1], a + if LOW(POUND) == (HIGH(POUND) + 1) + inc a + else + ld a, LOW(POUND) + endc + ld [wFXAnimID], a + call MoveSelectionScreen + push af + call SafeLoadTempTilemapToTilemap + call UpdateBattleHuds + ld a, [wCurPlayerMove] + call GetMoveIndexFromID + ld a, h + if HIGH(STRUGGLE) + cp HIGH(STRUGGLE) + else + and a + endc + jr nz, .not_struggle + ld a, l + cp LOW(STRUGGLE) +.not_struggle + call nz, PlayClickSFX + ld a, $1 + ldh [hBGMapMode], a + pop af + ret nz + +.encored + call SetPlayerTurn + callfar UpdateMoveData + xor a + ld [wPlayerCharging], a + ld a, [wPlayerMoveStruct + MOVE_EFFECT] + cp EFFECT_FURY_CUTTER + jr z, .continue_fury_cutter + xor a + ld [wPlayerFuryCutterCount], a + +.continue_fury_cutter + ld a, [wPlayerMoveStruct + MOVE_EFFECT] + cp EFFECT_RAGE + jr z, .continue_rage + ld hl, wPlayerSubStatus4 + res SUBSTATUS_RAGE, [hl] + xor a + ld [wPlayerRageCounter], a + +.continue_rage + ld a, [wPlayerMoveStruct + MOVE_EFFECT] + cp EFFECT_PROTECT + jr z, .continue_protect + cp EFFECT_ENDURE + jr z, .continue_protect + xor a + ld [wPlayerProtectCount], a + jr .continue_protect + +.reset_bide + ld hl, wPlayerSubStatus3 + res SUBSTATUS_BIDE, [hl] + +.locked_in + xor a + ld [wPlayerFuryCutterCount], a + ld [wPlayerProtectCount], a + ld [wPlayerRageCounter], a + ld hl, wPlayerSubStatus4 + res SUBSTATUS_RAGE, [hl] + +.continue_protect + call ParseEnemyAction + xor a + ret + +.reset_rage + xor a + ld [wPlayerFuryCutterCount], a + ld [wPlayerProtectCount], a + ld [wPlayerRageCounter], a + ld hl, wPlayerSubStatus4 + res SUBSTATUS_RAGE, [hl] + xor a + ret + +HandleEncore: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .player_1 + call .do_player + jr .do_enemy + +.player_1 + call .do_enemy +.do_player + ld hl, wPlayerSubStatus5 + bit SUBSTATUS_ENCORED, [hl] + ret z + ld a, [wPlayerEncoreCount] + dec a + ld [wPlayerEncoreCount], a + jr z, .end_player_encore + ld hl, wBattleMonPP + ld a, [wCurMoveNum] + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + and PP_MASK + ret nz + +.end_player_encore + ld hl, wPlayerSubStatus5 + res SUBSTATUS_ENCORED, [hl] + call SetEnemyTurn + ld hl, BattleText_TargetsEncoreEnded + jp StdBattleTextbox + +.do_enemy + ld hl, wEnemySubStatus5 + bit SUBSTATUS_ENCORED, [hl] + ret z + ld a, [wEnemyEncoreCount] + dec a + ld [wEnemyEncoreCount], a + jr z, .end_enemy_encore + ld hl, wEnemyMonPP + ld a, [wCurEnemyMoveNum] + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + and PP_MASK + ret nz + +.end_enemy_encore + ld hl, wEnemySubStatus5 + res SUBSTATUS_ENCORED, [hl] + call SetPlayerTurn + ld hl, BattleText_TargetsEncoreEnded + jp StdBattleTextbox + +TryEnemyFlee: + ld a, [wBattleMode] + dec a + jr nz, .Stay + + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_CANT_RUN, a + jr nz, .Stay + + ld a, [wEnemyWrapCount] + and a + jr nz, .Stay + + ld a, [wEnemyMonStatus] + and 1 << FRZ | SLP_MASK + jr nz, .Stay + + ld a, [wTempEnemyMonSpecies] + call GetPokemonIndexFromID + ld b, h + ld c, l + ld de, 2 + ld hl, AlwaysFleeMons + call IsInWordArray + jr c, .Flee + + call BattleRandom + add a, a + jr nc, .Stay + + push af + ; de preserved from last call + ld hl, OftenFleeMons + call IsInWordArray + pop de + jr c, .Flee + + ld a, d + cp 20 percent ; double the value because of the previous add a, a + jr nc, .Stay + + ld de, 2 + ld hl, SometimesFleeMons + call IsInWordArray + jr c, .Flee + +.Stay: + and a + ret + +.Flee: + scf + ret + +INCLUDE "data/wild/flee_mons.asm" + +CompareMovePriority: +; Compare the priority of the player and enemy's moves. +; Return carry if the player goes first, or z if they match. + + ld a, [wCurPlayerMove] + call GetMovePriority + ld b, a + push bc + ld a, [wCurEnemyMove] + call GetMovePriority + pop bc + cp b + ret + +GetMovePriority: +; Return the priority (0-3) of move a. + + ld b, a + + ; Vital Throw goes last. + call GetMoveIndexFromID + ld a, h + if HIGH(VITAL_THROW) + cp HIGH(VITAL_THROW) + else + and a + endc + jr nz, .not_vital_throw + ld a, l + sub LOW(VITAL_THROW) + ret z + +.not_vital_throw + call GetMoveEffect + ld hl, MoveEffectPriorities +.loop + ld a, [hli] + cp b + jr z, .done + inc hl + cp -1 + jr nz, .loop + + ld a, BASE_PRIORITY + ret + +.done + ld a, [hl] + ret + +INCLUDE "data/moves/effects_priorities.asm" + +GetMoveEffect: + ld l, b + ld a, MOVE_EFFECT + call GetMoveAttribute + ld b, a + ret + +Battle_EnemyFirst: + call LoadTilemapToTempTilemap + call TryEnemyFlee + jp c, WildFled_EnemyFled_LinkBattleCanceled + call SetEnemyTurn + ld a, $1 + ld [wEnemyGoesFirst], a + callfar AI_SwitchOrTryItem + jr c, .switch_item + call EnemyTurn_EndOpponentProtectEndureDestinyBond + call CheckMobileBattleError + ret c + ld a, [wForcedSwitch] + and a + ret nz + call HasPlayerFainted + jp z, HandlePlayerMonFaint + call HasEnemyFainted + jp z, HandleEnemyMonFaint + +.switch_item + call SetEnemyTurn + call ResidualDamage + jp z, HandleEnemyMonFaint + call RefreshBattleHuds + call PlayerTurn_EndOpponentProtectEndureDestinyBond + call CheckMobileBattleError + ret c + ld a, [wForcedSwitch] + and a + ret nz + call HasEnemyFainted + jp z, HandleEnemyMonFaint + call HasPlayerFainted + jp z, HandlePlayerMonFaint + call SetPlayerTurn + call ResidualDamage + jp z, HandlePlayerMonFaint + call RefreshBattleHuds + xor a ; BATTLEPLAYERACTION_USEMOVE + ld [wBattlePlayerAction], a + ret + +Battle_PlayerFirst: + xor a + ld [wEnemyGoesFirst], a + call SetEnemyTurn + callfar AI_SwitchOrTryItem + push af + call PlayerTurn_EndOpponentProtectEndureDestinyBond + pop bc + ld a, [wForcedSwitch] + and a + ret nz + call CheckMobileBattleError + ret c + call HasEnemyFainted + jp z, HandleEnemyMonFaint + call HasPlayerFainted + jp z, HandlePlayerMonFaint + push bc + call SetPlayerTurn + call ResidualDamage + pop bc + jp z, HandlePlayerMonFaint + push bc + call RefreshBattleHuds + pop af + jr c, .switched_or_used_item + call LoadTilemapToTempTilemap + call TryEnemyFlee + jp c, WildFled_EnemyFled_LinkBattleCanceled + call EnemyTurn_EndOpponentProtectEndureDestinyBond + call CheckMobileBattleError + ret c + ld a, [wForcedSwitch] + and a + ret nz + call HasPlayerFainted + jp z, HandlePlayerMonFaint + call HasEnemyFainted + jp z, HandleEnemyMonFaint + +.switched_or_used_item + call SetEnemyTurn + call ResidualDamage + jp z, HandleEnemyMonFaint + call RefreshBattleHuds + xor a ; BATTLEPLAYERACTION_USEMOVE + ld [wBattlePlayerAction], a + ret + +PlayerTurn_EndOpponentProtectEndureDestinyBond: + call SetPlayerTurn + call EndUserDestinyBond + callfar DoPlayerTurn + jp EndOpponentProtectEndureDestinyBond + +EnemyTurn_EndOpponentProtectEndureDestinyBond: + call SetEnemyTurn + call EndUserDestinyBond + callfar DoEnemyTurn + jp EndOpponentProtectEndureDestinyBond + +EndOpponentProtectEndureDestinyBond: + ld a, BATTLE_VARS_SUBSTATUS1_OPP + call GetBattleVarAddr + res SUBSTATUS_PROTECT, [hl] + res SUBSTATUS_ENDURE, [hl] + ld a, BATTLE_VARS_SUBSTATUS5_OPP + call GetBattleVarAddr + res SUBSTATUS_DESTINY_BOND, [hl] + ret + +EndUserDestinyBond: + ld a, BATTLE_VARS_SUBSTATUS5 + call GetBattleVarAddr + res SUBSTATUS_DESTINY_BOND, [hl] + ret + +HasUserFainted: + ldh a, [hBattleTurn] + and a + jr z, HasPlayerFainted +HasEnemyFainted: + ld hl, wEnemyMonHP + jr CheckIfHPIsZero + +HasPlayerFainted: + ld hl, wBattleMonHP + +CheckIfHPIsZero: + ld a, [hli] + or [hl] + ret + +ResidualDamage: +; Return z if the user fainted before +; or as a result of residual damage. +; For Sandstorm damage, see HandleWeather. + + call HasUserFainted + ret z + + ld a, BATTLE_VARS_STATUS + call GetBattleVar + and 1 << PSN | 1 << BRN + jr z, .did_psn_brn + + ld hl, HurtByPoisonText + ld de, ANIM_PSN + and 1 << BRN + jr z, .got_anim + ld hl, HurtByBurnText + ld de, ANIM_BRN +.got_anim + + push de + call StdBattleTextbox + pop de + + xor a + ld [wNumHits], a + call Call_PlayBattleAnim_OnlyIfVisible + call GetEighthMaxHP + ld de, wPlayerToxicCount + ldh a, [hBattleTurn] + and a + jr z, .check_toxic + ld de, wEnemyToxicCount +.check_toxic + + ld a, BATTLE_VARS_SUBSTATUS5 + call GetBattleVar + bit SUBSTATUS_TOXIC, a + jr z, .did_toxic + call GetSixteenthMaxHP + ld a, [de] + inc a + ld [de], a + ld hl, 0 +.add + add hl, bc + dec a + jr nz, .add + ld b, h + ld c, l +.did_toxic + + call SubtractHPFromUser +.did_psn_brn + + call HasUserFainted + jp z, .fainted + + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVarAddr + bit SUBSTATUS_LEECH_SEED, [hl] + jr z, .not_seeded + + call SwitchTurnCore + xor a + ld [wNumHits], a + ld de, ANIM_SAP + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVar + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + call z, Call_PlayBattleAnim_OnlyIfVisible + call SwitchTurnCore + + call GetEighthMaxHP + call SubtractHPFromUser + ld a, $1 + ldh [hBGMapMode], a + call RestoreHP + ld hl, LeechSeedSapsText + call StdBattleTextbox +.not_seeded + + call HasUserFainted + jr z, .fainted + + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVarAddr + bit SUBSTATUS_NIGHTMARE, [hl] + jr z, .not_nightmare + xor a + ld [wNumHits], a + ld de, ANIM_IN_NIGHTMARE + call Call_PlayBattleAnim_OnlyIfVisible + call GetQuarterMaxHP + call SubtractHPFromUser + ld hl, HasANightmareText + call StdBattleTextbox +.not_nightmare + + call HasUserFainted + jr z, .fainted + + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVarAddr + bit SUBSTATUS_CURSE, [hl] + jr z, .not_cursed + + xor a + ld [wNumHits], a + ld de, ANIM_IN_NIGHTMARE + call Call_PlayBattleAnim_OnlyIfVisible + call GetQuarterMaxHP + call SubtractHPFromUser + ld hl, HurtByCurseText + call StdBattleTextbox + +.not_cursed + ld hl, wBattleMonHP + ldh a, [hBattleTurn] + and a + jr z, .check_fainted + ld hl, wEnemyMonHP + +.check_fainted + ld a, [hli] + or [hl] + ret nz + +.fainted + call RefreshBattleHuds + ld c, 20 + call DelayFrames + xor a + ret + +HandlePerishSong: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .EnemyFirst + call SetPlayerTurn + call .do_it + call SetEnemyTurn + jp .do_it + +.EnemyFirst: + call SetEnemyTurn + call .do_it + call SetPlayerTurn + +.do_it + ld hl, wPlayerPerishCount + ldh a, [hBattleTurn] + and a + jr z, .got_count + ld hl, wEnemyPerishCount + +.got_count + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVar + bit SUBSTATUS_PERISH, a + ret z + dec [hl] + ld a, [hl] + ld [wTextDecimalByte], a + push af + ld hl, PerishCountText + call StdBattleTextbox + pop af + ret nz + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVarAddr + res SUBSTATUS_PERISH, [hl] + ldh a, [hBattleTurn] + and a + jr nz, .kill_enemy + ld hl, wBattleMonHP + xor a + ld [hli], a + ld [hl], a + ld hl, wPartyMon1HP + ld a, [wCurBattleMon] + call GetPartyLocation + xor a + ld [hli], a + ld [hl], a + ret + +.kill_enemy + ld hl, wEnemyMonHP + xor a + ld [hli], a + ld [hl], a + ld a, [wBattleMode] + dec a + ret z + ld hl, wOTPartyMon1HP + ld a, [wCurOTMon] + call GetPartyLocation + xor a + ld [hli], a + ld [hl], a + ret + +HandleWrap: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .EnemyFirst + call SetPlayerTurn + call .do_it + call SetEnemyTurn + jp .do_it + +.EnemyFirst: + call SetEnemyTurn + call .do_it + call SetPlayerTurn + +.do_it + ld hl, wPlayerWrapCount + ld de, wPlayerTrappingMove + ldh a, [hBattleTurn] + and a + jr z, .got_addrs + ld hl, wEnemyWrapCount + ld de, wEnemyTrappingMove + +.got_addrs + ld a, [hl] + and a + ret z + + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVar + bit SUBSTATUS_SUBSTITUTE, a + ret nz + + ld a, [de] + ld [wNamedObjectIndex], a + push hl + call GetMoveIndexFromID + ld a, l + ld [wFXAnimID], a + ld a, h + ld [wFXAnimID + 1], a + pop hl + call GetMoveName + dec [hl] + jr z, .release_from_bounds + + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVar + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + jr nz, .skip_anim + + call SwitchTurnCore + xor a + ld [wNumHits], a + predef PlayBattleAnim + call SwitchTurnCore + +.skip_anim + call GetSixteenthMaxHP + call SubtractHPFromUser + ld hl, BattleText_UsersHurtByStringBuffer1 + jr .print_text + +.release_from_bounds + ld hl, BattleText_UserWasReleasedFromStringBuffer1 + +.print_text + jp StdBattleTextbox + +SwitchTurnCore: + ldh a, [hBattleTurn] + xor 1 + ldh [hBattleTurn], a + ret + +HandleLeftovers: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .DoEnemyFirst + call SetPlayerTurn + call .do_it + call SetEnemyTurn + jp .do_it + +.DoEnemyFirst: + call SetEnemyTurn + call .do_it + call SetPlayerTurn +.do_it + + callfar GetUserItem + ld a, [hl] + ld [wNamedObjectIndex], a + call GetItemName + ld a, b + cp HELD_LEFTOVERS + ret nz + + ld hl, wBattleMonHP + ldh a, [hBattleTurn] + and a + jr z, .got_hp + ld hl, wEnemyMonHP + +.got_hp +; Don't restore if we're already at max HP + ld a, [hli] + ld b, a + ld a, [hli] + ld c, a + ld a, [hli] + cp b + jr nz, .restore + ld a, [hl] + cp c + ret z + +.restore + call GetSixteenthMaxHP + call SwitchTurnCore + call RestoreHP + ld hl, BattleText_TargetRecoveredWithItem + jp StdBattleTextbox + +HandleMysteryberry: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .DoEnemyFirst + call SetPlayerTurn + call .do_it + call SetEnemyTurn + jp .do_it + +.DoEnemyFirst: + call SetEnemyTurn + call .do_it + call SetPlayerTurn + +.do_it + callfar GetUserItem + ld a, b + cp HELD_RESTORE_PP + jr nz, .quit + ld hl, wPartyMon1PP + ld a, [wCurBattleMon] + call GetPartyLocation + ld d, h + ld e, l + ld hl, wPartyMon1Moves + ld a, [wCurBattleMon] + call GetPartyLocation + ldh a, [hBattleTurn] + and a + jr z, .wild + ld de, wWildMonPP + ld hl, wWildMonMoves + ld a, [wBattleMode] + dec a + jr z, .wild + ld hl, wOTPartyMon1PP + ld a, [wCurOTMon] + call GetPartyLocation + ld d, h + ld e, l + ld hl, wOTPartyMon1Moves + ld a, [wCurOTMon] + call GetPartyLocation + +.wild + ld c, $0 +.loop + ld a, [hl] + and a + jr z, .quit + ld a, [de] + and PP_MASK + jr z, .restore + inc hl + inc de + inc c + ld a, c + cp NUM_MOVES + jr nz, .loop + +.quit + ret + +.restore + ; lousy hack + ld a, [hl] + push hl + call GetMoveIndexFromID + ld a, h + if HIGH(SKETCH) + cp HIGH(SKETCH) + else + and a + endc + ld a, l + pop hl + ld b, 5 + jr nz, .not_sketch + cp LOW(SKETCH) + jr nz, .not_sketch + ld b, 1 +.not_sketch + ld a, [de] + add b + ld [de], a + push bc + push bc + ld a, [hl] + ld [wTempByteValue], a + ld de, wBattleMonMoves - 1 + ld hl, wBattleMonPP + ldh a, [hBattleTurn] + and a + jr z, .player_pp + ld de, wEnemyMonMoves - 1 + ld hl, wEnemyMonPP +.player_pp + inc de + pop bc + ld b, 0 + add hl, bc + push hl + ld h, d + ld l, e + add hl, bc + pop de + pop bc + + ld a, [wTempByteValue] + cp [hl] + jr nz, .skip_checks + ldh a, [hBattleTurn] + and a + ld a, [wPlayerSubStatus5] + jr z, .check_transform + ld a, [wEnemySubStatus5] +.check_transform + bit SUBSTATUS_TRANSFORMED, a + jr nz, .skip_checks + ld a, [de] + add b + ld [de], a +.skip_checks + callfar GetUserItem + ld a, [hl] + ld [wNamedObjectIndex], a + xor a + ld [hl], a + call GetPartymonItem + ldh a, [hBattleTurn] + and a + jr z, .consume_item + ld a, [wBattleMode] + dec a + jr z, .skip_consumption + call GetOTPartymonItem + +.consume_item + xor a + ld [hl], a + +.skip_consumption + call GetItemName + call SwitchTurnCore + call ItemRecoveryAnim + call SwitchTurnCore + ld hl, BattleText_UserRecoveredPPUsing + jp StdBattleTextbox + +HandleFutureSight: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .enemy_first + call SetPlayerTurn + call .do_it + call SetEnemyTurn + jp .do_it + +.enemy_first + call SetEnemyTurn + call .do_it + call SetPlayerTurn + +.do_it + ld hl, wPlayerFutureSightCount + ldh a, [hBattleTurn] + and a + jr z, .okay + ld hl, wEnemyFutureSightCount + +.okay + ld a, [hl] + and a + ret z + dec a + ld [hl], a + cp $1 + ret nz + + ld hl, BattleText_TargetWasHitByFutureSight + call StdBattleTextbox + + ld a, BATTLE_VARS_MOVE + call GetBattleVarAddr + push af + push hl + ld hl, FUTURE_SIGHT + call GetMoveIDFromIndex + pop hl + ld [hl], a + + callfar UpdateMoveData + xor a + ld [wAttackMissed], a + ld [wAlreadyDisobeyed], a + ld a, EFFECTIVE + ld [wTypeModifier], a + callfar DoMove + xor a + ld [wCurDamage], a + ld [wCurDamage + 1], a + + ld a, BATTLE_VARS_MOVE + call GetBattleVarAddr + pop af + ld [hl], a + + call UpdateBattleMonInParty + jp UpdateEnemyMonInParty + +HandleDefrost: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .enemy_first + call .do_player_turn + jr .do_enemy_turn + +.enemy_first + call .do_enemy_turn +.do_player_turn + ld a, [wBattleMonStatus] + bit FRZ, a + ret z + + ld a, [wPlayerJustGotFrozen] + and a + ret nz + + call BattleRandom + cp 10 percent + ret nc + xor a + ld [wBattleMonStatus], a + ld a, [wCurBattleMon] + ld hl, wPartyMon1Status + call GetPartyLocation + ld [hl], 0 + call UpdateBattleHuds + call SetEnemyTurn + ld hl, DefrostedOpponentText + jp StdBattleTextbox + +.do_enemy_turn + ld a, [wEnemyMonStatus] + bit FRZ, a + ret z + ld a, [wEnemyJustGotFrozen] + and a + ret nz + call BattleRandom + cp 10 percent + ret nc + xor a + ld [wEnemyMonStatus], a + + ld a, [wBattleMode] + dec a + jr z, .wild + ld a, [wCurOTMon] + ld hl, wOTPartyMon1Status + call GetPartyLocation + ld [hl], 0 +.wild + + call UpdateBattleHuds + call SetPlayerTurn + ld hl, DefrostedOpponentText + jp StdBattleTextbox + +HandleSafeguard: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .player1 + call .CheckPlayer + jr .CheckEnemy + +.player1 + call .CheckEnemy +.CheckPlayer: + ld a, [wPlayerScreens] + bit SCREENS_SAFEGUARD, a + ret z + ld hl, wPlayerSafeguardCount + dec [hl] + ret nz + res SCREENS_SAFEGUARD, a + ld [wPlayerScreens], a + xor a + jr .print + +.CheckEnemy: + ld a, [wEnemyScreens] + bit SCREENS_SAFEGUARD, a + ret z + ld hl, wEnemySafeguardCount + dec [hl] + ret nz + res SCREENS_SAFEGUARD, a + ld [wEnemyScreens], a + ld a, $1 + +.print + ldh [hBattleTurn], a + ld hl, BattleText_SafeguardFaded + jp StdBattleTextbox + +HandleScreens: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .Both + call .CheckPlayer + jr .CheckEnemy + +.Both: + call .CheckEnemy + +.CheckPlayer: + call SetPlayerTurn + ld de, .Your + call .Copy + ld hl, wPlayerScreens + ld de, wPlayerLightScreenCount + jr .TickScreens + +.CheckEnemy: + call SetEnemyTurn + ld de, .Enemy + call .Copy + ld hl, wEnemyScreens + ld de, wEnemyLightScreenCount + +.TickScreens: + bit SCREENS_LIGHT_SCREEN, [hl] + call nz, .LightScreenTick + bit SCREENS_REFLECT, [hl] + call nz, .ReflectTick + ret + +.Copy: + ld hl, wStringBuffer1 + jp CopyName2 + +.Your: + db "Your@" +.Enemy: + db "Enemy@" + +.LightScreenTick: + ld a, [de] + dec a + ld [de], a + ret nz + res SCREENS_LIGHT_SCREEN, [hl] + push hl + push de + ld hl, BattleText_MonsLightScreenFell + call StdBattleTextbox + pop de + pop hl + ret + +.ReflectTick: + inc de + ld a, [de] + dec a + ld [de], a + ret nz + res SCREENS_REFLECT, [hl] + ld hl, BattleText_MonsReflectFaded + jp StdBattleTextbox + +HandleWeather: + ld a, [wBattleWeather] + cp WEATHER_NONE + ret z + + ld hl, wWeatherCount + dec [hl] + jr z, .ended + + ld hl, .WeatherMessages + call .PrintWeatherMessage + + ld a, [wBattleWeather] + cp WEATHER_SANDSTORM + ret nz + + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .enemy_first + +; player first + call SetPlayerTurn + call .SandstormDamage + call SetEnemyTurn + jr .SandstormDamage + +.enemy_first + call SetEnemyTurn + call .SandstormDamage + call SetPlayerTurn + +.SandstormDamage: + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVar + bit SUBSTATUS_UNDERGROUND, a + ret nz + + ld hl, wBattleMonType1 + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wEnemyMonType1 +.ok + ld a, [hli] + cp ROCK + ret z + cp GROUND + ret z + cp STEEL + ret z + + ld a, [hl] + cp ROCK + ret z + cp GROUND + ret z + cp STEEL + ret z + + call SwitchTurnCore + xor a + ld [wNumHits], a + ld de, ANIM_IN_SANDSTORM + call Call_PlayBattleAnim + call SwitchTurnCore + call GetEighthMaxHP + call SubtractHPFromUser + + ld hl, SandstormHitsText + jp StdBattleTextbox + +.ended + ld hl, .WeatherEndedMessages + call .PrintWeatherMessage + xor a + ld [wBattleWeather], a + ret + +.PrintWeatherMessage: + ld a, [wBattleWeather] + dec a + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + jp StdBattleTextbox + +.WeatherMessages: +; entries correspond to WEATHER_* constants + dw BattleText_RainContinuesToFall + dw BattleText_TheSunlightIsStrong + dw BattleText_TheSandstormRages + +.WeatherEndedMessages: +; entries correspond to WEATHER_* constants + dw BattleText_TheRainStopped + dw BattleText_TheSunlightFaded + dw BattleText_TheSandstormSubsided + +SubtractHPFromTarget: + call SubtractHP + jp UpdateHPBar + +SubtractHPFromUser: +; Subtract HP from mon + call SubtractHP + jp UpdateHPBarBattleHuds + +SubtractHP: + ld hl, wBattleMonHP + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wEnemyMonHP +.ok + inc hl + ld a, [hl] + ld [wHPBuffer2], a + sub c + ld [hld], a + ld [wHPBuffer3], a + ld a, [hl] + ld [wHPBuffer2 + 1], a + sbc b + ld [hl], a + ld [wHPBuffer3 + 1], a + ret nc + + ld a, [wHPBuffer2] + ld c, a + ld a, [wHPBuffer2 + 1] + ld b, a + xor a + ld [hli], a + ld [hl], a + ld [wHPBuffer3], a + ld [wHPBuffer3 + 1], a + ret + +GetSixteenthMaxHP: + call GetQuarterMaxHP +; quarter result + srl c + srl c +; at least 1 + ld a, c + and a + jr nz, .ok + inc c +.ok + ret + +GetEighthMaxHP: +; output: bc + call GetQuarterMaxHP +; assumes nothing can have 1024 or more hp +; halve result + srl c +; at least 1 + ld a, c + and a + jr nz, .end + inc c +.end + ret + +GetQuarterMaxHP: +; output: bc + call GetMaxHP + +; quarter result + srl b + rr c + srl b + rr c + +; assumes nothing can have 1024 or more hp +; at least 1 + ld a, c + and a + jr nz, .end + inc c +.end + ret + +GetHalfMaxHP: +; output: bc + call GetMaxHP + +; halve result + srl b + rr c + +; at least 1 + ld a, c + or b + jr nz, .end + inc c +.end + ret + +GetMaxHP: +; output: bc, wHPBuffer1 + + ld hl, wBattleMonMaxHP + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wEnemyMonMaxHP +.ok + ld a, [hli] + ld [wHPBuffer1 + 1], a + ld b, a + + ld a, [hl] + ld [wHPBuffer1], a + ld c, a + ret + +GetHalfHP: ; unreferenced + ld hl, wBattleMonHP + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wEnemyMonHP +.ok + ld a, [hli] + ld b, a + ld a, [hli] + ld c, a + srl b + rr c + ld a, [hli] + ld [wHPBuffer1 + 1], a + ld a, [hl] + ld [wHPBuffer1], a + ret + +CheckUserHasEnoughHP: + ld hl, wBattleMonHP + 1 + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wEnemyMonHP + 1 +.ok + ld a, c + sub [hl] + dec hl + ld a, b + sbc [hl] + ret + +RestoreHP: + ld hl, wEnemyMonMaxHP + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wBattleMonMaxHP +.ok + ld a, [hli] + ld [wHPBuffer1 + 1], a + ld a, [hld] + ld [wHPBuffer1], a + dec hl + ld a, [hl] + ld [wHPBuffer2], a + add c + ld [hld], a + ld [wHPBuffer3], a + ld a, [hl] + ld [wHPBuffer2 + 1], a + adc b + ld [hli], a + ld [wHPBuffer3 + 1], a + + ld a, [wHPBuffer1] + ld c, a + ld a, [hld] + sub c + ld a, [wHPBuffer1 + 1] + ld b, a + ld a, [hl] + sbc b + jr c, .overflow + ld a, b + ld [hli], a + ld [wHPBuffer3 + 1], a + ld a, c + ld [hl], a + ld [wHPBuffer3], a +.overflow + + call SwitchTurnCore + call UpdateHPBarBattleHuds + jp SwitchTurnCore + +UpdateHPBarBattleHuds: + call UpdateHPBar + jp UpdateBattleHuds + +UpdateHPBar: + hlcoord 10, 9 + ldh a, [hBattleTurn] + and a + ld a, 1 + jr z, .ok + hlcoord 2, 2 + xor a +.ok + push bc + ld [wWhichHPBar], a + predef AnimateHPBar + pop bc + ret + +HandleEnemyMonFaint: + call FaintEnemyPokemon + ld hl, wBattleMonHP + ld a, [hli] + or [hl] + call z, FaintYourPokemon + xor a + ld [wWhichMonFaintedFirst], a + call UpdateBattleStateAndExperienceAfterEnemyFaint + call CheckPlayerPartyForFitMon + ld a, d + and a + jp z, LostBattle + + ld hl, wBattleMonHP + ld a, [hli] + or [hl] + call nz, UpdatePlayerHUD + + ld a, $1 + ldh [hBGMapMode], a + ld c, 60 + call DelayFrames + + ld a, [wBattleMode] + dec a + jr nz, .trainer + + ld a, 1 + ld [wBattleEnded], a + ret + +.trainer + call CheckEnemyTrainerDefeated + jp z, WinTrainerBattle + + ld hl, wBattleMonHP + ld a, [hli] + or [hl] + jr nz, .player_mon_not_fainted + + call AskUseNextPokemon + jr nc, .dont_flee + + ld a, 1 + ld [wBattleEnded], a + ret + +.dont_flee + call ForcePlayerMonChoice + call CheckMobileBattleError + jp c, WildFled_EnemyFled_LinkBattleCanceled + + ld a, BATTLEPLAYERACTION_USEITEM + ld [wBattlePlayerAction], a + call HandleEnemySwitch + jp z, WildFled_EnemyFled_LinkBattleCanceled + jr DoubleSwitch + +.player_mon_not_fainted + ld a, BATTLEPLAYERACTION_USEITEM + ld [wBattlePlayerAction], a + call HandleEnemySwitch + jp z, WildFled_EnemyFled_LinkBattleCanceled + xor a ; BATTLEPLAYERACTION_USEMOVE + ld [wBattlePlayerAction], a + ret + +DoubleSwitch: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .player_1 + call ClearSprites + hlcoord 1, 0 + lb bc, 4, 10 + call ClearBox + call PlayerPartyMonEntrance + ld a, $1 + call EnemyPartyMonEntrance + jr .done + +.player_1 + ld a, [wCurPartyMon] + push af + ld a, $1 + call EnemyPartyMonEntrance + call ClearSprites + call LoadTilemapToTempTilemap + pop af + ld [wCurPartyMon], a + call PlayerPartyMonEntrance + +.done + xor a ; BATTLEPLAYERACTION_USEMOVE + ld [wBattlePlayerAction], a + ret + +UpdateBattleStateAndExperienceAfterEnemyFaint: + call UpdateBattleMonInParty + ld a, [wBattleMode] + dec a + jr z, .wild + ld a, [wCurOTMon] + ld hl, wOTPartyMon1HP + call GetPartyLocation + xor a + ld [hli], a + ld [hl], a + +.wild + ld hl, wPlayerSubStatus3 + res SUBSTATUS_IN_LOOP, [hl] + xor a + ld hl, wEnemyDamageTaken + ld [hli], a + ld [hl], a + call NewEnemyMonStatus + call BreakAttraction + ld a, [wBattleMode] + dec a + jr z, .wild2 + jr .trainer + +.wild2 + call StopDangerSound + ld a, $1 + ld [wBattleLowHealthAlarm], a + +.trainer + ld hl, wBattleMonHP + ld a, [hli] + or [hl] + jr nz, .player_mon_did_not_faint + ld a, [wWhichMonFaintedFirst] + and a + jr nz, .player_mon_did_not_faint + call UpdateFaintedPlayerMon + +.player_mon_did_not_faint + call CheckPlayerPartyForFitMon + ld a, d + and a + ret z + ld a, [wBattleMode] + dec a + call z, PlayVictoryMusic + call EmptyBattleTextbox + call LoadTilemapToTempTilemap + ld a, [wBattleResult] + and BATTLERESULT_BITMASK + ld [wBattleResult], a ; WIN + call IsAnyMonHoldingExpShare + jr z, .skip_exp + ld hl, wEnemyMonBaseStats + ld b, wEnemyMonEnd - wEnemyMonBaseStats +.loop + srl [hl] + inc hl + dec b + jr nz, .loop + +.skip_exp + ld hl, wEnemyMonBaseStats + ld de, wBackupEnemyMonBaseStats + ld bc, wEnemyMonEnd - wEnemyMonBaseStats + call CopyBytes + xor a + ld [wGivingExperienceToExpShareHolders], a + call GiveExperiencePoints + call IsAnyMonHoldingExpShare + ret z + + ld a, [wBattleParticipantsNotFainted] + push af + ld a, d + ld [wBattleParticipantsNotFainted], a + ld hl, wBackupEnemyMonBaseStats + ld de, wEnemyMonBaseStats + ld bc, wEnemyMonEnd - wEnemyMonBaseStats + call CopyBytes + ld a, $1 + ld [wGivingExperienceToExpShareHolders], a + call GiveExperiencePoints + pop af + ld [wBattleParticipantsNotFainted], a + ret + +IsAnyMonHoldingExpShare: + ld a, [wPartyCount] + ld b, a + ld hl, wPartyMon1 + ld c, 1 + ld d, 0 +.loop + push hl + push bc + ld bc, MON_HP + add hl, bc + ld a, [hli] + or [hl] + pop bc + pop hl + jr z, .next + + push hl + push bc + ld bc, MON_ITEM + add hl, bc + pop bc + ld a, [hl] + pop hl + + cp EXP_SHARE + jr nz, .next + ld a, d + or c + ld d, a + +.next + sla c + push de + ld de, PARTYMON_STRUCT_LENGTH + add hl, de + pop de + dec b + jr nz, .loop + + ld a, d + ld e, 0 + ld b, PARTY_LENGTH +.loop2 + srl a + jr nc, .okay + inc e + +.okay + dec b + jr nz, .loop2 + ld a, e + and a + ret + +StopDangerSound: + xor a + ld [wLowHealthAlarm], a + ret + +FaintYourPokemon: + call StopDangerSound + call WaitSFX + ld a, $f0 + ld [wCryTracks], a + ld a, [wBattleMonSpecies] + call PlayStereoCry + call PlayerMonFaintedAnimation + hlcoord 9, 7 + lb bc, 5, 11 + call ClearBox + ld hl, BattleText_MonFainted + jp StdBattleTextbox + +FaintEnemyPokemon: + call WaitSFX + ld de, SFX_KINESIS + call PlaySFX + call EnemyMonFaintedAnimation + ld de, SFX_FAINT + call PlaySFX + hlcoord 1, 0 + lb bc, 4, 10 + call ClearBox + ld hl, BattleText_EnemyMonFainted + jp StdBattleTextbox + +CheckEnemyTrainerDefeated: + ld a, [wOTPartyCount] + ld b, a + xor a + ld hl, wOTPartyMon1HP + ld de, PARTYMON_STRUCT_LENGTH + +.loop + or [hl] + inc hl + or [hl] + dec hl + add hl, de + dec b + jr nz, .loop + + and a + ret + +HandleEnemySwitch: + ld hl, wEnemyHPPal + ld e, HP_BAR_LENGTH_PX + call UpdateHPPal + call WaitBGMap + farcall EnemySwitch_TrainerHud + ld a, [wLinkMode] + and a + jr z, .not_linked + + call LinkBattleSendReceiveAction + ld a, [wBattleAction] + cp BATTLEACTION_FORFEIT + ret z + + call SafeLoadTempTilemapToTilemap + +.not_linked + ld hl, wBattleMonHP + ld a, [hli] + or [hl] + ld a, $0 + jr nz, EnemyPartyMonEntrance + inc a + ret + +EnemyPartyMonEntrance: + push af + xor a + ld [wEnemySwitchMonIndex], a + call NewEnemyMonStatus + call ResetEnemyStatLevels + call BreakAttraction + pop af + and a + jr nz, .set + call EnemySwitch + jr .done_switch + +.set + call EnemySwitch_SetMode +.done_switch + call ResetBattleParticipants + call SetEnemyTurn + call SpikesDamage + xor a + ld [wEnemyMoveStruct + MOVE_ANIM], a + ld [wBattlePlayerAction], a + inc a + ret + +WinTrainerBattle: +; Player won the battle + call StopDangerSound + ld a, $1 + ld [wBattleLowHealthAlarm], a + ld [wBattleEnded], a + ld a, [wLinkMode] + and a + ld a, b + call z, PlayVictoryMusic + callfar Battle_GetTrainerName + ld hl, BattleText_EnemyWasDefeated + call StdBattleTextbox + + call IsMobileBattle + jr z, .mobile + ld a, [wLinkMode] + and a + ret nz + + ld a, [wInBattleTowerBattle] + bit 0, a + jr nz, .battle_tower + + call BattleWinSlideInEnemyTrainerFrontpic + ld c, 40 + call DelayFrames + + ld a, [wBattleType] + cp BATTLETYPE_CANLOSE + jr nz, .skip_heal + predef HealParty +.skip_heal + + ld a, [wDebugFlags] + bit DEBUG_BATTLE_F, a + jr nz, .skip_win_loss_text + call PrintWinLossText +.skip_win_loss_text + + jp .give_money + +.mobile + call BattleWinSlideInEnemyTrainerFrontpic + ld c, 40 + call DelayFrames + ld c, $4 ; win + farcall Mobile_PrintOpponentBattleMessage + ret + +.battle_tower + call BattleWinSlideInEnemyTrainerFrontpic + ld c, 40 + call DelayFrames + call EmptyBattleTextbox + ld c, BATTLETOWERTEXT_LOSS_TEXT + farcall BattleTowerText + call WaitPressAorB_BlinkCursor + ld hl, wPayDayMoney + ld a, [hli] + or [hl] + inc hl + or [hl] + ret nz + call ClearTilemap + call ClearBGPalettes + ret + +.give_money + ld a, [wAmuletCoin] + and a + call nz, .DoubleReward + call .CheckMaxedOutMomMoney + push af + ld a, FALSE + jr nc, .okay + ld a, [wMomSavingMoney] + and MOM_SAVING_MONEY_MASK + cp (1 << MOM_SAVING_SOME_MONEY_F) | (1 << MOM_SAVING_HALF_MONEY_F) + jr nz, .okay + inc a ; TRUE + +.okay + ld b, a + ld c, 4 +.loop + ld a, b + and a + jr z, .loop2 + call .AddMoneyToMom + dec c + dec b + jr .loop + +.loop2 + ld a, c + and a + jr z, .done + call .AddMoneyToWallet + dec c + jr .loop2 + +.done + call .DoubleReward + call .DoubleReward + pop af + jr nc, .KeepItAll + ld a, [wMomSavingMoney] + and MOM_SAVING_MONEY_MASK + jr z, .KeepItAll + ld hl, .SentToMomTexts + dec a + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + jp StdBattleTextbox + +.KeepItAll: + ld hl, GotMoneyForWinningText + jp StdBattleTextbox + +.AddMoneyToMom: + push bc + ld hl, wBattleReward + 2 + ld de, wMomsMoney + 2 + call AddBattleMoneyToAccount + pop bc + ret + +.AddMoneyToWallet: + push bc + ld hl, wBattleReward + 2 + ld de, wMoney + 2 + call AddBattleMoneyToAccount + pop bc + ret + +.DoubleReward: + ld hl, wBattleReward + 2 + sla [hl] + dec hl + rl [hl] + dec hl + rl [hl] + ret nc + ld a, $ff + ld [hli], a + ld [hli], a + ld [hl], a + ret + +.SentToMomTexts: +; entries correspond to MOM_SAVING_* constants + dw SentSomeToMomText + dw SentHalfToMomText + dw SentAllToMomText + +.CheckMaxedOutMomMoney: + ld hl, wMomsMoney + 2 + ld a, [hld] + cp LOW(MAX_MONEY) + ld a, [hld] + sbc HIGH(MAX_MONEY) ; mid + ld a, [hl] + sbc HIGH(MAX_MONEY >> 8) + ret + +AddBattleMoneyToAccount: + ld c, 3 + and a + push de + push hl + push bc + ld b, h + ld c, l + farcall StubbedTrainerRankings_AddToBattlePayouts + pop bc + pop hl +.loop + ld a, [de] + adc [hl] + ld [de], a + dec de + dec hl + dec c + jr nz, .loop + pop hl + ld a, [hld] + cp LOW(MAX_MONEY) + ld a, [hld] + sbc HIGH(MAX_MONEY) ; mid + ld a, [hl] + sbc HIGH(MAX_MONEY >> 8) + ret c + ld [hl], HIGH(MAX_MONEY >> 8) + inc hl + ld [hl], HIGH(MAX_MONEY) ; mid + inc hl + ld [hl], LOW(MAX_MONEY) + ret + +PlayVictoryMusic: + push de + ld de, MUSIC_NONE + call PlayMusic + call DelayFrame + ld de, MUSIC_WILD_VICTORY + ld a, [wBattleMode] + dec a + jr nz, .trainer_victory + push de + call IsAnyMonHoldingExpShare + pop de + jr nz, .play_music + ld hl, wPayDayMoney + ld a, [hli] + or [hl] + jr nz, .play_music + ld a, [wBattleParticipantsNotFainted] + and a + jr z, .lost + jr .play_music + +.trainer_victory + ld de, MUSIC_GYM_VICTORY + call IsGymLeader + jr c, .play_music + ld de, MUSIC_TRAINER_VICTORY + +.play_music + call PlayMusic + +.lost + pop de + ret + +IsKantoGymLeader: + ld hl, KantoGymLeaders + jr IsGymLeaderCommon + +IsGymLeader: + ld hl, GymLeaders +IsGymLeaderCommon: + push de + ld a, [wOtherTrainerClass] + ld de, 1 + call IsInArray + pop de + ret + +INCLUDE "data/trainers/leaders.asm" + +HandlePlayerMonFaint: + call FaintYourPokemon + ld hl, wEnemyMonHP + ld a, [hli] + or [hl] + call z, FaintEnemyPokemon + ld a, $1 + ld [wWhichMonFaintedFirst], a + call UpdateFaintedPlayerMon + call CheckPlayerPartyForFitMon + ld a, d + and a + jp z, LostBattle + ld hl, wEnemyMonHP + ld a, [hli] + or [hl] + jr nz, .notfainted + call UpdateBattleStateAndExperienceAfterEnemyFaint + ld a, [wBattleMode] + dec a + jr nz, .trainer + ld a, $1 + ld [wBattleEnded], a + ret + +.trainer + call CheckEnemyTrainerDefeated + jp z, WinTrainerBattle + +.notfainted + call AskUseNextPokemon + jr nc, .switch + ld a, $1 + ld [wBattleEnded], a + ret + +.switch + call ForcePlayerMonChoice + call CheckMobileBattleError + jp c, WildFled_EnemyFled_LinkBattleCanceled + ld a, c + and a + ret nz + ld a, BATTLEPLAYERACTION_USEITEM + ld [wBattlePlayerAction], a + call HandleEnemySwitch + jp z, WildFled_EnemyFled_LinkBattleCanceled + jp DoubleSwitch + +UpdateFaintedPlayerMon: + ld a, [wCurBattleMon] + ld c, a + ld hl, wBattleParticipantsNotFainted + ld b, RESET_FLAG + predef SmallFarFlagAction + ld hl, wEnemySubStatus3 + res SUBSTATUS_IN_LOOP, [hl] + xor a + ld [wLowHealthAlarm], a + ld hl, wPlayerDamageTaken + ld [hli], a + ld [hl], a + ld [wBattleMonStatus], a + call UpdateBattleMonInParty + ld c, HAPPINESS_FAINTED + ; If TheirLevel > (YourLevel + 30), use a different parameter + ld a, [wBattleMonLevel] + add 30 + ld b, a + ld a, [wEnemyMonLevel] + cp b + jr c, .got_param + ld c, HAPPINESS_BEATENBYSTRONGFOE + +.got_param + ld a, [wCurBattleMon] + ld [wCurPartyMon], a + callfar ChangeHappiness + ld a, [wBattleResult] + and BATTLERESULT_BITMASK + add LOSE + ld [wBattleResult], a + ld a, [wWhichMonFaintedFirst] + and a + ret z + ; code was probably dummied out here + ret + +AskUseNextPokemon: + call EmptyBattleTextbox + call LoadTilemapToTempTilemap +; We don't need to be here if we're in a Trainer battle, +; as that decision is made for us. + ld a, [wBattleMode] + and a + dec a + ret nz + + ld hl, BattleText_UseNextMon + call StdBattleTextbox +.loop + lb bc, 1, 7 + call PlaceYesNoBox + ld a, [wMenuCursorY] + jr c, .pressed_b + and a + ret + +.pressed_b + ld a, [wMenuCursorY] + cp $1 ; YES + jr z, .loop + ld hl, wPartyMon1Speed + ld de, wEnemyMonSpeed + jp TryToRunAwayFromBattle + +ForcePlayerMonChoice: + call EmptyBattleTextbox + call LoadStandardMenuHeader + call SetUpBattlePartyMenu + call ForcePickPartyMonInBattle + ld a, [wLinkMode] + and a + jr z, .skip_link + ld a, BATTLEPLAYERACTION_USEITEM + ld [wBattlePlayerAction], a + call LinkBattleSendReceiveAction + +.skip_link + xor a ; BATTLEPLAYERACTION_USEMOVE + ld [wBattlePlayerAction], a + call CheckMobileBattleError + jr c, .enemy_fainted_mobile_error + ld hl, wEnemyMonHP + ld a, [hli] + or [hl] + jr nz, .send_out_pokemon + +.enemy_fainted_mobile_error + call ClearSprites + call ClearBGPalettes + call _LoadHPBar + call ExitMenu + call LoadTilemapToTempTilemap + call WaitBGMap + call GetMemSGBLayout + call SetPalettes + xor a + ld c, a + ret + +.send_out_pokemon + call ClearSprites + ld a, [wCurBattleMon] + ld [wLastPlayerMon], a + ld a, [wCurPartyMon] + ld [wCurBattleMon], a + call AddBattleParticipant + call InitBattleMon + call ResetPlayerStatLevels + call ClearPalettes + call DelayFrame + call _LoadHPBar + call CloseWindow + call GetMemSGBLayout + call SetPalettes + call SendOutMonText + call NewBattleMonStatus + call BreakAttraction + call SendOutPlayerMon + call EmptyBattleTextbox + call LoadTilemapToTempTilemap + call SetPlayerTurn + call SpikesDamage + ld a, $1 + and a + ld c, a + ret + +PlayerPartyMonEntrance: + ld a, [wCurBattleMon] + ld [wLastPlayerMon], a + ld a, [wCurPartyMon] + ld [wCurBattleMon], a + call AddBattleParticipant + call InitBattleMon + call ResetPlayerStatLevels + call SendOutMonText + call NewBattleMonStatus + call BreakAttraction + call SendOutPlayerMon + call EmptyBattleTextbox + call LoadTilemapToTempTilemap + call SetPlayerTurn + jp SpikesDamage + +CheckMobileBattleError: + ld a, [wLinkMode] + cp LINK_MOBILE + jr nz, .not_mobile ; It's not a mobile battle + + ld a, [wcd2b] + and a + jr z, .not_mobile + +; We have a mobile battle and something else happened + scf + ret + +.not_mobile + xor a + ret + +IsMobileBattle: + ld a, [wLinkMode] + cp LINK_MOBILE + ret + +SetUpBattlePartyMenu: + call ClearBGPalettes +SetUpBattlePartyMenu_Loop: ; switch to fullscreen menu? + farcall LoadPartyMenuGFX + farcall InitPartyMenuWithCancel + farcall InitPartyMenuBGPal7 + farcall InitPartyMenuGFX + ret + +JumpToPartyMenuAndPrintText: + farcall WritePartyMenuTilemap + farcall PrintPartyMenuText + call WaitBGMap + call SetPalettes + call DelayFrame + ret + +SelectBattleMon: + call IsMobileBattle + jr z, .mobile + farcall PartyMenuSelect + ret + +.mobile + farcall Mobile_PartyMenuSelect + ret + +PickPartyMonInBattle: +.loop + ld a, PARTYMENUACTION_SWITCH ; Which PKMN? + ld [wPartyMenuActionText], a + call JumpToPartyMenuAndPrintText + call SelectBattleMon + ret c + call CheckIfCurPartyMonIsFitToFight + jr z, .loop + xor a + ret + +SwitchMonAlreadyOut: + ld hl, wCurBattleMon + ld a, [wCurPartyMon] + cp [hl] + jr nz, .notout + + ld hl, BattleText_MonIsAlreadyOut + call StdBattleTextbox + scf + ret + +.notout + xor a + ret + +ForcePickPartyMonInBattle: +; Can't back out. + +.pick + call PickPartyMonInBattle + ret nc + call CheckMobileBattleError + ret c + + ld de, SFX_WRONG + call PlaySFX + call WaitSFX + jr .pick + +PickSwitchMonInBattle: +.pick + call PickPartyMonInBattle + ret c + call SwitchMonAlreadyOut + jr c, .pick + xor a + ret + +ForcePickSwitchMonInBattle: +; Can't back out. + +.pick + call ForcePickPartyMonInBattle + call CheckMobileBattleError + ret c + call SwitchMonAlreadyOut + jr c, .pick + + xor a + ret + +LostBattle: + ld a, 1 + ld [wBattleEnded], a + + ld a, [wInBattleTowerBattle] + bit 0, a + jr nz, .battle_tower + + ld a, [wBattleType] + cp BATTLETYPE_CANLOSE + jr nz, .not_canlose + +; Remove the enemy from the screen. + hlcoord 0, 0 + lb bc, 8, 21 + call ClearBox + call BattleWinSlideInEnemyTrainerFrontpic + + ld c, 40 + call DelayFrames + + ld a, [wDebugFlags] + bit DEBUG_BATTLE_F, a + jr nz, .skip_win_loss_text + call PrintWinLossText +.skip_win_loss_text + ret + +.battle_tower +; Remove the enemy from the screen. + hlcoord 0, 0 + lb bc, 8, 21 + call ClearBox + call BattleWinSlideInEnemyTrainerFrontpic + + ld c, 40 + call DelayFrames + + call EmptyBattleTextbox + ld c, BATTLETOWERTEXT_WIN_TEXT + farcall BattleTowerText + call WaitPressAorB_BlinkCursor + call ClearTilemap + call ClearBGPalettes + ret + +.not_canlose + ld a, [wLinkMode] + and a + jr nz, .LostLinkBattle + +; Grayscale + ld b, SCGB_BATTLE_GRAYSCALE + call GetSGBLayout + call SetPalettes + jr .end + +.LostLinkBattle: + call UpdateEnemyMonInParty + call CheckEnemyTrainerDefeated + jr nz, .not_tied + ld hl, TiedAgainstText + ld a, [wBattleResult] + and BATTLERESULT_BITMASK + add DRAW + ld [wBattleResult], a + jr .text + +.not_tied + ld hl, LostAgainstText + call IsMobileBattle + jr z, .mobile + +.text + call StdBattleTextbox + +.end + scf + ret + +.mobile +; Remove the enemy from the screen. + hlcoord 0, 0 + lb bc, 8, 21 + call ClearBox + call BattleWinSlideInEnemyTrainerFrontpic + + ld c, 40 + call DelayFrames + + ld c, $3 ; lost + farcall Mobile_PrintOpponentBattleMessage + scf + ret + +EnemyMonFaintedAnimation: + hlcoord 12, 5 + decoord 12, 6 + jp MonFaintedAnimation + +PlayerMonFaintedAnimation: + hlcoord 1, 10 + decoord 1, 11 + jp MonFaintedAnimation + +MonFaintedAnimation: + ld a, [wJoypadDisable] + push af + set JOYPAD_DISABLE_MON_FAINT_F, a + ld [wJoypadDisable], a + + ld b, 7 + +.OuterLoop: + push bc + push de + push hl + ld b, 6 + +.InnerLoop: + push bc + push hl + push de + ld bc, 7 + call CopyBytes + pop de + pop hl + ld bc, -SCREEN_WIDTH + add hl, bc + push hl + ld h, d + ld l, e + add hl, bc + ld d, h + ld e, l + pop hl + pop bc + dec b + jr nz, .InnerLoop + + ld bc, 20 + add hl, bc + ld de, .Spaces + call PlaceString + ld c, 2 + call DelayFrames + pop hl + pop de + pop bc + dec b + jr nz, .OuterLoop + + pop af + ld [wJoypadDisable], a + ret + +.Spaces: + db " @" + +SlideBattlePicOut: + ldh [hMapObjectIndex], a + ld c, a +.loop + push bc + push hl + ld b, $7 +.loop2 + push hl + call .DoFrame + pop hl + ld de, SCREEN_WIDTH + add hl, de + dec b + jr nz, .loop2 + ld c, 2 + call DelayFrames + pop hl + pop bc + dec c + jr nz, .loop + ret + +.DoFrame: + ldh a, [hMapObjectIndex] + ld c, a + cp $8 + jr nz, .back +.forward + ld a, [hli] + ld [hld], a + dec hl + dec c + jr nz, .forward + ret + +.back + ld a, [hld] + ld [hli], a + inc hl + dec c + jr nz, .back + ret + +ForceEnemySwitch: + call ResetEnemyBattleVars + ld a, [wEnemySwitchMonIndex] + dec a + ld b, a + call LoadEnemyMonToSwitchTo + call ClearEnemyMonBox + call NewEnemyMonStatus + call ResetEnemyStatLevels + call ShowSetEnemyMonAndSendOutAnimation + call BreakAttraction + call ResetBattleParticipants + ret + +EnemySwitch: + call CheckWhetherToAskSwitch + jr nc, EnemySwitch_SetMode + ; Shift Mode + call ResetEnemyBattleVars + call CheckWhetherSwitchmonIsPredetermined + jr c, .skip + call FindMonInOTPartyToSwitchIntoBattle +.skip + ; 'b' contains the PartyNr of the mon the AI will switch to + call LoadEnemyMonToSwitchTo + call OfferSwitch + push af + call ClearEnemyMonBox + call ShowBattleTextEnemySentOut + call ShowSetEnemyMonAndSendOutAnimation + pop af + ret c + ; If we're here, then we're switching too + xor a + ld [wBattleParticipantsNotFainted], a + ld [wBattleParticipantsIncludingFainted], a + ld [wBattlePlayerAction], a + inc a + ld [wEnemyIsSwitching], a + call LoadTilemapToTempTilemap + jp PlayerSwitch + +EnemySwitch_SetMode: + call ResetEnemyBattleVars + call CheckWhetherSwitchmonIsPredetermined + jr c, .skip + call FindMonInOTPartyToSwitchIntoBattle +.skip + ; 'b' contains the PartyNr of the mon the AI will switch to + call LoadEnemyMonToSwitchTo + ld a, 1 + ld [wEnemyIsSwitching], a + call ClearEnemyMonBox + call ShowBattleTextEnemySentOut + jp ShowSetEnemyMonAndSendOutAnimation + +CheckWhetherSwitchmonIsPredetermined: +; returns the enemy switchmon index in b, or +; returns carry if the index is not yet determined. + ld a, [wLinkMode] + and a + jr z, .not_linked + + ld a, [wBattleAction] + sub BATTLEACTION_SWITCH1 + ld b, a + jr .return_carry + +.not_linked + ld a, [wEnemySwitchMonIndex] + and a + jr z, .check_wBattleHasJustStarted + + dec a + ld b, a + jr .return_carry + +.check_wBattleHasJustStarted + ld a, [wBattleHasJustStarted] + and a + ld b, 0 + jr nz, .return_carry + + and a + ret + +.return_carry + scf + ret + +ResetEnemyBattleVars: +; and draw empty Textbox + xor a + ld [wLastPlayerCounterMove], a + ld [wLastEnemyCounterMove], a + ld [wLastEnemyMove], a + ld [wCurEnemyMove], a + dec a + ld [wEnemyItemState], a + xor a + ld [wPlayerWrapCount], a + hlcoord 18, 0 + ld a, 8 + call SlideBattlePicOut + call EmptyBattleTextbox + jp LoadStandardMenuHeader + +ResetBattleParticipants: + xor a + ld [wBattleParticipantsNotFainted], a + ld [wBattleParticipantsIncludingFainted], a +AddBattleParticipant: + ld a, [wCurBattleMon] + ld c, a + ld hl, wBattleParticipantsNotFainted + ld b, SET_FLAG + push bc + predef SmallFarFlagAction + pop bc + ld hl, wBattleParticipantsIncludingFainted + predef_jump SmallFarFlagAction + +FindMonInOTPartyToSwitchIntoBattle: + ld b, -1 + ld a, %000001 + ld [wEnemyEffectivenessVsPlayerMons], a + ld [wPlayerEffectivenessVsEnemyMons], a +.loop + ld hl, wEnemyEffectivenessVsPlayerMons + sla [hl] + inc hl ; wPlayerEffectivenessVsEnemyMons + sla [hl] + inc b + ld a, [wOTPartyCount] + cp b + jp z, ScoreMonTypeMatchups + ld a, [wCurOTMon] + cp b + jr z, .discourage + ld hl, wOTPartyMon1HP + push bc + ld a, b + call GetPartyLocation + ld a, [hli] + ld c, a + ld a, [hl] + or c + pop bc + jr z, .discourage + call LookUpTheEffectivenessOfEveryMove + call IsThePlayerMonTypesEffectiveAgainstOTMon + jr .loop + +.discourage + ld hl, wPlayerEffectivenessVsEnemyMons + set 0, [hl] + jr .loop + +LookUpTheEffectivenessOfEveryMove: + push bc + ld hl, wOTPartyMon1Moves + ld a, b + call GetPartyLocation + pop bc + ld e, NUM_MOVES + 1 +.loop + dec e + jr z, .done + ld a, [hli] + and a + jr z, .done + push hl + push de + push bc + ld de, wEnemyMoveStruct + call GetMoveData + call SetEnemyTurn + callfar BattleCheckTypeMatchup + pop bc + pop de + pop hl + ld a, [wTypeMatchup] + cp EFFECTIVE + 1 + jr c, .loop + ld hl, wEnemyEffectivenessVsPlayerMons + set 0, [hl] + ret +.done + ret + +IsThePlayerMonTypesEffectiveAgainstOTMon: +; Calculates the effectiveness of the types of the PlayerMon +; against the OTMon + push bc + ld hl, wOTPartyCount + ld a, b + inc a + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + call GetPokemonIndexFromID + ld b, h + ld c, l + ld hl, BaseData + ld a, BANK(BaseData) + call LoadIndirectPointer + jr z, .done + ld bc, BASE_TYPES + add hl, bc + ld de, wEnemyMonType + ld c, BASE_CATCH_RATE - BASE_TYPES + call FarCopyBytes + ld a, [wBattleMonType1] + ld [wPlayerMoveStruct + MOVE_TYPE], a + call SetPlayerTurn + callfar BattleCheckTypeMatchup + ld a, [wTypeMatchup] + cp EFFECTIVE + 1 + jr nc, .super_effective + ld a, [wBattleMonType2] + ld [wPlayerMoveStruct + MOVE_TYPE], a + callfar BattleCheckTypeMatchup + ld a, [wTypeMatchup] + cp EFFECTIVE + 1 + jr nc, .super_effective +.done + pop bc + ret + +.super_effective + pop bc + ld hl, wEnemyEffectivenessVsPlayerMons + bit 0, [hl] + jr nz, .reset + inc hl ; wPlayerEffectivenessVsEnemyMons + set 0, [hl] + ret + +.reset + res 0, [hl] + ret + +ScoreMonTypeMatchups: +.loop1 + ld hl, wEnemyEffectivenessVsPlayerMons + sla [hl] + inc hl ; wPlayerEffectivenessVsEnemyMons + sla [hl] + jr nc, .loop1 + ld a, [wOTPartyCount] + ld b, a + ld c, [hl] +.loop2 + sla c + jr nc, .okay + dec b + jr z, .loop5 + jr .loop2 + +.okay + ld a, [wEnemyEffectivenessVsPlayerMons] + and a + jr z, .okay2 + ld b, -1 + ld c, a +.loop3 + inc b + sla c + jr nc, .loop3 + jr .quit + +.okay2 + ld b, -1 + ld a, [wPlayerEffectivenessVsEnemyMons] + ld c, a +.loop4 + inc b + sla c + jr c, .loop4 + jr .quit + +.loop5 + ld a, [wOTPartyCount] + ld b, a + call BattleRandom + and $7 + cp b + jr nc, .loop5 + ld b, a + ld a, [wCurOTMon] + cp b + jr z, .loop5 + ld hl, wOTPartyMon1HP + push bc + ld a, b + call GetPartyLocation + pop bc + ld a, [hli] + ld c, a + ld a, [hl] + or c + jr z, .loop5 + +.quit + ret + +LoadEnemyMonToSwitchTo: + ; 'b' contains the PartyNr of the mon the AI will switch to + ld a, b + ld [wCurPartyMon], a + ld hl, wOTPartyMon1Level + call GetPartyLocation + ld a, [hl] + ld [wCurPartyLevel], a + ld a, [wCurPartyMon] + inc a + ld hl, wOTPartyCount + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ld [wTempEnemyMonSpecies], a + ld [wCurPartySpecies], a + call LoadEnemyMon + + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld a, l + sub LOW(UNOWN) + if HIGH(UNOWN) == 0 + or h + else + jr nz, .skip_unown + if HIGH(UNOWN) == 1 + dec h + else + ld a, h + cp HIGH(UNOWN) + endc + endc + jr nz, .skip_unown + ld a, [wFirstUnownSeen] + and a + jr nz, .skip_unown + ld hl, wEnemyMonDVs + predef GetUnownLetter + ld a, [wUnownLetter] + ld [wFirstUnownSeen], a +.skip_unown + + ld hl, wEnemyMonHP + ld a, [hli] + ld [wEnemyHPAtTimeOfPlayerSwitch], a + ld a, [hl] + ld [wEnemyHPAtTimeOfPlayerSwitch + 1], a + ret + +CheckWhetherToAskSwitch: + ld a, [wBattleHasJustStarted] + dec a + jp z, .return_nc + ld a, [wPartyCount] + dec a + jp z, .return_nc + ld a, [wLinkMode] + and a + jp nz, .return_nc + ld a, [wOptions] + bit BATTLE_SHIFT, a + jr nz, .return_nc + ld a, [wCurPartyMon] + push af + ld a, [wCurBattleMon] + ld [wCurPartyMon], a + farcall CheckCurPartyMonFainted + pop bc + ld a, b + ld [wCurPartyMon], a + jr c, .return_nc + scf + ret + +.return_nc + and a + ret + +OfferSwitch: + ld a, [wCurPartyMon] + push af + callfar Battle_GetTrainerName + ld hl, BattleText_EnemyIsAboutToUseWillPlayerChangeMon + call StdBattleTextbox + lb bc, 1, 7 + call PlaceYesNoBox + ld a, [wMenuCursorY] + dec a + jr nz, .said_no + call SetUpBattlePartyMenu + call PickSwitchMonInBattle + jr c, .canceled_switch + ld a, [wCurBattleMon] + ld [wLastPlayerMon], a + ld a, [wCurPartyMon] + ld [wCurBattleMon], a + call ClearPalettes + call DelayFrame + call _LoadHPBar + pop af + ld [wCurPartyMon], a + xor a + ld [wCurEnemyMove], a + ld [wCurPlayerMove], a + and a + ret + +.canceled_switch + call ClearPalettes + call DelayFrame + call _LoadHPBar + +.said_no + pop af + ld [wCurPartyMon], a + scf + ret + +ClearEnemyMonBox: + xor a + ldh [hBGMapMode], a + call ExitMenu + call ClearSprites + hlcoord 1, 0 + lb bc, 4, 10 + call ClearBox + call WaitBGMap + jp FinishBattleAnim + +ShowBattleTextEnemySentOut: + callfar Battle_GetTrainerName + ld hl, BattleText_EnemySentOut + call StdBattleTextbox + jp WaitBGMap + +ShowSetEnemyMonAndSendOutAnimation: + ld a, [wTempEnemyMonSpecies] + call SetSeenMon + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call GetBaseData + ld a, OTPARTYMON + ld [wMonType], a + predef CopyMonToTempMon + call GetEnemyMonFrontpic + + xor a + ld [wNumHits], a + ld [wBattleAnimParam], a + call SetEnemyTurn + ld de, ANIM_SEND_OUT_MON + call Call_PlayBattleAnim + + call BattleCheckEnemyShininess + jr nc, .not_shiny + + ld a, 1 ; shiny anim + ld [wBattleAnimParam], a + ld de, ANIM_SEND_OUT_MON + call Call_PlayBattleAnim + +.not_shiny + ld bc, wTempMonSpecies + farcall CheckFaintedFrzSlp + jr c, .skip_cry + + farcall CheckBattleScene + jr c, .cry_no_anim + + hlcoord 12, 0 + ld d, $0 + ld e, ANIM_MON_SLOW + predef AnimateFrontpic + jr .skip_cry + +.cry_no_anim + ld a, $f + ld [wCryTracks], a + ld a, [wTempEnemyMonSpecies] + call PlayStereoCry + +.skip_cry + call UpdateEnemyHUD + ld a, $1 + ldh [hBGMapMode], a + ret + +NewEnemyMonStatus: + xor a + ld [wLastPlayerCounterMove], a + ld [wLastEnemyCounterMove], a + ld [wLastEnemyMove], a + ld hl, wEnemySubStatus1 +rept 4 + ld [hli], a +endr + ld [hl], a + ld [wEnemyDisableCount], a + ld [wEnemyFuryCutterCount], a + ld [wEnemyProtectCount], a + ld [wEnemyRageCounter], a + ld [wEnemyDisabledMove], a + ld [wEnemyMinimized], a + ld [wPlayerWrapCount], a + ld [wEnemyWrapCount], a + ld [wEnemyTurnsTaken], a + ld hl, wPlayerSubStatus5 + res SUBSTATUS_CANT_RUN, [hl] + ret + +ResetEnemyStatLevels: + ld a, BASE_STAT_LEVEL + ld b, NUM_LEVEL_STATS + ld hl, wEnemyStatLevels +.loop + ld [hli], a + dec b + jr nz, .loop + ret + +CheckPlayerPartyForFitMon: +; Has the player any mon in his Party that can fight? + ld a, [wPartyCount] + ld e, a + xor a + ld hl, wPartyMon1HP + ld bc, PARTYMON_STRUCT_LENGTH - 1 +.loop + or [hl] + inc hl ; + 1 + or [hl] + add hl, bc + dec e + jr nz, .loop + ld d, a + ret + +CheckIfCurPartyMonIsFitToFight: + ld a, [wCurPartyMon] + ld hl, wPartyMon1HP + call GetPartyLocation + ld a, [hli] + or [hl] + ret nz + + ld a, [wBattleHasJustStarted] + and a + jr nz, .finish_fail + ld hl, wPartySpecies + ld a, [wCurPartyMon] + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + cp EGG + ld hl, BattleText_AnEGGCantBattle + jr z, .print_textbox + + ld hl, BattleText_TheresNoWillToBattle + +.print_textbox + call StdBattleTextbox + +.finish_fail + xor a + ret + +TryToRunAwayFromBattle: +; Run away from battle, with or without item + ld a, [wBattleType] + cp BATTLETYPE_DEBUG + jp z, .can_escape + cp BATTLETYPE_CONTEST + jp z, .can_escape + cp BATTLETYPE_TRAP + jp z, .cant_escape + cp BATTLETYPE_CELEBI + jp z, .cant_escape + cp BATTLETYPE_SHINY + jp z, .cant_escape + cp BATTLETYPE_SUICUNE + jp z, .cant_escape + + ld a, [wLinkMode] + and a + jp nz, .can_escape + + ld a, [wBattleMode] + dec a + jp nz, .cant_run_from_trainer + + ld a, [wEnemySubStatus5] + bit SUBSTATUS_CANT_RUN, a + jp nz, .cant_escape + + ld a, [wPlayerWrapCount] + and a + jp nz, .cant_escape + + push hl + push de + ld a, [wBattleMonItem] + ld [wNamedObjectIndex], a + ld b, a + callfar GetItemHeldEffect + ld a, b + cp HELD_ESCAPE + pop de + pop hl + jr nz, .no_flee_item + + call SetPlayerTurn + call GetItemName + ld hl, BattleText_UserFledUsingAStringBuffer1 + call StdBattleTextbox + jp .can_escape + +.no_flee_item + ld a, [wNumFleeAttempts] + inc a + ld [wNumFleeAttempts], a + ld a, [hli] + ldh [hMultiplicand + 1], a + ld a, [hl] + ldh [hMultiplicand + 2], a + ld a, [de] + inc de + ldh [hEnemyMonSpeed + 0], a + ld a, [de] + ldh [hEnemyMonSpeed + 1], a + call SafeLoadTempTilemapToTilemap + ld de, hMultiplicand + 1 + ld hl, hEnemyMonSpeed + ld c, 2 + call CompareBytes + jr nc, .can_escape + + xor a + ldh [hMultiplicand + 0], a + ld a, 32 + ldh [hMultiplier], a + call Multiply + ldh a, [hProduct + 2] + ldh [hDividend + 0], a + ldh a, [hProduct + 3] + ldh [hDividend + 1], a + ldh a, [hEnemyMonSpeed + 0] + ld b, a + ldh a, [hEnemyMonSpeed + 1] + srl b + rr a + srl b + rr a + and a + jr z, .can_escape + ldh [hDivisor], a + ld b, 2 + call Divide + ldh a, [hQuotient + 2] + and a + jr nz, .can_escape + ld a, [wNumFleeAttempts] + ld c, a +.loop + dec c + jr z, .cant_escape_2 + ld b, 30 + ldh a, [hQuotient + 3] + add b + ldh [hQuotient + 3], a + jr c, .can_escape + jr .loop + +.cant_escape_2 + call BattleRandom + ld b, a + ldh a, [hQuotient + 3] + cp b + jr nc, .can_escape + ld a, BATTLEPLAYERACTION_USEITEM + ld [wBattlePlayerAction], a + ld hl, BattleText_CantEscape2 + jr .print_inescapable_text + +.cant_escape + ld hl, BattleText_CantEscape + jr .print_inescapable_text + +.cant_run_from_trainer + ld hl, BattleText_TheresNoEscapeFromTrainerBattle + +.print_inescapable_text + call StdBattleTextbox + ld a, TRUE + ld [wFailedToFlee], a + call LoadTilemapToTempTilemap + and a + ret + +.can_escape + ld a, [wLinkMode] + and a + ld a, DRAW + jr z, .fled + call LoadTilemapToTempTilemap + xor a ; BATTLEPLAYERACTION_USEMOVE + ld [wBattlePlayerAction], a + ld a, BATTLEACTION_FORFEIT + ld [wCurMoveNum], a + xor a + ld [wCurPlayerMove], a + call LinkBattleSendReceiveAction + call SafeLoadTempTilemapToTilemap + call CheckMobileBattleError + jr c, .mobile + + ; Got away safely + ld a, [wBattleAction] + cp BATTLEACTION_FORFEIT + ld a, DRAW + jr z, .fled + dec a ; LOSE +.fled + ld b, a + ld a, [wBattleResult] + and BATTLERESULT_BITMASK + add b + ld [wBattleResult], a + call StopDangerSound + push de + ld de, SFX_RUN + call WaitPlaySFX + pop de + call WaitSFX + ld hl, BattleText_GotAwaySafely + call StdBattleTextbox + call WaitSFX + call LoadTilemapToTempTilemap + scf + ret + +.mobile + call StopDangerSound + ld hl, wcd2a + bit 4, [hl] + jr nz, .skip_link_error + ld hl, BattleText_LinkErrorBattleCanceled + call StdBattleTextbox + +.skip_link_error + call WaitSFX + call LoadTilemapToTempTilemap + scf + ret + +InitBattleMon: + ld a, MON_SPECIES + call GetPartyParamLocation + ld de, wBattleMonSpecies + ld bc, MON_ID + call CopyBytes + ld bc, MON_DVS - MON_ID + add hl, bc + ld de, wBattleMonDVs + ld bc, MON_POKERUS - MON_DVS + call CopyBytes + inc hl + inc hl + inc hl + ld de, wBattleMonLevel + ld bc, PARTYMON_STRUCT_LENGTH - MON_LEVEL + call CopyBytes + ld a, [wBattleMonSpecies] + ld [wTempBattleMonSpecies], a + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call GetBaseData + ld a, [wBaseType1] + ld [wBattleMonType1], a + ld a, [wBaseType2] + ld [wBattleMonType2], a + ld hl, wPartyMonNicknames + ld a, [wCurBattleMon] + call SkipNames + ld de, wBattleMonNickname + ld bc, MON_NAME_LENGTH + call CopyBytes + ld hl, wBattleMonAttack + ld de, wPlayerStats + ld bc, PARTYMON_STRUCT_LENGTH - MON_ATK + call CopyBytes + call ApplyStatusEffectOnPlayerStats + call BadgeStatBoosts + ret + +BattleCheckPlayerShininess: + call GetPartyMonDVs + jr BattleCheckShininess + +BattleCheckEnemyShininess: + call GetEnemyMonDVs + +BattleCheckShininess: + ld b, h + ld c, l + callfar CheckShininess + ret + +GetPartyMonDVs: + ld hl, wBattleMonDVs + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_TRANSFORMED, a + ret z + ld hl, wPartyMon1DVs + ld a, [wCurBattleMon] + jp GetPartyLocation + +GetEnemyMonDVs: + ld hl, wEnemyMonDVs + ld a, [wEnemySubStatus5] + bit SUBSTATUS_TRANSFORMED, a + ret z + ld hl, wEnemyBackupDVs + ld a, [wBattleMode] + dec a + ret z + ld hl, wOTPartyMon1DVs + ld a, [wCurOTMon] + jp GetPartyLocation + +ResetPlayerStatLevels: + ld a, BASE_STAT_LEVEL + ld b, NUM_LEVEL_STATS + ld hl, wPlayerStatLevels +.loop + ld [hli], a + dec b + jr nz, .loop + ret + +InitEnemyMon: + ld a, [wCurPartyMon] + ld hl, wOTPartyMon1Species + call GetPartyLocation + ld de, wEnemyMonSpecies + ld bc, MON_ID + call CopyBytes + ld bc, MON_DVS - MON_ID + add hl, bc + ld de, wEnemyMonDVs + ld bc, MON_POKERUS - MON_DVS + call CopyBytes + inc hl + inc hl + inc hl + ld de, wEnemyMonLevel + ld bc, PARTYMON_STRUCT_LENGTH - MON_LEVEL + call CopyBytes + ld a, [wEnemyMonSpecies] + ld [wCurSpecies], a + call GetBaseData + ld hl, wOTPartyMonNicknames + ld a, [wCurPartyMon] + call SkipNames + ld de, wEnemyMonNickname + ld bc, MON_NAME_LENGTH + call CopyBytes + ld hl, wEnemyMonAttack + ld de, wEnemyStats + ld bc, PARTYMON_STRUCT_LENGTH - MON_ATK + call CopyBytes + call ApplyStatusEffectOnEnemyStats + ld hl, wBaseType1 + ld de, wEnemyMonType1 + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + ; The enemy mon's base Sp. Def isn't needed since its base + ; Sp. Atk is also used to calculate Sp. Def stat experience. + ld hl, wBaseStats + ld de, wEnemyMonBaseStats + ld b, NUM_STATS - 1 +.loop + ld a, [hli] + ld [de], a + inc de + dec b + jr nz, .loop + ld a, [wCurPartyMon] + ld [wCurOTMon], a + ret + +SwitchPlayerMon: + call ClearSprites + ld a, [wCurBattleMon] + ld [wLastPlayerMon], a + ld a, [wCurPartyMon] + ld [wCurBattleMon], a + call AddBattleParticipant + call InitBattleMon + call ResetPlayerStatLevels + call NewBattleMonStatus + call BreakAttraction + call SendOutPlayerMon + call EmptyBattleTextbox + call LoadTilemapToTempTilemap + ld hl, wEnemyMonHP + ld a, [hli] + or [hl] + ret + +SendOutPlayerMon: + ld hl, wBattleMonDVs + predef GetUnownLetter + hlcoord 1, 5 + ld b, 7 + ld c, 8 + call ClearBox + call WaitBGMap + xor a + ldh [hBGMapMode], a + call GetBattleMonBackpic + xor a + ldh [hGraphicStartTile], a + ld [wBattleMenuCursorPosition], a + ld [wCurMoveNum], a + ld [wTypeModifier], a + ld [wPlayerMoveStruct + MOVE_ANIM], a + ld [wLastPlayerCounterMove], a + ld [wLastEnemyCounterMove], a + ld [wLastPlayerMove], a + call CheckAmuletCoin + call FinishBattleAnim + xor a + ld [wEnemyWrapCount], a + call SetPlayerTurn + xor a + ld [wNumHits], a + ld [wBattleAnimParam], a + ld de, ANIM_SEND_OUT_MON + call Call_PlayBattleAnim + call BattleCheckPlayerShininess + jr nc, .not_shiny + ld a, 1 + ld [wBattleAnimParam], a + ld de, ANIM_SEND_OUT_MON + call Call_PlayBattleAnim + +.not_shiny + ld a, MON_SPECIES + call GetPartyParamLocation + ld b, h + ld c, l + farcall CheckFaintedFrzSlp + jr c, .statused + ld a, $f0 + ld [wCryTracks], a + ld a, [wCurPartySpecies] + call PlayStereoCry + +.statused + call UpdatePlayerHUD + ld a, $1 + ldh [hBGMapMode], a + ret + +NewBattleMonStatus: + xor a + ld [wLastPlayerCounterMove], a + ld [wLastEnemyCounterMove], a + ld [wLastPlayerMove], a + ld hl, wPlayerSubStatus1 +rept 4 + ld [hli], a +endr + ld [hl], a + ld hl, wPlayerUsedMoves + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld [wPlayerDisableCount], a + ld [wPlayerFuryCutterCount], a + ld [wPlayerProtectCount], a + ld [wPlayerRageCounter], a + ld [wDisabledMove], a + ld [wPlayerMinimized], a + ld [wEnemyWrapCount], a + ld [wPlayerWrapCount], a + ld [wPlayerTurnsTaken], a + ld hl, wEnemySubStatus5 + res SUBSTATUS_CANT_RUN, [hl] + ret + +BreakAttraction: + ld hl, wPlayerSubStatus1 + res SUBSTATUS_IN_LOVE, [hl] + ld hl, wEnemySubStatus1 + res SUBSTATUS_IN_LOVE, [hl] + ret + +SpikesDamage: + ld hl, wPlayerScreens + ld de, wBattleMonType + ld bc, UpdatePlayerHUD + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wEnemyScreens + ld de, wEnemyMonType + ld bc, UpdateEnemyHUD +.ok + + bit SCREENS_SPIKES, [hl] + ret z + + ; Flying-types aren't affected by Spikes. + ld a, [de] + cp FLYING + ret z + inc de + ld a, [de] + cp FLYING + ret z + + push bc + + ld hl, BattleText_UserHurtBySpikes ; "hurt by SPIKES!" + call StdBattleTextbox + + call GetEighthMaxHP + call SubtractHPFromTarget + + pop hl + call .hl + + jp WaitBGMap + +.hl + jp hl + +PursuitSwitch: + ld a, BATTLE_VARS_MOVE + call GetBattleVar + ld b, a + call GetMoveEffect + ld a, b + cp EFFECT_PURSUIT + jr nz, .done + + ld a, [wCurBattleMon] + push af + + ld hl, DoPlayerTurn + ldh a, [hBattleTurn] + and a + jr z, .do_turn + ld hl, DoEnemyTurn + ld a, [wLastPlayerMon] + ld [wCurBattleMon], a +.do_turn + ld a, BANK(DoPlayerTurn) ; aka BANK(DoEnemyTurn) + rst FarCall + + ld a, BATTLE_VARS_MOVE + call GetBattleVarAddr + ld a, $ff + ld [hl], a + + pop af + ld [wCurBattleMon], a + + ldh a, [hBattleTurn] + and a + jr z, .check_enemy_fainted + + ld a, [wLastPlayerMon] + call UpdateBattleMon + ld hl, wBattleMonHP + ld a, [hli] + or [hl] + jr nz, .done + +; BUG: A Pokémon that fainted from Pursuit will have its old status condition when revived (see docs/bugs_and_glitches.md) + ld a, $f0 + ld [wCryTracks], a + ld a, [wBattleMonSpecies] + call PlayStereoCry + ld a, [wLastPlayerMon] + ld c, a + ld hl, wBattleParticipantsNotFainted + ld b, RESET_FLAG + predef SmallFarFlagAction + call PlayerMonFaintedAnimation + ld hl, BattleText_MonFainted + jr .done_fainted + +.check_enemy_fainted + ld hl, wEnemyMonHP + ld a, [hli] + or [hl] + jr nz, .done + + ld de, SFX_KINESIS + call PlaySFX + call WaitSFX + ld de, SFX_FAINT + call PlaySFX + call WaitSFX + call EnemyMonFaintedAnimation + ld hl, BattleText_EnemyMonFainted + +.done_fainted + call StdBattleTextbox + scf + ret + +.done + and a + ret + +RecallPlayerMon: + ldh a, [hBattleTurn] + push af + xor a + ldh [hBattleTurn], a + ld [wNumHits], a + ld de, ANIM_RETURN_MON + call Call_PlayBattleAnim + pop af + ldh [hBattleTurn], a + ret + +HandleHealingItems: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .player_1 + call SetPlayerTurn + call HandleHPHealingItem + call UseHeldStatusHealingItem + call UseConfusionHealingItem + call SetEnemyTurn + call HandleHPHealingItem + call UseHeldStatusHealingItem + jp UseConfusionHealingItem + +.player_1 + call SetEnemyTurn + call HandleHPHealingItem + call UseHeldStatusHealingItem + call UseConfusionHealingItem + call SetPlayerTurn + call HandleHPHealingItem + call UseHeldStatusHealingItem + jp UseConfusionHealingItem + +HandleHPHealingItem: + callfar GetOpponentItem + ld a, b + cp HELD_BERRY + ret nz + ld de, wEnemyMonHP + 1 + ld hl, wEnemyMonMaxHP + ldh a, [hBattleTurn] + and a + jr z, .go + ld de, wBattleMonHP + 1 + ld hl, wBattleMonMaxHP + +.go +; If, and only if, Pokemon's HP is less than half max, use the item. +; Store current HP in Buffer 3/4 + push bc + ld a, [de] + ld [wHPBuffer2], a + add a + ld c, a + dec de + ld a, [de] + inc de + ld [wHPBuffer2 + 1], a + adc a + ld b, a + ld a, b + cp [hl] + ld a, c + pop bc + jr z, .equal + jr c, .less + ret + +.equal + inc hl + cp [hl] + dec hl + ret nc + +.less + call ItemRecoveryAnim + ; store max HP in wHPBuffer1 + ld a, [hli] + ld [wHPBuffer1 + 1], a + ld a, [hl] + ld [wHPBuffer1], a + ld a, [de] + add c + ld [wHPBuffer3], a + ld c, a + dec de + ld a, [de] + adc 0 + ld [wHPBuffer3 + 1], a + ld b, a + ld a, [hld] + cp c + ld a, [hl] + sbc b + jr nc, .okay + ld a, [hli] + ld [wHPBuffer3 + 1], a + ld a, [hl] + ld [wHPBuffer3], a + +.okay + ld a, [wHPBuffer3 + 1] + ld [de], a + inc de + ld a, [wHPBuffer3] + ld [de], a + ldh a, [hBattleTurn] + ld [wWhichHPBar], a + and a + hlcoord 2, 2 + jr z, .got_hp_bar_coords + hlcoord 10, 9 + +.got_hp_bar_coords + ld [wWhichHPBar], a + predef AnimateHPBar +UseOpponentItem: + call RefreshBattleHuds + callfar GetOpponentItem + ld a, [hl] + ld [wNamedObjectIndex], a + call GetItemName + callfar ConsumeHeldItem + ld hl, RecoveredUsingText + jp StdBattleTextbox + +ItemRecoveryAnim: + push hl + push de + push bc + call EmptyBattleTextbox + call SwitchTurnCore + xor a + ld [wNumHits], a + if HIGH(RECOVER) + ld a, HIGH(RECOVER) + endc + ld [wFXAnimID + 1], a + ld a, LOW(RECOVER) + ld [wFXAnimID], a + predef PlayBattleAnim + call SwitchTurnCore + pop bc + pop de + pop hl + ret + +UseHeldStatusHealingItem: + callfar GetOpponentItem + ld hl, HeldStatusHealingEffects +.loop + ld a, [hli] + cp $ff + ret z + inc hl + cp b + jr nz, .loop + dec hl + ld b, [hl] + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + and b + ret z + xor a + ld [hl], a + push bc + call UpdateOpponentInParty + pop bc + ld a, BATTLE_VARS_SUBSTATUS5_OPP + call GetBattleVarAddr + and [hl] + res SUBSTATUS_TOXIC, [hl] + ld a, BATTLE_VARS_SUBSTATUS1_OPP + call GetBattleVarAddr + and [hl] + res SUBSTATUS_NIGHTMARE, [hl] + ld a, b + cp ALL_STATUS + jr nz, .skip_confuse + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVarAddr + res SUBSTATUS_CONFUSED, [hl] + +.skip_confuse + ld hl, CalcEnemyStats + ldh a, [hBattleTurn] + and a + jr z, .got_pointer + ld hl, CalcPlayerStats + +.got_pointer + call SwitchTurnCore + ld a, BANK(CalcPlayerStats) ; aka BANK(CalcEnemyStats) + rst FarCall + call SwitchTurnCore + call ItemRecoveryAnim + call UseOpponentItem + ld a, $1 + and a + ret + +INCLUDE "data/battle/held_heal_status.asm" + +UseConfusionHealingItem: + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVar + bit SUBSTATUS_CONFUSED, a + ret z + callfar GetOpponentItem + ld a, b + cp HELD_HEAL_CONFUSION + jr z, .heal_status + cp HELD_HEAL_STATUS + ret nz + +.heal_status + ld a, [hl] + ld [wNamedObjectIndex], a + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVarAddr + res SUBSTATUS_CONFUSED, [hl] + call GetItemName + call ItemRecoveryAnim + ld hl, BattleText_ItemHealedConfusion + call StdBattleTextbox + ldh a, [hBattleTurn] + and a + jr nz, .do_partymon + call GetOTPartymonItem + xor a + ld [bc], a + ld a, [wBattleMode] + dec a + ret z + ld [hl], $0 + ret + +.do_partymon + call GetPartymonItem + xor a + ld [bc], a + ld [hl], a + ret + +HandleStatBoostingHeldItems: +; The effects handled here are not used in-game. + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .player_1 + call .DoPlayer + jp .DoEnemy + +.player_1 + call .DoEnemy + jp .DoPlayer + +.DoPlayer: + call GetPartymonItem + ld a, $0 + jp .HandleItem + +.DoEnemy: + call GetOTPartymonItem + ld a, $1 +.HandleItem: + ldh [hBattleTurn], a + ld d, h + ld e, l + push de + push bc + ld a, [bc] + ld b, a + callfar GetItemHeldEffect + ld hl, HeldStatUpItems +.loop + ld a, [hli] + cp -1 + jr z, .finish + inc hl + inc hl + cp b + jr nz, .loop + pop bc + ld a, [bc] + ld [wNamedObjectIndex], a + push bc + dec hl + dec hl + ld a, [hli] + ld h, [hl] + ld l, a + ld a, BANK(BattleCommand_AttackUp) + rst FarCall + pop bc + pop de + ld a, [wFailedMessage] + and a + ret nz + xor a + ld [bc], a + ld [de], a + call GetItemName + ld hl, BattleText_UsersStringBuffer1Activated + call StdBattleTextbox + callfar BattleCommand_StatUpMessage + ret + +.finish + pop bc + pop de + ret + +INCLUDE "data/battle/held_stat_up.asm" + +GetPartymonItem: + ld hl, wPartyMon1Item + ld a, [wCurBattleMon] + call GetPartyLocation + ld bc, wBattleMonItem + ret + +GetOTPartymonItem: + ld hl, wOTPartyMon1Item + ld a, [wCurOTMon] + call GetPartyLocation + ld bc, wEnemyMonItem + ret + +UpdateBattleHUDs: + push hl + push de + push bc + call DrawPlayerHUD + ld hl, wPlayerHPPal + call SetHPPal + call CheckDanger + call DrawEnemyHUD + ld hl, wEnemyHPPal + call SetHPPal + pop bc + pop de + pop hl + ret + +UpdatePlayerHUD:: + push hl + push de + push bc + call DrawPlayerHUD + call UpdatePlayerHPPal + call CheckDanger + pop bc + pop de + pop hl + ret + +DrawPlayerHUD: + xor a + ldh [hBGMapMode], a + + ; Clear the area + hlcoord 9, 7 + lb bc, 5, 11 + call ClearBox + + farcall DrawPlayerHUDBorder + + hlcoord 18, 9 + ld [hl], $73 ; vertical bar + call PrintPlayerHUD + + ; HP bar + hlcoord 10, 9 + ld b, 1 + xor a ; PARTYMON + ld [wMonType], a + predef DrawPlayerHP + + ; Exp bar + push de + ld a, [wCurBattleMon] + ld hl, wPartyMon1Exp + 2 + call GetPartyLocation + ld d, h + ld e, l + + hlcoord 10, 11 + ld a, [wTempMonLevel] + ld b, a + call FillInExpBar + pop de + ret + +UpdatePlayerHPPal: + ld hl, wPlayerHPPal + jp UpdateHPPal + +CheckDanger: + ld hl, wBattleMonHP + ld a, [hli] + or [hl] + jr z, .no_danger + ld a, [wBattleLowHealthAlarm] + and a + jr nz, .done + ld a, [wPlayerHPPal] + cp HP_RED + jr z, .danger + +.no_danger + ld hl, wLowHealthAlarm + res DANGER_ON_F, [hl] + jr .done + +.danger + ld hl, wLowHealthAlarm + set DANGER_ON_F, [hl] + +.done + ret + +PrintPlayerHUD: + ld de, wBattleMonNickname + hlcoord 10, 7 + call Battle_DummyFunction + call PlaceString + + push bc + + ld a, [wCurBattleMon] + ld hl, wPartyMon1DVs + call GetPartyLocation + ld de, wTempMonDVs + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + ld hl, wBattleMonLevel + ld de, wTempMonLevel + ld bc, wTempMonStructEnd - wTempMonLevel + call CopyBytes ; battle_struct and party_struct end with the same data + ld a, [wCurBattleMon] + ld hl, wPartyMon1Species + call GetPartyLocation + ld a, [hl] + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call GetBaseData + + pop hl + dec hl + + ld a, TEMPMON + ld [wMonType], a + callfar GetGender + ld a, " " + jr c, .got_gender_char + ld a, "♂" + jr nz, .got_gender_char + ld a, "♀" + +.got_gender_char + hlcoord 17, 8 + ld [hl], a + hlcoord 14, 8 + push af ; back up gender + push hl + ld de, wBattleMonStatus + predef PlaceNonFaintStatus + pop hl + pop bc + ret nz + ld a, b + cp " " + jr nz, .copy_level ; male or female + dec hl ; genderless + +.copy_level + ld a, [wBattleMonLevel] + ld [wTempMonLevel], a + jp PrintLevel + +UpdateEnemyHUD:: + push hl + push de + push bc + call DrawEnemyHUD + call UpdateEnemyHPPal + pop bc + pop de + pop hl + ret + +DrawEnemyHUD: + xor a + ldh [hBGMapMode], a + + hlcoord 1, 0 + lb bc, 4, 11 + call ClearBox + + farcall DrawEnemyHUDBorder + + ld a, [wTempEnemyMonSpecies] + ld [wCurSpecies], a + ld [wCurPartySpecies], a + call GetBaseData + ld de, wEnemyMonNickname + hlcoord 1, 0 + call Battle_DummyFunction + call PlaceString + ld h, b + ld l, c + dec hl + + ld hl, wEnemyMonDVs + ld de, wTempMonDVs + ld a, [wEnemySubStatus5] + bit SUBSTATUS_TRANSFORMED, a + jr z, .ok + ld hl, wEnemyBackupDVs +.ok + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + + ld a, TEMPMON + ld [wMonType], a + callfar GetGender + ld a, " " + jr c, .got_gender + ld a, "♂" + jr nz, .got_gender + ld a, "♀" + +.got_gender + hlcoord 9, 1 + ld [hl], a + + hlcoord 6, 1 + push af + push hl + ld de, wEnemyMonStatus + predef PlaceNonFaintStatus + pop hl + pop bc + jr nz, .skip_level + ld a, b + cp " " + jr nz, .print_level + dec hl +.print_level + ld a, [wEnemyMonLevel] + ld [wTempMonLevel], a + call PrintLevel +.skip_level + + ld hl, wEnemyMonHP + ld a, [hli] + ldh [hMultiplicand + 1], a + ld a, [hld] + ldh [hMultiplicand + 2], a + or [hl] + jr nz, .not_fainted + + ld c, a + ld e, a + ld d, HP_BAR_LENGTH + jp .draw_bar + +.not_fainted + xor a + ldh [hMultiplicand + 0], a + ld a, HP_BAR_LENGTH_PX + ldh [hMultiplier], a + call Multiply + ld hl, wEnemyMonMaxHP + ld a, [hli] + ld b, a + ld a, [hl] + ldh [hMultiplier], a + ld a, b + and a + jr z, .less_than_256_max + ldh a, [hMultiplier] + srl b + rr a + srl b + rr a + ldh [hDivisor], a + ldh a, [hProduct + 2] + ld b, a + srl b + ldh a, [hProduct + 3] + rr a + srl b + rr a + ldh [hProduct + 3], a + ld a, b + ldh [hProduct + 2], a + +.less_than_256_max + ldh a, [hProduct + 2] + ldh [hDividend + 0], a + ldh a, [hProduct + 3] + ldh [hDividend + 1], a + ld a, 2 + ld b, a + call Divide + ldh a, [hQuotient + 3] + ld e, a + ld a, HP_BAR_LENGTH + ld d, a + ld c, a + +.draw_bar + xor a + ld [wWhichHPBar], a + hlcoord 2, 2 + ld b, 0 + call DrawBattleHPBar + ret + +UpdateEnemyHPPal: + ld hl, wEnemyHPPal + call UpdateHPPal + ret + +UpdateHPPal: + ld b, [hl] + call SetHPPal + ld a, [hl] + cp b + ret z + jp FinishBattleAnim + +Battle_DummyFunction: +; called before placing either battler's nickname in the HUD + ret + +BattleMenu: + xor a + ldh [hBGMapMode], a + call LoadTempTilemapToTilemap + + ld a, [wBattleType] + cp BATTLETYPE_DEBUG + jr z, .ok + cp BATTLETYPE_TUTORIAL + jr z, .ok + call EmptyBattleTextbox + call UpdateBattleHuds + call EmptyBattleTextbox + call LoadTilemapToTempTilemap +.ok + +.loop + ld a, [wBattleType] + cp BATTLETYPE_CONTEST + jr nz, .not_contest + farcall ContestBattleMenu + jr .next +.not_contest + + ; Auto input: choose "ITEM" + ld a, [wInputType] + or a + jr z, .skip_dude_pack_select + farcall _DudeAutoInput_DownA +.skip_dude_pack_select + call LoadBattleMenu2 + ret c + +.next + ld a, $1 + ldh [hBGMapMode], a + ld a, [wBattleMenuCursorPosition] + cp $1 + jp z, BattleMenu_Fight + cp $3 + jp z, BattleMenu_Pack + cp $2 + jp z, BattleMenu_PKMN + cp $4 + jp z, BattleMenu_Run + jr .loop + +BattleMenu_Fight: + xor a + ld [wNumFleeAttempts], a + call SafeLoadTempTilemapToTilemap + and a + ret + +LoadBattleMenu2: + call IsMobileBattle + jr z, .mobile + + farcall LoadBattleMenu + and a + ret + +.mobile + farcall Mobile_LoadBattleMenu + ld a, [wcd2b] + and a + ret z + + ld hl, wcd2a + bit 4, [hl] + jr nz, .error + ld hl, BattleText_LinkErrorBattleCanceled + call StdBattleTextbox + ld c, 60 + call DelayFrames +.error + scf + ret + +BattleMenu_Pack: + ld a, [wLinkMode] + and a + jp nz, .ItemsCantBeUsed + + ld a, [wInBattleTowerBattle] + and a + jp nz, .ItemsCantBeUsed + + call LoadStandardMenuHeader + + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL + jr z, .tutorial + cp BATTLETYPE_CONTEST + jr z, .contest + + farcall BattlePack + ld a, [wBattlePlayerAction] + and a ; BATTLEPLAYERACTION_USEMOVE? + jr z, .didnt_use_item + jr .got_item + +.tutorial + farcall TutorialPack + ld a, POKE_BALL + ld [wCurItem], a + call DoItemEffect + jr .got_item + +.contest + ld a, PARK_BALL + ld [wCurItem], a + call DoItemEffect + +.got_item + call .UseItem + ret + +.didnt_use_item + call ClearPalettes + call DelayFrame + call _LoadBattleFontsHPBar + call GetBattleMonBackpic + call GetEnemyMonFrontpic + call ExitMenu + call WaitBGMap + call FinishBattleAnim + call LoadTilemapToTempTilemap + jp BattleMenu + +.ItemsCantBeUsed: + ld hl, BattleText_ItemsCantBeUsedHere + call StdBattleTextbox + jp BattleMenu + +.UseItem: + ld a, [wWildMon] + and a + jr nz, .run + callfar CheckItemPocket + ld a, [wItemAttributeValue] + cp BALL + jr z, .ball + call ClearBGPalettes + +.ball + xor a + ldh [hBGMapMode], a + call _LoadBattleFontsHPBar + call ClearSprites + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL + jr z, .tutorial2 + call GetBattleMonBackpic + +.tutorial2 + call GetEnemyMonFrontpic + ld a, $1 + ld [wMenuCursorY], a + call ExitMenu + call UpdateBattleHUDs + call WaitBGMap + call LoadTilemapToTempTilemap + call ClearWindowData + call FinishBattleAnim + and a + ret + +.run + xor a + ld [wWildMon], a + ld a, [wBattleResult] + and BATTLERESULT_BITMASK + ld [wBattleResult], a ; WIN + call ClearWindowData + call SetPalettes + scf + ret + +BattleMenu_PKMN: + call LoadStandardMenuHeader +BattleMenuPKMN_ReturnFromStats: + call ExitMenu + call LoadStandardMenuHeader + call ClearBGPalettes +BattleMenuPKMN_Loop: + call SetUpBattlePartyMenu_Loop + xor a + ld [wPartyMenuActionText], a + call JumpToPartyMenuAndPrintText + call SelectBattleMon + jr c, .Cancel +.loop + farcall FreezeMonIcons + call .GetMenu + jr c, .PressedB + call PlaceHollowCursor + ld a, [wMenuCursorY] + cp $1 ; SWITCH + jp z, TryPlayerSwitch + cp $2 ; STATS + jr z, .Stats + cp $3 ; CANCEL + jr z, .Cancel + jr .loop + +.PressedB: + call CheckMobileBattleError + jr c, .Cancel + jr BattleMenuPKMN_Loop + +.Stats: + call Battle_StatsScreen + call CheckMobileBattleError + jr c, .Cancel + jp BattleMenuPKMN_ReturnFromStats + +.Cancel: + call ClearSprites + call ClearPalettes + call DelayFrame + call _LoadHPBar + call CloseWindow + call LoadTilemapToTempTilemap + call GetMemSGBLayout + call SetPalettes + jp BattleMenu + +.GetMenu: + call IsMobileBattle + jr z, .mobile + farcall BattleMonMenu + ret + +.mobile + farcall MobileBattleMonMenu + ret + +Battle_StatsScreen: + call DisableLCD + + ld hl, vTiles2 tile $31 + ld de, vTiles0 + ld bc, $11 tiles + call CopyBytes + + ld hl, vTiles2 + ld de, vTiles0 tile $11 + ld bc, $31 tiles + call CopyBytes + + call EnableLCD + + call ClearSprites + call LowVolume + xor a ; PARTYMON + ld [wMonType], a + farcall BattleStatsScreenInit + call MaxVolume + + call DisableLCD + + ld hl, vTiles0 + ld de, vTiles2 tile $31 + ld bc, $11 tiles + call CopyBytes + + ld hl, vTiles0 tile $11 + ld de, vTiles2 + ld bc, $31 tiles + call CopyBytes + + call EnableLCD + ret + +TryPlayerSwitch: + ld a, [wCurBattleMon] + ld d, a + ld a, [wCurPartyMon] + cp d + jr nz, .check_trapped + ld hl, BattleText_MonIsAlreadyOut + call StdBattleTextbox + jp BattleMenuPKMN_Loop + +.check_trapped + ld a, [wPlayerWrapCount] + and a + jr nz, .trapped + ld a, [wEnemySubStatus5] + bit SUBSTATUS_CANT_RUN, a + jr z, .try_switch + +.trapped + ld hl, BattleText_MonCantBeRecalled + call StdBattleTextbox + jp BattleMenuPKMN_Loop + +.try_switch + call CheckIfCurPartyMonIsFitToFight + jp z, BattleMenuPKMN_Loop + ld a, [wCurBattleMon] + ld [wLastPlayerMon], a + ld a, BATTLEPLAYERACTION_SWITCH + ld [wBattlePlayerAction], a + call ClearPalettes + call DelayFrame + call ClearSprites + call _LoadHPBar + call CloseWindow + call GetMemSGBLayout + call SetPalettes + ld a, [wCurPartyMon] + ld [wCurBattleMon], a +PlayerSwitch: + ld a, 1 + ld [wPlayerIsSwitching], a + ld a, [wLinkMode] + and a + jr z, .not_linked + call LoadStandardMenuHeader + call LinkBattleSendReceiveAction + call CloseWindow + +.not_linked + call ParseEnemyAction + ld a, [wLinkMode] + and a + jr nz, .linked + +.switch + call BattleMonEntrance + and a + ret + +.linked + ld a, [wBattleAction] + cp BATTLEACTION_STRUGGLE + jp z, .switch + cp BATTLEACTION_SKIPTURN + jp z, .switch + cp BATTLEACTION_SWITCH1 + jp c, .switch + cp BATTLEACTION_FORFEIT + jr nz, .dont_run + call WildFled_EnemyFled_LinkBattleCanceled + ret + +.dont_run + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .player_1 + call BattleMonEntrance + call EnemyMonEntrance + and a + ret + +.player_1 + call EnemyMonEntrance + call BattleMonEntrance + and a + ret + +EnemyMonEntrance: + callfar AI_Switch + call SetEnemyTurn + jp SpikesDamage + +BattleMonEntrance: + call WithdrawMonText + + ld c, 50 + call DelayFrames + + ld hl, wPlayerSubStatus4 + res SUBSTATUS_RAGE, [hl] + + call SetEnemyTurn + call PursuitSwitch + jr c, .ok + call RecallPlayerMon +.ok + + hlcoord 9, 7 + lb bc, 5, 11 + call ClearBox + + ld a, [wCurBattleMon] + ld [wCurPartyMon], a + call AddBattleParticipant + call InitBattleMon + call ResetPlayerStatLevels + call SendOutMonText + call NewBattleMonStatus + call BreakAttraction + call SendOutPlayerMon + call EmptyBattleTextbox + call LoadTilemapToTempTilemap + call SetPlayerTurn + call SpikesDamage + ld a, $2 + ld [wMenuCursorY], a + ret + +PassedBattleMonEntrance: + ld c, 50 + call DelayFrames + + hlcoord 9, 7 + lb bc, 5, 11 + call ClearBox + + ld a, [wCurPartyMon] + ld [wCurBattleMon], a + call AddBattleParticipant + call InitBattleMon + xor a ; FALSE + ld [wApplyStatLevelMultipliersToEnemy], a + call ApplyStatLevelMultiplierOnAllStats + call SendOutPlayerMon + call EmptyBattleTextbox + call LoadTilemapToTempTilemap + call SetPlayerTurn + jp SpikesDamage + +BattleMenu_Run: + call SafeLoadTempTilemapToTilemap + ld a, $3 + ld [wMenuCursorY], a + ld hl, wBattleMonSpeed + ld de, wEnemyMonSpeed + call TryToRunAwayFromBattle + ld a, FALSE + ld [wFailedToFlee], a + ret c + ld a, [wBattlePlayerAction] + and a ; BATTLEPLAYERACTION_USEMOVE? + ret nz + jp BattleMenu + +CheckAmuletCoin: + ld a, [wBattleMonItem] + ld b, a + callfar GetItemHeldEffect + ld a, b + cp HELD_AMULET_COIN + ret nz + ld a, 1 + ld [wAmuletCoin], a + ret + +MoveSelectionScreen: + call IsMobileBattle + jr nz, .not_mobile + farcall Mobile_MoveSelectionScreen + ret + +.not_mobile + ld hl, wEnemyMonMoves + ld a, [wMoveSelectionMenuType] + dec a + jr z, .got_menu_type + dec a + jr z, .ether_elixer_menu + call CheckPlayerHasUsableMoves + ret z ; use Struggle + ld hl, wBattleMonMoves + jr .got_menu_type + +.ether_elixer_menu + ld a, MON_MOVES + call GetPartyParamLocation + +.got_menu_type + ld de, wListMoves_MoveIndicesBuffer + ld bc, NUM_MOVES + call CopyBytes + xor a + ldh [hBGMapMode], a + + hlcoord 4, 17 - NUM_MOVES - 1 + ld b, 4 + ld c, 14 + ld a, [wMoveSelectionMenuType] + cp $2 + jr nz, .got_dims + hlcoord 4, 17 - NUM_MOVES - 1 - 4 + ld b, 4 + ld c, 14 +.got_dims + call Textbox + + hlcoord 6, 17 - NUM_MOVES + ld a, [wMoveSelectionMenuType] + cp $2 + jr nz, .got_start_coord + hlcoord 6, 17 - NUM_MOVES - 4 +.got_start_coord + ld a, SCREEN_WIDTH + ld [wListMovesLineSpacing], a + predef ListMoves + + ld b, 5 + ld a, [wMoveSelectionMenuType] + cp $2 + ld a, 17 - NUM_MOVES + jr nz, .got_default_coord + ld b, 5 + ld a, 17 - NUM_MOVES - 4 + +.got_default_coord + ld [w2DMenuCursorInitY], a + ld a, b + ld [w2DMenuCursorInitX], a + ld a, [wMoveSelectionMenuType] + cp $1 + jr z, .skip_inc + ld a, [wCurMoveNum] + inc a + +.skip_inc + ld [wMenuCursorY], a + ld a, 1 + ld [wMenuCursorX], a + ld a, [wNumMoves] + inc a + ld [w2DMenuNumRows], a + ld a, 1 + ld [w2DMenuNumCols], a + ld c, STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP + ld a, [wMoveSelectionMenuType] + dec a + ld b, D_DOWN | D_UP | A_BUTTON + jr z, .okay + dec a + ld b, D_DOWN | D_UP | A_BUTTON | B_BUTTON + jr z, .okay + ld a, [wLinkMode] + and a + jr nz, .okay + ld b, D_DOWN | D_UP | A_BUTTON | B_BUTTON | SELECT + +.okay + ld a, b + ld [wMenuJoypadFilter], a + ld a, c + ld [w2DMenuFlags1], a + xor a + ld [w2DMenuFlags2], a + ld a, $10 + ld [w2DMenuCursorOffsets], a +.menu_loop + ld a, [wMoveSelectionMenuType] + and a + jr z, .battle_player_moves + dec a + jr nz, .interpret_joypad + hlcoord 11, 14 + ld de, .empty_string + call PlaceString + jr .interpret_joypad + +.battle_player_moves + call MoveInfoBox + ld a, [wSwappingMove] + and a + jr z, .interpret_joypad + hlcoord 5, 13 + ld bc, SCREEN_WIDTH + dec a + call AddNTimes + ld [hl], "▷" + +.interpret_joypad + ld a, $1 + ldh [hBGMapMode], a + call ScrollingMenuJoypad + bit D_UP_F, a + jp nz, .pressed_up + bit D_DOWN_F, a + jp nz, .pressed_down + bit SELECT_F, a + jp nz, .pressed_select + bit B_BUTTON_F, a + ; A button + push af + + xor a + ld [wSwappingMove], a + ld a, [wMenuCursorY] + dec a + ld [wMenuCursorY], a + ld b, a + ld a, [wMoveSelectionMenuType] + dec a + jr nz, .not_enemy_moves_process_b + + pop af + ret + +.not_enemy_moves_process_b + dec a + ld a, b + ld [wCurMoveNum], a + jr nz, .use_move + + pop af + ret + +.use_move + pop af + ret nz + + ld hl, wBattleMonPP + ld a, [wMenuCursorY] + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + and PP_MASK + jr z, .no_pp_left + ld a, [wPlayerDisableCount] + swap a + and $f + dec a + cp c + jr z, .move_disabled + ld a, [wUnusedPlayerLockedMove] + and a + jr nz, .skip2 + ld a, [wMenuCursorY] + ld hl, wBattleMonMoves + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + +.skip2 + ld [wCurPlayerMove], a + xor a + ret + +.move_disabled + ld hl, BattleText_TheMoveIsDisabled + jr .place_textbox_start_over + +.no_pp_left + ld hl, BattleText_TheresNoPPLeftForThisMove + +.place_textbox_start_over + call StdBattleTextbox + call SafeLoadTempTilemapToTilemap + jp MoveSelectionScreen + +.empty_string + db "@" + +.pressed_up + ld a, [wMenuCursorY] + and a + jp nz, .menu_loop + ld a, [wNumMoves] + inc a + ld [wMenuCursorY], a + jp .menu_loop + +.pressed_down + ld a, [wMenuCursorY] + ld b, a + ld a, [wNumMoves] + inc a + inc a + cp b + jp nz, .menu_loop + ld a, $1 + ld [wMenuCursorY], a + jp .menu_loop + +.pressed_select + ld a, [wSwappingMove] + and a + jr z, .start_swap + ld hl, wBattleMonMoves + call .swap_bytes + ld hl, wBattleMonPP + call .swap_bytes + ld hl, wPlayerDisableCount + ld a, [hl] + swap a + and $f + ld b, a + ld a, [wMenuCursorY] + cp b + jr nz, .not_swapping_disabled_move + ld a, [hl] + and $f + ld b, a + ld a, [wSwappingMove] + swap a + add b + ld [hl], a + jr .swap_moves_in_party_struct + +.not_swapping_disabled_move + ld a, [wSwappingMove] + cp b + jr nz, .swap_moves_in_party_struct + ld a, [hl] + and $f + ld b, a + ld a, [wMenuCursorY] + swap a + add b + ld [hl], a + +.swap_moves_in_party_struct +; Fixes the COOLTRAINER glitch + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_TRANSFORMED, a + jr nz, .transformed + ld hl, wPartyMon1Moves + ld a, [wCurBattleMon] + call GetPartyLocation + push hl + call .swap_bytes + pop hl + ld bc, MON_PP - MON_MOVES + add hl, bc + call .swap_bytes + +.transformed + xor a + ld [wSwappingMove], a + jp MoveSelectionScreen + +.swap_bytes + push hl + ld a, [wSwappingMove] + dec a + ld c, a + ld b, 0 + add hl, bc + ld d, h + ld e, l + pop hl + ld a, [wMenuCursorY] + dec a + ld c, a + ld b, 0 + add hl, bc + ld a, [de] + ld b, [hl] + ld [hl], a + ld a, b + ld [de], a + ret + +.start_swap + ld a, [wMenuCursorY] + ld [wSwappingMove], a + jp MoveSelectionScreen + +MoveInfoBox: + xor a + ldh [hBGMapMode], a + + hlcoord 0, 8 + ld b, 3 + ld c, 9 + call Textbox + call MobileTextBorder + + ld a, [wPlayerDisableCount] + and a + jr z, .not_disabled + + swap a + and $f + ld b, a + ld a, [wMenuCursorY] + cp b + jr nz, .not_disabled + + hlcoord 1, 10 + ld de, .Disabled + call PlaceString + jr .done + +.not_disabled + ld hl, wMenuCursorY + dec [hl] + call SetPlayerTurn + ld hl, wBattleMonMoves + ld a, [wMenuCursorY] + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ld [wCurPlayerMove], a + + ld a, [wCurBattleMon] + ld [wCurPartyMon], a + ld a, WILDMON + ld [wMonType], a + callfar GetMaxPPOfMove + + ld hl, wMenuCursorY + ld c, [hl] + inc [hl] + ld b, 0 + ld hl, wBattleMonPP + add hl, bc + ld a, [hl] + and PP_MASK + ld [wStringBuffer1], a + call .PrintPP + + hlcoord 1, 9 + ld de, .Type + call PlaceString + + hlcoord 7, 11 + ld [hl], "/" + + callfar UpdateMoveData + ld a, [wPlayerMoveStruct + MOVE_ANIM] + ld b, a + hlcoord 2, 10 + predef PrintMoveType + +.done + ret + +.Disabled: + db "Disabled!@" +.Type: + db "TYPE/@" + +.PrintPP: + hlcoord 5, 11 + ld a, [wLinkMode] ; What's the point of this check? + cp LINK_MOBILE + jr c, .ok + hlcoord 5, 11 +.ok + push hl + ld de, wStringBuffer1 + lb bc, 1, 2 + call PrintNum + pop hl + inc hl + inc hl + ld [hl], "/" + inc hl + ld de, wNamedObjectIndex + lb bc, 1, 2 + call PrintNum + ret + +CheckPlayerHasUsableMoves: + ld hl, STRUGGLE + call GetMoveIDFromIndex + ld [wCurPlayerMove], a + ld a, [wPlayerDisableCount] + and a + ld hl, wBattleMonPP + jr nz, .disabled + + ld a, [hli] + or [hl] + inc hl + or [hl] + inc hl + or [hl] + and PP_MASK + ret nz + jr .force_struggle + +.disabled + swap a + and $f + ld b, a + ld d, NUM_MOVES + 1 + xor a +.loop + dec d + jr z, .done + ld c, [hl] + inc hl + dec b + jr z, .loop + or c + jr .loop + +.done +; BUG: A Disabled but PP Up–enhanced move may not trigger Struggle (see docs/bugs_and_glitches.md) + and a + ret nz + +.force_struggle + ld hl, BattleText_MonHasNoMovesLeft + call StdBattleTextbox + ld c, 60 + call DelayFrames + xor a + ret + +ParseEnemyAction: + ld a, [wEnemyIsSwitching] + and a + ret nz + ld a, [wLinkMode] + and a + jr z, .not_linked + call EmptyBattleTextbox + call LoadTilemapToTempTilemap + ld a, [wBattlePlayerAction] + and a ; BATTLEPLAYERACTION_USEMOVE? + call z, LinkBattleSendReceiveAction + call SafeLoadTempTilemapToTilemap + ld a, [wBattleAction] + cp BATTLEACTION_STRUGGLE + jp z, .struggle + cp BATTLEACTION_SKIPTURN + jp z, .skip_turn + cp BATTLEACTION_SWITCH1 + jp nc, ResetVarsForSubstatusRage + ld [wCurEnemyMoveNum], a + ld c, a + ld a, [wEnemySubStatus1] + bit SUBSTATUS_ROLLOUT, a + jp nz, .skip_load + ld a, [wEnemySubStatus3] + and 1 << SUBSTATUS_CHARGED | 1 << SUBSTATUS_RAMPAGE | 1 << SUBSTATUS_BIDE + jp nz, .skip_load + + ld hl, wEnemySubStatus5 + bit SUBSTATUS_ENCORED, [hl] + ld a, [wLastEnemyMove] + jp nz, .finish + ld hl, wEnemyMonMoves + ld b, 0 + add hl, bc + ld a, [hl] + jp .finish + +.not_linked + ld hl, wEnemySubStatus5 + bit SUBSTATUS_ENCORED, [hl] + jr z, .skip_encore + ld a, [wLastEnemyMove] + jp .finish + +.skip_encore + call CheckEnemyLockedIn + jp nz, ResetVarsForSubstatusRage + jr .continue + +.skip_turn + ld a, $ff + jr .finish + +.continue + ld hl, wEnemyMonMoves + ld de, wEnemyMonPP + ld b, NUM_MOVES +.loop + ld a, [hl] + and a + jp z, .struggle + ld a, [wEnemyDisabledMove] + cp [hl] + jr z, .disabled + ld a, [de] + and PP_MASK + jr nz, .enough_pp + +.disabled + inc hl + inc de + dec b + jr nz, .loop + jr .struggle + +.enough_pp + ld a, [wBattleMode] + dec a + jr nz, .skip_load +; wild +.loop2 + ld hl, wEnemyMonMoves + call BattleRandom + maskbits NUM_MOVES + ld c, a + ld b, 0 + add hl, bc + ld a, [wEnemyDisableCount] + swap a + and $f + dec a + cp c + jr z, .loop2 + ld a, [hl] + and a + jr z, .loop2 + ld hl, wEnemyMonPP + add hl, bc + ld b, a + ld a, [hl] + and PP_MASK + jr z, .loop2 + ld a, c + ld [wCurEnemyMoveNum], a + ld a, b + +.finish + ld [wCurEnemyMove], a + +.skip_load + call SetEnemyTurn + callfar UpdateMoveData + call CheckEnemyLockedIn + jr nz, .raging + xor a + ld [wEnemyCharging], a + +.raging + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + cp EFFECT_FURY_CUTTER + jr z, .fury_cutter + xor a + ld [wEnemyFuryCutterCount], a + +.fury_cutter + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + cp EFFECT_RAGE + jr z, .no_rage + ld hl, wEnemySubStatus4 + res SUBSTATUS_RAGE, [hl] + xor a + ld [wEnemyRageCounter], a + +.no_rage + ld a, [wEnemyMoveStruct + MOVE_EFFECT] + cp EFFECT_PROTECT + ret z + cp EFFECT_ENDURE + ret z + xor a + ld [wEnemyProtectCount], a + ret + +.struggle + ld hl, STRUGGLE + call GetMoveIDFromIndex + jr .finish + +ResetVarsForSubstatusRage: + xor a + ld [wEnemyFuryCutterCount], a + ld [wEnemyProtectCount], a + ld [wEnemyRageCounter], a + ld hl, wEnemySubStatus4 + res SUBSTATUS_RAGE, [hl] + ret + +CheckEnemyLockedIn: + ld a, [wEnemySubStatus4] + and 1 << SUBSTATUS_RECHARGE + ret nz + + ld hl, wEnemySubStatus3 + ld a, [hl] + and 1 << SUBSTATUS_CHARGED | 1 << SUBSTATUS_RAMPAGE | 1 << SUBSTATUS_BIDE + ret nz + + ld hl, wEnemySubStatus1 + bit SUBSTATUS_ROLLOUT, [hl] + ret + +LinkBattleSendReceiveAction: + farcall _LinkBattleSendReceiveAction + ret + +LoadEnemyMon: +; Initialize enemy monster parameters +; To do this we pull the species from wTempEnemyMonSpecies + +; Notes: +; BattleRandom is used to ensure sync between Game Boys + +; Clear the whole enemy mon struct (wEnemyMon) + xor a + ld hl, wEnemyMonSpecies + ld bc, wEnemyMonEnd - wEnemyMon + call ByteFill + +; We don't need to be here if we're in a link battle + ld a, [wLinkMode] + and a + jp nz, InitEnemyMon + +; and also not in a BattleTower-Battle + ld a, [wInBattleTowerBattle] + bit 0, a + jp nz, InitEnemyMon + +; Make sure everything knows what species we're working with + ld a, [wTempEnemyMonSpecies] + ld [wEnemyMonSpecies], a + ld [wCurSpecies], a + ld [wCurPartySpecies], a + +; Grab the BaseData for this species + call GetBaseData + +; Let's get the item: + +; Is the item predetermined? + ld a, [wBattleMode] + dec a + jr z, .WildItem + +; If we're in a trainer battle, the item is in the party struct + ld a, [wCurPartyMon] + ld hl, wOTPartyMon1Item + call GetPartyLocation ; bc = PartyMon[wCurPartyMon] - wPartyMons + ld a, [hl] + jr .UpdateItem + +.WildItem: +; In a wild battle, we pull from the item slots in BaseData + +; Force Item1 +; Used for Ho-Oh, Lugia and Snorlax encounters + ld a, [wBattleType] + cp BATTLETYPE_FORCEITEM + ld a, [wBaseItem1] + jr z, .UpdateItem + +; Failing that, it's all up to chance +; Effective chances: +; 75% None +; 23% Item1 +; 2% Item2 + +; 25% chance of getting an item + call BattleRandom + cp 75 percent + 1 + ld a, NO_ITEM + jr c, .UpdateItem + +; From there, an 8% chance for Item2 + call BattleRandom + cp 8 percent ; 8% of 25% = 2% Item2 + ld a, [wBaseItem1] + jr nc, .UpdateItem + ld a, [wBaseItem2] + +.UpdateItem: + ld [wEnemyMonItem], a + +; Initialize DVs + +; If we're in a trainer battle, DVs are predetermined + ld a, [wBattleMode] + and a + jr z, .InitDVs + + ld a, [wEnemySubStatus5] + bit SUBSTATUS_TRANSFORMED, a + jr z, .InitDVs + +; Unknown + ld hl, wEnemyBackupDVs + ld de, wEnemyMonDVs + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + jp .Happiness + +.InitDVs: +; Trainer DVs + +; All trainers have preset DVs, determined by class +; See GetTrainerDVs for more on that + farcall GetTrainerDVs +; These are the DVs we'll use if we're actually in a trainer battle + ld a, [wBattleMode] + dec a + jr nz, .UpdateDVs + +; Wild DVs +; Here's where the fun starts + +; Roaming monsters (Entei, Raikou) work differently +; They have their own structs, which are shorter than normal + ld a, [wBattleType] + cp BATTLETYPE_ROAMING + jr nz, .NotRoaming + +; Grab HP + call GetRoamMonHP + ld a, [hl] +; Check if the HP has been initialized + and a +; We'll do something with the result in a minute + push af + +; Grab DVs + call GetRoamMonDVs + inc hl + ld a, [hld] + ld c, a + ld b, [hl] + +; Get back the result of our check + pop af +; If the RoamMon struct has already been initialized, we're done + jr nz, .UpdateDVs + +; If it hasn't, we need to initialize the DVs +; (HP is initialized at the end of the battle) + call GetRoamMonDVs + inc hl + call BattleRandom + ld [hld], a + ld c, a + call BattleRandom + ld [hl], a + ld b, a +; We're done with DVs + jr .UpdateDVs + +.NotRoaming: +; Register a contains wBattleType + +; Forced shiny battle type +; Used by Red Gyarados at Lake of Rage + cp BATTLETYPE_SHINY + jr nz, .GenerateDVs + + ld b, ATKDEFDV_SHINY ; $ea + ld c, SPDSPCDV_SHINY ; $aa + jr .UpdateDVs + +.GenerateDVs: +; Generate new random DVs + call BattleRandom + ld b, a + call BattleRandom + ld c, a + +.UpdateDVs: +; Input DVs in register bc + ld hl, wEnemyMonDVs + ld a, b + ld [hli], a + ld [hl], c + +; We've still got more to do if we're dealing with a wild monster + ld a, [wBattleMode] + dec a + jr nz, .Happiness + +; Species-specfic: + +; Unown + ld a, [wTempEnemyMonSpecies] + call GetPokemonIndexFromID ; will be preserved for the Magikarp check + ld a, l + sub LOW(UNOWN) + if HIGH(UNOWN) == 0 + or h + else + jr nz, .Magikarp + ld a, h + if HIGH(UNOWN) == 1 + dec a + else + cp HIGH(UNOWN) + endc + endc + jr nz, .Magikarp + +; Get letter based on DVs + ld hl, wEnemyMonDVs + predef GetUnownLetter +; Can't use any letters that haven't been unlocked +; If combined with forced shiny battletype, causes an infinite loop + call CheckUnownLetter + jr c, .GenerateDVs ; try again + jr .Happiness ; skip the Magikarp check + +.Magikarp: +; These filters are untranslated. +; They expect at wMagikarpLength a 2-byte value in mm, +; but the value is in feet and inches (one byte each). + +; The first filter is supposed to make very large Magikarp even rarer, +; by targeting those 1600 mm (= 5'3") or larger. +; After the conversion to feet, it is unable to target any, +; since the largest possible Magikarp is 5'3", and $0503 = 1283 mm. + ld a, l + sub LOW(MAGIKARP) + if HIGH(MAGIKARP) == 0 + or h + else + jr nz, .Happiness + if HIGH(MAGIKARP) == 1 + dec h + else + ld a, h + cp HIGH(MAGIKARP) + endc + endc + jr nz, .Happiness + +; Get Magikarp's length +; BUG: Magikarp length limits have a unit conversion error (see docs/bugs_and_glitches.md) + ld de, wEnemyMonDVs + ld bc, wPlayerID + callfar CalcMagikarpLength + +; No reason to keep going if length > 1536 mm (i.e. if HIGH(length) > 6 feet) + ld a, [wMagikarpLength] + cp HIGH(1536) + jr nz, .CheckMagikarpArea + +; 5% chance of skipping both size checks + call Random + cp 5 percent + jr c, .CheckMagikarpArea +; Try again if length >= 1616 mm (i.e. if LOW(length) >= 4 inches) + ld a, [wMagikarpLength + 1] + cp LOW(1616) + jr nc, .GenerateDVs + +; 20% chance of skipping this check + call Random + cp 20 percent - 1 + jr c, .CheckMagikarpArea +; Try again if length >= 1600 mm (i.e. if LOW(length) >= 3 inches) + ld a, [wMagikarpLength + 1] + cp LOW(1600) + jr nc, .GenerateDVs + +.CheckMagikarpArea: +; BUG: Magikarp in Lake of Rage are shorter, not longer (see docs/bugs_and_glitches.md) + ld a, [wMapGroup] + cp GROUP_LAKE_OF_RAGE + jr z, .Happiness + ld a, [wMapNumber] + cp MAP_LAKE_OF_RAGE + jr z, .Happiness +; 40% chance of not flooring + call Random + cp 39 percent + 1 + jr c, .Happiness +; Try again if length < 1024 mm (i.e. if HIGH(length) < 3 feet) + ld a, [wMagikarpLength] + cp HIGH(1024) + jr c, .GenerateDVs ; try again + +; Finally done with DVs + +.Happiness: +; Set happiness + ld a, BASE_HAPPINESS + ld [wEnemyMonHappiness], a +; Set level + ld a, [wCurPartyLevel] + ld [wEnemyMonLevel], a +; Fill stats + ld de, wEnemyMonMaxHP + ld b, FALSE + ld hl, wEnemyMonDVs - (MON_DVS - MON_STAT_EXP + 1) + predef CalcMonStats + +; If we're in a trainer battle, +; get the rest of the parameters from the party struct + ld a, [wBattleMode] + cp TRAINER_BATTLE + jr z, .OpponentParty + +; If we're in a wild battle, check wild-specific stuff + and a + jr z, .TreeMon + + ld a, [wEnemySubStatus5] + bit SUBSTATUS_TRANSFORMED, a + jp nz, .Moves + +.TreeMon: +; If we're headbutting trees, some monsters enter battle asleep + call CheckSleepingTreeMon + ld a, TREEMON_SLEEP_TURNS + jr c, .UpdateStatus +; Otherwise, no status + xor a + +.UpdateStatus: + ld hl, wEnemyMonStatus + ld [hli], a + +; Unused byte + xor a + ld [hli], a + +; Full HP.. + ld a, [wEnemyMonMaxHP] + ld [hli], a + ld a, [wEnemyMonMaxHP + 1] + ld [hl], a + +; ..unless it's a RoamMon + ld a, [wBattleType] + cp BATTLETYPE_ROAMING + jr nz, .Moves + +; Grab HP + call GetRoamMonHP + ld a, [hl] +; Check if it's been initialized again + and a + jr z, .InitRoamHP +; Update from the struct if it has + ld a, [hl] + ld [wEnemyMonHP + 1], a + jr .Moves + +.InitRoamHP: +; HP only uses the lo byte in the RoamMon struct since +; Raikou and Entei will have < 256 hp at level 40 + ld a, [wEnemyMonHP + 1] + ld [hl], a + jr .Moves + +.OpponentParty: +; Get HP from the party struct + ld hl, (wOTPartyMon1HP + 1) + ld a, [wCurPartyMon] + call GetPartyLocation + ld a, [hld] + ld [wEnemyMonHP + 1], a + ld a, [hld] + ld [wEnemyMonHP], a + +; Make sure everything knows which monster the opponent is using + ld a, [wCurPartyMon] + ld [wCurOTMon], a + +; Get status from the party struct + dec hl + ld a, [hl] ; OTPartyMonStatus + ld [wEnemyMonStatus], a + +.Moves: + ld hl, wBaseType1 + ld de, wEnemyMonType1 + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + +; Get moves + ld de, wEnemyMonMoves +; Are we in a trainer battle? + ld a, [wBattleMode] + cp TRAINER_BATTLE + jr nz, .WildMoves +; Then copy moves from the party struct + ld hl, wOTPartyMon1Moves + ld a, [wCurPartyMon] + call GetPartyLocation + ld bc, NUM_MOVES + call CopyBytes + jr .PP + +.WildMoves: +; Clear wEnemyMonMoves + xor a + ld h, d + ld l, e + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld [wSkipMovesBeforeLevelUp], a +; Fill moves based on level + predef FillMoves + +.PP: +; Trainer battle? + ld a, [wBattleMode] + cp TRAINER_BATTLE + jr z, .TrainerPP + +; Fill wild PP + ld hl, wEnemyMonMoves + ld de, wEnemyMonPP + predef FillPP + jr .Finish + +.TrainerPP: +; Copy PP from the party struct + ld hl, wOTPartyMon1PP + ld a, [wCurPartyMon] + call GetPartyLocation + ld de, wEnemyMonPP + ld bc, NUM_MOVES + call CopyBytes + +.Finish: +; Copy the first five base stats (the enemy mon's base Sp. Atk +; is also used to calculate Sp. Def stat experience) + ld hl, wBaseStats + ld de, wEnemyMonBaseStats + ld b, NUM_STATS - 1 +.loop + ld a, [hli] + ld [de], a + inc de + dec b + jr nz, .loop + + ld a, [wBaseCatchRate] + ld [de], a + inc de + + ld a, [wBaseExp] + ld [de], a + + ld a, [wTempEnemyMonSpecies] + ld [wNamedObjectIndex], a + + call GetPokemonName + +; Did we catch it? + ld a, [wBattleMode] + and a + ret z + +; Update enemy nickname + ld hl, wStringBuffer1 + ld de, wEnemyMonNickname + ld bc, MON_NAME_LENGTH + call CopyBytes + +; Saw this mon + ld a, [wTempEnemyMonSpecies] + call SetSeenMon + + ld hl, wEnemyMonStats + ld de, wEnemyStats + ld bc, NUM_EXP_STATS * 2 + call CopyBytes + +; BUG: PRZ and BRN stat reductions don't apply to switched Pokémon (see docs/bugs_and_glitches.md) + ret + +CheckSleepingTreeMon: +; Return carry if species is in the list +; for the current time of day + +; Don't do anything if this isn't a tree encounter + ld a, [wBattleType] + cp BATTLETYPE_TREE + jr nz, .NotSleeping + + ld a, [wTempEnemyMonSpecies] + call GetPokemonIndexFromID + ld b, h + ld c, l + +; Get list for the time of day + ld hl, AsleepTreeMonsMorn + ld a, [wTimeOfDay] + cp DAY_F + jr c, .Check + ld hl, AsleepTreeMonsDay + jr z, .Check + ld hl, AsleepTreeMonsNite + +.Check: + ld de, 2 ; length of species id + call IsInWordArray +; If it's a match, the opponent is asleep + ret c + +.NotSleeping: + and a + ret + +INCLUDE "data/wild/treemons_asleep.asm" + +CheckUnownLetter: +; Return carry if the Unown letter hasn't been unlocked yet + + ld a, [wUnlockedUnowns] + ld c, a + ld de, 0 + +.loop + +; Don't check this set unless it's been unlocked + srl c + jr nc, .next + +; Is our letter in the set? + ld hl, UnlockedUnownLetterSets + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + + push de + ld a, [wUnownLetter] + ld de, 1 + push bc + call IsInArray + pop bc + pop de + + jr c, .match + +.next +; Make sure we haven't gone past the end of the table + inc e + inc e + ld a, e + cp NUM_UNLOCKED_UNOWN_SETS * 2 + jr c, .loop + +; Hasn't been unlocked, or the letter is invalid + scf + ret + +.match +; Valid letter + and a + ret + +INCLUDE "data/wild/unlocked_unowns.asm" + +SwapBattlerLevels: ; unreferenced + push bc + ld a, [wBattleMonLevel] + ld b, a + ld a, [wEnemyMonLevel] + ld [wBattleMonLevel], a + ld a, b + ld [wEnemyMonLevel], a + pop bc + ret + +BattleWinSlideInEnemyTrainerFrontpic: + xor a + ld [wTempEnemyMonSpecies], a + call FinishBattleAnim + ld a, [wOtherTrainerClass] + ld [wTrainerClass], a + ld de, vTiles2 + callfar GetTrainerPic + hlcoord 19, 0 + ld c, 0 + +.outer_loop + inc c + ld a, c + cp 7 + ret z + xor a + ldh [hBGMapMode], a + ldh [hBGMapThird], a + ld d, $0 + push bc + push hl + +.inner_loop + call .CopyColumn + inc hl + ld a, 7 + add d + ld d, a + dec c + jr nz, .inner_loop + + ld a, $1 + ldh [hBGMapMode], a + ld c, 4 + call DelayFrames + pop hl + pop bc + dec hl + jr .outer_loop + +.CopyColumn: + push hl + push de + push bc + ld e, 7 + +.loop + ld [hl], d + ld bc, SCREEN_WIDTH + add hl, bc + inc d + dec e + jr nz, .loop + + pop bc + pop de + pop hl + ret + +ApplyStatusEffectOnPlayerStats: + ld a, 1 + jr ApplyStatusEffectOnStats + +ApplyStatusEffectOnEnemyStats: + xor a + +ApplyStatusEffectOnStats: + ldh [hBattleTurn], a + call ApplyPrzEffectOnSpeed + jp ApplyBrnEffectOnAttack + +ApplyPrzEffectOnSpeed: + ldh a, [hBattleTurn] + and a + jr z, .enemy + ld a, [wBattleMonStatus] + and 1 << PAR + ret z + ld hl, wBattleMonSpeed + 1 + ld a, [hld] + ld b, a + ld a, [hl] + srl a + rr b + srl a + rr b + ld [hli], a + or b + jr nz, .player_ok + ld b, $1 ; min speed + +.player_ok + ld [hl], b + ret + +.enemy + ld a, [wEnemyMonStatus] + and 1 << PAR + ret z + ld hl, wEnemyMonSpeed + 1 + ld a, [hld] + ld b, a + ld a, [hl] + srl a + rr b + srl a + rr b + ld [hli], a + or b + jr nz, .enemy_ok + ld b, $1 ; min speed + +.enemy_ok + ld [hl], b + ret + +ApplyBrnEffectOnAttack: + ldh a, [hBattleTurn] + and a + jr z, .enemy + ld a, [wBattleMonStatus] + and 1 << BRN + ret z + ld hl, wBattleMonAttack + 1 + ld a, [hld] + ld b, a + ld a, [hl] + srl a + rr b + ld [hli], a + or b + jr nz, .player_ok + ld b, $1 ; min attack + +.player_ok + ld [hl], b + ret + +.enemy + ld a, [wEnemyMonStatus] + and 1 << BRN + ret z + ld hl, wEnemyMonAttack + 1 + ld a, [hld] + ld b, a + ld a, [hl] + srl a + rr b + ld [hli], a + or b + jr nz, .enemy_ok + ld b, $1 ; min attack + +.enemy_ok + ld [hl], b + ret + +ApplyStatLevelMultiplierOnAllStats: +; Apply StatLevelMultipliers on all 5 Stats + ld c, 0 +.stat_loop + call ApplyStatLevelMultiplier + inc c + ld a, c + cp NUM_BATTLE_STATS + jr nz, .stat_loop + ret + +ApplyStatLevelMultiplier: + push bc + push bc + ld a, [wApplyStatLevelMultipliersToEnemy] + and a + ld a, c + ld hl, wBattleMonAttack + ld de, wPlayerStats + ld bc, wPlayerAtkLevel + jr z, .got_pointers + ld hl, wEnemyMonAttack + ld de, wEnemyStats + ld bc, wEnemyAtkLevel + +.got_pointers + add c + ld c, a + jr nc, .okay + inc b +.okay + ld a, [bc] + pop bc + ld b, a + push bc + sla c + ld b, 0 + add hl, bc + ld a, c + add e + ld e, a + jr nc, .okay2 + inc d +.okay2 + pop bc + push hl + ld hl, StatLevelMultipliers_Applied + dec b + sla b + ld c, b + ld b, 0 + add hl, bc + xor a + ldh [hMultiplicand + 0], a + ld a, [de] + ldh [hMultiplicand + 1], a + inc de + ld a, [de] + ldh [hMultiplicand + 2], a + ld a, [hli] + ldh [hMultiplier], a + call Multiply + ld a, [hl] + ldh [hDivisor], a + ld b, 4 + call Divide + pop hl + +; Cap at 999. + ldh a, [hQuotient + 3] + sub LOW(MAX_STAT_VALUE) + ldh a, [hQuotient + 2] + sbc HIGH(MAX_STAT_VALUE) + jp c, .okay3 + + ld a, HIGH(MAX_STAT_VALUE) + ldh [hQuotient + 2], a + ld a, LOW(MAX_STAT_VALUE) + ldh [hQuotient + 3], a + +.okay3 + ldh a, [hQuotient + 2] + ld [hli], a + ld b, a + ldh a, [hQuotient + 3] + ld [hl], a + or b + jr nz, .okay4 + inc [hl] + +.okay4 + pop bc + ret + +INCLUDE "data/battle/stat_multipliers_2.asm" + +BadgeStatBoosts: +; Raise the stats of the battle mon in wBattleMon +; depending on which badges have been obtained. + +; Every other badge boosts a stat, starting from the first. +; GlacierBadge also boosts Special Defense, although the relevant code is buggy (see below). + +; ZephyrBadge: Attack +; PlainBadge: Speed +; MineralBadge: Defense +; GlacierBadge: Special Attack and Special Defense + +; The boosted stats are in order, except PlainBadge and MineralBadge's boosts are swapped. + + ld a, [wLinkMode] + and a + ret nz + + ld a, [wInBattleTowerBattle] + and a + ret nz + + ld a, [wJohtoBadges] + +; Swap badges 3 (PlainBadge) and 5 (MineralBadge). + ld d, a + and (1 << PLAINBADGE) + add a + add a + ld b, a + ld a, d + and (1 << MINERALBADGE) + rrca + rrca + ld c, a + ld a, d + and ((1 << ZEPHYRBADGE) | (1 << HIVEBADGE) | (1 << FOGBADGE) | (1 << STORMBADGE) | (1 << GLACIERBADGE) | (1 << RISINGBADGE)) + or b + or c + ld b, a + + ld hl, wBattleMonAttack + ld c, 4 +.CheckBadge: +; BUG: Glacier Badge may not boost Special Defense depending on the value of Special Attack (see docs/bugs_and_glitches.md) + ld a, b + srl b + call c, BoostStat + inc hl + inc hl +; Check every other badge. + srl b + dec c + jr nz, .CheckBadge + srl a + call c, BoostStat + ret + +BoostStat: +; Raise stat at hl by 1/8. + + ld a, [hli] + ld d, a + ld e, [hl] + srl d + rr e + srl d + rr e + srl d + rr e + ld a, [hl] + add e + ld [hld], a + ld a, [hl] + adc d + ld [hli], a + +; Cap at 999. + ld a, [hld] + sub LOW(MAX_STAT_VALUE) + ld a, [hl] + sbc HIGH(MAX_STAT_VALUE) + ret c + ld a, HIGH(MAX_STAT_VALUE) + ld [hli], a + ld a, LOW(MAX_STAT_VALUE) + ld [hld], a + ret + +_LoadBattleFontsHPBar: + callfar LoadBattleFontsHPBar + ret + +_LoadHPBar: + callfar LoadHPBar + ret + +LoadHPExpBarGFX: ; unreferenced + ld de, EnemyHPBarBorderGFX + ld hl, vTiles2 tile $6c + lb bc, BANK(EnemyHPBarBorderGFX), 4 + call Get1bpp + ld de, HPExpBarBorderGFX + ld hl, vTiles2 tile $73 + lb bc, BANK(HPExpBarBorderGFX), 6 + call Get1bpp + ld de, ExpBarGFX + ld hl, vTiles2 tile $55 + lb bc, BANK(ExpBarGFX), 8 + jp Get2bpp + +EmptyBattleTextbox: + ld hl, .empty + jp BattleTextbox + +.empty: + text_end + +_BattleRandom:: +; If the normal RNG is used in a link battle it'll desync. +; To circumvent this a shared PRNG is used instead. + +; But if we're in a non-link battle we're safe to use it + ld a, [wLinkMode] + and a + jp z, Random + +; The PRNG operates in streams of 10 values. + +; Which value are we trying to pull? + push hl + push bc + ld a, [wLinkBattleRNCount] + ld c, a + ld b, 0 + ld hl, wLinkBattleRNs + add hl, bc + inc a + ld [wLinkBattleRNCount], a + +; If we haven't hit the end yet, we're good + cp 10 - 1 ; Exclude last value. See the closing comment + ld a, [hl] + pop bc + pop hl + ret c + +; If we have, we have to generate new pseudorandom data +; Instead of having multiple PRNGs, ten seeds are used + push hl + push bc + push af + +; Reset count to 0 + xor a + ld [wLinkBattleRNCount], a + ld hl, wLinkBattleRNs + ld b, 10 ; number of seeds + +; Generate next number in the sequence for each seed +; a[n+1] = (a[n] * 5 + 1) % 256 +.loop + ; get last # + ld a, [hl] + + ; a * 5 + 1 + ld c, a + add a + add a + add c + inc a + + ; update # + ld [hli], a + dec b + jr nz, .loop + +; This has the side effect of pulling the last value first, +; then wrapping around. As a result, when we check to see if +; we've reached the end, we check the one before it. + + pop af + pop bc + pop hl + ret + +Call_PlayBattleAnim_OnlyIfVisible: + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVar + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + ret nz + +Call_PlayBattleAnim: + ld a, e + ld [wFXAnimID], a + ld a, d + ld [wFXAnimID + 1], a + call WaitBGMap + predef_jump PlayBattleAnim + +FinishBattleAnim: + push af + push bc + push de + push hl + ld b, SCGB_BATTLE_COLORS + call GetSGBLayout + call SetPalettes + call DelayFrame + pop hl + pop de + pop bc + pop af + ret + +GiveExperiencePoints: +; Give experience. +; Don't give experience if linked or in the Battle Tower. + ld a, [wLinkMode] + and a + ret nz + + ld a, [wInBattleTowerBattle] + bit 0, a + ret nz + + call .EvenlyDivideExpAmongParticipants + xor a + ld [wCurPartyMon], a + ld bc, wPartyMon1Species + +.loop + ld hl, MON_HP + add hl, bc + ld a, [hli] + or [hl] + jp z, .next_mon ; fainted + + push bc + ld hl, wBattleParticipantsNotFainted + ld a, [wCurPartyMon] + ld c, a + ld b, CHECK_FLAG + ld d, 0 + predef SmallFarFlagAction + ld a, c + and a + pop bc + jp z, .next_mon + +; give stat exp + ld hl, MON_STAT_EXP + 1 + add hl, bc + ld d, h + ld e, l + ld hl, wEnemyMonBaseStats - 1 + push bc + ld c, NUM_EXP_STATS +.stat_exp_loop + inc hl + ld a, [de] + add [hl] + ld [de], a + jr nc, .no_carry_stat_exp + dec de + ld a, [de] + inc a + jr z, .stat_exp_maxed_out + ld [de], a + inc de + +.no_carry_stat_exp + push hl + push bc + ld a, MON_POKERUS + call GetPartyParamLocation + ld a, [hl] + and a + pop bc + pop hl + jr z, .stat_exp_awarded + ld a, [de] + add [hl] + ld [de], a + jr nc, .stat_exp_awarded + dec de + ld a, [de] + inc a + jr z, .stat_exp_maxed_out + ld [de], a + inc de + jr .stat_exp_awarded + +.stat_exp_maxed_out + ld a, $ff + ld [de], a + inc de + ld [de], a + +.stat_exp_awarded + inc de + inc de + dec c + jr nz, .stat_exp_loop + xor a + ldh [hMultiplicand + 0], a + ldh [hMultiplicand + 1], a + ld a, [wEnemyMonBaseExp] + ldh [hMultiplicand + 2], a + ld a, [wEnemyMonLevel] + ldh [hMultiplier], a + call Multiply + ld a, 7 + ldh [hDivisor], a + ld b, 4 + call Divide +; Boost Experience for traded Pokemon + pop bc + ld hl, MON_ID + add hl, bc + ld a, [wPlayerID] + cp [hl] + jr nz, .boosted + inc hl + ld a, [wPlayerID + 1] + cp [hl] + ld a, 0 + jr z, .no_boost + +.boosted + call BoostExp + ld a, 1 + +.no_boost +; Boost experience for a Trainer Battle + ld [wStringBuffer2 + 2], a + ld a, [wBattleMode] + dec a + call nz, BoostExp +; Boost experience for Lucky Egg + push bc + ld a, MON_ITEM + call GetPartyParamLocation + ld a, [hl] + cp LUCKY_EGG + call z, BoostExp + ldh a, [hQuotient + 3] + ld [wStringBuffer2 + 1], a + ldh a, [hQuotient + 2] + ld [wStringBuffer2], a + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames + call GetNickname + ld hl, Text_MonGainedExpPoint + call BattleTextbox + ld a, [wStringBuffer2 + 1] + ldh [hQuotient + 3], a + ld a, [wStringBuffer2] + ldh [hQuotient + 2], a + pop bc + call AnimateExpBar + push bc + call LoadTilemapToTempTilemap + pop bc + ld hl, MON_EXP + 2 + add hl, bc + ld d, [hl] + ldh a, [hQuotient + 3] + add d + ld [hld], a + ld d, [hl] + ldh a, [hQuotient + 2] + adc d + ld [hl], a + jr nc, .no_exp_overflow + dec hl + inc [hl] + jr nz, .no_exp_overflow + ld a, $ff + ld [hli], a + ld [hli], a + ld [hl], a + +.no_exp_overflow + ld a, [wCurPartyMon] + ld e, a + ld d, 0 + ld hl, wPartySpecies + add hl, de + ld a, [hl] + ld [wCurSpecies], a + call GetBaseData + push bc + ld d, MAX_LEVEL + callfar CalcExpAtLevel + pop bc + ld hl, MON_EXP + 2 + add hl, bc + push bc + ldh a, [hQuotient + 1] + ld b, a + ldh a, [hQuotient + 2] + ld c, a + ldh a, [hQuotient + 3] + ld d, a + ld a, [hld] + sub d + ld a, [hld] + sbc c + ld a, [hl] + sbc b + jr c, .not_max_exp + ld a, b + ld [hli], a + ld a, c + ld [hli], a + ld a, d + ld [hld], a + +.not_max_exp +; Check if the mon leveled up + xor a ; PARTYMON + ld [wMonType], a + predef CopyMonToTempMon + callfar CalcLevel + pop bc + ld hl, MON_LEVEL + add hl, bc + ld a, [hl] + cp MAX_LEVEL + jp nc, .next_mon + cp d + jp z, .next_mon +; grew to level ##! + ld [wTempLevel], a + ld a, [wCurPartyLevel] + push af + ld a, d + ld [wCurPartyLevel], a + ld [hl], a + ld hl, MON_SPECIES + add hl, bc + ld a, [hl] + ld [wCurSpecies], a + ld [wTempSpecies], a ; unused? + call GetBaseData + ld hl, MON_MAXHP + 1 + add hl, bc + ld a, [hld] + ld e, a + ld d, [hl] + push de + ld hl, MON_MAXHP + add hl, bc + ld d, h + ld e, l + ld hl, MON_STAT_EXP - 1 + add hl, bc + push bc + ld b, TRUE + predef CalcMonStats + pop bc + pop de + ld hl, MON_MAXHP + 1 + add hl, bc + ld a, [hld] + sub e + ld e, a + ld a, [hl] + sbc d + ld d, a + dec hl + ld a, [hl] + add e + ld [hld], a + ld a, [hl] + adc d + ld [hl], a + ld a, [wCurBattleMon] + ld d, a + ld a, [wCurPartyMon] + cp d + jr nz, .skip_active_mon_update + ld de, wBattleMonHP + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + ld de, wBattleMonMaxHP + push bc + ld bc, PARTYMON_STRUCT_LENGTH - MON_MAXHP + call CopyBytes + pop bc + ld hl, MON_LEVEL + add hl, bc + ld a, [hl] + ld [wBattleMonLevel], a + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_TRANSFORMED, a + jr nz, .transformed + ld hl, MON_ATK + add hl, bc + ld de, wPlayerStats + ld bc, PARTYMON_STRUCT_LENGTH - MON_ATK + call CopyBytes + +.transformed + xor a ; FALSE + ld [wApplyStatLevelMultipliersToEnemy], a + call ApplyStatLevelMultiplierOnAllStats + callfar ApplyStatusEffectOnPlayerStats + callfar BadgeStatBoosts + callfar UpdatePlayerHUD + call EmptyBattleTextbox + call LoadTilemapToTempTilemap + ld a, $1 + ldh [hBGMapMode], a + +.skip_active_mon_update + farcall LevelUpHappinessMod + ld a, [wCurBattleMon] + ld b, a + ld a, [wCurPartyMon] + cp b + jr z, .skip_exp_bar_animation + ld de, SFX_HIT_END_OF_EXP_BAR + call PlaySFX + call WaitSFX + ld hl, BattleText_StringBuffer1GrewToLevel + call StdBattleTextbox + call LoadTilemapToTempTilemap + +.skip_exp_bar_animation + xor a ; PARTYMON + ld [wMonType], a + predef CopyMonToTempMon + hlcoord 9, 0 + ld b, 10 + ld c, 9 + call Textbox + hlcoord 11, 1 + ld bc, 4 + predef PrintTempMonStats + ld c, 30 + call DelayFrames + call WaitPressAorB_BlinkCursor + call SafeLoadTempTilemapToTilemap + xor a ; PARTYMON + ld [wMonType], a + ld a, [wCurSpecies] + ld [wTempSpecies], a ; unused? + ld a, [wCurPartyLevel] + push af + ld c, a + ld a, [wTempLevel] + ld b, a + +.level_loop + inc b + ld a, b + ld [wCurPartyLevel], a + push bc + predef LearnLevelMoves + pop bc + ld a, b + cp c + jr nz, .level_loop + pop af + ld [wCurPartyLevel], a + ld hl, wEvolvableFlags + ld a, [wCurPartyMon] + ld c, a + ld b, SET_FLAG + predef SmallFarFlagAction + pop af + ld [wCurPartyLevel], a + +.next_mon + ld a, [wPartyCount] + ld b, a + ld a, [wCurPartyMon] + inc a + cp b + jr z, .done + ld [wCurPartyMon], a + ld a, MON_SPECIES + call GetPartyParamLocation + ld b, h + ld c, l + jp .loop + +.done + jp ResetBattleParticipants + +.EvenlyDivideExpAmongParticipants: +; count number of battle participants + ld a, [wBattleParticipantsNotFainted] + ld b, a + ld c, PARTY_LENGTH + ld d, 0 +.count_loop + xor a + srl b + adc d + ld d, a + dec c + jr nz, .count_loop + cp 2 + ret c + + ld [wTempByteValue], a + ld hl, wEnemyMonBaseStats + ld c, wEnemyMonEnd - wEnemyMonBaseStats +.base_stat_division_loop + xor a + ldh [hDividend + 0], a + ld a, [hl] + ldh [hDividend + 1], a + ld a, [wTempByteValue] + ldh [hDivisor], a + ld b, 2 + call Divide + ldh a, [hQuotient + 3] + ld [hli], a + dec c + jr nz, .base_stat_division_loop + ret + +BoostExp: +; Multiply experience by 1.5x + push bc +; load experience value + ldh a, [hProduct + 2] + ld b, a + ldh a, [hProduct + 3] + ld c, a +; halve it + srl b + rr c +; add it back to the whole exp value + add c + ldh [hProduct + 3], a + ldh a, [hProduct + 2] + adc b + ldh [hProduct + 2], a + pop bc + ret + +Text_MonGainedExpPoint: + text_far Text_Gained + text_asm + ld hl, ExpPointsText + ld a, [wStringBuffer2 + 2] ; IsTradedMon + and a + ret z + + ld hl, BoostedExpPointsText + ret + +BoostedExpPointsText: + text_far _BoostedExpPointsText + text_end + +ExpPointsText: + text_far _ExpPointsText + text_end + +AnimateExpBar: + push bc + + ld hl, wCurPartyMon + ld a, [wCurBattleMon] + cp [hl] + jp nz, .finish + + ld a, [wBattleMonLevel] + cp MAX_LEVEL + jp nc, .finish + + ldh a, [hProduct + 3] + ld [wExperienceGained + 2], a + push af + ldh a, [hProduct + 2] + ld [wExperienceGained + 1], a + push af + xor a + ld [wExperienceGained], a + xor a ; PARTYMON + ld [wMonType], a + predef CopyMonToTempMon + ld a, [wTempMonLevel] + ld b, a + ld e, a + push de + ld de, wTempMonExp + 2 + call CalcExpBar + push bc + ld hl, wTempMonExp + 2 + ld a, [wExperienceGained + 2] + add [hl] + ld [hld], a + ld a, [wExperienceGained + 1] + adc [hl] + ld [hld], a + jr nc, .NoOverflow + inc [hl] + jr nz, .NoOverflow + ld a, $ff + ld [hli], a + ld [hli], a + ld [hl], a + +.NoOverflow: + ld d, MAX_LEVEL + callfar CalcExpAtLevel + ldh a, [hProduct + 1] + ld b, a + ldh a, [hProduct + 2] + ld c, a + ldh a, [hProduct + 3] + ld d, a + ld hl, wTempMonExp + 2 + ld a, [hld] + sub d + ld a, [hld] + sbc c + ld a, [hl] + sbc b + jr c, .AlreadyAtMaxExp + ld a, b + ld [hli], a + ld a, c + ld [hli], a + ld a, d + ld [hld], a + +.AlreadyAtMaxExp: + callfar CalcLevel + ld a, d + pop bc + pop de + ld d, a + cp e + jr nc, .LoopLevels + ld a, e + ld d, a + +.LoopLevels: + ld a, e + cp MAX_LEVEL + jr nc, .FinishExpBar + cp d + jr z, .FinishExpBar + inc a + ld [wTempMonLevel], a + ld [wCurPartyLevel], a + ld [wBattleMonLevel], a + push de + call .PlayExpBarSound + ld c, $40 + call .LoopBarAnimation + call PrintPlayerHUD + ld hl, wBattleMonNickname + ld de, wStringBuffer1 + ld bc, MON_NAME_LENGTH + call CopyBytes + call TerminateExpBarSound + ld de, SFX_HIT_END_OF_EXP_BAR + call PlaySFX + farcall AnimateEndOfExpBar + call WaitSFX + ld hl, BattleText_StringBuffer1GrewToLevel + call StdBattleTextbox + pop de + inc e + ld b, $0 + jr .LoopLevels + +.FinishExpBar: + push bc + ld b, d + ld de, wTempMonExp + 2 + call CalcExpBar + ld a, b + pop bc + ld c, a + call .PlayExpBarSound + call .LoopBarAnimation + call TerminateExpBarSound + pop af + ldh [hProduct + 2], a + pop af + ldh [hProduct + 3], a + +.finish + pop bc + ret + +.PlayExpBarSound: + push bc + call WaitSFX + ld de, SFX_EXP_BAR + call PlaySFX + ld c, 10 + call DelayFrames + pop bc + ret + +.LoopBarAnimation: + ld d, 3 + dec b +.anim_loop + inc b + push bc + push de + hlcoord 17, 11 + call PlaceExpBar + pop de + ld a, $1 + ldh [hBGMapMode], a + ld c, d + call DelayFrames + xor a + ldh [hBGMapMode], a + pop bc + ld a, c + cp b + jr z, .end_animation + inc b + push bc + push de + hlcoord 17, 11 + call PlaceExpBar + pop de + ld a, $1 + ldh [hBGMapMode], a + ld c, d + call DelayFrames + xor a + ldh [hBGMapMode], a + dec d + jr nz, .min_number_of_frames + ld d, 1 +.min_number_of_frames + pop bc + ld a, c + cp b + jr nz, .anim_loop +.end_animation + ld a, $1 + ldh [hBGMapMode], a + ret + +SendOutMonText: + ld a, [wLinkMode] + and a + jr z, .not_linked + +; If we're in a LinkBattle print just "Go " +; unless DoBattle already set [wBattleHasJustStarted] + ld hl, GoMonText + ld a, [wBattleHasJustStarted] + and a + jr nz, .skip_to_textbox + +.not_linked +; Depending on the HP of the enemy mon, the game prints a different text + ld hl, wEnemyMonHP + ld a, [hli] + or [hl] + ld hl, GoMonText + jr z, .skip_to_textbox + +; BUG: Switching out or switching against a Pokémon with max HP below 4 freezes the game (see docs/bugs_and_glitches.md) + ; compute enemy health remaining as a percentage + xor a + ldh [hMultiplicand + 0], a + ld hl, wEnemyMonHP + ld a, [hli] + ld [wEnemyHPAtTimeOfPlayerSwitch], a + ldh [hMultiplicand + 1], a + ld a, [hl] + ld [wEnemyHPAtTimeOfPlayerSwitch + 1], a + ldh [hMultiplicand + 2], a + ld a, 25 + ldh [hMultiplier], a + call Multiply + ld hl, wEnemyMonMaxHP + ld a, [hli] + ld b, [hl] + srl a + rr b + srl a + rr b + ld a, b + ld b, 4 + ldh [hDivisor], a + call Divide + + ldh a, [hQuotient + 3] + ld hl, GoMonText + cp 70 + jr nc, .skip_to_textbox + + ld hl, DoItMonText + cp 40 + jr nc, .skip_to_textbox + + ld hl, GoForItMonText + cp 10 + jr nc, .skip_to_textbox + + ld hl, YourFoesWeakGetmMonText +.skip_to_textbox + jp BattleTextbox + +GoMonText: + text_far _GoMonText + text_asm + jr PrepareBattleMonNicknameText + +DoItMonText: + text_far _DoItMonText + text_asm + jr PrepareBattleMonNicknameText + +GoForItMonText: + text_far _GoForItMonText + text_asm + jr PrepareBattleMonNicknameText + +YourFoesWeakGetmMonText: + text_far _YourFoesWeakGetmMonText + text_asm +PrepareBattleMonNicknameText: + ld hl, BattleMonNicknameText + ret + +BattleMonNicknameText: + text_far _BattleMonNicknameText + text_end + +WithdrawMonText: + ld hl, .WithdrawMonText + jp BattleTextbox + +.WithdrawMonText: + text_far _BattleMonNickCommaText + text_asm +; Depending on the HP lost since the enemy mon was sent out, the game prints a different text + push de + push bc + ; compute enemy health lost as a percentage + ld hl, wEnemyMonHP + 1 + ld de, wEnemyHPAtTimeOfPlayerSwitch + 1 + ld b, [hl] + dec hl + ld a, [de] + sub b + ldh [hMultiplicand + 2], a + dec de + ld b, [hl] + ld a, [de] + sbc b + ldh [hMultiplicand + 1], a + ld a, 25 + ldh [hMultiplier], a + call Multiply + ld hl, wEnemyMonMaxHP + ld a, [hli] + ld b, [hl] + srl a + rr b + srl a + rr b + ld a, b + ld b, 4 + ldh [hDivisor], a + call Divide + pop bc + pop de + ldh a, [hQuotient + 3] + ld hl, ThatsEnoughComeBackText + and a + ret z + + ld hl, ComeBackText + cp 30 + ret c + + ld hl, OKComeBackText + cp 70 + ret c + + ld hl, GoodComeBackText + ret + +ThatsEnoughComeBackText: + text_far _ThatsEnoughComeBackText + text_end + +OKComeBackText: + text_far _OKComeBackText + text_end + +GoodComeBackText: + text_far _GoodComeBackText + text_end + +TextJump_ComeBack: ; unreferenced + ld hl, ComeBackText + ret + +ComeBackText: + text_far _ComeBackText + text_end + +HandleSafariAngerEatingStatus: ; unreferenced + ld hl, wSafariMonEating + ld a, [hl] + and a + jr z, .angry + dec [hl] + ld hl, BattleText_WildMonIsEating + jr .finish + +.angry + dec hl + assert wSafariMonEating - 1 == wSafariMonAngerCount + ld a, [hl] + and a + ret z + dec [hl] + ld hl, BattleText_WildMonIsAngry + jr nz, .finish + push hl + ld a, [wEnemyMonSpecies] + ld [wCurSpecies], a + call GetBaseData + ld a, [wBaseCatchRate] + ld [wEnemyMonCatchRate], a + pop hl + +.finish + push hl + call SafeLoadTempTilemapToTilemap + pop hl + jp StdBattleTextbox + +FillInExpBar: + push hl + call CalcExpBar + pop hl + ld de, 7 + add hl, de + jp PlaceExpBar + +CalcExpBar: +; Calculate the percent exp between this level and the next +; Level in b + push de + ld d, b + push de + callfar CalcExpAtLevel + pop de +; exp at current level gets pushed to the stack + ld hl, hMultiplicand + ld a, [hli] + push af + ld a, [hli] + push af + ld a, [hl] + push af +; next level + inc d + callfar CalcExpAtLevel +; back up the next level exp, and subtract the two levels + ld hl, hMultiplicand + 2 + ld a, [hl] + ldh [hMathBuffer + 2], a + pop bc + sub b + ld [hld], a + ld a, [hl] + ldh [hMathBuffer + 1], a + pop bc + sbc b + ld [hld], a + ld a, [hl] + ldh [hMathBuffer], a + pop bc + sbc b + ld [hl], a + pop de + + ld hl, hMultiplicand + 1 + ld a, [hli] + push af + ld a, [hl] + push af + +; get the amount of exp remaining to the next level + ld a, [de] + dec de + ld c, a + ldh a, [hMathBuffer + 2] + sub c + ld [hld], a + ld a, [de] + dec de + ld b, a + ldh a, [hMathBuffer + 1] + sbc b + ld [hld], a + ld a, [de] + ld c, a + ldh a, [hMathBuffer] + sbc c + ld [hld], a + xor a + ld [hl], a + ld a, 64 + ldh [hMultiplier], a + call Multiply + pop af + ld c, a + pop af + ld b, a +.loop + ld a, b + and a + jr z, .done + srl b + rr c + ld hl, hProduct + srl [hl] + inc hl + rr [hl] + inc hl + rr [hl] + inc hl + rr [hl] + jr .loop + +.done + ld a, c + ldh [hDivisor], a + ld b, 4 + call Divide + ldh a, [hQuotient + 3] + ld b, a + ld a, $40 + sub b + ld b, a + ret + +PlaceExpBar: + ld c, $8 ; number of tiles +.loop1 + ld a, b + sub $8 + jr c, .next + ld b, a + ld a, $6a ; full bar + ld [hld], a + dec c + jr z, .finish + jr .loop1 + +.next + add $8 + jr z, .loop2 + add $54 ; tile to the left of small exp bar tile + jr .skip + +.loop2 + ld a, $62 ; empty bar + +.skip + ld [hld], a + ld a, $62 ; empty bar + dec c + jr nz, .loop2 + +.finish + ret + +GetBattleMonBackpic: + ld a, [wPlayerSubStatus4] + bit SUBSTATUS_SUBSTITUTE, a + ld hl, BattleAnimCmd_RaiseSub + jr nz, GetBattleMonBackpic_DoAnim ; substitute + +DropPlayerSub: + ld a, [wPlayerMinimized] + and a + ld hl, BattleAnimCmd_MinimizeOpp + jr nz, GetBattleMonBackpic_DoAnim + ld a, [wCurPartySpecies] + push af + ld a, [wBattleMonSpecies] + ld [wCurPartySpecies], a + ld hl, wBattleMonDVs + predef GetUnownLetter + ld de, vTiles2 tile $31 + predef GetMonBackpic + pop af + ld [wCurPartySpecies], a + ret + +GetBattleMonBackpic_DoAnim: + ldh a, [hBattleTurn] + push af + xor a + ldh [hBattleTurn], a + ld a, BANK(BattleAnimCommands) + rst FarCall + pop af + ldh [hBattleTurn], a + ret + +GetEnemyMonFrontpic: + ld a, [wEnemySubStatus4] + bit SUBSTATUS_SUBSTITUTE, a + ld hl, BattleAnimCmd_RaiseSub + jr nz, GetEnemyMonFrontpic_DoAnim + +DropEnemySub: + ld a, [wEnemyMinimized] + and a + ld hl, BattleAnimCmd_MinimizeOpp + jr nz, GetEnemyMonFrontpic_DoAnim + + ld a, [wCurPartySpecies] + push af + ld a, [wEnemyMonSpecies] + ld [wCurSpecies], a + ld [wCurPartySpecies], a + call GetBaseData + ld hl, wEnemyMonDVs + predef GetUnownLetter + ld de, vTiles2 + predef GetAnimatedFrontpic + pop af + ld [wCurPartySpecies], a + ret + +GetEnemyMonFrontpic_DoAnim: + ldh a, [hBattleTurn] + push af + call SetEnemyTurn + ld a, BANK(BattleAnimCommands) + rst FarCall + pop af + ldh [hBattleTurn], a + ret + +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. + ld a, [wPartyCount] + and a + ret z + + ld a, [wTimeOfDayPal] + push af + call BattleIntro + call DoBattle + call ExitBattle + pop af + ld [wTimeOfDayPal], a + scf + ret + +CallDoBattle: ; unreferenced + call DoBattle + ret + +BattleIntro: + farcall StubbedTrainerRankings_Battles ; mobile + call LoadTrainerOrWildMonPic + xor a + ld [wTempBattleMonSpecies], a + ld [wBattleMenuCursorPosition], a + xor a + ldh [hMapAnims], a + farcall PlayBattleMusic + farcall ShowLinkBattleParticipants + farcall FindFirstAliveMonAndStartBattle + call DisableSpriteUpdates + farcall ClearBattleRAM + call InitEnemy + call BackUpBGMap2 + ld b, SCGB_BATTLE_GRAYSCALE + call GetSGBLayout + ld hl, rLCDC + res rLCDC_WINDOW_TILEMAP, [hl] ; select vBGMap0/vBGMap2 + call InitBattleDisplay + call BattleStartMessage + ld hl, rLCDC + set rLCDC_WINDOW_TILEMAP, [hl] ; select vBGMap1/vBGMap3 + xor a + ldh [hBGMapMode], a + call EmptyBattleTextbox + hlcoord 9, 7 + lb bc, 5, 11 + call ClearBox + hlcoord 1, 0 + lb bc, 4, 10 + call ClearBox + call ClearSprites + ld a, [wBattleMode] + cp WILD_BATTLE + call z, UpdateEnemyHUD + ld a, $1 + ldh [hBGMapMode], a + ret + +LoadTrainerOrWildMonPic: + ld a, [wOtherTrainerClass] + and a + jr nz, .Trainer + ld a, [wTempWildMonSpecies] + ld [wCurPartySpecies], a + +.Trainer: + ld [wTempEnemyMonSpecies], a + ret + +InitEnemy: + ld a, [wOtherTrainerClass] + and a + jp nz, InitEnemyTrainer ; trainer + jp InitEnemyWildmon ; wild + +BackUpBGMap2: + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + ld hl, wDecompressScratch + ld bc, $40 tiles ; vBGMap3 - vBGMap2 + ld a, $2 + call ByteFill + ldh a, [rVBK] + push af + ld a, $1 + ldh [rVBK], a + ld de, wDecompressScratch + hlbgcoord 0, 0 ; vBGMap2 + lb bc, BANK(BackUpBGMap2), $40 + call Request2bpp + pop af + ldh [rVBK], a + pop af + ldh [rSVBK], a + ret + +InitEnemyTrainer: + ld [wTrainerClass], a + farcall StubbedTrainerRankings_TrainerBattles + xor a + ld [wTempEnemyMonSpecies], a + callfar GetTrainerAttributes + callfar ReadTrainerParty + + ; RIVAL1's first mon has no held item + ld a, [wTrainerClass] + cp RIVAL1 + jr nz, .ok + xor a + ld [wOTPartyMon1Item], a + +.ok + ld de, vTiles2 + callfar GetTrainerPic + xor a + ldh [hGraphicStartTile], a + dec a + ld [wEnemyItemState], a + hlcoord 12, 0 + lb bc, 7, 7 + predef PlaceGraphic + ld a, -1 + ld [wCurOTMon], a + ld a, TRAINER_BATTLE + ld [wBattleMode], a + + call IsGymLeader + jr nc, .done + xor a + ld [wCurPartyMon], a + ld a, [wPartyCount] + ld b, a +.partyloop + push bc + ld a, MON_HP + call GetPartyParamLocation + ld a, [hli] + or [hl] + jr z, .skipfaintedmon + ld c, HAPPINESS_GYMBATTLE + callfar ChangeHappiness +.skipfaintedmon + pop bc + dec b + jr z, .done + ld hl, wCurPartyMon + inc [hl] + jr .partyloop +.done + ret + +InitEnemyWildmon: + ld a, WILD_BATTLE + ld [wBattleMode], a + farcall StubbedTrainerRankings_WildBattles + call LoadEnemyMon + ld hl, wEnemyMonMoves + ld de, wWildMonMoves + ld bc, NUM_MOVES + call CopyBytes + ld hl, wEnemyMonPP + ld de, wWildMonPP + ld bc, NUM_MOVES + call CopyBytes + ld hl, wEnemyMonDVs + predef GetUnownLetter + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld a, l + sub UNOWN + if HIGH(UNOWN) == 0 + or h + else + jr nz, .skip_unown + if HIGH(UNOWN) == 1 + dec h + else + ld a, h + cp HIGH(UNOWN) + endc + endc + jr nz, .skip_unown + ld a, [wFirstUnownSeen] + and a + jr nz, .skip_unown + ld a, [wUnownLetter] + ld [wFirstUnownSeen], a +.skip_unown + ld de, vTiles2 + predef GetAnimatedFrontpic + xor a + ld [wTrainerClass], a + ldh [hGraphicStartTile], a + hlcoord 12, 0 + lb bc, 7, 7 + predef PlaceGraphic + ret + +FillEnemyMovesFromMoveIndicesBuffer: ; unreferenced + ld hl, wEnemyMonMoves + ld de, wListMoves_MoveIndicesBuffer + ld b, NUM_MOVES +.loop + ld a, [de] + inc de + ld [hli], a + and a + jr z, .clearpp + + push bc + push hl + + push hl + ld l, a + ld a, MOVE_PP + call GetMoveAttribute + pop hl + + ld bc, wEnemyMonPP - (wEnemyMonMoves + 1) + add hl, bc + ld [hl], a + + pop hl + pop bc + + dec b + jr nz, .loop + ret + +.clear + xor a + ld [hli], a + +.clearpp + push bc + push hl + ld bc, wEnemyMonPP - (wEnemyMonMoves + 1) + add hl, bc + xor a + ld [hl], a + pop hl + pop bc + dec b + jr nz, .clear + ret + +ExitBattle: + call .HandleEndOfBattle + call CleanUpBattleRAM + ret + +.HandleEndOfBattle: + ld a, [wLinkMode] + and a + jr z, .not_linked + call ShowLinkBattleParticipantsAfterEnd + ld c, 150 + call DelayFrames + call DisplayLinkBattleResult + ret + +.not_linked + ld a, [wBattleResult] + and $f + ret nz + call CheckPayDay + xor a + ld [wForceEvolution], a + predef EvolveAfterBattle + farcall GivePokerusAndConvertBerries + ret + +CleanUpBattleRAM: + call BattleEnd_HandleRoamMons + xor a + ld [wLowHealthAlarm], a + ld [wBattleMode], a + ld [wBattleType], a + ld [wAttackMissed], a + ld [wTempWildMonSpecies], a + ld [wOtherTrainerClass], a + ld [wFailedToFlee], a + ld [wNumFleeAttempts], a + ld [wForcedSwitch], a + ld [wPartyMenuCursor], a + ld [wKeyItemsPocketCursor], a + ld [wItemsPocketCursor], a + ld [wBattleMenuCursorPosition], a + ld [wCurMoveNum], a + ld [wBallsPocketCursor], a + ld [wLastPocket], a + ld [wMenuScrollPosition], a + ld [wKeyItemsPocketScrollPosition], a + ld [wItemsPocketScrollPosition], a + ld [wBallsPocketScrollPosition], a + ld hl, wPlayerSubStatus1 + ld b, wEnemyFuryCutterCount - wPlayerSubStatus1 +.loop + ld [hli], a + dec b + jr nz, .loop + call WaitSFX + ret + +CheckPayDay: + ld hl, wPayDayMoney + ld a, [hli] + or [hl] + inc hl + or [hl] + ret z + ld a, [wAmuletCoin] + and a + jr z, .okay + ld hl, wPayDayMoney + 2 + sla [hl] + dec hl + rl [hl] + dec hl + rl [hl] + jr nc, .okay + ld a, $ff + ld [hli], a + ld [hli], a + ld [hl], a + +.okay + ld hl, wPayDayMoney + 2 + ld de, wMoney + 2 + call AddBattleMoneyToAccount + ld hl, BattleText_PlayerPickedUpPayDayMoney + call StdBattleTextbox + ld a, [wInBattleTowerBattle] + bit 0, a + ret z + call ClearTilemap + call ClearBGPalettes + ret + +ShowLinkBattleParticipantsAfterEnd: + farcall StubbedTrainerRankings_LinkBattles + farcall BackupMobileEventIndex + ld a, [wCurOTMon] + ld hl, wOTPartyMon1Status + call GetPartyLocation + ld a, [wEnemyMonStatus] + ld [hl], a + call ClearTilemap + farcall _ShowLinkBattleParticipants + ret + +DisplayLinkBattleResult: + farcall CheckMobileBattleError + jp c, .Mobile_InvalidBattle + call IsMobileBattle2 + jr nz, .proceed + + ld hl, wcd2a + bit 4, [hl] + jr z, .proceed + + farcall DetermineLinkBattleResult + +.proceed + ld a, [wBattleResult] + and $f + cp LOSE + jr c, .win ; WIN + jr z, .lose ; LOSE + ; DRAW + farcall StubbedTrainerRankings_ColosseumDraws + ld de, .Draw + jr .store_result + +.win + farcall StubbedTrainerRankings_ColosseumWins + ld de, .YouWin + jr .store_result + +.lose + farcall StubbedTrainerRankings_ColosseumLosses + ld de, .YouLose + jr .store_result + +.store_result + hlcoord 6, 8 + call PlaceString + farcall BackupMobileEventIndex + ld c, 200 + call DelayFrames + + ld a, BANK(sLinkBattleStats) + call OpenSRAM + + call AddLastLinkBattleToLinkRecord + call ReadAndPrintLinkBattleRecord + + call CloseSRAM + + call IsMobileBattle2 + jr z, .mobile + call WaitPressAorB_BlinkCursor + call ClearTilemap + ret + +.mobile + ld c, 200 + call DelayFrames + call ClearTilemap + ret + +.YouWin: + db "YOU WIN@" +.YouLose: + db "YOU LOSE@" +.Draw: + db " DRAW@" + +.Mobile_InvalidBattle: + hlcoord 6, 8 + ld de, .InvalidBattle + call PlaceString + ld c, 200 + call DelayFrames + call ClearTilemap + ret + +.InvalidBattle: + db "INVALID BATTLE@" + +IsMobileBattle2: + ld a, [wLinkMode] + cp LINK_MOBILE + ret + +_DisplayLinkRecord: + ld a, BANK(sLinkBattleStats) + call OpenSRAM + + call ReadAndPrintLinkBattleRecord + + call CloseSRAM + hlcoord 0, 0, wAttrmap + xor a + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + call WaitBGMap2 + ld b, SCGB_DIPLOMA + call GetSGBLayout + call SetPalettes + ld c, 8 + call DelayFrames + call WaitPressAorB_BlinkCursor + ret + +ReadAndPrintLinkBattleRecord: + call ClearTilemap + call ClearSprites + call .PrintBattleRecord + hlcoord 0, 8 + ld b, NUM_LINK_BATTLE_RECORDS + ld de, sLinkBattleRecord1Name +.loop + push bc + push hl + push de + ld a, [de] + and a + jr z, .PrintFormatString + ld a, [wSavedAtLeastOnce] + and a + jr z, .PrintFormatString + push hl + push hl + ld h, d + ld l, e + ld de, wLinkBattleRecordName + ld bc, NAME_LENGTH - 1 + call CopyBytes + ld a, "@" + ld [de], a + inc de ; wLinkBattleRecordWins + ld bc, 6 + call CopyBytes + ld de, wLinkBattleRecordName + pop hl + call PlaceString + pop hl + ld de, 26 + add hl, de + push hl + ld de, wLinkBattleRecordWins + lb bc, 2, 4 + call PrintNum + pop hl + ld de, 5 + add hl, de + push hl + ld de, wLinkBattleRecordLosses + lb bc, 2, 4 + call PrintNum + pop hl + ld de, 5 + add hl, de + ld de, wLinkBattleRecordDraws + lb bc, 2, 4 + call PrintNum + jr .next + +.PrintFormatString: + ld de, .Format + call PlaceString +.next + pop hl + ld bc, LINK_BATTLE_RECORD_LENGTH + add hl, bc + ld d, h + ld e, l + pop hl + ld bc, 2 * SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .loop + ret + +.PrintBattleRecord: + hlcoord 1, 0 + ld de, .Record + call PlaceString + + hlcoord 0, 6 + ld de, .Result + call PlaceString + + hlcoord 0, 2 + ld de, .Total + call PlaceString + + hlcoord 6, 4 + ld de, sLinkBattleWins + call .PrintZerosIfNoSaveFileExists + jr c, .quit + + lb bc, 2, 4 + call PrintNum + + hlcoord 11, 4 + ld de, sLinkBattleLosses + call .PrintZerosIfNoSaveFileExists + + lb bc, 2, 4 + call PrintNum + + hlcoord 16, 4 + ld de, sLinkBattleDraws + call .PrintZerosIfNoSaveFileExists + + lb bc, 2, 4 + call PrintNum + +.quit + ret + +.PrintZerosIfNoSaveFileExists: + ld a, [wSavedAtLeastOnce] + and a + ret nz + ld de, .Scores + call PlaceString + scf + ret + +.Scores: + db " 0 0 0@" + +.Format: + db " --- " + db " - - -@" +.Record: + db "'s RECORD@" +.Result: + db "RESULT WIN LOSE DRAW@" +.Total: + db "TOTAL WIN LOSE DRAW@" + +BattleEnd_HandleRoamMons: + ld a, [wBattleType] + cp BATTLETYPE_ROAMING + jr nz, .not_roaming + ld a, [wBattleResult] + and $f + jr z, .caught_or_defeated_roam_mon ; WIN + call GetRoamMonHP + ld a, [wEnemyMonHP + 1] + ld [hl], a + jr .update_roam_mons + +.caught_or_defeated_roam_mon + call GetRoamMonHP + ld [hl], 0 + call GetRoamMonMapGroup + ld [hl], GROUP_N_A + call GetRoamMonMapNumber + ld [hl], MAP_N_A + call GetRoamMonSpecies + ld [hl], 0 + ret + +.not_roaming + call BattleRandom + and $f + ret nz + +.update_roam_mons + callfar UpdateRoamMons + ret + +GetRoamMonMapGroup: + ld a, [wTempEnemyMonSpecies] + ld b, a + ld a, [wRoamMon1Species] + cp b + ld hl, wRoamMon1MapGroup + ret z + ld a, [wRoamMon2Species] + cp b + ld hl, wRoamMon2MapGroup + ret z + ld hl, wRoamMon3MapGroup + ret + +GetRoamMonMapNumber: + ld a, [wTempEnemyMonSpecies] + ld b, a + ld a, [wRoamMon1Species] + cp b + ld hl, wRoamMon1MapNumber + ret z + ld a, [wRoamMon2Species] + cp b + ld hl, wRoamMon2MapNumber + ret z + ld hl, wRoamMon3MapNumber + ret + +GetRoamMonHP: +; output: hl = wRoamMonHP + ld a, [wTempEnemyMonSpecies] + ld b, a + ld a, [wRoamMon1Species] + cp b + ld hl, wRoamMon1HP + ret z + ld a, [wRoamMon2Species] + cp b + ld hl, wRoamMon2HP + ret z + ld hl, wRoamMon3HP + ret + +GetRoamMonDVs: +; output: hl = wRoamMonDVs + ld a, [wTempEnemyMonSpecies] + ld b, a + ld a, [wRoamMon1Species] + cp b + ld hl, wRoamMon1DVs + ret z + ld a, [wRoamMon2Species] + cp b + ld hl, wRoamMon2DVs + ret z + ld hl, wRoamMon3DVs + ret + +GetRoamMonSpecies: + ld a, [wTempEnemyMonSpecies] + ld hl, wRoamMon1Species + cp [hl] + ret z + ld hl, wRoamMon2Species + cp [hl] + ret z + ld hl, wRoamMon3Species + ret + +AddLastLinkBattleToLinkRecord: + ld hl, wOTPlayerID + ld de, wStringBuffer1 + ld bc, 2 + call CopyBytes + ld hl, wOTPlayerName + ld bc, NAME_LENGTH - 1 + call CopyBytes + ld hl, sLinkBattleStats - (LINK_BATTLE_RECORD_LENGTH - 6) + call .StoreResult + ld hl, sLinkBattleRecord + ld d, NUM_LINK_BATTLE_RECORDS +.loop + push hl + inc hl + inc hl + ld a, [hl] + dec hl + dec hl + and a + jr z, .copy + push de + ld bc, LINK_BATTLE_RECORD_LENGTH - 6 + ld de, wStringBuffer1 + call CompareBytesLong + pop de + pop hl + jr c, .done + ld bc, LINK_BATTLE_RECORD_LENGTH + add hl, bc + dec d + jr nz, .loop + ld bc, -LINK_BATTLE_RECORD_LENGTH + add hl, bc + push hl + +.copy + ld d, h + ld e, l + ld hl, wStringBuffer1 + ld bc, LINK_BATTLE_RECORD_LENGTH - 6 + call CopyBytes + ld b, 6 + xor a +.loop2 + ld [de], a + inc de + dec b + jr nz, .loop2 + pop hl + +.done + call .StoreResult + call .FindOpponentAndAppendRecord + ret + +.StoreResult: + ld a, [wBattleResult] + and $f + cp LOSE + ld bc, (sLinkBattleRecord1Wins - sLinkBattleRecord1) + 1 + jr c, .okay ; WIN + ld bc, (sLinkBattleRecord1Losses - sLinkBattleRecord1) + 1 + jr z, .okay ; LOSE + ; DRAW + ld bc, (sLinkBattleRecord1Draws - sLinkBattleRecord1) + 1 +.okay + add hl, bc + call .CheckOverflow + ret nc + inc [hl] + ret nz + dec hl + inc [hl] + ret + +.CheckOverflow: + dec hl + ld a, [hl] + inc hl + cp HIGH(MAX_LINK_RECORD) + ret c + ld a, [hl] + cp LOW(MAX_LINK_RECORD) + ret + +.FindOpponentAndAppendRecord: + ld b, NUM_LINK_BATTLE_RECORDS + ld hl, sLinkBattleRecord1End - 1 + ld de, wLinkBattleRecordBuffer +.loop3 + push bc + push de + push hl + call .LoadPointer + pop hl + ld a, e + pop de + ld [de], a + inc de + ld a, b + ld [de], a + inc de + ld a, c + ld [de], a + inc de + ld bc, LINK_BATTLE_RECORD_LENGTH + add hl, bc + pop bc + dec b + jr nz, .loop3 + ld b, $0 + ld c, $1 +.loop4 + ld a, b + add b + add b + ld e, a + ld d, 0 + ld hl, wLinkBattleRecordBuffer + add hl, de + push hl + ld a, c + add c + add c + ld e, a + ld d, 0 + ld hl, wLinkBattleRecordBuffer + add hl, de + ld d, h + ld e, l + pop hl + push bc + ld c, 3 + call CompareBytes + pop bc + jr z, .equal + jr nc, .done2 + +.equal + inc c + ld a, c + cp $5 + jr nz, .loop4 + inc b + ld c, b + inc c + ld a, b + cp $4 + jr nz, .loop4 + ret + +.done2 + push bc + ld a, b + ld bc, LINK_BATTLE_RECORD_LENGTH + ld hl, sLinkBattleRecord + call AddNTimes + push hl + ld de, wLinkBattleRecordBuffer + ld bc, LINK_BATTLE_RECORD_LENGTH + call CopyBytes + pop hl + pop bc + push hl + ld a, c + ld bc, LINK_BATTLE_RECORD_LENGTH + ld hl, sLinkBattleRecord + call AddNTimes + pop de + push hl + ld bc, LINK_BATTLE_RECORD_LENGTH + call CopyBytes + ld hl, wLinkBattleRecordBuffer + ld bc, LINK_BATTLE_RECORD_LENGTH + pop de + call CopyBytes + ret + +.LoadPointer: + ld e, $0 + ld a, [hld] + ld c, a + ld a, [hld] + ld b, a + ld a, [hld] + add c + ld c, a + ld a, [hld] + adc b + ld b, a + jr nc, .okay2 + inc e + +.okay2 + ld a, [hld] + add c + ld c, a + ld a, [hl] + adc b + ld b, a + ret nc + inc e + ret + +InitBattleDisplay: + call .InitBackPic + hlcoord 0, 12 + ld b, 4 + ld c, 18 + call Textbox + farcall MobileTextBorder + hlcoord 1, 5 + lb bc, 3, 7 + call ClearBox + call LoadStandardFont + call _LoadBattleFontsHPBar + call .BlankBGMap + xor a + ldh [hMapAnims], a + ldh [hSCY], a + ld a, $90 + ldh [hWY], a + ldh [rWY], a + call WaitBGMap + xor a + ldh [hBGMapMode], a + farcall BattleIntroSlidingPics + ld a, $1 + ldh [hBGMapMode], a + ld a, $31 + ldh [hGraphicStartTile], a + hlcoord 2, 6 + lb bc, 6, 6 + predef PlaceGraphic + xor a + ldh [hWY], a + vc_hook Unknown_InitBattleDisplay + ldh [rWY], a + call WaitBGMap + call HideSprites + ld b, SCGB_BATTLE_COLORS + call GetSGBLayout + call SetPalettes + ld a, $90 + ldh [hWY], a + xor a + ldh [hSCX], a + ret + +.BlankBGMap: + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + + ld hl, wDecompressScratch + ld bc, BG_MAP_WIDTH * BG_MAP_HEIGHT + ld a, " " + call ByteFill + + ld de, wDecompressScratch + hlbgcoord 0, 0 + lb bc, BANK(@), (BG_MAP_WIDTH * BG_MAP_HEIGHT) / LEN_2BPP_TILE + call Request2bpp + + pop af + ldh [rSVBK], a + ret + +.InitBackPic: + call GetTrainerBackpic + call CopyBackpic + ret + +GetTrainerBackpic: +; Load the player character's backpic (6x6) into VRAM starting from vTiles2 tile $31. + +; Special exception for Dude. + ld b, BANK(DudeBackpic) + ld hl, DudeBackpic + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL + jr z, .Decompress + +; What gender are we? + ld a, [wPlayerSpriteSetupFlags] + bit PLAYERSPRITESETUP_FEMALE_TO_MALE_F, a + jr nz, .Chris + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .Chris + +; It's a girl. + farcall GetKrisBackpic + ret + +.Chris: +; It's a boy. + ld b, BANK(ChrisBackpic) + ld hl, ChrisBackpic + +.Decompress: + ld de, vTiles2 tile $31 + ld c, 7 * 7 + predef DecompressGet2bpp + ret + +CopyBackpic: + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + ld hl, vTiles0 + ld de, vTiles2 tile $31 + ldh a, [hROMBank] + ld b, a + ld c, 7 * 7 + call Get2bpp + pop af + ldh [rSVBK], a + call .LoadTrainerBackpicAsOAM + ld a, $31 + ldh [hGraphicStartTile], a + hlcoord 2, 6 + lb bc, 6, 6 + predef PlaceGraphic + ret + +.LoadTrainerBackpicAsOAM: + ld hl, wShadowOAMSprite00 + xor a + ldh [hMapObjectIndex], a + ld b, 6 + ld e, (SCREEN_WIDTH + 1) * TILE_WIDTH +.outer_loop + ld c, 3 + ld d, 8 * TILE_WIDTH +.inner_loop + ld [hl], d ; y + inc hl + ld [hl], e ; x + inc hl + ldh a, [hMapObjectIndex] + ld [hli], a ; tile id + inc a + ldh [hMapObjectIndex], a + ld a, PAL_BATTLE_OB_PLAYER + ld [hli], a ; attributes + ld a, d + add 1 * TILE_WIDTH + ld d, a + dec c + jr nz, .inner_loop + ldh a, [hMapObjectIndex] + add $3 + ldh [hMapObjectIndex], a + ld a, e + add 1 * TILE_WIDTH + ld e, a + dec b + jr nz, .outer_loop + ret + +BattleStartMessage: + ld a, [wBattleMode] + dec a + jr z, .wild + + ld de, SFX_SHINE + call PlaySFX + call WaitSFX + + ld c, 20 + call DelayFrames + + farcall Battle_GetTrainerName + + ld hl, WantsToBattleText + jr .PlaceBattleStartText + +.wild + call BattleCheckEnemyShininess + jr nc, .not_shiny + + xor a + ld [wNumHits], a + ld a, 1 + ldh [hBattleTurn], a + ld a, 1 + ld [wBattleAnimParam], a + ld de, ANIM_SEND_OUT_MON + call Call_PlayBattleAnim + +.not_shiny + farcall CheckSleepingTreeMon + jr c, .skip_cry + + farcall CheckBattleScene + jr c, .cry_no_anim + + hlcoord 12, 0 + ld d, $0 + ld e, ANIM_MON_NORMAL + predef AnimateFrontpic + jr .skip_cry ; cry is played during the animation + +.cry_no_anim + ld a, $f + ld [wCryTracks], a + ld a, [wTempEnemyMonSpecies] + call PlayStereoCry + +.skip_cry + ld a, [wBattleType] + cp BATTLETYPE_FISH + jr nz, .NotFishing + + farcall StubbedTrainerRankings_HookedEncounters + + ld hl, HookedPokemonAttackedText + jr .PlaceBattleStartText + +.NotFishing: + ld hl, PokemonFellFromTreeText + cp BATTLETYPE_TREE + jr z, .PlaceBattleStartText + ld hl, WildCelebiAppearedText + cp BATTLETYPE_CELEBI + jr z, .PlaceBattleStartText + ld hl, WildPokemonAppearedText + +.PlaceBattleStartText: + push hl + farcall BattleStart_TrainerHuds + pop hl + call StdBattleTextbox + + call IsMobileBattle2 + ret nz + + ld c, $2 ; start + farcall Mobile_PrintOpponentBattleMessage + + ret diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm new file mode 100644 index 0000000..4dd095a --- /dev/null +++ b/engine/battle/effect_commands.asm @@ -0,0 +1,6878 @@ +DoPlayerTurn: + call SetPlayerTurn + + ld a, [wBattlePlayerAction] + and a ; BATTLEPLAYERACTION_USEMOVE? + ret nz + + jr DoTurn + +DoEnemyTurn: + call SetEnemyTurn + + ld a, [wLinkMode] + and a + jr z, DoTurn + + ld a, [wBattleAction] + cp BATTLEACTION_STRUGGLE + jr z, DoTurn + cp BATTLEACTION_SWITCH1 + ret nc + + ; fallthrough + +DoTurn: +; Read in and execute the user's move effects for this turn. + + xor a + ld [wTurnEnded], a + + ; Effect command checkturn is called for every move. + call CheckTurn + + ld a, [wTurnEnded] + and a + ret nz + + call UpdateMoveData + +DoMove: +; Get the user's move effect. + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + ld c, a + ld b, 0 + ld hl, MoveEffectsPointers + add hl, bc + add hl, bc + ld a, BANK(MoveEffectsPointers) + call GetFarWord + + ld de, wBattleScriptBuffer + +.GetMoveEffect: + ld a, BANK(MoveEffects) + call GetFarByte + inc hl + ld [de], a + inc de + cp endmove_command + jr nz, .GetMoveEffect + +; Start at the first command. + ld hl, wBattleScriptBuffer + ld a, l + ld [wBattleScriptBufferAddress], a + ld a, h + ld [wBattleScriptBufferAddress + 1], a + +.ReadMoveEffectCommand: +; ld a, [wBattleScriptBufferAddress++] + ld a, [wBattleScriptBufferAddress] + ld l, a + ld a, [wBattleScriptBufferAddress + 1] + ld h, a + + ld a, [hli] + + push af + ld a, l + ld [wBattleScriptBufferAddress], a + ld a, h + ld [wBattleScriptBufferAddress + 1], a + pop af + +; endturn_command (-2) is used to terminate branches without ending the read cycle. + cp endturn_command + ret nc + +; The rest of the commands (01-af) are read from BattleCommandPointers. + push bc + dec a + ld c, a + ld b, 0 + ld hl, BattleCommandPointers + add hl, bc + add hl, bc + pop bc + + ld a, BANK(BattleCommandPointers) + call GetFarWord + + call .DoMoveEffectCommand + + jr .ReadMoveEffectCommand + +.DoMoveEffectCommand: + jp hl + +CheckTurn: +BattleCommand_CheckTurn: +; Repurposed as hardcoded turn handling. Useless as a command. + +; Move $ff immediately ends the turn. + ld a, BATTLE_VARS_MOVE + call GetBattleVar + inc a + jp z, EndTurn + + xor a + ld [wAttackMissed], a + ld [wEffectFailed], a + ld [wBattleAnimParam], a + ld [wAlreadyDisobeyed], a + ld [wAlreadyFailed], a + ld [wSomeoneIsRampaging], a + + ld a, EFFECTIVE + ld [wTypeModifier], a + + ldh a, [hBattleTurn] + and a + jp nz, CheckEnemyTurn + +; check player turn + ld hl, wPlayerSubStatus4 + bit SUBSTATUS_RECHARGE, [hl] + jr z, .no_recharge + + res SUBSTATUS_RECHARGE, [hl] + ld hl, MustRechargeText + call StdBattleTextbox + call CantMove + jp EndTurn + +.no_recharge + + ld hl, wBattleMonStatus + ld a, [hl] + and SLP_MASK + jr z, .not_asleep + + dec a + ld [wBattleMonStatus], a + and SLP_MASK + jr z, .woke_up + + xor a + ld [wNumHits], a + ld de, ANIM_SLP + call FarPlayBattleAnimation + jr .fast_asleep + +.woke_up + ld hl, WokeUpText + call StdBattleTextbox + call CantMove + call UpdateBattleMonInParty + ld hl, UpdatePlayerHUD + call CallBattleCore + ld a, $1 + ldh [hBGMapMode], a + ld hl, wPlayerSubStatus1 + res SUBSTATUS_NIGHTMARE, [hl] + jr .not_asleep + +.fast_asleep + ld hl, FastAsleepText + call StdBattleTextbox + + ; Snore and Sleep Talk bypass sleep. + ld a, [wCurPlayerMove] + ld hl, .sleep_bypass_moves + call CheckMoveInList + jr c, .not_asleep + call CantMove + jp EndTurn + +.sleep_bypass_moves + dw SNORE + dw SLEEP_TALK + dw -1 + +.not_asleep + + ld hl, wBattleMonStatus + bit FRZ, [hl] + jr z, .not_frozen + + ; Flame Wheel and Sacred Fire thaw the user. + ld a, [wCurPlayerMove] + ld hl, .thawing_moves + call CheckMoveInList + jr c, .not_frozen + + ld hl, FrozenSolidText + call StdBattleTextbox + + call CantMove + jp EndTurn + +.thawing_moves + dw FLAME_WHEEL + dw SACRED_FIRE + dw -1 + +.not_frozen + + ld hl, wPlayerSubStatus3 + bit SUBSTATUS_FLINCHED, [hl] + jr z, .not_flinched + + res SUBSTATUS_FLINCHED, [hl] + ld hl, FlinchedText + call StdBattleTextbox + + call CantMove + jp EndTurn + +.not_flinched + + ld hl, wPlayerDisableCount + ld a, [hl] + and a + jr z, .not_disabled + + dec a + ld [hl], a + and $f + jr nz, .not_disabled + + ld [hl], a + ld [wDisabledMove], a + ld hl, DisabledNoMoreText + call StdBattleTextbox + +.not_disabled + + ld a, [wPlayerSubStatus3] + add a + jr nc, .not_confused + ld hl, wPlayerConfuseCount + dec [hl] + jr nz, .confused + + ld hl, wPlayerSubStatus3 + res SUBSTATUS_CONFUSED, [hl] + ld hl, ConfusedNoMoreText + call StdBattleTextbox + jr .not_confused + +.confused + ld hl, IsConfusedText + call StdBattleTextbox + xor a + ld [wNumHits], a + ld de, ANIM_CONFUSED + call FarPlayBattleAnimation + + ; 50% chance of hitting itself + call BattleRandom + cp 50 percent + 1 + jr nc, .not_confused + + ; clear confusion-dependent substatus + ld hl, wPlayerSubStatus3 + ld a, [hl] + and 1 << SUBSTATUS_CONFUSED + ld [hl], a + + call HitConfusion + call CantMove + jp EndTurn + +.not_confused + + ld a, [wPlayerSubStatus1] + add a ; bit SUBSTATUS_ATTRACT + jr nc, .not_infatuated + + ld hl, InLoveWithText + call StdBattleTextbox + xor a + ld [wNumHits], a + ld de, ANIM_IN_LOVE + call FarPlayBattleAnimation + + ; 50% chance of infatuation + call BattleRandom + cp 50 percent + 1 + jr c, .not_infatuated + + ld hl, InfatuationText + call StdBattleTextbox + call CantMove + jp EndTurn + +.not_infatuated + + ; We can't disable a move that doesn't exist. + ld a, [wDisabledMove] + and a + jr z, .no_disabled_move + + ; Are we using the disabled move? + ld hl, wCurPlayerMove + cp [hl] + jr nz, .no_disabled_move + + call MoveDisabled + call CantMove + jp EndTurn + +.no_disabled_move + + ld hl, wBattleMonStatus + bit PAR, [hl] + ret z + + ; 25% chance to be fully paralyzed + call BattleRandom + cp 25 percent + ret nc + + ld hl, FullyParalyzedText + call StdBattleTextbox + call CantMove + jp EndTurn + +CantMove: + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVarAddr + res SUBSTATUS_ROLLOUT, [hl] + + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + ld a, [hl] + and ~(1 << SUBSTATUS_BIDE | 1 << SUBSTATUS_RAMPAGE | 1 << SUBSTATUS_CHARGED) + ld [hl], a + + call ResetFuryCutterCount + + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + push hl + ld hl, .fly_dig_moves + call CheckMoveInList + pop hl + ret nc + + res SUBSTATUS_UNDERGROUND, [hl] + res SUBSTATUS_FLYING, [hl] + jp AppearUserRaiseSub + +.fly_dig_moves + dw FLY + dw DIG + dw -1 + +OpponentCantMove: + call BattleCommand_SwitchTurn + call CantMove + jp BattleCommand_SwitchTurn + +CheckEnemyTurn: + ld hl, wEnemySubStatus4 + bit SUBSTATUS_RECHARGE, [hl] + jr z, .no_recharge + + res SUBSTATUS_RECHARGE, [hl] + ld hl, MustRechargeText + call StdBattleTextbox + call CantMove + jp EndTurn + +.no_recharge + + ld hl, wEnemyMonStatus + ld a, [hl] + and SLP_MASK + jr z, .not_asleep + + dec a + ld [wEnemyMonStatus], a + and a + jr z, .woke_up + + ld hl, FastAsleepText + call StdBattleTextbox + xor a + ld [wNumHits], a + ld de, ANIM_SLP + call FarPlayBattleAnimation + jr .fast_asleep + +.woke_up + ld hl, WokeUpText + call StdBattleTextbox + call CantMove + call UpdateEnemyMonInParty + ld hl, UpdateEnemyHUD + call CallBattleCore + ld a, $1 + ldh [hBGMapMode], a + ld hl, wEnemySubStatus1 + res SUBSTATUS_NIGHTMARE, [hl] + jr .not_asleep + +.fast_asleep + ; Snore and Sleep Talk bypass sleep. + ld a, [wCurEnemyMove] + ld hl, .sleep_bypass_moves + call CheckMoveInList + jr c, .not_asleep + call CantMove + jp EndTurn + +.sleep_bypass_moves + dw SNORE + dw SLEEP_TALK + dw -1 + +.not_asleep + + ld hl, wEnemyMonStatus + bit FRZ, [hl] + jr z, .not_frozen + + ; Flame Wheel and Sacred Fire thaw the user. + ld a, [wCurEnemyMove] + ld hl, .thawing_moves + call CheckMoveInList + jr c, .not_frozen + + ld hl, FrozenSolidText + call StdBattleTextbox + call CantMove + jp EndTurn + +.thawing_moves + dw FLAME_WHEEL + dw SACRED_FIRE + dw -1 + +.not_frozen + + ld hl, wEnemySubStatus3 + bit SUBSTATUS_FLINCHED, [hl] + jr z, .not_flinched + + res SUBSTATUS_FLINCHED, [hl] + ld hl, FlinchedText + call StdBattleTextbox + + call CantMove + jp EndTurn + +.not_flinched + + ld hl, wEnemyDisableCount + ld a, [hl] + and a + jr z, .not_disabled + + dec a + ld [hl], a + and $f + jr nz, .not_disabled + + ld [hl], a + ld [wEnemyDisabledMove], a + + ld hl, DisabledNoMoreText + call StdBattleTextbox + +.not_disabled + + ld a, [wEnemySubStatus3] + add a ; bit SUBSTATUS_CONFUSED + jr nc, .not_confused + + ld hl, wEnemyConfuseCount + dec [hl] + jr nz, .confused + + ld hl, wEnemySubStatus3 + res SUBSTATUS_CONFUSED, [hl] + ld hl, ConfusedNoMoreText + call StdBattleTextbox + jr .not_confused + +.confused + ld hl, IsConfusedText + call StdBattleTextbox + + xor a + ld [wNumHits], a + ld de, ANIM_CONFUSED + call FarPlayBattleAnimation + + ; 50% chance of hitting itself + call BattleRandom + cp 50 percent + 1 + jr nc, .not_confused + + ; clear confusion-dependent substatus + ld hl, wEnemySubStatus3 + ld a, [hl] + and 1 << SUBSTATUS_CONFUSED + ld [hl], a + + ld hl, HurtItselfText + call StdBattleTextbox + + call HitSelfInConfusion + call BattleCommand_DamageCalc + call BattleCommand_LowerSub + + xor a + ld [wNumHits], a + + ; Flicker the monster pic unless flying or underground. + ld de, ANIM_HIT_CONFUSION + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVar + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + call z, PlayFXAnimID + + ld c, TRUE + call DoEnemyDamage + call BattleCommand_RaiseSub + call CantMove + jp EndTurn + +.not_confused + + ld a, [wEnemySubStatus1] + add a ; bit SUBSTATUS_ATTRACT + jr nc, .not_infatuated + + ld hl, InLoveWithText + call StdBattleTextbox + xor a + ld [wNumHits], a + ld de, ANIM_IN_LOVE + call FarPlayBattleAnimation + + ; 50% chance of infatuation + call BattleRandom + cp 50 percent + 1 + jr c, .not_infatuated + + ld hl, InfatuationText + call StdBattleTextbox + call CantMove + jp EndTurn + +.not_infatuated + + ; We can't disable a move that doesn't exist. + ld a, [wEnemyDisabledMove] + and a + jr z, .no_disabled_move + + ; Are we using the disabled move? + ld hl, wCurEnemyMove + cp [hl] + jr nz, .no_disabled_move + + call MoveDisabled + + call CantMove + jp EndTurn + +.no_disabled_move + + ld hl, wEnemyMonStatus + bit PAR, [hl] + ret z + + ; 25% chance to be fully paralyzed + call BattleRandom + cp 25 percent + ret nc + + ld hl, FullyParalyzedText + call StdBattleTextbox + call CantMove + + ; fallthrough + +EndTurn: + ld a, $1 + ld [wTurnEnded], a + jp ResetDamage + +MoveDisabled: + ; Make sure any charged moves fail + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + res SUBSTATUS_CHARGED, [hl] + + ld a, BATTLE_VARS_MOVE + call GetBattleVar + ld [wNamedObjectIndex], a + call GetMoveName + + ld hl, DisabledMoveText + jp StdBattleTextbox + +HitConfusion: + ld hl, HurtItselfText + call StdBattleTextbox + + xor a + ld [wCriticalHit], a + + call HitSelfInConfusion + call BattleCommand_DamageCalc + call BattleCommand_LowerSub + + xor a + ld [wNumHits], a + + ; Flicker the monster pic unless flying or underground. + ld de, ANIM_HIT_CONFUSION + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVar + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + call z, PlayFXAnimID + + ld hl, UpdatePlayerHUD + call CallBattleCore + ld a, $1 + ldh [hBGMapMode], a + ld c, TRUE + call DoPlayerDamage + jp BattleCommand_RaiseSub + +BattleCommand_CheckObedience: + ; Enemy can't disobey + ldh a, [hBattleTurn] + and a + ret nz + + call CheckUserIsCharging + ret nz + + ; If we've already checked this turn + ld a, [wAlreadyDisobeyed] + and a + ret nz + + xor a + ld [wAlreadyDisobeyed], a + + ; No obedience in link battles + ; (since no handling exists for enemy) + ld a, [wLinkMode] + and a + ret nz + + ld a, [wInBattleTowerBattle] + and a + ret nz + + ; If the monster's id doesn't match the player's, + ; some conditions need to be met. + ld a, MON_ID + call BattlePartyAttr + + ld a, [wPlayerID] + cp [hl] + jr nz, .obeylevel + inc hl + ld a, [wPlayerID + 1] + cp [hl] + ret z + +.obeylevel + ; The maximum obedience level is constrained by owned badges: + ld hl, wJohtoBadges + + ; risingbadge + bit RISINGBADGE, [hl] + ld a, MAX_LEVEL + 1 + jr nz, .getlevel + + ; stormbadge + bit STORMBADGE, [hl] + ld a, 70 + jr nz, .getlevel + + ; fogbadge + bit FOGBADGE, [hl] + ld a, 50 + jr nz, .getlevel + + ; hivebadge + bit HIVEBADGE, [hl] + ld a, 30 + jr nz, .getlevel + + ; no badges + ld a, 10 + +.getlevel +; c = obedience level +; d = monster level +; b = c + d + + ld b, a + ld c, a + + ld a, [wBattleMonLevel] + ld d, a + + add b + ld b, a + +; No overflow (this should never happen) + jr nc, .checklevel + ld b, $ff + +.checklevel +; If the monster's level is lower than the obedience level, it will obey. + ld a, c + cp d + ret nc + +; Random number from 0 to obedience level + monster level +.rand1 + call BattleRandom + swap a + cp b + jr nc, .rand1 + +; The higher above the obedience level the monster is, +; the more likely it is to disobey. + cp c + ret c + +; Sleep-only moves have separate handling, and a higher chance of +; being ignored. Lazy monsters like their sleep. + call IgnoreSleepOnly + ret c + +; Another random number from 0 to obedience level + monster level +.rand2 + call BattleRandom + cp b + jr nc, .rand2 + +; A second chance. + cp c + jr c, .UseInstead + +; No hope of using a move now. + +; b = number of levels the monster is above the obedience level + ld a, d + sub c + ld b, a + +; The chance of napping is the difference out of 256. + call BattleRandom + swap a + sub b + jr c, .Nap + +; The chance of not hitting itself is the same. + cp b + jr nc, .DoNothing + + ld hl, WontObeyText + call StdBattleTextbox + call HitConfusion + jp .EndDisobedience + +.Nap: + call BattleRandom + add a + swap a + and SLP_MASK + jr z, .Nap + + ld [wBattleMonStatus], a + + ld hl, BeganToNapText + jr .Print + +.DoNothing: + ; 4 random choices + call BattleRandom + and %11 + + ld hl, LoafingAroundText + and a ; 0 + jr z, .Print + + ld hl, WontObeyText + dec a ; 1 + jr z, .Print + + ld hl, TurnedAwayText + dec a ; 2 + jr z, .Print + + ld hl, IgnoredOrdersText + +.Print: + call StdBattleTextbox + jp .EndDisobedience + +.UseInstead: +; Can't use another move if the monster only has one! + ld a, [wBattleMonMoves + 1] + and a + jr z, .DoNothing + +; Don't bother trying to handle Disable. + ld a, [wDisabledMove] + and a + jr nz, .DoNothing + + ld hl, wBattleMonPP + ld de, wBattleMonMoves + ld b, 0 + ld c, NUM_MOVES + +.GetTotalPP: + ld a, [hli] + and PP_MASK + add b + ld b, a + + dec c + jr z, .CheckMovePP + +; Stop at undefined moves. + inc de + ld a, [de] + and a + jr nz, .GetTotalPP + +.CheckMovePP: + ld hl, wBattleMonPP + ld a, [wCurMoveNum] + ld e, a + ld d, 0 + add hl, de + +; Can't use another move if only one move has PP. + ld a, [hl] + and PP_MASK + cp b + jr z, .DoNothing + +; Make sure we can actually use the move once we get there. + ld a, 1 + ld [wAlreadyDisobeyed], a + + ld a, [w2DMenuNumRows] + ld b, a + +; Save the move we originally picked for afterward. + ld a, [wCurMoveNum] + ld c, a + push af + +.RandomMove: + call BattleRandom + maskbits NUM_MOVES + + cp b + jr nc, .RandomMove + +; Not the move we were trying to use. + cp c + jr z, .RandomMove + +; Make sure it has PP. + ld [wCurMoveNum], a + ld hl, wBattleMonPP + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + and PP_MASK + jr z, .RandomMove + +; Use it. + ld a, [wCurMoveNum] + ld c, a + ld b, 0 + ld hl, wBattleMonMoves + add hl, bc + ld a, [hl] + ld [wCurPlayerMove], a + + call SetPlayerTurn + call UpdateMoveData + call DoMove + +; Restore original move choice. + pop af + ld [wCurMoveNum], a + +.EndDisobedience: + xor a + ld [wLastPlayerMove], a + ld [wLastPlayerCounterMove], a + + ; Break Encore too. + ld hl, wPlayerSubStatus5 + res SUBSTATUS_ENCORED, [hl] + xor a + ld [wPlayerEncoreCount], a + + jp EndMoveEffect + +IgnoreSleepOnly: + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + + ; Snore and Sleep Talk bypass sleep. + ld hl, .sleep_moves + call CheckMoveInList + ret nc + + ld a, BATTLE_VARS_STATUS + call GetBattleVar + and SLP_MASK + ret z + +; 'ignored orders…sleeping!' + ld hl, IgnoredSleepingText + call StdBattleTextbox + + call EndMoveEffect + + scf + ret + +.sleep_moves + dw SNORE + dw SLEEP_TALK + dw -1 + +BattleCommand_UsedMoveText: + farcall DisplayUsedMoveText + ret + +CheckUserIsCharging: + ldh a, [hBattleTurn] + and a + ld a, [wPlayerCharging] ; player + jr z, .end + ld a, [wEnemyCharging] ; enemy +.end + and a + ret + +BattleCommand_DoTurn: + call CheckUserIsCharging + ret nz + + ld hl, wBattleMonPP + ld de, wPlayerSubStatus3 + ld bc, wPlayerTurnsTaken + + ldh a, [hBattleTurn] + and a + jr z, .proceed + + ld hl, wEnemyMonPP + ld de, wEnemySubStatus3 + ld bc, wEnemyTurnsTaken + +.proceed + +; If we've gotten this far, this counts as a turn. + ld a, [bc] + inc a + ld [bc], a + + ld a, BATTLE_VARS_MOVE + call GetBattleVar + ld bc, STRUGGLE + call CompareMove + ret z + + ld a, [de] + and 1 << SUBSTATUS_IN_LOOP | 1 << SUBSTATUS_RAMPAGE | 1 << SUBSTATUS_BIDE + ret nz + + call .consume_pp + ld a, b + and a + jp nz, EndMoveEffect + + ; SubStatus5 + inc de + inc de + + ld a, [de] + bit SUBSTATUS_TRANSFORMED, a + ret nz + + ldh a, [hBattleTurn] + and a + + ld hl, wPartyMon1PP + ld a, [wCurBattleMon] + jr z, .player + +; mimic this part entirely if wildbattle + ld a, [wBattleMode] + dec a + jr z, .wild + + ld hl, wOTPartyMon1PP + ld a, [wCurOTMon] + +.player + call GetPartyLocation + push hl + call CheckMimicUsed + pop hl + ret c + +.consume_pp + ldh a, [hBattleTurn] + and a + ld a, [wCurMoveNum] + jr z, .okay + ld a, [wCurEnemyMoveNum] + +.okay + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + and PP_MASK + jr z, .out_of_pp + dec [hl] + ld b, 0 + ret + +.wild + ld hl, wEnemyMonMoves + ld a, [wCurEnemyMoveNum] + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + ld bc, MIMIC + call CompareMove + jr z, .mimic + ld hl, wWildMonMoves + add hl, de + ld a, [hl] + call CompareMove + ret z + +.mimic + ld hl, wWildMonPP + call .consume_pp + ret + +.out_of_pp + call BattleCommand_MoveDelay +; get move effect + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar +; continuous? + ld hl, .continuousmoves + ld de, 1 + call IsInArray + +; 'has no pp left for [move]' + ld hl, HasNoPPLeftText + jr c, .print +; 'but no pp is left for the move' + ld hl, NoPPLeftText +.print + call StdBattleTextbox + ld b, 1 + ret + +.continuousmoves + db EFFECT_RAZOR_WIND + db EFFECT_SKY_ATTACK + db EFFECT_SKULL_BASH + db EFFECT_SOLARBEAM + db EFFECT_FLY + db EFFECT_ROLLOUT + db EFFECT_BIDE + db EFFECT_RAMPAGE + db -1 + +CheckMimicUsed: + ldh a, [hBattleTurn] + and a + ld a, [wCurMoveNum] + jr z, .player + ld a, [wCurEnemyMoveNum] + +.player + ld c, a + ld a, MON_MOVES + call UserPartyAttr + + ld b, 0 + add hl, bc + ld a, [hl] + ld bc, MIMIC + call CompareMove + jr nz, .mimic + + ld a, BATTLE_VARS_MOVE + call GetBattleVar + call CompareMove + jr z, .mimic + + scf + ret + +.mimic + and a + ret + +BattleCommand_Critical: +; Determine whether this attack's hit will be critical. + + xor a + ld [wCriticalHit], a + + ld a, BATTLE_VARS_MOVE_POWER + call GetBattleVar + and a + ret z + + ldh a, [hBattleTurn] + and a + ld hl, wEnemyMonItem + ld a, [wEnemyMonSpecies] + jr nz, .Item + ld hl, wBattleMonItem + ld a, [wBattleMonSpecies] + +.Item: + ld c, 0 + ld b, [hl] + call GetPokemonIndexFromID + + ld a, l + sub LOW(CHANSEY) + if HIGH(CHANSEY) == 0 + or h + else + jr nz, .Farfetchd + if HIGH(CHANSEY) == 1 + dec h + else + ld a, h + cp HIGH(CHANSEY) + endc + endc + jr nz, .Farfetchd + ld a, b + cp LUCKY_PUNCH + jr nz, .FocusEnergy + +; +2 critical level + ld c, 2 + jr .Tally + +.Farfetchd: + ld a, l + sub LOW(FARFETCH_D) + if HIGH(FARFETCH_D) == 0 + or h + else + jr nz, .FocusEnergy + if HIGH(FARFETCH_D) == 1 + dec h + else + ld a, h + cp HIGH(FARFETCH_D) + endc + endc + jr nz, .FocusEnergy + ld a, b + cp STICK + jr nz, .FocusEnergy + +; +2 critical level + ld c, 2 + jr .Tally + +.FocusEnergy: + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVar + bit SUBSTATUS_FOCUS_ENERGY, a + jr z, .CheckCritical + +; +1 critical level + inc c + +.CheckCritical: + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + call GetMoveIndexFromID + ld de, 2 + ld hl, CriticalHitMoves + push bc + ld b, h + ld c, l + call IsInWordArray + pop bc + jr nc, .ScopeLens + +; +2 critical level + inc c + inc c + +.ScopeLens: + push bc + call GetUserItem + ld a, b + cp HELD_CRITICAL_UP ; Increased critical chance. Only Scope Lens has this. + pop bc + jr nz, .Tally + +; +1 critical level + inc c + +.Tally: + ld hl, CriticalHitChances + ld b, 0 + add hl, bc + call BattleRandom + cp [hl] + ret nc + ld a, 1 + ld [wCriticalHit], a + ret + +INCLUDE "data/moves/critical_hit_moves.asm" + +INCLUDE "data/battle/critical_hit_chances.asm" + +INCLUDE "engine/battle/move_effects/triple_kick.asm" + +BattleCommand_Stab: +; STAB = Same Type Attack Bonus + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + ld bc, STRUGGLE + call CompareMove + ret z + + ld hl, wBattleMonType1 + ld a, [hli] + ld b, a + ld c, [hl] + ld hl, wEnemyMonType1 + ld a, [hli] + ld d, a + ld e, [hl] + + ldh a, [hBattleTurn] + and a + jr z, .go ; Who Attacks and who Defends + + ld hl, wEnemyMonType1 + ld a, [hli] + ld b, a + ld c, [hl] + ld hl, wBattleMonType1 + ld a, [hli] + ld d, a + ld e, [hl] + +.go + ld a, BATTLE_VARS_MOVE_TYPE + call GetBattleVarAddr + ld [wCurType], a + + push hl + push de + push bc + farcall DoWeatherModifiers + pop bc + pop de + pop hl + + push de + push bc + farcall DoBadgeTypeBoosts + pop bc + pop de + + ld a, [wCurType] + cp b + jr z, .stab + cp c + jr z, .stab + + jr .SkipStab + +.stab + ld hl, wCurDamage + 1 + ld a, [hld] + ld h, [hl] + ld l, a + + ld b, h + ld c, l + srl b + rr c + add hl, bc + + ld a, h + ld [wCurDamage], a + ld a, l + ld [wCurDamage + 1], a + + ld hl, wTypeModifier + set 7, [hl] + +.SkipStab: + ld a, BATTLE_VARS_MOVE_TYPE + call GetBattleVar + ld b, a + ld hl, TypeMatchups + +.TypesLoop: + ld a, [hli] + + cp -1 + jr z, .end + + ; foresight + cp -2 + jr nz, .SkipForesightCheck + ld a, BATTLE_VARS_SUBSTATUS1_OPP + call GetBattleVar + bit SUBSTATUS_IDENTIFIED, a + jr nz, .end + + jr .TypesLoop + +.SkipForesightCheck: + cp b + jr nz, .SkipType + ld a, [hl] + cp d + jr z, .GotMatchup + cp e + jr z, .GotMatchup + jr .SkipType + +.GotMatchup: + push hl + push bc + inc hl + ld a, [wTypeModifier] + and %10000000 + ld b, a +; If the target is immune to the move, treat it as a miss and calculate the damage as 0 + ld a, [hl] + and a + jr nz, .NotImmune + inc a + ld [wAttackMissed], a + xor a +.NotImmune: + ldh [hMultiplier], a + add b + ld [wTypeModifier], a + + xor a + ldh [hMultiplicand + 0], a + + ld hl, wCurDamage + ld a, [hli] + ldh [hMultiplicand + 1], a + ld a, [hld] + ldh [hMultiplicand + 2], a + + call Multiply + + ldh a, [hProduct + 1] + ld b, a + ldh a, [hProduct + 2] + or b + ld b, a + ldh a, [hProduct + 3] + or b + jr z, .ok ; This is a very convoluted way to get back that we've essentially dealt no damage. + +; Take the product and divide it by 10. + ld a, 10 + ldh [hDivisor], a + ld b, 4 + call Divide + ldh a, [hQuotient + 2] + ld b, a + ldh a, [hQuotient + 3] + or b + jr nz, .ok + + ld a, 1 + ldh [hMultiplicand + 2], a + +.ok + ldh a, [hMultiplicand + 1] + ld [hli], a + ldh a, [hMultiplicand + 2] + ld [hl], a + pop bc + pop hl + +.SkipType: + inc hl + inc hl + jr .TypesLoop + +.end + call BattleCheckTypeMatchup + ld a, [wTypeMatchup] + ld b, a + ld a, [wTypeModifier] + and %10000000 + or b + ld [wTypeModifier], a + ret + +BattleCheckTypeMatchup: + ld hl, wEnemyMonType1 + ldh a, [hBattleTurn] + and a + jr z, CheckTypeMatchup + ld hl, wBattleMonType1 + ; fallthrough +CheckTypeMatchup: +; BUG: AI makes a false assumption about CheckTypeMatchup (see docs/bugs_and_glitches.md) + push hl + push de + push bc + ld a, BATTLE_VARS_MOVE_TYPE + call GetBattleVar + ld d, a + ld b, [hl] + inc hl + ld c, [hl] + ld a, EFFECTIVE + ld [wTypeMatchup], a + ld hl, TypeMatchups +.TypesLoop: + ld a, [hli] + cp -1 + jr z, .End + cp -2 + jr nz, .Next + ld a, BATTLE_VARS_SUBSTATUS1_OPP + call GetBattleVar + bit SUBSTATUS_IDENTIFIED, a + jr nz, .End + jr .TypesLoop + +.Next: + cp d + jr nz, .Nope + ld a, [hli] + cp b + jr z, .Yup + cp c + jr z, .Yup + jr .Nope2 + +.Nope: + inc hl +.Nope2: + inc hl + jr .TypesLoop + +.Yup: + xor a + ldh [hDividend + 0], a + ldh [hMultiplicand + 0], a + ldh [hMultiplicand + 1], a + ld a, [hli] + ldh [hMultiplicand + 2], a + ld a, [wTypeMatchup] + ldh [hMultiplier], a + call Multiply + ld a, 10 + ldh [hDivisor], a + push bc + ld b, 4 + call Divide + pop bc + ldh a, [hQuotient + 3] + ld [wTypeMatchup], a + jr .TypesLoop + +.End: + pop bc + pop de + pop hl + ret + +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 + ld a, [wTypeMatchup] + and a + ld a, EFFECTIVE + jr nz, .reset + call ResetDamage + xor a + ld [wTypeModifier], a + inc a + ld [wAttackMissed], a + ret + +.reset + ld [wTypeMatchup], a + ret + +INCLUDE "engine/battle/ai/switch.asm" + +INCLUDE "data/types/type_matchups.asm" + +BattleCommand_DamageVariation: +; Modify the damage spread between 85% and 100%. + +; Because of the method of division the probability distribution +; is not consistent. This makes the highest damage multipliers +; rarer than normal. + +; No point in reducing 1 or 0 damage. + ld hl, wCurDamage + ld a, [hli] + and a + jr nz, .go + ld a, [hl] + cp 2 + ret c + +.go +; Start with the maximum damage. + xor a + ldh [hMultiplicand + 0], a + dec hl + ld a, [hli] + ldh [hMultiplicand + 1], a + ld a, [hl] + ldh [hMultiplicand + 2], a + +; Multiply by 85-100%... +.loop + call BattleRandom + rrca + cp 85 percent + 1 + jr c, .loop + + ldh [hMultiplier], a + call Multiply + +; ...divide by 100%... + ld a, 100 percent + ldh [hDivisor], a + ld b, $4 + call Divide + +; ...to get .85-1.00x damage. + ldh a, [hQuotient + 2] + ld hl, wCurDamage + ld [hli], a + ldh a, [hQuotient + 3] + ld [hl], a + ret + +BattleCommand_CheckHit: + call .DreamEater + jp z, .Miss + + call .Protect + jp nz, .Miss + + call .DrainSub + jp z, .Miss + + call .LockOn + ret nz + + call .FlyDigMoves + jp nz, .Miss + + call .ThunderRain + ret z + + call .XAccuracy + ret nz + + ; Perfect-accuracy moves + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_ALWAYS_HIT + ret z + + call .StatModifiers + + ld a, [wPlayerMoveStruct + MOVE_ACC] + ld b, a + ldh a, [hBattleTurn] + and a + jr z, .BrightPowder + ld a, [wEnemyMoveStruct + MOVE_ACC] + ld b, a + +.BrightPowder: + push bc + call GetOpponentItem + ld a, b + cp HELD_BRIGHTPOWDER + ld a, c ; % miss + pop bc + jr nz, .skip_brightpowder + + ld c, a + ld a, b + sub c + ld b, a + jr nc, .skip_brightpowder + ld b, 0 + +.skip_brightpowder + ld a, b + cp -1 + jr z, .Hit + + call BattleRandom + cp b + jr nc, .Miss + +.Hit: + ret + +.Miss: +; Keep the damage value intact if we're using (Hi) Jump Kick. + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_JUMP_KICK + jr z, .Missed + call ResetDamage + +.Missed: + ld a, 1 + ld [wAttackMissed], a + ret + +.DreamEater: +; Return z if we're trying to eat the dream of +; a monster that isn't sleeping. + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_DREAM_EATER + ret nz + + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVar + and SLP_MASK + ret + +.Protect: +; Return nz if the opponent is protected. + ld a, BATTLE_VARS_SUBSTATUS1_OPP + call GetBattleVar + bit SUBSTATUS_PROTECT, a + ret z + + ld c, 40 + call DelayFrames + +; 'protecting itself!' + ld hl, ProtectingItselfText + call StdBattleTextbox + + ld c, 40 + call DelayFrames + + ld a, 1 + and a + ret + +.LockOn: +; Return nz if we are locked-on and aren't trying to use Earthquake, +; Fissure or Magnitude on a monster that is flying. + ld a, BATTLE_VARS_SUBSTATUS5_OPP + call GetBattleVarAddr + bit SUBSTATUS_LOCK_ON, [hl] + res SUBSTATUS_LOCK_ON, [hl] + ret z + + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVar + bit SUBSTATUS_FLYING, a + ld hl, .DigMoves + jr nz, .check_move_in_list + ld a, 1 + and a + ret + +.DrainSub: +; Return z if using an HP drain move on a substitute. + call CheckSubstituteOpp + jr z, .not_draining_sub + + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + + cp EFFECT_LEECH_HIT + ret z + cp EFFECT_DREAM_EATER + ret z + +.not_draining_sub + ld a, 1 + and a + ret + +.FlyDigMoves: +; Check for moves that can hit underground/flying opponents. +; Return z if the current move can hit the opponent. + + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVar + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + ret z + + bit SUBSTATUS_FLYING, a + ld hl, .FlyMoves + jr z, .check_move_in_list + ld hl, .DigMoves +.check_move_in_list + ; returns z (and a = 0) if the current move is in a given list, or nz (and a = 1) if not + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + call CheckMoveInList + sbc a + inc a + ret + +.FlyMoves: + dw GUST + dw WHIRLWIND + dw THUNDER + dw TWISTER + dw -1 + +.DigMoves: + dw EARTHQUAKE + dw FISSURE + dw MAGNITUDE + dw -1 + +.ThunderRain: +; Return z if the current move always hits in rain, and it is raining. + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_THUNDER + ret nz + + ld a, [wBattleWeather] + cp WEATHER_RAIN + ret + +.XAccuracy: + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVar + bit SUBSTATUS_X_ACCURACY, a + ret + +.StatModifiers: + ldh a, [hBattleTurn] + and a + + ; load the user's accuracy into b and the opponent's evasion into c. + ld hl, wPlayerMoveStruct + MOVE_ACC + ld a, [wPlayerAccLevel] + ld b, a + ld a, [wEnemyEvaLevel] + ld c, a + + jr z, .got_acc_eva + + ld hl, wEnemyMoveStruct + MOVE_ACC + ld a, [wEnemyAccLevel] + ld b, a + ld a, [wPlayerEvaLevel] + ld c, a + +.got_acc_eva + cp b + jr c, .skip_foresight_check + + ; if the target's evasion is greater than the user's accuracy, + ; check the target's foresight status + ld a, BATTLE_VARS_SUBSTATUS1_OPP + call GetBattleVar + bit SUBSTATUS_IDENTIFIED, a + ret nz + +.skip_foresight_check + ; subtract evasion from 14 + ld a, MAX_STAT_LEVEL + 1 + sub c + ld c, a + ; store the base move accuracy for math ops + xor a + ldh [hMultiplicand + 0], a + ldh [hMultiplicand + 1], a + ld a, [hl] + ldh [hMultiplicand + 2], a + push hl + ld d, 2 ; do this twice, once for the user's accuracy and once for the target's evasion + +.accuracy_loop + ; look up the multiplier from the table + push bc + ld hl, AccuracyLevelMultipliers + dec b + sla b + ld c, b + ld b, 0 + add hl, bc + pop bc + ; multiply by the first byte in that row... + ld a, [hli] + ldh [hMultiplier], a + call Multiply + ; ... and divide by the second byte + ld a, [hl] + ldh [hDivisor], a + ld b, 4 + call Divide + ; minimum accuracy is $0001 + ldh a, [hQuotient + 3] + ld b, a + ldh a, [hQuotient + 2] + or b + jr nz, .min_accuracy + ldh [hQuotient + 2], a + ld a, 1 + ldh [hQuotient + 3], a + +.min_accuracy + ; do the same thing to the target's evasion + ld b, c + dec d + jr nz, .accuracy_loop + + ; if the result is more than 2 bytes, max out at 100% + ldh a, [hQuotient + 2] + and a + ldh a, [hQuotient + 3] + jr z, .finish_accuracy + ld a, $ff + +.finish_accuracy + pop hl + ld [hl], a + ret + +INCLUDE "data/battle/accuracy_multipliers.asm" + +BattleCommand_EffectChance: + xor a + ld [wEffectFailed], a + call CheckSubstituteOpp + jr nz, .failed + + push hl + ld hl, wPlayerMoveStruct + MOVE_CHANCE + ldh a, [hBattleTurn] + and a + jr z, .got_move_chance + ld hl, wEnemyMoveStruct + MOVE_CHANCE +.got_move_chance +; BUG: Moves with a 100% secondary effect chance will not trigger it in 1/256 uses (see docs/bugs_and_glitches.md) + call BattleRandom + cp [hl] + pop hl + ret c + +.failed + ld a, 1 + ld [wEffectFailed], a + and a + ret + +BattleCommand_LowerSub: + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVar + bit SUBSTATUS_SUBSTITUTE, a + ret z + + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVar + bit SUBSTATUS_CHARGED, a + jr nz, .already_charged + + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_RAZOR_WIND + jr z, .charge_turn + cp EFFECT_SKY_ATTACK + jr z, .charge_turn + cp EFFECT_SKULL_BASH + jr z, .charge_turn + cp EFFECT_SOLARBEAM + jr z, .charge_turn + cp EFFECT_FLY + jr z, .charge_turn + +.already_charged + call .Rampage + jr z, .charge_turn + + call CheckUserIsCharging + ret nz + +.charge_turn + call _CheckBattleScene + jr c, .mimic_anims + + xor a + ld [wNumHits], a + inc a + ld [wBattleAnimParam], a + ld hl, SUBSTITUTE + call GetMoveIDFromIndex + jp LoadAnim + +.mimic_anims + call BattleCommand_LowerSubNoAnim + jp BattleCommand_MoveDelay + +.Rampage: + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_ROLLOUT + jr z, .rollout_rampage + cp EFFECT_RAMPAGE + jr z, .rollout_rampage + + ld a, 1 + and a + ret + +.rollout_rampage + ld a, [wSomeoneIsRampaging] + and a + ld a, 0 + ld [wSomeoneIsRampaging], a + ret + +BattleCommand_MoveAnim: + call BattleCommand_LowerSub + call BattleCommand_MoveAnimNoSub + jp BattleCommand_RaiseSub + +BattleCommand_MoveAnimNoSub: + ld a, [wAttackMissed] + and a + jp nz, BattleCommand_MoveDelay + + ldh a, [hBattleTurn] + and a + ld de, wPlayerRolloutCount + ld a, BATTLEANIM_ENEMY_DAMAGE + jr z, .got_rollout_count + ld de, wEnemyRolloutCount + ld a, BATTLEANIM_PLAYER_DAMAGE + +.got_rollout_count + ld [wNumHits], a + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_MULTI_HIT + jr z, .alternate_anim + cp EFFECT_CONVERSION + jr z, .alternate_anim + cp EFFECT_DOUBLE_HIT + jr z, .alternate_anim + cp EFFECT_POISON_MULTI_HIT + jr z, .alternate_anim + cp EFFECT_TRIPLE_KICK + jr z, .triplekick + xor a + ld [wBattleAnimParam], a + +.triplekick + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + call SetMoveAnimationID + call PlaySelectedFXAnim + + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + ld hl, .fly_dig_moves + call CheckMoveInList + ret nc + jp AppearUserLowerSub + +.fly_dig_moves + dw FLY + dw DIG + dw -1 + +.alternate_anim + ld a, [wBattleAnimParam] + and 1 + xor 1 + ld [wBattleAnimParam], a + ld a, [de] + cp 1 + push af + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + call SetMoveAnimationID + pop af + jr z, .play_anim + xor a + ld [wNumHits], a +.play_anim + jp PlaySelectedFXAnim + +BattleCommand_StatUpAnim: + ld a, [wAttackMissed] + and a + jp nz, BattleCommand_MoveDelay + + xor a + jr BattleCommand_StatUpDownAnim + +BattleCommand_StatDownAnim: + ld a, [wAttackMissed] + and a + jp nz, BattleCommand_MoveDelay + + ldh a, [hBattleTurn] + and a + ld a, BATTLEANIM_ENEMY_STAT_DOWN + jr z, BattleCommand_StatUpDownAnim + ld a, BATTLEANIM_WOBBLE + + ; fallthrough + +BattleCommand_StatUpDownAnim: + ld [wNumHits], a + xor a + ld [wBattleAnimParam], a + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + call SetMoveAnimationID + jp PlaySelectedFXAnim + +BattleCommand_SwitchTurn: + ldh a, [hBattleTurn] + xor 1 + ldh [hBattleTurn], a + ret + +BattleCommand_RaiseSub: + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVar + bit SUBSTATUS_SUBSTITUTE, a + ret z + + call _CheckBattleScene + jp c, BattleCommand_RaiseSubNoAnim + + xor a + ld [wNumHits], a + ld a, $2 + ld [wBattleAnimParam], a + ld hl, SUBSTITUTE + call GetMoveIDFromIndex + jp LoadAnim + +BattleCommand_FailureText: +; If the move missed or failed, load the appropriate +; text, and end the effects of multi-turn or multi- +; hit moves. + ld a, [wAttackMissed] + and a + ret z + + call GetFailureResultText + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVarAddr + + push hl + ld hl, .fly_dig_moves + call CheckMoveInList + pop hl + jr c, .fly_dig + +; Move effect: + inc hl + ld a, [hl] + +; BUG: Beat Up may fail to raise Substitute (see docs/bugs_and_glitches.md) + cp EFFECT_MULTI_HIT + jr z, .multihit + cp EFFECT_DOUBLE_HIT + jr z, .multihit + cp EFFECT_POISON_MULTI_HIT + jr z, .multihit + jp EndMoveEffect + +.multihit + call BattleCommand_RaiseSub + jp EndMoveEffect + +.fly_dig + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + res SUBSTATUS_UNDERGROUND, [hl] + res SUBSTATUS_FLYING, [hl] + call AppearUserRaiseSub + jp EndMoveEffect + +.fly_dig_moves + dw FLY + dw DIG + dw -1 + +BattleCommand_ApplyDamage: + ld a, BATTLE_VARS_SUBSTATUS1_OPP + call GetBattleVar + bit SUBSTATUS_ENDURE, a + jr z, .focus_band + + call BattleCommand_FalseSwipe + ld b, 0 + jr nc, .damage + ld b, 1 + jr .damage + +.focus_band + call GetOpponentItem + ld a, b + cp HELD_FOCUS_BAND + ld b, 0 + jr nz, .damage + + call BattleRandom + cp c + jr nc, .damage + call BattleCommand_FalseSwipe + ld b, 0 + jr nc, .damage + ld b, 2 + +.damage + push bc + call .update_damage_taken + ld c, FALSE + ldh a, [hBattleTurn] + and a + jr nz, .damage_player + call DoEnemyDamage + jr .done_damage + +.damage_player + call DoPlayerDamage + +.done_damage + pop bc + ld a, b + and a + ret z + + dec a + jr nz, .focus_band_text + ld hl, EnduredText + jp StdBattleTextbox + +.focus_band_text + call GetOpponentItem + ld a, [hl] + ld [wNamedObjectIndex], a + call GetItemName + ld hl, HungOnText + jp StdBattleTextbox + +.update_damage_taken + ld a, BATTLE_VARS_SUBSTATUS4_OPP + call GetBattleVar + bit SUBSTATUS_SUBSTITUTE, a + ret nz + + ld de, wPlayerDamageTaken + 1 + ldh a, [hBattleTurn] + and a + jr nz, .got_damage_taken + ld de, wEnemyDamageTaken + 1 + +.got_damage_taken + ld a, [wCurDamage + 1] + ld b, a + ld a, [de] + add b + ld [de], a + dec de + ld a, [wCurDamage] + ld b, a + ld a, [de] + adc b + ld [de], a + ret nc + ld a, $ff + ld [de], a + inc de + ld [de], a + ret + +GetFailureResultText: + ld hl, DoesntAffectText + ld de, DoesntAffectText + ld a, [wTypeModifier] + and $7f + jr z, .got_text + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_FUTURE_SIGHT + ld hl, ButItFailedText + ld de, ItFailedText + jr z, .got_text + ld hl, AttackMissedText + ld de, AttackMissed2Text + ld a, [wCriticalHit] + cp -1 + jr nz, .got_text + ld hl, UnaffectedText +.got_text + call FailText_CheckOpponentProtect + xor a + ld [wCriticalHit], a + + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_JUMP_KICK + ret nz + + ld a, [wTypeModifier] + and $7f + ret z + + ld hl, wCurDamage + ld a, [hli] + ld b, [hl] +rept 3 + srl a + rr b +endr + ld [hl], b + dec hl + ld [hli], a + or b + jr nz, .do_at_least_1_damage + inc a + ld [hl], a +.do_at_least_1_damage + ld hl, CrashedText + call StdBattleTextbox + ld a, $1 + ld [wBattleAnimParam], a + call LoadMoveAnim + ld c, TRUE + ldh a, [hBattleTurn] + and a + jp nz, DoEnemyDamage + jp DoPlayerDamage + +FailText_CheckOpponentProtect: + ld a, BATTLE_VARS_SUBSTATUS1_OPP + call GetBattleVar + bit SUBSTATUS_PROTECT, a + jr z, .not_protected + ld h, d + ld l, e +.not_protected + jp StdBattleTextbox + +BattleCommand_BideFailText: + ld a, [wAttackMissed] + and a + ret z + + ld a, [wTypeModifier] + and $7f + jp z, PrintDoesntAffect + jp PrintButItFailed + +BattleCommand_CriticalText: +; Prints the message for critical hits or one-hit KOs. + +; If there is no message to be printed, wait 20 frames. + ld a, [wCriticalHit] + and a + jr z, .wait + + dec a + add a + ld hl, .texts + ld b, 0 + ld c, a + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + call StdBattleTextbox + + xor a + ld [wCriticalHit], a + +.wait + ld c, 20 + jp DelayFrames + +.texts + dw CriticalHitText + dw OneHitKOText + +BattleCommand_StartLoop: + ld hl, wPlayerRolloutCount + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wEnemyRolloutCount +.ok + xor a + ld [hl], a + ret + +BattleCommand_SuperEffectiveLoopText: + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + bit SUBSTATUS_IN_LOOP, a + ret nz + + ; fallthrough + +BattleCommand_SuperEffectiveText: + ld a, [wTypeModifier] + and $7f + cp EFFECTIVE + ret z + ld hl, SuperEffectiveText + jr nc, .print + ld hl, NotVeryEffectiveText +.print + jp StdBattleTextbox + +BattleCommand_CheckFaint: +; Faint the opponent if its HP reached zero +; and faint the user along with it if it used Destiny Bond. +; Ends the move effect if the opponent faints. + + ld hl, wEnemyMonHP + ldh a, [hBattleTurn] + and a + jr z, .got_hp + ld hl, wBattleMonHP + +.got_hp + ld a, [hli] + or [hl] + ret nz + + ld a, BATTLE_VARS_SUBSTATUS5_OPP + call GetBattleVar + bit SUBSTATUS_DESTINY_BOND, a + jr z, .no_dbond + + ld hl, TookDownWithItText + call StdBattleTextbox + + ldh a, [hBattleTurn] + and a + ld hl, wEnemyMonMaxHP + 1 + bccoord 2, 2 ; hp bar + ld a, 0 + jr nz, .got_max_hp + ld hl, wBattleMonMaxHP + 1 + bccoord 10, 9 ; hp bar + ld a, 1 + +.got_max_hp + ld [wWhichHPBar], a + ld a, [hld] + ld [wHPBuffer1], a + ld a, [hld] + ld [wHPBuffer1 + 1], a + ld a, [hl] + ld [wHPBuffer2], a + xor a + ld [hld], a + ld a, [hl] + ld [wHPBuffer2 + 1], a + xor a + ld [hl], a + ld [wHPBuffer3], a + ld [wHPBuffer3 + 1], a + ld h, b + ld l, c + predef AnimateHPBar + call RefreshBattleHuds + + call BattleCommand_SwitchTurn + xor a + ld [wNumHits], a + inc a + ld [wBattleAnimParam], a + ld hl, DESTINY_BOND + call GetMoveIDFromIndex + call LoadAnim + call BattleCommand_SwitchTurn + + jr .finish + +.no_dbond + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_MULTI_HIT + jr z, .multiple_hit_raise_sub + cp EFFECT_DOUBLE_HIT + jr z, .multiple_hit_raise_sub + cp EFFECT_POISON_MULTI_HIT + jr z, .multiple_hit_raise_sub + cp EFFECT_TRIPLE_KICK + jr z, .multiple_hit_raise_sub + cp EFFECT_BEAT_UP + jr nz, .finish + +.multiple_hit_raise_sub + call BattleCommand_RaiseSub + +.finish + jp EndMoveEffect + +BattleCommand_BuildOpponentRage: + jp .start + +.start + ld a, [wAttackMissed] + and a + ret nz + + ld a, BATTLE_VARS_SUBSTATUS4_OPP + call GetBattleVar + bit SUBSTATUS_RAGE, a + ret z + + ld de, wEnemyRageCounter + ldh a, [hBattleTurn] + and a + jr z, .player + ld de, wPlayerRageCounter +.player + ld a, [de] + inc a + ret z + ld [de], a + + call BattleCommand_SwitchTurn + ld hl, RageBuildingText + call StdBattleTextbox + jp BattleCommand_SwitchTurn + +BattleCommand_RageDamage: + ld a, [wCurDamage] + ld h, a + ld b, a + ld a, [wCurDamage + 1] + ld l, a + ld c, a + ldh a, [hBattleTurn] + and a + ld a, [wPlayerRageCounter] + jr z, .rage_loop + ld a, [wEnemyRageCounter] +.rage_loop + and a + jr z, .done + dec a + add hl, bc + jr nc, .rage_loop + ld hl, $ffff +.done + ld a, h + ld [wCurDamage], a + ld a, l + ld [wCurDamage + 1], a + ret + +EndMoveEffect: + ld a, [wBattleScriptBufferAddress] + ld l, a + ld a, [wBattleScriptBufferAddress + 1] + ld h, a + ld a, endmove_command + ld [hli], a + ld [hli], a + ld [hl], a + ret + +DittoMetalPowder: + ld a, MON_SPECIES + call BattlePartyAttr + ldh a, [hBattleTurn] + and a + ld a, [hl] + jr nz, .got_species + ld a, [wTempEnemyMonSpecies] + +.got_species + push hl + call GetPokemonIndexFromID + ld a, l + sub LOW(DITTO) + if HIGH(DITTO) == 0 + or h + pop hl + else + ld a, h + pop hl + ret nz + if HIGH(DITTO) == 1 + dec a + else + cp HIGH(DITTO) + endc + endc + ret nz + + push bc + call GetOpponentItem + ld a, [hl] + cp METAL_POWDER + pop bc + ret nz + +; BUG: Metal Powder can increase damage taken with boosted (Special) Defense (see docs/bugs_and_glitches.md) + ld a, c + srl a + add c + ld c, a + ret nc + + srl b + ld a, b + and a + jr nz, .done + inc b +.done + scf + rr c + ret + +BattleCommand_DamageStats: + ldh a, [hBattleTurn] + and a + jp nz, EnemyAttackDamage + + ; fallthrough + +PlayerAttackDamage: +; Return move power d, player level e, enemy defense c and player attack b. + + call ResetDamage + + ld hl, wPlayerMoveStructPower + ld a, [hli] + and a + ld d, a + ret z + + ld a, [hl] + cp SPECIAL + jr nc, .special + +; physical + ld hl, wEnemyMonDefense + ld a, [hli] + ld b, a + ld c, [hl] + + ld a, [wEnemyScreens] + bit SCREENS_REFLECT, a + jr z, .physicalcrit + sla c + rl b + +.physicalcrit + ld hl, wBattleMonAttack + call CheckDamageStatsCritical + jr c, .thickclub + + ld hl, wEnemyDefense + ld a, [hli] + ld b, a + ld c, [hl] + ld hl, wPlayerAttack + jr .thickclub + +.special + ld hl, wEnemyMonSpclDef + ld a, [hli] + ld b, a + ld c, [hl] + + ld a, [wEnemyScreens] + bit SCREENS_LIGHT_SCREEN, a + jr z, .specialcrit + sla c + rl b + +.specialcrit + ld hl, wBattleMonSpclAtk + call CheckDamageStatsCritical + jr c, .lightball + + ld hl, wEnemySpDef + ld a, [hli] + ld b, a + ld c, [hl] + ld hl, wPlayerSpAtk + +.lightball +; Note: Returns player special attack at hl in hl. + call LightBallBoost + jr .done + +.thickclub +; Note: Returns player attack at hl in hl. + call ThickClubBoost + +.done + call TruncateHL_BC + + ld a, [wBattleMonLevel] + ld e, a + call DittoMetalPowder + + ld a, 1 + and a + ret + +TruncateHL_BC: +.loop +; Truncate 16-bit values hl and bc to 8-bit values b and c respectively. +; b = hl, c = bc + + ld a, h + or b + jr z, .finish + + srl b + rr c + srl b + rr c + + ld a, c + or b + jr nz, .done_bc + inc c + +.done_bc + srl h + rr l + srl h + rr l + + ld a, l + or h + jr nz, .finish + inc l + +.finish +; BUG: Reflect and Light Screen can make (Special) Defense wrap around above 1024 (see docs/bugs_and_glitches.md) + ld a, [wLinkMode] + cp LINK_COLOSSEUM + jr z, .done +; If we go back to the loop point, +; it's the same as doing this exact +; same check twice. + ld a, h + or b + jr nz, .loop + +.done + ld b, l + ret + +CheckDamageStatsCritical: +; Return carry if boosted stats should be used in damage calculations. +; Unboosted stats should be used if the attack is a critical hit, +; and the stage of the opponent's defense is higher than the user's attack. + + ld a, [wCriticalHit] + and a + scf + ret z + + push hl + push bc + ldh a, [hBattleTurn] + and a + jr nz, .enemy + ld a, [wPlayerMoveStructType] + cp SPECIAL +; special + ld a, [wPlayerSAtkLevel] + ld b, a + ld a, [wEnemySDefLevel] + jr nc, .end +; physical + ld a, [wPlayerAtkLevel] + ld b, a + ld a, [wEnemyDefLevel] + jr .end + +.enemy + ld a, [wEnemyMoveStructType] + cp SPECIAL +; special + ld a, [wEnemySAtkLevel] + ld b, a + ld a, [wPlayerSDefLevel] + jr nc, .end +; physical + ld a, [wEnemyAtkLevel] + ld b, a + ld a, [wPlayerDefLevel] +.end + cp b + pop bc + pop hl + ret + +ThickClubBoost: +; Return in hl the stat value at hl. + +; If the attacking monster is Cubone or Marowak and +; it's holding a Thick Club, double it. + push bc + push de + ld bc, CUBONE + ld d, THICK_CLUB + call SpeciesItemBoost + if MAROWAK == (CUBONE + 1) + inc bc + else + ld bc, MAROWAK + endc + call DoubleStatIfSpeciesHoldingItem + pop de + pop bc + ret + +LightBallBoost: +; Return in hl the stat value at hl. + +; If the attacking monster is Pikachu and it's +; holding a Light Ball, double it. + push bc + push de + ld bc, PIKACHU + ld d, LIGHT_BALL + call SpeciesItemBoost + pop de + pop bc + ret + +SpeciesItemBoost: +; Return in hl the stat value at hl. + +; If the attacking monster is species bc and +; it's holding item d, double it. + + ld a, [hli] + ld l, [hl] + ld h, a + ; fallthrough + +DoubleStatIfSpeciesHoldingItem: +; If the attacking monster is species bc and +; it's holding item d, double the stat in hl. + + push hl + ld a, MON_SPECIES + call BattlePartyAttr + + ldh a, [hBattleTurn] + and a + ld a, [hl] + jr z, .CompareSpecies + ld a, [wTempEnemyMonSpecies] +.CompareSpecies: + + call GetPokemonIndexFromID + ld a, h + cp b + ld a, l + pop hl + ret nz + cp c + ret nz + + push hl + call GetUserItem + ld a, [hl] + pop hl + cp d + ret nz + +; Double the stat +; BUG: Thick Club and Light Ball can make (Special) Attack wrap around above 1024 (see docs/bugs_and_glitches.md) + sla l + rl h + ret + +EnemyAttackDamage: + call ResetDamage + +; No damage dealt with 0 power. + ld hl, wEnemyMoveStructPower + ld a, [hli] ; hl = wEnemyMoveStructType + ld d, a + and a + ret z + + ld a, [hl] + cp SPECIAL + jr nc, .special + +; physical + ld hl, wBattleMonDefense + ld a, [hli] + ld b, a + ld c, [hl] + + ld a, [wPlayerScreens] + bit SCREENS_REFLECT, a + jr z, .physicalcrit + sla c + rl b + +.physicalcrit + ld hl, wEnemyMonAttack + call CheckDamageStatsCritical + jr c, .thickclub + + ld hl, wPlayerDefense + ld a, [hli] + ld b, a + ld c, [hl] + ld hl, wEnemyAttack + jr .thickclub + +.special + ld hl, wBattleMonSpclDef + ld a, [hli] + ld b, a + ld c, [hl] + + ld a, [wPlayerScreens] + bit SCREENS_LIGHT_SCREEN, a + jr z, .specialcrit + sla c + rl b + +.specialcrit + ld hl, wEnemyMonSpclAtk + call CheckDamageStatsCritical + jr c, .lightball + ld hl, wPlayerSpDef + ld a, [hli] + ld b, a + ld c, [hl] + ld hl, wEnemySpAtk + +.lightball + call LightBallBoost + jr .done + +.thickclub + call ThickClubBoost + +.done + call TruncateHL_BC + + ld a, [wEnemyMonLevel] + ld e, a + call DittoMetalPowder + + ld a, 1 + and a + ret + +INCLUDE "engine/battle/move_effects/beat_up.asm" + +BattleCommand_ClearMissDamage: + ld a, [wAttackMissed] + and a + ret z + + jp ResetDamage + +HitSelfInConfusion: + call ResetDamage + ldh a, [hBattleTurn] + and a + ld hl, wBattleMonDefense + ld de, wPlayerScreens + ld a, [wBattleMonLevel] + jr z, .got_it + + ld hl, wEnemyMonDefense + ld de, wEnemyScreens + ld a, [wEnemyMonLevel] +.got_it + push af + ld a, [hli] + ld b, a + ld c, [hl] + ld a, [de] + bit SCREENS_REFLECT, a + jr z, .mimic_screen + + sla c + rl b +.mimic_screen + dec hl + dec hl + dec hl + ld a, [hli] + ld l, [hl] + ld h, a + call TruncateHL_BC + ld d, 40 + pop af + ld e, a + ret + +BattleCommand_DamageCalc: +; Return a damage value for move power d, player level e, enemy defense c and player attack b. +; BUG: Confusion damage is affected by type-boosting items and Explosion/Self-Destruct doubling (see docs/bugs_and_glitches.md) + + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + +; Selfdestruct and Explosion halve defense. + cp EFFECT_SELFDESTRUCT + jr nz, .dont_selfdestruct + + srl c + jr nz, .dont_selfdestruct + inc c + +.dont_selfdestruct + +; Variable-hit moves and Conversion can have a power of 0. + cp EFFECT_MULTI_HIT + jr z, .skip_zero_damage_check + + cp EFFECT_CONVERSION + jr z, .skip_zero_damage_check + +; No damage if move power is 0. + ld a, d + and a + ret z + +.skip_zero_damage_check +; Minimum defense value is 1. + ld a, c + and a + jr nz, .not_dividing_by_zero + ld c, 1 +.not_dividing_by_zero + + xor a + ld hl, hDividend + ld [hli], a + ld [hli], a + ld [hl], a + +; Level * 2 + ld a, e + add a + jr nc, .level_not_overflowing + ld [hl], 1 +.level_not_overflowing + inc hl + ld [hli], a + +; / 5 + ld a, 5 + ld [hld], a + push bc + ld b, 4 + call Divide + pop bc + +; + 2 + inc [hl] + inc [hl] + +; * bp + inc hl + ld [hl], d + call Multiply + +; * Attack + ld [hl], b + call Multiply + +; / Defense + ld [hl], c + ld b, 4 + call Divide + +; / 50 + ld [hl], 50 + ld b, $4 + call Divide + +; Item boosts + call GetUserItem + + ld a, b + and a + jr z, .DoneItem + + ld hl, TypeBoostItems + +.NextItem: + ld a, [hli] + cp -1 + jr z, .DoneItem + +; Item effect + cp b + ld a, [hli] + jr nz, .NextItem + +; Type + ld b, a + ld a, BATTLE_VARS_MOVE_TYPE + call GetBattleVar + cp b + jr nz, .DoneItem + +; * 100 + item effect amount + ld a, c + add 100 + ldh [hMultiplier], a + call Multiply + +; / 100 + ld a, 100 + ldh [hDivisor], a + ld b, 4 + call Divide + +.DoneItem: +; Critical hits + call .CriticalMultiplier + +; Update wCurDamage. Max 999 (capped at 997, then add 2). +DEF MAX_DAMAGE EQU 999 +DEF MIN_DAMAGE EQU 2 +DEF DAMAGE_CAP EQU MAX_DAMAGE - MIN_DAMAGE + + ld hl, wCurDamage + ld b, [hl] + ldh a, [hQuotient + 3] + add b + ldh [hQuotient + 3], a + jr nc, .dont_cap_1 + + ldh a, [hQuotient + 2] + inc a + ldh [hQuotient + 2], a + and a + jr z, .Cap + +.dont_cap_1 + ldh a, [hQuotient] + ld b, a + ldh a, [hQuotient + 1] + or a + jr nz, .Cap + + ldh a, [hQuotient + 2] + cp HIGH(DAMAGE_CAP + 1) + jr c, .dont_cap_2 + + cp HIGH(DAMAGE_CAP + 1) + 1 + jr nc, .Cap + + ldh a, [hQuotient + 3] + cp LOW(DAMAGE_CAP + 1) + jr nc, .Cap + +.dont_cap_2 + inc hl + + ldh a, [hQuotient + 3] + ld b, [hl] + add b + ld [hld], a + + ldh a, [hQuotient + 2] + ld b, [hl] + adc b + ld [hl], a + jr c, .Cap + + ld a, [hl] + cp HIGH(DAMAGE_CAP + 1) + jr c, .dont_cap_3 + + cp HIGH(DAMAGE_CAP + 1) + 1 + jr nc, .Cap + + inc hl + ld a, [hld] + cp LOW(DAMAGE_CAP + 1) + jr c, .dont_cap_3 + +.Cap: + ld a, HIGH(DAMAGE_CAP) + ld [hli], a + ld a, LOW(DAMAGE_CAP) + ld [hld], a + +.dont_cap_3 +; Add back MIN_DAMAGE (capping at 999). + inc hl + ld a, [hl] + add MIN_DAMAGE + ld [hld], a + jr nc, .dont_floor + inc [hl] +.dont_floor + +; Returns nz and nc. + ld a, 1 + and a + ret + +.CriticalMultiplier: + ld a, [wCriticalHit] + and a + ret z + +; x2 + ldh a, [hQuotient + 3] + add a + ldh [hQuotient + 3], a + + ldh a, [hQuotient + 2] + rl a + ldh [hQuotient + 2], a + +; Cap at $ffff. + ret nc + + ld a, $ff + ldh [hQuotient + 2], a + ldh [hQuotient + 3], a + + ret + +INCLUDE "data/types/type_boost_items.asm" + +BattleCommand_ConstantDamage: + ld hl, wBattleMonLevel + ldh a, [hBattleTurn] + and a + jr z, .got_turn + ld hl, wEnemyMonLevel + +.got_turn + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_LEVEL_DAMAGE + ld b, [hl] + ld a, 0 + jr z, .got_power + + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_PSYWAVE + jr z, .psywave + + cp EFFECT_SUPER_FANG + jr z, .super_fang + + cp EFFECT_REVERSAL + jr z, .reversal + + ld a, BATTLE_VARS_MOVE_POWER + call GetBattleVar + ld b, a + ld a, $0 + jr .got_power + +.psywave + ld a, b + srl a + add b + ld b, a +.psywave_loop + call BattleRandom + and a + jr z, .psywave_loop + cp b + jr nc, .psywave_loop + ld b, a + ld a, 0 + jr .got_power + +.super_fang + ld hl, wEnemyMonHP + ldh a, [hBattleTurn] + and a + jr z, .got_hp + ld hl, wBattleMonHP +.got_hp + ld a, [hli] + srl a + ld b, a + ld a, [hl] + rr a + push af + ld a, b + pop bc + and a + jr nz, .got_power + or b + ld a, 0 + jr nz, .got_power + ld b, 1 + jr .got_power + +.got_power + ld hl, wCurDamage + ld [hli], a + ld [hl], b + ret + +.reversal + ld hl, wBattleMonHP + ldh a, [hBattleTurn] + and a + jr z, .reversal_got_hp + ld hl, wEnemyMonHP +.reversal_got_hp + xor a + ldh [hDividend], a + ldh [hMultiplicand + 0], a + ld a, [hli] + ldh [hMultiplicand + 1], a + ld a, [hli] + ldh [hMultiplicand + 2], a + ld a, 48 + ldh [hMultiplier], a + call Multiply + ld a, [hli] + ld b, a + ld a, [hl] + ldh [hDivisor], a + ld a, b + and a + jr z, .skip_to_divide + + ldh a, [hProduct + 4] + srl b + rr a + srl b + rr a + ldh [hDivisor], a + ldh a, [hProduct + 2] + ld b, a + srl b + ldh a, [hProduct + 3] + rr a + srl b + rr a + ldh [hDividend + 3], a + ld a, b + ldh [hDividend + 2], a + +.skip_to_divide + ld b, 4 + call Divide + ldh a, [hQuotient + 3] + ld b, a + ld hl, FlailReversalPower + +.reversal_loop + ld a, [hli] + cp b + jr nc, .break_loop + inc hl + jr .reversal_loop + +.break_loop + ldh a, [hBattleTurn] + and a + ld a, [hl] + jr nz, .notPlayersTurn + + ld hl, wPlayerMoveStructPower + ld [hl], a + push hl + call PlayerAttackDamage + jr .notEnemysTurn + +.notPlayersTurn + ld hl, wEnemyMoveStructPower + ld [hl], a + push hl + call EnemyAttackDamage + +.notEnemysTurn + call BattleCommand_DamageCalc + pop hl + ld [hl], 1 + ret + +INCLUDE "data/moves/flail_reversal_power.asm" + +INCLUDE "engine/battle/move_effects/counter.asm" + +INCLUDE "engine/battle/move_effects/encore.asm" + +INCLUDE "engine/battle/move_effects/pain_split.asm" + +INCLUDE "engine/battle/move_effects/snore.asm" + +INCLUDE "engine/battle/move_effects/conversion2.asm" + +INCLUDE "engine/battle/move_effects/lock_on.asm" + +INCLUDE "engine/battle/move_effects/sketch.asm" + +BattleCommand_DefrostOpponent: +; Thaw the opponent if frozen, and +; raise the user's Attack one stage. + + call AnimateCurrentMove + + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + call Defrost + + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVarAddr + ld a, [hl] + push hl + push af + + ld a, EFFECT_ATTACK_UP + ld [hl], a + call BattleCommand_StatUp + + pop af + pop hl + ld [hl], a + ret + +INCLUDE "engine/battle/move_effects/sleep_talk.asm" + +INCLUDE "engine/battle/move_effects/destiny_bond.asm" + +INCLUDE "engine/battle/move_effects/spite.asm" + +INCLUDE "engine/battle/move_effects/false_swipe.asm" + +INCLUDE "engine/battle/move_effects/heal_bell.asm" + +FarPlayBattleAnimation: +; play animation de + + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVar + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + ret nz + + ; fallthrough + +PlayFXAnimID: + ld a, e + ld [wFXAnimID], a + ld a, d + ld [wFXAnimID + 1], a +PlaySelectedFXAnim: + ld c, 3 + call DelayFrames + callfar PlayBattleAnim + ret + +DoEnemyDamage: + ld hl, wCurDamage + ld a, [hli] + ld b, a + ld a, [hl] + or b + jr z, .did_no_damage + + ld a, c + and a + jr nz, .ignore_substitute + ld a, [wEnemySubStatus4] + bit SUBSTATUS_SUBSTITUTE, a + jp nz, DoSubstituteDamage + +.ignore_substitute + ; Subtract wCurDamage from wEnemyMonHP. + ; store original HP in little endian wHPBuffer2 + ld a, [hld] + ld b, a + ld a, [wEnemyMonHP + 1] + ld [wHPBuffer2], a + sub b + ld [wEnemyMonHP + 1], a + ld a, [hl] + ld b, a + ld a, [wEnemyMonHP] + ld [wHPBuffer2 + 1], a + sbc b + ld [wEnemyMonHP], a +if DEF(_DEBUG) + push af + ld a, BANK(sSkipBattle) + call OpenSRAM + ld a, [sSkipBattle] + call CloseSRAM + or a + ; If [sSkipBattle] is nonzero, skip the "jr nc, .no_underflow" check, + ; so any attack deals maximum damage to the enemy. + jr nz, .debug_skip + pop af + jr nc, .no_underflow + push af +.debug_skip + pop af +else + jr nc, .no_underflow +endc + + ld a, [wHPBuffer2 + 1] + ld [hli], a + ld a, [wHPBuffer2] + ld [hl], a + xor a + ld hl, wEnemyMonHP + ld [hli], a + ld [hl], a + +.no_underflow + ld hl, wEnemyMonMaxHP + ld a, [hli] + ld [wHPBuffer1 + 1], a + ld a, [hl] + ld [wHPBuffer1], a + ld hl, wEnemyMonHP + ld a, [hli] + ld [wHPBuffer3 + 1], a + ld a, [hl] + ld [wHPBuffer3], a + + hlcoord 2, 2 + xor a + ld [wWhichHPBar], a + predef AnimateHPBar +.did_no_damage + jp RefreshBattleHuds + +DoPlayerDamage: + ld hl, wCurDamage + ld a, [hli] + ld b, a + ld a, [hl] + or b + jr z, .did_no_damage + + ld a, c + and a + jr nz, .ignore_substitute + ld a, [wPlayerSubStatus4] + bit SUBSTATUS_SUBSTITUTE, a + jp nz, DoSubstituteDamage + +.ignore_substitute + ; Subtract wCurDamage from wBattleMonHP. + ; store original HP in little endian wHPBuffer2 + ; store new HP in little endian wHPBuffer3 + ld a, [hld] + ld b, a + ld a, [wBattleMonHP + 1] + ld [wHPBuffer2], a + sub b + ld [wBattleMonHP + 1], a + ld [wHPBuffer3], a + ld b, [hl] + ld a, [wBattleMonHP] + ld [wHPBuffer2 + 1], a + sbc b + ld [wBattleMonHP], a + ld [wHPBuffer3 + 1], a + jr nc, .no_underflow + + ld a, [wHPBuffer2 + 1] + ld [hli], a + ld a, [wHPBuffer2] + ld [hl], a + xor a + ld hl, wBattleMonHP + ld [hli], a + ld [hl], a + ld hl, wHPBuffer3 + ld [hli], a + ld [hl], a + +.no_underflow + ld hl, wBattleMonMaxHP + ld a, [hli] + ld [wHPBuffer1 + 1], a + ld a, [hl] + ld [wHPBuffer1], a + + hlcoord 10, 9 + ld a, 1 + ld [wWhichHPBar], a + predef AnimateHPBar +.did_no_damage + jp RefreshBattleHuds + +DoSubstituteDamage: + ld hl, SubTookDamageText + call StdBattleTextbox + + ld de, wEnemySubstituteHP + ldh a, [hBattleTurn] + and a + jr z, .got_hp + ld de, wPlayerSubstituteHP +.got_hp + + ld hl, wCurDamage + ld a, [hli] + and a + jr nz, .broke + + ld a, [de] + sub [hl] + ld [de], a + jr z, .broke + jr nc, .done + +.broke + ld a, BATTLE_VARS_SUBSTATUS4_OPP + call GetBattleVarAddr + res SUBSTATUS_SUBSTITUTE, [hl] + + ld hl, SubFadedText + call StdBattleTextbox + + call BattleCommand_SwitchTurn + call BattleCommand_LowerSubNoAnim + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVar + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + call z, AppearUserLowerSub + call BattleCommand_SwitchTurn + + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVarAddr + cp EFFECT_MULTI_HIT + jr z, .ok + cp EFFECT_DOUBLE_HIT + jr z, .ok + cp EFFECT_POISON_MULTI_HIT + jr z, .ok + cp EFFECT_TRIPLE_KICK + jr z, .ok + cp EFFECT_BEAT_UP + jr z, .ok + xor a + ld [hl], a +.ok + call RefreshBattleHuds +.done + jp ResetDamage + +UpdateMoveData: + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVarAddr + ld d, h + ld e, l + + ld a, BATTLE_VARS_MOVE + call GetBattleVar + ld [wCurSpecies], a + ld [wNamedObjectIndex], a + + call GetMoveData + call GetMoveName + jp CopyName1 + +BattleCommand_SleepTarget: + call GetOpponentItem + ld a, b + cp HELD_PREVENT_SLEEP + jr nz, .not_protected_by_item + + ld a, [hl] + ld [wNamedObjectIndex], a + call GetItemName + ld hl, ProtectedByText + jr .fail + +.not_protected_by_item + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + ld d, h + ld e, l + ld a, [de] + and SLP_MASK + ld hl, AlreadyAsleepText + jr nz, .fail + + ld a, [wAttackMissed] + and a + jp nz, PrintDidntAffect2 + + ld hl, DidntAffect1Text + call .CheckAIRandomFail + jr c, .fail + + ld a, [de] + and a + jr nz, .fail + + call CheckSubstituteOpp + jr nz, .fail + + call AnimateCurrentMove + ld b, SLP_MASK + ld a, [wInBattleTowerBattle] + and a + jr z, .random_loop + ld b, %011 + +.random_loop + call BattleRandom + and b + jr z, .random_loop + cp SLP_MASK + jr z, .random_loop + inc a + ld [de], a + call UpdateOpponentInParty + call RefreshBattleHuds + + ld hl, FellAsleepText + call StdBattleTextbox + + farcall UseHeldStatusHealingItem + + jp z, OpponentCantMove + ret + +.fail + push hl + call AnimateFailedMove + pop hl + jp StdBattleTextbox + +.CheckAIRandomFail: + ; Enemy turn + ldh a, [hBattleTurn] + and a + jr z, .dont_fail + + ; Not in link battle + ld a, [wLinkMode] + and a + jr nz, .dont_fail + + ld a, [wInBattleTowerBattle] + and a + jr nz, .dont_fail + + ; Not locked-on by the enemy + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_LOCK_ON, a + jr nz, .dont_fail + + call BattleRandom + cp 25 percent + 1 ; 25% chance AI fails + ret c + +.dont_fail + xor a + ret + +BattleCommand_PoisonTarget: + call CheckSubstituteOpp + ret nz + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + and a + ret nz + ld a, [wTypeModifier] + and $7f + ret z + call CheckIfTargetIsPoisonType + ret z + call GetOpponentItem + ld a, b + cp HELD_PREVENT_POISON + ret z + ld a, [wEffectFailed] + and a + ret nz + call SafeCheckSafeguard + ret nz + + call PoisonOpponent + ld de, ANIM_PSN + call PlayOpponentBattleAnim + call RefreshBattleHuds + + ld hl, WasPoisonedText + call StdBattleTextbox + + farcall UseHeldStatusHealingItem + ret + +BattleCommand_Poison: + ld hl, DoesntAffectText + ld a, [wTypeModifier] + and $7f + jp z, .failed + + call CheckIfTargetIsPoisonType + jp z, .failed + + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVar + ld b, a + ld hl, AlreadyPoisonedText + and 1 << PSN + jp nz, .failed + + call GetOpponentItem + ld a, b + cp HELD_PREVENT_POISON + jr nz, .do_poison + ld a, [hl] + ld [wNamedObjectIndex], a + call GetItemName + ld hl, ProtectedByText + jr .failed + +.do_poison + ld hl, DidntAffect1Text + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVar + and a + jr nz, .failed + + ldh a, [hBattleTurn] + and a + jr z, .dont_sample_failure + + ld a, [wLinkMode] + and a + jr nz, .dont_sample_failure + + ld a, [wInBattleTowerBattle] + and a + jr nz, .dont_sample_failure + + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_LOCK_ON, a + jr nz, .dont_sample_failure + + call BattleRandom + cp 25 percent + 1 ; 25% chance AI fails + jr c, .failed + +.dont_sample_failure + call CheckSubstituteOpp + jr nz, .failed + ld a, [wAttackMissed] + and a + jr nz, .failed + call .check_toxic + jr z, .toxic + + call .apply_poison + ld hl, WasPoisonedText + call StdBattleTextbox + jr .finished + +.toxic + set SUBSTATUS_TOXIC, [hl] + xor a + ld [de], a + call .apply_poison + + ld hl, BadlyPoisonedText + call StdBattleTextbox + +.finished + farcall UseHeldStatusHealingItem + ret + +.failed + push hl + call AnimateFailedMove + pop hl + jp StdBattleTextbox + +.apply_poison + call AnimateCurrentMove + call PoisonOpponent + jp RefreshBattleHuds + +.check_toxic + ld a, BATTLE_VARS_SUBSTATUS5_OPP + call GetBattleVarAddr + ldh a, [hBattleTurn] + and a + ld de, wEnemyToxicCount + jr z, .ok + ld de, wPlayerToxicCount +.ok + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_TOXIC + ret + +CheckIfTargetIsPoisonType: + ld de, wEnemyMonType1 + ldh a, [hBattleTurn] + and a + jr z, .ok + ld de, wBattleMonType1 +.ok + ld a, [de] + inc de + cp POISON + ret z + ld a, [de] + cp POISON + ret + +PoisonOpponent: + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + set PSN, [hl] + jp UpdateOpponentInParty + +BattleCommand_DrainTarget: + call SapHealth + ld hl, SuckedHealthText + jp StdBattleTextbox + +BattleCommand_EatDream: + call SapHealth + ld hl, DreamEatenText + jp StdBattleTextbox + +SapHealth: + ; Divide damage by 2, store it in hDividend + ld hl, wCurDamage + ld a, [hli] + srl a + ldh [hDividend], a + ld b, a + ld a, [hl] + rr a + ldh [hDividend + 1], a + or b + jr nz, .at_least_one + ld a, 1 + ldh [hDividend + 1], a +.at_least_one + + ld hl, wBattleMonHP + ld de, wBattleMonMaxHP + ldh a, [hBattleTurn] + and a + jr z, .battlemonhp + ld hl, wEnemyMonHP + ld de, wEnemyMonMaxHP +.battlemonhp + + ; Store current HP in little endian wHPBuffer2 + ld bc, wHPBuffer2 + 1 + ld a, [hli] + ld [bc], a + ld a, [hl] + dec bc + ld [bc], a + + ; Store max HP in little endian wHPBuffer1 + ld a, [de] + dec bc + ld [bc], a + inc de + ld a, [de] + dec bc + ld [bc], a + + ; Add hDividend to current HP and copy it to little endian wHPBuffer3 + ldh a, [hDividend + 1] + ld b, [hl] + add b + ld [hld], a + ld [wHPBuffer3], a + ldh a, [hDividend] + ld b, [hl] + adc b + ld [hli], a + ld [wHPBuffer3 + 1], a + jr c, .max_hp + + ; Subtract current HP from max HP (to see if we have more than max HP) + ld a, [hld] + ld b, a + ld a, [de] + dec de + sub b + ld a, [hli] + ld b, a + ld a, [de] + inc de + sbc b + jr nc, .finish + +.max_hp + ; Load max HP into current HP and copy it to little endian wHPBuffer3 + ld a, [de] + ld [hld], a + ld [wHPBuffer3], a + dec de + ld a, [de] + ld [hli], a + ld [wHPBuffer3 + 1], a + inc de + +.finish + ldh a, [hBattleTurn] + and a + hlcoord 10, 9 + ld a, $1 + jr z, .hp_bar + hlcoord 2, 2 + xor a +.hp_bar + ld [wWhichHPBar], a + predef AnimateHPBar + call RefreshBattleHuds + jp UpdateBattleMonInParty + +BattleCommand_BurnTarget: + xor a + ld [wNumHits], a + call CheckSubstituteOpp + ret nz + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + and a + jp nz, Defrost + ld a, [wTypeModifier] + and $7f + ret z + call CheckMoveTypeMatchesTarget ; Don't burn a Fire-type + ret z + call GetOpponentItem + ld a, b + cp HELD_PREVENT_BURN + ret z + ld a, [wEffectFailed] + and a + ret nz + call SafeCheckSafeguard + ret nz + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + set BRN, [hl] + call UpdateOpponentInParty + ld hl, ApplyBrnEffectOnAttack + call CallBattleCore + ld de, ANIM_BRN + call PlayOpponentBattleAnim + call RefreshBattleHuds + + ld hl, WasBurnedText + call StdBattleTextbox + + farcall UseHeldStatusHealingItem + ret + +Defrost: + ld a, [hl] + and 1 << FRZ + ret z + + xor a + ld [hl], a + + ldh a, [hBattleTurn] + and a + ld a, [wCurOTMon] + ld hl, wOTPartyMon1Status + jr z, .ok + ld hl, wPartyMon1Status + ld a, [wCurBattleMon] +.ok + + call GetPartyLocation + xor a + ld [hl], a + call UpdateOpponentInParty + + ld hl, DefrostedOpponentText + jp StdBattleTextbox + +BattleCommand_FreezeTarget: + xor a + ld [wNumHits], a + call CheckSubstituteOpp + ret nz + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + and a + ret nz + ld a, [wTypeModifier] + and $7f + ret z + ld a, [wBattleWeather] + cp WEATHER_SUN + ret z + call CheckMoveTypeMatchesTarget ; Don't freeze an Ice-type + ret z + call GetOpponentItem + ld a, b + cp HELD_PREVENT_FREEZE + ret z + ld a, [wEffectFailed] + and a + ret nz + call SafeCheckSafeguard + ret nz + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + set FRZ, [hl] + call UpdateOpponentInParty + ld de, ANIM_FRZ + call PlayOpponentBattleAnim + call RefreshBattleHuds + + ld hl, WasFrozenText + call StdBattleTextbox + + farcall UseHeldStatusHealingItem + ret nz + + call OpponentCantMove + call EndRechargeOpp + ld hl, wEnemyJustGotFrozen + ldh a, [hBattleTurn] + and a + jr z, .finish + ld hl, wPlayerJustGotFrozen +.finish + ld [hl], $1 + ret + +BattleCommand_ParalyzeTarget: + xor a + ld [wNumHits], a + call CheckSubstituteOpp + ret nz + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + and a + ret nz + ld a, [wTypeModifier] + and $7f + ret z + call GetOpponentItem + ld a, b + cp HELD_PREVENT_PARALYZE + ret z + ld a, [wEffectFailed] + and a + ret nz + call SafeCheckSafeguard + ret nz + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + set PAR, [hl] + call UpdateOpponentInParty + ld hl, ApplyPrzEffectOnSpeed + call CallBattleCore + ld de, ANIM_PAR + call PlayOpponentBattleAnim + call RefreshBattleHuds + call PrintParalyze + ld hl, UseHeldStatusHealingItem + jp CallBattleCore + +BattleCommand_AttackUp: + ld b, ATTACK + jr BattleCommand_StatUp + +BattleCommand_DefenseUp: + ld b, DEFENSE + jr BattleCommand_StatUp + +BattleCommand_SpeedUp: + ld b, SPEED + jr BattleCommand_StatUp + +BattleCommand_SpecialAttackUp: + ld b, SP_ATTACK + jr BattleCommand_StatUp + +BattleCommand_SpecialDefenseUp: + ld b, SP_DEFENSE + jr BattleCommand_StatUp + +BattleCommand_AccuracyUp: + ld b, ACCURACY + jr BattleCommand_StatUp + +BattleCommand_EvasionUp: + ld b, EVASION + jr BattleCommand_StatUp + +BattleCommand_AttackUp2: + ld b, $10 | ATTACK + jr BattleCommand_StatUp + +BattleCommand_DefenseUp2: + ld b, $10 | DEFENSE + jr BattleCommand_StatUp + +BattleCommand_SpeedUp2: + ld b, $10 | SPEED + jr BattleCommand_StatUp + +BattleCommand_SpecialAttackUp2: + ld b, $10 | SP_ATTACK + jr BattleCommand_StatUp + +BattleCommand_SpecialDefenseUp2: + ld b, $10 | SP_DEFENSE + jr BattleCommand_StatUp + +BattleCommand_AccuracyUp2: + ld b, $10 | ACCURACY + jr BattleCommand_StatUp + +BattleCommand_EvasionUp2: + ld b, $10 | EVASION + jr BattleCommand_StatUp + +BattleCommand_StatUp: + call RaiseStat + ld a, [wFailedMessage] + and a + ret nz + jp MinimizeDropSub + +RaiseStat: + ld a, b + ld [wLoweredStat], a + ld hl, wPlayerStatLevels + ldh a, [hBattleTurn] + and a + jr z, .got_stat_levels + ld hl, wEnemyStatLevels +.got_stat_levels + ld a, [wAttackMissed] + and a + jp nz, .stat_raise_failed + ld a, [wEffectFailed] + and a + jp nz, .stat_raise_failed + ld a, [wLoweredStat] + and $f + ld c, a + ld b, 0 + add hl, bc + ld b, [hl] + inc b + ld a, $d + cp b + jp c, .cant_raise_stat + ld a, [wLoweredStat] + and $f0 + jr z, .got_num_stages + inc b + ld a, $d + cp b + jr nc, .got_num_stages + ld b, a +.got_num_stages + ld [hl], b + push hl + ld a, c + cp $5 + jr nc, .done_calcing_stats + ld hl, wBattleMonStats + 1 + ld de, wPlayerStats + ldh a, [hBattleTurn] + and a + jr z, .got_stats_pointer + ld hl, wEnemyMonStats + 1 + ld de, wEnemyStats +.got_stats_pointer + push bc + sla c + ld b, 0 + add hl, bc + ld a, c + add e + ld e, a + jr nc, .no_carry + inc d +.no_carry + pop bc + ld a, [hld] + sub LOW(MAX_STAT_VALUE) + jr nz, .not_already_max + ld a, [hl] + sbc HIGH(MAX_STAT_VALUE) + jp z, .stats_already_max +.not_already_max + ldh a, [hBattleTurn] + and a + jr z, .calc_player_stats + call CalcEnemyStats + jr .done_calcing_stats + +.calc_player_stats + call CalcPlayerStats +.done_calcing_stats + pop hl + xor a + ld [wFailedMessage], a + ret + +.stats_already_max + pop hl + dec [hl] + ; fallthrough + +.cant_raise_stat + ld a, $2 + ld [wFailedMessage], a + ld a, $1 + ld [wAttackMissed], a + ret + +.stat_raise_failed + ld a, $1 + ld [wFailedMessage], a + ret + +MinimizeDropSub: +; Lower the substitute if we're minimizing + + ld de, wPlayerMinimized + ld hl, DropPlayerSub + ldh a, [hBattleTurn] + and a + jr z, .do_player + ld de, wEnemyMinimized + ld hl, DropEnemySub +.do_player + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + ld bc, MINIMIZE + call CompareMove + ret nz + + ld a, $1 + ld [de], a + call _CheckBattleScene + ret nc + + xor a + ldh [hBGMapMode], a + call CallBattleCore + call WaitBGMap + jp BattleCommand_MoveDelay + +BattleCommand_AttackDown: + ld a, ATTACK + jr BattleCommand_StatDown + +BattleCommand_DefenseDown: + ld a, DEFENSE + jr BattleCommand_StatDown + +BattleCommand_SpeedDown: + ld a, SPEED + jr BattleCommand_StatDown + +BattleCommand_SpecialAttackDown: + ld a, SP_ATTACK + jr BattleCommand_StatDown + +BattleCommand_SpecialDefenseDown: + ld a, SP_DEFENSE + jr BattleCommand_StatDown + +BattleCommand_AccuracyDown: + ld a, ACCURACY + jr BattleCommand_StatDown + +BattleCommand_EvasionDown: + ld a, EVASION + jr BattleCommand_StatDown + +BattleCommand_AttackDown2: + ld a, $10 | ATTACK + jr BattleCommand_StatDown + +BattleCommand_DefenseDown2: + ld a, $10 | DEFENSE + jr BattleCommand_StatDown + +BattleCommand_SpeedDown2: + ld a, $10 | SPEED + jr BattleCommand_StatDown + +BattleCommand_SpecialAttackDown2: + ld a, $10 | SP_ATTACK + jr BattleCommand_StatDown + +BattleCommand_SpecialDefenseDown2: + ld a, $10 | SP_DEFENSE + jr BattleCommand_StatDown + +BattleCommand_AccuracyDown2: + ld a, $10 | ACCURACY + jr BattleCommand_StatDown + +BattleCommand_EvasionDown2: + ld a, $10 | EVASION + +BattleCommand_StatDown: + ld [wLoweredStat], a + + call CheckMist + jp nz, .Mist + + ld hl, wEnemyStatLevels + ldh a, [hBattleTurn] + and a + jr z, .GetStatLevel + ld hl, wPlayerStatLevels + +.GetStatLevel: +; Attempt to lower the stat. + ld a, [wLoweredStat] + and $f + ld c, a + ld b, 0 + add hl, bc + ld b, [hl] + dec b + jp z, .CantLower + +; Sharply lower the stat if applicable. + ld a, [wLoweredStat] + and $f0 + jr z, .ComputerMiss + dec b + jr nz, .ComputerMiss + inc b + +.ComputerMiss: +; Computer opponents have a 25% chance of failing. + ldh a, [hBattleTurn] + and a + jr z, .DidntMiss + + ld a, [wLinkMode] + and a + jr nz, .DidntMiss + + ld a, [wInBattleTowerBattle] + and a + jr nz, .DidntMiss + +; Lock-On still always works. + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_LOCK_ON, a + jr nz, .DidntMiss + +; Attacking moves that also lower accuracy are unaffected. + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_ACCURACY_DOWN_HIT + jr z, .DidntMiss + + call BattleRandom + cp 25 percent + 1 ; 25% chance AI fails + jr c, .Failed + +.DidntMiss: + call CheckSubstituteOpp + jr nz, .Failed + + ld a, [wAttackMissed] + and a + jr nz, .Failed + + ld a, [wEffectFailed] + and a + jr nz, .Failed + + call CheckHiddenOpponent + jr nz, .Failed + +; Accuracy/Evasion reduction don't involve stats. + ld [hl], b + ld a, c + cp ACCURACY + jr nc, .Hit + + push hl + ld hl, wEnemyMonAttack + 1 + ld de, wEnemyStats + ldh a, [hBattleTurn] + and a + jr z, .do_enemy + ld hl, wBattleMonAttack + 1 + ld de, wPlayerStats +.do_enemy + call TryLowerStat + pop hl + jr z, .CouldntLower + +.Hit: + xor a + ld [wFailedMessage], a + ret + +.CouldntLower: + inc [hl] +.CantLower: + ld a, 3 + ld [wFailedMessage], a + ld a, 1 + ld [wAttackMissed], a + ret + +.Failed: + ld a, 1 + ld [wFailedMessage], a + ld [wAttackMissed], a + ret + +.Mist: + ld a, 2 + ld [wFailedMessage], a + ld a, 1 + ld [wAttackMissed], a + ret + +CheckMist: + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_ATTACK_DOWN + jr c, .dont_check_mist + cp EFFECT_EVASION_DOWN + 1 + jr c, .check_mist + cp EFFECT_ATTACK_DOWN_2 + jr c, .dont_check_mist + cp EFFECT_EVASION_DOWN_2 + 1 + jr c, .check_mist + cp EFFECT_ATTACK_DOWN_HIT + jr c, .dont_check_mist + cp EFFECT_EVASION_DOWN_HIT + 1 + jr c, .check_mist +.dont_check_mist + xor a + ret + +.check_mist + ld a, BATTLE_VARS_SUBSTATUS4_OPP + call GetBattleVar + bit SUBSTATUS_MIST, a + ret + +BattleCommand_StatUpMessage: + ld a, [wFailedMessage] + and a + ret nz + ld a, [wLoweredStat] + and $f + ld b, a + inc b + call GetStatName + ld hl, .stat + jp BattleTextbox + +.stat + text_far Text_BattleEffectActivate + text_asm + ld hl, .BattleStatWentUpText + ld a, [wLoweredStat] + and $f0 + ret z + ld hl, .BattleStatWentWayUpText + ret + +.BattleStatWentWayUpText: + text_far _BattleStatWentWayUpText + text_end + +.BattleStatWentUpText: + text_far _BattleStatWentUpText + text_end + +BattleCommand_StatDownMessage: + ld a, [wFailedMessage] + and a + ret nz + ld a, [wLoweredStat] + and $f + ld b, a + inc b + call GetStatName + ld hl, .stat + jp BattleTextbox + +.stat + text_far Text_BattleFoeEffectActivate + text_asm + ld hl, .BattleStatFellText + ld a, [wLoweredStat] + and $f0 + ret z + ld hl, .BattleStatSharplyFellText + ret + +.BattleStatSharplyFellText: + text_far _BattleStatSharplyFellText + text_end + +.BattleStatFellText: + text_far _BattleStatFellText + text_end + +TryLowerStat: +; Lower stat c from stat struct hl (buffer de). + + push bc + sla c + ld b, 0 + add hl, bc + ; add de, c + ld a, c + add e + ld e, a + jr nc, .no_carry + inc d +.no_carry + pop bc + +; The lowest possible stat is 1. + ld a, [hld] + sub 1 + jr nz, .not_min + ld a, [hl] + and a + ret z + +.not_min + ldh a, [hBattleTurn] + and a + jr z, .Player + + call BattleCommand_SwitchTurn + call CalcPlayerStats + call BattleCommand_SwitchTurn + jr .end + +.Player: + call BattleCommand_SwitchTurn + call CalcEnemyStats + call BattleCommand_SwitchTurn +.end + ld a, 1 + and a + ret + +BattleCommand_StatUpFailText: + ld a, [wFailedMessage] + and a + ret z + push af + call BattleCommand_MoveDelay + pop af + dec a + jp z, TryPrintButItFailed + ld a, [wLoweredStat] + and $f + ld b, a + inc b + call GetStatName + ld hl, WontRiseAnymoreText + jp StdBattleTextbox + +BattleCommand_StatDownFailText: + ld a, [wFailedMessage] + and a + ret z + push af + call BattleCommand_MoveDelay + pop af + dec a + jp z, TryPrintButItFailed + dec a + ld hl, ProtectedByMistText + jp z, StdBattleTextbox + ld a, [wLoweredStat] + and $f + ld b, a + inc b + call GetStatName + ld hl, WontDropAnymoreText + jp StdBattleTextbox + +GetStatName: + ld hl, StatNames + ld c, "@" +.CheckName: + dec b + jr z, .Copy +.GetName: + ld a, [hli] + cp c + jr z, .CheckName + jr .GetName + +.Copy: + ld de, wStringBuffer2 + ld bc, STRING_BUFFER_LENGTH + jp CopyBytes + +INCLUDE "data/battle/stat_names.asm" + +INCLUDE "data/battle/stat_multipliers.asm" + +BattleCommand_AllStatsUp: +; Attack + call ResetMiss + call BattleCommand_AttackUp + call BattleCommand_StatUpMessage + +; Defense + call ResetMiss + call BattleCommand_DefenseUp + call BattleCommand_StatUpMessage + +; Speed + call ResetMiss + call BattleCommand_SpeedUp + call BattleCommand_StatUpMessage + +; Special Attack + call ResetMiss + call BattleCommand_SpecialAttackUp + call BattleCommand_StatUpMessage + +; Special Defense + call ResetMiss + call BattleCommand_SpecialDefenseUp + jp BattleCommand_StatUpMessage + +ResetMiss: + xor a + ld [wAttackMissed], a + ret + +LowerStat: + ld [wLoweredStat], a + + ld hl, wPlayerStatLevels + ldh a, [hBattleTurn] + and a + jr z, .got_target + ld hl, wEnemyStatLevels + +.got_target + ld a, [wLoweredStat] + and $f + ld c, a + ld b, 0 + add hl, bc + ld b, [hl] + dec b + jr z, .cant_lower_anymore + + ld a, [wLoweredStat] + and $f0 + jr z, .got_num_stages + dec b + jr nz, .got_num_stages + inc b + +.got_num_stages + ld [hl], b + ld a, c + cp 5 + jr nc, .accuracy_evasion + + push hl + ld hl, wBattleMonStats + 1 + ld de, wPlayerStats + ldh a, [hBattleTurn] + and a + jr z, .got_target_2 + ld hl, wEnemyMonStats + 1 + ld de, wEnemyStats + +.got_target_2 + call TryLowerStat + pop hl + jr z, .failed + +.accuracy_evasion + ldh a, [hBattleTurn] + and a + jr z, .player + + call CalcEnemyStats + + jr .finish + +.player + call CalcPlayerStats + +.finish + xor a + ld [wFailedMessage], a + ret + +.failed + inc [hl] + +.cant_lower_anymore + ld a, 2 + ld [wFailedMessage], a + ret + +BattleCommand_TriStatusChance: + call BattleCommand_EffectChance +.loop + ; 1/3 chance of each status + call BattleRandom + swap a + and %11 + jr z, .loop + dec a + ld hl, .StatusCommands + rst JumpTable + ret + +.StatusCommands: + dw BattleCommand_ParalyzeTarget ; paralyze + dw BattleCommand_FreezeTarget ; freeze + dw BattleCommand_BurnTarget ; burn + +BattleCommand_Curl: + ld a, BATTLE_VARS_SUBSTATUS2 + call GetBattleVarAddr + set SUBSTATUS_CURLED, [hl] + ret + +BattleCommand_RaiseSubNoAnim: + ld hl, GetBattleMonBackpic + ldh a, [hBattleTurn] + and a + jr z, .PlayerTurn + ld hl, GetEnemyMonFrontpic +.PlayerTurn: + xor a + ldh [hBGMapMode], a + call CallBattleCore + jp WaitBGMap + +BattleCommand_LowerSubNoAnim: + ld hl, DropPlayerSub + ldh a, [hBattleTurn] + and a + jr z, .PlayerTurn + ld hl, DropEnemySub +.PlayerTurn: + xor a + ldh [hBGMapMode], a + call CallBattleCore + jp WaitBGMap + +CalcPlayerStats: + ld hl, wPlayerAtkLevel + ld de, wPlayerStats + ld bc, wBattleMonAttack + + ld a, NUM_BATTLE_STATS + call CalcBattleStats + + ld hl, BadgeStatBoosts + call CallBattleCore + + call BattleCommand_SwitchTurn + + ld hl, ApplyPrzEffectOnSpeed + call CallBattleCore + + ld hl, ApplyBrnEffectOnAttack + call CallBattleCore + + jp BattleCommand_SwitchTurn + +CalcEnemyStats: + ld hl, wEnemyAtkLevel + ld de, wEnemyStats + ld bc, wEnemyMonAttack + + ld a, NUM_BATTLE_STATS + call CalcBattleStats + + call BattleCommand_SwitchTurn + + ld hl, ApplyPrzEffectOnSpeed + call CallBattleCore + + ld hl, ApplyBrnEffectOnAttack + call CallBattleCore + + jp BattleCommand_SwitchTurn + +CalcBattleStats: +.loop + push af + ld a, [hli] + push hl + push bc + + ld c, a + dec c + ld b, 0 + ld hl, StatLevelMultipliers + add hl, bc + add hl, bc + + xor a + ldh [hMultiplicand + 0], a + ld a, [de] + ldh [hMultiplicand + 1], a + inc de + ld a, [de] + ldh [hMultiplicand + 2], a + inc de + + ld a, [hli] + ldh [hMultiplier], a + call Multiply + + ld a, [hl] + ldh [hDivisor], a + ld b, 4 + call Divide + + ldh a, [hQuotient + 2] + ld b, a + ldh a, [hQuotient + 3] + or b + jr nz, .check_maxed_out + + ld a, 1 + ldh [hQuotient + 3], a + jr .not_maxed_out + +.check_maxed_out + ldh a, [hQuotient + 3] + cp LOW(MAX_STAT_VALUE) + ld a, b + sbc HIGH(MAX_STAT_VALUE) + jr c, .not_maxed_out + + ld a, LOW(MAX_STAT_VALUE) + ldh [hQuotient + 3], a + ld a, HIGH(MAX_STAT_VALUE) + ldh [hQuotient + 2], a + +.not_maxed_out + pop bc + ldh a, [hQuotient + 2] + ld [bc], a + inc bc + ldh a, [hQuotient + 3] + ld [bc], a + inc bc + pop hl + pop af + dec a + jr nz, .loop + + ret + +INCLUDE "engine/battle/move_effects/bide.asm" + +BattleCommand_CheckRampage: + ld de, wPlayerRolloutCount + ldh a, [hBattleTurn] + and a + jr z, .player + ld de, wEnemyRolloutCount +.player + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + bit SUBSTATUS_RAMPAGE, [hl] + ret z + ld a, [de] + dec a + ld [de], a + jr nz, .continue_rampage + + res SUBSTATUS_RAMPAGE, [hl] + call BattleCommand_SwitchTurn + call SafeCheckSafeguard + push af + call BattleCommand_SwitchTurn + pop af + jr nz, .continue_rampage + + set SUBSTATUS_CONFUSED, [hl] + call BattleRandom + and %00000001 + inc a + inc a + inc de ; ConfuseCount + ld [de], a +.continue_rampage + ld b, rampage_command + jp SkipToBattleCommand + +BattleCommand_Rampage: +; No rampage during Sleep Talk. + ld a, BATTLE_VARS_STATUS + call GetBattleVar + and SLP_MASK + ret nz + + ld de, wPlayerRolloutCount + ldh a, [hBattleTurn] + and a + jr z, .ok + ld de, wEnemyRolloutCount +.ok + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + set SUBSTATUS_RAMPAGE, [hl] +; Rampage for 1 or 2 more turns + call BattleRandom + and %00000001 + inc a + ld [de], a + ld a, 1 + ld [wSomeoneIsRampaging], a + ret + +INCLUDE "engine/battle/move_effects/teleport.asm" + +SetBattleDraw: + ld a, [wBattleResult] + and BATTLERESULT_BITMASK + or DRAW + ld [wBattleResult], a + ret + +BattleCommand_ForceSwitch: + ld a, [wBattleType] + cp BATTLETYPE_SHINY + jp z, .fail + cp BATTLETYPE_TRAP + jp z, .fail + cp BATTLETYPE_CELEBI + jp z, .fail + cp BATTLETYPE_SUICUNE + jp z, .fail + ldh a, [hBattleTurn] + and a + jp nz, .force_player_switch + ld a, [wAttackMissed] + and a + jr nz, .missed + ld a, [wBattleMode] + dec a + jr nz, .trainer + ld a, [wCurPartyLevel] + ld b, a + ld a, [wBattleMonLevel] + cp b + jr nc, .wild_force_flee + add b + ld c, a + inc c +.random_loop_wild + call BattleRandom + cp c + jr nc, .random_loop_wild + srl b + srl b + cp b + jr nc, .wild_force_flee +.missed + jp .fail + +.wild_force_flee + call UpdateBattleMonInParty + xor a + ld [wNumHits], a + inc a ; TRUE + ld [wForcedSwitch], a + call SetBattleDraw + ld a, [wPlayerMoveStructAnimation] + jp .succeed + +.trainer + call FindAliveEnemyMons + jr c, .switch_fail + ld a, [wEnemyGoesFirst] + and a + jr z, .switch_fail + call UpdateEnemyMonInParty + ld a, $1 + ld [wBattleAnimParam], a + call AnimateCurrentMove + ld c, $14 + call DelayFrames + hlcoord 1, 0 + lb bc, 4, 10 + call ClearBox + ld c, 20 + call DelayFrames + ld a, [wOTPartyCount] + ld b, a + ld a, [wCurOTMon] + ld c, a +; select a random enemy mon to switch to +.random_loop_trainer + call BattleRandom + and $7 + cp b + jr nc, .random_loop_trainer + cp c + jr z, .random_loop_trainer + push af + push bc + ld hl, wOTPartyMon1HP + call GetPartyLocation + ld a, [hli] + or [hl] + pop bc + pop de + jr z, .random_loop_trainer + ld a, d + inc a + ld [wEnemySwitchMonIndex], a + callfar ForceEnemySwitch + + ld hl, DraggedOutText + call StdBattleTextbox + + ld hl, SpikesDamage + jp CallBattleCore + +.switch_fail + jp .fail + +.force_player_switch + ld a, [wAttackMissed] + and a + jr nz, .player_miss + + ld a, [wBattleMode] + dec a + jr nz, .vs_trainer + + ld a, [wBattleMonLevel] + ld b, a + ld a, [wCurPartyLevel] + cp b + jr nc, .wild_succeed_playeristarget + + add b + ld c, a + inc c +.wild_random_loop_playeristarget + call BattleRandom + cp c + jr nc, .wild_random_loop_playeristarget + + srl b + srl b + cp b + jr nc, .wild_succeed_playeristarget + +.player_miss + jr .fail + +.wild_succeed_playeristarget + call UpdateBattleMonInParty + xor a + ld [wNumHits], a + inc a ; TRUE + ld [wForcedSwitch], a + call SetBattleDraw + ld a, [wEnemyMoveStructAnimation] + jr .succeed + +.vs_trainer + call CheckPlayerHasMonToSwitchTo + jr c, .fail + + ld a, [wEnemyGoesFirst] + cp $1 + jr z, .switch_fail + + call UpdateBattleMonInParty + ld a, $1 + ld [wBattleAnimParam], a + call AnimateCurrentMove + ld c, 20 + call DelayFrames + hlcoord 9, 7 + lb bc, 5, 11 + call ClearBox + ld c, 20 + call DelayFrames + ld a, [wPartyCount] + ld b, a + ld a, [wCurBattleMon] + ld c, a +.random_loop_trainer_playeristarget + call BattleRandom + and $7 + cp b + jr nc, .random_loop_trainer_playeristarget + + cp c + jr z, .random_loop_trainer_playeristarget + + push af + push bc + ld hl, wPartyMon1HP + call GetPartyLocation + ld a, [hli] + or [hl] + pop bc + pop de + jr z, .random_loop_trainer_playeristarget + + ld a, d + ld [wCurPartyMon], a + ld hl, SwitchPlayerMon + call CallBattleCore + + ld hl, DraggedOutText + call StdBattleTextbox + + ld hl, SpikesDamage + jp CallBattleCore + +.fail + call BattleCommand_LowerSub + call BattleCommand_MoveDelay + call BattleCommand_RaiseSub + jp PrintButItFailed + +.succeed + push af + call SetBattleDraw + ld a, $1 + ld [wBattleAnimParam], a + call AnimateCurrentMove + ld c, 20 + call DelayFrames + pop af + + ld hl, FledInFearText + ld bc, ROAR + call CompareMove + jr z, .do_text + ld hl, BlownAwayText +.do_text + jp StdBattleTextbox + +CheckPlayerHasMonToSwitchTo: + ld a, [wPartyCount] + ld d, a + ld e, 0 + ld bc, PARTYMON_STRUCT_LENGTH +.loop + ld a, [wCurBattleMon] + cp e + jr z, .next + + ld a, e + ld hl, wPartyMon1HP + call AddNTimes + ld a, [hli] + or [hl] + jr nz, .not_fainted + +.next + inc e + dec d + jr nz, .loop + + scf + ret + +.not_fainted + and a + ret + +BattleCommand_EndLoop: +; Loop back to 'critical'. + + ld de, wPlayerRolloutCount + ld bc, wPlayerDamageTaken + ldh a, [hBattleTurn] + and a + jr z, .got_addrs + ld de, wEnemyRolloutCount + ld bc, wEnemyDamageTaken +.got_addrs + + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + bit SUBSTATUS_IN_LOOP, [hl] + jp nz, .in_loop + set SUBSTATUS_IN_LOOP, [hl] + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVarAddr + ld a, [hl] + cp EFFECT_POISON_MULTI_HIT + jr z, .twineedle + cp EFFECT_DOUBLE_HIT + ld a, 1 + jr z, .double_hit + ld a, [hl] + cp EFFECT_BEAT_UP + jr z, .beat_up + cp EFFECT_TRIPLE_KICK + jr nz, .not_triple_kick +.reject_triple_kick_sample + call BattleRandom + and $3 + jr z, .reject_triple_kick_sample + dec a + jr nz, .double_hit + ld a, 1 + ld [bc], a + jr .done_loop + +.beat_up + ldh a, [hBattleTurn] + and a + jr nz, .check_ot_beat_up + ld a, [wPartyCount] + cp 1 + jp z, .only_one_beatup + dec a + jr .double_hit + +.check_ot_beat_up + ld a, [wBattleMode] + cp WILD_BATTLE + jp z, .only_one_beatup + ld a, [wOTPartyCount] + cp 1 + jp z, .only_one_beatup + dec a + jr .double_hit + +.only_one_beatup +; BUG: Beat Up works incorrectly with only one Pokémon in the party (see docs/bugs_and_glitches.md) + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + res SUBSTATUS_IN_LOOP, [hl] + call BattleCommand_BeatUpFailText + jp EndMoveEffect + +.not_triple_kick + call BattleRandom + and $3 + cp 2 + jr c, .got_number_hits + call BattleRandom + and $3 +.got_number_hits + inc a +.double_hit + ld [de], a + inc a + ld [bc], a + jr .loop_back_to_critical + +.twineedle + ld a, 1 + jr .double_hit + +.in_loop + ld a, [de] + dec a + ld [de], a + jr nz, .loop_back_to_critical +.done_loop + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + res SUBSTATUS_IN_LOOP, [hl] + + ld hl, PlayerHitTimesText + ldh a, [hBattleTurn] + and a + jr z, .got_hit_n_times_text + ld hl, EnemyHitTimesText +.got_hit_n_times_text + + push bc + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_BEAT_UP + jr z, .beat_up_2 + call StdBattleTextbox +.beat_up_2 + + pop bc + xor a + ld [bc], a + ret + +.loop_back_to_critical + ld a, [wBattleScriptBufferAddress + 1] + ld h, a + ld a, [wBattleScriptBufferAddress] + ld l, a +.not_critical + ld a, [hld] + cp critical_command + jr nz, .not_critical + inc hl + ld a, h + ld [wBattleScriptBufferAddress + 1], a + ld a, l + ld [wBattleScriptBufferAddress], a + ret + +BattleCommand_FakeOut: + ld a, [wAttackMissed] + and a + ret nz + + call CheckSubstituteOpp + jr nz, .fail + + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVar + and 1 << FRZ | SLP_MASK + jr nz, .fail + + call CheckOpponentWentFirst + jr z, FlinchTarget + +.fail + ld a, 1 + ld [wAttackMissed], a + ret + +BattleCommand_FlinchTarget: + call CheckSubstituteOpp + ret nz + + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVar + and 1 << FRZ | SLP_MASK + ret nz + + call CheckOpponentWentFirst + ret nz + + ld a, [wEffectFailed] + and a + ret nz + + ; fallthrough + +FlinchTarget: + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVarAddr + set SUBSTATUS_FLINCHED, [hl] + jp EndRechargeOpp + +CheckOpponentWentFirst: +; Returns a=0, z if user went first +; Returns a=1, nz if opponent went first + push bc + ld a, [wEnemyGoesFirst] ; 0 if player went first + ld b, a + ldh a, [hBattleTurn] ; 0 if it's the player's turn + xor b ; 1 if opponent went first + pop bc + ret + +BattleCommand_HeldFlinch: +; kingsrock + + ld a, [wAttackMissed] + and a + ret nz + + call GetUserItem + ld a, b + cp HELD_FLINCH + ret nz + + call CheckSubstituteOpp + ret nz + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVarAddr + ld d, h + ld e, l + call GetUserItem + call BattleRandom + cp c + ret nc + call EndRechargeOpp + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVarAddr + set SUBSTATUS_FLINCHED, [hl] + ret + +BattleCommand_OHKO: + call ResetDamage + ld a, [wTypeModifier] + and $7f + jr z, .no_effect + ld hl, wEnemyMonLevel + ld de, wBattleMonLevel + ld bc, wPlayerMoveStruct + MOVE_ACC + ldh a, [hBattleTurn] + and a + jr z, .got_move_accuracy + push hl + ld h, d + ld l, e + pop de + ld bc, wEnemyMoveStruct + MOVE_ACC +.got_move_accuracy + ld a, [de] + sub [hl] + jr c, .no_effect + add a + ld e, a + ld a, [bc] + add e + jr nc, .finish_ohko + ld a, $ff +.finish_ohko + ld [bc], a + call BattleCommand_CheckHit + ld hl, wCurDamage + ld a, $ff + ld [hli], a + ld [hl], a + ld a, $2 + ld [wCriticalHit], a + ret + +.no_effect + ld a, $ff + ld [wCriticalHit], a + ld a, $1 + ld [wAttackMissed], a + ret + +BattleCommand_CheckCharge: + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + bit SUBSTATUS_CHARGED, [hl] + ret z + res SUBSTATUS_CHARGED, [hl] + res SUBSTATUS_UNDERGROUND, [hl] + res SUBSTATUS_FLYING, [hl] + ld b, charge_command + jp SkipToBattleCommand + +BattleCommand_Charge: + call BattleCommand_ClearText + ld a, BATTLE_VARS_STATUS + call GetBattleVar + and SLP_MASK + jr z, .awake + + call BattleCommand_MoveDelay + call BattleCommand_RaiseSub + call PrintButItFailed + jp EndMoveEffect + +.awake + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + set SUBSTATUS_CHARGED, [hl] + + ld hl, IgnoredOrders2Text + ld a, [wAlreadyDisobeyed] + and a + call nz, StdBattleTextbox + + call BattleCommand_LowerSub + xor a + ld [wNumHits], a + inc a + ld [wBattleAnimParam], a + call LoadMoveAnim + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + ld h, a + ld bc, FLY + call CompareMove + ld a, 1 << SUBSTATUS_FLYING + jr z, .got_move_type + if HIGH(FLY) != HIGH(DIG) + ld bc, DIG + else + ld c, LOW(DIG) + endc + ld a, h + call CompareMove + ld a, 1 << SUBSTATUS_UNDERGROUND + jr z, .got_move_type + call BattleCommand_RaiseSub + xor a + +.got_move_type + ; a will contain the substatus 3 bit to set (1 << bit), or 0 if none (not flying/digging underground) + and a + ld l, a + push hl + call nz, DisappearUser + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + pop bc + ld a, c + or [hl] + ld [hl], a + call CheckUserIsCharging + jr nz, .mimic + ld a, BATTLE_VARS_LAST_COUNTER_MOVE + call GetBattleVarAddr + ld [hl], b + ld a, BATTLE_VARS_LAST_MOVE + call GetBattleVarAddr + ld [hl], b + +.mimic + call ResetDamage + + ld hl, .UsedText + call BattleTextbox + + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_SKULL_BASH + ld b, endturn_command + jp z, SkipToBattleCommand + jp EndMoveEffect + +.UsedText: + text_far Text_BattleUser ; "" + text_asm + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + push bc + call GetMoveIndexFromID + ld b, h + ld c, l + ld de, 4 + ld hl, .move_messages + call IsInWordArray ; hl will point to the low byte of the found item + jr c, .found_text + ld hl, .move_messages +.found_text + inc hl + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + pop bc + ret + +.move_messages + dw RAZOR_WIND, .BattleMadeWhirlwindText + dw SOLARBEAM, .BattleTookSunlightText + dw SKULL_BASH, .BattleLoweredHeadText + dw SKY_ATTACK, .BattleGlowingText + dw FLY, .BattleFlewText + dw DIG, .BattleDugText + dw -1 + +.BattleMadeWhirlwindText: + text_far _BattleMadeWhirlwindText + text_end + +.BattleTookSunlightText: + text_far _BattleTookSunlightText + text_end + +.BattleLoweredHeadText: + text_far _BattleLoweredHeadText + text_end + +.BattleGlowingText: + text_far _BattleGlowingText + text_end + +.BattleFlewText: + text_far _BattleFlewText + text_end + +.BattleDugText: + text_far _BattleDugText + text_end + +BattleCommand_Unused3C: +; effect0x3c + ret + +BattleCommand_TrapTarget: + ld a, [wAttackMissed] + and a + ret nz + ld hl, wEnemyWrapCount + ld de, wEnemyTrappingMove + ldh a, [hBattleTurn] + and a + jr z, .got_trap + ld hl, wPlayerWrapCount + ld de, wPlayerTrappingMove + +.got_trap + ld a, [hl] + and a + ret nz + ld a, BATTLE_VARS_SUBSTATUS4_OPP + call GetBattleVar + bit SUBSTATUS_SUBSTITUTE, a + ret nz + call BattleRandom + ; trapped for 2-5 turns + and %11 + inc a + inc a + inc a + ld [hl], a + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + ld [de], a + call GetMoveIndexFromID + ld b, h + ld c, l + ld hl, .Traps + +.find_trap_text + ld a, [hli] + cp c + ld a, [hli] + jr nz, .next_trap_text + cp b + jr z, .found_trap_text +.next_trap_text + inc hl + inc hl + jr .find_trap_text + +.found_trap_text + ld a, [hli] + ld h, [hl] + ld l, a + jp StdBattleTextbox + +.Traps: + dw BIND, UsedBindText ; 'used BIND on' + dw WRAP, WrappedByText ; 'was WRAPPED by' + dw FIRE_SPIN, FireSpinTrapText ; 'was trapped!' + dw CLAMP, ClampedByText ; 'was CLAMPED by' + dw WHIRLPOOL, WhirlpoolTrapText ; 'was trapped!' + +INCLUDE "engine/battle/move_effects/mist.asm" + +INCLUDE "engine/battle/move_effects/focus_energy.asm" + +BattleCommand_Recoil: + ld hl, wBattleMonMaxHP + ldh a, [hBattleTurn] + and a + jr z, .got_hp + ld hl, wEnemyMonMaxHP +.got_hp + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + ld d, a +; get 1/4 damage or 1 HP, whichever is higher + ld a, [wCurDamage] + ld b, a + ld a, [wCurDamage + 1] + ld c, a + srl b + rr c + srl b + rr c + ld a, b + or c + jr nz, .min_damage + inc c +.min_damage + ld a, [hli] + ld [wHPBuffer1 + 1], a + ld a, [hl] + ld [wHPBuffer1], a + dec hl + dec hl + ld a, [hl] + ld [wHPBuffer2], a + sub c + ld [hld], a + ld [wHPBuffer3], a + ld a, [hl] + ld [wHPBuffer2 + 1], a + sbc b + ld [hl], a + ld [wHPBuffer3 + 1], a + jr nc, .dont_ko + xor a + ld [hli], a + ld [hl], a + ld hl, wHPBuffer3 + ld [hli], a + ld [hl], a +.dont_ko + hlcoord 10, 9 + ldh a, [hBattleTurn] + and a + ld a, 1 + jr z, .animate_hp_bar + hlcoord 2, 2 + xor a +.animate_hp_bar + ld [wWhichHPBar], a + predef AnimateHPBar + call RefreshBattleHuds + ld hl, RecoilText + jp StdBattleTextbox + +BattleCommand_ConfuseTarget: + call GetOpponentItem + ld a, b + cp HELD_PREVENT_CONFUSE + ret z + ld a, [wEffectFailed] + and a + ret nz + call SafeCheckSafeguard + ret nz + call CheckSubstituteOpp + ret nz + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVarAddr + bit SUBSTATUS_CONFUSED, [hl] + ret nz + jr BattleCommand_FinishConfusingTarget + +BattleCommand_Confuse: + call GetOpponentItem + ld a, b + cp HELD_PREVENT_CONFUSE + jr nz, .no_item_protection + ld a, [hl] + ld [wNamedObjectIndex], a + call GetItemName + call AnimateFailedMove + ld hl, ProtectedByText + jp StdBattleTextbox + +.no_item_protection + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVarAddr + bit SUBSTATUS_CONFUSED, [hl] + jr z, .not_already_confused + call AnimateFailedMove + ld hl, AlreadyConfusedText + jp StdBattleTextbox + +.not_already_confused + call CheckSubstituteOpp + jr nz, BattleCommand_Confuse_CheckSnore_Swagger_ConfuseHit + ld a, [wAttackMissed] + and a + jr nz, BattleCommand_Confuse_CheckSnore_Swagger_ConfuseHit +BattleCommand_FinishConfusingTarget: + ld bc, wEnemyConfuseCount + ldh a, [hBattleTurn] + and a + jr z, .got_confuse_count + ld bc, wPlayerConfuseCount + +.got_confuse_count + set SUBSTATUS_CONFUSED, [hl] + ; confused for 2-5 turns + call BattleRandom + and %11 + inc a + inc a + ld [bc], a + + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_CONFUSE_HIT + jr z, .got_effect + cp EFFECT_SNORE + jr z, .got_effect + cp EFFECT_SWAGGER + jr z, .got_effect + call AnimateCurrentMove + +.got_effect + ld de, ANIM_CONFUSED + call PlayOpponentBattleAnim + + ld hl, BecameConfusedText + call StdBattleTextbox + + call GetOpponentItem + ld a, b + cp HELD_HEAL_STATUS + jr z, .heal_confusion + cp HELD_HEAL_CONFUSION + ret nz +.heal_confusion + ld hl, UseConfusionHealingItem + jp CallBattleCore + +BattleCommand_Confuse_CheckSnore_Swagger_ConfuseHit: + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_CONFUSE_HIT + ret z + cp EFFECT_SNORE + ret z + cp EFFECT_SWAGGER + ret z + jp PrintDidntAffect2 + +BattleCommand_Paralyze: + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVar + bit PAR, a + jr nz, .paralyzed + ld a, [wTypeModifier] + and $7f + jr z, .didnt_affect + call GetOpponentItem + ld a, b + cp HELD_PREVENT_PARALYZE + jr nz, .no_item_protection + ld a, [hl] + ld [wNamedObjectIndex], a + call GetItemName + call AnimateFailedMove + ld hl, ProtectedByText + jp StdBattleTextbox + +.no_item_protection + ldh a, [hBattleTurn] + and a + jr z, .dont_sample_failure + + ld a, [wLinkMode] + and a + jr nz, .dont_sample_failure + + ld a, [wInBattleTowerBattle] + and a + jr nz, .dont_sample_failure + + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_LOCK_ON, a + jr nz, .dont_sample_failure + + call BattleRandom + cp 25 percent + 1 ; 25% chance AI fails + jr c, .failed + +.dont_sample_failure + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + and a + jr nz, .failed + ld a, [wAttackMissed] + and a + jr nz, .failed + call CheckSubstituteOpp + jr nz, .failed + ld c, 30 + call DelayFrames + call AnimateCurrentMove + ld a, $1 + ldh [hBGMapMode], a + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + set PAR, [hl] + call UpdateOpponentInParty + ld hl, ApplyPrzEffectOnSpeed + call CallBattleCore + call UpdateBattleHuds + call PrintParalyze + ld hl, UseHeldStatusHealingItem + jp CallBattleCore + +.paralyzed + call AnimateFailedMove + ld hl, AlreadyParalyzedText + jp StdBattleTextbox + +.failed + jp PrintDidntAffect2 + +.didnt_affect + call AnimateFailedMove + jp PrintDoesntAffect + +CheckMoveTypeMatchesTarget: +; Compare move type to opponent type. +; Return z if matching the opponent type, +; unless the move is Normal (Tri Attack). + + push hl + + ld hl, wEnemyMonType1 + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wBattleMonType1 +.ok + + ld a, BATTLE_VARS_MOVE_TYPE + call GetBattleVar + cp NORMAL + jr z, .normal + + cp [hl] + jr z, .return + + inc hl + cp [hl] + +.return + pop hl + ret + +.normal + ld a, 1 + and a + pop hl + ret + +INCLUDE "engine/battle/move_effects/substitute.asm" + +BattleCommand_RechargeNextTurn: + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVarAddr + set SUBSTATUS_RECHARGE, [hl] + ret + +EndRechargeOpp: + push hl + ld a, BATTLE_VARS_SUBSTATUS4_OPP + call GetBattleVarAddr + res SUBSTATUS_RECHARGE, [hl] + pop hl + ret + +INCLUDE "engine/battle/move_effects/rage.asm" + +BattleCommand_DoubleFlyingDamage: + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVar + bit SUBSTATUS_FLYING, a + ret z + jr DoubleDamage + +BattleCommand_DoubleUndergroundDamage: + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVar + bit SUBSTATUS_UNDERGROUND, a + ret z + + ; fallthrough + +DoubleDamage: + ld hl, wCurDamage + 1 + sla [hl] + dec hl + rl [hl] + jr nc, .quit + + ld a, $ff + ld [hli], a + ld [hl], a +.quit + ret + +INCLUDE "engine/battle/move_effects/mimic.asm" + +INCLUDE "engine/battle/move_effects/leech_seed.asm" + +INCLUDE "engine/battle/move_effects/splash.asm" + +INCLUDE "engine/battle/move_effects/disable.asm" + +INCLUDE "engine/battle/move_effects/pay_day.asm" + +INCLUDE "engine/battle/move_effects/conversion.asm" + +BattleCommand_ResetStats: + ld a, BASE_STAT_LEVEL + ld hl, wPlayerStatLevels + call .Fill + ld hl, wEnemyStatLevels + call .Fill + + ldh a, [hBattleTurn] + push af + + call SetPlayerTurn + call CalcPlayerStats + call SetEnemyTurn + call CalcEnemyStats + + pop af + ldh [hBattleTurn], a + + call AnimateCurrentMove + + ld hl, EliminatedStatsText + jp StdBattleTextbox + +.Fill: + ld b, NUM_LEVEL_STATS +.next + ld [hli], a + dec b + jr nz, .next + ret + +BattleCommand_Heal: + ld de, wBattleMonHP + ld hl, wBattleMonMaxHP + ldh a, [hBattleTurn] + and a + jr z, .got_hp + ld de, wEnemyMonHP + ld hl, wEnemyMonMaxHP +.got_hp + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + ld b, a + push hl + push de + push bc + ld c, 2 + call CompareBytes + pop bc + pop de + pop hl + jp z, .hp_full + ld a, b + ld bc, REST + call CompareMove + jr nz, .not_rest + + push hl + push de + push af + call BattleCommand_MoveDelay + ld a, BATTLE_VARS_SUBSTATUS5 + call GetBattleVarAddr + res SUBSTATUS_TOXIC, [hl] + ld a, BATTLE_VARS_STATUS + call GetBattleVarAddr + ld a, [hl] + and a + ld [hl], REST_SLEEP_TURNS + 1 + ld hl, WentToSleepText + jr z, .no_status_to_heal + ld hl, RestedText +.no_status_to_heal + call StdBattleTextbox + ldh a, [hBattleTurn] + and a + jr nz, .calc_enemy_stats + call CalcPlayerStats + jr .got_stats + +.calc_enemy_stats + call CalcEnemyStats +.got_stats + pop af + pop de + pop hl + +.not_rest + jr z, .restore_full_hp + ld hl, GetHalfMaxHP + call CallBattleCore + jr .finish + +.restore_full_hp + ld hl, GetMaxHP + call CallBattleCore +.finish + call AnimateCurrentMove + call BattleCommand_SwitchTurn + ld hl, RestoreHP + call CallBattleCore + call BattleCommand_SwitchTurn + call UpdateUserInParty + call RefreshBattleHuds + ld hl, RegainedHealthText + jp StdBattleTextbox + +.hp_full + call AnimateFailedMove + ld hl, HPIsFullText + jp StdBattleTextbox + +INCLUDE "engine/battle/move_effects/transform.asm" + +BattleEffect_ButItFailed: + call AnimateFailedMove + jp PrintButItFailed + +ClearLastMove: + ld a, BATTLE_VARS_LAST_COUNTER_MOVE + call GetBattleVarAddr + xor a + ld [hl], a + + ld a, BATTLE_VARS_LAST_MOVE + call GetBattleVarAddr + xor a + ld [hl], a + ret + +ResetActorDisable: + ldh a, [hBattleTurn] + and a + jr z, .player + + xor a + ld [wEnemyDisableCount], a + ld [wEnemyDisabledMove], a + ret + +.player + xor a + ld [wPlayerDisableCount], a + ld [wDisabledMove], a + ret + +BattleCommand_Screen: + ld hl, wPlayerScreens + ld bc, wPlayerLightScreenCount + ldh a, [hBattleTurn] + and a + jr z, .got_screens_pointer + ld hl, wEnemyScreens + ld bc, wEnemyLightScreenCount + +.got_screens_pointer + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + cp EFFECT_LIGHT_SCREEN + jr nz, .Reflect + + bit SCREENS_LIGHT_SCREEN, [hl] + jr nz, .failed + set SCREENS_LIGHT_SCREEN, [hl] + ld a, 5 + ld [bc], a + ld hl, LightScreenEffectText + jr .good + +.Reflect: + bit SCREENS_REFLECT, [hl] + jr nz, .failed + set SCREENS_REFLECT, [hl] + + ; LightScreenCount -> ReflectCount + inc bc + + ld a, 5 + ld [bc], a + ld hl, ReflectEffectText + +.good + call AnimateCurrentMove + jp StdBattleTextbox + +.failed + call AnimateFailedMove + jp PrintButItFailed + +PrintDoesntAffect: + ld hl, DoesntAffectText + jp StdBattleTextbox + +PrintNothingHappened: + ld hl, NothingHappenedText + jp StdBattleTextbox + +TryPrintButItFailed: + ld a, [wAlreadyFailed] + and a + ret nz + + ; fallthrough + +PrintButItFailed: + ld hl, ButItFailedText + jp StdBattleTextbox + +FailMove: + call AnimateFailedMove + ; fallthrough + +FailMimic: + ld hl, ButItFailedText ; 'but it failed!' + ld de, ItFailedText ; 'it failed!' + jp FailText_CheckOpponentProtect + +PrintDidntAffect: + ld hl, DidntAffect1Text + jp StdBattleTextbox + +PrintDidntAffect2: + call AnimateFailedMove + ld hl, DidntAffect1Text ; 'it didn't affect' + ld de, DidntAffect2Text ; 'it didn't affect' + jp FailText_CheckOpponentProtect + +PrintParalyze: +; 'paralyzed! maybe it can't attack!' + ld hl, ParalyzedText + jp StdBattleTextbox + +CheckSubstituteOpp: + ld a, BATTLE_VARS_SUBSTATUS4_OPP + call GetBattleVar + bit SUBSTATUS_SUBSTITUTE, a + ret + +INCLUDE "engine/battle/move_effects/selfdestruct.asm" + +INCLUDE "engine/battle/move_effects/mirror_move.asm" + +INCLUDE "engine/battle/move_effects/metronome.asm" + +CheckUserMove: +; Return z if the user has move a. + ld b, a + ld de, wBattleMonMoves + ldh a, [hBattleTurn] + and a + jr z, .ok + ld de, wEnemyMonMoves +.ok + + ld c, NUM_MOVES +.loop + ld a, [de] + inc de + cp b + ret z + + dec c + jr nz, .loop + + ld a, 1 + and a + ret + +ResetTurn: + ld hl, wPlayerCharging + ldh a, [hBattleTurn] + and a + jr z, .player + ld hl, wEnemyCharging + +.player + ld [hl], 1 + xor a + ld [wAlreadyDisobeyed], a + call DoMove + jp EndMoveEffect + +INCLUDE "engine/battle/move_effects/thief.asm" + +BattleCommand_ArenaTrap: +; Doesn't work on an absent opponent. + + call CheckHiddenOpponent + jr nz, .failed + +; Don't trap if the opponent is already trapped. + + ld a, BATTLE_VARS_SUBSTATUS5 + call GetBattleVarAddr + bit SUBSTATUS_CANT_RUN, [hl] + jr nz, .failed + +; Otherwise trap the opponent. + + set SUBSTATUS_CANT_RUN, [hl] + call AnimateCurrentMove + ld hl, CantEscapeNowText + jp StdBattleTextbox + +.failed + call AnimateFailedMove + jp PrintButItFailed + +INCLUDE "engine/battle/move_effects/nightmare.asm" + +BattleCommand_Defrost: +; Thaw the user. + + ld a, BATTLE_VARS_STATUS + call GetBattleVarAddr + bit FRZ, [hl] + ret z + res FRZ, [hl] + +; Don't update the enemy's party struct in a wild battle. + + ldh a, [hBattleTurn] + and a + jr z, .party + + ld a, [wBattleMode] + dec a + jr z, .done + +.party + ld a, MON_STATUS + call UserPartyAttr + res FRZ, [hl] + +.done + call RefreshBattleHuds + ld hl, WasDefrostedText + jp StdBattleTextbox + +INCLUDE "engine/battle/move_effects/curse.asm" + +INCLUDE "engine/battle/move_effects/protect.asm" + +INCLUDE "engine/battle/move_effects/endure.asm" + +INCLUDE "engine/battle/move_effects/spikes.asm" + +INCLUDE "engine/battle/move_effects/foresight.asm" + +INCLUDE "engine/battle/move_effects/perish_song.asm" + +INCLUDE "engine/battle/move_effects/sandstorm.asm" + +INCLUDE "engine/battle/move_effects/rollout.asm" + +BattleCommand_Unused5D: +; effect0x5d + ret + +INCLUDE "engine/battle/move_effects/fury_cutter.asm" + +INCLUDE "engine/battle/move_effects/attract.asm" + +INCLUDE "engine/battle/move_effects/return.asm" + +INCLUDE "engine/battle/move_effects/present.asm" + +INCLUDE "engine/battle/move_effects/frustration.asm" + +INCLUDE "engine/battle/move_effects/safeguard.asm" + +SafeCheckSafeguard: + push hl + ld hl, wEnemyScreens + ldh a, [hBattleTurn] + and a + jr z, .got_turn + ld hl, wPlayerScreens + +.got_turn + bit SCREENS_SAFEGUARD, [hl] + pop hl + ret + +BattleCommand_CheckSafeguard: + ld hl, wEnemyScreens + ldh a, [hBattleTurn] + and a + jr z, .got_turn + ld hl, wPlayerScreens +.got_turn + bit SCREENS_SAFEGUARD, [hl] + ret z + ld a, 1 + ld [wAttackMissed], a + call BattleCommand_MoveDelay + ld hl, SafeguardProtectText + call StdBattleTextbox + jp EndMoveEffect + +INCLUDE "engine/battle/move_effects/magnitude.asm" + +INCLUDE "engine/battle/move_effects/baton_pass.asm" + +INCLUDE "engine/battle/move_effects/pursuit.asm" + +INCLUDE "engine/battle/move_effects/rapid_spin.asm" + +BattleCommand_HealMorn: + ld b, MORN_F + jr BattleCommand_TimeBasedHealContinue + +BattleCommand_HealDay: + ld b, DAY_F + jr BattleCommand_TimeBasedHealContinue + +BattleCommand_HealNite: + ld b, NITE_F + ; fallthrough + +BattleCommand_TimeBasedHealContinue: +; Time- and weather-sensitive heal. + + ld hl, wBattleMonMaxHP + ld de, wBattleMonHP + ldh a, [hBattleTurn] + and a + jr z, .start + ld hl, wEnemyMonMaxHP + ld de, wEnemyMonHP + +.start +; Index for .Multipliers +; Default restores half max HP. + ld c, 2 + +; Don't bother healing if HP is already full. + push bc + call CompareBytes + pop bc + jr z, .Full + +; Don't factor in time of day in link battles. + ld a, [wLinkMode] + and a + jr nz, .Weather + + ld a, [wTimeOfDay] + cp b + jr z, .Weather + dec c ; double + +.Weather: + ld a, [wBattleWeather] + and a + jr z, .Heal + +; x2 in sun +; /2 in rain/sandstorm + inc c + cp WEATHER_SUN + jr z, .Heal + dec c + dec c + +.Heal: + ld b, 0 + ld hl, .Multipliers + add hl, bc + add hl, bc + + ld a, [hli] + ld h, [hl] + ld l, a + ld a, BANK(GetMaxHP) + rst FarCall + + call AnimateCurrentMove + call BattleCommand_SwitchTurn + + callfar RestoreHP + + call BattleCommand_SwitchTurn + call UpdateUserInParty + +; 'regained health!' + ld hl, RegainedHealthText + jp StdBattleTextbox + +.Full: + call AnimateFailedMove + +; 'hp is full!' + ld hl, HPIsFullText + jp StdBattleTextbox + +.Multipliers: + dw GetEighthMaxHP + dw GetQuarterMaxHP + dw GetHalfMaxHP + dw GetMaxHP + +INCLUDE "engine/battle/move_effects/hidden_power.asm" + +INCLUDE "engine/battle/move_effects/rain_dance.asm" + +INCLUDE "engine/battle/move_effects/sunny_day.asm" + +INCLUDE "engine/battle/move_effects/belly_drum.asm" + +INCLUDE "engine/battle/move_effects/psych_up.asm" + +INCLUDE "engine/battle/move_effects/mirror_coat.asm" + +BattleCommand_DoubleMinimizeDamage: + ld hl, wEnemyMinimized + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wPlayerMinimized +.ok + ld a, [hl] + and a + ret z + ld hl, wCurDamage + 1 + sla [hl] + dec hl + rl [hl] + ret nc + ld a, $ff + ld [hli], a + ld [hl], a + ret + +BattleCommand_SkipSunCharge: +; mimicsuncharge + ld a, [wBattleWeather] + cp WEATHER_SUN + ret nz + ld b, charge_command + jp SkipToBattleCommand + +INCLUDE "engine/battle/move_effects/future_sight.asm" + +INCLUDE "engine/battle/move_effects/thunder.asm" + +CheckHiddenOpponent: +; BUG: Lock-On and Mind Reader don't always bypass Fly and Dig (see docs/bugs_and_glitches.md) + ld a, BATTLE_VARS_SUBSTATUS3_OPP + call GetBattleVar + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + ret + +GetUserItem: +; Return the effect of the user's item in bc, and its id at hl. + ld hl, wBattleMonItem + ldh a, [hBattleTurn] + and a + jr z, .go + ld hl, wEnemyMonItem +.go + ld b, [hl] + jp GetItemHeldEffect + +GetOpponentItem: +; Return the effect of the opponent's item in bc, and its id at hl. + ld hl, wEnemyMonItem + ldh a, [hBattleTurn] + and a + jr z, .go + ld hl, wBattleMonItem +.go + ld b, [hl] + jp GetItemHeldEffect + +GetItemHeldEffect: +; Return the effect of item b in bc. + ld a, b + and a + ret z + + push hl + ld hl, ItemAttributes + ITEMATTR_EFFECT + dec a + ld c, a + ld b, 0 + ld a, ITEMATTR_STRUCT_LENGTH + call AddNTimes + ld a, BANK(ItemAttributes) + call GetFarWord + ld b, l + ld c, h + pop hl + ret + +AnimateCurrentMoveEitherSide: + push hl + push de + push bc + ld a, [wBattleAnimParam] + push af + call BattleCommand_LowerSub + pop af + ld [wBattleAnimParam], a + call PlayDamageAnim + call BattleCommand_RaiseSub + pop bc + pop de + pop hl + ret + +AnimateCurrentMove: + push hl + push de + push bc + ld a, [wBattleAnimParam] + push af + call BattleCommand_LowerSub + pop af + ld [wBattleAnimParam], a + call LoadMoveAnim + call BattleCommand_RaiseSub + pop bc + pop de + pop hl + ret + +PlayDamageAnim: + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + and a + ret z + + call SetMoveAnimationID + + ldh a, [hBattleTurn] + and a + ld a, BATTLEANIM_ENEMY_DAMAGE + jr z, .player + ld a, BATTLEANIM_PLAYER_DAMAGE + +.player + ld [wNumHits], a + + jp PlayUserBattleAnim + +LoadMoveAnim: + xor a + ld [wNumHits], a + + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + and a + ret z + + ; fallthrough + +LoadAnim: + call SetMoveAnimationID + ; fallthrough + +PlayUserBattleAnim: + push hl + push de + push bc + callfar PlayBattleAnim + pop bc + pop de + pop hl + ret + +SetMoveAnimationID: + push hl + call GetMoveIndexFromID + ld a, l + ld [wFXAnimID], a + ld a, h + ld [wFXAnimID + 1], a + pop hl + ret + +PlayOpponentBattleAnim: + ld a, e + ld [wFXAnimID], a + ld a, d + ld [wFXAnimID + 1], a + xor a + ld [wNumHits], a + + push hl + push de + push bc + call BattleCommand_SwitchTurn + + callfar PlayBattleAnim + + call BattleCommand_SwitchTurn + pop bc + pop de + pop hl + ret + +CallBattleCore: + ld a, BANK("Battle Core") + rst FarCall + ret + +AnimateFailedMove: + call BattleCommand_LowerSub + call BattleCommand_MoveDelay + jp BattleCommand_RaiseSub + +BattleCommand_MoveDelay: +; Wait 40 frames. + ld c, 40 + jp DelayFrames + +BattleCommand_ClearText: +; Used in multi-hit moves. + ld hl, .text + jp BattleTextbox + +.text: + text_end + +SkipToBattleCommand: +; Skip over commands until reaching command b. + ld a, [wBattleScriptBufferAddress + 1] + ld h, a + ld a, [wBattleScriptBufferAddress] + ld l, a +.loop + ld a, [hli] + cp b + jr nz, .loop + + ld a, h + ld [wBattleScriptBufferAddress + 1], a + ld a, l + ld [wBattleScriptBufferAddress], a + ret + +DisappearUser: + farcall _DisappearUser + ret + +AppearUserLowerSub: + farcall _AppearUserLowerSub + ret + +AppearUserRaiseSub: + farcall _AppearUserRaiseSub + ret + +_CheckBattleScene: +; Checks the options. Returns carry if battle animations are disabled. + push hl + push de + push bc + farcall CheckBattleScene + pop bc + pop de + pop hl + ret + +CompareMove: + ; checks if the move ID in a matches the move in bc + push hl + call GetMoveIndexFromID + ld a, h + cp b + ld a, l + pop hl + ret nz + cp c + ret + +CheckMoveInList: + ; checks if the move ID in a belongs to a list of moves in hl + push bc + push de + push hl + call GetMoveIndexFromID + ld b, h + ld c, l + pop hl + ld de, 2 + call IsInWordArray + pop de + pop bc + ret diff --git a/engine/battle/hidden_power.asm b/engine/battle/hidden_power.asm new file mode 100644 index 0000000..2de95ce --- /dev/null +++ b/engine/battle/hidden_power.asm @@ -0,0 +1,108 @@ +HiddenPowerDamage: +; Override Hidden Power's type and power based on the user's DVs. + + ld hl, wBattleMonDVs + ldh a, [hBattleTurn] + and a + jr z, .got_dvs + ld hl, wEnemyMonDVs +.got_dvs + +; Power: + +; Take the top bit from each stat + + ; Attack + ld a, [hl] + swap a + and %1000 + + ; Defense + ld b, a + ld a, [hli] + and %1000 + srl a + or b + + ; Speed + ld b, a + ld a, [hl] + swap a + and %1000 + srl a + srl a + or b + + ; Special + ld b, a + ld a, [hl] + and %1000 + srl a + srl a + srl a + or b + +; Multiply by 5 + ld b, a + add a + add a + add b + +; Add Special & 3 + ld b, a + ld a, [hld] + and %0011 + add b + +; Divide by 2 and add 30 + 1 + srl a + add 30 + inc a + + ld d, a + +; Type: + + ; Def & 3 + ld a, [hl] + and %0011 + ld b, a + + ; + (Atk & 3) << 2 + ld a, [hl] + and %0011 << 4 + swap a + add a + add a + or b + +; Skip Normal + inc a + +; Skip Bird + cp BIRD + jr c, .done + inc a + +; Skip unused types + cp UNUSED_TYPES + jr c, .done + add UNUSED_TYPES_END - UNUSED_TYPES + +.done + +; Overwrite the current move type. + push af + ld a, BATTLE_VARS_MOVE_TYPE + call GetBattleVarAddr + pop af + ld [hl], a + +; Get the rest of the damage formula variables +; based on the new type, but keep base power. + ld a, d + push af + farcall BattleCommand_DamageStats ; damagestats + pop af + ld d, a + ret diff --git a/engine/battle/link_result.asm b/engine/battle/link_result.asm new file mode 100644 index 0000000..b0244aa --- /dev/null +++ b/engine/battle/link_result.asm @@ -0,0 +1,162 @@ +DetermineLinkBattleResult: + farcall UpdateEnemyMonInParty + ld hl, wPartyMon1HP + call .CountMonsRemaining + push bc + ld hl, wOTPartyMon1HP + call .CountMonsRemaining + ld a, c + pop bc + cp c + jr z, .even_number_of_mons_remaining + jr c, .defeat + jr .victory + +.even_number_of_mons_remaining + call .BothSides_CheckNumberMonsAtFullHealth + jr z, .drawn + ld a, e + cp $1 + jr z, .victory + cp $2 + jr z, .defeat + ld hl, wPartyMon1HP + call .CalcPercentHPRemaining + push de + ld hl, wOTPartyMon1HP + call .CalcPercentHPRemaining + pop hl + ld a, d + cp h + jr c, .victory + jr z, .compare_lo + jr .defeat + +.compare_lo + ld a, e + cp l + jr z, .drawn + jr nc, .defeat + +.victory + ld a, [wBattleResult] + and $f0 + ld [wBattleResult], a ; WIN + ret + +.defeat + ld a, [wBattleResult] + and $f0 + add LOSE + ld [wBattleResult], a + ret + +.drawn + ld a, [wBattleResult] + and $f0 + add DRAW + ld [wBattleResult], a + ret + +.CountMonsRemaining: + ld c, 0 + ld b, 3 + ld de, PARTYMON_STRUCT_LENGTH - 1 +.loop + ld a, [hli] + or [hl] + jr nz, .not_fainted + inc c + +.not_fainted + add hl, de + dec b + jr nz, .loop + ret + +.CalcPercentHPRemaining: + ld de, 0 + ld c, $3 +.loop2 + ld a, [hli] + or [hl] + jr z, .next + dec hl + xor a + ldh [hDividend + 0], a + ld a, [hli] + ldh [hDividend + 1], a + ld a, [hli] + ldh [hDividend + 2], a + xor a + ldh [hDividend + 3], a + ld a, [hli] + ld b, a + ld a, [hld] + srl b + rr a + srl b + rr a + ldh [hDivisor], a + ld b, $4 + call Divide + ldh a, [hQuotient + 3] + add e + ld e, a + ldh a, [hQuotient + 2] + adc d + ld d, a + dec hl + +.next + push de + ld de, $2f + add hl, de + pop de + dec c + jr nz, .loop2 + ret + +.BothSides_CheckNumberMonsAtFullHealth: + ld hl, wPartyMon1HP + call .CheckFaintedOrFullHealth + jr nz, .finish ; we have a pokemon that's neither fainted nor at full health + ld hl, wOTPartyMon1HP + call .CheckFaintedOrFullHealth + ld e, $1 ; victory + ret + +.finish + ld hl, wOTPartyMon1HP + call .CheckFaintedOrFullHealth + ld e, $0 ; drawn + ret nz ; we both have pokemon that are neither fainted nor at full health + ld e, $2 ; defeat + ld a, $1 ; not drawn + and a + ret + +.CheckFaintedOrFullHealth: + ld d, 3 +.loop3 + ld a, [hli] + ld b, a + ld a, [hli] + ld c, a + or b + jr z, .fainted_or_full_health + ld a, [hli] + cp b + ret nz + ld a, [hld] + cp c + ret nz + +.fainted_or_full_health + push de + ld de, PARTYMON_STRUCT_LENGTH - 2 + add hl, de + pop de + dec d + jr nz, .loop3 + ret diff --git a/engine/battle/menu.asm b/engine/battle/menu.asm new file mode 100644 index 0000000..23a7fc7 --- /dev/null +++ b/engine/battle/menu.asm @@ -0,0 +1,100 @@ +LoadBattleMenu: + ld hl, BattleMenuHeader + call LoadMenuHeader + ld a, [wBattleMenuCursorPosition] + ld [wMenuCursorPosition], a + call InterpretBattleMenu + ld a, [wMenuCursorPosition] + ld [wBattleMenuCursorPosition], a + call ExitMenu + ret + +SafariBattleMenu: ; unreferenced + ld hl, SafariBattleMenuHeader + call LoadMenuHeader + jr CommonBattleMenu + +ContestBattleMenu: + ld hl, ContestBattleMenuHeader + call LoadMenuHeader + ; fallthrough + +CommonBattleMenu: + ld a, [wBattleMenuCursorPosition] + ld [wMenuCursorPosition], a + call _2DMenu + ld a, [wMenuCursorPosition] + ld [wBattleMenuCursorPosition], a + call ExitMenu + ret + +BattleMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 8, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags + dn 2, 2 ; rows, columns + db 6 ; spacing + dba .Text + dbw BANK(@), NULL + +.Text: + db "FIGHT@" + db "@" + db "PACK@" + db "RUN@" + +SafariBattleMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags + dn 2, 2 ; rows, columns + db 11 ; spacing + dba .Text + dba .PrintSafariBallsRemaining + +.Text: + db "サファりボール×  @" ; "SAFARI BALL× @" + db "エサをなげる@" ; "THROW BAIT" + db "いしをなげる@" ; "THROW ROCK" + db "にげる@" ; "RUN" + +.PrintSafariBallsRemaining: + hlcoord 17, 13 + ld de, wSafariBallsRemaining + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ret + +ContestBattleMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 2, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags + dn 2, 2 ; rows, columns + db 12 ; spacing + dba .Text + dba .PrintParkBallsRemaining + +.Text: + db "FIGHT@" + db "@" + db "PARKBALL× @" + db "RUN@" + +.PrintParkBallsRemaining: + hlcoord 13, 16 + ld de, wParkBallsRemaining + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ret diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm new file mode 100644 index 0000000..6bfc4eb --- /dev/null +++ b/engine/battle/misc.asm @@ -0,0 +1,224 @@ +_DisappearUser: + xor a + ldh [hBGMapMode], a + ldh a, [hBattleTurn] + and a + jr z, .player + call GetEnemyFrontpicCoords + jr .okay +.player + call GetPlayerBackpicCoords +.okay + call ClearBox + jr FinishAppearDisappearUser + +_AppearUserRaiseSub: + farcall BattleCommand_RaiseSubNoAnim + jr AppearUser + +_AppearUserLowerSub: + farcall BattleCommand_LowerSubNoAnim + +AppearUser: + xor a + ldh [hBGMapMode], a + ldh a, [hBattleTurn] + and a + jr z, .player + call GetEnemyFrontpicCoords + xor a + jr .okay +.player + call GetPlayerBackpicCoords + ld a, $31 +.okay + ldh [hGraphicStartTile], a + predef PlaceGraphic +FinishAppearDisappearUser: + ld a, $1 + ldh [hBGMapMode], a + ret + +GetEnemyFrontpicCoords: + hlcoord 12, 0 + lb bc, 7, 7 + ret + +GetPlayerBackpicCoords: + hlcoord 2, 6 + lb bc, 6, 6 + ret + +DoWeatherModifiers: + ld de, WeatherTypeModifiers + ld a, [wBattleWeather] + ld b, a + ld a, [wCurType] + ld c, a + +.CheckWeatherType: + ld a, [de] + inc de + cp -1 + jr z, .done_weather_types + + cp b + jr nz, .NextWeatherType + + ld a, [de] + cp c + jr z, .ApplyModifier + +.NextWeatherType: + inc de + inc de + jr .CheckWeatherType + +.done_weather_types + ld de, WeatherMoveModifiers + + ld a, BATTLE_VARS_MOVE_EFFECT + call GetBattleVar + ld c, a + +.CheckWeatherMove: + ld a, [de] + inc de + cp -1 + jr z, .done + + cp b + jr nz, .NextWeatherMove + + ld a, [de] + cp c + jr z, .ApplyModifier + +.NextWeatherMove: + inc de + inc de + jr .CheckWeatherMove + +.ApplyModifier: + xor a + ldh [hMultiplicand + 0], a + ld hl, wCurDamage + ld a, [hli] + ldh [hMultiplicand + 1], a + ld a, [hl] + ldh [hMultiplicand + 2], a + + inc de + ld a, [de] + ldh [hMultiplier], a + + call Multiply + + ld a, 10 + ldh [hDivisor], a + ld b, 4 + call Divide + + ldh a, [hQuotient + 1] + and a + ld bc, -1 + jr nz, .Update + + ldh a, [hQuotient + 2] + ld b, a + ldh a, [hQuotient + 3] + ld c, a + or b + jr nz, .Update + + ld bc, 1 + +.Update: + ld a, b + ld [wCurDamage], a + ld a, c + ld [wCurDamage + 1], a + +.done + ret + +INCLUDE "data/battle/weather_modifiers.asm" + +DoBadgeTypeBoosts: + ld a, [wLinkMode] + and a + ret nz + + ld a, [wInBattleTowerBattle] + and a + ret nz + + ldh a, [hBattleTurn] + and a + ret nz + + push de + push bc + + ld hl, BadgeTypeBoosts + + ld a, [wKantoBadges] + ld b, a + ld a, [wJohtoBadges] + ld c, a + +.CheckBadge: + ld a, [hl] + cp -1 + jr z, .done + + srl b + rr c + jr nc, .NextBadge + + ld a, [wCurType] + cp [hl] + jr z, .ApplyBoost + +.NextBadge: + inc hl + jr .CheckBadge + +.ApplyBoost: + ld a, [wCurDamage] + ld h, a + ld d, a + ld a, [wCurDamage + 1] + ld l, a + ld e, a + + srl d + rr e + srl d + rr e + srl d + rr e + + ld a, e + or d + jr nz, .done_min + ld e, 1 + +.done_min + add hl, de + jr nc, .Update + + ld hl, $ffff + +.Update: + ld a, h + ld [wCurDamage], a + ld a, l + ld [wCurDamage + 1], a + +.done + pop bc + pop de + ret + +INCLUDE "data/types/badge_type_boosts.asm" diff --git a/engine/battle/move_effects/attract.asm b/engine/battle/move_effects/attract.asm new file mode 100644 index 0000000..32c4f53 --- /dev/null +++ b/engine/battle/move_effects/attract.asm @@ -0,0 +1,75 @@ +BattleCommand_Attract: + ld a, [wAttackMissed] + and a + jr nz, .failed + call CheckOppositeGender + jr c, .failed + call CheckHiddenOpponent + jr nz, .failed + ld a, BATTLE_VARS_SUBSTATUS1_OPP + call GetBattleVarAddr + bit SUBSTATUS_IN_LOVE, [hl] + jr nz, .failed + + set SUBSTATUS_IN_LOVE, [hl] + call AnimateCurrentMove + +; 'fell in love!' + ld hl, FellInLoveText + jp StdBattleTextbox + +.failed + jp FailMove + +CheckOppositeGender: + ld a, MON_SPECIES + call BattlePartyAttr + ld a, [hl] + ld [wCurPartySpecies], a + + ld a, [wCurBattleMon] + ld [wCurPartyMon], a + xor a + ld [wMonType], a + + farcall GetGender + jr c, .genderless_samegender + + ld b, 1 + jr nz, .got_gender + dec b + +.got_gender + push bc + ld a, [wTempEnemyMonSpecies] + ld [wCurPartySpecies], a + ld hl, wEnemyMonDVs + ld a, [wEnemySubStatus5] + bit SUBSTATUS_TRANSFORMED, a + jr z, .not_transformed + ld hl, wEnemyBackupDVs +.not_transformed + ld a, [hli] + ld [wTempMonDVs], a + ld a, [hl] + ld [wTempMonDVs + 1], a + ld a, TEMPMON + ld [wMonType], a + farcall GetGender + pop bc + jr c, .genderless_samegender + + ld a, 1 + jr nz, .got_enemy_gender + dec a + +.got_enemy_gender + xor b + jr z, .genderless_samegender + + and a + ret + +.genderless_samegender + scf + ret diff --git a/engine/battle/move_effects/baton_pass.asm b/engine/battle/move_effects/baton_pass.asm new file mode 100644 index 0000000..29759f0 --- /dev/null +++ b/engine/battle/move_effects/baton_pass.asm @@ -0,0 +1,215 @@ +BattleCommand_BatonPass: + ldh a, [hBattleTurn] + and a + jp nz, .Enemy + +; Need something to switch to + call CheckAnyOtherAlivePartyMons + jp z, FailedBatonPass + + call UpdateBattleMonInParty + call AnimateCurrentMove + + ld c, 50 + call DelayFrames + +; Transition into switchmon menu + call LoadStandardMenuHeader + farcall SetUpBattlePartyMenu + + farcall ForcePickSwitchMonInBattle + +; Return to battle scene + call ClearPalettes + farcall _LoadBattleFontsHPBar + call CloseWindow + call ClearSprites + hlcoord 1, 0 + lb bc, 4, 10 + call ClearBox + ld b, SCGB_BATTLE_COLORS + call GetSGBLayout + call SetPalettes + call BatonPass_LinkPlayerSwitch + +; Mobile link battles handle entrances differently + farcall CheckMobileBattleError + jp c, EndMoveEffect + + ld hl, PassedBattleMonEntrance + call CallBattleCore + + call ResetBatonPassStatus + ret + +.Enemy: +; Wildmons don't have anything to switch to + ld a, [wBattleMode] + dec a ; WILDMON + jp z, FailedBatonPass + + call CheckAnyOtherAliveEnemyMons + jp z, FailedBatonPass + + call UpdateEnemyMonInParty + call AnimateCurrentMove + call BatonPass_LinkEnemySwitch + +; Mobile link battles handle entrances differently + farcall CheckMobileBattleError + jp c, EndMoveEffect + +; Passed enemy PartyMon entrance + xor a + ld [wEnemySwitchMonIndex], a + ld hl, EnemySwitch_SetMode + call CallBattleCore + ld hl, ResetBattleParticipants + call CallBattleCore + ld a, TRUE + ld [wApplyStatLevelMultipliersToEnemy], a + ld hl, ApplyStatLevelMultiplierOnAllStats + call CallBattleCore + + ld hl, SpikesDamage + call CallBattleCore + + jr ResetBatonPassStatus + +BatonPass_LinkPlayerSwitch: + ld a, [wLinkMode] + and a + ret z + + ld a, BATTLEPLAYERACTION_USEITEM + ld [wBattlePlayerAction], a + + call LoadStandardMenuHeader + ld hl, LinkBattleSendReceiveAction + call CallBattleCore + call CloseWindow + + xor a ; BATTLEPLAYERACTION_USEMOVE + ld [wBattlePlayerAction], a + ret + +BatonPass_LinkEnemySwitch: + ld a, [wLinkMode] + and a + ret z + + call LoadStandardMenuHeader + ld hl, LinkBattleSendReceiveAction + call CallBattleCore + + ld a, [wOTPartyCount] + add BATTLEACTION_SWITCH1 + ld b, a + ld a, [wBattleAction] + cp BATTLEACTION_SWITCH1 + jr c, .baton_pass + cp b + jr c, .switch + +.baton_pass + ld a, [wCurOTMon] + add BATTLEACTION_SWITCH1 + ld [wBattleAction], a +.switch + jp CloseWindow + +FailedBatonPass: + call AnimateFailedMove + jp PrintButItFailed + +ResetBatonPassStatus: +; Reset status changes that aren't passed by Baton Pass. + + ; Nightmare isn't passed. + ld a, BATTLE_VARS_STATUS + call GetBattleVar + and SLP_MASK + jr nz, .ok + + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVarAddr + res SUBSTATUS_NIGHTMARE, [hl] +.ok + + ; Disable isn't passed. + call ResetActorDisable + + ; Attraction isn't passed. + ld hl, wPlayerSubStatus1 + res SUBSTATUS_IN_LOVE, [hl] + ld hl, wEnemySubStatus1 + res SUBSTATUS_IN_LOVE, [hl] + ld hl, wPlayerSubStatus5 + + ld a, BATTLE_VARS_SUBSTATUS5 + call GetBattleVarAddr + res SUBSTATUS_TRANSFORMED, [hl] + res SUBSTATUS_ENCORED, [hl] + + ; New mon hasn't used a move yet. + ld a, BATTLE_VARS_LAST_MOVE + call GetBattleVarAddr + ld [hl], 0 + + xor a + ld [wPlayerWrapCount], a + ld [wEnemyWrapCount], a + ret + +CheckAnyOtherAlivePartyMons: + ld hl, wPartyMon1HP + ld a, [wPartyCount] + ld d, a + ld a, [wCurBattleMon] + ld e, a + jr CheckAnyOtherAliveMons + +CheckAnyOtherAliveEnemyMons: + ld hl, wOTPartyMon1HP + ld a, [wOTPartyCount] + ld d, a + ld a, [wCurOTMon] + ld e, a + + ; fallthrough + +CheckAnyOtherAliveMons: +; Check for nonzero HP starting from partymon +; HP at hl for d partymons, besides current mon e. + +; Return nz if any are alive. + + xor a + ld b, a + ld c, a +.loop + ld a, c + cp d + jr z, .done + cp e + jr z, .next + + ld a, [hli] + or b + ld b, a + ld a, [hld] + or b + ld b, a + +.next + push bc + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop bc + inc c + jr .loop + +.done + ld a, b + and a + ret diff --git a/engine/battle/move_effects/beat_up.asm b/engine/battle/move_effects/beat_up.asm new file mode 100644 index 0000000..028c210 --- /dev/null +++ b/engine/battle/move_effects/beat_up.asm @@ -0,0 +1,220 @@ +BattleCommand_BeatUp: + call ResetDamage + ldh a, [hBattleTurn] + and a + jp nz, .enemy_beats_up + + ld a, [wPlayerSubStatus3] + bit SUBSTATUS_IN_LOOP, a + jr nz, .next_mon + + ld c, 20 + call DelayFrames + xor a + ld [wPlayerRolloutCount], a + ld [wCurBeatUpPartyMon], a + ld [wBeatUpHitAtLeastOnce], a + jr .got_mon + +.next_mon + ld a, [wPlayerRolloutCount] + ld b, a + ld a, [wPartyCount] + sub b + ld [wCurBeatUpPartyMon], a + +.got_mon +; BUG: Beat Up can desynchronize link battles (see docs/bugs_and_glitches.md) + ld a, [wCurBeatUpPartyMon] + ld hl, wPartyMonNicknames + call GetNickname + ld a, MON_HP + call GetBeatupMonLocation + ld a, [hli] + or [hl] + jp z, .beatup_fail ; fainted + ld a, [wCurBeatUpPartyMon] + ld c, a + ld a, [wCurBattleMon] + cp [hl] + ld hl, wBattleMonStatus + jr z, .active_mon + ld a, MON_STATUS + call GetBeatupMonLocation +.active_mon + ld a, [hl] + and a + jp nz, .beatup_fail + + ld a, $1 + ld [wBeatUpHitAtLeastOnce], a + ld hl, BeatUpAttackText + call StdBattleTextbox + + ld a, [wEnemyMonSpecies] + ld [wCurSpecies], a + call GetBaseData + ld a, [wBaseDefense] + ld c, a + + push bc + ld a, MON_SPECIES + call GetBeatupMonLocation + ld a, [hl] + ld [wCurSpecies], a + call GetBaseData + ld a, [wBaseAttack] + pop bc + ld b, a + + push bc + ld a, MON_LEVEL + call GetBeatupMonLocation + ld a, [hl] + ld e, a + pop bc + + ld a, [wPlayerMoveStructPower] + ld d, a + ret + +.enemy_beats_up + ld a, [wEnemySubStatus3] + bit SUBSTATUS_IN_LOOP, a + jr nz, .enemy_next_mon + + xor a + ld [wEnemyRolloutCount], a + ld [wCurBeatUpPartyMon], a + ld [wBeatUpHitAtLeastOnce], a + jr .enemy_got_mon + +.enemy_next_mon + ld a, [wEnemyRolloutCount] + ld b, a + ld a, [wOTPartyCount] + sub b + ld [wCurBeatUpPartyMon], a + +.enemy_got_mon + ld a, [wBattleMode] + dec a + jr z, .wild + + ld a, [wLinkMode] + and a + jr nz, .link_or_tower + + ld a, [wInBattleTowerBattle] + and a + jr nz, .link_or_tower + + ld a, [wCurBeatUpPartyMon] + ld c, a + ld b, 0 + ld hl, wOTPartySpecies + add hl, bc + ld a, [hl] + ld [wNamedObjectIndex], a + call GetPokemonName + jr .got_enemy_nick + +.link_or_tower + ld a, [wCurBeatUpPartyMon] + ld hl, wOTPartyMonNicknames + ld bc, NAME_LENGTH + call AddNTimes + ld de, wStringBuffer1 + call CopyBytes + +.got_enemy_nick + ld a, MON_HP + call GetBeatupMonLocation + ld a, [hli] + or [hl] + jp z, .beatup_fail + + ld a, [wCurBeatUpPartyMon] + ld b, a + ld a, [wCurOTMon] + cp b + ld hl, wEnemyMonStatus + jr z, .active_enemy + ld a, MON_STATUS + call GetBeatupMonLocation +.active_enemy + ld a, [hl] + and a + jr nz, .beatup_fail + + ld a, $1 + ld [wBeatUpHitAtLeastOnce], a + jr .finish_beatup + +.wild + ld a, [wEnemyMonSpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, BeatUpAttackText + call StdBattleTextbox + jp EnemyAttackDamage + +.finish_beatup + ld hl, BeatUpAttackText + call StdBattleTextbox + + ld a, [wBattleMonSpecies] + ld [wCurSpecies], a + call GetBaseData + ld a, [wBaseDefense] + ld c, a + + push bc + ld a, MON_SPECIES + call GetBeatupMonLocation + ld a, [hl] + ld [wCurSpecies], a + call GetBaseData + ld a, [wBaseAttack] + pop bc + ld b, a + + push bc + ld a, MON_LEVEL + call GetBeatupMonLocation + ld a, [hl] + ld e, a + pop bc + + ld a, [wEnemyMoveStructPower] + ld d, a + ret + +.beatup_fail + ld b, buildopponentrage_command + jp SkipToBattleCommand + +BattleCommand_BeatUpFailText: +; BUG: Beat Up may trigger King's Rock even if it failed (see docs/bugs_and_glitches.md) + ld a, [wBeatUpHitAtLeastOnce] + and a + ret nz + + jp PrintButItFailed + +GetBeatupMonLocation: + push bc + ld c, a + ld b, 0 + ldh a, [hBattleTurn] + and a + ld hl, wPartyMon1Species + jr z, .got_species + ld hl, wOTPartyMon1Species + +.got_species + ld a, [wCurBeatUpPartyMon] + add hl, bc + call GetPartyLocation + pop bc + ret diff --git a/engine/battle/move_effects/belly_drum.asm b/engine/battle/move_effects/belly_drum.asm new file mode 100644 index 0000000..9c2b8cf --- /dev/null +++ b/engine/battle/move_effects/belly_drum.asm @@ -0,0 +1,31 @@ +BattleCommand_BellyDrum: +; BUG: Belly Drum sharply boosts Attack even with under 50% HP (see docs/bugs_and_glitches.md) + call BattleCommand_AttackUp2 + ld a, [wAttackMissed] + and a + jr nz, .failed + + callfar GetHalfMaxHP + callfar CheckUserHasEnoughHP + jr nc, .failed + + push bc + call AnimateCurrentMove + pop bc + callfar SubtractHPFromUser + call UpdateUserInParty + ld a, MAX_STAT_LEVEL - BASE_STAT_LEVEL - 1 + +.max_attack_loop + push af + call BattleCommand_AttackUp2 + pop af + dec a + jr nz, .max_attack_loop + + ld hl, BellyDrumText + jp StdBattleTextbox + +.failed + call AnimateFailedMove + jp PrintButItFailed diff --git a/engine/battle/move_effects/bide.asm b/engine/battle/move_effects/bide.asm new file mode 100644 index 0000000..be0d3fe --- /dev/null +++ b/engine/battle/move_effects/bide.asm @@ -0,0 +1,99 @@ +BattleCommand_StoreEnergy: + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVar + bit SUBSTATUS_BIDE, a + ret z + + ld hl, wPlayerRolloutCount + ldh a, [hBattleTurn] + and a + jr z, .check_still_storing_energy + ld hl, wEnemyRolloutCount +.check_still_storing_energy + dec [hl] + jr nz, .still_storing + + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + res SUBSTATUS_BIDE, [hl] + + ld hl, UnleashedEnergyText + call StdBattleTextbox + + ld a, BATTLE_VARS_MOVE_POWER + call GetBattleVarAddr + ld a, 1 + ld [hl], a + ld hl, wPlayerDamageTaken + 1 + ld de, wPlayerCharging ; player + ldh a, [hBattleTurn] + and a + jr z, .player + ld hl, wEnemyDamageTaken + 1 + ld de, wEnemyCharging ; enemy +.player + ld a, [hld] + add a + ld b, a + ld [wCurDamage + 1], a + ld a, [hl] + rl a + ld [wCurDamage], a + jr nc, .not_maxed + ld a, $ff + ld [wCurDamage], a + ld [wCurDamage + 1], a +.not_maxed + or b + jr nz, .built_up_something + ld a, 1 + ld [wAttackMissed], a +.built_up_something + xor a + ld [hli], a + ld [hl], a + ld [de], a + + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVarAddr + push hl + ld hl, BIDE + call GetMoveIDFromIndex + pop hl + ld [hl], a + + ld b, unleashenergy_command + jp SkipToBattleCommand + +.still_storing + ld hl, StoringEnergyText + call StdBattleTextbox + jp EndMoveEffect + +BattleCommand_UnleashEnergy: + ld de, wPlayerDamageTaken + ld bc, wPlayerRolloutCount + ldh a, [hBattleTurn] + and a + jr z, .got_damage + ld de, wEnemyDamageTaken + ld bc, wEnemyRolloutCount +.got_damage + ld a, BATTLE_VARS_SUBSTATUS3 + call GetBattleVarAddr + set SUBSTATUS_BIDE, [hl] + xor a + ld [de], a + inc de + ld [de], a + ld [wPlayerMoveStructEffect], a + ld [wEnemyMoveStructEffect], a + call BattleRandom + and 1 + inc a + inc a + ld [bc], a + ld a, 1 + ld [wBattleAnimParam], a + call AnimateCurrentMove + jp EndMoveEffect diff --git a/engine/battle/move_effects/conversion.asm b/engine/battle/move_effects/conversion.asm new file mode 100644 index 0000000..9377cf4 --- /dev/null +++ b/engine/battle/move_effects/conversion.asm @@ -0,0 +1,94 @@ +BattleCommand_Conversion: + ld hl, wBattleMonMoves + ld de, wBattleMonType1 + ldh a, [hBattleTurn] + and a + jr z, .got_moves + ld hl, wEnemyMonMoves + ld de, wEnemyMonType1 +.got_moves + push de + ld c, 0 + ld de, wStringBuffer1 +.loop + push hl + ld b, 0 + add hl, bc + ld a, [hl] + pop hl + and a + jr z, .okay + push hl + push bc + ld l, a + ld a, MOVE_TYPE + call GetMoveAttribute + ld [de], a + inc de + pop bc + pop hl + inc c + ld a, c + cp NUM_MOVES + jr c, .loop +.okay + ld a, $ff + ld [de], a + inc de + ld [de], a + inc de + ld [de], a + pop de + ld hl, wStringBuffer1 +.loop2 + ld a, [hl] + cp -1 + jr z, .fail + cp CURSE_TYPE + jr z, .next + ld a, [de] + cp [hl] + jr z, .next + inc de + ld a, [de] + dec de + cp [hl] + jr nz, .done +.next + inc hl + jr .loop2 + +.fail + call AnimateFailedMove + jp PrintButItFailed + +.done +.loop3 + call BattleRandom + maskbits NUM_MOVES + ld c, a + ld b, 0 + ld hl, wStringBuffer1 + add hl, bc + ld a, [hl] + cp -1 + jr z, .loop3 + cp CURSE_TYPE + jr z, .loop3 + ld a, [de] + cp [hl] + jr z, .loop3 + inc de + ld a, [de] + dec de + cp [hl] + jr z, .loop3 + ld a, [hl] + ld [de], a + inc de + ld [de], a + ld [wNamedObjectIndex], a + farcall GetTypeName + call AnimateCurrentMove + ld hl, TransformedTypeText + jp StdBattleTextbox diff --git a/engine/battle/move_effects/conversion2.asm b/engine/battle/move_effects/conversion2.asm new file mode 100644 index 0000000..952d5c3 --- /dev/null +++ b/engine/battle/move_effects/conversion2.asm @@ -0,0 +1,62 @@ +BattleCommand_Conversion2: + ld a, [wAttackMissed] + and a + jr nz, .failed + ld hl, wBattleMonType1 + ldh a, [hBattleTurn] + and a + jr z, .got_type + ld hl, wEnemyMonType1 +.got_type + ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP + call GetBattleVar + and a + jr z, .failed + push hl + ld l, a + ld a, MOVE_TYPE + call GetMoveAttribute + ld d, a + pop hl + cp CURSE_TYPE + jr z, .failed + call AnimateCurrentMove + call BattleCommand_SwitchTurn + +.loop + call BattleRandom + maskbits TYPES_END + cp UNUSED_TYPES + jr c, .okay + cp UNUSED_TYPES_END + jr c, .loop + cp TYPES_END + jr nc, .loop +.okay + ld [hli], a + ld [hld], a + push hl + ld a, BATTLE_VARS_MOVE_TYPE + call GetBattleVarAddr + push af + push hl + ld a, d + ld [hl], a + call BattleCheckTypeMatchup + pop hl + pop af + ld [hl], a + pop hl + ld a, [wTypeMatchup] + cp EFFECTIVE + jr nc, .loop + call BattleCommand_SwitchTurn + + ld a, [hl] + ld [wNamedObjectIndex], a + predef GetTypeName + ld hl, TransformedTypeText + jp StdBattleTextbox + +.failed + jp FailMove diff --git a/engine/battle/move_effects/counter.asm b/engine/battle/move_effects/counter.asm new file mode 100644 index 0000000..03f94f8 --- /dev/null +++ b/engine/battle/move_effects/counter.asm @@ -0,0 +1,56 @@ +BattleCommand_Counter: + ld a, 1 + ld [wAttackMissed], a + ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP + call GetBattleVar + and a + ret z + + ld b, a + callfar GetMoveEffect + ld a, b + cp EFFECT_COUNTER + ret z + + call BattleCommand_ResetTypeMatchup + ld a, [wTypeMatchup] + and a + ret z + + call CheckOpponentWentFirst + ret z + + ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP + call GetBattleVar + ld de, wStringBuffer1 + call GetMoveData + + ld a, [wStringBuffer1 + MOVE_POWER] + and a + ret z + + ld a, [wStringBuffer1 + MOVE_TYPE] + cp SPECIAL + ret nc + +; BUG: Counter and Mirror Coat still work if the opponent uses an item (see docs/bugs_and_glitches.md) + ld hl, wCurDamage + ld a, [hli] + or [hl] + ret z + + ld a, [hl] + add a + ld [hld], a + ld a, [hl] + adc a + ld [hl], a + jr nc, .capped + ld a, $ff + ld [hli], a + ld [hl], a +.capped + + xor a + ld [wAttackMissed], a + ret diff --git a/engine/battle/move_effects/curse.asm b/engine/battle/move_effects/curse.asm new file mode 100644 index 0000000..1fe32c7 --- /dev/null +++ b/engine/battle/move_effects/curse.asm @@ -0,0 +1,91 @@ +BattleCommand_Curse: + ld de, wBattleMonType1 + ld bc, wPlayerStatLevels + ldh a, [hBattleTurn] + and a + jr z, .go + ld de, wEnemyMonType1 + ld bc, wEnemyStatLevels + +.go + +; Curse is different for Ghost-types. + + ld a, [de] + cp GHOST + jr z, .ghost + inc de + ld a, [de] + cp GHOST + jr z, .ghost + +; If no stats can be increased, don't. + +; Attack + ld a, [bc] + cp MAX_STAT_LEVEL + jr c, .raise + +; Defense + inc bc + ld a, [bc] + cp MAX_STAT_LEVEL + jr nc, .cantraise + +.raise + +; Raise Attack and Defense, and lower Speed. + + ld a, $1 + ld [wBattleAnimParam], a + call AnimateCurrentMove + ld a, SPEED + call LowerStat + call BattleCommand_SwitchTurn + call BattleCommand_StatDownMessage + call ResetMiss + call BattleCommand_SwitchTurn + call BattleCommand_AttackUp + call BattleCommand_StatUpMessage + call ResetMiss + call BattleCommand_DefenseUp + jp BattleCommand_StatUpMessage + +.ghost + +; Cut HP in half and put a curse on the opponent. + + call CheckHiddenOpponent + jr nz, .failed + + call CheckSubstituteOpp + jr nz, .failed + + ld a, BATTLE_VARS_SUBSTATUS1_OPP + call GetBattleVarAddr + bit SUBSTATUS_CURSE, [hl] + jr nz, .failed + + set SUBSTATUS_CURSE, [hl] + call AnimateCurrentMove + ld hl, GetHalfMaxHP + call CallBattleCore + ld hl, SubtractHPFromUser + call CallBattleCore + call UpdateUserInParty + ld hl, PutACurseText + jp StdBattleTextbox + +.failed + call AnimateFailedMove + jp PrintButItFailed + +.cantraise + +; Can't raise either stat. + + ld b, ABILITY + 1 + call GetStatName + call AnimateFailedMove + ld hl, WontRiseAnymoreText + jp StdBattleTextbox diff --git a/engine/battle/move_effects/destiny_bond.asm b/engine/battle/move_effects/destiny_bond.asm new file mode 100644 index 0000000..365f66e --- /dev/null +++ b/engine/battle/move_effects/destiny_bond.asm @@ -0,0 +1,7 @@ +BattleCommand_DestinyBond: + ld a, BATTLE_VARS_SUBSTATUS5 + call GetBattleVarAddr + set SUBSTATUS_DESTINY_BOND, [hl] + call AnimateCurrentMove + ld hl, DestinyBondEffectText + jp StdBattleTextbox diff --git a/engine/battle/move_effects/disable.asm b/engine/battle/move_effects/disable.asm new file mode 100644 index 0000000..93831ed --- /dev/null +++ b/engine/battle/move_effects/disable.asm @@ -0,0 +1,73 @@ +BattleCommand_Disable: + ld a, [wAttackMissed] + and a + jr nz, .failed + + ld de, wEnemyDisableCount + ld hl, wEnemyMonMoves + ldh a, [hBattleTurn] + and a + jr z, .got_moves + ld de, wPlayerDisableCount + ld hl, wBattleMonMoves +.got_moves + + ld a, [de] + and a + jr nz, .failed + + ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP + call GetBattleVar + and a + jr z, .failed + ld b, a + push bc + ld bc, STRUGGLE + call CompareMove + pop bc + jr z, .failed + + ld c, $ff +.loop + inc c + ld a, [hli] + cp b + jr nz, .loop + + ldh a, [hBattleTurn] + and a + ld hl, wEnemyMonPP + jr z, .got_pp + ld hl, wBattleMonPP +.got_pp + ld b, 0 + add hl, bc + ld a, [hl] + and a + jr z, .failed +.loop2 + call BattleRandom + and 7 + jr z, .loop2 + inc a + inc c + swap c + add c + ld [de], a + call AnimateCurrentMove + ld hl, wDisabledMove + ldh a, [hBattleTurn] + and a + jr nz, .got_disabled_move_pointer + inc hl +.got_disabled_move_pointer + ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP + call GetBattleVar + ld [hl], a + ld [wNamedObjectIndex], a + call GetMoveName + ld hl, WasDisabledText + jp StdBattleTextbox + +.failed + jp FailMove diff --git a/engine/battle/move_effects/encore.asm b/engine/battle/move_effects/encore.asm new file mode 100644 index 0000000..43886d4 --- /dev/null +++ b/engine/battle/move_effects/encore.asm @@ -0,0 +1,120 @@ +BattleCommand_Encore: + ld hl, wEnemyMonMoves + ld de, wEnemyEncoreCount + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wBattleMonMoves + ld de, wPlayerEncoreCount +.ok + ld a, BATTLE_VARS_LAST_MOVE_OPP + call GetBattleVar + ld b, a + push hl + ld hl, .invalid_moves + call CheckMoveInList + pop hl + jp c, .failed + +.got_move + ld a, [hli] + cp b + jr nz, .got_move + + ld bc, wBattleMonPP - wBattleMonMoves - 1 + add hl, bc + ld a, [hl] + and PP_MASK + jp z, .failed + ld a, [wAttackMissed] + and a + jp nz, .failed + ld a, BATTLE_VARS_SUBSTATUS5_OPP + call GetBattleVarAddr + bit SUBSTATUS_ENCORED, [hl] + jp nz, .failed + set SUBSTATUS_ENCORED, [hl] + call BattleRandom + and $3 + inc a + inc a + inc a + ld [de], a + call CheckOpponentWentFirst + jr nz, .finish_move + ldh a, [hBattleTurn] + and a + jr z, .force_last_enemy_move + + push hl + ld a, [wLastPlayerMove] + ld b, a + ld c, 0 + ld hl, wBattleMonMoves +.find_player_move + ld a, [hli] + cp b + jr z, .got_player_move + inc c + ld a, c + cp NUM_MOVES + jr c, .find_player_move + pop hl + res SUBSTATUS_ENCORED, [hl] + xor a + ld [de], a + jr .failed + +.got_player_move + pop hl + ld a, c + ld [wCurMoveNum], a + ld a, b + ld [wCurPlayerMove], a + ld de, wPlayerMoveStruct + call GetMoveData + jr .finish_move + +.force_last_enemy_move + push hl + ld a, [wLastEnemyMove] + ld b, a + ld c, 0 + ld hl, wEnemyMonMoves +.find_enemy_move + ld a, [hli] + cp b + jr z, .got_enemy_move + inc c + ld a, c + cp NUM_MOVES + jr c, .find_enemy_move + pop hl + res SUBSTATUS_ENCORED, [hl] + xor a + ld [de], a + jr .failed + +.got_enemy_move + pop hl + ld a, c + ld [wCurEnemyMoveNum], a + ld a, b + ld [wCurEnemyMove], a + ld de, wEnemyMoveStruct + call GetMoveData + +.finish_move + call AnimateCurrentMove + ld hl, GotAnEncoreText + jp StdBattleTextbox + +.failed + jp PrintDidntAffect2 + +.invalid_moves + dw NO_MOVE + dw STRUGGLE + dw ENCORE + dw MIRROR_MOVE + dw -1 diff --git a/engine/battle/move_effects/endure.asm b/engine/battle/move_effects/endure.asm new file mode 100644 index 0000000..f23d718 --- /dev/null +++ b/engine/battle/move_effects/endure.asm @@ -0,0 +1,14 @@ +BattleCommand_Endure: +; Endure shares code with Protect. See protect.asm. + + call ProtectChance + ret c + + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVarAddr + set SUBSTATUS_ENDURE, [hl] + + call AnimateCurrentMove + + ld hl, BracedItselfText + jp StdBattleTextbox diff --git a/engine/battle/move_effects/false_swipe.asm b/engine/battle/move_effects/false_swipe.asm new file mode 100644 index 0000000..61ffa61 --- /dev/null +++ b/engine/battle/move_effects/false_swipe.asm @@ -0,0 +1,46 @@ +BattleCommand_FalseSwipe: +; Makes sure wCurDamage < MonHP + + ld hl, wEnemyMonHP + ldh a, [hBattleTurn] + and a + jr z, .got_hp + ld hl, wBattleMonHP +.got_hp + ld de, wCurDamage + ld c, 2 + push hl + push de + call CompareBytes + pop de + pop hl + jr c, .done + + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + dec a + ld [de], a + + inc a + jr nz, .okay + dec de + ld a, [de] + dec a + ld [de], a +.okay + + ld a, [wCriticalHit] + cp 2 + jr nz, .carry + xor a + ld [wCriticalHit], a + +.carry + scf + ret + +.done + and a + ret diff --git a/engine/battle/move_effects/focus_energy.asm b/engine/battle/move_effects/focus_energy.asm new file mode 100644 index 0000000..d1dd04b --- /dev/null +++ b/engine/battle/move_effects/focus_energy.asm @@ -0,0 +1,13 @@ +BattleCommand_FocusEnergy: + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVarAddr + bit SUBSTATUS_FOCUS_ENERGY, [hl] + jr nz, .already_pumped + set SUBSTATUS_FOCUS_ENERGY, [hl] + call AnimateCurrentMove + ld hl, GettingPumpedText + jp StdBattleTextbox + +.already_pumped + call AnimateFailedMove + jp PrintButItFailed diff --git a/engine/battle/move_effects/foresight.asm b/engine/battle/move_effects/foresight.asm new file mode 100644 index 0000000..8aba157 --- /dev/null +++ b/engine/battle/move_effects/foresight.asm @@ -0,0 +1,20 @@ +BattleCommand_Foresight: + ld a, [wAttackMissed] + and a + jr nz, .failed + + call CheckHiddenOpponent + jr nz, .failed + + ld a, BATTLE_VARS_SUBSTATUS1_OPP + call GetBattleVarAddr + bit SUBSTATUS_IDENTIFIED, [hl] + jr nz, .failed + + set SUBSTATUS_IDENTIFIED, [hl] + call AnimateCurrentMove + ld hl, IdentifiedText + jp StdBattleTextbox + +.failed + jp FailMove diff --git a/engine/battle/move_effects/frustration.asm b/engine/battle/move_effects/frustration.asm new file mode 100644 index 0000000..ceecc3c --- /dev/null +++ b/engine/battle/move_effects/frustration.asm @@ -0,0 +1,26 @@ +BattleCommand_FrustrationPower: +; BUG: Return and Frustration deal no damage when the user's happiness is low or high, respectively (see docs/bugs_and_glitches.md) + push bc + ld hl, wBattleMonHappiness + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wEnemyMonHappiness +.ok + ld a, $ff + sub [hl] + ldh [hMultiplicand + 2], a + xor a + ldh [hMultiplicand + 0], a + ldh [hMultiplicand + 1], a + ld a, 10 + ldh [hMultiplier], a + call Multiply + ld a, 25 + ldh [hDivisor], a + ld b, 4 + call Divide + ldh a, [hQuotient + 3] + ld d, a + pop bc + ret diff --git a/engine/battle/move_effects/fury_cutter.asm b/engine/battle/move_effects/fury_cutter.asm new file mode 100644 index 0000000..c839d88 --- /dev/null +++ b/engine/battle/move_effects/fury_cutter.asm @@ -0,0 +1,53 @@ +BattleCommand_FuryCutter: + ld hl, wPlayerFuryCutterCount + ldh a, [hBattleTurn] + and a + jr z, .go + ld hl, wEnemyFuryCutterCount + +.go + ld a, [wAttackMissed] + and a + jp nz, ResetFuryCutterCount + + inc [hl] + +; Damage capped at 5 turns' worth (16x). + ld a, [hl] + ld b, a + cp 6 + jr c, .checkdouble + ld b, 5 + +.checkdouble + dec b + ret z + +; Double the damage + ld hl, wCurDamage + 1 + sla [hl] + dec hl + rl [hl] + jr nc, .checkdouble + +; No overflow + ld a, $ff + ld [hli], a + ld [hl], a + ret + +ResetFuryCutterCount: + push hl + + ld hl, wPlayerFuryCutterCount + ldh a, [hBattleTurn] + and a + jr z, .reset + ld hl, wEnemyFuryCutterCount + +.reset + xor a + ld [hl], a + + pop hl + ret diff --git a/engine/battle/move_effects/future_sight.asm b/engine/battle/move_effects/future_sight.asm new file mode 100644 index 0000000..5dae084 --- /dev/null +++ b/engine/battle/move_effects/future_sight.asm @@ -0,0 +1,77 @@ +BattleCommand_CheckFutureSight: + ld hl, wPlayerFutureSightCount + ld de, wPlayerFutureSightDamage + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wEnemyFutureSightCount + ld de, wEnemyFutureSightDamage +.ok + + ld a, [hl] + and a + ret z + cp 1 + ret nz + + ld [hl], 0 + ld a, [de] + inc de + ld [wCurDamage], a + ld a, [de] + ld [wCurDamage + 1], a + ld b, futuresight_command + jp SkipToBattleCommand + +BattleCommand_FutureSight: + call CheckUserIsCharging + jr nz, .AlreadyChargingFutureSight + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + ld b, a + ld a, BATTLE_VARS_LAST_COUNTER_MOVE + call GetBattleVarAddr + ld [hl], b + ld a, BATTLE_VARS_LAST_MOVE + call GetBattleVarAddr + ld [hl], b +.AlreadyChargingFutureSight: + ld hl, wPlayerFutureSightCount + ldh a, [hBattleTurn] + and a + jr z, .GotFutureSightCount + ld hl, wEnemyFutureSightCount +.GotFutureSightCount: + ld a, [hl] + and a + jr nz, .failed + ld a, 4 + ld [hl], a + call BattleCommand_LowerSub + call BattleCommand_MoveDelay + ld hl, ForesawAttackText + call StdBattleTextbox + call BattleCommand_RaiseSub + ld de, wPlayerFutureSightDamage + ldh a, [hBattleTurn] + and a + jr z, .StoreDamage + ld de, wEnemyFutureSightDamage +.StoreDamage: + ld hl, wCurDamage + ld a, [hl] + ld [de], a + ld [hl], 0 + inc hl + inc de + ld a, [hl] + ld [de], a + ld [hl], 0 + jp EndMoveEffect + +.failed + pop bc + call ResetDamage + call AnimateFailedMove + call PrintButItFailed + jp EndMoveEffect diff --git a/engine/battle/move_effects/heal_bell.asm b/engine/battle/move_effects/heal_bell.asm new file mode 100644 index 0000000..ec22510 --- /dev/null +++ b/engine/battle/move_effects/heal_bell.asm @@ -0,0 +1,32 @@ +BattleCommand_HealBell: + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVarAddr + res SUBSTATUS_NIGHTMARE, [hl] + ld de, wPartyMon1Status + ldh a, [hBattleTurn] + and a + jr z, .got_status + ld de, wOTPartyMon1Status +.got_status + ld a, BATTLE_VARS_STATUS + call GetBattleVarAddr + xor a + ld [hl], a + ld h, d + ld l, e + ld bc, PARTYMON_STRUCT_LENGTH + ld d, PARTY_LENGTH +.loop + ld [hl], a + add hl, bc + dec d + jr nz, .loop + call AnimateCurrentMove + + ld hl, BellChimedText + call StdBattleTextbox + + ldh a, [hBattleTurn] + and a + jp z, CalcPlayerStats + jp CalcEnemyStats diff --git a/engine/battle/move_effects/hidden_power.asm b/engine/battle/move_effects/hidden_power.asm new file mode 100644 index 0000000..59b718f --- /dev/null +++ b/engine/battle/move_effects/hidden_power.asm @@ -0,0 +1,6 @@ +BattleCommand_HiddenPower: + ld a, [wAttackMissed] + and a + ret nz + farcall HiddenPowerDamage + ret diff --git a/engine/battle/move_effects/leech_seed.asm b/engine/battle/move_effects/leech_seed.asm new file mode 100644 index 0000000..f528203 --- /dev/null +++ b/engine/battle/move_effects/leech_seed.asm @@ -0,0 +1,39 @@ +BattleCommand_LeechSeed: + ld a, [wAttackMissed] + and a + jr nz, .evaded + call CheckSubstituteOpp + jr nz, .evaded + + ld de, wEnemyMonType1 + ldh a, [hBattleTurn] + and a + jr z, .ok + ld de, wBattleMonType1 +.ok + + ld a, [de] + cp GRASS + jr z, .grass + inc de + ld a, [de] + cp GRASS + jr z, .grass + + ld a, BATTLE_VARS_SUBSTATUS4_OPP + call GetBattleVarAddr + bit SUBSTATUS_LEECH_SEED, [hl] + jr nz, .evaded + set SUBSTATUS_LEECH_SEED, [hl] + call AnimateCurrentMove + ld hl, WasSeededText + jp StdBattleTextbox + +.grass + call AnimateFailedMove + jp PrintDoesntAffect + +.evaded + call AnimateFailedMove + ld hl, EvadedText + jp StdBattleTextbox diff --git a/engine/battle/move_effects/lock_on.asm b/engine/battle/move_effects/lock_on.asm new file mode 100644 index 0000000..5b0733c --- /dev/null +++ b/engine/battle/move_effects/lock_on.asm @@ -0,0 +1,19 @@ +BattleCommand_LockOn: + call CheckSubstituteOpp + jr nz, .fail + + ld a, [wAttackMissed] + and a + jr nz, .fail + + ld a, BATTLE_VARS_SUBSTATUS5_OPP + call GetBattleVarAddr + set SUBSTATUS_LOCK_ON, [hl] + call AnimateCurrentMove + + ld hl, TookAimText + jp StdBattleTextbox + +.fail + call AnimateFailedMove + jp PrintDidntAffect diff --git a/engine/battle/move_effects/magnitude.asm b/engine/battle/move_effects/magnitude.asm new file mode 100644 index 0000000..aedbd9e --- /dev/null +++ b/engine/battle/move_effects/magnitude.asm @@ -0,0 +1,27 @@ +BattleCommand_GetMagnitude: + push bc + call BattleRandom + ld b, a + ld hl, MagnitudePower +.loop + ld a, [hli] + cp b + jr nc, .ok + inc hl + inc hl + jr .loop + +.ok + ld d, [hl] + push de + inc hl + ld a, [hl] + ld [wTextDecimalByte], a + call BattleCommand_MoveDelay + ld hl, MagnitudeText + call StdBattleTextbox + pop de + pop bc + ret + +INCLUDE "data/moves/magnitude_power.asm" diff --git a/engine/battle/move_effects/metronome.asm b/engine/battle/move_effects/metronome.asm new file mode 100644 index 0000000..495635c --- /dev/null +++ b/engine/battle/move_effects/metronome.asm @@ -0,0 +1,70 @@ +BattleCommand_Metronome: + call ClearLastMove + call CheckUserIsCharging + jr nz, .charging + + ld a, [wBattleAnimParam] + push af + call BattleCommand_LowerSub + pop af + ld [wBattleAnimParam], a + +.charging + call LoadMoveAnim + +.GetMove: + call ChooseRandomMove + +; None of the moves in MetronomeExcepts. + ld de, 2 + ld hl, MetronomeExcepts + call IsInWordArray + jr c, .GetMove + ld h, b + ld l, c + call GetMoveIDFromIndex + +; No moves the user already has. + ld b, a + call CheckUserMove + jr z, .GetMove + + ld a, BATTLE_VARS_MOVE + call GetBattleVarAddr + ld [hl], b + call UpdateMoveData + jp ResetTurn + +ChooseRandomMove: + ; chooses a random valid move and returns it in bc + call BattleRandom + if HIGH(NUM_ATTACKS) + maskbits HIGH(NUM_ATTACKS) + 1 + if HIGH(NUM_ATTACKS) & (HIGH(NUM_ATTACKS) + 1) + ; if HIGH(NUM_ATTACKS) is not one less than a power of two + cp HIGH(NUM_ATTACKS) + 1 + jr nc, ChooseRandomMove + endc + ld b, a + call BattleRandom + ld c, a + or b + jr z, ChooseRandomMove + if LOW(NUM_ATTACKS) != $ff + ld a, b + cp HIGH(NUM_ATTACKS) + ret nz + ld a, c + cp LOW(NUM_ATTACKS) + 1 + jr nc, ChooseRandomMove + endc + else + cp NUM_ATTACKS + jr nc, ChooseRandomMove + inc a + ld c, a + ld b, 0 + endc + ret + +INCLUDE "data/moves/metronome_exception_moves.asm" diff --git a/engine/battle/move_effects/mimic.asm b/engine/battle/move_effects/mimic.asm new file mode 100644 index 0000000..8ae78ec --- /dev/null +++ b/engine/battle/move_effects/mimic.asm @@ -0,0 +1,53 @@ +BattleCommand_Mimic: + call ClearLastMove + call BattleCommand_MoveDelay + ld a, [wAttackMissed] + and a + jr nz, .fail + ld hl, wBattleMonMoves + ldh a, [hBattleTurn] + and a + jr z, .player_turn + ld hl, wEnemyMonMoves +.player_turn + call CheckHiddenOpponent + jr nz, .fail + ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP + call GetBattleVar + and a + jr z, .fail + ld b, a + push bc + ld bc, STRUGGLE + call CompareMove + pop bc + jr z, .fail + ld c, NUM_MOVES +.check_already_knows_move + ld a, [hli] + cp b + jr z, .fail + dec c + jr nz, .check_already_knows_move + push hl + ld hl, MIMIC + call GetMoveIDFromIndex + pop hl +.find_mimic + dec hl + cp [hl] + jr nz, .find_mimic + ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP + call GetBattleVar + ld [hl], a + ld [wNamedObjectIndex], a + ld bc, wBattleMonPP - wBattleMonMoves + add hl, bc + ld [hl], 5 + call GetMoveName + call AnimateCurrentMove + ld hl, MimicLearnedMoveText + jp StdBattleTextbox + +.fail + jp FailMimic diff --git a/engine/battle/move_effects/mirror_coat.asm b/engine/battle/move_effects/mirror_coat.asm new file mode 100644 index 0000000..c2eb1e8 --- /dev/null +++ b/engine/battle/move_effects/mirror_coat.asm @@ -0,0 +1,57 @@ +BattleCommand_MirrorCoat: + ld a, 1 + ld [wAttackMissed], a + + ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP + call GetBattleVar + and a + ret z + + ld b, a + callfar GetMoveEffect + ld a, b + cp EFFECT_MIRROR_COAT + ret z + + call BattleCommand_ResetTypeMatchup + ld a, [wTypeMatchup] + and a + ret z + + call CheckOpponentWentFirst + ret z + + ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP + call GetBattleVar + ld de, wStringBuffer1 + call GetMoveData + + ld a, [wStringBuffer1 + MOVE_POWER] + and a + ret z + + ld a, [wStringBuffer1 + MOVE_TYPE] + cp SPECIAL + ret c + +; BUG: Counter and Mirror Coat still work if the opponent uses an item (see docs/bugs_and_glitches.md) + ld hl, wCurDamage + ld a, [hli] + or [hl] + ret z + + ld a, [hl] + add a + ld [hld], a + ld a, [hl] + adc a + ld [hl], a + jr nc, .capped + ld a, $ff + ld [hli], a + ld [hl], a +.capped + + xor a + ld [wAttackMissed], a + ret diff --git a/engine/battle/move_effects/mirror_move.asm b/engine/battle/move_effects/mirror_move.asm new file mode 100644 index 0000000..3600a03 --- /dev/null +++ b/engine/battle/move_effects/mirror_move.asm @@ -0,0 +1,48 @@ +BattleCommand_MirrorMove: + call ClearLastMove + + ld a, BATTLE_VARS_MOVE + call GetBattleVarAddr + + ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP + call GetBattleVar + and a + jr z, .failed + + call CheckUserMove + jr nz, .use + +.failed + call AnimateFailedMove + + ld hl, MirrorMoveFailedText + call StdBattleTextbox + jp EndMoveEffect + +.use + ld a, b + ld [hl], a + ld [wNamedObjectIndex], a + + push af + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVarAddr + ld d, h + ld e, l + pop af + + call GetMoveData + call GetMoveName + call CopyName1 + call CheckUserIsCharging + jr nz, .done + + ld a, [wBattleAnimParam] + push af + call BattleCommand_LowerSub + pop af + ld [wBattleAnimParam], a + +.done + call BattleCommand_MoveDelay + jp ResetTurn diff --git a/engine/battle/move_effects/mist.asm b/engine/battle/move_effects/mist.asm new file mode 100644 index 0000000..eb240c7 --- /dev/null +++ b/engine/battle/move_effects/mist.asm @@ -0,0 +1,13 @@ +BattleCommand_Mist: + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVarAddr + bit SUBSTATUS_MIST, [hl] + jr nz, .already_mist + set SUBSTATUS_MIST, [hl] + call AnimateCurrentMove + ld hl, MistText + jp StdBattleTextbox + +.already_mist + call AnimateFailedMove + jp PrintButItFailed diff --git a/engine/battle/move_effects/nightmare.asm b/engine/battle/move_effects/nightmare.asm new file mode 100644 index 0000000..c0d926c --- /dev/null +++ b/engine/battle/move_effects/nightmare.asm @@ -0,0 +1,35 @@ +BattleCommand_Nightmare: +; Can't hit an absent opponent. + + call CheckHiddenOpponent + jr nz, .failed + +; Can't hit a substitute. + + call CheckSubstituteOpp + jr nz, .failed + +; Only works on a sleeping opponent. + + ld a, BATTLE_VARS_STATUS_OPP + call GetBattleVarAddr + and SLP_MASK + jr z, .failed + +; Bail if the opponent is already having a nightmare. + + ld a, BATTLE_VARS_SUBSTATUS1_OPP + call GetBattleVarAddr + bit SUBSTATUS_NIGHTMARE, [hl] + jr nz, .failed + +; Otherwise give the opponent a nightmare. + + set SUBSTATUS_NIGHTMARE, [hl] + call AnimateCurrentMove + ld hl, StartedNightmareText + jp StdBattleTextbox + +.failed + call AnimateFailedMove + jp PrintButItFailed diff --git a/engine/battle/move_effects/pain_split.asm b/engine/battle/move_effects/pain_split.asm new file mode 100644 index 0000000..13faca0 --- /dev/null +++ b/engine/battle/move_effects/pain_split.asm @@ -0,0 +1,91 @@ +BattleCommand_PainSplit: + ld a, [wAttackMissed] + and a + jp nz, .ButItFailed + call CheckSubstituteOpp + jp nz, .ButItFailed + call AnimateCurrentMove + ld hl, wBattleMonMaxHP + 1 + ld de, wEnemyMonMaxHP + 1 + call .PlayerShareHP + ld a, $1 + ld [wWhichHPBar], a + hlcoord 10, 9 + predef AnimateHPBar + ld hl, wEnemyMonHP + ld a, [hli] + ld [wHPBuffer2 + 1], a + ld a, [hli] + ld [wHPBuffer2], a + ld a, [hli] + ld [wHPBuffer1 + 1], a + ld a, [hl] + ld [wHPBuffer1], a + call .EnemyShareHP + xor a + ld [wWhichHPBar], a + call ResetDamage + hlcoord 2, 2 + predef AnimateHPBar + farcall _UpdateBattleHUDs + + ld hl, SharedPainText + jp StdBattleTextbox + +.PlayerShareHP: + ld a, [hld] + ld [wHPBuffer1], a + ld a, [hld] + ld [wHPBuffer1 + 1], a + ld a, [hld] + ld b, a + ld [wHPBuffer2], a + ld a, [hl] + ld [wHPBuffer2 + 1], a + dec de + dec de + ld a, [de] + dec de + add b + ld [wCurDamage + 1], a + ld b, [hl] + ld a, [de] + adc b + srl a + ld [wCurDamage], a + ld a, [wCurDamage + 1] + rr a + ld [wCurDamage + 1], a + inc hl + inc hl + inc hl + inc de + inc de + inc de + +.EnemyShareHP: + ld c, [hl] + dec hl + ld a, [wCurDamage + 1] + sub c + ld b, [hl] + dec hl + ld a, [wCurDamage] + sbc b + jr nc, .skip + + ld a, [wCurDamage] + ld b, a + ld a, [wCurDamage + 1] + ld c, a +.skip + ld a, c + ld [hld], a + ld [wHPBuffer3], a + ld a, b + ld [hli], a + ld [wHPBuffer3 + 1], a + ret + +.ButItFailed: + jp PrintDidntAffect2 diff --git a/engine/battle/move_effects/pay_day.asm b/engine/battle/move_effects/pay_day.asm new file mode 100644 index 0000000..f05b4d6 --- /dev/null +++ b/engine/battle/move_effects/pay_day.asm @@ -0,0 +1,24 @@ +BattleCommand_PayDay: + xor a + ld hl, wStringBuffer1 + ld [hli], a + + ldh a, [hBattleTurn] + and a + ld a, [wBattleMonLevel] + jr z, .ok + ld a, [wEnemyMonLevel] +.ok + + add a + ld hl, wPayDayMoney + 2 + add [hl] + ld [hld], a + jr nc, .done + inc [hl] + dec hl + jr nz, .done + inc [hl] +.done + ld hl, CoinsScatteredText + jp StdBattleTextbox diff --git a/engine/battle/move_effects/perish_song.asm b/engine/battle/move_effects/perish_song.asm new file mode 100644 index 0000000..bfacf52 --- /dev/null +++ b/engine/battle/move_effects/perish_song.asm @@ -0,0 +1,36 @@ +BattleCommand_PerishSong: + ld hl, wPlayerSubStatus1 + ld de, wEnemySubStatus1 + bit SUBSTATUS_PERISH, [hl] + jr z, .ok + + ld a, [de] + bit SUBSTATUS_PERISH, a + jr nz, .failed + +.ok + bit SUBSTATUS_PERISH, [hl] + jr nz, .enemy + + set SUBSTATUS_PERISH, [hl] + ld a, 4 + ld [wPlayerPerishCount], a + +.enemy + ld a, [de] + bit SUBSTATUS_PERISH, a + jr nz, .done + + set SUBSTATUS_PERISH, a + ld [de], a + ld a, 4 + ld [wEnemyPerishCount], a + +.done + call AnimateCurrentMove + ld hl, StartPerishText + jp StdBattleTextbox + +.failed + call AnimateFailedMove + jp PrintButItFailed diff --git a/engine/battle/move_effects/present.asm b/engine/battle/move_effects/present.asm new file mode 100644 index 0000000..0401927 --- /dev/null +++ b/engine/battle/move_effects/present.asm @@ -0,0 +1,87 @@ +BattleCommand_Present: +; BUG: Present damage is incorrect in link battles (see docs/bugs_and_glitches.md) + ld a, [wLinkMode] + cp LINK_COLOSSEUM + jr z, .colosseum_skippush + push bc + push de +.colosseum_skippush + + call BattleCommand_Stab + + ld a, [wLinkMode] + cp LINK_COLOSSEUM + jr z, .colosseum_skippop + pop de + pop bc +.colosseum_skippop + + ld a, [wTypeMatchup] + and a + jp z, AnimateFailedMove + ld a, [wAttackMissed] + and a + jp nz, AnimateFailedMove + + push bc + call BattleRandom + ld b, a + ld hl, PresentPower + ld c, 0 +.next + ld a, [hli] + cp -1 + jr z, .heal_effect + cp b + jr nc, .got_power + inc c + inc hl + jr .next + +.got_power + ld a, c + ld [wBattleAnimParam], a + call AnimateCurrentMoveEitherSide + ld d, [hl] + pop bc + ret + +.heal_effect + pop bc + ld a, $3 ; heal animation + ld [wBattleAnimParam], a + call AnimateCurrentMove + call BattleCommand_SwitchTurn + ld hl, AICheckPlayerMaxHP + ldh a, [hBattleTurn] + and a + jr z, .got_hp_fn_pointer + ld hl, AICheckEnemyMaxHP +.got_hp_fn_pointer + ld a, BANK(AICheckPlayerMaxHP) ; aka BANK(AICheckEnemyMaxHP) + rst FarCall + jr c, .already_fully_healed + + ld hl, GetQuarterMaxHP + call CallBattleCore + call BattleCommand_SwitchTurn + ld hl, RestoreHP + call CallBattleCore + call BattleCommand_SwitchTurn + ld hl, RegainedHealthText + call StdBattleTextbox + call BattleCommand_SwitchTurn + call UpdateOpponentInParty + jr .do_animation + +.already_fully_healed + call BattleCommand_SwitchTurn + call _CheckBattleScene + jr nc, .do_animation + call AnimateFailedMove + ld hl, PresentFailedText + call StdBattleTextbox +.do_animation + jp EndMoveEffect + +INCLUDE "data/moves/present_power.asm" diff --git a/engine/battle/move_effects/protect.asm b/engine/battle/move_effects/protect.asm new file mode 100644 index 0000000..7e61ee7 --- /dev/null +++ b/engine/battle/move_effects/protect.asm @@ -0,0 +1,74 @@ +BattleCommand_Protect: + call ProtectChance + ret c + + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVarAddr + set SUBSTATUS_PROTECT, [hl] + + call AnimateCurrentMove + + ld hl, ProtectedItselfText + jp StdBattleTextbox + +ProtectChance: + ld de, wPlayerProtectCount + ldh a, [hBattleTurn] + and a + jr z, .got_count + ld de, wEnemyProtectCount +.got_count + + call CheckOpponentWentFirst + jr nz, .failed + +; Can't have a substitute. + + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVar + bit SUBSTATUS_SUBSTITUTE, a + jr nz, .failed + +; Halve the chance of a successful Protect for each consecutive use. + + ld b, $ff + ld a, [de] + ld c, a +.loop + ld a, c + and a + jr z, .done + dec c + + srl b + ld a, b + and a + jr nz, .loop + jr .failed +.done + +.rand + call BattleRandom + and a + jr z, .rand + + dec a + cp b + jr nc, .failed + +; Another consecutive Protect use. + + ld a, [de] + inc a + ld [de], a + + and a + ret + +.failed + xor a + ld [de], a + call AnimateFailedMove + call PrintButItFailed + scf + ret diff --git a/engine/battle/move_effects/psych_up.asm b/engine/battle/move_effects/psych_up.asm new file mode 100644 index 0000000..06006f9 --- /dev/null +++ b/engine/battle/move_effects/psych_up.asm @@ -0,0 +1,47 @@ +BattleCommand_PsychUp: + ld hl, wEnemyStatLevels + ld de, wPlayerStatLevels + ldh a, [hBattleTurn] + and a + jr z, .pointers_correct +; It's the enemy's turn, so swap the pointers. + push hl + ld h, d + ld l, e + pop de +.pointers_correct + push hl + ld b, NUM_LEVEL_STATS +; If any of the enemy's stats is modified from its base level, +; the move succeeds. Otherwise, it fails. +.loop + ld a, [hli] + cp BASE_STAT_LEVEL + jr nz, .break + dec b + jr nz, .loop + pop hl + call AnimateFailedMove + jp PrintButItFailed + +.break + pop hl + ld b, NUM_LEVEL_STATS +.loop2 + ld a, [hli] + ld [de], a + inc de + dec b + jr nz, .loop2 + ldh a, [hBattleTurn] + and a + jr nz, .calc_enemy_stats + call CalcPlayerStats + jr .merge + +.calc_enemy_stats + call CalcEnemyStats +.merge + call AnimateCurrentMove + ld hl, CopiedStatsText + jp StdBattleTextbox diff --git a/engine/battle/move_effects/pursuit.asm b/engine/battle/move_effects/pursuit.asm new file mode 100644 index 0000000..397c0a0 --- /dev/null +++ b/engine/battle/move_effects/pursuit.asm @@ -0,0 +1,23 @@ +BattleCommand_Pursuit: +; Double damage if the opponent is switching. + + ld hl, wEnemyIsSwitching + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wPlayerIsSwitching +.ok + ld a, [hl] + and a + ret z + + ld hl, wCurDamage + 1 + sla [hl] + dec hl + rl [hl] + ret nc + + ld a, $ff + ld [hli], a + ld [hl], a + ret diff --git a/engine/battle/move_effects/rage.asm b/engine/battle/move_effects/rage.asm new file mode 100644 index 0000000..fbe7ef1 --- /dev/null +++ b/engine/battle/move_effects/rage.asm @@ -0,0 +1,5 @@ +BattleCommand_Rage: + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVarAddr + set SUBSTATUS_RAGE, [hl] + ret diff --git a/engine/battle/move_effects/rain_dance.asm b/engine/battle/move_effects/rain_dance.asm new file mode 100644 index 0000000..1b31325 --- /dev/null +++ b/engine/battle/move_effects/rain_dance.asm @@ -0,0 +1,8 @@ +BattleCommand_StartRain: + ld a, WEATHER_RAIN + ld [wBattleWeather], a + ld a, 5 + ld [wWeatherCount], a + call AnimateCurrentMove + ld hl, DownpourText + jp StdBattleTextbox diff --git a/engine/battle/move_effects/rapid_spin.asm b/engine/battle/move_effects/rapid_spin.asm new file mode 100644 index 0000000..beac7af --- /dev/null +++ b/engine/battle/move_effects/rapid_spin.asm @@ -0,0 +1,34 @@ +BattleCommand_ClearHazards: + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVarAddr + bit SUBSTATUS_LEECH_SEED, [hl] + jr z, .not_leeched + res SUBSTATUS_LEECH_SEED, [hl] + ld hl, ShedLeechSeedText + call StdBattleTextbox +.not_leeched + + ld hl, wPlayerScreens + ld de, wPlayerWrapCount + ldh a, [hBattleTurn] + and a + jr z, .got_screens_wrap + ld hl, wEnemyScreens + ld de, wEnemyWrapCount +.got_screens_wrap + bit SCREENS_SPIKES, [hl] + jr z, .no_spikes + res SCREENS_SPIKES, [hl] + ld hl, BlewSpikesText + push de + call StdBattleTextbox + pop de +.no_spikes + + ld a, [de] + and a + ret z + xor a + ld [de], a + ld hl, ReleasedByText + jp StdBattleTextbox diff --git a/engine/battle/move_effects/return.asm b/engine/battle/move_effects/return.asm new file mode 100644 index 0000000..ca5f2f7 --- /dev/null +++ b/engine/battle/move_effects/return.asm @@ -0,0 +1,25 @@ +BattleCommand_HappinessPower: +; BUG: Return and Frustration deal no damage when the user's happiness is low or high, respectively (see docs/bugs_and_glitches.md) + push bc + ld hl, wBattleMonHappiness + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wEnemyMonHappiness +.ok + xor a + ldh [hMultiplicand + 0], a + ldh [hMultiplicand + 1], a + ld a, [hl] + ldh [hMultiplicand + 2], a + ld a, 10 + ldh [hMultiplier], a + call Multiply + ld a, 25 + ldh [hDivisor], a + ld b, 4 + call Divide + ldh a, [hQuotient + 3] + ld d, a + pop bc + ret diff --git a/engine/battle/move_effects/rollout.asm b/engine/battle/move_effects/rollout.asm new file mode 100644 index 0000000..1734d1b --- /dev/null +++ b/engine/battle/move_effects/rollout.asm @@ -0,0 +1,91 @@ +DEF MAX_ROLLOUT_COUNT EQU 5 + +BattleCommand_CheckCurl: + ld de, wPlayerRolloutCount + ldh a, [hBattleTurn] + and a + jr z, .ok + ld de, wEnemyRolloutCount +.ok + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVar + bit SUBSTATUS_ROLLOUT, a + jr z, .reset + + ld b, doturn_command + jp SkipToBattleCommand + +.reset + xor a + ld [de], a + ret + +BattleCommand_RolloutPower: + ld a, BATTLE_VARS_STATUS + call GetBattleVar + and SLP_MASK + ret nz + + ld hl, wPlayerRolloutCount + ldh a, [hBattleTurn] + and a + jr z, .got_rollout_count + ld hl, wEnemyRolloutCount + +.got_rollout_count + ld a, [hl] + and a + jr nz, .skip_set_rampage + ld a, 1 + ld [wSomeoneIsRampaging], a + +.skip_set_rampage + ld a, [wAttackMissed] + and a + jr z, .hit + + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVarAddr + res 6, [hl] + ret + +.hit + inc [hl] + ld a, [hl] + ld b, a + cp MAX_ROLLOUT_COUNT + jr c, .not_done_with_rollout + + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVarAddr + res SUBSTATUS_ROLLOUT, [hl] + jr .done_with_substatus_flag + +.not_done_with_rollout + ld a, BATTLE_VARS_SUBSTATUS1 + call GetBattleVarAddr + set SUBSTATUS_ROLLOUT, [hl] + +.done_with_substatus_flag + ld a, BATTLE_VARS_SUBSTATUS2 + call GetBattleVar + bit SUBSTATUS_CURLED, a + jr z, .not_curled + inc b +.not_curled +.loop + dec b + jr z, .done_damage + + ld hl, wCurDamage + 1 + sla [hl] + dec hl + rl [hl] + jr nc, .loop + + ld a, $ff + ld [hli], a + ld [hl], a + +.done_damage + ret diff --git a/engine/battle/move_effects/safeguard.asm b/engine/battle/move_effects/safeguard.asm new file mode 100644 index 0000000..0833f0a --- /dev/null +++ b/engine/battle/move_effects/safeguard.asm @@ -0,0 +1,21 @@ +BattleCommand_Safeguard: + ld hl, wPlayerScreens + ld de, wPlayerSafeguardCount + ldh a, [hBattleTurn] + and a + jr z, .ok + ld hl, wEnemyScreens + ld de, wEnemySafeguardCount +.ok + bit SCREENS_SAFEGUARD, [hl] + jr nz, .failed + set SCREENS_SAFEGUARD, [hl] + ld a, 5 + ld [de], a + call AnimateCurrentMove + ld hl, CoveredByVeilText + jp StdBattleTextbox + +.failed + call AnimateFailedMove + jp PrintButItFailed diff --git a/engine/battle/move_effects/sandstorm.asm b/engine/battle/move_effects/sandstorm.asm new file mode 100644 index 0000000..d052806 --- /dev/null +++ b/engine/battle/move_effects/sandstorm.asm @@ -0,0 +1,16 @@ +BattleCommand_StartSandstorm: + ld a, [wBattleWeather] + cp WEATHER_SANDSTORM + jr z, .failed + + ld a, WEATHER_SANDSTORM + ld [wBattleWeather], a + ld a, 5 + ld [wWeatherCount], a + call AnimateCurrentMove + ld hl, SandstormBrewedText + jp StdBattleTextbox + +.failed + call AnimateFailedMove + jp PrintButItFailed diff --git a/engine/battle/move_effects/selfdestruct.asm b/engine/battle/move_effects/selfdestruct.asm new file mode 100644 index 0000000..ef5e2e8 --- /dev/null +++ b/engine/battle/move_effects/selfdestruct.asm @@ -0,0 +1,29 @@ +BattleCommand_Selfdestruct: + farcall StubbedTrainerRankings_Selfdestruct + ld a, BATTLEANIM_PLAYER_DAMAGE + ld [wNumHits], a + ld c, 3 + call DelayFrames + ld a, BATTLE_VARS_STATUS + call GetBattleVarAddr + xor a + ld [hli], a + inc hl + ld [hli], a + ld [hl], a + ld a, $1 + ld [wBattleAnimParam], a + call BattleCommand_LowerSub + call LoadMoveAnim + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVarAddr + res SUBSTATUS_LEECH_SEED, [hl] + ld a, BATTLE_VARS_SUBSTATUS5_OPP + call GetBattleVarAddr + res SUBSTATUS_DESTINY_BOND, [hl] + call _CheckBattleScene + ret nc + farcall DrawPlayerHUD + farcall DrawEnemyHUD + call WaitBGMap + jp RefreshBattleHuds diff --git a/engine/battle/move_effects/sketch.asm b/engine/battle/move_effects/sketch.asm new file mode 100644 index 0000000..faab601 --- /dev/null +++ b/engine/battle/move_effects/sketch.asm @@ -0,0 +1,121 @@ +BattleCommand_Sketch: + call ClearLastMove +; Don't sketch during a link battle + ld a, [wLinkMode] + and a + jr z, .not_linked + call AnimateFailedMove + jp PrintNothingHappened + +.not_linked +; If the opponent has a substitute up, fail. + call CheckSubstituteOpp + jp nz, .fail +; If the opponent is transformed, fail. +; BUG: A Transformed Pokémon can use Sketch and learn otherwise unobtainable moves (see docs/bugs_and_glitches.md) + ld a, BATTLE_VARS_SUBSTATUS5_OPP + call GetBattleVarAddr + bit SUBSTATUS_TRANSFORMED, [hl] + jp nz, .fail +; Get the user's moveset in its party struct. +; This move replacement shall be permanent. +; Pointer will be in de. + ld a, MON_MOVES + call UserPartyAttr + ld d, h + ld e, l +; Get the battle move structs. + ld hl, wBattleMonMoves + ldh a, [hBattleTurn] + and a + jr z, .get_last_move + ld hl, wEnemyMonMoves +.get_last_move + ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP + call GetBattleVar + ld [wNamedObjectIndex], a + ld b, a +; Fail if move is invalid or is Struggle. + and a + jr z, .fail + push bc + ld bc, STRUGGLE + call CompareMove + pop bc + jr z, .fail +; Fail if user already knows that move + ld c, NUM_MOVES +.does_user_already_know_move + ld a, [hli] + cp b + jr z, .fail + dec c + jr nz, .does_user_already_know_move +; Find Sketch in the user's moveset. +; Pointer in hl, and index in c. + push hl + ld hl, SKETCH + call GetMoveIDFromIndex + pop hl + ld c, NUM_MOVES +.find_sketch + dec c + dec hl + cp [hl] + jr nz, .find_sketch +; The Sketched move is loaded to that slot. + ld a, b + ld [hl], a +; Copy the base PP from that move. + push bc + push hl + ld l, a + ld a, MOVE_PP + call GetMoveAttribute + pop hl + ld bc, wBattleMonPP - wBattleMonMoves + add hl, bc + ld [hl], a + pop bc + + ldh a, [hBattleTurn] + and a + jr z, .user_trainer + ld a, [wBattleMode] + dec a + jr nz, .user_trainer +; wildmon + ld a, [hl] + push bc + ld hl, wWildMonPP + ld b, 0 + add hl, bc + ld [hl], a + ld hl, wWildMonMoves + add hl, bc + pop bc + ld [hl], b + jr .done_copy + +.user_trainer + ld a, [hl] + push af + ld l, c + ld h, 0 + add hl, de + ld a, b + ld [hl], a + pop af + ld de, MON_PP - MON_MOVES + add hl, de + ld [hl], a +.done_copy + call GetMoveName + call AnimateCurrentMove + + ld hl, SketchedText + jp StdBattleTextbox + +.fail + call AnimateFailedMove + jp PrintDidntAffect diff --git a/engine/battle/move_effects/sleep_talk.asm b/engine/battle/move_effects/sleep_talk.asm new file mode 100644 index 0000000..091cee1 --- /dev/null +++ b/engine/battle/move_effects/sleep_talk.asm @@ -0,0 +1,141 @@ +BattleCommand_SleepTalk: + call ClearLastMove + ld a, [wAttackMissed] + and a + jr nz, .fail + ldh a, [hBattleTurn] + and a + ld hl, wBattleMonMoves + 1 + ld a, [wDisabledMove] + ld d, a + jr z, .got_moves + ld hl, wEnemyMonMoves + 1 + ld a, [wEnemyDisabledMove] + ld d, a +.got_moves + ld a, BATTLE_VARS_STATUS + call GetBattleVar + and SLP_MASK + jr z, .fail + ld a, [hl] + and a + jr z, .fail + call .safely_check_has_usable_move + jr c, .fail + dec hl +.sample_move + push hl + call BattleRandom + maskbits NUM_MOVES + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + pop hl + and a + jr z, .sample_move + ld e, a + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + cp e + jr z, .sample_move + ld a, e + cp d + jr z, .sample_move + call .check_two_turn_move + jr z, .sample_move + ld a, BATTLE_VARS_MOVE + call GetBattleVarAddr + ld a, e + ld [hl], a + call CheckUserIsCharging + jr nz, .charging + ld a, [wBattleAnimParam] + push af + call BattleCommand_LowerSub + pop af + ld [wBattleAnimParam], a +.charging + call LoadMoveAnim + call UpdateMoveData + jp ResetTurn + +.fail + call AnimateFailedMove + jp TryPrintButItFailed + +.safely_check_has_usable_move + push hl + push de + push bc + call .check_has_usable_move + pop bc + pop de + pop hl + ret + +.check_has_usable_move + ldh a, [hBattleTurn] + and a + ld a, [wDisabledMove] + jr z, .got_move_2 + + ld a, [wEnemyDisabledMove] +.got_move_2 + ld b, a + ld a, BATTLE_VARS_MOVE + call GetBattleVar + ld c, a + dec hl + ld d, NUM_MOVES +.loop2 + ld a, [hl] + and a + jr z, .carry + + cp c + jr z, .nope + cp b + jr z, .nope + + call .check_two_turn_move + jr nz, .no_carry + +.nope + inc hl + dec d + jr nz, .loop2 + +.carry + scf + ret + +.no_carry + and a + ret + +.check_two_turn_move + push hl + push de + push bc + + ld b, a + callfar GetMoveEffect + ld a, b + + pop bc + pop de + pop hl + + cp EFFECT_SKULL_BASH + ret z + cp EFFECT_RAZOR_WIND + ret z + cp EFFECT_SKY_ATTACK + ret z + cp EFFECT_SOLARBEAM + ret z + cp EFFECT_FLY + ret z + cp EFFECT_BIDE + ret diff --git a/engine/battle/move_effects/snore.asm b/engine/battle/move_effects/snore.asm new file mode 100644 index 0000000..a8b14f2 --- /dev/null +++ b/engine/battle/move_effects/snore.asm @@ -0,0 +1,10 @@ +BattleCommand_Snore: + ld a, BATTLE_VARS_STATUS + call GetBattleVar + and SLP_MASK + ret nz + call ResetDamage + ld a, $1 + ld [wAttackMissed], a + call FailMove + jp EndMoveEffect diff --git a/engine/battle/move_effects/spikes.asm b/engine/battle/move_effects/spikes.asm new file mode 100644 index 0000000..24683cc --- /dev/null +++ b/engine/battle/move_effects/spikes.asm @@ -0,0 +1,24 @@ +BattleCommand_Spikes: + ld hl, wEnemyScreens + ldh a, [hBattleTurn] + and a + jr z, .got_screens + ld hl, wPlayerScreens +.got_screens + +; Fails if spikes are already down! + + bit SCREENS_SPIKES, [hl] + jr nz, .failed + +; Nothing else stops it from working. + + set SCREENS_SPIKES, [hl] + + call AnimateCurrentMove + + ld hl, SpikesText + jp StdBattleTextbox + +.failed + jp FailMove diff --git a/engine/battle/move_effects/spite.asm b/engine/battle/move_effects/spite.asm new file mode 100644 index 0000000..61b2961 --- /dev/null +++ b/engine/battle/move_effects/spite.asm @@ -0,0 +1,87 @@ +BattleCommand_Spite: + ld a, [wAttackMissed] + and a + jp nz, .failed + ld bc, PARTYMON_STRUCT_LENGTH ; unused + ld hl, wEnemyMonMoves + ldh a, [hBattleTurn] + and a + jr z, .got_moves + ld hl, wBattleMonMoves +.got_moves + ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP + call GetBattleVar + and a + jr z, .failed + ld b, a + push bc + ld bc, STRUGGLE + call CompareMove + pop bc + jr z, .failed + ld c, -1 +.loop + inc c + ld a, [hli] + cp b + jr nz, .loop + ld [wNamedObjectIndex], a + dec hl + ld b, 0 + push bc + ld c, wBattleMonPP - wBattleMonMoves + add hl, bc + pop bc + ld a, [hl] + and PP_MASK + jr z, .failed + push bc + call GetMoveName + ; lose 2-5 PP + call BattleRandom + and %11 + inc a + inc a + ld b, a + ld a, [hl] + and PP_MASK + cp b + jr nc, .deplete_pp + ld b, a +.deplete_pp + ld a, [hl] + sub b + ld [hl], a + push af + ld a, MON_PP + call OpponentPartyAttr + ld d, b + pop af + pop bc + add hl, bc + ld e, a + ld a, BATTLE_VARS_SUBSTATUS5_OPP + call GetBattleVar + bit SUBSTATUS_TRANSFORMED, a + jr nz, .transformed + ldh a, [hBattleTurn] + and a + jr nz, .not_wildmon + ld a, [wBattleMode] + dec a + jr nz, .not_wildmon + ld hl, wWildMonPP + add hl, bc +.not_wildmon + ld [hl], e +.transformed + push de + call AnimateCurrentMove + pop de + ld a, d + ld [wTextDecimalByte], a + ld hl, SpiteEffectText + jp StdBattleTextbox + +.failed + jp PrintDidntAffect2 diff --git a/engine/battle/move_effects/splash.asm b/engine/battle/move_effects/splash.asm new file mode 100644 index 0000000..493ea8c --- /dev/null +++ b/engine/battle/move_effects/splash.asm @@ -0,0 +1,4 @@ +BattleCommand_Splash: + call AnimateCurrentMove + farcall StubbedTrainerRankings_Splash + jp PrintNothingHappened diff --git a/engine/battle/move_effects/substitute.asm b/engine/battle/move_effects/substitute.asm new file mode 100644 index 0000000..5e26fc6 --- /dev/null +++ b/engine/battle/move_effects/substitute.asm @@ -0,0 +1,86 @@ +BattleCommand_Substitute: + call BattleCommand_MoveDelay + ld hl, wBattleMonMaxHP + ld de, wPlayerSubstituteHP + ldh a, [hBattleTurn] + and a + jr z, .got_hp + ld hl, wEnemyMonMaxHP + ld de, wEnemySubstituteHP +.got_hp + + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVar + bit SUBSTATUS_SUBSTITUTE, a + jr nz, .already_has_sub + + ld a, [hli] + ld b, [hl] + srl a + rr b + srl a + rr b + dec hl + dec hl + ld a, b + ld [de], a + ld a, [hld] + sub b + ld e, a + ld a, [hl] + sbc 0 + ld d, a + jr c, .too_weak_to_sub + ld a, d + or e + jr z, .too_weak_to_sub + ld [hl], d + inc hl + ld [hl], e + + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVarAddr + set SUBSTATUS_SUBSTITUTE, [hl] + + ld hl, wPlayerWrapCount + ld de, wPlayerTrappingMove + ldh a, [hBattleTurn] + and a + jr z, .player + ld hl, wEnemyWrapCount + ld de, wEnemyTrappingMove +.player + + xor a + ld [hl], a + ld [de], a + call _CheckBattleScene + jr c, .no_anim + + xor a + ld [wNumHits], a + ld [wBattleAnimParam], a + ld hl, SUBSTITUTE + call GetMoveIDFromIndex + call LoadAnim + jr .finish + +.no_anim + call BattleCommand_RaiseSubNoAnim +.finish + ld hl, MadeSubstituteText + call StdBattleTextbox + jp RefreshBattleHuds + +.already_has_sub + call CheckUserIsCharging + call nz, BattleCommand_RaiseSub + ld hl, HasSubstituteText + jr .jp_stdbattletextbox + +.too_weak_to_sub + call CheckUserIsCharging + call nz, BattleCommand_RaiseSub + ld hl, TooWeakSubText +.jp_stdbattletextbox + jp StdBattleTextbox diff --git a/engine/battle/move_effects/sunny_day.asm b/engine/battle/move_effects/sunny_day.asm new file mode 100644 index 0000000..c45c86f --- /dev/null +++ b/engine/battle/move_effects/sunny_day.asm @@ -0,0 +1,8 @@ +BattleCommand_StartSun: + ld a, WEATHER_SUN + ld [wBattleWeather], a + ld a, 5 + ld [wWeatherCount], a + call AnimateCurrentMove + ld hl, SunGotBrightText + jp StdBattleTextbox diff --git a/engine/battle/move_effects/teleport.asm b/engine/battle/move_effects/teleport.asm new file mode 100644 index 0000000..650ef59 --- /dev/null +++ b/engine/battle/move_effects/teleport.asm @@ -0,0 +1,94 @@ +BattleCommand_Teleport: + ld a, [wBattleType] + cp BATTLETYPE_SHINY + jr z, .failed + cp BATTLETYPE_TRAP + jr z, .failed + cp BATTLETYPE_CELEBI + jr z, .failed + cp BATTLETYPE_SUICUNE + jr z, .failed + + ld a, BATTLE_VARS_SUBSTATUS5_OPP + call GetBattleVar + bit SUBSTATUS_CANT_RUN, a + jr nz, .failed + ldh a, [hBattleTurn] + and a + jr nz, .enemy_turn + + ; Can't teleport from a trainer battle + ld a, [wBattleMode] + dec a + jr nz, .failed + ; b = player level + ld a, [wCurPartyLevel] + ld b, a + ; If player level >= enemy level, Teleport will succeed + ld a, [wBattleMonLevel] + cp b + jr nc, .run_away + ; c = player level + enemy level + 1 + add b + ld c, a + inc c + ; Generate a number less than c +.loop_player + call BattleRandom + cp c + jr nc, .loop_player + ; b = enemy level / 4 + srl b + srl b + ; If the random number >= enemy level / 4, Teleport will succeed + cp b + jr nc, .run_away + +.failed + call AnimateFailedMove + jp PrintButItFailed + +.enemy_turn + ; Can't teleport from a trainer battle + ld a, [wBattleMode] + dec a + jr nz, .failed + ; b = enemy level + ld a, [wBattleMonLevel] + ld b, a + ; If enemy level >= player level, Teleport will succeed + ld a, [wCurPartyLevel] + cp b + jr nc, .run_away + ; c = enemy level + player level + 1 + add b + ld c, a + inc c + ; Generate a number less than c +.loop_enemy +; BUG: Wild Pokémon can always Teleport regardless of level difference (see docs/bugs_and_glitches.md) + call BattleRandom + cp c + jr nc, .loop_enemy + ; b = player level / 4 + srl b + srl b + cp b + jr nc, .run_away + +.run_away + call UpdateBattleMonInParty + xor a + ld [wNumHits], a + inc a + ld [wForcedSwitch], a + ld [wBattleAnimParam], a + call SetBattleDraw + call BattleCommand_LowerSub + call LoadMoveAnim + ld c, 20 + call DelayFrames + call SetBattleDraw + + ld hl, FledFromBattleText + jp StdBattleTextbox diff --git a/engine/battle/move_effects/thief.asm b/engine/battle/move_effects/thief.asm new file mode 100644 index 0000000..bc31ca3 --- /dev/null +++ b/engine/battle/move_effects/thief.asm @@ -0,0 +1,110 @@ +BattleCommand_Thief: + ldh a, [hBattleTurn] + and a + jr nz, .enemy + +; The player needs to be able to steal an item. + + call .playeritem + ld a, [hl] + and a + ret nz + +; The enemy needs to have an item to steal. + + call .enemyitem + ld a, [hl] + and a + ret z + +; Can't steal mail. + + ld [wNamedObjectIndex], a + ld d, a + farcall ItemIsMail + ret c + + ld a, [wEffectFailed] + and a + ret nz + + ld a, [wLinkMode] + and a + jr z, .stealenemyitem + + ld a, [wBattleMode] + dec a + ret z + +.stealenemyitem + call .enemyitem + xor a + ld [hl], a + ld [de], a + + call .playeritem + ld a, [wNamedObjectIndex] + ld [hl], a + ld [de], a + jr .stole + +.enemy + +; The enemy can't already have an item. + + call .enemyitem + ld a, [hl] + and a + ret nz + +; The player must have an item to steal. + + call .playeritem + ld a, [hl] + and a + ret z + +; Can't steal mail! + + ld [wNamedObjectIndex], a + ld d, a + farcall ItemIsMail + ret c + + ld a, [wEffectFailed] + and a + ret nz + +; If the enemy steals your item, +; it's gone for good if you don't get it back. + + call .playeritem + xor a + ld [hl], a + ld [de], a + + call .enemyitem + ld a, [wNamedObjectIndex] + ld [hl], a + ld [de], a + +.stole + call GetItemName + ld hl, StoleText + jp StdBattleTextbox + +.playeritem + ld a, MON_ITEM + call BattlePartyAttr + ld d, h + ld e, l + ld hl, wBattleMonItem + ret + +.enemyitem + ld a, MON_ITEM + call OTPartyAttr + ld d, h + ld e, l + ld hl, wEnemyMonItem + ret diff --git a/engine/battle/move_effects/thunder.asm b/engine/battle/move_effects/thunder.asm new file mode 100644 index 0000000..3e9b628 --- /dev/null +++ b/engine/battle/move_effects/thunder.asm @@ -0,0 +1,16 @@ +BattleCommand_ThunderAccuracy: + ld a, BATTLE_VARS_MOVE_TYPE + call GetBattleVarAddr + inc hl + ld a, [wBattleWeather] + cp WEATHER_RAIN + jr z, .rain + cp WEATHER_SUN + ret nz + ld [hl], 50 percent + 1 + ret + +.rain + ; Redundant with CheckHit guranteeing hit + ld [hl], 100 percent + ret diff --git a/engine/battle/move_effects/transform.asm b/engine/battle/move_effects/transform.asm new file mode 100644 index 0000000..f7a24fb --- /dev/null +++ b/engine/battle/move_effects/transform.asm @@ -0,0 +1,156 @@ +BattleCommand_Transform: + call ClearLastMove + ld a, BATTLE_VARS_SUBSTATUS5_OPP + call GetBattleVarAddr + bit SUBSTATUS_TRANSFORMED, [hl] + jp nz, BattleEffect_ButItFailed + call CheckHiddenOpponent + jp nz, BattleEffect_ButItFailed + xor a + ld [wNumHits], a + ld a, $1 + ld [wBattleAnimParam], a + ld a, BATTLE_VARS_SUBSTATUS4 + call GetBattleVarAddr + bit SUBSTATUS_SUBSTITUTE, [hl] + push af + jr z, .mimic_substitute + call CheckUserIsCharging + jr nz, .mimic_substitute + ld hl, SUBSTITUTE + call GetMoveIDFromIndex + call LoadAnim +.mimic_substitute + ld a, BATTLE_VARS_SUBSTATUS5 + call GetBattleVarAddr + set SUBSTATUS_TRANSFORMED, [hl] + call ResetActorDisable + ld hl, wBattleMonSpecies + ld de, wEnemyMonSpecies + ldh a, [hBattleTurn] + and a + jr nz, .got_mon_species + ld hl, wEnemyMonSpecies + ld de, wBattleMonSpecies + xor a + ld [wCurMoveNum], a +.got_mon_species + push hl + ld a, [hli] + ld [de], a + inc hl + inc de + inc de + ld bc, NUM_MOVES + call CopyBytes + ldh a, [hBattleTurn] + and a + jr z, .mimic_enemy_backup + ld a, [de] + ld [wEnemyBackupDVs], a + inc de + ld a, [de] + ld [wEnemyBackupDVs + 1], a + dec de +.mimic_enemy_backup +; copy DVs + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de +; move pointer to stats + ld bc, wBattleMonStats - wBattleMonPP + add hl, bc + push hl + ld h, d + ld l, e + add hl, bc + ld d, h + ld e, l + pop hl + ld bc, wBattleMonStructEnd - wBattleMonStats + call CopyBytes +; init the power points + ld bc, wBattleMonMoves - wBattleMonStructEnd + add hl, bc + push de + ld d, h + ld e, l + pop hl + ld bc, wBattleMonPP - wBattleMonStructEnd + add hl, bc + ld b, NUM_MOVES +.pp_loop + ld a, [de] + inc de + and a + jr z, .done_move + push bc + ld bc, SKETCH + call CompareMove + pop bc + ld a, 1 + jr z, .done_move + ld a, 5 +.done_move + ld [hli], a + dec b + jr nz, .pp_loop + pop hl + ld a, [hl] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wEnemyStats + ld de, wPlayerStats + ld bc, 2 * 5 + call BattleSideCopy + ld hl, wEnemyStatLevels + ld de, wPlayerStatLevels + ld bc, 8 + call BattleSideCopy + call _CheckBattleScene + jr c, .mimic_anims + ldh a, [hBattleTurn] + and a + ld a, [wPlayerMinimized] + jr z, .got_byte + ld a, [wEnemyMinimized] +.got_byte + and a + jr nz, .mimic_anims + call LoadMoveAnim + jr .after_anim + +.mimic_anims + call BattleCommand_MoveDelay + call BattleCommand_RaiseSubNoAnim +.after_anim + xor a + ld [wNumHits], a + ld a, $2 + ld [wBattleAnimParam], a + pop af + jr z, .no_substitute + ld hl, SUBSTITUTE + call GetMoveIDFromIndex + call LoadAnim +.no_substitute + ld hl, TransformedText + jp StdBattleTextbox + +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. + ldh a, [hBattleTurn] + and a + jr z, .copy + +; Swap hl and de + push hl + ld h, d + ld l, e + pop de +.copy + jp CopyBytes diff --git a/engine/battle/move_effects/triple_kick.asm b/engine/battle/move_effects/triple_kick.asm new file mode 100644 index 0000000..b9e8d8b --- /dev/null +++ b/engine/battle/move_effects/triple_kick.asm @@ -0,0 +1,30 @@ +BattleCommand_TripleKick: + ld a, [wBattleAnimParam] + ld b, a + inc b + ld hl, wCurDamage + 1 + ld a, [hld] + ld e, a + ld a, [hli] + ld d, a +.next_kick + dec b + ret z + ld a, [hl] + add e + ld [hld], a + ld a, [hl] + adc d + ld [hli], a + +; No overflow. + jr nc, .next_kick + ld a, $ff + ld [hld], a + ld [hl], a + ret + +BattleCommand_KickCounter: + ld hl, wBattleAnimParam + inc [hl] + ret diff --git a/engine/battle/read_trainer_attributes.asm b/engine/battle/read_trainer_attributes.asm new file mode 100644 index 0000000..85f01f0 --- /dev/null +++ b/engine/battle/read_trainer_attributes.asm @@ -0,0 +1,66 @@ +GetTrainerClassName: + ld hl, wRivalName + ld a, c + cp RIVAL1 + jr z, .rival + + ld [wCurSpecies], a + ld a, TRAINER_NAME + ld [wNamedObjectType], a + call GetName + ld de, wStringBuffer1 + ret + +.rival + ld de, wStringBuffer1 + push de + ld bc, NAME_LENGTH + call CopyBytes + pop de + ret + +GetOTName: + ld hl, wOTPlayerName + ld a, [wLinkMode] + and a + jr nz, .ok + + ld hl, wRivalName + ld a, c + cp RIVAL1 + jr z, .ok + + ld [wCurSpecies], a + ld a, TRAINER_NAME + ld [wNamedObjectType], a + call GetName + ld hl, wStringBuffer1 + +.ok + ld bc, TRAINER_CLASS_NAME_LENGTH + ld de, wOTClassName + push de + call CopyBytes + pop de + ret + +GetTrainerAttributes: + ld a, [wTrainerClass] + ld c, a + call GetOTName + ld a, [wTrainerClass] + dec a + ld hl, TrainerClassAttributes + TRNATTR_ITEM1 + ld bc, NUM_TRAINER_ATTRIBUTES + call AddNTimes + ld de, wEnemyTrainerItem1 + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + ld a, [hl] + ld [wEnemyTrainerBaseReward], a + ret + +INCLUDE "data/trainers/attributes.asm" diff --git a/engine/battle/read_trainer_dvs.asm b/engine/battle/read_trainer_dvs.asm new file mode 100644 index 0000000..d35c9ea --- /dev/null +++ b/engine/battle/read_trainer_dvs.asm @@ -0,0 +1,21 @@ +GetTrainerDVs: +; Return the DVs of wOtherTrainerClass in bc + + push hl + ld a, [wOtherTrainerClass] + dec a + ld c, a + ld b, 0 + + ld hl, TrainerClassDVs + add hl, bc + add hl, bc + + ld a, [hli] + ld b, a + ld c, [hl] + + pop hl + ret + +INCLUDE "data/trainers/dvs.asm" diff --git a/engine/battle/read_trainer_party.asm b/engine/battle/read_trainer_party.asm new file mode 100644 index 0000000..2016b16 --- /dev/null +++ b/engine/battle/read_trainer_party.asm @@ -0,0 +1,298 @@ +ReadTrainerParty: + ld a, [wInBattleTowerBattle] + bit 0, a + ret nz + + ld a, [wLinkMode] + and a + ret nz + + ld hl, wOTPartyCount + xor a + ld [hli], a + dec a + ld [hl], a + + ld hl, wOTPartyMons + ld bc, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH + xor a + call ByteFill + + ld a, [wOtherTrainerClass] + cp CAL + jr nz, .not_cal2 + ld a, [wOtherTrainerID] + cp CAL2 + jr z, .cal2 + ld a, [wOtherTrainerClass] +.not_cal2 + + dec a + ld c, a + ld b, 0 + ld hl, TrainerGroups + add hl, bc + add hl, bc + add hl, bc + ld a, [hli] + ld [wTrainerGroupBank], a + ld a, [hli] + ld h, [hl] + ld l, a + + ld a, [wOtherTrainerID] + ld b, a +.skip_trainer + dec b + jr z, .got_trainer +.loop + ld a, [wTrainerGroupBank] + call GetFarByte + add a, l + ld l, a + jr nc, .skip_trainer + inc h + jr .skip_trainer +.got_trainer + inc hl + +.skip_name + call GetNextTrainerDataByte + cp "@" + jr nz, .skip_name + + call GetNextTrainerDataByte + ld [wOtherTrainerType], a + ld d, h + ld e, l + call ReadTrainerPartyPieces + +.done + jp ComputeTrainerReward + +.cal2 + ld a, BANK(sMysteryGiftTrainer) + call OpenSRAM + ld a, TRAINERTYPE_MOVES + ld [wOtherTrainerType], a + ld de, sMysteryGiftTrainer + call ReadTrainerPartyPieces + call CloseSRAM + jr .done + +ReadTrainerPartyPieces: + ld h, d + ld l, e + +.loop + call GetNextTrainerDataByte + cp $ff + ret z + + ld [wCurPartyLevel], a + call GetNextTrainerDataByte + push hl + push af + call GetNextTrainerDataByte + ld h, a + pop af + ld l, a + call GetPokemonIDFromIndex + ld [wCurPartySpecies], a + + ld a, OTPARTYMON + ld [wMonType], a + predef TryAddMonToParty + pop hl + inc hl ;because hl was pushed before the last call to GetNextTrainerDataByte + + ld a, [wOtherTrainerType] + and TRAINERTYPE_ITEM + jr z, .no_item + push hl + ld a, [wOTPartyCount] + dec a + ld hl, wOTPartyMon1Item + call GetPartyLocation + ld d, h + ld e, l + pop hl + call GetNextTrainerDataByte + ld [de], a +.no_item + + ld a, [wOtherTrainerType] + rra ; TRAINERTYPE_MOVES_F == 0 + jr nc, .no_moves + push hl + ld a, [wOTPartyCount] + dec a + ld hl, wOTPartyMon1Moves + call GetPartyLocation + ld d, h + ld e, l + pop hl + + ld b, NUM_MOVES +.copy_moves + call GetNextTrainerDataByte + push hl + push af + call GetNextTrainerDataByte + ld h, a + pop af + ld l, a + call GetMoveIDFromIndex + pop hl + inc hl + ld [de], a + inc de + dec b + jr nz, .copy_moves + + push hl + + ld a, [wOTPartyCount] + dec a + ld hl, wOTPartyMon1 + call GetPartyLocation + ld d, h + ld e, l + ld hl, MON_PP + add hl, de + + push hl + ld hl, MON_MOVES + add hl, de + pop de + + ld b, NUM_MOVES +.copy_pp + ld a, [hli] + and a + jr z, .copied_pp + + push hl + ld l, a + ld a, MOVE_PP + call GetMoveAttribute + pop hl + + ld [de], a + inc de + dec b + jr nz, .copy_pp +.copied_pp + + pop hl +.no_moves + + jp .loop + +ComputeTrainerReward: + ld hl, hProduct + xor a + ld [hli], a + ld [hli], a ; hMultiplicand + 0 + ld [hli], a ; hMultiplicand + 1 + ld a, [wEnemyTrainerBaseReward] + ld [hli], a ; hMultiplicand + 2 + ld a, [wCurPartyLevel] + ld [hl], a ; hMultiplier + call Multiply + ld hl, wBattleReward + xor a + ld [hli], a + ldh a, [hProduct + 2] + ld [hli], a + ldh a, [hProduct + 3] + ld [hl], a + ret + +Battle_GetTrainerName:: + ld a, [wInBattleTowerBattle] + bit 0, a + ld hl, wOTPlayerName + ld a, BANK(@) + ld [wTrainerGroupBank], a + jp nz, CopyTrainerName + + ld a, [wOtherTrainerID] + ld b, a + ld a, [wOtherTrainerClass] + ld c, a + ; fallthrough + +GetTrainerName:: + ld a, c + cp CAL + jr nz, .not_cal2 + + ld a, BANK(sMysteryGiftTrainerHouseFlag) + call OpenSRAM + ld a, [sMysteryGiftTrainerHouseFlag] + and a + call CloseSRAM + jr z, .not_cal2 + + ld a, BANK(sMysteryGiftPartnerName) + call OpenSRAM + ld hl, sMysteryGiftPartnerName + call CopyTrainerName + jp CloseSRAM + +.not_cal2 + dec c + push bc + ld b, 0 + ld hl, TrainerGroups + add hl, bc + add hl, bc + add hl, bc + ld a, [hli] + ld [wTrainerGroupBank], a + ld a, [hli] + ld h, [hl] + ld l, a + pop bc + +.loop + dec b + jr z, .done + + ld a, [wTrainerGroupBank] + call GetFarByte + add a, l + ld l, a + jr nc, .loop + inc h + jr .loop + +.done + inc hl + ; fallthrough + +CopyTrainerName: + ld de, wStringBuffer1 + push de + ld bc, NAME_LENGTH + ld a, [wTrainerGroupBank] + call FarCopyBytes + pop de + ret + +IncompleteCopyNameFunction: ; unreferenced +; Copy of CopyTrainerName but without "call CopyBytes" + ld de, wStringBuffer1 + push de + ld bc, NAME_LENGTH + pop de + ret + +GetNextTrainerDataByte: + ld a, [wTrainerGroupBank] + call GetFarByte + inc hl + ret + +INCLUDE "data/trainers/party_pointers.asm" diff --git a/engine/battle/returntobattle_useball.asm b/engine/battle/returntobattle_useball.asm new file mode 100644 index 0000000..fd138ae --- /dev/null +++ b/engine/battle/returntobattle_useball.asm @@ -0,0 +1,19 @@ +_ReturnToBattle_UseBall: + call ClearBGPalettes + call ClearTilemap + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL + jr z, .gettutorialbackpic + farcall GetBattleMonBackpic + jr .continue + +.gettutorialbackpic + farcall GetTrainerBackpic +.continue + farcall GetEnemyMonFrontpic + farcall _LoadBattleFontsHPBar + call GetMemSGBLayout + call CloseWindow + call LoadStandardMenuHeader + call WaitBGMap + jp SetPalettes diff --git a/engine/battle/sliding_intro.asm b/engine/battle/sliding_intro.asm new file mode 100644 index 0000000..5ce8c66 --- /dev/null +++ b/engine/battle/sliding_intro.asm @@ -0,0 +1,98 @@ +BattleIntroSlidingPics: + ldh a, [rSVBK] + push af + ld a, BANK(wLYOverrides) + ldh [rSVBK], a + call .subfunction1 + ld a, LOW(rSCX) + ldh [hLCDCPointer], a + call .subfunction2 + xor a + ldh [hLCDCPointer], a + pop af + ldh [rSVBK], a + ret + +.subfunction1 + call .subfunction4 + ld a, $90 + ldh [hSCX], a + ld a, %11100100 + call DmgToCgbBGPals + lb de, %11100100, %11100100 + call DmgToCgbObjPals + ret + +.subfunction2 + ld d, $90 + ld e, $72 + ld a, $48 + inc a +.loop1 + push af +.loop2 + ldh a, [rLY] + cp $60 + jr c, .loop2 + ld a, d + ldh [hSCX], a + call .subfunction5 + inc e + inc e + dec d + dec d + pop af + push af + cp $1 + jr z, .skip1 + push de + call .subfunction3 + pop de + +.skip1 + call DelayFrame + pop af + dec a + jr nz, .loop1 + ret + +.subfunction3 + ld hl, wShadowOAMSprite00XCoord + ld c, $12 ; 18 + ld de, SPRITEOAMSTRUCT_LENGTH +.loop3 + dec [hl] + dec [hl] + add hl, de + dec c + jr nz, .loop3 + ret + +.subfunction4 + ld hl, wLYOverrides + ld a, $90 + ld bc, SCREEN_HEIGHT_PX + call ByteFill + ret + +.subfunction5 + ld hl, wLYOverrides + ld a, d + ld c, $3e ; 62 +.loop4 + ld [hli], a + dec c + jr nz, .loop4 + ld a, e + ld c, $22 ; 34 +.loop5 + ld [hli], a + dec c + jr nz, .loop5 + xor a + ld c, $30 ; 48 +.loop6 + ld [hli], a + dec c + jr nz, .loop6 + ret diff --git a/engine/battle/start_battle.asm b/engine/battle/start_battle.asm new file mode 100644 index 0000000..ff7f07a --- /dev/null +++ b/engine/battle/start_battle.asm @@ -0,0 +1,199 @@ +ShowLinkBattleParticipants: +; If we're not in a communications room, +; we don't need to be here. + ld a, [wLinkMode] + and a + ret z + + farcall _ShowLinkBattleParticipants + ld c, 150 + call DelayFrames + call ClearTilemap + call ClearSprites + ret + +FindFirstAliveMonAndStartBattle: + xor a + ldh [hMapAnims], a + call DelayFrame + ld b, PARTY_LENGTH + ld hl, wPartyMon1HP + ld de, PARTYMON_STRUCT_LENGTH - 1 + +.loop + ld a, [hli] + or [hl] + jr nz, .okay + add hl, de + dec b + jr nz, .loop + +.okay + ld de, MON_LEVEL - MON_HP + add hl, de + ld a, [hl] + ld [wBattleMonLevel], a + predef DoBattleTransition + farcall _LoadBattleFontsHPBar + ld a, 1 + ldh [hBGMapMode], a + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + ldh [hWY], a + ldh [rWY], a + ldh [hMapAnims], a + ret + +PlayBattleMusic: + push hl + push de + push bc + + xor a + ld [wMusicFade], a + ld de, MUSIC_NONE + call PlayMusic + call DelayFrame + call MaxVolume + + ld a, [wBattleType] + cp BATTLETYPE_SUICUNE + ld de, MUSIC_SUICUNE_BATTLE + jp z, .done + cp BATTLETYPE_ROAMING + jp z, .done + + ; Are we fighting a trainer? + ld a, [wOtherTrainerClass] + and a + jr nz, .trainermusic + + farcall RegionCheck + ld a, e + and a + jr nz, .kantowild + + ld de, MUSIC_JOHTO_WILD_BATTLE + ld a, [wTimeOfDay] + cp NITE_F + jr nz, .done + ld de, MUSIC_JOHTO_WILD_BATTLE_NIGHT + jr .done + +.kantowild + ld de, MUSIC_KANTO_WILD_BATTLE + jr .done + +.trainermusic + ld de, MUSIC_CHAMPION_BATTLE + cp CHAMPION + jr z, .done + cp RED + jr z, .done + +; BUG: Team Rocket battle music is not used for Executives or Scientists (see docs/bugs_and_glitches.md) + ld de, MUSIC_ROCKET_BATTLE + cp GRUNTM + jr z, .done + cp GRUNTF + jr z, .done + + ld de, MUSIC_KANTO_GYM_LEADER_BATTLE + farcall IsKantoGymLeader + jr c, .done + + ; IsGymLeader also counts CHAMPION, RED, and the Kanto gym leaders + ; but they have been taken care of before this + ld de, MUSIC_JOHTO_GYM_LEADER_BATTLE + farcall IsGymLeader + jr c, .done + + ld de, MUSIC_RIVAL_BATTLE + ld a, [wOtherTrainerClass] + cp RIVAL1 + jr z, .done + cp RIVAL2 + jr nz, .othertrainer + + ld a, [wOtherTrainerID] + cp RIVAL2_2_CHIKORITA ; Rival in Indigo Plateau + jr c, .done + ld de, MUSIC_CHAMPION_BATTLE + jr .done + +.othertrainer + ld a, [wLinkMode] + and a + jr nz, .johtotrainer + + farcall RegionCheck + ld a, e + and a + jr nz, .kantotrainer + +.johtotrainer + ld de, MUSIC_JOHTO_TRAINER_BATTLE + jr .done + +.kantotrainer + ld de, MUSIC_KANTO_TRAINER_BATTLE + +.done + call PlayMusic + + pop bc + pop de + pop hl + ret + +ClearBattleRAM: + xor a + ld [wBattlePlayerAction], a + ld [wBattleResult], a + + ld hl, wPartyMenuCursor + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + + ld [wMenuScrollPosition], a + ld [wCriticalHit], a + ld [wBattleMonSpecies], a + ld [wBattleParticipantsNotFainted], a + ld [wCurBattleMon], a + ld [wForcedSwitch], a + ld [wTimeOfDayPal], a + ld [wPlayerTurnsTaken], a + ld [wEnemyTurnsTaken], a + ld [wEvolvableFlags], a + + ld hl, wPlayerHPPal + ld [hli], a + ld [hl], a + + ld hl, wBattleMonDVs + ld [hli], a + ld [hl], a + + ld hl, wEnemyMonDVs + ld [hli], a + ld [hl], a + +; Clear the entire BattleMons area + ld hl, wBattle + ld bc, wBattleEnd - wBattle + xor a + call ByteFill + + callfar ResetEnemyStatLevels + + call ClearWindowData + + ld hl, hBGMapAddress + xor a ; LOW(vBGMap0) + ld [hli], a + ld [hl], HIGH(vBGMap0) + ret diff --git a/engine/battle/trainer_huds.asm b/engine/battle/trainer_huds.asm new file mode 100644 index 0000000..313d350 --- /dev/null +++ b/engine/battle/trainer_huds.asm @@ -0,0 +1,257 @@ +BattleStart_TrainerHuds: + ld a, $e4 + ldh [rOBP0], a + call LoadBallIconGFX + call ShowPlayerMonsRemaining + ld a, [wBattleMode] + dec a + ret z + jp ShowOTTrainerMonsRemaining + +EnemySwitch_TrainerHud: + ld a, $e4 + ldh [rOBP0], a + call LoadBallIconGFX + jp ShowOTTrainerMonsRemaining + +ShowPlayerMonsRemaining: + call DrawPlayerPartyIconHUDBorder + ld hl, wPartyMon1HP + ld de, wPartyCount + call StageBallTilesData + ; ldpixel wPlaceBallsX, 12, 12 + ld a, 12 * 8 + ld hl, wPlaceBallsX + ld [hli], a + ld [hl], a + ld a, 8 + ld [wPlaceBallsDirection], a + ld hl, wShadowOAMSprite00 + jp LoadTrainerHudOAM + +ShowOTTrainerMonsRemaining: + call DrawEnemyHUDBorder + ld hl, wOTPartyMon1HP + ld de, wOTPartyCount + call StageBallTilesData + ; ldpixel wPlaceBallsX, 9, 4 + ld hl, wPlaceBallsX + ld a, 9 * 8 + ld [hli], a + ld [hl], 4 * 8 + ld a, -8 + ld [wPlaceBallsDirection], a + ld hl, wShadowOAMSprite00 + PARTY_LENGTH * SPRITEOAMSTRUCT_LENGTH + jp LoadTrainerHudOAM + +StageBallTilesData: + ld a, [de] + push af + ld de, wBattleHUDTiles + ld c, PARTY_LENGTH + ld a, $34 ; empty slot +.loop1 + ld [de], a + inc de + dec c + jr nz, .loop1 + pop af + + ld de, wBattleHUDTiles +.loop2 + push af + call .GetHUDTile + inc de + pop af + dec a + jr nz, .loop2 + ret + +.GetHUDTile: + ld a, [hli] + and a + jr nz, .got_hp + ld a, [hl] + and a + ld b, $33 ; fainted + jr z, .fainted + +.got_hp + dec hl + dec hl + dec hl + ld a, [hl] + and a + ld b, $32 ; statused + jr nz, .load + dec b ; normal + jr .load + +.fainted + dec hl + dec hl + dec hl + +.load + ld a, b + ld [de], a + ld bc, PARTYMON_STRUCT_LENGTH + MON_HP - MON_STATUS + add hl, bc + ret + +DrawPlayerHUDBorder: + ld hl, .tiles + ld de, wTrainerHUDTiles + ld bc, .tiles_end - .tiles + call CopyBytes + hlcoord 18, 10 + ld de, -1 ; start on right + jr PlaceHUDBorderTiles + +.tiles + db $73 ; right side + db $77 ; bottom right + db $6f ; bottom left + db $76 ; bottom side +.tiles_end + +DrawPlayerPartyIconHUDBorder: + ld hl, .tiles + ld de, wTrainerHUDTiles + ld bc, .tiles_end - .tiles + call CopyBytes + hlcoord 18, 10 + ld de, -1 ; start on right + jr PlaceHUDBorderTiles + +.tiles + db $73 ; right side + db $5c ; bottom right + db $6f ; bottom left + db $76 ; bottom side +.tiles_end + +DrawEnemyHUDBorder: + ld hl, .tiles + ld de, wTrainerHUDTiles + ld bc, .tiles_end - .tiles + call CopyBytes + hlcoord 1, 2 + ld de, 1 ; start on left + call PlaceHUDBorderTiles + ld a, [wBattleMode] + dec a + ret nz + ld a, [wTempEnemyMonSpecies] + call CheckCaughtMon + ret z + hlcoord 1, 1 + ld [hl], $5d + ret + +.tiles + db $6d ; left side + db $74 ; bottom left + db $78 ; bottom right + db $76 ; bottom side +.tiles_end + +PlaceHUDBorderTiles: + ld a, [wTrainerHUDTiles + 0] + ld [hl], a + ld bc, SCREEN_WIDTH + add hl, bc + ld a, [wTrainerHUDTiles + 1] + ld [hl], a + ld b, 8 +.loop + add hl, de + ld a, [wTrainerHUDTiles + 3] + ld [hl], a + dec b + jr nz, .loop + add hl, de + ld a, [wTrainerHUDTiles + 2] + ld [hl], a + ret + +LinkBattle_TrainerHuds: + call LoadBallIconGFX + ld hl, wPartyMon1HP + ld de, wPartyCount + call StageBallTilesData + ld hl, wPlaceBallsX + ld a, 10 * 8 + ld [hli], a + ld [hl], 8 * 8 + ld a, 8 + ld [wPlaceBallsDirection], a + ld hl, wShadowOAMSprite00 + call LoadTrainerHudOAM + + ld hl, wOTPartyMon1HP + ld de, wOTPartyCount + call StageBallTilesData + ld hl, wPlaceBallsX + ld a, 10 * 8 + ld [hli], a + ld [hl], 13 * 8 + ld hl, wShadowOAMSprite00 + PARTY_LENGTH * SPRITEOAMSTRUCT_LENGTH + jp LoadTrainerHudOAM + +LoadTrainerHudOAM: + ld de, wBattleHUDTiles + ld c, PARTY_LENGTH +.loop + ld a, [wPlaceBallsY] + ld [hli], a ; y + ld a, [wPlaceBallsX] + ld [hli], a ; x + ld a, [de] + ld [hli], a ; tile id + ld a, PAL_BATTLE_OB_YELLOW + ld [hli], a ; attributes + ld a, [wPlaceBallsX] + ld b, a + ld a, [wPlaceBallsDirection] + add b + ld [wPlaceBallsX], a + inc de + dec c + jr nz, .loop + ret + +LoadBallIconGFX: + ld de, .gfx + ld hl, vTiles0 tile $31 + lb bc, BANK(LoadBallIconGFX), 4 + call Get2bppViaHDMA + ret + +.gfx +INCBIN "gfx/battle/balls.2bpp" + +_ShowLinkBattleParticipants: + call ClearBGPalettes + call LoadFontsExtra + hlcoord 2, 3 + ld b, 9 + ld c, 14 + call Textbox + hlcoord 4, 5 + ld de, wPlayerName + call PlaceString + hlcoord 4, 10 + ld de, wOTPlayerName + call PlaceString + hlcoord 9, 8 + ld a, "" + ld [hli], a + ld [hl], "" + farcall LinkBattle_TrainerHuds ; no need to farcall + ld b, SCGB_DIPLOMA + call GetSGBLayout + call SetPalettes + ld a, $e4 + ldh [rOBP0], a + ret diff --git a/engine/battle/update_battle_huds.asm b/engine/battle/update_battle_huds.asm new file mode 100644 index 0000000..0c31f1c --- /dev/null +++ b/engine/battle/update_battle_huds.asm @@ -0,0 +1,9 @@ +_UpdateBattleHUDs: + farcall DrawPlayerHUD + ld hl, wPlayerHPPal + call SetHPPal + farcall DrawEnemyHUD + ld hl, wEnemyHPPal + call SetHPPal + farcall FinishBattleAnim + ret diff --git a/engine/battle/used_move_text.asm b/engine/battle/used_move_text.asm new file mode 100644 index 0000000..1cf143e --- /dev/null +++ b/engine/battle/used_move_text.asm @@ -0,0 +1,119 @@ +DisplayUsedMoveText: + ld hl, UsedMoveText + call BattleTextbox + jp WaitBGMap + +UsedMoveText: + text_far _ActorNameText + text_asm + + ldh a, [hBattleTurn] + and a + jr nz, .start + + ld a, [wPlayerMoveStruct + MOVE_ANIM] + call UpdateUsedMoves + +.start + ld a, BATTLE_VARS_LAST_MOVE + call GetBattleVarAddr + ld d, h + ld e, l + + ld a, BATTLE_VARS_LAST_COUNTER_MOVE + call GetBattleVarAddr + + ld a, BATTLE_VARS_MOVE_ANIM + call GetBattleVar + ld [wTempByteValue], a + + push hl + farcall CheckUserIsCharging + pop hl + jr nz, .ok + + ; update last move + ld a, [wTempByteValue] + ld [hl], a + ld [de], a + +.ok + ld hl, UsedMoveInsteadText + ret + +UsedMoveInsteadText: + text_far _UsedMoveText + text_asm +; check obedience + ld a, [wAlreadyDisobeyed] + and a + jr z, .GetMoveNameText +; print "instead," + ld hl, .UsedInsteadText + ret + +.UsedInsteadText: + text_far _UsedInsteadText + text_asm +.GetMoveNameText: + ld hl, MoveNameText + ret + +MoveNameText: + text_far _MoveNameText + text_end + +UpdateUsedMoves: +; append move a to wPlayerUsedMoves unless it has already been used + + push bc +; start of list + ld hl, wPlayerUsedMoves +; get move id + ld b, a +; next count + ld c, NUM_MOVES + +.loop +; get move from the list + ld a, [hli] +; not used yet? + and a + jr z, .add +; already used? + cp b + jr z, .quit +; next byte + dec c + jr nz, .loop + +; if the list is full and the move hasn't already been used +; shift the list back one byte, deleting the first move used +; this can occur with struggle or a new learned move + ld hl, wPlayerUsedMoves + 1 +; 1 = 2 + ld a, [hld] + ld [hli], a +; 2 = 3 + inc hl + ld a, [hld] + ld [hli], a +; 3 = 4 + inc hl + ld a, [hld] + ld [hl], a +; 4 = new move + ld a, b + ld [wPlayerUsedMoves + 3], a + jr .quit + +.add +; go back to the byte we just inced from + dec hl +; add the new move + ld [hl], b + +.quit +; list updated + pop bc + ret diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm new file mode 100644 index 0000000..3b0271b --- /dev/null +++ b/engine/battle_anims/anim_commands.asm @@ -0,0 +1,1493 @@ +; Battle animation command interpreter. + +PlayBattleAnim: + ldh a, [rSVBK] + push af + + ld a, BANK(wActiveAnimObjects) + ldh [rSVBK], a + + call _PlayBattleAnim + + pop af + ldh [rSVBK], a + ret + +_PlayBattleAnim: + ld c, 6 +.wait + call BattleAnimDelayFrame + dec c + jr nz, .wait + + call BattleAnimAssignPals + call BattleAnimRequestPals + call BattleAnimDelayFrame + + ld c, 1 + ldh a, [rKEY1] + bit 7, a ; check CGB double speed mode + jr nz, .got_speed + ld c, 3 + +.got_speed + ld hl, hVBlank + ld a, [hl] + push af + + ld [hl], c + call BattleAnimRunScript + + pop af + ldh [hVBlank], a + + ld a, 1 + ldh [hBGMapMode], a + + call BattleAnimDelayFrame + call BattleAnimDelayFrame + call BattleAnimDelayFrame + call WaitSFX + ret + +BattleAnimRunScript: + ld a, [wFXAnimID + 1] + add a, a + jr c, .play_anyway + + farcall CheckBattleScene + jr c, .disabled + +; This vc_hook reduces the move animation flashing in the Virtual Console for +; Fissure, Self-Destruct, Thunder, Flash, Explosion, Horn Drill, and Hyper Beam. + vc_hook Reduce_move_anim_flashing + call BattleAnimClearHud + call RunBattleAnimScript + + call BattleAnimAssignPals + call BattleAnimRequestPals + + vc_hook Stop_reducing_move_anim_flashing + xor a + ldh [hSCX], a + ldh [hSCY], a + call BattleAnimDelayFrame + call BattleAnimRestoreHuds + +.disabled + ld a, [wNumHits] + and a + jr z, .done + + ld l, a + ld h, 0 + ld de, ANIM_MISS + add hl, de + ld a, l + ld [wFXAnimID], a + ld a, h + ld [wFXAnimID + 1], a + +.play_anyway + call WaitSFX + call PlayHitSound + call RunBattleAnimScript + +.done + call BattleAnim_RevertPals + ret + +RunBattleAnimScript: + call ClearBattleAnims + +.playframe + call RunBattleAnimCommand + call _ExecuteBGEffects + call BattleAnim_UpdateOAM_All + call PushLYOverrides + call BattleAnimRequestPals + +; Speed up Rollout's animation. + ld a, [wFXAnimID + 1] + if HIGH(ROLLOUT) + cp HIGH(ROLLOUT) + else + or a + endc + jr nz, .not_rollout + + ld a, [wFXAnimID] + cp LOW(ROLLOUT) + jr nz, .not_rollout + + ld a, ANIM_BG_ROLLOUT + ld b, NUM_BG_EFFECTS + ld de, BG_EFFECT_STRUCT_LENGTH + ld hl, wBGEffect1Function +.find + cp [hl] + jr z, .done + add hl, de + dec b + jr nz, .find + +.not_rollout + call BattleAnimDelayFrame + +.done + ld a, [wBattleAnimFlags] + bit BATTLEANIM_STOP_F, a + jr z, .playframe + + call BattleAnim_ClearOAM + ret + +BattleAnimClearHud: + call BattleAnimDelayFrame + call WaitTop + call ClearActorHud + ld a, $1 + ldh [hBGMapMode], a + call BattleAnimDelayFrame + call BattleAnimDelayFrame + call BattleAnimDelayFrame + call WaitTop + ret + +BattleAnimRestoreHuds: + call BattleAnimDelayFrame + call WaitTop + + ldh a, [rSVBK] + push af + ld a, BANK(wCurBattleMon) ; aka BANK(wTempMon), BANK(wPartyMon1), and several others + ldh [rSVBK], a + +; this block should just be "call UpdateBattleHuds" + ld hl, UpdateBattleHuds + ld a, BANK(UpdatePlayerHUD) + rst FarCall + + pop af + ldh [rSVBK], a + + ld a, $1 + ldh [hBGMapMode], a + call BattleAnimDelayFrame + call BattleAnimDelayFrame + call BattleAnimDelayFrame + call WaitTop + ret + +BattleAnimRequestPals: + ldh a, [hCGB] + and a + ret z + + ldh a, [rBGP] + ld b, a + ld a, [wBGP] + cp b + call nz, BattleAnim_SetBGPals + + ldh a, [rOBP0] + ld b, a + ld a, [wOBP0] + cp b + call nz, BattleAnim_SetOBPals + ret + +BattleAnimDelayFrame: +; Like DelayFrame but wastes battery life. + + ld a, 1 + ld [wVBlankOccurred], a +.wait + ld a, [wVBlankOccurred] + and a + jr nz, .wait + ret + +ClearActorHud: + ldh a, [hBattleTurn] + and a + jr z, .player + + hlcoord 1, 0 + lb bc, 4, 10 + call ClearBox + ret + +.player + hlcoord 9, 7 + lb bc, 5, 11 + call ClearBox + ret + +PlaceWindowOverBattleTextbox: ; unreferenced + xor a + ldh [hBGMapMode], a + ; bgcoord hBGMapAddress, 0, 20 + ld a, LOW(vBGMap0 + 20 * BG_MAP_WIDTH) + ldh [hBGMapAddress], a + ld a, HIGH(vBGMap0 + 20 * BG_MAP_WIDTH) + ldh [hBGMapAddress + 1], a + call WaitBGMap2 + ld a, (SCREEN_HEIGHT - TEXTBOX_HEIGHT) * TILE_WIDTH + ldh [hWY], a + ; bgcoord hBGMapAddress, 0, 0 + xor a ; LOW(vBGMap0) + ldh [hBGMapAddress], a + ld a, HIGH(vBGMap0) + ldh [hBGMapAddress + 1], a + call BattleAnimDelayFrame + ret + +BattleAnim_ClearOAM: + ld a, [wBattleAnimFlags] + bit BATTLEANIM_KEEPSPRITES_F, a + jr z, .delete + + ; Instead of deleting the sprites, make them all use PAL_BATTLE_OB_ENEMY + ld hl, wShadowOAMSprite00Attributes + ld c, NUM_SPRITE_OAM_STRUCTS +.loop + ld a, [hl] + and ~(PALETTE_MASK | VRAM_BANK_1) ; zeros out the palette bits + assert PAL_BATTLE_OB_ENEMY == 0 + ld [hli], a +rept SPRITEOAMSTRUCT_LENGTH - 1 + inc hl +endr + dec c + jr nz, .loop + ret + +.delete + ld hl, wShadowOAM + ld c, wShadowOAMEnd - wShadowOAM + xor a +.loop2 + ld [hli], a + dec c + jr nz, .loop2 + ret + +RunBattleAnimCommand: + call .CheckTimer + ret nc + call .RunScript + ret + +.CheckTimer: + ld a, [wBattleAnimDelay] + and a + jr z, .done + + dec a + ld [wBattleAnimDelay], a + and a + ret + +.done + scf + ret + +.RunScript: +.loop + call GetBattleAnimByte + + cp anim_ret_command + jr nz, .not_done_with_anim + +; Return from a subroutine. + ld hl, wBattleAnimFlags + bit BATTLEANIM_IN_SUBROUTINE_F, [hl] + jr nz, .do_anim + + set BATTLEANIM_STOP_F, [hl] + ret + +.not_done_with_anim + cp anim_obj_command + jr nc, .do_anim + + ld [wBattleAnimDelay], a + ret + +.do_anim + call .DoCommand + + jr .loop + +.DoCommand: +; Execute battle animation command in [wBattleAnimByte]. + ld a, [wBattleAnimByte] + sub anim_obj_command + + ld e, a + ld d, 0 + ld hl, BattleAnimCommands + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +BattleAnimCommands:: +; entries correspond to anim_* constants (see macros/scripts/battle_anims.asm) + table_width 2, BattleAnimCommands + dw BattleAnimCmd_Obj + dw BattleAnimCmd_1GFX + dw BattleAnimCmd_2GFX + dw BattleAnimCmd_3GFX + dw BattleAnimCmd_4GFX + dw BattleAnimCmd_5GFX + dw BattleAnimCmd_IncObj + dw BattleAnimCmd_SetObj + dw BattleAnimCmd_IncBGEffect + dw BattleAnimCmd_BattlerGFX_1Row + dw BattleAnimCmd_BattlerGFX_2Row + dw BattleAnimCmd_CheckPokeball + dw BattleAnimCmd_Transform + dw BattleAnimCmd_RaiseSub + dw BattleAnimCmd_DropSub + dw BattleAnimCmd_ResetObp0 + dw BattleAnimCmd_Sound + dw BattleAnimCmd_Cry + dw BattleAnimCmd_MinimizeOpp + dw BattleAnimCmd_OAMOn + dw BattleAnimCmd_OAMOff + dw BattleAnimCmd_ClearObjs + dw BattleAnimCmd_BeatUp + dw BattleAnimCmd_E7 + dw BattleAnimCmd_UpdateActorPic + dw BattleAnimCmd_Minimize + dw BattleAnimCmd_EA ; dummy + dw BattleAnimCmd_EB ; dummy + dw BattleAnimCmd_EC ; dummy + dw BattleAnimCmd_ED ; dummy + dw BattleAnimCmd_IfParamAnd + dw BattleAnimCmd_JumpUntil + dw BattleAnimCmd_BGEffect + dw BattleAnimCmd_BGP + dw BattleAnimCmd_OBP0 + dw BattleAnimCmd_OBP1 + dw BattleAnimCmd_KeepSprites + dw BattleAnimCmd_F5 + dw BattleAnimCmd_F6 + dw BattleAnimCmd_F7 + dw BattleAnimCmd_IfParamEqual + dw BattleAnimCmd_SetVar + dw BattleAnimCmd_IncVar + dw BattleAnimCmd_IfVarEqual + dw BattleAnimCmd_Jump + dw BattleAnimCmd_Loop + dw BattleAnimCmd_Call + dw BattleAnimCmd_Ret + assert_table_length $100 - FIRST_BATTLE_ANIM_CMD + +BattleAnimCmd_EA: +BattleAnimCmd_EB: +BattleAnimCmd_EC: +BattleAnimCmd_ED: + ret + +BattleAnimCmd_Ret: + ld hl, wBattleAnimFlags + res BATTLEANIM_IN_SUBROUTINE_F, [hl] + ld hl, wBattleAnimParent + ld e, [hl] + inc hl + ld d, [hl] + ld hl, wBattleAnimAddress + ld [hl], e + inc hl + ld [hl], d + ret + +BattleAnimCmd_Call: + call GetBattleAnimByte + ld e, a + call GetBattleAnimByte + ld d, a + push de + ld hl, wBattleAnimAddress + ld e, [hl] + inc hl + ld d, [hl] + ld hl, wBattleAnimParent + ld [hl], e + inc hl + ld [hl], d + pop de + ld hl, wBattleAnimAddress + ld [hl], e + inc hl + ld [hl], d + ld hl, wBattleAnimFlags + set BATTLEANIM_IN_SUBROUTINE_F, [hl] + ret + +BattleAnimCmd_Jump: + call GetBattleAnimByte + ld e, a + call GetBattleAnimByte + ld d, a + ld hl, wBattleAnimAddress + ld [hl], e + inc hl + ld [hl], d + ret + +BattleAnimCmd_Loop: + call GetBattleAnimByte + ld hl, wBattleAnimFlags + bit BATTLEANIM_IN_LOOP_F, [hl] + jr nz, .continue_loop + and a + jr z, .perpetual + dec a + set BATTLEANIM_IN_LOOP_F, [hl] + ld [wBattleAnimLoops], a +.continue_loop + ld hl, wBattleAnimLoops + ld a, [hl] + and a + jr z, .return_from_loop + dec [hl] +.perpetual + call GetBattleAnimByte + ld e, a + call GetBattleAnimByte + ld d, a + ld hl, wBattleAnimAddress + ld [hl], e + inc hl + ld [hl], d + ret + +.return_from_loop + ld hl, wBattleAnimFlags + res BATTLEANIM_IN_LOOP_F, [hl] + ld hl, wBattleAnimAddress + ld e, [hl] + inc hl + ld d, [hl] + inc de + inc de + ld [hl], d + dec hl + ld [hl], e + ret + +BattleAnimCmd_JumpUntil: + ld hl, wBattleAnimParam + ld a, [hl] + and a + jr z, .dont_jump + + dec [hl] + call GetBattleAnimByte + ld e, a + call GetBattleAnimByte + ld d, a + ld hl, wBattleAnimAddress + ld [hl], e + inc hl + ld [hl], d + ret + +.dont_jump + ld hl, wBattleAnimAddress + ld e, [hl] + inc hl + ld d, [hl] + inc de + inc de + ld [hl], d + dec hl + ld [hl], e + ret + +BattleAnimCmd_SetVar: + call GetBattleAnimByte + ld [wBattleAnimVar], a + ret + +BattleAnimCmd_IncVar: + ld hl, wBattleAnimVar + inc [hl] + ret + +BattleAnimCmd_IfVarEqual: + call GetBattleAnimByte + ld hl, wBattleAnimVar + cp [hl] + jr z, .jump + + ld hl, wBattleAnimAddress + ld e, [hl] + inc hl + ld d, [hl] + inc de + inc de + ld [hl], d + dec hl + ld [hl], e + ret + +.jump + call GetBattleAnimByte + ld e, a + call GetBattleAnimByte + ld d, a + ld hl, wBattleAnimAddress + ld [hl], e + inc hl + ld [hl], d + ret + +BattleAnimCmd_IfParamEqual: + call GetBattleAnimByte + ld hl, wBattleAnimParam + cp [hl] + jr z, .jump + + ld hl, wBattleAnimAddress + ld e, [hl] + inc hl + ld d, [hl] + inc de + inc de + ld [hl], d + dec hl + ld [hl], e + ret + +.jump + call GetBattleAnimByte + ld e, a + call GetBattleAnimByte + ld d, a + ld hl, wBattleAnimAddress + ld [hl], e + inc hl + ld [hl], d + ret + +BattleAnimCmd_IfParamAnd: + call GetBattleAnimByte + ld e, a + ld a, [wBattleAnimParam] + and e + jr nz, .jump + + ld hl, wBattleAnimAddress + ld e, [hl] + inc hl + ld d, [hl] + inc de + inc de + ld [hl], d + dec hl + ld [hl], e + ret + +.jump + call GetBattleAnimByte + ld e, a + call GetBattleAnimByte + ld d, a + ld hl, wBattleAnimAddress + ld [hl], e + inc hl + ld [hl], d + ret + +BattleAnimCmd_Obj: +; index, x, y, param + call GetBattleAnimByte + ld [wBattleObjectTempID], a + call GetBattleAnimByte + ld [wBattleObjectTempXCoord], a + call GetBattleAnimByte + ld [wBattleObjectTempYCoord], a + call GetBattleAnimByte + ld [wBattleObjectTempParam], a + call QueueBattleAnimation + ret + +BattleAnimCmd_BGEffect: + call GetBattleAnimByte + ld [wBattleBGEffectTempID], a + call GetBattleAnimByte + ld [wBattleBGEffectTempJumptableIndex], a + call GetBattleAnimByte + ld [wBattleBGEffectTempTurn], a + call GetBattleAnimByte + ld [wBattleBGEffectTempParam], a + call _QueueBGEffect + ret + +BattleAnimCmd_BGP: + call GetBattleAnimByte + ld [wBGP], a + ret + +BattleAnimCmd_OBP0: + call GetBattleAnimByte + ld [wOBP0], a + ret + +BattleAnimCmd_OBP1: + call GetBattleAnimByte + ld [wOBP1], a + ret + +BattleAnimCmd_ResetObp0: + ldh a, [hSGB] + and a + ld a, $e0 + jr z, .not_sgb + ld a, $f0 +.not_sgb + ld [wOBP0], a + ret + +BattleAnimCmd_ClearObjs: + ld hl, wActiveAnimObjects + ld a, NUM_ANIM_OBJECTS * BATTLEANIMSTRUCT_LENGTH +.loop + ld [hl], 0 + inc hl + dec a + jr nz, .loop + ret + +BattleAnimCmd_1GFX: +BattleAnimCmd_2GFX: +BattleAnimCmd_3GFX: +BattleAnimCmd_4GFX: +BattleAnimCmd_5GFX: + ld a, [wBattleAnimByte] + and $f + ld c, a + ld hl, wBattleAnimTileDict + xor a + ld [wBattleAnimGFXTempTileID], a +.loop + ld a, [wBattleAnimGFXTempTileID] + cp (vTiles1 - vTiles0) / LEN_2BPP_TILE - BATTLEANIM_BASE_TILE + vc_hook Reduce_move_anim_flashing_PRESENT + ret nc + call GetBattleAnimByte + ld [hli], a + ld a, [wBattleAnimGFXTempTileID] + ld [hli], a + push bc + push hl + ld l, a + ld h, 0 +rept 4 + add hl, hl +endr + ld de, vTiles0 tile BATTLEANIM_BASE_TILE + add hl, de + ld a, [wBattleAnimByte] + call LoadBattleAnimGFX + ld a, [wBattleAnimGFXTempTileID] + add c + ld [wBattleAnimGFXTempTileID], a + pop hl + pop bc + dec c + jr nz, .loop + ret + +BattleAnimCmd_IncObj: + call GetBattleAnimByte + ld e, NUM_ANIM_OBJECTS + ld bc, wActiveAnimObjects +.loop + ld hl, BATTLEANIMSTRUCT_INDEX + add hl, bc + ld d, [hl] + ld a, [wBattleAnimByte] + cp d + jr z, .found + ld hl, BATTLEANIMSTRUCT_LENGTH + add hl, bc + ld c, l + ld b, h + dec e + jr nz, .loop + ret + +.found + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + inc [hl] + ret + +BattleAnimCmd_IncBGEffect: + call GetBattleAnimByte + ld e, NUM_BG_EFFECTS + ld bc, wBGEffect1Function +.loop + ld hl, $0 + add hl, bc + ld d, [hl] + ld a, [wBattleAnimByte] + cp d + jr z, .found + ld hl, 4 + add hl, bc + ld c, l + ld b, h + dec e + jr nz, .loop + ret + +.found + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + inc [hl] + ret + +BattleAnimCmd_SetObj: + call GetBattleAnimByte + ld e, NUM_ANIM_OBJECTS + ld bc, wActiveAnimObjects +.loop + ld hl, BATTLEANIMSTRUCT_INDEX + add hl, bc + ld d, [hl] + ld a, [wBattleAnimByte] + cp d + jr z, .found + ld hl, BATTLEANIMSTRUCT_LENGTH + add hl, bc + ld c, l + ld b, h + dec e + jr nz, .loop + ret + +.found + call GetBattleAnimByte + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], a + ret + +BattleAnimCmd_BattlerGFX_1Row: + ld hl, wBattleAnimTileDict +.loop + ld a, [hl] + and a + jr z, .okay + inc hl + inc hl + jr .loop + +.okay + ld a, ANIM_GFX_PLAYERHEAD + ld [hli], a + ld a, ($80 - 6 - 7) - BATTLEANIM_BASE_TILE + ld [hli], a + ld a, ANIM_GFX_ENEMYFEET + ld [hli], a + ld a, ($80 - 6) - BATTLEANIM_BASE_TILE + ld [hl], a + + ld hl, vTiles0 tile ($80 - 6 - 7) + ld de, vTiles2 tile $06 ; Enemy feet start tile + ld a, 7 tiles ; Enemy pic height + ld [wBattleAnimGFXTempPicHeight], a + ld a, 7 ; Copy 7x1 tiles + call .LoadFeet + ld de, vTiles2 tile $31 ; Player head start tile + ld a, 6 tiles ; Player pic height + ld [wBattleAnimGFXTempPicHeight], a + ld a, 6 ; Copy 6x1 tiles + call .LoadFeet + ret + +.LoadFeet: + push af + push hl + push de + lb bc, BANK(@), 1 + call Request2bpp + pop de + ld a, [wBattleAnimGFXTempPicHeight] + ld l, a + ld h, 0 + add hl, de + ld e, l + ld d, h + pop hl + ld bc, 1 tiles + add hl, bc + pop af + dec a + jr nz, .LoadFeet + ret + +BattleAnimCmd_BattlerGFX_2Row: + ld hl, wBattleAnimTileDict +.loop + ld a, [hl] + and a + jr z, .okay + inc hl + inc hl + jr .loop + +.okay + ld a, ANIM_GFX_PLAYERHEAD + ld [hli], a + ld a, ($80 - 6 * 2 - 7 * 2) - BATTLEANIM_BASE_TILE + ld [hli], a + ld a, ANIM_GFX_ENEMYFEET + ld [hli], a + ld a, ($80 - 6 * 2) - BATTLEANIM_BASE_TILE + ld [hl], a + + ld hl, vTiles0 tile ($80 - 6 * 2 - 7 * 2) + ld de, vTiles2 tile $05 ; Enemy feet start tile + ld a, 7 tiles ; Enemy pic height + ld [wBattleAnimGFXTempPicHeight], a + ld a, 7 ; Copy 7x2 tiles + call .LoadHead + ld de, vTiles2 tile $31 ; Player head start tile + ld a, 6 tiles ; Player pic height + ld [wBattleAnimGFXTempPicHeight], a + ld a, 6 ; Copy 6x2 tiles + call .LoadHead + ret + +.LoadHead: + push af + push hl + push de + lb bc, BANK(@), 2 + call Request2bpp + pop de + ld a, [wBattleAnimGFXTempPicHeight] + ld l, a + ld h, 0 + add hl, de + ld e, l + ld d, h + pop hl + ld bc, 2 tiles + add hl, bc + pop af + dec a + jr nz, .LoadHead + ret + +BattleAnimCmd_CheckPokeball: + callfar GetPokeBallWobble + ld a, c + ld [wBattleAnimVar], a + ret + +BattleAnimCmd_E7: + ret + +BattleAnimCmd_Transform: + ldh a, [rSVBK] + push af + ld a, BANK(wCurPartySpecies) + ldh [rSVBK], a + + ld a, [wCurPartySpecies] + push af + + ldh a, [hBattleTurn] + and a + jr z, .player + + ld a, [wTempBattleMonSpecies] + ld [wCurPartySpecies], a + ld hl, wBattleMonDVs + predef GetUnownLetter + ld de, vTiles0 tile $00 + predef GetMonFrontpic + jr .done + +.player + ld a, [wTempEnemyMonSpecies] + ld [wCurPartySpecies], a + ld hl, wEnemyMonDVs + predef GetUnownLetter + ld de, vTiles0 tile $00 + predef GetMonBackpic + +.done + pop af + ld [wCurPartySpecies], a + + pop af + ldh [rSVBK], a + ret + +BattleAnimCmd_UpdateActorPic: + ld de, vTiles0 tile $00 + ldh a, [hBattleTurn] + and a + jr z, .player + + ld hl, vTiles2 tile $00 + ld b, 0 + ld c, 7 * 7 + call Request2bpp + ret + +.player + ld hl, vTiles2 tile $31 + ld b, 0 + ld c, 6 * 6 + call Request2bpp + ret + +BattleAnimCmd_RaiseSub: + ldh a, [rSVBK] + push af + ld a, 1 ; unnecessary bankswitch? + ldh [rSVBK], a + + xor a ; BANK(sScratch) + call OpenSRAM + +GetSubstitutePic: ; used only for BANK(GetSubstitutePic) + ld hl, sScratch + ld bc, (7 * 7) tiles +.loop + xor a + ld [hli], a + dec bc + ld a, c + or b + jr nz, .loop + + ldh a, [hBattleTurn] + and a + jr z, .player + + ld hl, MonsterSpriteGFX + 0 tiles + ld de, sScratch + (2 * 7 + 5) tiles + call .CopyTile + ld hl, MonsterSpriteGFX + 1 tiles + ld de, sScratch + (3 * 7 + 5) tiles + call .CopyTile + ld hl, MonsterSpriteGFX + 2 tiles + ld de, sScratch + (2 * 7 + 6) tiles + call .CopyTile + ld hl, MonsterSpriteGFX + 3 tiles + ld de, sScratch + (3 * 7 + 6) tiles + call .CopyTile + + ld hl, vTiles2 tile $00 + ld de, sScratch + lb bc, BANK(GetSubstitutePic), 7 * 7 + call Request2bpp + jr .done + +.player + ld hl, MonsterSpriteGFX + 4 tiles + ld de, sScratch + (2 * 6 + 4) tiles + call .CopyTile + ld hl, MonsterSpriteGFX + 5 tiles + ld de, sScratch + (3 * 6 + 4) tiles + call .CopyTile + ld hl, MonsterSpriteGFX + 6 tiles + ld de, sScratch + (2 * 6 + 5) tiles + call .CopyTile + ld hl, MonsterSpriteGFX + 7 tiles + ld de, sScratch + (3 * 6 + 5) tiles + call .CopyTile + + ld hl, vTiles2 tile $31 + ld de, sScratch + lb bc, BANK(GetSubstitutePic), 6 * 6 + call Request2bpp + +.done + call CloseSRAM + + pop af + ldh [rSVBK], a + ret + +.CopyTile: + ld bc, 1 tiles + ld a, BANK(MonsterSpriteGFX) + call FarCopyBytes + ret + +BattleAnimCmd_MinimizeOpp: + ldh a, [rSVBK] + push af + ld a, 1 ; unnecessary bankswitch? + ldh [rSVBK], a + + xor a ; BANK(sScratch) + call OpenSRAM + call GetMinimizePic + call Request2bpp + call CloseSRAM + + pop af + ldh [rSVBK], a + ret + +GetMinimizePic: + ld hl, sScratch + ld bc, (7 * 7) tiles +.loop + xor a + ld [hli], a + dec bc + ld a, c + or b + jr nz, .loop + + ldh a, [hBattleTurn] + and a + jr z, .player + + ld de, sScratch + (3 * 7 + 5) tiles + call CopyMinimizePic + ld hl, vTiles2 tile $00 + ld de, sScratch + lb bc, BANK(GetMinimizePic), 7 * 7 + ret + +.player + ld de, sScratch + (3 * 6 + 4) tiles + call CopyMinimizePic + ld hl, vTiles2 tile $31 + ld de, sScratch + lb bc, BANK(GetMinimizePic), 6 * 6 + ret + +CopyMinimizePic: + ld hl, MinimizePic + ld bc, $10 + ld a, BANK(MinimizePic) + call FarCopyBytes + ret + +MinimizePic: +INCBIN "gfx/battle/minimize.2bpp" + +BattleAnimCmd_Minimize: + ldh a, [rSVBK] + push af + ld a, 1 ; unnecessary bankswitch? + ldh [rSVBK], a + + xor a ; BANK(sScratch) + call OpenSRAM + call GetMinimizePic + ld hl, vTiles0 tile $00 + call Request2bpp + call CloseSRAM + + pop af + ldh [rSVBK], a + ret + +BattleAnimCmd_DropSub: + ldh a, [rSVBK] + push af + ld a, BANK(wCurPartySpecies) + ldh [rSVBK], a + + ld a, [wCurPartySpecies] + push af + ldh a, [hBattleTurn] + and a + jr z, .player + + callfar DropEnemySub + jr .done + +.player + callfar DropPlayerSub + +.done + pop af + ld [wCurPartySpecies], a + + pop af + ldh [rSVBK], a + ret + +BattleAnimCmd_BeatUp: + ldh a, [rSVBK] + push af + ld a, BANK(wCurPartySpecies) + ldh [rSVBK], a + + ld a, [wCurPartySpecies] + push af + + ld a, [wBattleAnimParam] + ld [wCurPartySpecies], a + + ldh a, [hBattleTurn] + and a + jr z, .player + + ld hl, wBattleMonDVs + predef GetUnownLetter + ld de, vTiles2 tile $00 + predef GetMonFrontpic + jr .done + +.player + ld hl, wEnemyMonDVs + predef GetUnownLetter + ld de, vTiles2 tile $31 + predef GetMonBackpic + +.done + pop af + ld [wCurPartySpecies], a + ld b, SCGB_BATTLE_COLORS + call GetSGBLayout + + pop af + ldh [rSVBK], a + ret + +BattleAnimCmd_OAMOn: + xor a + ldh [hOAMUpdate], a + ret + +BattleAnimCmd_OAMOff: + ld a, $1 + ldh [hOAMUpdate], a + ret + +BattleAnimCmd_KeepSprites: + ld hl, wBattleAnimFlags + set BATTLEANIM_KEEPSPRITES_F, [hl] + ret + +BattleAnimCmd_F5: + ret + +BattleAnimCmd_F6: + ret + +BattleAnimCmd_F7: + ret + +BattleAnimCmd_Sound: + call GetBattleAnimByte + ld e, a + srl a + srl a + ld [wSFXDuration], a + call .GetCryTrack + maskbits NUM_NOISE_CHANS + ld [wCryTracks], a + + ld e, a + ld d, 0 + ld hl, .GetPanning + add hl, de + ld a, [hl] + ld [wStereoPanningMask], a + + call GetBattleAnimByte + ld e, a + ld d, 0 + callfar PlayStereoSFX + + ret + +.GetPanning: + db $f0, $0f, $f0, $0f + +.GetCryTrack: + ldh a, [hBattleTurn] + and a + jr nz, .enemy + + ld a, e + ret + +.enemy + ld a, e + xor 1 + ret + +BattleAnimCmd_Cry: + call GetBattleAnimByte + maskbits NUM_NOISE_CHANS + ld e, a + ld d, 0 + ld hl, .CryData +rept 4 + add hl, de +endr + + ldh a, [rSVBK] + push af + ld a, BANK(wEnemyMon) ; wBattleMon is in WRAM0, but wEnemyMon is in WRAMX + ldh [rSVBK], a + + ldh a, [hBattleTurn] + and a + jr nz, .enemy + + ld a, $f0 + ld [wCryTracks], a + ld a, [wBattleMonSpecies] + jr .done_cry_tracks + +.enemy + ld a, $0f + ld [wCryTracks], a + ld a, [wEnemyMonSpecies] + +.done_cry_tracks + push hl + call LoadCry + pop hl + jr c, .done + + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + + push hl + ld hl, wCryPitch + ld a, [hli] + ld h, [hl] + ld l, a + add hl, bc + ld a, l + ld [wCryPitch], a + ld a, h + ld [wCryPitch + 1], a + pop hl + + ld a, [hli] + ld c, a + ld b, [hl] + ld hl, wCryLength + ld a, [hli] + ld h, [hl] + ld l, a + add hl, bc + + ld a, l + ld [wCryLength], a + ld a, h + ld [wCryLength + 1], a + ld a, 1 + ld [wStereoPanningMask], a + + callfar _PlayCry + +.done + pop af + ldh [rSVBK], a + ret + +.CryData: +; +pitch, +length + dw $0000, $00c0 + dw $0000, $0040 + dw $0000, $0000 + dw $0000, $0000 + +PlayHitSound: + ld a, [wNumHits] + cp BATTLEANIM_ENEMY_DAMAGE + jr z, .okay + cp BATTLEANIM_PLAYER_DAMAGE + ret nz + +.okay + ld a, [wTypeModifier] + and $7f + ret z + + cp EFFECTIVE + ld de, SFX_DAMAGE + jr z, .play + + ld de, SFX_SUPER_EFFECTIVE + jr nc, .play + + ld de, SFX_NOT_VERY_EFFECTIVE + +.play + call PlaySFX + ret + +BattleAnimAssignPals: + ldh a, [hCGB] + and a + jr nz, .cgb + ldh a, [hSGB] + and a + ld a, %11100000 + jr z, .sgb + ld a, %11110000 + +.sgb + ld [wOBP0], a + ld a, %11100100 + ld [wBGP], a + ld [wOBP1], a + ret + +.cgb + ld a, %11100100 + ld [wBGP], a + ld [wOBP0], a + ld [wOBP1], a + call DmgToCgbBGPals + lb de, %11100100, %11100100 + call DmgToCgbObjPals + ret + +ClearBattleAnims:: +; Clear animation block + ld hl, wLYOverrides + ld bc, wBattleAnimEnd - wLYOverrides +.loop + ld [hl], 0 + inc hl + dec bc + ld a, c + or b + jr nz, .loop + + ld hl, wFXAnimID + ld e, [hl] + inc hl + ld d, [hl] + ld hl, BattleAnimations + add hl, de + add hl, de + call GetBattleAnimPointer + call BattleAnimAssignPals + call BattleAnimDelayFrame + ret + +BattleAnim_RevertPals: + call WaitTop + ld a, %11100100 + ld [wBGP], a + ld [wOBP0], a + ld [wOBP1], a + call DmgToCgbBGPals + lb de, %11100100, %11100100 + call DmgToCgbObjPals + xor a + ldh [hSCX], a + ldh [hSCY], a + call BattleAnimDelayFrame + ld a, $1 + ldh [hBGMapMode], a + ret + +BattleAnim_SetBGPals: + ldh [rBGP], a + ldh a, [hCGB] + and a + ret z + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, wBGPals2 + ld de, wBGPals1 + ldh a, [rBGP] + ld b, a + ld c, 7 + call CopyPals + ld hl, wOBPals2 + ld de, wOBPals1 + ldh a, [rBGP] + ld b, a + ld c, 2 + call CopyPals + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +BattleAnim_SetOBPals: + ldh [rOBP0], a + ldh a, [hCGB] + and a + ret z + ldh a, [rSVBK] + push af + ld a, BANK(wOBPals1) + ldh [rSVBK], a + ld hl, wOBPals2 palette PAL_BATTLE_OB_GRAY + ld de, wOBPals1 palette PAL_BATTLE_OB_GRAY + ldh a, [rOBP0] + ld b, a + ld c, 2 + call CopyPals + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +BattleAnim_UpdateOAM_All: + ld a, 0 + ld [wBattleAnimOAMPointerLo], a + ld hl, wActiveAnimObjects + ld e, NUM_ANIM_OBJECTS +.loop + ld a, [hl] + and a + jr z, .next + ld c, l + ld b, h + push hl + push de + call DoBattleAnimFrame + call BattleAnimOAMUpdate + pop de + pop hl + jr c, .done + +.next + ld bc, BATTLEANIMSTRUCT_LENGTH + add hl, bc + dec e + jr nz, .loop + ld a, [wBattleAnimOAMPointerLo] + ld l, a + ld h, HIGH(wShadowOAM) +.loop2 + ld a, l + cp LOW(wShadowOAMEnd) + jr nc, .done + xor a + ld [hli], a + jr .loop2 + +.done + ret diff --git a/engine/battle_anims/bg_effects.asm b/engine/battle_anims/bg_effects.asm new file mode 100644 index 0000000..14fe693 --- /dev/null +++ b/engine/battle_anims/bg_effects.asm @@ -0,0 +1,2941 @@ + const_def + const BGSQUARE_SIX + const BGSQUARE_FOUR + const BGSQUARE_TWO + const BGSQUARE_SEVEN + const BGSQUARE_FIVE + const BGSQUARE_THREE + +; BG effects for use in battle animations. + +ExecuteBGEffects: + ld hl, wActiveBGEffects + ld e, NUM_BG_EFFECTS +.loop + ld a, [hl] + and a + jr z, .next + ld c, l + ld b, h + push hl + push de + call DoBattleBGEffectFunction + pop de + pop hl +.next + ld bc, BG_EFFECT_STRUCT_LENGTH + add hl, bc + dec e + jr nz, .loop + ret + +QueueBGEffect: + ld hl, wActiveBGEffects + ld e, NUM_BG_EFFECTS +.loop + ld a, [hl] + and a + jr z, .load + ld bc, BG_EFFECT_STRUCT_LENGTH + add hl, bc + dec e + jr nz, .loop + scf + ret + +.load + ld c, l + ld b, h + ld hl, BG_EFFECT_STRUCT_FUNCTION + add hl, bc + ld a, [wBattleBGEffectTempID] + ld [hli], a + ld a, [wBattleBGEffectTempJumptableIndex] + ld [hli], a + ld a, [wBattleBGEffectTempTurn] + ld [hli], a + ld a, [wBattleBGEffectTempParam] + ld [hl], a + ret + +EndBattleBGEffect: + ld hl, BG_EFFECT_STRUCT_FUNCTION + add hl, bc + ld [hl], 0 + ret + +DoBattleBGEffectFunction: + ld hl, BG_EFFECT_STRUCT_FUNCTION + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, BattleBGEffects + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +BattleBGEffects: +; entries correspond to ANIM_BG_* constants + dw BattleBGEffect_End + dw BattleBGEffect_FlashInverted + dw BattleBGEffect_FlashWhite + dw BattleBGEffect_WhiteHues + dw BattleBGEffect_BlackHues + dw BattleBGEffect_AlternateHues + dw BattleBGEffect_CycleOBPalsGrayAndYellow + dw BattleBGEffect_CycleMidOBPalsGrayAndYellow + dw BattleBGEffect_CycleBGPals_Inverted + dw BattleBGEffect_HideMon + dw BattleBGEffect_ShowMon + dw BattleBGEffect_EnterMon + dw BattleBGEffect_ReturnMon + dw BattleBGEffect_Surf + dw BattleBGEffect_Whirlpool + dw BattleBGEffect_Teleport + dw BattleBGEffect_NightShade + dw BattleBGEffect_BattlerObj_1Row + dw BattleBGEffect_BattlerObj_2Row + dw BattleBGEffect_DoubleTeam + dw BattleBGEffect_AcidArmor + dw BattleBGEffect_RapidFlash + dw BattleBGEffect_FadeMonToLight + dw BattleBGEffect_FadeMonToBlack + dw BattleBGEffect_FadeMonToLightRepeating + dw BattleBGEffect_FadeMonToBlackRepeating + dw BattleBGEffect_CycleMonLightDarkRepeating + dw BattleBGEffect_FlashMonRepeating + dw BattleBGEffect_FadeMonsToBlackRepeating + dw BattleBGEffect_FadeMonToWhiteWaitFadeBack + dw BattleBGEffect_FadeMonFromWhite + dw BattleBGEffect_ShakeScreenX + dw BattleBGEffect_ShakeScreenY + dw BattleBGEffect_Withdraw + dw BattleBGEffect_BounceDown + dw BattleBGEffect_Dig + dw BattleBGEffect_Tackle + dw BattleBGEffect_BodySlam + dw BattleBGEffect_WobbleMon + dw BattleBGEffect_RemoveMon + dw BattleBGEffect_WaveDeformMon + dw BattleBGEffect_Psychic + dw BattleBGEffect_BetaSendOutMon1 + dw BattleBGEffect_BetaSendOutMon2 + dw BattleBGEffect_Flail + dw BattleBGEffect_BetaPursuit + dw BattleBGEffect_Rollout + dw BattleBGEffect_VitalThrow + dw BattleBGEffect_StartWater + dw BattleBGEffect_Water + dw BattleBGEffect_EndWater + dw BattleBGEffect_VibrateMon + dw BattleBGEffect_WobblePlayer + dw BattleBGEffect_WobbleScreen + +BattleBGEffect_End: + call EndBattleBGEffect + ret + +BatttleBGEffects_GetNamedJumptablePointer: + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + ld l, [hl] + ld h, 0 + add hl, hl + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ret + +BattleBGEffects_AnonJumptable: + pop de + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + ld l, [hl] + ld h, 0 + add hl, hl + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +BattleBGEffects_IncAnonJumptableIndex: + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + inc [hl] + ret + +BattleBGEffect_FlashInverted: + ld de, .inverted + jp BattleBGEffect_FlashContinue + +.inverted + dc 3, 2, 1, 0 + dc 0, 1, 2, 3 + +BattleBGEffect_FlashWhite: + ld de, .white + jp BattleBGEffect_FlashContinue + +.white + dc 3, 2, 1, 0 + dc 0, 0, 0, 0 + +BattleBGEffect_FlashContinue: +; current timer, flash duration, number of flashes + ld a, $1 + ld [wBattleBGEffectTempID], a ; unused? + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + ld a, [hl] + and a + jr z, .init + dec [hl] + ret + +.init + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + ld [hl], a + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + and a + jr nz, .apply_pal + call EndBattleBGEffect + ret + +.apply_pal + dec a + ld [hl], a + and 1 + ld l, a + ld h, 0 + add hl, de + ld a, [hl] + ld [wBGP], a + ret + +BattleBGEffect_WhiteHues: + ld de, .Pals + call BattleBGEffect_GetNthDMGPal + jr c, .quit + ld [wBGP], a + ret + +.quit + call EndBattleBGEffect + ret + +.Pals: + dc 3, 2, 1, 0 + dc 3, 2, 0, 0 + dc 3, 1, 0, 0 + db -1 + +BattleBGEffect_BlackHues: + ld de, .Pals + call BattleBGEffect_GetNthDMGPal + jr c, .quit + ld [wBGP], a + ret + +.quit + call EndBattleBGEffect + ret + +.Pals: + dc 3, 2, 1, 0 + dc 3, 3, 1, 0 + dc 3, 3, 2, 0 + db -1 + +BattleBGEffect_AlternateHues: + ld de, .Pals + call BattleBGEffect_GetNthDMGPal + jr c, .quit + ld [wBGP], a + ld [wOBP1], a + ret + +.quit + call EndBattleBGEffect + ret + +.Pals: + dc 3, 2, 1, 0 + dc 3, 3, 2, 0 + dc 3, 3, 3, 0 + dc 3, 3, 2, 0 + dc 3, 2, 1, 0 + dc 2, 1, 0, 0 + dc 1, 0, 0, 0 + dc 2, 1, 0, 0 + db -2 + +BattleBGEffect_CycleOBPalsGrayAndYellow: + call BattleBGEffects_CheckSGB + jr nz, .sgb + ld de, .PalsCGB + jr .okay + +.sgb + ld de, .PalsSGB +.okay + call BattleBGEffect_GetNthDMGPal + ld [wOBP0], a + ret + +.PalsCGB: + dc 3, 2, 1, 0 + dc 2, 1, 0, 0 + db -2 + +.PalsSGB: + dc 3, 3, 0, 0 + dc 3, 0, 0, 0 + db -2 + +BattleBGEffect_CycleMidOBPalsGrayAndYellow: + call BattleBGEffects_CheckSGB + jr nz, .sgb + ld de, .PalsCGB + jr .okay + +.sgb + ld de, .PalsSGB +.okay + call BattleBGEffect_GetNthDMGPal + ld [wOBP0], a + ret + +.PalsCGB: + dc 3, 2, 1, 0 + dc 3, 1, 2, 0 + db -2 + +.PalsSGB: + dc 3, 3, 0, 0 + dc 3, 0, 3, 0 + db -2 + +BattleBGEffect_CycleBGPals_Inverted: + ld de, .Pals + call BattleBGEffect_GetNthDMGPal + ld [wBGP], a + ret + +.Pals: + dc 0, 1, 2, 3 + dc 1, 2, 0, 3 + dc 2, 0, 1, 3 + db -2 + +BattleBGEffect_HideMon: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw BattleBGEffects_IncAnonJumptableIndex + dw BattleBGEffects_IncAnonJumptableIndex + dw BattleBGEffects_IncAnonJumptableIndex + dw .four + +.zero + call BattleBGEffects_IncAnonJumptableIndex + push bc + call BGEffect_CheckBattleTurn + jr nz, .player_side + hlcoord 12, 0 + lb bc, 7, 7 + jr .got_pointer + +.player_side + hlcoord 2, 6 + lb bc, 6, 6 +.got_pointer + call ClearBox + pop bc + xor a + ldh [hBGMapThird], a + ld a, $1 + ldh [hBGMapMode], a + ret + +.four + xor a + ldh [hBGMapMode], a + call EndBattleBGEffect + ret + +BattleBGEffect_ShowMon: + call BGEffect_CheckFlyDigStatus + jr z, .not_flying + call EndBattleBGEffect + ret + +.not_flying + call BGEffect_CheckBattleTurn + jr nz, .player_side + ld de, .EnemyData + jr .got_pointer + +.player_side + ld de, .PlayerData +.got_pointer + ld a, e + ld [wBattlePicResizeTempPointer], a + ld a, d + ld [wBattlePicResizeTempPointer + 1], a + call BattleBGEffect_RunPicResizeScript + ret + +.PlayerData: + db 0, $31, 0 + db -1 +.EnemyData: + db 3, $00, 3 + db -1 + +BattleBGEffect_BattlerObj_1Row: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw BattleBGEffects_IncAnonJumptableIndex + dw BattleBGEffects_IncAnonJumptableIndex + dw BattleBGEffects_IncAnonJumptableIndex + dw .five + +.zero + call BGEffect_CheckFlyDigStatus + jr z, .not_flying_digging + ld hl, wLastAnimObjectIndex + inc [hl] + call EndBattleBGEffect + ret + +.not_flying_digging + call BattleBGEffects_IncAnonJumptableIndex + push bc + call BGEffect_CheckBattleTurn + jr nz, .player_side + ld a, ANIM_OBJ_ENEMYFEET_1ROW + ld [wBattleObjectTempID], a + ld a, 16 * TILE_WIDTH + 4 + jr .okay + +.player_side + ld a, ANIM_OBJ_PLAYERHEAD_1ROW + ld [wBattleObjectTempID], a + ld a, 6 * TILE_WIDTH +.okay + ld [wBattleObjectTempXCoord], a + ld a, 8 * TILE_WIDTH + ld [wBattleObjectTempYCoord], a + xor a + ld [wBattleObjectTempParam], a + call _QueueBattleAnimation + pop bc + ret + +.one + call BattleBGEffects_IncAnonJumptableIndex + push bc + call BGEffect_CheckBattleTurn + jr nz, .player_side_2 + hlcoord 12, 6 + lb bc, 1, 7 + jr .okay2 + +.player_side_2 + hlcoord 2, 6 + lb bc, 1, 6 +.okay2 + call ClearBox + ld a, $1 + ldh [hBGMapMode], a + pop bc + ret + +.five + xor a + ldh [hBGMapMode], a + call EndBattleBGEffect + ret + +BattleBGEffect_BattlerObj_2Row: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw BattleBGEffects_IncAnonJumptableIndex + dw BattleBGEffects_IncAnonJumptableIndex + dw BattleBGEffects_IncAnonJumptableIndex + dw .five + +.zero + call BGEffect_CheckFlyDigStatus + jr z, .not_flying_digging + ld hl, wLastAnimObjectIndex + inc [hl] + call EndBattleBGEffect + ret + +.not_flying_digging + call BattleBGEffects_IncAnonJumptableIndex + push bc + call BGEffect_CheckBattleTurn + jr nz, .player_side + ld a, ANIM_OBJ_ENEMYFEET_2ROW + ld [wBattleObjectTempID], a + ld a, 16 * TILE_WIDTH + 4 + jr .okay + +.player_side + ld a, ANIM_OBJ_PLAYERHEAD_2ROW + ld [wBattleObjectTempID], a + ld a, 6 * TILE_WIDTH +.okay + ld [wBattleObjectTempXCoord], a + ld a, 8 * TILE_WIDTH + ld [wBattleObjectTempYCoord], a + xor a + ld [wBattleObjectTempParam], a + call _QueueBattleAnimation + pop bc + ret + +.one + call BattleBGEffects_IncAnonJumptableIndex + push bc + call BGEffect_CheckBattleTurn + jr nz, .player_side_2 + hlcoord 12, 5 + lb bc, 2, 7 + jr .okay2 + +.player_side_2 + hlcoord 2, 6 + lb bc, 2, 6 +.okay2 + call ClearBox + ld a, $1 + ldh [hBGMapMode], a + pop bc + ret + +.five + xor a + ldh [hBGMapMode], a + call EndBattleBGEffect + ret + +_QueueBattleAnimation: + callfar QueueBattleAnimation + ret + +BattleBGEffect_RemoveMon: +; Slides mon out of screen + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw BattleBGEffects_IncAnonJumptableIndex + dw BattleBGEffects_IncAnonJumptableIndex + dw .four + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BGEffect_CheckBattleTurn + ld [hl], a + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + and a + jr z, .user + ld a, $9 + jr .okay + +.user + ld a, $8 +.okay + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], a + ret + +.one + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + and a + jr z, .user_2 + hlcoord 0, 6 + lb de, 8, 6 +.row1 + push de + push hl +.col1 + inc hl + ld a, [hld] + ld [hli], a + dec d + jr nz, .col1 + pop hl + ld de, SCREEN_WIDTH + add hl, de + pop de + dec e + jr nz, .row1 + jr .okay2 + +.user_2 + hlcoord 19, 0 + lb de, 8, 7 +.row2 + push de + push hl +.col2 + dec hl + ld a, [hli] + ld [hld], a + dec d + jr nz, .col2 + pop hl + ld de, SCREEN_WIDTH + add hl, de + pop de + dec e + jr nz, .row2 +.okay2 + xor a + ldh [hBGMapThird], a + ld a, $1 + ldh [hBGMapMode], a + call BattleBGEffects_IncAnonJumptableIndex + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + dec [hl] + ret + +.four + xor a + ldh [hBGMapMode], a + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + and a + jr z, .done + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + ld [hl], $1 + ret + +.done + call EndBattleBGEffect + ret + +BattleBGEffect_EnterMon: + call BGEffect_CheckBattleTurn + jr nz, .player_turn + ld de, .EnemyData + jr .okay + +.player_turn + ld de, .PlayerData +.okay + ld a, e + ld [wBattlePicResizeTempPointer], a + ld a, d + ld [wBattlePicResizeTempPointer + 1], a + call BattleBGEffect_RunPicResizeScript + ret + +.PlayerData: + db 2, $31, 2 + db 1, $31, 1 + db 0, $31, 0 + db -1 +.EnemyData: + db 5, $00, 5 + db 4, $00, 4 + db 3, $00, 3 + db -1 + +BattleBGEffect_ReturnMon: + call BGEffect_CheckBattleTurn + jr nz, .player_turn + ld de, .EnemyData + jr .okay + +.player_turn + ld de, .PlayerData +.okay + ld a, e + ld [wBattlePicResizeTempPointer], a + ld a, d + ld [wBattlePicResizeTempPointer + 1], a + call BattleBGEffect_RunPicResizeScript + ret + +.PlayerData: + db 0, $31, 0 + db -2, $66, 0 + db 1, $31, 1 + db -2, $44, 1 + db 2, $31, 2 + db -2, $22, 2 + db -3, $00, 0 + db -1 +.EnemyData: + db 3, $00, 3 + db -2, $77, 3 + db 4, $00, 4 + db -2, $55, 4 + db 5, $00, 5 + db -2, $33, 5 + db -3, $00, 0 + db -1 + +BattleBGEffect_RunPicResizeScript: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw BattleBGEffects_IncAnonJumptableIndex + dw BattleBGEffects_IncAnonJumptableIndex + dw .restart + dw .end + +.zero + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld e, [hl] + ld d, $0 + inc [hl] + ld a, [wBattlePicResizeTempPointer] + ld l, a + ld a, [wBattlePicResizeTempPointer + 1] + ld h, a + add hl, de + add hl, de + add hl, de + ld a, [hl] + cp -1 + jr z, .end + cp -2 + jr z, .clear + cp -3 + jr z, .skip + call .PlaceGraphic +.skip + call BattleBGEffects_IncAnonJumptableIndex + ld a, $1 + ldh [hBGMapMode], a + ret + +.clear + call .ClearBox + jr .zero + +.restart + xor a + ldh [hBGMapMode], a + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + ld [hl], $0 + ret + +.end + xor a + ldh [hBGMapMode], a + call EndBattleBGEffect + ret + +.ClearBox: +; get dims + push bc + inc hl + ld a, [hli] + ld b, a + and $f + ld c, a + ld a, b + swap a + and $f + ld b, a +; get coords + ld e, [hl] + ld d, 0 + ld hl, .Coords + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call ClearBox + pop bc + ret + +.PlaceGraphic: +; get dims + push bc + push hl + ld e, [hl] + ld d, 0 + ld hl, .BGSquares + add hl, de + add hl, de + add hl, de + ld a, [hli] + ld b, a + and $f + ld c, a + ld a, b + swap a + and $f + ld b, a +; store pointer + ld e, [hl] + inc hl + ld d, [hl] +; get byte + pop hl + inc hl + ld a, [hli] + ld [wBattlePicResizeTempBaseTileID], a +; get coord + push de + ld e, [hl] + ld d, 0 + ld hl, .Coords + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + pop de +; fill box +.row + push bc + push hl + ld a, [wBattlePicResizeTempBaseTileID] + ld b, a +.col + ld a, [de] + add b + ld [hli], a + inc de + dec c + jr nz, .col + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + pop bc + ret + +.Coords: + dwcoord 2, 6 + dwcoord 3, 8 + dwcoord 4, 10 + dwcoord 12, 0 + dwcoord 13, 2 + dwcoord 14, 4 + +.BGSquares: +MACRO bgsquare + dn \1, \2 + dw \3 +ENDM + + bgsquare 6, 6, .SixBySix + bgsquare 4, 4, .FourByFour + bgsquare 2, 2, .TwoByTwo + bgsquare 7, 7, .SevenBySeven + bgsquare 5, 5, .FiveByFive + bgsquare 3, 3, .ThreeByThree + +.SixBySix: + db $00, $06, $0c, $12, $18, $1e + db $01, $07, $0d, $13, $19, $1f + db $02, $08, $0e, $14, $1a, $20 + db $03, $09, $0f, $15, $1b, $21 + db $04, $0a, $10, $16, $1c, $22 + db $05, $0b, $11, $17, $1d, $23 + +.FourByFour: + db $00, $0c, $12, $1e + db $02, $0e, $14, $20 + db $03, $0f, $15, $21 + db $05, $11, $17, $23 + +.TwoByTwo: + db $00, $1e + db $05, $23 + +.SevenBySeven: + db $00, $07, $0e, $15, $1c, $23, $2a + db $01, $08, $0f, $16, $1d, $24, $2b + db $02, $09, $10, $17, $1e, $25, $2c + db $03, $0a, $11, $18, $1f, $26, $2d + db $04, $0b, $12, $19, $20, $27, $2e + db $05, $0c, $13, $1a, $21, $28, $2f + db $06, $0d, $14, $1b, $22, $29, $30 + +.FiveByFive: + db $00, $07, $15, $23, $2a + db $01, $08, $16, $24, $2b + db $03, $0a, $18, $26, $2d + db $05, $0c, $1a, $28, $2f + db $06, $0d, $1b, $29, $30 + +.ThreeByThree: + db $00, $15, $2a + db $03, $18, $2d + db $06, $1b, $30 + +BattleBGEffect_Surf: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + lb de, 2, 2 + call InitSurfWaves + +.one + ldh a, [hLCDCPointer] + and a + ret z + push bc + call .RotatewSurfWaveBGEffect + pop bc + ret + +.two + call BattleAnim_ResetLCDStatCustom + ret + +.RotatewSurfWaveBGEffect: + ld hl, wSurfWaveBGEffect + ld de, wSurfWaveBGEffect + 1 + ld c, wSurfWaveBGEffectEnd - wSurfWaveBGEffect - 1 + ld a, [hl] + push af +.loop + ld a, [de] + inc de + ld [hli], a + dec c + jr nz, .loop + pop af + ld [hl], a + ld de, wLYOverridesBackup + ld hl, wSurfWaveBGEffect + ld bc, $0 +.loop2 + ldh a, [hLYOverrideStart] + cp e + jr nc, .load_zero + push hl + add hl, bc + ld a, [hl] + pop hl + jr .okay + +.load_zero + xor a +.okay + ld [de], a + ld a, c + inc a + and $3f + ld c, a + inc de + ld a, e + cp $5f + jr c, .loop2 + ret + +BattleBGEffect_Whirlpool: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCY) + ldh [hLCDCPointer], a + xor a + ldh [hLYOverrideStart], a + ld a, $5e + ldh [hLYOverrideEnd], a + lb de, 2, 2 + call DeformScreen + ret + +.one + call BattleBGEffect_WavyScreenFX + ret + +.two + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_StartWater: + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCY) + call BattleBGEffect_SetLCDStatCustoms1 + call EndBattleBGEffect + ret + +BattleBGEffect_Water: +; BG_EFFECT_STRUCT_JT_INDEX: defines Y position of deformation + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + ld e, a + add $4 + ld [hl], a + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + and $f0 + swap a + xor $ff + add $4 + ld d, a + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + ld a, [hl] + ld [wBattleSineWaveTempProgress], a + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + cp $20 + jr nc, .done + inc [hl] + inc [hl] + call DeformWater + ret + +.done + call BattleBGEffects_ClearLYOverrides + call EndBattleBGEffect + ret + +BattleBGEffect_EndWater: + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_Psychic: +; Hardcoded to always affect opponent + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCX) + ldh [hLCDCPointer], a + xor a + ldh [hLYOverrideStart], a + ld a, $5f + ldh [hLYOverrideEnd], a + lb de, 6, 5 + call DeformScreen + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], $0 + ret + +.one + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + inc [hl] + and $3 + ret nz + call BattleBGEffect_WavyScreenFX + ret + +.two + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_Teleport: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCX) + call BattleBGEffect_SetLCDStatCustoms1 + lb de, 6, 5 + call DeformScreen + ret + +.one + call BattleBGEffect_WavyScreenFX + ret + +.two + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_NightShade: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCY) + call BattleBGEffect_SetLCDStatCustoms1 + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld e, [hl] + ld d, 2 + call DeformScreen + ret + +.one + call BattleBGEffect_WavyScreenFX + ret + +.two + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_DoubleTeam: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + dw .four + dw .five + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCX) + call BattleBGEffect_SetLCDStatCustoms1 + ldh a, [hLYOverrideEnd] + inc a + ldh [hLYOverrideEnd], a + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld [hl], $0 + ret + +.one + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + cp $10 + jr nc, .next + inc [hl] + call .UpdateLYOverrides + ret + +.three + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + cp $ff + jr z, .next + dec [hl] + call .UpdateLYOverrides + ret + +.next + call BattleBGEffects_IncAnonJumptableIndex + ret + +.two + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + ld d, $2 + call BattleBGEffects_Sine + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + add [hl] + call .UpdateLYOverrides + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + add $4 + ld [hl], a + +.four + ret + +.UpdateLYOverrides: + ld e, a + xor $ff + inc a + ld d, a + ld h, HIGH(wLYOverridesBackup) + ldh a, [hLYOverrideStart] + ld l, a + ldh a, [hLYOverrideEnd] + sub l + srl a + push af +.loop + ld [hl], e + inc hl + ld [hl], d + inc hl + dec a + jr nz, .loop + pop af + ret nc + ld [hl], e + ret + +.five + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_AcidArmor: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCY) + call BattleBGEffect_SetLCDStatCustoms1 + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld e, [hl] + ld d, 2 + call DeformScreen + ld h, HIGH(wLYOverridesBackup) + ldh a, [hLYOverrideEnd] + ld l, a + ld [hl], $0 + dec l + ld [hl], $0 + ret + +.one + ldh a, [hLYOverrideEnd] + ld l, a + ld h, HIGH(wLYOverridesBackup) + ld e, l + ld d, h + dec de +.loop + ld a, [de] + dec de + ld [hld], a + ldh a, [hLYOverrideStart] + cp l + jr nz, .loop + ld [hl], $90 + ldh a, [hLYOverrideEnd] + ld l, a + ld a, [hl] + cp $1 + jr c, .okay + cp $90 + jr z, .okay + ld [hl], $0 +.okay + dec l + ld a, [hl] + cp $2 + ret c + cp $90 + ret z + ld [hl], $0 + ret + +.two + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_Withdraw: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCY) + call BattleBGEffect_SetLCDStatCustoms1 + ldh a, [hLYOverrideEnd] + inc a + ldh [hLYOverrideEnd], a + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld [hl], $1 + ret + +.one + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + and $3f + ld d, a + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + cp d + ret nc + call BGEffect_DisplaceLYOverridesBackup + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + rlca + rlca + and $3 + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + add [hl] + ld [hl], a + ret + +.two + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_Dig: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCY) + call BattleBGEffect_SetLCDStatCustoms1 + ldh a, [hLYOverrideEnd] + inc a + ldh [hLYOverrideEnd], a + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld [hl], $2 + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], $0 + ret + +.one + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + and a + jr z, .next + dec [hl] + ret + +.next + ld [hl], $10 + call BattleBGEffects_IncAnonJumptableIndex +.two + ldh a, [hLYOverrideStart] + ld l, a + ldh a, [hLYOverrideEnd] + sub l + dec a + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + cp [hl] + ret c + ld a, [hl] + push af + and $7 + jr nz, .skip + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + dec [hl] +.skip + pop af + call BGEffect_DisplaceLYOverridesBackup + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + inc [hl] + inc [hl] + ret + +.three + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_Tackle: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw Tackle_MoveForward + dw Tackle_ReturnMove + dw .three + +.zero +; Prepares mon to move forward (player moves right, enemy moves left) +; BG_EFFECT_STRUCT_PARAM will keep track of distance moved, so it's reset to 0 here +; BG_EFFECT_STRUCT_BATTLE_TURN is set to 2 or -2 depending on target + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCX) + call BattleBGEffect_SetLCDStatCustoms1 + ldh a, [hLYOverrideEnd] + inc a + ldh [hLYOverrideEnd], a + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], 0 + call BGEffect_CheckBattleTurn + jr nz, .player_side + ld a, 2 + jr .okay + +.player_side + ld a, -2 +.okay + ld [hl], a + ret + +.three + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_BodySlam: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw Tackle_MoveForward + dw Tackle_ReturnMove + dw .three + +.zero +; Prepares mon to move forward (player moves right, enemy moves left) +; BG_EFFECT_STRUCT_PARAM will keep track of distance moved, so it's reset to 0 here +; BG_EFFECT_STRUCT_BATTLE_TURN is set to 2 or -2 depending on target + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCX) + call BattleBGEffect_SetLCDStatCustoms2 + ldh a, [hLYOverrideEnd] + inc a + ldh [hLYOverrideEnd], a + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], 0 + call BGEffect_CheckBattleTurn + jr nz, .player_side + ld a, 2 + jr .okay + +.player_side + ld a, -2 +.okay + ld [hl], a + ret + +.three + call BattleAnim_ResetLCDStatCustom + ret + +Tackle_MoveForward: +; Moves user horizontally in a direction that can be positive or negative. When the limit is reached (8 pixels) we move to the next function in the jumptable (Tackle_ReturnMove) +; BG_EFFECT_STRUCT_BATTLE_TURN: speed and direction +; BG_EFFECT_STRUCT_PARAM: keeps track of distance moved + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + cp -8 + jr z, .reached_limit + cp 8 + jr nz, .finish +.reached_limit + call BattleBGEffects_IncAnonJumptableIndex +.finish + call Rollout_FillLYOverridesBackup + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + add [hl] + ld [hl], a + ret + +Tackle_ReturnMove: +; Move user horizontally back to initial position. When we back to position 0, we move to the next function in the jumptable +; BG_EFFECT_STRUCT_BATTLE_TURN: is turned into a negative number (this number is not saved to preserve the initial number) +; BG_EFFECT_STRUCT_PARAM: keeps track of distance moved + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + and a + jr nz, .move_back + call BattleBGEffects_IncAnonJumptableIndex +.move_back + call Rollout_FillLYOverridesBackup + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + xor $ff + inc a + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + add [hl] + ld [hl], a + ret + +Rollout_FillLYOverridesBackup: + push af + ld a, [wFXAnimID + 1] + if HIGH(ROLLOUT) + cp HIGH(ROLLOUT) + else + or a + endc + jr nz, .not_rollout + ld a, [wFXAnimID] + cp LOW(ROLLOUT) + jr z, .rollout +.not_rollout + pop af + jp BGEffect_FillLYOverridesBackup + +.rollout + ldh a, [hLYOverrideStart] + ld d, a + ldh a, [hLYOverrideEnd] + sub d + ld d, a + ld h, HIGH(wLYOverridesBackup) + ldh a, [hSCY] + or a + jr nz, .skip1 + ldh a, [hLYOverrideStart] + or a + jr z, .skip2 + dec a + ld l, a + ld [hl], $0 + jr .skip2 + +.skip1 + ldh a, [hLYOverrideEnd] + dec a + ld l, a + ld [hl], $0 +.skip2 + ldh a, [hSCY] + ld l, a + ldh a, [hLYOverrideStart] + sub l + jr nc, .skip3 + xor a + dec d +.skip3 + ld l, a + pop af +.loop + ld [hli], a + dec d + jr nz, .loop + ret + +BattleBGEffect_BetaPursuit: ; unused + call BattleBGEffects_AnonJumptable +.anon_dw + dw VitalThrow_MoveBackwards + dw Tackle_MoveForward + dw Tackle_ReturnMove + dw .three + +.three + call BattleAnim_ResetLCDStatCustom + ret + +VitalThrow_MoveBackwards: +; Prepares mon to move back back (player moves left, enemy moves right) +; BG_EFFECT_STRUCT_PARAM: keeps track of distance moved, so it's reset to 0 here + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCX) + call BattleBGEffect_SetLCDStatCustoms1 + ldh a, [hLYOverrideEnd] + inc a + ldh [hLYOverrideEnd], a + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], $0 + call BGEffect_CheckBattleTurn + jr nz, .player_turn + ld a, -2 + jr .okay + +.player_turn + ld a, 2 +.okay + ld [hl], a + ret + +BattleBGEffect_VitalThrow: + call BattleBGEffects_AnonJumptable +.anon_dw + dw VitalThrow_MoveBackwards + dw Tackle_MoveForward + dw .two + dw Tackle_ReturnMove + dw .four + +.four + call BattleAnim_ResetLCDStatCustom +.two + ret + +BattleBGEffect_WobbleMon: +; Similar to BattleBGEffect_WobblePlayer, except it can affect either side and the sine movement has a radius of 8 instead of 6 and it moves at twice the rate + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCX) + call BattleBGEffect_SetLCDStatCustoms1 + ldh a, [hLYOverrideEnd] + inc a + ldh [hLYOverrideEnd], a + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], $0 + ret + +.one + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + ld d, $8 + call BattleBGEffects_Sine + call BGEffect_FillLYOverridesBackup + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + add $4 + ld [hl], a + ret + +.two + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_Flail: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCX) + call BattleBGEffect_SetLCDStatCustoms1 + ldh a, [hLYOverrideEnd] + inc a + ldh [hLYOverrideEnd], a + xor a + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld [hli], a + ld [hl], a + ret + +.one + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + ld d, $6 + call BattleBGEffects_Sine + push af + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + ld d, $2 + call BattleBGEffects_Sine + ld e, a + pop af + add e + call BGEffect_FillLYOverridesBackup + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + add $8 + ld [hl], a + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + add $2 + ld [hl], a + ret + +.two + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_WaveDeformMon: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCX) + call BattleBGEffect_SetLCDStatCustoms1 + ret + +.one + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + cp $20 + ret nc + inc [hl] + ld d, a + ld e, 4 + call DeformScreen + ret + +.two + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + and a + jr z, .reset + dec [hl] + ld d, a + ld e, 4 + call DeformScreen + ret + +.reset + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_BounceDown: + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCY) + call BattleBGEffect_SetLCDStatCustoms2 + ldh a, [hLYOverrideEnd] + inc a + ldh [hLYOverrideEnd], a + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld [hl], $1 + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], $20 + ret + +.one + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + cp $38 + ret nc + push af + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + ld d, $10 + call BattleBGEffects_Cosine + add $10 + ld d, a + pop af + add d + call BGEffect_DisplaceLYOverridesBackup + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + inc [hl] + inc [hl] + ret + +.two + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_BetaSendOutMon1: ; unused + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + dw .four + dw .five + +.zero + call BattleBGEffects_IncAnonJumptableIndex + ld a, $e4 + call BattleBGEffects_SetLYOverrides + ld a, $47 + call BattleBGEffect_SetLCDStatCustoms1 + ldh a, [hLYOverrideEnd] + inc a + ldh [hLYOverrideEnd], a + ldh a, [hLYOverrideStart] + ld l, a + ld h, HIGH(wLYOverridesBackup) +.loop + ldh a, [hLYOverrideEnd] + cp l + jr z, .done + xor a + ld [hli], a + jr .loop + +.done + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], $0 +.one +.four + ret + +.two + call .GetLYOverride + jr nc, .next + call .SetLYOverridesBackup + ret + +.next + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], $0 + ldh a, [hLYOverrideStart] + inc a + ldh [hLYOverrideStart], a + call BattleBGEffects_IncAnonJumptableIndex + ret + +.three + call .GetLYOverride + jr nc, .finish + call .SetLYOverridesBackup + ldh a, [hLYOverrideEnd] + dec a + ld l, a + ld [hl], e + ret + +.finish + call BattleBGEffects_IncAnonJumptableIndex + ret + +.SetLYOverridesBackup: + ld e, a + ldh a, [hLYOverrideStart] + ld l, a + ldh a, [hLYOverrideEnd] + sub l + srl a + ld h, HIGH(wLYOverridesBackup) +.loop2 + ld [hl], e + inc hl + inc hl + dec a + jr nz, .loop2 + ret + +.five + call BattleBGEffects_ResetVideoHRAM + ret + +.GetLYOverride: + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + inc [hl] + srl a + srl a + srl a + ld e, a + ld d, 0 + ld hl, .data + add hl, de + ld a, [hl] + cp $ff + ret + +.data + db $00, $40, $90, $e4 + db -1 + +BattleBGEffect_BetaSendOutMon2: ; unused + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCX) + call BattleBGEffect_SetLCDStatCustoms1 + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld [hl], $40 + ret + +.one + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + and a + jr z, .done + dec [hl] + srl a + srl a + srl a + and $f + ld d, a + ld e, a + call DeformScreen + ret + +.done + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_FadeMonsToBlackRepeating: + ldh a, [hCGB] + and a + jr nz, .cgb + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + ld a, $e4 + call BattleBGEffects_SetLYOverrides + ld a, LOW(rBGP) + ldh [hLCDCPointer], a + xor a + ldh [hLYOverrideStart], a + ld a, $60 + ldh [hLYOverrideEnd], a + ret + +.one + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + inc [hl] + ld e, a + and $7 + ret nz + ld a, e + and $18 + sla a + swap a + sla a + ld e, a + ld d, 0 + push bc + call BGEffect_CheckBattleTurn + jr nz, .player + ld hl, .CGB_DMGEnemyData + add hl, de + ld a, [hli] + ld [wOBP1], a + ld d, a + ld e, [hl] + lb bc, $2f, $30 + jr .okay + +.player + ld hl, .DMG_PlayerData + add hl, de + ld d, [hl] + inc hl + ld a, [hl] + ld [wOBP1], a + ld e, a + lb bc, $37, $28 +.okay + call .DMG_LYOverrideLoads + pop bc + ret + +.two + call BattleBGEffects_ResetVideoHRAM + ld a, $e4 + ld [wBGP], a + ld [wOBP1], a + ret + +.DMG_LYOverrideLoads: + ld hl, wLYOverridesBackup +.loop1 + ld [hl], d + inc hl + dec b + jr nz, .loop1 +.loop2 + ld [hl], e + inc hl + dec c + jr nz, .loop2 + ret + +.cgb + ld de, .Jumptable + call BatttleBGEffects_GetNamedJumptablePointer + jp hl + +.Jumptable: + dw .cgb_zero + dw .cgb_one + dw .cgb_two + +.cgb_zero + call BattleBGEffects_IncAnonJumptableIndex + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], $0 + ret + +.cgb_one + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + inc [hl] + ld e, a + and $7 + ret nz + ld a, e + and $18 + sla a + swap a + sla a + ld e, a + ld d, 0 + call BGEffect_CheckBattleTurn + jr nz, .player_2 + ld hl, .CGB_DMGEnemyData + add hl, de + ld a, [hli] + push hl + call BGEffects_LoadBGPal1_OBPal0 + pop hl + ld a, [hl] + call BGEffects_LoadBGPal0_OBPal1 + ret + +.player_2 + ld hl, .CGB_DMGEnemyData + add hl, de + ld a, [hli] + push hl + call BGEffects_LoadBGPal0_OBPal1 + pop hl + ld a, [hl] + call BGEffects_LoadBGPal1_OBPal0 + ret + +.cgb_two + ld a, $e4 + call BGEffects_LoadBGPal0_OBPal1 + ld a, $e4 + call BGEffects_LoadBGPal1_OBPal0 + call EndBattleBGEffect + ret + +.CGB_DMGEnemyData: + db $e4, $e4 + db $f8, $90 + db $fc, $40 + db $f8, $90 +.DMG_PlayerData: + db $e4, $e4 + db $90, $f8 + db $40, $fc + db $90, $f8 + +BattleBGEffect_RapidFlash: ; unused + ld de, .FlashPals + call BGEffect_RapidCyclePals + ret + +.FlashPals: + db $e4, $6c, $fe + +BattleBGEffect_FadeMonToLight: +; BG_EFFECT_STRUCT_BATTLE_TURN = BG_EFFECT_TARGET or BG_EFFECT_USER + ld de, .Pals + call BGEffect_RapidCyclePals + ret + +.Pals: + db $e4, $90, $40, $ff + +BattleBGEffect_FadeMonToBlack: +; BG_EFFECT_STRUCT_BATTLE_TURN = BG_EFFECT_TARGET or BG_EFFECT_USER + ld de, .Pals + call BGEffect_RapidCyclePals + ret + +.Pals: + db $e4, $f8, $fc, $ff + +BattleBGEffect_FadeMonToLightRepeating: +; BG_EFFECT_STRUCT_BATTLE_TURN = BG_EFFECT_TARGET or BG_EFFECT_USER + ld de, .Pals + call BGEffect_RapidCyclePals + ret + +.Pals: + db $e4, $90, $40, $90, $fe + +BattleBGEffect_FadeMonToBlackRepeating: +; BG_EFFECT_STRUCT_BATTLE_TURN = BG_EFFECT_TARGET or BG_EFFECT_USER + ld de, .Pals + call BGEffect_RapidCyclePals + ret + +.Pals: + db $e4, $f8, $fc, $f8, $fe + +BattleBGEffect_CycleMonLightDarkRepeating: +; BG_EFFECT_STRUCT_BATTLE_TURN = BG_EFFECT_TARGET or BG_EFFECT_USER + ld de, .Pals + call BGEffect_RapidCyclePals + ret + +.Pals: + db $e4, $f8, $fc, $f8, $e4, $90, $40, $90, $fe + +BattleBGEffect_FlashMonRepeating: ; unused +; BG_EFFECT_STRUCT_BATTLE_TURN = BG_EFFECT_TARGET or BG_EFFECT_USER + ld de, .Pals + call BGEffect_RapidCyclePals + ret + +.Pals: + db $e4, $fc, $e4, $00, $fe + +BattleBGEffect_FadeMonToWhiteWaitFadeBack: +; BG_EFFECT_STRUCT_BATTLE_TURN = BG_EFFECT_TARGET or BG_EFFECT_USER + 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 + +BattleBGEffect_FadeMonFromWhite: ; unused +; BG_EFFECT_STRUCT_BATTLE_TURN = BG_EFFECT_TARGET or BG_EFFECT_USER + ld de, .Pals + call BGEffect_RapidCyclePals + ret + +.Pals: + db $00, $40, $90, $e4, $ff + +BattleBGEffect_VibrateMon: +; Moves mon back and forth sideways for $20 frames +; BG_EFFECT_STRUCT_BATTLE_TURN = BG_EFFECT_TARGET or BG_EFFECT_USER + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCX) + call BattleBGEffect_SetLCDStatCustoms1 + ldh a, [hLYOverrideEnd] + inc a + ldh [hLYOverrideEnd], a + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld [hl], $1 + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], $20 + ret + +.one + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + and a + jr z, .finish + dec [hl] + and $1 + ret nz + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + xor $ff + inc a + ld [hl], a + call BGEffect_FillLYOverridesBackup + ret + +.finish + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_WobblePlayer: +; Always affects the player + call BattleBGEffects_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_ClearLYOverrides + ld a, LOW(rSCX) + ldh [hLCDCPointer], a + xor a + ldh [hLYOverrideStart], a + ld a, $37 + ldh [hLYOverrideEnd], a + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], $0 + ret + +.one + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + cp $40 + jr nc, .two + ld d, $6 + call BattleBGEffects_Sine + call BGEffect_FillLYOverridesBackup + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + add $2 + ld [hl], a + ret + +.two + call BattleAnim_ResetLCDStatCustom + ret + +BattleBGEffect_Rollout: + call BattleBGEffects_GetShakeAmount + jr c, .xor_a + bit 7, a + jr z, .okay +.xor_a + xor a +.okay + push af + call DelayFrame + pop af + ldh [hSCY], a + xor $ff + inc a + ld [wAnimObject1YOffset], a + ret + +BattleBGEffect_ShakeScreenX: + call BattleBGEffects_GetShakeAmount + jr nc, .skip + xor a +.skip + ldh [hSCX], a + ret + +BattleBGEffect_ShakeScreenY: + call BattleBGEffects_GetShakeAmount + jr nc, .skip + xor a +.skip + ldh [hSCY], a + ret + +BattleBGEffects_GetShakeAmount: + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + ld a, [hl] + and a + jr nz, .okay + call EndBattleBGEffect + scf + ret + +.okay + dec [hl] + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + and $f + jr z, .every_16_frames + dec [hl] + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + and a + ret + +.every_16_frames + ld a, [hl] + swap a + or [hl] + ld [hl], a + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + xor $ff + inc a + ld [hl], a + and a + ret + +BattleBGEffect_WobbleScreen: + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + cp $40 + jr nc, .finish + ld d, $6 + call BattleBGEffects_Sine + ldh [hSCX], a + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + add $2 + ld [hl], a + ret + +.finish + xor a + ldh [hSCX], a + ret + +BattleBGEffect_GetNthDMGPal: + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + ld a, [hl] + and a + jr z, .zero + dec [hl] + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + call BattleBGEffect_GetNextDMGPal + ret + +.zero + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + ld hl, BG_EFFECT_STRUCT_JT_INDEX + add hl, bc + ld [hl], a + call BattleBGEffect_GetFirstDMGPal + ret + +BGEffect_RapidCyclePals: +; Last index in DE: $fe signals a loop, $ff signals end + ldh a, [hCGB] + and a + jr nz, .cgb + push de + ld de, .Jumptable_DMG + call BatttleBGEffects_GetNamedJumptablePointer + pop de + jp hl + +.Jumptable_DMG: + dw .zero_dmg + dw .one_dmg + dw .two_dmg + +.zero_dmg + call BattleBGEffects_IncAnonJumptableIndex + ld a, $e4 + call BattleBGEffects_SetLYOverrides + ld a, $47 + call BattleBGEffect_SetLCDStatCustoms1 + ldh a, [hLYOverrideEnd] + inc a + ldh [hLYOverrideEnd], a + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + ld [hl], $0 + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld [hl], a + ret + +.one_dmg + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + and $f + jr z, .okay_1_dmg + dec [hl] + ret + +.okay_1_dmg + ld a, [hl] + swap a + or [hl] + ld [hl], a + call BattleBGEffect_GetFirstDMGPal + jr c, .okay_2_dmg + call BGEffect_FillLYOverridesBackup + ret + +.okay_2_dmg + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + dec [hl] + ret + +.two_dmg + call BattleBGEffects_ResetVideoHRAM + ld a, %11100100 + ldh [rBGP], a + call EndBattleBGEffect + ret + +.cgb + push de + ld de, .Jumptable_CGB + call BatttleBGEffects_GetNamedJumptablePointer + pop de + jp hl + +.Jumptable_CGB: + dw .zero_cgb + dw .one_cgb + dw .two_cgb + dw .three_cgb + dw .four_cgb + +.zero_cgb + call BGEffect_CheckBattleTurn + jr nz, .player_turn_cgb + call BattleBGEffects_IncAnonJumptableIndex + call BattleBGEffects_IncAnonJumptableIndex +.player_turn_cgb + call BattleBGEffects_IncAnonJumptableIndex + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + ld [hl], $0 + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld [hl], a + ret + +.one_cgb + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + and $f + jr z, .okay_1_cgb + dec [hl] + ret + +.okay_1_cgb + ld a, [hl] + swap a + or [hl] + ld [hl], a + call BattleBGEffect_GetFirstDMGPal + jr c, .okay_2_cgb + call BGEffects_LoadBGPal0_OBPal1 + ret + +.okay_2_cgb + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + dec [hl] + ret + +.two_cgb + ld a, $e4 + call BGEffects_LoadBGPal0_OBPal1 + call EndBattleBGEffect + ret + +.three_cgb + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ld a, [hl] + and $f + jr z, .okay_3_cgb + dec [hl] + ret + +.okay_3_cgb + ld a, [hl] + swap a + or [hl] + ld [hl], a + call BattleBGEffect_GetFirstDMGPal + jr c, .okay_4_cgb + call BGEffects_LoadBGPal1_OBPal0 + ret + +.okay_4_cgb + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + dec [hl] + ret + +.four_cgb + ld a, $e4 + call BGEffects_LoadBGPal1_OBPal0 + call EndBattleBGEffect + ret + +BGEffects_LoadBGPal0_OBPal1: + ld h, a + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld a, h + push bc + push af + ld hl, wBGPals2 + ld de, wBGPals1 + ld b, a + ld c, $1 + call CopyPals + ld hl, wOBPals2 palette 1 + ld de, wOBPals1 palette 1 + pop af + ld b, a + ld c, $1 + call CopyPals + pop bc + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +BGEffects_LoadBGPal1_OBPal0: + ld h, a + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld a, h + push bc + push af + ld hl, wBGPals2 palette 1 + ld de, wBGPals1 palette 1 + ld b, a + ld c, $1 + call CopyPals + ld hl, wOBPals2 + ld de, wOBPals1 + pop af + ld b, a + ld c, $1 + call CopyPals + pop bc + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +BattleBGEffect_GetFirstDMGPal: + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld a, [hl] + inc [hl] +BattleBGEffect_GetNextDMGPal: + ld l, a + ld h, 0 + add hl, de + ld a, [hl] + cp -1 + jr z, .quit + cp -2 + jr nz, .repeat + ld a, [de] + ld hl, BG_EFFECT_STRUCT_PARAM + add hl, bc + ld [hl], $0 +.repeat + and a + ret + +.quit + scf + ret + +BattleBGEffects_ClearLYOverrides: + xor a +BattleBGEffects_SetLYOverrides: + ld hl, wLYOverrides + ld e, $99 +.loop1 + ld [hli], a + dec e + jr nz, .loop1 + ld hl, wLYOverridesBackup + ld e, $91 +.loop2 + ld [hli], a + dec e + jr nz, .loop2 + ret + +BattleBGEffect_SetLCDStatCustoms1: + ldh [hLCDCPointer], a + call BGEffect_CheckBattleTurn + jr nz, .player_turn + lb de, $00, $36 + jr .okay + +.player_turn + lb de, $2f, $5e +.okay + ld a, d + ldh [hLYOverrideStart], a + ld a, e + ldh [hLYOverrideEnd], a + ret + +BattleBGEffect_SetLCDStatCustoms2: + ldh [hLCDCPointer], a + call BGEffect_CheckBattleTurn + jr nz, .player_turn + lb de, $00, $36 + jr .okay + +.player_turn + lb de, $2d, $5e +.okay + ld a, d + ldh [hLYOverrideStart], a + ld a, e + ldh [hLYOverrideEnd], a + ret + +BattleAnim_ResetLCDStatCustom: + xor a + ldh [hLYOverrideStart], a + ldh [hLYOverrideEnd], a + call BattleBGEffects_ClearLYOverrides + xor a + ldh [hLCDCPointer], a + call EndBattleBGEffect + ret + +BattleBGEffects_ResetVideoHRAM: + xor a + ldh [hLCDCPointer], a + ld a, %11100100 + ldh [rBGP], a + ld [wBGP], a + ld [wOBP1], a + ldh [hLYOverrideStart], a + ldh [hLYOverrideEnd], a + call BattleBGEffects_ClearLYOverrides + ret + +DeformScreen: + push bc + xor a + ld [wBattleSineWaveTempProgress], a + ld a, e + ld [wBattleSineWaveTempOffset], a + ld a, d + ld [wBattleSineWaveTempAmplitude], a + ld a, $80 + ld [wBattleSineWaveTempTimer], a + ld bc, wLYOverridesBackup +.loop + ldh a, [hLYOverrideStart] + cp c + jr nc, .next + ldh a, [hLYOverrideEnd] + cp c + jr c, .next + ld a, [wBattleSineWaveTempAmplitude] + ld d, a + ld a, [wBattleSineWaveTempProgress] + call BattleBGEffects_Sine + ld [bc], a +.next + inc bc + ld a, [wBattleSineWaveTempOffset] + ld hl, wBattleSineWaveTempProgress + add [hl] + ld [hl], a + ld hl, wBattleSineWaveTempTimer + dec [hl] + jr nz, .loop + pop bc + ret + +InitSurfWaves: + push bc + xor a + ld [wBattleSineWaveTempProgress], a + ld a, e + ld [wBattleSineWaveTempOffset], a + ld a, d + ld [wBattleSineWaveTempAmplitude], a + ld a, $40 + ld [wBattleSineWaveTempTimer], a + ld bc, wSurfWaveBGEffect +.loop + ld a, [wBattleSineWaveTempAmplitude] + ld d, a + ld a, [wBattleSineWaveTempProgress] + call BattleBGEffects_Sine + ld [bc], a + inc bc + ld a, [wBattleSineWaveTempOffset] + ld hl, wBattleSineWaveTempProgress + add [hl] + ld [hl], a + ld hl, wBattleSineWaveTempTimer + dec [hl] + jr nz, .loop + pop bc + ret + +DeformWater: + push bc + ld [wBattleSineWaveTempTimer], a + ld a, e + ld [wBattleSineWaveTempOffset], a + ld a, d + ld [wBattleSineWaveTempAmplitude], a + call .GetLYOverrideBackupAddrOffset + ld hl, wLYOverridesBackup + add hl, de + ld c, l + ld b, h +.loop + ld a, [wBattleSineWaveTempTimer] + and a + jr z, .done + dec a + ld [wBattleSineWaveTempTimer], a + push af + ld a, [wBattleSineWaveTempAmplitude] + ld d, a + ld a, [wBattleSineWaveTempOffset] + push hl + call BattleBGEffects_Sine + ld e, a + pop hl + ldh a, [hLYOverrideEnd] + cp c + jr c, .skip1 + ld a, e + ld [bc], a + inc bc +.skip1 + ldh a, [hLYOverrideStart] + cp l + jr nc, .skip2 + ld [hl], e + dec hl +.skip2 + ld a, [wBattleSineWaveTempOffset] + add $4 + ld [wBattleSineWaveTempOffset], a + pop af + jr .loop + +.done + pop bc + and a + ret + +.GetLYOverrideBackupAddrOffset: + ldh a, [hLYOverrideStart] + ld e, a + ld a, [wBattleSineWaveTempProgress] + add e + ld e, a + ld d, 0 + ret + +BattleBGEffect_WavyScreenFX: + push bc + ldh a, [hLYOverrideStart] + ld l, a + inc a + ld e, a + ld h, HIGH(wLYOverridesBackup) + ld d, h + ldh a, [hLYOverrideEnd] + sub l + and a + jr z, .done + ld c, a + ld a, [hl] + push af +.loop + ld a, [de] + inc de + ld [hli], a + dec c + jr nz, .loop + pop af + ld [hl], a +.done + pop bc + ret + +BGEffect_FillLYOverridesBackup: + push af + ld h, HIGH(wLYOverridesBackup) + ldh a, [hLYOverrideStart] + ld l, a + ldh a, [hLYOverrideEnd] + sub l + ld d, a + pop af +.loop + ld [hli], a + dec d + jr nz, .loop + ret + +BGEffect_DisplaceLYOverridesBackup: + ; e = a + ; d = [hLYOverrideEnd] - [hLYOverrideStart] - a + push af + ld e, a + ldh a, [hLYOverrideStart] + ld l, a + ldh a, [hLYOverrideEnd] + sub l + sub e + ld d, a + ld h, HIGH(wLYOverridesBackup) + ldh a, [hLYOverrideStart] + ld l, a + ld a, $90 +.loop + ld [hli], a + dec e + jr nz, .loop + pop af + xor $ff +.loop2 + ld [hli], a + dec d + jr nz, .loop2 + ret + +BGEffect_CheckBattleTurn: + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ldh a, [hBattleTurn] + and $1 + xor [hl] + ret + +BGEffect_CheckFlyDigStatus: + ld hl, BG_EFFECT_STRUCT_BATTLE_TURN + add hl, bc + ldh a, [hBattleTurn] + and $1 + xor [hl] + jr nz, .player + ld a, [wEnemySubStatus3] ; EnemySubStatus3 + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + ret + +.player + ld a, [wPlayerSubStatus3] ; PlayerSubStatus3 + and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND + ret + +BattleBGEffects_CheckSGB: + ldh a, [hSGB] + and a + ret + +BattleBGEffects_Sine: + ld e, a + callfar BattleAnim_Sine_e + ld a, e + ret + +BattleBGEffects_Cosine: + ld e, a + callfar BattleAnim_Cosine_e + ld a, e + ret diff --git a/engine/battle_anims/core.asm b/engine/battle_anims/core.asm new file mode 100644 index 0000000..b39e414 --- /dev/null +++ b/engine/battle_anims/core.asm @@ -0,0 +1,320 @@ +QueueBattleAnimation: + ld hl, wActiveAnimObjects + ld e, NUM_ANIM_OBJECTS +.loop + ld a, [hl] + and a + jr z, .done + ld bc, BATTLEANIMSTRUCT_LENGTH + add hl, bc + dec e + jr nz, .loop + scf + ret + +.done + ld c, l + ld b, h + ld hl, wLastAnimObjectIndex + inc [hl] + call InitBattleAnimation + ret + +DeinitBattleAnimation: + ld hl, BATTLEANIMSTRUCT_INDEX + add hl, bc + ld [hl], $0 + ret + +InitBattleAnimation: + ld a, [wBattleObjectTempID] + ld e, a + ld d, 0 + ld hl, BattleAnimObjects +rept BATTLEANIMOBJ_LENGTH + add hl, de +endr + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_INDEX + add hl, bc + ld a, [wLastAnimObjectIndex] + ld [hli], a ; BATTLEANIMSTRUCT_INDEX + ld a, [de] + inc de + ld [hli], a ; BATTLEANIMSTRUCT_OAMFLAGS + ld a, [de] + inc de + ld [hli], a ; BATTLEANIMSTRUCT_FIX_Y + ld a, [de] + inc de + ld [hli], a ; BATTLEANIMSTRUCT_FRAMESET_ID + ld a, [de] + inc de + ld [hli], a ; BATTLEANIMSTRUCT_FUNCTION + ld a, [de] + inc de + ld [hli], a ; BATTLEANIMSTRUCT_PALETTE + ld a, [de] + call GetBattleAnimTileOffset + ld [hli], a ; BATTLEANIMSTRUCT_TILEID + ld a, [wBattleObjectTempXCoord] + ld [hli], a ; BATTLEANIMSTRUCT_XCOORD + ld a, [wBattleObjectTempYCoord] + ld [hli], a ; BATTLEANIMSTRUCT_YCOORD + xor a + ld [hli], a ; BATTLEANIMSTRUCT_XOFFSET + ld [hli], a ; BATTLEANIMSTRUCT_YOFFSET + ld a, [wBattleObjectTempParam] + ld [hli], a ; BATTLEANIMSTRUCT_PARAM + xor a + ld [hli], a ; BATTLEANIMSTRUCT_DURATION + dec a + ld [hli], a ; BATTLEANIMSTRUCT_FRAME + xor a + ld [hli], a ; BATTLEANIMSTRUCT_JUMPTABLE_INDEX + ld [hli], a ; BATTLEANIMSTRUCT_VAR1 + ld [hl], a ; BATTLEANIMSTRUCT_VAR2 + ret + +BattleAnimOAMUpdate: + call InitBattleAnimBuffer + call GetBattleAnimFrame + cp oamwait_command + jp z, .done + cp oamdelete_command + jp z, .delete + + push af + ld hl, wBattleAnimTempOAMFlags + ld a, [wBattleAnimTempFrameOAMFlags] + xor [hl] + and PRIORITY | Y_FLIP | X_FLIP + ld [hl], a + pop af + + push bc + call GetBattleAnimOAMPointer + ld a, [wBattleAnimTempTileID] + add [hl] ; tile offset + ld [wBattleAnimTempTileID], a + inc hl + ld a, [hli] ; oam data length + ld c, a + ld a, [hli] ; oam data pointer + ld h, [hl] + ld l, a + ld a, [wBattleAnimOAMPointerLo] + ld e, a + ld d, HIGH(wShadowOAM) + +.loop + ; Y Coord + ld a, [wBattleAnimTempYCoord] + ld b, a + ld a, [wBattleAnimTempYOffset] + add b + ld b, a + push hl + ld a, [hl] + ld hl, wBattleAnimTempOAMFlags + bit OAM_Y_FLIP, [hl] + jr z, .no_yflip + add $8 + xor $ff + inc a +.no_yflip + pop hl + add b + ld [de], a + + ; X Coord + inc hl + inc de + ld a, [wBattleAnimTempXCoord] + ld b, a + ld a, [wBattleAnimTempXOffset] + add b + ld b, a + push hl + ld a, [hl] + ld hl, wBattleAnimTempOAMFlags + bit OAM_X_FLIP, [hl] + jr z, .no_xflip + add $8 + xor $ff + inc a +.no_xflip + pop hl + add b + ld [de], a + + ; Tile ID + inc hl + inc de + ld a, [wBattleAnimTempTileID] + add BATTLEANIM_BASE_TILE + add [hl] + ld [de], a + + ; Attributes + inc hl + inc de + ld a, [wBattleAnimTempOAMFlags] + ld b, a + ld a, [hl] + xor b + and PRIORITY | Y_FLIP | X_FLIP + ld b, a + ld a, [hl] + and OBP_NUM + or b + ld b, a + ld a, [wBattleAnimTempPalette] + and PALETTE_MASK | VRAM_BANK_1 + or b + ld [de], a + + inc hl + inc de + ld a, e + ld [wBattleAnimOAMPointerLo], a + cp LOW(wShadowOAMEnd) + jr nc, .exit_set_carry + dec c + jr nz, .loop + pop bc + jr .done + +.delete + call DeinitBattleAnimation + +.done + and a + ret + +.exit_set_carry + pop bc + scf + ret + +InitBattleAnimBuffer: + ld hl, BATTLEANIMSTRUCT_OAMFLAGS + add hl, bc + ld a, [hl] + + and PRIORITY + ld [wBattleAnimTempOAMFlags], a + xor a + ld [wBattleAnimTempFrameOAMFlags], a + ld hl, BATTLEANIMSTRUCT_PALETTE + add hl, bc + ld a, [hl] + ld [wBattleAnimTempPalette], a + ld hl, BATTLEANIMSTRUCT_FIX_Y + add hl, bc + ld a, [hl] + ld [wBattleAnimTempFixY], a + ld hl, BATTLEANIMSTRUCT_TILEID + add hl, bc + ld a, [hli] + ld [wBattleAnimTempTileID], a + ld a, [hli] + ld [wBattleAnimTempXCoord], a + ld a, [hli] + ld [wBattleAnimTempYCoord], a + ld a, [hli] + ld [wBattleAnimTempXOffset], a + ld a, [hli] + ld [wBattleAnimTempYOffset], a + + ldh a, [hBattleTurn] + and a + ret z + + ld hl, BATTLEANIMSTRUCT_OAMFLAGS + add hl, bc + ld a, [hl] + ld [wBattleAnimTempOAMFlags], a + bit 0, [hl] + ret z + + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hli] + ld d, a + ld a, (-10 * 8) + 4 + sub d + ld [wBattleAnimTempXCoord], a + ld a, [hli] + ld d, a + ld a, [wBattleAnimTempFixY] + cp $ff + jr nz, .vertical_flip + ld a, 5 * 8 + jr .done + +.vertical_flip + sub d + push af + push hl + push bc + ld hl, wFXAnimID + ld a, [hli] + ld c, a + ld b, [hl] + ld de, 2 + ld hl, .extra_offset_moves + call IsInWordArray + pop bc + pop hl + pop de + sbc a + and -(1 * 8) +.done + add a, d + ld [wBattleAnimTempYCoord], a + ld a, [hli] + xor $ff + inc a + ld [wBattleAnimTempXOffset], a + ret + +.extra_offset_moves + dw KINESIS + dw SOFTBOILED + dw MILK_DRINK + dw -1 + +GetBattleAnimTileOffset: + push hl + push bc + ld hl, wBattleAnimTileDict + ld b, a + ld c, NUM_BATTLEANIMTILEDICT_ENTRIES +.loop + ld a, [hli] + cp b + jr z, .load + inc hl + dec c + jr nz, .loop + xor a + jr .done + +.load + ld a, [hl] +.done + pop bc + pop hl + ret + +_ExecuteBGEffects: + callfar ExecuteBGEffects + ret + +_QueueBGEffect: + callfar QueueBGEffect + ret + +INCLUDE "data/battle_anims/objects.asm" diff --git a/engine/battle_anims/functions.asm b/engine/battle_anims/functions.asm new file mode 100644 index 0000000..6e6af6e --- /dev/null +++ b/engine/battle_anims/functions.asm @@ -0,0 +1,4319 @@ +DoBattleAnimFrame: + ld hl, BATTLEANIMSTRUCT_FUNCTION + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: +; entries correspond to BATTLEANIMFUNC_* constants + table_width 2, DoBattleAnimFrame.Jumptable + dw BattleAnimFunction_Null + dw BattleAnimFunction_MoveFromUserToTarget + dw BattleAnimFunction_MoveFromUserToTargetAndDisappear + dw BattleAnimFunction_MoveInCircle + dw BattleAnimFunction_MoveWaveToTarget + dw BattleAnimFunction_ThrowFromUserToTarget + dw BattleAnimFunction_ThrowFromUserToTargetAndDisappear + dw BattleAnimFunction_Drop + dw BattleAnimFunction_MoveFromUserToTargetSpinAround + dw BattleAnimFunction_Shake + dw BattleAnimFunction_FireBlast + dw BattleAnimFunction_RazorLeaf + dw BattleAnimFunction_Bubble + dw BattleAnimFunction_Surf + dw BattleAnimFunction_Sing + dw BattleAnimFunction_WaterGun + dw BattleAnimFunction_Ember + dw BattleAnimFunction_Powder + dw BattleAnimFunction_PokeBall + dw BattleAnimFunction_PokeBallBlocked + dw BattleAnimFunction_Recover + dw BattleAnimFunction_ThunderWave + dw BattleAnimFunction_Clamp_Encore + dw BattleAnimFunction_Bite + dw BattleAnimFunction_SolarBeam + dw BattleAnimFunction_Gust + dw BattleAnimFunction_RazorWind + dw BattleAnimFunction_Kick + dw BattleAnimFunction_Absorb + dw BattleAnimFunction_Egg + dw BattleAnimFunction_MoveUp + dw BattleAnimFunction_Wrap + dw BattleAnimFunction_LeechSeed + dw BattleAnimFunction_Sound + dw BattleAnimFunction_ConfuseRay + dw BattleAnimFunction_Dizzy + dw BattleAnimFunction_Amnesia + dw BattleAnimFunction_FloatUp + dw BattleAnimFunction_Dig + dw BattleAnimFunction_String + dw BattleAnimFunction_Paralyzed + dw BattleAnimFunction_SpiralDescent + dw BattleAnimFunction_PoisonGas + dw BattleAnimFunction_Horn + dw BattleAnimFunction_Needle + dw BattleAnimFunction_PetalDance + dw BattleAnimFunction_ThiefPayday + dw BattleAnimFunction_AbsorbCircle + dw BattleAnimFunction_Bonemerang + dw BattleAnimFunction_Shiny + dw BattleAnimFunction_SkyAttack + dw BattleAnimFunction_GrowthSwordsDance + dw BattleAnimFunction_SmokeFlameWheel + dw BattleAnimFunction_PresentSmokescreen + dw BattleAnimFunction_StrengthSeismicToss + dw BattleAnimFunction_SpeedLine + dw BattleAnimFunction_Sludge + dw BattleAnimFunction_MetronomeHand + dw BattleAnimFunction_MetronomeSparkleSketch + dw BattleAnimFunction_Agility + dw BattleAnimFunction_SacredFire + dw BattleAnimFunction_SafeguardProtect + dw BattleAnimFunction_LockOnMindReader + dw BattleAnimFunction_Spikes + dw BattleAnimFunction_HealBellNotes + dw BattleAnimFunction_BatonPass + dw BattleAnimFunction_Conversion + dw BattleAnimFunction_EncoreBellyDrum + dw BattleAnimFunction_SwaggerMorningSun + dw BattleAnimFunction_HiddenPower + dw BattleAnimFunction_Curse + dw BattleAnimFunction_PerishSong + dw BattleAnimFunction_RapidSpin + dw BattleAnimFunction_BetaPursuit + dw BattleAnimFunction_RainSandstorm + dw BattleAnimFunction_AnimObjB0 + dw BattleAnimFunction_PsychUp + dw BattleAnimFunction_AncientPower + dw BattleAnimFunction_RockSmash + dw BattleAnimFunction_Cotton + assert_table_length NUM_BATTLEANIMFUNCS + +BattleAnimFunction_Null: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one +.one + call DeinitBattleAnimation +.zero + ret + +BattleAnimFunction_ThrowFromUserToTargetAndDisappear: + call BattleAnimFunction_ThrowFromUserToTarget + ret c + call DeinitBattleAnimation + ret + +BattleAnimFunction_ThrowFromUserToTarget: + ; If x coord at $88 or beyond, abort. + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $88 + ret nc + ; Move right 2 pixels + add $2 + ld [hl], a + ; Move down 1 pixel + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + dec [hl] + ; Decrease var1 and hold onto its previous value (argument of the sine function) + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + dec [hl] + ; Get param (amplitude of the sine function) + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld d, [hl] + call BattleAnim_Sine + ; Store the sine result in the Y offset + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ; Carry flag denotes success + scf + ret + +BattleAnimFunction_MoveWaveToTarget: +; Wave motion from one mon to another. Obj is cleared when it reaches x coord $88. Examples: Shadow Ball, Dragon Rage + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $88 + jr c, .move + call DeinitBattleAnimation + ret + +.move + add $2 + ld [hl], a + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + dec [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc [hl] + inc [hl] + inc [hl] + inc [hl] + ld d, $10 + push af + push de + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + sra a + sra a + sra a + sra a + ld [hl], a + ret + +BattleAnimFunction_MoveInCircle: +; Slow circular motion. Examples: Thundershock, Flamethrower +; Obj Param: Distance from center (masked with $7F). Bit 7 causes object to start on other side of the circle + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + bit 7, [hl] + ld a, $0 + jr z, .got_starting_position + ld a, $20 +.got_starting_position + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $7f + ld [hl], a +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld d, [hl] + push af + push de + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + ret + +BattleAnimFunction_MoveFromUserToTarget: +; Moves object diagonally at a ~30° angle towards opponent and stops when it reaches x coord $84. Obj Param changes the speed + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one +.one + call DeinitBattleAnimation + ret + +.zero + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $84 + ret nc + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + call BattleAnim_StepToTarget + ret + +BattleAnimFunction_MoveFromUserToTargetAndDisappear: +; Same as BattleAnimFunction_01 but objs are cleared when they reach x coord $84 + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $84 + jr nc, .done + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + call BattleAnim_StepToTarget + ret + +.done + call DeinitBattleAnimation + ret + +BattleAnimFunction_PokeBall: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + dw .four + dw .five + dw .six + dw .seven + dw .eight + dw .nine + dw .ten + dw .eleven +.zero ; init + call GetBallAnimPal + call BattleAnim_IncAnonJumptableIndex + ret + +.one + call BattleAnimFunction_ThrowFromUserToTarget + ret c + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + add [hl] + ld [hl], a + ld a, BATTLEANIMFRAMESET_0B + call ReinitBattleAnimFrameset + call BattleAnim_IncAnonJumptableIndex + ret + +.three + call BattleAnim_IncAnonJumptableIndex + ld a, BATTLEANIMFRAMESET_09 + call ReinitBattleAnimFrameset + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $0 + inc hl + ld [hl], $10 +.four + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hli] + ld d, [hl] + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + dec a + ld [hl], a + and $1f + ret nz + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + sub $4 + ld [hl], a + ret nz + ld a, BATTLEANIMFRAMESET_0C + call ReinitBattleAnimFrameset + call BattleAnim_IncAnonJumptableIndex + ret + +.six + ld a, BATTLEANIMFRAMESET_0D + call ReinitBattleAnimFrameset + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + dec [hl] +.two +.five +.nine + ret + +.seven + call GetBallAnimPal + ld a, BATTLEANIMFRAMESET_0A + call ReinitBattleAnimFrameset + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], $20 +.eight +.ten + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hli] + ld d, [hl] + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + dec a + ld [hl], a + and $1f + jr z, .eleven + and $f + ret nz + call BattleAnim_IncAnonJumptableIndex + ret + +.eleven + call DeinitBattleAnimation + ret + +BattleAnimFunction_PokeBallBlocked: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two +.zero + call GetBallAnimPal + call BattleAnim_IncAnonJumptableIndex + ret + +.one + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $70 + jr nc, .next + call BattleAnimFunction_ThrowFromUserToTarget + ret + +.next + call BattleAnim_IncAnonJumptableIndex +.two + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + cp $80 + jr nc, .done + add $4 + ld [hl], a + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + dec [hl] + dec [hl] + ret + +.done + call DeinitBattleAnimation + ret + +GetBallAnimPal: + ld hl, BallColors + ldh a, [rSVBK] + push af + ld a, BANK(wCurItem) + ldh [rSVBK], a + ld a, [wCurItem] + ld e, a + pop af + ldh [rSVBK], a +.IsInArray: + ld a, [hli] + cp -1 + jr z, .load + cp e + jr z, .load + inc hl + jr .IsInArray + +.load + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_PALETTE + add hl, bc + ld [hl], a + ret + +INCLUDE "data/battle_anims/ball_colors.asm" + +BattleAnimFunction_Ember: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + dw .four +.zero + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + swap a + and $f + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], a + ret + +.one + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $88 + ret nc + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + call BattleAnim_StepToTarget + ret + +.two + call DeinitBattleAnimation + ret + +.three + call BattleAnim_IncAnonJumptableIndex + ld a, BATTLEANIMFRAMESET_0F + call ReinitBattleAnimFrameset +.four + ret + +BattleAnimFunction_Drop: +; Drops obj. The Obj Param dictates how fast it is (lower value is faster) and how long it stays bouncing (lower value is longer). Example: Rock Slide + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $30 + inc hl + ld [hl], $48 +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hli] + ld d, [hl] + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + ld a, [hl] + and $3f + ret nz + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $20 + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + sub [hl] + jr z, .done + jr c, .done + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], a + ret + +.done + call DeinitBattleAnimation + ret + +BattleAnimFunction_MoveFromUserToTargetSpinAround: +; Object moves from user to target target and spins around it once. Example: Fire Spin, Swift + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three +.zero + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $80 + jr nc, .next + call .SetCoords + ret + +.next + call BattleAnim_IncAnonJumptableIndex +.one + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $0 +.two + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $40 + jr nc, .loop_back + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld d, $18 + call BattleAnim_Cosine + sub $18 + sra a + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld d, $18 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $f + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + add [hl] + ld [hl], a + ret + +.loop_back + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $f0 + jr z, .finish + sub $10 + ld d, a + ld a, [hl] + and $f + or d + ld [hl], a + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + dec [hl] + ret + +.finish + call BattleAnim_IncAnonJumptableIndex +.three + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $b0 + jr c, .retain + call DeinitBattleAnimation + ret + +.retain + call .SetCoords + ret + +.SetCoords: + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $f + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + add [hl] + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $f + ld e, a + srl e + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc +.loop + dec [hl] + dec e + jr nz, .loop + ret + +BattleAnimFunction_Shake: +; Object switches position side to side. Obj Param defines how far to move it. Example: Dynamic Punch +; Some objects use this function with a Param of 0 + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $0 + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $f + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and a + jr z, .done_one + dec [hl] + ret + +.done_one + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + swap a + and $f + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld a, [hl] + xor $ff + inc a + ld [hl], a + ret + +.two + call DeinitBattleAnimation + ret + +BattleAnimFunction_FireBlast: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + dw .four + dw .five + dw .six + dw .seven + dw .eight + dw .nine +.zero + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], a + cp $7 + jr z, .seven + ld a, BATTLEANIMFRAMESET_11 + call ReinitBattleAnimFrameset + ret + +.seven + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $88 + jr nc, .set_up_eight + add $2 + ld [hl], a + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + dec [hl] + ret + +.set_up_eight + call BattleAnim_IncAnonJumptableIndex + ld a, BATTLEANIMFRAMESET_10 + call ReinitBattleAnimFrameset +.eight + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld d, $10 + push af + push de + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + ret + +.nine + call DeinitBattleAnimation + ret + +.one + ; Flame that moves upward + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + dec [hl] + ret + +.four + ; Flame that moves down and left + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + inc [hl] +.two + ; Flame that moves left + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + dec [hl] + ret + +.five + ; Flame that moves down and right + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + inc [hl] +.three + ; Flame that moves right + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + inc [hl] +.six + ret + +BattleAnimFunction_RazorLeaf: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + dw .four + dw .five + dw .six + dw .seven + dw .eight +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $40 +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $30 + jr nc, .sine_cosine + call BattleAnim_IncAnonJumptableIndex + xor a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hli], a + ld [hl], a + ld a, BATTLEANIMFRAMESET_17 + call ReinitBattleAnimFrameset + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + bit 6, [hl] + ret z + ld hl, BATTLEANIMSTRUCT_FRAME + add hl, bc + ld [hl], $5 + ret + +.sine_cosine + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $3f + ld d, a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + dec [hl] + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + call BattleAnim_ScatterHorizontal + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld h, [hl] + ld l, a + add hl, de + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], d + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], e + ret + +.two + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + cp $20 + jr nz, .sine_cosine_2 + call DeinitBattleAnimation + ret + +.sine_cosine_2 + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld d, $10 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + bit 6, [hl] + jr nz, .decrease + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + jr .finish + +.decrease + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + dec [hl] +.finish + ld de, $80 + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld h, [hl] + ld l, a + add hl, de + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], d + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], e + ret + +.three + ld a, BATTLEANIMFRAMESET_16 + call ReinitBattleAnimFrameset + ld hl, BATTLEANIMSTRUCT_OAMFLAGS + add hl, bc + res 5, [hl] +.four +.five +.six +.seven + call BattleAnim_IncAnonJumptableIndex + ret + +.eight + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $c0 + ret nc + ld a, $8 + call BattleAnim_StepToTarget + ret + +BattleAnim_ScatterHorizontal: +; Affects horizontal sine movement based on bit 7 of Obj Param + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + bit 7, a + jr nz, .negative + cp $20 + jr nc, .plus_256 + cp $18 + jr nc, .plus_384 + ld de, $200 + ret + +.plus_384 + ld de, $180 + ret + +.plus_256 + ld de, $100 + ret + +.negative + and %00111111 + cp $20 + jr nc, .minus_256 + cp $18 + jr nc, .minus_384 + ld de, -$200 + ret + +.minus_384 + ld de, -$180 + ret + +.minus_256 + ld de, -$100 + ret + +BattleAnimFunction_RockSmash: +; Object moves at an arc +; Obj Param: Bit 7 makes arc flip horizontally +; Bit 6 defines offset from base frameset FRAMESET_19 +; Rest defines arc radius + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one +.zero + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $40 + rlca + rlca + add BATTLEANIMFRAMESET_19 + ld hl, BATTLEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld [hl], a + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $40 +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $30 + jr nc, .sine_cosine + call DeinitBattleAnimation + ret + +.sine_cosine + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $3f + ld d, a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + dec [hl] + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + call BattleAnim_ScatterHorizontal + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld h, [hl] + ld l, a + add hl, de + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], d + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], e + ret + +BattleAnimFunction_Bubble: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $c +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and a + jr z, .next + dec [hl] + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + call BattleAnim_StepToTarget + ret + +.next + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $0 + ld a, BATTLEANIMFRAMESET_22 + call ReinitBattleAnimFrameset +.two + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $98 + jr nc, .okay + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld h, [hl] + ld l, a + ld de, $60 + add hl, de + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], e + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], d +.okay + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + cp $20 + ret c + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $f0 + ld e, a + ld d, $ff + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld h, [hl] + ld l, a + add hl, de + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], e + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld [hl], d + ret + +BattleAnimFunction_Surf: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + dw .four +.zero + call BattleAnim_IncAnonJumptableIndex + ld a, LOW(rSCY) + ldh [hLCDCPointer], a + ld a, $58 + ldh [hLYOverrideStart], a + ld a, $5e + ldh [hLYOverrideEnd], a + ret + +.one + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld e, [hl] + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + cp e + jr nc, .move + call BattleAnim_IncAnonJumptableIndex + xor a + ldh [hLYOverrideStart], a + ret + +.move + dec a + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld d, $10 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + add [hl] + sub $10 + ret c + ldh [hLYOverrideStart], a + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld a, [hl] + inc a + and $7 + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + inc [hl] +.two + ret + +.three + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + cp $70 + jr c, .move_down + xor a + ldh [hLCDCPointer], a + ldh [hLYOverrideStart], a + ldh [hLYOverrideEnd], a +.four + call DeinitBattleAnimation + ret + +.move_down + inc a + inc a + ld [hl], a + sub $10 + ret c + ldh [hLYOverrideStart], a + ret + +BattleAnimFunction_Sing: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, BATTLEANIMFRAMESET_24 + add [hl] ; BATTLEANIMFRAMESET_25 BATTLEANIMFRAMESET_26 + call ReinitBattleAnimFrameset + +.one + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $b8 + jr c, .move + call DeinitBattleAnimation + ret + +.move + ld a, $2 + call BattleAnim_StepToTarget + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + dec [hl] + ld d, $8 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ret + +BattleAnimFunction_WaterGun: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + +.zero + call BattleAnim_IncAnonJumptableIndex +.one + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + cp $30 + jr c, .run_down + ld a, $2 + call BattleAnim_StepToTarget + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + dec [hl] + ld d, $8 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ret + +.run_down + call BattleAnim_IncAnonJumptableIndex + ld a, BATTLEANIMFRAMESET_28 + call ReinitBattleAnimFrameset + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], $0 + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld [hl], $30 + ld hl, BATTLEANIMSTRUCT_OAMFLAGS + add hl, bc + ld a, [hl] + and $1 + ld [hl], a +.two + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + cp $18 + jr nc, .splash + inc [hl] + ret + +.splash + call BattleAnim_IncAnonJumptableIndex + ld a, BATTLEANIMFRAMESET_29 + call ReinitBattleAnimFrameset +.three + ret + +BattleAnimFunction_Powder: +; Obj moves down and disappears at x coord $38 + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + cp $38 + jr c, .move + call DeinitBattleAnimation + ret + +.move + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld l, [hl] + ld h, a + ld de, $80 + add hl, de + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], e + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], d + ; Shakes object back and forth 16 pixels + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld a, [hl] + xor $10 + ld [hl], a + ret + +BattleAnimFunction_Recover: +; Obj moves in an ever shrinking circle. Obj Param defines initial position in the circle + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $f0 + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $f + sla a + sla a + sla a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld [hl], $1 +.one + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + and a + jr nz, .move + call DeinitBattleAnimation + ret + +.move + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc [hl] + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld d, [hl] + push af + push de + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + xor $1 + ld [hl], a + ret z + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + dec [hl] + ret + +BattleAnimFunction_ThunderWave: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + +.one + call BattleAnim_IncAnonJumptableIndex + ld a, BATTLEANIMFRAMESET_35 + call ReinitBattleAnimFrameset +.zero +.two + ret + +.three + call DeinitBattleAnimation + ret + +BattleAnimFunction_Clamp_Encore: +; Claps two objects together, twice. Also used by Encore +; Second object's frameset and position relative to first are both defined via this function +; Obj Param: Distance from center (masked with $7F). Bit 7 flips object horizontally by switching to a different frameset + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + dw .four + dw .five + dw .six + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + bit 7, [hl] + jr nz, .flipped + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $10 + jr .got_sine_start + +.flipped + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $30 +.got_sine_start + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $7f + ld [hl], a +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld d, [hl] + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + bit 7, a + jr nz, .load_no_inc + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + inc a ; BATTLEANIMFRAMESET_3B (Clamp Flipped) + ; BATTLEANIMFRAMESET_A1 (Hands Flipped) + jr .reinit + +.load_no_inc + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] ; BATTLEANIMFRAMESET_3A (Clamp) + ; BATTLEANIMFRAMESET_A0 (Hands) +.reinit + call ReinitBattleAnimFrameset + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + ld a, [hl] + and $1f + ret nz +.two +.three +.four +.five + call BattleAnim_IncAnonJumptableIndex + ret + +.six + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], $1 + ret + +BattleAnimFunction_Bite: +; Claps two objects together (vertically), twice +; Second object's frameset and position relative to first are both defined via this function +; Obj Param: Distance from center (masked with $7F). Bit 7 flips object vertically by switching to a different frameset + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + dw .four + dw .five + dw .six + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + bit 7, [hl] + jr nz, .flipped + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $10 + jr .got_sine_start + +.flipped + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $30 +.got_sine_start + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $7f + ld [hl], a + +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld d, [hl] + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + bit 7, a + jr nz, .flipped2 + ld a, BATTLEANIMFRAMESET_3D + jr .got_frameset + +.flipped2 + ld a, BATTLEANIMFRAMESET_3C +.got_frameset + call ReinitBattleAnimFrameset + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + inc [hl] + ld a, [hl] + and $1f + ret nz + +.two +.three +.four +.five + call BattleAnim_IncAnonJumptableIndex + ret + +.six + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], $1 + ret + +BattleAnimFunction_SolarBeam: +; Solar Beam charge up animation + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $28 + inc hl + ld [hl], $0 +.one + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld d, [hl] + push af + push de + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and a + jr z, .zero_radius + ld d, a + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld e, [hl] + ld hl, -$80 + add hl, de + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], e + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], d + ret + +.zero_radius + call DeinitBattleAnimation + ret + +BattleAnimFunction_Gust: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + dw .four + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld [hl], 0 +.one +.three + call .GustWobble + ret + +.two + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $88 + jr c, .move + call BattleAnim_IncAnonJumptableIndex + ret + +.four + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $b8 + jr c, .move + call DeinitBattleAnimation + ret + +.move + call .GustWobble + ; Move horizontally every frame + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + inc [hl] + ld a, [hl] + ; Move in the vertically every other frame + and $1 + ret nz + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + dec [hl] + ret + +.GustWobble: + ; Circular movement where width is retrieved from a list, and height is 1/16 of that + call .GetGustRadius + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + push af + push de + call BattleAnim_Sine + sra a + sra a + sra a + sra a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + add [hl] + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + sub $8 + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and a + jr z, .start_wobble + cp $c2 + jr c, .finish_wobble +.start_wobble + dec a + ld [hl], a + and $7 + ret nz + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + inc [hl] + ret + +.finish_wobble + xor a + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hli], a + ld [hl], a + ret + +.GetGustRadius: + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, .GustOffsets + add hl, de + ld d, [hl] + ret + +.GustOffsets: + db 8, 6, 5, 4, 5, 6, 8, 12, 16 + +BattleAnimFunction_Absorb: +; Moves object from target to user and disappears when reaches x coord $30. Example: Absorb, Mega Drain, Leech Seed status +; Obj Param: Speed in the X axis + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $30 + jr nc, .move + call DeinitBattleAnimation + ret + +.move + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $f + ld e, a + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + sub e + ld [hl], a + srl e + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc +.loop + inc [hl] + dec e + jr nz, .loop + ret + +BattleAnimFunction_Wrap: +; Plays out object frameset. Use anim_incobj to move to next frameset + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.one + ld hl, BATTLEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld a, [hl] + inc a ; BATTLEANIMFRAMESET_53 + ; BATTLEANIMFRAMESET_55 + call ReinitBattleAnimFrameset + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 ; Unused? + add hl, bc + ld [hl], $8 +.zero +.two + ret + +BattleAnimFunction_LeechSeed: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], $40 + ret + +.one + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + cp $20 + jr c, .sprout + call BattleAnim_StepThrownToTarget + ret + +.sprout + ld [hl], $40 + ld a, BATTLEANIMFRAMESET_57 + call ReinitBattleAnimFrameset + call BattleAnim_IncAnonJumptableIndex + ret + +.two + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + and a + jr z, .flutter + dec [hl] + ret + +.flutter + call BattleAnim_IncAnonJumptableIndex + ld a, BATTLEANIMFRAMESET_58 + call ReinitBattleAnimFrameset +.three + ret + +BattleAnim_StepThrownToTarget: +; Inches object towards the opponent's side in a parabola arc defined by the lower and upper nybble of Obj Param + dec [hl] + ld d, $20 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_FIX_Y + add hl, bc + ld a, [hl] + add $2 + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld e, [hl] + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld d, [hl] + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld h, [hl] + ld a, h + and $f + swap a + ld l, a + ld a, h + and $f0 + swap a + ld h, a + add hl, de + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], e + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], d + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + and $1 + ret nz + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + dec [hl] + ret + +BattleAnimFunction_Spikes: +; Object is thrown at target. After $20 frames it stops and waits another $20 frames then disappear + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], $40 + ret + +.one + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + cp $20 + jr c, .wait + call BattleAnim_StepThrownToTarget + ret + +.wait + call BattleAnim_IncAnonJumptableIndex +.two + ret + +BattleAnimFunction_RazorWind: + call BattleAnimFunction_MoveInCircle + ; Causes object to skip ahead the circular motion every frame + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + add $f + ld [hl], a + ret + +BattleAnimFunction_Kick: +; Uses anim_setobj for different kick types + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two ; Jump Kick, Hi Jump Kick + dw .three ; Rolling Kick + dw .four ; Rolling Kick (continued) + +.zero + ret + +.one ; Unused? + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + cp $30 + jr c, .move_down + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], $0 + ret + +.move_down + add $4 + ld [hl], a + ret + +.two + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $98 + ret nc + inc [hl] + inc [hl] + ld hl, BATTLEANIMSTRUCT_OAMFLAGS + add hl, bc + set 0, [hl] + ld hl, BATTLEANIMSTRUCT_FIX_Y + add hl, bc + ld [hl], $90 + ld hl, BATTLEANIMSTRUCT_FRAME + add hl, bc + ld [hl], $0 + ld hl, BATTLEANIMSTRUCT_DURATION + add hl, bc + ld [hl], $2 + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + dec [hl] + ret + +.three + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $2c + ld hl, BATTLEANIMSTRUCT_FRAME + add hl, bc + ld [hl], $0 + ld hl, BATTLEANIMSTRUCT_DURATION + add hl, bc + ld [hl], $80 +.four + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $98 + ret nc + inc [hl] + inc [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc [hl] + ld d, $8 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ret + +BattleAnimFunction_Egg: +; Used by Egg Bomb and Softboiled +; Obj Param: Defines jumptable starting index + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one ; Egg Bomb start + dw .two + dw .three + dw .four ; ret + dw .five + dw .six ; Softboiled obj 1 start + dw .seven + dw .eight + dw .nine + dw .ten ; ret + dw .eleven ; Softboiled obj 2 start + dw .twelve + dw .thirteen ; ret + +.zero + ; Object starts here then jumps to the jumptable index defined by the Obj Param + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $28 + inc hl ; BATTLEANIMSTRUCT_VAR2 + ld [hl], $10 + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], a + ret + +.one + ; Initial Egg Bomb arc movement to x coord $40 + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $40 + jr nc, .egg_bomb_vertical_wave + inc [hl] +.egg_bomb_vertical_wave + call .EggVerticalWaveMotion + ret + +.six + ; Initial Softboiled arc movement to x coord $4b + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $4b + jr nc, .softboiled_vertical_wave + inc [hl] +.softboiled_vertical_wave + call .EggVerticalWaveMotion + ret + +.two + ; Compares the egg's x coord to determine whether to move, wait or end animation + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $88 + jr nc, .egg_bomb_done + and $f + jr nz, .egg_bomb_step + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], $10 + call BattleAnim_IncAnonJumptableIndex ; jumps to three + ret + +.egg_bomb_done + ; Increases jumptable index twice to four + call BattleAnim_IncAnonJumptableIndex + inc [hl] + ret + +.three + ; Waits in place + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + and a + jr z, .done_waiting + dec [hl] + ret + +.done_waiting + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + dec [hl] +.egg_bomb_step + ; Moves towards the target + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + inc [hl] + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld d, [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld e, [hl] + ld hl, -$80 + add hl, de + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld [hl], d + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], e + ret + +.five + ; Clears Egg Bomb object via anim_incobj + call DeinitBattleAnimation + ret + +.seven + ; Switches Softboiled frameset to egg wobbling + ld a, BATTLEANIMFRAMESET_4E ; Egg wobbling + call ReinitBattleAnimFrameset + call BattleAnim_IncAnonJumptableIndex + ret + +.eight + ; Softboiled object waves slightly side to side + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc [hl] + inc [hl] + ld d, $2 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +.nine + ; First Softboiled ANIM_OBJ_EGG turns into the bottom half frameset + ld a, BATTLEANIMFRAMESET_50 ; Cracked egg bottom + call ReinitBattleAnimFrameset + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], $4 + call BattleAnim_IncAnonJumptableIndex + ret + +.eleven + ; Second Softboiled ANIM_OBJ_EGG + ld a, BATTLEANIMFRAMESET_4F ; Cracked egg top + call ReinitBattleAnimFrameset + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $40 + ret + +.twelve + ; Top half of egg moves upward for $30 frames + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld d, $20 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $30 + jr c, .done_top_shell + dec [hl] + ret + +.done_top_shell + call BattleAnim_IncAnonJumptableIndex +.four +.ten +.thirteen + ret + +.EggVerticalWaveMotion: + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hli] + ld d, [hl] ; BATTLEANIMSTRUCT_VAR2 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + ld a, [hl] + and $3f ; cp 64 + ret nz + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $20 + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + sub $8 + ld [hl], a + ret nz + xor a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hli], a + ld [hl], a + call BattleAnim_IncAnonJumptableIndex + ret + +BattleAnimFunction_MoveUp: +; Moves object up for 41 frames +; Obj Param: Movement speed + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + and a + jr z, .move + cp $d8 + jr nc, .move + call DeinitBattleAnimation + ret + +.move + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld d, [hl] + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + sub d + ld [hl], a + ret + +BattleAnimFunction_Sound: +; Moves object back and forth in one of three angles using a sine behavior and disappear after 8 frames. Used in Growl, Snore and Kinesis +; Obj Param: Used to define object angle. How much to increase from base frameset, which is hardcoded as BATTLEANIMFRAMESET_59 + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + ldh a, [hBattleTurn] + and a + jr z, .got_turn + ; enemy + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + xor $ff + add $3 + ld [hl], a +.got_turn + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $8 ; duration + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, BATTLEANIMFRAMESET_59 + add [hl] ; BATTLEANIMFRAMESET_5A BATTLEANIMFRAMESET_5B + call ReinitBattleAnimFrameset + ret + +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and a + jr z, .done_anim + dec [hl] + call .SoundWaveMotion + ret + +.done_anim + call DeinitBattleAnimation + ret + +.SoundWaveMotion: + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + inc [hl] + inc [hl] + ld d, $10 + call BattleAnim_Sine + ld d, a + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and a + jr z, .negative + dec a + ret z + ; Obj Param 2 + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], d + ret + +.negative + ; Obj Param 0 + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, d + xor $ff + inc a + ld [hl], a + ret + +BattleAnimFunction_ConfuseRay: +; Creates the Confuse Ray object and moves it across the screen until x coord $80 +; Moves horizontally every frame and vertically every 3 frames + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $3f + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $80 + rlca + ld [hl], a + add BATTLEANIMFRAMESET_5D ; BATTLEANIMFRAMESET_5E + call ReinitBattleAnimFrameset + ret + +.one + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + swap a + ld d, a + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + inc [hl] + push af + push de + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $80 + ret nc + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + and $3 + jr nz, .skip_vertical_movement + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + dec [hl] +.skip_vertical_movement + and $1 + ret nz + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + inc [hl] + ret + +BattleAnimFunction_Dizzy: +; Moves object in a circle where the height is 1/4 the width, with the next frameset from base whether moving left or right. Also used for Nightmare +; Obj Param: Defines starting position in the circle (masked with $80). Bit 7 flips it at the start + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $80 + rlca + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + add [hl] ; BATTLEANIMFRAMESET_61 BATTLEANIMFRAMESET_62 + ; BATTLEANIMFRAMESET_9C BATTLEANIMFRAMESET_9D + call ReinitBattleAnimFrameset + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $7f + ld [hl], a +.one + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld d, $10 + push af + push de + call BattleAnim_Sine + sra a + sra a + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + inc [hl] + and $3f + jr z, .not_flipped + and $1f + ret nz + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc a ; BATTLEANIMFRAMESET_62 + ; BATTLEANIMFRAMESET_9D + jr .got_frameset + +.not_flipped + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] ; BATTLEANIMFRAMESET_61 + ; BATTLEANIMFRAMESET_9C +.got_frameset + call ReinitBattleAnimFrameset + ret + +BattleAnimFunction_Amnesia: +; Creates 3 objects based on Obj Param +; Obj Param: How much to increase from base frameset, which is hardcoded as BATTLEANIMFRAMESET_63 +; anim_incobj is used to DeInit object (used by Present) + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + add BATTLEANIMFRAMESET_63 ; BATTLEANIMFRAMESET_64 BATTLEANIMFRAMESET_65 + call ReinitBattleAnimFrameset + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, .AmnesiaOffsets + add hl, de + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a +.one + ret + +.two + ; anim_incobj forces obj to deinit + call DeinitBattleAnimation + ret + +.AmnesiaOffsets: ; Hardcoded Y Offsets for each Obj Param + db $ec, $f8, $00 + +BattleAnimFunction_FloatUp: +; Object moves horizontally in a sine wave, while also moving up. Also used by Charm and the Nightmare status + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc [hl] + inc [hl] + ld d, $4 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld d, [hl] + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld e, [hl] + lb hl, -1, $a0 + add hl, de + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], d + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], e + ret + +BattleAnimFunction_Dig: +; Object moves up then down with a wave motion, while also moving away from the user 1 pixel per frame + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + dec [hl] + dec [hl] + ld d, $10 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + inc [hl] + ret + +BattleAnimFunction_String: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and a + jr nz, .not_param_zero + ; Obj Param 0 flips when used by enemy + ld hl, BATTLEANIMSTRUCT_OAMFLAGS + add hl, bc + set OAM_Y_FLIP, [hl] +.not_param_zero + add BATTLEANIMFRAMESET_6A ; BATTLEANIMFRAMESET_6B BATTLEANIMFRAMESET_6C + call ReinitBattleAnimFrameset +.one + ret + +BattleAnimFunction_Paralyzed: +; Also used by Disable +; Obj Param: When bit 7 is set, frameset is replaced with flipped version. This bit is discarded and object then moves back and forth between position in lower nybble and upper nybble of Param every other frame + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $0 + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld e, [hl] + ld a, e + and $70 + swap a + ld [hl], a + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld a, e + and $80 + jr nz, .right + ld a, e + and $f + ld [hl], a + ret + +.right + ld a, e + and $f + xor $ff + inc a + ld [hl], a + ld a, BATTLEANIMFRAMESET_6E + call ReinitBattleAnimFrameset + ret + +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and a + jr z, .var1_zero + dec [hl] + ret + +.var1_zero + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld a, [hl] + xor $ff + inc a + ld [hl], a + ret + +BattleAnimFunction_SpiralDescent: + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld d, $18 + push af + push de + call BattleAnim_Sine + sra a + sra a + sra a + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + add [hl] + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + ld a, [hl] + and $7 + ret nz + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + cp $28 + jr nc, .delete + inc [hl] + ret + +.delete + call DeinitBattleAnimation + ret + +BattleAnimFunction_PetalDance: +; Object moves downwards in a spiral around the user. Object disappears at y coord $28 + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld d, $18 + push af + push de + call BattleAnim_Sine + sra a + sra a + sra a + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + add [hl] + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + ld a, [hl] + and $3 + ret nz + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + cp $28 + jr nc, .end + inc [hl] + ret + +.end + call DeinitBattleAnimation + ret + +BattleAnimFunction_PoisonGas: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw BattleAnimFunction_SpiralDescent + +.zero: + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $84 + jr nc, .next + inc [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc [hl] + ld d, $18 + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + and $1 + ret nz + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + dec [hl] + ret + +.next + call BattleAnim_IncAnonJumptableIndex + ret + +BattleAnimFunction_SmokeFlameWheel: +; Object spins around target while also moving upward until it disappears at x coord $e8 +; Obj Param: Defines where the object starts in the circle + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld d, $18 + push af + push de + call BattleAnim_Sine + sra a + sra a + sra a + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + add [hl] + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + inc [hl] + inc [hl] + ld a, [hl] + and $7 + ret nz + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + cp $e8 + jr z, .done + dec [hl] + ret + +.done + call DeinitBattleAnimation + ret + +BattleAnimFunction_SacredFire: +; Moves object in a circle where the height is 1/8 the width, while also moving upward 2 pixels per frame for 24 frames after which it disappears +; Obj Param: Is used internally only + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld d, $18 + push af + push de + call BattleAnim_Sine + sra a + sra a + sra a + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + add [hl] + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + inc [hl] + inc [hl] + ld a, [hl] + and $3 + ret nz + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + cp $d0 + jr z, .done + dec [hl] + dec [hl] + ret + +.done + call DeinitBattleAnimation + ret + +BattleAnimFunction_PresentSmokescreen: +; Object bounces from user to target and stops at x coord $6c. Uses anim_incobj to clear object +; Obj Param: Defined but not used + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $34 + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], $10 +.one + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $6c + jr c, .do_move + ret + +.do_move + ld a, $2 + call BattleAnim_StepToTarget + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld d, [hl] + call BattleAnim_Sine + bit 7, a + jr nz, .negative + xor $ff + inc a +.negative + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + sub $4 + ld [hl], a + and $1f + cp $20 + ret nz + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + srl [hl] + ret + +.two + call DeinitBattleAnimation + ret + +BattleAnimFunction_Horn: + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + +.zero + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + ret + +.one + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $58 + ret nc + ld a, $2 + call BattleAnim_StepToTarget + ret + +.two + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + cp $20 + jr c, .three + call DeinitBattleAnimation + ret + +.three + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + ld d, $8 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + sra a + xor $ff + inc a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + add [hl] + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + add $8 + ld [hl], a + ret + +BattleAnimFunction_Needle: +; Moves object towards target, either in a straight line or arc. Stops at x coord $84 +; Obj Param: Upper nybble defines the index of the jumptable. Lower nybble defines the speed. + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $f0 + swap a + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], a + ret + +.two + ; Pin Missile needle (arc) + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld d, $10 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + bit 7, a + jr z, .negative + ld [hl], a +.negative + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + sub $4 + ld [hl], a +.one + ; Normal needle (line) + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $84 + jr c, .move_to_target + call DeinitBattleAnimation + ret + +.move_to_target + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + call BattleAnim_StepToTarget + ret + +BattleAnimFunction_ThiefPayday: +; Object drops off target and bounces once on the floor +; Obj Param: Defines every how many frames the object moves horizontally + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $28 + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + sub $28 + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], a +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hli] + ld d, [hl] + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + and [hl] + jr nz, .var_doesnt_equal_param + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + dec [hl] +.var_doesnt_equal_param + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + ld a, [hl] + and $3f + ret nz + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $20 + inc hl + srl [hl] + ret + +BattleAnimFunction_AbsorbCircle: +; A circle of objects that starts at the target and moves to the user. It expands until x coord $5a and then shrinks. Once radius reaches 0, the object disappears. Also used by Mimic and Conversion2 +; Obj Param: Defines the position in the circle the object starts at + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld d, [hl] + push af + push de + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + inc [hl] + ld a, [hl] + and $1 + jr nz, .dont_move_x + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + dec [hl] +.dont_move_x + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $3 + jr nz, .dont_move_y + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + inc [hl] +.dont_move_y + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + cp $5a + jr nc, .increase_radius + ld a, [hl] + and a + jr z, .end + dec [hl] ; decreases radius + ret + +.increase_radius + inc [hl] + ret + +.end + call DeinitBattleAnimation + ret + +BattleAnimFunction_Conversion: +; A rotating circle of objects centered at a position. It expands for $40 frames and then shrinks. Once radius reaches 0, the object disappears. +; Obj Param: Defines starting point in the circle + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + inc [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld d, [hl] + push af + push de + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + inc [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + cp $40 + jr nc, .shrink + inc [hl] + ret + +.shrink + ld a, [hl] + dec [hl] + and a + ret nz + call DeinitBattleAnimation + ret + +BattleAnimFunction_Bonemerang: +; Boomerang-like movement from user to target +; Obj Param: Defines position to start at in the circle + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero: + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], a +.one: + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld d, $30 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + add [hl] + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + add $8 + ld d, $30 + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + inc [hl] + ret + +BattleAnimFunction_Shiny: +; Puts object in a circle formation of radius $10. Also used by Flash and Light Screen +; Obj Param: Defines where the object starts in the circle + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero: + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld d, $10 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld d, $10 + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR2 ; unused? + add hl, bc + ld [hl], $f +.one: + ret + +BattleAnimFunction_SkyAttack: +; Uses anim_incobj to move to next step + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + +.zero + call BattleAnim_IncAnonJumptableIndex + ldh a, [hBattleTurn] + and a + jr nz, .enemy_turn + ld a, $f0 + jr .got_var1 + +.enemy_turn + ld a, $cc +.got_var1 + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + ret + +.one + call .SkyAttack_CyclePalette + ret + +.two +; Moves towards target and stops at x coord $84 + call .SkyAttack_CyclePalette + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $84 + ret nc + ld a, $4 + call BattleAnim_StepToTarget + ret + +.three +; Moves towards target and disappears at x coord $d0 + call .SkyAttack_CyclePalette + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $d0 + jr nc, .done + ld a, $4 + call BattleAnim_StepToTarget + ret + +.done + call DeinitBattleAnimation + ret + +.SkyAttack_CyclePalette: +; Cycles wOBP0 pallete + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + and $7 + inc [hl] + srl a + ld e, a + ld d, 0 + ldh a, [hSGB] + and a + jr nz, .sgb + ld hl, .GBCPals + jr .got_pals + +.sgb + ld hl, .SGBPals +.got_pals + add hl, de + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + and [hl] + ld [wOBP0], a + ret + +.GBCPals: + db $ff, $aa, $55, $aa +.SGBPals: + db $ff, $ff, $00, $00 + +BattleAnimFunction_GrowthSwordsDance: +; Moves object in a circle where the height is 1/8 the width, while also moving upward 2 pixels per frame +; Obj Param: Defines where the object starts in the circle + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld d, $18 + call BattleAnim_Sine + sra a + sra a + sra a + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + add [hl] + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + inc [hl] + ld d, $18 + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + dec [hl] + dec [hl] + ret + +BattleAnimFunction_StrengthSeismicToss: +; Moves object up for $e0 frames, then shakes it vertically and throws it at the target. Uses anim_incobj to move to final phase +; Obj Param: Defined but not used + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + cp $e0 + jr nz, .move_up + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $2 + ret + +.move_up + ld d, a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld e, [hl] + ld hl, -$80 + add hl, de + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], d + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], e + ret + +.one + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + and a + jr z, .switch_position + dec [hl] + ret + +.switch_position + ld [hl], $4 + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + xor $ff + inc a + ld [hl], a + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + add [hl] + ld [hl], a + ret + +.two + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $84 + jr nc, .done + ld a, $4 + call BattleAnim_StepToTarget + ret + +.done + call DeinitBattleAnimation + ret + +BattleAnimFunction_SpeedLine: +; Used in moves where the user disappears for a speed-based attack such as Quick Attack, Mach Punch and Extremespeed + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $7f + add BATTLEANIMFRAMESET_81 ; BATTLEANIMFRAMESET_82 BATTLEANIMFRAMESET_83 + call ReinitBattleAnimFrameset +.one + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + bit 7, [hl] + jr nz, .inverted + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + inc [hl] + ret + +.inverted + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + dec [hl] + ret + +BattleAnimFunction_Sludge: +; Object moves upward for $c frames and switches to FRAMESET_20 + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $c + ret + +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and a + jr z, .done + dec [hl] + ret + +.done + call BattleAnim_IncAnonJumptableIndex + ld a, BATTLEANIMFRAMESET_20 + call ReinitBattleAnimFrameset +.two + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + dec [hl] + ret + +BattleAnimFunction_MetronomeHand: +; Fast circular motion with an x radius of $8 and y radius of $2 + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc [hl] + inc [hl] + push af + ld d, $2 + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop af + ld d, $8 + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +BattleAnimFunction_MetronomeSparkleSketch: +; Sideways wave motion while also moving downward until it disappears at y coord $20 +; Obj Param: Only used internally + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + cp $20 + jr c, .do_move + call DeinitBattleAnimation + ret + +.do_move + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld d, $8 + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + add $2 + ld [hl], a + and $7 + ret nz + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + inc [hl] + ret + +BattleAnimFunction_Agility: +; Object moves sideways at a speed determined by Obj Param. Can use anim_incobj to make it disappear + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + add [hl] + ld [hl], a + ret + +.one + call DeinitBattleAnimation + ret + +BattleAnimFunction_SafeguardProtect: +; Moves object in a circle where the width is 1/2 the height +; Obj Param: Defines starting point in circle + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld d, $18 + push af + push de + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + sra a + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + inc [hl] + ret + +BattleAnimFunction_LockOnMindReader: +; Moves objects towards a center position +; Obj Param: Used to define object angle from 0 to 3. Lower nybble defines how much to increase from base frameset while upper nybble defines angle of movement. The object moves for $28 frames, then waits for $10 frames and disappears + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $28 + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $f + ld hl, BATTLEANIMSTRUCT_FRAMESET_ID + add hl, bc + add [hl] ; BATTLEANIMFRAMESET_8F BATTLEANIMFRAMESET_90 BATTLEANIMFRAMESET_91 + ; BATTLEANIMFRAMESET_93 BATTLEANIMFRAMESET_94 BATTLEANIMFRAMESET_95 + call ReinitBattleAnimFrameset + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and $f0 + or $8 + ld [hl], a +.one + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and a + jr z, .done + dec [hl] + add $8 + ld d, a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + push af + push de + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +.done + ld [hl], $10 + call BattleAnim_IncAnonJumptableIndex +.two + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + dec [hl] + and a + ret nz + call DeinitBattleAnimation + ret + +BattleAnimFunction_HealBellNotes: +; Object moves horizontally in a sine wave, while also moving left every other frame and downwards for $38 frames after which it disappears +; Obj Param: Defines a frameset offset from FRAMESET_24 + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, BATTLEANIMFRAMESET_24 + add [hl] ; BATTLEANIMFRAMESET_25 BATTLEANIMFRAMESET_26 + call ReinitBattleAnimFrameset +.one + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + cp $38 + jr nc, .done + inc [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc [hl] + ld d, $18 + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + and $1 + ret nz + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + dec [hl] + ret + +.done + call DeinitBattleAnimation + ret + +BattleAnimFunction_BatonPass: +; Object falls vertically and bounces on the ground +; Obj Param: Defines speed and duration + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and a + ret z + ld d, a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc [hl] + call BattleAnim_Sine + bit 7, a + jr nz, .negative + xor $ff + inc a +.negative + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and $1f + ret nz + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + srl [hl] + ret + +BattleAnimFunction_EncoreBellyDrum: +; Object moves at an arc for 8 frames and disappears +; Obj Param: Defines starting position in the arc + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $10 + jr nc, .done + inc [hl] + inc [hl] + ld d, a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + push af + push de + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +.done + call DeinitBattleAnimation + ret + +BattleAnimFunction_SwaggerMorningSun: +; Moves object at an angle +; Obj Param: Lower 6 bits define angle of movement and upper 2 bits define speed + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld e, [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld d, [hl] + ld a, e + and $c0 + rlca + rlca + add [hl] + ld [hl], a + ld a, e + and $3f + push af + push de + call BattleAnim_Sine + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +BattleAnimFunction_HiddenPower: +; Moves object in a ring around position. Uses anim_incobj to move to second phase, where it expands the radius 8 pixels at a time for 13 frames and then disappears +; Obj Param: Defines starting position in circle + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + ld d, $18 + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + inc [hl] + jr .step_circle + +.one + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $18 +.two + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $80 + jr nc, .done + ld d, a + add $8 + ld [hl], a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + jr .step_circle + +.done + call DeinitBattleAnimation + ret + +.step_circle + call BattleAnim_StepCircle + ret + +BattleAnimFunction_Curse: +; Object moves down and to the left 2 pixels at a time until it reaches x coord $30 and disappears + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + +.one + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $30 + jr c, .done + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + dec [hl] + dec [hl] + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc + inc [hl] + inc [hl] + ret + +.done + call DeinitBattleAnimation +.zero: + ret + +BattleAnimFunction_PerishSong: +; Moves object in a large circle with a x radius of $50 and a y radius 1/4 or that, while also moving downwards +; Obj Param: Defines starting position in the circle + ld d, $50 + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + inc [hl] + inc [hl] + push af + push de + call BattleAnim_Sine + sra a + sra a + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + add [hl] + inc [hl] + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +BattleAnimFunction_RapidSpin: +; Object moves upwards 4 pixels per frame until it disappears at y coord $d0 + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + cp $d0 + jr z, .done + dec [hl] + dec [hl] + dec [hl] + dec [hl] + ret + +.done + call DeinitBattleAnimation + ret + +BattleAnimFunction_BetaPursuit: +; Working but unused animation +; Object moves either down or up 4 pixels per frame, depending on Obj Param. Object disappears after 23 frames when going down, or at y coord $d8 when going up +; Obj Param: 0 moves downwards, 1 moves upwards + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + +.zero + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + and a + jr nz, .move_up + call BattleAnim_IncAnonJumptableIndex + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], $ec +.one + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + cp $4 + jr z, .three + inc [hl] + inc [hl] + inc [hl] + inc [hl] + ret + +.three + call DeinitBattleAnimation + ret + +.move_up + call BattleAnim_IncAnonJumptableIndex + call BattleAnim_IncAnonJumptableIndex +.two + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + cp $d8 + ret z + dec [hl] + dec [hl] + dec [hl] + dec [hl] + ret + +BattleAnimFunction_RainSandstorm: +; Object moves down 4 pixels at a time and right a variable distance +; Obj Param: Defines variation in the movement +; $0: 2 pixels horizontal movement +; $1: 8 pixels horizontal movement +; $2: 4 pixels horizontal movement + call BattleAnim_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + dw .three + +.zero + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], a + call BattleAnim_IncAnonJumptableIndex + ret + +.one ; Obj Param 0 + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + add $4 + cp $70 + jr c, .dont_reset_y_offset_one + xor a +.dont_reset_y_offset_one + ld [hl], a + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + inc [hl] + inc [hl] + ret + +.two ; Obj Param 1 + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + add $4 + cp $70 + jr c, .dont_reset_y_offset_two + xor a +.dont_reset_y_offset_two + ld [hl], a + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld a, [hl] + add $8 + ld [hl], a + ret + +.three ; Obj Param 2 + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + add $4 + cp $70 + jr c, .dont_reset_y_offset_three + xor a +.dont_reset_y_offset_three + ld [hl], a + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld a, [hl] + add $4 + ld [hl], a + ret + +BattleAnimFunction_AnimObjB0: ; unused +; Used by object ANIM_OBJ_B0, with itself is not used in any animation +; Obj Param: Lower nybble is added to VAR1 while upper nybble is added to XCOORD + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld d, [hl] + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld e, [hl] + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + ld l, a + and $f0 + ld h, a + swap a + or h + ld h, a + ld a, l + and $f + swap a + ld l, a + add hl, de + ld e, l + ld d, h + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], d + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], e + ret + +BattleAnimFunction_PsychUp: +; Object moves in a circle +; Obj Param: Defines starting position in the circle + ld d, $18 + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld a, [hl] + inc [hl] + call BattleAnim_StepCircle + ret + +BattleAnimFunction_Cotton: +; Object moves in a circle slowly +; Obj Param: Defines starting position in the circle + ld d, $18 + ld hl, BATTLEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + inc [hl] + srl a + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + add [hl] + call BattleAnim_StepCircle + ret + +BattleAnimFunction_AncientPower: +; Object moves up and down in an arc for $20 frames and then disappears +; Obj Param: Defines range of arc motion + ld hl, BATTLEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $20 + jr nc, .done + inc [hl] + ld hl, BATTLEANIMSTRUCT_PARAM + add hl, bc + ld d, [hl] + call BattleAnim_Sine + xor $ff + inc a + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ret + +.done + call DeinitBattleAnimation + ret + +BattleAnim_StepCircle: +; Inches object in a circular movement where its height is 1/4 the width + push af + push de + call BattleAnim_Sine + sra a + sra a + ld hl, BATTLEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call BattleAnim_Cosine + ld hl, BATTLEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +BattleAnim_StepToTarget: +; Inches object towards the opponent's side, moving half as much in the Y axis as it did in the X axis. Uses lower nybble of A + and $f + ld e, a + ld hl, BATTLEANIMSTRUCT_XCOORD + add hl, bc + add [hl] + ld [hl], a + srl e + ld hl, BATTLEANIMSTRUCT_YCOORD + add hl, bc +.loop + dec [hl] + dec e + jr nz, .loop + ret + +BattleAnim_AnonJumptable: + pop de + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld l, [hl] + ld h, $0 + add hl, hl + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +BattleAnim_IncAnonJumptableIndex: + ld hl, BATTLEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + inc [hl] + ret + +BattleAnim_Cosine: +; a = d * cos(a * pi/32) + add %010000 ; cos(x) = sin(x + pi/2) + ; fallthrough +BattleAnim_Sine: +; a = d * sin(a * pi/32) + calc_sine_wave BattleAnimSineWave + +BattleAnim_Sine_e: + ld a, e + call BattleAnim_Sine + ld e, a + ret + +BattleAnim_Cosine_e: + ld a, e + call BattleAnim_Cosine + ld e, a + ret + +BattleAnim_AbsSinePrecise: ; unreferenced + ld a, e + call BattleAnim_Sine + ld e, l + ld d, h + ret + +BattleAnim_AbsCosinePrecise: ; unreferenced + ld a, e + call BattleAnim_Cosine + ld e, l + ld d, h + ret + +BattleAnimSineWave: + sine_table 32 diff --git a/engine/battle_anims/helpers.asm b/engine/battle_anims/helpers.asm new file mode 100644 index 0000000..90d9fea --- /dev/null +++ b/engine/battle_anims/helpers.asm @@ -0,0 +1,130 @@ +ReinitBattleAnimFrameset: + ld hl, BATTLEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld [hl], a + ld hl, BATTLEANIMSTRUCT_DURATION + add hl, bc + ld [hl], 0 + ld hl, BATTLEANIMSTRUCT_FRAME + add hl, bc + ld [hl], -1 + ret + +GetBattleAnimFrame: +.loop + ld hl, BATTLEANIMSTRUCT_DURATION + add hl, bc + ld a, [hl] + and a + jr z, .next_frame + dec [hl] + call .GetPointer + ld a, [hli] + push af + jr .okay + +.next_frame + ld hl, BATTLEANIMSTRUCT_FRAME + add hl, bc + inc [hl] + call .GetPointer + ld a, [hli] + cp oamrestart_command + jr z, .restart + cp oamend_command + jr z, .repeat_last + + push af + ld a, [hl] + push hl + and ~(Y_FLIP << 1 | X_FLIP << 1) + ld hl, BATTLEANIMSTRUCT_DURATION + add hl, bc + ld [hl], a + pop hl +.okay + ld a, [hl] + and Y_FLIP << 1 | X_FLIP << 1 ; The << 1 is compensated in the "oamframe" macro + srl a + ld [wBattleAnimTempFrameOAMFlags], a + pop af + ret + +.repeat_last + xor a + ld hl, BATTLEANIMSTRUCT_DURATION + add hl, bc + ld [hl], a + + ld hl, BATTLEANIMSTRUCT_FRAME + add hl, bc + dec [hl] + dec [hl] + jr .loop + +.restart + xor a + ld hl, BATTLEANIMSTRUCT_DURATION + add hl, bc + ld [hl], a + + dec a + ld hl, BATTLEANIMSTRUCT_FRAME + add hl, bc + ld [hl], a + jr .loop + +.GetPointer: + ld hl, BATTLEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, BattleAnimFrameData + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + ld hl, BATTLEANIMSTRUCT_FRAME + add hl, bc + ld l, [hl] + ld h, 0 + add hl, hl + add hl, de + ret + +GetBattleAnimOAMPointer: + ld l, a + ld h, 0 + ld de, BattleAnimOAMData + add hl, hl + add hl, hl + add hl, de + ret + +LoadBattleAnimGFX: + push hl + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld de, AnimObjGFX + add hl, de + ld c, [hl] + inc hl + ld b, [hl] + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + pop de + push bc + call DecompressRequest2bpp + pop bc + ret + +INCLUDE "data/battle_anims/framesets.asm" + +INCLUDE "data/battle_anims/oam.asm" + +INCLUDE "data/battle_anims/object_gfx.asm" diff --git a/engine/battle_anims/pokeball_wobble.asm b/engine/battle_anims/pokeball_wobble.asm new file mode 100644 index 0000000..d69766a --- /dev/null +++ b/engine/battle_anims/pokeball_wobble.asm @@ -0,0 +1,62 @@ +GetPokeBallWobble: +; Returns whether a Poke Ball will wobble in the catch animation. +; Whether a Pokemon is caught is determined beforehand. + + push de + + ldh a, [rSVBK] + ld d, a + push de + + ld a, BANK(wThrownBallWobbleCount) ; aka BANK(wFinalCatchRate) + ldh [rSVBK], a + + ld a, [wThrownBallWobbleCount] + inc a + ld [wThrownBallWobbleCount], a + +; Wobble up to 3 times. + cp 3 + 1 + jr z, .finished + + ld a, [wWildMon] + and a + ld c, 0 ; next + jr nz, .done + + ld hl, WobbleProbabilities + ld a, [wFinalCatchRate] + ld b, a +.loop + ld a, [hli] + cp b + jr nc, .checkwobble + inc hl + jr .loop + +.checkwobble + ld b, [hl] + call Random + cp b + ld c, 0 ; next + jr c, .done + ld c, 2 ; escaped + jr .done + +.finished + ld a, [wWildMon] + and a + ld c, 1 ; caught + jr nz, .done + ld c, 2 ; escaped + +.done + pop de + ld e, a + ld a, d + ldh [rSVBK], a + ld a, e + pop de + ret + +INCLUDE "data/battle/wobble_probabilities.asm" diff --git a/engine/debug/debug_room.asm b/engine/debug/debug_room.asm new file mode 100644 index 0000000..245f31d --- /dev/null +++ b/engine/debug/debug_room.asm @@ -0,0 +1,1753 @@ + ; _DebugRoom.MenuItems indexes + const_def + const DEBUGROOMMENU_PAGE_1 ; 0 + const DEBUGROOMMENU_PAGE_2 ; 1 + const DEBUGROOMMENU_PAGE_3 ; 2 +DEF DEBUGROOMMENU_NUM_PAGES EQU const_value + + ; _DebugRoom.Strings and _DebugRoom.Jumptable indexes + const_def + const DEBUGROOMMENUITEM_SP_CLEAR ; 00 + const DEBUGROOMMENUITEM_WIN_WORK_CLR ; 01 + const DEBUGROOMMENUITEM_POKEMON_GET ; 02 + const DEBUGROOMMENUITEM_POKEDEX_COMP ; 03 + const DEBUGROOMMENUITEM_TIMER_RESET ; 04 + const DEBUGROOMMENUITEM_DECORATE_ALL ; 05 + const DEBUGROOMMENUITEM_ITEM_GET ; 06 + const DEBUGROOMMENUITEM_RTC_EDIT ; 07 + const DEBUGROOMMENUITEM_NEXT ; 08 + const DEBUGROOMMENUITEM_GB_ID_SET ; 09 + const DEBUGROOMMENUITEM_BTL_REC_CLR ; 0a + const DEBUGROOMMENUITEM_POKEDEX_CLR ; 0b + const DEBUGROOMMENUITEM_HALT_CHK_CLR ; 0c + const DEBUGROOMMENUITEM_BATTLE_SKIP ; 0d + const DEBUGROOMMENUITEM_HOF_CLEAR ; 0e + const DEBUGROOMMENUITEM_ROM_CHECKSUM ; 0f + const DEBUGROOMMENUITEM_TEL_DEBUG ; 10 + const DEBUGROOMMENUITEM_SUM_RECALC ; 11 + const DEBUGROOMMENUITEM_RAM_FLAG_CLR ; 12 + const DEBUGROOMMENUITEM_CHANGE_SEX ; 13 + const DEBUGROOMMENUITEM_BT_BUG_POKE ; 14 + +_DebugRoom: + ldh a, [hJoyDown] + and SELECT | START + cp SELECT | START + ret nz + ldh a, [hDebugRoomMenuPage] + push af + xor a + ldh [hDebugRoomMenuPage], a +.loop + ld hl, wTilemap + ld bc, wTilemapEnd - wTilemap + ld a, " " + call ByteFill + call DebugRoom_PrintStackBottomTop + call DebugRoom_PrintWindowStackBottomTop + call DebugRoom_PrintRTCHaltChk + call DebugRoom_PrintBattleSkip + call DebugRoom_PrintTelDebug + call DebugRoom_PrintRAMFlag + call DebugRoom_PrintGender + ldh a, [hDebugRoomMenuPage] + ld [wWhichIndexSet], a + ld hl, .MenuHeader + call LoadMenuHeader + call SetUpMenu +.wait + call GetScrollingMenuJoypad + ld a, [wMenuJoypad] + and A_BUTTON | B_BUTTON + jr z, .wait + call CloseWindow + cp B_BUTTON + jr z, .done + ld a, [wMenuSelection] + ld hl, .Jumptable + rst JumpTable + jr .loop +.done + pop af + ldh [hDebugRoomMenuPage], a + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 15, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 0 ; items + dw .MenuItems + dw PlaceMenuStrings + dw .Strings + +.Strings: +; entries correspond to DEBUGROOMMENUITEM_* constants + db "SP CLEAR@" + db "WIN WORK CLR@" + db "#MON GET!@" + db "#DEX COMP@" + db "TIMER RESET@" + db "DECORATE ALL@" + db "ITEM GET!@" + db "RTC EDIT@" + db "NEXT@" + db "GB ID SET@" + db "BTL REC CLR@" + db "#DEX CLR@" + db "HALT CHK CLR@" + db "BATTLE SKIP@" + db "HOF CLEAR@" + db "ROM CHECKSUM@" + db "TEL DEBUG@" + db "SUM RECALC@" + db "RAM FLAG CLR@" + db "CHANGE SEX@" + db "BT BUG POKE@" + +.Jumptable: +; entries correspond to DEBUGROOMMENUITEM_* constants + dw DebugRoomMenu_SpClear + dw DebugRoomMenu_WinWorkClr + dw DebugRoomMenu_PokemonGet + dw DebugRoomMenu_PokedexComp + dw DebugRoomMenu_TimerReset + dw DebugRoomMenu_DecorateAll + dw DebugRoomMenu_ItemGet + dw DebugRoomMenu_RTCEdit + dw DebugRoomMenu_Next + dw DebugRoomMenu_GBIDSet + dw DebugRoomMenu_BtlRecClr + dw DebugRoomMenu_PokedexClr + dw DebugRoomMenu_HaltChkClr + dw DebugRoomMenu_BattleSkip + dw DebugRoomMenu_HOFClear + dw DebugRoomMenu_ROMChecksum + dw DebugRoomMenu_TelDebug + dw DebugRoomMenu_SumRecalc + dw DebugRoomMenu_RAMFlagClr + dw DebugRoomMenu_ChangeSex + dw DebugRoomMenu_BTBugPoke + +.MenuItems: +; entries correspond to DEBUGROOMMENU_* constants + + ; DEBUGROOMMENU_PAGE_1 + db 8 + db DEBUGROOMMENUITEM_SP_CLEAR + db DEBUGROOMMENUITEM_BATTLE_SKIP + db DEBUGROOMMENUITEM_RTC_EDIT + db DEBUGROOMMENUITEM_TIMER_RESET + db DEBUGROOMMENUITEM_HALT_CHK_CLR + db DEBUGROOMMENUITEM_GB_ID_SET + db DEBUGROOMMENUITEM_BTL_REC_CLR + db DEBUGROOMMENUITEM_NEXT + db -1 + + ; DEBUGROOMMENU_PAGE_2 + db 8 + db DEBUGROOMMENUITEM_POKEMON_GET + db DEBUGROOMMENUITEM_ITEM_GET + db DEBUGROOMMENUITEM_POKEDEX_COMP + db DEBUGROOMMENUITEM_POKEDEX_CLR + db DEBUGROOMMENUITEM_DECORATE_ALL + db DEBUGROOMMENUITEM_HOF_CLEAR + db DEBUGROOMMENUITEM_ROM_CHECKSUM + db DEBUGROOMMENUITEM_NEXT + db -1 + + ; DEBUGROOMMENU_PAGE_3 + db 6 + db DEBUGROOMMENUITEM_TEL_DEBUG + db DEBUGROOMMENUITEM_SUM_RECALC + db DEBUGROOMMENUITEM_RAM_FLAG_CLR + db DEBUGROOMMENUITEM_CHANGE_SEX + db DEBUGROOMMENUITEM_BT_BUG_POKE + db DEBUGROOMMENUITEM_NEXT + db -1 + +DebugRoomMenu_Next: + ldh a, [hDebugRoomMenuPage] + inc a + cp DEBUGROOMMENU_NUM_PAGES + jr c, .got_page + xor a ; DEBUGROOMMENU_PAGE_1 +.got_page + ldh [hDebugRoomMenuPage], a + ret + +DebugRoom_SaveChecksum: + ld a, BANK(sGameData) + call OpenSRAM + ld bc, sGameDataEnd - sGameData + ld de, 0 + ld hl, sGameData +.loop + ld a, [hli] + add e + ld e, a + ld a, d + adc 0 + ld d, a + dec bc + ld a, b + or c + jr nz, .loop + ld a, e + ld [sChecksum + 0], a + ld a, d + ld [sChecksum + 1], a + call CloseSRAM + ret + +DebugRoomMenu_SpClear: + call YesNoBox + ret c + ld a, BANK(sStackTop) + call OpenSRAM + xor a + ld hl, sStackTop + ld [hli], a + ld [hl], a + call CloseSRAM + call DebugRoom_PrintStackBottomTop + ret + +DebugRoom_PrintStackBottomTop: + ld a, BANK(sStackTop) + call OpenSRAM + hlcoord 16, 14 + ld de, sStackTop + 1 + ld c, 1 + call PrintHexNumber + ld de, sStackTop + 0 + ld c, 1 + call PrintHexNumber + call CloseSRAM + hlcoord 16, 12 + ld de, .SPString + call PlaceString + ld d, LOW(wStackBottom) + ld e, HIGH(wStackBottom) + push de + ld hl, sp+0 + ld d, h + ld e, l + hlcoord 16, 13 + ld c, 2 + call PrintHexNumber + pop de + ret + +.SPString: + db "SP:@" + +DebugRoomMenu_WinWorkClr: + call YesNoBox + ret c + ld a, [wWindowStackPointer] + ld l, a + ld a, [wWindowStackPointer + 1] + ld h, a + inc hl + ld a, l + sub LOW(wWindowStack) + ld a, h + sbc HIGH(wWindowStack) + ret c + ld a, $00 + call OpenSRAM + ld bc, -wWindowStack + $10000 + add hl, bc + ld b, h + ld c, l + ld hl, wWindowStack + xor a + call ByteFill + call CloseSRAM + ret + +DebugRoom_PrintWindowStackBottomTop: + ret ; stubbed out + + ld a, $00 + call OpenSRAM + ld hl, wWindowStack +.loop + ld a, h + cp $c0 + jr z, .ok + ld a, [hl] + or a + jr nz, .ok + inc hl + jr .loop +.ok + call CloseSRAM + ld a, h + ld h, l + ld l, a + push hl + ld hl, sp+0 + ld d, h + ld e, l + hlcoord 16, 17 + ld c, 2 + call PrintHexNumber + pop hl + ld d, LOW(wWindowStack) + ld e, HIGH(wWindowStack) + push de + ld hl, sp+0 + ld d, h + ld e, l + hlcoord 16, 16 + ld c, 2 + call PrintHexNumber + pop de + hlcoord 16, 15 + ld de, .WSPString + call PlaceString + ret + +.WSPString: + db "WSP:@" + +DebugRoomMenu_PokedexComp: + call YesNoBox + ret c + ld a, BANK(sGameData) ; aka BANK(sPlayerData) + call OpenSRAM + ld hl, sPlayerData + (wPokedexCaught - wPlayerData) + ld b, wEndPokedexSeen - wPokedexCaught + ld a, %11111111 +.loop1 + ld [hli], a + dec b + jr nz, .loop1 + ld a, (1 << (NUM_POKEMON % 8)) - 1 ; %00000111 + ld [sPlayerData + (wEndPokedexCaught - 1 - wPlayerData)], a + ld [sPlayerData + (wEndPokedexSeen - 1 - wPlayerData)], a + ld hl, sPlayerData + (wStatusFlags - wPlayerData) + set STATUSFLAGS_UNOWN_DEX_F, [hl] + ld a, UNOWN_A + ld [sGameData + (wFirstUnownSeen - wGameData)], a + ld hl, sGameData + (wUnownDex - wGameData) + ld b, NUM_UNOWN +.loop2 + ld [hli], a + inc a + dec b + jr nz, .loop2 + call CloseSRAM + call DebugRoom_SaveChecksum + ret + +DebugRoomMenu_PokedexClr: + call YesNoBox + ret c + ld a, BANK(sPlayerData) + call OpenSRAM + ld hl, sPlayerData + (wStatusFlags - wPlayerData) + res STATUSFLAGS_UNOWN_DEX_F, [hl] + ld hl, sPlayerData + (wPokedexCaught - wPlayerData) + ld bc, wEndPokedexSeen - wPokedexCaught + xor a + call ByteFill + ld hl, sGameData + (wUnownDex - wGameData) + ld bc, NUM_UNOWN + xor a + call ByteFill + call CloseSRAM + call DebugRoom_SaveChecksum + ret + +DebugRoomMenu_TimerReset: + call YesNoBox + ret c + ld a, BANK(sRTCStatusFlags) + call OpenSRAM + ld hl, sRTCStatusFlags + set 7, [hl] + call CloseSRAM + ret + +DebugRoomMenu_BattleSkip: + ld a, BANK(sSkipBattle) + call OpenSRAM + ld a, [sSkipBattle] + inc a + and 1 + ld [sSkipBattle], a + call CloseSRAM + ret + +DebugRoom_PrintBattleSkip: + hlcoord 16, 6 + ld de, .BTLString + call PlaceString + ld a, BANK(sSkipBattle) + call OpenSRAM + ld a, [sSkipBattle] + call CloseSRAM + hlcoord 16, 7 + ld de, .DoString + or a + jr z, .ok + ld de, .SkipString +.ok + call PlaceString + ret + +.BTLString: + db "BTL:@" +.DoString: + db " DO@" +.SkipString: + db "SKIP@" + +DebugRoomMenu_ChangeSex: + ld a, BANK(sCrystalData) + call OpenSRAM + ld a, [sCrystalData + (wPlayerGender - wCrystalData)] + inc a + and 1 + ld [sCrystalData + (wPlayerGender - wCrystalData)], a + call CloseSRAM + ret + +DebugRoom_PrintGender: + hlcoord 16, 0 + ld de, .SexString + call PlaceString + ld a, BANK(sCrystalData) + call OpenSRAM + ld a, [sCrystalData + (wPlayerGender - wCrystalData)] + call CloseSRAM + or a + ld a, "♂" + jr z, .ok + ld a, "♀" +.ok + hlcoord 19, 1 + ld [hl], a + ret + +.SexString: + db "SEX:@" + +DebugRoomMenu_TelDebug: + ld a, BANK(sDebugTimeCyclesSinceLastCall) + call OpenSRAM + ld a, [sDebugTimeCyclesSinceLastCall] + inc a + cp 3 + jr c, .ok + xor a +.ok + ld [sDebugTimeCyclesSinceLastCall], a + call CloseSRAM + ret + +DebugRoom_PrintTelDebug: + hlcoord 16, 16 + ld de, .TelString + call PlaceString + ld a, BANK(sDebugTimeCyclesSinceLastCall) + call OpenSRAM + ld a, [sDebugTimeCyclesSinceLastCall] + call CloseSRAM + hlcoord 16, 17 + ld de, .BusyString + dec a + jr z, .ok + ld de, .HardString + dec a + jr z, .ok + ld de, .OffString +.ok + call PlaceString + ret + +.TelString: + db "TEL:@" +.OffString: + db " OFF@" +.BusyString: + db "BUSY@" +.HardString: + db "HARD@" + +DebugRoomMenu_RAMFlagClr: + call YesNoBox + ret c + ld a, BANK(sOpenedInvalidSRAM) + call OpenSRAM + xor a + ld [sOpenedInvalidSRAM], a + call CloseSRAM + ret + +DebugRoom_PrintRAMFlag: + ld a, BANK(sOpenedInvalidSRAM) + call OpenSRAM + ld de, sOpenedInvalidSRAM + hlcoord 18, 4 + ld c, 1 + call PrintHexNumber + call CloseSRAM + hlcoord 16, 3 + ld de, .RamString + call PlaceString + ret + +.RamString: + db "RAM:@" + +DebugRoomMenu_SumRecalc: + call YesNoBox + ret c + call DebugRoom_SaveChecksum + ret + +DebugRoomMenu_DecorateAll: + call YesNoBox + ret c + ld a, BANK(sPlayerData) + call OpenSRAM + ld hl, sPlayerData + (wEventFlags - wPlayerData) + ld de, EVENT_DECO_BED_1 ; the first EVENT_DECO_* constant + ld b, SET_FLAG + ld c, EVENT_DECO_BIG_LAPRAS_DOLL - EVENT_DECO_BED_1 + 1 +.loop + push bc + push de + push hl + call FlagAction + pop hl + pop de + pop bc + inc de + dec c + jr nz, .loop + call CloseSRAM + call DebugRoom_SaveChecksum + ret + +MACRO paged_value + dw \1 ; value address + db \2 ; min value + db \3 ; max value + db \4 ; initial value + dw \5 ; label string + dw \6 ; value name function + db \7 ; is hex value? +ENDM + +DEF PAGED_VALUE_SIZE EQU 10 + +DebugRoom_EditPagedValues: + xor a + ld [wDebugRoomCurPage], a + ld [wDebugRoomCurValue], a + ld a, [hli] + ld [wDebugRoomAFunction], a + ld a, [hli] + ld [wDebugRoomAFunction+1], a + ld a, [hli] + ld [wDebugRoomSelectFunction], a + ld a, [hli] + ld [wDebugRoomSelectFunction+1], a + ld a, [hli] + ld [wDebugRoomStartFunction], a + ld a, [hli] + ld [wDebugRoomStartFunction+1], a + ld a, [hli] + ld [wDebugRoomAutoFunction], a + ld a, [hli] + ld [wDebugRoomAutoFunction+1], a + ld a, [hli] + ld [wDebugRoomPageCount], a + ld a, l + ld [wDebugRoomPagesPointer], a + ld a, h + ld [wDebugRoomPagesPointer+1], a + ld hl, hInMenu + ld a, [hl] + push af + ld [hl], TRUE + call ClearBGPalettes + hlcoord 0, 0 + ld b, SCREEN_HEIGHT - 2 + ld c, SCREEN_WIDTH - 2 + call Textbox + hlcoord 8, 17 + ld de, DebugRoom_PageString + call PlaceString + call DebugRoom_InitializePagedValues + xor a + call DebugRoom_PrintPage + ld a, "▶" + call DebugRoom_ShowHideCursor + xor a + ldh [hJoyLast], a + xor a + ld [wDebugRoomCurPage], a + inc a + ldh [hBGMapMode], a + call WaitBGMap + ld b, SCGB_DIPLOMA + call GetSGBLayout + call SetPalettes +.resume + call DelayFrame + call JoyTextDelay + ldh a, [hJoyLast] + bit 1, a + jr nz, .done + ld hl, .continue + push hl + rra ; A_BUTTON_F? + jr c, DebugRoom_PagedValuePressedA + rra ; skip B_BUTTON_F + rra ; SELECT_F? + jr c, DebugRoom_PagedValuePressedSelect + rra ; START_F? + jr c, DebugRoom_PagedValuePressedStart + rra ; D_RIGHT_F? + jp c, DebugRoom_IncrementPagedValue + rra ; D_LEFT_F? + jp c, DebugRoom_DecrementPagedValue + rra ; D_UP_F? + jp c, DebugRoom_PrevPagedValue + rra ; D_DOWN_F? + jp c, DebugRoom_NextPagedValue + pop hl +.continue +; call wDebugRoomAutoFunction if it's not null, then jump to .resume + ld hl, .resume + push hl + ld a, [wDebugRoomAutoFunction] + ld l, a + ld a, [wDebugRoomAutoFunction+1] + ld h, a + or l + ret z + jp hl + +.done + pop af + ldh [hInMenu], a + scf + ret + +DebugRoom_PagedValuePressedA: + ld hl, wDebugRoomAFunction + jr _CallNonNullPointer + +DebugRoom_PagedValuePressedSelect: + ld hl, wDebugRoomSelectFunction + jr _CallNonNullPointer + +DebugRoom_PagedValuePressedStart: + ld hl, wDebugRoomStartFunction + ; fallthrough + +_CallNonNullPointer: + ld a, [hli] + ld h, [hl] + ld l, a + or h + ret z + jp hl + +DebugRoom_PageString: + db " P @" + +DebugRoom_IncrementPagedValue: + call DebugRoom_GetCurPagedValuePointer + ld e, [hl] ; de = value address + inc hl + ld d, [hl] + inc hl + inc hl + ld a, [de] ; a = max value + cp [hl] + ret z + inc a + ld [de], a + call DebugRoom_PrintPageBValueC + ret + +DebugRoom_DecrementPagedValue: + call DebugRoom_GetCurPagedValuePointer + ld e, [hl] ; de = value address + inc hl + ld d, [hl] + inc hl + ld a, [de] ; a = min value + cp [hl] + ret z + dec a + ld [de], a + call DebugRoom_PrintPageBValueC + ret + +DebugRoom_NextPage: + ld a, [wDebugRoomPageCount] + ld c, a + ld a, [wDebugRoomCurPage] + inc a + cp c + jr c, .ok + xor a +.ok + ld [wDebugRoomCurPage], a + call DebugRoom_PrintPage + ld a, [wDebugRoomCurPage] + call DebugRoom_GetNthPagePointer + ld a, [wDebugRoomCurValue] + cp [hl] + jr c, .skip + ld a, [hl] + dec a + ld [wDebugRoomCurValue], a +.skip + ld a, "▶" + call DebugRoom_ShowHideCursor + ret + +DebugRoom_PrevPage: + ld a, [wDebugRoomCurPage] + or a + jr nz, .ok + ld a, [wDebugRoomPageCount] +.ok + dec a + ld [wDebugRoomCurPage], a + call DebugRoom_PrintPage + ld a, [wDebugRoomCurPage] + call DebugRoom_GetNthPagePointer + ld a, [wDebugRoomCurValue] + cp [hl] + jr c, .skip + ld a, [hl] + dec a + ld [wDebugRoomCurValue], a +.skip + ld a, "▶" + call DebugRoom_ShowHideCursor + ret + +DebugRoom_NextPagedValue: + ld a, " " + call DebugRoom_ShowHideCursor + ld a, [wDebugRoomCurPage] + call DebugRoom_GetNthPagePointer + ld a, [wDebugRoomCurValue] + inc a + cp [hl] ; incremented value < paged_value count? + jr c, DebugRoom_UpdateValueCursor + xor a + ld [wDebugRoomCurValue], a + jr DebugRoom_NextPage + +DebugRoom_UpdateValueCursor: + ld [wDebugRoomCurValue], a + ld a, "▶" + call DebugRoom_ShowHideCursor + ret + +DebugRoom_PrevPagedValue: + ld a, " " + call DebugRoom_ShowHideCursor + ld a, [wDebugRoomCurValue] + or a ; pre-decremented value > 0? + jr nz, .decrement + ld a, -1 + ld [wDebugRoomCurValue], a + jr DebugRoom_PrevPage + +.decrement: + dec a + jr DebugRoom_UpdateValueCursor + +DebugRoom_GetNthPagePointer: +; Input: a = page index +; Output: hl = pointer to paged_data list + ld h, 0 + ld l, a + add hl, hl + ld a, [wDebugRoomPagesPointer] + ld e, a + ld a, [wDebugRoomPagesPointer+1] + ld d, a + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ret + +_DebugRoom_GetPageBValueCPointer: + push bc + ld a, b + call DebugRoom_GetNthPagePointer + pop bc + inc hl + ld a, c + ld bc, PAGED_VALUE_SIZE + call AddNTimes + ret + +DebugRoom_GetCurPagedValuePointer: + ld a, [wDebugRoomCurPage] + ld b, a + ld a, [wDebugRoomCurValue] + ld c, a + jr _DebugRoom_GetPageBValueCPointer + +DebugRoom_ShowHideCursor: + push af + hlcoord 1, 1 + ld bc, SCREEN_WIDTH * 2 + ld a, [wDebugRoomCurValue] + call AddNTimes + pop af + ld [hl], a + ret + +DebugRoom_InitializePagedValues: +; Load the initial values for all pages of the current paged value header + ld a, [wDebugRoomPageCount] +.page_loop + dec a + push af + call .InitializePage + pop af + jr nz, .page_loop + ret + +.InitializePage: +; Load the initial values for page a + ld b, a + ld h, 0 + ld l, a + add hl, hl + ld a, [wDebugRoomPagesPointer] + ld e, a + ld a, [wDebugRoomPagesPointer+1] + ld d, a + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld c, [hl] ; c = paged_value count +.value_loop + push bc + dec c + call .InitializeValue + pop bc + dec c + jr nz, .value_loop + ret + +.InitializeValue: +; Load the initial value for page b, value c + ld h, 0 + ld l, b + add hl, hl + ld a, [wDebugRoomPagesPointer] + ld e, a + ld a, [wDebugRoomPagesPointer+1] + ld d, a + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + inc hl ; skip the paged_value count + ld a, c + push bc + ld bc, PAGED_VALUE_SIZE + call AddNTimes + pop bc + ld e, [hl] ; de = value address + inc hl + ld d, [hl] + inc hl + inc hl + inc hl + ld a, [hl] ; a = initial value + ld [de], a + ret + +DebugRoom_PrintPage: + push af + hlcoord 10, 17 + add "1" + ld [hl], a + hlcoord 1, 1 + lb bc, SCREEN_HEIGHT - 2, SCREEN_WIDTH - 2 + call ClearBox + pop af + ld b, a + ld h, 0 + ld l, a + add hl, hl + ld a, [wDebugRoomPagesPointer] + ld e, a + ld a, [wDebugRoomPagesPointer+1] + ld d, a + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld c, [hl] ; c = paged_value count +.loop + push bc + dec c + call DebugRoom_PrintPagedValue + pop bc + dec c + jr nz, .loop + ret + +DebugRoom_PrintPageBValueC: + ld a, [wDebugRoomCurPage] + ld b, a + ld a, [wDebugRoomCurValue] + ld c, a + jr DebugRoom_PrintPagedValue + +DebugRoom_PrintPagedValue: +; Print the value for page b, value c + ld h, 0 + ld l, b + add hl, hl + ld a, [wDebugRoomPagesPointer] + ld e, a + ld a, [wDebugRoomPagesPointer+1] + ld d, a + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + inc hl ; skip the paged_value count + ld a, c + push bc + ld bc, PAGED_VALUE_SIZE + call AddNTimes + pop bc + ld e, [hl] ; de = value address + inc hl + ld d, [hl] + inc hl + push de + inc hl + inc hl + inc hl + ld e, [hl] ; de = label string + inc hl + ld d, [hl] + inc hl + push hl + hlcoord 2, 1 + ld a, c + ld bc, SCREEN_WIDTH * 2 + call AddNTimes + push hl + call PlaceString + pop hl + ld bc, SCREEN_WIDTH - 7 + add hl, bc + pop bc ; pushed hl + pop de + push de + push bc + inc bc + inc bc + ld a, [bc] ; a = is hex value? + or a + jr nz, .hex + lb bc, PRINTNUM_LEADINGZEROS | 1, 3 + call PrintNum + jr .printed +.hex + ld c, 1 + call PrintHexNumber + ld [hl], "H" + inc hl +.printed + ld bc, 6 + add hl, bc + ld b, h + ld c, l + pop hl + pop de + ld a, [hli] ; hl = value name function + ld h, [hl] + ld l, a + or h + ret z + ld a, [de] + jp hl + +DebugRoom_JoyWaitABSelect: +.loop + call GetJoypad + ldh a, [hJoyPressed] + and A_BUTTON | B_BUTTON | SELECT + jr z, .loop + ret + +DebugRoomMenu_ItemGet: + ld hl, .PagedValuesHeader + call DebugRoom_EditPagedValues + ret + +.PagedValuesHeader: + dw NULL ; A function + dw NULL ; Select function + dw DebugRoom_SaveItem ; Start function + dw NULL ; Auto function + db 1 ; # pages + dw DebugRoomMenu_ItemGet_Page1Values + +DebugRoom_SaveItem: + call YesNoBox + ret c + ld a, BANK(sPlayerData) + call OpenSRAM + ld hl, sPlayerData + (wPCItems - wPlayerData) + ld a, [wDebugRoomItemID] + ld c, a +.loop1 + ld a, [hl] + cp c + jr z, .found + cp -1 + jr z, .not_found + inc hl + inc hl + jr .loop1 + +.found + inc hl + ld a, [wDebugRoomItemQuantity] + add [hl] + cp MAX_ITEM_STACK + 1 + jr c, .max + ld a, MAX_ITEM_STACK +.max + ld [hl], a + ld hl, .ItemNumberAddedText + jr .done + +.not_found + ld a, [sPlayerData + (wNumPCItems - wPlayerData)] + cp MAX_PC_ITEMS + jr nc, .full + inc a + ld [sPlayerData + (wNumPCItems - wPlayerData)], a + ld a, [wDebugRoomItemID] + ld [hli], a + ld a, [wDebugRoomItemQuantity] + ld [hli], a + ld [hl], -1 ; terminator + ld hl, .CreatedNewItemText + jr .done + +.full + ld hl, .StockFullText +.done + call CloseSRAM + call MenuTextbox + call DebugRoom_JoyWaitABSelect + call CloseWindow + call DebugRoom_SaveChecksum + ret + +.ItemNumberAddedText: + text "Item number added!" + done + +.CreatedNewItemText: + text "Created new item!" + done + +.StockFullText: + text "Stock full!!" + done + +DebugRoom_PrintItemName: + ld [wNamedObjectIndex], a + push bc + call GetItemName + pop hl + push hl + lb bc, 1, 12 + call ClearBox + pop hl + ld de, wStringBuffer1 + call PlaceString + ret + +DebugRoomMenu_ItemGet_Page1Values: + db 2 + paged_value wDebugRoomItemID, 1, NUM_POKEMON, MASTER_BALL, .ItemNameString, DebugRoom_PrintItemName, FALSE + paged_value wDebugRoomItemQuantity, 1, 99, 1, .NumberString, NULL, FALSE + +.ItemNameString: db "ITEM NAME@" +.NumberString: db "NUMBER@" + +DebugRoomMenu_PokemonGet: + ld hl, .PagedValuesHeader + call DebugRoom_EditPagedValues + ret + +.PagedValuesHeader: + dw NULL ; A function + dw NULL ; Select function + dw DebugRoom_SavePokemon ; Start function + dw NULL ; Auto function + db 4 ; # pages + dw DebugRoomMenu_PokemonGet_Page1Values + dw DebugRoomMenu_PokemonGet_Page2Values + dw DebugRoomMenu_PokemonGet_Page3Values + dw DebugRoomMenu_PokemonGet_Page4Values + +DebugRoom_SavePokemon: + call YesNoBox + ret c + call DebugRoom_UpdateExpForLevel + ld a, [wDebugRoomMonBox] + dec a + ld b, a + add a + add b + ld h, 0 + ld l, a + ld de, DebugRoom_BoxAddresses + add hl, de + ld a, [hli] + call OpenSRAM + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hl] + cp MONS_PER_BOX + jr nc, .full + ; update count and species list + push hl + inc [hl] + inc hl + ld d, 0 + ld e, a + add hl, de + ld a, [wDebugRoomMonSpecies] + ld [hli], a + ld [hl], -1 + pop hl + ; skip count and species list + ld bc, 2 + MONS_PER_BOX + add hl, bc + ; update Nth box mon + push de + push hl + ld a, e + ld bc, BOXMON_STRUCT_LENGTH + call AddNTimes + ld d, h + ld e, l + ld hl, wDebugRoomMon + ld bc, BOXMON_STRUCT_LENGTH + call CopyBytes + pop hl + pop de + ; skip box mons + ld bc, BOXMON_STRUCT_LENGTH * MONS_PER_BOX + add hl, bc + ; update Nth OT name + push de + push hl + ld a, e + ld bc, NAME_LENGTH + call AddNTimes + ld d, h + ld e, l + ld hl, .OTString + ld bc, NAME_LENGTH + call CopyBytes + pop hl + pop de + ; skip OT names + ld bc, NAME_LENGTH * MONS_PER_BOX + add hl, bc + ; update Nth nickname + push de + push hl + ld a, e + ld bc, MON_NAME_LENGTH + call AddNTimes + ld d, h + ld e, l + ld hl, .NicknameString + ld bc, MON_NAME_LENGTH + call CopyBytes + pop hl + pop de + call CloseSRAM + ld hl, .CompletedText + call MenuTextbox + call DebugRoom_JoyWaitABSelect + call CloseWindow + ret + +.full + call CloseSRAM + ld hl, .BoxIsFullText + call MenuTextbox + call DebugRoom_JoyWaitABSelect + call CloseWindow + ret + +.OTString: + db "DEBUG▶OT@" + +.NicknameString: + db "DEBUG▶@" + +.CompletedText: + text "COMPLETED!" + done + +.BoxIsFullText: + text "BOX IS FULL!" + done + +DebugRoom_PrintPokemonName: + ld [wNamedObjectIndex], a + push bc + call GetPokemonName + jr _DebugRoom_FinishGetName + +DebugRoom_PrintItemName2: + ld [wNamedObjectIndex], a + push bc + call GetItemName + jr _DebugRoom_FinishGetName + +DebugRoom_PrintMoveName: + ld [wNamedObjectIndex], a + push bc + call GetMoveName + jr _DebugRoom_FinishGetName + +_DebugRoom_FinishGetName: + pop hl + push hl + lb bc, 1, 12 + call ClearBox + pop hl + ld de, wStringBuffer1 + call PlaceString + ret + +DebugRoom_UpdateExpForLevel: + ld hl, BaseData + BASE_GROWTH_RATE + ld bc, BASE_DATA_SIZE + ld a, [wDebugRoomMonSpecies] + dec a + call AddNTimes + ld a, BANK(BaseData) + call GetFarByte + ld [wBaseGrowthRate], a + ld a, [wDebugRoomMonLevel] + ld d, a + farcall CalcExpAtLevel + ld hl, wDebugRoomMonExp + ldh a, [hProduct + 1] + ld [hli], a + ldh a, [hProduct + 2] + ld [hli], a + ldh a, [hProduct + 3] + ld [hl], a + ret + +DebugRoomMenu_PokemonGet_Page1Values: + db 8 + paged_value wDebugRoomMonSpecies, 1, NUM_POKEMON, BULBASAUR, DebugRoom_BoxStructStrings.Pokemon, DebugRoom_PrintPokemonName, FALSE + paged_value wDebugRoomMonItem, 1, $ff, MASTER_BALL, DebugRoom_BoxStructStrings.Item, DebugRoom_PrintItemName2, FALSE + paged_value wDebugRoomMonMoves+0, 1, NUM_ATTACKS, POUND, DebugRoom_BoxStructStrings.Move1, DebugRoom_PrintMoveName, FALSE + paged_value wDebugRoomMonMoves+1, 1, NUM_ATTACKS, POUND, DebugRoom_BoxStructStrings.Move2, DebugRoom_PrintMoveName, FALSE + paged_value wDebugRoomMonMoves+2, 1, NUM_ATTACKS, POUND, DebugRoom_BoxStructStrings.Move3, DebugRoom_PrintMoveName, FALSE + paged_value wDebugRoomMonMoves+3, 1, NUM_ATTACKS, POUND, DebugRoom_BoxStructStrings.Move4, DebugRoom_PrintMoveName, FALSE + paged_value wDebugRoomMonID+0, $00, $ff, HIGH(1234), DebugRoom_BoxStructStrings.ID0, NULL, FALSE + paged_value wDebugRoomMonID+1, $00, $ff, LOW(1234), DebugRoom_BoxStructStrings.ID1, NULL, FALSE + +DebugRoomMenu_PokemonGet_Page2Values: + db 8 + paged_value wDebugRoomMonHPExp+0, $00, $ff, $00, DebugRoom_BoxStructStrings.HPExp0, NULL, FALSE + paged_value wDebugRoomMonHPExp+1, $00, $ff, $00, DebugRoom_BoxStructStrings.HPExp1, NULL, FALSE + paged_value wDebugRoomMonAtkExp+0, $00, $ff, $00, DebugRoom_BoxStructStrings.AttkExp0, NULL, FALSE + paged_value wDebugRoomMonAtkExp+1, $00, $ff, $00, DebugRoom_BoxStructStrings.AttkExp1, NULL, FALSE + paged_value wDebugRoomMonDefExp+0, $00, $ff, $00, DebugRoom_BoxStructStrings.DfnsExp0, NULL, FALSE + paged_value wDebugRoomMonDefExp+1, $00, $ff, $00, DebugRoom_BoxStructStrings.DfnsExp1, NULL, FALSE + paged_value wDebugRoomMonSpdExp+0, $00, $ff, $00, DebugRoom_BoxStructStrings.SpeedExp0, NULL, FALSE + paged_value wDebugRoomMonSpdExp+1, $00, $ff, $00, DebugRoom_BoxStructStrings.SpeedExp1, NULL, FALSE + +DebugRoomMenu_PokemonGet_Page3Values: + db 8 + paged_value wDebugRoomMonSpcExp+0, $00, $ff, $00, DebugRoom_BoxStructStrings.SpclExp0, NULL, FALSE + paged_value wDebugRoomMonSpcExp+1, $00, $ff, $00, DebugRoom_BoxStructStrings.SpclExp1, NULL, FALSE + paged_value wDebugRoomMonDVs+0, $00, $ff, $00, DebugRoom_BoxStructStrings.PowerRnd0, NULL, TRUE + paged_value wDebugRoomMonDVs+1, $00, $ff, $00, DebugRoom_BoxStructStrings.PowerRnd1, NULL, TRUE + paged_value wDebugRoomMonPP+0, $00, $ff, $00, DebugRoom_BoxStructStrings.PP1, NULL, FALSE + paged_value wDebugRoomMonPP+1, $00, $ff, $00, DebugRoom_BoxStructStrings.PP2, NULL, FALSE + paged_value wDebugRoomMonPP+2, $00, $ff, $00, DebugRoom_BoxStructStrings.PP3, NULL, FALSE + paged_value wDebugRoomMonPP+3, $00, $ff, $00, DebugRoom_BoxStructStrings.PP4, NULL, FALSE + +DebugRoomMenu_PokemonGet_Page4Values: + db 6 + paged_value wDebugRoomMonHappiness, $00, $ff, BASE_HAPPINESS, DebugRoom_BoxStructStrings.Friend, NULL, FALSE + paged_value wDebugRoomMonPokerusStatus, $00, $ff, $00, DebugRoom_BoxStructStrings.Pokerus, NULL, TRUE + paged_value wDebugRoomMonCaughtData+0, $00, $ff, $00, DebugRoom_BoxStructStrings.NoUse0, NULL, FALSE + paged_value wDebugRoomMonCaughtData+1, $00, $ff, $00, DebugRoom_BoxStructStrings.NoUse1, NULL, FALSE + paged_value wDebugRoomMonLevel, 1, MAX_LEVEL, $05, DebugRoom_BoxStructStrings.Level, NULL, FALSE + paged_value wDebugRoomMonBox, 1, NUM_BOXES, $0e, DebugRoom_BoxStructStrings.SendBox, NULL, FALSE + +DebugRoom_BoxStructStrings: +.Pokemon: db "#MON@" +.Item: db "ITEM@" +.Move1: db "MOVE 1@" +.Move2: db "MOVE 2@" +.Move3: db "MOVE 3@" +.Move4: db "MOVE 4@" +.ID0: db "ID[0]@" +.ID1: db "ID[1]@" +.BaseExp0: db "BASE EXP[0]@" ; unreferenced +.BaseExp1: db "BASE EXP[1]@" ; unreferenced +.BaseExp2: db "BASE EXP[2]@" ; unreferenced +.HPExp0: db "HP EXP[0]@" +.HPExp1: db "HP EXP[1]@" +.AttkExp0: db "ATTK EXP[0]@" +.AttkExp1: db "ATTK EXP[1]@" +.DfnsExp0: db "DFNS EXP[0]@" +.DfnsExp1: db "DFNS EXP[1]@" +.SpeedExp0: db "SPEED EXP[0]@" +.SpeedExp1: db "SPEED EXP[1]@" +.SpclExp0: db "SPCL EXP[0]@" +.SpclExp1: db "SPCL EXP[1]@" +.PowerRnd0: db "POWER RND[0] RARE:--1-1010@" +.PowerRnd1: db "POWER RND[1] RARE:10101010@" +.PP1: db "PP 1@" +.PP2: db "PP 2@" +.PP3: db "PP 3@" +.PP4: db "PP 4@" +.Friend: db "FRIEND@" +.Pokerus: db "#RUS@" +.NoUse0: db "NO USE[0]@" +.NoUse1: db "NO USE[1]@" +.Level: db "LEVEL@" +.SendBox: db "SEND BOX@" + +DebugRoom_BoxAddresses: + table_width 3, DebugRoom_BoxAddresses +for n, 1, NUM_BOXES + 1 + dba sBox{d:n} +endr + assert_table_length NUM_BOXES + +DebugRoomMenu_RTCEdit: + ld hl, .PagedValuesHeader + call DebugRoom_EditPagedValues + ret + +.PagedValuesHeader: + dw NULL ; A function + dw NULL ; Select function + dw DebugRoom_SaveRTC ; Start function + dw DebugRoomMenu_RTCEdit_UpdateClock ; Auto function + db 1 ; # pages + dw DebugRoomMenu_RTCEdit_Page1Values + +DebugRoom_SaveRTC: + call YesNoBox + ret c + ld hl, wDebugRoomRTCSec + call DebugRoom_SetClock + ret + +DebugRoomMenu_RTCEdit_UpdateClock: + ld hl, wDebugRoomRTCCurSec + call DebugRoom_GetClock + ld de, DebugRoom_DayHTimeString + hlcoord 3, 14 + call PlaceString + ld a, [wDebugRoomRTCCurDay + 0] + ld h, a + ld a, [wDebugRoomRTCCurDay + 1] + ld l, a + push hl + ld hl, sp+0 + ld d, h + ld e, l + hlcoord 7, 14 + ld c, 2 + call PrintHexNumber + pop hl + hlcoord 8, 15 + ld de, wDebugRoomRTCCurHour + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ld [hl], ":" + inc hl + ld de, wDebugRoomRTCCurMin + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ld [hl], ":" + inc hl + ld de, wDebugRoomRTCCurSec + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ret + +DebugRoom_DayHTimeString: + db "DAY HTIME@" + +DebugRoom_GetClock: + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a + xor a + ld [MBC3LatchClock], a + inc a + ld [MBC3LatchClock], a + ld b, RTC_DH - RTC_S + 1 + ld c, RTC_S +.loop + ld a, c + ld [MBC3SRamBank], a + ld a, [MBC3RTC] + ld [hli], a + inc c + dec b + jr nz, .loop + call CloseSRAM + ret + +DebugRoom_SetClock: + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a + ld b, RTC_DH - RTC_S + 1 + ld c, RTC_S +.loop + ld a, c + ld [MBC3SRamBank], a + ld a, [hli] + ld [MBC3RTC], a + inc c + dec b + jr nz, .loop + call CloseSRAM + ret + +DebugRoomMenu_RTCEdit_Page1Values: + db 5 + paged_value wDebugRoomRTCSec, 0, 60 - 1, 0, .SecondString, NULL, FALSE + paged_value wDebugRoomRTCMin, 0, 60 - 1, 0, .MinuteString, NULL, FALSE + paged_value wDebugRoomRTCHour, 0, 24 - 1, 0, .HourString, NULL, FALSE + paged_value wDebugRoomRTCDay+0, $00, $ff, 0, .DayLString, NULL, TRUE + paged_value wDebugRoomRTCDay+1, $00, $ff, 0, .DayHString, NULL, TRUE + +.SecondString: db "SECOND@" +.MinuteString: db "MINUTE@" +.HourString: db "HOUR@" +.DayLString: db "DAY L@" +.DayHString: db "DAY H BIT0:DAY MSB BIT6:HALT BIT7:DAY CARRY@" + +DebugRoomMenu_HaltChkClr: + call YesNoBox + ret c + ld a, BANK(sRTCHaltCheckValue) + call OpenSRAM + xor a + ld hl, sRTCHaltCheckValue + ld [hli], a + ld [hl], a + call CloseSRAM + call DebugRoom_PrintRTCHaltChk + ret + +DebugRoom_PrintRTCHaltChk: + hlcoord 16, 9 + ld de, .RTCString + call PlaceString + ld a, BANK(sRTCHaltCheckValue) + ld hl, sRTCHaltCheckValue + call OpenSRAM + ld a, [hli] + ld h, [hl] + ld l, a + call CloseSRAM + ld de, .HaltString + ld a, h + cp HIGH(RTC_HALT_VALUE) + jr nz, .ok + ld a, l + cp LOW(RTC_HALT_VALUE) + jr z, .done +.ok + ld de, .OKString +.done + hlcoord 16, 10 + call PlaceString + ret + +.RTCString: + db "RTC:@" + +.OKString: + db " OK@" + +.HaltString: + db "HALT@" + +DebugRoomMenu_GBIDSet: + ld hl, .PagedValuesHeader + call DebugRoom_EditPagedValues + ret + +.PagedValuesHeader: + dw NULL ; A function + dw NULL ; Select function + dw DebugRoom_SaveGBID ; Start function + dw NULL ; Auto function + db 1 ; # pages + dw DebugRoomMenu_GBIDSet_Page1Values + +DebugRoom_SaveGBID: + call YesNoBox + ret c + ld a, BANK(sPlayerData) + call OpenSRAM + ld hl, sPlayerData + (wPlayerID - wPlayerData) + ld a, [wDebugRoomGBID + 0] + ld [hli], a + ld a, [wDebugRoomGBID + 1] + ld [hli], a + call CloseSRAM + call DebugRoom_SaveChecksum + ret + +DebugRoomMenu_GBIDSet_Page1Values: + db 2 + paged_value wDebugRoomGBID+0, $00, $ff, $00, .GBID0String, NULL, TRUE + paged_value wDebugRoomGBID+1, $00, $ff, $00, .GBID1String, NULL, TRUE + +.GBID0String: db "GB ID [0]@" +.GBID1String: db "GB ID [1]@" + +DebugRoomMenu_BtlRecClr: + call YesNoBox + ret c + ld a, BANK(sLinkBattleStats) + call OpenSRAM + xor a + ld hl, sLinkBattleStats + ld bc, sLinkBattleStatsEnd - sLinkBattleStats + call ByteFill + call CloseSRAM + ret + +DebugRoomMenu_HOFClear: + call YesNoBox + ret c + ld a, BANK(sPlayerData) + call OpenSRAM + ld hl, sPlayerData + (wHallOfFameCount - wPlayerData) + ld [hl], 0 + xor a + ld hl, sHallOfFame + ld bc, sHallOfFameEnd - sHallOfFame + call ByteFill + call CloseSRAM + call DebugRoom_SaveChecksum + ret + +ComputeROMChecksum: + ld de, 0 + call .ComputeROM0Checksum + ld c, $01 ; first bank +.loop: + push bc + push de + ld a, c + cpl + inc a + add $80 + ld de, wDebugRoomCurChecksumBank + ld [de], a + hlcoord 16, 16 + ld c, 1 + call PrintHexNumber + ld [hl], "h" + pop de + pop bc + call ComputeROMXChecksum + inc c + ld a, c + cp $80 ; number of banks + jr c, .loop + ld a, d + ld [wDebugRoomROMChecksum + 0], a + ld a, e + ld [wDebugRoomROMChecksum + 1], a + ret + +.AddAtoDE: + add e + ld e, a + ld a, d + adc 0 + ld d, a + ret + +.ComputeROM0Checksum: + ld hl, $0000 ; ROM0 start +.rom0_loop + ld a, [hli] + call .AddAtoDE + ld a, h + cp $40 ; HIGH(ROM0 end) + jr c, .rom0_loop + ret + +.ComputeROMXChecksum: ; unreferenced + ld hl, $4000 ; ROMX start +.romx_loop + ld a, c + call GetFarByte + inc hl + call .AddAtoDE + ld a, h + cp $80 ; HIGH(ROMX end) + jr c, .romx_loop + ret + +DebugRoom_PrintROMChecksum: ; unreferenced + hlcoord 16, 0 + ld de, .SumString + call PlaceString + hlcoord 16, 1 + ld de, wDebugRoomROMChecksum + ld c, 2 + call PrintHexNumber + ret + +.SumString: + db "SUM:@" + +DebugRoomMenu_ROMChecksum: + ld hl, .WaitText + call MenuTextbox + call ComputeROMChecksum + call CloseWindow + ld hl, .ROMChecksumText + call MenuTextbox + hlcoord 14, 14 + ld de, wDebugRoomROMChecksum + ld c, 2 + call PrintHexNumber + ld [hl], "h" + call DebugRoom_JoyWaitABSelect + call CloseWindow + ret + +.WaitText: + text "Wait..." + done + +.ROMChecksumText: + text "ROM CHECKSUM:" + next "" + done + +DebugRoomMenu_BTBugPoke: + ld a, BANK(sIsBugMon) + call OpenSRAM + ld a, [sIsBugMon] + call CloseSRAM + or a + jr nz, .bug_mon + ld hl, .NoBugMonText + call MenuTextbox + call DebugRoom_JoyWaitABSelect + call CloseWindow + ret + +.NoBugMonText: + text "No bug #MON." + done + +.bug_mon: + ld hl, .ItsBugMonText + call MenuTextbox + ld a, BANK(sIsBugMon) + call OpenSRAM + hlcoord 4, 16 + ld de, sIsBugMon + ld c, 1 + call PrintHexNumber + ld [hl], "h" + call YesNoBox + jr c, .done + xor a + ld [sIsBugMon], a +.done + call CloseSRAM + call CloseWindow + ret + +.ItsBugMonText: + text "It'", "s bug #MON!" + next "No. Clear flag?" + done + +PrintHexNumber: +; Print the c-byte value from de to hl as hexadecimal digits. +.loop + push bc + call .HandleByte + pop bc + dec c + jr nz, .loop + ret + +.HandleByte: + ld a, [de] + swap a + and $f + call .PrintDigit + ld [hli], a + ld a, [de] + and $f + call .PrintDigit + ld [hli], a + inc de + ret + +.PrintDigit: + ld bc, .HexDigits + add c + ld c, a + ld a, 0 + adc b + ld b, a + ld a, [bc] + ret + +.HexDigits: + db "0123456789ABCDEF" diff --git a/engine/events/basement_key.asm b/engine/events/basement_key.asm new file mode 100644 index 0000000..ab8c39c --- /dev/null +++ b/engine/events/basement_key.asm @@ -0,0 +1,32 @@ +_BasementKey: +; Are we even in the right map to use this? + ld a, [wMapGroup] + cp GROUP_GOLDENROD_UNDERGROUND + jr nz, .nope + + ld a, [wMapNumber] + cp MAP_GOLDENROD_UNDERGROUND + jr nz, .nope +; Are we on the tile in front of the door? + call GetFacingTileCoord + ld a, d + cp 22 + jr nz, .nope + ld a, e + cp 10 + jr nz, .nope +; Let's use the Basement Key + ld hl, .BasementKeyScript + call QueueScript + ld a, TRUE + ld [wItemEffectSucceeded], a + ret + +.nope + ld a, FALSE + ld [wItemEffectSucceeded], a + ret + +.BasementKeyScript: + closetext + farsjump BasementDoorScript diff --git a/engine/events/battle_tower/battle_tower.asm b/engine/events/battle_tower/battle_tower.asm new file mode 100644 index 0000000..5df0420 --- /dev/null +++ b/engine/events/battle_tower/battle_tower.asm @@ -0,0 +1,1609 @@ +BattleTowerRoomMenu: +; special + call InitBattleTowerChallengeRAM + farcall _BattleTowerRoomMenu + ret + +Function1700ba: +; special + call InitBattleTowerChallengeRAM + farcall Function11811a + ret + +Function1700c4: + ldh a, [rSVBK] + push af + ld a, BANK(w3_d202TrainerData) ; aka BANK(w3_dffc) and BANK(w3_d202Name) + ldh [rSVBK], a + + call Function17042c + + ld a, BANK(s5_be45) ; aka BANK(s5_be46), BANK(s5_aa41), and BANK(s5_aa5d) + call OpenSRAM + ld a, 1 + ld [s5_be45], a + xor a + ld [s5_be46], a + ld hl, w3_dffc + ld de, s5_aa41 + ld bc, 4 + call CopyBytes + ld hl, w3_d202Name + ld de, s5_aa8e + ld bc, BATTLETOWER_STREAK_LENGTH * $cc ; length of battle tower struct from japanese games? + call CopyBytes + ld hl, s5_aa5d ; some sort of count + ld a, [hl] + inc [hl] + inc hl + sla a + sla a + ld e, a + ld d, 0 + add hl, de + ld e, l + ld d, h + ld hl, w3_dffc + ld bc, 4 + call CopyBytes + call CloseSRAM + pop af + ldh [rSVBK], a + ret + +Function170114: + call InitBattleTowerChallengeRAM + call .Function170121 + farcall Function11805f + ret + +.Function170121: + ld a, BANK(s5_a948) + call OpenSRAM + ld hl, s5_a948 + ld de, wc608 + ld bc, 246 + call CopyBytes + call CloseSRAM + call Function170c8b + ret + +Function170139: ; unreferenced +; Convert the 4-digit decimal number at s5_aa41 into binary + ld a, BANK(s5_aa41) + call OpenSRAM + ld de, s5_aa41 + ld h, 0 + ld l, h + ld bc, 1000 + call .DecToBin + ld bc, 100 + call .DecToBin + ld bc, 10 + call .DecToBin + ld a, [de] + ld c, a + ld b, 0 + add hl, bc + call CloseSRAM +; Store that number in wc608 + ld a, h + ld [wc608], a + ld a, l + ld [wc608 + 1], a + ld hl, wBT_OTTempMon1DVs + ld a, [wPlayerID] + ld [hli], a + ld a, [wPlayerID + 1] + ld [hli], a + ld a, [wSecretID] + ld [hli], a + ld a, [wSecretID + 1] + ld [hli], a + ld e, l + ld d, h + ld hl, wPlayerName + ld bc, NAME_LENGTH_JAPANESE - 1 + call CopyBytes + ld bc, wPlayerID + ld de, wPlayerGender + farcall GetMobileOTTrainerClass + ld de, wBT_OTTempMon1CaughtGender + ld a, c + ld [de], a + inc de + ld a, LOW(wPartyMons) + ld [wcd49], a + ld a, HIGH(wPartyMons) + ld [wcd4a], a + ld a, LOW(wPartyMonNicknames) + ld [wcd4b], a + ld a, HIGH(wPartyMonNicknames) + ld [wcd4c], a + ld a, 3 +.CopyLoop: + push af + ld a, [wcd49] + ld l, a + ld a, [wcd4a] + ld h, a + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + ld a, l + ld [wcd49], a + ld a, h + ld [wcd4a], a + ld a, [wcd4b] + ld l, a + ld a, [wcd4c] + ld h, a + ld bc, 6 + call CopyBytes + ld a, l + ld [wcd4b], a + ld a, h + ld [wcd4c], a + pop af + dec a + jr nz, .CopyLoop + + ld a, BANK(sEZChatBeginBattleMessage) + call OpenSRAM + ld hl, sEZChatBattleMessages + ld bc, EASY_CHAT_MESSAGE_LENGTH * 3 + call CopyBytes + call CloseSRAM + + ld a, BANK(s5_a894) ; aka BANK(s5_a948) + call OpenSRAM + ld hl, s5_a894 + ld bc, 6 + call CopyBytes + ld hl, wc608 + ld de, s5_a948 + ld bc, 246 + call CopyBytes + call CloseSRAM + ret + +.DecToBin: + ld a, [de] + inc de + and a + ret z + +.digit_loop + add hl, bc + dec a + jr nz, .digit_loop + ret + +BattleTowerBattle: + xor a ; FALSE + ld [wBattleTowerBattleEnded], a + call _BattleTowerBattle + xor a + ld l, LOCKED_MON_ID_BATTLE_TOWER_1 + call LockPokemonID + ld l, LOCKED_MON_ID_BATTLE_TOWER_2 + call LockPokemonID + ld l, LOCKED_MON_ID_BATTLE_TOWER_3 + call LockPokemonID + lb bc, NUM_MOVES * 3, LOCKED_MOVE_ID_BATTLE_TOWER_MON1_MOVE1 +.loop + ld l, c + call LockMoveID + inc c + dec b + jr nz, .loop + ret + +UnusedBattleTowerDummySpecial1: + ret + +InitBattleTowerChallengeRAM: + xor a + ld [wBattleTowerBattleEnded], a + ld [wNrOfBeatenBattleTowerTrainers], a + ld [wcf65], a + ld [wcf66], a + ret + +_BattleTowerBattle: +.loop + call .do_dw + call DelayFrame + ld a, [wBattleTowerBattleEnded] + cp TRUE + jr nz, .loop + ret + +.do_dw + jumptable .dw, wBattleTowerBattleEnded + +.dw + dw RunBattleTowerTrainer + dw SkipBattleTowerTrainer + +RunBattleTowerTrainer: + ld a, [wOptions] + push af + ld hl, wOptions + set BATTLE_SHIFT, [hl] ; SET MODE + + ld a, [wInBattleTowerBattle] + push af + or 1 + ld [wInBattleTowerBattle], a + + xor a + ld [wLinkMode], a + farcall StubbedTrainerRankings_Healings + farcall HealParty + call ReadBTTrainerParty + call Clears5_a89a + + predef StartBattle + + farcall LoadPokemonData + farcall HealParty + ld a, [wBattleResult] + ld [wScriptVar], a + and a ; WIN? + jr nz, .lost + ld a, BANK(sNrOfBeatenBattleTowerTrainers) + call OpenSRAM + ld a, [sNrOfBeatenBattleTowerTrainers] + ld [wNrOfBeatenBattleTowerTrainers], a + call CloseSRAM + ld hl, wStringBuffer3 + ld a, [wNrOfBeatenBattleTowerTrainers] + add "1" + ld [hli], a + ld a, "@" + ld [hl], a + +.lost + pop af + ld [wInBattleTowerBattle], a + pop af + ld [wOptions], a + ld a, TRUE + ld [wBattleTowerBattleEnded], a + ret + +ReadBTTrainerParty: +; Initialise the BattleTower-Trainer and his mon + call CopyBTTrainer_FromBT_OT_TowBT_OTTemp + +; Check the nicknames for illegal characters, and replace bad nicknames +; with their species names. + ld de, wBT_OTTempMon1Name + ld c, MON_NAME_LENGTH + farcall CheckStringForErrors + jr nc, .skip_mon_1 + + ld a, [wBT_OTTempMon1] + ld [wNamedObjectIndex], a + call GetPokemonName + ld l, e + ld h, d + ld de, wBT_OTTempMon1Name + ld bc, MON_NAME_LENGTH + call CopyBytes + +.skip_mon_1 + ld de, wBT_OTTempMon2Name + ld c, MON_NAME_LENGTH + farcall CheckStringForErrors + jr nc, .skip_mon_2 + ld a, [wBT_OTTempMon2] + ld [wNamedObjectIndex], a + call GetPokemonName + ld l, e + ld h, d + ld de, wBT_OTTempMon2Name + ld bc, MON_NAME_LENGTH + call CopyBytes + +.skip_mon_2 + ld de, wBT_OTTempMon3Name + ld c, MON_NAME_LENGTH + farcall CheckStringForErrors + jr nc, .skip_mon_3 + ld a, [wBT_OTTempMon3] + ld [wNamedObjectIndex], a + call GetPokemonName + ld l, e + ld h, d + ld de, wBT_OTTempMon3Name + ld bc, MON_NAME_LENGTH + call CopyBytes + +.skip_mon_3 +; Add the terminator character to each of these names + ld a, "@" + ld [wBT_OTTempMon1Name + MON_NAME_LENGTH - 1], a + ld [wBT_OTTempMon2Name + MON_NAME_LENGTH - 1], a + ld [wBT_OTTempMon3Name + MON_NAME_LENGTH - 1], a +; Fix errors in the movesets + call CheckBTMonMovesForErrors +; Repair the trainer name if needed, then copy it to wOTPlayerName + ld de, wBT_OTTempName + ld c, NAME_LENGTH - 1 + farcall CheckStringForErrors + jr nc, .trainer_name_okay + ld hl, BT_ChrisName + jr .done_trainer_name + +.trainer_name_okay + ld hl, wBT_OTTempName + +.done_trainer_name + ld de, wOTPlayerName + ld bc, NAME_LENGTH - 1 + call CopyBytes + ld a, "@" + ld [de], a + + ld hl, wBT_OTTempTrainerClass + ld a, [hli] + ld [wOtherTrainerClass], a + ld a, LOW(wOTPartyMonNicknames) + ld [wBGMapBuffer], a + ld a, HIGH(wOTPartyMonNicknames) + ld [wBGMapBuffer + 1], a + + ; Copy mon into Memory from the address in hl + ld de, wOTPartyMon1Species + ld bc, wOTPartyCount + ld a, BATTLETOWER_PARTY_LENGTH + ld [bc], a + inc bc +.otpartymon_loop + push af + ld a, [hl] + ld [bc], a + inc bc + push bc + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + push de + ld a, [wBGMapBuffer] + ld e, a + ld a, [wBGMapBuffer + 1] + ld d, a + ld bc, MON_NAME_LENGTH + call CopyBytes + ld a, e + ld [wBGMapBuffer], a + ld a, d + ld [wBGMapBuffer + 1], a + pop de + pop bc + pop af + dec a + and a + jr nz, .otpartymon_loop + ld a, -1 + ld [bc], a + ret + +ValidateBTParty: ; unreferenced +; Check for and fix errors in party data + ld hl, wBT_OTTempMon1Species + ld d, BATTLETOWER_PARTY_LENGTH +.pkmn_loop + push de + push hl + ld b, h + ld c, l + ld a, [hl] + cp EGG + jr z, .invalid + call IsAPokemon + jr nc, .valid + +.invalid + push hl + ld hl, SMEARGLE + call GetPokemonIDFromIndex + pop hl + ld [hl], a + +.valid + ld [wCurSpecies], a + call GetBaseData + ld a, BANK(s5_b2fb) + call OpenSRAM + ld a, [s5_b2fb] ; s5_b2fb ; max level? + call CloseSRAM + ld e, a + ld hl, MON_LEVEL + add hl, bc + ld a, [hl] + cp MIN_LEVEL + ld a, MIN_LEVEL + jr c, .load + ld a, [hl] + cp e + jr c, .dont_load + ld a, e + +.load + ld [hl], a + +.dont_load + ld [wCurPartyLevel], a + ld hl, MON_MOVES + add hl, bc + ld d, NUM_MOVES - 1 + ld a, [hli] + and a + jr z, .not_move + cp MOVE_TABLE_ENTRIES + 1 + jr c, .valid_move + +.not_move + dec hl + push hl + ld hl, POUND + call GetMoveIDFromIndex + pop hl + ld [hli], a + xor a + ld [hli], a + ld [hli], a + ld [hl], a + jr .done_moves + +.valid_move + ld a, [hl] + cp MOVE_TABLE_ENTRIES + 1 + jr c, .next + ld [hl], $0 + +.next + inc hl + dec d + jr nz, .valid_move + +.done_moves + ld hl, MON_MAXHP + add hl, bc + ld d, h + ld e, l + push hl + push de + ld hl, MON_STAT_EXP - 1 + add hl, bc + ld b, TRUE + predef CalcMonStats + pop de + pop hl + dec de + dec de + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + pop hl + ld bc, NICKNAMED_MON_STRUCT_LENGTH + add hl, bc + pop de + dec d + jp nz, .pkmn_loop + ret + +BT_ChrisName: + db "CHRIS@" + +Function17042c: + ld hl, w3_d202TrainerData + ld a, BATTLETOWER_STREAK_LENGTH +.loop + push af + push hl + ld c, BATTLETOWER_TRAINERDATALENGTH / 2 +.loop2 + ; First byte is a comparison value. + ld a, [hli] + ld b, a + ; Second byte is a lookup index. + ld a, [hli] + and a + jr z, .empty + cp (Unknown_170470.end - Unknown_170470) + 1 + jr nc, .copy_data + + push hl + ld hl, Unknown_170470 + dec a + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + pop hl + + ; If Unknown_170470[a-1] <= b, overwrite the current trainer's data + ; with Unknown_17047e, and exit the inner loop. + cp b + jr c, .copy_data + jr z, .copy_data + jr .next_iteration + +.empty + ; If a == 0 and b >= $fc, overwrite the current trainer's data with + ; Unknown_17047e, and exit the inner loop. + ld a, b + cp NUM_POKEMON + 1 + jr nc, .copy_data + +.next_iteration + dec c + jr nz, .loop2 + jr .next_trainer + +.copy_data + pop de + push de + ld hl, Unknown_17047e + ld bc, BATTLETOWER_TRAINERDATALENGTH + call CopyBytes + +.next_trainer + pop hl + ld de, BATTLE_TOWER_STRUCT_LENGTH + add hl, de + pop af + dec a + jr nz, .loop + ret + +INCLUDE "data/battle_tower/unknown_levels.asm" + +CopyBTTrainer_FromBT_OT_TowBT_OTTemp: +; copy the BattleTower-Trainer data that lies at 'wBT_OTTrainer' to 'wBT_OTTemp' + ldh a, [rSVBK] + push af + ld a, BANK(wBT_OTTrainer) + ldh [rSVBK], a + + ld hl, wBT_OTTrainer + ld de, wBT_OTTemp + ld bc, BATTLE_TOWER_STRUCT_LENGTH + call CopyBytes + + pop af + ldh [rSVBK], a + + ld a, BANK(sBattleTowerChallengeState) + call OpenSRAM + ld a, BATTLETOWER_CHALLENGE_IN_PROGRESS + ld [sBattleTowerChallengeState], a + ld hl, sNrOfBeatenBattleTowerTrainers + inc [hl] + call CloseSRAM +SkipBattleTowerTrainer: + ret + +Function1704ca: ; unreferenced + ld a, [s5_be46] + cp BATTLETOWER_STREAK_LENGTH + jr c, .not_max + ld a, BATTLETOWER_STREAK_LENGTH - 1 + +.not_max + ld hl, s5_aa8e + BATTLE_TOWER_STRUCT_LENGTH * (BATTLETOWER_STREAK_LENGTH - 1) + ld de, -BATTLE_TOWER_STRUCT_LENGTH +.loop + and a + jr z, .done + add hl, de + dec a + jr .loop + +.done + ret + +Function1704e1: + call SpeechTextbox + call FadeToMenu + call InitBattleTowerChallengeRAM + call .JumptableLoop + call CloseSubmenu + ret + +.JumptableLoop: + call ClearBGPalettes + call ClearSprites + call ClearScreen +.loop + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .done + call .DoJumptable + farcall ReloadMapPart + jr .loop + +.done + ret + +.DoJumptable: + jumptable .dw, wJumptableIndex + +.dw + dw .Jumptable_0 + dw .Jumptable_1 + dw .Jumptable_2 + +.Jumptable_0: + ld a, BANK(s5_a89c) + call OpenSRAM + + ld hl, s5_a89c + ld de, wStringBuffer3 + ld bc, 22 + call CopyBytes + + ld hl, s5_a8b2 + ld de, wc608 + ld bc, 150 + call CopyBytes + + call CloseSRAM + hlcoord 1, 1 + ld de, wStringBuffer3 + call PlaceString + hlcoord 1, 3 + ld de, .String_Mail + call PlaceString + hlcoord 4, 3 + ld de, wStringBuffer4 + call PlaceString + hlcoord 8, 3 + ld de, .String_PastReaders + call PlaceString + call .DrawBorder + call .PlaceTextItems + jr .NextJumptableFunction + +.Jumptable_1: + call SetPalettes + call .NextJumptableFunction + +.Jumptable_2: + ld hl, hJoyPressed + ld a, [hl] + and A_BUTTON + jr nz, .pressed_a_or_b + ld a, [hl] + and B_BUTTON + jr nz, .pressed_a_or_b + ld a, [hl] + and D_UP + jr nz, .pressed_up + ld a, [hl] + and D_DOWN + jr nz, .pressed_down + ret + +.pressed_up + ld a, [wNrOfBeatenBattleTowerTrainers] + and a + ret z + sub 15 + ld [wNrOfBeatenBattleTowerTrainers], a + call .PlaceTextItems + ret + +.pressed_down + ld a, [wNrOfBeatenBattleTowerTrainers] + cp 60 + ret z + add 15 + ld [wNrOfBeatenBattleTowerTrainers], a + call .PlaceTextItems + ret + +.pressed_a_or_b + ld hl, wJumptableIndex + set 7, [hl] + ret + +.NextJumptableFunction: + ld hl, wJumptableIndex + inc [hl] + ret + +.DrawBorder: + hlcoord 0, 4 + ld a, "┌" + ld [hli], a + ld c, SCREEN_WIDTH - 2 +.top_border_loop + ld a, "─" + ld [hli], a + dec c + jr nz, .top_border_loop + ld a, "┐" + ld [hli], a + ld de, SCREEN_WIDTH + ld c, 12 +.left_border_loop + ld a, "│" + ld [hl], a + add hl, de + dec c + jr nz, .left_border_loop + ld a, "└" + ld [hli], a + ld c, SCREEN_WIDTH - 2 +.bottom_border_loop + ld a, "─" + ld [hli], a + dec c + jr nz, .bottom_border_loop + ld a, "┘" + ld [hl], a + ld de, -SCREEN_WIDTH + add hl, de + ld c, 12 +.right_border_loop + ld a, "│" + ld [hl], a + add hl, de + dec c + jr nz, .right_border_loop + ret + +.PlaceTextItems: + call .ClearBox + call .PlaceUpDownArrows + ld a, $50 + ld [wcd4e], a + ld hl, wc608 + ld a, [wNrOfBeatenBattleTowerTrainers] + ld c, a + xor a + ld b, a + add hl, bc + push hl + pop bc + hlcoord 1, 6 + ld a, 6 +.loop1 + push af + push hl + ld a, 3 +.loop2 + push af + ld de, wcd49 + ld a, [bc] + and a + jr z, .fill_with_e3 +; .copy + ld a, 5 +.loop3a + push af + ld a, [bc] + ld [de], a + inc bc + inc de + pop af + dec a + jr nz, .loop3a + jr .rejoin + +.fill_with_e3 + ld a, 5 +.loop3b + push af + ld a, $e3 + ld [de], a + inc de + inc bc + pop af + dec a + jr nz, .loop3b + +.rejoin + ld de, wcd49 + push bc + call PlaceString + ld de, NAME_LENGTH_JAPANESE + add hl, de + pop bc + pop af + dec a + jr nz, .loop2 + pop hl + ld de, $28 + add hl, de + pop af + dec a + jr nz, .loop1 + ret + +.ClearBox: + hlcoord 1, 5 + xor a + ld b, 12 +.clearbox_row + ld c, SCREEN_WIDTH - 2 +.clearbox_column + ld [hli], a + dec c + jr nz, .clearbox_column + inc hl + inc hl + dec b + jr nz, .clearbox_row + ret + +.PlaceUpDownArrows: + ld a, [wNrOfBeatenBattleTowerTrainers] + and a + jr z, .nope + hlcoord 18, 5 + ld a, "▲" + ld [hl], a + +.nope + ld a, [wNrOfBeatenBattleTowerTrainers] + cp 60 + ret z + hlcoord 18, 16 + ld a, "▼" + ld [hl], a + ret + +.String_Mail: + db "ルーム@" + +.String_PastReaders: + db "れきだいりーダーいちらん@" + +BattleTowerAction: + jumptable .dw, wScriptVar + +.dw + dw BattleTowerAction_CheckExplanationRead + dw BattleTowerAction_SetExplanationRead + dw BattleTowerAction_GetChallengeState + dw BattleTowerAction_SetByteToQuickSaveChallenge + dw BattleTowerAction_SetByteToCancelChallenge + dw BattleTowerAction_05 + dw BattleTowerAction_06 + dw SaveBattleTowerLevelGroup + dw LoadBattleTowerLevelGroup + dw BattleTower_CheckSaveFileExistsAndIsYours + dw BattleTowerAction_0A + dw CheckMobileEventIndex + dw BattleTowerAction_0C + dw BattleTowerAction_0D + dw BattleTowerAction_EggTicket + dw BattleTowerAction_0F + dw BattleTowerAction_10 + dw BattleTowerAction_11 + dw BattleTowerAction_12 + dw BattleTowerAction_13 + dw BattleTowerAction_14 + dw BattleTowerAction_15 + dw BattleTowerAction_16 + dw BattleTowerAction_17 + dw BattleTowerAction_LevelCheck + dw BattleTowerAction_UbersCheck + dw ResetBattleTowerTrainersSRAM + dw BattleTower_GiveReward + dw BattleTowerAction_1C + dw BattleTowerAction_1D + dw BattleTower_RandomlyChooseReward + dw BattleTower_SaveOptions + +; Reset the save memory for BattleTower-Trainers (Counter and all 7 TrainerBytes) +ResetBattleTowerTrainersSRAM: + ld a, BANK(sBTTrainers) + call OpenSRAM + + ld a, $ff + ld hl, sBTTrainers + ld bc, BATTLETOWER_STREAK_LENGTH + call ByteFill + + xor a + ld [sNrOfBeatenBattleTowerTrainers], a + + call CloseSRAM + + ret + +BattleTower_GiveReward: + ld a, BANK(sBattleTowerReward) + call OpenSRAM + + ld a, [sBattleTowerReward] + call CloseSRAM + ld [wScriptVar], a + ld hl, wNumItems + ld a, [hli] + cp MAX_ITEMS + ret c + ld b, MAX_ITEMS + ld a, [wScriptVar] + ld c, a +.loop + ld a, [hli] + cp c + jr nz, .next + ld a, [hl] + cp 95 + ret c +.next + inc hl + dec b + jr nz, .loop + ld a, POTION + ld [wScriptVar], a + ret + +BattleTowerAction_1C: + ld a, BANK(sBattleTowerChallengeState) + call OpenSRAM + ld a, BATTLETOWER_WON_CHALLENGE + ld [sBattleTowerChallengeState], a + call CloseSRAM + ret + +BattleTowerAction_1D: + ld a, BANK(sBattleTowerChallengeState) + call OpenSRAM + ld a, BATTLETOWER_RECEIVED_REWARD + ld [sBattleTowerChallengeState], a + call CloseSRAM + ret + +BattleTower_SaveOptions: + farcall SaveOptions + ret + +BattleTower_RandomlyChooseReward: +; Generate a random stat boosting item. +.loop + call Random + ldh a, [hRandomAdd] + and $7 + cp 6 + jr c, .okay + sub 6 +.okay + add HP_UP + cp LUCKY_PUNCH + jr z, .loop + push af + ld a, BANK(sBattleTowerReward) + call OpenSRAM + pop af + ld [sBattleTowerReward], a + call CloseSRAM + ret + +BattleTowerAction_CheckExplanationRead: + call BattleTower_CheckSaveFileExistsAndIsYours + ld a, [wScriptVar] + and a + ret z + + ld a, BANK(sBattleTowerSaveFileFlags) + call OpenSRAM + ld a, [sBattleTowerSaveFileFlags] + and 2 + ld [wScriptVar], a + call CloseSRAM + ret + +BattleTowerAction_GetChallengeState: + ld hl, sBattleTowerChallengeState + ld a, BANK(sBattleTowerChallengeState) + call OpenSRAM + ld a, [hl] + ld [wScriptVar], a + call CloseSRAM + ret + +BattleTowerAction_SetExplanationRead: + ld a, BANK(sBattleTowerSaveFileFlags) + call OpenSRAM + ld a, [sBattleTowerSaveFileFlags] + or 2 + ld [sBattleTowerSaveFileFlags], a + call CloseSRAM + ret + +BattleTowerAction_SetByteToQuickSaveChallenge: + ld c, BATTLETOWER_SAVED_AND_LEFT + jr SetBattleTowerChallengeState + +BattleTowerAction_SetByteToCancelChallenge: + ld c, BATTLETOWER_NO_CHALLENGE +SetBattleTowerChallengeState: + ld a, BANK(sBattleTowerChallengeState) + call OpenSRAM + ld a, c + ld [sBattleTowerChallengeState], a + call CloseSRAM + ret + +BattleTowerAction_05: + ld a, BANK(s5_aa8c) ; aka BANK(s5_be46) + call OpenSRAM + ld a, [s5_aa8c] + ld b, a + ld a, [s5_be46] + ld [wScriptVar], a + call CloseSRAM + and a + ret z + ld a, b + cp 2 + jr nc, .asm_1707ef + push bc + call UpdateTime + pop bc + ld a, BANK(s5_aa8c) + call OpenSRAM + ld a, [s5_aa8b] + call CloseSRAM + ld c, a + ld a, [wCurDay] + sub c + jr c, .asm_1707e5 + cp 8 + jr nc, .asm_1707ef + ld a, b + and a + jr nz, .asm_1707ef + ret +.asm_1707e5 + ld hl, wCurDay + ld a, $8c + sub c + add [hl] + cp 8 + ret c +.asm_1707ef + ld a, 8 + ld [wScriptVar], a + +BattleTowerAction_06: + ld a, BANK(s5_be46) ; aka BANK(s5_aa8b) and BANK(s5_aa8c) + call OpenSRAM + xor a + ld [s5_be46], a + ld [s5_aa8b], a + ld [s5_aa8c], a + call CloseSRAM + ret + +BattleTowerAction_16: + call UpdateTime + ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa) + call OpenSRAM + ld a, [wCurDay] + ld [s5_b2f9], a + xor a + ld [s5_b2fa], a + call CloseSRAM + ret + +BattleTowerAction_17: + xor a + ld [wScriptVar], a + ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa) + call OpenSRAM + ld a, [s5_b2f9] + ld c, a + ld a, [s5_b2fa] + ld b, a + call CloseSRAM + cp 2 + jr nc, .asm_170853 + push bc + call UpdateTime + pop bc + ld a, [wCurDay] + sub c + jr c, .asm_170849 + cp 11 + jr nc, .asm_170853 + ld a, b + and a + jr nz, .asm_170853 + ret + +.asm_170849 + ld hl, wCurDay + ld a, 140 + sub c + add [hl] + cp 11 + ret c +.asm_170853 + ld a, 1 + ld [wScriptVar], a + ld a, BANK(s5_b2f9) ; aka BANK(s5_b2fa) + call OpenSRAM + xor a + ld [s5_b2f9], a + ld [s5_b2fa], a + call CloseSRAM + ret + +SaveBattleTowerLevelGroup: + ld a, BANK(sBTChoiceOfLevelGroup) + call OpenSRAM + ldh a, [rSVBK] + push af + ld a, BANK(wBTChoiceOfLvlGroup) + ldh [rSVBK], a + ld a, [wBTChoiceOfLvlGroup] + ld [sBTChoiceOfLevelGroup], a + pop af + ldh [rSVBK], a + call CloseSRAM + ret + +LoadBattleTowerLevelGroup: ; Load level group choice + ld a, BANK(sBTChoiceOfLevelGroup) + call OpenSRAM + ldh a, [rSVBK] + push af + ld a, BANK(wBTChoiceOfLvlGroup) + ldh [rSVBK], a + ld a, [sBTChoiceOfLevelGroup] + ld [wBTChoiceOfLvlGroup], a + pop af + ldh [rSVBK], a + call CloseSRAM + ret + +BattleTower_CheckSaveFileExistsAndIsYours: + ld a, [wSaveFileExists] + and a + jr z, .nope + farcall CompareLoadedAndSavedPlayerID + jr z, .yes + xor a ; FALSE + jr .nope + +.yes + ld a, TRUE + +.nope + ld [wScriptVar], a + ret + +BattleTowerAction_0A: + xor a + ld [wMusicFade], a + call MaxVolume + ret + +CheckMobileEventIndex: ; something to do with GS Ball + ld a, BANK(sMobileEventIndex) + call OpenSRAM + ld a, [sMobileEventIndex] + ld [wScriptVar], a + call CloseSRAM + ret + +BattleTowerAction_0C: + call UpdateTime + ld a, BANK(s5_aa8b) ; aka BANK(s5_aa8c), BANK(s5_aa5d), BANK(s5_aa48), and BANK(s5_aa47) + call OpenSRAM + ld a, [wCurDay] + ld [s5_aa8b], a + xor a + ld [s5_aa8c], a + ld a, [s5_aa5d] + cp 2 + jr nc, .asm_1708ec + ld a, [wCurDay] + ld [s5_aa48], a + ld a, 1 + ld [s5_aa47], a +.asm_1708ec + call CloseSRAM + ret + +BattleTowerAction_0D: + xor a ; FALSE + ld [wScriptVar], a + call UpdateTime + ld a, BANK(s5_aa48) ; aka BANK(s5_aa47) + call OpenSRAM + ld a, [s5_aa48] + ld c, a + ld a, [s5_aa47] + call CloseSRAM + and a + ret z + ld hl, wCurDay + ld a, c + cp [hl] + jr nz, Function170923 + ld a, BANK(s5_aa5d) + call OpenSRAM + ld a, [s5_aa5d] + call CloseSRAM + cp 5 + ret c + ld a, TRUE + ld [wScriptVar], a + ret + +Function170923: + ld a, BANK(s5_aa48) ; aka BANK(s5_aa47) and BANK(s5_aa5d) + call OpenSRAM + xor a + ld [s5_aa48], a + ld [s5_aa47], a + ld hl, s5_aa5d + ld bc, MOBILE_LOGIN_PASSWORD_LENGTH + call ByteFill + call CloseSRAM + ret + +BattleTowerAction_EggTicket: + xor a ; FALSE + ld [wScriptVar], a + ld a, EGG_TICKET + ld [wCurItem], a + ld hl, wNumItems + call CheckItem + ret nc + ld a, [wPartyCount] + ld b, 0 + ld c, a + ld hl, wPartySpecies +.loop + ld a, [hli] + cp EGG + jr nz, .not_egg + push hl + ld hl, wPartyMonOTs + ld de, NAME_LENGTH_JAPANESE + ld a, b + and a + jr z, .skip +.loop2 + add hl, de + dec a + jr nz, .loop2 +.skip + ld de, String_MysteryJP + ld a, NAME_LENGTH_JAPANESE +.compare_loop + push af + ld a, [de] + inc de + cp [hl] + inc hl + jr nz, .different + pop af + dec a + jr nz, .compare_loop +rept 4 + dec hl +endr + ld a, "@" + ld [hli], a + ld [hli], a + pop hl + ld a, EGG_TICKET + ld [wCurItem], a + ld a, 1 + ld [wItemQuantityChange], a + ld a, -1 + ld [wCurItemQuantity], a + ld hl, wNumItems + call TossItem + ld a, TRUE + ld [wScriptVar], a + ret + +.different + pop af + pop hl +.not_egg + inc b + dec c + jr nz, .loop + ret + +String_MysteryJP: + db "なぞナゾ@@" ; MYSTERY + +BattleTowerAction_0F: + ldh a, [rSVBK] + push af + ld a, BANK(w3_d090) + ldh [rSVBK], a + ld a, [w3_d090] + ld [wScriptVar], a + pop af + ldh [rSVBK], a + ret + +BattleTowerAction_10: + xor a ; FALSE + ld [wScriptVar], a + ld a, BANK(s5_a800) + call OpenSRAM + ld a, [s5_a800] + call CloseSRAM + cp 6 + jr nc, .invalid + ld e, a + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.invalid + ld a, BANK(s5_a800) + call OpenSRAM + xor a + ld [s5_a800], a + call CloseSRAM + ret + +.Jumptable: + dw .NoAction + dw .NoAction + dw .DoAction1 + dw .DoAction1 + dw .Action4 + dw .Action5 + +.DoAction1: + ld a, BANK(s5_a800) + call OpenSRAM + ld a, 1 + ld [s5_a800], a + call CloseSRAM + +.NoAction: + ret + +.Action4: + ld a, BANK(s5_b023) ; aka BANK(sOfferReqGender) and BANK(sOfferReqSpecies) + call OpenSRAM + ld hl, s5_b023 + ld de, wc608 + ld bc, 105 + call CopyBytes + ld a, [sOfferReqGender] + ld [wcd30], a + ld a, [sOfferReqSpecies] + ld [wcd31], a + call CloseSRAM + farcall Function11b6b4 + farcall Function17d0f3 + ld a, TRUE + ld [wScriptVar], a + ret + +.Action5: + ld a, 0 ; ??? + call OpenSRAM + ld hl, wRTC + ld de, wc608 + ld bc, 4 + call CopyBytes + call CloseSRAM + ld a, BANK(s5_b08c) + call OpenSRAM + ld hl, s5_b08c + ld de, wc608 + ld c, 4 +.compare_loop + ld a, [de] + inc de + cp [hl] + jr nz, .different + inc hl + dec c + jr nz, .compare_loop + call CloseSRAM + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetMapSceneID + ld a, d + or e + jr z, .no_scene + ld a, [de] + and a + ret nz + +.no_scene + ld a, TRUE + ld [wScriptVar], a + ret + +.different + call CloseSRAM + ld a, BANK(s5_a800) + call OpenSRAM + xor a + ld [s5_a800], a + call CloseSRAM + ld [wScriptVar], a + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetMapSceneID + ld a, d + or e + jr z, .no_scene_2 + xor a + ld [de], a + +.no_scene_2 + ret + +BattleTowerAction_11: + ld c, FALSE + jr Set_s5_aa8d + +BattleTowerAction_12: + ld c, TRUE +Set_s5_aa8d: + ld a, BANK(s5_aa8d) + call OpenSRAM + ld a, c + ld [s5_aa8d], a + call CloseSRAM + ret + +BattleTowerAction_13: + ld a, BANK(s5_aa8d) + call OpenSRAM + ld a, [s5_aa8d] + ld [wScriptVar], a + call CloseSRAM + ret + +BattleTowerAction_14: + call BattleTower_CheckSaveFileExistsAndIsYours + ld a, [wScriptVar] + and a + ret z + + ld a, BANK(sBattleTowerSaveFileFlags) + call OpenSRAM + ld a, [sBattleTowerSaveFileFlags] + and 1 + ld [wScriptVar], a + call CloseSRAM + ret + +BattleTowerAction_15: + ld a, BANK(sBattleTowerSaveFileFlags) + call OpenSRAM + ld a, [sBattleTowerSaveFileFlags] + or 1 + ld [sBattleTowerSaveFileFlags], a + call CloseSRAM + ret + +BattleTowerAction_LevelCheck: + ld a, BANK(s5_b2fb) + call OpenSRAM + ld a, [s5_b2fb] + call CloseSRAM + ld c, 10 + call SimpleDivide + ld a, b + ld [wcd4f], a + xor a + ld [wScriptVar], a + farcall BattleTower_LevelCheck + ret nc + ld a, BANK(s5_b2fb) + call OpenSRAM + ld a, [s5_b2fb] + call CloseSRAM + ld [wScriptVar], a + ret + +BattleTowerAction_UbersCheck: + ld a, BANK(s5_b2fb) + call OpenSRAM + ld a, [s5_b2fb] + call CloseSRAM + ld c, 10 + call SimpleDivide + ld a, b + ld [wcd4f], a + xor a + ld [wScriptVar], a + farcall BattleTower_UbersCheck + ret nc + ld a, BANK(s5_b2fb) + call OpenSRAM + ld a, [s5_b2fb] + call CloseSRAM + ld [wScriptVar], a + ret + +LoadOpponentTrainerAndPokemonWithOTSprite: + farcall LoadOpponentTrainerAndPokemon + ldh a, [rSVBK] + push af + ld a, BANK(wBT_OTTrainerClass) + ldh [rSVBK], a + ld hl, wBT_OTTrainerClass + ld a, [hl] + dec a + ld c, a + ld b, 0 + pop af + ldh [rSVBK], a + ld hl, BTTrainerClassSprites + add hl, bc + ld a, [hl] + ld [wBTTempOTSprite], a + +; Load sprite of the opponent trainer +; because s/he is chosen randomly and appears out of nowhere + ld a, [wScriptVar] + dec a + sla a + ld e, a + sla a + sla a + sla a + ld c, a + ld b, 0 + ld d, 0 + ld hl, wMapObjects + add hl, bc + inc hl + ld a, [wBTTempOTSprite] + ld [hl], a + ld hl, wUsedSprites + add hl, de + ld [hli], a + ldh [hUsedSpriteIndex], a + ld a, [hl] + ldh [hUsedSpriteTile], a + farcall GetUsedSprite + ret + +INCLUDE "data/trainers/sprites.asm" + +UnusedBattleTowerDummySpecial2: + ret + +CheckForBattleTowerRules: + farcall _CheckForBattleTowerRules + jr c, .ready + xor a ; FALSE + jr .end + +.ready + ld a, TRUE + +.end + ld [wScriptVar], a + ret diff --git a/engine/events/battle_tower/get_trainer_class.asm b/engine/events/battle_tower/get_trainer_class.asm new file mode 100644 index 0000000..f3dd713 --- /dev/null +++ b/engine/events/battle_tower/get_trainer_class.asm @@ -0,0 +1,46 @@ +GetMobileOTTrainerClass: ; mobile function + ld h, b + ld l, c + call .GetMobileOTTrainerClass + ld c, a + ret + +.GetMobileOTTrainerClass: + ld a, [hli] + xor [hl] + ld c, a + jr z, .skip_male_trainers + srl c + srl c +.male_trainer_loop + srl c + ld a, c + cp MaleTrainers.End - MaleTrainers - 1 + jr nc, .male_trainer_loop + inc c + +.skip_male_trainers + ld a, [de] + cp FEMALE + ld hl, MaleTrainers + jr nz, .finished + + ld hl, FemaleTrainers + ld a, c + and a + jr z, .finished + +.female_trainer_loop + srl c + ld a, c + cp FemaleTrainers.End - FemaleTrainers - 1 + jr nc, .female_trainer_loop + inc c + +.finished + ld b, $0 + add hl, bc + ld a, [hl] + ret + +INCLUDE "data/trainers/gendered_trainers.asm" diff --git a/engine/events/battle_tower/load_trainer.asm b/engine/events/battle_tower/load_trainer.asm new file mode 100644 index 0000000..da0610d --- /dev/null +++ b/engine/events/battle_tower/load_trainer.asm @@ -0,0 +1,251 @@ +LoadOpponentTrainerAndPokemon: + ldh a, [rSVBK] + push af + ld a, BANK(wBT_OTTrainer) + ldh [rSVBK], a + + ; Fill wBT_OTTrainer with zeros + xor a + ld hl, wBT_OTTrainer + ld bc, BATTLE_TOWER_STRUCT_LENGTH + call ByteFill + + ; Write $ff into the Item-Slots + ld a, $ff + ld [wBT_OTMon1Item], a + ld [wBT_OTMon2Item], a + ld [wBT_OTMon3Item], a + + ; Set wBT_OTTrainer as start address to write the following data to + ld de, wBT_OTTrainer + + ldh a, [hRandomAdd] + ld b, a +.resample ; loop to find a random trainer + call Random + ldh a, [hRandomAdd] + add b + ld b, a ; b contains the nr of the trainer + maskbits BATTLETOWER_NUM_UNIQUE_TRAINERS + cp BATTLETOWER_NUM_UNIQUE_TRAINERS + jr nc, .resample + ld b, a + + ld a, BANK(sBTTrainers) + call OpenSRAM + + ld c, BATTLETOWER_STREAK_LENGTH + ld hl, sBTTrainers +.next_trainer + ld a, [hli] + cp b + jr z, .resample + dec c + jr nz, .next_trainer ; c <= 7 initialise all 7 trainers? + + ld hl, sBTTrainers + ld a, [sNrOfBeatenBattleTowerTrainers] + ld c, a + ld a, b + ld b, 0 + add hl, bc + ld [hl], a + + call CloseSRAM + + push af +; Copy name (10 bytes) and class (1 byte) of trainer + ld hl, BattleTowerTrainers + ld bc, NAME_LENGTH + call AddNTimes + ld bc, NAME_LENGTH + call CopyBytes + + call LoadRandomBattleTowerMon + pop af + + ld hl, BattleTowerTrainerData + ld bc, BATTLETOWER_TRAINERDATALENGTH + call AddNTimes + ld bc, BATTLETOWER_TRAINERDATALENGTH +.copy_bt_trainer_data_loop + ld a, BANK(BattleTowerTrainerData) + call GetFarByte + ld [de], a + inc hl + inc de + dec bc + ld a, b + or c + jr nz, .copy_bt_trainer_data_loop + + pop af + ldh [rSVBK], a + + ret + +LoadRandomBattleTowerMon: + ld c, BATTLETOWER_PARTY_LENGTH +.loop + push bc + ld a, BANK(sBTMonOfTrainers) + call OpenSRAM + +.FindARandomBattleTowerMon: + ; a = 1, 2, ..., 10 indicating level 10, 20, ..., 100 opponents + ld a, [wBTChoiceOfLvlGroup] + dec a + ld hl, BattleTowerMons + ld bc, BATTLETOWER_NUM_UNIQUE_MON * (NICKNAMED_MON_STRUCT_LENGTH + 5) + call AddNTimes + + ldh a, [hRandomAdd] + ld b, a +.resample + call Random + ldh a, [hRandomAdd] + add b + ld b, a + maskbits BATTLETOWER_NUM_UNIQUE_MON + cp BATTLETOWER_NUM_UNIQUE_MON + jr nc, .resample + ld bc, NICKNAMED_MON_STRUCT_LENGTH + 5 + call AddNTimes + + ; hl = pointer to the mon that will be loaded (1 byte species, 1 byte item, 2 -> 1 byte each move, NICKNAMED_MON_STRUCT_LENGTH - 6 bytes data) + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + push hl + push de + ; check if it matches any of the previous two trainers' chosen Pokémon (six Pokémon in total) + ld e, 6 + ld hl, sBTMonPrevTrainer1 +.check_previous_mons_loop + ld a, [hli] + cp c + ld a, [hli] + jr nz, .check_previous_mons_next + cp b + jr z, .pop_and_retry +.check_previous_mons_next + dec e + jr nz, .check_previous_mons_loop + ld h, b + ld l, c + call GetPokemonIDFromIndex + ld hl, wTempSpecies + ld [hl], a + ; check if it matches any of the current trainer's first two Pokémon (no need to check for the last one) + ld a, [wBT_OTMon1] + cp [hl] + jr z, .pop_and_retry + ld a, [wBT_OTMon2] +.pop_and_retry + pop de + pop hl + jr z, .FindARandomBattleTowerMon + + ; check if the held item matches any of the current trainer's first two Pokémon's held items + ld a, [wBT_OTMon1Item] + cp [hl] + jr z, .FindARandomBattleTowerMon + ld a, [wBT_OTMon2Item] + cp [hl] + jr z, .FindARandomBattleTowerMon + + ; reserve and load the converted species from wTempSpecies, manually load item and moves, and copy everything else + push hl + ld l, LOCKED_MON_ID_BATTLE_TOWER_1 + ; LOCKED_MOVE_ID_BATTLE_TOWER_MON1_MOVE1 rotated right 2 + ld c, (LOCKED_MOVE_ID_BATTLE_TOWER_MON1_MOVE1 >> 2) | ((LOCKED_MOVE_ID_BATTLE_TOWER_MON1_MOVE1 & 3) << 6) + ld a, e + ; assume that NICKNAMED_MON_STRUCT_LENGTH is not a multiple of $80 (it's actually far less than $80) + cp LOW(wBT_OTMon1) + jr z, .got_index + inc l + inc c + cp LOW(wBT_OTMon2) + jr z, .got_index + inc l + inc c +.got_index + ld a, [wTempSpecies] + ld [de], a + inc de + call LockPokemonID + pop hl + ; item + ld a, [hli] + ld [de], a + inc de + ; moves + ld b, NUM_MOVES + rlc c + rlc c +.move_loop + ld a, [hli] + push hl + ld h, [hl] + ld l, a + call GetMoveIDFromIndex + ld [de], a + inc de + ld l, c + call LockMoveID + inc c + pop hl + inc hl + dec b + jr nz, .move_loop + ld c, NICKNAMED_MON_STRUCT_LENGTH - 6 + call CopyBytes + + ; rename the Pokémon to its default name (overriding the transliterated Japanese nicknames) + push de + ld hl, -MON_NAME_LENGTH + add hl, de + push hl + ; wNamedObjectIndexBuffer = wTempSpecies + call GetPokemonName + ld h, d + ld l, e + pop de + ld bc, MON_NAME_LENGTH + call CopyBytes + pop de + + pop bc + dec c + jp nz, .loop + + push de + ld hl, sBTMonPrevTrainer1 + ld de, sBTMonPrevPrevTrainer1 + ld bc, 6 + push hl + call CopyBytes + pop de + ld a, [wBT_OTMon1] + call .store_index + ld a, [wBT_OTMon2] + call .store_index + ld a, [wBT_OTMon3] + call .store_index + pop de + jp CloseSRAM + +.store_index + call GetPokemonIndexFromID + ld a, l + ld [de], a + inc de + ld a, h + ld [de], a + inc de + ret + +INCLUDE "data/battle_tower/classes.asm" + +INCLUDE "data/battle_tower/parties.asm" diff --git a/engine/events/battle_tower/rules.asm b/engine/events/battle_tower/rules.asm new file mode 100644 index 0000000..7ffa9f6 --- /dev/null +++ b/engine/events/battle_tower/rules.asm @@ -0,0 +1,299 @@ +CheckForMobileBattleRules: + ld de, .PointerTables + call BattleTower_ExecuteJumptable + ret z + call BattleTower_PleaseReturnWhenReady + scf + ret + +.PointerTables: + db 2 + dw .Functions + dw .TextPointers + +.Functions: + dw BattleTower_CheckPartyLengthIs3 + dw BattleTower_CheckPartyHasThreeMonsThatAreNotEggs + +.TextPointers: + dw .BTExcuseMeText + dw NeedAtLeastThreeMonText + dw EggDoesNotQualifyText + +.BTExcuseMeText: + text_far _BTExcuseMeText + text_end + +_CheckForBattleTowerRules: + ld hl, wStringBuffer2 + ld [hl], "3" + inc hl + ld [hl], "@" + ld de, .PointerTables + call BattleTower_ExecuteJumptable + ret z + call BattleTower_PleaseReturnWhenReady + scf + ret + +.PointerTables: + db 4 + dw .Functions + dw .TextPointers + +.Functions: + dw CheckBTRule_PartyCountEq3 + dw CheckBTRule_PartySpeciesAreUnique + dw CheckBTRule_PartyItemsAreUnique + dw CheckBTRule_HasPartyAnEgg + +.TextPointers: + dw ExcuseMeYoureNotReadyText + dw OnlyThreeMonMayBeEnteredText + dw TheMonMustAllBeDifferentKindsText + dw TheMonMustNotHoldTheSameItemsText + dw YouCantTakeAnEggText + +ExcuseMeYoureNotReadyText: + text_far _ExcuseMeYoureNotReadyText + text_end + +BattleTower_PleaseReturnWhenReady: + ld hl, .BattleTowerReturnWhenReadyText + call PrintText + ret + +.BattleTowerReturnWhenReadyText: + text_far _BattleTowerReturnWhenReadyText + text_end + +NeedAtLeastThreeMonText: + text_far _NeedAtLeastThreeMonText + text_end + +EggDoesNotQualifyText: + text_far _EggDoesNotQualifyText + text_end + +OnlyThreeMonMayBeEnteredText: + text_far _OnlyThreeMonMayBeEnteredText + text_end + +TheMonMustAllBeDifferentKindsText: + text_far _TheMonMustAllBeDifferentKindsText + text_end + +TheMonMustNotHoldTheSameItemsText: + text_far _TheMonMustNotHoldTheSameItemsText + text_end + +YouCantTakeAnEggText: + text_far _YouCantTakeAnEggText + text_end + +BattleTower_ExecuteJumptable: + ld bc, 0 +.loop + call .DoJumptableFunction + call c, .PrintFailureText + call .Next_CheckReachedEnd + jr nz, .loop + ld a, b + and a + ret + +.DoJumptableFunction: + push de + push bc + call .GetFunctionPointer + ld a, c + rst JumpTable + pop bc + pop de + ret + +.Next_CheckReachedEnd: + inc c + ld a, [de] + cp c + ret + +.GetFunctionPointer: + inc de + ld a, [de] + ld l, a + inc de + ld a, [de] + ld h, a + ret + +.GetTextPointers: + inc de + inc de + inc de + ld a, [de] + ld l, a + inc de + ld a, [de] + ld h, a + ret + +.LoadTextPointer: + ld a, [hli] + ld h, [hl] + ld l, a + ret + +.PrintFailureText: + push de + push bc + ld a, b + and a + call z, .PrintFirstText + pop bc + call .PrintNthText + ld b, 1 + pop de + ret + +.PrintFirstText: + push de + call .GetTextPointers + call .LoadTextPointer + call PrintText + pop de + ret + +.PrintNthText: + push bc + call .GetTextPointers + inc hl + inc hl + ld b, 0 + add hl, bc + add hl, bc + call .LoadTextPointer + call PrintText + pop bc + ret + +BattleTower_CheckPartyLengthIs3: + ld a, [wPartyCount] + cp BATTLETOWER_PARTY_LENGTH + ret + +BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: + ld hl, wPartyCount + ld a, [hli] + ld b, 0 + ld c, a +.loop + ld a, [hli] + cp EGG + jr z, .egg + inc b + +.egg + dec c + jr nz, .loop + ld a, [wPartyCount] + cp b + ret z + ld a, b + cp BATTLETOWER_PARTY_LENGTH + ret + +CheckBTRule_PartyCountEq3: + ld a, [wPartyCount] + cp BATTLETOWER_PARTY_LENGTH + ret z + scf + ret + +CheckBTRule_PartySpeciesAreUnique: + ld hl, wPartyMon1Species + call CheckPartyValueIsUnique + ret + +CheckPartyValueIsUnique: + ld de, wPartyCount + ld a, [de] + inc de + dec a + jr z, .done + ld b, a +.loop + push hl + push de + ld c, b + call .isegg + jr z, .next + ld a, [hl] + and a + jr z, .next +.loop2 + call .nextmon + call .isegg + jr z, .next2 + cp [hl] + jr z, .gotcha + +.next2 + dec c + jr nz, .loop2 + +.next + pop de + pop hl + call .nextmon + dec b + jr nz, .loop + +.done + and a + ret + +.gotcha + pop de + pop hl + scf + ret + +.nextmon + push bc + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + inc de + pop bc + ret + +.isegg + push bc + ld b, a + ld a, [de] + cp EGG + ld a, b + pop bc + ret + +CheckBTRule_PartyItemsAreUnique: + ld hl, wPartyMon1Item + call CheckPartyValueIsUnique + ret + +CheckBTRule_HasPartyAnEgg: + ld hl, wPartyCount + ld a, [hli] + ld c, a +.loop + ld a, [hli] + cp EGG + jr z, .found + dec c + jr nz, .loop + and a + ret + +.found + scf + ret diff --git a/engine/events/battle_tower/trainer_text.asm b/engine/events/battle_tower/trainer_text.asm new file mode 100644 index 0000000..453bd3c --- /dev/null +++ b/engine/events/battle_tower/trainer_text.asm @@ -0,0 +1,701 @@ +BattleTowerText:: +; Print text c for trainer [wBT_OTTrainerClass] +; 1: Intro text +; 2: Player lost +; 3: Player won + ldh a, [rSVBK] + push af + ld a, BANK(wBT_OTTrainerClass) + ldh [rSVBK], a + ld hl, wBT_OTTrainerClass + ld a, [hl] + dec a + ld e, a + ld d, 0 + ld hl, BTTrainerClassGenders + add hl, de + ld a, [hl] + and a + jr nz, .female + ; generate a random number between 0 and 24 + ldh a, [hRandomAdd] + and $1f + cp 25 + jr c, .okay0 + sub 25 + +.okay0 + ld hl, BTMaleTrainerTexts + jr .proceed + +.female + ; generate a random number between 0 and 14 + ldh a, [hRandomAdd] + and $f + cp 15 + jr c, .okay1 + sub 15 + +.okay1 + ld hl, BTFemaleTrainerTexts + +.proceed + ld b, 0 + dec c + jr nz, .restore + ld [wBT_TrainerTextIndex], a + jr .okay2 + +.restore + ld a, [wBT_TrainerTextIndex] + +.okay2 + push af + add hl, bc + add hl, bc + ld a, [hli] + ld c, a + ld a, [hl] + ld h, a + ld l, c + pop af + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [hli] + ld c, a + ld a, [hl] + ld l, c + ld h, a + bccoord 1, 14 + pop af + ldh [rSVBK], a + call PlaceHLTextAtBC + ret + +INCLUDE "mobile/fixed_words.asm" + +INCLUDE "data/trainers/genders.asm" + +BTMaleTrainerTexts: + dw .Greetings + dw .PlayerLost + dw .PlayerWon + +.Greetings: + dw BTGreetingM1Text + dw BTGreetingM2Text + dw BTGreetingM3Text + dw BTGreetingM4Text + dw BTGreetingM5Text + dw BTGreetingM6Text + dw BTGreetingM7Text + dw BTGreetingM8Text + dw BTGreetingM9Text + dw BTGreetingM10Text + dw BTGreetingM11Text + dw BTGreetingM12Text + dw BTGreetingM13Text + dw BTGreetingM14Text + dw BTGreetingM15Text + dw BTGreetingM16Text + dw BTGreetingM17Text + dw BTGreetingM18Text + dw BTGreetingM19Text + dw BTGreetingM20Text + dw BTGreetingM21Text + dw BTGreetingM22Text + dw BTGreetingM23Text + dw BTGreetingM24Text + dw BTGreetingM25Text + +.PlayerLost: + dw BTLossM1Text + dw BTLossM2Text + dw BTLossM3Text + dw BTLossM4Text + dw BTLossM5Text + dw BTLossM6Text + dw BTLossM7Text + dw BTLossM8Text + dw BTLossM9Text + dw BTLossM10Text + dw BTLossM11Text + dw BTLossM12Text + dw BTLossM13Text + dw BTLossM14Text + dw BTLossM15Text + dw BTLossM16Text + dw BTLossM17Text + dw BTLossM18Text + dw BTLossM19Text + dw BTLossM20Text + dw BTLossM21Text + dw BTLossM22Text + dw BTLossM23Text + dw BTLossM24Text + dw BTLossM25Text + +.PlayerWon: + dw BTWinM1Text + dw BTWinM2Text + dw BTWinM3Text + dw BTWinM4Text + dw BTWinM5Text + dw BTWinM6Text + dw BTWinM7Text + dw BTWinM8Text + dw BTWinM9Text + dw BTWinM10Text + dw BTWinM11Text + dw BTWinM12Text + dw BTWinM13Text + dw BTWinM14Text + dw BTWinM15Text + dw BTWinM16Text + dw BTWinM17Text + dw BTWinM18Text + dw BTWinM19Text + dw BTWinM20Text + dw BTWinM21Text + dw BTWinM22Text + dw BTWinM23Text + dw BTWinM24Text + dw BTWinM25Text + +BTFemaleTrainerTexts: + dw .Greetings + dw .PlayerLost + dw .PlayerWon + +.Greetings: + dw BTGreetingF1Text + dw BTGreetingF2Text + dw BTGreetingF3Text + dw BTGreetingF4Text + dw BTGreetingF5Text + dw BTGreetingF6Text + dw BTGreetingF7Text + dw BTGreetingF8Text + dw BTGreetingF9Text + dw BTGreetingF10Text + dw BTGreetingF11Text + dw BTGreetingF12Text + dw BTGreetingF13Text + dw BTGreetingF14Text + dw BTGreetingF15Text + +.PlayerLost: + dw BTLossF1Text + dw BTLossF2Text + dw BTLossF3Text + dw BTLossF4Text + dw BTLossF5Text + dw BTLossF6Text + dw BTLossF7Text + dw BTLossF8Text + dw BTLossF9Text + dw BTLossF10Text + dw BTLossF11Text + dw BTLossF12Text + dw BTLossF13Text + dw BTLossF14Text + dw BTLossF15Text + +.PlayerWon: + dw BTWinF1Text + dw BTWinF2Text + dw BTWinF3Text + dw BTWinF4Text + dw BTWinF5Text + dw BTWinF6Text + dw BTWinF7Text + dw BTWinF8Text + dw BTWinF9Text + dw BTWinF10Text + dw BTWinF11Text + dw BTWinF12Text + dw BTWinF13Text + dw BTWinF14Text + dw BTWinF15Text + +BTGreetingM1Text: + text_far _BTGreetingM1Text + text_end + +BTLossM1Text: + text_far _BTLossM1Text + text_end + +BTWinM1Text: + text_far _BTWinM1Text + text_end + +BTGreetingM2Text: + text_far _BTGreetingM2Text + text_end + +BTLossM2Text: + text_far _BTLossM2Text + text_end + +BTWinM2Text: + text_far _BTWinM2Text + text_end + +BTGreetingM3Text: + text_far _BTGreetingM3Text + text_end + +BTLossM3Text: + text_far _BTLossM3Text + text_end + +BTWinM3Text: + text_far _BTWinM3Text + text_end + +BTGreetingM4Text: + text_far _BTGreetingM4Text + text_end + +BTLossM4Text: + text_far _BTLossM4Text + text_end + +BTWinM4Text: + text_far _BTWinM4Text + text_end + +BTGreetingM5Text: + text_far _BTGreetingM5Text + text_end + +BTLossM5Text: + text_far _BTLossM5Text + text_end + +BTWinM5Text: + text_far _BTWinM5Text + text_end + +BTGreetingM6Text: + text_far _BTGreetingM6Text + text_end + +BTLossM6Text: + text_far _BTLossM6Text + text_end + +BTWinM6Text: + text_far _BTWinM6Text + text_end + +BTGreetingM7Text: + text_far _BTGreetingM7Text + text_end + +BTLossM7Text: + text_far _BTLossM7Text + text_end + +BTWinM7Text: + text_far _BTWinM7Text + text_end + +BTGreetingM8Text: + text_far _BTGreetingM8Text + text_end + +BTLossM8Text: + text_far _BTLossM8Text + text_end + +BTWinM8Text: + text_far _BTWinM8Text + text_end + +BTGreetingM9Text: + text_far _BTGreetingM9Text + text_end + +BTLossM9Text: + text_far _BTLossM9Text + text_end + +BTWinM9Text: + text_far _BTWinM9Text + text_end + +BTGreetingM10Text: + text_far _BTGreetingM10Text + text_end + +BTLossM10Text: + text_far _BTLossM10Text + text_end + +BTWinM10Text: + text_far _BTWinM10Text + text_end + +BTGreetingM11Text: + text_far _BTGreetingM11Text + text_end + +BTLossM11Text: + text_far _BTLossM11Text + text_end + +BTWinM11Text: + text_far _BTWinM11Text + text_end + +BTGreetingM12Text: + text_far _BTGreetingM12Text + text_end + +BTLossM12Text: + text_far _BTLossM12Text + text_end + +BTWinM12Text: + text_far _BTWinM12Text + text_end + +BTGreetingM13Text: + text_far _BTGreetingM13Text + text_end + +BTLossM13Text: + text_far _BTLossM13Text + text_end + +BTWinM13Text: + text_far _BTWinM13Text + text_end + +BTGreetingM14Text: + text_far _BTGreetingM14Text + text_end + +BTLossM14Text: + text_far _BTLossM14Text + text_end + +BTWinM14Text: + text_far _BTWinM14Text + text_end + +BTGreetingM15Text: + text_far _BTGreetingM15Text + text_end + +BTLossM15Text: + text_far _BTLossM15Text + text_end + +BTWinM15Text: + text_far _BTWinM15Text + text_end + +BTGreetingM16Text: + text_far _BTGreetingM16Text + text_end + +BTLossM16Text: + text_far _BTLossM16Text + text_end + +BTWinM16Text: + text_far _BTWinM16Text + text_end + +BTGreetingM17Text: + text_far _BTGreetingM17Text + text_end + +BTLossM17Text: + text_far _BTLossM17Text + text_end + +BTWinM17Text: + text_far _BTWinM17Text + text_end + +BTGreetingM18Text: + text_far _BTGreetingM18Text + text_end + +BTLossM18Text: + text_far _BTLossM18Text + text_end + +BTWinM18Text: + text_far _BTWinM18Text + text_end + +BTGreetingM19Text: + text_far _BTGreetingM19Text + text_end + +BTLossM19Text: + text_far _BTLossM19Text + text_end + +BTWinM19Text: + text_far _BTWinM19Text + text_end + +BTGreetingM20Text: + text_far _BTGreetingM20Text + text_end + +BTLossM20Text: + text_far _BTLossM20Text + text_end + +BTWinM20Text: + text_far _BTWinM20Text + text_end + +BTGreetingM21Text: + text_far _BTGreetingM21Text + text_end + +BTLossM21Text: + text_far _BTLossM21Text + text_end + +BTWinM21Text: + text_far _BTWinM21Text + text_end + +BTGreetingM22Text: + text_far _BTGreetingM22Text + text_end + +BTLossM22Text: + text_far _BTLossM22Text + text_end + +BTWinM22Text: + text_far _BTWinM22Text + text_end + +BTGreetingM23Text: + text_far _BTGreetingM23Text + text_end + +BTLossM23Text: + text_far _BTLossM23Text + text_end + +BTWinM23Text: + text_far _BTWinM23Text + text_end + +BTGreetingM24Text: + text_far _BTGreetingM24Text + text_end + +BTLossM24Text: + text_far _BTLossM24Text + text_end + +BTWinM24Text: + text_far _BTWinM24Text + text_end + +BTGreetingM25Text: + text_far _BTGreetingM25Text + text_end + +BTLossM25Text: + text_far _BTLossM25Text + text_end + +BTWinM25Text: + text_far _BTWinM25Text + text_end + +BTGreetingF1Text: + text_far _BTGreetingF1Text + text_end + +BTLossF1Text: + text_far _BTLossF1Text + text_end + +BTWinF1Text: + text_far _BTWinF1Text + text_end + +BTGreetingF2Text: + text_far _BTGreetingF2Text + text_end + +BTLossF2Text: + text_far _BTLossF2Text + text_end + +BTWinF2Text: + text_far _BTWinF2Text + text_end + +BTGreetingF3Text: + text_far _BTGreetingF3Text + text_end + +BTLossF3Text: + text_far _BTLossF3Text + text_end + +BTWinF3Text: + text_far _BTWinF3Text + text_end + +BTGreetingF4Text: + text_far _BTGreetingF4Text + text_end + +BTLossF4Text: + text_far _BTLossF4Text + text_end + +BTWinF4Text: + text_far _BTWinF4Text + text_end + +BTGreetingF5Text: + text_far _BTGreetingF5Text + text_end + +BTLossF5Text: + text_far _BTLossF5Text + text_end + +BTWinF5Text: + text_far _BTWinF5Text + text_end + +BTGreetingF6Text: + text_far _BTGreetingF6Text + text_end + +BTLossF6Text: + text_far _BTLossF6Text + text_end + +BTWinF6Text: + text_far _BTWinF6Text + text_end + +BTGreetingF7Text: + text_far _BTGreetingF7Text + text_end + +BTLossF7Text: + text_far _BTLossF7Text + text_end + +BTWinF7Text: + text_far _BTWinF7Text + text_end + +BTGreetingF8Text: + text_far _BTGreetingF8Text + text_end + +BTLossF8Text: + text_far _BTLossF8Text + text_end + +BTWinF8Text: + text_far _BTWinF8Text + text_end + +BTGreetingF9Text: + text_far _BTGreetingF9Text + text_end + +BTLossF9Text: + text_far _BTLossF9Text + text_end + +BTWinF9Text: + text_far _BTWinF9Text + text_end + +BTGreetingF10Text: + text_far _BTGreetingF10Text + text_end + +BTLossF10Text: + text_far _BTLossF10Text + text_end + +BTWinF10Text: + text_far _BTWinF10Text + text_end + +BTGreetingF11Text: + text_far _BTGreetingF11Text + text_end + +BTLossF11Text: + text_far _BTLossF11Text + text_end + +BTWinF11Text: + text_far _BTWinF11Text + text_end + +BTGreetingF12Text: + text_far _BTGreetingF12Text + text_end + +BTLossF12Text: + text_far _BTLossF12Text + text_end + +BTWinF12Text: + text_far _BTWinF12Text + text_end + +BTGreetingF13Text: + text_far _BTGreetingF13Text + text_end + +BTLossF13Text: + text_far _BTLossF13Text + text_end + +BTWinF13Text: + text_far _BTWinF13Text + text_end + +BTGreetingF14Text: + text_far _BTGreetingF14Text + text_end + +BTLossF14Text: + text_far _BTLossF14Text + text_end + +BTWinF14Text: + text_far _BTWinF14Text + text_end + +BTGreetingF15Text: + text_far _BTGreetingF15Text + text_end + +BTLossF15Text: + text_far _BTLossF15Text + text_end + +BTWinF15Text: + text_far _BTWinF15Text + text_end diff --git a/engine/events/buena.asm b/engine/events/buena.asm new file mode 100644 index 0000000..91f73ca --- /dev/null +++ b/engine/events/buena.asm @@ -0,0 +1,300 @@ +BuenasPassword: + xor a + ld [wWhichIndexSet], a + ld hl, .MenuHeader + call CopyMenuHeader + ld a, [wBuenasPassword] + ld c, a + farcall GetBuenasPassword + ld a, [wMenuBorderLeftCoord] + add c + add $2 + ld [wMenuBorderRightCoord], a + call PushWindow + call DoNthMenu ; menu + farcall Buena_ExitMenu + ld b, $0 + ld a, [wMenuSelection] + ld c, a + ld a, [wBuenasPassword] + maskbits NUM_PASSWORDS_PER_CATEGORY + cp c + jr nz, .wrong + ld b, $1 + +.wrong + ld a, b + ld [wScriptVar], a + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 10, 7 + dw .MenuData + db 1 ; default option + + db 0 + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags + db 0 ; items + dw .PasswordIndices + dw .PlacePasswordChoices + +.PasswordIndices: + db NUM_PASSWORDS_PER_CATEGORY +for x, NUM_PASSWORDS_PER_CATEGORY + db x +endr + db -1 + +.PlacePasswordChoices: + push de + ld a, [wBuenasPassword] + and $f0 + ld c, a + ld a, [wMenuSelection] + add c + ld c, a + farcall GetBuenasPassword + pop hl + call PlaceString + ret + +BuenaPrize: + xor a + ld [wMenuScrollPosition], a + ld a, $1 + ld [wMenuSelection], a + call Buena_PlacePrizeMenuBox + call Buena_DisplayBlueCardBalance + ld hl, .BuenaAskWhichPrizeText + call PrintText + jr .okay + +.loop + ld hl, .BuenaAskWhichPrizeText + call BuenaPrintText + +.okay + call DelayFrame + call UpdateSprites + call PrintBlueCardBalance + call Buena_PrizeMenu + jr z, .done + ld [wMenuSelectionQuantity], a + call Buena_GetPrize + ld a, [hl] + ld [wNamedObjectIndex], a + call GetItemName + ld hl, .BuenaIsThatRightText + call BuenaPrintText + call YesNoBox + jr c, .loop + + ld a, [wMenuSelectionQuantity] + call Buena_GetPrize + inc hl + ld a, [hld] + ld c, a + ld a, [wBlueCardBalance] + cp c + jr c, .InsufficientBalance + + ld a, [hli] + push hl + ld [wCurItem], a + ld a, $1 + ld [wItemQuantityChange], a + ld hl, wNumItems + call ReceiveItem + pop hl + jr nc, .BagFull + ld a, [hl] + ld c, a + ld a, [wBlueCardBalance] + sub c + ld [wBlueCardBalance], a + call PrintBlueCardBalance + jr .Purchase + +.InsufficientBalance: + ld hl, .BuenaNotEnoughPointsText + jr .print + +.BagFull: + ld hl, .BuenaNoRoomText + jr .print + +.Purchase: + ld de, SFX_TRANSACTION + call PlaySFX + ld hl, .BuenaHereYouGoText + +.print + call BuenaPrintText + jr .loop + +.done + call CloseWindow + call CloseWindow + ld hl, .BuenaComeAgainText + call PrintText + call JoyWaitAorB + call PlayClickSFX + ret + +.BuenaAskWhichPrizeText: + text_far _BuenaAskWhichPrizeText + text_end + +.BuenaIsThatRightText: + text_far _BuenaIsThatRightText + text_end + +.BuenaHereYouGoText: + text_far _BuenaHereYouGoText + text_end + +.BuenaNotEnoughPointsText: + text_far _BuenaNotEnoughPointsText + text_end + +.BuenaNoRoomText: + text_far _BuenaNoRoomText + text_end + +.BuenaComeAgainText: + text_far _BuenaComeAgainText + text_end + +Buena_DisplayBlueCardBalance: + ld hl, BlueCardBalanceMenuHeader + call LoadMenuHeader + ret + +PrintBlueCardBalance: + ld de, wBlueCardBalance + call .DrawBox + ret + +.DrawBox: + push de + xor a + ldh [hBGMapMode], a + ld hl, BlueCardBalanceMenuHeader + call CopyMenuHeader + call MenuBox + call UpdateSprites + call MenuBoxCoord2Tile + ld bc, SCREEN_WIDTH + 1 + add hl, bc + ld de, .Points_string + call PlaceString + ld h, b + ld l, c + inc hl + ld a, " " + ld [hli], a + ld [hld], a + pop de + lb bc, 1, 2 + call PrintNum + ret + +.Points_string: + db "Points@" + +BlueCardBalanceMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 11, 11, 13 + +Buena_PlacePrizeMenuBox: + ld hl, .MenuHeader + call LoadMenuHeader + ret + +.MenuHeader + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 17, TEXTBOX_Y - 1 + +Buena_PrizeMenu: + ld hl, .MenuHeader + call CopyMenuHeader + ld a, [wMenuSelection] + ld [wMenuCursorPosition], a + xor a + ld [wWhichIndexSet], a + ldh [hBGMapMode], a + call InitScrollingMenu + call UpdateSprites + call ScrollingMenu + ld a, [wMenuSelection] + ld c, a + ld a, [wMenuCursorY] + ld [wMenuSelection], a + ld a, [wMenuJoypad] + cp B_BUTTON + jr z, .cancel + ld a, c + and a + ret nz + +.cancel + xor a + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 1, 1, 16, 9 + dw .MenuData + db 1 ; default option + + db 0 + +.MenuData: + db SCROLLINGMENU_DISPLAY_ARROWS ; flags + db 4, 13 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dba .Prizes + dba .PrintPrizeItem + dba .PrintPrizePoints + +.Prizes: + db NUM_BUENA_PRIZES +for x, NUM_BUENA_PRIZES + db x + 1 +endr + db -1 + +.PrintPrizeItem: + ld a, [wMenuSelection] + call Buena_GetPrize + ld a, [hl] + push de + ld [wNamedObjectIndex], a + call GetItemName + pop hl + call PlaceString + ret + +.PrintPrizePoints: + ld a, [wMenuSelection] + call Buena_GetPrize + inc hl + ld a, [hl] + ld c, "0" + add c + ld [de], a + ret + +Buena_GetPrize: + dec a + ld hl, BuenaPrizeItems + ld b, 0 + ld c, a + add hl, bc + add hl, bc + ret + +INCLUDE "data/items/buena_prizes.asm" diff --git a/engine/events/buena_menu.asm b/engine/events/buena_menu.asm new file mode 100644 index 0000000..fada801 --- /dev/null +++ b/engine/events/buena_menu.asm @@ -0,0 +1,58 @@ +AskRememberPassword: + call .DoMenu + ld a, $0 + jr c, .okay + ld a, $1 + +.okay + ld [wScriptVar], a + ret + +.DoMenu: + lb bc, 14, 7 + push bc + ld hl, YesNoMenuHeader + call CopyMenuHeader + pop bc + ld a, b + ld [wMenuBorderLeftCoord], a + add $5 + ld [wMenuBorderRightCoord], a + ld a, c + ld [wMenuBorderTopCoord], a + add $4 + ld [wMenuBorderBottomCoord], a + call PushWindow + call VerticalMenu + push af + ld c, 15 + call DelayFrames + call Buena_ExitMenu + pop af + jr c, .refused + ld a, [wMenuCursorY] + cp $2 + jr z, .refused + and a + ret + +.refused + ld a, $2 + ld [wMenuCursorY], a + scf + ret + +Buena_ExitMenu: + ldh a, [hOAMUpdate] + push af + call ExitMenu + call UpdateSprites + xor a + ldh [hOAMUpdate], a + call DelayFrame + ld a, $1 + ldh [hOAMUpdate], a + call ApplyTilemap + pop af + ldh [hOAMUpdate], a + ret diff --git a/engine/events/bug_contest/caught_mon.asm b/engine/events/bug_contest/caught_mon.asm new file mode 100644 index 0000000..533eae2 --- /dev/null +++ b/engine/events/bug_contest/caught_mon.asm @@ -0,0 +1,37 @@ +BugContest_SetCaughtContestMon: + ld a, [wContestMon] + and a + jr z, .firstcatch + ld [wNamedObjectIndex], a + farcall DisplayAlreadyCaughtText + farcall DisplayCaughtContestMonStats + lb bc, 14, 7 + call PlaceYesNoBox + ret c + +.firstcatch + call .generatestats + ld a, [wTempEnemyMonSpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, .ContestCaughtMonText + call PrintText + ret + +.generatestats + ld a, [wTempEnemyMonSpecies] + ld [wCurSpecies], a + ld [wCurPartySpecies], a + call GetBaseData + xor a + ld bc, PARTYMON_STRUCT_LENGTH + ld hl, wContestMon + call ByteFill + xor a + ld [wMonType], a + ld hl, wContestMon + jp GeneratePartyMonStats + +.ContestCaughtMonText: + text_far _ContestCaughtMonText + text_end diff --git a/engine/events/bug_contest/contest.asm b/engine/events/bug_contest/contest.asm new file mode 100644 index 0000000..4c8da28 --- /dev/null +++ b/engine/events/bug_contest/contest.asm @@ -0,0 +1,41 @@ +GiveParkBalls: + xor a + ld [wContestMon], a + ld a, BUG_CONTEST_BALLS + ld [wParkBallsRemaining], a + farcall StartBugContestTimer + ret + +BugCatchingContestBattleScript:: + loadvar VAR_BATTLETYPE, BATTLETYPE_CONTEST + randomwildmon + startbattle + reloadmapafterbattle + readmem wParkBallsRemaining + iffalse BugCatchingContestOutOfBallsScript + end + +BugCatchingContestOverScript:: + playsound SFX_ELEVATOR_END + opentext + writetext BugCatchingContestTimeUpText + waitbutton + sjump BugCatchingContestReturnToGateScript + +BugCatchingContestOutOfBallsScript: + playsound SFX_ELEVATOR_END + opentext + writetext BugCatchingContestIsOverText + waitbutton + +BugCatchingContestReturnToGateScript: + closetext + jumpstd BugContestResultsWarpScript + +BugCatchingContestTimeUpText: + text_far _BugCatchingContestTimeUpText + text_end + +BugCatchingContestIsOverText: + text_far _BugCatchingContestIsOverText + text_end diff --git a/engine/events/bug_contest/contest_2.asm b/engine/events/bug_contest/contest_2.asm new file mode 100644 index 0000000..ddfad86 --- /dev/null +++ b/engine/events/bug_contest/contest_2.asm @@ -0,0 +1,116 @@ +SelectRandomBugContestContestants: +; Select five random people to participate in the current contest. + +; First we have to make sure that any old data is cleared away. + ld c, NUM_BUG_CONTESTANTS + ld hl, BugCatchingContestantEventFlagTable +.loop1 + push bc + push hl + ld e, [hl] + inc hl + ld d, [hl] + ld b, RESET_FLAG + call EventFlagAction + pop hl + inc hl + inc hl + pop bc + dec c + jr nz, .loop1 + +; Now that that's out of the way, we can get on to the good stuff. + ld c, 5 +.loop2 + push bc +.next +; Choose a flag at uniform random to be set. + call Random + cp $ff / NUM_BUG_CONTESTANTS * NUM_BUG_CONTESTANTS + jr nc, .next + ld c, $ff / NUM_BUG_CONTESTANTS + call SimpleDivide + ld e, b + ld d, 0 + ld hl, BugCatchingContestantEventFlagTable + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + push de +; If we've already set it, it doesn't count. + ld b, CHECK_FLAG + call EventFlagAction + pop de + ld a, c + and a + jr nz, .next +; Set the flag. This will cause that sprite to not be visible in the contest. + ld b, SET_FLAG + call EventFlagAction + pop bc +; Check if we're done. If so, return. Otherwise, choose the next victim. + dec c + jr nz, .loop2 + ret + +CheckBugContestContestantFlag: +; Checks the flag of the Bug Catching Contestant whose index is loaded in a. + + ld hl, BugCatchingContestantEventFlagTable + ld e, a + ld d, 0 + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + ld b, CHECK_FLAG + call EventFlagAction + ret + +INCLUDE "data/events/bug_contest_flags.asm" + +ContestDropOffMons: + ld hl, wPartyMon1HP + ld a, [hli] + or [hl] + jr z, .fainted +; Mask the rest of your party by setting the count to 1... + ld hl, wPartyCount + ld a, 1 + ld [hli], a + inc hl +; ... backing up the second mon index somewhere... + ld a, [hl] + ld [wBugContestSecondPartySpecies], a +; ... and replacing it with the terminator byte + ld [hl], -1 + xor a + ld [wScriptVar], a + ret + +.fainted + ld a, $1 + ld [wScriptVar], a + ret + +ContestReturnMons: +; Restore the species of the second mon. + ld hl, wPartySpecies + 1 + ld a, [wBugContestSecondPartySpecies] + ld [hl], a +; Restore the party count, which must be recomputed. + ld b, 1 +.loop + ld a, [hli] + cp -1 + jr z, .done + inc b + jr .loop + +.done + ld a, b + ld [wPartyCount], a + ret diff --git a/engine/events/bug_contest/display_stats.asm b/engine/events/bug_contest/display_stats.asm new file mode 100644 index 0000000..220eeb4 --- /dev/null +++ b/engine/events/bug_contest/display_stats.asm @@ -0,0 +1,105 @@ +DisplayCaughtContestMonStats: + call ClearBGPalettes + call ClearTilemap + call ClearSprites + call LoadFontsBattleExtra + + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + + hlcoord 0, 0 + ld b, 4 + ld c, 13 + call Textbox + + hlcoord 0, 6 + ld b, 4 + ld c, 13 + call Textbox + + hlcoord 2, 0 + ld de, .Stock + call PlaceString + + hlcoord 2, 6 + ld de, .This + call PlaceString + + hlcoord 5, 4 + ld de, .Health + call PlaceString + + hlcoord 5, 10 + ld de, .Health + call PlaceString + + ld a, [wContestMon] + ld [wNamedObjectIndex], a + call GetPokemonName + ld de, wStringBuffer1 + hlcoord 1, 2 + call PlaceString + + ld h, b + ld l, c + ld a, [wContestMonLevel] + ld [wTempMonLevel], a + call PrintLevel + + ld de, wEnemyMonNickname + hlcoord 1, 8 + call PlaceString + + ld h, b + ld l, c + ld a, [wEnemyMonLevel] + ld [wTempMonLevel], a + call PrintLevel + + hlcoord 11, 4 + ld de, wContestMonMaxHP + lb bc, 2, 3 + call PrintNum + + hlcoord 11, 10 + ld de, wEnemyMonMaxHP + call PrintNum + + ld hl, ContestAskSwitchText + call PrintText + + pop af + ld [wOptions], a + + call WaitBGMap + ld b, SCGB_DIPLOMA + call GetSGBLayout + call SetPalettes + ret + +.Health: + db "HEALTH@" +.Stock: + db " STOCK @" +.This: + db " THIS @" + +ContestAskSwitchText: + text_far _ContestAskSwitchText + text_end + +DisplayAlreadyCaughtText: + call GetPokemonName + ld hl, .ContestAlreadyCaughtText + jp PrintText + +.ContestAlreadyCaughtText: + text_far _ContestAlreadyCaughtText + text_end + +DummyPredef2F: +DummyPredef38: +DummyPredef39: + ret diff --git a/engine/events/bug_contest/judging.asm b/engine/events/bug_contest/judging.asm new file mode 100644 index 0000000..f45b8d1 --- /dev/null +++ b/engine/events/bug_contest/judging.asm @@ -0,0 +1,381 @@ +_BugContestJudging: + call ContestScore + farcall StubbedTrainerRankings_BugContestScore + call BugContest_JudgeContestants + ld a, [wBugContestThirdPlaceWinnerID] + call LoadContestantName + ld a, [wBugContestThirdPlaceMon] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, ContestJudging_ThirdPlaceText + call PrintText + ld a, [wBugContestSecondPlaceWinnerID] + call LoadContestantName + ld a, [wBugContestSecondPlaceMon] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, ContestJudging_SecondPlaceText + call PrintText + ld a, [wBugContestFirstPlaceWinnerID] + call LoadContestantName + ld a, [wBugContestFirstPlaceMon] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, ContestJudging_FirstPlaceText + call PrintText + jp BugContest_GetPlayersResult + +ContestJudging_FirstPlaceText: + text_far _ContestJudging_FirstPlaceText + text_asm + ld de, SFX_1ST_PLACE + call PlaySFX + call WaitSFX + ld hl, ContestJudging_FirstPlaceScoreText + ret + +ContestJudging_FirstPlaceScoreText: + text_far _ContestJudging_FirstPlaceScoreText + text_end + +ContestJudging_SecondPlaceText: + ; Placing second was @ , who caught a @ !@ @ + text_far _ContestJudging_SecondPlaceText + text_asm + ld de, SFX_2ND_PLACE + call PlaySFX + call WaitSFX + ld hl, ContestJudging_SecondPlaceScoreText + ret + +ContestJudging_SecondPlaceScoreText: + text_far _ContestJudging_SecondPlaceScoreText + text_end + +ContestJudging_ThirdPlaceText: + ; Placing third was @ , who caught a @ !@ @ + text_far _ContestJudging_ThirdPlaceText + text_asm + ld de, SFX_3RD_PLACE + call PlaySFX + call WaitSFX + ld hl, ContestJudging_ThirdPlaceScoreText + ret + +ContestJudging_ThirdPlaceScoreText: + text_far _ContestJudging_ThirdPlaceScoreText + text_end + +LoadContestantName: +; If a = 1, get your name. + assert BUG_CONTEST_PLAYER == 1 + dec a + jr z, .player +; Find the pointer for the trainer class of the Bug Catching Contestant whose ID is in a. + ld c, a + ld b, 0 + ld hl, BugContestantPointers + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a +; Copy the Trainer Class to c. + ld a, [hli] + ld c, a +; Save hl and bc for later. + push hl + push bc +; Get the Trainer Class name and copy it into wBugContestWinnerName. + callfar GetTrainerClassName + ld hl, wStringBuffer1 + ld de, wBugContestWinnerName + ld bc, TRAINER_CLASS_NAME_LENGTH + call CopyBytes + ld hl, wBugContestWinnerName +; Delete the trailing terminator and replace it with a space. +.next + ld a, [hli] + cp "@" + jr nz, .next + dec hl + ld [hl], " " + inc hl + ld d, h + ld e, l +; Restore the Trainer Class ID and Trainer ID pointer. Save de for later. + pop bc + pop hl + push de +; Get the name of the trainer with class c and ID b. + ld a, [hl] + ld b, a + callfar GetTrainerName +; Append the name to wBugContestWinnerName. + ld hl, wStringBuffer1 + pop de + ld bc, NAME_LENGTH - 1 + jp CopyBytes + +.player + ld hl, wPlayerName + ld de, wBugContestWinnerName + ld bc, NAME_LENGTH + jp CopyBytes + +INCLUDE "data/events/bug_contest_winners.asm" + +BugContest_GetPlayersResult: + ld hl, wBugContestThirdPlaceWinnerID + ld de, -BUG_CONTESTANT_SIZE + ld b, 3 ; 3rd, 2nd, or 1st +.loop + ld a, [hl] + cp BUG_CONTEST_PLAYER + jr z, .done + add hl, de + dec b + jr nz, .loop + +.done + ret + +BugContest_JudgeContestants: + call ClearContestResults + call ComputeAIContestantScores + ld hl, wBugContestTempWinnerID + ld a, BUG_CONTEST_PLAYER + ld [hli], a + ld a, [wContestMon] + ld [hli], a + ldh a, [hProduct] + ld [hli], a + ldh a, [hProduct + 1] + ld [hl], a + call DetermineContestWinners + ret + +ClearContestResults: + ld hl, wBugContestResults + ld b, wBugContestWinnersEnd - wBugContestResults + xor a +.loop + ld [hli], a + dec b + jr nz, .loop + ret + +DetermineContestWinners: + ld de, wBugContestTempScore + ld hl, wBugContestFirstPlaceScore + ld c, 2 + call CompareBytes + jr c, .not_first_place + ld hl, wBugContestSecondPlaceWinnerID + ld de, wBugContestThirdPlaceWinnerID + ld bc, BUG_CONTESTANT_SIZE + call CopyBytes + ld hl, wBugContestFirstPlaceWinnerID + ld de, wBugContestSecondPlaceWinnerID + ld bc, BUG_CONTESTANT_SIZE + call CopyBytes + ld hl, wBugContestFirstPlaceWinnerID + call CopyTempContestant + jr .done + +.not_first_place + ld de, wBugContestTempScore + ld hl, wBugContestSecondPlaceScore + ld c, 2 + call CompareBytes + jr c, .not_second_place + ld hl, wBugContestSecondPlaceWinnerID + ld de, wBugContestThirdPlaceWinnerID + ld bc, BUG_CONTESTANT_SIZE + call CopyBytes + ld hl, wBugContestSecondPlaceWinnerID + call CopyTempContestant + jr .done + +.not_second_place + ld de, wBugContestTempScore + ld hl, wBugContestThirdPlaceScore + ld c, 2 + call CompareBytes + jr c, .done + ld hl, wBugContestThirdPlaceWinnerID + call CopyTempContestant + +.done + ret + +CopyTempContestant: +; Could've just called CopyBytes. + ld de, wBugContestTempWinnerID +rept BUG_CONTESTANT_SIZE - 1 + ld a, [de] + inc de + ld [hli], a +endr + ld a, [de] + inc de + ld [hl], a + ret + +ComputeAIContestantScores: + ld e, 0 +.loop + push de + call CheckBugContestContestantFlag + pop de + jr nz, .done + ld a, e + inc a + inc a + ld [wBugContestTempWinnerID], a + dec a + ld c, a + ld b, 0 + ld hl, BugContestantPointers + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl +.loop2 + ; 0, 1, or 2 for 1st, 2nd, or 3rd + call Random + and 3 + cp 3 + jr z, .loop2 + add a, a + add a, a + ld c, a + ld b, 0 + add hl, bc + ld a, [hli] + push hl + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + pop hl + inc hl + ld [wBugContestTempMon], a + ld a, [hli] + ld h, [hl] + ld l, a + ; randomly perturb score + call Random + and %111 + ld c, a + ld b, 0 + add hl, bc + ld a, h + ld [wBugContestTempScore], a + ld a, l + ld [wBugContestTempScore + 1], a + push de + call DetermineContestWinners + pop de + +.done + inc e + ld a, e + cp NUM_BUG_CONTESTANTS + jr nz, .loop + ret + +ContestScore: +; Determine the player's score in the Bug Catching Contest. + + xor a + ldh [hProduct], a + ldh [hMultiplicand], a + + ld a, [wContestMonSpecies] ; Species + and a + jr z, .done + + ; Tally the following: + + ; Max HP * 4 + ld a, [wContestMonMaxHP + 1] + call .AddContestStat + ld a, [wContestMonMaxHP + 1] + call .AddContestStat + ld a, [wContestMonMaxHP + 1] + call .AddContestStat + ld a, [wContestMonMaxHP + 1] + call .AddContestStat + + ; Stats + ld a, [wContestMonAttack + 1] + call .AddContestStat + ld a, [wContestMonDefense + 1] + call .AddContestStat + ld a, [wContestMonSpeed + 1] + call .AddContestStat + ld a, [wContestMonSpclAtk + 1] + call .AddContestStat + ld a, [wContestMonSpclDef + 1] + call .AddContestStat + + ; DVs + ld a, [wContestMonDVs + 0] + ld b, a + and %0010 + add a + add a + ld c, a + + swap b + ld a, b + and %0010 + add a + add c + ld d, a + + ld a, [wContestMonDVs + 1] + ld b, a + and %0010 + ld c, a + + swap b + ld a, b + and %0010 + srl a + add c + add c + add d + add d + + call .AddContestStat + + ; Remaining HP / 8 + ld a, [wContestMonHP + 1] + srl a + srl a + srl a + call .AddContestStat + + ; Whether it's holding an item + ld a, [wContestMonItem] + and a + jr z, .done + + ld a, 1 + call .AddContestStat + +.done + ret + +.AddContestStat: + ld hl, hMultiplicand + add [hl] + ld [hl], a + ret nc + dec hl + inc [hl] + ret diff --git a/engine/events/card_key.asm b/engine/events/card_key.asm new file mode 100644 index 0000000..c15b1de --- /dev/null +++ b/engine/events/card_key.asm @@ -0,0 +1,37 @@ +_CardKey: +; Are we even in the right map to use this? + ld a, [wMapGroup] + cp GROUP_RADIO_TOWER_3F + jr nz, .nope + + ld a, [wMapNumber] + cp MAP_RADIO_TOWER_3F + jr nz, .nope +; Are we facing the slot? + ld a, [wPlayerDirection] + and %1100 + cp OW_UP + jr nz, .nope + + call GetFacingTileCoord + ld a, d + cp 18 + jr nz, .nope + ld a, e + cp 6 + jr nz, .nope +; Let's use the Card Key. + ld hl, .CardKeyScript + call QueueScript + ld a, TRUE + ld [wItemEffectSucceeded], a + ret + +.nope + ld a, FALSE + ld [wItemEffectSucceeded], a + ret + +.CardKeyScript: + closetext + farsjump CardKeySlotScript diff --git a/engine/events/catch_tutorial.asm b/engine/events/catch_tutorial.asm new file mode 100644 index 0000000..3539cea --- /dev/null +++ b/engine/events/catch_tutorial.asm @@ -0,0 +1,81 @@ +CatchTutorial:: + ld a, [wBattleType] + dec a + ld c, a + ld hl, .dw + ld b, 0 + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.dw + dw .DudeTutorial + dw .DudeTutorial + dw .DudeTutorial + +.DudeTutorial: +; Back up your name to your Mom's name. + ld hl, wPlayerName + ld de, wMomsName + ld bc, NAME_LENGTH + call CopyBytes +; Copy Dude's name to your name + ld hl, .Dude + ld de, wPlayerName + ld bc, NAME_LENGTH + call CopyBytes + + call .LoadDudeData + + xor a + ldh [hJoyDown], a + ldh [hJoyPressed], a + ld a, [wOptions] + push af + and ~TEXT_DELAY_MASK + add TEXT_DELAY_MED + ld [wOptions], a + ld hl, .AutoInput + ld a, BANK(.AutoInput) + call StartAutoInput + callfar StartBattle + call StopAutoInput + pop af + + ld [wOptions], a + ld hl, wMomsName + ld de, wPlayerName + ld bc, NAME_LENGTH + call CopyBytes + ret + +.LoadDudeData: + ld hl, wDudeNumItems + ld [hl], 1 + inc hl + ld [hl], POTION + inc hl + ld [hl], 1 + inc hl + ld [hl], -1 + ld hl, wDudeNumKeyItems + ld [hl], 0 + inc hl + ld [hl], -1 + ld hl, wDudeNumBalls + ld a, 1 + ld [hli], a + ld a, POKE_BALL + ld [hli], a + ld [hli], a + ld [hl], -1 + ret + +.Dude: + db "DUDE@" + +.AutoInput: + db NO_INPUT, $ff ; end diff --git a/engine/events/catch_tutorial_input.asm b/engine/events/catch_tutorial_input.asm new file mode 100644 index 0000000..cca2db2 --- /dev/null +++ b/engine/events/catch_tutorial_input.asm @@ -0,0 +1,43 @@ +_DudeAutoInput_A:: + ld hl, DudeAutoInput_A + jr _DudeAutoInput + +_DudeAutoInput_RightA: + ld hl, DudeAutoInput_RightA + jr _DudeAutoInput + +_DudeAutoInput_DownA: + ld hl, DudeAutoInput_DownA + jr _DudeAutoInput + +_DudeAutoInput: + ld a, BANK(DudeAutoInputs) + call StartAutoInput + ret + +DudeAutoInputs: ; used only for BANK(DudeAutoInputs) + +DudeAutoInput_A: + db NO_INPUT, $50 + db A_BUTTON, $00 + db NO_INPUT, $ff ; end + +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: + db NO_INPUT, $fe + db NO_INPUT, $fe + db NO_INPUT, $fe + db NO_INPUT, $fe + db D_DOWN, $00 + db NO_INPUT, $fe + db NO_INPUT, $fe + db NO_INPUT, $fe + db NO_INPUT, $fe + db A_BUTTON, $00 + db NO_INPUT, $ff ; end diff --git a/engine/events/celebi.asm b/engine/events/celebi.asm new file mode 100644 index 0000000..6e50fad --- /dev/null +++ b/engine/events/celebi.asm @@ -0,0 +1,314 @@ +DEF SPECIALCELEBIEVENT_CELEBI EQU $84 + +UnusedForestTreeFrames: ; unreferenced +INCBIN "gfx/tilesets/forest-tree/1.2bpp" +INCBIN "gfx/tilesets/forest-tree/2.2bpp" +INCBIN "gfx/tilesets/forest-tree/3.2bpp" +INCBIN "gfx/tilesets/forest-tree/4.2bpp" + +CelebiShrineEvent: + call DelayFrame + ld a, [wVramState] + push af + xor a + ld [wVramState], a + call LoadCelebiGFX + depixel 0, 10, 7, 0 + ld a, SPRITE_ANIM_INDEX_CELEBI + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], SPECIALCELEBIEVENT_CELEBI + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld [hl], SPRITE_ANIM_SEQ_CELEBI + ld hl, SPRITEANIMSTRUCT_VAR4 + add hl, bc + ld a, $80 + ld [hl], a + ld a, 160 ; frame count + ld [wFrameCounter], a + ld d, $0 +.loop + ld a, [wJumptableIndex] + bit 7, a + jr nz, .done + push bc + call GetCelebiSpriteTile + inc d + push de + ld a, 36 * SPRITEOAMSTRUCT_LENGTH + ld [wCurSpriteOAMAddr], a + farcall DoNextFrameForAllSprites + call CelebiEvent_CountDown + ld c, 2 + call DelayFrames + pop de + pop bc + jr .loop + +.done + pop af + ld [wVramState], a + call .RestorePlayerSprite_DespawnLeaves + call CelebiEvent_SetBattleType + ret + +.RestorePlayerSprite_DespawnLeaves: + ld hl, wShadowOAMSprite00TileID + xor a + ld c, 4 +.OAMloop: + ld [hli], a ; tile id +rept SPRITEOAMSTRUCT_LENGTH - 1 + inc hl +endr + inc a + dec c + jr nz, .OAMloop + ld hl, wShadowOAMSprite04 + ld bc, wShadowOAMEnd - wShadowOAMSprite04 + xor a + call ByteFill + ret + +LoadCelebiGFX: + farcall ClearSpriteAnims + ld de, SpecialCelebiLeafGFX + ld hl, vTiles1 + lb bc, BANK(SpecialCelebiLeafGFX), 4 + call Request2bpp + ld de, SpecialCelebiGFX + ld hl, vTiles0 tile SPECIALCELEBIEVENT_CELEBI + lb bc, BANK(SpecialCelebiGFX), 4 * 4 + call Request2bpp + xor a + ld [wJumptableIndex], a + ret + +CelebiEvent_CountDown: + ld hl, wFrameCounter + ld a, [hl] + and a + jr z, .done + dec [hl] + ret + +.done + ld hl, wJumptableIndex + set 7, [hl] + ret + +CelebiEvent_SpawnLeaf: ; unreferenced + ld hl, wFrameCounter2 + ld a, [hl] + inc [hl] + and $7 + ret nz + ld a, [hl] + and $18 + sla a + add $40 + ld d, a + ld e, $0 + ld a, SPRITE_ANIM_INDEX_FLY_LEAF ; fly land + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], $80 + ret + +SpecialCelebiLeafGFX: +INCBIN "gfx/overworld/cut_grass.2bpp" + +SpecialCelebiGFX: +INCBIN "gfx/overworld/celebi.2bpp" + +UpdateCelebiPosition: + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld a, [hl] + push af + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + cp 8 * 10 + 2 + jp nc, .FreezeCelebiPosition + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + inc [hl] + ld hl, SPRITEANIMSTRUCT_VAR4 + add hl, bc + ld a, [hl] + ld d, a + cp $3a + jr c, .skip + jr z, .skip + sub $3 + ld [hl], a +.skip + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + ld a, [hl] + inc [hl] + call CelebiEvent_Cosine + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ld d, a + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + add [hl] + cp 8 * 11 + 4 + jr nc, .ShiftY + cp 8 * 8 + 4 + jr nc, .ReinitSpriteAnimFrame +.ShiftY: + pop af + push af + cp d + jr nc, .moving_left + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + add [hl] + cp 8 * 10 + jr c, .float_up + jr .float_down + +.moving_left + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + add [hl] + cp 8 * 10 + jr nc, .float_up +.float_down + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + sub $2 + ld [hl], a + jr .ReinitSpriteAnimFrame + +.float_up + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + add $1 + ld [hl], a +.ReinitSpriteAnimFrame: + pop af + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + add [hl] + cp 8 * 10 + jr c, .left + cp -(8 * 3 + 2) + jr nc, .left + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld a, SPRITE_ANIM_FRAMESET_CELEBI_RIGHT + call ReinitSpriteAnimFrame + jr .done + +.left + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld a, SPRITE_ANIM_FRAMESET_CELEBI_LEFT + call ReinitSpriteAnimFrame +.done + ret + +.FreezeCelebiPosition: + pop af + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld a, SPRITE_ANIM_FRAMESET_CELEBI_LEFT + call ReinitSpriteAnimFrame + ret + +CelebiEvent_Cosine: +; a = d * cos(a * pi/32) + add %010000 ; cos(x) = sin(x + pi/2) + calc_sine_wave + +GetCelebiSpriteTile: + push hl + push bc + push de + ld a, d + ld d, $3 + ld e, d + cp $0 + jr z, .Frame1 + cp d + jr z, .Frame2 + call .AddE + cp d + jr z, .Frame3 + call .AddE + cp d + jr z, .Frame4 + call .AddE + cp d + jr c, .done + jr .restart + +.Frame1: + ld a, SPECIALCELEBIEVENT_CELEBI + jr .load_tile + +.Frame2: + ld a, SPECIALCELEBIEVENT_CELEBI + 4 + jr .load_tile + +.Frame3: + ld a, SPECIALCELEBIEVENT_CELEBI + 8 + jr .load_tile + +.Frame4: + ld a, SPECIALCELEBIEVENT_CELEBI + 12 + +.load_tile + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], a + jr .done + +.restart + pop de + ld d, $ff + push de + +.done + pop de + pop bc + pop hl + ret + +.AddE: + push af + ld a, d + add e + ld d, a + pop af + ret + +CelebiEvent_SetBattleType: + ld a, BATTLETYPE_CELEBI + ld [wBattleType], a + ret + +CheckCaughtCelebi: + ld a, [wBattleResult] + bit BATTLERESULT_CAUGHT_CELEBI, a + jr z, .false + ld a, TRUE + ld [wScriptVar], a + jr .done + +.false + xor a ; FALSE + ld [wScriptVar], a + +.done + ret diff --git a/engine/events/checkforhiddenitems.asm b/engine/events/checkforhiddenitems.asm new file mode 100644 index 0000000..4eafef5 --- /dev/null +++ b/engine/events/checkforhiddenitems.asm @@ -0,0 +1,83 @@ +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 [wCurMapScriptBank], a +; Get the coordinate of the bottom right corner of the screen, and load it in wBottomRightYCoord/wBottomRightXCoord. + ld a, [wXCoord] + add SCREEN_WIDTH / 4 + ld [wBottomRightXCoord], a + ld a, [wYCoord] + add SCREEN_HEIGHT / 4 + ld [wBottomRightYCoord], a +; Get the pointer for the first bg_event in the map... + ld hl, wCurMapBGEventsPointer + ld a, [hli] + ld h, [hl] + ld l, a +; ... before even checking to see if there are any BG events on this map. + ld a, [wCurMapBGEventCount] + and a + jr z, .nobgeventitems +; For i = 1:wCurMapBGEventCount... +.loop +; Store the counter in wRemainingBGEventCount, and store the bg_event pointer in the stack. + ld [wRemainingBGEventCount], a + push hl +; Get the Y coordinate of the BG event. + call .GetFarByte + ld e, a +; Is the Y coordinate of the BG event on the screen? If not, go to the next BG event. + ld a, [wBottomRightYCoord] + sub e + jr c, .next + cp SCREEN_HEIGHT / 2 + jr nc, .next +; Is the X coordinate of the BG event on the screen? If not, go to the next BG event. + call .GetFarByte + ld d, a + ld a, [wBottomRightXCoord] + sub d + jr c, .next + cp SCREEN_WIDTH / 2 + jr nc, .next +; Is this BG event a hidden item? If not, go to the next BG event. + call .GetFarByte + cp BGEVENT_ITEM + jr nz, .next +; Has this item already been found? If not, set off the Itemfinder. + ld a, [wCurMapScriptBank] + call GetFarWord + ld a, [wCurMapScriptBank] + call GetFarWord + ld d, h + ld e, l + ld b, CHECK_FLAG + call EventFlagAction + ld a, c + and a + jr z, .itemnearby + +.next +; Restore the bg_event pointer and increment it by the length of a bg_event. + pop hl + ld bc, BG_EVENT_SIZE + add hl, bc +; Restore the BG event counter and decrement it. If it hits zero, there are no hidden items in range. + ld a, [wRemainingBGEventCount] + dec a + jr nz, .loop + +.nobgeventitems + xor a + ret + +.itemnearby + pop hl + scf + ret + +.GetFarByte: + ld a, [wCurMapScriptBank] + call GetFarByte + inc hl + ret diff --git a/engine/events/checksave.asm b/engine/events/checksave.asm new file mode 100644 index 0000000..7ce413d --- /dev/null +++ b/engine/events/checksave.asm @@ -0,0 +1,20 @@ +CheckSave:: + ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2) + call OpenSRAM + ld a, [sCheckValue1] + ld b, a + ld a, [sCheckValue2] + ld c, a + call CloseSRAM + ld a, b + cp SAVE_CHECK_VALUE_1 + jr nz, .ok + ld a, c + cp SAVE_CHECK_VALUE_2 + jr nz, .ok + ld c, $1 + ret + +.ok + ld c, $0 + ret diff --git a/engine/events/checktime.asm b/engine/events/checktime.asm new file mode 100644 index 0000000..6e470e8 --- /dev/null +++ b/engine/events/checktime.asm @@ -0,0 +1,19 @@ +CheckTime:: + ld a, [wTimeOfDay] + ld hl, .TimeOfDayTable + ld de, 2 + call IsInArray + inc hl + ld c, [hl] + ret c + + xor a + ld c, a + ret + +.TimeOfDayTable: + db MORN_F, MORN + db DAY_F, DAY + db NITE_F, NITE + db NITE_F, NITE + db -1 diff --git a/engine/events/daycare.asm b/engine/events/daycare.asm new file mode 100644 index 0000000..5815eab --- /dev/null +++ b/engine/events/daycare.asm @@ -0,0 +1,753 @@ +; PrintDayCareText.TextTable indexes + const_def + const DAYCARETEXT_MAN_INTRO + const DAYCARETEXT_MAN_INTRO_EGG + const DAYCARETEXT_LADY_INTRO + const DAYCARETEXT_LADY_INTRO_EGG + const DAYCARETEXT_WHICH_ONE + const DAYCARETEXT_DEPOSIT + const DAYCARETEXT_CANT_BREED_EGG + const DAYCARETEXT_LAST_MON + const DAYCARETEXT_LAST_ALIVE_MON + const DAYCARETEXT_COME_BACK_LATER + const DAYCARETEXT_REMOVE_MAIL + const DAYCARETEXT_GENIUSES + const DAYCARETEXT_ASK_WITHDRAW + const DAYCARETEXT_WITHDRAW + const DAYCARETEXT_GOT_BACK + const DAYCARETEXT_TOO_SOON + const DAYCARETEXT_PARTY_FULL + const DAYCARETEXT_NOT_ENOUGH_MONEY + const DAYCARETEXT_OH_FINE + const DAYCARETEXT_COME_AGAIN + +DayCareMan: + ld hl, wDayCareMan + bit DAYCAREMAN_HAS_MON_F, [hl] + jr nz, .AskWithdrawMon + ld hl, wDayCareMan + ld a, DAYCARETEXT_MAN_INTRO + call DayCareManIntroText + jr c, .cancel + call DayCareAskDepositPokemon + jr c, .print_text + farcall DepositMonWithDayCareMan + ld hl, wDayCareMan + set DAYCAREMAN_HAS_MON_F, [hl] + call DayCare_DepositPokemonText + call DayCare_InitBreeding + ret + +.AskWithdrawMon: + farcall GetBreedMon1LevelGrowth + ld hl, wBreedMon1Nickname + call GetPriceToRetrieveBreedmon + call DayCare_AskWithdrawBreedMon + jr c, .print_text + farcall RetrieveMonFromDayCareMan + call DayCare_GetBackMonForMoney + ld hl, wDayCareMan + res DAYCAREMAN_HAS_MON_F, [hl] + res DAYCAREMAN_MONS_COMPATIBLE_F, [hl] + jr .cancel + +.print_text + call PrintDayCareText + +.cancel + ld a, DAYCARETEXT_COME_AGAIN + call PrintDayCareText + ret + +DayCareLady: + ld hl, wDayCareLady + bit DAYCARELADY_HAS_MON_F, [hl] + jr nz, .AskWithdrawMon + ld hl, wDayCareLady + ld a, DAYCARETEXT_LADY_INTRO + call DayCareLadyIntroText + jr c, .cancel + call DayCareAskDepositPokemon + jr c, .print_text + farcall DepositMonWithDayCareLady + ld hl, wDayCareLady + set DAYCARELADY_HAS_MON_F, [hl] + call DayCare_DepositPokemonText + call DayCare_InitBreeding + ret + +.AskWithdrawMon: + farcall GetBreedMon2LevelGrowth + ld hl, wBreedMon2Nickname + call GetPriceToRetrieveBreedmon + call DayCare_AskWithdrawBreedMon + jr c, .print_text + farcall RetrieveMonFromDayCareLady + call DayCare_GetBackMonForMoney + ld hl, wDayCareLady + res DAYCARELADY_HAS_MON_F, [hl] + ld hl, wDayCareMan + res DAYCAREMAN_MONS_COMPATIBLE_F, [hl] + jr .cancel + +.print_text + call PrintDayCareText + +.cancel + ld a, DAYCARETEXT_COME_AGAIN + call PrintDayCareText + ret + +DayCareLadyIntroText: + bit DAYCARELADY_ACTIVE_F, [hl] + jr nz, .okay + set DAYCARELADY_ACTIVE_F, [hl] + inc a +.okay + call PrintDayCareText + call YesNoBox + ret + +DayCareManIntroText: + set DAYCAREMAN_ACTIVE_F, [hl] + call PrintDayCareText + call YesNoBox + ret + +DayCareAskDepositPokemon: + ld a, [wPartyCount] + cp 2 + jr c, .OnlyOneMon + ld a, DAYCARETEXT_WHICH_ONE + call PrintDayCareText + ld b, PARTYMENUACTION_GIVE_MON + farcall SelectTradeOrDayCareMon + jr c, .Declined + ld a, [wCurPartySpecies] + cp EGG + jr z, .Egg + farcall CheckCurPartyMonFainted + jr c, .OutOfUsableMons + ld hl, wPartyMon1Item + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld d, [hl] + farcall ItemIsMail + jr c, .HoldingMail + ld hl, wPartyMonNicknames + ld a, [wCurPartyMon] + call GetNickname + and a + ret + +.Declined: + ld a, DAYCARETEXT_OH_FINE + scf + ret + +.Egg: + ld a, DAYCARETEXT_CANT_BREED_EGG + scf + ret + +.OnlyOneMon: + ld a, DAYCARETEXT_LAST_MON + scf + ret + +.OutOfUsableMons: + ld a, DAYCARETEXT_LAST_ALIVE_MON + scf + ret + +.HoldingMail: + ld a, DAYCARETEXT_REMOVE_MAIL + scf + ret + +.DaycareDummyText: ; unreferenced + text_far _DaycareDummyText + text_end + +DayCare_DepositPokemonText: + ld a, DAYCARETEXT_DEPOSIT + call PrintDayCareText + ld a, [wCurPartySpecies] + call PlayMonCry + ld a, DAYCARETEXT_COME_BACK_LATER + call PrintDayCareText + ret + +DayCare_AskWithdrawBreedMon: + ld a, [wStringBuffer2 + 1] + and a + jr nz, .grew_at_least_one_level + ld a, DAYCARETEXT_TOO_SOON + call PrintDayCareText + call YesNoBox + jr c, .refused + jr .check_money + +.grew_at_least_one_level + ld a, DAYCARETEXT_GENIUSES + call PrintDayCareText + call YesNoBox + jr c, .refused + ld a, DAYCARETEXT_ASK_WITHDRAW + call PrintDayCareText + call YesNoBox + jr c, .refused + +.check_money + ld de, wMoney + ld bc, wStringBuffer2 + 2 + farcall CompareMoney + jr c, .not_enough_money + ld a, [wPartyCount] + cp PARTY_LENGTH + jr nc, .party_full + and a + ret + +.refused + ld a, DAYCARETEXT_OH_FINE + scf + ret + +.not_enough_money + ld a, DAYCARETEXT_NOT_ENOUGH_MONEY + scf + ret + +.party_full + ld a, DAYCARETEXT_PARTY_FULL + scf + ret + +DayCare_GetBackMonForMoney: + ld bc, wStringBuffer2 + 2 + ld de, wMoney + farcall TakeMoney + ld a, DAYCARETEXT_WITHDRAW + call PrintDayCareText + ld a, [wCurPartySpecies] + call PlayMonCry + ld a, DAYCARETEXT_GOT_BACK + call PrintDayCareText + ret + +GetPriceToRetrieveBreedmon: + ld a, b + ld [wStringBuffer2], a + ld a, d + ld [wStringBuffer2 + 1], a + ld de, wStringBuffer1 + ld bc, NAME_LENGTH + call CopyBytes + ld hl, 0 + ld bc, 100 + ld a, [wStringBuffer2 + 1] + call AddNTimes + ld de, 100 + add hl, de + xor a + ld [wStringBuffer2 + 2], a + ld a, h + ld [wStringBuffer2 + 3], a + ld a, l + ld [wStringBuffer2 + 4], a + ret + +PrintDayCareText: + ld e, a + ld d, 0 + ld hl, .TextTable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call PrintText + ret + +.TextTable: +; entries correspond to DAYCARETEXT_* constants + dw .DayCareManIntroText ; 00 + dw .DayCareManIntroEggText ; 01 + dw .DayCareLadyIntroText ; 02 + dw .DayCareLadyIntroEggText ; 03 + dw .WhatShouldIRaiseText ; 04 + dw .IllRaiseYourMonText ; 05 + dw .CantAcceptEggText ; 06 + dw .OnlyOneMonText ; 07 + dw .LastHealthyMonText ; 08 + dw .ComeBackLaterText ; 09 + dw .RemoveMailText ; 0a + dw .AreWeGeniusesText ; 0b + dw .YourMonHasGrownText ; 0c + dw .PerfectHeresYourMonText ; 0d + dw .GotBackMonText ; 0e + dw .BackAlreadyText ; 0f + dw .HaveNoRoomText ; 10 + dw .NotEnoughMoneyText ; 11 + dw .OhFineThenText ; 12 + dw .ComeAgainText ; 13 + +.DayCareManIntroText: + text_far _DayCareManIntroText + text_end + +.DayCareManIntroEggText: + text_far _DayCareManIntroEggText + text_end + +.DayCareLadyIntroText: + text_far _DayCareLadyIntroText + text_end + +.DayCareLadyIntroEggText: + text_far _DayCareLadyIntroEggText + text_end + +.WhatShouldIRaiseText: + text_far _WhatShouldIRaiseText + text_end + +.OnlyOneMonText: + text_far _OnlyOneMonText + text_end + +.CantAcceptEggText: + text_far _CantAcceptEggText + text_end + +.RemoveMailText: + text_far _RemoveMailText + text_end + +.LastHealthyMonText: + text_far _LastHealthyMonText + text_end + +.IllRaiseYourMonText: + text_far _IllRaiseYourMonText + text_end + +.ComeBackLaterText: + text_far _ComeBackLaterText + text_end + +.AreWeGeniusesText: + text_far _AreWeGeniusesText + text_end + +.YourMonHasGrownText: + text_far _YourMonHasGrownText + text_end + +.PerfectHeresYourMonText: + text_far _PerfectHeresYourMonText + text_end + +.GotBackMonText: + text_far _GotBackMonText + text_end + +.BackAlreadyText: + text_far _BackAlreadyText + text_end + +.HaveNoRoomText: + text_far _HaveNoRoomText + text_end + +.NotEnoughMoneyText: + text_far _NotEnoughMoneyText + text_end + +.OhFineThenText: + text_far _OhFineThenText + text_end + +.ComeAgainText: + text_far _ComeAgainText + text_end + +DayCareManOutside: + ld hl, wDayCareMan + bit DAYCAREMAN_HAS_EGG_F, [hl] + jr nz, .AskGiveEgg + ld hl, .NotYetText + call PrintText + ret + +.NotYetText: + text_far _NotYetText + text_end + +.AskGiveEgg: + ld hl, .FoundAnEggText + call PrintText + call YesNoBox + jr c, .Declined + ld a, [wPartyCount] + cp PARTY_LENGTH + jr nc, .PartyFull + call DayCare_GiveEgg + ld hl, wDayCareMan + res DAYCAREMAN_HAS_EGG_F, [hl] + call DayCare_InitBreeding + ld hl, .ReceivedEggText + call PrintText + ld de, SFX_GET_EGG + call PlaySFX + ld c, 120 + call DelayFrames + ld hl, .TakeGoodCareOfEggText + jr .Load0 + +.Declined: + ld hl, .IllKeepItThanksText + +.Load0: + call PrintText + xor a ; FALSE + ld [wScriptVar], a + ret + +.PartyFull: + ld hl, .NoRoomForEggText + call PrintText + ld a, TRUE + ld [wScriptVar], a + ret + +.FoundAnEggText: + text_far _FoundAnEggText + text_end + +.ReceivedEggText: + text_far _ReceivedEggText + text_end + +.TakeGoodCareOfEggText: + text_far _TakeGoodCareOfEggText + text_end + +.IllKeepItThanksText: + text_far _IllKeepItThanksText + text_end + +.NoRoomForEggText: + text_far _NoRoomForEggText + text_end + +DayCare_GiveEgg: + ld a, [wEggMonLevel] + ld [wCurPartyLevel], a + ld hl, wPartyCount + ld a, [hl] + cp PARTY_LENGTH + jr nc, .PartyFull + inc a + ld [hl], a + + ld c, a + ld b, 0 + add hl, bc + ld a, EGG + ld [hli], a + ld a, [wEggMonSpecies] + ld [wCurSpecies], a + ld [wCurPartySpecies], a + ld a, -1 + ld [hl], a + + ld hl, wPartyMonNicknames + ld bc, MON_NAME_LENGTH + call DayCare_GetCurrentPartyMember + ld hl, wEggMonNickname + call CopyBytes + + ld hl, wPartyMonOTs + ld bc, NAME_LENGTH + call DayCare_GetCurrentPartyMember + ld hl, wEggMonOT + call CopyBytes + + ld hl, wPartyMon1 + ld bc, PARTYMON_STRUCT_LENGTH + call DayCare_GetCurrentPartyMember + ld hl, wEggMon + ld bc, BOXMON_STRUCT_LENGTH + call CopyBytes + + call GetBaseData + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1 + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld b, h + ld c, l + ld hl, MON_ID + 1 + add hl, bc + push hl + ld hl, MON_MAXHP + add hl, bc + ld d, h + ld e, l + pop hl + push bc + ld b, FALSE + predef CalcMonStats + pop bc + ld hl, MON_HP + add hl, bc + xor a + ld [hli], a + ld [hl], a + and a + ret + +.PartyFull: + scf + ret + +DayCare_GetCurrentPartyMember: + ld a, [wPartyCount] + dec a + call AddNTimes + ld d, h + ld e, l + ret + +DayCare_InitBreeding: + ld a, [wDayCareLady] + bit DAYCARELADY_HAS_MON_F, a + ret z + ld a, [wDayCareMan] + bit DAYCAREMAN_HAS_MON_F, a + ret z + callfar CheckBreedmonCompatibility + ld a, [wBreedingCompatibility] + and a + ret z + inc a + ret z + ld hl, wDayCareMan + set DAYCAREMAN_MONS_COMPATIBLE_F, [hl] +.loop + call Random + cp 150 + jr c, .loop + ld [wStepsToEgg], a + jp .UselessJump + +.UselessJump: + xor a + ld hl, wEggMon + ld bc, BOXMON_STRUCT_LENGTH + call ByteFill + ld hl, wEggMonNickname + ld bc, MON_NAME_LENGTH + call ByteFill + ld hl, wEggMonOT + ld bc, NAME_LENGTH + call ByteFill + ld a, [wBreedMon1DVs] + ld [wTempMonDVs], a + ld a, [wBreedMon1DVs + 1] + ld [wTempMonDVs + 1], a + ld a, [wBreedMon1Species] + ld [wCurPartySpecies], a + ld a, TEMPMON + ld [wMonType], a + ld hl, DITTO + call GetPokemonIDFromIndex + ld c, a + ld a, [wBreedMon1Species] + cp c + ld a, $1 + jr z, .LoadWhichBreedmonIsTheMother + ld a, [wBreedMon2Species] + cp c + ld a, $0 + jr z, .LoadWhichBreedmonIsTheMother + farcall GetGender + ld a, $0 + jr z, .LoadWhichBreedmonIsTheMother + inc a + +.LoadWhichBreedmonIsTheMother: + ld [wBreedMotherOrNonDitto], a + and a + ld a, [wBreedMon1Species] + jr z, .GotMother + ld a, [wBreedMon2Species] + +.GotMother: + ld [wCurPartySpecies], a + callfar GetLowestEvolutionStage + ld a, EGG_LEVEL + ld [wCurPartyLevel], a + call Daycare_CheckAlternateOffspring + ld [wCurPartySpecies], a + ld [wCurSpecies], a + ld [wEggMonSpecies], a + + call GetBaseData + ld hl, wEggMonNickname + ld de, .String_EGG + call CopyName2 + ld hl, wPlayerName + ld de, wEggMonOT + ld bc, NAME_LENGTH + call CopyBytes + xor a + ld [wEggMonItem], a + ld de, wEggMonMoves + xor a ; FALSE + ld [wSkipMovesBeforeLevelUp], a + predef FillMoves + farcall InitEggMoves + ld hl, wEggMonID + ld a, [wPlayerID] + ld [hli], a + ld a, [wPlayerID + 1] + ld [hl], a + ld a, [wCurPartyLevel] + ld d, a + callfar CalcExpAtLevel + ld hl, wEggMonExp + ldh a, [hMultiplicand] + ld [hli], a + ldh a, [hMultiplicand + 1] + ld [hli], a + ldh a, [hMultiplicand + 2] + ld [hl], a + xor a + ld b, wEggMonDVs - wEggMonStatExp + ld hl, wEggMonStatExp +.loop2 + ld [hli], a + dec b + jr nz, .loop2 + ld hl, DITTO + call GetPokemonIDFromIndex + ld b, a + ld hl, wEggMonDVs + call Random + ld [hli], a + ld [wTempMonDVs], a + call Random + ld [hld], a + ld [wTempMonDVs + 1], a + ld de, wBreedMon1DVs + ld a, [wBreedMon1Species] + cp b + jr z, .GotDVs + ld de, wBreedMon2DVs + ld a, [wBreedMon2Species] + cp b + jr z, .GotDVs + ld a, TEMPMON + ld [wMonType], a + push hl + farcall GetGender + pop hl + ld de, wBreedMon1DVs + ld bc, wBreedMon2DVs + jr c, .SkipDVs + jr z, .ParentCheck2 + ld a, [wBreedMotherOrNonDitto] + and a + jr z, .GotDVs + ld d, b + ld e, c + jr .GotDVs + +.ParentCheck2: + ld a, [wBreedMotherOrNonDitto] + and a + jr nz, .GotDVs + ld d, b + ld e, c + +.GotDVs: + ld a, [de] + inc de + and $f + ld b, a + ld a, [hl] + and $f0 + add b + ld [hli], a + ld a, [de] + and $7 + ld b, a + ld a, [hl] + and $f8 + add b + ld [hl], a + +.SkipDVs: + ld hl, wStringBuffer1 + ld de, wMonOrItemNameBuffer + ld bc, NAME_LENGTH + call CopyBytes + ld hl, wEggMonMoves + ld de, wEggMonPP + predef FillPP + ld hl, wMonOrItemNameBuffer + ld de, wStringBuffer1 + ld bc, NAME_LENGTH + call CopyBytes + ld a, [wBaseEggSteps] + ld hl, wEggMonHappiness + ld [hli], a + xor a + ld [hli], a + ld [hli], a + ld [hl], a + ld a, [wCurPartyLevel] + ld [wEggMonLevel], a + ret + +.String_EGG: + db "EGG@" + +Daycare_CheckAlternateOffspring: + ; returns [wCurPartySpecies] in a, unless that species may give birth to an alternate species (e.g., gender variant) + ; if an alternate species is possible, it returns it 50% of the time + call Random + add a, a + ld a, [wCurPartySpecies] + ret nc + push hl + push de + push bc + call GetPokemonIndexFromID + ld b, h + ld c, l + ld de, 4 + ld hl, .alternate_offspring_table + call IsInWordArray + pop bc + pop de + ld a, [wCurPartySpecies] + jr nc, .done + inc hl + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex +.done + pop hl + ret + +.alternate_offspring_table + dw NIDORAN_F, NIDORAN_M + dw -1 diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm new file mode 100644 index 0000000..814c964 --- /dev/null +++ b/engine/events/diploma.asm @@ -0,0 +1,91 @@ +_Diploma: + call PlaceDiplomaOnScreen + call WaitPressAorB_BlinkCursor + ret + +PlaceDiplomaOnScreen: + call ClearBGPalettes + call ClearTilemap + call ClearSprites + call DisableLCD + ld hl, DiplomaGFX + ld de, vTiles2 + call Decompress + ld hl, DiplomaPage1Tilemap + decoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call CopyBytes + ld de, .Player + hlcoord 2, 5 + call PlaceString + ld de, .EmptyString + hlcoord 15, 5 + call PlaceString + ld de, wPlayerName + hlcoord 9, 5 + call PlaceString + ld de, .Certification + hlcoord 2, 8 + call PlaceString + call EnableLCD + call WaitBGMap + ld b, SCGB_DIPLOMA + call GetSGBLayout + call SetPalettes + call DelayFrame + ret + +.Player: + db "PLAYER@" + +.EmptyString: + db "@" + +.Certification: + db "This certifies" + next "that you have" + next "completed the" + next "new #DEX." + next "Congratulations!" + db "@" + +PrintDiplomaPage2: + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, " " + call ByteFill + ld hl, DiplomaPage2Tilemap + decoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call CopyBytes + ld de, .GameFreak + hlcoord 8, 0 + call PlaceString + ld de, .PlayTime + hlcoord 3, 15 + call PlaceString + hlcoord 12, 15 + ld de, wGameTimeHours + lb bc, 2, 4 + call PrintNum + ld [hl], $67 ; colon + inc hl + ld de, wGameTimeMinutes + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ret + +.PlayTime: db "PLAY TIME@" +.GameFreak: db "GAME FREAK@" + +DiplomaGFX: +INCBIN "gfx/diploma/diploma.2bpp.lz" + +DiplomaPage1Tilemap: +INCBIN "gfx/diploma/page1.tilemap" + +DiplomaPage2Tilemap: +INCBIN "gfx/diploma/page2.tilemap" + +Diploma_DummyFunction: ; unreferenced + ret diff --git a/engine/events/dratini.asm b/engine/events/dratini.asm new file mode 100644 index 0000000..c8a05b4 --- /dev/null +++ b/engine/events/dratini.asm @@ -0,0 +1,117 @@ +GiveDratini: +; if wScriptVar is 0 or 1, change the moveset of the last Dratini in the party. +; 0: give it a special moveset with Extremespeed. +; 1: give it the normal moveset of a level 15 Dratini. + + ld a, [wScriptVar] + cp $2 + ret nc + ld bc, wPartyCount + ld a, [bc] + ld hl, MON_SPECIES + call .GetNthPartyMon + ld a, [bc] + ld c, a + push hl + ld hl, DRATINI + call GetPokemonIDFromIndex + pop hl + ld b, a + ld de, PARTYMON_STRUCT_LENGTH +.CheckForDratini: +; start at the end of the party and search backwards for a Dratini + ld a, [hl] + cp b + jr z, .GiveMoveset + ld a, l + sub e + ld l, a + ld a, h + sbc d + ld h, a + dec c + jr nz, .CheckForDratini + ret + +.GiveMoveset: + push hl + ld a, [wScriptVar] + ld hl, .Movesets + ld bc, .Moveset1 - .Moveset0 + call AddNTimes + + ; get address of mon's first move + pop de + inc de + inc de + +.GiveMoves: + ld a, [hli] + or [hl] ; is the move 00? + ret z ; if so, we're done here + + push hl + push de + ld a, [hld] + ld l, [hl] + ld h, a + call GetMoveIDFromIndex + ld [de], a ; give the Pokémon the new move + + ; get the PP of the new move + ld l, a + ld a, MOVE_PP + call GetMoveAttribute + + ; get the address of the move's PP and update the PP + ld hl, MON_PP - MON_MOVES + add hl, de + ld [hl], a + + pop de + pop hl + inc de + inc hl + jr .GiveMoves + +.Movesets: +.Moveset0: +; Dratini does not normally learn Extremespeed. This is a special gift. + dw WRAP + dw THUNDER_WAVE + dw TWISTER + dw EXTREMESPEED + dw 0 +.Moveset1: +; This is the normal moveset of a level 15 Dratini + dw WRAP + dw LEER + dw THUNDER_WAVE + dw TWISTER + dw 0 + +.GetNthPartyMon: +; inputs: +; hl must be set to 0 before calling this function. +; a must be set to the number of Pokémon in the party. + +; outputs: +; returns the address of the last Pokémon in the party in hl. +; sets carry if a is 0. + + ld de, wPartyMon1 + add hl, de + and a + jr z, .EmptyParty + dec a + ret z + ld de, PARTYMON_STRUCT_LENGTH +.loop + add hl, de + dec a + jr nz, .loop + ret + +.EmptyParty: + scf + ret diff --git a/engine/events/elevator.asm b/engine/events/elevator.asm new file mode 100644 index 0000000..001122f --- /dev/null +++ b/engine/events/elevator.asm @@ -0,0 +1,216 @@ +Elevator:: + call .LoadPointer + call .FindCurrentFloor + jr c, .quit + ld [wElevatorOriginFloor], a + call Elevator_AskWhichFloor + jr c, .quit + ld hl, wElevatorOriginFloor + cp [hl] + jr z, .quit + call Elevator_GoToFloor + and a + ret + +.quit + scf + ret + +.LoadPointer: + ld a, b + ld [wElevatorPointerBank], a + ld a, e + ld [wElevatorPointer], a + ld a, d + ld [wElevatorPointer + 1], a + call .LoadFloors + ret + +.LoadFloors: + ld de, wCurElevatorCount + ld bc, wElevatorDataEnd - wElevatorData + ld hl, wElevatorPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wElevatorPointerBank] + call GetFarByte + inc hl + ld [de], a + inc de + assert wCurElevatorCount + 1 == wCurElevatorFloors +.loop + ld a, [wElevatorPointerBank] + call GetFarByte + ld [de], a + inc de + add hl, bc + cp -1 + jr nz, .loop + ret + +.FindCurrentFloor: + ld hl, wElevatorPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wElevatorPointerBank] + call GetFarByte + ld c, a + inc hl + ld a, [wBackupMapGroup] + ld d, a + ld a, [wBackupMapNumber] + ld e, a + ld b, 0 +.loop2 + ld a, [wElevatorPointerBank] + call GetFarByte + cp -1 + jr z, .fail + inc hl + inc hl + ld a, [wElevatorPointerBank] + call GetFarByte + inc hl + cp d + jr nz, .next1 + ld a, [wElevatorPointerBank] + call GetFarByte + inc hl + cp e + jr nz, .next2 + jr .done + +.next1 + inc hl +.next2 + inc b + jr .loop2 + +.done + xor a + ld a, b + ret + +.fail + scf + ret + +Elevator_GoToFloor: + push af + ld hl, wElevatorPointer + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + pop af + ld bc, wElevatorDataEnd - wElevatorData + call AddNTimes + inc hl + ld de, wBackupWarpNumber + ld a, [wElevatorPointerBank] + ld bc, wElevatorDataEnd - wElevatorData - 1 + call FarCopyBytes + ret + +Elevator_AskWhichFloor: + call LoadStandardMenuHeader + ld hl, AskFloorElevatorText + call PrintText + call Elevator_GetCurrentFloorText + ld hl, Elevator_MenuHeader + call CopyMenuHeader + call InitScrollingMenu + call UpdateSprites + xor a + ld [wMenuScrollPosition], a + call ScrollingMenu + call CloseWindow + ld a, [wMenuJoypad] + cp B_BUTTON + jr z, .cancel + xor a + ld a, [wScrollingMenuCursorPosition] + ret + +.cancel + scf + ret + +AskFloorElevatorText: + text_far _AskFloorElevatorText + text_end + +Elevator_GetCurrentFloorText: + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + hlcoord 0, 0 + ld b, 4 + ld c, 8 + call Textbox + hlcoord 1, 2 + ld de, Elevator_CurrentFloorText + call PlaceString + hlcoord 4, 4 + call Elevator_GetCurrentFloorString + pop af + ld [wOptions], a + ret + +Elevator_CurrentFloorText: + db "Now on:@" + +Elevator_GetCurrentFloorString: + push hl + ld a, [wElevatorOriginFloor] + ld e, a + ld d, 0 + ld hl, wCurElevatorFloors + add hl, de + ld a, [hl] + pop de + call GetFloorString + ret + +Elevator_MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 12, 1, 18, 9 + dw Elevator_MenuData + db 1 ; default option + +Elevator_MenuData: + db SCROLLINGMENU_DISPLAY_ARROWS ; flags + db 4, 0 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dbw 0, wCurElevatorCount + dba GetElevatorFloorStrings + dba NULL + dba NULL + +GetElevatorFloorStrings: + ld a, [wMenuSelection] +GetFloorString: + push de + call FloorToString + ld d, h + ld e, l + pop hl + jp PlaceString + +FloorToString: + push de + ld e, a + ld d, 0 + ld hl, ElevatorFloorNames + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + pop de + ret + +INCLUDE "data/events/elevator_floors.asm" diff --git a/engine/events/engine_flags.asm b/engine/events/engine_flags.asm new file mode 100644 index 0000000..13f9a9a --- /dev/null +++ b/engine/events/engine_flags.asm @@ -0,0 +1,83 @@ +EngineFlagAction:: +; Do action b on engine flag de +; +; b = 0: reset flag +; = 1: set flag +; > 1: check flag, result in c +; +; Setting/resetting does not return a result. + +; 16-bit flag ids are considered invalid, but it's nice +; to know that the infrastructure is there. + + ld a, d + cp HIGH(NUM_ENGINE_FLAGS) + jr z, .ceiling + jr c, .read ; cp 0 can't set carry! + jr .invalid + +; There are only NUM_ENGINE_FLAGS engine flags, so +; anything beyond that is invalid too. + +.ceiling + ld a, e + cp LOW(NUM_ENGINE_FLAGS) + jr c, .read + +; Invalid flags are treated as flag 00. + +.invalid + xor a + ld e, a + ld d, a + +; Get this flag's location. + +.read + ld hl, EngineFlags +; location + add hl, de + add hl, de +; bit + add hl, de + +; location + ld e, [hl] + inc hl + ld d, [hl] + inc hl +; bit + ld c, [hl] + +; What are we doing with this flag? + + ld a, b + cp 1 + jr c, .reset ; b = 0 + jr z, .set ; b = 1 + +; Return the given flag in c. +; check + ld a, [de] + and c + ld c, a + ret + +; Set the given flag. +.set + ld a, [de] + or c + ld [de], a + ret + +; Reset the given flag. +.reset + ld a, c + cpl ; AND all bits except the one in question + ld c, a + ld a, [de] + and c + ld [de], a + ret + +INCLUDE "data/events/engine_flags.asm" diff --git a/engine/events/field_moves.asm b/engine/events/field_moves.asm new file mode 100644 index 0000000..addefb8 --- /dev/null +++ b/engine/events/field_moves.asm @@ -0,0 +1,445 @@ +DEF FIELDMOVE_GRASS EQU $80 +DEF FIELDMOVE_TREE EQU $84 +DEF FIELDMOVE_FLY EQU $84 + +PlayWhirlpoolSound: + call WaitSFX + ld de, SFX_SURF + call PlaySFX + call WaitSFX + ret + +BlindingFlash: + farcall FadeOutPalettes + ld hl, wStatusFlags + set STATUSFLAGS_FLASH_F, [hl] + farcall ReplaceTimeOfDayPals + farcall UpdateTimeOfDayPal + ld b, SCGB_MAPPALS + call GetSGBLayout + farcall LoadOW_BGPal7 + farcall FadeInPalettes + ret + +ShakeHeadbuttTree: + farcall ClearSpriteAnims + ld de, CutGrassGFX + ld hl, vTiles0 tile FIELDMOVE_GRASS + lb bc, BANK(CutGrassGFX), 4 + call Request2bpp + ld de, HeadbuttTreeGFX + ld hl, vTiles0 tile FIELDMOVE_TREE + lb bc, BANK(HeadbuttTreeGFX), 8 + call Request2bpp + call Cut_Headbutt_GetPixelFacing + ld a, SPRITE_ANIM_INDEX_HEADBUTT + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], FIELDMOVE_TREE + ld a, 36 * SPRITEOAMSTRUCT_LENGTH + ld [wCurSpriteOAMAddr], a + farcall DoNextFrameForAllSprites + call HideHeadbuttTree + ld a, 32 + ld [wFrameCounter], a + call WaitSFX + ld de, SFX_SANDSTORM + call PlaySFX +.loop + ld hl, wFrameCounter + ld a, [hl] + and a + jr z, .done + dec [hl] + ld a, 36 * SPRITEOAMSTRUCT_LENGTH + ld [wCurSpriteOAMAddr], a + farcall DoNextFrameForAllSprites + call DelayFrame + jr .loop + +.done + call OverworldTextModeSwitch + call WaitBGMap + xor a + ldh [hBGMapMode], a + farcall ClearSpriteAnims + ld hl, wShadowOAMSprite36 + ld bc, wShadowOAMEnd - wShadowOAMSprite36 + xor a + call ByteFill + ld de, Font + ld hl, vTiles1 + lb bc, BANK(Font), 12 + call Get1bpp + call UpdatePlayerSprite + ret + +HeadbuttTreeGFX: +INCBIN "gfx/overworld/headbutt_tree.2bpp" + +HideHeadbuttTree: + xor a + ldh [hBGMapMode], a + ld a, [wPlayerDirection] + and %00001100 + srl a + ld e, a + ld d, 0 + ld hl, TreeRelativeLocationTable + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + + ld a, $05 ; grass block + ld [hli], a + ld [hld], a + ld bc, SCREEN_WIDTH + add hl, bc + ld [hli], a + ld [hld], a + call WaitBGMap + xor a + ldh [hBGMapMode], a + ret + +TreeRelativeLocationTable: + dwcoord 8, 8 + 2 ; RIGHT + dwcoord 8, 8 - 2 ; LEFT + dwcoord 8 - 2, 8 ; DOWN + dwcoord 8 + 2, 8 ; UP + +OWCutAnimation: + ; Animation index in e + ; 0: Split tree in half + ; 1: Mow the lawn + ld a, e + and 1 + ld [wJumptableIndex], a + call .LoadCutGFX + call WaitSFX + ld de, SFX_PLACE_PUZZLE_PIECE_DOWN + call PlaySFX +.loop + ld a, [wJumptableIndex] + bit 7, a + jr nz, .finish + ld a, 36 * SPRITEOAMSTRUCT_LENGTH + ld [wCurSpriteOAMAddr], a + callfar DoNextFrameForAllSprites + call OWCutJumptable + call DelayFrame + jr .loop + +.finish + ret + +.LoadCutGFX: + callfar ClearSpriteAnims ; pointless to farcall + ld de, CutGrassGFX + ld hl, vTiles0 tile FIELDMOVE_GRASS + lb bc, BANK(CutGrassGFX), 4 + call Request2bpp + ld de, CutTreeGFX + ld hl, vTiles0 tile FIELDMOVE_TREE + lb bc, BANK(CutTreeGFX), 4 + call Request2bpp + ret + +CutTreeGFX: +INCBIN "gfx/overworld/cut_tree.2bpp" + +CutGrassGFX: +INCBIN "gfx/overworld/cut_grass.2bpp" + +OWCutJumptable: + jumptable .dw, wJumptableIndex + +.dw + dw Cut_SpawnAnimateTree + dw Cut_SpawnAnimateLeaves + dw Cut_StartWaiting + dw Cut_WaitAnimSFX + +Cut_SpawnAnimateTree: + call Cut_Headbutt_GetPixelFacing + ld a, SPRITE_ANIM_INDEX_CUT_TREE ; cut tree + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], FIELDMOVE_TREE + ld a, 32 + ld [wFrameCounter], a +; Cut_StartWaiting + ld hl, wJumptableIndex + inc [hl] + inc [hl] + ret + +Cut_SpawnAnimateLeaves: + call Cut_GetLeafSpawnCoords + xor a + call Cut_SpawnLeaf + ld a, $10 + call Cut_SpawnLeaf + ld a, $20 + call Cut_SpawnLeaf + ld a, $30 + call Cut_SpawnLeaf + ld a, 32 ; frames + ld [wFrameCounter], a +; Cut_StartWaiting + ld hl, wJumptableIndex + inc [hl] + ret + +Cut_StartWaiting: + ld a, 1 + ldh [hBGMapMode], a +; Cut_WaitAnimSFX + ld hl, wJumptableIndex + inc [hl] + +Cut_WaitAnimSFX: + ld hl, wFrameCounter + ld a, [hl] + and a + jr z, .finished + dec [hl] + ret + +.finished + ld hl, wJumptableIndex + set 7, [hl] + ret + +Cut_SpawnLeaf: + push de + push af + ld a, SPRITE_ANIM_INDEX_LEAF ; leaf + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], FIELDMOVE_GRASS + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + ld [hl], $4 + pop af + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + pop de + ret + +Cut_GetLeafSpawnCoords: + ld de, 0 + ld a, [wPlayerMetatileX] + bit 0, a + jr z, .left_side + set 0, e +.left_side + ld a, [wPlayerMetatileY] + bit 0, a + jr z, .top_side + set 1, e +.top_side + ld a, [wPlayerDirection] + and %00001100 + add e + ld e, a + ld hl, .Coords + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + ret + +.Coords: + dbpixel 11, 12 ; facing down, top left + dbpixel 9, 12 ; facing down, top right + dbpixel 11, 14 ; facing down, bottom left + dbpixel 9, 14 ; facing down, bottom right + + dbpixel 11, 8 ; facing up, top left + dbpixel 9, 8 ; facing up, top right + dbpixel 11, 10 ; facing up, bottom left + dbpixel 9, 10 ; facing up, bottom right + + dbpixel 7, 12 ; facing left, top left + dbpixel 9, 12 ; facing left, top right + dbpixel 7, 10 ; facing left, bottom left + dbpixel 9, 10 ; facing left, bottom right + + dbpixel 11, 12 ; facing right, top left + dbpixel 13, 12 ; facing right, top right + dbpixel 11, 10 ; facing right, bottom left + dbpixel 13, 10 ; facing right, bottom right + +Cut_Headbutt_GetPixelFacing: + ld a, [wPlayerDirection] + and %00001100 + srl a + ld e, a + ld d, 0 + ld hl, .Coords + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + ret + +.Coords: + dbpixel 10, 13 + dbpixel 10, 9 + dbpixel 8, 11 + dbpixel 12, 11 + +FlyFromAnim: + call DelayFrame + ld a, [wVramState] + push af + xor a + ld [wVramState], a + call FlyFunction_InitGFX + depixel 10, 10, 4, 0 + ld a, SPRITE_ANIM_INDEX_RED_WALK + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], FIELDMOVE_FLY + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld [hl], SPRITE_ANIM_SEQ_FLY_FROM + ld a, 128 + ld [wFrameCounter], a +.loop + ld a, [wJumptableIndex] + bit 7, a + jr nz, .exit + ld a, 0 * SPRITEOAMSTRUCT_LENGTH + ld [wCurSpriteOAMAddr], a + callfar DoNextFrameForAllSprites + call FlyFunction_FrameTimer + call DelayFrame + jr .loop + +.exit + pop af + ld [wVramState], a + ret + +FlyToAnim: + call DelayFrame + ld a, [wVramState] + push af + xor a + ld [wVramState], a + call FlyFunction_InitGFX + depixel 31, 10, 4, 0 + ld a, SPRITE_ANIM_INDEX_RED_WALK + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], FIELDMOVE_FLY + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld [hl], SPRITE_ANIM_SEQ_FLY_TO + ld hl, SPRITEANIMSTRUCT_VAR4 + add hl, bc + ld [hl], 11 * 8 + ld a, 64 + ld [wFrameCounter], a +.loop + ld a, [wJumptableIndex] + bit 7, a + jr nz, .exit + ld a, 0 * SPRITEOAMSTRUCT_LENGTH + ld [wCurSpriteOAMAddr], a + callfar DoNextFrameForAllSprites + call FlyFunction_FrameTimer + call DelayFrame + jr .loop + +.exit + pop af + ld [wVramState], a + call .RestorePlayerSprite_DespawnLeaves + ret + +.RestorePlayerSprite_DespawnLeaves: + ld hl, wShadowOAMSprite00TileID + xor a + ld c, 4 +.OAMloop + ld [hli], a ; tile id +rept SPRITEOAMSTRUCT_LENGTH - 1 + inc hl +endr + inc a + dec c + jr nz, .OAMloop + ld hl, wShadowOAMSprite04 + ld bc, wShadowOAMEnd - wShadowOAMSprite04 + xor a + call ByteFill + ret + +FlyFunction_InitGFX: + callfar ClearSpriteAnims + ld de, CutGrassGFX + ld hl, vTiles0 tile FIELDMOVE_GRASS + lb bc, BANK(CutGrassGFX), 4 + call Request2bpp + ld a, [wCurPartyMon] + ld hl, wPartySpecies + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + ld [wTempIconSpecies], a + ld e, FIELDMOVE_FLY + farcall FlyFunction_GetMonIcon + xor a + ld [wJumptableIndex], a + ret + +FlyFunction_FrameTimer: + call .SpawnLeaf + ld hl, wFrameCounter + ld a, [hl] + and a + jr z, .exit + dec [hl] + cp $40 + ret c + and $7 + ret nz + ld de, SFX_FLY + call PlaySFX + ret + +.exit + ld hl, wJumptableIndex + set 7, [hl] + ret + +.SpawnLeaf: + ld hl, wFrameCounter2 + ld a, [hl] + inc [hl] + and $7 + ret nz + ld a, [hl] + and (6 * 8) >> 1 + sla a + add 8 * 8 ; gives a number in [$40, $50, $60, $70] + ld d, a + ld e, 0 + ld a, SPRITE_ANIM_INDEX_FLY_LEAF + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], FIELDMOVE_GRASS + ret diff --git a/engine/events/fish.asm b/engine/events/fish.asm new file mode 100644 index 0000000..5776067 --- /dev/null +++ b/engine/events/fish.asm @@ -0,0 +1,120 @@ +Fish: +; Using a fishing rod. +; Fish for monsters with rod e in encounter group d. +; Return monster d at level e. + + push af + push bc + push hl + + ld b, e + call GetFishGroupIndex + + ld hl, FishGroups +rept FISHGROUP_DATA_LENGTH + add hl, de +endr + call .Fish + + pop hl + pop bc + pop af + ret + +.Fish: +; Fish for monsters with rod b from encounter data in FishGroup at hl. +; Return monster d at level e. + + call Random + cp [hl] + ld de, 0 + ret nc + + ; Get encounter data by rod: + ; 0: Old + ; 1: Good + ; 2: Super + inc hl + ld e, b + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + + ; Compare the encounter chance to select a Pokemon. + call Random +.loop + cp [hl] + jr z, .ok + jr c, .ok + inc hl + inc hl + inc hl + inc hl + jr .loop +.ok + inc hl + +.load + ld a, [hli] + ld e, a + ld a, [hli] + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + ld d, a + and a + ret nz + + ; Species 0 reads from a time-based encounter table. + ; The level byte is repurposed as the index for the new table. + ld hl, TimeFishGroups +rept 6 + add hl, de +endr + + ld a, [wTimeOfDay] + maskbits NUM_DAYTIMES + cp NITE_F + jr c, .load + inc hl + inc hl + jr .ok + +GetFishGroupIndex: +; Return the index of fishgroup d in de. + + push hl + ld hl, wDailyFlags1 + bit DAILYFLAGS1_FISH_SWARM_F, [hl] + pop hl + jr z, .done + + ld a, d + cp FISHGROUP_QWILFISH + jr z, .qwilfish + cp FISHGROUP_REMORAID + jr z, .remoraid + +.done + dec d + ld e, d + ld d, 0 + ret + +.qwilfish + ld a, [wFishingSwarmFlag] + cp FISHSWARM_QWILFISH + jr nz, .done + ld d, FISHGROUP_QWILFISH_SWARM + jr .done + +.remoraid + ld a, [wFishingSwarmFlag] + cp FISHSWARM_REMORAID + jr nz, .done + ld d, FISHGROUP_REMORAID_SWARM + jr .done + +INCLUDE "data/wild/fish.asm" diff --git a/engine/events/fishing_gfx.asm b/engine/events/fishing_gfx.asm new file mode 100644 index 0000000..e8878b6 --- /dev/null +++ b/engine/events/fishing_gfx.asm @@ -0,0 +1,42 @@ +LoadFishingGFX: + ldh a, [rVBK] + push af + ld a, $1 + ldh [rVBK], a + + ld de, FishingGFX + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_gender + ld de, KrisFishingGFX +.got_gender + + ld hl, vTiles0 tile $02 + call .LoadGFX + ld hl, vTiles0 tile $06 + call .LoadGFX + ld hl, vTiles0 tile $0a + call .LoadGFX + ld hl, vTiles0 tile $fc + call .LoadGFX + + pop af + ldh [rVBK], a + ret + +.LoadGFX: + lb bc, BANK(FishingGFX), 2 + push de + call Get2bpp + pop de + ld hl, 2 tiles + add hl, de + ld d, h + ld e, l + ret + +FishingGFX: +INCBIN "gfx/overworld/chris_fish.2bpp" + +KrisFishingGFX: +INCBIN "gfx/overworld/kris_fish.2bpp" diff --git a/engine/events/forced_movement.asm b/engine/events/forced_movement.asm new file mode 100644 index 0000000..fcd2793 --- /dev/null +++ b/engine/events/forced_movement.asm @@ -0,0 +1,51 @@ +Script_ForcedMovement:: + readvar VAR_FACING + ifequal DOWN, .down + ifequal UP, .up + ifequal LEFT, .left + ifequal RIGHT, .right + end + +.up + applymovement PLAYER, .MovementData_up + end + +.down + applymovement PLAYER, .MovementData_down + end + +.right + applymovement PLAYER, .MovementData_right + end + +.left + applymovement PLAYER, .MovementData_left + end + +.MovementData_up: + step_dig 16 + turn_in DOWN + step_dig 16 + turn_head DOWN + step_end + +.MovementData_down: + step_dig 16 + turn_in UP + step_dig 16 + turn_head UP + step_end + +.MovementData_right: + step_dig 16 + turn_in LEFT + step_dig 16 + turn_head LEFT + step_end + +.MovementData_left: + step_dig 16 + turn_in RIGHT + step_dig 16 + turn_head RIGHT + step_end diff --git a/engine/events/fruit_trees.asm b/engine/events/fruit_trees.asm new file mode 100644 index 0000000..ea0d0f4 --- /dev/null +++ b/engine/events/fruit_trees.asm @@ -0,0 +1,117 @@ +FruitTreeScript:: + callasm GetCurTreeFruit + opentext + readmem wCurFruit + getitemname STRING_BUFFER_3, USE_SCRIPT_VAR + writetext FruitBearingTreeText + promptbutton + callasm TryResetFruitTrees + callasm CheckFruitTree + iffalse .fruit + writetext NothingHereText + waitbutton + sjump .end + +.fruit + writetext HeyItsFruitText + readmem wCurFruit + giveitem ITEM_FROM_MEM + iffalse .packisfull + promptbutton + writetext ObtainedFruitText + callasm PickedFruitTree + specialsound + itemnotify + sjump .end + +.packisfull + promptbutton + writetext FruitPackIsFullText + waitbutton + +.end + closetext + end + +GetCurTreeFruit: + ld a, [wCurFruitTree] + dec a + call GetFruitTreeItem + ld [wCurFruit], a + ret + +TryResetFruitTrees: + ld hl, wDailyFlags1 + bit DAILYFLAGS1_ALL_FRUIT_TREES_F, [hl] + ret nz + jp ResetFruitTrees + +CheckFruitTree: + ld b, 2 + call GetFruitTreeFlag + ld a, c + ld [wScriptVar], a + ret + +PickedFruitTree: + farcall StubbedTrainerRankings_FruitPicked + ld b, 1 + jp GetFruitTreeFlag + +ResetFruitTrees: + xor a + ld hl, wFruitTreeFlags +rept (NUM_FRUIT_TREES + 7) / 8 - 1 + ld [hli], a +endr + ld [hl], a + ld hl, wDailyFlags1 + set DAILYFLAGS1_ALL_FRUIT_TREES_F, [hl] + ret + +GetFruitTreeFlag: + push hl + push de + ld a, [wCurFruitTree] + dec a + ld e, a + ld d, 0 + ld hl, wFruitTreeFlags + call FlagAction + pop de + pop hl + ret + +GetFruitTreeItem: + push hl + push de + ld e, a + ld d, 0 + ld hl, FruitTreeItems + add hl, de + ld a, [hl] + pop de + pop hl + ret + +INCLUDE "data/items/fruit_trees.asm" + +FruitBearingTreeText: + text_far _FruitBearingTreeText + text_end + +HeyItsFruitText: + text_far _HeyItsFruitText + text_end + +ObtainedFruitText: + text_far _ObtainedFruitText + text_end + +FruitPackIsFullText: + text_far _FruitPackIsFullText + text_end + +NothingHereText: + text_far _NothingHereText + text_end diff --git a/engine/events/haircut.asm b/engine/events/haircut.asm new file mode 100644 index 0000000..ab1635b --- /dev/null +++ b/engine/events/haircut.asm @@ -0,0 +1,75 @@ +BillsGrandfather: + farcall SelectMonFromParty + jr c, .cancel + ld a, [wCurPartySpecies] + ld [wScriptVar], a + ld [wNamedObjectIndex], a + call GetPokemonName + jp CopyPokemonName_Buffer1_Buffer3 + +.cancel + xor a + ld [wScriptVar], a + ret + +OlderHaircutBrother: + ld hl, HappinessData_OlderHaircutBrother + jr HaircutOrGrooming + +YoungerHaircutBrother: + ld hl, HappinessData_YoungerHaircutBrother + jr HaircutOrGrooming + +DaisysGrooming: + ld hl, HappinessData_DaisysGrooming + ; fallthrough + +HaircutOrGrooming: + push hl + farcall SelectMonFromParty + pop hl + jr c, .nope + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + push hl + call GetCurNickname + call CopyPokemonName_Buffer1_Buffer3 + pop hl + call Random +.loop + sub [hl] + jr c, .ok + inc hl + inc hl + inc hl + jr .loop + +.ok + inc hl + ld a, [hli] + ld [wScriptVar], a + ld c, [hl] + call ChangeHappiness + ret + +.nope + xor a + ld [wScriptVar], a + ret + +.egg + ld a, 1 + ld [wScriptVar], a + ret + +INCLUDE "data/events/happiness_probabilities.asm" + +CopyPokemonName_Buffer1_Buffer3: + ld hl, wStringBuffer1 + ld de, wStringBuffer3 + ld bc, MON_NAME_LENGTH + jp CopyBytes + +DummyPredef1: + ret diff --git a/engine/events/halloffame.asm b/engine/events/halloffame.asm new file mode 100644 index 0000000..1044d37 --- /dev/null +++ b/engine/events/halloffame.asm @@ -0,0 +1,635 @@ +DEF HALLOFFAME_COLON EQU $63 + +HallOfFame:: + call HallOfFame_FadeOutMusic + ld a, [wStatusFlags] + push af + ld a, 1 + ld [wGameLogicPaused], a + call DisableSpriteUpdates + ld a, SPAWN_LANCE + ld [wSpawnAfterChampion], a + + ; Enable the Pokégear map to cycle through all of Kanto + ld hl, wStatusFlags + set STATUSFLAGS_HALL_OF_FAME_F, [hl] + + farcall HallOfFame_InitSaveIfNeeded + + ld hl, wHallOfFameCount + ld a, [hl] + cp HOF_MASTER_COUNT + jr nc, .ok + inc [hl] +.ok + farcall SaveGameData + call GetHallOfFameParty + farcall AddHallOfFameEntry + + xor a + ld [wGameLogicPaused], a + call AnimateHallOfFame + pop af + ld b, a + farcall Credits + ret + +RedCredits:: + ld a, LOW(MUSIC_NONE) + ld [wMusicFadeID], a + ld a, HIGH(MUSIC_NONE) + ld [wMusicFadeID + 1], a + ld a, 10 + ld [wMusicFade], a + farcall FadeOutPalettes + xor a + ld [wVramState], a + ldh [hMapAnims], a + farcall InitDisplayForRedCredits + ld c, 8 + call DelayFrames + call DisableSpriteUpdates + ld a, SPAWN_RED + ld [wSpawnAfterChampion], a + ld a, [wStatusFlags] + ld b, a + farcall Credits + ret + +HallOfFame_FadeOutMusic: + ld a, LOW(MUSIC_NONE) + ld [wMusicFadeID], a + ld a, HIGH(MUSIC_NONE) + ld [wMusicFadeID + 1], a + ld a, 10 + ld [wMusicFade], a + farcall FadeOutPalettes + xor a + ld [wVramState], a + ldh [hMapAnims], a + farcall InitDisplayForHallOfFame + ret + +HallOfFame_PlayMusicDE: + push de + ld de, MUSIC_NONE + call PlayMusic + call DelayFrame + pop de + call PlayMusic + ret + +AnimateHallOfFame: + xor a + ld [wJumptableIndex], a + call LoadHOFTeam + jr c, .done + ld de, MUSIC_HALL_OF_FAME + call HallOfFame_PlayMusicDE + xor a + ld [wHallOfFameMonCounter], a +.loop + ld a, [wHallOfFameMonCounter] + cp PARTY_LENGTH + jr nc, .done + ld hl, wHallOfFameTempMon1 + 1 + ld bc, wHallOfFameTempMon1End - wHallOfFameTempMon1 + call AddNTimes + ld a, [hld] + and [hl] + inc a + jr z, .done + push hl + call AnimateHOFMonEntrance + pop hl + call .DisplayNewHallOfFamer + jr c, .done + ld hl, wHallOfFameMonCounter + inc [hl] + jr .loop + +.done + call HOF_AnimatePlayerPic + ld a, $4 + ld [wMusicFade], a + call RotateThreePalettesRight + ld c, 8 + call DelayFrames + ret + +.DisplayNewHallOfFamer: + call DisplayHOFMon + ld de, .String_NewHallOfFamer + hlcoord 1, 2 + call PlaceString + call WaitBGMap + decoord 6, 5 + ld c, ANIM_MON_HOF + predef HOF_AnimateFrontpic + ld c, 60 + call DelayFrames + and a + ret + +.String_NewHallOfFamer: + db "New Hall of Famer!@" + +GetHallOfFameParty: + ld hl, wHallOfFamePokemonList + ld bc, HOF_LENGTH + xor a + call ByteFill + ld a, [wHallOfFameCount] + ld de, wHallOfFamePokemonList + ld [de], a + inc de + ld hl, wPartySpecies + ld c, 0 +.next + ld a, [hli] + cp -1 + jr z, .done + cp EGG + jr nz, .mon + inc c + jr .next + +.mon + push hl + push de + push bc + + ld a, c + ld hl, wPartyMons + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld c, l + ld b, h + + ld hl, MON_SPECIES + add hl, bc + ld a, [hl] + call GetPokemonIndexFromID + ld a, l + ld [de], a + inc de + ld a, h + ld [de], a + inc de + + ld hl, MON_ID + add hl, bc + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + inc de + + ld hl, MON_DVS + add hl, bc + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + inc de + + ld hl, MON_LEVEL + add hl, bc + ld a, [hl] + ld [de], a + inc de + + pop bc + push bc + ld a, c + ld hl, wPartyMonNicknames + ld bc, MON_NAME_LENGTH + call AddNTimes + ld bc, MON_NAME_LENGTH - 1 + call CopyBytes + + pop bc + inc c + pop de + ld hl, wHallOfFamePokemonListMon1End - wHallOfFamePokemonListMon1 + add hl, de + ld e, l + ld d, h + pop hl + jr .next + +.done + ld a, -1 + ld [de], a + inc de + ld [de], a + ret + +AnimateHOFMonEntrance: + push hl + call ClearBGPalettes + farcall ResetDisplayBetweenHallOfFameMons + pop hl + ld a, [hli] + push hl + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + pop hl + inc hl + ld [wTempMonSpecies], a + ld [wCurPartySpecies], a + inc hl + inc hl + ld a, [hli] + ld [wTempMonDVs], a + ld a, [hli] + ld [wTempMonDVs + 1], a + ld hl, wTempMonDVs + predef GetUnownLetter + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, " " + call ByteFill + ld de, vTiles2 tile $31 + predef GetMonBackpic + ld a, $31 + ldh [hGraphicStartTile], a + hlcoord 6, 6 + lb bc, 6, 6 + predef PlaceGraphic + ld a, $d0 + ldh [hSCY], a + ld a, $90 + ldh [hSCX], a + call WaitBGMap + xor a + ldh [hBGMapMode], a + ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + call SetPalettes + call HOF_SlideBackpic + xor a + ld [wBoxAlignment], a + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, " " + call ByteFill + hlcoord 6, 5 + call _PrepMonFrontpic + call WaitBGMap + xor a + ldh [hBGMapMode], a + ldh [hSCY], a + call HOF_SlideFrontpic + ret + +HOF_SlideBackpic: +.backpicloop + ldh a, [hSCX] + cp $70 + ret z + add 4 + ldh [hSCX], a + call DelayFrame + jr .backpicloop + +HOF_SlideFrontpic: +.frontpicloop + ldh a, [hSCX] + and a + ret z + dec a + dec a + ldh [hSCX], a + call DelayFrame + jr .frontpicloop + +_HallOfFamePC: + call LoadFontsBattleExtra + xor a + ld [wJumptableIndex], a +.MasterLoop: + call LoadHOFTeam + ret c + call .DisplayTeam + ret c + ld hl, wJumptableIndex + inc [hl] + jr .MasterLoop + +.DisplayTeam: + xor a + ld [wHallOfFameMonCounter], a +.next + call .DisplayMonAndStrings + jr c, .start_button +.loop + call JoyTextDelay + ld hl, hJoyLast + ld a, [hl] + and B_BUTTON + jr nz, .b_button + ld a, [hl] + and A_BUTTON + jr nz, .a_button + ld a, [hl] + and START + jr nz, .start_button + call DelayFrame + jr .loop + +.a_button + ld hl, wHallOfFameMonCounter + inc [hl] + jr .next + +.b_button + scf + ret + +.start_button + and a + ret + +.DisplayMonAndStrings: +; Print the number of times the player has entered the Hall of Fame. +; If that number is at least HOF_MASTER_COUNT, print "HOF Master!" instead. + ld a, [wHallOfFameMonCounter] + cp PARTY_LENGTH + jr nc, .fail + ld hl, wHallOfFameTempMon1 + 1 + ld bc, wHallOfFameTempMon1End - wHallOfFameTempMon1 + call AddNTimes + ld a, [hld] + and [hl] + inc a + jr nz, .okay + +.fail + scf + ret + +.okay + push hl + call ClearBGPalettes + pop hl + call DisplayHOFMon +; BUG: A "HOF Master!" title for 200-Time Famers is defined but inaccessible (see docs/bugs_and_glitches.md) + ld a, [wHallOfFameTempWinCount] + cp HOF_MASTER_COUNT + 1 + jr c, .print_num_hof + ld de, .HOFMaster + hlcoord 1, 2 + call PlaceString + hlcoord 13, 2 + jr .finish + +.print_num_hof + ld de, .TimeFamer + hlcoord 1, 2 + call PlaceString + hlcoord 2, 2 + ld de, wHallOfFameTempWinCount + lb bc, 1, 3 + call PrintNum + hlcoord 11, 2 + +.finish + ld de, .EmptyString + call PlaceString + call WaitBGMap + ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + call SetPalettes + decoord 6, 5 + ld c, ANIM_MON_HOF + predef HOF_AnimateFrontpic + and a + ret + +.EmptyString: + db "@" + +.HOFMaster: + db " HOF Master!@" + +.TimeFamer: + db " -Time Famer@" + +LoadHOFTeam: + ld a, [wJumptableIndex] + cp NUM_HOF_TEAMS + jr nc, .invalid + ld hl, sHallOfFame + ld bc, HOF_LENGTH + call AddNTimes + ld a, BANK(sHallOfFame) + call OpenSRAM + ld a, [hl] + and a + jr z, .absent + ld de, wHallOfFameTemp + ld bc, HOF_LENGTH + call CopyBytes + call CloseSRAM + and a + ret + +.absent + call CloseSRAM + +.invalid + scf + ret + +DisplayHOFMon: + xor a + ldh [hBGMapMode], a + ld a, [hli] + push hl + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + pop hl + inc hl + ld [wTempMonSpecies], a + ld a, [hli] + ld [wTempMonID], a + ld a, [hli] + ld [wTempMonID + 1], a + ld a, [hli] + ld [wTempMonDVs], a + ld a, [hli] + ld [wTempMonDVs + 1], a + ld a, [hli] + ld [wTempMonLevel], a + ld de, wStringBuffer2 + ld bc, MON_NAME_LENGTH - 1 + call CopyBytes + ld a, "@" + ld [wStringBuffer2 + MON_NAME_LENGTH - 1], a + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, " " + call ByteFill + hlcoord 0, 0 + lb bc, 3, SCREEN_WIDTH - 2 + call Textbox + hlcoord 0, 12 + lb bc, 4, SCREEN_WIDTH - 2 + call Textbox + ld a, [wTempMonSpecies] + ld [wCurPartySpecies], a + ld hl, wTempMonDVs + predef GetUnownLetter + xor a + ld [wBoxAlignment], a + hlcoord 6, 5 + call _PrepMonFrontpic + ld a, [wCurPartySpecies] + cp EGG + jr z, .print_id_no + hlcoord 1, 13 + ld a, "№" + ld [hli], a + ld [hl], "" + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld a, l + ld l, h + ld h, a + push hl + ld hl, sp + 0 + ld d, h + ld e, l + hlcoord 3, 13 + lb bc, PRINTNUM_LEADINGZEROS | 2, 3 + call PrintNum + pop hl + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + call GetBasePokemonName + hlcoord 7, 13 + call PlaceString + ld a, TEMPMON + ld [wMonType], a + farcall GetGender + ld a, " " + jr c, .got_gender + ld a, "♂" + jr nz, .got_gender + ld a, "♀" + +.got_gender + hlcoord 18, 13 + ld [hli], a + hlcoord 8, 14 + ld a, "/" + ld [hli], a + ld de, wStringBuffer2 + call PlaceString + hlcoord 1, 16 + call PrintLevel + +.print_id_no + hlcoord 7, 16 + ld a, "" + ld [hli], a + ld a, "№" + ld [hli], a + ld [hl], "/" + hlcoord 10, 16 + ld de, wTempMonID + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + ret + +HOF_AnimatePlayerPic: + call ClearBGPalettes + ld hl, vTiles2 tile HALLOFFAME_COLON + ld de, FontExtra + 13 tiles ; "" + lb bc, BANK(FontExtra), 1 + call Request2bpp + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, " " + call ByteFill + farcall GetPlayerBackpic + ld a, $31 + ldh [hGraphicStartTile], a + hlcoord 6, 6 + lb bc, 6, 6 + predef PlaceGraphic + ld a, $d0 + ldh [hSCY], a + ld a, $90 + ldh [hSCX], a + call WaitBGMap + xor a + ldh [hBGMapMode], a + ld [wCurPartySpecies], a + ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + call SetPalettes + call HOF_SlideBackpic + xor a + ld [wBoxAlignment], a + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, " " + call ByteFill + farcall HOF_LoadTrainerFrontpic + xor a + ldh [hGraphicStartTile], a + hlcoord 12, 5 + lb bc, 7, 7 + predef PlaceGraphic + ld a, $c0 + ldh [hSCX], a + call WaitBGMap + xor a + ldh [hBGMapMode], a + ldh [hSCY], a + call HOF_SlideFrontpic + xor a + ldh [hBGMapMode], a + hlcoord 0, 2 + lb bc, 8, 9 + call Textbox + hlcoord 0, 12 + lb bc, 4, 18 + call Textbox + hlcoord 2, 4 + ld de, wPlayerName + call PlaceString + hlcoord 1, 6 + ld a, "" + ld [hli], a + ld a, "№" + ld [hli], a + ld [hl], "/" + hlcoord 4, 6 + ld de, wPlayerID + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + hlcoord 1, 8 + ld de, .PlayTime + call PlaceString + hlcoord 3, 9 + ld de, wGameTimeHours + lb bc, 2, 3 + call PrintNum + ld [hl], HALLOFFAME_COLON + inc hl + ld de, wGameTimeMinutes + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + call WaitBGMap + farcall ProfOaksPCRating + ret + +.PlayTime: + db "PLAY TIME@" diff --git a/engine/events/happiness_egg.asm b/engine/events/happiness_egg.asm new file mode 100644 index 0000000..ac3e165 --- /dev/null +++ b/engine/events/happiness_egg.asm @@ -0,0 +1,220 @@ +GetFirstPokemonHappiness: + ld hl, wPartyMon1Happiness + ld bc, PARTYMON_STRUCT_LENGTH + ld de, wPartySpecies +.loop + ld a, [de] + cp EGG + jr nz, .done + inc de + add hl, bc + jr .loop + +.done + ld [wNamedObjectIndex], a + ld a, [hl] + ld [wScriptVar], a + call GetPokemonName + jp CopyPokemonName_Buffer1_Buffer3 + +CheckFirstMonIsEgg: + ld a, [wPartySpecies] + ld [wNamedObjectIndex], a + cp EGG + ld a, TRUE + jr z, .egg + xor a + +.egg + ld [wScriptVar], a + call GetPokemonName + jp CopyPokemonName_Buffer1_Buffer3 + +ChangeHappiness: +; Perform happiness action c on wCurPartyMon + + ld a, [wCurPartyMon] + inc a + ld e, a + ld d, 0 + ld hl, wPartySpecies - 1 + add hl, de + ld a, [hl] + cp EGG + ret z + + push bc + ld hl, wPartyMon1Happiness + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + pop bc + + ld d, h + ld e, l + + push de + ld a, [de] + cp HAPPINESS_THRESHOLD_1 + ld e, 0 + jr c, .ok + inc e + cp HAPPINESS_THRESHOLD_2 + jr c, .ok + inc e + +.ok + dec c + ld b, 0 + ld hl, HappinessChanges + add hl, bc + add hl, bc + add hl, bc + ld d, 0 + add hl, de + ld a, [hl] + cp $64 ; why not $80? + pop de + + ld a, [de] + jr nc, .negative + add [hl] + jr nc, .done + ld a, -1 + jr .done + +.negative + add [hl] + jr c, .done + xor a + +.done + ld [de], a + ld a, [wBattleMode] + and a + ret z + ld a, [wCurPartyMon] + ld b, a + ld a, [wPartyMenuCursor] + cp b + ret nz + ld a, [de] + ld [wBattleMonHappiness], a + ret + +INCLUDE "data/events/happiness_changes.asm" + +StepHappiness:: +; Raise the party's happiness by 1 point every other step cycle. + + ld hl, wHappinessStepCount + ld a, [hl] + inc a + and 1 + ld [hl], a + ret nz + + ld de, wPartyCount + ld a, [de] + and a + ret z + + ld c, a + ld hl, wPartyMon1Happiness +.loop + inc de + ld a, [de] + cp EGG + jr z, .next + inc [hl] + jr nz, .next + ld [hl], $ff + +.next + push de + ld de, PARTYMON_STRUCT_LENGTH + add hl, de + pop de + dec c + jr nz, .loop + ret + +DayCareStep:: +; Raise the experience of Day-Care Pokémon every step cycle. + + ld a, [wDayCareMan] + bit DAYCAREMAN_HAS_MON_F, a + jr z, .day_care_lady + + ld a, [wBreedMon1Level] ; level + cp MAX_LEVEL + jr nc, .day_care_lady + ld hl, wBreedMon1Exp + 2 ; exp + inc [hl] + jr nz, .day_care_lady + dec hl + inc [hl] + jr nz, .day_care_lady + dec hl + inc [hl] + ld a, [hl] + cp HIGH(MAX_DAY_CARE_EXP >> 8) + jr c, .day_care_lady + ld a, HIGH(MAX_DAY_CARE_EXP >> 8) + ld [hl], a + +.day_care_lady + ld a, [wDayCareLady] + bit DAYCARELADY_HAS_MON_F, a + jr z, .check_egg + + ld a, [wBreedMon2Level] ; level + cp MAX_LEVEL + jr nc, .check_egg + ld hl, wBreedMon2Exp + 2 ; exp + inc [hl] + jr nz, .check_egg + dec hl + inc [hl] + jr nz, .check_egg + dec hl + inc [hl] + ld a, [hl] + cp HIGH(MAX_DAY_CARE_EXP >> 8) + jr c, .check_egg + ld a, HIGH(MAX_DAY_CARE_EXP >> 8) + ld [hl], a + +.check_egg + ld hl, wDayCareMan + bit DAYCAREMAN_MONS_COMPATIBLE_F, [hl] + ret z + ld hl, wStepsToEgg + dec [hl] + ret nz + + call Random + ld [hl], a + callfar CheckBreedmonCompatibility + ld a, [wBreedingCompatibility] + cp 230 + ld b, 31 percent + 1 + jr nc, .okay + ld a, [wBreedingCompatibility] + cp 170 + ld b, 16 percent + jr nc, .okay + ld a, [wBreedingCompatibility] + cp 110 + ld b, 12 percent + jr nc, .okay + ld b, 4 percent + +.okay + call Random + cp b + ret nc + ld hl, wDayCareMan + res DAYCAREMAN_MONS_COMPATIBLE_F, [hl] + set DAYCAREMAN_HAS_EGG_F, [hl] + ret diff --git a/engine/events/heal_machine_anim.asm b/engine/events/heal_machine_anim.asm new file mode 100644 index 0000000..a6f0496 --- /dev/null +++ b/engine/events/heal_machine_anim.asm @@ -0,0 +1,262 @@ +; HealMachineAnim.Jumptable indexes + const_def + const HEALMACHINESTATE_LOADGFX + const HEALMACHINESTATE_PCLOADBALLS + const HEALMACHINESTATE_HOFLOADBALLS + const HEALMACHINESTATE_PLAYMUSIC + const HEALMACHINESTATE_HOFPLAYSFX + const HEALMACHINESTATE_FINISH + +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 + ret z + ; The location of the healing machine relative to the player is stored in wScriptVar. + ; 0: Up and left (Pokemon Center) + ; 1: Left (Elm's Lab) + ; 2: Up (Hall of Fame) + ld a, [wScriptVar] + ld [wHealMachineAnimType], a + ldh a, [rOBP1] + ld [wHealMachineTempOBP1], a + call .DoJumptableFunctions + ld a, [wHealMachineTempOBP1] + call DmgToCgbObjPal1 + ret + +.DoJumptableFunctions: + xor a + ld [wHealMachineAnimState], a +.jumptable_loop + ld a, [wHealMachineAnimType] + ld e, a + ld d, 0 + ld hl, .Pointers + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wHealMachineAnimState] + ld e, a + inc a + ld [wHealMachineAnimState], a + add hl, de + ld a, [hl] + cp HEALMACHINESTATE_FINISH + jr z, .finish + ld hl, .Jumptable + rst JumpTable + jr .jumptable_loop + +.finish + ret + +.Pointers: +; entries correspond to HEALMACHINE_* constants + dw .Pokecenter + dw .ElmsLab + dw .HallOfFame + +MACRO healmachineanimseq + rept _NARG + db HEALMACHINESTATE_\1 + shift + endr +ENDM + +.Pokecenter: + healmachineanimseq LOADGFX, PCLOADBALLS, PLAYMUSIC, FINISH +.ElmsLab: + healmachineanimseq LOADGFX, PCLOADBALLS, PLAYMUSIC, FINISH +.HallOfFame: + healmachineanimseq LOADGFX, HOFLOADBALLS, HOFPLAYSFX, FINISH + +.Jumptable: +; entries correspond to HEALMACHINESTATE_* constants + dw .LoadGFX + dw .PC_LoadBallsOntoMachine + dw .HOF_LoadBallsOntoMachine + dw .PlayHealMusic + dw .HOF_PlaySFX + dw .dummy_5 ; never encountered + +.LoadGFX: + call .LoadPalettes + ld de, .HealMachineGFX + ld hl, vTiles0 tile $7c + lb bc, BANK(.HealMachineGFX), 2 + call Request2bpp + ret + +.PC_LoadBallsOntoMachine: + ld hl, wShadowOAMSprite32 + ld de, .PC_ElmsLab_OAM + call .PlaceHealingMachineTile + call .PlaceHealingMachineTile + jr .LoadBallsOntoMachine + +.HOF_LoadBallsOntoMachine: + ld hl, wShadowOAMSprite32 + ld de, .HOF_OAM + +.LoadBallsOntoMachine: + ld a, [wPartyCount] + ld b, a +.party_loop + call .PlaceHealingMachineTile + push de + ld de, SFX_SECOND_PART_OF_ITEMFINDER + call PlaySFX + pop de + ld c, 30 + call DelayFrames + dec b + jr nz, .party_loop + ret + +.PlayHealMusic: + ld de, MUSIC_HEAL + call PlayMusic + jp .FlashPalettes8Times + +.HOF_PlaySFX: + ld de, SFX_GAME_FREAK_LOGO_GS + call PlaySFX + call .FlashPalettes8Times + call WaitSFX + ld de, SFX_BOOT_PC + call PlaySFX + ret + +.dummy_5 + ret + +.PC_ElmsLab_OAM: + dbsprite 4, 4, 2, 0, $7c, PAL_OW_TREE | OBP_NUM + dbsprite 4, 4, 6, 0, $7c, PAL_OW_TREE | OBP_NUM + dbsprite 4, 4, 0, 6, $7d, PAL_OW_TREE | OBP_NUM + dbsprite 5, 4, 0, 6, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP + dbsprite 4, 5, 0, 3, $7d, PAL_OW_TREE | OBP_NUM + dbsprite 5, 5, 0, 3, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP + dbsprite 4, 6, 0, 0, $7d, PAL_OW_TREE | OBP_NUM + dbsprite 5, 6, 0, 0, $7d, PAL_OW_TREE | OBP_NUM | X_FLIP + +.HealMachineGFX: +INCBIN "gfx/overworld/heal_machine.2bpp" + +.HOF_OAM: + dbsprite 10, 7, 1, 4, $7d, PAL_OW_TREE | OBP_NUM + dbsprite 10, 7, 6, 4, $7d, PAL_OW_TREE | OBP_NUM + dbsprite 9, 7, 5, 3, $7d, PAL_OW_TREE | OBP_NUM + dbsprite 11, 7, 2, 3, $7d, PAL_OW_TREE | OBP_NUM + dbsprite 9, 7, 1, 1, $7d, PAL_OW_TREE | OBP_NUM + dbsprite 11, 7, 5, 1, $7d, PAL_OW_TREE | OBP_NUM + +.LoadPalettes: + call IsCGB + jr nz, .cgb + ld a, %11100000 + ldh [rOBP1], a + ret + +.cgb + ld hl, .palettes + ld de, wOBPals2 palette PAL_OW_TREE + ld bc, 1 palettes + ld a, BANK(wOBPals2) + call FarCopyWRAM + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +.palettes +INCLUDE "gfx/overworld/heal_machine.pal" + +.FlashPalettes8Times: + ld c, 8 +.palette_loop + push bc + call .FlashPalettes + ld c, 10 + call DelayFrames + pop bc + dec c + jr nz, .palette_loop + ret + +.FlashPalettes: + call IsCGB + jr nz, .go + ldh a, [rOBP1] + xor %00101000 + ldh [rOBP1], a + ret + +.go + ldh a, [rSVBK] + push af + ld a, BANK(wOBPals2) + ldh [rSVBK], a + + ld hl, wOBPals2 palette PAL_OW_TREE + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + push de + ld c, $3 +.palette_loop_2 + ld a, [hli] + ld e, a + ld a, [hld] + ld d, a + dec hl + ld a, d + ld [hld], a + ld a, e + ld [hli], a + inc hl + inc hl + inc hl + dec c + jr nz, .palette_loop_2 + pop de + dec hl + ld a, d + ld [hld], a + ld a, e + ld [hl], a + + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +.PlaceHealingMachineTile: + push bc + ld a, [wHealMachineAnimType] + bcpixel 2, 4 + cp HEALMACHINE_ELMS_LAB + jr z, .okay + bcpixel 0, 0 + +.okay + ld a, [de] + add c + inc de + ld [hli], a ; y + ld a, [de] + add b + inc de + ld [hli], a ; x + ld a, [de] + inc de + ld [hli], a ; tile id + ld a, [de] + inc de + ld [hli], a ; attributes + pop bc + ret diff --git a/engine/events/hidden_item.asm b/engine/events/hidden_item.asm new file mode 100644 index 0000000..b61a620 --- /dev/null +++ b/engine/events/hidden_item.asm @@ -0,0 +1,37 @@ +HiddenItemScript:: + opentext + readmem wHiddenItemID + getitemname STRING_BUFFER_3, USE_SCRIPT_VAR + writetext .PlayerFoundItemText + giveitem ITEM_FROM_MEM + iffalse .bag_full + callasm SetMemEvent + specialsound + itemnotify + sjump .finish + +.bag_full + promptbutton + writetext .ButNoSpaceText + waitbutton + +.finish + closetext + end + +.PlayerFoundItemText: + text_far _PlayerFoundItemText + text_end + +.ButNoSpaceText: + text_far _ButNoSpaceText + text_end + +SetMemEvent: + ld hl, wHiddenItemEvent + ld a, [hli] + ld d, [hl] + ld e, a + ld b, SET_FLAG + call EventFlagAction + ret diff --git a/engine/events/itemfinder.asm b/engine/events/itemfinder.asm new file mode 100644 index 0000000..3665187 --- /dev/null +++ b/engine/events/itemfinder.asm @@ -0,0 +1,50 @@ +ItemFinder: + farcall CheckForHiddenItems + jr c, .found_something + ld hl, .Script_FoundNothing + jr .resume + +.found_something + ld hl, .Script_FoundSomething + +.resume + call QueueScript + ld a, $1 + ld [wItemEffectSucceeded], a + ret + +.ItemfinderSound: + ld c, 4 +.sfx_loop + push bc + ld de, SFX_SECOND_PART_OF_ITEMFINDER + call WaitPlaySFX + ld de, SFX_TRANSACTION + call WaitPlaySFX + pop bc + dec c + jr nz, .sfx_loop + ret + +.Script_FoundSomething: + reloadmappart + special UpdateTimePals + callasm .ItemfinderSound + writetext .ItemfinderItemNearbyText + closetext + end + +.Script_FoundNothing: + reloadmappart + special UpdateTimePals + writetext .ItemfinderNopeText + closetext + end + +.ItemfinderItemNearbyText: + text_far _ItemfinderItemNearbyText + text_end + +.ItemfinderNopeText: + text_far _ItemfinderNopeText + text_end diff --git a/engine/events/kurt.asm b/engine/events/kurt.asm new file mode 100644 index 0000000..f440784 --- /dev/null +++ b/engine/events/kurt.asm @@ -0,0 +1,394 @@ +Kurt_PrintTextWhichApricorn: + ld hl, .WhichApricornText + call PrintText + ret + +.WhichApricornText: + text_far _WhichApricornText + text_end + +Kurt_PrintTextHowMany: + ld hl, .HowManyShouldIMakeText + call PrintText + ret + +.HowManyShouldIMakeText: + text_far _HowManyShouldIMakeText + text_end + +SelectApricornForKurt: + call LoadStandardMenuHeader + ld c, $1 + xor a + ld [wMenuScrollPosition], a + ld [wKurtApricornQuantity], a +.loop + push bc + call Kurt_PrintTextWhichApricorn + pop bc + ld a, c + ld [wMenuSelection], a + call Kurt_SelectApricorn + ld a, c + ld [wScriptVar], a + and a + jr z, .done + ld [wCurItem], a + ld a, [wMenuCursorY] + ld c, a + push bc + call Kurt_PrintTextHowMany + call Kurt_SelectQuantity + pop bc + jr nc, .loop + ld a, [wItemQuantityChange] + ld [wKurtApricornQuantity], a + call Kurt_GiveUpSelectedQuantityOfSelectedApricorn + +.done + call ExitMenu + ret + +Kurt_SelectApricorn: + farcall FindApricornsInBag + jr c, .nope + ld hl, .MenuHeader + call CopyMenuHeader + ld a, [wMenuSelection] + ld [wMenuCursorPosition], a + xor a + ldh [hBGMapMode], a + call InitScrollingMenu + call UpdateSprites + call ScrollingMenu + ld a, [wMenuJoypad] + cp B_BUTTON + jr z, .nope + ld a, [wMenuSelection] + cp -1 + jr nz, .done + +.nope + xor a ; FALSE + +.done + ld c, a + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 1, 1, 13, 10 + dw .MenuData + db 1 ; default option + + db 0 ; unused + +.MenuData: + db SCROLLINGMENU_DISPLAY_ARROWS ; flags + db 4, 7 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dbw 0, wKurtApricornCount + dba .Name + dba .Quantity + dba NULL + +.Name: + ld a, [wMenuSelection] + and a + ret z + farcall PlaceMenuItemName + ret + +.Quantity: + ld a, [wMenuSelection] + ld [wCurItem], a + call Kurt_GetQuantityOfApricorn + ret z + ld a, [wItemQuantityChange] + ld [wMenuSelectionQuantity], a + farcall PlaceMenuItemQuantity + ret + +Kurt_SelectQuantity: + ld a, [wCurItem] + ld [wMenuSelection], a + call Kurt_GetQuantityOfApricorn + jr z, .done + ld a, [wItemQuantityChange] + ld [wItemQuantity], a + ld a, $1 + ld [wItemQuantityChange], a + ld hl, .MenuHeader + call LoadMenuHeader +.loop + xor a + ldh [hBGMapMode], a + call MenuBox + call UpdateSprites + call .PlaceApricornName + call PlaceApricornQuantity + call ApplyTilemap + farcall Kurt_SelectQuantity_InterpretJoypad + jr nc, .loop + + push bc + call PlayClickSFX + pop bc + ld a, b + cp -1 + jr z, .done + ld a, [wItemQuantityChange] + ld [wItemQuantityChange], a ; What is the point of this operation? + scf + +.done + call CloseWindow + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 6, 9, SCREEN_WIDTH - 1, 12 + dw NULL + db -1 ; default option + db 0 + +.PlaceApricornName: + call MenuBoxCoord2Tile + ld de, SCREEN_WIDTH + 1 + add hl, de + ld d, h + ld e, l + farcall PlaceMenuItemName + ret + +PlaceApricornQuantity: + call MenuBoxCoord2Tile + ld de, 2 * SCREEN_WIDTH + 10 + add hl, de + ld [hl], "×" + inc hl + ld de, wItemQuantityChange + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + jp PrintNum + +Kurt_GetQuantityOfApricorn: + push bc + ld hl, wNumItems + ld a, [wCurItem] + ld c, a + ld b, 0 +.loop + inc hl + ld a, [hli] + cp -1 + jr z, .done + cp c + jr nz, .loop + ld a, [hl] + add b + ld b, a + jr nc, .loop + ld b, -1 + +.done + ld a, b + sub 99 + jr c, .done2 + ld b, 99 + +.done2 + ld a, b + ld [wItemQuantityChange], a + and a + pop bc + ret + +Kurt_GiveUpSelectedQuantityOfSelectedApricorn: +; Get the quantity of Apricorns of type [wCurItem] +; in the bag. Compatible with multiple stacks. + +; Initialize the search. + push de + push bc + ld hl, wNumItems + ld a, [wCurItem] + ld c, a + ld e, $0 + xor a + ld [wCurItemQuantity], a + ld a, -1 + ld [wApricorns], a + +; Search for [wCurItem] in the bag. +.loop1 +; Increase the total count. + ld a, [wCurItemQuantity] + inc a + ld [wCurItemQuantity], a +; Get the index of the next item. + inc hl + ld a, [hli] +; If we've reached the end of the pocket, break. + cp -1 + jr z, .okay1 +; If we haven't found what we're looking for, continue. + cp c + jr nz, .loop1 +; Increment the result counter and store the bag index of the match. + ld d, $0 + push hl + ld hl, wApricorns + add hl, de + inc e + ld a, [wCurItemQuantity] + dec a + ld [hli], a + ld a, -1 + ld [hl], a + pop hl + jr .loop1 + +.okay1 +; How many stacks have we found? + ld a, e + and a + jr z, .done + dec a + jr z, .OnlyOne + ld hl, wApricorns + +.loop2 + ld a, [hl] + ld c, a + push hl +.loop3 + inc hl + ld a, [hl] + cp -1 + jr z, .okay2 + ld b, a + ld a, c + call Kurt_GetAddressOfApricornQuantity + ld e, a + ld a, b + call Kurt_GetAddressOfApricornQuantity + sub e + jr z, .equal + jr c, .less + jr .loop3 + +.equal + ld a, c + sub b + jr nc, .loop3 + +.less + ld a, c + ld c, b + ld [hl], a + ld a, c + pop hl + ld [hl], a + push hl + jr .loop3 + +.okay2 + pop hl + inc hl + ld a, [hl] + cp -1 + jr nz, .loop2 + +.OnlyOne: + ld hl, wApricorns +.loop4 + ld a, [hl] + cp -1 + jr z, .done + push hl + ld [wCurItemQuantity], a + call Kurt_GetRidOfItem + pop hl + ld a, [wItemQuantityChange] + and a + jr z, .done + push hl + ld a, [hli] + ld c, a +.loop5 + ld a, [hli] + cp -1 + jr z, .okay3 + cp c + jr c, .loop5 + dec a + dec hl + ld [hli], a + jr .loop5 + +.okay3 + pop hl + inc hl + jr .loop4 + +.done + ld a, [wItemQuantityChange] + and a + pop bc + pop de + ret + +Kurt_GetAddressOfApricornQuantity: + push hl + push bc + ld hl, wNumItems + inc hl + ld c, a + ld b, 0 + add hl, bc + add hl, bc + inc hl + ld a, [hl] + pop bc + pop hl + ret + +Kurt_GetRidOfItem: + push bc + ld hl, wNumItems + ld a, [wCurItemQuantity] + ld c, a + ld b, 0 + inc hl + add hl, bc + add hl, bc + ld a, [wCurItem] + ld c, a + ld a, [hli] + cp -1 + jr z, .done + cp c + jr nz, .done + ld a, [wItemQuantityChange] + ld c, a + ld a, [hl] + sub c + ld b, c + jr nc, .okay + add c + ld b, a + +.okay + push bc + ld hl, wNumItems + ld a, b + ld [wItemQuantityChange], a + call TossItem + pop bc + ld a, c + sub b + +.done + ld [wItemQuantityChange], a + pop bc + ret diff --git a/engine/events/kurt_selectquantity_interpretjoypad.asm b/engine/events/kurt_selectquantity_interpretjoypad.asm new file mode 100644 index 0000000..44b71a1 --- /dev/null +++ b/engine/events/kurt_selectquantity_interpretjoypad.asm @@ -0,0 +1,4 @@ +Kurt_SelectQuantity_InterpretJoypad: + call BuySellToss_InterpretJoypad + ld b, a + ret diff --git a/engine/events/lucky_number.asm b/engine/events/lucky_number.asm new file mode 100644 index 0000000..cd7cfd2 --- /dev/null +++ b/engine/events/lucky_number.asm @@ -0,0 +1,262 @@ +CheckForLuckyNumberWinners: + xor a + ld [wScriptVar], a + ld [wTempByteValue], a + ld a, [wPartyCount] + and a + ret z + ld d, a + ld hl, wPartyMon1ID + ld bc, wPartySpecies +.PartyLoop: + ld a, [bc] + inc bc + cp EGG + call nz, .CompareLuckyNumberToMonID + push bc + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop bc + dec d + jr nz, .PartyLoop + ld a, BANK(sBox) + call OpenSRAM + ld a, [sBoxCount] + and a + jr z, .SkipOpenBox + ld d, a + ld hl, sBoxMon1ID + ld bc, sBoxSpecies +.OpenBoxLoop: + ld a, [bc] + inc bc + cp EGG + jr z, .SkipOpenBoxMon + call .CompareLuckyNumberToMonID + jr nc, .SkipOpenBoxMon + ld a, TRUE + ld [wTempByteValue], a + +.SkipOpenBoxMon: + push bc + ld bc, BOXMON_STRUCT_LENGTH + add hl, bc + pop bc + dec d + jr nz, .OpenBoxLoop + +.SkipOpenBox: + call CloseSRAM + ld c, $0 +.BoxesLoop: + ld a, [wCurBox] + and $f + cp c + jr z, .SkipBox + ld hl, .BoxBankAddresses + ld b, 0 + add hl, bc + add hl, bc + add hl, bc + ld a, [hli] + call OpenSRAM + ld a, [hli] + ld h, [hl] + ld l, a ; hl now contains the address of the loaded box in SRAM + ld a, [hl] + and a + jr z, .SkipBox ; no mons in this box + ld [wTempLoopCounter], a + ld de, sBoxMon1ID - sBox + add hl, de + ld d, 0 + ld e, c + push bc + ld b, h + ld c, l + inc bc +.BoxNLoop: + ld a, [bc] + inc bc + cp EGG + jr z, .SkipBoxMon + + call .CompareLuckyNumberToMonID ; sets wScriptVar and wCurPartySpecies appropriately + jr nc, .SkipBoxMon + ld a, e + add a, 2 + ld [wTempByteValue], a + ld a, d + ld [wCurPartySpecies], a + +.SkipBoxMon: + push bc + ld bc, BOXMON_STRUCT_LENGTH + add hl, bc + pop bc + inc d + ld a, [wTempLoopCounter] + cp d + jr nz, .BoxNLoop + pop bc + +.SkipBox: + inc c + ld a, c + cp NUM_BOXES + jr c, .BoxesLoop + + call CloseSRAM + ld a, [wScriptVar] + and a + ret z ; found nothing + + farcall StubbedTrainerRankings_LuckyNumberShow + ld a, [wTempByteValue] + ld hl, .LuckyNumberMatchPartyText + and a + jr z, .print + dec a + jr z, .print_box + ld e, a + ld d, 0 + ld hl, .BoxSpeciesBankAddresses - 3 ;box number is one-based here + add hl, de + add hl, de + add hl, de + ld a, [hli] + call OpenSRAM + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wCurPartySpecies] + ld e, a + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call CloseSRAM + call GetPokemonIDFromIndex + ld [wCurPartySpecies], a +.print_box + ld hl, .LuckyNumberMatchPCText +.print + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + jp PrintText + +.CompareLuckyNumberToMonID: + push bc + push de + push hl + ld d, h + ld e, l + ld hl, wMonIDDigitsBuffer + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + ld hl, wLuckyNumberDigitsBuffer + ld de, wLuckyIDNumber + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + ld b, 5 + ld c, 0 + ld hl, wLuckyNumberDigitsBuffer + 4 + ld de, wMonIDDigitsBuffer + 4 +.loop + ld a, [de] + cp [hl] + jr nz, .done + dec de + dec hl + inc c + dec b + jr nz, .loop + +.done + pop hl + push hl + ld de, MON_SPECIES - MON_ID + add hl, de + ld a, [hl] + pop hl + pop de + push af + ld a, c + ld b, 1 + cp 5 + jr z, .okay + ld b, 2 + cp 3 + jr nc, .okay + ld b, 3 + cp 2 + jr nz, .nomatch + +.okay + inc b + ld a, [wScriptVar] + and a + jr z, .bettermatch + cp b + jr c, .nomatch + +.bettermatch + dec b + ld a, b + ld [wScriptVar], a + pop bc + ld a, b + ld [wCurPartySpecies], a + pop bc + scf + ret + +.nomatch + pop bc + pop bc + and a + ret + +.BoxBankAddresses: + table_width 3, CheckForLuckyNumberWinners.BoxBankAddresses +for n, 1, NUM_BOXES + 1 + dba sBox{d:n} +endr + assert_table_length NUM_BOXES + +.BoxSpeciesBankAddresses: + table_width 3, CheckForLuckyNumberWinners.BoxSpeciesBankAddresses + dba sBox1PokemonIndexes + dba sBox2PokemonIndexes + dba sBox3PokemonIndexes + dba sBox4PokemonIndexes + dba sBox5PokemonIndexes + dba sBox6PokemonIndexes + dba sBox7PokemonIndexes + dba sBox8PokemonIndexes + dba sBox9PokemonIndexes + dba sBox10PokemonIndexes + dba sBox11PokemonIndexes + dba sBox12PokemonIndexes + dba sBox13PokemonIndexes + dba sBox14PokemonIndexes + assert_table_length NUM_BOXES + +.LuckyNumberMatchPartyText: + text_far _LuckyNumberMatchPartyText + text_end + +.LuckyNumberMatchPCText: + text_far _LuckyNumberMatchPCText + text_end + +PrintTodaysLuckyNumber: + ld hl, wStringBuffer3 + ld de, wLuckyIDNumber + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + ld a, "@" + ld [wStringBuffer3 + 5], a + ret diff --git a/engine/events/magikarp.asm b/engine/events/magikarp.asm new file mode 100644 index 0000000..f144767 --- /dev/null +++ b/engine/events/magikarp.asm @@ -0,0 +1,327 @@ +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. + ; Returns 0 if the Pokemon you select is not a Magikarp. + + ; Let's start by selecting a Magikarp. + farcall SelectMonFromParty + jr c, .declined + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld a, l + sub LOW(MAGIKARP) + if HIGH(MAGIKARP) == 0 + or h + else + jr nz, .not_magikarp + if HIGH(MAGIKARP) == 1 + dec h + else + ld a, h + cp HIGH(MAGIKARP) + endc + endc + jr nz, .not_magikarp + + ; Now let's compute its length based on its DVs and ID. + ld a, [wCurPartyMon] + ld hl, wPartyMon1Species + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + push hl + ld bc, MON_DVS + add hl, bc + ld d, h + ld e, l + pop hl + ld bc, MON_ID + add hl, bc + ld b, h + ld c, l + call CalcMagikarpLength + call PrintMagikarpLength + farcall StubbedTrainerRankings_MagikarpLength + ld hl, .MagikarpGuruMeasureText + call PrintText + + ; Did we beat the record? + ld hl, wMagikarpLength + ld de, wBestMagikarpLengthFeet + ld c, 2 + call CompareBytes + jr nc, .not_long_enough + + ; NEW RECORD!!! Let's save that. + ld hl, wMagikarpLength + ld de, wBestMagikarpLengthFeet + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + inc de + ld a, [wCurPartyMon] + ld hl, wPartyMonOTs + call SkipNames + call CopyBytes + ld a, MAGIKARPLENGTH_BEAT_RECORD + ld [wScriptVar], a + ret + +.not_long_enough + ld a, MAGIKARPLENGTH_TOO_SHORT + ld [wScriptVar], a + ret + +.declined + ld a, MAGIKARPLENGTH_REFUSED + ld [wScriptVar], a + ret + +.not_magikarp + xor a ; MAGIKARPLENGTH_NOT_MAGIKARP + ld [wScriptVar], a + ret + +.MagikarpGuruMeasureText: + text_far _MagikarpGuruMeasureText + text_end + +Magikarp_LoadFeetInchesChars: + ld hl, vTiles2 tile "′" ; $6e + ld de, .feetinchchars + lb bc, BANK(.feetinchchars), 2 + call Request2bpp + ret + +.feetinchchars +INCBIN "gfx/font/feet_inches.2bpp" + +PrintMagikarpLength: + call Magikarp_LoadFeetInchesChars + ld hl, wStringBuffer1 + ld de, wMagikarpLength + lb bc, PRINTNUM_LEFTALIGN | 1, 2 + call PrintNum + ld [hl], "′" + inc hl + ld de, wMagikarpLength + 1 + lb bc, PRINTNUM_LEFTALIGN | 1, 2 + call PrintNum + ld [hl], "″" + inc hl + ld [hl], "@" + ret + +CalcMagikarpLength: +; Return Magikarp's length (in feet and inches) at wMagikarpLength (big endian). +; +; input: +; de: wEnemyMonDVs +; bc: wPlayerID + +; This function is poorly commented. + +; In short, it generates a value between 190 and 1786 using +; a Magikarp's DVs and its trainer ID. This value is further +; filtered in LoadEnemyMon to make longer Magikarp even rarer. + +; The value is generated from a lookup table. +; The index is determined by the dv xored with the player's trainer id. + +; bc = rrc(dv[0]) ++ rrc(dv[1]) ^ rrc(id) + +; if bc < 10: [wMagikarpLength] = c + 190 +; if bc ≥ $ff00: [wMagikarpLength] = c + 1370 +; else: [wMagikarpLength] = z * 100 + (bc - x) / y + +; X, Y, and Z depend on the value of b as follows: + +; if b = 0: x = 310, y = 2, z = 3 +; if b = 1: x = 710, y = 4, z = 4 +; if b = 2-9: x = 2710, y = 20, z = 5 +; if b = 10-29: x = 7710, y = 50, z = 6 +; if b = 30-68: x = 17710, y = 100, z = 7 +; if b = 69-126: x = 32710, y = 150, z = 8 +; if b = 127-185: x = 47710, y = 150, z = 9 +; if b = 186-224: x = 57710, y = 100, z = 10 +; if b = 225-243: x = 62710, y = 50, z = 11 +; if b = 244-251: x = 64710, y = 20, z = 12 +; if b = 252-253: x = 65210, y = 5, z = 13 +; if b = 254: x = 65410, y = 2, z = 14 + + ; bc = rrc(dv[0]) ++ rrc(dv[1]) ^ rrc(id) + + ; id + ld h, b + ld l, c + ld a, [hli] + ld b, a + ld c, [hl] + rrc b + rrc c + + ; dv + ld a, [de] + inc de + rrca + rrca + xor b + ld b, a + + ld a, [de] + rrca + rrca + xor c + ld c, a + + ; if bc < 10: + ; de = bc + 190 + ; break + + ld a, b + and a + jr nz, .no + ld a, c + cp 10 + jr nc, .no + + ld hl, 190 + add hl, bc + ld d, h + ld e, l + jr .done + +.no + + ld hl, MagikarpLengths + ld a, 2 + ld [wTempByteValue], a + +.read + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + call .BCLessThanDE + jr nc, .next + + ; c = (bc - de) / [hl] + call .BCMinusDE + ld a, b + ldh [hDividend + 0], a + ld a, c + ldh [hDividend + 1], a + ld a, [hl] + ldh [hDivisor], a + ld b, 2 + call Divide + ldh a, [hQuotient + 3] + ld c, a + + ; de = c + 100 × (2 + i) + xor a + ldh [hMultiplicand + 0], a + ldh [hMultiplicand + 1], a + ld a, 100 + ldh [hMultiplicand + 2], a + ld a, [wTempByteValue] + ldh [hMultiplier], a + call Multiply + ld b, 0 + ldh a, [hProduct + 3] + add c + ld e, a + ldh a, [hProduct + 2] + adc b + ld d, a + jr .done + +.next + inc hl ; align to next triplet + ld a, [wTempByteValue] + inc a + ld [wTempByteValue], a + cp 16 + jr c, .read + + call .BCMinusDE + ld hl, 1600 + add hl, bc + ld d, h + ld e, l + +.done + ; convert from mm to feet and inches + ; in = mm / 25.4 + ; ft = in / 12 + + ; hl = de × 10 + ld h, d + ld l, e + add hl, hl + add hl, hl + add hl, de + add hl, hl + + ; hl = hl / 254 + ld de, -254 + ld a, -1 +.div_254 + inc a + add hl, de + jr c, .div_254 + + ; d, e = hl / 12, hl % 12 + ld d, 0 +.mod_12 + cp 12 + jr c, .ok + sub 12 + inc d + jr .mod_12 +.ok + ld e, a + + ld hl, wMagikarpLength + ld [hl], d ; ft + inc hl + ld [hl], e ; in + ret + +.BCLessThanDE: +; BUG: Magikarp lengths can be miscalculated (see docs/bugs_and_glitches.md) + ld a, b + cp d + ret c + ret nc + ld a, c + cp e + ret + +.BCMinusDE: +; bc -= de + ld a, c + sub e + ld c, a + ld a, b + sbc d + ld b, a + ret + +INCLUDE "data/events/magikarp_lengths.asm" + +MagikarpHouseSign: + ld a, [wBestMagikarpLengthFeet] + ld [wMagikarpLength], a + ld a, [wBestMagikarpLengthInches] + ld [wMagikarpLength + 1], a + call PrintMagikarpLength + ld hl, .KarpGuruRecordText + call PrintText + ret + +.KarpGuruRecordText: + text_far _KarpGuruRecordText + text_end diff --git a/engine/events/magnet_train.asm b/engine/events/magnet_train.asm new file mode 100644 index 0000000..43b1d71 --- /dev/null +++ b/engine/events/magnet_train.asm @@ -0,0 +1,430 @@ +MagnetTrain: + ld a, [wScriptVar] + and a + jr nz, .ToGoldenrod + ld a, 1 ; forwards + lb bc, 8 * TILE_WIDTH, 12 * TILE_WIDTH + lb de, (11 * TILE_WIDTH) - (11 * TILE_WIDTH + 4), -12 * TILE_WIDTH + jr .continue + +.ToGoldenrod: + ld a, -1 ; backwards + lb bc, -8 * TILE_WIDTH, -12 * TILE_WIDTH + lb de, (11 * TILE_WIDTH) + (11 * TILE_WIDTH + 4), 12 * TILE_WIDTH + +.continue + ld h, a + ldh a, [rSVBK] + push af + ld a, BANK(wMagnetTrain) + ldh [rSVBK], a + + ld a, h + ld [wMagnetTrainDirection], a + ld a, c + ld [wMagnetTrainInitPosition], a + ld a, b + ld [wMagnetTrainHoldPosition], a + ld a, e + ld [wMagnetTrainFinalPosition], a + ld a, d + ld [wMagnetTrainPlayerSpriteInitX], a + + ldh a, [hSCX] + push af + ldh a, [hSCY] + push af + call MagnetTrain_LoadGFX_PlayMusic + ld hl, hVBlank + ld a, [hl] + push af + ld [hl], 1 +.loop + ld a, [wJumptableIndex] + and a + jr z, .initialize + bit 7, a + jr nz, .done + callfar PlaySpriteAnimations + call MagnetTrain_Jumptable + call MagnetTrain_UpdateLYOverrides + call PushLYOverrides + call DelayFrame + jr .loop + +.initialize + call MagnetTrain_Jumptable_FirstRunThrough + jr .loop + +.done + pop af + ldh [hVBlank], a + call ClearBGPalettes + xor a + ldh [hLCDCPointer], a + ldh [hLYOverrideStart], a + ldh [hLYOverrideEnd], a + ldh [hSCX], a + ld [wRequested2bppSource], a + ld [wRequested2bppSource + 1], a + ld [wRequested2bppDest], a + ld [wRequested2bppDest + 1], a + ld [wRequested2bppSize], a + call ClearTilemap + + pop af + ldh [hSCY], a + pop af + ldh [hSCX], a + xor a + ldh [hBGMapMode], a + + pop af + ldh [rSVBK], a + ret + +MagnetTrain_UpdateLYOverrides: + ld hl, wLYOverridesBackup + ld c, 6 * TILE_WIDTH - 1 + ld a, [wMagnetTrainOffset] + add a + ldh [hSCX], a + call .loadloop + ld c, 6 * TILE_WIDTH + ld a, [wMagnetTrainPosition] + call .loadloop + ld c, 6 * TILE_WIDTH + 1 + ld a, [wMagnetTrainOffset] + add a + call .loadloop + + ld a, [wMagnetTrainDirection] + ld d, a + ld hl, wMagnetTrainOffset + ld a, [hl] + add d + add d + ld [hl], a + ret + +.loadloop + ld [hli], a + dec c + jr nz, .loadloop + ret + +MagnetTrain_LoadGFX_PlayMusic: + call ClearBGPalettes + call ClearSprites + call DisableLCD + callfar ClearSpriteAnims + call SetMagnetTrainPals + call DrawMagnetTrain + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + call EnableLCD + xor a + ldh [hBGMapMode], a + ldh [hSCX], a + ldh [hSCY], a + + ; Load the player sprite's standing frames + ldh a, [rSVBK] + push af + ld a, BANK(wPlayerGender) + ldh [rSVBK], a + farcall GetPlayerIcon + pop af + ldh [rSVBK], a + ld hl, vTiles0 + ld c, 4 + call Request2bpp + + ; Load the player sprite's walking frames + ld hl, 12 tiles + add hl, de + ld d, h + ld e, l + ld hl, vTiles0 tile $04 + ld c, 4 + call Request2bpp + + call MagnetTrain_InitLYOverrides + + ld hl, wJumptableIndex + xor a + ld [hli], a ; wJumptableIndex + ld a, [wMagnetTrainInitPosition] + ld [hli], a ; wMagnetTrainOffset + ld [hli], a ; wMagnetTrainPosition + ld [hli], a ; wMagnetTrainWaitCounter + + ld de, MUSIC_MAGNET_TRAIN + call PlayMusic2 + ret + +DrawMagnetTrain: + hlbgcoord 0, 0 + xor a +.loop + call GetMagnetTrainBGTiles + ld b, BG_MAP_WIDTH / 2 + call .FillAlt + inc a + cp SCREEN_HEIGHT + jr c, .loop + + hlbgcoord 0, 6 + ld de, MagnetTrainTilemap + ld c, SCREEN_WIDTH + call .FillLine + hlbgcoord 0, 7 + ld de, MagnetTrainTilemap + SCREEN_WIDTH + ld c, SCREEN_WIDTH + call .FillLine + hlbgcoord 0, 8 + ld de, MagnetTrainTilemap + (SCREEN_WIDTH * 2) + ld c, SCREEN_WIDTH + call .FillLine + hlbgcoord 0, 9 + ld de, MagnetTrainTilemap + (SCREEN_WIDTH * 3) + ld c, SCREEN_WIDTH + call .FillLine + ret + +.FillLine: + ld a, [de] + inc de + ld [hli], a + dec c + jr nz, .FillLine + ret + +.FillAlt: + ld [hl], e + inc hl + ld [hl], d + inc hl + dec b + jr nz, .FillAlt + ret + +GetMagnetTrainBGTiles: + push hl + ld e, a + ld d, 0 + ld hl, MagnetTrainBGTiles + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + pop hl + ret + +MagnetTrainBGTiles: +; 2x18 tilemap, repeated in vertical strips for the background. +INCBIN "gfx/overworld/magnet_train_bg.tilemap" + +MagnetTrain_InitLYOverrides: + ld hl, wLYOverrides + ld bc, wLYOverridesEnd - wLYOverrides + ld a, [wMagnetTrainInitPosition] + call ByteFill + ld hl, wLYOverridesBackup + ld bc, wLYOverridesBackupEnd - wLYOverridesBackup + ld a, [wMagnetTrainInitPosition] + call ByteFill + ld a, LOW(rSCX) + ldh [hLCDCPointer], a + ret + +SetMagnetTrainPals: + ld a, 1 + ldh [rVBK], a + + ; bushes + hlbgcoord 0, 0 + ld bc, 4 * BG_MAP_WIDTH + ld a, PAL_BG_GREEN + call ByteFill + + ; train + hlbgcoord 0, 4 + ld bc, 10 * BG_MAP_WIDTH + xor a ; PAL_BG_GRAY + call ByteFill + + ; more bushes + hlbgcoord 0, 14 + ld bc, 4 * BG_MAP_WIDTH + ld a, PAL_BG_GREEN + call ByteFill + + ; train window + hlbgcoord 7, 8 + ld bc, 6 + ld a, PAL_BG_YELLOW + call ByteFill + + ld a, 0 + ldh [rVBK], a + ret + +MagnetTrain_Jumptable: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + dw .InitPlayerSpriteAnim + dw .WaitScene + dw .MoveTrain1 + dw .WaitScene + dw .MoveTrain2 + dw .WaitScene + dw .TrainArrived + +.Next: + ld hl, wJumptableIndex + inc [hl] + ret + +.InitPlayerSpriteAnim: + ld d, (8 + 2) * TILE_WIDTH + 5 + ld a, [wMagnetTrainPlayerSpriteInitX] + ld e, a + ld b, SPRITE_ANIM_INDEX_MAGNET_TRAIN_RED + ldh a, [rSVBK] + push af + ld a, BANK(wPlayerGender) + ldh [rSVBK], a + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_gender + ld b, SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE +.got_gender + pop af + ldh [rSVBK], a + ld a, b + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], 0 + call .Next + ld a, 128 + ld [wMagnetTrainWaitCounter], a + ret + +.MoveTrain1: + ld hl, wMagnetTrainHoldPosition + ld a, [wMagnetTrainPosition] + cp [hl] + jr z, .PrepareToHoldTrain + ld e, a + ld a, [wMagnetTrainDirection] + xor $ff + inc a + add e + ld [wMagnetTrainPosition], a + ld hl, wGlobalAnimXOffset + ld a, [wMagnetTrainDirection] + add [hl] + ld [hl], a + ret + +.PrepareToHoldTrain: + call .Next + ld a, 128 + ld [wMagnetTrainWaitCounter], a + ret + +.WaitScene: + ld hl, wMagnetTrainWaitCounter + ld a, [hl] + and a + jr z, .DoneWaiting + dec [hl] + ret + +.DoneWaiting: + call .Next + ret + +.MoveTrain2: + ld hl, wMagnetTrainFinalPosition + ld a, [wMagnetTrainPosition] + cp [hl] + jr z, .PrepareToFinishAnim + ld e, a + ld a, [wMagnetTrainDirection] + xor $ff + inc a + ld d, a + ld a, e + add d + add d + ld [wMagnetTrainPosition], a + ld hl, wGlobalAnimXOffset + ld a, [wMagnetTrainDirection] + ld d, a + ld a, [hl] + add d + add d + ld [hl], a + ret + + ret + +.PrepareToFinishAnim: + call .Next + ret + +.TrainArrived: + ld a, $80 + ld [wJumptableIndex], a + ld de, SFX_TRAIN_ARRIVED + call PlaySFX + ret + +MagnetTrain_Jumptable_FirstRunThrough: + farcall PlaySpriteAnimations + call MagnetTrain_Jumptable + call MagnetTrain_UpdateLYOverrides + call PushLYOverrides + call DelayFrame + + ldh a, [rSVBK] + push af + ld a, BANK(wEnvironment) + ldh [rSVBK], a + ld a, [wTimeOfDayPal] + push af + ld a, [wEnvironment] + push af + + ld a, [wTimeOfDay] + maskbits NUM_DAYTIMES + ld [wTimeOfDayPal], a + ld a, TOWN + ld [wEnvironment], a + ld b, SCGB_MAPPALS + call GetSGBLayout + call UpdateTimePals + + ldh a, [rBGP] + ld [wBGP], a + ldh a, [rOBP0] + ld [wOBP0], a + ldh a, [rOBP1] + ld [wOBP1], a + + pop af + ld [wEnvironment], a + pop af + ld [wTimeOfDayPal], a + pop af + ldh [rSVBK], a + ret + +MagnetTrainTilemap: +; 20x4 tilemap +INCBIN "gfx/overworld/magnet_train_fg.tilemap" diff --git a/engine/events/map_name_sign.asm b/engine/events/map_name_sign.asm new file mode 100644 index 0000000..3bf9e38 --- /dev/null +++ b/engine/events/map_name_sign.asm @@ -0,0 +1,259 @@ +DEF MAP_NAME_SIGN_START EQU $60 + +InitMapNameSign:: + xor a + ldh [hBGMapMode], a + farcall .inefficient_farcall ; this is a waste of 6 ROM bytes and 6 stack bytes + ret + +; should have just been a fallthrough +.inefficient_farcall + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetWorldMapLocation + ld [wCurLandmark], a + call .CheckNationalParkGate + jr z, .gate + + call GetMapEnvironment + cp GATE + jr nz, .not_gate + +.gate + ld a, -1 + ld [wCurLandmark], a + +.not_gate + ld hl, wEnteredMapFromContinue + bit 1, [hl] + res 1, [hl] + jr nz, .dont_do_map_sign + + call .CheckMovingWithinLandmark + jr z, .dont_do_map_sign + ld a, [wCurLandmark] + ld [wPrevLandmark], a + + call .CheckSpecialMap + jr z, .dont_do_map_sign + +; Display for 60 frames + ld a, 60 + ld [wLandmarkSignTimer], a + call LoadMapNameSignGFX + call InitMapNameFrame + farcall HDMATransfer_OnlyTopFourRows + ret + +.dont_do_map_sign + ld a, [wCurLandmark] + ld [wPrevLandmark], a + ld a, $90 + ldh [rWY], a + ldh [hWY], a + xor a + ldh [hLCDCPointer], a + ret + +.CheckMovingWithinLandmark: + ld a, [wCurLandmark] + ld c, a + ld a, [wPrevLandmark] + cp c + ret z + cp LANDMARK_SPECIAL + ret + +.CheckSpecialMap: +; These landmarks do not get pop-up signs. + cp -1 + ret z + cp LANDMARK_SPECIAL ; redundant check + ret z + cp LANDMARK_RADIO_TOWER + ret z + cp LANDMARK_LAV_RADIO_TOWER + ret z + cp LANDMARK_UNDERGROUND_PATH + ret z + cp LANDMARK_INDIGO_PLATEAU + ret z + cp LANDMARK_POWER_PLANT + ret z + ld a, 1 + and a + ret + +.CheckNationalParkGate: + ld a, [wMapGroup] + cp GROUP_ROUTE_35_NATIONAL_PARK_GATE + ret nz + ld a, [wMapNumber] + cp MAP_ROUTE_35_NATIONAL_PARK_GATE + ret z + cp MAP_ROUTE_36_NATIONAL_PARK_GATE + ret + +PlaceMapNameSign:: + ld hl, wLandmarkSignTimer + ld a, [hl] + and a + jr z, .disappear + dec [hl] + cp 60 + ret z + cp 59 + jr nz, .already_initialized + call InitMapNameFrame + call PlaceMapNameCenterAlign + farcall HDMATransfer_OnlyTopFourRows +.already_initialized + ld a, $80 + ld a, $70 + ldh [rWY], a + ldh [hWY], a + ret + +.disappear + ld a, $90 + ldh [rWY], a + ldh [hWY], a + xor a + ldh [hLCDCPointer], a + ret + +LoadMapNameSignGFX: + ld de, MapEntryFrameGFX + ld hl, vTiles2 tile MAP_NAME_SIGN_START + lb bc, BANK(MapEntryFrameGFX), 14 + call Get2bpp + ret + +InitMapNameFrame: + hlcoord 0, 0 + ld b, 2 + ld c, 18 + call InitMapSignAttrmap + call PlaceMapNameFrame + ret + +PlaceMapNameCenterAlign: + ld a, [wCurLandmark] + ld e, a + farcall GetLandmarkName + call .GetNameLength + ld a, SCREEN_WIDTH + sub c + srl a + ld b, 0 + ld c, a + hlcoord 0, 2 + add hl, bc + ld de, wStringBuffer1 + call PlaceString + ret + +.GetNameLength: + ld c, 0 + push hl + ld hl, wStringBuffer1 +.loop + ld a, [hli] + cp "@" + jr z, .stop + cp "%" + jr z, .loop + inc c + jr .loop +.stop + pop hl + ret + +InitMapSignAttrmap: + ld de, wAttrmap - wTilemap + add hl, de + inc b + inc b + inc c + inc c + ld a, PAL_BG_TEXT | PRIORITY +.loop + push bc + push hl +.inner_loop + ld [hli], a + dec c + jr nz, .inner_loop + pop hl + ld de, SCREEN_WIDTH + add hl, de + pop bc + dec b + jr nz, .loop + ret + +PlaceMapNameFrame: + hlcoord 0, 0 + ; top left + ld a, MAP_NAME_SIGN_START + 1 + ld [hli], a + ; top row + ld a, MAP_NAME_SIGN_START + 2 + call .FillTopBottom + ; top right + ld a, MAP_NAME_SIGN_START + 4 + ld [hli], a + ; left, first line + ld a, MAP_NAME_SIGN_START + 5 + ld [hli], a + ; first line + call .FillMiddle + ; right, first line + ld a, MAP_NAME_SIGN_START + 11 + ld [hli], a + ; left, second line + ld a, MAP_NAME_SIGN_START + 6 + ld [hli], a + ; second line + call .FillMiddle + ; right, second line + ld a, MAP_NAME_SIGN_START + 12 + ld [hli], a + ; bottom left + ld a, MAP_NAME_SIGN_START + 7 + ld [hli], a + ; bottom + ld a, MAP_NAME_SIGN_START + 8 + call .FillTopBottom + ; bottom right + ld a, MAP_NAME_SIGN_START + 10 + ld [hl], a + ret + +.FillMiddle: + ld c, SCREEN_WIDTH - 2 + ld a, MAP_NAME_SIGN_START + 13 +.loop + ld [hli], a + dec c + jr nz, .loop + ret + +.FillTopBottom: + ld c, (SCREEN_WIDTH - 2) / 4 + 1 + jr .enterloop + +.continueloop + ld [hli], a + ld [hli], a + +.enterloop + inc a + ld [hli], a + ld [hli], a + dec a + dec c + jr nz, .continueloop + ret diff --git a/engine/events/misc_scripts.asm b/engine/events/misc_scripts.asm new file mode 100644 index 0000000..24e4088 --- /dev/null +++ b/engine/events/misc_scripts.asm @@ -0,0 +1,55 @@ +Script_AbortBugContest: + checkflag ENGINE_BUG_CONTEST_TIMER + iffalse .finish + setflag ENGINE_DAILY_BUG_CONTEST + special ContestReturnMons +.finish + end + +FindItemInBallScript:: + callasm .TryReceiveItem + iffalse .no_room + disappear LAST_TALKED + opentext + writetext .FoundItemText + playsound SFX_ITEM + pause 60 + itemnotify + closetext + end + +.no_room + opentext + writetext .FoundItemText + waitbutton + writetext .CantCarryItemText + waitbutton + closetext + end + +.FoundItemText: + text_far _FoundItemText + text_end + +.CantCarryItemText: + text_far _CantCarryItemText + text_end + +.TryReceiveItem: + xor a + ld [wScriptVar], a + ld a, [wItemBallItemID] + ld [wNamedObjectIndex], a + call GetItemName + ld hl, wStringBuffer3 + call CopyName2 + ld a, [wItemBallItemID] + ld [wCurItem], a + ld a, [wItemBallQuantity] + ld [wItemQuantityChange], a + ld hl, wNumItems + call ReceiveItem + ret nc + ld a, $1 + ld [wScriptVar], a + ret diff --git a/engine/events/mom.asm b/engine/events/mom.asm new file mode 100644 index 0000000..194bae2 --- /dev/null +++ b/engine/events/mom.asm @@ -0,0 +1,664 @@ +BankOfMom: + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + xor a + ld [wJumptableIndex], a +.loop + ld a, [wJumptableIndex] + bit 7, a + jr nz, .done + call .RunJumptable + jr .loop + +.done + pop af + ldh [hInMenu], a + ret + +.RunJumptable: + jumptable .dw, wJumptableIndex + +.dw + dw .CheckIfBankInitialized + dw .InitializeBank + dw .IsThisAboutYourMoney + dw .AccessBankOfMom + dw .StoreMoney + dw .TakeMoney + dw .StopOrStartSavingMoney + dw .JustDoWhatYouCan + dw .AskDST + +.CheckIfBankInitialized: + ld a, [wMomSavingMoney] + bit MOM_ACTIVE_F, a + jr nz, .savingmoneyalready + set MOM_ACTIVE_F, a + ld [wMomSavingMoney], a + ld a, $1 + jr .done_0 + +.savingmoneyalready + ld a, $2 + +.done_0 + ld [wJumptableIndex], a + ret + +.InitializeBank: + ld hl, MomLeavingText1 + call PrintText + call YesNoBox + jr c, .DontSaveMoney + ld hl, MomLeavingText2 + call PrintText + ld a, (1 << MOM_ACTIVE_F) | (1 << MOM_SAVING_SOME_MONEY_F) + jr .done_1 + +.DontSaveMoney: + ld a, 1 << MOM_ACTIVE_F + +.done_1 + ld [wMomSavingMoney], a + ld hl, MomLeavingText3 + call PrintText + ld a, $8 + ld [wJumptableIndex], a + ret + +.IsThisAboutYourMoney: + ld hl, MomIsThisAboutYourMoneyText + call PrintText + call YesNoBox + jr c, .nope + ld a, $3 + jr .done_2 + +.nope + call DSTChecks + ld a, $7 + +.done_2 + ld [wJumptableIndex], a + ret + +.AccessBankOfMom: + ld hl, MomBankWhatDoYouWantToDoText + call PrintText + call LoadStandardMenuHeader + ld hl, BankOfMom_MenuHeader + call CopyMenuHeader + call VerticalMenu + call CloseWindow + jr c, .cancel + ld a, [wMenuCursorY] + cp $1 + jr z, .withdraw + cp $2 + jr z, .deposit + cp $3 + jr z, .stopsaving + +.cancel + ld a, $7 + jr .done_3 + +.withdraw + ld a, $5 + jr .done_3 + +.deposit + ld a, $4 + jr .done_3 + +.stopsaving + ld a, $6 + +.done_3 + ld [wJumptableIndex], a + ret + +.StoreMoney: + ld hl, MomStoreMoneyText + call PrintText + xor a + ld hl, wStringBuffer2 + ld [hli], a + ld [hli], a + ld [hl], a + ld a, 5 + ld [wMomBankDigitCursorPosition], a + call LoadStandardMenuHeader + call Mom_SetUpDepositMenu + call Mom_Wait10Frames + call Mom_WithdrawDepositMenuJoypad + call CloseWindow + jr c, .CancelDeposit + ld hl, wStringBuffer2 + ld a, [hli] + or [hl] + inc hl + or [hl] + jr z, .CancelDeposit + ld de, wMoney + ld bc, wStringBuffer2 + farcall CompareMoney + jr c, .InsufficientFundsInWallet + ld hl, wStringBuffer2 + ld de, wStringBuffer2 + 3 + ld bc, 3 + call CopyBytes + ld bc, wMomsMoney + ld de, wStringBuffer2 + farcall GiveMoney + jr c, .NotEnoughRoomInBank + ld bc, wStringBuffer2 + 3 + ld de, wMoney + farcall TakeMoney + ld hl, wStringBuffer2 + ld de, wMomsMoney + ld bc, 3 + call CopyBytes + ld de, SFX_TRANSACTION + call PlaySFX + call WaitSFX + ld hl, MomStoredMoneyText + call PrintText + ld a, $8 + jr .done_4 + +.InsufficientFundsInWallet: + ld hl, MomInsufficientFundsInWalletText + call PrintText + ret + +.NotEnoughRoomInBank: + ld hl, MomNotEnoughRoomInBankText + call PrintText + ret + +.CancelDeposit: + ld a, $7 + +.done_4 + ld [wJumptableIndex], a + ret + +.TakeMoney: + ld hl, MomTakeMoneyText + call PrintText + xor a + ld hl, wStringBuffer2 + ld [hli], a + ld [hli], a + ld [hl], a + ld a, 5 + ld [wMomBankDigitCursorPosition], a + call LoadStandardMenuHeader + call Mom_SetUpWithdrawMenu + call Mom_Wait10Frames + call Mom_WithdrawDepositMenuJoypad + call CloseWindow + jr c, .CancelWithdraw + ld hl, wStringBuffer2 + ld a, [hli] + or [hl] + inc hl + or [hl] + jr z, .CancelWithdraw + ld hl, wStringBuffer2 + ld de, wStringBuffer2 + 3 + ld bc, 3 + call CopyBytes + ld de, wMomsMoney + ld bc, wStringBuffer2 + farcall CompareMoney + jr c, .InsufficientFundsInBank + ld bc, wMoney + ld de, wStringBuffer2 + farcall GiveMoney + jr c, .NotEnoughRoomInWallet + ld bc, wStringBuffer2 + 3 + ld de, wMomsMoney + farcall TakeMoney + ld hl, wStringBuffer2 + ld de, wMoney + ld bc, 3 + call CopyBytes + ld de, SFX_TRANSACTION + call PlaySFX + call WaitSFX + ld hl, MomTakenMoneyText + call PrintText + ld a, $8 + jr .done_5 + +.InsufficientFundsInBank: + ld hl, MomHaventSavedThatMuchText + call PrintText + ret + +.NotEnoughRoomInWallet: + ld hl, MomNotEnoughRoomInWalletText + call PrintText + ret + +.CancelWithdraw: + ld a, $7 + +.done_5 + ld [wJumptableIndex], a + ret + +.StopOrStartSavingMoney: + ld hl, MomSaveMoneyText + call PrintText + call YesNoBox + jr c, .StopSavingMoney + ld a, (1 << MOM_ACTIVE_F) | (1 << MOM_SAVING_SOME_MONEY_F) + ld [wMomSavingMoney], a + ld hl, MomStartSavingMoneyText + call PrintText + ld a, $8 + ld [wJumptableIndex], a + ret + +.StopSavingMoney: + ld a, 1 << MOM_ACTIVE_F + ld [wMomSavingMoney], a + ld a, $7 + ld [wJumptableIndex], a + ret + +.JustDoWhatYouCan: + ld hl, MomJustDoWhatYouCanText + call PrintText + +.AskDST: + ld hl, wJumptableIndex + set 7, [hl] + ret + +DSTChecks: +; check the time; avoid changing DST if doing so would change the current day + ld a, [wDST] + bit 7, a + ldh a, [hHours] + jr z, .NotDST + and a ; within one hour of 00:00? + jr z, .LostBooklet + jr .loop + +.NotDST: + cp 23 ; within one hour of 23:00? + jr nz, .loop + ; fallthrough + +.LostBooklet: + call .ClearBox + bccoord 1, 14 + ld hl, .TimesetAskAdjustDSTText + call PlaceHLTextAtBC + call YesNoBox + ret c + call .ClearBox + bccoord 1, 14 + ld hl, .MomLostGearBookletText + call PlaceHLTextAtBC + ret + +.loop + call .ClearBox + bccoord 1, 14 + ld a, [wDST] + bit 7, a + jr z, .SetDST + ld hl, .TimesetAskNotDSTText + call PlaceHLTextAtBC + call YesNoBox + ret c + ld a, [wDST] + res 7, a + ld [wDST], a + call .SetClockBack + call .ClearBox + bccoord 1, 14 + ld hl, .TimesetNotDSTText + call PlaceHLTextAtBC + ret + +.SetDST: + ld hl, .TimesetAskDSTText + call PlaceHLTextAtBC + call YesNoBox + ret c + ld a, [wDST] + set 7, a + ld [wDST], a + call .SetClockForward + call .ClearBox + bccoord 1, 14 + ld hl, .TimesetDSTText + call PlaceHLTextAtBC + ret + +.SetClockForward: + ld a, [wStartHour] + add 1 + sub 24 + jr nc, .DontLoopHourForward + add 24 +.DontLoopHourForward: + ld [wStartHour], a + ccf + ld a, [wStartDay] + adc 0 + ld [wStartDay], a + ret + +.SetClockBack: + ld a, [wStartHour] + sub 1 + jr nc, .DontLoopHourBack + add 24 +.DontLoopHourBack: + ld [wStartHour], a + ld a, [wStartDay] + sbc 0 + jr nc, .DontLoopDayBack + add 7 +.DontLoopDayBack: + ld [wStartDay], a + ret + +.ClearBox: + hlcoord 1, 14 + lb bc, 3, 18 + call ClearBox + ret + +.TimesetAskAdjustDSTText: + text_far _TimesetAskAdjustDSTText + text_end + +.MomLostGearBookletText: + text_far _MomLostGearBookletText + text_end + +.TimesetAskDSTText: + text_far _TimesetAskDSTText + text_end + +.TimesetDSTText: + text_far _TimesetDSTText + text_end + +.TimesetAskNotDSTText: + text_far _TimesetAskNotDSTText + text_end + +.TimesetNotDSTText: + text_far _TimesetNotDSTText + text_end + +Mom_SetUpWithdrawMenu: + ld de, Mon_WithdrawString + jr Mom_ContinueMenuSetup + +Mom_SetUpDepositMenu: + ld de, Mom_DepositString +Mom_ContinueMenuSetup: + push de + xor a + ldh [hBGMapMode], a + hlcoord 0, 0 + lb bc, 6, 18 + call Textbox + hlcoord 1, 2 + ld de, Mom_SavedString + call PlaceString + hlcoord 12, 2 + ld de, wMomsMoney + lb bc, PRINTNUM_MONEY | 3, 6 + call PrintNum + hlcoord 1, 4 + ld de, Mom_HeldString + call PlaceString + hlcoord 12, 4 + ld de, wMoney + lb bc, PRINTNUM_MONEY | 3, 6 + call PrintNum + hlcoord 1, 6 + pop de + call PlaceString + hlcoord 12, 6 + ld de, wStringBuffer2 + lb bc, PRINTNUM_MONEY | PRINTNUM_LEADINGZEROS | 3, 6 + call PrintNum + call UpdateSprites + call CGBOnly_CopyTilemapAtOnce + ret + +Mom_Wait10Frames: + ld c, 10 + call DelayFrames + ret + +Mom_WithdrawDepositMenuJoypad: +.loop + call JoyTextDelay + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .pressedB + ld a, [hl] + and A_BUTTON + jr nz, .pressedA + call .dpadaction + xor a + ldh [hBGMapMode], a + hlcoord 12, 6 + ld bc, 7 + ld a, " " + call ByteFill + hlcoord 12, 6 + ld de, wStringBuffer2 + lb bc, PRINTNUM_MONEY | PRINTNUM_LEADINGZEROS | 3, 6 + call PrintNum + ldh a, [hVBlankCounter] + and $10 + jr nz, .skip + hlcoord 13, 6 + ld a, [wMomBankDigitCursorPosition] + ld c, a + ld b, 0 + add hl, bc + ld [hl], " " + +.skip + call WaitBGMap + jr .loop + +.pressedB + scf + ret + +.pressedA + and a + ret + +.dpadaction + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .incrementdigit + ld a, [hl] + and D_DOWN + jr nz, .decrementdigit + ld a, [hl] + and D_LEFT + jr nz, .movecursorleft + ld a, [hl] + and D_RIGHT + jr nz, .movecursorright + and a + ret + +.movecursorleft + ld hl, wMomBankDigitCursorPosition + ld a, [hl] + and a + ret z + dec [hl] + ret + +.movecursorright + ld hl, wMomBankDigitCursorPosition + ld a, [hl] + cp 5 + ret nc + inc [hl] + ret + +.incrementdigit + ld hl, .DigitQuantities + call .getdigitquantity + ld c, l + ld b, h + ld de, wStringBuffer2 + farcall GiveMoney + ret + +.decrementdigit + ld hl, .DigitQuantities + call .getdigitquantity + ld c, l + ld b, h + ld de, wStringBuffer2 + farcall TakeMoney + ret + +.getdigitquantity + ld a, [wMomBankDigitCursorPosition] + push de + ld e, a + ld d, 0 + add hl, de + add hl, de + add hl, de + pop de + ret + +.DigitQuantities: + dt 100000 + dt 10000 + dt 1000 + dt 100 + dt 10 + dt 1 + + dt 100000 + dt 10000 + dt 1000 + dt 100 + dt 10 + dt 1 + + dt 900000 + dt 90000 + dt 9000 + dt 900 + dt 90 + dt 9 + +MomLeavingText1: + text_far _MomLeavingText1 + text_end + +MomLeavingText2: + text_far _MomLeavingText2 + text_end + +MomLeavingText3: + text_far _MomLeavingText3 + text_end + +MomIsThisAboutYourMoneyText: + text_far _MomIsThisAboutYourMoneyText + text_end + +MomBankWhatDoYouWantToDoText: + text_far _MomBankWhatDoYouWantToDoText + text_end + +MomStoreMoneyText: + text_far _MomStoreMoneyText + text_end + +MomTakeMoneyText: + text_far _MomTakeMoneyText + text_end + +MomSaveMoneyText: + text_far _MomSaveMoneyText + text_end + +MomHaventSavedThatMuchText: + text_far _MomHaventSavedThatMuchText + text_end + +MomNotEnoughRoomInWalletText: + text_far _MomNotEnoughRoomInWalletText + text_end + +MomInsufficientFundsInWalletText: + text_far _MomInsufficientFundsInWalletText + text_end + +MomNotEnoughRoomInBankText: + text_far _MomNotEnoughRoomInBankText + text_end + +MomStartSavingMoneyText: + text_far _MomStartSavingMoneyText + text_end + +MomStoredMoneyText: + text_far _MomStoredMoneyText + text_end + +MomTakenMoneyText: + text_far _MomTakenMoneyText + text_end + +MomJustDoWhatYouCanText: + text_far _MomJustDoWhatYouCanText + text_end + +Mom_SavedString: + db "SAVED@" + +Mon_WithdrawString: + db "WITHDRAW@" + +Mom_DepositString: + db "DEPOSIT@" + +Mom_HeldString: + db "HELD@" + +BankOfMom_MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 10, 10 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 4 ; items + db "GET@" + db "SAVE@" + db "CHANGE@" + db "CANCEL@" diff --git a/engine/events/mom_phone.asm b/engine/events/mom_phone.asm new file mode 100644 index 0000000..c8408ba --- /dev/null +++ b/engine/events/mom_phone.asm @@ -0,0 +1,239 @@ +DEF NUM_MOM_ITEMS_1 EQUS "((MomItems_1.End - MomItems_1) / 8)" +DEF NUM_MOM_ITEMS_2 EQUS "((MomItems_2.End - MomItems_2) / 8)" + + const_def 1 + const MOM_ITEM + const MOM_DOLL + +MomTriesToBuySomething:: + ld a, [wMapReentryScriptQueueFlag] + and a + ret nz + call GetMapPhoneService + and a + ret nz + xor a + ld [wWhichMomItemSet], a + call CheckBalance_MomItem2 + ret nc + call Mom_GiveItemOrDoll + ret nc + ld b, BANK(.Script) + ld de, .Script + farcall LoadScriptBDE + scf + ret + +.Script: + callasm .ASMFunction + farsjump Script_ReceivePhoneCall + +.ASMFunction: + call MomBuysItem_DeductFunds + call Mom_GetScriptPointer + ld a, [wWhichMomItemSet] + and a + jr nz, .ok + ld hl, wWhichMomItem + inc [hl] +.ok + ld a, PHONE_MOM + ld [wCurCaller], a + ld bc, wCallerContact + ld hl, PHONE_CONTACT_TRAINER_CLASS + add hl, bc + ld [hl], TRAINER_NONE + inc hl + ld [hl], PHONE_MOM + ld hl, PHONE_CONTACT_SCRIPT2_BANK + add hl, bc + ld a, BANK(Mom_GetScriptPointer) + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ret + +CheckBalance_MomItem2: + ld a, [wWhichMomItem] + cp NUM_MOM_ITEMS_2 + jr nc, .nope + call GetItemFromMom + ld a, [hli] + ldh [hMoneyTemp], a + ld a, [hli] + ldh [hMoneyTemp + 1], a + ld a, [hli] + ldh [hMoneyTemp + 2], a + ld de, wMomsMoney + ld bc, hMoneyTemp + farcall CompareMoney + jr nc, .have_enough_money + +.nope + jr .check_have_2300 + +.have_enough_money + scf + ret + +.check_have_2300 + ld hl, hMoneyTemp + ld [hl], HIGH(MOM_MONEY >> 8) + inc hl + ld [hl], HIGH(MOM_MONEY) ; mid + inc hl + ld [hl], LOW(MOM_MONEY) +.loop + ld de, wMomItemTriggerBalance + ld bc, wMomsMoney + farcall CompareMoney + jr z, .exact + jr nc, .less_than + call .AddMoney + jr .loop + +.less_than + xor a + ret + +.exact + call .AddMoney + ld a, NUM_MOM_ITEMS_1 + call RandomRange + inc a + ld [wWhichMomItemSet], a + scf + ret + +.AddMoney: + ld de, wMomItemTriggerBalance + ld bc, hMoneyTemp + farcall AddMoney + ret + +MomBuysItem_DeductFunds: + call GetItemFromMom + ld de, 3 ; cost + add hl, de + ld a, [hli] + ldh [hMoneyTemp], a + ld a, [hli] + ldh [hMoneyTemp + 1], a + ld a, [hli] + ldh [hMoneyTemp + 2], a + ld de, wMomsMoney + ld bc, hMoneyTemp + farcall TakeMoney + ret + +Mom_GiveItemOrDoll: + call GetItemFromMom + ld de, 6 ; item type + add hl, de + ld a, [hli] + cp MOM_ITEM + jr z, .not_doll + ld a, [hl] + ld c, a + ld b, 1 + farcall DecorationFlagAction_c + scf + ret + +.not_doll + ld a, [hl] + ld [wCurItem], a + ld a, 1 + ld [wItemQuantityChange], a + ld hl, wNumPCItems + call ReceiveItem + ret + +Mom_GetScriptPointer: + call GetItemFromMom + ld de, 6 ; item type + add hl, de + ld a, [hli] + ld de, .ItemScript + cp MOM_ITEM + ret z + ld de, .DollScript + ret + +.ItemScript: + writetext MomHiHowAreYouText + writetext MomFoundAnItemText + writetext MomBoughtWithYourMoneyText + writetext MomItsInPCText + end + +.DollScript: + writetext MomHiHowAreYouText + writetext MomFoundADollText + writetext MomBoughtWithYourMoneyText + writetext MomItsInYourRoomText + end + +GetItemFromMom: + ld a, [wWhichMomItemSet] + and a + jr z, .zero + dec a + ld de, MomItems_1 + jr .GetFromList1 + +.zero + ld a, [wWhichMomItem] + cp NUM_MOM_ITEMS_2 + jr c, .ok + xor a + +.ok + ld de, MomItems_2 + +.GetFromList1: + ld l, a + ld h, 0 +rept 3 ; multiply hl by 8 + add hl, hl +endr + add hl, de + ret + +INCLUDE "data/items/mom_phone.asm" + +MomHiHowAreYouText: + text_far _MomHiHowAreYouText + text_end + +MomFoundAnItemText: + text_far _MomFoundAnItemText + text_end + +MomBoughtWithYourMoneyText: + text_far _MomBoughtWithYourMoneyText + text_end + +MomItsInPCText: + text_far _MomItsInPCText + text_end + +MomFoundADollText: + text_far _MomFoundADollText + text_end + +MomItsInYourRoomText: + text_far _MomItsInYourRoomText + text_end + + +DummyPredef3A_DummyData: ; unreferenced + db 0 + +DummyPredef3A: + ret + +DummyPredef3A_DummyFunction: ; unreferenced + ret diff --git a/engine/events/money.asm b/engine/events/money.asm new file mode 100644 index 0000000..c8f9d05 --- /dev/null +++ b/engine/events/money.asm @@ -0,0 +1,209 @@ +GiveMoney:: + ld a, 3 + call AddMoney + ld bc, MaxMoney + ld a, 3 + call CompareMoney + jr z, .not_maxed_out + jr c, .not_maxed_out + ld hl, MaxMoney + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + scf + ret + +.not_maxed_out + and a + ret + +MaxMoney: + dt MAX_MONEY + +TakeMoney:: + ld a, 3 + call SubtractMoney + jr nc, .okay + ; leave with 0 money + xor a + ld [de], a + inc de + ld [de], a + inc de + ld [de], a + scf + ret + +.okay + and a + ret + +CompareMoney:: + ld a, 3 +CompareFunds: +; a: number of bytes +; bc: start addr of amount (big-endian) +; de: start addr of account (big-endian) + push hl + push de + push bc + ld h, b + ld l, c + ld c, 0 + ld b, a +.loop1 + dec a + jr z, .done + inc de + inc hl + jr .loop1 + +.done + and a +.loop2 + ld a, [de] + sbc [hl] + jr z, .okay + inc c + +.okay + dec de + dec hl + dec b + jr nz, .loop2 + jr c, .set_carry + ld a, c + and a + jr .skip_carry + +.set_carry + ld a, 1 + and a + scf +.skip_carry + pop bc + pop de + pop hl + ret + +SubtractMoney: + ld a, 3 +SubtractFunds: +; a: number of bytes +; bc: start addr of amount (big-endian) +; de: start addr of account (big-endian) + push hl + push de + push bc + ld h, b + ld l, c + ld b, a + ld c, 0 +.loop + dec a + jr z, .done + inc de + inc hl + jr .loop + +.done + and a +.loop2 + ld a, [de] + sbc [hl] + ld [de], a + dec de + dec hl + dec b + jr nz, .loop2 + pop bc + pop de + pop hl + ret + +AddMoney: + ld a, 3 +AddFunds: +; a: number of bytes +; bc: start addr of amount (big-endian) +; de: start addr of account (big-endian) + push hl + push de + push bc + + ld h, b + ld l, c + ld b, a +.loop1 + dec a + jr z, .done + inc de + inc hl + jr .loop1 + +.done + and a +.loop2 + ld a, [de] + adc [hl] + ld [de], a + dec de + dec hl + dec b + jr nz, .loop2 + + pop bc + pop de + pop hl + ret + +GiveCoins:: + ld a, 2 + ld de, wCoins + call AddFunds + ld a, 2 + ld bc, .maxcoins + call CompareFunds + jr c, .not_maxed + ld hl, .maxcoins + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + scf + ret + +.not_maxed + and a + ret + +.maxcoins + bigdw MAX_COINS + +TakeCoins:: + ld a, 2 + ld de, wCoins + call SubtractFunds + jr nc, .okay + ; leave with 0 coins + xor a + ld [de], a + inc de + ld [de], a + scf + ret + +.okay + and a + ret + +CheckCoins:: + ld a, 2 + ld de, wCoins + jp CompareFunds diff --git a/engine/events/move_deleter.asm b/engine/events/move_deleter.asm new file mode 100644 index 0000000..2d6841e --- /dev/null +++ b/engine/events/move_deleter.asm @@ -0,0 +1,150 @@ +MoveDeletion: + ld hl, .DeleterIntroText + call PrintText + call YesNoBox + jr c, .declined + ld hl, .DeleterAskWhichMonText + call PrintText + farcall SelectMonFromParty + jr c, .declined + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + ld a, [wCurPartyMon] + ld hl, wPartyMon1Moves + 1 + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld a, [hl] + and a + jr z, .onlyonemove + ld hl, .DeleterAskWhichMoveText + call PrintText + call LoadStandardMenuHeader + farcall ChooseMoveToDelete + push af + call ReturnToMapWithSpeechTextbox + pop af + jr c, .declined + ld a, [wMenuCursorY] + push af + ld a, [wCurSpecies] + ld [wNamedObjectIndex], a + call GetMoveName + ld hl, .AskDeleteMoveText + call PrintText + call YesNoBox + pop bc + jr c, .declined + call .DeleteMove + call WaitSFX + ld de, SFX_MOVE_DELETED + call PlaySFX + call WaitSFX + ld hl, .DeleterForgotMoveText + call PrintText + ret + +.egg + ld hl, .MailEggText + call PrintText + ret + +.declined + ld hl, .DeleterNoComeAgainText + call PrintText + ret + +.onlyonemove + ld hl, .MoveKnowsOneText + call PrintText + ret + +.MoveKnowsOneText: + text_far _MoveKnowsOneText + text_end + +.AskDeleteMoveText: + text_far _AskDeleteMoveText + text_end + +.DeleterForgotMoveText: + text_far _DeleterForgotMoveText + text_end + +.MailEggText: + text_far _DeleterEggText + text_end + +.DeleterNoComeAgainText: + text_far _DeleterNoComeAgainText + text_end + +.DeleterAskWhichMoveText: + text_far _DeleterAskWhichMoveText + text_end + +.DeleterIntroText: + text_far _DeleterIntroText + text_end + +.DeleterAskWhichMonText: + text_far _DeleterAskWhichMonText + text_end + +.DeleteMove: + ld a, b + push bc + dec a + ld c, a + ld b, 0 + ld hl, wPartyMon1Moves + add hl, bc + ld a, [wCurPartyMon] + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + pop bc + push bc + inc b +.loop + ld a, b + cp NUM_MOVES + 1 + jr z, .okay + inc hl + ld a, [hld] + ld [hl], a + inc hl + inc b + jr .loop + +.okay + xor a + ld [hl], a + pop bc + + ld a, b + push bc + dec a + ld c, a + ld b, 0 + ld hl, wPartyMon1PP + add hl, bc + ld a, [wCurPartyMon] + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + pop bc + inc b +.loop2 + ld a, b + cp NUM_MOVES + 1 + jr z, .done + inc hl + ld a, [hld] + ld [hl], a + inc hl + inc b + jr .loop2 + +.done + xor a + ld [hl], a + ret diff --git a/engine/events/move_tutor.asm b/engine/events/move_tutor.asm new file mode 100644 index 0000000..f59f23d --- /dev/null +++ b/engine/events/move_tutor.asm @@ -0,0 +1,98 @@ +MoveTutor: + call FadeToMenu + call ClearBGPalettes + call ClearScreen + call DelayFrame + ld b, SCGB_PACKPALS + call GetSGBLayout + xor a + ld [wItemAttributeValue], a + call .GetMoveTutorMove + ld [wNamedObjectIndex], a + ld [wPutativeTMHMMove], a + call GetMoveName + call CopyName1 + farcall ChooseMonToLearnTMHM + jr c, .cancel + jr .enter_loop + +.loop + farcall ChooseMonToLearnTMHM_NoRefresh + jr c, .cancel +.enter_loop + call CheckCanLearnMoveTutorMove + jr nc, .loop + xor a ; FALSE + ld [wScriptVar], a + jr .quit + +.cancel + ld a, -1 + ld [wScriptVar], a +.quit + call CloseSubmenu + ret + +.GetMoveTutorMove: + ld a, [wScriptVar] + cp MOVETUTOR_FLAMETHROWER + ld hl, FLAMETHROWER + jr z, .ok + cp MOVETUTOR_THUNDERBOLT + ld hl, THUNDERBOLT + jr z, .ok + ; MOVETUTOR_ICE_BEAM + ld hl, ICE_BEAM +.ok + jp GetMoveIDFromIndex + +CheckCanLearnMoveTutorMove: + ld hl, .MenuHeader + call LoadMenuHeader + + predef CanLearnTMHMMove + + push bc + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames + call GetNickname + pop bc + + ld a, c + and a + jr nz, .can_learn + push de + ld de, SFX_WRONG + call PlaySFX + pop de + ld a, BANK(TMHMNotCompatibleText) + ld hl, TMHMNotCompatibleText + call FarPrintText + jr .didnt_learn + +.can_learn + callfar KnowsMove + jr c, .didnt_learn + + predef LearnMove + ld a, b + and a + jr z, .didnt_learn + + ld c, HAPPINESS_LEARNMOVE + callfar ChangeHappiness + jr .learned + +.didnt_learn + call ExitMenu + and a + ret + +.learned + call ExitMenu + scf + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 diff --git a/engine/events/name_rater.asm b/engine/events/name_rater.asm new file mode 100644 index 0000000..9b6ae6b --- /dev/null +++ b/engine/events/name_rater.asm @@ -0,0 +1,219 @@ +_NameRater: +; Introduce himself + ld hl, NameRaterHelloText + call PrintText + call YesNoBox + jp c, .cancel +; Select a Pokemon from your party + ld hl, NameRaterWhichMonText + call PrintText + farcall SelectMonFromParty + jr c, .cancel +; He can't rename an egg... + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg +; ... or a Pokemon you got from a trade. + call GetCurNickname + call CheckIfMonIsYourOT + jr c, .traded +; This name is good, but we can do better. How about it? + ld hl, NameRaterBetterNameText + call PrintText + call YesNoBox + jr c, .cancel +; What name shall I give it then? + ld hl, NameRaterWhatNameText + call PrintText +; Load the new nickname into wStringBuffer2 + xor a ; PARTYMON + ld [wMonType], a + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + ld [wCurSpecies], a + call GetBaseData + ld b, NAME_MON + ld de, wStringBuffer2 + farcall _NamingScreen +; If the new name is empty, treat it as unchanged. + call IsNewNameEmpty + ld hl, NameRaterSameNameText + jr c, .samename +; If the new name is the same as the old name, treat it as unchanged. + call CompareNewToOld + ld hl, NameRaterSameNameText + jr c, .samename +; Copy the new name from wStringBuffer2 + ld hl, wPartyMonNicknames + ld bc, MON_NAME_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld e, l + ld d, h + ld hl, wStringBuffer2 + ld bc, MON_NAME_LENGTH + call CopyBytes + ld hl, NameRaterFinishedText + +.samename + push hl + call GetCurNickname + ld hl, NameRaterNamedText + call PrintText + pop hl + jr .done + +.traded + ld hl, NameRaterPerfectNameText + jr .done + +.cancel + ld hl, NameRaterComeAgainText + jr .done + +.egg + ld hl, NameRaterEggText + +.done + call PrintText + ret + +CheckIfMonIsYourOT: +; Checks to see if the partymon loaded in [wCurPartyMon] has the different OT as you. Returns carry if not. + ld hl, wPartyMonOTs + ld bc, NAME_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld de, wPlayerName + ld c, NAME_LENGTH + call .loop + jr c, .nope + + ld hl, wPartyMon1ID + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld de, wPlayerID + ld c, 2 ; number of bytes in which your ID is stored +.loop + ld a, [de] + cp [hl] + jr nz, .nope + inc hl + inc de + dec c + jr nz, .loop + and a + ret + +.nope + scf + ret + +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 +.loop + ld a, [hli] + cp "@" + jr z, .terminator + cp " " + jr nz, .nonspace + dec c + jr nz, .loop + +.terminator + scf + ret + +.nonspace + and a + ret + +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 + ld a, [wCurPartyMon] + call AddNTimes + push hl + call GetNicknamenameLength + ld b, c + ld hl, wStringBuffer2 + call GetNicknamenameLength + pop hl + ld a, c + cp b + jr nz, .different + ld de, wStringBuffer2 +.loop + ld a, [de] + cp "@" + jr z, .terminator + cp [hl] + jr nz, .different + inc hl + inc de + jr .loop + +.different + and a + ret + +.terminator + scf + ret + +GetNicknamenameLength: +; Gets the length of the name starting at hl and returns it in c. + ld c, 0 +.loop + ld a, [hli] + cp "@" + ret z + inc c + ld a, c + cp MON_NAME_LENGTH - 1 + jr nz, .loop + ret + +NameRaterHelloText: + text_far _NameRaterHelloText + text_end + +NameRaterWhichMonText: + text_far _NameRaterWhichMonText + text_end + +NameRaterBetterNameText: + text_far _NameRaterBetterNameText + text_end + +NameRaterWhatNameText: + text_far _NameRaterWhatNameText + text_end + +NameRaterFinishedText: + text_far _NameRaterFinishedText + text_end + +NameRaterComeAgainText: + text_far _NameRaterComeAgainText + text_end + +NameRaterPerfectNameText: + text_far _NameRaterPerfectNameText + text_end + +NameRaterEggText: + text_far _NameRaterEggText + text_end + +NameRaterSameNameText: + text_far _NameRaterSameNameText + text_end + +NameRaterNamedText: + text_far _NameRaterNamedText + text_end diff --git a/engine/events/npc_trade.asm b/engine/events/npc_trade.asm new file mode 100644 index 0000000..9559aca --- /dev/null +++ b/engine/events/npc_trade.asm @@ -0,0 +1,544 @@ +NPCTrade:: + ld a, e + ld [wJumptableIndex], a + + ld e, NPCTRADE_GIVEMON + call GetTradeAttr + ld a, [hli] + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + ld l, LOCKED_MON_ID_TRADE_SEND + call LockPokemonID + + ld e, NPCTRADE_GETMON + call GetTradeAttr + ld a, [hli] + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + ld l, LOCKED_MON_ID_TRADE_RECEIVE + call LockPokemonID + + call Trade_GetDialog + ld b, CHECK_FLAG + call TradeFlagAction + ld a, TRADE_DIALOG_AFTER + jr nz, .done + + ld a, TRADE_DIALOG_INTRO + call PrintTradeText + + call YesNoBox + ld a, TRADE_DIALOG_CANCEL + jr c, .done + +; Select givemon from party + ld b, PARTYMENUACTION_GIVE_MON + farcall SelectTradeOrDayCareMon + ld a, TRADE_DIALOG_CANCEL + jr c, .done + + ld a, LOCKED_MON_ID_TRADE_SEND + call GetLockedPokemonID + ld hl, wCurPartySpecies + cp [hl] + ld a, TRADE_DIALOG_WRONG + jr nz, .done + + call CheckTradeGender + ld a, TRADE_DIALOG_WRONG + jr c, .done + + ld b, SET_FLAG + call TradeFlagAction + + ld hl, NPCTradeCableText + call PrintText + + call DoNPCTrade + call .TradeAnimation + call GetTradeMonNames + + ld hl, TradedForText + call PrintText + + call RestartMapMusic + + ld a, TRADE_DIALOG_COMPLETE + +.done + call PrintTradeText + + xor a + ld l, LOCKED_MON_ID_TRADE_SEND + call LockPokemonID + ld l, LOCKED_MON_ID_TRADE_RECEIVE + jp LockPokemonID + +.TradeAnimation: + call DisableSpriteUpdates + ld a, [wJumptableIndex] + push af + ; wTradeDialog aliases wFrameCounter, which TradeAnimation uses + ld a, [wTradeDialog] + push af + predef TradeAnimation + pop af + ld [wTradeDialog], a + pop af + ld [wJumptableIndex], a + call ReturnToMapWithSpeechTextbox + ret + +CheckTradeGender: + xor a + ld [wMonType], a + + ld e, NPCTRADE_GENDER + call GetTradeAttr + ld a, [hl] + and a ; TRADE_GENDER_EITHER + jr z, .matching + cp TRADE_GENDER_MALE + jr z, .check_male + ; TRADE_GENDER_FEMALE + farcall GetGender + jr nz, .not_matching + jr .matching + +.check_male + farcall GetGender + jr z, .not_matching + +.matching + and a + ret + +.not_matching + scf + ret + +TradeFlagAction: + ld hl, wTradeFlags + ld a, [wJumptableIndex] + ld c, a + predef SmallFarFlagAction + ld a, c + and a + ret + +Trade_GetDialog: + ld e, NPCTRADE_DIALOG + call GetTradeAttr + ld a, [hl] + ld [wTradeDialog], a + ret + +DoNPCTrade: + ld a, LOCKED_MON_ID_TRADE_SEND + call GetLockedPokemonID + ld [wPlayerTrademonSpecies], a + + ld a, LOCKED_MON_ID_TRADE_RECEIVE + call GetLockedPokemonID + ld [wOTTrademonSpecies], a + + ld a, [wPlayerTrademonSpecies] + ld de, wPlayerTrademonSpeciesName + call GetTradeMonName + ld c, MON_NAME_LENGTH + call CopyStringWithTerminator + + ld a, [wOTTrademonSpecies] + ld de, wOTTrademonSpeciesName + call GetTradeMonName + ld c, MON_NAME_LENGTH + call CopyStringWithTerminator + + ld hl, wPartyMonOTs + ld bc, NAME_LENGTH + call Trade_GetAttributeOfCurrentPartymon + ld de, wPlayerTrademonOTName + ld c, NAME_LENGTH + call CopyStringWithTerminator + + ld hl, wPlayerName + ld de, wPlayerTrademonSenderName + ld c, NAME_LENGTH + call CopyStringWithTerminator + + ld hl, wPartyMon1ID + ld bc, PARTYMON_STRUCT_LENGTH + call Trade_GetAttributeOfCurrentPartymon + ld de, wPlayerTrademonID + call Trade_CopyTwoBytes + + ld hl, wPartyMon1DVs + ld bc, PARTYMON_STRUCT_LENGTH + call Trade_GetAttributeOfCurrentPartymon + ld de, wPlayerTrademonDVs + call Trade_CopyTwoBytes + + ld hl, wPartyMon1Species + ld bc, PARTYMON_STRUCT_LENGTH + call Trade_GetAttributeOfCurrentPartymon + ld b, h + ld c, l + farcall GetCaughtGender + ld a, c + ld [wPlayerTrademonCaughtData], a + + ld e, NPCTRADE_DIALOG + call GetTradeAttr + ld a, [hl] + cp TRADE_DIALOGSET_GIRL + ld a, CAUGHT_BY_GIRL + jr c, .okay + ld a, CAUGHT_BY_BOY +.okay + ld [wOTTrademonCaughtData], a + + ld hl, wPartyMon1Level + ld bc, PARTYMON_STRUCT_LENGTH + call Trade_GetAttributeOfCurrentPartymon + ld a, [hl] + ld [wCurPartyLevel], a + ld a, [wOTTrademonSpecies] + ld [wCurPartySpecies], a + xor a + ld [wMonType], a ; PARTYMON + ld [wPokemonWithdrawDepositParameter], a ; REMOVE_PARTY + callfar RemoveMonFromPartyOrBox + predef TryAddMonToParty + + ld e, NPCTRADE_DIALOG + call GetTradeAttr + ld a, [hl] + cp TRADE_DIALOGSET_GIRL + ld b, CAUGHT_BY_UNKNOWN + jr c, .incomplete + ld b, CAUGHT_BY_GIRL +.incomplete + farcall SetGiftPartyMonCaughtData + + ld e, NPCTRADE_NICKNAME + call GetTradeAttr + ld de, wOTTrademonNickname + ld c, MON_NAME_LENGTH + call CopyStringWithTerminator + + ld hl, wPartyMonNicknames + ld bc, MON_NAME_LENGTH + call Trade_GetAttributeOfLastPartymon + ld hl, wOTTrademonNickname + ld c, MON_NAME_LENGTH + call CopyStringWithTerminator + + ld e, NPCTRADE_OT_NAME + call GetTradeAttr + push hl + ld de, wOTTrademonOTName + ld c, NAME_LENGTH + call CopyStringWithTerminator + pop hl + ld de, wOTTrademonSenderName + ld c, NAME_LENGTH + call CopyStringWithTerminator + + ld hl, wPartyMonOTs + ld bc, NAME_LENGTH + call Trade_GetAttributeOfLastPartymon + ld hl, wOTTrademonOTName + ld c, NAME_LENGTH + call CopyStringWithTerminator + + ld e, NPCTRADE_DVS + call GetTradeAttr + ld de, wOTTrademonDVs + call Trade_CopyTwoBytes + + ld hl, wPartyMon1DVs + ld bc, PARTYMON_STRUCT_LENGTH + call Trade_GetAttributeOfLastPartymon + ld hl, wOTTrademonDVs + call Trade_CopyTwoBytes + + ld e, NPCTRADE_OT_ID + call GetTradeAttr + ld de, wOTTrademonID + 1 + call Trade_CopyTwoBytesReverseEndian + + ld hl, wPartyMon1ID + ld bc, PARTYMON_STRUCT_LENGTH + call Trade_GetAttributeOfLastPartymon + ld hl, wOTTrademonID + call Trade_CopyTwoBytes + + ld e, NPCTRADE_ITEM + call GetTradeAttr + push hl + ld hl, wPartyMon1Item + ld bc, PARTYMON_STRUCT_LENGTH + call Trade_GetAttributeOfLastPartymon + pop hl + ld a, [hl] + ld [de], a + + push af + push bc + push de + push hl + ld a, [wCurPartyMon] + push af + ld a, [wPartyCount] + dec a + ld [wCurPartyMon], a + farcall ComputeNPCTrademonStats + pop af + ld [wCurPartyMon], a + pop hl + pop de + pop bc + pop af + ret + +GetTradeAttr: + ld d, 0 + push de + ld a, [wJumptableIndex] + and $f + swap a + ld e, a + ld d, 0 + ld hl, NPCTrades + add hl, de + add hl, de + pop de + add hl, de + ret + +Trade_GetAttributeOfCurrentPartymon: + ld a, [wCurPartyMon] + call AddNTimes + ret + +Trade_GetAttributeOfLastPartymon: + ld a, [wPartyCount] + dec a + call AddNTimes + ld e, l + ld d, h + ret + +GetTradeMonName: + push de + ld [wNamedObjectIndex], a + call GetBasePokemonName + ld hl, wStringBuffer1 + pop de + ret + +Trade_CopyFourCharString: ; unreferenced + ld bc, 4 + call CopyBytes + ld a, "@" + ld [de], a + ret + +Trade_CopyThreeCharString: ; unreferenced + ld bc, 3 + call CopyBytes + ld a, "@" + ld [de], a + ret + +Trade_CopyTwoBytes: + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + ret + +Trade_CopyTwoBytesReverseEndian: + ld a, [hli] + ld [de], a + dec de + ld a, [hl] + ld [de], a + ret + +GetTradeMonNames: + ld a, LOCKED_MON_ID_TRADE_RECEIVE + call GetLockedPokemonID + call GetTradeMonName + + ld de, wStringBuffer2 + ld c, MON_NAME_LENGTH + call CopyStringWithTerminator + + ld a, LOCKED_MON_ID_TRADE_SEND + call GetLockedPokemonID + call GetTradeMonName + + ld de, wMonOrItemNameBuffer + ld c, MON_NAME_LENGTH + call CopyStringWithTerminator + + ld hl, wStringBuffer1 +.loop + ld a, [hli] + cp "@" + jr nz, .loop + + dec hl + push hl + ld e, NPCTRADE_GENDER + call GetTradeAttr + ld a, [hl] + pop hl + and a ; TRADE_GENDER_EITHER + ret z + cp TRADE_GENDER_MALE + ld a, "♂" + jr z, .done + ; TRADE_GENDER_FEMALE + ld a, "♀" +.done + ld [hli], a + ld [hl], "@" + ret + +INCLUDE "data/events/npc_trades.asm" + +PrintTradeText: + push af + call GetTradeMonNames + pop af + ld bc, 2 * 4 + ld hl, TradeTexts + call AddNTimes + ld a, [wTradeDialog] + ld c, a + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + call PrintText + ret + +TradeTexts: +; entries correspond to TRADE_DIALOG_* × TRADE_DIALOGSET_* constants +; TRADE_DIALOG_INTRO + dw NPCTradeIntroText1 + dw NPCTradeIntroText2 + dw NPCTradeIntroText2 + dw NPCTradeIntroText3 +; TRADE_DIALOG_CANCEL + dw NPCTradeCancelText1 + dw NPCTradeCancelText2 + dw NPCTradeCancelText2 + dw NPCTradeCancelText3 +; TRADE_DIALOG_WRONG + dw NPCTradeWrongText1 + dw NPCTradeWrongText2 + dw NPCTradeWrongText2 + dw NPCTradeWrongText3 +; TRADE_DIALOG_COMPLETE + dw NPCTradeCompleteText1 + dw NPCTradeCompleteText2 + dw NPCTradeCompleteText4 + dw NPCTradeCompleteText3 +; TRADE_DIALOG_AFTER + dw NPCTradeAfterText1 + dw NPCTradeAfterText2 + dw NPCTradeAfterText4 + dw NPCTradeAfterText3 + +NPCTradeCableText: + text_far _NPCTradeCableText + text_end + +TradedForText: + ; traded givemon for getmon + text_far Text_NPCTraded + text_asm + ld de, MUSIC_NONE + call PlayMusic + call DelayFrame + ld hl, .done + ret + +.done + text_far _NPCTradeFanfareText + text_end + +NPCTradeIntroText1: + text_far _NPCTradeIntroText1 + text_end + +NPCTradeCancelText1: + text_far _NPCTradeCancelText1 + text_end + +NPCTradeWrongText1: + text_far _NPCTradeWrongText1 + text_end + +NPCTradeCompleteText1: + text_far _NPCTradeCompleteText1 + text_end + +NPCTradeAfterText1: + text_far _NPCTradeAfterText1 + text_end + +NPCTradeIntroText2: + text_far _NPCTradeIntroText2 + text_end + +NPCTradeCancelText2: + text_far _NPCTradeCancelText2 + text_end + +NPCTradeWrongText2: + text_far _NPCTradeWrongText2 + text_end + +NPCTradeCompleteText2: + text_far _NPCTradeCompleteText2 + text_end + +NPCTradeAfterText2: + text_far _NPCTradeAfterText2 + text_end + +NPCTradeIntroText3: + text_far _NPCTradeIntroText3 + text_end + +NPCTradeCancelText3: + text_far _NPCTradeCancelText3 + text_end + +NPCTradeWrongText3: + text_far _NPCTradeWrongText3 + text_end + +NPCTradeCompleteText3: + text_far _NPCTradeCompleteText3 + text_end + +NPCTradeAfterText3: + text_far _NPCTradeAfterText3 + text_end + +NPCTradeCompleteText4: + text_far _NPCTradeCompleteText4 + text_end + +NPCTradeAfterText4: + text_far _NPCTradeAfterText4 + text_end diff --git a/engine/events/odd_egg.asm b/engine/events/odd_egg.asm new file mode 100644 index 0000000..fbc2b2d --- /dev/null +++ b/engine/events/odd_egg.asm @@ -0,0 +1,130 @@ +_GiveOddEgg: + ; Figure out which egg to give. + + ; Compare a random word to probabilities out of $ffff. + call Random + ld hl, OddEggProbabilities + ld c, 0 + ld b, c +.loop + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + + ; Break on $ffff. + ld a, d + cp HIGH($ffff) + jr nz, .not_done + ld a, e + cp LOW($ffff) + jr z, .done +.not_done + + ; Break when the random word <= the next probability in de. + ldh a, [hRandomSub] + cp d + jr c, .done + jr z, .ok + jr .next +.ok + ldh a, [hRandomAdd] + cp e + jr c, .done + jr z, .done +.next + inc bc + jr .loop +.done + + push bc + ld hl, OddEggs + ld a, NICKNAMED_MON_STRUCT_LENGTH + call AddNTimes + + ; Writes to wOddEgg, wOddEggName, and wOddEggOT, + ; even though OddEggs does not have data for wOddEggOT + ld de, wOddEgg + ld bc, NICKNAMED_MON_STRUCT_LENGTH + NAME_LENGTH + call CopyBytes + + ; Loads the actual species and overwrites the zero in wOddEggSpecies + pop hl + add hl, hl + push hl + ld bc, OddEggSpecies + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + ld [wOddEggSpecies], a + + ; And likewise with moves + pop hl + add hl, hl + add hl, hl + ld bc, OddEggMoves + add hl, bc + ld c, NUM_MOVES + ld de, wOddEggMoves +.move_loop + ld a, [hli] + push hl + ld h, [hl] + ld l, a + call GetMoveIDFromIndex + pop hl + inc hl + ld [de], a + inc de + dec c + jr nz, .move_loop + + ld a, EGG_TICKET + ld [wCurItem], a + ld a, 1 + ld [wItemQuantityChange], a + ld a, -1 + ld [wCurItemQuantity], a + ld hl, wNumItems + call TossItem + + ; load species in wMobileMonSpecies + ld a, EGG + ld [wMobileMonMiscSpecies], a + + ; load pointer to (wMobileMonSpecies - 1) in wMobileMonSpeciesPointer + ld a, LOW(wMobileMonMiscSpecies - 1) + ld [wMobileMonSpeciesPointer], a + ld a, HIGH(wMobileMonMiscSpecies - 1) + ld [wMobileMonSpeciesPointer + 1], a + ; load pointer to wOddEgg in wMobileMonStructPointer + ld a, LOW(wOddEgg) + ld [wMobileMonStructPointer], a + ld a, HIGH(wOddEgg) + ld [wMobileMonStructPointer + 1], a + + ; load Odd Egg Name in wTempOddEggNickname + ld hl, .Odd + ld de, wTempOddEggNickname + ld bc, MON_NAME_LENGTH + call CopyBytes + + ; load pointer to wTempOddEggNickname in wMobileMonOTPointer + ld a, LOW(wTempOddEggNickname) + ld [wMobileMonOTPointer], a + ld a, HIGH(wTempOddEggNickname) + ld [wMobileMonOTPointer + 1], a + ; load pointer to wOddEggName in wMobileMonNicknamePointer + ld a, LOW(wOddEggName) + ld [wMobileMonNicknamePointer], a + ld a, HIGH(wOddEggName) + ld [wMobileMonNicknamePointer + 1], a + farcall AddMobileMonToParty + ret + +.Odd: + db "ODD@@@@@@@@@" + +INCLUDE "data/events/odd_eggs.asm" diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm new file mode 100644 index 0000000..42bbe60 --- /dev/null +++ b/engine/events/overworld.asm @@ -0,0 +1,1816 @@ +FieldMoveJumptableReset: + xor a + ld hl, wFieldMoveData + ld bc, wFieldMoveDataEnd - wFieldMoveData + call ByteFill + ret + +FieldMoveJumptable: + ld a, [wFieldMoveJumptableIndex] + rst JumpTable + ld [wFieldMoveJumptableIndex], a + bit 7, a + jr nz, .okay + and a + ret + +.okay + and $7f + scf + ret + +GetPartyNickname: +; write wCurPartyMon nickname to wStringBuffer1-3 + ld hl, wPartyMonNicknames + ld a, BOXMON + ld [wMonType], a + ld a, [wCurPartyMon] + call GetNickname + call CopyName1 +; copy text from wStringBuffer2 to wStringBuffer3 + ld de, wStringBuffer2 + ld hl, wStringBuffer3 + call CopyName2 + ret + +CheckEngineFlag: +; Check engine flag de +; Return carry if flag is not set + ld b, CHECK_FLAG + farcall EngineFlagAction + ld a, c + and a + jr nz, .isset + scf + ret +.isset + xor a + ret + +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 + ret nc + ld hl, .BadgeRequiredText + call MenuTextboxBackup ; push text to queue + scf + ret + +.BadgeRequiredText: + text_far _BadgeRequiredText + text_end + +CheckPartyMoveIndex: +; Check if a monster in your party has move hl. + call GetMoveIDFromIndex + ld d, a +CheckPartyMove: +; Check if a monster in your party has move d. + + ld e, 0 + xor a + ld [wCurPartyMon], a +.loop + ld c, e + ld b, 0 + ld hl, wPartySpecies + add hl, bc + ld a, [hl] + and a + jr z, .no + cp -1 + jr z, .no + cp EGG + jr z, .next + + ld bc, PARTYMON_STRUCT_LENGTH + ld hl, wPartyMon1Moves + ld a, e + call AddNTimes + ld b, NUM_MOVES +.check + ld a, [hli] + cp d + jr z, .yes + dec b + jr nz, .check + +.next + inc e + jr .loop + +.yes + ld a, e + ld [wCurPartyMon], a ; which mon has the move + xor a + ret +.no + scf + ret + +FieldMoveFailed: + ld hl, .CantUseItemText + call MenuTextboxBackup + ret + +.CantUseItemText: + text_far _CantUseItemText + text_end + +CutFunction: + call FieldMoveJumptableReset +.loop + ld hl, .Jumptable + call FieldMoveJumptable + jr nc, .loop + and $7f + ld [wFieldMoveSucceeded], a + ret + +.Jumptable: + dw .CheckAble + dw .DoCut + dw .FailCut + +.CheckAble: + ld de, ENGINE_HIVEBADGE + call CheckBadge + jr c, .nohivebadge + call CheckMapForSomethingToCut + jr c, .nothingtocut + ld a, $1 + ret + +.nohivebadge + ld a, $80 + ret + +.nothingtocut + ld a, $2 + ret + +.DoCut: + ld hl, Script_CutFromMenu + call QueueScript + ld a, $81 + ret + +.FailCut: + ld hl, CutNothingText + call MenuTextboxBackup + ld a, $80 + ret + +UseCutText: + text_far _UseCutText + text_end + +CutNothingText: + text_far _CutNothingText + text_end + +CheckMapForSomethingToCut: + ; Does the collision data of the facing tile permit cutting? + call GetFacingTileCoord + ld c, a + push de + farcall CheckCutCollision + pop de + jr nc, .fail + ; Get the location of the current block in wOverworldMapBlocks. + call GetBlockLocation + ld c, [hl] + ; See if that block contains something that can be cut. + push hl + ld hl, CutTreeBlockPointers + call CheckOverworldTileArrays + pop hl + jr nc, .fail + ; Save the Cut field move data + ld a, l + ld [wCutWhirlpoolOverworldBlockAddr], a + ld a, h + ld [wCutWhirlpoolOverworldBlockAddr + 1], a + ld a, b + ld [wCutWhirlpoolReplacementBlock], a + ld a, c + ld [wCutWhirlpoolAnimationType], a + xor a + ret + +.fail + scf + ret + +Script_CutFromMenu: + reloadmappart + special UpdateTimePals + +Script_Cut: + callasm GetPartyNickname + writetext UseCutText + reloadmappart + callasm CutDownTreeOrGrass + closetext + end + +CutDownTreeOrGrass: + ld hl, wCutWhirlpoolOverworldBlockAddr + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wCutWhirlpoolReplacementBlock] + ld [hl], a + xor a + ldh [hBGMapMode], a + call OverworldTextModeSwitch + call UpdateSprites + call DelayFrame + ld a, [wCutWhirlpoolAnimationType] + ld e, a + farcall OWCutAnimation + call BufferScreen + call GetMovementPermissions + call UpdateSprites + call DelayFrame + call LoadStandardFont + ret + +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 + ; does not contain a tile you can replace. + + ; Dictionary lookup for pointer to tile replacement table + push bc + ld a, [wMapTileset] + ld de, 3 + call IsInArray + pop bc + jr nc, .nope + ; Load the pointer + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + ; Look up the tile you're facing + ld de, 3 + ld a, c + call IsInArray + jr nc, .nope + ; Load the replacement to b + inc hl + ld b, [hl] + ; Load the animation type parameter to c + inc hl + ld c, [hl] + scf + ret + +.nope + xor a + ret + +INCLUDE "data/collision/field_move_blocks.asm" + +FlashFunction: + call .CheckUseFlash + and $7f + ld [wFieldMoveSucceeded], a + ret + +.CheckUseFlash: + ld de, ENGINE_ZEPHYRBADGE + farcall CheckBadge + jr c, .nozephyrbadge + push hl + farcall SpecialAerodactylChamber + pop hl + jr c, .useflash + ld a, [wTimeOfDayPalset] + cp DARKNESS_PALSET + jr nz, .notadarkcave +.useflash + call UseFlash + ld a, $81 + ret + +.notadarkcave + call FieldMoveFailed + ld a, $80 + ret + +.nozephyrbadge + ld a, $80 + ret + +UseFlash: + ld hl, Script_UseFlash + jp QueueScript + +Script_UseFlash: + reloadmappart + special UpdateTimePals + writetext UseFlashTextScript + callasm BlindingFlash + closetext + end + +UseFlashTextScript: + text_far _BlindingFlashText + text_asm + call WaitSFX + ld de, SFX_FLASH + call PlaySFX + call WaitSFX + ld hl, .BlankText + ret + +.BlankText: + text_end + +SurfFunction: + call FieldMoveJumptableReset +.loop + ld hl, .Jumptable + call FieldMoveJumptable + jr nc, .loop + and $7f + ld [wFieldMoveSucceeded], a + ret + +.Jumptable: + dw .TrySurf + dw .DoSurf + dw .FailSurf + dw .AlreadySurfing + +.TrySurf: + ld de, ENGINE_FOGBADGE + call CheckBadge + jr c, .nofogbadge + ld hl, wBikeFlags + bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl] + jr nz, .cannotsurf + ld a, [wPlayerState] + cp PLAYER_SURF + jr z, .alreadyfail + cp PLAYER_SURF_PIKA + jr z, .alreadyfail + call GetFacingTileCoord + call GetTileCollision + cp WATER_TILE + jr nz, .cannotsurf + call CheckDirection + jr c, .cannotsurf + farcall CheckFacingObject + jr c, .cannotsurf + ld a, $1 + ret +.nofogbadge + ld a, $80 + ret +.alreadyfail + ld a, $3 + ret +.cannotsurf + ld a, $2 + ret + +.DoSurf: + call GetSurfType + ld [wSurfingPlayerState], a + call GetPartyNickname + ld hl, SurfFromMenuScript + call QueueScript + ld a, $81 + ret + +.FailSurf: + ld hl, CantSurfText + call MenuTextboxBackup + ld a, $80 + ret + +.AlreadySurfing: + ld hl, AlreadySurfingText + call MenuTextboxBackup + ld a, $80 + ret + +SurfFromMenuScript: + special UpdateTimePals + +UsedSurfScript: +; BUG: Surfing directly across a map connection does not load the new map (see docs/bugs_and_glitches.md) + writetext UsedSurfText ; "used SURF!" + waitbutton + closetext + + callasm .stubbed_fn + + readmem wSurfingPlayerState + writevar VAR_MOVEMENT + + special UpdatePlayerSprite + special PlayMapMusic +; step into the water (slow_step DIR, step_end) + special SurfStartStep + applymovement PLAYER, wMovementBuffer + end + +.stubbed_fn + farcall StubbedTrainerRankings_Surf + ret + +UsedSurfText: + text_far _UsedSurfText + text_end + +CantSurfText: + text_far _CantSurfText + text_end + +AlreadySurfingText: + text_far _AlreadySurfingText + text_end + +GetSurfType: +; Surfing on Pikachu uses an alternate sprite. +; This is done by using a separate movement type. + + ld a, [wCurPartyMon] + ld e, a + ld d, 0 + ld hl, PIKACHU + call GetPokemonIDFromIndex + ld hl, wPartySpecies + add hl, de + cp [hl] + ld a, PLAYER_SURF_PIKA + ret z + ld a, PLAYER_SURF + ret + +CheckDirection: +; Return carry if a tile permission prevents you +; from moving in the direction you're facing. + +; Get player direction + ld a, [wPlayerDirection] + and %00001100 ; bits 2 and 3 contain direction + rrca + rrca + ld e, a + ld d, 0 + ld hl, .Directions + add hl, de + +; Can you walk in this direction? + ld a, [wTilePermissions] + and [hl] + jr nz, .quit + xor a + ret + +.quit + scf + ret + +.Directions: + db FACE_DOWN + db FACE_UP + db FACE_LEFT + db FACE_RIGHT + +TrySurfOW:: +; Checking a tile in the overworld. +; Return carry if fail is allowed. + +; Don't ask to surf if already fail. + ld a, [wPlayerState] + cp PLAYER_SURF_PIKA + jr z, .quit + cp PLAYER_SURF + jr z, .quit + +; Must be facing water. + ld a, [wFacingTileID] + call GetTileCollision + cp WATER_TILE + jr nz, .quit + +; Check tile permissions. + call CheckDirection + jr c, .quit + + ld de, ENGINE_FOGBADGE + call CheckEngineFlag + jr c, .quit + + ld hl, SURF + call CheckPartyMoveIndex + jr c, .quit + + ld hl, wBikeFlags + bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl] + jr nz, .quit + + call GetSurfType + ld [wSurfingPlayerState], a + call GetPartyNickname + + ld a, BANK(AskSurfScript) + ld hl, AskSurfScript + call CallScript + + scf + ret + +.quit + xor a + ret + +AskSurfScript: + opentext + writetext AskSurfText + yesorno + iftrue UsedSurfScript + closetext + end + +AskSurfText: + text_far _AskSurfText + text_end + +FlyFunction: + call FieldMoveJumptableReset +.loop + ld hl, .Jumptable + call FieldMoveJumptable + jr nc, .loop + and $7f + ld [wFieldMoveSucceeded], a + ret + +.Jumptable: + dw .TryFly + dw .DoFly + dw .FailFly + +.TryFly: + ld de, ENGINE_STORMBADGE + call CheckBadge + jr c, .nostormbadge + call GetMapEnvironment + call CheckOutdoorMap + jr z, .outdoors + jr .indoors + +.outdoors + xor a + ldh [hMapAnims], a + call LoadStandardMenuHeader + call ClearSprites + farcall _FlyMap + ld a, e + cp -1 + jr z, .illegal + cp NUM_SPAWNS + jr nc, .illegal + + ld [wDefaultSpawnpoint], a + call CloseWindow + ld a, $1 + ret + +.nostormbadge + ld a, $82 + ret + +.indoors + ld a, $2 + ret + +.illegal + call CloseWindow + call WaitBGMap + ld a, $80 + ret + +.DoFly: + ld hl, .FlyScript + call QueueScript + ld a, $81 + ret + +.FailFly: + call FieldMoveFailed + ld a, $82 + ret + +.FlyScript: + reloadmappart + callasm HideSprites + special UpdateTimePals + callasm FlyFromAnim + farscall Script_AbortBugContest + special WarpToSpawnPoint + callasm SkipUpdateMapSprites + loadvar VAR_MOVEMENT, PLAYER_NORMAL + newloadmap MAPSETUP_FLY + callasm FlyToAnim + special WaitSFX + callasm .ReturnFromFly + end + +.ReturnFromFly: + farcall RespawnPlayer + call DelayFrame + call UpdatePlayerSprite + farcall LoadOverworldFont + ret + +WaterfallFunction: + call .TryWaterfall + and $7f + ld [wFieldMoveSucceeded], a + ret + +.TryWaterfall: + ld de, ENGINE_RISINGBADGE + farcall CheckBadge + ld a, $80 + ret c + call CheckMapCanWaterfall + jr c, .failed + ld hl, Script_WaterfallFromMenu + call QueueScript + ld a, $81 + ret + +.failed + call FieldMoveFailed + ld a, $80 + ret + +CheckMapCanWaterfall: + ld a, [wPlayerDirection] + and $c + cp FACE_UP + jr nz, .failed + ld a, [wTileUp] + call CheckWaterfallTile + jr nz, .failed + xor a + ret + +.failed + scf + ret + +Script_WaterfallFromMenu: + reloadmappart + special UpdateTimePals + +Script_UsedWaterfall: + callasm GetPartyNickname + writetext .UseWaterfallText + waitbutton + closetext + playsound SFX_BUBBLEBEAM +.loop + applymovement PLAYER, .WaterfallStep + callasm .CheckContinueWaterfall + iffalse .loop + end + +.CheckContinueWaterfall: + xor a + ld [wScriptVar], a + ld a, [wPlayerTile] + call CheckWaterfallTile + ret z + farcall StubbedTrainerRankings_Waterfall + ld a, $1 + ld [wScriptVar], a + ret + +.WaterfallStep: + turn_waterfall UP + step_end + +.UseWaterfallText: + text_far _UseWaterfallText + text_end + +TryWaterfallOW:: + ld hl, WATERFALL + call CheckPartyMoveIndex + jr c, .failed + ld de, ENGINE_RISINGBADGE + call CheckEngineFlag + jr c, .failed + call CheckMapCanWaterfall + jr c, .failed + ld a, BANK(Script_AskWaterfall) + ld hl, Script_AskWaterfall + call CallScript + scf + ret + +.failed + ld a, BANK(Script_CantDoWaterfall) + ld hl, Script_CantDoWaterfall + call CallScript + scf + ret + +Script_CantDoWaterfall: + jumptext .HugeWaterfallText + +.HugeWaterfallText: + text_far _HugeWaterfallText + text_end + +Script_AskWaterfall: + opentext + writetext .AskWaterfallText + yesorno + iftrue Script_UsedWaterfall + closetext + end + +.AskWaterfallText: + text_far _AskWaterfallText + text_end + +EscapeRopeFunction: + call FieldMoveJumptableReset + ld a, $1 + jr EscapeRopeOrDig + +DigFunction: + call FieldMoveJumptableReset + ld a, $2 + +EscapeRopeOrDig: + ld [wEscapeRopeOrDigType], a +.loop + ld hl, .DigTable + call FieldMoveJumptable + jr nc, .loop + and $7f + ld [wFieldMoveSucceeded], a + ret + +.DigTable: + dw .CheckCanDig + dw .DoDig + dw .FailDig + +.CheckCanDig: + call GetMapEnvironment + cp CAVE + jr z, .incave + cp DUNGEON + jr z, .incave +.fail + ld a, $2 + ret + +.incave + ld hl, wDigWarpNumber + ld a, [hli] + and a + jr z, .fail + ld a, [hli] + and a + jr z, .fail + ld a, [hl] + and a + jr z, .fail + ld a, $1 + ret + +.DoDig: + ld hl, wDigWarpNumber + ld de, wNextWarp + ld bc, 3 + call CopyBytes + call GetPartyNickname + ld a, [wEscapeRopeOrDigType] + cp $2 + jr nz, .escaperope + ld hl, .UsedDigScript + call QueueScript + ld a, $81 + ret + +.escaperope + farcall SpecialKabutoChamber + ld hl, .UsedEscapeRopeScript + call QueueScript + ld a, $81 + ret + +.FailDig: + ld a, [wEscapeRopeOrDigType] + cp $2 + jr nz, .failescaperope + ld hl, .CantUseDigText + call MenuTextbox + call WaitPressAorB_BlinkCursor + call CloseWindow + +.failescaperope + ld a, $80 + ret + +.UseDigText: + text_far _UseDigText + text_end + +.UseEscapeRopeText: + text_far _UseEscapeRopeText + text_end + +.CantUseDigText: + text_far _CantUseDigText + text_end + +.UsedEscapeRopeScript: + reloadmappart + special UpdateTimePals + writetext .UseEscapeRopeText + sjump .UsedDigOrEscapeRopeScript + +.UsedDigScript: + reloadmappart + special UpdateTimePals + writetext .UseDigText + +.UsedDigOrEscapeRopeScript: + waitbutton + closetext + playsound SFX_WARP_TO + applymovement PLAYER, .DigOut + farscall Script_AbortBugContest + special WarpToSpawnPoint + loadvar VAR_MOVEMENT, PLAYER_NORMAL + newloadmap MAPSETUP_DOOR + playsound SFX_WARP_FROM + applymovement PLAYER, .DigReturn + end + +.DigOut: + step_dig 32 + hide_object + step_end + +.DigReturn: + show_object + return_dig 32 + step_end + +TeleportFunction: + call FieldMoveJumptableReset +.loop + ld hl, .Jumptable + call FieldMoveJumptable + jr nc, .loop + and $7f + ld [wFieldMoveSucceeded], a + ret + +.Jumptable: + dw .TryTeleport + dw .DoTeleport + dw .FailTeleport + +.TryTeleport: + call GetMapEnvironment + call CheckOutdoorMap + jr z, .CheckIfSpawnPoint + jr .nope + +.CheckIfSpawnPoint: + ld a, [wLastSpawnMapGroup] + ld d, a + ld a, [wLastSpawnMapNumber] + ld e, a + farcall IsSpawnPoint + jr nc, .nope + ld a, c + ld [wDefaultSpawnpoint], a + ld a, $1 + ret + +.nope + ld a, $2 + ret + +.DoTeleport: + call GetPartyNickname + ld hl, .TeleportScript + call QueueScript + ld a, $81 + ret + +.FailTeleport: + ld hl, .CantUseTeleportText + call MenuTextboxBackup + ld a, $80 + ret + +.TeleportReturnText: + text_far _TeleportReturnText + text_end + +.CantUseTeleportText: + text_far _CantUseTeleportText + text_end + +.TeleportScript: + reloadmappart + special UpdateTimePals + writetext .TeleportReturnText + pause 60 + reloadmappart + closetext + playsound SFX_WARP_TO + applymovement PLAYER, .TeleportFrom + farscall Script_AbortBugContest + special WarpToSpawnPoint + loadvar VAR_MOVEMENT, PLAYER_NORMAL + newloadmap MAPSETUP_TELEPORT + playsound SFX_WARP_FROM + applymovement PLAYER, .TeleportTo + end + +.TeleportFrom: + teleport_from + step_end + +.TeleportTo: + teleport_to + step_end + +StrengthFunction: + call .TryStrength + and $7f + ld [wFieldMoveSucceeded], a + ret + +.TryStrength: + ld de, ENGINE_PLAINBADGE + call CheckBadge + jr c, .Failed + jr .UseStrength + +.AlreadyUsingStrength: ; unreferenced + ld hl, .AlreadyUsingStrengthText + call MenuTextboxBackup + ld a, $80 + ret + +.AlreadyUsingStrengthText: + text_far _AlreadyUsingStrengthText + text_end + +.Failed: + ld a, $80 + ret + +.UseStrength: + ld hl, Script_StrengthFromMenu + call QueueScript + ld a, $81 + ret + +SetStrengthFlag: + ld hl, wBikeFlags + set BIKEFLAGS_STRENGTH_ACTIVE_F, [hl] + ld a, [wCurPartyMon] + ld e, a + ld d, 0 + ld hl, wPartySpecies + add hl, de + ld a, [hl] + ld [wStrengthSpecies], a + call GetPartyNickname + ret + +Script_StrengthFromMenu: + reloadmappart + special UpdateTimePals + +Script_UsedStrength: + callasm SetStrengthFlag + writetext .UseStrengthText + readmem wStrengthSpecies + cry 0 ; plays [wStrengthSpecies] cry + pause 3 + writetext .MoveBoulderText + closetext + end + +.UseStrengthText: + text_far _UseStrengthText + text_end + +.MoveBoulderText: + text_far _MoveBoulderText + text_end + +AskStrengthScript: + callasm TryStrengthOW + iffalse .AskStrength + ifequal $1, .DontMeetRequirements + sjump .AlreadyUsedStrength + +.DontMeetRequirements: + jumptext BouldersMayMoveText + +.AlreadyUsedStrength: + jumptext BouldersMoveText + +.AskStrength: + opentext + writetext AskStrengthText + yesorno + iftrue Script_UsedStrength + closetext + end + +AskStrengthText: + text_far _AskStrengthText + text_end + +BouldersMoveText: + text_far _BouldersMoveText + text_end + +BouldersMayMoveText: + text_far _BouldersMayMoveText + text_end + +TryStrengthOW: + ld hl, STRENGTH + call CheckPartyMoveIndex + jr c, .nope + + ld de, ENGINE_PLAINBADGE + call CheckEngineFlag + jr c, .nope + + ld hl, wBikeFlags + bit BIKEFLAGS_STRENGTH_ACTIVE_F, [hl] + jr z, .already_using + + ld a, 2 + jr .done + +.nope + ld a, 1 + jr .done + +.already_using + xor a + jr .done + +.done + ld [wScriptVar], a + ret + +WhirlpoolFunction: + call FieldMoveJumptableReset +.loop + ld hl, .Jumptable + call FieldMoveJumptable + jr nc, .loop + and $7f + ld [wFieldMoveSucceeded], a + ret + +.Jumptable: + dw .TryWhirlpool + dw .DoWhirlpool + dw .FailWhirlpool + +.TryWhirlpool: + ld de, ENGINE_GLACIERBADGE + call CheckBadge + jr c, .noglacierbadge + call TryWhirlpoolMenu + jr c, .failed + ld a, $1 + ret + +.failed + ld a, $2 + ret + +.noglacierbadge + ld a, $80 + ret + +.DoWhirlpool: + ld hl, Script_WhirlpoolFromMenu + call QueueScript + ld a, $81 + ret + +.FailWhirlpool: + call FieldMoveFailed + ld a, $80 + ret + +UseWhirlpoolText: + text_far _UseWhirlpoolText + text_end + +TryWhirlpoolMenu: + call GetFacingTileCoord + ld c, a + push de + call CheckWhirlpoolTile + pop de + jr c, .failed + call GetBlockLocation + ld c, [hl] + push hl + ld hl, WhirlpoolBlockPointers + call CheckOverworldTileArrays + pop hl + jr nc, .failed + ; Save the Whirlpool field move data + ld a, l + ld [wCutWhirlpoolOverworldBlockAddr], a + ld a, h + ld [wCutWhirlpoolOverworldBlockAddr + 1], a + ld a, b + ld [wCutWhirlpoolReplacementBlock], a + ld a, c + ld [wCutWhirlpoolAnimationType], a + xor a + ret + +.failed + scf + ret + +Script_WhirlpoolFromMenu: + reloadmappart + special UpdateTimePals + +Script_UsedWhirlpool: + callasm GetPartyNickname + writetext UseWhirlpoolText + reloadmappart + callasm DisappearWhirlpool + closetext + end + +DisappearWhirlpool: + ld hl, wCutWhirlpoolOverworldBlockAddr + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wCutWhirlpoolReplacementBlock] + ld [hl], a + xor a + ldh [hBGMapMode], a + call OverworldTextModeSwitch + ld a, [wCutWhirlpoolAnimationType] + ld e, a + farcall PlayWhirlpoolSound + call BufferScreen + call GetMovementPermissions + ret + +TryWhirlpoolOW:: + ld hl, WHIRLPOOL + call CheckPartyMoveIndex + jr c, .failed + ld de, ENGINE_GLACIERBADGE + call CheckEngineFlag + jr c, .failed + call TryWhirlpoolMenu + jr c, .failed + ld a, BANK(Script_AskWhirlpoolOW) + ld hl, Script_AskWhirlpoolOW + call CallScript + scf + ret + +.failed + ld a, BANK(Script_MightyWhirlpool) + ld hl, Script_MightyWhirlpool + call CallScript + scf + ret + +Script_MightyWhirlpool: + jumptext .MayPassWhirlpoolText + +.MayPassWhirlpoolText: + text_far _MayPassWhirlpoolText + text_end + +Script_AskWhirlpoolOW: + opentext + writetext AskWhirlpoolText + yesorno + iftrue Script_UsedWhirlpool + closetext + end + +AskWhirlpoolText: + text_far _AskWhirlpoolText + text_end + +HeadbuttFunction: + call TryHeadbuttFromMenu + and $7f + ld [wFieldMoveSucceeded], a + ret + +TryHeadbuttFromMenu: + call GetFacingTileCoord + call CheckHeadbuttTreeTile + jr nz, .no_tree + + ld hl, HeadbuttFromMenuScript + call QueueScript + ld a, $81 + ret + +.no_tree + call FieldMoveFailed + ld a, $80 + ret + +UseHeadbuttText: + text_far _UseHeadbuttText + text_end + +HeadbuttNothingText: + text_far _HeadbuttNothingText + text_end + +HeadbuttFromMenuScript: + reloadmappart + special UpdateTimePals + +HeadbuttScript: + callasm GetPartyNickname + writetext UseHeadbuttText + + reloadmappart + callasm ShakeHeadbuttTree + + callasm TreeMonEncounter + iffalse .no_battle + closetext + randomwildmon + startbattle + reloadmapafterbattle + end + +.no_battle + writetext HeadbuttNothingText + waitbutton + closetext + end + +TryHeadbuttOW:: + ld hl, HEADBUTT + call CheckPartyMoveIndex + jr c, .no + + ld a, BANK(AskHeadbuttScript) + ld hl, AskHeadbuttScript + call CallScript + scf + ret + +.no + xor a + ret + +AskHeadbuttScript: + opentext + writetext AskHeadbuttText + yesorno + iftrue HeadbuttScript + closetext + end + +AskHeadbuttText: + text_far _AskHeadbuttText + text_end + +RockSmashFunction: + call TryRockSmashFromMenu + and $7f + ld [wFieldMoveSucceeded], a + ret + +TryRockSmashFromMenu: + call GetFacingObject + jr c, .no_rock + ld a, d + cp SPRITEMOVEDATA_SMASHABLE_ROCK + jr nz, .no_rock + + ld hl, RockSmashFromMenuScript + call QueueScript + ld a, $81 + ret + +.no_rock + call FieldMoveFailed + ld a, $80 + ret + +GetFacingObject: + farcall CheckFacingObject + jr nc, .fail + + ldh a, [hObjectStructIndex] + call GetObjectStruct + ld hl, OBJECT_MAP_OBJECT_INDEX + add hl, bc + ld a, [hl] + ldh [hLastTalked], a + call GetMapObject + ld hl, MAPOBJECT_MOVEMENT + add hl, bc + ld a, [hl] + ld d, a + and a + ret + +.fail + scf + ret + +RockSmashFromMenuScript: + reloadmappart + special UpdateTimePals + +RockSmashScript: + callasm GetPartyNickname + writetext UseRockSmashText + closetext + special WaitSFX + playsound SFX_STRENGTH + earthquake 84 + applymovementlasttalked MovementData_RockSmash + disappear -2 + + callasm RockMonEncounter + readmem wTempWildMonSpecies + iffalse .done + randomwildmon + startbattle + reloadmapafterbattle +.done + end + +MovementData_RockSmash: + rock_smash 10 + step_end + +UseRockSmashText: + text_far _UseRockSmashText + text_end + +AskRockSmashScript: + callasm HasRockSmash + ifequal 1, .no + + opentext + writetext AskRockSmashText + yesorno + iftrue RockSmashScript + closetext + end +.no + jumptext MaySmashText + +MaySmashText: + text_far _MaySmashText + text_end + +AskRockSmashText: + text_far _AskRockSmashText + text_end + +HasRockSmash: + ld hl, ROCK_SMASH + call CheckPartyMoveIndex + jr nc, .yes +; no + ld a, 1 + jr .done +.yes + xor a + jr .done +.done + ld [wScriptVar], a + ret + +FishFunction: + ld a, e + push af + call FieldMoveJumptableReset + pop af + ld [wFishingRodUsed], a +.loop + ld hl, .FishTable + call FieldMoveJumptable + jr nc, .loop + and $7f + ld [wFieldMoveSucceeded], a + ret + +.FishTable: + dw .TryFish + dw .FishNoBite + dw .FishGotSomething + dw .FailFish + dw .FishNoFish + +.TryFish: +; BUG: You can fish on top of NPCs (see docs/bugs_and_glitches.md) + ld a, [wPlayerState] + cp PLAYER_SURF + jr z, .fail + cp PLAYER_SURF_PIKA + jr z, .fail + call GetFacingTileCoord + call GetTileCollision + cp WATER_TILE + jr z, .facingwater +.fail + ld a, $3 + ret + +.facingwater + call GetFishingGroup + and a + jr nz, .goodtofish + ld a, $4 + ret + +.goodtofish + ld d, a + ld a, [wFishingRodUsed] + ld e, a + farcall Fish + ld a, d + and a + jr z, .nonibble + ld [wTempWildMonSpecies], a + ld a, e + ld [wCurPartyLevel], a + ld a, BATTLETYPE_FISH + ld [wBattleType], a + ld a, $2 + ret + +.nonibble + ld a, $1 + ret + +.FailFish: + ld a, $80 + ret + +.FishGotSomething: + ld a, $1 + ld [wFishingResult], a + ld hl, Script_GotABite + call QueueScript + ld a, $81 + ret + +.FishNoBite: + ld a, $2 + ld [wFishingResult], a + ld hl, Script_NotEvenANibble + call QueueScript + ld a, $81 + ret + +.FishNoFish: + ld a, $0 + ld [wFishingResult], a + ld hl, Script_NotEvenANibble2 + call QueueScript + ld a, $81 + ret + +Script_NotEvenANibble: + scall Script_FishCastRod + writetext RodNothingText + sjump Script_NotEvenANibble_FallThrough + +Script_NotEvenANibble2: + scall Script_FishCastRod + writetext RodNothingText + +Script_NotEvenANibble_FallThrough: + loademote EMOTE_SHADOW + callasm PutTheRodAway + closetext + end + +Script_GotABite: + scall Script_FishCastRod + callasm Fishing_CheckFacingUp + iffalse .NotFacingUp + applymovement PLAYER, .Movement_FacingUp + sjump .FightTheHookedPokemon + +.NotFacingUp: + applymovement PLAYER, .Movement_NotFacingUp + +.FightTheHookedPokemon: + pause 40 + applymovement PLAYER, .Movement_RestoreRod + writetext RodBiteText + callasm PutTheRodAway + closetext + randomwildmon + startbattle + reloadmapafterbattle + end + +.Movement_NotFacingUp: + fish_got_bite + fish_got_bite + fish_got_bite + fish_got_bite + show_emote + step_end + +.Movement_FacingUp: + fish_got_bite + fish_got_bite + fish_got_bite + fish_got_bite + step_sleep 1 + show_emote + step_end + +.Movement_RestoreRod: + hide_emote + fish_cast_rod + step_end + +Fishing_CheckFacingUp: + ld a, [wPlayerDirection] + and $c + cp OW_UP + ld a, $1 + jr z, .up + xor a + +.up + ld [wScriptVar], a + ret + +Script_FishCastRod: + reloadmappart + loadmem hBGMapMode, $0 + special UpdateTimePals + loademote EMOTE_ROD + callasm LoadFishingGFX + loademote EMOTE_SHOCK + applymovement PLAYER, MovementData_CastRod + pause 40 + end + +MovementData_CastRod: + fish_cast_rod + step_end + +PutTheRodAway: + xor a + ldh [hBGMapMode], a + ld a, $1 + ld [wPlayerAction], a + call UpdateSprites + call UpdatePlayerSprite + ret + +RodBiteText: + text_far _RodBiteText + text_end + +RodNothingText: + text_far _RodNothingText + text_end + +UnusedNothingHereText: ; unreferenced + text_far _UnusedNothingHereText + text_end + +BikeFunction: + call .TryBike + and $7f + ld [wFieldMoveSucceeded], a + ret + +.TryBike: + call .CheckEnvironment + jr c, .CannotUseBike + ld a, [wPlayerState] + cp PLAYER_NORMAL + jr z, .GetOnBike + cp PLAYER_BIKE + jr z, .GetOffBike + jr .CannotUseBike + +.GetOnBike: + ld hl, Script_GetOnBike + ld de, Script_GetOnBike_Register + call .CheckIfRegistered + call QueueScript + xor a + ld [wMusicFade], a + ld de, MUSIC_NONE + call PlayMusic + call DelayFrame + call MaxVolume + ld de, MUSIC_BICYCLE + ld a, e + ld [wMapMusic], a + call PlayMusic + ld a, $1 + ret + +.GetOffBike: + ld hl, wBikeFlags + bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl] + jr nz, .CantGetOffBike + ld hl, Script_GetOffBike + ld de, Script_GetOffBike_Register + call .CheckIfRegistered + ld a, BANK(Script_GetOffBike) + jr .done + +.CantGetOffBike: + ld hl, Script_CantGetOffBike + jr .done + +.CannotUseBike: + ld a, $0 + ret + +.done + call QueueScript + ld a, $1 + ret + +.CheckIfRegistered: + ld a, [wUsingItemWithSelect] + and a + ret z + ld h, d + ld l, e + ret + +.CheckEnvironment: + call GetMapEnvironment + call CheckOutdoorMap + jr z, .ok + cp CAVE + jr z, .ok + cp GATE + jr z, .ok + jr .nope + +.ok + call GetPlayerTile + and $f ; lo nybble only + jr nz, .nope ; not FLOOR_TILE + xor a + ret + +.nope + scf + ret + +Script_GetOnBike: + reloadmappart + special UpdateTimePals + loadvar VAR_MOVEMENT, PLAYER_BIKE + writetext GotOnBikeText + waitbutton + closetext + special UpdatePlayerSprite + end + +Script_GetOnBike_Register: + loadvar VAR_MOVEMENT, PLAYER_BIKE + closetext + special UpdatePlayerSprite + end + +Overworld_DummyFunction: ; unreferenced + nop + ret + +Script_GetOffBike: + reloadmappart + special UpdateTimePals + loadvar VAR_MOVEMENT, PLAYER_NORMAL + writetext GotOffBikeText + waitbutton + +FinishGettingOffBike: + closetext + special UpdatePlayerSprite + special PlayMapMusic + end + +Script_GetOffBike_Register: + loadvar VAR_MOVEMENT, PLAYER_NORMAL + sjump FinishGettingOffBike + +Script_CantGetOffBike: + writetext .CantGetOffBikeText + waitbutton + closetext + end + +.CantGetOffBikeText: + text_far _CantGetOffBikeText + text_end + +GotOnBikeText: + text_far _GotOnBikeText + text_end + +GotOffBikeText: + text_far _GotOffBikeText + text_end + +TryCutOW:: + ld hl, CUT + call CheckPartyMoveIndex + jr c, .cant_cut + + ld de, ENGINE_HIVEBADGE + call CheckEngineFlag + jr c, .cant_cut + + ld a, BANK(AskCutScript) + ld hl, AskCutScript + call CallScript + scf + ret + +.cant_cut + ld a, BANK(CantCutScript) + ld hl, CantCutScript + call CallScript + scf + ret + +AskCutScript: + opentext + writetext AskCutText + yesorno + iffalse .declined + callasm .CheckMap + iftrue Script_Cut +.declined + closetext + end + +.CheckMap: + xor a + ld [wScriptVar], a + call CheckMapForSomethingToCut + ret c + ld a, TRUE + ld [wScriptVar], a + ret + +AskCutText: + text_far _AskCutText + text_end + +CantCutScript: + jumptext CanCutText + +CanCutText: + text_far _CanCutText + text_end diff --git a/engine/events/play_slow_cry.asm b/engine/events/play_slow_cry.asm new file mode 100644 index 0000000..6839b39 --- /dev/null +++ b/engine/events/play_slow_cry.asm @@ -0,0 +1,30 @@ +PlaySlowCry: + ld a, [wScriptVar] + call LoadCry + jr c, .done + + ld hl, wCryPitch + ld a, [hli] + ld h, [hl] + ld l, a + ld bc, -$140 + add hl, bc + ld a, l + ld [wCryPitch], a + ld a, h + ld [wCryPitch + 1], a + ld hl, wCryLength + ld a, [hli] + ld h, [hl] + ld l, a + ld bc, $60 + add hl, bc + ld a, l + ld [wCryLength], a + ld a, h + ld [wCryLength + 1], a + farcall _PlayCry + call WaitSFX + +.done + ret diff --git a/engine/events/poisonstep.asm b/engine/events/poisonstep.asm new file mode 100644 index 0000000..b7a1ce2 --- /dev/null +++ b/engine/events/poisonstep.asm @@ -0,0 +1,154 @@ +DoPoisonStep:: + ld a, [wPartyCount] + and a + jr z, .no_faint + + xor a + ld c, wPoisonStepDataEnd - wPoisonStepData + ld hl, wPoisonStepData +.loop_clearPoisonStepData + ld [hli], a + dec c + jr nz, .loop_clearPoisonStepData + + xor a + ld [wCurPartyMon], a +.loop_check_poison + call .DamageMonIfPoisoned + jr nc, .not_poisoned +; the output flag is stored in c, copy it to [wPoisonStepPartyFlags + [wCurPartyMon]] +; and set the corresponding flag in wPoisonStepFlagSum + ld a, [wCurPartyMon] + ld e, a + ld d, 0 + ld hl, wPoisonStepPartyFlags + add hl, de + ld [hl], c + ld a, [wPoisonStepFlagSum] + or c + ld [wPoisonStepFlagSum], a + +.not_poisoned + ld a, [wPartyCount] + ld hl, wCurPartyMon + inc [hl] + cp [hl] + jr nz, .loop_check_poison + + ld a, [wPoisonStepFlagSum] + and %10 + jr nz, .someone_has_fainted + ld a, [wPoisonStepFlagSum] + and %01 + jr z, .no_faint + call .PlayPoisonSFX + xor a + ret + +.someone_has_fainted + ld a, BANK(.Script_MonFaintedToPoison) + ld hl, .Script_MonFaintedToPoison + call CallScript + scf + ret + +.no_faint + xor a + ret + +.DamageMonIfPoisoned: +; check if mon is poisoned, return if not + ld a, MON_STATUS + call GetPartyParamLocation + ld a, [hl] + and 1 << PSN + ret z + +; check if mon is already fainted, return if so + ld a, MON_HP + call GetPartyParamLocation + ld a, [hli] + ld b, a + ld c, [hl] + or c + ret z + +; do 1 HP damage + dec bc + ld [hl], c + dec hl + ld [hl], b + +; check if mon has fainted as a result of poison damage + ld a, b + or c + jr nz, .not_fainted + +; the mon has fainted, reset its status, set carry, and return %10 + ld a, MON_STATUS + call GetPartyParamLocation + ld [hl], 0 + ld c, %10 + scf + ret + +.not_fainted +; set carry and return %01 + ld c, %01 + scf + ret + +.PlayPoisonSFX: + ld de, SFX_POISON + call PlaySFX + ld b, $2 + predef LoadPoisonBGPals + call DelayFrame + ret + +.Script_MonFaintedToPoison: + callasm .PlayPoisonSFX + opentext + callasm .CheckWhitedOut + iffalse .whiteout + closetext + end + +.whiteout + farsjump OverworldWhiteoutScript + +.CheckWhitedOut: + xor a + ld [wCurPartyMon], a + ld de, wPoisonStepPartyFlags +.party_loop + push de + ld a, [de] + and %10 + jr z, .mon_not_fainted + ld c, HAPPINESS_POISONFAINT + farcall ChangeHappiness + farcall GetPartyNickname + ld hl, .PoisonFaintText + call PrintText + +.mon_not_fainted + pop de + inc de + ld hl, wCurPartyMon + inc [hl] + ld a, [wPartyCount] + cp [hl] + jr nz, .party_loop + predef CheckPlayerPartyForFitMon + ld a, d + ld [wScriptVar], a + ret + +.PoisonFaintText: + text_far _PoisonFaintText + text_end + +.PoisonWhiteoutText: ; unreferenced + text_far _PoisonWhiteoutText + text_end diff --git a/engine/events/poisonstep_pals.asm b/engine/events/poisonstep_pals.asm new file mode 100644 index 0000000..5154cf2 --- /dev/null +++ b/engine/events/poisonstep_pals.asm @@ -0,0 +1,48 @@ +LoadPoisonBGPals: + call .LoadPals + ldh a, [hCGB] + and a + ret nz + ; code was probably dummied out here + ret + +.LoadPals: + ldh a, [hCGB] + and a + jr nz, .cgb + ld a, [wTimeOfDayPal] + maskbits NUM_DAYTIMES + cp DARKNESS_F + ld a, %00000000 + jr z, .convert_pals + ld a, %10101010 + +.convert_pals + call DmgToCgbBGPals + ld c, 4 + call DelayFrames + farcall _UpdateTimePals + ret + +.cgb + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals2) + ldh [rSVBK], a + ld hl, wBGPals2 + ld c, 4 palettes +.loop + ld a, LOW(palred 28 + palgreen 21 + palblue 31) + ld [hli], a + ld a, HIGH(palred 28 + palgreen 21 + palblue 31) + ld [hli], a + dec c + jr nz, .loop + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ld c, 4 + call DelayFrames + farcall _UpdateTimePals + ret diff --git a/engine/events/poke_seer.asm b/engine/events/poke_seer.asm new file mode 100644 index 0000000..9ad8d71 --- /dev/null +++ b/engine/events/poke_seer.asm @@ -0,0 +1,408 @@ + const_def + const SEER_INTRO + const SEER_CANT_TELL + const SEER_MET_AT + const SEER_TIME_LEVEL + const SEER_TRADED + const SEER_CANCEL + const SEER_EGG + const SEER_LEVEL_ONLY + + const_def + const SEERACTION_MET + const SEERACTION_TRADED + const SEERACTION_CANT_TELL_1 + const SEERACTION_CANT_TELL_2 + const SEERACTION_LEVEL_ONLY + +PokeSeer: + ld a, SEER_INTRO + call PrintSeerText + call JoyWaitAorB + + ld b, PARTY_LENGTH + farcall SelectMonFromParty + jr c, .cancel + + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + + call IsAPokemon + jr c, .no_mon + + call ReadCaughtData + call SeerAction + ret + +.cancel + ld a, SEER_CANCEL + call PrintSeerText + ret + +.no_mon + ret + +.egg + ld a, SEER_EGG + call PrintSeerText + ret + +SeerAction: + ld a, [wSeerAction] + ld hl, SeerActions + rst JumpTable + ret + +SeerActions: + dw SeerAction0 + dw SeerAction1 + dw SeerAction2 + dw SeerAction3 + dw SeerAction4 + +SeerAction0: + ld a, SEER_MET_AT + call PrintSeerText + ld a, SEER_TIME_LEVEL + call PrintSeerText + call SeerAdvice + ret + +SeerAction1: + call GetCaughtOT + ld a, SEER_TRADED + call PrintSeerText + ld a, SEER_TIME_LEVEL + call PrintSeerText + call SeerAdvice + ret + +SeerAction2: + ld a, SEER_CANT_TELL + call PrintSeerText + ret + +SeerAction3: + ld a, SEER_CANT_TELL + call PrintSeerText + ret + +SeerAction4: + ld a, SEER_LEVEL_ONLY + call PrintSeerText + call SeerAdvice + ret + +ReadCaughtData: + ld a, MON_CAUGHTDATA + call GetPartyParamLocation + ld a, [hli] + ld [wSeerCaughtData], a + ld a, [hld] + ld [wSeerCaughtGender], a + or [hl] + jr z, .error + + ld a, SEERACTION_TRADED + ld [wSeerAction], a + + ld a, MON_ID + call GetPartyParamLocation + ld a, [wPlayerID] + cp [hl] + jr nz, .traded + + inc hl + ld a, [wPlayerID + 1] + ; cp [hl] + jr nz, .traded + + ld a, SEERACTION_MET + ld [wSeerAction], a + +.traded + call GetCaughtLevel + call GetCaughtOT + call GetCaughtName + call GetCaughtTime + call GetCaughtLocation + and a + ret + +.error + ld a, SEERACTION_CANT_TELL_1 + ld [wSeerAction], a + ret + +GetCaughtName: + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames + ld bc, MON_NAME_LENGTH + call AddNTimes + ld de, wSeerNickname + ld bc, MON_NAME_LENGTH + call CopyBytes + ret + +GetCaughtLevel: + ld a, "@" + ld hl, wSeerCaughtLevelString + ld bc, 4 + call ByteFill + + ; caught level + ; Limited to between 1 and 63 since it's a 6-bit quantity. + ld a, [wSeerCaughtData] + and CAUGHT_LEVEL_MASK + jr z, .unknown + cp CAUGHT_EGG_LEVEL ; egg marker value + jr nz, .print + ld a, EGG_LEVEL ; egg hatch level + +.print + ld [wSeerCaughtLevel], a + ld hl, wSeerCaughtLevelString + ld de, wSeerCaughtLevel + lb bc, PRINTNUM_LEFTALIGN | 1, 3 + call PrintNum + ret + +.unknown + ld de, wSeerCaughtLevelString + ld hl, .unknown_level + ld bc, 4 + call CopyBytes + ret + +.unknown_level + db "???@" + +GetCaughtTime: + ld a, [wSeerCaughtData] + and CAUGHT_TIME_MASK + jr z, .none + + rlca + rlca + dec a + ld hl, .times + call GetNthString + ld d, h + ld e, l + ld hl, wSeerTimeOfDay + call CopyName2 + and a + ret + +.none + ld de, wSeerTimeOfDay + call UnknownCaughtData + ret + +.times + db "Morning@" + db "Day@" + db "Night@" + +UnknownCaughtData: + ld hl, .unknown + ld bc, NAME_LENGTH + call CopyBytes + ret + +.unknown + db "Unknown@" + +GetCaughtLocation: + ld a, [wSeerCaughtGender] + and CAUGHT_LOCATION_MASK + jr z, .Unknown + cp LANDMARK_EVENT + jr z, .event + cp LANDMARK_GIFT + jr z, .fail + ld e, a + farcall GetLandmarkName + ld hl, wStringBuffer1 + ld de, wSeerCaughtLocation + ld bc, 17 + call CopyBytes + and a + ret + +.Unknown: + ld de, wSeerCaughtLocation + jp UnknownCaughtData + +.event + ld a, SEERACTION_LEVEL_ONLY + ld [wSeerAction], a + scf + ret + +.fail + ld a, SEERACTION_CANT_TELL_2 + ld [wSeerAction], a + scf + ret + +GetCaughtOT: + ld a, [wCurPartyMon] + ld hl, wPartyMonOTs + ld bc, NAME_LENGTH + call AddNTimes + ld de, wSeerOT + ld bc, NAME_LENGTH + call CopyBytes + +; this routine is useless in Western localizations + ld hl, .male + ld a, [wSeerCaughtGender] + bit 7, a + jr z, .got_grammar + ld hl, .female + +.got_grammar + ld de, wSeerOTGrammar + ld a, "@" + ld [de], a + ret + +.male + db "@" +.female + db "@" + +PrintSeerText: + ld e, a + ld d, 0 + ld hl, SeerTexts + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call PrintText + ret + +SeerTexts: + dw SeerSeeAllText + dw SeerCantTellAThingText + dw SeerNameLocationText + dw SeerTimeLevelText + dw SeerTradeText + dw SeerDoNothingText + dw SeerEggText + dw SeerNoLocationText + +SeerSeeAllText: + text_far _SeerSeeAllText + text_end + +SeerCantTellAThingText: + text_far _SeerCantTellAThingText + text_end + +SeerNameLocationText: + text_far _SeerNameLocationText + text_end + +SeerTimeLevelText: + text_far _SeerTimeLevelText + text_end + +SeerTradeText: + text_far _SeerTradeText + text_end + +SeerNoLocationText: + text_far _SeerNoLocationText + text_end + +SeerEggText: + text_far _SeerEggText + text_end + +SeerDoNothingText: + text_far _SeerDoNothingText + text_end + +SeerAdvice: + ld a, MON_LEVEL + call GetPartyParamLocation + ld a, [wSeerCaughtLevel] + ld c, a + ld a, [hl] + sub c + ld c, a + + ld hl, SeerAdviceTexts + ld de, 3 +.next + cp [hl] + jr c, .print + jr z, .print + add hl, de + jr .next + +.print + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + call PrintText + ret + +SeerAdviceTexts: +; level, text + dbw 9, SeerMoreCareText + dbw 29, SeerMoreConfidentText + dbw 59, SeerMuchStrengthText + dbw 89, SeerMightyText + dbw 100, SeerImpressedText + dbw 255, SeerMoreCareText + +SeerMoreCareText: + text_far _SeerMoreCareText + text_end + +SeerMoreConfidentText: + text_far _SeerMoreConfidentText + text_end + +SeerMuchStrengthText: + text_far _SeerMuchStrengthText + text_end + +SeerMightyText: + text_far _SeerMightyText + text_end + +SeerImpressedText: + text_far _SeerImpressedText + text_end + +GetCaughtGender: + ld hl, MON_CAUGHTGENDER + add hl, bc + + ld a, [hl] + and CAUGHT_LOCATION_MASK + jr z, .genderless + cp LANDMARK_EVENT + jr z, .genderless + + ld a, [hl] + and CAUGHT_GENDER_MASK + jr nz, .male + ld c, CAUGHT_BY_GIRL + ret + +.male + ld c, CAUGHT_BY_BOY + ret + +.genderless + ld c, CAUGHT_BY_UNKNOWN + ret diff --git a/engine/events/pokecenter_pc.asm b/engine/events/pokecenter_pc.asm new file mode 100644 index 0000000..d2e6ca8 --- /dev/null +++ b/engine/events/pokecenter_pc.asm @@ -0,0 +1,679 @@ + ; PokemonCenterPC.WhichPC indexes + const_def + const PCPC_BEFORE_POKEDEX ; 0 + const PCPC_BEFORE_HOF ; 1 + const PCPC_POSTGAME ; 2 + + ; PokemonCenterPC.Jumptable indexes + const_def + const PCPCITEM_PLAYERS_PC ; 0 + const PCPCITEM_BILLS_PC ; 1 + const PCPCITEM_OAKS_PC ; 2 + const PCPCITEM_HALL_OF_FAME ; 3 + const PCPCITEM_TURN_OFF ; 4 + +PokemonCenterPC: + call PC_CheckPartyForPokemon + ret c + call PC_PlayBootSound + ld hl, PokecenterPCTurnOnText + call PC_DisplayText + ld hl, PokecenterPCWhoseText + call PC_DisplayTextWaitMenu + ld hl, .TopMenu + call LoadMenuHeader +.loop + xor a + ldh [hBGMapMode], a + call .ChooseWhichPCListToUse + ld [wWhichIndexSet], a + call DoNthMenu + jr c, .shutdown + ld a, [wMenuSelection] + ld hl, .Jumptable + call MenuJumptable + jr nc, .loop + +.shutdown + call PC_PlayShutdownSound + call ExitMenu + call CloseWindow + ret + +.TopMenu: + db MENU_BACKUP_TILES | MENU_NO_CLICK_SFX ; flags + menu_coords 0, 0, 15, 12 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_WRAP ; flags + db 0 ; items + dw .WhichPC + dw PlaceNthMenuStrings + dw .Jumptable + +.Jumptable: +; entries correspond to PCPCITEM_* constants + dw PlayersPC, .String_PlayersPC + dw BillsPC, .String_BillsPC + dw OaksPC, .String_OaksPC + dw HallOfFamePC, .String_HallOfFame + dw TurnOffPC, .String_TurnOff + +.String_PlayersPC: db "'s PC@" +.String_BillsPC: db "BILL's PC@" +.String_OaksPC: db "PROF.OAK's PC@" +.String_HallOfFame: db "HALL OF FAME@" +.String_TurnOff: db "TURN OFF@" + +.WhichPC: +; entries correspond to PCPC_* constants + + ; PCPC_BEFORE_POKEDEX + db 3 + db PCPCITEM_BILLS_PC + db PCPCITEM_PLAYERS_PC + db PCPCITEM_TURN_OFF + db -1 ; end + + ; PCPC_BEFORE_HOF + db 4 + db PCPCITEM_BILLS_PC + db PCPCITEM_PLAYERS_PC + db PCPCITEM_OAKS_PC + db PCPCITEM_TURN_OFF + db -1 ; end + + ; PCPC_POSTGAME + db 5 + db PCPCITEM_BILLS_PC + db PCPCITEM_PLAYERS_PC + db PCPCITEM_OAKS_PC + db PCPCITEM_HALL_OF_FAME + db PCPCITEM_TURN_OFF + db -1 ; end + +.ChooseWhichPCListToUse: + call CheckReceivedDex + jr nz, .got_dex + ld a, PCPC_BEFORE_POKEDEX + ret + +.got_dex + ld a, [wHallOfFameCount] + and a + ld a, PCPC_BEFORE_HOF + ret z + ld a, PCPC_POSTGAME + ret + +PC_CheckPartyForPokemon: + ld a, [wPartyCount] + and a + ret nz + ld de, SFX_CHOOSE_PC_OPTION + call PlaySFX + ld hl, .PokecenterPCCantUseText + call PC_DisplayText + scf + ret + +.PokecenterPCCantUseText: + text_far _PokecenterPCCantUseText + text_end + + + ; PlayersPCMenuData.WhichPC indexes + const_def + const PLAYERSPC_NORMAL ; 0 + const PLAYERSPC_HOUSE ; 1 + + ; PlayersPCMenuData.PlayersPCMenuPointers indexes + const_def + const PLAYERSPCITEM_WITHDRAW_ITEM ; 0 + const PLAYERSPCITEM_DEPOSIT_ITEM ; 1 + const PLAYERSPCITEM_TOSS_ITEM ; 2 + const PLAYERSPCITEM_MAIL_BOX ; 3 + const PLAYERSPCITEM_DECORATION ; 4 + const PLAYERSPCITEM_LOG_OFF ; 5 + const PLAYERSPCITEM_TURN_OFF ; 6 + +BillsPC: + call PC_PlayChoosePCSound + ld hl, PokecenterBillsPCText + call PC_DisplayText + farcall _BillsPC + and a + ret + +PlayersPC: + call PC_PlayChoosePCSound + ld hl, PokecenterPlayersPCText + call PC_DisplayText + ld b, PLAYERSPC_NORMAL + call _PlayersPC + and a + ret + +OaksPC: + call PC_PlayChoosePCSound + ld hl, PokecenterOaksPCText + call PC_DisplayText + farcall ProfOaksPC + and a + ret + +HallOfFamePC: + call PC_PlayChoosePCSound + call FadeToMenu + farcall _HallOfFamePC + call CloseSubmenu + and a + ret + +TurnOffPC: + ld hl, PokecenterPCOaksClosedText + call PrintText + scf + ret + +PC_PlayBootSound: + ld de, SFX_BOOT_PC + jr PC_WaitPlaySFX + +PC_PlayShutdownSound: + ld de, SFX_SHUT_DOWN_PC + call PC_WaitPlaySFX + call WaitSFX + ret + +PC_PlayChoosePCSound: + ld de, SFX_CHOOSE_PC_OPTION + jr PC_WaitPlaySFX + +PC_PlaySwapItemsSound: + ld de, SFX_SWITCH_POKEMON + call PC_WaitPlaySFX + ld de, SFX_SWITCH_POKEMON + +PC_WaitPlaySFX: + push de + call WaitSFX + pop de + call PlaySFX + ret + +_PlayersHousePC: + call PC_PlayBootSound + ld hl, PlayersPCTurnOnText + call PC_DisplayText + ld b, PLAYERSPC_HOUSE + call _PlayersPC + and a + jr nz, .changed_deco_tiles + call OverworldTextModeSwitch + call ApplyTilemap + call UpdateSprites + call PC_PlayShutdownSound + ld c, FALSE + ret + +.changed_deco_tiles + call ClearBGPalettes + ld c, TRUE + ret + +PlayersPCTurnOnText: + text_far _PlayersPCTurnOnText + text_end + +_PlayersPC: + ld a, b + ld [wWhichIndexSet], a + ld hl, PlayersPCAskWhatDoText + call PC_DisplayTextWaitMenu + call .PlayersPC + call ExitMenu + ret + +.PlayersPC: + xor a + ld [wPCItemsCursor], a + ld [wPCItemsScrollPosition], a + ld hl, PlayersPCMenuData + call LoadMenuHeader +.loop + call UpdateTimePals + call DoNthMenu + jr c, .turn_off + call MenuJumptable + jr nc, .loop + jr .done + +.turn_off + xor a + +.done + call ExitMenu + ret + +PlayersPCMenuData: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 15, 12 + dw .PlayersPCMenuData + db 1 ; default selected option + +.PlayersPCMenuData: + db STATICMENU_CURSOR | STATICMENU_WRAP ; flags + db 0 ; # items? + dw .WhichPC + dw PlaceNthMenuStrings + dw .PlayersPCMenuPointers + +.PlayersPCMenuPointers: +; entries correspond to PLAYERSPCITEM_* constants + dw PlayerWithdrawItemMenu, .WithdrawItem + dw PlayerDepositItemMenu, .DepositItem + dw PlayerTossItemMenu, .TossItem + dw PlayerMailBoxMenu, .MailBox + dw PlayerDecorationMenu, .Decoration + dw PlayerLogOffMenu, .LogOff + dw PlayerLogOffMenu, .TurnOff + +.WithdrawItem: db "WITHDRAW ITEM@" +.DepositItem: db "DEPOSIT ITEM@" +.TossItem: db "TOSS ITEM@" +.MailBox: db "MAIL BOX@" +.Decoration: db "DECORATION@" +.TurnOff: db "TURN OFF@" +.LogOff: db "LOG OFF@" + +.WhichPC: +; entries correspond to PLAYERSPC_* constants + + ; PLAYERSPC_NORMAL + db 5 + db PLAYERSPCITEM_WITHDRAW_ITEM + db PLAYERSPCITEM_DEPOSIT_ITEM + db PLAYERSPCITEM_TOSS_ITEM + db PLAYERSPCITEM_MAIL_BOX + db PLAYERSPCITEM_LOG_OFF + db -1 ; end + + ; PLAYERSPC_HOUSE + db 6 + db PLAYERSPCITEM_WITHDRAW_ITEM + db PLAYERSPCITEM_DEPOSIT_ITEM + db PLAYERSPCITEM_TOSS_ITEM + db PLAYERSPCITEM_MAIL_BOX + db PLAYERSPCITEM_DECORATION + db PLAYERSPCITEM_TURN_OFF + db -1 ; end + +PC_DisplayTextWaitMenu: + ld a, [wOptions] + push af + set NO_TEXT_SCROLL, a + ld [wOptions], a + call MenuTextbox + pop af + ld [wOptions], a + ret + +PlayersPCAskWhatDoText: + text_far _PlayersPCAskWhatDoText + text_end + +PlayerWithdrawItemMenu: + call LoadStandardMenuHeader + farcall ClearPCItemScreen +.loop + call PCItemsJoypad + jr c, .quit + call .Submenu + jr .loop + +.quit + call CloseSubmenu + xor a + ret + +.Submenu: + ; check if the item has a quantity + farcall _CheckTossableItem + ld a, [wItemAttributeValue] + and a + jr z, .askquantity + + ; items without quantity are always ×1 + ld a, 1 + ld [wItemQuantityChange], a + jr .withdraw + +.askquantity + ld hl, .PlayersPCHowManyWithdrawText + call MenuTextbox + farcall SelectQuantityToToss + call ExitMenu + call ExitMenu + jr c, .done + +.withdraw + ld a, [wItemQuantityChange] + ld [wPCItemQuantityChange], a + ld a, [wCurItemQuantity] + ld [wPCItemQuantity], a + ld hl, wNumItems + call ReceiveItem + jr nc, .PackFull + ld a, [wPCItemQuantityChange] + ld [wItemQuantityChange], a + ld a, [wPCItemQuantity] + ld [wCurItemQuantity], a + ld hl, wNumPCItems + call TossItem + predef PartyMonItemName + ld hl, .PlayersPCWithdrewItemsText + call MenuTextbox + xor a + ldh [hBGMapMode], a + call ExitMenu + ret + +.PackFull: + ld hl, .PlayersPCNoRoomWithdrawText + call MenuTextboxBackup + ret + +.done + ret + +.PlayersPCHowManyWithdrawText: + text_far _PlayersPCHowManyWithdrawText + text_end + +.PlayersPCWithdrewItemsText: + text_far _PlayersPCWithdrewItemsText + text_end + +.PlayersPCNoRoomWithdrawText: + text_far _PlayersPCNoRoomWithdrawText + text_end + +PlayerTossItemMenu: + call LoadStandardMenuHeader + farcall ClearPCItemScreen +.loop + call PCItemsJoypad + jr c, .quit + ld de, wNumPCItems + farcall TossItemFromPC + jr .loop + +.quit + call CloseSubmenu + xor a + ret + +PlayerDecorationMenu: + farcall _PlayerDecorationMenu + ld a, c + and a + ret z + scf + ret + +PlayerLogOffMenu: + xor a + scf + ret + +PlayerDepositItemMenu: + call .CheckItemsInBag + jr c, .nope + call DisableSpriteUpdates + call LoadStandardMenuHeader + farcall DepositSellInitPackBuffers +.loop + farcall DepositSellPack + ld a, [wPackUsedItem] + and a + jr z, .close + call .TryDepositItem + farcall CheckRegisteredItem + jr .loop + +.close + call CloseSubmenu + +.nope + xor a + ret + +.CheckItemsInBag: + farcall HasNoItems + ret nc + ld hl, .PlayersPCNoItemsText + call MenuTextboxBackup + scf + ret + +.PlayersPCNoItemsText: + text_far _PlayersPCNoItemsText + text_end + +.TryDepositItem: + ld a, [wSpriteUpdatesEnabled] + push af + ld a, FALSE + ld [wSpriteUpdatesEnabled], a + farcall CheckItemMenu + ld a, [wItemAttributeValue] + ld hl, .dw + rst JumpTable + pop af + ld [wSpriteUpdatesEnabled], a + ret + +.dw +; entries correspond to ITEMMENU_* constants + dw .tossable ; ITEMMENU_NOUSE + dw .no_toss + dw .no_toss + dw .no_toss + dw .tossable ; ITEMMENU_CURRENT + dw .tossable ; ITEMMENU_PARTY + dw .tossable ; ITEMMENU_CLOSE + +.no_toss + ret + +.tossable + ld a, [wPCItemQuantityChange] + push af + ld a, [wPCItemQuantity] + push af + call .DepositItem + pop af + ld [wPCItemQuantity], a + pop af + ld [wPCItemQuantityChange], a + ret + +.DepositItem: + farcall _CheckTossableItem + ld a, [wItemAttributeValue] + and a + jr z, .AskQuantity + ld a, 1 + ld [wItemQuantityChange], a + jr .ContinueDeposit + +.AskQuantity: + ld hl, .PlayersPCHowManyDepositText + call MenuTextbox + farcall SelectQuantityToToss + push af + call ExitMenu + call ExitMenu + pop af + jr c, .DeclinedToDeposit + +.ContinueDeposit: + ld a, [wItemQuantityChange] + ld [wPCItemQuantityChange], a + ld a, [wCurItemQuantity] + ld [wPCItemQuantity], a + ld hl, wNumPCItems + call ReceiveItem + jr nc, .NoRoomInPC + ld a, [wPCItemQuantityChange] + ld [wItemQuantityChange], a + ld a, [wPCItemQuantity] + ld [wCurItemQuantity], a + ld hl, wNumItems + call TossItem + predef PartyMonItemName + ld hl, .PlayersPCDepositItemsText + call PrintText + ret + +.NoRoomInPC: + ld hl, .PlayersPCNoRoomDepositText + call PrintText + ret + +.DeclinedToDeposit: + and a + ret + +.PlayersPCHowManyDepositText: + text_far _PlayersPCHowManyDepositText + text_end + +.PlayersPCDepositItemsText: + text_far _PlayersPCDepositItemsText + text_end + +.PlayersPCNoRoomDepositText: + text_far _PlayersPCNoRoomDepositText + text_end + +PlayerMailBoxMenu: + farcall _PlayerMailBoxMenu + xor a + ret + +PCItemsJoypad: + xor a + ld [wSwitchItem], a +.loop + ld a, [wSpriteUpdatesEnabled] + push af + ld a, FALSE + ld [wSpriteUpdatesEnabled], a + ld hl, .PCItemsMenuData + call CopyMenuHeader + hlcoord 0, 0 + ld b, 10 + ld c, 18 + call Textbox + ld a, [wPCItemsCursor] + ld [wMenuCursorPosition], a + ld a, [wPCItemsScrollPosition] + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuScrollPosition] + ld [wPCItemsScrollPosition], a + ld a, [wMenuCursorY] + ld [wPCItemsCursor], a + pop af + ld [wSpriteUpdatesEnabled], a + ld a, [wSwitchItem] + and a + jr nz, .moving_stuff_around + ld a, [wMenuJoypad] + cp B_BUTTON + jr z, .b_1 + cp A_BUTTON + jr z, .a_1 + cp SELECT + jr z, .select_1 + jr .next + +.moving_stuff_around + ld a, [wMenuJoypad] + cp B_BUTTON + jr z, .b_2 + cp A_BUTTON + jr z, .a_select_2 + cp SELECT + jr z, .a_select_2 + jr .next + +.b_2 + xor a + ld [wSwitchItem], a + jr .next + +.a_select_2 + call PC_PlaySwapItemsSound +.select_1 + farcall SwitchItemsInBag +.next + jp .loop + +.a_1 + farcall ScrollingMenu_ClearLeftColumn + call PlaceHollowCursor + and a + ret + +.b_1 + scf + ret + +.PCItemsMenuData: + db MENU_BACKUP_TILES ; flags + menu_coords 4, 1, 18, 10 + dw .MenuData + db 1 ; default option + +.MenuData: + db SCROLLINGMENU_ENABLE_SELECT | SCROLLINGMENU_ENABLE_FUNCTION3 | SCROLLINGMENU_DISPLAY_ARROWS ; flags + db 4, 8 ; rows, columns + db SCROLLINGMENU_ITEMS_QUANTITY ; item format + dbw 0, wNumPCItems + dba PlaceMenuItemName + dba PlaceMenuItemQuantity + dba UpdateItemDescription + +PC_DisplayText: + call MenuTextbox + call ExitMenu + ret + +PokecenterPCTurnOnText: + text_far _PokecenterPCTurnOnText + text_end + +PokecenterPCWhoseText: + text_far _PokecenterPCWhoseText + text_end + +PokecenterBillsPCText: + text_far _PokecenterBillsPCText + text_end + +PokecenterPlayersPCText: + text_far _PokecenterPlayersPCText + text_end + +PokecenterOaksPCText: + text_far _PokecenterOaksPCText + text_end + +PokecenterPCOaksClosedText: + text_far _PokecenterPCOaksClosedText + text_end diff --git a/engine/events/pokepic.asm b/engine/events/pokepic.asm new file mode 100644 index 0000000..523c5df --- /dev/null +++ b/engine/events/pokepic.asm @@ -0,0 +1,48 @@ +Pokepic:: + ld hl, PokepicMenuHeader + call CopyMenuHeader + call MenuBox + call UpdateSprites + call ApplyTilemap + ld b, SCGB_POKEPIC + call GetSGBLayout + xor a + ldh [hBGMapMode], a + ld a, [wCurPartySpecies] + ld [wCurSpecies], a + call GetBaseData + ld de, vTiles1 + predef GetMonFrontpic + ld a, [wMenuBorderTopCoord] + inc a + ld b, a + ld a, [wMenuBorderLeftCoord] + inc a + ld c, a + call Coord2Tile + ld a, $80 + ldh [hGraphicStartTile], a + lb bc, 7, 7 + predef PlaceGraphic + call WaitBGMap + ret + +ClosePokepic:: + ld hl, PokepicMenuHeader + call CopyMenuHeader + call ClearMenuBoxInterior + call WaitBGMap + call GetMemSGBLayout + xor a + ldh [hBGMapMode], a + call OverworldTextModeSwitch + call ApplyTilemap + call UpdateSprites + call LoadStandardFont + ret + +PokepicMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 6, 4, 14, 13 + dw NULL + db 1 ; default option diff --git a/engine/events/pokerus/apply_pokerus_tick.asm b/engine/events/pokerus/apply_pokerus_tick.asm new file mode 100644 index 0000000..223fe01 --- /dev/null +++ b/engine/events/pokerus/apply_pokerus_tick.asm @@ -0,0 +1,26 @@ +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] + and a + ret z ; make sure it's not wasting time on an empty party + ld c, a +.loop + ld a, [hl] + and $f ; lower nybble is the number of days remaining + jr z, .next ; if already 0, skip + sub b ; subtract the number of days + jr nc, .ok ; max(result, 0) + xor a +.ok + ld d, a ; back up this value because we need to preserve the strain (upper nybble) + ld a, [hl] + and $f0 + add d + ld [hl], a ; this prevents a cured pokemon from recontracting pokerus +.next + ld de, PARTYMON_STRUCT_LENGTH + add hl, de + dec c + jr nz, .loop + ret diff --git a/engine/events/pokerus/check_pokerus.asm b/engine/events/pokerus/check_pokerus.asm new file mode 100644 index 0000000..201a371 --- /dev/null +++ b/engine/events/pokerus/check_pokerus.asm @@ -0,0 +1,25 @@ +_CheckPokerus: +; Return carry if a monster in your party has Pokerus + +; Get number of monsters to iterate over + ld a, [wPartyCount] + and a + jr z, .NoPokerus + ld b, a +; Check each monster in the party for Pokerus + ld hl, wPartyMon1PokerusStatus + ld de, PARTYMON_STRUCT_LENGTH +.Check: + ld a, [hl] + and $0f ; only the bottom nybble is used + jr nz, .HasPokerus +; Next PartyMon + add hl, de + dec b + jr nz, .Check +.NoPokerus: + and a + ret +.HasPokerus: + scf + ret diff --git a/engine/events/pokerus/pokerus.asm b/engine/events/pokerus/pokerus.asm new file mode 100644 index 0000000..01b5456 --- /dev/null +++ b/engine/events/pokerus/pokerus.asm @@ -0,0 +1,167 @@ +GivePokerusAndConvertBerries: + call ConvertBerriesToBerryJuice + ld hl, wPartyMon1PokerusStatus + ld a, [wPartyCount] + ld b, a + ld de, PARTYMON_STRUCT_LENGTH +; Check to see if any of your Pokemon already has Pokerus. +; If so, sample its spread through your party. +; This means that you cannot get Pokerus de novo while +; a party member has an active infection. +.loopMons + ld a, [hl] + and $f + jr nz, .TrySpreadPokerus + add hl, de + dec b + jr nz, .loopMons + +; If we haven't been to Goldenrod City at least once, +; prevent the contraction of Pokerus. + ld hl, wStatusFlags2 + bit STATUSFLAGS2_REACHED_GOLDENROD_F, [hl] + ret z + call Random + ldh a, [hRandomAdd] + and a + ret nz + ldh a, [hRandomSub] + cp 3 + ret nc ; 3/65536 chance (00 00, 00 01 or 00 02) + ld a, [wPartyCount] + ld b, a +.randomMonSelectLoop + call Random + and $7 + cp b + jr nc, .randomMonSelectLoop + ld hl, wPartyMon1PokerusStatus + call GetPartyLocation ; get pokerus byte of random mon + ld a, [hl] + and $f0 + ret nz ; if it already has pokerus, do nothing +.randomPokerusLoop ; Simultaneously sample the strain and duration + call Random + and a + jr z, .randomPokerusLoop + ld b, a + and $f0 + jr z, .load_pkrs + ld a, b + and $7 + inc a +.load_pkrs + ld b, a ; this should come before the label + swap b + and $3 + inc a + add b + ld [hl], a + ret + +.TrySpreadPokerus: + call Random + cp 33 percent + 1 + ret nc ; 1/3 chance + + ld a, [wPartyCount] + cp 1 + ret z ; only one mon, nothing to do + + ld c, [hl] + ld a, b + cp 2 + jr c, .checkPreviousMonsLoop ; no more mons after this one, go backwards + + call Random + cp 50 percent + 1 + jr c, .checkPreviousMonsLoop ; 1/2 chance, go backwards +.checkFollowingMonsLoop + add hl, de + ld a, [hl] + and a + jr z, .infectMon + ld c, a + and $3 + ret z ; if mon has cured pokerus, stop searching + dec b ; go on to next mon + ld a, b + cp 1 + jr nz, .checkFollowingMonsLoop ; no more mons left + ret + +.checkPreviousMonsLoop + ld a, [wPartyCount] + cp b + ret z ; no more mons + ld a, l + sub e + ld l, a + ld a, h + sbc d + ld h, a + ld a, [hl] + and a + jr z, .infectMon + ld c, a + and $3 + ret z ; if mon has cured pokerus, stop searching + inc b ; go on to next mon + jr .checkPreviousMonsLoop + +.infectMon + ld a, c + and $f0 + ld b, a + ld a, c + swap a + and $3 + inc a + add b + ld [hl], a + ret + +ConvertBerriesToBerryJuice: +; If we haven't been to Goldenrod City at least once, +; prevent Shuckle from turning held Berry into Berry Juice. + ld hl, wStatusFlags2 + bit STATUSFLAGS2_REACHED_GOLDENROD_F, [hl] + ret z + call Random + cp 1 out_of 16 ; 6.25% chance + ret nc + ld hl, SHUCKLE + call GetPokemonIDFromIndex + ld [wTempSpecies], a + ld hl, wPartyMons + ld a, [wPartyCount] +.partyMonLoop + push af + push hl + ld a, [wTempSpecies] + cp [hl] + jr nz, .loopMon + ld bc, MON_ITEM + add hl, bc + ld a, [hl] + cp BERRY + jr z, .convertToJuice + +.loopMon + pop hl + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop af + dec a + jr nz, .partyMonLoop +.done + xor a + ld [wTempSpecies], a + ret + +.convertToJuice + ld a, BERRY_JUICE + ld [hl], a + pop hl + pop af + jr .done diff --git a/engine/events/print_photo.asm b/engine/events/print_photo.asm new file mode 100644 index 0000000..056788b --- /dev/null +++ b/engine/events/print_photo.asm @@ -0,0 +1,50 @@ +PhotoStudio: + ld hl, .WhichMonPhotoText + call PrintText + farcall SelectMonFromParty + jr c, .cancel + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + + ld hl, .HoldStillText + call PrintText + call DisableSpriteUpdates + farcall PrintPartymon + call ReturnToMapWithSpeechTextbox + ldh a, [hPrinter] + and a + jr nz, .cancel + ld hl, .PrestoAllDoneText + jr .print_text + +.cancel + ld hl, .NoPhotoText + jr .print_text + +.egg + ld hl, .EggPhotoText + +.print_text + call PrintText + ret + +.WhichMonPhotoText: + text_far _WhichMonPhotoText + text_end + +.HoldStillText: + text_far _HoldStillText + text_end + +.PrestoAllDoneText: + text_far _PrestoAllDoneText + text_end + +.NoPhotoText: + text_far _NoPhotoText + text_end + +.EggPhotoText: + text_far _EggPhotoText + text_end diff --git a/engine/events/print_unown.asm b/engine/events/print_unown.asm new file mode 100644 index 0000000..41485fd --- /dev/null +++ b/engine/events/print_unown.asm @@ -0,0 +1,238 @@ +DEF UNOWNSTAMP_BOLD_A EQU "♂" ; $ef +DEF UNOWNSTAMP_BOLD_B EQU "♀" ; $f5 + +_UnownPrinter: + ld a, [wUnownDex] + and a + ret z + + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + ld a, [wOptions] + push af + set NO_TEXT_SCROLL, a + ld [wOptions], a + call ClearBGPalettes + call ClearTilemap + + ld de, UnownDexATile + ld hl, vTiles0 tile UNOWNSTAMP_BOLD_A + lb bc, BANK(UnownDexATile), 1 + call Request1bpp + + ld de, UnownDexBTile + ld hl, vTiles0 tile UNOWNSTAMP_BOLD_B + lb bc, BANK(UnownDexBTile), 1 + call Request1bpp + + hlcoord 0, 0 + lb bc, 3, 18 + call Textbox + + hlcoord 0, 5 + lb bc, 7, 7 + call Textbox + + hlcoord 0, 14 + lb bc, 2, 18 + call Textbox + + hlcoord 1, 2 + ld de, AlphRuinsStampString + call PlaceString + + hlcoord 1, 16 + ld de, UnownDexDoWhatString + call PlaceString + + hlcoord 10, 6 + ld de, UnownDexMenuString + call PlaceString + + xor a + ld [wJumptableIndex], a + call .UpdateUnownFrontpic + call WaitBGMap + + ld hl, UNOWN + call GetPokemonIDFromIndex + ld [wCurPartySpecies], a + xor a + ld [wTempMonDVs], a + ld [wTempMonDVs + 1], a + + ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + call SetPalettes + +.joy_loop + call JoyTextDelay + + ldh a, [hJoyPressed] + and B_BUTTON + jr nz, .pressed_b + + ldh a, [hJoyPressed] + vc_patch Forbid_printing_Unown +if DEF(_CRYSTAL_VC) + and NO_INPUT +else + and A_BUTTON +endc + vc_patch_end + jr nz, .pressed_a + + call .LeftRight + call DelayFrame + jr .joy_loop + +.pressed_a + ld a, [wJumptableIndex] + push af + farcall PrintUnownStamp + call RestartMapMusic + pop af + ld [wJumptableIndex], a + jr .joy_loop + +.pressed_b + pop af + ld [wOptions], a + pop af + ldh [hInMenu], a + call ReturnToMapFromSubmenu + ret + +.LeftRight: + ldh a, [hJoyLast] + and D_RIGHT + jr nz, .press_right + ldh a, [hJoyLast] + and D_LEFT + jr nz, .press_left + ret + +.press_left + ld hl, wJumptableIndex + ld a, [hl] + and a + jr nz, .wrap_around_left + ld [hl], NUM_UNOWN + 1 +.wrap_around_left + dec [hl] + jr .return + +.press_right + ld hl, wJumptableIndex + ld a, [hl] + cp NUM_UNOWN + jr c, .wrap_around_right + ld [hl], -1 +.wrap_around_right + inc [hl] + +.return + call .UpdateUnownFrontpic + ret + +.UpdateUnownFrontpic: + ld a, [wJumptableIndex] + cp NUM_UNOWN + jr z, .vacant + inc a + ld [wUnownLetter], a + ld hl, UNOWN + call GetPokemonIDFromIndex + ld [wCurPartySpecies], a + xor a + ld [wBoxAlignment], a + ld de, vTiles2 + predef GetMonFrontpic + call .Load2bppToSRAM + hlcoord 1, 6 + xor a + ldh [hGraphicStartTile], a + lb bc, 7, 7 + predef PlaceGraphic + ld de, vTiles2 tile $31 + farcall RotateUnownFrontpic + ret + +.Load2bppToSRAM: + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + + ld a, BANK(sScratch) + call OpenSRAM + ld de, wDecompressScratch + ld hl, sScratch + ldh a, [hROMBank] + ld b, a + ld c, $31 + call Get2bpp + call CloseSRAM + + pop af + ldh [rSVBK], a + ret + +.vacant + hlcoord 1, 6 + lb bc, 7, 7 + call ClearBox + hlcoord 1, 9 + ld de, UnownDexVacantString + call PlaceString + xor a ; sScratch + call OpenSRAM + ld hl, sScratch + ld bc, $31 tiles + xor a + call ByteFill + ld hl, vTiles2 tile $31 + ld de, sScratch + ld c, $31 + ldh a, [hROMBank] + ld b, a + call Get2bpp + call CloseSRAM + ld c, 20 + call DelayFrames + ret + +AlphRuinsStampString: + db " ALPH RUINS STAMP@" + +UnownDexDoWhatString: + db "Do what?@" + +UnownDexMenuString: + db UNOWNSTAMP_BOLD_A, " PRINT" + next UNOWNSTAMP_BOLD_B, " CANCEL" + next "← PREVIOUS" + next "→ NEXT" + db "@" + +UnownDexVacantString: + db "VACANT@" + +UnownDexATile: +INCBIN "gfx/printer/bold_a.1bpp" +UnownDexBTile: +INCBIN "gfx/printer/bold_b.1bpp" + +PlaceUnownPrinterFrontpic: + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, " " + call ByteFill + hlcoord 7, 11 + ld a, $31 + ldh [hGraphicStartTile], a + lb bc, 7, 7 + predef PlaceGraphic + ret diff --git a/engine/events/print_unown_2.asm b/engine/events/print_unown_2.asm new file mode 100644 index 0000000..aae80b1 --- /dev/null +++ b/engine/events/print_unown_2.asm @@ -0,0 +1,103 @@ +RotateUnownFrontpic: +; something to do with Unown printer + push de + xor a ; BANK(sScratch) + call OpenSRAM + ld hl, sScratch + ld bc, 0 +.loop + push bc + push hl + push bc + ld de, wPrintedUnownTileSource + call .Copy + call .Rotate + ld hl, UnownPrinter_GBPrinterRectangle + pop bc + add hl, bc + add hl, bc + ld a, [hli] + ld e, a + ld d, [hl] + ld hl, wPrintedUnownTileDest + call .Copy + pop hl + ld bc, LEN_2BPP_TILE + add hl, bc + pop bc + inc c + ld a, c + cp 7 * 7 + jr c, .loop + + ld hl, wGameboyPrinter2bppSource + ld de, sScratch + ld bc, 7 * 7 tiles + call CopyBytes + pop hl + ld de, sScratch + ld c, 7 * 7 + ldh a, [hROMBank] + ld b, a + call Get2bpp + call CloseSRAM + ret + +.Copy: + ld c, LEN_2BPP_TILE +.loop_copy + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .loop_copy + ret + +.Rotate: + ld hl, wPrintedUnownTileDest + ld e, %10000000 + ld d, 8 +.loop_decompress + push hl + ld hl, wPrintedUnownTileSource + call .CountSetBit + pop hl + ld a, b + ld [hli], a + push hl + ld hl, wPrintedUnownTileSource + 1 + call .CountSetBit + pop hl + ld a, b + ld [hli], a + srl e + dec d + jr nz, .loop_decompress + ret + +.CountSetBit: + ld b, 0 + ld c, 8 +.loop_count + ld a, [hli] + and e + jr z, .clear + scf + jr .apply + +.clear + and a + +.apply + rr b + inc hl + dec c + jr nz, .loop_count + ret + +UnownPrinter_GBPrinterRectangle: +for y, 7 +for x, 7 - 1, -1, -1 + dw wGameboyPrinter2bppSource tile (x * 7 + y) +endr +endr diff --git a/engine/events/prof_oaks_pc.asm b/engine/events/prof_oaks_pc.asm new file mode 100644 index 0000000..2af53c6 --- /dev/null +++ b/engine/events/prof_oaks_pc.asm @@ -0,0 +1,200 @@ +ProfOaksPC: + ld hl, OakPCText1 + call MenuTextbox + call YesNoBox + jr c, .shutdown + call ProfOaksPCBoot ; player chose "yes"? +.shutdown + ld hl, OakPCText4 + call PrintText + call JoyWaitAorB + call ExitMenu + ret + +ProfOaksPCBoot: + ld hl, OakPCText2 + call PrintText + call Rate + call PlaySFX ; sfx loaded by previous Rate function call + call JoyWaitAorB + call WaitSFX + ret + +ProfOaksPCRating: + call Rate + push de + ld de, MUSIC_NONE + call PlayMusic + pop de + call PlaySFX + call JoyWaitAorB + call WaitSFX + ret + +Rate: +; calculate Seen/Owned + ld hl, wPokedexCaught + ld bc, wEndPokedexCaught - wPokedexCaught + call CountSetBits16 + push bc + ld hl, wPokedexSeen + ld bc, wEndPokedexSeen - wPokedexSeen + call CountSetBits16 + +; print appropriate rating + ld hl, wStringBuffer3 + call .UpdateRatingBuffer + pop bc + push bc + ld hl, wStringBuffer4 + call .UpdateRatingBuffer + ld hl, OakPCText3 + call PrintText + call JoyWaitAorB + pop bc + ld hl, OakRatings + call FindOakRating + push de + call PrintText + pop de + ret + +.UpdateRatingBuffer: + ld a, b + ld b, c + ld c, a + push bc + push hl + ld a, "@" + ld bc, ITEM_NAME_LENGTH + call ByteFill + ld hl, sp + 2 + ld d, h + ld e, l + pop hl + lb bc, PRINTNUM_LEFTALIGN | 2, 4 + call PrintNum + pop bc + ret + +FindOakRating: +; return sound effect in de +; return text pointer in hl + ld a, [hli] + ld d, a + ld a, [hli] + cp b + jr c, .next + jr nz, .match + ld a, d + cp c + jr nc, .match +.next + rept 4 + inc hl + endr + jr FindOakRating + +.match + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld h, [hl] + ld l, a + ret + +INCLUDE "data/events/pokedex_ratings.asm" + +OakPCText1: + text_far _OakPCText1 + text_end + +OakPCText2: + text_far _OakPCText2 + text_end + +OakPCText3: + text_far _OakPCText3 + text_end + +OakRating01: + text_far _OakRating01 + text_end + +OakRating02: + text_far _OakRating02 + text_end + +OakRating03: + text_far _OakRating03 + text_end + +OakRating04: + text_far _OakRating04 + text_end + +OakRating05: + text_far _OakRating05 + text_end + +OakRating06: + text_far _OakRating06 + text_end + +OakRating07: + text_far _OakRating07 + text_end + +OakRating08: + text_far _OakRating08 + text_end + +OakRating09: + text_far _OakRating09 + text_end + +OakRating10: + text_far _OakRating10 + text_end + +OakRating11: + text_far _OakRating11 + text_end + +OakRating12: + text_far _OakRating12 + text_end + +OakRating13: + text_far _OakRating13 + text_end + +OakRating14: + text_far _OakRating14 + text_end + +OakRating15: + text_far _OakRating15 + text_end + +OakRating16: + text_far _OakRating16 + text_end + +OakRating17: + text_far _OakRating17 + text_end + +OakRating18: + text_far _OakRating18 + text_end + +OakRating19: + text_far _OakRating19 + text_end + +OakPCText4: + text_far _OakPCText4 + text_end diff --git a/engine/events/repel.asm b/engine/events/repel.asm new file mode 100644 index 0000000..e324239 --- /dev/null +++ b/engine/events/repel.asm @@ -0,0 +1,10 @@ +RepelWoreOffScript:: + opentext + writetext .RepelWoreOffText + waitbutton + closetext + end + +.RepelWoreOffText: + text_far _RepelWoreOffText + text_end diff --git a/engine/events/sacred_ash.asm b/engine/events/sacred_ash.asm new file mode 100644 index 0000000..d105b2f --- /dev/null +++ b/engine/events/sacred_ash.asm @@ -0,0 +1,68 @@ +_SacredAsh: + ld a, $0 + ld [wItemEffectSucceeded], a + call CheckAnyFaintedMon + ret nc + + ld hl, SacredAshScript + call QueueScript + ld a, $1 + ld [wItemEffectSucceeded], a + ret + +CheckAnyFaintedMon: + ld de, PARTYMON_STRUCT_LENGTH + ld bc, wPartySpecies + ld hl, wPartyMon1HP + ld a, [wPartyCount] + and a + ret z + +.loop + push af + push hl + ld a, [bc] + inc bc + cp EGG + jr z, .next + + ld a, [hli] + or [hl] + jr z, .done + +.next + pop hl + add hl, de + pop af + dec a + jr nz, .loop + xor a + ret + +.done + pop hl + pop af + scf + ret + +SacredAshScript: + special HealParty + reloadmappart + playsound SFX_WARP_TO + special FadeOutPalettes + special FadeInPalettes + special FadeOutPalettes + special FadeInPalettes + special FadeOutPalettes + special FadeInPalettes + waitsfx + writetext .UseSacredAshText + playsound SFX_CAUGHT_MON + waitsfx + waitbutton + closetext + end + +.UseSacredAshText: + text_far _UseSacredAshText + text_end diff --git a/engine/events/shuckle.asm b/engine/events/shuckle.asm new file mode 100644 index 0000000..1f12cfb --- /dev/null +++ b/engine/events/shuckle.asm @@ -0,0 +1,156 @@ +DEF MANIA_OT_ID EQU 00518 + +GiveShuckle: +; Adding to the party. + xor a ; PARTYMON + ld [wMonType], a + +; Level 15 Shuckle. + ld hl, SHUCKLE + call GetPokemonIDFromIndex + ld [wCurPartySpecies], a + ld a, 15 + ld [wCurPartyLevel], a + + predef TryAddMonToParty + jr nc, .NotGiven + +; Caught data. + ld b, CAUGHT_BY_UNKNOWN + farcall SetGiftPartyMonCaughtData + +; Holding a Berry. + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wPartyCount] + dec a + push af + push bc + ld hl, wPartyMon1Item + call AddNTimes + ld [hl], BERRY + pop bc + pop af + +; OT ID. + ld hl, wPartyMon1ID + call AddNTimes + ld a, HIGH(MANIA_OT_ID) + ld [hli], a + ld [hl], LOW(MANIA_OT_ID) + +; Nickname. + ld a, [wPartyCount] + dec a + ld hl, wPartyMonNicknames + call SkipNames + ld de, SpecialShuckleNickname + call CopyName2 + +; OT. + ld a, [wPartyCount] + dec a + ld hl, wPartyMonOTs + call SkipNames + ld de, SpecialShuckleOT + call CopyName2 + +; Engine flag for this event. + ld hl, wDailyFlags1 + set DAILYFLAGS1_GOT_SHUCKIE_TODAY_F, [hl] + ld a, 1 + ld [wScriptVar], a + ret + +.NotGiven: + xor a + ld [wScriptVar], a + ret + +SpecialShuckleOT: + db "MANIA@" + +SpecialShuckleNickname: + db "SHUCKIE@" + +ReturnShuckie: + farcall SelectMonFromParty + jr c, .refused + + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld a, l + sub LOW(SHUCKLE) + if HIGH(SHUCKLE) == 0 + or h + else + jr nz, .DontReturn + if HIGH(SHUCKLE) == 1 + dec h + else + ld a, h + cp HIGH(SHUCKLE) + endc + endc + jr nz, .DontReturn + + ld a, [wCurPartyMon] + ld hl, wPartyMon1ID + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + +; OT ID + ld a, [hli] + cp HIGH(MANIA_OT_ID) + jr nz, .DontReturn + ld a, [hl] + cp LOW(MANIA_OT_ID) + jr nz, .DontReturn + +; OT + ld a, [wCurPartyMon] + ld hl, wPartyMonOTs + call SkipNames + ld de, SpecialShuckleOT +.CheckOT: + ld a, [de] + cp [hl] + jr nz, .DontReturn + cp "@" + jr z, .done + inc de + inc hl + jr .CheckOT + +.done + farcall CheckCurPartyMonFainted + jr c, .fainted + ld a, [wCurPartyMon] + ld hl, wPartyMon1Happiness + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld a, [hl] + cp 150 + ld a, SHUCKIE_HAPPY + jr nc, .HappyToStayWithYou + xor a ; REMOVE_PARTY + ld [wPokemonWithdrawDepositParameter], a + callfar RemoveMonFromPartyOrBox + ld a, SHUCKIE_RETURNED +.HappyToStayWithYou: + ld [wScriptVar], a + ret + +.refused + ld a, SHUCKIE_REFUSED + ld [wScriptVar], a + ret + +.DontReturn: + xor a ; SHUCKIE_WRONG_MON + ld [wScriptVar], a + ret + +.fainted + ld a, SHUCKIE_FAINTED + ld [wScriptVar], a + ret diff --git a/engine/events/specials.asm b/engine/events/specials.asm new file mode 100644 index 0000000..8417d5a --- /dev/null +++ b/engine/events/specials.asm @@ -0,0 +1,422 @@ +Special:: +; Run script special de. + ld hl, SpecialsPointers + add hl, de + add hl, de + add hl, de + ld b, [hl] + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + ld a, b + rst FarCall + ret + +INCLUDE "data/events/special_pointers.asm" + +UnusedDummySpecial: + ret + +SetPlayerPalette: + ld a, [wScriptVar] + ld d, a + farcall _SetPlayerPalette + ret + +GameCornerPrizeMonCheckDex: + ld a, [wScriptVar] + call CheckCaughtMon + ret nz + ld a, [wScriptVar] + call SetSeenAndCaughtMon + call FadeToMenu + ld a, [wScriptVar] + ld [wNamedObjectIndex], a + farcall NewPokedexEntry + call ExitAllMenus + ret + +UnusedSetSeenMon: + ld a, [wScriptVar] + call SetSeenMon + ret + +FindPartyMonAboveLevel: + ld a, [wScriptVar] + ld b, a + farcall _FindPartyMonAboveLevel + jr z, FoundNone + jr FoundOne + +FindPartyMonAtLeastThatHappy: + ld a, [wScriptVar] + ld b, a + farcall _FindPartyMonAtLeastThatHappy + jr z, FoundNone + jr FoundOne + +FindPartyMonThatSpecies: + ld a, [wScriptVar] + ld b, a + farcall _FindPartyMonThatSpecies + jr z, FoundNone + jr FoundOne + +FindPartyMonThatSpeciesYourTrainerID: + ld a, [wScriptVar] + ld b, a + farcall _FindPartyMonThatSpeciesYourTrainerID + jr z, FoundNone + jr FoundOne + +FoundOne: + ld a, TRUE + ld [wScriptVar], a + ret + +FoundNone: + xor a + ld [wScriptVar], a + ret + +NameRival: + ld b, NAME_RIVAL + ld de, wRivalName + farcall _NamingScreen + ld hl, wRivalName + ld de, .DefaultName + call InitName + ret + +.DefaultName: + db "SILVER@" + +NameRater: + farcall _NameRater + ret + +OverworldTownMap: + call FadeToMenu + farcall _TownMap + call ExitAllMenus + ret + +UnownPrinter: + call FadeToMenu + farcall _UnownPrinter + call ExitAllMenus + ret + +DisplayLinkRecord: + call FadeToMenu + farcall _DisplayLinkRecord + call ExitAllMenus + ret + +PlayersHousePC: + xor a + ld [wScriptVar], a + farcall _PlayersHousePC + ld a, c + ld [wScriptVar], a + ret + +CheckMysteryGift: + ld a, BANK(sMysteryGiftItem) + call OpenSRAM + ld a, [sMysteryGiftItem] + and a + jr z, .no + inc a + +.no + ld [wScriptVar], a + call CloseSRAM + ret + +GetMysteryGiftItem: + ld a, BANK(sMysteryGiftItem) + call OpenSRAM + ld a, [sMysteryGiftItem] + ld [wCurItem], a + ld a, 1 + ld [wItemQuantityChange], a + ld hl, wNumItems + call ReceiveItem + jr nc, .no_room + xor a + ld [sMysteryGiftItem], a + call CloseSRAM + ld a, [wCurItem] + ld [wNamedObjectIndex], a + call GetItemName + ld hl, .ReceiveItemText + call PrintText + ld a, TRUE + ld [wScriptVar], a + ret + +.no_room + call CloseSRAM + xor a + ld [wScriptVar], a + ret + +.ReceiveItemText: + text_far _ReceiveItemText + text_end + +BugContestJudging: + farcall _BugContestJudging + ld a, b + ld [wScriptVar], a + ret + +MapRadio: + ld a, [wScriptVar] + ld e, a + farcall PlayRadio + ret + +UnownPuzzle: + call FadeToMenu + farcall _UnownPuzzle + ld a, [wSolvedUnownPuzzle] + ld [wScriptVar], a + call ExitAllMenus + ret + +SlotMachine: + call CheckCoinsAndCoinCase + ret c + ld a, BANK(_SlotMachine) + ld hl, _SlotMachine + call StartGameCornerGame + ret + +CardFlip: + call CheckCoinsAndCoinCase + ret c + ld a, BANK(_CardFlip) + ld hl, _CardFlip + call StartGameCornerGame + ret + +UnusedMemoryGame: + call CheckCoinsAndCoinCase + ret c + ld a, BANK(_MemoryGame) + ld hl, _MemoryGame + call StartGameCornerGame + ret + +StartGameCornerGame: + call FarQueueScript + call FadeToMenu + ld hl, wQueuedScriptBank + ld a, [hli] + push af + ld a, [hli] + ld h, [hl] + ld l, a + pop af + rst FarCall + call ExitAllMenus + ret + +CheckCoinsAndCoinCase: + ld hl, wCoins + ld a, [hli] + or [hl] + jr z, .no_coins + ld a, COIN_CASE + ld [wCurItem], a + ld hl, wNumItems + call CheckItem + jr nc, .no_coin_case + and a + ret + +.no_coins + ld hl, .NoCoinsText + jr .print + +.no_coin_case + ld hl, .NoCoinCaseText + +.print + call PrintText + scf + ret + +.NoCoinsText: + text_far _NoCoinsText + text_end + +.NoCoinCaseText: + text_far _NoCoinCaseText + text_end + +ClearBGPalettesBufferScreen: + call ClearBGPalettes + call BufferScreen + ret + +ScriptReturnCarry: + jr c, .carry + xor a + ld [wScriptVar], a + ret +.carry + ld a, 1 + ld [wScriptVar], a + ret + +UnusedCheckUnusedTwoDayTimer: + farcall CheckUnusedTwoDayTimer + ld a, [wUnusedTwoDayTimer] + ld [wScriptVar], a + ret + +ActivateFishingSwarm: + ld a, [wScriptVar] + ld [wFishingSwarmFlag], a + ret + +StoreSwarmMapIndices:: + ld a, c + and a + jr nz, .yanma +; swarm dark cave violet entrance + ld a, d + ld [wDunsparceMapGroup], a + ld a, e + ld [wDunsparceMapNumber], a + ret + +.yanma + ld a, d + ld [wYanmaMapGroup], a + ld a, e + ld [wYanmaMapNumber], a + ret + +CheckPokerus: +; Check if a monster in your party has Pokerus + farcall _CheckPokerus + jp ScriptReturnCarry + +ResetLuckyNumberShowFlag: + farcall RestartLuckyNumberCountdown + ld hl, wLuckyNumberShowFlag + res LUCKYNUMBERSHOW_GAME_OVER_F, [hl] + farcall LoadOrRegenerateLuckyIDNumber + ret + +CheckLuckyNumberShowFlag: + farcall _CheckLuckyNumberShowFlag + jp ScriptReturnCarry + +SnorlaxAwake: +; Check if the Poké Flute channel is playing, and if the player is standing +; next to Snorlax. + +; outputs: +; wScriptVar is 1 if the conditions are met, otherwise 0. + +; check background music + ld a, [wMapMusic] + cp MUSIC_POKE_FLUTE_CHANNEL + jr nz, .nope + + ld a, [wXCoord] + ld b, a + ld a, [wYCoord] + ld c, a + + ld hl, .ProximityCoords +.loop + ld a, [hli] + cp -1 + jr z, .nope + cp b + jr nz, .nextcoord + ld a, [hli] + cp c + jr nz, .loop + + ld a, TRUE + jr .done + +.nextcoord + inc hl + jr .loop + +.nope + xor a +.done + ld [wScriptVar], a + ret + +.ProximityCoords: + ; x, y + db 33, 8 ; left + db 34, 10 ; below + db 35, 10 ; below + db 36, 8 ; right + db 36, 9 ; right + db -1 + +PlayCurMonCry: + ld a, [wCurPartySpecies] + jp PlayMonCry + +GameboyCheck: + ldh a, [hCGB] + and a + jr nz, .cgb + ldh a, [hSGB] + and a + jr nz, .sgb +; gb + xor a ; GBCHECK_GB + jr .done + +.sgb + ld a, GBCHECK_SGB + jr .done + +.cgb + ld a, GBCHECK_CGB +.done + ld [wScriptVar], a + ret + +FadeOutMusic: + ld a, LOW(MUSIC_NONE) + ld [wMusicFadeID], a + ld a, HIGH(MUSIC_NONE) + ld [wMusicFadeID + 1], a + ld a, $2 + ld [wMusicFade], a + ret + +Diploma: + call FadeToMenu + farcall _Diploma + call ExitAllMenus + ret + +PrintDiploma: + call FadeToMenu + farcall _PrintDiploma + call ExitAllMenus + ret + +TrainerHouse: + ld a, BANK(sMysteryGiftTrainerHouseFlag) + call OpenSRAM + ld a, [sMysteryGiftTrainerHouseFlag] + ld [wScriptVar], a + jp CloseSRAM diff --git a/engine/events/squirtbottle.asm b/engine/events/squirtbottle.asm new file mode 100644 index 0000000..411b5c2 --- /dev/null +++ b/engine/events/squirtbottle.asm @@ -0,0 +1,45 @@ +_Squirtbottle: + ld hl, .SquirtbottleScript + call QueueScript + ld a, $1 + ld [wItemEffectSucceeded], a + ret + +.SquirtbottleScript: + reloadmappart + special UpdateTimePals + callasm .CheckCanUseSquirtbottle + iffalse .SquirtbottleNothingScript + farsjump WateredWeirdTreeScript + +.SquirtbottleNothingScript: + jumptext .SquirtbottleNothingText + +.SquirtbottleNothingText: + text_far _SquirtbottleNothingText + text_end + +.CheckCanUseSquirtbottle: + ld a, [wMapGroup] + cp GROUP_ROUTE_36 + jr nz, .nope + + ld a, [wMapNumber] + cp MAP_ROUTE_36 + jr nz, .nope + + farcall GetFacingObject + jr c, .nope + + ld a, d + cp SPRITEMOVEDATA_SUDOWOODO + jr nz, .nope + + ld a, 1 + ld [wScriptVar], a + ret + +.nope + xor a + ld [wScriptVar], a + ret diff --git a/engine/events/std_collision.asm b/engine/events/std_collision.asm new file mode 100644 index 0000000..5ab1126 --- /dev/null +++ b/engine/events/std_collision.asm @@ -0,0 +1,29 @@ +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 + ld hl, TileCollisionStdScripts + call IsInArray + jr nc, .notintable + + ld a, jumpstd_command + ld [wJumpStdScriptBuffer], a + inc hl + ld a, [hli] + ld [wJumpStdScriptBuffer + 1], a + ld a, [hli] + ld [wJumpStdScriptBuffer + 2], a + ld a, BANK(Script_JumpStdFromRAM) + ld hl, Script_JumpStdFromRAM + call CallScript + scf + ret + +.notintable + xor a + ret + +INCLUDE "data/collision/collision_stdscripts.asm" + +Script_JumpStdFromRAM: + sjump wJumpStdScriptBuffer diff --git a/engine/events/std_scripts.asm b/engine/events/std_scripts.asm new file mode 100644 index 0000000..5fa4ea9 --- /dev/null +++ b/engine/events/std_scripts.asm @@ -0,0 +1,1897 @@ +MACRO add_stdscript +\1StdScript:: + dba \1 +ENDM + +StdScripts:: + add_stdscript PokecenterNurseScript + add_stdscript DifficultBookshelfScript + add_stdscript PictureBookshelfScript + add_stdscript MagazineBookshelfScript + add_stdscript TeamRocketOathScript + add_stdscript IncenseBurnerScript + add_stdscript MerchandiseShelfScript + add_stdscript TownMapScript + add_stdscript WindowScript + add_stdscript TVScript + add_stdscript HomepageScript ; unused + add_stdscript Radio1Script + add_stdscript Radio2Script + add_stdscript TrashCanScript + add_stdscript StrengthBoulderScript + add_stdscript SmashRockScript + add_stdscript PokecenterSignScript + add_stdscript MartSignScript + add_stdscript GoldenrodRocketsScript + add_stdscript RadioTowerRocketsScript + add_stdscript ElevatorButtonScript + add_stdscript DayToTextScript + add_stdscript BugContestResultsWarpScript + add_stdscript BugContestResultsScript + add_stdscript InitializeEventsScript + add_stdscript AskNumber1MScript + add_stdscript AskNumber2MScript + add_stdscript RegisteredNumberMScript + add_stdscript NumberAcceptedMScript + add_stdscript NumberDeclinedMScript + add_stdscript PhoneFullMScript + add_stdscript RematchMScript + add_stdscript GiftMScript + add_stdscript PackFullMScript + add_stdscript RematchGiftMScript + add_stdscript AskNumber1FScript + add_stdscript AskNumber2FScript + add_stdscript RegisteredNumberFScript + add_stdscript NumberAcceptedFScript + add_stdscript NumberDeclinedFScript + add_stdscript PhoneFullFScript + add_stdscript RematchFScript + add_stdscript GiftFScript + add_stdscript PackFullFScript + add_stdscript RematchGiftFScript + add_stdscript GymStatue1Script + add_stdscript GymStatue2Script + add_stdscript ReceiveItemScript + add_stdscript ReceiveTogepiEggScript + add_stdscript PCScript + add_stdscript GameCornerCoinVendorScript + add_stdscript HappinessCheckScript + +PokecenterNurseScript: +; EVENT_WELCOMED_TO_POKECOM_CENTER is never set + + opentext + checktime MORN + iftrue .morn + checktime DAY + iftrue .day + checktime NITE + iftrue .nite + sjump .ok + +.morn + checkevent EVENT_WELCOMED_TO_POKECOM_CENTER + iftrue .morn_comcenter + farwritetext NurseMornText + promptbutton + sjump .ok +.morn_comcenter + farwritetext PokeComNurseMornText + promptbutton + sjump .ok + +.day + checkevent EVENT_WELCOMED_TO_POKECOM_CENTER + iftrue .day_comcenter + farwritetext NurseDayText + promptbutton + sjump .ok +.day_comcenter + farwritetext PokeComNurseDayText + promptbutton + sjump .ok + +.nite + checkevent EVENT_WELCOMED_TO_POKECOM_CENTER + iftrue .nite_comcenter + farwritetext NurseNiteText + promptbutton + sjump .ok +.nite_comcenter + farwritetext PokeComNurseNiteText + promptbutton + sjump .ok + +.ok + ; only do this once + clearevent EVENT_WELCOMED_TO_POKECOM_CENTER + + farwritetext NurseAskHealText + yesorno + iffalse .done + + farwritetext NurseTakePokemonText + pause 20 + special StubbedTrainerRankings_Healings + turnobject LAST_TALKED, LEFT + pause 10 + special HealParty + playmusic MUSIC_NONE + setval HEALMACHINE_POKECENTER + special HealMachineAnim + pause 30 + special RestartMapMusic + turnobject LAST_TALKED, DOWN + pause 10 + + checkphonecall ; elm already called about pokerus + iftrue .no + checkflag ENGINE_CAUGHT_POKERUS + iftrue .no + special CheckPokerus + iftrue .pokerus +.no + + farwritetext NurseReturnPokemonText + pause 20 + +.done + farwritetext NurseGoodbyeText + + turnobject LAST_TALKED, UP + pause 10 + turnobject LAST_TALKED, DOWN + pause 10 + + waitbutton + closetext + end + +.pokerus + ; already cleared earlier in the script + checkevent EVENT_WELCOMED_TO_POKECOM_CENTER + iftrue .pokerus_comcenter + farwritetext NursePokerusText + waitbutton + closetext + sjump .pokerus_done + +.pokerus_comcenter + farwritetext PokeComNursePokerusText + waitbutton + closetext + +.pokerus_done + setflag ENGINE_CAUGHT_POKERUS + specialphonecall SPECIALCALL_POKERUS + end + +DifficultBookshelfScript: + farjumptext DifficultBookshelfText + +PictureBookshelfScript: + farjumptext PictureBookshelfText + +MagazineBookshelfScript: + farjumptext MagazineBookshelfText + +TeamRocketOathScript: + farjumptext TeamRocketOathText + +IncenseBurnerScript: + farjumptext IncenseBurnerText + +MerchandiseShelfScript: + farjumptext MerchandiseShelfText + +TownMapScript: + opentext + farwritetext LookTownMapText + waitbutton + special OverworldTownMap + closetext + end + +WindowScript: + farjumptext WindowText + +TVScript: + opentext + farwritetext TVText + waitbutton + closetext + end + +HomepageScript: + farjumptext HomepageText + +Radio1Script: + opentext + setval MAPRADIO_POKEMON_CHANNEL + special MapRadio + closetext + end + +Radio2Script: +; Lucky Channel + opentext + setval MAPRADIO_LUCKY_CHANNEL + special MapRadio + closetext + end + +TrashCanScript: + farjumptext TrashCanText + +PCScript: + opentext + special PokemonCenterPC + closetext + end + +ElevatorButtonScript: + playsound SFX_READ_TEXT_2 + pause 15 + playsound SFX_ELEVATOR_END + end + +StrengthBoulderScript: + farsjump AskStrengthScript + +SmashRockScript: + farsjump AskRockSmashScript + +PokecenterSignScript: + farjumptext PokecenterSignText + +MartSignScript: + farjumptext MartSignText + +DayToTextScript: + readvar VAR_WEEKDAY + ifequal MONDAY, .Monday + ifequal TUESDAY, .Tuesday + ifequal WEDNESDAY, .Wednesday + ifequal THURSDAY, .Thursday + ifequal FRIDAY, .Friday + ifequal SATURDAY, .Saturday + getstring STRING_BUFFER_3, .SundayText + end +.Monday: + getstring STRING_BUFFER_3, .MondayText + end +.Tuesday: + getstring STRING_BUFFER_3, .TuesdayText + end +.Wednesday: + getstring STRING_BUFFER_3, .WednesdayText + end +.Thursday: + getstring STRING_BUFFER_3, .ThursdayText + end +.Friday: + getstring STRING_BUFFER_3, .FridayText + end +.Saturday: + getstring STRING_BUFFER_3, .SaturdayText + end +.SundayText: + db "SUNDAY@" +.MondayText: + db "MONDAY@" +.TuesdayText: + db "TUESDAY@" +.WednesdayText: + db "WEDNESDAY@" +.ThursdayText: + db "THURSDAY@" +.FridayText: + db "FRIDAY@" +.SaturdayText: + db "SATURDAY@" + +GoldenrodRocketsScript: + clearevent EVENT_GOLDENROD_CITY_ROCKET_TAKEOVER + end + +RadioTowerRocketsScript: + setflag ENGINE_ROCKETS_IN_RADIO_TOWER + setevent EVENT_GOLDENROD_CITY_CIVILIANS + setevent EVENT_RADIO_TOWER_BLACKBELT_BLOCKS_STAIRS + clearevent EVENT_RADIO_TOWER_ROCKET_TAKEOVER + clearevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER + setevent EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST + specialphonecall SPECIALCALL_WEIRDBROADCAST + setmapscene MAHOGANY_TOWN, SCENE_MAHOGANYTOWN_NOOP + end + +BugContestResultsWarpScript: + special ClearBGPalettes + scall BugContestResults_CopyContestantsToResults + setevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY + clearevent EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY + setevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE + warp ROUTE_36_NATIONAL_PARK_GATE, 0, 4 + applymovement PLAYER, Movement_ContestResults_WalkAfterWarp + +BugContestResultsScript: + clearflag ENGINE_BUG_CONTEST_TIMER + clearevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE + clearevent EVENT_CONTEST_OFFICER_HAS_SUN_STONE + clearevent EVENT_CONTEST_OFFICER_HAS_EVERSTONE + clearevent EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY + clearevent EVENT_CONTEST_OFFICER_HAS_BERRY + opentext + farwritetext ContestResults_ReadyToJudgeText + waitbutton + special BugContestJudging + getnum STRING_BUFFER_3 + ifequal 1, BugContestResults_FirstPlace + ifequal 2, BugContestResults_SecondPlace + ifequal 3, BugContestResults_ThirdPlace + farwritetext ContestResults_ConsolationPrizeText + promptbutton + waitsfx + verbosegiveitem BERRY + iffalse BugContestResults_NoRoomForBerry + +BugContestResults_DidNotWin: + farwritetext ContestResults_DidNotWinText + promptbutton + sjump BugContestResults_FinishUp + +BugContestResults_ReturnAfterWinnersPrize: + farwritetext ContestResults_JoinUsNextTimeText + promptbutton + +BugContestResults_FinishUp: + checkevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER + iffalse BugContestResults_DidNotLeaveMons + farwritetext ContestResults_ReturnPartyText + waitbutton + special ContestReturnMons +BugContestResults_DidNotLeaveMons: + special CheckPartyFullAfterContest + ifequal BUGCONTEST_CAUGHT_MON, BugContestResults_CleanUp + ifequal BUGCONTEST_NO_CATCH, BugContestResults_CleanUp + ; BUGCONTEST_BOXED_MON + farwritetext ContestResults_PartyFullText + waitbutton +BugContestResults_CleanUp: + closetext + setscene SCENE_ROUTE36NATIONALPARKGATE_NOOP + setmapscene ROUTE_35_NATIONAL_PARK_GATE, SCENE_ROUTE35NATIONALPARKGATE_NOOP + setevent EVENT_BUG_CATCHING_CONTESTANT_1A + setevent EVENT_BUG_CATCHING_CONTESTANT_2A + setevent EVENT_BUG_CATCHING_CONTESTANT_3A + setevent EVENT_BUG_CATCHING_CONTESTANT_4A + setevent EVENT_BUG_CATCHING_CONTESTANT_5A + setevent EVENT_BUG_CATCHING_CONTESTANT_6A + setevent EVENT_BUG_CATCHING_CONTESTANT_7A + setevent EVENT_BUG_CATCHING_CONTESTANT_8A + setevent EVENT_BUG_CATCHING_CONTESTANT_9A + setevent EVENT_BUG_CATCHING_CONTESTANT_10A + setevent EVENT_BUG_CATCHING_CONTESTANT_1B + setevent EVENT_BUG_CATCHING_CONTESTANT_2B + setevent EVENT_BUG_CATCHING_CONTESTANT_3B + setevent EVENT_BUG_CATCHING_CONTESTANT_4B + setevent EVENT_BUG_CATCHING_CONTESTANT_5B + setevent EVENT_BUG_CATCHING_CONTESTANT_6B + setevent EVENT_BUG_CATCHING_CONTESTANT_7B + setevent EVENT_BUG_CATCHING_CONTESTANT_8B + setevent EVENT_BUG_CATCHING_CONTESTANT_9B + setevent EVENT_BUG_CATCHING_CONTESTANT_10B + setflag ENGINE_DAILY_BUG_CONTEST + special PlayMapMusic + end + +BugContestResults_FirstPlace: + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + getitemname STRING_BUFFER_4, SUN_STONE + farwritetext ContestResults_PlayerWonAPrizeText + waitbutton + verbosegiveitem SUN_STONE + iffalse BugContestResults_NoRoomForSunStone + sjump BugContestResults_ReturnAfterWinnersPrize + +BugContestResults_SecondPlace: + getitemname STRING_BUFFER_4, EVERSTONE + farwritetext ContestResults_PlayerWonAPrizeText + waitbutton + verbosegiveitem EVERSTONE + iffalse BugContestResults_NoRoomForEverstone + sjump BugContestResults_ReturnAfterWinnersPrize + +BugContestResults_ThirdPlace: + getitemname STRING_BUFFER_4, GOLD_BERRY + farwritetext ContestResults_PlayerWonAPrizeText + waitbutton + verbosegiveitem GOLD_BERRY + iffalse BugContestResults_NoRoomForGoldBerry + sjump BugContestResults_ReturnAfterWinnersPrize + +BugContestResults_NoRoomForSunStone: + farwritetext BugContestPrizeNoRoomText + promptbutton + setevent EVENT_CONTEST_OFFICER_HAS_SUN_STONE + sjump BugContestResults_ReturnAfterWinnersPrize + +BugContestResults_NoRoomForEverstone: + farwritetext BugContestPrizeNoRoomText + promptbutton + setevent EVENT_CONTEST_OFFICER_HAS_EVERSTONE + sjump BugContestResults_ReturnAfterWinnersPrize + +BugContestResults_NoRoomForGoldBerry: + farwritetext BugContestPrizeNoRoomText + promptbutton + setevent EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY + sjump BugContestResults_ReturnAfterWinnersPrize + +BugContestResults_NoRoomForBerry: + farwritetext BugContestPrizeNoRoomText + promptbutton + setevent EVENT_CONTEST_OFFICER_HAS_BERRY + sjump BugContestResults_DidNotWin + +BugContestResults_CopyContestantsToResults: + checkevent EVENT_BUG_CATCHING_CONTESTANT_1A + iftrue .skip1 + clearevent EVENT_BUG_CATCHING_CONTESTANT_1B +.skip1 + checkevent EVENT_BUG_CATCHING_CONTESTANT_2A + iftrue .skip2 + clearevent EVENT_BUG_CATCHING_CONTESTANT_2B +.skip2 + checkevent EVENT_BUG_CATCHING_CONTESTANT_3A + iftrue .skip3 + clearevent EVENT_BUG_CATCHING_CONTESTANT_3B +.skip3 + checkevent EVENT_BUG_CATCHING_CONTESTANT_4A + iftrue .skip4 + clearevent EVENT_BUG_CATCHING_CONTESTANT_4B +.skip4 + checkevent EVENT_BUG_CATCHING_CONTESTANT_5A + iftrue .skip5 + clearevent EVENT_BUG_CATCHING_CONTESTANT_5B +.skip5 + checkevent EVENT_BUG_CATCHING_CONTESTANT_6A + iftrue .skip6 + clearevent EVENT_BUG_CATCHING_CONTESTANT_6B +.skip6 + checkevent EVENT_BUG_CATCHING_CONTESTANT_7A + iftrue .skip7 + clearevent EVENT_BUG_CATCHING_CONTESTANT_7B +.skip7 + checkevent EVENT_BUG_CATCHING_CONTESTANT_8A + iftrue .skip8 + clearevent EVENT_BUG_CATCHING_CONTESTANT_8B +.skip8 + checkevent EVENT_BUG_CATCHING_CONTESTANT_9A + iftrue .skip9 + clearevent EVENT_BUG_CATCHING_CONTESTANT_9B +.skip9 + checkevent EVENT_BUG_CATCHING_CONTESTANT_10A + iftrue .skip10 + clearevent EVENT_BUG_CATCHING_CONTESTANT_10B +.skip10 + end + +InitializeEventsScript: + setevent EVENT_EARLS_ACADEMY_EARL + setevent EVENT_RADIO_TOWER_ROCKET_TAKEOVER + setevent EVENT_GOLDENROD_CITY_ROCKET_TAKEOVER + setevent EVENT_RADIO_TOWER_CIVILIANS_AFTER + setevent EVENT_ILEX_FOREST_APPRENTICE + setevent EVENT_ILEX_FOREST_FARFETCHD + setevent EVENT_ILEX_FOREST_CHARCOAL_MASTER + setevent EVENT_MAHOGANY_MART_LANCE_AND_DRAGONITE + setevent EVENT_TEAM_ROCKET_BASE_B2F_GRUNT_WITH_EXECUTIVE + setevent EVENT_TEAM_ROCKET_BASE_B2F_EXECUTIVE + setevent EVENT_TEAM_ROCKET_BASE_B2F_DRAGONITE + setevent EVENT_RIVAL_TEAM_ROCKET_BASE + setevent EVENT_BLACKTHORN_CITY_SUPER_NERD_DOES_NOT_BLOCK_GYM + setevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER + setevent EVENT_RIVAL_CHERRYGROVE_CITY + setevent EVENT_RIVAL_AZALEA_TOWN + setevent EVENT_RIVAL_GOLDENROD_UNDERGROUND + setevent EVENT_AZALEA_TOWN_SLOWPOKES + setevent EVENT_KURTS_HOUSE_SLOWPOKE + setevent EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE + setevent EVENT_ELMS_AIDE_IN_VIOLET_POKEMON_CENTER + setevent EVENT_COP_IN_ELMS_LAB + setevent EVENT_RUINS_OF_ALPH_OUTSIDE_SCIENTIST + setevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST + setevent EVENT_BOULDER_IN_ICE_PATH_1A + setevent EVENT_BOULDER_IN_ICE_PATH_2A + setevent EVENT_BOULDER_IN_ICE_PATH_3A + setevent EVENT_BOULDER_IN_ICE_PATH_4A + setevent EVENT_ROUTE_30_YOUNGSTER_JOEY + setevent EVENT_BUG_CATCHING_CONTESTANT_1A + setevent EVENT_BUG_CATCHING_CONTESTANT_2A + setevent EVENT_BUG_CATCHING_CONTESTANT_3A + setevent EVENT_BUG_CATCHING_CONTESTANT_4A + setevent EVENT_BUG_CATCHING_CONTESTANT_5A + setevent EVENT_BUG_CATCHING_CONTESTANT_6A + setevent EVENT_BUG_CATCHING_CONTESTANT_7A + setevent EVENT_BUG_CATCHING_CONTESTANT_8A + setevent EVENT_BUG_CATCHING_CONTESTANT_9A + setevent EVENT_BUG_CATCHING_CONTESTANT_10A + setevent EVENT_BUG_CATCHING_CONTESTANT_1B + setevent EVENT_BUG_CATCHING_CONTESTANT_2B + setevent EVENT_BUG_CATCHING_CONTESTANT_3B + setevent EVENT_BUG_CATCHING_CONTESTANT_4B + setevent EVENT_BUG_CATCHING_CONTESTANT_5B + setevent EVENT_BUG_CATCHING_CONTESTANT_6B + setevent EVENT_BUG_CATCHING_CONTESTANT_7B + setevent EVENT_BUG_CATCHING_CONTESTANT_8B + setevent EVENT_BUG_CATCHING_CONTESTANT_9B + setevent EVENT_BUG_CATCHING_CONTESTANT_10B + setevent EVENT_FAST_SHIP_1F_GENTLEMAN + setevent EVENT_FAST_SHIP_B1F_SAILOR_RIGHT + setevent EVENT_FAST_SHIP_CABINS_NNW_NNE_NE_SAILOR + setevent EVENT_LAKE_OF_RAGE_CIVILIANS + setevent EVENT_MAHOGANY_MART_OWNERS + setevent EVENT_TIN_TOWER_ROOF_HO_OH + setevent EVENT_WHIRL_ISLAND_LUGIA_CHAMBER_LUGIA + setevent EVENT_PLAYERS_HOUSE_2F_CONSOLE + setevent EVENT_PLAYERS_HOUSE_2F_DOLL_1 + setevent EVENT_PLAYERS_HOUSE_2F_DOLL_2 + setevent EVENT_PLAYERS_HOUSE_2F_BIG_DOLL + setevent EVENT_DECO_BED_1 + setevent EVENT_DECO_POSTER_1 + setevent EVENT_GOLDENROD_TRAIN_STATION_GENTLEMAN + setevent EVENT_OLIVINE_GYM_JASMINE + setevent EVENT_BLACKTHORN_CITY_GRAMPS_NOT_BLOCKING_DRAGONS_DEN + setevent EVENT_MET_BILL + setevent EVENT_ECRUTEAK_POKE_CENTER_BILL + setevent EVENT_MYSTERY_GIFT_DELIVERY_GUY + setevent EVENT_LAKE_OF_RAGE_LANCE + setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1 + setevent EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF + setevent EVENT_DRAGONS_DEN_CLAIR + setevent EVENT_RIVAL_OLIVINE_CITY + setevent EVENT_RIVAL_VICTORY_ROAD + setevent EVENT_RIVAL_DRAGONS_DEN + setevent EVENT_LANCES_ROOM_OAK_AND_MARY + setevent EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_1 + setevent EVENT_BURNED_TOWER_B1F_BEASTS_1 + setevent EVENT_RED_IN_MT_SILVER + setevent EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME + setevent EVENT_FAST_SHIP_PASSENGERS_EASTBOUND + setevent EVENT_FAST_SHIP_PASSENGERS_WESTBOUND + setevent EVENT_OLIVINE_PORT_PASSAGE_POKEFAN_M + setevent EVENT_KURTS_HOUSE_KURT_2 + setevent EVENT_KURTS_HOUSE_GRANDDAUGHTER_2 + setevent EVENT_RANG_CLEAR_BELL_1 + setevent EVENT_FLORIA_AT_FLOWER_SHOP + setevent EVENT_FLORIA_AT_SUDOWOODO + setevent EVENT_GOLDENROD_CITY_MOVE_TUTOR + setevent EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_FISHER + setevent EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_YOUNGSTERS + setevent EVENT_DRAGON_SHRINE_CLAIR + setevent EVENT_BATTLE_TOWER_BATTLE_ROOM_YOUNGSTER + setevent EVENT_PLAYERS_NEIGHBORS_HOUSE_NEIGHBOR + setevent EVENT_AZALEA_TOWN_KURT + setevent EVENT_AZALEA_TOWN_KURT + setevent EVENT_ILEX_FOREST_KURT + setevent EVENT_ROUTE_34_ILEX_FOREST_GATE_TEACHER_IN_WALKWAY + setevent EVENT_ILEX_FOREST_LASS + setevent EVENT_GOLDENROD_SALE_OFF + setevent EVENT_ECRUTEAK_CITY_GRAMPS + setevent EVENT_EUSINE_IN_BURNED_TOWER + setevent EVENT_PLAYERS_HOUSE_MOM_2 + setevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2 + setevent EVENT_CIANWOOD_CITY_EUSINE + setevent EVENT_TIN_TOWER_1F_EUSINE + setevent EVENT_TIN_TOWER_1F_WISE_TRIO_1 + setevent EVENT_TIN_TOWER_1F_WISE_TRIO_2 + setevent EVENT_SET_WHEN_FOUGHT_HO_OH + setevent EVENT_SAW_SUICUNE_ON_ROUTE_36 + setevent EVENT_SAW_SUICUNE_ON_ROUTE_42 + setevent EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY + setevent EVENT_BATTLE_TOWER_OPEN_CIVILIANS + setflag ENGINE_ROCKET_SIGNAL_ON_CH20 + setflag ENGINE_ROCKETS_IN_MAHOGANY + variablesprite SPRITE_WEIRD_TREE, SPRITE_SUDOWOODO + variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_RIVAL + variablesprite SPRITE_AZALEA_ROCKET, SPRITE_ROCKET + variablesprite SPRITE_FUCHSIA_GYM_1, SPRITE_JANINE + variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_JANINE + variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_JANINE + variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_JANINE + variablesprite SPRITE_COPYCAT, SPRITE_LASS + variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_LASS + setevent EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM + setevent EVENT_CERULEAN_GYM_ROCKET + setevent EVENT_ROUTE_24_ROCKET + setevent EVENT_ROUTE_25_MISTY_BOYFRIEND + setevent EVENT_TRAINERS_IN_CERULEAN_GYM + setevent EVENT_COPYCATS_HOUSE_2F_DOLL + setevent EVENT_VIRIDIAN_GYM_BLUE + setevent EVENT_SEAFOAM_GYM_GYM_GUIDE + setevent EVENT_MT_MOON_SQUARE_CLEFAIRY + setevent EVENT_SAFFRON_TRAIN_STATION_POPULATION + setevent EVENT_INDIGO_PLATEAU_POKECENTER_RIVAL + setevent EVENT_INITIALIZED_EVENTS + endcallback + +AskNumber1MScript: + special RandomPhoneMon + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_JUGGLER_IRWIN, .Irwin + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackAskNumber1Text + end +.Huey: + farwritetext HueyAskNumber1Text + end +.Gaven: + farwritetext GavenAskNumber1Text + end +.Jose: + farwritetext JoseAskNumber1Text + end +.Joey: + farwritetext JoeyAskNumber1Text + end +.Wade: + farwritetext WadeAskNumber1Text + end +.Ralph: + farwritetext RalphAskNumber1Text + end +.Anthony: + farwritetext AnthonyAskNumber1Text + end +.Todd: + farwritetext ToddAskNumber1Text + end +.Irwin: + farwritetext IrwinAskNumber1Text + end +.Arnie: + farwritetext ArnieAskNumber1Text + end +.Alan: + farwritetext AlanAskNumber1Text + end +.Chad: + farwritetext ChadAskNumber1Text + end +.Derek: + farwritetext DerekAskNumber1Text + end +.Tully: + farwritetext TullyAskNumber1Text + end +.Brent: + farwritetext BrentAskNumber1Text + end +.Vance: + farwritetext VanceAskNumber1Text + end +.Wilton: + farwritetext WiltonAskNumber1Text + end +.Kenji: + farwritetext KenjiAskNumber1Text + end +.Parry: + farwritetext ParryAskNumber1Text + end + +AskNumber2MScript: + special RandomPhoneMon + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_JUGGLER_IRWIN, .Irwin + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackAskNumber2Text + end +.Huey: + farwritetext HueyAskNumber2Text + end +.Gaven: + farwritetext GavenAskNumber2Text + end +.Jose: + farwritetext JoseAskNumber2Text + end +.Joey: + farwritetext JoeyAskNumber2Text + end +.Wade: + farwritetext WadeAskNumber2Text + end +.Ralph: + farwritetext RalphAskNumber2Text + end +.Anthony: + farwritetext AnthonyAskNumber2Text + end +.Todd: + farwritetext ToddAskNumber2Text + end +.Irwin: + farwritetext IrwinAskNumber2Text + end +.Arnie: + farwritetext ArnieAskNumber2Text + end +.Alan: + farwritetext AlanAskNumber2Text + end +.Chad: + farwritetext ChadAskNumber2Text + end +.Derek: + farwritetext DerekAskNumber2Text + end +.Tully: + farwritetext TullyAskNumber2Text + end +.Brent: + farwritetext BrentAskNumber2Text + end +.Vance: + farwritetext VanceAskNumber2Text + end +.Wilton: + farwritetext WiltonAskNumber2Text + end +.Kenji: + farwritetext KenjiAskNumber2Text + end +.Parry: + farwritetext ParryAskNumber2Text + end + +RegisteredNumberMScript: + farwritetext RegisteredNumber1Text + playsound SFX_REGISTER_PHONE_NUMBER + waitsfx + promptbutton + end + +NumberAcceptedMScript: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_JUGGLER_IRWIN, .Irwin + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackNumberAcceptedText + waitbutton + closetext + end +.Huey: + farwritetext HueyNumberAcceptedText + waitbutton + closetext + end +.Gaven: + farwritetext GavenNumberAcceptedText + waitbutton + closetext + end +.Jose: + farwritetext JoseNumberAcceptedText + waitbutton + closetext + end +.Joey: + farwritetext JoeyNumberAcceptedText + waitbutton + closetext + end +.Wade: + farwritetext WadeNumberAcceptedText + waitbutton + closetext + end +.Ralph: + farwritetext RalphNumberAcceptedText + waitbutton + closetext + end +.Anthony: + farwritetext AnthonyNumberAcceptedText + waitbutton + closetext + end +.Todd: + farwritetext ToddNumberAcceptedText + waitbutton + closetext + end +.Irwin: + farwritetext IrwinNumberAcceptedText + waitbutton + closetext + end +.Arnie: + farwritetext ArnieNumberAcceptedText + waitbutton + closetext + end +.Alan: + farwritetext AlanNumberAcceptedText + waitbutton + closetext + end +.Chad: + farwritetext ChadNumberAcceptedText + waitbutton + closetext + end +.Derek: + farwritetext DerekNumberAcceptedText + waitbutton + closetext + end +.Tully: + farwritetext TullyNumberAcceptedText + waitbutton + closetext + end +.Brent: + farwritetext BrentNumberAcceptedText + waitbutton + closetext + end +.Vance: + farwritetext VanceNumberAcceptedText + waitbutton + closetext + end +.Wilton: + farwritetext WiltonNumberAcceptedText + waitbutton + closetext + end +.Kenji: + farwritetext KenjiNumberAcceptedText + waitbutton + closetext + end +.Parry: + farwritetext ParryNumberAcceptedText + waitbutton + closetext + end + +NumberDeclinedMScript: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_JUGGLER_IRWIN, .Irwin + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackNumberDeclinedText + waitbutton + closetext + end +.Huey: + farwritetext HueyNumberDeclinedText + waitbutton + closetext + end +.Gaven: + farwritetext GavenNumberDeclinedText + waitbutton + closetext + end +.Jose: + farwritetext JoseNumberDeclinedText + waitbutton + closetext + end +.Joey: + farwritetext JoeyNumberDeclinedText + waitbutton + closetext + end +.Wade: + farwritetext WadeNumberDeclinedText + waitbutton + closetext + end +.Ralph: + farwritetext RalphNumberDeclinedText + waitbutton + closetext + end +.Anthony: + farwritetext AnthonyNumberDeclinedText + waitbutton + closetext + end +.Todd: + farwritetext ToddNumberDeclinedText + waitbutton + closetext + end +.Irwin: + farwritetext IrwinNumberDeclinedText + waitbutton + closetext + end +.Arnie: + farwritetext ArnieNumberDeclinedText + waitbutton + closetext + end +.Alan: + farwritetext AlanNumberDeclinedText + waitbutton + closetext + end +.Chad: + farwritetext ChadNumberDeclinedText + waitbutton + closetext + end +.Derek: + farwritetext DerekNumberDeclinedText + waitbutton + closetext + end +.Tully: + farwritetext TullyNumberDeclinedText + waitbutton + closetext + end +.Brent: + farwritetext BrentNumberDeclinedText + waitbutton + closetext + end +.Vance: + farwritetext VanceNumberDeclinedText + waitbutton + closetext + end +.Wilton: + farwritetext WiltonNumberDeclinedText + waitbutton + closetext + end +.Kenji: + farwritetext KenjiNumberDeclinedText + waitbutton + closetext + end +.Parry: + farwritetext ParryNumberDeclinedText + waitbutton + closetext + end + +PhoneFullMScript: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_JUGGLER_IRWIN, .Irwin + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackPhoneFullText + waitbutton + closetext + end +.Huey: + farwritetext HueyPhoneFullText + waitbutton + closetext + end +.Gaven: + farwritetext GavenPhoneFullText + waitbutton + closetext + end +.Jose: + farwritetext JosePhoneFullText + waitbutton + closetext + end +.Joey: + farwritetext JoeyPhoneFullText + waitbutton + closetext + end +.Wade: + farwritetext WadePhoneFullText + waitbutton + closetext + end +.Ralph: + farwritetext RalphPhoneFullText + waitbutton + closetext + end +.Anthony: + farwritetext AnthonyPhoneFullText + waitbutton + closetext + end +.Todd: + farwritetext ToddPhoneFullText + waitbutton + closetext + end +.Irwin: + farwritetext IrwinPhoneFullText + waitbutton + closetext + end +.Arnie: + farwritetext ArniePhoneFullText + waitbutton + closetext + end +.Alan: + farwritetext AlanPhoneFullText + waitbutton + closetext + end +.Chad: + farwritetext ChadPhoneFullText + waitbutton + closetext + end +.Derek: + farwritetext DerekPhoneFullText + waitbutton + closetext + end +.Tully: + farwritetext TullyPhoneFullText + waitbutton + closetext + end +.Brent: + farwritetext BrentPhoneFullText + waitbutton + closetext + end +.Vance: + farwritetext VancePhoneFullText + waitbutton + closetext + end +.Wilton: + farwritetext WiltonPhoneFullText + waitbutton + closetext + end +.Kenji: + farwritetext KenjiPhoneFullText + waitbutton + closetext + end +.Parry: + farwritetext ParryPhoneFullText + waitbutton + closetext + end + +RematchMScript: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackRematchText + waitbutton + closetext + end +.Huey: + farwritetext HueyRematchText + waitbutton + closetext + end +.Gaven: + farwritetext GavenRematchText + waitbutton + closetext + end +.Jose: + farwritetext JoseRematchText + waitbutton + closetext + end +.Joey: + farwritetext JoeyRematchText + waitbutton + closetext + end +.Wade: + farwritetext WadeRematchText + waitbutton + closetext + end +.Ralph: + farwritetext RalphRematchText + waitbutton + closetext + end +.Anthony: + farwritetext AnthonyRematchText + waitbutton + closetext + end +.Todd: + farwritetext ToddRematchText + waitbutton + closetext + end +.Arnie: + farwritetext ArnieRematchText + waitbutton + closetext + end +.Alan: + farwritetext AlanRematchText + waitbutton + closetext + end +.Chad: + farwritetext ChadRematchText + waitbutton + closetext + end +.Tully: + farwritetext TullyRematchText + waitbutton + closetext + end +.Brent: + farwritetext BrentRematchText + waitbutton + closetext + end +.Vance: + farwritetext VanceRematchText + waitbutton + closetext + end +.Wilton: + farwritetext WiltonRematchText + waitbutton + closetext + end +.Parry: + farwritetext ParryRematchText + waitbutton + closetext + end + +GiftMScript: + readvar VAR_CALLERID + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + +.Jose: + farwritetext JoseGiftText + promptbutton + end +.Wade: + farwritetext WadeGiftText + promptbutton + end +.Alan: + farwritetext AlanGiftText + promptbutton + end +.Derek: + farwritetext DerekGiftText + promptbutton + end +.Tully: + farwritetext TullyGiftText + promptbutton + end +.Wilton: + farwritetext WiltonGiftText + promptbutton + end +.Kenji: + farwritetext KenjiGiftText + promptbutton + end + +PackFullMScript: + readvar VAR_CALLERID + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Huey: + farwritetext HueyPackFullText + waitbutton + closetext + end +.Jose: + farwritetext JosePackFullText + waitbutton + closetext + end +.Joey: + farwritetext JoeyPackFullText + waitbutton + closetext + end +.Wade: + farwritetext WadePackFullText + waitbutton + closetext + end +.Alan: + farwritetext AlanPackFullText + waitbutton + closetext + end +.Derek: + farwritetext DerekPackFullText + waitbutton + closetext + end +.Tully: + farwritetext TullyPackFullText + waitbutton + closetext + end +.Vance: + farwritetext VancePackFullText + waitbutton + closetext + end +.Wilton: + farwritetext WiltonPackFullText + waitbutton + closetext + end +.Kenji: + farwritetext KenjiPackFullText + waitbutton + closetext + end +.Parry: + farwritetext ParryPackFullText + waitbutton + closetext + end + +RematchGiftMScript: + opentext + readvar VAR_CALLERID + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_HIKER_PARRY, .Parry + +.Huey: + farwritetext HueyRematchGiftText + promptbutton + end +.Joey: + farwritetext JoeyRematchGiftText + promptbutton + end +.Vance: + farwritetext VanceRematchGiftText + promptbutton + end +.Parry: + farwritetext ParryRematchGiftText + promptbutton + end + +AskNumber1FScript: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyAskNumber1Text + end +.Beth: + farwritetext BethAskNumber1Text + end +.Reena: + farwritetext ReenaAskNumber1Text + end +.Liz: + farwritetext LizAskNumber1Text + end +.Gina: + farwritetext GinaAskNumber1Text + end +.Dana: + farwritetext DanaAskNumber1Text + end +.Tiffany: + farwritetext TiffanyAskNumber1Text + end +.Erin: + farwritetext ErinAskNumber1Text + end + +AskNumber2FScript: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyAskNumber2Text + end +.Beth: + farwritetext BethAskNumber2Text + end +.Reena: + farwritetext ReenaAskNumber2Text + end +.Liz: + farwritetext LizAskNumber2Text + end +.Gina: + farwritetext GinaAskNumber2Text + end +.Dana: + farwritetext DanaAskNumber2Text + end +.Tiffany: + farwritetext TiffanyAskNumber2Text + end +.Erin: + farwritetext ErinAskNumber2Text + end + +RegisteredNumberFScript: + farwritetext RegisteredNumber2Text + playsound SFX_REGISTER_PHONE_NUMBER + waitsfx + promptbutton + end + +NumberAcceptedFScript: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyNumberAcceptedText + waitbutton + closetext + end +.Beth: + farwritetext BethNumberAcceptedText + waitbutton + closetext + end +.Reena: + farwritetext ReenaNumberAcceptedText + waitbutton + closetext + end +.Liz: + farwritetext LizNumberAcceptedText + waitbutton + closetext + end +.Gina: + farwritetext GinaNumberAcceptedText + waitbutton + closetext + end +.Dana: + farwritetext DanaNumberAcceptedText + waitbutton + closetext + end +.Tiffany: + farwritetext TiffanyNumberAcceptedText + waitbutton + closetext + end +.Erin: + farwritetext ErinNumberAcceptedText + waitbutton + closetext + end + +NumberDeclinedFScript: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyNumberDeclinedText + waitbutton + closetext + end +.Beth: + farwritetext BethNumberDeclinedText + waitbutton + closetext + end +.Reena: + farwritetext ReenaNumberDeclinedText + waitbutton + closetext + end +.Liz: + farwritetext LizNumberDeclinedText + waitbutton + closetext + end +.Gina: + farwritetext GinaNumberDeclinedText + waitbutton + closetext + end +.Dana: + farwritetext DanaNumberDeclinedText + waitbutton + closetext + end +.Tiffany: + farwritetext TiffanyNumberDeclinedText + waitbutton + closetext + end +.Erin: + farwritetext ErinNumberDeclinedText + waitbutton + closetext + end + +PhoneFullFScript: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyPhoneFullText + waitbutton + closetext + end +.Beth: + farwritetext BethPhoneFullText + waitbutton + closetext + end +.Reena: + farwritetext ReenaPhoneFullText + waitbutton + closetext + end +.Liz: + farwritetext LizPhoneFullText + waitbutton + closetext + end +.Gina: + farwritetext GinaPhoneFullText + waitbutton + closetext + end +.Dana: + farwritetext DanaPhoneFullText + waitbutton + closetext + end +.Tiffany: + farwritetext TiffanyPhoneFullText + waitbutton + closetext + end +.Erin: + farwritetext ErinPhoneFullText + waitbutton + closetext + end + +RematchFScript: + readvar VAR_CALLERID + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beth: + farwritetext BethRematchText + waitbutton + closetext + end +.Reena: + farwritetext ReenaRematchText + waitbutton + closetext + end +.Liz: + farwritetext LizRematchText + waitbutton + closetext + end +.Gina: + farwritetext GinaRematchText + waitbutton + closetext + end +.Dana: + farwritetext DanaRematchText + waitbutton + closetext + end +.Tiffany: + farwritetext TiffanyRematchText + waitbutton + closetext + end +.Erin: + farwritetext ErinRematchText + waitbutton + closetext + end + +GiftFScript: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + +.Beverly: + farwritetext BeverlyGiftText + promptbutton + end +.Gina: + farwritetext GinaGiftText + promptbutton + end +.Dana: + farwritetext DanaGiftText + promptbutton + end +.Tiffany: + farwritetext TiffanyGiftText + promptbutton + end + +PackFullFScript: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyPackFullText + waitbutton + closetext + end +.Gina: + farwritetext GinaPackFullText + waitbutton + closetext + end +.Dana: + farwritetext DanaPackFullText + waitbutton + closetext + end +.Tiffany: + farwritetext TiffanyPackFullText + waitbutton + closetext + end +.Erin: + farwritetext ErinPackFullText + waitbutton + closetext + end + +RematchGiftFScript: + readvar VAR_CALLERID + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Erin: + opentext + farwritetext ErinRematchGiftText + promptbutton + end + +GymStatue1Script: + getcurlandmarkname STRING_BUFFER_3 + opentext + farwritetext GymStatue_CityGymText + waitbutton + closetext + end + +GymStatue2Script: + getcurlandmarkname STRING_BUFFER_3 + opentext + farwritetext GymStatue_CityGymText + promptbutton + farwritetext GymStatue_WinningTrainersText + waitbutton + closetext + end + +ReceiveItemScript: + waitsfx + farwritetext ReceivedItemText + playsound SFX_ITEM + waitsfx + end + +ReceiveTogepiEggScript: + waitsfx + farwritetext ReceivedItemText + playsound SFX_GET_EGG + waitsfx + end + +GameCornerCoinVendorScript: + faceplayer + opentext + farwritetext CoinVendor_WelcomeText + promptbutton + checkitem COIN_CASE + iftrue CoinVendor_IntroScript + farwritetext CoinVendor_NoCoinCaseText + waitbutton + closetext + end + +CoinVendor_IntroScript: + farwritetext CoinVendor_IntroText + +.loop + special DisplayMoneyAndCoinBalance + loadmenu .MenuHeader + verticalmenu + closewindow + ifequal 1, .Buy50 + ifequal 2, .Buy500 + sjump .Cancel + +.Buy50: + checkcoins MAX_COINS - 50 + ifequal HAVE_MORE, .CoinCaseFull + checkmoney YOUR_MONEY, 1000 + ifequal HAVE_LESS, .NotEnoughMoney + givecoins 50 + takemoney YOUR_MONEY, 1000 + waitsfx + playsound SFX_TRANSACTION + farwritetext CoinVendor_Buy50CoinsText + waitbutton + sjump .loop + +.Buy500: + checkcoins MAX_COINS - 500 + ifequal HAVE_MORE, .CoinCaseFull + checkmoney YOUR_MONEY, 10000 + ifequal HAVE_LESS, .NotEnoughMoney + givecoins 500 + takemoney YOUR_MONEY, 10000 + waitsfx + playsound SFX_TRANSACTION + farwritetext CoinVendor_Buy500CoinsText + waitbutton + sjump .loop + +.NotEnoughMoney: + farwritetext CoinVendor_NotEnoughMoneyText + waitbutton + closetext + end + +.CoinCaseFull: + farwritetext CoinVendor_CoinCaseFullText + waitbutton + closetext + end + +.Cancel: + farwritetext CoinVendor_CancelText + waitbutton + closetext + end + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 4, 15, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 3 ; items + db " 50 : ¥1000@" + db "500 : ¥10000@" + db "CANCEL@" + +HappinessCheckScript: + faceplayer + opentext + special GetFirstPokemonHappiness + ifless 50, .Unhappy + ifless 150, .KindaHappy + farwritetext HappinessText3 + waitbutton + closetext + end + +.KindaHappy: + farwritetext HappinessText2 + waitbutton + closetext + end + +.Unhappy: + farwritetext HappinessText1 + waitbutton + closetext + end + +Movement_ContestResults_WalkAfterWarp: + step RIGHT + step DOWN + turn_head UP + step_end diff --git a/engine/events/sweet_scent.asm b/engine/events/sweet_scent.asm new file mode 100644 index 0000000..ceda90b --- /dev/null +++ b/engine/events/sweet_scent.asm @@ -0,0 +1,66 @@ +SweetScentFromMenu: + ld hl, .SweetScent + call QueueScript + ld a, $1 + ld [wFieldMoveSucceeded], a + ret + +.SweetScent: + reloadmappart + special UpdateTimePals + callasm GetPartyNickname + writetext UseSweetScentText + waitbutton + callasm SweetScentEncounter + iffalse SweetScentNothing + checkflag ENGINE_BUG_CONTEST_TIMER + iftrue .BugCatchingContest + randomwildmon + startbattle + reloadmapafterbattle + end + +.BugCatchingContest: + farsjump BugCatchingContestBattleScript + +SweetScentNothing: + writetext SweetScentNothingText + waitbutton + closetext + end + +SweetScentEncounter: + farcall CanUseSweetScent + jr nc, .no_battle + ld hl, wStatusFlags2 + bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] + jr nz, .not_in_bug_contest + farcall GetMapEncounterRate + ld a, b + and a + jr z, .no_battle + farcall ChooseWildEncounter + jr nz, .no_battle + jr .start_battle + +.not_in_bug_contest + farcall ChooseWildEncounter_BugContest + +.start_battle + ld a, $1 + ld [wScriptVar], a + ret + +.no_battle + xor a + ld [wScriptVar], a + ld [wBattleType], a + ret + +UseSweetScentText: + text_far _UseSweetScentText + text_end + +SweetScentNothingText: + text_far _SweetScentNothingText + text_end diff --git a/engine/events/trainer_scripts.asm b/engine/events/trainer_scripts.asm new file mode 100644 index 0000000..1fb0d29 --- /dev/null +++ b/engine/events/trainer_scripts.asm @@ -0,0 +1,31 @@ +TalkToTrainerScript:: + faceplayer + trainerflagaction CHECK_FLAG + iftrue AlreadyBeatenTrainerScript + loadtemptrainer + encountermusic + sjump StartBattleWithMapTrainerScript + +SeenByTrainerScript:: + loadtemptrainer + encountermusic + showemote EMOTE_SHOCK, LAST_TALKED, 30 + callasm TrainerWalkToPlayer + applymovementlasttalked wMovementBuffer + writeobjectxy LAST_TALKED + faceobject PLAYER, LAST_TALKED + sjump StartBattleWithMapTrainerScript + +StartBattleWithMapTrainerScript: + opentext + trainertext TRAINERTEXT_SEEN + waitbutton + closetext + loadtemptrainer + startbattle + reloadmapafterbattle + trainerflagaction SET_FLAG + loadmem wRunningTrainerBattleScript, -1 + +AlreadyBeatenTrainerScript: + scripttalkafter diff --git a/engine/events/treemons.asm b/engine/events/treemons.asm new file mode 100644 index 0000000..6c37f4a --- /dev/null +++ b/engine/events/treemons.asm @@ -0,0 +1,282 @@ +TreeMonEncounter: + farcall StubbedTrainerRankings_TreeEncounters + + xor a + ld [wTempWildMonSpecies], a + ld [wCurPartyLevel], a + + ld hl, TreeMonMaps + call GetTreeMonSet + jr nc, .no_battle + + call GetTreeMons + jr nc, .no_battle + + call GetTreeMon + jr nc, .no_battle + + ld a, BATTLETYPE_TREE + ld [wBattleType], a + ld a, 1 + ld [wScriptVar], a + ret + +.no_battle + xor a + ld [wScriptVar], a + ret + +RockMonEncounter: + xor a + ld [wTempWildMonSpecies], a + ld [wCurPartyLevel], a + + ld hl, RockMonMaps + call GetTreeMonSet + jr nc, .no_battle + + call GetTreeMons + jr nc, .no_battle + + ; 40% chance of an encounter + ld a, 10 + call RandomRange + cp 4 + jr nc, .no_battle + + call SelectTreeMon + jr nc, .no_battle + + ret + +.no_battle + xor a + ret + + db $05 ; ???? + +GetTreeMonSet: +; Return carry and treemon set in a +; if the current map is in table hl. + ld a, [wMapNumber] + ld e, a + ld a, [wMapGroup] + ld d, a +.loop + ld a, [hli] + cp -1 + jr z, .not_in_table + + cp d + jr nz, .skip2 + + ld a, [hli] + cp e + jr nz, .skip1 + + jr .in_table + +.skip2 + inc hl +.skip1 + inc hl + jr .loop + +.not_in_table + xor a + ret + +.in_table + ld a, [hl] + scf + ret + +INCLUDE "data/wild/treemon_maps.asm" + +GetTreeMons: +; Return the address of TreeMon table a in hl. +; Return nc if table a doesn't exist. + + cp NUM_TREEMON_SETS + jr nc, .quit + + and a + jr z, .quit + + ld e, a + ld d, 0 + ld hl, TreeMons + add hl, de + add hl, de + + ld a, [hli] + ld h, [hl] + ld l, a + + scf + ret + +.quit + xor a + ret + +INCLUDE "data/wild/treemons.asm" + +GetTreeMon: + push hl + call GetTreeScore + pop hl + and a ; TREEMON_SCORE_BAD + jr z, .bad + cp TREEMON_SCORE_GOOD + jr z, .good + cp TREEMON_SCORE_RARE + jr z, .rare + ret + +.bad + ; 10% chance of an encounter + ld a, 10 + call RandomRange + and a + jr nz, NoTreeMon + jr SelectTreeMon + +.good + ; 50% chance of an encounter + ld a, 10 + call RandomRange + cp 5 + jr nc, NoTreeMon + jr SelectTreeMon + +.rare + ; 80% chance of an encounter + ld a, 10 + call RandomRange + cp 8 + jr nc, NoTreeMon + jr .skip +.loop + inc hl + inc hl + inc hl +.skip + ld a, [hli] + inc a + jr nz, .loop + ; fallthrough + +SelectTreeMon: +; Read a TreeMons table and pick one monster at random. + + ld a, 100 + call RandomRange +.loop + sub [hl] + jr c, .ok + inc hl + inc hl + inc hl + inc hl + jr .loop + +.ok + ld a, [hli] + cp -1 + jr z, NoTreeMon + + ld a, [hli] + ld [wCurPartyLevel], a + ld a, [hli] + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + ld [wTempWildMonSpecies], a + scf + ret + +NoTreeMon: + xor a + ld [wTempWildMonSpecies], a + ld [wCurPartyLevel], a + ret + +GetTreeScore: + call .CoordScore + ld [wTreeMonCoordScore], a + call .OTIDScore + ld [wTreeMonOTIDScore], a + ld c, a + ld a, [wTreeMonCoordScore] + sub c + jr z, .rare + jr nc, .ok + add 10 +.ok + cp 5 + jr c, .good + +; bad + xor a ; TREEMON_SCORE_BAD + ret + +.good + ld a, TREEMON_SCORE_GOOD + ret + +.rare + ld a, TREEMON_SCORE_RARE + ret + +.CoordScore: + call GetFacingTileCoord + ld hl, 0 + ld c, e + ld b, 0 + ld a, d + + and a + jr z, .next +.loop + add hl, bc + dec a + jr nz, .loop +.next + + add hl, bc + ld c, d + add hl, bc + + ld a, h + ldh [hDividend], a + ld a, l + ldh [hDividend + 1], a + ld a, 5 + ldh [hDivisor], a + ld b, 2 + call Divide + + ldh a, [hQuotient + 2] + ldh [hDividend], a + ldh a, [hQuotient + 3] + ldh [hDividend + 1], a + ld a, 10 + ldh [hDivisor], a + ld b, 2 + call Divide + + ldh a, [hRemainder] + ret + +.OTIDScore: + ld a, [wPlayerID] + ldh [hDividend], a + ld a, [wPlayerID + 1] + ldh [hDividend + 1], a + ld a, 10 + ldh [hDivisor], a + ld b, 2 + call Divide + ldh a, [hRemainder] + ret diff --git a/engine/events/unown_walls.asm b/engine/events/unown_walls.asm new file mode 100644 index 0000000..5b7c808 --- /dev/null +++ b/engine/events/unown_walls.asm @@ -0,0 +1,270 @@ +HoOhChamber: + ld hl, wPartySpecies + ld a, [hl] + ; is Ho-oh the first Pokémon in the party? If not, we're done + call GetPokemonIndexFromID + ld a, l + sub LOW(HO_OH) + if HIGH(HO_OH) == 0 + or h + else + ret nz + if HIGH(HO_OH) == 1 + dec h + else + ld a, h + cp HIGH(HO_OH) + endc + endc + ret nz + call GetMapAttributesPointer ; pointless? + ld de, EVENT_WALL_OPENED_IN_HO_OH_CHAMBER + ld b, SET_FLAG + jp EventFlagAction + +OmanyteChamber: + call GetMapAttributesPointer ; pointless? + ld de, EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER + ld b, CHECK_FLAG + call EventFlagAction + ld a, c + and a + jr nz, .nope + + ld a, WATER_STONE + ld [wCurItem], a + ld hl, wNumItems + call CheckItem + jr c, .open + + ld a, [wPartyCount] + ld b, a + inc b +.loop + dec b + jr z, .nope + ld a, b + dec a + ld [wCurPartyMon], a + push bc + ld a, MON_ITEM + call GetPartyParamLocation + pop bc + ld a, [hl] + cp WATER_STONE + jr nz, .loop + +.open + call GetMapAttributesPointer ; pointless? + ld de, EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER + ld b, SET_FLAG + call EventFlagAction + +.nope + ret + +SpecialAerodactylChamber: + push de + push bc + + call GetMapAttributesPointer + ld a, h + cp HIGH(RuinsOfAlphAerodactylChamber_MapAttributes) + jr nz, .nope + ld a, l + cp LOW(RuinsOfAlphAerodactylChamber_MapAttributes) + jr nz, .nope + + ld de, EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER + ld b, SET_FLAG + call EventFlagAction + + scf + jr .done + +.nope + and a + +.done + pop bc + pop de + ret + +SpecialKabutoChamber: + push hl + push de + + call GetMapAttributesPointer + ld a, h + cp HIGH(RuinsOfAlphKabutoChamber_MapAttributes) + jr nz, .done + ld a, l + cp LOW(RuinsOfAlphKabutoChamber_MapAttributes) + jr nz, .done + + ld de, EVENT_WALL_OPENED_IN_KABUTO_CHAMBER + ld b, SET_FLAG + call EventFlagAction + +.done + pop de + pop hl + ret + +DisplayUnownWords: + ld a, [wScriptVar] + ld hl, MenuHeaders_UnownWalls + and a + jr z, .load + + ld d, $0 + ld e, $5 +.loop + add hl, de + dec a + jr nz, .loop + +.load + call LoadMenuHeader + xor a + ldh [hBGMapMode], a + call MenuBox + call UpdateSprites + call ApplyTilemap + call MenuBoxCoord2Tile + inc hl + ld d, 0 + ld e, SCREEN_WIDTH + add hl, de + add hl, de + ld a, [wScriptVar] + ld c, a + ld de, UnownWalls + and a + jr z, .copy +.loop2 + ld a, [de] + inc de + cp -1 + jr nz, .loop2 + dec c + jr nz, .loop2 +.copy + call _DisplayUnownWords_CopyWord + ld bc, wAttrmap - wTilemap + add hl, bc + call _DisplayUnownWords_FillAttr + call WaitBGMap2 + call JoyWaitAorB + call PlayClickSFX + call CloseWindow + ret + +INCLUDE "data/events/unown_walls.asm" + +_DisplayUnownWords_FillAttr: + ld a, [de] + cp $ff + ret z + cp $60 + ld a, VRAM_BANK_1 | PAL_BG_BROWN + jr c, .got_pal + ld a, PAL_BG_BROWN + +.got_pal + call .PlaceSquare + inc hl + inc hl + inc de + jr _DisplayUnownWords_FillAttr + +.PlaceSquare: + push hl + ld [hli], a + ld [hld], a + ld b, 0 + ld c, SCREEN_WIDTH + add hl, bc + ld [hli], a + ld [hl], a + pop hl + ret + +_DisplayUnownWords_CopyWord: + push hl + push de +.word_loop + ld a, [de] + cp $ff + jr z, .word_done + ld c, a + call .ConvertChar + inc hl + inc hl + inc de + jr .word_loop + +.word_done + pop de + pop hl + ret + +.ConvertChar: + push hl + ld a, c + cp $60 + jr z, .Tile60 + cp $62 + jr z, .Tile62 + cp $64 + jr z, .Tile64 + ld [hli], a + inc a + ld [hld], a + dec a + ld b, 0 + ld c, SCREEN_WIDTH + add hl, bc + ld c, $10 + add c + ld [hli], a + inc a + ld [hl], a + pop hl + ret + +.Tile60: + ld [hl], $5b + inc hl + ld [hl], $5c + ld bc, SCREEN_WIDTH - 1 + add hl, bc + ld [hl], $4d + inc hl + ld [hl], $5d + pop hl + ret + +.Tile62: + ld [hl], $4e + inc hl + ld [hl], $4f + ld bc, SCREEN_WIDTH - 1 + add hl, bc + ld [hl], $5e + inc hl + ld [hl], $5f + pop hl + ret + +.Tile64: + ld [hl], $2 + inc hl + ld [hl], $3 + ld bc, SCREEN_WIDTH - 1 + add hl, bc + ld [hl], $3 + inc hl + ld [hl], $2 + pop hl + ret diff --git a/engine/events/whiteout.asm b/engine/events/whiteout.asm new file mode 100644 index 0000000..02f60f0 --- /dev/null +++ b/engine/events/whiteout.asm @@ -0,0 +1,73 @@ +Script_BattleWhiteout:: + callasm BattleBGMap + sjump Script_Whiteout + +OverworldWhiteoutScript:: + refreshscreen + callasm OverworldBGMap + +Script_Whiteout: + writetext .WhitedOutText + waitbutton + special FadeOutPalettes + pause 40 + special HealParty + checkflag ENGINE_BUG_CONTEST_TIMER + iftrue .bug_contest + callasm HalveMoney + callasm GetWhiteoutSpawn + farscall Script_AbortBugContest + special WarpToSpawnPoint + newloadmap MAPSETUP_WARP + endall + +.bug_contest + jumpstd BugContestResultsWarpScript + +.WhitedOutText: + text_far _WhitedOutText + text_end + +OverworldBGMap: + call ClearPalettes + call ClearScreen + call WaitBGMap2 + call HideSprites + call RotateThreePalettesLeft + ret + +BattleBGMap: + ld b, SCGB_BATTLE_GRAYSCALE + call GetSGBLayout + call SetPalettes + ret + +HalveMoney: + farcall StubbedTrainerRankings_WhiteOuts + +; Halve the player's money. + ld hl, wMoney + ld a, [hl] + srl a + ld [hli], a + ld a, [hl] + rra + ld [hli], a + ld a, [hl] + rra + ld [hl], a + ret + +GetWhiteoutSpawn: + ld a, [wLastSpawnMapGroup] + ld d, a + ld a, [wLastSpawnMapNumber] + ld e, a + farcall IsSpawnPoint + ld a, c + jr c, .yes + xor a ; SPAWN_HOME + +.yes + ld [wDefaultSpawnpoint], a + ret diff --git a/engine/games/card_flip.asm b/engine/games/card_flip.asm new file mode 100644 index 0000000..3109454 --- /dev/null +++ b/engine/games/card_flip.asm @@ -0,0 +1,1614 @@ +DEF CARDFLIP_LIGHT_OFF EQU "♂" ; $ef +DEF CARDFLIP_LIGHT_ON EQU "♀" ; $f5 + +DEF CARDFLIP_DECK_SIZE EQUS "(wDeckEnd - wDeck)" + assert wDiscardPileEnd - wDiscardPile == wDeckEnd - wDeck + +MemoryGameGFX: +; Graphics for an unused Game Corner +; game were meant to be here. + +UnusedCursor_InterpretJoypad_AnimateCursor: + ret + +_CardFlip: + ld hl, wOptions + set NO_TEXT_SCROLL, [hl] + call ClearBGPalettes + call ClearTilemap + call ClearSprites + ld de, MUSIC_NONE + call PlayMusic + call DelayFrame + call DisableLCD + call LoadStandardFont + call LoadFontsExtra + + ld hl, CardFlipLZ01 + ld de, vTiles2 tile $00 + call Decompress + ld hl, CardFlipLZ02 + ld de, vTiles2 tile $3e + call Decompress + ld hl, CardFlipLZ03 + ld de, vTiles0 tile $00 + call Decompress + ld hl, CardFlipOffButtonGFX + ld de, vTiles0 tile CARDFLIP_LIGHT_OFF + ld bc, 1 tiles + call CopyBytes + ld hl, CardFlipOnButtonGFX + ld de, vTiles0 tile CARDFLIP_LIGHT_ON + ld bc, 1 tiles + call CopyBytes + + call CardFlip_ShiftDigitsUpOnePixel + call CardFlip_InitTilemap + call CardFlip_InitAttrPals + call EnableLCD + call WaitBGMap2 + ld a, %11100100 + call DmgToCgbBGPals + lb de, %11100100, %11100100 + call DmgToCgbObjPals + call DelayFrame + xor a + ld [wJumptableIndex], a + ld a, $2 + ld [wCardFlipCursorY], a + ld [wCardFlipCursorX], a + ld de, MUSIC_GAME_CORNER + call PlayMusic +.MasterLoop: + ld a, [wJumptableIndex] + bit 7, a + jr nz, .leavethegame + call .CardFlip + jr .MasterLoop +.leavethegame + call WaitSFX + ld de, SFX_QUIT_SLOTS + call PlaySFX + call WaitSFX + call ClearBGPalettes + ld hl, wOptions + res 4, [hl] + ret + +.CardFlip: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + dw .AskPlayWithThree + dw .DeductCoins + dw .ChooseACard + dw .PlaceYourBet + dw .CheckTheCard + dw .TabulateTheResult + dw .PlayAgain + dw .Quit + +.Increment: + ld hl, wJumptableIndex + inc [hl] + ret + +.AskPlayWithThree: + ld hl, .CardFlipPlayWithThreeCoinsText + call CardFlip_UpdateCoinBalanceDisplay + call YesNoBox + jr c, .SaidNo + call CardFlip_ShuffleDeck + call .Increment + ret + +.SaidNo: + ld a, 7 + ld [wJumptableIndex], a + ret + +.CardFlipPlayWithThreeCoinsText: + text_far _CardFlipPlayWithThreeCoinsText + text_end + +.DeductCoins: + ld a, [wCoins] + ld h, a + ld a, [wCoins + 1] + ld l, a + ld a, h + and a + jr nz, .deduct ; You have at least 256 coins. + ld a, l + cp 3 + jr nc, .deduct ; You have at least 3 coins. + ld hl, .CardFlipNotEnoughCoinsText + call CardFlip_UpdateCoinBalanceDisplay + ld a, 7 + ld [wJumptableIndex], a + ret + +.deduct + ld de, -3 + add hl, de + ld a, h + ld [wCoins], a + ld a, l + ld [wCoins + 1], a + ld de, SFX_TRANSACTION + call PlaySFX + xor a + ldh [hBGMapMode], a + call CardFlip_PrintCoinBalance + ld a, $1 + ldh [hBGMapMode], a + call WaitSFX + call .Increment + ret + +.CardFlipNotEnoughCoinsText: + text_far _CardFlipNotEnoughCoinsText + text_end + +.ChooseACard: + xor a + ldh [hBGMapMode], a + hlcoord 0, 0 + lb bc, 12, 9 + call CardFlip_FillGreenBox + hlcoord 9, 0 + ld bc, SCREEN_WIDTH + ld a, [wCardFlipNumCardsPlayed] + call AddNTimes + ld [hl], CARDFLIP_LIGHT_ON + ld a, $1 + ldh [hBGMapMode], a + ld c, 20 + call DelayFrames + hlcoord 2, 0 + call PlaceCardFaceDown + ld a, $1 + ldh [hBGMapMode], a + ld c, 20 + call DelayFrames + hlcoord 2, 6 + call PlaceCardFaceDown + call WaitBGMap + ld hl, .CardFlipChooseACardText + call CardFlip_UpdateCoinBalanceDisplay + xor a + ld [wCardFlipWhichCard], a +.loop + call JoyTextDelay + ldh a, [hJoyLast] + and A_BUTTON + jr nz, .next + ld de, SFX_KINESIS + call PlaySFX + call PlaceOAMCardBorder + ld c, 4 + call DelayFrames + ld hl, wCardFlipWhichCard + ld a, [hl] + xor $1 + ld [hl], a + jr .loop + +.next + ld de, SFX_SLOT_MACHINE_START + call PlaySFX + ld a, $3 +.loop2 + push af + call PlaceOAMCardBorder + ld c, 4 + call DelayFrames + call ClearSprites + ld c, 4 + call DelayFrames + pop af + dec a + jr nz, .loop2 + ld hl, wCardFlipWhichCard + ld a, [hl] + push af + xor $1 + ld [hl], a + call GetCoordsOfChosenCard + lb bc, 6, 5 + call CardFlip_FillGreenBox + pop af + ld [wCardFlipWhichCard], a + call .Increment + ret + +.CardFlipChooseACardText: + text_far _CardFlipChooseACardText + text_end + +.PlaceYourBet: + ld hl, .CardFlipPlaceYourBetText + call CardFlip_UpdateCoinBalanceDisplay +.betloop + call JoyTextDelay + ldh a, [hJoyLast] + and A_BUTTON + jr nz, .betdone + call ChooseCard_HandleJoypad + call CardFlip_UpdateCursorOAM + call DelayFrame + jr .betloop + +.betdone + call .Increment + ret + +.CardFlipPlaceYourBetText: + text_far _CardFlipPlaceYourBetText + text_end + +.CheckTheCard: + xor a + ldh [hVBlankCounter], a + call CardFlip_UpdateCursorOAM + call WaitSFX + ld de, SFX_CHOOSE_A_CARD + call PlaySFX + call WaitSFX + ld a, [wCardFlipNumCardsPlayed] + ld e, a + ld d, 0 + ld hl, wDeck + add hl, de + add hl, de + ld a, [wCardFlipWhichCard] + ld e, a + add hl, de + ld a, [hl] + ld [wCardFlipFaceUpCard], a + ld e, a + ld hl, wDiscardPile + add hl, de + ld [hl], TRUE + call GetCoordsOfChosenCard + call CardFlip_DisplayCardFaceUp + call WaitBGMap2 + call .Increment + ret + +.TabulateTheResult: + call CardFlip_CheckWinCondition + call WaitPressAorB_BlinkCursor + call .Increment + ret + +.PlayAgain: + call ClearSprites + ld hl, .CardFlipPlayAgainText + call CardFlip_UpdateCoinBalanceDisplay + call YesNoBox + jr nc, .Continue + call .Increment + ret + +.Continue: + ld a, [wCardFlipNumCardsPlayed] + inc a + ld [wCardFlipNumCardsPlayed], a + cp 12 + jr c, .KeepTheCurrentDeck + call CardFlip_InitTilemap + ld a, $1 + ldh [hBGMapMode], a + call CardFlip_ShuffleDeck + ld hl, .CardFlipShuffledText + call PrintText + jr .LoopAround + +.KeepTheCurrentDeck: + call CardFlip_BlankDiscardedCardSlot + +.LoopAround: + ld a, 1 + ld [wJumptableIndex], a + ret + +.CardFlipPlayAgainText: + text_far _CardFlipPlayAgainText + text_end + +.CardFlipShuffledText: + text_far _CardFlipShuffledText + text_end + +.Quit: + ld hl, wJumptableIndex + set 7, [hl] + ret + +CardFlip_ShuffleDeck: + ld hl, wDeck + ld bc, CARDFLIP_DECK_SIZE + xor a + call ByteFill + ld de, wDeck + ld c, CARDFLIP_DECK_SIZE - 1 +.loop + call Random + and $1f + cp CARDFLIP_DECK_SIZE + jr nc, .loop + ld l, a + ld h, 0 + add hl, de + ld a, [hl] + and a + jr nz, .loop + ld [hl], c + dec c + jr nz, .loop + xor a + ld [wCardFlipNumCardsPlayed], a + ld hl, wDiscardPile + ld bc, CARDFLIP_DECK_SIZE + call ByteFill + ret + +CollapseCursorPosition: + ld hl, 0 + ld bc, 6 + ld a, [wCardFlipCursorY] + call AddNTimes + ld b, $0 + ld a, [wCardFlipCursorX] + ld c, a + add hl, bc + ret + +GetCoordsOfChosenCard: + ld a, [wCardFlipWhichCard] + and a + jr nz, .BottomCard + hlcoord 2, 0 + bcpixel 2, 3 + jr .done + +.BottomCard: + hlcoord 2, 6 + bcpixel 8, 3 + +.done + ret + +PlaceCardFaceDown: + xor a + ldh [hBGMapMode], a + ld de, .FaceDownCardTilemap + lb bc, 6, 5 + call CardFlip_CopyToBox + ret + +.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 + +CardFlip_DisplayCardFaceUp: + xor a + ldh [hBGMapMode], a + push hl + push hl + ; Flip the card face up. + ld de, .FaceUpCardTilemap + lb bc, 6, 5 + call CardFlip_CopyToBox + + ; Get the level and species of the upturned card. + ld a, [wCardFlipFaceUpCard] + ld e, a + ld d, 0 + ld hl, .Deck + add hl, de + add hl, de + ld a, [hli] + ld e, a + ld d, [hl] + + ; Place the level. + pop hl + ld bc, 3 + SCREEN_WIDTH + add hl, bc + ld [hl], e + + ; Place the Pokepic. + ld bc, SCREEN_HEIGHT + add hl, bc + ld a, d + ld de, SCREEN_WIDTH + ld b, 3 +.row + push hl + ld c, 3 +.col + ld [hli], a + inc a + dec c + jr nz, .col + pop hl + add hl, de + dec b + jr nz, .row + pop hl + + ; Pointless CGB check + ldh a, [hCGB] + and a + ret z + + ; Set the attributes + ld de, wAttrmap - wTilemap + add hl, de + ld a, [wCardFlipFaceUpCard] + and 3 + inc a + lb bc, 6, 5 + call CardFlip_FillBox + ret + +.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 + +.Deck: + ; level, pic anchor (3x3) + db "1", $4e, "1", $57, "1", $69, "1", $60 + db "2", $4e, "2", $57, "2", $69, "2", $60 + db "3", $4e, "3", $57, "3", $69, "3", $60 + 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 + +CardFlip_UpdateCoinBalanceDisplay: + push hl + hlcoord 0, 12 + ld b, 4 + ld c, SCREEN_WIDTH - 2 + call Textbox + pop hl + call PrintTextboxText + call CardFlip_PrintCoinBalance + ret + +CardFlip_PrintCoinBalance: + hlcoord 9, 15 + ld b, 1 + ld c, 9 + call Textbox + hlcoord 10, 16 + ld de, .CoinStr + call PlaceString + hlcoord 15, 16 + ld de, wCoins + lb bc, PRINTNUM_LEADINGZEROS | 2, 4 + call PrintNum + ret + +.CoinStr: + db "COIN@" + +CardFlip_InitTilemap: + xor a + ldh [hBGMapMode], a + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + ld a, $29 + call ByteFill + hlcoord 9, 0 + ld de, CardFlipTilemap + lb bc, 12, 11 + call CardFlip_CopyToBox + hlcoord 0, 12 + lb bc, 4, 18 + call Textbox + ret + +CardFlip_FillGreenBox: + ld a, $29 + +CardFlip_FillBox: +.row + push bc + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + ret + +CardFlip_CopyToBox: +.row + push bc + push hl +.col + ld a, [de] + inc de + ld [hli], a + dec c + jr nz, .col + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + ret + +CardFlip_CopyOAM: + ld de, wShadowOAMSprite00 + ld a, [hli] +.loop + push af + ld a, [hli] + add b + ld [de], a ; y + inc de + ld a, [hli] + add c + ld [de], a ; x + inc de + ld a, [hli] + ld [de], a ; tile id + inc de + ld a, [hli] + ld [de], a ; attributes + inc de + pop af + dec a + jr nz, .loop + ret + +CardFlip_ShiftDigitsUpOnePixel: +; The top rows of digits 1-9 become the bottom rows of 0-8, +; so this routine relies on the top rows being blank. + ld de, vTiles0 tile "0" + ld hl, vTiles0 tile "0" + 2 + ld bc, 10 tiles - 2 + call CopyBytes + ld hl, vTiles0 tile "9" + 1 tiles - 2 + xor a + ld [hli], a + ld [hl], a + ret + +CardFlip_BlankDiscardedCardSlot: + xor a + ldh [hBGMapMode], a + ld a, [wCardFlipFaceUpCard] + ld e, a + ld d, 0 + + and 3 ; get mon + ld c, a + ld b, 0 + + ld a, e + and $1c ; get level + srl a + add LOW(.Jumptable) + ld l, a + ld a, 0 + adc HIGH(.Jumptable) + ld h, a + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: + dw .Level1 + dw .Level2 + dw .Level3 + dw .Level4 + dw .Level5 + dw .Level6 + +.Level1: + ld hl, wDiscardPile + 4 + add hl, de + ld a, [hl] + and a + jr nz, .discarded2 + hlcoord 13, 3 + add hl, bc + add hl, bc + ld [hl], $36 + ld bc, SCREEN_WIDTH + add hl, bc + ld [hl], $37 + ret + +.discarded2 + hlcoord 13, 3 + add hl, bc + add hl, bc + ld [hl], $36 + ld bc, SCREEN_WIDTH + add hl, bc + ld [hl], $3d + ret + +.Level2: + ld hl, wDiscardPile - 4 + add hl, de + ld a, [hl] + and a + jr nz, .discarded1 + hlcoord 13, 4 + add hl, bc + add hl, bc + ld [hl], $3b + ld bc, SCREEN_WIDTH + add hl, bc + ld [hl], $3a + ret + +.discarded1 + hlcoord 13, 4 + add hl, bc + add hl, bc + ld [hl], $3d + ld bc, SCREEN_WIDTH + add hl, bc + ld [hl], $3a + ret + +.Level3: + ld hl, wDiscardPile + 4 + add hl, de + ld a, [hl] + and a + jr nz, .discarded4 + hlcoord 13, 6 + add hl, bc + add hl, bc + ld [hl], $36 + ld bc, SCREEN_WIDTH + add hl, bc + ld [hl], $38 + ret + +.discarded4 + hlcoord 13, 6 + add hl, bc + add hl, bc + ld [hl], $36 + ld bc, SCREEN_WIDTH + add hl, bc + ld [hl], $3d + ret + +.Level4: + ld hl, wDiscardPile - 4 + add hl, de + ld a, [hl] + and a + jr nz, .discarded3 + hlcoord 13, 7 + add hl, bc + add hl, bc + ld [hl], $3c + ld bc, SCREEN_WIDTH + add hl, bc + ld [hl], $3a + ret + +.discarded3 + hlcoord 13, 7 + add hl, bc + add hl, bc + ld [hl], $3d + ld bc, SCREEN_WIDTH + add hl, bc + ld [hl], $3a + ret + +.Level5: + ld hl, wDiscardPile + 4 + add hl, de + ld a, [hl] + and a + jr nz, .discarded6 + hlcoord 13, 9 + add hl, bc + add hl, bc + ld [hl], $36 + ld bc, SCREEN_WIDTH + add hl, bc + ld [hl], $39 + ret + +.discarded6 + hlcoord 13, 9 + add hl, bc + add hl, bc + ld [hl], $36 + ld bc, SCREEN_WIDTH + add hl, bc + ld [hl], $3d + ret + +.Level6: + ld hl, wDiscardPile - 4 + add hl, de + ld a, [hl] + and a + jr nz, .discarded5 + hlcoord 13, 10 + add hl, bc + add hl, bc + ld [hl], $3c + ld bc, SCREEN_WIDTH + add hl, bc + ld [hl], $3a + ret + +.discarded5 + hlcoord 13, 10 + add hl, bc + add hl, bc + ld [hl], $3d + ld bc, SCREEN_WIDTH + add hl, bc + ld [hl], $3a + ret + +CardFlip_CheckWinCondition: + call CollapseCursorPosition + add hl, hl + ld de, .Jumptable + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: + dw .Impossible + dw .Impossible + dw .PikaJiggly + dw .PikaJiggly + dw .PoliOddish + dw .PoliOddish + + dw .Impossible + dw .Impossible + dw .Pikachu + dw .Jigglypuff + dw .Poliwag + dw .Oddish + + dw .OneTwo + dw .One + dw .PikaOne + dw .JigglyOne + dw .PoliOne + dw .OddOne + + dw .OneTwo + dw .Two + dw .PikaTwo + dw .JigglyTwo + dw .PoliTwo + dw .OddTwo + + dw .ThreeFour + dw .Three + dw .PikaThree + dw .JigglyThree + dw .PoliThree + dw .OddThree + + dw .ThreeFour + dw .Four + dw .PikaFour + dw .JigglyFour + dw .PoliFour + dw .OddFour + + dw .FiveSix + dw .Five + dw .PikaFive + dw .JigglyFive + dw .PoliFive + dw .OddFive + + dw .FiveSix + dw .Six + dw .PikaSix + dw .JigglySix + dw .PoliSix + dw .OddSix + +.Impossible: + jp .Lose + +.PikaJiggly: + ld a, [wCardFlipFaceUpCard] + and $2 + jp nz, .Lose + jr .WinSix + +.PoliOddish: + ld a, [wCardFlipFaceUpCard] + and $2 + jr nz, .WinSix + jp .Lose + +.WinSix: + ld c, $6 + ld de, SFX_2ND_PLACE + jp .Payout + +.OneTwo: + ld a, [wCardFlipFaceUpCard] + and $18 + jr z, .WinNine + jp .Lose + +.ThreeFour: + ld a, [wCardFlipFaceUpCard] + and $18 + cp $8 + jr z, .WinNine + jp .Lose + +.FiveSix: + ld a, [wCardFlipFaceUpCard] + and $18 + cp $10 + jr z, .WinNine + jp .Lose + +.WinNine: + ld c, $9 + ld de, SFX_2ND_PLACE + jp .Payout + +.Pikachu: + ld a, [wCardFlipFaceUpCard] + and $3 + jr z, .WinTwelve + jp .Lose + +.Jigglypuff: + ld a, [wCardFlipFaceUpCard] + and $3 + cp $1 + jr z, .WinTwelve + jp .Lose + +.Poliwag: + ld a, [wCardFlipFaceUpCard] + and $3 + cp $2 + jr z, .WinTwelve + jp .Lose + +.Oddish: + ld a, [wCardFlipFaceUpCard] + and $3 + cp $3 + jr z, .WinTwelve + jp .Lose + +.WinTwelve: + ld c, $c + ld de, SFX_2ND_PLACE + jp .Payout + +.One: + ld a, [wCardFlipFaceUpCard] + and $1c + jr z, .WinEighteen + jp .Lose + +.Two: + ld a, [wCardFlipFaceUpCard] + and $1c + cp $4 + jr z, .WinEighteen + jp .Lose + +.Three: + ld a, [wCardFlipFaceUpCard] + and $1c + cp $8 + jr z, .WinEighteen + jp .Lose + +.Four: + ld a, [wCardFlipFaceUpCard] + and $1c + cp $c + jr z, .WinEighteen + jp .Lose + +.Five: + ld a, [wCardFlipFaceUpCard] + and $1c + cp $10 + jr z, .WinEighteen + jp .Lose + +.Six: + ld a, [wCardFlipFaceUpCard] + and $1c + cp $14 + jr z, .WinEighteen + jp .Lose + +.WinEighteen: + ld c, $12 + ld de, SFX_2ND_PLACE + jp .Payout + +.PikaOne: + ld e, $0 + jr .CheckWin72 + +.JigglyOne: + ld e, $1 + jr .CheckWin72 + +.PoliOne: + ld e, $2 + jr .CheckWin72 + +.OddOne: + ld e, $3 + jr .CheckWin72 + +.PikaTwo: + ld e, $4 + jr .CheckWin72 + +.JigglyTwo: + ld e, $5 + jr .CheckWin72 + +.PoliTwo: + ld e, $6 + jr .CheckWin72 + +.OddTwo: + ld e, $7 + jr .CheckWin72 + +.PikaThree: + ld e, $8 + jr .CheckWin72 + +.JigglyThree: + ld e, $9 + jr .CheckWin72 + +.PoliThree: + ld e, $a + jr .CheckWin72 + +.OddThree: + ld e, $b + jr .CheckWin72 + +.PikaFour: + ld e, $c + jr .CheckWin72 + +.JigglyFour: + ld e, $d + jr .CheckWin72 + +.PoliFour: + ld e, $e + jr .CheckWin72 + +.OddFour: + ld e, $f + jr .CheckWin72 + +.PikaFive: + ld e, $10 + jr .CheckWin72 + +.JigglyFive: + ld e, $11 + jr .CheckWin72 + +.PoliFive: + ld e, $12 + jr .CheckWin72 + +.OddFive: + ld e, $13 + jr .CheckWin72 + +.PikaSix: + ld e, $14 + jr .CheckWin72 + +.JigglySix: + ld e, $15 + jr .CheckWin72 + +.PoliSix: + ld e, $16 + jr .CheckWin72 + +.OddSix: + ld e, $17 + +.CheckWin72: + ld a, [wCardFlipFaceUpCard] + cp e + jr nz, .Lose + ld c, 72 + ld de, SFX_2ND_PLACE + jr .Payout + +.Lose: + ld de, SFX_WRONG + call PlaySFX + ld hl, .CardFlipDarnText + call CardFlip_UpdateCoinBalanceDisplay + call WaitSFX + ret + +.Payout: + push bc + push de + ld hl, .CardFlipYeahText + call CardFlip_UpdateCoinBalanceDisplay + pop de + call PlaySFX + call WaitSFX + pop bc +.loop + push bc + call .IsCoinCaseFull + jr c, .full + call .AddCoinPlaySFX + +.full + call CardFlip_PrintCoinBalance + ld c, 2 + call DelayFrames + pop bc + dec c + jr nz, .loop + ret + +.CardFlipYeahText: + text_far _CardFlipYeahText + text_end + +.CardFlipDarnText: + text_far _CardFlipDarnText + text_end + +.AddCoinPlaySFX: + ld a, [wCoins] + ld h, a + ld a, [wCoins + 1] + ld l, a + inc hl + ld a, h + ld [wCoins], a + ld a, l + ld [wCoins + 1], a + ld de, SFX_PAY_DAY + call PlaySFX + ret + +.IsCoinCaseFull: + ld a, [wCoins] + cp HIGH(MAX_COINS) + jr c, .less + jr z, .check_low + jr .more + +.check_low + ld a, [wCoins + 1] + cp LOW(MAX_COINS) + jr c, .less + +.more + scf + ret + +.less + and a + ret + +PlaceOAMCardBorder: + call GetCoordsOfChosenCard + ld hl, .SpriteData + call CardFlip_CopyOAM + ret + +.SpriteData: + db 18 + dbsprite 0, 0, 0, 0, $04, 0 + dbsprite 1, 0, 0, 0, $06, 0 + dbsprite 2, 0, 0, 0, $06, 0 + dbsprite 3, 0, 0, 0, $06, 0 + dbsprite 4, 0, 0, 0, $04, 0 | X_FLIP + + dbsprite 0, 1, 0, 0, $05, 0 + dbsprite 4, 1, 0, 0, $05, 0 | X_FLIP + + dbsprite 0, 2, 0, 0, $05, 0 + dbsprite 4, 2, 0, 0, $05, 0 | X_FLIP + + dbsprite 0, 3, 0, 0, $05, 0 + dbsprite 4, 3, 0, 0, $05, 0 | X_FLIP + + dbsprite 0, 4, 0, 0, $05, $00 + dbsprite 4, 4, 0, 0, $05, 0 | X_FLIP + + dbsprite 0, 5, 0, 0, $04, 0 | Y_FLIP + dbsprite 1, 5, 0, 0, $06, 0 | Y_FLIP + dbsprite 2, 5, 0, 0, $06, 0 | Y_FLIP + dbsprite 3, 5, 0, 0, $06, 0 | Y_FLIP + dbsprite 4, 5, 0, 0, $04, 0 | X_FLIP | Y_FLIP + +ChooseCard_HandleJoypad: + ld hl, hJoyLast + ld a, [hl] + and D_LEFT + jp nz, .d_left + ld a, [hl] + and D_RIGHT + jp nz, .d_right + ld a, [hl] + and D_UP + jp nz, .d_up + ld a, [hl] + and D_DOWN + jp nz, .d_down + ret + +.d_left + ld hl, wCardFlipCursorX + ld a, [wCardFlipCursorY] + and a + jr z, .mon_pair_left + cp $1 + jr z, .mon_group_left + ld a, [hl] + and a + ret z + dec [hl] + jp .play_sound + +.mon_group_left + ld a, [hl] + cp $3 + jr c, .left_to_number_gp + dec [hl] + jp .play_sound + +.mon_pair_left + ld a, [hl] + and $e + ld [hl], a + cp $3 + jr c, .left_to_number_gp + dec [hl] + dec [hl] + jp .play_sound + +.left_to_number_gp + ld a, $2 + ld [wCardFlipCursorY], a + ld a, $1 + ld [wCardFlipCursorX], a + jp .play_sound + +.d_right + ld hl, wCardFlipCursorX + ld a, [wCardFlipCursorY] + and a + jr z, .mon_pair_right + ld a, [hl] + cp $5 + ret nc + inc [hl] + jr .play_sound + +.mon_pair_right + ld a, [hl] + and $e + ld [hl], a + cp $4 + ret nc + inc [hl] + inc [hl] + jr .play_sound + +.d_up + ld hl, wCardFlipCursorY + ld a, [wCardFlipCursorX] + and a + jr z, .num_pair_up + cp $1 + jr z, .num_gp_up + ld a, [hl] + and a + ret z + dec [hl] + jr .play_sound + +.num_gp_up + ld a, [hl] + cp $3 + jr c, .up_to_mon_group + dec [hl] + jr .play_sound + +.num_pair_up + ld a, [hl] + and $e + ld [hl], a + cp $3 + jr c, .up_to_mon_group + dec [hl] + dec [hl] + jr .play_sound + +.up_to_mon_group + ld a, $1 + ld [wCardFlipCursorY], a + ld a, $2 + ld [wCardFlipCursorX], a + jr .play_sound + +.d_down + ld hl, wCardFlipCursorY + ld a, [wCardFlipCursorX] + and a + jr z, .num_pair_down + ld hl, wCardFlipCursorY + ld a, [hl] + cp $7 + ret nc + inc [hl] + jr .play_sound + +.num_pair_down + ld a, [hl] + and $e + ld [hl], a + cp $6 + ret nc + inc [hl] + inc [hl] + +.play_sound + ld de, SFX_POKEBALLS_PLACED_ON_TABLE + call PlaySFX + ret + +CardFlip_UpdateCursorOAM: + call ClearSprites + ldh a, [hCGB] + and a + jr nz, .skip + ldh a, [hVBlankCounter] + and $4 + ret nz + +.skip + call CollapseCursorPosition + add hl, hl + add hl, hl + ld de, .OAMData + add hl, de + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, [hli] + ld h, [hl] + ld l, a + call CardFlip_CopyOAM + ret + +.OAMData: +MACRO cardflip_cursor + if _NARG >= 5 + dbpixel \1, \2, \3, \4 + dw \5 + else + dbpixel \1, \2 + dw \3 + endc +ENDM + + cardflip_cursor 11, 2, .Impossible + cardflip_cursor 12, 2, .Impossible + cardflip_cursor 13, 2, .PokeGroupPair + cardflip_cursor 13, 2, .PokeGroupPair + cardflip_cursor 17, 2, .PokeGroupPair + cardflip_cursor 17, 2, .PokeGroupPair + + cardflip_cursor 11, 3, .Impossible + cardflip_cursor 12, 3, .Impossible + cardflip_cursor 13, 3, .PokeGroup + cardflip_cursor 15, 3, .PokeGroup + cardflip_cursor 17, 3, .PokeGroup + cardflip_cursor 19, 3, .PokeGroup + + cardflip_cursor 11, 5, .NumGroupPair + cardflip_cursor 12, 5, .NumGroup + cardflip_cursor 13, 5, .SingleTile + cardflip_cursor 15, 5, .SingleTile + cardflip_cursor 17, 5, .SingleTile + cardflip_cursor 19, 5, .SingleTile + + cardflip_cursor 11, 5, .NumGroupPair + cardflip_cursor 12, 6, 0, 4, .NumGroup + cardflip_cursor 13, 6, 0, 4, .SingleTile + cardflip_cursor 15, 6, 0, 4, .SingleTile + cardflip_cursor 17, 6, 0, 4, .SingleTile + cardflip_cursor 19, 6, 0, 4, .SingleTile + + cardflip_cursor 11, 8, .NumGroupPair + cardflip_cursor 12, 8, .NumGroup + cardflip_cursor 13, 8, .SingleTile + cardflip_cursor 15, 8, .SingleTile + cardflip_cursor 17, 8, .SingleTile + cardflip_cursor 19, 8, .SingleTile + + cardflip_cursor 11, 8, .NumGroupPair + cardflip_cursor 12, 9, 0, 4, .NumGroup + cardflip_cursor 13, 9, 0, 4, .SingleTile + cardflip_cursor 15, 9, 0, 4, .SingleTile + cardflip_cursor 17, 9, 0, 4, .SingleTile + cardflip_cursor 19, 9, 0, 4, .SingleTile + + cardflip_cursor 11, 11, .NumGroupPair + cardflip_cursor 12, 11, .NumGroup + cardflip_cursor 13, 11, .SingleTile + cardflip_cursor 15, 11, .SingleTile + cardflip_cursor 17, 11, .SingleTile + cardflip_cursor 19, 11, .SingleTile + + cardflip_cursor 11, 11, .NumGroupPair + cardflip_cursor 12, 12, 0, 4, .NumGroup + cardflip_cursor 13, 12, 0, 4, .SingleTile + cardflip_cursor 15, 12, 0, 4, .SingleTile + cardflip_cursor 17, 12, 0, 4, .SingleTile + cardflip_cursor 19, 12, 0, 4, .SingleTile + +.SingleTile: + db 6 + dbsprite -1, 0, 7, 0, $00, 0 | PRIORITY + dbsprite 0, 0, 0, 0, $02, 0 | PRIORITY + dbsprite 1, 0, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 0, 7, 5, $00, 0 | Y_FLIP | PRIORITY + dbsprite 0, 0, 0, 5, $02, 0 | Y_FLIP | PRIORITY + dbsprite 1, 0, 0, 5, $03, 0 | PRIORITY + +.PokeGroup: + db 26 + dbsprite -1, 0, 7, 0, $00, 0 | PRIORITY + dbsprite 0, 0, 0, 0, $02, 0 | PRIORITY + dbsprite 1, 0, 0, 0, $00, 0 | X_FLIP | PRIORITY + dbsprite -1, 1, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 1, 0, 0, $01, 0 | X_FLIP | PRIORITY + dbsprite -1, 2, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 2, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 3, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 3, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 4, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 4, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 5, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 5, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 6, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 6, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 7, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 7, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 8, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 8, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 9, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 9, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 10, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 10, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 10, 7, 1, $00, 0 | Y_FLIP | PRIORITY + dbsprite 0, 10, 0, 1, $02, 0 | Y_FLIP | PRIORITY + dbsprite 1, 10, 0, 1, $03, 0 | PRIORITY + +.NumGroup: + db 20 + dbsprite -1, 0, 7, 0, $00, 0 | PRIORITY + dbsprite 0, 0, 0, 0, $02, 0 | PRIORITY + dbsprite 1, 0, 0, 0, $02, 0 | PRIORITY + dbsprite 2, 0, 0, 0, $03, 0 | PRIORITY + dbsprite 3, 0, 0, 0, $02, 0 | PRIORITY + dbsprite 4, 0, 0, 0, $03, 0 | PRIORITY + dbsprite 5, 0, 0, 0, $02, 0 | PRIORITY + dbsprite 6, 0, 0, 0, $03, 0 | PRIORITY + dbsprite 7, 0, 0, 0, $02, 0 | PRIORITY + dbsprite 8, 0, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 0, 7, 5, $00, 0 | Y_FLIP | PRIORITY + dbsprite 0, 0, 0, 5, $02, 0 | Y_FLIP | PRIORITY + dbsprite 1, 0, 0, 5, $02, 0 | Y_FLIP | PRIORITY + dbsprite 2, 0, 0, 5, $03, 0 | PRIORITY + dbsprite 3, 0, 0, 5, $02, 0 | Y_FLIP | PRIORITY + dbsprite 4, 0, 0, 5, $03, 0 | PRIORITY + dbsprite 5, 0, 0, 5, $02, 0 | Y_FLIP | PRIORITY + dbsprite 6, 0, 0, 5, $03, 0 | PRIORITY + dbsprite 7, 0, 0, 5, $02, 0 | Y_FLIP | PRIORITY + dbsprite 8, 0, 0, 5, $03, 0 | PRIORITY + +.NumGroupPair: + db 30 + dbsprite 0, 0, 0, 0, $00, 0 | PRIORITY + dbsprite 1, 0, 0, 0, $02, 0 | PRIORITY + dbsprite 2, 0, 0, 0, $02, 0 | PRIORITY + dbsprite 3, 0, 0, 0, $03, 0 | PRIORITY + dbsprite 4, 0, 0, 0, $02, 0 | PRIORITY + dbsprite 5, 0, 0, 0, $03, 0 | PRIORITY + dbsprite 6, 0, 0, 0, $02, 0 | PRIORITY + dbsprite 7, 0, 0, 0, $03, 0 | PRIORITY + dbsprite 8, 0, 0, 0, $02, 0 | PRIORITY + dbsprite 9, 0, 0, 0, $03, 0 | PRIORITY + dbsprite 0, 1, 0, 0, $01, 0 | PRIORITY + dbsprite 3, 1, 0, 0, $03, 0 | PRIORITY + dbsprite 5, 1, 0, 0, $03, 0 | PRIORITY + dbsprite 7, 1, 0, 0, $03, 0 | PRIORITY + dbsprite 9, 1, 0, 0, $03, 0 | PRIORITY + dbsprite 0, 2, 0, 0, $01, 0 | PRIORITY + dbsprite 3, 2, 0, 0, $03, 0 | PRIORITY + dbsprite 5, 2, 0, 0, $03, 0 | PRIORITY + dbsprite 7, 2, 0, 0, $03, 0 | PRIORITY + dbsprite 9, 2, 0, 0, $03, 0 | PRIORITY + dbsprite 0, 2, 0, 1, $00, 0 | Y_FLIP | PRIORITY + dbsprite 1, 2, 0, 1, $02, 0 | Y_FLIP | PRIORITY + dbsprite 2, 2, 0, 1, $02, 0 | Y_FLIP | PRIORITY + dbsprite 3, 2, 0, 1, $03, 0 | PRIORITY + dbsprite 4, 2, 0, 1, $03, 0 | PRIORITY + dbsprite 5, 2, 0, 1, $03, 0 | PRIORITY + dbsprite 6, 2, 0, 1, $03, 0 | PRIORITY + dbsprite 7, 2, 0, 1, $03, 0 | PRIORITY + dbsprite 8, 2, 0, 1, $03, 0 | PRIORITY + dbsprite 9, 2, 0, 1, $03, 0 | PRIORITY + +.PokeGroupPair: + db 38 + dbsprite -1, 0, 7, 0, $00, 0 | PRIORITY + dbsprite 3, 0, 0, 0, $00, 0 | X_FLIP | PRIORITY + dbsprite -1, 1, 7, 0, $01, 0 | PRIORITY + dbsprite 3, 1, 0, 0, $01, 0 | X_FLIP | PRIORITY + dbsprite -1, 2, 7, 0, $01, 0 | PRIORITY + dbsprite 3, 2, 0, 0, $01, 0 | X_FLIP | PRIORITY + dbsprite -1, 3, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 3, 0, 0, $03, 0 | PRIORITY + dbsprite 3, 3, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 4, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 4, 0, 0, $03, 0 | PRIORITY + dbsprite 3, 4, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 5, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 5, 0, 0, $03, 0 | PRIORITY + dbsprite 3, 5, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 6, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 6, 0, 0, $03, 0 | PRIORITY + dbsprite 3, 6, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 7, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 7, 0, 0, $03, 0 | PRIORITY + dbsprite 3, 7, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 8, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 8, 0, 0, $03, 0 | PRIORITY + dbsprite 3, 8, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 9, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 9, 0, 0, $03, 0 | PRIORITY + dbsprite 3, 9, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 10, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 10, 0, 0, $03, 0 | PRIORITY + dbsprite 3, 10, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 11, 7, 0, $01, 0 | PRIORITY + dbsprite 1, 11, 0, 0, $03, 0 | PRIORITY + dbsprite 3, 11, 0, 0, $03, 0 | PRIORITY + dbsprite -1, 11, 7, 1, $00, 0 | Y_FLIP | PRIORITY + dbsprite 0, 11, 0, 1, $02, 0 | Y_FLIP | PRIORITY + dbsprite 1, 11, 0, 1, $03, 0 | Y_FLIP | PRIORITY + dbsprite 2, 11, 0, 1, $02, 0 | Y_FLIP | PRIORITY + dbsprite 3, 11, 0, 1, $03, 0 | X_FLIP | Y_FLIP | PRIORITY + +.Impossible: + db 4 + dbsprite 0, 0, 0, 0, $00, 0 | PRIORITY + dbsprite 1, 0, 0, 0, $00, 0 | X_FLIP | PRIORITY + dbsprite 0, 1, 0, 0, $00, 0 | Y_FLIP | PRIORITY + dbsprite 1, 1, 0, 0, $00, 0 | X_FLIP | Y_FLIP | PRIORITY + +CardFlip_InitAttrPals: + ldh a, [hCGB] + and a + ret z + + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + xor a + call ByteFill + + hlcoord 12, 1, wAttrmap + lb bc, 2, 2 + ld a, $1 + call CardFlip_FillBox + + hlcoord 14, 1, wAttrmap + lb bc, 2, 2 + ld a, $2 + call CardFlip_FillBox + + hlcoord 16, 1, wAttrmap + lb bc, 2, 2 + ld a, $3 + call CardFlip_FillBox + + hlcoord 18, 1, wAttrmap + lb bc, 2, 2 + ld a, $4 + call CardFlip_FillBox + + hlcoord 9, 0, wAttrmap + lb bc, 12, 1 + ld a, $1 + call CardFlip_FillBox + + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, .palettes + ld de, wBGPals1 + ld bc, 9 palettes + call CopyBytes + pop af + ldh [rSVBK], a + ret + +.palettes +INCLUDE "gfx/card_flip/card_flip.pal" + +CardFlipLZ03: +INCBIN "gfx/card_flip/card_flip_3.2bpp.lz" + +CardFlipOffButtonGFX: +INCBIN "gfx/card_flip/off.2bpp" + +CardFlipOnButtonGFX: +INCBIN "gfx/card_flip/on.2bpp" + +CardFlipLZ01: +INCBIN "gfx/card_flip/card_flip_1.2bpp.lz" + +CardFlipLZ02: +INCBIN "gfx/card_flip/card_flip_2.2bpp.lz" + +CardFlipTilemap: +INCBIN "gfx/card_flip/card_flip.tilemap" diff --git a/engine/games/memory_game.asm b/engine/games/memory_game.asm new file mode 100644 index 0000000..8be4e51 --- /dev/null +++ b/engine/games/memory_game.asm @@ -0,0 +1,590 @@ +_MemoryGame: + call .LoadGFXAndPals + call DelayFrame +.loop + call .JumptableLoop + jr nc, .loop + ret + +.LoadGFXAndPals: + call DisableLCD + ld b, SCGB_DIPLOMA + call GetSGBLayout + callfar ClearSpriteAnims + ld hl, MemoryGameLZ + ld de, vTiles2 tile $00 + call Decompress + ld hl, MemoryGameGFX + ld de, vTiles0 tile $00 + ld bc, 4 tiles + ld a, BANK(MemoryGameGFX) + call FarCopyBytes + ld a, SPRITE_ANIM_DICT_ARROW_CURSOR + ld hl, wSpriteAnimDict + ld [hli], a + ld [hl], $00 + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + xor a + call ByteFill + xor a + ldh [hSCY], a + ldh [hSCX], a + ldh [rWY], a + ld [wJumptableIndex], a + ld a, $1 + ldh [hBGMapMode], a + ld a, LCDC_DEFAULT + ldh [rLCDC], a + ld a, $e4 + call DmgToCgbBGPals + ld a, $e0 + call DmgToCgbObjPal0 + ret + +.JumptableLoop: + ld a, [wJumptableIndex] + bit 7, a + jr nz, .quit + call .ExecuteJumptable + callfar PlaySpriteAnimations + call DelayFrame + and a + ret + +.quit + scf + ret + +.ExecuteJumptable: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + dw .RestartGame + dw .ResetBoard + dw .InitBoardTilemapAndCursorObject + dw .CheckTriesRemaining + dw .PickCard1 + dw .PickCard2 + dw .DelayPickAgain + dw .RevealAll + dw .AskPlayAgain + +.RestartGame: + call MemoryGame_InitStrings + ld hl, wJumptableIndex + inc [hl] + ret + +.ResetBoard: + call UnusedCursor_InterpretJoypad_AnimateCursor + jr nc, .proceed + ld hl, wJumptableIndex + set 7, [hl] + ret + +.proceed + call MemoryGame_InitBoard + ld hl, wJumptableIndex + inc [hl] + xor a + ld [wMemoryGameCounter], a + ld hl, wMemoryGameLastMatches +rept 4 + ld [hli], a +endr + ld [hl], a + ld [wMemoryGameNumCardsMatched], a +.InitBoardTilemapAndCursorObject: + ld hl, wMemoryGameCounter + ld a, [hl] + cp 45 + jr nc, .spawn_object + inc [hl] + call MemoryGame_Card2Coord + xor a + ld [wMemoryGameLastCardPicked], a + call MemoryGame_PlaceCard + ret + +.spawn_object + depixel 6, 3, 4, 4 + ld a, SPRITE_ANIM_INDEX_MEMORY_GAME_CURSOR + call InitSpriteAnimStruct + ld a, 5 + ld [wMemoryGameNumberTriesRemaining], a + ld hl, wJumptableIndex + inc [hl] + ret + +.CheckTriesRemaining: + ld a, [wMemoryGameNumberTriesRemaining] + hlcoord 17, 0 + add "0" + ld [hl], a + ld hl, wMemoryGameNumberTriesRemaining + ld a, [hl] + and a + jr nz, .next_try + ld a, $7 + ld [wJumptableIndex], a + ret + +.next_try + dec [hl] + xor a + ld [wMemoryGameCardChoice], a + ld hl, wJumptableIndex + inc [hl] +.PickCard1: + ld a, [wMemoryGameCardChoice] + and a + ret z + dec a + ld e, a + ld d, 0 + ld hl, wMemoryGameCards + add hl, de + ld a, [hl] + cp -1 + ret z + ld [wMemoryGameLastCardPicked], a + ld [wMemoryGameCard1], a + ld a, e + ld [wMemoryGameCard1Location], a + call MemoryGame_Card2Coord + call MemoryGame_PlaceCard + xor a + ld [wMemoryGameCardChoice], a + ld hl, wJumptableIndex + inc [hl] + ret + +.PickCard2: + ld a, [wMemoryGameCardChoice] + and a + ret z + dec a + ld hl, wMemoryGameCard1Location + cp [hl] + ret z + ld e, a + ld d, 0 + ld hl, wMemoryGameCards + add hl, de + ld a, [hl] + cp -1 + ret z + ld [wMemoryGameLastCardPicked], a + ld [wMemoryGameCard2], a + ld a, e + ld [wMemoryGameCard2Location], a + call MemoryGame_Card2Coord + call MemoryGame_PlaceCard + ld a, 64 + ld [wMemoryGameCounter], a + ld hl, wJumptableIndex + inc [hl] +.DelayPickAgain: + ld hl, wMemoryGameCounter + ld a, [hl] + and a + jr z, .PickAgain + dec [hl] + ret + +.PickAgain: + call MemoryGame_CheckMatch + ld a, $3 + ld [wJumptableIndex], a + ret + +.RevealAll: + ldh a, [hJoypadPressed] + and A_BUTTON + ret z + xor a + ld [wMemoryGameCounter], a +.RevelationLoop: + ld hl, wMemoryGameCounter + ld a, [hl] + cp 45 + jr nc, .finish_round + inc [hl] + push af + call MemoryGame_Card2Coord + pop af + push hl + ld e, a + ld d, 0 + ld hl, wMemoryGameCards + add hl, de + ld a, [hl] + pop hl + cp -1 + jr z, .RevelationLoop + ld [wMemoryGameLastCardPicked], a + call MemoryGame_PlaceCard + jr .RevelationLoop + +.finish_round + call WaitPressAorB_BlinkCursor + ld hl, wJumptableIndex + inc [hl] +.AskPlayAgain: + call UnusedCursor_InterpretJoypad_AnimateCursor + jr nc, .restart + ld hl, wJumptableIndex + set 7, [hl] + ret + +.restart + xor a + ld [wJumptableIndex], a + ret + +MemoryGame_CheckMatch: + ld hl, wMemoryGameCard1 + ld a, [hli] + cp [hl] + jr nz, .no_match + + ld a, [wMemoryGameCard1Location] + call MemoryGame_Card2Coord + call MemoryGame_DeleteCard + + ld a, [wMemoryGameCard2Location] + call MemoryGame_Card2Coord + call MemoryGame_DeleteCard + + ld a, [wMemoryGameCard1Location] + ld e, a + ld d, 0 + ld hl, wMemoryGameCards + add hl, de + ld [hl], -1 + + ld a, [wMemoryGameCard2Location] + ld e, a + ld d, 0 + ld hl, wMemoryGameCards + add hl, de + ld [hl], -1 + + ld hl, wMemoryGameLastMatches +.find_empty_slot + ld a, [hli] + and a + jr nz, .find_empty_slot + dec hl + ld a, [wMemoryGameCard1] + ld [hl], a + ld [wMemoryGameLastCardPicked], a + ld hl, wMemoryGameNumCardsMatched + ld e, [hl] + inc [hl] + inc [hl] + ld d, 0 + hlcoord 5, 0 + add hl, de + call MemoryGame_PlaceCard + ld hl, .VictoryText + call PrintText + ret + +.no_match + xor a + ld [wMemoryGameLastCardPicked], a + + ld a, [wMemoryGameCard1Location] + call MemoryGame_Card2Coord + call MemoryGame_PlaceCard + + ld a, [wMemoryGameCard2Location] + call MemoryGame_Card2Coord + call MemoryGame_PlaceCard + + ld hl, MemoryGameDarnText + call PrintText + ret + +.VictoryText: + text_asm + push bc + hlcoord 2, 13 + call MemoryGame_PlaceCard + ld hl, MemoryGameYeahText + pop bc + inc bc + inc bc + inc bc + ret + +MemoryGameYeahText: + text_far _MemoryGameYeahText + text_end + +MemoryGameDarnText: + text_far _MemoryGameDarnText + text_end + +MemoryGame_InitBoard: + ld hl, wMemoryGameCards + ld bc, wMemoryGameCardsEnd - wMemoryGameCards + xor a + call ByteFill + call MemoryGame_GetDistributionOfTiles + + ld c, 2 + ld b, [hl] + call MemoryGame_SampleTilePlacement + + ld c, 8 + ld b, [hl] + call MemoryGame_SampleTilePlacement + + ld c, 4 + ld b, [hl] + call MemoryGame_SampleTilePlacement + + ld c, 7 + ld b, [hl] + call MemoryGame_SampleTilePlacement + + ld c, 3 + ld b, [hl] + call MemoryGame_SampleTilePlacement + + ld c, 6 + ld b, [hl] + call MemoryGame_SampleTilePlacement + + ld c, 1 + ld b, [hl] + call MemoryGame_SampleTilePlacement + + ld c, 5 + ld hl, wMemoryGameCards + ld b, wMemoryGameCardsEnd - wMemoryGameCards +.loop + ld a, [hl] + and a + jr nz, .no_load + ld [hl], c +.no_load + inc hl + dec b + jr nz, .loop + ret + +MemoryGame_SampleTilePlacement: + push hl + ld de, wMemoryGameCards +.loop + call Random + and %00111111 + cp 45 + jr nc, .loop + ld l, a + ld h, 0 + add hl, de + ld a, [hl] + and a + jr nz, .loop + ld [hl], c + dec b + jr nz, .loop + pop hl + inc hl + ret + +MemoryGame_GetDistributionOfTiles: + ld a, [wMenuCursorY] + dec a + ld l, a + ld h, 0 + add hl, hl + add hl, hl + add hl, hl + ld de, .distributions + add hl, de + ret + +.distributions + 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 + +MemoryGame_PlaceCard: + ld a, [wMemoryGameLastCardPicked] + sla a + sla a + add 4 + ld [hli], a + inc a + ld [hld], a + inc a + ld bc, SCREEN_WIDTH + add hl, bc + ld [hli], a + inc a + ld [hl], a + ld c, 3 + call DelayFrames + ret + +MemoryGame_DeleteCard: + ld a, $1 + ld [hli], a + ld [hld], a + ld bc, SCREEN_WIDTH + add hl, bc + ld [hli], a + ld [hl], a + ld c, 3 + call DelayFrames + ret + +MemoryGame_InitStrings: + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, $1 + call ByteFill + hlcoord 0, 0 + ld de, .japstr1 + call PlaceString + hlcoord 15, 0 + ld de, .japstr2 + call PlaceString + ld hl, .dummy_text + call PrintText + ret + +.dummy_text + db "@" +.japstr1 + db "とったもの@" +.japstr2 + db "あと かい@" + +MemoryGame_Card2Coord: + ld d, 0 +.find_row + sub 9 + jr c, .found_row + inc d + jr .find_row + +.found_row + add 9 + ld e, a + hlcoord 1, 2 + ld bc, 2 * SCREEN_WIDTH +.loop2 + ld a, d + and a + jr z, .done + add hl, bc + dec d + jr .loop2 + +.done + sla e + add hl, de + ret + +MemoryGame_InterpretJoypad_AnimateCursor: + ld a, [wJumptableIndex] + cp $7 + jr nc, .quit + call JoyTextDelay + ld hl, hJoypadPressed + ld a, [hl] + and A_BUTTON + jr nz, .pressed_a + ld a, [hl] + and D_LEFT + jr nz, .pressed_left + ld a, [hl] + and D_RIGHT + jr nz, .pressed_right + ld a, [hl] + and D_UP + jr nz, .pressed_up + ld a, [hl] + and D_DOWN + jr nz, .pressed_down + ret + +.quit + ld hl, SPRITEANIMSTRUCT_INDEX + add hl, bc + ld [hl], $0 + ret + +.pressed_a + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc a + ld [wMemoryGameCardChoice], a + ret + +.pressed_left + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld a, [hl] + and a + ret z + sub 1 tiles + ld [hl], a + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + dec [hl] + ret + +.pressed_right + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld a, [hl] + cp (9 - 1) tiles + ret z + add 1 tiles + ld [hl], a + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + ret + +.pressed_up + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + and a + ret z + sub 1 tiles + ld [hl], a + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + sub 9 + ld [hl], a + ret + +.pressed_down + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + cp (5 - 1) tiles + ret z + add 1 tiles + ld [hl], a + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + add 9 + ld [hl], a + ret + +MemoryGameLZ: +INCBIN "gfx/memory_game/memory_game.2bpp.lz" diff --git a/engine/games/slot_machine.asm b/engine/games/slot_machine.asm new file mode 100644 index 0000000..0aaa636 --- /dev/null +++ b/engine/games/slot_machine.asm @@ -0,0 +1,2233 @@ +; wSlotMatched values + const_def 0, 4 + const SLOTS_SEVEN ; $00 + const SLOTS_POKEBALL ; $04 + const SLOTS_CHERRY ; $08 + const SLOTS_PIKACHU ; $0c + const SLOTS_SQUIRTLE ; $10 + const SLOTS_STARYU ; $14 +DEF NUM_SLOT_REELS EQU const_value / 4 ; 6 +DEF SLOTS_NO_MATCH EQU -1 + +; wSlotBias values +DEF SLOTS_NO_BIAS EQU -1 + +DEF REEL_SIZE EQU 15 + +; Constants for slot_reel offsets (see macros/ram.asm) +rsreset +DEF REEL_ACTION rb ; 0 +DEF REEL_TILEMAP_ADDR rw ; 1 +DEF REEL_POSITION rb ; 3 +DEF REEL_SPIN_DISTANCE rb ; 4 +DEF REEL_SPIN_RATE rb ; 5 +DEF REEL_OAM_ADDR rw ; 6 +DEF REEL_X_COORD rb ; 8 +DEF REEL_MANIP_COUNTER rb ; 9 +DEF REEL_MANIP_DELAY rb ; 10 +DEF REEL_DROP_COUNTER rb ; 11 + rb_skip 3 +DEF REEL_STOP_DELAY rb ; 15 + +; SlotsJumptable constants + const_def + const SLOTS_INIT + const SLOTS_BET_AND_START + const SLOTS_WAIT_START + const SLOTS_WAIT_REEL1 + const SLOTS_WAIT_STOP_REEL1 + const SLOTS_WAIT_REEL2 + const SLOTS_WAIT_STOP_REEL2 + const SLOTS_WAIT_REEL3 + const SLOTS_WAIT_STOP_REEL3 + const SLOTS_NEXT_09 + const SLOTS_NEXT_0A + const SLOTS_NEXT_0B + const SLOTS_FLASH_IF_WIN + const SLOTS_FLASH_SCREEN + const SLOTS_GIVE_EARNED_COINS + const SLOTS_PAYOUT_TEXT_AND_ANIM + const SLOTS_PAYOUT_ANIM + const SLOTS_RESTART_OF_QUIT + const SLOTS_QUIT +DEF SLOTS_END_LOOP_F EQU 7 + +; ReelActionJumptable constants + const_def + const REEL_ACTION_DO_NOTHING + const REEL_ACTION_STOP_REEL_IGNORE_JOYPAD + const REEL_ACTION_QUADRUPLE_RATE + const REEL_ACTION_DOUBLE_RATE + const REEL_ACTION_NORMAL_RATE + const REEL_ACTION_HALF_RATE + const REEL_ACTION_QUARTER_RATE + const REEL_ACTION_STOP_REEL1 + const REEL_ACTION_STOP_REEL2 + const REEL_ACTION_STOP_REEL3 + const REEL_ACTION_SET_UP_REEL2_SKIP_TO_7 + const REEL_ACTION_WAIT_REEL2_SKIP_TO_7 + const REEL_ACTION_FAST_SPIN_REEL2_UNTIL_LINED_UP_7S + const REEL_ACTION_UNUSED + const REEL_ACTION_CHECK_DROP_REEL + const REEL_ACTION_WAIT_DROP_REEL + const REEL_ACTION_START_SLOW_ADVANCE_REEL3 + const REEL_ACTION_WAIT_SLOW_ADVANCE_REEL3 + const REEL_ACTION_INIT_GOLEM + const REEL_ACTION_WAIT_GOLEM + const REEL_ACTION_END_GOLEM + const REEL_ACTION_INIT_CHANSEY + const REEL_ACTION_WAIT_CHANSEY + const REEL_ACTION_WAIT_EGG + const REEL_ACTION_DROP_REEL + +_SlotMachine: + ld hl, wOptions + set NO_TEXT_SCROLL, [hl] + call .InitGFX + call DelayFrame +.loop + call SlotsLoop + jr nc, .loop + call WaitSFX + ld de, SFX_QUIT_SLOTS + call PlaySFX + call WaitSFX + call ClearBGPalettes + farcall StubbedTrainerRankings_EndSlotsWinStreak + ld hl, wOptions + res NO_TEXT_SCROLL, [hl] + ld hl, rLCDC + res rLCDC_SPRITE_SIZE, [hl] ; 8x8 + ret + +.InitGFX: + call ClearBGPalettes + call ClearTilemap + call ClearSprites + ld de, MUSIC_NONE + call PlayMusic + call DelayFrame + call DisableLCD + hlbgcoord 0, 0 + ld bc, vBGMap1 - vBGMap0 + ld a, " " + call ByteFill + ld b, SCGB_SLOT_MACHINE + call GetSGBLayout + callfar ClearSpriteAnims + ld hl, wSlots + ld bc, wSlotsDataEnd - wSlots + xor a + call ByteFill + + ld hl, Slots2LZ + ld de, vTiles0 tile $00 + call Decompress + + ld hl, Slots3LZ + ld de, vTiles0 tile $40 + call Decompress + + ld hl, Slots1LZ + ld de, vTiles2 tile $00 + call Decompress + + ld hl, Slots2LZ + ld de, vTiles2 tile $25 + call Decompress + + ld hl, SlotsTilemap + decoord 0, 0 + ld bc, SCREEN_WIDTH * 12 + call CopyBytes + + ld hl, rLCDC + set rLCDC_SPRITE_SIZE, [hl] ; 8x16 + call EnableLCD + ld hl, wSlots + ld bc, wSlotsEnd - wSlots + xor a + call ByteFill + call Slots_InitReelTiles + call Slots_GetPals + ld a, SPRITE_ANIM_DICT_SLOTS + ld hl, wSpriteAnimDict + ld [hli], a + ld [hl], $40 + xor a ; SLOTS_INIT + ld [wJumptableIndex], a + ld a, SLOTS_NO_BIAS + ld [wSlotBias], a + ld de, MUSIC_GAME_CORNER + call PlayMusic + xor a + ld [wKeepSevenBiasChance], a ; 87.5% chance + call Random + and %00101010 + ret nz + ld a, TRUE + ld [wKeepSevenBiasChance], a ; 12.5% chance + ret + +Slots_GetPals: + ld a, %11100100 + call DmgToCgbBGPals + lb de, %11100100, %11100100 + ldh a, [hCGB] + and a + jr nz, .cgb + lb de, %11000000, %11100100 +.cgb + call DmgToCgbObjPals + ret + +SlotsLoop: + ld a, [wJumptableIndex] + bit SLOTS_END_LOOP_F, a + jr nz, .stop + call SlotsJumptable + call Slots_SpinReels + xor a + ld [wCurSpriteOAMAddr], a + callfar DoNextFrameForFirst16Sprites + call .PrintCoinsAndPayout + call .Stubbed_AlternateMatchingSevensPalette + call DelayFrame + and a + ret + +.stop + scf + ret + +.Stubbed_AlternateMatchingSevensPalette: +; dummied out + ret + ld a, [wReel1ReelAction] + and a + ret nz + ld a, [wReel2ReelAction] + and a + ret nz + ld a, [wFirstTwoReelsMatchingSevens] + and a + jr nz, .matching_sevens + ld a, %11100100 + call DmgToCgbBGPals + ret + +.matching_sevens + ld a, [wTextDelayFrames] + and $7 + ret nz + ldh a, [rBGP] + xor %00001100 ; alternates two palettes + call DmgToCgbBGPals + ret + +.PrintCoinsAndPayout: + hlcoord 5, 1 + ld de, wCoins + lb bc, PRINTNUM_LEADINGZEROS | 2, 4 + call PrintNum + hlcoord 11, 1 + ld de, wPayout + lb bc, PRINTNUM_LEADINGZEROS | 2, 4 + call PrintNum + ret + +DebugPrintSlotBias: ; unreferenced + ld a, [wSlotBias] + add 0 + daa + ld e, a + and $f + add "0" + hlcoord 1, 0 + ld [hl], a + ld a, e + swap a + and $f + add "0" + hlcoord 0, 0 + ld [hl], a + ret + +AnimateSlotReelIcons: ; unreferenced +; This animation was present in pokegold-spaceworld. + ld hl, wUnusedSlotReelIconDelay + ld a, [hl] + inc [hl] + and $7 + ret nz + ld hl, wShadowOAMSprite16TileID + ld c, NUM_SPRITE_OAM_STRUCTS - 16 +.loop + ld a, [hl] + xor $20 ; alternate between $00-$1f and $20-$3f + ld [hli], a ; tile id +rept SPRITEOAMSTRUCT_LENGTH - 1 + inc hl +endr + dec c + jr nz, .loop + ret + +SlotsJumptable: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + dw SlotsAction_Init ; 00 + dw SlotsAction_BetAndStart ; 01 + dw SlotsAction_WaitStart ; 02 + dw SlotsAction_WaitReel1 ; 03 + dw SlotsAction_WaitStopReel1 ; 04 + dw SlotsAction_WaitReel2 ; 05 + dw SlotsAction_WaitStopReel2 ; 06 + dw SlotsAction_WaitReel3 ; 07 + dw SlotsAction_WaitStopReel3 ; 08 + dw SlotsAction_Next ; 09 + dw SlotsAction_Next ; 0a + dw SlotsAction_Next ; 0b + dw SlotsAction_FlashIfWin ; 0c + dw SlotsAction_FlashScreen ; 0d + dw SlotsAction_GiveEarnedCoins ; 0e + dw SlotsAction_PayoutTextAndAnim ; 0f + dw SlotsAction_PayoutAnim ; 10 + dw SlotsAction_RestartOrQuit ; 11 + dw SlotsAction_Quit ; 12 + +SlotsAction_Next: + ld hl, wJumptableIndex + inc [hl] + ret + +SlotsAction_Init: + call SlotsAction_Next + xor a + ld [wFirstTwoReelsMatching], a + ld [wFirstTwoReelsMatchingSevens], a + ld a, SLOTS_NO_MATCH + ld [wSlotMatched], a + ret + +SlotsAction_BetAndStart: + call Slots_AskBet + jr nc, .proceed + ld a, SLOTS_QUIT + ld [wJumptableIndex], a + ret + +.proceed + call SlotsAction_Next + call Slots_IlluminateBetLights + call Slots_InitBias + ld a, 32 + ld [wSlotsDelay], a + ld a, REEL_ACTION_NORMAL_RATE + ld [wReel1ReelAction], a + ld [wReel2ReelAction], a + ld [wReel3ReelAction], a + ld a, 4 + ld [wReel1ManipCounter], a + ld [wReel2ManipCounter], a + ld [wReel3ManipCounter], a + call WaitSFX + ld a, SFX_SLOT_MACHINE_START + call Slots_PlaySFX + ret + +SlotsAction_WaitStart: + ld hl, wSlotsDelay + ld a, [hl] + and a + jr z, .proceed + dec [hl] + ret + +.proceed + call SlotsAction_Next + xor a + ldh [hJoypadSum], a + ret + +SlotsAction_WaitReel1: + ld hl, hJoypadSum + ld a, [hl] + and A_BUTTON + ret z + call SlotsAction_Next + call Slots_StopReel1 + ld [wReel1ReelAction], a +SlotsAction_WaitStopReel1: + ld a, [wReel1ReelAction] + cp REEL_ACTION_DO_NOTHING + ret nz + ld a, SFX_STOP_SLOT + call Slots_PlaySFX + ld bc, wReel1 + ld de, wReel1Stopped + call Slots_LoadReelState + call SlotsAction_Next + xor a + ldh [hJoypadSum], a +SlotsAction_WaitReel2: + ld hl, hJoypadSum + ld a, [hl] + and A_BUTTON + ret z + call SlotsAction_Next + call Slots_StopReel2 + ld [wReel2ReelAction], a +SlotsAction_WaitStopReel2: + ld a, [wReel2ReelAction] + cp REEL_ACTION_DO_NOTHING + ret nz + ld a, SFX_STOP_SLOT + call Slots_PlaySFX + ld bc, wReel2 + ld de, wReel2Stopped + call Slots_LoadReelState + call SlotsAction_Next + xor a + ldh [hJoypadSum], a +SlotsAction_WaitReel3: + ld hl, hJoypadSum + ld a, [hl] + and A_BUTTON + ret z + call SlotsAction_Next + call Slots_StopReel3 + ld [wReel3ReelAction], a +SlotsAction_WaitStopReel3: + ld a, [wReel3ReelAction] + cp REEL_ACTION_DO_NOTHING + ret nz + ld a, SFX_STOP_SLOT + call Slots_PlaySFX + ld bc, wReel3 + ld de, wReel3Stopped + call Slots_LoadReelState + call SlotsAction_Next + xor a + ldh [hJoypadSum], a + ret + +SlotsAction_FlashIfWin: + ld a, [wSlotMatched] + cp SLOTS_NO_MATCH + jr nz, .GotIt + call SlotsAction_Next + call SlotsAction_Next + ret + +.GotIt: + call SlotsAction_Next + ld a, 16 + ld [wSlotsDelay], a +SlotsAction_FlashScreen: + ld hl, wSlotsDelay + ld a, [hl] + and a + jr z, .done + dec [hl] + srl a + ret z + + ldh a, [rOBP0] + xor $ff + ld e, a + ld d, a + call DmgToCgbObjPals + ret + +.done + call Slots_GetPals + call SlotsAction_Next + ret + +SlotsAction_GiveEarnedCoins: + xor a + ld [wFirstTwoReelsMatching], a + ld [wFirstTwoReelsMatchingSevens], a + ld a, %11100100 + call DmgToCgbBGPals + call Slots_GetPayout + xor a + ld [wSlotsDelay], a + call SlotsAction_Next + ret + +SlotsAction_PayoutTextAndAnim: + call Slots_PayoutText + call SlotsAction_Next +SlotsAction_PayoutAnim: + ld hl, wSlotsDelay + ld a, [hl] + inc [hl] + and $1 + ret z + ld hl, wPayout + ld a, [hli] + ld d, a + or [hl] + jr z, .done + ld e, [hl] + dec de + ld [hl], e + dec hl + ld [hl], d + ld hl, wCoins + ld d, [hl] + inc hl + ld e, [hl] + call Slots_CheckCoinCaseFull + jr c, .okay + inc de +.okay +; BUG: Slot machine payout sound effects cut each other off (see docs/bugs_and_glitches.md) + ld [hl], e + dec hl + ld [hl], d + ld a, [wSlotsDelay] + and $7 + ret z + ld de, SFX_GET_COIN_FROM_SLOTS + call PlaySFX + ret + +.done + call SlotsAction_Next + ret + +SlotsAction_RestartOrQuit: + call Slots_DeilluminateBetLights + call WaitPressAorB_BlinkCursor + call Slots_AskPlayAgain + jr c, .exit_slots + ld a, SLOTS_INIT + ld [wJumptableIndex], a + ret + +.exit_slots + ld a, SLOTS_QUIT + ld [wJumptableIndex], a + ret + +SlotsAction_Quit: + ld hl, wJumptableIndex + set SLOTS_END_LOOP_F, [hl] + ret + +Slots_LoadReelState: + push de + call Slots_GetCurrentReelState + pop de + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + ret + +Slots_CheckCoinCaseFull: + ld a, d + cp HIGH(MAX_COINS) + jr c, .not_full + ld a, e + cp LOW(MAX_COINS) + jr c, .not_full + scf + ret + +.not_full + and a + ret + +Slots_GetCurrentReelState: + ld hl, REEL_POSITION + add hl, bc + ld a, [hl] + and a + jr nz, .okay + ld a, $f +.okay + dec a + and $f + ld e, a + ld d, 0 + ld hl, REEL_TILEMAP_ADDR + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + ret + +Slots_StopReel1: +; Always set the REEL_ACTION_STOP_REEL1 action. + ld a, REEL_ACTION_STOP_REEL1 + ret + +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 +; - There's a 7 symbol visible in reel #1 +; - Current spin isn't biased or is biased towards SEVEN +; In any other case, REEL_ACTION_STOP_REEL2 is set. + + ld a, [wSlotBet] + cp $2 + jr c, .dont_jump + ld a, [wSlotBias] + and a + jr z, .skip + cp SLOTS_NO_BIAS + jr nz, .dont_jump +.skip + call .CheckReel1ForASeven + jr nz, .dont_jump + call Random + cp 31 percent + 1 + jr nc, .dont_jump + ld a, REEL_ACTION_SET_UP_REEL2_SKIP_TO_7 + ret + +.dont_jump + ld a, REEL_ACTION_STOP_REEL2 + ret + +.CheckReel1ForASeven: + ld a, [wReel1Stopped] + and a + ret z + ld a, [wReel1Stopped + 1] + and a + ret z + ld a, [wReel1Stopped + 2] + and a + ret + +Slots_StopReel3: +; If no matching SEVEN symbols in reels #1 and #2: +; - REEL_ACTION_STOP_REEL3, 100% + +; If matching SEVEN symbols and NO bias to SEVEN: +; - REEL_ACTION_STOP_REEL3, 37.5% +; - REEL_ACTION_START_SLOW_ADVANCE_REEL3, 31.3% +; - REEL_ACTION_INIT_GOLEM, 31.3% +; - REEL_ACTION_INIT_CHANSEY, 0% + +; If matching SEVEN symbols and bias to SEVEN: +; - REEL_ACTION_STOP_REEL3, 29.7% +; - REEL_ACTION_START_SLOW_ADVANCE_REEL3, 23.4% +; - REEL_ACTION_INIT_GOLEM, 23.4% +; - REEL_ACTION_INIT_CHANSEY, 23.4% + + ld a, [wFirstTwoReelsMatching] + and a + jr z, .stop + ld a, [wFirstTwoReelsMatchingSevens] + and a + jr z, .stop + ld a, [wSlotBias] + and a + jr nz, .biased + call Random + cp 71 percent - 1 + jr nc, .stop + cp 47 percent + 1 + jr nc, .slow_advance + cp 24 percent - 1 + jr nc, .golem + ld a, REEL_ACTION_INIT_CHANSEY + ret + +.biased + call Random + cp 63 percent + jr nc, .stop + cp 31 percent + 1 + jr nc, .slow_advance +.golem + ld a, REEL_ACTION_INIT_GOLEM + ret + +.slow_advance + ld a, REEL_ACTION_START_SLOW_ADVANCE_REEL3 + ret + +.stop + ld a, REEL_ACTION_STOP_REEL3 + ret + +Slots_InitReelTiles: + ld bc, wReel1 + ld hl, REEL_OAM_ADDR + add hl, bc + ld de, wShadowOAMSprite16 + ld [hl], e + inc hl + ld [hl], d + ld hl, REEL_TILEMAP_ADDR + add hl, bc + ld de, Reel1Tilemap + ld [hl], e + inc hl + ld [hl], d + ld hl, REEL_X_COORD + add hl, bc + ld [hl], 6 * 8 + call .OAM + + ld bc, wReel2 + ld hl, REEL_OAM_ADDR + add hl, bc + ld de, wShadowOAMSprite24 + ld [hl], e + inc hl + ld [hl], d + ld hl, REEL_TILEMAP_ADDR + add hl, bc + ld de, Reel2Tilemap + ld [hl], e + inc hl + ld [hl], d + ld hl, REEL_X_COORD + add hl, bc + ld [hl], 10 * 8 + call .OAM + + ld bc, wReel3 + ld hl, REEL_OAM_ADDR + add hl, bc + ld de, wShadowOAMSprite32 + ld [hl], e + inc hl + ld [hl], d + ld hl, REEL_TILEMAP_ADDR + add hl, bc + ld de, Reel3Tilemap + ld [hl], e + inc hl + ld [hl], d + ld hl, REEL_X_COORD + add hl, bc + ld [hl], 14 * 8 + call .OAM + ret + +.OAM: + ld hl, REEL_ACTION + add hl, bc + ld [hl], REEL_ACTION_DO_NOTHING + ld hl, REEL_POSITION + add hl, bc + ld [hl], REEL_SIZE - 1 + ld hl, REEL_SPIN_DISTANCE + add hl, bc + ld [hl], REEL_ACTION_DO_NOTHING + call Slots_UpdateReelPositionAndOAM + ret + +Slots_SpinReels: + ld bc, wReel1 + call .SpinReel + ld bc, wReel2 + call .SpinReel + ld bc, wReel3 + call .SpinReel + ret + +.SpinReel: + ld hl, REEL_SPIN_DISTANCE + add hl, bc + ld a, [hl] + and $f + jr nz, .skip + call ReelActionJumptable +.skip + ld hl, REEL_SPIN_RATE + add hl, bc + ld a, [hl] + and a + ret z + ld d, a + ld hl, REEL_SPIN_DISTANCE + add hl, bc + add [hl] + ld [hl], a + and $f + jr z, Slots_UpdateReelPositionAndOAM + ld hl, REEL_OAM_ADDR + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld e, $8 +.loop + ld a, [hl] + add d + ld [hli], a + inc hl + inc hl + inc hl + dec e + jr nz, .loop + ret + +Slots_UpdateReelPositionAndOAM: + ld hl, REEL_X_COORD + add hl, bc + ld a, [hl] + ld [wCurReelXCoord], a + ld a, 10 * 8 + ld [wCurReelYCoord], a + ld hl, REEL_POSITION + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, REEL_TILEMAP_ADDR + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + ld e, l + ld d, h + call .LoadOAM + ld hl, REEL_POSITION + add hl, bc + ld a, [hl] + inc a + and $f + cp REEL_SIZE + jr nz, .load + xor a +.load + ld [hl], a + ret + +.LoadOAM: + ld hl, REEL_OAM_ADDR + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a +.loop + ld a, [wCurReelYCoord] + ld [hli], a ; y + ld a, [wCurReelXCoord] + ld [hli], a ; x + ld a, [de] + ld [hli], a ; tile id + srl a + srl a + set OAM_PRIORITY, a + ld [hli], a ; attributes + + ld a, [wCurReelYCoord] + ld [hli], a ; y + ld a, [wCurReelXCoord] + add 1 * TILE_WIDTH + ld [hli], a ; x + ld a, [de] + inc a + inc a + ld [hli], a ; tile id + srl a + srl a + set OAM_PRIORITY, a + ld [hli], a ; attributes + inc de + ld a, [wCurReelYCoord] + sub 2 * TILE_WIDTH + ld [wCurReelYCoord], a + cp 2 * TILE_WIDTH + jr nz, .loop + ret + +GetUnknownSlotReelData: ; unreferenced +; Used to get OAM attribute values for slot reels? +; (final Slots_UpdateReelPositionAndOAM above reuses tile IDs as OAM palettes) + push hl + srl a + srl a + add LOW(.data) + ld l, a + ld a, 0 + adc HIGH(.data) + ld h, a + ld a, [hl] + pop hl + ret + +.data: + table_width 1, GetUnknownSlotReelData.data + db 0 ; SLOTS_SEVEN + db 1 ; SLOTS_POKEBALL + db 2 ; SLOTS_CHERRY + db 3 ; SLOTS_PIKACHU + db 4 ; SLOTS_SQUIRTLE + db 5 ; SLOTS_STARYU + assert_table_length NUM_SLOT_REELS + +ReelActionJumptable: + ld hl, REEL_ACTION + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: + dw ReelAction_DoNothing ; 00 + dw ReelAction_StopReelIgnoreJoypad ; 01 + dw ReelAction_QuadrupleRate ; 02 + dw ReelAction_DoubleRate ; 03 + dw ReelAction_NormalRate ; 04 + dw ReelAction_HalfRate ; 05 + dw ReelAction_QuarterRate ; 06 + dw ReelAction_StopReel1 ; 07 + dw ReelAction_StopReel2 ; 08 + dw ReelAction_StopReel3 ; 09 + dw ReelAction_SetUpReel2SkipTo7 ; 0a + dw ReelAction_WaitReel2SkipTo7 ; 0b + dw ReelAction_FastSpinReel2UntilLinedUp7s ; 0c + dw ReelAction_Unused ; 0d + dw ReelAction_CheckDropReel ; 0e + dw ReelAction_WaitDropReel ; 0f + dw ReelAction_StartSlowAdvanceReel3 ; 10 + dw ReelAction_WaitSlowAdvanceReel3 ; 11 + dw ReelAction_InitGolem ; 12 + dw ReelAction_WaitGolem ; 13 + dw ReelAction_EndGolem ; 14 + dw ReelAction_InitChansey ; 15 + dw ReelAction_WaitChansey ; 16 + dw ReelAction_WaitEgg ; 17 + dw ReelAction_DropReel ; 18 + +ReelAction_DoNothing: + ret + +ReelAction_QuadrupleRate: + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 16 + ret + +ReelAction_DoubleRate: + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 8 + ret + +ReelAction_NormalRate: + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 4 + ret + +ReelAction_HalfRate: + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 2 + ret + +ReelAction_QuarterRate: + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 1 + ret + +Slots_StopReel: + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 0 + ld hl, REEL_ACTION + add hl, bc + ld [hl], REEL_ACTION_STOP_REEL_IGNORE_JOYPAD + ld hl, REEL_STOP_DELAY + add hl, bc + ld [hl], 3 +ReelAction_StopReelIgnoreJoypad: + ld hl, REEL_STOP_DELAY + add hl, bc + ld a, [hl] + and a + jr z, .EndReel + dec [hl] + ret + +.EndReel: + ld hl, REEL_ACTION + add hl, bc + ld a, REEL_ACTION_DO_NOTHING + ld [hl], a + ret + +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, +; even if the current bet won't allow lining it up. + + ld a, [wSlotBias] + cp SLOTS_NO_BIAS + jr z, .NoBias + ld hl, REEL_MANIP_COUNTER + add hl, bc + ld a, [hl] + and a + jr z, .NoBias + dec [hl] + call .CheckForBias + ret nz +.NoBias: + call Slots_StopReel + ret + +.CheckForBias: + call Slots_GetCurrentReelState + ld a, [wSlotBias] + ld e, a + ld a, [hli] + cp e + ret z + ld a, [hli] + cp e + ret z + ld a, [hl] + cp e + ret + +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 +; reels, according to the lines that the current bet allows. + + call Slots_CheckMatchedFirstTwoReels + jr nc, .nope + ld a, [wSlotBuildingMatch] + ld hl, wSlotBias + cp [hl] + jr z, .NoBias +.nope + ld a, [wSlotBias] + cp SLOTS_NO_BIAS + jr z, .NoBias + ld hl, REEL_MANIP_COUNTER + add hl, bc + ld a, [hl] + and a + jr z, .NoBias + dec [hl] + ret + +.NoBias: + call Slots_StopReel + ret + +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. + + call Slots_CheckMatchedAllThreeReels + jr nc, .NoMatch + ld hl, wSlotBias + cp [hl] + jr z, .NoBias + ld hl, REEL_MANIP_COUNTER + add hl, bc + ld a, [hl] + and a + ret z + dec [hl] + ret + +.NoMatch: + ld a, [wSlotBias] + cp SLOTS_NO_BIAS + jr z, .NoBias + ld hl, REEL_MANIP_COUNTER + add hl, bc + ld a, [hl] + and a + jr z, .NoBias + dec [hl] + ret + +.NoBias: + call Slots_StopReel + ret + +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 +; it makes exciting reel #3 modes with no success hope more common. + + call Slots_CheckMatchedFirstTwoReels + jr nc, .no_match + ld a, [wFirstTwoReelsMatchingSevens] + and a + jr z, .no_match + call Slots_StopReel + ret + +.no_match + ld a, SFX_STOP_SLOT + call Slots_PlaySFX + ld hl, REEL_ACTION + add hl, bc + inc [hl] ; REEL_ACTION_WAIT_REEL2_SKIP_TO_7 + ld hl, REEL_MANIP_DELAY + add hl, bc + ld [hl], 32 + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 0 + ret + +ReelAction_WaitReel2SkipTo7: + ld hl, REEL_MANIP_DELAY + add hl, bc + ld a, [hl] + and a + jr z, .ready + dec [hl] + ret + +.ready + ld a, SFX_THROW_BALL + call Slots_PlaySFX + ld hl, REEL_ACTION + add hl, bc + inc [hl] ; REEL_ACTION_FAST_SPIN_REEL2_UNTIL_LINED_UP_7S + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 8 + ret + +ReelAction_FastSpinReel2UntilLinedUp7s: + call Slots_CheckMatchedFirstTwoReels + ret nc + ld a, [wFirstTwoReelsMatchingSevens] + and a + ret z + call Slots_StopReel + ret + +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. + +; This is achieved by throwing Golem until the desired result +; is produced. The amount of Golem thrown can be anywhere from +; 1 to 14 for SEVEN bias, and 4-8 for no bias. + + call Slots_CheckMatchedAllThreeReels + ret c + ld a, SFX_STOP_SLOT + call Slots_PlaySFX + call Slots_WaitSFX + ld hl, REEL_ACTION + add hl, bc + inc [hl] ; REEL_ACTION_WAIT_GOLEM + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 0 + call Slots_GetNumberOfGolems + push bc + push af + depixel 12, 13 + ld a, SPRITE_ANIM_INDEX_SLOTS_GOLEM + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + pop af + ld [hl], a + pop bc + xor a + ld [wSlotsDelay], a +ReelAction_WaitGolem: + ld a, [wSlotsDelay] + cp 2 + jr z, .two + cp 1 + jr z, .one + ret + +.two + call Slots_CheckMatchedAllThreeReels + call Slots_StopReel + ret + +.one + ld hl, REEL_ACTION + add hl, bc + inc [hl] ; REEL_ACTION_END_GOLEM + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 8 + ret + +ReelAction_EndGolem: + xor a + ld [wSlotsDelay], a + ld hl, REEL_ACTION + add hl, bc + dec [hl] ; REEL_ACTION_WAIT_GOLEM + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 0 + ret + +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 +; quickly as many times as necessary for the match to SEVENs to show up. + + call Slots_CheckMatchedAllThreeReels + ret c + ld a, SFX_STOP_SLOT + call Slots_PlaySFX + call Slots_WaitSFX + ld hl, REEL_ACTION + add hl, bc + inc [hl] ; REEL_ACTION_WAIT_CHANSEY + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 0 + push bc + depixel 12, 0 + ld a, SPRITE_ANIM_INDEX_SLOTS_CHANSEY + call InitSpriteAnimStruct + pop bc + xor a + ld [wSlotsDelay], a + ret + +ReelAction_WaitChansey: + ld a, [wSlotsDelay] + and a + ret z + ld hl, REEL_ACTION + add hl, bc + inc [hl] ; REEL_ACTION_WAIT_EGG + ld a, 2 + ld [wSlotsDelay], a +ReelAction_WaitEgg: + ld a, [wSlotsDelay] + cp $4 + ret c + ld hl, REEL_ACTION + add hl, bc + inc [hl] ; REEL_ACTION_DROP_REEL + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 16 + ld hl, REEL_MANIP_DELAY + add hl, bc + ld [hl], 17 +ReelAction_DropReel: + ld hl, REEL_MANIP_DELAY + add hl, bc + ld a, [hl] + and a + jr z, .check_match + dec [hl] + ret + +.check_match + call Slots_CheckMatchedAllThreeReels + jr nc, .EggAgain + and a + jr nz, .EggAgain + ld a, 5 + ld [wSlotsDelay], a + call Slots_StopReel + ret + +.EggAgain: + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 0 + ld hl, REEL_ACTION + add hl, bc + dec [hl] + dec [hl] ; REEL_ACTION_WAIT_CHANSEY + ld a, 1 + ld [wSlotsDelay], a + ret + +ReelAction_Unused: + call Slots_CheckMatchedAllThreeReels + ret c + ld a, SFX_STOP_SLOT + call Slots_PlaySFX + call Slots_WaitSFX + ld hl, REEL_ACTION + add hl, bc + inc [hl] ; REEL_ACTION_CHECK_DROP_REEL + call Slots_GetNumberOfGolems + ld hl, REEL_MANIP_DELAY + add hl, bc + ld [hl], a +ReelAction_CheckDropReel: + ld hl, REEL_MANIP_DELAY + add hl, bc + ld a, [hl] + and a + jr nz, .spin + call Slots_CheckMatchedAllThreeReels + call Slots_StopReel + ret + +.spin + dec [hl] + ld hl, REEL_ACTION + add hl, bc + inc [hl] ; REEL_ACTION_WAIT_DROP_REEL + ld hl, REEL_DROP_COUNTER + add hl, bc + ld [hl], 32 + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 0 +ReelAction_WaitDropReel: + ld hl, REEL_DROP_COUNTER + add hl, bc + ld a, [hl] + and a + jr z, .DropReel + dec [hl] + ret + +.DropReel: + ld hl, REEL_ACTION + add hl, bc + dec [hl] ; REEL_ACTION_CHECK_DROP_REEL + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 8 + ret + +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. + +; This is achieved by slowly advancing the reel a full round, +; plus any necessary slot until the desired result is produced. + + call Slots_CheckMatchedAllThreeReels + ret c + ld a, SFX_STOP_SLOT + call Slots_PlaySFX + call Slots_WaitSFX + ld hl, REEL_SPIN_RATE + add hl, bc + ld [hl], 1 + ld hl, REEL_ACTION + add hl, bc + inc [hl] ; REEL_ACTION_WAIT_SLOW_ADVANCE_REEL3 + ld hl, REEL_MANIP_DELAY + add hl, bc + ld [hl], 16 +ReelAction_WaitSlowAdvanceReel3: + ld hl, REEL_MANIP_DELAY + add hl, bc + ld a, [hl] + and a + jr z, .check1 + dec [hl] +.play_sfx + ld a, SFX_GOT_SAFARI_BALLS + call Slots_PlaySFX + ret + +.check1 + ld a, [wSlotBias] + and a + jr nz, .check2 + call Slots_CheckMatchedAllThreeReels + jr nc, .play_sfx + and a + jr nz, .play_sfx + call Slots_StopReel + call WaitSFX + ret + +.check2 + call Slots_CheckMatchedAllThreeReels + jr c, .play_sfx + call Slots_StopReel + call WaitSFX + ret + +Slots_CheckMatchedFirstTwoReels: + xor a + ld [wFirstTwoReelsMatching], a + ld [wFirstTwoReelsMatchingSevens], a + call Slots_GetCurrentReelState + call Slots_CopyReelState + ld a, [wSlotBet] + and 3 + ld e, a + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .return + push de + jp hl + +.return + ld a, [wFirstTwoReelsMatching] + and a + ret z + scf + ret + +.Jumptable: + dw .zero + dw .one + dw .two + dw .three + +.three + call .CheckUpwardsDiag + call .CheckDownwardsDiag + +.two + call .CheckBottomRow + call .CheckTopRow + +.one + call .CheckMiddleRow + +.zero + ret + +.CheckBottomRow: + ld hl, wCurReelStopped + ld a, [wReel1Stopped] + cp [hl] + call z, .StoreResult + ret + +.CheckUpwardsDiag: + ld hl, wCurReelStopped + 1 + ld a, [wReel1Stopped] + cp [hl] + call z, .StoreResult + ret + +.CheckMiddleRow: + ld hl, wCurReelStopped + 1 + ld a, [wReel1Stopped + 1] + cp [hl] + call z, .StoreResult + ret + +.CheckDownwardsDiag: + ld hl, wCurReelStopped + 1 + ld a, [wReel1Stopped + 2] + cp [hl] + call z, .StoreResult + ret + +.CheckTopRow: + ld hl, wCurReelStopped + 2 + ld a, [wReel1Stopped + 2] + cp [hl] + call z, .StoreResult + ret + +.StoreResult: + ld [wSlotBuildingMatch], a + and a + jr nz, .matching_sevens + ld a, 1 + ld [wFirstTwoReelsMatchingSevens], a + +.matching_sevens + ld a, 1 + ld [wFirstTwoReelsMatching], a + ret + +Slots_CheckMatchedAllThreeReels: + ld a, SLOTS_NO_MATCH + ld [wSlotMatched], a + call Slots_GetCurrentReelState + call Slots_CopyReelState + ld a, [wSlotBet] + and 3 + ld e, a + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .return + push de + jp hl + +.return + ld a, [wSlotMatched] + cp SLOTS_NO_MATCH + jr nz, .matched_nontrivial + and a + ret + +.matched_nontrivial + scf + ret + +.Jumptable: + dw .zero + dw .one + dw .two + dw .three + +.three + call .CheckUpwardsDiag + call .CheckDownwardsDiag + +.two + call .CheckBottomRow + call .CheckTopRow + +.one + call .CheckMiddleRow + +.zero + ret + +.CheckBottomRow: + ld hl, wCurReelStopped + ld a, [wReel1Stopped] + cp [hl] + ret nz + ld hl, wReel2Stopped + cp [hl] + call z, .StoreResult + ret + +.CheckUpwardsDiag: + ld hl, wCurReelStopped + 2 + ld a, [wReel1Stopped] + cp [hl] + ret nz + ld hl, wReel2Stopped + 1 + cp [hl] + call z, .StoreResult + ret + +.CheckMiddleRow: + ld hl, wCurReelStopped + 1 + ld a, [wReel1Stopped + 1] + cp [hl] + ret nz + ld hl, wReel2Stopped + 1 + cp [hl] + call z, .StoreResult + ret + +.CheckDownwardsDiag: + ld hl, wCurReelStopped + ld a, [wReel1Stopped + 2] + cp [hl] + ret nz + ld hl, wReel2Stopped + 1 + cp [hl] + call z, .StoreResult + ret + +.CheckTopRow: + ld hl, wCurReelStopped + 2 + ld a, [wReel1Stopped + 2] + cp [hl] + ret nz + ld hl, wReel2Stopped + 2 + cp [hl] + call z, .StoreResult + ret + +.StoreResult: + ld [wSlotMatched], a + ret + +Slots_CopyReelState: + ld de, wCurReelStopped + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + ret + +Slots_GetNumberOfGolems: + ld hl, REEL_POSITION + add hl, bc + ld a, [hl] + push af + push hl + call .Check7Bias + pop hl + pop af + ld [hl], a + ld a, e + ret + +.Check7Bias: + ld a, [wSlotBias] + and a + jr nz, .not_biased_to_seven + ld e, $0 +.loop1 + ld hl, REEL_POSITION + add hl, bc + inc [hl] + inc e + push de + call Slots_CheckMatchedAllThreeReels + pop de + jr nc, .loop1 + and a + jr nz, .loop1 + ret + +.not_biased_to_seven + call Random + and $7 + cp $8 / 2 ; 50% + jr c, .not_biased_to_seven + ld e, a +.loop2 + ld a, e + inc e + ld hl, REEL_POSITION + add hl, bc + add [hl] + ld [hl], a + push de + call Slots_CheckMatchedAllThreeReels + pop de + jr c, .loop2 + ret + +Slots_InitBias: + ld a, [wSlotBias] + and a + ret z + ld hl, .Normal + ld a, [wScriptVar] + and a + jr z, .okay + ld hl, .Lucky +.okay + call Random + ld c, a +.loop + ld a, [hli] + cp c + jr nc, .done + inc hl + jr .loop + +.done + ld a, [hl] + ld [wSlotBias], a + ret + +.Normal: + db 1 percent - 1, SLOTS_SEVEN + db 1 percent + 1, SLOTS_POKEBALL + db 4 percent, SLOTS_STARYU + db 8 percent, SLOTS_SQUIRTLE + db 16 percent, SLOTS_PIKACHU + db 19 percent, SLOTS_CHERRY + db 100 percent, SLOTS_NO_BIAS + +.Lucky: + db 1 percent, SLOTS_SEVEN + db 1 percent + 1, SLOTS_POKEBALL + db 3 percent + 1, SLOTS_STARYU + db 6 percent + 1, SLOTS_SQUIRTLE + db 12 percent, SLOTS_PIKACHU + db 31 percent + 1, SLOTS_CHERRY + db 100 percent, SLOTS_NO_BIAS + +Slots_IlluminateBetLights: + ld b, $14 ; turned on + ld a, [wSlotBet] + dec a + jr z, Slots_Lights1OnOff + dec a + jr z, Slots_Lights2OnOff + jr Slots_Lights3OnOff + +Slots_DeilluminateBetLights: + ld b, $23 ; turned off +Slots_Lights3OnOff: + hlcoord 3, 2 + call Slots_TurnLightsOnOrOff + hlcoord 3, 10 + call Slots_TurnLightsOnOrOff +Slots_Lights2OnOff: + hlcoord 3, 4 + call Slots_TurnLightsOnOrOff + hlcoord 3, 8 + call Slots_TurnLightsOnOrOff +Slots_Lights1OnOff: + hlcoord 3, 6 + +Slots_TurnLightsOnOrOff: + ld a, b + ld [hl], a + ld de, SCREEN_WIDTH / 2 + 3 + add hl, de + ld [hl], a + ld de, SCREEN_WIDTH / 2 - 3 + add hl, de + inc a + ld [hl], a + ld de, SCREEN_WIDTH / 2 + 3 + add hl, de + ld [hl], a + ret + +Slots_AskBet: +.loop + ld hl, .SlotsBetHowManyCoinsText + call PrintText + ld hl, .MenuHeader + call LoadMenuHeader + call VerticalMenu + call CloseWindow + ret c + ld a, [wMenuCursorY] + ld b, a + ld a, 4 + sub b + ld [wSlotBet], a + ld hl, wCoins + ld c, a + ld a, [hli] + and a + jr nz, .Start + ld a, [hl] + cp c + jr nc, .Start + ld hl, .SlotsNotEnoughCoinsText + call PrintText + jr .loop + +.Start: + ld hl, wCoins + 1 + ld a, [hl] + sub c + ld [hld], a + jr nc, .ok + dec [hl] +.ok + call WaitSFX + ld de, SFX_PAY_DAY + call PlaySFX + ld hl, .SlotsStartText + call PrintText + and a + ret + +.SlotsBetHowManyCoinsText: + text_far _SlotsBetHowManyCoinsText + text_end + +.SlotsStartText: + text_far _SlotsStartText + text_end + +.SlotsNotEnoughCoinsText: + text_far _SlotsNotEnoughCoinsText + text_end + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 14, 10, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 3 ; items + db " 3@" + db " 2@" + db " 1@" + +Slots_AskPlayAgain: + ld hl, wCoins + ld a, [hli] + or [hl] + jr nz, .you_have_coins + ld hl, .SlotsRanOutOfCoinsText + call PrintText + ld c, 60 + call DelayFrames + jr .exit_slots + +.you_have_coins + ld hl, .SlotsPlayAgainText + call PrintText + call LoadMenuTextbox + lb bc, 14, 12 + call PlaceYesNoBox + ld a, [wMenuCursorY] + dec a + call CloseWindow + and a + jr nz, .exit_slots + and a + ret + +.exit_slots + scf + ret + +.SlotsRanOutOfCoinsText: + text_far _SlotsRanOutOfCoinsText + text_end + +.SlotsPlayAgainText: + text_far _SlotsPlayAgainText + text_end + +Slots_GetPayout: + ld a, [wSlotMatched] + cp SLOTS_NO_MATCH + jr z, .no_win + srl a + ld e, a + ld d, 0 + ld hl, .PayoutTable + add hl, de + ld a, [hli] + ld [wPayout + 1], a + ld e, a + ld a, [hl] + ld [wPayout], a + ld d, a + farcall StubbedTrainerRankings_AddToSlotsPayouts + ret + +.PayoutTable: + table_width 2, Slots_GetPayout.PayoutTable + dw 300 ; SLOTS_SEVEN + dw 50 ; SLOTS_POKEBALL + dw 6 ; SLOTS_CHERRY + dw 8 ; SLOTS_PIKACHU + dw 10 ; SLOTS_SQUIRTLE + dw 15 ; SLOTS_STARYU + assert_table_length NUM_SLOT_REELS + +.no_win + ld hl, wPayout + xor a + ld [hli], a + ld [hl], a + ret + +Slots_PayoutText: + ld a, [wSlotMatched] + cp SLOTS_NO_MATCH + jr nz, .MatchedSomething + ld hl, .SlotsDarnText + call PrintText + farcall StubbedTrainerRankings_EndSlotsWinStreak + ret + +.MatchedSomething: + srl a + ld e, a + ld d, 0 + ld hl, .PayoutStrings + add hl, de + add hl, de + add hl, de + ld de, wStringBuffer2 + ld bc, 4 + call CopyBytes + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .return + push de + jp hl + +.return + ld hl, .Text_PrintPayout + call PrintText + farcall StubbedTrainerRankings_AddToSlotsWinStreak + ret + +.PayoutStrings: + table_width 6, Slots_PayoutText.PayoutStrings + dbw "300@", .LinedUpSevens ; SLOTS_SEVEN + dbw "50@@", .LinedUpPokeballs ; SLOTS_POKEBALL + dbw "6@@@", .LinedUpMonOrCherry ; SLOTS_CHERRY + dbw "8@@@", .LinedUpMonOrCherry ; SLOTS_PIKACHU + dbw "10@@", .LinedUpMonOrCherry ; SLOTS_SQUIRTLE + dbw "15@@", .LinedUpMonOrCherry ; SLOTS_STARYU + assert_table_length NUM_SLOT_REELS + +.Text_PrintPayout: + text_asm + ld a, [wSlotMatched] + add $25 + ldcoord_a 2, 13 + inc a + ldcoord_a 2, 14 + inc a + ldcoord_a 3, 13 + inc a + ldcoord_a 3, 14 + hlcoord 18, 17 + ld [hl], "▼" + ld hl, .SlotsLinedUpText +rept 4 + inc bc +endr + ret + +.SlotsLinedUpText: + text_far _SlotsLinedUpText + text_end + +.SlotsDarnText: + text_far _SlotsDarnText + text_end + +.LinedUpSevens: + ld a, SFX_2ND_PLACE + call Slots_PlaySFX + call WaitSFX + +; Oddly, the rarest mode (wKeepSevenBiasChance = 1) is the one with +; the worse odds to favor seven symbol streaks (12.5% vs 25%). +; it's possible that either the wKeepSevenBiasChance initialization +; or this code was intended to lead to flipped percentages. + ld a, [wKeepSevenBiasChance] + and a + jr nz, .lower_seven_streak_odds + call Random + and %0010100 + ret z ; 25% chance to stick with seven symbol bias + ld a, SLOTS_NO_BIAS + ld [wSlotBias], a + ret + +.lower_seven_streak_odds + call Random + and %0011100 + ret z ; 12.5% chance to stick with seven symbol bias + ld a, SLOTS_NO_BIAS + ld [wSlotBias], a + ret + +.LinedUpPokeballs: + ld a, SFX_3RD_PLACE + call Slots_PlaySFX + call WaitSFX + ret + +.LinedUpMonOrCherry: + ld a, SFX_PRESENT + call Slots_PlaySFX + call WaitSFX + ret + +Slots_AnimateGolem: + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: + dw .init + dw .fall + dw .roll + +.init + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + ld a, [hl] + and a + jr nz, .retain + ld a, 2 + ld [wSlotsDelay], a + ld hl, SPRITEANIMSTRUCT_INDEX + add hl, bc + ld [hl], $0 + ret + +.retain + dec [hl] + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + inc [hl] + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $30 + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], $0 + +.fall + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $20 + jr c, .play_sound + dec [hl] + ld e, a + ld d, 14 * 8 + farcall BattleAnim_Sine_e + ld a, e + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ret + +.play_sound + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + inc [hl] + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], $2 + ld a, 1 + ld [wSlotsDelay], a + ld a, SFX_PLACE_PUZZLE_PIECE_DOWN + call Slots_PlaySFX + ret + +.roll + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld a, [hl] + inc [hl] + inc [hl] + cp 9 * 8 + jr nc, .restart + and $3 + ret nz + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + xor $ff + inc a + ld [hl], a + ldh [hSCY], a + ret + +.restart + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + xor a + ld [hl], a + ldh [hSCY], a + ret + +Slots_AnimateChansey: + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: + dw .walk + dw .one + dw .two + +.walk + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + inc [hl] + cp 13 * 8 + jr z, .limit + and $f + ret nz + ld de, SFX_JUMP_OVER_LEDGE + call PlaySFX + ret + +.limit + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + inc [hl] + ld a, 1 + ld [wSlotsDelay], a + +.one + ld a, [wSlotsDelay] + cp $2 + jr z, .retain + cp $5 + ret nz + ld hl, SPRITEANIMSTRUCT_INDEX + add hl, bc + ld [hl], $0 + ret + +.retain + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + inc [hl] + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $8 +.two + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and a + jr z, .spawn_egg + dec [hl] + ret + +.spawn_egg + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + dec [hl] + push bc + depixel 12, 13, 0, 4 + ld a, SPRITE_ANIM_INDEX_SLOTS_EGG + call InitSpriteAnimStruct + pop bc + ret + +Slots_WaitSFX: + push bc + ld c, 16 + call DelayFrames + pop bc + ret + +Slots_PlaySFX: + push de + ld e, a + ld d, 0 + call PlaySFX + pop de + ret + +; The first three positions are repeated to +; avoid needing to check indices when copying. +Reel1Tilemap: + db SLOTS_SEVEN ; 0 + db SLOTS_CHERRY ; 1 + db SLOTS_STARYU ; 2 + db SLOTS_PIKACHU ; 3 + db SLOTS_SQUIRTLE ; 4 + db SLOTS_SEVEN ; 5 + db SLOTS_CHERRY ; 6 + db SLOTS_STARYU ; 7 + db SLOTS_PIKACHU ; 8 + db SLOTS_SQUIRTLE ; 9 + db SLOTS_POKEBALL ; 10 + db SLOTS_CHERRY ; 11 + db SLOTS_STARYU ; 12 + db SLOTS_PIKACHU ; 13 + db SLOTS_SQUIRTLE ; 14 + db SLOTS_SEVEN ; 0 + db SLOTS_CHERRY ; 1 + db SLOTS_STARYU ; 2 + +Reel2Tilemap: + db SLOTS_SEVEN ; 0 + db SLOTS_PIKACHU ; 1 + db SLOTS_CHERRY ; 2 + db SLOTS_SQUIRTLE ; 3 + db SLOTS_STARYU ; 4 + db SLOTS_POKEBALL ; 5 + db SLOTS_PIKACHU ; 6 + db SLOTS_CHERRY ; 7 + db SLOTS_SQUIRTLE ; 8 + db SLOTS_STARYU ; 9 + db SLOTS_POKEBALL ; 10 + db SLOTS_PIKACHU ; 11 + db SLOTS_CHERRY ; 12 + db SLOTS_SQUIRTLE ; 13 + db SLOTS_STARYU ; 14 + db SLOTS_SEVEN ; 0 + db SLOTS_PIKACHU ; 1 + db SLOTS_CHERRY ; 2 + +Reel3Tilemap: + db SLOTS_SEVEN ; 0 + db SLOTS_PIKACHU ; 1 + db SLOTS_CHERRY ; 2 + db SLOTS_SQUIRTLE ; 3 + db SLOTS_STARYU ; 4 + db SLOTS_PIKACHU ; 5 + db SLOTS_CHERRY ; 6 + db SLOTS_SQUIRTLE ; 7 + db SLOTS_STARYU ; 8 + db SLOTS_PIKACHU ; 9 + db SLOTS_POKEBALL ; 10 + db SLOTS_CHERRY ; 11 + db SLOTS_SQUIRTLE ; 12 + db SLOTS_STARYU ; 13 + db SLOTS_PIKACHU ; 14 + db SLOTS_SEVEN ; 0 + db SLOTS_PIKACHU ; 1 + db SLOTS_CHERRY ; 2 + +SlotsTilemap: +INCBIN "gfx/slots/slots.tilemap" + +Slots1LZ: +INCBIN "gfx/slots/slots_1.2bpp.lz" + +Slots2LZ: +INCBIN "gfx/slots/slots_2.2bpp.lz" + +Slots3LZ: +INCBIN "gfx/slots/slots_3.2bpp.lz" diff --git a/engine/games/unown_puzzle.asm b/engine/games/unown_puzzle.asm new file mode 100644 index 0000000..5d422a8 --- /dev/null +++ b/engine/games/unown_puzzle.asm @@ -0,0 +1,835 @@ +DEF PUZZLE_BORDER EQU $ee +DEF PUZZLE_VOID EQU $ef + +DEF puzcoord EQUS "* 6 +" + +_UnownPuzzle: + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + call ClearBGPalettes + call ClearTilemap + call ClearSprites + xor a + ldh [hBGMapMode], a + call DisableLCD + ld hl, STARTOF("Miscellaneous") ; includes wPuzzlePieces + ld bc, SIZEOF("Miscellaneous") + xor a + call ByteFill + ld hl, UnownPuzzleCursorGFX + ld de, vTiles0 tile $e0 + ld bc, 4 tiles + call CopyBytes + ld hl, UnownPuzzleStartCancelLZ + ld de, vTiles0 tile $ed + call Decompress + call LoadUnownPuzzlePiecesGFX + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, PUZZLE_BORDER + call ByteFill + hlcoord 4, 3 + lb bc, 12, 12 + ld a, PUZZLE_VOID + call UnownPuzzle_FillBox + call InitUnownPuzzlePiecePositions + call UnownPuzzle_UpdateTilemap + call PlaceStartCancelBox + xor a + ldh [hSCY], a + ldh [hSCX], a + ldh [rWY], a + ld [wJumptableIndex], a + ld [wHoldingUnownPuzzlePiece], a + ld [wUnownPuzzleCursorPosition], a + ld [wUnownPuzzleHeldPiece], a + ld a, %10010011 + ldh [rLCDC], a + call WaitBGMap + ld b, SCGB_UNOWN_PUZZLE + call GetSGBLayout + ld a, $e4 + call DmgToCgbBGPals + ld a, $24 + call DmgToCgbObjPal0 + xor a + ld [wSolvedUnownPuzzle], a + call DelayFrame +.loop + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .quit + call UnownPuzzleJumptable + ld a, [wHoldingUnownPuzzlePiece] + and a + jr nz, .holding_piece + ldh a, [hVBlankCounter] + and $10 + jr z, .clear +.holding_piece + call RedrawUnownPuzzlePieces + jr .next + +.clear + call ClearSprites +.next + call DelayFrame + jr .loop + +.quit + pop af + ldh [hInMenu], a + call ClearBGPalettes + call ClearTilemap + call ClearSprites + ld a, LCDC_DEFAULT + ldh [rLCDC], a + ret + +InitUnownPuzzlePiecePositions: + ld c, 1 + ld b, 16 +.load_loop + call Random + and $f + ld hl, .PuzzlePieceInitialPositions + ld e, a + ld d, 0 + add hl, de + ld e, [hl] + ld hl, wPuzzlePieces + add hl, de + ld a, [hl] + and a + jr nz, .load_loop + ld [hl], c + inc c + dec b + jr nz, .load_loop + ret + +.PuzzlePieceInitialPositions: +MACRO initpuzcoord + rept _NARG / 2 + db \1 puzcoord \2 + shift 2 + endr +ENDM + initpuzcoord 0,0, 0,1, 0,2, 0,3, 0,4, 0,5 + initpuzcoord 1,0, 1,5 + initpuzcoord 2,0, 2,5 + initpuzcoord 3,0, 3,5 + initpuzcoord 4,0, 4,5 + initpuzcoord 5,0, 5,5 + ; START > CANCEL + +PlaceStartCancelBox: + call PlaceStartCancelBoxBorder + hlcoord 5, 16 + ld a, $f6 + ld c, 10 +.loop + ld [hli], a + inc a + dec c + jr nz, .loop + ret + +PlaceStartCancelBoxBorder: + hlcoord 4, 15 + ld a, $f0 + ld [hli], a + ld bc, 10 + ld a, $f1 + call ByteFill + hlcoord 15, 15 + ld a, $f2 + ld [hli], a + hlcoord 4, 16 + ld a, $f3 + ld [hli], a + ld bc, 10 + ld a, PUZZLE_VOID + call ByteFill + hlcoord 15, 16 + ld a, $f3 + ld [hli], a + hlcoord 4, 17 + ld a, $f4 + ld [hli], a + ld bc, 10 + ld a, $f1 + call ByteFill + hlcoord 15, 17 + ld a, $f5 + ld [hl], a + ret + +UnownPuzzleJumptable: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: ; redundant one-entry jumptable + dw .Function + +.Function: + ldh a, [hJoyPressed] + and START + jp nz, UnownPuzzle_Quit + ldh a, [hJoyPressed] + and A_BUTTON + jp nz, UnownPuzzle_A + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .d_up + ld a, [hl] + and D_DOWN + jr nz, .d_down + ld a, [hl] + and D_LEFT + jr nz, .d_left + ld a, [hl] + and D_RIGHT + jr nz, .d_right + ret + +.d_up + ld hl, wUnownPuzzleCursorPosition + ld a, [hl] + cp 1 puzcoord 0 + ret c + sub 6 + ld [hl], a + jr .done_joypad + +.d_down + ld hl, wUnownPuzzleCursorPosition + ld a, [hl] + cp 4 puzcoord 1 + ret z + cp 4 puzcoord 2 + ret z + cp 4 puzcoord 3 + ret z + cp 4 puzcoord 4 + ret z + cp 5 puzcoord 0 + ret nc + add 6 + ld [hl], a + jr .done_joypad + +.d_left + ld hl, wUnownPuzzleCursorPosition + ld a, [hl] + and a + ret z + cp 1 puzcoord 0 + ret z + cp 2 puzcoord 0 + ret z + cp 3 puzcoord 0 + ret z + cp 4 puzcoord 0 + ret z + cp 5 puzcoord 0 + ret z + cp 5 puzcoord 5 + jr z, .left_overflow + dec [hl] + jr .done_joypad + +.left_overflow + ld [hl], 5 puzcoord 0 + jr .done_joypad + +.d_right + ld hl, wUnownPuzzleCursorPosition + ld a, [hl] + cp 0 puzcoord 5 + ret z + cp 1 puzcoord 5 + ret z + cp 2 puzcoord 5 + ret z + cp 3 puzcoord 5 + ret z + cp 4 puzcoord 5 + ret z + cp 5 puzcoord 5 + ret z + cp 5 puzcoord 0 + jr z, .right_overflow + inc [hl] + jr .done_joypad + +.right_overflow + ld [hl], 5 puzcoord 5 + +.done_joypad + ld a, [wHoldingUnownPuzzlePiece] + and a + jr nz, .holding_piece + ld de, SFX_POUND + jr .play_sfx + +.holding_piece + ld de, SFX_MOVE_PUZZLE_PIECE + +.play_sfx + call PlaySFX + ret + +UnownPuzzle_A: + ld a, [wHoldingUnownPuzzlePiece] + and a + jr nz, .TryPlacePiece + call UnownPuzzle_CheckCurrentTileOccupancy + and a + jr z, UnownPuzzle_InvalidAction + ld de, SFX_MEGA_KICK + call PlaySFX + ld [hl], 0 + ld [wUnownPuzzleHeldPiece], a + call RedrawUnownPuzzlePieces + call FillUnoccupiedPuzzleSpace + call WaitBGMap + call WaitSFX + ld a, TRUE + ld [wHoldingUnownPuzzlePiece], a + ret + +.TryPlacePiece: + call UnownPuzzle_CheckCurrentTileOccupancy + and a + jr nz, UnownPuzzle_InvalidAction + ld de, SFX_PLACE_PUZZLE_PIECE_DOWN + call PlaySFX + ld a, [wUnownPuzzleHeldPiece] + ld [hl], a + call PlaceUnownPuzzlePieceGFX + call WaitBGMap + xor a + ld [wUnownPuzzleHeldPiece], a + call RedrawUnownPuzzlePieces + xor a + ld [wHoldingUnownPuzzlePiece], a + call WaitSFX + call CheckSolvedUnownPuzzle + ret nc + +; You solved the puzzle! + call PlaceStartCancelBoxBorder + call ClearSprites + ld de, SFX_1ST_PLACE + call PlaySFX + call WaitSFX + call SimpleWaitPressAorB + ld a, TRUE + ld [wSolvedUnownPuzzle], a +UnownPuzzle_Quit: + ld hl, wJumptableIndex + set 7, [hl] + ret + +UnownPuzzle_InvalidAction: + ld de, SFX_WRONG + call PlaySFX + call WaitSFX + ret + +UnownPuzzle_FillBox: + ld de, SCREEN_WIDTH +.row + push bc + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + add hl, de + pop bc + dec b + jr nz, .row + ret + +UnownPuzzle_UpdateTilemap: + xor a + ld [wUnownPuzzleCursorPosition], a + ld c, 6 * 6 +.loop + push bc + call UnownPuzzle_CheckCurrentTileOccupancy + ld [wUnownPuzzleHeldPiece], a + and a + jr z, .not_holding_piece + call PlaceUnownPuzzlePieceGFX + jr .next + +.not_holding_piece + call FillUnoccupiedPuzzleSpace + +.next + ld hl, wUnownPuzzleCursorPosition + inc [hl] + pop bc + dec c + jr nz, .loop + ret + +PlaceUnownPuzzlePieceGFX: + ld a, $2 ; tilemap coords + call GetUnownPuzzleCoordData + ld a, [hli] + ld h, [hl] + ld l, a + push hl + call GetCurrentPuzzlePieceVTileCorner + pop hl + ld de, SCREEN_WIDTH + ld b, 3 +.row + ld c, 3 + push hl +.col + ld [hli], a + inc a + dec c + jr nz, .col + add 9 + pop hl + add hl, de + dec b + jr nz, .row + ret + +FillUnoccupiedPuzzleSpace: + ld a, 2 ; tilemap coords + call GetUnownPuzzleCoordData + ld a, [hli] + ld h, [hl] + ld l, a + push hl + ld a, 4 ; tile + call GetUnownPuzzleCoordData + ld a, [hl] + pop hl + ld de, SCREEN_WIDTH + ld b, 3 +.row + ld c, 3 + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + add hl, de + dec b + jr nz, .row + ret + +GetUnownPuzzleCoordData: + ld e, a + ld d, 0 + ld hl, UnownPuzzleCoordData + add hl, de + ld a, [wUnownPuzzleCursorPosition] + ld e, a +rept 6 + add hl, de +endr + ret + +UnownPuzzle_CheckCurrentTileOccupancy: + ld hl, wPuzzlePieces + ld a, [wUnownPuzzleCursorPosition] + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + ret + +GetCurrentPuzzlePieceVTileCorner: + ld a, [wUnownPuzzleHeldPiece] + ld hl, .Corners + add l + ld l, a + ld a, $0 + adc h + ld h, a + ld a, [hl] + ret + +.Corners: +; 00, 01, 02 +; 0c, 0d, 0e +; 18, 19, 1a + db $e0 ; no piece selected + db $00, $03, $06, $09 + db $24, $27, $2a, $2d + db $48, $4b, $4e, $51 + db $6c, $6f, $72, $75 + +CheckSolvedUnownPuzzle: + ld hl, .SolvedPuzzleConfiguration + ld de, wPuzzlePieces + ld c, 6 * 6 +.loop + ld a, [de] + cp [hl] + jr nz, .not_solved + inc de + inc hl + dec c + jr nz, .loop + scf + ret + +.not_solved + and a + ret + +.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 + +RedrawUnownPuzzlePieces: + call GetCurrentPuzzlePieceVTileCorner + ld [wUnownPuzzleCornerTile], a + xor a + call GetUnownPuzzleCoordData ; get pixel positions + ld a, [hli] + ld b, [hl] + ld c, a + ld a, [wUnownPuzzleCornerTile] + cp $e0 + jr z, .NoPiece + ld hl, .OAM_HoldingPiece + jr .load + +.NoPiece: + ld hl, .OAM_NotHoldingPiece + +.load + ld de, wShadowOAMSprite00 +.loop + ld a, [hli] + cp -1 + ret z + add b + ld [de], a ; y + inc de + ld a, [hli] + add c + ld [de], a ; x + inc de + ld a, [wUnownPuzzleCornerTile] + add [hl] + ld [de], a ; tile id + inc hl + inc de + ld a, [hli] + ld [de], a ; attributes + inc de + jr .loop + +.OAM_HoldingPiece: + dbsprite -1, -1, -4, -4, $00, 0 + dbsprite 0, -1, -4, -4, $01, 0 + dbsprite 0, -1, 4, -4, $02, 0 + dbsprite -1, 0, -4, -4, $0c, 0 + dbsprite 0, 0, -4, -4, $0d, 0 + dbsprite 0, 0, 4, -4, $0e, 0 + dbsprite -1, 0, -4, 4, $18, 0 + dbsprite 0, 0, -4, 4, $19, 0 + dbsprite 0, 0, 4, 4, $1a, 0 + db -1 + +.OAM_NotHoldingPiece: + dbsprite -1, -1, -4, -4, $00, 0 + dbsprite 0, -1, -4, -4, $01, 0 + dbsprite 0, -1, 4, -4, $00, 0 | X_FLIP + dbsprite -1, 0, -4, -4, $02, 0 + dbsprite 0, 0, -4, -4, $03, 0 + dbsprite 0, 0, 4, -4, $02, 0 | X_FLIP + dbsprite -1, 0, -4, 4, $00, 0 | Y_FLIP + dbsprite 0, 0, -4, 4, $01, 0 | Y_FLIP + dbsprite 0, 0, 4, 4, $00, 0 | X_FLIP | Y_FLIP + db -1 + +UnownPuzzleCoordData: + +MACRO puzzle_coords + dbpixel \1, \2, \3, \4 + dwcoord \5, \6 + db \7, \8 +ENDM +; OAM coords, tilemap coords, vacant tile, filler + puzzle_coords 3, 3, 4, 4, 1, 0, PUZZLE_BORDER, 0 + puzzle_coords 6, 3, 4, 4, 4, 0, PUZZLE_BORDER, 0 + puzzle_coords 9, 3, 4, 4, 7, 0, PUZZLE_BORDER, 0 + puzzle_coords 12, 3, 4, 4, 10, 0, PUZZLE_BORDER, 0 + puzzle_coords 15, 3, 4, 4, 13, 0, PUZZLE_BORDER, 0 + puzzle_coords 18, 3, 4, 4, 16, 0, PUZZLE_BORDER, 0 + + puzzle_coords 3, 6, 4, 4, 1, 3, PUZZLE_BORDER, 0 + puzzle_coords 6, 6, 4, 4, 4, 3, PUZZLE_VOID, 0 + puzzle_coords 9, 6, 4, 4, 7, 3, PUZZLE_VOID, 0 + puzzle_coords 12, 6, 4, 4, 10, 3, PUZZLE_VOID, 0 + puzzle_coords 15, 6, 4, 4, 13, 3, PUZZLE_VOID, 0 + puzzle_coords 18, 6, 4, 4, 16, 3, PUZZLE_BORDER, 0 + + puzzle_coords 3, 9, 4, 4, 1, 6, PUZZLE_BORDER, 0 + puzzle_coords 6, 9, 4, 4, 4, 6, PUZZLE_VOID, 0 + puzzle_coords 9, 9, 4, 4, 7, 6, PUZZLE_VOID, 0 + puzzle_coords 12, 9, 4, 4, 10, 6, PUZZLE_VOID, 0 + puzzle_coords 15, 9, 4, 4, 13, 6, PUZZLE_VOID, 0 + puzzle_coords 18, 9, 4, 4, 16, 6, PUZZLE_BORDER, 0 + + puzzle_coords 3, 12, 4, 4, 1, 9, PUZZLE_BORDER, 0 + puzzle_coords 6, 12, 4, 4, 4, 9, PUZZLE_VOID, 0 + puzzle_coords 9, 12, 4, 4, 7, 9, PUZZLE_VOID, 0 + puzzle_coords 12, 12, 4, 4, 10, 9, PUZZLE_VOID, 0 + puzzle_coords 15, 12, 4, 4, 13, 9, PUZZLE_VOID, 0 + puzzle_coords 18, 12, 4, 4, 16, 9, PUZZLE_BORDER, 0 + + puzzle_coords 3, 15, 4, 4, 1, 12, PUZZLE_BORDER, 0 + puzzle_coords 6, 15, 4, 4, 4, 12, PUZZLE_VOID, 0 + puzzle_coords 9, 15, 4, 4, 7, 12, PUZZLE_VOID, 0 + puzzle_coords 12, 15, 4, 4, 10, 12, PUZZLE_VOID, 0 + puzzle_coords 15, 15, 4, 4, 13, 12, PUZZLE_VOID, 0 + puzzle_coords 18, 15, 4, 4, 16, 12, PUZZLE_BORDER, 0 + + puzzle_coords 3, 18, 4, 4, 1, 15, PUZZLE_BORDER, 0 + puzzle_coords 6, 18, 4, 4, 4, 15, PUZZLE_BORDER, 0 + puzzle_coords 9, 18, 4, 4, 7, 15, PUZZLE_BORDER, 0 + puzzle_coords 12, 18, 4, 4, 10, 15, PUZZLE_BORDER, 0 + puzzle_coords 15, 18, 4, 4, 13, 15, PUZZLE_BORDER, 0 + puzzle_coords 18, 18, 4, 4, 16, 15, PUZZLE_BORDER, 0 + +ConvertLoadedPuzzlePieces: + ld hl, vTiles2 + ld de, vTiles0 + ld b, 6 +.loop + push bc + push hl + push hl + call .EnlargePuzzlePieceTiles + pop hl + ld bc, 1 tiles / 2 + add hl, bc + call .EnlargePuzzlePieceTiles + pop hl + ld bc, 6 tiles + add hl, bc + pop bc + dec b + jr nz, .loop + call UnownPuzzle_AddPuzzlePieceBorders + ret + +.EnlargePuzzlePieceTiles: +; double size + ld c, 6 +.loop1 + push bc + push hl + push hl + ld c, 4 +.loop2 + push bc + ld a, [hli] + and $f0 + swap a + call .GetEnlargedTile + ld c, a + ld a, [hli] + and $f0 + swap a + call .GetEnlargedTile + ld b, a + ld a, c + ld [de], a + inc de + ld a, b + ld [de], a + inc de + ld a, c + ld [de], a + inc de + ld a, b + ld [de], a + inc de + pop bc + dec c + jr nz, .loop2 + pop hl + ld c, 4 +.loop3 + push bc + ld a, [hli] + and $f + call .GetEnlargedTile + ld c, a + ld a, [hli] + and $f + call .GetEnlargedTile + ld b, a + ld a, c + ld [de], a + inc de + ld a, b + ld [de], a + inc de + ld a, c + ld [de], a + inc de + ld a, b + ld [de], a + inc de + pop bc + dec c + jr nz, .loop3 + pop hl + ld bc, 1 tiles + add hl, bc + pop bc + dec c + jr nz, .loop1 + ret + +.GetEnlargedTile: + push hl + ld hl, .EnlargedTiles + add l + ld l, a + ld a, 0 + adc h + ld h, a + ld a, [hl] + pop hl + ret + +.EnlargedTiles: +for x, 16 + db ((x & %1000) * %11000) + ((x & %0100) * %1100) + ((x & %0010) * %110) + ((x & %0001) * %11) +endr + +UnownPuzzle_AddPuzzlePieceBorders: + ld hl, PuzzlePieceBorderData + ld a, 8 +.loop + push af + push hl + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld h, [hl] + ld l, a + call .LoadGFX + pop hl +rept 4 + inc hl +endr + pop af + dec a + jr nz, .loop + ret + +.LoadGFX: + lb bc, 4, 4 +.loop1 + push bc + +.loop2 + push de + push hl + + ld b, 1 tiles +.loop3 + ld a, [de] + or [hl] + ld [hli], a + inc de + dec b + jr nz, .loop3 + + pop hl + ld de, 3 tiles + add hl, de + pop de + dec c + jr nz, .loop2 + + ld bc, 24 tiles + add hl, bc + pop bc + dec b + jr nz, .loop1 + ret + +PuzzlePieceBorderData: + dw .TileBordersGFX + 0 tiles, vTiles0 tile $00 + dw .TileBordersGFX + 1 tiles, vTiles0 tile $01 + dw .TileBordersGFX + 2 tiles, vTiles0 tile $02 + dw .TileBordersGFX + 3 tiles, vTiles0 tile $0c + dw .TileBordersGFX + 4 tiles, vTiles0 tile $0e + dw .TileBordersGFX + 5 tiles, vTiles0 tile $18 + dw .TileBordersGFX + 6 tiles, vTiles0 tile $19 + dw .TileBordersGFX + 7 tiles, vTiles0 tile $1a + +.TileBordersGFX: +INCBIN "gfx/unown_puzzle/tile_borders.2bpp" + +LoadUnownPuzzlePiecesGFX: + ld a, [wScriptVar] + maskbits NUM_UNOWN_PUZZLES + ld e, a + ld d, 0 + ld hl, .LZPointers + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld de, vTiles2 + call Decompress + call ConvertLoadedPuzzlePieces + ret + +.LZPointers: +; entries correspond to UNOWNPUZZLE_* constants + dw KabutoPuzzleLZ + dw OmanytePuzzleLZ + dw AerodactylPuzzleLZ + dw HoOhPuzzleLZ + +UnownPuzzleCursorGFX: +INCBIN "gfx/unown_puzzle/cursor.2bpp" + +UnownPuzzleStartCancelLZ: +INCBIN "gfx/unown_puzzle/start_cancel.2bpp.lz" + +HoOhPuzzleLZ: +INCBIN "gfx/unown_puzzle/hooh.2bpp.lz" + +AerodactylPuzzleLZ: +INCBIN "gfx/unown_puzzle/aerodactyl.2bpp.lz" + +KabutoPuzzleLZ: +INCBIN "gfx/unown_puzzle/kabuto.2bpp.lz" + +OmanytePuzzleLZ: +INCBIN "gfx/unown_puzzle/omanyte.2bpp.lz" diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm new file mode 100644 index 0000000..4af157c --- /dev/null +++ b/engine/gfx/cgb_layouts.asm @@ -0,0 +1,985 @@ +; Replaces the functionality of sgb.asm to work with CGB hardware. + +CheckCGB: + ldh a, [hCGB] + and a + ret + +LoadSGBLayoutCGB: + ld a, b + cp SCGB_DEFAULT + jr nz, .not_default + ld a, [wDefaultSGBLayout] +.not_default + cp SCGB_PARTY_MENU_HP_BARS + jp z, CGB_ApplyPartyMenuHPPals + call ResetBGPals + ld l, a + ld h, 0 + add hl, hl + ld de, CGBLayoutJumptable + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .done + push de + jp hl +.done: + ret + +CGBLayoutJumptable: + table_width 2, CGBLayoutJumptable + dw _CGB_BattleGrayscale + dw _CGB_BattleColors + dw _CGB_PokegearPals + dw _CGB_StatsScreenHPPals + dw _CGB_Pokedex + dw _CGB_SlotMachine + dw _CGB_BetaTitleScreen + dw _CGB_GSIntro + dw _CGB_Diploma + dw _CGB_MapPals + dw _CGB_PartyMenu + dw _CGB_Evolution + dw _CGB_GSTitleScreen + dw _CGB_Unused0D + dw _CGB_MoveList + dw _CGB_BetaPikachuMinigame + dw _CGB_PokedexSearchOption + dw _CGB_BetaPoker + dw _CGB_Pokepic + dw _CGB_MagnetTrain + dw _CGB_PackPals + dw _CGB_TrainerCard + dw _CGB_PokedexUnownMode + dw _CGB_BillsPC + dw _CGB_UnownPuzzle + dw _CGB_GamefreakLogo + dw _CGB_PlayerOrMonFrontpicPals + dw _CGB_TradeTube + dw _CGB_TrainerOrMonFrontpicPals + dw _CGB_MysteryGift + dw _CGB_Unused1E + assert_table_length NUM_SCGB_LAYOUTS + +_CGB_BattleGrayscale: + ld hl, PalPacket_BattleGrayscale + 1 + ld de, wBGPals1 + ld c, 4 + call CopyPalettes + ld hl, PalPacket_BattleGrayscale + 1 + ld de, wBGPals1 palette PAL_BATTLE_BG_EXP + ld c, 4 + call CopyPalettes + ld hl, PalPacket_BattleGrayscale + 1 + ld de, wOBPals1 + ld c, 2 + call CopyPalettes + jr _CGB_FinishBattleScreenLayout + +_CGB_BattleColors: + ld de, wBGPals1 + call GetBattlemonBackpicPalettePointer + push hl + call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_PLAYER + call GetEnemyFrontpicPalettePointer + push hl + call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_ENEMY + ld a, [wEnemyHPPal] + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld bc, HPBarPals + add hl, bc + call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_ENEMY_HP + ld a, [wPlayerHPPal] + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld bc, HPBarPals + add hl, bc + call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_PLAYER_HP + ld hl, ExpBarPalette + call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_BG_EXP + ld de, wOBPals1 + pop hl + call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_OB_ENEMY + pop hl + call LoadPalette_White_Col1_Col2_Black ; PAL_BATTLE_OB_PLAYER + ld a, SCGB_BATTLE_COLORS + ld [wDefaultSGBLayout], a + call ApplyPals +_CGB_FinishBattleScreenLayout: + call InitPartyMenuBGPal7 + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, PAL_BATTLE_BG_ENEMY_HP + call ByteFill + hlcoord 0, 4, wAttrmap + lb bc, 8, 10 + ld a, PAL_BATTLE_BG_PLAYER + call FillBoxCGB + hlcoord 10, 0, wAttrmap + lb bc, 7, 10 + ld a, PAL_BATTLE_BG_ENEMY + call FillBoxCGB + hlcoord 0, 0, wAttrmap + lb bc, 4, 10 + ld a, PAL_BATTLE_BG_ENEMY_HP + call FillBoxCGB + hlcoord 10, 7, wAttrmap + lb bc, 5, 10 + ld a, PAL_BATTLE_BG_PLAYER_HP + call FillBoxCGB + hlcoord 10, 11, wAttrmap + lb bc, 1, 9 + ld a, PAL_BATTLE_BG_EXP + call FillBoxCGB + hlcoord 0, 12, wAttrmap + ld bc, 6 * SCREEN_WIDTH + ld a, PAL_BATTLE_BG_TEXT + call ByteFill + ld hl, BattleObjectPals + ld de, wOBPals1 palette PAL_BATTLE_OB_GRAY + ld bc, 6 palettes + ld a, BANK(wOBPals1) + call FarCopyWRAM + call ApplyAttrmap + ret + +InitPartyMenuBGPal7: + farcall Function100dc0 +Mobile_InitPartyMenuBGPal7: + ld hl, PartyMenuBGPalette + jr nc, .not_mobile + ld hl, PartyMenuBGMobilePalette +.not_mobile + ld de, wBGPals1 palette 7 + ld bc, 1 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + ret + +InitPartyMenuBGPal0: + farcall Function100dc0 + ld hl, PartyMenuBGPalette + jr nc, .not_mobile + ld hl, PartyMenuBGMobilePalette +.not_mobile + ld de, wBGPals1 palette 0 + ld bc, 1 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + ret + +_CGB_PokegearPals: + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .male + ld hl, FemalePokegearPals + jr .got_pals + +.male + ld hl, MalePokegearPals +.got_pals + ld de, wBGPals1 + ld bc, 6 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +_CGB_StatsScreenHPPals: + ld de, wBGPals1 + ld a, [wCurHPPal] + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld bc, HPBarPals + add hl, bc + call LoadPalette_White_Col1_Col2_Black ; hp palette + ld a, [wCurPartySpecies] + ld bc, wTempMonDVs + call GetPlayerOrMonPalettePointer + call LoadPalette_White_Col1_Col2_Black ; mon palette + ld hl, ExpBarPalette + call LoadPalette_White_Col1_Col2_Black ; exp palette + ld hl, StatsScreenPagePals + ld de, wBGPals1 palette 3 + ld bc, 3 palettes ; pink, green, and blue page palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + call WipeAttrmap + + hlcoord 0, 0, wAttrmap + lb bc, 8, SCREEN_WIDTH + ld a, $1 ; mon palette + call FillBoxCGB + + hlcoord 10, 16, wAttrmap + ld bc, 10 + ld a, $2 ; exp palette + call ByteFill + + hlcoord 13, 5, wAttrmap + lb bc, 2, 2 + ld a, $3 ; pink page palette + call FillBoxCGB + + hlcoord 15, 5, wAttrmap + lb bc, 2, 2 + ld a, $4 ; green page palette + call FillBoxCGB + + hlcoord 17, 5, wAttrmap + lb bc, 2, 2 + ld a, $5 ; blue page palette + call FillBoxCGB + + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +StatsScreenPagePals: +INCLUDE "gfx/stats/pages.pal" + +StatsScreenPals: +INCLUDE "gfx/stats/stats.pal" + +_CGB_Pokedex: + ld de, wBGPals1 + ld a, PREDEFPAL_POKEDEX + call GetPredefPal + call LoadHLPaletteIntoDE ; dex interface palette + ld a, [wCurPartySpecies] + cp $ff + jr nz, .is_pokemon + ld hl, PokedexQuestionMarkPalette + call LoadHLPaletteIntoDE ; green question mark palette + jr .got_palette + +.is_pokemon + call GetMonPalettePointer + call LoadPalette_White_Col1_Col2_Black ; mon palette +.got_palette + call WipeAttrmap + hlcoord 1, 1, wAttrmap + lb bc, 7, 7 + ld a, $1 ; green question mark palette + call FillBoxCGB + call InitPartyMenuOBPals + ld hl, PokedexCursorPalette + ld de, wOBPals1 palette 7 ; green cursor palette + ld bc, 1 palettes + ld a, BANK(wOBPals1) + call FarCopyWRAM + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +PokedexQuestionMarkPalette: +INCLUDE "gfx/pokedex/question_mark.pal" + +PokedexCursorPalette: +INCLUDE "gfx/pokedex/cursor.pal" + +_CGB_BillsPC: + ld de, wBGPals1 + ld a, PREDEFPAL_POKEDEX + call GetPredefPal + call LoadHLPaletteIntoDE + ld a, [wCurPartySpecies] + cp $ff + jr nz, .GetMonPalette + ld hl, BillsPCOrangePalette + call LoadHLPaletteIntoDE + jr .GotPalette + +.GetMonPalette: + ld bc, wTempMonDVs + call GetPlayerOrMonPalettePointer + call LoadPalette_White_Col1_Col2_Black +.GotPalette: + call WipeAttrmap + hlcoord 1, 4, wAttrmap + lb bc, 7, 7 + ld a, $1 ; mon palette + call FillBoxCGB + call InitPartyMenuOBPals + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +_CGB_Unknown: ; unreferenced + ld hl, BillsPCOrangePalette + call LoadHLPaletteIntoDE + jr .GotPalette + +.GetMonPalette: ; unreferenced + ld bc, wTempMonDVs + call GetPlayerOrMonPalettePointer + call LoadPalette_White_Col1_Col2_Black +.GotPalette: + call WipeAttrmap + hlcoord 1, 1, wAttrmap + lb bc, 7, 7 + ld a, $1 ; mon palette + call FillBoxCGB + call InitPartyMenuOBPals + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +BillsPCOrangePalette: +INCLUDE "gfx/pc/orange.pal" + +_CGB_PokedexUnownMode: + ld de, wBGPals1 + ld a, PREDEFPAL_POKEDEX + call GetPredefPal + call LoadHLPaletteIntoDE + ld a, [wCurPartySpecies] + call GetMonPalettePointer + call LoadPalette_White_Col1_Col2_Black + call WipeAttrmap + hlcoord 7, 5, wAttrmap + lb bc, 7, 7 + ld a, $1 ; mon palette + call FillBoxCGB + call InitPartyMenuOBPals + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +_CGB_SlotMachine: + ld hl, SlotMachinePals + ld de, wBGPals1 + ld bc, 16 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + call WipeAttrmap + hlcoord 0, 2, wAttrmap + lb bc, 10, 3 + ld a, $2 ; "3" palette + call FillBoxCGB + hlcoord 17, 2, wAttrmap + lb bc, 10, 3 + ld a, $2 ; "3" palette + call FillBoxCGB + hlcoord 0, 4, wAttrmap + lb bc, 6, 3 + ld a, $3 ; "2" palette + call FillBoxCGB + hlcoord 17, 4, wAttrmap + lb bc, 6, 3 + ld a, $3 ; "2" palette + call FillBoxCGB + hlcoord 0, 6, wAttrmap + lb bc, 2, 3 + ld a, $4 ; "1" palette + call FillBoxCGB + hlcoord 17, 6, wAttrmap + lb bc, 2, 3 + ld a, $4 ; "1" palette + call FillBoxCGB + hlcoord 4, 2, wAttrmap + lb bc, 2, 12 + ld a, $1 ; Vileplume palette + call FillBoxCGB + hlcoord 3, 2, wAttrmap + lb bc, 10, 1 + ld a, $1 ; lights palette + call FillBoxCGB + hlcoord 16, 2, wAttrmap + lb bc, 10, 1 + ld a, $1 ; lights palette + call FillBoxCGB + hlcoord 0, 12, wAttrmap + ld bc, 6 * SCREEN_WIDTH + ld a, $7 ; text palette + call ByteFill + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +_CGB_BetaTitleScreen: + ld hl, PalPacket_BetaTitleScreen + 1 + call CopyFourPalettes + call WipeAttrmap + ld de, wOBPals1 + ld a, PREDEFPAL_PACK + call GetPredefPal + call LoadHLPaletteIntoDE + hlcoord 0, 6, wAttrmap + lb bc, 12, SCREEN_WIDTH + ld a, $1 + call FillBoxCGB + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +_CGB_GSIntro: + ld b, 0 + ld hl, .Jumptable + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: + dw .ShellderLaprasScene + dw .JigglypuffPikachuScene + dw .StartersCharizardScene + +.ShellderLaprasScene: + ld hl, .ShellderLaprasBGPalette + ld de, wBGPals1 + call LoadHLPaletteIntoDE + ld hl, .ShellderLaprasOBPals + ld de, wOBPals1 + ld bc, 2 palettes + ld a, BANK(wOBPals1) + call FarCopyWRAM + call WipeAttrmap + ret + +.ShellderLaprasBGPalette: +INCLUDE "gfx/intro/gs_shellder_lapras_bg.pal" + +.ShellderLaprasOBPals: +INCLUDE "gfx/intro/gs_shellder_lapras_ob.pal" + +.JigglypuffPikachuScene: + ld de, wBGPals1 + ld a, PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_BG + call GetPredefPal + call LoadHLPaletteIntoDE + + ld de, wOBPals1 + ld a, PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_OB + call GetPredefPal + call LoadHLPaletteIntoDE + call WipeAttrmap + ret + +.StartersCharizardScene: + ld hl, PalPacket_Pack + 1 + call CopyFourPalettes + ld de, wOBPals1 + ld a, PREDEFPAL_GS_INTRO_STARTERS_TRANSITION + call GetPredefPal + call LoadHLPaletteIntoDE + call WipeAttrmap + ret + +_CGB_BetaPoker: + ld hl, BetaPokerPals + ld de, wBGPals1 + ld bc, 5 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + call ApplyPals + call WipeAttrmap + call ApplyAttrmap + ret + +_CGB_Diploma: + ld hl, DiplomaPalettes + ld de, wBGPals1 + ld bc, 16 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + + ld hl, PalPacket_Diploma + 1 + call CopyFourPalettes + call WipeAttrmap + call ApplyAttrmap + ret + +_CGB_MapPals: + call LoadMapPals + ld a, SCGB_MAPPALS + ld [wDefaultSGBLayout], a + ret + +_CGB_PartyMenu: + ld hl, PalPacket_PartyMenu + 1 + call CopyFourPalettes + call InitPartyMenuBGPal0 + call InitPartyMenuBGPal7 + call InitPartyMenuOBPals + call ApplyAttrmap + ret + +_CGB_Evolution: + ld de, wBGPals1 + ld a, c + and a + jr z, .pokemon + ld a, PREDEFPAL_BLACKOUT + call GetPredefPal + call LoadHLPaletteIntoDE + jr .got_palette + +.pokemon + ld hl, wPartyMon1DVs + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld c, l + ld b, h + ld a, [wPlayerHPPal] + call GetPlayerOrMonPalettePointer + call LoadPalette_White_Col1_Col2_Black + ld hl, BattleObjectPals + ld de, wOBPals1 palette PAL_BATTLE_OB_GRAY + ld bc, 6 palettes + ld a, BANK(wOBPals1) + call FarCopyWRAM + +.got_palette + call WipeAttrmap + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +_CGB_GSTitleScreen: + ld hl, UnusedGSTitleBGPals + ld de, wBGPals1 + ld bc, 5 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + ld hl, UnusedGSTitleOBPals + ld de, wOBPals1 + ld bc, 2 palettes + ld a, BANK(wOBPals1) + call FarCopyWRAM + ld a, SCGB_DIPLOMA + ld [wDefaultSGBLayout], a + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +_CGB_Unused0D: + ld hl, PalPacket_Diploma + 1 + call CopyFourPalettes + call WipeAttrmap + call ApplyAttrmap + ret + +_CGB_UnownPuzzle: + ld hl, PalPacket_UnownPuzzle + 1 + call CopyFourPalettes + ld de, wOBPals1 + ld a, PREDEFPAL_UNOWN_PUZZLE + call GetPredefPal + call LoadHLPaletteIntoDE + ldh a, [rSVBK] + push af + ld a, BANK(wOBPals1) + ldh [rSVBK], a + ld hl, wOBPals1 + ld a, LOW(palred 31 + palgreen 0 + palblue 0) + ld [hli], a + ld a, HIGH(palred 31 + palgreen 0 + palblue 0) + ld [hl], a + pop af + ldh [rSVBK], a + call WipeAttrmap + call ApplyAttrmap + ret + +_CGB_TrainerCard: + ld de, wBGPals1 + xor a ; CHRIS + call GetTrainerPalettePointer + call LoadPalette_White_Col1_Col2_Black + ld a, FALKNER ; KRIS + call GetTrainerPalettePointer + call LoadPalette_White_Col1_Col2_Black + ld a, BUGSY + call GetTrainerPalettePointer + call LoadPalette_White_Col1_Col2_Black + ld a, WHITNEY + call GetTrainerPalettePointer + call LoadPalette_White_Col1_Col2_Black + ld a, MORTY + call GetTrainerPalettePointer + call LoadPalette_White_Col1_Col2_Black + ld a, CHUCK + call GetTrainerPalettePointer + call LoadPalette_White_Col1_Col2_Black + ld a, JASMINE + call GetTrainerPalettePointer + call LoadPalette_White_Col1_Col2_Black + ld a, PRYCE + call GetTrainerPalettePointer + call LoadPalette_White_Col1_Col2_Black + ld a, PREDEFPAL_CGB_BADGE + call GetPredefPal + call LoadHLPaletteIntoDE + + ; fill screen with opposite-gender palette for the card border + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, [wPlayerGender] + and a + ld a, $1 ; kris + jr z, .got_gender + ld a, $0 ; chris +.got_gender + call ByteFill + ; fill trainer sprite area with same-gender palette + hlcoord 14, 1, wAttrmap + lb bc, 7, 5 + ld a, [wPlayerGender] + and a + ld a, $0 ; chris + jr z, .got_gender2 + ld a, $1 ; kris +.got_gender2 + call FillBoxCGB + ; top-right corner still uses the border's palette + hlcoord 18, 1, wAttrmap + ld [hl], $1 + hlcoord 2, 11, wAttrmap + lb bc, 2, 4 + ld a, $1 ; falkner + call FillBoxCGB + hlcoord 6, 11, wAttrmap + lb bc, 2, 4 + ld a, $2 ; bugsy + call FillBoxCGB + hlcoord 10, 11, wAttrmap + lb bc, 2, 4 + ld a, $3 ; whitney + call FillBoxCGB + hlcoord 14, 11, wAttrmap + lb bc, 2, 4 + ld a, $4 ; morty + call FillBoxCGB + hlcoord 2, 14, wAttrmap + lb bc, 2, 4 + ld a, $5 ; chuck + call FillBoxCGB + hlcoord 6, 14, wAttrmap + lb bc, 2, 4 + ld a, $6 ; jasmine + call FillBoxCGB + hlcoord 10, 14, wAttrmap + lb bc, 2, 4 + ld a, $7 ; pryce + call FillBoxCGB + ; clair uses kris's palette + ld a, [wPlayerGender] + and a + push af + jr z, .got_gender3 + hlcoord 14, 14, wAttrmap + lb bc, 2, 4 + ld a, $1 + call FillBoxCGB +.got_gender3 + pop af + ld c, $0 + jr nz, .got_gender4 + inc c +.got_gender4 + ld a, c + hlcoord 18, 1, wAttrmap + ld [hl], a + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +_CGB_MoveList: + ld de, wBGPals1 + ld a, PREDEFPAL_GOLDENROD + call GetPredefPal + call LoadHLPaletteIntoDE + ld a, [wPlayerHPPal] + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld bc, HPBarPals + add hl, bc + call LoadPalette_White_Col1_Col2_Black + call WipeAttrmap + hlcoord 11, 1, wAttrmap + lb bc, 2, 9 + ld a, $1 + call FillBoxCGB + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +_CGB_BetaPikachuMinigame: + ld hl, PalPacket_BetaPikachuMinigame + 1 + call CopyFourPalettes + call WipeAttrmap + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +_CGB_PokedexSearchOption: + ld de, wBGPals1 + ld a, PREDEFPAL_POKEDEX + call GetPredefPal + call LoadHLPaletteIntoDE + call WipeAttrmap + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +_CGB_PackPals: +; pack pals + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL + jr z, .tutorial_male + + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .tutorial_male + + ld hl, .KrisPackPals + jr .got_gender + +.tutorial_male + ld hl, .ChrisPackPals + +.got_gender + ld de, wBGPals1 + ld bc, 8 palettes ; 6 palettes? + ld a, BANK(wBGPals1) + call FarCopyWRAM + call WipeAttrmap + hlcoord 0, 0, wAttrmap + lb bc, 1, 10 + ld a, $1 + call FillBoxCGB + hlcoord 10, 0, wAttrmap + lb bc, 1, 10 + ld a, $2 + call FillBoxCGB + hlcoord 7, 2, wAttrmap + lb bc, 9, 1 + ld a, $3 + call FillBoxCGB + hlcoord 0, 7, wAttrmap + lb bc, 3, 5 + ld a, $4 + call FillBoxCGB + hlcoord 0, 3, wAttrmap + lb bc, 3, 5 + ld a, $5 + call FillBoxCGB + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +.ChrisPackPals: +INCLUDE "gfx/pack/pack.pal" + +.KrisPackPals: +INCLUDE "gfx/pack/pack_f.pal" + +_CGB_Pokepic: + call _CGB_MapPals + ld de, SCREEN_WIDTH + hlcoord 0, 0, wAttrmap + ld a, [wMenuBorderTopCoord] +.loop + and a + jr z, .found_top + dec a + add hl, de + jr .loop + +.found_top + ld a, [wMenuBorderLeftCoord] + ld e, a + ld d, 0 + add hl, de + ld a, [wMenuBorderTopCoord] + ld b, a + ld a, [wMenuBorderBottomCoord] + inc a + sub b + ld b, a + ld a, [wMenuBorderLeftCoord] + ld c, a + ld a, [wMenuBorderRightCoord] + sub c + inc a + ld c, a + ld a, PAL_BG_GRAY + call FillBoxCGB + call ApplyAttrmap + ret + +_CGB_MagnetTrain: ; unused + ld hl, PalPacket_MagnetTrain + 1 + call CopyFourPalettes + call WipeAttrmap + hlcoord 0, 4, wAttrmap + lb bc, 10, SCREEN_WIDTH + ld a, PAL_BG_GREEN + call FillBoxCGB + hlcoord 0, 6, wAttrmap + lb bc, 6, SCREEN_WIDTH + ld a, PAL_BG_RED + call FillBoxCGB + call ApplyAttrmap + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +_CGB_GamefreakLogo: + ld de, wBGPals1 + ld a, PREDEFPAL_GAMEFREAK_LOGO_BG + call GetPredefPal + call LoadHLPaletteIntoDE + ld hl, .GamefreakDittoPalette + ld de, wOBPals1 + call LoadHLPaletteIntoDE + ld hl, .GamefreakDittoPalette + ld de, wOBPals1 palette 1 + call LoadHLPaletteIntoDE + call WipeAttrmap + call ApplyAttrmap + call ApplyPals + ret + +.GamefreakDittoPalette: +INCLUDE "gfx/splash/ditto.pal" + +_CGB_PlayerOrMonFrontpicPals: + ld de, wBGPals1 + ld a, [wCurPartySpecies] + ld bc, wTempMonDVs + call GetPlayerOrMonPalettePointer + call LoadPalette_White_Col1_Col2_Black + call WipeAttrmap + call ApplyAttrmap + call ApplyPals + ret + +_CGB_Unused1E: + ld de, wBGPals1 + ld a, [wCurPartySpecies] + call GetMonPalettePointer + call LoadPalette_White_Col1_Col2_Black + call WipeAttrmap + call ApplyAttrmap + ret + +_CGB_TradeTube: + ld hl, PalPacket_TradeTube + 1 + call CopyFourPalettes + ld hl, PartyMenuOBPals + ld de, wOBPals1 + ld bc, 1 palettes + ld a, BANK(wOBPals1) + call FarCopyWRAM + ld de, wOBPals1 palette 7 + ld a, PREDEFPAL_TRADE_TUBE + call GetPredefPal + call LoadHLPaletteIntoDE + call WipeAttrmap + ret + +_CGB_TrainerOrMonFrontpicPals: + ld de, wBGPals1 + ld a, [wCurPartySpecies] + ld bc, wTempMonDVs + call GetFrontpicPalettePointer + call LoadPalette_White_Col1_Col2_Black + call WipeAttrmap + call ApplyAttrmap + call ApplyPals + ret + +_CGB_MysteryGift: + ld hl, .MysteryGiftPalettes + ld de, wBGPals1 + ld bc, 2 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + call ApplyPals + call WipeAttrmap + hlcoord 3, 7, wAttrmap + lb bc, 8, 14 + ld a, $1 + call FillBoxCGB + hlcoord 1, 5, wAttrmap + lb bc, 1, 18 + ld a, $1 + call FillBoxCGB + hlcoord 1, 16, wAttrmap + lb bc, 1, 18 + ld a, $1 + call FillBoxCGB + hlcoord 0, 0, wAttrmap + lb bc, 17, 2 + ld a, $1 + call FillBoxCGB + hlcoord 18, 5, wAttrmap + lb bc, 12, 1 + ld a, $1 + call FillBoxCGB + call ApplyAttrmap + ret + +.MysteryGiftPalettes: +INCLUDE "gfx/mystery_gift/mystery_gift.pal" + +GS_CGB_MysteryGift: ; unreferenced + ld hl, .MysteryGiftPalette + ld de, wBGPals1 + ld bc, 1 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + call ApplyPals + call WipeAttrmap + call ApplyAttrmap + ret + +.MysteryGiftPalette: +INCLUDE "gfx/mystery_gift/gs_mystery_gift.pal" diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm new file mode 100644 index 0000000..933d163 --- /dev/null +++ b/engine/gfx/color.asm @@ -0,0 +1,1339 @@ +INCLUDE "engine/gfx/sgb_layouts.asm" + +DEF SHINY_ATK_MASK EQU %0010 +DEF SHINY_DEF_DV EQU 10 +DEF SHINY_SPD_DV EQU 10 +DEF SHINY_SPC_DV EQU 10 + +CheckShininess: +; Check if a mon is shiny by DVs at bc. +; Return carry if shiny. + + ld l, c + ld h, b + +; Attack + ld a, [hl] + and SHINY_ATK_MASK << 4 + jr z, .not_shiny + +; Defense + ld a, [hli] + and %1111 + cp SHINY_DEF_DV + jr nz, .not_shiny + +; Speed + ld a, [hl] + and %1111 << 4 + cp SHINY_SPD_DV << 4 + jr nz, .not_shiny + +; Special + ld a, [hl] + and %1111 + cp SHINY_SPC_DV + jr nz, .not_shiny + +; shiny + scf + ret + +.not_shiny + and a + ret + +Unused_CheckShininess: +; Return carry if the DVs at hl are all 10 or higher. + +; Attack + ld a, [hl] + cp 10 << 4 + jr c, .not_shiny + +; Defense + ld a, [hli] + and %1111 + cp 10 + jr c, .not_shiny + +; Speed + ld a, [hl] + cp 10 << 4 + jr c, .not_shiny + +; Special + ld a, [hl] + and %1111 + cp 10 + jr c, .not_shiny + +; shiny + scf + ret + +.not_shiny + and a + ret + +SGB_ApplyCreditsPals: ; unreferenced + push de + push bc + ld hl, PalPacket_Pal01 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + pop bc + pop de + ld a, c + ld [wSGBPals + 3], a + ld a, b + ld [wSGBPals + 4], a + ld a, e + ld [wSGBPals + 5], a + ld a, d + ld [wSGBPals + 6], a + ld hl, wSGBPals + call PushSGBPals + ld hl, BlkPacket_AllPal0 + call PushSGBPals + ret + +InitPartyMenuPalettes: + ld hl, PalPacket_PartyMenu + 1 + call CopyFourPalettes + call InitPartyMenuOBPals + call WipeAttrmap + ret + +; SGB layout for SCGB_PARTY_MENU_HP_BARS +SGB_ApplyPartyMenuHPPals: + ld hl, wHPPals + ld a, [wSGBPals] + ld e, a + ld d, 0 + add hl, de + ld e, l + ld d, h + ld a, [de] + and a + ld e, $5 + jr z, .okay + dec a + ld e, $a + jr z, .okay + ld e, $f +.okay + push de + ld hl, wSGBPals + 10 + ld bc, $6 + ld a, [wSGBPals] + call AddNTimes + pop de + ld [hl], e + ret + +Intro_LoadMagikarpPalettes: ; unreferenced + call CheckCGB + ret z + +; CGB only + ld hl, .MagikarpBGPal + ld de, wBGPals1 + ld bc, 1 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + + ld hl, .MagikarpOBPal + ld de, wOBPals1 + ld bc, 1 palettes + ld a, BANK(wOBPals1) + call FarCopyWRAM + + call ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +.MagikarpBGPal: +INCLUDE "gfx/intro/gs_magikarp_bg.pal" + +.MagikarpOBPal: +INCLUDE "gfx/intro/gs_magikarp_ob.pal" + +Intro_LoadAllPal0: ; unreferenced + call CheckCGB + ret nz + ldh a, [hSGB] + and a + ret z + ld hl, BlkPacket_AllPal0 + jp PushSGBPals + +Intro_LoadBetaIntroVenusaurPalettes: ; unreferenced + call CheckCGB + jr nz, .cgb + ldh a, [hSGB] + and a + ret z + ld hl, PalPacket_BetaIntroVenusaur + jp PushSGBPals + +.cgb + ld de, wOBPals1 + ld a, PREDEFPAL_BETA_INTRO_VENUSAUR + call GetPredefPal + jp LoadHLPaletteIntoDE + +Intro_LoadPackPalettes: ; unreferenced + call CheckCGB + jr nz, .cgb + ldh a, [hSGB] + and a + ret z + ld hl, PalPacket_Pack + jp PushSGBPals + +.cgb + ld de, wOBPals1 + ld a, PREDEFPAL_PACK + call GetPredefPal + jp LoadHLPaletteIntoDE + +GSIntro_LoadMonPalette: ; unreferenced + call CheckCGB + jr nz, .cgb + ldh a, [hSGB] + and a + ret z + ld a, c + push af + ld hl, PalPacket_Pal01 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + pop af + call GetMonPalettePointer + ld a, [hli] + ld [wSGBPals + 3], a + ld a, [hli] + ld [wSGBPals + 4], a + ld a, [hli] + ld [wSGBPals + 5], a + ld a, [hl] + ld [wSGBPals + 6], a + ld hl, wSGBPals + jp PushSGBPals + +.cgb + ld de, wOBPals1 + ld a, c + call GetMonPalettePointer + call LoadPalette_White_Col1_Col2_Black + ret + +LoadTrainerClassPaletteAsNthBGPal: + ld a, [wTrainerClass] + call GetTrainerPalettePointer + ld a, e + jr LoadNthMiddleBGPal + +LoadMonPaletteAsNthBGPal: + ld a, [wCurPartySpecies] + call _GetMonPalettePointer + ld a, e + bit 7, a + jr z, LoadNthMiddleBGPal + and $7f + inc hl + inc hl + inc hl + inc hl + +LoadNthMiddleBGPal: + push hl + ld hl, wBGPals1 + ld de, 1 palettes +.loop + and a + jr z, .got_addr + add hl, de + dec a + jr .loop + +.got_addr + ld e, l + ld d, h + pop hl + call LoadPalette_White_Col1_Col2_Black + ret + +LoadBetaPokerPalettes: ; unreferenced + ldh a, [hCGB] + and a + jr nz, .cgb + ld hl, wBetaPokerSGBPals + jp PushSGBPals + +.cgb + ld a, [wBetaPokerSGBCol] + ld c, a + ld a, [wBetaPokerSGBRow] + hlcoord 0, 0, wAttrmap + ld de, SCREEN_WIDTH +.loop + and a + jr z, .done + add hl, de + dec a + jr .loop + +.done + ld b, 0 + add hl, bc + lb bc, 6, 4 + ld a, [wBetaPokerSGBAttr] + and $3 + call FillBoxCGB + call CopyTilemapAtOnce + ret + +ApplyMonOrTrainerPals: + call CheckCGB + ret z + ld a, e + and a + jr z, .get_trainer + ld a, [wCurPartySpecies] + call GetMonPalettePointer + jr .load_palettes + +.get_trainer + ld a, [wTrainerClass] + call GetTrainerPalettePointer + +.load_palettes + ld de, wBGPals1 + call LoadPalette_White_Col1_Col2_Black + call WipeAttrmap + call ApplyAttrmap + call ApplyPals + ret + +ApplyHPBarPals: + ld a, [wWhichHPBar] + and a + jr z, .Enemy + cp $1 + jr z, .Player + cp $2 + jr z, .PartyMenu + ret + +.Enemy: + ld de, wBGPals2 palette PAL_BATTLE_BG_ENEMY_HP color 1 + jr .okay + +.Player: + ld de, wBGPals2 palette PAL_BATTLE_BG_PLAYER_HP color 1 + +.okay + ld l, c + ld h, $0 + add hl, hl + add hl, hl + ld bc, HPBarPals + add hl, bc + ld bc, 4 + ld a, BANK(wBGPals2) + call FarCopyWRAM + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +.PartyMenu: + ld e, c + inc e + hlcoord 11, 1, wAttrmap + ld bc, 2 * SCREEN_WIDTH + ld a, [wCurPartyMon] +.loop + and a + jr z, .done + add hl, bc + dec a + jr .loop + +.done + lb bc, 2, 8 + ld a, e + call FillBoxCGB + ret + +LoadStatsScreenPals: + call CheckCGB + ret z + ld hl, StatsScreenPals + ld b, 0 + dec c + add hl, bc + add hl, bc + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld a, [hli] + ld [wBGPals1 palette 0], a + ld [wBGPals1 palette 2], a + ld a, [hl] + ld [wBGPals1 palette 0 + 1], a + ld [wBGPals1 palette 2 + 1], a + pop af + ldh [rSVBK], a + call ApplyPals + ld a, $1 + ret + +LoadMailPalettes: + ld l, e + ld h, 0 + add hl, hl + add hl, hl + add hl, hl + ld de, .MailPals + add hl, de + call CheckCGB + jr nz, .cgb + push hl + ld hl, PalPacket_Pal01 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + pop hl + inc hl + inc hl + ld a, [hli] + ld [wSGBPals + 3], a + ld a, [hli] + ld [wSGBPals + 4], a + ld a, [hli] + ld [wSGBPals + 5], a + ld a, [hli] + ld [wSGBPals + 6], a + ld hl, wSGBPals + call PushSGBPals + ld hl, BlkPacket_AllPal0 + call PushSGBPals + ret + +.cgb + ld de, wBGPals1 + ld bc, 1 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + call ApplyPals + call WipeAttrmap + call ApplyAttrmap + ret + +.MailPals: +INCLUDE "gfx/mail/mail.pal" + +INCLUDE "engine/gfx/cgb_layouts.asm" + +CopyFourPalettes: + ld de, wBGPals1 + ld c, 4 + +CopyPalettes: +.loop + push bc + ld a, [hli] + push hl + call GetPredefPal + call LoadHLPaletteIntoDE + pop hl + inc hl + pop bc + dec c + jr nz, .loop + ret + +GetPredefPal: + ld l, a + ld h, 0 + add hl, hl + add hl, hl + add hl, hl + ld bc, PredefPals + add hl, bc + ret + +LoadHLPaletteIntoDE: + ldh a, [rSVBK] + push af + ld a, BANK(wOBPals1) + ldh [rSVBK], a + ld c, 1 palettes +.loop + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .loop + pop af + ldh [rSVBK], a + ret + +LoadPalette_White_Col1_Col2_Black: + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + + ld a, LOW(PALRGB_WHITE) + ld [de], a + inc de + ld a, HIGH(PALRGB_WHITE) + ld [de], a + inc de + + ld c, 2 * PAL_COLOR_SIZE +.loop + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .loop + + xor a + ld [de], a + inc de + ld [de], a + inc de + + pop af + ldh [rSVBK], a + ret + +FillBoxCGB: +.row + push bc + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + ret + +ResetBGPals: + push af + push bc + push de + push hl + + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + + ld hl, wBGPals1 + ld c, 1 palettes +.loop + ld a, $ff + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + xor a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hli], a + dec c + jr nz, .loop + + pop af + ldh [rSVBK], a + + pop hl + pop de + pop bc + pop af + ret + +WipeAttrmap: + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + xor a + call ByteFill + ret + +ApplyPals: + ld hl, wBGPals1 + ld de, wBGPals2 + ld bc, 16 palettes + ld a, BANK(wGBCPalettes) + call FarCopyWRAM + ret + +ApplyAttrmap: + ldh a, [rLCDC] + bit rLCDC_ENABLE, a + jr z, .UpdateVBank1 + ldh a, [hBGMapMode] + push af + ld a, $2 + ldh [hBGMapMode], a + call DelayFrame + call DelayFrame + call DelayFrame + call DelayFrame + pop af + ldh [hBGMapMode], a + ret + +.UpdateVBank1: + hlcoord 0, 0, wAttrmap + debgcoord 0, 0 + ld b, SCREEN_HEIGHT + ld a, $1 + ldh [rVBK], a +.row + ld c, SCREEN_WIDTH +.col + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .col + ld a, BG_MAP_WIDTH - SCREEN_WIDTH + add e + jr nc, .okay + inc d +.okay + ld e, a + dec b + jr nz, .row + ld a, $0 + ldh [rVBK], a + ret + +; CGB layout for SCGB_PARTY_MENU_HP_BARS +CGB_ApplyPartyMenuHPPals: + ld hl, wHPPals + ld a, [wSGBPals] + ld e, a + ld d, 0 + add hl, de + ld e, l + ld d, h + ld a, [de] + inc a + ld e, a + hlcoord 11, 2, wAttrmap + ld bc, 2 * SCREEN_WIDTH + ld a, [wSGBPals] +.loop + and a + jr z, .done + add hl, bc + dec a + jr .loop +.done + lb bc, 2, 8 + ld a, e + call FillBoxCGB + ret + +InitPartyMenuOBPals: + ld hl, PartyMenuOBPals + ld de, wOBPals1 + ld bc, 2 palettes + ld a, BANK(wOBPals1) + call FarCopyWRAM + ret + +GetBattlemonBackpicPalettePointer: + push de + farcall GetPartyMonDVs + ld c, l + ld b, h + ld a, [wTempBattleMonSpecies] + call GetPlayerOrMonPalettePointer + pop de + ret + +GetEnemyFrontpicPalettePointer: + push de + farcall GetEnemyMonDVs + ld c, l + ld b, h + ld a, [wTempEnemyMonSpecies] + call GetFrontpicPalettePointer + pop de + ret + +GetPlayerOrMonPalettePointer: + and a + jp nz, GetMonNormalOrShinyPalettePointer + ld a, [wPlayerSpriteSetupFlags] + bit PLAYERSPRITESETUP_FEMALE_TO_MALE_F, a + jr nz, .male + ld a, [wPlayerGender] + and a + jr z, .male + ld hl, KrisPalette + ret + +.male + ld hl, PlayerPalette + ret + +GetFrontpicPalettePointer: + and a + jp nz, GetMonNormalOrShinyPalettePointer + ld a, [wTrainerClass] + +GetTrainerPalettePointer: + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld bc, TrainerPalettes + add hl, bc + ret + +GetMonPalettePointer: + call _GetMonPalettePointer + ret + +CGBCopyBattleObjectPals: ; unreferenced +; dummied out + ret + call CheckCGB + ret z + ld hl, BattleObjectPals + ld a, (1 << rOBPI_AUTO_INCREMENT) | $10 + ldh [rOBPI], a + ld c, 6 palettes +.loop + ld a, [hli] + ldh [rOBPD], a + dec c + jr nz, .loop + ld hl, BattleObjectPals + ld de, wOBPals1 palette 2 + ld bc, 2 palettes + ld a, BANK(wOBPals1) + call FarCopyWRAM + ret + +BattleObjectPals: +INCLUDE "gfx/battle_anims/battle_anims.pal" + +CGBCopyTwoPredefObjectPals: ; unreferenced + call CheckCGB + ret z + ld a, (1 << rOBPI_AUTO_INCREMENT) | $10 + ldh [rOBPI], a + ld a, PREDEFPAL_TRADE_TUBE + call GetPredefPal + call .PushPalette + ld a, PREDEFPAL_RB_GREENMON + call GetPredefPal + call .PushPalette + ret + +.PushPalette: + ld c, 1 palettes +.loop + ld a, [hli] + ldh [rOBPD], a + dec c + jr nz, .loop + ret + +_GetMonPalettePointer: + call GetPokemonIndexFromID + add hl, hl + add hl, hl + add hl, hl + ld bc, PokemonPalettes + add hl, bc + ret + +GetMonNormalOrShinyPalettePointer: + push bc + call _GetMonPalettePointer + pop bc + push hl + call CheckShininess + pop hl + ret nc +rept 4 + inc hl +endr + ret + +PushSGBPals: + ld a, [wJoypadDisable] + push af + set JOYPAD_DISABLE_SGB_TRANSFER_F, a + ld [wJoypadDisable], a + call _PushSGBPals + pop af + ld [wJoypadDisable], a + ret + +_PushSGBPals: + ld a, [hl] + and $7 + ret z + ld b, a +.loop + push bc + xor a + ldh [rJOYP], a + ld a, $30 + ldh [rJOYP], a + ld b, $10 +.loop2 + ld e, $8 + ld a, [hli] + ld d, a +.loop3 + bit 0, d + ld a, $10 + jr nz, .okay + ld a, $20 +.okay + ldh [rJOYP], a + ld a, $30 + ldh [rJOYP], a + rr d + dec e + jr nz, .loop3 + dec b + jr nz, .loop2 + ld a, $20 + ldh [rJOYP], a + ld a, $30 + ldh [rJOYP], a + call SGBDelayCycles + pop bc + dec b + jr nz, .loop + ret + +InitSGBBorder: + call CheckCGB + ret nz + +; SGB/DMG only + di + ld a, [wJoypadDisable] + push af + set JOYPAD_DISABLE_SGB_TRANSFER_F, a + ld [wJoypadDisable], a + + xor a + ldh [rJOYP], a + ldh [hSGB], a + call PushSGBBorderPalsAndWait + jr nc, .skip + ld a, $1 + ldh [hSGB], a + call _InitSGBBorderPals + call SGBBorder_PushBGPals + call SGBDelayCycles + call SGB_ClearVRAM + call PushSGBBorder + call SGBDelayCycles + call SGB_ClearVRAM + ld hl, MaskEnCancelPacket + call _PushSGBPals + +.skip + pop af + ld [wJoypadDisable], a + ei + ret + +InitCGBPals:: + call CheckCGB + ret z + +; CGB only + ld a, BANK(vTiles3) + ldh [rVBK], a + ld hl, vTiles3 + ld bc, $200 tiles + xor a + call ByteFill + ld a, BANK(vTiles0) + ldh [rVBK], a + ld a, 1 << rBGPI_AUTO_INCREMENT + ldh [rBGPI], a + ld c, 4 * 8 +.bgpals_loop + ld a, LOW(PALRGB_WHITE) + ldh [rBGPD], a + ld a, HIGH(PALRGB_WHITE) + ldh [rBGPD], a + dec c + jr nz, .bgpals_loop + ld a, 1 << rOBPI_AUTO_INCREMENT + ldh [rOBPI], a + ld c, 4 * 8 +.obpals_loop + ld a, LOW(PALRGB_WHITE) + ldh [rOBPD], a + ld a, HIGH(PALRGB_WHITE) + ldh [rOBPD], a + dec c + jr nz, .obpals_loop + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, wBGPals1 + call .LoadWhitePals + ld hl, wBGPals2 + call .LoadWhitePals + pop af + ldh [rSVBK], a + ret + +.LoadWhitePals: + ld c, 4 * 16 +.loop + ld a, LOW(PALRGB_WHITE) + ld [hli], a + ld a, HIGH(PALRGB_WHITE) + ld [hli], a + dec c + jr nz, .loop + ret + +_InitSGBBorderPals: + ld hl, .PacketPointerTable + ld c, 9 +.loop + push bc + ld a, [hli] + push hl + ld h, [hl] + ld l, a + call _PushSGBPals + pop hl + inc hl + pop bc + dec c + jr nz, .loop + ret + +.PacketPointerTable: + dw MaskEnFreezePacket + dw DataSndPacket1 + dw DataSndPacket2 + dw DataSndPacket3 + dw DataSndPacket4 + dw DataSndPacket5 + dw DataSndPacket6 + dw DataSndPacket7 + dw DataSndPacket8 + +UpdateSGBBorder: ; unreferenced + di + xor a + ldh [rJOYP], a + ld hl, MaskEnFreezePacket + call _PushSGBPals + call PushSGBBorder + call SGBDelayCycles + call SGB_ClearVRAM + ld hl, MaskEnCancelPacket + call _PushSGBPals + ei + ret + +PushSGBBorder: + call .LoadSGBBorderPointers + push de + call SGBBorder_YetMorePalPushing + pop hl + call SGBBorder_MorePalPushing + ret + +.LoadSGBBorderPointers: + ld hl, SGBBorderGFX + ld de, SGBBorderMapAndPalettes + ret + +SGB_ClearVRAM: + ld hl, VRAM_Begin + ld bc, VRAM_End - VRAM_Begin + xor a + call ByteFill + ret + +PushSGBBorderPalsAndWait: + ld hl, MltReq2Packet + call _PushSGBPals + call SGBDelayCycles + ldh a, [rJOYP] + and $3 + cp $3 + jr nz, .carry + ld a, $20 + ldh [rJOYP], a + ldh a, [rJOYP] + ldh a, [rJOYP] + call SGBDelayCycles + call SGBDelayCycles + ld a, $30 + ldh [rJOYP], a + call SGBDelayCycles + call SGBDelayCycles + ld a, $10 + ldh [rJOYP], a +rept 6 + ldh a, [rJOYP] +endr + call SGBDelayCycles + call SGBDelayCycles + ld a, $30 + ldh [rJOYP], a + ldh a, [rJOYP] + ldh a, [rJOYP] + ldh a, [rJOYP] + call SGBDelayCycles + call SGBDelayCycles + ldh a, [rJOYP] + and $3 + cp $3 + jr nz, .carry + call .FinalPush + and a + ret + +.carry + call .FinalPush + scf + ret + +.FinalPush: + ld hl, MltReq1Packet + call _PushSGBPals + vc_hook Unknown_network_reset ; Unknown why this hook is here, doesn't seem to be needed + jp SGBDelayCycles + +SGBBorder_PushBGPals: + call DisableLCD + ld a, %11100100 + ldh [rBGP], a + ld hl, PredefPals + ld de, vTiles1 + ld bc, $100 tiles + call CopyData + call DrawDefaultTiles + ld a, LCDC_DEFAULT + ldh [rLCDC], a + ld hl, PalTrnPacket + call _PushSGBPals + xor a + ldh [rBGP], a + ret + +SGBBorder_MorePalPushing: + call DisableLCD + ld a, $e4 + ldh [rBGP], a + ld de, vTiles1 + ld bc, (6 + SCREEN_WIDTH + 6) * 5 * 2 + call CopyData + ld b, SCREEN_HEIGHT +.loop + push bc + ld bc, 6 * 2 + call CopyData + ld bc, SCREEN_WIDTH * 2 + call ClearBytes + ld bc, 6 * 2 + call CopyData + pop bc + dec b + jr nz, .loop + ld bc, (6 + SCREEN_WIDTH + 6) * 5 * 2 + call CopyData + ld bc, $100 + call ClearBytes + ld bc, 16 palettes + call CopyData + call DrawDefaultTiles + ld a, LCDC_DEFAULT + ldh [rLCDC], a + ld hl, PctTrnPacket + call _PushSGBPals + xor a + ldh [rBGP], a + ret + +SGBBorder_YetMorePalPushing: + call DisableLCD + ld a, %11100100 + ldh [rBGP], a + ld de, vTiles1 + ld b, $80 +.loop + push bc + ld bc, 1 tiles + call CopyData + ld bc, 1 tiles + call ClearBytes + pop bc + dec b + jr nz, .loop + call DrawDefaultTiles + ld a, LCDC_DEFAULT + ldh [rLCDC], a + ld hl, ChrTrnPacket + call _PushSGBPals + xor a + ldh [rBGP], a + ret + +CopyData: +; copy bc bytes of data from hl to de +.loop + ld a, [hli] + ld [de], a + inc de + dec bc + ld a, c + or b + jr nz, .loop + ret + +ClearBytes: +; clear bc bytes of data starting from de +.loop + xor a + ld [de], a + inc de + dec bc + ld a, c + or b + jr nz, .loop + ret + +DrawDefaultTiles: +; Draw 240 tiles (2/3 of the screen) from tiles in VRAM + hlbgcoord 0, 0 ; BG Map 0 + ld de, BG_MAP_WIDTH - SCREEN_WIDTH + ld a, $80 ; starting tile + ld c, 12 + 1 +.line + ld b, 20 +.tile + ld [hli], a + inc a + dec b + jr nz, .tile +; next line + add hl, de + dec c + jr nz, .line + ret + +SGBDelayCycles: + ld de, 7000 +.wait + nop + nop + nop + dec de + ld a, d + or e + jr nz, .wait + ret + +INCLUDE "gfx/sgb/blk_packets.asm" +INCLUDE "gfx/sgb/pal_packets.asm" +INCLUDE "data/sgb_ctrl_packets.asm" + +PredefPals: + table_width PALETTE_SIZE, PredefPals +INCLUDE "gfx/sgb/predef.pal" + assert_table_length NUM_PREDEF_PALS + +SGBBorderMapAndPalettes: +; interleaved tile ids and palette ids, without the center 20x18 screen area +INCBIN "gfx/sgb/sgb_border.sgb.tilemap" +; four SGB palettes of 16 colors each; only the first 4 colors are used +INCLUDE "gfx/sgb/sgb_border.pal" + +SGBBorderGFX: +INCBIN "gfx/sgb/sgb_border.2bpp" + +HPBarPals: +INCLUDE "gfx/battle/hp_bar.pal" + +ExpBarPalette: +INCLUDE "gfx/battle/exp_bar.pal" + +INCLUDE "data/pokemon/palettes.asm" + +INCLUDE "data/trainers/palettes.asm" + +LoadMapPals: + farcall LoadSpecialMapPalette + jr c, .got_pals + + ; Which palette group is based on whether we're outside or inside + ld a, [wEnvironment] + and 7 + ld e, a + ld d, 0 + ld hl, EnvironmentColorsPointers + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ; Futher refine by time of day + ld a, [wTimeOfDayPal] + maskbits NUM_DAYTIMES + add a + add a + add a + ld e, a + ld d, 0 + add hl, de + ld e, l + ld d, h + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, wBGPals1 + ld b, 8 +.outer_loop + ld a, [de] ; lookup index for TilesetBGPalette + push de + push hl + ld l, a + ld h, 0 + add hl, hl + add hl, hl + add hl, hl + ld de, TilesetBGPalette + add hl, de + ld e, l + ld d, h + pop hl + ld c, 1 palettes +.inner_loop + ld a, [de] + inc de + ld [hli], a + dec c + jr nz, .inner_loop + pop de + inc de + dec b + jr nz, .outer_loop + pop af + ldh [rSVBK], a + +.got_pals + ld a, [wTimeOfDayPal] + maskbits NUM_DAYTIMES + ld bc, 8 palettes + ld hl, MapObjectPals + call AddNTimes + ld de, wOBPals1 + ld bc, 8 palettes + ld a, BANK(wOBPals1) + call FarCopyWRAM + + ld a, [wEnvironment] + cp TOWN + jr z, .outside + cp ROUTE + ret nz +.outside + ld a, [wMapGroup] + ld l, a + ld h, 0 + add hl, hl + add hl, hl + add hl, hl + ld de, RoofPals + add hl, de + ld a, [wTimeOfDayPal] + maskbits NUM_DAYTIMES + cp NITE_F + jr c, .morn_day +rept 4 + inc hl +endr +.morn_day + ld de, wBGPals1 palette PAL_BG_ROOF color 1 + ld bc, 4 + ld a, BANK(wBGPals1) + call FarCopyWRAM + ret + +INCLUDE "data/maps/environment_colors.asm" + +PartyMenuBGMobilePalette: +INCLUDE "gfx/stats/party_menu_bg_mobile.pal" + +PartyMenuBGPalette: +INCLUDE "gfx/stats/party_menu_bg.pal" + +TilesetBGPalette: +INCLUDE "gfx/tilesets/bg_tiles.pal" + +MapObjectPals:: +INCLUDE "gfx/overworld/npc_sprites.pal" + +RoofPals: + table_width PAL_COLOR_SIZE * 2 * 2, RoofPals +INCLUDE "gfx/tilesets/roofs.pal" + assert_table_length NUM_MAP_GROUPS + 1 + +DiplomaPalettes: +INCLUDE "gfx/diploma/diploma.pal" + +PartyMenuOBPals: +INCLUDE "gfx/stats/party_menu_ob.pal" + +UnusedBattleObjectPals: ; unreferenced +INCLUDE "gfx/battle_anims/unused_battle_anims.pal" + +UnusedGSTitleBGPals: +INCLUDE "gfx/title/unused_gs_bg.pal" + +UnusedGSTitleOBPals: +INCLUDE "gfx/title/unused_gs_fg.pal" + +MalePokegearPals: +INCLUDE "gfx/pokegear/pokegear.pal" + +FemalePokegearPals: +INCLUDE "gfx/pokegear/pokegear_f.pal" + +BetaPokerPals: +INCLUDE "gfx/beta_poker/beta_poker.pal" + +SlotMachinePals: +INCLUDE "gfx/slots/slots.pal" diff --git a/engine/gfx/crystal_layouts.asm b/engine/gfx/crystal_layouts.asm new file mode 100644 index 0000000..f77d420 --- /dev/null +++ b/engine/gfx/crystal_layouts.asm @@ -0,0 +1,293 @@ +GetCrystalCGBLayout: + ld a, b + cp SCGB_DEFAULT + jr nz, .not_default + ld a, [wDefaultSGBLayout] +.not_default + push af + farcall ResetBGPals + pop af + ld l, a + ld h, 0 + add hl, hl + ld de, .Jumptable + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .done + push de + jp hl +.done: + ret + +.Jumptable: + dw _CrystalCGB_MobileLayout0 + dw _CrystalCGB_MobileLayout1 + dw _CrystalCGB_NameCard + +Crystal_FillBoxCGB: +; This is a copy of FillBoxCGB. +.row + push bc + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + ret + +Crystal_WipeAttrmap: +; This is a copy of WipeAttrmap. + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + xor a + call ByteFill + ret + +MG_Mobile_Layout_LoadPals: + ld de, wBGPals1 + ld hl, Palette_MysteryGiftMobile + ld bc, 5 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + ld de, wBGPals1 palette PAL_BG_TEXT + ld hl, Palette_TextBG7 + ld bc, 1 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + ret + +_CrystalCGB_MobileLayout0: + call MG_Mobile_Layout_LoadPals + call Crystal_WipeAttrmap + call MG_Mobile_Layout_CreatePalBoxes + farcall ApplyAttrmap + farcall ApplyPals + ret + +MG_Mobile_Layout_CreatePalBoxes: + hlcoord 0, 0, wAttrmap + lb bc, 4, 1 + ld a, $1 + call Crystal_FillBoxCGB + lb bc, 2, 1 + ld a, $2 + call Crystal_FillBoxCGB + lb bc, 6, 1 + ld a, $3 + call Crystal_FillBoxCGB + hlcoord 1, 0, wAttrmap + ld a, $1 + lb bc, 3, 18 + call Crystal_FillBoxCGB + lb bc, 2, 18 + ld a, $2 + call Crystal_FillBoxCGB + lb bc, 12, 18 + ld a, $3 + call Crystal_FillBoxCGB + hlcoord 19, 0, wAttrmap + lb bc, 4, 1 + ld a, $1 + call Crystal_FillBoxCGB + lb bc, 2, 1 + ld a, $2 + call Crystal_FillBoxCGB + lb bc, 6, 1 + ld a, $3 + call Crystal_FillBoxCGB + hlcoord 0, 12, wAttrmap + ld bc, 6 * SCREEN_WIDTH + ld a, $7 + call ByteFill + ret + +Palette_MysteryGiftMobile: +INCLUDE "gfx/mystery_gift/mg_mobile.pal" + +LoadOW_BGPal7:: + ld hl, Palette_TextBG7 + ld de, wBGPals1 palette PAL_BG_TEXT + ld bc, 1 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + ret + +Palette_TextBG7: +INCLUDE "gfx/font/bg_text.pal" + +Function49420:: + ld hl, MansionPalette1 + 8 palettes + ld de, wBGPals1 palette PAL_BG_ROOF + ld bc, 1 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + ret + +_CrystalCGB_MobileLayout1: + call MG_Mobile_Layout_LoadPals + ld de, wBGPals1 palette PAL_BG_TEXT + ld hl, .TextPalette + ld bc, 1 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + call Crystal_WipeAttrmap + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + xor a + call ByteFill + hlcoord 0, 14, wAttrmap + ld bc, 4 * SCREEN_WIDTH + ld a, $7 + call ByteFill + ld a, [wd002] + bit 6, a + jr z, .asm_49464 + call .Function49480 + jr .done + +.asm_49464 + call .Function49496 +.done + farcall ApplyAttrmap + farcall ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +.TextPalette: +INCLUDE "gfx/mystery_gift/mobile_text.pal" + +.Function49480: + hlcoord 0, 0, wAttrmap + lb bc, 4, SCREEN_WIDTH + ld a, $7 + call Crystal_FillBoxCGB + hlcoord 0, 2, wAttrmap + ld a, $4 + ld [hl], a + hlcoord 19, 2, wAttrmap + ld [hl], a + ret + +.Function49496: + hlcoord 0, 0, wAttrmap + lb bc, 2, SCREEN_WIDTH + ld a, $7 + call Crystal_FillBoxCGB + hlcoord 0, 1, wAttrmap + ld a, $4 + ld [hl], a + hlcoord 19, 1, wAttrmap + ld [hl], a + ret + +INCLUDE "engine/tilesets/tileset_palettes.asm" + +_CrystalCGB_NameCard: + ld hl, .BGPalette + ld de, wBGPals1 + ld bc, 1 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + farcall ApplyPals + call Crystal_WipeAttrmap + farcall ApplyAttrmap + ld hl, .OBPalette + ld de, wOBPals1 + ld bc, 1 palettes + ld a, BANK(wOBPals1) + call FarCopyWRAM + ret + +.BGPalette: +INCLUDE "gfx/mystery_gift/name_card_bg.pal" + +.OBPalette: +INCLUDE "gfx/mystery_gift/name_card_ob.pal" + +Function49742: + ld hl, .MobileBorderPalettes + ld de, wBGPals1 + ld bc, 8 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + farcall ApplyPals + ret + +.MobileBorderPalettes: +INCLUDE "gfx/trade/mobile_border.pal" + +_InitMG_Mobile_LinkTradePalMap: + hlcoord 0, 0, wAttrmap + lb bc, 16, 2 + ld a, $4 + call Crystal_FillBoxCGB + ld a, $3 + ldcoord_a 0, 1, wAttrmap + ldcoord_a 0, 14, wAttrmap + hlcoord 2, 0, wAttrmap + lb bc, 8, 18 + ld a, $5 + call Crystal_FillBoxCGB + hlcoord 2, 8, wAttrmap + lb bc, 8, 18 + ld a, $6 + call Crystal_FillBoxCGB + hlcoord 0, 16, wAttrmap + lb bc, 2, SCREEN_WIDTH + ld a, $4 + call Crystal_FillBoxCGB + ld a, $3 + lb bc, 6, 1 + hlcoord 6, 1, wAttrmap + call Crystal_FillBoxCGB + ld a, $3 + lb bc, 6, 1 + hlcoord 17, 1, wAttrmap + call Crystal_FillBoxCGB + ld a, $3 + lb bc, 6, 1 + hlcoord 6, 9, wAttrmap + call Crystal_FillBoxCGB + ld a, $3 + lb bc, 6, 1 + hlcoord 17, 9, wAttrmap + call Crystal_FillBoxCGB + ld a, $2 + hlcoord 2, 16, wAttrmap + ld [hli], a + ld a, $7 + ld [hli], a + ld [hli], a + ld [hli], a + ld a, $2 + ld [hl], a + hlcoord 2, 17, wAttrmap + ld a, $3 + ld bc, 6 + call ByteFill + ret + +_LoadTradeRoomBGPals: + ld hl, TradeRoomPalette + ld de, wBGPals1 palette PAL_BG_GREEN + ld bc, 6 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + farcall ApplyPals + ret + +TradeRoomPalette: +INCLUDE "gfx/trade/border.pal" + +InitMG_Mobile_LinkTradePalMap: + call _InitMG_Mobile_LinkTradePalMap + ret diff --git a/engine/gfx/dma_transfer.asm b/engine/gfx/dma_transfer.asm new file mode 100644 index 0000000..682302f --- /dev/null +++ b/engine/gfx/dma_transfer.asm @@ -0,0 +1,604 @@ +HDMATransferAttrmapAndTilemapToWRAMBank3:: + ld hl, .Function + jp CallInSafeGFXMode + +.Function: + decoord 0, 0, wAttrmap + ld hl, wScratchAttrmap + call PadAttrmapForHDMATransfer + decoord 0, 0 + ld hl, wScratchTilemap + call PadTilemapForHDMATransfer + ld a, $0 + ldh [rVBK], a + ld hl, wScratchTilemap + call HDMATransferToWRAMBank3 + ld a, $1 + ldh [rVBK], a + ld hl, wScratchAttrmap + call HDMATransferToWRAMBank3 + ret + +HDMATransferTilemapToWRAMBank3:: + ld hl, .Function + jp CallInSafeGFXMode + +.Function: + decoord 0, 0 + ld hl, wScratchTilemap + call PadTilemapForHDMATransfer + ld a, $0 + ldh [rVBK], a + ld hl, wScratchTilemap + call HDMATransferToWRAMBank3 + ret + +HDMATransferAttrmapToWRAMBank3: + ld hl, .Function + jp CallInSafeGFXMode + +.Function: + decoord 0, 0, wAttrmap + ld hl, wScratchAttrmap + call PadAttrmapForHDMATransfer + ld a, $1 + ldh [rVBK], a + ld hl, wScratchAttrmap + call HDMATransferToWRAMBank3 + ret + +ReloadMapPart:: + ld hl, .Function + jp CallInSafeGFXMode + +.Function: + decoord 0, 0, wAttrmap + ld hl, wScratchAttrmap + call PadAttrmapForHDMATransfer + decoord 0, 0 + ld hl, wScratchTilemap + call PadTilemapForHDMATransfer + call DelayFrame + + di + ldh a, [rVBK] + push af + ld a, $1 + ldh [rVBK], a + ld hl, wScratchAttrmap + call HDMATransfer_Wait127Scanlines_toBGMap + ld a, $0 + ldh [rVBK], a + ld hl, wScratchTilemap + call HDMATransfer_Wait127Scanlines_toBGMap + pop af + ldh [rVBK], a + ei + + ret + +Mobile_ReloadMapPart: + ld hl, ReloadMapPart ; useless + ld hl, .Function + jp CallInSafeGFXMode + +.Function: + decoord 0, 0, wAttrmap + ld hl, wScratchAttrmap + call PadAttrmapForHDMATransfer + decoord 0, 0 + ld hl, wScratchTilemap + call PadTilemapForHDMATransfer + call DelayFrame + + di + ldh a, [rVBK] + push af + ld a, $1 + ldh [rVBK], a + ld hl, wScratchAttrmap + call HDMATransfer_NoDI + ld a, $0 + ldh [rVBK], a + ld hl, wScratchTilemap + call HDMATransfer_NoDI + pop af + ldh [rVBK], a + ei + + ret + +Function1040d4: ; unreferenced + ld hl, .Function + jp CallInSafeGFXMode + +.Function + ld a, $1 + ldh [rVBK], a + ld a, BANK(w3_d800) + ldh [rSVBK], a + ld de, w3_d800 + ldh a, [hBGMapAddress + 1] + ldh [rHDMA1], a + ldh a, [hBGMapAddress] + ldh [rHDMA2], a + ld a, d + ldh [rHDMA3], a + ld a, e + ldh [rHDMA4], a + ld a, $23 + ldh [hDMATransfer], a + call WaitDMATransfer + ret + +Function1040fb: ; unreferenced + ld hl, .Function + jp CallInSafeGFXMode + +.Function + ld a, $1 + ldh [rVBK], a + ld a, BANK(w3_d800) + ldh [rSVBK], a + ld hl, w3_d800 + call HDMATransferToWRAMBank3 + ret + +OpenAndCloseMenu_HDMATransferTilemapAndAttrmap:: +; OpenText + ld hl, .Function + jp CallInSafeGFXMode + +.Function: + ; Transfer wAttrmap and Tilemap to BGMap + ; Fill vBGAttrs with $00 + ; Fill vBGTiles with " " + decoord 0, 0, wAttrmap + ld hl, wScratchAttrmap + call PadAttrmapForHDMATransfer + decoord 0, 0 + ld hl, wScratchTilemap + call PadTilemapForHDMATransfer + call DelayFrame + + di + ldh a, [rVBK] + push af + ld a, $1 + ldh [rVBK], a + ld hl, wScratchAttrmap + call HDMATransfer_Wait123Scanlines_toBGMap + ld a, $0 + ldh [rVBK], a + ld hl, wScratchTilemap + call HDMATransfer_Wait123Scanlines_toBGMap + pop af + ldh [rVBK], a + ei + ret + +Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap: + ld hl, .Function + jp CallInSafeGFXMode + +.Function: + ; Transfer wAttrmap and Tilemap to BGMap + ; Fill vBGAttrs with $00 + ; Fill vBGTiles with $ff + decoord 0, 0, wAttrmap + ld hl, wScratchAttrmap + call PadAttrmapForHDMATransfer + ld c, $ff + decoord 0, 0 + ld hl, wScratchTilemap + call PadMapForHDMATransfer + + ld a, $1 + ldh [rVBK], a + ld hl, wScratchAttrmap + call HDMATransfer_Wait127Scanlines_toBGMap + ld a, $0 + ldh [rVBK], a + ld hl, wScratchTilemap + call HDMATransfer_Wait127Scanlines_toBGMap + ret + +CallInSafeGFXMode: + ldh a, [hBGMapMode] + push af + ldh a, [hMapAnims] + push af + xor a + ldh [hBGMapMode], a + ldh [hMapAnims], a + ldh a, [rSVBK] + push af + ld a, BANK(wScratchTilemap) + ldh [rSVBK], a + ldh a, [rVBK] + push af + + call ._hl_ + + pop af + ldh [rVBK], a + pop af + ldh [rSVBK], a + pop af + ldh [hMapAnims], a + pop af + ldh [hBGMapMode], a + ret + +._hl_ + jp hl + +HDMATransferToWRAMBank3: + call _LoadHDMAParameters + ld a, $23 + ldh [hDMATransfer], a + +WaitDMATransfer: +.loop + call DelayFrame + ldh a, [hDMATransfer] + and a + jr nz, .loop + ret + +HDMATransfer_Wait127Scanlines_toBGMap: +; HDMA transfer from hl to [hBGMapAddress] +; hBGMapAddress -> de +; 2 * SCREEN_HEIGHT -> c + ldh a, [hBGMapAddress + 1] + ld d, a + ldh a, [hBGMapAddress] + ld e, a + ld c, 2 * SCREEN_HEIGHT + jr HDMATransfer_Wait127Scanlines + +HDMATransfer_Wait123Scanlines_toBGMap: +; HDMA transfer from hl to [hBGMapAddress] +; hBGMapAddress -> de +; 2 * SCREEN_HEIGHT -> c +; $7b --> b + ldh a, [hBGMapAddress + 1] + ld d, a + ldh a, [hBGMapAddress] + ld e, a + ld c, 2 * SCREEN_HEIGHT + jr HDMATransfer_Wait123Scanlines + +HDMATransfer_NoDI: +; HDMA transfer from hl to [hBGMapAddress] +; [hBGMapAddress] --> de +; 2 * SCREEN_HEIGHT --> c + ldh a, [hBGMapAddress + 1] + ld d, a + ldh a, [hBGMapAddress] + ld e, a + ld c, 2 * SCREEN_HEIGHT + + ; [rHDMA1, rHDMA2] = hl & $fff0 + ld a, h + ldh [rHDMA1], a + ld a, l + and $f0 + ldh [rHDMA2], a + ; [rHDMA3, rHDMA4] = de & $1ff0 + ld a, d + and $1f + ldh [rHDMA3], a + ld a, e + and $f0 + ldh [rHDMA4], a + ; b = c | %10000000 + ld a, c + dec c + or $80 + ld b, a + ; d = $7f - c + 1 + ld a, $7f + sub c + ld d, a + ; while [rLY] >= d: pass +.loop1 + ldh a, [rLY] + cp d + jr nc, .loop1 + ; while not [rSTAT] & 3: pass +.loop2 + ldh a, [rSTAT] + and $3 + jr z, .loop2 + ; load the 5th byte of HDMA + ld a, b + ldh [rHDMA5], a + ; wait until rLY advances (c + 1) times + ldh a, [rLY] + inc c + ld hl, rLY +.loop3 + cp [hl] + jr z, .loop3 + ld a, [hl] + dec c + jr nz, .loop3 + ld hl, rHDMA5 + res 7, [hl] + ret + +HDMATransfer_Wait123Scanlines: + ld b, $7b + jr _continue_HDMATransfer + +HDMATransfer_Wait127Scanlines: + ld b, $7f +_continue_HDMATransfer: +; a lot of waiting around for hardware registers + ; [rHDMA1, rHDMA2] = hl & $fff0 + ld a, h + ldh [rHDMA1], a + ld a, l + and $f0 ; high nybble + ldh [rHDMA2], a + ; [rHDMA3, rHDMA4] = de & $1ff0 + ld a, d + and $1f ; lower 5 bits + ldh [rHDMA3], a + ld a, e + and $f0 ; high nybble + ldh [rHDMA4], a + ; e = c | %10000000 + ld a, c + dec c + or $80 + ld e, a + ; d = b - c + 1 + ld a, b + sub c + ld d, a + ; while [rLY] >= d: pass +.ly_loop + ldh a, [rLY] + cp d + jr nc, .ly_loop + + di + ; while [rSTAT] & 3: pass +.rstat_loop_1 + ldh a, [rSTAT] + and $3 + jr nz, .rstat_loop_1 + ; while not [rSTAT] & 3: pass +.rstat_loop_2 + ldh a, [rSTAT] + and $3 + jr z, .rstat_loop_2 + ; load the 5th byte of HDMA + ld a, e + ldh [rHDMA5], a + ; wait until rLY advances (c + 1) times + ldh a, [rLY] + inc c + ld hl, rLY +.final_ly_loop + cp [hl] + jr z, .final_ly_loop + ld a, [hl] + dec c + jr nz, .final_ly_loop + ld hl, rHDMA5 + res 7, [hl] + ei + + ret + +_LoadHDMAParameters: + ld a, h + ldh [rHDMA1], a + ld a, l + ldh [rHDMA2], a + ldh a, [hBGMapAddress + 1] + and $1f + ldh [rHDMA3], a + ldh a, [hBGMapAddress] + ldh [rHDMA4], a + ret + +PadTilemapForHDMATransfer: + ld c, " " + jr PadMapForHDMATransfer + +PadAttrmapForHDMATransfer: + ld c, $0 + +PadMapForHDMATransfer: +; pad a 20x18 map to 32x18 for HDMA transfer +; back up the padding value in c to hMapObjectIndex + ldh a, [hMapObjectIndex] + push af + ld a, c + ldh [hMapObjectIndex], a + +; for each row on the screen + ld c, SCREEN_HEIGHT +.loop1 +; for each tile in the row + ld b, SCREEN_WIDTH +.loop2 +; copy from de to hl + ld a, [de] + inc de + ld [hli], a + dec b + jr nz, .loop2 + +; load the original padding value of c into hl for 32 - 20 = 12 rows + ldh a, [hMapObjectIndex] + ld b, BG_MAP_WIDTH - SCREEN_WIDTH +.loop3 + ld [hli], a + dec b + jr nz, .loop3 + + dec c + jr nz, .loop1 + +; restore the original value of hMapObjectIndex + pop af + ldh [hMapObjectIndex], a + ret + +HDMATransfer2bpp:: + ; 2bpp when [rLCDC] & $80 + ; switch to WRAM bank 6 + ldh a, [rSVBK] + push af + ld a, BANK(wScratchTilemap) + ldh [rSVBK], a + + push bc + push hl + + ; Copy c tiles of the 2bpp from b:de to wScratchTilemap + ld a, b ; bank + ld l, c ; number of tiles + ld h, $0 + ; multiply by 16 (16 bytes of a 2bpp = 8 x 8 tile) + add hl, hl + add hl, hl + add hl, hl + add hl, hl + ld b, h + ld c, l + ld h, d ; address + ld l, e + ld de, wScratchTilemap + call FarCopyBytes + + pop hl + pop bc + + push bc + call DelayFrame + pop bc + + ld d, h + ld e, l + ld hl, wScratchTilemap + call HDMATransfer_Wait127Scanlines + + ; restore the previous bank + pop af + ldh [rSVBK], a + ret + +HDMATransfer1bpp:: + ; 1bpp when [rLCDC] & $80 +.loop + ld a, c + cp $10 + jp c, .bankswitch + jp z, .bankswitch + push bc + push hl + push de + ld c, $10 + call .bankswitch + pop de + ld hl, $80 + add hl, de + ld d, h + ld e, l + pop hl + lb bc, 1, 0 + add hl, bc + pop bc + ld a, c + sub $10 + ld c, a + jr .loop + +.bankswitch + ldh a, [rSVBK] + push af + ld a, BANK(wScratchTilemap) + ldh [rSVBK], a + + push bc + push hl + + ld a, b + ld l, c + ld h, $0 + add hl, hl ; multiply by 8 + add hl, hl ; multiply by 8 + add hl, hl ; multiply by 8 + ld c, l + ld b, h + ld h, d + ld l, e + ld de, wScratchTilemap + call FarCopyBytesDouble_DoubleBankSwitch + + pop hl + pop bc + + push bc + call DelayFrame + pop bc + + ld d, h + ld e, l + ld hl, wScratchTilemap + call HDMATransfer_Wait127Scanlines + + pop af + ldh [rSVBK], a + ret + +HDMATransfer_OnlyTopFourRows: + ld hl, .Function + jp CallInSafeGFXMode + +.Function: + ld hl, wScratchTilemap + decoord 0, 0 + call .Copy + ld hl, wScratchTilemap + $80 + decoord 0, 0, wAttrmap + call .Copy + ld a, $1 + ldh [rVBK], a + ld c, $8 + ld hl, wScratchTilemap + $80 + debgcoord 0, 0, vBGMap1 + call HDMATransfer_Wait127Scanlines + ld a, $0 + ldh [rVBK], a + ld c, $8 + ld hl, wScratchTilemap + debgcoord 0, 0, vBGMap1 + call HDMATransfer_Wait127Scanlines + ret + +.Copy: + ld b, 4 +.outer_loop + ld c, SCREEN_WIDTH +.inner_loop + ld a, [de] + ld [hli], a + inc de + dec c + jr nz, .inner_loop + ld a, l + add BG_MAP_WIDTH - SCREEN_WIDTH + ld l, a + ld a, h + adc 0 + ld h, a + dec b + jr nz, .outer_loop + ret diff --git a/engine/gfx/load_font.asm b/engine/gfx/load_font.asm new file mode 100644 index 0000000..2849659 --- /dev/null +++ b/engine/gfx/load_font.asm @@ -0,0 +1,144 @@ +INCLUDE "gfx/font.asm" + +EnableHDMAForGraphics: + db FALSE + +Get1bppOptionalHDMA: ; unreferenced + ld a, [EnableHDMAForGraphics] + and a + jp nz, Get1bppViaHDMA + jp Get1bpp + +Get2bppOptionalHDMA: ; unreferenced + ld a, [EnableHDMAForGraphics] + and a + jp nz, Get2bppViaHDMA + jp Get2bpp + +_LoadStandardFont:: + ld de, Font + ld hl, vTiles1 + lb bc, BANK(Font), 128 ; "A" to "9" + ldh a, [rLCDC] + bit rLCDC_ENABLE, a + jp z, Copy1bpp + + ld de, Font + ld hl, vTiles1 + lb bc, BANK(Font), 32 ; "A" to "]" + call Get1bppViaHDMA + ld de, Font + 32 * LEN_1BPP_TILE + ld hl, vTiles1 tile $20 + lb bc, BANK(Font), 32 ; "a" to $bf + call Get1bppViaHDMA + ld de, Font + 64 * LEN_1BPP_TILE + ld hl, vTiles1 tile $40 + lb bc, BANK(Font), 32 ; "Ä" to "←" + call Get1bppViaHDMA + ld de, Font + 96 * LEN_1BPP_TILE + ld hl, vTiles1 tile $60 + lb bc, BANK(Font), 32 ; "'" to "9" + call Get1bppViaHDMA + ret + +_LoadFontsExtra1:: + ld de, FontsExtra_SolidBlackGFX + ld hl, vTiles2 tile "■" ; $60 + lb bc, BANK(FontsExtra_SolidBlackGFX), 1 + call Get1bppViaHDMA + ld de, PokegearPhoneIconGFX + ld hl, vTiles2 tile "☎" ; $62 + lb bc, BANK(PokegearPhoneIconGFX), 1 + call Get2bppViaHDMA + ld de, FontExtra + 3 tiles ; "" + ld hl, vTiles2 tile "" + lb bc, BANK(FontExtra), 22 ; "" to "ぉ" + call Get2bppViaHDMA + jr LoadFrame + +_LoadFontsExtra2:: + ld de, FontsExtra2_UpArrowGFX + ld hl, vTiles2 tile "▲" ; $61 + ld b, BANK(FontsExtra2_UpArrowGFX) + ld c, 1 + call Get2bppViaHDMA + ret + +_LoadFontsBattleExtra:: + ld de, FontBattleExtra + ld hl, vTiles2 tile $60 + lb bc, BANK(FontBattleExtra), 25 + call Get2bppViaHDMA + jr LoadFrame + +LoadFrame: + ld a, [wTextboxFrame] + maskbits NUM_FRAMES + ld bc, TEXTBOX_FRAME_TILES * LEN_1BPP_TILE + ld hl, Frames + call AddNTimes + ld d, h + ld e, l + ld hl, vTiles2 tile "┌" ; $79 + lb bc, BANK(Frames), TEXTBOX_FRAME_TILES ; "┌" to "┘" + call Get1bppViaHDMA + ld hl, vTiles2 tile " " ; $7f + ld de, TextboxSpaceGFX + lb bc, BANK(TextboxSpaceGFX), 1 + call Get1bppViaHDMA + ret + +LoadBattleFontsHPBar: + ld de, FontBattleExtra + ld hl, vTiles2 tile $60 + lb bc, BANK(FontBattleExtra), 12 + call Get2bppViaHDMA + ld hl, vTiles2 tile $70 + ld de, FontBattleExtra + 16 tiles ; "" + lb bc, BANK(FontBattleExtra), 3 ; "" to "『" + call Get2bppViaHDMA + call LoadFrame + +LoadHPBar: + ld de, EnemyHPBarBorderGFX + ld hl, vTiles2 tile $6c + lb bc, BANK(EnemyHPBarBorderGFX), 4 + call Get1bppViaHDMA + ld de, HPExpBarBorderGFX + ld hl, vTiles2 tile $73 + lb bc, BANK(HPExpBarBorderGFX), 6 + call Get1bppViaHDMA + ld de, ExpBarGFX + ld hl, vTiles2 tile $55 + lb bc, BANK(ExpBarGFX), 9 + call Get2bppViaHDMA + ld de, MobilePhoneTilesGFX + 7 tiles ; mobile phone icon + ld hl, vTiles2 tile $5e + lb bc, BANK(MobilePhoneTilesGFX), 2 + call Get2bppViaHDMA + ret + +StatsScreen_LoadFont: + call _LoadFontsBattleExtra + ld de, EnemyHPBarBorderGFX + ld hl, vTiles2 tile $6c + lb bc, BANK(EnemyHPBarBorderGFX), 4 + call Get1bppViaHDMA + ld de, HPExpBarBorderGFX + ld hl, vTiles2 tile $78 + lb bc, BANK(HPExpBarBorderGFX), 1 + call Get1bppViaHDMA + ld de, HPExpBarBorderGFX + 3 * LEN_1BPP_TILE + ld hl, vTiles2 tile $76 + lb bc, BANK(HPExpBarBorderGFX), 2 + call Get1bppViaHDMA + ld de, ExpBarGFX + ld hl, vTiles2 tile $55 + lb bc, BANK(ExpBarGFX), 8 + call Get2bppViaHDMA +LoadStatsScreenPageTilesGFX: + ld de, StatsScreenPageTilesGFX + ld hl, vTiles2 tile $31 + lb bc, BANK(StatsScreenPageTilesGFX), 17 + call Get2bppViaHDMA + ret diff --git a/engine/gfx/load_overworld_font.asm b/engine/gfx/load_overworld_font.asm new file mode 100644 index 0000000..f4ef846 --- /dev/null +++ b/engine/gfx/load_overworld_font.asm @@ -0,0 +1,16 @@ +LoadOverworldFont:: + ld de, .OverworldFontGFX + ld hl, vTiles1 + lb bc, BANK(.OverworldFontGFX), $80 + call Get2bpp + ld de, .OverworldFontSpaceGFX + ld hl, vTiles2 tile " " + lb bc, BANK(.OverworldFontSpaceGFX), 1 + call Get2bpp + ret + +.OverworldFontGFX: +INCBIN "gfx/font/overworld.2bpp" + +.OverworldFontSpaceGFX: +INCBIN "gfx/font/overworld_space.2bpp" diff --git a/engine/gfx/load_pics.asm b/engine/gfx/load_pics.asm new file mode 100644 index 0000000..9cebf5d --- /dev/null +++ b/engine/gfx/load_pics.asm @@ -0,0 +1,468 @@ +GetUnownLetter: +; Return Unown letter in wUnownLetter based on DVs at hl + +; Take the middle 2 bits of each DV and place them in order: +; atk def spd spc +; .ww..xx. .yy..zz. + + ; atk + ld a, [hl] + and %01100000 + sla a + ld b, a + ; def + ld a, [hli] + and %00000110 + swap a + srl a + or b + ld b, a + + ; spd + ld a, [hl] + and %01100000 + swap a + sla a + or b + ld b, a + ; spc + ld a, [hl] + and %00000110 + srl a + or b + +; Divide by 10 to get 0-25 + ldh [hDividend + 3], a + xor a + ldh [hDividend], a + ldh [hDividend + 1], a + ldh [hDividend + 2], a + ld a, $ff / NUM_UNOWN + 1 + ldh [hDivisor], a + ld b, 4 + call Divide + +; Increment to get 1-26 + ldh a, [hQuotient + 3] + inc a + ld [wUnownLetter], a + ret + +GetMonFrontpic: + ld a, [wCurPartySpecies] + ld [wCurSpecies], a + call IsAPokemon + ret c + ldh a, [rSVBK] + push af + call _GetFrontpic + pop af + ldh [rSVBK], a + jp CloseSRAM + +GetAnimatedFrontpic: + ld a, [wCurPartySpecies] + ld [wCurSpecies], a + call IsAPokemon + ret c + ldh a, [rSVBK] + push af + xor a + ldh [hBGMapMode], a + call _GetFrontpic + ld a, BANK(vTiles3) + ldh [rVBK], a + call GetAnimatedEnemyFrontpic + xor a + ldh [rVBK], a + pop af + ldh [rSVBK], a + jp CloseSRAM + +_GetFrontpic: + ld a, BANK(sEnemyFrontPicTileCount) + call OpenSRAM + push de + call GetBaseData + ld a, [wBasePicSize] + and $f + ld b, a + push bc + call GetFrontpicPointer + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + ld a, b + ld de, wDecompressScratch + call FarDecompress + ; calculate tile count from final address; requires wDecompressScratch to be at the beginning of the bank + swap e + swap d + ld a, d + and $f0 ; get rid of the upper nibble of the address + or e + ; and save the tile count for later + ld [sEnemyFrontPicTileCount], a + pop bc + ld hl, sPaddedEnemyFrontPic + ld de, wDecompressScratch + call PadFrontpic + pop hl + push hl + ld de, sPaddedEnemyFrontPic + ld c, 7 * 7 + ldh a, [hROMBank] + ld b, a + call Get2bpp + pop hl + ret + +GetPicIndirectPointer: + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld b, h + ld c, l + ld a, l + sub LOW(UNOWN) + if HIGH(UNOWN) == 0 + or h + else + jr nz, .not_unown + if HIGH(UNOWN) == 1 + dec h + else + ld a, h + cp HIGH(UNOWN) + endc + endc + jr z, .unown +.not_unown + ld hl, PokemonPicPointers + ld d, BANK(PokemonPicPointers) +.done + ld a, 6 + jp AddNTimes + +.unown + ld a, [wUnownLetter] + ld c, a + ld b, 0 + ld hl, UnownPicPointers - 6 + ld d, BANK(UnownPicPointers) + jr .done + +GetFrontpicPointer: + call GetPicIndirectPointer + ld a, d + call GetFarByte + push af + inc hl + ld a, d + call GetFarWord + pop bc + ret + +GetAnimatedEnemyFrontpic: + push hl + ld de, sPaddedEnemyFrontPic + ld c, 7 * 7 + ldh a, [hROMBank] + ld b, a + call Get2bpp + pop hl + ld de, 7 * 7 tiles + add hl, de + push hl + ld a, BANK(wBasePicSize) + ld hl, wBasePicSize + call GetFarWRAMByte + pop hl + and $f + ld de, wDecompressScratch + 5 * 5 tiles + ld c, 5 * 5 + cp 5 + jr z, .got_dims + ld de, wDecompressScratch + 6 * 6 tiles + ld c, 6 * 6 + cp 6 + jr z, .got_dims + ld de, wDecompressScratch + 7 * 7 tiles + ld c, 7 * 7 +.got_dims + ; calculate the number of tiles dedicated to animation + ld a, [sEnemyFrontPicTileCount] + sub c + ; exit early if none + ret z + ld c, a + push hl + push bc + call LoadFrontpicTiles + pop bc + pop hl + ld de, wDecompressScratch + ldh a, [hROMBank] + ld b, a + ; if the tiles fit in a single VRAM block ($80 tiles), load them... + ld a, c + sub 128 - 7 * 7 + jr c, .finish + ; otherwise, load as many as we can... + inc a + ld [sEnemyFrontPicTileCount], a ; save the remainder + ld c, 127 - 7 * 7 + call Get2bpp + ; ...and load the rest into vTiles4 + ld de, wDecompressScratch + (127 - 7 * 7) tiles + ld hl, vTiles4 + ldh a, [hROMBank] + ld b, a + ld a, [sEnemyFrontPicTileCount] + ld c, a +.finish + jp Get2bpp + +LoadFrontpicTiles: + ld hl, wDecompressScratch + swap c + ld a, c + and $f + ld b, a + ld a, c + and $f0 + ld c, a + push bc + call LoadOrientedFrontpic + pop bc + ld a, c + and a + jr z, .handle_loop + inc b + jr .handle_loop + +.loop + push bc + ld c, 0 + call LoadOrientedFrontpic + pop bc +.handle_loop + dec b + jr nz, .loop + ret + +GetMonBackpic: + ld a, [wCurPartySpecies] + call IsAPokemon + ret c + + ldh a, [rSVBK] + push af + push de + call GetPicIndirectPointer + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + + inc hl + inc hl + inc hl + ld a, d + call GetFarByte + push af + inc hl + ld a, d + call GetFarWord + ld de, wDecompressScratch + pop af + call FarDecompress + ld hl, wDecompressScratch + ld c, 6 * 6 + call FixBackpicAlignment + pop hl + ld de, wDecompressScratch + ldh a, [hROMBank] + ld b, a + call Get2bpp + pop af + ldh [rSVBK], a + ret + +GetTrainerPic: + ld a, [wTrainerClass] + and a + ret z + cp NUM_TRAINER_CLASSES + 1 + ret nc + call WaitBGMap + xor a + ldh [hBGMapMode], a + ld hl, TrainerPicPointers + ld a, [wTrainerClass] + dec a + ld bc, 3 + call AddNTimes + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + push de + ld a, BANK(TrainerPicPointers) + call GetFarByte + push af + inc hl + ld a, BANK(TrainerPicPointers) + call GetFarWord + pop af + ld de, wDecompressScratch + call FarDecompress + pop hl + ld de, wDecompressScratch + ld c, 7 * 7 + ldh a, [hROMBank] + ld b, a + call Get2bpp + pop af + ldh [rSVBK], a + call WaitBGMap + ld a, 1 + ldh [hBGMapMode], a + ret + +DecompressGet2bpp: +; Decompress lz data from b:hl to wDecompressScratch, then copy it to address de. + + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + + push de + push bc + ld a, b + ld de, wDecompressScratch + call FarDecompress + pop bc + ld de, wDecompressScratch + pop hl + ldh a, [hROMBank] + ld b, a + call Get2bpp + + pop af + ldh [rSVBK], a + ret + +FixBackpicAlignment: + push de + push bc + ld a, [wBoxAlignment] + and a + jr z, .keep_dims + ld a, c + cp 7 * 7 + ld de, 7 * 7 tiles + jr z, .got_dims + cp 6 * 6 + ld de, 6 * 6 tiles + jr z, .got_dims + ld de, 5 * 5 tiles + +.got_dims + ld a, [hl] + ld b, 0 + ld c, 8 +.loop + rra + rl b + dec c + jr nz, .loop + ld a, b + ld [hli], a + dec de + ld a, e + or d + jr nz, .got_dims + +.keep_dims + pop bc + pop de + ret + +PadFrontpic: +; pads frontpic to fill 7x7 box + ld a, b + cp 6 + jr z, .six + cp 5 + jr z, .five + +.seven_loop + ld c, 7 << 4 + call LoadOrientedFrontpic + dec b + jr nz, .seven_loop + ret + +.six + ld c, 7 << 4 + xor a + call .Fill +.six_loop + ld c, (7 - 6) << 4 + xor a + call .Fill + ld c, 6 << 4 + call LoadOrientedFrontpic + dec b + jr nz, .six_loop + ret + +.five + ld c, 7 << 4 + xor a + call .Fill +.five_loop + ld c, (7 - 5) << 4 + xor a + call .Fill + ld c, 5 << 4 + call LoadOrientedFrontpic + dec b + jr nz, .five_loop + ld c, 7 << 4 + xor a + call .Fill + ret + +.Fill: + ld [hli], a + dec c + jr nz, .Fill + ret + +LoadOrientedFrontpic: + ld a, [wBoxAlignment] + and a + jr nz, .x_flip +.left_loop + ld a, [de] + inc de + ld [hli], a + dec c + jr nz, .left_loop + ret + +.x_flip + push bc +.right_loop + ld a, [de] + inc de + ld b, a + xor a +rept 8 + rr b + rla +endr + ld [hli], a + dec c + jr nz, .right_loop + pop bc + ret diff --git a/engine/gfx/load_push_oam.asm b/engine/gfx/load_push_oam.asm new file mode 100644 index 0000000..7fa5b11 --- /dev/null +++ b/engine/gfx/load_push_oam.asm @@ -0,0 +1,28 @@ +WriteOAMDMACodeToHRAM:: + ld c, LOW(hTransferShadowOAM) + ld b, OAMDMACodeEnd - OAMDMACode + ld hl, OAMDMACode +.copy + ld a, [hli] + ldh [c], a + inc c + dec b + jr nz, .copy + ret + +OAMDMACode: +; This code is defined in ROM, but +; copied to and called from HRAM. +LOAD "OAM DMA", HRAM +hTransferShadowOAM:: + ; initiate DMA + ld a, HIGH(wShadowOAM) + ldh [rDMA], a + ; wait for DMA to finish + ld a, NUM_SPRITE_OAM_STRUCTS +.wait + dec a + jr nz, .wait + ret +ENDL +OAMDMACodeEnd: diff --git a/engine/gfx/mon_icons.asm b/engine/gfx/mon_icons.asm new file mode 100644 index 0000000..b8b33e8 --- /dev/null +++ b/engine/gfx/mon_icons.asm @@ -0,0 +1,453 @@ +LoadOverworldMonIcon: + ld a, e + call ReadMonMenuIcon + ld l, a + ld h, 0 + add hl, hl + ld de, IconPointers + add hl, de + ld a, [hli] + ld e, a + ld d, [hl] + ld b, BANK(Icons) + ld c, 8 + ret + +LoadMenuMonIcon: + push hl + push de + push bc + call .LoadIcon + pop bc + pop de + pop hl + ret + +.LoadIcon: + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: +; entries correspond to MONICON_* constants + dw PartyMenu_InitAnimatedMonIcon ; MONICON_PARTYMENU + dw NamingScreen_InitAnimatedMonIcon ; MONICON_NAMINGSCREEN + dw MoveList_InitAnimatedMonIcon ; MONICON_MOVES + dw Trade_LoadMonIconGFX ; MONICON_TRADE + dw Mobile_InitAnimatedMonIcon ; MONICON_MOBILE1 + dw Mobile_InitPartyMenuBGPal71 ; MONICON_MOBILE2 + dw Unused_GetPartyMenuMonIcon ; MONICON_UNUSED + +Unused_GetPartyMenuMonIcon: + call InitPartyMenuIcon + call .GetPartyMonItemGFX + call SetPartyMonIconAnimSpeed + ret + +.GetPartyMonItemGFX: + push bc + ldh a, [hObjectStructIndex] + ld hl, wPartyMon1Item + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + pop bc + ld a, [hl] + and a + jr z, .no_item + push hl + push bc + ld d, a + callfar ItemIsMail + pop bc + pop hl + jr c, .not_mail + ld a, $06 + jr .got_tile +.not_mail + ld a, $05 + ; fallthrough + +.no_item + ld a, $04 +.got_tile + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld [hl], a + ret + +Mobile_InitAnimatedMonIcon: + call PartyMenu_InitAnimatedMonIcon + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld a, SPRITE_ANIM_SEQ_NULL + ld [hl], a + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld a, 9 * 8 + ld [hl], a + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, 9 * 8 + ld [hl], a + ret + +Mobile_InitPartyMenuBGPal71: + call InitPartyMenuIcon + call SetPartyMonIconAnimSpeed + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld a, SPRITE_ANIM_SEQ_NULL + ld [hl], a + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld a, 3 * 8 + ld [hl], a + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, 12 * 8 + ld [hl], a + ld a, c + ld [wc608], a + ld a, b + ld [wc608 + 1], a + ret + +PartyMenu_InitAnimatedMonIcon: + call InitPartyMenuIcon + call .SpawnItemIcon + call SetPartyMonIconAnimSpeed + ret + +.SpawnItemIcon: + push bc + ldh a, [hObjectStructIndex] + ld hl, wPartyMon1Item + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + pop bc + ld a, [hl] + and a + ret z + push hl + push bc + ld d, a + callfar ItemIsMail + pop bc + pop hl + jr c, .mail + ld a, SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_ITEM + jr .okay + +.mail + ld a, SPRITE_ANIM_FRAMESET_PARTY_MON_WITH_MAIL +.okay + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld [hl], a + ret + +InitPartyMenuIcon: + ld a, [wCurIconTile] + push af + ldh a, [hObjectStructIndex] + ld hl, wPartySpecies + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + call ReadMonMenuIcon + ld [wCurIcon], a + call GetMemIconGFX + ldh a, [hObjectStructIndex] +; y coord + add a + add a + add a + add a + add $1c + ld d, a +; x coord + ld e, $10 +; type is partymon icon + ld a, SPRITE_ANIM_INDEX_PARTY_MON + call _InitSpriteAnimStruct + pop af + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], a + ret + +SetPartyMonIconAnimSpeed: + push bc + ldh a, [hObjectStructIndex] + ld b, a + call .getspeed + ld a, b + pop bc + ld hl, SPRITEANIMSTRUCT_DURATIONOFFSET + add hl, bc + ld [hl], a + rlca + rlca + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], a + ret + +.getspeed + farcall PlacePartymonHPBar + call GetHPPal + ld e, d + ld d, 0 + ld hl, .speeds + add hl, de + ld b, [hl] + ret + +.speeds + db $00 ; HP_GREEN + db $40 ; HP_YELLOW + db $80 ; HP_RED + +NamingScreen_InitAnimatedMonIcon: + ld a, [wTempIconSpecies] + call ReadMonMenuIcon + ld [wCurIcon], a + xor a + call GetIconGFX + depixel 4, 4, 4, 0 + ld a, SPRITE_ANIM_INDEX_PARTY_MON + call _InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld [hl], SPRITE_ANIM_SEQ_NULL + ret + +MoveList_InitAnimatedMonIcon: + ld a, [wTempIconSpecies] + call ReadMonMenuIcon + ld [wCurIcon], a + xor a + call GetIconGFX + ld d, 3 * 8 + 2 ; depixel 3, 4, 2, 4 + ld e, 4 * 8 + 4 + ld a, SPRITE_ANIM_INDEX_PARTY_MON + call _InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld [hl], SPRITE_ANIM_SEQ_NULL + ret + +Trade_LoadMonIconGFX: + ld a, [wTempIconSpecies] + call ReadMonMenuIcon + ld [wCurIcon], a + ld a, $62 + ld [wCurIconTile], a + call GetMemIconGFX + ret + +GetSpeciesIcon: +; Load species icon into VRAM at tile a + push de + ld a, [wTempIconSpecies] + call ReadMonMenuIcon + ld [wCurIcon], a + pop de + ld a, e + call GetIconGFX + ret + +FlyFunction_GetMonIcon: + push de + ld a, [wTempIconSpecies] + call ReadMonMenuIcon + ld [wCurIcon], a + pop de + ld a, e + call GetIcon_a + ret + +GetMonIconDE: ; unreferenced + push de + ld a, [wTempIconSpecies] + call ReadMonMenuIcon + ld [wCurIcon], a + pop de + call GetIcon_de + ret + +GetMemIconGFX: + ld a, [wCurIconTile] +GetIconGFX: + call GetIcon_a + ld de, 8 tiles + add hl, de + ld de, HeldItemIcons + lb bc, BANK(HeldItemIcons), 2 + call GetGFXUnlessMobile + ld a, [wCurIconTile] + add 10 + ld [wCurIconTile], a + ret + +HeldItemIcons: +INCBIN "gfx/stats/mail.2bpp" +INCBIN "gfx/stats/item.2bpp" + +GetIcon_de: +; Load icon graphics into VRAM starting from tile de. + ld l, e + ld h, d + jr GetIcon + +GetIcon_a: +; Load icon graphics into VRAM starting from tile a. + ld l, a + ld h, 0 + +GetIcon: +; Load icon graphics into VRAM starting from tile hl. + +; One tile is 16 bytes long. +rept 4 + add hl, hl +endr + + ld de, vTiles0 + add hl, de + push hl + +; The icons are contiguous, in order and of the same +; size, so the pointer table is somewhat redundant. + ld a, [wCurIcon] + push hl + ld l, a + ld h, 0 + add hl, hl + ld de, IconPointers + add hl, de + ld a, [hli] + ld e, a + ld d, [hl] + pop hl + + lb bc, BANK(Icons), 8 + call GetGFXUnlessMobile + + pop hl + ret + +GetGFXUnlessMobile: + ld a, [wLinkMode] + cp LINK_MOBILE + jp nz, Request2bpp + jp Get2bppViaHDMA + +FreezeMonIcons: + ld hl, wSpriteAnimationStructs + ld e, PARTY_LENGTH + ld a, [wMenuCursorY] + ld d, a +.loop + ld a, [hl] + and a + jr z, .next + cp d + jr z, .loadwithtwo + ld a, SPRITE_ANIM_SEQ_NULL + jr .ok + +.loadwithtwo + ld a, SPRITE_ANIM_SEQ_PARTY_MON_SWITCH + +.ok + push hl + ld c, l + ld b, h + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld [hl], a + pop hl + +.next + ld bc, $10 + add hl, bc + dec e + jr nz, .loop + ret + +UnfreezeMonIcons: + ld hl, wSpriteAnimationStructs + ld e, PARTY_LENGTH +.loop + ld a, [hl] + and a + jr z, .next + push hl + ld c, l + ld b, h + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld [hl], SPRITE_ANIM_SEQ_PARTY_MON + pop hl +.next + ld bc, $10 + add hl, bc + dec e + jr nz, .loop + ret + +HoldSwitchmonIcon: + ld hl, wSpriteAnimationStructs + ld e, PARTY_LENGTH + ld a, [wSwitchMon] + ld d, a +.loop + ld a, [hl] + and a + jr z, .next + cp d + jr z, .is_switchmon + ld a, SPRITE_ANIM_SEQ_PARTY_MON_SELECTED + jr .join_back + +.is_switchmon + ld a, SPRITE_ANIM_SEQ_PARTY_MON_SWITCH +.join_back + push hl + ld c, l + ld b, h + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld [hl], a + pop hl +.next + ld bc, $10 + add hl, bc + dec e + jr nz, .loop + ret + +ReadMonMenuIcon: + cp EGG + jr z, .egg + call GetPokemonIndexFromID + ld de, MonMenuIcons - 1 + add hl, de + ld a, [hl] + ret +.egg + ld a, ICON_EGG + ret + +INCLUDE "data/pokemon/menu_icons.asm" + +INCLUDE "data/icon_pointers.asm" + +INCLUDE "gfx/icons.asm" diff --git a/engine/gfx/pic_animation.asm b/engine/gfx/pic_animation.asm new file mode 100644 index 0000000..2459fb1 --- /dev/null +++ b/engine/gfx/pic_animation.asm @@ -0,0 +1,1098 @@ +; Pic animation arrangement. + +Unused_AnimateMon_Slow_Normal: + hlcoord 12, 0 + ld a, [wBattleMode] + cp WILD_BATTLE + jr z, .wild + ld e, ANIM_MON_SLOW + ld d, $0 + call AnimateFrontpic + ret + +.wild + ld e, ANIM_MON_NORMAL + ld d, $0 + call AnimateFrontpic + ret + +AnimateMon_Menu: + ld e, ANIM_MON_MENU + ld d, $0 + call AnimateFrontpic + ret + +AnimateMon_Trade: + ld e, ANIM_MON_TRADE + ld d, $0 + call AnimateFrontpic + ret + +AnimateMon_Evolve: + ld e, ANIM_MON_EVOLVE + ld d, $0 + call AnimateFrontpic + ret + +AnimateMon_Hatch: + ld e, ANIM_MON_HATCH + ld d, $0 + call AnimateFrontpic + ret + +AnimateMon_HOF: + ld e, ANIM_MON_HOF + ld d, $0 + call AnimateFrontpic + ret + +MACRO pokeanim + rept _NARG + db (PokeAnim_\1_SetupCommand - PokeAnim_SetupCommands) / 2 + shift + endr + db (PokeAnim_Finish_SetupCommand - PokeAnim_SetupCommands) / 2 +ENDM + +PokeAnims: +; entries correspond to ANIM_MON_* constants + dw .Slow + dw .Normal + dw .Menu + dw .Trade + dw .Evolve + dw .Hatch + dw .HOF + dw .Egg1 + dw .Egg2 + +.Slow: pokeanim StereoCry, Setup2, Play +.Normal: pokeanim StereoCry, Setup, Play +.Menu: pokeanim CryNoWait, Setup, Play, SetWait, Wait, Idle, Play +.Trade: pokeanim Idle, Play2, Idle, Play, SetWait, Wait, Cry, Setup, Play +.Evolve: pokeanim Idle, Play, SetWait, Wait, CryNoWait, Setup, Play +.Hatch: pokeanim Idle, Play, CryNoWait, Setup, Play, SetWait, Wait, Idle, Play +.HOF: pokeanim CryNoWait, Setup, Play, SetWait, Wait, Idle, Play +.Egg1: pokeanim Setup, Play +.Egg2: pokeanim Idle, Play + +AnimateFrontpic: + call AnimateMon_CheckIfPokemon + ret c + call LoadMonAnimation +.loop + call SetUpPokeAnim + push af + farcall HDMATransferTilemapToWRAMBank3 + pop af + jr nc, .loop + ret + +LoadMonAnimation: + push hl + ld c, e + ld b, 0 + ld hl, PokeAnims + add hl, bc + add hl, bc + ld a, [hli] + ld b, [hl] + ld c, a + pop hl + call PokeAnim_InitPicAttributes + ret + +SetUpPokeAnim: + ldh a, [rSVBK] + push af + ld a, BANK(wPokeAnimStruct) + ldh [rSVBK], a + ld a, [wPokeAnimSceneIndex] + ld c, a + ld b, 0 + ld hl, wPokeAnimPointer + ld a, [hli] + ld h, [hl] + ld l, a + add hl, bc + ld a, [hl] + ld hl, PokeAnim_SetupCommands + rst JumpTable + ld a, [wPokeAnimSceneIndex] + ld c, a + pop af + ldh [rSVBK], a + ld a, c + and $80 + ret z + scf + ret + +MACRO add_setup_command +\1_SetupCommand: + dw \1 +ENDM + +PokeAnim_SetupCommands: + add_setup_command PokeAnim_Finish + add_setup_command PokeAnim_BasePic + add_setup_command PokeAnim_SetWait + add_setup_command PokeAnim_Wait + add_setup_command PokeAnim_Setup + add_setup_command PokeAnim_Setup2 + add_setup_command PokeAnim_Idle + add_setup_command PokeAnim_Play + add_setup_command PokeAnim_Play2 + add_setup_command PokeAnim_Cry + add_setup_command PokeAnim_CryNoWait + add_setup_command PokeAnim_StereoCry + +PokeAnim_SetWait: + ld a, 18 + ld [wPokeAnimWaitCounter], a + ld a, [wPokeAnimSceneIndex] + inc a + ld [wPokeAnimSceneIndex], a + +PokeAnim_Wait: + ld hl, wPokeAnimWaitCounter + dec [hl] + ret nz + ld a, [wPokeAnimSceneIndex] + inc a + ld [wPokeAnimSceneIndex], a + ret + +PokeAnim_Setup: + ld c, FALSE + ld b, 0 + call PokeAnim_InitAnim + call PokeAnim_SetVBank1 + ld a, [wPokeAnimSceneIndex] + inc a + ld [wPokeAnimSceneIndex], a + ret + +PokeAnim_Setup2: + ld c, FALSE + ld b, 4 + call PokeAnim_InitAnim + call PokeAnim_SetVBank1 + ld a, [wPokeAnimSceneIndex] + inc a + ld [wPokeAnimSceneIndex], a + ret + +PokeAnim_Idle: + ld c, TRUE + ld b, 0 + call PokeAnim_InitAnim + call PokeAnim_SetVBank1 + ld a, [wPokeAnimSceneIndex] + inc a + ld [wPokeAnimSceneIndex], a + ret + +PokeAnim_Play: + call PokeAnim_DoAnimScript + ld a, [wPokeAnimJumptableIndex] + bit 7, a + ret z + call PokeAnim_PlaceGraphic + ld a, [wPokeAnimSceneIndex] + inc a + ld [wPokeAnimSceneIndex], a + ret + +PokeAnim_Play2: + call PokeAnim_DoAnimScript + ld a, [wPokeAnimJumptableIndex] + bit 7, a + ret z + ld a, [wPokeAnimSceneIndex] + inc a + ld [wPokeAnimSceneIndex], a + ret + +PokeAnim_BasePic: + call PokeAnim_DeinitFrames + ld a, [wPokeAnimSceneIndex] + inc a + ld [wPokeAnimSceneIndex], a + ret + +PokeAnim_Finish: + call PokeAnim_DeinitFrames + ld hl, wPokeAnimSceneIndex + set 7, [hl] + ret + +PokeAnim_Cry: + ld a, [wPokeAnimSpecies] + call _PlayMonCry + ld a, [wPokeAnimSceneIndex] + inc a + ld [wPokeAnimSceneIndex], a + ret + +PokeAnim_CryNoWait: + ld a, [wPokeAnimSpecies] + call PlayMonCry2 + ld a, [wPokeAnimSceneIndex] + inc a + ld [wPokeAnimSceneIndex], a + ret + +PokeAnim_StereoCry: + ld a, $f + ld [wCryTracks], a + ld a, [wPokeAnimSpecies] + call PlayStereoCry2 + ld a, [wPokeAnimSceneIndex] + inc a + ld [wPokeAnimSceneIndex], a + ret + +PokeAnim_DeinitFrames: + ldh a, [rSVBK] + push af + ld a, BANK(wPokeAnimCoord) + ldh [rSVBK], a + call PokeAnim_PlaceGraphic + farcall HDMATransferTilemapToWRAMBank3 + call PokeAnim_SetVBank0 + farcall HDMATransferAttrmapToWRAMBank3 + pop af + ldh [rSVBK], a + ret + +AnimateMon_CheckIfPokemon: + ld a, [wCurPartySpecies] + cp EGG + jr z, .fail + call IsAPokemon + jr c, .fail + and a + ret + +.fail + scf + ret + +PokeAnim_InitPicAttributes: + ldh a, [rSVBK] + push af + ld a, BANK(wPokeAnimStruct) + ldh [rSVBK], a + + push bc + push de + push hl + ld hl, wPokeAnimStruct + ld bc, wPokeAnimStructEnd - wPokeAnimStruct + xor a + call ByteFill + pop hl + pop de + pop bc + +; bc contains anim pointer + ld a, c + ld [wPokeAnimPointer], a + ld a, b + ld [wPokeAnimPointer + 1], a +; hl contains tilemap coords + ld a, l + ld [wPokeAnimCoord], a + ld a, h + ld [wPokeAnimCoord + 1], a +; d = start tile + ld a, d + ld [wPokeAnimGraphicStartTile], a + + ld a, BANK(wCurPartySpecies) + ld hl, wCurPartySpecies + call GetFarWRAMByte + ld [wPokeAnimSpecies], a + + ld a, BANK(wUnownLetter) + ld hl, wUnownLetter + call GetFarWRAMByte + ld [wPokeAnimUnownLetter], a + + call PokeAnim_GetSpeciesOrUnown + ld [wPokeAnimSpeciesOrUnown], a + + call PokeAnim_GetFrontpicDims + ld a, c + ld [wPokeAnimFrontpicHeight], a + + pop af + ldh [rSVBK], a + ret + +PokeAnim_InitAnim: + ldh a, [rSVBK] + push af + ld a, BANK(wPokeAnimIdleFlag) + ldh [rSVBK], a + push bc + ld hl, wPokeAnimIdleFlag + ld bc, wPokeAnimStructEnd - wPokeAnimIdleFlag + xor a + call ByteFill + pop bc + ld a, b + ld [wPokeAnimSpeed], a + ld a, c + ld [wPokeAnimIdleFlag], a + call GetMonAnimPointer + call GetMonFramesPointer + call GetMonBitmaskPointer + pop af + ldh [rSVBK], a + ret + +PokeAnim_DoAnimScript: + xor a + ldh [hBGMapMode], a +.loop + ld a, [wPokeAnimJumptableIndex] + and $7f + ld hl, .Jumptable + rst JumpTable + ret + +.Jumptable: + dw .RunAnim + dw .WaitAnim + +.RunAnim: + call PokeAnim_GetPointer + ld a, [wPokeAnimCommand] + cp endanim_command + jr z, PokeAnim_End + cp setrepeat_command + jr z, .SetRepeat + cp dorepeat_command + jr z, .DoRepeat + call PokeAnim_GetFrame + ld a, [wPokeAnimParameter] + call PokeAnim_GetDuration + ld [wPokeAnimWaitCounter], a + call PokeAnim_StartWaitAnim +.WaitAnim: + ld a, [wPokeAnimWaitCounter] + dec a + ld [wPokeAnimWaitCounter], a + ret nz + call PokeAnim_StopWaitAnim + ret + +.SetRepeat: + ld a, [wPokeAnimParameter] + ld [wPokeAnimRepeatTimer], a + jr .loop + +.DoRepeat: + ld a, [wPokeAnimRepeatTimer] + and a + ret z + dec a + ld [wPokeAnimRepeatTimer], a + ret z + ld a, [wPokeAnimParameter] + ld [wPokeAnimFrame], a + jr .loop + +PokeAnim_End: + ld hl, wPokeAnimJumptableIndex + set 7, [hl] + ret + +PokeAnim_GetDuration: +; a * (1 + [wPokeAnimSpeed] / 16) + ld c, a + ld b, 0 + ld hl, 0 + ld a, [wPokeAnimSpeed] + call AddNTimes + ld a, h + swap a + and $f0 + ld h, a + ld a, l + swap a + and $f + or h + add c + ret + +PokeAnim_GetFrame: + call PokeAnim_PlaceGraphic + ld a, [wPokeAnimCommand] + and a + ret z + call PokeAnim_GetBitmaskIndex + push hl + call PokeAnim_CopyBitmaskToBuffer + pop hl + call PokeAnim_ConvertAndApplyBitmask + ret + +PokeAnim_StartWaitAnim: + ld a, [wPokeAnimJumptableIndex] + inc a + ld [wPokeAnimJumptableIndex], a + ret + +PokeAnim_StopWaitAnim: + ld a, [wPokeAnimJumptableIndex] + dec a + ld [wPokeAnimJumptableIndex], a + ret + +PokeAnim_IsUnown: + ld a, [wPokeAnimSpecies] + push hl + call GetPokemonIndexFromID + ld a, l + cp LOW(UNOWN) + ld a, h + pop hl + ret nz + if HIGH(UNOWN) == 0 + and a + elif HIGH(UNOWN) == 1 + dec a + else + cp HIGH(UNOWN) + endc + ret + +PokeAnim_IsEgg: + ld a, [wPokeAnimSpecies] + cp EGG + ret + +PokeAnim_GetPointer: + push hl + ld a, [wPokeAnimFrame] + ld e, a + ld d, 0 + ld hl, wPokeAnimPointerAddr + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + add hl, de + ld a, [wPokeAnimPointerBank] + call GetFarWord + ld a, l + ld [wPokeAnimCommand], a + ld a, h + ld [wPokeAnimParameter], a + ld hl, wPokeAnimFrame + inc [hl] + pop hl + ret + +PokeAnim_GetBitmaskIndex: + ld a, [wPokeAnimCommand] + dec a + ld c, a + ld b, 0 + ld hl, wPokeAnimFramesAddr + ld a, [hli] + ld h, [hl] + ld l, a + add hl, bc + add hl, bc + ld a, [wPokeAnimFramesBank] + call GetFarWord + ld a, [wPokeAnimFramesBank] + call GetFarByte + ld [wPokeAnimCurBitmask], a + inc hl + ret + +PokeAnim_CopyBitmaskToBuffer: + call .GetSize + push bc + ld hl, wPokeAnimBitmaskAddr + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wPokeAnimCurBitmask] + call AddNTimes + pop bc + ld de, wPokeAnimBitmaskBuffer + ld a, [wPokeAnimBitmaskBank] + call FarCopyBytes + ret + +.GetSize: + push hl + ld a, [wPokeAnimFrontpicHeight] + sub 5 ; to get a number 0, 1, or 2 + ld c, a + ld b, 0 + ld hl, .Sizes + add hl, bc + ld c, [hl] + ld b, 0 + pop hl + ret + +.Sizes: db 4, 5, 7 + +MACRO poke_anim_box + for y, 1, \1 + 1 + for x, 7 - \1, 7 + db y * 7 + x + endr + endr +ENDM + +PokeAnim_ConvertAndApplyBitmask: + xor a + ld [wPokeAnimBitmaskCurBit], a + ld [wPokeAnimBitmaskCurRow], a + ld [wPokeAnimBitmaskCurCol], a +.loop + push hl + call .IsCurBitSet + pop hl + ld a, b + and a + jr z, .next + + ld a, [wPokeAnimFramesBank] + call GetFarByte + inc hl + push hl + call .ApplyFrame + pop hl + +.next + push hl + call .NextBit + pop hl + jr nc, .loop + ret + +.IsCurBitSet: +; which byte + ld a, [wPokeAnimBitmaskCurBit] + and $f8 + rrca + rrca + rrca + ld e, a + ld d, 0 + ld hl, wPokeAnimBitmaskBuffer + add hl, de + ld b, [hl] +; which bit + ld a, [wPokeAnimBitmaskCurBit] + and $7 + jr z, .skip + + ld c, a + ld a, b +.loop2 + rrca + dec c + jr nz, .loop2 + ld b, a + +.skip + xor a + bit 0, b + jr z, .finish + ld a, 1 + +.finish + ld b, a + ld hl, wPokeAnimBitmaskCurBit + inc [hl] + ret + +.ApplyFrame: + push af + call .GetCoord + pop af + push hl + call .GetTilemap + ld hl, wPokeAnimGraphicStartTile + add [hl] + pop hl + cp $7f + sbc -1 ;increment if no carry + ld [hl], a + ret + +.GetCoord: + call .GetStartCoord + ld a, [wPokeAnimBitmaskCurRow] + ld bc, SCREEN_WIDTH + call AddNTimes + ld a, [wBoxAlignment] + and a + jr nz, .subtract + ; hl += [wPokeAnimBitmaskCurCol] + ld a, [wPokeAnimBitmaskCurCol] + ld e, a + ld d, 0 + add hl, de + jr .done + +.subtract + ; hl -= [wPokeAnimBitmaskCurCol] + ld a, [wPokeAnimBitmaskCurCol] + ld e, a + ld a, l + sub e + ld l, a + ld a, h + sbc 0 + ld h, a + +.done + ret + +.UnusedSizeData: ; unreferenced + db 6, 5, 4 + +.GetTilemap: + push af + ld a, [wPokeAnimFrontpicHeight] + cp 5 + jr z, .check_add_24 + cp 6 + jr z, .check_add_13 + pop af + ret + +.check_add_24 + pop af + cp 5 * 5 + jr nc, .add_24 + push hl + push de + ld hl, ._5by5 + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + pop de + pop hl + ret + +.add_24 + add 24 + ret + +.check_add_13 + pop af + cp 6 * 6 + jr nc, .add_13 + push hl + push de + ld hl, ._6by6 + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + pop de + pop hl + ret + +.add_13 + add 13 + ret + +._5by5: + poke_anim_box 5 + ; db 9, 10, 11, 12, 13 + ; db 16, 17, 18, 19, 20 + ; db 23, 24, 25, 26, 27 + ; db 30, 31, 32, 33, 34 + ; db 37, 38, 39, 40, 41 + +._6by6: + poke_anim_box 6 + ; db 8, 9, 10, 11, 12, 13 + ; db 15, 16, 17, 18, 19, 20 + ; db 22, 23, 24, 25, 26, 27 + ; db 29, 30, 31, 32, 33, 34 + ; db 36, 37, 38, 39, 40, 41 + ; db 43, 44, 45, 46, 47, 48 + +.GetStartCoord: + ld hl, wPokeAnimCoord + ld a, [hli] + ld h, [hl] + ld l, a + + ld a, [wPokeAnimFrontpicHeight] + ld de, 0 + ld bc, 6 + cp 7 + jr z, .okay + ld de, SCREEN_WIDTH + 1 + ld bc, SCREEN_WIDTH + 5 + cp 6 + jr z, .okay + ld de, 2 * SCREEN_WIDTH + 1 + ld bc, 2 * SCREEN_WIDTH + 5 +.okay + + ld a, [wBoxAlignment] + and a + jr nz, .add_bc + add hl, de + ret + +.add_bc + add hl, bc + ret + +.NextBit: + ld a, [wPokeAnimBitmaskCurRow] + inc a + ld [wPokeAnimBitmaskCurRow], a + ld c, a + ld a, [wPokeAnimFrontpicHeight] + cp c + jr nz, .no_carry + xor a + ld [wPokeAnimBitmaskCurRow], a + ld a, [wPokeAnimBitmaskCurCol] + inc a + ld [wPokeAnimBitmaskCurCol], a + ld c, a + ld a, [wPokeAnimFrontpicHeight] + cp c + jr nz, .no_carry + scf + ret + +.no_carry + xor a + ret + +PokeAnim_PlaceGraphic: + call .ClearBox + ld a, [wBoxAlignment] + and a + jr nz, .flipped + ld de, 1 + ld bc, 0 + jr .okay + +.flipped + ld de, -1 + ld bc, 6 + +.okay + ld hl, wPokeAnimCoord + ld a, [hli] + ld h, [hl] + ld l, a + add hl, bc + ld c, 7 + ld b, 7 + ld a, [wPokeAnimGraphicStartTile] +.loop + push bc + push hl + push de + ld de, SCREEN_WIDTH +.loop2 + ld [hl], a + inc a + add hl, de + dec b + jr nz, .loop2 + pop de + pop hl + add hl, de + pop bc + dec c + jr nz, .loop + ret + +.ClearBox: + ld hl, wPokeAnimCoord + ld a, [hli] + ld h, [hl] + ld l, a + ld b, 7 + ld c, 7 + call ClearBox + ret + +PokeAnim_SetVBank1: + ldh a, [rSVBK] + push af + ld a, BANK(wPokeAnimCoord) + ldh [rSVBK], a + xor a + ldh [hBGMapMode], a + call .SetFlag + farcall HDMATransferAttrmapToWRAMBank3 + pop af + ldh [rSVBK], a + ret + +.SetFlag: + call PokeAnim_GetAttrmapCoord + ld b, 7 + ld c, 7 + ld de, SCREEN_WIDTH +.row + push bc + push hl +.col + ld a, [hl] + or 8 + ld [hl], a + add hl, de + dec c + jr nz, .col + pop hl + inc hl + pop bc + dec b + jr nz, .row + ret + +PokeAnim_SetVBank0: + call PokeAnim_GetAttrmapCoord + ld b, 7 + ld c, 7 + ld de, SCREEN_WIDTH +.row + push bc + push hl +.col + ld a, [hl] + and $f7 + ld [hl], a + add hl, de + dec c + jr nz, .col + pop hl + inc hl + pop bc + dec b + jr nz, .row + ret + +PokeAnim_GetAttrmapCoord: + ld hl, wPokeAnimCoord + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wAttrmap - wTilemap + add hl, de + ret + +GetMonAnimPointer: + call PokeAnim_IsEgg + jr z, .egg + + ld c, BANK(UnownAnimationPointers) ; aka BANK(UnownAnimationIdlePointers) + ld hl, UnownAnimationPointers - 2 + ld de, UnownAnimationIdlePointers - 2 + call PokeAnim_IsUnown + jr z, .unown + ld c, BANK(AnimationPointers) ; aka BANK(AnimationIdlePointers) + ld hl, AnimationPointers - 2 + ld de, AnimationIdlePointers - 2 +.unown + + ld a, [wPokeAnimIdleFlag] + and a + jr nz, .got_pointer + ld d, h + ld e, l +.got_pointer + + call PokeAnim_IsUnown + ld a, [wPokeAnimSpeciesOrUnown] + ld l, a + ld h, 0 + call nz, GetPokemonIndexFromID + add hl, hl + add hl, de + ld a, c + ld [wPokeAnimPointerBank], a + call GetFarWord + ld a, l + ld [wPokeAnimPointerAddr], a + ld a, h + ld [wPokeAnimPointerAddr + 1], a + ret + +.egg + ld hl, EggAnimation + ld c, BANK(EggAnimation) + ld a, [wPokeAnimIdleFlag] + and a + jr z, .idles_egg + ld hl, EggAnimationIdle + ld c, BANK(EggAnimationIdle) +.idles_egg + + ld a, c + ld [wPokeAnimPointerBank], a + ld a, l + ld [wPokeAnimPointerAddr], a + ld a, h + ld [wPokeAnimPointerAddr + 1], a + ret + +PokeAnim_GetFrontpicDims: + ldh a, [rSVBK] + push af + ld a, BANK(wCurPartySpecies) + ldh [rSVBK], a + ld a, [wCurPartySpecies] + ld [wCurSpecies], a + call GetBaseData + ld a, [wBasePicSize] + and $f + ld c, a + pop af + ldh [rSVBK], a + ret + +GetMonFramesPointer: + call PokeAnim_IsEgg + jr z, .egg + + call PokeAnim_IsUnown + ld hl, FramesPointers - 3 + ld a, BANK(FramesPointers) + ld c, 3 + jr nz, .got_frames + ld a, BANK(UnownsFrames) + ld [wPokeAnimFramesBank], a + ld hl, UnownFramesPointers - 2 + ld a, BANK(UnownFramesPointers) + ld c, 2 +.got_frames + + push af + push hl + ld a, [wPokeAnimSpeciesOrUnown] + ld l, a + ld h, 0 + call nz, GetPokemonIndexFromID + ld a, c + ld c, l + ld b, h + pop hl + call AddNTimes + pop af + jr z, .no_bank + ld c, a + call GetFarByte + ld [wPokeAnimFramesBank], a + inc hl + ld a, c +.no_bank + call GetFarWord + ld a, l + ld [wPokeAnimFramesAddr], a + ld a, h + ld [wPokeAnimFramesAddr + 1], a + ret + +.egg + ld a, BANK(EggFrames) + ld [wPokeAnimFramesBank], a + ld a, LOW(EggFrames) + ld [wPokeAnimFramesAddr], a + ld a, HIGH(EggFrames) + ld [wPokeAnimFramesAddr + 1], a + ret + +GetMonBitmaskPointer: + call PokeAnim_IsEgg + jr z, .egg + + call PokeAnim_IsUnown + ld a, BANK(UnownBitmasksPointers) + ld de, UnownBitmasksPointers - 2 + jr z, .unown + ld a, BANK(BitmasksPointers) + ld de, BitmasksPointers - 2 +.unown + ld [wPokeAnimBitmaskBank], a + + ld a, [wPokeAnimSpeciesOrUnown] + ld l, a + ld h, 0 + call nz, GetPokemonIndexFromID + add hl, hl + add hl, de + ld a, [wPokeAnimBitmaskBank] + call GetFarWord + ld a, l + ld [wPokeAnimBitmaskAddr], a + ld a, h + ld [wPokeAnimBitmaskAddr + 1], a + ret + +.egg + ld c, BANK(EggBitmasks) + ld hl, EggBitmasks + ld a, c + ld [wPokeAnimBitmaskBank], a + ld a, l + ld [wPokeAnimBitmaskAddr], a + ld a, h + ld [wPokeAnimBitmaskAddr + 1], a + ret + +PokeAnim_GetSpeciesOrUnown: + call PokeAnim_IsUnown + jr z, .unown + ld a, [wPokeAnimSpecies] + ret + +.unown + ld a, [wPokeAnimUnownLetter] + ret + +Unused_HOF_AnimateAlignedFrontpic: + ld a, $1 + ld [wBoxAlignment], a + +HOF_AnimateFrontpic: + call AnimateMon_CheckIfPokemon + jr c, .fail + ld h, d + ld l, e + push bc + push hl + ld de, vTiles2 + predef GetAnimatedFrontpic + pop hl + pop bc + ld d, 0 + ld e, c + call AnimateFrontpic + xor a + ld [wBoxAlignment], a + ret + +.fail + xor a + ld [wBoxAlignment], a + inc a + ld [wCurPartySpecies], a + ret diff --git a/engine/gfx/place_graphic.asm b/engine/gfx/place_graphic.asm new file mode 100644 index 0000000..4092ad3 --- /dev/null +++ b/engine/gfx/place_graphic.asm @@ -0,0 +1,55 @@ +PlaceGraphic: +; Fill wBoxAlignment-aligned box width b height c +; with iterating tile starting from hGraphicStartTile at hl. + + ld de, SCREEN_WIDTH + + ld a, [wBoxAlignment] + and a + jr nz, .right + + ldh a, [hGraphicStartTile] +.x1 + push bc + push hl + +.y1 + ld [hl], a + add hl, de + inc a + dec c + jr nz, .y1 + + pop hl + inc hl + pop bc + dec b + jr nz, .x1 + ret + +.right +; Right-aligned. + push bc + ld b, 0 + dec c + add hl, bc + pop bc + + ldh a, [hGraphicStartTile] +.x2 + push bc + push hl + +.y2 + ld [hl], a + add hl, de + inc a + dec c + jr nz, .y2 + + pop hl + dec hl + pop bc + dec b + jr nz, .x2 + ret diff --git a/engine/gfx/player_gfx.asm b/engine/gfx/player_gfx.asm new file mode 100644 index 0000000..ca53a64 --- /dev/null +++ b/engine/gfx/player_gfx.asm @@ -0,0 +1,218 @@ +BetaLoadPlayerTrainerClass: ; unreferenced + ld c, CAL + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_class + ld c, KAREN ; not KRIS? +.got_class + ld a, c + ld [wTrainerClass], a + ret + +MovePlayerPicRight: + hlcoord 6, 4 + ld de, 1 + jr MovePlayerPic + +MovePlayerPicLeft: + hlcoord 13, 4 + ld de, -1 + ; fallthrough + +MovePlayerPic: +; Move player pic at hl by de * 7 tiles. + ld c, $8 +.loop + push bc + push hl + push de + xor a + ldh [hBGMapMode], a + lb bc, 7, 7 + predef PlaceGraphic + xor a + ldh [hBGMapThird], a + call WaitBGMap + call DelayFrame + pop de + pop hl + add hl, de + pop bc + dec c + ret z + push hl + push bc + ld a, l + sub e + ld l, a + ld a, h + sbc d + ld h, a + lb bc, 7, 7 + call ClearBox + pop bc + pop hl + jr .loop + +ShowPlayerNamingChoices: + ld hl, ChrisNameMenuHeader + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_header + ld hl, KrisNameMenuHeader +.got_header + call LoadMenuHeader + call VerticalMenu + ld a, [wMenuCursorY] + dec a + call CopyNameFromMenu + call CloseWindow + ret + +INCLUDE "data/player_names.asm" + +GetPlayerNameArray: ; unreferenced + ld hl, wPlayerName + ld de, MalePlayerNameArray + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_array + ld de, FemalePlayerNameArray +.got_array + call InitName + ret + +GetPlayerIcon: + ld de, ChrisSpriteGFX + ld b, BANK(ChrisSpriteGFX) + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_gfx + ld de, KrisSpriteGFX + ld b, BANK(KrisSpriteGFX) +.got_gfx + ret + +GetCardPic: + ld hl, ChrisCardPic + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_pic + ld hl, KrisCardPic +.got_pic + ld de, vTiles2 tile $00 + ld bc, $23 tiles + ld a, BANK(ChrisCardPic) ; aka BANK(KrisCardPic) + call FarCopyBytes + ld hl, TrainerCardGFX + ld de, vTiles2 tile $23 + ld bc, 6 tiles + ld a, BANK(TrainerCardGFX) + call FarCopyBytes + ret + +ChrisCardPic: +INCBIN "gfx/trainer_card/chris_card.2bpp" + +KrisCardPic: +INCBIN "gfx/trainer_card/kris_card.2bpp" + +TrainerCardGFX: +INCBIN "gfx/trainer_card/trainer_card.2bpp" + +GetPlayerBackpic: + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, GetChrisBackpic + call GetKrisBackpic + ret + +GetChrisBackpic: + ld hl, ChrisBackpic + ld b, BANK(ChrisBackpic) + ld de, vTiles2 tile $31 + ld c, 7 * 7 + predef DecompressGet2bpp + ret + +HOF_LoadTrainerFrontpic: + call WaitBGMap + xor a + ldh [hBGMapMode], a + +; Get class + ld e, CHRIS + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_class + ld e, KRIS +.got_class + ld a, e + ld [wTrainerClass], a + +; Load pic + ld de, ChrisPic + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_pic + ld de, KrisPic +.got_pic + ld hl, vTiles2 + ld b, BANK(ChrisPic) ; aka BANK(KrisPic) + ld c, 7 * 7 + call Get2bpp + + call WaitBGMap + ld a, $1 + ldh [hBGMapMode], a + ret + +DrawIntroPlayerPic: +; Draw the player pic at (6,4). + +; Get class + ld e, CHRIS + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_class + ld e, KRIS +.got_class + ld a, e + ld [wTrainerClass], a + +; Load pic + ld de, ChrisPic + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_pic + ld de, KrisPic +.got_pic + ld hl, vTiles2 + ld b, BANK(ChrisPic) ; aka BANK(KrisPic) + ld c, 7 * 7 ; dimensions + call Get2bpp + +; Draw + xor a + ldh [hGraphicStartTile], a + hlcoord 6, 4 + lb bc, 7, 7 + predef PlaceGraphic + ret + +ChrisPic: +INCBIN "gfx/player/chris.2bpp" + +KrisPic: +INCBIN "gfx/player/kris.2bpp" + +GetKrisBackpic: +; Kris's backpic is uncompressed. + ld de, KrisBackpic + ld hl, vTiles2 tile $31 + lb bc, BANK(KrisBackpic), 7 * 7 ; dimensions + call Get2bpp + ret + +KrisBackpic: +INCBIN "gfx/player/kris_back.2bpp" diff --git a/engine/gfx/sgb_layouts.asm b/engine/gfx/sgb_layouts.asm new file mode 100644 index 0000000..4855c27 --- /dev/null +++ b/engine/gfx/sgb_layouts.asm @@ -0,0 +1,572 @@ +LoadSGBLayout: + call CheckCGB + jp nz, LoadSGBLayoutCGB + + ld a, b + cp SCGB_DEFAULT + jr nz, .not_default + ld a, [wDefaultSGBLayout] +.not_default + cp SCGB_PARTY_MENU_HP_BARS + jp z, SGB_ApplyPartyMenuHPPals + ld l, a + ld h, 0 + add hl, hl + ld de, SGBLayoutJumptable + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld de, _LoadSGBLayout_ReturnFromJumptable + push de + jp hl + +SGBLayoutJumptable: + table_width 2, SGBLayoutJumptable + dw .SGB_BattleGrayscale + dw .SGB_BattleColors + dw .SGB_PokegearPals + dw .SGB_StatsScreenHPPals + dw .SGB_Pokedex + dw .SGB_SlotMachine + dw .SGB_BetaTitleScreen + dw .SGB_GSIntro + dw .SGB_Diploma + dw .SGB_MapPals + dw .SGB_PartyMenu + dw .SGB_Evolution + dw .SGB_GSTitleScreen + dw .SGB_Unused0D + dw .SGB_MoveList + dw .SGB_BetaPikachuMinigame + dw .SGB_PokedexSearchOption + dw .SGB_BetaPoker + dw .SGB_Pokepic + dw .SGB_MagnetTrain + dw .SGB_PackPals + dw .SGB_TrainerCard + dw .SGB_PokedexUnownMode + dw .SGB_BillsPC + dw .SGB_UnownPuzzle + dw .SGB_GamefreakLogo + dw .SGB_PlayerOrMonFrontpicPals + dw .SGB_TradeTube + dw .SGB_TrainerOrMonFrontpicPals + dw .SGB_MysteryGift + dw .SGB_Unused1E + assert_table_length NUM_SCGB_LAYOUTS + +.SGB_BattleGrayscale: + ld hl, PalPacket_BattleGrayscale + ld de, BlkPacket_Battle + ret + +.SGB_BattleColors: + ld hl, BlkPacket_Battle + call PushSGBPals + + ld hl, PalPacket_Pal01 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + + ld a, [wPlayerHPPal] + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld de, HPBarPals + add hl, de + + ld a, [hli] + ld [wSGBPals + 3], a + ld a, [hli] + ld [wSGBPals + 4], a + ld a, [hli] + ld [wSGBPals + 5], a + ld a, [hl] + ld [wSGBPals + 6], a + + ld a, [wEnemyHPPal] + ld l, a + ld h, 0 + add hl, hl + add hl, hl + + ld de, HPBarPals + add hl, de + ld a, [hli] + ld [wSGBPals + 9], a + ld a, [hli] + ld [wSGBPals + 10], a + ld a, [hli] + ld [wSGBPals + 11], a + ld a, [hl] + ld [wSGBPals + 12], a + + ld hl, PalPacket_Pal23 + ld de, wSGBPals + PALPACKET_LENGTH + ld bc, PALPACKET_LENGTH + call CopyBytes + + call GetBattlemonBackpicPalettePointer + + ld a, [hli] + ld [wSGBPals + 19], a + ld a, [hli] + ld [wSGBPals + 20], a + ld a, [hli] + ld [wSGBPals + 21], a + ld a, [hl] + ld [wSGBPals + 22], a + call GetEnemyFrontpicPalettePointer + ld a, [hli] + ld [wSGBPals + 25], a + ld a, [hli] + ld [wSGBPals + 26], a + ld a, [hli] + ld [wSGBPals + 27], a + ld a, [hl] + ld [wSGBPals + 28], a + + ld hl, wSGBPals + ld de, wSGBPals + PALPACKET_LENGTH + ld a, SCGB_BATTLE_COLORS + ld [wDefaultSGBLayout], a + ret + +.SGB_MoveList: + ld hl, PalPacket_AllPal0 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + + ld hl, wSGBPals + 1 + ld [hl], $10 + inc hl + inc hl + + ld a, [wPlayerHPPal] + add PREDEFPAL_HP_GREEN + ld [hl], a + ld hl, wSGBPals + ld de, BlkPacket_MoveList + ret + +.SGB_PokegearPals: + ld hl, PalPacket_Pokegear + ld de, BlkPacket_AllPal0 + ret + +.SGB_StatsScreenHPPals: + ld hl, PalPacket_Pal01 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + ld a, [wCurHPPal] + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld de, HPBarPals + add hl, de + ld a, [hli] + ld [wSGBPals + 3], a + ld a, [hli] + ld [wSGBPals + 4], a + ld a, [hli] + ld [wSGBPals + 5], a + ld a, [hl] + ld [wSGBPals + 6], a + ld a, [wCurPartySpecies] + ld bc, wTempMonDVs + call GetPlayerOrMonPalettePointer + ld a, [hli] + ld [wSGBPals + 9], a + ld a, [hli] + ld [wSGBPals + 10], a + ld a, [hli] + ld [wSGBPals + 11], a + ld a, [hl] + ld [wSGBPals + 12], a + ld hl, wSGBPals + ld de, BlkPacket_StatsScreen + ret + +.SGB_PartyMenu: + ld hl, PalPacket_PartyMenu + ld de, wSGBPals + 1 + ret + +.SGB_Pokedex: + ld hl, PalPacket_Pal01 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + ld hl, wSGBPals + 3 + ld [hl], LOW(palred 31 + palgreen 20 + palblue 10) + inc hl + ld [hl], HIGH(palred 31 + palgreen 20 + palblue 10) + inc hl + ld [hl], LOW(palred 26 + palgreen 10 + palblue 6) + inc hl + ld [hl], HIGH(palred 26 + palgreen 10 + palblue 6) + ld a, [wCurPartySpecies] + call GetMonPalettePointer + ld a, [hli] + ld [wSGBPals + 9], a + ld a, [hli] + ld [wSGBPals + 10], a + ld a, [hli] + ld [wSGBPals + 11], a + ld a, [hl] + ld [wSGBPals + 12], a + ld hl, wSGBPals + ld de, BlkPacket_Pokedex_PC + ret + +.SGB_BillsPC: + ld hl, PalPacket_Pal01 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + ld hl, wSGBPals + 3 + ld [hl], LOW(palred 31 + palgreen 20 + palblue 10) + inc hl + ld [hl], HIGH(palred 31 + palgreen 20 + palblue 10) + inc hl + ld [hl], LOW(palred 26 + palgreen 10 + palblue 6) + inc hl + ld [hl], HIGH(palred 26 + palgreen 10 + palblue 6) + ld a, [wCurPartySpecies] + ld bc, wTempMonDVs + call GetPlayerOrMonPalettePointer + ld a, [hli] + ld [wSGBPals + 9], a + ld a, [hli] + ld [wSGBPals + 10], a + ld a, [hli] + ld [wSGBPals + 11], a + ld a, [hl] + ld [wSGBPals + 12], a + ld hl, wSGBPals + ld de, BlkPacket_Pokedex_PC + ret + +.SGB_PokedexUnownMode: + call .SGB_Pokedex + ld de, BlkPacket_PokedexUnownMode + ret + +.SGB_PokedexSearchOption: + ld hl, PalPacket_Pal01 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + ld hl, wSGBPals + 3 + ld [hl], LOW(palred 31 + palgreen 20 + palblue 10) + inc hl + ld [hl], HIGH(palred 31 + palgreen 20 + palblue 10) + inc hl + ld [hl], LOW(palred 26 + palgreen 10 + palblue 6) + inc hl + ld [hl], HIGH(palred 26 + palgreen 10 + palblue 6) + ld hl, wSGBPals + ld de, BlkPacket_AllPal0 + ret + +.SGB_PackPals: + ld hl, PalPacket_Pack + ld de, BlkPacket_AllPal0 + ret + +.SGB_SlotMachine: + ld hl, PalPacket_SlotMachine + ld de, BlkPacket_SlotMachine + ret + +.SGB_BetaTitleScreen: + ld hl, PalPacket_BetaTitleScreen + ld de, BlkPacket_BetaTitleScreen + ret + +.SGB_Diploma: +.SGB_MysteryGift: + ld hl, PalPacket_Diploma + ld de, BlkPacket_AllPal0 + ret + +.SGB_GSIntro: + ld b, 0 + ld hl, .BlkPacketTable_GSIntro +rept 4 + add hl, bc +endr + ld e, [hl] + inc hl + ld d, [hl] + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + ret + +.BlkPacketTable_GSIntro: + dw BlkPacket_AllPal0, PalPacket_GSIntroShellderLapras + dw BlkPacket_GSIntroJigglypuffPikachu, PalPacket_GSIntroJigglypuffPikachu + dw BlkPacket_AllPal0, PalPacket_GSIntroStartersTransition + +.SGB_GSTitleScreen: + ld hl, PalPacket_GSTitleScreen + ld de, BlkPacket_GSTitleScreen + ld a, SCGB_DIPLOMA + ld [wDefaultSGBLayout], a + ret + +.SGB_MagnetTrain: + ld hl, PalPacket_MagnetTrain + ld de, BlkPacket_MagnetTrain + ret + +.SGB_BetaPikachuMinigame: + ld hl, PalPacket_BetaPikachuMinigame + ld de, BlkPacket_AllPal0 + ret + +.SGB_BetaPoker: + ld hl, BlkPacket_AllPal0 + ld de, wBetaPokerSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + ld hl, PalPacket_BetaPoker + ld de, BlkPacket_AllPal0 + ret + +.SGB_MapPals: + ld hl, PalPacket_AllPal0 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + call .GetMapPalsIndex + ld hl, wSGBPals + 1 + ld [hld], a + ld de, BlkPacket_AllPal0 + ld a, SCGB_MAPPALS + ld [wDefaultSGBLayout], a + ret + +.SGB_Evolution: + push bc + ld hl, PalPacket_Pal01 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + pop bc + ld a, c + and a + jr z, .partymon + ; Egg + ld hl, wSGBPals + 3 + ld [hl], LOW(palred 7 + palgreen 7 + palblue 7) + inc hl + ld [hl], HIGH(palred 7 + palgreen 7 + palblue 7) + inc hl + ld [hl], LOW(palred 2 + palgreen 3 + palblue 3) + inc hl + ld [hl], HIGH(palred 2 + palgreen 3 + palblue 3) + jr .done + +.partymon + ld hl, wPartyMon1DVs + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld c, l + ld b, h + ld a, [wPlayerHPPal] + call GetPlayerOrMonPalettePointer + ld a, [hli] + ld [wSGBPals + 3], a + ld a, [hli] + ld [wSGBPals + 4], a + ld a, [hli] + ld [wSGBPals + 5], a + ld a, [hl] + ld [wSGBPals + 6], a + +.done + ld hl, wSGBPals + ld de, BlkPacket_AllPal0 + ret + +.SGB_Unused0D: +.SGB_TrainerCard: + ld hl, PalPacket_Diploma + ld de, BlkPacket_AllPal0 + ret + +.SGB_UnownPuzzle: + ld hl, PalPacket_UnownPuzzle + ld de, BlkPacket_AllPal0 + ret + +.SGB_Pokepic: + ld hl, PalPacket_AllPal0 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + ld hl, BlkPacket_AllPal0 + ld de, wSGBPals + PALPACKET_LENGTH + ld bc, PALPACKET_LENGTH + call CopyBytes + call .GetMapPalsIndex + ld hl, wSGBPals + 1 + ld [hl], a + ld hl, wSGBPals + 3 + ld [hl], $2e + ld hl, wSGBPals + $13 + ld a, 5 + ld [hli], a + ld a, [wMenuBorderLeftCoord] + ld [hli], a + ld a, [wMenuBorderTopCoord] + ld [hli], a + ld a, [wMenuBorderRightCoord] + ld [hli], a + ld a, [wMenuBorderBottomCoord] + ld [hl], a + ld hl, wSGBPals + ld de, wSGBPals + PALPACKET_LENGTH + ret + +.SGB_Unused1E: + ld hl, PalPacket_Pal01 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + add hl, hl + add hl, hl + add hl, hl + ld de, PokemonPalettes + add hl, de + ld a, [wUnusedSGB1eColorOffset] + and 3 + sla a + sla a + ld c, a + ld b, 0 + add hl, bc + ld a, [hli] + ld [wSGBPals + 3], a + ld a, [hli] + ld [wSGBPals + 4], a + ld a, [hli] + ld [wSGBPals + 5], a + ld a, [hl] + ld [wSGBPals + 6], a + ld hl, wSGBPals + ld de, BlkPacket_AllPal0 + ret + +.SGB_GamefreakLogo: + ld hl, PalPacket_GamefreakLogo + ld de, BlkPacket_AllPal0 + ret + +.SGB_PlayerOrMonFrontpicPals: + ld hl, PalPacket_Pal01 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + ld a, [wCurPartySpecies] + ld bc, wTempMonDVs + call GetPlayerOrMonPalettePointer + ld a, [hli] + ld [wSGBPals + 3], a + ld a, [hli] + ld [wSGBPals + 4], a + ld a, [hli] + ld [wSGBPals + 5], a + ld a, [hl] + ld [wSGBPals + 6], a + ld hl, wSGBPals + ld de, BlkPacket_AllPal0 + ret + +.SGB_TradeTube: + ld hl, PalPacket_TradeTube + ld de, BlkPacket_AllPal0 + ret + +.SGB_TrainerOrMonFrontpicPals: + ld hl, PalPacket_Pal01 + ld de, wSGBPals + ld bc, PALPACKET_LENGTH + call CopyBytes + ld a, [wCurPartySpecies] + ld bc, wTempMonDVs + call GetFrontpicPalettePointer + ld a, [hli] + ld [wSGBPals + 3], a + ld a, [hli] + ld [wSGBPals + 4], a + ld a, [hli] + ld [wSGBPals + 5], a + ld a, [hl] + ld [wSGBPals + 6], a + ld hl, wSGBPals + ld de, BlkPacket_AllPal0 + ret + +.GetMapPalsIndex: + ld a, [wTimeOfDayPal] + cp NITE_F + jr c, .morn_day + ld a, PREDEFPAL_NITE + ret + +.morn_day + ld a, [wEnvironment] + cp ROUTE + jr z, .route + cp CAVE + jr z, .cave + cp DUNGEON + jr z, .cave + cp ENVIRONMENT_5 + jr z, .env5 + cp GATE + jr z, .gate + ld a, [wMapGroup] + ld e, a + ld d, 0 + ld hl, MapGroupRoofSGBPalInds + add hl, de + ld a, [hl] + ret + +.route + ld a, PREDEFPAL_ROUTES + ret + +.cave + ld a, PREDEFPAL_DUNGEONS + ret + +.env5 + ld a, PREDEFPAL_VERMILION + ret + +.gate + ld a, PREDEFPAL_PEWTER + ret + +INCLUDE "data/maps/sgb_roof_pal_inds.asm" + +_LoadSGBLayout_ReturnFromJumptable: + push de + call PushSGBPals + pop hl + jp PushSGBPals diff --git a/engine/gfx/sprite_anims.asm b/engine/gfx/sprite_anims.asm new file mode 100644 index 0000000..d74db17 --- /dev/null +++ b/engine/gfx/sprite_anims.asm @@ -0,0 +1,877 @@ +DoAnimFrame: + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: +; entries correspond to SPRITE_ANIM_SEQ_* constants (see constants/sprite_anim_constants.asm) + table_width 2, DoAnimFrame.Jumptable + dw AnimSeq_Null + dw AnimSeq_PartyMon + dw AnimSeq_PartyMonSwitch + dw AnimSeq_PartyMonSelected + dw AnimSeq_GSTitleTrail + dw AnimSeq_NamingScreenCursor + dw AnimSeq_GameFreakLogo + dw AnimSeq_GSGameFreakLogoStar + dw AnimSeq_GSGameFreakLogoSparkle + dw AnimSeq_SlotsGolem + dw AnimSeq_SlotsChansey + dw AnimSeq_SlotsChanseyEgg + dw AnimSeq_MailCursor + dw AnimSeq_UnusedCursor + dw AnimSeq_MemoryGameCursor + dw AnimSeq_PokegearArrow + dw AnimSeq_TradePokeBall + dw AnimSeq_TradeTubeBulge + dw AnimSeq_TrademonInTube + dw AnimSeq_RevealNewMon + dw AnimSeq_RadioTuningKnob + dw AnimSeq_CutLeaves + dw AnimSeq_FlyFrom + dw AnimSeq_FlyLeaf + dw AnimSeq_FlyTo + dw AnimSeq_GSIntroHoOhLugia + dw AnimSeq_EZChatCursor + dw AnimSeq_MobileTradeSentPulse + dw AnimSeq_MobileTradeOTPulse + dw AnimSeq_IntroSuicune + dw AnimSeq_IntroPichuWooper + dw AnimSeq_Celebi + dw AnimSeq_IntroUnown + dw AnimSeq_IntroUnownF + dw AnimSeq_IntroSuicuneAway + assert_table_length NUM_SPRITE_ANIM_SEQS + +AnimSeq_Null: + ret + +AnimSeq_PartyMon: + ld a, [wMenuCursorY] + + ld hl, SPRITEANIMSTRUCT_INDEX + add hl, bc + cp [hl] + jr z, AnimSeq_PartyMonSwitch + + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], 8 * 2 + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], 0 + ret + +AnimSeq_PartyMonSwitch: + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], 8 * 3 + + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + ld d, a + inc [hl] + and $f + ret nz + + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld e, [hl] + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld a, d + and $10 ; bit 4 + jr z, .load_zero + ld a, e + and a + jr z, .load_minus_two + cp $1 + jr z, .load_minus_one +.load_zero + xor a + ld [hl], a + ret + +.load_minus_one + ld a, -1 + ld [hl], a + ret + +.load_minus_two + ld a, -2 + ld [hl], a + ret + +AnimSeq_PartyMonSelected: + ld a, [wMenuCursorY] + + ld hl, SPRITEANIMSTRUCT_INDEX + add hl, bc + cp [hl] + jr z, .three_offset_right + + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], 8 * 2 + ret + +.three_offset_right + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], 8 * 3 + ret + +AnimSeq_GSTitleTrail: + call AnimSeqs_AnonJumptable + jp hl +.anon_dw + dw .zero + dw .one + +.zero + call AnimSeqs_IncAnonJumptableIndex + + ld hl, SPRITEANIMSTRUCT_INDEX + add hl, bc + ld a, [hl] + + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + and $3 + ld [hl], a + inc [hl] + swap a + + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + +.one + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $a4 + jr nc, .delete + + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + add 4 + + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], a + + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + inc [hl] + + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + sla a + sla a + + ld d, 2 + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + add 3 + ld [hl], a + call AnimSeqs_Sine + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ret + +.delete + call DeinitializeSprite + ret + +AnimSeq_GSIntroHoOhLugia: + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc a + ld [hl], a + ld d, 2 + call AnimSeqs_Sine + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ret + +AnimSeq_NamingScreenCursor: + callfar NamingScreen_AnimateCursor + ret + +AnimSeq_MailCursor: + callfar ComposeMail_AnimateCursor + ret + +AnimSeq_GameFreakLogo: + callfar GameFreakLogoSpriteAnim + ret + +AnimSeq_GSGameFreakLogoStar: + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and a + jr z, .delete + + dec [hl] + dec [hl] + ld d, a + and $1f + jr nz, .stay + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + dec [hl] + +.stay + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld a, [hl] + push af + push de + call AnimSeqs_Sine + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call AnimSeqs_Cosine + + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + add [hl] + ld [hl], a + ret + +.delete + ld a, 1 + ld [wIntroSceneFrameCounter], a + call DeinitializeSprite + ret + +AnimSeq_GSGameFreakLogoSparkle: + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hli] + or [hl] + jr z, .delete + + ld hl, SPRITEANIMSTRUCT_VAR4 + add hl, bc + ld d, [hl] + + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld a, [hl] + push af + push de + call AnimSeqs_Sine + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call AnimSeqs_Cosine + + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + ld e, l + ld d, h + + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + ld [hl], e + inc hl + ld [hl], d + + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld de, -$10 + add hl, de + ld e, l + ld d, h + + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], e + inc hl + ld [hl], d + + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld a, [hl] + xor $20 + ld [hl], a + ret + +.delete + call DeinitializeSprite + ret + +AnimSeq_SlotsGolem: + callfar Slots_AnimateGolem + ret + +AnimSeq_SlotsChansey: + callfar Slots_AnimateChansey + ld hl, wSlotsDelay + ld a, [hl] + cp $2 + ret nz + ld [hl], $3 + ld a, SPRITE_ANIM_FRAMESET_SLOTS_CHANSEY_2 + call _ReinitSpriteAnimFrame + ret + +AnimSeq_SlotsChanseyEgg: + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld a, [hl] + dec [hl] + ld e, a + and $1 + jr z, .move_vertical + + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp 15 * 8 + jr c, .move_right + call DeinitializeSprite + ld a, $4 + ld [wSlotsDelay], a + ld de, SFX_PLACE_PUZZLE_PIECE_DOWN + call PlaySFX + ret + +.move_right + inc [hl] +.move_vertical + ld a, e + ld d, 32 + call AnimSeqs_Sine + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ret + +AnimSeq_UnusedCursor: + callfar UnusedCursor_InterpretJoypad_AnimateCursor + ret + +AnimSeq_PokegearArrow: + callfar AnimatePokegearModeIndicatorArrow + ret + +AnimSeq_MemoryGameCursor: + callfar MemoryGame_InterpretJoypad_AnimateCursor + ret + +AnimSeq_TradePokeBall: + call AnimSeqs_AnonJumptable + jp hl +.anon_dw + dw .zero + dw .one + dw .two + dw .three + dw .four + dw .delete + +.zero + ld a, SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_WOBBLE + call _ReinitSpriteAnimFrame + + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], 2 ; .two + + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $20 + ret + +.two + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and a + jr z, .next + dec [hl] + ret + +.next + call AnimSeqs_IncAnonJumptableIndex + + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $40 + +.three + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp 48 + jr c, .done + dec [hl] + ld d, 40 + call AnimSeqs_Sine + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ret + +.done + ld de, SFX_GOT_SAFARI_BALLS + call PlaySFX + jr .delete + +.one + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], $4 + + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $30 + + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], $24 + ret + +.four + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + and a + jr z, .done2 + + ld d, a + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + call Sprites_Sine + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + inc [hl] + ld a, [hl] + and $3f + ret nz + + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $20 + + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + sub $c + ld [hl], a + ld de, SFX_SWITCH_POKEMON + call PlaySFX + ret + +.done2 + xor a + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + call AnimSeqs_IncAnonJumptableIndex + ret + +.delete + call DeinitializeSprite + ret + +AnimSeq_TradeTubeBulge: + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + inc [hl] + inc [hl] + cp $b0 + jr nc, .delete + and $3 + ret nz + ld de, SFX_POKEBALLS_PLACED_ON_TABLE + call PlaySFX + ret + +.delete + call DeinitializeSprite + ret + +AnimSeq_TrademonInTube: + callfar TradeAnim_AnimateTrademonInTube + ret + +AnimSeq_RevealNewMon: + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $80 + jr nc, .finish_EggShell + ld d, a + add 8 + ld [hl], a + + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld a, [hl] + xor $20 + ld [hl], a + + push af + push de + call AnimSeqs_Sine + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + + pop de + pop af + call AnimSeqs_Cosine + + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +.finish_EggShell + call DeinitializeSprite + ret + +AnimSeq_RadioTuningKnob: + callfar AnimateTuningKnob + ret + +AnimSeq_CutLeaves: + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + ld hl, $80 + add hl, de + ld e, l + ld d, h + + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], e + inc hl + ld [hl], d + + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc [hl] + inc [hl] + inc [hl] + push af + push de + call AnimSeqs_Sine + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call AnimSeqs_Cosine + + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +AnimSeq_FlyFrom: + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + and a + ret z + + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + inc [hl] + cp $40 + ret c + + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + dec [hl] + dec [hl] + + ld hl, SPRITEANIMSTRUCT_VAR4 + add hl, bc + ld a, [hl] + ld d, a + cp $40 + jr nc, .skip + add 8 + ld [hl], a +.skip + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + ld a, [hl] + inc [hl] + call AnimSeqs_Cosine + + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +AnimSeq_FlyLeaf: + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp -9 * 8 + jr nc, .delete_leaf + inc [hl] + inc [hl] + + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + dec [hl] + + ld d, $40 + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + inc [hl] + call AnimSeqs_Cosine + + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +.delete_leaf + call DeinitializeSprite + ret + +AnimSeq_FlyTo: + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + cp 10 * 8 + 4 + ret z + + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + inc [hl] + inc [hl] + + ld hl, SPRITEANIMSTRUCT_VAR4 + add hl, bc + ld a, [hl] + ld d, a + and a + jr z, .stay + sub $2 + ld [hl], a +.stay + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + ld a, [hl] + inc [hl] + call AnimSeqs_Cosine + + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +AnimSeq_MobileTradeSentPulse: + farcall MobileTradeAnim_AnimateSentPulse + ret + +AnimSeq_MobileTradeOTPulse: + farcall MobileTradeAnim_AnimateOTPulse + ret + +AnimSeq_IntroSuicune: + ld a, [wIntroSceneTimer] + and a + jr nz, .continue + ret + +.continue + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], $0 + + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + add 2 + ld [hl], a + xor $ff + inc a + ld d, 32 + call AnimSeqs_Sine + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ld a, SPRITE_ANIM_FRAMESET_INTRO_SUICUNE_2 + call _ReinitSpriteAnimFrame + ret + +AnimSeq_IntroPichuWooper: + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp 20 + jr nc, .done + add 2 + ld [hl], a + xor $ff + inc a + ld d, 32 + call AnimSeqs_Sine + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a +.done + ret + +AnimSeq_IntroUnown: + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld d, [hl] + inc [hl] + inc [hl] + inc [hl] + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + push af + push de + call AnimSeqs_Sine + + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + pop de + pop af + call AnimSeqs_Cosine + + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +AnimSeq_IntroUnownF: + ld a, [wSlotsDelay] + cp $40 + ret nz + ld a, SPRITE_ANIM_FRAMESET_INTRO_UNOWN_F_2 + call _ReinitSpriteAnimFrame + ret + +AnimSeq_IntroSuicuneAway: + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + add 16 + ld [hl], a + ret + +AnimSeq_EZChatCursor: + farcall AnimateEZChatCursor + ret + +AnimSeq_Celebi: + farcall UpdateCelebiPosition + ret + +AnimSeqs_AnonJumptable: + ld hl, sp+0 + ld e, [hl] + inc hl + ld d, [hl] + inc de + + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld l, [hl] + ld h, 0 + add hl, hl + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ret + +AnimSeqs_IncAnonJumptableIndex: + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + inc [hl] + ret + +AnimSeqs_Sine: + call Sprites_Sine + ret + +AnimSeqs_Cosine: + call Sprites_Cosine + ret diff --git a/engine/gfx/sprites.asm b/engine/gfx/sprites.asm new file mode 100644 index 0000000..9b63eb8 --- /dev/null +++ b/engine/gfx/sprites.asm @@ -0,0 +1,633 @@ +ClearSpriteAnims: + ld hl, wSpriteAnimData + ld bc, wSpriteAnimDataEnd - wSpriteAnimData +.loop + ld [hl], 0 + inc hl + dec bc + ld a, c + or b + jr nz, .loop + ret + +PlaySpriteAnimationsAndDelayFrame: + call PlaySpriteAnimations + call DelayFrame + ret + +PlaySpriteAnimations: + push hl + push de + push bc + push af + + ld a, LOW(wShadowOAM) + ld [wCurSpriteOAMAddr], a + call DoNextFrameForAllSprites + + pop af + pop bc + pop de + pop hl + ret + +DoNextFrameForAllSprites: + ld hl, wSpriteAnimationStructs + ld e, NUM_SPRITE_ANIM_STRUCTS + +.loop + ld a, [hl] + and a + jr z, .next ; This struct is deinitialized. + ld c, l + ld b, h + push hl + push de + call DoAnimFrame ; Uses a massive dw + call UpdateAnimFrame + pop de + pop hl + jr c, .done + +.next + ld bc, SPRITEANIMSTRUCT_LENGTH + add hl, bc + dec e + jr nz, .loop + + ld a, [wCurSpriteOAMAddr] + ld l, a + ld h, HIGH(wShadowOAM) + +.loop2 ; Clear (wShadowOAM + [wCurSpriteOAMAddr] --> wShadowOAMEnd) + ld a, l + cp LOW(wShadowOAMEnd) + jr nc, .done + xor a + ld [hli], a + jr .loop2 + +.done + ret + +DoNextFrameForFirst16Sprites: + ld hl, wSpriteAnimationStructs + ld e, NUM_SPRITE_ANIM_STRUCTS + +.loop + ld a, [hl] + and a + jr z, .next + ld c, l + ld b, h + push hl + push de + call DoAnimFrame ; Uses a massive dw + call UpdateAnimFrame + pop de + pop hl + jr c, .done + +.next + ld bc, SPRITEANIMSTRUCT_LENGTH + add hl, bc + dec e + jr nz, .loop + + ld a, [wCurSpriteOAMAddr] + ld l, a + ld h, HIGH(wShadowOAMSprite16) + +.loop2 ; Clear (wShadowOAM + [wCurSpriteOAMAddr] --> Sprites + $40) + ld a, l + cp LOW(wShadowOAMSprite16) + jr nc, .done + xor a + ld [hli], a + jr .loop2 + +.done + ret + +_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 + push af + ld hl, wSpriteAnimationStructs + ld e, NUM_SPRITE_ANIM_STRUCTS +.loop + ld a, [hl] + and a + jr z, .found + ld bc, SPRITEANIMSTRUCT_LENGTH + add hl, bc + dec e + jr nz, .loop +; We've reached the end. There is no more room here. +; Return carry. + pop af + pop de + scf + ret + +.found +; Back up the structure address to bc. + ld c, l + ld b, h + +; Increment [wSpriteAnimCount], skipping a 0 value. + ld hl, wSpriteAnimCount + inc [hl] + ld a, [hl] + and a + jr nz, .nonzero + inc [hl] +.nonzero + +; Get row a of SpriteAnimSeqData, copy the pointer into de + pop af + ld e, a + ld d, 0 + ld hl, SpriteAnimSeqData + add hl, de + add hl, de + add hl, de + ld e, l + ld d, h +; Set hl to the first field (field 0) in the current structure. + ld hl, SPRITEANIMSTRUCT_INDEX + add hl, bc +; Load the index. + ld a, [wSpriteAnimCount] + ld [hli], a ; SPRITEANIMSTRUCT_INDEX +; Copy the table entry to the next two fields. + ld a, [de] + ld [hli], a ; SPRITEANIMSTRUCT_FRAMESET_ID + inc de + ld a, [de] + ld [hli], a ; SPRITEANIMSTRUCT_ANIM_SEQ_ID + inc de +; Look up the third field in the wSpriteAnimDict mapping. +; Take the mapped value and load it in. + ld a, [de] + call GetSpriteAnimVTile + ld [hli], a ; SPRITEANIMSTRUCT_TILE_ID + pop de +; Set hl to field 4 (X coordinate). Kinda pointless, because we're presumably already here. + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc +; Load the original value of de into here. + ld a, e + ld [hli], a ; SPRITEANIMSTRUCT_XCOORD + ld a, d + ld [hli], a ; SPRITEANIMSTRUCT_YCOORD +; load 0 into the next four fields + xor a + ld [hli], a ; SPRITEANIMSTRUCT_XOFFSET + ld [hli], a ; SPRITEANIMSTRUCT_YOFFSET + xor a + ld [hli], a ; SPRITEANIMSTRUCT_DURATION + ld [hli], a ; SPRITEANIMSTRUCT_DURATIONOFFSET +; load -1 into the next field + dec a + ld [hli], a ; SPRITEANIMSTRUCT_FRAME +; load 0 into the last five fields + xor a + ld [hli], a ; SPRITEANIMSTRUCT_JUMPTABLE_INDEX + ld [hli], a ; SPRITEANIMSTRUCT_VAR1 + ld [hli], a ; SPRITEANIMSTRUCT_VAR2 + ld [hli], a ; SPRITEANIMSTRUCT_VAR3 + ld [hl], a ; SPRITEANIMSTRUCT_VAR4 +; back up the address of the first field to wSpriteAnimAddrBackup + ld a, c + ld [wSpriteAnimAddrBackup], a + ld a, b + ld [wSpriteAnimAddrBackup + 1], a + ret + +DeinitializeSprite: +; Clear the index field of the struct in bc. + ld hl, SPRITEANIMSTRUCT_INDEX + add hl, bc + ld [hl], 0 + ret + +DeinitializeAllSprites: +; Clear the index field of every struct in the wSpriteAnimationStructs array. + ld hl, wSpriteAnimationStructs + ld bc, SPRITEANIMSTRUCT_LENGTH + ld e, NUM_SPRITE_ANIM_STRUCTS + xor a +.loop + ld [hl], a + add hl, bc + dec e + jr nz, .loop + ret + +UpdateAnimFrame: + call InitSpriteAnimBuffer ; init WRAM + call GetSpriteAnimFrame ; read from a memory array + cp oamwait_command + jr z, .done + cp oamdelete_command + jr z, .delete + call GetFrameOAMPointer + ; add byte to [wCurAnimVTile] + ld a, [wCurAnimVTile] + add [hl] + ld [wCurAnimVTile], a + inc hl + ; load pointer into hl + ld a, [hli] + ld h, [hl] + ld l, a + push bc + ld a, [wCurSpriteOAMAddr] + ld e, a + ld d, HIGH(wShadowOAM) + ld a, [hli] + ld c, a ; number of objects +.loop + ; first byte: y (px) + ; [de] = [wCurAnimYCoord] + [wCurAnimYOffset] + [wGlobalAnimYOffset] + AddOrSubtractY([hl]) + ld a, [wCurAnimYCoord] + ld b, a + ld a, [wCurAnimYOffset] + add b + ld b, a + ld a, [wGlobalAnimYOffset] + add b + ld b, a + call AddOrSubtractY + add b + ld [de], a + inc hl + inc de + ; second byte: x (px) + ; [de] = [wCurAnimXCoord] + [wCurAnimXOffset] + [wGlobalAnimXOffset] + AddOrSubtractX([hl]) + ld a, [wCurAnimXCoord] + ld b, a + ld a, [wCurAnimXOffset] + add b + ld b, a + ld a, [wGlobalAnimXOffset] + add b + ld b, a + call AddOrSubtractX + add b + ld [de], a + inc hl + inc de + ; third byte: vtile + ; [de] = [wCurAnimVTile] + [hl] + ld a, [wCurAnimVTile] + add [hl] + ld [de], a + inc hl + inc de + ; fourth byte: attributes + ; [de] = GetSpriteOAMAttr([hl]) + call GetSpriteOAMAttr + ld [de], a + inc hl + inc de + ld a, e + ld [wCurSpriteOAMAddr], a + cp LOW(wShadowOAMEnd) + jr nc, .reached_the_end + dec c + jr nz, .loop + pop bc + jr .done + +.delete +; Removes the object from the screen, as opposed to `oamend` which just stops all motion + call DeinitializeSprite +.done + and a + ret + +.reached_the_end + pop bc + scf + ret + +AddOrSubtractY: + push hl + ld a, [hl] + ld hl, wCurSpriteOAMFlags + bit OAM_Y_FLIP, [hl] + jr z, .ok + ; -8 - a + add 8 + xor $ff + inc a + +.ok + pop hl + ret + +AddOrSubtractX: + push hl + ld a, [hl] + ld hl, wCurSpriteOAMFlags + bit OAM_X_FLIP, [hl] + jr z, .ok + ; -8 - a + add 8 + xor $ff + inc a + +.ok + pop hl + ret + +GetSpriteOAMAttr: + ld a, [wCurSpriteOAMFlags] + ld b, a + ld a, [hl] + xor b + and PRIORITY | Y_FLIP | X_FLIP + ld b, a + ld a, [hl] + and ~(PRIORITY | Y_FLIP | X_FLIP) + or b + ret + +InitSpriteAnimBuffer: + xor a + ld [wCurSpriteOAMFlags], a + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld a, [hli] + ld [wCurAnimVTile], a + ld a, [hli] + ld [wCurAnimXCoord], a + ld a, [hli] + ld [wCurAnimYCoord], a + ld a, [hli] + ld [wCurAnimXOffset], a + ld a, [hli] + ld [wCurAnimYOffset], a + ret + +GetSpriteAnimVTile: +; a = wSpriteAnimDict[a] if a in wSpriteAnimDict else vtile offset $00 + push hl + push bc + ld hl, wSpriteAnimDict + ld b, a + ld c, NUM_SPRITEANIMDICT_ENTRIES +.loop + ld a, [hli] + cp b + jr z, .ok + inc hl + dec c + jr nz, .loop + xor a + jr .done + +.ok + ld a, [hl] + +.done + pop bc + pop hl + ret + +_ReinitSpriteAnimFrame:: + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld [hl], a + ld hl, SPRITEANIMSTRUCT_DURATION + add hl, bc + ld [hl], 0 + ld hl, SPRITEANIMSTRUCT_FRAME + add hl, bc + ld [hl], -1 + ret + +GetSpriteAnimFrame: +.loop + ld hl, SPRITEANIMSTRUCT_DURATION + add hl, bc + ld a, [hl] + and a + jr z, .next_frame + dec [hl] + call .GetPointer + ld a, [hli] + push af + jr .okay + +.next_frame + ld hl, SPRITEANIMSTRUCT_FRAME + add hl, bc + inc [hl] + call .GetPointer + ld a, [hli] + cp oamrestart_command + jr z, .restart + cp oamend_command + jr z, .repeat_last + + push af + ld a, [hl] + push hl + and ~(Y_FLIP << 1 | X_FLIP << 1) + ld hl, SPRITEANIMSTRUCT_DURATIONOFFSET + add hl, bc + add [hl] + ld hl, SPRITEANIMSTRUCT_DURATION + add hl, bc + ld [hl], a + pop hl +.okay + ld a, [hl] + and Y_FLIP << 1 | X_FLIP << 1 ; The << 1 is compensated in the "oamframe" macro + srl a + ld [wCurSpriteOAMFlags], a + pop af + ret + +.repeat_last + xor a + ld hl, SPRITEANIMSTRUCT_DURATION + add hl, bc + ld [hl], a + + ld hl, SPRITEANIMSTRUCT_FRAME + add hl, bc + dec [hl] + dec [hl] + jr .loop + +.restart + xor a + ld hl, SPRITEANIMSTRUCT_DURATION + add hl, bc + ld [hl], a + + dec a + ld hl, SPRITEANIMSTRUCT_FRAME + add hl, bc + ld [hl], a + jr .loop + +.GetPointer: + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, SpriteAnimFrameData + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + ld hl, SPRITEANIMSTRUCT_FRAME + add hl, bc + ld l, [hl] + ld h, 0 + add hl, hl + add hl, de + ret + +GetFrameOAMPointer: + ld e, a + ld d, 0 + ld hl, SpriteAnimOAMData + add hl, de + add hl, de + add hl, de + ret + +UnusedLoadSpriteAnimGFX: ; unreferenced + push hl + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld de, UnusedSpriteAnimGFX + add hl, de + ld c, [hl] + inc hl + ld b, [hl] + inc hl + ld e, [hl] + inc hl + ld d, [hl] + pop hl + push bc + call Request2bpp + pop bc + ret + +INCLUDE "data/sprite_anims/sequences.asm" + +INCLUDE "engine/gfx/sprite_anims.asm" + +INCLUDE "data/sprite_anims/framesets.asm" + +INCLUDE "data/sprite_anims/oam.asm" + +INCLUDE "data/sprite_anims/unused_gfx.asm" + +Sprites_Cosine: +; a = d * cos(a * pi/32) + add %010000 ; cos(x) = sin(x + pi/2) + ; fallthrough +Sprites_Sine: +; a = d * sin(a * pi/32) + calc_sine_wave + +AnimateEndOfExpBar: + ldh a, [hSGB] + ld de, EndOfExpBarGFX + and a + jr z, .load + ld de, SGBEndOfExpBarGFX + +.load + ld hl, vTiles0 tile $00 + lb bc, BANK(EndOfExpBarGFX), 1 + call Request2bpp + ld c, 8 + ld d, 0 +.loop + push bc + call .AnimateFrame + call DelayFrame + pop bc + inc d + inc d + dec c + jr nz, .loop + call ClearSprites + ret + +.AnimateFrame: + ld hl, wShadowOAMSprite00 + ld c, 8 ; number of animated circles +.anim_loop + ld a, c + and a + ret z + dec c + ld a, c +; multiply by 8 + sla a + sla a + sla a + push af + + push de + push hl + call Sprites_Sine + pop hl + pop de + add 13 * TILE_WIDTH + ld [hli], a ; y + + pop af + push de + push hl + call Sprites_Cosine + pop hl + pop de + add 10 * TILE_WIDTH + 4 + ld [hli], a ; x + + ld a, $0 + ld [hli], a ; tile id + ld a, PAL_BATTLE_OB_BLUE + ld [hli], a ; attributes + jr .anim_loop + +EndOfExpBarGFX: +INCBIN "gfx/battle/expbarend.2bpp" +SGBEndOfExpBarGFX: +INCBIN "gfx/battle/expbarend_sgb.2bpp" + +ClearSpriteAnims2: + push hl + push de + push bc + push af + ld hl, wSpriteAnimData + ld bc, wSpriteAnimDataEnd - wSpriteAnimData +.loop + ld [hl], 0 + inc hl + dec bc + ld a, c + or b + jr nz, .loop + pop af + pop bc + pop de + pop hl + ret diff --git a/engine/gfx/trademon_frontpic.asm b/engine/gfx/trademon_frontpic.asm new file mode 100644 index 0000000..d557123 --- /dev/null +++ b/engine/gfx/trademon_frontpic.asm @@ -0,0 +1,38 @@ +GetTrademonFrontpic: + ld a, [wOTTrademonSpecies] + ld hl, wOTTrademonDVs + ld de, vTiles2 + push de + push af + predef GetUnownLetter + pop af + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call GetBaseData + pop de + predef GetAnimatedFrontpic + ret + +AnimateTrademonFrontpic: + ld a, [wOTTrademonSpecies] + call IsAPokemon + ret c + farcall ShowOTTrademonStats + ld a, [wOTTrademonSpecies] + ld [wCurPartySpecies], a + ld a, [wOTTrademonDVs] + ld [wTempMonDVs], a + ld a, [wOTTrademonDVs + 1] + ld [wTempMonDVs + 1], a + ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbBGPals + farcall TradeAnim_ShowGetmonFrontpic + ld a, [wOTTrademonSpecies] + ld [wCurPartySpecies], a + hlcoord 7, 2 + ld d, $0 + ld e, ANIM_MON_TRADE + predef AnimateFrontpic + ret diff --git a/engine/items/buy_sell_toss.asm b/engine/items/buy_sell_toss.asm new file mode 100644 index 0000000..16dce83 --- /dev/null +++ b/engine/items/buy_sell_toss.asm @@ -0,0 +1,221 @@ +SelectQuantityToToss: + ld hl, TossItem_MenuHeader + call LoadMenuHeader + call Toss_Sell_Loop + ret + +SelectQuantityToBuy: + farcall GetItemPrice +RooftopSale_SelectQuantityToBuy: + ld a, d + ld [wBuySellItemPrice + 0], a + ld a, e + ld [wBuySellItemPrice + 1], a + ld hl, BuyItem_MenuHeader + call LoadMenuHeader + call Toss_Sell_Loop + ret + +SelectQuantityToSell: + farcall GetItemPrice + ld a, d + ld [wBuySellItemPrice + 0], a + ld a, e + ld [wBuySellItemPrice + 1], a + ld hl, SellItem_MenuHeader + call LoadMenuHeader + call Toss_Sell_Loop + ret + +Toss_Sell_Loop: + ld a, 1 + ld [wItemQuantityChange], a +.loop + call BuySellToss_UpdateQuantityDisplay ; update display + call BuySellToss_InterpretJoypad ; joy action + jr nc, .loop + cp -1 + jr nz, .nope ; pressed B + scf + ret + +.nope + and a + ret + +BuySellToss_InterpretJoypad: + call JoyTextDelay_ForcehJoyDown ; get joypad + bit B_BUTTON_F, c + jr nz, .b + bit A_BUTTON_F, c + jr nz, .a + bit D_DOWN_F, c + jr nz, .down + bit D_UP_F, c + jr nz, .up + bit D_LEFT_F, c + jr nz, .left + bit D_RIGHT_F, c + jr nz, .right + and a + ret + +.b + ld a, -1 + scf + ret + +.a + ld a, 0 + scf + ret + +.down + ld hl, wItemQuantityChange + dec [hl] + jr nz, .finish_down + ld a, [wItemQuantity] + ld [hl], a + +.finish_down + and a + ret + +.up + ld hl, wItemQuantityChange + inc [hl] + ld a, [wItemQuantity] + cp [hl] + jr nc, .finish_up + ld [hl], 1 + +.finish_up + and a + ret + +.left + ld a, [wItemQuantityChange] + sub 10 + jr c, .load_1 + jr z, .load_1 + jr .finish_left + +.load_1 + ld a, 1 + +.finish_left + ld [wItemQuantityChange], a + and a + ret + +.right + ld a, [wItemQuantityChange] + add 10 + ld b, a + ld a, [wItemQuantity] + cp b + jr nc, .finish_right + ld b, a + +.finish_right + ld a, b + ld [wItemQuantityChange], a + and a + ret + +BuySellToss_UpdateQuantityDisplay: + call MenuBox + call MenuBoxCoord2Tile + ld de, SCREEN_WIDTH + 1 + add hl, de + ld [hl], "×" + inc hl + ld de, wItemQuantityChange + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ld a, [wMenuDataPointer] + ld e, a + ld a, [wMenuDataPointer + 1] + ld d, a + ld a, [wMenuDataBank] + call FarCall_de + ret + +NoPriceToDisplay: +; Does nothing. + ret + +DisplayPurchasePrice: + call BuySell_MultiplyPrice + call BuySell_DisplaySubtotal + ret + +DisplaySellingPrice: + call BuySell_MultiplyPrice + call Sell_HalvePrice + call BuySell_DisplaySubtotal + ret + +BuySell_MultiplyPrice: + xor a + ldh [hMultiplicand + 0], a + ld a, [wBuySellItemPrice + 0] + ldh [hMultiplicand + 1], a + ld a, [wBuySellItemPrice + 1] + ldh [hMultiplicand + 2], a + ld a, [wItemQuantityChange] + ldh [hMultiplier], a + push hl + call Multiply + pop hl + ret + +Sell_HalvePrice: + push hl + ld hl, hProduct + 1 + ld a, [hl] + srl a + ld [hli], a + ld a, [hl] + rra + ld [hli], a + ld a, [hl] + rra + ld [hl], a + pop hl + ret + +BuySell_DisplaySubtotal: + push hl + ld hl, hMoneyTemp + ldh a, [hProduct + 1] + ld [hli], a + ldh a, [hProduct + 2] + ld [hli], a + ldh a, [hProduct + 3] + ld [hl], a + pop hl + inc hl + ld de, hMoneyTemp + lb bc, PRINTNUM_MONEY | 3, 6 + call PrintNum + call WaitBGMap + ret + +TossItem_MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 15, 9, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw NoPriceToDisplay + db 0 ; default option + +BuyItem_MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 7, 15, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw DisplayPurchasePrice + db -1 ; default option + +SellItem_MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 7, 15, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw DisplaySellingPrice + db 0 ; default option diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm new file mode 100644 index 0000000..3d4be93 --- /dev/null +++ b/engine/items/item_effects.asm @@ -0,0 +1,2913 @@ +_DoItemEffect:: + ld a, [wCurItem] + ld [wNamedObjectIndex], a + call GetItemName + call CopyName1 + ld a, 1 + ld [wItemEffectSucceeded], a + ld a, [wCurItem] + dec a + ld hl, ItemEffects + rst JumpTable + ret + +ItemEffects: +; entries correspond to item ids (see constants/item_constants.asm) + table_width 2, ItemEffects + dw PokeBallEffect ; MASTER_BALL + dw PokeBallEffect ; ULTRA_BALL + dw NoEffect ; BRIGHTPOWDER + dw PokeBallEffect ; GREAT_BALL + dw PokeBallEffect ; POKE_BALL + dw TownMapEffect ; TOWN_MAP + dw BicycleEffect ; BICYCLE + dw EvoStoneEffect ; MOON_STONE + dw StatusHealingEffect ; ANTIDOTE + dw StatusHealingEffect ; BURN_HEAL + dw StatusHealingEffect ; ICE_HEAL + dw StatusHealingEffect ; AWAKENING + dw StatusHealingEffect ; PARLYZ_HEAL + dw FullRestoreEffect ; FULL_RESTORE + dw RestoreHPEffect ; MAX_POTION + dw RestoreHPEffect ; HYPER_POTION + dw RestoreHPEffect ; SUPER_POTION + dw RestoreHPEffect ; POTION + dw EscapeRopeEffect ; ESCAPE_ROPE + dw RepelEffect ; REPEL + dw RestorePPEffect ; MAX_ELIXER + dw EvoStoneEffect ; FIRE_STONE + dw EvoStoneEffect ; THUNDERSTONE + dw EvoStoneEffect ; WATER_STONE + dw NoEffect ; ITEM_19 + dw VitaminEffect ; HP_UP + dw VitaminEffect ; PROTEIN + dw VitaminEffect ; IRON + dw VitaminEffect ; CARBOS + dw NoEffect ; LUCKY_PUNCH + dw VitaminEffect ; CALCIUM + dw RareCandyEffect ; RARE_CANDY + dw XAccuracyEffect ; X_ACCURACY + dw EvoStoneEffect ; LEAF_STONE + dw NoEffect ; METAL_POWDER + dw NoEffect ; NUGGET + dw PokeDollEffect ; POKE_DOLL + dw StatusHealingEffect ; FULL_HEAL + dw ReviveEffect ; REVIVE + dw ReviveEffect ; MAX_REVIVE + dw GuardSpecEffect ; GUARD_SPEC + dw SuperRepelEffect ; SUPER_REPEL + dw MaxRepelEffect ; MAX_REPEL + dw DireHitEffect ; DIRE_HIT + dw NoEffect ; ITEM_2D + dw RestoreHPEffect ; FRESH_WATER + dw RestoreHPEffect ; SODA_POP + dw RestoreHPEffect ; LEMONADE + dw XItemEffect ; X_ATTACK + dw NoEffect ; ITEM_32 + dw XItemEffect ; X_DEFEND + dw XItemEffect ; X_SPEED + dw XItemEffect ; X_SPECIAL + dw CoinCaseEffect ; COIN_CASE + dw ItemfinderEffect ; ITEMFINDER + dw PokeFluteEffect ; POKE_FLUTE + dw NoEffect ; EXP_SHARE + dw OldRodEffect ; OLD_ROD + dw GoodRodEffect ; GOOD_ROD + dw NoEffect ; SILVER_LEAF + dw SuperRodEffect ; SUPER_ROD + dw RestorePPEffect ; PP_UP + dw RestorePPEffect ; ETHER + dw RestorePPEffect ; MAX_ETHER + dw RestorePPEffect ; ELIXER + dw NoEffect ; RED_SCALE + dw NoEffect ; SECRETPOTION + dw NoEffect ; S_S_TICKET + dw NoEffect ; MYSTERY_EGG + dw NoEffect ; CLEAR_BELL + dw NoEffect ; SILVER_WING + dw RestoreHPEffect ; MOOMOO_MILK + dw NoEffect ; QUICK_CLAW + dw StatusHealingEffect ; PSNCUREBERRY + dw NoEffect ; GOLD_LEAF + dw NoEffect ; SOFT_SAND + dw NoEffect ; SHARP_BEAK + dw StatusHealingEffect ; PRZCUREBERRY + dw StatusHealingEffect ; BURNT_BERRY + dw StatusHealingEffect ; ICE_BERRY + dw NoEffect ; POISON_BARB + dw NoEffect ; KINGS_ROCK + dw BitterBerryEffect ; BITTER_BERRY + dw StatusHealingEffect ; MINT_BERRY + dw NoEffect ; RED_APRICORN + dw NoEffect ; TINYMUSHROOM + dw NoEffect ; BIG_MUSHROOM + dw NoEffect ; SILVERPOWDER + dw NoEffect ; BLU_APRICORN + dw NoEffect ; ITEM_5A + dw NoEffect ; AMULET_COIN + dw NoEffect ; YLW_APRICORN + dw NoEffect ; GRN_APRICORN + dw NoEffect ; CLEANSE_TAG + dw NoEffect ; MYSTIC_WATER + dw NoEffect ; TWISTEDSPOON + dw NoEffect ; WHT_APRICORN + dw NoEffect ; BLACKBELT_I + dw NoEffect ; BLK_APRICORN + dw NoEffect ; ITEM_64 + dw NoEffect ; PNK_APRICORN + dw NoEffect ; BLACKGLASSES + dw NoEffect ; SLOWPOKETAIL + dw NoEffect ; PINK_BOW + dw NoEffect ; STICK + dw NoEffect ; SMOKE_BALL + dw NoEffect ; NEVERMELTICE + dw NoEffect ; MAGNET + dw StatusHealingEffect ; MIRACLEBERRY + dw NoEffect ; PEARL + dw NoEffect ; BIG_PEARL + dw NoEffect ; EVERSTONE + dw NoEffect ; SPELL_TAG + dw RestoreHPEffect ; RAGECANDYBAR + dw NoEffect ; GS_BALL + dw BlueCardEffect ; BLUE_CARD + dw NoEffect ; MIRACLE_SEED + dw NoEffect ; THICK_CLUB + dw NoEffect ; FOCUS_BAND + dw NoEffect ; ITEM_78 + dw EnergypowderEffect ; ENERGYPOWDER + dw EnergyRootEffect ; ENERGY_ROOT + dw HealPowderEffect ; HEAL_POWDER + dw RevivalHerbEffect ; REVIVAL_HERB + dw NoEffect ; HARD_STONE + dw NoEffect ; LUCKY_EGG + dw CardKeyEffect ; CARD_KEY + dw NoEffect ; MACHINE_PART + dw NoEffect ; EGG_TICKET + dw NoEffect ; LOST_ITEM + dw NoEffect ; STARDUST + dw NoEffect ; STAR_PIECE + dw BasementKeyEffect ; BASEMENT_KEY + dw NoEffect ; PASS + dw NoEffect ; ITEM_87 + dw NoEffect ; ITEM_88 + dw NoEffect ; ITEM_89 + dw NoEffect ; CHARCOAL + dw RestoreHPEffect ; BERRY_JUICE + dw NoEffect ; SCOPE_LENS + dw NoEffect ; ITEM_8D + dw NoEffect ; ITEM_8E + dw NoEffect ; METAL_COAT + dw NoEffect ; DRAGON_FANG + dw NoEffect ; ITEM_91 + dw NoEffect ; LEFTOVERS + dw NoEffect ; ITEM_93 + dw NoEffect ; ITEM_94 + dw NoEffect ; ITEM_95 + dw RestorePPEffect ; MYSTERYBERRY + dw NoEffect ; DRAGON_SCALE + dw NoEffect ; BERSERK_GENE + dw NoEffect ; ITEM_99 + dw NoEffect ; ITEM_9A + dw NoEffect ; ITEM_9B + dw SacredAshEffect ; SACRED_ASH + dw PokeBallEffect ; HEAVY_BALL + dw NoEffect ; FLOWER_MAIL + dw PokeBallEffect ; LEVEL_BALL + dw PokeBallEffect ; LURE_BALL + dw PokeBallEffect ; FAST_BALL + dw NoEffect ; ITEM_A2 + dw NoEffect ; LIGHT_BALL + dw PokeBallEffect ; FRIEND_BALL + dw PokeBallEffect ; MOON_BALL + dw PokeBallEffect ; LOVE_BALL + dw NormalBoxEffect ; NORMAL_BOX + dw GorgeousBoxEffect ; GORGEOUS_BOX + dw EvoStoneEffect ; SUN_STONE + dw NoEffect ; POLKADOT_BOW + dw NoEffect ; ITEM_AB + dw NoEffect ; UP_GRADE + dw RestoreHPEffect ; BERRY + dw RestoreHPEffect ; GOLD_BERRY + dw SquirtbottleEffect ; SQUIRTBOTTLE + dw NoEffect ; ITEM_B0 + dw PokeBallEffect ; PARK_BALL + dw NoEffect ; RAINBOW_WING + dw NoEffect ; ITEM_B3 + assert_table_length ITEM_B3 +; The items past ITEM_B3 do not have effect entries: +; BRICK_PIECE +; SURF_MAIL +; LITEBLUEMAIL +; PORTRAITMAIL +; LOVELY_MAIL +; EON_MAIL +; MORPH_MAIL +; BLUESKY_MAIL +; MUSIC_MAIL +; MIRAGE_MAIL +; ITEM_BE +; They all have the ITEMMENU_NOUSE attribute so they can't be used anyway. +; NoEffect would be appropriate, with the table then being NUM_ITEMS long. + +PokeBallEffect: +; BUG: The Dude's catching tutorial may crash if his Poké Ball can't be used (see docs/bugs_and_glitches.md) + ld a, [wBattleMode] + dec a + jp nz, UseBallInTrainerBattle + + ld a, [wPartyCount] + cp PARTY_LENGTH + jr nz, .room_in_party + + ld a, BANK(sBoxCount) + call OpenSRAM + ld a, [sBoxCount] + cp MONS_PER_BOX + call CloseSRAM + jp z, Ball_BoxIsFullMessage + +.room_in_party +; BUG: Using a Park Ball in non-Contest battles has a corrupt animation (see docs/bugs_and_glitches.md) + xor a + ld [wWildMon], a + ld a, [wCurItem] + cp PARK_BALL + call nz, ReturnToBattle_UseBall + + ld hl, wOptions + res NO_TEXT_SCROLL, [hl] + ld hl, ItemUsedText + call PrintText + + ld a, [wEnemyMonCatchRate] + ld b, a + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL + jp z, .catch_without_fail + ld a, [wCurItem] + cp MASTER_BALL + jp z, .catch_without_fail + ld a, [wCurItem] + ld c, a + ld hl, BallMultiplierFunctionTable + +.get_multiplier_loop + ld a, [hli] + cp $ff + jr z, .skip_or_return_from_ball_fn + cp c + jr z, .call_ball_function + inc hl + inc hl + jr .get_multiplier_loop + +.call_ball_function + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .skip_or_return_from_ball_fn + push de + jp hl + +.skip_or_return_from_ball_fn + ld a, [wCurItem] + cp LEVEL_BALL + ld a, b + jp z, .skip_hp_calc + + ld a, b + ldh [hMultiplicand + 2], a + + ld hl, wEnemyMonHP + ld b, [hl] + inc hl + ld c, [hl] + inc hl + ld d, [hl] + inc hl + ld e, [hl] + sla c + rl b + + ld h, d + ld l, e + add hl, de + add hl, de + ld d, h + ld e, l + ld a, d + and a + jr z, .okay_1 + + srl d + rr e + srl d + rr e + srl b + rr c + srl b + rr c + + ld a, c + and a + jr nz, .okay_1 + ld c, $1 +.okay_1 + ld b, e + + push bc + ld a, b + sub c + ldh [hMultiplier], a + xor a + ldh [hDividend + 0], a + ldh [hMultiplicand + 0], a + ldh [hMultiplicand + 1], a + call Multiply + pop bc + + ld a, b + ldh [hDivisor], a + ld b, 4 + call Divide + + ldh a, [hQuotient + 3] + and a + jr nz, .statuscheck + ld a, 1 +.statuscheck +; BUG: BRN/PSN/PAR do not affect catch rate (see docs/bugs_and_glitches.md) + ld b, a + ld a, [wEnemyMonStatus] + and 1 << FRZ | SLP_MASK + ld c, 10 + jr nz, .addstatus + and a + ld c, 5 + jr nz, .addstatus + ld c, 0 +.addstatus + ld a, b + add c + jr nc, .max_1 + ld a, $ff +.max_1 + +; BUG: HELD_CATCH_CHANCE has no effect (see docs/bugs_and_glitches.md) + ld d, a + push de + ld a, [wBattleMonItem] + farcall GetItemHeldEffect + ld a, b + cp HELD_CATCH_CHANCE + pop de + ld a, d + jr nz, .max_2 + add c + jr nc, .max_2 + ld a, $ff +.max_2 + +.skip_hp_calc + ld b, a + ld [wFinalCatchRate], a + call Random + + cp b + ld a, 0 + jr z, .catch_without_fail + jr nc, .fail_to_catch + +.catch_without_fail + ld a, [wEnemyMonSpecies] + +.fail_to_catch + ld [wWildMon], a + ld c, 20 + call DelayFrames + + ld a, [wCurItem] + cp POKE_BALL + 1 ; Assumes Master/Ultra/Great come before + jr c, .not_kurt_ball + ld a, POKE_BALL +.not_kurt_ball + ld [wBattleAnimParam], a + + ld de, ANIM_THROW_POKE_BALL + ld a, e + ld [wFXAnimID], a + ld a, d + ld [wFXAnimID + 1], a + xor a + ldh [hBattleTurn], a + ld [wThrownBallWobbleCount], a + ld [wNumHits], a + predef PlayBattleAnim + + ld a, [wWildMon] + and a + jr nz, .caught + ld a, [wThrownBallWobbleCount] + cp 1 + ld hl, BallBrokeFreeText + jp z, .shake_and_break_free + cp 2 + ld hl, BallAppearedCaughtText + jp z, .shake_and_break_free + cp 3 + ld hl, BallAlmostHadItText + jp z, .shake_and_break_free + cp 4 + ld hl, BallSoCloseText + jp z, .shake_and_break_free + +.caught + ld hl, wEnemyMonStatus + ld a, [hli] + push af + inc hl + ld a, [hli] + push af + ld a, [hl] + push af + push hl + ld hl, wEnemyMonItem + ld a, [hl] + push af + push hl + ld hl, wEnemySubStatus5 + ld a, [hl] + push af + set SUBSTATUS_TRANSFORMED, [hl] + + bit SUBSTATUS_TRANSFORMED, a + jr nz, .load_data + + ld hl, wEnemyBackupDVs + ld a, [wEnemyMonDVs] + ld [hli], a + ld a, [wEnemyMonDVs + 1] + ld [hl], a + +.load_data + ld a, [wTempEnemyMonSpecies] + ld [wCurPartySpecies], a + ld a, [wEnemyMonLevel] + ld [wCurPartyLevel], a + farcall LoadEnemyMon + + pop af + ld [wEnemySubStatus5], a + + pop hl + pop af + ld [hl], a + pop hl + pop af + ld [hld], a + pop af + ld [hld], a + dec hl + pop af + ld [hl], a + + ld hl, wEnemySubStatus5 + bit SUBSTATUS_TRANSFORMED, [hl] + jr nz, .Transformed + ld hl, wWildMonMoves + ld de, wEnemyMonMoves + ld bc, NUM_MOVES + call CopyBytes + + ld hl, wWildMonPP + ld de, wEnemyMonPP + ld bc, NUM_MOVES + call CopyBytes + +.Transformed: + ld a, [wEnemyMonSpecies] + ld [wWildMon], a + ld [wCurPartySpecies], a + ld [wTempSpecies], a + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL + jp z, .FinishTutorial + + farcall StubbedTrainerRankings_WildMonsCaught + + ld hl, Text_GotchaMonWasCaught + call PrintText + + call ClearSprites + + ld a, [wTempSpecies] + call CheckCaughtMon + + ld a, c + push af + ld a, [wTempSpecies] + call SetSeenAndCaughtMon + pop af + and a + jr nz, .skip_pokedex + + call CheckReceivedDex + jr z, .skip_pokedex + + ld hl, NewDexDataText + call PrintText + + call ClearSprites + + ld a, [wEnemyMonSpecies] + ld [wTempSpecies], a + predef NewPokedexEntry + +.skip_pokedex + ld a, [wBattleType] + cp BATTLETYPE_CONTEST + jp z, .catch_bug_contest_mon + cp BATTLETYPE_CELEBI + jr nz, .not_celebi + ld hl, wBattleResult + set BATTLERESULT_CAUGHT_CELEBI, [hl] +.not_celebi + + ld a, [wPartyCount] + cp PARTY_LENGTH + jr z, .SendToPC + + xor a ; PARTYMON + ld [wMonType], a + call ClearSprites + + predef TryAddMonToParty + + farcall SetCaughtData + + ld a, [wCurItem] + cp FRIEND_BALL + jr nz, .SkipPartyMonFriendBall + + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1Happiness + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + + ld a, FRIEND_BALL_HAPPINESS + ld [hl], a + +.SkipPartyMonFriendBall: + ld hl, AskGiveNicknameText + call PrintText + + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + + call YesNoBox + jp c, .return_from_capture + + ld a, [wPartyCount] + dec a + ld [wCurPartyMon], a + ld hl, wPartyMonNicknames + ld bc, MON_NAME_LENGTH + call AddNTimes + + ld d, h + ld e, l + push de + xor a ; PARTYMON + ld [wMonType], a + ld b, NAME_MON + farcall NamingScreen + + call RotateThreePalettesRight + + call LoadStandardFont + + pop hl + ld de, wStringBuffer1 + call InitName + + jp .return_from_capture + +.SendToPC: + call ClearSprites + + predef SendMonIntoBox + + farcall SetBoxMonCaughtData + + ld a, BANK(sBoxCount) + call OpenSRAM + + ld a, [sBoxCount] + cp MONS_PER_BOX + jr nz, .BoxNotFullYet + ld hl, wBattleResult + set BATTLERESULT_BOX_FULL, [hl] +.BoxNotFullYet: + ld a, [wCurItem] + cp FRIEND_BALL + jr nz, .SkipBoxMonFriendBall + ; The captured mon is now first in the box + ld a, FRIEND_BALL_HAPPINESS + ld [sBoxMon1Happiness], a +.SkipBoxMonFriendBall: + call CloseSRAM + + ld hl, AskGiveNicknameText + call PrintText + + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + + call YesNoBox + jr c, .SkipBoxMonNickname + + xor a + ld [wCurPartyMon], a + ld a, BOXMON + ld [wMonType], a + ld de, wMonOrItemNameBuffer + ld b, NAME_MON + farcall NamingScreen + + ld a, BANK(sBoxMonNicknames) + call OpenSRAM + + ld hl, wMonOrItemNameBuffer + ld de, sBoxMonNicknames + ld bc, MON_NAME_LENGTH + call CopyBytes + + ld hl, sBoxMonNicknames + ld de, wStringBuffer1 + call InitName + + call CloseSRAM + +.SkipBoxMonNickname: + ld a, BANK(sBoxMonNicknames) + call OpenSRAM + + ld hl, sBoxMonNicknames + ld de, wMonOrItemNameBuffer + ld bc, MON_NAME_LENGTH + call CopyBytes + + call CloseSRAM + + ld hl, BallSentToPCText + call PrintText + + call RotateThreePalettesRight + call LoadStandardFont + jr .return_from_capture + +.catch_bug_contest_mon + farcall BugContest_SetCaughtContestMon + jr .return_from_capture + +.FinishTutorial: + ld hl, Text_GotchaMonWasCaught + +.shake_and_break_free + call PrintText + call ClearSprites + +.return_from_capture + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL + ret z + cp BATTLETYPE_DEBUG + ret z + cp BATTLETYPE_CONTEST + jr z, .used_park_ball + + ld a, [wWildMon] + and a + jr z, .toss + + call ClearBGPalettes + call ClearTilemap + +.toss + ld hl, wNumItems + inc a + ld [wItemQuantityChange], a + jp TossItem + +.used_park_ball + ld hl, wParkBallsRemaining + dec [hl] + ret + +BallMultiplierFunctionTable: +; table of routines that increase or decrease the catch rate based on +; which ball is used in a certain situation. + dbw ULTRA_BALL, UltraBallMultiplier + dbw GREAT_BALL, GreatBallMultiplier + dbw SAFARI_BALL, SafariBallMultiplier ; Safari Ball, leftover from RBY + dbw HEAVY_BALL, HeavyBallMultiplier + dbw LEVEL_BALL, LevelBallMultiplier + dbw LURE_BALL, LureBallMultiplier + dbw FAST_BALL, FastBallMultiplier + dbw MOON_BALL, MoonBallMultiplier + dbw LOVE_BALL, LoveBallMultiplier + dbw PARK_BALL, ParkBallMultiplier + db -1 ; end + +UltraBallMultiplier: +; multiply catch rate by 2 + sla b + ret nc + ld b, $ff + ret + +SafariBallMultiplier: +GreatBallMultiplier: +ParkBallMultiplier: +; multiply catch rate by 1.5 + ld a, b + srl a + add b + ld b, a + ret nc + ld b, $ff + ret + +HeavyBallMultiplier: +; subtract 20 from catch rate if weight < 102.4 kg +; else add 0 to catch rate if weight < 204.8 kg +; else add 20 to catch rate if weight < 307.2 kg +; else add 30 to catch rate if weight < 409.6 kg +; else add 40 to catch rate + ld a, [wEnemyMonSpecies] + call GetPokemonIndexFromID + dec hl + ld d, h + ld e, l + add hl, hl + add hl, de + ld de, PokedexDataPointerTable + add hl, de + ld a, BANK(PokedexDataPointerTable) + call GetFarByte + push af + inc hl + ld a, BANK(PokedexDataPointerTable) + call GetFarWord + pop de + +.SkipText: + ld a, d + call GetFarByte + inc hl + cp "@" + jr nz, .SkipText + + ld a, d + push bc + inc hl + inc hl + call GetFarWord + + srl h + rr l + ld b, h + ld c, l + +rept 4 + srl b + rr c +endr + call .subbc + + srl b + rr c + call .subbc + + ld a, h + pop bc + jr .compare + +.subbc + ; subtract bc from hl + push bc + ld a, b + cpl + ld b, a + ld a, c + cpl + ld c, a + inc bc + add hl, bc + pop bc + ret + +.compare + ld c, a + cp HIGH(1024) ; 102.4 kg + jr c, .lightmon + + ld hl, .WeightsTable +.lookup + ld a, c + cp [hl] + jr c, .heavymon + inc hl + inc hl + jr .lookup + +.heavymon + inc hl + ld a, b + add [hl] + ld b, a + ret nc + ld b, $ff + ret + +.lightmon + ld a, b + sub 20 + ld b, a + ret nc + ld b, $1 + ret + +.WeightsTable: +; weight factor, boost + db HIGH(2048), 0 + db HIGH(3072), 20 + db HIGH(4096), 30 + db HIGH(65280), 40 + +LureBallMultiplier: +; multiply catch rate by 3 if this is a fishing rod battle + ld a, [wBattleType] + cp BATTLETYPE_FISH + ret nz + + ld a, b + add a + jr c, .max + + add b + jr nc, .done +.max + ld a, $ff +.done + ld b, a + ret + +MoonBallMultiplier: +; Multiply catch rate by 4 if mon evolves with moon stone + push de + push bc + ld a, [wTempEnemyMonSpecies] + call GetPokemonIndexFromID + ld b, h + ld c, l + ld hl, EvosAttacksPointers + ld a, BANK(EvosAttacksPointers) + call LoadDoubleIndirectPointer + + ld a, [wCurItem] + ld c, a + ld a, MOON_STONE + ld [wCurItem], a + ld d, h + ld e, l + farcall DetermineEvolutionItemResults + ld a, c + ld [wCurItem], a + ld a, d + or e + pop bc + pop de + ret z + + sla b + jr c, .max + sla b + jr nc, .done +.max + ld b, $ff +.done + ret + +LoveBallMultiplier: + + ; does species match? + ld a, [wTempEnemyMonSpecies] + ld c, a + ld a, [wTempBattleMonSpecies] + cp c + ret nz + + ; check player mon species + push bc + ld a, [wTempBattleMonSpecies] + ld [wCurPartySpecies], a + xor a ; PARTYMON + ld [wMonType], a + ld a, [wCurBattleMon] + ld [wCurPartyMon], a + farcall GetGender + jr c, .done1 ; no effect on genderless + + ld d, 0 ; male + jr nz, .got_player_gender + inc d ; female +.got_player_gender + + ; check wild mon species + push de + ld a, [wTempEnemyMonSpecies] + ld [wCurPartySpecies], a + ld a, WILDMON + ld [wMonType], a + farcall GetGender + jr c, .done2 ; no effect on genderless + + ld d, 0 ; male + jr nz, .got_wild_gender + inc d ; female +.got_wild_gender + +; BUG: Love Ball boosts catch rate for the wrong gender (see docs/bugs_and_glitches.md) + ld a, d + pop de + cp d + pop bc + ret nz + + sla b + jr c, .max + sla b + jr c, .max + sla b + ret nc +.max + ld b, $ff + ret + +.done2 + pop de + +.done1 + pop bc + ret + +FastBallMultiplier: +; multiply catch rate by 4 if the enemy mon is in the FleeMons tables + ld a, [wTempEnemyMonSpecies] + call GetPokemonIndexFromID + ld d, h + ld e, l + ld hl, FleeMons + ld c, 3 + push bc + +.loop +; BUG: Fast Ball only boosts catch rate for three Pokémon (see docs/bugs_and_glitches.md) + ld a, BANK(FleeMons) + call GetFarByte + ld c, a + inc hl + ld a, BANK(FleeMons) + call GetFarByte + ld b, a + and c + inc a + jr z, .next_list + ld a, b + cp d + jr nz, .loop + ld a, c + cp e + jr nz, .loop + + pop bc + sla b + jr c, .max + sla b + ret nc +.max + ld b, $ff + ret + +.next_list + pop bc + dec c + ret z + push bc + jr .loop + +LevelBallMultiplier: +; multiply catch rate by 8 if player mon level / 4 > enemy mon level +; multiply catch rate by 4 if player mon level / 2 > enemy mon level +; multiply catch rate by 2 if player mon level > enemy mon level + ld a, [wBattleMonLevel] + ld c, a + ld a, [wEnemyMonLevel] + cp c + ret nc ; if player is lower level, we're done here + sla b + jr c, .max + + srl c + cp c + ret nc ; if player/2 is lower level, we're done here + sla b + jr c, .max + + srl c + cp c + ret nc ; if player/4 is lower level, we're done here + sla b + ret nc + +.max + ld b, $ff + ret + +; BallDodgedText and BallMissedText were used in Gen 1. + +BallDodgedText: ; unreferenced + text_far _BallDodgedText + text_end + +BallMissedText: ; unreferenced + text_far _BallMissedText + text_end + +BallBrokeFreeText: + text_far _BallBrokeFreeText + text_end + +BallAppearedCaughtText: + text_far _BallAppearedCaughtText + text_end + +BallAlmostHadItText: + text_far _BallAlmostHadItText + text_end + +BallSoCloseText: + text_far _BallSoCloseText + text_end + +Text_GotchaMonWasCaught: + ; Gotcha! @ was caught!@ @ + text_far Text_BallCaught + text_asm + call WaitSFX + push bc + ld de, MUSIC_NONE + call PlayMusic + call DelayFrame + ld de, MUSIC_CAPTURE + call PlayMusic + pop bc + ld hl, WaitButtonText + ret + +WaitButtonText: + text_far _WaitButtonText + text_end + +BallSentToPCText: + text_far _BallSentToPCText + text_end + +NewDexDataText: + text_far _NewDexDataText + text_end + +AskGiveNicknameText: + text_far _AskGiveNicknameText + text_end + +ReturnToBattle_UseBall: + farcall _ReturnToBattle_UseBall + ret + +TownMapEffect: + farcall PokegearMap + ret + +BicycleEffect: + farcall BikeFunction + ret + +EvoStoneEffect: + ld b, PARTYMENUACTION_EVO_STONE + call UseItem_SelectMon + + jp c, .DecidedNotToUse + + ld a, MON_ITEM + call GetPartyParamLocation + + ld a, [hl] + cp EVERSTONE + jr z, .NoEffect + + ld a, TRUE + ld [wForceEvolution], a + farcall EvolvePokemon + + ld a, [wMonTriedToEvolve] + and a + jr z, .NoEffect + + jp UseDisposableItem + +.NoEffect: + call WontHaveAnyEffectMessage + +.DecidedNotToUse: + xor a + ld [wItemEffectSucceeded], a + ret + +VitaminEffect: + ld b, PARTYMENUACTION_HEALING_ITEM + call UseItem_SelectMon + + jp c, RareCandy_StatBooster_ExitMenu + + call RareCandy_StatBooster_GetParameters + + call GetStatExpRelativePointer + + ld a, MON_STAT_EXP + call GetPartyParamLocation + + add hl, bc + ld a, [hl] + cp 100 + jr nc, NoEffectMessage + + add 10 + ld [hl], a + call UpdateStatsAfterItem + + call GetStatExpRelativePointer + + ld hl, StatStrings + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wStringBuffer2 + ld bc, ITEM_NAME_LENGTH + call CopyBytes + + call Play_SFX_FULL_HEAL + + ld hl, ItemStatRoseText + call PrintText + + ld c, HAPPINESS_USEDITEM + farcall ChangeHappiness + + jp UseDisposableItem + +NoEffectMessage: + ld hl, ItemWontHaveEffectText + call PrintText + jp ClearPalettes + +UpdateStatsAfterItem: + ld a, MON_MAXHP + call GetPartyParamLocation + ld d, h + ld e, l + ld a, MON_STAT_EXP - 1 + call GetPartyParamLocation + ld b, TRUE + predef_jump CalcMonStats + +RareCandy_StatBooster_ExitMenu: + xor a + ld [wItemEffectSucceeded], a + jp ClearPalettes + +ItemStatRoseText: + text_far _ItemStatRoseText + text_end + +StatStrings: + dw .health + dw .attack + dw .defense + dw .speed + dw .special + +.health db "HEALTH@" +.attack db "ATTACK@" +.defense db "DEFENSE@" +.speed db "SPEED@" +.special db "SPECIAL@" + +GetStatExpRelativePointer: + ld a, [wCurItem] + ld hl, StatExpItemPointerOffsets +.next + cp [hl] + inc hl + jr z, .got_it + inc hl + jr .next + +.got_it + ld a, [hl] + ld c, a + ld b, 0 + ret + +StatExpItemPointerOffsets: + 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 + +RareCandy_StatBooster_GetParameters: + ld a, [wCurPartySpecies] + ld [wCurSpecies], a + ld [wTempSpecies], a + ld a, MON_LEVEL + call GetPartyParamLocation + ld a, [hl] + ld [wCurPartyLevel], a + call GetBaseData + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames + call GetNickname + ret + +RareCandyEffect: + ld b, PARTYMENUACTION_HEALING_ITEM + call UseItem_SelectMon + + jp c, RareCandy_StatBooster_ExitMenu + + call RareCandy_StatBooster_GetParameters + + ld a, MON_LEVEL + call GetPartyParamLocation + + ld a, [hl] + cp MAX_LEVEL + jp nc, NoEffectMessage + + inc a + ld [hl], a + ld [wCurPartyLevel], a + push de + ld d, a + farcall CalcExpAtLevel + + pop de + ld a, MON_EXP + call GetPartyParamLocation + + ldh a, [hMultiplicand + 0] + ld [hli], a + ldh a, [hMultiplicand + 1] + ld [hli], a + ldh a, [hMultiplicand + 2] + ld [hl], a + + ld a, MON_MAXHP + call GetPartyParamLocation + ld a, [hli] + ld b, a + ld c, [hl] + push bc + call UpdateStatsAfterItem + + ld a, MON_MAXHP + 1 + call GetPartyParamLocation + + pop bc + ld a, [hld] + sub c + ld c, a + ld a, [hl] + sbc b + ld b, a + dec hl + ld a, [hl] + add c + ld [hld], a + ld a, [hl] + adc b + ld [hl], a + farcall LevelUpHappinessMod + + ld a, PARTYMENUTEXT_LEVEL_UP + call ItemActionText + + xor a ; PARTYMON + ld [wMonType], a + predef CopyMonToTempMon + + hlcoord 9, 0 + ld b, 10 + ld c, 9 + call Textbox + + hlcoord 11, 1 + ld bc, 4 + predef PrintTempMonStats + + call WaitPressAorB_BlinkCursor + + xor a ; PARTYMON + ld [wMonType], a + ld a, [wCurPartySpecies] + ld [wTempSpecies], a + predef LearnLevelMoves + + xor a + ld [wForceEvolution], a + farcall EvolvePokemon + + jp UseDisposableItem + +HealPowderEffect: + ld b, PARTYMENUACTION_HEALING_ITEM + call UseItem_SelectMon + + jp c, StatusHealer_ExitMenu + + call UseStatusHealer + cp FALSE + jr nz, .not_used + + ld c, HAPPINESS_BITTERPOWDER + farcall ChangeHappiness + call LooksBitterMessage + + ld a, $0 + +.not_used + jp StatusHealer_Jumptable + +StatusHealingEffect: + ld b, PARTYMENUACTION_HEALING_ITEM + call UseItem_SelectMon + jp c, StatusHealer_ExitMenu + +FullyHealStatus: + call UseStatusHealer + jp StatusHealer_Jumptable + +UseStatusHealer: + call IsMonFainted + ld a, TRUE + ret z + call GetItemHealingAction + ld a, MON_STATUS + call GetPartyParamLocation + ld a, [hl] + and c + jr nz, .good + call IsItemUsedOnConfusedMon + ld a, TRUE + ret nc + ld b, PARTYMENUTEXT_HEAL_CONFUSION +.good + xor a + ld [hl], a + ld a, b + ld [wPartyMenuActionText], a + call HealStatus + call Play_SFX_FULL_HEAL + call ItemActionTextWaitButton + call UseDisposableItem + ld a, FALSE + ret + +IsItemUsedOnConfusedMon: + call IsItemUsedOnBattleMon + jr nc, .nope + ld a, [wPlayerSubStatus3] + bit SUBSTATUS_CONFUSED, a + jr z, .nope + ld a, c + cp $ff + jr nz, .nope + scf + ret + +.nope + and a + ret + +BattlemonRestoreHealth: + call IsItemUsedOnBattleMon + ret nc + ld a, MON_HP + call GetPartyParamLocation + ld a, [hli] + ld [wBattleMonHP], a + ld a, [hld] + ld [wBattleMonHP + 1], a + ret + +HealStatus: + call IsItemUsedOnBattleMon + ret nc + xor a + ld [wBattleMonStatus], a + ld hl, wPlayerSubStatus5 + res SUBSTATUS_TOXIC, [hl] + ld hl, wPlayerSubStatus1 + res SUBSTATUS_NIGHTMARE, [hl] + call GetItemHealingAction + ld a, c + cp %11111111 + jr nz, .not_full_heal + ld hl, wPlayerSubStatus3 + res SUBSTATUS_CONFUSED, [hl] +.not_full_heal + push bc + farcall CalcPlayerStats + pop bc + ret + +GetItemHealingAction: + push hl + ld a, [wCurItem] + ld hl, StatusHealingActions + ld bc, 3 +.next + cp [hl] + jr z, .found_it + add hl, bc + jr .next + +.found_it + inc hl + ld b, [hl] + inc hl + ld a, [hl] + ld c, a + cp %11111111 + pop hl + ret + +INCLUDE "data/items/heal_status.asm" + +StatusHealer_Jumptable: + ld hl, .dw + rst JumpTable + ret + +.dw + dw StatusHealer_ClearPalettes + dw StatusHealer_NoEffect + dw StatusHealer_ExitMenu + +RevivalHerbEffect: + ld b, PARTYMENUACTION_HEALING_ITEM + call UseItem_SelectMon + jp c, StatusHealer_ExitMenu + + call RevivePokemon + cp FALSE + jr nz, .not_used + + ld c, HAPPINESS_REVIVALHERB + farcall ChangeHappiness + call LooksBitterMessage + + ld a, $0 + +.not_used + jp StatusHealer_Jumptable + +ReviveEffect: + ld b, PARTYMENUACTION_HEALING_ITEM + call UseItem_SelectMon + jp c, StatusHealer_ExitMenu + + call RevivePokemon + jp StatusHealer_Jumptable + +RevivePokemon: + call IsMonFainted + ld a, TRUE + ret nz + ld a, [wBattleMode] + and a + jr z, .skip_to_revive + + ld a, [wCurPartyMon] + ld c, a + ld d, 0 + ld hl, wBattleParticipantsIncludingFainted + ld b, CHECK_FLAG + predef SmallFarFlagAction + ld a, c + and a + jr z, .skip_to_revive + + ld a, [wCurPartyMon] + ld c, a + ld hl, wBattleParticipantsNotFainted + ld b, SET_FLAG + predef SmallFarFlagAction + +.skip_to_revive + xor a + ld [wLowHealthAlarm], a + ld a, [wCurItem] + cp REVIVE + jr z, .revive_half_hp + + call ReviveFullHP + jr .finish_revive + +.revive_half_hp + call ReviveHalfHP + +.finish_revive + call HealHP_SFX_GFX + ld a, PARTYMENUTEXT_REVIVE + ld [wPartyMenuActionText], a + call ItemActionTextWaitButton + call UseDisposableItem + ld a, FALSE + ret + +FullRestoreEffect: + ld b, PARTYMENUACTION_HEALING_ITEM + call UseItem_SelectMon + jp c, StatusHealer_ExitMenu + + call IsMonFainted + jp z, StatusHealer_NoEffect + + call IsMonAtFullHealth + jr c, .NotAtFullHealth + + jp FullyHealStatus + +.NotAtFullHealth: + call .FullRestore + jp StatusHealer_Jumptable + +.FullRestore: + xor a + ld [wLowHealthAlarm], a + call ReviveFullHP + ld a, MON_STATUS + call GetPartyParamLocation + xor a + ld [hli], a + ld [hl], a + call HealStatus + call BattlemonRestoreHealth + call HealHP_SFX_GFX + ld a, PARTYMENUTEXT_HEAL_HP + ld [wPartyMenuActionText], a + call ItemActionTextWaitButton + call UseDisposableItem + ld a, 0 + ret + +BitterBerryEffect: + ld hl, wPlayerSubStatus3 + bit SUBSTATUS_CONFUSED, [hl] + ld a, 1 + jr z, .done + + res SUBSTATUS_CONFUSED, [hl] + xor a + ldh [hBattleTurn], a + call UseItemText + + ld hl, ConfusedNoMoreText + call StdBattleTextbox + + ld a, 0 + +.done + jp StatusHealer_Jumptable + +RestoreHPEffect: + call ItemRestoreHP + jp StatusHealer_Jumptable + +EnergypowderEffect: + ld c, HAPPINESS_BITTERPOWDER + jr EnergypowderEnergyRootCommon + +EnergyRootEffect: + ld c, HAPPINESS_ENERGYROOT + +EnergypowderEnergyRootCommon: + push bc + call ItemRestoreHP + pop bc + cp 0 + jr nz, .skip_happiness + + farcall ChangeHappiness + call LooksBitterMessage + ld a, 0 + +.skip_happiness + jp StatusHealer_Jumptable + +ItemRestoreHP: + ld b, PARTYMENUACTION_HEALING_ITEM + call UseItem_SelectMon + ld a, 2 + ret c + + call IsMonFainted + ld a, 1 + ret z + + call IsMonAtFullHealth + ld a, 1 + ret nc + + xor a + ld [wLowHealthAlarm], a + call GetHealingItemAmount + call RestoreHealth + call BattlemonRestoreHealth + call HealHP_SFX_GFX + ld a, PARTYMENUTEXT_HEAL_HP + ld [wPartyMenuActionText], a + call ItemActionTextWaitButton + call UseDisposableItem + ld a, 0 + ret + +HealHP_SFX_GFX: + push de + ld de, SFX_POTION + call WaitPlaySFX + pop de + ld a, [wCurPartyMon] + hlcoord 11, 0 + ld bc, SCREEN_WIDTH * 2 + call AddNTimes + ld a, $2 + ld [wWhichHPBar], a + predef_jump AnimateHPBar + +UseItem_SelectMon: + call .SelectMon + ret c + + ld a, [wCurPartySpecies] + cp EGG + jr nz, .not_egg + + call CantUseOnEggMessage + scf + ret + +.not_egg + and a + ret + +.SelectMon: + ld a, b + ld [wPartyMenuActionText], a + push hl + push de + push bc + call ClearBGPalettes + call ChooseMonToUseItemOn + pop bc + pop de + pop hl + ret + +ChooseMonToUseItemOn: + farcall LoadPartyMenuGFX + farcall InitPartyMenuWithCancel + farcall InitPartyMenuGFX + farcall WritePartyMenuTilemap + farcall PrintPartyMenuText + call WaitBGMap + call SetPalettes + call DelayFrame + farcall PartyMenuSelect + ret + +ItemActionText: + ld [wPartyMenuActionText], a + ld a, [wCurPartySpecies] + push af + ld a, [wCurPartyMon] + push af + push hl + push de + push bc + farcall WritePartyMenuTilemap + farcall PrintPartyMenuActionText + call WaitBGMap + call SetPalettes + call DelayFrame + pop bc + pop de + pop hl + pop af + ld [wCurPartyMon], a + pop af + ld [wCurPartySpecies], a + ret + +ItemActionTextWaitButton: + xor a + ldh [hBGMapMode], a + hlcoord 0, 0 + ld bc, wTilemapEnd - wTilemap + ld a, " " + call ByteFill + ld a, [wPartyMenuActionText] + call ItemActionText + ld a, $1 + ldh [hBGMapMode], a + ld c, 50 + call DelayFrames + jp WaitPressAorB_BlinkCursor + +StatusHealer_NoEffect: + call WontHaveAnyEffectMessage + jr StatusHealer_ClearPalettes + +StatusHealer_ExitMenu: + xor a + ld [wItemEffectSucceeded], a +StatusHealer_ClearPalettes: + call ClearPalettes + ret + +IsItemUsedOnBattleMon: + ld a, [wBattleMode] + and a + ret z + ld a, [wCurPartyMon] + push hl + ld hl, wCurBattleMon + cp [hl] + pop hl + jr nz, .nope + scf + ret + +.nope + xor a + ret + +ReviveHalfHP: + call LoadHPFromBuffer1 + srl d + rr e + jr ContinueRevive + +ReviveFullHP: + call LoadHPFromBuffer1 +ContinueRevive: + ld a, MON_HP + call GetPartyParamLocation + ld [hl], d + inc hl + ld [hl], e + jp LoadCurHPIntoBuffer3 + +RestoreHealth: + ld a, MON_HP + 1 + call GetPartyParamLocation + ld a, [hl] + add e + ld [hld], a + ld a, [hl] + adc d + ld [hl], a + jr c, .full_hp + call LoadCurHPIntoBuffer3 + ld a, MON_HP + 1 + call GetPartyParamLocation + ld d, h + ld e, l + ld a, MON_MAXHP + 1 + call GetPartyParamLocation + ld a, [de] + sub [hl] + dec de + dec hl + ld a, [de] + sbc [hl] + jr c, .finish +.full_hp + call ReviveFullHP +.finish + ret + +RemoveHP: + ld a, MON_HP + 1 + call GetPartyParamLocation + ld a, [hl] + sub e + ld [hld], a + ld a, [hl] + sbc d + ld [hl], a + jr nc, .okay + xor a + ld [hld], a + ld [hl], a +.okay + call LoadCurHPIntoBuffer3 + ret + +IsMonFainted: + push de + call LoadMaxHPIntoBuffer1 + call LoadCurHPIntoBuffer2 + call LoadHPFromBuffer2 + ld a, d + or e + pop de + ret + +IsMonAtFullHealth: + call LoadHPFromBuffer2 + ld h, d + ld l, e + call LoadHPFromBuffer1 + ld a, l + sub e + ld a, h + sbc d + ret + +LoadCurHPIntoBuffer3: + ld a, MON_HP + call GetPartyParamLocation + ld a, [hli] + ld [wHPBuffer3 + 1], a + ld a, [hl] + ld [wHPBuffer3], a + ret + +LoadHPIntoBuffer3: ; unreferenced + ld a, d + ld [wHPBuffer3 + 1], a + ld a, e + ld [wHPBuffer3], a + ret + +LoadHPFromBuffer3: ; unreferenced + ld a, [wHPBuffer3 + 1] + ld d, a + ld a, [wHPBuffer3] + ld e, a + ret + +LoadCurHPIntoBuffer2: + ld a, MON_HP + call GetPartyParamLocation + ld a, [hli] + ld [wHPBuffer2 + 1], a + ld a, [hl] + ld [wHPBuffer2], a + ret + +LoadHPFromBuffer2: + ld a, [wHPBuffer2 + 1] + ld d, a + ld a, [wHPBuffer2] + ld e, a + ret + +LoadMaxHPIntoBuffer1: + push hl + ld a, MON_MAXHP + call GetPartyParamLocation + ld a, [hli] + ld [wHPBuffer1 + 1], a + ld a, [hl] + ld [wHPBuffer1], a + pop hl + ret + +LoadHPFromBuffer1: + ld a, [wHPBuffer1 + 1] + ld d, a + ld a, [wHPBuffer1] + ld e, a + ret + +GetOneFifthMaxHP: + push bc + ld a, MON_MAXHP + call GetPartyParamLocation + ld a, [hli] + ldh [hDividend + 0], a + ld a, [hl] + ldh [hDividend + 1], a + ld a, 5 + ldh [hDivisor], a + ld b, 2 + call Divide + ldh a, [hQuotient + 2] + ld d, a + ldh a, [hQuotient + 3] + ld e, a + pop bc + ret + +GetHealingItemAmount: + push hl + ld a, [wCurItem] + ld hl, HealingHPAmounts + ld d, a +.next + ld a, [hli] + cp -1 + jr z, .NotFound + cp d + jr z, .done + inc hl + inc hl + jr .next + +.NotFound: + scf +.done + ld e, [hl] + inc hl + ld d, [hl] + pop hl + ret + +INCLUDE "data/items/heal_hp.asm" + +Softboiled_MilkDrinkFunction: +; Softboiled/Milk Drink in the field + ld a, [wPartyMenuCursor] + dec a + ld b, a + call .SelectMilkDrinkRecipient ; select pokemon + jr c, .skip + ld a, b + ld [wCurPartyMon], a + call IsMonFainted + call GetOneFifthMaxHP + call RemoveHP + push bc + call HealHP_SFX_GFX + pop bc + call GetOneFifthMaxHP + ld a, c + ld [wCurPartyMon], a + call IsMonFainted + call RestoreHealth + call HealHP_SFX_GFX + ld a, PARTYMENUTEXT_HEAL_HP + call ItemActionText + call JoyWaitAorB +.skip + ld a, b + inc a + ld [wPartyMenuCursor], a + ret + +.SelectMilkDrinkRecipient: +.loop + push bc + ld a, PARTYMENUACTION_HEALING_ITEM + ld [wPartyMenuActionText], a + call ChooseMonToUseItemOn + pop bc + jr c, .set_carry + ld a, [wPartyMenuCursor] + dec a + ld c, a + ld a, b + cp c + jr z, .cant_use ; chose the same mon as user + ld a, c + ld [wCurPartyMon], a + call IsMonFainted + jr z, .cant_use + call IsMonAtFullHealth + jr nc, .cant_use + xor a + ret + +.set_carry + scf + ret + +.cant_use + push bc + ld hl, .ItemCantUseOnMonText + call MenuTextboxBackup + pop bc + jr .loop + +.ItemCantUseOnMonText: + text_far _ItemCantUseOnMonText + text_end + +EscapeRopeEffect: + xor a + ld [wItemEffectSucceeded], a + farcall EscapeRopeFunction + + ld a, [wItemEffectSucceeded] + cp 1 + call z, UseDisposableItem + ret + +SuperRepelEffect: + ld b, 200 + jr UseRepel + +MaxRepelEffect: + ld b, 250 + jr UseRepel + +RepelEffect: + ld b, 100 + +UseRepel: + ld a, [wRepelEffect] + and a + ld hl, RepelUsedEarlierIsStillInEffectText + jp nz, PrintText + + ld a, b + ld [wRepelEffect], a + jp UseItemText + +RepelUsedEarlierIsStillInEffectText: + text_far _RepelUsedEarlierIsStillInEffectText + text_end + +XAccuracyEffect: + ld hl, wPlayerSubStatus4 + bit SUBSTATUS_X_ACCURACY, [hl] + jp nz, WontHaveAnyEffect_NotUsedMessage + set SUBSTATUS_X_ACCURACY, [hl] + jp UseItemText + +PokeDollEffect: + ld a, [wBattleMode] + dec a ; WILD_BATTLE? + jr nz, .not_wild + inc a ; TRUE + ld [wForcedSwitch], a + ld a, [wBattleResult] + and BATTLERESULT_BITMASK + or DRAW + ld [wBattleResult], a + jp UseItemText + +.not_wild + xor a + ld [wItemEffectSucceeded], a + ret + +GuardSpecEffect: + ld hl, wPlayerSubStatus4 + bit SUBSTATUS_MIST, [hl] + jp nz, WontHaveAnyEffect_NotUsedMessage + set SUBSTATUS_MIST, [hl] + jp UseItemText + +DireHitEffect: + ld hl, wPlayerSubStatus4 + bit SUBSTATUS_FOCUS_ENERGY, [hl] + jp nz, WontHaveAnyEffect_NotUsedMessage + set SUBSTATUS_FOCUS_ENERGY, [hl] + jp UseItemText + +XItemEffect: + call UseItemText + + ld a, [wCurItem] + ld hl, XItemStats + +.loop + cp [hl] + jr z, .got_it + inc hl + inc hl + jr .loop + +.got_it + inc hl + ld b, [hl] + xor a + ldh [hBattleTurn], a + ld [wAttackMissed], a + ld [wEffectFailed], a + farcall RaiseStat + call WaitSFX + + farcall BattleCommand_StatUpMessage + farcall BattleCommand_StatUpFailText + + ld a, [wCurBattleMon] + ld [wCurPartyMon], a + ld c, HAPPINESS_USEDXITEM + farcall ChangeHappiness + ret + +INCLUDE "data/items/x_stats.asm" + +PokeFluteEffect: + ld a, [wBattleMode] + and a + jr nz, .in_battle + ; overworld flute code was dummied out here + +.in_battle + xor a + ld [wPokeFluteCuredSleep], a + + ld b, ~SLP_MASK + + ld hl, wPartyMon1Status + call .CureSleep + + ld a, [wBattleMode] + cp WILD_BATTLE + jr z, .skip_otrainer + ld hl, wOTPartyMon1Status + call .CureSleep +.skip_otrainer + + ld hl, wBattleMonStatus + ld a, [hl] + and b + ld [hl], a + ld hl, wEnemyMonStatus + ld a, [hl] + and b + ld [hl], a + + ld a, [wPokeFluteCuredSleep] + and a + ld hl, .PlayedFluteText + jp z, PrintText + ld hl, .PlayedTheFlute + call PrintText + + ld a, [wLowHealthAlarm] + and 1 << DANGER_ON_F + jr nz, .dummy + ; more code was dummied out here +.dummy + ld hl, .FluteWakeUpText + jp PrintText + +.CureSleep: + ld de, PARTYMON_STRUCT_LENGTH + ld c, PARTY_LENGTH +.loop + ld a, [hl] + push af + and SLP_MASK + jr z, .not_asleep + ld a, TRUE + ld [wPokeFluteCuredSleep], a +.not_asleep + pop af + and b + ld [hl], a + add hl, de + dec c + jr nz, .loop + ret + +.PlayedFluteText: + text_far _PlayedFluteText + text_end + +.FluteWakeUpText: + text_far _FluteWakeUpText + text_end + +.PlayedTheFlute: + ; played the # FLUTE.@ @ + text_far Text_PlayedPokeFlute + text_asm + ld a, [wBattleMode] + and a + jr nz, .battle + + push de + ld de, SFX_POKEFLUTE + call WaitPlaySFX + call WaitSFX + pop de + +.battle + jp PokeFluteTerminator + +BlueCardEffect: + ld hl, .BlueCardBalanceText + jp MenuTextboxWaitButton + +.BlueCardBalanceText: + text_far _BlueCardBalanceText + text_end + +CoinCaseEffect: + ld hl, .CoinCaseCountText + jp MenuTextboxWaitButton + +.CoinCaseCountText: + text_far _CoinCaseCountText + text_end + +OldRodEffect: + ld e, $0 + jr UseRod + +GoodRodEffect: + ld e, $1 + jr UseRod + +SuperRodEffect: + ld e, $2 + jr UseRod + +UseRod: + farcall FishFunction + ret + +ItemfinderEffect: + farcall ItemFinder + ret + +RestorePPEffect: + ld a, [wCurItem] + ld [wTempRestorePPItem], a + +.loop + ; Party Screen opens to choose on which mon to use the Item + ld b, PARTYMENUACTION_HEALING_ITEM + call UseItem_SelectMon + jp c, PPRestoreItem_Cancel + +.loop2 + ld a, [wTempRestorePPItem] + cp MAX_ELIXER + jp z, Elixer_RestorePPofAllMoves + cp ELIXER + jp z, Elixer_RestorePPofAllMoves + + ld hl, RaiseThePPOfWhichMoveText + ld a, [wTempRestorePPItem] + cp PP_UP + jr z, .ppup + ld hl, RestoreThePPOfWhichMoveText + +.ppup + call PrintText + + ld a, [wCurMoveNum] + push af + xor a + ld [wCurMoveNum], a + ld a, $2 + ld [wMoveSelectionMenuType], a + farcall MoveSelectionScreen + pop bc + + ld a, b + ld [wCurMoveNum], a + jr nz, .loop + ld hl, wPartyMon1Moves + ld bc, PARTYMON_STRUCT_LENGTH + call GetMthMoveOfNthPartymon + + push hl + ld a, [hl] + ld [wNamedObjectIndex], a + call GetMoveName + call CopyName1 + pop hl + + ld a, [wTempRestorePPItem] + cp PP_UP + jp nz, Not_PP_Up + + ld a, [hl] + push hl + call GetMoveIndexFromID + ld a, h + if HIGH(SKETCH) + cp HIGH(SKETCH) + else + and a + endc + ld a, l + pop hl + jr nz, .not_sketch + cp LOW(SKETCH) + jr z, .CantUsePPUpOnSketch +.not_sketch + + ld bc, MON_PP - MON_MOVES + add hl, bc + ld a, [hl] + cp PP_UP_MASK + jr c, .do_ppup + +.CantUsePPUpOnSketch: + ld hl, PPIsMaxedOutText + call PrintText + jr .loop2 + +.do_ppup + ld a, [hl] + add PP_UP_ONE + ld [hl], a + ld a, TRUE + ld [wUsePPUp], a + call ApplyPPUp + call Play_SFX_FULL_HEAL + + ld hl, PPsIncreasedText + call PrintText + +FinishPPRestore: + call ClearPalettes + jp UseDisposableItem + +BattleRestorePP: + ld a, [wBattleMode] + and a + jr z, .not_in_battle + ld a, [wCurPartyMon] + ld b, a + ld a, [wCurBattleMon] + cp b + jr nz, .not_in_battle + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_TRANSFORMED, a + jr nz, .not_in_battle + call .UpdateBattleMonPP + +.not_in_battle + call Play_SFX_FULL_HEAL + ld hl, PPRestoredText + call PrintText + jr FinishPPRestore + +.UpdateBattleMonPP: + ld a, [wCurPartyMon] + ld hl, wPartyMon1Moves + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld de, wBattleMonMoves + ld b, NUM_MOVES +.loop + ld a, [de] + and a + jr z, .done + cp [hl] + jr nz, .next + push hl + push de + push bc +rept NUM_MOVES + 2 ; wBattleMonPP - wBattleMonMoves + inc de +endr + ld bc, MON_PP - MON_MOVES + add hl, bc + ld a, [hl] + ld [de], a + pop bc + pop de + pop hl + +.next + inc hl + inc de + dec b + jr nz, .loop + +.done + ret + +Not_PP_Up: + call RestorePP + jr nz, BattleRestorePP + jp PPRestoreItem_NoEffect + +Elixer_RestorePPofAllMoves: + xor a + ld hl, wMenuCursorY + ld [hli], a + ld [hl], a + ld b, NUM_MOVES +.moveLoop + push bc + ld hl, wPartyMon1Moves + ld bc, PARTYMON_STRUCT_LENGTH + call GetMthMoveOfNthPartymon + ld a, [hl] + and a + jr z, .next + + call RestorePP + jr z, .next + ld hl, wMenuCursorX + inc [hl] + +.next + ld hl, wMenuCursorY + inc [hl] + pop bc + dec b + jr nz, .moveLoop + ld a, [wMenuCursorX] + and a + jp nz, BattleRestorePP + +PPRestoreItem_NoEffect: + call WontHaveAnyEffectMessage + +PPRestoreItem_Cancel: + call ClearPalettes + xor a + ld [wItemEffectSucceeded], a + ret + +RestorePP: + xor a ; PARTYMON + ld [wMonType], a + call GetMaxPPOfMove + ld hl, wPartyMon1PP + ld bc, PARTYMON_STRUCT_LENGTH + call GetMthMoveOfNthPartymon + ld a, [wTempPP] + ld b, a + ld a, [hl] + and PP_MASK + cp b + jr nc, .dont_restore + + ld a, [wTempRestorePPItem] + cp MAX_ELIXER + jr z, .restore_all + cp MAX_ETHER + jr z, .restore_all + + ld c, 5 + cp MYSTERYBERRY + jr z, .restore_some + + ld c, 10 + +.restore_some + ld a, [hl] + and PP_MASK + add c + cp b + jr nc, .restore_all + ld b, a + +.restore_all + ld a, [hl] + and PP_UP_MASK + or b + ld [hl], a + ret + +.dont_restore + xor a + ret + +RaiseThePPOfWhichMoveText: + text_far _RaiseThePPOfWhichMoveText + text_end + +RestoreThePPOfWhichMoveText: + text_far _RestoreThePPOfWhichMoveText + text_end + +PPIsMaxedOutText: + text_far _PPIsMaxedOutText + text_end + +PPsIncreasedText: + text_far _PPsIncreasedText + text_end + +PPRestoredText: + text_far _PPRestoredText + text_end + +SquirtbottleEffect: + farcall _Squirtbottle + ret + +CardKeyEffect: + farcall _CardKey + ret + +BasementKeyEffect: + farcall _BasementKey + ret + +SacredAshEffect: + farcall _SacredAsh + ld a, [wItemEffectSucceeded] + cp $1 + ret nz + call UseDisposableItem + ret + +NormalBoxEffect: + ld c, DECOFLAG_SILVER_TROPHY_DOLL + jr OpenBox + +GorgeousBoxEffect: + ld c, DECOFLAG_GOLD_TROPHY_DOLL +OpenBox: + farcall SetSpecificDecorationFlag + + ld hl, .SentTrophyHomeText + call PrintText + + jp UseDisposableItem + +.SentTrophyHomeText: + text_far _SentTrophyHomeText + text_end + +NoEffect: + jp IsntTheTimeMessage + +Play_SFX_FULL_HEAL: + push de + ld de, SFX_FULL_HEAL + call WaitPlaySFX + pop de + ret + +UseItemText: + ld hl, ItemUsedText + call PrintText + call Play_SFX_FULL_HEAL + call WaitPressAorB_BlinkCursor +UseDisposableItem: + ld hl, wNumItems + ld a, 1 + ld [wItemQuantityChange], a + jp TossItem + +UseBallInTrainerBattle: + call ReturnToBattle_UseBall + ld de, ANIM_THROW_POKE_BALL + ld a, e + ld [wFXAnimID], a + ld a, d + ld [wFXAnimID + 1], a + xor a + ld [wBattleAnimParam], a + ldh [hBattleTurn], a + ld [wNumHits], a + predef PlayBattleAnim + ld hl, BallBlockedText + call PrintText + ld hl, BallDontBeAThiefText + call PrintText + jr UseDisposableItem + +WontHaveAnyEffect_NotUsedMessage: + ld hl, ItemWontHaveEffectText + call PrintText + + ; Item wasn't used. + ld a, $2 + ld [wItemEffectSucceeded], a + ret + +LooksBitterMessage: + ld hl, ItemLooksBitterText + jp PrintText + +Ball_BoxIsFullMessage: + ld hl, BallBoxFullText + call PrintText + + ; Item wasn't used. + ld a, $2 + ld [wItemEffectSucceeded], a + ret + +CantUseOnEggMessage: + ld hl, ItemCantUseOnEggText + jr CantUseItemMessage + +IsntTheTimeMessage: + ld hl, ItemOakWarningText + jr CantUseItemMessage + +WontHaveAnyEffectMessage: + ld hl, ItemWontHaveEffectText + jr CantUseItemMessage + +BelongsToSomeoneElseMessage: ; unreferenced + ld hl, ItemBelongsToSomeoneElseText + jr CantUseItemMessage + +CyclingIsntAllowedMessage: ; unreferenced + ld hl, NoCyclingText + jr CantUseItemMessage + +CantGetOnYourBikeMessage: ; unreferenced + ld hl, ItemCantGetOnText + ; fallthrough + +CantUseItemMessage: +; Item couldn't be used. + xor a + ld [wItemEffectSucceeded], a + jp PrintText + +ItemLooksBitterText: + text_far _ItemLooksBitterText + text_end + +ItemCantUseOnEggText: + text_far _ItemCantUseOnEggText + text_end + +ItemOakWarningText: + text_far _ItemOakWarningText + text_end + +ItemBelongsToSomeoneElseText: + text_far _ItemBelongsToSomeoneElseText + text_end + +ItemWontHaveEffectText: + text_far _ItemWontHaveEffectText + text_end + +BallBlockedText: + text_far _BallBlockedText + text_end + +BallDontBeAThiefText: + text_far _BallDontBeAThiefText + text_end + +NoCyclingText: + text_far _NoCyclingText + text_end + +ItemCantGetOnText: + text_far _ItemCantGetOnText + text_end + +BallBoxFullText: + text_far _BallBoxFullText + text_end + +ItemUsedText: + text_far _ItemUsedText + text_end + +ItemGotOnText: ; unreferenced + text_far _ItemGotOnText + text_end + +ItemGotOffText: ; unreferenced + text_far _ItemGotOffText + text_end + +ApplyPPUp: + ld a, MON_MOVES + call GetPartyParamLocation + push hl + ld de, wPPUpPPBuffer + predef FillPP + pop hl + ld bc, MON_PP - MON_MOVES + add hl, bc + ld de, wPPUpPPBuffer + ld b, 0 +.loop + inc b + ld a, b + cp NUM_MOVES + 1 + ret z + ld a, [wUsePPUp] + dec a ; FALSE? + jr nz, .use + ld a, [wMenuCursorY] + inc a + cp b + jr nz, .skip + +.use + ld a, [hl] + and PP_UP_MASK + ld a, [de] ; wasted cycle + call nz, ComputeMaxPP + +.skip + inc hl + inc de + jr .loop + +ComputeMaxPP: + push bc + ; Divide the base PP by 5. + ld a, [de] + ldh [hDividend + 3], a + xor a + ldh [hDividend], a + ldh [hDividend + 1], a + ldh [hDividend + 2], a + ld a, 5 + ldh [hDivisor], a + ld b, 4 + call Divide + ; Get the number of PP, which are bits 6 and 7 of the PP value stored in RAM. + ld a, [hl] + ld b, a + swap a + and $f + srl a + srl a + ld c, a + ; If this value is 0, we are done + and a + jr z, .NoPPUp + +.loop + ; Normally, a move with 40 PP would have 64 PP with three PP Ups. + ; Since this would overflow into bit 6, we prevent that from happening + ; by decreasing the extra amount of PP each PP Up provides, resulting + ; in a maximum of 61. + ldh a, [hQuotient + 3] + cp $8 + jr c, .okay + ld a, $7 + +.okay + add b + ld b, a + ld a, [wTempPP] + dec a + jr z, .NoPPUp + dec c + jr nz, .loop + +.NoPPUp: + ld [hl], b + pop bc + ret + +RestoreAllPP: + ld a, MON_PP + call GetPartyParamLocation + push hl + ld a, MON_MOVES + call GetPartyParamLocation + pop de + xor a ; PARTYMON + ld [wMenuCursorY], a + ld [wMonType], a + ld c, NUM_MOVES +.loop + ld a, [hli] + and a + ret z + push hl + push de + push bc + call GetMaxPPOfMove + pop bc + pop de + ld a, [de] + and PP_UP_MASK + ld b, a + ld a, [wTempPP] + add b + ld [de], a + inc de + ld hl, wMenuCursorY + inc [hl] + pop hl + dec c + jr nz, .loop + ret + +GetMaxPPOfMove: + ld a, [wStringBuffer1 + 0] + push af + ld a, [wStringBuffer1 + 1] + push af + + ld a, [wMonType] + and a + + ld hl, wPartyMon1Moves + ld bc, PARTYMON_STRUCT_LENGTH + jr z, .got_partymon ; PARTYMON + + ld hl, wOTPartyMon1Moves + dec a + jr z, .got_partymon ; OTPARTYMON + + ld hl, wTempMonMoves + dec a + jr z, .got_nonpartymon ; BOXMON + + ld hl, wTempMonMoves ; Wasted cycles + dec a + jr z, .got_nonpartymon ; TEMPMON + + ld hl, wBattleMonMoves ; WILDMON + +.got_nonpartymon ; BOXMON, TEMPMON, WILDMON + call GetMthMoveOfCurrentMon + jr .gotdatmove + +.got_partymon ; PARTYMON, OTPARTYMON + call GetMthMoveOfNthPartymon + +.gotdatmove + ld a, [hl] + + push hl + ld l, a + ld a, MOVE_PP + call GetMoveAttribute + ld b, a + ld de, wStringBuffer1 + ld [de], a + pop hl + + push bc + ld bc, MON_PP - MON_MOVES + ld a, [wMonType] + cp WILDMON + jr nz, .notwild + ld bc, wEnemyMonPP - wEnemyMonMoves +.notwild + add hl, bc + ld a, [hl] + and PP_UP_MASK + pop bc + + or b + ld hl, wStringBuffer1 + 1 + ld [hl], a + xor a + ld [wTempPP], a + ld a, b ; this gets lost anyway + call ComputeMaxPP + ld a, [hl] + and PP_MASK + ld [wTempPP], a + + pop af + ld [wStringBuffer1 + 1], a + pop af + ld [wStringBuffer1 + 0], a + ret + +GetMthMoveOfNthPartymon: + ld a, [wCurPartyMon] + call AddNTimes + +GetMthMoveOfCurrentMon: + ld a, [wMenuCursorY] + ld c, a + ld b, 0 + add hl, bc + ret diff --git a/engine/items/items.asm b/engine/items/items.asm new file mode 100644 index 0000000..eab3ee4 --- /dev/null +++ b/engine/items/items.asm @@ -0,0 +1,560 @@ +_ReceiveItem:: + call DoesHLEqualNumItems + jp nz, PutItemInPocket + push hl + call CheckItemPocket + pop de + ld a, [wItemAttributeValue] + dec a + ld hl, .Pockets + rst JumpTable + ret + +.Pockets: +; entries correspond to item types + dw .Item + dw .KeyItem + dw .Ball + dw .TMHM + +.Item: + ld h, d + ld l, e + jp PutItemInPocket + +.KeyItem: + ld h, d + ld l, e + jp ReceiveKeyItem + +.Ball: + ld hl, wNumBalls + jp PutItemInPocket + +.TMHM: + ld h, d + ld l, e + ld a, [wCurItem] + ld c, a + call GetTMHMNumber + jp ReceiveTMHM + +_TossItem:: + call DoesHLEqualNumItems + jr nz, .remove + push hl + call CheckItemPocket + pop de + ld a, [wItemAttributeValue] + dec a + ld hl, .Pockets + rst JumpTable + ret + +.Pockets: +; entries correspond to item types + dw .Item + dw .KeyItem + dw .Ball + dw .TMHM + +.Ball: + ld hl, wNumBalls + jp RemoveItemFromPocket + +.TMHM: + ld h, d + ld l, e + ld a, [wCurItem] + ld c, a + call GetTMHMNumber + jp TossTMHM + +.KeyItem: + ld h, d + ld l, e + jp TossKeyItem + +.Item: + ld h, d + ld l, e + +.remove + jp RemoveItemFromPocket + +_CheckItem:: + call DoesHLEqualNumItems + jr nz, .nope + push hl + call CheckItemPocket + pop de + ld a, [wItemAttributeValue] + dec a + ld hl, .Pockets + rst JumpTable + ret + +.Pockets: +; entries correspond to item types + dw .Item + dw .KeyItem + dw .Ball + dw .TMHM + +.Ball: + ld hl, wNumBalls + jp CheckTheItem + +.TMHM: + ld h, d + ld l, e + ld a, [wCurItem] + ld c, a + call GetTMHMNumber + jp CheckTMHM + +.KeyItem: + ld h, d + ld l, e + jp CheckKeyItems + +.Item: + ld h, d + ld l, e + +.nope + jp CheckTheItem + +DoesHLEqualNumItems: + ld a, l + cp LOW(wNumItems) + ret nz + ld a, h + cp HIGH(wNumItems) + ret + +GetPocketCapacity: + ld c, MAX_ITEMS + ld a, e + cp LOW(wNumItems) + jr nz, .not_bag + ld a, d + cp HIGH(wNumItems) + ret z + +.not_bag + ld c, MAX_PC_ITEMS + ld a, e + cp LOW(wNumPCItems) + jr nz, .not_pc + ld a, d + cp HIGH(wNumPCItems) + ret z + +.not_pc + ld c, MAX_BALLS + ret + +PutItemInPocket: + ld d, h + ld e, l + inc hl + ld a, [wCurItem] + ld c, a + ld b, 0 +.loop + ld a, [hli] + cp -1 + jr z, .terminator + cp c + jr nz, .next + ld a, MAX_ITEM_STACK + sub [hl] + add b + ld b, a + ld a, [wItemQuantityChange] + cp b + jr z, .ok + jr c, .ok + +.next + inc hl + jr .loop + +.terminator + call GetPocketCapacity + ld a, [de] + cp c + jr c, .ok + and a + ret + +.ok + ld h, d + ld l, e + ld a, [wCurItem] + ld c, a + ld a, [wItemQuantityChange] + ld [wItemQuantity], a +.loop2 + inc hl + ld a, [hli] + cp -1 + jr z, .terminator2 + cp c + jr nz, .loop2 + ld a, [wItemQuantity] + add [hl] + cp MAX_ITEM_STACK + 1 + jr nc, .newstack + ld [hl], a + jr .done + +.newstack + ld [hl], MAX_ITEM_STACK + sub MAX_ITEM_STACK + ld [wItemQuantity], a + jr .loop2 + +.terminator2 + dec hl + ld a, [wCurItem] + ld [hli], a + ld a, [wItemQuantity] + ld [hli], a + ld [hl], -1 + ld h, d + ld l, e + inc [hl] + +.done + scf + ret + +RemoveItemFromPocket: + ld d, h + ld e, l + ld a, [hli] + ld c, a + ld a, [wCurItemQuantity] + cp c + jr nc, .ok ; memory + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [wCurItem] + cp [hl] + inc hl + jr z, .skip + ld h, d + ld l, e + inc hl + +.ok + ld a, [wCurItem] + ld b, a +.loop + ld a, [hli] + cp b + jr z, .skip + cp -1 + jr z, .nope + inc hl + jr .loop + +.skip + ld a, [wItemQuantityChange] + ld b, a + ld a, [hl] + sub b + jr c, .nope + ld [hl], a + ld [wItemQuantity], a + and a + jr nz, .yup + dec hl + ld b, h + ld c, l + inc hl + inc hl +.loop2 + ld a, [hli] + ld [bc], a + inc bc + cp -1 + jr nz, .loop2 + ld h, d + ld l, e + dec [hl] + +.yup + scf + ret + +.nope + and a + ret + +CheckTheItem: + ld a, [wCurItem] + ld c, a +.loop + inc hl + ld a, [hli] + cp -1 + jr z, .done + cp c + jr nz, .loop + scf + ret + +.done + and a + ret + +ReceiveKeyItem: + ld hl, wNumKeyItems + ld a, [hli] + cp MAX_KEY_ITEMS + jr nc, .nope + ld c, a + ld b, 0 + add hl, bc + ld a, [wCurItem] + ld [hli], a + ld [hl], -1 + ld hl, wNumKeyItems + inc [hl] + scf + ret + +.nope + and a + ret + +TossKeyItem: + ld a, [wCurItemQuantity] + ld e, a + ld d, 0 + ld hl, wNumKeyItems + ld a, [hl] + cp e + jr nc, .ok + call .Toss + ret nc + jr .ok2 + +.ok + dec [hl] + inc hl + add hl, de + +.ok2 + ld d, h + ld e, l + inc hl +.loop + ld a, [hli] + ld [de], a + inc de + cp -1 + jr nz, .loop + scf + ret + +.Toss: + ld hl, wNumKeyItems + ld a, [wCurItem] + ld c, a +.loop3 + inc hl + ld a, [hl] + cp c + jr z, .ok3 + cp -1 + jr nz, .loop3 + xor a + ret + +.ok3 + ld a, [wNumKeyItems] + dec a + ld [wNumKeyItems], a + scf + ret + +CheckKeyItems: + ld a, [wCurItem] + ld c, a + ld hl, wKeyItems +.loop + ld a, [hli] + cp c + jr z, .done + cp -1 + jr nz, .loop + and a + ret + +.done + scf + ret + +ReceiveTMHM: + dec c + ld b, 0 + ld hl, wTMsHMs + add hl, bc + ld a, [wItemQuantityChange] + add [hl] + cp MAX_ITEM_STACK + 1 + jr nc, .toomany + ld [hl], a + scf + ret + +.toomany + and a + ret + +TossTMHM: + dec c + ld b, 0 + ld hl, wTMsHMs + add hl, bc + ld a, [wItemQuantityChange] + ld b, a + ld a, [hl] + sub b + jr c, .nope + ld [hl], a + ld [wItemQuantity], a + jr nz, .yup + ld a, [wTMHMPocketScrollPosition] + and a + jr z, .yup + dec a + ld [wTMHMPocketScrollPosition], a + +.yup + scf + ret + +.nope + and a + ret + +CheckTMHM: + dec c + ld b, $0 + ld hl, wTMsHMs + add hl, bc + ld a, [hl] + and a + ret z + scf + ret + +GetTMHMNumber:: +; Return the number of a TM/HM by item id c. + ld a, c + sub TM01 - 1 + ld c, a + ret + +GetNumberedTMHM: +; Return the item id of a TM/HM by number c. + ld a, c + add a, TM01 - 1 + ld c, a + ret + +_CheckTossableItem:: +; Return 1 in wItemAttributeValue and carry if wCurItem can't be removed from the bag. + ld a, ITEMATTR_PERMISSIONS + call GetItemAttr + bit CANT_TOSS_F, a + jr nz, ItemAttr_ReturnCarry + and a + ret + +CheckSelectableItem: +; Return 1 in wItemAttributeValue and carry if wCurItem can't be selected. + ld a, ITEMATTR_PERMISSIONS + call GetItemAttr + bit CANT_SELECT_F, a + jr nz, ItemAttr_ReturnCarry + and a + ret + +CheckItemPocket:: +; Return the pocket for wCurItem in wItemAttributeValue. + ld a, ITEMATTR_POCKET + call GetItemAttr + and $f + ld [wItemAttributeValue], a + ret + +CheckItemContext: +; Return the context for wCurItem in wItemAttributeValue. + ld a, ITEMATTR_HELP + call GetItemAttr + and $f + ld [wItemAttributeValue], a + ret + +CheckItemMenu: +; Return the menu for wCurItem in wItemAttributeValue. + ld a, ITEMATTR_HELP + call GetItemAttr + swap a + and $f + ld [wItemAttributeValue], a + ret + +GetItemAttr: +; Get attribute a of wCurItem. + + push hl + push bc + + ld hl, ItemAttributes + ld c, a + ld b, 0 + add hl, bc + + xor a + ld [wItemAttributeValue], a + + ld a, [wCurItem] + dec a + ld c, a + ld a, ITEMATTR_STRUCT_LENGTH + call AddNTimes + ld a, BANK(ItemAttributes) + call GetFarByte + + pop bc + pop hl + ret + +ItemAttr_ReturnCarry: + ld a, 1 + ld [wItemAttributeValue], a + scf + ret + +GetItemPrice: +; Return the price of wCurItem in de. + push hl + push bc + ld a, ITEMATTR_PRICE_LO + call GetItemAttr + ld e, a + ld a, ITEMATTR_PRICE_HI + call GetItemAttr + ld d, a + pop bc + pop hl + ret diff --git a/engine/items/mart.asm b/engine/items/mart.asm new file mode 100644 index 0000000..8149fd7 --- /dev/null +++ b/engine/items/mart.asm @@ -0,0 +1,866 @@ + const_def + const MARTTEXT_HOW_MANY + const MARTTEXT_COSTS_THIS_MUCH + const MARTTEXT_NOT_ENOUGH_MONEY + const MARTTEXT_BAG_FULL + const MARTTEXT_HERE_YOU_GO + const MARTTEXT_SOLD_OUT + +OpenMartDialog:: + call GetMart + ld a, c + ld [wMartType], a + call LoadMartPointer + ld a, [wMartType] + ld hl, .dialogs + rst JumpTable + ret + +.dialogs + dw MartDialog + dw HerbShop + dw BargainShop + dw Pharmacist + dw RooftopSale + +MartDialog: + ld a, MARTTYPE_STANDARD + ld [wMartType], a + xor a ; STANDARDMART_HOWMAYIHELPYOU + ld [wMartJumptableIndex], a + call StandardMart + ret + +HerbShop: + call FarReadMart + call LoadStandardMenuHeader + ld hl, HerbShopLadyIntroText + call MartTextbox + call BuyMenu + ld hl, HerbalLadyComeAgainText + call MartTextbox + ret + +BargainShop: + ld b, BANK(BargainShopData) + ld de, BargainShopData + call LoadMartPointer + call ReadMart + call LoadStandardMenuHeader + ld hl, BargainShopIntroText + call MartTextbox + call BuyMenu + ld hl, wBargainShopFlags + ld a, [hli] + or [hl] + jr z, .skip_set + ld hl, wDailyFlags1 + set DAILYFLAGS1_GOLDENROD_UNDERGROUND_BARGAIN_F, [hl] + +.skip_set + ld hl, BargainShopComeAgainText + call MartTextbox + ret + +Pharmacist: + call FarReadMart + call LoadStandardMenuHeader + ld hl, PharmacyIntroText + call MartTextbox + call BuyMenu + ld hl, PharmacyComeAgainText + call MartTextbox + ret + +RooftopSale: + ld b, BANK(RooftopSaleMart1) + ld de, RooftopSaleMart1 + ld hl, wStatusFlags + bit STATUSFLAGS_HALL_OF_FAME_F, [hl] + jr z, .ok + ld b, BANK(RooftopSaleMart2) + ld de, RooftopSaleMart2 + +.ok + call LoadMartPointer + call ReadMart + call LoadStandardMenuHeader + ld hl, MartWelcomeText + call MartTextbox + call BuyMenu + ld hl, MartComeAgainText + call MartTextbox + ret + +INCLUDE "data/items/rooftop_sale.asm" + +LoadMartPointer: + ld a, b + ld [wMartPointerBank], a + ld a, e + ld [wMartPointer], a + ld a, d + ld [wMartPointer + 1], a + ld hl, wCurMartCount + assert wCurMartCount + 1 == wCurMartItems + xor a + ld bc, 16 + call ByteFill + xor a ; STANDARDMART_HOWMAYIHELPYOU + ld [wMartJumptableIndex], a + ld [wBargainShopFlags], a + ld [wFacingDirection], a + ret + +GetMart: + ld a, e + cp NUM_MARTS + jr c, .IsAMart + ld b, BANK(DefaultMart) + ld de, DefaultMart + ret + +.IsAMart: + ld hl, Marts + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + ld b, BANK(Marts) + ret + +; StandardMart.MartFunctions indexes + const_def + const STANDARDMART_HOWMAYIHELPYOU ; 0 + const STANDARDMART_TOPMENU ; 1 + const STANDARDMART_BUY ; 2 + const STANDARDMART_SELL ; 3 + const STANDARDMART_QUIT ; 4 + const STANDARDMART_ANYTHINGELSE ; 5 + +DEF STANDARDMART_EXIT EQU -1 + +StandardMart: +.loop + ld a, [wMartJumptableIndex] + ld hl, .MartFunctions + rst JumpTable + ld [wMartJumptableIndex], a + cp STANDARDMART_EXIT + jr nz, .loop + ret + +.MartFunctions: +; entries correspond to STANDARDMART_* constants + dw .HowMayIHelpYou + dw .TopMenu + dw .Buy + dw .Sell + dw .Quit + dw .AnythingElse + +.HowMayIHelpYou: + call LoadStandardMenuHeader + ld hl, MartWelcomeText + call PrintText + ld a, STANDARDMART_TOPMENU + ret + +.TopMenu: + ld hl, MenuHeader_BuySell + call CopyMenuHeader + call VerticalMenu + jr c, .quit + ld a, [wMenuCursorY] + cp $1 + jr z, .buy + cp $2 + jr z, .sell +.quit + ld a, STANDARDMART_QUIT + ret +.buy + ld a, STANDARDMART_BUY + ret +.sell + ld a, STANDARDMART_SELL + ret + +.Buy: + call ExitMenu + call FarReadMart + call BuyMenu + and a + ld a, STANDARDMART_ANYTHINGELSE + ret + +.Sell: + call ExitMenu + call SellMenu + ld a, STANDARDMART_ANYTHINGELSE + ret + +.Quit: + call ExitMenu + ld hl, MartComeAgainText + call MartTextbox + ld a, STANDARDMART_EXIT + ret + +.AnythingElse: + call LoadStandardMenuHeader + ld hl, MartAskMoreText + call PrintText + ld a, STANDARDMART_TOPMENU + ret + +FarReadMart: + ld hl, wMartPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wCurMartCount +.CopyMart: + ld a, [wMartPointerBank] + call GetFarByte + ld [de], a + inc hl + inc de + cp -1 + jr nz, .CopyMart + ld hl, wMartItem1BCD + ld de, wCurMartItems +.ReadMartItem: + ld a, [de] + inc de + cp -1 + jr z, .done + push de + call GetMartItemPrice + pop de + jr .ReadMartItem + +.done + ret + +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: +; Return price de in BCD at hl and in tiles at wStringBuffer1. + push hl + ld a, d + ld [wStringBuffer2], a + ld a, e + ld [wStringBuffer2 + 1], a + ld hl, wStringBuffer1 + ld de, wStringBuffer2 + lb bc, PRINTNUM_LEADINGZEROS | 2, 6 ; 6 digits + call PrintNum + pop hl + + ld de, wStringBuffer1 + ld c, 6 / 2 ; 6 digits +.loop + call .CharToNybble + swap a + ld b, a + call .CharToNybble + or b + ld [hli], a + dec c + jr nz, .loop + ret + +.CharToNybble: + ld a, [de] + inc de + cp " " + jr nz, .not_space + ld a, "0" + +.not_space + sub "0" + ret + +ReadMart: +; Load the mart pointer. Mart data is local (no need for bank). + ld hl, wMartPointer + ld a, [hli] + ld h, [hl] + ld l, a + push hl +; set hl to the first item + inc hl + ld bc, wMartItem1BCD + ld de, wCurMartItems +.loop +; copy the items to wCurMartItems + ld a, [hli] + ld [de], a + inc de +; -1 is the terminator + cp -1 + jr z, .done + + push de +; copy the price to de + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a +; convert the price to 3-byte BCD at [bc] + push hl + ld h, b + ld l, c + call GetMartPrice + ld b, h + ld c, l + pop hl + + pop de + jr .loop + +.done + pop hl + ld a, [hl] + ld [wCurMartCount], a + ret + +INCLUDE "data/items/bargain_shop.asm" + +BuyMenu: + call FadeToMenu + farcall BlankScreen + xor a + ld [wMenuScrollPositionBackup], a + ld a, 1 + ld [wMenuCursorPositionBackup], a +.loop + call BuyMenuLoop ; menu loop + jr nc, .loop + call CloseSubmenu + ret + +LoadBuyMenuText: +; load text from a nested table +; which table is in wMartType +; which entry is in register a + push af + call GetMartDialogGroup ; gets a pointer from GetMartDialogGroup.MartTextFunctionPointers + ld a, [hli] + ld h, [hl] + ld l, a + pop af + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call PrintText + ret + +MartAskPurchaseQuantity: + call GetMartDialogGroup ; gets a pointer from GetMartDialogGroup.MartTextFunctionPointers + inc hl + inc hl + ld a, [hl] + and a + jp z, StandardMartAskPurchaseQuantity + cp 1 + jp z, BargainShopAskPurchaseQuantity + jp RooftopSaleAskPurchaseQuantity + +GetMartDialogGroup: + ld a, [wMartType] + ld e, a + ld d, 0 + ld hl, .MartTextFunctionPointers + add hl, de + add hl, de + add hl, de + ret + +.MartTextFunctionPointers: + dwb .StandardMartPointers, 0 + dwb .HerbShopPointers, 0 + dwb .BargainShopPointers, 1 + dwb .PharmacyPointers, 0 + dwb .StandardMartPointers, 2 + +.StandardMartPointers: + dw MartHowManyText + dw MartFinalPriceText + dw MartNoMoneyText + dw MartPackFullText + dw MartThanksText + dw BuyMenuLoop + +.HerbShopPointers: + dw HerbalLadyHowManyText + dw HerbalLadyFinalPriceText + dw HerbalLadyNoMoneyText + dw HerbalLadyPackFullText + dw HerbalLadyThanksText + dw BuyMenuLoop + +.BargainShopPointers: + dw BuyMenuLoop + dw BargainShopFinalPriceText + dw BargainShopNoFundsText + dw BargainShopPackFullText + dw BargainShopThanksText + dw BargainShopSoldOutText + +.PharmacyPointers: + dw PharmacyHowManyText + dw PharmacyFinalPriceText + dw PharmacyNoMoneyText + dw PharmacyPackFullText + dw PharmacyThanksText + dw BuyMenuLoop + +BuyMenuLoop: + farcall PlaceMoneyTopRight + call UpdateSprites + ld hl, MenuHeader_Buy + call CopyMenuHeader + ld a, [wMenuCursorPositionBackup] + ld [wMenuCursorPosition], a + ld a, [wMenuScrollPositionBackup] + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuScrollPosition] + ld [wMenuScrollPositionBackup], a + ld a, [wMenuCursorY] + ld [wMenuCursorPositionBackup], a + call SpeechTextbox + ld a, [wMenuJoypad] + cp B_BUTTON + jr z, .set_carry + cp A_BUTTON + jr z, .useless_pointer + +.useless_pointer + call MartAskPurchaseQuantity + jr c, .cancel + call MartConfirmPurchase + jr c, .cancel + ld de, wMoney + ld bc, hMoneyTemp + ld a, 3 ; useless load + call CompareMoney + jr c, .insufficient_funds + ld hl, wNumItems + call ReceiveItem + jr nc, .insufficient_bag_space + ld a, [wMartItemID] + ld e, a + ld d, 0 + ld b, SET_FLAG + ld hl, wBargainShopFlags + call FlagAction + call PlayTransactionSound + ld de, wMoney + ld bc, hMoneyTemp + call TakeMoney + ld a, MARTTEXT_HERE_YOU_GO + call LoadBuyMenuText + call JoyWaitAorB + +.cancel + call SpeechTextbox + and a + ret + +.set_carry + scf + ret + +.insufficient_bag_space + ld a, MARTTEXT_BAG_FULL + call LoadBuyMenuText + call JoyWaitAorB + and a + ret + +.insufficient_funds + ld a, MARTTEXT_NOT_ENOUGH_MONEY + call LoadBuyMenuText + call JoyWaitAorB + and a + ret + +StandardMartAskPurchaseQuantity: + ld a, MAX_ITEM_STACK + ld [wItemQuantity], a + ld a, MARTTEXT_HOW_MANY + call LoadBuyMenuText + farcall SelectQuantityToBuy + call ExitMenu + ret + +MartConfirmPurchase: + predef PartyMonItemName + ld a, MARTTEXT_COSTS_THIS_MUCH + call LoadBuyMenuText + call YesNoBox + ret + +BargainShopAskPurchaseQuantity: + ld a, 1 + ld [wItemQuantityChange], a + ld a, [wMartItemID] + ld e, a + ld d, 0 + ld b, CHECK_FLAG + ld hl, wBargainShopFlags + call FlagAction + ld a, c + and a + jr nz, .SoldOut + ld a, [wMartItemID] + ld e, a + ld d, 0 + ld hl, wMartPointer + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + add hl, de + add hl, de + add hl, de + inc hl + ld a, [hli] + ldh [hMoneyTemp + 2], a + ld a, [hl] + ldh [hMoneyTemp + 1], a + xor a + ldh [hMoneyTemp], a + and a + ret + +.SoldOut: + ld a, MARTTEXT_SOLD_OUT + call LoadBuyMenuText + call JoyWaitAorB + scf + ret + +RooftopSaleAskPurchaseQuantity: + ld a, MARTTEXT_HOW_MANY + call LoadBuyMenuText + call .GetSalePrice + ld a, MAX_ITEM_STACK + ld [wItemQuantity], a + farcall RooftopSale_SelectQuantityToBuy + call ExitMenu + ret + +.GetSalePrice: + ld a, [wMartItemID] + ld e, a + ld d, 0 + ld hl, wMartPointer + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + add hl, de + add hl, de + add hl, de + inc hl + ld e, [hl] + inc hl + ld d, [hl] + ret + +MartHowManyText: + text_far _MartHowManyText + text_end + +MartFinalPriceText: + text_far _MartFinalPriceText + text_end + +MenuHeader_Buy: + db MENU_BACKUP_TILES ; flags + menu_coords 1, 3, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData + db SCROLLINGMENU_DISPLAY_ARROWS | SCROLLINGMENU_ENABLE_FUNCTION3 ; flags + db 4, 8 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dbw 0, wCurMartCount + dba PlaceMenuItemName + dba .PrintBCDPrices + dba UpdateItemDescription + +.PrintBCDPrices: + ld a, [wScrollingMenuCursorPosition] + ld c, a + ld b, 0 + ld hl, wMartItem1BCD + add hl, bc + add hl, bc + add hl, bc + push de + ld d, h + ld e, l + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + ld c, PRINTNUM_LEADINGZEROS | PRINTNUM_MONEY | 3 + call PrintBCDNumber + ret + +HerbShopLadyIntroText: + text_far _HerbShopLadyIntroText + text_end + +HerbalLadyHowManyText: + text_far _HerbalLadyHowManyText + text_end + +HerbalLadyFinalPriceText: + text_far _HerbalLadyFinalPriceText + text_end + +HerbalLadyThanksText: + text_far _HerbalLadyThanksText + text_end + +HerbalLadyPackFullText: + text_far _HerbalLadyPackFullText + text_end + +HerbalLadyNoMoneyText: + text_far _HerbalLadyNoMoneyText + text_end + +HerbalLadyComeAgainText: + text_far _HerbalLadyComeAgainText + text_end + +BargainShopIntroText: + text_far _BargainShopIntroText + text_end + +BargainShopFinalPriceText: + text_far _BargainShopFinalPriceText + text_end + +BargainShopThanksText: + text_far _BargainShopThanksText + text_end + +BargainShopPackFullText: + text_far _BargainShopPackFullText + text_end + +BargainShopSoldOutText: + text_far _BargainShopSoldOutText + text_end + +BargainShopNoFundsText: + text_far _BargainShopNoFundsText + text_end + +BargainShopComeAgainText: + text_far _BargainShopComeAgainText + text_end + +PharmacyIntroText: + text_far _PharmacyIntroText + text_end + +PharmacyHowManyText: + text_far _PharmacyHowManyText + text_end + +PharmacyFinalPriceText: + text_far _PharmacyFinalPriceText + text_end + +PharmacyThanksText: + text_far _PharmacyThanksText + text_end + +PharmacyPackFullText: + text_far _PharmacyPackFullText + text_end + +PharmacyNoMoneyText: + text_far _PharmacyNoMoneyText + text_end + +PharmacyComeAgainText: + text_far _PharmacyComeAgainText + text_end + +SellMenu: + call DisableSpriteUpdates + farcall DepositSellInitPackBuffers +.loop + farcall DepositSellPack + ld a, [wPackUsedItem] + and a + jp z, .quit + call .TryToSellItem + jr .loop + +.quit + call ReturnToMapWithSpeechTextbox + and a + ret + +.NothingToSell: ; unreferenced + ld hl, .NothingToSellText + call MenuTextboxBackup + and a + ret + +.NothingToSellText: + text_far _NothingToSellText + text_end + +.TryToSellItem: + farcall CheckItemMenu + ld a, [wItemAttributeValue] + ld hl, .dw + rst JumpTable + ret + +.dw + dw .try_sell + dw .cant_buy + dw .cant_buy + dw .cant_buy + dw .try_sell + dw .try_sell + dw .try_sell + +.cant_buy + ret + +.try_sell + farcall _CheckTossableItem + ld a, [wItemAttributeValue] + and a + jr z, .okay_to_sell + ld hl, MartCantBuyText + call PrintText + and a + ret + +.okay_to_sell + ld hl, MartSellHowManyText + call PrintText + farcall PlaceMoneyAtTopLeftOfTextbox + farcall SelectQuantityToSell + call ExitMenu + jr c, .declined + hlcoord 1, 14 + lb bc, 3, 18 + call ClearBox + ld hl, MartSellPriceText + call PrintTextboxText + call YesNoBox + jr c, .declined + ld de, wMoney + ld bc, hMoneyTemp + call GiveMoney + ld a, [wMartItemID] + ld hl, wNumItems + call TossItem + predef PartyMonItemName + hlcoord 1, 14 + lb bc, 3, 18 + call ClearBox + ld hl, MartBoughtText + call PrintTextboxText + call PlayTransactionSound + farcall PlaceMoneyBottomLeft + call JoyWaitAorB + +.declined + call ExitMenu + and a + ret + +MartSellHowManyText: + text_far _MartSellHowManyText + text_end + +MartSellPriceText: + text_far _MartSellPriceText + text_end + +UnusedDummyString: ; unreferenced + db "!ダミー!@" ; "!Dummy!" + +MartWelcomeText: + text_far _MartWelcomeText + text_end + +MenuHeader_BuySell: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 7, 8 + dw .MenuData + db 1 ; default option + +.MenuData + db STATICMENU_CURSOR ; strings + db 3 ; items + db "BUY@" + db "SELL@" + db "QUIT@" + +MartThanksText: + text_far _MartThanksText + text_end + +MartNoMoneyText: + text_far _MartNoMoneyText + text_end + +MartPackFullText: + text_far _MartPackFullText + text_end + +MartCantBuyText: + text_far _MartCantBuyText + text_end + +MartComeAgainText: + text_far _MartComeAgainText + text_end + +MartAskMoreText: + text_far _MartAskMoreText + text_end + +MartBoughtText: + text_far _MartBoughtText + text_end + +PlayTransactionSound: + call WaitSFX + ld de, SFX_TRANSACTION + call PlaySFX + ret + +MartTextbox: + call MenuTextbox + call JoyWaitAorB + call ExitMenu + ret diff --git a/engine/items/pack.asm b/engine/items/pack.asm new file mode 100644 index 0000000..4a4b694 --- /dev/null +++ b/engine/items/pack.asm @@ -0,0 +1,1581 @@ +; Pack.Jumptable and BattlePack.Jumptable indexes + const_def + const PACKSTATE_INITGFX ; 0 + const PACKSTATE_INITITEMSPOCKET ; 1 + const PACKSTATE_ITEMSPOCKETMENU ; 2 + const PACKSTATE_INITBALLSPOCKET ; 3 + const PACKSTATE_BALLSPOCKETMENU ; 4 + const PACKSTATE_INITKEYITEMSPOCKET ; 5 + const PACKSTATE_KEYITEMSPOCKETMENU ; 6 + const PACKSTATE_INITTMHMPOCKET ; 7 + const PACKSTATE_TMHMPOCKETMENU ; 8 + const PACKSTATE_QUITNOSCRIPT ; 9 + const PACKSTATE_QUITRUNSCRIPT ; 10 + +Pack: + ld hl, wOptions + set NO_TEXT_SCROLL, [hl] + call InitPackBuffers +.loop + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .done + call .RunJumptable + call DelayFrame + jr .loop + +.done + ld a, [wCurPocket] + ld [wLastPocket], a + ld hl, wOptions + res NO_TEXT_SCROLL, [hl] + ret + +.RunJumptable: + ld a, [wJumptableIndex] + ld hl, .Jumptable + call Pack_GetJumptablePointer + jp hl + +.Jumptable: +; entries correspond to PACKSTATE_* constants + dw .InitGFX ; 0 + dw .InitItemsPocket ; 1 + dw .ItemsPocketMenu ; 2 + dw .InitBallsPocket ; 3 + dw .BallsPocketMenu ; 4 + dw .InitKeyItemsPocket ; 5 + dw .KeyItemsPocketMenu ; 6 + dw .InitTMHMPocket ; 7 + dw .TMHMPocketMenu ; 8 + dw Pack_QuitNoScript ; 9 + dw Pack_QuitRunScript ; 10 + +.InitGFX: + xor a + ldh [hBGMapMode], a + call Pack_InitGFX + ld a, [wPackJumptableIndex] + ld [wJumptableIndex], a + call Pack_InitColors + ret + +.InitItemsPocket: + xor a ; ITEM_POCKET + ld [wCurPocket], a + call ClearPocketList + call DrawPocketName + call WaitBGMap_DrawPackGFX + call Pack_JumptableNext + ret + +.ItemsPocketMenu: + ld hl, ItemsPocketMenuHeader + call CopyMenuHeader + ld a, [wItemsPocketCursor] + ld [wMenuCursorPosition], a + ld a, [wItemsPocketScrollPosition] + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuScrollPosition] + ld [wItemsPocketScrollPosition], a + ld a, [wMenuCursorY] + ld [wItemsPocketCursor], a + ld b, PACKSTATE_INITTMHMPOCKET ; left + ld c, PACKSTATE_INITBALLSPOCKET ; right + call Pack_InterpretJoypad + ret c + call .ItemBallsKey_LoadSubmenu + ret + +.InitKeyItemsPocket: + ld a, KEY_ITEM_POCKET + ld [wCurPocket], a + call ClearPocketList + call DrawPocketName + call WaitBGMap_DrawPackGFX + call Pack_JumptableNext + ret + +.KeyItemsPocketMenu: + ld hl, KeyItemsPocketMenuHeader + call CopyMenuHeader + ld a, [wKeyItemsPocketCursor] + ld [wMenuCursorPosition], a + ld a, [wKeyItemsPocketScrollPosition] + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuScrollPosition] + ld [wKeyItemsPocketScrollPosition], a + ld a, [wMenuCursorY] + ld [wKeyItemsPocketCursor], a + ld b, PACKSTATE_INITBALLSPOCKET ; left + ld c, PACKSTATE_INITTMHMPOCKET ; right + call Pack_InterpretJoypad + ret c + call .ItemBallsKey_LoadSubmenu + ret + +.InitTMHMPocket: + ld a, TM_HM_POCKET + ld [wCurPocket], a + call ClearPocketList + call DrawPocketName + xor a + ldh [hBGMapMode], a + call WaitBGMap_DrawPackGFX + call Pack_JumptableNext + ret + +.TMHMPocketMenu: + farcall TMHMPocket + ld b, PACKSTATE_INITKEYITEMSPOCKET ; left + ld c, PACKSTATE_INITITEMSPOCKET ; right + call Pack_InterpretJoypad + ret c + farcall _CheckTossableItem + ld a, [wItemAttributeValue] + and a + jr nz, .use_quit + ld hl, .MenuHeader2 + ld de, .Jumptable2 + jr .load_jump + +.use_quit + ld hl, .MenuHeader1 + ld de, .Jumptable1 +.load_jump + push de + call LoadMenuHeader + call VerticalMenu + call ExitMenu + pop hl + ret c + ld a, [wMenuCursorY] + dec a + call Pack_GetJumptablePointer + jp hl + +.MenuHeader1: + db MENU_BACKUP_TILES ; flags + menu_coords 13, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData_1 + db 1 ; default option + +.MenuData_1: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 2 ; items + db "USE@" + db "QUIT@" + +.Jumptable1: + dw .UseItem + dw QuitItemSubmenu + +.MenuHeader2: + db MENU_BACKUP_TILES ; flags + menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData_2 + db 1 ; default option + +.MenuData_2: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 3 ; items + db "USE@" + db "GIVE@" + db "QUIT@" + +.Jumptable2: + dw .UseItem + dw GiveItem + dw QuitItemSubmenu + +.UseItem: + farcall AskTeachTMHM + ret c + farcall ChooseMonToLearnTMHM + jr c, .declined + ld hl, wOptions + ld a, [hl] + push af + res NO_TEXT_SCROLL, [hl] + farcall TeachTMHM + pop af + ld [wOptions], a +.declined + xor a + ldh [hBGMapMode], a + call Pack_InitGFX + call WaitBGMap_DrawPackGFX + call Pack_InitColors + ret + +.InitBallsPocket: + ld a, BALL_POCKET + ld [wCurPocket], a + call ClearPocketList + call DrawPocketName + call WaitBGMap_DrawPackGFX + call Pack_JumptableNext + ret + +.BallsPocketMenu: + ld hl, BallsPocketMenuHeader + call CopyMenuHeader + ld a, [wBallsPocketCursor] + ld [wMenuCursorPosition], a + ld a, [wBallsPocketScrollPosition] + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuScrollPosition] + ld [wBallsPocketScrollPosition], a + ld a, [wMenuCursorY] + ld [wBallsPocketCursor], a + ld b, PACKSTATE_INITITEMSPOCKET ; left + ld c, PACKSTATE_INITKEYITEMSPOCKET ; right + call Pack_InterpretJoypad + ret c + call .ItemBallsKey_LoadSubmenu + ret + +.ItemBallsKey_LoadSubmenu: + farcall _CheckTossableItem + ld a, [wItemAttributeValue] + and a + jr nz, .tossable + farcall CheckSelectableItem + ld a, [wItemAttributeValue] + and a + jr nz, .selectable + farcall CheckItemMenu + ld a, [wItemAttributeValue] + and a + jr nz, .usable + jr .unusable + +.selectable + farcall CheckItemMenu + ld a, [wItemAttributeValue] + and a + jr nz, .selectable_usable + jr .selectable_unusable + +.tossable + farcall CheckSelectableItem + ld a, [wItemAttributeValue] + and a + jr nz, .tossable_selectable + jr .tossable_unselectable + +.usable + ld hl, MenuHeader_UsableKeyItem + ld de, Jumptable_UseGiveTossRegisterQuit + jr .build_menu + +.selectable_usable + ld hl, MenuHeader_UsableItem + ld de, Jumptable_UseGiveTossQuit + jr .build_menu + +.tossable_selectable + ld hl, MenuHeader_UnusableItem + ld de, Jumptable_UseQuit + jr .build_menu + +.tossable_unselectable + ld hl, MenuHeader_UnusableKeyItem + ld de, Jumptable_UseRegisterQuit + jr .build_menu + +.unusable + ld hl, MenuHeader_HoldableKeyItem + ld de, Jumptable_GiveTossRegisterQuit + jr .build_menu + +.selectable_unusable + ld hl, MenuHeader_HoldableItem + ld de, Jumptable_GiveTossQuit +.build_menu + push de + call LoadMenuHeader + call VerticalMenu + call ExitMenu + pop hl + ret c + ld a, [wMenuCursorY] + dec a + call Pack_GetJumptablePointer + jp hl + +MenuHeader_UsableKeyItem: + db MENU_BACKUP_TILES ; flags + menu_coords 13, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 5 ; items + db "USE@" + db "GIVE@" + db "TOSS@" + db "SEL@" + db "QUIT@" + +Jumptable_UseGiveTossRegisterQuit: + dw UseItem + dw GiveItem + dw TossMenu + dw RegisterItem + dw QuitItemSubmenu + +MenuHeader_UsableItem: + db MENU_BACKUP_TILES ; flags + menu_coords 13, 3, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 4 ; items + db "USE@" + db "GIVE@" + db "TOSS@" + db "QUIT@" + +Jumptable_UseGiveTossQuit: + dw UseItem + dw GiveItem + dw TossMenu + dw QuitItemSubmenu + +MenuHeader_UnusableItem: + db MENU_BACKUP_TILES ; flags + menu_coords 13, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 2 ; items + db "USE@" + db "QUIT@" + +Jumptable_UseQuit: + dw UseItem + dw QuitItemSubmenu + +MenuHeader_UnusableKeyItem: + db MENU_BACKUP_TILES ; flags + menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 3 ; items + db "USE@" + db "SEL@" + db "QUIT@" + +Jumptable_UseRegisterQuit: + dw UseItem + dw RegisterItem + dw QuitItemSubmenu + +MenuHeader_HoldableKeyItem: + db MENU_BACKUP_TILES ; flags + menu_coords 13, 3, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 4 ; items + db "GIVE@" + db "TOSS@" + db "SEL@" + db "QUIT@" + +Jumptable_GiveTossRegisterQuit: + dw GiveItem + dw TossMenu + dw RegisterItem + dw QuitItemSubmenu + +MenuHeader_HoldableItem: + db MENU_BACKUP_TILES ; flags + menu_coords 13, 5, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 3 ; items + db "GIVE@" + db "TOSS@" + db "QUIT@" + +Jumptable_GiveTossQuit: + dw GiveItem + dw TossMenu + dw QuitItemSubmenu + +UseItem: + farcall CheckItemMenu + ld a, [wItemAttributeValue] + ld hl, .dw + rst JumpTable + ret + +.dw +; entries correspond to ITEMMENU_* constants + dw .Oak ; ITEMMENU_NOUSE + dw .Oak + dw .Oak + dw .Oak + dw .Current ; ITEMMENU_CURRENT + dw .Party ; ITEMMENU_PARTY + dw .Field ; ITEMMENU_CLOSE + +.Oak: + ld hl, OakThisIsntTheTimeText + call Pack_PrintTextNoScroll + ret + +.Current: + call DoItemEffect + ret + +.Party: + ld a, [wPartyCount] + and a + jr z, .NoPokemon + call DoItemEffect + xor a + ldh [hBGMapMode], a + call Pack_InitGFX + call WaitBGMap_DrawPackGFX + call Pack_InitColors + ret + +.NoPokemon: + ld hl, YouDontHaveAMonText + call Pack_PrintTextNoScroll + ret + +.Field: + call DoItemEffect + ld a, [wItemEffectSucceeded] + and a + jr z, .Oak + ld a, PACKSTATE_QUITRUNSCRIPT + ld [wJumptableIndex], a + ret + +TossMenu: + ld hl, AskThrowAwayText + call Pack_PrintTextNoScroll + farcall SelectQuantityToToss + push af + call ExitMenu + pop af + jr c, .finish + call Pack_GetItemName + ld hl, AskQuantityThrowAwayText + call MenuTextbox + call YesNoBox + push af + call ExitMenu + pop af + jr c, .finish + ld hl, wNumItems + ld a, [wCurItemQuantity] + call TossItem + call Pack_GetItemName + ld hl, ThrewAwayText + call Pack_PrintTextNoScroll +.finish + ret + +ResetPocketCursorPositions: ; unreferenced + ld a, [wCurPocket] + and a ; ITEM_POCKET + jr z, .items + dec a ; BALL_POCKET + jr z, .balls + dec a ; KEY_ITEM_POCKET + jr z, .key + ret + +.balls + xor a + ld [wBallsPocketCursor], a + ld [wBallsPocketScrollPosition], a + ret + +.items + xor a + ld [wItemsPocketCursor], a + ld [wItemsPocketScrollPosition], a + ret + +.key + xor a + ld [wKeyItemsPocketCursor], a + ld [wKeyItemsPocketScrollPosition], a + ret + +RegisterItem: + farcall CheckSelectableItem + ld a, [wItemAttributeValue] + and a + jr nz, .cant_register + ld a, [wCurPocket] + rrca + rrca + and REGISTERED_POCKET + ld b, a + ld a, [wCurItemQuantity] + inc a + and REGISTERED_NUMBER + or b + ld [wWhichRegisteredItem], a + ld a, [wCurItem] + ld [wRegisteredItem], a + call Pack_GetItemName + ld de, SFX_FULL_HEAL + call WaitPlaySFX + ld hl, RegisteredItemText + call Pack_PrintTextNoScroll + ret + +.cant_register + ld hl, CantRegisterText + call Pack_PrintTextNoScroll + ret + +GiveItem: + ld a, [wPartyCount] + and a + jp z, .NoPokemon + ld a, [wOptions] + push af + res NO_TEXT_SCROLL, a + ld [wOptions], a + ld a, PARTYMENUACTION_GIVE_ITEM + ld [wPartyMenuActionText], a + call ClearBGPalettes + farcall LoadPartyMenuGFX + farcall InitPartyMenuWithCancel + farcall InitPartyMenuGFX +.loop + farcall WritePartyMenuTilemap + farcall PrintPartyMenuText + call WaitBGMap + call SetPalettes + call DelayFrame + farcall PartyMenuSelect + jr c, .finish + ld a, [wCurPartySpecies] + cp EGG + jr nz, .give + ld hl, .AnEggCantHoldAnItemText + call PrintText + jr .loop + +.give + ld a, [wJumptableIndex] + push af + ld a, [wPackJumptableIndex] + push af + call GetCurNickname + ld hl, wStringBuffer1 + ld de, wMonOrItemNameBuffer + ld bc, MON_NAME_LENGTH + call CopyBytes + call TryGiveItemToPartymon + pop af + ld [wPackJumptableIndex], a + pop af + ld [wJumptableIndex], a +.finish + pop af + ld [wOptions], a + xor a + ldh [hBGMapMode], a + call Pack_InitGFX + call WaitBGMap_DrawPackGFX + call Pack_InitColors + ret + +.NoPokemon: + ld hl, YouDontHaveAMonText + call Pack_PrintTextNoScroll + ret +.AnEggCantHoldAnItemText: + text_far _AnEggCantHoldAnItemText + text_end + +QuitItemSubmenu: + ret + +BattlePack: + ld hl, wOptions + set NO_TEXT_SCROLL, [hl] + call InitPackBuffers +.loop + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .end + call .RunJumptable + call DelayFrame + jr .loop + +.end + ld a, [wCurPocket] + ld [wLastPocket], a + ld hl, wOptions + res NO_TEXT_SCROLL, [hl] + ret + +.RunJumptable: + ld a, [wJumptableIndex] + ld hl, .Jumptable + call Pack_GetJumptablePointer + jp hl + +.Jumptable: +; entries correspond to PACKSTATE_* constants + dw .InitGFX ; 0 + dw .InitItemsPocket ; 1 + dw .ItemsPocketMenu ; 2 + dw .InitBallsPocket ; 3 + dw .BallsPocketMenu ; 4 + dw .InitKeyItemsPocket ; 5 + dw .KeyItemsPocketMenu ; 6 + dw .InitTMHMPocket ; 7 + dw .TMHMPocketMenu ; 8 + dw Pack_QuitNoScript ; 9 + dw Pack_QuitRunScript ; 10 + +.InitGFX: + xor a + ldh [hBGMapMode], a + call Pack_InitGFX + ld a, [wPackJumptableIndex] + ld [wJumptableIndex], a + call Pack_InitColors + ret + +.InitItemsPocket: + xor a ; ITEM_POCKET + ld [wCurPocket], a + call ClearPocketList + call DrawPocketName + call WaitBGMap_DrawPackGFX + call Pack_JumptableNext + ret + +.ItemsPocketMenu: + ld hl, ItemsPocketMenuHeader + call CopyMenuHeader + ld a, [wItemsPocketCursor] + ld [wMenuCursorPosition], a + ld a, [wItemsPocketScrollPosition] + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuScrollPosition] + ld [wItemsPocketScrollPosition], a + ld a, [wMenuCursorY] + ld [wItemsPocketCursor], a + ld b, PACKSTATE_INITTMHMPOCKET ; left + ld c, PACKSTATE_INITBALLSPOCKET ; right + call Pack_InterpretJoypad + ret c + call ItemSubmenu + ret + +.InitKeyItemsPocket: + ld a, KEY_ITEM_POCKET + ld [wCurPocket], a + call ClearPocketList + call DrawPocketName + call WaitBGMap_DrawPackGFX + call Pack_JumptableNext + ret + +.KeyItemsPocketMenu: + ld hl, KeyItemsPocketMenuHeader + call CopyMenuHeader + ld a, [wKeyItemsPocketCursor] + ld [wMenuCursorPosition], a + ld a, [wKeyItemsPocketScrollPosition] + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuScrollPosition] + ld [wKeyItemsPocketScrollPosition], a + ld a, [wMenuCursorY] + ld [wKeyItemsPocketCursor], a + ld b, PACKSTATE_INITBALLSPOCKET ; left + ld c, PACKSTATE_INITTMHMPOCKET ; right + call Pack_InterpretJoypad + ret c + call ItemSubmenu + ret + +.InitTMHMPocket: + ld a, TM_HM_POCKET + ld [wCurPocket], a + call ClearPocketList + call DrawPocketName + xor a + ldh [hBGMapMode], a + call WaitBGMap_DrawPackGFX + ld hl, PackEmptyText + call Pack_PrintTextNoScroll + call Pack_JumptableNext + ret + +.TMHMPocketMenu: + farcall TMHMPocket + ld b, PACKSTATE_INITKEYITEMSPOCKET ; left + ld c, PACKSTATE_INITITEMSPOCKET ; right + call Pack_InterpretJoypad + ret c + xor a + call TMHMSubmenu + ret + +.InitBallsPocket: + ld a, BALL_POCKET + ld [wCurPocket], a + call ClearPocketList + call DrawPocketName + call WaitBGMap_DrawPackGFX + call Pack_JumptableNext + ret + +.BallsPocketMenu: + ld hl, BallsPocketMenuHeader + call CopyMenuHeader + ld a, [wBallsPocketCursor] + ld [wMenuCursorPosition], a + ld a, [wBallsPocketScrollPosition] + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuScrollPosition] + ld [wBallsPocketScrollPosition], a + ld a, [wMenuCursorY] + ld [wBallsPocketCursor], a + ld b, PACKSTATE_INITITEMSPOCKET ; left + ld c, PACKSTATE_INITKEYITEMSPOCKET ; right + call Pack_InterpretJoypad + ret c + call ItemSubmenu + ret + +ItemSubmenu: + farcall CheckItemContext + ld a, [wItemAttributeValue] +TMHMSubmenu: + and a + jr z, .NoUse + ld hl, .UsableMenuHeader + ld de, .UsableJumptable + jr .proceed + +.NoUse: + ld hl, .UnusableMenuHeader + ld de, .UnusableJumptable +.proceed + push de + call LoadMenuHeader + call VerticalMenu + call ExitMenu + pop hl + ret c + ld a, [wMenuCursorY] + dec a + call Pack_GetJumptablePointer + jp hl + +.UsableMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 13, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .UsableMenuData + db 1 ; default option + +.UsableMenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 2 ; items + db "USE@" + db "QUIT@" + +.UsableJumptable: + dw .Use + dw .Quit + +.UnusableMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 13, 9, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .UnusableMenuData + db 1 ; default option + +.UnusableMenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 1 ; items + db "QUIT@" + +.UnusableJumptable: + dw .Quit + +.Use: + farcall CheckItemContext + ld a, [wItemAttributeValue] + ld hl, .ItemFunctionJumptable + rst JumpTable + ret + +.ItemFunctionJumptable: +; entries correspond to ITEMMENU_* constants + dw .Oak ; ITEMMENU_NOUSE + dw .Oak + dw .Oak + dw .Oak + dw .Unused ; ITEMMENU_CURRENT + dw .BattleField ; ITEMMENU_PARTY + dw .BattleOnly ; ITEMMENU_CLOSE + +.Oak: + ld hl, OakThisIsntTheTimeText + call Pack_PrintTextNoScroll + ret + +.Unused: + call DoItemEffect + ld a, [wItemEffectSucceeded] + and a + jr nz, .ReturnToBattle + ret + +.BattleField: + call DoItemEffect + ld a, [wItemEffectSucceeded] + and a + jr nz, .quit_run_script + xor a + ldh [hBGMapMode], a + call Pack_InitGFX + call WaitBGMap_DrawPackGFX + call Pack_InitColors + ret + +.ReturnToBattle: + call ClearBGPalettes + jr .quit_run_script + +.BattleOnly: + call DoItemEffect + ld a, [wItemEffectSucceeded] + and a + jr z, .Oak + cp $2 + jr z, .didnt_use_item +.quit_run_script + ld a, PACKSTATE_QUITRUNSCRIPT + ld [wJumptableIndex], a + ret + +.didnt_use_item + xor a + ld [wItemEffectSucceeded], a + ret +.Quit: + ret + +InitPackBuffers: + xor a + ld [wJumptableIndex], a + ; pocket id -> jumptable index + ld a, [wLastPocket] + maskbits NUM_POCKETS + ld [wCurPocket], a + inc a + add a + dec a + ld [wPackJumptableIndex], a + xor a ; FALSE + ld [wPackUsedItem], a + xor a + ld [wSwitchItem], a + ret + +DepositSellInitPackBuffers: + xor a + ldh [hBGMapMode], a + ld [wJumptableIndex], a ; PACKSTATE_INITGFX + ld [wPackJumptableIndex], a ; PACKSTATE_INITGFX + ld [wCurPocket], a ; ITEM_POCKET + ld [wPackUsedItem], a + ld [wSwitchItem], a + call Pack_InitGFX + call Pack_InitColors + ret + +DepositSellPack: +.loop + call .RunJumptable + call DepositSellTutorial_InterpretJoypad + jr c, .loop + ret + +.RunJumptable: + ld a, [wJumptableIndex] + ld hl, .Jumptable + call Pack_GetJumptablePointer + jp hl + +.Jumptable: +; entries correspond to *_POCKET constants + dw .ItemsPocket + dw .BallsPocket + dw .KeyItemsPocket + dw .TMHMPocket + +.ItemsPocket: + xor a ; ITEM_POCKET + call InitPocket + ld hl, PC_Mart_ItemsPocketMenuHeader + call CopyMenuHeader + ld a, [wItemsPocketCursor] + ld [wMenuCursorPosition], a + ld a, [wItemsPocketScrollPosition] + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuScrollPosition] + ld [wItemsPocketScrollPosition], a + ld a, [wMenuCursorY] + ld [wItemsPocketCursor], a + ret + +.KeyItemsPocket: + ld a, KEY_ITEM_POCKET + call InitPocket + ld hl, PC_Mart_KeyItemsPocketMenuHeader + call CopyMenuHeader + ld a, [wKeyItemsPocketCursor] + ld [wMenuCursorPosition], a + ld a, [wKeyItemsPocketScrollPosition] + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuScrollPosition] + ld [wKeyItemsPocketScrollPosition], a + ld a, [wMenuCursorY] + ld [wKeyItemsPocketCursor], a + ret + +.TMHMPocket: + ld a, TM_HM_POCKET + call InitPocket + call WaitBGMap_DrawPackGFX + farcall TMHMPocket + ld a, [wCurItem] + ld [wCurItem], a + ret + +.BallsPocket: + ld a, BALL_POCKET + call InitPocket + ld hl, PC_Mart_BallsPocketMenuHeader + call CopyMenuHeader + ld a, [wBallsPocketCursor] + ld [wMenuCursorPosition], a + ld a, [wBallsPocketScrollPosition] + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuScrollPosition] + ld [wBallsPocketScrollPosition], a + ld a, [wMenuCursorY] + ld [wBallsPocketCursor], a + ret + +InitPocket: + ld [wCurPocket], a + call ClearPocketList + call DrawPocketName + call WaitBGMap_DrawPackGFX + ret + +DepositSellTutorial_InterpretJoypad: + ld hl, wMenuJoypad + ld a, [hl] + and A_BUTTON + jr nz, .a_button + ld a, [hl] + and B_BUTTON + jr nz, .b_button + ld a, [hl] + and D_LEFT + jr nz, .d_left + ld a, [hl] + and D_RIGHT + jr nz, .d_right + scf + ret + +.a_button + ld a, TRUE + ld [wPackUsedItem], a + and a + ret + +.b_button + xor a ; FALSE + ld [wPackUsedItem], a + and a + ret + +.d_left + ld a, [wJumptableIndex] + dec a + maskbits NUM_POCKETS + ld [wJumptableIndex], a + push de + ld de, SFX_SWITCH_POCKETS + call PlaySFX + pop de + scf + ret + +.d_right + ld a, [wJumptableIndex] + inc a + maskbits NUM_POCKETS + ld [wJumptableIndex], a + push de + ld de, SFX_SWITCH_POCKETS + call PlaySFX + pop de + scf + ret + +TutorialPack: + call DepositSellInitPackBuffers + ld a, [wInputType] + or a + jr z, .loop + farcall _DudeAutoInput_RightA +.loop + call .RunJumptable + call DepositSellTutorial_InterpretJoypad + jr c, .loop + xor a ; FALSE + ld [wPackUsedItem], a + ret + +.RunJumptable: + ld a, [wJumptableIndex] + ld hl, .dw + call Pack_GetJumptablePointer + jp hl + +.dw +; entries correspond to *_POCKET constants + dw .Items + dw .Balls + dw .KeyItems + dw .TMHM + +.Items: + xor a ; ITEM_POCKET + ld hl, .ItemsMenuHeader + jr .DisplayPocket + +.ItemsMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .ItemsMenuData + db 1 ; default option + +.ItemsMenuData: + db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP | STATICMENU_CURSOR ; flags + db 5, 8 ; rows, columns + db SCROLLINGMENU_ITEMS_QUANTITY ; item format + dbw 0, wDudeNumItems + dba PlaceMenuItemName + dba PlaceMenuItemQuantity + dba UpdateItemDescription + +.KeyItems: + ld a, KEY_ITEM_POCKET + ld hl, .KeyItemsMenuHeader + jr .DisplayPocket + +.KeyItemsMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .KeyItemsMenuData + db 1 ; default option + +.KeyItemsMenuData: + db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP | STATICMENU_CURSOR ; flags + db 5, 8 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dbw 0, wDudeNumKeyItems + dba PlaceMenuItemName + dba PlaceMenuItemQuantity + dba UpdateItemDescription + +.TMHM: + ld a, TM_HM_POCKET + call InitPocket + call WaitBGMap_DrawPackGFX + farcall TMHMPocket + ld a, [wCurItem] + ld [wCurItem], a + ret + +.Balls: + ld a, BALL_POCKET + ld hl, .BallsMenuHeader + jr .DisplayPocket + +.BallsMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .BallsMenuData + db 1 ; default option + +.BallsMenuData: + db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP | STATICMENU_CURSOR ; flags + db 5, 8 ; rows, columns + db SCROLLINGMENU_ITEMS_QUANTITY ; item format + dbw 0, wDudeNumBalls + dba PlaceMenuItemName + dba PlaceMenuItemQuantity + dba UpdateItemDescription + +.DisplayPocket: + push hl + call InitPocket + pop hl + call CopyMenuHeader + call ScrollingMenu + ret + +Pack_JumptableNext: + ld hl, wJumptableIndex + inc [hl] + ret + +Pack_GetJumptablePointer: + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ret + +Pack_QuitNoScript: + ld hl, wJumptableIndex + set 7, [hl] + xor a ; FALSE + ld [wPackUsedItem], a + ret + +Pack_QuitRunScript: + ld hl, wJumptableIndex + set 7, [hl] + ld a, TRUE + ld [wPackUsedItem], a + ret + +Pack_PrintTextNoScroll: + ld a, [wOptions] + push af + set NO_TEXT_SCROLL, a + ld [wOptions], a + call PrintText + pop af + ld [wOptions], a + ret + +WaitBGMap_DrawPackGFX: + call WaitBGMap +DrawPackGFX: + ld a, [wCurPocket] + maskbits NUM_POCKETS + ld e, a + ld d, 0 + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL + jr z, .male_dude + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr nz, .female +.male_dude + ld hl, PackGFXPointers + add hl, de + add hl, de + ld a, [hli] + ld e, a + ld d, [hl] + ld hl, vTiles2 tile $50 + lb bc, BANK(PackGFX), 15 + call Request2bpp + ret + +.female + farcall DrawKrisPackGFX + ret + +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 + +Pack_InterpretJoypad: + ld hl, wMenuJoypad + ld a, [wSwitchItem] + and a + jr nz, .switching_item + ld a, [hl] + and A_BUTTON + jr nz, .a_button + ld a, [hl] + and B_BUTTON + jr nz, .b_button + ld a, [hl] + and D_LEFT + jr nz, .d_left + ld a, [hl] + and D_RIGHT + jr nz, .d_right + ld a, [hl] + and SELECT + jr nz, .select + scf + ret + +.a_button + and a + ret + +.b_button + ld a, PACKSTATE_QUITNOSCRIPT + ld [wJumptableIndex], a + scf + ret + +.d_left + ld a, b + ld [wJumptableIndex], a + ld [wPackJumptableIndex], a + push de + ld de, SFX_SWITCH_POCKETS + call PlaySFX + pop de + scf + ret + +.d_right + ld a, c + ld [wJumptableIndex], a + ld [wPackJumptableIndex], a + push de + ld de, SFX_SWITCH_POCKETS + call PlaySFX + pop de + scf + ret + +.select + farcall SwitchItemsInBag + ld hl, AskItemMoveText + call Pack_PrintTextNoScroll + scf + ret + +.switching_item + ld a, [hl] + and A_BUTTON | SELECT + jr nz, .place_insert + ld a, [hl] + and B_BUTTON + jr nz, .end_switch + scf + ret + +.place_insert + farcall SwitchItemsInBag + ld de, SFX_SWITCH_POKEMON + call WaitPlaySFX + ld de, SFX_SWITCH_POKEMON + call WaitPlaySFX +.end_switch + xor a + ld [wSwitchItem], a + scf + ret + +Pack_InitGFX: + call ClearBGPalettes + call ClearTilemap + call ClearSprites + call DisableLCD + ld hl, PackMenuGFX + ld de, vTiles2 + ld bc, $60 tiles + ld a, BANK(PackMenuGFX) + call FarCopyBytes +; Background (blue if male, pink if female) + hlcoord 0, 1 + ld bc, 11 * SCREEN_WIDTH + ld a, $24 + call ByteFill +; This is where the items themselves will be listed. + hlcoord 5, 1 + lb bc, 11, 15 + call ClearBox +; ◀▶ POCKET ▼▲ ITEMS + hlcoord 0, 0 + ld a, $28 + ld c, SCREEN_WIDTH +.loop + ld [hli], a + inc a + dec c + jr nz, .loop + call DrawPocketName + call PlacePackGFX +; Place the textbox for displaying the item description + hlcoord 0, SCREEN_HEIGHT - 4 - 2 + lb bc, 4, SCREEN_WIDTH - 2 + call Textbox + call EnableLCD + call DrawPackGFX + ret + +PlacePackGFX: + hlcoord 0, 3 + ld a, $50 + ld de, SCREEN_WIDTH - 5 + ld b, 3 +.row + ld c, 5 +.column + ld [hli], a + inc a + dec c + jr nz, .column + add hl, de + dec b + jr nz, .row + ret + +DrawPocketName: + ld a, [wCurPocket] + ; * 15 + ld d, a + swap a + sub d + ld d, 0 + ld e, a + ld hl, .tilemap + add hl, de + ld d, h + ld e, l + hlcoord 0, 7 + ld c, 3 +.row + ld b, 5 +.col + ld a, [de] + inc de + ld [hli], a + dec b + jr nz, .col + ld a, c + ld c, SCREEN_WIDTH - 5 + add hl, bc + ld c, a + dec c + jr nz, .row + ret + +.tilemap: ; 5x12 +; the 5x3 pieces correspond to *_POCKET constants +INCBIN "gfx/pack/pack_menu.tilemap" + +Pack_GetItemName: + ld a, [wCurItem] + ld [wNamedObjectIndex], a + call GetItemName + call CopyName1 + ret + +Pack_ClearTilemap: ; unreferenced + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, " " + call ByteFill + ret + +ClearPocketList: + hlcoord 5, 2 + lb bc, 10, SCREEN_WIDTH - 5 + call ClearBox + ret + +Pack_InitColors: + call WaitBGMap + ld b, SCGB_PACKPALS + call GetSGBLayout + call SetPalettes + call DelayFrame + ret + +ItemsPocketMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP | STATICMENU_CURSOR ; flags + db 5, 8 ; rows, columns + db SCROLLINGMENU_ITEMS_QUANTITY ; item format + dbw 0, wNumItems + dba PlaceMenuItemName + dba PlaceMenuItemQuantity + dba UpdateItemDescription + +PC_Mart_ItemsPocketMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP ; flags + db 5, 8 ; rows, columns + db SCROLLINGMENU_ITEMS_QUANTITY ; item format + dbw 0, wNumItems + dba PlaceMenuItemName + dba PlaceMenuItemQuantity + dba UpdateItemDescription + +KeyItemsPocketMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP | STATICMENU_CURSOR ; flags + db 5, 8 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dbw 0, wNumKeyItems + dba PlaceMenuItemName + dba PlaceMenuItemQuantity + dba UpdateItemDescription + +PC_Mart_KeyItemsPocketMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP ; flags + db 5, 8 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dbw 0, wNumKeyItems + dba PlaceMenuItemName + dba PlaceMenuItemQuantity + dba UpdateItemDescription + +BallsPocketMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP | STATICMENU_CURSOR ; flags + db 5, 8 ; rows, columns + db SCROLLINGMENU_ITEMS_QUANTITY ; item format + dbw 0, wNumBalls + dba PlaceMenuItemName + dba PlaceMenuItemQuantity + dba UpdateItemDescription + +PC_Mart_BallsPocketMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 7, 1, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_ENABLE_SELECT | STATICMENU_ENABLE_LEFT_RIGHT | STATICMENU_ENABLE_START | STATICMENU_WRAP ; flags + db 5, 8 ; rows, columns + db SCROLLINGMENU_ITEMS_QUANTITY ; item format + dbw 0, wNumBalls + dba PlaceMenuItemName + dba PlaceMenuItemQuantity + dba UpdateItemDescription + +PackNoItemText: ; unreferenced + text_far _PackNoItemText + text_end + +AskThrowAwayText: + text_far _AskThrowAwayText + text_end + +AskQuantityThrowAwayText: + text_far _AskQuantityThrowAwayText + text_end + +ThrewAwayText: + text_far _ThrewAwayText + text_end + +OakThisIsntTheTimeText: + text_far _OakThisIsntTheTimeText + text_end + +YouDontHaveAMonText: + text_far _YouDontHaveAMonText + text_end + +RegisteredItemText: + text_far _RegisteredItemText + text_end + +CantRegisterText: + text_far _CantRegisterText + text_end + +AskItemMoveText: + text_far _AskItemMoveText + text_end + +PackEmptyText: + text_far _PackEmptyText + text_end + +YouCantUseItInABattleText: ; unreferenced + text_far _YouCantUseItInABattleText + text_end + +PackMenuGFX: +INCBIN "gfx/pack/pack_menu.2bpp" +PackGFX: +INCBIN "gfx/pack/pack.2bpp" diff --git a/engine/items/pack_kris.asm b/engine/items/pack_kris.asm new file mode 100644 index 0000000..1a169ea --- /dev/null +++ b/engine/items/pack_kris.asm @@ -0,0 +1,20 @@ +DrawKrisPackGFX: + ld hl, PackFGFXPointers + add hl, de + add hl, de + ld a, [hli] + ld e, a + ld d, [hl] + ld hl, vTiles2 tile $50 + lb bc, BANK(PackFGFX), 15 + call Request2bpp + ret + +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: +INCBIN "gfx/pack/pack_f.2bpp" diff --git a/engine/items/print_item_description.asm b/engine/items/print_item_description.asm new file mode 100644 index 0000000..999c207 --- /dev/null +++ b/engine/items/print_item_description.asm @@ -0,0 +1,32 @@ +PrintItemDescription: +; Print the description for item [wCurSpecies] at de. + + ld a, [wCurSpecies] + cp TM01 + jr c, .not_a_tm + + ld [wCurItem], a + push de + farcall GetTMHMItemMove + pop hl + ld a, [wTempTMHM] + ld [wCurSpecies], a + predef PrintMoveDescription + ret + +.not_a_tm + push de + ld hl, ItemDescriptions + ld a, [wCurSpecies] + dec a + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + pop hl + jp PlaceString + +INCLUDE "data/items/descriptions.asm" diff --git a/engine/items/switch_items.asm b/engine/items/switch_items.asm new file mode 100644 index 0000000..1c55d45 --- /dev/null +++ b/engine/items/switch_items.asm @@ -0,0 +1,272 @@ +SwitchItemsInBag: + ld a, [wSwitchItem] + and a + jr z, .init + ld b, a + ld a, [wScrollingMenuCursorPosition] + inc a + cp b + jr z, .trivial + ld a, [wScrollingMenuCursorPosition] + call ItemSwitch_GetNthItem + ld a, [hl] + cp -1 + ret z + ld a, [wSwitchItem] + dec a + ld [wSwitchItem], a + call .try_combining_stacks + jp c, .combine_stacks + ld a, [wScrollingMenuCursorPosition] + ld c, a + ld a, [wSwitchItem] + cp c + jr c, .above + jr .below + +.init: + ld a, [wScrollingMenuCursorPosition] + inc a + ld [wSwitchItem], a + ret + +.trivial: + xor a + ld [wSwitchItem], a + ret + +.below: + ld a, [wSwitchItem] + call ItemSwitch_CopyItemToBuffer + ld a, [wScrollingMenuCursorPosition] + ld d, a + ld a, [wSwitchItem] + ld e, a + call ItemSwitch_GetItemOffset + push bc + ld a, [wSwitchItem] + call ItemSwitch_GetNthItem + dec hl + push hl + call ItemSwitch_GetItemFormatSize + add hl, bc + ld d, h + ld e, l + pop hl + pop bc + call ItemSwitch_BackwardsCopyBytes + ld a, [wScrollingMenuCursorPosition] + call ItemSwitch_CopyBufferToItem + xor a + ld [wSwitchItem], a + ret + +.above: + ld a, [wSwitchItem] + call ItemSwitch_CopyItemToBuffer + ld a, [wScrollingMenuCursorPosition] + ld d, a + ld a, [wSwitchItem] + ld e, a + call ItemSwitch_GetItemOffset + push bc + ld a, [wSwitchItem] + call ItemSwitch_GetNthItem + ld d, h + ld e, l + call ItemSwitch_GetItemFormatSize + add hl, bc + pop bc + call CopyBytes + ld a, [wScrollingMenuCursorPosition] + call ItemSwitch_CopyBufferToItem + xor a + ld [wSwitchItem], a + ret + +.try_combining_stacks: + ld a, [wSwitchItem] + call ItemSwitch_GetNthItem + ld d, h + ld e, l + ld a, [wScrollingMenuCursorPosition] + call ItemSwitch_GetNthItem + ld a, [de] + cp [hl] + jr nz, .no_combine + ld a, [wScrollingMenuCursorPosition] + call ItemSwitch_GetItemQuantity + cp MAX_ITEM_STACK + jr z, .no_combine + ld a, [wSwitchItem] + call ItemSwitch_GetItemQuantity + cp MAX_ITEM_STACK + jr nz, .combine +.no_combine + and a + ret +.combine + scf + ret + +.combine_stacks: + ld a, [wSwitchItem] + call ItemSwitch_GetNthItem + inc hl + push hl + ld a, [wScrollingMenuCursorPosition] + call ItemSwitch_GetNthItem + inc hl + ld a, [hl] + pop hl + add [hl] + cp MAX_ITEM_STACK + 1 + jr c, .merge_stacks + sub MAX_ITEM_STACK + push af + ld a, [wScrollingMenuCursorPosition] + call ItemSwitch_GetNthItem + inc hl + ld [hl], MAX_ITEM_STACK + ld a, [wSwitchItem] + call ItemSwitch_GetNthItem + inc hl + pop af + ld [hl], a + xor a + ld [wSwitchItem], a + ret + +.merge_stacks: + push af + ld a, [wScrollingMenuCursorPosition] + call ItemSwitch_GetNthItem + inc hl + pop af + ld [hl], a + ld hl, wMenuData_ItemsPointerAddr + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wSwitchItem] + cp [hl] + jr nz, .not_combining_last_item + dec [hl] + ld a, [wSwitchItem] + call ItemSwitch_GetNthItem + ld [hl], -1 ; end + xor a + ld [wSwitchItem], a + ret + +.not_combining_last_item: + dec [hl] + call ItemSwitch_GetItemFormatSize + push bc + ld a, [wSwitchItem] + call ItemSwitch_GetNthItem + pop bc + push hl + add hl, bc + pop de +.copy_loop + ld a, [hli] + ld [de], a + inc de + cp -1 ; end? + jr nz, .copy_loop + xor a + ld [wSwitchItem], a + ret + +ItemSwitch_CopyItemToBuffer: + call ItemSwitch_GetNthItem + ld de, wSwitchItemBuffer + call ItemSwitch_GetItemFormatSize + call CopyBytes + ret + +ItemSwitch_CopyBufferToItem: + call ItemSwitch_GetNthItem + ld d, h + ld e, l + ld hl, wSwitchItemBuffer + call ItemSwitch_GetItemFormatSize + call CopyBytes + ret + +ItemSwitch_GetNthItem: + push af + call ItemSwitch_GetItemFormatSize + ld hl, wMenuData_ItemsPointerAddr + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + pop af + call AddNTimes + ret + +ItemSwitch_GetItemOffset: + push hl + call ItemSwitch_GetItemFormatSize + ld a, d + sub e + jr nc, .dont_negate + dec a + cpl +.dont_negate + ld hl, 0 + call AddNTimes + ld b, h + ld c, l + pop hl + ret + +ItemSwitch_GetItemFormatSize: + push hl + ld a, [wMenuData_ScrollingMenuItemFormat] + ld c, a + ld b, 0 + ld hl, .item_format_sizes + add hl, bc + add hl, bc + ld c, [hl] + inc hl + ld b, [hl] + pop hl + ret + +.item_format_sizes: +; entries correspond to SCROLLINGMENU_ITEMS_* constants + dw 0 ; unused + dw 1 ; SCROLLINGMENU_ITEMS_NORMAL + dw 2 ; SCROLLINGMENU_ITEMS_QUANTITY + +ItemSwitch_GetItemQuantity: + push af + call ItemSwitch_GetItemFormatSize + ld a, c + cp 2 + jr nz, .no_quantity + pop af + call ItemSwitch_GetNthItem + inc hl + ld a, [hl] + ret + +.no_quantity + pop af + ld a, 1 + ret + +ItemSwitch_BackwardsCopyBytes: +.loop + ld a, [hld] + ld [de], a + dec de + dec bc + ld a, b + or c + jr nz, .loop + ret diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm new file mode 100644 index 0000000..d4d7d7b --- /dev/null +++ b/engine/items/tmhm.asm @@ -0,0 +1,554 @@ +TMHMPocket: + ld a, $1 + ldh [hInMenu], a + call TMHM_PocketLoop + ld a, $0 + ldh [hInMenu], a + ret nc + call PlaceHollowCursor + call WaitBGMap + ld a, [wCurItem] + dec a + ld [wCurItemQuantity], a + ld hl, wTMsHMs + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ld [wItemQuantity], a + call .ConvertItemToTMHMNumber + scf + ret + +.ConvertItemToTMHMNumber: + ld a, [wCurItem] + ld c, a + callfar GetNumberedTMHM + ld a, c + ld [wCurItem], a + ret + +ConvertCurItemIntoCurTMHM: + ld a, [wCurItem] + ld c, a + callfar GetTMHMNumber + ld a, c + ld [wTempTMHM], a + ret + +GetTMHMItemMove: + call ConvertCurItemIntoCurTMHM + predef GetTMHMMove + ret + +AskTeachTMHM: + ld hl, wOptions + ld a, [hl] + push af + res NO_TEXT_SCROLL, [hl] + ld a, [wCurItem] + cp TM01 + jr c, .NotTMHM + call GetTMHMItemMove + ld a, [wTempTMHM] + ld [wPutativeTMHMMove], a + call GetMoveName + call CopyName1 + ld hl, BootedTMText ; Booted up a TM + ld a, [wCurItem] + cp HM01 + jr c, .TM + ld hl, BootedHMText ; Booted up an HM +.TM: + call PrintText + ld hl, ContainedMoveText + call PrintText + call YesNoBox +.NotTMHM: + pop bc + ld a, b + ld [wOptions], a + ret + +ChooseMonToLearnTMHM: + ld hl, wStringBuffer2 + ld de, wTMHMMoveNameBackup + ld bc, MOVE_NAME_LENGTH - 1 + call CopyBytes + call ClearBGPalettes +ChooseMonToLearnTMHM_NoRefresh: + farcall LoadPartyMenuGFX + farcall InitPartyMenuWithCancel + farcall InitPartyMenuGFX + ld a, PARTYMENUACTION_TEACH_TMHM + ld [wPartyMenuActionText], a +.loopback + farcall WritePartyMenuTilemap + farcall PrintPartyMenuText + call WaitBGMap + call SetPalettes + call DelayFrame + farcall PartyMenuSelect + push af + ld a, [wCurPartySpecies] + cp EGG + pop bc ; now contains the former contents of af + jr z, .egg + push bc + ld hl, wTMHMMoveNameBackup + ld de, wStringBuffer2 + ld bc, MOVE_NAME_LENGTH - 1 + call CopyBytes + pop af ; now contains the original contents of af + ret + +.egg + push hl + push de + push bc + push af + ld de, SFX_WRONG + call PlaySFX + call WaitSFX + pop af + pop bc + pop de + pop hl + jr .loopback + +TeachTMHM: + predef CanLearnTMHMMove + + push bc + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames + call GetNickname + pop bc + + ld a, c + and a + jr nz, .compatible + push de + ld de, SFX_WRONG + call PlaySFX + pop de + ld hl, TMHMNotCompatibleText + call PrintText + jr .nope + +.compatible + callfar KnowsMove + jr c, .nope + + predef LearnMove + ld a, b + and a + jr z, .nope + + farcall StubbedTrainerRankings_TMsHMsTaught + ld a, [wCurItem] + call IsHM + ret c + + ld c, HAPPINESS_LEARNMOVE + callfar ChangeHappiness + call ConsumeTM + jr .learned_move + +.nope + and a + ret + +.didnt_use ; unreferenced + ld a, 2 + ld [wItemEffectSucceeded], a +.learned_move + scf + ret + +BootedTMText: + text_far _BootedTMText + text_end + +BootedHMText: + text_far _BootedHMText + text_end + +ContainedMoveText: + text_far _ContainedMoveText + text_end + +TMHMNotCompatibleText: + text_far _TMHMNotCompatibleText + text_end + +TMHM_PocketLoop: + xor a + ldh [hBGMapMode], a + call TMHM_DisplayPocketItems + ld a, 2 + ld [w2DMenuCursorInitY], a + ld a, 7 + ld [w2DMenuCursorInitX], a + ld a, 1 + ld [w2DMenuNumCols], a + ld a, 5 + sub d + inc a + cp 6 + jr nz, .okay + dec a +.okay + ld [w2DMenuNumRows], a + ld a, $c + ld [w2DMenuFlags1], a + xor a + ld [w2DMenuFlags2], a + ld a, $20 + ld [w2DMenuCursorOffsets], a + ld a, A_BUTTON | B_BUTTON | D_UP | D_DOWN | D_LEFT | D_RIGHT + ld [wMenuJoypadFilter], a + ld a, [wTMHMPocketCursor] + inc a + ld [wMenuCursorY], a + ld a, $1 + ld [wMenuCursorX], a + jr TMHM_ShowTMMoveDescription + +TMHM_JoypadLoop: + call TMHM_DisplayPocketItems + call StaticMenuJoypad + ld b, a + ld a, [wMenuCursorY] + dec a + ld [wTMHMPocketCursor], a + xor a + ldh [hBGMapMode], a + ld a, [w2DMenuFlags2] + bit 7, a + jp nz, TMHM_ScrollPocket + ld a, b + ld [wMenuJoypad], a + bit A_BUTTON_F, a + jp nz, TMHM_ChooseTMorHM + bit B_BUTTON_F, a + jp nz, TMHM_ExitPack + bit D_RIGHT_F, a + jp nz, TMHM_ExitPocket + bit D_LEFT_F, a + jp nz, TMHM_ExitPocket +TMHM_ShowTMMoveDescription: + call TMHM_CheckHoveringOverCancel + jp nc, TMHM_ExitPocket + hlcoord 0, 12 + ld b, 4 + ld c, SCREEN_WIDTH - 2 + call Textbox + ld a, [wCurItem] + cp NUM_TMS + NUM_HMS + 1 + jr nc, TMHM_JoypadLoop + ld [wTempTMHM], a + predef GetTMHMMove + ld a, [wTempTMHM] + ld [wCurSpecies], a + hlcoord 1, 14 + call PrintMoveDescription + jp TMHM_JoypadLoop + +TMHM_ChooseTMorHM: + call TMHM_PlaySFX_ReadText2 + call CountTMsHMs ; This stores the count to wTempTMHM. + ld a, [wMenuCursorY] + dec a + ld b, a + ld a, [wTMHMPocketScrollPosition] + add b + ld b, a + ld a, [wTempTMHM] + cp b + jr z, _TMHM_ExitPack ; our cursor was hovering over CANCEL +TMHM_CheckHoveringOverCancel: + call TMHM_GetCurrentPocketPosition + ld a, [wMenuCursorY] + ld b, a +.loop + inc c + ld a, c + cp NUM_TMS + NUM_HMS + 1 + jr nc, .okay + ld a, [hli] + and a + jr z, .loop + dec b + jr nz, .loop + ld a, c +.okay + ld [wCurItem], a + cp -1 + ret + +TMHM_ExitPack: + call TMHM_PlaySFX_ReadText2 +_TMHM_ExitPack: + ld a, B_BUTTON + ld [wMenuJoypad], a + and a + ret + +TMHM_ExitPocket: + and a + ret + +TMHM_ScrollPocket: + ld a, b + bit 7, a + jr nz, .skip + ld hl, wTMHMPocketScrollPosition + ld a, [hl] + and a + jp z, TMHM_JoypadLoop + dec [hl] + call TMHM_DisplayPocketItems + jp TMHM_ShowTMMoveDescription + +.skip + call TMHM_GetCurrentPocketPosition + ld b, 5 +.loop + inc c + ld a, c + cp NUM_TMS + NUM_HMS + 1 + jp nc, TMHM_JoypadLoop + ld a, [hli] + and a + jr z, .loop + dec b + jr nz, .loop + ld hl, wTMHMPocketScrollPosition + inc [hl] + call TMHM_DisplayPocketItems + jp TMHM_ShowTMMoveDescription + +TMHM_DisplayPocketItems: + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL + jp z, Tutorial_TMHMPocket + + hlcoord 5, 2 + lb bc, 10, 15 + ld a, " " + call ClearBox + call TMHM_GetCurrentPocketPosition + ld d, $5 +.loop2 + inc c + ld a, c + cp NUM_TMS + NUM_HMS + 1 + jr nc, .NotTMHM + ld a, [hli] + and a + jr z, .loop2 + ld b, a + ld a, c + ld [wTempTMHM], a + push hl + push de + push bc + call TMHMPocket_GetCurrentLineCoord + push hl + ld a, [wTempTMHM] + cp NUM_TMS + 1 + jr nc, .HM + ld de, wTempTMHM + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + jr .okay + +.HM: + push af + sub NUM_TMS + ld [wTempTMHM], a + ld [hl], "H" + inc hl + ld de, wTempTMHM + lb bc, PRINTNUM_LEFTALIGN | 1, 2 + call PrintNum + pop af + ld [wTempTMHM], a +.okay + predef GetTMHMMove + ld a, [wNamedObjectIndex] + ld [wPutativeTMHMMove], a + call GetMoveName + pop hl + ld bc, 3 + add hl, bc + push hl + call PlaceString + pop hl + pop bc + ld a, c + push bc + cp NUM_TMS + 1 + jr nc, .hm2 + ld bc, SCREEN_WIDTH + 9 + add hl, bc + ld [hl], "×" + inc hl + ld a, "0" ; why are we doing this? + pop bc + push bc + ld a, b + ld [wTempTMHM], a + ld de, wTempTMHM + lb bc, 1, 2 + call PrintNum +.hm2 + pop bc + pop de + pop hl + dec d + jr nz, .loop2 + jr .done + +.NotTMHM: + call TMHMPocket_GetCurrentLineCoord + inc hl + inc hl + inc hl + push de + ld de, TMHM_CancelString + call PlaceString + pop de +.done + ret + +TMHMPocket_GetCurrentLineCoord: + hlcoord 5, 0 + ld bc, 2 * SCREEN_WIDTH + ld a, 6 + sub d + ld e, a + ; AddNTimes +.loop + add hl, bc + dec e + jr nz, .loop + ret + +PlaceMoveNameAfterTMHMName: ; unreferenced +; Similar to a part of TMHM_DisplayPocketItems. + pop hl + ld bc, 3 + add hl, bc + predef GetTMHMMove + ld a, [wTempTMHM] + ld [wPutativeTMHMMove], a + call GetMoveName + push hl + call PlaceString + pop hl + ret + +TMHM_CancelString: + db "CANCEL@" + +TMHM_GetCurrentPocketPosition: + ld hl, wTMsHMs + ld a, [wTMHMPocketScrollPosition] + ld b, a + inc b + ld c, 0 +.loop + inc c + ld a, [hli] + and a + jr z, .loop + dec b + jr nz, .loop + dec hl + dec c + ret + +Tutorial_TMHMPocket: + hlcoord 9, 3 + push de + ld de, TMHM_CancelString + call PlaceString + pop de + ret + +TMHM_PlaySFX_ReadText2: + push de + ld de, SFX_READ_TEXT_2 + call PlaySFX + pop de + ret + +VerboseReceiveTMHM: ; unreferenced + call ConvertCurItemIntoCurTMHM + call .CheckHaveRoomForTMHM + ld hl, .NoRoomTMHMText + jr nc, .print + ld hl, .ReceivedTMHMText +.print + jp PrintText + +.NoRoomTMHMText: + text_far _NoRoomTMHMText + text_end + +.ReceivedTMHMText: + text_far _ReceivedTMHMText + text_end + +.CheckHaveRoomForTMHM: + ld a, [wTempTMHM] + dec a + ld hl, wTMsHMs + ld b, 0 + ld c, a + add hl, bc + ld a, [hl] + inc a + cp MAX_ITEM_STACK + 1 + ret nc + ld [hl], a + ret + +ConsumeTM: + call ConvertCurItemIntoCurTMHM + ld a, [wTempTMHM] + dec a + ld hl, wTMsHMs + ld b, 0 + ld c, a + add hl, bc + ld a, [hl] + and a + ret z + dec a + ld [hl], a + ret nz + ld a, [wTMHMPocketScrollPosition] + and a + ret z + dec a + ld [wTMHMPocketScrollPosition], a + ret + +CountTMsHMs: + ld b, 0 + ld c, NUM_TMS + NUM_HMS + ld hl, wTMsHMs +.loop + ld a, [hli] + and a + jr z, .skip + inc b +.skip + dec c + jr nz, .loop + ld a, b + ld [wTempTMHM], a + ret diff --git a/engine/items/tmhm2.asm b/engine/items/tmhm2.asm new file mode 100644 index 0000000..33a9650 --- /dev/null +++ b/engine/items/tmhm2.asm @@ -0,0 +1,57 @@ +CanLearnTMHMMove: + ld a, [wCurPartySpecies] + ld [wCurSpecies], a + call GetBaseData + ld hl, wBaseTMHM + push hl + + ld a, [wPutativeTMHMMove] + call GetMoveIndexFromID + ld b, h + ld c, l + ld hl, TMHMMoves +.loop + ld a, [hli] + or [hl] + jr z, .end + dec hl + ld a, [hli] + cp c + ld a, [hli] + jr nz, .loop + cp b + jr nz, .loop + + ld a, l + sub LOW(TMHMMoves + 2) + rrca + ld c, a + pop hl + ld b, CHECK_FLAG + push de + ld d, 0 + predef SmallFarFlagAction + pop de + ret + +.end + pop hl + ld c, 0 + ret + +GetTMHMMove: + ld a, [wTempTMHM] + dec a + add a, a + ld hl, TMHMMoves + ld b, 0 + ld c, a + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + call GetMoveIDFromIndex + ld [wTempTMHM], a + ret + +INCLUDE "data/moves/tmhm_moves.asm" diff --git a/engine/items/update_item_description.asm b/engine/items/update_item_description.asm new file mode 100644 index 0000000..da56732 --- /dev/null +++ b/engine/items/update_item_description.asm @@ -0,0 +1,13 @@ +UpdateItemDescription: + ld a, [wMenuSelection] + ld [wCurSpecies], a + hlcoord 0, 12 + ld b, 4 + ld c, SCREEN_WIDTH - 2 + call Textbox + ld a, [wMenuSelection] + cp -1 + ret z + decoord 1, 14 + farcall PrintItemDescription + ret diff --git a/engine/link/init_list.asm b/engine/link/init_list.asm new file mode 100644 index 0000000..40fbdef --- /dev/null +++ b/engine/link/init_list.asm @@ -0,0 +1,46 @@ +InitList: +; This entire function is useless. + ld a, [wInitListType] + + cp INIT_ENEMYOT_LIST + jr nz, .check_party_ot_name + ld hl, wOTPartyCount + ld a, ENEMY_OT_NAME + jr .done + +.check_party_ot_name + cp INIT_PLAYEROT_LIST + jr nz, .check_mon_name + ld hl, wPartyCount + ld a, PARTY_OT_NAME + jr .done + +.check_mon_name + cp INIT_MON_LIST + jr nz, .check_item_name + ld hl, wCurMartCount + ld a, MON_NAME + jr .done + +.check_item_name + cp INIT_BAG_ITEM_LIST + jr nz, .check_ob_item_name + ld hl, wNumItems + ld a, ITEM_NAME + jr .done + +.check_ob_item_name + ld hl, wCurMartCount + ld a, ITEM_NAME +.done + ld [wNamedObjectType], a + ld a, l + ld [wListPointer], a + ld a, h + ld [wListPointer + 1], a + ld bc, ItemAttributes + ld a, c + ld [wItemAttributesPointer], a + ld a, b + ld [wItemAttributesPointer + 1], a + ret diff --git a/engine/link/link.asm b/engine/link/link.asm new file mode 100644 index 0000000..7850b1d --- /dev/null +++ b/engine/link/link.asm @@ -0,0 +1,3044 @@ +LinkCommunications: + call ClearBGPalettes + ld c, 80 + call DelayFrames + call ClearScreen + call ClearSprites + call UpdateSprites + xor a + ldh [hSCX], a + ldh [hSCY], a + ld c, 80 + call DelayFrames + call ClearScreen + call UpdateSprites + call LoadStandardFont + call LoadFontsBattleExtra + farcall LinkComms_LoadPleaseWaitTextboxBorderGFX + call WaitBGMap2 + hlcoord 3, 8 + ld b, 2 + ld c, 12 + ld d, h + ld e, l + farcall LinkTextbox2 + hlcoord 4, 10 + ld de, String_PleaseWait + call PlaceString + call SetTradeRoomBGPals + call WaitBGMap2 + ld hl, wLinkByteTimeout + assert LOW(SERIAL_LINK_BYTE_TIMEOUT) == 0 + xor a ; LOW(SERIAL_LINK_BYTE_TIMEOUT) + ld [hli], a + ld [hl], HIGH(SERIAL_LINK_BYTE_TIMEOUT) + ld a, [wLinkMode] + cp LINK_TIMECAPSULE + jp nz, Gen2ToGen2LinkComms + +Gen2ToGen1LinkComms: + call ClearLinkData + call Link_PrepPartyData_Gen1 + call FixDataForLinkTransfer + xor a + ld [wPlayerLinkAction], a + call WaitLinkTransfer + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr nz, .player_1 + + ld c, 3 + call DelayFrames + xor a + ldh [hSerialSend], a + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + + call DelayFrame + xor a + ldh [hSerialSend], a + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + +.player_1 + ld de, MUSIC_NONE + call PlayMusic + vc_patch Wireless_net_delay_5 +if DEF(_CRYSTAL_VC) + ld c, 26 +else + ld c, 3 +endc + vc_patch_end + call DelayFrames + xor a + ldh [rIF], a + ld a, 1 << SERIAL + ldh [rIE], a + + ld hl, wLinkBattleRNPreamble + ld de, wEnemyMon + ld bc, SERIAL_RN_PREAMBLE_LENGTH + SERIAL_RNS_LENGTH + vc_hook Wireless_ExchangeBytes_Gen2toGen1_RNG_state + call Serial_ExchangeBytes + ld a, SERIAL_NO_DATA_BYTE + ld [de], a + + ld hl, wLinkData + ld de, wOTPartyData + ld bc, SERIAL_PREAMBLE_LENGTH + NAME_LENGTH + (1 + PARTY_LENGTH + 1) + (REDMON_STRUCT_LENGTH + NAME_LENGTH * 2) * PARTY_LENGTH + 3 + vc_hook Wireless_ExchangeBytes_Gen2toGen1_party_structs + call Serial_ExchangeBytes + ld a, SERIAL_NO_DATA_BYTE + ld [de], a + + ld hl, wPlayerPatchLists + ld de, wOTPatchLists + ld bc, SERIAL_PATCH_LIST_LENGTH + vc_hook Wireless_ExchangeBytes_Gen2toGen1_patch_lists + call Serial_ExchangeBytes + + xor a + ldh [rIF], a + ld a, (1 << JOYPAD) | (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) + ldh [rIE], a + + call Link_CopyRandomNumbers + + ld hl, wOTPartyData + call Link_FindFirstNonControlCharacter_SkipZero + push hl + ld bc, NAME_LENGTH + add hl, bc + ld a, [hl] + pop hl + and a + jp z, ExitLinkCommunications + cp $7 + jp nc, ExitLinkCommunications + + ld de, wLinkData + ld bc, NAME_LENGTH + (1 + PARTY_LENGTH + 1) + (REDMON_STRUCT_LENGTH + NAME_LENGTH * 2) * PARTY_LENGTH + 3 + call Link_CopyOTData + + ld de, wOTPatchLists + ld hl, wTimeCapsulePlayerData + ld c, 2 +.loop + ld a, [de] + inc de + and a + jr z, .loop + cp SERIAL_PREAMBLE_BYTE + jr z, .loop + cp SERIAL_NO_DATA_BYTE + jr z, .loop + cp SERIAL_PATCH_LIST_PART_TERMINATOR + jr z, .next + push hl + push bc + ld b, 0 + dec a + ld c, a + add hl, bc + ld a, SERIAL_NO_DATA_BYTE + ld [hl], a + pop bc + pop hl + jr .loop + +.next + ld hl, wTimeCapsulePlayerData + SERIAL_PATCH_DATA_SIZE + dec c + jr nz, .loop + + ld hl, wLinkData + ld de, wOTPlayerName + ld bc, NAME_LENGTH + call CopyBytes + + ld de, wOTPartyCount + ld a, [hli] + ld [de], a + inc de + +.party_loop + ld a, [hli] + cp -1 + jr z, .done_party + ld [wTempSpecies], a + push hl + push de + callfar ConvertMon_1to2 + pop de + ld a, [wTempSpecies] + ld l, a + ld h, 0 + call GetPokemonIDFromIndex + pop hl + ld [de], a + inc de + jr .party_loop + +.done_party + ld [de], a + ld hl, wTimeCapsulePlayerData + call Link_ConvertPartyStruct1to2 + + ld a, LOW(wOTPartyMonOTs) + ld [wUnusedNamesPointer], a + ld a, HIGH(wOTPartyMonOTs) + ld [wUnusedNamesPointer + 1], a + + ld de, MUSIC_NONE + call PlayMusic + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + ld c, 66 + call z, DelayFrames + ld de, MUSIC_ROUTE_30 + call PlayMusic + jp InitTradeMenuDisplay + +Gen2ToGen2LinkComms: + call ClearLinkData + call Link_PrepPartyData_Gen2 + call FixDataForLinkTransfer + call CheckLinkTimeout_Gen2 + ld a, [wScriptVar] + and a + jp z, LinkTimeout + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr nz, .player_1 + + ld c, 3 + call DelayFrames + xor a + ldh [hSerialSend], a + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + + call DelayFrame + xor a + ldh [hSerialSend], a + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + +.player_1 + ld de, MUSIC_NONE + call PlayMusic + vc_patch Wireless_net_delay_8 +if DEF(_CRYSTAL_VC) + ld c, 26 +else + ld c, 3 +endc + vc_patch_end + call DelayFrames + xor a + ldh [rIF], a + ld a, 1 << SERIAL + ldh [rIE], a + + ld hl, wLinkBattleRNPreamble + ld de, wOTLinkBattleRNData + ld bc, SERIAL_RN_PREAMBLE_LENGTH + SERIAL_RNS_LENGTH + vc_hook Wireless_ExchangeBytes_RNG_state + call Serial_ExchangeBytes + ld a, SERIAL_NO_DATA_BYTE + ld [de], a + ld hl, wOTPartyMons + ld de, wStringBuffer1 + ; 6 preamble bytes, 2 replacement bytes, 1 stop byte, and 6 extra just in case + ld bc, 2 * (1 + NUM_MOVES) * PARTY_LENGTH + 15 + vc_hook Wireless_ExchangeBytes_party_mons + call Serial_ExchangeBytes + ld hl, wLinkData + ld de, wOTPartyData + ld bc, SERIAL_PREAMBLE_LENGTH + NAME_LENGTH + (1 + PARTY_LENGTH + 1) + 2 + (PARTYMON_STRUCT_LENGTH + NAME_LENGTH * 2) * PARTY_LENGTH + 3 + vc_hook Wireless_ExchangeBytes_party_structs + call Serial_ExchangeBytes + ld a, SERIAL_NO_DATA_BYTE + ld [de], a + + ld hl, wPlayerPatchLists + ld de, wOTPatchLists + ld bc, SERIAL_PATCH_LIST_LENGTH + vc_hook Wireless_ExchangeBytes_patch_lists + call Serial_ExchangeBytes + + ld a, [wLinkMode] + cp LINK_TRADECENTER + jr nz, .not_trading + ld hl, wLinkPlayerMail + ld de, wLinkOTMail + ld bc, wLinkPlayerMailEnd - wLinkPlayerMail + vc_hook Wireless_ExchangeBytes_mail + call ExchangeBytes +.not_trading + + xor a + ldh [rIF], a + ld a, (1 << JOYPAD) | (1 << SERIAL) | (1 << TIMER) | (1 << VBLANK) + ldh [rIE], a + ld de, MUSIC_NONE + call PlayMusic + + call Link_CopyRandomNumbers + + ld hl, wOTPartyData + call Link_FindFirstNonControlCharacter_SkipZero + ld de, wLinkData + ld bc, NAME_LENGTH + 1 + PARTY_LENGTH + 1 + 2 + (PARTYMON_STRUCT_LENGTH + NAME_LENGTH * 2) * PARTY_LENGTH + call Link_CopyOTData + + ld de, wOTPatchLists + ld hl, wLinkPlayerData + ld c, 2 +.loop1 + ld a, [de] + inc de + and a + jr z, .loop1 + cp SERIAL_PREAMBLE_BYTE + jr z, .loop1 + cp SERIAL_NO_DATA_BYTE + jr z, .loop1 + cp SERIAL_PATCH_LIST_PART_TERMINATOR + jr z, .next1 + push hl + push bc + ld b, 0 + dec a + ld c, a + add hl, bc + ld a, SERIAL_NO_DATA_BYTE + ld [hl], a + pop bc + pop hl + jr .loop1 + +.next1 + ld hl, wLinkPlayerData + SERIAL_PATCH_DATA_SIZE + dec c + jr nz, .loop1 + + ld a, [wLinkMode] + cp LINK_TRADECENTER + jp nz, .skip_mail + ld hl, wLinkOTMail +.loop2 + ld a, [hli] + cp SERIAL_MAIL_PREAMBLE_BYTE + jr nz, .loop2 +.loop3 + ld a, [hli] + cp SERIAL_NO_DATA_BYTE + jr z, .loop3 + cp SERIAL_MAIL_PREAMBLE_BYTE + jr z, .loop3 + dec hl + + ld de, wLinkOTMail + ld bc, wLinkDataEnd - wLinkOTMail ; should be wLinkOTMailEnd - wLinkOTMail + call CopyBytes + +; Replace SERIAL_MAIL_REPLACEMENT_BYTE with SERIAL_NO_DATA_BYTE across all mail +; message bodies. + ld hl, wLinkOTMailMessages + ld bc, (MAIL_MSG_LENGTH + 1) * PARTY_LENGTH +.loop4 + ld a, [hl] + cp SERIAL_MAIL_REPLACEMENT_BYTE + jr nz, .okay1 + ld [hl], SERIAL_NO_DATA_BYTE +.okay1 + inc hl + dec bc + ld a, b + or c + jr nz, .loop4 + + ld de, wLinkOTMailPatchSet +.loop5 + ld a, [de] + inc de + cp SERIAL_PATCH_LIST_PART_TERMINATOR + jr z, .start_copying_mail + ld hl, wLinkOTMailMetadata + dec a + ld b, 0 + ld c, a + add hl, bc + ld [hl], SERIAL_NO_DATA_BYTE + jr .loop5 + +.start_copying_mail + ld hl, wLinkOTMail + ld de, wLinkReceivedMail + ld b, PARTY_LENGTH +.copy_mail_loop + push bc + ld bc, MAIL_MSG_LENGTH + 1 + call CopyBytes + ld a, LOW(MAIL_STRUCT_LENGTH - (MAIL_MSG_LENGTH + 1)) + add e + ld e, a + ld a, HIGH(MAIL_STRUCT_LENGTH - (MAIL_MSG_LENGTH + 1)) + adc d + ld d, a + pop bc + dec b + jr nz, .copy_mail_loop + ld de, wLinkReceivedMail + ld b, PARTY_LENGTH +.copy_author_loop + push bc + ld a, LOW(MAIL_MSG_LENGTH + 1) + add e + ld e, a + ld a, HIGH(MAIL_MSG_LENGTH + 1) + adc d + ld d, a + ld bc, MAIL_STRUCT_LENGTH - (MAIL_MSG_LENGTH + 1) + call CopyBytes + pop bc + dec b + jr nz, .copy_author_loop + ld b, PARTY_LENGTH + ld de, wLinkReceivedMail +.fix_mail_loop + push bc + push de + farcall ParseMailLanguage + ld a, c + or a + jr z, .next + sub $3 + jr nc, .skip + farcall ConvertEnglishMailToFrenchGerman + jr .next + +.skip + cp $2 + jr nc, .next + farcall ConvertEnglishMailToSpanishItalian + +.next + pop de + ld hl, MAIL_STRUCT_LENGTH + add hl, de + ld d, h + ld e, l + pop bc + dec b + jr nz, .fix_mail_loop + ld de, wLinkReceivedMailEnd + xor a + ld [de], a + +.skip_mail + ld hl, wLinkData + ld de, wOTPlayerName + ld bc, NAME_LENGTH + call CopyBytes + + ld de, wOTPartyCount + ld bc, 1 + PARTY_LENGTH + 1 + call CopyBytes + + ld de, wOTPlayerID + ld bc, 2 + call CopyBytes + + ld de, wOTPartyMons + ld bc, wOTPartyDataEnd - wOTPartyMons + call CopyBytes + call Link_FixOTParty_Gen2 + jp c, LinkTimeout ;we got garbage, so just pretend we're disconnected + ld a, LOW(wOTPartyMonOTs) + ld [wUnusedNamesPointer], a + ld a, HIGH(wOTPartyMonOTs) + ld [wUnusedNamesPointer + 1], a + + ld de, MUSIC_NONE + call PlayMusic + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + ld c, 66 + call z, DelayFrames + ld a, [wLinkMode] + cp LINK_COLOSSEUM + jr nz, .ready_to_trade + ld a, CAL + ld [wOtherTrainerClass], a + call ClearScreen + farcall Link_WaitBGMap + + ld hl, wOptions + ld a, [hl] + push af + and 1 << STEREO + or TEXT_DELAY_MED + ld [hl], a + ld hl, wOTPlayerName + ld de, wOTClassName + ld bc, NAME_LENGTH + call CopyBytes + call ReturnToMapFromSubmenu + ld a, [wDisableTextAcceleration] + push af + ld a, 1 + ld [wDisableTextAcceleration], a + ldh a, [rIE] + push af + ldh a, [rIF] + push af + xor a + ldh [rIF], a + ldh a, [rIE] + set LCD_STAT, a + ldh [rIE], a + pop af + ldh [rIF], a + + ; LET'S DO THIS + predef StartBattle + + ldh a, [rIF] + ld h, a + xor a + ldh [rIF], a + pop af + ldh [rIE], a + ld a, h + ldh [rIF], a + pop af + ld [wDisableTextAcceleration], a + pop af + ld [wOptions], a + + farcall LoadPokemonData + jp ExitLinkCommunications + +.ready_to_trade + ld de, MUSIC_ROUTE_30 + call PlayMusic + jp InitTradeMenuDisplay + +LinkTimeout: + ld de, .LinkTimeoutText + ld b, 10 +.loop + call DelayFrame + call LinkDataReceived + dec b + jr nz, .loop + xor a + ld [hld], a + ld [hl], a + ldh [hVBlank], a + push de + hlcoord 0, 12 + ld b, 4 + ld c, 18 + push de + ld d, h + ld e, l + farcall LinkTextbox2 + pop de + pop hl + bccoord 1, 14 + call PlaceHLTextAtBC + call RotateThreePalettesRight + call ClearScreen + ld b, SCGB_DIPLOMA + call GetSGBLayout + call WaitBGMap2 + ret + +.LinkTimeoutText: + text_far _LinkTimeoutText + text_end + +ExchangeBytes: +; This is similar to Serial_ExchangeBytes, +; but without a SERIAL_PREAMBLE_BYTE check. + ld a, TRUE + ldh [hSerialIgnoringInitialData], a +.loop + ld a, [hl] + ldh [hSerialSend], a + call Serial_ExchangeByte + push bc + ld b, a + inc hl + ld a, 48 +.wait + dec a + jr nz, .wait + ldh a, [hSerialIgnoringInitialData] + and a + ld a, b + pop bc + jr z, .load + dec hl + xor a + ldh [hSerialIgnoringInitialData], a + jr .loop + +.load + ld [de], a + inc de + dec bc + ld a, b + or c + jr nz, .loop + ret + +String_PleaseWait: + db "PLEASE WAIT!@" + +ClearLinkData: + ld hl, wLinkData + ld bc, wLinkDataEnd - wLinkData +.loop + xor a + ld [hli], a + dec bc + ld a, b + or c + jr nz, .loop + ret + +FixDataForLinkTransfer: + ld hl, wLinkBattleRNPreamble + ld a, SERIAL_PREAMBLE_BYTE + ld b, SERIAL_RN_PREAMBLE_LENGTH +.preamble_loop + ld [hli], a + dec b + jr nz, .preamble_loop + +; Initialize random seed, making sure special bytes are omitted + assert wLinkBattleRNPreamble + SERIAL_RN_PREAMBLE_LENGTH == wLinkBattleRNs + ld b, SERIAL_RNS_LENGTH +.rn_loop + call Random + cp SERIAL_PREAMBLE_BYTE + jr nc, .rn_loop + ld [hli], a + dec b + jr nz, .rn_loop + +; Clear the patch list + ld hl, wPlayerPatchLists + ld a, SERIAL_PREAMBLE_BYTE +rept SERIAL_PATCH_PREAMBLE_LENGTH + ld [hli], a +endr + ld b, SERIAL_PATCH_LIST_LENGTH + xor a +.clear_loop + ld [hli], a + dec b + jr nz, .clear_loop + +; Loop through all the patchable link data + ld hl, wLinkData + SERIAL_PREAMBLE_LENGTH + NAME_LENGTH + (1 + PARTY_LENGTH + 1) - 1 + ld de, wPlayerPatchLists + SERIAL_RNS_LENGTH ; ??? + lb bc, 0, 0 +.patch_loop +; Check if we've gone over the entire area + inc c + ld a, c + cp SERIAL_PATCH_DATA_SIZE + 1 + jr z, .data1_done + +; If we're processing the second patch area, check if we've reached the end + ld a, b + dec a + jr nz, .process + push bc + ld a, [wLinkMode] + cp LINK_TIMECAPSULE + ld b, REDMON_STRUCT_LENGTH * PARTY_LENGTH - SERIAL_PATCH_DATA_SIZE + 1 + jr z, .got_size + ld b, 2 + PARTYMON_STRUCT_LENGTH * PARTY_LENGTH - SERIAL_PATCH_DATA_SIZE + 1 +.got_size + ld a, c + cp b + pop bc + jr z, .data2_done + +.process +; Replace the "no data" byte, and record it in the array + inc hl + ld a, [hl] + cp SERIAL_NO_DATA_BYTE + jr nz, .patch_loop + ld a, c + ld [de], a + inc de + ld [hl], SERIAL_PATCH_REPLACEMENT_BYTE + jr .patch_loop + +.data1_done + ld a, SERIAL_PATCH_LIST_PART_TERMINATOR + ld [de], a + inc de + lb bc, 1, 0 + jr .patch_loop + +.data2_done + ld a, SERIAL_PATCH_LIST_PART_TERMINATOR + ld [de], a + ret + +Link_PrepPartyData_Gen1: + ld de, wLinkData + ld a, SERIAL_PREAMBLE_BYTE + ld b, SERIAL_PREAMBLE_LENGTH +.loop1 + ld [de], a + inc de + dec b + jr nz, .loop1 + + ld hl, wPlayerName + ld bc, NAME_LENGTH + call CopyBytes + + push de + ld hl, wPartyCount + ld a, [hli] + ld [de], a + inc de +.loop2 + ld a, [hli] + cp -1 + jr z, .done_party + push hl + push de + call GetPokemonIndexFromID + xor a + cp h + sbc a + or l + ld [wTempSpecies], a + callfar ConvertMon_2to1 + pop de + pop hl + ld a, [wTempSpecies] + ld [de], a + inc de + jr .loop2 +.done_party + ld [de], a + pop de + ld hl, 1 + PARTY_LENGTH + 1 + add hl, de + + ld d, h + ld e, l + ld hl, wPartyMon1Species + ld c, PARTY_LENGTH +.mon_loop + push bc + call .ConvertPartyStruct2to1 + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop bc + dec c + jr nz, .mon_loop + + ld hl, wPartyMonOTs + call .copy_ot_nicks + + ld hl, wPartyMonNicknames +.copy_ot_nicks + ld bc, PARTY_LENGTH * NAME_LENGTH + jp CopyBytes + +.ConvertPartyStruct2to1: + ld b, h + ld c, l + push de + push bc + ld a, [hl] + call GetPokemonIndexFromID + xor a + cp h + sbc a + or l + ld [wTempSpecies], a + callfar ConvertMon_2to1 + pop bc + pop de + ld a, [wTempSpecies] + ld [de], a + inc de + ld hl, MON_HP + add hl, bc + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + inc de + xor a + ld [de], a + inc de + ld hl, MON_STATUS + add hl, bc + ld a, [hl] + ld [de], a + inc de + ld a, [bc] + call GetPokemonIndexFromID + push bc + ld bc, MAGNEMITE + call .compare + if MAGNETON == (MAGNEMITE + 1) + inc bc + else + ld bc, MAGNETON + endc + call nz, .compare + jr nz, .skip_steel + ld a, ELECTRIC + ld [de], a + inc de + ld [de], a + inc de + jr .done_steel + +.skip_steel + ld b, h + ld c, l + ld hl, BaseData + ld a, BANK(BaseData) + call LoadIndirectPointer + ld bc, BASE_TYPES + add hl, bc + ld c, BASE_CATCH_RATE - BASE_TYPES + call nz, FarCopyBytes + +.done_steel + pop bc + ld hl, MON_ITEM + add hl, bc + push bc + ld a, [hli] + ld [de], a + inc de + ld b, NUM_MOVES +.move_loop + ld a, [hli] + push hl + call GetMoveIndexFromID + ld a, h + sub 1 + sbc a + and l + pop hl + ld [de], a + inc de + dec b + jr nz, .move_loop + ld c, MON_HAPPINESS - MON_ID + call CopyBytes + pop bc + + ld hl, MON_LEVEL + add hl, bc + ld a, [hl] + ld [de], a + ld [wCurPartyLevel], a + inc de + + push bc + ld hl, MON_MAXHP + add hl, bc + ld bc, MON_SAT - MON_MAXHP + call CopyBytes + pop bc + + push de + push bc + + ld a, [bc] + push bc + call GetPokemonIndexFromID + ld bc, KantoMonSpecials - 1 + add hl, bc + ld a, BANK(KantoMonSpecials) + call GetFarByte + ld [wBaseSpecialAttack], a + pop bc + + ld hl, MON_STAT_EXP - 1 + add hl, bc + ld c, STAT_SATK + ld b, TRUE + predef CalcMonStatC + + pop bc + pop de + + ldh a, [hQuotient + 2] + ld [de], a + inc de + ldh a, [hQuotient + 3] + ld [de], a + inc de + ld h, b + ld l, c + ret + +.compare + ld a, h + cp b + ret nz + ld a, l + cp c + ret + +Link_PrepPartyData_Gen2: + ld de, wLinkData + ld a, SERIAL_PREAMBLE_BYTE + ld b, SERIAL_PREAMBLE_LENGTH +.preamble_loop + ld [de], a + inc de + dec b + jr nz, .preamble_loop + + ld hl, wPlayerName + ld bc, NAME_LENGTH + call CopyBytes + + ld hl, wPartyCount + ld bc, 1 + PARTY_LENGTH + 1 + call CopyBytes + + ld hl, wPlayerID + ld bc, 2 + call CopyBytes + + ld hl, wPartyMon1Species + ld bc, PARTY_LENGTH * PARTYMON_STRUCT_LENGTH + call CopyBytes + + ld hl, wPartyMonOTs + ld bc, PARTY_LENGTH * NAME_LENGTH + call CopyBytes + + ld hl, wPartyMonNicknames + ld bc, PARTY_LENGTH * MON_NAME_LENGTH + call CopyBytes + ; just use the wOTPartyMons area as staging for this + ld de, wOTPartyMons + ld a, SERIAL_PREAMBLE_BYTE + ld b, 6 +.index_list_preamble_fill + ld [de], a + inc de + dec b + jr nz, .index_list_preamble_fill + call Link_BuildIndexList + +; Okay, we did all that. Now, are we in the trade center? + ld a, [wLinkMode] + cp LINK_TRADECENTER + ret nz + +; Fill 5 bytes at wLinkPlayerMailPreamble with $20 + ld de, wLinkPlayerMail + ld a, SERIAL_MAIL_PREAMBLE_BYTE + call Link_CopyMailPreamble + +; Copy all the mail messages to wLinkPlayerMailMessages + ld a, BANK(sPartyMail) + call OpenSRAM + ld hl, sPartyMail + ld b, PARTY_LENGTH +.message_loop + push bc + ld bc, MAIL_MSG_LENGTH + 1 + call CopyBytes + ld bc, MAIL_STRUCT_LENGTH - (MAIL_MSG_LENGTH + 1) + add hl, bc + pop bc + dec b + jr nz, .message_loop + +; Copy the mail data to wLinkPlayerMailMetadata + ld hl, sPartyMail + ld b, PARTY_LENGTH +.metadata_loop + push bc + ld bc, MAIL_MSG_LENGTH + 1 + add hl, bc + ld bc, MAIL_STRUCT_LENGTH - (MAIL_MSG_LENGTH + 1) + call CopyBytes + pop bc + dec b + jr nz, .metadata_loop + +; Translate the messages if necessary + ld b, PARTY_LENGTH + ld de, sPartyMail + ld hl, wLinkPlayerMailMessages +.translate_loop + push bc + push hl + push de + push hl + farcall ParseMailLanguage + pop de + ld a, c + or a ; MAIL_LANG_ENGLISH + jr z, .translate_next + sub MAIL_LANG_ITALIAN + jr nc, .italian_spanish + farcall ConvertFrenchGermanMailToEnglish + jr .translate_next +.italian_spanish + cp (MAIL_LANG_SPANISH + 1) - MAIL_LANG_ITALIAN + jr nc, .translate_next + farcall ConvertSpanishItalianMailToEnglish +.translate_next + pop de + ld hl, MAIL_STRUCT_LENGTH + add hl, de + ld d, h + ld e, l + pop hl + ld bc, MAIL_MSG_LENGTH + 1 + add hl, bc + pop bc + dec b + jr nz, .translate_loop + call CloseSRAM + +; The SERIAL_NO_DATA_BYTE value isn't allowed anywhere in message text + ld hl, wLinkPlayerMailMessages + ld bc, (MAIL_MSG_LENGTH + 1) * PARTY_LENGTH +.message_patch_loop + ld a, [hl] + cp SERIAL_NO_DATA_BYTE + jr nz, .message_patch_skip + ld [hl], SERIAL_MAIL_REPLACEMENT_BYTE +.message_patch_skip + inc hl + dec bc + ld a, b + or c + jr nz, .message_patch_loop + +; Calculate the patch offsets for the mail metadata + ld hl, wLinkPlayerMailMetadata + ld de, wLinkPlayerMailPatchSet + ld b, (MAIL_STRUCT_LENGTH - (MAIL_MSG_LENGTH + 1)) * PARTY_LENGTH + ld c, 0 +.metadata_patch_loop + inc c + ld a, [hl] + cp SERIAL_NO_DATA_BYTE + jr nz, .metadata_patch_skip + ld [hl], SERIAL_PATCH_REPLACEMENT_BYTE + ld a, c + ld [de], a + inc de +.metadata_patch_skip + inc hl + dec b + jr nz, .metadata_patch_loop + ld a, SERIAL_PATCH_LIST_PART_TERMINATOR + ld [de], a + ret + +Link_FixOTParty_Gen2: + ; returns carry on a transmission error + ld hl, wStringBuffer1 +.skip_preamble_loop + ld a, [hli] + cp SERIAL_PREAMBLE_BYTE + jr z, .skip_preamble_loop + dec hl + push hl + ld c, 2 * (1 + NUM_MOVES) * PARTY_LENGTH + 2 + call Link_ComputeBufferChecksum + cp [hl] + pop hl + scf + ret nz + ld a, 2 * (1 + NUM_MOVES) * PARTY_LENGTH + call Link_FixIndexListAfterTransfer + ld d, h + ld e, l + ld c, 0 +.party_loop + ld a, [de] + inc de + ld l, a + ld a, [de] + inc de + ld h, a + call GetPokemonIDFromIndex + ld b, a + ld [wTempSpecies], a + push bc + ld b, 0 + ld a, PARTYMON_STRUCT_LENGTH + ld hl, wOTPartyMon1Species + call AddNTimes + pop bc + ld a, b + ld [hli], a + inc hl + ld b, NUM_MOVES +.move_loop + push hl + ld a, [de] + inc de + ld l, a + ld a, [de] + inc de + ld h, a + call GetMoveIDFromIndex + pop hl + ld [hli], a + dec b + jr nz, .move_loop + ld a, LOW(wOTPartySpecies) + add a, c + ld l, a + adc HIGH(wOTPartySpecies) + sub l + ld h, a + ld a, [hl] + cp EGG + jr z, .no_species_update + call IsAPokemon + jr c, .no_species_update + ld a, [wTempSpecies] + ld [hl], a +.no_species_update + inc c + ld a, c + cp PARTY_LENGTH + jr c, .party_loop + ; carry already cleared + ret + +Link_BuildIndexList: + ; in: de: address + push de + ld c, PARTY_LENGTH + ld hl, wPartyMon1Species +.loop + ld a, [hli] + push hl + ld hl, 0 + call IsAPokemon + call nc, GetPokemonIndexFromID + call .write + pop hl + inc hl + ld b, NUM_MOVES +.move_loop + ld a, [hli] + push hl + call GetMoveIndexFromID + call .write + pop hl + dec b + jr nz, .move_loop + ld a, c + ld c, PARTYMON_STRUCT_LENGTH - MON_ID + add hl, bc + ld c, a + dec c + jr nz, .loop + pop hl + ld a, e + sub l + ld c, a + call Link_StageIndexListForTransfer + inc c + inc c + call Link_ComputeBufferChecksum + inc de + ; pad with some safe value - the checksum is always safe + ld c, 7 +.checksum_loop + inc de + ld [de], a + dec c + jr nz, .checksum_loop + ret + +.write + ld a, l + ld [de], a + inc de + ld a, h + ld [de], a + inc de + ret + +Link_ComputeBufferChecksum: + ; in: hl: buffer, c: length + ; out: a: checksum, hl: end of buffer, c: destroyed + ld a, 4 ;-$fc, but that gives a warning... +.loop + add a, [hl] + jr nc, .no_carry + sub $fc +.no_carry + inc hl + dec c + jr nz, .loop + cpl + inc a + ret + +Link_StageIndexListForTransfer: + ; will remove all $FD and $FE bytes from the data, replacing them with any two other unused bytes + ; the two chosen bytes will be appended to the end of the data stream + ; in: hl: data, a: size (maximum $EF); will preserve bc, de, hl + push bc + push de + ; wStringBuffer4 and wStringBuffer5 are used as a bitmap + ld e, a + push hl + ld hl, wStringBuffer4 + ld bc, $20 + xor a + call ByteFill + pop hl + ld d, e +.read_loop + ld a, [hli] + push hl + ld c, a + and $1f + add a, LOW(wStringBuffer4) + ld l, a + adc HIGH(wStringBuffer4) + sub l + ld h, a + sla c + sbc a + and $f + inc a + sla c + jr nc, .not_two + add a, a + add a, a +.not_two + sla c + jr nc, .not_one + add a, a +.not_one + or [hl] + ld [hl], a + pop hl + dec d + jr nz, .read_loop + push hl + ld hl, wStringBuffer4 + 1 + call .find_substitute + ld c, a + call .find_substitute + pop hl + ld b, a + inc hl + ld [hld], a + ld a, c + ld [hld], a +.replace_loop + ld a, [hl] + cp $ff + jr z, .ok + cp $fd + jr c, .ok + ld a, c + jr z, .ok + ld a, b +.ok + ld [hld], a + dec e + jr nz, .replace_loop + inc hl + pop de + pop bc + ret + +.find_substitute + ld a, [hli] + inc a + jr z, .find_substitute + dec a + ld b, a + xor a +.bit_loop + inc a + srl b + jr c, .bit_loop + add a, a + swap a + add a, l + sub LOW(wStringBuffer4 + $21) ;+1 for the extra increment in [hli] and +$20 for the extra increment in the bit loop + ret + +Link_FixIndexListAfterTransfer: + ; undoes the previous function's transform + push bc + push de + ld c, a + ld b, 0 + add hl, bc + inc hl + ld a, [hld] + ld d, a + ld e, [hl] +.loop + dec hl + ld a, [hl] + ld b, SERIAL_PREAMBLE_BYTE + cp e + jr z, .ok + inc b + cp d + jr z, .ok + ld b, a +.ok + ld [hl], b + dec c + jr nz, .loop + pop de + pop bc + ret + +Link_CopyMailPreamble: +; fill 5 bytes with the value of a, starting at de + ld c, SERIAL_MAIL_PREAMBLE_LENGTH +.loop + ld [de], a + inc de + dec c + jr nz, .loop + ret + +Link_ConvertPartyStruct1to2: + push hl + ld d, h + ld e, l + ld bc, wLinkOTPartyMonTypes + ld hl, wCurLinkOTPartyMonTypePointer + ld a, c + ld [hli], a + ld [hl], b + ld hl, wOTPartyMon1Species + ld c, PARTY_LENGTH +.loop + push bc + call .ConvertToGen2 + pop bc + dec c + jr nz, .loop + pop hl + ld bc, PARTY_LENGTH * REDMON_STRUCT_LENGTH + add hl, bc + ld de, wOTPartyMonOTs + ld bc, PARTY_LENGTH * NAME_LENGTH + call CopyBytes + ld de, wOTPartyMonNicknames + ld bc, PARTY_LENGTH * MON_NAME_LENGTH + jp CopyBytes + +.ConvertToGen2: + ld b, h + ld c, l + ld a, [de] + inc de + ld l, a + ld h, 0 + push bc + push de + ld [wTempSpecies], a + callfar ConvertMon_1to2 + pop de + pop bc + ld a, [wTempSpecies] + ld l, a + ld h, 0 + call GetPokemonIDFromIndex + ld [bc], a + ld [wCurSpecies], a + ld hl, MON_HP + add hl, bc + ld a, [de] + inc de + ld [hli], a + ld a, [de] + inc de + ld [hl], a + inc de + ld hl, MON_STATUS + add hl, bc + ld a, [de] + inc de + ld [hl], a + ld hl, wCurLinkOTPartyMonTypePointer + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, l + ld [wCurLinkOTPartyMonTypePointer], a + ld a, h + ld [wCurLinkOTPartyMonTypePointer + 1], a + push bc + ld hl, MON_ITEM + add hl, bc + push hl + ld h, d + ld l, e + pop de + push bc + ld a, [hli] + ld b, a + call TimeCapsule_ReplaceTeruSama + ld a, b + ld [de], a + inc de + pop bc + ld b, NUM_MOVES +.move_loop + ld a, [hli] + push hl + ld l, a + cp MOVE_TABLE_MINIMUM_RESERVED_INDEX + ccf + sbc a + ld h, a + call GetMoveIDFromIndex + pop hl + ld [de], a + inc de + dec b + jr nz, .move_loop + ld c, MON_HAPPINESS - MON_ID + call CopyBytes + pop bc + ld d, h + ld e, l + ld hl, $1f + add hl, bc + ld a, [de] + inc de + ld [hl], a + ld [wCurPartyLevel], a + push bc + ld hl, $24 + add hl, bc + push hl + ld h, d + ld l, e + pop de + ld bc, 8 + call CopyBytes + pop bc + call GetBaseData + push de + push bc + ld d, h + ld e, l + ld hl, MON_STAT_EXP - 1 + add hl, bc + ld c, STAT_SATK + ld b, TRUE + predef CalcMonStatC + pop bc + pop hl + ldh a, [hQuotient + 2] + ld [hli], a + ldh a, [hQuotient + 3] + ld [hli], a + push hl + push bc + ld hl, MON_STAT_EXP - 1 + add hl, bc + ld c, STAT_SDEF + ld b, TRUE + predef CalcMonStatC + pop bc + pop hl + ldh a, [hQuotient + 2] + ld [hli], a + ldh a, [hQuotient + 3] + ld [hli], a + push hl + ld hl, $1b + add hl, bc + ld a, $46 + ld [hli], a + xor a + ld [hli], a + ld [hli], a + ld [hl], a + pop hl + inc de + inc de + ret + +TimeCapsule_ReplaceTeruSama: + ld a, b + and a + ret z + push hl + ld hl, TimeCapsule_CatchRateItems +.loop + ld a, [hli] + and a + jr z, .end + cp b + jr z, .found + inc hl + jr .loop + +.found + ld b, [hl] + +.end + pop hl + ret + +INCLUDE "data/items/catch_rate_items.asm" + +Link_CopyOTData: +.loop + ld a, [hli] + cp SERIAL_NO_DATA_BYTE + jr z, .loop + ld [de], a + inc de + dec bc + ld a, b + or c + jr nz, .loop + ret + +Link_CopyRandomNumbers: + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + ret z + ld hl, wOTLinkBattleRNData + call Link_FindFirstNonControlCharacter_AllowZero + ld de, wLinkBattleRNs + ld c, 10 +.loop + ld a, [hli] + cp SERIAL_NO_DATA_BYTE + jr z, .loop + cp SERIAL_PREAMBLE_BYTE + jr z, .loop + ld [de], a + inc de + dec c + jr nz, .loop + ret + +Link_FindFirstNonControlCharacter_SkipZero: +.loop + ld a, [hli] + and a + jr z, .loop + cp SERIAL_PREAMBLE_BYTE + jr z, .loop + cp SERIAL_NO_DATA_BYTE + jr z, .loop + dec hl + ret + +Link_FindFirstNonControlCharacter_AllowZero: +.loop + ld a, [hli] + cp SERIAL_PREAMBLE_BYTE + jr z, .loop + cp SERIAL_NO_DATA_BYTE + jr z, .loop + dec hl + ret + +InitTradeMenuDisplay: + call ClearScreen + call LoadTradeScreenBorderGFX + farcall InitTradeSpeciesList + xor a + ld hl, wOtherPlayerLinkMode + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld a, 1 + ld [wMenuCursorY], a + inc a + ld [wPlayerLinkAction], a + jp LinkTrade_PlayerPartyMenu + +LinkTrade_OTPartyMenu: + ld a, OTPARTYMON + ld [wMonType], a + ld a, A_BUTTON | D_UP | D_DOWN + ld [wMenuJoypadFilter], a + ld a, [wOTPartyCount] + ld [w2DMenuNumRows], a + ld a, 1 + ld [w2DMenuNumCols], a + ld a, 9 + ld [w2DMenuCursorInitY], a + ld a, 6 + ld [w2DMenuCursorInitX], a + ld a, 1 + ld [wMenuCursorX], a + ln a, 1, 0 + ld [w2DMenuCursorOffsets], a + ld a, MENU_UNUSED_3 + ld [w2DMenuFlags1], a + xor a + ld [w2DMenuFlags2], a + +LinkTradeOTPartymonMenuLoop: + farcall LinkTradeMenu + ld a, d + and a + jp z, LinkTradePartiesMenuMasterLoop + bit A_BUTTON_F, a + jr z, .not_a_button + ld a, INIT_ENEMYOT_LIST + ld [wInitListType], a + callfar InitList + ld hl, wOTPartyMon1Species + farcall LinkMonStatsScreen + jp LinkTradePartiesMenuMasterLoop + +.not_a_button + bit D_UP_F, a + jr z, .not_d_up + ld a, [wMenuCursorY] + ld b, a + ld a, [wOTPartyCount] + cp b + jp nz, LinkTradePartiesMenuMasterLoop + xor a + ld [wMonType], a + call HideCursor + push hl + push bc + ld bc, NAME_LENGTH + add hl, bc + ld [hl], " " + pop bc + pop hl + ld a, [wPartyCount] + ld [wMenuCursorY], a + jr LinkTrade_PlayerPartyMenu + +.not_d_up + bit D_DOWN_F, a + jp z, LinkTradePartiesMenuMasterLoop + jp LinkTradeOTPartymonMenuCheckCancel + +LinkTrade_PlayerPartyMenu: + farcall InitMG_Mobile_LinkTradePalMap + xor a + ld [wMonType], a + ld a, A_BUTTON | D_UP | D_DOWN + ld [wMenuJoypadFilter], a + ld a, [wPartyCount] + ld [w2DMenuNumRows], a + ld a, 1 + ld [w2DMenuNumCols], a + ld a, 1 + ld [w2DMenuCursorInitY], a + ld a, 6 + ld [w2DMenuCursorInitX], a + ld a, 1 + ld [wMenuCursorX], a + ln a, 1, 0 + ld [w2DMenuCursorOffsets], a + ld a, MENU_UNUSED_3 + ld [w2DMenuFlags1], a + xor a + ld [w2DMenuFlags2], a + call WaitBGMap2 + +LinkTradePartymonMenuLoop: + farcall LinkTradeMenu + ld a, d + and a + jr nz, .check_joypad + jp LinkTradePartiesMenuMasterLoop + +.check_joypad + bit A_BUTTON_F, a + jr z, .not_a_button + jp LinkTrade_TradeStatsMenu + +.not_a_button + bit D_DOWN_F, a + jr z, .not_d_down + ld a, [wMenuCursorY] + dec a + jp nz, LinkTradePartiesMenuMasterLoop + ld a, OTPARTYMON + ld [wMonType], a + call HideCursor + push hl + push bc + ld bc, NAME_LENGTH + add hl, bc + ld [hl], " " + pop bc + pop hl + ld a, 1 + ld [wMenuCursorY], a + jp LinkTrade_OTPartyMenu + +.not_d_down + bit D_UP_F, a + jr z, LinkTradePartiesMenuMasterLoop + ld a, [wMenuCursorY] + ld b, a + ld a, [wPartyCount] + cp b + jr nz, LinkTradePartiesMenuMasterLoop + call HideCursor + push hl + push bc + ld bc, NAME_LENGTH + add hl, bc + ld [hl], " " + pop bc + pop hl + jp LinkTradePartymonMenuCheckCancel + +LinkTradePartiesMenuMasterLoop: + ld a, [wMonType] + and a + jp z, LinkTradePartymonMenuLoop ; PARTYMON + jp LinkTradeOTPartymonMenuLoop ; OTPARTYMON + +LinkTrade_TradeStatsMenu: + call LoadTilemapToTempTilemap + ld a, [wMenuCursorY] + push af + hlcoord 0, 15 + ld b, 1 + ld c, 18 + call LinkTextboxAtHL + hlcoord 2, 16 + ld de, .String_Stats_Trade + call PlaceString + farcall Link_WaitBGMap + +.joy_loop + ld a, " " + ldcoord_a 11, 16 + ld a, A_BUTTON | B_BUTTON | D_RIGHT + ld [wMenuJoypadFilter], a + ld a, 1 + ld [w2DMenuNumRows], a + ld a, 1 + ld [w2DMenuNumCols], a + ld a, 16 + ld [w2DMenuCursorInitY], a + ld a, 1 + ld [w2DMenuCursorInitX], a + ld a, 1 + ld [wMenuCursorY], a + ld [wMenuCursorX], a + ln a, 2, 0 + ld [w2DMenuCursorOffsets], a + xor a + ld [w2DMenuFlags1], a + ld [w2DMenuFlags2], a + call ScrollingMenuJoypad + bit D_RIGHT_F, a + jr nz, .d_right + bit B_BUTTON_F, a + jr z, .show_stats +.b_button + pop af + ld [wMenuCursorY], a + call SafeLoadTempTilemapToTilemap + jp LinkTrade_PlayerPartyMenu + +.d_right + ld a, " " + ldcoord_a 1, 16 + ld a, A_BUTTON | B_BUTTON | D_LEFT + ld [wMenuJoypadFilter], a + ld a, 1 + ld [w2DMenuNumRows], a + ld a, 1 + ld [w2DMenuNumCols], a + ld a, 16 + ld [w2DMenuCursorInitY], a + ld a, 11 + ld [w2DMenuCursorInitX], a + ld a, 1 + ld [wMenuCursorY], a + ld [wMenuCursorX], a + ln a, 2, 0 + ld [w2DMenuCursorOffsets], a + xor a + ld [w2DMenuFlags1], a + ld [w2DMenuFlags2], a + call ScrollingMenuJoypad + bit D_LEFT_F, a + jp nz, .joy_loop + bit B_BUTTON_F, a + jr nz, .b_button + jr .try_trade + +.show_stats + pop af + ld [wMenuCursorY], a + ld a, INIT_PLAYEROT_LIST + ld [wInitListType], a + callfar InitList + farcall LinkMonStatsScreen + call SafeLoadTempTilemapToTilemap + hlcoord 6, 1 + lb bc, 6, 1 + ld a, " " + call LinkEngine_FillBox + hlcoord 17, 1 + lb bc, 6, 1 + ld a, " " + call LinkEngine_FillBox + jp LinkTrade_PlayerPartyMenu + +.try_trade + call PlaceHollowCursor + pop af + ld [wMenuCursorY], a + dec a + ld [wCurTradePartyMon], a + ld [wPlayerLinkAction], a + farcall PrintWaitingTextAndSyncAndExchangeNybble + ld a, [wOtherPlayerLinkMode] + cp $f + jp z, InitTradeMenuDisplay + ld [wCurOTTradePartyMon], a + call LinkTradePlaceArrow + ld c, 100 + call DelayFrames + farcall ValidateOTTrademon + jr c, .abnormal + farcall CheckAnyOtherAliveMonsForTrade + jp nc, LinkTrade + xor a + ld [wUnusedLinkAction], a + ld [wOtherPlayerLinkAction], a + hlcoord 0, 12 + ld b, 4 + ld c, 18 + call LinkTextboxAtHL + farcall Link_WaitBGMap + ld hl, .LinkTradeCantBattleText + bccoord 1, 14 + call PlaceHLTextAtBC + jr .cancel_trade + +.abnormal + xor a + ld [wUnusedLinkAction], a + ld [wOtherPlayerLinkAction], a + ld a, [wCurOTTradePartyMon] + ld hl, wOTPartySpecies + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ld [wNamedObjectIndex], a + call GetPokemonName + hlcoord 0, 12 + ld b, 4 + ld c, 18 + call LinkTextboxAtHL + farcall Link_WaitBGMap + ld hl, .LinkAbnormalMonText + bccoord 1, 14 + call PlaceHLTextAtBC + +.cancel_trade + hlcoord 0, 12 + ld b, 4 + ld c, 18 + call LinkTextboxAtHL + hlcoord 1, 14 + ld de, String_TooBadTheTradeWasCanceled + call PlaceString + ld a, $1 + ld [wPlayerLinkAction], a + farcall PrintWaitingTextAndSyncAndExchangeNybble + ld c, 100 + call DelayFrames + jp InitTradeMenuDisplay + +.LinkTradeCantBattleText: + text_far _LinkTradeCantBattleText + text_end + +.String_Stats_Trade: + db "STATS TRADE@" + +.LinkAbnormalMonText: + text_far _LinkAbnormalMonText + text_end + +LinkTradeOTPartymonMenuCheckCancel: + ld a, [wMenuCursorY] + cp 1 + jp nz, LinkTradePartiesMenuMasterLoop + call HideCursor + + push hl + push bc + ld bc, NAME_LENGTH + add hl, bc + ld [hl], " " + pop bc + pop hl + ; fallthrough + +LinkTradePartymonMenuCheckCancel: +.loop1 + ld a, "▶" + ldcoord_a 9, 17 +.loop2 + call JoyTextDelay + ldh a, [hJoyLast] + and a + jr z, .loop2 + bit A_BUTTON_F, a + jr nz, .a_button + push af + ld a, " " + ldcoord_a 9, 17 + pop af + bit D_UP_F, a + jr z, .d_up + ld a, [wOTPartyCount] + ld [wMenuCursorY], a + jp LinkTrade_OTPartyMenu + +.d_up + ld a, $1 + ld [wMenuCursorY], a + jp LinkTrade_PlayerPartyMenu + +.a_button + ld a, "▷" + ldcoord_a 9, 17 + ld a, $f + ld [wPlayerLinkAction], a + farcall PrintWaitingTextAndSyncAndExchangeNybble + ld a, [wOtherPlayerLinkMode] + cp $f + jr nz, .loop1 + ; fallthrough + +ExitLinkCommunications: + call RotateThreePalettesRight + call ClearScreen + ld b, SCGB_DIPLOMA + call GetSGBLayout + call WaitBGMap2 + xor a + ld [wUnusedLinkCommunicationByte], a + xor a + ldh [rSB], a + ldh [hSerialSend], a + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + vc_hook ExitLinkCommunications_ret + ret + +GSPlaceTradeScreenFooter: ; unreferenced +; Fill the screen footer with pattern tile + hlcoord 0, 16 + ld a, $7e + ld bc, 2 * SCREEN_WIDTH + call ByteFill +; Clear out area for cancel string + hlcoord 1, 16 + ld a, " " + ld bc, SCREEN_WIDTH - 2 + call ByteFill +; Place the string + hlcoord 2, 16 + ld de, .CancelString + jp PlaceString + +.CancelString: + db "CANCEL@" + +LinkTradePlaceArrow: +; Indicates which pokemon the other player has selected to trade + ld a, [wOtherPlayerLinkMode] + hlcoord 6, 9 + ld bc, SCREEN_WIDTH + call AddNTimes + ld [hl], "▷" + ret + +LinkEngine_FillBox: +.row + push bc + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + ret + +LinkTrade: + xor a + ld [wUnusedLinkAction], a + ld [wOtherPlayerLinkAction], a + hlcoord 0, 12 + ld b, 4 + ld c, 18 + call LinkTextboxAtHL + farcall Link_WaitBGMap + ld a, [wCurTradePartyMon] + ld hl, wPartySpecies + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wStringBuffer1 + ld de, wBufferTrademonNickname + ld bc, MON_NAME_LENGTH + call CopyBytes + ld a, [wCurOTTradePartyMon] + ld hl, wOTPartySpecies + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, LinkAskTradeForText + bccoord 1, 14 + call PlaceHLTextAtBC + call LoadStandardMenuHeader + hlcoord 10, 7 + ld b, 3 + ld c, 7 + call LinkTextboxAtHL + ld de, String_TradeCancel + hlcoord 12, 8 + call PlaceString + ld a, 8 + ld [w2DMenuCursorInitY], a + ld a, 11 + ld [w2DMenuCursorInitX], a + ld a, 1 + ld [w2DMenuNumCols], a + ld a, 2 + ld [w2DMenuNumRows], a + xor a + ld [w2DMenuFlags1], a + ld [w2DMenuFlags2], a + ld a, $20 + ld [w2DMenuCursorOffsets], a + ld a, A_BUTTON | B_BUTTON + ld [wMenuJoypadFilter], a + ld a, 1 + ld [wMenuCursorY], a + ld [wMenuCursorX], a + farcall Link_WaitBGMap + call ScrollingMenuJoypad + push af + call ExitMenu + call WaitBGMap2 + pop af + bit 1, a + jr nz, .canceled + ld a, [wMenuCursorY] + dec a + jr z, .try_trade + +.canceled + ld a, $1 + ld [wPlayerLinkAction], a + hlcoord 0, 12 + ld b, 4 + ld c, 18 + call LinkTextboxAtHL + hlcoord 1, 14 + ld de, String_TooBadTheTradeWasCanceled + call PlaceString + farcall PrintWaitingTextAndSyncAndExchangeNybble + jp InitTradeMenuDisplay_Delay + +.try_trade + ld a, $2 + ld [wPlayerLinkAction], a + farcall PrintWaitingTextAndSyncAndExchangeNybble + ld a, [wOtherPlayerLinkMode] + dec a + jr nz, .do_trade +; If we're here, the other player canceled the trade + hlcoord 0, 12 + ld b, 4 + ld c, 18 + call LinkTextboxAtHL + hlcoord 1, 14 + ld de, String_TooBadTheTradeWasCanceled + call PlaceString + jp InitTradeMenuDisplay_Delay + +.do_trade + ld hl, sPartyMail + ld a, [wCurTradePartyMon] + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + ld a, BANK(sPartyMail) + call OpenSRAM + ld d, h + ld e, l + ld bc, MAIL_STRUCT_LENGTH + add hl, bc + ld a, [wCurTradePartyMon] + ld c, a +.copy_mail + inc c + ld a, c + cp PARTY_LENGTH + jr z, .copy_player_data + push bc + ld bc, MAIL_STRUCT_LENGTH + call CopyBytes + pop bc + jr .copy_mail + +.copy_player_data + ld hl, sPartyMail + ld a, [wPartyCount] + dec a + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + push hl + ld hl, wLinkPlayerMail + ld a, [wCurOTTradePartyMon] + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + pop de + ld bc, MAIL_STRUCT_LENGTH + call CopyBytes + call CloseSRAM + +; Buffer player data +; nickname + ld hl, wPlayerName + ld de, wPlayerTrademonSenderName + ld bc, NAME_LENGTH + call CopyBytes +; species + ld a, [wCurTradePartyMon] + ld hl, wPartySpecies + ld b, 0 + ld c, a + add hl, bc + ld a, [hl] + ld [wPlayerTrademonSpecies], a + push af +; OT name + ld a, [wCurTradePartyMon] + ld hl, wPartyMonOTs + call SkipNames + ld de, wPlayerTrademonOTName + ld bc, NAME_LENGTH + call CopyBytes +; ID + ld hl, wPartyMon1ID + ld a, [wCurTradePartyMon] + call GetPartyLocation + ld a, [hli] + ld [wPlayerTrademonID], a + ld a, [hl] + ld [wPlayerTrademonID + 1], a +; DVs + ld hl, wPartyMon1DVs + ld a, [wCurTradePartyMon] + call GetPartyLocation + ld a, [hli] + ld [wPlayerTrademonDVs], a + ld a, [hl] + ld [wPlayerTrademonDVs + 1], a +; caught data + ld a, [wCurTradePartyMon] + ld hl, wPartyMon1Species + call GetPartyLocation + ld b, h + ld c, l + farcall GetCaughtGender + ld a, c + ld [wPlayerTrademonCaughtData], a + +; Buffer other player data +; nickname + ld hl, wOTPlayerName + ld de, wOTTrademonSenderName + ld bc, NAME_LENGTH + call CopyBytes +; species + ld a, [wCurOTTradePartyMon] + ld hl, wOTPartySpecies + ld b, 0 + ld c, a + add hl, bc + ld a, [hl] + ld [wOTTrademonSpecies], a +; OT name + ld a, [wCurOTTradePartyMon] + ld hl, wOTPartyMonOTs + call SkipNames + ld de, wOTTrademonOTName + ld bc, NAME_LENGTH + call CopyBytes +; ID + ld hl, wOTPartyMon1ID + ld a, [wCurOTTradePartyMon] + call GetPartyLocation + ld a, [hli] + ld [wOTTrademonID], a + ld a, [hl] + ld [wOTTrademonID + 1], a +; DVs + ld hl, wOTPartyMon1DVs + ld a, [wCurOTTradePartyMon] + call GetPartyLocation + ld a, [hli] + ld [wOTTrademonDVs], a + ld a, [hl] + ld [wOTTrademonDVs + 1], a +; caught data + ld a, [wCurOTTradePartyMon] + ld hl, wOTPartyMon1Species + call GetPartyLocation + ld b, h + ld c, l + farcall GetCaughtGender + ld a, c + ld [wOTTrademonCaughtData], a + + ld a, [wCurTradePartyMon] + ld [wCurPartyMon], a + ld hl, wPartySpecies + ld b, 0 + ld c, a + add hl, bc + ld a, [hl] + ld [wCurTradePartyMon], a + + xor a ; REMOVE_PARTY + ld [wPokemonWithdrawDepositParameter], a + callfar RemoveMonFromPartyOrBox + ld a, [wPartyCount] + dec a + ld [wCurPartyMon], a + ld a, TRUE + ld [wForceEvolution], a + ld a, [wCurOTTradePartyMon] + push af + ld hl, wOTPartySpecies + ld b, 0 + ld c, a + add hl, bc + ld a, [hl] + ld [wCurOTTradePartyMon], a + + ld c, 100 + call DelayFrames + call ClearTilemap + call LoadFontsBattleExtra + ld b, SCGB_DIPLOMA + call GetSGBLayout + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .player_2 + predef TradeAnimation + jr .done_animation + +.player_2 + predef TradeAnimationPlayer2 + +.done_animation + pop af + ld c, a + ld [wCurPartyMon], a + ld hl, wOTPartySpecies + ld d, 0 + ld e, a + add hl, de + ld a, [hl] + ld [wCurPartySpecies], a + ld hl, wOTPartyMon1Species + ld a, c + call GetPartyLocation + ld de, wTempMonSpecies + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + predef AddTempmonToParty + ld a, [wPartyCount] + dec a + ld [wCurPartyMon], a + callfar EvolvePokemon + call ClearScreen + call LoadTradeScreenBorderGFX + call SetTradeRoomBGPals + farcall Link_WaitBGMap + +; Check if either of the Pokémon sent was a Mew or Celebi, and send a different +; byte depending on that. Presumably this would've been some prevention against +; illicit trade machines, but it doesn't seem like a very effective one. +; Removing this code breaks link compatibility with the vanilla gen2 games, but +; has otherwise no consequence. + ld hl, MEW + call GetPokemonIDFromIndex + push af + ld hl, CELEBI + call GetPokemonIDFromIndex + pop hl + ld l, a + ; h = MEW, l = CELEBI + ld b, 1 + pop af + ld c, a + cp h + jr z, .send_checkbyte + ld a, [wCurPartySpecies] + cp h + jr z, .send_checkbyte + ld b, 2 + ld a, c + cp l + jr z, .send_checkbyte + ld a, [wCurPartySpecies] + cp l + jr z, .send_checkbyte + +; Send the byte in a loop until the desired byte has been received. + ld b, 0 +.send_checkbyte + ld a, b + ld [wPlayerLinkAction], a + push bc + call Serial_PrintWaitingTextAndSyncAndExchangeNybble + pop bc + ld a, [wLinkMode] + cp LINK_TIMECAPSULE + jr z, .save + ld a, b + and a + jr z, .save + ld a, [wOtherPlayerLinkAction] + cp b + jr nz, .send_checkbyte + +.save + farcall SaveAfterLinkTrade + farcall StubbedTrainerRankings_Trades + farcall BackupMobileEventIndex + ld c, 40 + call DelayFrames + hlcoord 0, 12 + ld b, 4 + ld c, 18 + call LinkTextboxAtHL + hlcoord 1, 14 + ld de, String_TradeCompleted + call PlaceString + farcall Link_WaitBGMap + vc_hook Trade_save_game_end + ld c, 50 + call DelayFrames + ld a, [wLinkMode] + cp LINK_TIMECAPSULE + jp z, Gen2ToGen1LinkComms + jp Gen2ToGen2LinkComms + +InitTradeMenuDisplay_Delay: + ld c, 100 + call DelayFrames + jp InitTradeMenuDisplay + +String_TradeCancel: + db "TRADE" + next "CANCEL@" + +LinkAskTradeForText: + text_far _LinkAskTradeForText + text_end + +String_TradeCompleted: + db "Trade completed!@" + +String_TooBadTheTradeWasCanceled: + db "Too bad! The trade" + next "was canceled!@" + +LinkTextboxAtHL: + ld d, h + ld e, l + farcall LinkTextbox + ret + +LoadTradeScreenBorderGFX: + farcall _LoadTradeScreenBorderGFX + ret + +SetTradeRoomBGPals: + farcall LoadTradeRoomBGPals ; just a nested farcall; so wasteful + call SetPalettes + ret + +PlaceTradeScreenTextbox: ; unreferenced + hlcoord 0, 0 + ld b, 6 + ld c, 18 + call LinkTextboxAtHL + hlcoord 0, 8 + ld b, 6 + ld c, 18 + call LinkTextboxAtHL + farcall PlaceTradePartnerNamesAndParty + ret + +INCLUDE "engine/movie/trade_animation.asm" + +CheckTimeCapsuleCompatibility: +; Checks to see if your party is compatible with the Gen 1 games. +; Returns the following in wScriptVar: +; 0: Party is okay +; 1: At least one Pokémon was introduced in Gen 2 +; 2: At least one Pokémon has a move that was introduced in Gen 2 +; 3: At least one Pokémon is holding mail + +; If any party Pokémon was introduced in the Gen 2 games, don't let it in. + ld hl, wPartySpecies + ld b, PARTY_LENGTH +.loop + ld a, [hli] + cp -1 + jr z, .checkitem + push hl + call GetPokemonIndexFromID + ld a, h + and a + ld a, l + pop hl + jr nz, .mon_too_new + cp JOHTO_POKEMON + jr nc, .mon_too_new + dec b + jr nz, .loop + +; If any party Pokémon is holding mail, don't let it in. +.checkitem + ld a, [wPartyCount] + ld b, a + ld hl, wPartyMon1Item +.itemloop + push hl + push bc + ld d, [hl] + farcall ItemIsMail + pop bc + pop hl + jr c, .mon_has_mail + ld de, PARTYMON_STRUCT_LENGTH + add hl, de + dec b + jr nz, .itemloop + +; If any party Pokémon has a move that was introduced in the Gen 2 games, don't let it in. + ld hl, wPartyMon1Moves + ld a, [wPartyCount] + ld b, a +.move_loop + ld c, NUM_MOVES +.move_next + ld a, [hli] + push hl + call GetMoveIndexFromID + ld a, h + and a + ld a, l + pop hl + jr nz, .move_too_new + cp STRUGGLE + 1 + jr nc, .move_too_new + dec c + jr nz, .move_next + ld de, PARTYMON_STRUCT_LENGTH - NUM_MOVES + add hl, de + dec b + jr nz, .move_loop + xor a + jr .done + +.mon_too_new + dec hl + ld a, [hl] + ld [wNamedObjectIndex], a + call GetPokemonName + ld a, $1 + jr .done + +.move_too_new + push bc + ld [wNamedObjectIndex], a + call GetMoveName + call CopyName1 + pop bc + call GetIncompatibleMonName + ld a, $2 + jr .done + +.mon_has_mail + call GetIncompatibleMonName + ld a, $3 + +.done + ld [wScriptVar], a + ret + +GetIncompatibleMonName: +; Calulate which pokemon is incompatible, and get that pokemon's name + ld a, [wPartyCount] + sub b + ld c, a + inc c + ld b, 0 + ld hl, wPartyCount + add hl, bc + ld a, [hl] + ld [wNamedObjectIndex], a + call GetPokemonName + ret + +EnterTimeCapsule: + vc_patch Wireless_net_delay_6 +if DEF(_CRYSTAL_VC) + ld c, 26 +else + ld c, 10 +endc + vc_patch_end + call DelayFrames + ld a, $4 + call Link_EnsureSync + ld c, 40 + call DelayFrames + xor a + ldh [hVBlank], a + inc a ; LINK_TIMECAPSULE + ld [wLinkMode], a + ret + +WaitForOtherPlayerToExit: + ld c, 3 + call DelayFrames + ld a, CONNECTION_NOT_ESTABLISHED + ldh [hSerialConnectionStatus], a + xor a + ldh [rSB], a + ldh [hSerialReceive], a + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld c, 3 + call DelayFrames + xor a + ldh [rSB], a + ldh [hSerialReceive], a + ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) + ldh [rSC], a + ld c, 3 + call DelayFrames + xor a + ldh [rSB], a + ldh [hSerialReceive], a + ldh [rSC], a + ld c, 3 + call DelayFrames + ld a, CONNECTION_NOT_ESTABLISHED + ldh [hSerialConnectionStatus], a + ldh a, [rIF] + push af + xor a + ldh [rIF], a + ld a, IE_DEFAULT + ldh [rIE], a + pop af + ldh [rIF], a + ld hl, wLinkTimeoutFrames + xor a + ld [hli], a + ld [hl], a + ldh [hVBlank], a + ld [wLinkMode], a + vc_hook Wireless_term_exit + ret + +SetBitsForLinkTradeRequest: + ld a, LINK_TRADECENTER - 1 + ld [wPlayerLinkAction], a + ld [wChosenCableClubRoom], a + ret + +SetBitsForBattleRequest: + ld a, LINK_COLOSSEUM - 1 + ld [wPlayerLinkAction], a + ld [wChosenCableClubRoom], a + ret + +SetBitsForTimeCapsuleRequest: + ld a, USING_INTERNAL_CLOCK + ldh [rSB], a + xor a + ldh [hSerialReceive], a + ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) + ldh [rSC], a + xor a ; LINK_TIMECAPSULE - 1 + ld [wPlayerLinkAction], a + ld [wChosenCableClubRoom], a + ret + +WaitForLinkedFriend: + ld a, [wPlayerLinkAction] + and a + jr z, .no_link_action + ld a, USING_INTERNAL_CLOCK + ldh [rSB], a + xor a + ldh [hSerialReceive], a + ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) + ldh [rSC], a + call DelayFrame + call DelayFrame + call DelayFrame + +.no_link_action + ld a, $2 + ld [wLinkTimeoutFrames + 1], a + ld a, $ff + ld [wLinkTimeoutFrames], a +.loop + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr z, .connected + cp USING_EXTERNAL_CLOCK + jr z, .connected + ld a, CONNECTION_NOT_ESTABLISHED + ldh [hSerialConnectionStatus], a + ld a, USING_INTERNAL_CLOCK + ldh [rSB], a + xor a + ldh [hSerialReceive], a + ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) +; This vc_hook causes the Virtual Console to set [hSerialConnectionStatus] to +; USING_INTERNAL_CLOCK, which allows the player to proceed past the link +; receptionist's "Please wait." It assumes that hSerialConnectionStatus is at +; its original address. + vc_hook Link_fake_connection_status + vc_assert hSerialConnectionStatus == $ffcb, \ + "hSerialConnectionStatus is no longer located at 00:ffcb." + vc_assert USING_INTERNAL_CLOCK == $02, \ + "USING_INTERNAL_CLOCK is no longer equal to $02." + ldh [rSC], a + ld a, [wLinkTimeoutFrames] + dec a + ld [wLinkTimeoutFrames], a + jr nz, .not_done + ld a, [wLinkTimeoutFrames + 1] + dec a + ld [wLinkTimeoutFrames + 1], a + jr z, .done + +.not_done + ld a, USING_EXTERNAL_CLOCK + ldh [rSB], a + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + call DelayFrame + jr .loop + +.connected + call LinkDataReceived + call DelayFrame + call LinkDataReceived + ld c, 50 + call DelayFrames + ld a, $1 + ld [wScriptVar], a + ret + +.done + xor a + ld [wScriptVar], a + ret + +CheckLinkTimeout_Receptionist: + ld a, $1 + ld [wPlayerLinkAction], a + ld hl, wLinkTimeoutFrames + ld a, 3 + ld [hli], a + xor a + ld [hl], a + call WaitBGMap + ld a, $2 + ldh [hVBlank], a + call DelayFrame + call DelayFrame + call Link_CheckCommunicationError + xor a + ldh [hVBlank], a + ld a, [wScriptVar] + and a + ret nz + jp Link_ResetSerialRegistersAfterLinkClosure + +CheckLinkTimeout_Gen2: +; if wScriptVar = 0 on exit, link connection is closed + ld a, $5 + ld [wPlayerLinkAction], a + ld hl, wLinkTimeoutFrames + ld a, 3 + ld [hli], a + xor a + ld [hl], a + call WaitBGMap + ld a, $2 + ldh [hVBlank], a + call DelayFrame + call DelayFrame + call Link_CheckCommunicationError + ld a, [wScriptVar] + and a + jr z, .exit + +; Wait for ~$70000 cycles to give the other GB time to be ready + ld bc, $ffff +.wait + dec bc + ld a, b + or c + jr nz, .wait + +; If other GB is not ready at this point, disconnect due to timeout + ld a, [wOtherPlayerLinkMode] + cp $5 + jr nz, .timeout + +; Another check to increase reliability + ld a, $6 + ld [wPlayerLinkAction], a + ld hl, wLinkTimeoutFrames + vc_patch Wireless_net_delay_9 +if DEF(_CRYSTAL_VC) + ld a, $3 +else + ld a, 1 +endc + vc_patch_end + ld [hli], a + ld [hl], 50 + call Link_CheckCommunicationError + ld a, [wOtherPlayerLinkMode] + cp $6 + jr z, .exit + +.timeout + xor a + ld [wScriptVar], a + ret + +.exit + xor a + ldh [hVBlank], a + ret + +Link_CheckCommunicationError: + xor a + ldh [hSerialReceivedNewData], a + vc_hook Wireless_prompt + ld a, [wLinkTimeoutFrames] + ld h, a + ld a, [wLinkTimeoutFrames + 1] + ld l, a + push hl + call .CheckConnected + pop hl + jr nz, .load_true + call .AcknowledgeSerial + call .ConvertDW + call .CheckConnected + jr nz, .load_true + call .AcknowledgeSerial + xor a ; FALSE + jr .done + +.load_true + ld a, TRUE + +.done + ld [wScriptVar], a + ld hl, wLinkTimeoutFrames + xor a + ld [hli], a + ld [hl], a + ret + +.CheckConnected: + call WaitLinkTransfer + ld hl, wLinkTimeoutFrames + vc_hook Wireless_net_recheck + ld a, [hli] + inc a + ret nz + ld a, [hl] + inc a + ret + +.AcknowledgeSerial: + vc_patch Wireless_net_delay_7 +if DEF(_CRYSTAL_VC) + ld b, 26 +else + ld b, 10 +endc + vc_patch_end +.loop + call DelayFrame + call LinkDataReceived + dec b + jr nz, .loop + ret + +.ConvertDW: + ; [wLinkTimeoutFrames] = ((hl - $100) / 4) + $100 + ; = (hl / 4) + $c0 + dec h + srl h + rr l + srl h + rr l + inc h + ld a, h + ld [wLinkTimeoutFrames], a + ld a, l + ld [wLinkTimeoutFrames + 1], a + ret + +TryQuickSave: + ld a, [wChosenCableClubRoom] + push af + farcall Link_SaveGame + vc_hook Wireless_TryQuickSave_block_input_1 + ld a, TRUE + jr nc, .return_result + vc_hook Wireless_TryQuickSave_block_input_2 + xor a ; FALSE +.return_result + ld [wScriptVar], a + pop af + ld [wChosenCableClubRoom], a + ret + +CheckBothSelectedSameRoom: + ld a, [wChosenCableClubRoom] + call Link_EnsureSync + push af + call LinkDataReceived + call DelayFrame + call LinkDataReceived + pop af + ld b, a + ld a, [wChosenCableClubRoom] + cp b + jr nz, .fail + ld a, [wChosenCableClubRoom] + inc a + ld [wLinkMode], a + xor a + ldh [hVBlank], a + ld a, TRUE + ld [wScriptVar], a + ret + +.fail + xor a ; FALSE + ld [wScriptVar], a + ret + +TimeCapsule: + vc_hook Wireless_TimeCapsule + ld a, LINK_TIMECAPSULE + ld [wLinkMode], a + call DisableSpriteUpdates + callfar LinkCommunications + call EnableSpriteUpdates + xor a + ldh [hVBlank], a + ret + +TradeCenter: + vc_hook Wireless_TradeCenter + ld a, LINK_TRADECENTER + ld [wLinkMode], a + call DisableSpriteUpdates + callfar LinkCommunications + call EnableSpriteUpdates + xor a + ldh [hVBlank], a + ret + +Colosseum: + vc_hook Wireless_Colosseum + ld a, LINK_COLOSSEUM + ld [wLinkMode], a + call DisableSpriteUpdates + callfar LinkCommunications + call EnableSpriteUpdates + xor a + ldh [hVBlank], a + ret + +CloseLink: + xor a + ld [wLinkMode], a + ld c, 3 + call DelayFrames + vc_hook Wireless_room_check + jp Link_ResetSerialRegistersAfterLinkClosure + +FailedLinkToPast: + ld c, 40 + call DelayFrames + ld a, $e + jp Link_EnsureSync + +Link_ResetSerialRegistersAfterLinkClosure: + ld c, 3 + call DelayFrames + ld a, CONNECTION_NOT_ESTABLISHED + ldh [hSerialConnectionStatus], a + ld a, USING_INTERNAL_CLOCK + ldh [rSB], a + xor a + ldh [hSerialReceive], a + ldh [rSC], a + ret + +Link_EnsureSync: + add $d0 + ld [wLinkPlayerSyncBuffer], a + ld [wLinkPlayerSyncBuffer + 1], a + ld a, $2 + ldh [hVBlank], a + call DelayFrame + call DelayFrame +.receive_loop + call Serial_ExchangeSyncBytes + ld a, [wLinkReceivedSyncBuffer] + ld b, a + and $f0 + cp $d0 + jr z, .done + ld a, [wLinkReceivedSyncBuffer + 1] + ld b, a + and $f0 + cp $d0 + jr nz, .receive_loop + +.done + xor a + ldh [hVBlank], a + ld a, b + and $f + ret + +CableClubCheckWhichChris: + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + ld a, TRUE + jr z, .yes + dec a ; FALSE + +.yes + ld [wScriptVar], a + ret + +GSLinkCommsBorderGFX: ; unreferenced +INCBIN "gfx/trade/unused_gs_border_tiles.2bpp" + +CheckSRAM0Flag: ; unreferenced +; input: hl = unknown flag array in "SRAM Bank 0" + ld a, BANK("SRAM Bank 0") + call OpenSRAM + ld d, 0 + ld b, CHECK_FLAG + predef SmallFarFlagAction + call CloseSRAM + ld a, c + and a + ret diff --git a/engine/link/link_2.asm b/engine/link/link_2.asm new file mode 100644 index 0000000..178b11d --- /dev/null +++ b/engine/link/link_2.asm @@ -0,0 +1,93 @@ +LinkMonStatsScreen: + ld a, [wMenuCursorY] + dec a + ld [wCurPartyMon], a + call LowVolume + predef StatsScreenInit + ld a, [wCurPartyMon] + inc a + ld [wMenuCursorY], a + call ClearScreen + call ClearBGPalettes + call MaxVolume + farcall LoadTradeScreenBorderGFX + farcall Link_WaitBGMap + farcall InitTradeSpeciesList + farcall SetTradeRoomBGPals + call WaitBGMap2 + ret + +Link_WaitBGMap: + call WaitBGMap + call WaitBGMap2 + ret + +LinkTextbox2: + ld h, d + ld l, e + push bc + push hl + call .PlaceBorder + pop hl + pop bc + + ld de, wAttrmap - wTilemap + add hl, de + inc b + inc b + inc c + inc c + ld a, PAL_BG_TEXT +.row + push bc + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + ld de, SCREEN_WIDTH + add hl, de + pop bc + dec b + jr nz, .row + ret + +.PlaceBorder: + push hl + ld a, $76 + ld [hli], a + inc a + call .PlaceRow + inc a + ld [hl], a + pop hl + ld de, SCREEN_WIDTH + add hl, de +.loop + push hl + ld a, $79 + ld [hli], a + ld a, " " + call .PlaceRow + ld [hl], $7a + pop hl + ld de, SCREEN_WIDTH + add hl, de + dec b + jr nz, .loop + + ld a, $7b + ld [hli], a + ld a, $7c + call .PlaceRow + ld [hl], $7d + ret + +.PlaceRow: + ld d, c +.row_loop + ld [hli], a + dec d + jr nz, .row_loop + ret diff --git a/engine/link/link_trade.asm b/engine/link/link_trade.asm new file mode 100644 index 0000000..8c0ff68 --- /dev/null +++ b/engine/link/link_trade.asm @@ -0,0 +1,342 @@ +LinkCommsBorderGFX: +INCBIN "gfx/trade/border_tiles.2bpp" + +__LoadTradeScreenBorderGFX: + ld de, LinkCommsBorderGFX + ld hl, vTiles2 + lb bc, BANK(LinkCommsBorderGFX), 70 + call Get2bpp + ret + +LoadMobileTradeBorderTilemap: + ld hl, MobileTradeBorderTilemap + decoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call CopyBytes + ret + +TestMobileTradeBorderTilemap: ; unreferenced +; Loads the mobile trade border graphics and tilemap, +; with a placeholder SCGB_DIPLOMA layout, and exits +; after pressing A or B. Possibly used for testing. + call LoadStandardMenuHeader + call ClearBGPalettes + call ClearTilemap + call ClearSprites + farcall __LoadTradeScreenBorderGFX ; useless to farcall + farcall LoadMobileTradeBorderTilemap ; useless to farcall + ld b, SCGB_DIPLOMA + call GetSGBLayout + call SetPalettes + call WaitBGMap + call JoyWaitAorB + call ExitMenu + ret + +MobileTradeBorderTilemap: +INCBIN "gfx/trade/border_mobile.tilemap" + +CableTradeBorderTopTilemap: +INCBIN "gfx/trade/border_cable_top.tilemap" + +CableTradeBorderBottomTilemap: +INCBIN "gfx/trade/border_cable_bottom.tilemap" + +_LinkTextbox: + ld h, d + ld l, e + push bc + push hl + call .PlaceBorder + pop hl + pop bc + + ld de, wAttrmap - wTilemap + add hl, de + inc b + inc b + inc c + inc c + ld a, PAL_BG_TEXT +.row + push bc + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + ld de, SCREEN_WIDTH + add hl, de + pop bc + dec b + jr nz, .row + ret + +.PlaceBorder + push hl + ld a, $30 + ld [hli], a + inc a + call .PlaceRow + inc a + ld [hl], a + pop hl + ld de, SCREEN_WIDTH + add hl, de +.loop + push hl + ld a, $33 + ld [hli], a + ld a, " " + call .PlaceRow + ld [hl], $34 + pop hl + ld de, SCREEN_WIDTH + add hl, de + dec b + jr nz, .loop + + ld a, $35 + ld [hli], a + ld a, $36 + call .PlaceRow + ld [hl], $37 + ret + +.PlaceRow + ld d, c +.row_loop + ld [hli], a + dec d + jr nz, .row_loop + ret + +InitTradeSpeciesList: + call _LoadTradeScreenBorderGFX + call LoadCableTradeBorderTilemap + farcall InitMG_Mobile_LinkTradePalMap + farcall PlaceTradePartnerNamesAndParty + hlcoord 10, 17 + ld de, .CancelString + call PlaceString + ret + +.CancelString: + db "CANCEL@" + +_LoadTradeScreenBorderGFX: + call __LoadTradeScreenBorderGFX + ret + +LinkComms_LoadPleaseWaitTextboxBorderGFX: + ld de, LinkCommsBorderGFX + $30 tiles + ld hl, vTiles2 tile $76 + lb bc, BANK(LinkCommsBorderGFX), 8 + call Get2bpp + ret + +LoadTradeRoomBGPals: + farcall _LoadTradeRoomBGPals + ret + +LoadCableTradeBorderTilemap: + call LoadMobileTradeBorderTilemap + ld hl, CableTradeBorderTopTilemap + decoord 0, 0 + ld bc, 2 * SCREEN_WIDTH + call CopyBytes + ld hl, CableTradeBorderBottomTilemap + decoord 0, 16 + ld bc, 2 * SCREEN_WIDTH + call CopyBytes + ret + +LinkTextbox: + call _LinkTextbox + ret + +PrintWaitingTextAndSyncAndExchangeNybble: + call LoadStandardMenuHeader + call .PrintWaitingText + farcall WaitLinkTransfer + call ExitMenu + call WaitBGMap2 + ret + +.PrintWaitingText: + hlcoord 4, 10 + ld b, 1 + ld c, 10 + predef LinkTextboxAtHL + hlcoord 5, 11 + ld de, .Waiting + call PlaceString + call WaitBGMap + call WaitBGMap2 + ld c, 50 + jp DelayFrames + +.Waiting: + db "WAITING..!@" + +LinkTradeMenu: + call .MenuAction + call .GetJoypad + ret + +.GetJoypad: + push bc + push af + ldh a, [hJoyLast] + and D_PAD + ld b, a + ldh a, [hJoyPressed] + and BUTTONS + or b + ld b, a + pop af + ld a, b + pop bc + ld d, a + ret + +.MenuAction: + ld hl, w2DMenuFlags2 + res 7, [hl] + ldh a, [hBGMapMode] + push af + call .loop + pop af + ldh [hBGMapMode], a + ret + +.loop + call .UpdateCursor + call .UpdateBGMapAndOAM + call .loop2 + jr nc, .done + farcall _2DMenuInterpretJoypad + jr c, .done + ld a, [w2DMenuFlags1] + bit 7, a + jr nz, .done + call .GetJoypad + ld b, a + ld a, [wMenuJoypadFilter] + and b + jr z, .loop + +.done + ret + +.UpdateBGMapAndOAM: + ldh a, [hOAMUpdate] + push af + ld a, $1 + ldh [hOAMUpdate], a + call WaitBGMap + pop af + ldh [hOAMUpdate], a + xor a + ldh [hBGMapMode], a + ret + +.loop2 + call UpdateTimeAndPals + call .TryAnims + ret c + ld a, [w2DMenuFlags1] + bit 7, a + jr z, .loop2 + and a + ret + +.UpdateCursor: + ld hl, wCursorCurrentTile + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hl] + cp $1f + jr nz, .not_currently_selected + ld a, [wCursorOffCharacter] + ld [hl], a + push hl + push bc + ld bc, MON_NAME_LENGTH + add hl, bc + ld [hl], a + pop bc + pop hl + +.not_currently_selected + ld a, [w2DMenuCursorInitY] + ld b, a + ld a, [w2DMenuCursorInitX] + ld c, a + call Coord2Tile + ld a, [w2DMenuCursorOffsets] + swap a + and $f + ld c, a + ld a, [wMenuCursorY] + ld b, a + xor a + dec b + jr z, .skip +.loop3 + add c + dec b + jr nz, .loop3 + +.skip + ld c, SCREEN_WIDTH + call AddNTimes + ld a, [w2DMenuCursorOffsets] + and $f + ld c, a + ld a, [wMenuCursorX] + ld b, a + xor a + dec b + jr z, .skip2 +.loop4 + add c + dec b + jr nz, .loop4 + +.skip2 + ld c, a + add hl, bc + ld a, [hl] + cp $1f + jr z, .cursor_already_there + ld [wCursorOffCharacter], a + ld [hl], $1f + push hl + push bc + ld bc, MON_NAME_LENGTH + add hl, bc + ld [hl], $1f + pop bc + pop hl +.cursor_already_there + ld a, l + ld [wCursorCurrentTile], a + ld a, h + ld [wCursorCurrentTile + 1], a + ret + +.TryAnims: + ld a, [w2DMenuFlags1] + bit 6, a + jr z, .skip_anims + farcall PlaySpriteAnimationsAndDelayFrame +.skip_anims + call JoyTextDelay + call .GetJoypad + and a + ret z + scf + ret diff --git a/engine/link/mystery_gift.asm b/engine/link/mystery_gift.asm new file mode 100644 index 0000000..0264d9c --- /dev/null +++ b/engine/link/mystery_gift.asm @@ -0,0 +1,1923 @@ +; hMGRole values +DEF IR_RECEIVER EQU 1 +DEF IR_SENDER EQU 2 + +; hMGStatusFlags error bits +DEF MG_WRONG_CHECKSUM_F EQU 0 +DEF MG_TIMED_OUT_F EQU 1 +DEF MG_CANCELED_F EQU 4 +DEF MG_WRONG_PREFIX_F EQU 7 + +; hMGStatusFlags values +DEF MG_WRONG_CHECKSUM EQU 1 << MG_WRONG_CHECKSUM_F +DEF MG_TIMED_OUT EQU 1 << MG_TIMED_OUT_F +DEF MG_CANCELED EQU 1 << MG_CANCELED_F +DEF MG_WRONG_PREFIX EQU 1 << MG_WRONG_PREFIX_F +DEF MG_NOT_OKAY EQU MG_WRONG_CHECKSUM | MG_TIMED_OUT | MG_CANCELED | MG_WRONG_PREFIX +DEF MG_OKAY EQU ~MG_NOT_OKAY +DEF MG_START_END EQU %11111111 + +DEF REGION_PREFIX EQU $96 +DEF REGION_CODE EQU $90 ; USA + +DEF MESSAGE_PREFIX EQU $5a + +DEF NAME_CARD_PREFIX EQU $3c + +DoMysteryGift: + call ClearTilemap + call ClearSprites + call WaitBGMap + call InitMysteryGiftLayout + hlcoord 3, 8 + ld de, .String_PressAToLink_BToCancel + call PlaceString + call WaitBGMap + + ; Prepare the first of two messages for wMysteryGiftPartnerData + farcall StageDataForMysteryGift + call ClearMysteryGiftTrainer + vc_patch Infrared_stage_party_data +if DEF(_CRYSTAL_VC) + farcall StagePartyDataForMysteryGift + call ClearMysteryGiftTrainer + nop +else + ld a, 2 + ld [wMysteryGiftMessageCount], a + ld a, wMysteryGiftPartnerDataEnd - wMysteryGiftPartnerData + ld [wMysteryGiftStagedDataLength], a +endc + vc_patch_end + + ldh a, [rIE] + push af + call ExchangeMysteryGiftData + vc_hook Infrared_ExchangeMysteryGiftData_end + ld d, a + xor a + ldh [rIF], a + pop af + ldh [rIE], a + + push de + call ClearTilemap + call EnableLCD + call WaitBGMap + ld b, SCGB_DIPLOMA + call GetSGBLayout + call SetPalettes + pop de + + hlcoord 2, 8 + ld a, d + ld de, .MysteryGiftCanceledText ; Link has been canceled + cp MG_CANCELED + jp z, .LinkCanceled + cp MG_OKAY + jp nz, .CommunicationError + ld a, [wMysteryGiftPartnerGameVersion] + cp POKEMON_PIKACHU_2_VERSION + jr z, .skip_checks + call .CheckAlreadyGotFiveGiftsToday + ld hl, .MysteryGiftFiveADayText ; Only 5 gifts a day + jp nc, .PrintTextAndExit + call .CheckAlreadyGotAGiftFromThatPerson + ld hl, .MysteryGiftOneADayText ; Only one gift a day per person + jp c, .PrintTextAndExit +.skip_checks + ld a, [wMysteryGiftPlayerBackupItem] + and a + jp nz, .GiftWaiting + ld a, [wMysteryGiftPartnerBackupItem] + and a + jp nz, .FriendNotReady + ld a, [wMysteryGiftPartnerGameVersion] + cp POKEMON_PIKACHU_2_VERSION + jr z, .skip_append_save + call .AddMysteryGiftPartnerID + ld a, [wMysteryGiftPartnerGameVersion] + cp RESERVED_GAME_VERSION + jr z, .skip_append_save + call .SaveMysteryGiftTrainerName + farcall RestoreMobileEventIndex + farcall StubbedTrainerRankings_MysteryGift + farcall BackupMobileEventIndex +.skip_append_save + ld a, [wMysteryGiftPartnerSentDeco] + and a + jr z, .SentItem +; sent decoration + ld a, [wMysteryGiftPartnerWhichDeco] + ld c, a + farcall MysteryGiftGetDecoration + push bc + call CheckAndSetMysteryGiftDecorationAlreadyReceived + pop bc + jr nz, .SentItem +; keep the decoration if it wasn't already received + callfar GetDecorationName_c + ld h, d + ld l, e + ld de, wStringBuffer1 + ld bc, ITEM_NAME_LENGTH + call CopyBytes + ld hl, .MysteryGiftSentHomeText ; sent decoration to home + jr .PrintTextAndExit + +.SentItem: + call GetMysteryGiftBank + ld a, [wMysteryGiftPartnerWhichItem] + ld c, a + farcall MysteryGiftGetItem + ld a, c + ld [sBackupMysteryGiftItem], a + ld [wNamedObjectIndex], a + call CloseSRAM + call GetItemName + ld hl, .MysteryGiftSentText ; sent item/decoration + jr .PrintTextAndExit + +.LinkCanceled: + ld hl, .MysteryGiftCanceledText ; Link has been canceled + jr .PrintTextAndExit + +.CommunicationError: + ld hl, .MysteryGiftCommErrorText ; Communication error + call PrintText + jp DoMysteryGift + +.GiftWaiting: + ld hl, .RetrieveMysteryGiftText ; receive gift at counter + jr .PrintTextAndExit + +.FriendNotReady: + ld hl, .YourFriendIsNotReadyText ; friend not ready + ; fallthrough + +.PrintTextAndExit: + call PrintText + ld a, LCDC_DEFAULT + ldh [rLCDC], a + ret + +.String_PressAToLink_BToCancel: + db "Press A to" + next "link IR-Device" + next "Press B to" + next "cancel it." + db "@" + +.MysteryGiftCanceledText: + text_far _MysteryGiftCanceledText + text_end + +.MysteryGiftCommErrorText: + text_far _MysteryGiftCommErrorText + text_end + +.RetrieveMysteryGiftText: + text_far _RetrieveMysteryGiftText + text_end + +.YourFriendIsNotReadyText: + text_far _YourFriendIsNotReadyText + text_end + +.MysteryGiftFiveADayText: + text_far _MysteryGiftFiveADayText + text_end + +.MysteryGiftOneADayText: + text_far _MysteryGiftOneADayText + text_end + +.MysteryGiftSentText: + text_far _MysteryGiftSentText + text_end + +.MysteryGiftSentHomeText: + text_far _MysteryGiftSentHomeText + text_end + +.CheckAlreadyGotFiveGiftsToday: + call GetMysteryGiftBank + ld a, [sNumDailyMysteryGiftPartnerIDs] + cp MAX_MYSTERY_GIFT_PARTNERS + jp CloseSRAM + +.CheckAlreadyGotAGiftFromThatPerson: + call GetMysteryGiftBank + ld a, [wMysteryGiftPartnerID] + ld b, a + ld a, [wMysteryGiftPartnerID + 1] + ld c, a + ld a, [sNumDailyMysteryGiftPartnerIDs] + ld d, a + ld hl, sDailyMysteryGiftPartnerIDs +.loop + ld a, d + and a + jr z, .No + ld a, [hli] + cp b + jr nz, .skip + ld a, [hl] + cp c + jr z, .Yes +.skip + inc hl + dec d + jr .loop +.Yes: + scf +.No: + jp CloseSRAM + +.AddMysteryGiftPartnerID: + call GetMysteryGiftBank + ld hl, sNumDailyMysteryGiftPartnerIDs + ld a, [hl] + inc [hl] + ld hl, sDailyMysteryGiftPartnerIDs ; could have done "inc hl" instead + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [wMysteryGiftPartnerID] + ld [hli], a + ld a, [wMysteryGiftPartnerID + 1] + ld [hl], a + jp CloseSRAM + +.SaveMysteryGiftTrainerName: + call GetMysteryGiftBank + ld a, TRUE + ld [sMysteryGiftTrainerHouseFlag], a + ld hl, wMysteryGiftPartnerName + ld de, sMysteryGiftPartnerName + ld bc, NAME_LENGTH + call CopyBytes + assert sMysteryGiftPartnerName + NAME_LENGTH == sMysteryGiftUnusedFlag + ld a, TRUE + ld [de], a + inc de + assert sMysteryGiftUnusedFlag + 1 == sMysteryGiftTrainer + ld hl, wMysteryGiftTrainer + ld bc, wMysteryGiftTrainerEnd - wMysteryGiftTrainer + call CopyBytes + jp CloseSRAM + +ExchangeMysteryGiftData: + vc_hook Infrared_ExchangeMysteryGiftData_start + vc_patch Infrared_ExchangeMysteryGiftData_function +if DEF(_CRYSTAL_VC) + ld d, $ef +.loop + dec d + ld a, d + or a + jr nz, .loop + vc_hook Infrared_ExchangeMysteryGiftData_loop_done + nop + cp MG_CANCELED +.restart ; same location as unpatched .restart + ret z + nop + nop + cp MG_OKAY + jr nz, ExchangeMysteryGiftData + ret +else + di + farcall ClearChannels + call InitializeIRCommunicationInterrupts + +.restart + call BeginIRCommunication + call InitializeIRCommunicationRoles + ldh a, [hMGStatusFlags] +endc + vc_patch_end + cp MG_CANCELED + jp z, EndOrContinueMysteryGiftIRCommunication + cp MG_OKAY + jr nz, .restart + + ldh a, [hMGRole] + cp IR_SENDER + jr z, SenderExchangeMysteryGiftDataPayloads + + ld hl, hMGExchangedByte + ld b, 1 + call TryReceivingIRDataBlock + jr nz, .failed + call ReceiveMysteryGiftDataPayload_GotRegionPrefix + jp nz, EndOrContinueMysteryGiftIRCommunication + jr ReceiverExchangeMysteryGiftDataPayloads_GotPayload + +.failed + ; Delay frame +.wait_frame + ldh a, [rLY] + cp LY_VBLANK + jr c, .wait_frame + + ld c, LOW(rRP) + ld a, rRP_ENABLE_READ_MASK + ldh [c], a + + ld b, 60 * 4 ; 4 seconds +.continue + push bc + call MysteryGift_UpdateJoypad + ld b, 1 << rRP_RECEIVING + ld c, LOW(rRP) +.in_vblank + ldh a, [c] + and b + ld b, a + ldh a, [rLY] + cp LY_VBLANK + jr nc, .in_vblank +.wait_vblank + ldh a, [c] + and b + ld b, a + ldh a, [rLY] + cp LY_VBLANK + jr c, .wait_vblank + ld a, b + pop bc + ; Restart if the 4-second timeout has elapsed + dec b + jr z, .restart + ; Restart if rRP is not receiving data + or a + jr nz, .restart + ; Check if we've pressed the B button to cancel + ldh a, [hMGJoypadReleased] + bit B_BUTTON_F, a + jr z, .continue + ld a, MG_CANCELED + ldh [hMGStatusFlags], a + jp EndOrContinueMysteryGiftIRCommunication + +ReceiverExchangeMysteryGiftDataPayloads: + ; Receive the data payload + call ReceiveMysteryGiftDataPayload + jp nz, EndOrContinueMysteryGiftIRCommunication + ; fallthrough +ReceiverExchangeMysteryGiftDataPayloads_GotPayload: + ; Switch roles + call BeginSendingIRCommunication + jp nz, EndOrContinueMysteryGiftIRCommunication + ; Send the data payload + call SendMysteryGiftDataPayload + jp nz, EndOrContinueMysteryGiftIRCommunication + ; Switch roles + call BeginReceivingIRCommunication + jp nz, EndOrContinueMysteryGiftIRCommunication + ; Receive an empty block + call ReceiveEmptyIRDataBlock + jp EndOrContinueMysteryGiftIRCommunication + +SenderExchangeMysteryGiftDataPayloads: + ; Send the data payload + call SendMysteryGiftDataPayload + jp nz, EndOrContinueMysteryGiftIRCommunication + ; Switch roles + call BeginReceivingIRCommunication + jp nz, EndOrContinueMysteryGiftIRCommunication + ; Receive the data payload + call ReceiveMysteryGiftDataPayload + jp nz, EndOrContinueMysteryGiftIRCommunication + ; Switch roles + call BeginSendingIRCommunication + jp nz, EndOrContinueMysteryGiftIRCommunication + ; Send an empty block + call SendEmptyIRDataBlock + jp EndOrContinueMysteryGiftIRCommunication + +ReceiveMysteryGiftDataPayload: + ; Receive the region prefix + ld hl, hMGExchangedByte + ld b, 1 + call TryReceivingIRDataBlock + ret nz + ; fallthrough +ReceiveMysteryGiftDataPayload_GotRegionPrefix: + ; Receive an empty block + call ReceiveEmptyIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret nz + ; Verify the received region prefix + ldh a, [hMGExchangedByte] + cp REGION_PREFIX + jp nz, WrongMysteryGiftRegion + ld a, REGION_CODE + ldh [hMGExchangedByte], a + ; Switch roles + call BeginSendingIRCommunication + ret nz + ; Send the region code + ld hl, hMGExchangedByte + ld b, 1 + call TrySendingIRDataBlock + ret nz + ; Send an empty block + call SendEmptyIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret nz + ; Switch roles + call BeginReceivingIRCommunication + ret nz + ; Receive the staged data + ld hl, wMysteryGiftTrainer + ld a, [wMysteryGiftStagedDataLength] + ld b, a + call TryReceivingIRDataBlock + ret nz + ; Receive an empty block + call ReceiveEmptyIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret + +SendMysteryGiftDataPayload: + ; Send the region prefix + ld a, REGION_PREFIX + ldh [hMGExchangedByte], a + ld hl, hMGExchangedByte + ld b, 1 + call TrySendingIRDataBlock + ret nz + ; Send an empty block + call SendEmptyIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret nz + ; Switch roles + call BeginReceivingIRCommunication + ret nz + ; Receive the region code + ld hl, hMGExchangedByte + ld b, 1 + call TryReceivingIRDataBlock + ret nz + ; Receive an empty block + call ReceiveEmptyIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret nz + ; Verify the received region code + ldh a, [hMGExchangedByte] + cp REGION_CODE + jp nz, WrongMysteryGiftRegion + ; Switch roles + call BeginSendingIRCommunication + ret nz + ; Send the staged data + ld hl, wMysteryGiftStaging + ld a, [wMysteryGiftStagedDataLength] + ld b, a + call TrySendingIRDataBlock + ret nz + ; Send an empty block + call SendEmptyIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret + +EndOrContinueMysteryGiftIRCommunication: + nop + ldh a, [hMGStatusFlags] + ; Quit if player canceled + cp MG_CANCELED + jr z, .quit + ; Quit if there was a communication error + cp MG_OKAY + jr nz, .quit + ; Quit if all messages are sent/received + ld hl, wMysteryGiftMessageCount + dec [hl] + jr z, .quit + ; Quit if communicating with Pokémon Pikachu 2 device + ld hl, wMysteryGiftTrainer + ld de, wMysteryGiftPartnerData + ld bc, wMysteryGiftPartnerDataEnd - wMysteryGiftPartnerData + call CopyBytes + ld a, [wMysteryGiftTrainer] ; first byte is the version + cp POKEMON_PIKACHU_2_VERSION + jr nc, .quit + + ; Prepare the second message for wMysteryGiftTrainer + farcall StagePartyDataForMysteryGift + call ClearMysteryGiftTrainer + ld a, wMysteryGiftTrainerEnd - wMysteryGiftTrainer + ld [wMysteryGiftStagedDataLength], a + + ldh a, [hMGRole] + cp IR_SENDER + jr z, .sender + + call BeginReceivingIRCommunication + jr nz, EndOrContinueMysteryGiftIRCommunication + jp ReceiverExchangeMysteryGiftDataPayloads + +.sender + call BeginSendingIRCommunication + jr nz, EndOrContinueMysteryGiftIRCommunication + jp SenderExchangeMysteryGiftDataPayloads + +.quit + ldh a, [hMGStatusFlags] + push af + call EndIRCommunication + xor a + ldh [rIF], a + ldh a, [rIE] + or 1 << VBLANK + ldh [rIE], a + ei + call DelayFrame + pop af + ret + +ExchangeNameCardData: + di + farcall ClearChannels + call InitializeIRCommunicationInterrupts + +.restart + call BeginIRCommunication + call InitializeIRCommunicationRoles + ldh a, [hMGStatusFlags] + cp MG_CANCELED + jp z, EndNameCardIRCommunication + cp MG_OKAY + jr nz, .restart + + ldh a, [hMGRole] + cp IR_SENDER + jr z, .sender + + ; Receive the data payload + call ReceiveNameCardDataPayload + jp nz, EndNameCardIRCommunication + ; Switch roles + call BeginSendingIRCommunication + jp nz, EndNameCardIRCommunication + ; Send the data payload + call SendNameCardDataPayload + jp nz, EndNameCardIRCommunication + ; Switch roles + call BeginReceivingIRCommunication + jp nz, EndNameCardIRCommunication + ; Receive an empty block + call ReceiveEmptyIRDataBlock + jp EndNameCardIRCommunication + +.sender + ; Send the data payload + call SendNameCardDataPayload + jp nz, EndNameCardIRCommunication + ; Switch roles + call BeginReceivingIRCommunication + jp nz, EndNameCardIRCommunication + ; Receive the data payload + call ReceiveNameCardDataPayload + jp nz, EndNameCardIRCommunication + ; Switch roles + call BeginSendingIRCommunication + jp nz, EndNameCardIRCommunication + ; Send an empty block + call SendEmptyIRDataBlock + jp EndNameCardIRCommunication + +ReceiveNameCardDataPayload: + ; Receive the Name Card prefix + ld hl, hMGExchangedByte + ld b, 1 + call TryReceivingIRDataBlock + ret nz + ; Receive an empty block + call ReceiveEmptyIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret nz + ; Verify the received Name Card prefix + ldh a, [hMGExchangedByte] + cp NAME_CARD_PREFIX + jp nz, WrongMysteryGiftRegion + swap a + ldh [hMGExchangedByte], a + ; Switch roles + call BeginSendingIRCommunication + ret nz + ; Send the swapped Name Card prefix + ld hl, hMGExchangedByte + ld b, 1 + call TrySendingIRDataBlock + ret nz + ; Send an empty block + call SendEmptyIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret nz + ; Switch roles + call BeginReceivingIRCommunication + ret nz + ; Receive the staged data + ld hl, wNameCardData + ld a, [wMysteryGiftStagedDataLength] + ld b, a + call TryReceivingIRDataBlock + ret nz + ; Receive an empty block + call ReceiveEmptyIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret + +SendNameCardDataPayload: + ; Send the Name Card prefix + ld a, NAME_CARD_PREFIX + ldh [hMGExchangedByte], a + ld hl, hMGExchangedByte + ld b, 1 + call TrySendingIRDataBlock + ret nz + ; Send an empty block + call SendEmptyIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret nz + ; Switch roles + call BeginReceivingIRCommunication + ret nz + ; Receive the swapped Name Card prefix + ld hl, hMGExchangedByte + ld b, 1 + call TryReceivingIRDataBlock + ret nz + ; Receive an empty block + call ReceiveEmptyIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret nz + ; Verify the received swapped Name Card prefix + ldh a, [hMGExchangedByte] + swap a + cp NAME_CARD_PREFIX + jp nz, WrongMysteryGiftRegion + ; Switch roles + call BeginSendingIRCommunication + ret nz + ; Send the staged data + ld hl, wMysteryGiftStaging + ld a, [wMysteryGiftStagedDataLength] + ld b, a + call TrySendingIRDataBlock + ret nz + ; Send an empty block + call SendEmptyIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret + +EndNameCardIRCommunication: + nop + ldh a, [hMGStatusFlags] + push af + call EndIRCommunication + xor a + ldh [rIF], a + ldh a, [rIE] + or 1 << VBLANK + ldh [rIE], a + ei + call DelayFrame + pop af + ret + +WrongMysteryGiftRegion: + ld a, MG_WRONG_PREFIX + ldh [hMGStatusFlags], a + and a + ret + +BeginSendingIRCommunication: + call BeginIRCommunication + call SendIRHelloMessage + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret + +BeginReceivingIRCommunication: + call BeginIRCommunication + call ReceiveIRHelloMessage + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret + +TrySendingIRDataBlock: + call SendIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret + +TryReceivingIRDataBlock: + call ReceiveIRDataBlock + ldh a, [hMGStatusFlags] + cp MG_OKAY + ret + +InitializeIRCommunicationInterrupts: + call StartFastIRTimer + ld a, 1 << TIMER + ldh [rIE], a + xor a + ldh [rIF], a + call BeginIRCommunication +; waits for ~$40400 cycles = ~0.25 seconds + xor a + ld b, a +.busy_wait + inc a + jr nz, .busy_wait + inc b + jr nz, .busy_wait + ret + +StartFastIRTimer: +; Starts a 65,536 Hz timer that interrupts every 3 increments (21,845 Hz). + xor a + ldh [rTAC], a + ld a, -2 + ldh [rTMA], a + ldh [rTIMA], a + ld a, rTAC_65536_HZ + ldh [rTAC], a + or 1 << rTAC_ON + ldh [rTAC], a + ret + +StartSlowIRTimer: +; Starts a 65,536 Hz timer that interrupts every 256 increments (256 Hz). + xor a + ldh [rTAC], a + ldh [rTMA], a + ldh [rTIMA], a + ld a, rTAC_65536_HZ + ldh [rTAC], a + or 1 << rTAC_ON + ldh [rTAC], a + ret + +BeginIRCommunication: + ld a, rRP_ENABLE_READ_MASK + call ToggleIRCommunication + ld a, IR_RECEIVER + ldh [hMGRole], a + ret + +EndIRCommunication: + xor a + call ToggleIRCommunication + ld a, rTAC_65536_HZ + ldh [rTAC], a + ret + +ReceiveInfraredLEDOn: +; Count interrupts of the partner's IR LED on; quit after 256-d interrupts. +.recv_loop + inc d + ret z + xor a + ldh [rIF], a + halt + nop + ldh a, [c] + bit rRP_RECEIVING, a + jr z, .recv_loop + or a + ret + +ReceiveInfraredLEDOff: +; Count interrupts of the partner's IR LED off; quit after 256-d interrupts. +.no_recv_loop + inc d + ret z + xor a + ldh [rIF], a + halt + nop + ldh a, [c] + bit rRP_RECEIVING, a + jr nz, .no_recv_loop + or a + ret + +SendInfraredLEDOn: +; Holds the IR LED on for d-1 interrupts. + ld a, rRP_ENABLE_READ_MASK | (1 << rRP_LED_ON) + ldh [c], a +.wait + dec d + ret z + xor a + ldh [rIF], a + halt + nop + jr .wait + +SendInfraredLEDOff: +; Holds the IR LED off for d-1 interrupts. + ld a, rRP_ENABLE_READ_MASK + ldh [c], a +.wait + dec d + ret z + xor a + ldh [rIF], a + halt + nop + jr .wait + +InitializeIRCommunicationRoles: + ld d, 0 + ld e, d + + ld a, IR_RECEIVER + ldh [hMGRole], a +.loop + call MysteryGift_UpdateJoypad + ld b, 1 << rRP_RECEIVING + ld c, LOW(rRP) + ; Check if we've pressed the B button to cancel + ldh a, [hMGJoypadReleased] + bit B_BUTTON_F, a + jr z, .not_canceled + ld a, MG_CANCELED + ldh [hMGStatusFlags], a + ret + +.not_canceled + ; Check if we've pressed the A button to start sending + bit A_BUTTON_F, a + jr nz, SendIRHelloMessageAfterDelay + ; If rRP is not receiving data, keep checking for input + ldh a, [c] + and b + jr nz, .loop + ; fallthrough + +ReceiveIRHelloMessage: + ld c, LOW(rRP) + ld d, 0 + ld e, d + + call ReceiveInfraredLEDOff + jp z, InfraredLEDReceiveTimedOut + ld d, e + call ReceiveInfraredLEDOn + jp z, InfraredLEDReceiveTimedOut + call ReceiveInfraredLEDOff + jp z, InfraredLEDReceiveTimedOut + call ReceiveInfraredLEDOn + jp z, InfraredLEDReceiveTimedOut + + ld a, MG_OKAY + ldh [hMGStatusFlags], a + + ld d, 61 + call SendInfraredLEDOff + ld d, 5 + call SendInfraredLEDOn + ld d, 21 + call SendInfraredLEDOff + ld d, 5 + call SendInfraredLEDOn + ld d, 5 + call SendInfraredLEDOff + ret + +SendIRHelloMessageAfterDelay: + ; Wait a random amount of time + call Random + ld e, a + and $f + ld d, a +.wait_loop + dec de + ld a, d + or e + jr nz, .wait_loop + ; fallthrough + +SendIRHelloMessage: + ld a, IR_SENDER + ldh [hMGRole], a + + ld c, LOW(rRP) + ld d, 0 + ld e, d + + ld d, 61 + call SendInfraredLEDOff + ld d, 5 + call SendInfraredLEDOn + ld d, 21 + call SendInfraredLEDOff + ld d, 5 + call SendInfraredLEDOn + ld d, 5 + call SendInfraredLEDOff + + ld d, e + call ReceiveInfraredLEDOff + jp z, InfraredLEDReceiveTimedOut + ld d, e + call ReceiveInfraredLEDOn + jp z, InfraredLEDReceiveTimedOut + call ReceiveInfraredLEDOff + jp z, InfraredLEDReceiveTimedOut + call ReceiveInfraredLEDOn + jp z, InfraredLEDReceiveTimedOut + + ld d, 61 + call SendInfraredLEDOff + + ld a, MG_OKAY + ldh [hMGStatusFlags], a + ret + +ToggleIRCommunication: + ldh [rRP], a + ld a, MG_START_END + ldh [hMGStatusFlags], a + ret + +SendIRDataBlock: +; Send b bytes of data in three messages: +; 1. two bytes: MESSAGE_PREFIX and the length b +; 2. b bytes: the actual data +; 3. two bytes: a little-endian checksum +; Then receive a one-byte acknowledgement message: the status. + xor a + ldh [hMGChecksum + 0], a + ldh [hMGChecksum + 1], a + push hl + push bc + ld c, LOW(rRP) + ld d, 61 + call SendInfraredLEDOff + ld hl, hMGExchangedWord + ld a, MESSAGE_PREFIX + ld [hli], a + ld [hl], b + dec hl + ld b, 2 + call SendIRDataMessage + pop bc + pop hl + call SendIRDataMessage + ldh a, [hMGChecksum + 0] + ldh [hMGExchangedWord + 0], a + ldh a, [hMGChecksum + 1] + ldh [hMGExchangedWord + 1], a + push hl + ld hl, hMGExchangedWord + ld b, 2 + call SendIRDataMessage + ld hl, hMGStatusFlags + ld b, 1 + call ReceiveIRDataMessage + ldh a, [hMGExchangedWord + 0] + ldh [hMGChecksum + 0], a + ldh a, [hMGExchangedWord + 1] + ldh [hMGChecksum + 1], a + pop hl + ret + +SendIRDataMessage: +; Send b bytes of data one bit at a time, and update the checksum. + ld c, LOW(rRP) + + ld d, 5 + call SendInfraredLEDOff + ld d, 5 + call SendInfraredLEDOn + ld d, 21 + call SendInfraredLEDOff + + ; b = -b - 1; then count up to 0 + ld a, b + cpl + ld b, a + + ld a, -12 + ldh [rTMA], a +.byte_loop + inc b + jr z, .done + ld a, 8 + ldh [hMGNumBits], a + ; Get the next data byte + ld a, [hli] + ld e, a + ; Add the next data byte to the checksum + ldh a, [hMGChecksum + 0] + add e + ldh [hMGChecksum + 0], a + ldh a, [hMGChecksum + 1] + adc 0 + ldh [hMGChecksum + 1], a + ; Send each bit of the byte +.bit_loop + xor a + ldh [rIF], a + halt + nop + ld a, rRP_ENABLE_READ_MASK | (1 << rRP_LED_ON) + ldh [rRP], a + ; Turn the LED off for longer if the bit is 1 + ld d, 1 + ld a, e + rlca + ld e, a + jr nc, .wait + inc d +.wait + ldh a, [rTIMA] + cp -8 + jr c, .wait + ld a, rRP_ENABLE_READ_MASK + ldh [rRP], a + dec d + jr z, .no_halt + xor a + ldh [rIF], a + halt + nop +.no_halt + ldh a, [hMGNumBits] + dec a + jr z, .byte_loop + ldh [hMGNumBits], a + jr .bit_loop + +.done + ld a, -2 + ldh [rTMA], a + xor a + ldh [rIF], a + halt + nop + + ld d, 5 + call SendInfraredLEDOn + ld d, 17 + call SendInfraredLEDOff + ret + +InfraredLEDReceiveTimedOut: + ldh a, [hMGStatusFlags] + or MG_TIMED_OUT + ldh [hMGStatusFlags], a + ret + +ReceivedWrongIRChecksum: + ldh a, [hMGStatusFlags] + or MG_WRONG_CHECKSUM + ldh [hMGStatusFlags], a + ret + +ReceivedWrongIRMessagePrefix: + ldh a, [hMGStatusFlags] + or MG_WRONG_PREFIX + ldh [hMGStatusFlags], a + ret + +ReceiveIRDataBlock: +; Receive b bytes of data in three messages: +; 1. two bytes: MESSAGE_PREFIX and the length b +; 2. b bytes: the actual data +; 3. two bytes: a little-endian checksum +; Then send a one-byte acknowledgement message: the status. + xor a + ldh [hMGChecksum + 0], a + ldh [hMGChecksum + 1], a + push bc + push hl + ld hl, hMGExchangedWord + ld b, 2 + call ReceiveIRDataMessage + ldh a, [hMGExchangedWord + 1] + ldh [hMGUnusedMsgLength], a + ld b, a + pop hl + pop af + cp b + jp c, ReceivedWrongIRMessagePrefix + ldh a, [hMGExchangedWord + 0] + cp MESSAGE_PREFIX + jp nz, ReceivedWrongIRMessagePrefix + call ReceiveIRDataMessage + ldh a, [hMGChecksum + 0] + ld d, a + ldh a, [hMGChecksum + 1] + ld e, a + push hl + push de + ld hl, hMGExchangedWord + ld b, 2 + call ReceiveIRDataMessage + pop de + ld hl, hMGExchangedWord + ld a, [hli] + xor d + ld b, a + ld a, [hl] + xor e + or b + call nz, ReceivedWrongIRChecksum + push de + + ld d, 61 + call SendInfraredLEDOff + + ld hl, hMGStatusFlags + ld b, 1 + call SendIRDataMessage + + pop de + pop hl + ld a, d + ldh [hMGChecksum + 0], a + ld a, e + ldh [hMGChecksum + 1], a + ret + +ReceiveIRDataMessage: + ld c, LOW(rRP) + + ld d, 0 + call ReceiveInfraredLEDOff + jp z, InfraredLEDReceiveTimedOut + ld d, 0 + call ReceiveInfraredLEDOn + jp z, InfraredLEDReceiveTimedOut + ld d, 0 + call ReceiveInfraredLEDOff + jp z, InfraredLEDReceiveTimedOut + + ld a, b + cpl + ld b, a + xor a + ldh [hMGPrevTIMA], a + + call StartSlowIRTimer +.main_loop + inc b + jr z, .done + ld a, 8 + ldh [hMGNumBits], a +.inner_loop + ld d, 0 +.recv_loop + inc d + jr z, .recv_done + ldh a, [c] + bit rRP_RECEIVING, a + jr z, .recv_loop + ld d, 0 +.recv_done +.send_loop + inc d + jr z, .send_done + ldh a, [c] + bit rRP_RECEIVING, a + jr nz, .send_loop +.send_done + ldh a, [hMGPrevTIMA] + ld d, a + ldh a, [rTIMA] + ldh [hMGPrevTIMA], a + sub d + cp $12 + jr c, .zero + set 0, e + jr .ok +.zero + res 0, e +.ok + ldh a, [hMGNumBits] + dec a + ldh [hMGNumBits], a + jr z, .continue + ld a, e + rlca + ld e, a + jr .inner_loop + +.continue + ld a, e + ld [hli], a + ldh a, [hMGChecksum + 0] + add e + ldh [hMGChecksum + 0], a + ldh a, [hMGChecksum + 1] + adc 0 + ldh [hMGChecksum + 1], a + jr .main_loop + +.done + call StartFastIRTimer + xor a + ldh [rIF], a + ld d, 0 + call ReceiveInfraredLEDOn + jp z, InfraredLEDReceiveTimedOut + + ld d, 16 + call SendInfraredLEDOff + ret + +SendEmptyIRDataBlock: + ld b, 0 + jp SendIRDataBlock + +ReceiveEmptyIRDataBlock: + ld b, 0 + jp ReceiveIRDataBlock + +MysteryGift_UpdateJoypad: +; We can only get four inputs at a time. +; We take d-pad first for no particular reason. + ld a, R_DPAD + ldh [rJOYP], a +; Read twice to give the request time to take. + ldh a, [rJOYP] + ldh a, [rJOYP] + +; The Joypad register output is in the lo nybble (inversed). +; We make the hi nybble of our new container d-pad input. + cpl + and $f + swap a + +; We'll keep this in b for now. + ld b, a + +; Buttons make 8 total inputs (A, B, Select, Start). +; We can fit this into one byte. + ld a, R_BUTTONS + ldh [rJOYP], a +; Wait for input to stabilize. +rept 6 + ldh a, [rJOYP] +endr +; Buttons take the lo nybble. + cpl + and $f + or b + ld c, a +; To get the delta we xor the last frame's input with the new one. + ldh a, [hMGJoypadPressed] + xor c +; Released this frame: + and c + ldh [hMGJoypadReleased], a +; Pressed this frame: + ld a, c + ldh [hMGJoypadPressed], a + ld a, $30 +; Reset the joypad register since we're done with it. + ldh [rJOYP], a + ret + +CheckAndSetMysteryGiftDecorationAlreadyReceived: +; Return nz if decoration c was already received; otherwise receive it. + call GetMysteryGiftBank + ld d, 0 + ld b, CHECK_FLAG + ld hl, sMysteryGiftDecorationsReceived + lda_predef SmallFarFlagAction + push hl + push bc + call Predef + call CloseSRAM + ld a, c + and a + pop bc + pop hl + ret nz + call GetMysteryGiftBank + ld b, SET_FLAG + predef SmallFarFlagAction + call CloseSRAM + xor a + ret + +CopyMysteryGiftReceivedDecorationsToPC: + call GetMysteryGiftBank + ld c, 0 +.loop + push bc + ld d, 0 + ld b, CHECK_FLAG + ld hl, sMysteryGiftDecorationsReceived + predef SmallFarFlagAction + ld a, c + and a + pop bc + jr z, .skip + push bc + callfar SetSpecificDecorationFlag + pop bc +.skip + inc c + ld a, c + cp NUM_NON_TROPHY_DECOS + jr c, .loop + jp CloseSRAM + +UnlockMysteryGift: +; If [sMysteryGiftUnlocked] was -1, this sets both +; [sMysteryGiftUnlocked] and [sMysteryGiftItem] to 0. + call GetMysteryGiftBank + ld hl, sMysteryGiftUnlocked + ld a, [hl] + inc a + jr nz, .ok + ld [hld], a + assert sMysteryGiftUnlocked - 1 == sMysteryGiftItem + ld [hl], a +.ok + jp CloseSRAM + +ResetDailyMysteryGiftLimitIfUnlocked: + call GetMysteryGiftBank + ld a, [sNumDailyMysteryGiftPartnerIDs] + cp -1 ; locked? + jr z, .dont_clear + xor a + ld [sNumDailyMysteryGiftPartnerIDs], a +.dont_clear + jp CloseSRAM + +BackupMysteryGift: +; Copies [sMysteryGiftItem] to [sBackupMysteryGiftItem], +; and [sMysteryGiftUnlocked] to [sNumDailyMysteryGiftPartnerIDs]. + call GetMysteryGiftBank + ld hl, sMysteryGiftItem + ld de, sBackupMysteryGiftItem + ld a, [hli] + ld [de], a + inc de + assert sMysteryGiftItem + 1 == sMysteryGiftUnlocked + assert sBackupMysteryGiftItem + 1 == sNumDailyMysteryGiftPartnerIDs + ld a, [hl] + ld [de], a + jp CloseSRAM + +RestoreMysteryGift: +; Copies [sBackupMysteryGiftItem] to [sMysteryGiftItem], +; and [sNumDailyMysteryGiftPartnerIDs] to [sMysteryGiftUnlocked]. + call GetMysteryGiftBank + ld hl, sBackupMysteryGiftItem + ld de, sMysteryGiftItem + ld a, [hli] + ld [de], a + inc de + assert sBackupMysteryGiftItem + 1 == sNumDailyMysteryGiftPartnerIDs + assert sMysteryGiftItem + 1 == sMysteryGiftUnlocked + ld a, [hl] + ld [de], a + jp CloseSRAM + +ClearMysteryGiftTrainer: + ld hl, wMysteryGiftTrainer + xor a + ld b, wMysteryGiftTrainerEnd - wMysteryGiftTrainer +.loop + ld [hli], a + dec b + jr nz, .loop + ret + +GetMysteryGiftBank: + ld a, BANK(sMysteryGiftData) + jp OpenSRAM + +StagePartyDataForMysteryGift: +; You will be sending this data to your mystery gift partner. +; Structure is the same as a trainer with species and moves +; defined. + ld a, BANK(sPokemonData) + call OpenSRAM + ld de, wMysteryGiftStaging + ld bc, sPokemonData + wPartyMons - wPokemonData + ld hl, sPokemonData + wPartySpecies - wPokemonData +.loop + ld a, [hli] + cp -1 + jr z, .party_end + cp EGG + jr z, .next + push hl + ; copy level + ld hl, MON_LEVEL + add hl, bc + ld a, [hl] + ld [de], a + inc de + ; copy species + ld hl, MON_SPECIES + add hl, bc + ld a, [hl] + ld [de], a + inc de + ; copy moves + ld hl, MON_MOVES + add hl, bc + push bc + ld bc, NUM_MOVES + call CopyBytes + pop bc + pop hl +.next + push hl + ld hl, PARTYMON_STRUCT_LENGTH + add hl, bc + ld b, h + ld c, l + pop hl + jr .loop +.party_end + ld a, -1 + ld [de], a + ld a, wMysteryGiftTrainerEnd - wMysteryGiftTrainer + ld [wUnusedMysteryGiftStagedDataLength], a + jp CloseSRAM + +InitMysteryGiftLayout: + call ClearBGPalettes + call DisableLCD + ld hl, MysteryGiftGFX + ld de, vTiles2 tile $00 + ld a, BANK(MysteryGiftGFX) + ld bc, $43 tiles + call FarCopyBytes + hlcoord 0, 0 + ld a, $42 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + call ByteFill + hlcoord 3, 7 + lb bc, 9, 15 + call ClearBox + hlcoord 0, 0 + ld a, $0 + ld [hli], a + inc a + ld [hl], a + hlcoord 0, 1 + inc a + ld [hli], a + inc a + ld [hl], a + hlcoord 7, 1 + ld a, $12 + call .Load5GFX + hlcoord 2, 2 + ld a, $17 + call .Load16GFX + hlcoord 2, 3 + ld a, $27 + call .Load16GFX + hlcoord 9, 4 + ld a, $37 + ld [hli], a + inc a + ld [hl], a + hlcoord 1, 2 + ld [hl], $4 + hlcoord 1, 3 + ld a, $5 + call .Load14Column + ld a, $9 + hlcoord 18, 5 + call .Load11Column + hlcoord 2, 5 + ld a, $b + call .Load16Row + hlcoord 2, 16 + ld a, $7 + call .Load16Row + hlcoord 2, 5 + ld a, $d + call .Load5GFX + hlcoord 7, 5 + ld [hl], $c + hlcoord 18, 5 + ld [hl], $a + hlcoord 18, 16 + ld [hl], $8 + hlcoord 1, 16 + ld [hl], $6 + hlcoord 2, 6 + ld a, $3a + call .Load16Row + hlcoord 2, 15 + ld a, $40 + call .Load16Row + hlcoord 2, 6 + ld a, $3c + call .Load9Column + hlcoord 17, 6 + ld a, $3e + call .Load9Column + hlcoord 2, 6 + ld [hl], $39 + hlcoord 17, 6 + ld [hl], $3b + hlcoord 2, 15 + ld [hl], $3f + hlcoord 17, 15 + ld [hl], $41 + call EnableLCD + call WaitBGMap + ld b, SCGB_MYSTERY_GIFT + call GetSGBLayout + call SetPalettes + ret + +.Load5GFX: + ld b, 5 + jr .gfx_loop + +.Load6GFX: ; unreferenced + ld b, 6 + jr .gfx_loop + +.Load16GFX: + ld b, 16 + +.gfx_loop + ld [hli], a + inc a + dec b + jr nz, .gfx_loop + ret + +.Load9Column: + ld b, 9 + jr .col_loop + +.Load11Column: + ld b, 11 + jr .col_loop + +.Load14Column: + ld b, 14 + +.col_loop + ld [hl], a + ld de, SCREEN_WIDTH + add hl, de + dec b + jr nz, .col_loop + ret + +.Load16Row: + ld b, 16 +.row_loop + ld [hli], a + dec b + jr nz, .row_loop + ret + +MysteryGiftGFX: +INCBIN "gfx/mystery_gift/mystery_gift.2bpp" + +DoNameCardSwap: + call ClearTilemap + call ClearSprites + call WaitBGMap + call InitNameCardLayout + hlcoord 3, 8 + ld de, .String_PressAToLink_BToCancel_JP + call PlaceString + call WaitBGMap + call StageDataForNameCard + call ClearMysteryGiftTrainer + ld a, wNameCardDataEnd - wNameCardData + ld [wMysteryGiftStagedDataLength], a + ldh a, [rIE] + push af + call ExchangeNameCardData + ld d, a + xor a + ldh [rIF], a + pop af + ldh [rIE], a + ld a, d + cp $10 + jp z, .LinkCanceled + cp MG_OKAY + jp nz, .CommunicationError + call .SlideNameCardUpOffScreen + ld c, 60 + call DelayFrames + call .ClearScreen + ld hl, .NameCardReceivedCardText + call PrintText + ld de, wNameCardData + farcall Function8ac70 + ld a, c + ld [wTextDecimalByte], a + ld hl, .NameCardNotRegisteredCardText + jr c, .PrintTextAndExit + ld hl, .NameCardListedCardText + jr .PrintTextAndExit + +.SlideNameCardUpOffScreen: + ld c, 16 +.loop + ld hl, wShadowOAMSprite00YCoord + ld b, 8 +.dec_y_loop + dec [hl] +rept SPRITEOAMSTRUCT_LENGTH + inc hl +endr + dec b + jr nz, .dec_y_loop + ld hl, wShadowOAMSprite08YCoord + ld b, 8 +.inc_y_loop + inc [hl] +rept SPRITEOAMSTRUCT_LENGTH + inc hl +endr + dec b + jr nz, .inc_y_loop + dec c + ret z + push bc + ld c, 4 + call DelayFrames + pop bc + jr .loop + +.LinkCanceled: + call .ClearScreen + ld hl, .NameCardLinkCancelledText + jr .PrintTextAndExit + +.CommunicationError: + call .ClearScreen + ld hl, .NameCardCommErrorText + call PrintText + jp DoNameCardSwap + +.PrintTextAndExit: + call PrintText + ld a, LCDC_DEFAULT + ldh [rLCDC], a + ret + +.String_PressAToLink_BToCancel_JP: + db "エーボタンおすと" + next "つうしんおこなわれるよ!" + next "ビーボタンおすと" + next "つうしんちゅうし します" + db "@" + +.NameCardReceivedCardText: + text_far _NameCardReceivedCardText + text_end + +.NameCardListedCardText: + text_far _NameCardListedCardText + text_end + +.NameCardNotRegisteredCardText: + text_far _NameCardNotRegisteredCardText + text_end + +.NameCardLinkCancelledText: + text_far _NameCardLinkCancelledText + text_end + +.NameCardCommErrorText: + text_far _NameCardLinkCommErrorText + text_end + +.ClearScreen: + call ClearSprites + call ClearTilemap + call EnableLCD + call WaitBGMap + ld b, SCGB_DIPLOMA + call GetSGBLayout + call SetPalettes + ret + +StageDataForNameCard: + ld de, wMysteryGiftStaging + ld a, BANK(sPlayerData) + call OpenSRAM + ld hl, sPlayerData + wPlayerName - wPlayerData + ld bc, NAME_LENGTH + call CopyBytes + ld hl, sPlayerData + wPlayerID - wPlayerData + ld bc, 2 + call CopyBytes + ld hl, sPlayerData + wSecretID - wPlayerData + ld bc, 2 + call CopyBytes + call CloseSRAM + ld a, BANK(sCrystalData) + call OpenSRAM + ld a, [sCrystalData + 0] + ld [de], a + inc de + ld a, BANK(s4_a603) ; aka BANK(sEZChatMessages) ; MBC30 bank used by JP Crystal; inaccessible by MBC3 + call OpenSRAM + ld hl, s4_a603 ; address of MBC30 bank + ld bc, 8 + call CopyBytes + ld hl, sEZChatIntroductionMessage ; address of MBC30 bank + ld bc, EASY_CHAT_MESSAGE_LENGTH + call CopyBytes + call CloseSRAM + ret + +InitNameCardLayout: + call ClearBGPalettes + call DisableLCD + ld hl, CardTradeGFX + ld de, vTiles2 tile $00 + ld a, BANK(CardTradeGFX) + ld bc, $40 tiles + call FarCopyBytes + ld hl, CardTradeSpriteGFX + ld de, vTiles0 tile $00 + ld a, BANK(CardTradeSpriteGFX) + ld bc, 8 tiles + call FarCopyBytes + hlcoord 0, 0 + ld a, $3f + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + call ByteFill + hlcoord 3, 7 + lb bc, 9, 15 + call ClearBox + hlcoord 0, 0 + ld a, $0 + ld [hli], a + inc a + ld [hl], a + hlcoord 0, 1 + inc a + ld [hli], a + inc a + ld [hl], a + hlcoord 4, 2 + ld a, $13 + call .Load11Row + hlcoord 4, 3 + ld a, $1e + call .Load12Row + hlcoord 4, 4 + ld a, $2a + call .Load12Row + hlcoord 1, 2 + ld [hl], $4 + hlcoord 1, 3 + ld a, $5 + call .Load14Column + ld a, $9 + hlcoord 18, 5 + call .Load11Column + hlcoord 2, 5 + ld a, $b + call .Load16Row + hlcoord 2, 16 + ld a, $7 + call .Load16Row + hlcoord 2, 5 + ld a, $d + call .Load6Row + hlcoord 8, 5 + ld [hl], $c + hlcoord 18, 5 + ld [hl], $a + hlcoord 18, 16 + ld [hl], $8 + hlcoord 1, 16 + ld [hl], $6 + hlcoord 2, 6 + ld a, $37 + call .Load16Row + hlcoord 2, 15 + ld a, $3d + call .Load16Row + hlcoord 2, 6 + ld a, $39 + call .Load9Column + hlcoord 17, 6 + ld a, $3b + call .Load9Column + hlcoord 2, 6 + ld [hl], $36 + hlcoord 17, 6 + ld [hl], $38 + hlcoord 2, 15 + ld [hl], $3c + hlcoord 17, 15 + ld [hl], $3e + ld de, wShadowOAMSprite00 + ld hl, .NameCardOAMData + ld bc, 16 * SPRITEOAMSTRUCT_LENGTH + call CopyBytes + call EnableLCD + call WaitBGMap + ld b, CRYSTAL_CGB_NAME_CARD + farcall GetCrystalCGBLayout + jp SetPalettes + +.Load6Row: + ld b, 6 + jr .row_loop + +.Load11Row: + ld b, 11 + jr .row_loop + +.Load12Row: + ld b, 12 + +.row_loop + ld [hli], a + inc a + dec b + jr nz, .row_loop + ret + +.Load9Column: + ld b, 9 + jr .column_loop + +.Load11Column: + ld b, 11 + jr .column_loop + +.Load14Column: + ld b, 14 + +.column_loop + ld [hl], a + ld de, SCREEN_WIDTH + add hl, de + dec b + jr nz, .column_loop + ret + +.Load16Row: + ld b, 16 +.row_loop_no_inc + ld [hli], a + dec b + jr nz, .row_loop_no_inc + ret + +.NameCardOAMData: + dbsprite 6, 2, 4, 1, $00, 0 + dbsprite 7, 2, 4, 1, $01, 0 + dbsprite 8, 2, 4, 1, $02, 0 + dbsprite 9, 2, 4, 1, $03, 0 + dbsprite 6, 3, 4, 1, $04, 0 + dbsprite 7, 3, 4, 1, $05, 0 + dbsprite 8, 3, 4, 1, $06, 0 + dbsprite 9, 3, 4, 1, $07, 0 + dbsprite 11, 0, 4, 1, $00, 0 + dbsprite 12, 0, 4, 1, $01, 0 + dbsprite 13, 0, 4, 1, $02, 0 + dbsprite 14, 0, 4, 1, $03, 0 + dbsprite 11, 1, 4, 1, $04, 0 + dbsprite 12, 1, 4, 1, $05, 0 + dbsprite 13, 1, 4, 1, $06, 0 + dbsprite 14, 1, 4, 1, $07, 0 + +CardTradeGFX: +INCBIN "gfx/mystery_gift/card_trade.2bpp" + +CardTradeSpriteGFX: +INCBIN "gfx/mystery_gift/card_sprite.2bpp" diff --git a/engine/link/mystery_gift_2.asm b/engine/link/mystery_gift_2.asm new file mode 100644 index 0000000..f3e76c4 --- /dev/null +++ b/engine/link/mystery_gift_2.asm @@ -0,0 +1,153 @@ +StageDataForMysteryGift: + ld de, wMysteryGiftStaging + ld a, GS_VERSION + 1 + ld [de], a + inc de ; wMysteryGiftStaging+1 + ld a, BANK(sGameData) + call OpenSRAM + ld hl, sPlayerData + wPlayerID - wPlayerData + ld a, [hli] + ld [de], a + ld b, a + inc de ; wMysteryGiftStaging+2 + ld a, [hl] + ld [de], a + ld c, a + inc de ; wMysteryGiftStaging+3 + push bc + ld hl, sPlayerData + wPlayerName - wPlayerData + ld bc, NAME_LENGTH + call CopyBytes + push de ; wMysteryGiftStaging+14 + ld hl, sPokemonData + wPokedexCaught - wPokemonData + ld bc, wEndPokedexCaught - wPokedexCaught + call CountSetBits16 + ld a, b + add a, -1 + sbc a + or c + pop de + pop bc + ld [de], a + inc de ; wMysteryGiftStaging+15 + call CloseSRAM + call Random + and 1 + ld [de], a + inc de ; wMysteryGiftStaging+16 + call .RandomSample + ld [de], a + inc de ; wMysteryGiftStaging+17 + ld a, c + ld c, b + ld b, a + call .RandomSample + ld [de], a + inc de ; wMysteryGiftStaging+18 + ld a, BANK(sBackupMysteryGiftItem) + call OpenSRAM + ld a, [sBackupMysteryGiftItem] + ld [de], a + inc de + ld a, [sNumDailyMysteryGiftPartnerIDs] + ld [de], a + ld a, wMysteryGiftPlayerDataEnd - wMysteryGiftPlayerData + ld [wUnusedMysteryGiftStagedDataLength], a + call CloseSRAM + ld hl, wMysteryGiftStaging + ld de, wMysteryGiftPlayerData + ld bc, wMysteryGiftPlayerDataEnd - wMysteryGiftPlayerData + jp CopyBytes + +.RandomSample: + push de + call Random + cp 10 percent + jr c, .tenpercent + call Random + and %111 + ld d, a + rl d + ld e, $80 +.loop + rlc e + dec a + jr nz, .loop + ld a, e + and c + jr z, .skip + ld a, $1 +.skip + add d + jr .done + +.tenpercent + call Random + cp 20 percent - 1 + jr c, .twopercent + call Random + and %011 + ld d, a + rl d + ld e, $80 +.loop2 + rlc e + dec a + jr nz, .loop2 + ld a, e + and b + jr z, .skip2 + ld a, $1 +.skip2 + add d + add $10 + jr .done + +.twopercent + call Random + cp 20 percent - 1 + jr c, .pointfourpercent + ld a, b + swap a + and $7 + add $18 + jr .done + +.pointfourpercent + ld a, b + and $80 + ld a, $20 + jr z, .done + ld a, $21 + +.done + pop de + ret + +MysteryGiftGetItem: + ld a, c + cp MysteryGiftItems.End - MysteryGiftItems + jr nc, MysteryGiftFallbackItem + ld hl, MysteryGiftItems + ld b, 0 + add hl, bc + ld c, [hl] + ret + +MysteryGiftGetDecoration: + ld a, c + cp MysteryGiftDecos.End - MysteryGiftDecos + jr nc, MysteryGiftFallbackItem + ld hl, MysteryGiftDecos + ld b, 0 + add hl, bc + ld c, [hl] + ret + +MysteryGiftFallbackItem: + ld c, DECO_POLKADOT_BED ; GREAT_BALL + ret + +INCLUDE "data/items/mystery_gift_items.asm" + +INCLUDE "data/decorations/mystery_gift_decos.asm" diff --git a/engine/link/place_waiting_text.asm b/engine/link/place_waiting_text.asm new file mode 100644 index 0000000..dc1fe21 --- /dev/null +++ b/engine/link/place_waiting_text.asm @@ -0,0 +1,24 @@ +PlaceWaitingText:: + hlcoord 3, 10 + ld b, 1 + ld c, 11 + + ld a, [wBattleMode] + and a + jr z, .notinbattle + + call Textbox + jr .proceed + +.notinbattle + predef LinkTextboxAtHL + +.proceed + hlcoord 4, 11 + ld de, .Waiting + call PlaceString + ld c, 50 + jp DelayFrames + +.Waiting: + db "Waiting...!@" diff --git a/engine/link/time_capsule.asm b/engine/link/time_capsule.asm new file mode 100644 index 0000000..f9162a6 --- /dev/null +++ b/engine/link/time_capsule.asm @@ -0,0 +1,160 @@ +; These functions seem to be related to backwards compatibility + +ValidateOTTrademon: + ld a, [wCurOTTradePartyMon] + ld hl, wOTPartyMon1Species + call GetPartyLocation + push hl + ld a, [wCurOTTradePartyMon] + inc a + ld c, a + ld b, 0 + ld hl, wOTPartyCount + add hl, bc + ld a, [hl] + pop hl + cp EGG + jr z, .matching_or_egg + cp [hl] + jr nz, .abnormal + +.matching_or_egg + ld b, h + ld c, l + ld hl, MON_LEVEL + add hl, bc + ld a, [hl] + cp MAX_LEVEL + 1 + jr nc, .abnormal + ld a, [wLinkMode] + cp LINK_TIMECAPSULE + jr nz, .normal + ld hl, wOTPartySpecies + ld a, [wCurOTTradePartyMon] + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ld [wCurSpecies], a + + ; Magnemite and Magneton's types changed + ; from Electric to Electric/Steel. + call GetPokemonIndexFromID + push bc + ld bc, MAGNEMITE + call .compare + if MAGNETON == (MAGNEMITE + 1) + inc bc + else + ld bc, MAGNETON + endc + call nz, .compare + pop bc + jr z, .normal + + call GetBaseData + ld hl, wLinkOTPartyMonTypes + add hl, bc + add hl, bc + ld a, [wBaseType1] + cp [hl] + jr nz, .abnormal + inc hl + ld a, [wBaseType2] + cp [hl] + jr nz, .abnormal + +.normal + and a + ret + +.abnormal + scf + ret + +.compare + ld a, h + cp b + ret nz + ld a, l + cp c + ret + +CheckAnyOtherAliveMonsForTrade: + ld a, [wCurTradePartyMon] + ld d, a + ld a, [wPartyCount] + ld b, a + ld c, 0 +.loop + ld a, c + cp d + jr z, .next + push bc + ld a, c + ld hl, wPartyMon1HP + call GetPartyLocation + pop bc + ld a, [hli] + or [hl] + jr nz, .done + +.next + inc c + dec b + jr nz, .loop + ld a, [wCurOTTradePartyMon] + ld hl, wOTPartyMon1HP + call GetPartyLocation + ld a, [hli] + or [hl] + jr nz, .done + scf + ret + +.done + and a + ret + +PlaceTradePartnerNamesAndParty: + hlcoord 4, 0 + ld de, wPlayerName + call PlaceString + ld a, $14 + ld [bc], a + hlcoord 4, 8 + ld de, wOTPlayerName + call PlaceString + ld a, $14 + ld [bc], a + hlcoord 7, 1 + ld de, wPartySpecies + call .PlaceSpeciesNames + hlcoord 7, 9 + ld de, wOTPartySpecies +.PlaceSpeciesNames: + ld c, 0 +.loop + ld a, [de] + cp -1 + ret z + ld [wNamedObjectIndex], a + push bc + push hl + push de + push hl + ld a, c + ldh [hProduct], a + call GetPokemonName + pop hl + call PlaceString + pop de + inc de + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + inc c + jr .loop + +INCLUDE "data/pokemon/gen1_base_special.asm" diff --git a/engine/link/time_capsule_2.asm b/engine/link/time_capsule_2.asm new file mode 100644 index 0000000..6640f6b --- /dev/null +++ b/engine/link/time_capsule_2.asm @@ -0,0 +1,39 @@ +ConvertMon_2to1: +; Takes the Gen 2 Pokemon number stored in wTempSpecies, +; finds it in the Pokered_MonIndices table, +; and returns its index in wTempSpecies. + push bc + push hl + ld a, [wTempSpecies] + ld b, a + ld c, 0 + ld hl, Pokered_MonIndices +.loop + inc c + ld a, [hli] + cp b + jr nz, .loop + ld a, c + ld [wTempSpecies], a + pop hl + pop bc + ret + +ConvertMon_1to2: +; Takes the Gen 1 Pokemon number stored in wTempSpecies +; and returns the corresponding value from Pokered_MonIndices in wTempSpecies. + push bc + push hl + ld a, [wTempSpecies] + dec a + ld hl, Pokered_MonIndices + ld b, 0 + ld c, a + add hl, bc + ld a, [hl] + ld [wTempSpecies], a + pop hl + pop bc + ret + +INCLUDE "data/pokemon/gen1_order.asm" diff --git a/engine/math/get_square_root.asm b/engine/math/get_square_root.asm new file mode 100644 index 0000000..5a4dd3f --- /dev/null +++ b/engine/math/get_square_root.asm @@ -0,0 +1,30 @@ +DEF NUM_SQUARE_ROOTS EQU 255 + +GetSquareRoot: +; Return the square root of de in b. + +; Rather than calculating the result, we take the index of the +; first value in a table of squares that isn't lower than de. + + ld hl, .Squares + ld b, 0 +.loop +; Make sure we don't go past the end of the table. + inc b + ld a, b + cp NUM_SQUARE_ROOTS + ret z + +; Iterate over the table until b**2 >= de. + ld a, [hli] + sub e + ld a, [hli] + sbc d + + jr c, .loop + ret + +.Squares: +for x, 1, NUM_SQUARE_ROOTS + 1 + dw x**2 +endr diff --git a/engine/math/math.asm b/engine/math/math.asm new file mode 100644 index 0000000..9a5bcad --- /dev/null +++ b/engine/math/math.asm @@ -0,0 +1,189 @@ +_Multiply:: +; hMultiplier is one byte. + ld a, 8 + ld b, a + + xor a + ldh [hMultiplicand - 1], a + ldh [hMathBuffer + 1], a + ldh [hMathBuffer + 2], a + ldh [hMathBuffer + 3], a + ldh [hMathBuffer + 4], a + +.loop + ldh a, [hMultiplier] + srl a + ldh [hMultiplier], a + jr nc, .next + + ldh a, [hMathBuffer + 4] + ld c, a + ldh a, [hMultiplicand + 2] + add c + ldh [hMathBuffer + 4], a + + ldh a, [hMathBuffer + 3] + ld c, a + ldh a, [hMultiplicand + 1] + adc c + ldh [hMathBuffer + 3], a + + ldh a, [hMathBuffer + 2] + ld c, a + ldh a, [hMultiplicand] + adc c + ldh [hMathBuffer + 2], a + + ldh a, [hMathBuffer + 1] + ld c, a + ldh a, [hMultiplicand - 1] + adc c + ldh [hMathBuffer + 1], a + +.next + dec b + jr z, .done + +; hMultiplicand <<= 1 + + ldh a, [hMultiplicand + 2] + add a + ldh [hMultiplicand + 2], a + + ldh a, [hMultiplicand + 1] + rla + ldh [hMultiplicand + 1], a + + ldh a, [hMultiplicand] + rla + ldh [hMultiplicand], a + + ldh a, [hMultiplicand - 1] + rla + ldh [hMultiplicand - 1], a + + jr .loop + +.done + ldh a, [hMathBuffer + 4] + ldh [hProduct + 3], a + + ldh a, [hMathBuffer + 3] + ldh [hProduct + 2], a + + ldh a, [hMathBuffer + 2] + ldh [hProduct + 1], a + + ldh a, [hMathBuffer + 1] + ldh [hProduct], a + + ret + +_Divide:: + xor a + ldh [hMathBuffer], a + ldh [hMathBuffer + 1], a + ldh [hMathBuffer + 2], a + ldh [hMathBuffer + 3], a + ldh [hMathBuffer + 4], a + + ld a, 9 + ld e, a + +.loop + ldh a, [hMathBuffer] + ld c, a + ldh a, [hDividend + 1] + sub c + ld d, a + + ldh a, [hDivisor] + ld c, a + ldh a, [hDividend] + sbc c + jr c, .next + + ldh [hDividend], a + + ld a, d + ldh [hDividend + 1], a + + ldh a, [hMathBuffer + 4] + inc a + ldh [hMathBuffer + 4], a + + jr .loop + +.next + ld a, b + cp 1 + jr z, .done + + ldh a, [hMathBuffer + 4] + add a + ldh [hMathBuffer + 4], a + + ldh a, [hMathBuffer + 3] + rla + ldh [hMathBuffer + 3], a + + ldh a, [hMathBuffer + 2] + rla + ldh [hMathBuffer + 2], a + + ldh a, [hMathBuffer + 1] + rla + ldh [hMathBuffer + 1], a + + dec e + jr nz, .next2 + + ld e, 8 + ldh a, [hMathBuffer] + ldh [hDivisor], a + xor a + ldh [hMathBuffer], a + + ldh a, [hDividend + 1] + ldh [hDividend], a + + ldh a, [hDividend + 2] + ldh [hDividend + 1], a + + ldh a, [hDividend + 3] + ldh [hDividend + 2], a + +.next2 + ld a, e + cp 1 + jr nz, .okay + dec b + +.okay + ldh a, [hDivisor] + srl a + ldh [hDivisor], a + + ldh a, [hMathBuffer] + rra + ldh [hMathBuffer], a + + jr .loop + +.done + ldh a, [hDividend + 1] + ldh [hRemainder], a + + ldh a, [hMathBuffer + 4] + ldh [hQuotient + 3], a + + ldh a, [hMathBuffer + 3] + ldh [hQuotient + 2], a + + ldh a, [hMathBuffer + 2] + ldh [hQuotient + 1], a + + ldh a, [hMathBuffer + 1] + ldh [hQuotient], a + + ret diff --git a/engine/math/print_num.asm b/engine/math/print_num.asm new file mode 100644 index 0000000..09a1012 --- /dev/null +++ b/engine/math/print_num.asm @@ -0,0 +1,301 @@ +_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. +; The high nybble of the c register specifies how many of the total amount of +; digits will be in front of the decimal point. +; Some extra flags can be given in bits 5-7 of b. +; Bit 5: money if set (unless left-aligned without leading zeros) +; Bit 6: left-aligned if set +; Bit 7: print leading zeros if set + + push bc + + bit 5, b + jr z, .main + bit 7, b + jr nz, .moneyflag + bit 6, b + jr z, .main + +.moneyflag ; 101xxxxx or 011xxxxx + ld a, "¥" + ld [hli], a + res 5, b ; 100xxxxx or 010xxxxx + +.main + xor a + ldh [hPrintNumBuffer + 0], a + ldh [hPrintNumBuffer + 1], a + ldh [hPrintNumBuffer + 2], a + ld a, b + and $f + cp 1 + jr z, .byte + cp 2 + jr z, .word +; maximum 3 bytes + ld a, [de] + ldh [hPrintNumBuffer + 1], a + inc de + ld a, [de] + ldh [hPrintNumBuffer + 2], a + inc de + ld a, [de] + ldh [hPrintNumBuffer + 3], a + jr .start + +.word + ld a, [de] + ldh [hPrintNumBuffer + 2], a + inc de + ld a, [de] + ldh [hPrintNumBuffer + 3], a + jr .start + +.byte + ld a, [de] + ldh [hPrintNumBuffer + 3], a + +.start + push de + + ld d, b + ld a, c + swap a + and $f + ld e, a + ld a, c + and $f + ld b, a + ld c, 0 + cp 2 + jr z, .two + cp 3 + jr z, .three + cp 4 + jr z, .four + cp 5 + jr z, .five + cp 6 + jr z, .six + +; seven + ld a, HIGH(1000000 >> 8) + ldh [hPrintNumBuffer + 4], a + ld a, HIGH(1000000) ; mid + ldh [hPrintNumBuffer + 5], a + ld a, LOW(1000000) + ldh [hPrintNumBuffer + 6], a + call .PrintDigit + call .AdvancePointer + +.six + ld a, HIGH(100000 >> 8) + ldh [hPrintNumBuffer + 4], a + ld a, HIGH(100000) ; mid + ldh [hPrintNumBuffer + 5], a + ld a, LOW(100000) + ldh [hPrintNumBuffer + 6], a + call .PrintDigit + call .AdvancePointer + +.five + xor a ; HIGH(10000 >> 8) + ldh [hPrintNumBuffer + 4], a + ld a, HIGH(10000) ; mid + ldh [hPrintNumBuffer + 5], a + ld a, LOW(10000) + ldh [hPrintNumBuffer + 6], a + call .PrintDigit + call .AdvancePointer + +.four + xor a ; HIGH(1000 >> 8) + ldh [hPrintNumBuffer + 4], a + ld a, HIGH(1000) ; mid + ldh [hPrintNumBuffer + 5], a + ld a, LOW(1000) + ldh [hPrintNumBuffer + 6], a + call .PrintDigit + call .AdvancePointer + +.three + xor a ; HIGH(100 >> 8) + ldh [hPrintNumBuffer + 4], a + xor a ; HIGH(100) ; mid + ldh [hPrintNumBuffer + 5], a + ld a, LOW(100) + ldh [hPrintNumBuffer + 6], a + call .PrintDigit + call .AdvancePointer + +.two + dec e + jr nz, .two_skip + ld a, "0" + ldh [hPrintNumBuffer + 0], a +.two_skip + + ld c, 0 + ldh a, [hPrintNumBuffer + 3] +.mod_10 + cp 10 + jr c, .modded_10 + sub 10 + inc c + jr .mod_10 +.modded_10 + + ld b, a + ldh a, [hPrintNumBuffer + 0] + or c + jr nz, .money + call .PrintLeadingZero + jr .money_leading_zero + +.money + call .PrintYen + push af + ld a, "0" + add c + ld [hl], a + pop af + ldh [hPrintNumBuffer + 0], a + inc e + dec e + jr nz, .money_leading_zero + inc hl + ld [hl], "" + +.money_leading_zero + call .AdvancePointer + call .PrintYen + ld a, "0" + add b + ld [hli], a + + pop de + pop bc + ret + +.PrintYen: + push af + ldh a, [hPrintNumBuffer + 0] + and a + jr nz, .stop + bit 5, d + jr z, .stop + ld a, "¥" + ld [hli], a + res 5, d + +.stop + pop af + ret + +.PrintDigit: + dec e + jr nz, .ok + ld a, "0" + ldh [hPrintNumBuffer + 0], a +.ok + ld c, 0 +.loop + ldh a, [hPrintNumBuffer + 4] + ld b, a + ldh a, [hPrintNumBuffer + 1] + ldh [hPrintNumBuffer + 7], a + cp b + jr c, .skip1 + sub b + ldh [hPrintNumBuffer + 1], a + ldh a, [hPrintNumBuffer + 5] + ld b, a + ldh a, [hPrintNumBuffer + 2] + ldh [hPrintNumBuffer + 8], a + cp b + jr nc, .skip2 + ldh a, [hPrintNumBuffer + 1] + or 0 + jr z, .skip3 + dec a + ldh [hPrintNumBuffer + 1], a + ldh a, [hPrintNumBuffer + 2] +.skip2 + sub b + ldh [hPrintNumBuffer + 2], a + ldh a, [hPrintNumBuffer + 6] + ld b, a + ldh a, [hPrintNumBuffer + 3] + ldh [hPrintNumBuffer + 9], a + cp b + jr nc, .skip4 + ldh a, [hPrintNumBuffer + 2] + and a + jr nz, .skip5 + ldh a, [hPrintNumBuffer + 1] + and a + jr z, .skip6 + dec a + ldh [hPrintNumBuffer + 1], a + xor a +.skip5 + dec a + ldh [hPrintNumBuffer + 2], a + ldh a, [hPrintNumBuffer + 3] +.skip4 + sub b + ldh [hPrintNumBuffer + 3], a + inc c + jr .loop +.skip6 + ldh a, [hPrintNumBuffer + 8] + ldh [hPrintNumBuffer + 2], a +.skip3 + ldh a, [hPrintNumBuffer + 7] + ldh [hPrintNumBuffer + 1], a +.skip1 + ldh a, [hPrintNumBuffer + 0] + or c + jr z, .PrintLeadingZero + ldh a, [hPrintNumBuffer + 0] + and a + jr nz, .done + bit 5, d + jr z, .done + ld a, "¥" + ld [hli], a + res 5, d +.done + ld a, "0" + add c + ld [hl], a + ldh [hPrintNumBuffer + 0], a + inc e + dec e + ret nz + inc hl + ld [hl], "" + ret + +.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: +; 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? + jr nz, .inc + bit 6, d ; left alignment or right alignment? + jr z, .inc + ldh a, [hPrintNumBuffer + 0] + and a + ret z +.inc + inc hl + ret diff --git a/engine/math/sine.asm b/engine/math/sine.asm new file mode 100644 index 0000000..c7422aa --- /dev/null +++ b/engine/math/sine.asm @@ -0,0 +1,4 @@ +_Sine:: +; a = d * sin(e * pi/32) + ld a, e + calc_sine_wave diff --git a/engine/menus/delete_save.asm b/engine/menus/delete_save.asm new file mode 100644 index 0000000..583126a --- /dev/null +++ b/engine/menus/delete_save.asm @@ -0,0 +1,35 @@ +_DeleteSaveData: + farcall BlankScreen + ld b, SCGB_DIPLOMA + call GetSGBLayout + call LoadStandardFont + call LoadFontsExtra + ld de, MUSIC_MAIN_MENU + call PlayMusic + ld hl, .ClearAllSaveDataText + call PrintText + ld hl, .NoYesMenuHeader + call CopyMenuHeader + call VerticalMenu + ret c + ld a, [wMenuCursorY] + cp 1 + ret z + farcall EmptyAllSRAMBanks + ret + +.ClearAllSaveDataText: + text_far _ClearAllSaveDataText + text_end + +.NoYesMenuHeader: + db 0 ; flags + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 2 ; items + db "NO@" + db "YES@" diff --git a/engine/menus/empty_sram.asm b/engine/menus/empty_sram.asm new file mode 100644 index 0000000..3c060d8 --- /dev/null +++ b/engine/menus/empty_sram.asm @@ -0,0 +1,15 @@ +EmptyAllSRAMBanks: +for x, NUM_SRAM_BANKS + ld a, x + call .EmptyBank +endr + ret + +.EmptyBank: + call OpenSRAM + ld hl, SRAM_Begin + ld bc, SRAM_End - SRAM_Begin + xor a + call ByteFill + call CloseSRAM + ret diff --git a/engine/menus/init_gender.asm b/engine/menus/init_gender.asm new file mode 100644 index 0000000..4bf8cc2 --- /dev/null +++ b/engine/menus/init_gender.asm @@ -0,0 +1,101 @@ +InitCrystalData: + ld a, $1 + ld [wd474], a + xor a + ld [wd473], a + ld [wPlayerGender], a + ld [wd475], a + ld [wd476], a + ld [wd477], a + ld [wd478], a + ld [wd002], a + ld [wd003], a + ld a, [wd479] + res 0, a ; ??? + ld [wd479], a + ld a, [wd479] + res 1, a ; ??? + ld [wd479], a + ret + +INCLUDE "mobile/mobile_12.asm" + +InitGender: + call InitGenderScreen + call LoadGenderScreenPal + call LoadGenderScreenLightBlueTile + call WaitBGMap2 + call SetPalettes + ld hl, AreYouABoyOrAreYouAGirlText + call PrintText + ld hl, .MenuHeader + call LoadMenuHeader + call WaitBGMap2 + call VerticalMenu + call CloseWindow + ld a, [wMenuCursorY] + dec a + ld [wPlayerGender], a + ld c, 10 + call DelayFrames + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 6, 4, 12, 9 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_WRAP | STATICMENU_DISABLE_B ; flags + db 2 ; items + db "Boy@" + db "Girl@" + +AreYouABoyOrAreYouAGirlText: + text_far _AreYouABoyOrAreYouAGirlText + text_end + +InitGenderScreen: + ld a, $10 + ld [wMusicFade], a + ld a, LOW(MUSIC_NONE) + ld [wMusicFadeID], a + ld a, HIGH(MUSIC_NONE) + ld [wMusicFadeID + 1], a + ld c, 8 + call DelayFrames + call ClearBGPalettes + call InitCrystalData + call LoadFontsExtra + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + ld a, $0 + call ByteFill + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + xor a + call ByteFill + ret + +LoadGenderScreenPal: + ld hl, .Palette + ld de, wBGPals1 + ld bc, 1 palettes + ld a, BANK(wBGPals1) + call FarCopyWRAM + farcall ApplyPals + ret + +.Palette: +INCLUDE "gfx/new_game/gender_screen.pal" + +LoadGenderScreenLightBlueTile: + ld de, .LightBlueTile + ld hl, vTiles2 tile $00 + lb bc, BANK(.LightBlueTile), 1 + call Get2bpp + ret + +.LightBlueTile: +INCBIN "gfx/new_game/gender_screen.2bpp" diff --git a/engine/menus/intro_menu.asm b/engine/menus/intro_menu.asm new file mode 100644 index 0000000..6917ae4 --- /dev/null +++ b/engine/menus/intro_menu.asm @@ -0,0 +1,1385 @@ +Intro_MainMenu: + ld de, MUSIC_NONE + call PlayMusic + call DelayFrame + ld de, MUSIC_MAIN_MENU + ld a, e + ld [wMapMusic], a + call PlayMusic + farcall MainMenu + jp StartTitleScreen + +IntroMenu_DummyFunction: ; unreferenced + ret + +PrintDayOfWeek: + push de + ld hl, .Days + ld a, b + call GetNthString + ld d, h + ld e, l + pop hl + call PlaceString + ld h, b + ld l, c + ld de, .Day + call PlaceString + ret + +.Days: + db "SUN@" + db "MON@" + db "TUES@" + db "WEDNES@" + db "THURS@" + db "FRI@" + db "SATUR@" + +.Day: + db "DAY@" + +NewGame_ClearTilemapEtc: + xor a + ldh [hMapAnims], a + call ClearTilemap + call LoadFontsExtra + call LoadStandardFont + call ClearWindowData + ret + +MysteryGift: + call UpdateTime + farcall DoMysteryGiftIfDayHasPassed + farcall DoMysteryGift + ret + +Option: + farcall _Option + ret + +NewGame: + xor a + ld [wDebugFlags], a + call ResetWRAM + call NewGame_ClearTilemapEtc + call AreYouABoyOrAreYouAGirl + call OakSpeech + call InitializeWorld + + ld a, LANDMARK_NEW_BARK_TOWN + ld [wPrevLandmark], a + + ld a, SPAWN_HOME + ld [wDefaultSpawnpoint], a + + ld a, MAPSETUP_WARP + ldh [hMapEntryMethod], a + jp FinishContinueFunction + +AreYouABoyOrAreYouAGirl: + farcall Mobile_AlwaysReturnNotCarry ; mobile + jr c, .ok + farcall InitGender + ret + +.ok + ld c, 0 + farcall InitMobileProfile ; mobile + ret + +if DEF(_DEBUG) +DebugRoom: ; unreferenced + farcall _DebugRoom + ret +endc + +ResetWRAM: + xor a + ldh [hBGMapMode], a + call _ResetWRAM + ret + +_ResetWRAM: + ld a, BANK("16-bit WRAM tables") + ldh [rSVBK], a + ld hl, wPokemonIndexTable + ld bc, wPokemonIndexTableEnd - wPokemonIndexTable + xor a + call ByteFill + ld hl, wMoveIndexTable + ld bc, wMoveIndexTableEnd - wMoveIndexTable + call ByteFill + + ld a, 1 + ldh [rSVBK], a + + ld hl, wShadowOAM + ld bc, wOptions - wShadowOAM + xor a + call ByteFill + + ld hl, WRAM1_Begin + ld bc, wGameData - WRAM1_Begin + xor a + call ByteFill + + ld hl, wGameData + ld bc, wGameDataEnd - wGameData + xor a + call ByteFill + + ldh a, [rLY] + ldh [hUnusedBackup], a + call DelayFrame + ldh a, [hRandomSub] + ld [wPlayerID], a + + ldh a, [rLY] + ldh [hUnusedBackup], a + call DelayFrame + ldh a, [hRandomAdd] + ld [wPlayerID + 1], a + + call Random + ld [wSecretID], a + call DelayFrame + call Random + ld [wSecretID + 1], a + + ld hl, wPartyCount + call .InitList + + xor a + ld [wCurBox], a + ld [wSavedAtLeastOnce], a + + call SetDefaultBoxNames + + ld a, BANK(sBoxCount) + call OpenSRAM + ld hl, sBoxCount + call .InitList + call CloseSRAM + + ld hl, wNumItems + call .InitList + + ld hl, wNumKeyItems + call .InitList + + ld hl, wNumBalls + call .InitList + + ld hl, wNumPCItems + call .InitList + + xor a + ld [wRoamMon1Species], a + ld [wRoamMon2Species], a + ld [wRoamMon3Species], a + ld a, -1 + ld [wRoamMon1MapGroup], a + ld [wRoamMon2MapGroup], a + ld [wRoamMon3MapGroup], a + ld [wRoamMon1MapNumber], a + ld [wRoamMon2MapNumber], a + ld [wRoamMon3MapNumber], a + + ld a, BANK(sMysteryGiftItem) ; aka BANK(sMysteryGiftUnlocked) + call OpenSRAM + ld hl, sMysteryGiftItem + xor a + ld [hli], a + assert sMysteryGiftItem + 1 == sMysteryGiftUnlocked + dec a ; -1 + ld [hl], a + call CloseSRAM + + call LoadOrRegenerateLuckyIDNumber + call InitializeMagikarpHouse + + xor a + ld [wMonType], a + + ld [wJohtoBadges], a + ld [wKantoBadges], a + + ld [wCoins], a + ld [wCoins + 1], a + +if START_MONEY >= $10000 + ld a, HIGH(START_MONEY >> 8) +endc + ld [wMoney], a + ld a, HIGH(START_MONEY) ; mid + ld [wMoney + 1], a + ld a, LOW(START_MONEY) + ld [wMoney + 2], a + + xor a + ld [wWhichMomItem], a + + ld hl, wMomItemTriggerBalance + ld [hl], HIGH(MOM_MONEY >> 8) + inc hl + ld [hl], HIGH(MOM_MONEY) ; mid + inc hl + ld [hl], LOW(MOM_MONEY) + + call InitializeNPCNames + + farcall InitDecorations + + farcall DeletePartyMonMail + + farcall DeleteMobileEventIndex + + call ResetGameTime + ret + +.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 + +SetDefaultBoxNames: + ld hl, wBoxNames + ld c, 0 +.loop + push hl + ld de, .Box + call CopyName2 + dec hl + ld a, c + inc a + cp 10 + jr c, .less + sub 10 + ld [hl], "1" + inc hl + +.less + add "0" + ld [hli], a + ld [hl], "@" + pop hl + ld de, 9 + add hl, de + inc c + ld a, c + cp NUM_BOXES + jr c, .loop + ret + +.Box: + db "BOX@" + +InitializeMagikarpHouse: + ld hl, wBestMagikarpLengthFeet + ld a, $3 + ld [hli], a + ld a, $6 + ld [hli], a + ld de, .Ralph + call CopyName2 + ret + +.Ralph: + db "RALPH@" + +InitializeNPCNames: + ld hl, .Rival + ld de, wRivalName + call .Copy + + ld hl, .Mom + ld de, wMomsName + call .Copy + + ld hl, .Red + ld de, wRedsName + call .Copy + + ld hl, .Green + ld de, wGreensName + +.Copy: + ld bc, NAME_LENGTH + call CopyBytes + ret + +.Rival: db "???@" +.Red: db "RED@" +.Green: db "GREEN@" +.Mom: db "MOM@" + +InitializeWorld: + call ShrinkPlayer + farcall SpawnPlayer + farcall _InitializeStartDay + ret + +LoadOrRegenerateLuckyIDNumber: + ld a, BANK(sLuckyIDNumber) + call OpenSRAM + ld a, [wCurDay] + inc a + ld b, a + ld a, [sLuckyNumberDay] + cp b + ld a, [sLuckyIDNumber + 1] + ld c, a + ld a, [sLuckyIDNumber] + jr z, .skip + ld a, b + ld [sLuckyNumberDay], a + call Random + ld c, a + call Random + +.skip + ld [wLuckyIDNumber], a + ld [sLuckyIDNumber], a + ld a, c + ld [wLuckyIDNumber + 1], a + ld [sLuckyIDNumber + 1], a + jp CloseSRAM + +Continue: + farcall TryLoadSaveFile + jr c, .FailToLoad + farcall _LoadData + call LoadStandardMenuHeader + call DisplaySaveInfoOnContinue + ld a, $1 + ldh [hBGMapMode], a + ld c, 20 + call DelayFrames + call ConfirmContinue + jr nc, .Check1Pass + call CloseWindow + jr .FailToLoad + +.Check1Pass: + call Continue_CheckRTC_RestartClock + jr nc, .Check2Pass + call CloseWindow + jr .FailToLoad + +.Check2Pass: + ld a, $8 + ld [wMusicFade], a + ld a, LOW(MUSIC_NONE) + ld [wMusicFadeID], a + ld a, HIGH(MUSIC_NONE) + ld [wMusicFadeID + 1], a + call ClearBGPalettes + call Continue_MobileAdapterMenu + call CloseWindow + call ClearTilemap + ld c, 20 + call DelayFrames + farcall JumpRoamMons + farcall CopyMysteryGiftReceivedDecorationsToPC + farcall ClockContinue + ld a, [wSpawnAfterChampion] + cp SPAWN_LANCE + jr z, .SpawnAfterE4 + ld a, MAPSETUP_CONTINUE + ldh [hMapEntryMethod], a + jp FinishContinueFunction + +.FailToLoad: + ret + +.SpawnAfterE4: + ld a, SPAWN_NEW_BARK + ld [wDefaultSpawnpoint], a + call PostCreditsSpawn + jp FinishContinueFunction + +SpawnAfterRed: + ld a, SPAWN_MT_SILVER + ld [wDefaultSpawnpoint], a + +PostCreditsSpawn: + xor a + ld [wSpawnAfterChampion], a + ld a, MAPSETUP_WARP + ldh [hMapEntryMethod], a + ret + +Continue_MobileAdapterMenu: + farcall Mobile_AlwaysReturnNotCarry ; mobile check + ret nc + +; the rest of this stuff is never reached because +; the previous function returns with carry not set + ld hl, wd479 + bit 1, [hl] + ret nz + ld a, 5 + ld [wMusicFade], a + ld a, LOW(MUSIC_MOBILE_ADAPTER_MENU) + ld [wMusicFadeID], a + ld a, HIGH(MUSIC_MOBILE_ADAPTER_MENU) + ld [wMusicFadeID + 1], a + ld c, 20 + call DelayFrames + ld c, $1 + farcall InitMobileProfile ; mobile + farcall _SaveData + ld a, 8 + ld [wMusicFade], a + ld a, LOW(MUSIC_NONE) + ld [wMusicFadeID], a + ld a, HIGH(MUSIC_NONE) + ld [wMusicFadeID + 1], a + ld c, 35 + call DelayFrames + ret + +ConfirmContinue: +.loop + call DelayFrame + call GetJoypad + ld hl, hJoyPressed + bit A_BUTTON_F, [hl] + jr nz, .PressA + bit B_BUTTON_F, [hl] + jr z, .loop + scf + ret + +.PressA: + ret + +Continue_CheckRTC_RestartClock: + call CheckRTCStatus + and %10000000 ; Day count exceeded 16383 + jr z, .pass + farcall RestartClock + ld a, c + and a + jr z, .pass + scf + ret + +.pass + xor a + ret + +FinishContinueFunction: +.loop + xor a + ld [wDontPlayMapMusicOnReload], a + ld [wLinkMode], a + ld hl, wGameTimerPaused + set GAME_TIMER_PAUSED_F, [hl] + res GAME_TIMER_MOBILE_F, [hl] + ld hl, wEnteredMapFromContinue + set 1, [hl] + farcall OverworldLoop + ld a, [wSpawnAfterChampion] + cp SPAWN_RED + jr z, .AfterRed + jp Reset + +.AfterRed: + call SpawnAfterRed + jr .loop + +DisplaySaveInfoOnContinue: + call CheckRTCStatus + and %10000000 + jr z, .clock_ok + lb de, 4, 8 + call DisplayContinueDataWithRTCError + ret + +.clock_ok + lb de, 4, 8 + call DisplayNormalContinueData + ret + +DisplaySaveInfoOnSave: + lb de, 4, 0 + jr DisplayNormalContinueData + +DisplayNormalContinueData: + call Continue_LoadMenuHeader + call Continue_DisplayBadgesDexPlayerName + call Continue_PrintGameTime + call LoadFontsExtra + call UpdateSprites + ret + +DisplayContinueDataWithRTCError: + call Continue_LoadMenuHeader + call Continue_DisplayBadgesDexPlayerName + call Continue_UnknownGameTime + call LoadFontsExtra + call UpdateSprites + ret + +Continue_LoadMenuHeader: + xor a + ldh [hBGMapMode], a + ld hl, .MenuHeader_Dex + ld a, [wStatusFlags] + bit STATUSFLAGS_POKEDEX_F, a + jr nz, .show_menu + ld hl, .MenuHeader_NoDex + +.show_menu + call _OffsetMenuHeader + call MenuBox + call PlaceVerticalMenuItems + ret + +.MenuHeader_Dex: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 15, 9 + dw .MenuData_Dex + db 1 ; default option + +.MenuData_Dex: + db 0 ; flags + db 4 ; items + db "PLAYER@" + db "BADGES@" + db "#DEX@" + db "TIME@" + +.MenuHeader_NoDex: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 15, 9 + dw .MenuData_NoDex + db 1 ; default option + +.MenuData_NoDex: + db 0 ; flags + db 4 ; items + db "PLAYER @" + db "BADGES@" + db " @" + db "TIME@" + +Continue_DisplayBadgesDexPlayerName: + call MenuBoxCoord2Tile + push hl + decoord 13, 4, 0 + add hl, de + call Continue_DisplayBadgeCount + pop hl + push hl + decoord 12, 6, 0 + add hl, de + call Continue_DisplayPokedexNumCaught + pop hl + push hl + decoord 8, 2, 0 + add hl, de + ld de, .Player + call PlaceString + pop hl + ret + +.Player: + db "@" + +Continue_PrintGameTime: + decoord 9, 8, 0 + add hl, de + call Continue_DisplayGameTime + ret + +Continue_UnknownGameTime: + decoord 9, 8, 0 + add hl, de + ld de, .three_question_marks + call PlaceString + ret + +.three_question_marks + db " ???@" + +Continue_DisplayBadgeCount: + push hl + ld hl, wJohtoBadges + ld b, 2 + call CountSetBits + pop hl + ld de, wNumSetBits + lb bc, 1, 2 + jp PrintNum + +Continue_DisplayPokedexNumCaught: + ld a, [wStatusFlags] + bit STATUSFLAGS_POKEDEX_F, a + ret z + push hl + ld hl, wPokedexCaught + ld bc, wEndPokedexCaught - wPokedexCaught + call CountSetBits16 + pop hl + ld a, b + ld b, c + ld c, a + push bc + push hl + ld hl, sp + 2 + ld d, h + ld e, l + lb bc, 2, 3 + pop hl + call PrintNum + pop bc + ret + +Continue_DisplayGameTime: + ld de, wGameTimeHours + lb bc, 2, 3 + call PrintNum + ld [hl], "" + inc hl + ld de, wGameTimeMinutes + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + jp PrintNum + +OakSpeech: + farcall InitClock + call RotateFourPalettesLeft + call ClearTilemap + + ld de, MUSIC_ROUTE_30 + call PlayMusic + + call RotateFourPalettesRight + call RotateThreePalettesRight + xor a + ld [wCurPartySpecies], a + ld a, POKEMON_PROF + ld [wTrainerClass], a + call Intro_PrepTrainerPic + + ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + call Intro_RotatePalettesLeftFrontpic + + ld hl, OakText1 + call PrintText + call RotateThreePalettesRight + call ClearTilemap + + ld hl, WOOPER + call GetPokemonIDFromIndex + ld [wCurSpecies], a + ld [wCurPartySpecies], a + call GetBaseData + + hlcoord 6, 4 + call PrepMonFrontpic + + xor a + ld [wTempMonDVs], a + ld [wTempMonDVs + 1], a + + ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + call Intro_WipeInFrontpic + + ld hl, OakText2 + call PrintText + ld hl, OakText4 + call PrintText + call RotateThreePalettesRight + call ClearTilemap + + xor a + ld [wCurPartySpecies], a + ld a, POKEMON_PROF + ld [wTrainerClass], a + call Intro_PrepTrainerPic + + ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + call Intro_RotatePalettesLeftFrontpic + + ld hl, OakText5 + call PrintText + call RotateThreePalettesRight + call ClearTilemap + + xor a + ld [wCurPartySpecies], a + farcall DrawIntroPlayerPic + + ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + call Intro_RotatePalettesLeftFrontpic + + ld hl, OakText6 + call PrintText + call NamePlayer + ld hl, OakText7 + call PrintText + ret + +OakText1: + text_far _OakText1 + text_end + +OakText2: + text_far _OakText2 + text_asm + ld hl, WOOPER + call GetPokemonIDFromIndex + call PlayMonCry + call WaitSFX + ld hl, OakText3 + ret + +OakText3: + text_far _OakText3 + text_end + +OakText4: + text_far _OakText4 + text_end + +OakText5: + text_far _OakText5 + text_end + +OakText6: + text_far _OakText6 + text_end + +OakText7: + text_far _OakText7 + text_end + +NamePlayer: + farcall MovePlayerPicRight + farcall ShowPlayerNamingChoices + ld a, [wMenuCursorY] + dec a + jr z, .NewName + call StorePlayerName + farcall ApplyMonOrTrainerPals + farcall MovePlayerPicLeft + ret + +.NewName: + ld b, NAME_PLAYER + ld de, wPlayerName + farcall NamingScreen + + call RotateThreePalettesRight + call ClearTilemap + + call LoadFontsExtra + call WaitBGMap + + xor a + ld [wCurPartySpecies], a + farcall DrawIntroPlayerPic + + ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + call RotateThreePalettesLeft + + ld hl, wPlayerName + ld de, .Chris + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .Male + ld de, .Kris +.Male: + call InitName + ret + +.Chris: + db "CHRIS@@@@@@" +.Kris: + db "KRIS@@@@@@@" + +GSShowPlayerNamingChoices: ; unreferenced + call LoadMenuHeader + call VerticalMenu + ld a, [wMenuCursorY] + dec a + call CopyNameFromMenu + call CloseWindow + ret + +StorePlayerName: + ld a, "@" + ld bc, NAME_LENGTH + ld hl, wPlayerName + call ByteFill + ld hl, wPlayerName + ld de, wStringBuffer2 + call CopyName2 + ret + +ShrinkPlayer: + ldh a, [hROMBank] + push af + + ld a, 32 ; fade time + ld [wMusicFade], a + ld de, MUSIC_NONE + ld a, e + ld [wMusicFadeID], a + ld a, d + ld [wMusicFadeID + 1], a + + ld de, SFX_ESCAPE_ROPE + call PlaySFX + pop af + rst Bankswitch + + ld c, 8 + call DelayFrames + + ld hl, Shrink1Pic + ld b, BANK(Shrink1Pic) + call ShrinkFrame + + ld c, 8 + call DelayFrames + + ld hl, Shrink2Pic + ld b, BANK(Shrink2Pic) + call ShrinkFrame + + ld c, 8 + call DelayFrames + + hlcoord 6, 5 + ld b, 7 + ld c, 7 + call ClearBox + + ld c, 3 + call DelayFrames + + call Intro_PlacePlayerSprite + call LoadFontsExtra + + ld c, 50 + call DelayFrames + + call RotateThreePalettesRight + call ClearTilemap + ret + +Intro_RotatePalettesLeftFrontpic: + ld hl, IntroFadePalettes + ld b, IntroFadePalettes.End - IntroFadePalettes +.loop + ld a, [hli] + call DmgToCgbBGPals + ld c, 10 + call DelayFrames + dec b + jr nz, .loop + ret + +IntroFadePalettes: + dc 1, 1, 1, 0 + dc 2, 2, 2, 0 + dc 3, 3, 3, 0 + dc 3, 3, 2, 0 + dc 3, 3, 1, 0 + dc 3, 2, 1, 0 +.End + +Intro_WipeInFrontpic: + ld a, $77 + ldh [hWX], a + call DelayFrame + ld a, %11100100 + call DmgToCgbBGPals +.loop + call DelayFrame + ldh a, [hWX] + sub $8 + cp -1 + ret z + ldh [hWX], a + jr .loop + +Intro_PrepTrainerPic: + ld de, vTiles2 + farcall GetTrainerPic + xor a + ldh [hGraphicStartTile], a + hlcoord 6, 4 + lb bc, 7, 7 + predef PlaceGraphic + ret + +ShrinkFrame: + ld de, vTiles2 + ld c, 7 * 7 + predef DecompressGet2bpp + xor a + ldh [hGraphicStartTile], a + hlcoord 6, 4 + lb bc, 7, 7 + predef PlaceGraphic + ret + +Intro_PlacePlayerSprite: + farcall GetPlayerIcon + ld c, 12 + ld hl, vTiles0 + call Request2bpp + + ld hl, wShadowOAMSprite00 + ld de, .sprites + ld a, [de] + inc de + + ld c, a +.loop + ld a, [de] + inc de + ld [hli], a ; y + ld a, [de] + inc de + ld [hli], a ; x + ld a, [de] + inc de + ld [hli], a ; tile id + + ld b, PAL_OW_RED + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .male + ld b, PAL_OW_BLUE +.male + ld a, b + + ld [hli], a ; attributes + dec c + jr nz, .loop + ret + +.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 + + + const_def + const TITLESCREENOPTION_MAIN_MENU + const TITLESCREENOPTION_DELETE_SAVE_DATA + const TITLESCREENOPTION_RESTART + const TITLESCREENOPTION_UNUSED + const TITLESCREENOPTION_RESET_CLOCK +DEF NUM_TITLESCREENOPTIONS EQU const_value + +IntroSequence: + callfar SplashScreen + jr c, StartTitleScreen + farcall CrystalIntro + + ; fallthrough + +StartTitleScreen: + ldh a, [rSVBK] + push af + ld a, BANK(wLYOverrides) + ldh [rSVBK], a + + call .TitleScreen + call DelayFrame +.loop + call RunTitleScreen + jr nc, .loop + + call ClearSprites + call ClearBGPalettes + + pop af + ldh [rSVBK], a + + ld hl, rLCDC + res rLCDC_SPRITE_SIZE, [hl] ; 8x8 + call ClearScreen + call WaitBGMap2 + xor a + ldh [hLCDCPointer], a + ldh [hSCX], a + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + ld b, SCGB_DIPLOMA + call GetSGBLayout + call UpdateTimePals + ld a, [wTitleScreenSelectedOption] + cp NUM_TITLESCREENOPTIONS + jr c, .ok + xor a +.ok + ld e, a + ld d, 0 + ld hl, .dw + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.dw + dw Intro_MainMenu + dw DeleteSaveData + dw IntroSequence + dw IntroSequence + dw ResetClock + +.TitleScreen: + farcall _TitleScreen + ret + +RunTitleScreen: + ld a, [wJumptableIndex] + bit 7, a + jr nz, .done_title + call TitleScreenScene + farcall SuicuneFrameIterator + call DelayFrame + and a + ret + +.done_title + scf + ret + +UnusedTitlePerspectiveScroll: ; unreferenced +; Similar behavior to Intro_PerspectiveScrollBG. + ldh a, [hVBlankCounter] + and $7 + ret nz + ld hl, wLYOverrides + $5f + ld a, [hl] + dec a + ld bc, 2 * SCREEN_WIDTH + call ByteFill + ret + +TitleScreenScene: + ld e, a + ld d, 0 + ld hl, .scenes + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.scenes + dw TitleScreenEntrance + dw TitleScreenTimer + dw TitleScreenMain + dw TitleScreenEnd + +TitleScreenNextScene: ; unreferenced + ld hl, wJumptableIndex + inc [hl] + ret + +TitleScreenEntrance: +; Animate the logo: +; Move each line by 4 pixels until our count hits 0. + ldh a, [hSCX] + and a + jr z, .done + sub 4 + ldh [hSCX], a + +; Lay out a base (all lines scrolling together). + ld e, a + ld hl, wLYOverrides + ld bc, 8 * 10 ; logo height + call ByteFill + +; Reversed signage for every other line's position. +; This is responsible for the interlaced effect. + ld a, e + xor $ff + inc a + + ld b, 8 * 10 / 2 ; logo height / 2 + ld hl, wLYOverrides + 1 +.loop + ld [hli], a + inc hl + dec b + jr nz, .loop + + farcall AnimateTitleCrystal + ret + +.done +; Next scene + ld hl, wJumptableIndex + inc [hl] + xor a + ldh [hLCDCPointer], a + +; Play the title screen music. + ld de, MUSIC_TITLE + call PlayMusic + + ld a, $88 + ldh [hWY], a + ret + +TitleScreenTimer: +; Next scene + ld hl, wJumptableIndex + inc [hl] + +; Start a timer + ld hl, wTitleScreenTimer + ld de, 73 * 60 + 36 + ld [hl], e + inc hl + ld [hl], d + ret + +TitleScreenMain: +; Run the timer down. + ld hl, wTitleScreenTimer + ld e, [hl] + inc hl + ld d, [hl] + ld a, e + or d + jr z, .end + + dec de + ld [hl], d + dec hl + ld [hl], e + +; Save data can be deleted by pressing Up + B + Select. + call GetJoypad + ld hl, hJoyDown + ld a, [hl] + and D_UP + B_BUTTON + SELECT + cp D_UP + B_BUTTON + SELECT + jr z, .delete_save_data + +; To bring up the clock reset dialog: + +; Hold Down + B + Select to initiate the sequence. + ldh a, [hClockResetTrigger] + cp $34 + jr z, .check_clock_reset + + ld a, [hl] + and D_DOWN + B_BUTTON + SELECT + cp D_DOWN + B_BUTTON + SELECT + jr nz, .check_start + + ld a, $34 + ldh [hClockResetTrigger], a + jr .check_start + +; Keep Select pressed, and hold Left + Up. +; Then let go of Select. +.check_clock_reset + bit SELECT_F, [hl] + jr nz, .check_start + + xor a + ldh [hClockResetTrigger], a + + ld a, [hl] + and D_LEFT + D_UP + cp D_LEFT + D_UP + jr z, .reset_clock + +; Press Start or A to start the game. +.check_start + ld a, [hl] + and START | A_BUTTON + jr nz, .incave + ret + +.incave + ld a, TITLESCREENOPTION_MAIN_MENU + jr .done + +.delete_save_data + ld a, TITLESCREENOPTION_DELETE_SAVE_DATA + +.done + ld [wTitleScreenSelectedOption], a + +; Return to the intro sequence. + ld hl, wJumptableIndex + set 7, [hl] + ret + +.end +; Next scene + ld hl, wJumptableIndex + inc [hl] + +; Fade out the title screen music + xor a ; MUSIC_NONE + ld [wMusicFadeID], a + ld [wMusicFadeID + 1], a + ld hl, wMusicFade + ld [hl], 8 ; 1 second + + ld hl, wTitleScreenTimer + inc [hl] + ret + +.reset_clock + ld a, TITLESCREENOPTION_RESET_CLOCK + ld [wTitleScreenSelectedOption], a + +; Return to the intro sequence. + ld hl, wJumptableIndex + set 7, [hl] + ret + +TitleScreenEnd: +; Wait until the music is done fading. + + ld hl, wTitleScreenTimer + inc [hl] + + ld a, [wMusicFade] + and a + ret nz + + ld a, TITLESCREENOPTION_RESTART + ld [wTitleScreenSelectedOption], a + +; Back to the intro. + ld hl, wJumptableIndex + set 7, [hl] + ret + +DeleteSaveData: + farcall _DeleteSaveData + jp Init + +ResetClock: + farcall _ResetClock + jp Init + +UpdateTitleTrailSprite: ; unreferenced + ; If bit 0 or 1 of [wTitleScreenTimer] is set, we don't need to be here. + ld a, [wTitleScreenTimer] + and %00000011 + ret nz + ld bc, wSpriteAnim10 + ld hl, SPRITEANIMSTRUCT_FRAME + add hl, bc + ld l, [hl] + ld h, 0 + add hl, hl + add hl, hl + ld de, .TitleTrailCoords + add hl, de + ; If bit 2 of [wTitleScreenTimer] is set, get the second coords; else, get the first coords + ld a, [wTitleScreenTimer] + and %00000100 + srl a + srl a + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + and a + ret z + ld e, a + ld d, [hl] + ld a, SPRITE_ANIM_INDEX_GS_TITLE_TRAIL + call InitSpriteAnimStruct + ret + +.TitleTrailCoords: +MACRO trail_coords + rept _NARG / 2 + DEF _dx = 4 + if \1 == 0 && \2 == 0 + DEF _dx = 0 + endc + dbpixel \1, \2, _dx, 0 + shift 2 + endr +ENDM + ; frame 0 y, x; frame 1 y, x + trail_coords 11, 10, 0, 0 + trail_coords 11, 13, 11, 11 + trail_coords 11, 13, 11, 15 + trail_coords 11, 17, 11, 15 + trail_coords 0, 0, 11, 15 + trail_coords 0, 0, 11, 11 + +Copyright: + call ClearTilemap + call LoadFontsExtra + ld de, CopyrightGFX + ld hl, vTiles2 tile $60 + lb bc, BANK(CopyrightGFX), 29 + call Request2bpp + hlcoord 2, 7 + ld de, CopyrightString + jp PlaceString + +CopyrightString: + ; ©1995-2001 Nintendo + db $60, $61, $62, $63, $64, $65, $66 + db $67, $68, $69, $6a, $6b, $6c + + ; ©1995-2001 Creatures inc. + next $60, $61, $62, $63, $64, $65, $66 + db $6d, $6e, $6f, $70, $71, $72, $7a, $7b, $7c + + ; ©1995-2001 GAME FREAK inc. + next $60, $61, $62, $63, $64, $65, $66 + db $73, $74, $75, $76, $77, $78, $79, $7a, $7b, $7c + + db "@" + +GameInit:: + farcall TryLoadSaveData + call ClearWindowData + call ClearBGPalettes + call ClearTilemap + ld a, HIGH(vBGMap0) + ldh [hBGMapAddress + 1], a + xor a ; LOW(vBGMap0) + ldh [hBGMapAddress], a + ldh [hJoyDown], a + ldh [hSCX], a + ldh [hSCY], a + ld a, $90 + ldh [hWY], a + call WaitBGMap + jp IntroSequence diff --git a/engine/menus/main_menu.asm b/engine/menus/main_menu.asm new file mode 100644 index 0000000..63173ec --- /dev/null +++ b/engine/menus/main_menu.asm @@ -0,0 +1,384 @@ + ; MainMenuItems indexes + const_def + const MAINMENU_NEW_GAME ; 0 + const MAINMENU_CONTINUE ; 1 + const MAINMENU_MOBILE_MYSTERY ; 2 + const MAINMENU_MOBILE ; 3 + const MAINMENU_MOBILE_STUDIUM ; 4 + const MAINMENU_MYSTERY_MOBILE_STUDIUM ; 5 + const MAINMENU_MYSTERY ; 6 + const MAINMENU_MYSTERY_STUDIUM ; 7 + const MAINMENU_STUDIUM ; 8 + + ; MainMenu.Strings and MainMenu.Jumptable indexes + const_def + const MAINMENUITEM_CONTINUE ; 0 + const MAINMENUITEM_NEW_GAME ; 1 + const MAINMENUITEM_OPTION ; 2 + const MAINMENUITEM_MYSTERY_GIFT ; 3 + const MAINMENUITEM_MOBILE ; 4 + const MAINMENUITEM_MOBILE_STUDIUM ; 5 + const MAINMENUITEM_DEBUG_ROOM ; 6 + +MobileMenuGFX: +INCBIN "gfx/mobile/mobile_menu.2bpp" + +MainMenu: +.loop + xor a + ld [wDisableTextAcceleration], a + call ClearTilemapEtc + ld b, SCGB_DIPLOMA + call GetSGBLayout + call SetPalettes + ld hl, wGameTimerPaused + res GAME_TIMER_PAUSED_F, [hl] + call MainMenu_GetWhichMenu + ld [wWhichIndexSet], a + call MainMenu_PrintCurrentTimeAndDay + ld hl, .MenuHeader + call LoadMenuHeader + call MainMenuJoypadLoop + call CloseWindow + jr c, .quit + call ClearTilemap + ld a, [wMenuSelection] + ld hl, .Jumptable + rst JumpTable + jr .loop + +.quit + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 16, 7 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 0 ; items + dw MainMenuItems + dw PlaceMenuStrings + dw .Strings + +.Strings: +; entries correspond to MAINMENUITEM_* constants + db "CONTINUE@" + db "NEW GAME@" + db "OPTION@" + db "MYSTERY GIFT@" + db "MOBILE@" + db "MOBILE STUDIUM@" +if DEF(_DEBUG) + db "DEBUG ROOM@" +endc + +.Jumptable: +; entries correspond to MAINMENUITEM_* constants + dw MainMenu_Continue + dw MainMenu_NewGame + dw MainMenu_Option + dw MainMenu_MysteryGift + dw MainMenu_Mobile + dw MainMenu_MobileStudium +if DEF(_DEBUG) + dw MainMenu_DebugRoom +endc + +MainMenuItems: +; entries correspond to MAINMENU_* constants + + ; MAINMENU_NEW_GAME + db 2 + db MAINMENUITEM_NEW_GAME + db MAINMENUITEM_OPTION + db -1 + + ; MAINMENU_CONTINUE + db 3 + DEF(_DEBUG) + db MAINMENUITEM_CONTINUE + db MAINMENUITEM_NEW_GAME + db MAINMENUITEM_OPTION +if DEF(_DEBUG) + db MAINMENUITEM_DEBUG_ROOM +endc + db -1 + + ; MAINMENU_MOBILE_MYSTERY + db 5 + DEF(_DEBUG) + db MAINMENUITEM_CONTINUE + db MAINMENUITEM_NEW_GAME + db MAINMENUITEM_OPTION + db MAINMENUITEM_MYSTERY_GIFT + db MAINMENUITEM_MOBILE +if DEF(_DEBUG) + db MAINMENUITEM_DEBUG_ROOM +endc + db -1 + + ; MAINMENU_MOBILE + db 4 + DEF(_DEBUG) + db MAINMENUITEM_CONTINUE + db MAINMENUITEM_NEW_GAME + db MAINMENUITEM_OPTION + db MAINMENUITEM_MOBILE +if DEF(_DEBUG) + db MAINMENUITEM_DEBUG_ROOM +endc + db -1 + + ; MAINMENU_MOBILE_STUDIUM + db 5 + DEF(_DEBUG) + db MAINMENUITEM_CONTINUE + db MAINMENUITEM_NEW_GAME + db MAINMENUITEM_OPTION + db MAINMENUITEM_MOBILE + db MAINMENUITEM_MOBILE_STUDIUM +if DEF(_DEBUG) + db MAINMENUITEM_DEBUG_ROOM +endc + db -1 + + ; MAINMENU_MYSTERY_MOBILE_STUDIUM + db 6 + DEF(_DEBUG) + db MAINMENUITEM_CONTINUE + db MAINMENUITEM_NEW_GAME + db MAINMENUITEM_OPTION + db MAINMENUITEM_MYSTERY_GIFT + db MAINMENUITEM_MOBILE + db MAINMENUITEM_MOBILE_STUDIUM +if DEF(_DEBUG) + db MAINMENUITEM_DEBUG_ROOM +endc + db -1 + + ; MAINMENU_MYSTERY + db 4 + DEF(_DEBUG) + db MAINMENUITEM_CONTINUE + db MAINMENUITEM_NEW_GAME + db MAINMENUITEM_OPTION + db MAINMENUITEM_MYSTERY_GIFT +if DEF(_DEBUG) + db MAINMENUITEM_DEBUG_ROOM +endc + db -1 + + ; MAINMENU_MYSTERY_STUDIUM + db 5 + DEF(_DEBUG) + db MAINMENUITEM_CONTINUE + db MAINMENUITEM_NEW_GAME + db MAINMENUITEM_OPTION + db MAINMENUITEM_MYSTERY_GIFT + db MAINMENUITEM_MOBILE_STUDIUM +if DEF(_DEBUG) + db MAINMENUITEM_DEBUG_ROOM +endc + db -1 + + ; MAINMENU_STUDIUM + db 4 + DEF(_DEBUG) + db MAINMENUITEM_CONTINUE + db MAINMENUITEM_NEW_GAME + db MAINMENUITEM_OPTION + db MAINMENUITEM_MOBILE_STUDIUM +if DEF(_DEBUG) + db MAINMENUITEM_DEBUG_ROOM +endc + db -1 + +MainMenu_GetWhichMenu: + nop + nop + nop + ld a, [wSaveFileExists] + and a + jr nz, .next + ld a, MAINMENU_NEW_GAME + ret + +.next + ldh a, [hCGB] + cp TRUE + ld a, MAINMENU_CONTINUE + ret nz + ld a, BANK(sNumDailyMysteryGiftPartnerIDs) + call OpenSRAM + ld a, [sNumDailyMysteryGiftPartnerIDs] + cp -1 ; locked? + call CloseSRAM + jr nz, .mystery_gift + ; This check makes no difference. + ld a, [wStatusFlags] + bit STATUSFLAGS_MAIN_MENU_MOBILE_CHOICES_F, a + ld a, MAINMENU_CONTINUE + jr z, .ok + jr .ok + +.ok + jr .ok2 + +.ok2 + ld a, MAINMENU_CONTINUE + ret + +.mystery_gift + ; This check makes no difference. + ld a, [wStatusFlags] + bit STATUSFLAGS_MAIN_MENU_MOBILE_CHOICES_F, a + jr z, .ok3 + jr .ok3 + +.ok3 + jr .ok4 + +.ok4 + ld a, MAINMENU_MYSTERY + ret + +MainMenuJoypadLoop: + call SetUpMenu +.loop + call MainMenu_PrintCurrentTimeAndDay + ld a, [w2DMenuFlags1] + set 5, a + ld [w2DMenuFlags1], a + call GetScrollingMenuJoypad + ld a, [wMenuJoypad] + cp B_BUTTON + jr z, .b_button + cp A_BUTTON + jr z, .a_button + jr .loop + +.a_button + call PlayClickSFX + and a + ret + +.b_button + scf + ret + +MainMenu_PrintCurrentTimeAndDay: + ld a, [wSaveFileExists] + and a + ret z + xor a + ldh [hBGMapMode], a + call .PlaceBox + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + call .PlaceTime + pop af + ld [wOptions], a + ld a, $1 + ldh [hBGMapMode], a + ret + +.PlaceBox: + call CheckRTCStatus + and %10000000 ; Day count exceeded 16383 + jr nz, .TimeFail + hlcoord 0, 14 + ld b, 2 + ld c, 18 + call Textbox + ret + +.TimeFail: + call SpeechTextbox + ret + +.PlaceTime: + ld a, [wSaveFileExists] + and a + ret z + call CheckRTCStatus + and $80 + jp nz, .PrintTimeNotSet + call UpdateTime + call GetWeekday + ld b, a + decoord 1, 15 + call .PrintDayOfWeek + decoord 4, 16 + ldh a, [hHours] + ld c, a + farcall PrintHour + ld [hl], ":" + inc hl + ld de, hMinutes + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ret + +.minString: ; unreferenced + db "min.@" + +.PrintTimeNotSet: + hlcoord 1, 14 + ld de, .TimeNotSetString + call PlaceString + ret + +.TimeNotSetString: + db "TIME NOT SET@" + +.MainMenuTimeUnknownText: ; unreferenced + text_far _MainMenuTimeUnknownText + text_end + +.PrintDayOfWeek: + push de + ld hl, .Days + ld a, b + call GetNthString + ld d, h + ld e, l + pop hl + call PlaceString + ld h, b + ld l, c + ld de, .Day + call PlaceString + ret + +.Days: + db "SUN@" + db "MON@" + db "TUES@" + db "WEDNES@" + db "THURS@" + db "FRI@" + db "SATUR@" +.Day: + db "DAY@" + +ClearTilemapEtc: + xor a + ldh [hMapAnims], a + call ClearTilemap + call LoadFontsExtra + call LoadStandardFont + call ClearWindowData + ret + +MainMenu_NewGame: + farcall NewGame + ret + +MainMenu_Option: + farcall Option + ret + +MainMenu_Continue: + farcall Continue + ret + +MainMenu_MysteryGift: + farcall MysteryGift + ret diff --git a/engine/menus/menu.asm b/engine/menus/menu.asm new file mode 100644 index 0000000..96b6bdf --- /dev/null +++ b/engine/menus/menu.asm @@ -0,0 +1,805 @@ +_2DMenu_:: + ld hl, CopyMenuData + ld a, [wMenuData_2DMenuItemStringsBank] + rst FarCall + + call Draw2DMenu + call UpdateSprites + call ApplyTilemap + call Get2DMenuSelection + ret + +_InterpretBattleMenu:: + ld hl, CopyMenuData + ld a, [wMenuData_2DMenuItemStringsBank] + rst FarCall + + call Draw2DMenu + farcall MobileTextBorder + call UpdateSprites + call ApplyTilemap + call Get2DMenuSelection + ret + +_InterpretMobileMenu:: + ld hl, CopyMenuData + ld a, [wMenuData_2DMenuItemStringsBank] + rst FarCall + + call Draw2DMenu + farcall MobileTextBorder + call UpdateSprites + call ApplyTilemap + call Init2DMenuCursorPosition + ld hl, w2DMenuFlags1 + set 7, [hl] +.loop + call DelayFrame + farcall Function10032e + ld a, [wcd2b] + and a + jr nz, .quit + call MobileMenuJoypad + ld a, [wMenuJoypadFilter] + and c + jr z, .loop + call Mobile_GetMenuSelection + ret + +.quit + ld a, [w2DMenuNumCols] + ld c, a + ld a, [w2DMenuNumRows] + call SimpleMultiply + ld [wMenuCursorPosition], a + and a + ret + +Draw2DMenu: + xor a + ldh [hBGMapMode], a + call MenuBox + call Place2DMenuItemStrings + ret + +Get2DMenuSelection: + call Init2DMenuCursorPosition + call StaticMenuJoypad + call MenuClickSound +Mobile_GetMenuSelection: + ld a, [wMenuDataFlags] + bit 1, a + jr z, .skip + call GetMenuJoypad + bit SELECT_F, a + jr nz, .quit1 + +.skip + ld a, [wMenuDataFlags] + bit 0, a + jr nz, .skip2 + call GetMenuJoypad + bit B_BUTTON_F, a + jr nz, .quit2 + +.skip2 + ld a, [w2DMenuNumCols] + ld c, a + ld a, [wMenuCursorY] + dec a + call SimpleMultiply + ld c, a + ld a, [wMenuCursorX] + add c + ld [wMenuCursorPosition], a + and a + ret + +.quit1 + scf + ret + +.quit2 + scf + ret + +Get2DMenuNumberOfColumns: + ld a, [wMenuData_2DMenuDimensions] + and $f + ret + +Get2DMenuNumberOfRows: + ld a, [wMenuData_2DMenuDimensions] + swap a + and $f + ret + +Place2DMenuItemStrings: + ld hl, wMenuData_2DMenuItemStringsAddr + ld e, [hl] + inc hl + ld d, [hl] + call GetMenuTextStartCoord + call Coord2Tile + call Get2DMenuNumberOfRows + ld b, a +.row + push bc + push hl + call Get2DMenuNumberOfColumns + ld c, a +.col + push bc + ld a, [wMenuData_2DMenuItemStringsBank] + call Place2DMenuItemName + inc de + ld a, [wMenuData_2DMenuSpacing] + ld c, a + ld b, 0 + add hl, bc + pop bc + dec c + jr nz, .col + pop hl + ld bc, 2 * SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + ld hl, wMenuData_2DMenuFunctionAddr + ld a, [hli] + ld h, [hl] + ld l, a + or h + ret z + ld a, [wMenuData_2DMenuFunctionBank] + rst FarCall + ret + +Init2DMenuCursorPosition: + call GetMenuTextStartCoord + ld a, b + ld [w2DMenuCursorInitY], a + dec c + ld a, c + ld [w2DMenuCursorInitX], a + call Get2DMenuNumberOfRows + ld [w2DMenuNumRows], a + call Get2DMenuNumberOfColumns + ld [w2DMenuNumCols], a + call .InitFlags_a + call .InitFlags_b + call .InitFlags_c + ld a, [w2DMenuNumCols] + ld e, a + ld a, [wMenuCursorPosition] + ld b, a + xor a + ld d, 0 +.loop + inc d + add e + cp b + jr c, .loop + sub e + ld c, a + ld a, b + sub c + and a + jr z, .reset1 + cp e + jr z, .okay1 + jr c, .okay1 +.reset1 + ld a, 1 +.okay1 + ld [wMenuCursorX], a + ld a, [w2DMenuNumRows] + ld e, a + ld a, d + and a + jr z, .reset2 + cp e + jr z, .okay2 + jr c, .okay2 +.reset2 + ld a, 1 +.okay2 + ld [wMenuCursorY], a + xor a + ld [wCursorOffCharacter], a + ld [wCursorCurrentTile], a + ld [wCursorCurrentTile + 1], a + ret + +.InitFlags_a: + xor a + ld hl, w2DMenuFlags1 + ld [hli], a + ld [hld], a + ld a, [wMenuDataFlags] + bit 5, a + ret z + set 5, [hl] + set 4, [hl] + ret + +.InitFlags_b: + ld a, [wMenuData_2DMenuSpacing] + or $20 + ld [w2DMenuCursorOffsets], a + ret + +.InitFlags_c: + ld hl, wMenuDataFlags + ld a, A_BUTTON + bit 0, [hl] + jr nz, .skip + or B_BUTTON +.skip + bit 1, [hl] + jr z, .skip2 + or SELECT +.skip2 + ld [wMenuJoypadFilter], a + ret + +_StaticMenuJoypad:: + call Place2DMenuCursor +_ScrollingMenuJoypad:: + ld hl, w2DMenuFlags2 + res 7, [hl] + ldh a, [hBGMapMode] + push af + call MenuJoypadLoop + pop af + ldh [hBGMapMode], a + ret + +MobileMenuJoypad: + ld hl, w2DMenuFlags2 + res 7, [hl] + ldh a, [hBGMapMode] + push af + call Move2DMenuCursor + call Do2DMenuRTCJoypad + jr nc, .skip_joypad + call _2DMenuInterpretJoypad +.skip_joypad + pop af + ldh [hBGMapMode], a + call GetMenuJoypad + ld c, a + ret + +Function241d5: ; unreferenced + call Place2DMenuCursor +.loop + call Move2DMenuCursor + call HDMATransferTilemapToWRAMBank3 ; should be farcall + call .loop2 + jr nc, .done + call _2DMenuInterpretJoypad + jr c, .done + ld a, [w2DMenuFlags1] + bit 7, a + jr nz, .done + call GetMenuJoypad + ld c, a + ld a, [wMenuJoypadFilter] + and c + jr z, .loop + +.done + ret + +.loop2 + call Menu_WasButtonPressed + ret c + ld c, 1 + ld b, 3 + call AdvanceMobileInactivityTimerAndCheckExpired ; should be farcall + ret c + farcall Function100337 + ret c + ld a, [w2DMenuFlags1] + bit 7, a + jr z, .loop2 + and a + ret + +MenuJoypadLoop: +.loop + call Move2DMenuCursor + call .BGMap_OAM + call Do2DMenuRTCJoypad + jr nc, .done + call _2DMenuInterpretJoypad + jr c, .done + ld a, [w2DMenuFlags1] + bit 7, a + jr nz, .done + call GetMenuJoypad + ld b, a + ld a, [wMenuJoypadFilter] + and b + jr z, .loop + +.done + ret + +.BGMap_OAM: + ldh a, [hOAMUpdate] + push af + ld a, $1 + ldh [hOAMUpdate], a + call WaitBGMap + pop af + ldh [hOAMUpdate], a + xor a + ldh [hBGMapMode], a + ret + +Do2DMenuRTCJoypad: +.loopRTC + call UpdateTimeAndPals + call Menu_WasButtonPressed + ret c + ld a, [w2DMenuFlags1] + bit 7, a + jr z, .loopRTC + and a + ret + +Menu_WasButtonPressed: + ld a, [w2DMenuFlags1] + bit 6, a + jr z, .skip_to_joypad + callfar PlaySpriteAnimationsAndDelayFrame + +.skip_to_joypad + call JoyTextDelay + call GetMenuJoypad + and a + ret z + vc_hook Forbid_printing_photo_studio + scf + vc_hook Forbid_printing_PC_Box + ret + +_2DMenuInterpretJoypad: + call GetMenuJoypad + bit A_BUTTON_F, a + jp nz, .a_b_start_select + bit B_BUTTON_F, a + jp nz, .a_b_start_select + bit SELECT_F, a + jp nz, .a_b_start_select + bit START_F, a + jp nz, .a_b_start_select + bit D_RIGHT_F, a + jr nz, .d_right + bit D_LEFT_F, a + jr nz, .d_left + bit D_UP_F, a + jr nz, .d_up + bit D_DOWN_F, a + jr nz, .d_down + and a + ret + +.set_bit_7 + ld hl, w2DMenuFlags2 + set 7, [hl] + scf + ret + +.d_down + ld hl, wMenuCursorY + ld a, [w2DMenuNumRows] + cp [hl] + jr z, .check_wrap_around_down + inc [hl] + xor a + ret + +.check_wrap_around_down + ld a, [w2DMenuFlags1] + bit 5, a + jr nz, .wrap_around_down + bit 3, a + jp nz, .set_bit_7 + xor a + ret + +.wrap_around_down + ld [hl], $1 + xor a + ret + +.d_up + ld hl, wMenuCursorY + ld a, [hl] + dec a + jr z, .check_wrap_around_up + ld [hl], a + xor a + ret + +.check_wrap_around_up + ld a, [w2DMenuFlags1] + bit 5, a + jr nz, .wrap_around_up + bit 2, a + jp nz, .set_bit_7 + xor a + ret + +.wrap_around_up + ld a, [w2DMenuNumRows] + ld [hl], a + xor a + ret + +.d_left + ld hl, wMenuCursorX + ld a, [hl] + dec a + jr z, .check_wrap_around_left + ld [hl], a + xor a + ret + +.check_wrap_around_left + ld a, [w2DMenuFlags1] + bit 4, a + jr nz, .wrap_around_left + bit 1, a + jp nz, .set_bit_7 + xor a + ret + +.wrap_around_left + ld a, [w2DMenuNumCols] + ld [hl], a + xor a + ret + +.d_right + ld hl, wMenuCursorX + ld a, [w2DMenuNumCols] + cp [hl] + jr z, .check_wrap_around_right + inc [hl] + xor a + ret + +.check_wrap_around_right + ld a, [w2DMenuFlags1] + bit 4, a + jr nz, .wrap_around_right + bit 0, a + jp nz, .set_bit_7 + xor a + ret + +.wrap_around_right + ld [hl], $1 + xor a + ret + +.a_b_start_select + xor a + ret + +Move2DMenuCursor: + ld hl, wCursorCurrentTile + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hl] + cp "▶" + jr nz, Place2DMenuCursor + ld a, [wCursorOffCharacter] + ld [hl], a +Place2DMenuCursor: + ld a, [w2DMenuCursorInitY] + ld b, a + ld a, [w2DMenuCursorInitX] + ld c, a + call Coord2Tile + ld a, [w2DMenuCursorOffsets] + swap a + and $f + ld c, a + ld a, [wMenuCursorY] + ld b, a + xor a + dec b + jr z, .got_row +.row_loop + add c + dec b + jr nz, .row_loop + +.got_row + ld c, SCREEN_WIDTH + call AddNTimes + ld a, [w2DMenuCursorOffsets] + and $f + ld c, a + ld a, [wMenuCursorX] + ld b, a + xor a + dec b + jr z, .got_col +.col_loop + add c + dec b + jr nz, .col_loop + +.got_col + ld c, a + add hl, bc + ld a, [hl] + cp "▶" + jr z, .cursor_on + ld [wCursorOffCharacter], a + ld [hl], "▶" + +.cursor_on + ld a, l + ld [wCursorCurrentTile], a + ld a, h + ld [wCursorCurrentTile + 1], a + ret + +_PushWindow:: + ldh a, [rSVBK] + push af + ld a, BANK(wWindowStack) + ldh [rSVBK], a + + ld hl, wWindowStackPointer + ld e, [hl] + inc hl + ld d, [hl] + push de + + ld b, wMenuHeaderEnd - wMenuHeader + ld hl, wMenuHeader +.loop + ld a, [hli] + ld [de], a + dec de + dec b + jr nz, .loop + +; If bit 6 or 7 of the menu flags is set, set bit 0 of the address +; at 7:[wWindowStackPointer], and draw the menu using the coordinates from the header. +; Otherwise, reset bit 0 of 7:[wWindowStackPointer]. + ld a, [wMenuFlags] + bit 6, a + jr nz, .bit_6 + bit 7, a + jr z, .not_bit_7 + +.bit_6 + ld hl, wWindowStackPointer + ld a, [hli] + ld h, [hl] + ld l, a + set 0, [hl] + call MenuBoxCoord2Tile + call .copy + call MenuBoxCoord2Attr + call .copy + jr .done + +.not_bit_7 + pop hl ; last-pushed register was de + push hl + ld a, [hld] + ld l, [hl] + ld h, a + res 0, [hl] + +.done + pop hl + call .ret ; empty function + ld a, h + ld [de], a + dec de + ld a, l + ld [de], a + dec de + ld hl, wWindowStackPointer + ld [hl], e + inc hl + ld [hl], d + + pop af + ldh [rSVBK], a + ld hl, wWindowStackSize + inc [hl] + ret + +.copy + call GetMenuBoxDims + inc b + inc c + call .ret ; empty function + +.row + push bc + push hl + +.col + ld a, [hli] + ld [de], a + dec de + dec c + jr nz, .col + + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + + ret + +.ret + ret + +_ExitMenu:: + xor a + ldh [hBGMapMode], a + + ldh a, [rSVBK] + push af + ld a, BANK(wWindowStack) + ldh [rSVBK], a + + call GetWindowStackTop + ld a, l + or h + jp z, Error_Cant_ExitMenu + ld a, l + ld [wWindowStackPointer], a + ld a, h + ld [wWindowStackPointer + 1], a + call PopWindow + ld a, [wMenuFlags] + bit 0, a + jr z, .loop + ld d, h + ld e, l + call RestoreTileBackup + +.loop + call GetWindowStackTop + ld a, h + or l + jr z, .done + call PopWindow + +.done + pop af + ldh [rSVBK], a + ld hl, wWindowStackSize + dec [hl] + ret + +RestoreOverworldMapTiles: ; unreferenced + ld a, [wVramState] + bit 0, a + ret z + xor a ; sScratch + call OpenSRAM + hlcoord 0, 0 + ld de, sScratch + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call CopyBytes + call CloseSRAM + call OverworldTextModeSwitch + xor a ; sScratch + call OpenSRAM + ld hl, sScratch + decoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT +.loop + ld a, [hl] + cp $61 + jr c, .next + ld [de], a +.next + inc hl + inc de + dec bc + ld a, c + or b + jr nz, .loop + call CloseSRAM + ret + +Error_Cant_ExitMenu: + ld hl, .WindowPoppingErrorText + call PrintText + call WaitBGMap +.infinite_loop + jr .infinite_loop + +.WindowPoppingErrorText: + text_far _WindowPoppingErrorText + text_end + +_InitVerticalMenuCursor:: + ld a, [wMenuDataFlags] + ld b, a + ld hl, w2DMenuCursorInitY + ld a, [wMenuBorderTopCoord] + inc a + bit 6, b + jr nz, .skip_offset + inc a +.skip_offset + ld [hli], a +; w2DMenuCursorInitX + ld a, [wMenuBorderLeftCoord] + inc a + ld [hli], a +; w2DMenuNumRows + ld a, [wMenuDataItems] + ld [hli], a +; w2DMenuNumCols + ld a, 1 + ld [hli], a +; w2DMenuFlags1 + ld [hl], $0 + bit 5, b + jr z, .skip_bit_5 + set 5, [hl] +.skip_bit_5 + ld a, [wMenuFlags] + bit 4, a + jr z, .skip_bit_6 + set 6, [hl] +.skip_bit_6 + inc hl +; w2DMenuFlags2 + xor a + ld [hli], a +; w2DMenuCursorOffsets + ln a, 2, 0 + ld [hli], a +; wMenuJoypadFilter + ld a, A_BUTTON + bit 0, b + jr nz, .skip_bit_1 + add B_BUTTON +.skip_bit_1 + ld [hli], a +; wMenuCursorY + ld a, [wMenuCursorPosition] + and a + jr z, .load_at_the_top + ld c, a + ld a, [wMenuDataItems] + cp c + jr nc, .load_position +.load_at_the_top + ld c, 1 +.load_position + ld [hl], c + inc hl +; wMenuCursorX + ld a, 1 + ld [hli], a +; wCursorOffCharacter, wCursorCurrentTile + xor a + ld [hli], a + ld [hli], a + ld [hli], a + ret diff --git a/engine/menus/menu_2.asm b/engine/menus/menu_2.asm new file mode 100644 index 0000000..e229f36 --- /dev/null +++ b/engine/menus/menu_2.asm @@ -0,0 +1,253 @@ +PlaceMenuItemName: + push de + ld a, [wMenuSelection] + ld [wNamedObjectIndex], a + call GetItemName + pop hl + call PlaceString + ret + +PlaceMenuItemQuantity: + push de + ld a, [wMenuSelection] + ld [wCurItem], a + farcall _CheckTossableItem + ld a, [wItemAttributeValue] + pop hl + and a + jr nz, .done + ld de, $15 + add hl, de + ld [hl], "×" + inc hl + ld de, wMenuSelectionQuantity + lb bc, 1, 2 + call PrintNum + +.done + ret + +PlaceMoneyTopRight: + ld hl, MoneyTopRightMenuHeader + call CopyMenuHeader + jr PlaceMoneyTextbox + +PlaceMoneyBottomLeft: + ld hl, MoneyBottomLeftMenuHeader + call CopyMenuHeader + jr PlaceMoneyTextbox + +PlaceMoneyAtTopLeftOfTextbox: + ld hl, MoneyTopRightMenuHeader + lb de, 0, 11 + call OffsetMenuHeader + +PlaceMoneyTextbox: + call MenuBox + call MenuBoxCoord2Tile + ld de, SCREEN_WIDTH + 1 + add hl, de + ld de, wMoney + lb bc, PRINTNUM_MONEY | 3, 6 + call PrintNum + ret + +MoneyTopRightMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 11, 0, SCREEN_WIDTH - 1, 2 + dw NULL + db 1 ; default option + +MoneyBottomLeftMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 11, 8, 13 + dw NULL + db 1 ; default option + +DisplayCoinCaseBalance: + ; Place a text box of size 1x7 at 11, 0. + hlcoord 11, 0 + ld b, 1 + ld c, 7 + call Textbox + hlcoord 12, 0 + ld de, CoinString + call PlaceString + hlcoord 17, 1 + ld de, ShowMoney_TerminatorString + call PlaceString + ld de, wCoins + lb bc, 2, 4 + hlcoord 13, 1 + call PrintNum + ret + +DisplayMoneyAndCoinBalance: + hlcoord 5, 0 + ld b, 3 + ld c, 13 + call Textbox + hlcoord 6, 1 + ld de, MoneyString + call PlaceString + hlcoord 12, 1 + ld de, wMoney + lb bc, PRINTNUM_MONEY | 3, 6 + call PrintNum + hlcoord 6, 3 + ld de, CoinString + call PlaceString + hlcoord 15, 3 + ld de, wCoins + lb bc, 2, 4 + call PrintNum + ret + +MoneyString: + db "MONEY@" +CoinString: + db "COIN@" +ShowMoney_TerminatorString: + db "@" + +StartMenu_PrintSafariGameStatus: ; unreferenced + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + hlcoord 0, 0 + ld b, 3 + ld c, 7 + call Textbox + hlcoord 1, 1 + ld de, wSafariTimeRemaining + lb bc, 2, 3 + call PrintNum + hlcoord 4, 1 + ld de, .slash_500 + call PlaceString + hlcoord 1, 3 + ld de, .booru_ko + call PlaceString + hlcoord 5, 3 + ld de, wSafariBallsRemaining + lb bc, 1, 2 + call PrintNum + pop af + ld [wOptions], a + ret + +.slash_500 + db "/500@" +.booru_ko + db "ボール   こ@" + +StartMenu_DrawBugContestStatusBox: + hlcoord 0, 0 + ld b, 5 + ld c, 17 + call Textbox + ret + +StartMenu_PrintBugContestStatus: + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + call StartMenu_DrawBugContestStatusBox + hlcoord 1, 5 + ld de, .BallsString + call PlaceString + hlcoord 8, 5 + ld de, wParkBallsRemaining + lb bc, PRINTNUM_LEFTALIGN | 1, 2 + call PrintNum + hlcoord 1, 1 + ld de, .CaughtString + call PlaceString + ld a, [wContestMon] + and a + ld de, .NoneString + jr z, .no_contest_mon + ld [wNamedObjectIndex], a + call GetPokemonName + +.no_contest_mon + hlcoord 8, 1 + call PlaceString + ld a, [wContestMon] + and a + jr z, .skip_level + hlcoord 1, 3 + ld de, .LevelString + call PlaceString + ld a, [wContestMonLevel] + ld h, b + ld l, c + inc hl + ld c, 3 + call Print8BitNumLeftAlign + +.skip_level + pop af + ld [wOptions], a + ret + +.BallsJPString: ; unreferenced + db "ボール   こ@" +.CaughtString: + db "CAUGHT@" +.BallsString: + db "BALLS:@" +.NoneString: + db "None@" +.LevelString: + db "LEVEL@" + +FindApricornsInBag: +; Checks the bag for Apricorns. + ld hl, wKurtApricornCount + xor a + ld [hli], a + assert wKurtApricornCount + 1 == wKurtApricornItems + dec a + ld bc, 10 + call ByteFill + + ld hl, ApricornBalls +.loop + ld a, [hl] + cp -1 + jr z, .done + push hl + ld [wCurItem], a + ld hl, wNumItems + call CheckItem + pop hl + jr nc, .nope + ld a, [hl] + call .addtobuffer +.nope + inc hl + inc hl + jr .loop + +.done + ld a, [wKurtApricornCount] + and a + ret nz + scf + ret + +.addtobuffer: + push hl + ld hl, wKurtApricornCount + inc [hl] + ld e, [hl] + ld d, 0 + add hl, de + ld [hl], a + pop hl + ret + +INCLUDE "data/items/apricorn_balls.asm" diff --git a/engine/menus/naming_screen.asm b/engine/menus/naming_screen.asm new file mode 100644 index 0000000..9cfe33d --- /dev/null +++ b/engine/menus/naming_screen.asm @@ -0,0 +1,1343 @@ +DEF NAMINGSCREEN_CURSOR EQU $7e + +DEF NAMINGSCREEN_BORDER EQU "■" ; $60 +DEF NAMINGSCREEN_MIDDLELINE EQU "→" ; $eb +DEF NAMINGSCREEN_UNDERLINE EQU "" ; $f2 + +_NamingScreen: + call DisableSpriteUpdates + call NamingScreen + call ReturnToMapWithSpeechTextbox + ret + +NamingScreen: + ld hl, wNamingScreenDestinationPointer + ld [hl], e + inc hl + ld [hl], d + ld hl, wNamingScreenType + ld [hl], b + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + ldh a, [hMapAnims] + push af + xor a + ldh [hMapAnims], a + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + call .SetUpNamingScreen + call DelayFrame +.loop + call NamingScreenJoypadLoop + jr nc, .loop + pop af + ldh [hInMenu], a + pop af + ldh [hMapAnims], a + pop af + ld [wOptions], a + call ClearJoypad + ret + +.SetUpNamingScreen: + call ClearBGPalettes + ld b, SCGB_DIPLOMA + call GetSGBLayout + call DisableLCD + call LoadNamingScreenGFX + call NamingScreen_InitText + ld a, LCDC_DEFAULT + ldh [rLCDC], a + call .GetNamingScreenSetup + call WaitBGMap + call WaitTop + call SetPalettes + call NamingScreen_InitNameEntry + ret + +.GetNamingScreenSetup: + ld a, [wNamingScreenType] + maskbits NUM_NAME_TYPES + ld e, a + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: +; entries correspond to NAME_* constants + dw .Pokemon + dw .Player + dw .Rival + dw .Mom + dw .Box + dw .Tomodachi + dw .Pokemon + dw .Pokemon + +.Pokemon: + ld a, [wCurPartySpecies] + ld [wTempIconSpecies], a + ld hl, LoadMenuMonIcon + ld a, BANK(LoadMenuMonIcon) + ld e, MONICON_NAMINGSCREEN + rst FarCall + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + hlcoord 5, 2 + call PlaceString + ld l, c + ld h, b + ld de, .NicknameStrings + call PlaceString + inc de + hlcoord 5, 4 + call PlaceString + farcall GetGender + jr c, .genderless + ld a, "♂" + jr nz, .place_gender + ld a, "♀" +.place_gender + hlcoord 1, 2 + ld [hl], a +.genderless + call .StoreMonIconParams + ret + +.NicknameStrings: + db "'S@" + db "NICKNAME?@" + +.Player: + farcall GetPlayerIcon + call .LoadSprite + hlcoord 5, 2 + ld de, .PlayerNameString + call PlaceString + call .StoreSpriteIconParams + ret + +.PlayerNameString: + db "YOUR NAME?@" + +.Rival: + ld de, RivalSpriteGFX + ld b, BANK(RivalSpriteGFX) + call .LoadSprite + hlcoord 5, 2 + ld de, .RivalNameString + call PlaceString + call .StoreSpriteIconParams + ret + +.RivalNameString: + db "RIVAL'S NAME?@" + +.Mom: + ld de, MomSpriteGFX + ld b, BANK(MomSpriteGFX) + call .LoadSprite + hlcoord 5, 2 + ld de, .MomNameString + call PlaceString + call .StoreSpriteIconParams + ret + +.MomNameString: + db "MOTHER'S NAME?@" + +.Box: + ld de, PokeBallSpriteGFX + ld hl, vTiles0 tile $00 + lb bc, BANK(PokeBallSpriteGFX), 4 + call Request2bpp + xor a ; SPRITE_ANIM_DICT_DEFAULT and tile offset $00 + ld hl, wSpriteAnimDict + ld [hli], a + ld [hl], a + depixel 4, 4, 4, 0 + ld a, SPRITE_ANIM_INDEX_RED_WALK + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld [hl], $0 + hlcoord 5, 2 + ld de, .BoxNameString + call PlaceString + call .StoreBoxIconParams + ret + +.BoxNameString: + db "BOX NAME?@" + +.Tomodachi: + hlcoord 3, 2 + ld de, .oTomodachi_no_namae_sutoringu + call PlaceString + call .StoreSpriteIconParams + ret + +.oTomodachi_no_namae_sutoringu + db "おともだち の なまえは?@" + +.LoadSprite: + push de + ld hl, vTiles0 tile $00 + ld c, 4 + push bc + call Request2bpp + pop bc + ld hl, 12 tiles + add hl, de + ld e, l + ld d, h + ld hl, vTiles0 tile $04 + call Request2bpp + xor a ; SPRITE_ANIM_DICT_DEFAULT and tile offset $00 + ld hl, wSpriteAnimDict + ld [hli], a + ld [hl], a + pop de + ld b, SPRITE_ANIM_INDEX_RED_WALK + ld a, d + cp HIGH(KrisSpriteGFX) + jr nz, .not_kris + ld a, e + cp LOW(KrisSpriteGFX) + jr nz, .not_kris + ld b, SPRITE_ANIM_INDEX_BLUE_WALK +.not_kris + ld a, b + depixel 4, 4, 4, 0 + call InitSpriteAnimStruct + ret + +.StoreMonIconParams: + ld a, MON_NAME_LENGTH - 1 + hlcoord 5, 6 + jr .StoreParams + +.StoreSpriteIconParams: + ld a, PLAYER_NAME_LENGTH - 1 + hlcoord 5, 6 + jr .StoreParams + +.StoreBoxIconParams: + ld a, BOX_NAME_LENGTH - 1 + hlcoord 5, 4 + jr .StoreParams + +.StoreParams: + ld [wNamingScreenMaxNameLength], a + ld a, l + ld [wNamingScreenStringEntryCoord], a + ld a, h + ld [wNamingScreenStringEntryCoord + 1], a + ret + +NamingScreen_IsTargetBox: +; Return z if [wNamingScreenType] == NAME_BOX. + push bc + push af + ld a, [wNamingScreenType] + sub NAME_BOX - 1 + ld b, a + pop af + dec b + pop bc + ret + +NamingScreen_InitText: + call WaitTop + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, NAMINGSCREEN_BORDER + call ByteFill + hlcoord 1, 1 + lb bc, 6, 18 + call NamingScreen_IsTargetBox + jr nz, .not_box + lb bc, 4, 18 + +.not_box + call ClearBox + ld de, NameInputUpper +NamingScreen_ApplyTextInputMode: + call NamingScreen_IsTargetBox + jr nz, .not_box + assert BoxNameInputLower - NameInputLower == BoxNameInputUpper - NameInputUpper + ld hl, BoxNameInputLower - NameInputLower + add hl, de + ld d, h + ld e, l + +.not_box + push de + hlcoord 1, 8 + lb bc, 7, 18 + call NamingScreen_IsTargetBox + jr nz, .not_box_2 + hlcoord 1, 6 + lb bc, 9, 18 + +.not_box_2 + call ClearBox + hlcoord 1, 16 + lb bc, 1, 18 + call ClearBox + pop de + hlcoord 2, 8 + ld b, $5 + call NamingScreen_IsTargetBox + jr nz, .row + hlcoord 2, 6 + ld b, $6 + +.row + ld c, $11 +.col + ld a, [de] + ld [hli], a + inc de + dec c + jr nz, .col + push de + ld de, 2 * SCREEN_WIDTH - $11 + add hl, de + pop de + dec b + jr nz, .row + ret + +NamingScreenJoypadLoop: + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .quit + call .RunJumptable + farcall PlaySpriteAnimationsAndDelayFrame + call .UpdateStringEntry + call DelayFrame + and a + ret + +.quit + callfar ClearSpriteAnims + call ClearSprites + xor a + ldh [hSCX], a + ldh [hSCY], a + scf + ret + +.UpdateStringEntry: + xor a + ldh [hBGMapMode], a + hlcoord 1, 5 + call NamingScreen_IsTargetBox + jr nz, .got_coords + hlcoord 1, 3 + +.got_coords + lb bc, 1, 18 + call ClearBox + ld hl, wNamingScreenDestinationPointer + ld e, [hl] + inc hl + ld d, [hl] + ld hl, wNamingScreenStringEntryCoord + ld a, [hli] + ld h, [hl] + ld l, a + call PlaceString + ld a, $1 + ldh [hBGMapMode], a + ret + +.RunJumptable: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + dw .InitCursor + dw .ReadButtons + +.InitCursor: + depixel 10, 3 + call NamingScreen_IsTargetBox + jr nz, .got_cursor_position + ld d, 8 * 8 +.got_cursor_position + ld a, SPRITE_ANIM_INDEX_NAMING_SCREEN_CURSOR + call InitSpriteAnimStruct + ld a, c + ld [wNamingScreenCursorObjectPointer], a + ld a, b + ld [wNamingScreenCursorObjectPointer + 1], a + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld a, [hl] + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + ld [hl], a + ld hl, wJumptableIndex + inc [hl] + ret + +.ReadButtons: + ld hl, hJoyPressed + ld a, [hl] + and A_BUTTON + jr nz, .a + ld a, [hl] + and B_BUTTON + jr nz, .b + ld a, [hl] + and START + jr nz, .start + ld a, [hl] + and SELECT + jr nz, .select + ret + +.a + call .GetCursorPosition + cp $1 + jr z, .select + cp $2 + jr z, .b + cp $3 + jr z, .end + call NamingScreen_GetLastCharacter + call NamingScreen_TryAddCharacter + ret nc + +.start + ld hl, wNamingScreenCursorObjectPointer + ld c, [hl] + inc hl + ld b, [hl] + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $8 + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], $4 + call NamingScreen_IsTargetBox + ret nz + inc [hl] + ret + +.b + call NamingScreen_DeleteCharacter + ret + +.end + call NamingScreen_StoreEntry + ld hl, wJumptableIndex + set 7, [hl] + ret + +.select + ld hl, wNamingScreenLetterCase + ld a, [hl] + xor 1 + ld [hl], a + jr z, .upper + ld de, NameInputLower + call NamingScreen_ApplyTextInputMode + ret + +.upper + ld de, NameInputUpper + call NamingScreen_ApplyTextInputMode + ret + +.GetCursorPosition: + ld hl, wNamingScreenCursorObjectPointer + ld c, [hl] + inc hl + ld b, [hl] + +NamingScreen_GetCursorPosition: + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + push bc + ld b, $4 + call NamingScreen_IsTargetBox + jr nz, .not_box + inc b +.not_box + cp b + pop bc + jr nz, .not_bottom_row + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $3 + jr c, .case_switch + cp $6 + jr c, .delete + ld a, $3 + ret + +.case_switch + ld a, $1 + ret + +.delete + ld a, $2 + ret + +.not_bottom_row + xor a + ret + +NamingScreen_AnimateCursor: + call .GetDPad + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + ld e, a + swap e + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], e + ld d, $4 + call NamingScreen_IsTargetBox + jr nz, .ok + inc d +.ok + cp d + ld de, .LetterEntries + ld a, SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR - SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR ; 0 + jr nz, .ok2 + ld de, .CaseDelEnd + ld a, SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR_BIG - SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR ; 1 +.ok2 + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + add [hl] ; default SPRITE_ANIM_FRAMESET_TEXT_ENTRY_CURSOR + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld [hl], a + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld l, [hl] + ld h, $0 + add hl, de + ld a, [hl] + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +.LetterEntries: + db $00, $10, $20, $30, $40, $50, $60, $70, $80 + +.CaseDelEnd: + db $00, $00, $00, $30, $30, $30, $60, $60, $60 + +.GetDPad: + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .up + ld a, [hl] + and D_DOWN + jr nz, .down + ld a, [hl] + and D_LEFT + jr nz, .left + ld a, [hl] + and D_RIGHT + jr nz, .right + ret + +.right + call NamingScreen_GetCursorPosition + and a + jr nz, .target_right + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $8 + jr nc, .wrap_left + inc [hl] + ret + +.wrap_left + ld [hl], $0 + ret + +.target_right + cp $3 + jr nz, .no_wrap_target_left + xor a +.no_wrap_target_left + ld e, a + add a + add e + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + ret + +.left + call NamingScreen_GetCursorPosition + and a + jr nz, .target_left + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and a + jr z, .wrap_right + dec [hl] + ret + +.wrap_right + ld [hl], $8 + ret + +.target_left + cp $1 + jr nz, .no_wrap_target_right + ld a, $4 +.no_wrap_target_right + dec a + dec a + ld e, a + add a + add e + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + ret + +.down + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + call NamingScreen_IsTargetBox + jr nz, .not_box + cp $5 + jr nc, .wrap_up + inc [hl] + ret + +.not_box + cp $4 + jr nc, .wrap_up + inc [hl] + ret + +.wrap_up + ld [hl], $0 + ret + +.up + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + and a + jr z, .wrap_down + dec [hl] + ret + +.wrap_down + ld [hl], $4 + call NamingScreen_IsTargetBox + ret nz + inc [hl] + ret + +NamingScreen_TryAddCharacter: + ld a, [wNamingScreenLastCharacter] ; lost +MailComposition_TryAddCharacter: + ld a, [wNamingScreenMaxNameLength] + ld c, a + ld a, [wNamingScreenCurNameLength] + cp c + ret nc + + ld a, [wNamingScreenLastCharacter] + +NamingScreen_LoadNextCharacter: + call NamingScreen_GetTextCursorPosition + ld [hl], a + +NamingScreen_AdvanceCursor_CheckEndOfString: + ld hl, wNamingScreenCurNameLength + inc [hl] + call NamingScreen_GetTextCursorPosition + ld a, [hl] + cp "@" + jr z, .end_of_string + ld [hl], NAMINGSCREEN_UNDERLINE + and a + ret + +.end_of_string + scf + ret + +.loop + ld a, [hli] + cp -1 + jr z, NamingScreen_AdvanceCursor_CheckEndOfString + cp c + jr z, .done + inc hl + jr .loop + +.done + ld a, [hl] + jr NamingScreen_LoadNextCharacter + +NamingScreen_DeleteCharacter: + ld hl, wNamingScreenCurNameLength + ld a, [hl] + and a + ret z + dec [hl] + call NamingScreen_GetTextCursorPosition + ld [hl], NAMINGSCREEN_UNDERLINE + inc hl + ld a, [hl] + cp NAMINGSCREEN_UNDERLINE + ret nz + ld [hl], NAMINGSCREEN_MIDDLELINE + ret + +NamingScreen_GetTextCursorPosition: + push af + ld hl, wNamingScreenDestinationPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wNamingScreenCurNameLength] + ld e, a + ld d, 0 + add hl, de + pop af + ret + +NamingScreen_InitNameEntry: +; load NAMINGSCREEN_UNDERLINE, (NAMINGSCREEN_MIDDLELINE * [wNamingScreenMaxNameLength]), "@" into the dw address at wNamingScreenDestinationPointer + ld hl, wNamingScreenDestinationPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld [hl], NAMINGSCREEN_UNDERLINE + inc hl + ld a, [wNamingScreenMaxNameLength] + dec a + ld c, a + ld a, NAMINGSCREEN_MIDDLELINE +.loop + ld [hli], a + dec c + jr nz, .loop + ld [hl], "@" + ret + +NamingScreen_StoreEntry: + ld hl, wNamingScreenDestinationPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wNamingScreenMaxNameLength] + ld c, a +.loop + ld a, [hl] + cp NAMINGSCREEN_MIDDLELINE + jr z, .terminator + cp NAMINGSCREEN_UNDERLINE + jr nz, .not_terminator +.terminator + ld [hl], "@" +.not_terminator + inc hl + dec c + jr nz, .loop + ret + +NamingScreen_GetLastCharacter: + ld hl, wNamingScreenCursorObjectPointer + ld c, [hl] + inc hl + ld b, [hl] + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld a, [hl] + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + add [hl] + sub $8 + srl a + srl a + srl a + ld e, a + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld a, [hl] + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + add [hl] + sub $10 + srl a + srl a + srl a + ld d, a + hlcoord 0, 0 + ld bc, SCREEN_WIDTH +.loop + ld a, d + and a + jr z, .done + add hl, bc + dec d + jr .loop + +.done + add hl, de + ld a, [hl] + ld [wNamingScreenLastCharacter], a + ret + +LoadNamingScreenGFX: + call ClearSprites + callfar ClearSpriteAnims + call LoadStandardFont + call LoadFontsExtra + + ld de, NamingScreenGFX_MiddleLine + ld hl, vTiles0 tile NAMINGSCREEN_MIDDLELINE + lb bc, BANK(NamingScreenGFX_MiddleLine), 1 + call Get1bpp + + ld de, NamingScreenGFX_UnderLine + ld hl, vTiles0 tile NAMINGSCREEN_UNDERLINE + lb bc, BANK(NamingScreenGFX_UnderLine), 1 + call Get1bpp + + ld de, vTiles2 tile NAMINGSCREEN_BORDER + ld hl, NamingScreenGFX_Border + ld bc, 1 tiles + ld a, BANK(NamingScreenGFX_Border) + call FarCopyBytes + + ld de, vTiles0 tile NAMINGSCREEN_CURSOR + ld hl, NamingScreenGFX_Cursor + ld bc, 2 tiles + ld a, BANK(NamingScreenGFX_Cursor) + call FarCopyBytes + + ld a, SPRITE_ANIM_DICT_TEXT_CURSOR + ld hl, wSpriteAnimDict + (NUM_SPRITEANIMDICT_ENTRIES - 1) * 2 + ld [hli], a + ld [hl], NAMINGSCREEN_CURSOR + xor a + ldh [hSCY], a + ld [wGlobalAnimYOffset], a + ldh [hSCX], a + ld [wGlobalAnimXOffset], a + ld [wJumptableIndex], a + ld [wNamingScreenLetterCase], a + ldh [hBGMapMode], a + ld [wNamingScreenCurNameLength], a + ld a, $7 + ldh [hWX], a + ret + +NamingScreenGFX_Border: +INCBIN "gfx/naming_screen/border.2bpp" + +NamingScreenGFX_Cursor: +INCBIN "gfx/naming_screen/cursor.2bpp" + +INCLUDE "data/text/name_input_chars.asm" + +NamingScreenGFX_End: ; unreferenced +INCBIN "gfx/naming_screen/end.1bpp" + +NamingScreenGFX_MiddleLine: +INCBIN "gfx/naming_screen/middle_line.1bpp" + +NamingScreenGFX_UnderLine: +INCBIN "gfx/naming_screen/underline.1bpp" + +_ComposeMailMessage: + ld hl, wNamingScreenDestinationPointer + ld [hl], e + inc hl + ld [hl], d + ldh a, [hMapAnims] + push af + xor a + ldh [hMapAnims], a + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + call .InitBlankMail + call DelayFrame + +.loop + call .DoMailEntry + jr nc, .loop + + pop af + ldh [hInMenu], a + pop af + ldh [hMapAnims], a + ret + +.InitBlankMail: + call ClearBGPalettes + call DisableLCD + call LoadNamingScreenGFX + ld de, vTiles0 tile $00 + ld hl, .MailIcon + ld bc, 8 tiles + ld a, BANK(.MailIcon) + call FarCopyBytes + xor a ; SPRITE_ANIM_DICT_DEFAULT and tile offset $00 + ld hl, wSpriteAnimDict + ld [hli], a + ld [hl], a + + ; init mail icon + depixel 3, 2 + ld a, SPRITE_ANIM_INDEX_PARTY_MON + call InitSpriteAnimStruct + + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld [hl], $0 + call .InitCharset + ld a, LCDC_DEFAULT + ldh [rLCDC], a + call .initwNamingScreenMaxNameLength + ld b, SCGB_DIPLOMA + call GetSGBLayout + call WaitBGMap + call WaitTop + ld a, %11100100 + call DmgToCgbBGPals + ld a, %11100100 + call DmgToCgbObjPal0 + call NamingScreen_InitNameEntry + ld hl, wNamingScreenDestinationPointer + ld e, [hl] + inc hl + ld d, [hl] + ld hl, MAIL_LINE_LENGTH + add hl, de + ld [hl], "" + ret + +.MailIcon: +INCBIN "gfx/naming_screen/mail.2bpp" + +.initwNamingScreenMaxNameLength + ld a, MAIL_MSG_LENGTH + 1 + ld [wNamingScreenMaxNameLength], a + ret + +.InitCharset: + call WaitTop + hlcoord 0, 0 + ld bc, 6 * SCREEN_WIDTH + ld a, NAMINGSCREEN_BORDER + call ByteFill + hlcoord 0, 6 + ld bc, 12 * SCREEN_WIDTH + ld a, " " + call ByteFill + hlcoord 1, 1 + lb bc, 4, SCREEN_WIDTH - 2 + call ClearBox + ld de, MailEntry_Uppercase + +.PlaceMailCharset: + hlcoord 1, 7 + ld b, 6 +.next + ld c, SCREEN_WIDTH - 1 +.loop_ + ld a, [de] + ld [hli], a + inc de + dec c + jr nz, .loop_ + push de + ld de, SCREEN_WIDTH + 1 + add hl, de + pop de + dec b + jr nz, .next + ret + +.DoMailEntry: + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .exit_mail + call .DoJumptable + farcall PlaySpriteAnimationsAndDelayFrame + call .Update + call DelayFrame + and a + ret + +.exit_mail + callfar ClearSpriteAnims + call ClearSprites + xor a + ldh [hSCX], a + ldh [hSCY], a + scf + ret + +.Update: + xor a + ldh [hBGMapMode], a + hlcoord 1, 1 + lb bc, 4, 18 + call ClearBox + ld hl, wNamingScreenDestinationPointer + ld e, [hl] + inc hl + ld d, [hl] + hlcoord 2, 2 + call PlaceString + ld a, $1 + ldh [hBGMapMode], a + ret + +.DoJumptable: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + dw .init_blinking_cursor + dw .process_joypad + +.init_blinking_cursor + depixel 9, 2 + ld a, SPRITE_ANIM_INDEX_COMPOSE_MAIL_CURSOR + call InitSpriteAnimStruct + ld a, c + ld [wNamingScreenCursorObjectPointer], a + ld a, b + ld [wNamingScreenCursorObjectPointer + 1], a + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld a, [hl] + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + ld [hl], a + ld hl, wJumptableIndex + inc [hl] + ret + +.process_joypad + ld hl, hJoyPressed + ld a, [hl] + and A_BUTTON + jr nz, .a + ld a, [hl] + and B_BUTTON + jr nz, .b + ld a, [hl] + and START + jr nz, .start + ld a, [hl] + and SELECT + jr nz, .select + ret + +.a + call NamingScreen_PressedA_GetCursorCommand + cp $1 + jr z, .select + cp $2 + jr z, .b + cp $3 + jr z, .finished + call NamingScreen_GetLastCharacter + call MailComposition_TryAddLastCharacter + jr c, .start + ld hl, wNamingScreenCurNameLength + ld a, [hl] + cp MAIL_LINE_LENGTH + ret nz + inc [hl] + call NamingScreen_GetTextCursorPosition + ld [hl], NAMINGSCREEN_UNDERLINE + dec hl + ld [hl], "" + ret + +.start + ld hl, wNamingScreenCursorObjectPointer + ld c, [hl] + inc hl + ld b, [hl] + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $9 + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], $5 + ret + +.b + call NamingScreen_DeleteCharacter + ld hl, wNamingScreenCurNameLength + ld a, [hl] + cp MAIL_LINE_LENGTH + ret nz + dec [hl] + call NamingScreen_GetTextCursorPosition + ld [hl], NAMINGSCREEN_UNDERLINE + inc hl + ld [hl], "" + ret + +.finished + call NamingScreen_StoreEntry + ld hl, wJumptableIndex + set 7, [hl] + ret + +.select + ld hl, wNamingScreenLetterCase + ld a, [hl] + xor 1 + ld [hl], a + jr nz, .switch_to_lowercase + ld de, MailEntry_Uppercase + call .PlaceMailCharset + ret + +.switch_to_lowercase + ld de, MailEntry_Lowercase + call .PlaceMailCharset + ret + +; called from engine/gfx/sprite_anims.asm + +ComposeMail_AnimateCursor: + call .GetDPad + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + ld e, a + swap e + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], e + cp $5 + ld de, .LetterEntries + ld a, 0 + jr nz, .got_pointer + ld de, .CaseDelEnd + ld a, 1 +.got_pointer + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + add [hl] + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + ld [hl], a + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld l, [hl] + ld h, 0 + add hl, de + ld a, [hl] + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +.LetterEntries: + db $00, $10, $20, $30, $40, $50, $60, $70, $80, $90 + +.CaseDelEnd: + db $00, $00, $00, $30, $30, $30, $60, $60, $60, $60 + +.GetDPad: + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .up + ld a, [hl] + and D_DOWN + jr nz, .down + ld a, [hl] + and D_LEFT + jr nz, .left + ld a, [hl] + and D_RIGHT + jr nz, .right + ret + +.right + call ComposeMail_GetCursorPosition + and a + jr nz, .case_del_done_right + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $9 + jr nc, .wrap_around_letter_right + inc [hl] + ret + +.wrap_around_letter_right + ld [hl], $0 + ret + +.case_del_done_right + cp $3 + jr nz, .wrap_around_command_right + xor a +.wrap_around_command_right + ld e, a + add a + add e + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + ret + +.left + call ComposeMail_GetCursorPosition + and a + jr nz, .caps_del_done_left + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + and a + jr z, .wrap_around_letter_left + dec [hl] + ret + +.wrap_around_letter_left + ld [hl], $9 + ret + +.caps_del_done_left + cp $1 + jr nz, .wrap_around_command_left + ld a, $4 +.wrap_around_command_left + dec a + dec a + ld e, a + add a + add e + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], a + ret + +.down + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + cp $5 + jr nc, .wrap_around_down + inc [hl] + ret + +.wrap_around_down + ld [hl], $0 + ret + +.up + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + and a + jr z, .wrap_around_up + dec [hl] + ret + +.wrap_around_up + ld [hl], $5 + ret + +NamingScreen_PressedA_GetCursorCommand: + ld hl, wNamingScreenCursorObjectPointer + ld c, [hl] + inc hl + ld b, [hl] + +ComposeMail_GetCursorPosition: + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld a, [hl] + cp $5 + jr nz, .letter + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + cp $3 + jr c, .case + cp $6 + jr c, .del + ld a, $3 + ret + +.case + ld a, $1 + ret + +.del + ld a, $2 + ret + +.letter + xor a + ret + +MailComposition_TryAddLastCharacter: + ld a, [wNamingScreenLastCharacter] + jp MailComposition_TryAddCharacter + +.one_back + push hl + ld hl, wNamingScreenCurNameLength + dec [hl] + +.continue + call NamingScreen_GetTextCursorPosition + ld c, [hl] + pop hl +.loop + ld a, [hli] + cp -1 ; end? + jp z, NamingScreen_AdvanceCursor_CheckEndOfString + cp c + jr z, .done + inc hl + jr .loop + +.done + ld a, [hl] + jp NamingScreen_LoadNextCharacter + +INCLUDE "data/text/mail_input_chars.asm" diff --git a/engine/menus/options_menu.asm b/engine/menus/options_menu.asm new file mode 100644 index 0000000..a25638c --- /dev/null +++ b/engine/menus/options_menu.asm @@ -0,0 +1,560 @@ +; GetOptionPointer.Pointers indexes + const_def + const OPT_TEXT_SPEED ; 0 + const OPT_BATTLE_SCENE ; 1 + const OPT_BATTLE_STYLE ; 2 + const OPT_SOUND ; 3 + const OPT_PRINT ; 4 + const OPT_MENU_ACCOUNT ; 5 + const OPT_FRAME ; 6 + const OPT_CANCEL ; 7 +DEF NUM_OPTIONS EQU const_value ; 8 + +_Option: +; BUG: Options menu fails to clear joypad state on initialization (see docs/bugs_and_glitches.md) + ld hl, hInMenu + ld a, [hl] + push af + ld [hl], TRUE + call ClearBGPalettes + hlcoord 0, 0 + ld b, SCREEN_HEIGHT - 2 + ld c, SCREEN_WIDTH - 2 + call Textbox + hlcoord 2, 2 + ld de, StringOptions + call PlaceString + xor a + ld [wJumptableIndex], a + +; display the settings of each option when the menu is opened + ld c, NUM_OPTIONS - 2 ; omit frame type, the last option +.print_text_loop + push bc + xor a + ldh [hJoyLast], a + call GetOptionPointer + pop bc + ld hl, wJumptableIndex + inc [hl] + dec c + jr nz, .print_text_loop + call UpdateFrame ; display the frame type + + xor a + ld [wJumptableIndex], a + inc a + ldh [hBGMapMode], a + call WaitBGMap + ld b, SCGB_DIPLOMA + call GetSGBLayout + call SetPalettes + +.joypad_loop + call JoyTextDelay + ldh a, [hJoyPressed] + and START | B_BUTTON + jr nz, .ExitOptions + call OptionsControl + jr c, .dpad + call GetOptionPointer + jr c, .ExitOptions + +.dpad + call Options_UpdateCursorPosition + ld c, 3 + call DelayFrames + jr .joypad_loop + +.ExitOptions: + ld de, SFX_TRANSACTION + call PlaySFX + call WaitSFX + pop af + ldh [hInMenu], a + ret + +StringOptions: + db "TEXT SPEED" + db " :" + db "BATTLE SCENE" + db " :" + db "BATTLE STYLE" + db " :" + db "SOUND" + db " :" + db "PRINT" + db " :" + db "MENU ACCOUNT" + db " :" + db "FRAME" + db " :TYPE" + db "CANCEL@" + +GetOptionPointer: + jumptable .Pointers, wJumptableIndex + +.Pointers: +; entries correspond to OPT_* constants + dw Options_TextSpeed + dw Options_BattleScene + dw Options_BattleStyle + dw Options_Sound + dw Options_Print + dw Options_MenuAccount + dw Options_Frame + dw Options_Cancel + + const_def + const OPT_TEXT_SPEED_FAST ; 0 + const OPT_TEXT_SPEED_MED ; 1 + const OPT_TEXT_SPEED_SLOW ; 2 + +Options_TextSpeed: + call GetTextSpeed + ldh a, [hJoyPressed] + bit D_LEFT_F, a + jr nz, .LeftPressed + bit D_RIGHT_F, a + jr z, .NonePressed + ld a, c ; right pressed + cp OPT_TEXT_SPEED_SLOW + jr c, .Increase + ld c, OPT_TEXT_SPEED_FAST - 1 + +.Increase: + inc c + ld a, e + jr .Save + +.LeftPressed: + ld a, c + and a + jr nz, .Decrease + ld c, OPT_TEXT_SPEED_SLOW + 1 + +.Decrease: + dec c + ld a, d + +.Save: + ld b, a + ld a, [wOptions] + and $f0 + or b + ld [wOptions], a + +.NonePressed: + ld b, 0 + ld hl, .Strings + add hl, bc + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + hlcoord 11, 3 + call PlaceString + and a + ret + +.Strings: +; entries correspond to OPT_TEXT_SPEED_* constants + dw .Fast + dw .Mid + dw .Slow + +.Fast: db "FAST@" +.Mid: db "MID @" +.Slow: db "SLOW@" + +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] + and TEXT_DELAY_MASK + cp TEXT_DELAY_SLOW + jr z, .slow + cp TEXT_DELAY_FAST + jr z, .fast + ; none of the above + ld c, OPT_TEXT_SPEED_MED + lb de, TEXT_DELAY_FAST, TEXT_DELAY_SLOW + ret + +.slow + ld c, OPT_TEXT_SPEED_SLOW + lb de, TEXT_DELAY_MED, TEXT_DELAY_FAST + ret + +.fast + ld c, OPT_TEXT_SPEED_FAST + lb de, TEXT_DELAY_SLOW, TEXT_DELAY_MED + ret + +Options_BattleScene: + ld hl, wOptions + ldh a, [hJoyPressed] + bit D_LEFT_F, a + jr nz, .LeftPressed + bit D_RIGHT_F, a + jr z, .NonePressed + bit BATTLE_SCENE, [hl] + jr nz, .ToggleOn + jr .ToggleOff + +.LeftPressed: + bit BATTLE_SCENE, [hl] + jr z, .ToggleOff + jr .ToggleOn + +.NonePressed: + bit BATTLE_SCENE, [hl] + jr z, .ToggleOn + jr .ToggleOff + +.ToggleOn: + res BATTLE_SCENE, [hl] + ld de, .On + jr .Display + +.ToggleOff: + set BATTLE_SCENE, [hl] + ld de, .Off + +.Display: + hlcoord 11, 5 + call PlaceString + and a + ret + +.On: db "ON @" +.Off: db "OFF@" + +Options_BattleStyle: + ld hl, wOptions + ldh a, [hJoyPressed] + bit D_LEFT_F, a + jr nz, .LeftPressed + bit D_RIGHT_F, a + jr z, .NonePressed + bit BATTLE_SHIFT, [hl] + jr nz, .ToggleShift + jr .ToggleSet + +.LeftPressed: + bit BATTLE_SHIFT, [hl] + jr z, .ToggleSet + jr .ToggleShift + +.NonePressed: + bit BATTLE_SHIFT, [hl] + jr nz, .ToggleSet + +.ToggleShift: + res BATTLE_SHIFT, [hl] + ld de, .Shift + jr .Display + +.ToggleSet: + set BATTLE_SHIFT, [hl] + ld de, .Set + +.Display: + hlcoord 11, 7 + call PlaceString + and a + ret + +.Shift: db "SHIFT@" +.Set: db "SET @" + +Options_Sound: + ld hl, wOptions + ldh a, [hJoyPressed] + bit D_LEFT_F, a + jr nz, .LeftPressed + bit D_RIGHT_F, a + jr z, .NonePressed + bit STEREO, [hl] + jr nz, .SetMono + jr .SetStereo + +.LeftPressed: + bit STEREO, [hl] + jr z, .SetStereo + jr .SetMono + +.NonePressed: + bit STEREO, [hl] + jr nz, .ToggleStereo + jr .ToggleMono + +.SetMono: + res STEREO, [hl] + call RestartMapMusic + +.ToggleMono: + ld de, .Mono + jr .Display + +.SetStereo: + set STEREO, [hl] + call RestartMapMusic + +.ToggleStereo: + ld de, .Stereo + +.Display: + hlcoord 11, 9 + call PlaceString + and a + ret + +.Mono: db "MONO @" +.Stereo: db "STEREO@" + + const_def + const OPT_PRINT_LIGHTEST ; 0 + const OPT_PRINT_LIGHTER ; 1 + const OPT_PRINT_NORMAL ; 2 + const OPT_PRINT_DARKER ; 3 + const OPT_PRINT_DARKEST ; 4 + +Options_Print: + call GetPrinterSetting + ldh a, [hJoyPressed] + bit D_LEFT_F, a + jr nz, .LeftPressed + bit D_RIGHT_F, a + jr z, .NonePressed + ld a, c + cp OPT_PRINT_DARKEST + jr c, .Increase + ld c, OPT_PRINT_LIGHTEST - 1 + +.Increase: + inc c + ld a, e + jr .Save + +.LeftPressed: + ld a, c + and a + jr nz, .Decrease + ld c, OPT_PRINT_DARKEST + 1 + +.Decrease: + dec c + ld a, d + +.Save: + ld b, a + ld [wGBPrinterBrightness], a + +.NonePressed: + ld b, 0 + ld hl, .Strings + add hl, bc + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + hlcoord 11, 11 + call PlaceString + and a + ret + +.Strings: +; entries correspond to OPT_PRINT_* constants + dw .Lightest + dw .Lighter + dw .Normal + dw .Darker + dw .Darkest + +.Lightest: db "LIGHTEST@" +.Lighter: db "LIGHTER @" +.Normal: db "NORMAL @" +.Darker: db "DARKER @" +.Darkest: db "DARKEST @" + +GetPrinterSetting: +; converts GBPRINTER_* value in a to OPT_PRINT_* value in c, +; with previous/next GBPRINTER_* values in d/e + ld a, [wGBPrinterBrightness] + and a + jr z, .IsLightest + cp GBPRINTER_LIGHTER + jr z, .IsLight + cp GBPRINTER_DARKER + jr z, .IsDark + cp GBPRINTER_DARKEST + jr z, .IsDarkest + ; none of the above + ld c, OPT_PRINT_NORMAL + lb de, GBPRINTER_LIGHTER, GBPRINTER_DARKER + ret + +.IsLightest: + ld c, OPT_PRINT_LIGHTEST + lb de, GBPRINTER_DARKEST, GBPRINTER_LIGHTER + ret + +.IsLight: + ld c, OPT_PRINT_LIGHTER + lb de, GBPRINTER_LIGHTEST, GBPRINTER_NORMAL + ret + +.IsDark: + ld c, OPT_PRINT_DARKER + lb de, GBPRINTER_NORMAL, GBPRINTER_DARKEST + ret + +.IsDarkest: + ld c, OPT_PRINT_DARKEST + lb de, GBPRINTER_DARKER, GBPRINTER_LIGHTEST + ret + +Options_MenuAccount: + ld hl, wOptions2 + ldh a, [hJoyPressed] + bit D_LEFT_F, a + jr nz, .LeftPressed + bit D_RIGHT_F, a + jr z, .NonePressed + bit MENU_ACCOUNT, [hl] + jr nz, .ToggleOff + jr .ToggleOn + +.LeftPressed: + bit MENU_ACCOUNT, [hl] + jr z, .ToggleOn + jr .ToggleOff + +.NonePressed: + bit MENU_ACCOUNT, [hl] + jr nz, .ToggleOn + +.ToggleOff: + res MENU_ACCOUNT, [hl] + ld de, .Off + jr .Display + +.ToggleOn: + set MENU_ACCOUNT, [hl] + ld de, .On + +.Display: + hlcoord 11, 13 + call PlaceString + and a + ret + +.Off: db "OFF@" +.On: db "ON @" + +Options_Frame: + ld hl, wTextboxFrame + ldh a, [hJoyPressed] + bit D_LEFT_F, a + jr nz, .LeftPressed + bit D_RIGHT_F, a + jr nz, .RightPressed + and a + ret + +.RightPressed: + ld a, [hl] + inc a + jr .Save + +.LeftPressed: + ld a, [hl] + dec a + +.Save: + maskbits NUM_FRAMES + ld [hl], a +UpdateFrame: + ld a, [wTextboxFrame] + hlcoord 16, 15 ; where on the screen the number is drawn + add "1" + ld [hl], a + call LoadFontsExtra + and a + ret + +Options_Cancel: + ldh a, [hJoyPressed] + and A_BUTTON + jr nz, .Exit + and a + ret + +.Exit: + scf + ret + +OptionsControl: + ld hl, wJumptableIndex + ldh a, [hJoyLast] + cp D_DOWN + jr z, .DownPressed + cp D_UP + jr z, .UpPressed + and a + ret + +.DownPressed: + ld a, [hl] + cp OPT_CANCEL ; maximum option index + jr nz, .CheckMenuAccount + ld [hl], OPT_TEXT_SPEED ; first option + scf + ret + +.CheckMenuAccount: ; I have no idea why this exists... + cp OPT_MENU_ACCOUNT + jr nz, .Increase + ld [hl], OPT_MENU_ACCOUNT + +.Increase: + inc [hl] + scf + ret + +.UpPressed: + ld a, [hl] + +; Another thing where I'm not sure why it exists + cp OPT_FRAME + jr nz, .NotFrame + ld [hl], OPT_MENU_ACCOUNT + scf + ret + +.NotFrame: + and a ; OPT_TEXT_SPEED, minimum option index + jr nz, .Decrease + ld [hl], NUM_OPTIONS ; decrements to OPT_CANCEL, maximum option index + +.Decrease: + dec [hl] + scf + ret + +Options_UpdateCursorPosition: + hlcoord 1, 1 + ld de, SCREEN_WIDTH + ld c, SCREEN_HEIGHT - 2 +.loop + ld [hl], " " + add hl, de + dec c + jr nz, .loop + hlcoord 1, 2 + ld bc, 2 * SCREEN_WIDTH + ld a, [wJumptableIndex] + call AddNTimes + ld [hl], "▶" + ret diff --git a/engine/menus/save.asm b/engine/menus/save.asm new file mode 100644 index 0000000..d5a12f8 --- /dev/null +++ b/engine/menus/save.asm @@ -0,0 +1,1387 @@ +SaveMenu: + call LoadStandardMenuHeader + farcall DisplaySaveInfoOnSave + call SpeechTextbox + call UpdateSprites + farcall SaveMenu_CopyTilemapAtOnce + ld hl, WouldYouLikeToSaveTheGameText + call SaveTheGame_yesorno + jr nz, .refused + call AskOverwriteSaveFile + jr c, .refused + call PauseGameLogic + call SavedTheGame + call ResumeGameLogic + call ExitMenu + and a + ret + +.refused + call ExitMenu + farcall SaveMenu_CopyTilemapAtOnce + scf + ret + +SaveAfterLinkTrade: + call PauseGameLogic + farcall StageRTCTimeForSave + farcall BackupMysteryGift + call SavePokemonData + call SaveIndexTables + call SaveChecksum + call SaveBackupPokemonData + call SaveBackupIndexTables + call SaveBackupChecksum + farcall BackupPartyMonMail + farcall SaveRTC + call ResumeGameLogic + ret + +ChangeBoxSaveGame: + push de + ld hl, ChangeBoxSaveText + call MenuTextbox + call YesNoBox + call ExitMenu + jr c, .refused + call AskOverwriteSaveFile + jr c, .refused + call PauseGameLogic + call SaveBox + pop de + ld a, e + ld [wCurBox], a + call LoadBox + call SavedTheGame + call ResumeGameLogic + and a + ret +.refused + pop de + ret + +Link_SaveGame: + call AskOverwriteSaveFile + jr c, .refused + call PauseGameLogic + call SavedTheGame + call ResumeGameLogic + and a + +.refused + ret + +MoveMonWOMail_SaveGame: + call PauseGameLogic + push de + call SaveBox + pop de + ld a, e + ld [wCurBox], a + call LoadBox + call ResumeGameLogic + ret + +MoveMonWOMail_InsertMon_SaveGame: + call PauseGameLogic + push de + call SaveBox + pop de + ld a, e + ld [wCurBox], a + ld a, TRUE + ld [wSaveFileExists], a + farcall StageRTCTimeForSave + farcall BackupMysteryGift + call ValidateSave + call SaveOptions + call SavePlayerData + call SavePokemonData + call SaveIndexTables + call SaveChecksum + call ValidateBackupSave + call SaveBackupOptions + call SaveBackupPlayerData + call SaveBackupPokemonData + call SaveBackupIndexTables + call SaveBackupChecksum + farcall BackupPartyMonMail + farcall BackupMobileEventIndex + farcall SaveRTC + call LoadBox + call ResumeGameLogic + ld de, SFX_SAVE + jp PlaySFX + +StartMoveMonWOMail_SaveGame: + ld hl, MoveMonWOMailSaveText + call MenuTextbox + call YesNoBox + call ExitMenu + jr c, .refused + call AskOverwriteSaveFile + jr c, .refused + call PauseGameLogic + call SavedTheGame + call ResumeGameLogic + and a + ret + +.refused + scf + ret + +PauseGameLogic: + ld a, TRUE + ld [wGameLogicPaused], a + ret + +ResumeGameLogic: + xor a ; FALSE + ld [wGameLogicPaused], a + ret + +AddHallOfFameEntry: + ld a, BANK(sHallOfFame) + call OpenSRAM + ld hl, sHallOfFame + HOF_LENGTH * (NUM_HOF_TEAMS - 1) - 1 + ld de, sHallOfFame + HOF_LENGTH * NUM_HOF_TEAMS - 1 + ld bc, HOF_LENGTH * (NUM_HOF_TEAMS - 1) +.loop + ld a, [hld] + ld [de], a + dec de + dec bc + ld a, c + or b + jr nz, .loop + ld hl, wHallOfFamePokemonList + ld de, sHallOfFame + ld bc, HOF_LENGTH + call CopyBytes + call CloseSRAM + ret + +AskOverwriteSaveFile: + ld a, [wSaveFileExists] + and a + jr z, .erase + call CompareLoadedAndSavedPlayerID + ret z + ld hl, AnotherSaveFileText + call SaveTheGame_yesorno + jr nz, .refused + +.erase + call ErasePreviousSave + and a + ret + +.refused + scf + ret + +SaveTheGame_yesorno: + ld b, BANK(WouldYouLikeToSaveTheGameText) + call MapTextbox + call LoadMenuTextbox + lb bc, 0, 7 + call PlaceYesNoBox + ld a, [wMenuCursorY] + dec a + call CloseWindow + and a + ret + +CompareLoadedAndSavedPlayerID: + ld a, BANK(sPlayerData) + call OpenSRAM + ld hl, sPlayerData + (wPlayerID - wPlayerData) + ld a, [hli] + ld c, [hl] + ld b, a + call CloseSRAM + ld a, [wPlayerID] + cp b + ret nz + ld a, [wPlayerID + 1] + cp c + ret + +SavedTheGame: + ld hl, wOptions + set NO_TEXT_SCROLL, [hl] + push hl + ld hl, .saving_text + call PrintText + pop hl + res NO_TEXT_SCROLL, [hl] + call SaveGameData + ; saved the game! + ld hl, SavedTheGameText + call PrintText + ld de, SFX_SAVE + call WaitPlaySFX + jp WaitSFX + +.saving_text + text "Saving…" + done + +SaveGameData: + ld a, TRUE + ld [wSaveFileExists], a + farcall StageRTCTimeForSave + farcall BackupMysteryGift + call ValidateSave + call SaveOptions + call SavePlayerData + call SavePokemonData + call SaveIndexTables + call SaveBox + call SaveChecksum + call ValidateBackupSave + call SaveBackupOptions + call SaveBackupPlayerData + call SaveBackupPokemonData + call SaveBackupIndexTables + call SaveBackupChecksum + call UpdateStackTop + farcall BackupPartyMonMail + farcall BackupMobileEventIndex + farcall SaveRTC + ld a, BANK(sBattleTowerChallengeState) + call OpenSRAM + ld a, [sBattleTowerChallengeState] + cp BATTLETOWER_RECEIVED_REWARD + jr nz, .ok + xor a + ld [sBattleTowerChallengeState], a +.ok + call CloseSRAM + ret + +UpdateStackTop: +; sStackTop appears to be unused. +; It could have been used to debug stack overflow during saving. + call FindStackTop + ld a, BANK(sStackTop) + call OpenSRAM + ld a, [sStackTop + 0] + ld e, a + ld a, [sStackTop + 1] + ld d, a + or e + jr z, .update + ld a, e + sub l + ld a, d + sbc h + jr c, .done + +.update + ld a, l + ld [sStackTop + 0], a + ld a, h + ld [sStackTop + 1], a + +.done + call CloseSRAM + ret + +FindStackTop: +; Find the furthest point that sp has traversed to. +; This is distinct from the current value of sp. + ld hl, wStackBottom +.loop + ld a, [hl] + or a + ret nz + inc hl + jr .loop + +ErasePreviousSave: + call EraseBoxes + call EraseHallOfFame + call EraseLinkBattleStats + call EraseMysteryGift + call SaveData + call EraseBattleTowerStatus + ld a, BANK(sStackTop) + call OpenSRAM + xor a + ld [sStackTop + 0], a + ld [sStackTop + 1], a + call CloseSRAM + ld a, $1 + ld [wSavedAtLeastOnce], a + ret + +EraseLinkBattleStats: + ld a, BANK(sLinkBattleStats) + call OpenSRAM + ld hl, sLinkBattleStats + ld bc, sLinkBattleStatsEnd - sLinkBattleStats + xor a + call ByteFill + jp CloseSRAM + +EraseMysteryGift: + ld a, BANK(sBackupMysteryGiftItem) + call OpenSRAM + ld hl, sBackupMysteryGiftItem + ld bc, sBackupMysteryGiftItemEnd - sBackupMysteryGiftItem + xor a + call ByteFill + jp CloseSRAM + +EraseHallOfFame: + ld a, BANK(sHallOfFame) + call OpenSRAM + ld hl, sHallOfFame + ld bc, sHallOfFameEnd - sHallOfFame + xor a + call ByteFill + jp CloseSRAM + +InitDefaultEZChatMsgs: ; unreferenced + ld a, BANK(sEZChatMessages) ; MBC30 bank used by JP Crystal; inaccessible by MBC3 + call OpenSRAM + ld hl, .Data + ld de, sEZChatMessages + ld bc, EASY_CHAT_MESSAGE_LENGTH * 4 + call CopyBytes + jp CloseSRAM + +.Data: +; introduction + db $0d, EZCHAT_GREETINGS, $00, EZCHAT_EXCLAMATIONS, $00, EZCHAT_POKEMON + db $22, EZCHAT_GREETINGS, $01, EZCHAT_EXCLAMATIONS, $00, EZCHAT_POKEMON +; begin battle + db $03, EZCHAT_BATTLE, $05, EZCHAT_CONDITIONS, $03, EZCHAT_EXCLAMATIONS + db $0e, EZCHAT_CONVERSATION, $03, EZCHAT_GREETINGS, $00, EZCHAT_POKEMON +; win battle + db $39, EZCHAT_FEELINGS, $07, EZCHAT_BATTLE, $00, EZCHAT_EXCLAMATIONS + db $04, EZCHAT_FEELINGS, $01, EZCHAT_EXCLAMATIONS, $00, EZCHAT_POKEMON +; lose battle + db $0f, EZCHAT_EXCLAMATIONS, $14, EZCHAT_FEELINGS, $05, EZCHAT_EXCLAMATIONS + db $11, EZCHAT_TIME, $0c, EZCHAT_CONVERSATION, $06, EZCHAT_BATTLE + +EraseBattleTowerStatus: + ld a, BANK(sBattleTowerChallengeState) + call OpenSRAM + xor a + ld [sBattleTowerChallengeState], a + jp CloseSRAM + +SaveData: + call _SaveData + ret + +Function14d6c: ; unreferenced + ld a, BANK(s4_a60b) ; MBC30 bank used by JP Crystal; inaccessible by MBC3 + call OpenSRAM + ld a, [s4_a60b] ; address of MBC30 bank + ld b, $0 + and a + jr z, .ok + ld b, $2 + +.ok + ld a, b + ld [s4_a60b], a ; address of MBC30 bank + call CloseSRAM + ret + +Function14d83: ; unreferenced + ld a, BANK(s4_a60c) ; aka BANK(s4_a60d) ; MBC30 bank used by JP Crystal; inaccessible by MBC3 + call OpenSRAM + xor a + ld [s4_a60c], a ; address of MBC30 bank + ld [s4_a60d], a ; address of MBC30 bank + call CloseSRAM + ret + +Function14d93: ; unreferenced + ld a, BANK(s7_a000) ; MBC30 bank used by JP Crystal; inaccessible by MBC3 + call OpenSRAM + xor a + ld [s7_a000], a ; address of MBC30 bank + call CloseSRAM + ret + +HallOfFame_InitSaveIfNeeded: + ld a, [wSavedAtLeastOnce] + and a + ret nz + call ErasePreviousSave + ret + +ValidateSave: + ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2) + call OpenSRAM + ld a, SAVE_CHECK_VALUE_1 + ld [sCheckValue1], a + ld a, SAVE_CHECK_VALUE_2 + ld [sCheckValue2], a + jp CloseSRAM + +SaveOptions: + ld a, BANK(sOptions) + call OpenSRAM + ld hl, wOptions + ld de, sOptions + ld bc, wOptionsEnd - wOptions + call CopyBytes + ld a, [wOptions] + and ~(1 << NO_TEXT_SCROLL) + ld [sOptions], a + jp CloseSRAM + +SavePlayerData: + ld a, BANK(sPlayerData) + call OpenSRAM + ld hl, wPlayerData + ld de, sPlayerData + ld bc, wPlayerDataEnd - wPlayerData + call CopyBytes + ld hl, wCurMapData + ld de, sCurMapData + ld bc, wCurMapDataEnd - wCurMapData + call CopyBytes + jp CloseSRAM + +SavePokemonData: + ld a, BANK(sPokemonData) + call OpenSRAM + ld hl, wPokemonData + ld de, sPokemonData + ld bc, wPokemonDataEnd - wPokemonData + call CopyBytes + call CloseSRAM + ret + +SaveIndexTables: + ; saving is already a long operation, so take the chance to GC the table + farcall ForceGarbageCollection + ldh a, [rSVBK] + push af + ld a, BANK("16-bit WRAM tables") + ldh [rSVBK], a + ld a, BANK(sPokemonIndexTable) + call OpenSRAM + ld hl, wPokemonIndexTable + ld de, sPokemonIndexTable + ld bc, wPokemonIndexTableEnd - wPokemonIndexTable + call CopyBytes + ld a, BANK(sMoveIndexTable) + call OpenSRAM + ld hl, wMoveIndexTable + ld de, sMoveIndexTable + ld bc, wMoveIndexTableEnd - wMoveIndexTable + call CopyBytes + pop af + ldh [rSVBK], a + jp CloseSRAM + +SaveBox: + call GetBoxAddress + push de + push af + call SaveBoxAddress + pop af + call OpenSRAM + pop hl + call ComputeSavedBoxIndexTable + call GetBoxPokemonIndexesAddress + call OpenSRAM + ld d, h + ld e, l + ld hl, wBoxPartialData + ld bc, 2 * MONS_PER_BOX + call CopyBytes + call GetBoxAddress + ld b, a + ld c, 0 + farcall BillsPC_ConvertBoxData + jp CloseSRAM + +SaveChecksum: + ld a, BANK(sMoveIndexTable) + call OpenSRAM + ld hl, sMoveIndexTable + ld bc, wMoveIndexTableEnd - wMoveIndexTable + call Checksum + ld a, BANK(sSaveData) + call OpenSRAM + ld hl, sConversionTableChecksum + ld a, e + ld [hli], a + ld [hl], d + ld hl, sSaveData + ld bc, sSaveDataEnd - sSaveData + call Checksum + ld a, e + ld [sChecksum + 0], a + ld a, d + ld [sChecksum + 1], a + call CloseSRAM + ret + +ValidateBackupSave: + ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2) + call OpenSRAM + ld a, SAVE_CHECK_VALUE_1 + ld [sBackupCheckValue1], a + ld a, SAVE_CHECK_VALUE_2 + ld [sBackupCheckValue2], a + call CloseSRAM + ret + +SaveBackupOptions: + ld a, BANK(sBackupOptions) + call OpenSRAM + ld hl, wOptions + ld de, sBackupOptions + ld bc, wOptionsEnd - wOptions + call CopyBytes + call CloseSRAM + ret + +SaveBackupPlayerData: + ld a, BANK(sBackupPlayerData) + call OpenSRAM + ld hl, wPlayerData + ld de, sBackupPlayerData + ld bc, wPlayerDataEnd - wPlayerData + call CopyBytes + ld hl, wCurMapData + ld de, sBackupCurMapData + ld bc, wCurMapDataEnd - wCurMapData + call CopyBytes + call CloseSRAM + ret + +SaveBackupPokemonData: + ld a, BANK(sBackupPokemonData) + call OpenSRAM + ld hl, wPokemonData + ld de, sBackupPokemonData + ld bc, wPokemonDataEnd - wPokemonData + call CopyBytes + call CloseSRAM + ret + +SaveBackupIndexTables: + ld a, BANK(sBackupPokemonIndexTable) + call OpenSRAM + ldh a, [rSVBK] + push af + ld a, BANK("16-bit WRAM tables") + ldh [rSVBK], a + ld hl, wPokemonIndexTable + ld de, sBackupPokemonIndexTable + ld bc, wPokemonIndexTableEnd - wPokemonIndexTable + call CopyBytes + ld a, BANK(sBackupMoveIndexTable) + call OpenSRAM + ld hl, wMoveIndexTable + ld de, sBackupMoveIndexTable + ld bc, wMoveIndexTableEnd - wMoveIndexTable + call CopyBytes + pop af + ldh [rSVBK], a + jp CloseSRAM + +SaveBackupChecksum: + ld a, BANK(sBackupMoveIndexTable) + call OpenSRAM + ld hl, sBackupMoveIndexTable + ld bc, wMoveIndexTableEnd - wMoveIndexTable + call Checksum + ld a, BANK(sBackupSaveData) + call OpenSRAM + ld hl, sBackupConversionTableChecksum + ld a, e + ld [hli], a + ld [hl], d + ld hl, sBackupSaveData + ld bc, sBackupSaveDataEnd - sBackupSaveData + call Checksum + ld a, e + ld [sBackupChecksum + 0], a + ld a, d + ld [sBackupChecksum + 1], a + call CloseSRAM + ret + +TryLoadSaveFile: + call VerifyChecksum + jr nz, .backup + call LoadPlayerData + call LoadPokemonData + call LoadIndexTables + call LoadBox + farcall RestorePartyMonMail + farcall RestoreMobileEventIndex + farcall RestoreMysteryGift + call ValidateBackupSave + call SaveBackupOptions + call SaveBackupPlayerData + call SaveBackupPokemonData + call SaveBackupIndexTables + call SaveBackupChecksum + and a + ret + +.backup + call VerifyBackupChecksum + jr nz, .corrupt + call LoadBackupPlayerData + call LoadBackupPokemonData + call LoadBackupIndexTables + call LoadBox + farcall RestorePartyMonMail + farcall RestoreMobileEventIndex + farcall RestoreMysteryGift + call ValidateSave + call SaveOptions + call SavePlayerData + call SavePokemonData + call SaveIndexTables + call SaveChecksum + and a + ret + +.corrupt + ld a, [wOptions] + push af + set NO_TEXT_SCROLL, a + ld [wOptions], a + ld hl, SaveFileCorruptedText + call PrintText + pop af + ld [wOptions], a + scf + ret + +TryLoadSaveData: + xor a ; FALSE + ld [wSaveFileExists], a + call CheckPrimarySaveFile + ld a, [wSaveFileExists] + and a + jr z, .backup + + ld a, BANK(sPlayerData) + call OpenSRAM + ld hl, sPlayerData + wStartDay - wPlayerData + ld de, wStartDay + ld bc, 8 + call CopyBytes + ld hl, sPlayerData + wStatusFlags - wPlayerData + ld de, wStatusFlags + ld a, [hl] + ld [de], a + call CloseSRAM + ret + +.backup + call CheckBackupSaveFile + ld a, [wSaveFileExists] + and a + jr z, .corrupt + + ld a, BANK(sBackupPlayerData) + call OpenSRAM + ld hl, sBackupPlayerData + wStartDay - wPlayerData + ld de, wStartDay + ld bc, 8 + call CopyBytes + ld hl, sBackupPlayerData + wStatusFlags - wPlayerData + ld de, wStatusFlags + ld a, [hl] + ld [de], a + call CloseSRAM + ret + +.corrupt + ld hl, DefaultOptions + ld de, wOptions + ld bc, wOptionsEnd - wOptions + call CopyBytes + call ClearClock + ret + +INCLUDE "data/default_options.asm" + +CheckPrimarySaveFile: + ld a, BANK(sCheckValue1) ; aka BANK(sCheckValue2) + call OpenSRAM + ld a, [sCheckValue1] + cp SAVE_CHECK_VALUE_1 + jr nz, .nope + ld a, [sCheckValue2] + cp SAVE_CHECK_VALUE_2 + jr nz, .nope + ld hl, sOptions + ld de, wOptions + ld bc, wOptionsEnd - wOptions + call CopyBytes + call CloseSRAM + ld a, TRUE + ld [wSaveFileExists], a + +.nope + call CloseSRAM + ret + +CheckBackupSaveFile: + ld a, BANK(sBackupCheckValue1) ; aka BANK(sBackupCheckValue2) + call OpenSRAM + ld a, [sBackupCheckValue1] + cp SAVE_CHECK_VALUE_1 + jr nz, .nope + ld a, [sBackupCheckValue2] + cp SAVE_CHECK_VALUE_2 + jr nz, .nope + ld hl, sBackupOptions + ld de, wOptions + ld bc, wOptionsEnd - wOptions + call CopyBytes + ld a, $2 + ld [wSaveFileExists], a + +.nope + call CloseSRAM + ret + +LoadPlayerData: + ld a, BANK(sPlayerData) + call OpenSRAM + ld hl, sPlayerData + ld de, wPlayerData + ld bc, wPlayerDataEnd - wPlayerData + call CopyBytes + ld hl, sCurMapData + ld de, wCurMapData + ld bc, wCurMapDataEnd - wCurMapData + call CopyBytes + call CloseSRAM + ld a, BANK(sBattleTowerChallengeState) + call OpenSRAM + ld a, [sBattleTowerChallengeState] + cp BATTLETOWER_RECEIVED_REWARD + jr nz, .not_4 + ld a, BATTLETOWER_WON_CHALLENGE + ld [sBattleTowerChallengeState], a +.not_4 + call CloseSRAM + ret + +LoadPokemonData: + ld a, BANK(sPokemonData) + call OpenSRAM + ld hl, sPokemonData + ld de, wPokemonData + ld bc, wPokemonDataEnd - wPokemonData + call CopyBytes + call CloseSRAM + ret + +LoadIndexTables: + ldh a, [rSVBK] + push af + ld a, BANK("16-bit WRAM tables") + ldh [rSVBK], a + ld a, BANK(sPokemonIndexTable) + call OpenSRAM + ld hl, sPokemonIndexTable + ld de, wPokemonIndexTable + ld bc, wPokemonIndexTableEnd - wPokemonIndexTable + call CopyBytes + ld a, BANK(sMoveIndexTable) + call OpenSRAM + ld hl, sMoveIndexTable + ld de, wMoveIndexTable + ld bc, wMoveIndexTableEnd - wMoveIndexTable + call CopyBytes + pop af + ldh [rSVBK], a + jp CloseSRAM + +LoadBox: + call GetBoxAddress + call LoadBoxAddress + lb bc, BANK(sBox), 1 + ld de, sBox + farcall BillsPC_ConvertBoxData + call GetBoxPokemonIndexesAddress + call OpenSRAM + ld de, wBoxPartialData + ld bc, 2 * MONS_PER_BOX + call CopyBytes + ld a, BANK(sBox) + call OpenSRAM + call ClearIndexesForLoadedBox + ; GC the table now that lots of entries are free + farcall ForceGarbageCollection + call UpdateIndexesForLoadedBox + jp CloseSRAM + +VerifyChecksum: + ld hl, sSaveData + ld bc, sSaveDataEnd - sSaveData + ld a, BANK(sSaveData) + call OpenSRAM + call Checksum + ld a, [sChecksum + 0] + cp e + jr nz, .fail + ld a, [sChecksum + 1] + cp d + jr nz, .fail + ld hl, sConversionTableChecksum + ld a, [hli] + ld h, [hl] + ld l, a + push hl + ld a, BANK(sMoveIndexTable) + call OpenSRAM + ld hl, sMoveIndexTable + ld bc, wMoveIndexTableEnd - wMoveIndexTable + call Checksum + pop hl + ld a, d + cp h + jr nz, .fail + ld a, e + cp l +.fail + push af + call CloseSRAM + pop af + ret + +LoadBackupPlayerData: + ld a, BANK(sBackupPlayerData) + call OpenSRAM + ld hl, sBackupPlayerData + ld de, wPlayerData + ld bc, wPlayerDataEnd - wPlayerData + call CopyBytes + ld hl, sBackupCurMapData + ld de, wCurMapData + ld bc, wCurMapDataEnd - wCurMapData + call CopyBytes + call CloseSRAM + ret + +LoadBackupPokemonData: + ld a, BANK(sBackupPokemonData) + call OpenSRAM + ld hl, sBackupPokemonData + ld de, wPokemonData + ld bc, wPokemonDataEnd - wPokemonData + call CopyBytes + call CloseSRAM + ret + +LoadBackupIndexTables: + ldh a, [rSVBK] + push af + ld a, BANK("16-bit WRAM tables") + ldh [rSVBK], a + ld a, BANK(sBackupPokemonIndexTable) + call OpenSRAM + ld hl, sBackupPokemonIndexTable + ld de, wPokemonIndexTable + ld bc, wPokemonIndexTableEnd - wPokemonIndexTable + call CopyBytes + ld a, BANK(sBackupMoveIndexTable) + call OpenSRAM + ld hl, sBackupMoveIndexTable + ld de, wMoveIndexTable + ld bc, wMoveIndexTableEnd - wMoveIndexTable + call CopyBytes + pop af + ldh [rSVBK], a + jp CloseSRAM + +VerifyBackupChecksum: + ld hl, sBackupSaveData + ld bc, sBackupSaveDataEnd - sBackupSaveData + ld a, BANK(sBackupSaveData) + call OpenSRAM + call Checksum + ld a, [sBackupChecksum + 0] + cp e + jr nz, .fail + ld a, [sBackupChecksum + 1] + cp d + jr nz, .fail + ld hl, sBackupConversionTableChecksum + ld a, [hli] + ld h, [hl] + ld l, a + push hl + ld a, BANK(sBackupMoveIndexTable) + call OpenSRAM + ld hl, sBackupMoveIndexTable + ld bc, wMoveIndexTableEnd - wMoveIndexTable + call Checksum + pop hl + ld a, d + cp h + jr nz, .fail + ld a, e + cp l +.fail + push af + call CloseSRAM + pop af + ret + +_SaveData: + ; This is called within two scenarios: + ; a) ErasePreviousSave (the process of erasing the save from a previous game file) + ; b) unused mobile functionality + ; It is not part of a regular save. + + ld a, BANK(sCrystalData) + call OpenSRAM + ld hl, wCrystalData + ld de, sCrystalData + ld bc, wCrystalDataEnd - wCrystalData + call CopyBytes + + ; This block originally had some mobile functionality, but since we're still in + ; BANK(sCrystalData), it instead overwrites the sixteen wEventFlags starting at 1:s4_a60e with + ; garbage from wd479. This isn't an issue, since ErasePreviousSave is followed by a regular + ; save that unwrites the garbage. + + ld hl, wd479 + ld a, [hli] + ld [s4_a60e + 0], a + ld a, [hli] + ld [s4_a60e + 1], a + + jp CloseSRAM + +_LoadData: + ld a, BANK(sCrystalData) + call OpenSRAM + ld hl, sCrystalData + ld de, wCrystalData + ld bc, wCrystalDataEnd - wCrystalData + call CopyBytes + + ; This block originally had some mobile functionality to mirror _SaveData above, but instead it + ; (harmlessly) writes the aforementioned wEventFlags to the unused wd479. + + ld hl, wd479 + ld a, [s4_a60e + 0] + ld [hli], a + ld a, [s4_a60e + 1] + ld [hli], a + + jp CloseSRAM + +GetBoxAddress: + ld a, [wCurBox] + cp NUM_BOXES + jr c, .ok + xor a + ld [wCurBox], a + +.ok + ld e, a + ld d, 0 + ld hl, BoxAddresses +rept 5 + add hl, de +endr + ld a, [hli] + push af + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld h, [hl] + ld l, a + pop af + ret + +GetBoxPokemonIndexesAddress: + ld a, [wCurBox] + ld e, a + ld d, 0 + ld hl, BoxAddresses + 5 * NUM_BOXES + add hl, de + add hl, de + add hl, de + ld a, [hli] + push af + ld a, [hli] + ld h, [hl] + ld l, a + pop af + ret + ret + +SaveBoxAddress: +; Save box via wBoxPartialData. +; We do this in three steps because the size of wBoxPartialData is less than +; the size of sBox. + push hl +; Load the first part of the active box. + push af + push de + ld a, BANK(sBox) + call OpenSRAM + ld hl, sBox + ld de, wBoxPartialData + ld bc, (wBoxPartialDataEnd - wBoxPartialData) + call CopyBytes + call CloseSRAM + pop de + pop af +; Save it to the target box. + push af + push de + call OpenSRAM + ld hl, wBoxPartialData + ld bc, (wBoxPartialDataEnd - wBoxPartialData) + call CopyBytes + call CloseSRAM + +; Load the second part of the active box. + ld a, BANK(sBox) + call OpenSRAM + ld hl, sBox + (wBoxPartialDataEnd - wBoxPartialData) + ld de, wBoxPartialData + ld bc, (wBoxPartialDataEnd - wBoxPartialData) + call CopyBytes + call CloseSRAM + pop de + pop af + + ld hl, (wBoxPartialDataEnd - wBoxPartialData) + add hl, de + ld e, l + ld d, h +; Save it to the next part of the target box. + push af + push de + call OpenSRAM + ld hl, wBoxPartialData + ld bc, (wBoxPartialDataEnd - wBoxPartialData) + call CopyBytes + call CloseSRAM + +; Load the third and final part of the active box. + ld a, BANK(sBox) + call OpenSRAM + ld hl, sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2 + ld de, wBoxPartialData + ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e + call CopyBytes + call CloseSRAM + pop de + pop af + + ld hl, (wBoxPartialDataEnd - wBoxPartialData) + add hl, de + ld e, l + ld d, h +; Save it to the final part of the target box. + call OpenSRAM + ld hl, wBoxPartialData + ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e + call CopyBytes + call CloseSRAM + + pop hl + ret + +ComputeSavedBoxIndexTable: + push hl + ld a, [hl] + ld de, wBoxPartialData + and a + jr z, .empty_box + cp MONS_PER_BOX + jr c, .valid_count + ld a, MONS_PER_BOX +.valid_count + ld bc, sBoxMons - sBox + add hl, bc + ld [wTempLoopCounter], a + ld c, BOXMON_STRUCT_LENGTH +.loop + ld a, [hl] + add hl, bc + push hl + call GetPokemonIndexFromID + ld a, l + ld [de], a + inc de + ld a, h + ld [de], a + inc de + ld hl, wTempLoopCounter + dec [hl] + pop hl + jr nz, .loop +.empty_box + pop hl + ld a, MONS_PER_BOX + sub [hl] + ret c + add a, a + ld h, d + ld l, e + ld c, a + xor a + ld b, a + jp ByteFill + +LoadBoxAddress: +; Load box via wBoxPartialData. +; We do this in three steps because the size of wBoxPartialData is less than +; the size of sBox. + push hl + ld l, e + ld h, d +; Load part 1 + push af + push hl + call OpenSRAM + ld de, wBoxPartialData + ld bc, (wBoxPartialDataEnd - wBoxPartialData) + call CopyBytes + call CloseSRAM + ld a, BANK(sBox) + call OpenSRAM + ld hl, wBoxPartialData + ld de, sBox + ld bc, (wBoxPartialDataEnd - wBoxPartialData) + call CopyBytes + call CloseSRAM + pop hl + pop af + + ld de, (wBoxPartialDataEnd - wBoxPartialData) + add hl, de +; Load part 2 + push af + push hl + call OpenSRAM + ld de, wBoxPartialData + ld bc, (wBoxPartialDataEnd - wBoxPartialData) + call CopyBytes + call CloseSRAM + ld a, BANK(sBox) + call OpenSRAM + ld hl, wBoxPartialData + ld de, sBox + (wBoxPartialDataEnd - wBoxPartialData) + ld bc, (wBoxPartialDataEnd - wBoxPartialData) + call CopyBytes + call CloseSRAM + pop hl + pop af +; Load part 3 + ld de, (wBoxPartialDataEnd - wBoxPartialData) + add hl, de + call OpenSRAM + ld de, wBoxPartialData + ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e + call CopyBytes + call CloseSRAM + ld a, BANK(sBox) + call OpenSRAM + ld hl, wBoxPartialData + ld de, sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2 + ld bc, sBoxEnd - (sBox + (wBoxPartialDataEnd - wBoxPartialData) * 2) ; $8e + call CopyBytes + call CloseSRAM + + pop hl + ret + +ClearIndexesForLoadedBox: + ld hl, sBoxMon1Species + ld bc, BOXMON_STRUCT_LENGTH + ld a, MONS_PER_BOX +.loop + ld [hl], 0 + add hl, bc + dec a + jr nz, .loop + ret + +UpdateIndexesForLoadedBox: + ld de, sBox + ld a, [de] + cp MONS_PER_BOX + jr c, .count_OK + ld a, MONS_PER_BOX + ld [de], a +.count_OK + inc de + and a + jr z, .done + ld [wTempLoopCounter], a + ld bc, sBoxMon1Species + ld hl, wBoxPartialData - 1 +.loop + inc hl + ld a, [hli] + push hl + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + ld [bc], a + ld a, [de] + cp EGG + jr z, .is_egg + ld a, [bc] + ld [de], a +.is_egg + ld hl, BOXMON_STRUCT_LENGTH + add hl, bc + ld b, h + ld c, l + inc de + ld hl, wTempLoopCounter + dec [hl] + pop hl + jr nz, .loop +.done + ld a, -1 + ld [de], a + ret + +EraseBoxes: + ld hl, BoxAddresses + ld c, NUM_BOXES +.next + push bc + ld a, [hli] + call OpenSRAM + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + xor a + ld [de], a + inc de + ld a, -1 + ld [de], a + inc de + ld bc, sBoxEnd - (sBox + 2) +.clear + xor a + ld [de], a + inc de + dec bc + ld a, b + or c + jr nz, .clear + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, -1 + ld [de], a + inc de + xor a + ld [de], a + call CloseSRAM + pop bc + dec c + jr nz, .next + ld e, NUM_BOXES +.index_loop + ld a, [hli] + call OpenSRAM + ld a, [hli] + ld b, a + ld a, [hli] + push hl + ld h, a + ld l, b + xor a + ld bc, 2 * MONS_PER_BOX + call ByteFill + pop hl + dec e + jr nz, .index_loop + ret + +BoxAddresses: + table_width 5, BoxAddresses +for n, 1, NUM_BOXES + 1 + db BANK(sBox{d:n}) ; aka BANK(sBox{d:n}End) + dw sBox{d:n}, sBox{d:n}End +endr + assert_table_length NUM_BOXES + + ; index addresses +BoxIndexAddresses: + table_width 3, BoxIndexAddresses + dba sBox1PokemonIndexes + dba sBox2PokemonIndexes + dba sBox3PokemonIndexes + dba sBox4PokemonIndexes + dba sBox5PokemonIndexes + dba sBox6PokemonIndexes + dba sBox7PokemonIndexes + dba sBox8PokemonIndexes + dba sBox9PokemonIndexes + dba sBox10PokemonIndexes + dba sBox11PokemonIndexes + dba sBox12PokemonIndexes + dba sBox13PokemonIndexes + dba sBox14PokemonIndexes + assert_table_length NUM_BOXES + +Checksum: + ld de, 0 +.loop + ld a, [hli] + add e + ld e, a + ld a, 0 + adc d + ld d, a + dec bc + ld a, b + or c + jr nz, .loop + ret + +WouldYouLikeToSaveTheGameText: + text_far _WouldYouLikeToSaveTheGameText + text_end + +SavedTheGameText: + text_far _SavedTheGameText + text_end + +AnotherSaveFileText: + text_far _AnotherSaveFileText + text_end + +SaveFileCorruptedText: + text_far _SaveFileCorruptedText + text_end + +ChangeBoxSaveText: + text_far _ChangeBoxSaveText + text_end + +MoveMonWOMailSaveText: + text_far _MoveMonWOMailSaveText + text_end diff --git a/engine/menus/savemenu_copytilemapatonce.asm b/engine/menus/savemenu_copytilemapatonce.asm new file mode 100644 index 0000000..2f30b7c --- /dev/null +++ b/engine/menus/savemenu_copytilemapatonce.asm @@ -0,0 +1,84 @@ +SaveMenu_CopyTilemapAtOnce: + ldh a, [hCGB] + and a + jp z, WaitBGMap + +; The following is a modified version of _CopyTilemapAtOnce +; that waits for [rLY] to be $60 instead of $80 - 1. + ldh a, [hBGMapMode] + push af + xor a + ldh [hBGMapMode], a + + ldh a, [hMapAnims] + push af + xor a + ldh [hMapAnims], a + +.wait + ldh a, [rLY] + cp $60 + jr c, .wait + + di + ld a, BANK(vBGMap2) + ldh [rVBK], a + hlcoord 0, 0, wAttrmap + call .CopyBGMapViaStack + ld a, BANK(vBGMap0) + ldh [rVBK], a + hlcoord 0, 0 + call .CopyBGMapViaStack + +.wait2 + ldh a, [rLY] + cp $60 + jr c, .wait2 + ei + + pop af + ldh [hMapAnims], a + pop af + ldh [hBGMapMode], a + ret + +.CopyBGMapViaStack: +; Copy all tiles to vBGMap + ld [hSPBuffer], sp + ld sp, hl + ldh a, [hBGMapAddress + 1] + ld h, a + ld l, 0 + ld a, SCREEN_HEIGHT + ldh [hTilesPerCycle], a + ld b, 1 << 1 ; not in v/hblank + ld c, LOW(rSTAT) + +.loop +rept SCREEN_WIDTH / 2 + pop de +; if in v/hblank, wait until not in v/hblank +.loop\@ + ldh a, [c] + and b + jr nz, .loop\@ +; load vBGMap + ld [hl], e + inc l + ld [hl], d + inc l +endr + + ld de, BG_MAP_WIDTH - SCREEN_WIDTH + add hl, de + ldh a, [hTilesPerCycle] + dec a + ldh [hTilesPerCycle], a + jr nz, .loop + + ldh a, [hSPBuffer] + ld l, a + ldh a, [hSPBuffer + 1] + ld h, a + ld sp, hl + ret diff --git a/engine/menus/scrolling_menu.asm b/engine/menus/scrolling_menu.asm new file mode 100644 index 0000000..3b67475 --- /dev/null +++ b/engine/menus/scrolling_menu.asm @@ -0,0 +1,519 @@ +_InitScrollingMenu:: + xor a + ld [wMenuJoypad], a + ldh [hBGMapMode], a + inc a + ldh [hInMenu], a + call InitScrollingMenuCursor + call ScrollingMenu_InitFlags + call ScrollingMenu_ValidateSwitchItem + call ScrollingMenu_InitDisplay + call ApplyTilemap + xor a + ldh [hBGMapMode], a + ret + +_ScrollingMenu:: +.loop + call ScrollingMenuJoyAction + jp c, .exit + call z, .zero + jr .loop + +.exit + call MenuClickSound + ld [wMenuJoypad], a + ld a, 0 + ldh [hInMenu], a + ret + +.zero + call ScrollingMenu_InitDisplay + ld a, 1 + ldh [hBGMapMode], a + ld c, 3 + call DelayFrames + xor a + ldh [hBGMapMode], a + ret + +ScrollingMenu_InitDisplay: + xor a + ldh [hBGMapMode], a + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + call ScrollingMenu_UpdateDisplay + call ScrollingMenu_PlaceCursor + call ScrollingMenu_CheckCallFunction3 + pop af + ld [wOptions], a + ret + +ScrollingMenuJoyAction: +.loop + call ScrollingMenuJoypad + ldh a, [hJoyLast] + and D_PAD + ld b, a + ldh a, [hJoyPressed] + and BUTTONS + or b + bit A_BUTTON_F, a + jp nz, .a_button + bit B_BUTTON_F, a + jp nz, .b_button + bit SELECT_F, a + jp nz, .select + bit START_F, a + jp nz, .start + bit D_RIGHT_F, a + jp nz, .d_right + bit D_LEFT_F, a + jp nz, .d_left + bit D_UP_F, a + jp nz, .d_up + bit D_DOWN_F, a + jp nz, .d_down + jr .loop + +.no_zero_no_carry ; unreferenced + ld a, -1 + and a + ret + +.a_button + call PlaceHollowCursor + ld a, [wMenuCursorY] + dec a + call ScrollingMenu_GetListItemCoordAndFunctionArgs + ld a, [wMenuSelection] + ld [wCurItem], a + ld a, [wMenuSelectionQuantity] + ld [wItemQuantity], a + call ScrollingMenu_GetCursorPosition + dec a + ld [wScrollingMenuCursorPosition], a + ld [wCurItemQuantity], a + ld a, [wMenuSelection] + cp -1 + jr z, .b_button + ld a, A_BUTTON + scf + ret + +.b_button + ld a, B_BUTTON + scf + ret + +.select + ld a, [wMenuDataFlags] + bit 7, a + jp z, xor_a_dec_a + ld a, [wMenuCursorY] + dec a + call ScrollingMenu_GetListItemCoordAndFunctionArgs + ld a, [wMenuSelection] + cp -1 + jp z, xor_a_dec_a + call ScrollingMenu_GetCursorPosition + dec a + ld [wScrollingMenuCursorPosition], a + ld a, SELECT + scf + ret + +.start + ld a, [wMenuDataFlags] + bit 6, a + jp z, xor_a_dec_a + ld a, START + scf + ret + +.d_left + ld hl, w2DMenuFlags2 + bit 7, [hl] + jp z, xor_a_dec_a + ld a, [wMenuDataFlags] + bit 3, a + jp z, xor_a_dec_a + ld a, D_LEFT + scf + ret + +.d_right + ld hl, w2DMenuFlags2 + bit 7, [hl] + jp z, xor_a_dec_a + ld a, [wMenuDataFlags] + bit 2, a + jp z, xor_a_dec_a + ld a, D_RIGHT + scf + ret + +.d_up + ld hl, w2DMenuFlags2 + bit 7, [hl] + jp z, xor_a + ld hl, wMenuScrollPosition + ld a, [hl] + and a + jr z, .xor_dec_up + dec [hl] + jp xor_a + +.xor_dec_up + jp xor_a_dec_a + +.d_down + ld hl, w2DMenuFlags2 + bit 7, [hl] + jp z, xor_a + ld hl, wMenuScrollPosition + ld a, [wMenuData_ScrollingMenuHeight] + add [hl] + ld b, a + ld a, [wScrollingMenuListSize] + cp b + jr c, .xor_dec_down + inc [hl] + jp xor_a + +.xor_dec_down + jp xor_a_dec_a + +ScrollingMenu_GetCursorPosition: + ld a, [wMenuScrollPosition] + ld c, a + ld a, [wMenuCursorY] + add c + ld c, a + ret + +ScrollingMenu_ClearLeftColumn: + call MenuBoxCoord2Tile + ld de, SCREEN_WIDTH + add hl, de + ld de, 2 * SCREEN_WIDTH + ld a, [wMenuData_ScrollingMenuHeight] +.loop + ld [hl], " " + add hl, de + dec a + jr nz, .loop + ret + +InitScrollingMenuCursor: + ld hl, wMenuData_ItemsPointerAddr + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wMenuData_ItemsPointerBank] + call GetFarByte + ld [wScrollingMenuListSize], a + ld a, [wMenuData_ScrollingMenuHeight] + ld c, a + ld a, [wMenuScrollPosition] + add c + ld c, a + ld a, [wScrollingMenuListSize] + inc a + cp c + jr nc, .skip + ld a, [wMenuData_ScrollingMenuHeight] + ld c, a + ld a, [wScrollingMenuListSize] + inc a + sub c + jr nc, .store + xor a + +.store + ld [wMenuScrollPosition], a + +.skip + ld a, [wMenuScrollPosition] + ld c, a + ld a, [wMenuCursorPosition] + add c + ld b, a + ld a, [wScrollingMenuListSize] + inc a + cp b + jr c, .wrap + jr nc, .done + +.wrap + xor a + ld [wMenuScrollPosition], a + ld a, $1 + ld [wMenuCursorPosition], a + +.done + ret + +ScrollingMenu_InitFlags: + ld a, [wMenuDataFlags] + ld c, a + ld a, [wScrollingMenuListSize] + ld b, a + ld a, [wMenuBorderTopCoord] + add 1 + ld [w2DMenuCursorInitY], a + ld a, [wMenuBorderLeftCoord] + add 0 + ld [w2DMenuCursorInitX], a + ld a, [wMenuData_ScrollingMenuHeight] + cp b + jr c, .no_extra_row + jr z, .no_extra_row + ld a, b + inc a +.no_extra_row + ld [w2DMenuNumRows], a + ld a, 1 + ld [w2DMenuNumCols], a + ld a, $8c + bit 2, c + jr z, .skip_set_0 + set 0, a + +.skip_set_0 + bit 3, c + jr z, .skip_set_1 + set 1, a + +.skip_set_1 + ld [w2DMenuFlags1], a + xor a + ld [w2DMenuFlags2], a + ld a, $20 + ld [w2DMenuCursorOffsets], a + ld a, A_BUTTON | B_BUTTON | D_UP | D_DOWN + bit 7, c + jr z, .disallow_select + add SELECT + +.disallow_select + bit 6, c + jr z, .disallow_start + add START + +.disallow_start + ld [wMenuJoypadFilter], a + ld a, [w2DMenuNumRows] + ld b, a + ld a, [wMenuCursorPosition] + and a + jr z, .reset_cursor + cp b + jr z, .cursor_okay + jr c, .cursor_okay + +.reset_cursor + ld a, 1 + +.cursor_okay + ld [wMenuCursorY], a + ld a, 1 + ld [wMenuCursorX], a + xor a + ld [wCursorCurrentTile], a + ld [wCursorCurrentTile + 1], a + ld [wCursorOffCharacter], a + ret + +ScrollingMenu_ValidateSwitchItem: + ld a, [wScrollingMenuListSize] + ld c, a + ld a, [wSwitchItem] + and a + jr z, .done + dec a + cp c + jr c, .done + xor a + ld [wSwitchItem], a + +.done + ret + +ScrollingMenu_UpdateDisplay: + call ClearWholeMenuBox + ld a, [wMenuDataFlags] + bit 4, a ; place arrows + jr z, .okay + ld a, [wMenuScrollPosition] + and a + jr z, .okay + ld a, [wMenuBorderTopCoord] + ld b, a + ld a, [wMenuBorderRightCoord] + ld c, a + call Coord2Tile + ld [hl], "▲" + +.okay + call MenuBoxCoord2Tile + ld bc, SCREEN_WIDTH + 1 + add hl, bc + ld a, [wMenuData_ScrollingMenuHeight] + ld b, a + ld c, $0 +.loop + ld a, [wMenuScrollPosition] + add c + ld [wScrollingMenuCursorPosition], a + ld a, c + call ScrollingMenu_GetListItemCoordAndFunctionArgs + ld a, [wMenuSelection] + cp -1 + jr z, .cancel + push bc + push hl + call ScrollingMenu_CallFunctions1and2 + pop hl + ld bc, 2 * SCREEN_WIDTH + add hl, bc + pop bc + inc c + ld a, c + cp b + jr nz, .loop + ld a, [wMenuDataFlags] + bit 4, a ; place arrows + jr z, .done + ld a, [wMenuBorderBottomCoord] + ld b, a + ld a, [wMenuBorderRightCoord] + ld c, a + call Coord2Tile + ld [hl], "▼" + +.done + ret + +.cancel + ld a, [wMenuDataFlags] + bit 0, a ; call function on cancel + jr nz, .call_function + ld de, .CancelString + call PlaceString + ret + +.CancelString + db "CANCEL@" + +.call_function + ld d, h + ld e, l + ld hl, wMenuData_ScrollingMenuFunction1 + jp CallPointerAt + +ScrollingMenu_CallFunctions1and2: + push hl + ld d, h + ld e, l + ld hl, wMenuData_ScrollingMenuFunction1 + call CallPointerAt + pop hl + ld a, [wMenuData_ScrollingMenuWidth] + and a + jr z, .done + ld e, a + ld d, 0 + add hl, de + ld d, h + ld e, l + ld hl, wMenuData_ScrollingMenuFunction2 + call CallPointerAt + +.done + ret + +ScrollingMenu_PlaceCursor: + ld a, [wSwitchItem] + and a + jr z, .done + ld b, a + ld a, [wMenuScrollPosition] + cp b + jr nc, .done + ld c, a + ld a, [wMenuData_ScrollingMenuHeight] + add c + cp b + jr c, .done + ld a, b + sub c + dec a + add a + add $1 + ld c, a + ld a, [wMenuBorderTopCoord] + add c + ld b, a + ld a, [wMenuBorderLeftCoord] + add $0 + ld c, a + call Coord2Tile + ld [hl], "▷" + +.done + ret + +ScrollingMenu_CheckCallFunction3: + ld a, [wMenuDataFlags] + bit 5, a ; call function 3 + ret z + bit 1, a ; call function 3 if not switching items + jr z, .call + ld a, [wSwitchItem] + and a + ret nz + +.call + ld a, [wMenuCursorY] + dec a + call ScrollingMenu_GetListItemCoordAndFunctionArgs + ld hl, wMenuData_ScrollingMenuFunction3 + call CallPointerAt + ret + +ScrollingMenu_GetListItemCoordAndFunctionArgs: + push de + push hl + ld e, a + ld a, [wMenuScrollPosition] + add e + ld e, a + ld d, 0 + ld hl, wMenuData_ItemsPointerAddr + ld a, [hli] + ld h, [hl] + ld l, a + inc hl ; items + ld a, [wMenuData_ScrollingMenuItemFormat] + cp SCROLLINGMENU_ITEMS_NORMAL + jr z, .got_spacing + cp SCROLLINGMENU_ITEMS_QUANTITY + jr z, .pointless_jump +.pointless_jump + add hl, de +.got_spacing + add hl, de + ld a, [wMenuData_ItemsPointerBank] + call GetFarByte + ld [wMenuSelection], a + ld [wCurItem], a + inc hl + ld a, [wMenuData_ItemsPointerBank] + call GetFarByte + ld [wMenuSelectionQuantity], a + pop hl + pop de + ret diff --git a/engine/menus/start_menu.asm b/engine/menus/start_menu.asm new file mode 100644 index 0000000..84636e0 --- /dev/null +++ b/engine/menus/start_menu.asm @@ -0,0 +1,541 @@ +; StartMenu.Items indexes + const_def + const STARTMENUITEM_POKEDEX ; 0 + const STARTMENUITEM_POKEMON ; 1 + const STARTMENUITEM_PACK ; 2 + const STARTMENUITEM_STATUS ; 3 + const STARTMENUITEM_SAVE ; 4 + const STARTMENUITEM_OPTION ; 5 + const STARTMENUITEM_EXIT ; 6 + const STARTMENUITEM_POKEGEAR ; 7 + const STARTMENUITEM_QUIT ; 8 + +StartMenu:: + call ClearWindowData + + ld de, SFX_MENU + call PlaySFX + + farcall ReanchorBGMap_NoOAMUpdate + + ld hl, wStatusFlags2 + bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] + ld hl, .MenuHeader + jr z, .GotMenuData + ld hl, .ContestMenuHeader + +.GotMenuData: + call LoadMenuHeader + call .SetUpMenuItems + ld a, [wBattleMenuCursorPosition] + ld [wMenuCursorPosition], a + call .DrawMenuAccount + call DrawVariableLengthMenuBox + call .DrawBugContestStatusBox + call SafeUpdateSprites + call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + farcall LoadFonts_NoOAMUpdate + call .DrawBugContestStatus + call UpdateTimePals + jr .Select + +.Reopen: + call UpdateSprites + call UpdateTimePals + call .SetUpMenuItems + ld a, [wBattleMenuCursorPosition] + ld [wMenuCursorPosition], a + +.Select: + call .GetInput + jr c, .Exit + call ._DrawMenuAccount + ld a, [wMenuCursorPosition] + ld [wBattleMenuCursorPosition], a + call PlayClickSFX + call PlaceHollowCursor + call .OpenMenu + +; Menu items have different return functions. +; For example, saving exits the menu. + ld hl, .MenuReturns + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.MenuReturns: + dw .Reopen + dw .Exit + dw .ExitMenuCallFuncCloseText + dw .ExitMenuRunScriptCloseText + dw .ExitMenuRunScript + dw .ReturnEnd + dw .ReturnRedraw + +.Exit: + ldh a, [hOAMUpdate] + push af + ld a, 1 + ldh [hOAMUpdate], a + call LoadFontsExtra + pop af + ldh [hOAMUpdate], a +.ReturnEnd: + call ExitMenu +.ReturnEnd2: + call CloseText + call UpdateTimePals + ret + +.GetInput: +; Return carry on exit, and no-carry on selection. + xor a + ldh [hBGMapMode], a + call ._DrawMenuAccount + call SetUpMenu + ld a, $ff + ld [wMenuSelection], a +.loop + call .PrintMenuAccount + call GetScrollingMenuJoypad + ld a, [wMenuJoypad] + cp B_BUTTON + jr z, .b + cp A_BUTTON + jr z, .a + jr .loop +.a + call PlayClickSFX + and a + ret +.b + scf + ret + +.ExitMenuRunScript: + call ExitMenu + ld a, HMENURETURN_SCRIPT + ldh [hMenuReturn], a + ret + +.ExitMenuRunScriptCloseText: + call ExitMenu + ld a, HMENURETURN_SCRIPT + ldh [hMenuReturn], a + jr .ReturnEnd2 + +.ExitMenuCallFuncCloseText: + call ExitMenu + ld hl, wQueuedScriptAddr + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wQueuedScriptBank] + rst FarCall + jr .ReturnEnd2 + +.ReturnRedraw: + call .Clear + jp .Reopen + +.Clear: + call ClearBGPalettes + call ExitMenu + call ReloadTilesetAndPalettes + call .DrawMenuAccount + call DrawVariableLengthMenuBox + call .DrawBugContestStatus + call UpdateSprites + call FinishExitMenu + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 10, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default selection + +.ContestMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 10, 2, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default selection + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_WRAP | STATICMENU_ENABLE_START ; flags + dn 0, 0 ; rows, columns + dw wMenuItemsList + dw .MenuString + dw .Items + +.Items: +; entries correspond to STARTMENUITEM_* constants + dw StartMenu_Pokedex, .PokedexString, .PokedexDesc + dw StartMenu_Pokemon, .PartyString, .PartyDesc + dw StartMenu_Pack, .PackString, .PackDesc + dw StartMenu_Status, .StatusString, .StatusDesc + dw StartMenu_Save, .SaveString, .SaveDesc + dw StartMenu_Option, .OptionString, .OptionDesc + dw StartMenu_Exit, .ExitString, .ExitDesc + dw StartMenu_Pokegear, .PokegearString, .PokegearDesc + dw StartMenu_Quit, .QuitString, .QuitDesc + +.PokedexString: db "#DEX@" +.PartyString: db "#MON@" +.PackString: db "PACK@" +.StatusString: db "@" +.SaveString: db "SAVE@" +.OptionString: db "OPTION@" +.ExitString: db "EXIT@" +.PokegearString: db "GEAR@" +.QuitString: db "QUIT@" + +.PokedexDesc: + db "#MON" + next "database@" + +.PartyDesc: + db "Party " + next "status@" + +.PackDesc: + db "Contains" + next "items@" + +.PokegearDesc: + db "Trainer's" + next "key device@" + +.StatusDesc: + db "Your own" + next "status@" + +.SaveDesc: + db "Save your" + next "progress@" + +.OptionDesc: + db "Change" + next "settings@" + +.ExitDesc: + db "Close this" + next "menu@" + +.QuitDesc: + db "Quit and" + next "be judged.@" + +.OpenMenu: + ld a, [wMenuSelection] + call .GetMenuAccountTextPointer + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.MenuString: + push de + ld a, [wMenuSelection] + call .GetMenuAccountTextPointer + inc hl + inc hl + ld a, [hli] + ld d, [hl] + ld e, a + pop hl + call PlaceString + ret + +.MenuDesc: + push de + ld a, [wMenuSelection] + cp $ff + jr z, .none + call .GetMenuAccountTextPointer +rept 4 + inc hl +endr + ld a, [hli] + ld d, [hl] + ld e, a + pop hl + call PlaceString + ret +.none + pop de + ret + +.GetMenuAccountTextPointer: + ld e, a + ld d, 0 + ld hl, wMenuDataPointerTableAddr + ld a, [hli] + ld h, [hl] + ld l, a +rept 6 + add hl, de +endr + ret + +.SetUpMenuItems: + xor a + ld [wWhichIndexSet], a + call .FillMenuList + + ld hl, wStatusFlags + bit STATUSFLAGS_POKEDEX_F, [hl] + jr z, .no_pokedex + ld a, STARTMENUITEM_POKEDEX + call .AppendMenuList +.no_pokedex + + ld a, [wPartyCount] + and a + jr z, .no_pokemon + ld a, STARTMENUITEM_POKEMON + call .AppendMenuList +.no_pokemon + + ld a, [wLinkMode] + and a + jr nz, .no_pack + ld hl, wStatusFlags2 + bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] + jr nz, .no_pack + ld a, STARTMENUITEM_PACK + call .AppendMenuList +.no_pack + + ld hl, wPokegearFlags + bit POKEGEAR_OBTAINED_F, [hl] + jr z, .no_pokegear + ld a, STARTMENUITEM_POKEGEAR + call .AppendMenuList +.no_pokegear + + ld a, STARTMENUITEM_STATUS + call .AppendMenuList + + ld a, [wLinkMode] + and a + jr nz, .no_save + ld hl, wStatusFlags2 + bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] + ld a, STARTMENUITEM_QUIT + jr nz, .write + ld a, STARTMENUITEM_SAVE +.write + call .AppendMenuList +.no_save + + ld a, STARTMENUITEM_OPTION + call .AppendMenuList + ld a, STARTMENUITEM_EXIT + call .AppendMenuList + ld a, c + ld [wMenuItemsList], a + ret + +.FillMenuList: + xor a + ld hl, wMenuItemsList + ld [hli], a + ld a, -1 + ld bc, wMenuItemsListEnd - (wMenuItemsList + 1) + call ByteFill + ld de, wMenuItemsList + 1 + ld c, 0 + ret + +.AppendMenuList: + ld [de], a + inc de + inc c + ret + +.DrawMenuAccount: + jp ._DrawMenuAccount + +.PrintMenuAccount: + call .IsMenuAccountOn + ret z + call ._DrawMenuAccount + decoord 0, 14 + jp .MenuDesc + +._DrawMenuAccount: + call .IsMenuAccountOn + ret z + hlcoord 0, 13 + lb bc, 5, 10 + call ClearBox + hlcoord 0, 13 + ld b, 3 + ld c, 8 + jp TextboxPalette + +.IsMenuAccountOn: + ld a, [wOptions2] + and 1 << MENU_ACCOUNT + ret + +.DrawBugContestStatusBox: + ld hl, wStatusFlags2 + bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] + ret z + farcall StartMenu_DrawBugContestStatusBox + ret + +.DrawBugContestStatus: + ld hl, wStatusFlags2 + bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] + jr nz, .contest + ret +.contest + farcall StartMenu_PrintBugContestStatus + ret + +StartMenu_Exit: +; Exit the menu. + + ld a, 1 + ret + +StartMenu_Quit: +; Retire from the bug catching contest. + + ld hl, .StartMenuContestEndText + call StartMenuYesNo + jr c, .DontEndContest + ld a, BANK(BugCatchingContestReturnToGateScript) + ld hl, BugCatchingContestReturnToGateScript + call FarQueueScript + ld a, 4 + ret + +.DontEndContest: + ld a, 0 + ret + +.StartMenuContestEndText: + text_far _StartMenuContestEndText + text_end + +StartMenu_Save: +; Save the game. + + call BufferScreen + farcall SaveMenu + jr nc, .saved + ld a, 0 + ret + +.saved + ld a, 1 + ret + +StartMenu_Option: +; Game options. + + call FadeToMenu + farcall Option + ld a, 6 + ret + +StartMenu_Status: +; Player status. + + call FadeToMenu + farcall TrainerCard + call CloseSubmenu + ld a, 0 + ret + +StartMenu_Pokedex: + ld a, [wPartyCount] + and a + jr z, .empty + + call FadeToMenu + farcall Pokedex + call CloseSubmenu + +.empty + ld a, 0 + ret + +StartMenu_Pokegear: + call FadeToMenu + farcall PokeGear + call CloseSubmenu + ld a, 0 + ret + +StartMenu_Pack: + call FadeToMenu + farcall Pack + ld a, [wPackUsedItem] + and a + jr nz, .used_item + call CloseSubmenu + ld a, 0 + ret + +.used_item + call ExitAllMenus + ld a, 4 + ret + +StartMenu_Pokemon: + ld a, [wPartyCount] + and a + jr z, .return + + call FadeToMenu + +.choosemenu + xor a + ld [wPartyMenuActionText], a ; Choose a POKéMON. + call ClearBGPalettes + +.menu + farcall LoadPartyMenuGFX + farcall InitPartyMenuWithCancel + farcall InitPartyMenuGFX + +.menunoreload + farcall WritePartyMenuTilemap + farcall PrintPartyMenuText + call WaitBGMap + call SetPalettes ; load regular palettes? + call DelayFrame + farcall PartyMenuSelect + jr c, .return ; if cancelled or pressed B + + call PokemonActionSubmenu + cp 3 + jr z, .menu + cp 0 + jr z, .choosemenu + cp 1 + jr z, .menunoreload + cp 2 + jr z, .quit + +.return + call CloseSubmenu + ld a, 0 + ret + +.quit + ld a, b + push af + call ExitAllMenus + pop af + ret diff --git a/engine/menus/trainer_card.asm b/engine/menus/trainer_card.asm new file mode 100644 index 0000000..b1b83eb --- /dev/null +++ b/engine/menus/trainer_card.asm @@ -0,0 +1,626 @@ +; TrainerCard.Jumptable indexes + const_def + const TRAINERCARDSTATE_PAGE1_LOADGFX ; 0 + const TRAINERCARDSTATE_PAGE1_JOYPAD ; 1 + const TRAINERCARDSTATE_PAGE2_LOADGFX ; 2 + const TRAINERCARDSTATE_PAGE2_JOYPAD ; 3 + const TRAINERCARDSTATE_PAGE3_LOADGFX ; 4 + const TRAINERCARDSTATE_PAGE3_JOYPAD ; 5 + const TRAINERCARDSTATE_QUIT ; 6 + +TrainerCard: + ld a, [wVramState] + push af + xor a + ld [wVramState], a + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + call .InitRAM +.loop + call UpdateTime + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .quit + ldh a, [hJoyLast] + and B_BUTTON + jr nz, .quit + call .RunJumptable + call DelayFrame + jr .loop + +.quit + pop af + ld [wOptions], a + pop af + ld [wVramState], a + ret + +.InitRAM: + call ClearBGPalettes + call ClearSprites + call ClearTilemap + call DisableLCD + + farcall GetCardPic + + ld hl, CardRightCornerGFX + ld de, vTiles2 tile $1c + ld bc, 1 tiles + ld a, BANK(CardRightCornerGFX) + call FarCopyBytes + + ld hl, CardStatusGFX + ld de, vTiles2 tile $29 + ld bc, 86 tiles + ld a, BANK(CardStatusGFX) + call FarCopyBytes + + call TrainerCard_PrintTopHalfOfCard + + hlcoord 0, 8 + ld d, 6 + call TrainerCard_InitBorder + + call EnableLCD + call WaitBGMap + ld b, SCGB_TRAINER_CARD + call GetSGBLayout + call SetPalettes + call WaitBGMap + ld hl, wJumptableIndex + xor a ; TRAINERCARDSTATE_PAGE1_LOADGFX + ld [hli], a ; wJumptableIndex + ld [hli], a ; wTrainerCardBadgeFrameCounter + ld [hli], a ; wTrainerCardBadgeTileID + ld [hl], a ; wTrainerCardBadgeAttributes + ret + +.RunJumptable: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: +; entries correspond to TRAINERCARDSTATE_* constants + dw TrainerCard_Page1_LoadGFX + dw TrainerCard_Page1_Joypad + dw TrainerCard_Page2_LoadGFX + dw TrainerCard_Page2_Joypad + dw TrainerCard_Page3_LoadGFX + dw TrainerCard_Page3_Joypad + dw TrainerCard_Quit + +TrainerCard_IncrementJumptable: + ld hl, wJumptableIndex + inc [hl] + ret + +TrainerCard_Quit: + ld hl, wJumptableIndex + set 7, [hl] + ret + +TrainerCard_Page1_LoadGFX: + call ClearSprites + hlcoord 0, 8 + ld d, 6 + call TrainerCard_InitBorder + call WaitBGMap + ld de, CardStatusGFX + ld hl, vTiles2 tile $29 + lb bc, BANK(CardStatusGFX), 86 + call Request2bpp + call TrainerCard_Page1_PrintDexCaught_GameTime + call TrainerCard_IncrementJumptable + ret + +TrainerCard_Page1_Joypad: + call TrainerCard_Page1_PrintGameTime + ld hl, hJoyLast + ld a, [hl] + and D_RIGHT | A_BUTTON + jr nz, .pressed_right_a + ret + +.pressed_right_a + ld a, TRAINERCARDSTATE_PAGE2_LOADGFX + ld [wJumptableIndex], a + ret + +.KantoBadgeCheck: ; unreferenced + ld a, [wKantoBadges] + and a + ret z + ld a, TRAINERCARDSTATE_PAGE3_LOADGFX + ld [wJumptableIndex], a + ret + +TrainerCard_Page2_LoadGFX: + call ClearSprites + hlcoord 0, 8 + ld d, 6 + call TrainerCard_InitBorder + call WaitBGMap + ld de, LeaderGFX + ld hl, vTiles2 tile $29 + lb bc, BANK(LeaderGFX), 86 + call Request2bpp + ld de, BadgeGFX + ld hl, vTiles0 tile $00 + lb bc, BANK(BadgeGFX), 44 + call Request2bpp + call TrainerCard_Page2_3_InitObjectsAndStrings + call TrainerCard_IncrementJumptable + ret + +TrainerCard_Page2_Joypad: + ld hl, TrainerCard_JohtoBadgesOAM + call TrainerCard_Page2_3_AnimateBadges + ld hl, hJoyLast + ld a, [hl] + and A_BUTTON + jr nz, .Quit + ld a, [hl] + and D_LEFT + jr nz, .d_left + ret + +.d_left + ld a, TRAINERCARDSTATE_PAGE1_LOADGFX + ld [wJumptableIndex], a + ret + +.KantoBadgeCheck: ; unreferenced + ld a, [wKantoBadges] + and a + ret z + ld a, TRAINERCARDSTATE_PAGE3_LOADGFX + ld [wJumptableIndex], a + ret + +.Quit: + ld a, TRAINERCARDSTATE_QUIT + ld [wJumptableIndex], a + ret + +TrainerCard_Page3_LoadGFX: + call ClearSprites + hlcoord 0, 8 + ld d, 6 + call TrainerCard_InitBorder + call WaitBGMap + ld de, LeaderGFX2 + ld hl, vTiles2 tile $29 + lb bc, BANK(LeaderGFX2), 86 + call Request2bpp + ld de, BadgeGFX2 + ld hl, vTiles0 tile $00 + lb bc, BANK(BadgeGFX2), 44 + call Request2bpp + call TrainerCard_Page2_3_InitObjectsAndStrings + call TrainerCard_IncrementJumptable + ret + +TrainerCard_Page3_Joypad: + ld hl, TrainerCard_JohtoBadgesOAM + call TrainerCard_Page2_3_AnimateBadges + ld hl, hJoyLast + ld a, [hl] + and D_LEFT + jr nz, .left + ld a, [hl] + and D_RIGHT + jr nz, .right + ret + +.left + ld a, TRAINERCARDSTATE_PAGE2_LOADGFX + ld [wJumptableIndex], a + ret + +.right + ld a, TRAINERCARDSTATE_PAGE1_LOADGFX + ld [wJumptableIndex], a + ret + +TrainerCard_PrintTopHalfOfCard: + hlcoord 0, 0 + ld d, 5 + call TrainerCard_InitBorder + hlcoord 2, 2 + ld de, .Name_Money + call PlaceString + hlcoord 2, 4 + ld de, .ID_No + call TrainerCardSetup_PlaceTilemapString + hlcoord 7, 2 + ld de, wPlayerName + call PlaceString + hlcoord 5, 4 + ld de, wPlayerID + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + hlcoord 7, 6 + ld de, wMoney + lb bc, PRINTNUM_MONEY | 3, 6 + call PrintNum + hlcoord 1, 3 + ld de, .HorizontalDivider + call TrainerCardSetup_PlaceTilemapString + hlcoord 14, 1 + lb bc, 5, 7 + xor a + ldh [hGraphicStartTile], a + predef PlaceGraphic + ret + +.Name_Money: + db "NAME/" + next "" + next "MONEY@" + +.ID_No: + db $27, $28, -1 ; ID NO + +.HorizontalDivider: + db $25, $25, $25, $25, $25, $25, $25, $25, $25, $25, $25, $25, $26, -1 ; ____________> + +TrainerCard_Page1_PrintDexCaught_GameTime: + hlcoord 2, 10 + ld de, .Dex_PlayTime + call PlaceString + hlcoord 10, 15 + ld de, .Badges + call PlaceString + ld hl, wPokedexCaught + ld bc, wEndPokedexCaught - wPokedexCaught + call CountSetBits16 + ld a, c + ld c, b + ld b, a + push bc + ld hl, sp + 0 + ld d, h + ld e, l + hlcoord 15, 10 + lb bc, 2, 3 + call PrintNum + pop bc + call TrainerCard_Page1_PrintGameTime + hlcoord 2, 8 + ld de, .StatusTilemap + call TrainerCardSetup_PlaceTilemapString + ld a, [wStatusFlags] + bit STATUSFLAGS_POKEDEX_F, a + ret nz + hlcoord 1, 9 + lb bc, 2, 17 + call ClearBox + ret + +.Dex_PlayTime: + db "#DEX" + next "PLAY TIME@" + +.Unused: ; unreferenced + db "@" + +.Badges: + db " BADGES▶@" + +.StatusTilemap: + db $29, $2a, $2b, $2c, $2d, -1 + +TrainerCard_Page2_3_InitObjectsAndStrings: + hlcoord 2, 8 + ld de, .BadgesTilemap + call TrainerCardSetup_PlaceTilemapString + hlcoord 2, 10 + ld a, $29 + ld c, 4 +.loop + call TrainerCard_Page2_3_PlaceLeadersFaces +rept 4 + inc hl +endr + dec c + jr nz, .loop + hlcoord 2, 13 + ld a, $51 + ld c, 4 +.loop2 + call TrainerCard_Page2_3_PlaceLeadersFaces +rept 4 + inc hl +endr + dec c + jr nz, .loop2 + xor a + ld [wTrainerCardBadgeFrameCounter], a + ld hl, TrainerCard_JohtoBadgesOAM + call TrainerCard_Page2_3_OAMUpdate + ret + +.BadgesTilemap: + db $79, $7a, $7b, $7c, $7d, -1 ; "BADGES" + +TrainerCardSetup_PlaceTilemapString: +.loop + ld a, [de] + cp -1 + ret z + ld [hli], a + inc de + jr .loop + +TrainerCard_InitBorder: + ld e, SCREEN_WIDTH +.loop1 + ld a, $23 + ld [hli], a + dec e + jr nz, .loop1 + + ld a, $23 + ld [hli], a + + ld e, SCREEN_WIDTH - 3 + ld a, " " +.loop2 + ld [hli], a + dec e + jr nz, .loop2 + + ld a, $1c + ld [hli], a + ld a, $23 + ld [hli], a + +.loop3 + ld a, $23 + ld [hli], a + + ld e, SCREEN_WIDTH - 2 + ld a, " " +.loop4 + ld [hli], a + dec e + jr nz, .loop4 + + ld a, $23 + ld [hli], a + + dec d + jr nz, .loop3 + + ld a, $23 + ld [hli], a + ld a, $24 + ld [hli], a + + ld e, SCREEN_WIDTH - 3 + ld a, " " +.loop5 + ld [hli], a + dec e + jr nz, .loop5 + + ld a, $23 + ld [hli], a + + ld e, SCREEN_WIDTH +.loop6 + ld a, $23 + ld [hli], a + dec e + jr nz, .loop6 + ret + +TrainerCard_Page2_3_PlaceLeadersFaces: + push de + push hl + ld [hli], a + inc a + ld [hli], a + inc a + ld [hli], a + inc a + ld [hli], a + inc a + ld de, SCREEN_WIDTH - 3 + add hl, de + ld [hli], a + inc a + ld [hli], a + inc a + ld [hli], a + inc a + ld de, SCREEN_WIDTH - 3 + add hl, de + ld [hli], a + inc a + ld [hli], a + inc a + ld [hli], a + inc a + pop hl + pop de + ret + +TrainerCard_Page1_PrintGameTime: + hlcoord 11, 12 + ld de, wGameTimeHours + lb bc, 2, 4 + call PrintNum + inc hl + ld de, wGameTimeMinutes + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ldh a, [hVBlankCounter] + and $1f + ret nz + hlcoord 15, 12 + ld a, [hl] + xor " " ^ $2e ; alternate between space and small colon ($2e) tiles + ld [hl], a + ret + +TrainerCard_Page2_3_AnimateBadges: + ldh a, [hVBlankCounter] + and %111 + ret nz + ld a, [wTrainerCardBadgeFrameCounter] + inc a + and %111 + ld [wTrainerCardBadgeFrameCounter], a + jr TrainerCard_Page2_3_OAMUpdate + +TrainerCard_Page2_3_OAMUpdate: +; copy flag array pointer + ld a, [hli] + ld e, a + ld a, [hli] +; get flag array + ld d, a + ld a, [de] + ld c, a + ld de, wShadowOAMSprite00 + ld b, NUM_JOHTO_BADGES +.loop + srl c + push bc + jr nc, .skip_badge + push hl + ld a, [hli] ; y + ld b, a + ld a, [hli] ; x + ld c, a + ld a, [hli] ; pal + ld [wTrainerCardBadgeAttributes], a + ld a, [wTrainerCardBadgeFrameCounter] + add l + ld l, a + ld a, 0 + adc h + ld h, a + ld a, [hl] + ld [wTrainerCardBadgeTileID], a + call .PrepOAM + pop hl +.skip_badge + ld bc, $b ; 3 + 2 * 4 + add hl, bc + pop bc + dec b + jr nz, .loop + ret + +.PrepOAM: + ld a, [wTrainerCardBadgeTileID] + and 1 << 7 + jr nz, .xflip + ld hl, .facing1 + jr .loop2 + +.xflip + ld hl, .facing2 +.loop2 + ld a, [hli] + cp -1 + ret z + add b + ld [de], a ; y + inc de + + ld a, [hli] + add c + ld [de], a ; x + inc de + + ld a, [wTrainerCardBadgeTileID] + and ~(1 << 7) + add [hl] + ld [de], a ; tile id + inc hl + inc de + + ld a, [wTrainerCardBadgeAttributes] + add [hl] + ld [de], a ; attributes + inc hl + inc de + jr .loop2 + +.facing1 + dbsprite 0, 0, 0, 0, $00, 0 + dbsprite 1, 0, 0, 0, $01, 0 + dbsprite 0, 1, 0, 0, $02, 0 + dbsprite 1, 1, 0, 0, $03, 0 + db -1 + +.facing2 + dbsprite 0, 0, 0, 0, $01, 0 | X_FLIP + dbsprite 1, 0, 0, 0, $00, 0 | X_FLIP + dbsprite 0, 1, 0, 0, $03, 0 | X_FLIP + dbsprite 1, 1, 0, 0, $02, 0 | X_FLIP + db -1 + +TrainerCard_JohtoBadgesOAM: +; Template OAM data for each badge on the trainer card. +; Format: + ; y, x, palette + ; cycle 1: face tile, in1 tile, in2 tile, in3 tile + ; cycle 2: face tile, in1 tile, in2 tile, in3 tile + + dw wJohtoBadges + + ; Zephyrbadge + db $68, $18, 0 + db $00, $20, $24, $20 | (1 << 7) + db $00, $20, $24, $20 | (1 << 7) + + ; Hivebadge + db $68, $38, 0 + db $04, $20, $24, $20 | (1 << 7) + db $04, $20, $24, $20 | (1 << 7) + + ; Plainbadge + db $68, $58, 0 + db $08, $20, $24, $20 | (1 << 7) + db $08, $20, $24, $20 | (1 << 7) + + ; Fogbadge + db $68, $78, 0 + db $0c, $20, $24, $20 | (1 << 7) + db $0c, $20, $24, $20 | (1 << 7) + + ; Mineralbadge + db $80, $38, 0 + db $10, $20, $24, $20 | (1 << 7) + db $10, $20, $24, $20 | (1 << 7) + + ; Stormbadge + db $80, $18, 0 + db $14, $20, $24, $20 | (1 << 7) + db $14, $20, $24, $20 | (1 << 7) + + ; Glacierbadge + db $80, $58, 0 + db $18, $20, $24, $20 | (1 << 7) + db $18, $20, $24, $20 | (1 << 7) + + ; Risingbadge + ; X-flips on alternate cycles. + db $80, $78, 0 + db $1c, $20, $24, $20 | (1 << 7) + db $1c | (1 << 7), $20, $24, $20 | (1 << 7) + +CardStatusGFX: INCBIN "gfx/trainer_card/card_status.2bpp" + +LeaderGFX: INCBIN "gfx/trainer_card/leaders.2bpp" +LeaderGFX2: INCBIN "gfx/trainer_card/leaders.2bpp" +BadgeGFX: INCBIN "gfx/trainer_card/badges.2bpp" +BadgeGFX2: INCBIN "gfx/trainer_card/badges.2bpp" + +CardRightCornerGFX: INCBIN "gfx/trainer_card/card_right_corner.2bpp" diff --git a/engine/movie/credits.asm b/engine/movie/credits.asm new file mode 100644 index 0000000..304bd06 --- /dev/null +++ b/engine/movie/credits.asm @@ -0,0 +1,612 @@ +SECTION "Credits", ROMX + +Credits:: + bit 6, b ; Hall Of Fame + ld a, $0 + jr z, .okay + ld a, $40 +.okay + ld [wJumptableIndex], a + + ldh a, [rSVBK] + push af + ld a, BANK(wGBCPalettes) + ldh [rSVBK], a + + call ClearBGPalettes + call ClearTilemap + call ClearSprites + + ld hl, wCreditsBlankFrame2bpp + ld c, (wCreditsBlankFrame2bppEnd - wCreditsBlankFrame2bpp) / 2 + ld de, `22222222 ; eight pixels, each color #2 (dark) + +; Fill wCreditsBlankFrame2bpp with 4x4=16 tiles, all solid dark color +; (the same color used for the four border frame mons' backgrounds) + +.load_loop + ld a, e + ld [hli], a + ld a, d + ld [hli], a + dec c + jr nz, .load_loop + + ld de, CreditsBorderGFX + ld hl, vTiles2 tile $20 + lb bc, BANK(CreditsBorderGFX), 9 + call Request2bpp + + ld de, CopyrightGFX + ld hl, vTiles2 tile $60 + lb bc, BANK(CopyrightGFX), 29 + call Request2bpp + + ld de, TheEndGFX + ld hl, vTiles2 tile $40 + lb bc, BANK(TheEndGFX), 16 + call Request2bpp + + ld a, $ff + ld [wCreditsBorderFrame], a + xor a + ld [wCreditsBorderMon], a + + call Credits_LoadBorderGFX + ld e, l + ld d, h + ld hl, vTiles2 + lb bc, BANK(CreditsMonsGFX), 16 + call Request2bpp + + call ConstructCreditsTilemap + xor a + ld [wCreditsLYOverride], a + + ld hl, wLYOverrides + ld bc, $100 + xor a + call ByteFill + + ld a, LOW(rSCX) + ldh [hLCDCPointer], a + + call GetCreditsPalette + call SetPalettes +; BUG: Credits sequence changes move selection menu behavior (see docs/bugs_and_glitches.md) + ldh a, [hVBlank] + push af + ld a, $5 + ldh [hVBlank], a + ld a, TRUE + ldh [hInMenu], a + xor a + ldh [hBGMapMode], a + ld [wCreditsPos], a + ld [wCreditsPos + 1], a + ld [wCreditsTimer], a + +.execution_loop + call Credits_HandleBButton + call Credits_HandleAButton + jr nz, .exit_credits + + call Credits_Jumptable + call DelayFrame + jr .execution_loop + +.exit_credits + call ClearBGPalettes + xor a + ldh [hLCDCPointer], a + ldh [hBGMapAddress], a + pop af + ldh [hVBlank], a + pop af + ldh [rSVBK], a + ret + +Credits_HandleAButton: + ldh a, [hJoypadDown] + and A_BUTTON + ret z + ld a, [wJumptableIndex] + bit 7, a + ret + +Credits_HandleBButton: + ldh a, [hJoypadDown] + and B_BUTTON + ret z + ld a, [wJumptableIndex] + bit 6, a + ret z + ld hl, wCreditsPos + ld a, [hli] + cp $d + jr nc, .okay + ld a, [hli] + and a + ret z +.okay + ld hl, wCreditsTimer + ld a, [hl] + and a + ret z + dec [hl] + ret + +Credits_Jumptable: + ld a, [wJumptableIndex] + and $f + ld e, a + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: + dw ParseCredits + dw Credits_Next + dw Credits_Next + dw Credits_PrepBGMapUpdate + dw Credits_UpdateGFXRequestPath + dw Credits_RequestGFX + dw Credits_LYOverride + dw Credits_Next + dw Credits_Next + dw Credits_Next + dw Credits_UpdateGFXRequestPath + dw Credits_RequestGFX + dw Credits_LoopBack + +Credits_Next: + ld hl, wJumptableIndex + inc [hl] + ret + +Credits_LoopBack: + ld hl, wJumptableIndex + ld a, [hl] + and $f0 + ld [hl], a + ret + +Credits_PrepBGMapUpdate: + xor a + ldh [hBGMapMode], a + jp Credits_Next + +Credits_UpdateGFXRequestPath: + call Credits_LoadBorderGFX + ld a, l + ld [wRequested2bppSource], a + ld a, h + ld [wRequested2bppSource + 1], a + ld a, LOW(vTiles2) + ld [wRequested2bppDest], a + ld a, HIGH(vTiles2) + ld [wRequested2bppDest + 1], a + jr Credits_RequestGFX + +Credits_RequestGFX: + xor a + ldh [hBGMapMode], a + ld a, 8 + ld [wRequested2bppSize], a + jp Credits_Next + +Credits_LYOverride: + ldh a, [rLY] + cp $30 + jr c, Credits_LYOverride + ld a, [wCreditsLYOverride] + dec a + dec a + ld [wCreditsLYOverride], a + ld hl, wLYOverrides + $1f + call .Fill + ld hl, wLYOverrides + $87 + call .Fill + jp Credits_Next + +.Fill: + ld c, $8 +.loop + ld [hli], a + dec c + jr nz, .loop + ret + +ParseCredits: + ld hl, wJumptableIndex + bit 7, [hl] + jp nz, .done + +; Wait until the timer has run out to parse the next command. + ld hl, wCreditsTimer + ld a, [hl] + and a + jr z, .parse + +; One tick has passed. + dec [hl] + jp .done + +.parse +; First, let's clear the current text display, +; starting from line 5. + xor a + ldh [hBGMapMode], a + hlcoord 0, 5 + ld bc, SCREEN_WIDTH * 12 + ld a, " " + call ByteFill + +; Then read the script. + +.loop + call .get + +; Commands: + cp CREDITS_END + jp z, .end + cp CREDITS_WAIT + jr z, .wait + cp CREDITS_SCENE + jr z, .scene + cp CREDITS_CLEAR + jr z, .clear + cp CREDITS_MUSIC + jr z, .music + cp CREDITS_WAIT2 + jr z, .wait2 + cp CREDITS_THEEND + jr z, .theend + +; If it's not a command, it's a string identifier. + + push af + ld e, a + ld d, 0 + ld hl, CreditsStringsPointers + add hl, de + add hl, de + ld a, [hli] + ld d, [hl] + ld e, a + pop af + +; Strings spanning multiple lines have special cases. + + cp COPYRIGHT + jr z, .copyright + + cp STAFF + jr c, .staff + +; The rest start from line 6. + + hlcoord 0, 6 + jr .print + +.copyright + hlcoord 2, 6 + jr .print + +.staff + hlcoord 0, 6 + +.print +; Print strings spaced every two lines. + call .get + ld bc, SCREEN_WIDTH * 2 + call AddNTimes + call PlaceString + jr .loop + +.theend +; Display "The End" graphic. + call Credits_TheEnd + jr .loop + +.scene +; Update the scene number and corresponding palette. + call .get + ld [wCreditsBorderMon], a ; scene + xor a + ld [wCreditsBorderFrame], a ; frame + call GetCreditsPalette + call SetPalettes ; update hw pal registers + jr .loop + +.clear +; Clear the banner. + ld a, $ff + ld [wCreditsBorderFrame], a ; frame + jr .loop + +.music +; Play the credits music. + ld de, MUSIC_CREDITS + push de + ld de, MUSIC_NONE + call PlayMusic + call DelayFrame + pop de + call PlayMusic + jp .loop + +.wait2 +; Wait for some amount of ticks. + call .get + ld [wCreditsTimer], a + jr .done + +.wait +; Wait for some amount of ticks, and do something else. + call .get + ld [wCreditsTimer], a + + xor a + ldh [hBGMapThird], a + ld a, 1 + ldh [hBGMapMode], a + +.done + jp Credits_Next + +.end +; Stop execution. + ld hl, wJumptableIndex + set 7, [hl] + ld a, 32 + ld [wMusicFade], a + ld a, LOW(MUSIC_POST_CREDITS) + ld [wMusicFadeID], a + ld a, HIGH(MUSIC_POST_CREDITS) + ld [wMusicFadeID + 1], a + ret + +.get +; Get byte wCreditsPos from CreditsScript + push hl + push de + ld a, [wCreditsPos] + ld e, a + ld a, [wCreditsPos + 1] + ld d, a + ld hl, CreditsScript + add hl, de + + inc de + ld a, e + ld [wCreditsPos], a + ld a, d + ld [wCreditsPos + 1], a + ld a, [hl] + pop de + pop hl + ret + +ConstructCreditsTilemap: + xor a + ldh [hBGMapMode], a + ld a, $c + ldh [hBGMapAddress], a + + ld a, $28 + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + call ByteFill + + ld a, $7f + hlcoord 0, 4 + ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH + call ByteFill + + hlcoord 0, 4 + ld a, $24 + call DrawCreditsBorder + + hlcoord 0, 17 + ld a, $20 + call DrawCreditsBorder + + hlcoord 0, 0, wAttrmap + ld bc, 4 * SCREEN_WIDTH + xor a + call ByteFill + + hlcoord 0, 4, wAttrmap + ld bc, SCREEN_WIDTH + ld a, $1 + call ByteFill + + hlcoord 0, 5, wAttrmap + ld bc, 12 * SCREEN_WIDTH + ld a, $2 + call ByteFill + + hlcoord 0, 17, wAttrmap + ld bc, SCREEN_WIDTH + ld a, $1 + call ByteFill + + call WaitBGMap2 + xor a + ldh [hBGMapMode], a + ldh [hBGMapAddress], a + hlcoord 0, 0 + call .InitTopPortion + call WaitBGMap2 + ret + +.InitTopPortion: + ld b, 5 +.outer_loop + push hl + ld de, SCREEN_WIDTH - 3 + ld c, 4 + xor a +.inner_loop +rept 3 + ld [hli], a + inc a +endr + ld [hl], a + inc a + add hl, de + dec c + jr nz, .inner_loop + pop hl +rept 4 + inc hl +endr + dec b + jr nz, .outer_loop + ret + +DrawCreditsBorder: + ld c, SCREEN_WIDTH / 4 +.loop + push af +rept 3 + ld [hli], a + inc a +endr + ld [hli], a + pop af + dec c + jr nz, .loop + ret + +GetCreditsPalette: + call .GetPalAddress + + push hl + ld a, 0 + call .UpdatePals + pop hl + ret + +.GetPalAddress: +; Each set of palette data is 24 bytes long. + ld a, [wCreditsBorderMon] ; scene + and %11 + add a + add a ; * 8 + add a + ld e, a + ld d, 0 + ld hl, CreditsPalettes + add hl, de + add hl, de ; * 3 + add hl, de + ret + +.UpdatePals: +; Update the first three colors in both palette buffers. + push af + push hl + add LOW(wBGPals1) + ld e, a + ld a, 0 + adc HIGH(wBGPals1) + ld d, a + ld bc, 24 + call CopyBytes + + pop hl + pop af + add LOW(wBGPals2) + ld e, a + ld a, 0 + adc HIGH(wBGPals2) + ld d, a + ld bc, 24 + call CopyBytes + ret + +CreditsPalettes: +INCLUDE "gfx/credits/credits.pal" + +Credits_LoadBorderGFX: + ld hl, wCreditsBorderFrame + ld a, [hl] + cp $ff + jr z, .init + + and %11 + ld e, a + inc a + and %11 + ld [hl], a + ld a, [wCreditsBorderMon] + and %11 + add a + add a + add e + add a + ld e, a + ld d, 0 + ld hl, .Frames + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ret + +.init + ld hl, wCreditsBlankFrame2bpp + ret + +.Frames: + dw CreditsPichuGFX + dw CreditsPichuGFX + 16 tiles + dw CreditsPichuGFX + 32 tiles + dw CreditsPichuGFX + 48 tiles + + dw CreditsSmoochumGFX + dw CreditsSmoochumGFX + 16 tiles + dw CreditsSmoochumGFX + 32 tiles + dw CreditsSmoochumGFX + 48 tiles + + dw CreditsDittoGFX + dw CreditsDittoGFX + 16 tiles + dw CreditsDittoGFX + 32 tiles + dw CreditsDittoGFX + 48 tiles + + dw CreditsIgglybuffGFX + dw CreditsIgglybuffGFX + 16 tiles + dw CreditsIgglybuffGFX + 32 tiles + dw CreditsIgglybuffGFX + 48 tiles + +Credits_TheEnd: + ld a, $40 + hlcoord 6, 9 + call .Load + hlcoord 6, 10 +.Load: + ld c, 8 +.loop + ld [hli], a + inc a + dec c + jr nz, .loop + ret + +CreditsBorderGFX: INCBIN "gfx/credits/border.2bpp" + +CreditsMonsGFX: ; used only for BANK(CreditsMonsGFX) +CreditsPichuGFX: INCBIN "gfx/credits/pichu.2bpp" +CreditsSmoochumGFX: INCBIN "gfx/credits/smoochum.2bpp" +CreditsDittoGFX: INCBIN "gfx/credits/ditto.2bpp" +CreditsIgglybuffGFX: INCBIN "gfx/credits/igglybuff.2bpp" + +INCLUDE "data/credits_script.asm" +INCLUDE "data/credits_strings.asm" diff --git a/engine/movie/evolution_animation.asm b/engine/movie/evolution_animation.asm new file mode 100644 index 0000000..455192d --- /dev/null +++ b/engine/movie/evolution_animation.asm @@ -0,0 +1,360 @@ +EvolutionAnimation: + push hl + push de + push bc + ld a, [wCurSpecies] + push af + ldh a, [rOBP0] + push af + ld a, [wBaseSpecies] + push af + + call .EvolutionAnimation + + pop af + ld [wBaseSpecies], a + pop af + ldh [rOBP0], a + pop af + ld [wCurSpecies], a + pop bc + pop de + pop hl + + ld a, [wEvolutionCanceled] + and a + ret z + + scf + ret + +.EvolutionAnimation: + ld a, %11100100 + ldh [rOBP0], a + + ld de, MUSIC_NONE + call PlayMusic + + farcall ClearSpriteAnims + + ld de, .GFX + ld hl, vTiles0 + lb bc, BANK(.GFX), 8 + call Request2bpp + + xor a + ld [wLowHealthAlarm], a + call WaitBGMap + xor a + ldh [hBGMapMode], a + + ld a, [wEvolutionOldSpecies] + ld [wPlayerHPPal], a + + ld c, FALSE + call .GetSGBLayout + + ld a, [wEvolutionOldSpecies] + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call .PlaceFrontpic + + ld de, vTiles2 + ld hl, vTiles2 tile $31 + ld bc, 7 * 7 + call Request2bpp + + ld a, 7 * 7 + ld [wEvolutionPicOffset], a + call .ReplaceFrontpic + ld a, [wEvolutionNewSpecies] + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call .LoadFrontpic + + ld a, [wEvolutionOldSpecies] + ld [wCurPartySpecies], a + ld [wCurSpecies], a + + ld a, 1 + ldh [hBGMapMode], a + + call .check_statused + jr c, .skip_cry + ld a, [wEvolutionOldSpecies] + call PlayMonCry +.skip_cry + + ld de, MUSIC_EVOLUTION + call PlayMusic + + ld c, 80 + call DelayFrames + + ld c, TRUE + call .GetSGBLayout + + call .AnimationSequence + jr c, .cancel_evo + + ld a, -7 * 7 + ld [wEvolutionPicOffset], a + call .ReplaceFrontpic + + xor a + ld [wEvolutionCanceled], a + + ld a, [wEvolutionNewSpecies] + ld [wPlayerHPPal], a + + ld c, FALSE + call .GetSGBLayout + + call .PlayEvolvedSFX + farcall ClearSpriteAnims + call .check_statused + jr c, .no_anim + + ld a, [wBoxAlignment] + push af + ld a, $1 + ld [wBoxAlignment], a + ld a, [wCurPartySpecies] + push af + + ld a, [wPlayerHPPal] + ld [wCurPartySpecies], a + hlcoord 7, 2 + ld d, $0 + ld e, ANIM_MON_EVOLVE + predef AnimateFrontpic + + pop af + ld [wCurPartySpecies], a + pop af + ld [wBoxAlignment], a + ret + +.no_anim + ret + +.cancel_evo + ld a, TRUE + ld [wEvolutionCanceled], a + + ld a, [wEvolutionOldSpecies] + ld [wPlayerHPPal], a + + ld c, FALSE + call .GetSGBLayout + + call .PlayEvolvedSFX + farcall ClearSpriteAnims + call .check_statused + ret c + + ld a, [wPlayerHPPal] + call PlayMonCry + ret + +.GetSGBLayout: + ld b, SCGB_EVOLUTION + jp GetSGBLayout + +.PlaceFrontpic: + call GetBaseData + hlcoord 7, 2 + jp PrepMonFrontpic + +.LoadFrontpic: + call GetBaseData + ld a, $1 + ld [wBoxAlignment], a + ld de, vTiles2 + predef GetAnimatedFrontpic + xor a + ld [wBoxAlignment], a + ret + +.AnimationSequence: + call ClearJoypad + lb bc, 1, 2 * 7 ; flash b times, wait c frames in between +.loop + push bc + call .WaitFrames_CheckPressedB + pop bc + jr c, .exit_sequence + push bc + call .Flash + pop bc + inc b + dec c + dec c + jr nz, .loop + and a + ret + +.exit_sequence + scf + ret + +.Flash: + ld a, -7 * 7 ; new stage + ld [wEvolutionPicOffset], a + call .ReplaceFrontpic + ld a, 7 * 7 ; previous stage + ld [wEvolutionPicOffset], a + call .ReplaceFrontpic + dec b + jr nz, .Flash + ret + +.ReplaceFrontpic: + push bc + xor a + ldh [hBGMapMode], a + hlcoord 7, 2 + lb bc, 7, 7 + ld de, SCREEN_WIDTH - 7 +.loop1 + push bc +.loop2 + ld a, [wEvolutionPicOffset] + add [hl] + ld [hli], a + dec c + jr nz, .loop2 + pop bc + add hl, de + dec b + jr nz, .loop1 + ld a, $1 + ldh [hBGMapMode], a + call WaitBGMap + pop bc + ret + +.WaitFrames_CheckPressedB: + call DelayFrame + push bc + call JoyTextDelay + ldh a, [hJoyDown] + pop bc + and B_BUTTON + jr nz, .pressed_b +.loop3 + dec c + jr nz, .WaitFrames_CheckPressedB + and a + ret + +.pressed_b + ld a, [wForceEvolution] + and a + jr nz, .loop3 + scf + ret + +.check_statused + ld a, [wCurPartyMon] + ld hl, wPartyMon1Species + call GetPartyLocation + ld b, h + ld c, l + farcall CheckFaintedFrzSlp + ret + +.PlayEvolvedSFX: + ld a, [wEvolutionCanceled] + and a + ret nz + ld de, SFX_EVOLVED + call PlaySFX + ld hl, wJumptableIndex + ld a, [hl] + push af + ld [hl], $0 +.loop4 + call .balls_of_light + jr nc, .done + call .AnimateBallsOfLight + jr .loop4 + +.done + ld c, 32 +.loop5 + call .AnimateBallsOfLight + dec c + jr nz, .loop5 + pop af + ld [wJumptableIndex], a + ret + +.balls_of_light + ld hl, wJumptableIndex + ld a, [hl] + cp 32 + ret nc + ld d, a + inc [hl] + and $1 + jr nz, .done_balls + ld e, $0 + call .GenerateBallOfLight + ld e, $10 + call .GenerateBallOfLight + +.done_balls + scf + ret + +.GenerateBallOfLight: + push de + depixel 9, 11 + ld a, SPRITE_ANIM_INDEX_EVOLUTION_BALL_OF_LIGHT + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld a, [wJumptableIndex] + and %1110 + sla a + pop de + add e + ld [hl], a + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], $0 + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $10 + ret + +.AnimateBallsOfLight: + push bc + callfar PlaySpriteAnimations + ; a = (([hVBlankCounter] + 4) / 2) % NUM_PALETTES + ldh a, [hVBlankCounter] + and %1110 + srl a + inc a + inc a + and $7 + ld b, a + ld hl, wShadowOAMSprite00Attributes + ld c, NUM_SPRITE_OAM_STRUCTS +.loop6 + ld a, [hl] + or b + ld [hli], a ; attributes +rept SPRITEOAMSTRUCT_LENGTH - 1 + inc hl +endr + dec c + jr nz, .loop6 + pop bc + call DelayFrame + ret + +.GFX: +INCBIN "gfx/evo/bubble_large.2bpp" +INCBIN "gfx/evo/bubble.2bpp" diff --git a/engine/movie/gbc_only.asm b/engine/movie/gbc_only.asm new file mode 100644 index 0000000..b5fdefe --- /dev/null +++ b/engine/movie/gbc_only.asm @@ -0,0 +1,133 @@ +GBCOnlyScreen: + ldh a, [hCGB] + and a + ret nz + + ld de, MUSIC_NONE + call PlayMusic + + call ClearTilemap + + ld hl, GBCOnlyGFX + ld de, wGBCOnlyDecompressBuffer + ldh a, [rSVBK] + push af + ld a, 0 ; this has the same effect as selecting bank 1 + ldh [rSVBK], a + call Decompress + pop af + ldh [rSVBK], a + + ld de, wGBCOnlyDecompressBuffer + ld hl, vTiles2 + lb bc, BANK(GBCOnlyGFX), 84 + call Get2bpp + + ld de, Font + ld hl, vTiles1 + lb bc, BANK(Font), $80 + call Get1bpp + + call DrawGBCOnlyScreen + + call WaitBGMap + +; better luck next time +.loop + call DelayFrame + jr .loop + +DrawGBCOnlyScreen: + call DrawGBCOnlyBorder + + ; Pokemon + hlcoord 3, 2 + ld b, 14 + ld c, 4 + ld a, $8 + call DrawGBCOnlyGraphic + + ; Crystal + hlcoord 5, 6 + ld b, 10 + ld c, 2 + ld a, $40 + call DrawGBCOnlyGraphic + + ld de, GBCOnlyString + hlcoord 1, 10 + call PlaceString + + ret + +DrawGBCOnlyBorder: + hlcoord 0, 0 + ld [hl], 0 ; top-left + + inc hl + ld a, 1 ; top + call .FillRow + + ld [hl], 2 ; top-right + + hlcoord 0, 1 + ld a, 3 ; left + call .FillColumn + + hlcoord 19, 1 + ld a, 4 ; right + call .FillColumn + + hlcoord 0, 17 + ld [hl], 5 ; bottom-left + + inc hl + ld a, 6 ; bottom + call .FillRow + + ld [hl], 7 ; bottom-right + ret + +.FillRow: + ld c, SCREEN_WIDTH - 2 +.next_column + ld [hli], a + dec c + jr nz, .next_column + ret + +.FillColumn: + ld de, SCREEN_WIDTH + ld c, SCREEN_HEIGHT - 2 +.next_row + ld [hl], a + add hl, de + dec c + jr nz, .next_row + ret + +DrawGBCOnlyGraphic: + ld de, SCREEN_WIDTH +.y + push bc + push hl +.x + ld [hli], a + inc a + dec b + jr nz, .x + pop hl + add hl, de + pop bc + dec c + jr nz, .y + ret + +GBCOnlyString: + db "This Game Pak is" + next "designed only for" + next "use on the" + next "Game Boy Color.@" + +GBCOnlyGFX: +INCBIN "gfx/sgb/gbc_only.2bpp.lz" diff --git a/engine/movie/init_hof_credits.asm b/engine/movie/init_hof_credits.asm new file mode 100644 index 0000000..11164ed --- /dev/null +++ b/engine/movie/init_hof_credits.asm @@ -0,0 +1,78 @@ +InitDisplayForHallOfFame: + call ClearBGPalettes + call ClearTilemap + call ClearSprites + call DisableLCD + call LoadStandardFont + call LoadFontsBattleExtra + hlbgcoord 0, 0 + ld bc, vBGMap1 - vBGMap0 + ld a, " " + call ByteFill + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + xor a + call ByteFill + xor a + ldh [hSCY], a + ldh [hSCX], a + call EnableLCD + ld hl, .SavingRecordText + call PrintText + call WaitBGMap2 + call SetPalettes + ret + +.SavingRecordText: + text_far _SavingRecordText + text_end + +InitDisplayForRedCredits: + call ClearBGPalettes + call ClearTilemap + call ClearSprites + call DisableLCD + call LoadStandardFont + call LoadFontsBattleExtra + hlbgcoord 0, 0 + ld bc, vBGMap1 - vBGMap0 + ld a, " " + call ByteFill + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + xor a + call ByteFill + ld hl, wBGPals1 + ld c, 4 tiles +.load_white_palettes + ld a, LOW(PALRGB_WHITE) + ld [hli], a + ld a, HIGH(PALRGB_WHITE) + ld [hli], a + dec c + jr nz, .load_white_palettes + xor a + ldh [hSCY], a + ldh [hSCX], a + call EnableLCD + call WaitBGMap2 + call SetPalettes + ret + +ResetDisplayBetweenHallOfFameMons: + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + ld hl, wDecompressScratch + ld bc, wScratchAttrmap - wDecompressScratch + ld a, " " + call ByteFill + hlbgcoord 0, 0 + ld de, wDecompressScratch + ld b, 0 + ld c, 4 tiles + call Request2bpp + pop af + ldh [rSVBK], a + ret diff --git a/engine/movie/intro.asm b/engine/movie/intro.asm new file mode 100644 index 0000000..caad297 --- /dev/null +++ b/engine/movie/intro.asm @@ -0,0 +1,1777 @@ +CrystalIntro: + ldh a, [rSVBK] + push af + ld a, BANK(wGBCPalettes) + ldh [rSVBK], a + ldh a, [hInMenu] + push af + ldh a, [hVBlank] + push af + call .InitRAMAddrs +.loop + call JoyTextDelay + ldh a, [hJoyLast] + and BUTTONS + jr nz, .ShutOffMusic + ld a, [wJumptableIndex] + bit 7, a + jr nz, .done + call IntroSceneJumper + farcall PlaySpriteAnimations + call DelayFrame + jp .loop + +.ShutOffMusic + ld de, MUSIC_NONE + call PlayMusic + +.done + call ClearBGPalettes + call ClearSprites + call ClearTilemap + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, 7 + ldh [hWX], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + pop af + ldh [hVBlank], a + pop af + ldh [hInMenu], a + pop af + ldh [rSVBK], a + ret + +.InitRAMAddrs: + xor a + ldh [hVBlank], a + ld a, $1 + ldh [hInMenu], a + xor a + ldh [hMapAnims], a + ld [wJumptableIndex], a + ret + +IntroSceneJumper: + jumptable IntroScenes, wJumptableIndex + +IntroScenes: + dw IntroScene1 + dw IntroScene2 + dw IntroScene3 + dw IntroScene4 + dw IntroScene5 + dw IntroScene6 + dw IntroScene7 + dw IntroScene8 + dw IntroScene9 + dw IntroScene10 + dw IntroScene11 + dw IntroScene12 + dw IntroScene13 + dw IntroScene14 + dw IntroScene15 + dw IntroScene16 + dw IntroScene17 + dw IntroScene18 + dw IntroScene19 + dw IntroScene20 + dw IntroScene21 + dw IntroScene22 + dw IntroScene23 + dw IntroScene24 + dw IntroScene25 + dw IntroScene26 + dw IntroScene27 + dw IntroScene28 + +NextIntroScene: + ld hl, wJumptableIndex + inc [hl] + ret + +IntroScene1: +; Setup the next scene. + call Intro_ClearBGPals + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + ld a, $1 + ldh [rVBK], a + ld hl, IntroUnownAAttrmap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ld a, $0 + ldh [rVBK], a + ld hl, IntroUnownsGFX + ld de, vTiles2 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + ld hl, IntroPulseGFX + ld de, vTiles0 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + ld hl, IntroUnownATilemap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, IntroUnownsPalette + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + ld hl, IntroUnownsPalette + ld de, wBGPals2 + ld bc, 16 palettes + call CopyBytes + pop af + ldh [rSVBK], a + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, 7 + ldh [hWX], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + farcall ClearSpriteAnims + call Intro_SetCGBPalUpdate + xor a + ld [wIntroSceneFrameCounter], a + ld [wIntroSceneTimer], a + call NextIntroScene + ret + +IntroScene2: +; First Unown (A) fades in, pulses, then fades out. + ld hl, wIntroSceneFrameCounter + ld a, [hl] + inc [hl] + cp $80 + jr nc, .endscene + cp $60 + jr nz, .nosound + push af + depixel 11, 11 + call CrystalIntro_InitUnownAnim + ld de, SFX_INTRO_UNOWN_1 + call PlaySFX + pop af +.nosound + ld [wIntroSceneTimer], a + xor a + call CrystalIntro_UnownFade + ret +.endscene + call NextIntroScene + ret + +IntroScene3: +; More setup. Transition to the outdoor scene. + call Intro_ClearBGPals + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + ld a, $1 + ldh [rVBK], a + ld hl, IntroBackgroundAttrmap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ld a, $0 + ldh [rVBK], a + ld hl, IntroBackgroundGFX + ld de, vTiles2 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + ld hl, IntroBackgroundTilemap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, IntroBackgroundPalette + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + ld hl, IntroBackgroundPalette + ld de, wBGPals2 + ld bc, 16 palettes + call CopyBytes + pop af + ldh [rSVBK], a + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, 7 + ldh [hWX], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + call Intro_ResetLYOverrides + call Intro_SetCGBPalUpdate + xor a + ld [wIntroSceneFrameCounter], a + call NextIntroScene + ret + +IntroScene4: +; Scroll the outdoor panorama for a bit. + call Intro_PerspectiveScrollBG + ld hl, wIntroSceneFrameCounter + ld a, [hl] + cp $80 + jr z, .endscene + inc [hl] + ret + +.endscene + call NextIntroScene + ret + +IntroScene5: +; Go back to the Unown. + call Intro_ClearBGPals + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + ldh [hLCDCPointer], a + ld a, $1 + ldh [rVBK], a + ld hl, IntroUnownHIAttrmap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ld a, $0 + ldh [rVBK], a + ld hl, IntroUnownsGFX + ld de, vTiles2 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + ld hl, IntroPulseGFX + ld de, vTiles0 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + ld hl, IntroUnownHITilemap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, IntroUnownsPalette + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + ld hl, IntroUnownsPalette + ld de, wBGPals2 + ld bc, 16 palettes + call CopyBytes + pop af + ldh [rSVBK], a + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, 7 + ldh [hWX], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + farcall ClearSpriteAnims + call Intro_SetCGBPalUpdate + xor a + ld [wIntroSceneFrameCounter], a + ld [wIntroSceneTimer], a + call NextIntroScene + ret + +IntroScene6: +; Two more Unown (I, H) fade in. + ld hl, wIntroSceneFrameCounter + ld a, [hl] + inc [hl] + cp $80 + jr nc, .endscene + cp $60 + jr z, .SecondUnown + cp $40 + jr nc, .StopUnown + cp $20 + jr z, .FirstUnown + jr .NoUnown + +.FirstUnown: + push af + depixel 7, 15 + call CrystalIntro_InitUnownAnim + ld de, SFX_INTRO_UNOWN_2 + call PlaySFX + pop af +.NoUnown: + ld [wIntroSceneTimer], a + xor a + call CrystalIntro_UnownFade + ret + +.SecondUnown: + push af + depixel 14, 6 + call CrystalIntro_InitUnownAnim + ld de, SFX_INTRO_UNOWN_1 + call PlaySFX + pop af +.StopUnown: + ld [wIntroSceneTimer], a + ld a, $1 + call CrystalIntro_UnownFade + ret + +.endscene + call NextIntroScene + ret + +IntroScene7: +; Back to the outdoor scene. + call Intro_ClearBGPals + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + + ld a, $1 + ldh [rVBK], a + ld hl, IntroBackgroundAttrmap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + + ld hl, IntroPichuWooperGFX + ld de, vTiles0 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + + ld a, $0 + ldh [rVBK], a + ld hl, IntroSuicuneRunGFX + ld de, vTiles0 tile $00 + call Intro_DecompressRequest2bpp_255Tiles + + ld hl, IntroBackgroundGFX + ld de, vTiles2 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + + ld hl, IntroBackgroundTilemap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + + ld hl, IntroBackgroundPalette + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + + ld hl, IntroBackgroundPalette + ld de, wBGPals2 + ld bc, 16 palettes + call CopyBytes + + pop af + ldh [rSVBK], a + + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, 7 + ldh [hWX], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + call Intro_ResetLYOverrides + farcall ClearSpriteAnims + depixel 13, 27, 4, 0 + ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE + call InitSpriteAnimStruct + ld a, $f0 + ld [wGlobalAnimXOffset], a + call Intro_SetCGBPalUpdate + xor a + ld [wIntroSceneFrameCounter], a + ld [wIntroSceneTimer], a + call NextIntroScene + ret + +IntroScene8: +; Scroll the scene, then show Suicune running across the screen. + ld hl, wIntroSceneFrameCounter + ld a, [hl] + inc [hl] + cp $40 + jr z, .suicune_sound + jr nc, .animate_suicune + call Intro_PerspectiveScrollBG + ret + +.suicune_sound + ld de, SFX_INTRO_SUICUNE_3 + call PlaySFX +.animate_suicune + ld a, [wGlobalAnimXOffset] + and a + jr z, .finish + sub $8 + ld [wGlobalAnimXOffset], a + ret + +.finish + ld de, SFX_INTRO_SUICUNE_2 + call PlaySFX + farcall DeinitializeAllSprites + call NextIntroScene + ret + +IntroScene9: +; Set up the next scene (same bg). + xor a + ldh [hLCDCPointer], a + call ClearSprites + hlcoord 0, 0, wAttrmap + ; first 12 rows have palette 1 + ld bc, 12 * SCREEN_WIDTH + ld a, $1 + call ByteFill + ; middle 3 rows have palette 2 + ld bc, 3 * SCREEN_WIDTH + ld a, $2 + call ByteFill + ; last three rows have palette 3 + ld bc, 3 * SCREEN_WIDTH + ld a, $3 + call ByteFill + ld a, $2 + ldh [hBGMapMode], a + call DelayFrame + call DelayFrame + call DelayFrame + ld a, LOW(vBGMap0 + $c) ; $c + ldh [hBGMapAddress], a + call DelayFrame + call DelayFrame + call DelayFrame + xor a + ldh [hBGMapMode], a + ldh [hBGMapAddress], a + ld [wGlobalAnimXOffset], a + xor a + ld [wIntroSceneFrameCounter], a + call NextIntroScene + ret + +IntroScene10: +; Wooper and Pichu enter. + call Intro_RustleGrass + ld hl, wIntroSceneFrameCounter + ld a, [hl] + inc [hl] + cp $c0 + jr z, .done + cp $20 + jr z, .wooper + cp $40 + jr z, .pichu + ret + +.pichu + depixel 21, 16, 1, 0 + ld a, SPRITE_ANIM_INDEX_INTRO_PICHU + call InitSpriteAnimStruct + ld de, SFX_INTRO_PICHU + call PlaySFX + ret + +.wooper + depixel 22, 6 + ld a, SPRITE_ANIM_INDEX_INTRO_WOOPER + call InitSpriteAnimStruct + ld de, SFX_INTRO_PICHU + call PlaySFX + ret +.done + call NextIntroScene + ret + +IntroScene11: +; Back to Unown again. + call Intro_ClearBGPals + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + ldh [hLCDCPointer], a + ld a, $1 + ldh [rVBK], a + ld hl, IntroUnownsAttrmap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ld a, $0 + ldh [rVBK], a + ld hl, IntroUnownsGFX + ld de, vTiles2 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + ld hl, IntroUnownsTilemap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, IntroUnownsPalette + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + ld hl, IntroUnownsPalette + ld de, wBGPals2 + ld bc, 16 palettes + call CopyBytes + pop af + ldh [rSVBK], a + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, 7 + ldh [hWX], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + farcall ClearSpriteAnims + call Intro_SetCGBPalUpdate + xor a + ld [wIntroSceneFrameCounter], a + ld [wIntroSceneTimer], a + call NextIntroScene + ret + +IntroScene12: +; Even more Unown. + call .PlayUnownSound + ld hl, wIntroSceneFrameCounter + ld a, [hl] + inc [hl] + cp $c0 + jr nc, .done + cp $80 + jr nc, .second_half +; first half + ld c, a + and $1f + sla a + ld [wIntroSceneTimer], a + ld a, c + and $e0 + srl a + swap a + call CrystalIntro_UnownFade + ret + +.second_half +; double speed + ld c, a + and $f + sla a + sla a + ld [wIntroSceneTimer], a + ld a, c + and $70 + or $40 + swap a + call CrystalIntro_UnownFade + ret + +.done + call NextIntroScene + ret + +.PlayUnownSound: + ld a, [wIntroSceneFrameCounter] + ld c, a + ld hl, .UnownSounds +.loop + ld a, [hli] + cp -1 + ret z + cp c + jr z, .playsound + inc hl + inc hl + jr .loop +.playsound + ld a, [hli] + ld d, [hl] + ld e, a + push de + call SFXChannelsOff + pop de + call PlaySFX + ret + +.UnownSounds: + dbw $00, SFX_INTRO_UNOWN_3 + dbw $20, SFX_INTRO_UNOWN_2 + dbw $40, SFX_INTRO_UNOWN_1 + dbw $60, SFX_INTRO_UNOWN_2 + dbw $80, SFX_INTRO_UNOWN_3 + dbw $90, SFX_INTRO_UNOWN_2 + dbw $a0, SFX_INTRO_UNOWN_1 + dbw $b0, SFX_INTRO_UNOWN_2 + db -1 + +IntroScene13: +; Switch scenes again. + call Intro_ClearBGPals + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + ld a, $1 + ldh [rVBK], a + ld hl, IntroBackgroundAttrmap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ld a, $0 + ldh [rVBK], a + ld hl, IntroSuicuneRunGFX + ld de, vTiles0 tile $00 + call Intro_DecompressRequest2bpp_255Tiles + ld hl, IntroBackgroundGFX + ld de, vTiles2 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + ld hl, IntroBackgroundTilemap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, IntroBackgroundPalette + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + ld hl, IntroBackgroundPalette + ld de, wBGPals2 + ld bc, 16 palettes + call CopyBytes + pop af + ldh [rSVBK], a + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, 7 + ldh [hWX], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + farcall ClearSpriteAnims + depixel 13, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE + call InitSpriteAnimStruct + ld de, MUSIC_CRYSTAL_OPENING + call PlayMusic + xor a + ld [wGlobalAnimXOffset], a + call Intro_SetCGBPalUpdate + xor a + ld [wIntroSceneFrameCounter], a + ld [wIntroSceneTimer], a + call NextIntroScene + ret + +IntroScene14: +; Suicune runs then jumps. + ldh a, [hSCX] + sub 10 + ldh [hSCX], a + ld hl, wIntroSceneFrameCounter + ld a, [hl] + inc [hl] + cp $80 + jr z, .done + cp $60 + jr z, .jump + jr nc, .run_after_jump + cp $40 + jr nc, .run + ret + +.jump + ld de, SFX_INTRO_SUICUNE_4 + call PlaySFX + +.run_after_jump + ld a, $1 + ld [wIntroSceneTimer], a + ld a, [wGlobalAnimXOffset] + cp $88 + jr c, .disappear + sub $8 + ld [wGlobalAnimXOffset], a + ret + +.disappear + farcall DeinitializeAllSprites + ret + +.run + ld a, [wGlobalAnimXOffset] + sub $2 + ld [wGlobalAnimXOffset], a + ret + +.done + call NextIntroScene + ret + +IntroScene15: +; Transition to a new scene. + call Intro_ClearBGPals + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + ld a, $1 + ldh [rVBK], a + ld hl, IntroSuicuneJumpAttrmap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ld a, $0 + ldh [rVBK], a + ld hl, IntroSuicuneJumpGFX + ld de, vTiles2 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + ld hl, IntroUnownBackGFX + ld de, vTiles0 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + ld de, IntroGrass4GFX + ld hl, vTiles1 tile $00 + lb bc, BANK(IntroGrass4GFX), 1 + call Request2bpp + ld hl, IntroSuicuneJumpTilemap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + call Intro_LoadTilemap + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, IntroSuicunePalette + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + ld hl, IntroSuicunePalette + ld de, wBGPals2 + ld bc, 16 palettes + call CopyBytes + pop af + ldh [rSVBK], a + xor a + ldh [hSCX], a + ld a, SCREEN_HEIGHT_PX + ldh [hSCY], a + ld a, 7 + ldh [hWX], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + farcall ClearSpriteAnims + call Intro_SetCGBPalUpdate + depixel 8, 5 + ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN_F + call InitSpriteAnimStruct + depixel 12, 0 + ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY + call InitSpriteAnimStruct + xor a + ld [wIntroSceneFrameCounter], a + ld [wIntroSceneTimer], a + call NextIntroScene + ret + +IntroScene16: +; Suicune shows its face. An Unown appears in front. + ld hl, wIntroSceneFrameCounter + ld a, [hl] + inc [hl] + cp $80 + jr nc, .done + call Intro_Scene16_AnimateSuicune + ldh a, [hSCY] + and a + ret z + add 8 + ldh [hSCY], a + ret +.done + call NextIntroScene + ret + +IntroScene17: +; ... + call Intro_ClearBGPals + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + ld a, $1 + ldh [rVBK], a + ld hl, IntroSuicuneCloseAttrmap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ld a, $0 + ldh [rVBK], a + ld hl, IntroSuicuneCloseGFX + ld de, vTiles1 tile $00 + call Intro_DecompressRequest2bpp_255Tiles + ld hl, IntroSuicuneCloseTilemap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, IntroSuicuneClosePalette + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + ld hl, IntroSuicuneClosePalette + ld de, wBGPals2 + ld bc, 16 palettes + call CopyBytes + pop af + ldh [rSVBK], a + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, 7 + ldh [hWX], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + farcall ClearSpriteAnims + call Intro_SetCGBPalUpdate + xor a + ld [wIntroSceneFrameCounter], a + ld [wIntroSceneTimer], a + call NextIntroScene + ret + +IntroScene18: +; Suicune close up. + ld hl, wIntroSceneFrameCounter + ld a, [hl] + inc [hl] + cp $60 + jr nc, .done + ldh a, [hSCX] + cp $60 + ret z + add 8 + ldh [hSCX], a + ret +.done + call NextIntroScene + ret + +IntroScene19: +; More setup. + call Intro_ClearBGPals + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + ld a, $1 + ldh [rVBK], a + ld hl, IntroSuicuneBackAttrmap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ld a, $0 + ldh [rVBK], a + ld hl, IntroSuicuneBackGFX + ld de, vTiles2 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + ld hl, IntroUnownsGFX + ld de, vTiles1 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + ld de, IntroGrass4GFX + ld hl, vTiles1 tile $7f + lb bc, BANK(IntroGrass4GFX), 1 + call Request2bpp + ld hl, IntroSuicuneBackTilemap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + call Intro_LoadTilemap + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, IntroSuicunePalette + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + ld hl, IntroSuicunePalette + ld de, wBGPals2 + ld bc, 16 palettes + call CopyBytes + pop af + ldh [rSVBK], a + xor a + ldh [hSCX], a + ld a, -5 * TILE_WIDTH + ldh [hSCY], a + ld a, 7 + ldh [hWX], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + farcall ClearSpriteAnims + ld hl, wSpriteAnimDict + xor a ; SPRITE_ANIM_DICT_DEFAULT + ld [hli], a + ld [hl], $7f + call Intro_SetCGBPalUpdate + depixel 12, 0 + ld a, SPRITE_ANIM_INDEX_INTRO_SUICUNE_AWAY + call InitSpriteAnimStruct + xor a + ld [wIntroSceneFrameCounter], a + ld [wIntroSceneTimer], a + call NextIntroScene + ret + +IntroScene20: +; Suicune running away. A bunch of Unown appear. + ld hl, wIntroSceneFrameCounter + ld a, [hl] + inc [hl] + cp $98 + jr nc, .finished + cp $58 + ret nc + cp $40 + jr nc, .AppearUnown + cp $28 + ret nc + ldh a, [hSCY] + inc a + ldh [hSCY], a + ret + +.AppearUnown: + sub $18 + ld c, a + and $3 + cp $3 + ret nz + ld a, c + and $1c + srl a + srl a + ld [wIntroSceneTimer], a + xor a + call Intro_Scene20_AppearUnown + ret + +.AppearUnownPal2: ; unreferenced + ld a, c + and $1c + srl a + srl a + ld [wIntroSceneTimer], a + ld a, 1 + call Intro_Scene20_AppearUnown + ret + +.finished: + call NextIntroScene + ret + +IntroScene21: +; Suicune gets more distant and turns black. + call Intro_ColoredSuicuneFrameSwap + ld c, 3 + call DelayFrames + xor a + ldh [hBGMapMode], a + ld [wIntroSceneFrameCounter], a + ld [wIntroSceneTimer], a + call NextIntroScene + ret + +IntroScene22: + ld hl, wIntroSceneFrameCounter + ld a, [hl] + inc [hl] + cp $8 + jr nc, .done + ret +.done + farcall DeinitializeAllSprites + call NextIntroScene + ret + +IntroScene23: + xor a + ld [wIntroSceneFrameCounter], a + call NextIntroScene + ret + +IntroScene24: +; Fade to white. + ld hl, wIntroSceneFrameCounter + ld a, [hl] + inc [hl] + cp $20 + jr nc, .done + + ld c, a + and $3 + ret nz + + ld a, c + and $1c + sla a + call Intro_Scene24_ApplyPaletteFade + ret + +.done + ld a, $40 + ld [wIntroSceneFrameCounter], a + call NextIntroScene + ret + +IntroScene25: +; Wait around a bit. + ld a, [wIntroSceneFrameCounter] + dec a + jr z, .done + ld [wIntroSceneFrameCounter], a + ret + +.done + call NextIntroScene + ret + +IntroScene26: +; Load the final scene. + call ClearBGPalettes + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + ld a, $1 + ldh [rVBK], a + ld hl, IntroCrystalUnownsAttrmap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ld a, $0 + ldh [rVBK], a + ld hl, IntroCrystalUnownsGFX + ld de, vTiles2 tile $00 + call Intro_DecompressRequest2bpp_128Tiles + ld hl, IntroCrystalUnownsTilemap + debgcoord 0, 0 + call Intro_DecompressRequest2bpp_64Tiles + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, IntroCrystalUnownsPalette + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + ld hl, IntroCrystalUnownsPalette + ld de, wBGPals2 + ld bc, 16 palettes + call CopyBytes + pop af + ldh [rSVBK], a + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, 7 + ldh [hWX], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + farcall ClearSpriteAnims + call Intro_SetCGBPalUpdate + xor a + ld [wIntroSceneFrameCounter], a + ld [wIntroSceneTimer], a + call NextIntroScene + ret + +IntroScene27: +; Spell out C R Y S T A L with Unown. + ld hl, wIntroSceneTimer + inc [hl] + ld hl, wIntroSceneFrameCounter + ld a, [hl] + inc [hl] + cp $80 + jr nc, .done + + ld c, a + and $f + ld [wIntroSceneTimer], a + ld a, c + and $70 + swap a + call Intro_FadeUnownWordPals + ret + +.done + call NextIntroScene + ld a, $80 + ld [wIntroSceneFrameCounter], a + ret + +IntroScene28: +; Cut out when the music ends, and lead into the title screen. + ld hl, wIntroSceneFrameCounter + ld a, [hl] + and a + jr z, .done + dec [hl] + cp $18 + jr z, .clear + cp $8 + ret nz + + ld de, SFX_INTRO_WHOOSH + call PlaySFX + ret + +.clear + call ClearBGPalettes + ret + +.done + ld hl, wJumptableIndex + set 7, [hl] + ret + +Intro_Scene24_ApplyPaletteFade: +; load the (a)th palette from .FadePals to all wBGPals2 + ld hl, .FadePals + add l + ld l, a + ld a, $0 + adc h + ld h, a + + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals2) + ldh [rSVBK], a + ld de, wBGPals2 + ld b, 8 ; number of BG pals +.loop1 + push hl + ld c, 1 palettes +.loop2 + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .loop2 + pop hl + dec b + jr nz, .loop1 + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +.FadePals: +INCLUDE "gfx/intro/fade.pal" + +CrystalIntro_InitUnownAnim: + push de + ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $8 + ld a, SPRITE_ANIM_FRAMESET_INTRO_UNOWN_4 + call ReinitSpriteAnimFrame + pop de + + push de + ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $18 + ld a, SPRITE_ANIM_FRAMESET_INTRO_UNOWN_3 + call ReinitSpriteAnimFrame + pop de + + push de + ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $28 + ld a, SPRITE_ANIM_FRAMESET_INTRO_UNOWN_1 + call ReinitSpriteAnimFrame + pop de + + ld a, SPRITE_ANIM_INDEX_INTRO_UNOWN + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $38 + ld a, SPRITE_ANIM_FRAMESET_INTRO_UNOWN_2 + call ReinitSpriteAnimFrame + ret + +CrystalIntro_UnownFade: + add a + add a + add a + ld e, a + ld d, 0 + ld hl, wBGPals2 + add hl, de + inc hl + inc hl + ld a, [wIntroSceneTimer] + and %111111 + cp %011111 + jr z, .okay + jr c, .okay + ld c, a + ld a, %111111 + sub c +.okay + + ld c, a + ld b, 0 + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals2) + ldh [rSVBK], a + + push hl + push bc + ld hl, wBGPals2 + ld bc, 8 palettes + xor a + call ByteFill + pop bc + pop hl + + push hl + ld hl, .BWFade + add hl, bc + add hl, bc + ld a, [hli] + ld d, [hl] + ld e, a + pop hl + ld a, e + ld [hli], a + ld a, d + ld [hli], a + + push hl + ld hl, .BlackLBlueFade + add hl, bc + add hl, bc + ld a, [hli] + ld d, [hl] + ld e, a + pop hl + ld a, e + ld [hli], a + ld a, d + ld [hli], a + + push hl + ld hl, .BlackBlueFade + add hl, bc + add hl, bc + ld a, [hli] + ld d, [hl] + ld e, a + pop hl + ld a, e + ld [hli], a + ld a, d + ld [hli], a + + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +.BWFade: +; Fade between black and white. +for hue, 32 + RGB hue, hue, hue +endr + +.BlackLBlueFade: +; Fade between black and light blue. +for hue, 32 + RGB 0, hue / 2, hue +endr + +.BlackBlueFade: +; Fade between black and blue. +for hue, 32 + RGB 0, 0, hue +endr + +Intro_Scene20_AppearUnown: +; Spawn the palette for the nth Unown + and a + jr nz, .load_pal_2 + + ld hl, .pal1 + jr .got_pointer + +.load_pal_2 + ld hl, .pal2 + +.got_pointer + ld a, [wIntroSceneTimer] + and $7 + add a + add a + add a + ld c, a + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals2) + ldh [rSVBK], a + + push bc + ld de, wBGPals2 + + ld a, c + add e + ld e, a + ld a, $0 + adc d + ld d, a + + ld bc, 1 palettes + call CopyBytes + pop bc + + ld de, wBGPals1 + ld a, c + add e + ld e, a + ld a, $0 + adc d + ld d, a + + ld bc, 1 palettes + call CopyBytes + + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +.pal1: +INCLUDE "gfx/intro/unown_1.pal" + +.pal2: +INCLUDE "gfx/intro/unown_2.pal" + +Intro_FadeUnownWordPals: + add a + add a + add a + ld e, a + ld d, 0 + ld hl, wBGPals2 + add hl, de +rept 4 + inc hl +endr + ld a, [wIntroSceneTimer] + add a + ld c, a + ld b, 0 + + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals2) + ldh [rSVBK], a + + push hl + ld hl, .FastFadePalettes + add hl, bc + ld a, [hli] + ld d, [hl] + ld e, a + pop hl + ld a, e + ld [hli], a + ld a, d + ld [hli], a + + push hl + ld hl, .SlowFadePalettes + add hl, bc + ld a, [hli] + ld d, [hl] + ld e, a + pop hl + ld a, e + ld [hli], a + ld a, d + ld [hli], a + + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +.FastFadePalettes: +DEF hue = 31 +rept 8 + RGB hue, hue, hue + DEF hue -= 1 + RGB hue, hue, hue + DEF hue -= 2 +endr + +.SlowFadePalettes: +DEF hue = 31 +rept 16 + RGB hue, hue, hue + DEF hue -= 1 +endr + +Intro_LoadTilemap: + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + + ld hl, wDecompressScratch + decoord 0, 0 + ld b, SCREEN_HEIGHT +.row + ld c, SCREEN_WIDTH +.col + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .col + ld a, BG_MAP_WIDTH - SCREEN_WIDTH + add l + ld l, a + ld a, 0 + adc h + ld h, a + dec b + jr nz, .row + + pop af + ldh [rSVBK], a + ret + +Intro_Scene16_AnimateSuicune: + ld a, [wIntroSceneFrameCounter] + and $3 + jr z, Intro_ColoredSuicuneFrameSwap + cp $3 + jr z, .PrepareForSuicuneSwap + ret + +.PrepareForSuicuneSwap: + xor a + ldh [hBGMapMode], a + ret + +Intro_ColoredSuicuneFrameSwap: + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH +.loop + ld a, [hl] + and a + jr z, .skip + cp $80 + jr nc, .skip + xor $8 + ld [hl], a +.skip + inc hl + dec bc + ld a, c + or b + jr nz, .loop + ld a, $1 + ldh [hBGMapMode], a + ret + +Intro_RustleGrass: + ld a, [wIntroSceneFrameCounter] + cp 36 + ret nc + and $c + srl a + ld e, a + ld d, 0 + ld hl, .RustlingGrassPointers + add hl, de + ld a, [hli] + ld [wRequested2bppSource], a + ld a, [hli] + ld [wRequested2bppSource + 1], a + ld a, LOW(vTiles2 tile $09) + ld [wRequested2bppDest], a + ld a, HIGH(vTiles2 tile $09) + ld [wRequested2bppDest + 1], a + ld a, 4 + ld [wRequested2bppSize], a + ret + +.RustlingGrassPointers: + dw IntroGrass1GFX + dw IntroGrass2GFX + dw IntroGrass3GFX + dw IntroGrass2GFX + +Intro_SetCGBPalUpdate: + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +Intro_ClearBGPals: + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals2) + ldh [rSVBK], a + + ld hl, wBGPals2 + ld bc, 16 palettes + xor a + call ByteFill + + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + call DelayFrame + call DelayFrame + ret + +Intro_DecompressRequest2bpp_128Tiles: + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + + push de + ld de, wDecompressScratch + call Decompress + pop hl + + ld de, wDecompressScratch + lb bc, $01, $80 + call Request2bpp + + pop af + ldh [rSVBK], a + ret + +Intro_DecompressRequest2bpp_255Tiles: + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + + push de + ld de, wDecompressScratch + call Decompress + pop hl + + ld de, wDecompressScratch + lb bc, $01, $ff + call Request2bpp + + pop af + ldh [rSVBK], a + ret + +Intro_DecompressRequest2bpp_64Tiles: + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + + push de + ld de, wDecompressScratch + call Decompress + pop hl + + ld de, wDecompressScratch + lb bc, $01, $40 + call Request2bpp + + pop af + ldh [rSVBK], a + ret + +Intro_ResetLYOverrides: + ldh a, [rSVBK] + push af + ld a, BANK(wLYOverrides) + ldh [rSVBK], a + + ld hl, wLYOverrides + ld bc, wLYOverridesEnd - wLYOverrides + xor a + call ByteFill + + pop af + ldh [rSVBK], a + ld a, LOW(rSCX) + ldh [hLCDCPointer], a + ret + +Intro_PerspectiveScrollBG: + ldh a, [rSVBK] + push af + ld a, BANK(wLYOverrides) + ldh [rSVBK], a + ; Scroll the grass every frame. + ; Scroll the trees every other frame and at half speed. + ; This creates an illusion of perspective. + ld a, [wIntroSceneFrameCounter] + and $1 + jr z, .skip + ; trees in the back + ld hl, wLYOverrides + ld a, [hl] + inc a + ld bc, $5f + call ByteFill +.skip + ; grass in the front + ld hl, wLYOverrides + $5f + ld a, [hl] + inc a + inc a + ld bc, $31 + call ByteFill + ld a, [wLYOverrides + 0] + ldh [hSCX], a + pop af + ldh [rSVBK], a + ret + +IntroSuicuneRunGFX: +INCBIN "gfx/intro/suicune_run.2bpp.lz" + +IntroPichuWooperGFX: +INCBIN "gfx/intro/pichu_wooper.2bpp.lz" + +IntroBackgroundGFX: +INCBIN "gfx/intro/background.2bpp.lz" + +IntroBackgroundTilemap: +INCBIN "gfx/intro/background.tilemap.lz" + +IntroBackgroundAttrmap: +INCBIN "gfx/intro/background.attrmap.lz" + +IntroBackgroundPalette: +INCLUDE "gfx/intro/background.pal" + +IntroUnownsGFX: +INCBIN "gfx/intro/unowns.2bpp.lz" + +IntroPulseGFX: +INCBIN "gfx/intro/pulse.2bpp.lz" + +IntroUnownATilemap: +INCBIN "gfx/intro/unown_a.tilemap.lz" + +IntroUnownAAttrmap: +INCBIN "gfx/intro/unown_a.attrmap.lz" + +IntroUnownHITilemap: +INCBIN "gfx/intro/unown_hi.tilemap.lz" + +IntroUnownHIAttrmap: +INCBIN "gfx/intro/unown_hi.attrmap.lz" + +IntroUnownsTilemap: +INCBIN "gfx/intro/unowns.tilemap.lz" + +IntroUnownsAttrmap: +INCBIN "gfx/intro/unowns.attrmap.lz" + +IntroUnownsPalette: +INCLUDE "gfx/intro/unowns.pal" + +IntroCrystalUnownsGFX: +INCBIN "gfx/intro/crystal_unowns.2bpp.lz" + +IntroCrystalUnownsTilemap: +INCBIN "gfx/intro/crystal_unowns.tilemap.lz" + +IntroCrystalUnownsAttrmap: +INCBIN "gfx/intro/crystal_unowns.attrmap.lz" + +IntroCrystalUnownsPalette: +INCLUDE "gfx/intro/crystal_unowns.pal" + +IntroSuicuneCloseGFX: +INCBIN "gfx/intro/suicune_close.2bpp.lz" + +IntroSuicuneCloseTilemap: +INCBIN "gfx/intro/suicune_close.tilemap.lz" + +IntroSuicuneCloseAttrmap: +INCBIN "gfx/intro/suicune_close.attrmap.lz" + +IntroSuicuneClosePalette: +INCLUDE "gfx/intro/suicune_close.pal" + +IntroSuicuneJumpGFX: +INCBIN "gfx/intro/suicune_jump.2bpp.lz" + +IntroSuicuneBackGFX: +INCBIN "gfx/intro/suicune_back.2bpp.lz" + +IntroSuicuneJumpTilemap: +INCBIN "gfx/intro/suicune_jump.tilemap.lz" + +IntroSuicuneJumpAttrmap: +INCBIN "gfx/intro/suicune_jump.attrmap.lz" + +IntroSuicuneBackTilemap: +INCBIN "gfx/intro/suicune_back.tilemap.lz" + +IntroSuicuneBackAttrmap: +INCBIN "gfx/intro/suicune_back.attrmap.lz" + +IntroSuicunePalette: +INCLUDE "gfx/intro/suicune.pal" + +IntroUnownBackGFX: +INCBIN "gfx/intro/unown_back.2bpp.lz" + +IntroGrass1GFX: +INCBIN "gfx/intro/grass1.2bpp" +IntroGrass2GFX: +INCBIN "gfx/intro/grass2.2bpp" +IntroGrass3GFX: +INCBIN "gfx/intro/grass3.2bpp" +IntroGrass4GFX: +INCBIN "gfx/intro/grass4.2bpp" diff --git a/engine/movie/splash.asm b/engine/movie/splash.asm new file mode 100644 index 0000000..e209935 --- /dev/null +++ b/engine/movie/splash.asm @@ -0,0 +1,349 @@ +SplashScreen: +; Play the copyright screen and GameFreak Presents sequence. +; Return carry if user cancels animation by pressing a button. + +; Reinitialize everything + ld de, MUSIC_NONE + call PlayMusic + call ClearBGPalettes + call ClearTilemap + ld a, HIGH(vBGMap0) + ldh [hBGMapAddress + 1], a + xor a ; LOW(vBGMap0) + ldh [hBGMapAddress], a + ldh [hJoyDown], a + ldh [hSCX], a + ldh [hSCY], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + call WaitBGMap + ld b, SCGB_GAMEFREAK_LOGO + call GetSGBLayout + call SetPalettes + ld c, 10 + call DelayFrames + +; Draw copyright screen + callfar Copyright + call WaitBGMap + ld c, 100 + call DelayFrames + call ClearTilemap + +; Stop here if not in GBC mode + farcall GBCOnlyScreen + +; Play GameFreak logo animation + call GameFreakPresentsInit +.joy_loop + call JoyTextDelay + ldh a, [hJoyLast] + and BUTTONS + jr nz, .pressed_button + ld a, [wJumptableIndex] + bit 7, a + jr nz, .finish + call GameFreakPresentsScene + farcall PlaySpriteAnimations + call DelayFrame + jr .joy_loop + +.pressed_button + call GameFreakPresentsEnd + scf + ret + +.finish + call GameFreakPresentsEnd + and a + ret + +GameFreakPresentsInit: + ld de, GameFreakLogoGFX + ld hl, vTiles2 + lb bc, BANK(GameFreakLogoGFX), 28 + call Get1bpp + + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + + ld hl, GameFreakDittoGFX + ld de, wDecompressScratch + ld a, BANK(GameFreakDittoGFX) + call FarDecompress + + ld hl, vTiles0 + ld de, wDecompressScratch + lb bc, 1, 8 tiles + call Request2bpp + + ld hl, vTiles1 + ld de, wDecompressScratch + $80 tiles + lb bc, 1, 8 tiles + call Request2bpp + + pop af + ldh [rSVBK], a + + farcall ClearSpriteAnims + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_GAMEFREAK_LOGO + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], 160 + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], 96 + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], 48 + xor a + ld [wJumptableIndex], a + ld [wIntroSceneFrameCounter], a + ld [wIntroSceneTimer], a + ldh [hSCX], a + ldh [hSCY], a + ld a, 1 + ldh [hBGMapMode], a + ld a, 144 + ldh [hWY], a + lb de, %11100100, %11100100 + call DmgToCgbObjPals + ret + +GameFreakPresentsEnd: + farcall ClearSpriteAnims + call ClearTilemap + call ClearSprites + ld c, 16 + call DelayFrames + ret + +GameFreakPresentsScene: + jumptable .scenes, wJumptableIndex + +.scenes + dw GameFreakPresents_WaitSpriteAnim + dw GameFreakPresents_PlaceGameFreak + dw GameFreakPresents_PlacePresents + dw GameFreakPresents_WaitForTimer + +GameFreakPresents_NextScene: + ld hl, wJumptableIndex + inc [hl] + ret + +GameFreakPresents_WaitSpriteAnim: + ret + +GameFreakPresents_PlaceGameFreak: + ld hl, wIntroSceneTimer + ld a, [hl] + cp 32 + jr nc, .PlaceGameFreak + inc [hl] + ret + +.PlaceGameFreak: + ld [hl], 0 + ld hl, .game_freak + decoord 5, 10 + ld bc, .end - .game_freak + call CopyBytes + call GameFreakPresents_NextScene + ld de, SFX_GAME_FREAK_PRESENTS + call PlaySFX + ret + +.game_freak + db $00, $01, $02, $03, $0d, $04, $05, $03, $01, $06 +.end + db "@" + +GameFreakPresents_PlacePresents: + ld hl, wIntroSceneTimer + ld a, [hl] + cp 64 + jr nc, .place_presents + inc [hl] + ret + +.place_presents + ld [hl], 0 + ld hl, .presents + decoord 7, 11 + ld bc, .end - .presents + call CopyBytes + call GameFreakPresents_NextScene + ret + +.presents + db $07, $08, $09, $0a, $0b, $0c +.end + db "@" + +GameFreakPresents_WaitForTimer: + ld hl, wIntroSceneTimer + ld a, [hl] + cp 128 + jr nc, .finish + inc [hl] + ret + +.finish + ld hl, wJumptableIndex + set 7, [hl] + ret + +GameFreakLogoSpriteAnim: + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, .scenes + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.scenes: + dw GameFreakLogo_Init + dw GameFreakLogo_Bounce + dw GameFreakLogo_Ditto + dw GameFreakLogo_Transform + dw GameFreakLogo_Done + +GameFreakLogo_Init: + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + inc [hl] + ret + +GameFreakLogo_Bounce: +; Bounce with a height of 0C, 0C / 48 times. +; By default, this is twice, with a height of 96 pixels and 48 pixels. +; Sine offset starts at 48 (32+32/2, or pi+pi/2), so it starts at the maximum +; value of the sine wave (i.e. the top of the screen). + + ld hl, SPRITEANIMSTRUCT_VAR1 ; jump height + add hl, bc + ld a, [hl] + and a + jr z, .done + +; Load the sine offset, make sure it doesn't reach the negative part of the wave + ld d, a + ld hl, SPRITEANIMSTRUCT_VAR2 ; sine offset + add hl, bc + ld a, [hl] + and $3f ; full circle = 2*pi = 2*32 + cp 32 + jr nc, .no_negative + add 32 +.no_negative + + ld e, a + farcall BattleAnim_Sine_e ; e = d * sin(e * pi/32) + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], e + +; Decrement the sine offset + ld hl, SPRITEANIMSTRUCT_VAR2 ; sine offset + add hl, bc + ld a, [hl] + dec [hl] + and $1f ; a%32 == 0 + ret nz + +; If the ditto's reached the ground, decrement the jump height and play the sfx + ld hl, SPRITEANIMSTRUCT_VAR1 ; jump height + add hl, bc + ld a, [hl] + sub 48 + ld [hl], a + ld de, SFX_DITTO_BOUNCE + call PlaySFX + ret + +.done + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + inc [hl] + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], 0 + ld de, SFX_DITTO_POP_UP + call PlaySFX + ret + +GameFreakLogo_Ditto: +; Wait a little, then start transforming + ld hl, SPRITEANIMSTRUCT_VAR2 ; frame count + add hl, bc + ld a, [hl] + cp 32 + jr nc, .start_transform + inc [hl] + ret + +.start_transform + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + inc [hl] + ld hl, SPRITEANIMSTRUCT_VAR2 + add hl, bc + ld [hl], 0 + ld de, SFX_DITTO_TRANSFORM + call PlaySFX + ret + +GameFreakLogo_Transform: + ld hl, SPRITEANIMSTRUCT_VAR2 ; frame count + add hl, bc + ld a, [hl] + cp 64 + jr z, .done + inc [hl] + +; Fade ditto's palettes while it's transforming + srl a + srl a + ld e, a + ld d, 0 + ld hl, GameFreakDittoPaletteFade + add hl, de + add hl, de + ldh a, [rSVBK] + push af + ld a, BANK(wOBPals2) + ldh [rSVBK], a + ld a, [hli] + ld [wOBPals2 + 12], a + ld a, [hli] + ld [wOBPals2 + 13], a + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +.done + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + inc [hl] + call GameFreakPresents_NextScene +GameFreakLogo_Done: + ret + +GameFreakDittoPaletteFade: +INCLUDE "gfx/splash/ditto_fade.pal" + +GameFreakLogoGFX: +INCBIN "gfx/splash/gamefreak_presents.1bpp" +INCBIN "gfx/splash/gamefreak_logo.1bpp" diff --git a/engine/movie/title.asm b/engine/movie/title.asm new file mode 100644 index 0000000..16d56ab --- /dev/null +++ b/engine/movie/title.asm @@ -0,0 +1,374 @@ +_TitleScreen: + call ClearBGPalettes + call ClearSprites + call ClearTilemap + +; Turn BG Map update off + xor a + ldh [hBGMapMode], a + +; Reset timing variables + ld hl, wJumptableIndex + ld [hli], a ; wJumptableIndex + ld [hli], a ; wTitleScreenSelectedOption + ld [hli], a ; wTitleScreenTimer + ld [hl], a ; wTitleScreenTimer + 1 + +; Turn LCD off + call DisableLCD + +; VRAM bank 1 + ld a, 1 + ldh [rVBK], a + +; Decompress running Suicune gfx + ld hl, TitleSuicuneGFX + ld de, vTiles1 + call Decompress + +; Clear screen palettes + hlbgcoord 0, 0 + ld bc, 20 * BG_MAP_WIDTH + xor a + call ByteFill + +; Fill tile palettes: + +; BG Map 1: + +; line 0 (copyright) + hlbgcoord 0, 0, vBGMap1 + ld bc, BG_MAP_WIDTH + ld a, 7 ; palette + call ByteFill + +; BG Map 0: + +; Apply logo gradient: + +; lines 3-4 + hlbgcoord 0, 3 + ld bc, 2 * BG_MAP_WIDTH + ld a, 2 + call ByteFill +; line 5 + hlbgcoord 0, 5 + ld bc, BG_MAP_WIDTH + ld a, 3 + call ByteFill +; line 6 + hlbgcoord 0, 6 + ld bc, BG_MAP_WIDTH + ld a, 4 + call ByteFill +; line 7 + hlbgcoord 0, 7 + ld bc, BG_MAP_WIDTH + ld a, 5 + call ByteFill +; lines 8-9 + hlbgcoord 0, 8 + ld bc, 2 * BG_MAP_WIDTH + ld a, 6 + call ByteFill + +; 'CRYSTAL VERSION' + hlbgcoord 5, 9 + ld bc, 11 ; length of version text + ld a, 1 + call ByteFill + +; Suicune gfx + hlbgcoord 0, 12 + ld bc, 6 * BG_MAP_WIDTH ; the rest of the screen + ld a, 0 | VRAM_BANK_1 + call ByteFill + +; Back to VRAM bank 0 + ld a, 0 + ldh [rVBK], a + +; Decompress logo + ld hl, TitleLogoGFX + ld de, vTiles1 + call Decompress + +; Decompress background crystal + ld hl, TitleCrystalGFX + ld de, vTiles0 + call Decompress + +; Clear screen tiles + hlbgcoord 0, 0 + ld bc, 64 * BG_MAP_WIDTH + ld a, " " + call ByteFill + +; Draw Pokemon logo + hlcoord 0, 3 + lb bc, 7, 20 + ld d, $80 + ld e, 20 + call DrawTitleGraphic + +; Draw copyright text + hlbgcoord 3, 0, vBGMap1 + lb bc, 1, 13 + ld d, $c + ld e, 16 + call DrawTitleGraphic + +; Initialize running Suicune? + ld d, $0 + call LoadSuicuneFrame + +; Initialize background crystal + call InitializeBackground + +; Update palette colors + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + + ld hl, TitleScreenPalettes + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + + ld hl, TitleScreenPalettes + ld de, wBGPals2 + ld bc, 16 palettes + call CopyBytes + + pop af + ldh [rSVBK], a + +; LY/SCX trickery starts here + + ldh a, [rSVBK] + push af + ld a, BANK(wLYOverrides) + ldh [rSVBK], a + +; Make alternating lines come in from opposite sides + +; (This part is actually totally pointless, you can't +; see anything until these values are overwritten!) + + ld b, 80 / 2 ; alternate for 80 lines + ld hl, wLYOverrides +.loop +; $00 is the middle position + ld [hl], +112 ; coming from the left + inc hl + ld [hl], -112 ; coming from the right + inc hl + dec b + jr nz, .loop + +; Make sure the rest of the buffer is empty + ld hl, wLYOverrides + 80 + xor a + ld bc, wLYOverridesEnd - (wLYOverrides + 80) + call ByteFill + +; Let LCD Stat know we're messing around with SCX + ld a, LOW(rSCX) + ldh [hLCDCPointer], a + + pop af + ldh [rSVBK], a + +; Reset audio + call ChannelsOff + call EnableLCD + +; Set sprite size to 8x16 + ldh a, [rLCDC] + set rLCDC_SPRITE_SIZE, a + ldh [rLCDC], a + + ld a, +112 + ldh [hSCX], a + ld a, 8 + ldh [hSCY], a + ld a, 7 + ldh [hWX], a + ld a, -112 + ldh [hWY], a + + ld a, TRUE + ldh [hCGBPalUpdate], a + +; Update BG Map 0 (bank 0) + ldh [hBGMapMode], a + + xor a + ld [wSuicuneFrame], a + +; Play starting sound effect + call SFXChannelsOff + ld de, SFX_TITLE_SCREEN_ENTRANCE + call PlaySFX + + ret + +SuicuneFrameIterator: + ld hl, wSuicuneFrame + ld a, [hl] + ld c, a + inc [hl] + +; Only do this once every eight frames + and %111 + ret nz + + ld a, c + and %11000 + sla a + swap a + ld e, a + ld d, 0 + ld hl, .Frames + add hl, de + ld d, [hl] + xor a + ldh [hBGMapMode], a + call LoadSuicuneFrame + ld a, $1 + ldh [hBGMapMode], a + ld a, $3 + ldh [hBGMapThird], a + ret + +.Frames: + db $80 ; vTiles3 tile $80 + db $88 ; vTiles3 tile $88 + db $00 ; vTiles5 tile $00 + db $08 ; vTiles5 tile $08 + +LoadSuicuneFrame: + hlcoord 6, 12 + ld b, 6 +.bgrows + ld c, 8 +.col + ld a, d + ld [hli], a + inc d + dec c + jr nz, .col + ld a, SCREEN_WIDTH - 8 + add l + ld l, a + ld a, 0 + adc h + ld h, a + ld a, 8 + add d + ld d, a + dec b + jr nz, .bgrows + ret + +DrawTitleGraphic: +; input: +; hl: draw location +; b: height +; c: width +; d: tile to start drawing from +; e: number of tiles to advance for each bgrows +.bgrows + push de + push bc + push hl +.col + ld a, d + ld [hli], a + inc d + dec c + jr nz, .col + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + pop de + ld a, e + add d + ld d, a + dec b + jr nz, .bgrows + ret + +InitializeBackground: + ld hl, wShadowOAMSprite00 + ld d, -$22 + ld e, $0 + ld c, 5 +.loop + push bc + call .InitColumn + pop bc + ld a, $10 + add d + ld d, a + dec c + jr nz, .loop + ret + +.InitColumn: + ld c, $6 + ld b, $40 +.loop2 + ld a, d + ld [hli], a ; y + ld a, b + ld [hli], a ; x + add $8 + ld b, a + ld a, e + ld [hli], a ; tile id + inc e + inc e + ld a, 0 | PRIORITY + ld [hli], a ; attributes + dec c + jr nz, .loop2 + ret + +AnimateTitleCrystal: +; Move the title screen crystal downward until it's fully visible + +; Stop at y=6 +; y is really from the bottom of the sprite, which is two tiles high + ld hl, wShadowOAMSprite00YCoord + ld a, [hl] + cp 6 + 2 * TILE_WIDTH + ret z + +; Move all 30 parts of the crystal down by 2 + ld c, 30 +.loop + ld a, [hl] + add 2 + ld [hli], a ; y +rept SPRITEOAMSTRUCT_LENGTH - 1 + inc hl +endr + dec c + jr nz, .loop + + ret + +TitleSuicuneGFX: +INCBIN "gfx/title/suicune.2bpp.lz" + +TitleLogoGFX: +INCBIN "gfx/title/logo.2bpp.lz" + +TitleCrystalGFX: +INCBIN "gfx/title/crystal.2bpp.lz" + +TitleScreenPalettes: +INCLUDE "gfx/title/title.pal" diff --git a/engine/movie/trade_animation.asm b/engine/movie/trade_animation.asm new file mode 100644 index 0000000..4abad52 --- /dev/null +++ b/engine/movie/trade_animation.asm @@ -0,0 +1,1422 @@ +DEF TRADEANIM_RIGHT_ARROW EQU "▶" ; $ed +DEF TRADEANIM_LEFT_ARROW EQU "▼" ; $ee + +; TradeAnim_TubeAnimJumptable.Jumptable indexes + const_def + const TRADEANIMSTATE_0 ; 0 + const TRADEANIMSTATE_1 ; 1 + const TRADEANIMSTATE_2 ; 2 + const TRADEANIMSTATE_3 ; 3 +DEF TRADEANIMJUMPTABLE_LENGTH EQU const_value + +MACRO add_tradeanim +\1_TradeCmd: + dw \1 +ENDM + +MACRO tradeanim + db (\1_TradeCmd - DoTradeAnimation.Jumptable) / 2 +ENDM + +TradeAnimation: + xor a + ld [wUnusedTradeAnimPlayEvolutionMusic], a + ld hl, wPlayerTrademonSenderName + ld de, wOTTrademonSenderName + call LinkTradeAnim_LoadTradePlayerNames + ld hl, wPlayerTrademonSpecies + ld de, wOTTrademonSpecies + call LinkTradeAnim_LoadTradeMonSpecies + ld de, .script + jr RunTradeAnimScript + +.script + tradeanim TradeAnim_SetupGivemonScroll + tradeanim TradeAnim_ShowGivemonData + tradeanim TradeAnim_DoGivemonScroll + tradeanim TradeAnim_Wait80 + tradeanim TradeAnim_Wait96 + tradeanim TradeAnim_Poof + tradeanim TradeAnim_RockingBall + tradeanim TradeAnim_EnterLinkTube1 + tradeanim TradeAnim_WaitAnim + tradeanim TradeAnim_BulgeThroughTube + tradeanim TradeAnim_WaitAnim + tradeanim TradeAnim_TextboxScrollStart + tradeanim TradeAnim_GiveTrademonSFX + tradeanim TradeAnim_TubeToOT1 + tradeanim TradeAnim_SentToOTText + tradeanim TradeAnim_ScrollOutRight + + tradeanim TradeAnim_OTSendsText1 + tradeanim TradeAnim_OTBidsFarewell + tradeanim TradeAnim_Wait40 + tradeanim TradeAnim_ScrollOutRight + tradeanim TradeAnim_GetTrademonSFX + tradeanim TradeAnim_TubeToPlayer1 + tradeanim TradeAnim_EnterLinkTube1 + tradeanim TradeAnim_DropBall + tradeanim TradeAnim_ExitLinkTube + tradeanim TradeAnim_WaitAnim + tradeanim TradeAnim_ShowGetmonData + tradeanim TradeAnim_Poof + tradeanim TradeAnim_WaitAnim + tradeanim TradeAnim_FrontpicScrollStart + tradeanim TradeAnim_AnimateFrontpic + tradeanim TradeAnim_Wait80IfOTEgg + tradeanim TradeAnim_TextboxScrollStart + tradeanim TradeAnim_TakeCareOfText + tradeanim TradeAnim_ScrollOutRight + tradeanim TradeAnim_End + +TradeAnimationPlayer2: + xor a + ld [wUnusedTradeAnimPlayEvolutionMusic], a + ld hl, wOTTrademonSenderName + ld de, wPlayerTrademonSenderName + call LinkTradeAnim_LoadTradePlayerNames + ld hl, wOTTrademonSpecies + ld de, wPlayerTrademonSpecies + call LinkTradeAnim_LoadTradeMonSpecies + ld de, .script + jr RunTradeAnimScript + +.script + tradeanim TradeAnim_OTSendsText2 + tradeanim TradeAnim_OTBidsFarewell + tradeanim TradeAnim_Wait40 + tradeanim TradeAnim_ScrollOutRight + tradeanim TradeAnim_GetTrademonSFX + tradeanim TradeAnim_TubeToOT1 + tradeanim TradeAnim_EnterLinkTube1 + tradeanim TradeAnim_DropBall + tradeanim TradeAnim_ExitLinkTube + tradeanim TradeAnim_WaitAnim + tradeanim TradeAnim_ShowGetmonData + tradeanim TradeAnim_Poof + tradeanim TradeAnim_WaitAnim + tradeanim TradeAnim_FrontpicScrollStart + tradeanim TradeAnim_AnimateFrontpic + tradeanim TradeAnim_Wait180IfOTEgg + tradeanim TradeAnim_TextboxScrollStart + tradeanim TradeAnim_TakeCareOfText + tradeanim TradeAnim_ScrollOutRight + + tradeanim TradeAnim_SetupGivemonScroll + tradeanim TradeAnim_ShowGivemonData + tradeanim TradeAnim_DoGivemonScroll + tradeanim TradeAnim_Wait40 + tradeanim TradeAnim_Poof + tradeanim TradeAnim_RockingBall + tradeanim TradeAnim_EnterLinkTube1 + tradeanim TradeAnim_WaitAnim + tradeanim TradeAnim_BulgeThroughTube + tradeanim TradeAnim_WaitAnim + tradeanim TradeAnim_TextboxScrollStart + tradeanim TradeAnim_GiveTrademonSFX + tradeanim TradeAnim_TubeToPlayer1 + tradeanim TradeAnim_SentToOTText + tradeanim TradeAnim_ScrollOutRight + tradeanim TradeAnim_End + +RunTradeAnimScript: + ld hl, wTradeAnimAddress + ld [hl], e + inc hl + ld [hl], d + ldh a, [hMapAnims] + push af + xor a + ldh [hMapAnims], a + ld hl, wVramState + ld a, [hl] + push af + res 0, [hl] + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + call .TradeAnimLayout + ld a, [wUnusedTradeAnimPlayEvolutionMusic] + and a + jr nz, .anim_loop + ld de, MUSIC_EVOLUTION + call PlayMusic2 +.anim_loop + call DoTradeAnimation + jr nc, .anim_loop + pop af + ld [wOptions], a + pop af + ld [wVramState], a + pop af + ldh [hMapAnims], a + ret + +.TradeAnimLayout: + xor a + ld [wJumptableIndex], a + call ClearBGPalettes + call ClearSprites + call ClearTilemap + call DisableLCD + call LoadFontsBattleExtra + callfar ClearSpriteAnims + ldh a, [hCGB] + and a + jr z, .NotCGB + ld a, $1 + ldh [rVBK], a + ld hl, vTiles0 + ld bc, VRAM_End - VRAM_Begin + xor a + call ByteFill + ld a, $0 + ldh [rVBK], a + +.NotCGB: + hlbgcoord 0, 0 + ld bc, VRAM_End - vBGMap0 + ld a, " " + call ByteFill + ld hl, TradeGameBoyLZ + ld de, vTiles2 tile $31 + call Decompress + ld hl, TradeArrowRightGFX + ld de, vTiles0 tile TRADEANIM_RIGHT_ARROW + ld bc, 1 tiles + ld a, BANK(TradeArrowRightGFX) + call FarCopyBytes + ld hl, TradeArrowLeftGFX + ld de, vTiles0 tile TRADEANIM_LEFT_ARROW + ld bc, 1 tiles + ld a, BANK(TradeArrowLeftGFX) + call FarCopyBytes + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + farcall GetTrademonFrontpic + call EnableLCD + call LoadTradeBallAndCableGFX + ld a, [wPlayerTrademonSpecies] + ld hl, wPlayerTrademonDVs + ld de, vTiles0 + call TradeAnim_GetFrontpic + ld a, [wOTTrademonSpecies] + ld hl, wOTTrademonDVs + ld de, vTiles0 tile $31 + call TradeAnim_GetFrontpic + ld a, [wPlayerTrademonSpecies] + ld de, wPlayerTrademonSpeciesName + call TradeAnim_GetNicknamename + ld a, [wOTTrademonSpecies] + ld de, wOTTrademonSpeciesName + call TradeAnim_GetNicknamename + call TradeAnim_NormalPals + ret + +DoTradeAnimation: + ld a, [wJumptableIndex] + bit 7, a + jr nz, .finished + call .DoTradeAnimCommand + callfar PlaySpriteAnimations + ld hl, wFrameCounter2 + inc [hl] + call DelayFrame + and a + ret + +.finished + call LoadStandardFont + scf + ret + +.DoTradeAnimCommand: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + add_tradeanim TradeAnim_AdvanceScriptPointer ; 00 + add_tradeanim TradeAnim_ShowGivemonData ; 01 + add_tradeanim TradeAnim_ShowGetmonData ; 02 + add_tradeanim TradeAnim_EnterLinkTube1 ; 03 + add_tradeanim TradeAnim_EnterLinkTube2 ; 04 + add_tradeanim TradeAnim_ExitLinkTube ; 05 + add_tradeanim TradeAnim_TubeToOT1 ; 06 + add_tradeanim TradeAnim_TubeToOT2 ; 07 + add_tradeanim TradeAnim_TubeToOT3 ; 08 + add_tradeanim TradeAnim_TubeToOT4 ; 09 + add_tradeanim TradeAnim_TubeToOT5 ; 0a + add_tradeanim TradeAnim_TubeToOT6 ; 0b + add_tradeanim TradeAnim_TubeToOT7 ; 0c + add_tradeanim TradeAnim_TubeToOT8 ; 0d + add_tradeanim TradeAnim_TubeToPlayer1 ; 0e + add_tradeanim TradeAnim_TubeToPlayer2 ; 0f + add_tradeanim TradeAnim_TubeToPlayer3 ; 10 + add_tradeanim TradeAnim_TubeToPlayer4 ; 11 + add_tradeanim TradeAnim_TubeToPlayer5 ; 12 + add_tradeanim TradeAnim_TubeToPlayer6 ; 13 + add_tradeanim TradeAnim_TubeToPlayer7 ; 14 + add_tradeanim TradeAnim_TubeToPlayer8 ; 15 + add_tradeanim TradeAnim_SentToOTText ; 16 + add_tradeanim TradeAnim_OTBidsFarewell ; 17 + add_tradeanim TradeAnim_TakeCareOfText ; 18 + add_tradeanim TradeAnim_OTSendsText1 ; 19 + add_tradeanim TradeAnim_OTSendsText2 ; 1a + add_tradeanim TradeAnim_SetupGivemonScroll ; 1b + add_tradeanim TradeAnim_DoGivemonScroll ; 1c + add_tradeanim TradeAnim_FrontpicScrollStart ; 1d + add_tradeanim TradeAnim_TextboxScrollStart ; 1e + add_tradeanim TradeAnim_ScrollOutRight ; 1f + add_tradeanim TradeAnim_ScrollOutRight2 ; 20 + add_tradeanim TradeAnim_Wait80 ; 21 + add_tradeanim TradeAnim_Wait40 ; 22 + add_tradeanim TradeAnim_RockingBall ; 23 + add_tradeanim TradeAnim_DropBall ; 24 + add_tradeanim TradeAnim_WaitAnim ; 25 + add_tradeanim TradeAnim_WaitAnim2 ; 26 + add_tradeanim TradeAnim_Poof ; 27 + add_tradeanim TradeAnim_BulgeThroughTube ; 28 + add_tradeanim TradeAnim_GiveTrademonSFX ; 29 + add_tradeanim TradeAnim_GetTrademonSFX ; 2a + add_tradeanim TradeAnim_End ; 2b + add_tradeanim TradeAnim_AnimateFrontpic ; 2c + add_tradeanim TradeAnim_Wait96 ; 2d + add_tradeanim TradeAnim_Wait80IfOTEgg ; 2e + add_tradeanim TradeAnim_Wait180IfOTEgg ; 2f + +TradeAnim_IncrementJumptableIndex: + ld hl, wJumptableIndex + inc [hl] + ret + +TradeAnim_AdvanceScriptPointer: + ld hl, wTradeAnimAddress + ld e, [hl] + inc hl + ld d, [hl] + ld a, [de] + ld [wJumptableIndex], a + inc de + ld [hl], d + dec hl + ld [hl], e + ret + +TradeAnim_End: + ld hl, wJumptableIndex + set 7, [hl] + ret + +TradeAnim_TubeToOT1: + ld a, TRADEANIM_RIGHT_ARROW + call TradeAnim_PlaceTrademonStatsOnTubeAnim + ld a, [wLinkTradeSendmonSpecies] + ld [wTempIconSpecies], a + xor a + depixel 5, 11, 4, 0 + ld b, $0 + jr TradeAnim_InitTubeAnim + +TradeAnim_TubeToPlayer1: + ld a, TRADEANIM_LEFT_ARROW + call TradeAnim_PlaceTrademonStatsOnTubeAnim + ld a, [wLinkTradeGetmonSpecies] + ld [wTempIconSpecies], a + ld a, TRADEANIMSTATE_2 + depixel 9, 18, 4, 4 + ld b, $4 +TradeAnim_InitTubeAnim: + push bc + push de + push bc + push de + + push af + call DisableLCD + callfar ClearSpriteAnims + hlbgcoord 20, 3 + ld bc, 12 + ld a, $60 + call ByteFill + pop af + + call TradeAnim_TubeAnimJumptable + + xor a + ldh [hSCX], a + ld a, $7 + ldh [hWX], a + ld a, $70 + ldh [hWY], a + call EnableLCD + call LoadTradeBubbleGFX + + pop de + ld a, SPRITE_ANIM_INDEX_TRADEMON_ICON + call InitSpriteAnimStruct + + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + pop bc + ld [hl], b + + pop de + ld a, SPRITE_ANIM_INDEX_TRADEMON_BUBBLE + call InitSpriteAnimStruct + + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + pop bc + ld [hl], b + + call WaitBGMap + ld b, SCGB_TRADE_TUBE + call GetSGBLayout + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbBGPals + ld a, %11010000 + call DmgToCgbObjPal0 + + call TradeAnim_IncrementJumptableIndex + ld a, 92 + ld [wFrameCounter], a + ret + +TradeAnim_TubeToOT2: + call TradeAnim_FlashBGPals + ldh a, [hSCX] + add $2 + ldh [hSCX], a + cp $50 + ret nz + ld a, TRADEANIMSTATE_1 + call TradeAnim_TubeAnimJumptable + call TradeAnim_IncrementJumptableIndex + ret + +TradeAnim_TubeToOT3: + call TradeAnim_FlashBGPals + ldh a, [hSCX] + add $2 + ldh [hSCX], a + cp $a0 + ret nz + ld a, TRADEANIMSTATE_2 + call TradeAnim_TubeAnimJumptable + call TradeAnim_IncrementJumptableIndex + ret + +TradeAnim_TubeToOT4: + call TradeAnim_FlashBGPals + ldh a, [hSCX] + add $2 + ldh [hSCX], a + and a + ret nz + call TradeAnim_IncrementJumptableIndex + ret + +TradeAnim_TubeToPlayer3: + call TradeAnim_FlashBGPals + ldh a, [hSCX] + sub $2 + ldh [hSCX], a + cp $b0 + ret nz + ld a, TRADEANIMSTATE_1 + call TradeAnim_TubeAnimJumptable + call TradeAnim_IncrementJumptableIndex + ret + +TradeAnim_TubeToPlayer4: + call TradeAnim_FlashBGPals + ldh a, [hSCX] + sub $2 + ldh [hSCX], a + cp $60 + ret nz + xor a ; TRADEANIMSTATE_0 + call TradeAnim_TubeAnimJumptable + call TradeAnim_IncrementJumptableIndex + ret + +TradeAnim_TubeToPlayer5: + call TradeAnim_FlashBGPals + ldh a, [hSCX] + sub $2 + ldh [hSCX], a + and a + ret nz + call TradeAnim_IncrementJumptableIndex + ret + +TradeAnim_TubeToOT6: +TradeAnim_TubeToPlayer6: + ld a, 128 + ld [wFrameCounter], a + call TradeAnim_IncrementJumptableIndex + ret + +TradeAnim_TubeToOT8: +TradeAnim_TubeToPlayer8: + call ClearBGPalettes + call ClearTilemap + call ClearSprites + call DisableLCD + callfar ClearSpriteAnims + hlbgcoord 0, 0 + ld bc, VRAM_End - vBGMap0 + ld a, " " + call ByteFill + xor a + ldh [hSCX], a + ld a, $90 + ldh [hWY], a + call EnableLCD + call LoadTradeBallAndCableGFX + call WaitBGMap + call TradeAnim_NormalPals + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_TubeToOT5: +TradeAnim_TubeToOT7: +TradeAnim_TubeToPlayer2: +TradeAnim_TubeToPlayer7: + call TradeAnim_FlashBGPals + ld hl, wFrameCounter + ld a, [hl] + and a + jr z, .done + dec [hl] + ret + +.done + call TradeAnim_IncrementJumptableIndex + ret + +TradeAnim_GiveTrademonSFX: + call TradeAnim_AdvanceScriptPointer + ld de, SFX_GIVE_TRADEMON + call PlaySFX + ret + +TradeAnim_GetTrademonSFX: + call TradeAnim_AdvanceScriptPointer + ld de, SFX_GET_TRADEMON + call PlaySFX + ret + +TradeAnim_TubeAnimJumptable: + maskbits TRADEANIMJUMPTABLE_LENGTH + ld e, a + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: +; entries correspond to TRADEANIMSTATE_* constants + dw .Zero + dw .One + dw .Two + dw .Three + +.Zero: +.Three: + call TradeAnim_BlankTilemap + hlcoord 9, 3 + ld [hl], $5b + inc hl + ld bc, 10 + ld a, $60 + call ByteFill + hlcoord 3, 2 + call TradeAnim_CopyTradeGameBoyTilemap + ret + +.One: + call TradeAnim_BlankTilemap + hlcoord 0, 3 + ld bc, SCREEN_WIDTH + ld a, $60 + call ByteFill + ret + +.Two: + call TradeAnim_BlankTilemap + hlcoord 0, 3 + ld bc, $11 + ld a, $60 + call ByteFill + hlcoord 17, 3 + ld a, $5d + ld [hl], a + + ld a, $61 + ld de, SCREEN_WIDTH + ld c, $3 +.loop + add hl, de + ld [hl], a + dec c + jr nz, .loop + + add hl, de + ld a, $5f + ld [hld], a + ld a, $5b + ld [hl], a + hlcoord 10, 6 + call TradeAnim_CopyTradeGameBoyTilemap + ret + +TradeAnim_CopyTradeGameBoyTilemap: + ld de, TradeGameBoyTilemap + lb bc, 8, 6 + call TradeAnim_CopyBoxFromDEtoHL + ret + +TradeAnim_PlaceTrademonStatsOnTubeAnim: + push af + call ClearBGPalettes + call WaitTop + ld a, HIGH(vBGMap1) + ldh [hBGMapAddress + 1], a + call ClearTilemap + hlcoord 0, 0 + ld bc, SCREEN_WIDTH + ld a, "─" + call ByteFill + hlcoord 0, 1 + ld de, wLinkPlayer1Name + call PlaceString + ld hl, wLinkPlayer2Name + ld de, 0 +.find_name_end_loop + ld a, [hli] + cp "@" + jr z, .done + dec de + jr .find_name_end_loop + +.done + hlcoord 0, 4 + add hl, de + ld de, wLinkPlayer2Name + call PlaceString + hlcoord 7, 2 + ld bc, 6 + pop af + call ByteFill + call WaitBGMap + call WaitTop + ld a, HIGH(vBGMap0) + ldh [hBGMapAddress + 1], a + call ClearTilemap + ret + +TradeAnim_EnterLinkTube1: + call ClearTilemap + call WaitTop + ld a, $a0 + ldh [hSCX], a + call DelayFrame + hlcoord 8, 2 + ld de, TradeLinkTubeTilemap + lb bc, 3, 12 + call TradeAnim_CopyBoxFromDEtoHL + call WaitBGMap + ld b, SCGB_TRADE_TUBE + call GetSGBLayout + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbBGPals + lb de, %11100100, %11100100 ; 3,2,1,0, 3,2,1,0 + call DmgToCgbObjPals + ld de, SFX_POTION + call PlaySFX + call TradeAnim_IncrementJumptableIndex + ret + +TradeAnim_EnterLinkTube2: + ldh a, [hSCX] + and a + jr z, .done + add $4 + ldh [hSCX], a + ret + +.done + ld c, 80 + call DelayFrames + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_ExitLinkTube: + ldh a, [hSCX] + cp $a0 + jr z, .done + sub $4 + ldh [hSCX], a + ret + +.done + call ClearTilemap + xor a + ldh [hSCX], a + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_SetupGivemonScroll: + ld a, $8f + ldh [hWX], a + ld a, $88 + ldh [hSCX], a + ld a, $50 + ldh [hWY], a + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_DoGivemonScroll: + ldh a, [hWX] + cp $7 + jr z, .done + sub $4 + ldh [hWX], a + ldh a, [hSCX] + sub $4 + ldh [hSCX], a + ret + +.done + ld a, $7 + ldh [hWX], a + xor a + ldh [hSCX], a + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_FrontpicScrollStart: + ld a, $7 + ldh [hWX], a + ld a, $50 + ldh [hWY], a + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_TextboxScrollStart: + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_ScrollOutRight: + call WaitTop + ld a, HIGH(vBGMap1) + ldh [hBGMapAddress + 1], a + call WaitBGMap + ld a, $7 + ldh [hWX], a + xor a + ldh [hWY], a + call DelayFrame + call WaitTop + ld a, HIGH(vBGMap0) + ldh [hBGMapAddress + 1], a + call ClearTilemap + call TradeAnim_IncrementJumptableIndex + ret + +TradeAnim_ScrollOutRight2: + ldh a, [hWX] + cp $a1 + jr nc, .done + add $4 + ldh [hWX], a + ret + +.done + ld a, HIGH(vBGMap1) + ldh [hBGMapAddress + 1], a + call WaitBGMap + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + ld a, HIGH(vBGMap0) + ldh [hBGMapAddress + 1], a + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_ShowGivemonData: + call ShowPlayerTrademonStats + ld a, [wPlayerTrademonSpecies] + ld [wCurPartySpecies], a + ld a, [wPlayerTrademonDVs] + ld [wTempMonDVs], a + ld a, [wPlayerTrademonDVs + 1] + ld [wTempMonDVs + 1], a + ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbBGPals + call TradeAnim_ShowGivemonFrontpic + + ld a, [wPlayerTrademonSpecies] + call GetCryIndex + jr c, .skip_cry + ld e, c + ld d, b + call PlayCry +.skip_cry + + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_ShowGetmonData: + call ShowOTTrademonStats + ld a, [wOTTrademonSpecies] + ld [wCurPartySpecies], a + ld a, [wOTTrademonDVs] + ld [wTempMonDVs], a + ld a, [wOTTrademonDVs + 1] + ld [wTempMonDVs + 1], a + ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbBGPals + call TradeAnim_ShowGetmonFrontpic + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_AnimateFrontpic: + farcall AnimateTrademonFrontpic + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_GetFrontpic: + push de + push af + predef GetUnownLetter + pop af + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call GetBaseData + pop de + predef GetMonFrontpic + ret + +TradeAnim_GetNicknamename: + push de + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wStringBuffer1 + pop de + ld bc, NAME_LENGTH + call CopyBytes + ret + +TradeAnim_ShowGivemonFrontpic: + ld de, vTiles0 + jr TradeAnim_ShowFrontpic + +TradeAnim_ShowGetmonFrontpic: + ld de, vTiles0 tile $31 +TradeAnim_ShowFrontpic: + call DelayFrame + ld hl, vTiles2 + lb bc, 10, $31 + call Request2bpp + call WaitTop + call TradeAnim_BlankTilemap + hlcoord 7, 2 + xor a + ldh [hGraphicStartTile], a + lb bc, 7, 7 + predef PlaceGraphic + call WaitBGMap + ret + +TradeAnim_Wait80: + ld c, 80 + call DelayFrames + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_Wait40: + ld c, 40 + call DelayFrames + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_Wait96: + ld c, 96 + call DelayFrames + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_Wait80IfOTEgg: + call IsOTTrademonEgg + ret nz + ld c, 80 + call DelayFrames + ret + +TradeAnim_Wait180IfOTEgg: + call IsOTTrademonEgg + ret nz + ld c, 180 + call DelayFrames + ret + +IsOTTrademonEgg: + call TradeAnim_AdvanceScriptPointer + ld a, [wOTTrademonSpecies] + cp EGG + ret + +ShowPlayerTrademonStats: + ld de, wPlayerTrademonSpecies + ld a, [de] + cp EGG + jr z, TrademonStats_Egg + call TrademonStats_MonTemplate + ld de, wPlayerTrademonSpecies + call TrademonStats_PrintSpeciesNumber + ld de, wPlayerTrademonSpeciesName + call TrademonStats_PrintSpeciesName + ld a, [wPlayerTrademonCaughtData] + ld de, wPlayerTrademonOTName + call TrademonStats_PrintOTName + ld de, wPlayerTrademonID + call TrademonStats_PrintTrademonID + call TrademonStats_WaitBGMap + ret + +ShowOTTrademonStats: + ld de, wOTTrademonSpecies + ld a, [de] + cp EGG + jr z, TrademonStats_Egg + call TrademonStats_MonTemplate + ld de, wOTTrademonSpecies + call TrademonStats_PrintSpeciesNumber + ld de, wOTTrademonSpeciesName + call TrademonStats_PrintSpeciesName + ld a, [wOTTrademonCaughtData] + ld de, wOTTrademonOTName + call TrademonStats_PrintOTName + ld de, wOTTrademonID + call TrademonStats_PrintTrademonID + call TrademonStats_WaitBGMap + ret + +TrademonStats_MonTemplate: + call WaitTop + call TradeAnim_BlankTilemap + ld a, HIGH(vBGMap1) + ldh [hBGMapAddress + 1], a + hlcoord 3, 0 + ld b, $6 + ld c, $d + call Textbox + hlcoord 4, 0 + ld de, .OTMonData + call PlaceString + ret + +.OTMonData: + db "─── №." + next "" + next "OT/" + next "№.@" + +TrademonStats_Egg: + call WaitTop + call TradeAnim_BlankTilemap + ld a, HIGH(vBGMap1) + ldh [hBGMapAddress + 1], a + hlcoord 3, 0 + ld b, 6 + ld c, 13 + call Textbox + hlcoord 4, 2 + ld de, .EggData + call PlaceString + call TrademonStats_WaitBGMap + ret + +.EggData: + db "EGG" + next "OT/?????" + next "№.?????@" + +TrademonStats_WaitBGMap: + call WaitBGMap + call WaitTop + ld a, HIGH(vBGMap0) + ldh [hBGMapAddress + 1], a + ret + +TrademonStats_PrintSpeciesNumber: +; input de = address to species number + ld a, [de] + call GetPokemonIndexFromID + ld a, h + ld h, l + ld l, a + push hl + ld hl, sp + 0 + ld d, h + ld e, l + hlcoord 10, 0 + lb bc, PRINTNUM_LEADINGZEROS | 2, 3 + call PrintNum + pop de + ld [hl], " " + ret + +TrademonStats_PrintSpeciesName: + hlcoord 4, 2 + call PlaceString + ret + +TrademonStats_PrintOTName: + cp 3 + jr c, .caught_gender_okay + xor a +.caught_gender_okay + push af + hlcoord 7, 4 + call PlaceString + inc bc + pop af + ld hl, .Gender + ld d, 0 + ld e, a + add hl, de + ld a, [hl] + ld [bc], a + ret + +.Gender: + db " ", "♂", "♀" + +TrademonStats_PrintTrademonID: + hlcoord 7, 6 + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + ret + +TradeAnim_RockingBall: + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_TRADE_POKE_BALL + call InitSpriteAnimStruct + call TradeAnim_AdvanceScriptPointer + ld a, 32 + ld [wFrameCounter], a + ret + +TradeAnim_DropBall: + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_TRADE_POKE_BALL + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], $1 + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], $dc + call TradeAnim_AdvanceScriptPointer + ld a, 56 + ld [wFrameCounter], a + ret + +TradeAnim_Poof: + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_TRADE_POOF + call InitSpriteAnimStruct + call TradeAnim_AdvanceScriptPointer + ld a, 16 + ld [wFrameCounter], a + ld de, SFX_BALL_POOF + call PlaySFX + ret + +TradeAnim_BulgeThroughTube: + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbObjPal0 + depixel 5, 11 + ld a, SPRITE_ANIM_INDEX_TRADE_TUBE_BULGE + call InitSpriteAnimStruct + call TradeAnim_AdvanceScriptPointer + ld a, 64 + ld [wFrameCounter], a + ret + +TradeAnim_AnimateTrademonInTube: + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld e, [hl] + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: + dw .InitTimer + dw .WaitTimer1 + dw .MoveRight + dw .MoveDown + dw .MoveUp + dw .MoveLeft + dw .WaitTimer2 + +.JumptableNext: + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + inc [hl] + ret + +.InitTimer: + call .JumptableNext + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $80 + ret + +.WaitTimer1: + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + dec [hl] + and a + ret nz + call .JumptableNext + +.MoveRight: + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $94 + jr nc, .done_move_right + inc [hl] + ret + +.done_move_right + call .JumptableNext + +.MoveDown: + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + cp $4c + jr nc, .done_move_down + inc [hl] + ret + +.done_move_down + ld hl, SPRITEANIMSTRUCT_INDEX + add hl, bc + ld [hl], $0 + ret + +.MoveUp: + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + cp $2c + jr z, .done_move_up + dec [hl] + ret + +.done_move_up + call .JumptableNext + +.MoveLeft: + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld a, [hl] + cp $58 + jr z, .done_move_left + dec [hl] + ret + +.done_move_left + call .JumptableNext + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld [hl], $80 + ret + +.WaitTimer2: + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, [hl] + dec [hl] + and a + ret nz + ld hl, SPRITEANIMSTRUCT_INDEX + add hl, bc + ld [hl], $0 + ret + +TradeAnim_SentToOTText: + ld a, [wLinkMode] + cp LINK_TIMECAPSULE + jr z, .time_capsule + ld hl, .MonNameSentToText + call PrintText + ld c, 189 + call DelayFrames + ld hl, .MonWasSentToText + call PrintText + call TradeAnim_Wait80Frames + ld c, 128 + call DelayFrames + call TradeAnim_AdvanceScriptPointer + ret + +.time_capsule + ld hl, .MonWasSentToText + call PrintText + call TradeAnim_Wait80Frames + call TradeAnim_AdvanceScriptPointer + ret + +.MonWasSentToText: + text_far _MonWasSentToText + text_end + +.MonNameSentToText: + text_far _MonNameSentToText + text_end + +TradeAnim_OTBidsFarewell: + ld hl, .BidsFarewellToMonText + call PrintText + call TradeAnim_Wait80Frames + ld hl, .MonNameBidsFarewellText + call PrintText + call TradeAnim_Wait80Frames + call TradeAnim_AdvanceScriptPointer + ret + +.BidsFarewellToMonText: + text_far _BidsFarewellToMonText + text_end + +.MonNameBidsFarewellText: + text_far _MonNameBidsFarewellText + text_end + +TradeAnim_TakeCareOfText: + call WaitTop + hlcoord 0, 10 + ld bc, 8 * SCREEN_WIDTH + ld a, " " + call ByteFill + call WaitBGMap + ld hl, .TakeGoodCareOfMonText + call PrintText + call TradeAnim_Wait80Frames + call TradeAnim_AdvanceScriptPointer + ret + +.TakeGoodCareOfMonText: + text_far _TakeGoodCareOfMonText + text_end + +TradeAnim_OTSendsText1: + ld hl, .ForYourMonSendsText + call PrintText + call TradeAnim_Wait80Frames + ld hl, .OTSendsText + call PrintText + call TradeAnim_Wait80Frames + ld c, 14 + call DelayFrames + call TradeAnim_AdvanceScriptPointer + ret + +.ForYourMonSendsText: + text_far _ForYourMonSendsText + text_end + +.OTSendsText: + text_far _OTSendsText + text_end + +TradeAnim_OTSendsText2: + ld hl, .WillTradeText + call PrintText + call TradeAnim_Wait80Frames + ld hl, .ForYourMonWillTradeText + call PrintText + call TradeAnim_Wait80Frames + ld c, 14 + call DelayFrames + call TradeAnim_AdvanceScriptPointer + ret + +.WillTradeText: + text_far _WillTradeText + text_end + +.ForYourMonWillTradeText: + text_far _ForYourMonWillTradeText + text_end + +TradeAnim_Wait80Frames: + ld c, 80 + call DelayFrames + ret + +TradeAnim_BlankTilemap: + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, " " + call ByteFill + ret + +TradeAnim_CopyBoxFromDEtoHL: +.row + push bc + push hl +.col + ld a, [de] + inc de + ld [hli], a + dec c + jr nz, .col + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + ret + +TradeAnim_NormalPals: + ldh a, [hSGB] + and a + ld a, %11100100 ; 3,2,1,0 + jr z, .not_sgb + ld a, $f0 + +.not_sgb + call DmgToCgbObjPal0 + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbBGPals + ret + +LinkTradeAnim_LoadTradePlayerNames: + push de + ld de, wLinkPlayer1Name + ld bc, NAME_LENGTH + call CopyBytes + pop hl + ld de, wLinkPlayer2Name + ld bc, NAME_LENGTH + call CopyBytes + ret + +LinkTradeAnim_LoadTradeMonSpecies: + ld a, [hl] + ld [wLinkTradeSendmonSpecies], a + ld a, [de] + ld [wLinkTradeGetmonSpecies], a + ret + +TradeAnim_FlashBGPals: + ld a, [wFrameCounter2] + and $7 + ret nz + ldh a, [rBGP] + xor %00111100 + call DmgToCgbBGPals + ret + +LoadTradeBallAndCableGFX: + call DelayFrame + ld de, TradeBallGFX + ld hl, vTiles0 tile $62 + lb bc, BANK(TradeBallGFX), 6 + call Request2bpp + ld de, TradePoofGFX + ld hl, vTiles0 tile $68 + lb bc, BANK(TradePoofGFX), 12 + call Request2bpp + ld de, TradeCableGFX + ld hl, vTiles0 tile $74 + lb bc, BANK(TradeCableGFX), 4 + call Request2bpp + xor a ; SPRITE_ANIM_DICT_DEFAULT + ld hl, wSpriteAnimDict + ld [hli], a + ld [hl], $62 + ret + +LoadTradeBubbleGFX: + call DelayFrame + ld e, MONICON_TRADE + callfar LoadMenuMonIcon + ld de, TradeBubbleGFX + ld hl, vTiles0 tile $72 + lb bc, BANK(TradeBubbleGFX), 4 + call Request2bpp + xor a ; SPRITE_ANIM_DICT_DEFAULT + ld hl, wSpriteAnimDict + ld [hli], a + ld [hl], $62 + ret + +TradeAnim_WaitAnim: + ld hl, wFrameCounter + ld a, [hl] + and a + jr z, .done + dec [hl] + ret + +.done + call TradeAnim_AdvanceScriptPointer + ret + +TradeAnim_WaitAnim2: + ld hl, wFrameCounter + ld a, [hl] + and a + jr z, .done + dec [hl] + ret + +.done + call TradeAnim_AdvanceScriptPointer + ret + +TradeGameBoyTilemap: INCBIN "gfx/trade/game_boy.tilemap" ; 6x8 +TradeLinkTubeTilemap: INCBIN "gfx/trade/link_cable.tilemap" ; 12x3 + +TradeArrowRightGFX: INCBIN "gfx/trade/arrow_right.2bpp" +TradeArrowLeftGFX: INCBIN "gfx/trade/arrow_left.2bpp" +TradeCableGFX: INCBIN "gfx/trade/cable.2bpp" +TradeBubbleGFX: INCBIN "gfx/trade/bubble.2bpp" +TradeGameBoyLZ: INCBIN "gfx/trade/game_boy_cable.2bpp.lz" +TradeBallGFX: INCBIN "gfx/trade/ball.2bpp" +TradePoofGFX: INCBIN "gfx/trade/poof.2bpp" diff --git a/engine/overworld/cmd_queue.asm b/engine/overworld/cmd_queue.asm new file mode 100644 index 0000000..cfc0776 --- /dev/null +++ b/engine/overworld/cmd_queue.asm @@ -0,0 +1,301 @@ +ClearCmdQueue:: + ld hl, wCmdQueue + ld de, CMDQUEUE_ENTRY_SIZE + ld c, CMDQUEUE_CAPACITY + xor a +.loop + ld [hl], a + add hl, de + dec c + jr nz, .loop + ret + +HandleCmdQueue:: + ld hl, wCmdQueue + xor a +.loop + ldh [hMapObjectIndex], a + ld a, [hl] + and a + jr z, .skip + push hl + ld b, h + ld c, l + call HandleQueuedCommand + pop hl + +.skip + ld de, CMDQUEUE_ENTRY_SIZE + add hl, de + ldh a, [hMapObjectIndex] + inc a + cp CMDQUEUE_CAPACITY + jr nz, .loop + ret + +GetNthCmdQueueEntry: ; unreferenced + ld hl, wCmdQueue + ld bc, CMDQUEUE_ENTRY_SIZE + call AddNTimes + ld b, h + ld c, l + ret + +WriteCmdQueue:: + push bc + push de + call .GetNextEmptyEntry + ld d, h + ld e, l + pop hl + pop bc + ret c + ld a, b + ld bc, CMDQUEUE_ENTRY_SIZE - 1 + call FarCopyBytes + xor a + ld [hl], a + ret + +.GetNextEmptyEntry: + ld hl, wCmdQueue + ld de, CMDQUEUE_ENTRY_SIZE + ld c, CMDQUEUE_CAPACITY +.loop + ld a, [hl] + and a + jr z, .done + add hl, de + dec c + jr nz, .loop + scf + ret + +.done + ld a, CMDQUEUE_CAPACITY + sub c + and a + ret + +DelCmdQueue:: + ld hl, wCmdQueue + ld de, CMDQUEUE_ENTRY_SIZE + ld c, CMDQUEUE_CAPACITY +.loop + ld a, [hl] + cp b + jr z, .done + add hl, de + dec c + jr nz, .loop + and a + ret + +.done + xor a + ld [hl], a + scf + ret + +_DelCmdQueue: + ld hl, CMDQUEUE_TYPE + add hl, bc + ld [hl], 0 + ret + +HandleQueuedCommand: + ld hl, CMDQUEUE_TYPE + add hl, bc + ld a, [hl] + cp NUM_CMDQUEUE_TYPES + jr c, .okay + xor a + +.okay + ld e, a + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + add hl, de + ld a, [hli] + push af + ld a, [hli] + ld h, [hl] + ld l, a + pop af + rst FarCall + ret + +.Jumptable: + dba CmdQueue_Null + dba CmdQueue_Type1 + dba CmdQueue_StoneTable + dba CmdQueue_Type3 + dba CmdQueue_Type4 + +CmdQueues_AnonJumptable: + ld hl, CMDQUEUE_JUMPTABLE_INDEX + add hl, bc + ld a, [hl] + pop hl + rst JumpTable + ret + +CmdQueues_IncAnonJumptableIndex: + ld hl, CMDQUEUE_JUMPTABLE_INDEX + add hl, bc + inc [hl] + ret + +CmdQueues_DecAnonJumptableIndex: + ld hl, CMDQUEUE_JUMPTABLE_INDEX + add hl, bc + dec [hl] + ret + +CmdQueue_Null: + ret + +CmdQueue_Type1: + ret + +CmdQueue_Type4: + call CmdQueues_AnonJumptable +.anon_dw + dw .zero + dw .one + +.zero + ldh a, [hSCY] + ld hl, CMDQUEUE_04 + add hl, bc + ld [hl], a + call CmdQueues_IncAnonJumptableIndex +.one + ld hl, CMDQUEUE_ADDR + add hl, bc + ld a, [hl] + dec a + ld [hl], a + jr z, .finish + and 1 + jr z, .add + ld hl, CMDQUEUE_02 + add hl, bc + ldh a, [hSCY] + sub [hl] + ldh [hSCY], a + ret + +.add + ld hl, CMDQUEUE_02 + add hl, bc + ldh a, [hSCY] + add [hl] + ldh [hSCY], a + ret + +.finish + ld hl, CMDQUEUE_04 + add hl, bc + ld a, [hl] + ldh [hSCY], a + call _DelCmdQueue + ret + +CmdQueue_Type3: + call CmdQueues_AnonJumptable +.anon_dw + dw .zero + dw .one + dw .two + +.zero + call .IsPlayerFacingDown + jr z, .PlayerNotFacingDown + call CmdQueues_IncAnonJumptableIndex +.one + call .IsPlayerFacingDown + jr z, .PlayerNotFacingDown + call CmdQueues_IncAnonJumptableIndex + + ld hl, CMDQUEUE_02 + add hl, bc + ld a, [hl] + ld [wd173], a + ret + +.two + call .IsPlayerFacingDown + jr z, .PlayerNotFacingDown + call CmdQueues_DecAnonJumptableIndex + + ld hl, CMDQUEUE_03 + add hl, bc + ld a, [hl] + ld [wd173], a + ret + +.PlayerNotFacingDown: + ld a, $7f + ld [wd173], a + ld hl, CMDQUEUE_JUMPTABLE_INDEX + add hl, bc + ld [hl], 0 + ret + +.IsPlayerFacingDown: + push bc + ld bc, wPlayerStruct + call GetSpriteDirection + and a + pop bc + ret + +CmdQueue_StoneTable: + ld de, wPlayerStruct + ld a, NUM_OBJECT_STRUCTS +.loop + push af + + ld hl, OBJECT_SPRITE + add hl, de + ld a, [hl] + and a + jr z, .next + + ld hl, OBJECT_MOVEMENT_TYPE + add hl, de + ld a, [hl] + cp SPRITEMOVEDATA_STRENGTH_BOULDER + jr nz, .next + + ld hl, OBJECT_TILE + add hl, de + ld a, [hl] + call CheckPitTile + jr nz, .next + + ld hl, OBJECT_WALKING + add hl, de + ld a, [hl] + cp STANDING + jr nz, .next + call HandleStoneQueue + jr c, .fall_down_hole + +.next + ld hl, OBJECT_LENGTH + add hl, de + ld d, h + ld e, l + + pop af + dec a + jr nz, .loop + ret + +.fall_down_hole + pop af + ret diff --git a/engine/overworld/decorations.asm b/engine/overworld/decorations.asm new file mode 100644 index 0000000..ce13456 --- /dev/null +++ b/engine/overworld/decorations.asm @@ -0,0 +1,1198 @@ +InitDecorations: + ld a, DECO_FEATHERY_BED + ld [wDecoBed], a + ld a, DECO_TOWN_MAP + ld [wDecoPoster], a + ret + +_PlayerDecorationMenu: + ld a, [wWhichIndexSet] + push af + ld hl, .MenuHeader + call LoadMenuHeader + xor a ; FALSE + ld [wChangedDecorations], a + ld a, $1 ; bed + ld [wCurDecorationCategory], a +.top_loop + ld a, [wCurDecorationCategory] + ld [wMenuCursorPosition], a + call .FindCategoriesWithOwnedDecos + call DoNthMenu + ld a, [wMenuCursorY] + ld [wCurDecorationCategory], a + jr c, .exit_menu + ld a, [wMenuSelection] + ld hl, .category_pointers + call MenuJumptable + jr nc, .top_loop + +.exit_menu + call ExitMenu + pop af + ld [wWhichIndexSet], a + ld a, [wChangedDecorations] + ld c, a + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 5, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_WRAP ; flags + db 0 ; items + dw wNumOwnedDecoCategories + dw PlaceNthMenuStrings + dw .category_pointers + +.category_pointers: + table_width 2 + 2, _PlayerDecorationMenu.category_pointers + dw DecoBedMenu, .bed + dw DecoCarpetMenu, .carpet + dw DecoPlantMenu, .plant + dw DecoPosterMenu, .poster + dw DecoConsoleMenu, .game + dw DecoOrnamentMenu, .ornament + dw DecoBigDollMenu, .big_doll + dw DecoExitMenu, .exit + assert_table_length NUM_DECO_CATEGORIES + 1 + +.bed: db "BED@" +.carpet: db "CARPET@" +.plant: db "PLANT@" +.poster: db "POSTER@" +.game: db "GAME CONSOLE@" +.ornament: db "ORNAMENT@" +.big_doll: db "BIG DOLL@" +.exit: db "EXIT@" + +.FindCategoriesWithOwnedDecos: + xor a + ld [wWhichIndexSet], a + call .ClearStringBuffer2 + call .FindOwnedDecos + ld a, 7 + call .AppendToStringBuffer2 + ld hl, wStringBuffer2 + ld de, wDecoNameBuffer + ld bc, ITEM_NAME_LENGTH + call CopyBytes + ret + +.ClearStringBuffer2: + ld hl, wStringBuffer2 + xor a + ld [hli], a + ld bc, ITEM_NAME_LENGTH - 1 + ld a, -1 + call ByteFill + ret + +.AppendToStringBuffer2: + ld hl, wStringBuffer2 + inc [hl] + ld e, [hl] + ld d, 0 + add hl, de + ld [hl], a + ret + +.FindOwnedDecos: + ld hl, .owned_pointers +.loop + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + or e + jr z, .done + push hl + call _de_ + pop hl + jr nc, .next + ld a, [hl] + push hl + call .AppendToStringBuffer2 + pop hl +.next + inc hl + jr .loop +.done + ret + +.owned_pointers: + table_width 3, _PlayerDecorationMenu.owned_pointers + dwb FindOwnedBeds, 0 ; bed + dwb FindOwnedCarpets, 1 ; carpet + dwb FindOwnedPlants, 2 ; plant + dwb FindOwnedPosters, 3 ; poster + dwb FindOwnedConsoles, 4 ; game console + dwb FindOwnedOrnaments, 5 ; ornament + dwb FindOwnedBigDolls, 6 ; big doll + assert_table_length NUM_DECO_CATEGORIES + dw 0 ; end + +Deco_FillTempWithMinusOne: + xor a + ld hl, wNumOwnedDecoCategories + ld [hli], a + assert wNumOwnedDecoCategories + 1 == wOwnedDecoCategories + ld a, -1 + ld bc, 16 + call ByteFill + ret + +CheckAllDecorationFlags: +.loop + ld a, [hli] + cp -1 + jr z, .done + push hl + push af + ld b, CHECK_FLAG + call DecorationFlagAction + ld a, c + and a + pop bc + ld a, b + call nz, AppendDecoIndex + pop hl + jr .loop + +.done + ret + +AppendDecoIndex: + ld hl, wNumOwnedDecoCategories + inc [hl] + assert wNumOwnedDecoCategories + 1 == wOwnedDecoCategories + ld e, [hl] + ld d, 0 + add hl, de + ld [hl], a + ret + +FindOwnedDecosInCategory: + push bc + push hl + call Deco_FillTempWithMinusOne + pop hl + call CheckAllDecorationFlags + pop bc + ld a, [wNumOwnedDecoCategories] + and a + ret z + + ld a, c + call AppendDecoIndex + ld a, 0 + call AppendDecoIndex + scf + ret + +DecoBedMenu: + call FindOwnedBeds + call PopulateDecoCategoryMenu + xor a + ret + +FindOwnedBeds: + ld hl, .beds + ld c, BEDS + jp FindOwnedDecosInCategory + +.beds: + db DECO_FEATHERY_BED ; 2 + db DECO_PINK_BED ; 3 + db DECO_POLKADOT_BED ; 4 + db DECO_PIKACHU_BED ; 5 + db -1 + +DecoCarpetMenu: + call FindOwnedCarpets + call PopulateDecoCategoryMenu + xor a + ret + +FindOwnedCarpets: + ld hl, .carpets + ld c, CARPETS + jp FindOwnedDecosInCategory + +.carpets: + db DECO_RED_CARPET ; 7 + db DECO_BLUE_CARPET ; 8 + db DECO_YELLOW_CARPET ; 9 + db DECO_GREEN_CARPET ; a + db -1 + +DecoPlantMenu: + call FindOwnedPlants + call PopulateDecoCategoryMenu + xor a + ret + +FindOwnedPlants: + ld hl, .plants + ld c, PLANTS + jp FindOwnedDecosInCategory + +.plants: + db DECO_MAGNAPLANT ; c + db DECO_TROPICPLANT ; d + db DECO_JUMBOPLANT ; e + db -1 + +DecoPosterMenu: + call FindOwnedPosters + call PopulateDecoCategoryMenu + xor a + ret + +FindOwnedPosters: + ld hl, .posters + ld c, POSTERS + jp FindOwnedDecosInCategory + +.posters: + db DECO_TOWN_MAP ; 10 + db DECO_PIKACHU_POSTER ; 11 + db DECO_CLEFAIRY_POSTER ; 12 + db DECO_JIGGLYPUFF_POSTER ; 13 + db -1 + +DecoConsoleMenu: + call FindOwnedConsoles + call PopulateDecoCategoryMenu + xor a + ret + +FindOwnedConsoles: + ld hl, .consoles + ld c, CONSOLES + jp FindOwnedDecosInCategory + +.consoles: + db DECO_FAMICOM ; 15 + db DECO_SNES ; 16 + db DECO_N64 ; 17 + db DECO_VIRTUAL_BOY ; 18 + db -1 + +DecoOrnamentMenu: + call FindOwnedOrnaments + call PopulateDecoCategoryMenu + xor a + ret + +FindOwnedOrnaments: + ld hl, .ornaments + ld c, DOLLS + jp FindOwnedDecosInCategory + +.ornaments: + db DECO_PIKACHU_DOLL ; 1e + db DECO_SURF_PIKACHU_DOLL ; 1f + db DECO_CLEFAIRY_DOLL ; 20 + db DECO_JIGGLYPUFF_DOLL ; 21 + db DECO_BULBASAUR_DOLL ; 22 + db DECO_CHARMANDER_DOLL ; 23 + db DECO_SQUIRTLE_DOLL ; 24 + db DECO_POLIWAG_DOLL ; 25 + db DECO_DIGLETT_DOLL ; 26 + db DECO_STARMIE_DOLL ; 27 + db DECO_MAGIKARP_DOLL ; 28 + db DECO_ODDISH_DOLL ; 29 + db DECO_GENGAR_DOLL ; 2a + db DECO_SHELLDER_DOLL ; 2b + db DECO_GRIMER_DOLL ; 2c + db DECO_VOLTORB_DOLL ; 2d + db DECO_WEEDLE_DOLL ; 2e + db DECO_UNOWN_DOLL ; 2f + db DECO_GEODUDE_DOLL ; 30 + db DECO_MACHOP_DOLL ; 31 + db DECO_TENTACOOL_DOLL ; 32 + db DECO_GOLD_TROPHY_DOLL ; 33 + db DECO_SILVER_TROPHY_DOLL ; 34 + db -1 + +DecoBigDollMenu: + call FindOwnedBigDolls + call PopulateDecoCategoryMenu + xor a + ret + +FindOwnedBigDolls: + ld hl, .big_dolls + ld c, BIG_DOLLS + jp FindOwnedDecosInCategory + +.big_dolls: + db DECO_BIG_SNORLAX_DOLL ; 1a + db DECO_BIG_ONIX_DOLL ; 1b + db DECO_BIG_LAPRAS_DOLL ; 1c + db -1 + +DecoExitMenu: + scf + ret + +PopulateDecoCategoryMenu: + ld a, [wNumOwnedDecoCategories] + and a + jr z, .empty + cp 8 + jr nc, .beyond_eight + xor a + ld [wWhichIndexSet], a + ld hl, .NonscrollingMenuHeader + call LoadMenuHeader + call DoNthMenu + jr c, .no_action_1 + call DoDecorationAction2 + +.no_action_1 + call ExitMenu + ret + +.beyond_eight + ld hl, wNumOwnedDecoCategories + ld e, [hl] + dec [hl] + assert wNumOwnedDecoCategories + 1 == wOwnedDecoCategories + ld d, 0 + add hl, de + ld [hl], -1 + call LoadStandardMenuHeader + ld hl, .ScrollingMenuHeader + call CopyMenuHeader + xor a + ldh [hBGMapMode], a + call InitScrollingMenu + xor a + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuJoypad] + cp B_BUTTON + jr z, .no_action_2 + call DoDecorationAction2 + +.no_action_2 + call ExitMenu + ret + +.empty + ld hl, .NothingToChooseText + call MenuTextboxBackup + ret + +.NothingToChooseText: + text_far _NothingToChooseText + text_end + +.NonscrollingMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .NonscrollingMenuData + db 1 ; default option + +.NonscrollingMenuData: + db STATICMENU_CURSOR | STATICMENU_WRAP ; flags + db 0 ; items + dw wDecoNameBuffer + dw DecorationMenuFunction + dw DecorationAttributes + +.ScrollingMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 1, 1, SCREEN_WIDTH - 2, SCREEN_HEIGHT - 2 + dw .ScrollingMenuData + db 1 ; default option + +.ScrollingMenuData: + db SCROLLINGMENU_DISPLAY_ARROWS ; flags + db 8, 0 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dbw 0, wNumOwnedDecoCategories + dba DecorationMenuFunction + dbw 0, NULL + dbw 0, NULL + +GetDecorationData: + ld hl, DecorationAttributes + ld bc, DECOATTR_STRUCT_LENGTH + call AddNTimes + ret + +GetDecorationName: + push hl + call GetDecorationData + call GetDecoName + pop hl + call CopyName2 + ret + +DecorationMenuFunction: + ld a, [wMenuSelection] + push de + call GetDecorationData + call GetDecoName + pop hl + call PlaceString + ret + +DoDecorationAction2: + ld a, [wMenuSelection] + call GetDecorationData + ld de, DECOATTR_ACTION + add hl, de + ld a, [hl] + ld hl, .DecoActions + rst JumpTable + ret + +.DecoActions: + table_width 2, DoDecorationAction2.DecoActions + dw DecoAction_nothing + dw DecoAction_setupbed + dw DecoAction_putawaybed + dw DecoAction_setupcarpet + dw DecoAction_putawaycarpet + dw DecoAction_setupplant + dw DecoAction_putawayplant + dw DecoAction_setupposter + dw DecoAction_putawayposter + dw DecoAction_setupconsole + dw DecoAction_putawayconsole + dw DecoAction_setupbigdoll + dw DecoAction_putawaybigdoll + dw DecoAction_setupornament + dw DecoAction_putawayornament + assert_table_length NUM_DECO_ACTIONS + 1 + +GetDecorationFlag: + call GetDecorationData + ld de, DECOATTR_EVENT_FLAG + add hl, de + ld a, [hli] + ld d, [hl] + ld e, a + ret + +DecorationFlagAction: + push bc + call GetDecorationFlag + pop bc + call EventFlagAction + ret + +GetDecorationSprite: + ld a, c + call GetDecorationData + ld de, DECOATTR_SPRITE + add hl, de + ld a, [hl] + ld c, a + ret + +INCLUDE "data/decorations/attributes.asm" + +INCLUDE "data/decorations/names.asm" + +GetDecoName: + ld a, [hli] ; DECOATTR_TYPE + ld e, [hl] ; DECOATTR_NAME + ld bc, wStringBuffer2 + push bc + ld hl, .NameFunctions + rst JumpTable + pop de + ret + +.NameFunctions: + table_width 2, GetDecoName.NameFunctions + dw .invalid + dw .plant + dw .bed + dw .carpet + dw .poster + dw .doll + dw .bigdoll + assert_table_length NUM_DECO_TYPES + 1 + +.invalid: + ret + +.plant: + ld a, e + jr .getdeconame + +.bed: + call .plant + ld a, _BED + jr .getdeconame + +.carpet: + call .plant + ld a, _CARPET + jr .getdeconame + +.poster: + ld a, e + call .getpokename + ld a, _POSTER + jr .getdeconame + +.doll: + ld a, e + call .getpokename + ld a, _DOLL + jr .getdeconame + +.bigdoll: + push de + ld a, BIG_ + call .getdeconame + pop de + ld a, e + jr .getpokename + +.unused: ; unreferenced + push de + call .getdeconame + pop de + ld a, e + jr .getdeconame + +.getpokename: + push bc + ld c, a + ld b, 0 + ld hl, DecorationAttributePokemonNames + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + ld [wNamedObjectIndex], a + call GetPokemonName + pop bc + jr .copy + +.getdeconame: + call ._getdeconame + jr .copy + +._getdeconame: + push bc + ld hl, DecorationNames + call GetNthString + ld d, h + ld e, l + pop bc + ret + +.copy: + ld h, b + ld l, c + call CopyName2 + dec hl + ld b, h + ld c, l + ret + +DecoAction_nothing: + scf + ret + +DecoAction_setupbed: + ld hl, wDecoBed + jp DecoAction_TrySetItUp + +DecoAction_putawaybed: + ld hl, wDecoBed + jp DecoAction_TryPutItAway + +DecoAction_setupcarpet: + ld hl, wDecoCarpet + jp DecoAction_TrySetItUp + +DecoAction_putawaycarpet: + ld hl, wDecoCarpet + jp DecoAction_TryPutItAway + +DecoAction_setupplant: + ld hl, wDecoPlant + jp DecoAction_TrySetItUp + +DecoAction_putawayplant: + ld hl, wDecoPlant + jp DecoAction_TryPutItAway + +DecoAction_setupposter: + ld hl, wDecoPoster + jp DecoAction_TrySetItUp + +DecoAction_putawayposter: + ld hl, wDecoPoster + jp DecoAction_TryPutItAway + +DecoAction_setupconsole: + ld hl, wDecoConsole + jp DecoAction_TrySetItUp + +DecoAction_putawayconsole: + ld hl, wDecoConsole + jp DecoAction_TryPutItAway + +DecoAction_setupbigdoll: + ld hl, wDecoBigDoll + jp DecoAction_TrySetItUp + +DecoAction_putawaybigdoll: + ld hl, wDecoBigDoll + jp DecoAction_TryPutItAway + +DecoAction_TrySetItUp: + ld a, [hl] + ld [wCurDecoration], a + push hl + call DecoAction_SetItUp + jr c, .failed + ld a, TRUE + ld [wChangedDecorations], a + pop hl + ld a, [wMenuSelection] + ld [hl], a + xor a + ret + +.failed + pop hl + xor a + ret + +DecoAction_SetItUp: +; See if there's anything of the same type already out + ld a, [wCurDecoration] + and a + jr z, .nothingthere +; See if that item is already out + ld b, a + ld a, [wMenuSelection] + cp b + jr z, .alreadythere +; Put away the item that's already out, and set up the new one + ld a, [wMenuSelection] + ld hl, wStringBuffer4 + call GetDecorationName + ld a, [wCurDecoration] + ld hl, wStringBuffer3 + call GetDecorationName + ld hl, PutAwayAndSetUpText + call MenuTextboxBackup + xor a + ret + +.nothingthere + ld a, [wMenuSelection] + ld hl, wStringBuffer3 + call GetDecorationName + ld hl, SetUpTheDecoText + call MenuTextboxBackup + xor a + ret + +.alreadythere + ld hl, AlreadySetUpText + call MenuTextboxBackup + scf + ret + +DecoAction_TryPutItAway: +; If there is no item of that type already set, there is nothing to put away. + ld a, [hl] + ld [wCurDecoration], a + xor a + ld [hl], a + ld a, [wCurDecoration] + and a + jr z, .nothingthere +; Put it away. + ld a, TRUE + ld [wChangedDecorations], a + ld a, [wCurDecoration] + ld [wMenuSelection], a + ld hl, wStringBuffer3 + call GetDecorationName + ld hl, PutAwayTheDecoText + call MenuTextboxBackup + xor a + ret + +.nothingthere + ld hl, NothingToPutAwayText + call MenuTextboxBackup + xor a + ret + +DecoAction_setupornament: + ld hl, WhichSidePutOnText + call DecoAction_AskWhichSide + jr c, .cancel + call DecoAction_SetItUp_Ornament + jr c, .cancel + ld a, TRUE + ld [wChangedDecorations], a + jr DecoAction_FinishUp_Ornament + +.cancel + xor a + ret + +DecoAction_putawayornament: + ld hl, WhichSidePutAwayText + call DecoAction_AskWhichSide + jr nc, .incave + xor a + ret + +.incave + call DecoAction_PutItAway_Ornament + +DecoAction_FinishUp_Ornament: + call QueryWhichSide + ld a, [wSelectedDecoration] + ld [hl], a + ld a, [wOtherDecoration] + ld [de], a + xor a + ret + +DecoAction_SetItUp_Ornament: + ld a, [wSelectedDecoration] + and a + jr z, .nothingthere + ld b, a + ld a, [wMenuSelection] + cp b + jr z, .failed + ld a, b + ld hl, wStringBuffer3 + call GetDecorationName + ld a, [wMenuSelection] + ld hl, wStringBuffer4 + call GetDecorationName + ld a, [wMenuSelection] + ld [wSelectedDecoration], a + call .getwhichside + ld hl, PutAwayAndSetUpText + call MenuTextboxBackup + xor a + ret + +.nothingthere + ld a, [wMenuSelection] + ld [wSelectedDecoration], a + call .getwhichside + ld a, [wMenuSelection] + ld hl, wStringBuffer3 + call GetDecorationName + ld hl, SetUpTheDecoText + call MenuTextboxBackup + xor a + ret + +.failed + ld hl, AlreadySetUpText + call MenuTextboxBackup + scf + ret + +.getwhichside + ld a, [wMenuSelection] + ld b, a + ld a, [wOtherDecoration] + cp b + ret nz + xor a + ld [wOtherDecoration], a + ret + +WhichSidePutOnText: + text_far _WhichSidePutOnText + text_end + +DecoAction_PutItAway_Ornament: + ld a, [wSelectedDecoration] + and a + jr z, .nothingthere + ld hl, wStringBuffer3 + call GetDecorationName + ld a, TRUE + ld [wChangedDecorations], a + xor a + ld [wSelectedDecoration], a + ld hl, PutAwayTheDecoText + call MenuTextboxBackup + xor a + ret + +.nothingthere + ld hl, NothingToPutAwayText + call MenuTextboxBackup + xor a + ret + +WhichSidePutAwayText: + text_far _WhichSidePutAwayText + text_end + +DecoAction_AskWhichSide: + call MenuTextbox + ld hl, DecoSideMenuHeader + call GetMenu2 + call ExitMenu + call CopyMenuData + jr c, .nope + ld a, [wMenuCursorY] + cp 3 ; cancel + jr z, .nope + ld [wSelectedDecorationSide], a + call QueryWhichSide + ld a, [hl] + ld [wSelectedDecoration], a + ld a, [de] + ld [wOtherDecoration], a + xor a + ret + +.nope + scf + ret + +QueryWhichSide: + ld hl, wDecoRightOrnament + ld de, wDecoLeftOrnament + ld a, [wSelectedDecorationSide] + cp 1 ; right side + ret z + ; left side, swap hl and de + push hl + ld h, d + ld l, e + pop de + ret + +DecoSideMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 13, 7 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 3 ; items + db "RIGHT SIDE@" + db "LEFT SIDE@" + db "CANCEL@" + +PutAwayTheDecoText: + text_far _PutAwayTheDecoText + text_end + +NothingToPutAwayText: + text_far _NothingToPutAwayText + text_end + +SetUpTheDecoText: + text_far _SetUpTheDecoText + text_end + +PutAwayAndSetUpText: + text_far _PutAwayAndSetUpText + text_end + +AlreadySetUpText: + text_far _AlreadySetUpText + text_end + +GetDecorationName_c_de: + ld a, c + ld h, d + ld l, e + call GetDecorationName + ret + +DecorationFlagAction_c: + ld a, c + jp DecorationFlagAction + +GetDecorationName_c: + ld a, c + call GetDecorationID + ld hl, wStringBuffer1 + push hl + call GetDecorationName + pop de + ret + +SetSpecificDecorationFlag: + ld a, c + call GetDecorationID + ld b, SET_FLAG + call DecorationFlagAction + ret + +GetDecorationID: + push hl + push de + ld e, a + ld d, 0 + ld hl, DecorationIDs + add hl, de + ld a, [hl] + pop de + pop hl + ret + +SetAllDecorationFlags: ; unreferenced + ld hl, DecorationIDs +.loop + ld a, [hli] + cp -1 + jr z, .done + push hl + ld b, SET_FLAG + call DecorationFlagAction + pop hl + jr .loop + +.done + ret + +INCLUDE "data/decorations/decorations.asm" + +DescribeDecoration:: + ld a, b + ld hl, .Jumptable + rst JumpTable + ret + +.Jumptable: +; entries correspond to DECODESC_* constants + table_width 2, DescribeDecoration.Jumptable + dw DecorationDesc_Poster + dw DecorationDesc_LeftOrnament + dw DecorationDesc_RightOrnament + dw DecorationDesc_GiantOrnament + dw DecorationDesc_Console + assert_table_length NUM_DECODESCS + +DecorationDesc_Poster: + ld a, [wDecoPoster] + ld hl, DecorationDesc_PosterPointers + ld de, 3 + call IsInArray + jr c, .nope + ld de, DecorationDesc_NullPoster + ld b, BANK(DecorationDesc_NullPoster) + ret + +.nope + ld b, BANK(DecorationDesc_TownMapPoster) + inc hl + ld a, [hli] + ld d, [hl] + ld e, a + ret + +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 + +DecorationDesc_TownMapPoster: + opentext + writetext .LookTownMapText + waitbutton + special OverworldTownMap + closetext + end + +.LookTownMapText: + text_far _LookTownMapText + text_end + +DecorationDesc_PikachuPoster: + jumptext .LookPikachuPosterText + +.LookPikachuPosterText: + text_far _LookPikachuPosterText + text_end + +DecorationDesc_ClefairyPoster: + jumptext .LookClefairyPosterText + +.LookClefairyPosterText: + text_far _LookClefairyPosterText + text_end + +DecorationDesc_JigglypuffPoster: + jumptext .LookJigglypuffPosterText + +.LookJigglypuffPosterText: + text_far _LookJigglypuffPosterText + text_end + +DecorationDesc_NullPoster: + end + +DecorationDesc_LeftOrnament: + ld a, [wDecoLeftOrnament] + jr DecorationDesc_OrnamentOrConsole + +DecorationDesc_RightOrnament: + ld a, [wDecoRightOrnament] + jr DecorationDesc_OrnamentOrConsole + +DecorationDesc_Console: + ld a, [wDecoConsole] + jr DecorationDesc_OrnamentOrConsole + +DecorationDesc_OrnamentOrConsole: + ld c, a + ld de, wStringBuffer3 + call GetDecorationName_c_de + ld b, BANK(.OrnamentConsoleScript) + ld de, .OrnamentConsoleScript + ret + +.OrnamentConsoleScript: + jumptext .LookAdorableDecoText + +.LookAdorableDecoText: + text_far _LookAdorableDecoText + text_end + +DecorationDesc_GiantOrnament: + ld b, BANK(.BigDollScript) + ld de, .BigDollScript + ret + +.BigDollScript: + jumptext .LookGiantDecoText + +.LookGiantDecoText: + text_far _LookGiantDecoText + text_end + +ToggleMaptileDecorations: + ; tile coordinates work the same way as for changeblock + lb de, 0, 4 ; bed coordinates + ld a, [wDecoBed] + call SetDecorationTile + lb de, 7, 4 ; plant coordinates + ld a, [wDecoPlant] + call SetDecorationTile + lb de, 6, 0 ; poster coordinates + ld a, [wDecoPoster] + call SetDecorationTile + call SetPosterVisibility + lb de, 0, 0 ; carpet top-left coordinates + call PadCoords_de + ld a, [wDecoCarpet] + and a + ret z + call _GetDecorationSprite + ld [hl], a + push af + lb de, 0, 2 ; carpet bottom-left coordinates + call PadCoords_de + pop af + inc a + ld [hli], a ; carpet bottom-left block + inc a + ld [hli], a ; carpet bottom-middle block + dec a + ld [hl], a ; carpet bottom-right block + ret + +SetPosterVisibility: + ld b, SET_FLAG + ld a, [wDecoPoster] + and a + jr nz, .ok + ld b, RESET_FLAG + +.ok + ld de, EVENT_PLAYERS_ROOM_POSTER + jp EventFlagAction + +SetDecorationTile: + push af + call PadCoords_de + pop af + and a + ret z + call _GetDecorationSprite + ld [hl], a + ret + +ToggleDecorationsVisibility: + ld de, EVENT_PLAYERS_HOUSE_2F_CONSOLE + ld hl, wVariableSprites + SPRITE_CONSOLE - SPRITE_VARS + ld a, [wDecoConsole] + call ToggleDecorationVisibility + ld de, EVENT_PLAYERS_HOUSE_2F_DOLL_1 + ld hl, wVariableSprites + SPRITE_DOLL_1 - SPRITE_VARS + ld a, [wDecoLeftOrnament] + call ToggleDecorationVisibility + ld de, EVENT_PLAYERS_HOUSE_2F_DOLL_2 + ld hl, wVariableSprites + SPRITE_DOLL_2 - SPRITE_VARS + ld a, [wDecoRightOrnament] + call ToggleDecorationVisibility + ld de, EVENT_PLAYERS_HOUSE_2F_BIG_DOLL + ld hl, wVariableSprites + SPRITE_BIG_DOLL - SPRITE_VARS + ld a, [wDecoBigDoll] + call ToggleDecorationVisibility + ret + +ToggleDecorationVisibility: + and a + jr z, .hide + call _GetDecorationSprite + ld [hl], a + ld b, RESET_FLAG + jp EventFlagAction + +.hide + ld b, SET_FLAG + jp EventFlagAction + +_GetDecorationSprite: + ld c, a + push de + push hl + farcall GetDecorationSprite + pop hl + pop de + ld a, c + ret + +PadCoords_de: +; adjusts coordinates, the same way as Script_changeblock + ld a, d + add 4 + ld d, a + ld a, e + add 4 + ld e, a + call GetBlockLocation + ret diff --git a/engine/overworld/events.asm b/engine/overworld/events.asm new file mode 100644 index 0000000..f2b174b --- /dev/null +++ b/engine/overworld/events.asm @@ -0,0 +1,1350 @@ +SECTION "Events", ROMX + +OverworldLoop:: + xor a ; MAPSTATUS_START + ld [wMapStatus], a +.loop + ld a, [wMapStatus] + ld hl, .Jumptable + rst JumpTable + ld a, [wMapStatus] + cp MAPSTATUS_DONE + jr nz, .loop +.done + ret + +.Jumptable: +; entries correspond to MAPSTATUS_* constants + dw StartMap + dw EnterMap + dw HandleMap + dw .done + +DisableEvents: + xor a + ld [wScriptFlags2], a + ret + +EnableEvents:: + ld a, $ff + ld [wScriptFlags2], a + ret + +CheckBit5_ScriptFlags2: + ld hl, wScriptFlags2 + bit 5, [hl] + ret + +DisableWarpsConnxns: ; unreferenced + ld hl, wScriptFlags2 + res 2, [hl] + ret + +DisableCoordEvents: ; unreferenced + ld hl, wScriptFlags2 + res 1, [hl] + ret + +DisableStepCount: ; unreferenced + ld hl, wScriptFlags2 + res 0, [hl] + ret + +DisableWildEncounters: ; unreferenced + ld hl, wScriptFlags2 + res 4, [hl] + ret + +EnableWarpsConnxns: ; unreferenced + ld hl, wScriptFlags2 + set 2, [hl] + ret + +EnableCoordEvents: ; unreferenced + ld hl, wScriptFlags2 + set 1, [hl] + ret + +EnableStepCount: ; unreferenced + ld hl, wScriptFlags2 + set 0, [hl] + ret + +EnableWildEncounters: + ld hl, wScriptFlags2 + set 4, [hl] + ret + +CheckWarpConnxnScriptFlag: + ld hl, wScriptFlags2 + bit 2, [hl] + ret + +CheckCoordEventScriptFlag: + ld hl, wScriptFlags2 + bit 1, [hl] + ret + +CheckStepCountScriptFlag: + ld hl, wScriptFlags2 + bit 0, [hl] + ret + +CheckWildEncountersScriptFlag: + ld hl, wScriptFlags2 + bit 4, [hl] + ret + +StartMap: + xor a + ld [wScriptVar], a + xor a + ld [wScriptRunning], a + ld hl, wMapStatus + ld bc, wMapStatusEnd - wMapStatus + call ByteFill + farcall InitCallReceiveDelay + call ClearJoypad +EnterMap: + xor a + ld [wXYComparePointer], a + ld [wXYComparePointer + 1], a + call SetUpFiveStepWildEncounterCooldown + farcall RunMapSetupScript + call DisableEvents + + ldh a, [hMapEntryMethod] + cp MAPSETUP_CONNECTION + jr nz, .dont_enable + call EnableEvents +.dont_enable + + ldh a, [hMapEntryMethod] + cp MAPSETUP_RELOADMAP + jr nz, .dontresetpoison + xor a + ld [wPoisonStepCount], a +.dontresetpoison + + xor a ; end map entry + ldh [hMapEntryMethod], a + ld a, MAPSTATUS_HANDLE + ld [wMapStatus], a + ret + +UnusedWait30Frames: ; unreferenced + ld c, 30 + call DelayFrames + ret + +HandleMap: + call ResetOverworldDelay + call HandleMapTimeAndJoypad + farcall HandleCmdQueue ; no need to farcall + call MapEvents + +; Not immediately entering a connected map will cause problems. + ld a, [wMapStatus] + cp MAPSTATUS_HANDLE + ret nz + + call HandleMapObjects + call NextOverworldFrame + call HandleMapBackground + call CheckPlayerState + ret + +MapEvents: + ld a, [wMapEventStatus] + ld hl, .Jumptable + rst JumpTable + ret + +.Jumptable: +; entries correspond to MAPEVENTS_* constants + dw .events + dw .no_events + +.events: + call PlayerEvents + call DisableEvents + farcall ScriptEvents + ret + +.no_events: + ret + +MaxOverworldDelay: + db 2 + +ResetOverworldDelay: + ld a, [MaxOverworldDelay] + ld [wOverworldDelay], a + ret + +NextOverworldFrame: + ld a, [wOverworldDelay] + and a + ret z + ld c, a + call DelayFrames + ret + +HandleMapTimeAndJoypad: + ld a, [wMapEventStatus] + cp MAPEVENTS_OFF + ret z + + call UpdateTime + call GetJoypad + call TimeOfDayPals + ret + +HandleMapObjects: + farcall HandleNPCStep + farcall _HandlePlayerStep + call _CheckObjectEnteringVisibleRange + ret + +HandleMapBackground: + farcall _UpdateSprites + farcall ScrollScreen + farcall PlaceMapNameSign + ret + +CheckPlayerState: + ld a, [wPlayerStepFlags] + bit PLAYERSTEP_CONTINUE_F, a + jr z, .events + bit PLAYERSTEP_STOP_F, a + jr z, .noevents + bit PLAYERSTEP_MIDAIR_F, a + jr nz, .noevents + call EnableEvents +.events + ld a, MAPEVENTS_ON + ld [wMapEventStatus], a + ret + +.noevents + ld a, MAPEVENTS_OFF + ld [wMapEventStatus], a + ret + +_CheckObjectEnteringVisibleRange: + ld hl, wPlayerStepFlags + bit PLAYERSTEP_STOP_F, [hl] + ret z + farcall CheckObjectEnteringVisibleRange + ret + +PlayerEvents: + xor a +; If there's already a player event, don't interrupt it. + ld a, [wScriptRunning] + and a + ret nz + + call Dummy_CheckScriptFlags2Bit5 ; This is a waste of time + + call CheckTrainerBattle_GetPlayerEvent + jr c, .ok + + call CheckTileEvent + jr c, .ok + + call RunMemScript + jr c, .ok + + call RunSceneScript + jr c, .ok + + call CheckTimeEvents + jr c, .ok + + call OWPlayerInput + jr c, .ok + + xor a + ret + +.ok + push af + farcall EnableScriptMode + pop af + + ld [wScriptRunning], a + call DoPlayerEvent + ld a, [wScriptRunning] + cp PLAYEREVENT_CONNECTION + jr z, .ok2 + cp PLAYEREVENT_JOYCHANGEFACING + jr z, .ok2 + + xor a + ld [wLandmarkSignTimer], a + +.ok2 + scf + ret + +CheckTrainerBattle_GetPlayerEvent: + nop + nop + call CheckTrainerBattle + jr nc, .nope + + ld a, PLAYEREVENT_SEENBYTRAINER + scf + ret + +.nope + xor a + ret + +CheckTileEvent: +; Check for warps, coord events, or wild battles. + + call CheckWarpConnxnScriptFlag + jr z, .connections_disabled + + farcall CheckMovingOffEdgeOfMap + jr c, .map_connection + + call CheckWarpTile + jr c, .warp_tile + +.connections_disabled + call CheckCoordEventScriptFlag + jr z, .coord_events_disabled + + call CheckCurrentMapCoordEvents + jr c, .coord_event + +.coord_events_disabled + call CheckStepCountScriptFlag + jr z, .step_count_disabled + + call CountStep + ret c + +.step_count_disabled + call CheckWildEncountersScriptFlag + jr z, .ok + + call RandomEncounter + ret c + jr .ok ; pointless + +.ok + xor a + ret + +.map_connection + ld a, PLAYEREVENT_CONNECTION + scf + ret + +.warp_tile + ld a, [wPlayerTile] + call CheckPitTile + jr nz, .not_pit + ld a, PLAYEREVENT_FALL + scf + ret + +.not_pit + ld a, PLAYEREVENT_WARP + scf + ret + +.coord_event + ld hl, wCurCoordEventScriptAddr + ld a, [hli] + ld h, [hl] + ld l, a + call GetMapScriptsBank + call CallScript + ret + +CheckWildEncounterCooldown:: + ld hl, wWildEncounterCooldown + ld a, [hl] + and a + ret z + dec [hl] + ret z + scf + ret + +SetUpFiveStepWildEncounterCooldown: + ld a, 5 + ld [wWildEncounterCooldown], a + ret + +SetMinTwoStepWildEncounterCooldown: +; dummied out + ret + ld a, [wWildEncounterCooldown] + cp 2 + ret nc + ld a, 2 + ld [wWildEncounterCooldown], a + ret + +Dummy_CheckScriptFlags2Bit5: + call CheckBit5_ScriptFlags2 + ret + +RunSceneScript: + ld a, [wCurMapSceneScriptCount] + and a + jr z, .nope + + ld c, a + call CheckScenes + cp c + jr nc, .nope + + ld e, a + ld d, 0 + ld hl, wCurMapSceneScriptsPointer + ld a, [hli] + ld h, [hl] + ld l, a +rept SCENE_SCRIPT_SIZE + add hl, de +endr + + call GetMapScriptsBank + call GetFarWord + call GetMapScriptsBank + call CallScript + + ld hl, wScriptFlags + res 3, [hl] + + farcall EnableScriptMode + farcall ScriptEvents + + ld hl, wScriptFlags + bit 3, [hl] + jr z, .nope + + ld hl, wDeferredScriptAddr + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wDeferredScriptBank] + call CallScript + scf + ret + +.nope + xor a + ret + +CheckTimeEvents: + ld a, [wLinkMode] + and a + jr nz, .nothing + + ld hl, wStatusFlags2 + bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] + jr z, .do_daily + + farcall CheckBugContestTimer + jr c, .end_bug_contest + xor a + ret + +.do_daily + farcall CheckDailyResetTimer + farcall CheckPokerusTick + farcall CheckPhoneCall + ret c + +.nothing + xor a + ret + +.end_bug_contest + ld a, BANK(BugCatchingContestOverScript) + ld hl, BugCatchingContestOverScript + call CallScript + scf + ret + +.unused ; unreferenced + ld a, $8 ; ??? + scf + ret + +OWPlayerInput: + call PlayerMovement + ret c + and a + jr nz, .NoAction + +; Can't perform button actions while sliding on ice. + farcall CheckStandingOnIce + jr c, .NoAction + + call CheckAPressOW + jr c, .Action + + call CheckMenuOW + jr c, .Action + +.NoAction: + xor a + ret + +.Action: + push af + farcall StopPlayerForEvent + pop af + scf + ret + +CheckAPressOW: + ldh a, [hJoyPressed] + and A_BUTTON + ret z + call TryObjectEvent + ret c + call TryBGEvent + ret c + call TryTileCollisionEvent + ret c + xor a + ret + +PlayTalkObject: + push de + ld de, SFX_READ_TEXT_2 + call PlaySFX + pop de + ret + +TryObjectEvent: + farcall CheckFacingObject + jr c, .IsObject + xor a + ret + +.IsObject: + call PlayTalkObject + ldh a, [hObjectStructIndex] + call GetObjectStruct + ld hl, OBJECT_MAP_OBJECT_INDEX + add hl, bc + ld a, [hl] + ldh [hLastTalked], a + + ldh a, [hLastTalked] + call GetMapObject + ld hl, MAPOBJECT_TYPE + add hl, bc + ld a, [hl] + and MAPOBJECT_TYPE_MASK + + push bc + ld de, 3 + ld hl, ObjectEventTypeArray + call IsInArray + pop bc + jr nc, .nope + + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.nope + xor a + ret + +ObjectEventTypeArray: + table_width 3, ObjectEventTypeArray + dbw OBJECTTYPE_SCRIPT, .script + dbw OBJECTTYPE_ITEMBALL, .itemball + dbw OBJECTTYPE_TRAINER, .trainer + ; the remaining four are dummy events + dbw OBJECTTYPE_3, .three + dbw OBJECTTYPE_4, .four + dbw OBJECTTYPE_5, .five + dbw OBJECTTYPE_6, .six + assert_table_length NUM_OBJECT_TYPES + db -1 ; end + +.script + ld hl, MAPOBJECT_SCRIPT_POINTER + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + call GetMapScriptsBank + call CallScript + ret + +.itemball + ld hl, MAPOBJECT_SCRIPT_POINTER + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + call GetMapScriptsBank + ld de, wItemBallData + ld bc, wItemBallDataEnd - wItemBallData + call FarCopyBytes + ld a, PLAYEREVENT_ITEMBALL + scf + ret + +.trainer + call TalkToTrainer + ld a, PLAYEREVENT_TALKTOTRAINER + scf + ret + +.three + xor a + ret + +.four + xor a + ret + +.five + xor a + ret + +.six + xor a + ret + +TryBGEvent: + call CheckFacingBGEvent + jr c, .is_bg_event + xor a + ret + +.is_bg_event: + ld a, [wCurBGEventType] + ld hl, BGEventJumptable + rst JumpTable + ret + +BGEventJumptable: + table_width 2, BGEventJumptable + dw .read + dw .up + dw .down + dw .right + dw .left + dw .ifset + dw .ifnotset + dw .itemifset + dw .copy + assert_table_length NUM_BGEVENTS + +.up: + ld b, OW_UP + jr .checkdir + +.down: + ld b, OW_DOWN + jr .checkdir + +.right: + ld b, OW_RIGHT + jr .checkdir + +.left: + ld b, OW_LEFT + jr .checkdir + +.checkdir: + ld a, [wPlayerDirection] + and %1100 + cp b + jp nz, .dontread +.read: + call PlayTalkObject + ld hl, wCurBGEventScriptAddr + ld a, [hli] + ld h, [hl] + ld l, a + call GetMapScriptsBank + call CallScript + scf + ret + +.itemifset: + call CheckBGEventFlag + jp nz, .dontread + call PlayTalkObject + call GetMapScriptsBank + ld de, wHiddenItemData + ld bc, wHiddenItemDataEnd - wHiddenItemData + call FarCopyBytes + ld a, BANK(HiddenItemScript) + ld hl, HiddenItemScript + call CallScript + scf + ret + +.copy: + call CheckBGEventFlag + jr nz, .dontread + call GetMapScriptsBank + ld de, wHiddenItemData + ld bc, wHiddenItemDataEnd - wHiddenItemData + call FarCopyBytes + jr .dontread + +.ifset: + call CheckBGEventFlag + jr z, .dontread + jr .thenread + +.ifnotset: + call CheckBGEventFlag + jr nz, .dontread +.thenread: + push hl + call PlayTalkObject + pop hl + inc hl + inc hl + call GetMapScriptsBank + call GetFarWord + call GetMapScriptsBank + call CallScript + scf + ret + +.dontread: + xor a + ret + +CheckBGEventFlag: + ld hl, wCurBGEventScriptAddr + ld a, [hli] + ld h, [hl] + ld l, a + push hl + call GetMapScriptsBank + call GetFarWord + ld e, l + ld d, h + ld b, CHECK_FLAG + call EventFlagAction + ld a, c + and a + pop hl + ret + +PlayerMovement: + farcall DoPlayerMovement + ld a, c + ld hl, PlayerMovementPointers + rst JumpTable + ld a, c + ret + +PlayerMovementPointers: +; entries correspond to PLAYERMOVEMENT_* constants + table_width 2, PlayerMovementPointers + dw .normal + dw .warp + dw .turn + dw .force_turn + dw .finish + dw .continue + dw .exit_water + dw .jump + assert_table_length NUM_PLAYER_MOVEMENTS + +.normal: +.finish: + xor a + ld c, a + ret + +.jump: + call SetMinTwoStepWildEncounterCooldown + xor a + ld c, a + ret + +.warp: + ld a, PLAYEREVENT_WARP + ld c, a + scf + ret + +.turn: + ld a, PLAYEREVENT_JOYCHANGEFACING + ld c, a + scf + ret + +.force_turn: +; force the player to move in some direction + ld a, BANK(Script_ForcedMovement) + ld hl, Script_ForcedMovement + call CallScript + ld c, a + scf + ret + +.continue: +.exit_water: + ld a, -1 + ld c, a + and a + ret + +CheckMenuOW: + xor a + ldh [hMenuReturn], a + ldh [hUnusedByte], a + ldh a, [hJoyPressed] + + bit SELECT_F, a + jr nz, .Select + + bit START_F, a + jr z, .NoMenu + + ld a, BANK(StartMenuScript) + ld hl, StartMenuScript + call CallScript + scf + ret + +.NoMenu: + xor a + ret + +.Select: + call PlayTalkObject + ld a, BANK(SelectMenuScript) + ld hl, SelectMenuScript + call CallScript + scf + ret + +StartMenuScript: + callasm StartMenu + sjump StartMenuCallback + +SelectMenuScript: + callasm SelectMenu + sjump SelectMenuCallback + +StartMenuCallback: +SelectMenuCallback: + readmem hMenuReturn + ifequal HMENURETURN_SCRIPT, .Script + ifequal HMENURETURN_ASM, .Asm + end + +.Script: + memjump wQueuedScriptBank + +.Asm: + memcallasm wQueuedScriptBank + end + +CountStep: + ; Don't count steps in link communication rooms. + ld a, [wLinkMode] + and a + jr nz, .done + + ; If there is a special phone call, don't count the step. + farcall CheckSpecialPhoneCall + jr c, .doscript + + ; If Repel wore off, don't count the step. + call DoRepelStep + jr c, .doscript + + ; Count the step for poison and total steps + ld hl, wPoisonStepCount + inc [hl] + ld hl, wStepCount + inc [hl] + ; Every 256 steps, increase the happiness of all your Pokemon. + jr nz, .skip_happiness + + farcall StepHappiness + +.skip_happiness + ; Every 256 steps, offset from the happiness incrementor by 128 steps, + ; decrease the hatch counter of all your eggs until you reach the first + ; one that is ready to hatch. + ld a, [wStepCount] + cp $80 + jr nz, .skip_egg + + farcall DoEggStep + jr nz, .hatch + +.skip_egg + ; Increase the EXP of (both) DayCare Pokemon by 1. + farcall DayCareStep + + ; Every 4 steps, deal damage to all poisoned Pokemon. + ld hl, wPoisonStepCount + ld a, [hl] + cp 4 + jr c, .skip_poison + ld [hl], 0 + + farcall DoPoisonStep + jr c, .doscript + +.skip_poison + farcall DoBikeStep + +.done + xor a + ret + +.doscript + ld a, -1 + scf + ret + +.hatch + ld a, PLAYEREVENT_HATCH + scf + ret + +.whiteout ; unreferenced + ld a, PLAYEREVENT_WHITEOUT + scf + ret + +DoRepelStep: + ld a, [wRepelEffect] + and a + ret z + + dec a + ld [wRepelEffect], a + ret nz + + ld a, BANK(RepelWoreOffScript) + ld hl, RepelWoreOffScript + call CallScript + scf + ret + +DoPlayerEvent: + ld a, [wScriptRunning] + and a + ret z + + cp PLAYEREVENT_MAPSCRIPT ; run script + ret z + + cp NUM_PLAYER_EVENTS + ret nc + + ld c, a + ld b, 0 + ld hl, PlayerEventScriptPointers + add hl, bc + add hl, bc + add hl, bc + ld a, [hli] + ld [wScriptBank], a + ld a, [hli] + ld [wScriptPos], a + ld a, [hl] + ld [wScriptPos + 1], a + ret + +PlayerEventScriptPointers: +; entries correspond to PLAYEREVENT_* constants + table_width 3, PlayerEventScriptPointers + dba InvalidEventScript ; PLAYEREVENT_NONE + dba SeenByTrainerScript ; PLAYEREVENT_SEENBYTRAINER + dba TalkToTrainerScript ; PLAYEREVENT_TALKTOTRAINER + dba FindItemInBallScript ; PLAYEREVENT_ITEMBALL + dba EdgeWarpScript ; PLAYEREVENT_CONNECTION + dba WarpToNewMapScript ; PLAYEREVENT_WARP + dba FallIntoMapScript ; PLAYEREVENT_FALL + dba OverworldWhiteoutScript ; PLAYEREVENT_WHITEOUT + dba HatchEggScript ; PLAYEREVENT_HATCH + dba ChangeDirectionScript ; PLAYEREVENT_JOYCHANGEFACING + dba InvalidEventScript ; (NUM_PLAYER_EVENTS) + assert_table_length NUM_PLAYER_EVENTS + 1 + +InvalidEventScript: + end + +UnusedPlayerEventScript: ; unreferenced + end + +HatchEggScript: + callasm OverworldHatchEgg + end + +WarpToNewMapScript: + warpsound + newloadmap MAPSETUP_DOOR + end + +FallIntoMapScript: + newloadmap MAPSETUP_FALL + playsound SFX_KINESIS + applymovement PLAYER, .SkyfallMovement + playsound SFX_STRENGTH + scall LandAfterPitfallScript + end + +.SkyfallMovement: + skyfall + step_end + +LandAfterPitfallScript: + earthquake 16 + end + +EdgeWarpScript: + reloadend MAPSETUP_CONNECTION + +ChangeDirectionScript: + deactivatefacing 3 + callasm EnableWildEncounters + end + +INCLUDE "engine/overworld/scripting.asm" + +WarpToSpawnPoint:: + ld hl, wStatusFlags2 + res STATUSFLAGS2_SAFARI_GAME_F, [hl] + res STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] + ret + +RunMemScript:: +; If there is no script here, we don't need to be here. + ld a, [wMapReentryScriptQueueFlag] + and a + ret z +; Execute the script at (wMapReentryScriptBank):(wMapReentryScriptAddress). + ld hl, wMapReentryScriptAddress + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wMapReentryScriptBank] + call CallScript + scf +; Clear the buffer for the next script. + push af + xor a + ld hl, wMapReentryScriptQueueFlag + ld bc, 8 + call ByteFill + pop af + ret + +LoadScriptBDE:: +; If there's already a script here, don't overwrite. + ld hl, wMapReentryScriptQueueFlag + ld a, [hl] + and a + ret nz +; Set the flag + ld [hl], 1 + inc hl +; Load the script pointer b:de into (wMapReentryScriptBank):(wMapReentryScriptAddress) + ld [hl], b + inc hl + ld [hl], e + inc hl + ld [hl], d + scf + ret + +TryTileCollisionEvent:: + call GetFacingTileCoord + ld [wFacingTileID], a + ld c, a + ; CheckFacingTileForStdScript preserves c, and + ; farcall copies c back into a. + farcall CheckFacingTileForStdScript + jr c, .done + + ; CheckCutTreeTile expects a == [wFacingTileID], which + ; it still is after the previous farcall. + call CheckCutTreeTile + jr nz, .whirlpool + farcall TryCutOW + jr .done + +.whirlpool + ld a, [wFacingTileID] + call CheckWhirlpoolTile + jr nz, .waterfall + farcall TryWhirlpoolOW + jr .done + +.waterfall + ld a, [wFacingTileID] + call CheckWaterfallTile + jr nz, .headbutt + farcall TryWaterfallOW + jr .done + +.headbutt + ld a, [wFacingTileID] + call CheckHeadbuttTreeTile + jr nz, .surf + farcall TryHeadbuttOW + jr c, .done + jr .noevent + +.surf + farcall TrySurfOW + jr nc, .noevent + jr .done + +.noevent + xor a + ret + +.done + call PlayClickSFX + ld a, $ff + scf + ret + +RandomEncounter:: +; Random encounter + + call CheckWildEncounterCooldown + jr c, .nope + call CanUseSweetScent + jr nc, .nope + ld hl, wStatusFlags2 + bit STATUSFLAGS2_BUG_CONTEST_TIMER_F, [hl] + jr nz, .bug_contest + farcall TryWildEncounter + jr nz, .nope + jr .ok + +.bug_contest + call _TryWildEncounter_BugContest + jr nc, .nope + jr .ok_bug_contest + +.nope + ld a, 1 + and a + ret + +.ok + ld a, BANK(WildBattleScript) + ld hl, WildBattleScript + jr .done + +.ok_bug_contest + ld a, BANK(BugCatchingContestBattleScript) + ld hl, BugCatchingContestBattleScript + jr .done + +.done + call CallScript + scf + ret + +WildBattleScript: + randomwildmon + startbattle + reloadmapafterbattle + end + +CanUseSweetScent:: + ld hl, wStatusFlags + bit STATUSFLAGS_NO_WILD_ENCOUNTERS_F, [hl] + jr nz, .no + ld a, [wEnvironment] + cp CAVE + jr z, .ice_check + cp DUNGEON + jr z, .ice_check + farcall CheckGrassCollision + jr nc, .no + +.ice_check + ld a, [wPlayerTile] + call CheckIceTile + jr z, .no + scf + ret + +.no + and a + ret + +_TryWildEncounter_BugContest: + call TryWildEncounter_BugContest + ret nc + call ChooseWildEncounter_BugContest + farcall CheckRepelEffect + ret + +ChooseWildEncounter_BugContest:: +; Pick a random mon out of ContestMons. + +.loop + call Random + cp 100 << 1 + jr nc, .loop + srl a + + ld hl, ContestMons + ld de, 5 +.CheckMon: + sub [hl] + jr c, .GotMon + add hl, de + jr .CheckMon + +.GotMon: + inc hl + +; Species + ld a, [hli] + push hl + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + pop hl + inc hl + ld [wTempWildMonSpecies], a + +; Min level + ld a, [hli] + ld d, a + +; Max level + ld a, [hl] + + sub d + jr nz, .RandomLevel + +; If min and max are the same. + ld a, d + jr .GotLevel + +.RandomLevel: +; Get a random level between the min and max. + ld c, a + inc c + call Random + ldh a, [hRandomAdd] + call SimpleDivide + add d + +.GotLevel: + ld [wCurPartyLevel], a + + xor a + ret + +TryWildEncounter_BugContest: + ld a, [wPlayerTile] + call CheckSuperTallGrassTile + ld b, 40 percent + jr z, .ok + ld b, 20 percent + +.ok + farcall ApplyMusicEffectOnEncounterRate + farcall ApplyCleanseTagEffectOnEncounterRate + call Random + ldh a, [hRandomAdd] + cp b + ret c + ld a, 1 + and a + ret + +INCLUDE "data/wild/bug_contest_mons.asm" + +DoBikeStep:: + nop + nop + ; If the bike shop owner doesn't have our number, or + ; if we've already gotten the call, we don't have to + ; be here. + ld hl, wStatusFlags2 + bit STATUSFLAGS2_BIKE_SHOP_CALL_F, [hl] + jr z, .NoCall + + ; If we're not on the bike, we don't have to be here. + ld a, [wPlayerState] + cp PLAYER_BIKE + jr nz, .NoCall + + ; If we're not in an area of phone service, we don't + ; have to be here. + call GetMapPhoneService + and a + jr nz, .NoCall + + ; Check the bike step count and check whether we've + ; taken 65536 of them yet. + ld hl, wBikeStep + ld a, [hli] + ld d, a + ld e, [hl] + cp 255 + jr nz, .increment + ld a, e + cp 255 + jr z, .dont_increment + +.increment + inc de + ld [hl], e + dec hl + ld [hl], d + +.dont_increment + ; If we've taken at least 1024 steps, have the bike + ; shop owner try to call us. + ld a, d + cp HIGH(1024) + jr c, .NoCall + + ; If a call has already been queued, don't overwrite + ; that call. + ld a, [wSpecialPhoneCallID] + and a + jr nz, .NoCall + + ; Queue the call. + ld a, SPECIALCALL_BIKESHOP + ld [wSpecialPhoneCallID], a + xor a + ld [wSpecialPhoneCallID + 1], a + ld hl, wStatusFlags2 + res STATUSFLAGS2_BIKE_SHOP_CALL_F, [hl] + scf + ret + +.NoCall: + xor a + ret + +INCLUDE "engine/overworld/cmd_queue.asm" diff --git a/engine/overworld/init_map.asm b/engine/overworld/init_map.asm new file mode 100644 index 0000000..68cb3b2 --- /dev/null +++ b/engine/overworld/init_map.asm @@ -0,0 +1,104 @@ +ReanchorBGMap_NoOAMUpdate:: + call DelayFrame + ldh a, [hOAMUpdate] + push af + + ld a, $1 + ldh [hOAMUpdate], a + ldh a, [hBGMapMode] + push af + xor a + ldh [hBGMapMode], a + + call .ReanchorBGMap + + pop af + ldh [hBGMapMode], a + pop af + ldh [hOAMUpdate], a + + ld hl, wVramState + set 6, [hl] + ret + +.ReanchorBGMap: + xor a + ldh [hLCDCPointer], a + ldh [hBGMapMode], a + ld a, $90 + ldh [hWY], a + call OverworldTextModeSwitch + ld a, HIGH(vBGMap1) + call .LoadBGMapAddrIntoHRAM + call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + farcall LoadOW_BGPal7 + farcall ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + xor a + ldh [hBGMapMode], a + ldh [hWY], a + farcall HDMATransfer_FillBGMap0WithBlack ; no need to farcall + ld a, HIGH(vBGMap0) + call .LoadBGMapAddrIntoHRAM + xor a ; LOW(vBGMap0) + ld [wBGMapAnchor], a + ld a, HIGH(vBGMap0) + ld [wBGMapAnchor + 1], a + xor a + ldh [hSCX], a + ldh [hSCY], a + call ApplyBGMapAnchorToObjects + ret + +.LoadBGMapAddrIntoHRAM: + ldh [hBGMapAddress + 1], a + xor a + ldh [hBGMapAddress], a + ret + +LoadFonts_NoOAMUpdate:: + ldh a, [hOAMUpdate] + push af + ld a, $1 + ldh [hOAMUpdate], a + + call .LoadGFX + + pop af + ldh [hOAMUpdate], a + ret + +.LoadGFX: + call LoadFontsExtra + ld a, $90 + ldh [hWY], a + call SafeUpdateSprites + call LoadStandardFont + ret + +HDMATransfer_FillBGMap0WithBlack: + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + + ld a, "■" + ld hl, wDecompressScratch + ld bc, wScratchAttrmap - wDecompressScratch + call ByteFill + ld a, HIGH(wDecompressScratch) + ldh [rHDMA1], a + ld a, LOW(wDecompressScratch) + ldh [rHDMA2], a + ld a, HIGH(vBGMap0 - VRAM_Begin) + ldh [rHDMA3], a + ld a, LOW(vBGMap0 - VRAM_Begin) + ldh [rHDMA4], a + ld a, $3f + ldh [hDMATransfer], a + call DelayFrame + + pop af + ldh [rSVBK], a + ret diff --git a/engine/overworld/landmarks.asm b/engine/overworld/landmarks.asm new file mode 100644 index 0000000..bee64c7 --- /dev/null +++ b/engine/overworld/landmarks.asm @@ -0,0 +1,82 @@ +GetLandmarkCoords: +; Return coordinates (d, e) of landmark e. + push hl + ld l, e + ld h, 0 + add hl, hl + add hl, hl + ld de, Landmarks + add hl, de + ld a, [hli] + ld e, a + ld d, [hl] + pop hl + ret + +GetLandmarkName:: +; Copy the name of landmark e to wStringBuffer1. + push hl + push de + push bc + + ld l, e + ld h, 0 + add hl, hl + add hl, hl + ld de, Landmarks + 2 + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + + ld de, wStringBuffer1 + ld c, 18 +.copy + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .copy + + pop bc + pop de + pop hl + ret + +INCLUDE "data/maps/landmarks.asm" + +RegionCheck: +; Checks if the player is in Kanto or Johto. +; If in Johto, returns 0 in e. +; If in Kanto, returns 1 in e. + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetWorldMapLocation + cp LANDMARK_FAST_SHIP ; S.S. Aqua + jr z, .johto + cp LANDMARK_SPECIAL + jr nz, .checkagain + +; In a special map, get the backup map group / map id + ld a, [wBackupMapGroup] + ld b, a + ld a, [wBackupMapNumber] + ld c, a + call GetWorldMapLocation + +.checkagain + cp KANTO_LANDMARK + jr c, .johto + +; Victory Road area is considered to be Johto. + cp LANDMARK_VICTORY_ROAD + jr c, .kanto + +.johto + ld e, JOHTO_REGION + ret +.kanto + ld e, KANTO_REGION + ret diff --git a/engine/overworld/load_map_part.asm b/engine/overworld/load_map_part.asm new file mode 100644 index 0000000..88a0b53 --- /dev/null +++ b/engine/overworld/load_map_part.asm @@ -0,0 +1,36 @@ +_LoadMapPart:: + ld hl, wSurroundingTiles + ld a, [wPlayerMetatileY] + and a + jr z, .top_row + ld bc, SURROUNDING_WIDTH * 2 + add hl, bc + +.top_row + ld a, [wPlayerMetatileX] + and a + jr z, .left_column + inc hl + inc hl + +.left_column + decoord 0, 0 + ld b, SCREEN_HEIGHT +.loop + ld c, SCREEN_WIDTH +.loop2 + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .loop2 + ld a, l + add METATILE_WIDTH + ld l, a + jr nc, .carry + inc h + +.carry + dec b + jr nz, .loop + ret diff --git a/engine/overworld/map_object_action.asm b/engine/overworld/map_object_action.asm new file mode 100644 index 0000000..916131f --- /dev/null +++ b/engine/overworld/map_object_action.asm @@ -0,0 +1,298 @@ +ObjectActionPairPointers: +; entries correspond to OBJECT_ACTION_* constants (see constants/map_object_constants.asm) + table_width 2 + 2, ObjectActionPairPointers + ; normal action, frozen action + dw SetFacingStanding, SetFacingStanding + dw SetFacingStandAction, SetFacingCurrent + dw SetFacingStepAction, SetFacingCurrent + dw SetFacingBumpAction, SetFacingCurrent + dw SetFacingCounterclockwiseSpin, SetFacingCurrent + dw SetFacingCounterclockwiseSpin2, SetFacingStanding + dw SetFacingFish, SetFacingFish + dw SetFacingShadow, SetFacingStanding + dw SetFacingEmote, SetFacingEmote + dw SetFacingBigDollSym, SetFacingBigDollSym + dw SetFacingBounce, SetFacingFreezeBounce + dw SetFacingWeirdTree, SetFacingCurrent + dw SetFacingBigDollAsym, SetFacingBigDollAsym + dw SetFacingBigDoll, SetFacingBigDoll + dw SetFacingBoulderDust, SetFacingStanding + dw SetFacingGrassShake, SetFacingStanding + dw SetFacingSkyfall, SetFacingCurrent + assert_table_length NUM_OBJECT_ACTIONS + +SetFacingStanding: + ld hl, OBJECT_FACING + add hl, bc + ld [hl], STANDING + ret + +SetFacingCurrent: + call GetSpriteDirection + or FACING_STEP_DOWN_0 ; useless + ld hl, OBJECT_FACING + add hl, bc + ld [hl], a + ret + +SetFacingStandAction: + ld hl, OBJECT_FACING + add hl, bc + ld a, [hl] + and 1 + jr nz, SetFacingStepAction + jp SetFacingCurrent + +SetFacingStepAction: + ld hl, OBJECT_FLAGS1 + add hl, bc + bit SLIDING_F, [hl] + jp nz, SetFacingCurrent + + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld a, [hl] + inc a + and %00001111 + ld [hl], a + + rrca + rrca + maskbits NUM_DIRECTIONS + ld d, a + + call GetSpriteDirection + or FACING_STEP_DOWN_0 ; useless + or d + ld hl, OBJECT_FACING + add hl, bc + ld [hl], a + ret + +SetFacingSkyfall: + ld hl, OBJECT_FLAGS1 + add hl, bc + bit SLIDING_F, [hl] + jp nz, SetFacingCurrent + + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld a, [hl] + add 2 + and %00001111 + ld [hl], a + + rrca + rrca + maskbits NUM_DIRECTIONS + ld d, a + + call GetSpriteDirection + or FACING_STEP_DOWN_0 ; useless + or d + ld hl, OBJECT_FACING + add hl, bc + ld [hl], a + ret + +SetFacingBumpAction: + ld hl, OBJECT_FLAGS1 + add hl, bc + bit SLIDING_F, [hl] + jp nz, SetFacingCurrent + + ld hl, OBJECT_STEP_FRAME + add hl, bc + inc [hl] + + ld a, [hl] + rrca + rrca + rrca + maskbits NUM_DIRECTIONS + ld d, a + + call GetSpriteDirection + or FACING_STEP_DOWN_0 ; useless + or d + ld hl, OBJECT_FACING + add hl, bc + ld [hl], a + ret + +SetFacingCounterclockwiseSpin: + call CounterclockwiseSpinAction + ld hl, OBJECT_DIRECTION + add hl, bc + ld a, [hl] + or FACING_STEP_DOWN_0 ; useless + ld hl, OBJECT_FACING + add hl, bc + ld [hl], a + ret + +SetFacingCounterclockwiseSpin2: + call CounterclockwiseSpinAction + jp SetFacingStanding + +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) +; bits 4,5 determines the facing - the direction is counterclockwise. + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld a, [hl] + and %11110000 + ld e, a + + ld a, [hl] + inc a + and %00001111 + ld d, a + cp 4 + jr c, .ok + + ld d, 0 + ld a, e + add $10 + and %00110000 + ld e, a + +.ok + ld a, d + or e + ld [hl], a + + swap e + ld d, 0 + ld hl, .facings + add hl, de + ld a, [hl] + ld hl, OBJECT_DIRECTION + add hl, bc + ld [hl], a + ret + +.facings: + db OW_DOWN + db OW_RIGHT + db OW_UP + db OW_LEFT + +SetFacingFish: + call GetSpriteDirection + rrca + rrca + add FACING_FISH_DOWN + ld hl, OBJECT_FACING + add hl, bc + ld [hl], a + ret + +SetFacingShadow: + ld hl, OBJECT_FACING + add hl, bc + ld [hl], FACING_SHADOW + ret + +SetFacingEmote: + ld hl, OBJECT_FACING + add hl, bc + ld [hl], FACING_EMOTE + ret + +SetFacingBigDollSym: + ld hl, OBJECT_FACING + add hl, bc + ld [hl], FACING_BIG_DOLL_SYM + ret + +SetFacingBounce: + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld a, [hl] + inc a + and %00001111 + ld [hl], a + and %00001000 + jr z, SetFacingFreezeBounce + ld hl, OBJECT_FACING + add hl, bc + ld [hl], FACING_STEP_UP_0 + ret + +SetFacingFreezeBounce: + ld hl, OBJECT_FACING + add hl, bc + ld [hl], FACING_STEP_DOWN_0 + ret + +SetFacingWeirdTree: + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld a, [hl] + inc a + ld [hl], a + maskbits NUM_DIRECTIONS, 2 + rrca + rrca + add FACING_WEIRD_TREE_0 + ld hl, OBJECT_FACING + add hl, bc + ld [hl], a + ret + +SetFacingBigDollAsym: + ld hl, OBJECT_FACING + add hl, bc + ld [hl], FACING_BIG_DOLL_ASYM + ret + +SetFacingBigDoll: + ld a, [wVariableSprites + SPRITE_BIG_DOLL - SPRITE_VARS] + ld d, FACING_BIG_DOLL_SYM ; symmetric + cp SPRITE_BIG_SNORLAX + jr z, .ok + cp SPRITE_BIG_LAPRAS + jr z, .ok + ld d, FACING_BIG_DOLL_ASYM ; asymmetric + +.ok + ld hl, OBJECT_FACING + add hl, bc + ld [hl], d + ret + +SetFacingBoulderDust: + ld hl, OBJECT_STEP_FRAME + add hl, bc + inc [hl] + ld a, [hl] + + ld hl, OBJECT_FACING + add hl, bc + and 2 + ld a, FACING_BOULDER_DUST_1 + jr z, .ok + inc a + assert FACING_BOULDER_DUST_1 + 1 == FACING_BOULDER_DUST_2 +.ok + ld [hl], a + ret + +SetFacingGrassShake: + ld hl, OBJECT_STEP_FRAME + add hl, bc + inc [hl] + ld a, [hl] + ld hl, OBJECT_FACING + add hl, bc + and 4 + ld a, FACING_GRASS_1 + jr z, .ok + inc a ; FACING_GRASS_2 + +.ok + ld [hl], a + ret diff --git a/engine/overworld/map_objects.asm b/engine/overworld/map_objects.asm new file mode 100644 index 0000000..990d7f8 --- /dev/null +++ b/engine/overworld/map_objects.asm @@ -0,0 +1,3044 @@ +INCLUDE "data/sprites/facings.asm" + +INCLUDE "data/sprites/map_objects.asm" + +DeleteMapObject:: + push bc + ld hl, OBJECT_MAP_OBJECT_INDEX + add hl, bc + ld a, [hl] + push af + ld h, b + ld l, c + ld bc, OBJECT_LENGTH + xor a + call ByteFill + pop af + cp -1 + jr z, .ok + bit 7, a + jr nz, .ok + call GetMapObject + ld hl, OBJECT_SPRITE + add hl, bc + ld [hl], -1 +.ok + pop bc + ret + +HandleObjectStep: + call CheckObjectStillVisible + ret c + call HandleStepType + call HandleObjectAction + ret + +CheckObjectStillVisible: + ld hl, OBJECT_FLAGS2 + add hl, bc + res OBJ_FLAGS2_6, [hl] + ld a, [wXCoord] + ld e, a + ld hl, OBJECT_MAP_X + add hl, bc + ld a, [hl] + add 1 + sub e + jr c, .ok + cp MAPOBJECT_SCREEN_WIDTH + jr nc, .ok + ld a, [wYCoord] + ld e, a + ld hl, OBJECT_MAP_Y + add hl, bc + ld a, [hl] + add 1 + sub e + jr c, .ok + cp MAPOBJECT_SCREEN_HEIGHT + jr nc, .ok + jr .yes + +.ok + ld hl, OBJECT_FLAGS2 + add hl, bc + set OBJ_FLAGS2_6, [hl] + ld a, [wXCoord] + ld e, a + ld hl, OBJECT_INIT_X + add hl, bc + ld a, [hl] + add 1 + sub e + jr c, .ok2 + cp MAPOBJECT_SCREEN_WIDTH + jr nc, .ok2 + ld a, [wYCoord] + ld e, a + ld hl, OBJECT_INIT_Y + add hl, bc + ld a, [hl] + add 1 + sub e + jr c, .ok2 + cp MAPOBJECT_SCREEN_HEIGHT + jr nc, .ok2 +.yes + and a + ret + +.ok2 + ld hl, OBJECT_FLAGS1 + add hl, bc + bit WONT_DELETE_F, [hl] + jr nz, .yes2 + call DeleteMapObject + scf + ret + +.yes2 + ld hl, OBJECT_FLAGS2 + add hl, bc + set OBJ_FLAGS2_6, [hl] + and a + ret + +HandleStepType: + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld a, [hl] + and a + jr z, .zero + ld hl, OBJECT_FLAGS2 + add hl, bc + bit FROZEN_F, [hl] + jr nz, .frozen + cp STEP_TYPE_FROM_MOVEMENT + jr z, .one + jr .ok3 + +.zero + call StepFunction_Reset + ld hl, OBJECT_FLAGS2 + add hl, bc + bit FROZEN_F, [hl] + jr nz, .frozen +.one + call StepFunction_FromMovement + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld a, [hl] + and a + ret z + cp STEP_TYPE_FROM_MOVEMENT + ret z +.ok3 + ld hl, StepTypesJumptable + rst JumpTable + ret + +.frozen + ret + +HandleObjectAction: + ld hl, OBJECT_FLAGS1 + add hl, bc + bit INVISIBLE_F, [hl] + jr nz, SetFacingStanding + ld hl, OBJECT_FLAGS2 + add hl, bc + bit OBJ_FLAGS2_6, [hl] + jr nz, SetFacingStanding + bit FROZEN_F, [hl] + jr nz, _CallFrozenObjectAction +; use first column (normal) + ld de, ObjectActionPairPointers + jr CallObjectAction + +HandleFrozenObjectAction: + ld hl, OBJECT_FLAGS1 + add hl, bc + bit INVISIBLE_F, [hl] + jr nz, SetFacingStanding +_CallFrozenObjectAction: +; use second column (frozen) + ld de, ObjectActionPairPointers + 2 + jr CallObjectAction ; pointless + +CallObjectAction: + ld hl, OBJECT_ACTION + add hl, bc + ld a, [hl] + ld l, a + ld h, 0 + add hl, hl + add hl, hl + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call _hl_ + ret + +INCLUDE "engine/overworld/map_object_action.asm" + +CopyCoordsTileToLastCoordsTile: + ld hl, OBJECT_MAP_X + add hl, bc + ld a, [hl] + ld hl, OBJECT_LAST_MAP_X + add hl, bc + ld [hl], a + ld hl, OBJECT_MAP_Y + add hl, bc + ld a, [hl] + ld hl, OBJECT_LAST_MAP_Y + add hl, bc + ld [hl], a + ld hl, OBJECT_TILE + add hl, bc + ld a, [hl] + ld hl, OBJECT_LAST_TILE + add hl, bc + ld [hl], a + call SetTallGrassFlags + ld hl, OBJECT_TILE + add hl, bc + ld a, [hl] + call UselessAndA + ret + +CopyLastCoordsToCoords: + ld hl, OBJECT_LAST_MAP_X + add hl, bc + ld a, [hl] + ld hl, OBJECT_MAP_X + add hl, bc + ld [hl], a + ld hl, OBJECT_LAST_MAP_Y + add hl, bc + ld a, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld [hl], a + ret + +UpdateTallGrassFlags: + ld hl, OBJECT_FLAGS2 + add hl, bc + bit OVERHEAD_F, [hl] + jr z, .ok + ld hl, OBJECT_TILE + add hl, bc + ld a, [hl] + call SetTallGrassFlags +.ok + ld hl, OBJECT_TILE + add hl, bc + ld a, [hl] + call UselessAndA + ret c ; never happens + ld hl, OBJECT_LAST_TILE + add hl, bc + ld a, [hl] + call UselessAndA + ret + +SetTallGrassFlags: + call CheckSuperTallGrassTile + jr z, .set + call CheckGrassTile + jr c, .reset +.set + ld hl, OBJECT_FLAGS2 + add hl, bc + set OVERHEAD_F, [hl] + ret + +.reset + ld hl, OBJECT_FLAGS2 + add hl, bc + res OVERHEAD_F, [hl] + ret + +UselessAndA: + and a + ret + +EndSpriteMovement: + xor a + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld [hl], a + ld hl, OBJECT_MOVEMENT_INDEX + add hl, bc + ld [hli], a + ld [hli], a ; OBJECT_STEP_INDEX + ld [hli], a ; OBJECT_1D + ld [hl], a ; OBJECT_1E + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ret + +InitStep: + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], a + ld hl, OBJECT_FLAGS1 + add hl, bc + bit FIXED_FACING_F, [hl] + jr nz, GetNextTile + add a + add a + and %00001100 + ld hl, OBJECT_DIRECTION + add hl, bc + ld [hl], a + ; fallthrough + +GetNextTile: + call GetStepVector + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + ld a, d + call GetStepVectorSign + ld hl, OBJECT_LAST_MAP_X + add hl, bc + add [hl] + ld hl, OBJECT_MAP_X + add hl, bc + ld [hl], a + ld d, a + ld a, e + call GetStepVectorSign + ld hl, OBJECT_LAST_MAP_Y + add hl, bc + add [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld [hl], a + ld e, a + push bc + call GetCoordTile + pop bc + ld hl, OBJECT_TILE + add hl, bc + ld [hl], a + ret + +AddStepVector: + call GetStepVector + ld hl, OBJECT_SPRITE_X + add hl, bc + ld a, [hl] + add d + ld [hl], a + ld hl, OBJECT_SPRITE_Y + add hl, bc + ld a, [hl] + add e + ld [hl], a + ret + +GetStepVector: +; Return (x, y, duration, speed) in (d, e, a, h). + ld hl, OBJECT_WALKING + add hl, bc + ld a, [hl] + and %00001111 + add a + add a + ld l, a + ld h, 0 + ld de, StepVectors + add hl, de + ld d, [hl] + inc hl + ld e, [hl] + inc hl + ld a, [hli] + ld h, [hl] + ret + +StepVectors: +; x, y, duration, speed + ; slow + db 0, 1, 16, 1 + db 0, -1, 16, 1 + db -1, 0, 16, 1 + db 1, 0, 16, 1 + ; normal + db 0, 2, 8, 2 + db 0, -2, 8, 2 + db -2, 0, 8, 2 + db 2, 0, 8, 2 + ; fast + db 0, 4, 4, 4 + db 0, -4, 4, 4 + db -4, 0, 4, 4 + db 4, 0, 4, 4 + +GetStepVectorSign: + add a + ret z ; 0 or 128 (-128) + ld a, 1 + ret nc ; +1 to +127 + ld a, -1 + ret ; -127 to -1 + +UpdatePlayerStep: + ld hl, OBJECT_WALKING + add hl, bc + ld a, [hl] + and %00000011 + ld [wPlayerStepDirection], a + call AddStepVector + ld a, [wPlayerStepVectorX] + add d + ld [wPlayerStepVectorX], a + ld a, [wPlayerStepVectorY] + add e + ld [wPlayerStepVectorY], a + ld hl, wPlayerStepFlags + set PLAYERSTEP_CONTINUE_F, [hl] + ret + +GetMapObjectField: ; unreferenced + push bc + ld e, a + ld d, 0 + ld hl, OBJECT_MAP_OBJECT_INDEX + add hl, bc + ld a, [hl] + call GetMapObject + add hl, de + ld a, [hl] + pop bc + ret + +RestoreDefaultMovement: + ld hl, OBJECT_MAP_OBJECT_INDEX + add hl, bc + ld a, [hl] + cp -1 + jr z, .ok + push bc + call GetMapObject + ld hl, MAPOBJECT_MOVEMENT + add hl, bc + ld a, [hl] + pop bc + ret + +.ok + ld a, SPRITEMOVEDATA_STANDING_DOWN + ret + +ObjectMovement_ZeroAnonJumptableIndex: ; unreferenced + ld hl, OBJECT_MOVEMENT_INDEX + add hl, bc + ld [hl], 0 + ret + +ObjectMovement_IncAnonJumptableIndex: + ld hl, OBJECT_MOVEMENT_INDEX + add hl, bc + inc [hl] + ret + +ObjectMovement_DecAnonJumptableIndex: + ld hl, OBJECT_MOVEMENT_INDEX + add hl, bc + dec [hl] + ret + +ObjectMovement_AnonJumptable: + ld hl, OBJECT_MOVEMENT_INDEX + add hl, bc + ld a, [hl] + pop hl + rst JumpTable + ret + +ObjectStep_ZeroAnonJumptableIndex: + ld hl, OBJECT_STEP_INDEX + add hl, bc + ld [hl], 0 + ret + +ObjectStep_IncAnonJumptableIndex: + ld hl, OBJECT_STEP_INDEX + add hl, bc + inc [hl] + ret + +ObjectStep_AnonJumptable: + ld hl, OBJECT_STEP_INDEX + add hl, bc + ld a, [hl] + pop hl + rst JumpTable + ret + +ObjectStep_GetAnonJumptableIndex: ; unreferenced + ld hl, OBJECT_STEP_INDEX + add hl, bc + ld a, [hl] + ret + +ObjectStep_SetAnonJumptableIndex: ; unreferenced + ld hl, OBJECT_STEP_INDEX + add hl, bc + ld [hl], a + ret + +StepFunction_Reset: + ld hl, OBJECT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld e, [hl] + push bc + call GetCoordTile + pop bc + ld hl, OBJECT_TILE + add hl, bc + ld [hl], a + call CopyCoordsTileToLastCoordsTile + call EndSpriteMovement + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_FromMovement: + call ObjectStep_ZeroAnonJumptableIndex + call GetSpriteMovementFunction + ld a, [hl] + ld hl, .Pointers + rst JumpTable + ret + +.Pointers: +; entries correspond to SPRITEMOVEFN_* constants (see constants/map_object_constants.asm) + table_width 2, StepFunction_FromMovement.Pointers + dw MovementFunction_Null ; 00 + dw MovementFunction_RandomWalkY ; 01 + dw MovementFunction_RandomWalkX ; 02 + dw MovementFunction_RandomWalkXY ; 03 + dw MovementFunction_RandomSpinSlow ; 04 + dw MovementFunction_RandomSpinFast ; 05 + dw MovementFunction_Standing ; 06 + dw MovementFunction_ObeyDPad ; 07 + dw MovementFunction_Indexed1 ; 08 + dw MovementFunction_Indexed2 ; 09 + dw MovementFunction_0a ; 0a + dw MovementFunction_0b ; 0b + dw MovementFunction_0c ; 0c + dw MovementFunction_0d ; 0d + dw MovementFunction_0e ; 0e + dw MovementFunction_Follow ; 0f + dw MovementFunction_Script ; 10 + dw MovementFunction_Strength ; 11 + dw MovementFunction_FollowNotExact ; 12 + dw MovementFunction_Shadow ; 13 + dw MovementFunction_Emote ; 14 + dw MovementFunction_BigStanding ; 15 + dw MovementFunction_Bouncing ; 16 + dw MovementFunction_ScreenShake ; 17 + dw MovementFunction_SpinClockwise ; 18 + dw MovementFunction_SpinCounterclockwise ; 19 + dw MovementFunction_BoulderDust ; 1a + dw MovementFunction_ShakingGrass ; 1b + assert_table_length NUM_SPRITEMOVEFN + +MovementFunction_Null: + ret + +MovementFunction_RandomWalkY: + call Random + ldh a, [hRandomAdd] + and %00000001 + jp _RandomWalkContinue + +MovementFunction_RandomWalkX: + call Random + ldh a, [hRandomAdd] + and %00000001 + or %00000010 + jp _RandomWalkContinue + +MovementFunction_RandomWalkXY: + call Random + ldh a, [hRandomAdd] + and %00000011 + jp _RandomWalkContinue + +MovementFunction_RandomSpinSlow: + call Random + ldh a, [hRandomAdd] + and %00001100 + ld hl, OBJECT_DIRECTION + add hl, bc + ld [hl], a + jp RandomStepDuration_Slow + +MovementFunction_RandomSpinFast: + ld hl, OBJECT_DIRECTION + add hl, bc + ld a, [hl] + and %00001100 + ld d, a + call Random + ldh a, [hRandomAdd] + and %00001100 + cp d + jr nz, .keep + xor %00001100 +.keep + ld [hl], a + jp RandomStepDuration_Fast + +MovementFunction_Standing: + call CopyLastCoordsToCoords + call EndSpriteMovement + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STAND + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_RESTORE + ret + +MovementFunction_ObeyDPad: + ld hl, GetPlayerNextMovementIndex + jp HandleMovementData + +MovementFunction_Indexed1: + ld hl, GetIndexedMovementIndex1 + jp HandleMovementData + +MovementFunction_Indexed2: + ld hl, GetIndexedMovementIndex2 + jp HandleMovementData + +MovementFunction_0a: + jp _GetMovementObject + +MovementFunction_0b: + jp _GetMovementObject + +MovementFunction_0c: + jp _GetMovementObject + +MovementFunction_0d: + ld hl, GetPlayerNextMovementIndex + jp HandleMovementData + +MovementFunction_0e: + jp _GetMovementObject + +MovementFunction_Follow: + ld hl, GetFollowerNextMovementIndex + jp HandleMovementData + +MovementFunction_Script: + ld hl, GetMovementIndex + jp HandleMovementData + +MovementFunction_Strength: + call ObjectMovement_AnonJumptable +.anon_dw + dw .start + dw .stop + +.start: + ld hl, OBJECT_TILE + add hl, bc + ld a, [hl] + call CheckPitTile + jr z, .on_pit + ld hl, OBJECT_FLAGS2 + add hl, bc + bit OBJ_FLAGS2_2, [hl] + res OBJ_FLAGS2_2, [hl] + jr z, .ok + ld hl, OBJECT_RANGE + add hl, bc + ld a, [hl] + and %00000011 + or 0 + call InitStep + call CanObjectMoveInDirection + jr c, .ok2 + ld de, SFX_STRENGTH + call PlaySFX + call SpawnStrengthBoulderDust + call UpdateTallGrassFlags + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_STRENGTH_BOULDER + ret + +.ok2 + call CopyLastCoordsToCoords +.ok + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ret + +.on_pit + call ObjectMovement_IncAnonJumptableIndex +.stop: + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ret + +MovementFunction_FollowNotExact: + ld hl, OBJECT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld e, [hl] + ld hl, OBJECT_RANGE + add hl, bc + ld a, [hl] + push bc + call GetObjectStruct + ld hl, OBJECT_WALKING + add hl, bc + ld a, [hl] + cp STANDING + jr z, .standing + ld hl, OBJECT_LAST_MAP_X + add hl, bc + ld a, [hl] + cp d + jr z, .equal + jr c, .less + ld a, 3 + jr .done + +.less + ld a, 2 + jr .done + +.equal + ld hl, OBJECT_LAST_MAP_Y + add hl, bc + ld a, [hl] + cp e + jr z, .standing + jr c, .less2 + ld a, 0 + jr .done + +.less2 + ld a, 1 +.done + ld d, a + ld hl, OBJECT_WALKING + add hl, bc + ld a, [hl] + and %00001100 + or d + pop bc + jp NormalStep + +.standing + pop bc + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STAND + ret + +MovementFunction_BigStanding: + call EndSpriteMovement + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_BIG_DOLL_SYM + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_STANDING + ret + +MovementFunction_Bouncing: + call EndSpriteMovement + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_BOUNCE + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_STANDING + ret + +MovementFunction_SpinCounterclockwise: + call ObjectMovement_AnonJumptable +.anon_dw + dw _MovementSpinInit + dw _MovementSpinRepeat + dw _MovementSpinTurnLeft + +MovementFunction_SpinClockwise: + call ObjectMovement_AnonJumptable +.anon_dw + dw _MovementSpinInit + dw _MovementSpinRepeat + dw _MovementSpinTurnRight + +_MovementSpinInit: + call EndSpriteMovement + call ObjectMovement_IncAnonJumptableIndex + ; fallthrough + +_MovementSpinRepeat: + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STAND + ld hl, OBJECT_RANGE + add hl, bc + ld a, [hl] + ld a, $10 + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_SLEEP + call ObjectMovement_IncAnonJumptableIndex + ret + +_MovementSpinTurnLeft: + ld de, .facings_counterclockwise + call _MovementSpinNextFacing + jr MovementFunction_SpinCounterclockwise + +.facings_counterclockwise: + db OW_RIGHT + db OW_LEFT + db OW_DOWN + db OW_UP + +_MovementSpinTurnRight: + ld de, .facings_clockwise + call _MovementSpinNextFacing + jr MovementFunction_SpinClockwise + +.facings_clockwise: + db OW_LEFT + db OW_RIGHT + db OW_UP + db OW_DOWN + +_MovementSpinNextFacing: + ld hl, OBJECT_DIRECTION + add hl, bc + ld a, [hl] + and %00001100 + rrca + rrca + push hl + ld l, a + ld h, 0 + add hl, de + ld a, [hl] + pop hl + ld [hl], a + call ObjectMovement_DecAnonJumptableIndex + ret + +MovementFunction_Shadow: + call InitMovementField1dField1e + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_SHADOW + ld hl, OBJECT_STEP_DURATION + add hl, de + ld a, [hl] + inc a + add a + add 0 + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + ld hl, OBJECT_WALKING + add hl, de + ld a, [hl] + maskbits NUM_DIRECTIONS + ld d, 1 * 8 + 6 + cp DOWN + jr z, .ok + cp UP + jr z, .ok + ld d, 1 * 8 + 4 +.ok + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], d + ld hl, OBJECT_SPRITE_X_OFFSET + add hl, bc + ld [hl], 0 + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_TRACKING_OBJECT + ret + +MovementFunction_Emote: + call EndSpriteMovement + call InitMovementField1dField1e + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_EMOTE + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], 0 + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], -2 * 8 + ld hl, OBJECT_SPRITE_X_OFFSET + add hl, bc + ld [hl], 0 + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_TRACKING_OBJECT + ret + +MovementFunction_BoulderDust: + call EndSpriteMovement + call InitMovementField1dField1e + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_BOULDER_DUST + ld hl, OBJECT_STEP_DURATION + add hl, de + ld a, [hl] + inc a + add a + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + ld hl, OBJECT_WALKING + add hl, de + ld a, [hl] + and %00000011 + ld e, a + ld d, 0 + ld hl, .dust_coords + add hl, de + add hl, de + ld d, [hl] + inc hl + ld e, [hl] + ld hl, OBJECT_SPRITE_X_OFFSET + add hl, bc + ld [hl], d + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], e + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_TRACKING_OBJECT + ret + +.dust_coords: + ; x, y + db 0, -4 + db 0, 8 + db 6, 2 + db -6, 2 + +MovementFunction_ShakingGrass: + call EndSpriteMovement + call InitMovementField1dField1e + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_GRASS_SHAKE + ld hl, OBJECT_STEP_DURATION + add hl, de + ld a, [hl] + add -1 + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_TRACKING_OBJECT + ret + +InitMovementField1dField1e: + ld hl, OBJECT_RANGE + add hl, bc + ld a, [hl] + push bc + call GetObjectStruct + ld d, b + ld e, c + pop bc + ld hl, OBJECT_1D + add hl, bc + ld [hl], e + inc hl ; OBJECT_1E + ld [hl], d + ret + +MovementFunction_ScreenShake: + call EndSpriteMovement + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_00 + ld hl, OBJECT_RANGE + add hl, bc + ld a, [hl] + call .GetDurationAndField1e + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], e + ld hl, OBJECT_1E + add hl, bc + ld [hl], a + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_SCREENSHAKE + ret + +.GetDurationAndField1e: + ld d, a + and %00111111 + ld e, a + ld a, d + rlca + rlca + and %00000011 + ld d, a + inc d + ld a, 1 +.loop + dec d + ret z + add a + jr .loop + +_RandomWalkContinue: + call InitStep + call CanObjectMoveInDirection + jr c, .new_duration + call UpdateTallGrassFlags + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STEP + ld hl, wCenteredObject + ldh a, [hMapObjectIndex] + cp [hl] + jr z, .centered + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_CONTINUE_WALK + ret + +.centered + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_PLAYER_WALK + ret + +.new_duration: + call EndSpriteMovement + call CopyLastCoordsToCoords + ; fallthrough + +RandomStepDuration_Slow: + call Random + ldh a, [hRandomAdd] + and %01111111 + jr _SetRandomStepDuration + +RandomStepDuration_Fast: + call Random + ldh a, [hRandomAdd] + and %00011111 +_SetRandomStepDuration: + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STAND + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_SLEEP + ret + +StepTypesJumptable: +; entries correspond to STEP_TYPE_* constants (see constants/map_object_constants.asm) + table_width 2, StepTypesJumptable + dw StepFunction_Reset ; 00 + dw StepFunction_FromMovement ; 01 + dw StepFunction_NPCWalk ; 02 + dw StepFunction_Sleep ; 03 + dw StepFunction_Standing ; 04 + dw StepFunction_Restore ; 05 + dw StepFunction_PlayerWalk ; 06 + dw StepFunction_ContinueWalk ; 07 + dw StepFunction_NPCJump ; 08 + dw StepFunction_PlayerJump ; 09 + dw StepFunction_Turn ; 0a + dw StepFunction_Bump ; 0b + dw StepFunction_TeleportFrom ; 0c + dw StepFunction_TeleportTo ; 0d + dw StepFunction_Skyfall ; 0e + dw StepFunction_StrengthBoulder ; 0f + dw StepFunction_GotBite ; 10 + dw StepFunction_RockSmash ; 11 + dw StepFunction_DigTo ; 12 + dw StepFunction_TrackingObject ; 13 + dw StepFunction_14 ; 14 + dw StepFunction_ScreenShake ; 15 + dw StepFunction_16 ; 16 + dw StepFunction_17 ; 17 + dw StepFunction_Delete ; 18 + dw StepFunction_SkyfallTop ; 19 + assert_table_length NUM_STEP_TYPES + +WaitStep_InPlace: + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_NPCJump: + call ObjectStep_AnonJumptable +.anon_dw + dw .Jump + dw .Land + +.Jump: + call AddStepVector + call UpdateJumpPosition + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + call CopyCoordsTileToLastCoordsTile + call GetNextTile + ld hl, OBJECT_FLAGS2 + add hl, bc + res OVERHEAD_F, [hl] + call ObjectStep_IncAnonJumptableIndex + ret + +.Land: + call AddStepVector + call UpdateJumpPosition + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + call CopyCoordsTileToLastCoordsTile + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_PlayerJump: + call ObjectStep_AnonJumptable +.anon_dw + dw .initjump + dw .stepjump + dw .initland + dw .stepland + +.initjump + ld hl, wPlayerStepFlags + set PLAYERSTEP_START_F, [hl] + call ObjectStep_IncAnonJumptableIndex +.stepjump + call UpdateJumpPosition + call UpdatePlayerStep + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + call CopyCoordsTileToLastCoordsTile + ld hl, OBJECT_FLAGS2 + add hl, bc + res OVERHEAD_F, [hl] + ld hl, wPlayerStepFlags + set PLAYERSTEP_STOP_F, [hl] + set PLAYERSTEP_MIDAIR_F, [hl] + call ObjectStep_IncAnonJumptableIndex + ret + +.initland + call GetNextTile + ld hl, wPlayerStepFlags + set PLAYERSTEP_START_F, [hl] + call ObjectStep_IncAnonJumptableIndex +.stepland + call UpdateJumpPosition + call UpdatePlayerStep + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + ld hl, wPlayerStepFlags + set PLAYERSTEP_STOP_F, [hl] + call CopyCoordsTileToLastCoordsTile + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_TeleportFrom: + call ObjectStep_AnonJumptable +.anon_dw + dw .InitSpin + dw .DoSpin + dw .InitSpinRise + dw .DoSpinRise + +.InitSpin: + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld [hl], 0 + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], 16 + call ObjectStep_IncAnonJumptableIndex +.DoSpin: + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_SPIN + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + call ObjectStep_IncAnonJumptableIndex + ret + +.InitSpinRise: + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld [hl], 0 + ld hl, OBJECT_JUMP_HEIGHT + add hl, bc + ld [hl], $10 + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], 16 + ld hl, OBJECT_FLAGS2 + add hl, bc + res OVERHEAD_F, [hl] + call ObjectStep_IncAnonJumptableIndex +.DoSpinRise: + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_SPIN + ld hl, OBJECT_JUMP_HEIGHT + add hl, bc + inc [hl] + ld a, [hl] + ld d, $60 + call Sine + ld a, h + sub $60 + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], a + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld [hl], 0 + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_TeleportTo: + call ObjectStep_AnonJumptable +.anon_dw + dw .InitWait + dw .DoWait + dw .InitDescent + dw .DoDescent + dw .InitFinalSpin + dw .DoFinalSpin + dw .FinishStep + +.InitWait: + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_00 + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], 16 + call ObjectStep_IncAnonJumptableIndex + ret + +.DoWait: + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + call ObjectStep_IncAnonJumptableIndex +.InitDescent: + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld [hl], 0 + ld hl, OBJECT_JUMP_HEIGHT + add hl, bc + ld [hl], 0 + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], 16 + call ObjectStep_IncAnonJumptableIndex + ret + +.DoDescent: + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_SPIN + ld hl, OBJECT_JUMP_HEIGHT + add hl, bc + inc [hl] + ld a, [hl] + ld d, $60 + call Sine + ld a, h + sub $60 + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], a + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + call ObjectStep_IncAnonJumptableIndex +.InitFinalSpin: + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], 16 + call ObjectStep_IncAnonJumptableIndex + ret + +.DoFinalSpin: + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_SPIN + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz +.FinishStep: + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld [hl], 0 + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], 0 + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_Skyfall: + call ObjectStep_AnonJumptable +.anon_dw + dw .Init + dw .Step + dw .Fall + dw .Finish + +.Init: + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_00 + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], 16 + call ObjectStep_IncAnonJumptableIndex +.Step: + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STEP + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld [hl], 0 + ld hl, OBJECT_JUMP_HEIGHT + add hl, bc + ld [hl], 0 + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], 16 + call ObjectStep_IncAnonJumptableIndex +.Fall: + ld hl, OBJECT_JUMP_HEIGHT + add hl, bc + inc [hl] + ld a, [hl] + ld d, $60 + call Sine + ld a, h + sub $60 + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], a + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + call ObjectStep_IncAnonJumptableIndex +.Finish: + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld [hl], 0 + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], 0 + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_GotBite: + call ObjectStep_AnonJumptable +.anon_dw + dw .Init + dw .Run + +.Init: + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], 8 + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], 0 + call ObjectStep_IncAnonJumptableIndex +.Run: + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld a, [hl] + xor 1 + ld [hl], a + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], 0 + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_RockSmash: + call .Step + jp WaitStep_InPlace + +.Step: + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld a, [hl] + and %00000001 + ld a, OBJECT_ACTION_STAND + jr z, .yes + ld a, OBJECT_ACTION_00 +.yes + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], a + ret + +StepFunction_DigTo: + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld a, [hl] + and %00000001 + ld a, OBJECT_ACTION_SPIN + jr z, .yes + ld a, OBJECT_ACTION_SPIN_FLICKER +.yes + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], a + jp WaitStep_InPlace + +StepFunction_Sleep: + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_Delete: + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + jp DeleteMapObject + +StepFunction_Bump: + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_Restore: + call ObjectStep_AnonJumptable +.anon_dw + dw .Reset + dw StepFunction_Standing + +.Reset: + call RestoreDefaultMovement + call GetInitialFacing + ld hl, OBJECT_DIRECTION + add hl, bc + ld [hl], a + call ObjectStep_IncAnonJumptableIndex + ; fallthrough + +StepFunction_Standing: + call Stubbed_UpdateYOffset + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ret + +StepFunction_NPCWalk: + call Stubbed_UpdateYOffset + call AddStepVector + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + call CopyCoordsTileToLastCoordsTile + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_ContinueWalk: + call AddStepVector + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + call CopyCoordsTileToLastCoordsTile + jp RandomStepDuration_Slow + +StepFunction_PlayerWalk: + call ObjectStep_AnonJumptable +.anon_dw + dw .init + dw .step + +.init + ld hl, wPlayerStepFlags + set PLAYERSTEP_START_F, [hl] + call ObjectStep_IncAnonJumptableIndex +.step + call UpdatePlayerStep + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + ld hl, wPlayerStepFlags + set PLAYERSTEP_STOP_F, [hl] + call CopyCoordsTileToLastCoordsTile + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_Turn: + call ObjectStep_AnonJumptable +.anon_dw + dw .init1 + dw .step1 + dw .init2 + dw .step2 + +.init1 + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld a, [hl] + ld [hl], 2 + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], 2 + call ObjectStep_IncAnonJumptableIndex +.step1 + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + call ObjectStep_IncAnonJumptableIndex +.init2 + ld hl, OBJECT_1D ; new facing + add hl, bc + ld a, [hl] + ld hl, OBJECT_DIRECTION + add hl, bc + ld [hl], a + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], 2 + call ObjectStep_IncAnonJumptableIndex +.step2 + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_StrengthBoulder: + call AddStepVector + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + push bc + ld hl, OBJECT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld e, [hl] + ld hl, OBJECT_MAP_OBJECT_INDEX + add hl, bc + ld a, [hl] + ld b, a + farcall CopyDECoordsToMapObject + pop bc + ld hl, OBJECT_FLAGS2 + add hl, bc + res OBJ_FLAGS2_2, [hl] + call CopyCoordsTileToLastCoordsTile + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +StepFunction_TrackingObject: + ld hl, OBJECT_1D + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + ld hl, OBJECT_SPRITE + add hl, de + ld a, [hl] + and a + jr z, .nope + ld hl, OBJECT_SPRITE_X + add hl, de + ld a, [hl] + ld hl, OBJECT_SPRITE_X + add hl, bc + ld [hl], a + ld hl, OBJECT_SPRITE_Y + add hl, de + ld a, [hl] + ld hl, OBJECT_SPRITE_Y + add hl, bc + ld [hl], a + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld a, [hl] + and a + ret z + dec [hl] + ret nz +.nope + jp DeleteMapObject + +StepFunction_14: +StepFunction_ScreenShake: + call ObjectStep_AnonJumptable +.anon_dw + dw .Init + dw .Run + +.Init: + xor a + ld hl, OBJECT_1D + add hl, bc + ld [hl], a + call ObjectStep_IncAnonJumptableIndex +.Run: + ld hl, OBJECT_1D + add hl, bc + ld d, [hl] + ld a, [wPlayerStepVectorY] + sub d + ld [wPlayerStepVectorY], a + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + jr z, .ok + ld a, [hl] + call .GetSign + ld hl, OBJECT_1D + add hl, bc + ld [hl], a + ld d, a + ld a, [wPlayerStepVectorY] + add d + ld [wPlayerStepVectorY], a + ret + +.ok + call DeleteMapObject + ret + +.GetSign: + ld hl, OBJECT_1E + add hl, bc + and 1 + ld a, [hl] + ret z + cpl + inc a + ret + +StepFunction_16: + call ObjectStep_AnonJumptable + ; jumptable was dummied out here + +StepFunction_17: + call ObjectStep_AnonJumptable +.anon_dw + dw .null + dw .null + dw .null +.null + +StepFunction_SkyfallTop: + call ObjectStep_AnonJumptable +.anon_dw + dw .Init + dw .Run + +.Init: + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_SKYFALL + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], 16 + call ObjectStep_IncAnonJumptableIndex + +.Run: + ld hl, OBJECT_STEP_DURATION + add hl, bc + dec [hl] + ret nz + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], $60 + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld [hl], 0 + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +Stubbed_UpdateYOffset: +; dummied out + ret + ld hl, OBJECT_1D + add hl, bc + inc [hl] + ld a, [hl] + srl a + srl a + and %00000111 + ld l, a + ld h, 0 + ld de, .y_offsets + add hl, de + ld a, [hl] + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], a + ret + +.y_offsets: + db 0, -1, -2, -3, -4, -3, -2, -1 + +UpdateJumpPosition: + call GetStepVector + ld a, h + ld hl, OBJECT_JUMP_HEIGHT + add hl, bc + ld e, [hl] + add e + ld [hl], a + nop + srl e + ld d, 0 + ld hl, .y_offsets + add hl, de + ld a, [hl] + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld [hl], a + ret + +.y_offsets: + db -4, -6, -8, -10, -11, -12, -12, -12 + db -11, -10, -9, -8, -6, -4, 0, 0 + +GetPlayerNextMovementIndex: +; copy [wPlayerNextMovement] to [wPlayerMovement] + ld a, [wPlayerNextMovement] + ld hl, wPlayerMovement + ld [hl], a +; load [wPlayerNextMovement] with movement_step_sleep + ld a, movement_step_sleep + ld [wPlayerNextMovement], a +; recover the previous value of [wPlayerNextMovement] + ld a, [hl] + ret + +GetMovementIndex: + ld hl, wMovementDataBank + call _GetMovementIndex + ret + +GetIndexedMovementIndex1: + ld hl, OBJECT_MOVEMENT_INDEX + add hl, bc + ld e, [hl] + inc [hl] + ld d, 0 + ld hl, wMovementObject + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + ld a, [hl] + ret + +GetIndexedMovementIndex2: + ld hl, OBJECT_MOVEMENT_INDEX + add hl, bc + ld e, [hl] + inc [hl] + ld d, 0 + ld hl, wIndexedMovement2Pointer + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + ld a, [hl] + ret + +_GetMovementObject: + ld hl, GetMovementObject + jp HandleMovementData + +GetMovementObject: + ld a, [wMovementObject] + ret + +HandleMovementData: + call .StorePointer +.loop + xor a + ld [wContinueReadingMovement], a + call JumpMovementPointer + call DoMovementFunction + ld a, [wContinueReadingMovement] + and a + jr nz, .loop + ret + +.StorePointer: + ld a, l + ld [wMovementPointer], a + ld a, h + ld [wMovementPointer + 1], a + ret + +JumpMovementPointer: + ld hl, wMovementPointer + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +ContinueReadingMovement: + ld a, TRUE + ld [wContinueReadingMovement], a + ret + +DoMovementFunction: + push af + call ApplyMovementToFollower + pop af + ld hl, MovementPointers + rst JumpTable + ret + +INCLUDE "engine/overworld/movement.asm" + +ApplyMovementToFollower: + ld e, a + ld a, [wObjectFollow_Follower] + cp -1 + ret z + ld a, [wObjectFollow_Leader] + ld d, a + ldh a, [hMapObjectIndex] + cp d + ret nz + ld a, e + cp movement_step_sleep + ret z + cp movement_step_end + ret z + cp movement_step_4b + ret z + cp movement_step_bump + ret z + cp movement_slow_step + ret c + push af + ld hl, wFollowerMovementQueueLength + inc [hl] + ld e, [hl] + ld d, 0 + ld hl, wFollowMovementQueue + add hl, de + pop af + ld [hl], a + ret + +GetFollowerNextMovementIndex: + ld hl, wFollowerMovementQueueLength + ld a, [hl] + and a + jr z, .done + cp -1 + jr z, .done + dec [hl] + ld e, a + ld d, 0 + ld hl, wFollowMovementQueue + add hl, de + inc e + ld a, -1 +.loop + ld d, [hl] + ld [hld], a + ld a, d + dec e + jr nz, .loop + ret + +.done + call .CancelFollowIfLeaderMissing + ret c + ld a, movement_step_sleep + ret + +.CancelFollowIfLeaderMissing: + ld a, [wObjectFollow_Leader] + cp -1 + jr z, .nope + push bc + call GetObjectStruct + ld hl, OBJECT_SPRITE + add hl, bc + ld a, [hl] + pop bc + and a + jr z, .nope + and a + ret + +.nope + ld a, -1 + ld [wObjectFollow_Follower], a + ld a, movement_step_end + scf + ret + +SpawnShadow: + push bc + ld de, .ShadowObject + call CopyTempObjectData + call InitTempObject + pop bc + ret + +.ShadowObject: + ; vtile, palette, movement + db $00, PAL_OW_EMOTE, SPRITEMOVEDATA_SHADOW + +SpawnStrengthBoulderDust: + push bc + ld de, .BoulderDustObject + call CopyTempObjectData + call InitTempObject + pop bc + ret + +.BoulderDustObject: + ; vtile, palette, movement + db $00, PAL_OW_EMOTE, SPRITEMOVEDATA_BOULDERDUST + +SpawnEmote: + push bc + ld de, .EmoteObject + call CopyTempObjectData + call InitTempObject + pop bc + ret + +.EmoteObject: + ; vtile, palette, movement + db $00, PAL_OW_EMOTE, SPRITEMOVEDATA_EMOTE + +ShakeGrass: + push bc + ld de, .GrassObject + call CopyTempObjectData + call InitTempObject + pop bc + ret + +.GrassObject: + ; vtile, palette, movement + db $00, PAL_OW_TREE, SPRITEMOVEDATA_GRASS + +ShakeScreen: + push bc + push af + ld de, .ScreenShakeObject + call CopyTempObjectData + pop af + ld [wTempObjectCopyRange], a + call InitTempObject + pop bc + ret + +.ScreenShakeObject: + ; vtile, palette, movement + db $00, PAL_OW_EMOTE, SPRITEMOVEDATA_SCREENSHAKE + +DespawnEmote: + push bc + ldh a, [hMapObjectIndex] + ld c, a + call .DeleteEmote + pop bc + ret + +.DeleteEmote: + ld de, wObjectStructs + ld a, NUM_OBJECT_STRUCTS +.loop + push af + ld hl, OBJECT_FLAGS1 + add hl, de + bit EMOTE_OBJECT_F, [hl] + jr z, .next + ld hl, OBJECT_SPRITE + add hl, de + ld a, [hl] + and a + jr z, .next + push bc + xor a + ld bc, OBJECT_LENGTH + call ByteFill + pop bc +.next + ld hl, OBJECT_LENGTH + add hl, de + ld d, h + ld e, l + pop af + dec a + jr nz, .loop + ret + +InitTempObject: + call FindFirstEmptyObjectStruct + ret nc + ld d, h + ld e, l + farcall CopyTempObjectToObjectStruct + ret + +CopyTempObjectData: +; load into wTempObjectCopy: +; -1, -1, [de], [de + 1], [de + 2], [hMapObjectIndex], [NextMapX], [NextMapY], -1 +; This spawns the object at the same place as whichever object is loaded into bc. + ld hl, wTempObjectCopyMapObjectIndex + ld [hl], -1 + inc hl + ld [hl], -1 + inc hl + ld a, [de] + inc de + ld [hli], a + ld a, [de] + inc de + ld [hli], a + ld a, [de] + ld [hli], a + ldh a, [hMapObjectIndex] + ld [hli], a + push hl + ld hl, OBJECT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld e, [hl] + pop hl + ld [hl], d + inc hl + ld [hl], e + inc hl + ld [hl], -1 + ret + +UpdateAllObjectsFrozen:: + ld a, [wVramState] + bit 0, a + ret z + ld bc, wObjectStructs + xor a +.loop + ldh [hMapObjectIndex], a + call DoesObjectHaveASprite + jr z, .ok + call UpdateObjectFrozen +.ok + ld hl, OBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + ldh a, [hMapObjectIndex] + inc a + cp NUM_OBJECT_STRUCTS + jr nz, .loop + ret + +RespawnPlayerAndOpponent: +; called at battle start + call HideAllObjects + ld a, PLAYER + call RespawnObject + ld a, [wBattleScriptFlags] + bit 7, a + jr z, .skip_opponent + ldh a, [hLastTalked] + and a + jr z, .skip_opponent + call RespawnObject +.skip_opponent + call _UpdateSprites + ret + +RespawnPlayer: + call HideAllObjects + ld a, PLAYER + call RespawnObject + call _UpdateSprites + ret + +RespawnObject: + cp NUM_OBJECTS + ret nc + call GetMapObject + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, bc + ld a, [hl] + cp -1 + ret z + cp NUM_OBJECT_STRUCTS + ret nc + call GetObjectStruct + call DoesObjectHaveASprite + ret z + call UpdateRespawnedObjectFrozen + ret + +HideAllObjects: + xor a + ld bc, wObjectStructs +.loop + ldh [hMapObjectIndex], a + call SetFacing_Standing + ld hl, OBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + ldh a, [hMapObjectIndex] + inc a + cp NUM_OBJECT_STRUCTS + jr nz, .loop + ret + +UpdateObjectFrozen: + push bc + call CheckObjectCoveredByTextbox + pop bc + jr c, SetFacing_Standing + call CheckObjectOnScreen + jr c, SetFacing_Standing + call UpdateObjectTile + farcall HandleFrozenObjectAction ; no need to farcall + xor a + ret + +UpdateRespawnedObjectFrozen: + call CheckObjectOnScreen + jr c, SetFacing_Standing + farcall HandleFrozenObjectAction ; no need to farcall + xor a + ret + +SetFacing_Standing: + ld hl, OBJECT_FACING + add hl, bc + ld [hl], STANDING + scf + ret + +UpdateObjectTile: + push bc + ld hl, OBJECT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld e, [hl] + call GetCoordTile + pop bc + ld hl, OBJECT_TILE + add hl, bc + ld [hl], a + farcall UpdateTallGrassFlags ; no need to farcall + ret + +CheckObjectOnScreen: + ld hl, OBJECT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld e, [hl] + inc d + inc e + ld a, [wXCoord] + cp d + jr z, .equal_x + jr nc, .nope + add MAPOBJECT_SCREEN_WIDTH - 1 + cp d + jr c, .nope +.equal_x + ld a, [wYCoord] + cp e + jr z, .equal_y + jr nc, .nope + add MAPOBJECT_SCREEN_HEIGHT - 1 + cp e + jr c, .nope +.equal_y + xor a + ret + +.nope + scf + ret + +CheckObjectCoveredByTextbox: +; Check whether the object fits in the screen width. + ld a, [wPlayerBGMapOffsetX] + ld d, a + ld hl, OBJECT_SPRITE_X_OFFSET + add hl, bc + ld a, [hl] + ld hl, OBJECT_SPRITE_X + add hl, bc + add [hl] + add d + cp $f0 + jr nc, .ok1 + cp SCREEN_WIDTH_PX + jp nc, .nope +.ok1 +; Account for objects currently moving left/right. + and %00000111 + ld d, 2 + cp TILE_WIDTH / 2 + jr c, .ok2 + ld d, 3 +.ok2 +; Convert pixels to tiles. + ld a, [hl] + srl a + srl a + srl a + cp SCREEN_WIDTH + jr c, .ok3 + sub BG_MAP_WIDTH +.ok3 + ldh [hCurSpriteXCoord], a + +; Check whether the object fits in the screen height. + ld a, [wPlayerBGMapOffsetY] + ld e, a + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + ld a, [hl] + ld hl, OBJECT_SPRITE_Y + add hl, bc + add [hl] + add e + cp $f0 + jr nc, .ok4 + cp SCREEN_HEIGHT_PX + jr nc, .nope +.ok4 +; Account for objects currently moving up/down. + and %00000111 + ld e, 2 + cp TILE_WIDTH / 2 + jr c, .ok5 + ld e, 3 +.ok5 +; Convert pixels to tiles. + ld a, [hl] + srl a + srl a + srl a + cp SCREEN_HEIGHT + jr c, .ok6 + sub BG_MAP_HEIGHT +.ok6 + ldh [hCurSpriteYCoord], a + +; Account for big objects that are twice as wide and high. + ld hl, OBJECT_PALETTE + add hl, bc + bit BIG_OBJECT_F, [hl] + jr z, .ok7 + ld a, d + add 2 + ld d, a + ld a, e + add 2 + ld e, a +.ok7 + ld a, d + ldh [hCurSpriteXPixel], a + +.loop + ldh a, [hCurSpriteXPixel] + ld d, a + ldh a, [hCurSpriteYCoord] + add e + dec a + cp SCREEN_HEIGHT + jr nc, .ok9 + ld b, a +.next + ldh a, [hCurSpriteXCoord] + add d + dec a + cp SCREEN_WIDTH + jr nc, .ok8 + ld c, a + push bc + call Coord2Tile + pop bc +; NPCs disappear if standing on tile $60-$7f (or $e0-$ff), +; since those IDs are for text characters and textbox frames. + ld a, [hl] + cp FIRST_REGULAR_TEXT_CHAR + jr nc, .nope +.ok8 + dec d + jr nz, .next +.ok9 + dec e + jr nz, .loop + + and a + ret + +.nope + scf + ret + +HandleNPCStep:: + call ResetStepVector + call DoStepsForAllObjects + ret + +ResetStepVector: + xor a + ld [wPlayerStepVectorX], a + ld [wPlayerStepVectorY], a + ld [wPlayerStepFlags], a + ld a, STANDING + ld [wPlayerStepDirection], a + ret + +DoStepsForAllObjects: + ld bc, wObjectStructs + xor a +.loop + ldh [hMapObjectIndex], a + call DoesObjectHaveASprite + jr z, .next + call HandleObjectStep +.next + ld hl, OBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + ldh a, [hMapObjectIndex] + inc a + cp NUM_OBJECT_STRUCTS + jr nz, .loop + ret + +RefreshPlayerSprite: + ld a, movement_step_sleep + ld [wPlayerNextMovement], a + ld [wPlayerMovement], a + xor a + ld [wPlayerTurningDirection], a + ld [wPlayerStepFrame], a + call TryResetPlayerAction + farcall CheckWarpFacingDown + call c, SpawnInFacingDown + call SpawnInCustomFacing + ret + +TryResetPlayerAction: + ld hl, wPlayerSpriteSetupFlags + bit PLAYERSPRITESETUP_RESET_ACTION_F, [hl] + jr nz, .ok + ret + +.ok + ld a, OBJECT_ACTION_00 + ld [wPlayerAction], a + ret + +SpawnInCustomFacing: + ld hl, wPlayerSpriteSetupFlags + bit PLAYERSPRITESETUP_CUSTOM_FACING_F, [hl] + ret z + ld a, [wPlayerSpriteSetupFlags] + and PLAYERSPRITESETUP_FACING_MASK + add a + add a + jr _ContinueSpawnFacing + +SpawnInFacingDown: + ld a, DOWN +_ContinueSpawnFacing: + ld bc, wPlayerStruct + call SetSpriteDirection + ret + +_SetPlayerPalette: + ld a, d + and 1 << 7 + ret z + ld bc, 0 ; debug? + ld hl, OBJECT_DIRECTION + add hl, bc + ld a, [hl] + or d + ld [hl], a + ld a, d + swap a + and PALETTE_MASK + ld d, a + ld bc, wPlayerStruct + ld hl, OBJECT_PALETTE + add hl, bc + ld a, [hl] + and ~PALETTE_MASK + or d + ld [hl], a + ret + +StartFollow:: + push bc + ld a, b + call SetLeaderIfVisible + pop bc + ret c + ld a, c + call SetFollowerIfVisible + farcall QueueFollowerFirstStep + ret + +SetLeaderIfVisible: + call CheckObjectVisibility + ret c + ldh a, [hObjectStructIndex] + ld [wObjectFollow_Leader], a + ret + +StopFollow:: + call ResetLeader + call ResetFollower + ret + +ResetLeader: + ld a, -1 + ld [wObjectFollow_Leader], a + ret + +SetFollowerIfVisible: + push af + call ResetFollower + pop af + call CheckObjectVisibility + ret c + ld hl, OBJECT_MOVEMENT_TYPE + add hl, bc + ld [hl], SPRITEMOVEDATA_FOLLOWING + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_RESET + ldh a, [hObjectStructIndex] + ld [wObjectFollow_Follower], a + ret + +ResetFollower: + ld a, [wObjectFollow_Follower] + cp -1 + ret z + call GetObjectStruct + farcall ResetObject ; no need to farcall + ld a, -1 + ld [wObjectFollow_Follower], a + ret + +FreezeAllOtherObjects:: + ld a, c + call CheckObjectVisibility + ret c + push bc + call FreezeAllObjects + pop bc + ld hl, OBJECT_FLAGS2 + add hl, bc + res FROZEN_F, [hl] + xor a + ret + +FreezeObject: ; unreferenced + call CheckObjectVisibility + ret c + ld hl, OBJECT_FLAGS2 + add hl, bc + set FROZEN_F, [hl] + xor a + ret + +FreezeAllObjects: + ld bc, wObjectStructs + xor a +.loop + push af + call DoesObjectHaveASprite + jr z, .next + ld hl, OBJECT_FLAGS2 + add hl, bc + set FROZEN_F, [hl] +.next + ld hl, OBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + pop af + inc a + cp NUM_OBJECT_STRUCTS + jr nz, .loop + ret + +_UnfreezeFollowerObject:: + ld a, [wObjectFollow_Leader] + cp -1 + ret z + push bc + call GetObjectStruct + ld hl, OBJECT_MAP_OBJECT_INDEX + add hl, bc + ld a, [hl] + pop bc + cp c + ret nz + ld a, [wObjectFollow_Follower] + cp -1 + ret z + call GetObjectStruct + ld hl, OBJECT_FLAGS2 + add hl, bc + res FROZEN_F, [hl] + ret + +UnfreezeAllObjects:: + push bc + ld bc, wObjectStructs + xor a +.loop + push af + call DoesObjectHaveASprite + jr z, .next + ld hl, OBJECT_FLAGS2 + add hl, bc + res FROZEN_F, [hl] +.next + ld hl, OBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + pop af + inc a + cp NUM_OBJECT_STRUCTS + jr nz, .loop + pop bc + ret + +UnfreezeObject: ; unreferenced + call CheckObjectVisibility + ret c + ld hl, OBJECT_FLAGS2 + add hl, bc + res FROZEN_F, [hl] + ret + +ResetObject: + ld hl, OBJECT_MAP_OBJECT_INDEX + add hl, bc + ld a, [hl] + cp -1 + jp z, .set_standing + push bc + call GetMapObject + ld hl, MAPOBJECT_MOVEMENT + add hl, bc + ld a, [hl] + pop bc + ld hl, OBJECT_MOVEMENT_TYPE + add hl, bc + ld [hl], a + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_RESET + ret + +.set_standing: + call GetSpriteDirection + rrca + rrca + ld e, a + ld d, 0 + ld hl, .standing_movefns + add hl, de + ld a, [hl] + ld hl, OBJECT_MOVEMENT_TYPE + add hl, bc + ld [hl], a + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_RESET + ret + +.standing_movefns: + db SPRITEMOVEDATA_STANDING_DOWN + db SPRITEMOVEDATA_STANDING_UP + db SPRITEMOVEDATA_STANDING_LEFT + db SPRITEMOVEDATA_STANDING_RIGHT + +_UpdateSprites:: + ld a, [wVramState] + bit 0, a + ret z + xor a + ldh [hUsedSpriteIndex], a + ldh a, [hOAMUpdate] + push af + ld a, 1 + ldh [hOAMUpdate], a + call InitSprites + call .fill + pop af + ldh [hOAMUpdate], a + ret + +.fill + ld a, [wVramState] + bit 1, a + ld b, NUM_SPRITE_OAM_STRUCTS * SPRITEOAMSTRUCT_LENGTH + jr z, .ok + ld b, (NUM_SPRITE_OAM_STRUCTS - 12) * SPRITEOAMSTRUCT_LENGTH +.ok + ldh a, [hUsedSpriteIndex] + cp b + ret nc + ld l, a + ld h, HIGH(wShadowOAM) + ld de, SPRITEOAMSTRUCT_LENGTH + ld a, b + ld c, SCREEN_HEIGHT_PX + 2 * TILE_WIDTH +.loop + ld [hl], c ; y + add hl, de + cp l + jr nz, .loop + ret + +ApplyBGMapAnchorToObjects: + push hl + push de + push bc + ld a, [wPlayerBGMapOffsetX] + ld d, a + ld a, [wPlayerBGMapOffsetY] + ld e, a + ld bc, wObjectStructs + ld a, NUM_OBJECT_STRUCTS +.loop + push af + call DoesObjectHaveASprite + jr z, .skip + ld hl, OBJECT_SPRITE_X + add hl, bc + ld a, [hl] + add d + ld [hl], a + ld hl, OBJECT_SPRITE_Y + add hl, bc + ld a, [hl] + add e + ld [hl], a +.skip + ld hl, OBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + pop af + dec a + jr nz, .loop + xor a + ld [wPlayerBGMapOffsetX], a + ld [wPlayerBGMapOffsetY], a + pop bc + pop de + pop hl + ret + +DEF PRIORITY_LOW EQU $10 +DEF PRIORITY_NORM EQU $20 +DEF PRIORITY_HIGH EQU $30 + +InitSprites: + call .DeterminePriorities + ld c, PRIORITY_HIGH + call .InitSpritesByPriority + ld c, PRIORITY_NORM + call .InitSpritesByPriority + ld c, PRIORITY_LOW + call .InitSpritesByPriority + ret + +.DeterminePriorities: + xor a + ld hl, wObjectPriorities + ld bc, NUM_OBJECT_STRUCTS + call ByteFill + ld d, 0 + ld bc, wObjectStructs + ld hl, wObjectPriorities +.loop + push hl + call DoesObjectHaveASprite + jr z, .skip + ld hl, OBJECT_FACING + add hl, bc + ld a, [hl] + cp STANDING + jr z, .skip +; Define the sprite priority. + ld e, PRIORITY_LOW + ld hl, OBJECT_FLAGS2 + add hl, bc + bit LOW_PRIORITY_F, [hl] + jr nz, .add + ld e, PRIORITY_NORM + bit HIGH_PRIORITY_F, [hl] + jr z, .add + ld e, PRIORITY_HIGH + jr .add + +.skip + ld hl, OBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + pop hl + jr .next + +.add + ld hl, OBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + pop hl + ld a, d + or e + ld [hli], a +.next + inc d + ld a, d + cp NUM_OBJECT_STRUCTS + jr nz, .loop + ret + +.InitSpritesByPriority: + ld hl, wObjectPriorities +.next_sprite + ld a, [hli] + ld d, a + and $f0 + ret z + cp c + jr nz, .next_sprite + push bc + push hl + ld a, d + and $f + call .GetObjectStructPointer + call .InitSprite + pop hl + pop bc + jr .next_sprite + +.InitSprite: + ld hl, OBJECT_SPRITE_TILE + add hl, bc + ld a, [hl] + and ~(1 << 7) + ldh [hCurSpriteTile], a + xor a + bit 7, [hl] + jr nz, .not_vram1 + or VRAM_BANK_1 +.not_vram1 + ld hl, OBJECT_FLAGS2 + add hl, bc + ld e, [hl] + bit OBJ_FLAGS2_7, e + jr z, .not_priority + or PRIORITY +.not_priority + bit USE_OBP1_F, e + jr z, .not_obp_num + or OBP_NUM +.not_obp_num + ld hl, OBJECT_PALETTE + add hl, bc + ld d, a + ld a, [hl] + and PALETTE_MASK + or d + ld d, a + xor a + bit OVERHEAD_F, e + jr z, .not_overhead + or PRIORITY +.not_overhead + ldh [hCurSpriteOAMFlags], a + ld hl, OBJECT_SPRITE_X + add hl, bc + ld a, [hl] + ld hl, OBJECT_SPRITE_X_OFFSET + add hl, bc + add [hl] + add 8 + ld e, a + ld a, [wPlayerBGMapOffsetX] + add e + ldh [hCurSpriteXPixel], a + ld hl, OBJECT_SPRITE_Y + add hl, bc + ld a, [hl] + ld hl, OBJECT_SPRITE_Y_OFFSET + add hl, bc + add [hl] + add 12 + ld e, a + ld a, [wPlayerBGMapOffsetY] + add e + ldh [hCurSpriteYPixel], a + ld hl, OBJECT_FACING + add hl, bc + ld a, [hl] + cp STANDING + jp z, .done + cp NUM_FACINGS + jp nc, .done + ld l, a + ld h, 0 + add hl, hl + ld bc, Facings + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ldh a, [hUsedSpriteIndex] + ld c, a + ld b, HIGH(wShadowOAM) + ld a, [hli] + ldh [hUsedSpriteTile], a + add c + cp LOW(wShadowOAMEnd) + jr nc, .full +.addsprite + ldh a, [hCurSpriteYPixel] + add [hl] + inc hl + ld [bc], a ; y + inc c + ldh a, [hCurSpriteXPixel] + add [hl] + inc hl + ld [bc], a ; x + inc c + ld e, [hl] + inc hl + ldh a, [hCurSpriteTile] + bit ABSOLUTE_TILE_ID_F, e + jr z, .nope1 + xor a +.nope1 + add [hl] + inc hl + ld [bc], a ; tile id + inc c + ld a, e + bit RELATIVE_ATTRIBUTES_F, a + jr z, .nope2 + ldh a, [hCurSpriteOAMFlags] + or e +.nope2 + and OBP_NUM | X_FLIP | Y_FLIP | PRIORITY + or d + ld [bc], a ; attributes + inc c + ldh a, [hUsedSpriteTile] + dec a + ldh [hUsedSpriteTile], a + jr nz, .addsprite + ld a, c + ldh [hUsedSpriteIndex], a +.done + xor a + ret + +.full + scf + ret + +.GetObjectStructPointer: + ld c, a + ld b, 0 + ld hl, .Addresses + add hl, bc + add hl, bc + ld c, [hl] + inc hl + ld b, [hl] + ret + +.Addresses: + dw wPlayerStruct + dw wObject1Struct + dw wObject2Struct + dw wObject3Struct + dw wObject4Struct + dw wObject5Struct + dw wObject6Struct + dw wObject7Struct + dw wObject8Struct + dw wObject9Struct + dw wObject10Struct + dw wObject11Struct + dw wObject12Struct diff --git a/engine/overworld/map_objects_2.asm b/engine/overworld/map_objects_2.asm new file mode 100644 index 0000000..d89d95f --- /dev/null +++ b/engine/overworld/map_objects_2.asm @@ -0,0 +1,70 @@ +LoadObjectMasks: + ld hl, wObjectMasks + xor a + ld bc, NUM_OBJECTS + call ByteFill + nop + ld bc, wMapObjects + ld de, wObjectMasks + xor a +.loop + push af + push bc + push de + call GetObjectTimeMask + jr c, .next + call CheckObjectFlag +.next + pop de + ld [de], a + inc de + pop bc + ld hl, MAPOBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + pop af + inc a + cp NUM_OBJECTS + jr nz, .loop + ret + +CheckObjectFlag: + ld hl, MAPOBJECT_SPRITE + add hl, bc + ld a, [hl] + and a + jr z, .masked + ld hl, MAPOBJECT_EVENT_FLAG + add hl, bc + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + cp -1 + jr nz, .check + ld a, e + cp -1 + jr z, .unmasked + jr .masked +.check + ld b, CHECK_FLAG + call EventFlagAction + ld a, c + and a + jr nz, .masked +.unmasked + xor a + ret + +.masked + ld a, -1 + scf + ret + +GetObjectTimeMask: + call CheckObjectTime + ld a, -1 + ret c + xor a + ret diff --git a/engine/overworld/map_setup.asm b/engine/overworld/map_setup.asm new file mode 100644 index 0000000..e70f9ab --- /dev/null +++ b/engine/overworld/map_setup.asm @@ -0,0 +1,200 @@ +RunMapSetupScript:: + ldh a, [hMapEntryMethod] + and $f + dec a + ld c, a + ld b, 0 + ld hl, MapSetupScripts + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + call ReadMapSetupScript + ret + +INCLUDE "data/maps/setup_scripts.asm" + +ReadMapSetupScript: +.loop + ld a, [hli] + cp -1 ; end? + ret z + + push hl + + ld c, a + ld b, 0 + ld hl, MapSetupCommands + add hl, bc + add hl, bc + add hl, bc + + ; bank + ld b, [hl] + inc hl + + ; address + ld a, [hli] + ld h, [hl] + ld l, a + + ; Bit 7 of the bank indicates a parameter. + ; This is left unused. + bit 7, b + jr z, .go + + pop de + ld a, [de] + ld c, a + inc de + push de + +.go + ld a, b + and $7f + rst FarCall + + pop hl + jr .loop + +INCLUDE "data/maps/setup_script_pointers.asm" + +EnableTextAcceleration: + xor a + ld [wDisableTextAcceleration], a + ret + +ActivateMapAnims: + ld a, TRUE + ldh [hMapAnims], a + ret + +SuspendMapAnims: + xor a ; FALSE + ldh [hMapAnims], a + ret + +LoadMapObjects: + ld a, MAPCALLBACK_OBJECTS + call RunMapCallback + farcall LoadObjectMasks + farcall InitializeVisibleSprites + ret + +MapSetup_DummyFunction: ; unreferenced + ret + +ResetPlayerObjectAction: + ld hl, wPlayerSpriteSetupFlags + set PLAYERSPRITESETUP_RESET_ACTION_F, [hl] + ret + +SkipUpdateMapSprites: + ld hl, wPlayerSpriteSetupFlags + set PLAYERSPRITESETUP_SKIP_RELOAD_GFX_F, [hl] + ret + +CheckUpdatePlayerSprite: + nop + call .CheckBiking + jr c, .ok + call .CheckSurfing + jr c, .ok + call .CheckSurfing2 + jr c, .ok + ret + +.ok + call UpdatePlayerSprite + ret + +.CheckBiking: + and a + ld hl, wBikeFlags + bit BIKEFLAGS_ALWAYS_ON_BIKE_F, [hl] + ret z + ld a, PLAYER_BIKE + ld [wPlayerState], a + scf + ret + +.CheckSurfing2: + ld a, [wPlayerState] + cp PLAYER_NORMAL + jr z, .nope + cp PLAYER_SKATE + jr z, .nope + cp PLAYER_SURF + jr z, .surfing + cp PLAYER_SURF_PIKA + jr z, .surfing + call GetMapEnvironment + cp INDOOR + jr z, .no_biking + cp ENVIRONMENT_5 + jr z, .no_biking + cp DUNGEON + jr z, .no_biking + jr .nope +.no_biking + ld a, [wPlayerState] + cp PLAYER_BIKE + jr nz, .nope +.surfing + ld a, PLAYER_NORMAL + ld [wPlayerState], a + scf + ret + +.nope + and a + ret + +.CheckSurfing: + call CheckOnWater + jr nz, .nope2 + ld a, [wPlayerState] + cp PLAYER_SURF + jr z, .is_surfing + cp PLAYER_SURF_PIKA + jr z, .is_surfing + ld a, PLAYER_SURF + ld [wPlayerState], a +.is_surfing + scf + ret + +.nope2 + and a + ret + +FadeOutMapMusic: + ld a, 6 + call SkipMusic + ret + +ApplyMapPalettes: + farcall _UpdateTimePals + ret + +FadeMapMusicAndPalettes: + ld e, LOW(MUSIC_NONE) + ld a, [wMusicFadeID] + ld d, HIGH(MUSIC_NONE) + ld a, [wMusicFadeID + 1] + ld a, $4 + ld [wMusicFade], a + call RotateThreePalettesRight + ret + +ForceMapMusic: + ld a, [wPlayerState] + cp PLAYER_BIKE + jr nz, .notbiking + call MinVolume + ld a, $88 + ld [wMusicFade], a +.notbiking + call TryRestartMapMusic + ret diff --git a/engine/overworld/movement.asm b/engine/overworld/movement.asm new file mode 100644 index 0000000..3129e18 --- /dev/null +++ b/engine/overworld/movement.asm @@ -0,0 +1,778 @@ +MovementPointers: +; entries correspond to movement_* constants (see macros/scripts/movement.asm) + table_width 2, MovementPointers + dw Movement_turn_head_down ; 00 + dw Movement_turn_head_up ; 01 + dw Movement_turn_head_left ; 02 + dw Movement_turn_head_right ; 03 + dw Movement_turn_step_down ; 04 + dw Movement_turn_step_up ; 05 + dw Movement_turn_step_left ; 06 + dw Movement_turn_step_right ; 07 + dw Movement_slow_step_down ; 08 + dw Movement_slow_step_up ; 09 + dw Movement_slow_step_left ; 0a + dw Movement_slow_step_right ; 0b + dw Movement_step_down ; 0c + dw Movement_step_up ; 0d + dw Movement_step_left ; 0e + dw Movement_step_right ; 0f + dw Movement_big_step_down ; 10 + dw Movement_big_step_up ; 11 + dw Movement_big_step_left ; 12 + dw Movement_big_step_right ; 13 + dw Movement_slow_slide_step_down ; 14 + dw Movement_slow_slide_step_up ; 15 + dw Movement_slow_slide_step_left ; 16 + dw Movement_slow_slide_step_right ; 17 + dw Movement_slide_step_down ; 18 + dw Movement_slide_step_up ; 19 + dw Movement_slide_step_left ; 1a + dw Movement_slide_step_right ; 1b + dw Movement_fast_slide_step_down ; 1c + dw Movement_fast_slide_step_up ; 1d + dw Movement_fast_slide_step_left ; 1e + dw Movement_fast_slide_step_right ; 1f + dw Movement_turn_away_down ; 20 + dw Movement_turn_away_up ; 21 + dw Movement_turn_away_left ; 22 + dw Movement_turn_away_right ; 23 + dw Movement_turn_in_down ; 24 + dw Movement_turn_in_up ; 25 + dw Movement_turn_in_left ; 26 + dw Movement_turn_in_right ; 27 + dw Movement_turn_waterfall_down ; 28 + dw Movement_turn_waterfall_up ; 29 + dw Movement_turn_waterfall_left ; 2a + dw Movement_turn_waterfall_right ; 2b + dw Movement_slow_jump_step_down ; 2c + dw Movement_slow_jump_step_up ; 2d + dw Movement_slow_jump_step_left ; 2e + dw Movement_slow_jump_step_right ; 2f + dw Movement_jump_step_down ; 30 + dw Movement_jump_step_up ; 31 + dw Movement_jump_step_left ; 32 + dw Movement_jump_step_right ; 33 + dw Movement_fast_jump_step_down ; 34 + dw Movement_fast_jump_step_up ; 35 + dw Movement_fast_jump_step_left ; 36 + dw Movement_fast_jump_step_right ; 37 + dw Movement_remove_sliding ; 38 + dw Movement_set_sliding ; 39 + dw Movement_remove_fixed_facing ; 3a + dw Movement_fix_facing ; 3b + dw Movement_show_object ; 3c + dw Movement_hide_object ; 3d + dw Movement_step_sleep_1 ; 3e + dw Movement_step_sleep_2 ; 3f + dw Movement_step_sleep_3 ; 40 + dw Movement_step_sleep_4 ; 41 + dw Movement_step_sleep_5 ; 42 + dw Movement_step_sleep_6 ; 43 + dw Movement_step_sleep_7 ; 44 + dw Movement_step_sleep_8 ; 45 + dw Movement_step_sleep ; 46 + dw Movement_step_end ; 47 + dw Movement_48 ; 48 + dw Movement_remove_object ; 49 + dw Movement_step_loop ; 4a + dw Movement_4b ; 4b + dw Movement_teleport_from ; 4c + dw Movement_teleport_to ; 4d + dw Movement_skyfall ; 4e + dw Movement_step_dig ; 4f + dw Movement_step_bump ; 50 + dw Movement_fish_got_bite ; 51 + dw Movement_fish_cast_rod ; 52 + dw Movement_hide_emote ; 53 + dw Movement_show_emote ; 54 + dw Movement_step_shake ; 55 + dw Movement_tree_shake ; 56 + dw Movement_rock_smash ; 57 + dw Movement_return_dig ; 58 + dw Movement_skyfall_top ; 59 + assert_table_length NUM_MOVEMENT_CMDS + +Movement_teleport_from: + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_TELEPORT_FROM + ret + +Movement_teleport_to: + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_TELEPORT_TO + ret + +Movement_skyfall: + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_SKYFALL + ret + +Movement_skyfall_top: + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_SKYFALL_TOP + ret + +Movement_step_dig: + call GetSpriteDirection + rlca + rlca + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld [hl], a + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_SPIN + call JumpMovementPointer + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_SLEEP + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ret + +Movement_return_dig: + call GetSpriteDirection + rlca + rlca + ld hl, OBJECT_STEP_FRAME + add hl, bc + ld [hl], a + call JumpMovementPointer + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_RETURN_DIG + ret + +Movement_fish_got_bite: + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_FISHING + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_GOT_BITE + ret + +Movement_rock_smash: + call JumpMovementPointer + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STAND + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_ROCK_SMASH + ret + +Movement_fish_cast_rod: + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_FISHING + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +Movement_step_loop: + ld hl, OBJECT_MOVEMENT_INDEX + add hl, bc + ld [hl], $0 + jp ContinueReadingMovement + +Movement_step_end: + call RestoreDefaultMovement + ld hl, OBJECT_MOVEMENT_TYPE + add hl, bc + ld [hl], a + + ld hl, OBJECT_MOVEMENT_INDEX + add hl, bc + ld [hl], $0 + + ld hl, wVramState + res 7, [hl] + + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_FROM_MOVEMENT + ret + +Movement_48: + call RestoreDefaultMovement + ld hl, OBJECT_MOVEMENT_TYPE + add hl, bc + ld [hl], a + + ld hl, OBJECT_MOVEMENT_INDEX + add hl, bc + ld [hl], $0 + + call JumpMovementPointer + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_SLEEP + + ld hl, wVramState + res 7, [hl] + ret + +Movement_remove_object: + call DeleteMapObject + ld hl, wObjectFollow_Leader + ldh a, [hMapObjectIndex] + cp [hl] + jr nz, .not_leading + ld [hl], -1 + +.not_leading + ld hl, wVramState + res 7, [hl] + ret + +Movement_4b: + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STAND + + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_STANDING + + ld hl, wVramState + res 7, [hl] + ret + +Movement_step_sleep_1: + ld a, 1 + jr Movement_step_sleep_common + +Movement_step_sleep_2: + ld a, 2 + jr Movement_step_sleep_common + +Movement_step_sleep_3: + ld a, 3 + jr Movement_step_sleep_common + +Movement_step_sleep_4: + ld a, 4 + jr Movement_step_sleep_common + +Movement_step_sleep_5: + ld a, 5 + jr Movement_step_sleep_common + +Movement_step_sleep_6: + ld a, 6 + jr Movement_step_sleep_common + +Movement_step_sleep_7: + ld a, 7 + jr Movement_step_sleep_common + +Movement_step_sleep_8: + ld a, 8 + jr Movement_step_sleep_common + +Movement_step_sleep: +; parameters: +; duration (DecimalParam) + + call JumpMovementPointer + jr Movement_step_sleep_common + +Movement_step_sleep_common: + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_SLEEP + + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STAND + + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ret + +Movement_step_bump: + ld a, 1 + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_BUMP + + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_BUMP + + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ret + +Movement_tree_shake: + ld a, 24 + ld hl, OBJECT_STEP_DURATION + add hl, bc + ld [hl], a + + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_SLEEP + + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_WEIRD_TREE + + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ret + +Movement_remove_sliding: + ld hl, OBJECT_FLAGS1 + add hl, bc + res SLIDING_F, [hl] + jp ContinueReadingMovement + +Movement_set_sliding: + ld hl, OBJECT_FLAGS1 + add hl, bc + set SLIDING_F, [hl] + jp ContinueReadingMovement + +Movement_remove_fixed_facing: + ld hl, OBJECT_FLAGS1 + add hl, bc + res FIXED_FACING_F, [hl] + jp ContinueReadingMovement + +Movement_fix_facing: + ld hl, OBJECT_FLAGS1 + add hl, bc + set FIXED_FACING_F, [hl] + jp ContinueReadingMovement + +Movement_show_object: + ld hl, OBJECT_FLAGS1 + add hl, bc + res INVISIBLE_F, [hl] + jp ContinueReadingMovement + +Movement_hide_object: + ld hl, OBJECT_FLAGS1 + add hl, bc + set INVISIBLE_F, [hl] + jp ContinueReadingMovement + +Movement_hide_emote: + call DespawnEmote + jp ContinueReadingMovement + +Movement_show_emote: + call SpawnEmote + jp ContinueReadingMovement + +Movement_step_shake: +; parameters: +; displacement (DecimalParam) + + call JumpMovementPointer + call ShakeScreen + jp ContinueReadingMovement + +Movement_turn_head_down: + ld a, OW_DOWN + jr TurnHead + +Movement_turn_head_up: + ld a, OW_UP + jr TurnHead + +Movement_turn_head_left: + ld a, OW_LEFT + jr TurnHead + +Movement_turn_head_right: + ld a, OW_RIGHT + jr TurnHead + +TurnHead: + ld hl, OBJECT_DIRECTION + add hl, bc + ld [hl], a + + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STAND + + ld hl, OBJECT_WALKING + add hl, bc + ld [hl], STANDING + ret + +Movement_slow_step_down: + ld a, STEP_SLOW << 2 | DOWN + jp NormalStep + +Movement_slow_step_up: + ld a, STEP_SLOW << 2 | UP + jp NormalStep + +Movement_slow_step_left: + ld a, STEP_SLOW << 2 | LEFT + jp NormalStep + +Movement_slow_step_right: + ld a, STEP_SLOW << 2 | RIGHT + jp NormalStep + +Movement_step_down: + ld a, STEP_WALK << 2 | DOWN + jp NormalStep + +Movement_step_up: + ld a, STEP_WALK << 2 | UP + jp NormalStep + +Movement_step_left: + ld a, STEP_WALK << 2 | LEFT + jp NormalStep + +Movement_step_right: + ld a, STEP_WALK << 2 | RIGHT + jp NormalStep + +Movement_big_step_down: + ld a, STEP_BIKE << 2 | DOWN + jp NormalStep + +Movement_big_step_up: + ld a, STEP_BIKE << 2 | UP + jp NormalStep + +Movement_big_step_left: + ld a, STEP_BIKE << 2 | LEFT + jp NormalStep + +Movement_big_step_right: + ld a, STEP_BIKE << 2 | RIGHT + jp NormalStep + +Movement_turn_away_down: + ld a, STEP_SLOW << 2 | DOWN + jp TurningStep + +Movement_turn_away_up: + ld a, STEP_SLOW << 2 | UP + jp TurningStep + +Movement_turn_away_left: + ld a, STEP_SLOW << 2 | LEFT + jp TurningStep + +Movement_turn_away_right: + ld a, STEP_SLOW << 2 | RIGHT + jp TurningStep + +Movement_turn_in_down: + ld a, STEP_WALK << 2 | DOWN + jp TurningStep + +Movement_turn_in_up: + ld a, STEP_WALK << 2 | UP + jp TurningStep + +Movement_turn_in_left: + ld a, STEP_WALK << 2 | LEFT + jp TurningStep + +Movement_turn_in_right: + ld a, STEP_WALK << 2 | RIGHT + jp TurningStep + +Movement_turn_waterfall_down: + ld a, STEP_BIKE << 2 | DOWN + jp TurningStep + +Movement_turn_waterfall_up: + ld a, STEP_BIKE << 2 | UP + jp TurningStep + +Movement_turn_waterfall_left: + ld a, STEP_BIKE << 2 | LEFT + jp TurningStep + +Movement_turn_waterfall_right: + ld a, STEP_BIKE << 2 | RIGHT + jp TurningStep + +Movement_slow_slide_step_down: + ld a, STEP_SLOW << 2 | DOWN + jp SlideStep + +Movement_slow_slide_step_up: + ld a, STEP_SLOW << 2 | UP + jp SlideStep + +Movement_slow_slide_step_left: + ld a, STEP_SLOW << 2 | LEFT + jp SlideStep + +Movement_slow_slide_step_right: + ld a, STEP_SLOW << 2 | RIGHT + jp SlideStep + +Movement_slide_step_down: + ld a, STEP_WALK << 2 | DOWN + jp SlideStep + +Movement_slide_step_up: + ld a, STEP_WALK << 2 | UP + jp SlideStep + +Movement_slide_step_left: + ld a, STEP_WALK << 2 | LEFT + jp SlideStep + +Movement_slide_step_right: + ld a, STEP_WALK << 2 | RIGHT + jp SlideStep + +Movement_fast_slide_step_down: + ld a, STEP_BIKE << 2 | DOWN + jp SlideStep + +Movement_fast_slide_step_up: + ld a, STEP_BIKE << 2 | UP + jp SlideStep + +Movement_fast_slide_step_left: + ld a, STEP_BIKE << 2 | LEFT + jp SlideStep + +Movement_fast_slide_step_right: + ld a, STEP_BIKE << 2 | RIGHT + jp SlideStep + +Movement_slow_jump_step_down: + ld a, STEP_SLOW << 2 | DOWN + jp JumpStep + +Movement_slow_jump_step_up: + ld a, STEP_SLOW << 2 | UP + jp JumpStep + +Movement_slow_jump_step_left: + ld a, STEP_SLOW << 2 | LEFT + jp JumpStep + +Movement_slow_jump_step_right: + ld a, STEP_SLOW << 2 | RIGHT + jp JumpStep + +Movement_jump_step_down: + ld a, STEP_WALK << 2 | DOWN + jp JumpStep + +Movement_jump_step_up: + ld a, STEP_WALK << 2 | UP + jp JumpStep + +Movement_jump_step_left: + ld a, STEP_WALK << 2 | LEFT + jp JumpStep + +Movement_jump_step_right: + ld a, STEP_WALK << 2 | RIGHT + jp JumpStep + +Movement_fast_jump_step_down: + ld a, STEP_BIKE << 2 | DOWN + jp JumpStep + +Movement_fast_jump_step_up: + ld a, STEP_BIKE << 2 | UP + jp JumpStep + +Movement_fast_jump_step_left: + ld a, STEP_BIKE << 2 | LEFT + jp JumpStep + +Movement_fast_jump_step_right: + ld a, STEP_BIKE << 2 | RIGHT + jp JumpStep + +Movement_turn_step_down: + ld a, OW_DOWN + jr TurnStep + +Movement_turn_step_up: + ld a, OW_UP + jr TurnStep + +Movement_turn_step_left: + ld a, OW_LEFT + jr TurnStep + +Movement_turn_step_right: + ld a, OW_RIGHT + jr TurnStep + +TurnStep: + ld hl, OBJECT_1D ; new facing + add hl, bc + ld [hl], a + + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STEP + + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_TURN + ret + +NormalStep: + call InitStep + call UpdateTallGrassFlags + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STEP + + ld hl, OBJECT_TILE + add hl, bc + ld a, [hl] + call CheckSuperTallGrassTile + jr z, .shake_grass + + call CheckGrassTile + jr c, .skip_grass + +.shake_grass + call ShakeGrass + +.skip_grass + ld hl, wCenteredObject + ldh a, [hMapObjectIndex] + cp [hl] + jr z, .player + + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_NPC_WALK + ret + +.player + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_PLAYER_WALK + ret + +TurningStep: + call InitStep + call UpdateTallGrassFlags + + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_SPIN + + ld hl, wCenteredObject + ldh a, [hMapObjectIndex] + cp [hl] + jr z, .player + + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_NPC_WALK + ret + +.player + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_PLAYER_WALK + ret + +SlideStep: + call InitStep + call UpdateTallGrassFlags + + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STAND + + ld hl, wCenteredObject + ldh a, [hMapObjectIndex] + cp [hl] + jr z, .player + + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_NPC_WALK + ret + +.player + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_PLAYER_WALK + ret + +JumpStep: + call InitStep + ld hl, OBJECT_JUMP_HEIGHT + add hl, bc + ld [hl], $0 + + ld hl, OBJECT_FLAGS2 + add hl, bc + res OVERHEAD_F, [hl] + + ld hl, OBJECT_ACTION + add hl, bc + ld [hl], OBJECT_ACTION_STEP + + call SpawnShadow + + ld hl, wCenteredObject + ldh a, [hMapObjectIndex] + cp [hl] + jr z, .player + + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_NPC_JUMP + ret + +.player + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_PLAYER_JUMP + ret diff --git a/engine/overworld/npc_movement.asm b/engine/overworld/npc_movement.asm new file mode 100644 index 0000000..a47bdc4 --- /dev/null +++ b/engine/overworld/npc_movement.asm @@ -0,0 +1,562 @@ +CanObjectMoveInDirection: + ld hl, OBJECT_PALETTE + add hl, bc + bit SWIMMING_F, [hl] + jr z, .not_swimming + +; BUG: Swimming NPCs aren't limited by their movement radius (see docs/bugs_and_glitches.md) + ld hl, OBJECT_FLAGS1 + add hl, bc + bit NOCLIP_TILES_F, [hl] + push hl + push bc + call WillObjectBumpIntoLand + pop bc + pop hl + ret c + jr .continue + +.not_swimming + ld hl, OBJECT_FLAGS1 + add hl, bc + bit NOCLIP_TILES_F, [hl] + jr nz, .noclip_tiles + push hl + push bc + call WillObjectBumpIntoWater + pop bc + pop hl + ret c + +.noclip_tiles +.continue + bit NOCLIP_OBJS_F, [hl] + jr nz, .noclip_objs + + push hl + push bc + call WillObjectBumpIntoSomeoneElse + pop bc + pop hl + ret c + +.noclip_objs + bit MOVE_ANYWHERE_F, [hl] + jr nz, .move_anywhere + push hl + call HasObjectReachedMovementLimit + pop hl + ret c + + push hl + call IsObjectMovingOffEdgeOfScreen + pop hl + ret c + +.move_anywhere + and a + ret + +WillObjectBumpIntoWater: + call CanObjectLeaveTile + ret c + ld hl, OBJECT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld e, [hl] + ld hl, OBJECT_PALETTE + add hl, bc + bit OAM_PRIORITY, [hl] + jp nz, WillObjectRemainOnWater + ld hl, OBJECT_TILE + add hl, bc + ld a, [hl] + ld d, a + call GetTileCollision + and a ; LAND_TILE + jr z, WillObjectBumpIntoTile + scf + ret + +WillObjectBumpIntoLand: + call CanObjectLeaveTile + ret c + ld hl, OBJECT_TILE + add hl, bc + ld a, [hl] + call GetTileCollision + cp WATER_TILE + jr z, WillObjectBumpIntoTile + scf + ret + +WillObjectBumpIntoTile: + ld hl, OBJECT_TILE + add hl, bc + ld a, [hl] + call GetSideWallDirectionMask + ret nc + push af + ld hl, OBJECT_WALKING + add hl, bc + ld a, [hl] + maskbits NUM_DIRECTIONS + ld e, a + ld d, 0 + ld hl, .dir_masks + add hl, de + pop af + and [hl] + ret z + scf + ret + +.dir_masks + db DOWN_MASK ; DOWN + db UP_MASK ; UP + db RIGHT_MASK ; LEFT + db LEFT_MASK ; RIGHT + +CanObjectLeaveTile: + ld hl, OBJECT_LAST_TILE + add hl, bc + ld a, [hl] + call GetSideWallDirectionMask + ret nc + push af + ld hl, OBJECT_WALKING + add hl, bc + maskbits NUM_DIRECTIONS + ld e, a + ld d, 0 + ld hl, .dir_masks + add hl, de + pop af + and [hl] + ret z + scf + ret + +.dir_masks + db UP_MASK ; DOWN + db DOWN_MASK ; UP + db LEFT_MASK ; LEFT + db RIGHT_MASK ; RIGHT + +GetSideWallDirectionMask: + ld d, a + and $f0 + cp HI_NYBBLE_SIDE_WALLS + jr z, .continue + cp HI_NYBBLE_SIDE_BUOYS + jr z, .continue + xor a + ret + +.continue + ld a, d + and $7 + ld e, a + ld d, 0 + ld hl, .side_wall_masks + add hl, de + ld a, [hl] + scf + ret + +.side_wall_masks + db RIGHT_MASK ; COLL_RIGHT_WALL/BUOY + db LEFT_MASK ; COLL_LEFT_WALL/BUOY + db DOWN_MASK ; COLL_UP_WALL/BUOY + db UP_MASK ; COLL_DOWN_WALL/BUOY + db UP_MASK | RIGHT_MASK ; COLL_DOWN_RIGHT_WALL/BUOY + db UP_MASK | LEFT_MASK ; COLL_DOWN_LEFT_WALL/BUOY + db DOWN_MASK | RIGHT_MASK ; COLL_UP_RIGHT_WALL/BUOY + db DOWN_MASK | LEFT_MASK ; COLL_UP_LEFT_WALL/BUOY + +WillObjectRemainOnWater: + ld hl, OBJECT_WALKING + add hl, bc + ld a, [hl] + maskbits NUM_DIRECTIONS + jr z, .down + dec a + jr z, .up + dec a + jr z, .left + jr .right + +.down + inc e + push de + inc d + jr .continue + +.up + push de + inc d + jr .continue + +.left + push de + inc e + jr .continue + +.right + inc d + push de + inc e + +.continue + call GetCoordTile + call GetTileCollision + pop de + and a ; LAND_TILE + jr nz, .not_land + call GetCoordTile + call GetTileCollision + and a ; LAND_TILE + jr nz, .not_land + xor a + ret + +.not_land + scf + ret + +CheckFacingObject:: + call GetFacingTileCoord + +; Double the distance for counter tiles. + call CheckCounterTile + jr nz, .not_counter + + ld a, [wPlayerMapX] + sub d + cpl + inc a + add d + ld d, a + + ld a, [wPlayerMapY] + sub e + cpl + inc a + add e + ld e, a + +.not_counter + ld bc, wObjectStructs ; redundant + ld a, 0 + ldh [hMapObjectIndex], a + call IsNPCAtCoord + ret nc + ld hl, OBJECT_WALKING + add hl, bc + ld a, [hl] + cp STANDING + jr z, .standing + xor a + ret + +.standing + scf + ret + +WillObjectBumpIntoSomeoneElse: + ld hl, OBJECT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld e, [hl] + jr IsNPCAtCoord + +IsObjectFacingSomeoneElse: ; unreferenced + ldh a, [hMapObjectIndex] + call GetObjectStruct + call .GetFacingCoords + call IsNPCAtCoord + ret + +.GetFacingCoords: + ld hl, OBJECT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld e, [hl] + call GetSpriteDirection + and a ; OW_DOWN? + jr z, .down + cp OW_UP + jr z, .up + cp OW_LEFT + jr z, .left + ; OW_RIGHT + inc d + ret + +.down + inc e + ret + +.up + dec e + ret + +.left + dec d + ret + +IsNPCAtCoord: + ld bc, wObjectStructs + xor a +.loop + ldh [hObjectStructIndex], a + call DoesObjectHaveASprite + jr z, .next + + ld hl, OBJECT_FLAGS1 + add hl, bc + bit 7, [hl] + jr nz, .next + + ld hl, OBJECT_PALETTE + add hl, bc + bit BIG_OBJECT_F, [hl] + jr z, .not_big + call WillObjectIntersectBigObject + jr nc, .check_current_coords + jr .continue + +.not_big + ld hl, OBJECT_MAP_X + add hl, bc + ld a, [hl] + cp d + jr nz, .check_current_coords + ld hl, OBJECT_MAP_Y + add hl, bc + ld a, [hl] + cp e + jr nz, .check_current_coords + +.continue + ldh a, [hMapObjectIndex] + ld l, a + ldh a, [hObjectStructIndex] + cp l + jr nz, .yes + +.check_current_coords + ld hl, OBJECT_LAST_MAP_X + add hl, bc + ld a, [hl] + cp d + jr nz, .next + ld hl, OBJECT_LAST_MAP_Y + add hl, bc + ld a, [hl] + cp e + jr nz, .next + ldh a, [hMapObjectIndex] + ld l, a + ldh a, [hObjectStructIndex] + cp l + jr nz, .yes + +.next + ld hl, OBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + ldh a, [hObjectStructIndex] + inc a + cp NUM_OBJECT_STRUCTS + jr nz, .loop + and a + ret + +.yes + scf + ret + +HasObjectReachedMovementLimit: + ld hl, OBJECT_RADIUS + add hl, bc + ld a, [hl] + and a + jr z, .nope + and $f + jr z, .check_y + ld e, a + ld d, a + ld hl, OBJECT_INIT_X + add hl, bc + ld a, [hl] + sub d + ld d, a + ld a, [hl] + add e + ld e, a + ld hl, OBJECT_MAP_X + add hl, bc + ld a, [hl] + cp d + jr z, .yes + cp e + jr z, .yes + +.check_y + ld hl, OBJECT_RADIUS + add hl, bc + ld a, [hl] + swap a + and $f + jr z, .nope + ld e, a + ld d, a + ld hl, OBJECT_INIT_Y + add hl, bc + ld a, [hl] + sub d + ld d, a + ld a, [hl] + add e + ld e, a + ld hl, OBJECT_MAP_Y + add hl, bc + ld a, [hl] + cp d + jr z, .yes + cp e + jr z, .yes + +.nope + xor a + ret + +.yes + scf + ret + +IsObjectMovingOffEdgeOfScreen: + ld hl, OBJECT_MAP_X + add hl, bc + ld a, [wXCoord] + cp [hl] + jr z, .check_y + jr nc, .yes + add $9 + cp [hl] + jr c, .yes + +.check_y + ld hl, OBJECT_MAP_Y + add hl, bc + ld a, [wYCoord] + cp [hl] + jr z, .nope + jr nc, .yes + add $8 + cp [hl] + jr c, .yes + +.nope + and a + ret + +.yes + scf + ret + +IsNPCAtPlayerCoord: ; unreferenced + ld a, [wPlayerMapX] + ld d, a + ld a, [wPlayerMapY] + ld e, a + ld bc, wObjectStructs + xor a +.loop + ldh [hObjectStructIndex], a + call DoesObjectHaveASprite + jr z, .next + + ld hl, OBJECT_MOVEMENT_TYPE + add hl, bc + ld a, [hl] + cp SPRITEMOVEDATA_BIGDOLLSYM + jr nz, .not_big + call WillObjectIntersectBigObject + jr c, .yes + jr .next + +.not_big + ld hl, OBJECT_MAP_Y + add hl, bc + ld a, [hl] + cp e + jr nz, .check_current_coords + ld hl, OBJECT_MAP_X + add hl, bc + ld a, [hl] + cp d + jr nz, .check_current_coords + ldh a, [hObjectStructIndex] + cp PLAYER_OBJECT + jr z, .next + jr .yes + +.check_current_coords + ld hl, OBJECT_LAST_MAP_Y + add hl, bc + ld a, [hl] + cp e + jr nz, .next + ld hl, OBJECT_LAST_MAP_X + add hl, bc + ld a, [hl] + cp d + jr nz, .next + jr .yes + +.next + ld hl, OBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + ldh a, [hObjectStructIndex] + inc a + cp NUM_OBJECT_STRUCTS + jr nz, .loop + xor a + ret + +.yes + scf + ret + +WillObjectIntersectBigObject: + ld hl, OBJECT_MAP_X + add hl, bc + ld a, d + sub [hl] + jr c, .nope + cp 2 ; big doll width + jr nc, .nope + ld hl, OBJECT_MAP_Y + add hl, bc + ld a, e + sub [hl] + jr c, .nope + cp 2 ; big doll height + jr nc, .nope + scf + ret + +.nope + and a + ret diff --git a/engine/overworld/overworld.asm b/engine/overworld/overworld.asm new file mode 100644 index 0000000..5c02818 --- /dev/null +++ b/engine/overworld/overworld.asm @@ -0,0 +1,672 @@ +GetEmote2bpp: + ld a, $1 + ldh [rVBK], a + call Get2bpp + xor a + ldh [rVBK], a + ret + +_UpdatePlayerSprite:: + call GetPlayerSprite + ld a, [wUsedSprites] + ldh [hUsedSpriteIndex], a + ld a, [wUsedSprites + 1] + ldh [hUsedSpriteTile], a + call GetUsedSprite + ret + +_RefreshSprites: ; mobile + ld hl, wSpriteFlags + ld a, [hl] + push af + res 7, [hl] + set 6, [hl] + call LoadUsedSpritesGFX + pop af + ld [wSpriteFlags], a + ret + +_ClearSprites: ; mobile + ld hl, wSpriteFlags + ld a, [hl] + push af + set 7, [hl] + res 6, [hl] + call LoadUsedSpritesGFX + pop af + ld [wSpriteFlags], a + ret + +RefreshSprites:: + call .Refresh + call LoadUsedSpritesGFX + ret + +.Refresh: + xor a + ld bc, wUsedSpritesEnd - wUsedSprites + ld hl, wUsedSprites + call ByteFill + call GetPlayerSprite + call AddMapSprites + call LoadAndSortSprites + ret + +GetPlayerSprite: +; Get Chris or Kris's sprite. + ld hl, ChrisStateSprites + ld a, [wPlayerSpriteSetupFlags] + bit PLAYERSPRITESETUP_FEMALE_TO_MALE_F, a + jr nz, .go + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .go + ld hl, KrisStateSprites + +.go + ld a, [wPlayerState] + ld c, a +.loop + ld a, [hli] + cp c + jr z, .good + inc hl + cp -1 + jr nz, .loop + +; Any player state not in the array defaults to Chris's sprite. + xor a ; ld a, PLAYER_NORMAL + ld [wPlayerState], a + ld a, SPRITE_CHRIS + jr .finish + +.good + ld a, [hl] + +.finish + ld [wUsedSprites + 0], a + ld [wPlayerSprite], a + ld [wPlayerObjectSprite], a + ret + +INCLUDE "data/sprites/player_sprites.asm" + +AddMapSprites: + call GetMapEnvironment + call CheckOutdoorMap + jr z, .outdoor + call AddIndoorSprites + ret + +.outdoor + call AddOutdoorSprites + ret + +AddIndoorSprites: + ld hl, wMap1ObjectSprite + ld a, 1 +.loop + push af + ld a, [hl] + call AddSpriteGFX + ld de, MAPOBJECT_LENGTH + add hl, de + pop af + inc a + cp NUM_OBJECTS + jr nz, .loop + ret + +AddOutdoorSprites: + ld a, [wMapGroup] + dec a + ld c, a + ld b, 0 + ld hl, OutdoorSprites + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld c, MAX_OUTDOOR_SPRITES +.loop + push bc + ld a, [hli] + call AddSpriteGFX + pop bc + dec c + jr nz, .loop + ret + +LoadUsedSpritesGFX: + ld a, MAPCALLBACK_SPRITES + call RunMapCallback + call GetUsedSprites + call LoadMiscTiles + ret + +LoadMiscTiles: + ld a, [wSpriteFlags] + bit 6, a + ret nz + + ld c, EMOTE_SHADOW + farcall LoadEmote + call GetMapEnvironment + call CheckOutdoorMap + ld c, EMOTE_GRASS_RUSTLE + jr z, .outdoor + ld c, EMOTE_BOULDER_DUST +.outdoor + farcall LoadEmote + ret + +SafeGetSprite: + push hl + call GetSprite + pop hl + ret + +GetSprite: + call GetMonSprite + ret c + + ld hl, OverworldSprites + SPRITEDATA_ADDR + dec a + ld c, a + ld b, 0 + ld a, NUM_SPRITEDATA_FIELDS + call AddNTimes + ; load the address into de + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ; load the length into c + ld a, [hli] + swap a + ld c, a + ; load the sprite bank into both b and h + ld b, [hl] + ld a, [hli] + ; load the sprite type into l + ld l, [hl] + ld h, a + ret + +GetMonSprite: +; Return carry if a monster sprite was loaded. + + cp SPRITE_POKEMON + jr c, .Normal + cp SPRITE_DAY_CARE_MON_1 + jr z, .BreedMon1 + cp SPRITE_DAY_CARE_MON_2 + jr z, .BreedMon2 + cp SPRITE_VARS + jr nc, .Variable + jr .Icon + +.Normal: + and a + ret + +.Icon: + sub SPRITE_POKEMON + ld e, a + ld d, 0 + ld hl, SpriteMons + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + jr .Mon + +.BreedMon1 + ld a, [wBreedMon1Species] + jr .Mon + +.BreedMon2 + ld a, [wBreedMon2Species] + +.Mon: + ld e, a + and a + jr z, .NoBreedmon + + farcall LoadOverworldMonIcon + + ld l, WALKING_SPRITE + ld h, 0 + scf + ret + +.Variable: + sub SPRITE_VARS + ld e, a + ld d, 0 + ld hl, wVariableSprites + add hl, de + ld a, [hl] + and a + jp nz, GetMonSprite + +.NoBreedmon: + ld a, WALKING_SPRITE + ld l, WALKING_SPRITE + ld h, 0 + and a + ret + +_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 + jr nc, .only_down + + push hl + push bc + ld hl, OverworldSprites + SPRITEDATA_TYPE + dec a + ld c, a + ld b, 0 + ld a, NUM_SPRITEDATA_FIELDS + call AddNTimes + ld a, [hl] + pop bc + pop hl + cp STILL_SPRITE + jr nz, .only_down + scf + ret + +.only_down + and a + ret + +_GetSpritePalette:: + ld a, c + call GetMonSprite + jr c, .is_pokemon + + ld hl, OverworldSprites + SPRITEDATA_PALETTE + dec a + ld c, a + ld b, 0 + ld a, NUM_SPRITEDATA_FIELDS + call AddNTimes + ld c, [hl] + ret + +.is_pokemon + xor a + ld c, a + ret + +LoadAndSortSprites: + call LoadSpriteGFX + call SortUsedSprites + call ArrangeUsedSprites + ret + +AddSpriteGFX: +; Add any new sprite ids to a list of graphics to be loaded. +; Return carry if the list is full. + + push hl + push bc + ld b, a + ld hl, wUsedSprites + 2 + ld c, SPRITE_GFX_LIST_CAPACITY - 1 +.loop + ld a, [hl] + cp b + jr z, .exists + and a + jr z, .new + inc hl + inc hl + dec c + jr nz, .loop + + pop bc + pop hl + scf + ret + +.exists + pop bc + pop hl + and a + ret + +.new + ld [hl], b + pop bc + pop hl + and a + ret + +LoadSpriteGFX: + ld hl, wUsedSprites + ld b, SPRITE_GFX_LIST_CAPACITY +.loop + ld a, [hli] + and a + jr z, .done + push hl + call .LoadSprite + pop hl + ld [hli], a + dec b + jr nz, .loop + +.done + ret + +.LoadSprite: + push bc + call GetSprite + pop bc + ld a, l + ret + +SortUsedSprites: +; Bubble-sort sprites by type. + +; Run backwards through wUsedSprites to find the last one. + + ld c, SPRITE_GFX_LIST_CAPACITY + ld de, wUsedSprites + (SPRITE_GFX_LIST_CAPACITY - 1) * 2 +.FindLastSprite: + ld a, [de] + and a + jr nz, .FoundLastSprite + dec de + dec de + dec c + jr nz, .FindLastSprite +.FoundLastSprite: + dec c + jr z, .quit + +; If the length of the current sprite is +; higher than a later one, swap them. + + inc de + ld hl, wUsedSprites + 1 + +.CheckSprite: + push bc + push de + push hl + +.CheckFollowing: + ld a, [de] + cp [hl] + jr nc, .loop + +; Swap the two sprites. + + ld b, a + ld a, [hl] + ld [hl], b + ld [de], a + dec de + dec hl + ld a, [de] + ld b, a + ld a, [hl] + ld [hl], b + ld [de], a + inc de + inc hl + +; Keep doing this until everything's in order. + +.loop + dec de + dec de + dec c + jr nz, .CheckFollowing + + pop hl + inc hl + inc hl + pop de + pop bc + dec c + jr nz, .CheckSprite + +.quit + ret + +ArrangeUsedSprites: +; Get the length of each sprite and space them out in VRAM. +; Crystal introduces a second table in VRAM bank 0. + + ld hl, wUsedSprites + ld c, SPRITE_GFX_LIST_CAPACITY + ld b, 0 +.FirstTableLength: +; Keep going until the end of the list. + ld a, [hli] + and a + jr z, .quit + + ld a, [hl] + call GetSpriteLength + +; Spill over into the second table after $80 tiles. + add b + cp $80 + jr z, .loop + jr nc, .SecondTable + +.loop + ld [hl], b + inc hl + ld b, a + +; Assumes the next table will be reached before c hits 0. + dec c + jr nz, .FirstTableLength + +.SecondTable: +; The second tile table starts at tile $80. + ld b, $80 + dec hl +.SecondTableLength: +; Keep going until the end of the list. + ld a, [hli] + and a + jr z, .quit + + ld a, [hl] + call GetSpriteLength + +; There are only two tables, so don't go any further than that. + add b + jr c, .quit + + ld [hl], b + ld b, a + inc hl + + dec c + jr nz, .SecondTableLength + +.quit + ret + +GetSpriteLength: +; Return the length of sprite type a in tiles. + + cp WALKING_SPRITE + jr z, .AnyDirection + cp STANDING_SPRITE + jr z, .AnyDirection + cp STILL_SPRITE + jr z, .OneDirection + + ld a, 12 + ret + +.AnyDirection: + ld a, 12 + ret + +.OneDirection: + ld a, 4 + ret + +GetUsedSprites: + ld hl, wUsedSprites + ld c, SPRITE_GFX_LIST_CAPACITY + +.loop + ld a, [wSpriteFlags] + res 5, a + ld [wSpriteFlags], a + + ld a, [hli] + and a + jr z, .done + ldh [hUsedSpriteIndex], a + + ld a, [hli] + ldh [hUsedSpriteTile], a + + bit 7, a + jr z, .dont_set + + ld a, [wSpriteFlags] + set 5, a ; load VBank0 + ld [wSpriteFlags], a + +.dont_set + push bc + push hl + call GetUsedSprite + pop hl + pop bc + dec c + jr nz, .loop + +.done + ret + +GetUsedSprite: + ldh a, [hUsedSpriteIndex] + call SafeGetSprite + ldh a, [hUsedSpriteTile] + call .GetTileAddr + push hl + push de + push bc + ld a, [wSpriteFlags] + bit 7, a + jr nz, .skip + call .CopyToVram + +.skip + pop bc + ld l, c + ld h, $0 +rept 4 + add hl, hl +endr + pop de + add hl, de + ld d, h + ld e, l + pop hl + + ld a, [wSpriteFlags] + bit 5, a + jr nz, .done + bit 6, a + jr nz, .done + + ldh a, [hUsedSpriteIndex] + call _DoesSpriteHaveFacings + jr c, .done + + ld a, h + add HIGH(vTiles1 - vTiles0) + ld h, a + call .CopyToVram + +.done + ret + +.GetTileAddr: +; Return the address of tile (a) in (hl). + and $7f + ld l, a + ld h, 0 +rept 4 + add hl, hl +endr + ld a, l + add LOW(vTiles0) + ld l, a + ld a, h + adc HIGH(vTiles0) + ld h, a + ret + +.CopyToVram: + ldh a, [rVBK] + push af + ld a, [wSpriteFlags] + bit 5, a + ld a, $1 + jr z, .bankswitch + ld a, $0 + +.bankswitch + ldh [rVBK], a + call Get2bpp + pop af + ldh [rVBK], a + ret + +LoadEmote:: +; Get the address of the pointer to emote c. + ld a, c + ld bc, EMOTE_LENGTH + ld hl, Emotes + call AddNTimes +; Load the emote address into de + ld e, [hl] + inc hl + ld d, [hl] +; load the length of the emote (in tiles) into c + inc hl + ld c, [hl] + swap c +; load the emote pointer bank into b + inc hl + ld b, [hl] +; load the VRAM destination into hl + inc hl + ld a, [hli] + ld h, [hl] + ld l, a +; if the emote has a length of 0, do not proceed (error handling) + ld a, c + and a + ret z + call GetEmote2bpp + ret + +INCLUDE "data/sprites/emotes.asm" + +INCLUDE "data/sprites/sprite_mons.asm" + +INCLUDE "data/maps/outdoor_sprites.asm" + +INCLUDE "data/sprites/sprites.asm" diff --git a/engine/overworld/player_movement.asm b/engine/overworld/player_movement.asm new file mode 100644 index 0000000..0c39248 --- /dev/null +++ b/engine/overworld/player_movement.asm @@ -0,0 +1,816 @@ +DoPlayerMovement:: + call .GetDPad + ld a, movement_step_sleep + ld [wMovementAnimation], a + xor a + ld [wWalkingIntoEdgeWarp], a + call .TranslateIntoMovement + ld c, a + ld a, [wMovementAnimation] + ld [wPlayerNextMovement], a + ret + +.GetDPad: + ldh a, [hJoyDown] + ld [wCurInput], a + +; Standing downhill instead moves down. + + ld hl, wBikeFlags + bit BIKEFLAGS_DOWNHILL_F, [hl] + ret z + + ld c, a + and D_PAD + ret nz + + ld a, c + or D_DOWN + ld [wCurInput], a + ret + +.TranslateIntoMovement: + ld a, [wPlayerState] + cp PLAYER_NORMAL + jr z, .Normal + cp PLAYER_SURF + jr z, .Surf + cp PLAYER_SURF_PIKA + jr z, .Surf + cp PLAYER_BIKE + jr z, .Normal + cp PLAYER_SKATE + jr z, .Ice + +.Normal: + call .CheckForced + call .GetAction + call .CheckTile + ret c + call .CheckTurning + ret c + call .TryStep + ret c + call .TryJump + ret c + call .CheckWarp + ret c + jr .NotMoving + +.Surf: + call .CheckForced + call .GetAction + call .CheckTile + ret c + call .CheckTurning + ret c + call .TrySurf + ret c + jr .NotMoving + +.Ice: + call .CheckForced + call .GetAction + call .CheckTile + ret c + call .CheckTurning + ret c + call .TryStep + ret c + call .TryJump + ret c + call .CheckWarp + ret c + ld a, [wWalkingDirection] + cp STANDING + jr z, .HitWall + call .BumpSound +.HitWall: + call .StandInPlace + xor a + ret + +.NotMoving: + ld a, [wWalkingDirection] + cp STANDING + jr z, .Standing + +; Walking into an edge warp won't bump. + ld a, [wWalkingIntoEdgeWarp] + and a + jr nz, .CantMove + call .BumpSound +.CantMove: + call ._WalkInPlace + xor a + ret + +.Standing: + call .StandInPlace + xor a + ret + +.CheckTile: +; Tiles such as waterfalls and warps move the player +; in a given direction, overriding input. + + ld a, [wPlayerTile] + ld c, a + call CheckWhirlpoolTile + jr c, .not_whirlpool + ld a, PLAYERMOVEMENT_FORCE_TURN + scf + ret + +.not_whirlpool + and $f0 + cp HI_NYBBLE_CURRENT + jr z, .water + cp HI_NYBBLE_WALK + jr z, .land1 + cp HI_NYBBLE_WALK_ALT + jr z, .land2 + cp HI_NYBBLE_WARPS + jr z, .warps + jr .no_walk + +.water + ld a, c + maskbits NUM_DIRECTIONS + ld c, a + ld b, 0 + ld hl, .water_table + add hl, bc + ld a, [hl] + ld [wWalkingDirection], a + jr .continue_walk + +.water_table + db RIGHT ; COLL_WATERFALL_RIGHT + db LEFT ; COLL_WATERFALL_LEFT + db UP ; COLL_WATERFALL_UP + db DOWN ; COLL_WATERFALL + +.land1 + ld a, c + and 7 + ld c, a + ld b, 0 + ld hl, .land1_table + add hl, bc + ld a, [hl] + cp STANDING + jr z, .no_walk + ld [wWalkingDirection], a + jr .continue_walk + +.land1_table + db STANDING ; COLL_BRAKE + db RIGHT ; COLL_WALK_RIGHT + db LEFT ; COLL_WALK_LEFT + db UP ; COLL_WALK_UP + db DOWN ; COLL_WALK_DOWN + db STANDING ; COLL_BRAKE_45 + db STANDING ; COLL_BRAKE_46 + db STANDING ; COLL_BRAKE_47 + +.land2 + ld a, c + and 7 + ld c, a + ld b, 0 + ld hl, .land2_table + add hl, bc + ld a, [hl] + cp STANDING + jr z, .no_walk + ld [wWalkingDirection], a + jr .continue_walk + +.land2_table + db RIGHT ; COLL_WALK_RIGHT_ALT + db LEFT ; COLL_WALK_LEFT_ALT + db UP ; COLL_WALK_UP_ALT + db DOWN ; COLL_WALK_DOWN_ALT + db STANDING ; COLL_BRAKE_ALT + db STANDING ; COLL_BRAKE_55 + db STANDING ; COLL_BRAKE_56 + db STANDING ; COLL_BRAKE_57 + +.warps + ld a, c + cp COLL_DOOR + jr z, .down + cp COLL_DOOR_79 + jr z, .down + cp COLL_STAIRCASE + jr z, .down + cp COLL_CAVE + jr nz, .no_walk + +.down + ld a, DOWN + ld [wWalkingDirection], a + jr .continue_walk + +.no_walk + xor a + ret + +.continue_walk + ld a, STEP_WALK + call .DoStep + ld a, PLAYERMOVEMENT_CONTINUE + scf + ret + +.CheckTurning: +; If the player is turning, change direction first. This also lets +; the player change facing without moving by tapping a direction. + + ld a, [wPlayerTurningDirection] + cp 0 + jr nz, .not_turning + ld a, [wWalkingDirection] + cp STANDING + jr z, .not_turning + + ld e, a + ld a, [wPlayerDirection] + rrca + rrca + maskbits NUM_DIRECTIONS + cp e + jr z, .not_turning + + ld a, STEP_TURN + call .DoStep + ld a, PLAYERMOVEMENT_TURN + scf + ret + +.not_turning + xor a + ret + +.TryStep: +; Surfing actually calls .TrySurf directly instead of passing through here. + ld a, [wPlayerState] + cp PLAYER_SURF + jr z, .TrySurf + cp PLAYER_SURF_PIKA + jr z, .TrySurf + + call .CheckLandPerms + jr c, .bump + + call .CheckNPC + and a + jr z, .bump + cp 2 + jr z, .bump + + ld a, [wPlayerTile] + call CheckIceTile + jr nc, .ice + +; Downhill riding is slower when not moving down. + call .BikeCheck + jr nz, .walk + + ld hl, wBikeFlags + bit BIKEFLAGS_DOWNHILL_F, [hl] + jr z, .fast + + ld a, [wWalkingDirection] + cp DOWN + jr z, .fast + + ld a, STEP_WALK + call .DoStep + scf + ret + +.fast + ld a, STEP_BIKE + call .DoStep + scf + ret + +.walk + ld a, STEP_WALK + call .DoStep + scf + ret + +.ice + ld a, STEP_ICE + call .DoStep + scf + ret + +.unused ; unreferenced + xor a + ret + +.bump + xor a + ret + +.TrySurf: + call .CheckSurfPerms + ld [wWalkingIntoLand], a + jr c, .surf_bump + + call .CheckNPC + ld [wWalkingIntoNPC], a + and a + jr z, .surf_bump + cp 2 + jr z, .surf_bump + + ld a, [wWalkingIntoLand] + and a + jr nz, .ExitWater + + ld a, STEP_WALK + call .DoStep + scf + ret + +.ExitWater: + call .GetOutOfWater + call PlayMapMusic + ld a, STEP_WALK + call .DoStep + ld a, PLAYERMOVEMENT_EXIT_WATER + scf + ret + +.surf_bump + xor a + ret + +.TryJump: + ld a, [wPlayerTile] + ld e, a + and $f0 + cp HI_NYBBLE_LEDGES + jr nz, .DontJump + + ld a, e + and 7 + ld e, a + ld d, 0 + ld hl, .ledge_table + add hl, de + ld a, [wFacingDirection] + and [hl] + jr z, .DontJump + + ld de, SFX_JUMP_OVER_LEDGE + call PlaySFX + ld a, STEP_LEDGE + call .DoStep + ld a, PLAYERMOVEMENT_JUMP + scf + ret + +.DontJump: + xor a + ret + +.ledge_table + db FACE_RIGHT ; COLL_HOP_RIGHT + db FACE_LEFT ; COLL_HOP_LEFT + db FACE_UP ; COLL_HOP_UP + db FACE_DOWN ; COLL_HOP_DOWN + db FACE_RIGHT | FACE_DOWN ; COLL_HOP_DOWN_RIGHT + 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 + +.CheckWarp: +; BUG: No bump noise if standing on tile $3E (see docs/bugs_and_glitches.md) + + ld a, [wWalkingDirection] + ld e, a + ld d, 0 + ld hl, .EdgeWarps + add hl, de + ld a, [wPlayerTile] + cp [hl] + jr nz, .not_warp + + ld a, TRUE + ld [wWalkingIntoEdgeWarp], a + ld a, [wWalkingDirection] + cp STANDING + jr z, .not_warp + + ld e, a + ld a, [wPlayerDirection] + rrca + rrca + maskbits NUM_DIRECTIONS + cp e + jr nz, .not_warp + call WarpCheck + jr nc, .not_warp + + call .StandInPlace + scf + ld a, PLAYERMOVEMENT_WARP + ret + +.not_warp + xor a ; PLAYERMOVEMENT_NORMAL + ret + +.EdgeWarps: + db COLL_WARP_CARPET_DOWN + db COLL_WARP_CARPET_UP + db COLL_WARP_CARPET_LEFT + db COLL_WARP_CARPET_RIGHT + +.DoStep: + ld e, a + ld d, 0 + ld hl, .Steps + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + + ld a, [wWalkingDirection] + ld e, a + cp STANDING + jp z, .StandInPlace + + add hl, de + ld a, [hl] + ld [wMovementAnimation], a + + ld hl, .FinishFacing + add hl, de + ld a, [hl] + ld [wPlayerTurningDirection], a + + ld a, PLAYERMOVEMENT_FINISH + ret + +.Steps: +; entries correspond to STEP_* constants (see constants/map_object_constants.asm) + table_width 2, DoPlayerMovement.Steps + dw .SlowStep + dw .NormalStep + dw .FastStep + dw .JumpStep + dw .SlideStep + dw .TurningStep + dw .BackJumpStep + dw .FinishFacing + assert_table_length NUM_STEPS + +.SlowStep: + slow_step DOWN + slow_step UP + slow_step LEFT + slow_step RIGHT +.NormalStep: + step DOWN + step UP + step LEFT + step RIGHT +.FastStep: + big_step DOWN + big_step UP + big_step LEFT + big_step RIGHT +.JumpStep: + jump_step DOWN + jump_step UP + jump_step LEFT + jump_step RIGHT +.SlideStep: + fast_slide_step DOWN + fast_slide_step UP + fast_slide_step LEFT + fast_slide_step RIGHT +.BackJumpStep: + jump_step UP + jump_step DOWN + jump_step RIGHT + jump_step LEFT +.TurningStep: + turn_step DOWN + turn_step UP + turn_step LEFT + turn_step RIGHT +.FinishFacing: + db $80 | DOWN + db $80 | UP + db $80 | LEFT + db $80 | RIGHT + +.StandInPlace: + ld a, 0 + ld [wPlayerTurningDirection], a + ld a, movement_step_sleep + ld [wMovementAnimation], a + xor a + ret + +._WalkInPlace: + ld a, 0 + ld [wPlayerTurningDirection], a + ld a, movement_step_bump + ld [wMovementAnimation], a + xor a + ret + +.CheckForced: +; When sliding on ice, input is forced to remain in the same direction. + + call CheckStandingOnIce + ret nc + + ld a, [wPlayerTurningDirection] + cp 0 + ret z + + maskbits NUM_DIRECTIONS + ld e, a + ld d, 0 + ld hl, .forced_dpad + add hl, de + ld a, [wCurInput] + and BUTTONS + or [hl] + ld [wCurInput], a + ret + +.forced_dpad + db D_DOWN, D_UP, D_LEFT, D_RIGHT + +.GetAction: +; Poll player input and update movement info. + + ld hl, .action_table + ld de, .action_table_1_end - .action_table_1 + ld a, [wCurInput] + bit D_DOWN_F, a + jr nz, .d_down + bit D_UP_F, a + jr nz, .d_up + bit D_LEFT_F, a + jr nz, .d_left + bit D_RIGHT_F, a + jr nz, .d_right +; Standing + jr .update + +.d_down + add hl, de +.d_up + add hl, de +.d_left + add hl, de +.d_right + add hl, de +.update + ld a, [hli] + ld [wWalkingDirection], a + ld a, [hli] + ld [wFacingDirection], a + ld a, [hli] + ld [wWalkingX], a + ld a, [hli] + ld [wWalkingY], a + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hl] + ld [wWalkingTile], a + ret + +MACRO player_action +; walk direction, facing, x movement, y movement, tile collision pointer + db \1, \2, \3, \4 + dw \5 +ENDM + +.action_table: +.action_table_1 + player_action STANDING, FACE_CURRENT, 0, 0, wPlayerTile +.action_table_1_end + player_action RIGHT, FACE_RIGHT, 1, 0, wTileRight + player_action LEFT, FACE_LEFT, -1, 0, wTileLeft + player_action UP, FACE_UP, 0, -1, wTileUp + player_action DOWN, FACE_DOWN, 0, 1, wTileDown + +.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. The game actually treats +; this the same as an NPC in front (bump). + ld a, 0 + ldh [hMapObjectIndex], a +; Load the next X coordinate into d + ld a, [wPlayerMapX] + ld d, a + ld a, [wWalkingX] + add d + ld d, a +; Load the next Y coordinate into e + ld a, [wPlayerMapY] + ld e, a + ld a, [wWalkingY] + add e + ld e, a +; Find an object struct with coordinates equal to d,e + ld bc, wObjectStructs ; redundant + farcall IsNPCAtCoord + jr nc, .no_npc + call .CheckStrengthBoulder + jr c, .no_bump + + xor a ; bump + ret + +.no_npc + ld a, 1 + ret + +.no_bump + ld a, 2 + ret + +.CheckStrengthBoulder: + ld hl, wBikeFlags + bit BIKEFLAGS_STRENGTH_ACTIVE_F, [hl] + jr z, .not_boulder + + ld hl, OBJECT_WALKING + add hl, bc + ld a, [hl] + cp STANDING + jr nz, .not_boulder + + ld hl, OBJECT_PALETTE + add hl, bc + bit STRENGTH_BOULDER_F, [hl] + jr z, .not_boulder + + ld hl, OBJECT_FLAGS2 + add hl, bc + set 2, [hl] + + ld a, [wWalkingDirection] + ld d, a + ld hl, OBJECT_RANGE + add hl, bc + ld a, [hl] + and %11111100 + or d + ld [hl], a + + scf + ret + +.not_boulder + xor a + ret + +.CheckLandPerms: +; Return 0 if walking onto land and tile permissions allow it. +; Otherwise, return carry. + + ld a, [wTilePermissions] + ld d, a + ld a, [wFacingDirection] + and d + jr nz, .NotWalkable + + ld a, [wWalkingTile] + call .CheckWalkable + jr c, .NotWalkable + + xor a + ret + +.NotWalkable: + scf + ret + +.CheckSurfPerms: +; Return 0 if moving in water, or 1 if moving onto land. +; Otherwise, return carry. + + ld a, [wTilePermissions] + ld d, a + ld a, [wFacingDirection] + and d + jr nz, .NotSurfable + + ld a, [wWalkingTile] + call .CheckSurfable + jr c, .NotSurfable + + and a + ret + +.NotSurfable: + scf + ret + +.BikeCheck: + ld a, [wPlayerState] + cp PLAYER_BIKE + ret z + cp PLAYER_SKATE + ret + +.CheckWalkable: +; Return 0 if tile a is land. Otherwise, return carry. + + call GetTileCollision + and a ; LAND_TILE + ret z + scf + ret + +.CheckSurfable: +; Return 0 if tile a is water, or 1 if land. +; Otherwise, return carry. + + call GetTileCollision + cp WATER_TILE + jr z, .Water + +; Can walk back onto land from water. + and a ; LAND_TILE + jr z, .Land + + jr .Neither + +.Water: + xor a + ret + +.Land: + ld a, 1 + and a + ret + +.Neither: + scf + ret + +.BumpSound: + call CheckSFX + ret c + ld de, SFX_BUMP + call PlaySFX + ret + +.GetOutOfWater: + push bc + ld a, PLAYER_NORMAL + ld [wPlayerState], a + call UpdatePlayerSprite ; UpdateSprites + pop bc + ret + +CheckStandingOnIce:: + ld a, [wPlayerTurningDirection] + cp 0 + jr z, .not_ice + cp $f0 + jr z, .not_ice + ld a, [wPlayerTile] + call CheckIceTile + jr nc, .yep + ld a, [wPlayerState] + cp PLAYER_SKATE + jr nz, .not_ice + +.yep + scf + ret + +.not_ice + and a + ret + +StopPlayerForEvent:: + ld hl, wPlayerNextMovement + ld a, movement_step_sleep + cp [hl] + ret z + + ld [hl], a + ld a, 0 + ld [wPlayerTurningDirection], a + ret diff --git a/engine/overworld/player_object.asm b/engine/overworld/player_object.asm new file mode 100644 index 0000000..dec66f6 --- /dev/null +++ b/engine/overworld/player_object.asm @@ -0,0 +1,857 @@ +BlankScreen: + call DisableSpriteUpdates + xor a + ldh [hBGMapMode], a + call ClearBGPalettes + call ClearSprites + hlcoord 0, 0 + ld bc, wTilemapEnd - wTilemap + ld a, " " + call ByteFill + hlcoord 0, 0, wAttrmap + ld bc, wAttrmapEnd - wAttrmap + ld a, $7 + call ByteFill + call WaitBGMap2 + call SetPalettes + ret + +SpawnPlayer: + ld a, -1 + ld [wObjectFollow_Leader], a + ld [wObjectFollow_Follower], a + ld a, PLAYER + ld hl, PlayerObjectTemplate + call CopyPlayerObjectTemplate + ld b, PLAYER + call PlayerSpawn_ConvertCoords + ld a, PLAYER_OBJECT + call GetMapObject + ld hl, MAPOBJECT_PALETTE + add hl, bc + ln e, PAL_NPC_RED, OBJECTTYPE_SCRIPT + ld a, [wPlayerSpriteSetupFlags] + bit PLAYERSPRITESETUP_FEMALE_TO_MALE_F, a + jr nz, .ok + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .ok + ln e, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT + +.ok + ld [hl], e + ld a, PLAYER_OBJECT + ldh [hMapObjectIndex], a + ld bc, wMapObjects + ld a, PLAYER_OBJECT + ldh [hObjectStructIndex], a + ld de, wObjectStructs + call CopyMapObjectToObjectStruct + ld a, PLAYER + ld [wCenteredObject], a + ret + +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:: + push de + ld a, b + call GetMapObject + pop de + ld hl, MAPOBJECT_X_COORD + add hl, bc + ld [hl], d + ld hl, MAPOBJECT_Y_COORD + add hl, bc + ld [hl], e + ret + +PlayerSpawn_ConvertCoords: + push bc + ld a, [wXCoord] + add 4 + ld d, a + ld a, [wYCoord] + add 4 + ld e, a + pop bc + call CopyDECoordsToMapObject + ret + +WriteObjectXY:: + ld a, b + call CheckObjectVisibility + ret c + + ld hl, OBJECT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld e, [hl] + ldh a, [hMapObjectIndex] + ld b, a + call CopyDECoordsToMapObject + and a + ret + +RefreshPlayerCoords: + ld a, [wXCoord] + add 4 + ld d, a + ld hl, wPlayerMapX + sub [hl] + ld [hl], d + ld hl, wMapObjects + MAPOBJECT_X_COORD + ld [hl], d + ld hl, wPlayerLastMapX + ld [hl], d + ld d, a + ld a, [wYCoord] + add 4 + ld e, a + ld hl, wPlayerMapY + sub [hl] + ld [hl], e + ld hl, wMapObjects + MAPOBJECT_Y_COORD + ld [hl], e + ld hl, wPlayerLastMapY + ld [hl], e + ld e, a +; the next three lines are useless + ld a, [wObjectFollow_Leader] + cp PLAYER + ret nz + ret + +CopyObjectStruct:: + call CheckObjectMask + and a + ret nz ; masked + + ld hl, wObjectStructs + OBJECT_LENGTH * 1 + ld a, 1 + ld de, OBJECT_LENGTH +.loop + ldh [hObjectStructIndex], a + ld a, [hl] + and a + jr z, .done + add hl, de + ldh a, [hObjectStructIndex] + inc a + cp NUM_OBJECT_STRUCTS + jr nz, .loop + scf + ret ; overflow + +.done + ld d, h + ld e, l + call CopyMapObjectToObjectStruct + ld hl, wVramState + bit 7, [hl] + ret z + + ld hl, OBJECT_FLAGS2 + add hl, de + set 5, [hl] + ret + +CopyMapObjectToObjectStruct: + call .CopyMapObjectToTempObject + call CopyTempObjectToObjectStruct + ret + +.CopyMapObjectToTempObject: + ldh a, [hObjectStructIndex] + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, bc + ld [hl], a + + ldh a, [hMapObjectIndex] + ld [wTempObjectCopyMapObjectIndex], a + + ld hl, MAPOBJECT_SPRITE + add hl, bc + ld a, [hl] + ld [wTempObjectCopySprite], a + + call GetSpriteVTile + ld [wTempObjectCopySpriteVTile], a + + ld a, [hl] + call GetSpritePalette + ld [wTempObjectCopyPalette], a + + ld hl, MAPOBJECT_PALETTE + add hl, bc + ld a, [hl] + and MAPOBJECT_PALETTE_MASK + jr z, .skip_color_override + swap a + and PALETTE_MASK + ld [wTempObjectCopyPalette], a + +.skip_color_override + ld hl, MAPOBJECT_MOVEMENT + add hl, bc + ld a, [hl] + ld [wTempObjectCopyMovement], a + + ld hl, MAPOBJECT_SIGHT_RANGE + add hl, bc + ld a, [hl] + ld [wTempObjectCopyRange], a + + ld hl, MAPOBJECT_X_COORD + add hl, bc + ld a, [hl] + ld [wTempObjectCopyX], a + + ld hl, MAPOBJECT_Y_COORD + add hl, bc + ld a, [hl] + ld [wTempObjectCopyY], a + + ld hl, MAPOBJECT_RADIUS + add hl, bc + ld a, [hl] + ld [wTempObjectCopyRadius], a + ret + +InitializeVisibleSprites: + ld bc, wMap1Object + ld a, 1 +.loop + ldh [hMapObjectIndex], a + ld hl, MAPOBJECT_SPRITE + add hl, bc + ld a, [hl] + and a + jr z, .next + + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, bc + ld a, [hl] + cp -1 + jr nz, .next + + ld a, [wXCoord] + ld d, a + ld a, [wYCoord] + ld e, a + + ld hl, MAPOBJECT_X_COORD + add hl, bc + ld a, [hl] + add 1 + sub d + jr c, .next + + cp MAPOBJECT_SCREEN_WIDTH + jr nc, .next + + ld hl, MAPOBJECT_Y_COORD + add hl, bc + ld a, [hl] + add 1 + sub e + jr c, .next + + cp MAPOBJECT_SCREEN_HEIGHT + jr nc, .next + + push bc + call CopyObjectStruct + pop bc + jp c, .ret + +.next + ld hl, MAPOBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + ldh a, [hMapObjectIndex] + inc a + cp NUM_OBJECTS + jr nz, .loop + ret + +.ret + ret + +CheckObjectEnteringVisibleRange:: + nop + ld a, [wPlayerStepDirection] + cp STANDING + ret z + ld hl, .dw + rst JumpTable + ret + +.dw + dw .Down + dw .Up + dw .Left + dw .Right + +.Up: + ld a, [wYCoord] + sub 1 + jr .Vertical + +.Down: + ld a, [wYCoord] + add 9 +.Vertical: + ld d, a + ld a, [wXCoord] + ld e, a + ld bc, wMap1Object + ld a, 1 +.loop_v + ldh [hMapObjectIndex], a + ld hl, MAPOBJECT_SPRITE + add hl, bc + ld a, [hl] + and a + jr z, .next_v + ld hl, MAPOBJECT_Y_COORD + add hl, bc + ld a, d + cp [hl] + jr nz, .next_v + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, bc + ld a, [hl] + cp -1 + jr nz, .next_v + ld hl, MAPOBJECT_X_COORD + add hl, bc + ld a, [hl] + add 1 + sub e + jr c, .next_v + cp MAPOBJECT_SCREEN_WIDTH + jr nc, .next_v + push de + push bc + call CopyObjectStruct + pop bc + pop de + +.next_v + ld hl, MAPOBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + ldh a, [hMapObjectIndex] + inc a + cp NUM_OBJECTS + jr nz, .loop_v + ret + +.Left: + ld a, [wXCoord] + sub 1 + jr .Horizontal + +.Right: + ld a, [wXCoord] + add 10 +.Horizontal: + ld e, a + ld a, [wYCoord] + ld d, a + ld bc, wMap1Object + ld a, 1 +.loop_h + ldh [hMapObjectIndex], a + ld hl, MAPOBJECT_SPRITE + add hl, bc + ld a, [hl] + and a + jr z, .next_h + ld hl, MAPOBJECT_X_COORD + add hl, bc + ld a, e + cp [hl] + jr nz, .next_h + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, bc + ld a, [hl] + cp -1 + jr nz, .next_h + ld hl, MAPOBJECT_Y_COORD + add hl, bc + ld a, [hl] + add 1 + sub d + jr c, .next_h + cp MAPOBJECT_SCREEN_HEIGHT + jr nc, .next_h + push de + push bc + call CopyObjectStruct + pop bc + pop de + +.next_h + ld hl, MAPOBJECT_LENGTH + add hl, bc + ld b, h + ld c, l + ldh a, [hMapObjectIndex] + inc a + cp NUM_OBJECTS + jr nz, .loop_h + ret + +CopyTempObjectToObjectStruct: + ld a, [wTempObjectCopyMapObjectIndex] + ld hl, OBJECT_MAP_OBJECT_INDEX + add hl, de + ld [hl], a + + ld a, [wTempObjectCopyMovement] + call CopySpriteMovementData + + ld a, [wTempObjectCopyPalette] + ld hl, OBJECT_PALETTE + add hl, de + or [hl] + ld [hl], a + + ld a, [wTempObjectCopyY] + call .InitYCoord + + ld a, [wTempObjectCopyX] + call .InitXCoord + + ld a, [wTempObjectCopySprite] + ld hl, OBJECT_SPRITE + add hl, de + ld [hl], a + + ld a, [wTempObjectCopySpriteVTile] + ld hl, OBJECT_SPRITE_TILE + add hl, de + ld [hl], a + + ld hl, OBJECT_STEP_TYPE + add hl, de + ld [hl], STEP_TYPE_RESET + + ld hl, OBJECT_FACING + add hl, de + ld [hl], STANDING + + ld a, [wTempObjectCopyRadius] + call .InitRadius + + ld a, [wTempObjectCopyRange] + ld hl, OBJECT_RANGE + add hl, de + ld [hl], a + + and a + ret + +.InitYCoord: + ld hl, OBJECT_INIT_Y + add hl, de + ld [hl], a + + ld hl, OBJECT_MAP_Y + add hl, de + ld [hl], a + + ld hl, wYCoord + sub [hl] + and $f + swap a + ld hl, wPlayerBGMapOffsetY + sub [hl] + ld hl, OBJECT_SPRITE_Y + add hl, de + ld [hl], a + ret + +.InitXCoord: + ld hl, OBJECT_INIT_X + add hl, de + ld [hl], a + ld hl, OBJECT_MAP_X + add hl, de + ld [hl], a + ld hl, wXCoord + sub [hl] + and $f + swap a + ld hl, wPlayerBGMapOffsetX + sub [hl] + ld hl, OBJECT_SPRITE_X + add hl, de + ld [hl], a + ret + +.InitRadius: + ld h, a + inc a + and $f + ld l, a + ld a, h + add $10 + and $f0 + or l + ld hl, OBJECT_RADIUS + add hl, de + ld [hl], a + ret + +TrainerWalkToPlayer: + ldh a, [hLastTalked] + call InitMovementBuffer + ld a, movement_step_sleep + call AppendToMovementBuffer + ld a, [wSeenTrainerDistance] + dec a + jr z, .TerminateStep + ldh a, [hLastTalked] + ld b, a + ld c, PLAYER + ld d, 1 + call .GetPathToPlayer + call DecrementMovementBufferCount + +.TerminateStep: + ld a, movement_step_end + call AppendToMovementBuffer + ret + +.GetPathToPlayer: + push de + push bc +; get player object struct, load to de + ld a, c + call GetMapObject + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, bc + ld a, [hl] + call GetObjectStruct + ld d, b + ld e, c + +; get last talked object struct, load to bc + pop bc + ld a, b + call GetMapObject + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, bc + ld a, [hl] + call GetObjectStruct + +; get last talked coords, load to bc + ld hl, OBJECT_MAP_X + add hl, bc + ld a, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld c, [hl] + ld b, a + +; get player coords, load to de + ld hl, OBJECT_MAP_X + add hl, de + ld a, [hl] + ld hl, OBJECT_MAP_Y + add hl, de + ld e, [hl] + ld d, a + + pop af + call ComputePathToWalkToPlayer + ret + +SurfStartStep: + call InitMovementBuffer + call .GetMovementData + call AppendToMovementBuffer + ld a, movement_step_end + call AppendToMovementBuffer + ret + +.GetMovementData: + ld a, [wPlayerDirection] + srl a + srl a + maskbits NUM_DIRECTIONS + ld e, a + ld d, 0 + ld hl, .movement_data + add hl, de + ld a, [hl] + ret + +.movement_data + slow_step DOWN + slow_step UP + slow_step LEFT + slow_step RIGHT + +FollowNotExact:: + push bc + ld a, c + call CheckObjectVisibility + ld d, b + ld e, c + pop bc + ret c + + ld a, b + call CheckObjectVisibility + ret c + +; object 2 is now in bc, object 1 is now in de + ld hl, OBJECT_MAP_X + add hl, bc + ld a, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld c, [hl] + ld b, a + + ld hl, OBJECT_MAP_X + add hl, de + ld a, [hl] + cp b + jr z, .same_x + jr c, .to_the_left + inc b + jr .continue + +.to_the_left + dec b + jr .continue + +.same_x + ld hl, OBJECT_MAP_Y + add hl, de + ld a, [hl] + cp c + jr z, .continue + jr c, .below + inc c + jr .continue + +.below + dec c + +.continue + ld hl, OBJECT_MAP_X + add hl, de + ld [hl], b + ld a, b + ld hl, wXCoord + sub [hl] + and $f + swap a + ld hl, wPlayerBGMapOffsetX + sub [hl] + ld hl, OBJECT_SPRITE_X + add hl, de + ld [hl], a + ld hl, OBJECT_MAP_Y + add hl, de + ld [hl], c + ld a, c + ld hl, wYCoord + sub [hl] + and $f + swap a + ld hl, wPlayerBGMapOffsetY + sub [hl] + ld hl, OBJECT_SPRITE_Y + add hl, de + ld [hl], a + ldh a, [hObjectStructIndex] + ld hl, OBJECT_RANGE + add hl, de + ld [hl], a + ld hl, OBJECT_MOVEMENT_TYPE + add hl, de + ld [hl], SPRITEMOVEDATA_FOLLOWNOTEXACT + ld hl, OBJECT_STEP_TYPE + add hl, de + ld [hl], STEP_TYPE_RESET + ret + +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 + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, bc + ld a, [hl] + cp NUM_OBJECT_STRUCTS + jr nc, .carry + ld d, a + ld a, e + call GetMapObject + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, bc + ld a, [hl] + cp NUM_OBJECT_STRUCTS + jr nc, .carry + ld e, a + call .GetFacing_e_relativeto_d + ret + +.carry + scf + ret + +.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 + call GetObjectStruct + ld hl, OBJECT_MAP_X + add hl, bc + ld a, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld c, [hl] + ld b, a + push bc +; load the coordinates of object e into de + ld a, e + call GetObjectStruct + ld hl, OBJECT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld e, [hl] + pop bc +; |x1 - x2| + ld a, b + sub d + jr z, .same_x_1 + jr nc, .b_right_of_d_1 + cpl + inc a + +.b_right_of_d_1 +; |y1 - y2| + ld h, a + ld a, c + sub e + jr z, .same_y_1 + jr nc, .c_below_e_1 + cpl + inc a + +.c_below_e_1 +; |y1 - y2| - |x1 - x2| + sub h + jr c, .same_y_1 + +.same_x_1 +; compare the y coordinates + ld a, c + cp e + jr z, .same_x_and_y + jr c, .c_directly_below_e +; c directly above e + ld d, DOWN + and a + ret + +.c_directly_below_e + ld d, UP + and a + ret + +.same_y_1 + ld a, b + cp d + jr z, .same_x_and_y + jr c, .b_directly_right_of_d +; b directly left of d + ld d, RIGHT + and a + ret + +.b_directly_right_of_d + ld d, LEFT + and a + ret + +.same_x_and_y + scf + ret + +QueueFollowerFirstStep: + call .QueueFirstStep + jr c, .same + ld [wFollowMovementQueue], a + xor a + ld [wFollowerMovementQueueLength], a + ret + +.same + ld a, -1 + ld [wFollowerMovementQueueLength], a + ret + +.QueueFirstStep: + ld a, [wObjectFollow_Leader] + call GetObjectStruct + ld hl, OBJECT_MAP_X + add hl, bc + ld d, [hl] + ld hl, OBJECT_MAP_Y + add hl, bc + ld e, [hl] + ld a, [wObjectFollow_Follower] + call GetObjectStruct + ld hl, OBJECT_MAP_X + add hl, bc + ld a, d + cp [hl] + jr z, .check_y + jr c, .left + and a + ld a, movement_step + RIGHT + ret + +.left + and a + ld a, movement_step + LEFT + ret + +.check_y + ld hl, OBJECT_MAP_Y + add hl, bc + ld a, e + cp [hl] + jr z, .same_xy + jr c, .up + and a + ld a, movement_step + DOWN + ret + +.up + and a + ld a, movement_step + UP + ret + +.same_xy + scf + ret diff --git a/engine/overworld/player_step.asm b/engine/overworld/player_step.asm new file mode 100644 index 0000000..7a65bb1 --- /dev/null +++ b/engine/overworld/player_step.asm @@ -0,0 +1,270 @@ +_HandlePlayerStep:: + ld a, [wPlayerStepFlags] + and a + ret z + bit PLAYERSTEP_START_F, a + jr nz, .update_overworld_map + bit PLAYERSTEP_STOP_F, a + jr nz, .update_player_coords + bit PLAYERSTEP_CONTINUE_F, a + jr nz, .finish + ret + +.update_overworld_map + ld a, 4 + ld [wHandlePlayerStep], a + call UpdateOverworldMap + jr .finish + +.update_player_coords + call UpdatePlayerCoords + jr .finish + +.finish + call HandlePlayerStep + ld a, [wPlayerStepVectorX] + ld d, a + ld a, [wPlayerStepVectorY] + ld e, a + ld a, [wPlayerBGMapOffsetX] + sub d + ld [wPlayerBGMapOffsetX], a + ld a, [wPlayerBGMapOffsetY] + sub e + ld [wPlayerBGMapOffsetY], a + ret + +ScrollScreen:: + ld a, [wPlayerStepVectorX] + ld d, a + ld a, [wPlayerStepVectorY] + ld e, a + ldh a, [hSCX] + add d + ldh [hSCX], a + ldh a, [hSCY] + add e + ldh [hSCY], a + ret + +HandlePlayerStep: + ld hl, wHandlePlayerStep + ld a, [hl] + and a + ret z + dec [hl] + ld a, [hl] + ld hl, .Jumptable + rst JumpTable + ret + +.Jumptable: + dw GetMovementPermissions + dw BufferScreen + dw .mobile + dw .fail2 +; The rest are never used. Ever. + dw .fail1 + dw .fail1 + dw .fail1 + dw .fail1 + dw .fail1 + dw .fail1 + dw .fail1 + +.fail1 + ret + +.mobile + farcall StubbedTrainerRankings_StepCount + ret + +.fail2 + ret + +UpdatePlayerCoords: + ld a, [wPlayerStepDirection] + and a + jr nz, .check_step_down + ld hl, wYCoord + inc [hl] + ret + +.check_step_down + cp UP + jr nz, .check_step_left + ld hl, wYCoord + dec [hl] + ret + +.check_step_left + cp LEFT + jr nz, .check_step_right + ld hl, wXCoord + dec [hl] + ret + +.check_step_right + cp RIGHT + ret nz + ld hl, wXCoord + inc [hl] + ret + +UpdateOverworldMap: + ld a, [wPlayerStepDirection] + and a + jr z, .step_down + cp UP + jr z, .step_up + cp LEFT + jr z, .step_left + cp RIGHT + jr z, .step_right + ret + +.step_down + call .ScrollOverworldMapDown + call LoadMapPart + call ScrollMapDown + ret + +.step_up + call .ScrollOverworldMapUp + call LoadMapPart + call ScrollMapUp + ret + +.step_left + call .ScrollOverworldMapLeft + call LoadMapPart + call ScrollMapLeft + ret + +.step_right + call .ScrollOverworldMapRight + call LoadMapPart + call ScrollMapRight + ret + +.ScrollOverworldMapDown: + ld a, [wBGMapAnchor] + add 2 * BG_MAP_WIDTH + ld [wBGMapAnchor], a + jr nc, .not_overflowed + ld a, [wBGMapAnchor + 1] + inc a + and %11 + or HIGH(vBGMap0) + ld [wBGMapAnchor + 1], a +.not_overflowed + ld hl, wPlayerMetatileY + inc [hl] + ld a, [hl] + cp 2 ; was 1 + jr nz, .done_down + ld [hl], 0 + call .ScrollMapDataDown +.done_down + ret + +.ScrollMapDataDown: + ld hl, wOverworldMapAnchor + ld a, [wMapWidth] + add 3 * 2 ; surrounding tiles + add [hl] + ld [hli], a + ret nc + inc [hl] + ret + +.ScrollOverworldMapUp: + ld a, [wBGMapAnchor] + sub 2 * BG_MAP_WIDTH + ld [wBGMapAnchor], a + jr nc, .not_underflowed + ld a, [wBGMapAnchor + 1] + dec a + and %11 + or HIGH(vBGMap0) + ld [wBGMapAnchor + 1], a +.not_underflowed + ld hl, wPlayerMetatileY + dec [hl] + ld a, [hl] + cp -1 ; was 0 + jr nz, .done_up + ld [hl], $1 + call .ScrollMapDataUp +.done_up + ret + +.ScrollMapDataUp: + ld hl, wOverworldMapAnchor + ld a, [wMapWidth] + add 3 * 2 ; surrounding tiles + ld b, a + ld a, [hl] + sub b + ld [hli], a + ret nc + dec [hl] + ret + +.ScrollOverworldMapLeft: + ld a, [wBGMapAnchor] + ld e, a + and $e0 + ld d, a + ld a, e + sub $2 + and $1f + or d + ld [wBGMapAnchor], a + ld hl, wPlayerMetatileX + dec [hl] + ld a, [hl] + cp -1 + jr nz, .done_left + ld [hl], 1 + call .ScrollMapDataLeft +.done_left + ret + +.ScrollMapDataLeft: + ld hl, wOverworldMapAnchor + ld a, [hl] + sub 1 + ld [hli], a + ret nc + dec [hl] + ret + +.ScrollOverworldMapRight: + ld a, [wBGMapAnchor] + ld e, a + and $e0 + ld d, a + ld a, e + add $2 + and $1f + or d + ld [wBGMapAnchor], a + ld hl, wPlayerMetatileX + inc [hl] + ld a, [hl] + cp 2 + jr nz, .done_right + ld [hl], 0 + call .ScrollMapDataRight +.done_right + ret + +.ScrollMapDataRight: + ld hl, wOverworldMapAnchor + ld a, [hl] + add 1 + ld [hli], a + ret nc + inc [hl] + ret diff --git a/engine/overworld/scripting.asm b/engine/overworld/scripting.asm new file mode 100644 index 0000000..648d57a --- /dev/null +++ b/engine/overworld/scripting.asm @@ -0,0 +1,2409 @@ +; Event scripting commands. + +EnableScriptMode:: + push af + ld a, SCRIPT_READ + ld [wScriptMode], a + pop af + ret + +ScriptEvents:: + call StartScript +.loop + ld a, [wScriptMode] + ld hl, .modes + rst JumpTable + call CheckScript + jr nz, .loop + ret + +.modes + dw EndScript + dw RunScriptCommand + dw WaitScriptMovement + dw WaitScript + +EndScript: + call StopScript + ret + +WaitScript: + call StopScript + + ld hl, wScriptDelay + dec [hl] + ret nz + + farcall UnfreezeAllObjects + + ld a, SCRIPT_READ + ld [wScriptMode], a + call StartScript + ret + +WaitScriptMovement: + call StopScript + + ld hl, wVramState + bit 7, [hl] + ret nz + + farcall UnfreezeAllObjects + + ld a, SCRIPT_READ + ld [wScriptMode], a + call StartScript + ret + +RunScriptCommand: + call GetScriptByte + ld hl, ScriptCommandTable + rst JumpTable + ret + +ScriptCommandTable: +; entries correspond to *_command constants (see macros/scripts/events.asm) + table_width 2, ScriptCommandTable + dw Script_scall ; 00 + dw Script_farscall ; 01 + dw Script_memcall ; 02 + dw Script_sjump ; 03 + dw Script_farsjump ; 04 + dw Script_memjump ; 05 + dw Script_ifequal ; 06 + dw Script_ifnotequal ; 07 + dw Script_iffalse ; 08 + dw Script_iftrue ; 09 + dw Script_ifgreater ; 0a + dw Script_ifless ; 0b + dw Script_jumpstd ; 0c + dw Script_callstd ; 0d + dw Script_callasm ; 0e + dw Script_special ; 0f + dw Script_memcallasm ; 10 + dw Script_checkmapscene ; 11 + dw Script_setmapscene ; 12 + dw Script_checkscene ; 13 + dw Script_setscene ; 14 + dw Script_setval ; 15 + dw Script_addval ; 16 + dw Script_random ; 17 + dw Script_checkver ; 18 + dw Script_readmem ; 19 + dw Script_writemem ; 1a + dw Script_loadmem ; 1b + dw Script_readvar ; 1c + dw Script_writevar ; 1d + dw Script_loadvar ; 1e + dw Script_giveitem ; 1f + dw Script_takeitem ; 20 + dw Script_checkitem ; 21 + dw Script_givemoney ; 22 + dw Script_takemoney ; 23 + dw Script_checkmoney ; 24 + dw Script_givecoins ; 25 + dw Script_takecoins ; 26 + dw Script_checkcoins ; 27 + dw Script_addcellnum ; 28 + dw Script_delcellnum ; 29 + dw Script_checkcellnum ; 2a + dw Script_checktime ; 2b + dw Script_checkpoke ; 2c + dw Script_givepoke ; 2d + dw Script_giveegg ; 2e + dw Script_givepokemail ; 2f + dw Script_checkpokemail ; 30 + dw Script_checkevent ; 31 + dw Script_clearevent ; 32 + dw Script_setevent ; 33 + dw Script_checkflag ; 34 + dw Script_clearflag ; 35 + dw Script_setflag ; 36 + dw Script_wildon ; 37 + dw Script_wildoff ; 38 + dw Script_xycompare ; 39 + dw Script_warpmod ; 3a + dw Script_blackoutmod ; 3b + dw Script_warp ; 3c + dw Script_getmoney ; 3d + dw Script_getcoins ; 3e + dw Script_getnum ; 3f + dw Script_getmonname ; 40 + dw Script_getitemname ; 41 + dw Script_getcurlandmarkname ; 42 + dw Script_gettrainername ; 43 + dw Script_getstring ; 44 + dw Script_itemnotify ; 45 + dw Script_pocketisfull ; 46 + dw Script_opentext ; 47 + dw Script_refreshscreen ; 48 + dw Script_closetext ; 49 + dw Script_writeunusedbyte ; 4a + dw Script_farwritetext ; 4b + dw Script_writetext ; 4c + dw Script_repeattext ; 4d + dw Script_yesorno ; 4e + dw Script_loadmenu ; 4f + dw Script_closewindow ; 50 + dw Script_jumptextfaceplayer ; 51 + dw Script_farjumptext ; 52 + dw Script_jumptext ; 53 + dw Script_waitbutton ; 54 + dw Script_promptbutton ; 55 + dw Script_pokepic ; 56 + dw Script_closepokepic ; 57 + dw Script__2dmenu ; 58 + dw Script_verticalmenu ; 59 + dw Script_loadpikachudata ; 5a + dw Script_randomwildmon ; 5b + dw Script_loadtemptrainer ; 5c + dw Script_loadwildmon ; 5d + dw Script_loadtrainer ; 5e + dw Script_startbattle ; 5f + dw Script_reloadmapafterbattle ; 60 + dw Script_catchtutorial ; 61 + dw Script_trainertext ; 62 + dw Script_trainerflagaction ; 63 + dw Script_winlosstext ; 64 + dw Script_scripttalkafter ; 65 + dw Script_endifjustbattled ; 66 + dw Script_checkjustbattled ; 67 + dw Script_setlasttalked ; 68 + dw Script_applymovement ; 69 + dw Script_applymovementlasttalked ; 6a + dw Script_faceplayer ; 6b + dw Script_faceobject ; 6c + dw Script_variablesprite ; 6d + dw Script_disappear ; 6e + dw Script_appear ; 6f + dw Script_follow ; 70 + dw Script_stopfollow ; 71 + dw Script_moveobject ; 72 + dw Script_writeobjectxy ; 73 + dw Script_loademote ; 74 + dw Script_showemote ; 75 + dw Script_turnobject ; 76 + dw Script_follownotexact ; 77 + dw Script_earthquake ; 78 + dw Script_changemapblocks ; 79 + dw Script_changeblock ; 7a + dw Script_reloadmap ; 7b + dw Script_reloadmappart ; 7c + dw Script_writecmdqueue ; 7d + dw Script_delcmdqueue ; 7e + dw Script_playmusic ; 7f + dw Script_encountermusic ; 80 + dw Script_musicfadeout ; 81 + dw Script_playmapmusic ; 82 + dw Script_dontrestartmapmusic ; 83 + dw Script_cry ; 84 + dw Script_playsound ; 85 + dw Script_waitsfx ; 86 + dw Script_warpsound ; 87 + dw Script_specialsound ; 88 + dw Script_autoinput ; 89 + dw Script_newloadmap ; 8a + dw Script_pause ; 8b + dw Script_deactivatefacing ; 8c + dw Script_sdefer ; 8d + dw Script_warpcheck ; 8e + dw Script_stopandsjump ; 8f + dw Script_endcallback ; 90 + dw Script_end ; 91 + dw Script_reloadend ; 92 + dw Script_endall ; 93 + dw Script_pokemart ; 94 + dw Script_elevator ; 95 + dw Script_trade ; 96 + dw Script_askforphonenumber ; 97 + dw Script_phonecall ; 98 + dw Script_hangup ; 99 + dw Script_describedecoration ; 9a + dw Script_fruittree ; 9b + dw Script_specialphonecall ; 9c + dw Script_checkphonecall ; 9d + dw Script_verbosegiveitem ; 9e + dw Script_verbosegiveitemvar ; 9f + dw Script_swarm ; a0 + dw Script_halloffame ; a1 + dw Script_credits ; a2 + dw Script_warpfacing ; a3 + dw Script_battletowertext ; a4 + dw Script_getlandmarkname ; a5 + dw Script_gettrainerclassname ; a6 + dw Script_getname ; a7 + dw Script_wait ; a8 + dw Script_checksave ; a9 + dw Script_loadmonindex ; aa + dw Script_checkmaplockedmons ; ab + assert_table_length NUM_EVENT_COMMANDS + +StartScript: + ld hl, wScriptFlags + set SCRIPT_RUNNING, [hl] + ret + +CheckScript: + ld hl, wScriptFlags + bit SCRIPT_RUNNING, [hl] + ret + +StopScript: + ld hl, wScriptFlags + res SCRIPT_RUNNING, [hl] + ret + +Script_callasm: + call GetScriptByte + ld b, a + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + ld a, b + rst FarCall + ret + +Script_special: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + farcall Special + ret + +Script_memcallasm: + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + ld b, [hl] + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + ld a, b + rst FarCall + ret + +Script_jumptextfaceplayer: + ld a, [wScriptBank] + ld [wScriptTextBank], a + call GetScriptByte + ld [wScriptTextAddr], a + call GetScriptByte + ld [wScriptTextAddr + 1], a + ld b, BANK(JumpTextFacePlayerScript) + ld hl, JumpTextFacePlayerScript + jp ScriptJump + +Script_jumptext: + ld a, [wScriptBank] + ld [wScriptTextBank], a + call GetScriptByte + ld [wScriptTextAddr], a + call GetScriptByte + ld [wScriptTextAddr + 1], a + ld b, BANK(JumpTextScript) + ld hl, JumpTextScript + jp ScriptJump + +JumpTextFacePlayerScript: + faceplayer +JumpTextScript: + opentext + repeattext -1, -1 + waitbutton + closetext + end + +Script_farjumptext: + call GetScriptByte + ld [wScriptTextBank], a + call GetScriptByte + ld [wScriptTextAddr], a + call GetScriptByte + ld [wScriptTextAddr + 1], a + ld b, BANK(JumpTextScript) + ld hl, JumpTextScript + jp ScriptJump + +Script_writetext: + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + ld a, [wScriptBank] + ld b, a + call MapTextbox + ret + +Script_farwritetext: + call GetScriptByte + ld b, a + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + call MapTextbox + ret + +Script_repeattext: + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + cp -1 + jr nz, .done + ld a, l + cp -1 + jr nz, .done + ld hl, wScriptTextBank + ld a, [hli] + ld b, a + ld a, [hli] + ld h, [hl] + ld l, a + call MapTextbox + ret + +.done + ret + +Script_waitbutton: + jp WaitButton + +Script_promptbutton: + ldh a, [hOAMUpdate] + push af + ld a, $1 + ldh [hOAMUpdate], a + call WaitBGMap + call PromptButton + pop af + ldh [hOAMUpdate], a + ret + +Script_yesorno: + call YesNoBox + ld a, FALSE + jr c, .no + ld a, TRUE +.no + ld [wScriptVar], a + vc_hook Unknown_yesorno_ret + ret + +Script_loadmenu: + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + ld de, LoadMenuHeader + ld a, [wScriptBank] + call Call_a_de + call UpdateSprites + ret + +Script_closewindow: + call CloseWindow + call UpdateSprites + ret + +Script_pokepic: + call LoadScriptPokemonID + ld [wCurPartySpecies], a + farcall Pokepic + ret + +Script_closepokepic: + farcall ClosePokepic + ret + +Script_verticalmenu: + ld a, [wScriptBank] + ld hl, VerticalMenu + rst FarCall + ld a, [wMenuCursorY] + jr nc, .ok + xor a +.ok + ld [wScriptVar], a + ret + +Script__2dmenu: + ld a, [wScriptBank] + ld hl, _2DMenu + rst FarCall + ld a, [wMenuCursorPosition] + jr nc, .ok + xor a +.ok + ld [wScriptVar], a + ret + +Script_battletowertext: + call SetUpTextbox + call GetScriptByte + ld c, a + farcall BattleTowerText + ret + +Script_verbosegiveitem: + call Script_giveitem + call CurItemName + ld de, wStringBuffer1 + ld a, STRING_BUFFER_4 + call CopyConvertedText + ld b, BANK(GiveItemScript) + ld de, GiveItemScript + jp ScriptCall + +GiveItemScript_DummyFunction: + ret + +GiveItemScript: + callasm GiveItemScript_DummyFunction + writetext .ReceivedItemText + iffalse .Full + waitsfx + specialsound + waitbutton + itemnotify + end + +.Full: + promptbutton + pocketisfull + end + +.ReceivedItemText: + text_far _ReceivedItemText + text_end + +Script_verbosegiveitemvar: + call GetScriptByte + cp ITEM_FROM_MEM + jr nz, .ok + ld a, [wScriptVar] +.ok + ld [wCurItem], a + call GetScriptByte + call GetVarAction + ld a, [de] + ld [wItemQuantityChange], a + ld hl, wNumItems + call ReceiveItem + ld a, TRUE + jr c, .ok2 + xor a +.ok2 + ld [wScriptVar], a + call CurItemName + ld de, wStringBuffer1 + ld a, STRING_BUFFER_4 + call CopyConvertedText + ld b, BANK(GiveItemScript) + ld de, GiveItemScript + jp ScriptCall + +Script_itemnotify: + call GetPocketName + call CurItemName + ld b, BANK(PutItemInPocketText) + ld hl, PutItemInPocketText + call MapTextbox + ret + +Script_pocketisfull: + call GetPocketName + call CurItemName + ld b, BANK(PocketIsFullText) + ld hl, PocketIsFullText + call MapTextbox + ret + +Script_specialsound: + farcall CheckItemPocket + ld a, [wItemAttributeValue] + cp TM_HM + ld de, SFX_GET_TM + jr z, .play + ld de, SFX_ITEM +.play + call PlaySFX + call WaitSFX + ret + +GetPocketName: + farcall CheckItemPocket + ld a, [wItemAttributeValue] + dec a + ld hl, ItemPocketNames + maskbits NUM_POCKETS + add a + ld e, a + ld d, 0 + add hl, de + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wStringBuffer3 + call CopyName2 + ret + +INCLUDE "data/items/pocket_names.asm" + +CurItemName: + ld a, [wCurItem] + ld [wNamedObjectIndex], a + call GetItemName + ret + +PutItemInPocketText: + text_far _PutItemInPocketText + text_end + +PocketIsFullText: + text_far _PocketIsFullText + text_end + +Script_pokemart: + call GetScriptByte + ld c, a + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld a, [wScriptBank] + ld b, a + farcall OpenMartDialog + ret + +Script_elevator: + xor a + ld [wScriptVar], a + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld a, [wScriptBank] + ld b, a + farcall Elevator + ret c + ld a, TRUE + ld [wScriptVar], a + ret + +Script_trade: + call GetScriptByte + ld e, a + farcall NPCTrade + ret + +Script_phonecall: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld a, [wScriptBank] + ld b, a + farcall PhoneCall + ret + +Script_hangup: + farcall HangUp + ret + +Script_askforphonenumber: + call YesNoBox + jr c, .refused + call GetScriptByte + ld c, a + farcall AddPhoneNumber + jr c, .phonefull + xor a ; PHONE_CONTACT_GOT + jr .done +.phonefull + ld a, PHONE_CONTACTS_FULL + jr .done +.refused + call GetScriptByte + ld a, PHONE_CONTACT_REFUSED +.done + ld [wScriptVar], a + ret + +Script_describedecoration: + call GetScriptByte + ld b, a + farcall DescribeDecoration + ld h, d + ld l, e + jp ScriptJump + +Script_fruittree: + call GetScriptByte + ld [wCurFruitTree], a + ld b, BANK(FruitTreeScript) + ld hl, FruitTreeScript + jp ScriptJump + +Script_swarm: + call GetScriptByte + ld c, a + call GetScriptByte + ld d, a + call GetScriptByte + ld e, a + farcall StoreSwarmMapIndices + ret + +Script_trainertext: + call GetScriptByte + ld c, a + ld b, 0 + ld hl, wSeenTextPointer + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wSeenTrainerBank] + ld b, a + call MapTextbox + ret + +Script_scripttalkafter: + ld hl, wScriptAfterPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wSeenTrainerBank] + ld b, a + jp ScriptJump + +Script_trainerflagaction: + xor a + ld [wScriptVar], a + ld hl, wTempTrainerEventFlag + ld e, [hl] + inc hl + ld d, [hl] + call GetScriptByte + ld b, a + call EventFlagAction + ld a, c + and a + ret z + ld a, TRUE + ld [wScriptVar], a + ret + +Script_winlosstext: + ld hl, wWinTextPointer + call GetScriptByte + ld [hli], a + call GetScriptByte + ld [hli], a + ld hl, wLossTextPointer + call GetScriptByte + ld [hli], a + call GetScriptByte + ld [hli], a + ret + +Script_endifjustbattled: + ld a, [wRunningTrainerBattleScript] + and a + ret z + jp Script_end + +Script_checkjustbattled: + ld a, TRUE + ld [wScriptVar], a + ld a, [wRunningTrainerBattleScript] + and a + ret nz + xor a + ld [wScriptVar], a + ret + +Script_encountermusic: + ld a, [wOtherTrainerClass] + ld e, a + farcall PlayTrainerEncounterMusic + ret + +Script_playmapmusic: + call PlayMapMusic + ret + +Script_playmusic: + ld de, MUSIC_NONE + call PlayMusic + xor a + ld [wMusicFade], a + call MaxVolume + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + call PlayMusic + ret + +Script_musicfadeout: + call GetScriptByte + ld [wMusicFadeID], a + call GetScriptByte + ld [wMusicFadeID + 1], a + call GetScriptByte + and ~(1 << MUSIC_FADE_IN_F) + ld [wMusicFade], a + ret + +Script_playsound: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + call PlaySFX + ret + +Script_waitsfx: + call WaitSFX + ret + +Script_warpsound: + farcall GetWarpSFX + call PlaySFX + ret + +Script_cry: + call LoadScriptPokemonID + call PlayMonCry + ret + +GetScriptObject: + and a ; PLAYER? + ret z + cp LAST_TALKED + ret z + dec a + ret + +Script_setlasttalked: + call GetScriptByte + call GetScriptObject + ldh [hLastTalked], a + ret + +Script_applymovement: + call GetScriptByte + call GetScriptObject + ld c, a + +ApplyMovement: + push bc + ld a, c + farcall FreezeAllOtherObjects + pop bc + + push bc + call UnfreezeFollowerObject + pop bc + + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + ld a, [wScriptBank] + ld b, a + call GetMovementData + ret c + + ld a, SCRIPT_WAIT_MOVEMENT + ld [wScriptMode], a + call StopScript + ret + +UnfreezeFollowerObject: + farcall _UnfreezeFollowerObject + ret + +Script_applymovementlasttalked: +; apply movement to last talked + + ldh a, [hLastTalked] + ld c, a + jp ApplyMovement + +Script_faceplayer: + ldh a, [hLastTalked] + and a + ret z + ld d, $0 + ldh a, [hLastTalked] + ld e, a + farcall GetRelativeFacing + ld a, d + add a + add a + ld e, a + ldh a, [hLastTalked] + ld d, a + call ApplyObjectFacing + ret + +Script_faceobject: + call GetScriptByte + call GetScriptObject + cp LAST_TALKED + jr c, .ok + ldh a, [hLastTalked] +.ok + ld e, a + call GetScriptByte + call GetScriptObject + cp LAST_TALKED + jr nz, .ok2 + ldh a, [hLastTalked] +.ok2 + ld d, a + push de + farcall GetRelativeFacing + pop bc + ret c + ld a, d + add a + add a + ld e, a + ld d, c + call ApplyObjectFacing + ret + +Script_turnobject: + call GetScriptByte + call GetScriptObject + cp LAST_TALKED + jr nz, .ok + ldh a, [hLastTalked] +.ok + ld d, a + call GetScriptByte + add a + add a + ld e, a + call ApplyObjectFacing + ret + +ApplyObjectFacing: + ld a, d + push de + call CheckObjectVisibility + jr c, .not_visible + ld hl, OBJECT_SPRITE + add hl, bc + ld a, [hl] + push bc + call DoesSpriteHaveFacings + pop bc + jr c, .not_visible ; STILL_SPRITE + ld hl, OBJECT_FLAGS1 + add hl, bc + bit FIXED_FACING_F, [hl] + jr nz, .not_visible + pop de + ld a, e + call SetSpriteDirection + ld hl, wVramState + bit 6, [hl] + jr nz, .text_state + call .DisableTextTiles +.text_state + call UpdateSprites + ret + +.not_visible + pop de + scf + ret + +.DisableTextTiles: + call LoadMapPart + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT +.loop + res 7, [hl] + inc hl + dec bc + ld a, b + or c + jr nz, .loop + ret + +Script_variablesprite: + call GetScriptByte + ld e, a + ld d, 0 + ld hl, wVariableSprites + add hl, de + call GetScriptByte + ld [hl], a + ret + +Script_appear: + call GetScriptByte + call GetScriptObject + call UnmaskCopyMapObjectStruct + ldh a, [hMapObjectIndex] + ld b, 0 ; clear + call ApplyEventActionAppearDisappear + ret + +Script_disappear: + call GetScriptByte + call GetScriptObject + cp LAST_TALKED + jr nz, .ok + ldh a, [hLastTalked] +.ok + call DeleteObjectStruct + ldh a, [hMapObjectIndex] + ld b, 1 ; set + call ApplyEventActionAppearDisappear + farcall _UpdateSprites + ret + +ApplyEventActionAppearDisappear: + push bc + call GetMapObject + ld hl, MAPOBJECT_EVENT_FLAG + add hl, bc + pop bc + ld e, [hl] + inc hl + ld d, [hl] + ld a, -1 + cp e + jr nz, .okay + cp d + jr nz, .okay + xor a + ret +.okay + call EventFlagAction + ret + +Script_follow: + call GetScriptByte + call GetScriptObject + ld b, a + call GetScriptByte + call GetScriptObject + ld c, a + farcall StartFollow + ret + +Script_stopfollow: + farcall StopFollow + ret + +Script_moveobject: + call GetScriptByte + call GetScriptObject + ld b, a + call GetScriptByte + add 4 + ld d, a + call GetScriptByte + add 4 + ld e, a + farcall CopyDECoordsToMapObject + ret + +Script_writeobjectxy: + call GetScriptByte + call GetScriptObject + cp LAST_TALKED + jr nz, .ok + ldh a, [hLastTalked] +.ok + ld b, a + farcall WriteObjectXY + ret + +Script_follownotexact: + call GetScriptByte + call GetScriptObject + ld b, a + call GetScriptByte + call GetScriptObject + ld c, a + farcall FollowNotExact + ret + +Script_loademote: + call GetScriptByte + cp EMOTE_FROM_MEM + jr nz, .not_var_emote + ld a, [wScriptVar] +.not_var_emote + ld c, a + farcall LoadEmote + ret + +Script_showemote: + call GetScriptByte + ld [wScriptVar], a + call GetScriptByte + call GetScriptObject + cp LAST_TALKED + jr z, .ok + ldh [hLastTalked], a +.ok + call GetScriptByte + ld [wScriptDelay], a + ld b, BANK(ShowEmoteScript) + ld de, ShowEmoteScript + jp ScriptCall + +ShowEmoteScript: + loademote EMOTE_FROM_MEM + applymovementlasttalked .Show + pause 0 + applymovementlasttalked .Hide + end + +.Show: + show_emote + step_sleep 1 + step_end + +.Hide: + hide_emote + step_sleep 1 + step_end + +Script_earthquake: + ld hl, EarthquakeMovement + ld de, wEarthquakeMovementDataBuffer + ld bc, EarthquakeMovement.End - EarthquakeMovement + call CopyBytes + call GetScriptByte + ld [wEarthquakeMovementDataBuffer + 1], a + and %00111111 + ld [wEarthquakeMovementDataBuffer + 3], a + ld b, BANK(.script) + ld de, .script + jp ScriptCall + +.script + applymovement PLAYER, wEarthquakeMovementDataBuffer + end + +EarthquakeMovement: + step_shake 16 ; the 16 gets overwritten with the script byte + step_sleep 16 ; the 16 gets overwritten with the lower 6 bits of the script byte + step_end +.End + +Script_loadpikachudata: + ld hl, PIKACHU + call GetPokemonIDFromIndex + ld [wTempWildMonSpecies], a + ld a, 5 + ld [wCurPartyLevel], a + ret + +Script_randomwildmon: + xor a + ld [wBattleScriptFlags], a + ret + +Script_loadtemptrainer: + ld a, (1 << 7) | 1 + ld [wBattleScriptFlags], a + ld a, [wTempTrainerClass] + ld [wOtherTrainerClass], a + ld a, [wTempTrainerID] + ld [wOtherTrainerID], a + ret + +Script_loadwildmon: + ld a, (1 << 7) + ld [wBattleScriptFlags], a + call LoadScriptPokemonID + ld [wTempWildMonSpecies], a + call GetScriptByte + ld [wCurPartyLevel], a + ret + +Script_loadtrainer: + ld a, (1 << 7) | 1 + ld [wBattleScriptFlags], a + call GetScriptByte + ld [wOtherTrainerClass], a + call GetScriptByte + ld [wOtherTrainerID], a + ret + +Script_startbattle: + call BufferScreen + predef StartBattle + ld a, [wBattleResult] + and ~BATTLERESULT_BITMASK + ld [wScriptVar], a + ret + +Script_catchtutorial: + call GetScriptByte + ld [wBattleType], a + call BufferScreen + farcall CatchTutorial + jp Script_reloadmap + +Script_reloadmapafterbattle: + ld hl, wBattleScriptFlags + ld d, [hl] + ld [hl], 0 + ld a, [wBattleResult] + and ~BATTLERESULT_BITMASK + cp LOSE + jr nz, .notblackedout + ld b, BANK(Script_BattleWhiteout) + ld hl, Script_BattleWhiteout + jp ScriptJump + +.notblackedout + bit 0, d + jr z, .was_wild + farcall MomTriesToBuySomething + jr .done + +.was_wild + ld a, [wBattleResult] + bit BATTLERESULT_BOX_FULL, a + jr z, .done + ld b, BANK(Script_SpecialBillCall) + ld de, Script_SpecialBillCall + farcall LoadScriptBDE +.done + jp Script_reloadmap + +Script_reloadmap: + xor a + ld [wBattleScriptFlags], a + ld a, MAPSETUP_RELOADMAP + ldh [hMapEntryMethod], a + ld a, MAPSTATUS_ENTER + call LoadMapStatus + call StopScript + ret + +Script_scall: + ld a, [wScriptBank] + ld b, a + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + jr ScriptCall + +Script_farscall: + call GetScriptByte + ld b, a + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + jr ScriptCall + +Script_memcall: + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + ld b, [hl] + inc hl + ld e, [hl] + inc hl + ld d, [hl] + ; fallthrough + +ScriptCall: +; BUG: ScriptCall can overflow wScriptStack and crash (see docs/bugs_and_glitches.md) + + push de + ld hl, wScriptStackSize + ld e, [hl] + inc [hl] + ld d, 0 + ld hl, wScriptStack + add hl, de + add hl, de + add hl, de + pop de + ld a, [wScriptBank] + ld [hli], a + ld a, [wScriptPos] + ld [hli], a + ld a, [wScriptPos + 1] + ld [hl], a + ld a, b + ld [wScriptBank], a + ld a, e + ld [wScriptPos], a + ld a, d + ld [wScriptPos + 1], a + ret + +CallCallback:: + ld a, [wScriptBank] + or $80 + ld [wScriptBank], a + jp ScriptCall + +Script_sjump: + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + ld a, [wScriptBank] + ld b, a + jp ScriptJump + +Script_farsjump: + call GetScriptByte + ld b, a + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + jp ScriptJump + +Script_memjump: + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + ld b, [hl] + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + jp ScriptJump + +Script_iffalse: + ld a, [wScriptVar] + and a + jp nz, SkipTwoScriptBytes + jp Script_sjump + +Script_iftrue: + ld a, [wScriptVar] + and a + jp nz, Script_sjump + jp SkipTwoScriptBytes + +Script_ifequal: + call GetScriptByte + ld hl, wScriptVar + cp [hl] + jr z, Script_sjump + jr SkipTwoScriptBytes + +Script_ifnotequal: + call GetScriptByte + ld hl, wScriptVar + cp [hl] + jr nz, Script_sjump + jr SkipTwoScriptBytes + +Script_ifgreater: + ld a, [wScriptVar] + ld b, a + call GetScriptByte + cp b + jr c, Script_sjump + jr SkipTwoScriptBytes + +Script_ifless: + call GetScriptByte + ld b, a + ld a, [wScriptVar] + cp b + jr c, Script_sjump + jr SkipTwoScriptBytes + +Script_jumpstd: + call StdScript + jr ScriptJump + +Script_callstd: + call StdScript + ld d, h + ld e, l + jp ScriptCall + +StdScript: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld hl, StdScripts + add hl, de + add hl, de + add hl, de + ld a, BANK(StdScripts) + call GetFarByte + ld b, a + inc hl + ld a, BANK(StdScripts) + call GetFarWord + ret + +SkipTwoScriptBytes: + call GetScriptByte + call GetScriptByte + ret + +ScriptJump: + ld a, b + ld [wScriptBank], a + ld a, l + ld [wScriptPos], a + ld a, h + ld [wScriptPos + 1], a + ret + +Script_sdefer: + ld a, [wScriptBank] + ld [wDeferredScriptBank], a + call GetScriptByte + ld [wDeferredScriptAddr], a + call GetScriptByte + ld [wDeferredScriptAddr + 1], a + ld hl, wScriptFlags + set 3, [hl] + ret + +Script_checkscene: + call CheckScenes + jr z, .no_scene + ld [wScriptVar], a + ret + +.no_scene + ld a, $ff + ld [wScriptVar], a + ret + +Script_checkmapscene: + call GetScriptByte + ld b, a + call GetScriptByte + ld c, a + call GetMapSceneID + ld a, d + or e + jr z, .no_scene + ld a, [de] + ld [wScriptVar], a + ret + +.no_scene + ld a, $ff + ld [wScriptVar], a + ret + +Script_setscene: + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + jr DoScene + +Script_setmapscene: + call GetScriptByte + ld b, a + call GetScriptByte + ld c, a +DoScene: + call GetMapSceneID + ld a, d + or e + jr z, .no_scene + call GetScriptByte + ld [de], a +.no_scene + ret + +Script_readmem: + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + ld a, [hl] + ld [wScriptVar], a + ret + +Script_writemem: + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + ld a, [wScriptVar] + ld [hl], a + ret + +Script_loadmem: + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + call GetScriptByte + ld [hl], a + ret + +Script_setval: + call GetScriptByte + ld [wScriptVar], a + ret + +Script_addval: + call GetScriptByte + ld hl, wScriptVar + add [hl] + ld [hl], a + ret + +Script_random: + call GetScriptByte + ld [wScriptVar], a + and a + ret z + + ld c, a + call .Divide256byC + and a + jr z, .no_restriction ; 256 % b == 0 + ld b, a + xor a + sub b + ld b, a +.loop + push bc + call Random + pop bc + ldh a, [hRandomAdd] + cp b + jr nc, .loop + jr .finish + +.no_restriction + push bc + call Random + pop bc + ldh a, [hRandomAdd] + +.finish + push af + ld a, [wScriptVar] + ld c, a + pop af + call SimpleDivide + ld [wScriptVar], a + ret + +.Divide256byC: + xor a + ld b, a + sub c +.mod_loop + inc b + sub c + jr nc, .mod_loop + dec b + add c + ret + +Script_readvar: + call GetScriptByte + call GetVarAction + ld a, [de] + ld [wScriptVar], a + ret + +Script_writevar: + call GetScriptByte + call GetVarAction + ld a, [wScriptVar] + ld [de], a + ret + +Script_loadvar: + call GetScriptByte + call GetVarAction + call GetScriptByte + ld [de], a + ret + +GetVarAction: + ld c, a + farcall _GetVarAction + ret + +Script_checkver: + ld a, [.gs_version] + ld [wScriptVar], a + ret + +.gs_version: + db GS_VERSION + +Script_getmonname: + call LoadScriptPokemonID + ld [wNamedObjectIndex], a + call GetPokemonName + ld de, wStringBuffer1 + +GetStringBuffer: + call GetScriptByte + cp NUM_STRING_BUFFERS + jr c, .ok + xor a +.ok + +CopyConvertedText: + ld hl, wStringBuffer3 + ld bc, STRING_BUFFER_LENGTH + call AddNTimes + call CopyName2 + ret + +Script_getitemname: + call GetScriptByte + and a ; USE_SCRIPT_VAR + jr nz, .ok + ld a, [wScriptVar] +.ok + ld [wNamedObjectIndex], a + call GetItemName + ld de, wStringBuffer1 + jr GetStringBuffer + +Script_getcurlandmarkname: + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetWorldMapLocation + +ConvertLandmarkToText: + ld e, a + farcall GetLandmarkName + ld de, wStringBuffer1 + jp GetStringBuffer + +Script_getlandmarkname: + call GetScriptByte + jr ConvertLandmarkToText + +Script_gettrainername: + call GetScriptByte + ld c, a + call GetScriptByte + ld b, a + farcall GetTrainerName + jr GetStringBuffer + +Script_getname: + call GetScriptByte + ld [wNamedObjectType], a + +ContinueToGetName: + call GetScriptByte + ld [wCurSpecies], a + call GetName + ld de, wStringBuffer1 + jp GetStringBuffer + +Script_gettrainerclassname: + ld a, TRAINER_NAME + ld [wNamedObjectType], a + jr ContinueToGetName + +Script_getmoney: + call ResetStringBuffer1 + call GetMoneyAccount + ld hl, wStringBuffer1 + lb bc, PRINTNUM_LEFTALIGN | 3, 6 + call PrintNum + ld de, wStringBuffer1 + jp GetStringBuffer + +Script_getcoins: + call ResetStringBuffer1 + ld hl, wStringBuffer1 + ld de, wCoins + lb bc, PRINTNUM_LEFTALIGN | 2, 6 + call PrintNum + ld de, wStringBuffer1 + jp GetStringBuffer + +Script_getnum: + call ResetStringBuffer1 + ld de, wScriptVar + ld hl, wStringBuffer1 + lb bc, PRINTNUM_LEFTALIGN | 1, 3 + call PrintNum + ld de, wStringBuffer1 + jp GetStringBuffer + +ResetStringBuffer1: + ld hl, wStringBuffer1 + ld bc, NAME_LENGTH + ld a, "@" + call ByteFill + ret + +Script_getstring: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld a, [wScriptBank] + ld hl, CopyName1 + rst FarCall + ld de, wStringBuffer2 + jp GetStringBuffer + +Script_givepokemail: + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + ld a, [wScriptBank] + call GetFarByte + ld b, a + push bc + inc hl + ld bc, MAIL_MSG_LENGTH + ld de, wMonMailMessageBuffer + ld a, [wScriptBank] + call FarCopyBytes + pop bc + farcall GivePokeMail + ret + +Script_checkpokemail: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld a, [wScriptBank] + ld b, a + farcall CheckPokeMail + ret + +Script_giveitem: + call GetScriptByte + cp ITEM_FROM_MEM + jr nz, .ok + ld a, [wScriptVar] +.ok + ld [wCurItem], a + call GetScriptByte + ld [wItemQuantityChange], a + ld hl, wNumItems + call ReceiveItem + jr nc, .full + ld a, TRUE + ld [wScriptVar], a + ret +.full + xor a + ld [wScriptVar], a + ret + +Script_takeitem: + xor a + ld [wScriptVar], a + call GetScriptByte + ld [wCurItem], a + call GetScriptByte + ld [wItemQuantityChange], a + ld a, -1 + ld [wCurItemQuantity], a + ld hl, wNumItems + call TossItem + ret nc + ld a, TRUE + ld [wScriptVar], a + ret + +Script_checkitem: + xor a + ld [wScriptVar], a + call GetScriptByte + ld [wCurItem], a + ld hl, wNumItems + call CheckItem + ret nc + ld a, TRUE + ld [wScriptVar], a + ret + +Script_givemoney: + call GetMoneyAccount + call LoadMoneyAmountToMem + farcall GiveMoney + ret + +Script_takemoney: + call GetMoneyAccount + call LoadMoneyAmountToMem + farcall TakeMoney + ret + +Script_checkmoney: + call GetMoneyAccount + call LoadMoneyAmountToMem + farcall CompareMoney + +CompareMoneyAction: + jr c, .less + jr z, .exact + ld a, HAVE_MORE + jr .done +.exact + ld a, HAVE_AMOUNT + jr .done +.less + ld a, HAVE_LESS +.done + ld [wScriptVar], a + ret + +GetMoneyAccount: + call GetScriptByte + and a + ld de, wMoney ; YOUR_MONEY + ret z + ld de, wMomsMoney ; MOMS_MONEY + ret + +LoadMoneyAmountToMem: + ld bc, hMoneyTemp + push bc + call GetScriptByte + ld [bc], a + inc bc + call GetScriptByte + ld [bc], a + inc bc + call GetScriptByte + ld [bc], a + pop bc + ret + +Script_givecoins: + call LoadCoinAmountToMem + farcall GiveCoins + ret + +Script_takecoins: + call LoadCoinAmountToMem + farcall TakeCoins + ret + +Script_checkcoins: + call LoadCoinAmountToMem + farcall CheckCoins + jr CompareMoneyAction + +LoadCoinAmountToMem: + call GetScriptByte + ldh [hMoneyTemp + 1], a + call GetScriptByte + ldh [hMoneyTemp], a + ld bc, hMoneyTemp + ret + +Script_checktime: + xor a + ld [wScriptVar], a + farcall CheckTime + call GetScriptByte + and c + ret z + ld a, TRUE + ld [wScriptVar], a + ret + +Script_checkpoke: + xor a + ld [wScriptVar], a + call LoadScriptPokemonID + ld hl, wPartySpecies + ld de, 1 + call IsInArray + ret nc + ld a, TRUE + ld [wScriptVar], a + ret + +Script_addcellnum: + xor a + ld [wScriptVar], a + call GetScriptByte + ld c, a + farcall AddPhoneNumber + ret nc + ld a, TRUE + ld [wScriptVar], a + ret + +Script_delcellnum: + xor a + ld [wScriptVar], a + call GetScriptByte + ld c, a + farcall DelCellNum + ret nc + ld a, TRUE + ld [wScriptVar], a + ret + +Script_checkcellnum: +; returns false if the cell number is not in your phone + + xor a + ld [wScriptVar], a + call GetScriptByte + ld c, a + farcall CheckCellNum + ret nc + ld a, TRUE + ld [wScriptVar], a + ret + +Script_specialphonecall: + call GetScriptByte + ld [wSpecialPhoneCallID], a + call GetScriptByte + ld [wSpecialPhoneCallID + 1], a + ret + +Script_checkphonecall: +; returns false if no special phone call is stored + + ld a, [wSpecialPhoneCallID] + and a + jr z, .ok + ld a, TRUE +.ok + ld [wScriptVar], a + ret + +Script_givepoke: + call LoadScriptPokemonID + ld [wCurPartySpecies], a + call GetScriptByte + ld [wCurPartyLevel], a + call GetScriptByte + ld [wCurItem], a + call GetScriptByte + and a + ld b, a + jr z, .ok + ld hl, wScriptPos + ld e, [hl] + inc hl + ld d, [hl] + call GetScriptByte + call GetScriptByte + call GetScriptByte + call GetScriptByte +.ok + farcall GivePoke + ld a, b + ld [wScriptVar], a + ret + +Script_giveegg: +; if no room in the party, return 0 in wScriptVar; else, return 2 + + xor a ; PARTYMON + ld [wScriptVar], a + ld [wMonType], a + call LoadScriptPokemonID + ld [wCurPartySpecies], a + call GetScriptByte + ld [wCurPartyLevel], a + farcall GiveEgg + ret nc + ld a, 2 + ld [wScriptVar], a + ret + +Script_setevent: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld b, SET_FLAG + call EventFlagAction + ret + +Script_clearevent: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld b, RESET_FLAG + call EventFlagAction + ret + +Script_checkevent: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld b, CHECK_FLAG + call EventFlagAction + ld a, c + and a + jr z, .false + ld a, TRUE +.false + ld [wScriptVar], a + ret + +Script_setflag: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld b, SET_FLAG + call _EngineFlagAction + ret + +Script_clearflag: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld b, RESET_FLAG + call _EngineFlagAction + ret + +Script_checkflag: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld b, CHECK_FLAG + call _EngineFlagAction + ld a, c + and a + jr z, .false + ld a, TRUE +.false + ld [wScriptVar], a + ret + +_EngineFlagAction: + farcall EngineFlagAction + ret + +Script_wildoff: + ld hl, wStatusFlags + set STATUSFLAGS_NO_WILD_ENCOUNTERS_F, [hl] + ret + +Script_wildon: + ld hl, wStatusFlags + res STATUSFLAGS_NO_WILD_ENCOUNTERS_F, [hl] + ret + +Script_xycompare: + call GetScriptByte + ld [wXYComparePointer], a + call GetScriptByte + ld [wXYComparePointer + 1], a + ret + +Script_warpfacing: + call GetScriptByte + maskbits NUM_DIRECTIONS + ld c, a + ld a, [wPlayerSpriteSetupFlags] + set PLAYERSPRITESETUP_CUSTOM_FACING_F, a + or c + ld [wPlayerSpriteSetupFlags], a +; fallthrough + +Script_warp: +; This seems to be some sort of error handling case. + call GetScriptByte + and a + jr z, .not_ok + ld [wMapGroup], a + call GetScriptByte + ld [wMapNumber], a + call GetScriptByte + ld [wXCoord], a + call GetScriptByte + ld [wYCoord], a + ld a, SPAWN_N_A + ld [wDefaultSpawnpoint], a + ld a, MAPSETUP_WARP + ldh [hMapEntryMethod], a + ld a, MAPSTATUS_ENTER + call LoadMapStatus + call StopScript + ret + +.not_ok + call GetScriptByte + call GetScriptByte + call GetScriptByte + ld a, SPAWN_N_A + ld [wDefaultSpawnpoint], a + ld a, MAPSETUP_BADWARP + ldh [hMapEntryMethod], a + ld a, MAPSTATUS_ENTER + call LoadMapStatus + call StopScript + ret + +Script_warpmod: + call GetScriptByte + ld [wBackupWarpNumber], a + call GetScriptByte + ld [wBackupMapGroup], a + call GetScriptByte + ld [wBackupMapNumber], a + ret + +Script_blackoutmod: + call GetScriptByte + ld [wLastSpawnMapGroup], a + call GetScriptByte + ld [wLastSpawnMapNumber], a + ret + +Script_dontrestartmapmusic: + ld a, TRUE + ld [wDontPlayMapMusicOnReload], a + ret + +Script_writecmdqueue: + call GetScriptByte + ld e, a + call GetScriptByte + ld d, a + ld a, [wScriptBank] + ld b, a + farcall WriteCmdQueue ; no need to farcall + ret + +Script_delcmdqueue: + xor a + ld [wScriptVar], a + call GetScriptByte + ld b, a + farcall DelCmdQueue ; no need to farcall + ret c + ld a, TRUE + ld [wScriptVar], a + ret + +Script_changemapblocks: + call GetScriptByte + ld [wMapBlocksBank], a + call GetScriptByte + ld [wMapBlocksPointer], a + call GetScriptByte + ld [wMapBlocksPointer + 1], a + call ChangeMap + call BufferScreen + ret + +Script_changeblock: + call GetScriptByte + add 4 + ld d, a + call GetScriptByte + add 4 + ld e, a + call GetBlockLocation + call GetScriptByte + ld [hl], a + call BufferScreen + ret + +Script_reloadmappart:: + xor a + ldh [hBGMapMode], a + call OverworldTextModeSwitch + call GetMovementPermissions + farcall ReloadMapPart + call UpdateSprites + ret + +Script_warpcheck: + call WarpCheck + ret nc + farcall EnableEvents + ret + +Script_enableevents: ; unreferenced + farcall EnableEvents + ret + +Script_newloadmap: + call GetScriptByte + ldh [hMapEntryMethod], a + ld a, MAPSTATUS_ENTER + call LoadMapStatus + call StopScript + ret + +Script_reloadend: + call Script_newloadmap + jp Script_end + +Script_opentext: + call OpenText + ret + +Script_refreshscreen: + call RefreshScreen + call GetScriptByte + ret + +Script_writeunusedbyte: + call GetScriptByte + ld [wUnusedScriptByte], a + ret + +UnusedClosetextScript: ; unreferenced + closetext + +Script_closetext: + call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + call CloseText + ret + +Script_autoinput: + call GetScriptByte + push af + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + pop af + call StartAutoInput + ret + +Script_pause: + call GetScriptByte + and a + jr z, .loop + ld [wScriptDelay], a +.loop + ld c, 2 + call DelayFrames + ld hl, wScriptDelay + dec [hl] + jr nz, .loop + ret + +Script_deactivatefacing: + call GetScriptByte + and a + jr z, .no_time + ld [wScriptDelay], a +.no_time + ld a, SCRIPT_WAIT + ld [wScriptMode], a + call StopScript + ret + +Script_stopandsjump: + call StopScript + jp Script_sjump + +Script_end: + call ExitScriptSubroutine + jr c, .resume + ret + +.resume + xor a + ld [wScriptRunning], a + ld a, SCRIPT_OFF + ld [wScriptMode], a + ld hl, wScriptFlags + res 0, [hl] + call StopScript + ret + +Script_endcallback: + call ExitScriptSubroutine + jr c, .dummy +.dummy + ld hl, wScriptFlags + res 0, [hl] + call StopScript + ret + +ExitScriptSubroutine: +; Return carry if there's no parent to return to. + + ld hl, wScriptStackSize + ld a, [hl] + and a + jr z, .done + dec [hl] + ld e, [hl] + ld d, $0 + ld hl, wScriptStack + add hl, de + add hl, de + add hl, de + ld a, [hli] + ld b, a + and $7f + ld [wScriptBank], a + ld a, [hli] + ld e, a + ld [wScriptPos], a + ld a, [hl] + ld d, a + ld [wScriptPos + 1], a + and a + ret +.done + scf + ret + +Script_endall: + xor a + ld [wScriptStackSize], a + ld [wScriptRunning], a + ld a, SCRIPT_OFF + ld [wScriptMode], a + ld hl, wScriptFlags + res 0, [hl] + call StopScript + ret + +Script_halloffame: + ld hl, wGameTimerPaused + res GAME_TIMER_PAUSED_F, [hl] + farcall StubbedTrainerRankings_HallOfFame + farcall StubbedTrainerRankings_HallOfFame2 + farcall HallOfFame + ld hl, wGameTimerPaused + set GAME_TIMER_PAUSED_F, [hl] + jr ReturnFromCredits + +Script_credits: + farcall RedCredits +ReturnFromCredits: + call Script_endall + ld a, MAPSTATUS_DONE + call LoadMapStatus + call StopScript + ret + +Script_wait: + push bc + call GetScriptByte +.loop + push af + ld c, 6 + call DelayFrames + pop af + dec a + jr nz, .loop + pop bc + ret + +Script_checksave: + farcall CheckSave + ld a, c + ld [wScriptVar], a + ret + +Script_checkver_duplicate: ; unreferenced + ld a, [.gs_version] + ld [wScriptVar], a + ret + +.gs_version: + db GS_VERSION + +Script_loadmonindex: +; script command 0xaa + call LoadScriptPokemonID + ld [wScriptVar], a + ld c, a + call GetScriptByte + dec a + cp NUM_MAP_LOCKED_MON_IDS + ret nc + if LOCKED_MON_ID_MAP_1 > 1 + add a, LOCKED_MON_ID_MAP_1 + elif LOCKED_MON_ID_MAP_1 == 1 + inc a + endc + ld l, a + ld a, c + jp LockPokemonID + +Script_checkmaplockedmons: +; script command 0xab +; check if the script variable's value is one of the reserved map indexes + ld a, [wScriptVar] + and a + ret z + cp MON_TABLE_ENTRIES + 1 + ld c, 0 + jr nc, .done + ld b, a + ldh a, [rSVBK] + push af + ld a, BANK(wPokemonIndexTable) + ldh [rSVBK], a + ld hl, wPokemonIndexTableLockedEntries + LOCKED_MON_ID_MAP_1 +.loop + inc c + ld a, [hli] + cp b + jr z, .found + ld a, c + cp NUM_MAP_LOCKED_MON_IDS + jr c, .loop + ld c, 0 +.found + pop af + ldh [rSVBK], a +.done + ld a, c + ld [wScriptVar], a + ret + +LoadScriptPokemonID: + call GetScriptByte + ld l, a + call GetScriptByte + ld h, a + or l + jp nz, GetPokemonIDFromIndex + ld a, [wScriptVar] + ret diff --git a/engine/overworld/select_menu.asm b/engine/overworld/select_menu.asm new file mode 100644 index 0000000..bdd3633 --- /dev/null +++ b/engine/overworld/select_menu.asm @@ -0,0 +1,172 @@ +SelectMenu:: + call CheckRegisteredItem + jr c, .NotRegistered + jp UseRegisteredItem + +.NotRegistered: + call OpenText + ld b, BANK(MayRegisterItemText) + ld hl, MayRegisterItemText + call MapTextbox + call WaitButton + jp CloseText + +MayRegisterItemText: + text_far _MayRegisterItemText + text_end + +CheckRegisteredItem: + ld a, [wWhichRegisteredItem] + and a + jr z, .NoRegisteredItem + and REGISTERED_POCKET + rlca + rlca + ld hl, .Pockets + rst JumpTable + ret + +.Pockets: +; entries correspond to *_POCKET constants + dw .CheckItem + dw .CheckBall + dw .CheckKeyItem + dw .CheckTMHM + +.CheckItem: + ld hl, wNumItems + call .CheckRegisteredNo + jr c, .NoRegisteredItem + inc hl + ld e, a + ld d, 0 + add hl, de + add hl, de + call .IsSameItem + jr c, .NoRegisteredItem + and a + ret + +.CheckKeyItem: + ld a, [wRegisteredItem] + ld hl, wKeyItems + ld de, 1 + call IsInArray + jr nc, .NoRegisteredItem + ld a, [wRegisteredItem] + ld [wCurItem], a + and a + ret + +.CheckBall: + ld hl, wNumBalls + call .CheckRegisteredNo + jr nc, .NoRegisteredItem + inc hl + ld e, a + ld d, 0 + add hl, de + add hl, de + call .IsSameItem + jr c, .NoRegisteredItem + ret + +.CheckTMHM: + jr .NoRegisteredItem + +.NoRegisteredItem: + xor a + ld [wWhichRegisteredItem], a + ld [wRegisteredItem], a + scf + ret + +.CheckRegisteredNo: + ld a, [wWhichRegisteredItem] + and REGISTERED_NUMBER + dec a + cp [hl] + jr nc, .NotEnoughItems + ld [wCurItemQuantity], a + and a + ret + +.NotEnoughItems: + scf + ret + +.IsSameItem: + ld a, [wRegisteredItem] + cp [hl] + jr nz, .NotSameItem + ld [wCurItem], a + and a + ret + +.NotSameItem: + scf + ret + +UseRegisteredItem: + farcall CheckItemMenu + ld a, [wItemAttributeValue] + ld hl, .SwitchTo + rst JumpTable + ret + +.SwitchTo: +; entries correspond to ITEMMENU_* constants + dw .CantUse + dw .NoFunction + dw .NoFunction + dw .NoFunction + dw .Current + dw .Party + dw .Overworld + +.NoFunction: + call OpenText + call CantUseItem + call CloseText + and a + ret + +.Current: + call OpenText + call DoItemEffect + call CloseText + and a + ret + +.Party: + call RefreshScreen + call FadeToMenu + call DoItemEffect + call CloseSubmenu + call CloseText + and a + ret + +.Overworld: + call RefreshScreen + ld a, 1 + ld [wUsingItemWithSelect], a + call DoItemEffect + xor a + ld [wUsingItemWithSelect], a + ld a, [wItemEffectSucceeded] + cp 1 + jr nz, ._cantuse + scf + ld a, HMENURETURN_SCRIPT + ldh [hMenuReturn], a + ret + +.CantUse: + call RefreshScreen + +._cantuse + call CantUseItem + call CloseText + and a + ret diff --git a/engine/overworld/spawn_points.asm b/engine/overworld/spawn_points.asm new file mode 100644 index 0000000..33e4c96 --- /dev/null +++ b/engine/overworld/spawn_points.asm @@ -0,0 +1,58 @@ +INCLUDE "data/maps/spawn_points.asm" + +EnterMapSpawnPoint: + ; loads the spawn point in wDefaultSpawnpoint + push hl + push de + ld a, [wDefaultSpawnpoint] + cp SPAWN_N_A + jr z, .spawn_n_a + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld de, SpawnPoints + add hl, de + ld a, [hli] + ld [wMapGroup], a + ld a, [hli] + ld [wMapNumber], a + ld a, [hli] + ld [wXCoord], a + ld a, [hli] + ld [wYCoord], a +.spawn_n_a + pop de + pop hl + ret + +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 +.loop + ld a, [hl] + cp SPAWN_N_A + jr z, .nope + cp d + jr nz, .next + inc hl + ld a, [hld] + cp e + jr z, .yes + +.next + push bc + ld bc, 4 ; length of a spawn table entry + add hl, bc + pop bc + inc c + jr .loop + +.nope + and a + ret + +.yes + scf + ret diff --git a/engine/overworld/tile_events.asm b/engine/overworld/tile_events.asm new file mode 100644 index 0000000..d5d07c1 --- /dev/null +++ b/engine/overworld/tile_events.asm @@ -0,0 +1,101 @@ +CheckWarpCollision:: +; Is this tile a warp? + ld a, [wPlayerTile] + cp COLL_PIT + jr z, .warp + cp COLL_PIT_68 + jr z, .warp + and $f0 + cp HI_NYBBLE_WARPS + jr z, .warp + and a + ret + +.warp + scf + ret + +CheckDirectionalWarp:: +; If this is a directional warp, clear carry (press the designated button to warp). +; Else, set carry (immediate warp). + ld a, [wPlayerTile] + cp COLL_WARP_CARPET_DOWN + jr z, .directional + cp COLL_WARP_CARPET_LEFT + jr z, .directional + cp COLL_WARP_CARPET_UP + jr z, .directional + cp COLL_WARP_CARPET_RIGHT + jr z, .directional + scf + ret + +.directional + xor a + ret + +CheckWarpFacingDown: + ld de, 1 + ld hl, .blocks + ld a, [wPlayerTile] + call IsInArray + ret + +.blocks + db COLL_DOOR + db COLL_DOOR_79 + db COLL_STAIRCASE + db COLL_STAIRCASE_73 + db COLL_CAVE + db COLL_CAVE_74 + db COLL_WARP_PANEL + db COLL_DOOR_75 + db COLL_DOOR_7D + db -1 + +CheckGrassCollision:: + ld a, [wPlayerTile] + ld hl, .blocks + ld de, 1 + call IsInArray + ret + +.blocks + db COLL_CUT_08 + db COLL_TALL_GRASS + db COLL_LONG_GRASS + db COLL_CUT_28 + db COLL_WATER + db COLL_GRASS_48 + db COLL_GRASS_49 + db COLL_GRASS_4A + db COLL_GRASS_4B + db COLL_GRASS_4C + db -1 + +CheckCutCollision: + ld a, c + ld hl, .blocks + ld de, 1 + call IsInArray + ret + +.blocks + db COLL_CUT_TREE + db COLL_CUT_TREE_1A + db COLL_TALL_GRASS_10 + db COLL_TALL_GRASS + db COLL_LONG_GRASS + db COLL_LONG_GRASS_1C + db -1 + +GetWarpSFX:: + ld a, [wPlayerTile] + ld de, SFX_ENTER_DOOR + cp COLL_DOOR + ret z + ld de, SFX_WARP_TO + cp COLL_WARP_PANEL + ret z + ld de, SFX_EXIT_BUILDING + ret diff --git a/engine/overworld/time.asm b/engine/overworld/time.asm new file mode 100644 index 0000000..2003910 --- /dev/null +++ b/engine/overworld/time.asm @@ -0,0 +1,440 @@ +_InitializeStartDay: + call InitializeStartDay + ret + +ClearDailyTimers: + xor a + ld [wLuckyNumberDayTimer], a + ld [wUnusedTwoDayTimer], a + ld [wDailyResetTimer], a + ret + +InitCallReceiveDelay:: + xor a + ld [wTimeCyclesSinceLastCall], a + +NextCallReceiveDelay: + ld a, [wTimeCyclesSinceLastCall] + cp 3 + jr c, .okay + ld a, 3 + +.okay + ld e, a + ld d, 0 + ld hl, .ReceiveCallDelays + add hl, de + ld a, [hl] +if DEF(_DEBUG) + ld h, a + ld a, BANK(sDebugTimeCyclesSinceLastCall) + call OpenSRAM + ld a, [sDebugTimeCyclesSinceLastCall] + call CloseSRAM + dec a + cp 2 + jr nc, .debug_ok + xor 1 + ld h, a +.debug_ok + ld a, h +endc + jp RestartReceiveCallDelay + +.ReceiveCallDelays: + db 20, 10, 5, 3 + +CheckReceiveCallTimer: + call CheckReceiveCallDelay ; check timer + ret nc + ld hl, wTimeCyclesSinceLastCall + ld a, [hl] + cp 3 + jr nc, .ok + inc [hl] + +.ok + call NextCallReceiveDelay ; restart timer + scf + ret + +InitOneDayCountdown: + ld a, 1 + +InitNDaysCountdown: + ld [hl], a + push hl + call UpdateTime + pop hl + inc hl + call CopyDayToHL + ret + +CheckDayDependentEventHL: + inc hl + push hl + call CalcDaysSince + call GetDaysSince + pop hl + dec hl + call UpdateTimeRemaining + ret + +RestartReceiveCallDelay: + ld hl, wReceiveCallDelay_MinsRemaining + ld [hl], a + call UpdateTime + ld hl, wReceiveCallDelay_StartTime + call CopyDayHourMinToHL + ret + +CheckReceiveCallDelay: + ld hl, wReceiveCallDelay_StartTime + call CalcMinsHoursDaysSince + call GetMinutesSinceIfLessThan60 + ld hl, wReceiveCallDelay_MinsRemaining + call UpdateTimeRemaining + ret + +RestartDailyResetTimer: + ld hl, wDailyResetTimer + jp InitOneDayCountdown + +CheckDailyResetTimer:: + ld hl, wDailyResetTimer + call CheckDayDependentEventHL + ret nc + xor a + ld hl, wDailyFlags1 + ld [hli], a ; wDailyFlags1 + ld [hli], a ; wDailyFlags2 + ld [hli], a ; wSwarmFlags + ld [hl], a ; wSwarmFlags + 1 + ld hl, wDailyRematchFlags +rept 4 + ld [hli], a +endr + ld hl, wDailyPhoneItemFlags +rept 4 + ld [hli], a +endr + ld hl, wDailyPhoneTimeOfDayFlags +rept 4 + ld [hli], a +endr + ld hl, wKenjiBreakTimer + ld a, [hl] + and a + jr z, .RestartKenjiBreakCountdown + dec [hl] + jr nz, .DontRestartKenjiBreakCountdown +.RestartKenjiBreakCountdown: + call SampleKenjiBreakCountdown +.DontRestartKenjiBreakCountdown: + jr RestartDailyResetTimer + +SampleKenjiBreakCountdown: +; Generate a random number between 3 and 6 + call Random + and %11 + add 3 + ld [wKenjiBreakTimer], a + ret + +StartBugContestTimer: + ld a, BUG_CONTEST_MINUTES + ld [wBugContestMinsRemaining], a + ld a, BUG_CONTEST_SECONDS + ld [wBugContestSecsRemaining], a + call UpdateTime + ld hl, wBugContestStartTime + call CopyDayHourMinSecToHL + ret + +CheckBugContestTimer:: + ld hl, wBugContestStartTime + call CalcSecsMinsHoursDaysSince + ld a, [wDaysSince] + and a + jr nz, .timed_out + ld a, [wHoursSince] + and a + jr nz, .timed_out + ld a, [wSecondsSince] + ld b, a + ld a, [wBugContestSecsRemaining] + sub b + jr nc, .okay + add 60 + +.okay + ld [wBugContestSecsRemaining], a + ld a, [wMinutesSince] + ld b, a + ld a, [wBugContestMinsRemaining] + sbc b + ld [wBugContestMinsRemaining], a + jr c, .timed_out + and a + ret + +.timed_out + xor a + ld [wBugContestMinsRemaining], a + ld [wBugContestSecsRemaining], a + scf + ret + +InitializeStartDay: + call UpdateTime + ld hl, wTimerEventStartDay + call CopyDayToHL + ret + +CheckPokerusTick:: + ld hl, wTimerEventStartDay + call CalcDaysSince + call GetDaysSince + and a + jr z, .done ; not even a day has passed since game start + ld b, a + farcall ApplyPokerusTick +.done + xor a + ret + +SetUnusedTwoDayTimer: ; unreferenced + ld a, 2 + ld hl, wUnusedTwoDayTimer + ld [hl], a + call UpdateTime + ld hl, wUnusedTwoDayTimerStartDate + call CopyDayToHL + ret + +CheckUnusedTwoDayTimer: + ld hl, wUnusedTwoDayTimerStartDate + call CalcDaysSince + call GetDaysSince + ld hl, wUnusedTwoDayTimer + call UpdateTimeRemaining + ret + +UnusedSetSwarmFlag: ; unreferenced + ld hl, wDailyFlags1 + set DAILYFLAGS1_FISH_SWARM_F, [hl] + ret + +UnusedCheckSwarmFlag: ; unreferenced + and a + ld hl, wDailyFlags1 + bit DAILYFLAGS1_FISH_SWARM_F, [hl] + ret nz + scf + ret + +RestartLuckyNumberCountdown: + call .GetDaysUntilNextFriday + ld hl, wLuckyNumberDayTimer + jp InitNDaysCountdown + +.GetDaysUntilNextFriday: + call GetWeekday + ld c, a + ld a, FRIDAY + sub c + jr z, .friday_saturday + jr nc, .earlier ; could have done "ret nc" + +.friday_saturday + add 7 + +.earlier + ret + +_CheckLuckyNumberShowFlag: + ld hl, wLuckyNumberDayTimer + jp CheckDayDependentEventHL + +DoMysteryGiftIfDayHasPassed: + ld a, BANK(sMysteryGiftTimer) + call OpenSRAM + ld hl, sMysteryGiftTimer + ld a, [hli] + ld [wTempMysteryGiftTimer], a + ld a, [hl] + ld [wTempMysteryGiftTimer + 1], a + call CloseSRAM + + ld hl, wTempMysteryGiftTimer + call CheckDayDependentEventHL + jr nc, .not_timed_out + ld hl, wTempMysteryGiftTimer + call InitOneDayCountdown + call CloseSRAM + farcall ResetDailyMysteryGiftLimitIfUnlocked + +.not_timed_out + ld a, BANK(sMysteryGiftTimer) + call OpenSRAM + ld hl, wTempMysteryGiftTimer + ld a, [hli] + ld [sMysteryGiftTimer], a + ld a, [hl] + ld [sMysteryGiftTimer + 1], a + call CloseSRAM + ret + +UpdateTimeRemaining: +; If the amount of time elapsed exceeds the capacity of its +; unit, skip this part. + cp -1 + jr z, .set_carry + ld c, a + ld a, [hl] ; time remaining + sub c + jr nc, .ok + xor a + +.ok + ld [hl], a + jr z, .set_carry + xor a + ret + +.set_carry + xor a + ld [hl], a + scf + ret + +GetSecondsSinceIfLessThan60: ; unreferenced + ld a, [wDaysSince] + and a + jr nz, GetTimeElapsed_ExceedsUnitLimit + ld a, [wHoursSince] + and a + jr nz, GetTimeElapsed_ExceedsUnitLimit + ld a, [wMinutesSince] + jr nz, GetTimeElapsed_ExceedsUnitLimit + ld a, [wSecondsSince] + ret + +GetMinutesSinceIfLessThan60: + ld a, [wDaysSince] + and a + jr nz, GetTimeElapsed_ExceedsUnitLimit + ld a, [wHoursSince] + and a + jr nz, GetTimeElapsed_ExceedsUnitLimit + ld a, [wMinutesSince] + ret + +GetHoursSinceIfLessThan24: ; unreferenced + ld a, [wDaysSince] + and a + jr nz, GetTimeElapsed_ExceedsUnitLimit + ld a, [wHoursSince] + ret + +GetDaysSince: + ld a, [wDaysSince] + ret + +GetTimeElapsed_ExceedsUnitLimit: + ld a, -1 + ret + +CalcDaysSince: + xor a + jr _CalcDaysSince + +CalcHoursDaysSince: ; unreferenced + inc hl + xor a + jr _CalcHoursDaysSince + +CalcMinsHoursDaysSince: + inc hl + inc hl + xor a + jr _CalcMinsHoursDaysSince + +CalcSecsMinsHoursDaysSince: + inc hl + inc hl + inc hl + ldh a, [hSeconds] + ld c, a + sub [hl] + jr nc, .skip + add 60 +.skip + ld [hl], c ; current seconds + dec hl + ld [wSecondsSince], a ; seconds since + +_CalcMinsHoursDaysSince: + ldh a, [hMinutes] + ld c, a + sbc [hl] + jr nc, .skip + add 60 +.skip + ld [hl], c ; current minutes + dec hl + ld [wMinutesSince], a ; minutes since + +_CalcHoursDaysSince: + ldh a, [hHours] + ld c, a + sbc [hl] + jr nc, .skip + add MAX_HOUR +.skip + ld [hl], c ; current hours + dec hl + ld [wHoursSince], a ; hours since + +_CalcDaysSince: + ld a, [wCurDay] + ld c, a + sbc [hl] + jr nc, .skip + add 20 * 7 +.skip + ld [hl], c ; current days + ld [wDaysSince], a ; days since + ret + +CopyDayHourMinSecToHL: + ld a, [wCurDay] + ld [hli], a + ldh a, [hHours] + ld [hli], a + ldh a, [hMinutes] + ld [hli], a + ldh a, [hSeconds] + ld [hli], a + ret + +CopyDayToHL: + ld a, [wCurDay] + ld [hl], a + ret + +CopyDayHourToHL: ; unreferenced + ld a, [wCurDay] + ld [hli], a + ldh a, [hHours] + ld [hli], a + ret + +CopyDayHourMinToHL: + ld a, [wCurDay] + ld [hli], a + ldh a, [hHours] + ld [hli], a + ldh a, [hMinutes] + ld [hli], a + ret diff --git a/engine/overworld/variables.asm b/engine/overworld/variables.asm new file mode 100644 index 0000000..99fb310 --- /dev/null +++ b/engine/overworld/variables.asm @@ -0,0 +1,155 @@ +_GetVarAction:: + ld a, c + cp NUM_VARS + jr c, .valid + xor a +.valid + ld c, a + ld b, 0 + ld hl, .VarActionTable + add hl, bc + add hl, bc + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + inc hl + ld b, [hl] + ld a, b + and RETVAR_EXECUTE + jr nz, .call + ld a, b + and RETVAR_ADDR_DE + ret nz + ld a, [de] + jr .loadstringbuffer2 + +.call + call _de_ + ret + +.loadstringbuffer2 + ld de, wStringBuffer2 + ld [de], a + ret + +.VarActionTable: +; entries correspond to VAR_* constants + ; RETVAR_STRBUF2: copy [de] to wStringBuffer2 + ; RETVAR_ADDR_DE: return address in de + ; RETVAR_EXECUTE: call function + dwb wStringBuffer2, RETVAR_STRBUF2 + dwb wPartyCount, RETVAR_STRBUF2 + dwb .BattleResult, RETVAR_EXECUTE + dwb wBattleType, RETVAR_ADDR_DE + dwb wTimeOfDay, RETVAR_STRBUF2 + dwb .CountCaughtMons, RETVAR_EXECUTE + dwb .CountSeenMons, RETVAR_EXECUTE + dwb .CountBadges, RETVAR_EXECUTE + dwb wPlayerState, RETVAR_ADDR_DE + dwb .PlayerFacing, RETVAR_EXECUTE + dwb hHours, RETVAR_STRBUF2 + dwb .DayOfWeek, RETVAR_EXECUTE + dwb wMapGroup, RETVAR_STRBUF2 + dwb wMapNumber, RETVAR_STRBUF2 + dwb .UnownCaught, RETVAR_EXECUTE + dwb wEnvironment, RETVAR_STRBUF2 + dwb .BoxFreeSpace, RETVAR_EXECUTE + dwb wBugContestMinsRemaining, RETVAR_STRBUF2 + dwb wXCoord, RETVAR_STRBUF2 + dwb wYCoord, RETVAR_STRBUF2 + dwb wSpecialPhoneCallID, RETVAR_STRBUF2 + dwb wNrOfBeatenBattleTowerTrainers, RETVAR_STRBUF2 + dwb wKurtApricornQuantity, RETVAR_STRBUF2 + dwb wCurCaller, RETVAR_ADDR_DE + dwb wBlueCardBalance, RETVAR_ADDR_DE + dwb wBuenasPassword, RETVAR_ADDR_DE + dwb wKenjiBreakTimer, RETVAR_STRBUF2 + dwb .CountUncaughtMons, RETVAR_EXECUTE + +.CountCaughtMons: +; Caught mons. Saturate at 255. + ld hl, wPokedexCaught +.count_caught_or_seen_mons + ld bc, wEndPokedexCaught - wPokedexCaught + call CountSetBits16 + ld a, b +.load_or_saturate + add a, -1 + sbc a + or c + jp .loadstringbuffer2 + +.CountSeenMons: +; Seen mons. Saturate at 255. + ld hl, wPokedexSeen + jr .count_caught_or_seen_mons + +.CountUncaughtMons: +; Mons left to catch. Saturate at 255. + ld hl, wPokedexCaught + ld bc, wEndPokedexCaught - wPokedexCaught + call CountSetBits16 + ld a, LOW(NUM_POKEMON) + sub c + ld c, a + ld a, HIGH(NUM_POKEMON) + sbc b + jr .load_or_saturate + +.CountBadges: +; Number of owned badges. + ld hl, wBadges + ld b, 2 + call CountSetBits + ld a, [wNumSetBits] + jp .loadstringbuffer2 + +.PlayerFacing: +; The direction the player is facing. + ld a, [wPlayerDirection] + and $c + rrca + rrca + jp .loadstringbuffer2 + +.DayOfWeek: +; The day of the week. + call GetWeekday + jp .loadstringbuffer2 + +.UnownCaught: +; Number of unique Unown caught. + call .count_unown + ld a, b + jp .loadstringbuffer2 + +.count_unown + ld hl, wUnownDex + ld b, 0 +.loop + ld a, [hli] + and a + ret z + inc b + ld a, b + cp NUM_UNOWN + jr c, .loop + ret + +.BoxFreeSpace: +; Remaining slots in the current box. + ld a, BANK(sBoxCount) + call OpenSRAM + ld hl, sBoxCount + ld a, MONS_PER_BOX + sub [hl] + ld b, a + call CloseSRAM + ld a, b + jp .loadstringbuffer2 + +.BattleResult: + ld a, [wBattleResult] + and ~BATTLERESULT_BITMASK + jp .loadstringbuffer2 diff --git a/engine/overworld/warp_connection.asm b/engine/overworld/warp_connection.asm new file mode 100644 index 0000000..2b9c5a3 --- /dev/null +++ b/engine/overworld/warp_connection.asm @@ -0,0 +1,445 @@ +HandleNewMap: + call ClearUnusedMapBuffer + call ResetMapBufferEventFlags + call ResetFlashIfOutOfCave + call GetCurrentMapSceneID + call ResetBikeFlags + call ResetMapLockedIDs + ld a, MAPCALLBACK_NEWMAP + call RunMapCallback +HandleContinueMap: + farcall ClearCmdQueue + ld a, MAPCALLBACK_CMDQUEUE + call RunMapCallback + call GetMapTimeOfDay + ld [wMapTimeOfDay], a + ret + +ResetMapLockedIDs: + ld e, NUM_MAP_LOCKED_MON_IDS +.mon_loop + ld a, LOCKED_MON_ID_MAP_1 - 1 + add a, e + ld l, a + xor a + call LockPokemonID + dec e + jr nz, .mon_loop + ret + +EnterMapConnection: +; Return carry if a connection has been entered. + ld a, [wPlayerStepDirection] + and a ; DOWN + jp z, .south + cp UP + jp z, .north + cp LEFT + jp z, .west + cp RIGHT + jp z, .east + ret + +.west + ld a, [wWestConnectedMapGroup] + ld [wMapGroup], a + ld a, [wWestConnectedMapNumber] + ld [wMapNumber], a + ld a, [wWestConnectionStripXOffset] + ld [wXCoord], a + ld a, [wWestConnectionStripYOffset] + ld hl, wYCoord + add [hl] + ld [hl], a + ld c, a + ld hl, wWestConnectionWindow + ld a, [hli] + ld h, [hl] + ld l, a + srl c + jr z, .skip_to_load + ld a, [wWestConnectedMapWidth] + add 6 + ld e, a + ld d, 0 + +.loop + add hl, de + dec c + jr nz, .loop + +.skip_to_load + ld a, l + ld [wOverworldMapAnchor], a + ld a, h + ld [wOverworldMapAnchor + 1], a + jp .done + +.east + ld a, [wEastConnectedMapGroup] + ld [wMapGroup], a + ld a, [wEastConnectedMapNumber] + ld [wMapNumber], a + ld a, [wEastConnectionStripXOffset] + ld [wXCoord], a + ld a, [wEastConnectionStripYOffset] + ld hl, wYCoord + add [hl] + ld [hl], a + ld c, a + ld hl, wEastConnectionWindow + ld a, [hli] + ld h, [hl] + ld l, a + srl c + jr z, .skip_to_load2 + ld a, [wEastConnectedMapWidth] + add 6 + ld e, a + ld d, 0 + +.loop2 + add hl, de + dec c + jr nz, .loop2 + +.skip_to_load2 + ld a, l + ld [wOverworldMapAnchor], a + ld a, h + ld [wOverworldMapAnchor + 1], a + jp .done + +.north + ld a, [wNorthConnectedMapGroup] + ld [wMapGroup], a + ld a, [wNorthConnectedMapNumber] + ld [wMapNumber], a + ld a, [wNorthConnectionStripYOffset] + ld [wYCoord], a + ld a, [wNorthConnectionStripXOffset] + ld hl, wXCoord + add [hl] + ld [hl], a + ld c, a + ld hl, wNorthConnectionWindow + ld a, [hli] + ld h, [hl] + ld l, a + ld b, 0 + srl c + add hl, bc + ld a, l + ld [wOverworldMapAnchor], a + ld a, h + ld [wOverworldMapAnchor + 1], a + jp .done + +.south + ld a, [wSouthConnectedMapGroup] + ld [wMapGroup], a + ld a, [wSouthConnectedMapNumber] + ld [wMapNumber], a + ld a, [wSouthConnectionStripYOffset] + ld [wYCoord], a + ld a, [wSouthConnectionStripXOffset] + ld hl, wXCoord + add [hl] + ld [hl], a + ld c, a + ld hl, wSouthConnectionWindow + ld a, [hli] + ld h, [hl] + ld l, a + ld b, 0 + srl c + add hl, bc + ld a, l + ld [wOverworldMapAnchor], a + ld a, h + ld [wOverworldMapAnchor + 1], a +.done + scf + ret + +EnterMapWarp: + call .SaveDigWarp + call .SetSpawn + ld a, [wNextWarp] + ld [wWarpNumber], a + ld a, [wNextMapGroup] + ld [wMapGroup], a + ld a, [wNextMapNumber] + ld [wMapNumber], a + ret + +.SaveDigWarp: + call GetMapEnvironment + call CheckOutdoorMap + ret nz + ld a, [wNextMapGroup] + ld b, a + ld a, [wNextMapNumber] + ld c, a + call GetAnyMapEnvironment + call CheckIndoorMap + ret nz + +; MOUNT_MOON_SQUARE and TIN_TOWER_ROOF are outdoor maps within indoor maps. +; Dig and Escape Rope should not take you to them. + ld a, [wPrevMapGroup] + cp GROUP_MOUNT_MOON_SQUARE + jr nz, .not_mt_moon_square_or_tin_tower_roof + assert GROUP_MOUNT_MOON_SQUARE == GROUP_TIN_TOWER_ROOF + ld a, [wPrevMapNumber] + cp MAP_MOUNT_MOON_SQUARE + ret z + cp MAP_TIN_TOWER_ROOF + ret z +.not_mt_moon_square_or_tin_tower_roof + + ld a, [wPrevWarp] + ld [wDigWarpNumber], a + ld a, [wPrevMapGroup] + ld [wDigMapGroup], a + ld a, [wPrevMapNumber] + ld [wDigMapNumber], a + ret + +.SetSpawn: + call GetMapEnvironment + call CheckOutdoorMap + ret nz + ld a, [wNextMapGroup] + ld b, a + ld a, [wNextMapNumber] + ld c, a + call GetAnyMapEnvironment + call CheckIndoorMap + ret nz + ld a, [wNextMapGroup] + ld b, a + ld a, [wNextMapNumber] + ld c, a + +; Respawn in Pokémon Centers. + call GetAnyMapTileset + ld a, c + cp TILESET_POKECENTER + jr z, .pokecenter_pokecom + cp TILESET_POKECOM_CENTER + jr z, .pokecenter_pokecom + ret +.pokecenter_pokecom + + ld a, [wPrevMapGroup] + ld [wLastSpawnMapGroup], a + ld a, [wPrevMapNumber] + ld [wLastSpawnMapNumber], a + ret + +LoadMapTimeOfDay: + ld hl, wVramState + res 6, [hl] + ld a, $1 + ld [wSpriteUpdatesEnabled], a + farcall ReplaceTimeOfDayPals + farcall UpdateTimeOfDayPal + call OverworldTextModeSwitch + call .ClearBGMap + call .PushAttrmap + ret + +.ClearBGMap: + ld a, HIGH(vBGMap0) + ld [wBGMapAnchor + 1], a + xor a ; LOW(vBGMap0) + ld [wBGMapAnchor], a + ldh [hSCY], a + ldh [hSCX], a + farcall ApplyBGMapAnchorToObjects + + ldh a, [rVBK] + push af + ld a, $1 + ldh [rVBK], a + + xor a + ld bc, vBGMap1 - vBGMap0 + hlbgcoord 0, 0 + call ByteFill + + pop af + ldh [rVBK], a + + ld a, "■" + ld bc, vBGMap1 - vBGMap0 + hlbgcoord 0, 0 + call ByteFill + ret + +.PushAttrmap: + decoord 0, 0 + call .copy + ldh a, [hCGB] + and a + ret z + + decoord 0, 0, wAttrmap + ld a, $1 + ldh [rVBK], a +.copy + hlbgcoord 0, 0 + ld c, SCREEN_WIDTH + ld b, SCREEN_HEIGHT +.row + push bc +.column + ld a, [de] + inc de + ld [hli], a + dec c + jr nz, .column + ld bc, BG_MAP_WIDTH - SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + ld a, $0 + ldh [rVBK], a + ret + +LoadMapGraphics: + call LoadMapTileset + call LoadTilesetGFX + xor a + ldh [hMapAnims], a + xor a + ldh [hTileAnimFrame], a + farcall RefreshSprites + call LoadFontsExtra + farcall LoadOverworldFont + ret + +LoadMapPalettes: + ld b, SCGB_MAPPALS + jp GetSGBLayout + +RefreshMapSprites: + call ClearSprites + farcall InitMapNameSign + call GetMovementPermissions + farcall RefreshPlayerSprite + farcall CheckUpdatePlayerSprite + ld hl, wPlayerSpriteSetupFlags + bit PLAYERSPRITESETUP_SKIP_RELOAD_GFX_F, [hl] + jr nz, .skip + ld hl, wVramState + set 0, [hl] + call SafeUpdateSprites +.skip + ld a, [wPlayerSpriteSetupFlags] + and (1 << PLAYERSPRITESETUP_FEMALE_TO_MALE_F) | (1 << 3) | (1 << 4) + ld [wPlayerSpriteSetupFlags], a + ret + +CheckMovingOffEdgeOfMap:: + ld a, [wPlayerStepDirection] + cp STANDING + ret z + and a ; DOWN + jr z, .down + cp UP + jr z, .up + cp LEFT + jr z, .left + cp RIGHT + jr z, .right + and a + ret + +.down + ld a, [wPlayerMapY] + sub 4 + ld b, a + ld a, [wMapHeight] + add a + cp b + jr z, .ok + and a + ret + +.up + ld a, [wPlayerMapY] + sub 4 + cp -1 + jr z, .ok + and a + ret + +.left + ld a, [wPlayerMapX] + sub 4 + cp -1 + jr z, .ok + and a + ret + +.right + ld a, [wPlayerMapX] + sub 4 + ld b, a + ld a, [wMapWidth] + add a + cp b + jr z, .ok + and a + ret + +.ok + scf + ret + +GetMapScreenCoords:: + ld hl, wOverworldMapBlocks + ld a, [wXCoord] + bit 0, a + jr nz, .odd_x +; even x + srl a + add 1 + jr .got_block_x +.odd_x + add 1 + srl a +.got_block_x + ld c, a + ld b, 0 + add hl, bc + ld a, [wMapWidth] + add MAP_CONNECTION_PADDING_WIDTH * 2 + ld c, a + ld b, 0 + ld a, [wYCoord] + bit 0, a + jr nz, .odd_y +; even y + srl a + add 1 + jr .got_block_y +.odd_y + add 1 + srl a +.got_block_y + call AddNTimes + ld a, l + ld [wOverworldMapAnchor], a + ld a, h + ld [wOverworldMapAnchor + 1], a + ld a, [wYCoord] + and 1 + ld [wPlayerMetatileY], a + ld a, [wXCoord] + and 1 + ld [wPlayerMetatileX], a + ret diff --git a/engine/overworld/wildmons.asm b/engine/overworld/wildmons.asm new file mode 100644 index 0000000..1a0d2b0 --- /dev/null +++ b/engine/overworld/wildmons.asm @@ -0,0 +1,1004 @@ +LoadWildMonData: + call _GrassWildmonLookup + jr c, .copy + ld hl, wMornEncounterRate + xor a + ld [hli], a + ld [hli], a + ld [hl], a + jr .done_copy + +.copy + inc hl + inc hl + ld de, wMornEncounterRate + ld bc, 3 + call CopyBytes +.done_copy + call _WaterWildmonLookup + ld a, 0 + jr nc, .no_copy + inc hl + inc hl + ld a, [hl] +.no_copy + ld [wWaterEncounterRate], a + ret + +FindNest: +; Parameters: +; e: 0 = Johto, 1 = Kanto +; wNamedObjectIndex: species + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + xor a + call ByteFill + ld a, [wNamedObjectIndex] + call GetPokemonIndexFromID + ld b, h + ld c, l + ld a, e + and a + jr nz, .kanto + decoord 0, 0 + ld hl, JohtoGrassWildMons + call .FindGrass + ld hl, JohtoWaterWildMons + call .FindWater + call .RoamMon1 + call .RoamMon2 + ret + +.kanto + decoord 0, 0 + ld hl, KantoGrassWildMons + call .FindGrass + ld hl, KantoWaterWildMons + jp .FindWater + +.FindGrass: + ld a, [hl] + cp -1 + ret z + push bc + push hl + ; use the math buffers as storage, since we're not doing any math + ld a, [hli] + ldh [hMathBuffer], a + ld a, [hli] + ldh [hMathBuffer + 1], a + inc hl + inc hl + inc hl + ld a, NUM_GRASSMON * 3 + call .SearchMapForMon + jr nc, .next_grass + ld [de], a + inc de + +.next_grass + pop hl + ld bc, GRASS_WILDDATA_LENGTH + add hl, bc + pop bc + jr .FindGrass + +.FindWater: + ld a, [hl] + cp -1 + ret z + push bc + push hl + ; use the math buffers as storage, since we're not doing any math + ld a, [hli] + ldh [hMathBuffer], a + ld a, [hli] + ldh [hMathBuffer + 1], a + inc hl + ld a, NUM_WATERMON + call .SearchMapForMon + jr nc, .next_water + ld [de], a + inc de + +.next_water + pop hl + ld bc, WATER_WILDDATA_LENGTH + add hl, bc + pop bc + jr .FindWater + +.SearchMapForMon: + inc hl +.ScanMapLoop: + push af + ld a, [hli] + cp c + ld a, [hli] + jr nz, .next_mon + cp b + jr z, .found +.next_mon + inc hl + pop af + dec a + jr nz, .ScanMapLoop + and a + ret + +.found + pop af + ldh a, [hMathBuffer] + ld b, a + ldh a, [hMathBuffer + 1] + ld c, a + +.AppendNest: + push de + call GetWorldMapLocation + ld c, a + hlcoord 0, 0 + ld de, SCREEN_WIDTH * SCREEN_HEIGHT +.AppendNestLoop: + ld a, [hli] + cp c + jr z, .found_nest + dec de + ld a, e + or d + jr nz, .AppendNestLoop + ld a, c + pop de + scf + ret + +.found_nest + pop de + and a + ret + +.RoamMon1: + ld a, [wRoamMon1Species] + ld b, a + ld a, [wNamedObjectIndex] + cp b + ret nz + ld a, [wRoamMon1MapGroup] + ld b, a + ld a, [wRoamMon1MapNumber] + ld c, a + call .AppendNest + ret nc + ld [de], a + inc de + ret + +.RoamMon2: + ld a, [wRoamMon2Species] + ld b, a + ld a, [wNamedObjectIndex] + cp b + ret nz + ld a, [wRoamMon2MapGroup] + ld b, a + ld a, [wRoamMon2MapNumber] + ld c, a + call .AppendNest + ret nc + ld [de], a + inc de + ret + +TryWildEncounter:: +; Try to trigger a wild encounter. + call .EncounterRate + jr nc, .no_battle + call ChooseWildEncounter + jr nz, .no_battle + call CheckRepelEffect + jr nc, .no_battle + xor a + ret + +.no_battle + xor a ; BATTLETYPE_NORMAL + ld [wTempWildMonSpecies], a + ld [wBattleType], a + ld a, 1 + and a + ret + +.EncounterRate: + call GetMapEncounterRate + call ApplyMusicEffectOnEncounterRate + call ApplyCleanseTagEffectOnEncounterRate + call Random + cp b + ret + +GetMapEncounterRate: + ld hl, wMornEncounterRate + call CheckOnWater + ld a, wWaterEncounterRate - wMornEncounterRate + jr z, .ok + ld a, [wTimeOfDay] +.ok + ld c, a + ld b, 0 + add hl, bc + ld b, [hl] + ret + +ApplyMusicEffectOnEncounterRate:: +; Pokemon March and Ruins of Alph signal double encounter rate. +; Pokemon Lullaby halves encounter rate. + ld a, [wMapMusic] + cp MUSIC_POKEMON_MARCH + jr z, .double + cp MUSIC_RUINS_OF_ALPH_RADIO + jr z, .double + cp MUSIC_POKEMON_LULLABY + ret nz + srl b + ret + +.double + sla b + ret + +ApplyCleanseTagEffectOnEncounterRate:: +; Cleanse Tag halves encounter rate. + ld hl, wPartyMon1Item + ld de, PARTYMON_STRUCT_LENGTH + ld a, [wPartyCount] + ld c, a +.loop + ld a, [hl] + cp CLEANSE_TAG + jr z, .cleansetag + add hl, de + dec c + jr nz, .loop + ret + +.cleansetag + srl b + ret + +ChooseWildEncounter: + call LoadWildMonDataPointer + jp nc, .nowildbattle + call CheckEncounterRoamMon + jp c, .startwildbattle + + inc hl + inc hl + inc hl + call CheckOnWater + ld de, WaterMonProbTable + jr z, .watermon + inc hl + inc hl + ld a, [wTimeOfDay] + ld bc, NUM_GRASSMON * 3 + call AddNTimes + ld de, GrassMonProbTable + +.watermon +; hl contains the pointer to the wild mon data, let's save that to the stack + push hl +.randomloop + call Random + cp 100 + jr nc, .randomloop + inc a ; 1 <= a <= 100 + ld b, a + ld h, d + ld l, e +; This next loop chooses which mon to load up. +.prob_bracket_loop + ld a, [hli] + cp b + jr nc, .got_it + inc hl + jr .prob_bracket_loop + +.got_it + ld c, [hl] + ld b, 0 + pop hl + add hl, bc ; this selects our mon + ld a, [hli] + ld b, a +; If the Pokemon is encountered by surfing, we need to give the levels some variety. + call CheckOnWater + jr nz, .ok +; Check if we buff the wild mon, and by how much. + call Random + cp 35 percent + jr c, .ok + inc b + cp 65 percent + jr c, .ok + inc b + cp 85 percent + jr c, .ok + inc b + cp 95 percent + jr c, .ok + inc b +; Store the level +.ok + ld a, b + ld [wCurPartyLevel], a + + ld a, [hli] + ld h, [hl] + ld l, a + call ValidateTempWildMonSpecies + jr c, .nowildbattle + + ld a, l + sub LOW(UNOWN) + jr nz, .done + if HIGH(UNOWN) > 1 + ld a, h + cp HIGH(UNOWN) + elif HIGH(UNOWN) == 1 + ld a, h + dec a + else + or h + endc + jr nz, .done + + ld a, [wUnlockedUnowns] + and a + jr z, .nowildbattle + +.done + call GetPokemonIDFromIndex + ld [wTempWildMonSpecies], a + +.startwildbattle + xor a + ret + +.nowildbattle + ld a, 1 + and a + ret + +INCLUDE "data/wild/probabilities.asm" + +CheckRepelEffect:: +; If there is no active Repel, there's no need to be here. + ld a, [wRepelEffect] + and a + jr z, .encounter +; Get the first Pokemon in your party that isn't fainted. + ld hl, wPartyMon1HP + ld bc, PARTYMON_STRUCT_LENGTH - 1 +.loop + ld a, [hli] + or [hl] + jr nz, .ok + add hl, bc + jr .loop + +.ok +; to PartyMonLevel +rept 4 + dec hl +endr + + ld a, [wCurPartyLevel] + cp [hl] + jr nc, .encounter + and a + ret + +.encounter + scf + ret + +LoadWildMonDataPointer: + call CheckOnWater + jr z, _WaterWildmonLookup + +_GrassWildmonLookup: + ld hl, SwarmGrassWildMons + ld bc, GRASS_WILDDATA_LENGTH + call _SwarmWildmonCheck + ret c + ld hl, JohtoGrassWildMons + ld de, KantoGrassWildMons + call _JohtoWildmonCheck + ld bc, GRASS_WILDDATA_LENGTH + jr _NormalWildmonOK + +_WaterWildmonLookup: + ld hl, SwarmWaterWildMons + ld bc, WATER_WILDDATA_LENGTH + call _SwarmWildmonCheck + ret c + ld hl, JohtoWaterWildMons + ld de, KantoWaterWildMons + call _JohtoWildmonCheck + ld bc, WATER_WILDDATA_LENGTH + jr _NormalWildmonOK + +_JohtoWildmonCheck: + call IsInJohto + and a + ret z + ld h, d + ld l, e + ret + +_SwarmWildmonCheck: + call CopyCurrMapDE + push hl + ld hl, wSwarmFlags + bit SWARMFLAGS_DUNSPARCE_SWARM_F, [hl] + pop hl + jr z, .CheckYanma + ld a, [wDunsparceMapGroup] + cp d + jr nz, .CheckYanma + ld a, [wDunsparceMapNumber] + cp e + jr nz, .CheckYanma + call LookUpWildmonsForMapDE + jr nc, _NoSwarmWildmon + scf + ret + +.CheckYanma: + push hl + ld hl, wSwarmFlags + bit SWARMFLAGS_YANMA_SWARM_F, [hl] + pop hl + jr z, _NoSwarmWildmon + ld a, [wYanmaMapGroup] + cp d + jr nz, _NoSwarmWildmon + ld a, [wYanmaMapNumber] + cp e + jr nz, _NoSwarmWildmon + call LookUpWildmonsForMapDE + jr nc, _NoSwarmWildmon + scf + ret + +_NoSwarmWildmon: + and a + ret + +_NormalWildmonOK: + call CopyCurrMapDE + jr LookUpWildmonsForMapDE + +CopyCurrMapDE: + ld a, [wMapGroup] + ld d, a + ld a, [wMapNumber] + ld e, a + ret + +LookUpGrassJohtoWildmons:: + ld hl, JohtoGrassWildMons + ld bc, GRASS_WILDDATA_LENGTH +LookUpWildmonsForMapDE: +.loop + push hl + ld a, [hl] + inc a + jr z, .nope + ld a, d + cp [hl] + jr nz, .next + inc hl + ld a, e + cp [hl] + jr z, .yup + +.next + pop hl + add hl, bc + jr .loop + +.nope + pop hl + and a + ret + +.yup + pop hl + scf + ret + +InitRoamMons: +; initialize wRoamMon structs + +; species + ld hl, RAIKOU + call GetPokemonIDFromIndex + ld [wRoamMon1Species], a + ld hl, ENTEI + call GetPokemonIDFromIndex + ld [wRoamMon2Species], a + +; level + ld a, 40 + ld [wRoamMon1Level], a + ld [wRoamMon2Level], a + +; raikou starting map + ld a, GROUP_ROUTE_42 + ld [wRoamMon1MapGroup], a + ld a, MAP_ROUTE_42 + ld [wRoamMon1MapNumber], a + +; entei starting map + ld a, GROUP_ROUTE_37 + ld [wRoamMon2MapGroup], a + ld a, MAP_ROUTE_37 + ld [wRoamMon2MapNumber], a + +; hp + xor a ; generate new stats + ld [wRoamMon1HP], a + ld [wRoamMon2HP], a + + ret + +CheckEncounterRoamMon: + push hl +; Don't trigger an encounter if we're on water. + call CheckOnWater + jr z, .DontEncounterRoamMon +; Load the current map group and number to de + call CopyCurrMapDE +; Randomly select a beast. + call Random + cp 100 ; 25/64 chance + jr nc, .DontEncounterRoamMon + and %00000011 ; Of that, a 3/4 chance. Running total: 75/256, or around 29.3%. + jr z, .DontEncounterRoamMon + dec a ; 1/3 chance that it's Entei, 1/3 chance that it's Raikou +; Compare its current location with yours + ld hl, wRoamMon1MapGroup + ld c, a + ld b, 0 + ld a, 7 ; length of the roam_struct + call AddNTimes + ld a, d + cp [hl] + jr nz, .DontEncounterRoamMon + inc hl + ld a, e + cp [hl] + jr nz, .DontEncounterRoamMon +; We've decided to take on a beast, so stage its information for battle. + dec hl + dec hl + dec hl + ld a, [hli] + ld [wTempWildMonSpecies], a + ld a, [hl] + ld [wCurPartyLevel], a + ld a, BATTLETYPE_ROAMING + ld [wBattleType], a + + pop hl + scf + ret + +.DontEncounterRoamMon: + pop hl + and a + ret + +UpdateRoamMons: + ld a, [wRoamMon1MapGroup] + cp GROUP_N_A + jr z, .SkipRaikou + ld b, a + ld a, [wRoamMon1MapNumber] + ld c, a + call .Update + ld a, b + ld [wRoamMon1MapGroup], a + ld a, c + ld [wRoamMon1MapNumber], a + +.SkipRaikou: + ld a, [wRoamMon2MapGroup] + cp GROUP_N_A + jr z, .SkipEntei + ld b, a + ld a, [wRoamMon2MapNumber] + ld c, a + call .Update + ld a, b + ld [wRoamMon2MapGroup], a + ld a, c + ld [wRoamMon2MapNumber], a + +.SkipEntei: + ld a, [wRoamMon3MapGroup] + cp GROUP_N_A + jr z, .Finished + ld b, a + ld a, [wRoamMon3MapNumber] + ld c, a + call .Update + ld a, b + ld [wRoamMon3MapGroup], a + ld a, c + ld [wRoamMon3MapNumber], a + +.Finished: + jp _BackUpMapIndices + +.Update: + ld hl, RoamMaps +.loop +; Are we at the end of the table? + ld a, [hl] + cp -1 + ret z +; Is this the correct entry? + ld a, b + cp [hl] + jr nz, .next + inc hl + ld a, c + cp [hl] + jr z, .yes +; We don't have the correct entry yet, so let's continue. A 0 terminates each entry. +.next + ld a, [hli] + and a + jr nz, .next + jr .loop + +; We have the correct entry now, so let's choose a random map from it. +.yes + inc hl + ld d, h + ld e, l +.update_loop + ld h, d + ld l, e +; Choose which map to warp to. + call Random + and %00011111 ; 1/8n chance it moves to a completely random map, where n is the number of roaming connections from the current map. + jr z, JumpRoamMon + and %11 + cp [hl] + jr nc, .update_loop ; invalid index, try again + inc hl + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [wRoamMons_LastMapGroup] + cp [hl] + jr nz, .done + inc hl + ld a, [wRoamMons_LastMapNumber] + cp [hl] + jr z, .update_loop + dec hl + +.done + ld a, [hli] + ld b, a + ld c, [hl] + ret + +JumpRoamMons: + ld a, [wRoamMon1MapGroup] + cp GROUP_N_A + jr z, .SkipRaikou + call JumpRoamMon + ld a, b + ld [wRoamMon1MapGroup], a + ld a, c + ld [wRoamMon1MapNumber], a + +.SkipRaikou: + ld a, [wRoamMon2MapGroup] + cp GROUP_N_A + jr z, .SkipEntei + call JumpRoamMon + ld a, b + ld [wRoamMon2MapGroup], a + ld a, c + ld [wRoamMon2MapNumber], a + +.SkipEntei: + ld a, [wRoamMon3MapGroup] + cp GROUP_N_A + jr z, .Finished + call JumpRoamMon + ld a, b + ld [wRoamMon3MapGroup], a + ld a, c + ld [wRoamMon3MapNumber], a + +.Finished: + jp _BackUpMapIndices + +JumpRoamMon: +.loop + ld hl, RoamMaps +.innerloop1 + ; 0-15 are all valid indexes into RoamMaps, + ; so this retry loop is unnecessary + ; since NUM_ROAMMON_MAPS happens to be 16 + call Random + maskbits NUM_ROAMMON_MAPS + cp NUM_ROAMMON_MAPS + jr nc, .innerloop1 + inc a + ld b, a +.innerloop2 ; Loop to get hl to the address of the chosen roam map. + dec b + jr z, .ok +.innerloop3 ; Loop to skip the current roam map, which is terminated by a 0. + ld a, [hli] + and a + jr nz, .innerloop3 + jr .innerloop2 +; Check to see if the selected map is the one the player is currently in. If so, try again. +.ok + ld a, [wMapGroup] + cp [hl] + jr nz, .done + inc hl + ld a, [wMapNumber] + cp [hl] + jr z, .loop + dec hl +; Return the map group and number in bc. +.done + ld a, [hli] + ld b, a + ld c, [hl] + ret + +_BackUpMapIndices: + ld a, [wRoamMons_CurMapNumber] + ld [wRoamMons_LastMapNumber], a + ld a, [wRoamMons_CurMapGroup] + ld [wRoamMons_LastMapGroup], a + ld a, [wMapNumber] + ld [wRoamMons_CurMapNumber], a + ld a, [wMapGroup] + ld [wRoamMons_CurMapGroup], a + ret + +INCLUDE "data/wild/roammon_maps.asm" + +ValidateTempWildMonSpecies: + ld a, h + or l + scf + ret z + ld a, h + if LOW(NUM_POKEMON) == $FF + cp HIGH(NUM_POKEMON) + 1 + else + cp HIGH(NUM_POKEMON) + ccf + ret nz + ld a, l + cp LOW(NUM_POKEMON) + 1 + endc + ccf + ret + +GetCallerRouteWildGrassMons: + farcall GetCallerLocation + ld d, b + ld e, c + ld hl, JohtoGrassWildMons + ld bc, GRASS_WILDDATA_LENGTH + call LookUpWildmonsForMapDE + jr c, .found + ld hl, KantoGrassWildMons + call LookUpWildmonsForMapDE + ret nc ; no carry = no grass wild mons for that route +.found + ld bc, 5 ; skip the map ID and encounter rates + add hl, bc + ld a, [wTimeOfDay] + ld bc, NUM_GRASSMON * 3 + call AddNTimes + scf + ret + +; 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: + call GetCallerRouteWildGrassMons + jr nc, .done + push hl +.randloop1 + call Random + and %11 + jr z, .randloop1 + ld bc, 10 ; skip three mons plus the level of the fourth + add hl, bc + ld c, a + add hl, bc + add hl, bc + add hl, bc + ; We now have the pointer to one of the last (rarest) three wild Pokemon found in that area. + ; Load the species index of this rare Pokemon + ld a, [hli] + ld d, [hl] + ld e, a + pop hl + inc hl ; Species index of the most common Pokemon on that route + ld b, 4 +.loop2 + ld a, [hli] + cp e ; Compare this common Pokemon with the rare one stored in de. + ld a, [hli] + jr nz, .next + cp d + jr z, .done +.next + inc hl + dec b + jr nz, .loop2 +; This Pokemon truly is rare. + push de + call CheckSeenMonIndex + pop bc + jr nz, .done +; Since we haven't seen it, have the caller tell us about it. + ld de, wStringBuffer1 + call CopyName1 + ld h, b + ld l, c + call GetPokemonIDFromIndex + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, .JustSawSomeRareMonText + call PrintText + xor a + ld [wScriptVar], a + ret + +.done + ld a, $1 + ld [wScriptVar], a + ret + +.JustSawSomeRareMonText: + text_far _JustSawSomeRareMonText + text_end + +RandomPhoneWildMon: + call GetCallerRouteWildGrassMons + call Random + and %11 + ld c, a + ld b, 0 + add hl, bc + add hl, bc + add hl, bc + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wStringBuffer1 + ld de, wStringBuffer4 + ld bc, MON_NAME_LENGTH + jp CopyBytes + +RandomPhoneMon: +; Get a random monster owned by the trainer who's calling. + farcall GetCallerLocation + ld hl, TrainerGroups + ld a, d + dec a + ld c, a + ld b, 0 + add hl, bc + add hl, bc + add hl, bc + ld a, BANK(TrainerGroups) + call GetFarByte + ld [wTrainerGroupBank], a + inc hl + ld a, BANK(TrainerGroups) + call GetFarWord + +.skip_trainer + dec e + jr z, .skipped +.skip + ld a, [wTrainerGroupBank] + call GetFarByte + add a, l + ld l, a + jr nc, .skip_trainer + inc h + jr .skip_trainer +.skipped + inc hl + +.skip_name + ld a, [wTrainerGroupBank] + call GetFarByte + inc hl + cp "@" + jr nz, .skip_name + + ld a, [wTrainerGroupBank] + call GetFarByte + inc hl + ld c, a + ld a, 3 + bit TRAINERTYPE_ITEM_F, c + jr z, .no_item + inc a +.no_item + bit TRAINERTYPE_MOVES_F, c + jr z, .no_moves + add a, NUM_MOVES * 2 +.no_moves + ld c, a + ld b, 0 + + ld e, b + push hl +.count_mon + inc e + add hl, bc + ld a, [wTrainerGroupBank] + call GetFarByte + cp -1 + jr nz, .count_mon + pop hl + +.rand + call Random + maskbits PARTY_LENGTH + cp e + jr nc, .rand + + inc a +.get_mon + dec a + jr z, .got_mon + add hl, bc + jr .get_mon +.got_mon + + inc hl ; species + ld a, [wTrainerGroupBank] + call GetFarWord + call GetPokemonIDFromIndex + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wStringBuffer1 + ld de, wStringBuffer4 + ld bc, MON_NAME_LENGTH + jp CopyBytes + +INCLUDE "data/wild/johto_grass.asm" +INCLUDE "data/wild/johto_water.asm" +INCLUDE "data/wild/kanto_grass.asm" +INCLUDE "data/wild/kanto_water.asm" +INCLUDE "data/wild/swarm_grass.asm" +INCLUDE "data/wild/swarm_water.asm" diff --git a/engine/phone/phone.asm b/engine/phone/phone.asm new file mode 100644 index 0000000..bc0341f --- /dev/null +++ b/engine/phone/phone.asm @@ -0,0 +1,716 @@ +AddPhoneNumber:: + call _CheckCellNum + jr c, .cant_add + call Phone_FindOpenSlot + jr nc, .cant_add + ld [hl], c + xor a + ret + +.cant_add + scf + ret + +DelCellNum:: + call _CheckCellNum + jr nc, .not_in_list + xor a + ld [hl], a + ret + +.not_in_list + scf + ret + +CheckCellNum:: + jp _CheckCellNum ; useless + +_CheckCellNum: + ld hl, wPhoneList + ld b, CONTACT_LIST_SIZE +.loop + ld a, [hli] + cp c + jr z, .got_it + dec b + jr nz, .loop + xor a + ret + +.got_it + dec hl + scf + ret + +Phone_FindOpenSlot: + call GetRemainingSpaceInPhoneList + ld b, a + ld hl, wPhoneList +.loop + ld a, [hli] + and a + jr z, .FoundOpenSpace + dec b + jr nz, .loop + xor a + ret + +.FoundOpenSpace: + dec hl + scf + ret + +GetRemainingSpaceInPhoneList: + xor a + ld [wRegisteredPhoneNumbers], a + ld hl, PermanentNumbers +.loop + ld a, [hli] + cp -1 + jr z, .done + cp c + jr z, .continue + + push bc + push hl + ld c, a + call _CheckCellNum + jr c, .permanent + ld hl, wRegisteredPhoneNumbers + inc [hl] +.permanent + pop hl + pop bc + +.continue + jr .loop + +.done + ld a, CONTACT_LIST_SIZE + ld hl, wRegisteredPhoneNumbers + sub [hl] + ret + +INCLUDE "data/phone/permanent_numbers.asm" + +CheckPhoneCall:: +; Check if the phone is ringing in the overworld. + + call CheckStandingOnEntrance + jr z, .no_call + + call .timecheck + nop + jr nc, .no_call + + ; 50% chance for a call + call Random + ld b, a + and %01111111 + cp b + jr nz, .no_call + + call GetMapPhoneService + and a + jr nz, .no_call + + call GetAvailableCallers + call ChooseRandomCaller + jr nc, .no_call + + ld e, a + call LoadCallerScript + ld a, BANK(Script_ReceivePhoneCall) + ld hl, Script_ReceivePhoneCall + call CallScript + scf + ret + +.no_call + xor a + ret + +.timecheck + farcall CheckReceiveCallTimer + ret + +CheckPhoneContactTimeOfDay: + push hl + push bc + push de + push af + + farcall CheckTime + pop af + and ANYTIME + and c + + pop de + pop bc + pop hl + ret + +ChooseRandomCaller: +; If no one is available to call, don't return anything. + ld a, [wNumAvailableCallers] + and a + jr z, .NothingToSample + +; Store the number of available callers in c. + ld c, a +; Sample a random number between 0 and 31. + call Random + ldh a, [hRandomAdd] + swap a + and $1f +; Compute that number modulo the number of available callers. + call SimpleDivide +; Return the caller ID you just sampled. + ld c, a + ld b, 0 + ld hl, wAvailableCallers + add hl, bc + ld a, [hl] + scf + ret + +.NothingToSample: + xor a + ret + +GetAvailableCallers: + farcall CheckTime + ld a, c + ld [wCheckedTime], a + ld hl, wNumAvailableCallers + ld bc, CONTACT_LIST_SIZE + 1 + xor a + call ByteFill + ld de, wPhoneList + ld a, CONTACT_LIST_SIZE + +.loop + ld [wPhoneListIndex], a + ld a, [de] + and a + jr z, .not_good_for_call + ld hl, PhoneContacts + PHONE_CONTACT_SCRIPT2_TIME + ld bc, PHONE_CONTACT_SIZE + call AddNTimes + ld a, [wCheckedTime] + and [hl] + jr z, .not_good_for_call + ld bc, PHONE_CONTACT_MAP_GROUP - PHONE_CONTACT_SCRIPT2_TIME + add hl, bc + ld a, [wMapGroup] + cp [hl] + jr nz, .different_map + inc hl + ld a, [wMapNumber] + cp [hl] + jr z, .not_good_for_call +.different_map + ld a, [wNumAvailableCallers] + ld c, a + ld b, 0 + inc a + ld [wNumAvailableCallers], a + ld hl, wAvailableCallers + add hl, bc + ld a, [de] + ld [hl], a +.not_good_for_call + inc de + ld a, [wPhoneListIndex] + dec a + jr nz, .loop + ret + +CheckSpecialPhoneCall:: + ld a, [wSpecialPhoneCallID] + and a + jr z, .NoPhoneCall + + dec a + ld c, a + ld b, 0 + ld hl, SpecialPhoneCallList + ld a, SPECIALCALL_SIZE + call AddNTimes + ld a, [hli] + ld h, [hl] + ld l, a + call _hl_ + jr nc, .NoPhoneCall + + call .DoSpecialPhoneCall + inc hl + inc hl + ld a, [hli] + ld e, a + push hl + call LoadCallerScript + pop hl + ld de, wCallerContact + PHONE_CONTACT_SCRIPT2_BANK + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + ld a, BANK(.script) + ld hl, .script + call CallScript + scf + ret +.NoPhoneCall: + xor a + ret + +.script + pause 30 + sjump Script_ReceivePhoneCall + +.DoSpecialPhoneCall: + ld a, [wSpecialPhoneCallID] + dec a + ld c, a + ld b, 0 + ld hl, SpecialPhoneCallList + ld a, SPECIALCALL_SIZE + call AddNTimes + ret + +SpecialCallOnlyWhenOutside: + ld a, [wEnvironment] + cp TOWN + jr z, .outside + cp ROUTE + jr z, .outside + xor a + ret + +.outside + scf + ret + +SpecialCallWhereverYouAre: + scf + ret + +MakePhoneCallFromPokegear: + ; Don't do the call if you're in a link communication + ld a, [wLinkMode] + and a + jr nz, .OutOfArea + ; If you're in an area without phone service, don't do the call + call GetMapPhoneService + and a + jr nz, .OutOfArea + ; If the person can't take a call at that time, don't do the call + ld a, b + ld [wCurCaller], a + ld hl, PhoneContacts + ld bc, PHONE_CONTACT_SIZE + call AddNTimes + ld d, h + ld e, l + ld hl, PHONE_CONTACT_SCRIPT1_TIME + add hl, de + ld a, [hl] + call CheckPhoneContactTimeOfDay + jr z, .OutOfArea + ; If we're in the same map as the person we're calling, + ; use the "Just talk to that person" script. + ld hl, PHONE_CONTACT_MAP_GROUP + add hl, de + ld a, [wMapGroup] + cp [hl] + jr nz, .GetPhoneScript + ld hl, PHONE_CONTACT_MAP_NUMBER + add hl, de + ld a, [wMapNumber] + cp [hl] + jr nz, .GetPhoneScript + ld b, BANK(PhoneScript_JustTalkToThem) + ld hl, PhoneScript_JustTalkToThem + jr .DoPhoneCall + +.GetPhoneScript: + ld hl, PHONE_CONTACT_SCRIPT1_BANK + add hl, de + ld b, [hl] + ld hl, PHONE_CONTACT_SCRIPT1_ADDR + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jr .DoPhoneCall + +.OutOfArea: + ld b, BANK(LoadOutOfAreaScript) + ld de, LoadOutOfAreaScript + call ExecuteCallbackScript + ret + +.DoPhoneCall: + ld a, b + ld [wPhoneScriptBank], a + ld a, l + ld [wPhoneCaller], a + ld a, h + ld [wPhoneCaller + 1], a + ld b, BANK(LoadPhoneScriptBank) + ld de, LoadPhoneScriptBank + call ExecuteCallbackScript + ret + +LoadPhoneScriptBank: + memcall wPhoneScriptBank + endcallback + +LoadOutOfAreaScript: + scall PhoneOutOfAreaScript + endcallback + +LoadCallerScript: + nop + nop + ld a, e + ld [wCurCaller], a + and a + jr nz, .actualcaller + ld a, BANK(WrongNumber) + ld hl, WrongNumber + jr .proceed + +.actualcaller + ld hl, PhoneContacts + ld bc, PHONE_CONTACT_SIZE + ld a, e + call AddNTimes + ld a, BANK(PhoneContacts) +.proceed + ld de, wCallerContact + ld bc, PHONE_CONTACT_SIZE + call FarCopyBytes + ret + +WrongNumber: + db TRAINER_NONE, PHONE_00 + dba .script +.script + writetext .PhoneWrongNumberText + end +.PhoneWrongNumberText: + text_far _PhoneWrongNumberText + text_end + +Script_ReceivePhoneCall: + refreshscreen + callasm RingTwice_StartCall + memcall wCallerContact + PHONE_CONTACT_SCRIPT2_BANK + waitbutton + callasm HangUp + closetext + callasm InitCallReceiveDelay + end + +Script_SpecialBillCall:: + callasm .LoadBillScript + sjump Script_ReceivePhoneCall + +.LoadBillScript: + ld e, PHONE_BILL + jp LoadCallerScript + +Script_SpecialElmCall: ; unreferenced + callasm .LoadElmScript + pause 30 + sjump Script_ReceivePhoneCall + +.LoadElmScript: + ld e, PHONE_ELM + jp LoadCallerScript + +RingTwice_StartCall: + call .Ring + call .Ring + farcall StubbedTrainerRankings_PhoneCalls + ret + +.Ring: + call Phone_StartRinging + call Phone_Wait20Frames + call .CallerTextboxWithName + call Phone_Wait20Frames + call Phone_CallerTextbox + call Phone_Wait20Frames + call .CallerTextboxWithName + ret + +.CallerTextboxWithName: + ld a, [wCurCaller] + ld b, a + call Phone_TextboxWithName + ret + +PhoneCall:: + ld a, b + ld [wPhoneScriptBank], a + ld a, e + ld [wPhoneCaller], a + ld a, d + ld [wPhoneCaller + 1], a + call .Ring + call .Ring + farcall StubbedTrainerRankings_PhoneCalls + ret + +.Ring: + call Phone_StartRinging + call Phone_Wait20Frames + call .CallerTextboxWithName + call Phone_Wait20Frames + call Phone_CallerTextbox + call Phone_Wait20Frames + call .CallerTextboxWithName + ret + +.CallerTextboxWithName: + call Phone_CallerTextbox + hlcoord 1, 2 + ld [hl], "☎" + inc hl + inc hl + ld a, [wPhoneCaller] + ld e, a + ld a, [wPhoneCaller + 1] + ld d, a + ld a, [wPhoneScriptBank] + jp FarPlaceString + +Phone_NoSignal: + ld de, SFX_NO_SIGNAL + call PlaySFX + jr Phone_CallEnd + +HangUp:: + call HangUp_Beep + call HangUp_Wait20Frames +Phone_CallEnd: + call HangUp_BoopOn + call HangUp_Wait20Frames + call HangUp_BoopOff + call HangUp_Wait20Frames + call HangUp_BoopOn + call HangUp_Wait20Frames + call HangUp_BoopOff + call HangUp_Wait20Frames + call HangUp_BoopOn + call HangUp_Wait20Frames + call HangUp_BoopOff + call HangUp_Wait20Frames + ret + +HangUp_ShutDown: ; unreferenced + ld de, SFX_SHUT_DOWN_PC + call PlaySFX + ret + +HangUp_Beep: + ld hl, PhoneClickText + call PrintText + ld de, SFX_HANG_UP + call PlaySFX + ret + +PhoneClickText: + text_far _PhoneClickText + text_end + +HangUp_BoopOn: + ld hl, PhoneEllipseText + call PrintText + ret + +PhoneEllipseText: + text_far _PhoneEllipseText + text_end + +HangUp_BoopOff: + call SpeechTextbox + ret + +Phone_StartRinging: + call WaitSFX + ld de, SFX_CALL + call PlaySFX + call Phone_CallerTextbox + call UpdateSprites + farcall PhoneRing_CopyTilemapAtOnce + ret + +HangUp_Wait20Frames: + jr Phone_Wait20Frames + +Phone_Wait20Frames: + ld c, 20 + call DelayFrames + farcall PhoneRing_CopyTilemapAtOnce + ret + +Phone_TextboxWithName: + push bc + call Phone_CallerTextbox + hlcoord 1, 1 + ld [hl], "☎" + inc hl + inc hl + ld d, h + ld e, l + pop bc + call GetCallerClassAndName + ret + +Phone_CallerTextbox: + hlcoord 0, 0 + ld b, 2 + ld c, SCREEN_WIDTH - 2 + call Textbox + ret + +GetCallerClassAndName: + ld h, d + ld l, e + ld a, b + call GetCallerTrainerClass + call GetCallerName + ret + +CheckCanDeletePhoneNumber: + ld a, c + call GetCallerTrainerClass + ld a, c + ; and a + ret nz + ld a, b + cp PHONECONTACT_MOM + ret z + cp PHONECONTACT_ELM + ret z + ld c, $1 + ret + +GetCallerTrainerClass: + push hl + ld hl, PhoneContacts + PHONE_CONTACT_TRAINER_CLASS + ld bc, PHONE_CONTACT_SIZE + call AddNTimes + ld a, [hli] + ld b, [hl] + ld c, a + pop hl + ret + +GetCallerName: + ld a, c + and a + jr z, .NotTrainer + + call Phone_GetTrainerName + push hl + push bc + call PlaceString + ld a, ":" + ld [bc], a + pop bc + pop hl + ld de, SCREEN_WIDTH + 3 + add hl, de + call Phone_GetTrainerClassName + call PlaceString + ret + +.NotTrainer: + push hl + ld c, b + ld b, 0 + ld hl, NonTrainerCallerNames + add hl, bc + add hl, bc + ld a, [hli] + ld e, a + ld d, [hl] + pop hl + call PlaceString + ret + +INCLUDE "data/phone/non_trainer_names.asm" + +Phone_GetTrainerName: + push hl + push bc + farcall GetTrainerName + pop bc + pop hl + ret + +Phone_GetTrainerClassName: + push hl + push bc + farcall GetTrainerClassName + pop bc + pop hl + ret + +GetCallerLocation: + ld a, [wCurCaller] + call GetCallerTrainerClass + ld d, c + ld e, b + push de + ld a, [wCurCaller] + ld hl, PhoneContacts + PHONE_CONTACT_MAP_GROUP + ld bc, PHONE_CONTACT_SIZE + call AddNTimes + ld b, [hl] + inc hl + ld c, [hl] + push bc + call GetWorldMapLocation + ld e, a + farcall GetLandmarkName + pop bc + pop de + ret + +INCLUDE "data/phone/phone_contacts.asm" + +INCLUDE "data/phone/special_calls.asm" + +PhoneOutOfAreaScript: + writetext PhoneOutOfAreaText + end + +PhoneOutOfAreaText: + text_far _PhoneOutOfAreaText + text_end + +PhoneScript_JustTalkToThem: + writetext PhoneJustTalkToThemText + end + +PhoneJustTalkToThemText: + text_far _PhoneJustTalkToThemText + text_end + +PhoneThankYouTextScript: ; unreferenced + writetext PhoneThankYouText + end + +PhoneThankYouText: + text_far _PhoneThankYouText + text_end diff --git a/engine/phone/phonering_copytilemapatonce.asm b/engine/phone/phonering_copytilemapatonce.asm new file mode 100644 index 0000000..029c295 --- /dev/null +++ b/engine/phone/phonering_copytilemapatonce.asm @@ -0,0 +1,87 @@ +PhoneRing_CopyTilemapAtOnce: + ldh a, [hCGB] + and a + jp z, WaitBGMap + ld a, [wSpriteUpdatesEnabled] + cp $0 + jp z, WaitBGMap + +; The following is a modified version of _CopyTilemapAtOnce +; that waits for [rLY] to be LY_VBLANK - 1 instead of $80 - 1. + ldh a, [hBGMapMode] + push af + xor a + ldh [hBGMapMode], a + + ldh a, [hMapAnims] + push af + xor a + ldh [hMapAnims], a + +.wait + ldh a, [rLY] + cp LY_VBLANK - 1 + jr c, .wait + + di + ld a, BANK(vBGMap2) + ldh [rVBK], a + hlcoord 0, 0, wAttrmap + call .CopyBGMapViaStack + ld a, BANK(vBGMap0) + ldh [rVBK], a + hlcoord 0, 0 + call .CopyBGMapViaStack + +.wait2 + ldh a, [rLY] + cp LY_VBLANK - 1 + jr c, .wait2 + ei + + pop af + ldh [hMapAnims], a + pop af + ldh [hBGMapMode], a + ret + +.CopyBGMapViaStack: +; Copy all tiles to vBGMap + ld [hSPBuffer], sp + ld sp, hl + ldh a, [hBGMapAddress + 1] + ld h, a + ld l, 0 + ld a, SCREEN_HEIGHT + ldh [hTilesPerCycle], a + ld b, 1 << 1 ; not in v/hblank + ld c, LOW(rSTAT) + +.loop +rept SCREEN_WIDTH / 2 + pop de +; if in v/hblank, wait until not in v/hblank +.loop\@ + ldh a, [c] + and b + jr nz, .loop\@ +; load vBGMap + ld [hl], e + inc l + ld [hl], d + inc l +endr + + ld de, BG_MAP_WIDTH - SCREEN_WIDTH + add hl, de + ldh a, [hTilesPerCycle] + dec a + ldh [hTilesPerCycle], a + jr nz, .loop + + ldh a, [hSPBuffer] + ld l, a + ldh a, [hSPBuffer + 1] + ld h, a + ld sp, hl + ret diff --git a/engine/phone/scripts/alan.asm b/engine/phone/scripts/alan.asm new file mode 100644 index 0000000..cd98ee6 --- /dev/null +++ b/engine/phone/scripts/alan.asm @@ -0,0 +1,60 @@ +AlanPhoneCalleeScript: + gettrainername STRING_BUFFER_3, SCHOOLBOY, ALAN1 + checkflag ENGINE_ALAN_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_ALAN_WEDNESDAY_AFTERNOON + iftrue .NotWednesday + checkflag ENGINE_ALAN_HAS_FIRE_STONE + iftrue .FireStone + readvar VAR_WEEKDAY + ifnotequal WEDNESDAY, .NotWednesday + checktime DAY + iftrue AlanWednesdayDay + +.NotWednesday: + farsjump AlanHangUpScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_36 + farsjump AlanReminderScript + +.FireStone: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_36 + farsjump AlanComePickUpScript + +AlanPhoneCallerScript: + gettrainername STRING_BUFFER_3, SCHOOLBOY, ALAN1 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_ALAN_READY_FOR_REMATCH + iftrue .Generic + checkflag ENGINE_ALAN_WEDNESDAY_AFTERNOON + iftrue .Generic + checkflag ENGINE_ALAN_HAS_FIRE_STONE + iftrue .Generic + farscall PhoneScript_Random3 + ifequal 0, AlanWantsBattle + checkevent EVENT_ALAN_GAVE_FIRE_STONE + iftrue .FireStone + farscall PhoneScript_Random2 + ifequal 0, AlanHasFireStone + +.FireStone: + farscall PhoneScript_Random11 + ifequal 0, AlanHasFireStone + +.Generic: + farsjump Phone_GenericCall_Male + +AlanWednesdayDay: + setflag ENGINE_ALAN_WEDNESDAY_AFTERNOON + +AlanWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_36 + setflag ENGINE_ALAN_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +AlanHasFireStone: + setflag ENGINE_ALAN_HAS_FIRE_STONE + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_36 + farsjump PhoneScript_FoundItem_Male diff --git a/engine/phone/scripts/anthony.asm b/engine/phone/scripts/anthony.asm new file mode 100644 index 0000000..06abcd8 --- /dev/null +++ b/engine/phone/scripts/anthony.asm @@ -0,0 +1,61 @@ +AnthonyPhoneCalleeScript: + gettrainername STRING_BUFFER_3, HIKER, ANTHONY2 + checkflag ENGINE_ANTHONY_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_ANTHONY_FRIDAY_NIGHT + iftrue .NotFriday + readvar VAR_WEEKDAY + ifnotequal FRIDAY, .NotFriday + checktime NITE + iftrue AnthonyFridayNight + +.NotFriday: + checkflag ENGINE_DUNSPARCE_SWARM + iftrue .AlreadySwarming + farsjump AnthonyHangUpScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_33 + farsjump AnthonyReminderScript + +.AlreadySwarming: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_33 + farsjump AnthonyHurryScript + +AnthonyPhoneCallerScript: + gettrainername STRING_BUFFER_3, HIKER, ANTHONY2 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_FLYPOINT_GOLDENROD + iffalse .TriesSwarm + checkflag ENGINE_ANTHONY_READY_FOR_REMATCH + iftrue .TriesSwarm + checkflag ENGINE_ANTHONY_FRIDAY_NIGHT + iftrue .TriesSwarm + farscall PhoneScript_Random2 + ifequal 0, AnthonyWantsBattle + +.TriesSwarm: + farscall PhoneScript_Random5 + ifequal 0, AnthonyTriesDunsparceSwarm + farsjump Phone_GenericCall_Male + +AnthonyFridayNight: + setflag ENGINE_ANTHONY_FRIDAY_NIGHT + +AnthonyWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_33 + setflag ENGINE_ANTHONY_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +AnthonyTriesDunsparceSwarm: + checkflag ENGINE_DUNSPARCE_SWARM + iftrue .Generic + setflag ENGINE_DUNSPARCE_SWARM + getmonname STRING_BUFFER_4, DUNSPARCE + swarm SWARM_DUNSPARCE, DARK_CAVE_VIOLET_ENTRANCE + getlandmarkname STRING_BUFFER_5, LANDMARK_DARK_CAVE + farsjump AnthonySwarmScript + +.Generic: + farsjump Phone_GenericCall_Male diff --git a/engine/phone/scripts/arnie.asm b/engine/phone/scripts/arnie.asm new file mode 100644 index 0000000..4a673fb --- /dev/null +++ b/engine/phone/scripts/arnie.asm @@ -0,0 +1,64 @@ +ArniePhoneCalleeScript: + gettrainername STRING_BUFFER_3, BUG_CATCHER, ARNIE1 + checkflag ENGINE_ARNIE_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_ARNIE_TUESDAY_MORNING + iftrue .NotTuesday + readvar VAR_WEEKDAY + ifnotequal TUESDAY, .NotTuesday + checktime MORN + iftrue ArnieTuesdayMorning + +.NotTuesday: + checkflag ENGINE_YANMA_SWARM + iftrue .AlreadySwarming + farsjump ArnieHangUpScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_35 + farsjump ArnieReminderScript + +.AlreadySwarming: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_35 + farsjump ArnieHurryScript + +ArniePhoneCallerScript: + gettrainername STRING_BUFFER_3, BUG_CATCHER, ARNIE1 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_ARNIE_READY_FOR_REMATCH + iftrue .Swarm + checkflag ENGINE_ARNIE_TUESDAY_MORNING + iftrue .Swarm + farscall PhoneScript_Random2 + ifequal 0, ArnieWantsBattle + +.Swarm: + farscall PhoneScript_Random5 + ifequal 0, ArnieYanmaSwarm + farscall PhoneScript_Random3 + ifequal 0, ArnieFoundRare + farsjump Phone_GenericCall_Male + +ArnieTuesdayMorning: + setflag ENGINE_ARNIE_TUESDAY_MORNING + +ArnieWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_35 + setflag ENGINE_ARNIE_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +ArnieYanmaSwarm: ; start swarm + checkflag ENGINE_YANMA_SWARM + iftrue ArnieYanmaAlreadySwarming + setflag ENGINE_YANMA_SWARM + getmonname STRING_BUFFER_4, YANMA + swarm SWARM_YANMA, ROUTE_35 + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_35 + farsjump ArnieSwarmScript + +ArnieFoundRare: + farsjump Phone_CheckIfUnseenRare_Male + +ArnieYanmaAlreadySwarming: + farsjump Phone_GenericCall_Male diff --git a/engine/phone/scripts/beth.asm b/engine/phone/scripts/beth.asm new file mode 100644 index 0000000..58a4b2f --- /dev/null +++ b/engine/phone/scripts/beth.asm @@ -0,0 +1,39 @@ +BethPhoneCalleeScript: + gettrainername STRING_BUFFER_3, COOLTRAINERF, BETH1 + checkflag ENGINE_BETH_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Female + checkflag ENGINE_BETH_FRIDAY_AFTERNOON + iftrue .NotFriday + readvar VAR_WEEKDAY + ifnotequal FRIDAY, .NotFriday + checktime DAY + iftrue BethFridayAfternoon + +.NotFriday: + farsjump BethHangUpScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_26 + farsjump BethBattleReminderScript + +BethPhoneCallerScript: + gettrainername STRING_BUFFER_3, COOLTRAINERF, BETH1 + farscall PhoneScript_GreetPhone_Female + checkflag ENGINE_BETH_READY_FOR_REMATCH + iftrue .Generic + checkflag ENGINE_BETH_FRIDAY_AFTERNOON + iftrue .Generic + farscall PhoneScript_Random2 + ifequal 0, BethWantsBattle + +.Generic: + farsjump Phone_GenericCall_Female + +BethFridayAfternoon: + setflag ENGINE_BETH_FRIDAY_AFTERNOON + +BethWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_26 + setflag ENGINE_BETH_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Female diff --git a/engine/phone/scripts/beverly.asm b/engine/phone/scripts/beverly.asm new file mode 100644 index 0000000..247b69a --- /dev/null +++ b/engine/phone/scripts/beverly.asm @@ -0,0 +1,26 @@ +BeverlyPhoneCalleeScript: + gettrainername STRING_BUFFER_3, POKEFANF, BEVERLY1 + farscall PhoneScript_AnswerPhone_Female + checkflag ENGINE_BEVERLY_HAS_NUGGET + iftrue .HasNugget + farsjump BeverlyHangUpScript + +.HasNugget: + getlandmarkname STRING_BUFFER_5, LANDMARK_NATIONAL_PARK + farsjump BeverlyComePickUpScript + +BeverlyPhoneCallerScript: + gettrainername STRING_BUFFER_3, POKEFANF, BEVERLY1 + farscall PhoneScript_GreetPhone_Female + checkflag ENGINE_BEVERLY_HAS_NUGGET + iftrue .HasNugget + farscall PhoneScript_Random4 + ifequal 0, .FoundNugget + +.HasNugget: + farsjump Phone_GenericCall_Female + +.FoundNugget: + setflag ENGINE_BEVERLY_HAS_NUGGET + getlandmarkname STRING_BUFFER_5, LANDMARK_NATIONAL_PARK + farsjump PhoneScript_FoundItem_Female diff --git a/engine/phone/scripts/bike_shop.asm b/engine/phone/scripts/bike_shop.asm new file mode 100644 index 0000000..2761774 --- /dev/null +++ b/engine/phone/scripts/bike_shop.asm @@ -0,0 +1,5 @@ +BikeShopPhoneCallerScript: + farwritetext BikeShopPhoneCallerText + clearflag ENGINE_BIKE_SHOP_CALL_ENABLED + specialphonecall SPECIALCALL_NONE + end diff --git a/engine/phone/scripts/bill.asm b/engine/phone/scripts/bill.asm new file mode 100644 index 0000000..96e2f40 --- /dev/null +++ b/engine/phone/scripts/bill.asm @@ -0,0 +1,41 @@ +BillPhoneCalleeScript: + checktime DAY + iftrue .daygreet + checktime NITE + iftrue .nitegreet + farwritetext BillPhoneMornGreetingText + promptbutton + sjump .main + +.daygreet + farwritetext BillPhoneDayGreetingText + promptbutton + sjump .main + +.nitegreet + farwritetext BillPhoneNiteGreetingText + promptbutton + sjump .main + +.main + farwritetext BillPhoneGenericText + promptbutton + readvar VAR_BOXSPACE + getnum STRING_BUFFER_3 + ifequal 0, .full + ifless PARTY_LENGTH, .nearlyfull + farwritetext BillPhoneNotFullText + end + +.nearlyfull + farwritetext BillPhoneNearlyFullText + end + +.full + farwritetext BillPhoneFullText + end + +BillPhoneCallerScript: + farwritetext BillPhoneNewlyFullText + waitbutton + end diff --git a/engine/phone/scripts/brent.asm b/engine/phone/scripts/brent.asm new file mode 100644 index 0000000..f687e98 --- /dev/null +++ b/engine/phone/scripts/brent.asm @@ -0,0 +1,44 @@ +BrentPhoneCalleeScript: + gettrainername STRING_BUFFER_3, POKEMANIAC, BRENT1 + checkflag ENGINE_BRENT_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_BRENT_MONDAY_MORNING + iftrue .NotMonday + readvar VAR_WEEKDAY + ifnotequal MONDAY, .NotMonday + checktime MORN + iftrue BrentMondayMorning + +.NotMonday: + farsjump BrentHangUpScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_43 + farsjump BrentReminderScript + +BrentPhoneCallerScript: + gettrainername STRING_BUFFER_3, POKEMANIAC, BRENT1 + farscall PhoneScript_GreetPhone_Male + farscall PhoneScript_Random2 + ifequal 0, BrentBillTrivia + checkflag ENGINE_BRENT_READY_FOR_REMATCH + iftrue .Generic + checkflag ENGINE_BRENT_MONDAY_MORNING + iftrue .Generic + farscall PhoneScript_Random2 + ifequal 0, BrentWantsBattle + +.Generic: + farsjump Phone_GenericCall_Male + +BrentMondayMorning: + setflag ENGINE_BRENT_MONDAY_MORNING + +BrentWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_43 + setflag ENGINE_BRENT_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +BrentBillTrivia: + farsjump BrentBillTriviaScript diff --git a/engine/phone/scripts/brent_gossip.asm b/engine/phone/scripts/brent_gossip.asm new file mode 100644 index 0000000..76fb1c1 --- /dev/null +++ b/engine/phone/scripts/brent_gossip.asm @@ -0,0 +1,62 @@ +BrentBillTriviaScript: + random 10 + ifequal 0, .Father + ifequal 1, .Grandpa + ifequal 2, .Goldenrod + ifequal 3, .Route25 + ifequal 4, .Abra + ifequal 5, .Sister + ifequal 6, .Milk + ifequal 7, .Battling + ifequal 8, .FlowerShop + ifequal 9, .KimonoGirl + +.Father: + farwritetext BrentFatherGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Grandpa: + farwritetext BrentGrandpaGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Goldenrod: + farwritetext BrentGoldenrodGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Route25: + farwritetext BrentRoute25GossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Abra: + farwritetext BrentAbraGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Sister: + farwritetext BrentSisterGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Milk: + farwritetext BrentMilkGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Battling: + farwritetext BrentBattlingGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.FlowerShop: + farwritetext BrentFlowerShopGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.KimonoGirl: + farwritetext BrentKimonoGirlGossipText + promptbutton + sjump PhoneScript_HangUpText_Male diff --git a/engine/phone/scripts/buena.asm b/engine/phone/scripts/buena.asm new file mode 100644 index 0000000..02a6c0a --- /dev/null +++ b/engine/phone/scripts/buena.asm @@ -0,0 +1,169 @@ +BuenaPhoneCalleeScript: + checkflag ENGINE_ROCKETS_IN_RADIO_TOWER + iftrue BuenaPhoneScript_Rocket + readvar VAR_HOUR + ifgreater 17, BuenaPhoneScript_AfterMidnightCallee + scall BuenaPhoneScript_CheckTimeOfDayCallee + sjump BuenaPhoneScript_RandomCallee + +BuenaPhoneCallerScript: + checkflag ENGINE_ROCKETS_IN_RADIO_TOWER + iftrue BuenaPhoneScript_Rocket + scall BuenaPhoneScript_CheckTimeOfDayCaller + sjump BuenaPhoneScript_RandomCaller + +BuenaPhoneScript_CheckTimeOfDayCallee: + checktime MORN + iftrue .morn + checktime DAY + iftrue .day + writetext BuenaPhoneNiteAnswerText + promptbutton + end + +.morn + writetext BuenaPhoneMorningAnswerText + promptbutton + end + +.day + writetext BuenaPhoneDayAnswerText + promptbutton + end + +BuenaPhoneScript_AfterMidnightCallee: + writetext BuenaPhoneMidnightAnswerText + end + +BuenaPhoneScript_CheckTimeOfDayCaller: + readvar VAR_HOUR + ifgreater 17, BuenaPhoneScript_AfterMidnightCaller + checktime MORN + iftrue .morn + checktime DAY + iftrue .day + writetext BuenaPhoneNiteText + promptbutton + end + +.morn + writetext BuenaPhoneMorningText + promptbutton + end + +.day + writetext BuenaPhoneDayText + promptbutton + end + +BuenaPhoneScript_AfterMidnightCaller: + writetext BuenaPhoneMidnightText + promptbutton + end + +BuenaPhoneScript_Rocket: + writetext BuenaPhoneRocketText + end + +BuenaPhoneScript_RandomCaller: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .PostE4 + random 11 + sjump .Jumptable + +.PostE4: + random 14 + +.Jumptable: + ifequal 0, .zero + ifequal 1, .one + ifequal 2, .two + ifequal 3, .three + ifequal 4, .four + ifequal 5, .five + ifequal 6, .six + ifequal 7, .seven + ifequal 8, .eight + ifequal 9, .nine + ifequal 10, .ten + ifequal 11, .eleven + ifequal 12, .twelve + ifequal 13, .thirteen + +.zero + writetext BuenaPhoneWentOutWithBenText + sjump .finish + +.one + writetext BuenaPhoneReceptionistText + sjump .finish + +.two + writetext BuenaPhoneLuckyNumberShowText + sjump .finish + +.three + writetext BuenaPhoneStressedFromWorkText + sjump .finish + +.four + writetext BuenaPhoneProfessorOakText + sjump .finish + +.five + writetext BuenaPhoneGotAColdText + sjump .finish + +.six + writetext BuenaPhoneRadioCardQuestionsText + sjump .finish + +.seven + writetext BuenaPhonePikachuFanClubText + sjump .finish + +.eight + writetext BuenaPhoneRadioTowerDirectorText + sjump .finish + +.nine + writetext BuenaPhoneWhenDoYouRelaxText + sjump .finish + +.ten + writetext BuenaPhoneStarterPokemonText + sjump .finish + +.eleven + writetext BuenaPhoneCompanyVacationText + sjump .finish + +.twelve + writetext BuenaPhoneBenAndFernText + sjump .finish + +.thirteen + writetext BuenaPhoneGoingShoppingText + +.finish + end + +BuenaPhoneScript_RandomCallee: + random 3 + ifequal 0, .zero + ifequal 1, .one + ifequal 2, .two + +.zero + writetext BuenaPhoneFavoriteSlotMachineAnswerText + end + +.one + writetext BuenaPhonePokegearAnswerText + end + +.two + writetext BuenaPhoneCoopedUpInRadioTowerAnswerText + end + +INCLUDE "data/phone/text/buena.asm" diff --git a/engine/phone/scripts/chad.asm b/engine/phone/scripts/chad.asm new file mode 100644 index 0000000..8e3384f --- /dev/null +++ b/engine/phone/scripts/chad.asm @@ -0,0 +1,49 @@ +ChadPhoneCalleeScript: + gettrainername STRING_BUFFER_3, SCHOOLBOY, CHAD1 + checkflag ENGINE_CHAD_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_CHAD_FRIDAY_MORNING + iftrue .NotFriday + readvar VAR_WEEKDAY + ifnotequal FRIDAY, .NotFriday + checktime MORN + iftrue ChadFridayMorning + +.NotFriday: + farsjump ChadHangUpScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_38 + farsjump ChadReminderScript + +ChadPhoneCallerScript: + gettrainername STRING_BUFFER_3, SCHOOLBOY, CHAD1 + farscall PhoneScript_GreetPhone_Male + farscall PhoneScript_Random2 + ifequal 0, ChadOakGossip + checkflag ENGINE_CHAD_READY_FOR_REMATCH + iftrue .Generic + checkflag ENGINE_CHAD_FRIDAY_MORNING + iftrue .Generic + farscall PhoneScript_Random2 + ifequal 0, ChadWantsBattle + +.Generic: + farscall PhoneScript_Random3 + ifequal 0, ChadFoundRare + farsjump Phone_GenericCall_Male + +ChadFridayMorning: + setflag ENGINE_CHAD_FRIDAY_MORNING + +ChadWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_38 + setflag ENGINE_CHAD_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +ChadFoundRare: + farsjump Phone_CheckIfUnseenRare_Male + +ChadOakGossip: + farsjump ChadOakGossipScript diff --git a/engine/phone/scripts/chad_gossip.asm b/engine/phone/scripts/chad_gossip.asm new file mode 100644 index 0000000..5819223 --- /dev/null +++ b/engine/phone/scripts/chad_gossip.asm @@ -0,0 +1,62 @@ +ChadOakGossipScript: + random 10 + ifequal 0, .Blue + ifequal 1, .Daisy + ifequal 2, .ProfElm + ifequal 3, .Dream + ifequal 4, .Kurt + ifequal 5, .League + ifequal 6, .RadioShow + ifequal 7, .Battling + ifequal 8, .DaisyTea + ifequal 9, .Traveled + +.Blue: + farwritetext ChadBlueGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Daisy: + farwritetext ChadDaisyGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.ProfElm: + farwritetext ChadProfElmGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Dream: + farwritetext ChadProfOaksDreamGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Kurt: + farwritetext ChadKurtGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.League: + farwritetext ChadLeagueGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.RadioShow: + farwritetext ChadPokemonTalkGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Battling: + farwritetext ChadProfOakTrainerGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.DaisyTea: + farwritetext ChadDaisyTeaGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Traveled: + farwritetext ChadProfOakTravelingGossipText + promptbutton + sjump PhoneScript_HangUpText_Male diff --git a/engine/phone/scripts/dana.asm b/engine/phone/scripts/dana.asm new file mode 100644 index 0000000..068b19a --- /dev/null +++ b/engine/phone/scripts/dana.asm @@ -0,0 +1,65 @@ +DanaPhoneCalleeScript: + gettrainername STRING_BUFFER_3, LASS, DANA1 + checkflag ENGINE_DANA_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Female + checkflag ENGINE_DANA_THURSDAY_NIGHT + iftrue .NotThursday + checkflag ENGINE_DANA_HAS_THUNDERSTONE + iftrue .HasThunderstone + readvar VAR_WEEKDAY + ifnotequal THURSDAY, .NotThursday + checktime NITE + iftrue DanaThursdayNight + +.NotThursday: + farsjump DanaHangUpScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_38 + farsjump DanaReminderScript + +.HasThunderstone: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_38 + farsjump DanaComePickUpScript + +DanaPhoneCallerScript: + gettrainername STRING_BUFFER_3, LASS, DANA1 + farscall PhoneScript_GreetPhone_Female + checkflag ENGINE_DANA_READY_FOR_REMATCH + iftrue .Generic + checkflag ENGINE_DANA_THURSDAY_NIGHT + iftrue .Generic + checkflag ENGINE_DANA_HAS_THUNDERSTONE + iftrue .Generic + farscall PhoneScript_Random3 + ifequal 0, DanaWantsBattle + checkevent EVENT_DANA_GAVE_THUNDERSTONE + iftrue .Thunderstone + farscall PhoneScript_Random2 + ifequal 0, DanaHasThunderstone + +.Thunderstone: + farscall PhoneScript_Random11 + ifequal 0, DanaHasThunderstone + +.Generic: + farscall PhoneScript_Random3 + ifequal 0, DanaFoundRare + farsjump Phone_GenericCall_Female + +DanaThursdayNight: + setflag ENGINE_DANA_THURSDAY_NIGHT + +DanaWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_38 + setflag ENGINE_DANA_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Female + +DanaFoundRare: + farsjump Phone_CheckIfUnseenRare_Female + +DanaHasThunderstone: + setflag ENGINE_DANA_HAS_THUNDERSTONE + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_38 + farsjump PhoneScript_FoundItem_Female diff --git a/engine/phone/scripts/derek.asm b/engine/phone/scripts/derek.asm new file mode 100644 index 0000000..3592b06 --- /dev/null +++ b/engine/phone/scripts/derek.asm @@ -0,0 +1,48 @@ +DerekPhoneCalleeScript: + gettrainername STRING_BUFFER_3, POKEFANM, DEREK1 + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_DEREK_HAS_NUGGET + iftrue .Nugget + farscall PhoneScript_Random2 + ifequal 0, .NoContest + checkflag ENGINE_DAILY_BUG_CONTEST + iftrue .NoContest + readvar VAR_WEEKDAY + ifequal TUESDAY, .ContestToday + ifequal THURSDAY, .ContestToday + ifequal SATURDAY, .ContestToday + +.NoContest: + farsjump DerekHangUpScript + +.ContestToday: + farsjump PhoneScript_BugCatchingContest + +.Nugget: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_39 + farsjump DerekComePickUpScript + +DerekPhoneCallerScript: + gettrainername STRING_BUFFER_3, POKEFANM, DEREK1 + farscall PhoneScript_GreetPhone_Male + farscall PhoneScript_Random2 + ifequal 0, .NoContest + checkflag ENGINE_DAILY_BUG_CONTEST + iftrue .NoContest + readvar VAR_WEEKDAY + ifequal TUESDAY, .ContestToday + ifequal THURSDAY, .ContestToday + ifequal SATURDAY, .ContestToday + +.NoContest: + farscall PhoneScript_Random4 + ifequal 0, .Nugget + farsjump Phone_GenericCall_Male + +.ContestToday: + farsjump PhoneScript_BugCatchingContest + +.Nugget: + setflag ENGINE_DEREK_HAS_NUGGET + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_39 + farsjump PhoneScript_FoundItem_Male diff --git a/engine/phone/scripts/elm.asm b/engine/phone/scripts/elm.asm new file mode 100644 index 0000000..b834154 --- /dev/null +++ b/engine/phone/scripts/elm.asm @@ -0,0 +1,101 @@ +ElmPhoneCalleeScript: + readvar VAR_SPECIALPHONECALL + ifequal SPECIALCALL_POKERUS, .pokerus + checkevent EVENT_SHOWED_TOGEPI_TO_ELM + iftrue .discovery + checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE + iffalse .next + checkevent EVENT_TOGEPI_HATCHED + iftrue .egghatched +.next + checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE + iftrue .eggunhatched + checkevent EVENT_ELMS_AIDE_IN_LAB + iftrue .assistant + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iftrue .checkingegg + checkevent EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON + iftrue .stolen + checkevent EVENT_GOT_MYSTERY_EGG_FROM_MR_POKEMON + iftrue .sawmrpokemon + farwritetext ElmPhoneHealYourMonText + end + +.sawmrpokemon + farwritetext ElmPhoneSawMrPokemonText + end + +.stolen + farwritetext ElmPhonePokemonStolenText + end + +.checkingegg + farwritetext ElmPhoneCheckingTheEggText + end + +.assistant + farwritetext ElmPhoneAssistantText + end + +.eggunhatched + farwritetext ElmPhoneHowIsTheEggText + end + +.egghatched + farwritetext ElmPhoneEggHatchedText + setevent EVENT_TOLD_ELM_ABOUT_TOGEPI_OVER_THE_PHONE + end + +.discovery + random 2 + ifequal 0, .nextdiscovery + farwritetext ElmPhoneDiscoveredHatchTimeText + end + +.nextdiscovery + farwritetext ElmPhoneInvestigatingEggMovesText + end + +.pokerus + farwritetext ElmPhoneDiscoveredPokerusText + specialphonecall SPECIALCALL_NONE + end + +ElmPhoneCallerScript: + readvar VAR_SPECIALPHONECALL + ifequal SPECIALCALL_ROBBED, .disaster + ifequal SPECIALCALL_ASSISTANT, .assistant + ifequal SPECIALCALL_WEIRDBROADCAST, .rocket + ifequal SPECIALCALL_SSTICKET, .gift + ifequal SPECIALCALL_MASTERBALL, .gift + farwritetext ElmPhoneDiscoveredPokerusText + specialphonecall SPECIALCALL_NONE + end + +.disaster + farwritetext ElmPhoneDisasterText + specialphonecall SPECIALCALL_NONE + setevent EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON + end + +.assistant + farwritetext ElmPhoneEggAssistantText + specialphonecall SPECIALCALL_NONE + clearevent EVENT_ELMS_AIDE_IN_VIOLET_POKEMON_CENTER + setevent EVENT_ELMS_AIDE_IN_LAB + end + +.rocket + farwritetext ElmPhoneRadioTowerRocketTakeoverText + specialphonecall SPECIALCALL_NONE + end + +.gift + farwritetext ElmPhoneGiftText + specialphonecall SPECIALCALL_NONE + end + +.neat ; unreferenced + farwritetext ElmPhoneGotAholdOfSomethingNeatText + specialphonecall SPECIALCALL_NONE + end diff --git a/engine/phone/scripts/erin.asm b/engine/phone/scripts/erin.asm new file mode 100644 index 0000000..ffaa982 --- /dev/null +++ b/engine/phone/scripts/erin.asm @@ -0,0 +1,40 @@ +ErinPhoneCalleeScript: + gettrainername STRING_BUFFER_3, PICNICKER, ERIN1 + checkflag ENGINE_ERIN_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Female + checkflag ENGINE_ERIN_SATURDAY_NIGHT + iftrue .NotSaturday + readvar VAR_WEEKDAY + ifnotequal SATURDAY, .NotSaturday + checktime NITE + iftrue ErinSaturdayNight + +.NotSaturday: + farsjump ErinWorkingHardScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_46 + farsjump ErinComeBattleScript + +ErinPhoneCallerScript: + gettrainername STRING_BUFFER_3, PICNICKER, ERIN1 + farscall PhoneScript_GreetPhone_Female + checkflag ENGINE_ERIN_READY_FOR_REMATCH + iftrue .GenericCall + checkflag ENGINE_ERIN_SATURDAY_NIGHT + iftrue .GenericCall + farscall PhoneScript_Random3 + ifequal 0, ErinWantsBattle + ifequal 1, ErinWantsBattle + +.GenericCall: + farsjump Phone_GenericCall_Female + +ErinSaturdayNight: + setflag ENGINE_ERIN_SATURDAY_NIGHT + +ErinWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_46 + setflag ENGINE_ERIN_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Female diff --git a/engine/phone/scripts/gaven.asm b/engine/phone/scripts/gaven.asm new file mode 100644 index 0000000..1c9004e --- /dev/null +++ b/engine/phone/scripts/gaven.asm @@ -0,0 +1,44 @@ +GavenPhoneCalleeScript: + gettrainername STRING_BUFFER_3, COOLTRAINERM, GAVEN3 + checkflag ENGINE_GAVEN_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_GAVEN_THURSDAY_MORNING + iftrue .NotThursday + readvar VAR_WEEKDAY + ifnotequal THURSDAY, .NotThursday + checktime MORN + iftrue GavenThursdayMorningScript + +.NotThursday: + farsjump GavenHangUpNotThursdayScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_26 + farsjump GavenReminderScript + +GavenPhoneCallerScript: + gettrainername STRING_BUFFER_3, COOLTRAINERM, GAVEN3 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_GAVEN_READY_FOR_REMATCH + iftrue .WaitingForBattle + checkflag ENGINE_GAVEN_THURSDAY_MORNING + iftrue .WaitingForBattle + farscall PhoneScript_Random2 + ifequal 0, GavenWantsRematch + +.WaitingForBattle: + farscall PhoneScript_Random3 + ifequal 0, GavenFoundRare + farsjump Phone_GenericCall_Male + +GavenThursdayMorningScript: + setflag ENGINE_GAVEN_THURSDAY_MORNING + +GavenWantsRematch: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_26 + setflag ENGINE_GAVEN_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +GavenFoundRare: + farsjump Phone_CheckIfUnseenRare_Male diff --git a/engine/phone/scripts/generic_callee.asm b/engine/phone/scripts/generic_callee.asm new file mode 100644 index 0000000..51bcd49 --- /dev/null +++ b/engine/phone/scripts/generic_callee.asm @@ -0,0 +1,1263 @@ +PhoneScript_Random2: + random 2 + end + +PhoneScript_Random3: + random 3 + end + +PhoneScript_Random4: + random 4 + end + +PhoneScript_Random5: + random 5 + end + +PhoneScript_Random11: + random 11 + end + +PhoneScript_AnswerPhone_Male: + checktime DAY + iftrue PhoneScript_AnswerPhone_Male_Day + checktime NITE + iftrue PhoneScript_AnswerPhone_Male_Nite + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_JUGGLER_IRWIN, .Irwin + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackAnswerPhoneText + promptbutton + end + +.Huey: + farwritetext HueyAnswerPhoneText + promptbutton + end + +.Gaven: + farwritetext GavenAnswerPhoneText + promptbutton + end + +.Jose: + farwritetext JoseAnswerPhoneText + promptbutton + end + +.Joey: + farwritetext JoeyAnswerPhoneText + promptbutton + end + +.Wade: + farwritetext WadeAnswerPhoneText + promptbutton + end + +.Ralph: + farwritetext RalphAnswerPhoneText + promptbutton + end + +.Anthony: + farwritetext AnthonyAnswerPhoneText + promptbutton + end + +.Todd: + farwritetext ToddAnswerPhoneText + promptbutton + end + +.Irwin: + farwritetext IrwinAnswerPhoneText + promptbutton + end + +.Arnie: + farwritetext ArnieAnswerPhoneText + promptbutton + end + +.Alan: + farwritetext AlanAnswerPhoneText + promptbutton + end + +.Chad: + farwritetext ChadAnswerPhoneText + promptbutton + end + +.Derek: + farwritetext DerekAnswerPhoneText + promptbutton + end + +.Tully: + farwritetext TullyAnswerPhoneText + promptbutton + end + +.Brent: + farwritetext BrentAnswerPhoneText + promptbutton + end + +.Vance: + farwritetext VanceAnswerPhoneText + promptbutton + end + +.Wilton: + farwritetext WiltonAnswerPhoneText + promptbutton + end + +.Kenji: + farwritetext KenjiAnswerPhoneText + promptbutton + end + +.Parry: + farwritetext ParryAnswerPhoneText + promptbutton + end + +PhoneScript_AnswerPhone_Male_Day: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_JUGGLER_IRWIN, .Irwin + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackAnswerPhoneDayText + promptbutton + end + +.Huey: + farwritetext HueyAnswerPhoneDayText + promptbutton + end + +.Gaven: + farwritetext GavenAnswerPhoneDayText + promptbutton + end + +.Jose: + farwritetext JoseAnswerPhoneDayText + promptbutton + end + +.Joey: + farwritetext JoeyAnswerPhoneDayText + promptbutton + end + +.Wade: + farwritetext WadeAnswerPhoneDayText + promptbutton + end + +.Ralph: + farwritetext RalphAnswerPhoneDayText + promptbutton + end + +.Anthony: + farwritetext AnthonyAnswerPhoneDayText + promptbutton + end + +.Todd: + farwritetext ToddAnswerPhoneDayText + promptbutton + end + +.Irwin: + farwritetext IrwinAnswerPhoneDayText + promptbutton + end + +.Arnie: + farwritetext ArnieAnswerPhoneDayText + promptbutton + end + +.Alan: + farwritetext AlanAnswerPhoneDayText + promptbutton + end + +.Chad: + farwritetext ChadAnswerPhoneDayText + promptbutton + end + +.Derek: + farwritetext DerekAnswerPhoneDayText + promptbutton + end + +.Tully: + farwritetext TullyAnswerPhoneDayText + promptbutton + end + +.Brent: + farwritetext BrentAnswerPhoneDayText + promptbutton + end + +.Vance: + farwritetext VanceAnswerPhoneDayText + promptbutton + end + +.Wilton: + farwritetext WiltonAnswerPhoneDayText + promptbutton + end + +.Kenji: + farwritetext KenjiAnswerPhoneDayText + promptbutton + end + +.Parry: + farwritetext ParryAnswerPhoneDayText + promptbutton + end + +PhoneScript_AnswerPhone_Male_Nite: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_JUGGLER_IRWIN, .Irwin + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackAnswerPhoneNiteText + promptbutton + end + +.Huey: + farwritetext HueyAnswerPhoneNiteText + promptbutton + end + +.Gaven: + farwritetext GavenAnswerPhoneNiteText + promptbutton + end + +.Jose: + farwritetext JoseAnswerPhoneNiteText + promptbutton + end + +.Joey: + farwritetext JoeyAnswerPhoneNiteText + promptbutton + end + +.Wade: + farwritetext WadeAnswerPhoneNiteText + promptbutton + end + +.Ralph: + farwritetext RalphAnswerPhoneNiteText + promptbutton + end + +.Anthony: + farwritetext AnthonyAnswerPhoneNiteText + promptbutton + end + +.Todd: + farwritetext ToddAnswerPhoneNiteText + promptbutton + end + +.Irwin: + farwritetext IrwinAnswerPhoneNiteText + promptbutton + end + +.Arnie: + farwritetext ArnieAnswerPhoneNiteText + promptbutton + end + +.Alan: + farwritetext AlanAnswerPhoneNiteText + promptbutton + end + +.Chad: + farwritetext ChadAnswerPhoneNiteText + promptbutton + end + +.Derek: + farwritetext DerekAnswerPhoneNiteText + promptbutton + end + +.Tully: + farwritetext TullyAnswerPhoneNiteText + promptbutton + end + +.Brent: + farwritetext BrentAnswerPhoneNiteText + promptbutton + end + +.Vance: + farwritetext VanceAnswerPhoneNiteText + promptbutton + end + +.Wilton: + farwritetext WiltonAnswerPhoneNiteText + promptbutton + end + +.Kenji: + farwritetext KenjiAnswerPhoneNiteText + promptbutton + end + +.Parry: + farwritetext ParryAnswerPhoneNiteText + promptbutton + end + +PhoneScript_AnswerPhone_Female: + checktime DAY + iftrue PhoneScript_AnswerPhone_Female_Day + checktime NITE + iftrue PhoneScript_AnswerPhone_Female_Nite + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyAnswerPhoneText + promptbutton + end + +.Beth: + farwritetext BethAnswerPhoneText + promptbutton + end + +.Reena: + farwritetext ReenaAnswerPhoneText + promptbutton + end + +.Liz: + farwritetext LizAnswerPhoneText + promptbutton + end + +.Gina: + farwritetext GinaAnswerPhoneText + promptbutton + end + +.Dana: + farwritetext DanaAnswerPhoneText + promptbutton + end + +.Tiffany: + farwritetext TiffanyAnswerPhoneText + promptbutton + end + +.Erin: + farwritetext ErinAnswerPhoneText + promptbutton + end + +PhoneScript_AnswerPhone_Female_Day: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyAnswerPhoneDayText + promptbutton + end + +.Beth: + farwritetext BethAnswerPhoneDayText + promptbutton + end + +.Reena: + farwritetext ReenaAnswerPhoneDayText + promptbutton + end + +.Liz: + farwritetext LizAnswerPhoneDayText + promptbutton + end + +.Gina: + farwritetext GinaAnswerPhoneDayText + promptbutton + end + +.Dana: + farwritetext DanaAnswerPhoneDayText + promptbutton + end + +.Tiffany: + farwritetext TiffanyAnswerPhoneDayText + promptbutton + end + +.Erin: + farwritetext ErinAnswerPhoneDayText + promptbutton + end + +PhoneScript_AnswerPhone_Female_Nite: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyAnswerPhoneNiteText + promptbutton + end + +.Beth: + farwritetext BethAnswerPhoneNiteText + promptbutton + end + +.Reena: + farwritetext ReenaAnswerPhoneNiteText + promptbutton + end + +.Liz: + farwritetext LizAnswerPhoneNiteText + promptbutton + end + +.Gina: + farwritetext GinaAnswerPhoneNiteText + promptbutton + end + +.Dana: + farwritetext DanaAnswerPhoneNiteText + promptbutton + end + +.Tiffany: + farwritetext TiffanyAnswerPhoneNiteText + promptbutton + end + +.Erin: + farwritetext ErinAnswerPhoneNiteText + promptbutton + end + +PhoneScript_GreetPhone_Male: + checktime DAY + iftrue PhoneScript_GreetPhone_Male_Day + checktime NITE + iftrue PhoneScript_GreetPhone_Male_Nite + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_JUGGLER_IRWIN, .Irwin + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackGreetText + promptbutton + end + +.Huey: + farwritetext HueyGreetText + promptbutton + end + +.Gaven: + farwritetext GavenGreetText + promptbutton + end + +.Jose: + farwritetext JoseGreetText + promptbutton + end + +.Joey: + farwritetext JoeyGreetText + promptbutton + end + +.Wade: + farwritetext WadeGreetText + promptbutton + end + +.Ralph: + farwritetext RalphGreetText + promptbutton + end + +.Anthony: + farwritetext AnthonyGreetText + promptbutton + end + +.Todd: + farwritetext ToddGreetText + promptbutton + end + +.Irwin: + farwritetext IrwinGreetText + promptbutton + end + +.Arnie: + farwritetext ArnieGreetText + promptbutton + end + +.Alan: + farwritetext AlanGreetText + promptbutton + end + +.Chad: + farwritetext ChadGreetText + promptbutton + end + +.Derek: + farwritetext DerekGreetText + promptbutton + end + +.Tully: + farwritetext TullyGreetText + promptbutton + end + +.Brent: + farwritetext BrentGreetText + promptbutton + end + +.Vance: + farwritetext VanceGreetText + promptbutton + end + +.Wilton: + farwritetext WiltonGreetText + promptbutton + end + +.Kenji: + farwritetext KenjiGreetText + promptbutton + end + +.Parry: + farwritetext ParryGreetText + promptbutton + end + +PhoneScript_GreetPhone_Male_Day: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_JUGGLER_IRWIN, .Irwin + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackGreetDayText + promptbutton + end + +.Huey: + farwritetext HueyGreetDayText + promptbutton + end + +.Gaven: + farwritetext GavenGreetDayText + promptbutton + end + +.Jose: + farwritetext JoseGreetDayText + promptbutton + end + +.Joey: + farwritetext JoeyGreetDayText + promptbutton + end + +.Wade: + farwritetext WadeGreetDayText + promptbutton + end + +.Ralph: + farwritetext RalphGreetDayText + promptbutton + end + +.Anthony: + farwritetext AnthonyGreetDayText + promptbutton + end + +.Todd: + farwritetext ToddGreetDayText + promptbutton + end + +.Irwin: + farwritetext IrwinGreetDayText + promptbutton + end + +.Arnie: + farwritetext ArnieGreetDayText + promptbutton + end + +.Alan: + farwritetext AlanGreetDayText + promptbutton + end + +.Chad: + farwritetext ChadGreetDayText + promptbutton + end + +.Derek: + farwritetext DerekGreetDayText + promptbutton + end + +.Tully: + farwritetext TullyGreetDayText + promptbutton + end + +.Brent: + farwritetext BrentGreetDayText + promptbutton + end + +.Vance: + farwritetext VanceGreetDayText + promptbutton + end + +.Wilton: + farwritetext WiltonGreetDayText + promptbutton + end + +.Kenji: + farwritetext KenjiGreetDayText + promptbutton + end + +.Parry: + farwritetext ParryGreetDayText + promptbutton + end + +PhoneScript_GreetPhone_Male_Nite: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_JUGGLER_IRWIN, .Irwin + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackGreetNiteText + promptbutton + end + +.Huey: + farwritetext HueyGreetNiteText + promptbutton + end + +.Gaven: + farwritetext GavenGreetNiteText + promptbutton + end + +.Jose: + farwritetext JoseGreetNiteText + promptbutton + end + +.Joey: + farwritetext JoeyGreetNiteText + promptbutton + end + +.Wade: + farwritetext WadeGreetNiteText + promptbutton + end + +.Ralph: + farwritetext RalphGreetNiteText + promptbutton + end + +.Anthony: + farwritetext AnthonyGreetNiteText + promptbutton + end + +.Todd: + farwritetext ToddGreetNiteText + promptbutton + end + +.Irwin: + farwritetext IrwinGreetNiteText + promptbutton + end + +.Arnie: + farwritetext ArnieGreetNiteText + promptbutton + end + +.Alan: + farwritetext AlanGreetNiteText + promptbutton + end + +.Chad: + farwritetext ChadGreetNiteText + promptbutton + end + +.Derek: + farwritetext DerekGreetNiteText + promptbutton + end + +.Tully: + farwritetext TullyGreetNiteText + promptbutton + end + +.Brent: + farwritetext BrentGreetNiteText + promptbutton + end + +.Vance: + farwritetext VanceGreetNiteText + promptbutton + end + +.Wilton: + farwritetext WiltonGreetNiteText + promptbutton + end + +.Kenji: + farwritetext KenjiGreetNiteText + promptbutton + end + +.Parry: + farwritetext ParryGreetNiteText + promptbutton + end + +PhoneScript_GreetPhone_Female: + checktime DAY + iftrue PhoneScript_GreetPhone_Female_Day + checktime NITE + iftrue PhoneScript_GreetPhone_Female_Nite + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyGreetText + promptbutton + end + +.Beth: + farwritetext BethGreetText + promptbutton + end + +.Reena: + farwritetext ReenaGreetText + promptbutton + end + +.Liz: + farwritetext LizGreetText + promptbutton + end + +.Gina: + farwritetext GinaGreetText + promptbutton + end + +.Dana: + farwritetext DanaGreetText + promptbutton + end + +.Tiffany: + farwritetext TiffanyGreetText + promptbutton + end + +.Erin: + farwritetext ErinGreetText + promptbutton + end + +PhoneScript_GreetPhone_Female_Day: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyGreetDayText + promptbutton + end + +.Beth: + farwritetext BethGreetDayText + promptbutton + end + +.Reena: + farwritetext ReenaGreetDayText + promptbutton + end + +.Liz: + farwritetext LizGreetDayText + promptbutton + end + +.Gina: + farwritetext GinaGreetDayText + promptbutton + end + +.Dana: + farwritetext DanaGreetDayText + promptbutton + end + +.Tiffany: + farwritetext TiffanyGreetDayText + promptbutton + end + +.Erin: + farwritetext ErinGreetDayText + promptbutton + end + +PhoneScript_GreetPhone_Female_Nite: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyGreetNiteText + promptbutton + end + +.Beth: + farwritetext BethGreetNiteText + promptbutton + end + +.Reena: + farwritetext ReenaGreetNiteText + promptbutton + end + +.Liz: + farwritetext LizGreetNiteText + promptbutton + end + +.Gina: + farwritetext GinaGreetNiteText + promptbutton + end + +.Dana: + farwritetext DanaGreetNiteText + promptbutton + end + +.Tiffany: + farwritetext TiffanyGreetNiteText + promptbutton + end + +.Erin: + farwritetext ErinGreetNiteText + promptbutton + end + +PhoneScript_Generic_Male: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackGenericText + promptbutton + end + +.Unknown: ; unreferenced + farwritetext UnknownGenericText + promptbutton + end + +.Gaven: + farwritetext GavenGenericText + promptbutton + end + +.Jose: + farwritetext JoseGenericText + promptbutton + end + +.Joey: + farwritetext JoeyGenericText + promptbutton + end + +.Wade: + farwritetext WadeGenericText + promptbutton + end + +.Ralph: + farwritetext RalphGenericText + promptbutton + end + +.Anthony: + farwritetext AnthonyGenericText + promptbutton + end + +.Todd: + farwritetext ToddGenericText + promptbutton + end + +.Arnie: + farwritetext ArnieGenericText + promptbutton + end + +.Alan: + farwritetext AlanGenericText + promptbutton + end + +.Chad: + farwritetext ChadGenericText + promptbutton + end + +.Derek: + farwritetext DerekGenericText + promptbutton + end + +.Tully: + farwritetext TullyGenericText + promptbutton + end + +.Brent: + farwritetext BrentGenericText + promptbutton + end + +.Vance: + farwritetext VanceGenericText + promptbutton + end + +.Wilton: + farwritetext WiltonGenericText + promptbutton + end + +.Parry: + farwritetext ParryGenericText + promptbutton + end + +PhoneScript_Generic_Female: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyGenericText + promptbutton + end + +.Beth: + farwritetext BethGenericText + promptbutton + end + +.Reena: + farwritetext ReenaGenericText + promptbutton + end + +.Liz: + farwritetext LizGenericText + promptbutton + end + +.Gina: + farwritetext GinaGenericText + promptbutton + end + +.Dana: + farwritetext DanaGenericText + promptbutton + end + +.Tiffany: + farwritetext TiffanyGenericText + promptbutton + end + +.Erin: + farwritetext ErinGenericText + promptbutton + end + +PhoneScript_MonFlavorText: + special RandomPhoneMon + farscall PhoneScript_Random2 + ifequal $0, .TooEnergetic + farwritetext UnknownGenericText + promptbutton + farsjump PhoneScript_HangUpText_Male + +.TooEnergetic: + farsjump .unnecessary + +.unnecessary + farwritetext UnknownTougherThanEverText + promptbutton + farsjump PhoneScript_HangUpText_Male + +GrandmaString: db "Grandma@" +GrandpaString: db "Grandpa@" +MomString: db "Mom@" +DadString: db "Dad@" +SisterString: db "Sister@" +BrotherString: db "Brother@" diff --git a/engine/phone/scripts/generic_caller.asm b/engine/phone/scripts/generic_caller.asm new file mode 100644 index 0000000..5dff565 --- /dev/null +++ b/engine/phone/scripts/generic_caller.asm @@ -0,0 +1,961 @@ +Phone_GenericCall_Male: + special RandomPhoneMon + farscall PhoneScript_Random2 + ifequal 0, .Bragging + farscall PhoneScript_Generic_Male + farsjump Phone_FoundAMon_Male + +.Bragging: + farsjump Phone_BraggingCall_Male + +Phone_GenericCall_Female: + special RandomPhoneMon + farscall PhoneScript_Random2 + ifequal 0, .Bragging + farscall PhoneScript_Generic_Female + farsjump Phone_FoundAMon_Female + +.Bragging: + farsjump Phone_BraggingCall_Female + +Phone_BraggingCall_Male: + farscall Phone_WhosBragging_Male + farsjump Phone_FoundAMon_Male + +Phone_BraggingCall_Female: + farscall Phone_WhosBragging_Female + farsjump Phone_FoundAMon_Female + +Phone_FoundAMon_Male: + special RandomPhoneWildMon + farscall PhoneScript_Random2 + ifequal 0, .GotAway + farscall Phone_WhoDefeatedMon_Male + farsjump PhoneScript_HangUpText_Male + +.GotAway: + farsjump Phone_GotAwayCall_Male + +Phone_FoundAMon_Female: + special RandomPhoneWildMon + farscall PhoneScript_Random2 + ifequal 0, .GotAway + farscall Phone_WhoDefeatedMon_Female + farsjump PhoneScript_HangUpText_Female + +.GotAway: + farsjump Phone_GotAwayCall_Female + +Phone_GotAwayCall_Male: + farscall Phone_WhoLostAMon_Male + farsjump PhoneScript_HangUpText_Male + +Phone_GotAwayCall_Female: + farscall Phone_WhoLostAMon_Female + farsjump PhoneScript_HangUpText_Female + +Phone_WhosBragging_Male: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackIntelligenceKeepsRisingText + promptbutton + end + +.Gaven: + farwritetext GavenMonGreaterThanImaginedText + promptbutton + end + +.Jose: + farwritetext JoseMonsStickHasADeliciousAromaText + promptbutton + end + +.Joey: + farwritetext JoeyMonLookingSharperText + promptbutton + end + +.Wade: + farwritetext WadeAreYourMonGrowingText + promptbutton + end + +.Ralph: + farwritetext RalphNeglectingKidsText + promptbutton + end + +.Anthony: + farwritetext AnthonyMonAteSomeBerriesText + promptbutton + end + +.Todd: + farwritetext ToddLooksCuteLikeMeText + promptbutton + end + +.Arnie: + farwritetext ArnieMonIsSoCuteText + promptbutton + end + +.Alan: + farwritetext AlanGettingStrongerText + promptbutton + end + +.Chad: + farwritetext ChadObservingWildText + promptbutton + end + +.Derek: + farwritetext DerekCheekPinchingText + promptbutton + end + +.Tully: + farwritetext TullyMonHasGrownText + promptbutton + end + +.Brent: + farwritetext BrentRareTradeText + promptbutton + end + +.Vance: + farwritetext VanceMonHasBecomeTougherText + promptbutton + end + +.Wilton: + farwritetext WiltonMonHasGrownText + promptbutton + end + +.Parry: + farwritetext ParryNothingCanMatchText + promptbutton + end + +Phone_WhosBragging_Female: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyMadeMonEvenCuterText + promptbutton + end + +.Beth: + farwritetext BethExhilaratingRideText + promptbutton + end + +.Reena: + farwritetext ReenaMonsIsAPerfectMatchText + promptbutton + end + +.Liz: + farwritetext LizMonAlwaysWantsToNuzzleText + promptbutton + end + +.Gina: + farwritetext GinaGettingInSyncWithMonText + promptbutton + end + +.Dana: + farwritetext DanaTakingPhotosText + promptbutton + end + +.Tiffany: + farwritetext TiffanyMonIsAdorableText + promptbutton + end + +.Erin: + farwritetext ErinMonIsMuchStrongerText + promptbutton + end + +Phone_WhoDefeatedMon_Male: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackDefeatedMonText + promptbutton + end + +.Gaven: + farwritetext GavenDefeatedMonText + promptbutton + end + +.Jose: + farwritetext JoseDefeatedMonText + promptbutton + end + +.Joey: + farwritetext JoeyDefeatedMonText + promptbutton + end + +.Wade: + farwritetext WadeDefeatedMonText + promptbutton + end + +.Ralph: + farwritetext RalphDefeatedMonText + promptbutton + end + +.Anthony: + farwritetext AnthonyDefeatedMonText + promptbutton + end + +.Todd: + farwritetext ToddDefeatedMonText + promptbutton + end + +.Arnie: + farwritetext ArnieDefeatedMonText + promptbutton + end + +.Alan: + farwritetext AlanDefeatedMonText + promptbutton + end + +.Chad: + farwritetext ChadDefeatedMonText + promptbutton + end + +.Derek: + farwritetext DerekDefeatedMonText + promptbutton + end + +.Tully: + farwritetext TullyDefeatedMonText + promptbutton + end + +.Brent: + farwritetext BrentDefeatedMonText + promptbutton + end + +.Vance: + farwritetext VanceDefeatedMonText + promptbutton + end + +.Wilton: + farwritetext WiltonDefeatedMonText + promptbutton + end + +.Parry: + farwritetext ParryDefeatedMonText + promptbutton + end + +Phone_WhoDefeatedMon_Female: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyDefeatedMonText + promptbutton + end + +.Beth: + farwritetext BethDefeatedMonText + promptbutton + end + +.Reena: + farwritetext ReenaDefeatedMonText + promptbutton + end + +.Liz: + farwritetext LizDefeatedMonText + promptbutton + end + +.Gina: + farwritetext GinaDefeatedMonText + promptbutton + end + +.Dana: + farwritetext DanaDefeatedMonText + promptbutton + end + +.Tiffany: + farwritetext TiffanyDefeatedMonText + promptbutton + end + +.Erin: + farwritetext ErinDefeatedMonText + promptbutton + end + +Phone_WhoLostAMon_Male: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackLostAMonText + promptbutton + end + +.Gaven: + farwritetext GavenLostAMonText + promptbutton + end + +.Jose: + farwritetext JoseLostAMonText + promptbutton + end + +.Joey: + farwritetext JoeyLostAMonText + promptbutton + end + +.Wade: + farwritetext WadeLostAMonText + promptbutton + end + +.Ralph: + farwritetext RalphLostAMonText + promptbutton + end + +.Anthony: + farwritetext AnthonyLostAMonText + promptbutton + end + +.Todd: + farwritetext ToddLostAMonText + promptbutton + end + +.Arnie: + farwritetext ArnieLostAMonText + promptbutton + end + +.Alan: + farwritetext AlanLostAMonText + promptbutton + end + +.Chad: + farwritetext ChadLostAMonText + promptbutton + end + +.Derek: + farwritetext DerekLostAMonText + promptbutton + end + +.Tully: + farwritetext TullyLostAMonText + promptbutton + end + +.Brent: + farwritetext BrentLostAMonText + promptbutton + end + +.Vance: + farwritetext VanceLostAMonText + promptbutton + end + +.Wilton: + farwritetext WiltonLostAMonText + promptbutton + end + +.Parry: + farwritetext ParryLostAMonText + promptbutton + end + +Phone_WhoLostAMon_Female: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyLostAMonText + promptbutton + end + +.Beth: + farwritetext BethLostAMonText + promptbutton + end + +.Reena: + farwritetext ReenaLostAMonText + promptbutton + end + +.Liz: + farwritetext LizLostAMonText + promptbutton + end + +.Gina: + farwritetext GinaLostAMonText + promptbutton + end + +.Dana: + farwritetext DanaLostAMonText + promptbutton + end + +.Tiffany: + farwritetext TiffanyLostAMonText + promptbutton + end + +.Erin: + farwritetext ErinLostAMonText + promptbutton + end + +PhoneScript_WantsToBattle_Male: + farscall PhoneScript_RematchText_Male + farsjump PhoneScript_HangUpText_Male + +PhoneScript_WantsToBattle_Female: + farscall PhoneScript_RematchText_Female + farsjump PhoneScript_HangUpText_Female + +PhoneScript_RematchText_Male: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackBattleRematchText + promptbutton + end + +.Huey: + farwritetext HueyBattleRematchText + promptbutton + end + +.Gaven: + farwritetext GavenBattleRematchText + promptbutton + end + +.Jose: + farwritetext JoseBattleRematchText + promptbutton + end + +.Joey: + farwritetext JoeyBattleRematchText + promptbutton + end + +.Wade: + farwritetext WadeBattleRematchText + promptbutton + end + +.Ralph: + farwritetext RalphBattleRematchText + promptbutton + end + +.Anthony: + farwritetext AnthonyBattleRematchText + promptbutton + end + +.Todd: + farwritetext ToddBattleRematchText + promptbutton + end + +.Arnie: + farwritetext ArnieBattleRematchText + promptbutton + end + +.Alan: + farwritetext AlanBattleRematchText + promptbutton + end + +.Chad: + farwritetext ChadBattleRematchText + promptbutton + end + +.Tully: + farwritetext TullyBattleRematchText + promptbutton + end + +.Brent: + farwritetext BrentBattleRematchText + promptbutton + end + +.Vance: + farwritetext VanceBattleRematchText + promptbutton + end + +.Wilton: + farwritetext WiltonBattleRematchText + promptbutton + end + +.Parry: + farwritetext ParryBattleRematchText + promptbutton + end + +PhoneScript_RematchText_Female: + readvar VAR_CALLERID + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beth: + farwritetext BethBattleRematchText + promptbutton + end + +.Reena: + farwritetext ReenaBattleRematchText + promptbutton + end + +.Liz: + farwritetext LizBattleRematchText + promptbutton + end + +.Gina: + farwritetext GinaBattleRematchText + promptbutton + end + +.Dana: + farwritetext DanaBattleRematchText + promptbutton + end + +.Tiffany: + farwritetext TiffanyBattleRematchText + promptbutton + end + +.Erin: + farwritetext ErinBattleRematchText + promptbutton + end + +LizWrongNumberScript: + farwritetext LizWrongNumberText + end + +TiffanyItsAwful: + farwritetext TiffanyItsAwfulText + end + +PhoneScript_HangUpText_Male: + readvar VAR_CALLERID + ifequal PHONE_SCHOOLBOY_JACK, .Jack + ifequal PHONE_SAILOR_HUEY, .Huey + ifequal PHONE_COOLTRAINERM_GAVEN, .Gaven + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_YOUNGSTER_JOEY, .Joey + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_FISHER_RALPH, .Ralph + ifequal PHONE_HIKER_ANTHONY, .Anthony + ifequal PHONE_CAMPER_TODD, .Todd + ifequal PHONE_JUGGLER_IRWIN, .Irwin + ifequal PHONE_BUG_CATCHER_ARNIE, .Arnie + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_SCHOOLBOY_CHAD, .Chad + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_POKEMANIAC_BRENT, .Brent + ifequal PHONE_BIRDKEEPER_VANCE, .Vance + ifequal PHONE_FISHER_WILTON, .Wilton + ifequal PHONE_BLACKBELT_KENJI, .Kenji + ifequal PHONE_HIKER_PARRY, .Parry + +.Jack: + farwritetext JackHangUpText + end + +.Huey: + farwritetext HueyHangUpText + end + +.Gaven: + farwritetext GavenHangUpText + end + +.Jose: + farwritetext JoseHangUpText + end + +.Joey: + farwritetext JoeyHangUpText + end + +.Wade: + farwritetext WadeHangUpText + end + +.Ralph: + farwritetext RalphHangUpText + end + +.Anthony: + farwritetext AnthonyHangUpText + end + +.Todd: + farwritetext ToddHangUpText + end + +.Irwin: + farwritetext IrwinHangUpText + end + +.Arnie: + farwritetext ArnieHangUpText + end + +.Alan: + farwritetext AlanHangUpText + end + +.Chad: + farwritetext ChadHangUpText + end + +.Derek: + farwritetext DerekHangUpText + end + +.Tully: + farwritetext TullyHangUpText + end + +.Brent: + farwritetext BrentHangUpText + end + +.Vance: + farwritetext VanceHangUpText + end + +.Wilton: + farwritetext WiltonHangUpText + end + +.Kenji: + farwritetext KenjiHangUpText + end + +.Parry: + farwritetext ParryHangUpText + end + +PhoneScript_HangUpText_Female: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_COOLTRAINERF_BETH, .Beth + ifequal PHONE_COOLTRAINERF_REENA, .Reena + ifequal PHONE_PICNICKER_LIZ, .Liz + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + ifequal PHONE_PICNICKER_ERIN, .Erin + +.Beverly: + farwritetext BeverlyHangUpText + end + +.Beth: + farwritetext BethHangUpText + end + +.Reena: + farwritetext ReenaHangUpText + end + +.Liz: + farwritetext LizHangUpText + end + +.Gina: + farwritetext GinaHangUpText + end + +.Dana: + farwritetext DanaHangUpText + end + +.Tiffany: + farwritetext TiffanyHangUpText + end + +.Erin: + farwritetext ErinHangUpText + end + +Phone_CheckIfUnseenRare_Male: + scall PhoneScriptRareWildMon + iffalse .HangUp + farsjump Phone_GenericCall_Male + +.HangUp: + farsjump PhoneScript_HangUpText_Male + +Phone_CheckIfUnseenRare_Female: + scall PhoneScriptRareWildMon + iffalse .HangUp + farsjump Phone_GenericCall_Female + +.HangUp: + farsjump PhoneScript_HangUpText_Female + +PhoneScriptRareWildMon: + special RandomUnseenWildMon + end + +PhoneScript_BugCatchingContest: + readvar VAR_CALLERID + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_POKEFANM_DEREK, .Derek + +.Wade: + farwritetext WadeBugCatchingContestText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Derek: + farwritetext DerekBugCatchingContestText + promptbutton + sjump PhoneScript_HangUpText_Male + +IrwinRocketRumorScript: + farwritetext IrwinRocketTakeoverRumorText + promptbutton + sjump PhoneScript_HangUpText_Male + +GinaRocketRumorScript: + farwritetext GinaRocketTakeoverRumorText + promptbutton + sjump PhoneScript_HangUpText_Female + +ArnieSwarmScript: + farwritetext ArnieSwarmText + promptbutton + sjump PhoneScript_HangUpText_Male + +RalphItemScript: + farwritetext RalphItemText + promptbutton + sjump PhoneScript_HangUpText_Male + +AnthonySwarmScript: + farwritetext AnthonySwarmText + promptbutton + sjump PhoneScript_HangUpText_Male + +PhoneScript_FoundItem_Male: + readvar VAR_CALLERID + ifequal PHONE_BIRDKEEPER_JOSE, .Jose + ifequal PHONE_BUG_CATCHER_WADE, .Wade + ifequal PHONE_SCHOOLBOY_ALAN, .Alan + ifequal PHONE_POKEFANM_DEREK, .Derek + ifequal PHONE_FISHER_TULLY, .Tully + ifequal PHONE_FISHER_WILTON, .Wilton + +.Jose: + farwritetext JoseFoundItemText + end + +.Wade: + farwritetext WadeFoundItemText + end + +.Alan: + farwritetext AlanFoundItemText + end + +.Derek: + farwritetext DerekFoundItemText + end + +.Tully: + farwritetext TullyFoundItemText + end + +.Wilton: + farwritetext WiltonFoundItemText + end + +PhoneScript_FoundItem_Female: + readvar VAR_CALLERID + ifequal PHONE_POKEFAN_BEVERLY, .Beverly + ifequal PHONE_PICNICKER_GINA, .Gina + ifequal PHONE_LASS_DANA, .Dana + ifequal PHONE_PICNICKER_TIFFANY, .Tiffany + +.Beverly: + farwritetext BeverlyFoundItemText + end + +.Gina: + farwritetext GinaFoundItemText + end + +.Dana: + farwritetext DanaFoundItemText + end + +.Tiffany: + farwritetext TiffanyFoundItemText + end + +ToddItemScript: + farwritetext ToddDepartmentStoreBargainSaleText + promptbutton + sjump PhoneScript_HangUpText_Male + +KenjiCallingPhoneScript: + farwritetext KenjiRemainDedicatedText + promptbutton + sjump PhoneScript_HangUpText_Male diff --git a/engine/phone/scripts/gina.asm b/engine/phone/scripts/gina.asm new file mode 100644 index 0000000..40ae3fa --- /dev/null +++ b/engine/phone/scripts/gina.asm @@ -0,0 +1,72 @@ +GinaPhoneCalleeScript: + gettrainername STRING_BUFFER_3, PICNICKER, GINA1 + checkflag ENGINE_GINA_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Female + checkflag ENGINE_GINA_SUNDAY_AFTERNOON + iftrue .NotSunday + checkflag ENGINE_GINA_HAS_LEAF_STONE + iftrue .HasLeafStone + readvar VAR_WEEKDAY + ifnotequal SUNDAY, .NotSunday + checktime DAY + iftrue GinaSundayDay + +.NotSunday: + checkflag ENGINE_ROCKETS_IN_RADIO_TOWER + iftrue .Rockets + farsjump GinaHangUpScript + +.Rockets: + farsjump GinaRocketRumorScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_34 + farsjump GinaReminderScript + +.HasLeafStone: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_34 + farsjump GinaComePickUpScript + +GinaPhoneCallerScript: + gettrainername STRING_BUFFER_3, PICNICKER, GINA1 + farscall PhoneScript_GreetPhone_Female + checkflag ENGINE_ROCKETS_IN_RADIO_TOWER + iftrue GinaRockets + checkflag ENGINE_GINA_READY_FOR_REMATCH + iftrue .Generic + checkflag ENGINE_GINA_SUNDAY_AFTERNOON + iftrue .Generic + checkflag ENGINE_GINA_HAS_LEAF_STONE + iftrue .Generic + checkevent EVENT_GINA_GAVE_LEAF_STONE + iftrue .GaveLeafStone + farscall PhoneScript_Random2 + ifequal 0, GinaHasLeafStone + +.GaveLeafStone: + farscall PhoneScript_Random11 + ifequal 0, GinaHasLeafStone + checkflag ENGINE_FLYPOINT_GOLDENROD + iffalse .Generic + farscall PhoneScript_Random3 + ifequal 0, GinaWantsBattle + +.Generic: + farsjump Phone_GenericCall_Female + +GinaSundayDay: + setflag ENGINE_GINA_SUNDAY_AFTERNOON + +GinaWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_34 + setflag ENGINE_GINA_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Female + +GinaRockets: + farsjump GinaRocketRumorScript + +GinaHasLeafStone: + setflag ENGINE_GINA_HAS_LEAF_STONE + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_34 + farsjump PhoneScript_FoundItem_Female diff --git a/engine/phone/scripts/hangups.asm b/engine/phone/scripts/hangups.asm new file mode 100644 index 0000000..7ca1db5 --- /dev/null +++ b/engine/phone/scripts/hangups.asm @@ -0,0 +1,183 @@ +JackPhoneTipsScript: + farwritetext JackHeardSomeGreatTipsText + promptbutton + sjump PhoneScript_HangUpText_Male + +BeverlyHangUpScript: + farwritetext BeverlyLetsChatAboutMonAgainText + promptbutton + sjump PhoneScript_HangUpText_Female + +HueyHangUpScript: + farwritetext HueyWeHaveToBattleAgainSometimeText + promptbutton + sjump PhoneScript_HangUpText_Male + +GavenHangUpNotThursdayScript: + farwritetext GavenHangUpNotThursdayText + promptbutton + sjump PhoneScript_HangUpText_Male + +BethHangUpScript: + farwritetext BethLetsBattleAgainSometimeText + promptbutton + sjump PhoneScript_HangUpText_Female + +JoseHangUpScript: + farwritetext JoseHaventGottenItemYetText + promptbutton + sjump PhoneScript_HangUpText_Male + +ReenaForwardScript: + farwritetext ReenaForwardText + promptbutton + sjump PhoneScript_HangUpText_Female + +JoeyHangUpScript: + farwritetext JoeyDevisingStrategiesText + promptbutton + sjump PhoneScript_HangUpText_Male + +WadeNoBerriesScript: + farwritetext WadeNoBerriesText + promptbutton + sjump PhoneScript_HangUpText_Male + +RalphNoItemScript: + farwritetext RalphNoItemText + promptbutton + sjump PhoneScript_HangUpText_Male + +LizHangUpScript: + farwritetext LizFawningOverMonText + promptbutton + sjump PhoneScript_HangUpText_Female + +AnthonyHangUpScript: + farwritetext AnthonyWasntPayingAttentionText + promptbutton + sjump PhoneScript_HangUpText_Male + +ToddNoItemScript: + farwritetext ToddSavingUpForBargainSaleText + promptbutton + sjump PhoneScript_HangUpText_Male + +GinaHangUpScript: + farwritetext GinaHaventFoundAnythingYetText + promptbutton + sjump PhoneScript_HangUpText_Female + +ArnieHangUpScript: + farwritetext ArnieHaventSeenRareMonText + promptbutton + sjump PhoneScript_HangUpText_Male + +AlanHangUpScript: + farwritetext AlanHaventPickedUpAnythingText + promptbutton + sjump PhoneScript_HangUpText_Male + +DanaHangUpScript: + farwritetext DanaCanYouWaitABitLongerText + promptbutton + sjump PhoneScript_HangUpText_Female + +ChadHangUpScript: + farwritetext ChadGoingToStudyHardText + promptbutton + sjump PhoneScript_HangUpText_Male + +DerekHangUpScript: + farwritetext DerekLetsGetTogetherText + promptbutton + sjump PhoneScript_HangUpText_Male + +TullyNoItemScript: + farwritetext TullyNoItemText + promptbutton + sjump PhoneScript_HangUpText_Male + +BrentHangUpScript: + farwritetext BrentSorryImTooBusyText + promptbutton + sjump PhoneScript_HangUpText_Male + +TiffanyNoItemScript: + farwritetext TiffanyNoItemText + promptbutton + sjump PhoneScript_HangUpText_Female + +VanceLookingForwardScript: + farwritetext VanceLookingForwardText + promptbutton + sjump PhoneScript_HangUpText_Male + +WiltonHaventFoundAnythingScript: + farwritetext WiltonHaventFoundAnythingText + promptbutton + sjump PhoneScript_HangUpText_Male + +ParryBattleWithMeScript: + farwritetext ParryBattleWithMeText + promptbutton + sjump PhoneScript_HangUpText_Male + +ErinWorkingHardScript: + farwritetext ErinWorkingHardText + promptbutton + sjump PhoneScript_HangUpText_Female + +IrwinRandomTextScript: + random 3 + ifequal 0, IrwinEscapadeScript + ifequal 1, IrwinGoodMatchScript + ifequal 2, IrwinSoMuchToChatAboutScript + +IrwinEscapadeScript: + farwritetext IrwinYourEscapadesRockText + promptbutton + sjump PhoneScript_HangUpText_Male + +IrwinGoodMatchScript: + farwritetext IrwinGoodMatchText + promptbutton + sjump PhoneScript_HangUpText_Male + +IrwinSoMuchToChatAboutScript: + farwritetext IrwinSoMuchToChatAboutText + promptbutton + sjump PhoneScript_HangUpText_Male + +KenjiAnswerPhoneScript: + readvar VAR_KENJI_BREAK + ifequal 2, .Training + ifequal 1, .OnBreak + farwritetext KenjiCallMeBackAnotherTimeText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Training: + farwritetext KenjiIllHaveTimeToChatTomorrowText + promptbutton + sjump PhoneScript_HangUpText_Male + +.OnBreak: + checktime MORN + iftrue .Morning + checktime NITE + iftrue .Night + setevent EVENT_KENJI_ON_BREAK + farwritetext KenjiTakingABreakText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Morning: + farwritetext KenjiHangUpMorningText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Night: + farwritetext KenjiHangUpNightText + promptbutton + sjump PhoneScript_HangUpText_Male diff --git a/engine/phone/scripts/hangups_2.asm b/engine/phone/scripts/hangups_2.asm new file mode 100644 index 0000000..197845f --- /dev/null +++ b/engine/phone/scripts/hangups_2.asm @@ -0,0 +1,49 @@ +BeverlyComePickUpScript: + farwritetext BeverlyComePickUpText + promptbutton + sjump PhoneScript_HangUpText_Female + +JoseComePickUpScript: ; unreferenced + farwritetext JoseComePickUpText + promptbutton + sjump PhoneScript_HangUpText_Male + +WadeComeQuickScript: + farwritetext WadeComeQuickText + promptbutton + sjump PhoneScript_HangUpText_Male + +GinaComePickUpScript: + farwritetext GinaComePickUpText + promptbutton + sjump PhoneScript_HangUpText_Female + +AlanComePickUpScript: + farwritetext AlanComePickUpGiftText + promptbutton + sjump PhoneScript_HangUpText_Male + +DanaComePickUpScript: + farwritetext DanaComePickUpText + promptbutton + sjump PhoneScript_HangUpText_Female + +DerekComePickUpScript: + farwritetext DerekComePickUpText + promptbutton + sjump PhoneScript_HangUpText_Male + +TullyHurryScript: + farwritetext TullyHurryText + promptbutton + sjump PhoneScript_HangUpText_Male + +TiffanyHurryScript: + farwritetext TiffanyHurryText + promptbutton + sjump PhoneScript_HangUpText_Female + +WiltonWantThisScript: + farwritetext WiltonWantThisText + promptbutton + sjump PhoneScript_HangUpText_Male diff --git a/engine/phone/scripts/huey.asm b/engine/phone/scripts/huey.asm new file mode 100644 index 0000000..d300792 --- /dev/null +++ b/engine/phone/scripts/huey.asm @@ -0,0 +1,41 @@ +HueyPhoneCalleeScript: + gettrainername STRING_BUFFER_3, SAILOR, HUEY1 + checkflag ENGINE_HUEY_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_HUEY_WEDNESDAY_NIGHT + iftrue .NotWednesday + readvar VAR_WEEKDAY + ifnotequal WEDNESDAY, .NotWednesday + checktime NITE + iftrue HueyWednesdayNight + +.NotWednesday: + special RandomPhoneMon + farsjump HueyHangUpScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_LIGHTHOUSE + farsjump HueyWantsBattleScript + +HueyPhoneCallerScript: + gettrainername STRING_BUFFER_3, SAILOR, HUEY1 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_HUEY_READY_FOR_REMATCH + iftrue .Flavor + checkflag ENGINE_HUEY_WEDNESDAY_NIGHT + iftrue .Flavor + farscall PhoneScript_Random3 + ifequal 0, HueyWantsBattle + ifequal 1, HueyWantsBattle + +.Flavor: + farsjump PhoneScript_MonFlavorText + +HueyWednesdayNight: + setflag ENGINE_HUEY_WEDNESDAY_NIGHT + +HueyWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_LIGHTHOUSE + setflag ENGINE_HUEY_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male diff --git a/engine/phone/scripts/irwin.asm b/engine/phone/scripts/irwin.asm new file mode 100644 index 0000000..b7a7b11 --- /dev/null +++ b/engine/phone/scripts/irwin.asm @@ -0,0 +1,19 @@ +IrwinPhoneCalleeScript: + gettrainername STRING_BUFFER_3, JUGGLER, IRWIN1 + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_ROCKETS_IN_RADIO_TOWER + iftrue .Rockets + farsjump IrwinRandomTextScript + +.Rockets: + farsjump IrwinRocketRumorScript + +IrwinPhoneCallerScript: + gettrainername STRING_BUFFER_3, JUGGLER, IRWIN1 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_ROCKETS_IN_RADIO_TOWER + iftrue .Rockets + farsjump IrwinRumorScript + +.Rockets: + farsjump IrwinRocketRumorScript diff --git a/engine/phone/scripts/irwin_gossip.asm b/engine/phone/scripts/irwin_gossip.asm new file mode 100644 index 0000000..2a377e2 --- /dev/null +++ b/engine/phone/scripts/irwin_gossip.asm @@ -0,0 +1,88 @@ +IrwinRumorScript: + checkevent EVENT_OPENED_MT_SILVER + iftrue .MtSilver + checkevent EVENT_FOUGHT_SNORLAX + iftrue .Snorlax + checkevent EVENT_GOT_PASS_FROM_COPYCAT + iftrue .TrainPass + checkflag ENGINE_MARSHBADGE + iftrue .MarshBadge + checkflag ENGINE_FLYPOINT_VERMILION + iftrue .VermilionCity + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .EliteFour + checkflag ENGINE_RISINGBADGE + iftrue .RisingBadge + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .RadioTower + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .RocketHideout + checkevent EVENT_JASMINE_RETURNED_TO_GYM + iftrue .JasmineReturned + checkflag ENGINE_FOGBADGE + iftrue .FogBadge + checkflag ENGINE_PLAINBADGE + iftrue .PlainBadge + farwritetext IrwinCalledRightAwayText + promptbutton + sjump PhoneScript_HangUpText_Male + +.PlainBadge: + farwritetext IrwinPlainBadgeGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.JasmineReturned: + farwritetext IrwinJasmineReturnedGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.RocketHideout: + farwritetext IrwinRocketHideoutGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.RadioTower: + farwritetext IrwinRadioTowerGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.RisingBadge: + farwritetext IrwinRisingBadgeGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.EliteFour: + farwritetext IrwinEliteFourGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.VermilionCity: + farwritetext IrwinVermilionCityGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.TrainPass: + farwritetext IrwinTrainPassGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Snorlax: + farwritetext IrwinSnorlaxGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.MtSilver: + farwritetext IrwinMtSilverGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.FogBadge: + farwritetext IrwinFogBadgeGossipText + promptbutton + sjump PhoneScript_HangUpText_Male + +.MarshBadge: + farwritetext IrwinMarshBadgeGossipText + promptbutton + sjump PhoneScript_HangUpText_Male diff --git a/engine/phone/scripts/jack.asm b/engine/phone/scripts/jack.asm new file mode 100644 index 0000000..1521af6 --- /dev/null +++ b/engine/phone/scripts/jack.asm @@ -0,0 +1,49 @@ +JackPhoneCalleeScript: + gettrainername STRING_BUFFER_3, SCHOOLBOY, JACK1 + checkflag ENGINE_JACK_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_JACK_MONDAY_MORNING + iftrue .NotMonday + readvar VAR_WEEKDAY + ifnotequal MONDAY, .NotMonday + checktime MORN + iftrue JackMondayMorning + +.NotMonday: + farsjump JackPhoneTipsScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_NATIONAL_PARK + farsjump JackWantsBattleScript + +JackPhoneCallerScript: + gettrainername STRING_BUFFER_3, SCHOOLBOY, JACK1 + farscall PhoneScript_GreetPhone_Male + farscall PhoneScript_Random2 + ifequal 0, JackBattleTrivia + checkflag ENGINE_JACK_READY_FOR_REMATCH + iftrue .WaitingForBattle + checkflag ENGINE_JACK_MONDAY_MORNING + iftrue .WaitingForBattle + farscall PhoneScript_Random2 + ifequal 0, JackWantsToBattle + +.WaitingForBattle: + farscall PhoneScript_Random3 + ifequal 0, JackFindsRare + farsjump Phone_GenericCall_Male + +JackMondayMorning: + setflag ENGINE_JACK_MONDAY_MORNING + +JackWantsToBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_NATIONAL_PARK + setflag ENGINE_JACK_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +JackFindsRare: + farsjump Phone_CheckIfUnseenRare_Male + +JackBattleTrivia: + farsjump JackTriviaScript diff --git a/engine/phone/scripts/jack_gossip.asm b/engine/phone/scripts/jack_gossip.asm new file mode 100644 index 0000000..0ebdf3a --- /dev/null +++ b/engine/phone/scripts/jack_gossip.asm @@ -0,0 +1,68 @@ +JackTriviaScript: + random 11 + ifequal 0, .Thunder + ifequal 1, .Rollout + ifequal 2, .Solarbeam + ifequal 3, .Stomp + ifequal 4, .Gust + ifequal 5, .Twister + ifequal 6, .Earthquake + ifequal 7, .Magnitude + ifequal 8, .Sandstorm + ifequal 9, .SunnyDay + ifequal 10, .RainDance + +.Thunder: + farwritetext JackThunderTriviaText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Rollout: + farwritetext JackRolloutTriviaText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Solarbeam: + farwritetext JackSolarbeamTriviaText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Stomp: + farwritetext JackStompTriviaText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Gust: + farwritetext JackGustTriviaText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Twister: + farwritetext JackTwisterTriviaText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Earthquake: + farwritetext JackEarthquakeTriviaText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Magnitude: + farwritetext JackMagnitudeTriviaText + promptbutton + sjump PhoneScript_HangUpText_Male + +.Sandstorm: + farwritetext JackSandstormTriviaText + promptbutton + sjump PhoneScript_HangUpText_Male + +.SunnyDay: + farwritetext JackSunnyDayTriviaText + promptbutton + sjump PhoneScript_HangUpText_Male + +.RainDance: + farwritetext JackRainDanceTriviaText + promptbutton + sjump PhoneScript_HangUpText_Male diff --git a/engine/phone/scripts/joey.asm b/engine/phone/scripts/joey.asm new file mode 100644 index 0000000..0d6f372 --- /dev/null +++ b/engine/phone/scripts/joey.asm @@ -0,0 +1,41 @@ +JoeyPhoneCalleeScript: + gettrainername STRING_BUFFER_3, YOUNGSTER, JOEY1 + checkflag ENGINE_JOEY_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_JOEY_MONDAY_AFTERNOON + iftrue .NotMonday + readvar VAR_WEEKDAY + ifnotequal MONDAY, .NotMonday + checktime DAY + iftrue JoeyMondayAfternoon + +.NotMonday: + special RandomPhoneMon + farsjump JoeyHangUpScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_30 + farsjump JoeyReminderScript + +JoeyPhoneCallerScript: + gettrainername STRING_BUFFER_3, YOUNGSTER, JOEY1 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_JOEY_READY_FOR_REMATCH + iftrue .Generic + checkflag ENGINE_JOEY_MONDAY_AFTERNOON + iftrue .Generic + farscall PhoneScript_Random3 + ifequal 0, JoeyWantsBattle + ifequal 1, JoeyWantsBattle + +.Generic: + farsjump Phone_GenericCall_Male + +JoeyMondayAfternoon: + setflag ENGINE_JOEY_MONDAY_AFTERNOON + +JoeyWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_30 + setflag ENGINE_JOEY_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male diff --git a/engine/phone/scripts/jose.asm b/engine/phone/scripts/jose.asm new file mode 100644 index 0000000..742ddcd --- /dev/null +++ b/engine/phone/scripts/jose.asm @@ -0,0 +1,59 @@ +JosePhoneCalleeScript: + gettrainername STRING_BUFFER_3, BIRD_KEEPER, JOSE2 + checkflag ENGINE_JOSE_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_JOSE_SATURDAY_NIGHT + iftrue .NotSaturday + checkflag ENGINE_JOSE_HAS_STAR_PIECE + iftrue .HasItem + readvar VAR_WEEKDAY + ifnotequal SATURDAY, .NotSaturday + checktime NITE + iftrue JoseSaturdayNight + +.NotSaturday: + farsjump JoseHangUpScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_27 + farsjump JoseReminderScript + +.HasItem: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_27 + farsjump JoseReminderScript + +JosePhoneCallerScript: + gettrainername STRING_BUFFER_3, BIRD_KEEPER, JOSE2 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_JOSE_READY_FOR_REMATCH + iftrue .Generic + checkflag ENGINE_JOSE_SATURDAY_NIGHT + iftrue .Generic + checkflag ENGINE_JOSE_HAS_STAR_PIECE + iftrue .Generic + farscall PhoneScript_Random3 + ifequal 0, JoseWantsBattle + farscall PhoneScript_Random3 + ifequal 0, JoseHasStarPiece + +.Generic: + farscall PhoneScript_Random3 + ifequal 0, JoseFoundRare + farsjump Phone_GenericCall_Male + +JoseSaturdayNight: + setflag ENGINE_JOSE_SATURDAY_NIGHT + +JoseWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_27 + setflag ENGINE_JOSE_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +JoseFoundRare: + farsjump Phone_CheckIfUnseenRare_Male + +JoseHasStarPiece: + setflag ENGINE_JOSE_HAS_STAR_PIECE + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_27 + farsjump PhoneScript_FoundItem_Male diff --git a/engine/phone/scripts/kenji.asm b/engine/phone/scripts/kenji.asm new file mode 100644 index 0000000..807510d --- /dev/null +++ b/engine/phone/scripts/kenji.asm @@ -0,0 +1,9 @@ +KenjiPhoneCalleeScript: + gettrainername STRING_BUFFER_3, BLACKBELT_T, KENJI3 + farscall PhoneScript_AnswerPhone_Male + farsjump KenjiAnswerPhoneScript + +KenjiPhoneCallerScript: + gettrainername STRING_BUFFER_3, BLACKBELT_T, KENJI3 + farscall PhoneScript_GreetPhone_Male + farsjump KenjiCallingPhoneScript diff --git a/engine/phone/scripts/liz.asm b/engine/phone/scripts/liz.asm new file mode 100644 index 0000000..b4aacd4 --- /dev/null +++ b/engine/phone/scripts/liz.asm @@ -0,0 +1,102 @@ +LizPhoneCalleeScript: + gettrainername STRING_BUFFER_3, PICNICKER, LIZ1 + checkflag ENGINE_LIZ_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Female + checkflag ENGINE_LIZ_THURSDAY_AFTERNOON + iftrue .NotThursday + readvar VAR_WEEKDAY + ifnotequal THURSDAY, .NotThursday + checktime DAY + iftrue LizThursdayAfternoon + +.NotThursday: + special RandomPhoneMon + farsjump LizHangUpScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_32 + farsjump LizReminderScript + +LizPhoneCallerScript: + gettrainername STRING_BUFFER_3, PICNICKER, LIZ1 + farscall PhoneScript_Random4 + ifequal 0, LizWrongNumber + farscall PhoneScript_GreetPhone_Female + checkflag ENGINE_LIZ_READY_FOR_REMATCH + iftrue .next + checkflag ENGINE_LIZ_THURSDAY_AFTERNOON + iftrue .next + +.next: + farscall PhoneScript_Random2 + ifequal 0, LizGossip + checkflag ENGINE_FLYPOINT_GOLDENROD + iffalse .Generic + farscall PhoneScript_Random2 + ifequal 0, LizWantsBattle + +.Generic: + farsjump Phone_GenericCall_Female + +LizThursdayAfternoon: + setflag ENGINE_LIZ_THURSDAY_AFTERNOON + +LizWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_32 + setflag ENGINE_LIZ_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Female + +LizWrongNumber: + farsjump LizWrongNumberScript + +LizGossip: + random 9 + ifequal 0, .CoolTrainerM + ifequal 1, .Beauty + ifequal 2, .Grunt + ifequal 3, .Teacher + ifequal 4, .SwimmerF + ifequal 5, .KimonoGirl + ifequal 6, .Skier + ifequal 7, .Medium + ifequal 8, .PokefanM + +.CoolTrainerM: + gettrainerclassname STRING_BUFFER_4, COOLTRAINERM + sjump LizGossipScript + +.Beauty: + gettrainerclassname STRING_BUFFER_4, BEAUTY + sjump LizGossipScript + +.Grunt: + gettrainerclassname STRING_BUFFER_4, GRUNTM + sjump LizGossipScript + +.Teacher: + gettrainerclassname STRING_BUFFER_4, TEACHER + sjump LizGossipScript + +.SwimmerF: + gettrainerclassname STRING_BUFFER_4, SWIMMERF + sjump LizGossipScript + +.KimonoGirl: + gettrainerclassname STRING_BUFFER_4, KIMONO_GIRL + sjump LizGossipScript + +.Skier: + gettrainerclassname STRING_BUFFER_4, SKIER + sjump LizGossipScript + +.Medium: + gettrainerclassname STRING_BUFFER_4, MEDIUM + sjump LizGossipScript + +.PokefanM: + gettrainerclassname STRING_BUFFER_4, POKEFANM + sjump LizGossipScript + +LizGossipScript: + farsjump LizGossipRandomScript diff --git a/engine/phone/scripts/liz_gossip.asm b/engine/phone/scripts/liz_gossip.asm new file mode 100644 index 0000000..4f2443b --- /dev/null +++ b/engine/phone/scripts/liz_gossip.asm @@ -0,0 +1,62 @@ +LizGossipRandomScript: + random 10 + ifequal 0, .RuinsOfAlph + ifequal 1, .Falkner + ifequal 2, .Earl + ifequal 3, .SurfPikachu + ifequal 4, .MooMooMilk + ifequal 5, .Salon + ifequal 6, .Whitney + ifequal 7, .BugCatchingContest + ifequal 8, .BeautifulTrainer + ifequal 9, .Forgot + +.RuinsOfAlph: + farwritetext LizRuinsOfAlphGossipText + promptbutton + sjump PhoneScript_HangUpText_Female + +.Falkner: + farwritetext LizFalknerGossipText + promptbutton + sjump PhoneScript_HangUpText_Female + +.Earl: + farwritetext LizEarlGossipText + promptbutton + sjump PhoneScript_HangUpText_Female + +.SurfPikachu: + farwritetext LizSurfPikachuGossipText + promptbutton + sjump PhoneScript_HangUpText_Female + +.MooMooMilk: + farwritetext LizMooMooMilkGossipText + promptbutton + sjump PhoneScript_HangUpText_Female + +.Salon: + farwritetext LizSalonGossipText + promptbutton + sjump PhoneScript_HangUpText_Female + +.Whitney: + farwritetext LizWhitneyGossipText + promptbutton + sjump PhoneScript_HangUpText_Female + +.BugCatchingContest: + farwritetext LizBugCatchingContestGossipText + promptbutton + sjump PhoneScript_HangUpText_Female + +.BeautifulTrainer: + farwritetext LizBeautifulTrainerGossipText + promptbutton + sjump PhoneScript_HangUpText_Female + +.Forgot: + farwritetext LizForgotGossipText + promptbutton + sjump PhoneScript_HangUpText_Female diff --git a/engine/phone/scripts/mom.asm b/engine/phone/scripts/mom.asm new file mode 100644 index 0000000..40a8ba5 --- /dev/null +++ b/engine/phone/scripts/mom.asm @@ -0,0 +1,142 @@ +MomPhoneCalleeScript: + checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST + iftrue .started_quest + checkevent EVENT_DUDE_TALKED_TO_YOU + iftrue MomPhoneLectureScript + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iftrue MomPhoneNoGymQuestScript + checkevent EVENT_GOT_A_POKEMON_FROM_ELM + iftrue MomPhoneNoPokedexScript + sjump MomPhoneNoPokemonScript + +.started_quest + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_8 + iftrue MomPhoneHangUpScript + farwritetext MomPhoneGreetingText + promptbutton + getcurlandmarkname STRING_BUFFER_3 + readvar VAR_ENVIRONMENT + ifequal TOWN, MomPhoneInTown + ifequal ROUTE, MomPhoneOnRoute + sjump MomPhoneOther + +MomPhoneLandmark: + farwritetext MomPhoneLandmarkText + promptbutton + sjump MomSavingMoney + +MomPhoneInTown: + readvar VAR_MAPGROUP + ifequal GROUP_NEW_BARK_TOWN, .newbark + ifequal GROUP_CHERRYGROVE_CITY, .cherrygrove + ifequal GROUP_VIOLET_CITY, .violet + ifequal GROUP_AZALEA_TOWN, .azalea + ifequal GROUP_GOLDENROD_CITY, .goldenrod + farwritetext MomPhoneGenericAreaText + promptbutton + sjump MomSavingMoney + +.newbark + farwritetext MomPhoneNewBarkText + promptbutton + sjump MomSavingMoney + +.cherrygrove + farwritetext MomPhoneCherrygroveText + promptbutton + sjump MomSavingMoney + +.violet + getlandmarkname STRING_BUFFER_4, LANDMARK_SPROUT_TOWER + sjump MomPhoneLandmark +.azalea + getlandmarkname STRING_BUFFER_4, LANDMARK_SLOWPOKE_WELL + sjump MomPhoneLandmark +.goldenrod + getlandmarkname STRING_BUFFER_4, LANDMARK_RADIO_TOWER + sjump MomPhoneLandmark + +MomPhoneOnRoute: + farwritetext MomOtherAreaText + promptbutton + sjump MomSavingMoney + +MomPhoneOther: + farwritetext MomDeterminedText + promptbutton + sjump MomSavingMoney + +MomSavingMoney: + checkflag ENGINE_MOM_SAVING_MONEY + iffalse .NotSaving + checkmoney MOMS_MONEY, 0 + ifequal HAVE_MORE, .SavingHasMoney + sjump .SavingNoMoney + +.NotSaving: + checkmoney MOMS_MONEY, 0 + ifequal HAVE_MORE, .HasMoney + sjump .NoMoney + +.SavingHasMoney: + getmoney STRING_BUFFER_3, MOMS_MONEY + farwritetext MomCheckBalanceText + yesorno + iftrue MomPhoneSaveMoneyScript + sjump MomPhoneWontSaveMoneyScript + +.SavingNoMoney: + farwritetext MomImportantToSaveText + yesorno + iftrue MomPhoneSaveMoneyScript + sjump MomPhoneWontSaveMoneyScript + +.NoMoney: + farwritetext MomYoureNotSavingText + yesorno + iftrue MomPhoneSaveMoneyScript + sjump MomPhoneWontSaveMoneyScript + +.HasMoney: + getmoney STRING_BUFFER_3, MOMS_MONEY + farwritetext MomYouveSavedText + yesorno + iftrue MomPhoneSaveMoneyScript + sjump MomPhoneWontSaveMoneyScript + +MomPhoneSaveMoneyScript: + setflag ENGINE_MOM_SAVING_MONEY + farwritetext MomOKIllSaveText + promptbutton + sjump MomPhoneHangUpScript + +MomPhoneWontSaveMoneyScript: + clearflag ENGINE_MOM_SAVING_MONEY + farwritetext MomPhoneWontSaveMoneyText + promptbutton + sjump MomPhoneHangUpScript + +MomPhoneHangUpScript: + farwritetext MomPhoneHangUpText + end + +MomPhoneNoPokemonScript: + farwritetext MomPhoneNoPokemonText + end + +MomPhoneNoPokedexScript: + farwritetext MomPhoneNoPokedexText + end + +MomPhoneNoGymQuestScript: + farwritetext MomPhoneNoGymQuestText + end + +MomPhoneLectureScript: + setevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST + setflag ENGINE_MOM_ACTIVE + specialphonecall SPECIALCALL_NONE + farwritetext MomPhoneLectureText + yesorno + iftrue MomPhoneSaveMoneyScript + sjump MomPhoneWontSaveMoneyScript diff --git a/engine/phone/scripts/parry.asm b/engine/phone/scripts/parry.asm new file mode 100644 index 0000000..bcb9f4d --- /dev/null +++ b/engine/phone/scripts/parry.asm @@ -0,0 +1,40 @@ +ParryPhoneCalleeScript: + gettrainername STRING_BUFFER_3, HIKER, PARRY1 + checkflag ENGINE_PARRY_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_PARRY_FRIDAY_AFTERNOON + iftrue .WantsRematch + readvar VAR_WEEKDAY + ifnotequal FRIDAY, .WantsRematch + checktime DAY + iftrue ParryFridayDay + +.WantsRematch: + farsjump ParryBattleWithMeScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_45 + farsjump ParryHaventYouGottenToScript + +ParryPhoneCallerScript: + gettrainername STRING_BUFFER_3, HIKER, PARRY1 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_PARRY_READY_FOR_REMATCH + iftrue .GenericCall + checkflag ENGINE_PARRY_FRIDAY_AFTERNOON + iftrue .GenericCall + farscall PhoneScript_Random2 + ifequal 0, ParryWantsBattle + ifequal 1, ParryWantsBattle + +.GenericCall: + farsjump Phone_GenericCall_Male + +ParryFridayDay: + setflag ENGINE_PARRY_FRIDAY_AFTERNOON + +ParryWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_45 + setflag ENGINE_PARRY_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male diff --git a/engine/phone/scripts/ralph.asm b/engine/phone/scripts/ralph.asm new file mode 100644 index 0000000..43328d2 --- /dev/null +++ b/engine/phone/scripts/ralph.asm @@ -0,0 +1,59 @@ +RalphPhoneCalleeScript: + gettrainername STRING_BUFFER_3, FISHER, RALPH1 + checkflag ENGINE_RALPH_READY_FOR_REMATCH + iftrue .Rematch + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_RALPH_WEDNESDAY_MORNING + iftrue .CheckSwarm + readvar VAR_WEEKDAY + ifnotequal WEDNESDAY, .CheckSwarm + checktime MORN + iftrue Ralph_WednesdayMorning +.CheckSwarm: + checkflag ENGINE_QWILFISH_SWARM + iftrue .ReportSwarm + farsjump RalphNoItemScript + +.Rematch: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_32 + farsjump RalphReminderScript + +.ReportSwarm: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_32 + farsjump RalphHurryScript + +RalphPhoneCallerScript: + gettrainername STRING_BUFFER_3, FISHER, RALPH1 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_FLYPOINT_GOLDENROD + iffalse .CheckSwarm + checkflag ENGINE_RALPH_READY_FOR_REMATCH + iftrue .CheckSwarm + checkflag ENGINE_RALPH_WEDNESDAY_MORNING + iftrue .CheckSwarm + farscall PhoneScript_Random2 + ifequal 0, Ralph_FightMe +.CheckSwarm: + farscall PhoneScript_Random5 + ifequal 0, Ralph_SetUpSwarm + farsjump Phone_GenericCall_Male + +Ralph_WednesdayMorning: + setflag ENGINE_RALPH_WEDNESDAY_MORNING +Ralph_FightMe: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_32 + setflag ENGINE_RALPH_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +Ralph_SetUpSwarm: + checkflag ENGINE_QWILFISH_SWARM + iftrue .Generic + setflag ENGINE_QWILFISH_SWARM + getmonname STRING_BUFFER_4, QWILFISH + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_32 + setval FISHSWARM_QWILFISH + special ActivateFishingSwarm + farsjump RalphItemScript + +.Generic: + farsjump Phone_GenericCall_Male diff --git a/engine/phone/scripts/reena.asm b/engine/phone/scripts/reena.asm new file mode 100644 index 0000000..efdfe05 --- /dev/null +++ b/engine/phone/scripts/reena.asm @@ -0,0 +1,39 @@ +ReenaPhoneCalleeScript: + gettrainername STRING_BUFFER_3, COOLTRAINERF, REENA1 + checkflag ENGINE_REENA_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Female + checkflag ENGINE_REENA_SUNDAY_MORNING + iftrue .NotSunday + readvar VAR_WEEKDAY + ifnotequal SUNDAY, .NotSunday + checktime MORN + iftrue ReenaSundayMorning + +.NotSunday: + farsjump ReenaForwardScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_27 + farsjump ReenaHurryScript + +ReenaPhoneCallerScript: + gettrainername STRING_BUFFER_3, COOLTRAINERF, REENA1 + farscall PhoneScript_GreetPhone_Female + checkflag ENGINE_REENA_READY_FOR_REMATCH + iftrue .Generic + checkflag ENGINE_REENA_SUNDAY_MORNING + iftrue .Generic + farscall PhoneScript_Random2 + ifequal 0, ReenaWantsBattle + +.Generic: + farsjump Phone_GenericCall_Female + +ReenaSundayMorning: + setflag ENGINE_REENA_SUNDAY_MORNING + +ReenaWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_27 + setflag ENGINE_REENA_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Female diff --git a/engine/phone/scripts/reminders.asm b/engine/phone/scripts/reminders.asm new file mode 100644 index 0000000..b2676d3 --- /dev/null +++ b/engine/phone/scripts/reminders.asm @@ -0,0 +1,95 @@ +JackWantsBattleScript: + farwritetext JackReminderText + end + +HueyWantsBattleScript: + farwritetext HueyReminderText + end + +GavenReminderScript: + farwritetext GavenReminderText + end + +BethBattleReminderScript: + farwritetext BethReminderText + end + +JoseReminderScript: + farwritetext JoseReminderText + end + +ReenaHurryScript: + farwritetext ReenaHurryText + end + +JoeyReminderScript: + farwritetext JoeyReminderText + end + +WadeQuickBattleScript: + farwritetext WadeQuickBattleText + end + +RalphReminderScript: + farwritetext RalphReminderText + end + +LizReminderScript: + farwritetext LizReminderText + end + +AnthonyReminderScript: + farwritetext AnthonyReminderText + end + +ToddForwardScript: + farwritetext ToddLookingForwardToBattleText + end + +GinaReminderScript: + farwritetext GinaReminderText + end + +ArnieReminderScript: + farwritetext ArnieReminderText + end + +AlanReminderScript: + farwritetext AlanReminderText + end + +DanaReminderScript: + farwritetext DanaReminderText + end + +ChadReminderScript: + farwritetext ChadReminderText + end + +TullyForwardScript: + farwritetext TullyForwardText + end + +BrentReminderScript: + farwritetext BrentReminderText + end + +TiffanyAsleepScript: + farwritetext TiffanyAsleepText + end + +VanceHurryHurryScript: + farwritetext VanceHurryHurryText + end + +WiltonNotBitingScript: + farwritetext WiltonNotBitingText + end + +ParryHaventYouGottenToScript: + farwritetext ParryHaventYouGottenToText + end + +ErinComeBattleScript: + farwritetext ErinComeBattleText + end diff --git a/engine/phone/scripts/reminders_2.asm b/engine/phone/scripts/reminders_2.asm new file mode 100644 index 0000000..54f5449 --- /dev/null +++ b/engine/phone/scripts/reminders_2.asm @@ -0,0 +1,15 @@ +RalphHurryScript: + farwritetext RalphHurryText + end + +AnthonyHurryScript: + farwritetext AnthonyHurryText + end + +ArnieHurryScript: + farwritetext ArnieHurryText + end + +ToddHurryScript: + farwritetext ToddHaveYouGoneToDepartmentStoreText + end diff --git a/engine/phone/scripts/tiffany.asm b/engine/phone/scripts/tiffany.asm new file mode 100644 index 0000000..a30649b --- /dev/null +++ b/engine/phone/scripts/tiffany.asm @@ -0,0 +1,98 @@ +TiffanyPhoneCalleeScript: + gettrainername STRING_BUFFER_3, PICNICKER, TIFFANY3 + checkflag ENGINE_TIFFANY_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Female + checkflag ENGINE_TIFFANY_TUESDAY_AFTERNOON + iftrue .NotTuesday + checkflag ENGINE_TIFFANY_HAS_PINK_BOW + iftrue .HasItem + readvar VAR_WEEKDAY + ifnotequal TUESDAY, .NotTuesday + checktime DAY + iftrue TiffanyTuesdayAfternoon + +.NotTuesday: + farsjump TiffanyNoItemScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_43 + farsjump TiffanyAsleepScript + +.HasItem: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_43 + farsjump TiffanyHurryScript + +TiffanyPhoneCallerScript: + gettrainername STRING_BUFFER_3, PICNICKER, TIFFANY3 + farscall PhoneScript_Random4 + ifequal 0, TiffanysFamilyMembers + farscall PhoneScript_GreetPhone_Female + checkflag ENGINE_TIFFANY_READY_FOR_REMATCH + iftrue .Generic + checkflag ENGINE_TIFFANY_TUESDAY_AFTERNOON + iftrue .Generic + checkflag ENGINE_TIFFANY_HAS_PINK_BOW + iftrue .Generic + farscall PhoneScript_Random3 + ifequal 0, TiffanyWantsBattle + checkevent EVENT_TIFFANY_GAVE_PINK_BOW + iftrue .PinkBow + farscall PhoneScript_Random2 + ifequal 0, TiffanyHasPinkBow + +.PinkBow: + farscall PhoneScript_Random11 + ifequal 0, TiffanyHasPinkBow + +.Generic: + farsjump Phone_GenericCall_Female + +TiffanyTuesdayAfternoon: + setflag ENGINE_TIFFANY_TUESDAY_AFTERNOON + +TiffanyWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_43 + setflag ENGINE_TIFFANY_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Female + +TiffanysFamilyMembers: + random 6 + ifequal 0, .Grandma + ifequal 1, .Grandpa + ifequal 2, .Mom + ifequal 3, .Dad + ifequal 4, .Sister + ifequal 5, .Brother + +.Grandma: + getstring STRING_BUFFER_4, GrandmaString + sjump .PoorClefairy + +.Grandpa: + getstring STRING_BUFFER_4, GrandpaString + sjump .PoorClefairy + +.Mom: + getstring STRING_BUFFER_4, MomString + sjump .PoorClefairy + +.Dad: + getstring STRING_BUFFER_4, DadString + sjump .PoorClefairy + +.Sister: + getstring STRING_BUFFER_4, SisterString + sjump .PoorClefairy + +.Brother: + getstring STRING_BUFFER_4, BrotherString + sjump .PoorClefairy + +.PoorClefairy: + farsjump TiffanyItsAwful + +TiffanyHasPinkBow: + setflag ENGINE_TIFFANY_HAS_PINK_BOW + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_43 + farsjump PhoneScript_FoundItem_Female diff --git a/engine/phone/scripts/todd.asm b/engine/phone/scripts/todd.asm new file mode 100644 index 0000000..8515153 --- /dev/null +++ b/engine/phone/scripts/todd.asm @@ -0,0 +1,59 @@ +ToddPhoneCalleeScript: + gettrainername STRING_BUFFER_3, CAMPER, TODD1 + checkflag ENGINE_TODD_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_TODD_SATURDAY_MORNING + iftrue .NotSaturday + readvar VAR_WEEKDAY + ifnotequal SATURDAY, .NotSaturday + checktime MORN + iftrue ToddSaturdayMorning + +.NotSaturday: + checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON + iftrue .SaleOn + farsjump ToddNoItemScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_34 + farsjump ToddForwardScript + +.SaleOn: + farsjump ToddHurryScript + +ToddPhoneCallerScript: + gettrainername STRING_BUFFER_3, CAMPER, TODD1 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_TODD_READY_FOR_REMATCH + iftrue .TryForSale + checkflag ENGINE_TODD_SATURDAY_MORNING + iftrue .TryForSale + checkflag ENGINE_FLYPOINT_GOLDENROD + iffalse .NoGoldenrod + farscall PhoneScript_Random2 + ifequal 0, ToddWantsBattle + +.TryForSale: + farscall PhoneScript_Random2 + ifequal 0, ToddDeptStoreSale + +.NoGoldenrod: + farscall PhoneScript_Random3 + ifequal 0, ToddFoundRare + farsjump Phone_GenericCall_Male + +ToddSaturdayMorning: + setflag ENGINE_TODD_SATURDAY_MORNING + +ToddWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_34 + setflag ENGINE_TODD_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +ToddFoundRare: + farsjump Phone_CheckIfUnseenRare_Male + +ToddDeptStoreSale: + setflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON + farsjump ToddItemScript diff --git a/engine/phone/scripts/tully.asm b/engine/phone/scripts/tully.asm new file mode 100644 index 0000000..b0b66fd --- /dev/null +++ b/engine/phone/scripts/tully.asm @@ -0,0 +1,60 @@ +TullyPhoneCalleeScript: + gettrainername STRING_BUFFER_3, FISHER, TULLY1 + checkflag ENGINE_TULLY_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_TULLY_SUNDAY_NIGHT + iftrue .NotSunday + checkflag ENGINE_TULLY_HAS_WATER_STONE + iftrue .WaterStone + readvar VAR_WEEKDAY + ifnotequal SUNDAY, .NotSunday + checktime NITE + iftrue TullySundayNight + +.NotSunday: + farsjump TullyNoItemScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_42 + farsjump TullyForwardScript + +.WaterStone: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_42 + farsjump TullyHurryScript + +TullyPhoneCallerScript: + gettrainername STRING_BUFFER_3, FISHER, TULLY1 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_TULLY_READY_FOR_REMATCH + iftrue .Generic + checkflag ENGINE_TULLY_SUNDAY_NIGHT + iftrue .Generic + checkflag ENGINE_TULLY_HAS_WATER_STONE + iftrue .Generic + farscall PhoneScript_Random3 + ifequal 0, TullyWantsBattle + checkevent EVENT_TULLY_GAVE_WATER_STONE + iftrue .WaterStone + farscall PhoneScript_Random2 + ifequal 0, TullyFoundWaterStone + +.WaterStone: + farscall PhoneScript_Random11 + ifequal 0, TullyFoundWaterStone + +.Generic: + farsjump Phone_GenericCall_Male + +TullySundayNight: + setflag ENGINE_TULLY_SUNDAY_NIGHT + +TullyWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_42 + setflag ENGINE_TULLY_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +TullyFoundWaterStone: + setflag ENGINE_TULLY_HAS_WATER_STONE + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_42 + farsjump PhoneScript_FoundItem_Male diff --git a/engine/phone/scripts/unused.asm b/engine/phone/scripts/unused.asm new file mode 100644 index 0000000..b6b2531 --- /dev/null +++ b/engine/phone/scripts/unused.asm @@ -0,0 +1,3 @@ +UnusedPhoneScript: + farwritetext UnusedPhoneText + end diff --git a/engine/phone/scripts/vance.asm b/engine/phone/scripts/vance.asm new file mode 100644 index 0000000..c41408e --- /dev/null +++ b/engine/phone/scripts/vance.asm @@ -0,0 +1,40 @@ +VancePhoneCalleeScript: + gettrainername STRING_BUFFER_3, BIRD_KEEPER, VANCE1 + checkflag ENGINE_VANCE_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_VANCE_WEDNESDAY_NIGHT + iftrue .NotWednesday + readvar VAR_WEEKDAY + ifnotequal WEDNESDAY, .NotWednesday + checktime NITE + iftrue VanceWednesdayNight + +.NotWednesday: + farsjump VanceLookingForwardScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_44 + farsjump VanceHurryHurryScript + +VancePhoneCallerScript: + gettrainername STRING_BUFFER_3, BIRD_KEEPER, VANCE1 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_VANCE_READY_FOR_REMATCH + iftrue .WantsBattle + checkflag ENGINE_VANCE_WEDNESDAY_NIGHT + iftrue .WantsBattle + farscall PhoneScript_Random3 + ifequal 0, VanceWantsRematch + ifequal 1, VanceWantsRematch + +.WantsBattle: + farsjump Phone_GenericCall_Male + +VanceWednesdayNight: + setflag ENGINE_VANCE_WEDNESDAY_NIGHT + +VanceWantsRematch: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_44 + setflag ENGINE_VANCE_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male diff --git a/engine/phone/scripts/wade.asm b/engine/phone/scripts/wade.asm new file mode 100644 index 0000000..bfb9e9d --- /dev/null +++ b/engine/phone/scripts/wade.asm @@ -0,0 +1,113 @@ +WadePhoneCalleeScript: + gettrainername STRING_BUFFER_3, BUG_CATCHER, WADE1 + checkflag ENGINE_WADE_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_WADE_TUESDAY_NIGHT + iftrue .NotTuesday + checkflag ENGINE_WADE_HAS_ITEM + iftrue .HasItem + readvar VAR_WEEKDAY + ifnotequal TUESDAY, .NotTuesday + checktime NITE + iftrue WadeTuesdayNight + +.NotTuesday: + farscall PhoneScript_Random2 + ifequal 0, .NoContest + checkflag ENGINE_DAILY_BUG_CONTEST + iftrue .NoContest + readvar VAR_WEEKDAY + ifequal TUESDAY, .ContestToday + ifequal THURSDAY, .ContestToday + ifequal SATURDAY, .ContestToday + +.NoContest: + farsjump WadeNoBerriesScript + +.ContestToday: + farsjump PhoneScript_BugCatchingContest + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_31 + farsjump WadeQuickBattleScript + +.HasItem: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_31 + farsjump WadeComeQuickScript + +WadePhoneCallerScript: + gettrainername STRING_BUFFER_3, BUG_CATCHER, WADE1 + farscall PhoneScript_GreetPhone_Male + farscall PhoneScript_Random2 + ifequal 0, .NoContest + checkflag ENGINE_DAILY_BUG_CONTEST + iftrue .NoContest + readvar VAR_WEEKDAY + ifequal TUESDAY, .ContestToday + ifequal THURSDAY, .ContestToday + ifequal SATURDAY, .ContestToday + +.NoContest: + checkflag ENGINE_WADE_READY_FOR_REMATCH + iftrue .next + checkflag ENGINE_WADE_TUESDAY_NIGHT + iftrue .next + checkflag ENGINE_WADE_HAS_ITEM + iftrue .next + farscall PhoneScript_Random2 + ifequal 0, WadeHasItem2 + checkflag ENGINE_FLYPOINT_GOLDENROD + iffalse .next + farscall PhoneScript_Random2 + ifequal 0, WadeWantsBattle2 + +.next: + farscall PhoneScript_Random3 + ifequal 0, WadeFoundRare + farsjump Phone_GenericCall_Male + +.ContestToday: + farsjump PhoneScript_BugCatchingContest + +WadeTuesdayNight: + setflag ENGINE_WADE_TUESDAY_NIGHT + +WadeWantsBattle2: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_31 + setflag ENGINE_WADE_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +WadeFoundRare: + farsjump Phone_CheckIfUnseenRare_Male + +WadeHasItem2: + setflag ENGINE_WADE_HAS_ITEM + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_31 + clearevent EVENT_WADE_HAS_BERRY + clearevent EVENT_WADE_HAS_PSNCUREBERRY + clearevent EVENT_WADE_HAS_PRZCUREBERRY + clearevent EVENT_WADE_HAS_BITTER_BERRY + random 4 + ifequal 0, .Berry + ifequal 1, .PsnCureBerry + ifequal 2, .PrzCureBerry + ifequal 3, .Bitterberry + +.Berry: + setevent EVENT_WADE_HAS_BERRY + sjump .FoundBerry + +.PsnCureBerry: + setevent EVENT_WADE_HAS_PSNCUREBERRY + sjump .FoundBerry + +.PrzCureBerry: + setevent EVENT_WADE_HAS_PRZCUREBERRY + sjump .FoundBerry + +.Bitterberry: + setevent EVENT_WADE_HAS_BITTER_BERRY + +.FoundBerry: + farsjump PhoneScript_FoundItem_Male diff --git a/engine/phone/scripts/wilton.asm b/engine/phone/scripts/wilton.asm new file mode 100644 index 0000000..51f8e24 --- /dev/null +++ b/engine/phone/scripts/wilton.asm @@ -0,0 +1,75 @@ +WiltonPhoneCalleeScript: + gettrainername STRING_BUFFER_3, FISHER, WILTON1 + checkflag ENGINE_WILTON_READY_FOR_REMATCH + iftrue .WantsBattle + farscall PhoneScript_AnswerPhone_Male + checkflag ENGINE_WILTON_THURSDAY_MORNING + iftrue .NotThursday + checkflag ENGINE_WILTON_HAS_ITEM + iftrue .HasItem + readvar VAR_WEEKDAY + ifnotequal THURSDAY, .NotThursday + checktime MORN + iftrue WiltonThursdayMorning + +.NotThursday: + farsjump WiltonHaventFoundAnythingScript + +.WantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_44 + farsjump WiltonNotBitingScript + +.HasItem: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_44 + farsjump WiltonWantThisScript + +WiltonPhoneCallerScript: + gettrainername STRING_BUFFER_3, FISHER, WILTON1 + farscall PhoneScript_GreetPhone_Male + checkflag ENGINE_WILTON_READY_FOR_REMATCH + iftrue .GenericCall + checkflag ENGINE_WILTON_THURSDAY_MORNING + iftrue .GenericCall + checkflag ENGINE_WILTON_HAS_ITEM + iftrue .GenericCall + farscall PhoneScript_Random2 + ifequal 0, WiltonWantsBattle + farscall PhoneScript_Random2 + ifequal 0, WiltonHasItem + +.GenericCall: + farsjump Phone_GenericCall_Male + +WiltonThursdayMorning: + setflag ENGINE_WILTON_THURSDAY_MORNING + +WiltonWantsBattle: + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_44 + setflag ENGINE_WILTON_READY_FOR_REMATCH + farsjump PhoneScript_WantsToBattle_Male + +WiltonHasItem: + setflag ENGINE_WILTON_HAS_ITEM + getlandmarkname STRING_BUFFER_5, LANDMARK_ROUTE_44 + clearevent EVENT_WILTON_HAS_ULTRA_BALL + clearevent EVENT_WILTON_HAS_GREAT_BALL + clearevent EVENT_WILTON_HAS_POKE_BALL + random 5 + ifequal 0, .UltraBall + random 3 + ifequal 0, .GreatBall + sjump .PokeBall + +.UltraBall: + setevent EVENT_WILTON_HAS_ULTRA_BALL + sjump .FoundItem + +.GreatBall: + setevent EVENT_WILTON_HAS_GREAT_BALL + sjump .FoundItem + +.PokeBall: + setevent EVENT_WILTON_HAS_POKE_BALL + +.FoundItem: + farsjump PhoneScript_FoundItem_Male diff --git a/engine/pokedex/new_pokedex_entry.asm b/engine/pokedex/new_pokedex_entry.asm new file mode 100644 index 0000000..844253c --- /dev/null +++ b/engine/pokedex/new_pokedex_entry.asm @@ -0,0 +1,50 @@ +NewPokedexEntry: + ldh a, [hMapAnims] + push af + xor a + ldh [hMapAnims], a + call LowVolume + call ClearBGPalettes + call ClearTilemap + call UpdateSprites + call ClearSprites + ld a, [wPokedexStatus] + push af + ldh a, [hSCX] + add POKEDEX_SCX + ldh [hSCX], a + xor a + ld [wPokedexStatus], a + farcall _NewPokedexEntry + call WaitPressAorB_BlinkCursor + ld a, 1 ; page 2 + ld [wPokedexStatus], a + farcall DisplayDexEntry + call WaitPressAorB_BlinkCursor + pop af + ld [wPokedexStatus], a + call MaxVolume + call RotateThreePalettesRight + ldh a, [hSCX] + add -POKEDEX_SCX + ldh [hSCX], a + call .ReturnFromDexRegistration + pop af + ldh [hMapAnims], a + ret + +.ReturnFromDexRegistration: + call ClearTilemap + call LoadFontsExtra + call LoadStandardFont + farcall Pokedex_PlaceFrontpicTopLeftCorner + call WaitBGMap2 + farcall GetEnemyMonDVs + ld a, [hli] + ld [wTempMonDVs], a + ld a, [hl] + ld [wTempMonDVs + 1], a + ld b, SCGB_TRAINER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + call SetPalettes + ret diff --git a/engine/pokedex/pokedex.asm b/engine/pokedex/pokedex.asm new file mode 100644 index 0000000..26decc3 --- /dev/null +++ b/engine/pokedex/pokedex.asm @@ -0,0 +1,2896 @@ +; Pokedex_RunJumptable.Jumptable indexes + const_def + const DEXSTATE_MAIN_SCR + const DEXSTATE_UPDATE_MAIN_SCR + const DEXSTATE_DEX_ENTRY_SCR + const DEXSTATE_UPDATE_DEX_ENTRY_SCR + const DEXSTATE_REINIT_DEX_ENTRY_SCR + const DEXSTATE_SEARCH_SCR + const DEXSTATE_UPDATE_SEARCH_SCR + const DEXSTATE_OPTION_SCR + const DEXSTATE_UPDATE_OPTION_SCR + const DEXSTATE_SEARCH_RESULTS_SCR + const DEXSTATE_UPDATE_SEARCH_RESULTS_SCR + const DEXSTATE_UNOWN_MODE + const DEXSTATE_UPDATE_UNOWN_MODE + const DEXSTATE_EXIT + +DEF POKEDEX_SCX EQU 5 +EXPORT POKEDEX_SCX + +Pokedex: + ldh a, [hWX] + ld l, a + ldh a, [hWY] + ld h, a + push hl + ldh a, [hSCX] + push af + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + ld a, [wVramState] + push af + xor a + ld [wVramState], a + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + + xor a + ldh [hMapAnims], a + call InitPokedex + call DelayFrame + +.main + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .exit + call Pokedex_RunJumptable + call DelayFrame + jr .main + +.exit + ld de, SFX_READ_TEXT_2 + call PlaySFX + call WaitSFX + call ClearSprites + ld a, [wCurDexMode] + ld [wLastDexMode], a + call Pokedex_ClearLockedIDs + + pop af + ldh [hInMenu], a + pop af + ld [wVramState], a + pop af + ld [wOptions], a + pop af + ldh [hSCX], a + pop hl + ld a, l + ldh [hWX], a + ld a, h + ldh [hWY], a + ret + +InitPokedex: + call ClearBGPalettes + call ClearSprites + call ClearTilemap + call Pokedex_LoadGFX + + ld hl, wPokedexDataStart + ld bc, wPokedexDataEnd - wPokedexDataStart + xor a + call ByteFill + + xor a + ld [wJumptableIndex], a + ld [wPrevDexEntryJumptableIndex], a + ld [wPrevDexEntryBackup], a + ld [wPrevDexEntryBackup + 1], a + + call Pokedex_CheckUnlockedUnownMode + + ld a, [wLastDexMode] + ld [wCurDexMode], a + + call Pokedex_OrderMonsByMode + call Pokedex_InitCursorPosition + call Pokedex_GetLandmark + farcall DrawDexEntryScreenRightEdge + call Pokedex_ResetBGMapMode + ; fallthrough + +Pokedex_ClearLockedIDs: + xor a + ld l, LOCKED_MON_ID_DEX_SELECTED + jp LockPokemonID + +Pokedex_CheckUnlockedUnownMode: + ld a, [wStatusFlags] + bit STATUSFLAGS_UNOWN_DEX_F, a + jr nz, .unlocked + + xor a + ld [wUnlockedUnownMode], a + ret + +.unlocked + ld a, TRUE + ld [wUnlockedUnownMode], a + ret + +Pokedex_InitCursorPosition: + xor a + ld [wDexListingScrollOffset], a + ld [wDexListingScrollOffset + 1], a + ld [wDexListingCursor], a + ld hl, wPrevDexEntry + 1 + ld a, [hld] + ld c, [hl] + ld b, a + if NUM_POKEMON <= $FF + and a + ret nz + else + cp HIGH(NUM_POKEMON) + jr c, .check_zero + ret nz + if LOW(NUM_POKEMON) < $FF + ld a, c + cp LOW(NUM_POKEMON) + 1 + ret nc + endc + jr .go + endc +.check_zero + or c + ret z + +.go + ; ensure we have a list terminator + ld hl, wDexListingEnd + ld a, [hli] + ld d, [hl] + ld e, a + push de + sla e + rl d + ldh a, [rSVBK] + push af + ld a, BANK(wPokedexOrder) + ldh [rSVBK], a + ld hl, wPokedexOrder + push hl + add hl, de + ld a, -1 + ld [hli], a + ld [hl], a + + ; and look for the entry in the list + ld de, 2 + pop hl + call IsInWordArray ;returns carry and pointer in hl if found + pop de + ld a, d + ldh [rSVBK], a + pop de + ret nc + ld bc, $10000 - wPokedexOrder ;ld bc, -wPokedexOrder -- see https://github.com/rednex/rgbds/issues/279 + add hl, bc + srl h + rr l + + ; hl contains the index of wPrevDexEntry into wPokedexOrder, and de contains wDexListingEnd (therefore hl < de) + ; if de <= 7, then we only have one page; wDexListingScrollOffset must be zero and wDexListingCursor = hl (= l) + ld a, d + and a + jr nz, .can_scroll + ld a, e + cp 8 + jr nc, .can_scroll + ld a, l + ld [wDexListingCursor], a + ret + +.can_scroll + ; otherwise, if hl <= (de - 7), then wDexListingScrollOffset = hl, wDexListingCursor = 0 (default) + ; else, wDexListingScrollOffset = de - 7, wDexListingCursor = hl - wDexListingScrollOffset + ld a, e + sub 7 + ld e, a + ld [wDexListingScrollOffset], a + jr nc, .no_carry + dec d +.no_carry + ld a, l + sub e + ld c, a + ld a, h + sbc d + jr c, .not_last_page + ld a, d + ld [wDexListingScrollOffset + 1], a + ld a, c + ld [wDexListingCursor], a + ret + +.not_last_page + ld a, l + ld [wDexListingScrollOffset], a + ld a, h + ld [wDexListingScrollOffset + 1], a + ret + +Pokedex_GetLandmark: + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetWorldMapLocation + + cp LANDMARK_SPECIAL + jr nz, .load + + ld a, [wBackupMapGroup] + ld b, a + ld a, [wBackupMapNumber] + ld c, a + call GetWorldMapLocation + +.load + ld [wDexCurLocation], a + ret + +Pokedex_RunJumptable: + ld a, [wJumptableIndex] + ld hl, .Jumptable + call Pokedex_LoadPointer + jp hl + +.Jumptable: +; entries correspond to DEXSTATE_* constants + dw Pokedex_InitMainScreen + dw Pokedex_UpdateMainScreen + dw Pokedex_InitDexEntryScreen + dw Pokedex_UpdateDexEntryScreen + dw Pokedex_ReinitDexEntryScreen + dw Pokedex_InitSearchScreen + dw Pokedex_UpdateSearchScreen + dw Pokedex_InitOptionScreen + dw Pokedex_UpdateOptionScreen + dw Pokedex_InitSearchResultsScreen + dw Pokedex_UpdateSearchResultsScreen + dw Pokedex_InitUnownMode + dw Pokedex_UpdateUnownMode + dw Pokedex_Exit + +Pokedex_IncrementDexPointer: + ld hl, wJumptableIndex + inc [hl] + ret + +Pokedex_Exit: + ld hl, wJumptableIndex + set 7, [hl] + ret + +Pokedex_InitMainScreen: + xor a + ldh [hBGMapMode], a + call ClearSprites + xor a + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + call ByteFill + farcall DrawPokedexListWindow + hlcoord 0, 17 + ld de, String_START_SEARCH + call Pokedex_PlaceString + ld a, 7 + ld [wDexListingHeight], a + call Pokedex_PrintListing + call Pokedex_SetBGMapMode_3ifDMG_4ifCGB + call Pokedex_ResetBGMapMode + call Pokedex_DrawMainScreenBG + ld a, POKEDEX_SCX + ldh [hSCX], a + + ld a, [wCurDexMode] + cp DEXMODE_OLD + ld a, $4a + jr z, .okay + ld a, $47 +.okay + ldh [hWX], a + xor a + ldh [hWY], a + call WaitBGMap + + call Pokedex_ResetBGMapMode + ld a, -1 + ld [wCurPartySpecies], a + ld a, SCGB_POKEDEX + call Pokedex_GetSGBLayout + call Pokedex_UpdateCursorOAM + farcall DrawPokedexListWindow + hlcoord 0, 17 + ld de, String_START_SEARCH + call Pokedex_PlaceString + ld a, 7 + ld [wDexListingHeight], a + call Pokedex_PrintListing + call Pokedex_IncrementDexPointer + ret + +Pokedex_UpdateMainScreen: + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .b + ld a, [hl] + and A_BUTTON + jr nz, .a + ld a, [hl] + and SELECT + jr nz, .select + ld a, [hl] + and START + jr nz, .start + call Pokedex_ListingHandleDPadInput + ret nc + call Pokedex_UpdateCursorOAM + xor a + ldh [hBGMapMode], a + call Pokedex_PrintListing + call Pokedex_SetBGMapMode3 + call Pokedex_ResetBGMapMode + ret + +.a + call Pokedex_GetSelectedMon + call Pokedex_CheckSeen + ret z + ld a, DEXSTATE_DEX_ENTRY_SCR + ld [wJumptableIndex], a + ld a, DEXSTATE_MAIN_SCR + ld [wPrevDexEntryJumptableIndex], a + ret + +.select + call Pokedex_BlackOutBG + ld a, DEXSTATE_OPTION_SCR + ld [wJumptableIndex], a + xor a + ldh [hSCX], a + ld a, $a7 + ldh [hWX], a + call DelayFrame + ret + +.start + call Pokedex_BlackOutBG + ld a, DEXSTATE_SEARCH_SCR + ld [wJumptableIndex], a + xor a + ldh [hSCX], a + ld a, $a7 + ldh [hWX], a + call DelayFrame + ret + +.b + ld a, DEXSTATE_EXIT + ld [wJumptableIndex], a + ret + +Pokedex_InitDexEntryScreen: + call LowVolume + xor a ; page 1 + ld [wPokedexStatus], a + xor a + ldh [hBGMapMode], a + call ClearSprites + call Pokedex_LoadCurrentFootprint + call Pokedex_DrawDexEntryScreenBG + call Pokedex_InitArrowCursor + call Pokedex_GetSelectedMon + ld a, l + ld [wPrevDexEntry], a + ld a, h + ld [wPrevDexEntry + 1], a + farcall DisplayDexEntry + call Pokedex_DrawFootprint + call WaitBGMap + ld a, $a7 + ldh [hWX], a + call Pokedex_GetSelectedMon + ld [wCurPartySpecies], a + ld a, SCGB_POKEDEX + call Pokedex_GetSGBLayout + ld a, [wCurPartySpecies] + call PlayMonCry + call Pokedex_IncrementDexPointer + ret + +Pokedex_UpdateDexEntryScreen: + ld de, DexEntryScreen_ArrowCursorData + call Pokedex_MoveArrowCursor + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .return_to_prev_screen + vc_hook Forbid_printing_Pokedex + ld a, [hl] + and A_BUTTON + jr nz, .do_menu_action + call Pokedex_NextOrPreviousDexEntry + ret nc + call Pokedex_IncrementDexPointer + ret + +.do_menu_action + ld a, [wDexArrowCursorPosIndex] + ld hl, DexEntryScreen_MenuActionJumptable + call Pokedex_LoadPointer + jp hl + +.return_to_prev_screen + ld a, [wLastVolume] + and a + jr z, .max_volume + ld a, MAX_VOLUME + ld [wLastVolume], a + +.max_volume + call MaxVolume + ld a, [wPrevDexEntryJumptableIndex] + ld [wJumptableIndex], a + ret + +Pokedex_Page: + ld a, [wPokedexStatus] + xor 1 ; toggle page + ld [wPokedexStatus], a + call Pokedex_GetSelectedMon + ld a, l + ld [wPrevDexEntry], a + ld a, h + ld [wPrevDexEntry + 1], a + farcall DisplayDexEntry + call WaitBGMap + ret + +Pokedex_ReinitDexEntryScreen: +; Reinitialize the Pokédex entry screen after changing the selected mon. + call Pokedex_BlackOutBG + xor a ; page 1 + ld [wPokedexStatus], a + xor a + ldh [hBGMapMode], a + call Pokedex_DrawDexEntryScreenBG + call Pokedex_InitArrowCursor + call Pokedex_LoadCurrentFootprint + call Pokedex_GetSelectedMon + ld a, l + ld [wPrevDexEntry], a + ld a, h + ld [wPrevDexEntry + 1], a + farcall DisplayDexEntry + call Pokedex_DrawFootprint + call Pokedex_LoadSelectedMonTiles + call WaitBGMap + call Pokedex_GetSelectedMon + ld [wCurPartySpecies], a + ld a, SCGB_POKEDEX + call Pokedex_GetSGBLayout + ld a, [wCurPartySpecies] + call PlayMonCry + ld hl, wJumptableIndex + dec [hl] + ret + +DexEntryScreen_ArrowCursorData: + db D_RIGHT | D_LEFT, 4 + dwcoord 1, 17 ; PAGE + dwcoord 6, 17 ; AREA + dwcoord 11, 17 ; CRY + dwcoord 15, 17 ; PRNT + +DexEntryScreen_MenuActionJumptable: + dw Pokedex_Page + dw .Area + dw .Cry + dw .Print + +.Area: + call Pokedex_BlackOutBG + xor a + ldh [hSCX], a + call DelayFrame + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + call Pokedex_GetSelectedMon + ld a, [wDexCurLocation] + ld e, a + predef Pokedex_GetArea + call Pokedex_BlackOutBG + call DelayFrame + xor a + ldh [hBGMapMode], a + ld a, $90 + ldh [hWY], a + ld a, POKEDEX_SCX + ldh [hSCX], a + call DelayFrame + call Pokedex_RedisplayDexEntry + call Pokedex_LoadSelectedMonTiles + call WaitBGMap + call Pokedex_GetSelectedMon + ld [wCurPartySpecies], a + ld a, SCGB_POKEDEX + call Pokedex_GetSGBLayout + ret + +.Cry: +; BUG: Playing Entei's Pokédex cry can distort Raikou's and Suicune's (see docs/bugs_and_glitches.md) + call Pokedex_GetSelectedMon + ld a, [wTempSpecies] + call GetCryIndex + ld e, c + ld d, b + call PlayCry + ret + +.Print: + call Pokedex_ApplyPrintPals + xor a + ldh [hSCX], a + ld hl, wPrevDexEntryBackup + ld a, [hli] + ld h, [hl] + ld l, a + push hl + ld a, [wPrevDexEntryJumptableIndex] + push af + ld a, [wJumptableIndex] + push af + farcall PrintDexEntry + pop af + ld [wJumptableIndex], a + pop af + ld [wPrevDexEntryJumptableIndex], a + pop hl + ld a, l + ld [wPrevDexEntryBackup], a + ld a, h + ld [wPrevDexEntryBackup + 1], a + call ClearBGPalettes + call DisableLCD + call Pokedex_LoadInvertedFont + call Pokedex_RedisplayDexEntry + call EnableLCD + call WaitBGMap + ld a, POKEDEX_SCX + ldh [hSCX], a + call Pokedex_ApplyUsualPals + ret + +Pokedex_RedisplayDexEntry: + call Pokedex_DrawDexEntryScreenBG + call Pokedex_GetSelectedMon + farcall DisplayDexEntry + call Pokedex_DrawFootprint + ret + +Pokedex_InitOptionScreen: + xor a + ldh [hBGMapMode], a + call ClearSprites + call Pokedex_DrawOptionScreenBG + call Pokedex_InitArrowCursor + ; point cursor to the current dex mode (modes == menu item indexes) + ld a, [wCurDexMode] + ld [wDexArrowCursorPosIndex], a + call Pokedex_DisplayModeDescription + call WaitBGMap + ld a, SCGB_POKEDEX_SEARCH_OPTION + call Pokedex_GetSGBLayout + call Pokedex_IncrementDexPointer + ret + +Pokedex_UpdateOptionScreen: + ld a, [wUnlockedUnownMode] + and a + jr nz, .okay + ld de, .NoUnownModeArrowCursorData + jr .okay2 +.okay + ld de, .ArrowCursorData +.okay2 + call Pokedex_MoveArrowCursor + call c, Pokedex_DisplayModeDescription + ld hl, hJoyPressed + ld a, [hl] + and SELECT | B_BUTTON + jr nz, .return_to_main_screen + ld a, [hl] + and A_BUTTON + jr nz, .do_menu_action + ret + +.do_menu_action + ld a, [wDexArrowCursorPosIndex] + ld hl, .MenuActionJumptable + call Pokedex_LoadPointer + jp hl + +.return_to_main_screen + call Pokedex_BlackOutBG + ld a, DEXSTATE_MAIN_SCR + ld [wJumptableIndex], a + ret + +.NoUnownModeArrowCursorData: + db D_UP | D_DOWN, 3 + dwcoord 2, 4 ; NEW + dwcoord 2, 6 ; OLD + dwcoord 2, 8 ; ABC + +.ArrowCursorData: + db D_UP | D_DOWN, 4 + dwcoord 2, 4 ; NEW + dwcoord 2, 6 ; OLD + dwcoord 2, 8 ; ABC + dwcoord 2, 10 ; UNOWN + +.MenuActionJumptable: + dw .MenuAction_NewMode + dw .MenuAction_OldMode + dw .MenuAction_ABCMode + dw .MenuAction_UnownMode + +.MenuAction_NewMode: + ld b, DEXMODE_NEW + jr .ChangeMode + +.MenuAction_OldMode: + ld b, DEXMODE_OLD + jr .ChangeMode + +.MenuAction_ABCMode: + ld b, DEXMODE_ABC + +.ChangeMode: + ld a, [wCurDexMode] + cp b + jr z, .skip_changing_mode ; Skip if new mode is same as current. + + ld a, b + ld [wCurDexMode], a + call Pokedex_OrderMonsByMode + call Pokedex_DisplayChangingModesMessage + call Pokedex_InitCursorPosition + +.skip_changing_mode + call Pokedex_BlackOutBG + ld a, DEXSTATE_MAIN_SCR + ld [wJumptableIndex], a + ret + +.MenuAction_UnownMode: + call Pokedex_BlackOutBG + ld a, DEXSTATE_UNOWN_MODE + ld [wJumptableIndex], a + ret + +Pokedex_InitSearchScreen: + xor a + ldh [hBGMapMode], a + call ClearSprites + call Pokedex_DrawSearchScreenBG + call Pokedex_InitArrowCursor + ld a, NORMAL + 1 + ld [wDexSearchMonType1], a + xor a + ld [wDexSearchMonType2], a + call Pokedex_PlaceSearchScreenTypeStrings + xor a + ld [wDexSearchSlowpokeFrame], a + farcall DoDexSearchSlowpokeFrame + call WaitBGMap + ld a, SCGB_POKEDEX_SEARCH_OPTION + call Pokedex_GetSGBLayout + call Pokedex_IncrementDexPointer + ret + +Pokedex_UpdateSearchScreen: + ld de, .ArrowCursorData + call Pokedex_MoveArrowCursor + call Pokedex_UpdateSearchMonType + call c, Pokedex_PlaceSearchScreenTypeStrings + ld hl, hJoyPressed + ld a, [hl] + and START | B_BUTTON + jr nz, .cancel + ld a, [hl] + and A_BUTTON + jr nz, .do_menu_action + ret + +.do_menu_action + ld a, [wDexArrowCursorPosIndex] + ld hl, .MenuActionJumptable + call Pokedex_LoadPointer + jp hl + +.cancel + call Pokedex_BlackOutBG + ld a, DEXSTATE_MAIN_SCR + ld [wJumptableIndex], a + ret + +.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: + dw .MenuAction_MonSearchType + dw .MenuAction_MonSearchType + dw .MenuAction_BeginSearch + dw .MenuAction_Cancel + +.MenuAction_MonSearchType: + call Pokedex_NextSearchMonType + call Pokedex_PlaceSearchScreenTypeStrings + ret + +.MenuAction_BeginSearch: + call Pokedex_SearchForMons + farcall AnimateDexSearchSlowpoke + ld hl, wDexSearchResultCount + ld a, [hli] + or [hl] + jr nz, .show_search_results + +; No mon with matching types was found. + call Pokedex_OrderMonsByMode + call Pokedex_DisplayTypeNotFoundMessage + xor a + ldh [hBGMapMode], a + call Pokedex_DrawSearchScreenBG + call Pokedex_InitArrowCursor + call Pokedex_PlaceSearchScreenTypeStrings + call WaitBGMap + ret + +.show_search_results + ld a, [wDexSearchResultCount] + ld [wDexListingEnd], a + ld a, [wDexSearchResultCount + 1] + ld [wDexListingEnd + 1], a + ld a, [wDexListingScrollOffset] + ld [wDexListingScrollOffsetBackup], a + ld a, [wDexListingScrollOffset + 1] + ld [wDexListingScrollOffsetBackup + 1], a + ld a, [wDexListingCursor] + ld [wDexListingCursorBackup], a + ld a, [wPrevDexEntry] + ld [wPrevDexEntryBackup], a + ld a, [wPrevDexEntry + 1] + ld [wPrevDexEntryBackup + 1], a + xor a + ld [wDexListingScrollOffset], a + ld [wDexListingScrollOffset + 1], a + ld [wDexListingCursor], a + call Pokedex_BlackOutBG + ld a, DEXSTATE_SEARCH_RESULTS_SCR + ld [wJumptableIndex], a + ret + +.MenuAction_Cancel: + call Pokedex_BlackOutBG + ld a, DEXSTATE_MAIN_SCR + ld [wJumptableIndex], a + ret + +Pokedex_InitSearchResultsScreen: + xor a + ldh [hBGMapMode], a + xor a + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + call Pokedex_SetBGMapMode4 + call Pokedex_ResetBGMapMode + farcall DrawPokedexSearchResultsWindow + call Pokedex_PlaceSearchResultsTypeStrings + ld a, 4 + ld [wDexListingHeight], a + call Pokedex_PrintListing + call Pokedex_SetBGMapMode3 + call Pokedex_ResetBGMapMode + call Pokedex_DrawSearchResultsScreenBG + ld a, POKEDEX_SCX + ldh [hSCX], a + ld a, $4a + ldh [hWX], a + xor a + ldh [hWY], a + call WaitBGMap + call Pokedex_ResetBGMapMode + farcall DrawPokedexSearchResultsWindow + call Pokedex_PlaceSearchResultsTypeStrings + call Pokedex_UpdateSearchResultsCursorOAM + ld a, -1 + ld [wCurPartySpecies], a + ld a, SCGB_POKEDEX + call Pokedex_GetSGBLayout + call Pokedex_IncrementDexPointer + ret + +Pokedex_UpdateSearchResultsScreen: + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .return_to_search_screen + ld a, [hl] + and A_BUTTON + jr nz, .go_to_dex_entry + call Pokedex_ListingHandleDPadInput + ret nc + call Pokedex_UpdateSearchResultsCursorOAM + xor a + ldh [hBGMapMode], a + call Pokedex_PrintListing + call Pokedex_SetBGMapMode3 + call Pokedex_ResetBGMapMode + ret + +.go_to_dex_entry + call Pokedex_GetSelectedMon + call Pokedex_CheckSeen + ret z + ld a, DEXSTATE_DEX_ENTRY_SCR + ld [wJumptableIndex], a + ld a, DEXSTATE_SEARCH_RESULTS_SCR + ld [wPrevDexEntryJumptableIndex], a + ret + +.return_to_search_screen + ld a, [wDexListingScrollOffsetBackup] + ld [wDexListingScrollOffset], a + ld a, [wDexListingScrollOffsetBackup + 1] + ld [wDexListingScrollOffset + 1], a + ld a, [wDexListingCursorBackup] + ld [wDexListingCursor], a + ld a, [wPrevDexEntryBackup] + ld [wPrevDexEntry], a + ld a, [wPrevDexEntryBackup + 1] + ld [wPrevDexEntry + 1], a + call Pokedex_BlackOutBG + call ClearSprites + call Pokedex_OrderMonsByMode + ld a, DEXSTATE_SEARCH_SCR + ld [wJumptableIndex], a + xor a + ldh [hSCX], a + ld a, $a7 + ldh [hWX], a + ret + +Pokedex_InitUnownMode: + call Pokedex_LoadUnownFont + call Pokedex_DrawUnownModeBG + xor a + ld [wDexCurUnownIndex], a + call Pokedex_LoadUnownFrontpicTiles + call Pokedex_UnownModePlaceCursor + farcall PrintUnownWord + call WaitBGMap + ld a, SCGB_POKEDEX_UNOWN_MODE + call Pokedex_GetSGBLayout + call Pokedex_IncrementDexPointer + ret + +Pokedex_UpdateUnownMode: + ld hl, hJoyPressed + ld a, [hl] + and A_BUTTON | B_BUTTON + jr nz, .a_b + call Pokedex_UnownModeHandleDPadInput + ret + +.a_b + call Pokedex_BlackOutBG + ld a, DEXSTATE_OPTION_SCR + ld [wJumptableIndex], a + call DelayFrame + call Pokedex_CheckSGB + jr nz, .decompress + farcall LoadSGBPokedexGFX2 + jr .done + +.decompress + ld hl, PokedexLZ + ld de, vTiles2 tile $31 + lb bc, BANK(PokedexLZ), 58 + call DecompressRequest2bpp + +.done + ret + +Pokedex_UnownModeHandleDPadInput: + ld hl, hJoyLast + ld a, [hl] + and D_RIGHT + jr nz, .right + ld a, [hl] + and D_LEFT + jr nz, .left + ret + +.right + ld a, [wDexUnownCount] + ld e, a + ld hl, wDexCurUnownIndex + ld a, [hl] + inc a + cp e + ret nc + ld a, [hl] + inc [hl] + jr .update + +.left + ld hl, wDexCurUnownIndex + ld a, [hl] + and a + ret z + ld a, [hl] + dec [hl] + +.update + push af + xor a + ldh [hBGMapMode], a + pop af + call Pokedex_UnownModeEraseCursor + call Pokedex_LoadUnownFrontpicTiles + call Pokedex_UnownModePlaceCursor + farcall PrintUnownWord + ld a, $1 + ldh [hBGMapMode], a + call DelayFrame + call DelayFrame + ret + +Pokedex_UnownModeEraseCursor: + ld c, " " + jr Pokedex_UnownModeUpdateCursorGfx + +Pokedex_UnownModePlaceCursor: + ld a, [wDexCurUnownIndex] + ld c, FIRST_UNOWN_CHAR + NUM_UNOWN ; diamond cursor + +Pokedex_UnownModeUpdateCursorGfx: + ld e, a + ld d, 0 + ld hl, UnownModeLetterAndCursorCoords + 2 +rept 4 + add hl, de +endr + ld a, [hli] + ld h, [hl] + ld l, a + ld [hl], c + ret + +Pokedex_LoadListingScrollParams: + ; d = min(wDexListingEnd, wDexListingHeight); e = remaining scroll distance (cap at $FF) + ld hl, wDexListingScrollOffset + ld a, [hli] + cpl + ld e, a + ld a, [hli] + cpl + ld d, a + inc hl + ; hl = wDexListingEnd + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + inc hl + ld a, [wDexListingHeight] + ld d, a + ld a, l + sub d + ld e, a + ld a, h + jr nc, .check_overflow + sub 1 + jr c, .underflow +.check_overflow + and a + ret z + ld e, $FF + ret + +.underflow + ld e, h ; h = 0 here + ld a, [wDexListingEnd] + ld d, a + ret + +Pokedex_NextOrPreviousDexEntry: + ld a, [wDexListingCursor] + ld [wBackupDexListingCursor], a + ld a, [wDexListingScrollOffset] + ld [wBackupDexListingPage], a + ld a, [wDexListingScrollOffset + 1] + ld [wBackupDexListingPage + 1], a + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .up + ld a, [hl] + and D_DOWN + ret z + +; down +.next + call Pokedex_LoadListingScrollParams + call Pokedex_ListingMoveCursorDown + jr nc, .nope + call Pokedex_GetSelectedMon + call Pokedex_CheckSeen + jr z, .next + scf + ret + +.check + call Pokedex_GetSelectedMon + call Pokedex_CheckSeen + scf + ret nz +.up + call Pokedex_ListingMoveCursorUp + jr c, .check +.nope + ld a, [wBackupDexListingCursor] + ld [wDexListingCursor], a + ld a, [wBackupDexListingPage] + ld [wDexListingScrollOffset], a + ld a, [wBackupDexListingPage + 1] + ld [wDexListingScrollOffset + 1], a + and a + ret + +Pokedex_ListingHandleDPadInput: +; Handles D-pad input for a list of Pokémon. + call Pokedex_LoadListingScrollParams + ld hl, hJoyLast + bit D_UP_F, [hl] + jr nz, Pokedex_ListingMoveCursorUp + bit D_DOWN_F, [hl] + jr nz, Pokedex_ListingMoveCursorDown + ld a, [wDexListingHeight] + xor d ; compares for equality (if zero) and clears carry + ret nz + bit D_LEFT_F, [hl] + jr nz, Pokedex_ListingMoveUpOnePage + bit D_RIGHT_F, [hl] + jr nz, Pokedex_ListingMoveDownOnePage + ret + +Pokedex_ListingMoveCursorUp: + ld hl, wDexListingCursor + ld a, [hl] + and a + jr z, .try_scrolling + dec [hl] +.done + scf + ret + +.try_scrolling + ld hl, wDexListingScrollOffset + 1 + ld a, [hld] + and a + ld a, [hl] + jr nz, .go + and a + ret z +.go + sub 1 + ld [hli], a + jr nc, .done + dec [hl] + ret + +Pokedex_ListingMoveCursorDown: + ld hl, wDexListingCursor + inc [hl] + ld a, [hl] + cp d + ret c + dec [hl] + ld a, e + and a + ret z + ld hl, wDexListingScrollOffset + inc [hl] + jr nz, .done + inc hl + inc [hl] +.done + scf + ret + +Pokedex_ListingMoveUpOnePage: + ld hl, wDexListingScrollOffset + 1 + ld a, [hld] + or [hl] + ret z + ld a, [hl] + sub d + ld [hli], a + jr nc, .done + ld a, [hl] + dec [hl] + and a + jr nz, .done + ; a = 0 here + ld [hld], a + ld [hl], a +.done + scf + ret + +Pokedex_ListingMoveDownOnePage: + ld a, e + and a + ret z + cp d + jr c, .got_scroll + ld a, d +.got_scroll + ld hl, wDexListingScrollOffset + add a, [hl] + ld [hli], a + jr nc, .done + inc [hl] +.done + scf + ret + +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 + ld de, SCREEN_WIDTH +.loop + ld [hl], a + add hl, de + dec b + jr nz, .loop + pop de + ret + +Pokedex_PrintLittleEndian: + ; in: hl, de as per PrintNum - bc will be set internally + ld a, [de] + ld [wPokedexDisplayNumber + 1], a + inc de + ld a, [de] + ld de, wPokedexDisplayNumber + ld [de], a + lb bc, 2, 3 + jp PrintNum + +Pokedex_DrawMainScreenBG: +; Draws the left sidebar and the bottom bar on the main screen. + hlcoord 0, 17 + ld de, String_START_SEARCH + call Pokedex_PlaceString + ld a, $32 + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + hlcoord 0, 0 + lb bc, 7, 7 + call Pokedex_PlaceBorder + hlcoord 0, 9 + lb bc, 6, 7 + call Pokedex_PlaceBorder + hlcoord 1, 11 + ld de, String_SEEN + call Pokedex_PlaceString + ld hl, wPokedexSeen + ld bc, wEndPokedexSeen - wPokedexSeen + call CountSetBits16 + ld a, c + ld de, wPokedexDisplayNumber + 1 + ld [de], a + dec de + ld a, b + ld [de], a + hlcoord 5, 12 + lb bc, 2, 3 + call PrintNum + hlcoord 1, 14 + ld de, String_OWN + call Pokedex_PlaceString + ld hl, wPokedexCaught + ld bc, wEndPokedexCaught - wPokedexCaught + call CountSetBits16 + ld a, c + ld de, wPokedexDisplayNumber + 1 + ld [de], a + dec de + ld a, b + ld [de], a + hlcoord 5, 15 + lb bc, 2, 3 + call PrintNum + hlcoord 1, 17 + ld de, String_SELECT_OPTION + call Pokedex_PlaceString + hlcoord 8, 1 + ld b, 7 + ld a, $5a + call Pokedex_FillColumn + hlcoord 8, 10 + ld b, 6 + ld a, $5a + call Pokedex_FillColumn + hlcoord 8, 0 + ld [hl], $59 + hlcoord 8, 8 + ld [hl], $53 + hlcoord 8, 9 + ld [hl], $54 + hlcoord 8, 16 + ld [hl], $5b + call Pokedex_PlaceFrontpicTopLeftCorner + ret + +String_SEEN: + db "SEEN", -1 +String_OWN: + db "OWN", -1 +String_SELECT_OPTION: + db $3b, $48, $49, $4a, $44, $45, $46, $47 ; SELECT > OPTION + ; fallthrough +String_START_SEARCH: + db $3c, $3b, $41, $42, $43, $4b, $4c, $4d, $4e, $3c, -1 ; START > SEARCH + +Pokedex_DrawDexEntryScreenBG: + call Pokedex_FillBackgroundColor2 + hlcoord 0, 0 + lb bc, 15, 18 + call Pokedex_PlaceBorder + hlcoord 19, 0 + ld [hl], $34 + hlcoord 19, 1 + ld a, " " + ld b, 15 + call Pokedex_FillColumn + ld [hl], $39 + hlcoord 1, 10 + ld bc, 19 + ld a, $61 + call ByteFill + hlcoord 1, 17 + ld bc, 18 + ld a, " " + call ByteFill + hlcoord 9, 7 + ld de, .Height + call Pokedex_PlaceString + hlcoord 9, 9 + ld de, .Weight + call Pokedex_PlaceString + hlcoord 0, 17 + ld de, .MenuItems + call Pokedex_PlaceString + call Pokedex_PlaceFrontpicTopLeftCorner + ret + +.Number: ; unreferenced + db $5c, $5d, -1 ; No. +.Height: + db "HT ?", $5e, "??", $5f, -1 ; HT ?'??" +.Weight: + db "WT ???lb", -1 +.MenuItems: + db $3b, " PAGE AREA CRY PRNT", -1 + +Pokedex_DrawOptionScreenBG: + call Pokedex_FillBackgroundColor2 + hlcoord 0, 2 + lb bc, 8, 18 + call Pokedex_PlaceBorder + hlcoord 0, 12 + lb bc, 4, 18 + call Pokedex_PlaceBorder + hlcoord 0, 1 + ld de, .Title + call Pokedex_PlaceString + hlcoord 3, 4 + ld de, .Modes + call PlaceString + ld a, [wUnlockedUnownMode] + and a + ret z + hlcoord 3, 10 + ld de, .UnownMode + call PlaceString + ret + +.Title: + db $3b, " OPTION ", $3c, -1 + +.Modes: + db "NEW #DEX MODE" + next "OLD #DEX MODE" + next "A to Z MODE" + db "@" + +.UnownMode: + db "UNOWN MODE@" + +Pokedex_DrawSearchScreenBG: + call Pokedex_FillBackgroundColor2 + hlcoord 0, 2 + lb bc, 14, 18 + call Pokedex_PlaceBorder + hlcoord 0, 1 + ld de, .Title + call Pokedex_PlaceString + hlcoord 8, 4 + ld de, .TypeLeftRightArrows + call Pokedex_PlaceString + hlcoord 8, 6 + ld de, .TypeLeftRightArrows + call Pokedex_PlaceString + hlcoord 3, 4 + ld de, .Types + call PlaceString + hlcoord 3, 13 + ld de, .Menu + call PlaceString + ret + +.Title: + db $3b, " SEARCH ", $3c, -1 + +.TypeLeftRightArrows: + db $3d, " ", $3e, -1 + +.Types: + db "TYPE1" + next "TYPE2" + db "@" + +.Menu: + db "BEGIN SEARCH!!" + next "CANCEL" + db "@" + +Pokedex_DrawSearchResultsScreenBG: + call Pokedex_FillBackgroundColor2 + hlcoord 0, 0 + lb bc, 7, 7 + call Pokedex_PlaceBorder + hlcoord 0, 11 + lb bc, 5, 18 + call Pokedex_PlaceBorder + hlcoord 1, 12 + ld de, .BottomWindowText + call PlaceString + ld de, wDexSearchResultCount + hlcoord 1, 16 + call Pokedex_PrintLittleEndian + hlcoord 8, 0 + ld [hl], $59 + hlcoord 8, 1 + ld b, 7 + ld a, $5a + call Pokedex_FillColumn + hlcoord 8, 8 + ld [hl], $53 + hlcoord 8, 9 + ld [hl], $69 + hlcoord 8, 10 + ld [hl], $6a + call Pokedex_PlaceFrontpicTopLeftCorner + ret + +.BottomWindowText: + db "SEARCH RESULTS" + next " TYPE" + next " FOUND!" + db "@" +Pokedex_PlaceSearchResultsTypeStrings: + ld a, [wDexSearchMonType1] + hlcoord 0, 14 + call Pokedex_PlaceTypeString + ld a, [wDexSearchMonType1] + ld b, a + ld a, [wDexSearchMonType2] + and a + jr z, .done + cp b + jr z, .done + hlcoord 2, 15 + call Pokedex_PlaceTypeString + hlcoord 1, 15 + ld [hl], "/" +.done + ret + +Pokedex_DrawUnownModeBG: + call Pokedex_FillBackgroundColor2 + hlcoord 2, 1 + lb bc, 10, 13 + call Pokedex_PlaceBorder + hlcoord 2, 14 + lb bc, 1, 13 + call Pokedex_PlaceBorder + hlcoord 2, 15 + ld [hl], $3d + hlcoord 16, 15 + ld [hl], $3e + hlcoord 6, 5 + call Pokedex_PlaceFrontpicAtHL + ld de, 0 + ld b, 0 + ld c, NUM_UNOWN +.loop + ld hl, wUnownDex + add hl, de + ld a, [hl] + and a + jr z, .done + push af + ld hl, UnownModeLetterAndCursorCoords +rept 4 + add hl, de +endr + ld a, [hli] + ld h, [hl] + ld l, a + pop af + add FIRST_UNOWN_CHAR - 1 ; Unown A + ld [hl], a + inc de + inc b + dec c + jr nz, .loop +.done + ld a, b + ld [wDexUnownCount], a + ret + +UnownModeLetterAndCursorCoords: +; entries correspond to Unown forms +; letter, cursor + dwcoord 4,11, 3,11 ; A + dwcoord 4,10, 3,10 ; B + dwcoord 4, 9, 3, 9 ; C + dwcoord 4, 8, 3, 8 ; D + dwcoord 4, 7, 3, 7 ; E + dwcoord 4, 6, 3, 6 ; F + dwcoord 4, 5, 3, 5 ; G + dwcoord 4, 4, 3, 4 ; H + dwcoord 4, 3, 3, 2 ; I + dwcoord 5, 3, 5, 2 ; J + dwcoord 6, 3, 6, 2 ; K + dwcoord 7, 3, 7, 2 ; L + dwcoord 8, 3, 8, 2 ; M + dwcoord 9, 3, 9, 2 ; N + dwcoord 10, 3, 10, 2 ; O + dwcoord 11, 3, 11, 2 ; P + dwcoord 12, 3, 12, 2 ; Q + dwcoord 13, 3, 13, 2 ; R + dwcoord 14, 3, 15, 2 ; S + dwcoord 14, 4, 15, 4 ; T + dwcoord 14, 5, 15, 5 ; U + dwcoord 14, 6, 15, 6 ; V + dwcoord 14, 7, 15, 7 ; W + dwcoord 14, 8, 15, 8 ; X + dwcoord 14, 9, 15, 9 ; Y + dwcoord 14,10, 15,10 ; Z + +Pokedex_FillBackgroundColor2: + hlcoord 0, 0 + ld a, $32 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + ret + +Pokedex_PlaceFrontpicTopLeftCorner: + hlcoord 1, 1 +Pokedex_PlaceFrontpicAtHL: + xor a + ld b, $7 +.row + ld c, $7 + push af + push hl +.col + ld [hli], a + add $7 + dec c + jr nz, .col + pop hl + ld de, SCREEN_WIDTH + add hl, de + pop af + inc a + dec b + jr nz, .row + ret + +Pokedex_PlaceString: +.loop + ld a, [de] + cp -1 + ret z + inc de + ld [hli], a + jr .loop + +Pokedex_PlaceBorder: + push hl + ld a, $33 + ld [hli], a + ld d, $34 + call .FillRow + ld a, $35 + ld [hl], a + pop hl + ld de, SCREEN_WIDTH + add hl, de +.loop + push hl + ld a, $36 + ld [hli], a + ld d, $7f + call .FillRow + ld a, $37 + ld [hl], a + pop hl + ld de, SCREEN_WIDTH + add hl, de + dec b + jr nz, .loop + ld a, $38 + ld [hli], a + ld d, $39 + call .FillRow + ld a, $3a + ld [hl], a + ret + +.FillRow: + ld e, c +.row_loop + ld a, e + and a + ret z + ld a, d + ld [hli], a + dec e + jr .row_loop + +Pokedex_PrintListing: +; Prints the list of Pokémon on the main Pokédex screen. + + ld c, 11 +; Clear (2 * [wDexListingHeight] + 1) by 11 box starting at 0,1 + hlcoord 0, 1 + ld a, [wDexListingHeight] + add a + inc a + ld b, a + ld a, " " + call Pokedex_FillBox + +; Load de with a pointer to the first mon on the list + ld hl, wDexListingScrollOffset + ld a, [hli] + ld h, [hl] + ld l, a + add hl, hl + ld de, wPokedexOrder + add hl, de + ld e, l + ld d, h + hlcoord 0, 2 + ldh a, [rSVBK] + push af + ld a, [wDexListingHeight] +.loop + push af + ld a, BANK(wPokedexOrder) + ldh [rSVBK], a + ld a, [de] + ld c, a + inc de + ld a, [de] + inc de + push de + ld d, a + ld e, c + or e + push hl + call nz, .PrintEntry + pop hl + ld de, 2 * SCREEN_WIDTH + add hl, de + pop de + pop af + dec a + jr nz, .loop + pop af + ldh [rSVBK], a + jp Pokedex_LoadSelectedMonTiles + +.PrintEntry: + ld a, d + and e + inc a + ret z + ld a, BANK(wPokedexSeen) + ldh [rSVBK], a + call Pokedex_PrintNumberIfOldMode + call Pokedex_PlaceDefaultStringIfNotSeen + ret c + call Pokedex_PlaceCaughtSymbolIfCaught + push hl + ; hl = de * 10 (length of a Pokémon name) + ld h, d + ld l, e + add hl, hl + add hl, hl + add hl, de + add hl, hl + ld de, PokemonNames - (MON_NAME_LENGTH - 1) ;correct for the one-based indexing + add hl, de + ld a, BANK(PokemonNames) + ld bc, MON_NAME_LENGTH - 1 + ld de, wPokedexNameBuffer + push de + call FarCopyBytes + ld a, "@" + ld [wPokedexNameBuffer + MON_NAME_LENGTH - 1], a + pop de + pop hl + jp PlaceString + +Pokedex_PrintNumberIfOldMode: + ld a, [wCurDexMode] + cp DEXMODE_OLD + ret nz + push hl + push de + ld bc, -SCREEN_WIDTH + add hl, bc + ld a, e + ld [wPokedexDisplayNumber + 1], a + ld a, d + ld de, wPokedexDisplayNumber + ld [de], a + lb bc, PRINTNUM_LEADINGZEROS | 2, 3 + call PrintNum + pop de + pop hl + ret + +Pokedex_PlaceCaughtSymbolIfCaught: + push hl + push de + call CheckCaughtMonIndex + pop de + pop hl + jr nz, .place_caught_symbol + inc hl + ret + +.place_caught_symbol + ld a, $4f + ld [hli], a + ret + +Pokedex_PlaceDefaultStringIfNotSeen: + push hl + push de + call CheckSeenMonIndex + pop de + pop hl + ret nz + inc hl + ld de, .NameNotSeen + call PlaceString + scf + ret + +.NameNotSeen: + db "-----@" + +Pokedex_DrawFootprint: + hlcoord 18, 1 + ld a, $62 + ld [hli], a + inc a + ld [hl], a + hlcoord 18, 2 + ld a, $64 + ld [hli], a + inc a + ld [hl], a + ret + +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. + ldh a, [rSVBK] + push af + ld a, BANK(wPokedexOrder) + ldh [rSVBK], a + ld hl, wDexListingScrollOffset + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wDexListingCursor] + ld e, a + ld d, 0 + add hl, de + ld de, wPokedexOrder + add hl, hl + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + pop af + ldh [rSVBK], a + push hl + call GetPokemonIDFromIndex + ld l, LOCKED_MON_ID_DEX_SELECTED + call LockPokemonID + pop hl + ld [wTempSpecies], a + ret + +Pokedex_CheckSeen: + push de + push hl + ld a, [wTempSpecies] + call CheckSeenMon + pop hl + pop de + ret + +Pokedex_OrderMonsByMode: + ld hl, wEndPokedexSeen - 1 + ld c, wEndPokedexSeen - wPokedexSeen +.last_seen_loop + ld a, [hld] + and a + jr nz, .found_last_seen + dec c + jr nz, .last_seen_loop +.found_last_seen + ld [wDexLastSeenValue], a + dec c + and a ;flags will be preserved until the jump, since all following operations are loads (and a push) + ld a, c + ld [wDexLastSeenIndex], a + + ldh a, [rSVBK] + push af + ld a, BANK(wPokedexOrder) + ldh [rSVBK], a + ld hl, wPokedexOrder + ld a, -1 + jr z, .nothing_seen + ld bc, (NUM_POKEMON + 1) * 2 + call ByteFill + ld a, [wCurDexMode] + ld hl, .Jumptable + call Pokedex_LoadPointer + call _hl_ +.restore_bank_and_exit + pop af + ldh [rSVBK], a + ret + +.nothing_seen + ld [hli], a + ld [hl], a + xor a + ld hl, wDexListingEnd + ld [hli], a + ld [hl], a + jr .restore_bank_and_exit + +.Jumptable: + dw .NewMode + dw .OldMode + dw Pokedex_ABCMode + +.OldMode: + ld a, [wDexLastSeenValue] ;known to be non-zero + ld c, 9 ;bits are numbered 1-8 (instead of 0-7) because the first dex entry is #001, not #000 +.highest_bit_index_loop + dec c + add a, a + jr nc, .highest_bit_index_loop + ld a, [wDexLastSeenIndex] + ld l, a + ld h, 0 + ld b, h + add hl, hl + add hl, hl + add hl, hl + add hl, bc + ld d, h + ld e, l + ld hl, wPokedexOrder + ld c, b ;b = 0 +.old_mode_loop + inc bc + ld a, c + ld [hli], a + ld a, b + ld [hli], a + cp d + jr c, .old_mode_loop + ld a, c + cp e + jr c, .old_mode_loop + ld hl, wDexListingEnd + ld a, e + ld [hli], a + ld [hl], d + ret + +.NewMode: + ld hl, NewPokedexOrder + ld de, wPokedexOrder + ld bc, NUM_POKEMON * 2 + call CopyBytes + ld a, BANK(wPokedexSeen) + ldh [rSVBK], a + ld bc, NUM_POKEMON + ld hl, NewPokedexOrder + (2 * NUM_POKEMON) - 1 +.new_mode_last_seen_loop + ld a, [hld] + ld d, a + ld a, [hld] + ld e, a + push hl + push bc + call CheckSeenMonIndex + pop bc + pop hl + jr nz, .found_last_seen_index + dec bc + ld a, b + or c + jr nz, .new_mode_last_seen_loop +.found_last_seen_index + ld hl, wDexListingEnd + ld a, c + ld [hli], a + ld [hl], b + ret + +Pokedex_ABCMode: + ; called in the WRAM bank of wPokedexOrder; the function doesn't preserve it + ld hl, wDexTempCounter + ld a, LOW(-NUM_POKEMON) + ld [hli], a + ld [hl], HIGH(-NUM_POKEMON) + ld bc, AlphabeticalPokedexOrder + ld de, wPokedexOrder + ld a, BANK(wPokedexSeen) + ldh [rSVBK], a +.loop + push de + ld a, [bc] + ld e, a + inc bc + ld a, [bc] + ld d, a + push bc + call CheckSeenMonIndex + pop bc + pop de + jr z, .skip + ld a, BANK(wPokedexOrder) + ldh [rSVBK], a + dec bc + ld a, [bc] + ld [de], a + inc de + inc bc + ld a, [bc] + ld [de], a + inc de + ld a, BANK(wPokedexSeen) + ldh [rSVBK], a +.skip + inc bc + ld hl, wDexTempCounter + inc [hl] + jr nz, .loop + inc hl + inc [hl] + jr nz, .loop + ld hl, $10000 - wPokedexOrder ;ld hl, -wPokedexOrder -- see https://github.com/rednex/rgbds/issues/279 + add hl, de + srl h + rr l + ld a, l + ld [wDexListingEnd], a + ld a, h + ld [wDexListingEnd + 1], a + ret + +INCLUDE "data/pokemon/dex_order_alpha.asm" + +INCLUDE "data/pokemon/dex_order_new.asm" + +Pokedex_DisplayModeDescription: + xor a + ldh [hBGMapMode], a + hlcoord 0, 12 + lb bc, 4, 18 + call Pokedex_PlaceBorder + ld a, [wDexArrowCursorPosIndex] + ld hl, .Modes + call Pokedex_LoadPointer + ld e, l + ld d, h + hlcoord 1, 14 + call PlaceString + ld a, $1 + ldh [hBGMapMode], a + ret + +.Modes: + dw .NewMode + dw .OldMode + dw .ABCMode + dw .UnownMode + +.NewMode: + db " are listed by" + next "evolution type.@" + +.OldMode: + db " are listed by" + next "official type.@" + +.ABCMode: + db " are listed" + next "alphabetically.@" + +.UnownMode: + db "UNOWN are listed" + next "in catching order.@" + +Pokedex_DisplayChangingModesMessage: + xor a + ldh [hBGMapMode], a + hlcoord 0, 12 + lb bc, 4, 18 + call Pokedex_PlaceBorder + ld de, String_ChangingModesPleaseWait + hlcoord 1, 14 + call PlaceString + ld a, $1 + ldh [hBGMapMode], a + ld c, 64 + call DelayFrames + ld de, SFX_CHANGE_DEX_MODE + call PlaySFX + ld c, 64 + call DelayFrames + ret + +String_ChangingModesPleaseWait: + db "Changing modes." + next "Please wait.@" + +Pokedex_UpdateSearchMonType: + ld a, [wDexArrowCursorPosIndex] + cp 2 + jr nc, .no_change + ld hl, hJoyLast + ld a, [hl] + and D_LEFT + jr nz, Pokedex_PrevSearchMonType + ld a, [hl] + and D_RIGHT + jr nz, Pokedex_NextSearchMonType +.no_change + and a + ret + +Pokedex_PrevSearchMonType: + ld a, [wDexArrowCursorPosIndex] + and a + jr nz, .type2 + + ld hl, wDexSearchMonType1 + ld a, [hl] + cp 1 + jr z, .wrap_around + dec [hl] + jr .done + +.type2 + ld hl, wDexSearchMonType2 + ld a, [hl] + and a + jr z, .wrap_around + dec [hl] + jr .done + +.wrap_around + ld [hl], NUM_TYPES + +.done + scf + ret + +Pokedex_NextSearchMonType: + ld a, [wDexArrowCursorPosIndex] + and a + jr nz, .type2 + + ld hl, wDexSearchMonType1 + ld a, [hl] + cp NUM_TYPES + jr nc, .type1_wrap_around + inc [hl] + jr .done +.type1_wrap_around + ld [hl], 1 + jr .done + +.type2 + ld hl, wDexSearchMonType2 + ld a, [hl] + cp NUM_TYPES + jr nc, .type2_wrap_around + inc [hl] + jr .done +.type2_wrap_around + ld [hl], 0 + +.done + scf + ret + +Pokedex_PlaceSearchScreenTypeStrings: + xor a + ldh [hBGMapMode], a + hlcoord 9, 3 + lb bc, 4, 8 + ld a, " " + call Pokedex_FillBox + ld a, [wDexSearchMonType1] + hlcoord 9, 4 + call Pokedex_PlaceTypeString + ld a, [wDexSearchMonType2] + hlcoord 9, 6 + call Pokedex_PlaceTypeString + ld a, $1 + ldh [hBGMapMode], a + ret + +Pokedex_PlaceTypeString: + push hl + ld e, a + ld d, 0 + ld hl, PokedexTypeSearchStrings +rept POKEDEX_TYPE_STRING_LENGTH + add hl, de +endr + ld e, l + ld d, h + pop hl + call PlaceString + ret + +INCLUDE "data/types/search_strings.asm" + +Pokedex_SearchForMons: + ldh a, [rSVBK] + push af + ld a, BANK(wPokedexOrder) + ldh [rSVBK], a + ld a, [wDexSearchMonType2] + and a + call nz, .Search + ld a, [wDexSearchMonType1] + and a + call nz, .Search + pop af + ldh [rSVBK], a + ret + +.Search: + ld e, a + xor a + ld hl, wDexSearchResultCount + ld [hli], a + ld [hl], a + ld d, a + ld hl, PokedexTypeSearchConversionTable - 1 + add hl, de + ld a, [hl] + ld [wDexConvertedMonType], a + ld hl, wDexListingEnd + ld a, [hli] + ld c, a + ld b, [hl] + ld hl, wPokedexOrder + ld d, h + ld e, l + +.loop + push bc + ld a, [hli] + ld c, a + ld a, [hli] + push hl + ld b, a + or c + jr z, .next_mon + ld a, b + and c + inc a + jr z, .next_mon + push bc + push de + ld d, b + ld e, c + ld a, BANK(wPokedexSeen) + ldh [rSVBK], a + call CheckSeenMonIndex + ld a, BANK(wPokedexOrder) + ldh [rSVBK], a + pop de + pop bc + jr z, .next_mon + ; instead of going through an index conversion and GetBaseData (which would end up GC'ing the + ; index table several times!), just load the base data pointer directly and do a far read + ld a, BANK(BaseData) + ld hl, BaseData + push bc + call LoadIndirectPointer + ld bc, BASE_TYPES + add hl, bc + pop bc + jr z, .next_mon + call GetFarWord ;load both types in hl + ld a, [wDexConvertedMonType] + cp h + jr z, .match_found + cp l + jr nz, .next_mon + +.match_found + ld a, c + ld [de], a + inc de + ld a, b + ld [de], a + inc de + ld hl, wDexSearchResultCount + inc [hl] + jr nz, .next_mon + inc hl + inc [hl] + +.next_mon + pop hl + pop bc + dec bc + ld a, b + or c + jr nz, .loop + + ld hl, wDexSearchResultCount + ld bc, -(NUM_POKEMON + 1) + ld a, [hli] + ld h, [hl] + ld l, a + add hl, bc ;hl = minus the number of entries to clear + ld c, l + ld b, h + ld l, e + ld h, d + ld a, -1 +.clear_remaining_mons + ld [hli], a + ld [hli], a + inc c + jr nz, .clear_remaining_mons + inc b + jr nz, .clear_remaining_mons + ret + +INCLUDE "data/types/search_types.asm" + +Pokedex_DisplayTypeNotFoundMessage: + xor a + ldh [hBGMapMode], a + hlcoord 0, 12 + lb bc, 4, 18 + call Pokedex_PlaceBorder + ld de, .TypeNotFound + hlcoord 1, 14 + call PlaceString + ld a, $1 + ldh [hBGMapMode], a + ld c, $80 + call DelayFrames + ret + +.TypeNotFound: + db "The specified type" + next "was not found.@" + +Pokedex_UpdateCursorOAM: + ld a, [wCurDexMode] + cp DEXMODE_OLD + jp z, Pokedex_PutOldModeCursorOAM + call Pokedex_PutNewModeABCModeCursorOAM + call Pokedex_PutScrollbarOAM + ret + +Pokedex_PutOldModeCursorOAM: + ld hl, .CursorOAM + ld a, [wDexListingCursor] + or a + jr nz, .okay + ld hl, .CursorAtTopOAM +.okay + call Pokedex_LoadCursorOAM + ret + +.CursorOAM: + dbsprite 9, 3, -1, 0, $30, 7 + dbsprite 9, 2, -1, 0, $31, 7 + dbsprite 10, 2, -1, 0, $32, 7 + dbsprite 11, 2, -1, 0, $32, 7 + dbsprite 12, 2, -1, 0, $32, 7 + dbsprite 13, 2, -1, 0, $33, 7 + dbsprite 16, 2, -2, 0, $33, 7 | X_FLIP + dbsprite 17, 2, -2, 0, $32, 7 | X_FLIP + dbsprite 18, 2, -2, 0, $32, 7 | X_FLIP + dbsprite 19, 2, -2, 0, $32, 7 | X_FLIP + dbsprite 20, 2, -2, 0, $31, 7 | X_FLIP + dbsprite 20, 3, -2, 0, $30, 7 | X_FLIP + dbsprite 9, 4, -1, 0, $30, 7 | Y_FLIP + dbsprite 9, 5, -1, 0, $31, 7 | Y_FLIP + dbsprite 10, 5, -1, 0, $32, 7 | Y_FLIP + dbsprite 11, 5, -1, 0, $32, 7 | Y_FLIP + dbsprite 12, 5, -1, 0, $32, 7 | Y_FLIP + dbsprite 13, 5, -1, 0, $33, 7 | Y_FLIP + dbsprite 16, 5, -2, 0, $33, 7 | X_FLIP | Y_FLIP + dbsprite 17, 5, -2, 0, $32, 7 | X_FLIP | Y_FLIP + dbsprite 18, 5, -2, 0, $32, 7 | X_FLIP | Y_FLIP + dbsprite 19, 5, -2, 0, $32, 7 | X_FLIP | Y_FLIP + dbsprite 20, 5, -2, 0, $31, 7 | X_FLIP | Y_FLIP + dbsprite 20, 4, -2, 0, $30, 7 | X_FLIP | Y_FLIP + db -1 + +.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. + dbsprite 9, 3, -1, 0, $30, 7 + dbsprite 9, 2, -1, 0, $34, 7 + dbsprite 10, 2, -1, 0, $35, 7 + dbsprite 11, 2, -1, 0, $35, 7 + dbsprite 12, 2, -1, 0, $35, 7 + dbsprite 13, 2, -1, 0, $36, 7 + dbsprite 16, 2, -2, 0, $36, 7 | X_FLIP + dbsprite 17, 2, -2, 0, $35, 7 | X_FLIP + dbsprite 18, 2, -2, 0, $35, 7 | X_FLIP + dbsprite 19, 2, -2, 0, $35, 7 | X_FLIP + dbsprite 20, 2, -2, 0, $34, 7 | X_FLIP + dbsprite 20, 3, -2, 0, $30, 7 | X_FLIP + dbsprite 9, 4, -1, 0, $30, 7 | Y_FLIP + dbsprite 9, 5, -1, 0, $31, 7 | Y_FLIP + dbsprite 10, 5, -1, 0, $32, 7 | Y_FLIP + dbsprite 11, 5, -1, 0, $32, 7 | Y_FLIP + dbsprite 12, 5, -1, 0, $32, 7 | Y_FLIP + dbsprite 13, 5, -1, 0, $33, 7 | Y_FLIP + dbsprite 16, 5, -2, 0, $33, 7 | X_FLIP | Y_FLIP + dbsprite 17, 5, -2, 0, $32, 7 | X_FLIP | Y_FLIP + dbsprite 18, 5, -2, 0, $32, 7 | X_FLIP | Y_FLIP + dbsprite 19, 5, -2, 0, $32, 7 | X_FLIP | Y_FLIP + dbsprite 20, 5, -2, 0, $31, 7 | X_FLIP | Y_FLIP + dbsprite 20, 4, -2, 0, $30, 7 | X_FLIP | Y_FLIP + db -1 + +Pokedex_PutNewModeABCModeCursorOAM: + ld hl, .CursorOAM + call Pokedex_LoadCursorOAM + ret + +.CursorOAM: + dbsprite 9, 3, -1, 3, $30, 7 + dbsprite 9, 2, -1, 3, $31, 7 + dbsprite 10, 2, -1, 3, $32, 7 + dbsprite 11, 2, -1, 3, $32, 7 + dbsprite 12, 2, -1, 3, $33, 7 + dbsprite 16, 2, 0, 3, $33, 7 | X_FLIP + dbsprite 17, 2, 0, 3, $32, 7 | X_FLIP + dbsprite 18, 2, 0, 3, $32, 7 | X_FLIP + dbsprite 19, 2, 0, 3, $31, 7 | X_FLIP + dbsprite 19, 3, 0, 3, $30, 7 | X_FLIP + dbsprite 9, 4, -1, 3, $30, 7 | Y_FLIP + dbsprite 9, 5, -1, 3, $31, 7 | Y_FLIP + dbsprite 10, 5, -1, 3, $32, 7 | Y_FLIP + dbsprite 11, 5, -1, 3, $32, 7 | Y_FLIP + dbsprite 12, 5, -1, 3, $33, 7 | Y_FLIP + dbsprite 16, 5, 0, 3, $33, 7 | X_FLIP | Y_FLIP + dbsprite 17, 5, 0, 3, $32, 7 | X_FLIP | Y_FLIP + dbsprite 18, 5, 0, 3, $32, 7 | X_FLIP | Y_FLIP + dbsprite 19, 5, 0, 3, $31, 7 | X_FLIP | Y_FLIP + dbsprite 19, 4, 0, 3, $30, 7 | X_FLIP | Y_FLIP + db -1 + +Pokedex_UpdateSearchResultsCursorOAM: + ld a, [wCurDexMode] + cp DEXMODE_OLD + jp z, Pokedex_PutOldModeCursorOAM + ld hl, .CursorOAM + call Pokedex_LoadCursorOAM + ret + +.CursorOAM: + dbsprite 9, 3, -1, 3, $30, 7 + dbsprite 9, 2, -1, 3, $31, 7 + dbsprite 10, 2, -1, 3, $32, 7 + dbsprite 11, 2, -1, 3, $32, 7 + dbsprite 12, 2, -1, 3, $32, 7 + dbsprite 13, 2, -1, 3, $33, 7 + dbsprite 16, 2, -2, 3, $33, 7 | X_FLIP + dbsprite 17, 2, -2, 3, $32, 7 | X_FLIP + dbsprite 18, 2, -2, 3, $32, 7 | X_FLIP + dbsprite 19, 2, -2, 3, $32, 7 | X_FLIP + dbsprite 20, 2, -2, 3, $31, 7 | X_FLIP + dbsprite 20, 3, -2, 3, $30, 7 | X_FLIP + dbsprite 9, 4, -1, 3, $30, 7 | Y_FLIP + dbsprite 9, 5, -1, 3, $31, 7 | Y_FLIP + dbsprite 10, 5, -1, 3, $32, 7 | Y_FLIP + dbsprite 11, 5, -1, 3, $32, 7 | Y_FLIP + dbsprite 12, 5, -1, 3, $32, 7 | Y_FLIP + dbsprite 13, 5, -1, 3, $33, 7 | Y_FLIP + dbsprite 16, 5, -2, 3, $33, 7 | X_FLIP | Y_FLIP + dbsprite 17, 5, -2, 3, $32, 7 | X_FLIP | Y_FLIP + dbsprite 18, 5, -2, 3, $32, 7 | X_FLIP | Y_FLIP + dbsprite 19, 5, -2, 3, $32, 7 | X_FLIP | Y_FLIP + dbsprite 20, 5, -2, 3, $31, 7 | X_FLIP | Y_FLIP + dbsprite 20, 4, -2, 3, $30, 7 | X_FLIP | Y_FLIP + db -1 + +Pokedex_LoadCursorOAM: + ld de, wShadowOAMSprite00 +.loop + ld a, [hl] + cp -1 + ret z + ld a, [wDexListingCursor] + and $7 + swap a + add [hl] ; y + inc hl + ld [de], a + inc de + ld a, [hli] ; x + ld [de], a + inc de + ld a, [hli] ; tile id + ld [de], a + inc de + ld a, [hli] ; attributes + ld [de], a + inc de + jr .loop + +Pokedex_PutScrollbarOAM: + push de + ld hl, wDexListingEnd + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wDexListingHeight] + cpl + ld c, a + ld b, $FF + ; subtract wDexListingHeight + 1 so it will also overflow on wDexListingEnd = wDexListingHeight + add hl, bc + inc b ;b = 0 + jr nc, .done + inc hl ;compensate for the +1 + push hl + ld hl, wDexListingScrollOffset + ld a, [hli] + ld h, [hl] + ld l, a + ; multiply by 121 (scrollbar size) - first by 15... + ; (assume that the dex has less than $1000 entries - it won't fit in any RAM otherwise) + ld b, h + ld c, l + rept 4 + add hl, hl + endr + ld a, l + sub c + ld l, a + ld a, h + sbc b + ld h, a + ; ...then by 8 (15 * 8 = 120), storing overflows in a... + xor a + rept 3 + add hl, hl + adc a + endr + ; ...and add the original value, for a full result of ahl = wDexListingScrollOffset * 121 + add hl, bc + adc 0 + ; finally, double the value (for rounding after dividing) and transfer it to chl + add hl, hl + adc a + ld c, a + ; load the scroll height (pushed before) back into de, and multiply by -16... + pop de + push de + swap d + swap e + ld a, e + and $f + or d + cpl + ld d, a + ld a, e + and $f0 + cpl + ld e, a + inc de + ; ...and use it to calculate the upper nibble of the quotient by subtraction + inc c + ld b, 0 +.upper_loop + inc b + add hl, de + jr c, .upper_loop + dec c + jr nz, .upper_loop + res 4, b ;ensure overflow doesn't leave garbage behind + swap b + ; now there's a negative value in hl and an overly large result in b - adjust until the right value is found + pop de +.lower_loop + dec b + add hl, de + jr nc, .lower_loop + ; the result is in b - which is twice the true quotient, so increment and halve to round to nearest + inc b + srl b +.done + ld a, 20 ; min y + add b + pop hl + ld [hli], a + ld a, 161 ; x + ld [hli], a + ld a, $0f ; tile id + ld [hli], a + ld [hl], 0 ; attributes + ret + +Pokedex_InitArrowCursor: + xor a + ld [wDexArrowCursorPosIndex], a + ld [wDexArrowCursorDelayCounter], a + ld [wDexArrowCursorBlinkCounter], a + ret + +Pokedex_MoveArrowCursor: +; bc = [de] - 1 + ld a, [de] + ld b, a + inc de + ld a, [de] + dec a + ld c, a + inc de + call Pokedex_BlinkArrowCursor + + ld hl, hJoyPressed + ld a, [hl] + and D_LEFT | D_UP + and b + jr nz, .move_left_or_up + ld a, [hl] + and D_RIGHT | D_DOWN + and b + jr nz, .move_right_or_down + ld a, [hl] + and SELECT + and b + jr nz, .select + call Pokedex_ArrowCursorDelay + jr c, .no_action + ld hl, hJoyLast + ld a, [hl] + and D_LEFT | D_UP + and b + jr nz, .move_left_or_up + ld a, [hl] + and D_RIGHT | D_DOWN + and b + jr nz, .move_right_or_down + jr .no_action + +.move_left_or_up + ld a, [wDexArrowCursorPosIndex] + and a + jr z, .no_action + call Pokedex_GetArrowCursorPos + ld [hl], " " + ld hl, wDexArrowCursorPosIndex + dec [hl] + jr .update_cursor_pos + +.move_right_or_down + ld a, [wDexArrowCursorPosIndex] + cp c + jr nc, .no_action + call Pokedex_GetArrowCursorPos + ld [hl], " " + ld hl, wDexArrowCursorPosIndex + inc [hl] + +.update_cursor_pos + call Pokedex_GetArrowCursorPos + ld [hl], "▶" + ld a, 12 + ld [wDexArrowCursorDelayCounter], a + xor a + ld [wDexArrowCursorBlinkCounter], a + scf + ret + +.no_action + and a + ret + +.select + call Pokedex_GetArrowCursorPos + ld [hl], " " + ld a, [wDexArrowCursorPosIndex] + cp c + jr c, .update + ld a, -1 +.update + inc a + ld [wDexArrowCursorPosIndex], a + jr .update_cursor_pos + +Pokedex_GetArrowCursorPos: + ld a, [wDexArrowCursorPosIndex] + add a + ld l, a + ld h, 0 + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ret + +Pokedex_BlinkArrowCursor: + ld hl, wDexArrowCursorBlinkCounter + ld a, [hl] + inc [hl] + and $8 + jr z, .blink_on + call Pokedex_GetArrowCursorPos + ld [hl], " " + ret + +.blink_on + call Pokedex_GetArrowCursorPos + ld [hl], "▶" + ret + +Pokedex_ArrowCursorDelay: +; Updates the delay counter set when moving the arrow cursor. +; Returns whether the delay is active in carry. + ld hl, wDexArrowCursorDelayCounter + ld a, [hl] + and a + ret z + + dec [hl] + scf + ret + +Pokedex_FillBox: + jp FillBoxWithByte + +Pokedex_BlackOutBG: + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + ld hl, wBGPals1 + ld bc, 8 palettes + xor a + call ByteFill + pop af + ldh [rSVBK], a + +Pokedex_ApplyPrintPals: + ld a, $ff + call DmgToCgbBGPals + ld a, $ff + call DmgToCgbObjPal0 + call DelayFrame + ret + +Pokedex_GetSGBLayout: + ld b, a + call GetSGBLayout + +Pokedex_ApplyUsualPals: +; This applies the palettes used for most Pokédex screens. + ld a, $e4 + call DmgToCgbBGPals + ld a, $e0 + call DmgToCgbObjPal0 + ret + +Pokedex_LoadPointer: + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ret + +Pokedex_LoadSelectedMonTiles: +; Loads the tiles of the currently selected Pokémon. + call Pokedex_GetSelectedMon + call Pokedex_CheckSeen + jr z, .QuestionMark + ld a, [wFirstUnownSeen] + ld [wUnownLetter], a + ld a, [wTempSpecies] + ld [wCurPartySpecies], a + call GetBaseData + ld de, vTiles2 + predef GetMonFrontpic + ret + +.QuestionMark: + ld a, BANK(sScratch) + call OpenSRAM + farcall LoadQuestionMarkPic + ld hl, vTiles2 + ld de, sScratch + ld c, 7 * 7 + ldh a, [hROMBank] + ld b, a + call Get2bpp + call CloseSRAM + ret + +Pokedex_LoadCurrentFootprint: + call Pokedex_GetSelectedMon + +Pokedex_LoadAnyFootprint: + ld a, [wTempSpecies] + call GetPokemonIndexFromID + dec hl + add hl, hl + add hl, hl + add hl, hl + add hl, hl + add hl, hl + ld de, Footprints + add hl, de + + ld e, l + ld d, h + ld hl, vTiles2 tile $62 + lb bc, BANK(Footprints), 4 + jp Request1bpp + +Pokedex_LoadGFX: + call DisableLCD + ld hl, vTiles2 + ld bc, $31 tiles + xor a + call ByteFill + call Pokedex_LoadInvertedFont + call LoadFontsExtra + ld hl, vTiles2 tile $60 + ld bc, $20 tiles + call Pokedex_InvertTiles + call Pokedex_CheckSGB + jr nz, .LoadPokedexLZ + farcall LoadSGBPokedexGFX + jr .LoadPokedexSlowpokeLZ + +.LoadPokedexLZ: + ld hl, PokedexLZ + ld de, vTiles2 tile $31 + call Decompress + +.LoadPokedexSlowpokeLZ: + ld hl, PokedexSlowpokeLZ + ld de, vTiles0 + call Decompress + ld a, 6 + call SkipMusic + call EnableLCD + ret + +Pokedex_LoadInvertedFont: + call LoadStandardFont + ld hl, vTiles1 + ld bc, $80 tiles + +Pokedex_InvertTiles: +.loop + ld a, [hl] + xor $ff + ld [hli], a + dec bc + ld a, b + or c + jr nz, .loop + ret + +PokedexLZ: +INCBIN "gfx/pokedex/pokedex.2bpp.lz" + +PokedexSlowpokeLZ: +INCBIN "gfx/pokedex/slowpoke.2bpp.lz" + +Pokedex_CheckSGB: + ldh a, [hCGB] + or a + ret nz + ldh a, [hSGB] + dec a + ret + +Pokedex_LoadUnownFont: + ld a, BANK(sScratch) + call OpenSRAM + ld hl, UnownFont + ; sScratch + $188 was the address of sDecompressBuffer in pokegold + ld de, sScratch + $188 + ld bc, 39 tiles + ld a, BANK(UnownFont) + call FarCopyBytes + ld hl, sScratch + $188 + ld bc, (NUM_UNOWN + 1) tiles + call Pokedex_InvertTiles + ld de, sScratch + $188 + ld hl, vTiles2 tile FIRST_UNOWN_CHAR + lb bc, BANK(Pokedex_LoadUnownFont), NUM_UNOWN + 1 + call Request2bpp + call CloseSRAM + ret + +Pokedex_LoadUnownFrontpicTiles: + ld a, [wUnownLetter] + push af + ld a, [wDexCurUnownIndex] + ld e, a + ld d, 0 + ld hl, wUnownDex + add hl, de + ld a, [hl] + ld [wUnownLetter], a + ld hl, UNOWN + call GetPokemonIDFromIndex + ld [wCurPartySpecies], a + ld l, LOCKED_MON_ID_DEX_SELECTED + call LockPokemonID + call GetBaseData + ld de, vTiles2 tile $00 + predef GetMonFrontpic + pop af + ld [wUnownLetter], a + ret + +_NewPokedexEntry: + xor a + ldh [hBGMapMode], a + farcall DrawDexEntryScreenRightEdge + call Pokedex_ResetBGMapMode + call DisableLCD + call LoadStandardFont + call LoadFontsExtra + call Pokedex_LoadGFX + call Pokedex_LoadAnyFootprint + ld a, [wTempSpecies] + ld [wCurPartySpecies], a + call Pokedex_DrawDexEntryScreenBG + call Pokedex_DrawFootprint + hlcoord 0, 17 + ld [hl], $3b + inc hl + ld bc, 19 + ld a, " " + call ByteFill + farcall DisplayDexEntry + call EnableLCD + call WaitBGMap + call GetBaseData + ld de, vTiles2 + predef GetMonFrontpic + ld a, SCGB_POKEDEX + call Pokedex_GetSGBLayout + ld a, [wCurPartySpecies] + call PlayMonCry + ret + +Pokedex_SetBGMapMode3: + ld a, $3 + ldh [hBGMapMode], a + ld c, 4 + call DelayFrames + ret + +Pokedex_SetBGMapMode4: + ld a, $4 + ldh [hBGMapMode], a + ld c, 4 + call DelayFrames + ret + +Pokedex_SetBGMapMode_3ifDMG_4ifCGB: + ldh a, [hCGB] + and a + jr z, .DMG + call Pokedex_SetBGMapMode4 +.DMG: + call Pokedex_SetBGMapMode3 + ret + +Pokedex_ResetBGMapMode: + xor a + ldh [hBGMapMode], a + ret diff --git a/engine/pokedex/pokedex_2.asm b/engine/pokedex/pokedex_2.asm new file mode 100644 index 0000000..59b2668 --- /dev/null +++ b/engine/pokedex/pokedex_2.asm @@ -0,0 +1,282 @@ +AnimateDexSearchSlowpoke: + ld hl, .FrameIDs + ld b, 25 +.loop + ld a, [hli] + + ; Wrap around + cp $fe + jr nz, .ok + ld hl, .FrameIDs + ld a, [hli] +.ok + + ld [wDexSearchSlowpokeFrame], a + ld a, [hli] + ld c, a + push bc + push hl + call DoDexSearchSlowpokeFrame + pop hl + pop bc + call DelayFrames + dec b + jr nz, .loop + xor a + ld [wDexSearchSlowpokeFrame], a + call DoDexSearchSlowpokeFrame + ld c, 32 + call DelayFrames + ret + +.FrameIDs: + ; frame ID, duration + db 0, 7 + db 1, 7 + db 2, 7 + db 3, 7 + db 4, 7 + db -2 + +DoDexSearchSlowpokeFrame: + ld a, [wDexSearchSlowpokeFrame] + ld hl, .SlowpokeSpriteData + ld de, wShadowOAMSprite00 +.loop + ld a, [hli] + cp -1 + ret z + ld [de], a ; y + inc de + ld a, [hli] + ld [de], a ; x + inc de + ld a, [wDexSearchSlowpokeFrame] + ld b, a + add a + add b + add [hl] + inc hl + ld [de], a ; tile id + inc de + ld a, [hli] + ld [de], a ; attributes + inc de + jr .loop + +.SlowpokeSpriteData: + dbsprite 9, 11, 0, 0, $00, 0 + dbsprite 10, 11, 0, 0, $01, 0 + dbsprite 11, 11, 0, 0, $02, 0 + dbsprite 9, 12, 0, 0, $10, 0 + dbsprite 10, 12, 0, 0, $11, 0 + dbsprite 11, 12, 0, 0, $12, 0 + dbsprite 9, 13, 0, 0, $20, 0 + dbsprite 10, 13, 0, 0, $21, 0 + dbsprite 11, 13, 0, 0, $22, 0 + db -1 + +DisplayDexEntry: + call GetPokemonName + hlcoord 9, 3 + call PlaceString ; mon species + ld a, [wTempSpecies] + ld b, a + call GetDexEntryPointer + ld a, b + push af + hlcoord 9, 5 + call PlaceFarString ; dex species + ld h, b + ld l, c + push de +; Print dex number + hlcoord 2, 8 + ld a, $5c ; No + ld [hli], a + ld a, $5d ; . + ld [hli], a + push hl + ld a, [wTempSpecies] + call GetPokemonIndexFromID + ld b, l + ld c, h + ld hl, sp + 0 + ld d, h + ld e, l + pop hl + push bc + lb bc, PRINTNUM_LEADINGZEROS | 2, 3 + call PrintNum + pop bc +; Check to see if we caught it. Get out of here if we haven't. + ld a, [wTempSpecies] + call CheckCaughtMon + pop hl + pop bc + ret z +; Get the height of the Pokemon. + ld a, [wCurPartySpecies] + ld [wCurSpecies], a + inc hl + ld a, b + push af + push hl + call GetFarWord + ld d, l + ld e, h + pop hl + inc hl + inc hl + ld a, d + or e + jr z, .skip_height + push hl + push de +; Print the height, with two of the four digits in front of the decimal point + ld hl, sp+0 + ld d, h + ld e, l + hlcoord 12, 7 + lb bc, 2, (2 << 4) | 4 + call PrintNum +; Replace the decimal point with a ft symbol + hlcoord 14, 7 + ld [hl], $5e + pop af + pop hl + +.skip_height + pop af + push af + inc hl + push hl + dec hl + call GetFarWord + ld d, l + ld e, h + ld a, e + or d + jr z, .skip_weight + push de +; Print the weight, with four of the five digits in front of the decimal point + ld hl, sp+0 + ld d, h + ld e, l + hlcoord 11, 9 + lb bc, 2, (4 << 4) | 5 + call PrintNum + pop de + +.skip_weight +; Page 1 + lb bc, 5, SCREEN_WIDTH - 2 + hlcoord 2, 11 + call ClearBox + hlcoord 1, 10 + ld bc, SCREEN_WIDTH - 1 + ld a, $61 ; horizontal divider + call ByteFill + ; page number + hlcoord 1, 9 + ld [hl], $55 + inc hl + ld [hl], $55 + hlcoord 1, 10 + ld [hl], $56 ; P. + inc hl + ld [hl], $57 ; 1 + pop de + inc de + pop af + hlcoord 2, 11 + push af + call PlaceFarString + pop bc + ld a, [wPokedexStatus] + or a ; check for page 2 + ret z + +; Page 2 + push bc + push de + lb bc, 5, SCREEN_WIDTH - 2 + hlcoord 2, 11 + call ClearBox + hlcoord 1, 10 + ld bc, SCREEN_WIDTH - 1 + ld a, $61 + call ByteFill + ; page number + hlcoord 1, 9 + ld [hl], $55 + inc hl + ld [hl], $55 + hlcoord 1, 10 + ld [hl], $56 ; P. + inc hl + ld [hl], $58 ; 2 + pop de + inc de + pop af + hlcoord 2, 11 + call PlaceFarString + ret + +POKeString: ; unreferenced + db "#@" + +GetDexEntryPointer: +; return dex entry pointer b:de + push hl + ld a, b + call GetPokemonIndexFromID + dec hl + ld d, h + ld e, l + add hl, hl + add hl, de + ld de, PokedexDataPointerTable + add hl, de + ld a, [hli] + ld b, a + ld a, [hli] + ld e, a + ld d, [hl] + pop hl + ret + +GetDexEntryPagePointer: + call GetDexEntryPointer + push hl + ld h, d + ld l, e +; skip species name +.loop1 + ld a, b + call GetFarByte + inc hl + cp "@" + jr nz, .loop1 +; skip height and weight +rept 4 + inc hl +endr +; if c != 1: skip entry + dec c + jr z, .done +; skip entry +.loop2 + ld a, b + call GetFarByte + inc hl + cp "@" + jr nz, .loop2 + +.done + ld d, h + ld e, l + pop hl + ret + +INCLUDE "data/pokemon/dex_entry_pointers.asm" diff --git a/engine/pokedex/pokedex_3.asm b/engine/pokedex/pokedex_3.asm new file mode 100644 index 0000000..b59fd1d --- /dev/null +++ b/engine/pokedex/pokedex_3.asm @@ -0,0 +1,163 @@ +LoadSGBPokedexGFX: + ld hl, SGBPokedexGFX_LZ + ld de, vTiles2 tile $31 + call Decompress + ret + +LoadSGBPokedexGFX2: + ld hl, SGBPokedexGFX_LZ + ld de, vTiles2 tile $31 + lb bc, BANK(SGBPokedexGFX_LZ), 58 + call DecompressRequest2bpp + ret + +SGBPokedexGFX_LZ: +INCBIN "gfx/pokedex/pokedex_sgb.2bpp.lz" + +LoadQuestionMarkPic: + ld hl, .QuestionMarkLZ + ld de, sScratch + call Decompress + ret + +.QuestionMarkLZ: +INCBIN "gfx/pokedex/question_mark.2bpp.lz" + +DrawPokedexListWindow: + ld a, $32 + hlcoord 0, 17 + ld bc, 12 + call ByteFill + hlcoord 0, 1 + lb bc, 15, 11 + call ClearBox + ld a, $34 + hlcoord 0, 0 + ld bc, 11 + call ByteFill + ld a, $39 + hlcoord 0, 16 + ld bc, 11 + call ByteFill + hlcoord 5, 0 + ld [hl], $3f + hlcoord 5, 16 + ld [hl], $40 + ld a, [wCurDexMode] + cp DEXMODE_OLD + jr z, .OldMode +; scroll bar + hlcoord 11, 0 + ld [hl], $50 + ld a, $51 + hlcoord 11, 1 + ld b, SCREEN_HEIGHT - 3 + call Pokedex_FillColumn2 + ld [hl], $52 + jr .Done + +.OldMode: +; no scroll bar + hlcoord 11, 0 + ld [hl], $66 + ld a, $67 + hlcoord 11, 1 + ld b, SCREEN_HEIGHT - 3 + call Pokedex_FillColumn2 + ld [hl], $68 +.Done: + ret + +DrawPokedexSearchResultsWindow: + ld a, $34 + hlcoord 0, 0 + ld bc, 11 + call ByteFill + ld a, $39 + hlcoord 0, 10 + ld bc, 11 + call ByteFill + hlcoord 5, 0 + ld [hl], $3f + hlcoord 5, 10 + ld [hl], $40 + hlcoord 11, 0 + ld [hl], $66 + ld a, $67 + hlcoord 11, 1 + ld b, SCREEN_HEIGHT / 2 + call Pokedex_FillColumn2 + ld [hl], $68 + ld a, $34 + hlcoord 0, 11 + ld bc, 11 + call ByteFill + ld a, $39 + hlcoord 0, 17 + ld bc, 11 + call ByteFill + hlcoord 11, 11 + ld [hl], $66 + ld a, $67 + hlcoord 11, 12 + ld b, 5 + call Pokedex_FillColumn2 + ld [hl], $68 + hlcoord 0, 12 + lb bc, 5, 11 + call ClearBox + ld de, .esults_D + hlcoord 0, 12 + call PlaceString + ret + +.esults_D +; (SEARCH R) + db "ESULTS" + next "" +; (### FOUN) + next "D!@" + +DrawDexEntryScreenRightEdge: + ldh a, [hBGMapAddress] + ld l, a + ldh a, [hBGMapAddress + 1] + ld h, a + push hl + inc hl + ld a, l + ldh [hBGMapAddress], a + ld a, h + ldh [hBGMapAddress + 1], a + hlcoord 19, 0 + ld [hl], $66 + hlcoord 19, 1 + ld a, $67 + ld b, 15 + call Pokedex_FillColumn2 + ld [hl], $68 + hlcoord 19, 17 + ld [hl], $3c + xor a + ld b, SCREEN_HEIGHT + hlcoord 19, 0, wAttrmap + call Pokedex_FillColumn2 + call WaitBGMap2 + pop hl + ld a, l + ldh [hBGMapAddress], a + ld a, h + ldh [hBGMapAddress + 1], a + ret + +Pokedex_FillColumn2: +; A local duplicate of Pokedex_FillColumn. + push de + ld de, SCREEN_WIDTH +.loop + ld [hl], a + add hl, de + dec b + jr nz, .loop + pop de + ret diff --git a/engine/pokedex/unown_dex.asm b/engine/pokedex/unown_dex.asm new file mode 100644 index 0000000..1b66a4a --- /dev/null +++ b/engine/pokedex/unown_dex.asm @@ -0,0 +1,49 @@ +UpdateUnownDex: + ld a, [wUnownLetter] + ld c, a + ld b, NUM_UNOWN + ld hl, wUnownDex +.loop + ld a, [hli] + and a + jr z, .done + cp c + ret z + dec b + jr nz, .loop + ret + +.done + dec hl + ld [hl], c + ret + +PrintUnownWord: + hlcoord 4, 15 + ld bc, 12 + ld a, " " + call ByteFill + ld a, [wDexCurUnownIndex] + ld e, a + ld d, 0 + ld hl, wUnownDex + add hl, de + ld a, [hl] + ld e, a + ld d, 0 + ld hl, UnownWords + add hl, de + add hl, de + ld a, [hli] + ld e, a + ld d, [hl] + hlcoord 4, 15 +.loop + ld a, [de] + cp -1 + ret z + inc de + ld [hli], a + jr .loop + +INCLUDE "data/pokemon/unown_words.asm" diff --git a/engine/pokegear/pokegear.asm b/engine/pokegear/pokegear.asm new file mode 100644 index 0000000..32e6a05 --- /dev/null +++ b/engine/pokegear/pokegear.asm @@ -0,0 +1,2922 @@ +; Pokégear cards + const_def + const POKEGEARCARD_CLOCK ; 0 + const POKEGEARCARD_MAP ; 1 + const POKEGEARCARD_PHONE ; 2 + const POKEGEARCARD_RADIO ; 3 +DEF NUM_POKEGEAR_CARDS EQU const_value + +DEF PHONE_DISPLAY_HEIGHT EQU 4 + +; PokegearJumptable.Jumptable indexes + const_def + const POKEGEARSTATE_CLOCKINIT ; 0 + const POKEGEARSTATE_CLOCKJOYPAD ; 1 + const POKEGEARSTATE_MAPCHECKREGION ; 2 + const POKEGEARSTATE_JOHTOMAPINIT ; 3 + const POKEGEARSTATE_JOHTOMAPJOYPAD ; 4 + const POKEGEARSTATE_KANTOMAPINIT ; 5 + const POKEGEARSTATE_KANTOMAPJOYPAD ; 6 + const POKEGEARSTATE_PHONEINIT ; 7 + const POKEGEARSTATE_PHONEJOYPAD ; 8 + const POKEGEARSTATE_MAKEPHONECALL ; 9 + const POKEGEARSTATE_FINISHPHONECALL ; a + const POKEGEARSTATE_RADIOINIT ; b + const POKEGEARSTATE_RADIOJOYPAD ; c + +PokeGear: + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + ld a, [wVramState] + push af + xor a + ld [wVramState], a + call .InitTilemap + call DelayFrame +.loop + call UpdateTime + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .done + call PokegearJumptable + farcall PlaySpriteAnimations + call DelayFrame + jr .loop + +.done + ld de, SFX_READ_TEXT_2 + call PlaySFX + call WaitSFX + pop af + ld [wVramState], a + pop af + ldh [hInMenu], a + pop af + ld [wOptions], a + call ClearBGPalettes + xor a ; LOW(vBGMap0) + ldh [hBGMapAddress], a + ld a, HIGH(vBGMap0) + ldh [hBGMapAddress + 1], a + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + call ExitPokegearRadio_HandleMusic + ret + +.InitTilemap: + call ClearBGPalettes + call ClearTilemap + call ClearSprites + call DisableLCD + xor a + ldh [hSCY], a + ldh [hSCX], a + ld a, $7 + ldh [hWX], a + call Pokegear_LoadGFX + farcall ClearSpriteAnims + call InitPokegearModeIndicatorArrow + ld a, 8 + call SkipMusic + ld a, LCDC_DEFAULT + ldh [rLCDC], a + call TownMap_InitCursorAndPlayerIconPositions + xor a + ld [wJumptableIndex], a ; POKEGEARSTATE_CLOCKINIT + ld [wPokegearCard], a ; POKEGEARCARD_CLOCK + ld [wPokegearMapRegion], a ; JOHTO_REGION + ld [wUnusedPokegearByte], a + ld [wPokegearPhoneScrollPosition], a + ld [wPokegearPhoneCursorPosition], a + ld [wPokegearPhoneSelectedPerson], a + ld [wPokegearRadioChannelBank], a + ld [wPokegearRadioChannelAddr], a + ld [wPokegearRadioChannelAddr + 1], a + call Pokegear_InitJumptableIndices + call InitPokegearTilemap + ld b, SCGB_POKEGEAR_PALS + call GetSGBLayout + call SetPalettes + ldh a, [hCGB] + and a + ret z + ld a, %11100100 + call DmgToCgbObjPal0 + ret + +Pokegear_LoadGFX: + call ClearVBank1 + ld hl, TownMapGFX + ld de, vTiles2 + ld a, BANK(TownMapGFX) + call FarDecompress + ld hl, PokegearGFX + ld de, vTiles2 tile $30 + ld a, BANK(PokegearGFX) + call FarDecompress + ld hl, PokegearSpritesGFX + ld de, vTiles0 + ld a, BANK(PokegearSpritesGFX) + call Decompress + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetWorldMapLocation + cp LANDMARK_FAST_SHIP + jr z, .ssaqua + farcall GetPlayerIcon + push de + ld h, d + ld l, e + ld a, b + ; standing sprite + push af + ld de, vTiles0 tile $10 + ld bc, 4 tiles + call FarCopyBytes + pop af + pop hl + ; walking sprite + ld de, 12 tiles + add hl, de + ld de, vTiles0 tile $14 + ld bc, 4 tiles + call FarCopyBytes + ret + +.ssaqua + ld hl, FastShipGFX + ld de, vTiles0 tile $10 + ld bc, 8 tiles + call CopyBytes + ret + +FastShipGFX: +INCBIN "gfx/pokegear/fast_ship.2bpp" + +InitPokegearModeIndicatorArrow: + depixel 4, 2, 4, 0 + ld a, SPRITE_ANIM_INDEX_POKEGEAR_ARROW + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], $0 + ret + +AnimatePokegearModeIndicatorArrow: + ld hl, wPokegearCard + ld e, [hl] + ld d, 0 + ld hl, .XCoords + add hl, de + ld a, [hl] + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +.XCoords: + db $00 ; POKEGEARCARD_CLOCK + db $10 ; POKEGEARCARD_MAP + db $20 ; POKEGEARCARD_PHONE + db $30 ; POKEGEARCARD_RADIO + +TownMap_GetCurrentLandmark: + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetWorldMapLocation + cp LANDMARK_SPECIAL + ret nz + ld a, [wBackupMapGroup] + ld b, a + ld a, [wBackupMapNumber] + ld c, a + call GetWorldMapLocation + ret + +TownMap_InitCursorAndPlayerIconPositions: + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetWorldMapLocation + cp LANDMARK_FAST_SHIP + jr z, .FastShip + cp LANDMARK_SPECIAL + jr nz, .LoadLandmark + ld a, [wBackupMapGroup] + ld b, a + ld a, [wBackupMapNumber] + ld c, a + call GetWorldMapLocation +.LoadLandmark: + ld [wPokegearMapPlayerIconLandmark], a + ld [wPokegearMapCursorLandmark], a + ret + +.FastShip: + ld [wPokegearMapPlayerIconLandmark], a + ld a, LANDMARK_NEW_BARK_TOWN + ld [wPokegearMapCursorLandmark], a + ret + +Pokegear_InitJumptableIndices: + ld a, POKEGEARSTATE_CLOCKINIT + ld [wJumptableIndex], a + xor a ; POKEGEARCARD_CLOCK + ld [wPokegearCard], a + ret + +InitPokegearTilemap: + xor a + ldh [hBGMapMode], a + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, $4f + call ByteFill + ld a, [wPokegearCard] + maskbits NUM_POKEGEAR_CARDS + add a + ld e, a + ld d, 0 + ld hl, .Jumptable + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .return_from_jumptable + push de + jp hl + +.return_from_jumptable + call Pokegear_FinishTilemap + farcall TownMapPals + ld a, [wPokegearMapRegion] + and a + jr nz, .kanto_0 + xor a ; LOW(vBGMap0) + ldh [hBGMapAddress], a + ld a, HIGH(vBGMap0) + ldh [hBGMapAddress + 1], a + call .UpdateBGMap + ld a, SCREEN_HEIGHT_PX + jr .finish + +.kanto_0 + xor a ; LOW(vBGMap1) + ldh [hBGMapAddress], a + ld a, HIGH(vBGMap1) + ldh [hBGMapAddress + 1], a + call .UpdateBGMap + xor a +.finish + ldh [hWY], a + ; swap region maps + ld a, [wPokegearMapRegion] + maskbits NUM_REGIONS + xor 1 + ld [wPokegearMapRegion], a + ret + +.UpdateBGMap: + ldh a, [hCGB] + and a + jr z, .dmg + ld a, $2 + ldh [hBGMapMode], a + ld c, 3 + call DelayFrames +.dmg + call WaitBGMap + ret + +.Jumptable: +; entries correspond to POKEGEARCARD_* constants + dw .Clock + dw .Map + dw .Phone + dw .Radio + +.Clock: + ld de, ClockTilemapRLE + call Pokegear_LoadTilemapRLE + hlcoord 12, 1 + ld de, .switch + call PlaceString + hlcoord 0, 12 + lb bc, 4, 18 + call Textbox + call Pokegear_UpdateClock + ret + +.switch + db " SWITCH▶@" + +.Map: + ld a, [wPokegearMapPlayerIconLandmark] + cp LANDMARK_FAST_SHIP + jr z, .johto + cp KANTO_LANDMARK + jr nc, .kanto +.johto + ld e, 0 + jr .ok + +.kanto + ld e, 1 +.ok + farcall PokegearMap + ld a, $07 + ld bc, SCREEN_WIDTH - 2 + hlcoord 1, 2 + call ByteFill + hlcoord 0, 2 + ld [hl], $06 + hlcoord 19, 2 + ld [hl], $17 + ld a, [wPokegearMapCursorLandmark] + call PokegearMap_UpdateLandmarkName + ret + +.Radio: + ld de, RadioTilemapRLE + call Pokegear_LoadTilemapRLE + hlcoord 0, 12 + lb bc, 4, 18 + call Textbox + ret + +.Phone: + ld de, PhoneTilemapRLE + call Pokegear_LoadTilemapRLE + hlcoord 0, 12 + lb bc, 4, 18 + call Textbox + call .PlacePhoneBars + call PokegearPhone_UpdateDisplayList + ret + +.PlacePhoneBars: + hlcoord 17, 1 + ld a, $3c + ld [hli], a + inc a + ld [hl], a + hlcoord 17, 2 + inc a + ld [hli], a + call GetMapPhoneService + and a + ret nz + hlcoord 18, 2 + ld [hl], $3f + ret + +Pokegear_FinishTilemap: + hlcoord 0, 0 + ld bc, $8 + ld a, $4f + call ByteFill + hlcoord 0, 1 + ld bc, $8 + ld a, $4f + call ByteFill + ld de, wPokegearFlags + ld a, [de] + bit POKEGEAR_MAP_CARD_F, a + call nz, .PlaceMapIcon + ld a, [de] + bit POKEGEAR_PHONE_CARD_F, a + call nz, .PlacePhoneIcon + ld a, [de] + bit POKEGEAR_RADIO_CARD_F, a + call nz, .PlaceRadioIcon + hlcoord 0, 0 + ld a, $46 + call .PlacePokegearCardIcon + ret + +.PlaceMapIcon: + hlcoord 2, 0 + ld a, $40 + jr .PlacePokegearCardIcon + +.PlacePhoneIcon: + hlcoord 4, 0 + ld a, $44 + jr .PlacePokegearCardIcon + +.PlaceRadioIcon: + hlcoord 6, 0 + ld a, $42 +.PlacePokegearCardIcon: + ld [hli], a + inc a + ld [hld], a + ld bc, $14 + add hl, bc + add $f + ld [hli], a + inc a + ld [hld], a + ret + +PokegearJumptable: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: +; entries correspond to POKEGEARSTATE_* constants + dw PokegearClock_Init + dw PokegearClock_Joypad + dw PokegearMap_CheckRegion + dw PokegearMap_Init + dw PokegearMap_JohtoMap + dw PokegearMap_Init + dw PokegearMap_KantoMap + dw PokegearPhone_Init + dw PokegearPhone_Joypad + dw PokegearPhone_MakePhoneCall + dw PokegearPhone_FinishPhoneCall + dw PokegearRadio_Init + dw PokegearRadio_Joypad + +PokegearClock_Init: + call InitPokegearTilemap + ld hl, PokegearPressButtonText + call PrintText + ld hl, wJumptableIndex + inc [hl] + call ExitPokegearRadio_HandleMusic + ret + +PokegearClock_Joypad: + call .UpdateClock + ld hl, hJoyLast + ld a, [hl] + and A_BUTTON | B_BUTTON | START | SELECT + jr nz, .quit + ld a, [hl] + and D_RIGHT + ret z + ld a, [wPokegearFlags] + bit POKEGEAR_MAP_CARD_F, a + jr z, .no_map_card + ld c, POKEGEARSTATE_MAPCHECKREGION + ld b, POKEGEARCARD_MAP + jr .done + +.no_map_card + ld a, [wPokegearFlags] + bit POKEGEAR_PHONE_CARD_F, a + jr z, .no_phone_card + ld c, POKEGEARSTATE_PHONEINIT + ld b, POKEGEARCARD_PHONE + jr .done + +.no_phone_card + ld a, [wPokegearFlags] + bit POKEGEAR_RADIO_CARD_F, a + ret z + ld c, POKEGEARSTATE_RADIOINIT + ld b, POKEGEARCARD_RADIO +.done + call Pokegear_SwitchPage + ret + +.quit + ld hl, wJumptableIndex + set 7, [hl] + ret + +.UpdateClock: + xor a + ldh [hBGMapMode], a + call Pokegear_UpdateClock + ld a, $1 + ldh [hBGMapMode], a + ret + +Pokegear_UpdateClock: + hlcoord 3, 5 + lb bc, 5, 14 + call ClearBox + ldh a, [hHours] + ld b, a + ldh a, [hMinutes] + ld c, a + decoord 6, 8 + farcall PrintHoursMins + ld hl, .GearTodayText + bccoord 6, 6 + call PlaceHLTextAtBC + ret + + db "ごぜん@" + db "ごご@" + +.GearTodayText: + text_far _GearTodayText + text_end + +PokegearMap_CheckRegion: + ld a, [wPokegearMapPlayerIconLandmark] + cp LANDMARK_FAST_SHIP + jr z, .johto + cp KANTO_LANDMARK + jr nc, .kanto +.johto + ld a, POKEGEARSTATE_JOHTOMAPINIT + jr .done + ret + +.kanto + ld a, POKEGEARSTATE_KANTOMAPINIT +.done + ld [wJumptableIndex], a + call ExitPokegearRadio_HandleMusic + ret + +PokegearMap_Init: + call InitPokegearTilemap + ld a, [wPokegearMapPlayerIconLandmark] + call PokegearMap_InitPlayerIcon + ld a, [wPokegearMapCursorLandmark] + call PokegearMap_InitCursor + ld a, c + ld [wPokegearMapCursorObjectPointer], a + ld a, b + ld [wPokegearMapCursorObjectPointer + 1], a + ld hl, wJumptableIndex + inc [hl] + ret + +PokegearMap_KantoMap: + call TownMap_GetKantoLandmarkLimits + jr PokegearMap_ContinueMap + +PokegearMap_JohtoMap: + ld d, LANDMARK_SILVER_CAVE + ld e, LANDMARK_NEW_BARK_TOWN +PokegearMap_ContinueMap: + ld hl, hJoyLast + ld a, [hl] + and B_BUTTON + jr nz, .cancel + ld a, [hl] + and D_RIGHT + jr nz, .right + ld a, [hl] + and D_LEFT + jr nz, .left + call .DPad + ret + +.right + ld a, [wPokegearFlags] + bit POKEGEAR_PHONE_CARD_F, a + jr z, .no_phone + ld c, POKEGEARSTATE_PHONEINIT + ld b, POKEGEARCARD_PHONE + jr .done + +.no_phone + ld a, [wPokegearFlags] + bit POKEGEAR_RADIO_CARD_F, a + ret z + ld c, POKEGEARSTATE_RADIOINIT + ld b, POKEGEARCARD_RADIO + jr .done + +.left + ld c, POKEGEARSTATE_CLOCKINIT + ld b, POKEGEARCARD_CLOCK +.done + call Pokegear_SwitchPage + ret + +.cancel + ld hl, wJumptableIndex + set 7, [hl] + ret + +.DPad: + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .up + ld a, [hl] + and D_DOWN + jr nz, .down + ret + +.up + ld hl, wPokegearMapCursorLandmark + ld a, [hl] + cp d + jr c, .wrap_around_up + ld a, e + dec a + ld [hl], a +.wrap_around_up + inc [hl] + jr .done_dpad + +.down + ld hl, wPokegearMapCursorLandmark + ld a, [hl] + cp e + jr nz, .wrap_around_down + ld a, d + inc a + ld [hl], a +.wrap_around_down + dec [hl] +.done_dpad + ld a, [wPokegearMapCursorLandmark] + call PokegearMap_UpdateLandmarkName + ld a, [wPokegearMapCursorObjectPointer] + ld c, a + ld a, [wPokegearMapCursorObjectPointer + 1] + ld b, a + ld a, [wPokegearMapCursorLandmark] + call PokegearMap_UpdateCursorPosition + ret + +PokegearMap_InitPlayerIcon: + push af + depixel 0, 0 + ld b, SPRITE_ANIM_INDEX_RED_WALK + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_gender + ld b, SPRITE_ANIM_INDEX_BLUE_WALK +.got_gender + ld a, b + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], $10 + pop af + ld e, a + push bc + farcall GetLandmarkCoords + pop bc + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], e + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld [hl], d + ret + +PokegearMap_InitCursor: + push af + depixel 0, 0 + ld a, SPRITE_ANIM_INDEX_POKEGEAR_ARROW + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], $04 + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld [hl], SPRITE_ANIM_SEQ_NULL + pop af + push bc + call PokegearMap_UpdateCursorPosition + pop bc + ret + +PokegearMap_UpdateLandmarkName: + push af + hlcoord 8, 0 + lb bc, 2, 12 + call ClearBox + pop af + ld e, a + push de + farcall GetLandmarkName + pop de + farcall TownMap_ConvertLineBreakCharacters + hlcoord 8, 0 + ld [hl], $34 + ret + +PokegearMap_UpdateCursorPosition: + push bc + ld e, a + farcall GetLandmarkCoords + pop bc + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], e + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld [hl], d + ret + +TownMap_GetKantoLandmarkLimits: + ld a, [wStatusFlags] + bit STATUSFLAGS_HALL_OF_FAME_F, a + jr z, .not_hof + ld d, LANDMARK_ROUTE_28 + ld e, LANDMARK_PALLET_TOWN + ret + +.not_hof + ld d, LANDMARK_ROUTE_28 + ld e, LANDMARK_VICTORY_ROAD + ret + +PokegearRadio_Init: + call InitPokegearTilemap + depixel 4, 10, 4, 4 + ld a, SPRITE_ANIM_INDEX_RADIO_TUNING_KNOB + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], $08 + call _UpdateRadioStation + ld hl, wJumptableIndex + inc [hl] + ret + +PokegearRadio_Joypad: + ld hl, hJoyLast + ld a, [hl] + and B_BUTTON + jr nz, .cancel + ld a, [hl] + and D_LEFT + jr nz, .left + ld a, [wPokegearRadioChannelAddr] + ld l, a + ld a, [wPokegearRadioChannelAddr + 1] + ld h, a + ld a, [wPokegearRadioChannelBank] + and a + ret z + rst FarCall + ret + +.left + ld a, [wPokegearFlags] + bit POKEGEAR_PHONE_CARD_F, a + jr z, .no_phone + ld c, POKEGEARSTATE_PHONEINIT + ld b, POKEGEARCARD_PHONE + jr .switch_page + +.no_phone + ld a, [wPokegearFlags] + bit POKEGEAR_MAP_CARD_F, a + jr z, .no_map + ld c, POKEGEARSTATE_MAPCHECKREGION + ld b, POKEGEARCARD_MAP + jr .switch_page + +.no_map + ld c, POKEGEARSTATE_CLOCKINIT + ld b, POKEGEARCARD_CLOCK +.switch_page + call Pokegear_SwitchPage + ret + +.cancel + ld hl, wJumptableIndex + set 7, [hl] + ret + +PokegearPhone_Init: + ld hl, wJumptableIndex + inc [hl] + xor a + ld [wPokegearPhoneScrollPosition], a + ld [wPokegearPhoneCursorPosition], a + ld [wPokegearPhoneSelectedPerson], a + call InitPokegearTilemap + call ExitPokegearRadio_HandleMusic + ld hl, PokegearAskWhoCallText + call PrintText + ret + +PokegearPhone_Joypad: + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .b + ld a, [hl] + and A_BUTTON + jr nz, .a + ld hl, hJoyLast + ld a, [hl] + and D_LEFT + jr nz, .left + ld a, [hl] + and D_RIGHT + jr nz, .right + call PokegearPhone_GetDPad + ret + +.left + ld a, [wPokegearFlags] + bit POKEGEAR_MAP_CARD_F, a + jr z, .no_map + ld c, POKEGEARSTATE_MAPCHECKREGION + ld b, POKEGEARCARD_MAP + jr .switch_page + +.no_map + ld c, POKEGEARSTATE_CLOCKINIT + ld b, POKEGEARCARD_CLOCK + jr .switch_page + +.right + ld a, [wPokegearFlags] + bit POKEGEAR_RADIO_CARD_F, a + ret z + ld c, POKEGEARSTATE_RADIOINIT + ld b, POKEGEARCARD_RADIO +.switch_page + call Pokegear_SwitchPage + ret + +.b + ld hl, wJumptableIndex + set 7, [hl] + ret + +.a + ld hl, wPhoneList + ld a, [wPokegearPhoneScrollPosition] + ld e, a + ld d, 0 + add hl, de + ld a, [wPokegearPhoneCursorPosition] + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + and a + ret z + ld [wPokegearPhoneSelectedPerson], a + hlcoord 1, 4 + ld a, [wPokegearPhoneCursorPosition] + ld bc, SCREEN_WIDTH * 2 + call AddNTimes + ld [hl], "▷" + call PokegearPhoneContactSubmenu + jr c, .quit_submenu + ld hl, wJumptableIndex + inc [hl] + ret + +.quit_submenu + ld a, POKEGEARSTATE_PHONEJOYPAD + ld [wJumptableIndex], a + ret + +PokegearPhone_MakePhoneCall: + call GetMapPhoneService + and a + jr nz, .no_service + ld hl, wOptions + res NO_TEXT_SCROLL, [hl] + xor a + ldh [hInMenu], a + ld de, SFX_CALL + call PlaySFX + ld hl, .GearEllipseText + call PrintText + call WaitSFX + ld de, SFX_CALL + call PlaySFX + ld hl, .GearEllipseText + call PrintText + call WaitSFX + ld a, [wPokegearPhoneSelectedPerson] + ld b, a + call MakePhoneCallFromPokegear + ld c, 10 + call DelayFrames + ld hl, wOptions + set NO_TEXT_SCROLL, [hl] + ld a, $1 + ldh [hInMenu], a + call PokegearPhone_UpdateCursor + ld hl, wJumptableIndex + inc [hl] + ret + +.no_service + farcall Phone_NoSignal + ld hl, .GearOutOfServiceText + call PrintText + ld a, POKEGEARSTATE_PHONEJOYPAD + ld [wJumptableIndex], a + ld hl, PokegearAskWhoCallText + call PrintText + ret + +.GearEllipseText: + text_far _GearEllipseText + text_end + +.GearOutOfServiceText: + text_far _GearOutOfServiceText + text_end + +PokegearPhone_FinishPhoneCall: + ldh a, [hJoyPressed] + and A_BUTTON | B_BUTTON + ret z + farcall HangUp + ld a, POKEGEARSTATE_PHONEJOYPAD + ld [wJumptableIndex], a + ld hl, PokegearAskWhoCallText + call PrintText + ret + +PokegearPhone_GetDPad: + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .up + ld a, [hl] + and D_DOWN + jr nz, .down + ret + +.up + ld hl, wPokegearPhoneCursorPosition + ld a, [hl] + and a + jr z, .scroll_page_up + dec [hl] + jr .done_joypad_same_page + +.scroll_page_up + ld hl, wPokegearPhoneScrollPosition + ld a, [hl] + and a + ret z + dec [hl] + jr .done_joypad_update_page + +.down + ld hl, wPokegearPhoneCursorPosition + ld a, [hl] + cp PHONE_DISPLAY_HEIGHT - 1 + jr nc, .scroll_page_down + inc [hl] + jr .done_joypad_same_page + +.scroll_page_down + ld hl, wPokegearPhoneScrollPosition + ld a, [hl] + cp CONTACT_LIST_SIZE - PHONE_DISPLAY_HEIGHT + ret nc + inc [hl] + jr .done_joypad_update_page + +.done_joypad_same_page + xor a + ldh [hBGMapMode], a + call PokegearPhone_UpdateCursor + call WaitBGMap + ret + +.done_joypad_update_page + xor a + ldh [hBGMapMode], a + call PokegearPhone_UpdateDisplayList + call WaitBGMap + ret + +PokegearPhone_UpdateCursor: + ld a, " " +for y, PHONE_DISPLAY_HEIGHT + hlcoord 1, 4 + y * 2 + ld [hl], a +endr + hlcoord 1, 4 + ld a, [wPokegearPhoneCursorPosition] + ld bc, 2 * SCREEN_WIDTH + call AddNTimes + ld [hl], "▶" + ret + +PokegearPhone_UpdateDisplayList: + hlcoord 1, 3 + ld b, PHONE_DISPLAY_HEIGHT * 2 + 1 + ld a, " " +.row + ld c, SCREEN_WIDTH - 2 +.col + ld [hli], a + dec c + jr nz, .col + inc hl + inc hl + dec b + jr nz, .row + ld a, [wPokegearPhoneScrollPosition] + ld e, a + ld d, 0 + ld hl, wPhoneList + add hl, de + xor a + ld [wPokegearPhoneDisplayPosition], a +.loop + ld a, [hli] + push hl + push af + hlcoord 2, 4 + ld a, [wPokegearPhoneDisplayPosition] + ld bc, 2 * SCREEN_WIDTH + call AddNTimes + ld d, h + ld e, l + pop af + ld b, a + call GetCallerClassAndName + pop hl + ld a, [wPokegearPhoneDisplayPosition] + inc a + ld [wPokegearPhoneDisplayPosition], a + cp PHONE_DISPLAY_HEIGHT + jr c, .loop + call PokegearPhone_UpdateCursor + ret + +PokegearPhone_DeletePhoneNumber: + ld hl, wPhoneList + ld a, [wPokegearPhoneScrollPosition] + ld e, a + ld d, 0 + add hl, de + ld a, [wPokegearPhoneCursorPosition] + ld e, a + ld d, 0 + add hl, de + ld [hl], 0 + ld hl, wPhoneList + ld c, CONTACT_LIST_SIZE +.loop + ld a, [hli] + and a + jr nz, .skip + ld a, [hld] + ld [hli], a + ld [hl], 0 +.skip + dec c + jr nz, .loop + ret + +PokegearPhoneContactSubmenu: + ld hl, wPhoneList + ld a, [wPokegearPhoneScrollPosition] + ld e, a + ld d, 0 + add hl, de + ld a, [wPokegearPhoneCursorPosition] + ld e, a + ld d, 0 + add hl, de + ld c, [hl] + farcall CheckCanDeletePhoneNumber + ld a, c + and a + jr z, .cant_delete + ld hl, .CallDeleteCancelJumptable + ld de, .CallDeleteCancelStrings + jr .got_menu_data + +.cant_delete + ld hl, .CallCancelJumptable + ld de, .CallCancelStrings +.got_menu_data + xor a + ldh [hBGMapMode], a + push hl + push de + ld a, [de] + ld l, a + inc de + ld a, [de] + ld h, a + inc de + push hl + bccoord -1, -2, 0 + add hl, bc + ld a, [de] + inc de + sla a + ld b, a + ld c, 8 + push de + call Textbox + pop de + pop hl + inc hl + call PlaceString + pop de + xor a + ld [wPokegearPhoneSubmenuCursor], a + call .UpdateCursor + call WaitBGMap +.loop + push de + call JoyTextDelay + pop de + ld hl, hJoyPressed + ld a, [hl] + and D_UP + jr nz, .d_up + ld a, [hl] + and D_DOWN + jr nz, .d_down + ld a, [hl] + and A_BUTTON | B_BUTTON + jr nz, .a_b + call DelayFrame + jr .loop + +.d_up + ld hl, wPokegearPhoneSubmenuCursor + ld a, [hl] + and a + jr z, .loop + dec [hl] + call .UpdateCursor + jr .loop + +.d_down + ld hl, 2 + add hl, de + ld a, [wPokegearPhoneSubmenuCursor] + inc a + cp [hl] + jr nc, .loop + ld [wPokegearPhoneSubmenuCursor], a + call .UpdateCursor + jr .loop + +.a_b + xor a + ldh [hBGMapMode], a + call PokegearPhone_UpdateDisplayList + ld a, $1 + ldh [hBGMapMode], a + pop hl + ldh a, [hJoyPressed] + and B_BUTTON + jr nz, .Cancel + ld a, [wPokegearPhoneSubmenuCursor] + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Cancel: + ld hl, PokegearAskWhoCallText + call PrintText + scf + ret + +.Delete: + ld hl, PokegearAskDeleteText + call MenuTextbox + call YesNoBox + call ExitMenu + jr c, .CancelDelete + call PokegearPhone_DeletePhoneNumber + xor a + ldh [hBGMapMode], a + call PokegearPhone_UpdateDisplayList + ld hl, PokegearAskWhoCallText + call PrintText + call WaitBGMap +.CancelDelete: + scf + ret + +.Call: + and a + ret + +.UpdateCursor: + push de + ld a, [de] + inc de + ld l, a + ld a, [de] + inc de + ld h, a + ld a, [de] + ld c, a + push hl + ld a, " " + ld de, SCREEN_WIDTH * 2 +.clear_column + ld [hl], a + add hl, de + dec c + jr nz, .clear_column + pop hl + ld a, [wPokegearPhoneSubmenuCursor] + ld bc, SCREEN_WIDTH * 2 + call AddNTimes + ld [hl], "▶" + pop de + ret + +.CallDeleteCancelStrings: + dwcoord 10, 6 + db 3 + db "CALL" + next "DELETE" + next "CANCEL" + db "@" + +.CallDeleteCancelJumptable: + dw .Call + dw .Delete + dw .Cancel + +.CallCancelStrings: + dwcoord 10, 8 + db 2 + db "CALL" + next "CANCEL" + db "@" + +.CallCancelJumptable: + dw .Call + dw .Cancel + +GetAMPMHours: ; unreferenced + ldh a, [hHours] + cp NOON_HOUR + jr c, .am + sub NOON_HOUR + ld [wTempByteValue], a + scf + ret + +.am + ld [wTempByteValue], a + and a + ret + +Pokegear_SwitchPage: + ld de, SFX_READ_TEXT_2 + call PlaySFX + ld a, c + ld [wJumptableIndex], a + ld a, b + ld [wPokegearCard], a + call DeleteSpriteAnimStruct2ToEnd + ret + +ExitPokegearRadio_HandleMusic: + ld a, [wPokegearRadioMusicPlaying] + cp RESTART_MAP_MUSIC + jr z, .restart_map_music + cp ENTER_MAP_MUSIC + call z, PlayMapMusicBike + xor a + ld [wPokegearRadioMusicPlaying], a + ret + +.restart_map_music + call RestartMapMusic + xor a + ld [wPokegearRadioMusicPlaying], a + ret + +DeleteSpriteAnimStruct2ToEnd: + ld hl, wSpriteAnim2 + ld bc, wSpriteAnimationStructsEnd - wSpriteAnim2 + xor a + call ByteFill + ld a, 2 + ld [wSpriteAnimCount], a + ret + +Pokegear_LoadTilemapRLE: + ; Format: repeat count, tile ID + ; Terminated with -1 + hlcoord 0, 0 +.loop + ld a, [de] + cp -1 + ret z + ld b, a + inc de + ld a, [de] + ld c, a + inc de + ld a, b +.load + ld [hli], a + dec c + jr nz, .load + jr .loop + +PokegearAskWhoCallText: + text_far _PokegearAskWhoCallText + text_end + +PokegearPressButtonText: + text_far _PokegearPressButtonText + text_end + +PokegearAskDeleteText: + text_far _PokegearAskDeleteText + text_end + +PokegearSpritesGFX: +INCBIN "gfx/pokegear/pokegear_sprites.2bpp.lz" + +RadioTilemapRLE: +INCBIN "gfx/pokegear/radio.tilemap.rle" +PhoneTilemapRLE: +INCBIN "gfx/pokegear/phone.tilemap.rle" +ClockTilemapRLE: +INCBIN "gfx/pokegear/clock.tilemap.rle" + +_UpdateRadioStation: + jr UpdateRadioStation + +; called from engine/gfx/sprite_anims.asm + +AnimateTuningKnob: + push bc + call .TuningKnob + pop bc + ld a, [wRadioTuningKnob] + ld hl, SPRITEANIMSTRUCT_XOFFSET + add hl, bc + ld [hl], a + ret + +.TuningKnob: + ld hl, hJoyLast + ld a, [hl] + and D_DOWN + jr nz, .down + ld a, [hl] + and D_UP + jr nz, .up + ret + +.down + ld hl, wRadioTuningKnob + ld a, [hl] + and a + ret z + dec [hl] + dec [hl] + jr .update + +.up + ld hl, wRadioTuningKnob + ld a, [hl] + cp 80 + ret nc + inc [hl] + inc [hl] +.update +UpdateRadioStation: + ld hl, wRadioTuningKnob + ld d, [hl] + ld hl, RadioChannels +.loop + ld a, [hli] + cp -1 + jr z, .nostation + cp d + jr z, .foundstation + inc hl + inc hl + jr .loop + +.nostation + call NoRadioStation + ret + +.foundstation + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .returnafterstation + push de + jp hl + +.returnafterstation + ld a, [wPokegearRadioChannelBank] + and a + ret z + xor a + ldh [hBGMapMode], a + hlcoord 2, 9 + call PlaceString + ld a, $1 + ldh [hBGMapMode], a + ret + +LoadPokegearRadioChannelPointer: ; unreferenced + ld [wPokegearRadioChannelBank], a + ld a, [hli] + ld [wPokegearRadioChannelAddr], a + ld a, [hli] + ld [wPokegearRadioChannelAddr + 1], a + ret + +RadioChannels: +; entries correspond to constants/radio_constants.asm +; frequency value given here = 4 × ingame_frequency − 2 + dbw 16, .PKMNTalkAndPokedexShow ; 04.5 + dbw 28, .PokemonMusic ; 07.5 + dbw 32, .LuckyChannel ; 08.5 + dbw 40, .BuenasPassword ; 10.5 + dbw 52, .RuinsOfAlphRadio ; 13.5 + dbw 64, .PlacesAndPeople ; 16.5 + dbw 72, .LetsAllSing ; 18.5 + dbw 78, .PokeFluteRadio ; 20.0 + dbw 80, .EvolutionRadio ; 20.5 + db -1 + +.PKMNTalkAndPokedexShow: +; Pokédex Show in the morning +; Oak's Pokémon Talk in the afternoon and evening + call .InJohto + jr nc, .NoSignal + ld a, [wTimeOfDay] + and a + jp z, LoadStation_PokedexShow + jp LoadStation_OaksPokemonTalk + +.PokemonMusic: + call .InJohto + jr nc, .NoSignal + jp LoadStation_PokemonMusic + +.LuckyChannel: + call .InJohto + jr nc, .NoSignal + jp LoadStation_LuckyChannel + +.BuenasPassword: + call .InJohto + jr nc, .NoSignal + jp LoadStation_BuenasPassword + +.RuinsOfAlphRadio: + ld a, [wPokegearMapPlayerIconLandmark] + cp LANDMARK_RUINS_OF_ALPH + jr nz, .NoSignal + jp LoadStation_UnownRadio + +.PlacesAndPeople: + call .InJohto + jr c, .NoSignal + ld a, [wPokegearFlags] + bit POKEGEAR_EXPN_CARD_F, a + jr z, .NoSignal + jp LoadStation_PlacesAndPeople + +.LetsAllSing: + call .InJohto + jr c, .NoSignal + ld a, [wPokegearFlags] + bit POKEGEAR_EXPN_CARD_F, a + jr z, .NoSignal + jp LoadStation_LetsAllSing + +.PokeFluteRadio: + call .InJohto + jr c, .NoSignal + ld a, [wPokegearFlags] + bit POKEGEAR_EXPN_CARD_F, a + jr z, .NoSignal + jp LoadStation_PokeFluteRadio + +.EvolutionRadio: +; This station airs in the Lake of Rage area when Team Rocket is still in Mahogany. + ld a, [wStatusFlags] + bit STATUSFLAGS_ROCKET_SIGNAL_F, a + jr z, .NoSignal + ld a, [wPokegearMapPlayerIconLandmark] + cp LANDMARK_MAHOGANY_TOWN + jr z, .ok + cp LANDMARK_ROUTE_43 + jr z, .ok + cp LANDMARK_LAKE_OF_RAGE + jr nz, .NoSignal +.ok + jp LoadStation_EvolutionRadio + +.NoSignal: + call NoRadioStation + ret + +.InJohto: +; if in Johto or on the S.S. Aqua, set carry +; otherwise clear carry + ld a, [wPokegearMapPlayerIconLandmark] + cp LANDMARK_FAST_SHIP + jr z, .johto + cp KANTO_LANDMARK + jr c, .johto +; kanto + and a + ret + +.johto + scf + ret + +LoadStation_OaksPokemonTalk: + xor a ; OAKS_POKEMON_TALK + ld [wCurRadioLine], a + ld [wNumRadioLinesPrinted], a + ld a, BANK(PlayRadioShow) + ld hl, PlayRadioShow + call Radio_BackUpFarCallParams + ld de, OaksPKMNTalkName + ret + +LoadStation_PokedexShow: + ld a, POKEDEX_SHOW + ld [wCurRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + ld a, BANK(PlayRadioShow) + ld hl, PlayRadioShow + call Radio_BackUpFarCallParams + ld de, PokedexShowName + ret + +LoadStation_PokemonMusic: + ld a, POKEMON_MUSIC + ld [wCurRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + ld a, BANK(PlayRadioShow) + ld hl, PlayRadioShow + call Radio_BackUpFarCallParams + ld de, PokemonMusicName + ret + +LoadStation_LuckyChannel: + ld a, LUCKY_CHANNEL + ld [wCurRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + ld a, BANK(PlayRadioShow) + ld hl, PlayRadioShow + call Radio_BackUpFarCallParams + ld de, LuckyChannelName + ret + +LoadStation_BuenasPassword: + ld a, BUENAS_PASSWORD + ld [wCurRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + ld a, BANK(PlayRadioShow) + ld hl, PlayRadioShow + call Radio_BackUpFarCallParams + ld de, NotBuenasPasswordName + ld a, [wStatusFlags2] + bit STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F, a + ret z + ld de, BuenasPasswordName + ret + +BuenasPasswordName: db "BUENA'S PASSWORD@" +NotBuenasPasswordName: db "@" + +LoadStation_UnownRadio: + ld a, UNOWN_RADIO + ld [wCurRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + ld a, BANK(PlayRadioShow) + ld hl, PlayRadioShow + call Radio_BackUpFarCallParams + ld de, UnownStationName + ret + +LoadStation_PlacesAndPeople: + ld a, PLACES_AND_PEOPLE + ld [wCurRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + ld a, BANK(PlayRadioShow) + ld hl, PlayRadioShow + call Radio_BackUpFarCallParams + ld de, PlacesAndPeopleName + ret + +LoadStation_LetsAllSing: + ld a, LETS_ALL_SING + ld [wCurRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + ld a, BANK(PlayRadioShow) + ld hl, PlayRadioShow + call Radio_BackUpFarCallParams + ld de, LetsAllSingName + ret + +LoadStation_RocketRadio: + ld a, ROCKET_RADIO + ld [wCurRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + ld a, BANK(PlayRadioShow) + ld hl, PlayRadioShow + call Radio_BackUpFarCallParams + ld de, LetsAllSingName + ret + +LoadStation_PokeFluteRadio: + ld a, POKE_FLUTE_RADIO + ld [wCurRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + ld a, BANK(PlayRadioShow) + ld hl, PlayRadioShow + call Radio_BackUpFarCallParams + ld de, PokeFluteStationName + ret + +LoadStation_EvolutionRadio: + ld a, EVOLUTION_RADIO + ld [wCurRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + ld a, BANK(PlayRadioShow) + ld hl, PlayRadioShow + call Radio_BackUpFarCallParams + ld de, UnownStationName + ret + +DummyLoadStation: ; unreferenced + ret + +RadioMusicRestartDE: + push de + ld a, e + ld [wPokegearRadioMusicPlaying], a + ld de, MUSIC_NONE + call PlayMusic + pop de + ld a, e + ld [wMapMusic], a + call PlayMusic + ret + +RadioMusicRestartPokemonChannel: + push de + ld a, RESTART_MAP_MUSIC + ld [wPokegearRadioMusicPlaying], a + ld de, MUSIC_NONE + call PlayMusic + pop de + ld de, MUSIC_POKEMON_CHANNEL + call PlayMusic + ret + +Radio_BackUpFarCallParams: + ld [wPokegearRadioChannelBank], a + ld a, l + ld [wPokegearRadioChannelAddr], a + ld a, h + ld [wPokegearRadioChannelAddr + 1], a + ret + +NoRadioStation: + call NoRadioMusic + call NoRadioName +; no radio channel + xor a + ld [wPokegearRadioChannelBank], a + ld [wPokegearRadioChannelAddr], a + ld [wPokegearRadioChannelAddr + 1], a + ld a, $1 + ldh [hBGMapMode], a + ret + +NoRadioMusic: + ld de, MUSIC_NONE + call PlayMusic + ld a, ENTER_MAP_MUSIC + ld [wPokegearRadioMusicPlaying], a + ret + +NoRadioName: + xor a + ldh [hBGMapMode], a + hlcoord 1, 8 + lb bc, 3, 18 + call ClearBox + hlcoord 0, 12 + lb bc, 4, 18 + call Textbox + ret + +OaksPKMNTalkName: db "OAK's Talk@" +PokedexShowName: db "#DEX Show@" +PokemonMusicName: db "#MON Music@" +LuckyChannelName: db "Lucky Channel@" +UnownStationName: db "?????@" + +PlacesAndPeopleName: db "Places & People@" +LetsAllSingName: db "Let's All Sing!@" +PokeFluteStationName: db "# FLUTE@" + +_TownMap: + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + + ld a, [wVramState] + push af + xor a + ld [wVramState], a + + call ClearBGPalettes + call ClearTilemap + call ClearSprites + call DisableLCD + call Pokegear_LoadGFX + farcall ClearSpriteAnims + ld a, 8 + call SkipMusic + ld a, LCDC_DEFAULT + ldh [rLCDC], a + call TownMap_GetCurrentLandmark + ld [wTownMapPlayerIconLandmark], a + ld [wTownMapCursorLandmark], a + xor a + ldh [hBGMapMode], a + call .InitTilemap + call WaitBGMap2 + ld a, [wTownMapPlayerIconLandmark] + call PokegearMap_InitPlayerIcon + ld a, [wTownMapCursorLandmark] + call PokegearMap_InitCursor + ld a, c + ld [wTownMapCursorObjectPointer], a + ld a, b + ld [wTownMapCursorObjectPointer + 1], a + ld b, SCGB_POKEGEAR_PALS + call GetSGBLayout + call SetPalettes + ldh a, [hCGB] + and a + jr z, .dmg + ld a, %11100100 + call DmgToCgbObjPal0 + call DelayFrame + +.dmg + ld a, [wTownMapPlayerIconLandmark] + cp KANTO_LANDMARK + jr nc, .kanto + ld d, KANTO_LANDMARK - 1 + ld e, 1 + call .loop + jr .resume + +.kanto + call TownMap_GetKantoLandmarkLimits + call .loop + +.resume + pop af + ld [wVramState], a + pop af + ldh [hInMenu], a + pop af + ld [wOptions], a + call ClearBGPalettes + ret + +.loop + call JoyTextDelay + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + ret nz + + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .pressed_up + + ld a, [hl] + and D_DOWN + jr nz, .pressed_down +.loop2 + push de + farcall PlaySpriteAnimations + pop de + call DelayFrame + jr .loop + +.pressed_up + ld hl, wTownMapCursorLandmark + ld a, [hl] + cp d + jr c, .okay + ld a, e + dec a + ld [hl], a + +.okay + inc [hl] + jr .next + +.pressed_down + ld hl, wTownMapCursorLandmark + ld a, [hl] + cp e + jr nz, .okay2 + ld a, d + inc a + ld [hl], a + +.okay2 + dec [hl] + +.next + push de + ld a, [wTownMapCursorLandmark] + call PokegearMap_UpdateLandmarkName + ld a, [wTownMapCursorObjectPointer] + ld c, a + ld a, [wTownMapCursorObjectPointer + 1] + ld b, a + ld a, [wTownMapCursorLandmark] + call PokegearMap_UpdateCursorPosition + pop de + jr .loop2 + +.InitTilemap: + ld a, [wTownMapPlayerIconLandmark] + cp KANTO_LANDMARK + jr nc, .kanto2 + ld e, JOHTO_REGION + jr .okay_tilemap + +.kanto2 + ld e, KANTO_REGION +.okay_tilemap + farcall PokegearMap + ld a, $07 + ld bc, 6 + hlcoord 1, 0 + call ByteFill + hlcoord 0, 0 + ld [hl], $06 + hlcoord 7, 0 + ld [hl], $17 + hlcoord 7, 1 + ld [hl], $16 + hlcoord 7, 2 + ld [hl], $26 + ld a, $07 + ld bc, NAME_LENGTH + hlcoord 8, 2 + call ByteFill + hlcoord 19, 2 + ld [hl], $17 + ld a, [wTownMapCursorLandmark] + call PokegearMap_UpdateLandmarkName + farcall TownMapPals + ret + +PlayRadio: + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + call .PlayStation + ld c, 100 + call DelayFrames +.loop + call JoyTextDelay + ldh a, [hJoyPressed] + and A_BUTTON | B_BUTTON + jr nz, .stop + ld a, [wPokegearRadioChannelAddr] + ld l, a + ld a, [wPokegearRadioChannelAddr + 1] + ld h, a + ld a, [wPokegearRadioChannelBank] + and a + jr z, .zero + rst FarCall +.zero + call DelayFrame + jr .loop + +.stop + pop af + ld [wOptions], a + call ExitPokegearRadio_HandleMusic + ret + +.PlayStation: + ld a, ENTER_MAP_MUSIC + ld [wPokegearRadioMusicPlaying], a + ld hl, PlayRadioStationPointers + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .jump_return + push de + jp hl + +.jump_return + push de + hlcoord 0, 12 + lb bc, 4, 18 + call Textbox + hlcoord 1, 14 + ld [hl], "“" + pop de + hlcoord 2, 14 + call PlaceString + ld h, b + ld l, c + ld [hl], "”" + call WaitBGMap + ret + +PlayRadioStationPointers: +; entries correspond to MAPRADIO_* constants + table_width 2, PlayRadioStationPointers + dw LoadStation_PokemonChannel + dw LoadStation_OaksPokemonTalk + dw LoadStation_PokedexShow + dw LoadStation_PokemonMusic + dw LoadStation_LuckyChannel + dw LoadStation_UnownRadio + dw LoadStation_PlacesAndPeople + dw LoadStation_LetsAllSing + dw LoadStation_RocketRadio + assert_table_length NUM_MAP_RADIO_STATIONS + +LoadStation_PokemonChannel: + call IsInJohto + and a + jr nz, .kanto + call UpdateTime + ld a, [wTimeOfDay] + and a + jp z, LoadStation_PokedexShow + jp LoadStation_OaksPokemonTalk + +.kanto: + jp LoadStation_PlacesAndPeople + +PokegearMap: + ld a, e + and a + jr nz, .kanto + call LoadTownMapGFX + call FillJohtoMap + ret + +.kanto + call LoadTownMapGFX + call FillKantoMap + ret + +_FlyMap: + call ClearBGPalettes + call ClearTilemap + call ClearSprites + ld hl, hInMenu + ld a, [hl] + push af + ld [hl], $1 + xor a + ldh [hBGMapMode], a + farcall ClearSpriteAnims + call LoadTownMapGFX + ld de, FlyMapLabelBorderGFX + ld hl, vTiles2 tile $30 + lb bc, BANK(FlyMapLabelBorderGFX), 6 + call Request1bpp + call FlyMap + call Pokegear_DummyFunction + ld b, SCGB_POKEGEAR_PALS + call GetSGBLayout + call SetPalettes +.loop + call JoyTextDelay + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .pressedB + ld a, [hl] + and A_BUTTON + jr nz, .pressedA + call .HandleDPad + call GetMapCursorCoordinates + farcall PlaySpriteAnimations + call DelayFrame + jr .loop + +.pressedB + ld a, -1 + jr .exit + +.pressedA + ld a, [wTownMapPlayerIconLandmark] + ld l, a + ld h, 0 + add hl, hl + ld de, Flypoints + 1 + add hl, de + ld a, [hl] +.exit + ld [wTownMapPlayerIconLandmark], a + pop af + ldh [hInMenu], a + call ClearBGPalettes + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + xor a ; LOW(vBGMap0) + ldh [hBGMapAddress], a + ld a, HIGH(vBGMap0) + ldh [hBGMapAddress + 1], a + ld a, [wTownMapPlayerIconLandmark] + ld e, a + ret + +.HandleDPad: + ld a, [wStartFlypoint] + ld e, a + ld a, [wEndFlypoint] + ld d, a + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .ScrollNext + ld a, [hl] + and D_DOWN + jr nz, .ScrollPrev + ret + +.ScrollNext: + ld hl, wTownMapPlayerIconLandmark + ld a, [hl] + cp d + jr nz, .NotAtEndYet + ld a, e + dec a + ld [hl], a +.NotAtEndYet: + inc [hl] + call CheckIfVisitedFlypoint + jr z, .ScrollNext + jr .Finally + +.ScrollPrev: + ld hl, wTownMapPlayerIconLandmark + ld a, [hl] + cp e + jr nz, .NotAtStartYet + ld a, d + inc a + ld [hl], a +.NotAtStartYet: + dec [hl] + call CheckIfVisitedFlypoint + jr z, .ScrollPrev +.Finally: + call TownMapBubble + call WaitBGMap + xor a + ldh [hBGMapMode], a + ret + +TownMapBubble: +; Draw the bubble containing the location text in the town map HUD + +; Top-left corner + hlcoord 1, 0 + ld a, $30 + ld [hli], a +; Top row + ld bc, 16 + ld a, " " + call ByteFill +; Top-right corner + ld a, $31 + ld [hl], a + hlcoord 1, 1 + +; Middle row + ld bc, SCREEN_WIDTH - 2 + ld a, " " + call ByteFill + +; Bottom-left corner + hlcoord 1, 2 + ld a, $32 + ld [hli], a +; Bottom row + ld bc, 16 + ld a, " " + call ByteFill +; Bottom-right corner + ld a, $33 + ld [hl], a + +; Print "Where?" + hlcoord 2, 0 + ld de, .Where + call PlaceString +; Print the name of the default flypoint + call .Name +; Up/down arrows + hlcoord 18, 1 + ld [hl], $34 + ret + +.Where: + db "Where?@" + +.Name: +; We need the map location of the default flypoint + ld a, [wTownMapPlayerIconLandmark] + ld l, a + ld h, 0 + add hl, hl ; two bytes per flypoint + ld de, Flypoints + add hl, de + ld e, [hl] + farcall GetLandmarkName + hlcoord 2, 1 + ld de, wStringBuffer1 + call PlaceString + ret + +GetMapCursorCoordinates: + ld a, [wTownMapPlayerIconLandmark] + ld l, a + ld h, 0 + add hl, hl + ld de, Flypoints + add hl, de + ld e, [hl] + farcall GetLandmarkCoords + ld a, [wTownMapCursorCoordinates] + ld c, a + ld a, [wTownMapCursorCoordinates + 1] + ld b, a + ld hl, 4 + add hl, bc + ld [hl], e + ld hl, 5 + add hl, bc + ld [hl], d + ret + +CheckIfVisitedFlypoint: +; Check if the flypoint loaded in [hl] has been visited yet. + push bc + push de + push hl + ld l, [hl] + ld h, 0 + add hl, hl + ld de, Flypoints + 1 + add hl, de + ld c, [hl] + call HasVisitedSpawn + pop hl + pop de + pop bc + and a + ret + +HasVisitedSpawn: +; Check if spawn point c has been visited. + ld hl, wVisitedSpawns + ld b, CHECK_FLAG + ld d, 0 + predef SmallFarFlagAction + ld a, c + ret + +INCLUDE "data/maps/flypoints.asm" + +Pokegear_DummyFunction: + ret + +FlyMap: + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetWorldMapLocation +; If we're not in a valid location, i.e. Pokecenter floor 2F, +; the backup map information is used. + cp LANDMARK_SPECIAL + jr nz, .CheckRegion + ld a, [wBackupMapGroup] + ld b, a + ld a, [wBackupMapNumber] + ld c, a + call GetWorldMapLocation +.CheckRegion: +; The first 46 locations are part of Johto. The rest are in Kanto. + cp KANTO_LANDMARK + jr nc, .KantoFlyMap +; Johto fly map +; Note that .NoKanto should be modified in tandem with this branch + push af + ld a, JOHTO_FLYPOINT ; first Johto flypoint + ld [wTownMapPlayerIconLandmark], a ; first one is default (New Bark Town) + ld [wStartFlypoint], a + ld a, KANTO_FLYPOINT - 1 ; last Johto flypoint + ld [wEndFlypoint], a +; Fill out the map + call FillJohtoMap + call .MapHud + pop af + call TownMapPlayerIcon + ret + +.KantoFlyMap: +; The event that there are no flypoints enabled in a map is not +; accounted for. As a result, if you attempt to select a flypoint +; when there are none enabled, the game will crash. Additionally, +; the flypoint selection has a default starting point that +; can be flown to even if none are enabled. +; To prevent both of these things from happening when the player +; enters Kanto, fly access is restricted until Indigo Plateau is +; visited and its flypoint enabled. + push af + ld c, SPAWN_INDIGO + call HasVisitedSpawn + and a + jr z, .NoKanto +; Kanto's map is only loaded if we've visited Indigo Plateau + ld a, KANTO_FLYPOINT ; first Kanto flypoint + ld [wStartFlypoint], a + ld a, NUM_FLYPOINTS - 1 ; last Kanto flypoint + ld [wEndFlypoint], a + ld [wTownMapPlayerIconLandmark], a ; last one is default (Indigo Plateau) +; Fill out the map + call FillKantoMap + call .MapHud + pop af + call TownMapPlayerIcon + ret + +.NoKanto: +; If Indigo Plateau hasn't been visited, we use Johto's map instead + ld a, JOHTO_FLYPOINT ; first Johto flypoint + ld [wTownMapPlayerIconLandmark], a ; first one is default (New Bark Town) + ld [wStartFlypoint], a + ld a, KANTO_FLYPOINT - 1 ; last Johto flypoint + ld [wEndFlypoint], a + call FillJohtoMap + pop af +.MapHud: + call TownMapBubble + call TownMapPals + hlbgcoord 0, 0 ; BG Map 0 + call TownMapBGUpdate + call TownMapMon + ld a, c + ld [wTownMapCursorCoordinates], a + ld a, b + ld [wTownMapCursorCoordinates + 1], a + ret + +Pokedex_GetArea: +; e: Current landmark + ld a, [wTownMapPlayerIconLandmark] + push af + ld a, [wTownMapCursorLandmark] + push af + ld a, e + ld [wTownMapPlayerIconLandmark], a + call ClearSprites + xor a + ldh [hBGMapMode], a + ld a, $1 + ldh [hInMenu], a + ld de, PokedexNestIconGFX + ld hl, vTiles0 tile $7f + lb bc, BANK(PokedexNestIconGFX), 1 + call Request2bpp + call .GetPlayerOrFastShipIcon + ld hl, vTiles0 tile $78 + ld c, 4 + call Request2bpp + call LoadTownMapGFX + call FillKantoMap + call .PlaceString_MonsNest + call TownMapPals + hlbgcoord 0, 0, vBGMap1 + call TownMapBGUpdate + call FillJohtoMap + call .PlaceString_MonsNest + call TownMapPals + hlbgcoord 0, 0 + call TownMapBGUpdate + ld b, SCGB_POKEGEAR_PALS + call GetSGBLayout + call SetPalettes + xor a + ldh [hBGMapMode], a + xor a ; JOHTO_REGION + call .GetAndPlaceNest +.loop + call JoyTextDelay + ld hl, hJoyPressed + ld a, [hl] + and A_BUTTON | B_BUTTON + jr nz, .a_b + ldh a, [hJoypadDown] + and SELECT + jr nz, .select + call .LeftRightInput + call .BlinkNestIcons + jr .next + +.select + call .HideNestsShowPlayer +.next + call DelayFrame + jr .loop + +.a_b + call ClearSprites + pop af + ld [wTownMapCursorLandmark], a + pop af + ld [wTownMapPlayerIconLandmark], a + ret + +.LeftRightInput: + ld a, [hl] + and D_LEFT + jr nz, .left + ld a, [hl] + and D_RIGHT + jr nz, .right + ret + +.left + ldh a, [hWY] + cp SCREEN_HEIGHT_PX + ret z + call ClearSprites + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + xor a ; JOHTO_REGION + call .GetAndPlaceNest + ret + +.right + ld a, [wStatusFlags] + bit STATUSFLAGS_HALL_OF_FAME_F, a + ret z + ldh a, [hWY] + and a + ret z + call ClearSprites + xor a + ldh [hWY], a + ld a, KANTO_REGION + call .GetAndPlaceNest + ret + +.BlinkNestIcons: + ldh a, [hVBlankCounter] + ld e, a + and $f + ret nz + ld a, e + and $10 + jr nz, .copy_sprites + call ClearSprites + ret + +.copy_sprites + hlcoord 0, 0 + ld de, wShadowOAM + ld bc, wShadowOAMEnd - wShadowOAM + call CopyBytes + ret + +.PlaceString_MonsNest: + hlcoord 0, 0 + ld bc, SCREEN_WIDTH + ld a, " " + call ByteFill + hlcoord 0, 1 + ld a, $06 + ld [hli], a + ld bc, SCREEN_WIDTH - 2 + ld a, $07 + call ByteFill + ld [hl], $17 + call GetPokemonName + hlcoord 2, 0 + call PlaceString + ld h, b + ld l, c + ld de, .String_SNest + call PlaceString + ret + +.String_SNest: + db "'S NEST@" + +.GetAndPlaceNest: + ld [wTownMapCursorLandmark], a + ld e, a + farcall FindNest ; load nest landmarks into wTilemap[0,0] + decoord 0, 0 + ld hl, wShadowOAMSprite00 +.nestloop + ld a, [de] + and a + jr z, .done_nest + push de + ld e, a + push hl + farcall GetLandmarkCoords + pop hl + ; load into OAM + ld a, d + sub 4 + ld [hli], a ; y + ld a, e + sub 4 + ld [hli], a ; x + ld a, $7f ; nest icon + ld [hli], a ; tile id + xor a + ld [hli], a ; attributes + ; next + pop de + inc de + jr .nestloop + +.done_nest + ld hl, wShadowOAM + decoord 0, 0 + ld bc, wShadowOAMEnd - wShadowOAM + call CopyBytes + ret + +.HideNestsShowPlayer: + call .CheckPlayerLocation + ret c + ld a, [wTownMapPlayerIconLandmark] + ld e, a + farcall GetLandmarkCoords + ld c, e + ld b, d + ld de, .PlayerOAM + ld hl, wShadowOAMSprite00 +.ShowPlayerLoop: + ld a, [de] + cp $80 + jr z, .clear_oam + add b + ld [hli], a ; y + inc de + ld a, [de] + add c + ld [hli], a ; x + inc de + ld a, [de] + add $78 ; where the player's sprite is loaded + ld [hli], a ; tile id + inc de + push bc + ld c, PAL_OW_RED + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .male + inc c ; PAL_OW_BLUE +.male + ld a, c + ld [hli], a ; attributes + pop bc + jr .ShowPlayerLoop + +.clear_oam + ld hl, wShadowOAMSprite04 + ld bc, wShadowOAMEnd - wShadowOAMSprite04 + xor a + call ByteFill + ret + +.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 + +.CheckPlayerLocation: +; Don't show the player's sprite if you're +; not in the same region as what's currently +; on the screen. + ld a, [wTownMapPlayerIconLandmark] + cp LANDMARK_FAST_SHIP + jr z, .johto + cp KANTO_LANDMARK + jr c, .johto +; kanto + ld a, [wTownMapCursorLandmark] + and a + jr z, .clear + jr .ok + +.johto + ld a, [wTownMapCursorLandmark] + and a + jr nz, .clear +.ok + and a + ret + +.clear + ld hl, wShadowOAM + ld bc, wShadowOAMEnd - wShadowOAM + xor a + call ByteFill + scf + ret + +.GetPlayerOrFastShipIcon: + ld a, [wTownMapPlayerIconLandmark] + cp LANDMARK_FAST_SHIP + jr z, .FastShip + farcall GetPlayerIcon + ret + +.FastShip: + ld de, FastShipGFX + ld b, BANK(FastShipGFX) + ret + +TownMapBGUpdate: +; Update BG Map tiles and attributes + +; BG Map address + ld a, l + ldh [hBGMapAddress], a + ld a, h + ldh [hBGMapAddress + 1], a +; Only update palettes on CGB + ldh a, [hCGB] + and a + jr z, .tiles +; BG Map mode 2 (palettes) + ld a, 2 + ldh [hBGMapMode], a +; The BG Map is updated in thirds, so we wait + +; 3 frames to update the whole screen's palettes. + ld c, 3 + call DelayFrames +.tiles +; Update BG Map tiles + call WaitBGMap +; Turn off BG Map update + xor a + ldh [hBGMapMode], a + ret + +FillJohtoMap: + ld de, JohtoMap + jr FillTownMap + +FillKantoMap: + ld de, KantoMap +FillTownMap: + hlcoord 0, 0 +.loop + ld a, [de] + cp -1 + ret z + ld a, [de] + ld [hli], a + inc de + jr .loop + +TownMapPals: +; Assign palettes based on tile ids + hlcoord 0, 0 + decoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT +.loop +; Current tile + ld a, [hli] + push hl +; The palette map covers tiles $00 to $5f; $60 and above use palette 0 + cp $60 + jr nc, .pal0 + +; The palette data is condensed to nybbles, least-significant first. + ld hl, .PalMap + srl a + jr c, .odd +; Even-numbered tile ids take the bottom nybble... + add l + ld l, a + ld a, h + adc 0 + ld h, a + ld a, [hl] + and PALETTE_MASK + jr .update + +.odd +; ...and odd ids take the top. + add l + ld l, a + ld a, h + adc 0 + ld h, a + ld a, [hl] + swap a + and PALETTE_MASK + jr .update + +.pal0 + xor a +.update + pop hl + ld [de], a + inc de + dec bc + ld a, b + or c + jr nz, .loop + ret + +.PalMap: +INCLUDE "gfx/pokegear/town_map_palette_map.asm" + +TownMapMon: +; Draw the FlyMon icon at town map location + +; Get FlyMon species + ld a, [wCurPartyMon] + ld hl, wPartySpecies + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + ld [wTempIconSpecies], a +; Get FlyMon icon + ld e, $08 ; starting tile in VRAM + farcall GetSpeciesIcon +; Animation/palette + depixel 0, 0 + ld a, SPRITE_ANIM_INDEX_PARTY_MON + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], $08 + ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID + add hl, bc + ld [hl], SPRITE_ANIM_SEQ_NULL + ret + +TownMapPlayerIcon: +; Draw the player icon at town map location in a + push af + farcall GetPlayerIcon +; Standing icon + ld hl, vTiles0 tile $10 + ld c, 4 ; # tiles + call Request2bpp +; Walking icon + ld hl, 12 tiles + add hl, de + ld d, h + ld e, l + ld hl, vTiles0 tile $14 + ld c, 4 ; # tiles + ld a, BANK(ChrisSpriteGFX) ; does nothing + call Request2bpp +; Animation/palette + depixel 0, 0 + ld b, SPRITE_ANIM_INDEX_RED_WALK ; Male + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .got_gender + ld b, SPRITE_ANIM_INDEX_BLUE_WALK ; Female +.got_gender + ld a, b + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], $10 + pop af + ld e, a + push bc + farcall GetLandmarkCoords + pop bc + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld [hl], e + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld [hl], d + ret + +LoadTownMapGFX: + ld hl, TownMapGFX + ld de, vTiles2 + lb bc, BANK(TownMapGFX), 48 + call DecompressRequest2bpp + ret + +JohtoMap: +INCBIN "gfx/pokegear/johto.bin" + +KantoMap: +INCBIN "gfx/pokegear/kanto.bin" + +PokedexNestIconGFX: +INCBIN "gfx/pokegear/dexmap_nest_icon.2bpp" +FlyMapLabelBorderGFX: +INCBIN "gfx/pokegear/flymap_label_border.1bpp" + +EntireFlyMap: ; unreferenced +; Similar to _FlyMap, but scrolls through the entire +; Flypoints data of both regions. A debug function? + xor a + ld [wTownMapPlayerIconLandmark], a + call ClearBGPalettes + call ClearTilemap + call ClearSprites + ld hl, hInMenu + ld a, [hl] + push af + ld [hl], $1 + xor a + ldh [hBGMapMode], a + farcall ClearSpriteAnims + call LoadTownMapGFX + ld de, FlyMapLabelBorderGFX + ld hl, vTiles2 tile $30 + lb bc, BANK(FlyMapLabelBorderGFX), 6 + call Request1bpp + call FillKantoMap + call TownMapBubble + call TownMapPals + hlbgcoord 0, 0, vBGMap1 + call TownMapBGUpdate + call FillJohtoMap + call TownMapBubble + call TownMapPals + hlbgcoord 0, 0 + call TownMapBGUpdate + call TownMapMon + ld a, c + ld [wTownMapCursorCoordinates], a + ld a, b + ld [wTownMapCursorCoordinates + 1], a + ld b, SCGB_POKEGEAR_PALS + call GetSGBLayout + call SetPalettes +.loop + call JoyTextDelay + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .pressedB + ld a, [hl] + and A_BUTTON + jr nz, .pressedA + call .HandleDPad + call GetMapCursorCoordinates + farcall PlaySpriteAnimations + call DelayFrame + jr .loop + +.pressedB + ld a, -1 + jr .exit + +.pressedA + ld a, [wTownMapPlayerIconLandmark] + ld l, a + ld h, 0 + add hl, hl + ld de, Flypoints + 1 + add hl, de + ld a, [hl] +.exit + ld [wTownMapPlayerIconLandmark], a + pop af + ldh [hInMenu], a + call ClearBGPalettes + ld a, SCREEN_HEIGHT_PX + ldh [hWY], a + xor a ; LOW(vBGMap0) + ldh [hBGMapAddress], a + ld a, HIGH(vBGMap0) + ldh [hBGMapAddress + 1], a + ld a, [wTownMapPlayerIconLandmark] + ld e, a + ret + +.HandleDPad: + ld hl, hJoyLast + ld a, [hl] + and D_DOWN | D_RIGHT + jr nz, .ScrollNext + ld a, [hl] + and D_UP | D_LEFT + jr nz, .ScrollPrev + ret + +.ScrollNext: + ld hl, wTownMapPlayerIconLandmark + ld a, [hl] + cp NUM_FLYPOINTS - 1 + jr c, .NotAtEndYet + ld [hl], -1 +.NotAtEndYet: + inc [hl] + jr .FillMap + +.ScrollPrev: + ld hl, wTownMapPlayerIconLandmark + ld a, [hl] + and a + jr nz, .NotAtStartYet + ld [hl], NUM_FLYPOINTS +.NotAtStartYet: + dec [hl] +.FillMap: + ld a, [wTownMapPlayerIconLandmark] + cp KANTO_FLYPOINT + jr c, .InJohto + call FillKantoMap + xor a + ld b, HIGH(vBGMap1) + jr .Finally + +.InJohto: + call FillJohtoMap + ld a, SCREEN_HEIGHT_PX + ld b, HIGH(vBGMap0) +.Finally: + ldh [hWY], a + ld a, b + ldh [hBGMapAddress + 1], a + call TownMapBubble + call WaitBGMap + xor a + ldh [hBGMapMode], a + ret diff --git a/engine/pokegear/radio.asm b/engine/pokegear/radio.asm new file mode 100644 index 0000000..720b2d7 --- /dev/null +++ b/engine/pokegear/radio.asm @@ -0,0 +1,1803 @@ +PlayRadioShow: +; If we're already in the radio program proper, we don't need to be here. + ld a, [wCurRadioLine] + cp POKE_FLUTE_RADIO + jr nc, .ok +; If Team Rocket is not occupying the radio tower, we don't need to be here. + ld a, [wStatusFlags2] + bit STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F, a + jr z, .ok +; If we're in Kanto, we don't need to be here. + call IsInJohto + and a + jr nz, .ok +; Team Rocket broadcasts on all stations. + ld a, ROCKET_RADIO + ld [wCurRadioLine], a +.ok +; Jump to the currently loaded station. The index to which we need to jump is in wCurRadioLine. + jumptable RadioJumptable, wCurRadioLine + +RadioJumptable: +; entries correspond to constants/radio_constants.asm + table_width 2, RadioJumptable + dw OaksPKMNTalk1 ; $00 + dw PokedexShow1 ; $01 + dw BenMonMusic1 ; $02 + dw LuckyNumberShow1 ; $03 + dw BuenasPassword1 ; $04 + dw PeoplePlaces1 ; $05 + dw FernMonMusic1 ; $06 + dw RocketRadio1 ; $07 + dw PokeFluteRadio ; $08 + dw UnownRadio ; $09 + dw EvolutionRadio ; $0a + assert_table_length NUM_RADIO_CHANNELS +; OaksPKMNTalk + dw OaksPKMNTalk2 ; $0b + dw OaksPKMNTalk3 ; $0c + dw OaksPKMNTalk4 ; $0d + dw OaksPKMNTalk5 ; $0e + dw OaksPKMNTalk6 ; $0f + dw OaksPKMNTalk7 ; $10 + dw OaksPKMNTalk8 ; $11 + dw OaksPKMNTalk9 ; $12 + dw PokedexShow2 ; $13 + dw PokedexShow3 ; $14 + dw PokedexShow4 ; $15 + dw PokedexShow5 ; $16 +; Ben Music + dw BenMonMusic2 ; $17 + dw BenMonMusic3 ; $18 + dw BenFernMusic4 ; $19 + dw BenFernMusic5 ; $1a + dw BenFernMusic6 ; $1b + dw BenFernMusic7 ; $1c + dw FernMonMusic2 ; $1d +; Lucky Number Show + dw LuckyNumberShow2 ; $1e + dw LuckyNumberShow3 ; $1f + dw LuckyNumberShow4 ; $20 + dw LuckyNumberShow5 ; $21 + dw LuckyNumberShow6 ; $22 + dw LuckyNumberShow7 ; $23 + dw LuckyNumberShow8 ; $24 + dw LuckyNumberShow9 ; $25 + dw LuckyNumberShow10 ; $26 + dw LuckyNumberShow11 ; $27 + dw LuckyNumberShow12 ; $28 + dw LuckyNumberShow13 ; $29 + dw LuckyNumberShow14 ; $2a + dw LuckyNumberShow15 ; $2b +; People & Places + dw PeoplePlaces2 ; $2c + dw PeoplePlaces3 ; $2d + dw PeoplePlaces4 ; $2e + dw PeoplePlaces5 ; $2f + dw PeoplePlaces6 ; $30 + dw PeoplePlaces7 ; $31 +; Rocket Radio + dw RocketRadio2 ; $32 + dw RocketRadio3 ; $33 + dw RocketRadio4 ; $34 + dw RocketRadio5 ; $35 + dw RocketRadio6 ; $36 + dw RocketRadio7 ; $37 + dw RocketRadio8 ; $38 + dw RocketRadio9 ; $39 + dw RocketRadio10 ; $3a +; More Pokemon Channel stuff + dw OaksPKMNTalk10 ; $3b + dw OaksPKMNTalk11 ; $3c + dw OaksPKMNTalk12 ; $3d + dw OaksPKMNTalk13 ; $3e + dw OaksPKMNTalk14 ; $3f +; Buenas Password + dw BuenasPassword2 ; $40 + dw BuenasPassword3 ; $41 + dw BuenasPassword4 ; $42 + dw BuenasPassword5 ; $43 + dw BuenasPassword6 ; $44 + dw BuenasPassword7 ; $45 + dw BuenasPassword8 ; $46 + dw BuenasPassword9 ; $47 + dw BuenasPassword10 ; $48 + dw BuenasPassword11 ; $49 + dw BuenasPassword12 ; $4a + dw BuenasPassword13 ; $4b + dw BuenasPassword14 ; $4c + dw BuenasPassword15 ; $4d + dw BuenasPassword16 ; $4e + dw BuenasPassword17 ; $4f + dw BuenasPassword18 ; $50 + dw BuenasPassword19 ; $51 + dw BuenasPassword20 ; $52 + dw BuenasPassword21 ; $53 + dw RadioScroll ; $54 +; More Pokemon Channel stuff + dw PokedexShow6 ; $55 + dw PokedexShow7 ; $56 + dw PokedexShow8 ; $57 + assert_table_length NUM_RADIO_SEGMENTS + +PrintRadioLine: + ld [wNextRadioLine], a + ld hl, wRadioText + ld a, [wNumRadioLinesPrinted] + cp 2 + jr nc, .print + inc hl + ld [hl], TX_START + inc a + ld [wNumRadioLinesPrinted], a + cp 2 + jr nz, .print + bccoord 1, 16 + call PlaceHLTextAtBC + jr .skip +.print + call PrintTextboxText +.skip + ld a, RADIO_SCROLL + ld [wCurRadioLine], a + ld a, 100 + ld [wRadioTextDelay], a + ret + +ReplacePeriodsWithSpaces: ; unreferenced + push hl + ld b, SCREEN_WIDTH * 2 +.loop + ld a, [hl] + cp "." + jr nz, .next + ld [hl], " " +.next + inc hl + dec b + jr nz, .loop + pop hl + ret + +RadioScroll: + ld hl, wRadioTextDelay + ld a, [hl] + and a + jr z, .proceed + dec [hl] + ret +.proceed + ld a, [wNextRadioLine] + ld [wCurRadioLine], a + ld a, [wNumRadioLinesPrinted] + cp 1 + call nz, CopyBottomLineToTopLine + jp ClearBottomLine + +OaksPKMNTalk1: + ld a, 5 + ld [wOaksPKMNTalkSegmentCounter], a + call StartRadioStation + ld hl, OPT_IntroText1 + ld a, OAKS_POKEMON_TALK_2 + jp NextRadioLine + +OaksPKMNTalk2: + ld hl, OPT_IntroText2 + ld a, OAKS_POKEMON_TALK_3 + jp NextRadioLine + +OaksPKMNTalk3: + ld hl, OPT_IntroText3 + ld a, OAKS_POKEMON_TALK_4 + jp NextRadioLine + +OaksPKMNTalk4: +; Choose a random route, and a random Pokemon from that route. +.sample + call Random + and %11111 + cp (OaksPKMNTalkRoutes.End - OaksPKMNTalkRoutes) / 2 + jr nc, .sample + ld hl, OaksPKMNTalkRoutes + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [hli] + ld d, a + ld e, [hl] + ; de now contains the chosen map's group and number indices. + push de + farcall LookUpGrassJohtoWildmons + + ; Generate a number, either 0, 1, or 2, to choose a time of day. +.loop2 + call Random + maskbits NUM_DAYTIMES + cp DARKNESS_F + jr z, .loop2 + ; Point hl to the list of Pokémon for that time of day, skipping the map ID and the percentages + ld bc, 5 + add hl, bc + ld c, 3 * NUM_GRASSMON + call AddNTimes + +.loop3 + ; Choose one of the middle three Pokemon. + call Random + maskbits NUM_GRASSMON + cp 2 + jr c, .loop3 + cp 5 + jr nc, .loop3 + ld e, a + ld d, 0 + add hl, de + add hl, de + add hl, de + inc hl ; skip level + ld a, BANK(JohtoGrassWildMons) + call GetFarWord + call GetPokemonIDFromIndex + ld [wNamedObjectIndex], a + ld [wCurPartySpecies], a + call GetPokemonName + ld hl, wStringBuffer1 + ld de, wMonOrItemNameBuffer + ld bc, MON_NAME_LENGTH + call CopyBytes + + ; Now that we've chosen our wild Pokemon, + ; let's recover the map index info and get its name. + pop bc + call GetWorldMapLocation + ld e, a + farcall GetLandmarkName + ld hl, OPT_OakText1 + call CopyRadioTextToRAM + ld a, OAKS_POKEMON_TALK_5 + jp PrintRadioLine + +.overflow + pop bc + ld a, OAKS_POKEMON_TALK + jp PrintRadioLine + +INCLUDE "data/radio/oaks_pkmn_talk_routes.asm" + +OaksPKMNTalk5: + ld hl, OPT_OakText2 + ld a, OAKS_POKEMON_TALK_6 + jp NextRadioLine + +OaksPKMNTalk6: + ld hl, OPT_OakText3 + ld a, OAKS_POKEMON_TALK_7 + jp NextRadioLine + +OPT_IntroText1: + text_far _OPT_IntroText1 + text_end + +OPT_IntroText2: + text_far _OPT_IntroText2 + text_end + +OPT_IntroText3: + text_far _OPT_IntroText3 + text_end + +OPT_OakText1: + text_far _OPT_OakText1 + text_end + +OPT_OakText2: + text_far _OPT_OakText2 + text_end + +OPT_OakText3: + text_far _OPT_OakText3 + text_end + +OaksPKMNTalk7: + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, OPT_MaryText1 + ld a, OAKS_POKEMON_TALK_8 + jp NextRadioLine + +OPT_MaryText1: + text_far _OPT_MaryText1 + text_end + +OaksPKMNTalk8: + ; 0-15 are all valid indexes into .Adverbs, + ; so no need for a retry loop + call Random + maskbits NUM_OAKS_POKEMON_TALK_ADVERBS + assert_power_of_2 NUM_OAKS_POKEMON_TALK_ADVERBS + ld e, a + ld d, 0 + ld hl, .Adverbs + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld a, OAKS_POKEMON_TALK_9 + jp NextRadioLine + +.Adverbs: + table_width 2, OaksPKMNTalk8.Adverbs + dw .OPT_SweetAdorablyText + dw .OPT_WigglySlicklyText + dw .OPT_AptlyNamedText + dw .OPT_UndeniablyKindOfText + dw .OPT_UnbearablyText + dw .OPT_WowImpressivelyText + dw .OPT_AlmostPoisonouslyText + dw .OPT_SensuallyText + dw .OPT_MischievouslyText + dw .OPT_TopicallyText + dw .OPT_AddictivelyText + dw .OPT_LooksInWaterText + dw .OPT_EvolutionMustBeText + dw .OPT_ProvocativelyText + dw .OPT_FlippedOutText + dw .OPT_HeartMeltinglyText + assert_table_length NUM_OAKS_POKEMON_TALK_ADVERBS + +.OPT_SweetAdorablyText: + text_far _OPT_SweetAdorablyText + text_end + +.OPT_WigglySlicklyText: + text_far _OPT_WigglySlicklyText + text_end + +.OPT_AptlyNamedText: + text_far _OPT_AptlyNamedText + text_end + +.OPT_UndeniablyKindOfText: + text_far _OPT_UndeniablyKindOfText + text_end + +.OPT_UnbearablyText: + text_far _OPT_UnbearablyText + text_end + +.OPT_WowImpressivelyText: + text_far _OPT_WowImpressivelyText + text_end + +.OPT_AlmostPoisonouslyText: + text_far _OPT_AlmostPoisonouslyText + text_end + +.OPT_SensuallyText: + text_far _OPT_SensuallyText + text_end + +.OPT_MischievouslyText: + text_far _OPT_MischievouslyText + text_end + +.OPT_TopicallyText: + text_far _OPT_TopicallyText + text_end + +.OPT_AddictivelyText: + text_far _OPT_AddictivelyText + text_end + +.OPT_LooksInWaterText: + text_far _OPT_LooksInWaterText + text_end + +.OPT_EvolutionMustBeText: + text_far _OPT_EvolutionMustBeText + text_end + +.OPT_ProvocativelyText: + text_far _OPT_ProvocativelyText + text_end + +.OPT_FlippedOutText: + text_far _OPT_FlippedOutText + text_end + +.OPT_HeartMeltinglyText: + text_far _OPT_HeartMeltinglyText + text_end + +OaksPKMNTalk9: + ; 0-15 are all valid indexes into .Adjectives, + ; so no need for a retry loop + call Random + maskbits NUM_OAKS_POKEMON_TALK_ADJECTIVES + assert_power_of_2 NUM_OAKS_POKEMON_TALK_ADJECTIVES + ld e, a + ld d, 0 + ld hl, .Adjectives + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wOaksPKMNTalkSegmentCounter] + dec a + ld [wOaksPKMNTalkSegmentCounter], a + ld a, OAKS_POKEMON_TALK_4 + jr nz, .ok + ld a, 5 + ld [wOaksPKMNTalkSegmentCounter], a + ld a, OAKS_POKEMON_TALK_10 +.ok + jp NextRadioLine + +.Adjectives: + table_width 2, OaksPKMNTalk9.Adjectives + dw .OPT_CuteText + dw .OPT_WeirdText + dw .OPT_PleasantText + dw .OPT_BoldSortOfText + dw .OPT_FrighteningText + dw .OPT_SuaveDebonairText + dw .OPT_PowerfulText + dw .OPT_ExcitingText + dw .OPT_GroovyText + dw .OPT_InspiringText + dw .OPT_FriendlyText + dw .OPT_HotHotHotText + dw .OPT_StimulatingText + dw .OPT_GuardedText + dw .OPT_LovelyText + dw .OPT_SpeedyText + assert_table_length NUM_OAKS_POKEMON_TALK_ADJECTIVES + +.OPT_CuteText: + text_far _OPT_CuteText + text_end + +.OPT_WeirdText: + text_far _OPT_WeirdText + text_end + +.OPT_PleasantText: + text_far _OPT_PleasantText + text_end + +.OPT_BoldSortOfText: + text_far _OPT_BoldSortOfText + text_end + +.OPT_FrighteningText: + text_far _OPT_FrighteningText + text_end + +.OPT_SuaveDebonairText: + text_far _OPT_SuaveDebonairText + text_end + +.OPT_PowerfulText: + text_far _OPT_PowerfulText + text_end + +.OPT_ExcitingText: + text_far _OPT_ExcitingText + text_end + +.OPT_GroovyText: + text_far _OPT_GroovyText + text_end + +.OPT_InspiringText: + text_far _OPT_InspiringText + text_end + +.OPT_FriendlyText: + text_far _OPT_FriendlyText + text_end + +.OPT_HotHotHotText: + text_far _OPT_HotHotHotText + text_end + +.OPT_StimulatingText: + text_far _OPT_StimulatingText + text_end + +.OPT_GuardedText: + text_far _OPT_GuardedText + text_end + +.OPT_LovelyText: + text_far _OPT_LovelyText + text_end + +.OPT_SpeedyText: + text_far _OPT_SpeedyText + text_end + +OaksPKMNTalk10: + farcall RadioMusicRestartPokemonChannel + ld hl, OPT_RestartText + call PrintText + call WaitBGMap + ld hl, OPT_PokemonChannelText + call PrintText + ld a, OAKS_POKEMON_TALK_11 + ld [wCurRadioLine], a + ld a, 100 + ld [wRadioTextDelay], a + ret + +OPT_PokemonChannelText: + text_far _OPT_PokemonChannelText + text_end + +OPT_RestartText: + text_end + +OaksPKMNTalk11: + ld hl, wRadioTextDelay + dec [hl] + ret nz + hlcoord 9, 14 + ld de, .pokemon_string + ld a, OAKS_POKEMON_TALK_12 + jp PlaceRadioString + +.pokemon_string + db "#MON@" + +OaksPKMNTalk12: + ld hl, wRadioTextDelay + dec [hl] + ret nz + hlcoord 1, 16 + ld de, .pokemon_channel_string + ld a, OAKS_POKEMON_TALK_13 + jp PlaceRadioString + +.pokemon_channel_string + db "#MON Channel@" + +OaksPKMNTalk13: + ld hl, wRadioTextDelay + dec [hl] + ret nz + hlcoord 12, 16 + ld de, .terminator + ld a, OAKS_POKEMON_TALK_14 + jp PlaceRadioString + +.terminator + db "@" + +OaksPKMNTalk14: + ld hl, wRadioTextDelay + dec [hl] + ret nz + ld de, MUSIC_POKEMON_TALK + callfar RadioMusicRestartDE + ld hl, .terminator + call PrintText + ld a, OAKS_POKEMON_TALK_4 + ld [wNextRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + ld a, RADIO_SCROLL + ld [wCurRadioLine], a + ld a, 10 + ld [wRadioTextDelay], a + ret + +.terminator + db "@" + +PlaceRadioString: + ld [wCurRadioLine], a + ld a, 100 + ld [wRadioTextDelay], a + jp PlaceString + +CopyBottomLineToTopLine: + hlcoord 0, 15 + decoord 0, 13 + ld bc, SCREEN_WIDTH * 2 + jp CopyBytes + +ClearBottomLine: + hlcoord 1, 15 + ld bc, SCREEN_WIDTH - 2 + ld a, " " + call ByteFill + hlcoord 1, 16 + ld bc, SCREEN_WIDTH - 2 + ld a, " " + jp ByteFill + +PokedexShow1: + call StartRadioStation +.loop + call Random + ld e, a + call Random + and $f + ld d, a + cp HIGH(NUM_POKEMON) + jr c, .ok + jr nz, .loop + ld a, e + cp LOW(NUM_POKEMON) + jr nc, .loop +.ok + inc de + push de + call CheckCaughtMonIndex + pop hl + jr z, .loop + call GetPokemonIDFromIndex + ld [wCurPartySpecies], a + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, PokedexShowText + ld a, POKEDEX_SHOW_2 + jp NextRadioLine + +PokedexShow2: + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + dec hl + ld b, h + ld c, l + add hl, hl + add hl, bc + ld bc, PokedexDataPointerTable + add hl, bc + ld a, BANK(PokedexDataPointerTable) + call GetFarByte + ld b, a + inc hl + ld a, BANK(PokedexDataPointerTable) + call GetFarWord + ld a, b + push af + push hl + call CopyDexEntryPart1 + dec hl + ld [hl], "" + ld hl, wPokedexShowPointerAddr + call CopyRadioTextToRAM + pop hl + pop af + call CopyDexEntryPart2 +rept 4 + inc hl +endr + ld a, l + ld [wPokedexShowPointerAddr], a + ld a, h + ld [wPokedexShowPointerAddr + 1], a + ld a, POKEDEX_SHOW_3 + jp PrintRadioLine + +PokedexShow3: + call CopyDexEntry + ld a, POKEDEX_SHOW_4 + jp PrintRadioLine + +PokedexShow4: + call CopyDexEntry + ld a, POKEDEX_SHOW_5 + jp PrintRadioLine + +PokedexShow5: + call CopyDexEntry + ld a, POKEDEX_SHOW_6 + jp PrintRadioLine + +PokedexShow6: + call CopyDexEntry + ld a, POKEDEX_SHOW_7 + jp PrintRadioLine + +PokedexShow7: + call CopyDexEntry + ld a, POKEDEX_SHOW_8 + jp PrintRadioLine + +PokedexShow8: + call CopyDexEntry + ld a, POKEDEX_SHOW + jp PrintRadioLine + +CopyDexEntry: + ld a, [wPokedexShowPointerAddr] + ld l, a + ld a, [wPokedexShowPointerAddr + 1] + ld h, a + ld a, [wPokedexShowPointerBank] + push af + push hl + call CopyDexEntryPart1 + dec hl + ld [hl], "" + ld hl, wPokedexShowPointerAddr + call CopyRadioTextToRAM + pop hl + pop af + call CopyDexEntryPart2 + ret + +CopyDexEntryPart1: + ld de, wPokedexShowPointerBank + ld bc, SCREEN_WIDTH - 1 + call FarCopyBytes + ld hl, wPokedexShowPointerAddr + ld [hl], TX_START + inc hl + ld [hl], "" + inc hl +.loop + ld a, [hli] + cp "@" + ret z + cp "" + ret z + cp "" + ret z + jr .loop + +CopyDexEntryPart2: + ld d, a +.loop + ld a, d + call GetFarByte + inc hl + cp "@" + jr z, .okay + cp "" + jr z, .okay + cp "" + jr nz, .loop +.okay + ld a, l + ld [wPokedexShowPointerAddr], a + ld a, h + ld [wPokedexShowPointerAddr + 1], a + ld a, d + ld [wPokedexShowPointerBank], a + ret + +PokedexShowText: + text_far _PokedexShowText + text_end + +BenMonMusic1: + call StartPokemonMusicChannel + ld hl, BenIntroText1 + ld a, POKEMON_MUSIC_2 + jp NextRadioLine + +BenMonMusic2: + ld hl, BenIntroText2 + ld a, POKEMON_MUSIC_3 + jp NextRadioLine + +BenMonMusic3: + ld hl, BenIntroText3 + ld a, POKEMON_MUSIC_4 + jp NextRadioLine + +FernMonMusic1: + call StartPokemonMusicChannel + ld hl, FernIntroText1 + ld a, LETS_ALL_SING_2 + jp NextRadioLine + +FernMonMusic2: + ld hl, FernIntroText2 + ld a, POKEMON_MUSIC_4 + jp NextRadioLine + +BenFernMusic4: + ld hl, BenFernText1 + ld a, POKEMON_MUSIC_5 + jp NextRadioLine + +BenFernMusic5: + call GetWeekday + and 1 + ld hl, BenFernText2A + jr z, .SunTueThurSun + ld hl, BenFernText2B +.SunTueThurSun: + ld a, POKEMON_MUSIC_6 + jp NextRadioLine + +BenFernMusic6: + call GetWeekday + and 1 + ld hl, BenFernText3A + jr z, .SunTueThurSun + ld hl, BenFernText3B +.SunTueThurSun: + ld a, POKEMON_MUSIC_7 + jp NextRadioLine + +BenFernMusic7: + ret + +StartPokemonMusicChannel: + call RadioTerminator + call PrintText + ld de, MUSIC_POKEMON_MARCH + call GetWeekday + and 1 + jr z, .SunTueThurSun + ld de, MUSIC_POKEMON_LULLABY +.SunTueThurSun: + callfar RadioMusicRestartDE + ret + +BenIntroText1: + text_far _BenIntroText1 + text_end + +BenIntroText2: + text_far _BenIntroText2 + text_end + +BenIntroText3: + text_far _BenIntroText3 + text_end + +FernIntroText1: + text_far _FernIntroText1 + text_end + +FernIntroText2: + text_far _FernIntroText2 + text_end + +BenFernText1: + text_far _BenFernText1 + text_end + +BenFernText2A: + text_far _BenFernText2A + text_end + +BenFernText2B: + text_far _BenFernText2B + text_end + +BenFernText3A: + text_far _BenFernText3A + text_end + +BenFernText3B: + text_far _BenFernText3B + text_end + +LuckyNumberShow1: + call StartRadioStation + callfar CheckLuckyNumberShowFlag + jr nc, .dontreset + callfar ResetLuckyNumberShowFlag +.dontreset + ld hl, LC_Text1 + ld a, LUCKY_NUMBER_SHOW_2 + jp NextRadioLine + +LuckyNumberShow2: + ld hl, LC_Text2 + ld a, LUCKY_NUMBER_SHOW_3 + jp NextRadioLine + +LuckyNumberShow3: + ld hl, LC_Text3 + ld a, LUCKY_NUMBER_SHOW_4 + jp NextRadioLine + +LuckyNumberShow4: + ld hl, LC_Text4 + ld a, LUCKY_NUMBER_SHOW_5 + jp NextRadioLine + +LuckyNumberShow5: + ld hl, LC_Text5 + ld a, LUCKY_NUMBER_SHOW_6 + jp NextRadioLine + +LuckyNumberShow6: + ld hl, LC_Text6 + ld a, LUCKY_NUMBER_SHOW_7 + jp NextRadioLine + +LuckyNumberShow7: + ld hl, LC_Text7 + ld a, LUCKY_NUMBER_SHOW_8 + jp NextRadioLine + +LuckyNumberShow8: + ld hl, wStringBuffer1 + ld de, wLuckyIDNumber + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + ld a, "@" + ld [wStringBuffer1 + 5], a + ld hl, LC_Text8 + ld a, LUCKY_NUMBER_SHOW_9 + jp NextRadioLine + +LuckyNumberShow9: + ld hl, LC_Text9 + ld a, LUCKY_NUMBER_SHOW_10 + jp NextRadioLine + +LuckyNumberShow10: + ld hl, LC_Text7 + ld a, LUCKY_NUMBER_SHOW_11 + jp NextRadioLine + +LuckyNumberShow11: + ld hl, LC_Text8 + ld a, LUCKY_NUMBER_SHOW_12 + jp NextRadioLine + +LuckyNumberShow12: + ld hl, LC_Text10 + ld a, LUCKY_NUMBER_SHOW_13 + jp NextRadioLine + +LuckyNumberShow13: + ld hl, LC_Text11 + call Random + and a + ld a, LUCKY_CHANNEL + jr nz, .okay + ld a, LUCKY_NUMBER_SHOW_14 +.okay + jp NextRadioLine + +LuckyNumberShow14: + ld hl, LC_DragText1 + ld a, LUCKY_NUMBER_SHOW_15 + jp NextRadioLine + +LuckyNumberShow15: + ld hl, LC_DragText2 + ld a, LUCKY_CHANNEL + jp NextRadioLine + +LC_Text1: + text_far _LC_Text1 + text_end + +LC_Text2: + text_far _LC_Text2 + text_end + +LC_Text3: + text_far _LC_Text3 + text_end + +LC_Text4: + text_far _LC_Text4 + text_end + +LC_Text5: + text_far _LC_Text5 + text_end + +LC_Text6: + text_far _LC_Text6 + text_end + +LC_Text7: + text_far _LC_Text7 + text_end + +LC_Text8: + text_far _LC_Text8 + text_end + +LC_Text9: + text_far _LC_Text9 + text_end + +LC_Text10: + text_far _LC_Text10 + text_end + +LC_Text11: + text_far _LC_Text11 + text_end + +LC_DragText1: + text_far _LC_DragText1 + text_end + +LC_DragText2: + text_far _LC_DragText2 + text_end + +PeoplePlaces1: + call StartRadioStation + ld hl, PnP_Text1 + ld a, PLACES_AND_PEOPLE_2 + jp NextRadioLine + +PeoplePlaces2: + ld hl, PnP_Text2 + ld a, PLACES_AND_PEOPLE_3 + jp NextRadioLine + +PeoplePlaces3: + ld hl, PnP_Text3 + call Random + cp 49 percent - 1 + ld a, PLACES_AND_PEOPLE_4 ; People + jr c, .ok + ld a, PLACES_AND_PEOPLE_6 ; Places +.ok + jp NextRadioLine + +PnP_Text1: + text_far _PnP_Text1 + text_end + +PnP_Text2: + text_far _PnP_Text2 + text_end + +PnP_Text3: + text_far _PnP_Text3 + text_end + +PeoplePlaces4: ; People + call Random + maskbits NUM_TRAINER_CLASSES + inc a + cp NUM_TRAINER_CLASSES ; exclude MYSTICALMAN + jr nc, PeoplePlaces4 + push af + ld hl, PnP_HiddenPeople + ld a, [wStatusFlags] + bit STATUSFLAGS_HALL_OF_FAME_F, a + jr z, .ok + ld hl, PnP_HiddenPeople_BeatE4 + ld a, [wKantoBadges] + cp %11111111 ; all badges + jr nz, .ok + ld hl, PnP_HiddenPeople_BeatKanto +.ok + pop af + ld c, a + ld de, 1 + push bc + call IsInArray + pop bc + jr c, PeoplePlaces4 + push bc + callfar GetTrainerClassName + ld de, wStringBuffer1 + call CopyName1 + pop bc + ld b, 1 + callfar GetTrainerName + ld hl, PnP_Text4 + ld a, PLACES_AND_PEOPLE_5 + jp NextRadioLine + +INCLUDE "data/radio/pnp_hidden_people.asm" + +PnP_Text4: + text_far _PnP_Text4 + text_end + +PeoplePlaces5: + ; 0-15 are all valid indexes into .Adjectives, + ; so no need for a retry loop + call Random + maskbits NUM_PNP_PEOPLE_ADJECTIVES + assert_power_of_2 NUM_PNP_PEOPLE_ADJECTIVES + ld e, a + ld d, 0 + ld hl, .Adjectives + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call Random + cp 4 percent + ld a, PLACES_AND_PEOPLE + jr c, .ok + call Random + cp 49 percent - 1 + ld a, PLACES_AND_PEOPLE_4 ; People + jr c, .ok + ld a, PLACES_AND_PEOPLE_6 ; Places +.ok + jp NextRadioLine + +.Adjectives: + table_width 2, PeoplePlaces5.Adjectives + dw PnP_CuteText + dw PnP_LazyText + dw PnP_HappyText + dw PnP_NoisyText + dw PnP_PrecociousText + dw PnP_BoldText + dw PnP_PickyText + dw PnP_SortOfOKText + dw PnP_SoSoText + dw PnP_GreatText + dw PnP_MyTypeText + dw PnP_CoolText + dw PnP_InspiringText + dw PnP_WeirdText + dw PnP_RightForMeText + dw PnP_OddText + assert_table_length NUM_PNP_PEOPLE_ADJECTIVES + +PnP_CuteText: + text_far _PnP_CuteText + text_end + +PnP_LazyText: + text_far _PnP_LazyText + text_end + +PnP_HappyText: + text_far _PnP_HappyText + text_end + +PnP_NoisyText: + text_far _PnP_NoisyText + text_end + +PnP_PrecociousText: + text_far _PnP_PrecociousText + text_end + +PnP_BoldText: + text_far _PnP_BoldText + text_end + +PnP_PickyText: + text_far _PnP_PickyText + text_end + +PnP_SortOfOKText: + text_far _PnP_SortOfOKText + text_end + +PnP_SoSoText: + text_far _PnP_SoSoText + text_end + +PnP_GreatText: + text_far _PnP_GreatText + text_end + +PnP_MyTypeText: + text_far _PnP_MyTypeText + text_end + +PnP_CoolText: + text_far _PnP_CoolText + text_end + +PnP_InspiringText: + text_far _PnP_InspiringText + text_end + +PnP_WeirdText: + text_far _PnP_WeirdText + text_end + +PnP_RightForMeText: + text_far _PnP_RightForMeText + text_end + +PnP_OddText: + text_far _PnP_OddText + text_end + +PeoplePlaces6: ; Places + call Random + cp (PnP_Places.End - PnP_Places) / 2 + jr nc, PeoplePlaces6 + ld hl, PnP_Places + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld b, [hl] + inc hl + ld c, [hl] + call GetWorldMapLocation + ld e, a + farcall GetLandmarkName + ld hl, PnP_Text5 + ld a, PLACES_AND_PEOPLE_7 + jp NextRadioLine + +INCLUDE "data/radio/pnp_places.asm" + +PnP_Text5: + text_far _PnP_Text5 + text_end + +PeoplePlaces7: + ; 0-15 are all valid indexes into .Adjectives, + ; so no need for a retry loop + call Random + maskbits NUM_PNP_PLACES_ADJECTIVES + assert_power_of_2 NUM_PNP_PLACES_ADJECTIVES + ld e, a + ld d, 0 + ld hl, .Adjectives + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call CopyRadioTextToRAM + call Random + cp 4 percent + ld a, PLACES_AND_PEOPLE + jr c, .ok + call Random + cp 49 percent - 1 + ld a, PLACES_AND_PEOPLE_4 ; People + jr c, .ok + ld a, PLACES_AND_PEOPLE_6 ; Places +.ok + jp PrintRadioLine + +.Adjectives: + table_width 2, PeoplePlaces7.Adjectives + dw PnP_CuteText + dw PnP_LazyText + dw PnP_HappyText + dw PnP_NoisyText + dw PnP_PrecociousText + dw PnP_BoldText + dw PnP_PickyText + dw PnP_SortOfOKText + dw PnP_SoSoText + dw PnP_GreatText + dw PnP_MyTypeText + dw PnP_CoolText + dw PnP_InspiringText + dw PnP_WeirdText + dw PnP_RightForMeText + dw PnP_OddText + assert_table_length NUM_PNP_PLACES_ADJECTIVES + +RocketRadio1: + call StartRadioStation + ld hl, RocketRadioText1 + ld a, ROCKET_RADIO_2 + jp NextRadioLine + +RocketRadio2: + ld hl, RocketRadioText2 + ld a, ROCKET_RADIO_3 + jp NextRadioLine + +RocketRadio3: + ld hl, RocketRadioText3 + ld a, ROCKET_RADIO_4 + jp NextRadioLine + +RocketRadio4: + ld hl, RocketRadioText4 + ld a, ROCKET_RADIO_5 + jp NextRadioLine + +RocketRadio5: + ld hl, RocketRadioText5 + ld a, ROCKET_RADIO_6 + jp NextRadioLine + +RocketRadio6: + ld hl, RocketRadioText6 + ld a, ROCKET_RADIO_7 + jp NextRadioLine + +RocketRadio7: + ld hl, RocketRadioText7 + ld a, ROCKET_RADIO_8 + jp NextRadioLine + +RocketRadio8: + ld hl, RocketRadioText8 + ld a, ROCKET_RADIO_9 + jp NextRadioLine + +RocketRadio9: + ld hl, RocketRadioText9 + ld a, ROCKET_RADIO_10 + jp NextRadioLine + +RocketRadio10: + ld hl, RocketRadioText10 + ld a, ROCKET_RADIO + jp NextRadioLine + +RocketRadioText1: + text_far _RocketRadioText1 + text_end + +RocketRadioText2: + text_far _RocketRadioText2 + text_end + +RocketRadioText3: + text_far _RocketRadioText3 + text_end + +RocketRadioText4: + text_far _RocketRadioText4 + text_end + +RocketRadioText5: + text_far _RocketRadioText5 + text_end + +RocketRadioText6: + text_far _RocketRadioText6 + text_end + +RocketRadioText7: + text_far _RocketRadioText7 + text_end + +RocketRadioText8: + text_far _RocketRadioText8 + text_end + +RocketRadioText9: + text_far _RocketRadioText9 + text_end + +RocketRadioText10: + text_far _RocketRadioText10 + text_end + +PokeFluteRadio: + call StartRadioStation + ld a, 1 + ld [wNumRadioLinesPrinted], a + ret + +UnownRadio: + call StartRadioStation + ld a, 1 + ld [wNumRadioLinesPrinted], a + ret + +EvolutionRadio: + call StartRadioStation + ld a, 1 + ld [wNumRadioLinesPrinted], a + ret + +BuenasPassword1: +; Determine if we need to be here + call BuenasPasswordCheckTime + jp nc, .PlayPassword + ld a, [wNumRadioLinesPrinted] + and a + jp z, BuenasPassword20 + jp BuenasPassword8 + +.PlayPassword: + call StartRadioStation + ldh a, [hBGMapMode] + push af + xor a + ldh [hBGMapMode], a + ld de, BuenasPasswordChannelName + hlcoord 2, 9 + call PlaceString + pop af + ldh [hBGMapMode], a + ld hl, BuenaRadioText1 + ld a, BUENAS_PASSWORD_2 + jp NextRadioLine + +BuenasPassword2: + ld hl, BuenaRadioText2 + ld a, BUENAS_PASSWORD_3 + jp NextRadioLine + +BuenasPassword3: + call BuenasPasswordCheckTime + ld hl, BuenaRadioText3 + jp c, BuenasPasswordAfterMidnight + ld a, BUENAS_PASSWORD_4 + jp NextRadioLine + +BuenasPassword4: + call BuenasPasswordCheckTime + jp c, BuenasPassword8 + ld a, [wBuenasPassword] +; If we already generated the password today, we don't need to generate a new one. + ld hl, wDailyFlags2 + bit DAILYFLAGS2_BUENAS_PASSWORD_F, [hl] + jr nz, .AlreadyGotIt +; There are only 11 groups to choose from. +.greater_than_11 + call Random + maskbits NUM_PASSWORD_CATEGORIES + cp NUM_PASSWORD_CATEGORIES + jr nc, .greater_than_11 +; Store it in the high nybble of e. + swap a + ld e, a +; For each group, choose one of the three passwords. +.greater_than_three + call Random + maskbits NUM_PASSWORDS_PER_CATEGORY + cp NUM_PASSWORDS_PER_CATEGORY + jr nc, .greater_than_three +; The high nybble of wBuenasPassword will now contain the password group index, and the low nybble contains the actual password. + add e + ld [wBuenasPassword], a +; Set the flag so that we don't generate a new password this week. + ld hl, wDailyFlags2 + set DAILYFLAGS2_BUENAS_PASSWORD_F, [hl] +.AlreadyGotIt: + ld c, a + call GetBuenasPassword + ld hl, BuenaRadioText4 + ld a, BUENAS_PASSWORD_5 + jp NextRadioLine + +GetBuenasPassword: +; The password indices are held in c. High nybble contains the group index, low nybble contains the word index. +; Load the password group pointer in hl. + ld a, c + swap a + and $f + ld hl, BuenasPasswordTable + ld d, 0 + ld e, a + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a +; Get the password type and store it in b. + ld a, [hli] + ld b, a + push hl + inc hl +; Get the password index. + ld a, c + and $f + ld c, a + push hl + ld hl, .StringFunctionJumptable + ld e, b + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + pop de ; de now contains the pointer to the value of this week's password, in Blue Card Points. + call _hl_ + pop hl + ld c, [hl] + ret + +.StringFunctionJumptable: +; entries correspond to BUENA_* constants + table_width 2, GetBuenasPassword.StringFunctionJumptable + dw .Mon ; BUENA_MON + dw .Item ; BUENA_ITEM + dw .Move ; BUENA_MOVE + dw .RawString ; BUENA_STRING + assert_table_length NUM_BUENA_FUNCTIONS + +.Mon: + ld h, 0 + ld l, c + add hl, hl + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + call GetPokemonName + ld [wNamedObjectIndex], a + ret + +.Item: + ld h, 0 + ld l, c + add hl, de + ld a, [hl] + ld [wNamedObjectIndex], a + call GetItemName + ret + +.Move: + ld h, 0 + ld l, c + add hl, hl + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call GetMoveIDFromIndex + call GetMoveName + ld [wNamedObjectIndex], a + ret + +.RawString: +; Get the string from the table... + ld a, c + and a + jr z, .skip +.read_loop + ld a, [de] + inc de + cp "@" + jr nz, .read_loop + dec c + jr nz, .read_loop +; ... and copy it into wStringBuffer1. +.skip + ld hl, wStringBuffer1 +.copy_loop + ld a, [de] + inc de + ld [hli], a + cp "@" + jr nz, .copy_loop + ld de, wStringBuffer1 + ret + +INCLUDE "data/radio/buenas_passwords.asm" + +BuenasPassword5: + ld hl, BuenaRadioText5 + ld a, BUENAS_PASSWORD_6 + jp NextRadioLine + +BuenasPassword6: + ld hl, BuenaRadioText6 + ld a, BUENAS_PASSWORD_7 + jp NextRadioLine + +BuenasPassword7: + call BuenasPasswordCheckTime + ld hl, BuenaRadioText7 + jr c, BuenasPasswordAfterMidnight + ld a, BUENAS_PASSWORD + jp NextRadioLine + +BuenasPasswordAfterMidnight: + push hl + ld hl, wDailyFlags2 + res DAILYFLAGS2_BUENAS_PASSWORD_F, [hl] + pop hl + ld a, BUENAS_PASSWORD_8 + jp NextRadioLine + +BuenasPassword8: + ld hl, wDailyFlags2 + res DAILYFLAGS2_BUENAS_PASSWORD_F, [hl] + ld hl, BuenaRadioMidnightText10 + ld a, BUENAS_PASSWORD_9 + jp NextRadioLine + +BuenasPassword9: + ld hl, BuenaRadioMidnightText1 + ld a, BUENAS_PASSWORD_10 + jp NextRadioLine + +BuenasPassword10: + ld hl, BuenaRadioMidnightText2 + ld a, BUENAS_PASSWORD_11 + jp NextRadioLine + +BuenasPassword11: + ld hl, BuenaRadioMidnightText3 + ld a, BUENAS_PASSWORD_12 + jp NextRadioLine + +BuenasPassword12: + ld hl, BuenaRadioMidnightText4 + ld a, BUENAS_PASSWORD_13 + jp NextRadioLine + +BuenasPassword13: + ld hl, BuenaRadioMidnightText5 + ld a, BUENAS_PASSWORD_14 + jp NextRadioLine + +BuenasPassword14: + ld hl, BuenaRadioMidnightText6 + ld a, BUENAS_PASSWORD_15 + jp NextRadioLine + +BuenasPassword15: + ld hl, BuenaRadioMidnightText7 + ld a, BUENAS_PASSWORD_16 + jp NextRadioLine + +BuenasPassword16: + ld hl, BuenaRadioMidnightText8 + ld a, BUENAS_PASSWORD_17 + jp NextRadioLine + +BuenasPassword17: + ld hl, BuenaRadioMidnightText9 + ld a, BUENAS_PASSWORD_18 + jp NextRadioLine + +BuenasPassword18: + ld hl, BuenaRadioMidnightText10 + ld a, BUENAS_PASSWORD_19 + jp NextRadioLine + +BuenasPassword19: + ld hl, BuenaRadioMidnightText10 + ld a, BUENAS_PASSWORD_20 + jp NextRadioLine + +BuenasPassword20: + ldh a, [hBGMapMode] + push af + farcall NoRadioMusic + farcall NoRadioName + pop af + ldh [hBGMapMode], a + ld hl, wDailyFlags2 + res DAILYFLAGS2_BUENAS_PASSWORD_F, [hl] + ld a, BUENAS_PASSWORD + ld [wCurRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + ld hl, BuenaOffTheAirText + ld a, BUENAS_PASSWORD_21 + jp NextRadioLine + +BuenasPassword21: + ld a, BUENAS_PASSWORD + ld [wCurRadioLine], a + xor a + ld [wNumRadioLinesPrinted], a + call BuenasPasswordCheckTime + jp nc, BuenasPassword1 + ld hl, BuenaOffTheAirText + ld a, BUENAS_PASSWORD_21 + jp NextRadioLine + +BuenasPasswordCheckTime: + call UpdateTime + ldh a, [hHours] + cp NITE_HOUR + ret + +BuenasPasswordChannelName: + db "BUENA'S PASSWORD@" + +BuenaRadioText1: + text_far _BuenaRadioText1 + text_end + +BuenaRadioText2: + text_far _BuenaRadioText2 + text_end + +BuenaRadioText3: + text_far _BuenaRadioText3 + text_end + +BuenaRadioText4: + text_far _BuenaRadioText4 + text_end + +BuenaRadioText5: + text_far _BuenaRadioText5 + text_end + +BuenaRadioText6: + text_far _BuenaRadioText6 + text_end + +BuenaRadioText7: + text_far _BuenaRadioText7 + text_end + +BuenaRadioMidnightText1: + text_far _BuenaRadioMidnightText1 + text_end + +BuenaRadioMidnightText2: + text_far _BuenaRadioMidnightText2 + text_end + +BuenaRadioMidnightText3: + text_far _BuenaRadioMidnightText3 + text_end + +BuenaRadioMidnightText4: + text_far _BuenaRadioMidnightText4 + text_end + +BuenaRadioMidnightText5: + text_far _BuenaRadioMidnightText5 + text_end + +BuenaRadioMidnightText6: + text_far _BuenaRadioMidnightText6 + text_end + +BuenaRadioMidnightText7: + text_far _BuenaRadioMidnightText7 + text_end + +BuenaRadioMidnightText8: + text_far _BuenaRadioMidnightText8 + text_end + +BuenaRadioMidnightText9: + text_far _BuenaRadioMidnightText9 + text_end + +BuenaRadioMidnightText10: + text_far _BuenaRadioMidnightText10 + text_end + +BuenaOffTheAirText: + text_far _BuenaOffTheAirText + text_end + +CopyRadioTextToRAM: + ld a, [hl] + cp TX_FAR + jp z, FarCopyRadioText + ld de, wRadioText + ld bc, 2 * SCREEN_WIDTH + jp CopyBytes + +StartRadioStation: + ld a, [wNumRadioLinesPrinted] + and a + ret nz + call RadioTerminator + call PrintText + ld hl, RadioChannelSongs + ld a, [wCurRadioLine] + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + callfar RadioMusicRestartDE + ret + +INCLUDE "data/radio/channel_music.asm" + +NextRadioLine: + push af + call CopyRadioTextToRAM + pop af + jp PrintRadioLine diff --git a/engine/pokegear/townmap_convertlinebreakcharacters.asm b/engine/pokegear/townmap_convertlinebreakcharacters.asm new file mode 100644 index 0000000..a881b92 --- /dev/null +++ b/engine/pokegear/townmap_convertlinebreakcharacters.asm @@ -0,0 +1,21 @@ +TownMap_ConvertLineBreakCharacters: + ld hl, wStringBuffer1 +.loop + ld a, [hl] + cp "@" + jr z, .end + cp "%" + jr z, .line_feed + cp "¯" + jr z, .line_feed + inc hl + jr .loop + +.line_feed + ld [hl], "" + +.end + ld de, wStringBuffer1 + hlcoord 9, 0 + call PlaceString + ret diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm new file mode 100644 index 0000000..240ddb5 --- /dev/null +++ b/engine/pokemon/bills_pc.asm @@ -0,0 +1,2694 @@ +_DepositPKMN: + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + ld a, [wVramState] + push af + xor a + ld [wVramState], a + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + xor a + ldh [hMapAnims], a + call BillsPC_InitRAM + xor a + ld [wBillsPC_LoadedBox], a + call DelayFrame +.loop + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .done + call .RunJumptable + call DelayFrame + jr .loop +.done + call ClearSprites + pop af + ldh [hInMenu], a + pop af + ld [wVramState], a + pop af + ld [wOptions], a + ret + +.RunJumptable: + ld a, [wJumptableIndex] + ld hl, .Jumptable + call BillsPC_Jumptable + jp hl + +.Jumptable: + dw .Init + dw .HandleJoypad + dw .WhatsUp + dw .Submenu + dw BillsPC_EndJumptableLoop + +.Init: + xor a + ldh [hBGMapMode], a + call ClearSprites + call CopyBoxmonSpecies + call BillsPC_BoxName + ld de, PCString_ChooseaPKMN + call BillsPC_PlaceString + ld a, $5 + ld [wBillsPC_NumMonsOnScreen], a + call BillsPC_RefreshTextboxes + call PCMonInfo + ld a, $ff + ld [wCurPartySpecies], a + ld a, SCGB_BILLS_PC + call BillsPC_ApplyPalettes + call WaitBGMap + call BillsPC_UpdateSelectionCursor + call BillsPC_IncrementJumptableIndex + ret + +.HandleJoypad: + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .b_button + ld a, [hl] + and A_BUTTON + jr nz, .a_button + call Withdraw_UpDown + and a + ret z + call BillsPC_UpdateSelectionCursor + xor a + ldh [hBGMapMode], a + call BillsPC_RefreshTextboxes + call PCMonInfo + ld a, $1 + ldh [hBGMapMode], a + call DelayFrame + call DelayFrame + ret + +.a_button + call BillsPC_GetSelectedPokemonSpecies + and a + ret z + cp -1 + jr z, .b_button + ld a, $2 + ld [wJumptableIndex], a + ret + +.go_back ; unreferenced + ld hl, wJumptableIndex + dec [hl] + ret + +.b_button + ld a, $4 + ld [wJumptableIndex], a + ret + +.WhatsUp: + xor a + ldh [hBGMapMode], a + call ClearSprites + call BillsPC_GetSelectedPokemonSpecies + ld [wCurPartySpecies], a + ld a, SCGB_BILLS_PC + call BillsPC_ApplyPalettes + ld de, PCString_WhatsUp + call BillsPC_PlaceString + ld a, $1 + ld [wMenuCursorY], a + call BillsPC_IncrementJumptableIndex + ret + +.Submenu: + ld hl, BillsPCDepositMenuHeader + call CopyMenuHeader + ld a, [wMenuCursorY] + call StoreMenuCursorPosition + call VerticalMenu + jp c, BillsPCDepositFuncCancel + ld a, [wMenuCursorY] + dec a + and %11 + ld e, a + ld d, 0 + ld hl, BillsPCDepositJumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +BillsPCDepositJumptable: + dw BillsPCDepositFuncDeposit ; Deposit Pokemon + dw BillsPCDepositFuncStats ; Pokemon Stats + dw BillsPCDepositFuncRelease ; Release Pokemon + dw BillsPCDepositFuncCancel ; Cancel + +BillsPCDepositFuncDeposit: + call BillsPC_CheckMail_PreventBlackout + jp c, BillsPCDepositFuncCancel + call DepositPokemon + jr c, .box_full + ld a, $0 + ld [wJumptableIndex], a + xor a + ld [wBillsPC_CursorPosition], a + ld [wBillsPC_ScrollPosition], a + ret + +.box_full + ld de, PCString_WhatsUp + call BillsPC_PlaceString + ret + +BillsPCDepositFuncStats: + call LoadStandardMenuHeader + call BillsPC_StatsScreen + call ExitMenu + call PCMonInfo + call BillsPC_GetSelectedPokemonSpecies + ld [wCurPartySpecies], a + ld a, SCGB_BILLS_PC + call BillsPC_ApplyPalettes + ret + +BillsPCDepositFuncRelease: + call BillsPC_CheckMail_PreventBlackout + jr c, BillsPCDepositFuncCancel + call BillsPC_IsMonAnEgg + jr c, BillsPCDepositFuncCancel + ld a, [wMenuCursorY] + push af + ld de, PCString_ReleasePKMN + call BillsPC_PlaceString + call LoadStandardMenuHeader + lb bc, 14, 11 + call PlaceYesNoBox + ld a, [wMenuCursorY] + dec a + call ExitMenu + and a + jr nz, .failed_release + ld a, [wBillsPC_CursorPosition] + ld hl, wBillsPC_ScrollPosition + add [hl] + ld [wCurPartyMon], a + xor a ; REMOVE_PARTY + ld [wPokemonWithdrawDepositParameter], a + farcall RemoveMonFromPartyOrBox + call ReleasePKMN_ByePKMN + ld a, $0 + ld [wJumptableIndex], a + xor a + ld [wBillsPC_CursorPosition], a + ld [wBillsPC_ScrollPosition], a + pop af + ret + +.failed_release + ld de, PCString_WhatsUp + call BillsPC_PlaceString + pop af + ld [wMenuCursorY], a + ret + +BillsPCDepositFuncCancel: + ld a, $0 + ld [wJumptableIndex], a + ret + +BillsPCDepositMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 9, 4, SCREEN_WIDTH - 1, 13 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 4 ; items + db "DEPOSIT@" + db "STATS@" + db "RELEASE@" + db "CANCEL@" + +BillsPCClearThreeBoxes: ; unreferenced + hlcoord 0, 0 + ld b, 4 + ld c, 8 + call ClearBox + hlcoord 0, 4 + ld b, 10 + ld c, 9 + call ClearBox + hlcoord 0, 14 + ld b, 2 + ld c, 8 + call ClearBox + ret + +_WithdrawPKMN: + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + ld a, [wVramState] + push af + xor a + ld [wVramState], a + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + xor a + ldh [hMapAnims], a + call BillsPC_InitRAM + ld a, NUM_BOXES + 1 + ld [wBillsPC_LoadedBox], a + call DelayFrame +.loop + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .done + call .RunJumptable + call DelayFrame + jr .loop +.done + call ClearSprites + pop af + ldh [hInMenu], a + pop af + ld [wVramState], a + pop af + ld [wOptions], a + ret + +.RunJumptable: + ld a, [wJumptableIndex] + ld hl, .Jumptable + call BillsPC_Jumptable + jp hl + +.Jumptable: + dw .Init + dw .Joypad + dw .PrepSubmenu + dw BillsPC_Withdraw + dw BillsPC_EndJumptableLoop + +.Init: + ld a, NUM_BOXES + 1 + ld [wBillsPC_LoadedBox], a + xor a + ldh [hBGMapMode], a + call ClearSprites + call CopyBoxmonSpecies + call BillsPC_BoxName + ld de, PCString_ChooseaPKMN + call BillsPC_PlaceString + ld a, $5 + ld [wBillsPC_NumMonsOnScreen], a + call BillsPC_RefreshTextboxes + call PCMonInfo + ld a, $ff + ld [wCurPartySpecies], a + ld a, SCGB_BILLS_PC + call BillsPC_ApplyPalettes + call WaitBGMap + call BillsPC_UpdateSelectionCursor + call BillsPC_IncrementJumptableIndex + ret + +.Joypad: + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .b_button + ld a, [hl] + and A_BUTTON + jr nz, .a_button + call Withdraw_UpDown + and a + ret z + call BillsPC_UpdateSelectionCursor + xor a + ldh [hBGMapMode], a + call BillsPC_RefreshTextboxes + call PCMonInfo + ld a, $1 + ldh [hBGMapMode], a + call DelayFrame + call DelayFrame + ret +.a_button + call BillsPC_GetSelectedPokemonSpecies + and a + ret z + cp -1 + jr z, .b_button + ld a, $2 + ld [wJumptableIndex], a + ret + +.go_back ; unreferenced + ld hl, wJumptableIndex + dec [hl] + ret + +.b_button + ld a, $4 + ld [wJumptableIndex], a + ret + +.PrepSubmenu: + xor a + ldh [hBGMapMode], a + call ClearSprites + call BillsPC_GetSelectedPokemonSpecies + ld [wCurPartySpecies], a + ld a, SCGB_BILLS_PC + call BillsPC_ApplyPalettes + ld de, PCString_WhatsUp + call BillsPC_PlaceString + ld a, $1 + ld [wMenuCursorY], a + call BillsPC_IncrementJumptableIndex + ret + +BillsPC_Withdraw: + ld hl, .MenuHeader + call CopyMenuHeader + ld a, [wMenuCursorY] + call StoreMenuCursorPosition + call VerticalMenu + jp c, .cancel + ld a, [wMenuCursorY] + dec a + and %11 + ld e, a + ld d, 0 + ld hl, .dw + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.dw + dw .withdraw ; Withdraw + dw .stats ; Stats + dw .release ; Release + dw .cancel ; Cancel + +.withdraw + call BillsPC_CheckMail_PreventBlackout + jp c, .cancel + call TryWithdrawPokemon + jr c, .FailedWithdraw + ld a, $0 + ld [wJumptableIndex], a + xor a + ld [wBillsPC_CursorPosition], a + ld [wBillsPC_ScrollPosition], a + ret +.FailedWithdraw: + ld de, PCString_WhatsUp + call BillsPC_PlaceString + ret + +.stats + call LoadStandardMenuHeader + call BillsPC_StatsScreen + call ExitMenu + call PCMonInfo + call BillsPC_GetSelectedPokemonSpecies + ld [wCurPartySpecies], a + ld a, SCGB_BILLS_PC + call BillsPC_ApplyPalettes + ret + +.release + ld a, [wMenuCursorY] + push af + call BillsPC_IsMonAnEgg + jr c, .FailedRelease + ld de, PCString_ReleasePKMN + call BillsPC_PlaceString + call LoadStandardMenuHeader + lb bc, 14, 11 + call PlaceYesNoBox + ld a, [wMenuCursorY] + dec a + call ExitMenu + and a + jr nz, .FailedRelease + ld a, [wBillsPC_CursorPosition] + ld hl, wBillsPC_ScrollPosition + add [hl] + ld [wCurPartyMon], a + ld a, REMOVE_BOX + ld [wPokemonWithdrawDepositParameter], a + farcall RemoveMonFromPartyOrBox + call ReleasePKMN_ByePKMN + ld a, $0 + ld [wJumptableIndex], a + xor a + ld [wBillsPC_CursorPosition], a + ld [wBillsPC_ScrollPosition], a + pop af + ret +.FailedRelease: + ld de, PCString_WhatsUp + call BillsPC_PlaceString + pop af + ld [wMenuCursorY], a + ret + +.cancel + ld a, $0 + ld [wJumptableIndex], a + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 9, 4, SCREEN_WIDTH - 1, 13 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 4 ; items + db "WITHDRAW@" + db "STATS@" + db "RELEASE@" + db "CANCEL@" + +_MovePKMNWithoutMail: + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + ld a, [wVramState] + push af + xor a + ld [wVramState], a + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + xor a + ldh [hMapAnims], a + call BillsPC_InitRAM + ld a, [wCurBox] + and $f + inc a + ld [wBillsPC_LoadedBox], a + call DelayFrame +.loop + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .done + call .RunJumptable + call DelayFrame + jr .loop + +.done + call ClearSprites + pop af + ldh [hInMenu], a + pop af + ld [wVramState], a + pop af + ld [wOptions], a + ret + +.RunJumptable: + ld a, [wJumptableIndex] + ld hl, .Jumptable + call BillsPC_Jumptable + jp hl + +.Jumptable: + dw .Init + dw .Joypad + dw .PrepSubmenu + dw .MoveMonWOMailSubmenu + dw .PrepInsertCursor + dw .Joypad2 + dw BillsPC_EndJumptableLoop + +.Init: + xor a + ldh [hBGMapMode], a + call ClearSprites + call CopyBoxmonSpecies + ld de, PCString_ChooseaPKMN + call BillsPC_PlaceString + ld a, 5 + ld [wBillsPC_NumMonsOnScreen], a + call BillsPC_RefreshTextboxes + call BillsPC_MoveMonWOMail_BoxNameAndArrows + call PCMonInfo + ld a, $ff + ld [wCurPartySpecies], a + ld a, SCGB_BILLS_PC + call BillsPC_ApplyPalettes + call WaitBGMap + call BillsPC_UpdateSelectionCursor + call BillsPC_IncrementJumptableIndex + ret + +.Joypad: + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .b_button + ld a, [hl] + and A_BUTTON + jr nz, .a_button + call MoveMonWithoutMail_DPad + jr c, .d_pad + and a + ret z + call BillsPC_UpdateSelectionCursor + xor a + ldh [hBGMapMode], a + call BillsPC_RefreshTextboxes + call PCMonInfo + ld a, $1 + ldh [hBGMapMode], a + call DelayFrame + call DelayFrame + ret + +.d_pad + xor a + ld [wBillsPC_CursorPosition], a + ld [wBillsPC_ScrollPosition], a + ld a, $0 + ld [wJumptableIndex], a + ret + +.a_button + call BillsPC_GetSelectedPokemonSpecies + and a + ret z + cp -1 + jr z, .b_button + ld a, $2 + ld [wJumptableIndex], a + ret + +.go_back ; unreferenced + ld hl, wJumptableIndex + dec [hl] + ret + +.b_button + ld a, $6 + ld [wJumptableIndex], a + ret + +.PrepSubmenu: + xor a + ldh [hBGMapMode], a + call ClearSprites + call BillsPC_GetSelectedPokemonSpecies + ld [wCurPartySpecies], a + ld a, SCGB_BILLS_PC + call BillsPC_ApplyPalettes + ld de, PCString_WhatsUp + call BillsPC_PlaceString + ld a, $1 + ld [wMenuCursorY], a + call BillsPC_IncrementJumptableIndex + ret + +.MoveMonWOMailSubmenu: + ld hl, .MenuHeader + call CopyMenuHeader + ld a, [wMenuCursorY] + call StoreMenuCursorPosition + call VerticalMenu + jp c, .Cancel + ld a, [wMenuCursorY] + dec a + and %11 + ld e, a + ld d, 0 + ld hl, .Jumptable2 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable2: + dw .Move + dw .Stats + dw .Cancel + +.Move: + call BillsPC_CheckMail_PreventBlackout + jp c, .Cancel + ld a, [wBillsPC_ScrollPosition] + ld [wBillsPC_BackupScrollPosition], a + ld a, [wBillsPC_CursorPosition] + ld [wBillsPC_BackupCursorPosition], a + ld a, [wBillsPC_LoadedBox] + ld [wBillsPC_BackupLoadedBox], a + ld a, $4 + ld [wJumptableIndex], a + ret + +.Stats: + call LoadStandardMenuHeader + call BillsPC_StatsScreen + call ExitMenu + call PCMonInfo + call BillsPC_GetSelectedPokemonSpecies + ld [wCurPartySpecies], a + ld a, SCGB_BILLS_PC + call BillsPC_ApplyPalettes + ret + +.Cancel: + ld a, $0 + ld [wJumptableIndex], a + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 9, 4, SCREEN_WIDTH - 1, 13 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 3 ; items + db "MOVE@" + db "STATS@" + db "CANCEL@" + +.PrepInsertCursor: + xor a + ldh [hBGMapMode], a + call CopyBoxmonSpecies + ld de, PCString_MoveToWhere + call BillsPC_PlaceString + ld a, $5 + ld [wBillsPC_NumMonsOnScreen], a + call BillsPC_RefreshTextboxes + call BillsPC_MoveMonWOMail_BoxNameAndArrows + call ClearSprites + call BillsPC_UpdateInsertCursor + call WaitBGMap + call BillsPC_IncrementJumptableIndex + ret + +.Joypad2: + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .b_button_2 + ld a, [hl] + and A_BUTTON + jr nz, .a_button_2 + call MoveMonWithoutMail_DPad_2 + jr c, .dpad_2 + and a + ret z + call BillsPC_UpdateInsertCursor + xor a + ldh [hBGMapMode], a + call BillsPC_RefreshTextboxes + ld a, $1 + ldh [hBGMapMode], a + call DelayFrame + call DelayFrame + ret + +.dpad_2 + xor a + ld [wBillsPC_CursorPosition], a + ld [wBillsPC_ScrollPosition], a + ld a, $4 + ld [wJumptableIndex], a + ret + +.a_button_2 + call BillsPC_CheckSpaceInDestination + jr c, .no_space + call MovePKMNWithoutMail_InsertMon + ld a, $0 + ld [wJumptableIndex], a + ret + +.no_space + ld hl, wJumptableIndex + dec [hl] + ret + +.b_button_2 + ld a, [wBillsPC_BackupScrollPosition] + ld [wBillsPC_ScrollPosition], a + ld a, [wBillsPC_BackupCursorPosition] + ld [wBillsPC_CursorPosition], a + ld a, [wBillsPC_BackupLoadedBox] + ld [wBillsPC_LoadedBox], a + ld a, $0 + ld [wJumptableIndex], a + ret + +BillsPC_InitRAM: + call ClearBGPalettes + call ClearSprites + call ClearTilemap + call BillsPC_InitGFX + ld hl, wBillsPCData + ld bc, wBillsPCDataEnd - wBillsPCData + xor a + call ByteFill + xor a + ld [wJumptableIndex], a + ld [wUnusedBillsPCData], a + ld [wUnusedBillsPCData+1], a + ld [wUnusedBillsPCData+2], a + ld [wBillsPC_CursorPosition], a + ld [wBillsPC_ScrollPosition], a + ret + +BillsPC_IncrementJumptableIndex: + ld hl, wJumptableIndex + inc [hl] + ret + +BillsPC_EndJumptableLoop: + ld hl, wJumptableIndex + set 7, [hl] + ret + +_StatsScreenDPad: + ld a, [wBillsPC_NumMonsOnScreen] + ld d, a + ld a, [wBillsPC_NumMonsInBox] + and a + jr z, .empty + dec a + cp $1 + jr z, .empty + ld e, a + ld a, [hl] + and D_UP + jr nz, BillsPC_PressUp + ld a, [hl] + and D_DOWN + jr nz, BillsPC_PressDown +.empty + jp BillsPC_JoypadDidNothing + +Withdraw_UpDown: + ld hl, hJoyLast + ld a, [wBillsPC_NumMonsOnScreen] + ld d, a + ld a, [wBillsPC_NumMonsInBox] + ld e, a + and a + jr z, .empty + ld a, [hl] + and D_UP + jr nz, BillsPC_PressUp + ld a, [hl] + and D_DOWN + jr nz, BillsPC_PressDown +.empty + jp BillsPC_JoypadDidNothing + +MoveMonWithoutMail_DPad: + ld hl, hJoyLast + ld a, [wBillsPC_NumMonsOnScreen] + ld d, a + ld a, [wBillsPC_NumMonsInBox] + ld e, a + and a + jr z, .check_left_right + ld a, [hl] + and D_UP + jr nz, BillsPC_PressUp + ld a, [hl] + and D_DOWN + jr nz, BillsPC_PressDown + +.check_left_right + ld a, [hl] + and D_LEFT + jr nz, BillsPC_PressLeft + ld a, [hl] + and D_RIGHT + jr nz, BillsPC_PressRight + jr BillsPC_JoypadDidNothing + +MoveMonWithoutMail_DPad_2: + ld hl, hJoyLast + ld a, [wBillsPC_NumMonsOnScreen] + ld d, a + ld a, [wBillsPC_NumMonsInBox] + ld e, a + and a + jr z, .check_left_right + + ld a, [hl] + and D_UP + jr nz, BillsPC_PressUp + ld a, [hl] + and D_DOWN + jr nz, BillsPC_PressDown + +.check_left_right + ld a, [hl] + and D_LEFT + jr nz, BillsPC_PressLeft + ld a, [hl] + and D_RIGHT + jr nz, BillsPC_PressRight + jr BillsPC_JoypadDidNothing + +BillsPC_PressUp: + ld hl, wBillsPC_CursorPosition + ld a, [hl] + and a + jr z, .top + dec [hl] + jr BillsPC_UpDownDidSomething + +.top + ld hl, wBillsPC_ScrollPosition + ld a, [hl] + and a + jr z, BillsPC_JoypadDidNothing + dec [hl] + jr BillsPC_UpDownDidSomething + +BillsPC_PressDown: + ld a, [wBillsPC_CursorPosition] + ld hl, wBillsPC_ScrollPosition + add [hl] + inc a + cp e + jr nc, BillsPC_JoypadDidNothing + + ld hl, wBillsPC_CursorPosition + ld a, [hl] + inc a + cp d + jr nc, .not_bottom + inc [hl] + jr BillsPC_UpDownDidSomething + +.not_bottom + ld hl, wBillsPC_ScrollPosition + inc [hl] + jr BillsPC_UpDownDidSomething + +BillsPC_PressLeft: + ld hl, wBillsPC_LoadedBox + ld a, [hl] + and a + jr z, .wrap_around + dec [hl] + jr BillsPC_LeftRightDidSomething + +.wrap_around + ld [hl], NUM_BOXES + jr BillsPC_LeftRightDidSomething + +BillsPC_PressRight: + ld hl, wBillsPC_LoadedBox + ld a, [hl] + cp NUM_BOXES + jr z, .wrap_around + inc [hl] + jr BillsPC_LeftRightDidSomething + +.wrap_around + ld [hl], 0 + jr BillsPC_LeftRightDidSomething + +BillsPC_JoypadDidNothing: + xor a + and a + ret + +BillsPC_UpDownDidSomething: + ld a, TRUE + and a + ret + +BillsPC_LeftRightDidSomething: + scf + ret + +BillsPC_PlaceString: + push de + hlcoord 0, 15 + lb bc, 1, 18 + call Textbox + pop de + hlcoord 1, 16 + call PlaceString + ret + +BillsPC_MoveMonWOMail_BoxNameAndArrows: + call BillsPC_BoxName + hlcoord 8, 1 + ld [hl], $5f + hlcoord 19, 1 + ld [hl], $5e + ret + +BillsPC_BoxName: + hlcoord 8, 0 + lb bc, 1, 10 + call Textbox + + ld a, [wBillsPC_LoadedBox] + and a + jr z, .party + + cp NUM_BOXES + 1 + jr nz, .gotbox + + ld a, [wCurBox] + inc a +.gotbox + dec a + ld hl, wBoxNames + ld bc, BOX_NAME_LENGTH + call AddNTimes + ld e, l + ld d, h + jr .print + +.party + ld de, .PartyPKMN +.print + hlcoord 10, 1 + call PlaceString + ret + +.PartyPKMN: + db "PARTY @" + +PCMonInfo: +; Display a monster's pic and +; attributes when highlighting +; it in a PC menu. + +; Includes the neat cascading +; effect when showing the pic. + +; Example: Species, level, gender, +; whether it's holding an item. + + hlcoord 0, 0 + lb bc, 15, 8 + call ClearBox + + hlcoord 8, 14 + lb bc, 1, 3 + call ClearBox + + call BillsPC_GetSelectedPokemonSpecies + and a + ret z + cp -1 + ret z + + ld [wTempSpecies], a + hlcoord 1, 4 + xor a + ld b, 7 +.row + ld c, 7 + push af + push hl +.col + ld [hli], a + add 7 + dec c + jr nz, .col + pop hl + ld de, SCREEN_WIDTH + add hl, de + pop af + inc a + dec b + jr nz, .row + + call BillsPC_LoadMonStats + ld a, [wTempSpecies] + ld [wCurPartySpecies], a + ld [wCurSpecies], a + ld hl, wTempMonDVs + predef GetUnownLetter + call GetBaseData + ld de, vTiles2 tile $00 + predef GetMonFrontpic + xor a + ld [wBillsPC_MonHasMail], a + ld a, [wCurPartySpecies] + ld [wTempSpecies], a + cp EGG + ret z + + call GetBasePokemonName + hlcoord 1, 14 + call PlaceString + + hlcoord 1, 12 + call PrintLevel + + ld a, TEMPMON + ld [wMonType], a + farcall GetGender + jr c, .skip_gender + ld a, "♂" + jr nz, .printgender + ld a, "♀" +.printgender + hlcoord 5, 12 + ld [hl], a +.skip_gender + + ld a, [wTempMonItem] + and a + ret z + + ld d, a + callfar ItemIsMail + jr c, .mail + ld a, $5d ; item icon + jr .printitem +.mail + ld a, $1 + ld [wBillsPC_MonHasMail], a + ld a, $5c ; mail icon +.printitem + hlcoord 7, 12 + ld [hl], a + ret + +BillsPC_LoadMonStats: + ld a, [wBillsPC_CursorPosition] + ld hl, wBillsPC_ScrollPosition + add [hl] + ld e, a + add a, a + add a, a + ld c, a + ld b, 0 + ld hl, wBillsPCPokemonList + 2 ; box number + add hl, bc + ld a, [hl] + and a + jr z, .party + cp NUM_BOXES + 1 + jr z, .sBox + ld b, a + call GetBoxPointer + ld a, b + call OpenSRAM + push hl + ld bc, sBoxMon1Level - sBox + add hl, bc + ld bc, BOXMON_STRUCT_LENGTH + ld a, e + call AddNTimes + ld a, [hl] + ld [wTempMonLevel], a + pop hl + push hl + ld bc, sBoxMon1Item - sBox + add hl, bc + ld bc, BOXMON_STRUCT_LENGTH + ld a, e + call AddNTimes + ld a, [hl] + ld [wTempMonItem], a + pop hl + ld bc, sBoxMon1DVs - sBox + add hl, bc + ld bc, BOXMON_STRUCT_LENGTH + ld a, e + call AddNTimes + ld de, wTempMonDVs + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + call CloseSRAM + ret + +.party + ld hl, wPartyMon1Level + ld bc, PARTYMON_STRUCT_LENGTH + ld a, e + call AddNTimes + ld a, [hl] + ld [wTempMonLevel], a + ld hl, wPartyMon1Item + ld bc, PARTYMON_STRUCT_LENGTH + ld a, e + call AddNTimes + ld a, [hl] + ld [wTempMonItem], a + ld hl, wPartyMon1DVs + ld bc, PARTYMON_STRUCT_LENGTH + ld a, e + call AddNTimes + ld de, wTempMonDVs + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + ret + +.sBox + ld a, BANK(sBox) + call OpenSRAM + ld hl, sBoxMon1Level + ld bc, BOXMON_STRUCT_LENGTH + ld a, e + call AddNTimes + ld a, [hl] + ld [wTempMonLevel], a + + ld hl, sBoxMon1Item + ld bc, BOXMON_STRUCT_LENGTH + ld a, e + call AddNTimes + ld a, [hl] + ld [wTempMonItem], a + + ld hl, sBoxMon1DVs + ld bc, BOXMON_STRUCT_LENGTH + ld a, e + call AddNTimes + ld de, wTempMonDVs + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + + call CloseSRAM + ret + +BillsPC_RefreshTextboxes: + hlcoord 8, 2 + lb bc, 10, 10 + call Textbox + + hlcoord 8, 2 + ld [hl], "└" + hlcoord 19, 2 + ld [hl], "┘" + + ld a, [wBillsPC_ScrollPosition] + add a, a + add a, a + ld e, a + ld d, 0 + ld hl, wBillsPCPokemonList + add hl, de + ld e, l + ld d, h + hlcoord 9, 4 + ld a, [wBillsPC_NumMonsOnScreen] +.loop + push af + push de + push hl + call .PlaceNickname + pop hl + ld de, 2 * SCREEN_WIDTH + add hl, de + pop de + inc de + inc de + inc de + inc de + pop af + dec a + jr nz, .loop + ret + +.CancelString: + db "CANCEL@" + +.PlaceNickname: + ld a, [de] + ld b, a + inc de + ld a, [de] + cp b + ; both $0000 and $FFFF have two identical bytes, so this check works + jr nz, .get_nickname + and a + ret z + cp -1 + jr nz, .get_nickname + ld de, .CancelString + call PlaceString + ret + +.get_nickname + inc de + ld a, [de] + ld b, a + inc de + ld a, [de] + ld e, a + ld a, b + and a + jr z, .party + cp NUM_BOXES + 1 + jr z, .sBox + push hl + call GetBoxPointer + ld a, b + call OpenSRAM + push hl + ld bc, sBoxMons - sBox + add hl, bc + ld bc, BOXMON_STRUCT_LENGTH + ld a, e + call AddNTimes + ld a, [hl] + pop hl + and a + jr z, .boxfail + ld bc, sBoxMonNicknames - sBox + add hl, bc + ld bc, MON_NAME_LENGTH + ld a, e + call AddNTimes + ld de, wStringBuffer1 + ld bc, MON_NAME_LENGTH + call CopyBytes + call CloseSRAM + pop hl + ld de, wStringBuffer1 + call PlaceString + ret + +.boxfail + call CloseSRAM + pop hl + jr .placeholder_string + +.party + push hl + ld hl, wPartySpecies + ld d, $0 + add hl, de + ld a, [hl] + and a + jr z, .partyfail + ld hl, wPartyMonNicknames + ld bc, MON_NAME_LENGTH + ld a, e + call AddNTimes + ld de, wStringBuffer1 + ld bc, MON_NAME_LENGTH + call CopyBytes + pop hl + ld de, wStringBuffer1 + call PlaceString + ret + +.partyfail + pop hl + jr .placeholder_string + +.sBox + push hl + ld a, BANK(sBox) + call OpenSRAM + ld hl, sBoxSpecies + ld d, $0 + add hl, de + ld a, [hl] + and a + jr z, .sBoxFail + ld hl, sBoxMonNicknames + ld bc, MON_NAME_LENGTH + ld a, e + call AddNTimes + ld de, wStringBuffer1 + ld bc, MON_NAME_LENGTH + call CopyBytes + call CloseSRAM + pop hl + ld de, wStringBuffer1 + call PlaceString + ret + +.sBoxFail + call CloseSRAM + pop hl +.placeholder_string + ld de, .Placeholder + call PlaceString + ret + +.Placeholder: + db "-----@" + +CopyBoxmonSpecies: + xor a + ld hl, wBillsPCPokemonList + ld bc, 4 * 30 + push hl + call ByteFill + pop hl + ld a, [wBillsPC_LoadedBox] + ld b, a + ld c, 0 + and a + jr z, .party + cp NUM_BOXES + 1 + jr z, .sBox + + push bc + push hl + call GetBoxPointer + ld a, b + call OpenSRAM + inc hl + ld d, h + ld e, l + pop hl + pop bc +.box_loop + ld a, [de] + inc de + cp -1 + jr z, .box_done + push hl + ld hl, EGG + cp l + call nz, BillsPC_GetSpeciesIndexForBoxSlot + ld a, h + ldh [hTemp], a + ld a, l + pop hl + ld [hli], a + ldh a, [hTemp] + ld [hli], a + ld a, b + ld [hli], a + ld a, c + ld [hli], a + inc c + jr .box_loop + +.box_done + call CloseSRAM ;preserves af +.list_done + ; expects a = $FF + ld [hli], a + ld [hl], a + ld a, c + inc a + ld [wBillsPC_NumMonsInBox], a + ret + +.sBox + ld a, BANK(sBox) + call OpenSRAM + ld de, sBoxSpecies + call .load_list + jp CloseSRAM + +.party + ld de, wPartySpecies +.load_list + ld a, [de] + cp -1 + jr z, .list_done + inc de + push hl + call GetPokemonIndexFromID + ld a, h + ldh [hTemp], a + ld a, l + pop hl + ld [hli], a + ldh a, [hTemp] + ld [hli], a + ld a, b + ld [hli], a + ld a, c + ld [hli], a + inc c + jr .load_list + +BillsPC_GetSpeciesIndexForBoxSlot: + ; in: b: box, c: slot + ; out: hl: species + ; preserves bc, de + push bc + push de + dec b + ld a, c + ld c, b + ld b, a + farcall GetBoxMonPokemonIndexPointer + ldh a, [hSRAMBank] + ld c, a + ld a, b + call OpenSRAM + ld a, [hli] + ld h, [hl] + ld l, a + ld a, c + call OpenSRAM + pop de + pop bc + ret + +BillsPC_GetSelectedPokemonSpecies: + ld a, [wBillsPC_CursorPosition] + ld hl, wBillsPC_ScrollPosition + add [hl] + add a, a + add a, a + ld e, a + ld d, 0 + ld hl, wBillsPCPokemonList + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp GetPokemonIDFromIndex + +BillsPC_UpdateSelectionCursor: + ld a, [wBillsPC_NumMonsInBox] + and a + jr nz, .place_cursor + call ClearSprites + ret + +.place_cursor + ld hl, .OAM + ld de, wShadowOAMSprite00 +.loop + ld a, [hl] + cp -1 + ret z + ld a, [wBillsPC_CursorPosition] + and $7 + swap a + add [hl] + inc hl + ld [de], a ; y + inc de +rept SPRITEOAMSTRUCT_LENGTH - 1 + ld a, [hli] + ld [de], a + inc de +endr + jr .loop + +.OAM: + dbsprite 10, 4, 0, 6, $00, 0 + dbsprite 11, 4, 0, 6, $00, 0 + dbsprite 12, 4, 0, 6, $00, 0 + dbsprite 13, 4, 0, 6, $00, 0 + dbsprite 14, 4, 0, 6, $00, 0 + dbsprite 15, 4, 0, 6, $00, 0 + dbsprite 16, 4, 0, 6, $00, 0 + dbsprite 17, 4, 0, 6, $00, 0 + dbsprite 18, 4, 0, 6, $00, 0 + dbsprite 18, 4, 7, 6, $00, 0 + dbsprite 10, 7, 0, 1, $00, 0 | Y_FLIP + dbsprite 11, 7, 0, 1, $00, 0 | Y_FLIP + dbsprite 12, 7, 0, 1, $00, 0 | Y_FLIP + dbsprite 13, 7, 0, 1, $00, 0 | Y_FLIP + dbsprite 14, 7, 0, 1, $00, 0 | Y_FLIP + dbsprite 15, 7, 0, 1, $00, 0 | Y_FLIP + dbsprite 16, 7, 0, 1, $00, 0 | Y_FLIP + dbsprite 17, 7, 0, 1, $00, 0 | Y_FLIP + dbsprite 18, 7, 0, 1, $00, 0 | Y_FLIP + dbsprite 18, 7, 7, 1, $00, 0 | Y_FLIP + dbsprite 9, 5, 6, 6, $01, 0 + dbsprite 9, 6, 6, 1, $01, 0 | Y_FLIP + dbsprite 19, 5, 1, 6, $01, 0 | X_FLIP + dbsprite 19, 6, 1, 1, $01, 0 | X_FLIP | Y_FLIP + db -1 + +BillsPC_UpdateInsertCursor: + ld hl, .OAM + ld de, wShadowOAMSprite00 +.loop + ld a, [hl] + cp -1 + ret z + ld a, [wBillsPC_CursorPosition] + and $7 + swap a + add [hl] + inc hl + ld [de], a ; y + inc de +rept SPRITEOAMSTRUCT_LENGTH - 1 + ld a, [hli] + ld [de], a + inc de +endr + jr .loop + +.OAM: + dbsprite 10, 4, 0, 7, $06, 0 + dbsprite 11, 5, 0, 3, $00, 0 | Y_FLIP + dbsprite 12, 5, 0, 3, $00, 0 | Y_FLIP + dbsprite 13, 5, 0, 3, $00, 0 | Y_FLIP + dbsprite 14, 5, 0, 3, $00, 0 | Y_FLIP + dbsprite 15, 5, 0, 3, $00, 0 | Y_FLIP + dbsprite 16, 5, 0, 3, $00, 0 | Y_FLIP + dbsprite 17, 5, 0, 3, $00, 0 | Y_FLIP + dbsprite 18, 5, 0, 3, $00, 0 | Y_FLIP + dbsprite 19, 4, 0, 7, $07, 0 + db -1 + +BillsPC_FillBox: ; unreferenced +.row + push bc + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + ret + +BillsPC_CheckSpaceInDestination: +; If moving within a box, no need to be here. + ld hl, wBillsPC_LoadedBox + ld a, [wBillsPC_BackupLoadedBox] + cp [hl] + jr z, .same_box + +; Exceeding box or party capacity is a big no-no. + ld a, [wBillsPC_LoadedBox] + and a + jr z, .party + ld e, MONS_PER_BOX + 1 + jr .compare + +.party + ld e, PARTY_LENGTH + 1 +.compare + ld a, [wBillsPC_NumMonsInBox] + cp e + jr nc, .no_room +.same_box + and a + ret + +.no_room + ld de, PCString_TheresNoRoom + call BillsPC_PlaceString + ld de, SFX_WRONG + call WaitPlaySFX + call WaitSFX + ld c, 50 + call DelayFrames + scf + ret + +BillsPC_CheckMail_PreventBlackout: + ld a, [wBillsPC_LoadedBox] + and a + jr nz, .Okay + ld a, [wBillsPC_NumMonsInBox] + cp $3 + jr c, .ItsYourLastPokemon + ld a, [wBillsPC_CursorPosition] + ld hl, wBillsPC_ScrollPosition + add [hl] + ld [wCurPartyMon], a + farcall CheckCurPartyMonFainted + jr c, .AllOthersFainted + ld a, [wBillsPC_MonHasMail] + and a + jr nz, .HasMail +.Okay: + and a + ret + +.HasMail: + ld de, PCString_RemoveMail + jr .NotOkay + +.AllOthersFainted: + ld de, PCString_NoMoreUsablePKMN + jr .NotOkay + +.ItsYourLastPokemon: + ld de, PCString_ItsYourLastPKMN +.NotOkay: + call BillsPC_PlaceString + ld de, SFX_WRONG + call WaitPlaySFX + call WaitSFX + ld c, 50 + call DelayFrames + scf + ret + +BillsPC_IsMonAnEgg: + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + and a + ret + +.egg + ld de, PCString_NoReleasingEGGS + call BillsPC_PlaceString + ld de, SFX_WRONG + call WaitPlaySFX + call WaitSFX + ld c, 50 + call DelayFrames + scf + ret + +BillsPC_StatsScreen: + call LowVolume + call BillsPC_CopyMon + ld a, TEMPMON + ld [wMonType], a + predef StatsScreenInit + call BillsPC_InitGFX + call MaxVolume + ret + +StatsScreenDPad: + ld hl, hJoyPressed + ld a, [hl] + and A_BUTTON | B_BUTTON | D_RIGHT | D_LEFT + ld [wMenuJoypad], a + jr nz, .pressed_a_b_right_left + ld a, [hl] + and D_DOWN | D_UP + ld [wMenuJoypad], a + jr nz, .pressed_down_up + jr .pressed_a_b_right_left + +.pressed_down_up + call _StatsScreenDPad + and a + jr z, .did_nothing + call BillsPC_GetSelectedPokemonSpecies + ld [wTempSpecies], a + call BillsPC_LoadMonStats + ld a, [wTempSpecies] + ld [wCurPartySpecies], a + ld [wCurSpecies], a + ld hl, wTempMonDVs + predef GetUnownLetter + call GetBaseData + call BillsPC_CopyMon +.pressed_a_b_right_left + ret + +.did_nothing + xor a + ld [wMenuJoypad], a + ret + +BillsPC_CopyMon: + ld a, [wBillsPC_CursorPosition] + ld hl, wBillsPC_ScrollPosition + add [hl] + ld [wCurPartyMon], a + ld a, [wBillsPC_LoadedBox] + and a + jr z, .party + cp NUM_BOXES + 1 + jr nz, .box + ld a, BANK(sBox) + call OpenSRAM + ld hl, sBoxSpecies + call CopySpeciesToTemp + ld hl, sBoxMonNicknames + call CopyNicknameToTemp + ld hl, sBoxMonOTs + call CopyOTNameToTemp + ld hl, sBoxMons + ld bc, BOXMON_STRUCT_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld de, wBufferMon + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + call CloseSRAM + farcall CalcBufferMonStats + ret + +.party + ld hl, wPartySpecies + call CopySpeciesToTemp + ld hl, wPartyMonNicknames + call CopyNicknameToTemp + ld hl, wPartyMonOTs + call CopyOTNameToTemp + ld hl, wPartyMon1 + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld de, wBufferMon + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + ret + +.box + ld b, a + ld a, [wCurPartyMon] + ld c, a + call BillsPC_GetSpeciesIndexForBoxSlot + call GetPokemonIDFromIndex + ld [wCurPartySpecies], a + ld l, LOCKED_MON_ID_CURRENT_MENU + call LockPokemonID + call GetBoxPointer + ld a, b + call OpenSRAM + push hl + ld bc, sBoxMonNicknames - sBox + add hl, bc + call CopyNicknameToTemp + pop hl + push hl + ld bc, sBoxMonOTs - sBox + add hl, bc + call CopyOTNameToTemp + pop hl + ld bc, sBoxMons - sBox + add hl, bc + ld bc, BOXMON_STRUCT_LENGTH + call CopyMonToTemp + call CloseSRAM + ld a, LOCKED_MON_ID_CURRENT_MENU + call GetLockedPokemonID + ld [wBufferMonSpecies], a + ld hl, wBufferMon + call BillsPC_ConvertBoxMonToPartyMon + farcall CalcBufferMonStats + ret + +DepositPokemon: + ld a, [wBillsPC_CursorPosition] + ld hl, wBillsPC_ScrollPosition + add [hl] + ld [wCurPartyMon], a + ld hl, wPartyMonNicknames + ld a, [wCurPartyMon] + call GetNickname + ld a, PC_DEPOSIT + ld [wPokemonWithdrawDepositParameter], a + predef SendGetMonIntoFromBox + jr c, .BoxFull + xor a ; REMOVE_PARTY + ld [wPokemonWithdrawDepositParameter], a + farcall RemoveMonFromPartyOrBox + ld a, [wCurPartySpecies] + call PlayMonCry + hlcoord 0, 0 + lb bc, 15, 8 + call ClearBox + hlcoord 8, 14 + lb bc, 1, 3 + call ClearBox + hlcoord 0, 15 + lb bc, 1, 18 + call Textbox + call WaitBGMap + hlcoord 1, 16 + ld de, PCString_Stored + call PlaceString + ld l, c + ld h, b + ld de, wStringBuffer1 + call PlaceString + ld a, "!" + ld [bc], a + ld c, 50 + call DelayFrames + and a + ret + +.BoxFull: + ld de, PCString_BoxFull + call BillsPC_PlaceString + ld de, SFX_WRONG + call WaitPlaySFX + call WaitSFX + ld c, 50 + call DelayFrames + scf + ret + +TryWithdrawPokemon: + ld a, [wBillsPC_CursorPosition] + ld hl, wBillsPC_ScrollPosition + add [hl] + ld [wCurPartyMon], a + ld a, BANK(sBoxMonNicknames) + call OpenSRAM + ld a, [wCurPartyMon] + ld hl, sBoxMonNicknames + call GetNickname + call CloseSRAM + xor a + ld [wPokemonWithdrawDepositParameter], a + predef SendGetMonIntoFromBox + jr c, .PartyFull + ld a, REMOVE_BOX + ld [wPokemonWithdrawDepositParameter], a + farcall RemoveMonFromPartyOrBox + ld a, [wCurPartySpecies] + call PlayMonCry + hlcoord 0, 0 + lb bc, 15, 8 + call ClearBox + hlcoord 8, 14 + lb bc, 1, 3 + call ClearBox + hlcoord 0, 15 + lb bc, 1, 18 + call Textbox + call WaitBGMap + hlcoord 1, 16 + ld de, PCString_Got + call PlaceString + ld l, c + ld h, b + ld de, wStringBuffer1 + call PlaceString + ld a, "!" + ld [bc], a + ld c, 50 + call DelayFrames + and a + ret + +.PartyFull: + ld de, PCString_PartyFull + call BillsPC_PlaceString + ld de, SFX_WRONG + call WaitPlaySFX + call WaitSFX + ld c, 50 + call DelayFrames + scf + ret + +ReleasePKMN_ByePKMN: + hlcoord 0, 0 + lb bc, 15, 8 + call ClearBox + hlcoord 8, 14 + lb bc, 1, 3 + call ClearBox + hlcoord 0, 15 + lb bc, 1, 18 + call Textbox + + call WaitBGMap + ld a, [wCurPartySpecies] + call GetCryIndex + jr c, .skip_cry + ld e, c + ld d, b + call PlayCry +.skip_cry + + ld a, [wCurPartySpecies] + ld [wTempSpecies], a + call GetPokemonName + hlcoord 1, 16 + ld de, PCString_ReleasedPKMN + call PlaceString + ld c, 80 + call DelayFrames + hlcoord 0, 15 + lb bc, 1, 18 + call Textbox + hlcoord 1, 16 + ld de, PCString_Bye + call PlaceString + ld l, c + ld h, b + inc hl + ld de, wStringBuffer1 + call PlaceString + ld l, c + ld h, b + ld [hl], "!" + ld c, 50 + call DelayFrames + ret + +MovePKMNWithoutMail_InsertMon: + push hl + push de + push bc + push af + hlcoord 0, 15 + lb bc, 1, 18 + call Textbox + hlcoord 1, 16 + ld de, .Saving_LeaveOn + call PlaceString + pop af + pop bc + pop de + pop hl + ld a, [wCurBox] + push af + ld bc, 0 + ld a, [wBillsPC_BackupLoadedBox] + and a + jr nz, .moving_from_box + set 0, c + +.moving_from_box + ld a, [wBillsPC_LoadedBox] + and a + jr nz, .moving_to_box + set 1, c + +.moving_to_box + ld hl, .Jumptable + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .dw_return + push de + jp hl + +.dw_return + pop af + ld e, a + farcall MoveMonWOMail_InsertMon_SaveGame + ret + +.Saving_LeaveOn: + db "Saving… Leave ON!@" + +.Jumptable: + dw .BoxToBox + dw .PartyToBox + dw .BoxToParty + dw .PartyToParty + +.BoxToBox: + ld hl, wBillsPC_BackupLoadedBox + ld a, [wBillsPC_LoadedBox] + cp [hl] + jr z, .same_box + call .CopyFromBox + call .CopyToBox + ret + +.same_box + call .CopyFromBox + call .CheckTrivialMove + call .CopyToBox + ret + +.PartyToBox: + call .CopyFromParty + ld a, $1 + ld [wGameLogicPaused], a + farcall SaveGameData + xor a + ld [wGameLogicPaused], a + call .CopyToBox + ret + +.BoxToParty: + call .CopyFromBox + call .CopyToParty + ret + +.PartyToParty: + call .CopyFromParty + call .CheckTrivialMove + call .CopyToParty + ret + +.CheckTrivialMove: + ld a, [wBillsPC_CursorPosition] + ld hl, wBillsPC_ScrollPosition + add [hl] + ld e, a + ld a, [wBillsPC_BackupCursorPosition] + ld hl, wBillsPC_BackupScrollPosition + add [hl] + cp e + ret nc + ld hl, wBillsPC_CursorPosition + ld a, [hl] + and a + jr z, .top_of_screen + dec [hl] + ret + +.top_of_screen + ld hl, wBillsPC_ScrollPosition + ld a, [hl] + and a + ret z + dec [hl] + ret + +.CopyFromBox: + ld a, [wBillsPC_BackupLoadedBox] + dec a + ld e, a + farcall MoveMonWOMail_SaveGame + ld a, [wBillsPC_BackupCursorPosition] + ld hl, wBillsPC_BackupScrollPosition + add [hl] + ld [wCurPartyMon], a + ld a, BANK(sBox) + call OpenSRAM + ld hl, sBoxSpecies + call CopySpeciesToTemp + ld hl, sBoxMonNicknames + call CopyNicknameToTemp + ld hl, sBoxMonOTs + call CopyOTNameToTemp + ld hl, sBoxMons + ld bc, BOXMON_STRUCT_LENGTH + call CopyMonToTemp + call CloseSRAM + farcall CalcBufferMonStats + ld a, REMOVE_BOX + ld [wPokemonWithdrawDepositParameter], a + farcall RemoveMonFromPartyOrBox + ret + +.CopyToBox: + ld a, [wBillsPC_LoadedBox] + dec a + ld e, a + farcall MoveMonWOMail_SaveGame + ld a, [wBillsPC_CursorPosition] + ld hl, wBillsPC_ScrollPosition + add [hl] + ld [wCurPartyMon], a + farcall InsertPokemonIntoBox + ret + +.CopyFromParty: + ld a, [wBillsPC_BackupCursorPosition] + ld hl, wBillsPC_BackupScrollPosition + add [hl] + ld [wCurPartyMon], a + ld hl, wPartySpecies + call CopySpeciesToTemp + ld hl, wPartyMonNicknames + call CopyNicknameToTemp + ld hl, wPartyMonOTs + call CopyOTNameToTemp + ld hl, wPartyMon1Species + ld bc, PARTYMON_STRUCT_LENGTH + call CopyMonToTemp + xor a ; REMOVE_PARTY + ld [wPokemonWithdrawDepositParameter], a + farcall RemoveMonFromPartyOrBox + ret + +.CopyToParty: + ld a, [wBillsPC_CursorPosition] + ld hl, wBillsPC_ScrollPosition + add [hl] + ld [wCurPartyMon], a + farcall InsertPokemonIntoParty + ret + +CopySpeciesToTemp: + ld a, [wCurPartyMon] + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ld [wCurPartySpecies], a + ld l, LOCKED_MON_ID_CURRENT_MENU + jp LockPokemonID + +CopyNicknameToTemp: + ld bc, MON_NAME_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld de, wBufferMonNickname + ld bc, MON_NAME_LENGTH + call CopyBytes + ret + +CopyOTNameToTemp: + ld bc, NAME_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld de, wBufferMonOT + ld bc, NAME_LENGTH + call CopyBytes + ret + +CopyMonToTemp: + ld a, [wCurPartyMon] + call AddNTimes + ld de, wBufferMon + call CopyBytes + ret + +GetBoxPointer: + dec b + ld c, b + ld b, 0 + ld hl, .BoxBankAddresses + add hl, bc + add hl, bc + add hl, bc + ld a, [hli] + ld b, a + ld a, [hli] + ld h, [hl] + ld l, a + ret + +.BoxBankAddresses: + table_width 3, GetBoxPointer.BoxBankAddresses +for n, 1, NUM_BOXES + 1 + dba sBox{d:n} +endr + assert_table_length NUM_BOXES + +BillsPC_ApplyPalettes: + ld b, a + call GetSGBLayout + ld a, %11100100 + call DmgToCgbBGPals + ld a, %11111100 + call DmgToCgbObjPal0 + ret + +BillsPC_Jumptable: + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ret + +BillsPC_InitGFX: + call DisableLCD + ld hl, vTiles2 tile $00 + ld bc, $31 tiles + xor a + call ByteFill + call LoadStandardFont + call LoadFontsBattleExtra + ld hl, PCMailGFX + ld de, vTiles2 tile $5c + ld bc, 4 tiles + call CopyBytes + ld hl, PCSelectLZ + ld de, vTiles0 tile $00 + call Decompress + ld a, 6 + call SkipMusic + call EnableLCD + ret + +PCSelectLZ: INCBIN "gfx/pc/pc.2bpp.lz" +PCMailGFX: INCBIN "gfx/pc/pc_mail.2bpp" + +PCString_ChooseaPKMN: db "Choose a .@" +PCString_WhatsUp: db "What's up?@" +PCString_ReleasePKMN: db "Release ?@" +PCString_MoveToWhere: db "Move to where?@" +PCString_ItsYourLastPKMN: db "It's your last !@" +PCString_TheresNoRoom: db "There's no room!@" +PCString_NoMoreUsablePKMN: db "No more usable !@" +PCString_RemoveMail: db "Remove MAIL.@" +PCString_ReleasedPKMN: db "Released .@" +PCString_Bye: db "Bye,@" +PCString_Stored: db "Stored @" +PCString_Got: db "Got @" +PCString_Non: db "Non.@" ; unreferenced +PCString_BoxFull: db "The BOX is full.@" +PCString_PartyFull: db "The party's full!@" +PCString_NoReleasingEGGS: db "No releasing EGGS!@" + +_ChangeBox: + call LoadStandardMenuHeader + call BillsPC_ClearTilemap +.loop + xor a + ldh [hBGMapMode], a + call BillsPC_PrintBoxName + call BillsPC_PlaceChooseABoxString + ld hl, _ChangeBox_MenuHeader + call CopyMenuHeader + xor a + ld [wMenuScrollPosition], a + hlcoord 0, 4 + lb bc, 8, 9 + call Textbox + call ScrollingMenu + ld a, [wMenuJoypad] + cp B_BUTTON + jr z, .done + call BillsPC_PlaceWhatsUpString + call BillsPC_ChangeBoxSubmenu + jr .loop +.done + call CloseWindow + ret + +BillsPC_ClearTilemap: + xor a + ldh [hBGMapMode], a + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, " " + call ByteFill + ret + +_ChangeBox_MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 1, 5, 9, 12 + dw .MenuData + db 1 ; default option + +.MenuData: + db SCROLLINGMENU_CALL_FUNCTION3_NO_SWITCH | SCROLLINGMENU_ENABLE_FUNCTION3 ; flags + db 4, 0 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dba .Boxes + dba .PrintBoxNames + dba NULL + dba BillsPC_PrintBoxCountAndCapacity + +.Boxes: + db NUM_BOXES +for x, NUM_BOXES + db x + 1 +endr + db -1 + +.PrintBoxNames: + push de + ld a, [wMenuSelection] + dec a + call GetBoxName + pop hl + call PlaceString + ret + +GetBoxName: + ld bc, BOX_NAME_LENGTH + ld hl, wBoxNames + call AddNTimes + ld d, h + ld e, l + ret + +BillsPC_PrintBoxCountAndCapacity: + hlcoord 11, 7 + lb bc, 5, 7 + call Textbox + ld a, [wMenuSelection] + cp -1 + ret z + hlcoord 12, 9 + ld de, .Pokemon + call PlaceString + call GetBoxCount + ld [wTextDecimalByte], a + hlcoord 13, 11 + ld de, wTextDecimalByte + lb bc, 1, 2 + call PrintNum + ld de, .OutOf20 + call PlaceString + ret + +.Pokemon: + db "#MON@" + +.OutOf20: + db "/{d:MONS_PER_BOX}@" ; "/20@" + +GetBoxCount: + ld a, [wCurBox] + ld c, a + ld a, [wMenuSelection] + dec a + cp c + jr z, .activebox + ld c, a + ld b, 0 + ld hl, .BoxBankAddresses + add hl, bc + add hl, bc + add hl, bc + ld a, [hli] + ld b, a + call OpenSRAM + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hl] + call CloseSRAM + ld c, a + ld a, [wSavedAtLeastOnce] + and a + jr z, .newfile + ld a, c + ret + +.newfile + xor a + ret + +.activebox + ld a, BANK(sBoxCount) + ld b, a + call OpenSRAM + ld hl, sBoxCount + ld a, [hl] + call CloseSRAM + ret + +.BoxBankAddresses: + table_width 3, GetBoxCount.BoxBankAddresses +for n, 1, NUM_BOXES + 1 + dba sBox{d:n} +endr + assert_table_length NUM_BOXES + +BillsPC_PrintBoxName: + hlcoord 0, 0 + ld b, 2 + ld c, 18 + call Textbox + hlcoord 1, 2 + ld de, .Current + call PlaceString + ld a, [wCurBox] + and $f + call GetBoxName + hlcoord 11, 2 + call PlaceString + ret + +.Current: + db "CURRENT@" + +BillsPC_ChangeBoxSubmenu: + ld hl, .MenuHeader + call LoadMenuHeader + call VerticalMenu + call ExitMenu + ret c + ld a, [wMenuCursorY] + cp $1 + jr z, .Switch + cp $2 + jr z, .Name + cp $3 + jr z, .Print + and a + ret + +.Print: + call GetBoxCount + and a + jr z, .EmptyBox + ld e, l + ld d, h + ld a, [wMenuSelection] + dec a + ld c, a + farcall PrintPCBox + call BillsPC_ClearTilemap + and a + ret + +.EmptyBox: + call BillsPC_PlaceEmptyBoxString_SFX + and a + ret + +.Switch: + ld a, [wMenuSelection] + dec a + ld e, a + ld a, [wCurBox] + cp e + ret z + farcall ChangeBoxSaveGame + ret + +.Name: + ld b, NAME_BOX + ld de, wBoxNameBuffer + farcall NamingScreen + call ClearTilemap + call LoadStandardFont + call LoadFontsBattleExtra + ld a, [wMenuSelection] + dec a + call GetBoxName + ld e, l + ld d, h + ld hl, wBoxNameBuffer + ld c, BOX_NAME_LENGTH - 1 + call InitString + ld a, [wMenuSelection] + dec a + call GetBoxName + ld de, wBoxNameBuffer + call CopyName2 + ret + + hlcoord 11, 7 ; unreferenced + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 11, 4, SCREEN_WIDTH - 1, 13 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 4 ; items + db "SWITCH@" + db "NAME@" + db "PRINT@" + db "QUIT@" + +BillsPC_PlaceChooseABoxString: + ld de, .ChooseABox + jr BillsPC_PlaceChangeBoxString + +.ChooseABox: + db "Choose a BOX.@" + +BillsPC_PlaceWhatsUpString: + ld de, .WhatsUp + jr BillsPC_PlaceChangeBoxString + +.WhatsUp: + db "What's up?@" + +BillsPC_PlaceEmptyBoxString_SFX: + ld de, .NoMonString + call BillsPC_PlaceChangeBoxString + ld de, SFX_WRONG + call WaitPlaySFX + call WaitSFX + ld c, 50 + call DelayFrames + ret + +.NoMonString: + db "There's no #MON.@" + +BillsPC_PlaceChangeBoxString: + push de + hlcoord 0, 14 + lb bc, 2, 18 + call Textbox + pop de + hlcoord 1, 16 + call PlaceString + ld a, $1 + ldh [hBGMapMode], a + ret + +BillsPC_ConvertBoxData:: + ; converts data in an entire box of mons from party to box or vice-versa + ; in: b:de: box address (SRAM), c: conversion direction (0: party to box, 1: box to party) + ; out: all clobbered + ld a, b + call OpenSRAM + ld a, [de] + and a + jr z, .done + cp MONS_PER_BOX + 1 + jr nc, .done ;don't corrupt the data any further + ld b, a + ld hl, MONS_PER_BOX + 2 + add hl, de + ld de, BOXMON_STRUCT_LENGTH +.loop + bit 0, c + call .convert + add hl, de + dec b + jr nz, .loop +.done + jp CloseSRAM + +.convert + jr nz, BillsPC_ConvertBoxMonToPartyMon + ; fallthrough + +BillsPC_ConvertPartyMonToBoxMon: + ; converts 8-bit IDs in the party mon struct's moves into 14-bit indexes, storing the overflow bits in the PP count + ; in: hl: struct pointer + ; out: hl, bc, de: preserved + push hl + push de + push bc + call BillsPC_SetUpMoveAndPPPointers +.loop + ld a, [bc] + call GetMoveIndexFromID + ld a, l + ld [bc], a + inc bc + ld a, [de] + and $c0 + or h + ld [de], a + inc de + ld hl, hTemp + dec [hl] + jr nz, .loop + pop bc + pop de + pop hl + ret + +BillsPC_ConvertBoxMonToPartyMon: + ; undoes the conversion from the previous function and fully restores the PP of the mon + push hl + push de + push bc + call BillsPC_SetUpMoveAndPPPointers +.loop + ld a, [bc] + ld l, a + ld a, [de] + and $3f + ld h, a + cp $3f + jr nz, .ok + ld h, $ff +.ok + call GetMoveIDFromIndex + ld [bc], a + inc bc + and a + jr z, .got_PP + ld l, a + ld a, MOVE_PP + call GetMoveAttribute + ; max PP = base PP + min(7, base PP / 5) * PP Ups + ld h, a + ld l, -1 +.pp_up_size_loop + inc l + sub 5 + jr nc, .pp_up_size_loop + ld a, l + cp 8 + jr c, .pp_up_size_OK + ld l, 7 +.pp_up_size_OK + ld a, [de] + and $c0 + or h + ld h, a + bit 6, h + jr z, .skip_add_one + add a, l +.skip_add_one + add hl, hl ; if the top bit is set, it sets carry; it will also double l + jr nc, .got_PP + add a, l +.got_PP + ld [de], a + inc de + ld hl, hTemp + dec [hl] + jr nz, .loop + pop bc + pop de + pop hl + ret + +BillsPC_SetUpMoveAndPPPointers: + ld de, MON_MOVES + add hl, de + ld b, h + ld c, l + ld e, MON_PP - MON_MOVES + add hl, de + ld d, h + ld e, l + ld a, NUM_MOVES + ldh [hTemp], a + ret diff --git a/engine/pokemon/bills_pc_top.asm b/engine/pokemon/bills_pc_top.asm new file mode 100644 index 0000000..512de22 --- /dev/null +++ b/engine/pokemon/bills_pc_top.asm @@ -0,0 +1,266 @@ +_BillsPC: + call .CheckCanUsePC + ret c + call .LogIn + call .UseBillsPC + jp .LogOut + +.CheckCanUsePC: + ld a, [wPartyCount] + and a + ret nz + ld hl, .PCGottaHavePokemonText + call MenuTextboxBackup + scf + ret + +.PCGottaHavePokemonText: + text_far _PCGottaHavePokemonText + text_end + +.LogIn: + xor a + ldh [hBGMapMode], a + call LoadStandardMenuHeader + call ClearPCItemScreen + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + ld hl, .PCWhatText + call PrintText + pop af + ld [wOptions], a + call LoadFontsBattleExtra + ret + +.PCWhatText: + text_far _PCWhatText + text_end + +.LogOut: + call CloseSubmenu + ret + +.UseBillsPC: + call .clear_current_reserved_mon + ld hl, .MenuHeader + call LoadMenuHeader + ld a, $1 +.loop + ld [wMenuCursorPosition], a + call SetPalettes + xor a + ld [wWhichIndexSet], a + ldh [hBGMapMode], a + call DoNthMenu + jr c, .cancel + ld a, [wMenuCursorPosition] + push af + ld a, [wMenuSelection] + ld hl, .Jumptable + rst JumpTable + pop bc + ld a, b + jr nc, .loop +.cancel + call CloseWindow +.clear_current_reserved_mon + ld l, LOCKED_MON_ID_CURRENT_MENU + xor a + jp LockPokemonID + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 0 ; items + dw .items + dw PlaceMenuStrings + dw .strings + +.strings + db "WITHDRAW @" + db "DEPOSIT @" + db "CHANGE BOX@" + db "MOVE W/O MAIL@" + db "SEE YA!@" + +.Jumptable: + dw BillsPC_WithdrawMenu + dw BillsPC_DepositMenu + dw BillsPC_ChangeBoxMenu + dw BillsPC_MovePKMNMenu + dw BillsPC_SeeYa + +.items + db 5 ; # items + db 0 ; WITHDRAW + db 1 ; DEPOSIT + db 2 ; CHANGE BOX + db 3 ; MOVE PKMN + db 4 ; SEE YA! + db -1 + +BillsPC_SeeYa: + scf + ret + +BillsPC_MovePKMNMenu: + call LoadStandardMenuHeader + farcall IsAnyMonHoldingMail + jr nc, .no_mail + ld hl, .PCMonHoldingMailText + call PrintText + jr .quit + +.no_mail + farcall StartMoveMonWOMail_SaveGame + jr c, .quit + farcall _MovePKMNWithoutMail + call ReturnToMapFromSubmenu + call ClearPCItemScreen + +.quit + call CloseWindow + and a + ret + +.PCMonHoldingMailText: + text_far _PCMonHoldingMailText + text_end + +BillsPC_DepositMenu: + call LoadStandardMenuHeader + farcall _DepositPKMN + call ReturnToMapFromSubmenu + call ClearPCItemScreen + call CloseWindow + and a + ret + +BillsPC_Deposit_CheckPartySize: ; unreferenced + ld a, [wPartyCount] + and a + jr z, .no_mon + cp 2 + jr c, .only_one_mon + and a + ret + +.no_mon + ld hl, .PCNoSingleMonText + call MenuTextboxBackup + scf + ret + +.only_one_mon + ld hl, .PCCantDepositLastMonText + call MenuTextboxBackup + scf + ret + +.PCNoSingleMonText: + text_far _PCNoSingleMonText + text_end + +.PCCantDepositLastMonText: + text_far _PCCantDepositLastMonText + text_end + +CheckCurPartyMonFainted: + ld hl, wPartyMon1HP + ld de, PARTYMON_STRUCT_LENGTH + ld b, $0 +.loop + ld a, [wCurPartyMon] + cp b + jr z, .skip + ld a, [hli] + or [hl] + jr nz, .notfainted + dec hl + +.skip + inc b + ld a, [wPartyCount] + cp b + jr z, .done + add hl, de + jr .loop + +.done + scf + ret + +.notfainted + and a + ret + +BillsPC_WithdrawMenu: + call LoadStandardMenuHeader + farcall _WithdrawPKMN + call ReturnToMapFromSubmenu + call ClearPCItemScreen + call CloseWindow + and a + ret + +BillsPC_Withdraw_CheckPartySize: ; unreferenced + ld a, [wPartyCount] + cp PARTY_LENGTH + jr nc, .party_full + and a + ret + +.party_full + ld hl, PCCantTakeText + call MenuTextboxBackup + scf + ret + +PCCantTakeText: + text_far _PCCantTakeText + text_end + +BillsPC_ChangeBoxMenu: + farcall _ChangeBox + and a + ret + +ClearPCItemScreen: + call DisableSpriteUpdates + xor a + ldh [hBGMapMode], a + call ClearBGPalettes + call ClearSprites + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + ld a, " " + call ByteFill + hlcoord 0, 0 + lb bc, 10, 18 + call Textbox + hlcoord 0, 12 + lb bc, 4, 18 + call Textbox + call WaitBGMap2 + call SetPalettes ; load regular palettes? + ret + +CopyBoxmonToTempMon: + ld a, [wCurPartyMon] + ld hl, sBoxMon1Species + ld bc, BOXMON_STRUCT_LENGTH + call AddNTimes + ld de, wTempMonSpecies + ld bc, BOXMON_STRUCT_LENGTH + ld a, BANK(sBoxMon1Species) + call OpenSRAM + call CopyBytes + call CloseSRAM + ret diff --git a/engine/pokemon/breeding.asm b/engine/pokemon/breeding.asm new file mode 100644 index 0000000..3bb88a1 --- /dev/null +++ b/engine/pokemon/breeding.asm @@ -0,0 +1,993 @@ +CheckBreedmonCompatibility: + call .CheckBreedingGroupCompatibility + ld c, $0 + jp nc, .done + ld a, [wBreedMon1Species] + ld [wCurPartySpecies], a + ld a, [wBreedMon1DVs] + ld [wTempMonDVs], a + ld a, [wBreedMon1DVs + 1] + ld [wTempMonDVs + 1], a + ld a, TEMPMON + ld [wMonType], a + predef GetGender + jr c, .genderless + ld b, $1 + jr nz, .breedmon2 + inc b + +.breedmon2 + push bc + ld a, [wBreedMon2Species] + ld [wCurPartySpecies], a + ld a, [wBreedMon2DVs] + ld [wTempMonDVs], a + ld a, [wBreedMon2DVs + 1] + ld [wTempMonDVs + 1], a + ld a, TEMPMON + ld [wMonType], a + predef GetGender + pop bc + jr c, .genderless + ld a, $1 + jr nz, .compare_gender + inc a + +.compare_gender + cp b + jr nz, .compute + +.genderless + ld hl, DITTO + call GetPokemonIDFromIndex + ld b, a + ld c, $0 + ld a, [wBreedMon1Species] + cp b + jr z, .ditto1 + ld a, [wBreedMon2Species] + cp b + jr nz, .done + jr .compute + +.ditto1 + ld a, [wBreedMon2Species] + cp b + jr z, .done + +.compute + call .CheckDVs + ld c, 255 + jp z, .done + ld a, [wBreedMon2Species] + ld b, a + ld a, [wBreedMon1Species] + cp b + ld c, 254 + jr z, .compare_ids + ld c, 128 +.compare_ids + ; Speed up + ld a, [wBreedMon1ID] + ld b, a + ld a, [wBreedMon2ID] + cp b + jr nz, .done + ld a, [wBreedMon1ID + 1] + ld b, a + ld a, [wBreedMon2ID + 1] + cp b + jr nz, .done + ld a, c + sub 77 + ld c, a + +.done + ld a, c + ld [wBreedingCompatibility], a + ret + +.CheckDVs: +; If Defense DVs match and the lower 3 bits of the Special DVs match, +; avoid breeding + ld a, [wBreedMon1DVs] + and %1111 + ld b, a + ld a, [wBreedMon2DVs] + and %1111 + cp b + ret nz + ld a, [wBreedMon1DVs + 1] + and %111 + ld b, a + ld a, [wBreedMon2DVs + 1] + and %111 + cp b + ret + +.CheckBreedingGroupCompatibility: +; If either mon is in the No Eggs group, +; they are not compatible. + ld a, [wBreedMon2Species] + ld [wCurSpecies], a + call GetBaseData + ld a, [wBaseEggGroups] + cp EGG_NONE * $11 + jr z, .Incompatible + + ld a, [wBreedMon1Species] + ld [wCurSpecies], a + call GetBaseData + ld a, [wBaseEggGroups] + cp EGG_NONE * $11 + jr z, .Incompatible + +; Ditto is automatically compatible with everything. +; If not Ditto, load the breeding groups into b/c and d/e. + ld hl, DITTO + call GetPokemonIDFromIndex + ld d, a + ld a, [wBreedMon2Species] + cp d + jr z, .Compatible + ld [wCurSpecies], a + call GetBaseData + ld a, [wBaseEggGroups] + push af + and $f + ld b, a + pop af + and $f0 + swap a + ld c, a + + ld a, [wBreedMon1Species] + cp d + jr z, .Compatible + ld [wCurSpecies], a + push bc + call GetBaseData + pop bc + ld a, [wBaseEggGroups] + push af + and $f + ld d, a + pop af + and $f0 + swap a + ld e, a + + ld a, d + cp b + jr z, .Compatible + cp c + jr z, .Compatible + + ld a, e + cp b + jr z, .Compatible + cp c + jr z, .Compatible + +.Incompatible: + and a + ret + +.Compatible: + scf + ret + +DoEggStep:: + ld de, wPartySpecies + ld hl, wPartyMon1Happiness + ld c, 0 +.loop + ld a, [de] + inc de + cp -1 + ret z + cp EGG + jr nz, .next + dec [hl] + jr nz, .next + ld a, 1 + and a + ret + +.next + push de + ld de, PARTYMON_STRUCT_LENGTH + add hl, de + pop de + jr .loop + +OverworldHatchEgg:: + call RefreshScreen + call LoadStandardMenuHeader + call HatchEggs + call ExitAllMenus + call RestartMapMusic + jp CloseText + +HatchEggs: + ld de, wPartySpecies + ld hl, wPartyMon1Happiness + xor a + ld [wCurPartyMon], a + +.loop + ld a, [de] + inc de + cp -1 + jp z, .done + push de + push hl + cp EGG + jp nz, .next + ld a, [hl] + and a + jp nz, .next + ld [hl], $78 + + push de + + farcall SetEggMonCaughtData + farcall StubbedTrainerRankings_EggsHatched + ld a, [wCurPartyMon] + ld hl, wPartyMon1Species + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld a, [hl] + ld [wCurPartySpecies], a + call SetSeenAndCaughtMon + + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld a, l + sub LOW(TOGEPI) + if HIGH(TOGEPI) == 0 + or h + else + jr nz, .nottogepi + if HIGH(TOGEPI) == 1 + dec h + else + ld a, h + cp HIGH(TOGEPI) + endc + endc + jr nz, .nottogepi + ; set the event flag for hatching togepi + ld de, EVENT_TOGEPI_HATCHED + ld b, SET_FLAG + call EventFlagAction +.nottogepi + + pop de + + ld a, [wCurPartySpecies] + dec de + ld [de], a + ld [wNamedObjectIndex], a + ld [wCurSpecies], a + call GetPokemonName + xor a + ld [wUnusedEggHatchFlag], a + call GetBaseData + ld a, [wCurPartyMon] + ld hl, wPartyMon1 + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + push hl + ld bc, MON_MAXHP + add hl, bc + ld d, h + ld e, l + pop hl + push hl + ld bc, MON_LEVEL + add hl, bc + ld a, [hl] + ld [wCurPartyLevel], a + pop hl + push hl + ld bc, MON_STATUS + add hl, bc + xor a + ld [hli], a + ld [hl], a + pop hl + push hl + ld bc, MON_STAT_EXP - 1 + add hl, bc + ld b, FALSE + predef CalcMonStats + pop bc + ld hl, MON_MAXHP + add hl, bc + ld d, h + ld e, l + ld hl, MON_HP + add hl, bc + ld a, [de] + inc de + ld [hli], a + ld a, [de] + ld [hl], a + ld hl, MON_ID + add hl, bc + ld a, [wPlayerID] + ld [hli], a + ld a, [wPlayerID + 1] + ld [hl], a + ld a, [wCurPartyMon] + ld hl, wPartyMonOTs + ld bc, NAME_LENGTH + call AddNTimes + ld d, h + ld e, l + ld hl, wPlayerName + call CopyBytes + ld hl, .Text_HatchEgg + call PrintText + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames + ld bc, MON_NAME_LENGTH + call AddNTimes + ld d, h + ld e, l + push de + ld hl, .BreedAskNicknameText + call PrintText + call YesNoBox + pop de + jr c, .nonickname + + ld a, TRUE + ld [wUnusedEggHatchFlag], a + xor a + ld [wMonType], a + push de + ld b, NAME_MON + farcall NamingScreen + pop hl + ld de, wStringBuffer1 + call InitName + jr .next + +.nonickname + ld hl, wStringBuffer1 + ld bc, MON_NAME_LENGTH + call CopyBytes + +.next + ld hl, wCurPartyMon + inc [hl] + pop hl + ld de, PARTYMON_STRUCT_LENGTH + add hl, de + pop de + jp .loop + +.done + ret + +.Text_HatchEgg: + ; Huh? @ @ + text_far Text_BreedHuh + text_asm + ld hl, wVramState + res 0, [hl] + push hl + push de + push bc + ld a, [wCurPartySpecies] + push af + call EggHatch_AnimationSequence + ld hl, .BreedClearboxText + call PrintText + pop af + ld [wCurPartySpecies], a + pop bc + pop de + pop hl + ld hl, .BreedEggHatchText + ret + +.BreedClearboxText: + text_far _BreedClearboxText + text_end + +.BreedEggHatchText: + text_far _BreedEggHatchText + text_end + +.BreedAskNicknameText: + text_far _BreedAskNicknameText + text_end + +InitEggMoves: + call GetHeritableMoves + ld d, h + ld e, l + ld b, NUM_MOVES +.loop + ld a, [de] + and a + jr z, .done + ld hl, wEggMonMoves + ld c, NUM_MOVES +.next + ld a, [de] + cp [hl] + jr z, .skip + inc hl + dec c + jr nz, .next + call GetEggMove + jr nc, .skip + call LoadEggMove + +.skip + inc de + dec b + jr nz, .loop + +.done + ret + +GetEggMove: + push bc + push de + call GetBreedmonMovePointer + ld b, NUM_MOVES + ld a, [de] + ld c, a +.breedmon_loop + ld a, [hli] + and a + jr z, .not_breedmon + cp c + jr z, .breedmon_found + dec b + jr nz, .breedmon_loop +.not_breedmon + + ld a, c + call GetMoveIndexFromID + ld d, h + ld e, l +.not_learnset_move + ld a, [wEggMonSpecies] + call GetPokemonIndexFromID + ld b, h + ld c, l + ld hl, EggMovePointers + ld a, BANK(EggMovePointers) + call LoadDoubleIndirectPointer +.egg_move_loop + push hl + call GetFarWord + ld a, h + and l + ld c, a + ld a, h + cp d + jr nz, .no_egg_match + ld a, l + cp e +.no_egg_match + pop hl + jr z, .is_egg_move + inc hl + inc hl + ld a, b + inc c + jr nz, .egg_move_loop + + ld bc, TMHMMoves +.tmhm_loop + ld a, BANK(TMHMMoves) + ld h, b + ld l, c + call GetFarWord + ld a, h + and l + jr z, .done + inc bc + inc bc + ld a, h + cp d + jr nz, .tmhm_loop + ld a, l + cp e + jr nz, .tmhm_loop + pop de + ld a, [de] + push de + ld [wPutativeTMHMMove], a + predef CanLearnTMHMMove + xor a + cp c ;will carry if non-zero + jr .done + +.breedmon_found + call GetMoveIndexFromID + ld d, h + ld e, l + ld a, [wEggMonSpecies] + call GetPokemonIndexFromID + ld b, h + ld c, l + ld hl, EvosAttacksPointers + ld a, BANK(EvosAttacksPointers) + call LoadDoubleIndirectPointer + call FarSkipEvolutions +.learnset_loop + ld a, b + call GetFarByte + inc hl + and a + jr z, .not_learnset_move + push hl + call GetFarWord + ld a, l + cp e + ld a, h + pop hl + inc hl + inc hl + jr nz, .learnset_loop + cp d + jr nz, .learnset_loop +.is_egg_move + scf +.done + pop de + pop bc + ret + +LoadEggMove: + push de + push bc + ld a, [de] + ld b, a + ld hl, wEggMonMoves + ld c, NUM_MOVES +.loop + ld a, [hli] + and a + jr z, .done + dec c + jr nz, .loop + ld de, wEggMonMoves + ld hl, wEggMonMoves + 1 + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + +.done + dec hl + ld [hl], b + ld hl, wEggMonMoves + ld de, wEggMonPP + predef FillPP + pop bc + pop de + ret + +GetHeritableMoves: + ld hl, DITTO + call GetPokemonIDFromIndex + ld b, a + ld hl, wBreedMon2Moves + ld a, [wBreedMon1Species] + cp b + jr z, .ditto1 + ld a, [wBreedMon2Species] + cp b + jr z, .ditto2 + ld a, [wBreedMotherOrNonDitto] + and a + ret z + ld hl, wBreedMon1Moves + ret + +.ditto1 + ld a, [wCurPartySpecies] + push af + ld a, [wBreedMon2Species] + ld [wCurPartySpecies], a + ld a, [wBreedMon2DVs] + ld [wTempMonDVs], a + ld a, [wBreedMon2DVs + 1] + ld [wTempMonDVs + 1], a + ld a, TEMPMON + ld [wMonType], a + predef GetGender + jr c, .inherit_mon2_moves + jr nz, .inherit_mon2_moves + jr .inherit_mon1_moves + +.ditto2 + ld a, [wCurPartySpecies] + push af + ld a, [wBreedMon1Species] + ld [wCurPartySpecies], a + ld a, [wBreedMon1DVs] + ld [wTempMonDVs], a + ld a, [wBreedMon1DVs + 1] + ld [wTempMonDVs + 1], a + ld a, TEMPMON + ld [wMonType], a + predef GetGender + jr c, .inherit_mon1_moves + jr nz, .inherit_mon1_moves + +.inherit_mon2_moves + ld hl, wBreedMon2Moves + pop af + ld [wCurPartySpecies], a + ret + +.inherit_mon1_moves + ld hl, wBreedMon1Moves + pop af + ld [wCurPartySpecies], a + ret + +GetBreedmonMovePointer: + ld hl, DITTO + call GetPokemonIDFromIndex + ld b, a + ld hl, wBreedMon1Moves + ld a, [wBreedMon1Species] + cp b + ret z + ld a, [wBreedMon2Species] + cp b + jr z, .ditto + ld a, [wBreedMotherOrNonDitto] + and a + ret z + +.ditto + ld hl, wBreedMon2Moves + ret + +GetEggFrontpic: +; BUG: A hatching Unown egg would not show the right letter (see docs/bugs_and_glitches.md) + push de + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call GetBaseData + ld hl, wBattleMonDVs + predef GetUnownLetter + pop de + predef_jump GetMonFrontpic + +GetHatchlingFrontpic: + push de + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call GetBaseData + ld hl, wBattleMonDVs + predef GetUnownLetter + pop de + predef_jump GetAnimatedFrontpic + +Hatch_UpdateFrontpicBGMapCenter: + push af + call WaitTop + push hl + push bc + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + ld a, " " + call ByteFill + pop bc + pop hl + ld a, b + ldh [hBGMapAddress + 1], a + ld a, c + ldh [hGraphicStartTile], a + lb bc, 7, 7 + predef PlaceGraphic + pop af + call Hatch_LoadFrontpicPal + call SetPalettes + jp WaitBGMap + +EggHatch_DoAnimFrame: + push hl + push de + push bc + callfar PlaySpriteAnimations + call DelayFrame + pop bc + pop de + pop hl + ret + +EggHatch_AnimationSequence: + ld a, [wNamedObjectIndex] + ld [wJumptableIndex], a + ld a, [wCurSpecies] + push af + ld de, MUSIC_NONE + call PlayMusic + farcall BlankScreen + call DisableLCD + ld hl, EggHatchGFX + ld de, vTiles0 tile $00 + ld bc, 2 tiles + ld a, BANK(EggHatchGFX) + call FarCopyBytes + farcall ClearSpriteAnims + ld de, vTiles2 tile $00 + ld a, [wJumptableIndex] + call GetHatchlingFrontpic + ld de, vTiles2 tile $31 + ld a, EGG + call GetEggFrontpic + ld de, MUSIC_EVOLUTION + call PlayMusic + call EnableLCD + hlcoord 7, 4 + ld b, HIGH(vBGMap0) + ld c, $31 ; Egg tiles start here + ld a, EGG + call Hatch_UpdateFrontpicBGMapCenter + ld c, 80 + call DelayFrames + xor a + ld [wFrameCounter], a + ldh a, [hSCX] + ld b, a +.outerloop + ld hl, wFrameCounter + ld a, [hl] + inc [hl] + cp 8 + jr nc, .done + ld e, [hl] +.loop +; wobble e times + ld a, 2 + ldh [hSCX], a + ld a, -2 + ld [wGlobalAnimXOffset], a + call EggHatch_DoAnimFrame + ld c, 2 + call DelayFrames + ld a, -2 + ldh [hSCX], a + ld a, 2 + ld [wGlobalAnimXOffset], a + call EggHatch_DoAnimFrame + ld c, 2 + call DelayFrames + dec e + jr nz, .loop + ld c, 16 + call DelayFrames + call EggHatch_CrackShell + jr .outerloop + +.done + ld de, SFX_EGG_HATCH + call PlaySFX + xor a + ldh [hSCX], a + ld [wGlobalAnimXOffset], a + call ClearSprites + call Hatch_InitShellFragments + hlcoord 6, 3 + ld b, HIGH(vBGMap0) + ld c, $00 ; Hatchling tiles start here + ld a, [wJumptableIndex] + call Hatch_UpdateFrontpicBGMapCenter + call Hatch_ShellFragmentLoop + call WaitSFX + ld a, [wJumptableIndex] + ld [wCurPartySpecies], a + hlcoord 6, 3 + ld d, $0 + ld e, ANIM_MON_HATCH + predef AnimateFrontpic + pop af + ld [wCurSpecies], a + ret + +Hatch_LoadFrontpicPal: + ld [wPlayerHPPal], a + ld b, SCGB_EVOLUTION + ld c, $0 + jp GetSGBLayout + +EggHatch_CrackShell: + ld a, [wFrameCounter] + dec a + and $7 + cp $7 + ret z + srl a + ret nc + swap a + srl a + add 9 * 8 + 4 + ld d, a + ld e, 11 * 8 + ld a, SPRITE_ANIM_INDEX_EGG_CRACK + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], $0 + ld de, SFX_EGG_CRACK + jp PlaySFX + +EggHatchGFX: +INCBIN "gfx/evo/egg_hatch.2bpp" + +Hatch_InitShellFragments: + farcall ClearSpriteAnims + ld hl, .SpriteData +.loop + ld a, [hli] + cp -1 + jr z, .done + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + push hl + push bc + + ld a, SPRITE_ANIM_INDEX_EGG_HATCH + call InitSpriteAnimStruct + + ld hl, SPRITEANIMSTRUCT_TILE_ID + add hl, bc + ld [hl], $0 + + pop de + ld a, e + ld hl, SPRITEANIMSTRUCT_FRAMESET_ID + add hl, bc + add [hl] + ld [hl], a + + ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX + add hl, bc + ld [hl], d + + pop hl + jr .loop +.done + ld de, SFX_EGG_HATCH + call PlaySFX + call EggHatch_DoAnimFrame + ret + +MACRO shell_fragment +; 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: + shell_fragment 10, 4, 9, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $3c + shell_fragment 11, 4, 9, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_2, $04 + shell_fragment 10, 4, 10, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $30 + shell_fragment 11, 4, 10, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_2, $10 + shell_fragment 10, 4, 11, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_3, $24 + shell_fragment 11, 4, 11, 0, SPRITE_ANIM_FRAMESET_EGG_HATCH_4, $1c + shell_fragment 10, 0, 9, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_1, $36 + shell_fragment 12, 0, 9, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_2, $0a + shell_fragment 10, 0, 10, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_3, $2a + shell_fragment 12, 0, 10, 4, SPRITE_ANIM_FRAMESET_EGG_HATCH_4, $16 + db -1 + +Hatch_ShellFragmentLoop: + ld c, 129 +.loop + call EggHatch_DoAnimFrame + dec c + jr nz, .loop + ret + +DayCareMon1: + ld hl, LeftWithDayCareManText + call PrintText + ld a, [wBreedMon1Species] + call PlayMonCry + ld a, [wDayCareLady] + bit DAYCARELADY_HAS_MON_F, a + jr z, DayCareMonCursor + call PromptButton + ld hl, wBreedMon2Nickname + call DayCareMonCompatibilityText + jp PrintText + +DayCareMon2: + ld hl, LeftWithDayCareLadyText + call PrintText + ld a, [wBreedMon2Species] + call PlayMonCry + ld a, [wDayCareMan] + bit DAYCAREMAN_HAS_MON_F, a + jr z, DayCareMonCursor + call PromptButton + ld hl, wBreedMon1Nickname + call DayCareMonCompatibilityText + jp PrintText + +DayCareMonCursor: + jp WaitPressAorB_BlinkCursor + +LeftWithDayCareLadyText: + text_far _LeftWithDayCareLadyText + text_end + +LeftWithDayCareManText: + text_far _LeftWithDayCareManText + text_end + +DayCareMonCompatibilityText: + push bc + ld de, wStringBuffer1 + ld bc, NAME_LENGTH + call CopyBytes + call CheckBreedmonCompatibility + pop bc + ld a, [wBreedingCompatibility] + ld hl, .BreedBrimmingWithEnergyText + cp -1 + jr z, .done + ld hl, .BreedNoInterestText + and a + jr z, .done + ld hl, .BreedAppearsToCareForText + cp 230 + jr nc, .done + cp 70 + ld hl, .BreedFriendlyText + jr nc, .done + ld hl, .BreedShowsInterestText + +.done + ret + +.BreedBrimmingWithEnergyText: + text_far _BreedBrimmingWithEnergyText + text_end + +.BreedNoInterestText: + text_far _BreedNoInterestText + text_end + +.BreedAppearsToCareForText: + text_far _BreedAppearsToCareForText + text_end + +.BreedFriendlyText: + text_far _BreedFriendlyText + text_end + +.BreedShowsInterestText: + text_far _BreedShowsInterestText + text_end + +DayCareMonPrintEmptyString: ; unreferenced + ld hl, .string + ret + +.string + db "@" diff --git a/engine/pokemon/breedmon_level_growth.asm b/engine/pokemon/breedmon_level_growth.asm new file mode 100644 index 0000000..f64bd6c --- /dev/null +++ b/engine/pokemon/breedmon_level_growth.asm @@ -0,0 +1,27 @@ +GetBreedMon1LevelGrowth: + ld hl, wBreedMon1 + ld de, wTempMon + ld bc, BOXMON_STRUCT_LENGTH + call CopyBytes + callfar CalcLevel + ld a, [wBreedMon1Level] + ld b, a + ld a, d + ld e, a + sub b + ld d, a + ret + +GetBreedMon2LevelGrowth: + ld hl, wBreedMon2 + ld de, wTempMon + ld bc, BOXMON_STRUCT_LENGTH + call CopyBytes + callfar CalcLevel + ld a, [wBreedMon2Level] + ld b, a + ld a, d + ld e, a + sub b + ld d, a + ret diff --git a/engine/pokemon/caught_data.asm b/engine/pokemon/caught_data.asm new file mode 100644 index 0000000..4589eac --- /dev/null +++ b/engine/pokemon/caught_data.asm @@ -0,0 +1,246 @@ +CheckPartyFullAfterContest: + ld a, [wContestMonSpecies] + and a + jp z, .DidntCatchAnything + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call GetBaseData + ld hl, wPartyCount + ld a, [hl] + cp PARTY_LENGTH + jp nc, .TryAddToBox + inc a + ld [hl], a + ld c, a + ld b, 0 + add hl, bc + ld a, [wContestMonSpecies] + ld [hli], a + ld [wCurSpecies], a + ld a, -1 + ld [hl], a + ld hl, wPartyMon1Species + ld a, [wPartyCount] + dec a + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld d, h + ld e, l + ld hl, wContestMon + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + ld a, [wPartyCount] + dec a + ld hl, wPartyMonOTs + call SkipNames + ld d, h + ld e, l + ld hl, wPlayerName + call CopyBytes + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wStringBuffer1 + ld de, wMonOrItemNameBuffer + ld bc, MON_NAME_LENGTH + call CopyBytes + call GiveANickname_YesNo + jr c, .Party_SkipNickname + ld a, [wPartyCount] + dec a + ld [wCurPartyMon], a + xor a + ld [wMonType], a + ld de, wMonOrItemNameBuffer + callfar InitNickname + +.Party_SkipNickname: + ld a, [wPartyCount] + dec a + ld hl, wPartyMonNicknames + call SkipNames + ld d, h + ld e, l + ld hl, wMonOrItemNameBuffer + call CopyBytes + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1Level + call GetPartyLocation + ld a, [hl] + ld [wCurPartyLevel], a + call SetCaughtData + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1CaughtLocation + call GetPartyLocation + ld a, [hl] + and CAUGHT_GENDER_MASK + ld b, LANDMARK_NATIONAL_PARK + or b + ld [hl], a + xor a + ld [wContestMonSpecies], a + and a ; BUGCONTEST_CAUGHT_MON + ld [wScriptVar], a + ret + +.TryAddToBox: + ld a, BANK(sBoxCount) + call OpenSRAM + ld hl, sBoxCount + ld a, [hl] + cp MONS_PER_BOX + call CloseSRAM + jr nc, .BoxFull + xor a + ld [wCurPartyMon], a + ld hl, wContestMon + ld de, wBufferMon + ld bc, BOXMON_STRUCT_LENGTH + call CopyBytes + ld hl, wPlayerName + ld de, wBufferMonOT + ld bc, NAME_LENGTH + call CopyBytes + callfar InsertPokemonIntoBox + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + call GiveANickname_YesNo + ld hl, wStringBuffer1 + jr c, .Box_SkipNickname + ld a, BOXMON + ld [wMonType], a + ld de, wMonOrItemNameBuffer + callfar InitNickname + ld hl, wMonOrItemNameBuffer + +.Box_SkipNickname: + ld a, BANK(sBoxMonNicknames) + call OpenSRAM + ld de, sBoxMonNicknames + ld bc, MON_NAME_LENGTH + call CopyBytes + call CloseSRAM + +.BoxFull: + ld a, BANK(sBoxMon1Level) + call OpenSRAM + ld a, [sBoxMon1Level] + ld [wCurPartyLevel], a + call CloseSRAM + call SetBoxMonCaughtData + ld a, BANK(sBoxMon1CaughtLocation) + call OpenSRAM + ld hl, sBoxMon1CaughtLocation + ld a, [hl] + and CAUGHT_GENDER_MASK + ld b, LANDMARK_NATIONAL_PARK + or b + ld [hl], a + call CloseSRAM + xor a + ld [wContestMon], a + ld a, BUGCONTEST_BOXED_MON + ld [wScriptVar], a + ret + +.DidntCatchAnything: + ld a, BUGCONTEST_NO_CATCH + ld [wScriptVar], a + ret + +GiveANickname_YesNo: + ld hl, CaughtAskNicknameText + call PrintText + jp YesNoBox + +CaughtAskNicknameText: + text_far _CaughtAskNicknameText + text_end + +SetCaughtData: + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1CaughtLevel + call GetPartyLocation +SetBoxmonOrEggmonCaughtData: + ld a, [wTimeOfDay] + inc a + rrca + rrca + ld b, a + ld a, [wCurPartyLevel] + or b + ld [hli], a + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + cp MAP_POKECENTER_2F + jr nz, .NotPokecenter2F + ld a, b + cp GROUP_POKECENTER_2F + jr nz, .NotPokecenter2F + + ld a, [wBackupMapGroup] + ld b, a + ld a, [wBackupMapNumber] + ld c, a + +.NotPokecenter2F: + call GetWorldMapLocation + ld b, a + ld a, [wPlayerGender] + rrca ; shift bit 0 (PLAYERGENDER_FEMALE_F) to bit 7 (CAUGHT_GENDER_MASK) + or b + ld [hl], a + ret + +SetBoxMonCaughtData: + ld a, BANK(sBoxMon1CaughtLevel) + call OpenSRAM + ld hl, sBoxMon1CaughtLevel + call SetBoxmonOrEggmonCaughtData + call CloseSRAM + ret + +SetGiftBoxMonCaughtData: + push bc + ld a, BANK(sBoxMon1CaughtLevel) + call OpenSRAM + ld hl, sBoxMon1CaughtLevel + pop bc + call SetGiftMonCaughtData + call CloseSRAM + ret + +SetGiftPartyMonCaughtData: + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1CaughtLevel + push bc + call GetPartyLocation + pop bc +SetGiftMonCaughtData: + xor a + ld [hli], a + ld a, LANDMARK_GIFT + rrc b + or b + ld [hl], a + ret + +SetEggMonCaughtData: + ld a, [wCurPartyMon] + ld hl, wPartyMon1CaughtLevel + call GetPartyLocation + ld a, [wCurPartyLevel] + push af + ld a, CAUGHT_EGG_LEVEL + ld [wCurPartyLevel], a + call SetBoxmonOrEggmonCaughtData + pop af + ld [wCurPartyLevel], a + ret diff --git a/engine/pokemon/correct_nick_errors.asm b/engine/pokemon/correct_nick_errors.asm new file mode 100644 index 0000000..421bf92 --- /dev/null +++ b/engine/pokemon/correct_nick_errors.asm @@ -0,0 +1,74 @@ +CorrectNickErrors:: +; error-check monster nick before use +; must be a peace offering to gamesharkers + +; input: de = nick location + + push bc + push de + ld b, MON_NAME_LENGTH + +.checkchar +; end of nick? + ld a, [de] + cp "@" ; terminator + jr z, .end + +; check if this char is a text command + ld hl, .textcommands + dec hl +.loop +; next entry + inc hl +; reached end of commands table? + ld a, [hl] + cp -1 + jr z, .done + +; is the current char between this value (inclusive)... + ld a, [de] + cp [hl] + inc hl + jr c, .loop +; ...and this one? + cp [hl] + jr nc, .loop + +; replace it with a "?" + ld a, "?" + ld [de], a + jr .loop + +.done +; next char + inc de +; reached end of nick without finding a terminator? + dec b + jr nz, .checkchar + +; change nick to "?@" + pop de + push de + ld a, "?" + ld [de], a + inc de + ld a, "@" + ld [de], a +.end +; if the nick has any errors at this point it's out of our hands + pop de + pop bc + ret + +.textcommands +; table defining which characters are actually text commands +; format: + ; ≥ < + db "", "ガ" + db "", "" + 1 + db "", "" + 1 + db "", "" + 1 + db "", "" + 1 + db "", "" + 1 + db "", "┘" + 1 + db -1 ; end diff --git a/engine/pokemon/correct_party_errors.asm b/engine/pokemon/correct_party_errors.asm new file mode 100644 index 0000000..74b289d --- /dev/null +++ b/engine/pokemon/correct_party_errors.asm @@ -0,0 +1,231 @@ +CorrectPartyErrors: ; unreferenced + ld hl, wPartyCount + ld a, [hl] + and a + ret z + + cp PARTY_LENGTH + 1 + jr c, .party_length_okay + ld a, PARTY_LENGTH + ld [hl], a +.party_length_okay + inc hl + + ld b, a + ld c, 0 +.loop1 + ld a, [hl] + call IsAPokemon + jr nc, .next_species + + push hl + ld hl, SMEARGLE + call GetPokemonIDFromIndex + pop hl + ld [hl], a + push hl + push bc + push af + ld a, c + ld hl, wPartyMon1Species + call GetPartyLocation + pop af + ld [hl], a + pop bc + pop hl + +.next_species + inc hl + inc c + dec b + jr nz, .loop1 + ld [hl], $ff + + ld hl, wPartyMon1 + ld a, [wPartyCount] + ld d, a + ld e, 0 +.loop2 + push de + push hl + ld b, h + ld c, l + ld a, [hl] + call IsAPokemon + jr nc, .check_level + + push hl + ld hl, SMEARGLE + call GetPokemonIDFromIndex + pop hl + ld [hl], a + push de + ld d, 0 + ld hl, wPartySpecies + add hl, de + pop de + ld [hl], a + +.check_level + ld [wCurSpecies], a + call GetBaseData + ld hl, MON_LEVEL + add hl, bc + ld a, [hl] + cp MIN_LEVEL + ld a, MIN_LEVEL + jr c, .invalid_level + ld a, [hl] + cp MAX_LEVEL + jr c, .load_level + ld a, MAX_LEVEL +.invalid_level + ld [hl], a +.load_level + ld [wCurPartyLevel], a + + ld hl, MON_MAXHP + add hl, bc + ld d, h + ld e, l + ld hl, MON_STAT_EXP - 1 + add hl, bc + ld b, TRUE + predef CalcMonStats + pop hl + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop de + inc e + dec d + jr nz, .loop2 + + ld de, wPartyMonNicknames + ld a, [wPartyCount] + ld b, a + ld c, 0 +.loop3 + push bc + call .GetLengthOfStringWith6CharCap + push de + farcall CheckStringForErrors + pop hl + pop bc + jr nc, .valid_nickname + + push bc + push hl + ld hl, wPartySpecies + push bc + ld b, 0 + add hl, bc + pop bc + ld a, [hl] + cp EGG + ld hl, .TAMAGO + jr z, .got_nickname + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wStringBuffer1 +.got_nickname + pop de + ld bc, MON_NAME_LENGTH + call CopyBytes + pop bc + +.valid_nickname + inc c + dec b + jr nz, .loop3 + + ld de, wPartyMonOTs + ld a, [wPartyCount] + ld b, a + ld c, 0 +.loop4 + push bc + call .GetLengthOfStringWith6CharCap + push de + farcall CheckStringForErrors + pop hl + jr nc, .valid_ot_name + ld d, h + ld e, l + ld hl, wPlayerName + ld bc, NAME_LENGTH + call CopyBytes +.valid_ot_name + pop bc + inc c + dec b + jr nz, .loop4 + + ld hl, wPartyMon1Moves + ld a, [wPartyCount] + ld b, a +.loop5 + push hl + ld c, NUM_MOVES + ld a, [hl] + and a + jr z, .invalid_move + cp MOVE_TABLE_ENTRIES + 1 + jr c, .moves_loop +.invalid_move + push hl + ld hl, POUND + call GetMoveIDFromIndex + pop hl + ld [hl], a + +.moves_loop + ld a, [hl] + and a + jr z, .fill_invalid_moves + cp MOVE_TABLE_ENTRIES + 1 + jr c, .next_move + +.fill_invalid_moves + xor a + ld [hli], a + dec c + jr nz, .fill_invalid_moves + jr .next_pokemon + +.next_move + inc hl + dec c + jr nz, .moves_loop + +.next_pokemon + pop hl + push bc + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop bc + dec b + jr nz, .loop5 + ret + +.TAMAGO: + db "タマゴ@@@" + +.GetLengthOfStringWith6CharCap: + push de + ld c, 1 + ld b, NAME_LENGTH_JAPANESE +.search_loop + ld a, [de] + cp "@" + jr z, .done + inc de + inc c + dec b + jr nz, .search_loop + dec c + dec de + ld a, "@" + ld [de], a +.done + pop de + ret diff --git a/engine/pokemon/european_mail.asm b/engine/pokemon/european_mail.asm new file mode 100644 index 0000000..85b7a26 --- /dev/null +++ b/engine/pokemon/european_mail.asm @@ -0,0 +1,118 @@ +ParseMailLanguage: + ld c, MAIL_LANG_ENGLISH + ld hl, sPartyMon1MailNationality - sPartyMon1Mail + add hl, de + ld a, [hli] + cp "E" + ret nz + ld a, [hli] + inc c ; MAIL_LANG_FRENCH + cp "F" + ret z + inc c ; MAIL_LANG_GERMAN + cp "G" + ret z + inc c ; MAIL_LANG_ITALIAN + cp "I" + ret z + inc c ; MAIL_LANG_SPANISH + cp "S" + ret z + ld c, MAIL_LANG_ENGLISH + ret + +; The regular font. +StandardEnglishFont: +INCBIN "gfx/font/english.1bpp" + +; An extended font. +FrenchGermanFont: +INCBIN "gfx/font/french_german.1bpp" + +; An even more extended font. +SpanishItalianFont: +INCBIN "gfx/font/spanish_italian.1bpp" + +ConvertFrenchGermanMailToEnglish: +; Called if mail is French or German +; Converts 's 't 'v from French/German character set to English + ld b, sPartyMon1MailAuthor - sPartyMon1Mail + ld h, d + ld l, e +.loop + ld a, [hl] + cp $dc ; 's in French/German font + jr nz, .check_intermediate_chars + ld a, "'s" + jr .replace + +.check_intermediate_chars + sub "'s" + jr c, .dont_replace + cp "'v" - "'s" + 1 + jr nc, .dont_replace + add $cd + +.replace + ld [hl], a + +.dont_replace + inc hl + dec b + jr nz, .loop + ret + +ConvertEnglishMailToFrenchGerman: +; Called if mail is English and game is French or German +; Converts 's 't 'v from English character set to French/German + ld b, sPartyMon1MailAuthor - sPartyMon1Mail + ld h, d + ld l, e +.loop + ld a, [hl] + cp "'s" + jr nz, .check_intermediate_chars + ld a, $dc ; 's in French/German font + jr .replace + +.check_intermediate_chars + sub $cd + jr c, .dont_replace + cp "'v" - "'s" + 1 + jr nc, .dont_replace + add "'s" + +.replace + ld [hl], a + +.dont_replace + inc hl + dec b + jr nz, .loop + ret + +ConvertSpanishItalianMailToEnglish: +; Called if mail is Spanish or Italian +; Converts 'd 'l 'm 'r 's 't 'v from Spanish/Italian character set to English +ConvertEnglishMailToSpanishItalian: +; Called if mail is English and game is Spanish or Italian +; Converts 'd 'l 'm 'r 's 't 'v from English character set to Spanish/Italian + ld b, sPartyMon1MailAuthor - sPartyMon1Mail + ld h, d + ld l, e +.loop + ld a, [hl] + and $f0 + cp $d0 + jr nz, .dont_replace + ld a, [hl] + add $8 + and $f + or $d0 + ld [hl], a + +.dont_replace + inc hl + dec b + jr nz, .loop + ret diff --git a/engine/pokemon/evolve.asm b/engine/pokemon/evolve.asm new file mode 100644 index 0000000..dfd8408 --- /dev/null +++ b/engine/pokemon/evolve.asm @@ -0,0 +1,686 @@ +EvolvePokemon: + ld hl, wEvolvableFlags + xor a + ld [hl], a + ld a, [wCurPartyMon] + ld c, a + ld b, SET_FLAG + call EvoFlagAction +EvolveAfterBattle: + xor a + ld [wMonTriedToEvolve], a + dec a + ld [wCurPartyMon], a + push hl + push bc + push de + ld hl, wPartyCount + + push hl + +EvolveAfterBattle_MasterLoop: + ld hl, wCurPartyMon + inc [hl] + + pop hl + + inc hl + ld a, [hl] + cp $ff + jp z, .ReturnToMap + + ld [wEvolutionOldSpecies], a + + push hl + ld a, [wCurPartyMon] + ld c, a + ld hl, wEvolvableFlags + ld b, CHECK_FLAG + call EvoFlagAction + ld a, c + and a + jp z, EvolveAfterBattle_MasterLoop + + ld a, [wEvolutionOldSpecies] + call GetPokemonIndexFromID + ld b, h + ld c, l + ld hl, EvosAttacksPointers + ld a, BANK(EvosAttacksPointers) + call LoadDoubleIndirectPointer + ldh [hTemp], a + + push hl + xor a + ld [wMonType], a + predef CopyMonToTempMon + pop hl + +.loop + call GetNextEvoAttackByte + and a + jr z, EvolveAfterBattle_MasterLoop + + ld b, a + + cp EVOLVE_TRADE + jr z, .trade + + ld a, [wLinkMode] + and a + jp nz, .dont_evolve_check + + ld a, b + cp EVOLVE_ITEM + jp z, .item + + ld a, [wForceEvolution] + and a + jp nz, .dont_evolve_check + + ld a, b + cp EVOLVE_LEVEL + jp z, .level + + cp EVOLVE_HAPPINESS + jr z, .happiness + +; EVOLVE_STAT + call GetNextEvoAttackByte + ld c, a + ld a, [wTempMonLevel] + cp c + jp c, .skip_evolution_species_parameter + + call IsMonHoldingEverstone + jp z, .skip_evolution_species_parameter + + push hl + ld de, wTempMonAttack + ld hl, wTempMonDefense + ld c, 2 + call CompareBytes + ld c, ATK_EQ_DEF + jr z, .got_tyrogue_evo + ld c, ATK_LT_DEF + jr c, .got_tyrogue_evo + ld c, ATK_GT_DEF +.got_tyrogue_evo + pop hl + + call GetNextEvoAttackByte + cp c + jp nz, .skip_evolution_species + jp .proceed + +.happiness + ld a, [wTempMonHappiness] + cp HAPPINESS_TO_EVOLVE + jp c, .skip_evolution_species_parameter + + call IsMonHoldingEverstone + jp z, .skip_evolution_species_parameter + + call GetNextEvoAttackByte + cp TR_ANYTIME + jr z, .proceed + cp TR_MORNDAY + jr z, .happiness_daylight + +; TR_NITE + ld a, [wTimeOfDay] + cp NITE_F + jp nz, .skip_evolution_species + jr .proceed + +.happiness_daylight + ld a, [wTimeOfDay] + cp NITE_F + jp z, .skip_evolution_species + jr .proceed + +.trade + ld a, [wLinkMode] + and a + jp z, .skip_evolution_species_parameter + + call IsMonHoldingEverstone + jp z, .skip_evolution_species_parameter + + call GetNextEvoAttackByte + ld b, a + inc a + jr z, .proceed + + ld a, [wLinkMode] + cp LINK_TIMECAPSULE + jp z, .skip_evolution_species + + ld a, [wTempMonItem] + cp b + jp nz, .skip_evolution_species + + xor a + ld [wTempMonItem], a + jr .proceed + +.item + call GetNextEvoAttackByte + ld b, a + ld a, [wCurItem] + cp b + jp nz, .skip_evolution_species + + ld a, [wForceEvolution] + and a + jp z, .skip_evolution_species + ld a, [wLinkMode] + and a + jp nz, .skip_evolution_species + jr .proceed + +.level + call GetNextEvoAttackByte + ld b, a + ld a, [wTempMonLevel] + cp b + jp c, .skip_evolution_species + call IsMonHoldingEverstone + jp z, .skip_evolution_species + +.proceed + ld a, [wTempMonLevel] + ld [wCurPartyLevel], a + ld a, $1 + ld [wMonTriedToEvolve], a + + ldh a, [hTemp] + call GetFarWord + call GetPokemonIDFromIndex + ld [wEvolutionNewSpecies], a + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames + call GetNickname + call CopyName1 + ld hl, EvolvingText + call PrintText + + ld c, 50 + call DelayFrames + + xor a + ldh [hBGMapMode], a + hlcoord 0, 0 + lb bc, 12, 20 + call ClearBox + + ld a, $1 + ldh [hBGMapMode], a + call ClearSprites + + farcall EvolutionAnimation + + push af + call ClearSprites + pop af + jp c, CancelEvolution + + ld hl, CongratulationsYourPokemonText + call PrintText + + ld a, [wEvolutionNewSpecies] + ld [wCurSpecies], a + ld [wTempMonSpecies], a + ld [wNamedObjectIndex], a + call GetPokemonName + + push hl + ld hl, EvolvedIntoText + call PrintTextboxText + farcall StubbedTrainerRankings_MonsEvolved + + ld de, MUSIC_NONE + call PlayMusic + ld de, SFX_CAUGHT_MON + call PlaySFX + call WaitSFX + + ld c, 40 + call DelayFrames + + call ClearTilemap + call UpdateSpeciesNameIfNotNicknamed + call GetBaseData + + ld hl, wTempMonExp + 2 + ld de, wTempMonMaxHP + ld b, TRUE + predef CalcMonStats + + ld a, [wCurPartyMon] + ld hl, wPartyMons + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld e, l + ld d, h + ld bc, MON_MAXHP + add hl, bc + ld a, [hli] + ld b, a + ld c, [hl] + ld hl, wTempMonMaxHP + 1 + ld a, [hld] + sub c + ld c, a + ld a, [hl] + sbc b + ld b, a + ld hl, wTempMonHP + 1 + ld a, [hl] + add c + ld [hld], a + ld a, [hl] + adc b + ld [hl], a + + ld hl, wTempMonSpecies + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + + ld a, [wCurSpecies] + ld [wTempSpecies], a + xor a + ld [wMonType], a + call LearnLevelMoves + ld a, [wTempSpecies] + call SetSeenAndCaughtMon + + ld a, [wTempSpecies] + call GetPokemonIndexFromID + ld a, l + sub LOW(UNOWN) + if HIGH(UNOWN) == 0 + or h + else + jr nz, .skip_unown + if HIGH(UNOWN) == 1 + dec h + else + ld a, h + cp HIGH(UNOWN) + endc + endc + jr nz, .skip_unown + ld hl, wTempMonDVs + predef GetUnownLetter + callfar UpdateUnownDex + +.skip_unown + pop de + pop hl + ld a, [wTempMonSpecies] + ld [hl], a + push hl + ld l, e + ld h, d + jp EvolveAfterBattle_MasterLoop + +.dont_evolve_check + ld a, b + cp EVOLVE_STAT + jr nz, .skip_evolution_species_parameter + inc hl +.skip_evolution_species_parameter + inc hl +.skip_evolution_species + inc hl + inc hl + jp .loop + +.UnusedReturnToMap: ; unreferenced + pop hl +.ReturnToMap: + pop de + pop bc + pop hl + ld a, [wLinkMode] + and a + ret nz + ld a, [wBattleMode] + and a + ret nz + ld a, [wMonTriedToEvolve] + and a + call nz, RestartMapMusic + ret + +UpdateSpeciesNameIfNotNicknamed: + ld a, [wCurSpecies] + push af + ld a, [wBaseSpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + pop af + ld [wCurSpecies], a + ld hl, wStringBuffer1 + ld de, wStringBuffer2 +.loop + ld a, [de] + inc de + cp [hl] + inc hl + ret nz + cp "@" + jr nz, .loop + + ld a, [wCurPartyMon] + ld bc, MON_NAME_LENGTH + ld hl, wPartyMonNicknames + call AddNTimes + push hl + ld a, [wCurSpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wStringBuffer1 + pop de + ld bc, MON_NAME_LENGTH + jp CopyBytes + +CancelEvolution: + ld hl, StoppedEvolvingText + call PrintText + call ClearTilemap + jp EvolveAfterBattle_MasterLoop + +IsMonHoldingEverstone: + push hl + ld a, [wCurPartyMon] + ld hl, wPartyMon1Item + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld a, [hl] + cp EVERSTONE + pop hl + ret + +CongratulationsYourPokemonText: + text_far _CongratulationsYourPokemonText + text_end + +EvolvedIntoText: + text_far _EvolvedIntoText + text_end + +StoppedEvolvingText: + text_far _StoppedEvolvingText + text_end + +EvolvingText: + text_far _EvolvingText + text_end + +LearnLevelMoves: + ld a, [wTempSpecies] + ld [wCurPartySpecies], a + call GetPokemonIndexFromID + ld b, h + ld c, l + ld hl, EvosAttacksPointers + ld a, BANK(EvosAttacksPointers) + call LoadDoubleIndirectPointer + ldh [hTemp], a + call SkipEvolutions + +.find_move + call GetNextEvoAttackByte + and a + jr z, .done + + ld b, a + ld a, [wCurPartyLevel] + cp b + call GetNextEvoAttackByte + ld e, a + call GetNextEvoAttackByte + ld d, a + jr nz, .find_move + + push hl + ld h, d + ld l, e + call GetMoveIDFromIndex + ld d, a + ld hl, wPartyMon1Moves + ld a, [wCurPartyMon] + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + + ld b, NUM_MOVES +.check_move + call GetNextEvoAttackByte + cp d + jr z, .has_move + dec b + jr nz, .check_move + jr .learn +.has_move + + pop hl + jr .find_move + +.learn + ld a, d + ld [wPutativeTMHMMove], a + ld [wNamedObjectIndex], a + call GetMoveName + call CopyName1 + predef LearnMove + pop hl + jr .find_move + +.done + ld a, [wCurPartySpecies] + ld [wTempSpecies], a + ret + +FillMoves: +; Fill in moves at de for wCurPartySpecies at wCurPartyLevel + + push hl + push de + push bc + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld b, h + ld c, l + ld hl, EvosAttacksPointers + ld a, BANK(EvosAttacksPointers) + call LoadDoubleIndirectPointer + ldh [hTemp], a + call SkipEvolutions + jr .GetLevel + +.NextMove: + pop de +.GetMove: + inc hl + inc hl +.GetLevel: + call GetNextEvoAttackByte + and a + jp z, .done + ld b, a + ld a, [wCurPartyLevel] + cp b + jp c, .done + ld a, [wSkipMovesBeforeLevelUp] + and a + jr z, .CheckMove + ld a, [wPrevPartyLevel] + cp b + jr nc, .GetMove + +.CheckMove: + push de + ld c, NUM_MOVES + ldh a, [hTemp] + push hl + call GetFarWord + call GetMoveIDFromIndex + pop hl + ld b, a +.CheckRepeat: + ld a, [de] + inc de + cp b + jr z, .NextMove + dec c + jr nz, .CheckRepeat + pop de + push de + ld c, NUM_MOVES +.CheckSlot: + ld a, [de] + and a + jr z, .LearnMove + inc de + dec c + jr nz, .CheckSlot + pop de + push de + push hl + ld h, d + ld l, e + call ShiftMoves + ld a, [wEvolutionOldSpecies] + and a + jr z, .ShiftedMove + push de + ld bc, wPartyMon1PP - (wPartyMon1Moves + NUM_MOVES - 1) + add hl, bc + ld d, h + ld e, l + call ShiftMoves + pop de + +.ShiftedMove: + pop hl + +.LearnMove: + ldh a, [hTemp] + push hl + call GetFarWord + call GetMoveIDFromIndex + pop hl + ld b, a + ld [de], a + ld a, [wEvolutionOldSpecies] + and a + jr z, .NextMove + push hl + ld a, b + ld hl, MON_PP - MON_MOVES + add hl, de + push hl + ld l, a + ld a, MOVE_PP + call GetMoveAttribute + pop hl + ld [hl], a + pop hl + jp .NextMove + +.done + pop bc + pop de + pop hl + ret + +ShiftMoves: + ld c, NUM_MOVES - 1 +.loop + inc de + ld a, [de] + ld [hli], a + dec c + jr nz, .loop + ret + +EvoFlagAction: + push de + ld d, $0 + predef SmallFarFlagAction + pop de + ret + +GetLowestEvolutionStage: +; Return the first mon to evolve into wCurPartySpecies. +; Instead of looking it up, we just load it from a table. This is a lot more efficient. + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld bc, FirstEvoStages - 2 + add hl, hl + add hl, bc + ld a, BANK(FirstEvoStages) + call GetFarWord + call GetPokemonIDFromIndex + ld [wCurPartySpecies], a + ret + +SkipEvolutions:: +; Receives a pointer to the evos and attacks for a mon in b:hl, and skips to the attacks. + ld a, b + call GetFarByte + inc hl + and a + ret z + cp EVOLVE_STAT + jr nz, .no_extra_skip + inc hl +.no_extra_skip + inc hl + inc hl + inc hl + jr SkipEvolutions + +DetermineEvolutionItemResults:: +; in: b:de: pointer to evos and attacks struct, wCurItem: item +; out: de: species ID or zero; a, b, hl: clobbered + ld h, d + ld l, e + ld de, 0 + ld a, b + ldh [hTemp], a +.loop + call GetNextEvoAttackByte + and a + ret z + cp EVOLVE_STAT + jr z, .skip_species_two_parameters + cp EVOLVE_ITEM + jr nz, .skip_species_parameter + call GetNextEvoAttackByte + ld b, a + ld a, [wCurItem] + cp b + jr nz, .skip_species + ldh a, [hTemp] + call GetFarWord + ld d, h + ld e, l + ret + +.skip_species_two_parameters + inc hl +.skip_species_parameter + inc hl +.skip_species + inc hl + inc hl + jr .loop + +GetNextEvoAttackByte: + ldh a, [hTemp] + call GetFarByte + inc hl + ret diff --git a/engine/pokemon/experience.asm b/engine/pokemon/experience.asm new file mode 100644 index 0000000..ea98af9 --- /dev/null +++ b/engine/pokemon/experience.asm @@ -0,0 +1,163 @@ +CalcLevel: + ld a, [wTempMonSpecies] + ld [wCurSpecies], a + call GetBaseData + ld d, 1 +.next_level + inc d + ld a, d + cp LOW(MAX_LEVEL + 1) + jr z, .got_level + call CalcExpAtLevel + push hl + ld hl, wTempMonExp + 2 + ldh a, [hProduct + 3] + ld c, a + ld a, [hld] + sub c + ldh a, [hProduct + 2] + ld c, a + ld a, [hld] + sbc c + ldh a, [hProduct + 1] + ld c, a + ld a, [hl] + sbc c + pop hl + jr nc, .next_level + +.got_level + dec d + ret + +CalcExpAtLevel: +; (a/b)*n**3 + c*n**2 + d*n - e +; BUG: Experience underflow for level 1 Pokémon with Medium-Slow growth rate (see docs/bugs_and_glitches.md) + ld a, [wBaseGrowthRate] + add a + add a + ld c, a + ld b, 0 + ld hl, GrowthRates + add hl, bc +; Cube the level + call .LevelSquared + ld a, d + ldh [hMultiplier], a + call Multiply + +; Multiply by a + ld a, [hl] + and $f0 + swap a + ldh [hMultiplier], a + call Multiply +; Divide by b + ld a, [hli] + and $f + ldh [hDivisor], a + ld b, 4 + call Divide +; Push the cubic term to the stack + ldh a, [hQuotient + 1] + push af + ldh a, [hQuotient + 2] + push af + ldh a, [hQuotient + 3] + push af +; Square the level and multiply by the lower 7 bits of c + call .LevelSquared + ld a, [hl] + and $7f + ldh [hMultiplier], a + call Multiply +; Push the absolute value of the quadratic term to the stack + ldh a, [hProduct + 1] + push af + ldh a, [hProduct + 2] + push af + ldh a, [hProduct + 3] + push af + ld a, [hli] + push af +; Multiply the level by d + xor a + ldh [hMultiplicand + 0], a + ldh [hMultiplicand + 1], a + ld a, d + ldh [hMultiplicand + 2], a + ld a, [hli] + ldh [hMultiplier], a + call Multiply +; Subtract e + ld b, [hl] + ldh a, [hProduct + 3] + sub b + ldh [hMultiplicand + 2], a + ld b, 0 + ldh a, [hProduct + 2] + sbc b + ldh [hMultiplicand + 1], a + ldh a, [hProduct + 1] + sbc b + ldh [hMultiplicand], a +; If bit 7 of c is set, c is negative; otherwise, it's positive + pop af + and $80 + jr nz, .subtract +; Add c*n**2 to (d*n - e) + pop bc + ldh a, [hProduct + 3] + add b + ldh [hMultiplicand + 2], a + pop bc + ldh a, [hProduct + 2] + adc b + ldh [hMultiplicand + 1], a + pop bc + ldh a, [hProduct + 1] + adc b + ldh [hMultiplicand], a + jr .done_quadratic + +.subtract +; Subtract c*n**2 from (d*n - e) + pop bc + ldh a, [hProduct + 3] + sub b + ldh [hMultiplicand + 2], a + pop bc + ldh a, [hProduct + 2] + sbc b + ldh [hMultiplicand + 1], a + pop bc + ldh a, [hProduct + 1] + sbc b + ldh [hMultiplicand], a + +.done_quadratic +; Add (a/b)*n**3 to (d*n - e +/- c*n**2) + pop bc + ldh a, [hProduct + 3] + add b + ldh [hMultiplicand + 2], a + pop bc + ldh a, [hProduct + 2] + adc b + ldh [hMultiplicand + 1], a + pop bc + ldh a, [hProduct + 1] + adc b + ldh [hMultiplicand], a + ret + +.LevelSquared: + xor a + ldh [hMultiplicand + 0], a + ldh [hMultiplicand + 1], a + ld a, d + ldh [hMultiplicand + 2], a + ldh [hMultiplier], a + jp Multiply + +INCLUDE "data/growth_rates.asm" diff --git a/engine/pokemon/health.asm b/engine/pokemon/health.asm new file mode 100644 index 0000000..d11a073 --- /dev/null +++ b/engine/pokemon/health.asm @@ -0,0 +1,110 @@ +HealParty: + xor a + ld [wCurPartyMon], a + ld hl, wPartySpecies +.loop + ld a, [hli] + cp -1 + jr z, .done + cp EGG + jr z, .next + + push hl + call HealPartyMon + pop hl + +.next + ld a, [wCurPartyMon] + inc a + ld [wCurPartyMon], a + jr .loop + +.done + ret + +HealPartyMon: + ld a, MON_SPECIES + call GetPartyParamLocation + ld d, h + ld e, l + + ld hl, MON_STATUS + add hl, de + xor a + ld [hli], a + ld [hl], a + + ld hl, MON_MAXHP + add hl, de + + ; bc = MON_HP + ld b, h + ld c, l + dec bc + dec bc + + ld a, [hli] + ld [bc], a + inc bc + ld a, [hl] + ld [bc], a + + farcall RestoreAllPP + ret + +ComputeHPBarPixels: +; e = bc * (6 * 8) / de + ld a, b + or c + jr z, .zero + push hl + xor a + ldh [hMultiplicand + 0], a + ld a, b + ldh [hMultiplicand + 1], a + ld a, c + ldh [hMultiplicand + 2], a + ld a, 6 * 8 + ldh [hMultiplier], a + call Multiply + ; We need de to be under 256 because hDivisor is only 1 byte. + ld a, d + and a + jr z, .divide + ; divide de and hProduct by 4 + srl d + rr e + srl d + rr e + ldh a, [hProduct + 2] + ld b, a + ldh a, [hProduct + 3] + srl b + rr a + srl b + rr a + ldh [hDividend + 3], a + ld a, b + ldh [hDividend + 2], a +.divide + ld a, e + ldh [hDivisor], a + ld b, 4 + call Divide + ldh a, [hQuotient + 3] + ld e, a + pop hl + and a + ret nz + ld e, 1 + ret + +.zero + ld e, 0 + ret + +AnimateHPBar: + call WaitBGMap + call _AnimateHPBar + call WaitBGMap + ret diff --git a/engine/pokemon/knows_move.asm b/engine/pokemon/knows_move.asm new file mode 100644 index 0000000..9fe0f6a --- /dev/null +++ b/engine/pokemon/knows_move.asm @@ -0,0 +1,24 @@ +KnowsMove: + ld a, MON_MOVES + call GetPartyParamLocation + ld a, [wPutativeTMHMMove] + ld b, a + ld c, NUM_MOVES +.loop + ld a, [hli] + cp b + jr z, .knows_move + dec c + jr nz, .loop + and a + ret + +.knows_move + ld hl, .KnowsMoveText + call PrintText + scf + ret + +.KnowsMoveText: + text_far _KnowsMoveText + text_end diff --git a/engine/pokemon/learn.asm b/engine/pokemon/learn.asm new file mode 100644 index 0000000..68eaaec --- /dev/null +++ b/engine/pokemon/learn.asm @@ -0,0 +1,234 @@ +LearnMove: + call LoadTilemapToTempTilemap + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames + call GetNickname + ld hl, wStringBuffer1 + ld de, wMonOrItemNameBuffer + ld bc, MON_NAME_LENGTH + call CopyBytes + +.loop + ld hl, wPartyMon1Moves + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld d, h + ld e, l + ld b, NUM_MOVES +; Get the first empty move slot. This routine also serves to +; determine whether the Pokemon learning the moves already has +; all four slots occupied, in which case one would need to be +; deleted. +.next + ld a, [hl] + and a + jr z, .learn + inc hl + dec b + jr nz, .next +; If we're here, we enter the routine for forgetting a move +; to make room for the new move we're trying to learn. + push de + call ForgetMove + pop de + jp c, .cancel + + push hl + push de + ld [wNamedObjectIndex], a + + ld b, a + ld a, [wBattleMode] + and a + jr z, .not_disabled + ld a, [wDisabledMove] + cp b + jr nz, .not_disabled + xor a + ld [wDisabledMove], a + ld [wPlayerDisableCount], a +.not_disabled + + call GetMoveName + ld hl, Text_1_2_and_Poof ; 1, 2 and… + call PrintText + pop de + pop hl + +.learn + ld a, [wPutativeTMHMMove] + ld [hl], a + ld bc, MON_PP - MON_MOVES + add hl, bc + + push hl + ld l, a + ld a, MOVE_PP + call GetMoveAttribute + pop hl + + ld [hl], a + + ld a, [wBattleMode] + and a + jp z, .learned + + ld a, [wCurPartyMon] + ld b, a + ld a, [wCurBattleMon] + cp b + jp nz, .learned + + ld a, [wPlayerSubStatus5] + bit SUBSTATUS_TRANSFORMED, a + jp nz, .learned + + ld h, d + ld l, e + ld de, wBattleMonMoves + ld bc, NUM_MOVES + call CopyBytes + ld bc, wPartyMon1PP - (wPartyMon1Moves + NUM_MOVES) + add hl, bc + ld de, wBattleMonPP + ld bc, NUM_MOVES + call CopyBytes + jp .learned + +.cancel + ld hl, StopLearningMoveText + call PrintText + call YesNoBox + jp c, .loop + + ld hl, DidNotLearnMoveText + call PrintText + ld b, 0 + ret + +.learned + ld hl, LearnedMoveText + call PrintText + ld b, 1 + ret + +ForgetMove: + push hl + ld hl, AskForgetMoveText + call PrintText + call YesNoBox + pop hl + ret c + ld bc, -NUM_MOVES + add hl, bc + push hl + ld de, wListMoves_MoveIndicesBuffer + ld bc, NUM_MOVES + call CopyBytes + pop hl +.loop + push hl + ld hl, MoveAskForgetText + call PrintText + hlcoord 5, 2 + ld b, NUM_MOVES * 2 + ld c, MOVE_NAME_LENGTH + call Textbox + hlcoord 5 + 2, 2 + 2 + ld a, SCREEN_WIDTH * 2 + ld [wListMovesLineSpacing], a + predef ListMoves + ; w2DMenuData + ld a, $4 + ld [w2DMenuCursorInitY], a + ld a, $6 + ld [w2DMenuCursorInitX], a + ld a, [wNumMoves] + inc a + ld [w2DMenuNumRows], a + ld a, $1 + ld [w2DMenuNumCols], a + ld [wMenuCursorY], a + ld [wMenuCursorX], a + ld a, $3 + ld [wMenuJoypadFilter], a + ld a, $20 + ld [w2DMenuFlags1], a + xor a + ld [w2DMenuFlags2], a + ld a, $20 + ld [w2DMenuCursorOffsets], a + call StaticMenuJoypad + push af + call SafeLoadTempTilemapToTilemap + pop af + pop hl + bit 1, a + jr nz, .cancel + push hl + ld a, [wMenuCursorY] + dec a + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + push af + push bc + call IsHMMove + pop bc + pop de + ld a, d + jr c, .hmmove + pop hl + add hl, bc + and a + ret + +.hmmove + ld hl, MoveCantForgetHMText + call PrintText + pop hl + jr .loop + +.cancel + scf + ret + +LearnedMoveText: + text_far _LearnedMoveText + text_end + +MoveAskForgetText: + text_far _MoveAskForgetText + text_end + +StopLearningMoveText: + text_far _StopLearningMoveText + text_end + +DidNotLearnMoveText: + text_far _DidNotLearnMoveText + text_end + +AskForgetMoveText: + text_far _AskForgetMoveText + text_end + +Text_1_2_and_Poof: + text_far Text_MoveForgetCount ; 1, 2 and… + text_asm + push de + ld de, SFX_SWITCH_POKEMON + call PlaySFX + pop de + ld hl, .MoveForgotText + ret + +.MoveForgotText: + text_far _MoveForgotText + text_end + +MoveCantForgetHMText: + text_far _MoveCantForgetHMText + text_end diff --git a/engine/pokemon/level_up_happiness.asm b/engine/pokemon/level_up_happiness.asm new file mode 100644 index 0000000..3dac4e6 --- /dev/null +++ b/engine/pokemon/level_up_happiness.asm @@ -0,0 +1,20 @@ +LevelUpHappinessMod: + ld a, [wCurPartyMon] + ld hl, wPartyMon1CaughtLocation + call GetPartyLocation + ld a, [hl] + and CAUGHT_LOCATION_MASK + ld d, a + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetWorldMapLocation + cp d + ld c, HAPPINESS_GAINLEVEL + jr nz, .ok + ld c, HAPPINESS_GAINLEVELATHOME + +.ok + callfar ChangeHappiness + ret diff --git a/engine/pokemon/mail.asm b/engine/pokemon/mail.asm new file mode 100644 index 0000000..55e6b03 --- /dev/null +++ b/engine/pokemon/mail.asm @@ -0,0 +1,567 @@ +SendMailToPC: + ld a, MON_ITEM + call GetPartyParamLocation + ld d, [hl] + farcall ItemIsMail + jr nc, .full + call GetMailboxCount + cp MAILBOX_CAPACITY + jr nc, .full + ld bc, MAIL_STRUCT_LENGTH + ld hl, sMailboxes + call AddNTimes + ld d, h + ld e, l + ld a, [wCurPartyMon] + ld bc, MAIL_STRUCT_LENGTH + ld hl, sPartyMail + call AddNTimes + push hl + ld a, BANK(sMailboxCount) + call OpenSRAM + ld bc, MAIL_STRUCT_LENGTH + call CopyBytes + pop hl + xor a + ld bc, MAIL_STRUCT_LENGTH + call ByteFill + ld a, MON_ITEM + call GetPartyParamLocation + ld [hl], 0 + ld hl, sMailboxCount + inc [hl] + call CloseSRAM + xor a + ret + +.full + scf + ret + +DeleteMailFromPC: +; Shift all mail messages in the mailbox + ld a, BANK(sMailboxCount) + call OpenSRAM + ld a, b + push bc + ld hl, sMailboxes + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + push hl + add hl, bc + pop de + pop bc +.loop + ld a, b + cp MAILBOX_CAPACITY - 1 + jr z, .done + push bc + ld bc, MAIL_STRUCT_LENGTH + call CopyBytes + pop bc + inc b + jr .loop +.done + ld h, d + ld l, e + xor a + ld bc, MAIL_STRUCT_LENGTH + call ByteFill + ld hl, sMailboxCount + dec [hl] + jp CloseSRAM + +ReadMailMessage: + ld a, b + ld hl, sMailboxes + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + ld d, h + ld e, l + farcall ReadAnyMail + ret + +MoveMailFromPCToParty: + ld a, BANK(sMailboxCount) + call OpenSRAM + push bc + ld a, b + ld bc, MAIL_STRUCT_LENGTH + ld hl, sMailboxes + call AddNTimes + push hl + ld a, [wCurPartyMon] + ld bc, MAIL_STRUCT_LENGTH + ld hl, sPartyMail + call AddNTimes + ld d, h + ld e, l + pop hl + push hl + ld bc, MAIL_STRUCT_LENGTH + call CopyBytes + pop hl + ld de, PARTYMON_STRUCT_LENGTH - MON_MOVES + add hl, de + ld d, [hl] + ld a, [wCurPartyMon] + ld hl, wPartyMon1Item + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld [hl], d + call CloseSRAM + pop bc + jp DeleteMailFromPC + +GetMailboxCount: + ld a, BANK(sMailboxCount) + call OpenSRAM + ld a, [sMailboxCount] + ld c, a + jp CloseSRAM + +CheckPokeMail:: + push bc + push de + farcall SelectMonFromParty + ld a, POKEMAIL_REFUSED + jr c, .pop_return + + ld a, [wCurPartyMon] + ld hl, wPartyMon1Item + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld d, [hl] + farcall ItemIsMail + ld a, POKEMAIL_NO_MAIL + jr nc, .pop_return + + ld a, BANK(sPartyMail) + call OpenSRAM + ld a, [wCurPartyMon] + ld hl, sPartyMail + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + ld d, h + ld e, l + pop hl + pop bc + +; Compare the mail message, byte for byte, with the expected message. + ld a, MAIL_MSG_LENGTH + ld [wTempByteValue], a +.loop + ld a, [de] + ld c, a + ld a, b + call GetFarByte + cp "@" + jr z, .done + cp c + ld a, POKEMAIL_WRONG_MAIL + jr nz, .close_sram_return + inc hl + inc de + ld a, [wTempByteValue] + dec a + ld [wTempByteValue], a + jr nz, .loop + +.done + farcall CheckCurPartyMonFainted + ld a, POKEMAIL_LAST_MON + jr c, .close_sram_return + xor a ; REMOVE_PARTY + ld [wPokemonWithdrawDepositParameter], a + farcall RemoveMonFromPartyOrBox + ld a, POKEMAIL_CORRECT + +.close_sram_return + call CloseSRAM + jr .return + +.pop_return + pop de + pop bc + +.return + ld [wScriptVar], a + ret + +GivePokeMail:: + ld a, [wPartyCount] + dec a + push af + push bc + ld hl, wPartyMon1Item + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + pop bc + ld [hl], b + pop af + push bc + push af + ld hl, sPartyMail + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + ld d, h + ld e, l + ld hl, wMonMailMessageBuffer + ld bc, MAIL_MSG_LENGTH + 1 + ld a, BANK(sPartyMail) + call OpenSRAM + call CopyBytes + pop af + push af + ld hl, wPartyMonOTs + ld bc, NAME_LENGTH + call AddNTimes + ld bc, NAME_LENGTH - 1 + call CopyBytes + pop af + ld hl, wPartyMon1ID + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + inc de + ld a, [wCurPartySpecies] + ld [de], a + inc de + pop bc + ld a, b + ld [de], a + jp CloseSRAM + +BackupPartyMonMail: + ld a, BANK(sPartyMail) + call OpenSRAM + ld hl, sPartyMail + ld de, sPartyMailBackup + ld bc, PARTY_LENGTH * MAIL_STRUCT_LENGTH + call CopyBytes + ld hl, sMailboxCount + ld de, sMailboxCountBackup + ld bc, 1 + MAILBOX_CAPACITY * MAIL_STRUCT_LENGTH + call CopyBytes + jp CloseSRAM + +RestorePartyMonMail: + ld a, BANK(sPartyMail) + call OpenSRAM + ld hl, sPartyMailBackup + ld de, sPartyMail + ld bc, PARTY_LENGTH * MAIL_STRUCT_LENGTH + call CopyBytes + ld hl, sMailboxCountBackup + ld de, sMailboxCount + ld bc, 1 + MAILBOX_CAPACITY * MAIL_STRUCT_LENGTH + call CopyBytes + jp CloseSRAM + +DeletePartyMonMail: + ld a, BANK(sPartyMail) + call OpenSRAM + xor a + ld hl, sPartyMail + ld bc, PARTY_LENGTH * MAIL_STRUCT_LENGTH + call ByteFill + xor a + ld hl, sMailboxCount + ld bc, 1 + MAILBOX_CAPACITY * MAIL_STRUCT_LENGTH + call ByteFill + jp CloseSRAM + +IsAnyMonHoldingMail: + ld a, [wPartyCount] + and a + jr z, .no_mons + ld e, a + ld hl, wPartyMon1Item +.loop + ld d, [hl] + push hl + push de + farcall ItemIsMail + pop de + pop hl + ret c + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + dec e + jr nz, .loop + +.no_mons + and a + ret + +_PlayerMailBoxMenu: + call InitMail + jr z, .nomail + call LoadStandardMenuHeader + call MailboxPC + jp CloseWindow + +.nomail + ld hl, .EmptyMailboxText + jp MenuTextboxBackup + +.EmptyMailboxText: + text_far _EmptyMailboxText + text_end + +InitMail: +; return z if no mail + ld a, BANK(sMailboxCount) + call OpenSRAM + ld a, [sMailboxCount] + call CloseSRAM + +; initialize wMailboxCount from sMailboxCount + ld hl, wMailboxCount + ld [hli], a + assert wMailboxCount + 1 == wMailboxItems + and a + jr z, .done ; if no mail, we're done + +; initialize wMailboxItems with incrementing values starting at 1 + ld b, a + ld a, 1 +.loop + ld [hli], a + inc a + dec b + jr nz, .loop + +.done + ld [hl], -1 ; terminate + + ld a, [wMailboxCount] + and a + ret + +MailboxPC_GetMailAuthor: + dec a + ld hl, sMailbox1Author + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + ld a, BANK(sMailboxCount) + call OpenSRAM + ld de, wStringBuffer2 + push de + ld bc, NAME_LENGTH - 1 + call CopyBytes + ld a, "@" + ld [de], a + call CloseSRAM + pop de + ret + +MailboxPC_PrintMailAuthor: + push de + ld a, [wMenuSelection] + call MailboxPC_GetMailAuthor + pop hl + jp PlaceString + +MailboxPC: + xor a + ld [wCurMessageScrollPosition], a + ld a, 1 + ld [wCurMessageIndex], a +.loop + call InitMail + ld hl, .TopMenuHeader + call CopyMenuHeader + xor a + ldh [hBGMapMode], a + call InitScrollingMenu + call UpdateSprites + + ld a, [wCurMessageIndex] + ld [wMenuCursorPosition], a + ld a, [wCurMessageScrollPosition] + ld [wMenuScrollPosition], a + call ScrollingMenu + ld a, [wMenuScrollPosition] + ld [wCurMessageScrollPosition], a + ld a, [wMenuCursorY] + ld [wCurMessageIndex], a + + ld a, [wMenuJoypad] + cp B_BUTTON + jr z, .exit + call .Submenu + jr .loop + +.exit + xor a + ret + +.Submenu: + ld hl, .SubMenuHeader + call LoadMenuHeader + call VerticalMenu + call ExitMenu + jr c, .subexit + ld a, [wMenuCursorY] + dec a + ld hl, .Jumptable + rst JumpTable + +.subexit + ret + +.Jumptable: + dw .ReadMail + dw .PutInPack + dw .AttachMail + dw .Cancel + +.ReadMail: + call FadeToMenu + ld a, [wMenuSelection] + dec a + ld b, a + call ReadMailMessage + jp CloseSubmenu + +.PutInPack: + ld hl, .MailMessageLostText + call MenuTextbox + call YesNoBox + call ExitMenu + ret c + ld a, [wMenuSelection] + dec a + call .GetMailType + ld a, 1 + ld [wItemQuantityChange], a + ld hl, wNumItems + call ReceiveItem + jr c, .put_in_bag + ld hl, .MailPackFullText + jp MenuTextboxBackup + +.put_in_bag + ld a, [wMenuSelection] + dec a + ld b, a + call DeleteMailFromPC + ld hl, .MailClearedPutAwayText + jp MenuTextboxBackup + +.MailClearedPutAwayText: + text_far _MailClearedPutAwayText + text_end + +.MailPackFullText: + text_far _MailPackFullText + text_end + +.MailMessageLostText: + text_far _MailMessageLostText + text_end + +.GetMailType: + push af + ld a, BANK(sMailboxCount) + call OpenSRAM + pop af + ld hl, sMailbox1Type + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + ld a, [hl] + ld [wCurItem], a + jp CloseSRAM + +.AttachMail: + call FadeToMenu + xor a + ld [wPartyMenuActionText], a + call ClearBGPalettes +.try_again + farcall LoadPartyMenuGFX + farcall InitPartyMenuWithCancel + farcall InitPartyMenuGFX + farcall WritePartyMenuTilemap + farcall PrintPartyMenuText + call WaitBGMap + call SetPalettes + call DelayFrame + farcall PartyMenuSelect + jr c, .exit2 + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + ld a, MON_ITEM + call GetPartyParamLocation + ld a, [hl] + and a + jr z, .attach_mail + ld hl, .MailAlreadyHoldingItemText + call PrintText + jr .try_again + +.egg + ld hl, .MailEggText + call PrintText + jr .try_again + +.attach_mail + ld a, [wMenuSelection] + dec a + ld b, a + call MoveMailFromPCToParty + ld hl, .MailMovedFromBoxText + call PrintText + +.exit2 + jp CloseSubmenu + +.MailAlreadyHoldingItemText: + text_far _MailAlreadyHoldingItemText + text_end + +.MailEggText: + text_far _MailEggText + text_end + +.MailMovedFromBoxText: + text_far _MailMovedFromBoxText + text_end + +.Cancel: + ret + +.TopMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 8, 1, SCREEN_WIDTH - 2, 10 + dw .TopMenuData + db 1 ; default option + +.TopMenuData: + db SCROLLINGMENU_DISPLAY_ARROWS ; flags + db 4, 0 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dbw 0, wMailboxCount + dba MailboxPC_PrintMailAuthor + dba NULL + dba NULL + +.SubMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 13, 9 + dw .SubMenuData + db 1 ; default option + +.SubMenuData: + db STATICMENU_CURSOR ; flags + db 4 ; items + db "READ MAIL@" + db "PUT IN PACK@" + db "ATTACH MAIL@" + db "CANCEL@" diff --git a/engine/pokemon/mail_2.asm b/engine/pokemon/mail_2.asm new file mode 100644 index 0000000..a2e65fb --- /dev/null +++ b/engine/pokemon/mail_2.asm @@ -0,0 +1,947 @@ +; MailGFXPointers indexes +; LoadMailPalettes.MailPals indexes (see gfx/mail/mail.pal) + const_def + const FLOWER_MAIL_INDEX ; 0 + const SURF_MAIL_INDEX ; 1 + const LITEBLUEMAIL_INDEX ; 2 + const PORTRAITMAIL_INDEX ; 3 + const LOVELY_MAIL_INDEX ; 4 + const EON_MAIL_INDEX ; 5 + const MORPH_MAIL_INDEX ; 6 + const BLUESKY_MAIL_INDEX ; 7 + const MUSIC_MAIL_INDEX ; 8 + const MIRAGE_MAIL_INDEX ; 9 +DEF NUM_MAIL EQU const_value + +ReadPartyMonMail: + ld a, [wCurPartyMon] + ld hl, sPartyMail + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + ld d, h + ld e, l +ReadAnyMail: + push de + call ClearBGPalettes + call ClearSprites + call ClearTilemap + call DisableLCD + call LoadFontsExtra + pop de + push de + ld a, BANK(sPartyMail) + call OpenSRAM + farcall ParseMailLanguage + call CloseSRAM + ld a, c + ld de, StandardEnglishFont + or a ; MAIL_LANG_ENGLISH + jr z, .got_font + ld de, FrenchGermanFont + sub MAIL_LANG_ITALIAN + jr c, .got_font + ld de, SpanishItalianFont + +.got_font + ld hl, vTiles1 + lb bc, BANK(StandardEnglishFont), $80 + call Get1bpp + pop de + call .LoadGFX + call EnableLCD + call WaitBGMap + ld a, [wCurMailIndex] + ld e, a + farcall LoadMailPalettes + call SetPalettes + xor a + ldh [hJoyPressed], a + call .loop + call ClearBGPalettes + call DisableLCD + call LoadStandardFont + jp EnableLCD + +.loop + call GetJoypad + ldh a, [hJoyPressed] + and A_BUTTON | B_BUTTON | START + jr z, .loop + vc_patch Forbid_printing_mail +if DEF(_CRYSTAL_VC) + and NO_INPUT +else + and START +endc + vc_patch_end + jr nz, .pressed_start + ret + +.pressed_start + ld a, [wJumptableIndex] + push af + callfar PrintMailAndExit ; printer + pop af + ld [wJumptableIndex], a + jr .loop + +.LoadGFX: + ld h, d + ld l, e + push hl + ld a, BANK(sPartyMail) + call OpenSRAM + ld de, sPartyMon1MailAuthorID - sPartyMon1Mail + add hl, de + ld a, [hli] ; author id + ld [wCurMailAuthorID], a + ld a, [hli] + ld [wCurMailAuthorID + 1], a + ld a, [hli] ; species + ld [wCurPartySpecies], a + ld b, [hl] ; type + call CloseSRAM + ld hl, MailGFXPointers + ld c, 0 +.loop2 + ld a, [hli] + cp b + jr z, .got_pointer + cp -1 + jr z, .invalid + inc c + inc hl + inc hl + jr .loop2 + +.invalid + ld hl, MailGFXPointers + inc hl + +.got_pointer + ld a, c + ld [wCurMailIndex], a + ld a, [hli] + ld h, [hl] + ld l, a + ld de, .done + pop bc + push de + jp hl +.done + ret + +MailGFXPointers: +; entries correspond to *MAIL_INDEX constants + table_width 3, MailGFXPointers + dbw FLOWER_MAIL, LoadFlowerMailGFX + dbw SURF_MAIL, LoadSurfMailGFX + dbw LITEBLUEMAIL, LoadLiteBlueMailGFX + dbw PORTRAITMAIL, LoadPortraitMailGFX + dbw LOVELY_MAIL, LoadLovelyMailGFX + dbw EON_MAIL, LoadEonMailGFX + dbw MORPH_MAIL, LoadMorphMailGFX + dbw BLUESKY_MAIL, LoadBlueSkyMailGFX + dbw MUSIC_MAIL, LoadMusicMailGFX + dbw MIRAGE_MAIL, LoadMirageMailGFX + assert_table_length NUM_MAIL + db -1 ; end + +LoadSurfMailGFX: + push bc + ld hl, vTiles2 tile $31 + ld de, SurfMailBorderGFX + ld c, 8 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, MailLaprasGFX + ld c, 6 * LEN_1BPP_TILE + call LoadMailGFX_Color3 + ld de, SurfMailWaveGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + jr FinishLoadingSurfLiteBlueMailGFX + +LoadLiteBlueMailGFX: + push bc + ld hl, vTiles2 tile $31 + ld de, LiteBlueMailBorderGFX + ld c, 8 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, MailDratiniGFX + ld c, 6 * LEN_1BPP_TILE + call LoadMailGFX_Color3 + ld de, PortraitMailUnderlineGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + +FinishLoadingSurfLiteBlueMailGFX: + ld de, SurfLiteBlueMailSmallShapesGFX + ld c, 2 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld c, 2 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, SurfLiteBlueMailLargeShapesGFX + ld c, 8 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld c, 8 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + + call DrawMailBorder + hlcoord 2, 15 + ld a, $3f + call Mail_Draw16TileRow + ld a, $39 + hlcoord 15, 14 + call Mail_Draw3x2Graphic + ld a, $44 + hlcoord 2, 2 + call Mail_Draw2x2Graphic + hlcoord 15, 11 + call Mail_Draw2x2Graphic + ld a, $4c + hlcoord 3, 12 + call Mail_Draw2x2Graphic + hlcoord 15, 2 + call Mail_Draw2x2Graphic + ld a, $50 + hlcoord 6, 3 + call Mail_Draw2x2Graphic + ld a, $40 + hlcoord 13, 2 + ld [hli], a + hlcoord 6, 14 + ld [hl], a + ld a, $41 + hlcoord 4, 5 + ld [hli], a + hlcoord 17, 5 + ld [hli], a + hlcoord 13, 12 + ld [hl], a + ld a, $42 + hlcoord 9, 2 + ld [hli], a + hlcoord 14, 5 + ld [hli], a + hlcoord 3, 10 + ld [hl], a + ld a, $43 + hlcoord 6, 11 + ld [hli], a + pop hl + jp MailGFX_PlaceMessage + +LoadEonMailGFX: + push bc + ld hl, vTiles2 tile $31 + ld de, EonMailBorder1GFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, EonMailBorder2GFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, EonMailBorder2GFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, EonMailBorder1GFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, SurfMailBorderGFX + 6 * LEN_1BPP_TILE + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, MailEeveeGFX + ld c, 6 * LEN_1BPP_TILE + call LoadMailGFX_Color3 + ld hl, vTiles2 tile $3d + ld de, MailLargeCircleGFX + ld c, 4 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, EonMailBorder2GFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + + ld a, $31 + hlcoord 0, 0 + call Mail_Place18TileAlternatingRow + hlcoord 1, 17 + call Mail_Place18TileAlternatingRow + ld a, $33 + hlcoord 0, 1 + call Mail_Place16TileAlternatingColumn + hlcoord 19, 0 + call Mail_Place16TileAlternatingColumn + hlcoord 2, 15 + ld a, $35 + call Mail_Draw16TileRow + inc a + hlcoord 15, 14 + call Mail_Draw3x2Graphic + call LovelyEonMail_PlaceIcons + pop hl + jp MailGFX_PlaceMessage + +LoadLovelyMailGFX: + push bc + ld hl, vTiles2 tile $31 + ld de, LovelyMailBorderGFX + ld c, 5 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, MailPoliwagGFX + ld c, 6 * LEN_1BPP_TILE + call LoadMailGFX_Color3 + ld de, LovelyMailUnderlineGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, LovelyMailLargeHeartGFX + ld c, 4 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, LovelyMailSmallHeartGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + + call DrawMailBorder2 + hlcoord 2, 15 + ld a, $3c + call Mail_Draw16TileRow + ld a, $36 + hlcoord 15, 14 + call Mail_Draw3x2Graphic + call LovelyEonMail_PlaceIcons + pop hl + jp MailGFX_PlaceMessage + +LovelyEonMail_PlaceIcons: + ld a, $3d + hlcoord 2, 2 + call Mail_Draw2x2Graphic + hlcoord 16, 2 + call Mail_Draw2x2Graphic + hlcoord 9, 4 + call Mail_Draw2x2Graphic + hlcoord 2, 11 + call Mail_Draw2x2Graphic + hlcoord 6, 12 + call Mail_Draw2x2Graphic + hlcoord 12, 11 + call Mail_Draw2x2Graphic + ld a, $41 + hlcoord 5, 4 + ld [hl], a + hlcoord 6, 2 + ld [hl], a + hlcoord 12, 4 + ld [hl], a + hlcoord 14, 2 + ld [hl], a + hlcoord 3, 13 + ld [hl], a + hlcoord 9, 11 + ld [hl], a + hlcoord 16, 12 + ld [hl], a + ret + +LoadMorphMailGFX: + push bc + ld hl, vTiles2 tile $31 + ld bc, 5 * LEN_1BPP_TILE + call MailGFX_GenerateMonochromeTilesColor2 + ld de, MorphMailBorderCornerGFX + 3 * LEN_1BPP_TILE + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, MorphMailBorderCornerGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, MorphMailBorderGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, EonMailBorder1GFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, MorphMailDividerGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, MailDittoGFX + ld c, 6 * LEN_1BPP_TILE + call LoadMailGFX_Color3 + call DrawMailBorder2 + ld a, $31 + hlcoord 1, 1 + call Mail_Draw2x2Graphic + hlcoord 17, 15 + call Mail_Draw2x2Graphic + hlcoord 1, 3 + ld [hl], a + hlcoord 3, 1 + ld [hl], a + hlcoord 16, 16 + ld [hl], a + hlcoord 18, 14 + ld [hl], a + ld a, $36 + hlcoord 1, 4 + ld [hl], a + hlcoord 2, 3 + ld [hl], a + hlcoord 3, 2 + ld [hl], a + hlcoord 4, 1 + ld [hl], a + inc a + hlcoord 15, 16 + ld [hl], a + hlcoord 16, 15 + ld [hl], a + hlcoord 17, 14 + ld [hl], a + hlcoord 18, 13 + ld [hl], a + inc a + hlcoord 2, 15 + ld b, $e + call Mail_DrawRowLoop + inc a + hlcoord 2, 11 + call Mail_Draw16TileRow + hlcoord 2, 5 + call Mail_Draw16TileRow + inc a + hlcoord 6, 1 + call Mail_Draw13TileRow + hlcoord 1, 16 + call Mail_Draw13TileRow + inc a + hlcoord 3, 13 + call Mail_Draw3x2Graphic + pop hl + jp MailGFX_PlaceMessage + +LoadBlueSkyMailGFX: + push bc + ld hl, vTiles2 tile $31 + ld de, EonMailBorder1GFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld a, $ff + ld bc, 1 tiles + call ByteFill + ld de, BlueSkyMailGrassGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color3 + ld de, MailDragoniteAndSentretGFX + ld c, 23 * LEN_1BPP_TILE + call LoadMailGFX_Color3 + ld de, MailCloudGFX + ld c, 6 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, FlowerMailBorderGFX + 6 * LEN_1BPP_TILE + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, MailCloudGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, MailCloudGFX + 2 * LEN_1BPP_TILE + ld c, 2 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, MailCloudGFX + 5 * LEN_1BPP_TILE + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + + ld a, $31 + hlcoord 0, 0 + call Mail_DrawFullWidthBorder + hlcoord 0, 1 + call Mail_DrawLeftRightBorder + hlcoord 19, 1 + call Mail_DrawLeftRightBorder + inc a + hlcoord 0, 17 + call Mail_DrawFullWidthBorder + inc a + hlcoord 0, 16 + call Mail_DrawFullWidthBorder + inc a + hlcoord 2, 2 + call Mail_Place6TileRow + hlcoord 3, 3 + call Mail_Place6TileRow + hlcoord 4, 4 + call Mail_Place6TileRow + dec hl + ld [hl], $7f + dec a + hlcoord 15, 14 + call Mail_Draw2x2Graphic + add $4 + hlcoord 15, 16 + ld [hli], a + inc a + ld [hl], a + inc a + push af + hlcoord 12, 1 + call Mail_Draw3x2Graphic + pop af + hlcoord 15, 4 + call Mail_Draw3x2Graphic + inc a + hlcoord 2, 11 + call Mail_Draw16TileRow + inc a + hlcoord 10, 3 + call Mail_Draw2x2Graphic + pop hl + jp MailGFX_PlaceMessage + +Mail_Place6TileRow: + ld b, $6 +.loop + ld [hli], a + inc a + dec b + jr nz, .loop + ret + +LoadFlowerMailGFX: + push bc + ld hl, vTiles2 tile $31 + ld de, FlowerMailBorderGFX + ld c, 8 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, MailOddishGFX + ld c, 4 * LEN_1BPP_TILE + call LoadMailGFX_Color3 + ld de, FlowerMailBorderGFX + 6 * LEN_1BPP_TILE + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, FlowerMailFlowerGFX + ld c, 4 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld c, 4 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + + call DrawMailBorder + hlcoord 2, 15 + ld a, $3d ; underline + call Mail_Draw16TileRow + ld a, $39 ; oddish + hlcoord 16, 13 + call Mail_Draw2x2Graphic + hlcoord 2, 13 + call Mail_Draw2x2Graphic + ld a, $3e + hlcoord 2, 2 + call Mail_Draw2x2Graphic + hlcoord 5, 3 + call Mail_Draw2x2Graphic + hlcoord 10, 2 + call Mail_Draw2x2Graphic + hlcoord 16, 3 + call Mail_Draw2x2Graphic + hlcoord 5, 11 + call Mail_Draw2x2Graphic + hlcoord 16, 10 + call Mail_Draw2x2Graphic + ld a, $42 + hlcoord 3, 4 + call Mail_Draw2x2Graphic + hlcoord 12, 3 + call Mail_Draw2x2Graphic + hlcoord 14, 2 + call Mail_Draw2x2Graphic + hlcoord 2, 10 + call Mail_Draw2x2Graphic + hlcoord 14, 11 + call Mail_Draw2x2Graphic + pop hl + jp MailGFX_PlaceMessage + +LoadPortraitMailGFX: + push bc + ld hl, vTiles2 tile $31 + ld de, PortraitMailBorderGFX + ld c, 5 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, PortraitMailUnderlineGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld hl, vTiles2 tile $3d + ld de, PortraitMailLargePokeballGFX + ld c, 4 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, PortraitMailSmallPokeballGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + + call DrawMailBorder2 + hlcoord 8, 15 + ld a, $36 + ld b, $a + call Mail_DrawRowLoop + call LovelyEonMail_PlaceIcons + ld a, $1 + ld [wUnownLetter], a + hlcoord 1, 10 + call PrepMonFrontpic + pop hl + jp MailGFX_PlaceMessage + +LoadMusicMailGFX: + push bc + ld hl, vTiles2 tile $31 + ld de, MusicMailBorderGFX + ld c, 4 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, MorphMailBorderGFX + ld c, 2 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, MailNatuGFX + ld c, 6 * LEN_1BPP_TILE + call LoadMailGFX_Color3 + xor a + ld bc, 1 tiles + call ByteFill + ld de, MusicMailLargeNoteGFX + ld c, 3 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, MusicMailSmallNoteGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + + ld a, $31 + hlcoord 0, 0 + call Mail_Place18TileAlternatingRow + hlcoord 1, 17 + call Mail_Place18TileAlternatingRow + ld a, $33 + hlcoord 0, 1 + call Mail_Place16TileAlternatingColumn + hlcoord 19, 0 + call Mail_Place16TileAlternatingColumn + ld a, $35 + hlcoord 2, 15 + call Mail_Place14TileAlternatingRow + ld a, $37 + hlcoord 15, 14 + call Mail_Draw3x2Graphic + call LovelyEonMail_PlaceIcons + pop hl + jp MailGFX_PlaceMessage + +LoadMirageMailGFX: + push bc + ld hl, vTiles2 tile $31 + ld bc, 5 * LEN_1BPP_TILE + call MailGFX_GenerateMonochromeTilesColor2 + ld de, BlueSkyMailGrassGFX + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, MailMewGFX + ld c, 18 * LEN_1BPP_TILE + call LoadMailGFX_Color2 + ld de, LiteBlueMailBorderGFX + 1 * LEN_1BPP_TILE + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + ld de, LiteBlueMailBorderGFX + 6 * LEN_1BPP_TILE + ld c, 1 * LEN_1BPP_TILE + call LoadMailGFX_Color1 + + call DrawMailBorder2 + ld a, $36 + hlcoord 1, 16 + call Mail_DrawTopBottomBorder + inc a + hlcoord 15, 14 + call Mail_Draw3x2Graphic + inc a + hlcoord 15, 16 + ld [hli], a + inc a + ld [hl], a + ld a, $3f + hlcoord 1, 1 + call Mail_Place18TileAlternatingRow + ld a, $41 + hlcoord 0, 2 + call Mail_Place14TileAlternatingColumn + ld a, $43 + hlcoord 19, 2 + call Mail_Place14TileAlternatingColumn + ld a, $45 + hlcoord 0, 1 + ld [hl], a + inc a + hlcoord 19, 1 + ld [hl], a + inc a + hlcoord 0, 16 + ld [hl], a + inc a + hlcoord 19, 16 + ld [hl], a + inc a + hlcoord 2, 5 + call Mail_Draw16TileRow + inc a + hlcoord 2, 11 + call Mail_Draw16TileRow + pop hl + jp MailGFX_PlaceMessage + +MailGFX_GenerateMonochromeTilesColor2: +.loop + xor a + ld [hli], a + ld a, $ff + ld [hli], a + dec bc + ld a, b + or c + jr nz, .loop + ret + +MailGFX_PlaceMessage: + ld bc, MAIL_STRUCT_LENGTH + ld de, wTempMail + ld a, BANK(sPartyMail) + call OpenSRAM + call CopyBytes + call CloseSRAM + ld hl, wTempMailAuthor + ld de, wMonOrItemNameBuffer + ld bc, NAME_LENGTH - 1 + call CopyBytes + ld a, "@" + ld [wTempMailAuthor], a + ld [wMonOrItemNameBuffer + NAME_LENGTH - 1], a + ld de, wTempMailMessage + hlcoord 2, 7 + call PlaceString + ld de, wMonOrItemNameBuffer + ld a, [de] + and a + ret z + ld a, [wCurMailIndex] + hlcoord 8, 14 + cp PORTRAITMAIL_INDEX + jr z, .place_author + hlcoord 6, 14 + cp MORPH_MAIL_INDEX + jr z, .place_author + hlcoord 5, 14 + +.place_author + jp PlaceString + +InvertBytes: ; unreferenced +; invert bc bytes starting at hl +.loop + ld a, [hl] + xor $ff + ld [hli], a + dec bc + ld a, b + or c + jr nz, .loop + ret + +DrawMailBorder: + hlcoord 0, 0 + ld a, $31 + ld [hli], a + inc a + call Mail_DrawTopBottomBorder + inc a + ld [hli], a + inc a + call Mail_DrawLeftRightBorder + ld a, $36 + ld [hli], a + inc a + call Mail_DrawTopBottomBorder + hlcoord 19, 1 + ld a, $35 + call Mail_DrawLeftRightBorder + ld a, $38 + ld [hl], a + ret + +DrawMailBorder2: + hlcoord 0, 0 + ld a, $31 + ld [hli], a + inc a + call Mail_DrawTopBottomBorder + ld [hl], $31 + inc hl + inc a + call Mail_DrawLeftRightBorder + ld [hl], $31 + inc hl + inc a + call Mail_DrawTopBottomBorder + hlcoord 19, 1 + ld a, $35 + call Mail_DrawLeftRightBorder + ld [hl], $31 + ret + +Mail_Place14TileAlternatingRow: + push af + ld b, 14 / 2 + jr Mail_PlaceAlternatingRow + +Mail_Place16TileAlternatingRow: ; unreferenced + push af + ld b, 16 / 2 + jr Mail_PlaceAlternatingRow + +Mail_Place18TileAlternatingRow: + push af + ld b, 18 / 2 + ; fallthrough + +Mail_PlaceAlternatingRow: +.loop + ld [hli], a + inc a + ld [hli], a + dec a + dec b + jr nz, .loop + ld [hl], a + pop af + ret + +Mail_Place14TileAlternatingColumn: + push af + ld b, 14 / 2 + jr Mail_PlaceAlternatingColumn + +Mail_Place16TileAlternatingColumn: + push af + ld b, 16 / 2 + +Mail_PlaceAlternatingColumn: +.loop + ld [hl], a + ld de, SCREEN_WIDTH + add hl, de + inc a + ld [hl], a + add hl, de + dec a + dec b + jr nz, .loop + ld [hl], a + pop af + ret + +Mail_Draw7TileRow: ; unreferenced + ld b, 7 + jr Mail_DrawRowLoop + +Mail_Draw13TileRow: + ld b, 13 + jr Mail_DrawRowLoop + +Mail_Draw16TileRow: + ld b, 16 + jr Mail_DrawRowLoop + +Mail_DrawTopBottomBorder: + ld b, SCREEN_WIDTH - 2 + jr Mail_DrawRowLoop + +Mail_DrawFullWidthBorder: + ld b, SCREEN_WIDTH + ; fallthrough + +Mail_DrawRowLoop: +.loop + ld [hli], a + dec b + jr nz, .loop + ret + +Mail_DrawLeftRightBorder: + ld b, SCREEN_HEIGHT - 2 + ld de, SCREEN_WIDTH +.loop + ld [hl], a + add hl, de + dec b + jr nz, .loop + ret + +Mail_Draw2x2Graphic: + push af + ld [hli], a + inc a + ld [hl], a + ld bc, SCREEN_WIDTH - 1 + add hl, bc + inc a + ld [hli], a + inc a + ld [hl], a + pop af + ret + +Mail_Draw3x2Graphic: + ld [hli], a + inc a + ld [hli], a + inc a + ld [hl], a + ld bc, SCREEN_WIDTH - 2 + add hl, bc + inc a + ld [hli], a + inc a + ld [hli], a + inc a + ld [hl], a + ret + +LoadMailGFX_Color1: +.loop + ld a, [de] + inc de + ld [hli], a + xor a + ld [hli], a + dec c + jr nz, .loop + ret + +LoadMailGFX_Color2: +.loop + xor a + ld [hli], a + ld a, [de] + inc de + ld [hli], a + dec c + jr nz, .loop + ret + +LoadMailGFX_Color3: +.loop + ld a, [de] + inc de + ld [hli], a + ld [hli], a + dec c + jr nz, .loop + ret + +INCLUDE "gfx/mail.asm" + +ItemIsMail: + ld a, d + ld hl, MailItems + ld de, 1 + jp IsInArray + +INCLUDE "data/items/mail_items.asm" diff --git a/engine/pokemon/mon_menu.asm b/engine/pokemon/mon_menu.asm new file mode 100644 index 0000000..84c6926 --- /dev/null +++ b/engine/pokemon/mon_menu.asm @@ -0,0 +1,1287 @@ +HasNoItems: + ld a, [wNumItems] + and a + ret nz + ld a, [wNumKeyItems] + and a + ret nz + ld a, [wNumBalls] + and a + ret nz + ld hl, wTMsHMs + ld b, NUM_TMS + NUM_HMS +.loop + ld a, [hli] + and a + jr nz, .done + dec b + jr nz, .loop + scf + ret +.done + and a + ret + +TossItemFromPC: + push de + call PartyMonItemName + farcall _CheckTossableItem + ld a, [wItemAttributeValue] + and a + jr nz, .key_item + ld hl, .ItemsTossOutHowManyText + call MenuTextbox + farcall SelectQuantityToToss + push af + call CloseWindow + call ExitMenu + pop af + jr c, .quit + ld hl, .ItemsThrowAwayText + call MenuTextbox + call YesNoBox + push af + call ExitMenu + pop af + jr c, .quit + pop hl + ld a, [wCurItemQuantity] + call TossItem + call PartyMonItemName + ld hl, .ItemsDiscardedText + call MenuTextbox + call ExitMenu + and a + ret + +.key_item + call .CantToss +.quit + pop hl + scf + ret + +.ItemsTossOutHowManyText: + text_far _ItemsTossOutHowManyText + text_end + +.ItemsThrowAwayText: + text_far _ItemsThrowAwayText + text_end + +.ItemsDiscardedText: + text_far _ItemsDiscardedText + text_end + +.CantToss: + ld hl, .ItemsTooImportantText + call MenuTextboxBackup + ret + +.ItemsTooImportantText: + text_far _ItemsTooImportantText + text_end + +CantUseItem: + ld hl, ItemsOakWarningText + call MenuTextboxWaitButton + ret + +ItemsOakWarningText: + text_far _ItemsOakWarningText + text_end + +PartyMonItemName: + ld a, [wCurItem] + ld [wNamedObjectIndex], a + call GetItemName + call CopyName1 + ret + +CancelPokemonAction: + farcall InitPartyMenuWithCancel + farcall UnfreezeMonIcons + ld a, 1 + ret + +PokemonActionSubmenu: + hlcoord 1, 15 + lb bc, 2, 18 + call ClearBox + farcall MonSubmenu + call GetCurNickname + ld a, [wMenuSelection] + ld hl, .Actions + ld de, 3 + call IsInArray + jr nc, .nothing + + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.nothing + ld a, 0 + ret + +.Actions: + dbw MONMENUITEM_CUT, MonMenu_Cut + dbw MONMENUITEM_FLY, MonMenu_Fly + dbw MONMENUITEM_SURF, MonMenu_Surf + dbw MONMENUITEM_STRENGTH, MonMenu_Strength + dbw MONMENUITEM_FLASH, MonMenu_Flash + dbw MONMENUITEM_WHIRLPOOL, MonMenu_Whirlpool + dbw MONMENUITEM_DIG, MonMenu_Dig + dbw MONMENUITEM_TELEPORT, MonMenu_Teleport + dbw MONMENUITEM_SOFTBOILED, MonMenu_Softboiled_MilkDrink + dbw MONMENUITEM_MILKDRINK, MonMenu_Softboiled_MilkDrink + dbw MONMENUITEM_HEADBUTT, MonMenu_Headbutt + dbw MONMENUITEM_WATERFALL, MonMenu_Waterfall + dbw MONMENUITEM_ROCKSMASH, MonMenu_RockSmash + dbw MONMENUITEM_SWEETSCENT, MonMenu_SweetScent + dbw MONMENUITEM_STATS, OpenPartyStats + dbw MONMENUITEM_SWITCH, SwitchPartyMons + dbw MONMENUITEM_ITEM, GiveTakePartyMonItem + dbw MONMENUITEM_CANCEL, CancelPokemonAction + dbw MONMENUITEM_MOVE, ManagePokemonMoves + dbw MONMENUITEM_MAIL, MonMailAction + +SwitchPartyMons: +; Don't try if there's nothing to switch! + ld a, [wPartyCount] + cp 2 + jr c, .DontSwitch + + ld a, [wCurPartyMon] + inc a + ld [wSwitchMon], a + + farcall HoldSwitchmonIcon + farcall InitPartyMenuNoCancel + + ld a, PARTYMENUACTION_MOVE + ld [wPartyMenuActionText], a + farcall WritePartyMenuTilemap + farcall PrintPartyMenuText + + hlcoord 0, 1 + ld bc, SCREEN_WIDTH * 2 + ld a, [wSwitchMon] + dec a + call AddNTimes + ld [hl], "▷" + call WaitBGMap + call SetPalettes + call DelayFrame + + farcall PartyMenuSelect + bit 1, b + jr c, .DontSwitch + + farcall _SwitchPartyMons + + xor a + ld [wPartyMenuActionText], a + + farcall LoadPartyMenuGFX + farcall InitPartyMenuWithCancel + farcall InitPartyMenuGFX + + ld a, 1 + ret + +.DontSwitch: + xor a + ld [wPartyMenuActionText], a + call CancelPokemonAction + ret + +GiveTakePartyMonItem: +; Eggs can't hold items! + ld a, [wCurPartySpecies] + cp EGG + jr z, .cancel + + ld hl, GiveTakeItemMenuData + call LoadMenuHeader + call VerticalMenu + call ExitMenu + jr c, .cancel + + call GetCurNickname + ld hl, wStringBuffer1 + ld de, wMonOrItemNameBuffer + ld bc, MON_NAME_LENGTH + call CopyBytes + ld a, [wMenuCursorY] + cp 1 + jr nz, .take + + call LoadStandardMenuHeader + call ClearPalettes + call .GiveItem + call ClearPalettes + call LoadFontsBattleExtra + call ExitMenu + ld a, 0 + ret + +.take + call TakePartyItem + ld a, 3 + ret + +.cancel + ld a, 3 + ret + +.GiveItem: + farcall DepositSellInitPackBuffers + +.loop + farcall DepositSellPack + + ld a, [wPackUsedItem] + and a + jr z, .quit + + ld a, [wCurPocket] + cp KEY_ITEM_POCKET + jr z, .next + + call CheckTossableItem + ld a, [wItemAttributeValue] + and a + jr nz, .next + + call TryGiveItemToPartymon + jr .quit + +.next + ld hl, ItemCantHeldText + call MenuTextboxBackup + jr .loop + +.quit + ret + +TryGiveItemToPartymon: + call SpeechTextbox + call PartyMonItemName + call GetPartyItemLocation + ld a, [hl] + and a + jr z, .give_item_to_mon + + push hl + ld d, a + farcall ItemIsMail + pop hl + jr c, .please_remove_mail + ld a, [hl] + jr .already_holding_item + +.give_item_to_mon + call GiveItemToPokemon + ld hl, PokemonHoldItemText + call MenuTextboxBackup + call GivePartyItem + ret + +.please_remove_mail + ld hl, PokemonRemoveMailText + call MenuTextboxBackup + ret + +.already_holding_item + ld [wNamedObjectIndex], a + call GetItemName + ld hl, PokemonAskSwapItemText + call StartMenuYesNo + jr c, .abort + + call GiveItemToPokemon + ld a, [wNamedObjectIndex] + push af + ld a, [wCurItem] + ld [wNamedObjectIndex], a + pop af + ld [wCurItem], a + call ReceiveItemFromPokemon + jr nc, .bag_full + + ld hl, PokemonSwapItemText + call MenuTextboxBackup + ld a, [wNamedObjectIndex] + ld [wCurItem], a + call GivePartyItem + ret + +.bag_full + ld a, [wNamedObjectIndex] + ld [wCurItem], a + call ReceiveItemFromPokemon + ld hl, ItemStorageFullText + call MenuTextboxBackup + +.abort + ret + +GivePartyItem: + call GetPartyItemLocation + ld a, [wCurItem] + ld [hl], a + ld d, a + farcall ItemIsMail + jr nc, .done + call ComposeMailMessage + +.done + ret + +TakePartyItem: + call SpeechTextbox + call GetPartyItemLocation + ld a, [hl] + and a + jr z, .not_holding_item + + ld [wCurItem], a + call ReceiveItemFromPokemon + jr nc, .item_storage_full + + farcall ItemIsMail + call GetPartyItemLocation + ld a, [hl] + ld [wNamedObjectIndex], a + ld [hl], NO_ITEM + call GetItemName + ld hl, PokemonTookItemText + call MenuTextboxBackup + jr .done + +.not_holding_item + ld hl, PokemonNotHoldingText + call MenuTextboxBackup + jr .done + +.item_storage_full + ld hl, ItemStorageFullText + call MenuTextboxBackup + +.done + ret + +GiveTakeItemMenuData: + db MENU_SPRITE_ANIMS | MENU_BACKUP_TILES ; flags + menu_coords 12, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .Items + db 1 ; default option + +.Items: + db STATICMENU_CURSOR ; flags + db 2 ; # items + db "GIVE@" + db "TAKE@" + +PokemonSwapItemText: + text_far _PokemonSwapItemText + text_end + +PokemonHoldItemText: + text_far _PokemonHoldItemText + text_end + +PokemonRemoveMailText: + text_far _PokemonRemoveMailText + text_end + +PokemonNotHoldingText: + text_far _PokemonNotHoldingText + text_end + +ItemStorageFullText: + text_far _ItemStorageFullText + text_end + +PokemonTookItemText: + text_far _PokemonTookItemText + text_end + +PokemonAskSwapItemText: + text_far _PokemonAskSwapItemText + text_end + +ItemCantHeldText: + text_far _ItemCantHeldText + text_end + +GetPartyItemLocation: + push af + ld a, MON_ITEM + call GetPartyParamLocation + pop af + ret + +ReceiveItemFromPokemon: + ld a, 1 + ld [wItemQuantityChange], a + ld hl, wNumItems + jp ReceiveItem + +GiveItemToPokemon: + ld a, 1 + ld [wItemQuantityChange], a + ld hl, wNumItems + jp TossItem + +StartMenuYesNo: + call MenuTextbox + call YesNoBox + jp ExitMenu + +ComposeMailMessage: + ld de, wTempMailMessage + farcall _ComposeMailMessage + ld hl, wPlayerName + ld de, wTempMailAuthor + ld bc, NAME_LENGTH - 1 + call CopyBytes + ld hl, wPlayerID + ld bc, 2 + call CopyBytes + ld a, [wCurPartySpecies] + ld [de], a + inc de + ld a, [wCurItem] + ld [de], a + ld a, [wCurPartyMon] + ld hl, sPartyMail + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + ld d, h + ld e, l + ld hl, wTempMail + ld bc, MAIL_STRUCT_LENGTH + ld a, BANK(sPartyMail) + call OpenSRAM + call CopyBytes + call CloseSRAM + ret + +MonMailAction: +; If in the time capsule or trade center, +; selecting the mail only allows you to +; read the mail. + ld a, [wLinkMode] + cp LINK_TIMECAPSULE + jr z, .read + cp LINK_TRADECENTER + jr z, .read + +; Show the READ/TAKE/QUIT menu. + ld hl, .MenuHeader + call LoadMenuHeader + call VerticalMenu + call ExitMenu + +; Interpret the menu. + jp c, .done + ld a, [wMenuCursorY] + cp $1 + jr z, .read + cp $2 + jr z, .take + jp .done + +.read + farcall ReadPartyMonMail + ld a, $0 + ret + +.take + ld hl, .MailAskSendToPCText + call StartMenuYesNo + jr c, .RemoveMailToBag + ld a, [wCurPartyMon] + ld b, a + farcall SendMailToPC + jr c, .MailboxFull + ld hl, .MailSentToPCText + call MenuTextboxBackup + jr .done + +.MailboxFull: + ld hl, .MailboxFullText + call MenuTextboxBackup + jr .done + +.RemoveMailToBag: + ld hl, .MailLoseMessageText + call StartMenuYesNo + jr c, .done + call GetPartyItemLocation + ld a, [hl] + ld [wCurItem], a + call ReceiveItemFromPokemon + jr nc, .BagIsFull + call GetPartyItemLocation + ld [hl], $0 + call GetCurNickname + ld hl, .MailDetachedText + call MenuTextboxBackup + jr .done + +.BagIsFull: + ld hl, .MailNoSpaceText + call MenuTextboxBackup + jr .done + +.done + ld a, $3 + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 12, 10, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 3 ; items + db "READ@" + db "TAKE@" + db "QUIT@" + +.MailLoseMessageText: + text_far _MailLoseMessageText + text_end + +.MailDetachedText: + text_far _MailDetachedText + text_end + +.MailNoSpaceText: + text_far _MailNoSpaceText + text_end + +.MailAskSendToPCText: + text_far _MailAskSendToPCText + text_end + +.MailboxFullText: + text_far _MailboxFullText + text_end + +.MailSentToPCText: + text_far _MailSentToPCText + text_end + +OpenPartyStats: + call LoadStandardMenuHeader + call ClearSprites +; PartyMon + xor a + ld [wMonType], a + call LowVolume + predef StatsScreenInit + call MaxVolume + call ExitMenu + ld a, 0 + ret + +MonMenu_Cut: + farcall CutFunction + ld a, [wFieldMoveSucceeded] + cp $1 + jr nz, .Fail + ld b, $4 + ld a, $2 + ret + +.Fail: + ld a, $3 + ret + +MonMenu_Fly: + farcall FlyFunction + ld a, [wFieldMoveSucceeded] + cp $2 + jr z, .Fail + cp $0 + jr z, .Error + farcall StubbedTrainerRankings_Fly + ld b, $4 + ld a, $2 + ret + +.Fail: + ld a, $3 + ret + +.Error: + ld a, $0 + ret + +.NoReload: ; unreferenced + ld a, $1 + ret + +MonMenu_Flash: + farcall FlashFunction + ld a, [wFieldMoveSucceeded] + cp $1 + jr nz, .Fail + ld b, $4 + ld a, $2 + ret + +.Fail: + ld a, $3 + ret + +MonMenu_Strength: + farcall StrengthFunction + ld a, [wFieldMoveSucceeded] + cp $1 + jr nz, .Fail + ld b, $4 + ld a, $2 + ret + +.Fail: + ld a, $3 + ret + +MonMenu_Whirlpool: + farcall WhirlpoolFunction + ld a, [wFieldMoveSucceeded] + cp $1 + jr nz, .Fail + ld b, $4 + ld a, $2 + ret + +.Fail: + ld a, $3 + ret + +MonMenu_Waterfall: + farcall WaterfallFunction + ld a, [wFieldMoveSucceeded] + cp $1 + jr nz, .Fail + ld b, $4 + ld a, $2 + ret + +.Fail: + ld a, $3 + ret + +MonMenu_Teleport: + farcall TeleportFunction + ld a, [wFieldMoveSucceeded] + and a + jr z, .Fail + ld b, $4 + ld a, $2 + ret + +.Fail: + ld a, $3 + ret + +MonMenu_Surf: + farcall SurfFunction + ld a, [wFieldMoveSucceeded] + and a + jr z, .Fail + ld b, $4 + ld a, $2 + ret + +.Fail: + ld a, $3 + ret + +MonMenu_Dig: + farcall DigFunction + ld a, [wFieldMoveSucceeded] + cp $1 + jr nz, .Fail + ld b, $4 + ld a, $2 + ret + +.Fail: + ld a, $3 + ret + +MonMenu_Softboiled_MilkDrink: + call .CheckMonHasEnoughHP + jr nc, .NotEnoughHP + farcall Softboiled_MilkDrinkFunction + jr .finish + +.NotEnoughHP: + ld hl, .PokemonNotEnoughHPText + call PrintText + +.finish + xor a + ld [wPartyMenuActionText], a + ld a, $3 + ret + +.PokemonNotEnoughHPText: + text_far _PokemonNotEnoughHPText + text_end + +.CheckMonHasEnoughHP: +; Need to have at least (MaxHP / 5) HP left. + ld a, MON_MAXHP + call GetPartyParamLocation + ld a, [hli] + ldh [hDividend + 0], a + ld a, [hl] + ldh [hDividend + 1], a + ld a, 5 + ldh [hDivisor], a + ld b, 2 + call Divide + ld a, MON_HP + 1 + call GetPartyParamLocation + ldh a, [hQuotient + 3] + sub [hl] + dec hl + ldh a, [hQuotient + 2] + sbc [hl] + ret + +MonMenu_Headbutt: + farcall HeadbuttFunction + ld a, [wFieldMoveSucceeded] + cp $1 + jr nz, .Fail + ld b, $4 + ld a, $2 + ret + +.Fail: + ld a, $3 + ret + +MonMenu_RockSmash: + farcall RockSmashFunction + ld a, [wFieldMoveSucceeded] + cp $1 + jr nz, .Fail + ld b, $4 + ld a, $2 + ret + +.Fail: + ld a, $3 + ret + +MonMenu_SweetScent: + farcall SweetScentFromMenu + ld b, $4 + ld a, $2 + ret + +ChooseMoveToDelete: + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + call LoadFontsBattleExtra + call .ChooseMoveToDelete + pop bc + ld a, b + ld [wOptions], a + push af + call ClearBGPalettes + pop af + ret + +.ChooseMoveToDelete + call SetUpMoveScreenBG + ld de, DeleteMoveScreen2DMenuData + call Load2DMenuData + call SetUpMoveList + ld hl, w2DMenuFlags1 + set 6, [hl] + jr .enter_loop + +.loop + call ScrollingMenuJoypad + bit B_BUTTON_F, a + jp nz, .b_button + bit A_BUTTON_F, a + jp nz, .a_button + +.enter_loop + call PrepareToPlaceMoveData + call PlaceMoveData + jp .loop + +.a_button + and a + jr .finish + +.b_button + scf + +.finish + push af + xor a + ld [wSwitchMon], a + ld hl, w2DMenuFlags1 + res 6, [hl] + call ClearSprites + call ClearTilemap + pop af + ret + +DeleteMoveScreen2DMenuData: + db 3, 1 ; cursor start y, x + db 3, 1 ; rows, columns + db $40, $00 ; flags + dn 2, 0 ; cursor offset + db D_UP | D_DOWN | A_BUTTON | B_BUTTON ; accepted buttons + +ManagePokemonMoves: + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + call MoveScreenLoop + pop af + ld [wOptions], a + call ClearBGPalettes + +.egg + ld a, $0 + ret + +MoveScreenLoop: + ld a, [wCurPartyMon] + inc a + ld [wPartyMenuCursor], a + call SetUpMoveScreenBG + call PlaceMoveScreenArrows + ld de, MoveScreen2DMenuData + call Load2DMenuData +.loop + call SetUpMoveList + ld hl, w2DMenuFlags1 + set 6, [hl] + jr .skip_joy + +.joy_loop + call ScrollingMenuJoypad + bit 1, a + jp nz, .b_button + bit 0, a + jp nz, .a_button + bit 4, a + jp nz, .d_right + bit 5, a + jp nz, .d_left + +.skip_joy + call PrepareToPlaceMoveData + ld a, [wSwappingMove] + and a + jr nz, .moving_move + call PlaceMoveData + jp .joy_loop + +.moving_move + ld a, " " + hlcoord 1, 11 + ld bc, 5 + call ByteFill + hlcoord 1, 12 + lb bc, 5, SCREEN_WIDTH - 2 + call ClearBox + hlcoord 1, 12 + ld de, String_MoveWhere + call PlaceString + jp .joy_loop +.b_button + call PlayClickSFX + call WaitSFX + ld a, [wSwappingMove] + and a + jp z, .exit + + ld a, [wSwappingMove] + ld [wMenuCursorY], a + xor a + ld [wSwappingMove], a + hlcoord 1, 2 + lb bc, 8, SCREEN_WIDTH - 2 + call ClearBox + jp .loop + +.d_right + ld a, [wSwappingMove] + and a + jp nz, .joy_loop + + ld a, [wCurPartyMon] + ld b, a + push bc + call .cycle_right + pop bc + ld a, [wCurPartyMon] + cp b + jp z, .joy_loop + jp MoveScreenLoop + +.d_left + ld a, [wSwappingMove] + and a + jp nz, .joy_loop + ld a, [wCurPartyMon] + ld b, a + push bc + call .cycle_left + pop bc + ld a, [wCurPartyMon] + cp b + jp z, .joy_loop + jp MoveScreenLoop + +.cycle_right + ld a, [wCurPartyMon] + inc a + ld [wCurPartyMon], a + ld c, a + ld b, 0 + ld hl, wPartySpecies + add hl, bc + ld a, [hl] + cp -1 + jr z, .cycle_left + cp EGG + ret nz + jr .cycle_right + +.cycle_left + ld a, [wCurPartyMon] + and a + ret z +.cycle_left_loop + ld a, [wCurPartyMon] + dec a + ld [wCurPartyMon], a + ld c, a + ld b, 0 + ld hl, wPartySpecies + add hl, bc + ld a, [hl] + cp EGG + ret nz + ld a, [wCurPartyMon] + and a + jr z, .cycle_right + jr .cycle_left_loop + +.a_button + call PlayClickSFX + call WaitSFX + ld a, [wSwappingMove] + and a + jr nz, .place_move + ld a, [wMenuCursorY] + ld [wSwappingMove], a + call PlaceHollowCursor + jp .moving_move + +.place_move + ld hl, wPartyMon1Moves + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + push hl + call .copy_move + pop hl + ld bc, wPartyMon1PP - wPartyMon1Moves + add hl, bc + call .copy_move + ld a, [wBattleMode] + jr z, .swap_moves + ld hl, wBattleMonMoves + ld bc, wBattleMonStructEnd - wBattleMon + ld a, [wCurPartyMon] + call AddNTimes + push hl + call .copy_move + pop hl + ld bc, wBattleMonPP - wBattleMonMoves + add hl, bc + call .copy_move + +.swap_moves + ld de, SFX_SWITCH_POKEMON + call PlaySFX + call WaitSFX + ld de, SFX_SWITCH_POKEMON + call PlaySFX + call WaitSFX + hlcoord 1, 2 + lb bc, 8, 18 + call ClearBox + hlcoord 10, 10 + lb bc, 1, 9 + call ClearBox + jp .loop + +.copy_move + push hl + ld a, [wMenuCursorY] + dec a + ld c, a + ld b, 0 + add hl, bc + ld d, h + ld e, l + pop hl + ld a, [wSwappingMove] + dec a + ld c, a + ld b, 0 + add hl, bc + ld a, [de] + ld b, [hl] + ld [hl], a + ld a, b + ld [de], a + ret + +.exit + xor a + ld [wSwappingMove], a + ld hl, w2DMenuFlags1 + res 6, [hl] + call ClearSprites + jp ClearTilemap + +MoveScreen2DMenuData: + db 3, 1 ; cursor start y, x + db 3, 1 ; rows, columns + db $40, $00 ; flags + dn 2, 0 ; cursor offsets + db D_UP | D_DOWN | D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON ; accepted buttons + +String_MoveWhere: + db "Where?@" + +SetUpMoveScreenBG: + call ClearBGPalettes + call ClearTilemap + call ClearSprites + xor a + ldh [hBGMapMode], a + farcall LoadStatsScreenPageTilesGFX + farcall ClearSpriteAnims2 + ld a, [wCurPartyMon] + ld e, a + ld d, 0 + ld hl, wPartySpecies + add hl, de + ld a, [hl] + ld [wTempIconSpecies], a + ld e, MONICON_MOVES + farcall LoadMenuMonIcon + hlcoord 0, 1 + ld b, 9 + ld c, 18 + call Textbox + hlcoord 0, 11 + ld b, 5 + ld c, 18 + call Textbox + hlcoord 2, 0 + lb bc, 2, 3 + call ClearBox + xor a + ld [wMonType], a + ld hl, wPartyMonNicknames + ld a, [wCurPartyMon] + call GetNickname + hlcoord 5, 1 + call PlaceString + push bc + farcall CopyMonToTempMon + pop hl + call PrintLevel + ld hl, wPlayerHPPal + call SetHPPal + ld b, SCGB_MOVE_LIST + call GetSGBLayout + hlcoord 16, 0 + lb bc, 1, 3 + jp ClearBox + +SetUpMoveList: + xor a + ldh [hBGMapMode], a + ld [wSwappingMove], a + ld [wMonType], a + predef CopyMonToTempMon + ld hl, wTempMonMoves + ld de, wListMoves_MoveIndicesBuffer + ld bc, NUM_MOVES + call CopyBytes + ld a, SCREEN_WIDTH * 2 + ld [wListMovesLineSpacing], a + hlcoord 2, 3 + predef ListMoves + hlcoord 10, 4 + predef ListMovePP + call WaitBGMap + call SetPalettes + ld a, [wNumMoves] + inc a + ld [w2DMenuNumRows], a + hlcoord 0, 11 + ld b, 5 + ld c, 18 + jp Textbox + +PrepareToPlaceMoveData: + ld hl, wPartyMon1Moves + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld a, [wMenuCursorY] + dec a + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ld [wCurSpecies], a + hlcoord 1, 12 + lb bc, 5, 18 + jp ClearBox + +PlaceMoveData: + xor a + ldh [hBGMapMode], a + hlcoord 0, 10 + ld de, String_MoveType_Top + call PlaceString + hlcoord 0, 11 + ld de, String_MoveType_Bottom + call PlaceString + hlcoord 12, 12 + ld de, String_MoveAtk + call PlaceString + ld a, [wCurSpecies] + ld b, a + hlcoord 2, 12 + predef PrintMoveType + ld a, [wCurSpecies] + ld l, a + ld a, MOVE_POWER + call GetMoveAttribute + hlcoord 16, 12 + cp 2 + jr c, .no_power + ld [wTextDecimalByte], a + ld de, wTextDecimalByte + lb bc, 1, 3 + call PrintNum + jr .description + +.no_power + ld de, String_MoveNoPower + call PlaceString + +.description + hlcoord 1, 14 + predef PrintMoveDescription + ld a, $1 + ldh [hBGMapMode], a + ret + +String_MoveType_Top: + db "┌─────┐@" +String_MoveType_Bottom: + db "│TYPE/└@" +String_MoveAtk: + db "ATK/@" +String_MoveNoPower: + db "---@" + +PlaceMoveScreenArrows: + call PlaceMoveScreenLeftArrow + call PlaceMoveScreenRightArrow + ret + +PlaceMoveScreenLeftArrow: + ld a, [wCurPartyMon] + and a + ret z + ld c, a + ld e, a + ld d, 0 + ld hl, wPartyCount + add hl, de +.loop + ld a, [hl] + and a + jr z, .prev + cp MON_TABLE_ENTRIES + 1 + jr c, .legal + +.prev + dec hl + dec c + jr nz, .loop + ret + +.legal + hlcoord 16, 0 + ld [hl], "◀" + ret + +PlaceMoveScreenRightArrow: + ld a, [wCurPartyMon] + inc a + ld c, a + ld a, [wPartyCount] + cp c + ret z + ld e, c + ld d, 0 + ld hl, wPartySpecies + add hl, de +.loop + ld a, [hl] + cp -1 + ret z + and a + jr z, .next + cp MON_TABLE_ENTRIES + 1 + jr c, .legal + +.next + inc hl + jr .loop + +.legal + hlcoord 18, 0 + ld [hl], "▶" + ret diff --git a/engine/pokemon/mon_stats.asm b/engine/pokemon/mon_stats.asm new file mode 100644 index 0000000..2bf5659 --- /dev/null +++ b/engine/pokemon/mon_stats.asm @@ -0,0 +1,491 @@ +DrawPlayerHP: + ld a, $1 + jr DrawHP + +DrawEnemyHP: + ld a, $2 + +DrawHP: + ld [wWhichHPBar], a + push hl + push bc + ; box mons have full HP + ld a, [wMonType] + cp BOXMON + jr z, .at_least_1_hp + + ld a, [wTempMonHP] + ld b, a + ld a, [wTempMonHP + 1] + ld c, a + +; Any HP? + or b + jr nz, .at_least_1_hp + + xor a + ld c, a + ld e, a + ld a, 6 + ld d, a + jp .fainted + +.at_least_1_hp + ld a, [wTempMonMaxHP] + ld d, a + ld a, [wTempMonMaxHP + 1] + ld e, a + ld a, [wMonType] + cp BOXMON + jr nz, .not_boxmon + + ld b, d + ld c, e + +.not_boxmon + predef ComputeHPBarPixels + ld a, 6 + ld d, a + ld c, a + +.fainted + ld a, c + pop bc + ld c, a + pop hl + push de + push hl + push hl + call DrawBattleHPBar + pop hl + +; Print HP + bccoord 1, 1, 0 + add hl, bc + ld de, wTempMonHP + ld a, [wMonType] + cp BOXMON + jr nz, .not_boxmon_2 + ld de, wTempMonMaxHP +.not_boxmon_2 + lb bc, 2, 3 + call PrintNum + + ld a, "/" + ld [hli], a + +; Print max HP + ld de, wTempMonMaxHP + lb bc, 2, 3 + call PrintNum + pop hl + pop de + ret + +PrintTempMonStats: +; Print wTempMon's stats at hl, with spacing bc. + push bc + push hl + ld de, .StatNames + call PlaceString + pop hl + pop bc + add hl, bc + ld bc, SCREEN_WIDTH + add hl, bc + ld de, wTempMonAttack + lb bc, 2, 3 + call .PrintStat + ld de, wTempMonDefense + call .PrintStat + ld de, wTempMonSpclAtk + call .PrintStat + ld de, wTempMonSpclDef + call .PrintStat + ld de, wTempMonSpeed + jp PrintNum + +.PrintStat: + push hl + call PrintNum + pop hl + ld de, SCREEN_WIDTH * 2 + add hl, de + ret + +.StatNames: + db "ATTACK" + next "DEFENSE" + next "SPCL.ATK" + next "SPCL.DEF" + next "SPEED" + next "@" + +GetGender: +; Return the gender of a given monster (wCurPartyMon/wCurOTMon/wCurWildMon). +; When calling this function, a should be set to an appropriate wMonType value. + +; return values: +; a = 1: f = nc|nz; male +; a = 0: f = nc|z; female +; f = c: genderless + +; This is determined by comparing the Attack and Speed DVs +; with the species' gender ratio. + +; Figure out what type of monster struct we're looking at. + +; 0: PartyMon + ld hl, wPartyMon1DVs + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wMonType] + and a + jr z, .PartyMon + +; 1: OTPartyMon + ld hl, wOTPartyMon1DVs + dec a + jr z, .PartyMon + +; 2: sBoxMon + ld hl, sBoxMon1DVs + ld bc, BOXMON_STRUCT_LENGTH + dec a + jr z, .sBoxMon + +; 3: Unknown + ld hl, wTempMonDVs + dec a + jr z, .DVs + +; else: WildMon + ld hl, wEnemyMonDVs + jr .DVs + +; Get our place in the party/box. + +.PartyMon: +.sBoxMon + ld a, [wCurPartyMon] + call AddNTimes + +.DVs: +; sBoxMon data is read directly from SRAM. + ld a, [wMonType] + cp BOXMON + ld a, BANK(sBox) + call z, OpenSRAM + +; Attack DV + ld a, [hli] + and $f0 + ld b, a +; Speed DV + ld a, [hl] + and $f0 + swap a + +; Put our DVs together. + or b + ld b, a + +; Close SRAM if we were dealing with a sBoxMon. + ld a, [wMonType] + cp BOXMON + call z, CloseSRAM + +; We need the gender ratio to do anything with this. + push bc + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld b, h + ld c, l + ld hl, BaseData + ld a, BANK(BaseData) + call LoadIndirectPointer + ld bc, BASE_GENDER + add hl, bc + pop bc + jr z, .Genderless + + call GetFarByte + +; The higher the ratio, the more likely the monster is to be female. + + cp GENDER_UNKNOWN + jr z, .Genderless + + and a ; GENDER_F0? + jr z, .Male + + cp GENDER_F100 + jr z, .Female + +; Values below the ratio are male, and vice versa. + cp b + jr c, .Male + +.Female: + xor a + ret + +.Male: + ld a, 1 + and a + ret + +.Genderless: + scf + ret + +ListMovePP: + ld a, [wNumMoves] + inc a + ld c, a + ld a, NUM_MOVES + sub c + ld b, a + push hl + ld a, [wListMovesLineSpacing] + ld e, a + ld d, 0 + ld a, $3e ; P + call .load_loop + ld a, b + and a + jr z, .skip + ld c, a + ld a, "-" + call .load_loop + +.skip + pop hl + inc hl + inc hl + inc hl + ld d, h + ld e, l + ld hl, wTempMonMoves + ld b, 0 +.loop + ld a, [hli] + and a + jr z, .done + push bc + push hl + push de + ld hl, wMenuCursorY + ld a, [hl] + push af + ld [hl], b + push hl + callfar GetMaxPPOfMove + pop hl + pop af + ld [hl], a + pop de + pop hl + push hl + ld bc, wTempMonPP - (wTempMonMoves + 1) + add hl, bc + ld a, [hl] + and $3f + ld [wStringBuffer1 + 4], a + ld h, d + ld l, e + push hl + ld de, wStringBuffer1 + 4 + lb bc, 1, 2 + call PrintNum + ld a, "/" + ld [hli], a + ld de, wTempPP + lb bc, 1, 2 + call PrintNum + pop hl + ld a, [wListMovesLineSpacing] + ld e, a + ld d, 0 + add hl, de + ld d, h + ld e, l + pop hl + pop bc + inc b + ld a, b + cp NUM_MOVES + jr nz, .loop + +.done + ret + +.load_loop + ld [hli], a + ld [hld], a + add hl, de + dec c + jr nz, .load_loop + ret + +BrokenPlacePPUnits: ; unreferenced +; Probably would have these parameters: +; hl = starting coordinate +; de = SCREEN_WIDTH or SCREEN_WIDTH * 2 +; c = the number of moves (1-4) +.loop + ld [hl], $32 ; typo for P? + inc hl + ld [hl], $3e ; P + dec hl + add hl, de + dec c + jr nz, .loop + ret + +Unused_PlaceEnemyHPLevel: + push hl + push hl + ld hl, wPartyMonNicknames + ld a, [wCurPartyMon] + call GetNickname + pop hl + call PlaceString + call CopyMonToTempMon + pop hl + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + push hl + ld bc, -12 + add hl, bc + ld b, 0 + call DrawEnemyHP + pop hl + ld bc, 5 + add hl, bc + push de + call PrintLevel + pop de + +.egg + ret + +PlaceStatusString: +; Return nz if the status is not OK + push de + inc de + inc de + ld a, [de] + ld b, a + inc de + ld a, [de] + or b + pop de + jr nz, PlaceNonFaintStatus + push de + ld de, FntString + call CopyStatusString + pop de + ld a, TRUE + and a + ret + +FntString: + db "FNT@" + +CopyStatusString: + ld a, [de] + inc de + ld [hli], a + ld a, [de] + inc de + ld [hli], a + ld a, [de] + ld [hl], a + ret + +PlaceNonFaintStatus: + push de + ld a, [de] + ld de, PsnString + bit PSN, a + jr nz, .place + ld de, BrnString + bit BRN, a + jr nz, .place + ld de, FrzString + bit FRZ, a + jr nz, .place + ld de, ParString + bit PAR, a + jr nz, .place + ld de, SlpString + and SLP_MASK + jr z, .no_status + +.place + call CopyStatusString + ld a, TRUE + and a + +.no_status + pop de + ret + +SlpString: db "SLP@" +PsnString: db "PSN@" +BrnString: db "BRN@" +FrzString: db "FRZ@" +ParString: db "PAR@" + +ListMoves: +; List moves at hl, spaced every [wListMovesLineSpacing] tiles. + ld de, wListMoves_MoveIndicesBuffer + ld b, 0 +.moves_loop + ld a, [de] + inc de + and a + jr z, .no_more_moves + push de + push hl + push hl + ld [wNamedObjectIndex], a + call GetMoveName + ld de, wStringBuffer1 + pop hl + push bc + call PlaceString + pop bc + ld a, b + ld [wNumMoves], a + inc b + pop hl + push bc + ld a, [wListMovesLineSpacing] + ld c, a + ld b, 0 + add hl, bc + pop bc + pop de + ld a, b + cp NUM_MOVES + jr z, .done + jr .moves_loop + +.no_more_moves + ld a, b +.nonmove_loop + push af + ld [hl], "-" + ld a, [wListMovesLineSpacing] + ld c, a + ld b, 0 + add hl, bc + pop af + inc a + cp NUM_MOVES + jr nz, .nonmove_loop + +.done + ret diff --git a/engine/pokemon/mon_submenu.asm b/engine/pokemon/mon_submenu.asm new file mode 100644 index 0000000..07a9790 --- /dev/null +++ b/engine/pokemon/mon_submenu.asm @@ -0,0 +1,291 @@ +INCLUDE "data/mon_menu.asm" + +MonSubmenu: + xor a + ldh [hBGMapMode], a + call GetMonSubmenuItems + farcall FreezeMonIcons + ld hl, .MenuHeader + call LoadMenuHeader + call .GetTopCoord + call PopulateMonMenu + + ld a, 1 + ldh [hBGMapMode], a + call MonMenuLoop + ld [wMenuSelection], a + + call ExitMenu + ret + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 6, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw 0 + db 1 ; default option + +.GetTopCoord: +; [wMenuBorderTopCoord] = 1 + [wMenuBorderBottomCoord] - 2 * ([wMonSubmenuCount] + 1) + ld a, [wMonSubmenuCount] + inc a + add a + ld b, a + ld a, [wMenuBorderBottomCoord] + sub b + inc a + ld [wMenuBorderTopCoord], a + call MenuBox + ret + +MonMenuLoop: +.loop + ld a, MENU_UNUSED_3 | MENU_BACKUP_TILES_2 ; flags + ld [wMenuDataFlags], a + ld a, [wMonSubmenuCount] + ld [wMenuDataItems], a + call InitVerticalMenuCursor + ld hl, w2DMenuFlags1 + set 6, [hl] + call StaticMenuJoypad + ld de, SFX_READ_TEXT_2 + call PlaySFX + ldh a, [hJoyPressed] + bit A_BUTTON_F, a + jr nz, .select + bit B_BUTTON_F, a + jr nz, .cancel + jr .loop + +.cancel + ld a, MONMENUITEM_CANCEL + ret + +.select + ld a, [wMenuCursorY] + dec a + ld c, a + ld b, 0 + ld hl, wMonSubmenuItems + add hl, bc + ld a, [hl] + ret + +PopulateMonMenu: + call MenuBoxCoord2Tile + ld bc, 2 * SCREEN_WIDTH + 2 + add hl, bc + ld de, wMonSubmenuItems +.loop + ld a, [de] + inc de + cp -1 + ret z + push de + push hl + call GetMonMenuString + pop hl + call PlaceString + ld bc, 2 * SCREEN_WIDTH + add hl, bc + pop de + jr .loop + +GetMonMenuString: + ld hl, MonMenuOptions + 1 + ld de, 4 + call IsInArray + dec hl + ld a, [hli] + inc hl + cp MONMENU_MENUOPTION + jr z, .NotMove + ld a, [hli] + ld h, [hl] + ld l, a + call GetMoveIDFromIndex + ld [wNamedObjectIndex], a + jp GetMoveName + +.NotMove: + ld a, [hli] + ld d, [hl] + ld e, a + ret + +GetMonSubmenuItems: + call ResetMonSubmenu + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + ld a, [wLinkMode] + and a + jr nz, .skip_moves + ld a, MON_MOVES + call GetPartyParamLocation + ld d, h + ld e, l + ld c, NUM_MOVES +.loop + push bc + push de + ld a, [de] + and a + jr z, .next + push hl + call IsFieldMove + pop hl + jr nc, .next + call AddMonMenuItem + +.next + pop de + inc de + pop bc + dec c + jr nz, .loop + +.skip_moves + ld a, MONMENUITEM_STATS + call AddMonMenuItem + ld a, MONMENUITEM_SWITCH + call AddMonMenuItem + ld a, MONMENUITEM_MOVE + call AddMonMenuItem + ld a, [wLinkMode] + and a + jr nz, .skip2 + push hl + ld a, MON_ITEM + call GetPartyParamLocation + ld d, [hl] + farcall ItemIsMail + pop hl + ld a, MONMENUITEM_MAIL + jr c, .ok + ld a, MONMENUITEM_ITEM + +.ok + call AddMonMenuItem + +.skip2 + ld a, [wMonSubmenuCount] + cp NUM_MONMENU_ITEMS + jr z, .ok2 + ld a, MONMENUITEM_CANCEL + call AddMonMenuItem + +.ok2 + call TerminateMonSubmenu + ret + +.egg + ld a, MONMENUITEM_STATS + call AddMonMenuItem + ld a, MONMENUITEM_SWITCH + call AddMonMenuItem + ld a, MONMENUITEM_CANCEL + call AddMonMenuItem + call TerminateMonSubmenu + ret + +IsFieldMove: + call GetMoveIndexFromID + ld b, h + ld c, l + ld hl, MonMenuOptions +.next + ld a, [hli] + cp -1 + ret z + cp MONMENU_MENUOPTION + ret z + ld a, [hli] + ld d, a + ld a, [hli] + cp c + ld a, [hli] + jr nz, .next + cp b + jr nz, .next + ld a, d + scf + ret + +ResetMonSubmenu: + xor a + ld [wMonSubmenuCount], a + ld hl, wMonSubmenuItems + ld bc, NUM_MONMENU_ITEMS + 1 + call ByteFill + ret + +TerminateMonSubmenu: + ld a, [wMonSubmenuCount] + ld e, a + ld d, 0 + ld hl, wMonSubmenuItems + add hl, de + ld [hl], -1 + ret + +AddMonMenuItem: + push hl + push de + push af + ld a, [wMonSubmenuCount] + ld e, a + inc a + ld [wMonSubmenuCount], a + ld d, 0 + ld hl, wMonSubmenuItems + add hl, de + pop af + ld [hl], a + pop de + pop hl + ret + +BattleMonMenu: + ld hl, .MenuHeader + call CopyMenuHeader + xor a + ldh [hBGMapMode], a + call MenuBox + call UpdateSprites + call PlaceVerticalMenuItems + call WaitBGMap + call CopyMenuData + ld a, [wMenuDataFlags] + bit 7, a + jr z, .set_carry + call InitVerticalMenuCursor + ld hl, w2DMenuFlags1 + set 6, [hl] + call StaticMenuJoypad + ld de, SFX_READ_TEXT_2 + call PlaySFX + ldh a, [hJoyPressed] + bit B_BUTTON_F, a + jr z, .clear_carry + ret z + +.set_carry + scf + ret + +.clear_carry + and a + ret + +.MenuHeader: + db 0 ; flags + menu_coords 11, 11, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 3 ; items + db "SWITCH@" + db "STATS@" + db "CANCEL@" diff --git a/engine/pokemon/move_mon.asm b/engine/pokemon/move_mon.asm new file mode 100644 index 0000000..de10b57 --- /dev/null +++ b/engine/pokemon/move_mon.asm @@ -0,0 +1,1847 @@ +DEF RANDY_OT_ID EQU 01001 + +TryAddMonToParty: +; Check if to copy wild mon or generate a new one + ; Whose is it? + ld de, wPartyCount + ld a, [wMonType] + and $f + jr z, .getpartylocation ; PARTYMON + ld de, wOTPartyCount + +.getpartylocation + ; Do we have room for it? + ld a, [de] + inc a + cp PARTY_LENGTH + 1 + ret nc + ; Increase the party count + ld [de], a + ld a, [de] ; Why are we doing this? + ldh [hMoveMon], a ; HRAM backup + add e + ld e, a + jr nc, .loadspecies + inc d + +.loadspecies + ; Load the species of the Pokemon into the party list. + ; The terminator is usually here, but it'll be back. + ld a, [wCurPartySpecies] + ld [de], a + ; Load the terminator into the next slot. + inc de + ld a, -1 + ld [de], a + ; Now let's load the OT name. + ld hl, wPartyMonOTs + ld a, [wMonType] + and $f + jr z, .loadOTname + ld hl, wOTPartyMonOTs + +.loadOTname + ldh a, [hMoveMon] ; Restore index from backup + dec a + call SkipNames + ld d, h + ld e, l + ld hl, wPlayerName + ld bc, NAME_LENGTH + call CopyBytes + ; Only initialize the nickname for party mon + ld a, [wMonType] + and a + jr nz, .skipnickname + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wPartyMonNicknames + ldh a, [hMoveMon] + dec a + call SkipNames + ld d, h + ld e, l + ld hl, wStringBuffer1 + ld bc, MON_NAME_LENGTH + call CopyBytes + +.skipnickname + ld hl, wPartyMon1Species + ld a, [wMonType] + and $f + jr z, .initializeStats + ld hl, wOTPartyMon1Species + +.initializeStats + ldh a, [hMoveMon] + dec a + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes +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. +; hl points to the wPartyMon struct to fill. + + ld e, l + ld d, h + push hl + + ; Initialize the species + ld a, [wCurPartySpecies] + ld [wCurSpecies], a + call GetBaseData + ld a, [wBaseSpecies] + ld [de], a + inc de + + ; Copy the item if it's a wild mon + ld a, [wBattleMode] + and a + ld a, $0 + jr z, .skipitem + ld a, [wEnemyMonItem] +.skipitem + ld [de], a + inc de + + ; Copy the moves if it's a wild mon + push de + ld h, d + ld l, e + ld a, [wBattleMode] + and a + jr z, .randomlygeneratemoves + ld a, [wMonType] + and a + jr nz, .randomlygeneratemoves + ld de, wEnemyMonMoves +rept NUM_MOVES - 1 + ld a, [de] + inc de + ld [hli], a +endr + ld a, [de] + ld [hl], a + jr .next + +.randomlygeneratemoves + xor a +rept NUM_MOVES - 1 + ld [hli], a +endr + ld [hl], a + ld [wSkipMovesBeforeLevelUp], a + predef FillMoves + +.next + pop de +rept NUM_MOVES + inc de +endr + + ; Initialize ID. + ld a, [wPlayerID] + ld [de], a + inc de + ld a, [wPlayerID + 1] + ld [de], a + inc de + + ; Initialize Exp. + push de + ld a, [wCurPartyLevel] + ld d, a + callfar CalcExpAtLevel + pop de + ldh a, [hProduct + 1] + ld [de], a + inc de + ldh a, [hProduct + 2] + ld [de], a + inc de + ldh a, [hProduct + 3] + ld [de], a + inc de + + ; Initialize stat experience. + xor a + ld b, MON_DVS - MON_STAT_EXP +.loop + ld [de], a + inc de + dec b + jr nz, .loop + + pop hl + push hl + ld a, [wMonType] + and $f + jr z, .registerpokedex + + push hl + farcall GetTrainerDVs + pop hl + jr .initializeDVs + +.registerpokedex + ld a, [wCurPartySpecies] + ld [wTempSpecies], a + push de + call CheckCaughtMon + ld a, [wTempSpecies] + call SetSeenAndCaughtMon + pop de + + pop hl + push hl + ld a, [wBattleMode] + and a + jr nz, .copywildmonDVs + + call Random + ld b, a + call Random + ld c, a +.initializeDVs + ld a, b + ld [de], a + inc de + ld a, c + ld [de], a + inc de + + ; Initialize PP. + push hl + push de + inc hl + inc hl + call FillPP + pop de + pop hl +rept NUM_MOVES + inc de +endr + + ; Initialize happiness. + ld a, BASE_HAPPINESS + ld [de], a + inc de + + xor a + ; PokerusStatus + ld [de], a + inc de + ; CaughtData/CaughtTime/CaughtLevel + ld [de], a + inc de + ; CaughtGender/CaughtLocation + ld [de], a + inc de + + ; Initialize level. + ld a, [wCurPartyLevel] + ld [de], a + inc de + + xor a + ; Status + ld [de], a + inc de + ; Unused + ld [de], a + inc de + + ; Initialize HP. + ld bc, MON_STAT_EXP - 1 + add hl, bc + ld a, 1 + ld c, a + ld b, FALSE + call CalcMonStatC + ldh a, [hProduct + 2] + ld [de], a + inc de + ldh a, [hProduct + 3] + ld [de], a + inc de + jr .initstats + +.copywildmonDVs + ld a, [wEnemyMonDVs] + ld [de], a + inc de + ld a, [wEnemyMonDVs + 1] + ld [de], a + inc de + + push hl + ld hl, wEnemyMonPP + ld b, NUM_MOVES +.wildmonpploop + ld a, [hli] + ld [de], a + inc de + dec b + jr nz, .wildmonpploop + pop hl + + ; Initialize happiness. + ld a, BASE_HAPPINESS + ld [de], a + inc de + + xor a + ; PokerusStatus + ld [de], a + inc de + ; CaughtData/CaughtTime/CaughtLevel + ld [de], a + inc de + ; CaughtGender/CaughtLocation + ld [de], a + inc de + + ; Initialize level. + ld a, [wCurPartyLevel] + ld [de], a + inc de + + ld hl, wEnemyMonStatus + ; Copy wEnemyMonStatus + ld a, [hli] + ld [de], a + inc de + ; Copy EnemyMonUnused + ld a, [hli] + ld [de], a + inc de + ; Copy wEnemyMonHP + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + inc de + +.initstats + ld a, [wBattleMode] + dec a + jr nz, .generatestats + ld hl, wEnemyMonMaxHP + ld bc, PARTYMON_STRUCT_LENGTH - MON_MAXHP + call CopyBytes + pop hl + jr .registerunowndex + +.generatestats + pop hl + ld bc, MON_STAT_EXP - 1 + add hl, bc + ld b, FALSE + call CalcMonStats + +.registerunowndex + ld a, [wMonType] + and $f + jr nz, .done + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld a, l + sub LOW(UNOWN) + if HIGH(UNOWN) == 0 + or h + else + jr nz, .done + if HIGH(UNOWN) == 1 + dec h + else + ld a, h + cp HIGH(UNOWN) + endc + endc + jr nz, .done + ld hl, wPartyMon1DVs + ld a, [wPartyCount] + dec a + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + predef GetUnownLetter + callfar UpdateUnownDex + +.done + scf ; When this function returns, the carry flag indicates success vs failure. + ret + +FillPP: + push bc + ld b, NUM_MOVES +.loop + ld a, [hli] + and a + jr z, .next + push hl + push de + push bc + ld de, wStringBuffer1 + call GetMoveData + pop bc + pop de + pop hl + ld a, [wStringBuffer1 + MOVE_PP] + +.next + ld [de], a + inc de + dec b + jr nz, .loop + pop bc + ret + +AddTempmonToParty: + ld hl, wPartyCount + ld a, [hl] + cp PARTY_LENGTH + scf + ret z + + inc a + ld [hl], a + ld c, a + ld b, 0 + add hl, bc + ld a, [wCurPartySpecies] + ld [hli], a + ld [hl], $ff + + ld hl, wPartyMon1Species + ld a, [wPartyCount] + dec a + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld e, l + ld d, h + ld hl, wTempMonSpecies + call CopyBytes + + ld hl, wPartyMonOTs + ld a, [wPartyCount] + dec a + call SkipNames + ld d, h + ld e, l + ld hl, wOTPartyMonOTs + ld a, [wCurPartyMon] + call SkipNames + ld bc, NAME_LENGTH + call CopyBytes + + ld hl, wPartyMonNicknames + ld a, [wPartyCount] + dec a + call SkipNames + ld d, h + ld e, l + ld hl, wOTPartyMonNicknames + ld a, [wCurPartyMon] + call SkipNames + ld bc, MON_NAME_LENGTH + call CopyBytes + + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + cp EGG + jr z, .egg + call SetSeenAndCaughtMon + ld hl, wPartyMon1Happiness + ld a, [wPartyCount] + dec a + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld [hl], BASE_HAPPINESS +.egg + + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld a, l + sub LOW(UNOWN) + if HIGH(UNOWN) == 0 + or h + else + jr nz, .done + if HIGH(UNOWN) == 1 + dec h + else + ld a, h + cp HIGH(UNOWN) + endc + endc + jr nz, .done + ld hl, wPartyMon1DVs + ld a, [wPartyCount] + dec a + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + predef GetUnownLetter + callfar UpdateUnownDex + ld a, [wFirstUnownSeen] + and a + jr nz, .done + ld a, [wUnownLetter] + ld [wFirstUnownSeen], a +.done + + and a + ret + +SendGetMonIntoFromBox: +; Sents/Gets mon into/from Box depending on Parameter +; wPokemonWithdrawDepositParameter == 0: get mon into Party +; wPokemonWithdrawDepositParameter == 1: sent mon into Box +; wPokemonWithdrawDepositParameter == 2: get mon from DayCare +; wPokemonWithdrawDepositParameter == 3: put mon into DayCare + + ld a, BANK(sBoxCount) + call OpenSRAM + ld a, [wPokemonWithdrawDepositParameter] + and a + jr z, .check_IfPartyIsFull + cp DAY_CARE_WITHDRAW + jr z, .check_IfPartyIsFull + cp DAY_CARE_DEPOSIT + ld hl, wBreedMon1Species + jr z, .breedmon + + ; we want to sent a mon into the Box + ; so check if there's enough space + ld hl, sBoxCount + ld a, [hl] + cp MONS_PER_BOX + jr nz, .there_is_room + jp CloseSRAM_And_SetCarryFlag + +.check_IfPartyIsFull + ld hl, wPartyCount + ld a, [hl] + cp PARTY_LENGTH + jp z, CloseSRAM_And_SetCarryFlag + +.there_is_room + inc a + ld [hl], a + ld c, a + ld b, 0 + add hl, bc + ld a, [wPokemonWithdrawDepositParameter] + cp DAY_CARE_WITHDRAW + ld a, [wBreedMon1Species] + jr z, .okay1 + ld a, [wCurPartySpecies] + +.okay1 + ld [hli], a + ld [hl], $ff + ld a, [wPokemonWithdrawDepositParameter] + dec a + ld hl, wPartyMon1Species + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wPartyCount] + jr nz, .okay2 + ld hl, sBoxMon1Species + ld bc, BOXMON_STRUCT_LENGTH + ld a, [sBoxCount] + +.okay2 + dec a ; wPartyCount - 1 + call AddNTimes + +.breedmon + push hl + ld e, l + ld d, h + ld a, [wPokemonWithdrawDepositParameter] + and a + ld hl, sBoxMon1Species + ld bc, BOXMON_STRUCT_LENGTH + jr z, .okay3 + cp DAY_CARE_WITHDRAW + ld hl, wBreedMon1Species + jr z, .okay4 + ld hl, wPartyMon1Species + ld bc, PARTYMON_STRUCT_LENGTH + +.okay3 + ld a, [wCurPartyMon] + call AddNTimes + +.okay4 + ld bc, BOXMON_STRUCT_LENGTH + call CopyBytes + ld a, [wPokemonWithdrawDepositParameter] + cp DAY_CARE_DEPOSIT + ld de, wBreedMon1OT + jr z, .okay5 + dec a + ld hl, wPartyMonOTs + ld a, [wPartyCount] + jr nz, .okay6 + ld hl, sBoxMonOTs + ld a, [sBoxCount] + +.okay6 + dec a + call SkipNames + ld d, h + ld e, l + +.okay5 + ld hl, sBoxMonOTs + ld a, [wPokemonWithdrawDepositParameter] + and a + jr z, .okay7 + ld hl, wBreedMon1OT + cp DAY_CARE_WITHDRAW + jr z, .okay8 + ld hl, wPartyMonOTs + +.okay7 + ld a, [wCurPartyMon] + call SkipNames + +.okay8 + ld bc, NAME_LENGTH + call CopyBytes + ld a, [wPokemonWithdrawDepositParameter] + cp DAY_CARE_DEPOSIT + ld de, wBreedMon1Nickname + jr z, .okay9 + dec a + ld hl, wPartyMonNicknames + ld a, [wPartyCount] + jr nz, .okay10 + ld hl, sBoxMonNicknames + ld a, [sBoxCount] + +.okay10 + dec a + call SkipNames + ld d, h + ld e, l + +.okay9 + ld hl, sBoxMonNicknames + ld a, [wPokemonWithdrawDepositParameter] + and a + jr z, .okay11 + ld hl, wBreedMon1Nickname + cp DAY_CARE_WITHDRAW + jr z, .okay12 + ld hl, wPartyMonNicknames + +.okay11 + ld a, [wCurPartyMon] + call SkipNames + +.okay12 + ld bc, MON_NAME_LENGTH + call CopyBytes + pop hl + + ld a, [wPokemonWithdrawDepositParameter] + cp PC_DEPOSIT + jr z, .took_out_of_box + cp DAY_CARE_DEPOSIT + jp z, .CloseSRAM_And_ClearCarryFlag + + push hl + srl a + add $2 + ld [wMonType], a + predef CopyMonToTempMon + callfar CalcLevel + ld a, d + ld [wCurPartyLevel], a + pop hl + + ld b, h + ld c, l + ld hl, MON_LEVEL + add hl, bc + ld [hl], a + ld hl, MON_MAXHP + add hl, bc + ld d, h + ld e, l + ld hl, MON_STAT_EXP - 1 + add hl, bc + + push bc + ld b, TRUE + call CalcMonStats + pop bc + + ld a, [wPokemonWithdrawDepositParameter] + and a + jr nz, .CloseSRAM_And_ClearCarryFlag + ld hl, MON_STATUS + add hl, bc + xor a + ld [hl], a + ld hl, MON_HP + add hl, bc + ld d, h + ld e, l + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + inc hl + inc hl + ld a, [hli] + ld [de], a + ld a, [hl] + inc de + ld [de], a + jr .CloseSRAM_And_ClearCarryFlag + +.egg + xor a + ld [de], a + inc de + ld [de], a + jr .CloseSRAM_And_ClearCarryFlag + +.took_out_of_box + ld a, [sBoxCount] + dec a + ld b, a + call RestorePPOfDepositedPokemon +.CloseSRAM_And_ClearCarryFlag: + call CloseSRAM + and a + ret + +CloseSRAM_And_SetCarryFlag: + call CloseSRAM + scf + ret + +RestorePPOfDepositedPokemon: + ld a, b + ld hl, sBoxMons + ld bc, BOXMON_STRUCT_LENGTH + call AddNTimes + ld b, h + ld c, l + ld hl, MON_PP + add hl, bc + push hl + push bc + ld de, wTempMonPP + ld bc, NUM_MOVES + call CopyBytes + pop bc + ld hl, MON_MOVES + add hl, bc + push hl + ld de, wTempMonMoves + ld bc, NUM_MOVES + call CopyBytes + pop hl + pop de + + ld a, [wMenuCursorY] + push af + ld a, [wMonType] + push af + ld b, 0 +.loop + ld a, [hli] + and a + jr z, .done + ld [wTempMonMoves], a + ld a, BOXMON + ld [wMonType], a + ld a, b + ld [wMenuCursorY], a + push bc + push hl + push de + farcall GetMaxPPOfMove + pop de + pop hl + ld a, [wTempPP] + ld b, a + ld a, [de] + and %11000000 + add b + ld [de], a + pop bc + inc de + inc b + ld a, b + cp NUM_MOVES + jr c, .loop + +.done + pop af + ld [wMonType], a + pop af + ld [wMenuCursorY], a + ret + +RetrieveMonFromDayCareMan: + ld a, [wBreedMon1Species] + ld [wCurPartySpecies], a + ld de, SFX_TRANSACTION + call PlaySFX + call WaitSFX + call GetBreedMon1LevelGrowth + ld a, b + ld [wPrevPartyLevel], a + ld a, e + ld [wCurPartyLevel], a + xor a + ld [wPokemonWithdrawDepositParameter], a + jp RetrieveBreedmon + +RetrieveMonFromDayCareLady: + ld a, [wBreedMon2Species] + ld [wCurPartySpecies], a + ld de, SFX_TRANSACTION + call PlaySFX + call WaitSFX + call GetBreedMon2LevelGrowth + ld a, b + ld [wPrevPartyLevel], a + ld a, e + ld [wCurPartyLevel], a + ld a, PC_DEPOSIT + ld [wPokemonWithdrawDepositParameter], a + jp RetrieveBreedmon ; pointless + +RetrieveBreedmon: + ld hl, wPartyCount + ld a, [hl] + cp PARTY_LENGTH + jr nz, .room_in_party + scf + ret + +.room_in_party + inc a + ld [hl], a + ld c, a + ld b, 0 + add hl, bc + ld a, [wPokemonWithdrawDepositParameter] + and a + ld a, [wBreedMon1Species] + ld de, wBreedMon1Nickname + jr z, .okay + ld a, [wBreedMon2Species] + ld de, wBreedMon2Nickname + +.okay + ld [hli], a + ld [wCurSpecies], a + ld a, $ff + ld [hl], a + ld hl, wPartyMonNicknames + ld a, [wPartyCount] + dec a + call SkipNames + push hl + ld h, d + ld l, e + pop de + call CopyBytes + push hl + ld hl, wPartyMonOTs + ld a, [wPartyCount] + dec a + call SkipNames + ld d, h + ld e, l + pop hl + call CopyBytes + push hl + call GetLastPartyMon + pop hl + ld bc, BOXMON_STRUCT_LENGTH + call CopyBytes + call GetBaseData + call GetLastPartyMon + ld b, d + ld c, e + ld hl, MON_LEVEL + add hl, bc + ld a, [wCurPartyLevel] + ld [hl], a + ld hl, MON_MAXHP + add hl, bc + ld d, h + ld e, l + ld hl, MON_EXP + 2 + add hl, bc + push bc + ld b, TRUE + call CalcMonStats + ld hl, wPartyMon1Moves + ld a, [wPartyCount] + dec a + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld d, h + ld e, l + ld a, TRUE + ld [wSkipMovesBeforeLevelUp], a + predef FillMoves +; BUG: Pokémon deposited in the Day-Care might lose experience (see docs/bugs_and_glitches.md) + ld a, [wPartyCount] + dec a + ld [wCurPartyMon], a + farcall HealPartyMon + ld a, [wCurPartyLevel] + ld d, a + callfar CalcExpAtLevel + pop bc + ld hl, MON_EXP + add hl, bc + ldh a, [hMultiplicand] + ld [hli], a + ldh a, [hMultiplicand + 1] + ld [hli], a + ldh a, [hMultiplicand + 2] + ld [hl], a + and a + ret + +GetLastPartyMon: + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1Species + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld d, h + ld e, l + ret + +DepositMonWithDayCareMan: + ld de, wBreedMon1Nickname + call DepositBreedmon + xor a ; REMOVE_PARTY + ld [wPokemonWithdrawDepositParameter], a + jp RemoveMonFromPartyOrBox + +DepositMonWithDayCareLady: + ld de, wBreedMon2Nickname + call DepositBreedmon + xor a ; REMOVE_PARTY + ld [wPokemonWithdrawDepositParameter], a + jp RemoveMonFromPartyOrBox + +DepositBreedmon: + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames + call SkipNames + call CopyBytes + ld a, [wCurPartyMon] + ld hl, wPartyMonOTs + call SkipNames + call CopyBytes + ld a, [wCurPartyMon] + ld hl, wPartyMon1Species + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld bc, BOXMON_STRUCT_LENGTH + jp CopyBytes + +SendMonIntoBox: +; Sends the mon into one of Bills Boxes +; the data comes mainly from 'wEnemyMon:' + ld a, BANK(sBoxCount) + call OpenSRAM + ld de, sBoxCount + ld a, [de] + cp MONS_PER_BOX + jp nc, .full + inc a + ld [de], a + + ld a, [wCurPartySpecies] + ld [wCurSpecies], a + ld c, a +.loop + inc de + ld a, [de] + ld b, a + ld a, c + ld c, b + ld [de], a + inc a + jr nz, .loop + + call GetBaseData + call ShiftBoxMon + + ld hl, wPlayerName + ld de, sBoxMonOTs + ld bc, NAME_LENGTH + call CopyBytes + + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + + ld de, sBoxMonNicknames + ld hl, wStringBuffer1 + ld bc, MON_NAME_LENGTH + call CopyBytes + + ld hl, wEnemyMon + ld de, sBoxMon1 + ld bc, 1 + 1 + NUM_MOVES ; species + item + moves + call CopyBytes + + ld hl, wPlayerID + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + inc de + push de + ld a, [wCurPartyLevel] + ld d, a + callfar CalcExpAtLevel + pop de + ldh a, [hProduct + 1] + ld [de], a + inc de + ldh a, [hProduct + 2] + ld [de], a + inc de + ldh a, [hProduct + 3] + ld [de], a + inc de + + ; Set all 5 Experience Values to 0 + xor a + ld b, 2 * NUM_EXP_STATS +.loop2 + ld [de], a + inc de + dec b + jr nz, .loop2 + + ld hl, wEnemyMonDVs + ld b, 2 + NUM_MOVES ; DVs and PP ; wEnemyMonHappiness - wEnemyMonDVs +.loop3 + ld a, [hli] + ld [de], a + inc de + dec b + jr nz, .loop3 + + ld a, BASE_HAPPINESS + ld [de], a + inc de + xor a + ld [de], a + inc de + ld [de], a + inc de + ld [de], a + inc de + ld a, [wCurPartyLevel] + ld [de], a + ld a, [wCurPartySpecies] + call SetSeenAndCaughtMon + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld a, l + sub LOW(UNOWN) + jr nz, .not_unown + if HIGH(UNOWN) == 0 + or h + elif HIGH(UNOWN) == 1 + dec h + else + ld a, h + cp HIGH(UNOWN) + endc + jr nz, .not_unown + ld hl, sBoxMon1DVs + predef GetUnownLetter + callfar UpdateUnownDex + +.not_unown + ld hl, sBoxMon1Moves + ld de, wTempMonMoves + ld bc, NUM_MOVES + call CopyBytes + + ld hl, sBoxMon1PP + ld de, wTempMonPP + ld bc, NUM_MOVES + call CopyBytes + + ld b, 0 + call RestorePPOfDepositedPokemon + + call CloseSRAM + scf + ret + +.full + call CloseSRAM + and a + ret + +ShiftBoxMon: + ld hl, sBoxMonOTs + ld bc, NAME_LENGTH + call .shift + + ld hl, sBoxMonNicknames + ld bc, MON_NAME_LENGTH + call .shift + + ld hl, sBoxMons + ld bc, BOXMON_STRUCT_LENGTH + +.shift + ld a, [sBoxCount] + cp 2 + ret c + + push hl + call AddNTimes + dec hl + ld e, l + ld d, h + pop hl + + ld a, [sBoxCount] + dec a + call AddNTimes + dec hl + + push hl + ld a, [sBoxCount] + dec a + ld hl, 0 + call AddNTimes + ld c, l + ld b, h + pop hl +.loop + ld a, [hld] + ld [de], a + dec de + dec bc + ld a, c + or b + jr nz, .loop + ret + +GiveEgg:: + ld a, [wCurPartySpecies] + push af + callfar GetLowestEvolutionStage + ld a, [wCurPartySpecies] + +; TryAddMonToParty sets Seen and Caught flags +; when it is successful. This routine will make +; sure that we aren't newly setting flags. + push af + call CheckCaughtMon + pop af + push bc + call CheckSeenMon + push bc + + call TryAddMonToParty + +; If we haven't caught this Pokemon before receiving +; the Egg, reset the flag that was just set by +; TryAddMonToParty. + pop bc + ld a, c + and a + jr nz, .skip_caught_flag + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld d, h + ld e, l + dec de + push de + ld hl, wPokedexCaught + ld b, RESET_FLAG + call FlagAction + pop de + +.skip_caught_flag +; If we haven't seen this Pokemon before receiving +; the Egg, reset the flag that was just set by +; TryAddMonToParty. + pop bc + ld a, c + and a + jr nz, .skip_seen_flag + ld hl, wPokedexSeen + ld b, RESET_FLAG + call FlagAction + +.skip_seen_flag + pop af + ld [wCurPartySpecies], a + ld a, [wPartyCount] + dec a + ld bc, PARTYMON_STRUCT_LENGTH + ld hl, wPartyMon1Species + call AddNTimes + ld a, [wCurPartySpecies] + ld [hl], a + ld hl, wPartyCount + ld a, [hl] + ld b, 0 + ld c, a + add hl, bc + ld a, EGG + ld [hl], a + ld a, [wPartyCount] + dec a + ld hl, wPartyMonNicknames + call SkipNames + ld de, String_Egg + call CopyName2 + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1Happiness + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld a, [wDebugFlags] + bit DEBUG_FIELD_F, a + ld a, 1 + jr nz, .got_init_happiness + ld a, [wBaseEggSteps] + +.got_init_happiness + ld [hl], a + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1HP + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + xor a + ld [hli], a + ld [hl], a + and a + ret + +String_Egg: + db "EGG@" + +RemoveMonFromPartyOrBox: + ld hl, wPartyCount + + ld a, [wPokemonWithdrawDepositParameter] + and a + jr z, .okay + + ld a, BANK(sBoxCount) + call OpenSRAM + ld hl, sBoxCount + +.okay + ld a, [hl] + dec a + ld [hli], a + ld a, [wCurPartyMon] + ld c, a + ld b, 0 + add hl, bc + ld e, l + ld d, h + inc de +.loop + ld a, [de] + inc de + ld [hli], a + inc a + jr nz, .loop + ld hl, wPartyMonOTs + ld d, PARTY_LENGTH - 1 + ld a, [wPokemonWithdrawDepositParameter] + and a + jr z, .party + ld hl, sBoxMonOTs + ld d, MONS_PER_BOX - 1 + +.party + ; If this is the last mon in our party (box), + ; shift all the other mons up to close the gap. + ld a, [wCurPartyMon] + call SkipNames + ld a, [wCurPartyMon] + cp d + jr nz, .delete_inside + ld [hl], -1 + jp .finish + +.delete_inside + ; Shift the OT names + ld d, h + ld e, l + ld bc, MON_NAME_LENGTH + add hl, bc + ld bc, wPartyMonNicknames + ld a, [wPokemonWithdrawDepositParameter] + and a + jr z, .party2 + ld bc, sBoxMonNicknames +.party2 + call CopyDataUntil + ; Shift the struct + ld hl, wPartyMons + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wPokemonWithdrawDepositParameter] + and a + jr z, .party4 + ld hl, sBoxMons + ld bc, BOXMON_STRUCT_LENGTH +.party4 + ld a, [wCurPartyMon] + call AddNTimes + ld d, h + ld e, l + ld a, [wPokemonWithdrawDepositParameter] + and a + jr z, .party5 + ld bc, BOXMON_STRUCT_LENGTH + add hl, bc + ld bc, sBoxMonOTs + jr .copy + +.party5 + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + ld bc, wPartyMonOTs +.copy + call CopyDataUntil + ; Shift the nicknames + ld hl, wPartyMonNicknames + ld a, [wPokemonWithdrawDepositParameter] + and a + jr z, .party6 + ld hl, sBoxMonNicknames +.party6 + ld bc, MON_NAME_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld d, h + ld e, l + ld bc, MON_NAME_LENGTH + add hl, bc + ld bc, wPartyMonNicknamesEnd + ld a, [wPokemonWithdrawDepositParameter] + and a + jr z, .party7 + ld bc, sBoxMonNicknamesEnd +.party7 + call CopyDataUntil + ; Mail time! +.finish + ld a, [wPokemonWithdrawDepositParameter] + and a + jp nz, CloseSRAM + ld a, [wLinkMode] + and a + ret nz + ; Shift mail + ld a, BANK(sPartyMail) + call OpenSRAM + ; If this is the last mon in our party, no need to shift mail. + ld hl, wPartyCount + ld a, [wCurPartyMon] + cp [hl] + jr z, .close_sram + ; Shift our mail messages up. + ld hl, sPartyMail + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + push hl + add hl, bc + pop de + ld a, [wCurPartyMon] + ld b, a +.loop2 + push bc + push hl + ld bc, MAIL_STRUCT_LENGTH + call CopyBytes + pop hl + push hl + ld bc, MAIL_STRUCT_LENGTH + add hl, bc + pop de + pop bc + inc b + ld a, [wPartyCount] + cp b + jr nz, .loop2 +.close_sram + jp CloseSRAM + +ComputeNPCTrademonStats: + ld a, MON_LEVEL + call GetPartyParamLocation + ld a, [hl] + ld [MON_LEVEL], a ; should be "ld [wCurPartyLevel], a" + ld a, MON_SPECIES + call GetPartyParamLocation + ld a, [hl] + ld [wCurSpecies], a + call GetBaseData + ld a, MON_MAXHP + call GetPartyParamLocation + ld d, h + ld e, l + push de + ld a, MON_STAT_EXP - 1 + call GetPartyParamLocation + ld b, TRUE + call CalcMonStats + pop de + ld a, MON_HP + call GetPartyParamLocation + ld a, [de] + inc de + ld [hli], a + ld a, [de] + ld [hl], a + ret + +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 +; hl is the path to the Stat EXP +; de points to where the final stats will be saved + + ld c, STAT_HP - 1 ; first stat +.loop + inc c + call CalcMonStatC + ldh a, [hMultiplicand + 1] + ld [de], a + inc de + ldh a, [hMultiplicand + 2] + ld [de], a + inc de + ld a, c + cp STAT_SDEF ; last stat + jr nz, .loop + ret + +CalcMonStatC: +; 'c' is 1-6 and points to the BaseStat +; 1: HP +; 2: Attack +; 3: Defense +; 4: Speed +; 5: SpAtk +; 6: SpDef + push hl + push de + push bc + ld a, b + ld d, a + push hl + ld hl, wBaseStats + dec hl ; has to be decreased, because 'c' begins with 1 + ld b, 0 + add hl, bc + ld a, [hl] + ld e, a + pop hl + push hl + ld a, c + cp STAT_SDEF ; last stat + jr nz, .not_spdef + dec hl + dec hl + +.not_spdef + sla c + ld a, d + and a + jr z, .no_stat_exp + add hl, bc + push de + ld a, [hld] + ld e, a + ld d, [hl] + farcall GetSquareRoot + pop de + +.no_stat_exp + srl c + pop hl + push bc + ld bc, MON_DVS - MON_HP_EXP + 1 + add hl, bc + pop bc + ld a, c + cp STAT_ATK + jr z, .Attack + cp STAT_DEF + jr z, .Defense + cp STAT_SPD + jr z, .Speed + cp STAT_SATK + jr z, .Special + cp STAT_SDEF + jr z, .Special +; DV_HP = (DV_ATK & 1) << 3 | (DV_DEF & 1) << 2 | (DV_SPD & 1) << 1 | (DV_SPC & 1) + push bc + ld a, [hl] + swap a + and 1 + add a + add a + add a + ld b, a + ld a, [hli] + and 1 + add a + add a + add b + ld b, a + ld a, [hl] + swap a + and 1 + add a + add b + ld b, a + ld a, [hl] + and 1 + add b + pop bc + jr .GotDV + +.Attack: + ld a, [hl] + swap a + and $f + jr .GotDV + +.Defense: + ld a, [hl] + and $f + jr .GotDV + +.Speed: + inc hl + ld a, [hl] + swap a + and $f + jr .GotDV + +.Special: + inc hl + ld a, [hl] + and $f + +.GotDV: + ld d, 0 + add e + ld e, a + jr nc, .no_overflow_1 + inc d + +.no_overflow_1 + sla e + rl d + srl b + srl b + ld a, b + add e + jr nc, .no_overflow_2 + inc d + +.no_overflow_2 + ldh [hMultiplicand + 2], a + ld a, d + ldh [hMultiplicand + 1], a + xor a + ldh [hMultiplicand + 0], a + ld a, [wCurPartyLevel] + ldh [hMultiplier], a + call Multiply + ldh a, [hProduct + 1] + ldh [hDividend + 0], a + ldh a, [hProduct + 2] + ldh [hDividend + 1], a + ldh a, [hProduct + 3] + ldh [hDividend + 2], a + ld a, 100 + ldh [hDivisor], a + ld a, 3 + ld b, a + call Divide + ld a, c + cp STAT_HP + ld a, STAT_MIN_NORMAL + jr nz, .not_hp + ld a, [wCurPartyLevel] + ld b, a + ldh a, [hQuotient + 3] + add b + ldh [hMultiplicand + 2], a + jr nc, .no_overflow_3 + ldh a, [hQuotient + 2] + inc a + ldh [hMultiplicand + 1], a + +.no_overflow_3 + ld a, STAT_MIN_HP + +.not_hp + ld b, a + ldh a, [hQuotient + 3] + add b + ldh [hMultiplicand + 2], a + jr nc, .no_overflow_4 + ldh a, [hQuotient + 2] + inc a + ldh [hMultiplicand + 1], a + +.no_overflow_4 + ldh a, [hQuotient + 2] + cp HIGH(MAX_STAT_VALUE + 1) + 1 + jr nc, .max_stat + cp HIGH(MAX_STAT_VALUE + 1) + jr c, .stat_value_okay + ldh a, [hQuotient + 3] + cp LOW(MAX_STAT_VALUE + 1) + jr c, .stat_value_okay + +.max_stat + ld a, HIGH(MAX_STAT_VALUE) + ldh [hMultiplicand + 1], a + ld a, LOW(MAX_STAT_VALUE) + ldh [hMultiplicand + 2], a + +.stat_value_okay + pop bc + pop de + pop hl + ret + +GivePoke:: + push de + push bc + xor a ; PARTYMON + ld [wMonType], a + call TryAddMonToParty + jr nc, .failed + ld hl, wPartyMonNicknames + ld a, [wPartyCount] + dec a + ld [wCurPartyMon], a + call SkipNames + ld d, h + ld e, l + pop bc + ld a, b + ld b, 0 + push bc + push de + push af + ld a, [wCurItem] + and a + jr z, .done + ld a, [wCurPartyMon] + ld hl, wPartyMon1Item + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld a, [wCurItem] + ld [hl], a + jr .done + +.failed + ld a, [wCurPartySpecies] + ld [wTempEnemyMonSpecies], a + callfar LoadEnemyMon + call SendMonIntoBox + jp nc, .FailedToGiveMon + ld a, BOXMON + ld [wMonType], a + xor a + ld [wCurPartyMon], a + ld de, wMonOrItemNameBuffer + pop bc + ld a, b + ld b, 1 + push bc + push de + push af + ld a, [wCurItem] + and a + jr z, .done + ld a, [wCurItem] + ld [sBoxMon1Item], a + +.done + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + ld [wTempEnemyMonSpecies], a + call GetPokemonName + ld hl, wStringBuffer1 + ld de, wMonOrItemNameBuffer + ld bc, MON_NAME_LENGTH + call CopyBytes + pop af + and a + jp z, .wildmon + pop de + pop bc + pop hl + push bc + push hl + ld a, [wScriptBank] + call GetFarWord + ld bc, MON_NAME_LENGTH + ld a, [wScriptBank] + call FarCopyBytes + pop hl + inc hl + inc hl + ld a, [wScriptBank] + call GetFarWord + pop bc + ld a, b + and a + push de + push bc + jr nz, .send_to_box + + push hl + ld a, [wCurPartyMon] + ld hl, wPartyMonOTs + call SkipNames + ld d, h + ld e, l + pop hl +.otnameloop + ld a, [wScriptBank] + call GetFarByte + ld [de], a + inc hl + inc de + cp "@" + jr nz, .otnameloop + ld a, [wScriptBank] + call GetFarByte + ld b, a + push bc + ld a, [wCurPartyMon] + ld hl, wPartyMon1ID + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld a, HIGH(RANDY_OT_ID) + ld [hli], a + ld [hl], LOW(RANDY_OT_ID) + pop bc + farcall SetGiftPartyMonCaughtData + jr .skip_nickname + +.send_to_box + ld a, BANK(sBoxMonOTs) + call OpenSRAM + ld de, sBoxMonOTs +.loop + ld a, [wScriptBank] + call GetFarByte + ld [de], a + inc hl + inc de + cp "@" + jr nz, .loop + ld a, [wScriptBank] + call GetFarByte + ld b, a + ld hl, sBoxMon1ID + call Random + ld [hli], a + call Random + ld [hl], a + call CloseSRAM + farcall SetGiftBoxMonCaughtData + jr .skip_nickname + +.wildmon + pop de + pop bc + push bc + push de + ld a, b + and a + jr z, .party + farcall SetBoxMonCaughtData + jr .set_caught_data + +.party + farcall SetCaughtData +.set_caught_data + farcall GiveANickname_YesNo + pop de + jr c, .skip_nickname + call InitNickname + +.skip_nickname + pop bc + pop de + ld a, b + and a + ret z + ld hl, WasSentToBillsPCText + call PrintText + ld a, BANK(sBoxMonNicknames) + call OpenSRAM + ld hl, wMonOrItemNameBuffer + ld de, sBoxMonNicknames + ld bc, MON_NAME_LENGTH + call CopyBytes + call CloseSRAM + ld b, $1 + ret + +.FailedToGiveMon: + pop bc + pop de + ld b, $2 + ret + +WasSentToBillsPCText: + text_far _WasSentToBillsPCText + text_end + +InitNickname: + push de + call LoadStandardMenuHeader + call DisableSpriteUpdates + pop de + push de + ld b, NAME_MON + farcall NamingScreen + pop hl + ld de, wStringBuffer1 + call InitName + ld a, $4 ; ExitAllMenus is in bank 0; maybe it used to be in bank 4 + ld hl, ExitAllMenus + rst FarCall + ret diff --git a/engine/pokemon/move_mon_wo_mail.asm b/engine/pokemon/move_mon_wo_mail.asm new file mode 100644 index 0000000..b8e492f --- /dev/null +++ b/engine/pokemon/move_mon_wo_mail.asm @@ -0,0 +1,133 @@ +InsertPokemonIntoBox: + ld a, BANK(sBoxCount) + call OpenSRAM + ld hl, sBoxCount + call InsertSpeciesIntoBoxOrParty + ld a, [sBoxCount] + dec a + ld [wNextBoxOrPartyIndex], a + ld hl, sBoxMonNicknames + ld bc, MON_NAME_LENGTH + ld de, wBufferMonNickname + call InsertDataIntoBoxOrParty + ld a, [sBoxCount] + dec a + ld [wNextBoxOrPartyIndex], a + ld hl, sBoxMonOTs + ld bc, NAME_LENGTH + ld de, wBufferMonOT + call InsertDataIntoBoxOrParty + ld a, [sBoxCount] + dec a + ld [wNextBoxOrPartyIndex], a + ld hl, sBoxMons + ld bc, BOXMON_STRUCT_LENGTH + ld de, wBufferMon + call InsertDataIntoBoxOrParty + ld hl, wBufferMonMoves + ld de, wTempMonMoves + ld bc, NUM_MOVES + call CopyBytes + ld hl, wBufferMonPP + ld de, wTempMonPP + ld bc, NUM_MOVES + call CopyBytes + ld a, [wCurPartyMon] + ld b, a + farcall RestorePPOfDepositedPokemon + jp CloseSRAM + +InsertPokemonIntoParty: + ld hl, wPartyCount + call InsertSpeciesIntoBoxOrParty + ld a, [wPartyCount] + dec a + ld [wNextBoxOrPartyIndex], a + ld hl, wPartyMonNicknames + ld bc, MON_NAME_LENGTH + ld de, wBufferMonNickname + call InsertDataIntoBoxOrParty + ld a, [wPartyCount] + dec a + ld [wNextBoxOrPartyIndex], a + ld hl, wPartyMonOTs + ld bc, NAME_LENGTH + ld de, wBufferMonOT + call InsertDataIntoBoxOrParty + ld a, [wPartyCount] + dec a + ld [wNextBoxOrPartyIndex], a + ld hl, wPartyMons + ld bc, PARTYMON_STRUCT_LENGTH + ld de, wBufferMon + call InsertDataIntoBoxOrParty + ret + +InsertSpeciesIntoBoxOrParty: + inc [hl] + inc hl + ld a, [wCurPartyMon] + ld c, a + ld b, 0 + add hl, bc + ld a, [wCurPartySpecies] + ld c, a +.loop + ld a, [hl] + ld [hl], c + inc hl + inc c + ld c, a + jr nz, .loop + ret + +InsertDataIntoBoxOrParty: + push de + push hl + push bc + ld a, [wNextBoxOrPartyIndex] + dec a + call AddNTimes + push hl + add hl, bc + ld d, h + ld e, l + pop hl +.loop + push bc + ld a, [wNextBoxOrPartyIndex] + ld b, a + ld a, [wCurPartyMon] + cp b + pop bc + jr z, .insert + push hl + push de + push bc + call CopyBytes + pop bc + pop de + pop hl + push hl + ld a, l + sub c + ld l, a + ld a, h + sbc b + ld h, a + pop de + ld a, [wNextBoxOrPartyIndex] + dec a + ld [wNextBoxOrPartyIndex], a + jr .loop + +.insert + pop bc + pop hl + ld a, [wCurPartyMon] + call AddNTimes + ld d, h + ld e, l + pop hl + call CopyBytes + ret diff --git a/engine/pokemon/party_menu.asm b/engine/pokemon/party_menu.asm new file mode 100644 index 0000000..75db30a --- /dev/null +++ b/engine/pokemon/party_menu.asm @@ -0,0 +1,823 @@ +SelectMonFromParty: + call DisableSpriteUpdates + xor a + ld [wPartyMenuActionText], a + call ClearBGPalettes + call InitPartyMenuLayout + call WaitBGMap + call SetPalettes + call DelayFrame + call PartyMenuSelect + call ReturnToMapWithSpeechTextbox + ret + +SelectTradeOrDayCareMon: + ld a, b + ld [wPartyMenuActionText], a + call DisableSpriteUpdates + call ClearBGPalettes + call InitPartyMenuLayout + call WaitBGMap + ld b, SCGB_PARTY_MENU + call GetSGBLayout + call SetPalettes + call DelayFrame + call PartyMenuSelect + call ReturnToMapWithSpeechTextbox + ret + +InitPartyMenuLayout: + call LoadPartyMenuGFX + call InitPartyMenuWithCancel + call InitPartyMenuGFX + call WritePartyMenuTilemap + call PrintPartyMenuText + ret + +LoadPartyMenuGFX: + call LoadFontsBattleExtra + callfar InitPartyMenuPalettes + callfar ClearSpriteAnims2 + ret + +WritePartyMenuTilemap: + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + xor a + ldh [hBGMapMode], a + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, " " + call ByteFill ; blank the tilemap + call GetPartyMenuQualityIndexes +.loop + ld a, [hli] + cp -1 + jr z, .end + push hl + ld hl, .Jumptable + rst JumpTable + pop hl + jr .loop +.end + pop af + ld [wOptions], a + ret + +.Jumptable: +; entries correspond to PARTYMENUQUALITY_* constants + dw PlacePartyNicknames + dw PlacePartyHPBar + dw PlacePartyMenuHPDigits + dw PlacePartyMonLevel + dw PlacePartyMonStatus + dw PlacePartyMonTMHMCompatibility + dw PlacePartyMonEvoStoneCompatibility + dw PlacePartyMonGender + dw PlacePartyMonMobileBattleSelection + +PlacePartyNicknames: + hlcoord 3, 1 + ld a, [wPartyCount] + and a + jr z, .end + ld c, a + ld b, 0 +.loop + push bc + push hl + push hl + ld hl, wPartyMonNicknames + ld a, b + call GetNickname + pop hl + call PlaceString + pop hl + ld de, 2 * SCREEN_WIDTH + add hl, de + pop bc + inc b + dec c + jr nz, .loop + +.end + dec hl + dec hl + ld de, .CancelString + call PlaceString + ret + +.CancelString: + db "CANCEL@" + +PlacePartyHPBar: + xor a + ld [wSGBPals], a + ld a, [wPartyCount] + and a + ret z + ld c, a + ld b, 0 + hlcoord 11, 2 +.loop + push bc + push hl + call PartyMenuCheckEgg + jr z, .skip + push hl + call PlacePartymonHPBar + pop hl + ld d, $6 + ld b, $0 + call DrawBattleHPBar + ld hl, wHPPals + ld a, [wSGBPals] + ld c, a + ld b, 0 + add hl, bc + call SetHPPal + ld b, SCGB_PARTY_MENU_HP_BARS + call GetSGBLayout +.skip + ld hl, wSGBPals + inc [hl] + pop hl + ld de, 2 * SCREEN_WIDTH + add hl, de + pop bc + inc b + dec c + jr nz, .loop + ld b, SCGB_PARTY_MENU + call GetSGBLayout + ret + +PlacePartymonHPBar: + ld a, b + ld bc, PARTYMON_STRUCT_LENGTH + ld hl, wPartyMon1HP + call AddNTimes + ld a, [hli] + or [hl] + jr nz, .not_fainted + xor a + ld e, a + ld c, a + ret + +.not_fainted + dec hl + ld a, [hli] + ld b, a + ld a, [hli] + ld c, a + ld a, [hli] + ld d, a + ld a, [hli] + ld e, a + predef ComputeHPBarPixels + ret + +PlacePartyMenuHPDigits: + ld a, [wPartyCount] + and a + ret z + ld c, a + ld b, 0 + hlcoord 13, 1 +.loop + push bc + push hl + call PartyMenuCheckEgg + jr z, .next + push hl + ld a, b + ld bc, PARTYMON_STRUCT_LENGTH + ld hl, wPartyMon1HP + call AddNTimes + ld e, l + ld d, h + pop hl + push de + lb bc, 2, 3 + call PrintNum + pop de + ld a, "/" + ld [hli], a + inc de + inc de + lb bc, 2, 3 + call PrintNum + +.next + pop hl + ld de, 2 * SCREEN_WIDTH + add hl, de + pop bc + inc b + dec c + jr nz, .loop + ret + +PlacePartyMonLevel: + ld a, [wPartyCount] + and a + ret z + ld c, a + ld b, 0 + hlcoord 8, 2 +.loop + push bc + push hl + call PartyMenuCheckEgg + jr z, .next + push hl + ld a, b + ld bc, PARTYMON_STRUCT_LENGTH + ld hl, wPartyMon1Level + call AddNTimes + ld e, l + ld d, h + pop hl + ld a, [de] + cp 100 ; This is distinct from MAX_LEVEL. + jr nc, .ThreeDigits + ld a, "" + ld [hli], a + lb bc, PRINTNUM_LEFTALIGN | 1, 2 + ; jr .okay +.ThreeDigits: + lb bc, PRINTNUM_LEFTALIGN | 1, 3 +; .okay + call PrintNum + +.next + pop hl + ld de, SCREEN_WIDTH * 2 + add hl, de + pop bc + inc b + dec c + jr nz, .loop + ret + +PlacePartyMonStatus: + ld a, [wPartyCount] + and a + ret z + ld c, a + ld b, 0 + hlcoord 5, 2 +.loop + push bc + push hl + call PartyMenuCheckEgg + jr z, .next + push hl + ld a, b + ld bc, PARTYMON_STRUCT_LENGTH + ld hl, wPartyMon1Status + call AddNTimes + ld e, l + ld d, h + pop hl + call PlaceStatusString + +.next + pop hl + ld de, SCREEN_WIDTH * 2 + add hl, de + pop bc + inc b + dec c + jr nz, .loop + ret + +PlacePartyMonTMHMCompatibility: + ld a, [wPartyCount] + and a + ret z + ld c, a + ld b, 0 + hlcoord 12, 2 +.loop + push bc + push hl + call PartyMenuCheckEgg + jr z, .next + push hl + ld hl, wPartySpecies + ld e, b + ld d, 0 + add hl, de + ld a, [hl] + ld [wCurPartySpecies], a + predef CanLearnTMHMMove + pop hl + call .PlaceAbleNotAble + call PlaceString + +.next + pop hl + ld de, SCREEN_WIDTH * 2 + add hl, de + pop bc + inc b + dec c + jr nz, .loop + ret + +.PlaceAbleNotAble: + ld a, c + and a + jr nz, .able + ld de, .string_not_able + ret + +.able + ld de, .string_able + ret + +.string_able + db "ABLE@" + +.string_not_able + db "NOT ABLE@" + +PlacePartyMonEvoStoneCompatibility: + ld a, [wPartyCount] + and a + ret z + ld c, a + ld b, 0 + hlcoord 12, 2 +.loop + push bc + push hl + call PartyMenuCheckEgg + jr z, .next + push hl + ld a, b + ld bc, PARTYMON_STRUCT_LENGTH + ld hl, wPartyMon1Species + call AddNTimes + ld a, [hl] + call GetPokemonIndexFromID + ld b, h + ld c, l + ld hl, EvosAttacksPointers + ld a, BANK(EvosAttacksPointers) + call LoadDoubleIndirectPointer + ld d, h + ld e, l + farcall DetermineEvolutionItemResults + ld a, d + or e + ld de, .string_not_able + jr z, .got_string + ld de, .string_able +.got_string + pop hl + call PlaceString + +.next + pop hl + ld de, 2 * SCREEN_WIDTH + add hl, de + pop bc + inc b + dec c + jr nz, .loop + ret + +.string_able + db "ABLE@" +.string_not_able + db "NOT ABLE@" + +PlacePartyMonGender: + ld a, [wPartyCount] + and a + ret z + ld c, a + ld b, 0 + hlcoord 12, 2 +.loop + push bc + push hl + call PartyMenuCheckEgg + jr z, .next + ld [wCurPartySpecies], a + push hl + ld a, b + ld [wCurPartyMon], a + xor a + ld [wMonType], a + call GetGender + ld de, .unknown + jr c, .got_gender + ld de, .male + jr nz, .got_gender + ld de, .female + +.got_gender + pop hl + call PlaceString + +.next + pop hl + ld de, 2 * SCREEN_WIDTH + add hl, de + pop bc + inc b + dec c + jr nz, .loop + ret + +.male + db "♂…MALE@" + +.female + db "♀…FEMALE@" + +.unknown + db "…UNKNOWN@" + +PlacePartyMonMobileBattleSelection: + ld a, [wPartyCount] + and a + ret z + ld c, a + ld b, 0 + hlcoord 12, 1 +.loop + push bc + push hl + ld de, .String_Sanka_Shinai + call PlaceString + pop hl + ld de, 2 * SCREEN_WIDTH + add hl, de + pop bc + inc b + dec c + jr nz, .loop + ld a, l + ld e, MON_NAME_LENGTH + sub e + ld l, a + ld a, h + sbc $0 + ld h, a + ld de, .String_Kettei_Yameru + call PlaceString + ld b, $3 + ld c, $0 + ld hl, wd002 + ld a, [hl] +.loop2 + push hl + push bc + hlcoord 12, 1 +.loop3 + and a + jr z, .done + ld de, 2 * SCREEN_WIDTH + add hl, de + dec a + jr .loop3 + +.done + ld de, .String_Banme + push hl + call PlaceString + pop hl + pop bc + push bc + push hl + ld a, c + ld hl, .Strings_1_2_3 + call GetNthString + ld d, h + ld e, l + pop hl + call PlaceString + pop bc + pop hl + inc hl + ld a, [hl] + inc c + dec b + ret z + jr .loop2 + +.String_Banme: + db " ばんめ  @" ; Place +.String_Sanka_Shinai: + db "さんかしない@" ; Cancel +.String_Kettei_Yameru: + db "けってい  やめる@" ; Quit +.Strings_1_2_3: + db "1@", "2@", "3@" ; 1st, 2nd, 3rd + +PartyMenuCheckEgg: + ld a, LOW(wPartySpecies) + add b + ld e, a + ld a, HIGH(wPartySpecies) + adc 0 + ld d, a + ld a, [de] + cp EGG + ret + +GetPartyMenuQualityIndexes: + ld a, [wPartyMenuActionText] + and $f0 + jr nz, .skip + ld a, [wPartyMenuActionText] + and $f + ld e, a + ld d, 0 + ld hl, PartyMenuQualityPointers + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ret + +.skip + ld hl, PartyMenuQualityPointers.Default + ret + +INCLUDE "data/party_menu_qualities.asm" + +InitPartyMenuGFX: + ld hl, wPartyCount + ld a, [hli] + and a + ret z + ld c, a + xor a + ldh [hObjectStructIndex], a +.loop + push bc + push hl + ld hl, LoadMenuMonIcon + ld a, BANK(LoadMenuMonIcon) + ld e, MONICON_PARTYMENU + rst FarCall + ldh a, [hObjectStructIndex] + inc a + ldh [hObjectStructIndex], a + pop hl + pop bc + dec c + jr nz, .loop + callfar PlaySpriteAnimations + ret + +InitPartyMenuWithCancel: +; with cancel + xor a + ld [wSwitchMon], a + ld de, PartyMenu2DMenuData + call Load2DMenuData + ld a, [wPartyCount] + inc a + ld [w2DMenuNumRows], a ; list length + dec a + ld b, a + ld a, [wPartyMenuCursor] + and a + jr z, .skip + inc b + cp b + jr c, .done + +.skip + ld a, 1 + +.done + ld [wMenuCursorY], a + ld a, A_BUTTON | B_BUTTON + ld [wMenuJoypadFilter], a + ret + +InitPartyMenuNoCancel: +; no cancel + ld de, PartyMenu2DMenuData + call Load2DMenuData + ld a, [wPartyCount] + ld [w2DMenuNumRows], a ; list length + ld b, a + ld a, [wPartyMenuCursor] + and a + jr z, .skip + inc b + cp b + jr c, .done +.skip + ld a, 1 +.done + ld [wMenuCursorY], a + ld a, A_BUTTON | B_BUTTON + ld [wMenuJoypadFilter], a + ret + +PartyMenu2DMenuData: + db 1, 0 ; cursor start y, x + db 0, 1 ; rows, columns + db $60, $00 ; flags + dn 2, 0 ; cursor offset + db 0 ; accepted buttons + +PartyMenuSelect: +; sets carry if exitted menu. + call StaticMenuJoypad + call PlaceHollowCursor + ld a, [wPartyCount] + inc a + ld b, a + ld a, [wMenuCursorY] ; menu selection? + cp b + jr z, .exitmenu ; CANCEL + ld [wPartyMenuCursor], a + ldh a, [hJoyLast] + ld b, a + bit B_BUTTON_F, b + jr nz, .exitmenu ; B button + ld a, [wMenuCursorY] + dec a + ld [wCurPartyMon], a + ld c, a + ld b, 0 + ld hl, wPartySpecies + add hl, bc + ld a, [hl] + ld [wCurPartySpecies], a + + ld de, SFX_READ_TEXT_2 + call PlaySFX + call WaitSFX + and a + ret + +.exitmenu + ld de, SFX_READ_TEXT_2 + call PlaySFX + call WaitSFX + scf + ret + +PrintPartyMenuText: + hlcoord 0, 14 + lb bc, 2, 18 + call Textbox + ld a, [wPartyCount] + and a + jr nz, .haspokemon + ld de, YouHaveNoPKMNString + jr .gotstring +.haspokemon + ld a, [wPartyMenuActionText] + and $f ; drop high nibble + ld hl, PartyMenuStrings + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld d, [hl] + ld e, a +.gotstring + ld a, [wOptions] + push af + set NO_TEXT_SCROLL, a + ld [wOptions], a + hlcoord 1, 16 ; Coord + call PlaceString + pop af + ld [wOptions], a + ret + +PartyMenuStrings: + dw ChooseAMonString + dw UseOnWhichPKMNString + dw WhichPKMNString + dw TeachWhichPKMNString + dw MoveToWhereString + dw UseOnWhichPKMNString + dw ChooseAMonString ; Probably used to be ChooseAFemalePKMNString + dw ChooseAMonString ; Probably used to be ChooseAMalePKMNString + dw ToWhichPKMNString + +ChooseAMonString: + db "Choose a #MON.@" + +UseOnWhichPKMNString: + db "Use on which ?@" + +WhichPKMNString: + db "Which ?@" + +TeachWhichPKMNString: + db "Teach which ?@" + +MoveToWhereString: + db "Move to where?@" + +ChooseAFemalePKMNString: ; unreferenced + db "Choose a ♀.@" + +ChooseAMalePKMNString: ; unreferenced + db "Choose a ♂.@" + +ToWhichPKMNString: + db "To which ?@" + +YouHaveNoPKMNString: + db "You have no !@" + +PrintPartyMenuActionText: + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames + call GetNickname + ld a, [wPartyMenuActionText] + and $f + ld hl, .MenuActionTexts + call .PrintText + ret + +.MenuActionTexts: +; entries correspond to PARTYMENUTEXT_* constants + dw .CuredOfPoisonText + dw .BurnWasHealedText + dw .WasDefrostedText + dw .WokeUpText + dw .RidOfParalysisText + dw .RecoveredSomeHPText + dw .HealthReturnedText + dw .RevitalizedText + dw .GrewToLevelText + dw .CameToItsSensesText + +.RecoveredSomeHPText: + text_far _RecoveredSomeHPText + text_end + +.CuredOfPoisonText: + text_far _CuredOfPoisonText + text_end + +.RidOfParalysisText: + text_far _RidOfParalysisText + text_end + +.BurnWasHealedText: + text_far _BurnWasHealedText + text_end + +.WasDefrostedText: + text_far _WasDefrostedText + text_end + +.WokeUpText: + text_far _WokeUpText + text_end + +.HealthReturnedText: + text_far _HealthReturnedText + text_end + +.RevitalizedText: + text_far _RevitalizedText + text_end + +.GrewToLevelText: + text_far _GrewToLevelText + text_end + +.CameToItsSensesText: + text_far _CameToItsSensesText + text_end + +.PrintText: + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wOptions] + push af + set NO_TEXT_SCROLL, a + ld [wOptions], a + call PrintText + pop af + ld [wOptions], a + ret diff --git a/engine/pokemon/print_move_description.asm b/engine/pokemon/print_move_description.asm new file mode 100644 index 0000000..850ec3c --- /dev/null +++ b/engine/pokemon/print_move_description.asm @@ -0,0 +1,19 @@ +PrintMoveDescription: + push hl + ld a, [wCurSpecies] + call GetMoveIndexFromID + ld b, h + ld c, l + ld a, BANK(MoveDescriptions) + ld hl, MoveDescriptions + call LoadDoubleIndirectPointer + jr nz, .ok + ld a, BANK(InvalidMoveDescription) + ld hl, InvalidMoveDescription +.ok + ld d, h + ld e, l + pop hl + jp FarPlaceString + +INCLUDE "data/moves/descriptions.asm" diff --git a/engine/pokemon/search_owned.asm b/engine/pokemon/search_owned.asm new file mode 100644 index 0000000..694ad36 --- /dev/null +++ b/engine/pokemon/search_owned.asm @@ -0,0 +1,362 @@ +BeastsCheck: +; Check if the player owns all three legendary beasts. +; They must exist in either party or PC, and have the player's OT and ID. +; Return the result in wScriptVar. + + ld hl, RAIKOU + call GetPokemonIDFromIndex + ld [wScriptVar], a + call CheckOwnMonAnywhere + jr nc, .notexist + + ld hl, ENTEI + call GetPokemonIDFromIndex + ld [wScriptVar], a + call CheckOwnMonAnywhere + jr nc, .notexist + + ld hl, SUICUNE + call GetPokemonIDFromIndex + ld [wScriptVar], a + call CheckOwnMonAnywhere + jr nc, .notexist + + ; they exist + ld a, 1 + ld [wScriptVar], a + ret + +.notexist + xor a + ld [wScriptVar], a + ret + +MonCheck: +; Check if the player owns any Pokémon of the species in wScriptVar. +; Return the result in wScriptVar. + + call CheckOwnMonAnywhere + jr c, .exists + + ; doesn't exist + xor a + ld [wScriptVar], a + ret + +.exists + ld a, 1 + ld [wScriptVar], a + ret + +CheckOwnMonAnywhere: +; Check if the player owns any monsters of the species in wScriptVar. +; It must exist in either party or PC, and have the player's OT and ID. + + ; If there are no monsters in the party, + ; the player must not own any yet. + + ld a, [wPartyCount] + and a + ret z + +; BUG: CheckOwnMon does not check the Day-Care (see docs/bugs_and_glitches.md) + ld d, a + ld e, 0 + ld hl, wPartyMon1Species + ld bc, wPartyMonOTs + + ; Run CheckOwnMon on each Pokémon in the party. + +.partymon + and a + call CheckOwnMon + ret c + + push bc + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop bc + call UpdateOTPointer + dec d + jr nz, .partymon + + ; Run CheckOwnMon on each Pokémon in the PC. + + ld a, BANK(sBoxCount) + call OpenSRAM + ld a, [sBoxCount] + and a + jr z, .boxes + + ld d, a + ld hl, sBoxMon1Species + ld bc, sBoxMonOTs +.openboxmon + and a + call CheckOwnMon + jr nc, .loop + + call CloseSRAM + ret + +.loop + push bc + ld bc, BOXMON_STRUCT_LENGTH + add hl, bc + pop bc + call UpdateOTPointer + dec d + jr nz, .openboxmon + + ; Run CheckOwnMon on each monster in the other 13 PC boxes. + +.boxes + call CloseSRAM + ld a, [wSavedAtLeastOnce] + and a + ret z + + ld c, 0 + ld a, [wScriptVar] + call GetPokemonIndexFromID + ld d, h + ld e, l +.box + ; Don't search the current box again. + ld a, [wCurBox] + and $f + cp c + jr z, .loopbox + + ; Load the box's indexes. + ld hl, BoxPokemonIndexesAddressTable + ld b, 0 + add hl, bc + add hl, bc + add hl, bc + ld a, [hli] + ldh [hTemp], a + call OpenSRAM + ld a, [hli] + ld h, [hl] + ld l, a + +.boxmon + ld a, [hli] + cp e + ld a, [hli] + jr nz, .loopboxmon + cp d + jr nz, .loopboxmon + + push hl + push de + push bc + call GetBoxMonPointers + ld a, [wTempSpecies] + call IsAPokemon + ccf + call c, CheckOwnMon ;calls with carry set (skips species check) + pop bc + pop de + pop hl + jp c, CloseSRAM ;preserves flags + ldh a, [hTemp] + call OpenSRAM + +.loopboxmon + inc b + ld a, b + cp MONS_PER_BOX + jr c, .boxmon + +.loopbox + inc c + ld a, c + cp NUM_BOXES + jr c, .box + + call CloseSRAM + and a + ret + +CheckOwnMon: +; Check if a Pokémon belongs to the player and is of a specific species. +; We compare the species we are looking for in [wScriptVar] to the species +; we have in [hl]. + +; inputs: +; hl, pointer to PartyMonNSpecies +; bc, pointer to PartyMonNOT +; wScriptVar should contain the species we're looking for +; carry flag: if set, skip species check + +; outputs: +; sets carry if monster matches species, ID, and OT name. + + push bc + push hl + push de + ld d, b + ld e, c + + ; check species + jr c, .no_species_check + ld a, [wScriptVar] + ld b, [hl] + cp b + jr nz, .notfound +.no_species_check + + ; check ID number + + ld bc, MON_ID + add hl, bc + ld a, [wPlayerID] + cp [hl] + jr nz, .notfound + inc hl + ld a, [wPlayerID + 1] + cp [hl] + jr nz, .notfound + + ; check OT + + ld hl, wPlayerName + +; BUG: CheckOwnMon only checks the first five letters of OT names (see docs/bugs_and_glitches.md) +rept NAME_LENGTH_JAPANESE - 2 + ld a, [de] + cp [hl] + jr nz, .notfound + cp "@" + jr z, .found + inc hl + inc de +endr + + ld a, [de] + cp [hl] + jr z, .found + +.notfound + pop de + pop hl + pop bc + and a + ret + +.found + pop de + pop hl + pop bc + scf + ret + +GetBoxMonPointers:: + ; in: b = slot, c = box + ; out: hl = pointer to mon struct, de = pointer to nickname, bc = pointer to OT + ; also loads the corresponding box bank in SRAM and sets wTempSpecies to the party ID (or 0 for an empty slot) + ld e, b + ld b, 0 + ld hl, SearchBoxAddressTable + add hl, bc + add hl, bc + add hl, bc + ld a, [hli] + call OpenSRAM + ld a, [hli] + ld h, [hl] + ld l, a + ld a, e + ld d, h + ld e, l + cp [hl] + ld c, a + ld a, b ;b = 0 + jr nc, .got_ID + inc hl + add hl, bc + ld a, [hl] +.got_ID + ld [wTempSpecies], a + ld a, c + ld hl, sBoxMonOTs - sBox + add hl, de + ld c, NAME_LENGTH + push af + call AddNTimes + pop af + push hl + ld hl, sBoxMonNicknames - sBox + add hl, de + if MON_NAME_LENGTH != NAME_LENGTH + ld c, MON_NAME_LENGTH + endc + push af + call AddNTimes + pop af + push hl + ld hl, sBoxMons - sBox + add hl, de + pop de + ld c, BOXMON_STRUCT_LENGTH + call AddNTimes + pop bc + ret + +GetBoxMonPokemonIndexPointer:: + ; in: b = slot, c = box + ; out: b = bank, hl = pointer + ; preserves de + ld a, b + ld b, 0 + ld hl, BoxPokemonIndexesAddressTable + add hl, bc + add hl, bc + add hl, bc + ld c, a + ld a, [hli] + push af + ld a, [hli] + ld h, [hl] + ld l, a + ld b, 0 + add hl, bc + add hl, bc + pop bc + ret + +SearchBoxAddressTable: + table_width 3, SearchBoxAddressTable +for n, 1, NUM_BOXES + 1 + dba sBox{d:n} +endr + assert_table_length NUM_BOXES + +BoxPokemonIndexesAddressTable: + table_width 3, BoxPokemonIndexesAddressTable + dba sBox1PokemonIndexes + dba sBox2PokemonIndexes + dba sBox3PokemonIndexes + dba sBox4PokemonIndexes + dba sBox5PokemonIndexes + dba sBox6PokemonIndexes + dba sBox7PokemonIndexes + dba sBox8PokemonIndexes + dba sBox9PokemonIndexes + dba sBox10PokemonIndexes + dba sBox11PokemonIndexes + dba sBox12PokemonIndexes + dba sBox13PokemonIndexes + dba sBox14PokemonIndexes + assert_table_length NUM_BOXES + +UpdateOTPointer: + push hl + ld hl, NAME_LENGTH + add hl, bc + ld b, h + ld c, l + pop hl + ret diff --git a/engine/pokemon/search_party.asm b/engine/pokemon/search_party.asm new file mode 100644 index 0000000..c33d84e --- /dev/null +++ b/engine/pokemon/search_party.asm @@ -0,0 +1,134 @@ +_FindPartyMonAboveLevel: + ld hl, wPartyMon1Level + call FindAboveLevel + ret + +_FindPartyMonAtLeastThatHappy: + ld hl, wPartyMon1Happiness + call FindAtLeastThatHappy + ret + +_FindPartyMonThatSpecies: + ld hl, wPartyMon1Species + jp FindThatSpecies + +_FindPartyMonThatSpeciesYourTrainerID: + ld hl, wPartyMon1Species + call FindThatSpecies + ret z + ld a, c + ld hl, wPartyMon1ID + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld a, [wPlayerID] + cp [hl] + jr nz, .nope + inc hl + ld a, [wPlayerID + 1] + cp [hl] + jr nz, .nope + ld a, $1 + and a + ret + +.nope + xor a + ret + +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 + ld a, [wPartyCount] + ld d, a +.loop + ld a, d + dec a + push hl + push bc + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + pop bc + ld a, b + cp [hl] + pop hl + jr z, .greater_equal + jr nc, .lower + +.greater_equal + ld a, c + or $1 + ld c, a + +.lower + sla c + dec d + jr nz, .loop + call RetroactivelyIgnoreEggs + ld a, c + and a + ret + +FindAboveLevel: + ld c, $0 + ld a, [wPartyCount] + ld d, a +.loop + ld a, d + dec a + push hl + push bc + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + pop bc + ld a, b + cp [hl] + pop hl + jr c, .greater + ld a, c + or $1 + ld c, a + +.greater + sla c + dec d + jr nz, .loop + call RetroactivelyIgnoreEggs + ld a, c + and a + ret + +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. +; Otherwise, returns z. + ld c, -1 + ld hl, wPartySpecies +.loop + ld a, [hli] + cp -1 + ret z + inc c + cp b + jr nz, .loop + ld a, $1 + and a + ret + +RetroactivelyIgnoreEggs: + ld e, %11111110 + ld hl, wPartySpecies +.loop + ld a, [hli] + cp -1 + ret z + cp EGG + jr nz, .skip_notegg + ld a, c + and e + ld c, a + +.skip_notegg + rlc e + jr .loop diff --git a/engine/pokemon/stats_screen.asm b/engine/pokemon/stats_screen.asm new file mode 100644 index 0000000..4fcc64d --- /dev/null +++ b/engine/pokemon/stats_screen.asm @@ -0,0 +1,1215 @@ + const_def 1 + const PINK_PAGE ; 1 + const GREEN_PAGE ; 2 + const BLUE_PAGE ; 3 +DEF NUM_STAT_PAGES EQU const_value - 1 + +DEF STAT_PAGE_MASK EQU %00000011 + +BattleStatsScreenInit: + ld a, [wLinkMode] + cp LINK_MOBILE + jr nz, StatsScreenInit + + ld a, [wBattleMode] + and a + jr z, StatsScreenInit + jr _MobileStatsScreenInit + +StatsScreenInit: + ld hl, StatsScreenMain + jr StatsScreenInit_gotaddress + +_MobileStatsScreenInit: + ld hl, StatsScreenMobile + jr StatsScreenInit_gotaddress + +StatsScreenInit_gotaddress: + ldh a, [hMapAnims] + push af + xor a + ldh [hMapAnims], a ; disable overworld tile animations + ld a, [wBoxAlignment] ; whether sprite is to be mirrorred + push af + ld a, [wJumptableIndex] + ld b, a + ld a, [wStatsScreenFlags] + ld c, a + + push bc + push hl + call ClearBGPalettes + call ClearTilemap + call UpdateSprites + farcall StatsScreen_LoadFont + pop hl + call _hl_ + call ClearBGPalettes + call ClearTilemap + pop bc + + ; restore old values + ld a, b + ld [wJumptableIndex], a + ld a, c + ld [wStatsScreenFlags], a + pop af + ld [wBoxAlignment], a + pop af + ldh [hMapAnims], a + ret + +StatsScreenMain: + xor a + ld [wJumptableIndex], a +; ??? + ld [wStatsScreenFlags], a + ld a, [wStatsScreenFlags] + and ~STAT_PAGE_MASK + or PINK_PAGE ; first_page + ld [wStatsScreenFlags], a +.loop + ld a, [wJumptableIndex] + and ~(1 << 7) + ld hl, StatsScreenPointerTable + rst JumpTable + call StatsScreen_WaitAnim + ld a, [wJumptableIndex] + bit 7, a + jr z, .loop + ret + +StatsScreenMobile: + xor a + ld [wJumptableIndex], a +; ??? + ld [wStatsScreenFlags], a + ld a, [wStatsScreenFlags] + and ~STAT_PAGE_MASK + or PINK_PAGE ; first_page + ld [wStatsScreenFlags], a +.loop + farcall Mobile_SetOverworldDelay + ld a, [wJumptableIndex] + and $7f + ld hl, StatsScreenPointerTable + rst JumpTable + call StatsScreen_WaitAnim + farcall MobileComms_CheckInactivityTimer + jr c, .exit + ld a, [wJumptableIndex] + bit 7, a + jr z, .loop + +.exit + ret + +StatsScreenPointerTable: + dw MonStatsInit ; regular pokémon + dw EggStatsInit ; egg + dw StatsScreenWaitCry + dw EggStatsJoypad + dw StatsScreen_LoadPage + dw StatsScreenWaitCry + dw MonStatsJoypad + dw StatsScreen_Exit + +StatsScreen_WaitAnim: + ld hl, wStatsScreenFlags + bit 6, [hl] + jr nz, .try_anim + bit 5, [hl] + jr nz, .finish + call DelayFrame + ret + +.try_anim + farcall SetUpPokeAnim + jr nc, .finish + ld hl, wStatsScreenFlags + res 6, [hl] +.finish + ld hl, wStatsScreenFlags + res 5, [hl] + farcall HDMATransferTilemapToWRAMBank3 + ret + +StatsScreen_SetJumptableIndex: + ld a, [wJumptableIndex] + and $80 + or h + ld [wJumptableIndex], a + ret + +StatsScreen_Exit: + ld hl, wJumptableIndex + set 7, [hl] + ret + +MonStatsInit: + ld hl, wStatsScreenFlags + res 6, [hl] + call ClearBGPalettes + call ClearTilemap + farcall HDMATransferTilemapToWRAMBank3 + call StatsScreen_CopyToTempMon + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + call StatsScreen_InitUpperHalf + ld hl, wStatsScreenFlags + set 4, [hl] + ld h, 4 + call StatsScreen_SetJumptableIndex + ret + +.egg + ld h, 1 + call StatsScreen_SetJumptableIndex + ret + +EggStatsInit: + call EggStatsScreen + ld a, [wJumptableIndex] + inc a + ld [wJumptableIndex], a + ret + +EggStatsJoypad: + call StatsScreen_GetJoypad + jr nc, .check + ld h, 0 + call StatsScreen_SetJumptableIndex + ret + +.check + bit A_BUTTON_F, a + jr nz, .quit +if DEF(_DEBUG) + cp START + jr z, .hatch +endc + and D_DOWN | D_UP | A_BUTTON | B_BUTTON + jp StatsScreen_JoypadAction + +.quit + ld h, 7 + call StatsScreen_SetJumptableIndex + ret + +if DEF(_DEBUG) +.hatch + ld a, [wMonType] + or a + jr nz, .skip + push bc + push de + push hl + ld a, [wCurPartyMon] + ld bc, PARTYMON_STRUCT_LENGTH + ld hl, wPartyMon1Happiness + call AddNTimes + ld [hl], 1 + ld a, 1 + ld [wTempMonHappiness], a + ld a, 127 + ld [wStepCount], a + ld de, .HatchSoonString + hlcoord 8, 17 + call PlaceString + ld hl, wStatsScreenFlags + set 5, [hl] + pop hl + pop de + pop bc +.skip + xor a + jp StatsScreen_JoypadAction + +.HatchSoonString: + db "▶HATCH SOON!@" +endc + +StatsScreen_LoadPage: + call StatsScreen_LoadGFX + ld hl, wStatsScreenFlags + res 4, [hl] + ld a, [wJumptableIndex] + inc a + ld [wJumptableIndex], a + ret + +MonStatsJoypad: + call StatsScreen_GetJoypad + jr nc, .next + ld h, 0 + call StatsScreen_SetJumptableIndex + ret + +.next + and D_DOWN | D_UP | D_LEFT | D_RIGHT | A_BUTTON | B_BUTTON + jp StatsScreen_JoypadAction + +StatsScreenWaitCry: + call IsSFXPlaying + ret nc + ld a, [wJumptableIndex] + inc a + ld [wJumptableIndex], a + ret + +StatsScreen_CopyToTempMon: + ld a, [wMonType] + cp TEMPMON + jr nz, .not_tempmon + ld a, [wBufferMonSpecies] + ld [wCurSpecies], a + call GetBaseData + ld hl, wBufferMon + ld de, wTempMon + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + jr .done + +.not_tempmon + farcall CopyMonToTempMon + ld a, [wCurPartySpecies] + cp EGG + jr z, .done + ld a, [wMonType] + cp BOXMON + jr c, .done + farcall CalcTempmonStats +.done + and a + ret + +StatsScreen_GetJoypad: + call GetJoypad + ld a, [wMonType] + cp TEMPMON + jr nz, .not_tempmon + push hl + push de + push bc + farcall StatsScreenDPad + pop bc + pop de + pop hl + ld a, [wMenuJoypad] + and D_DOWN | D_UP + jr nz, .set_carry + ld a, [wMenuJoypad] + jr .clear_carry + +.not_tempmon + ldh a, [hJoyPressed] +.clear_carry + and a + ret + +.set_carry + scf + ret + +StatsScreen_JoypadAction: + push af + ld a, [wStatsScreenFlags] + maskbits NUM_STAT_PAGES + ld c, a + pop af + bit B_BUTTON_F, a + jp nz, .b_button + bit D_LEFT_F, a + jr nz, .d_left + bit D_RIGHT_F, a + jr nz, .d_right + bit A_BUTTON_F, a + jr nz, .a_button + bit D_UP_F, a + jr nz, .d_up + bit D_DOWN_F, a + jr nz, .d_down + jr .done + +.d_down + ld a, [wMonType] + cp BOXMON + jr nc, .done + and a + ld a, [wPartyCount] + jr z, .next_mon + ld a, [wOTPartyCount] +.next_mon + ld b, a + ld a, [wCurPartyMon] + inc a + cp b + jr z, .done + ld [wCurPartyMon], a + ld b, a + ld a, [wMonType] + and a + jr nz, .load_mon + ld a, b + inc a + ld [wPartyMenuCursor], a + jr .load_mon + +.d_up + ld a, [wCurPartyMon] + and a + jr z, .done + dec a + ld [wCurPartyMon], a + ld b, a + ld a, [wMonType] + and a + jr nz, .load_mon + ld a, b + inc a + ld [wPartyMenuCursor], a + jr .load_mon + +.a_button + ld a, c + cp BLUE_PAGE ; last page + jr z, .b_button +.d_right + inc c + ld a, BLUE_PAGE ; last page + cp c + jr nc, .set_page + ld c, PINK_PAGE ; first page + jr .set_page + +.d_left + dec c + jr nz, .set_page + ld c, BLUE_PAGE ; last page + jr .set_page + +.done + ret + +.set_page + ld a, [wStatsScreenFlags] + and ~STAT_PAGE_MASK + or c + ld [wStatsScreenFlags], a + ld h, 4 + call StatsScreen_SetJumptableIndex + ret + +.load_mon + ld h, 0 + call StatsScreen_SetJumptableIndex + ret + +.b_button + ld h, 7 + call StatsScreen_SetJumptableIndex + ret + +StatsScreen_InitUpperHalf: + call .PlaceHPBar + xor a + ldh [hBGMapMode], a + ld a, [wBaseSpecies] + ld [wCurSpecies], a + call GetPokemonIndexFromID + ld a, h + ld h, l + ld l, a + push hl + ld hl, sp + 0 + ld d, h + ld e, l + hlcoord 8, 0 + ld a, "№" + ld [hli], a + ld a, "." + ld [hli], a + lb bc, PRINTNUM_LEADINGZEROS | 2, 3 + call PrintNum + add sp, 2 + hlcoord 14, 0 + call PrintLevel + ld hl, .NicknamePointers + call GetNicknamePointer + call CopyNickname + hlcoord 8, 2 + call PlaceString + hlcoord 18, 0 + call .PlaceGenderChar + hlcoord 9, 4 + ld a, "/" + ld [hli], a + ld a, [wBaseSpecies] + ld [wNamedObjectIndex], a + call GetPokemonName + call PlaceString + call StatsScreen_PlaceHorizontalDivider + call StatsScreen_PlacePageSwitchArrows + call StatsScreen_PlaceShinyIcon + ret + +.PlaceHPBar: + ld hl, wTempMonHP + ld a, [hli] + ld b, a + ld c, [hl] + ld hl, wTempMonMaxHP + ld a, [hli] + ld d, a + ld e, [hl] + farcall ComputeHPBarPixels + ld hl, wCurHPPal + call SetHPPal + ld b, SCGB_STATS_SCREEN_HP_PALS + call GetSGBLayout + call DelayFrame + ret + +.PlaceGenderChar: + push hl + farcall GetGender + pop hl + ret c + ld a, "♂" + jr nz, .got_gender + ld a, "♀" +.got_gender + ld [hl], a + ret + +.NicknamePointers: + dw wPartyMonNicknames + dw wOTPartyMonNicknames + dw sBoxMonNicknames + dw wBufferMonNickname + +StatsScreen_PlaceVerticalDivider: ; unreferenced +; The Japanese stats screen has a vertical divider. + hlcoord 7, 0 + ld bc, SCREEN_WIDTH + ld d, SCREEN_HEIGHT +.loop + ld a, $31 ; vertical divider + ld [hl], a + add hl, bc + dec d + jr nz, .loop + ret + +StatsScreen_PlaceHorizontalDivider: + hlcoord 0, 7 + ld b, SCREEN_WIDTH + ld a, $62 ; horizontal divider (empty HP/exp bar) +.loop + ld [hli], a + dec b + jr nz, .loop + ret + +StatsScreen_PlacePageSwitchArrows: + hlcoord 12, 6 + ld [hl], "◀" + hlcoord 19, 6 + ld [hl], "▶" + ret + +StatsScreen_PlaceShinyIcon: + ld bc, wTempMonDVs + farcall CheckShininess + ret nc + hlcoord 19, 0 + ld [hl], "⁂" + ret + +StatsScreen_LoadGFX: + ld a, [wBaseSpecies] + ld [wTempSpecies], a + ld [wCurSpecies], a + xor a + ldh [hBGMapMode], a + call .ClearBox + call .PageTilemap + call .LoadPals + ld hl, wStatsScreenFlags + bit 4, [hl] + jr nz, .place_frontpic + call SetPalettes + ret + +.place_frontpic + call StatsScreen_PlaceFrontpic + ret + +.ClearBox: + ld a, [wStatsScreenFlags] + maskbits NUM_STAT_PAGES + ld c, a + call StatsScreen_LoadPageIndicators + hlcoord 0, 8 + lb bc, 10, 20 + call ClearBox + ret + +.LoadPals: + ld a, [wStatsScreenFlags] + maskbits NUM_STAT_PAGES + ld c, a + farcall LoadStatsScreenPals + call DelayFrame + ld hl, wStatsScreenFlags + set 5, [hl] + ret + +.PageTilemap: + ld a, [wStatsScreenFlags] + maskbits NUM_STAT_PAGES + dec a + ld hl, .Jumptable + rst JumpTable + ret + +.Jumptable: +; entries correspond to *_PAGE constants + table_width 2, StatsScreen_LoadGFX.Jumptable + dw LoadPinkPage + dw LoadGreenPage + dw LoadBluePage + assert_table_length NUM_STAT_PAGES + +LoadPinkPage: + hlcoord 0, 9 + ld b, $0 + predef DrawPlayerHP + hlcoord 8, 9 + ld [hl], $41 ; right HP/exp bar end cap + ld de, .Status_Type + hlcoord 0, 12 + call PlaceString + ld a, [wTempMonPokerusStatus] + ld b, a + and $f + jr nz, .HasPokerus + ld a, b + and $f0 + jr z, .NotImmuneToPkrs + hlcoord 8, 8 + ld [hl], "." ; Pokérus immunity dot +.NotImmuneToPkrs: + ld a, [wMonType] + cp BOXMON + jr z, .StatusOK + hlcoord 6, 13 + push hl + ld de, wTempMonStatus + predef PlaceStatusString + pop hl + jr nz, .done_status + jr .StatusOK +.HasPokerus: + ld de, .PkrsStr + hlcoord 1, 13 + call PlaceString + jr .done_status +.StatusOK: + ld de, .OK_str + call PlaceString +.done_status + hlcoord 1, 15 + predef PrintMonTypes + hlcoord 9, 8 + ld de, SCREEN_WIDTH + ld b, 10 + ld a, $31 ; vertical divider +.vertical_divider + ld [hl], a + add hl, de + dec b + jr nz, .vertical_divider + ld de, .ExpPointStr + hlcoord 10, 9 + call PlaceString + hlcoord 17, 14 + call .PrintNextLevel + hlcoord 13, 10 + lb bc, 3, 7 + ld de, wTempMonExp + call PrintNum + call .CalcExpToNextLevel + hlcoord 13, 13 + lb bc, 3, 7 + ld de, wExpToNextLevel + call PrintNum + ld de, .LevelUpStr + hlcoord 10, 12 + call PlaceString + ld de, .ToStr + hlcoord 14, 14 + call PlaceString + hlcoord 11, 16 + ld a, [wTempMonLevel] + ld b, a + ld de, wTempMonExp + 2 + predef FillInExpBar + hlcoord 10, 16 + ld [hl], $40 ; left exp bar end cap + hlcoord 19, 16 + ld [hl], $41 ; right exp bar end cap + ret + +.PrintNextLevel: + ld a, [wTempMonLevel] + push af + cp MAX_LEVEL + jr z, .AtMaxLevel + inc a + ld [wTempMonLevel], a +.AtMaxLevel: + call PrintLevel + pop af + ld [wTempMonLevel], a + ret + +.CalcExpToNextLevel: + ld a, [wTempMonLevel] + cp MAX_LEVEL + jr z, .AlreadyAtMaxLevel + inc a + ld d, a + farcall CalcExpAtLevel + ld hl, wTempMonExp + 2 + ld hl, wTempMonExp + 2 + ldh a, [hQuotient + 3] + sub [hl] + dec hl + ld [wExpToNextLevel + 2], a + ldh a, [hQuotient + 2] + sbc [hl] + dec hl + ld [wExpToNextLevel + 1], a + ldh a, [hQuotient + 1] + sbc [hl] + ld [wExpToNextLevel], a + ret + +.AlreadyAtMaxLevel: + ld hl, wExpToNextLevel + xor a + ld [hli], a + ld [hli], a + ld [hl], a + ret + +.Status_Type: + db "STATUS/" + next "TYPE/@" + +.OK_str: + db "OK @" + +.ExpPointStr: + db "EXP POINTS@" + +.LevelUpStr: + db "LEVEL UP@" + +.ToStr: + db "TO@" + +.PkrsStr: + db "#RUS@" + +LoadGreenPage: + ld de, .Item + hlcoord 0, 8 + call PlaceString + call .GetItemName + hlcoord 8, 8 + call PlaceString + ld de, .Move + hlcoord 0, 10 + call PlaceString + ld hl, wTempMonMoves + ld de, wListMoves_MoveIndicesBuffer + ld bc, NUM_MOVES + call CopyBytes + hlcoord 8, 10 + ld a, SCREEN_WIDTH * 2 + ld [wListMovesLineSpacing], a + predef ListMoves + hlcoord 12, 11 + ld a, SCREEN_WIDTH * 2 + ld [wListMovesLineSpacing], a + predef ListMovePP + ret + +.GetItemName: + ld de, .ThreeDashes + ld a, [wTempMonItem] + and a + ret z + ld b, a + farcall TimeCapsule_ReplaceTeruSama + ld a, b + ld [wNamedObjectIndex], a + call GetItemName + ret + +.Item: + db "ITEM@" + +.ThreeDashes: + db "---@" + +.Move: + db "MOVE@" + +LoadBluePage: + call .PlaceOTInfo + hlcoord 10, 8 + ld de, SCREEN_WIDTH + ld b, 10 + ld a, $31 ; vertical divider +.vertical_divider + ld [hl], a + add hl, de + dec b + jr nz, .vertical_divider + hlcoord 11, 8 + ld bc, 6 + predef PrintTempMonStats + ret + +.PlaceOTInfo: + ld de, IDNoString + hlcoord 0, 9 + call PlaceString + ld de, OTString + hlcoord 0, 12 + call PlaceString + hlcoord 2, 10 + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + ld de, wTempMonID + call PrintNum + ld hl, .OTNamePointers + call GetNicknamePointer + call CopyNickname + farcall CorrectNickErrors + hlcoord 2, 13 + call PlaceString + ld a, [wTempMonCaughtGender] + and a + jr z, .done + cp $7f + jr z, .done + and CAUGHT_GENDER_MASK + ld a, "♂" + jr z, .got_gender + ld a, "♀" +.got_gender + hlcoord 9, 13 + ld [hl], a +.done + ret + +.OTNamePointers: + dw wPartyMonOTs + dw wOTPartyMonOTs + dw sBoxMonOTs + dw wBufferMonOT + +IDNoString: + db "№.@" + +OTString: + db "OT/@" + +StatsScreen_PlaceFrontpic: + ld hl, wTempMonDVs + predef GetUnownLetter + call StatsScreen_GetAnimationParam + jr c, .egg + and a + jr z, .no_cry + jr .cry + +.egg + call .AnimateEgg + call SetPalettes + ret + +.no_cry + call .AnimateMon + call SetPalettes + ret + +.cry + call SetPalettes + call .AnimateMon + ld a, [wCurPartySpecies] + call PlayMonCry2 + ret + +.AnimateMon: + ld hl, wStatsScreenFlags + set 5, [hl] + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + ld a, l + cp LOW(UNOWN) + ld a, h + hlcoord 0, 0 + jp nz, PrepMonFrontpic + if HIGH(UNOWN) == 0 + and a + elif HIGH(UNOWN) == 1 + dec a + else + cp HIGH(UNOWN) + endc + jp nz, PrepMonFrontpic + xor a + ld [wBoxAlignment], a + jp _PrepMonFrontpic + +.AnimateEgg: + ld a, [wCurPartySpecies] + push hl + call GetPokemonIndexFromID + ld a, l + cp LOW(UNOWN) + ld a, h + pop hl + jr nz, .not_unown_egg + if HIGH(UNOWN) == 0 + and a + elif HIGH(UNOWN) == 1 + dec a + else + cp HIGH(UNOWN) + endc + jr z, .unownegg +.not_unown_egg + ld a, TRUE + ld [wBoxAlignment], a + jr .get_animation +.unownegg + xor a + ld [wBoxAlignment], a + ; fallthrough + +.get_animation + ld a, [wCurPartySpecies] + call IsAPokemon + ret c + call StatsScreen_LoadTextboxSpaceGFX + ld de, vTiles2 tile $00 + predef GetAnimatedFrontpic + hlcoord 0, 0 + ld d, $0 + ld e, ANIM_MON_MENU + predef LoadMonAnimation + ld hl, wStatsScreenFlags + set 6, [hl] + ret + +StatsScreen_GetAnimationParam: + ld a, [wMonType] + ld hl, .Jumptable + rst JumpTable + ret + +.Jumptable: + dw .PartyMon + dw .OTPartyMon + dw .BoxMon + dw .Tempmon + dw .Wildmon + +.PartyMon: + ld a, [wCurPartyMon] + ld hl, wPartyMon1 + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + ld b, h + ld c, l + jr .CheckEggFaintedFrzSlp + +.OTPartyMon: + xor a + ret + +.BoxMon: + ld hl, sBoxMons + ld bc, PARTYMON_STRUCT_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld b, h + ld c, l + ld a, BANK(sBoxMons) + call OpenSRAM + call .CheckEggFaintedFrzSlp + push af + call CloseSRAM + pop af + ret + +.Tempmon: + ld bc, wTempMonSpecies + jr .CheckEggFaintedFrzSlp ; utterly pointless + +.CheckEggFaintedFrzSlp: + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + call CheckFaintedFrzSlp + jr c, .FaintedFrzSlp +.egg + xor a + scf + ret + +.Wildmon: + ld a, $1 + and a + ret + +.FaintedFrzSlp: + xor a + ret + +StatsScreen_LoadTextboxSpaceGFX: + nop + push hl + push de + push bc + push af + call DelayFrame + ldh a, [rVBK] + push af + ld a, $1 + ldh [rVBK], a + ld de, TextboxSpaceGFX + lb bc, BANK(TextboxSpaceGFX), 1 + ld hl, vTiles2 tile " " + call Get2bpp + pop af + ldh [rVBK], a + pop af + pop bc + pop de + pop hl + ret + +StatsScreenSpaceGFX: ; unreferenced +INCBIN "gfx/font/space.2bpp" + +EggStatsScreen: + xor a + ldh [hBGMapMode], a + ld hl, wCurHPPal + call SetHPPal + ld b, SCGB_STATS_SCREEN_HP_PALS + call GetSGBLayout + call StatsScreen_PlaceHorizontalDivider + ld de, EggString + hlcoord 8, 1 + call PlaceString + ld de, IDNoString + hlcoord 8, 3 + call PlaceString + ld de, OTString + hlcoord 8, 5 + call PlaceString + ld de, FiveQMarkString + hlcoord 11, 3 + call PlaceString + ld de, FiveQMarkString + hlcoord 11, 5 + call PlaceString +if DEF(_DEBUG) + ld de, .PushStartString + hlcoord 8, 17 + call PlaceString + jr .placed_push_start + +.PushStartString: + db "▶PUSH START.@" + +.placed_push_start +endc + ld a, [wTempMonHappiness] ; egg status + ld de, EggSoonString + cp $6 + jr c, .picked + ld de, EggCloseString + cp $b + jr c, .picked + ld de, EggMoreTimeString + cp $29 + jr c, .picked + ld de, EggALotMoreTimeString +.picked + hlcoord 1, 9 + call PlaceString + ld hl, wStatsScreenFlags + set 5, [hl] + call SetPalettes ; pals + call DelayFrame + hlcoord 0, 0 + call PrepMonFrontpic + farcall HDMATransferTilemapToWRAMBank3 + call StatsScreen_AnimateEgg + + ld a, [wTempMonHappiness] + cp 6 + ret nc + ld de, SFX_2_BOOPS + call PlaySFX + ret + +EggString: + db "EGG@" + +FiveQMarkString: + db "?????@" + +EggSoonString: + db "It's making sounds" + next "inside. It's going" + next "to hatch soon!@" + +EggCloseString: + db "It moves around" + next "inside sometimes." + next "It must be close" + next "to hatching.@" + +EggMoreTimeString: + db "Wonder what's" + next "inside? It needs" + next "more time, though.@" + +EggALotMoreTimeString: + db "This EGG needs a" + next "lot more time to" + next "hatch.@" + +StatsScreen_AnimateEgg: + call StatsScreen_GetAnimationParam + ret nc + ld a, [wTempMonHappiness] + ld e, $7 + cp 6 + jr c, .animate + ld e, $8 + cp 11 + jr c, .animate + ret + +.animate + push de + ld a, $1 + ld [wBoxAlignment], a + call StatsScreen_LoadTextboxSpaceGFX + ld de, vTiles2 tile $00 + predef GetAnimatedFrontpic + pop de + hlcoord 0, 0 + ld d, $0 + predef LoadMonAnimation + ld hl, wStatsScreenFlags + set 6, [hl] + ret + +StatsScreen_LoadPageIndicators: + hlcoord 13, 5 + ld a, $36 ; first of 4 small square tiles + call .load_square + hlcoord 15, 5 + ld a, $36 ; " " " " + call .load_square + hlcoord 17, 5 + ld a, $36 ; " " " " + call .load_square + ld a, c + cp GREEN_PAGE + ld a, $3a ; first of 4 large square tiles + hlcoord 13, 5 ; PINK_PAGE (< GREEN_PAGE) + jr c, .load_square + hlcoord 15, 5 ; GREEN_PAGE (= GREEN_PAGE) + jr z, .load_square + hlcoord 17, 5 ; BLUE_PAGE (> GREEN_PAGE) +.load_square + push bc + ld [hli], a + inc a + ld [hld], a + ld bc, SCREEN_WIDTH + add hl, bc + inc a + ld [hli], a + inc a + ld [hl], a + pop bc + ret + +CopyNickname: + ld de, wStringBuffer1 + ld bc, MON_NAME_LENGTH + jr .okay ; utterly pointless +.okay + ld a, [wMonType] + cp BOXMON + jr nz, .partymon + ld a, BANK(sBoxMonNicknames) + call OpenSRAM + push de + call CopyBytes + pop de + call CloseSRAM + ret + +.partymon + push de + call CopyBytes + pop de + ret + +GetNicknamePointer: + ld a, [wMonType] + add a + ld c, a + ld b, 0 + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wMonType] + cp TEMPMON + ret z + ld a, [wCurPartyMon] + jp SkipNames + +CheckFaintedFrzSlp: + ld hl, MON_HP + add hl, bc + ld a, [hli] + or [hl] + jr z, .fainted_frz_slp + ld hl, MON_STATUS + add hl, bc + ld a, [hl] + and 1 << FRZ | SLP_MASK + jr nz, .fainted_frz_slp + and a + ret + +.fainted_frz_slp + scf + ret diff --git a/engine/pokemon/switchpartymons.asm b/engine/pokemon/switchpartymons.asm new file mode 100644 index 0000000..117bc30 --- /dev/null +++ b/engine/pokemon/switchpartymons.asm @@ -0,0 +1,145 @@ +_SwitchPartyMons: + ld a, [wSwitchMon] + dec a + ld [wSwitchMonFrom], a + ld b, a + ld a, [wMenuCursorY] + dec a + ld [wSwitchMonTo], a + cp b + jr z, .skip + call .SwapMonAndMail + ld a, [wSwitchMonFrom] + call .ClearSprite + ld a, [wSwitchMonTo] + call .ClearSprite +.skip + ret + +.ClearSprite: + push af + hlcoord 0, 1 + ld bc, 2 * SCREEN_WIDTH + call AddNTimes + ld bc, 2 * SCREEN_WIDTH + ld a, " " + call ByteFill + pop af + ld hl, wShadowOAMSprite00 + ld bc, 4 * SPRITEOAMSTRUCT_LENGTH + call AddNTimes + ld de, SPRITEOAMSTRUCT_LENGTH + ld c, 4 +.gfx_loop + ld [hl], SCREEN_WIDTH_PX ; y (off-screen) + add hl, de + dec c + jr nz, .gfx_loop + ld de, SFX_SWITCH_POKEMON + call WaitPlaySFX + ret + +.SwapMonAndMail: + push hl + push de + push bc + ld bc, wPartySpecies + ld a, [wSwitchMonTo] + ld l, a + ld h, 0 + add hl, bc + ld d, h + ld e, l + ld a, [wSwitchMonFrom] + ld l, a + ld h, 0 + add hl, bc + ld a, [hl] + push af + ld a, [de] + ld [hl], a + pop af + ld [de], a + ld a, [wSwitchMonTo] + ld hl, wPartyMon1Species + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + push hl + ld de, wSwitchMonBuffer + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + ld a, [wSwitchMonFrom] + ld hl, wPartyMon1 + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + pop de + push hl + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + pop de + ld hl, wSwitchMonBuffer + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + ld a, [wSwitchMonTo] + ld hl, wPartyMonOTs + call SkipNames + push hl + call .CopyNameToSwitchMonBuffer + ld a, [wSwitchMonFrom] + ld hl, wPartyMonOTs + call SkipNames + pop de + push hl + call .CopyName + pop de + ld hl, wSwitchMonBuffer + call .CopyName + ld hl, wPartyMonNicknames + ld a, [wSwitchMonTo] + call SkipNames + push hl + call .CopyNameToSwitchMonBuffer + ld hl, wPartyMonNicknames + ld a, [wSwitchMonFrom] + call SkipNames + pop de + push hl + call .CopyName + pop de + ld hl, wSwitchMonBuffer + call .CopyName + ld hl, sPartyMail + ld a, [wSwitchMonTo] + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + push hl + ld de, wSwitchMonBuffer + ld bc, MAIL_STRUCT_LENGTH + ld a, BANK(sPartyMail) + call OpenSRAM + call CopyBytes + ld hl, sPartyMail + ld a, [wSwitchMonFrom] + ld bc, MAIL_STRUCT_LENGTH + call AddNTimes + pop de + push hl + ld bc, MAIL_STRUCT_LENGTH + call CopyBytes + pop de + ld hl, wSwitchMonBuffer + ld bc, MAIL_STRUCT_LENGTH + call CopyBytes + call CloseSRAM + pop bc + pop de + pop hl + ret + +.CopyNameToSwitchMonBuffer: + ld de, wSwitchMonBuffer + +.CopyName: + ld bc, NAME_LENGTH + call CopyBytes + ret diff --git a/engine/pokemon/tempmon.asm b/engine/pokemon/tempmon.asm new file mode 100644 index 0000000..97ce1ee --- /dev/null +++ b/engine/pokemon/tempmon.asm @@ -0,0 +1,127 @@ +CopyMonToTempMon: +; gets the BaseData of a mon +; and copies the party_struct to wTempMon + + ld a, [wCurPartyMon] + ld e, a + call GetMonSpecies + ld a, [wCurPartySpecies] + ld [wCurSpecies], a + call GetBaseData + + ld a, [wMonType] + ld hl, wPartyMon1Species + ld bc, PARTYMON_STRUCT_LENGTH + and a + jr z, .copywholestruct + ld hl, wOTPartyMon1Species + ld bc, PARTYMON_STRUCT_LENGTH + cp OTPARTYMON + jr z, .copywholestruct + ld bc, BOXMON_STRUCT_LENGTH + callfar CopyBoxmonToTempMon + jr .done + +.copywholestruct + ld a, [wCurPartyMon] + call AddNTimes + ld de, wTempMon + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + +.done + ret + +CalcBufferMonStats: + ld bc, wBufferMon + jr _TempMonStatsCalculation + +CalcTempmonStats: + ld bc, wTempMon +_TempMonStatsCalculation: + ld hl, MON_LEVEL + add hl, bc + ld a, [hl] + ld [wCurPartyLevel], a + ld hl, MON_MAXHP + add hl, bc + ld d, h + ld e, l + ld hl, MON_STAT_EXP - 1 + add hl, bc + push bc + ld b, TRUE + predef CalcMonStats + pop bc + ld hl, MON_HP + add hl, bc + ld d, h + ld e, l + ld a, [wCurPartySpecies] + cp EGG + jr nz, .not_egg + xor a + ld [de], a + inc de + ld [de], a + jr .zero_status + +.not_egg + push bc + ld hl, MON_MAXHP + add hl, bc + ld bc, 2 + call CopyBytes + pop bc + +.zero_status + ld hl, MON_STATUS + add hl, bc + xor a + ld [hli], a + ld [hl], a + ret + +GetMonSpecies: +; [wMonType] has the type of the mon +; e = Nr. of mon (i.e. [wCurPartyMon]) + + ld a, [wMonType] + and a ; PARTYMON + jr z, .partymon + cp OTPARTYMON + jr z, .otpartymon + cp BOXMON + jr z, .boxmon + cp TEMPMON + jr z, .breedmon + ; WILDMON + +.partymon + ld hl, wPartySpecies + jr .done + +.otpartymon + ld hl, wOTPartySpecies + jr .done + +.boxmon + ld a, BANK(sBoxSpecies) + call OpenSRAM + ld hl, sBoxSpecies + call .done + call CloseSRAM + ret + +.breedmon + ld a, [wBreedMon1Species] + jr .done2 + +.done + ld d, 0 + add hl, de + ld a, [hl] + +.done2 + ld [wCurPartySpecies], a + ret diff --git a/engine/pokemon/types.asm b/engine/pokemon/types.asm new file mode 100644 index 0000000..29044bc --- /dev/null +++ b/engine/pokemon/types.asm @@ -0,0 +1,87 @@ +PrintMonTypes: +; Print one or both types of [wCurSpecies] +; on the stats screen at hl. + + push hl + call GetBaseData + pop hl + + push hl + ld a, [wBaseType1] + call .Print + + ; Single-typed monsters really + ; have two of the same type. + ld a, [wBaseType1] + ld b, a + ld a, [wBaseType2] + cp b + pop hl + jr z, .hide_type_2 + + ld bc, SCREEN_WIDTH + add hl, bc + +.Print: + ld b, a + jr PrintType + +.hide_type_2 + ; Erase any type name that was here before. + ; Seems to be pointless in localized versions. + ld a, " " + ld bc, SCREEN_WIDTH - 3 + add hl, bc + ld [hl], a + inc bc + add hl, bc + ld bc, NAME_LENGTH_JAPANESE - 1 + jp ByteFill + +PrintMoveType: +; Print the type of move b at hl. + + push hl + ld a, b + ld de, wStringBuffer1 + call GetMoveData + ld a, [wStringBuffer1 + MOVE_TYPE] + pop hl + + ld b, a + +PrintType: +; Print type b at hl. + + ld a, b + + push hl + add a + ld hl, TypeNames + ld e, a + ld d, 0 + add hl, de + ld a, [hli] + ld e, a + ld d, [hl] + pop hl + + jp PlaceString + +GetTypeName: +; Copy the name of type [wNamedObjectIndex] to wStringBuffer1. + + ld a, [wNamedObjectIndex] + ld hl, TypeNames + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wStringBuffer1 + ld bc, MOVE_NAME_LENGTH + jp CopyBytes + +INCLUDE "data/types/names.asm" diff --git a/engine/predef.asm b/engine/predef.asm new file mode 100644 index 0000000..26c61d9 --- /dev/null +++ b/engine/predef.asm @@ -0,0 +1,28 @@ +GetPredefPointer:: +; Return the bank and address of wPredefID in a and wPredefAddress. + +; Save hl for later (back in Predef) + ld a, h + ld [wPredefHL], a + ld a, l + ld [wPredefHL + 1], a + + push de + ld a, [wPredefID] + ld e, a + ld d, 0 + ld hl, PredefPointers + add hl, de + add hl, de + add hl, de + pop de + + ld a, [hli] + ld [wPredefAddress + 1], a + ld a, [hli] + ld [wPredefAddress], a + ld a, [hl] + + ret + +INCLUDE "data/predef_pointers.asm" diff --git a/engine/printer/print_party.asm b/engine/printer/print_party.asm new file mode 100644 index 0000000..dfb0afc --- /dev/null +++ b/engine/printer/print_party.asm @@ -0,0 +1,367 @@ +DEF PRINTPARTY_HP EQU "◀" ; $71 + +PrintPage1: + hlcoord 0, 0 + decoord 0, 0, wPrinterTilemapBuffer + ld bc, 17 * SCREEN_WIDTH + call CopyBytes + hlcoord 17, 1, wPrinterTilemapBuffer + ld a, $62 + ld [hli], a + inc a ; $63 + ld [hl], a + hlcoord 17, 2, wPrinterTilemapBuffer + ld a, $64 + ld [hli], a + inc a ; $65 + ld [hl], a + hlcoord 1, 9, wPrinterTilemapBuffer + ld a, " " + ld [hli], a + ld [hl], a + hlcoord 1, 10, wPrinterTilemapBuffer + ld a, $61 + ld [hli], a + ld [hl], a + hlcoord 2, 11, wPrinterTilemapBuffer + lb bc, 5, 18 + call ClearBox + ld a, [wTempSpecies] + call CheckCaughtMon + push af + ld a, [wTempSpecies] + ld b, a + ld c, 1 ; get page 1 + farcall GetDexEntryPagePointer + pop af + ld a, b + hlcoord 1, 11, wPrinterTilemapBuffer + call nz, PlaceFarString + hlcoord 19, 0, wPrinterTilemapBuffer + ld [hl], $35 + ld de, SCREEN_WIDTH + add hl, de + ld b, $f +.column_loop + ld [hl], $37 + add hl, de + dec b + jr nz, .column_loop + ld [hl], $3a + ret + +PrintPage2: + hlcoord 0, 0, wPrinterTilemapBuffer + ld bc, 8 * SCREEN_WIDTH + ld a, " " + call ByteFill + hlcoord 0, 0, wPrinterTilemapBuffer + ld a, $36 + ld b, 6 + call .FillColumn + hlcoord 19, 0, wPrinterTilemapBuffer + ld a, $37 + ld b, 6 + call .FillColumn + hlcoord 0, 6, wPrinterTilemapBuffer + ld [hl], $38 + inc hl + ld a, $39 + ld bc, SCREEN_HEIGHT + call ByteFill + ld [hl], $3a + hlcoord 0, 7, wPrinterTilemapBuffer + ld bc, SCREEN_WIDTH + ld a, $32 + call ByteFill + ld a, [wTempSpecies] + call CheckCaughtMon + push af + ld a, [wTempSpecies] + ld b, a + ld c, 2 ; get page 2 + farcall GetDexEntryPagePointer + pop af + hlcoord 1, 1, wPrinterTilemapBuffer + ld a, b + call nz, PlaceFarString + ret + +.FillColumn: + push de + ld de, SCREEN_WIDTH +.column_loop + ld [hl], a + add hl, de + dec b + jr nz, .column_loop + pop de + ret + +GBPrinterStrings: ; used only for BANK(GBPrinterStrings) +GBPrinterString_Null: db "@" +GBPrinterString_CheckingLink: next " CHECKING LINK...@" +GBPrinterString_Transmitting: next " TRANSMITTING...@" +GBPrinterString_Printing: next " PRINTING...@" +GBPrinterString_PrinterError1: + db " Printer Error 1" + next "" + next "Check the Game Boy" + next "Printer Manual." + db "@" +GBPrinterString_PrinterError2: + db " Printer Error 2" + next "" + next "Check the Game Boy" + next "Printer Manual." + db "@" +GBPrinterString_PrinterError3: + db " Printer Error 3" + next "" + next "Check the Game Boy" + next "Printer Manual." + db "@" +GBPrinterString_PrinterError4: + db " Printer Error 4" + next "" + next "Check the Game Boy" + next "Printer Manual." + db "@" + +PrintPartyMonPage1: + call ClearBGPalettes + call ClearTilemap + call ClearSprites + xor a + ldh [hBGMapMode], a + call LoadFontsBattleExtra + + ld de, GBPrinterHPIcon + ld hl, vTiles2 tile PRINTPARTY_HP + lb bc, BANK(GBPrinterHPIcon), 1 + call Request1bpp + + ld de, GBPrinterLvIcon + ld hl, vTiles2 tile "" + lb bc, BANK(GBPrinterLvIcon), 1 + call Request1bpp + + ld de, StatsScreenPageTilesGFX + 14 tiles ; shiny icon + ld hl, vTiles2 tile "⁂" + lb bc, BANK(StatsScreenPageTilesGFX), 1 + call Get2bpp + + xor a + ld [wMonType], a + farcall CopyMonToTempMon + hlcoord 0, 7 + ld b, 9 + ld c, 18 + call Textbox + hlcoord 8, 2 + ld a, [wTempMonLevel] + call PrintLevel_Force3Digits + hlcoord 12, 2 + ld [hl], PRINTPARTY_HP + inc hl + ld de, wTempMonMaxHP + lb bc, 2, 3 + call PrintNum + ld a, [wCurPartySpecies] + ld [wNamedObjectIndex], a + ld [wCurSpecies], a + ld hl, wPartyMonNicknames + call GetCurPartyMonName + hlcoord 8, 4 + call PlaceString + hlcoord 9, 6 + ld [hl], "/" + call GetPokemonName + hlcoord 10, 6 + call PlaceString + hlcoord 8, 0 + ld [hl], "№" + inc hl + ld [hl], "." + inc hl + ld de, wNamedObjectIndex + lb bc, PRINTNUM_LEADINGZEROS | 1, 3 + call PrintNum + hlcoord 1, 9 + ld de, PrintParty_OTString + call PlaceString + ld hl, wPartyMonOTs + call GetCurPartyMonName + hlcoord 4, 9 + call PlaceString + hlcoord 1, 11 + ld de, PrintParty_IDNoString + call PlaceString + hlcoord 4, 11 + ld de, wTempMonID + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + hlcoord 1, 14 + ld de, PrintParty_MoveString + call PlaceString + hlcoord 7, 14 + ld a, [wTempMonMoves + 0] + call PlaceMoveNameString + call PlaceGenderAndShininess + ld hl, wTempMonDVs + predef GetUnownLetter + ld hl, wBoxAlignment + xor a + ld [hl], a + ld a, [wCurPartySpecies] + push hl + call GetPokemonIndexFromID + ld a, l + sub LOW(UNOWN) + if HIGH(UNOWN) == 0 + or h + pop hl + else + ld a, h + pop hl + jr nz, .not_unown + if HIGH(UNOWN) == 1 + dec a + else + cp HIGH(UNOWN) + endc + endc + jr z, .got_alignment +.not_unown + inc [hl] +.got_alignment + hlcoord 0, 0 + call _PrepMonFrontpic + call WaitBGMap + ld b, SCGB_STATS_SCREEN_HP_PALS + call GetSGBLayout + call SetPalettes + ret + +PrintPartyMonPage2: + call ClearBGPalettes + call ClearTilemap + call ClearSprites + xor a + ldh [hBGMapMode], a + call LoadFontsBattleExtra + xor a + ld [wMonType], a + farcall CopyMonToTempMon + hlcoord 0, 0 + ld b, 15 + ld c, 18 + call Textbox + ld bc, SCREEN_WIDTH + decoord 0, 0 + hlcoord 0, 1 + call CopyBytes + hlcoord 7, 0 + ld a, [wTempMonMoves + 1] + call PlaceMoveNameString + hlcoord 7, 2 + ld a, [wTempMonMoves + 2] + call PlaceMoveNameString + hlcoord 7, 4 + ld a, [wTempMonMoves + 3] + call PlaceMoveNameString + hlcoord 7, 7 + ld de, PrintParty_StatsString + call PlaceString + hlcoord 16, 7 + ld de, wTempMonAttack + call .PrintTempMonStats + hlcoord 16, 9 + ld de, wTempMonDefense + call .PrintTempMonStats + hlcoord 16, 11 + ld de, wTempMonSpclAtk + call .PrintTempMonStats + hlcoord 16, 13 + ld de, wTempMonSpclDef + call .PrintTempMonStats + hlcoord 16, 15 + ld de, wTempMonSpeed + call .PrintTempMonStats + call WaitBGMap + ld b, SCGB_STATS_SCREEN_HP_PALS + call GetSGBLayout + call SetPalettes + ret + +.PrintTempMonStats: + lb bc, 2, 3 + call PrintNum + ret + +GetCurPartyMonName: + ld bc, NAME_LENGTH + ld a, [wCurPartyMon] + call AddNTimes + ld e, l + ld d, h + ret + +PlaceMoveNameString: + and a + jr z, .no_move + + ld [wNamedObjectIndex], a + call GetMoveName + jr .got_string + +.no_move + ld de, PrintParty_NoMoveString + +.got_string + call PlaceString + ret + +PlaceGenderAndShininess: + farcall GetGender + ld a, " " + jr c, .got_gender + ld a, "♂" + jr nz, .got_gender + ld a, "♀" + +.got_gender + hlcoord 17, 2 + ld [hl], a + ld bc, wTempMonDVs + farcall CheckShininess + ret nc + hlcoord 18, 2 + ld [hl], "⁂" + ret + +PrintParty_OTString: + db "OT/@" + +PrintParty_MoveString: + db "MOVE@" + +PrintParty_IDNoString: + db "№.@" + +PrintParty_StatsString: + db "ATTACK" + next "DEFENSE" + next "SPCL.ATK" + next "SPCL.DEF" + next "SPEED" + db "@" + +PrintParty_NoMoveString: + db "------------@" + +GBPrinterHPIcon: +INCBIN "gfx/printer/hp.1bpp" + +GBPrinterLvIcon: +INCBIN "gfx/printer/lv.1bpp" diff --git a/engine/printer/printer.asm b/engine/printer/printer.asm new file mode 100644 index 0000000..26e2b6f --- /dev/null +++ b/engine/printer/printer.asm @@ -0,0 +1,968 @@ +SendScreenToPrinter: +.loop + call JoyTextDelay + call CheckCancelPrint + jr c, .cancel + ld a, [wJumptableIndex] + bit 7, a + jr nz, .finished + call PrinterJumptableIteration + call CheckPrinterStatus + call PlacePrinterStatusString + call DelayFrame + jr .loop + +.finished + and a + ret + +.cancel + scf + ret + +Printer_CleanUpAfterSend: + xor a + ld [wPrinterConnectionOpen], a + ld [wPrinterOpcode], a + ret + +Printer_PrepareTilemapForPrint: + push af + call Printer_StartTransmission + pop af + ld [wPrinterMargins], a + call Printer_CopyTilemapToBuffer + ret + +Printer_ExitPrinter: + call ReturnToMapFromSubmenu + call Printer_RestartMapMusic + ret + +PrintDexEntry: + ld a, [wPrinterQueueLength] + push af + + ld hl, vTiles1 + ld de, FontInversed + lb bc, BANK(FontInversed), $80 + call Request1bpp + + xor a + ldh [hPrinter], a + call Printer_PlayMusic + + ldh a, [rIE] + push af + xor a + ldh [rIF], a + ld a, (1 << SERIAL) | (1 << VBLANK) + ldh [rIE], a + + call Printer_StartTransmission + ln a, 1, 0 + ld [wPrinterMargins], a + farcall PrintPage1 + call ClearTilemap + ld a, %11100100 + call DmgToCgbBGPals + call DelayFrame + + ld hl, hVBlank + ld a, [hl] + push af + ld [hl], 4 ; vblank mode that calls AskSerial + + ld a, 8 ; 16 rows + ld [wPrinterQueueLength], a + call Printer_ResetJoypadRegisters + call SendScreenToPrinter + jr c, .skip_second_page ; canceled or got an error + + call Printer_CleanUpAfterSend + ld c, 12 + call DelayFrames + xor a + ldh [hBGMapMode], a + + call Printer_StartTransmission + ln a, 0, 3 + ld [wPrinterMargins], a + farcall PrintPage2 + call Printer_ResetJoypadRegisters + ld a, 4 + ld [wPrinterQueueLength], a + call SendScreenToPrinter + +.skip_second_page + pop af + ldh [hVBlank], a + call Printer_CleanUpAfterSend + + xor a + ldh [rIF], a + pop af + ldh [rIE], a + + call Printer_ExitPrinter + ld c, 8 +.low_volume_delay_frames + call LowVolume + call DelayFrame + dec c + jr nz, .low_volume_delay_frames + + pop af + ld [wPrinterQueueLength], a + ret + +PrintPCBox: + ld a, [wPrinterQueueLength] + push af + ld a, 18 / 2 + ld [wPrinterQueueLength], a + + ld a, e + ld [wAddrOfBoxToPrint], a + ld a, d + ld [wAddrOfBoxToPrint + 1], a + ld a, b + ld [wBankOfBoxToPrint], a + ld a, c + ld [wWhichBoxToPrint], a + + xor a + ldh [hPrinter], a + ld [wFinishedPrintingBox], a + call Printer_PlayMusic + + ldh a, [rIE] + push af + xor a + ldh [rIF], a + ld a, (1 << SERIAL) | (1 << VBLANK) + ldh [rIE], a + + ld hl, hVBlank + ld a, [hl] + push af + ld [hl], 4 ; vblank mode that calls AskSerial + + xor a + ldh [hBGMapMode], a + call PrintPCBox_Page1 + ln a, 1, 0 ; to be loaded to wPrinterMargins + call Printer_PrepareTilemapForPrint + call Printer_ResetRegistersAndStartDataSend + jr c, .cancel + + call Printer_CleanUpAfterSend + ld c, 12 + call DelayFrames + xor a + ldh [hBGMapMode], a + call PrintPCBox_Page2 + ln a, 0, 0 ; to be loaded to wPrinterMargins + call Printer_PrepareTilemapForPrint + call Printer_ResetRegistersAndStartDataSend + jr c, .cancel + + call Printer_CleanUpAfterSend + ld c, 12 + call DelayFrames + + xor a + ldh [hBGMapMode], a + call PrintPCBox_Page3 + ln a, 0, 0 ; to be loaded to wPrinterMargins + call Printer_PrepareTilemapForPrint + call Printer_ResetRegistersAndStartDataSend + jr c, .cancel + + call Printer_CleanUpAfterSend + ld c, 12 + call DelayFrames + + xor a + ldh [hBGMapMode], a + call PrintPCBox_Page4 + ln a, 0, 3 ; to be loaded to wPrinterMargins + call Printer_PrepareTilemapForPrint + call Printer_ResetRegistersAndStartDataSend +.cancel + pop af + ldh [hVBlank], a + call Printer_CleanUpAfterSend + + xor a + ldh [rIF], a + pop af + ldh [rIE], a + call Printer_ExitPrinter + + pop af + ld [wPrinterQueueLength], a + ret + +Printer_ResetRegistersAndStartDataSend: + call Printer_ResetJoypadRegisters + call SendScreenToPrinter + ret + +PrintUnownStamp: + ld a, [wPrinterQueueLength] + push af + + xor a + ldh [hPrinter], a + call Printer_PlayMusic + + ldh a, [rIE] + push af + xor a + ldh [rIF], a + ld a, (1 << SERIAL) | (1 << VBLANK) + ldh [rIE], a + + ld hl, hVBlank + ld a, [hl] + push af + ld [hl], 4 ; vblank mode that calls AskSerial + + xor a + ldh [hBGMapMode], a + call LoadTilemapToTempTilemap + farcall PlaceUnownPrinterFrontpic + ln a, 0, 0 ; to be loaded to wPrinterMargins + call Printer_PrepareTilemapForPrint + call SafeLoadTempTilemapToTilemap + call Printer_ResetJoypadRegisters + + ld a, 18 / 2 + ld [wPrinterQueueLength], a +.loop + call JoyTextDelay + call CheckCancelPrint + jr c, .done + ld a, [wJumptableIndex] + bit 7, a + jr nz, .done + call PrinterJumptableIteration + ld a, [wJumptableIndex] + cp $2 + jr nc, .check_status + ld a, 6 / 2 + ld [wPrinterRowIndex], a + +.check_status + call CheckPrinterStatus + call PlacePrinterStatusString + call DelayFrame + jr .loop + +.done + pop af + ldh [hVBlank], a + call Printer_CleanUpAfterSend + call SafeLoadTempTilemapToTilemap + + xor a + ldh [rIF], a + pop af + ldh [rIE], a + + pop af + ld [wPrinterQueueLength], a + ret + +PrintMailAndExit: + call PrintMail + call Printer_ExitPrinter + ret + +PrintMail: + ld a, [wPrinterQueueLength] + push af + xor a + ldh [hPrinter], a + call Printer_PlayMusic + + ldh a, [rIE] + push af + xor a + ldh [rIF], a + ld a, (1 << SERIAL) | (1 << VBLANK) + ldh [rIE], a + + xor a + ldh [hBGMapMode], a + + ln a, 1, 3 ; to be loaded to wPrinterMargins + call Printer_PrepareTilemapForPrint + ld hl, hVBlank + ld a, [hl] + push af + ld [hl], 4 ; vblank mode that calls AskSerial + + ld a, 18 / 2 + ld [wPrinterQueueLength], a + call SendScreenToPrinter + + pop af + ldh [hVBlank], a + call Printer_CleanUpAfterSend + call Printer_CopyBufferToTilemap + + xor a + ldh [rIF], a + pop af + ldh [rIE], a + + pop af + ld [wPrinterQueueLength], a + ret + +PrintPartymon: + ld a, [wPrinterQueueLength] + push af + xor a + ldh [hPrinter], a + call Printer_PlayMusic + + ldh a, [rIE] + push af + xor a + ldh [rIF], a + ld a, (1 << SERIAL) | (1 << VBLANK) + ldh [rIE], a + + xor a + ldh [hBGMapMode], a + farcall PrintPartyMonPage1 + ln a, 1, 0 ; to be loaded to wPrinterMargins + call Printer_PrepareTilemapForPrint + + ld hl, hVBlank + ld a, [hl] + push af + ld [hl], 4 ; vblank mode that calls AskSerial + + ld a, 16 / 2 + ld [wPrinterQueueLength], a + call Printer_ResetJoypadRegisters + call SendScreenToPrinter + jr c, .cancel + + call Printer_CleanUpAfterSend + ld c, 12 + call DelayFrames + + xor a + ldh [hBGMapMode], a + farcall PrintPartyMonPage2 + ln a, 0, 3 ; to be loaded to wPrinterMargins + call Printer_PrepareTilemapForPrint + + ld a, 18 / 2 + ld [wPrinterQueueLength], a + call Printer_ResetJoypadRegisters + call SendScreenToPrinter +.cancel + pop af + ldh [hVBlank], a + call Printer_CleanUpAfterSend + + call Printer_CopyBufferToTilemap + xor a + ldh [rIF], a + pop af + ldh [rIE], a + call Printer_ExitPrinter + + pop af + ld [wPrinterQueueLength], a + ret + +_PrintDiploma: + ld a, [wPrinterQueueLength] + push af + + farcall PlaceDiplomaOnScreen + + xor a + ldh [hPrinter], a + call Printer_PlayMusic + + ldh a, [rIE] + push af + xor a + ldh [rIF], a + ld a, (1 << SERIAL) | (1 << VBLANK) + ldh [rIE], a + + ld hl, hVBlank + ld a, [hl] + push af + ld [hl], 4 ; vblank mode that calls AskSerial + + ln a, 1, 0 ; to be loaded to wPrinterMargins + call Printer_PrepareTilemapForPrint + call Printer_ResetJoypadRegisters + + ld a, 18 / 2 + ld [wPrinterQueueLength], a + call SendScreenToPrinter + jr c, .cancel + call Printer_CleanUpAfterSend + ld c, 12 + call DelayFrames + + call LoadTilemapToTempTilemap + xor a + ldh [hBGMapMode], a + + farcall PrintDiplomaPage2 + + ln a, 0, 3 ; to be loaded to wPrinterMargins + call Printer_PrepareTilemapForPrint + call SafeLoadTempTilemapToTilemap + call Printer_ResetJoypadRegisters + + ld a, 18 / 2 + ld [wPrinterQueueLength], a + call SendScreenToPrinter +.cancel + pop af + ldh [hVBlank], a + call Printer_CleanUpAfterSend + + xor a + ldh [rIF], a + pop af + ldh [rIE], a + call Printer_ExitPrinter + + pop af + ld [wPrinterQueueLength], a + ret + +CheckCancelPrint: + ldh a, [hJoyDown] + and B_BUTTON + jr nz, .pressed_b + and a + ret + +.pressed_b + ld a, [wUnusedGameboyPrinterSafeCancelFlag] + cp $0c + jr nz, .cancel + +; wait for printer activity to finish before canceling? +.loop + ld a, [wPrinterOpcode] + and a + jr nz, .loop + ld a, $16 ; cancel + ld [wPrinterOpcode], a + ld a, $88 + ldh [rSB], a + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a +.loop2 + ld a, [wPrinterOpcode] + and a + jr nz, .loop2 + +.cancel + ld a, $1 + ldh [hPrinter], a + scf + ret + +Printer_CopyTilemapToBuffer: + hlcoord 0, 0 + ld de, wPrinterTilemapBuffer + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call CopyBytes + ret + +Printer_CopyBufferToTilemap: + ld hl, wPrinterTilemapBuffer + decoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call CopyBytes + ret + +Printer_ResetJoypadRegisters: + xor a + ldh [hJoyReleased], a + ldh [hJoyPressed], a + ldh [hJoyDown], a + ldh [hJoyLast], a + ret + +Printer_PlayMusic: + ld de, MUSIC_PRINTER + call PlayMusic2 + ret + +Printer_RestartMapMusic: + call RestartMapMusic + ret + +CheckPrinterStatus: +; Check for printer errors +; If [wPrinterHandshake] == -1, we're disconnected + ld a, [wPrinterHandshake] + cp -1 + jr nz, .printer_connected + ld a, [wPrinterStatusFlags] + cp -1 + jr z, .error_2 +.printer_connected + ld a, [wPrinterStatusFlags] + and %11100000 + ret z ; no error + + bit 7, a + jr nz, .error_1 + bit 6, a + jr nz, .error_4 + ; paper error + ld a, PRINTER_ERROR_3 + jr .load_text_index + +.error_4 + ; temperature error + ld a, PRINTER_ERROR_4 + jr .load_text_index + +.error_1 + ; printer battery low + ld a, PRINTER_ERROR_1 + jr .load_text_index + +.error_2 + ; connection error + ld a, PRINTER_ERROR_2 +.load_text_index + ld [wPrinterStatus], a + ret + +PlacePrinterStatusString: +; Print nonzero printer status + ld a, [wPrinterStatus] + and a + ret z + push af + xor a + ldh [hBGMapMode], a + hlcoord 0, 5 + lb bc, 10, 18 + call Textbox + pop af + ld e, a + ld d, 0 + ld hl, PrinterStatusStringPointers + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + hlcoord 1, 7 + ld a, BANK(GBPrinterStrings) + call PlaceFarString + hlcoord 2, 15 + ld de, String_PressBToCancel + call PlaceString + ld a, $1 + ldh [hBGMapMode], a + xor a + ld [wPrinterStatus], a + ret + +PlacePrinterStatusStringBorderless: ; unreferenced +; Similar to PlacePrinterStatusString, but with different hlcoords +; and ClearBox instead of TextBox. + ld a, [wPrinterStatus] + and a + ret z + push af + xor a + ldh [hBGMapMode], a + hlcoord 2, 4 + lb bc, 13, 16 + call ClearBox + pop af + ld e, a + ld d, 0 + ld hl, PrinterStatusStringPointers + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + hlcoord 4, 7 + ld a, BANK(GBPrinterStrings) + call PlaceFarString + hlcoord 4, 15 + ld de, String_PressBToCancel + call PlaceString + ld a, $1 + ldh [hBGMapMode], a + xor a + ld [wPrinterStatus], a + ret + +String_PressBToCancel: + db "Press B to Cancel@" + +PrinterStatusStringPointers: + dw GBPrinterString_Null ; @ + dw GBPrinterString_CheckingLink ; CHECKING LINK + dw GBPrinterString_Transmitting ; TRANSMITTING + dw GBPrinterString_Printing ; PRINTING + dw GBPrinterString_PrinterError1 ; error 1 + dw GBPrinterString_PrinterError2 ; error 2 + dw GBPrinterString_PrinterError3 ; error 3 + dw GBPrinterString_PrinterError4 ; error 4 + +PrintPCBox_Page1: + xor a + ld [wWhichBoxMonToPrint], a + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + ld a, " " + call ByteFill + call Printer_PlaceEmptyBoxSlotString + + hlcoord 0, 0 + ld bc, 9 * SCREEN_WIDTH + ld a, " " + call ByteFill + + call Printer_PlaceSideBorders + call Printer_PlaceTopBorder + + hlcoord 4, 3 + ld de, .String_PokemonList + call PlaceString + + ld a, [wWhichBoxToPrint] + ld bc, BOX_NAME_LENGTH + ld hl, wBoxNames + call AddNTimes + ld d, h + ld e, l + hlcoord 6, 5 + call PlaceString + ld a, 1 + call Printer_GetBoxMonSpecies + hlcoord 2, 9 + ld c, 3 + call Printer_PrintBoxListSegment + ret + +.String_PokemonList: + db "#MON LIST@" + +PrintPCBox_Page2: + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + ld a, " " + call ByteFill + call Printer_PlaceEmptyBoxSlotString + call Printer_PlaceSideBorders + ld a, [wFinishedPrintingBox] + and a + ret nz + ld a, 4 + call Printer_GetBoxMonSpecies + hlcoord 2, 0 + ld c, 6 + call Printer_PrintBoxListSegment + ret + +PrintPCBox_Page3: + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + ld a, " " + call ByteFill + call Printer_PlaceEmptyBoxSlotString + call Printer_PlaceSideBorders + ld a, [wFinishedPrintingBox] + and a + ret nz + ld a, 10 + call Printer_GetBoxMonSpecies + hlcoord 2, 0 + ld c, 6 + call Printer_PrintBoxListSegment + ret + +PrintPCBox_Page4: + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + ld a, " " + call ByteFill + call Printer_PlaceEmptyBoxSlotString + hlcoord 1, 15 + lb bc, 2, 18 + call ClearBox + call Printer_PlaceSideBorders + call Printer_PlaceBottomBorders + ld a, [wFinishedPrintingBox] + and a + ret nz + ld a, 16 + call Printer_GetBoxMonSpecies + hlcoord 2, 0 + ld c, 5 + call Printer_PrintBoxListSegment + ret + +Printer_PrintBoxListSegment: + ld a, [wBankOfBoxToPrint] + call OpenSRAM +.loop + ld a, c + and a + jp z, .max_length + dec c + ld a, [de] + cp $ff + jp z, .finish + cp EGG + call nz, Printer_GetTrueBoxSpeciesIndex + ld [wNamedObjectIndex], a + ld [wCurPartySpecies], a + + push bc + push hl + push de + + push hl + ld bc, 16 + ld a, " " + call ByteFill + pop hl + + push hl + call GetBasePokemonName + pop hl + + push hl + call PlaceString + ld a, [wCurPartySpecies] + cp EGG + pop hl + jr z, .ok2 + + ld bc, MON_NAME_LENGTH + add hl, bc + call Printer_GetMonGender + ld bc, SCREEN_WIDTH - MON_NAME_LENGTH + add hl, bc + ld a, "/" + ld [hli], a + + push hl + ld bc, 14 + ld a, " " + call ByteFill + pop hl + + push hl + ld a, [wAddrOfBoxToPrint] + ld l, a + ld a, [wAddrOfBoxToPrint + 1] + ld h, a + ld bc, sBoxMonNicknames - sBox + add hl, bc + ld bc, MON_NAME_LENGTH + ld a, [wWhichBoxMonToPrint] + call AddNTimes + ld e, l + ld d, h + pop hl + + push hl + call PlaceString + pop hl + + ld bc, MON_NAME_LENGTH + add hl, bc + push hl + ld a, [wAddrOfBoxToPrint] + ld l, a + ld a, [wAddrOfBoxToPrint + 1] + ld h, a + ld bc, 2 + MONS_PER_BOX + MON_LEVEL + add hl, bc + ld bc, BOXMON_STRUCT_LENGTH + ld a, [wWhichBoxMonToPrint] + call AddNTimes + ld a, [hl] + pop hl + call PrintLevel_Force3Digits +.ok2 + ld hl, wWhichBoxMonToPrint + inc [hl] + pop de + pop hl + ld bc, 3 * SCREEN_WIDTH + add hl, bc + pop bc + inc de + jp .loop + +.finish + ld a, $1 + ld [wFinishedPrintingBox], a +.max_length + call CloseSRAM + ret + +Printer_GetMonGender: + push hl + ld a, [wAddrOfBoxToPrint] + ld l, a + ld a, [wAddrOfBoxToPrint + 1] + ld h, a + ld bc, 2 + MONS_PER_BOX + MON_DVS + add hl, bc + ld bc, BOXMON_STRUCT_LENGTH + ld a, [wWhichBoxMonToPrint] + call AddNTimes + ld de, wTempMonDVs + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + ld a, [wWhichBoxMonToPrint] + ld [wCurPartyMon], a + ld a, TEMPMON + ld [wMonType], a + farcall GetGender + ld a, " " + jr c, .got_gender + ld a, "♂" + jr nz, .got_gender + ld a, "♀" +.got_gender + pop hl + ld [hli], a + ret + +Printer_GetBoxMonSpecies: + push hl + ld e, a + ld d, 0 + ld a, [wAddrOfBoxToPrint] + ld l, a + ld a, [wAddrOfBoxToPrint + 1] + ld h, a + add hl, de + ld e, l + ld d, h + pop hl + ret + +Printer_GetTrueBoxSpeciesIndex: + push hl + push af + ld a, [wWhichBoxToPrint] + ld hl, wCurBox + cp [hl] + pop hl + ld l, a + ld a, h + jr z, .done + push bc + ld c, l + ld a, [wAddrOfBoxToPrint] + cpl + add a, e + ld b, a + farcall GetBoxMonPokemonIndexPointer + ldh a, [hSRAMBank] + ld c, a + ld a, b + call OpenSRAM + ld a, [hli] + ld h, [hl] + ld l, a + call GetPokemonIDFromIndex + ld b, a + ld a, c + call OpenSRAM + ld a, b + pop bc +.done + pop hl + ret + +Printer_PlaceTopBorder: + hlcoord 0, 0 + ld a, "┌" + ld [hli], a + ld a, "─" + ld c, SCREEN_WIDTH - 2 +.loop + ld [hli], a + dec c + jr nz, .loop + ld a, "┐" + ld [hl], a + ret + +Printer_PlaceSideBorders: + hlcoord 0, 0 + ld de, SCREEN_WIDTH - 1 + ld c, SCREEN_HEIGHT +.loop + ld a, "│" + ld [hl], a + add hl, de + ld a, "│" + ld [hli], a + dec c + jr nz, .loop + ret + +Printer_PlaceBottomBorders: + hlcoord 0, 17 + ld a, "└" + ld [hli], a + ld a, "─" + ld c, SCREEN_WIDTH - 2 +.loop + ld [hli], a + dec c + jr nz, .loop + ld a, "┘" + ld [hl], a + ret + +Printer_PlaceEmptyBoxSlotString: + hlcoord 2, 0 + ld c, 6 +.loop + push bc + push hl + ld de, .EmptyBoxSlotString + call PlaceString + pop hl + ld bc, 3 * SCREEN_WIDTH + add hl, bc + pop bc + dec c + jr nz, .loop + ret + +.EmptyBoxSlotString: + db " ------@" diff --git a/engine/printer/printer_serial.asm b/engine/printer/printer_serial.asm new file mode 100644 index 0000000..f3c0709 --- /dev/null +++ b/engine/printer/printer_serial.asm @@ -0,0 +1,628 @@ +Printer_StartTransmission: + ld hl, wGameboyPrinterRAM + ld bc, wGameboyPrinterRAMEnd - wGameboyPrinterRAM + xor a + call Printer_ByteFill + xor a + ldh [rSB], a + ldh [rSC], a + ld [wPrinterOpcode], a + ld hl, wPrinterConnectionOpen + set 0, [hl] + ld a, [wGBPrinterBrightness] + ld [wPrinterExposureTime], a + xor a + ld [wJumptableIndex], a + ret + +PrinterJumptableIteration: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + dw Print_InitPrinterHandshake ; 00 + dw Printer_CheckConnectionStatus ; 01 + dw Printer_WaitSerial ; 02 + dw Printer_StartTransmittingTilemap ; 03 + dw Printer_TransmissionLoop ; 04 + dw Printer_WaitSerialAndLoopBack2 ; 05 + + dw Printer_EndTilemapTransmission ; 06 + dw Printer_TransmissionLoop ; 07 + dw Printer_WaitSerial ; 08 + dw Printer_SignalSendHeader ; 09 + dw Printer_TransmissionLoop ; 0a + dw Printer_WaitSerial ; 0b + dw Printer_WaitUntilFinished ; 0c + dw Printer_Quit ; 0d + + dw Printer_NextSection ; 0e + dw Printer_WaitSerial ; 0f + dw Printer_SignalLoopBack ; 10 + dw Printer_SectionOne ; 11 + dw Printer_NextSectionWaitLoopBack ; 12 + dw Printer_WaitLoopBack ; 13 + +_Printer_NextSection: + ld hl, wJumptableIndex + inc [hl] + ret + +Printer_PrevSection: + ld hl, wJumptableIndex + dec [hl] + ret + +Printer_Quit: + xor a + ld [wPrinterStatusFlags], a + ld hl, wJumptableIndex + set 7, [hl] + ret + +Printer_NextSection: + call _Printer_NextSection + ret + +Printer_SectionOne: + ld a, $1 + ld [wJumptableIndex], a + ret + +Print_InitPrinterHandshake: + call Printer_ResetData + ld hl, PrinterDataPacket1 + call Printer_CopyPacket + xor a + ld [wPrinterSendByteCounter], a + ld [wPrinterSendByteCounter + 1], a + ld a, [wPrinterQueueLength] + ld [wPrinterRowIndex], a + call _Printer_NextSection + call Printer_WaitHandshake + ld a, PRINTER_STATUS_CHECKING + ld [wPrinterStatus], a + ret + +Printer_StartTransmittingTilemap: + call Printer_ResetData + ; check remaining tile data + ld hl, wPrinterRowIndex + ld a, [hl] + and a + jr z, Printer_EndTilemapTransmission + ; send packet 3 + ld hl, PrinterDataPacket3 ; signal start of transmission + call Printer_CopyPacket + ; prepare to send 40 tiles + call Printer_Convert2RowsTo2bpp + ld a, LOW(40 tiles) + ld [wPrinterSendByteCounter], a + ld a, HIGH(40 tiles) + ld [wPrinterSendByteCounter + 1], a + ; compute the checksum + call Printer_ComputeChecksum + call _Printer_NextSection + call Printer_WaitHandshake + ld a, PRINTER_STATUS_TRANSMITTING + ld [wPrinterStatus], a + ret + +Printer_EndTilemapTransmission: + ; ensure that we go from here to routine 7 + ld a, $6 + ld [wJumptableIndex], a + ; send packet 4 + ld hl, PrinterDataPacket4 ; signal no transmission + call Printer_CopyPacket + ; send no tile data + xor a + ld [wPrinterSendByteCounter], a + ld [wPrinterSendByteCounter + 1], a + call _Printer_NextSection + call Printer_WaitHandshake + ret + +Printer_SignalSendHeader: + call Printer_ResetData + ld hl, PrinterDataPacket2 ; signal request print + call Printer_CopyPacket + ; prepare to send 1 tile + call Printer_StageHeaderForSend + ld a, LOW(4) + ld [wPrinterSendByteCounter], a + ld a, HIGH(4) + ld [wPrinterSendByteCounter + 1], a + ; compute the checksum + call Printer_ComputeChecksum + call _Printer_NextSection + call Printer_WaitHandshake + ld a, PRINTER_STATUS_PRINTING + ld [wPrinterStatus], a + ret + +Printer_SignalLoopBack: + call Printer_ResetData + ; send packet 1 + ld hl, PrinterDataPacket1 ; signal no transmission + call Printer_CopyPacket + ; send no tile data + xor a + ld [wPrinterSendByteCounter], a + ld [wPrinterSendByteCounter + 1], a + ld a, [wPrinterQueueLength] + ld [wPrinterRowIndex], a + call _Printer_NextSection + call Printer_WaitHandshake + ret + +Printer_WaitSerial: + ld hl, wPrinterSerialFrameDelay + inc [hl] + ld a, [hl] + cp $6 + ret c + xor a + ld [hl], a + call _Printer_NextSection + ret + +Printer_WaitSerialAndLoopBack2: + ld hl, wPrinterSerialFrameDelay + inc [hl] + ld a, [hl] + cp $6 + ret c + xor a + ld [hl], a + ld hl, wPrinterRowIndex + dec [hl] + call Printer_PrevSection + call Printer_PrevSection + ret + +Printer_CheckConnectionStatus: + ld a, [wPrinterOpcode] + and a + ret nz + ld a, [wPrinterHandshake] + cp $ff + jr nz, .printer_connected + ld a, [wPrinterStatusFlags] + cp $ff + jr z, .printer_error + +.printer_connected + ld a, [wPrinterHandshake] + cp $81 + jr nz, .printer_error + ld a, [wPrinterStatusFlags] + cp $0 + jr nz, .printer_error + ld hl, wPrinterConnectionOpen + set 1, [hl] + ld a, $5 + ld [wHandshakeFrameDelay], a + call _Printer_NextSection + ret + +.printer_error + ld a, $ff + ld [wPrinterHandshake], a + ld [wPrinterStatusFlags], a + ld a, $e + ld [wJumptableIndex], a + ret + +Printer_TransmissionLoop: + ld a, [wPrinterOpcode] + and a + ret nz + ld a, [wPrinterStatusFlags] + and $f0 + jr nz, .enter_wait_loop + ld a, [wPrinterStatusFlags] + and $1 + jr nz, .cycle_back + call _Printer_NextSection + ret + +.cycle_back + call Printer_PrevSection + ret + +.enter_wait_loop + ld a, $12 ; Printer_NextSectionWaitLoopBack + ld [wJumptableIndex], a + ret + +Printer_WaitUntilFinished: + ld a, [wPrinterOpcode] + and a + ret nz + ld a, [wPrinterStatusFlags] + and $f3 + ret nz + call _Printer_NextSection + ret + +Printer_NextSectionWaitLoopBack: + call _Printer_NextSection +Printer_WaitLoopBack: + ld a, [wPrinterOpcode] + and a + ret nz + ld a, [wPrinterStatusFlags] + and $f0 + ret nz + xor a + ld [wJumptableIndex], a + ret + +Printer_WaitHandshake: +.loop + ld a, [wPrinterOpcode] + and a + jr nz, .loop + xor a + ld [wPrinterSendByteOffset], a + ld [wPrinterSendByteOffset + 1], a + ld a, $1 + ld [wPrinterOpcode], a + ld a, $88 + ldh [rSB], a + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ret + +Printer_CopyPacket: + ld a, [hli] + ld [wPrinterData], a + ld a, [hli] + ld [wPrinterData + 1], a + ld a, [hli] + ld [wPrinterData + 2], a + ld a, [hli] + ld [wPrinterData + 3], a + ld a, [hli] + ld [wPrinterChecksum], a + ld a, [hl] + ld [wPrinterChecksum + 1], a + ret + +Printer_ResetData: + xor a + ld hl, wPrinterData + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld hl, wPrinterChecksum + ld [hli], a + ld [hl], a + xor a + ld [wPrinterSendByteCounter], a + ld [wPrinterSendByteCounter + 1], a + ld hl, wGameboyPrinter2bppSource + ld bc, wGameboyPrinter2bppSourceEnd - wGameboyPrinter2bppSource + call Printer_ByteFill + ret + +Printer_ComputeChecksum: + ld hl, 0 + ld bc, 4 + ld de, wPrinterData + call .ComputeChecksum + ld a, [wPrinterSendByteCounter] + ld c, a + ld a, [wPrinterSendByteCounter + 1] + ld b, a + ld de, wGameboyPrinterRAM + call .ComputeChecksum + ld a, l + ld [wPrinterChecksum], a + ld a, h + ld [wPrinterChecksum + 1], a + ret + +.ComputeChecksum: +.loop + ld a, [de] + inc de + add l + jr nc, .no_overflow + inc h +.no_overflow + ld l, a + dec bc + ld a, c + or b + jr nz, .loop + ret + +Printer_StageHeaderForSend: + ld a, $1 + ld [wGameboyPrinter2bppSource + 0], a + ld a, [wPrinterMargins] + ld [wGameboyPrinter2bppSource + 1], a + ld a, %11100100 ; 3,2,1,0 + ld [wGameboyPrinter2bppSource + 2], a + ld a, [wPrinterExposureTime] + ld [wGameboyPrinter2bppSource + 3], a + ret + +Printer_Convert2RowsTo2bpp: + ; de = wPrinterTilemapBuffer + 2 * SCREEN_WIDTH * ([wPrinterQueueLength] - [wPrinterRowIndex]) + ld a, [wPrinterRowIndex] + xor $ff + ld d, a + ld a, [wPrinterQueueLength] + inc a + add d + ld hl, wPrinterTilemapBuffer + ld de, 2 * SCREEN_WIDTH +.loop1 + and a + jr z, .okay1 + add hl, de + dec a + jr .loop1 +.okay1 + ld e, l + ld d, h + ld hl, wGameboyPrinter2bppSource + ld c, 2 * SCREEN_WIDTH +.loop2 + ld a, [de] + inc de + push bc + push de + push hl + ; convert tile index to vram address + swap a + ld d, a + and $f0 + ld e, a + ld a, d + and $f + ld d, a + and $8 + ld a, d + jr nz, .vtiles_8xxx + or $90 + jr .got_vtile_addr + +.vtiles_8xxx + or $80 +.got_vtile_addr + ld d, a + ; copy 1 vtile to hl + lb bc, BANK(Printer_Convert2RowsTo2bpp), 1 + call Request2bpp + pop hl + ld de, 1 tiles + add hl, de + pop de + pop bc + dec c + jr nz, .loop2 + ret + +Printer_ByteFill: + push de + ld e, a +.loop + ld [hl], e + inc hl + dec bc + ld a, c + or b + jr nz, .loop + ld a, e + pop de + ret + +PrinterDataPacket1: + db 1, 0, $00, 0 + dw 1 +PrinterDataPacket2: + db 2, 0, $04, 0 + dw 0 +PrinterDataPacket3: + db 4, 0, $80, 2 + dw 0 +PrinterDataPacket4: + db 4, 0, $00, 0 + dw 4 +PrinterDataPacket5: ; unreferenced + db 8, 0, $00, 0 + dw 8 +PrinterDataPacket6: ; unreferenced + db 15, 0, $00, 0 + dw 15 + +_PrinterReceive:: + ld a, [wPrinterOpcode] + add a + ld e, a + ld d, 0 + ld hl, .Jumptable + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.Jumptable: + dw Printer_DoNothing ; 00 + + dw Printer_Send0x33 ; 01 + dw Printer_SendPrinterData1 ; 02 + dw Printer_SendPrinterData2 ; 03 + dw Printer_SendPrinterData3 ; 04 + dw Printer_SendPrinterData4 ; 05 + dw Printer_SendNextByte ; 06 + dw Printer_SendwPrinterChecksumLo ; 07 + dw Printer_SendwPrinterChecksumHi ; 08 + dw Printer_Send0x00_2 ; 09 + dw Printer_ReceiveTwoPrinterHandshakeAndSend0x00 ; 0a + dw Printer_ReceiveTwoPrinterStatusFlagsAndExitSendLoop ; 0b + + dw Printer_Send0x33 ; 0c triggered by AskSerial + dw Printer_Send0x0f ; 0d + dw Printer_Send0x00 ; 0e + dw Printer_Send0x00 ; 0f + dw Printer_Send0x00 ; 10 + dw Printer_Send0x0f ; 11 + dw Printer_Send0x00 ; 12 + dw Printer_Send0x00_2 ; 13 + dw Printer_ReceiveTwoPrinterHandshakeAndSend0x00 ; 14 + dw Printer_ReceiveTwoPrinterStatusFlagsAndExitSendLoop_2 ; 15 + + dw Printer_Send0x33 ; 16 triggered by pressing B + dw Printer_Send0x08 ; 17 + dw Printer_Send0x00 ; 18 + dw Printer_Send0x00 ; 19 + dw Printer_Send0x00 ; 1a + dw Printer_Send0x08 ; 1b + dw Printer_Send0x00 ; 1c + dw Printer_Send0x00_2 ; 1d + dw Printer_ReceiveTwoPrinterHandshakeAndSend0x00 ; 1e + dw Printer_ReceiveTwoPrinterStatusFlagsAndExitSendLoop ; 1f + +Printer_NextInstruction: + ld hl, wPrinterOpcode + inc [hl] + ret + +Printer_DoNothing: + ret + +Printer_Send0x33: + ld a, $33 + call Printer_SerialSend + call Printer_NextInstruction + ret + +Printer_SendPrinterData1: + ld a, [wPrinterData] + call Printer_SerialSend + call Printer_NextInstruction + ret + +Printer_SendPrinterData2: + ld a, [wPrinterData + 1] + call Printer_SerialSend + call Printer_NextInstruction + ret + +Printer_SendPrinterData3: + ld a, [wPrinterData + 2] + call Printer_SerialSend + call Printer_NextInstruction + ret + +Printer_SendPrinterData4: + ld a, [wPrinterData + 3] + call Printer_SerialSend + call Printer_NextInstruction + ret + +Printer_SendNextByte: + ; decrement 16-bit counter + ld hl, wPrinterSendByteCounter + ld a, [hli] + ld d, [hl] + ld e, a + or d + jr z, .done + dec de + ld [hl], d + dec hl + ld [hl], e + + ld a, [wPrinterSendByteOffset] + ld e, a + ld a, [wPrinterSendByteOffset + 1] + ld d, a + ld hl, wGameboyPrinterRAM + add hl, de + inc de + ld a, e + ld [wPrinterSendByteOffset], a + ld a, d + ld [wPrinterSendByteOffset + 1], a + ld a, [hl] + call Printer_SerialSend + ret + +.done + call Printer_NextInstruction +Printer_SendwPrinterChecksumLo: + ld a, [wPrinterChecksum] + call Printer_SerialSend + call Printer_NextInstruction + ret + +Printer_SendwPrinterChecksumHi: + ld a, [wPrinterChecksum + 1] + call Printer_SerialSend + call Printer_NextInstruction + ret + +Printer_Send0x00_2: +; identical to Printer_Send0x00, but referenced less + ld a, $0 + call Printer_SerialSend + call Printer_NextInstruction + ret + +Printer_ReceiveTwoPrinterHandshakeAndSend0x00: + ldh a, [rSB] + ld [wPrinterHandshake], a + ld a, $0 + call Printer_SerialSend + call Printer_NextInstruction + ret + +Printer_ReceiveTwoPrinterStatusFlagsAndExitSendLoop: + ldh a, [rSB] + ld [wPrinterStatusFlags], a + xor a + ld [wPrinterOpcode], a + ret + +Printer_Send0x0f: + ld a, $f + call Printer_SerialSend + call Printer_NextInstruction + ret + +Printer_Send0x00: + ld a, $0 + call Printer_SerialSend + call Printer_NextInstruction + ret + +Printer_Send0x08: + ld a, $8 + call Printer_SerialSend + call Printer_NextInstruction + ret + +Printer_SerialSend: + ldh [rSB], a + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ret + +Printer_ReceiveTwoPrinterStatusFlagsAndExitSendLoop_2: +; identical to Printer_ReceiveTwoPrinterStatusFlagsAndExitSendLoop, but referenced less + ldh a, [rSB] + ld [wPrinterStatusFlags], a + xor a + ld [wPrinterOpcode], a + ret diff --git a/engine/rtc/print_hours_mins.asm b/engine/rtc/print_hours_mins.asm new file mode 100644 index 0000000..b3a3ac3 --- /dev/null +++ b/engine/rtc/print_hours_mins.asm @@ -0,0 +1,65 @@ +PrintFiveDigitNumber: ; unreferenced +; Debug function? +; Input: bc = value, de = destination + ld a, b + ld b, c + ld c, a + push bc ; de points to this on the stack for PrintNum + push de + ld hl, sp+2 + ld d, h + ld e, l + pop hl + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + pop bc + ret + +PrintHoursMins: +; Hours in b, minutes in c + ld a, b + cp 12 + push af + jr c, .AM + jr z, .PM + sub 12 + jr .PM +.AM: + or a + jr nz, .PM + ld a, 12 +.PM: + ld b, a +; Crazy stuff happening with the stack + push bc + ld hl, sp+1 + push de + push hl + pop de + pop hl + ld [hl], " " + lb bc, 1, 2 + call PrintNum + ld [hl], ":" + inc hl + ld d, h + ld e, l + ld hl, sp+0 + push de + push hl + pop de + pop hl + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + pop bc + ld de, String_AM + pop af + jr c, .place_am_pm + ld de, String_PM +.place_am_pm + inc hl + call PlaceString + ret + +String_AM: db "AM@" +String_PM: db "PM@" diff --git a/engine/rtc/reset_password.asm b/engine/rtc/reset_password.asm new file mode 100644 index 0000000..5857784 --- /dev/null +++ b/engine/rtc/reset_password.asm @@ -0,0 +1,255 @@ +_ResetClock: + farcall BlankScreen + ld b, SCGB_DIPLOMA + call GetSGBLayout + call LoadStandardFont + call LoadFontsExtra + ld de, MUSIC_MAIN_MENU + call PlayMusic + ld hl, .PasswordAskResetClockText + call PrintText + ld hl, .NoYes_MenuHeader + call CopyMenuHeader + call VerticalMenu + ret c + ld a, [wMenuCursorY] + cp 1 + ret z + call ClockResetPassword + jr c, .wrongpassword + ld a, BANK(sRTCStatusFlags) + call OpenSRAM + ld a, $80 + ld [sRTCStatusFlags], a + call CloseSRAM + ld hl, .PasswordAskResetText + call PrintText + ret + +.wrongpassword + ld hl, .PasswordWrongText + call PrintText + ret + +.PasswordAskResetText: + text_far _PasswordAskResetText + text_end + +.PasswordWrongText: + text_far _PasswordWrongText + text_end + +.PasswordAskResetClockText: + text_far _PasswordAskResetClockText + text_end + +.NoYes_MenuHeader: + db 0 ; flags + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .NoYes_MenuData + db 1 ; default option + +.NoYes_MenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 2 ; items + db "NO@" + db "YES@" + +ClockResetPassword: + call .CalculatePassword + push de + ld hl, wStringBuffer2 + ld bc, 5 + xor a + call ByteFill + ld a, 4 + ld [wStringBuffer2 + 5], a + ld hl, .PasswordAskEnterText + call PrintText +.loop + call .updateIDdisplay +.loop2 + call JoyTextDelay + ldh a, [hJoyLast] + ld b, a + and A_BUTTON + jr nz, .confirm + ld a, b + and D_PAD + jr z, .loop2 + call .dpadinput + ld c, 3 + call DelayFrames + jr .loop + +.confirm + call .ConvertDecIDToBytes + pop de + ld a, e + cp l + jr nz, .nope + ld a, d + cp h + jr nz, .nope + and a + ret + +.nope + scf + ret + +.PasswordAskEnterText: + text_far _PasswordAskEnterText + text_end + +.updateIDdisplay + hlcoord 14, 15 + ld de, wStringBuffer2 + ld c, 5 +.loop3 + ld a, [de] + add "0" + ld [hli], a + inc de + dec c + jr nz, .loop3 + hlcoord 14, 16 + ld bc, 5 + ld a, " " + call ByteFill + hlcoord 14, 16 + ld a, [wStringBuffer2 + 5] + ld e, a + ld d, 0 + add hl, de + ld [hl], "▲" + ret + +.dpadinput + ld a, b + and D_LEFT + jr nz, .left + ld a, b + and D_RIGHT + jr nz, .right + ld a, b + and D_UP + jr nz, .up + ld a, b + and D_DOWN + jr nz, .down + ret + +.left + ld a, [wStringBuffer2 + 5] + and a + ret z + dec a + ld [wStringBuffer2 + 5], a + ret + +.right + ld a, [wStringBuffer2 + 5] + cp 4 + ret z + inc a + ld [wStringBuffer2 + 5], a + ret + +.up + call .getcurrentdigit + ld a, [hl] + cp 9 + jr z, .wraparound_up + inc a + ld [hl], a + ret + +.wraparound_up + ld [hl], 0 + ret + +.down + call .getcurrentdigit + ld a, [hl] + and a + jr z, .wraparound_down + dec a + ld [hl], a + ret + +.wraparound_down + ld [hl], 9 + ret + +.getcurrentdigit + ld a, [wStringBuffer2 + 5] + ld e, a + ld d, 0 + ld hl, wStringBuffer2 + add hl, de + ret + +.ConvertDecIDToBytes: + ld hl, 0 + ld de, wStringBuffer2 + 4 + ld bc, 1 + call .ConvertToBytes + ld bc, 10 + call .ConvertToBytes + ld bc, 100 + call .ConvertToBytes + ld bc, 1000 + call .ConvertToBytes + ld bc, 10000 +.ConvertToBytes: + ld a, [de] + dec de + push hl + ld hl, 0 + call AddNTimes + ld c, l + ld b, h + pop hl + add hl, bc + ret + +.CalculatePassword: + ld a, BANK(sPlayerData) + call OpenSRAM + ld de, 0 + ld hl, sPlayerData + (wPlayerID - wPlayerData) + ld c, 2 + call .ComponentFromNumber + ld hl, sPlayerData + (wPlayerName - wPlayerData) + ld c, NAME_LENGTH_JAPANESE - 1 + call .ComponentFromString + ld hl, sPlayerData + (wMoney - wPlayerData) + ld c, 3 + call .ComponentFromNumber + call CloseSRAM + ret + +.ComponentFromNumber: + ld a, [hli] + add e + ld e, a + ld a, 0 + adc d + ld d, a + dec c + jr nz, .ComponentFromNumber + ret + +.ComponentFromString: + ld a, [hli] + cp "@" + ret z + add e + ld e, a + ld a, 0 + adc d + ld d, a + dec c + jr nz, .ComponentFromString + ret diff --git a/engine/rtc/restart_clock.asm b/engine/rtc/restart_clock.asm new file mode 100644 index 0000000..450d89a --- /dev/null +++ b/engine/rtc/restart_clock.asm @@ -0,0 +1,241 @@ +; RestartClock_GetWraparoundTime.WrapAroundTimes indexes + const_def 1 + const RESTART_CLOCK_DAY + const RESTART_CLOCK_HOUR + const RESTART_CLOCK_MIN +DEF NUM_RESTART_CLOCK_DIVISIONS EQU const_value - 1 + +RestartClock_GetWraparoundTime: + push hl + dec a + ld e, a + ld d, 0 + ld hl, .WrapAroundTimes +rept 4 + add hl, de +endr + ld e, [hl] + inc hl + ld d, [hl] + inc hl + ld b, [hl] + inc hl + ld c, [hl] + pop hl + ret + +.WrapAroundTimes: +; entries correspond to RESTART_CLOCK_* constants +MACRO wraparound_time + dw \1 ; value pointer + db \2 ; maximum value + db \3 ; up/down arrow x coord (pairs with wRestartClockUpArrowYCoord) +ENDM + wraparound_time wRestartClockDay, 7, 4 + wraparound_time wRestartClockHour, 24, 12 + wraparound_time wRestartClockMin, 60, 15 + +RestartClock: +; If we're here, we had an RTC overflow. + ld hl, .ClockTimeMayBeWrongText + call PrintText + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + call LoadStandardMenuHeader + call ClearTilemap + ld hl, .ClockSetWithControlPadText + call PrintText + call .SetClock + call ExitMenu + pop bc + ld hl, wOptions + ld [hl], b + ld c, a + ret + +.ClockTimeMayBeWrongText: + text_far _ClockTimeMayBeWrongText + text_end + +.ClockSetWithControlPadText: + text_far _ClockSetWithControlPadText + text_end + +.SetClock: + ld a, RESTART_CLOCK_DAY + ld [wRestartClockCurDivision], a + ld [wRestartClockPrevDivision], a + ld a, 8 + ld [wRestartClockUpArrowYCoord], a + call UpdateTime + call GetWeekday + ld [wRestartClockDay], a + ldh a, [hHours] + ld [wRestartClockHour], a + ldh a, [hMinutes] + ld [wRestartClockMin], a + +.loop + call .joy_loop + jr nc, .loop + and a + ret nz + call .PrintTime + ld hl, .ClockIsThisOKText + call PrintText + call YesNoBox + jr c, .cancel + ld a, [wRestartClockDay] + ld [wStringBuffer2], a + ld a, [wRestartClockHour] + ld [wStringBuffer2 + 1], a + ld a, [wRestartClockMin] + ld [wStringBuffer2 + 2], a + xor a + ld [wStringBuffer2 + 3], a + call InitTime + call .PrintTime + ld hl, .ClockHasResetText + call PrintText + call WaitPressAorB_BlinkCursor + xor a ; FALSE + ret + +.cancel + ld a, TRUE + ret + +.ClockIsThisOKText: + text_far _ClockIsThisOKText + text_end + +.ClockHasResetText: + text_far _ClockHasResetText + text_end + +.joy_loop + call JoyTextDelay_ForcehJoyDown + ld c, a + push af + call .PrintTime + pop af + bit 0, a + jr nz, .press_A + bit 1, a + jr nz, .press_B + bit 6, a + jr nz, .pressed_up + bit 7, a + jr nz, .pressed_down + bit 5, a + jr nz, .pressed_left + bit 4, a + jr nz, .pressed_right + jr .joy_loop + +.press_A + ld a, FALSE + scf + ret + +.press_B + ld a, TRUE + scf + ret + +.pressed_up + ld a, [wRestartClockCurDivision] + call RestartClock_GetWraparoundTime + ld a, [de] + inc a + ld [de], a + cp b + jr c, .done_scroll + ld a, 0 + ld [de], a + jr .done_scroll + +.pressed_down + ld a, [wRestartClockCurDivision] + call RestartClock_GetWraparoundTime + ld a, [de] + dec a + ld [de], a + cp -1 + jr nz, .done_scroll + ld a, b + dec a + ld [de], a + jr .done_scroll + +.pressed_left + ld hl, wRestartClockCurDivision + dec [hl] + jr nz, .done_scroll + ld [hl], RESTART_CLOCK_MIN + jr .done_scroll + +.pressed_right + ld hl, wRestartClockCurDivision + inc [hl] + ld a, [hl] + cp NUM_RESTART_CLOCK_DIVISIONS + 1 + jr c, .done_scroll + ld [hl], RESTART_CLOCK_DAY + +.done_scroll + xor a ; FALSE + ret + +.PrintTime: + hlcoord 0, 5 + ld b, 5 + ld c, 18 + call Textbox + decoord 1, 8 + ld a, [wRestartClockDay] + ld b, a + farcall PrintDayOfWeek + ld a, [wRestartClockHour] + ld b, a + ld a, [wRestartClockMin] + ld c, a + decoord 11, 8 + farcall PrintHoursMins + ld a, [wRestartClockPrevDivision] + lb de, " ", " " + call .PlaceChars + ld a, [wRestartClockCurDivision] + lb de, "▲", "▼" + call .PlaceChars + ld a, [wRestartClockCurDivision] + ld [wRestartClockPrevDivision], a + ret + +.UnusedPlaceCharsFragment: ; unreferenced + ld a, [wRestartClockUpArrowYCoord] + ld b, a + call Coord2Tile + ret + +.PlaceChars: + push de + call RestartClock_GetWraparoundTime + ld a, [wRestartClockUpArrowYCoord] + dec a + ld b, a + call Coord2Tile + pop de + ld [hl], d + ld bc, 2 * SCREEN_WIDTH + add hl, bc + ld [hl], e + ret + +JPHourString: ; unreferenced + db "じ@" ; HR + +JPMinuteString: ; unreferenced + db "ふん@" ; MIN diff --git a/engine/rtc/rtc.asm b/engine/rtc/rtc.asm new file mode 100644 index 0000000..4cf79b0 --- /dev/null +++ b/engine/rtc/rtc.asm @@ -0,0 +1,201 @@ +StopRTC: ; unreferenced + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a + call LatchClock + ld a, RTC_DH + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, [MBC3RTC] + set 6, a ; halt + ld [MBC3RTC], a + call CloseSRAM + ret + +StartRTC: + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a + call LatchClock + ld a, RTC_DH + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, [MBC3RTC] + res 6, a ; halt + ld [MBC3RTC], a + call CloseSRAM + ret + +GetTimeOfDay:: +; get time of day based on the current hour + ldh a, [hHours] ; hour + ld hl, TimesOfDay + +.check +; if we're within the given time period, +; get the corresponding time of day + cp [hl] + jr c, .match +; else, get the next entry + inc hl + inc hl +; try again + jr .check + +.match +; get time of day + inc hl + ld a, [hl] + ld [wTimeOfDay], a + ret + +TimesOfDay: +; hours for the time of day +; 0400-0959 morn | 1000-1759 day | 1800-0359 nite + db MORN_HOUR, NITE_F + db DAY_HOUR, MORN_F + db NITE_HOUR, DAY_F + db MAX_HOUR, NITE_F + db -1, MORN_F + +BetaTimesOfDay: ; unreferenced + db 20, NITE_F + db 40, MORN_F + db 60, DAY_F + db -1, MORN_F + +StageRTCTimeForSave: + call UpdateTime + ld hl, wRTC + ld a, [wCurDay] + ld [hli], a + ldh a, [hHours] + ld [hli], a + ldh a, [hMinutes] + ld [hli], a + ldh a, [hSeconds] + ld [hli], a + ret + +SaveRTC: + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a + call LatchClock + ld hl, MBC3RTC + ld a, RTC_DH + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + res 7, [hl] + ld a, BANK(sRTCStatusFlags) + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + xor a + ld [sRTCStatusFlags], a + call CloseSRAM + ret + +StartClock:: + call GetClock + call _FixDays + call FixDays + jr nc, .skip_set + ; bit 5: Day count exceeds 139 + ; bit 6: Day count exceeds 255 + call RecordRTCStatus ; set flag on sRTCStatusFlags + +.skip_set + call StartRTC + ret + +_FixDays: + ld hl, hRTCDayHi + bit 7, [hl] + jr nz, .set_bit_7 + bit 6, [hl] + jr nz, .set_bit_7 + xor a + ret + +.set_bit_7 + ; Day count exceeds 16383 + ld a, %10000000 + call RecordRTCStatus ; set bit 7 on sRTCStatusFlags + ret + +ClockContinue: + call CheckRTCStatus + ld c, a + and %11000000 ; Day count exceeded 255 or 16383 + jr nz, .time_overflow + + ld a, c + and %00100000 ; Day count exceeded 139 + jr z, .dont_update + + call UpdateTime + ld a, [wRTC + 0] + ld b, a + ld a, [wCurDay] + cp b + jr c, .dont_update + +.time_overflow + farcall ClearDailyTimers + farcall Function170923 + ld a, BANK(s5_aa8c) ; aka BANK(s5_b2fa) + call OpenSRAM + ld a, [s5_aa8c] + inc a + ld [s5_aa8c], a + ld a, [s5_b2fa] + inc a + ld [s5_b2fa], a + call CloseSRAM + ret + +.dont_update + xor a + ret + +_InitTime:: + call GetClock + call FixDays + ld hl, hRTCSeconds + ld de, wStartSecond + + ld a, [wStringBuffer2 + 3] + sub [hl] + dec hl + jr nc, .okay_secs + add 60 +.okay_secs + ld [de], a + dec de + + ld a, [wStringBuffer2 + 2] + sbc [hl] + dec hl + jr nc, .okay_mins + add 60 +.okay_mins + ld [de], a + dec de + + ld a, [wStringBuffer2 + 1] + sbc [hl] + dec hl + jr nc, .okay_hrs + add 24 +.okay_hrs + ld [de], a + dec de + + ld a, [wStringBuffer2] + sbc [hl] + dec hl + jr nc, .okay_days + add 140 + ld c, 7 + call SimpleDivide + +.okay_days + ld [de], a + ret diff --git a/engine/rtc/timeset.asm b/engine/rtc/timeset.asm new file mode 100644 index 0000000..1494693 --- /dev/null +++ b/engine/rtc/timeset.asm @@ -0,0 +1,726 @@ +DEF TIMESET_UP_ARROW EQU "♂" ; $ef +DEF TIMESET_DOWN_ARROW EQU "♀" ; $f5 + +InitClock: +; Ask the player to set the time. + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + + ld a, $0 + ld [wSpriteUpdatesEnabled], a + ld a, $10 + ld [wMusicFade], a + ld a, LOW(MUSIC_NONE) + ld [wMusicFadeID], a + ld a, HIGH(MUSIC_NONE) + ld [wMusicFadeID + 1], a + ld c, 8 + call DelayFrames + call RotateFourPalettesLeft + call ClearTilemap + call ClearSprites + ld b, SCGB_DIPLOMA + call GetSGBLayout + xor a + ldh [hBGMapMode], a + call LoadStandardFont + ld de, TimeSetBackgroundGFX + ld hl, vTiles2 tile $00 + lb bc, BANK(TimeSetBackgroundGFX), 1 + call Request1bpp + ld de, TimeSetUpArrowGFX + ld hl, vTiles2 tile $01 + lb bc, BANK(TimeSetUpArrowGFX), 1 + call Request1bpp + ld de, TimeSetDownArrowGFX + ld hl, vTiles2 tile $02 + lb bc, BANK(TimeSetDownArrowGFX), 1 + call Request1bpp + call .ClearScreen + call WaitBGMap + call RotateFourPalettesRight + ld hl, OakTimeWokeUpText + call PrintText + ld hl, wTimeSetBuffer + ld bc, wTimeSetBufferEnd - wTimeSetBuffer + xor a + call ByteFill + ld a, 10 ; default hour = 10 AM + ld [wInitHourBuffer], a + +.loop + ld hl, OakTimeWhatTimeIsItText + call PrintText + hlcoord 3, 7 + ld b, 2 + ld c, 15 + call Textbox + hlcoord 11, 7 + ld [hl], $1 + hlcoord 11, 10 + ld [hl], $2 + hlcoord 4, 9 + call DisplayHourOClock + ld c, 10 + call DelayFrames + +.SetHourLoop: + call JoyTextDelay + call SetHour + jr nc, .SetHourLoop + + ld a, [wInitHourBuffer] + ld [wStringBuffer2 + 1], a + call .ClearScreen + ld hl, OakTimeWhatHoursText + call PrintText + call YesNoBox + jr nc, .HourIsSet + call .ClearScreen + jr .loop + +.HourIsSet: + ld hl, OakTimeHowManyMinutesText + call PrintText + hlcoord 11, 7 + lb bc, 2, 7 + call Textbox + hlcoord 15, 7 + ld [hl], $1 + hlcoord 15, 10 + ld [hl], $2 + hlcoord 12, 9 + call DisplayMinutesWithMinString + ld c, 10 + call DelayFrames + +.SetMinutesLoop: + call JoyTextDelay + call SetMinutes + jr nc, .SetMinutesLoop + + ld a, [wInitMinuteBuffer] + ld [wStringBuffer2 + 2], a + call .ClearScreen + ld hl, OakTimeWhoaMinutesText + call PrintText + call YesNoBox + jr nc, .MinutesAreSet + call .ClearScreen + jr .HourIsSet + +.MinutesAreSet: + call InitTimeOfDay + ld hl, OakText_ResponseToSetTime + call PrintText + call WaitPressAorB_BlinkCursor + pop af + ldh [hInMenu], a + ret + +.ClearScreen: + xor a + ldh [hBGMapMode], a + hlcoord 0, 0 + ld bc, SCREEN_HEIGHT * SCREEN_WIDTH + xor a + call ByteFill + ld a, $1 + ldh [hBGMapMode], a + ret + +SetHour: + ldh a, [hJoyPressed] + and A_BUTTON + jr nz, .Confirm + + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .up + ld a, [hl] + and D_DOWN + jr nz, .down + call DelayFrame + and a + ret + +.down + ld hl, wInitHourBuffer + ld a, [hl] + and a + jr nz, .DecreaseThroughMidnight + ld a, 23 + 1 +.DecreaseThroughMidnight: + dec a + ld [hl], a + jr .okay + +.up + ld hl, wInitHourBuffer + ld a, [hl] + cp 23 + jr c, .AdvanceThroughMidnight + ld a, -1 +.AdvanceThroughMidnight: + inc a + ld [hl], a + +.okay + hlcoord 4, 9 + ld a, " " + ld bc, 15 + call ByteFill + hlcoord 4, 9 + call DisplayHourOClock + call WaitBGMap + and a + ret + +.Confirm: + scf + ret + +DisplayHourOClock: + push hl + ld a, [wInitHourBuffer] + ld c, a + ld e, l + ld d, h + call PrintHour + inc hl + ld de, String_oclock + call PlaceString + pop hl + ret + +DisplayHoursMinutesWithMinString: ; unreferenced + ld h, d + ld l, e + push hl + call DisplayHourOClock + pop de + inc de + inc de + ld a, ":" + ld [de], a + inc de + push de + ld hl, 3 + add hl, de + ld a, [de] + inc de + ld [hli], a + ld a, [de] + ld [hl], a + pop hl + call DisplayMinutesWithMinString + inc hl + inc hl + inc hl + ret + +SetMinutes: + ldh a, [hJoyPressed] + and A_BUTTON + jr nz, .a_button + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .d_up + ld a, [hl] + and D_DOWN + jr nz, .d_down + call DelayFrame + and a + ret + +.d_down + ld hl, wInitMinuteBuffer + ld a, [hl] + and a + jr nz, .decrease + ld a, 59 + 1 +.decrease + dec a + ld [hl], a + jr .finish_dpad + +.d_up + ld hl, wInitMinuteBuffer + ld a, [hl] + cp 59 + jr c, .increase + ld a, -1 +.increase + inc a + ld [hl], a +.finish_dpad + hlcoord 12, 9 + ld a, " " + ld bc, 7 + call ByteFill + hlcoord 12, 9 + call DisplayMinutesWithMinString + call WaitBGMap + and a + ret +.a_button + scf + ret + +DisplayMinutesWithMinString: + ld de, wInitMinuteBuffer + call PrintTwoDigitNumberLeftAlign + inc hl + ld de, String_min + call PlaceString + ret + +PrintTwoDigitNumberLeftAlign: + push hl + ld a, " " + ld [hli], a + ld [hl], a + pop hl + lb bc, PRINTNUM_LEFTALIGN | 1, 2 + call PrintNum + ret + +OakTimeWokeUpText: + text_far _OakTimeWokeUpText + text_end + +OakTimeWhatTimeIsItText: + text_far _OakTimeWhatTimeIsItText + text_end + +String_oclock: + db "o'clock@" + +OakTimeWhatHoursText: + ; What?@ @ + text_far _OakTimeWhatHoursText + text_asm + hlcoord 1, 16 + call DisplayHourOClock + ld hl, .OakTimeHoursQuestionMarkText + ret + +.OakTimeHoursQuestionMarkText: + text_far _OakTimeHoursQuestionMarkText + text_end + +OakTimeHowManyMinutesText: + text_far _OakTimeHowManyMinutesText + text_end + +String_min: + db "min.@" + +OakTimeWhoaMinutesText: + ; Whoa!@ @ + text_far _OakTimeWhoaMinutesText + text_asm + hlcoord 7, 14 + call DisplayMinutesWithMinString + ld hl, .OakTimeMinutesQuestionMarkText + ret + +.OakTimeMinutesQuestionMarkText: + text_far _OakTimeMinutesQuestionMarkText + text_end + +OakText_ResponseToSetTime: + text_asm + decoord 1, 14 + ld a, [wInitHourBuffer] + ld c, a + call PrintHour + ld [hl], ":" + inc hl + ld de, wInitMinuteBuffer + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ld b, h + ld c, l + ld a, [wInitHourBuffer] + cp MORN_HOUR + jr c, .nite + cp DAY_HOUR + 1 + jr c, .morn + cp NITE_HOUR + jr c, .day +.nite + ld hl, .OakTimeSoDarkText + ret +.morn + ld hl, .OakTimeOversleptText + ret +.day + ld hl, .OakTimeYikesText + ret + +.OakTimeOversleptText: + text_far _OakTimeOversleptText + text_end + +.OakTimeYikesText: + text_far _OakTimeYikesText + text_end + +.OakTimeSoDarkText: + text_far _OakTimeSoDarkText + text_end + +TimeSetBackgroundGFX: +INCBIN "gfx/new_game/timeset_bg.1bpp" +TimeSetUpArrowGFX: +INCBIN "gfx/new_game/up_arrow.1bpp" +TimeSetDownArrowGFX: +INCBIN "gfx/new_game/down_arrow.1bpp" + +SetDayOfWeek: + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + ld de, TimeSetUpArrowGFX + ld hl, vTiles0 tile TIMESET_UP_ARROW + lb bc, BANK(TimeSetUpArrowGFX), 1 + call Request1bpp + ld de, TimeSetDownArrowGFX + ld hl, vTiles0 tile TIMESET_DOWN_ARROW + lb bc, BANK(TimeSetDownArrowGFX), 1 + call Request1bpp + xor a + ld [wTempDayOfWeek], a +.loop + hlcoord 0, 12 + lb bc, 4, 18 + call Textbox + call LoadStandardMenuHeader + ld hl, .OakTimeWhatDayIsItText + call PrintText + hlcoord 9, 3 + ld b, 2 + ld c, 9 + call Textbox + hlcoord 14, 3 + ld [hl], TIMESET_UP_ARROW + hlcoord 14, 6 + ld [hl], TIMESET_DOWN_ARROW + hlcoord 10, 5 + call .PlaceWeekdayString + call ApplyTilemap + ld c, 10 + call DelayFrames +.loop2 + call JoyTextDelay + call .GetJoypadAction + jr nc, .loop2 + call ExitMenu + call UpdateSprites + ld hl, .ConfirmWeekdayText + call PrintText + call YesNoBox + jr c, .loop + ld a, [wTempDayOfWeek] + ld [wStringBuffer2], a + call InitDayOfWeek + call LoadStandardFont + pop af + ldh [hInMenu], a + ret + +.GetJoypadAction: + ldh a, [hJoyPressed] + and A_BUTTON + jr z, .not_A + scf + ret + +.not_A + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .d_up + ld a, [hl] + and D_DOWN + jr nz, .d_down + call DelayFrame + and a + ret + +.d_down + ld hl, wTempDayOfWeek + ld a, [hl] + and a + jr nz, .decrease + ld a, SATURDAY + 1 + +.decrease + dec a + ld [hl], a + jr .finish_dpad + +.d_up + ld hl, wTempDayOfWeek + ld a, [hl] + cp 6 + jr c, .increase + ld a, SUNDAY - 1 + +.increase + inc a + ld [hl], a + +.finish_dpad + xor a + ldh [hBGMapMode], a + hlcoord 10, 4 + ld b, 2 + ld c, 9 + call ClearBox + hlcoord 10, 5 + call .PlaceWeekdayString + call WaitBGMap + and a + ret + +.PlaceWeekdayString: + push hl + ld a, [wTempDayOfWeek] + ld e, a + ld d, 0 + ld hl, .WeekdayStrings + add hl, de + add hl, de + ld a, [hli] + ld d, [hl] + ld e, a + pop hl + call PlaceString + ret + +.WeekdayStrings: +; entries correspond to wCurDay constants (see constants/wram_constants.asm) + dw .Sunday + dw .Monday + dw .Tuesday + dw .Wednesday + dw .Thursday + dw .Friday + dw .Saturday + dw .Sunday + +.Sunday: db " SUNDAY@" +.Monday: db " MONDAY@" +.Tuesday: db " TUESDAY@" +.Wednesday: db "WEDNESDAY@" +.Thursday: db "THURSDAY@" +.Friday: db " FRIDAY@" +.Saturday: db "SATURDAY@" + +.OakTimeWhatDayIsItText: + text_far _OakTimeWhatDayIsItText + text_end + +.ConfirmWeekdayText: + text_asm + hlcoord 1, 14 + call .PlaceWeekdayString + ld hl, .OakTimeIsItText + ret + +.OakTimeIsItText: + text_far _OakTimeIsItText + text_end + +InitialSetDSTFlag: + ld a, [wDST] + set 7, a + ld [wDST], a + hlcoord 1, 14 + lb bc, 3, 18 + call ClearBox + ld hl, .Text + call PlaceHLTextAtBC + ret + +.Text: + text_asm + call UpdateTime + ldh a, [hHours] + ld b, a + ldh a, [hMinutes] + ld c, a + decoord 1, 14 + farcall PrintHoursMins + ld hl, .DSTIsThatOKText + ret + +.DSTIsThatOKText: + text_far _DSTIsThatOKText + text_end + +InitialClearDSTFlag: + ld a, [wDST] + res 7, a + ld [wDST], a + hlcoord 1, 14 + lb bc, 3, 18 + call ClearBox + ld hl, .Text + call PlaceHLTextAtBC + ret + +.Text: + text_asm + call UpdateTime + ldh a, [hHours] + ld b, a + ldh a, [hMinutes] + ld c, a + decoord 1, 14 + farcall PrintHoursMins + ld hl, .TimeAskOkayText + ret + +.TimeAskOkayText: + text_far _TimeAskOkayText + text_end + +MrChrono: ; unreferenced + hlcoord 1, 14 + lb bc, 3, SCREEN_WIDTH - 2 + call ClearBox + ld hl, .Text + call PlaceHLTextAtBC + ret + +.Text: + text_asm + call UpdateTime + + hlcoord 1, 14 + ld [hl], "R" + inc hl + ld [hl], "T" + inc hl + ld [hl], " " + inc hl + + ld de, hRTCDayLo + call .PrintTime + + hlcoord 1, 16 + ld [hl], "D" + inc hl + ld [hl], "F" + inc hl + ld [hl], " " + inc hl + + ld de, wStartDay + call .PrintTime + + ld [hl], " " + inc hl + + ld a, [wDST] + bit 7, a + jr z, .off + + ld [hl], "O" + inc hl + ld [hl], "N" + inc hl + jr .done + +.off + ld [hl], "O" + inc hl + ld [hl], "F" + inc hl + ld [hl], "F" + inc hl + +.done + ld hl, .NowOnDebug + ret + +.NowOnDebug: + text_start + para "Now on DEBUG…" + prompt + +.PrintTime: + lb bc, 1, 3 + call PrintNum + ld [hl], "." + inc hl + inc de + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ld [hl], ":" + inc hl + inc de + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ret + +PrintHour: + ld l, e + ld h, d + push bc + call GetTimeOfDayString + call PlaceString + ld l, c + ld h, b + inc hl + pop bc + call AdjustHourForAMorPM + ld [wTextDecimalByte], a + ld de, wTextDecimalByte + call PrintTwoDigitNumberLeftAlign + ret + +GetTimeOfDayString: + ld a, c + cp MORN_HOUR + jr c, .nite + cp DAY_HOUR + jr c, .morn + cp NITE_HOUR + jr c, .day +.nite + ld de, .nite_string + ret +.morn + ld de, .morn_string + ret +.day + ld de, .day_string + ret + +.nite_string: db "NITE@" +.morn_string: db "MORN@" +.day_string: db "DAY@" + +AdjustHourForAMorPM: +; Convert the hour stored in c (0-23) to a 1-12 value + ld a, c + or a + jr z, .midnight + cp NOON_HOUR + ret c + ret z + sub NOON_HOUR + ret + +.midnight + ld a, NOON_HOUR + ret diff --git a/engine/smallflag.asm b/engine/smallflag.asm new file mode 100644 index 0000000..316ae6a --- /dev/null +++ b/engine/smallflag.asm @@ -0,0 +1,71 @@ +SmallFarFlagAction: +; Perform action b on bit c in flag array hl. +; If checking a flag, check flag array d:hl unless d is 0. + +; For longer flag arrays, see FlagAction. + + push hl + push bc + +; Divide by 8 to get the byte we want. + push bc + srl c + srl c + srl c + ld b, 0 + add hl, bc + pop bc + +; Which bit we want from the byte + ld a, c + and 7 + ld c, a + +; Shift left until we can mask the bit + ld a, 1 + jr z, .shifted +.shift + add a + dec c + jr nz, .shift +.shifted + ld c, a + +; What are we doing to this flag? + dec b + jr z, .set ; 1 = SET_FLAG + dec b + jr z, .check ; 2 = CHECK_FLAG + ; 0 = RESET_FLAG + +; reset + ld a, c + cpl + and [hl] + ld [hl], a + jr .done + +.set + ld a, [hl] + or c + ld [hl], a + jr .done + +.check + ld a, d + cp 0 + jr nz, .farcheck + + ld a, [hl] + and c + jr .done + +.farcheck + call GetFarByte + and c + +.done + pop bc + pop hl + ld c, a + ret diff --git a/engine/tilesets/map_palettes.asm b/engine/tilesets/map_palettes.asm new file mode 100644 index 0000000..ff57ac8 --- /dev/null +++ b/engine/tilesets/map_palettes.asm @@ -0,0 +1,86 @@ +_SwapTextboxPalettes:: + hlcoord 0, 0 + decoord 0, 0, wAttrmap + ld b, SCREEN_HEIGHT +.loop + push bc + ld c, SCREEN_WIDTH +.innerloop + ld a, [hl] + push hl + srl a + jr c, .UpperNybble + ld hl, wTilesetPalettes + add [hl] + ld l, a + ld a, [wTilesetPalettes + 1] + adc 0 + ld h, a + ld a, [hl] + and $f + jr .next + +.UpperNybble: + ld hl, wTilesetPalettes + add [hl] + ld l, a + ld a, [wTilesetPalettes + 1] + adc 0 + ld h, a + ld a, [hl] + swap a + and $f + +.next + pop hl + ld [de], a + res 7, [hl] + inc hl + inc de + dec c + jr nz, .innerloop + pop bc + dec b + jr nz, .loop + ret + +_ScrollBGMapPalettes:: + ld hl, wBGMapBuffer + ld de, wBGMapPalBuffer +.loop + ld a, [hl] + push hl + srl a + jr c, .UpperNybble + +; .LowerNybble + ld hl, wTilesetPalettes + add [hl] + ld l, a + ld a, [wTilesetPalettes + 1] + adc 0 + ld h, a + ld a, [hl] + and $f + jr .next + +.UpperNybble: + ld hl, wTilesetPalettes + add [hl] + ld l, a + ld a, [wTilesetPalettes + 1] + adc 0 + ld h, a + ld a, [hl] + swap a + and $f + +.next + pop hl + ld [de], a + res 7, [hl] + inc hl + inc de + dec c + jr nz, .loop + ret diff --git a/engine/tilesets/mapgroup_roofs.asm b/engine/tilesets/mapgroup_roofs.asm new file mode 100644 index 0000000..9db5d64 --- /dev/null +++ b/engine/tilesets/mapgroup_roofs.asm @@ -0,0 +1,18 @@ +LoadMapGroupRoof:: + ld a, [wMapGroup] + ld e, a + ld d, 0 + ld hl, MapGroupRoofs + add hl, de + ld a, [hl] + cp -1 + ret z + ld hl, Roofs + ld bc, ROOF_LENGTH tiles + call AddNTimes + ld de, vTiles2 tile $0a + ld bc, ROOF_LENGTH tiles + call CopyBytes + ret + +INCLUDE "data/maps/roofs.asm" diff --git a/engine/tilesets/tileset_anims.asm b/engine/tilesets/tileset_anims.asm new file mode 100644 index 0000000..ca2a86a --- /dev/null +++ b/engine/tilesets/tileset_anims.asm @@ -0,0 +1,1049 @@ +_AnimateTileset:: +; Increment [hTileAnimFrame] and run that frame's function +; from the array pointed to by wTilesetAnim. + +; Called in WRAM bank 1, VRAM bank 0, so map tiles +; $80 and above in VRAM bank 1 cannot be animated +; without switching to that bank themselves. + + ld a, [wTilesetAnim] + ld e, a + ld a, [wTilesetAnim + 1] + ld d, a + + ldh a, [hTileAnimFrame] + ld l, a + inc a + ldh [hTileAnimFrame], a + + ld h, 0 + add hl, hl + add hl, hl + add hl, de + +; 2-byte parameter +; All functions take input de + ld e, [hl] + inc hl + ld d, [hl] + inc hl + +; Function address + ld a, [hli] + ld h, [hl] + ld l, a + + jp hl + +Tileset0Anim: +TilesetJohtoModernAnim: +TilesetKantoAnim: + dw vTiles2 tile $14, AnimateWaterTile + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, AnimateWaterPalette + dw NULL, WaitTileAnimation + dw NULL, AnimateFlowerTile + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, StandingTileFrame8 + dw NULL, DoneTileAnimation + +TilesetParkAnim: + dw vTiles2 tile $14, AnimateWaterTile + dw NULL, WaitTileAnimation + dw vTiles2 tile $5f, AnimateFountainTile + dw NULL, WaitTileAnimation + dw NULL, AnimateWaterPalette + dw NULL, WaitTileAnimation + dw NULL, AnimateFlowerTile + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, StandingTileFrame8 + dw NULL, DoneTileAnimation + +TilesetForestAnim: + dw NULL, ForestTreeLeftAnimation + dw NULL, ForestTreeRightAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, ForestTreeLeftAnimation2 + dw NULL, ForestTreeRightAnimation2 + dw NULL, AnimateFlowerTile + dw vTiles2 tile $14, AnimateWaterTile + dw NULL, AnimateWaterPalette + dw NULL, StandingTileFrame8 + dw NULL, DoneTileAnimation + +TilesetJohtoAnim: + dw vTiles2 tile $14, AnimateWaterTile + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, AnimateWaterPalette + dw NULL, WaitTileAnimation + dw NULL, AnimateFlowerTile + dw WhirlpoolFrames1, AnimateWhirlpoolTile + dw WhirlpoolFrames2, AnimateWhirlpoolTile + dw WhirlpoolFrames3, AnimateWhirlpoolTile + dw WhirlpoolFrames4, AnimateWhirlpoolTile + dw NULL, WaitTileAnimation + dw NULL, StandingTileFrame8 + dw NULL, DoneTileAnimation + +UnusedTilesetAnim1: ; unreferenced +; Scrolls tile $03 like cave water, but also has the standard $03 flower tile. + dw vTiles2 tile $03, ReadTileToAnimBuffer + dw wTileAnimBuffer, ScrollTileRightLeft + dw vTiles2 tile $03, WriteTileFromAnimBuffer + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, AnimateFlowerTile + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, DoneTileAnimation + +UnusedTilesetAnim2: ; unreferenced +; Scrolls tile $14 like cave water. + dw vTiles2 tile $14, ReadTileToAnimBuffer + dw wTileAnimBuffer, ScrollTileRightLeft + dw vTiles2 tile $14, WriteTileFromAnimBuffer + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, DoneTileAnimation + +TilesetPortAnim: + dw vTiles2 tile $14, AnimateWaterTile + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, AnimateWaterPalette + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, StandingTileFrame8 + dw NULL, DoneTileAnimation + +TilesetEliteFourRoomAnim: + dw NULL, AnimateLavaBubbleTile2 + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, AnimateLavaBubbleTile1 + dw NULL, WaitTileAnimation + dw NULL, StandingTileFrame8 + dw NULL, DoneTileAnimation + +UnusedTilesetAnim3: ; unreferenced +; Scrolls tile $53 like a waterfall; scrolls tile $03 like cave water. + dw vTiles2 tile $53, ReadTileToAnimBuffer + dw wTileAnimBuffer, ScrollTileDown + dw wTileAnimBuffer, ScrollTileDown + dw vTiles2 tile $53, WriteTileFromAnimBuffer + dw vTiles2 tile $03, ReadTileToAnimBuffer + dw wTileAnimBuffer, ScrollTileRightLeft + dw vTiles2 tile $03, WriteTileFromAnimBuffer + dw vTiles2 tile $53, ReadTileToAnimBuffer + dw wTileAnimBuffer, ScrollTileDown + dw wTileAnimBuffer, ScrollTileDown + dw vTiles2 tile $53, WriteTileFromAnimBuffer + dw NULL, DoneTileAnimation + +UnusedTilesetAnim4: ; unreferenced +; Scrolls tile $54 like a waterfall; scrolls tile $03 like cave water. + dw vTiles2 tile $54, ReadTileToAnimBuffer + dw wTileAnimBuffer, ScrollTileDown + dw wTileAnimBuffer, ScrollTileDown + dw vTiles2 tile $54, WriteTileFromAnimBuffer + dw NULL, WaitTileAnimation + dw vTiles2 tile $03, ReadTileToAnimBuffer + dw wTileAnimBuffer, ScrollTileRightLeft + dw vTiles2 tile $03, WriteTileFromAnimBuffer + dw NULL, WaitTileAnimation + dw vTiles2 tile $54, ReadTileToAnimBuffer + dw wTileAnimBuffer, ScrollTileDown + dw wTileAnimBuffer, ScrollTileDown + dw vTiles2 tile $54, WriteTileFromAnimBuffer + dw NULL, DoneTileAnimation + +TilesetCaveAnim: +TilesetDarkCaveAnim: + dw vTiles2 tile $14, ReadTileToAnimBuffer + dw NULL, FlickeringCaveEntrancePalette + dw wTileAnimBuffer, ScrollTileRightLeft + dw NULL, FlickeringCaveEntrancePalette + dw vTiles2 tile $14, WriteTileFromAnimBuffer + dw NULL, FlickeringCaveEntrancePalette + dw NULL, AnimateWaterPalette + dw NULL, FlickeringCaveEntrancePalette + dw vTiles2 tile $40, ReadTileToAnimBuffer + dw NULL, FlickeringCaveEntrancePalette + dw wTileAnimBuffer, ScrollTileDown + dw NULL, FlickeringCaveEntrancePalette + dw wTileAnimBuffer, ScrollTileDown + dw NULL, FlickeringCaveEntrancePalette + dw wTileAnimBuffer, ScrollTileDown + dw NULL, FlickeringCaveEntrancePalette + dw vTiles2 tile $40, WriteTileFromAnimBuffer + dw NULL, FlickeringCaveEntrancePalette + dw NULL, DoneTileAnimation + +TilesetIcePathAnim: + dw vTiles2 tile $35, ReadTileToAnimBuffer + dw NULL, FlickeringCaveEntrancePalette + dw wTileAnimBuffer, ScrollTileRightLeft + dw NULL, FlickeringCaveEntrancePalette + dw vTiles2 tile $35, WriteTileFromAnimBuffer + dw NULL, FlickeringCaveEntrancePalette + dw NULL, AnimateWaterPalette + dw NULL, FlickeringCaveEntrancePalette + dw vTiles2 tile $31, ReadTileToAnimBuffer + dw NULL, FlickeringCaveEntrancePalette + dw wTileAnimBuffer, ScrollTileDown + dw NULL, FlickeringCaveEntrancePalette + dw wTileAnimBuffer, ScrollTileDown + dw NULL, FlickeringCaveEntrancePalette + dw wTileAnimBuffer, ScrollTileDown + dw NULL, FlickeringCaveEntrancePalette + dw vTiles2 tile $31, WriteTileFromAnimBuffer + dw NULL, FlickeringCaveEntrancePalette + dw NULL, DoneTileAnimation + +TilesetTowerAnim: + dw TowerPillarTilePointer9, AnimateTowerPillarTile + dw TowerPillarTilePointer10, AnimateTowerPillarTile + dw TowerPillarTilePointer7, AnimateTowerPillarTile + dw TowerPillarTilePointer8, AnimateTowerPillarTile + dw TowerPillarTilePointer5, AnimateTowerPillarTile + dw TowerPillarTilePointer6, AnimateTowerPillarTile + dw TowerPillarTilePointer3, AnimateTowerPillarTile + dw TowerPillarTilePointer4, AnimateTowerPillarTile + dw TowerPillarTilePointer1, AnimateTowerPillarTile + dw TowerPillarTilePointer2, AnimateTowerPillarTile + dw NULL, StandingTileFrame + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, DoneTileAnimation + +UnusedTilesetAnim5: ; unreferenced +; Scrolls tile $4f like cave water. + dw vTiles2 tile $4f, ReadTileToAnimBuffer + dw wTileAnimBuffer, ScrollTileRightLeft + dw vTiles2 tile $4f, WriteTileFromAnimBuffer + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, DoneTileAnimation + +TilesetBattleTowerOutsideAnim: +TilesetHouseAnim: +TilesetPlayersHouseAnim: +TilesetPokecenterAnim: +TilesetGateAnim: +TilesetLabAnim: +TilesetFacilityAnim: +TilesetMartAnim: +TilesetMansionAnim: +TilesetGameCornerAnim: +TilesetTraditionalHouseAnim: +TilesetTrainStationAnim: +TilesetChampionsRoomAnim: +TilesetLighthouseAnim: +TilesetPlayersRoomAnim: +TilesetPokeComCenterAnim: +TilesetBattleTowerInsideAnim: +TilesetRuinsOfAlphAnim: +TilesetRadioTowerAnim: +TilesetUndergroundAnim: +TilesetBetaWordRoomAnim: +TilesetHoOhWordRoomAnim: +TilesetKabutoWordRoomAnim: +TilesetOmanyteWordRoomAnim: +TilesetAerodactylWordRoomAnim: + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, WaitTileAnimation + dw NULL, DoneTileAnimation + +DoneTileAnimation: +; Reset the animation command loop. + xor a + ldh [hTileAnimFrame], a + +WaitTileAnimation: +; Do nothing this frame. + ret + +StandingTileFrame8: +; Tick the wTileAnimationTimer, wrapping from 7 to 0. + ld a, [wTileAnimationTimer] + inc a + and %111 + ld [wTileAnimationTimer], a + ret + +ScrollTileRightLeft: +; Scroll right for 4 ticks, then left for 4 ticks. + ld a, [wTileAnimationTimer] + inc a + and %111 + ld [wTileAnimationTimer], a + and %100 + jr nz, ScrollTileLeft + jr ScrollTileRight + +ScrollTileUpDown: ; unreferenced +; Scroll up for 4 ticks, then down for 4 ticks. + ld a, [wTileAnimationTimer] + inc a + and %111 + ld [wTileAnimationTimer], a + and %100 + jr nz, ScrollTileDown + jr ScrollTileUp + +ScrollTileLeft: + ld h, d + ld l, e + ld c, LEN_2BPP_TILE / 4 +.loop +rept 4 + ld a, [hl] + rlca + ld [hli], a +endr + dec c + jr nz, .loop + ret + +ScrollTileRight: + ld h, d + ld l, e + ld c, LEN_2BPP_TILE / 4 +.loop +rept 4 + ld a, [hl] + rrca + ld [hli], a +endr + dec c + jr nz, .loop + ret + +ScrollTileUp: + ld h, d + ld l, e + ld d, [hl] + inc hl + ld e, [hl] + ld bc, LEN_2BPP_TILE - 2 + add hl, bc + ld a, LEN_2BPP_TILE / 4 +.loop + ld c, [hl] + ld [hl], e + dec hl + ld b, [hl] + ld [hl], d + dec hl + ld e, [hl] + ld [hl], c + dec hl + ld d, [hl] + ld [hl], b + dec hl + dec a + jr nz, .loop + ret + +ScrollTileDown: + ld h, d + ld l, e + ld de, LEN_2BPP_TILE - 2 + push hl + add hl, de + ld d, [hl] + inc hl + ld e, [hl] + pop hl + ld a, LEN_2BPP_TILE / 4 +.loop + ld b, [hl] + ld [hl], d + inc hl + ld c, [hl] + ld [hl], e + inc hl + ld d, [hl] + ld [hl], b + inc hl + ld e, [hl] + ld [hl], c + inc hl + dec a + jr nz, .loop + ret + +AnimateFountainTile: +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + + ld hl, .FountainTileFramePointers + +; A cycle of 8 frames, updating every tick + ld a, [wTileAnimationTimer] + and %111 + +; hl = [.FountainTileFramePointers + a * 2] + add a + add l + ld l, a + jr nc, .okay + inc h +.okay + ld a, [hli] + ld h, [hl] + ld l, a + +; Write the tile graphic from hl (now sp) to de (now hl) + ld sp, hl + ld l, e + ld h, d + jp WriteTile + +.FountainTileFramePointers: + dw .FountainTile1 + dw .FountainTile2 + dw .FountainTile3 + dw .FountainTile4 + dw .FountainTile3 + dw .FountainTile4 + dw .FountainTile5 + dw .FountainTile1 + +.FountainTile1: INCBIN "gfx/tilesets/fountain/1.2bpp" +.FountainTile2: INCBIN "gfx/tilesets/fountain/2.2bpp" +.FountainTile3: INCBIN "gfx/tilesets/fountain/3.2bpp" +.FountainTile4: INCBIN "gfx/tilesets/fountain/4.2bpp" +.FountainTile5: INCBIN "gfx/tilesets/fountain/5.2bpp" + +AnimateWaterTile: +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + +; A cycle of 4 frames, updating every other tick + ld a, [wTileAnimationTimer] + and %110 + +; hl = .WaterTileFrames + a * 8 +; (a was pre-multiplied by 2 from 'and %110') + add a + add a + add a + add LOW(.WaterTileFrames) + ld l, a + ld a, 0 + adc HIGH(.WaterTileFrames) + ld h, a + +; Write the tile graphic from hl (now sp) to de (now hl) + ld sp, hl + ld l, e + ld h, d + jp WriteTile + +.WaterTileFrames: + INCBIN "gfx/tilesets/water/water.2bpp" + +ForestTreeLeftAnimation: +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + +; Only animate this during the Celebi event + ld a, [wCelebiEvent] + bit CELEBIEVENT_FOREST_IS_RESTLESS_F, a + jr nz, .do_animation + ld hl, ForestTreeLeftFrames + jr .got_frames + +.do_animation +; A cycle of 2 frames, updating every tick + ld a, [wTileAnimationTimer] + call GetForestTreeFrame + +; hl = ForestTreeLeftFrames + a * 8 +; (a was pre-multiplied by 2 from GetForestTreeFrame) + add a + add a + add a + add LOW(ForestTreeLeftFrames) + ld l, a + ld a, 0 + adc HIGH(ForestTreeLeftFrames) + ld h, a + +.got_frames +; Write the tile graphic from hl (now sp) to tile $0c (now hl) + ld sp, hl + ld hl, vTiles2 tile $0c + jp WriteTile + +ForestTreeLeftFrames: + INCBIN "gfx/tilesets/forest-tree/1.2bpp" + INCBIN "gfx/tilesets/forest-tree/2.2bpp" + +ForestTreeRightFrames: + INCBIN "gfx/tilesets/forest-tree/3.2bpp" + INCBIN "gfx/tilesets/forest-tree/4.2bpp" + +ForestTreeRightAnimation: +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + +; Only animate this during the Celebi event + ld a, [wCelebiEvent] + bit CELEBIEVENT_FOREST_IS_RESTLESS_F, a + jr nz, .do_animation + ld hl, ForestTreeRightFrames + jr .got_frames + +.do_animation +; A cycle of 2 frames, updating every tick + ld a, [wTileAnimationTimer] + call GetForestTreeFrame + +; hl = ForestTreeRightFrames + a * 8 +; (a was pre-multiplied by 2 from GetForestTreeFrame) + add a + add a + add a + add LOW(ForestTreeLeftFrames) + ld l, a + ld a, 0 + adc HIGH(ForestTreeLeftFrames) + ld h, a + push bc + ld bc, ForestTreeRightFrames - ForestTreeLeftFrames + add hl, bc + pop bc + +.got_frames +; Write the tile graphic from hl (now sp) to tile $0f (now hl) + ld sp, hl + ld hl, vTiles2 tile $0f + jp WriteTile + +ForestTreeLeftAnimation2: +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + +; Only animate this during the Celebi event + ld a, [wCelebiEvent] + bit CELEBIEVENT_FOREST_IS_RESTLESS_F, a + jr nz, .do_animation + ld hl, ForestTreeLeftFrames + jr .got_frames + +.do_animation +; A cycle of 2 frames, updating every tick + ld a, [wTileAnimationTimer] + call GetForestTreeFrame + +; Offset by 1 frame from ForestTreeLeftAnimation + xor %10 + +; hl = ForestTreeLeftFrames + a * 8 +; (a was pre-multiplied by 2 from GetForestTreeFrame) + add a + add a + add a + add LOW(ForestTreeLeftFrames) + ld l, a + ld a, 0 + adc HIGH(ForestTreeLeftFrames) + ld h, a + +.got_frames +; Write the tile graphic from hl (now sp) to tile $0c (now hl) + ld sp, hl + ld hl, vTiles2 tile $0c + jp WriteTile + +ForestTreeRightAnimation2: +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + +; Only animate this during the Celebi event + ld a, [wCelebiEvent] + bit CELEBIEVENT_FOREST_IS_RESTLESS_F, a + jr nz, .do_animation + ld hl, ForestTreeRightFrames + jr .got_frames + +.do_animation +; A cycle of 2 frames, updating every tick + ld a, [wTileAnimationTimer] + call GetForestTreeFrame + +; Offset by 1 frame from ForestTreeRightAnimation + xor %10 + +; hl = ForestTreeRightFrames + a * 8 +; (a was pre-multiplied by 2 from GetForestTreeFrame) + add a + add a + add a + add LOW(ForestTreeLeftFrames) + ld l, a + ld a, 0 + adc HIGH(ForestTreeLeftFrames) + ld h, a + push bc + ld bc, ForestTreeRightFrames - ForestTreeLeftFrames + add hl, bc + pop bc + +.got_frames +; Write the tile graphic from hl (now sp) to tile $0f (now hl) + ld sp, hl + ld hl, vTiles2 tile $0f + jp WriteTile + +GetForestTreeFrame: +; Return 0 if a is even, or 2 if odd. + and a + jr z, .even + cp 1 + jr z, .odd + cp 2 + jr z, .even + cp 3 + jr z, .odd + cp 4 + jr z, .even + cp 5 + jr z, .odd + cp 6 + jr z, .even +.odd + ld a, 2 + scf + ret +.even + xor a + ret + +AnimateFlowerTile: +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + +; A cycle of 2 frames, updating every other tick + ld a, [wTileAnimationTimer] + and %10 + +; CGB has different tile graphics for flowers + ld e, a + ldh a, [hCGB] + and 1 + add e + +; hl = .FlowerTileFrames + a * 16 + swap a + ld e, a + ld d, 0 + ld hl, .FlowerTileFrames + add hl, de + +; Write the tile graphic from hl (now sp) to tile $03 (now hl) + ld sp, hl + ld hl, vTiles2 tile $03 + jp WriteTile + +.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" + +AnimateLavaBubbleTile1: +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + +; A cycle of 4 frames, updating every other tick + ld a, [wTileAnimationTimer] + and %110 + +; Offset by 2 frames from AnimateLavaBubbleTile2 + srl a + inc a + inc a + and %011 + +; hl = LavaBubbleTileFrames + a * 16 + swap a + ld e, a + ld d, 0 + ld hl, LavaBubbleTileFrames + add hl, de + +; Write the tile graphic from hl (now sp) to tile $5b (now hl) + ld sp, hl + ld hl, vTiles2 tile $5b + jp WriteTile + +AnimateLavaBubbleTile2: +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + +; A cycle of 4 frames, updating every other tick + ld a, [wTileAnimationTimer] + and %110 + +; hl = LavaBubbleTileFrames + a * 8 +; (a was pre-multiplied by 2 from 'and %110') + add a + add a + add a + ld e, a + ld d, 0 + ld hl, LavaBubbleTileFrames + add hl, de + +; Write the tile graphic from hl (now sp) to tile $38 (now hl) + ld sp, hl + ld hl, vTiles2 tile $38 + jp WriteTile + +LavaBubbleTileFrames: + INCBIN "gfx/tilesets/lava/1.2bpp" + INCBIN "gfx/tilesets/lava/2.2bpp" + INCBIN "gfx/tilesets/lava/3.2bpp" + INCBIN "gfx/tilesets/lava/4.2bpp" + +AnimateTowerPillarTile: +; Input de points to the destination in VRAM, then the source tile frames + +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + +; A cycle of 8 frames, updating every tick + ld a, [wTileAnimationTimer] + and %111 + +; a = [.TowerPillarTileFrameOffsets + a] + ld hl, .TowerPillarTileFrameOffsets + add l + ld l, a + ld a, 0 + adc h + ld h, a + ld a, [hl] + +; de = the destination in VRAM + ld l, e + ld h, d + ld e, [hl] + inc hl + ld d, [hl] + inc hl + +; hl = the source tile frames + offset a + add [hl] + inc hl + ld h, [hl] + ld l, a + ld a, 0 + adc h + ld h, a + +; Write the tile graphic from hl (now sp) to de (now hl) + ld sp, hl + ld l, e + ld h, d + jr WriteTile + +.TowerPillarTileFrameOffsets: + db 0 tiles + db 1 tiles + db 2 tiles + db 3 tiles + db 4 tiles + db 3 tiles + db 2 tiles + db 1 tiles + +StandingTileFrame: +; Tick the wTileAnimationTimer. + ld hl, wTileAnimationTimer + inc [hl] + ret + +AnimateWhirlpoolTile: +; Input de points to the destination in VRAM, then the source tile frames + +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + +; de = the destination in VRAM + ld l, e + ld h, d + ld e, [hl] + inc hl + ld d, [hl] + inc hl + +; A cycle of 4 frames, updating every tick + ld a, [wTileAnimationTimer] + and %11 + +; hl = the source tile frames + a * 16 + swap a + add [hl] + inc hl + ld h, [hl] + ld l, a + ld a, 0 + adc h + ld h, a + +; Write the tile graphic from hl (now sp) to de (now hl) + ld sp, hl + ld l, e + ld h, d + jr WriteTile + +WriteTileFromAnimBuffer: +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + +; Write the tile graphic from wTileAnimBuffer (now sp) to de (now hl) + ld hl, wTileAnimBuffer + ld sp, hl + ld h, d + ld l, e + jr WriteTile + +ReadTileToAnimBuffer: +; Save the stack pointer in bc for WriteTile to restore + ld hl, sp+0 + ld b, h + ld c, l + +; Write the tile graphic from de (now sp) to wTileAnimBuffer (now hl) + ld h, d + ld l, e + ld sp, hl + ld hl, wTileAnimBuffer + ; fallthrough + +WriteTile: +; Write one tile from sp to hl. +; The stack pointer has been saved in bc. + +; This function cannot be called, only jumped to, +; because it relocates the stack pointer to quickly +; copy data with a "pop slide". + + pop de + ld [hl], e + inc hl + ld [hl], d +rept (LEN_2BPP_TILE - 2) / 2 + pop de + inc hl + ld [hl], e + inc hl + ld [hl], d +endr + +; Restore the stack pointer from bc + ld h, b + ld l, c + ld sp, hl + ret + +AnimateWaterPalette: +; Transition between color values 0-2 for color 0 in palette 3. + +; Don't update the palette on DMG + ldh a, [hCGB] + and a + ret z + +; Don't update a non-standard palette order + ldh a, [rBGP] + cp %11100100 + ret nz + +; Only update on even ticks + ld a, [wTileAnimationTimer] + ld l, a + and 1 ; odd + ret nz + +; Ready for BGPD input + ld a, (1 << rBGPI_AUTO_INCREMENT) palette PAL_BG_WATER color 0 + ldh [rBGPI], a + + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + +; A cycle of 4 colors (0 1 2 1), updating every other tick + ld a, l + and %110 + jr z, .color0 + cp %100 + jr z, .color2 + +; Copy one color from hl to rBGPI via rBGPD + +; color1 + ld hl, wBGPals1 palette PAL_BG_WATER color 1 + ld a, [hli] + ldh [rBGPD], a + ld a, [hli] + ldh [rBGPD], a + jr .end + +.color0 + ld hl, wBGPals1 palette PAL_BG_WATER color 0 + ld a, [hli] + ldh [rBGPD], a + ld a, [hli] + ldh [rBGPD], a + jr .end + +.color2 + ld hl, wBGPals1 palette PAL_BG_WATER color 2 + ld a, [hli] + ldh [rBGPD], a + ld a, [hli] + ldh [rBGPD], a + +.end + pop af + ldh [rSVBK], a + ret + +FlickeringCaveEntrancePalette: +; Don't update the palette on DMG + ldh a, [hCGB] + and a + ret z + +; Don't update a non-standard palette order + ldh a, [rBGP] + cp %11100100 + ret nz + +; We only want to be here if we're in a dark cave. + ld a, [wTimeOfDayPalset] + cp DARKNESS_PALSET + ret nz + + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + +; Ready for BGPD input + ld a, (1 << rBGPI_AUTO_INCREMENT) palette PAL_BG_YELLOW color 0 + ldh [rBGPI], a + +; A cycle of 2 colors (0 2), updating every other vblank + ldh a, [hVBlankCounter] + and %10 + jr nz, .color1 + +; Copy one color from hl to rBGPI via rBGPD + +; color0 + ld hl, wBGPals1 palette PAL_BG_YELLOW color 0 + jr .okay + +.color1 + ld hl, wBGPals1 palette PAL_BG_YELLOW color 1 + +.okay + ld a, [hli] + ldh [rBGPD], a + ld a, [hli] + ldh [rBGPD], a + + pop af + ldh [rSVBK], a + ret + +TowerPillarTilePointer1: dw vTiles2 tile $2d, TowerPillarTile1 +TowerPillarTilePointer2: dw vTiles2 tile $2f, TowerPillarTile2 +TowerPillarTilePointer3: dw vTiles2 tile $3d, TowerPillarTile3 +TowerPillarTilePointer4: dw vTiles2 tile $3f, TowerPillarTile4 +TowerPillarTilePointer5: dw vTiles2 tile $3c, TowerPillarTile5 +TowerPillarTilePointer6: dw vTiles2 tile $2c, TowerPillarTile6 +TowerPillarTilePointer7: dw vTiles2 tile $4d, TowerPillarTile7 +TowerPillarTilePointer8: dw vTiles2 tile $4f, TowerPillarTile8 +TowerPillarTilePointer9: dw vTiles2 tile $5d, TowerPillarTile9 +TowerPillarTilePointer10: dw vTiles2 tile $5f, TowerPillarTile10 + +TowerPillarTile1: INCBIN "gfx/tilesets/tower-pillar/1.2bpp" +TowerPillarTile2: INCBIN "gfx/tilesets/tower-pillar/2.2bpp" +TowerPillarTile3: INCBIN "gfx/tilesets/tower-pillar/3.2bpp" +TowerPillarTile4: INCBIN "gfx/tilesets/tower-pillar/4.2bpp" +TowerPillarTile5: INCBIN "gfx/tilesets/tower-pillar/5.2bpp" +TowerPillarTile6: INCBIN "gfx/tilesets/tower-pillar/6.2bpp" +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" + +WhirlpoolFrames1: dw vTiles2 tile $32, WhirlpoolTiles1 +WhirlpoolFrames2: dw vTiles2 tile $33, WhirlpoolTiles2 +WhirlpoolFrames3: dw vTiles2 tile $42, WhirlpoolTiles3 +WhirlpoolFrames4: dw vTiles2 tile $43, WhirlpoolTiles4 + +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" diff --git a/engine/tilesets/tileset_palettes.asm b/engine/tilesets/tileset_palettes.asm new file mode 100644 index 0000000..9941022 --- /dev/null +++ b/engine/tilesets/tileset_palettes.asm @@ -0,0 +1,137 @@ +LoadSpecialMapPalette: + ld a, [wMapTileset] + cp TILESET_POKECOM_CENTER + jr z, .pokecom_2f + cp TILESET_BATTLE_TOWER_INSIDE + jr z, .battle_tower_inside + cp TILESET_ICE_PATH + jr z, .ice_path + cp TILESET_HOUSE + jr z, .house + cp TILESET_RADIO_TOWER + jr z, .radio_tower + cp TILESET_MANSION + jr z, .mansion_mobile + jr .do_nothing + +.pokecom_2f + call LoadPokeComPalette + scf + ret + +.battle_tower_inside + call LoadBattleTowerInsidePalette + scf + ret + +.ice_path + ld a, [wEnvironment] + and $7 + cp INDOOR ; Hall of Fame + jr z, .do_nothing + call LoadIcePathPalette + scf + ret + +.house + call LoadHousePalette + scf + ret + +.radio_tower + call LoadRadioTowerPalette + scf + ret + +.mansion_mobile + call LoadMansionPalette + scf + ret + +.do_nothing + and a + ret + +LoadPokeComPalette: + ld a, BANK(wBGPals1) + ld de, wBGPals1 + ld hl, PokeComPalette + ld bc, 8 palettes + call FarCopyWRAM + ret + +PokeComPalette: +INCLUDE "gfx/tilesets/pokecom_center.pal" + +LoadBattleTowerInsidePalette: + ld a, BANK(wBGPals1) + ld de, wBGPals1 + ld hl, BattleTowerInsidePalette + ld bc, 8 palettes + call FarCopyWRAM + ret + +BattleTowerInsidePalette: +INCLUDE "gfx/tilesets/battle_tower_inside.pal" + +LoadIcePathPalette: + ld a, BANK(wBGPals1) + ld de, wBGPals1 + ld hl, IcePathPalette + ld bc, 8 palettes + call FarCopyWRAM + ret + +IcePathPalette: +INCLUDE "gfx/tilesets/ice_path.pal" + +LoadHousePalette: + ld a, BANK(wBGPals1) + ld de, wBGPals1 + ld hl, HousePalette + ld bc, 8 palettes + call FarCopyWRAM + ret + +HousePalette: +INCLUDE "gfx/tilesets/house.pal" + +LoadRadioTowerPalette: + ld a, BANK(wBGPals1) + ld de, wBGPals1 + ld hl, RadioTowerPalette + ld bc, 8 palettes + call FarCopyWRAM + ret + +RadioTowerPalette: +INCLUDE "gfx/tilesets/radio_tower.pal" + +MansionPalette1: +INCLUDE "gfx/tilesets/mansion_1.pal" + +LoadMansionPalette: + ld a, BANK(wBGPals1) + ld de, wBGPals1 + ld hl, MansionPalette1 + ld bc, 8 palettes + call FarCopyWRAM + ld a, BANK(wBGPals1) + ld de, wBGPals1 palette PAL_BG_YELLOW + ld hl, MansionPalette2 + ld bc, 1 palettes + call FarCopyWRAM + ld a, BANK(wBGPals1) + ld de, wBGPals1 palette PAL_BG_WATER + ld hl, MansionPalette1 palette 6 + ld bc, 1 palettes + call FarCopyWRAM + ld a, BANK(wBGPals1) + ld de, wBGPals1 palette PAL_BG_ROOF + ld hl, MansionPalette1 palette 8 + ld bc, 1 palettes + call FarCopyWRAM + ret + +MansionPalette2: +INCLUDE "gfx/tilesets/mansion_2.pal" diff --git a/engine/tilesets/timeofday_pals.asm b/engine/tilesets/timeofday_pals.asm new file mode 100644 index 0000000..214d2f7 --- /dev/null +++ b/engine/tilesets/timeofday_pals.asm @@ -0,0 +1,384 @@ +DummyPredef35: +DummyPredef36: + ret + +UpdateTimeOfDayPal:: + call UpdateTime + ld a, [wTimeOfDay] + ld [wCurTimeOfDay], a + call GetTimePalette + ld [wTimeOfDayPal], a + ret + +_TimeOfDayPals:: +; return carry if pals are changed + +; forced pals? + ld hl, wTimeOfDayPalFlags + bit 7, [hl] + jr nz, .dontchange + +; do we need to bother updating? + ld a, [wTimeOfDay] + ld hl, wCurTimeOfDay + cp [hl] + jr z, .dontchange + +; if so, the time of day has changed + ld a, [wTimeOfDay] + ld [wCurTimeOfDay], a + +; get palette id + call GetTimePalette + +; same palette as before? + ld hl, wTimeOfDayPal + cp [hl] + jr z, .dontchange + +; update palette id + ld [wTimeOfDayPal], a + +; save bg palette 7 + ld hl, wBGPals1 palette PAL_BG_TEXT + +; save wram bank + ldh a, [rSVBK] + ld b, a + + ld a, BANK(wBGPals1) + ldh [rSVBK], a + +; push palette + ld c, NUM_PAL_COLORS +.push + ld d, [hl] + inc hl + ld e, [hl] + inc hl + push de + dec c + jr nz, .push + +; restore wram bank + ld a, b + ldh [rSVBK], a + +; update sgb pals + ld b, SCGB_MAPPALS + call GetSGBLayout + +; restore bg palette 7 + ld hl, wOBPals1 - 1 ; last byte in wBGPals1 + +; save wram bank + ldh a, [rSVBK] + ld d, a + + ld a, BANK(wOBPals1) + ldh [rSVBK], a + +; pop palette + ld e, NUM_PAL_COLORS +.pop + pop bc + ld [hl], c + dec hl + ld [hl], b + dec hl + dec e + jr nz, .pop + +; restore wram bank + ld a, d + ldh [rSVBK], a + +; update palettes + call _UpdateTimePals + call DelayFrame + +; successful change + scf + ret + +.dontchange +; no change occurred + and a + ret + +_UpdateTimePals:: + ld c, $9 ; normal + call GetTimePalFade + call DmgToCgbTimePals + ret + +FadeInPalettes:: + ld c, $12 + call GetTimePalFade + ld b, $4 + call ConvertTimePalsDecHL + ret + +FadeOutPalettes:: + call FillWhiteBGColor + ld c, $9 + call GetTimePalFade + ld b, $4 + call ConvertTimePalsIncHL + ret + +BattleTowerFade: + call FillWhiteBGColor + ld c, $9 + call GetTimePalFade + ld b, $4 +.loop + call DmgToCgbTimePals + inc hl + inc hl + inc hl + ld c, $7 + call DelayFrames + dec b + jr nz, .loop + ret + +FadeInQuickly: + ld c, $0 + call GetTimePalFade + ld b, $4 + call ConvertTimePalsIncHL + ret + +FadeBlackQuickly: + ld c, $9 + call GetTimePalFade + ld b, $4 + call ConvertTimePalsDecHL + ret + +FillWhiteBGColor: + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + + ld hl, wBGPals1 + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld hl, wBGPals1 + 1 palettes + ld c, 6 +.loop + ld a, e + ld [hli], a + ld a, d + ld [hli], a +rept 6 + inc hl +endr + dec c + jr nz, .loop + + pop af + ldh [rSVBK], a + ret + +ReplaceTimeOfDayPals: + ld hl, .BrightnessLevels + ld a, [wMapTimeOfDay] + cp PALETTE_DARK + jr z, .NeedsFlash + maskbits NUM_MAP_PALETTES + add l + ld l, a + ld a, 0 + adc h + ld h, a + ld a, [hl] + ld [wTimeOfDayPalset], a + ret + +.NeedsFlash: + ld a, [wStatusFlags] + bit STATUSFLAGS_FLASH_F, a + jr nz, .UsedFlash + ld a, DARKNESS_PALSET + ld [wTimeOfDayPalset], a + ret + +.UsedFlash: + ld a, (NITE_F << 6) | (NITE_F << 4) | (NITE_F << 2) | NITE_F + ld [wTimeOfDayPalset], a + ret + +.BrightnessLevels: +; actual palettes used when time is +; DARKNESS_F, NITE_F, DAY_F, MORN_F + dc DARKNESS_F, NITE_F, DAY_F, MORN_F ; PALETTE_AUTO + dc DAY_F, DAY_F, DAY_F, DAY_F ; PALETTE_DAY + dc NITE_F, NITE_F, NITE_F, NITE_F ; PALETTE_NITE + dc MORN_F, MORN_F, MORN_F, MORN_F ; PALETTE_MORN + dc DARKNESS_F, DARKNESS_F, DARKNESS_F, DARKNESS_F ; PALETTE_DARK + dc DARKNESS_F, NITE_F, DAY_F, MORN_F + dc DARKNESS_F, NITE_F, DAY_F, MORN_F + dc DARKNESS_F, NITE_F, DAY_F, MORN_F + +GetTimePalette: + jumptable .TimePalettes, wTimeOfDay + +.TimePalettes: + dw .MorningPalette ; MORN_F + dw .DayPalette ; DAY_F + dw .NitePalette ; NITE_F + dw .DarknessPalette ; DARKNESS_F + +.MorningPalette: + ld a, [wTimeOfDayPalset] + and %00000011 + ret + +.DayPalette: + ld a, [wTimeOfDayPalset] + and %00001100 + srl a + srl a + ret + +.NitePalette: + ld a, [wTimeOfDayPalset] + and %00110000 + swap a + ret + +.DarknessPalette: + ld a, [wTimeOfDayPalset] + and %11000000 + rlca + rlca + ret + +DmgToCgbTimePals: + push hl + push de + ld a, [hli] + call DmgToCgbBGPals + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + call DmgToCgbObjPals + pop de + pop hl + ret + +ConvertTimePalsIncHL: +.loop + call DmgToCgbTimePals + inc hl + inc hl + inc hl + ld c, 2 + call DelayFrames + dec b + jr nz, .loop + ret + +ConvertTimePalsDecHL: +.loop + call DmgToCgbTimePals + dec hl + dec hl + dec hl + ld c, 2 + call DelayFrames + dec b + jr nz, .loop + ret + +GetTimePalFade: +; check cgb + ldh a, [hCGB] + and a + jr nz, .cgb + +; else: dmg + +; index + ld a, [wTimeOfDayPal] + and %11 + +; get fade table + push bc + ld c, a + ld b, 0 + ld hl, .dmgfades + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + pop bc + +; get place in fade table + ld b, 0 + add hl, bc + ret + +.cgb + ld hl, .cgbfade + ld b, 0 + add hl, bc + ret + +.dmgfades + dw .morn + dw .day + dw .nite + dw .darkness + +.morn + dc 3,3,3,3, 3,3,3,3, 3,3,3,3 + dc 3,3,3,2, 3,3,3,2, 3,3,3,2 + dc 3,3,2,1, 3,2,1,0, 3,2,1,0 + dc 3,2,1,0, 3,1,0,0, 3,1,0,0 + dc 2,1,0,0, 2,0,0,0, 2,0,0,0 + dc 1,0,0,0, 1,0,0,0, 1,0,0,0 + dc 0,0,0,0, 0,0,0,0, 0,0,0,0 + +.day + dc 3,3,3,3, 3,3,3,3, 3,3,3,3 + dc 3,3,3,2, 3,3,3,2, 3,3,3,2 + dc 3,3,2,1, 3,2,1,0, 3,2,1,0 + dc 3,2,1,0, 3,1,0,0, 3,1,0,0 + dc 2,1,0,0, 2,0,0,0, 2,0,0,0 + dc 1,0,0,0, 1,0,0,0, 1,0,0,0 + dc 0,0,0,0, 0,0,0,0, 0,0,0,0 + +.nite + dc 3,3,3,3, 3,3,3,3, 3,3,3,3 + dc 3,3,3,2, 3,3,3,2, 3,3,3,2 + dc 3,3,2,1, 3,2,1,0, 3,2,1,0 + dc 3,2,2,1, 3,1,0,0, 3,1,0,0 + dc 2,1,0,0, 2,0,0,0, 2,0,0,0 + dc 1,0,0,0, 1,0,0,0, 1,0,0,0 + dc 0,0,0,0, 0,0,0,0, 0,0,0,0 + +.darkness + dc 3,3,3,3, 3,3,3,3, 3,3,3,3 + dc 3,3,3,2, 3,3,3,2, 3,3,3,3 + dc 3,3,3,2, 3,2,1,0, 3,3,3,3 + dc 3,3,3,1, 3,1,0,0, 3,3,3,3 + dc 3,3,3,1, 2,0,0,0, 3,3,3,3 + dc 0,0,0,0, 1,0,0,0, 0,0,0,0 + dc 0,0,0,0, 0,0,0,0, 0,0,0,0 + +.cgbfade + dc 3,3,3,3, 3,3,3,3, 3,3,3,3 + dc 3,3,3,2, 3,3,3,2, 3,3,3,2 + dc 3,3,2,1, 3,3,2,1, 3,3,2,1 + dc 3,2,1,0, 3,2,1,0, 3,2,1,0 + dc 2,1,0,0, 2,1,0,0, 2,1,0,0 + dc 1,0,0,0, 1,0,0,0, 1,0,0,0 + dc 0,0,0,0, 0,0,0,0, 0,0,0,0 diff --git a/gfx/battle/balls.png b/gfx/battle/balls.png new file mode 100644 index 0000000000000000000000000000000000000000..21bb5e37250827a941a0ac2a3d2b6e26fab0cab1 GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0y~yU{GLSVBlb4U|?YQ9=Gcf0|SGVr;B4q#jWHY{H#3n zKmLE1-}`g>yobpj*q`}#*Z)tm5G!hU==S_~J&${1PxLH@V=F}iCi-_T%u3kBFypVT Tc&F^o3Xo}@u6{1-oD!M?=|Nl|8~(ADl9vn%I?@Gu^=*S)^_0_w^>gYHO+SLm~nlkz@5%O^-X74 hB+hDaoLjK}fO4`_R!aiI-l?Dv^>p=fS?83{1OSartNZ`} literal 0 HcmV?d00001 diff --git a/gfx/battle/enemy_hp_bar_border.png b/gfx/battle/enemy_hp_bar_border.png new file mode 100644 index 0000000000000000000000000000000000000000..895949688091a82beefb2f147232e1827f9b3866 GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0y~yU{GLSVBlb4U|?YQ9=Gcf0|SGZr;B4q#jWHY|Nl4q ztyf4$XfS@mf8+l~cEcb1H|B5r|G%-ZQBvm+L)x5;{}~ehB(hzqpP{&mp>Bur^8R0% QAs~}HUHx3vIVCg!0M2A79{>OV literal 0 HcmV?d00001 diff --git a/gfx/battle/exp_bar.pal b/gfx/battle/exp_bar.pal new file mode 100644 index 0000000..831bbda --- /dev/null +++ b/gfx/battle/exp_bar.pal @@ -0,0 +1,3 @@ +; blue + RGB 30, 26, 15 + RGB 04, 17, 31 diff --git a/gfx/battle/expbar.png b/gfx/battle/expbar.png new file mode 100644 index 0000000000000000000000000000000000000000..9fa3a21288d26d923b3aa42650a1759aa8d8d556 GIT binary patch literal 120 zcmeAS@N?(olHy`uVBq!ia0y~yVDMmIVBlb4U|?V{&HER|z`$Vd>EaktaVz;pKhr;h z|NqZ7=#?ChbM9!L|M36)|MCCh|H}U||C0UU>IMEYJTIKsXS_YXI5Xt|JJ&+SYM#fA Z3=9o#v$nAvR$2ox($m$?Wt~$(699BdEtUWP literal 0 HcmV?d00001 diff --git a/gfx/battle/expbarend.png b/gfx/battle/expbarend.png new file mode 100644 index 0000000000000000000000000000000000000000..51c0e720123d07f4b56f2d478cdd9c414f1e925a GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@knwbJ45_%4{Nw-phxhB+ m=KtjJU+lm#+261SsrPjCb6Mw<&;$Vbe;ix@ literal 0 HcmV?d00001 diff --git a/gfx/battle/hp_bar.pal b/gfx/battle/hp_bar.pal new file mode 100644 index 0000000..909be8e --- /dev/null +++ b/gfx/battle/hp_bar.pal @@ -0,0 +1,9 @@ +; green + RGB 30, 26, 15 + RGB 00, 23, 00 +; yellow + RGB 30, 26, 15 + RGB 31, 21, 00 +; red + RGB 30, 26, 15 + RGB 31, 00, 00 diff --git a/gfx/battle/hp_exp_bar_border.png b/gfx/battle/hp_exp_bar_border.png new file mode 100644 index 0000000000000000000000000000000000000000..f0f5d31a6b012ef1cb5f9cfbecace2ef231a3d94 GIT binary patch literal 116 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VBlb4U|?Xl@WI-Ofq}u=)5S5Q;#TsH!!-x~ z*$ezh{P%x8qkg;mk;H^&?8P&3?V2rk6wa};ZQ!vN_?P&P`H6vn!3}0Z4`m((hNqG? UFT$?Wt_KFVdQ&MBb@0Ga3|C;$Ke literal 0 HcmV?d00001 diff --git a/gfx/battle/minimize.png b/gfx/battle/minimize.png new file mode 100644 index 0000000000000000000000000000000000000000..95502f194e7df50be0f621a557511c559872d8b6 GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@knwbJ45_%4{Nw+8#*TkC ljB6gGTO8m~vY*f1#lSFe68BD7KmA6KdQVqBmvv4FO#q@97{vep literal 0 HcmV?d00001 diff --git a/gfx/battle_anims.asm b/gfx/battle_anims.asm new file mode 100644 index 0000000..7f8f591 --- /dev/null +++ b/gfx/battle_anims.asm @@ -0,0 +1,40 @@ +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" +AnimObjWaterGFX: INCBIN "gfx/battle_anims/water.2bpp.lz" +AnimObjLightningGFX: INCBIN "gfx/battle_anims/lightning.2bpp.lz" +AnimObjSmokeGFX: INCBIN "gfx/battle_anims/smoke.2bpp.lz" +AnimObjExplosionGFX: INCBIN "gfx/battle_anims/explosion.2bpp.lz" +AnimObjIceGFX: INCBIN "gfx/battle_anims/ice.2bpp.lz" +AnimObjRocksGFX: INCBIN "gfx/battle_anims/rocks.2bpp.lz" +AnimObjPoisonGFX: INCBIN "gfx/battle_anims/poison.2bpp.lz" +AnimObjPlantGFX: INCBIN "gfx/battle_anims/plant.2bpp.lz" +AnimObjPokeBallGFX: INCBIN "gfx/battle_anims/pokeball.2bpp.lz" +AnimObjBubbleGFX: INCBIN "gfx/battle_anims/bubble.2bpp.lz" +AnimObjNoiseGFX: INCBIN "gfx/battle_anims/noise.2bpp.lz" +AnimObjReflectGFX: INCBIN "gfx/battle_anims/reflect.2bpp.lz" +AnimObjPowderGFX: INCBIN "gfx/battle_anims/powder.2bpp.lz" +AnimObjBeamGFX: INCBIN "gfx/battle_anims/beam.2bpp.lz" +AnimObjSpeedGFX: INCBIN "gfx/battle_anims/speed.2bpp.lz" +AnimObjChargeGFX: INCBIN "gfx/battle_anims/charge.2bpp.lz" +AnimObjWindGFX: INCBIN "gfx/battle_anims/wind.2bpp.lz" +AnimObjWhipGFX: INCBIN "gfx/battle_anims/whip.2bpp.lz" +AnimObjRopeGFX: INCBIN "gfx/battle_anims/rope.2bpp.lz" +AnimObjEggGFX: INCBIN "gfx/battle_anims/egg.2bpp.lz" +AnimObjPsychicGFX: INCBIN "gfx/battle_anims/psychic.2bpp.lz" +AnimObjSandGFX: INCBIN "gfx/battle_anims/sand.2bpp.lz" +AnimObjWebGFX: INCBIN "gfx/battle_anims/web.2bpp.lz" +AnimObjHazeGFX: INCBIN "gfx/battle_anims/haze.2bpp.lz" +AnimObjHornGFX: INCBIN "gfx/battle_anims/horn.2bpp.lz" +AnimObjFlowerGFX: INCBIN "gfx/battle_anims/flower.2bpp.lz" +AnimObjMiscGFX: INCBIN "gfx/battle_anims/misc.2bpp.lz" +AnimObjSkyAttackGFX: INCBIN "gfx/battle_anims/skyattack.2bpp.lz" +AnimObjGlobeGFX: INCBIN "gfx/battle_anims/globe.2bpp.lz" +AnimObjShapesGFX: INCBIN "gfx/battle_anims/shapes.2bpp.lz" +AnimObjStatusGFX: INCBIN "gfx/battle_anims/status.2bpp.lz" +AnimObjObjectsGFX: INCBIN "gfx/battle_anims/objects.2bpp.lz" +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" diff --git a/gfx/battle_anims/aeroblast.png b/gfx/battle_anims/aeroblast.png new file mode 100644 index 0000000000000000000000000000000000000000..1fdc07c2ff0e8f8557993f5af53cb50e92501030 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7U~ph!U|?X#FZ>|Sz`)St>EaktajW&*M!~}d zJkEjd?YTlTTHZM4H!yX0+&HN@J?6$AzW(+WP1zt9R>5Lb}Oqd-JS|^m8Ywp%Q~loCIA)bPeA|x literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/angels.png b/gfx/battle_anims/angels.png new file mode 100644 index 0000000000000000000000000000000000000000..ef38c61d296f727264c7f84792f0e352ab716044 GIT binary patch literal 363 zcmeAS@N?(olHy`uVBq!ia0y~yU{GLSVDMmKU|?YQ!M0%^0|TRxr;B4q#jVtfhFM1q zc-S7ur*kfRpv|&N!q?W}U^w^NX{zA{mE9LFY1_nY*V*fJBHA}Lvh3c4=c@A4bZ&AL zMW3)_6g5vajY)Nn@>+Lx*||H%}JrD&pUvOgY%7c5P zFGsR2`m4FTPH`>Qz2$A@?0-*xIuug)mG{uP#O?o|7td=_TFB^M(IR*9`A2)Unh+<& SRkA-oq3G%A=d#Wzp$PyLyN~Js literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/battle_anims.pal b/gfx/battle_anims/battle_anims.pal new file mode 100644 index 0000000..d2ebb6c --- /dev/null +++ b/gfx/battle_anims/battle_anims.pal @@ -0,0 +1,30 @@ +; gray + RGB 31, 31, 31 + RGB 25, 25, 25 + RGB 13, 13, 13 + RGB 00, 00, 00 +; yellow + RGB 31, 31, 31 + RGB 31, 31, 07 + RGB 31, 16, 01 + RGB 00, 00, 00 +; red + RGB 31, 31, 31 + RGB 31, 19, 24 + RGB 30, 10, 06 + RGB 00, 00, 00 +; green + RGB 31, 31, 31 + RGB 12, 25, 01 + RGB 05, 14, 00 + RGB 00, 00, 00 +; blue + RGB 31, 31, 31 + RGB 08, 12, 31 + RGB 01, 04, 31 + RGB 00, 00, 00 +; brown + RGB 31, 31, 31 + RGB 24, 18, 07 + RGB 20, 15, 03 + RGB 00, 00, 00 diff --git a/gfx/battle_anims/beam.png b/gfx/battle_anims/beam.png new file mode 100644 index 0000000000000000000000000000000000000000..d6c85917941ab838e1d760a484ab9a207a3bfcba GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznVDMmKU|?XF@YSe|fq~()r;B4q#jV^v!>q#& zA};JrS)nUyX2=}W%3+_PwA8WJKcR@DF?g4d+wC75MNhR^LY8}}ifcQ6s4{x2#b(~W z-TFVjyp4_E^yfFZ{X(seZrpv%Vv?!alkfI>B()bCznCb`Zyu)|Ghw&aL1i8{HJ+st zSUtW?_~Rs`kg1@la8glGrKM$pK4(z1zc@y;$WB~U#`o=^ zu*~813t8rG-xdBYo|RX8PeS%fR-)>Xo%3rQ89bVysM<*;hzki9;*2CNX ztp8tqB=tzj(urRZrUxEgVp9lE3*2C{Z+~qRTcUE-t}ORYlJgH9WIQ`XV#(H7?luz3UAZnX#W*=~ tzTpbd?D%@V*5S^9GG4#x3$G{aV>oKKp`<4A@IsJ3JYD@<);T3K0RXkXUx5Gs literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/charge.png b/gfx/battle_anims/charge.png new file mode 100644 index 0000000000000000000000000000000000000000..90cb72f9fb85193cefc022ed4a067642c80144f1 GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznV9;PV z?issfCYW>1>@77kYj=~=%(JO_C|t*T_EGNXhSH>@REaktam)3@M&3gP z0&Wl04I8-K8f-T)oi$yTxkELgQA?LM=t;Di>n;qJ3NlNc~dT#fN ZKiv5xX1<=m@ee?b@O1TaS?83{1OTUvK-~ZU literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/egg.png b/gfx/battle_anims/egg.png new file mode 100644 index 0000000000000000000000000000000000000000..38aab505d681e4aacfe3ca637bf9deb6fa1e325b GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznVDMmKU|?XF@YSe|fq|jl)5S5Q;#Tqxeiokp z_6;4u3QpV}ebKf43Vi9Pl_37lyYc8Pv-ND8&@h~QBVV@RFY zan#|qf{XnH*41w$|H(%&n7rb*zhWc6WK|?;f4E+6M$(3R!39kF#qCNMI?o?-cyvZm zq0pn#qF#ZOPujyw%B_ZnS#Y7o5qXP`^F`P3rg1UEh`+10FDi}(InmSA&t;ucLK6Tw C7D0dj literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/explosion.png b/gfx/battle_anims/explosion.png new file mode 100644 index 0000000000000000000000000000000000000000..0af9f1a0d98cf10396c24c3de4e014e7842400aa GIT binary patch literal 157 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznV9;Pmgi5S1;LETJl0kzHStqv^m-6zr=l?@ebHt_BtLxdSjGczTZ$I2=dvWVk#Su#v(G^iDTOTOJtDW$BcO+Wx1;}1c LS3j3^P6EaktaVzz-AyJ~REi@rN&OL^mGlZ#gQnx^+_Ql55LyjlTb3vVY**dFZ74Es&j_u6{1- HoD!M<2wXe1 literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/flower.png b/gfx/battle_anims/flower.png new file mode 100644 index 0000000000000000000000000000000000000000..61b4f58cefe9f79671e03fd6488eac07b9745017 GIT binary patch literal 149 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq@~$)5S5Q;+AiZA>RQ5 z4(7k7`)pd%OU{IRTvT@AQg{n*;3KUd37rGq6tgFM^qVNOUG<{SLamCZn1bTp=Ko&2 zONL3X=XH}v%Vo0rT9kD;ahuBnkbR!6elF{r5}E)l C%Qt5L literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/globe.png b/gfx/battle_anims/globe.png new file mode 100644 index 0000000000000000000000000000000000000000..8d3a35683064c2dc56153f83435739d670c41e6c GIT binary patch literal 292 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;ICI$uu2APGnoeT^NuRUEHLn>~m_B(npJBqk) z+Z-@Blrqux+s-38Zweo(@jdCkAbtI%x5f)brj4yJUDyq1Y`P?XMB>~T79&}m7dE%3eeyAPJ@A|y%Nam^wxn3^0PyPjl w*JyljS{R-=dFjchQtO=e?q}FKj=lKFuCj6RW$8Z;cYwU_>FVdQ&MBb@0M=82LjV8( literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/haze.png b/gfx/battle_anims/haze.png new file mode 100644 index 0000000000000000000000000000000000000000..8a870ba98592d4d58513c1c426d9dead5200fa8c GIT binary patch literal 173 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;ICI$uu2APGnoeT^NC7v#hAr-e$dk*p*P~c(S zEX-_R!7tWvMD5{0;g;8JA*-V5ljatQ8E7&eTD___^~scul$FapyEx>G_#S-D>Ynsk zPG2hZ2cLl0KkM)1|6VPfmy|X)^;%Fz%IxLdog8vT{0~0An|&$$!XlshjE4@@KmWH* a|1Z-S-OE>(2}i#Ixx>@d&t;ucLK6Ta#6wL0 literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/hit.png b/gfx/battle_anims/hit.png new file mode 100644 index 0000000000000000000000000000000000000000..228066331ce55746666b48a73311bf59ae1ba52f GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznV8~!%U|?XF9%;UTfq~(tr;B4q#jV_nhI!2n z0<0JGS9QcR3Egacf0*}-YDC~qrodAdT63Id_eC!$5cYa>nNVaDStNOPYA}xffdOH|oD(SRXy>eWl~m z_PEpL&y4Q;Zj!V+TB_je))X)4qE_QA)4KRbW#GT=>pbEQKeA6fE+^j3_Uw_EnbG;G zOC>4#kGfp?4xGL0vGR7Oe0Nld^j?XhOT=bN9e!GSeZlI>hs`s0InP()eAT|hiDyd3 zfyW1$3bZdauKs#}QFzDwv#x9ZP1CJd`*6|zkVUs&9Mw=O{G8qJgXxN(c<<+%>|UV2 N@O1TaS?83{1OQ@%i2DEl literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/horn.png b/gfx/battle_anims/horn.png new file mode 100644 index 0000000000000000000000000000000000000000..56e8ca2418239558d8f3f21a537720eb303655da GIT binary patch literal 179 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|CI$uuhW<5GtqcqdRh}-6Ar-fDPi+)zHV|;R z=v`QpyMvoGtAQcuxyi!=x(=LjZm$ko=FZ^g-^g_KKvn67=IVp<7MOVMe7$u;X8ebn zlQ|t(SD)TH+4p;d^S&AL=e;Qm@Hn-wa6-KK6@`soRa(P1)BK*C?Of8H$T_X~RD|2( gBICI7$HjF~^#a|cAq~mgl_1x6y85}Sb4q9e0QEFRK>z>% literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/ice.png b/gfx/battle_anims/ice.png new file mode 100644 index 0000000000000000000000000000000000000000..62a67641e82891b3133ddeb572818c8ed442380a GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2U@%}}U|?Wy{##?lz`zjT>EaktaVz;p^7#)h zZ4SRY&r?+|vF3lnNm-t%e2FdP1{rG`lrGxyxZ4}o*qmnw`SahNW8upt?PE(nT}fwK qYtOStTcS@d?Z*xNsjc3MoJKjc&epakLOY$LHlB&fY1*8Sw;}H-@1_Ydi9zXIk?qf) zoaKlVxLosO{`Y_X_exIC>fpGN+S9VE{$+@XXmY&4CDzAvXI0f|AD(hcQ9iTS`Ou=u z)E^5H&nDz|FV!wg*P6YoJZ{ah7fSD5$6R>Obb>wfvcmgEwtF)y?z-GbcZvK^mp4tX zXlh=}XTQm^b(h8eN5~)SUaOtizwYaKwu_V1Ui7Z{%DCv7)3+CytCu$X`*XvKH@17% zbg`o16^d@BrCiR}CjWdCJG} z=62fwox}GYEoszopr0GmXq5C8xG literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/misc.png b/gfx/battle_anims/misc.png new file mode 100644 index 0000000000000000000000000000000000000000..e90f057d9ff36b859d2dfdc4c0f33ff80a502e70 GIT binary patch literal 481 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU^u|Uz`($eB(}tufq`*_r;B4q#jW1S2fYqE z2(+9+HE4a9P*Rz&b&GEru`8`mzfd_LA1Hj&I34XJ+qzz@j0f zuqQ|BLGG?CTF*E-9NZE;)5 z!Fc_FU~i1vq>IXm5@%d*oxi=puE}eU@6Kti8(H!kFK{s^ISNReS}g4oexPy71C^^m z`X{4Q9a^oA-w>W@@y`6xxvxBPx>c7kb9c%u(|EChcTdagVlj(3I-!xDvS!xnXNmuK z%~fH~tS3M7+2(^S$2K3Fp|<(p9ILyD?Ypk=WqV&Q3IA)dsPC%IndlR)2PXbuyuQfv q%+c?zF)w=kk1pN&Pc`}8%B}e)#WZ7l;bUqBh_zm`TieDGa}yA zt!bK@lVId#vgnV+9HU-0AJf%EYt~HBnC&-NHHG`p!eugU--K@DZ{w6&^WXqyW3Wzg p(~f;@68jy4FL~+A$mKWx$uRrIJOPJi@9%>=;pyt{LhUnKwl literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/objects.png b/gfx/battle_anims/objects.png new file mode 100644 index 0000000000000000000000000000000000000000..437444b4a3a59a37afc7bf22047f6fb31908b46b GIT binary patch literal 327 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq{|F)5S5Q;#TSfL$4za zB5V)hw{PBf;Y-t5qvt(QkwrRdGS_Uo5S+vGQqAW7 z@|1&jlk5(q+_TS@+cIDC%kNn=qRTI=sc@>=x7%I(u;r|ZDTf{N7-zDl2+2=8D*n!O zXVc_6#rca)Ea1}Hx|R8icjK0cYr1BA{4C|^q5Wv%q&ZuQ7XL|-UR&XMYVEf(KV%kf zb9>xdb-d`wjTvqAJD#36xi0DT_g}`R;tX}nM5`ti&39bV)b-&`n&YoYJXaG>>381E z4)5P!zGs)gLxIPW9{1GjQ?ul#oS!fBcIe+N!<-pj1?9w_acolSuAE4FW#kjZ^C?OvlDJrrDu&# zu8{a{CAjPAJ}n{nqqi!{-ZUpYV|~9T>h1qo?#T~V7{5CfHM73nj+6JUWMIwyTIQRt Vd_Ls9>!|}dz|+;wWt~$(6971tK+*sJ literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/pokeball.png b/gfx/battle_anims/pokeball.png new file mode 100644 index 0000000000000000000000000000000000000000..80aedc16f1de5f00a687355f12a1380aad0919a0 GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznV6b3fU|?XFecj%jfq|jk)5S5Q;#Tqxeioh= zN7(BW4oZEP|Iq(NNHxbtLz64=PBpWnuATpod39A?oBisro6a5oW4IG;ZJ1epKrUm- ziqG|J{eg-Bk1{e=*iPVJ77TPy;>kF*JXHIibBBG@*?`<1cR#tCuw?vXeD+`95kGUY n?O}E{wz@WdULTbm{F50Ne*4UuCgpOi733sOS3j3^P6zopr0O$A} A7ytkO literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/psychic.png b/gfx/battle_anims/psychic.png new file mode 100644 index 0000000000000000000000000000000000000000..a6d22db2ff0192ba112f442d9a442d8e84767c1b GIT binary patch literal 175 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2V8~!%U|?Watnh6O0|P^ur;B4q#jV_P8+jWP z1X>@42U|BRO;lD_@LSm18k})fgD2sTSX+}Z25P8 z)y#hm$5w`}p0<>YS#pwb__;Y!pXNXGkBW-Q%2;80_~3<^#*J-O#u05zj(p9WEsBQ= zCW*SRs~FeJV@P4$FgN{2vT0*uV{WhQ;s4BGtHahNvPD)kG%~*6V_5yH!uZy{-GLz2 Ndb;|#taD0e0s#4iQ}h4; literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/rocks.png b/gfx/battle_anims/rocks.png new file mode 100644 index 0000000000000000000000000000000000000000..b5093b3671c2f3cf858edc38de3a6d34e2386a64 GIT binary patch literal 326 zcmeAS@N?(olHy`uVBq!ia0y~yU{GLSU@%}}U|?X7FSi$BU|{6+ba4!+xD|Whpx0ps z0k#L3;r!o>Vht7Uc`X!)SF+7{FDiU6`l7`Txu)w?cWlMI?k*3=;Qp9-X&&?IHz|8} zOnCBGJ@FrBi`t3CfYmLYR~Hs;JKU%te&yU+7U4zd2V1r8vrN~28d7jodz-A!{^o0k zwqB=V{PYh7YMX)}|oN3;tnIZVqeHXO}HB3btj+dNb>W7SCDb)G6*)HcxlD{;$q} z%kP2o`o;_Qbh7?6CaK(=da--&qm!@8Qe2qscrMcA{`HybRm;A(ofme_RIA?%@|vfs KpUXO@geCx~CuW@h literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/sand.png b/gfx/battle_anims/sand.png new file mode 100644 index 0000000000000000000000000000000000000000..29d225a7edc95459493b51b24c20050d0a16d9ba GIT binary patch literal 176 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU@%}}U|?V~io-yP)l)%&W z@cksE9Xle=s8(?aF3+3#%ud(jf#D?GBP@Sje@L&GX3nX^F8kbNx}c(sV#oc0dF($v z%}V&3+i=(4{|*2CB-zi8F4tasG|56aEZKrHIXNj{;?z3RHx5!!+D^4sow!cDy2G(m d+2r3zj|0+ z|McbF2{)w|e}7<`Vw8UF?8_s1+#B1iE>x{Q5ywz%yeNONt!uUNO}F^=;3lE!70he5 tZz^xtEBdB!FEdZ*y4Mj0Pg{Lx)K3t3zy9c<7a1Ubc)I$ztaD0e0szhLX+{75 literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/shine.png b/gfx/battle_anims/shine.png new file mode 100644 index 0000000000000000000000000000000000000000..1b7e9834b34985e227bc2809c8f31c217dab5cfe GIT binary patch literal 273 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznV3@(gz`(%JbXspE0|UbiPZ!6Kid$1BIj%cw zz~NH+f3ZbSZF7-){+{EPE=W#V=6n0g|EiBFJUnbMhoYyfFzvd2%j@Y+-kH;wR*Rf( zTl~rXgD2}TsoIyTo-ws}lvo{-6q+DuUC{RL&pzcG_gr;F^#g*d9)>4fXb~(f^-1Ii z6JzY{;9SL^#h1!6vv_xPllBf_%QCUHG literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/skyattack.png b/gfx/battle_anims/skyattack.png new file mode 100644 index 0000000000000000000000000000000000000000..e731c691c49ce5cff853cd95c2d6237bd14fd478 GIT binary patch literal 393 zcmeAS@N?(olHy`uVBq!ia0y~yUEaktack`rN53Nm zJggVa&){7#Dg7*G1F!7?56RAMUh~Ax9V`=f$!1zGxol(`o zll(lomS>3lZ2G1(o1eQ+_pHEsz)ky4nm?2Pk$p6WSxaFJ^ zb>;4Ve|fpk<>4|okHB|5EEaktajW$FM&2U| zJgfownToNGUv+I@2{v#lI`n&j#~Z08@ACKE w`lC82tP|seekfc@*|bDjez8^i=ehTPF|yXp_?72S^cmzbPgg&ebxsLQ0KjNY*Z=?k literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/speed.png b/gfx/battle_anims/speed.png new file mode 100644 index 0000000000000000000000000000000000000000..e219b38c9f1dcb8907373cfe50bdb7d7438effb9 GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|CI$uuhW<5Gtqcqd{+=$5Ar-fhfAF&eu9o8%UaMi@*J2OdnRWI5itE=smp8Qi`CljR5!)URe(=in^&b;ny$=#7 nef?fb;j8)Uda(&y(X5LY-t-o&xwNL~EyxN_S3j3^P6EGz`$ti>EaktajSKrt>0k> zf!6tt&YhK0Fb(>k`c2|bh>6D$UiShOz6pI(TwD&l-pMj;LeP?hN)v0i)LE~(ot|y_ zQ*cvD_jzOM{Cib495ojj^(!_qT30G<3OrEsL?_r>HI8$7l$Xp>N!5khZhcvK;e`C! zs=sr7Eq!G^|KF@#2lv;7$20!c(%&GixnUkp+6nf_T>LNpY;soCxVU4B%ezfnJ3X$t zW=}u6Yg>lES~KZceaBtm-g28f{qEg9^^|mt<=BZ_?VNl@hByD{ri|clr3nKXGO5;ermoM|Pg`-{r_JUwWrV zslM3#?vJxc)&FyLXU$1AZ+{q+a%yS8@5HSOemsi$er)s96HGHZtetJTGhBJzJN#gr X*ci8C($&HxpkVZL^>bP0l+XkK<-nvj literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/unused_battle_anims.pal b/gfx/battle_anims/unused_battle_anims.pal new file mode 100644 index 0000000..4ef48dd --- /dev/null +++ b/gfx/battle_anims/unused_battle_anims.pal @@ -0,0 +1,30 @@ +; gray + RGB 31, 31, 31 + RGB 21, 21, 21 + RGB 13, 13, 13 + RGB 07, 07, 07 +; yellow + RGB 31, 31, 31 + RGB 31, 31, 07 + RGB 31, 16, 01 + RGB 07, 07, 07 +; red + RGB 31, 31, 31 + RGB 31, 19, 24 + RGB 30, 10, 06 + RGB 07, 07, 07 +; green + RGB 31, 31, 31 + RGB 12, 25, 01 + RGB 05, 14, 00 + RGB 07, 07, 07 +; blue + RGB 31, 31, 31 + RGB 08, 12, 31 + RGB 01, 04, 31 + RGB 07, 07, 07 +; brown + RGB 31, 31, 31 + RGB 24, 18, 07 + RGB 20, 15, 03 + RGB 07, 07, 07 diff --git a/gfx/battle_anims/water.png b/gfx/battle_anims/water.png new file mode 100644 index 0000000000000000000000000000000000000000..4e3c3b7199ebe82048f5b83fa36f4ea3c545acc4 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2U|7J!z`(!|H#@78fq~(Ur;B4q#jV~62fdgL zMO@GOFFSg(WNPD)y|;gIA9Q-TNk#8ZOWjcm360p-$3lYw9vRQnytgffpzuY>{pKe(FMZ74r=05%T@=oJb5f0}|KGknYnR9#6pYJ0 zv3jSv5~Jqd+rLUOr)8GU5cPgo@uXlu?(4#T%^!JOGbSW%JH6ZZDaSFx8S~FA|Daa$ k=4X|Y+{EvzmH(eL?|t_1$I91tGC=nM>;M1& literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/wave.png b/gfx/battle_anims/wave.png new file mode 100644 index 0000000000000000000000000000000000000000..55d4faa5f274bc662b2bdc1a00abb5f1744daa79 GIT binary patch literal 205 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7U@%}}U|?WK3I2PJfq`L)r;B4q#jVf@7kQ5u za5zttXqdRkN{HK#VbXau+pp{F*DD>Y>q@j|zSL@H?J}>hX>rrpml+4=yy$$AZ$4`U zduvQjd`6=)$6n2thV9p8E;HDcV^Y&?we8wEmpxwbjy^FzWS`v&VQy|}v=ZR^)v_^< z#ZOryv18LIyHKG&%&ghAm9FyyU!N?k%u8GCIPa(3`Ogvi=gBkdKV3WNKw=Zfou00K JF6*2UngB6|P@Vt) literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/web.png b/gfx/battle_anims/web.png new file mode 100644 index 0000000000000000000000000000000000000000..2aeffef0ef5fbfe784f76d3adb15f30122cf2c7c GIT binary patch literal 191 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznV6b3fU|?XFecj%jfq|jT)5S5Q;#P0JBA=5Z zkIVB((kku_ik|&V%bIKt&3klu{`>18e-&osW{Rr_XvL|`TsF7yctU_f@Y~}J}dc3K;&3)#& vPDSCBhb{j)xQa|0b);_iNxk6Qss4rY;Hk5}|LZN_1-Z=A)z4*}Q$iB}HYH5F literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/whip.png b/gfx/battle_anims/whip.png new file mode 100644 index 0000000000000000000000000000000000000000..92d7ded6fd25557a10af0128b3dca862b5a9810b GIT binary patch literal 210 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznV9;PoHbJN<^Uz#~?VjyX+-PStVSwmKbXJNvz#^X%z2e{P;^2zHz> zS^VPK&;Wg_zzadir*tY}kJdz2Zk?t5Rd;>ogi7giE-z$~Zf>3NdXMXek4)}%4^OUt z`}?xA`$m(b6-Sgsm$N*+B=CNr(zM)FwXmdKI;Vst00=5rNB{r; literal 0 HcmV?d00001 diff --git a/gfx/battle_anims/wind.png b/gfx/battle_anims/wind.png new file mode 100644 index 0000000000000000000000000000000000000000..b02031392794522e97ab45b5a7b534faf7312438 GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2V3@(gz`($;ZPWX$3=9lUJzX3_DsGidu=Zni z6mXgE;BX*OM(B|0w2415oQ^D$Nnqx4XnJyiF)I3U=X!@@oH7nhXWUp4mQ1~V^vs9o z=80M>^rpsr=Mma|NKdoxB6qa<6!RGV8KEY@H;$BUapwCrvvOYf%^e99$CLWsYOhIB zENj_!MRZT+PSwS6aZfJ3x$I*3@ks>Rl|^dp_uVQ2wLj*z_)hw@WeFR%$hzrUwzORp z`IjCOwTgB6wc0B}8@vkE+n-tEUa0o&v9?X@-hGop7O|VS-}RCcXFYFmzsBUz)?f4M tf6bP!-!W%N^Wu_y^W>S@cWyXU&wk|cm#y^_jL7hS?83{1OTX3e8>O* literal 0 HcmV?d00001 diff --git a/gfx/beta_poker/beta_poker.pal b/gfx/beta_poker/beta_poker.pal new file mode 100644 index 0000000..cce7606 --- /dev/null +++ b/gfx/beta_poker/beta_poker.pal @@ -0,0 +1,19 @@ + RGB 31, 31, 31 + RGB 30, 22, 24 + RGB 18, 18, 18 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 10, 11, 31 + RGB 18, 18, 18 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 12, 31, 11 + RGB 18, 18, 18 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 29, 26, 05 + RGB 18, 18, 18 + RGB 00, 00, 00 diff --git a/gfx/card_flip/card_flip.pal b/gfx/card_flip/card_flip.pal new file mode 100644 index 0000000..24c5566 --- /dev/null +++ b/gfx/card_flip/card_flip.pal @@ -0,0 +1,44 @@ + RGB 31, 31, 31 + RGB 17, 07, 31 + RGB 06, 19, 08 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 29, 25, 00 + RGB 06, 19, 08 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 13, 30 + RGB 06, 19, 08 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 08, 17, 30 + RGB 06, 19, 08 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 08, 31, 08 + RGB 06, 19, 08 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 17, 07, 31 + RGB 06, 19, 08 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 17, 07, 31 + RGB 06, 19, 08 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 17, 07, 31 + RGB 06, 19, 08 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 00, 00 + RGB 31, 00, 00 diff --git a/gfx/card_flip/card_flip.tilemap b/gfx/card_flip/card_flip.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..f6cdbefb16bc99fd9b38b56a6d17f784b4105589 GIT binary patch literal 132 zcmaDas;;HQ2FCB%)$Qz^oZZ~Lyx)tfIXJqwdU*QyzE@>oV1&T;tRez}5cpn9ML`h) lK?;}{z!0QBNB|5$3X~MU5Tt;a0SrM3gayD5q(E5#3<1^*7jggq literal 0 HcmV?d00001 diff --git a/gfx/card_flip/card_flip_1.png b/gfx/card_flip/card_flip_1.png new file mode 100644 index 0000000000000000000000000000000000000000..d3bfef22aba417285bef3809c0bd390273073fe1 GIT binary patch literal 476 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU{GLUU|?X_`qMmufq`+cr;B4q#jV^+)_Khi z0&EWqrM)L=Tsk7YphY|4klqSkkz#pm)qO5oL}%HyaBF|x5EOYk@{8JMhO)USf(i$h zKfEuQFk^aohn#ezb%XTW64u$x51H?(rfztCd^JbOk0QO_o3^*wr#<*Mx4YIh#322} z^<~BXZj{ND^W+ISgd}u(pA!ADkzt{+!>Wdz=b0|_J5G{3S>VChkk5Q!M}qM>hT7G; zJG5T3DSC>ay>wkj* zH>1FT8|{3j>(*|bFoDsh_QcA5EAE?V49W5uOBkYgn5{|}e4Wo{TwPxhd8WZ=haOwE zud>2P6Xvf6OOLWl`;xW#Kw9?UC8hUWr~4&ro#{Af4R8IE32}?LR?j-v=9nkC#eJ1Q z`VHX~)1=SMx-rRZspKKO4EF9UMTJ>M^EZet*xvT7#-6u1$>0;W#5>85e4el?*SlxO z**C0hSfzI1=z=+oZ?-MunlI5H$CSk;;?wv~@^UO=spvFb)2E;Q)U&c}vT41t)289? iWtMm9239vE{xGy1+OspNZqf-*w0XMvxvX-0JzbpIyRykwa^vr(8TZ1ceLuQ6pU1uX`paYA4lA6uJ@awh zchgfpPdmKm6XJdpqn+Ea>RYb^$L3vSvFcK<7DnGNSk=;YhRY;BA&r-Lo}g?0uF5@8 z+w~6}G+iC@ENSCwc|ncrQ0ASP60$EZNE$C+t*qvfrs=fplC;Vcw<%Y-^~2iIoG*WI z;=QF2zjZeE#hWh{h0RTCn>NeZc>Ws0`2iYsZKdsEixgemZ4O@Hs_L4Wp>6J^67}%@ zr1|VV8%#bPlqusmJLlErovNiJ^Tpiv3mtm$*yVd>*KFgG-b0Naw)~a3^W5NO^7=#V z!o4-O15$qMxhXe)@&wkWGg7kNGH-3E^tnadcZhlgF^g?%DR2tT{WGiHX(_I`o&{C6rrx;bP0l+XkK&-fJh literal 0 HcmV?d00001 diff --git a/gfx/card_flip/on.png b/gfx/card_flip/on.png new file mode 100644 index 0000000000000000000000000000000000000000..cea1577ef5ca97d9cf4fcfb4f9408befaf6d7276 GIT binary patch literal 79 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5c70#45_%4oRE-kA?o0Q f|ICdIF>GuMo*ZnBixP|3Kq@_5{an^LB{Ts5%Jvjz literal 0 HcmV?d00001 diff --git a/gfx/credits/border.png b/gfx/credits/border.png new file mode 100644 index 0000000000000000000000000000000000000000..c396d533d84500697e36e91b5758c89b59a22fac GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|CI$uuhW<5Gtqcqd37#&FAr-fD`waOG7;rHE z^;{i%@1V%nsgl}pfvH_FJ-Z4vF)}Za6wjQ{`u literal 0 HcmV?d00001 diff --git a/gfx/credits/credits.pal b/gfx/credits/credits.pal new file mode 100644 index 0000000..c473f04 --- /dev/null +++ b/gfx/credits/credits.pal @@ -0,0 +1,19 @@ +; pichu + RGB 31,00,31, 31,25,00, 11,14,31, 07,07,07 + RGB 31,05,05, 11,14,31, 11,14,31, 31,31,31 + RGB 31,05,05, 00,00,00, 31,31,31, 31,31,31 + +; smoochum + RGB 31,31,31, 31,27,00, 26,06,31, 07,07,07 + RGB 03,13,31, 20,00,24, 26,06,31, 31,31,31 + RGB 03,13,31, 00,00,00, 31,31,31, 31,31,31 + +; ditto + RGB 31,31,31, 23,12,28, 31,22,00, 07,07,07 + RGB 03,20,00, 31,22,00, 31,22,00, 31,31,31 + RGB 03,20,00, 00,00,00, 31,31,31, 31,31,31 + +; igglybuff + RGB 31,31,31, 31,10,31, 31,00,09, 07,07,07 + RGB 31,14,00, 31,00,09, 31,00,09, 31,31,31 + RGB 31,14,00, 31,31,31, 31,31,31, 31,31,31 diff --git a/gfx/credits/ditto.png b/gfx/credits/ditto.png new file mode 100644 index 0000000000000000000000000000000000000000..17a1191b0c6552c049c2f03d3160cc1580d91b18 GIT binary patch literal 377 zcmeAS@N?(olHy`uVBq!ia0y~yU{GLSU}#`sU|?Wi-K&$%z`*F>>Eaktack>kL%$;i z0<0H2mzXR(TJDhfjZNeBvV)u6{AO8VGDm6QrZn!n1Cc8%4~c1~**sQR&B7J7qpEf9 z>;J}W3%K)IP1ioi%TWTj74|4wLH2y!^-FGNS(uZds|({`c|b2PK_7d@DDtO1L1kxM{tW zvy^bclOo6dF^|Em+^_J> z--l;CfP!+tEhc(A_cMZ~+m}yQlCBl!47}fZn04u*>DwQht$+C|a_z(I!P{%& jzeb#@zj=yT#QR%*Is3tD=H1qpKw;|X>gTe~DWM4fYu}=( literal 0 HcmV?d00001 diff --git a/gfx/credits/igglybuff.png b/gfx/credits/igglybuff.png new file mode 100644 index 0000000000000000000000000000000000000000..3a6d00194f345a1880b179fe85c7911e1209bb91 GIT binary patch literal 482 zcmeAS@N?(olHy`uVBq!ia0y~yU{GLSU}#`sU|?Wi-K&$%z`(fD)5S5Q;?~m3=e-U) z2(W$F7BL}4#IRhGBeidy?Ugwx{)#z#a(g?zX+~u_R0-OM%nFvuyjkb}T-n0fn)`3F zLX^fIkIQe)TwgyoC|kTOx*}dy3 zE(Lb8w^ky?VLqnRB`MKOM`a`PaGaz5YD3SYdXR zQ@C;Iv6dRQzkm3D{@HAA-K^NR>Tlo=-7WT9%r~ExpRlQ^XWL__|Ni&msJH&Nv+5;Y z-dnLV`*2HY(X1@tzF)yEH@+ONS>nLdb$+3jv};7Anb4MQ(Z9SmsYgsGsKjW~) pLxan!?mwN|tTx4L(VO?jKJk`$&zEwO{1OFEaktaqI0R!>q#& z0<90XGdbVTV!5I|cc$`^AfC(^-K1}JuNxG9h-_M&T4XGLFmusdN!D`Dt|eX4wF@S0 z{Uw?5_aj%CtHA+73kIKDHO7r5JXcQo9(MD{IvkPqCAZCE*}Z&Cj}=PFn>$+W1bFuG zKK5Lq#mD{RO~r1BAAge$|NN*^ebgEaktaqI1*{aH?i zBJGP+x5VrzIhAMK>f=-xyn%ILikJS**$>{S?68V>==4!DZ_cC2E;}drrQOx%&B{G7B-&eEtHzg4LMDwI&6JuX0*H0==c1~ zpUNsPJrd5|xTN)gW3=?Vmj};2_6^S|G0$1t^rpeZm3_j_Q2%)xCJqlYg*Yvna~3^5 zU3O_>&ChxJjdkxow70i^_T1bhR{r^Woh*~M{)j89Vmep&CvSGlub8Hho);f6MLjTQ z@z<3C(q5kSA}X1p)0eRRp7=+HZ;t$?BNta)ydARag5$Ckw;ri@vCsL-yzok__0oBJ QtUzJz>FVdQ&MBb@0Bne|=l}o! literal 0 HcmV?d00001 diff --git a/gfx/credits/theend.png b/gfx/credits/theend.png new file mode 100644 index 0000000000000000000000000000000000000000..165f8ba8edd2ccd26efeb6e9388914cd62097da5 GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0y~yU~phyU=UzpU|?W4X=4|{z`#)L>EaktaVz!wM&2U| zJggV=Pi=5f3wdoX@iR6jnefK{$P{OJ|5=5LJOt~R_q*{T=V?zUwio9e*PjLM0rwOY4Y-za*;igT?8_Jf?`>FVdQ&MBb@0PQS9yZ`_I literal 0 HcmV?d00001 diff --git a/gfx/debug/up_arrow.png b/gfx/debug/up_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..6c623d2a14558c3f5598f30c5f482a2198eb4529 GIT binary patch literal 81 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@knnVI45_%4oRE-^z@)s6 hP2f@#gVX9T1_tq4%>U^>p=fS?83{1OU`s6t(~W literal 0 HcmV?d00001 diff --git a/gfx/diploma/diploma.pal b/gfx/diploma/diploma.pal new file mode 100644 index 0000000..2c9ec64 --- /dev/null +++ b/gfx/diploma/diploma.pal @@ -0,0 +1,39 @@ + RGB 27, 31, 27 + RGB 21, 21, 21 + RGB 13, 13, 13 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 31, 07, 06 + RGB 20, 02, 03 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 10, 31, 09 + RGB 04, 14, 01 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 08, 12, 31 + RGB 01, 04, 31 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 31, 31, 07 + RGB 31, 16, 01 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 22, 16, 08 + RGB 13, 07, 01 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 15, 31, 31 + RGB 05, 17, 31 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 11, 11, 19 + RGB 07, 07, 12 + RGB 00, 00, 00 diff --git a/gfx/diploma/diploma.png b/gfx/diploma/diploma.png new file mode 100644 index 0000000000000000000000000000000000000000..768bbf91397abc59f6f3aff8207ec63f5b71ca09 GIT binary patch literal 938 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qV6b3fU|?W~s@cAdfq}Wu)5S5Q;#TR@y{qoH zi5%}=%A(ioDDcMarC#t;M!gdUHG}ky?c(Nk%#Ay+Lr7@flETSadO^J0(oa5%+^TJN zeY&q{R-$z0$^UaEep@&9_2o0~&iFt7eJ0>z%Y@WCCy^>4g=c2-8+W}q{mEwP^3N-y z=BwN9{j6Bh+snZEY3iIgtBUJaojUdS{LS`-is}yHjRAZ4`yJk9GjcpvJ}dR=d+^!= zOQif185-Dx80@|*&5>XJE2Pps^t~E`?$Shs%QmvC40$XM@)_=!-APL{xz7}pb>nW} zG>r{6V`abYmGB5+_+Y?v#x-({^TX!#X${6RJZ`M)tbVqi)#8_dZo_FQ73oU~XMW#x zYq(b(ugkFQ9i`dGp}UL;b^V=Q2D>VW}x(j4|L^plRa6@K^N0qPafI4J;E} z7#-wl0{xGh?g>6{Q&*i!;VP3zcthdNn;W*y|9>KRql#^yQp2A&?{_}Dt7XIc$HS7L z&*6uciu1CwZM@gcujl>GZ^7|kli|TvMyzdbima9i9>`NqWLwSfl-ogYhiB^a5BY4D zj{f60As(x3yH?FDDn#Ivc0*0V54OkC4W>Tz*dBN^fx%-&LDrSJ6H?wQly2Gkty&|_ z&~o;c^rdFAP*x@n)6WeYOH@D4(D>qE9CYpFT0=Fl-*2okR~QB}L_HSq=;qzl$mw^K zlQU#_%&zXG$BjbUHKd%h?wSg)9!Si#vpaC4!N#UXq&xLl@y@bc{abvQKR3>gR%iIL zgQ4gxkBNdb!<}LiQy-qpH4FS^#aT0UKGoG)qPpN==^Ms*!8+#R7jr{iGn1o1q>hn`amJBF7jI2$RTANfQ$7FS3Ae>h zE{2+I1)rGbxwUpT&-C_ z3$Cs@7i;>A;SkH$>Fj>-Y#yIDu7t+Qi9fJke)@Cls!J&oL7C9g)z4*}Q$iB}Zla!W literal 0 HcmV?d00001 diff --git a/gfx/diploma/page1.tilemap b/gfx/diploma/page1.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..fb5d798919cbdd18816df4e300992a8965bc94d4 GIT binary patch literal 360 zcmWfal#rBQU}R!uVP#|I;FOS*kQ7%p!2s$?CME)c62c;)Vi}oP*%AVRCMHViCMF7s p63Qy7YB{-i`4S3>CMFoFw{|SdZWNo45y7e=A<=L|OHE-Tlio#^DGb_d*}u1UW!oSAU;pcW cmdKI;Vst02(kX00000 literal 0 HcmV?d00001 diff --git a/gfx/emotes/fish.png b/gfx/emotes/fish.png new file mode 100644 index 0000000000000000000000000000000000000000..216c9c43a19954ce8361136dce4fb43528f29b6b GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1PM$7~Ar-fhe{9dXTGuAe z!}E)$KWy!*v=>oZvjnGPL@YgW;oyOVM=l&Vz>wN_^uVTsqY1hH!wTP~|M>6!-+sc4 a|MCpq%M`O^u0OW{nd<54=d#Wzp$Pz<>o5NR literal 0 HcmV?d00001 diff --git a/gfx/emotes/happy.png b/gfx/emotes/happy.png new file mode 100644 index 0000000000000000000000000000000000000000..dd65f4d1a1bf0538e37c4a035755d1659ae7fa79 GIT binary patch literal 125 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1E}kxqAr-e&Pa6szFyL_x zJlht?v~Xsz=M$5zmYpK5>ef3eDi7OpYO>ZPJeVA}!)1qV(xv&!ZXd0TI3{;L`V`aD b#e9L%)2^##T7`PVg3R@F^>bP0l+XkKS79hN literal 0 HcmV?d00001 diff --git a/gfx/emotes/heart.png b/gfx/emotes/heart.png new file mode 100644 index 0000000000000000000000000000000000000000..166fff51555960739e02a4916788d6c9ecec82a6 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1KAtX)Ar-e&PjBRHFyLW0 zI9>aRVbG_4Bqf1@;EIy;{+Wl=M}2q{31PUp=~Y jTfRPeM_JmFoi9E!`o_sEZ`pcI4P?HjtDnm{r-UW|;YBSm literal 0 HcmV?d00001 diff --git a/gfx/emotes/question.png b/gfx/emotes/question.png new file mode 100644 index 0000000000000000000000000000000000000000..091ddbbada8c3f9765b022edab37869710f9c6c0 GIT binary patch literal 126 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1uAVNAAr-fhe{9dXTGuAe z!}E)$KWy!*v=>PU5l1c@-0HyTRI)Z9ibZ8h!;w{?4oQsSQy8?_vVU*y%CmdKI;Vst09LCkwg3PC literal 0 HcmV?d00001 diff --git a/gfx/emotes/sad.png b/gfx/emotes/sad.png new file mode 100644 index 0000000000000000000000000000000000000000..e241a5b1b02f2372c89738d6c81f57f13d173fc9 GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Zk{fVAr-fhe{9dXTGuAe z!}E)$KWy!*v=>PU5l1d8T)2=$Rm5V7LQ?GNFvdnew{lo-%n~&cUn8;R?R~9ve|i4@fBBzX==XnShGJut)yMa2+ygSm M)78&qol`;+0K=pvO#lD@ literal 0 HcmV?d00001 diff --git a/gfx/emotes/sleep.png b/gfx/emotes/sleep.png new file mode 100644 index 0000000000000000000000000000000000000000..41c958f74f14e1b327fdc70d5e7077e13922e4de GIT binary patch literal 123 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1PM$7~Ar-fhe{9dXTGuAe z!}E)$KWy!*v=<3cTRRr6=61=@)O6grTEgLolET6(tWTRno45XrKDu@O!~gbw|2ri8 ZuV*k&R<_(4l*bJ+)zj6_Wt~$(69CbCD#!o; literal 0 HcmV?d00001 diff --git a/gfx/evo/bubble.png b/gfx/evo/bubble.png new file mode 100644 index 0000000000000000000000000000000000000000..28fba397df3fb4fe5e6969ac8c53f367ee1b0713 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@koR_$$`v?mIOg(It##AMGW9o|uy5RmiaU$VUTd8Mj@ gODqq$%*qV>%JlJ`R#EtO|2&Z4p00i_>zopr0NZ9QyZ`_I literal 0 HcmV?d00001 diff --git a/gfx/evo/egg_hatch.png b/gfx/evo/egg_hatch.png new file mode 100644 index 0000000000000000000000000000000000000000..e45921e1fa6d3186a823b6c1ddb36fe624b24f55 GIT binary patch literal 107 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2U=UzpU|?Wy39JNBMxHK?Ar-fhfBc#Mu;2FZ z|Ia-C?VCLmq&15E*&nV?Yvb3J@LQX3foTydPYkyNAA{=;#z+g%(=YBwdxNxly85}S Ib4q9e0OAiH;{X5v literal 0 HcmV?d00001 diff --git a/gfx/font.asm b/gfx/font.asm new file mode 100644 index 0000000..465920b --- /dev/null +++ b/gfx/font.asm @@ -0,0 +1,66 @@ +FontExtra: +INCBIN "gfx/font/font_extra.2bpp" + +Font: +INCBIN "gfx/font/font.1bpp" + +FontBattleExtra: +INCBIN "gfx/font/font_battle_extra.2bpp" + +Frames: + table_width TEXTBOX_FRAME_TILES * LEN_1BPP_TILE, Frames +INCBIN "gfx/frames/1.1bpp" +INCBIN "gfx/frames/2.1bpp" +INCBIN "gfx/frames/3.1bpp" +INCBIN "gfx/frames/4.1bpp" +INCBIN "gfx/frames/5.1bpp" +INCBIN "gfx/frames/6.1bpp" +INCBIN "gfx/frames/7.1bpp" +INCBIN "gfx/frames/8.1bpp" + assert_table_length NUM_FRAMES +INCBIN "gfx/frames/9.1bpp" ; unused + +StatsScreenPageTilesGFX: +INCBIN "gfx/stats/stats_tiles.2bpp" + +EnemyHPBarBorderGFX: +INCBIN "gfx/battle/enemy_hp_bar_border.1bpp" + +HPExpBarBorderGFX: +INCBIN "gfx/battle/hp_exp_bar_border.1bpp" + +ExpBarGFX: +INCBIN "gfx/battle/expbar.2bpp" + +TownMapGFX: +INCBIN "gfx/pokegear/town_map.2bpp.lz" + +UnusedWeekdayKanjiGFX: ; unreferenced +INCBIN "gfx/font/unused_weekday_kanji.2bpp" + +PokegearPhoneIconGFX: +INCBIN "gfx/font/phone_icon.2bpp" + +UnusedBoldFontGFX: ; unreferenced +INCBIN "gfx/font/unused_bold_font.1bpp" + +TextboxSpaceGFX: +; StatsScreen_LoadTextboxSpaceGFX reads 2bpp; LoadFrame reads first half as 1bpp +INCBIN "gfx/font/space.2bpp" + +FontsExtra_SolidBlackGFX: +INCBIN "gfx/font/black.1bpp" + +UnusedUpArrowGFX: ; unreferenced +INCBIN "gfx/font/unused_up_arrow.1bpp" + +MobilePhoneTilesGFX: +INCBIN "gfx/mobile/phone_tiles.2bpp" + +MapEntryFrameGFX: +INCBIN "gfx/frames/map_entry_sign.2bpp" + +FontsExtra2_UpArrowGFX: +INCBIN "gfx/font/up_arrow.2bpp" + +INCLUDE "gfx/footprints.asm" diff --git a/gfx/font/bg_text.pal b/gfx/font/bg_text.pal new file mode 100644 index 0000000..39a4a19 --- /dev/null +++ b/gfx/font/bg_text.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 08, 19, 28 + RGB 05, 05, 16 + RGB 00, 00, 00 diff --git a/gfx/font/black.png b/gfx/font/black.png new file mode 100644 index 0000000000000000000000000000000000000000..e2bd6299c5234d2b1e221f37d9b46777a7d83e6e GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@;P!NJ45_%4oN$1TfkA?S T(e3tTZjiL6tDnm{r-UW|$5;p`{D8D5?|hxD6lbg<%mhCb6c&M&C2lcbl{1tuj3Z#HLpHss4l)n zv?w%sBV(KLhqi?h8_On0vCNQtH(O}S54HyGn+?~Bas?*n30)A-I+?hYC)_XpKqjN1 z#LZ|Xo`1UYl4kVY3HRyZ5&JPkM=Z%xY`$njbbEuROo4Qf-SWxxPPPoE&ui8)`Rq9- zWoO)XnMrBojfI?yUJ>F>XRQ5~wo0!P;N6`Qx9ow~9JSC(Jgn{P43E?s>JpF7(>-u> zO>ElJ16MK|4FwoppSLP`SX%cx>HkE7`=Ptft;m{MGgIpZcT9CH(~SE;_DnMj&a4nW zz_Drv;~xFmQo)JBD?~zWi_~)p2{q1}6Xv$(n811NMX$NJuOHvBq*FHFt9*-+VVGjc zc5jEUX_JqzJA7k5zh(zpitW7T>>5*TPDS#2HJo&DPM@pwIlDl_r2ejK+vEp~U)w(D zOGWTIocHwq%jvL`|6ymkWI&6UniGTVAH5x=5uuqipVm8YbLg4WD+O;{^v$I2ouuTG fSf>9MUjAb`I>RhfG~o+BC~GAr-fhep`{D8D5?|hxD6lbg<%mhCb6c&M&C2lcbl{1tuj3Z#HLpHss4l)n zv?w%sBV(KLhqi?h8_On0vCNQtH(O}S54HyGn+?~Bas?*n30)A-I+?hYC)_XpKqjN1 z#LZ|Xo`1UYl4kVY3HRyZ5&JPkM=Z%xY`$njbbEuROo4Qf-SWxxPPPoE&ui8)`Rq9- zWoO)XnMrBojfI?yUJ>F>XRQ5~wo0!P;N6`Qx9ow~9JSC(Jgn{P43E?s>JpF7(>-u> zO>ElJ16MK|4FwoppSLP`SX%cx>HkE7`=Ptft;m{MGgIpZcT9CH(~SE;_DnMj&a4nW zz_Drv;~xFmQo)JBD?~zWi_~)p2{q1}6Xv$(n811NMX$NJuOHvBq*FHFt9*-+VVGjc zc5jEUX_JqzJA7k5zh(zpitW7T>>5*TPDS#2HJo&DPM@pwIlDl_r2ejK+vEp~U)w(D zOGWTIocHwq%jvL`|6ymkWI&6UniGTVAH5x=5uuqipVm8YbLg4WD+O;{^v$I2ouuTG fSf>9MUjAb`I>RhfG~o+BC~2~% zKin;u6mW}ilE)K+FVdQ&MBb@013Hl;Q#;t literal 0 HcmV?d00001 diff --git a/gfx/font/font_extra.png b/gfx/font/font_extra.png new file mode 100644 index 0000000000000000000000000000000000000000..b9fbf811eceaf7dfda41cf40027eff13076994bd GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU=UzpU|?X_*lh5Xfq~(Hr;B4q#jVyr$1WB_ z4v{^2KW6MR`|-7b|ARK;`o^f!^CG9&o>7xXTC+|o_n^J^wr*WvanaZ;!$ijQ;tFS+ zej7-Lh#j|f|8VVTLj*_n`I|b&Lr*T?vXIoNYQ8u@;c(Wff0G(SI$r2^GUjY&tJ&J3 zUZWy6x$XFqgGTp0FxYLCh?uggV3qEl$ftL5KOGC5D$j6t_uCb7jxT%j)5BUlL6R{~ zyllyQPpe7HR=hW6Y~Q_ZVS12eT%`ArS^qe!Cj`6S-*uYbRl~9NTo%K6qn%3n>(hD+ mE$q2v9?n+GKd*U}|ABPp{?K46GwY8aKYP0RxvXXXHTvMroog5#+;)rJyNknlHd?3)qeNlm7RMSW;0qz ztliEc@nrU%7Xj?K`av&KA{sCIYIBu%YTw&lBrg#!puO?9=986o8C}0m+Rva>_gZA_ z%HwGbYQpLv4;lV^RXDQcbD`0l4{etVPA#)=tZ6xYGJ)kl8!rR%ocRq?R&#$i!XTU0 zZ*`M9sEzD<# zls8%YNNU2*9rMi@PNdr$5dO4UOp4F_U0rIclBMeI+gthGxm&+7w10NtbOYlv4IAf> z25&*m4@UdhJ_PK!Q7!n#?Bo3(3x7bP0l+XkKVO~}m literal 0 HcmV?d00001 diff --git a/gfx/font/french_german.png b/gfx/font/french_german.png new file mode 100644 index 0000000000000000000000000000000000000000..4e4545662e9ce01fc0a1ff5737e01449dfcb191a GIT binary patch literal 853 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU~ph!U|?X_%WJ{Jz`!iy>EaktajP}-V%J** z9+8^86XGL3Y@HA<{;Nu1ztWS?6LUMa*{0u2)y`ep=b6@%IWw@t<6@Av?4o;1!%cZh zzbRWpri!^f>A-S5Hz{a3X2p#>fkau{sPL_UoM1#a`zswcIHsQ(SZ?N-=z^ zBzM9Nrud95v0~Phjtw^-?$dDWHfM-A!L(&sc5_3?#D=y2PrlVpOP+pV%Hi%fc;cQ= z!iW5if`>Dn*d+&~Y&a0GX-0=?UNBMX;0uJpGNV-?4t-I$#OU8}V&qgfkADFD1l%`=}!_YCG;a98d?=1}Ci_0XZ z@&?~#N>*UFW?%Z^(DMrEjq_WJb{*cF9n+hMqV$D@QL6FFxV|x+k82NN?o)_9 z8^2QCex|{h6$-{Ie}pc5F<$YA>4WXYec>mjF-@6bu3ivSaI3B2hS_JPi%jp9sNX&% z*^_8$$f>*Y;`^uv3~EYm`I5!kH_bH!k{S()UVIa>@Rw`{u9v@09X&FQ1OZ Q3Q&IWboFyt=akR{07a3AdjJ3c literal 0 HcmV?d00001 diff --git a/gfx/font/overworld.png b/gfx/font/overworld.png new file mode 100644 index 0000000000000000000000000000000000000000..106c712dd4cde403a0d0dab5f70e1f108fc6e527 GIT binary patch literal 752 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU~ph!U|?X_%WJ{Jz`(TK)5S5Q;?~?y?{zYY zJT7aL=0EBTJ-yszjhh|oC$67URu&o0?5|P_l={lgbvyJ%K$ytfpeHrZq6fuQgphH7Trx*+7l`j*i3+#s?n`Z{F^G z&Q5m;cj(1Gd2e*z)bu*O_hU~|Sa9N`Q}X5ohpRR*DEuoDEqYsZE@1k>n-69*b6?}y zxoWKiW1IGe_GK9x&ncL47+Bx&_qyL;f|4n{q=`I`H{pJ~4Y540q@?PYWe zI4XSL`=xSmLCXd&$F05}w<{hxNA$f+K_7!PIO%+}j-j`?iaK5HNC_d~nH+Nwm$IjcL-0p>LW?NrNg!C7lS^V$H zv+118vuvkrd~#PmR>dLwFJD5`t4-(iBIYZ9sV|9$dVGCe=dTbkKJWA+CyE#zbZleX z8vJgd$Q!X6bz0kQHn84hSgGFNAN+2=xwG3-w~A}imvJxG&`_9i`5{Np?N8Ne!UfrX z7PGF|JgIffH;H+QN!Dy)OpLj`?cI`l9VefC#P?&y)q;(mPy8&N`|bN);b&?w9};2@ z2`>owq_JCW3d7`1-npf#&a6Kew&CaNorenqY!=)Tn763$C&L$+k_*v}3|h4u`8B6s znCkkpFjQIS?I@WMnpyKHWC1IS_^kF5A!k@uQ%m N?CI*~vd$@?2>@>fQb+&* literal 0 HcmV?d00001 diff --git a/gfx/font/overworld_space.png b/gfx/font/overworld_space.png new file mode 100644 index 0000000000000000000000000000000000000000..7261781325d46f223be54456856093e53fb476fd GIT binary patch literal 71 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@;PZ5G45_%49I>^FQJRUN Xeg@aVJ-IgpKq@?4{an^LB{Ts574#9l literal 0 HcmV?d00001 diff --git a/gfx/font/phone_icon.png b/gfx/font/phone_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..9e13a121b338c3dbf5c70b8b33c525dd5a8118a6 GIT binary patch literal 82 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@ko0tM45_%4oWRh;%=1TH iqJqbP;{<~e8ykb(GZwR$qwMcNialNZT-G@yGywp@hZBnc literal 0 HcmV?d00001 diff --git a/gfx/font/postal_mark.png b/gfx/font/postal_mark.png new file mode 100644 index 0000000000000000000000000000000000000000..3a4a6bd4bdc664ded16dfaea6657e3bc86f65984 GIT binary patch literal 78 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5cPC%45_%4{Nw+8#tw-Y f3!lvYFTldkxt{yeZ;5@|K?*%x{an^LB{Ts51b-L* literal 0 HcmV?d00001 diff --git a/gfx/font/space.png b/gfx/font/space.png new file mode 100644 index 0000000000000000000000000000000000000000..3233c135eef064b25509a4d998b5b91b87f6ab9b GIT binary patch literal 71 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@;PZ5G45_%4{Nw+8MrkI7 X{So{hFDvT(0IBeF^>bP0l+XkKHMtWS literal 0 HcmV?d00001 diff --git a/gfx/font/spanish_italian.png b/gfx/font/spanish_italian.png new file mode 100644 index 0000000000000000000000000000000000000000..5663800f142b79c97199e1177ef0afe78334904a GIT binary patch literal 865 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU~ph!U|?X_%WJ{Jz`(5G>EaktajP}-Y?p~5 zkI0_73E`0+ZcPXm-^2GLv?ZpsCiLRHpNZ3RXTFouogCt`^mNyv;I3&=uSCA;?Om0* zVzs|+P|Vdc#abV}h%VgW)V5=06_b#>rBK1cwOgNU2|CkNz~scPJWm8Qf4K<%;;*y-Fvu+?{ylZ!=FOYqPM%sSDb#3S8(PiYj$hQ z)v%m~hg^RS2lPZ(d+;)y(fjVpxwC@tKx>Xe_D*vS4{^>6j;T*JM7L>AH-8Y}z~lC9 z8bfn^_jZXi>k|?I)c360&$x z#1U5aTK)@5{3lPICc(9TmbzfgxmbhXZ$JGR1m@NCnyvd4DxGDk`=j&510JPIITO#Q z+`7pA;Nlt185=qNY-tckW!4BiA#cpSVex^)?T?$PWE=imlb`1rG%e}0rqB!H;zo`Q zwM!Tnc09VD7a3)JmnX|fzVRC~|(SKHB9|q8*y^;?O4Ov>M;RdG^*ro zv@T+OkW_xc^`9K?o6Ah+B2PMnIX4Km?(gSbbl)(5gJnx=gQUXRGiQ#TeZ=;|_v7cL zZq4$vW&dIf%HOx_!gTrFGKyXeCtaME`%V37Vi8cZZuj8=!9s;4pNFw*Mo!$u5w)`Ox#eWbLZ#;a(YnCIoywh-<)3=NqC`+~$^I?- b=CAv&y7%;lQ>!8tgYu52tDnm{r-UW|rU-;h literal 0 HcmV?d00001 diff --git a/gfx/font/unown_font.png b/gfx/font/unown_font.png new file mode 100644 index 0000000000000000000000000000000000000000..5ac70b8079b6bc06d7aa2945d4c44ec803be33c5 GIT binary patch literal 294 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7VDMmKU|?WqRw^oDU|@Lb>Eaktam#n2EFW0oaW1F8fnK4Z+dHcp*GW1S!?^w zDgR@pX)RcuGArw*=oDwa%QyS%7=m;U+n^|Jp~ z3(LP+uWs#C7QfwF$a?#^u;rOflQM^!ChXCleT0pQPcW+YUv66W|Hqw!%~t0_cCG!q zAz#}*)Z{tKx%hR@B2RmAW?kEN?w`QY1v@Ut*6aP&+LHM^rwJ4Qp00i_>zopr0NZYZ ACjbBd literal 0 HcmV?d00001 diff --git a/gfx/font/unused_bold_font.png b/gfx/font/unused_bold_font.png new file mode 100644 index 0000000000000000000000000000000000000000..e02b91ce266b7356f7212f90b0c1e574d65e34e1 GIT binary patch literal 575 zcmeAS@N?(olHy`uVBq!ia0y~yU}RumV31$}kyX(tkqit>Y@RNTAr-gQPI2sdV!-3d ze2cAQYEuq(Non&o#`vQT);fOPKd0o@)iY^TGK(yx{r#hAdGnEc)WzldO>b{`kv2Og z$Yrm`j$Q4gUrcMGdgfK`%zshOykix2Pg`5duMM0hF8;oh$gdFQz~_E%j~auq%Qkia z;SJWD&h0u4y}J)T>NMcEai&=@_Vm&vObSaQFQ?7;%usY|?SYjJ!3W>%R*~6pA~1zH zkXPH=$+%^`%$X-Oq_+Oo6U`;tDyvadX`iecp;rjIp7v1dY^ zCEs5w&=RVXU2=gnpyl_Z+f5QoUAhc4Hs%cMnJXFhx9&FdQ+L>}c_64EnQ01_z#Dfy zm1NOp4UP*Q9gCIJ{d|};pk;31gadANPo}57S=}VK;PwGay^CwZ_Lbk+>Q=?2^N;=3 zrR9FR+Zc{VM(3vq{IvQJXR!9>J?&W!?pG1?#SA)Z!z2P zncnBQw=h(_6PUa5a{?cm-9y3m|H`b~)=M4O|NDyJBjrvDlW@_ph-WtfHNHi#N~}G2 hKjLKNpS4F8J>btaw&!7uvpxh$8J@0wF6*2UngAgQ0($@e literal 0 HcmV?d00001 diff --git a/gfx/font/unused_up_arrow.png b/gfx/font/unused_up_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..cb62087aafe86b03de3152b57295b2c0e7d51b8d GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7VBlb4U|?YAsj84;U|^8-ba4!+xRv~apN*&B o6@SaG1pZ}wADT7U(o(os7|u3o-YPo(Z#77Rr>mdKI;Vst04in|S^xk5 literal 0 HcmV?d00001 diff --git a/gfx/font/unused_weekday_kanji.png b/gfx/font/unused_weekday_kanji.png new file mode 100644 index 0000000000000000000000000000000000000000..6eeb69b116d3d85a2cd065d76145877fd7dc44e7 GIT binary patch literal 142 zcmeAS@N?(olHy`uVBq!ia0y~yU~phyVBlb4U|?WS+qrKM0|P^-r;B4q#jQ}^jhqJ< zIJmzs#A|+O*f)>4Wsg#c=o+u-YRwrwO}`i!dZ(H8SaY{X>2;~4$`&u!x#{ZXMUhD& w;cFJ^Zj^ugeQx}*%da;WFLRZiZd!YQTVZizO!cO$O(2UrUHx3vIVCg!0LhUtiU0rr literal 0 HcmV?d00001 diff --git a/gfx/font/up_arrow.png b/gfx/font/up_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..6f2b957f0c8db668d36512c1111d0b483c07a682 GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@ko9zN45_%4{Nw+8#*Tk~ n(tjkJFKC$G*eKcZ?>{@kgzcQaoM)V91ZnVe^>bP0l+XkKCV(A_ literal 0 HcmV?d00001 diff --git a/gfx/footprints.asm b/gfx/footprints.asm new file mode 100644 index 0000000..6871fe9 --- /dev/null +++ b/gfx/footprints.asm @@ -0,0 +1,261 @@ +Footprints: + table_width LEN_1BPP_TILE * 4, Footprints + +INCBIN "gfx/footprints/bulbasaur.1bpp" +INCBIN "gfx/footprints/ivysaur.1bpp" +INCBIN "gfx/footprints/venusaur.1bpp" +INCBIN "gfx/footprints/charmander.1bpp" +INCBIN "gfx/footprints/charmeleon.1bpp" +INCBIN "gfx/footprints/charizard.1bpp" +INCBIN "gfx/footprints/squirtle.1bpp" +INCBIN "gfx/footprints/wartortle.1bpp" +INCBIN "gfx/footprints/blastoise.1bpp" +INCBIN "gfx/footprints/caterpie.1bpp" +INCBIN "gfx/footprints/metapod.1bpp" +INCBIN "gfx/footprints/butterfree.1bpp" +INCBIN "gfx/footprints/weedle.1bpp" +INCBIN "gfx/footprints/kakuna.1bpp" +INCBIN "gfx/footprints/beedrill.1bpp" +INCBIN "gfx/footprints/pidgey.1bpp" +INCBIN "gfx/footprints/pidgeotto.1bpp" +INCBIN "gfx/footprints/pidgeot.1bpp" +INCBIN "gfx/footprints/rattata.1bpp" +INCBIN "gfx/footprints/raticate.1bpp" +INCBIN "gfx/footprints/spearow.1bpp" +INCBIN "gfx/footprints/fearow.1bpp" +INCBIN "gfx/footprints/ekans.1bpp" +INCBIN "gfx/footprints/arbok.1bpp" +INCBIN "gfx/footprints/pikachu.1bpp" +INCBIN "gfx/footprints/raichu.1bpp" +INCBIN "gfx/footprints/sandshrew.1bpp" +INCBIN "gfx/footprints/sandslash.1bpp" +INCBIN "gfx/footprints/nidoran_f.1bpp" +INCBIN "gfx/footprints/nidorina.1bpp" +INCBIN "gfx/footprints/nidoqueen.1bpp" +INCBIN "gfx/footprints/nidoran_m.1bpp" +INCBIN "gfx/footprints/nidorino.1bpp" +INCBIN "gfx/footprints/nidoking.1bpp" +INCBIN "gfx/footprints/clefairy.1bpp" +INCBIN "gfx/footprints/clefable.1bpp" +INCBIN "gfx/footprints/vulpix.1bpp" +INCBIN "gfx/footprints/ninetales.1bpp" +INCBIN "gfx/footprints/jigglypuff.1bpp" +INCBIN "gfx/footprints/wigglytuff.1bpp" +INCBIN "gfx/footprints/zubat.1bpp" +INCBIN "gfx/footprints/golbat.1bpp" +INCBIN "gfx/footprints/oddish.1bpp" +INCBIN "gfx/footprints/gloom.1bpp" +INCBIN "gfx/footprints/vileplume.1bpp" +INCBIN "gfx/footprints/paras.1bpp" +INCBIN "gfx/footprints/parasect.1bpp" +INCBIN "gfx/footprints/venonat.1bpp" +INCBIN "gfx/footprints/venomoth.1bpp" +INCBIN "gfx/footprints/diglett.1bpp" +INCBIN "gfx/footprints/dugtrio.1bpp" +INCBIN "gfx/footprints/meowth.1bpp" +INCBIN "gfx/footprints/persian.1bpp" +INCBIN "gfx/footprints/psyduck.1bpp" +INCBIN "gfx/footprints/golduck.1bpp" +INCBIN "gfx/footprints/mankey.1bpp" +INCBIN "gfx/footprints/primeape.1bpp" +INCBIN "gfx/footprints/growlithe.1bpp" +INCBIN "gfx/footprints/arcanine.1bpp" +INCBIN "gfx/footprints/poliwag.1bpp" +INCBIN "gfx/footprints/poliwhirl.1bpp" +INCBIN "gfx/footprints/poliwrath.1bpp" +INCBIN "gfx/footprints/abra.1bpp" +INCBIN "gfx/footprints/kadabra.1bpp" +INCBIN "gfx/footprints/alakazam.1bpp" +INCBIN "gfx/footprints/machop.1bpp" +INCBIN "gfx/footprints/machoke.1bpp" +INCBIN "gfx/footprints/machamp.1bpp" +INCBIN "gfx/footprints/bellsprout.1bpp" +INCBIN "gfx/footprints/weepinbell.1bpp" +INCBIN "gfx/footprints/victreebel.1bpp" +INCBIN "gfx/footprints/tentacool.1bpp" +INCBIN "gfx/footprints/tentacruel.1bpp" +INCBIN "gfx/footprints/geodude.1bpp" +INCBIN "gfx/footprints/graveler.1bpp" +INCBIN "gfx/footprints/golem.1bpp" +INCBIN "gfx/footprints/ponyta.1bpp" +INCBIN "gfx/footprints/rapidash.1bpp" +INCBIN "gfx/footprints/slowpoke.1bpp" +INCBIN "gfx/footprints/slowbro.1bpp" +INCBIN "gfx/footprints/magnemite.1bpp" +INCBIN "gfx/footprints/magneton.1bpp" +INCBIN "gfx/footprints/farfetch_d.1bpp" +INCBIN "gfx/footprints/doduo.1bpp" +INCBIN "gfx/footprints/dodrio.1bpp" +INCBIN "gfx/footprints/seel.1bpp" +INCBIN "gfx/footprints/dewgong.1bpp" +INCBIN "gfx/footprints/grimer.1bpp" +INCBIN "gfx/footprints/muk.1bpp" +INCBIN "gfx/footprints/shellder.1bpp" +INCBIN "gfx/footprints/cloyster.1bpp" +INCBIN "gfx/footprints/gastly.1bpp" +INCBIN "gfx/footprints/haunter.1bpp" +INCBIN "gfx/footprints/gengar.1bpp" +INCBIN "gfx/footprints/onix.1bpp" +INCBIN "gfx/footprints/drowzee.1bpp" +INCBIN "gfx/footprints/hypno.1bpp" +INCBIN "gfx/footprints/krabby.1bpp" +INCBIN "gfx/footprints/kingler.1bpp" +INCBIN "gfx/footprints/voltorb.1bpp" +INCBIN "gfx/footprints/electrode.1bpp" +INCBIN "gfx/footprints/exeggcute.1bpp" +INCBIN "gfx/footprints/exeggutor.1bpp" +INCBIN "gfx/footprints/cubone.1bpp" +INCBIN "gfx/footprints/marowak.1bpp" +INCBIN "gfx/footprints/hitmonlee.1bpp" +INCBIN "gfx/footprints/hitmonchan.1bpp" +INCBIN "gfx/footprints/lickitung.1bpp" +INCBIN "gfx/footprints/koffing.1bpp" +INCBIN "gfx/footprints/weezing.1bpp" +INCBIN "gfx/footprints/rhyhorn.1bpp" +INCBIN "gfx/footprints/rhydon.1bpp" +INCBIN "gfx/footprints/chansey.1bpp" +INCBIN "gfx/footprints/tangela.1bpp" +INCBIN "gfx/footprints/kangaskhan.1bpp" +INCBIN "gfx/footprints/horsea.1bpp" +INCBIN "gfx/footprints/seadra.1bpp" +INCBIN "gfx/footprints/goldeen.1bpp" +INCBIN "gfx/footprints/seaking.1bpp" +INCBIN "gfx/footprints/staryu.1bpp" +INCBIN "gfx/footprints/starmie.1bpp" +INCBIN "gfx/footprints/mr__mime.1bpp" +INCBIN "gfx/footprints/scyther.1bpp" +INCBIN "gfx/footprints/jynx.1bpp" +INCBIN "gfx/footprints/electabuzz.1bpp" +INCBIN "gfx/footprints/magmar.1bpp" +INCBIN "gfx/footprints/pinsir.1bpp" +INCBIN "gfx/footprints/tauros.1bpp" +INCBIN "gfx/footprints/magikarp.1bpp" +INCBIN "gfx/footprints/gyarados.1bpp" +INCBIN "gfx/footprints/lapras.1bpp" +INCBIN "gfx/footprints/ditto.1bpp" +INCBIN "gfx/footprints/eevee.1bpp" +INCBIN "gfx/footprints/vaporeon.1bpp" +INCBIN "gfx/footprints/jolteon.1bpp" +INCBIN "gfx/footprints/flareon.1bpp" +INCBIN "gfx/footprints/porygon.1bpp" +INCBIN "gfx/footprints/omanyte.1bpp" +INCBIN "gfx/footprints/omastar.1bpp" +INCBIN "gfx/footprints/kabuto.1bpp" +INCBIN "gfx/footprints/kabutops.1bpp" +INCBIN "gfx/footprints/aerodactyl.1bpp" +INCBIN "gfx/footprints/snorlax.1bpp" +INCBIN "gfx/footprints/articuno.1bpp" +INCBIN "gfx/footprints/zapdos.1bpp" +INCBIN "gfx/footprints/moltres.1bpp" +INCBIN "gfx/footprints/dratini.1bpp" +INCBIN "gfx/footprints/dragonair.1bpp" +INCBIN "gfx/footprints/dragonite.1bpp" +INCBIN "gfx/footprints/mewtwo.1bpp" +INCBIN "gfx/footprints/mew.1bpp" +INCBIN "gfx/footprints/chikorita.1bpp" +INCBIN "gfx/footprints/bayleef.1bpp" +INCBIN "gfx/footprints/meganium.1bpp" +INCBIN "gfx/footprints/cyndaquil.1bpp" +INCBIN "gfx/footprints/quilava.1bpp" +INCBIN "gfx/footprints/typhlosion.1bpp" +INCBIN "gfx/footprints/totodile.1bpp" +INCBIN "gfx/footprints/croconaw.1bpp" +INCBIN "gfx/footprints/feraligatr.1bpp" +INCBIN "gfx/footprints/sentret.1bpp" +INCBIN "gfx/footprints/furret.1bpp" +INCBIN "gfx/footprints/hoothoot.1bpp" +INCBIN "gfx/footprints/noctowl.1bpp" +INCBIN "gfx/footprints/ledyba.1bpp" +INCBIN "gfx/footprints/ledian.1bpp" +INCBIN "gfx/footprints/spinarak.1bpp" +INCBIN "gfx/footprints/ariados.1bpp" +INCBIN "gfx/footprints/crobat.1bpp" +INCBIN "gfx/footprints/chinchou.1bpp" +INCBIN "gfx/footprints/lanturn.1bpp" +INCBIN "gfx/footprints/pichu.1bpp" +INCBIN "gfx/footprints/cleffa.1bpp" +INCBIN "gfx/footprints/igglybuff.1bpp" +INCBIN "gfx/footprints/togepi.1bpp" +INCBIN "gfx/footprints/togetic.1bpp" +INCBIN "gfx/footprints/natu.1bpp" +INCBIN "gfx/footprints/xatu.1bpp" +INCBIN "gfx/footprints/mareep.1bpp" +INCBIN "gfx/footprints/flaaffy.1bpp" +INCBIN "gfx/footprints/ampharos.1bpp" +INCBIN "gfx/footprints/bellossom.1bpp" +INCBIN "gfx/footprints/marill.1bpp" +INCBIN "gfx/footprints/azumarill.1bpp" +INCBIN "gfx/footprints/sudowoodo.1bpp" +INCBIN "gfx/footprints/politoed.1bpp" +INCBIN "gfx/footprints/hoppip.1bpp" +INCBIN "gfx/footprints/skiploom.1bpp" +INCBIN "gfx/footprints/jumpluff.1bpp" +INCBIN "gfx/footprints/aipom.1bpp" +INCBIN "gfx/footprints/sunkern.1bpp" +INCBIN "gfx/footprints/sunflora.1bpp" +INCBIN "gfx/footprints/yanma.1bpp" +INCBIN "gfx/footprints/wooper.1bpp" +INCBIN "gfx/footprints/quagsire.1bpp" +INCBIN "gfx/footprints/espeon.1bpp" +INCBIN "gfx/footprints/umbreon.1bpp" +INCBIN "gfx/footprints/murkrow.1bpp" +INCBIN "gfx/footprints/slowking.1bpp" +INCBIN "gfx/footprints/misdreavus.1bpp" +INCBIN "gfx/footprints/unown.1bpp" +INCBIN "gfx/footprints/wobbuffet.1bpp" +INCBIN "gfx/footprints/girafarig.1bpp" +INCBIN "gfx/footprints/pineco.1bpp" +INCBIN "gfx/footprints/forretress.1bpp" +INCBIN "gfx/footprints/dunsparce.1bpp" +INCBIN "gfx/footprints/gligar.1bpp" +INCBIN "gfx/footprints/steelix.1bpp" +INCBIN "gfx/footprints/snubbull.1bpp" +INCBIN "gfx/footprints/granbull.1bpp" +INCBIN "gfx/footprints/qwilfish.1bpp" +INCBIN "gfx/footprints/scizor.1bpp" +INCBIN "gfx/footprints/shuckle.1bpp" +INCBIN "gfx/footprints/heracross.1bpp" +INCBIN "gfx/footprints/sneasel.1bpp" +INCBIN "gfx/footprints/teddiursa.1bpp" +INCBIN "gfx/footprints/ursaring.1bpp" +INCBIN "gfx/footprints/slugma.1bpp" +INCBIN "gfx/footprints/magcargo.1bpp" +INCBIN "gfx/footprints/swinub.1bpp" +INCBIN "gfx/footprints/piloswine.1bpp" +INCBIN "gfx/footprints/corsola.1bpp" +INCBIN "gfx/footprints/remoraid.1bpp" +INCBIN "gfx/footprints/octillery.1bpp" +INCBIN "gfx/footprints/delibird.1bpp" +INCBIN "gfx/footprints/mantine.1bpp" +INCBIN "gfx/footprints/skarmory.1bpp" +INCBIN "gfx/footprints/houndour.1bpp" +INCBIN "gfx/footprints/houndoom.1bpp" +INCBIN "gfx/footprints/kingdra.1bpp" +INCBIN "gfx/footprints/phanpy.1bpp" +INCBIN "gfx/footprints/donphan.1bpp" +INCBIN "gfx/footprints/porygon2.1bpp" +INCBIN "gfx/footprints/stantler.1bpp" +INCBIN "gfx/footprints/smeargle.1bpp" +INCBIN "gfx/footprints/tyrogue.1bpp" +INCBIN "gfx/footprints/hitmontop.1bpp" +INCBIN "gfx/footprints/smoochum.1bpp" +INCBIN "gfx/footprints/elekid.1bpp" +INCBIN "gfx/footprints/magby.1bpp" +INCBIN "gfx/footprints/miltank.1bpp" +INCBIN "gfx/footprints/blissey.1bpp" +INCBIN "gfx/footprints/raikou.1bpp" +INCBIN "gfx/footprints/entei.1bpp" +INCBIN "gfx/footprints/suicune.1bpp" +INCBIN "gfx/footprints/larvitar.1bpp" +INCBIN "gfx/footprints/pupitar.1bpp" +INCBIN "gfx/footprints/tyranitar.1bpp" +INCBIN "gfx/footprints/lugia.1bpp" +INCBIN "gfx/footprints/ho_oh.1bpp" +INCBIN "gfx/footprints/celebi.1bpp" +INCBIN "gfx/footprints/252.1bpp" +INCBIN "gfx/footprints/253.1bpp" +INCBIN "gfx/footprints/254.1bpp" +INCBIN "gfx/footprints/255.1bpp" +INCBIN "gfx/footprints/256.1bpp" + + assert_table_length $100 diff --git a/gfx/footprints/252.png b/gfx/footprints/252.png new file mode 100644 index 0000000000000000000000000000000000000000..723c3f8ee586039aba277864202d8f225e15691c GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Hl8kyAr-fLdoFS^CbP0l+XkK8^$K3 literal 0 HcmV?d00001 diff --git a/gfx/footprints/253.png b/gfx/footprints/253.png new file mode 100644 index 0000000000000000000000000000000000000000..e2d08e9f29e45d24e3f06a2a3165b6c73614d62f GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Hl8kyAr-fh6C4LPElU1NndMGaO3#m(QQZc=hjp{*b@_?E|F$v#S_0ytEZc TS^v955@epItDnm{r-UW|MaL>< literal 0 HcmV?d00001 diff --git a/gfx/footprints/254.png b/gfx/footprints/254.png new file mode 100644 index 0000000000000000000000000000000000000000..3d7561d560a86b8f31d0e48e1352458802466e86 GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1cAhSdAr-fLdoFS^D2On% zvK5FfWQ^L&8}-zYc}DG2g*(SJKU_*XHS57G)?2JAxZgx8a-MyBsU!XPHsj=4dG?p- VLRsQ{f|o%idb;|#taD0e0su#WC9(hj literal 0 HcmV?d00001 diff --git a/gfx/footprints/255.png b/gfx/footprints/255.png new file mode 100644 index 0000000000000000000000000000000000000000..05ae4b6656306d56f7704415c5a580114d097c7a GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1R-P`7Ar-fh6C4LPElU1Nna>PbK}!&tXVny!!V)f5_ke_5srW*;R}gSf&W` TB)w${1exdQ>gTe~DWM4f8Z#(( literal 0 HcmV?d00001 diff --git a/gfx/footprints/abra.png b/gfx/footprints/abra.png new file mode 100644 index 0000000000000000000000000000000000000000..cb995d44d210ac0de7cd900bff315672e7e0a325 GIT binary patch literal 92 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1%APKcAr-fh6C9Y?*c=`; s^Y;As%!?f?5O}dw&eL>nhUHx3vIVCg!0Dip}2><{9 literal 0 HcmV?d00001 diff --git a/gfx/footprints/aerodactyl.png b/gfx/footprints/aerodactyl.png new file mode 100644 index 0000000000000000000000000000000000000000..cf581d7e078ee7ab0d32f95e36320f6d72a81e5a GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1N}eu`Ar-fh6BwA8( mXRpB$!K1{eK7)V3YZeAiMUFkqk4}MfF?hQAxvXrz?T*BJQAjQNG^IYUXMeEruAOk#I{an^LB{Ts5 D{5l?0 literal 0 HcmV?d00001 diff --git a/gfx/footprints/ampharos.png b/gfx/footprints/ampharos.png new file mode 100644 index 0000000000000000000000000000000000000000..d6c50ddd5dd1ade0183d4a9795eeb8fa630aace1 GIT binary patch literal 89 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn13Z5>GAr-fh6C4$gB$<<|7V}e;N8Ia?Eim$2adM?{~N1*+8Zb^Fw8rvxcHTb^b(LMp00i_ I>zopr04_@-O#lD@ literal 0 HcmV?d00001 diff --git a/gfx/footprints/ariados.png b/gfx/footprints/ariados.png new file mode 100644 index 0000000000000000000000000000000000000000..9209e426699d308202ea32f6049b004be9cbed65 GIT binary patch literal 84 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1(w;7kAr-fh6AtiKoMYzv k{omoye|d$EHyawN7|u*(waCsbwE-#jboFyt=akR{04SLkmH+?% literal 0 HcmV?d00001 diff --git a/gfx/footprints/articuno.png b/gfx/footprints/articuno.png new file mode 100644 index 0000000000000000000000000000000000000000..1d7b40fdc0e88a5bf5e0c3814e6211ece33d35f8 GIT binary patch literal 118 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1ww^AIAr-emPaWhuV8G*i zkzeY7a%pKZ`w6Y4819vm=Pf$C`vo&6`$^9eYOey^LOY+ms9t++Uio9SPfmY+GjIrs UvGJ;!eFGWj>FVdQ&MBb@0DW;LRsaA1 literal 0 HcmV?d00001 diff --git a/gfx/footprints/azumarill.png b/gfx/footprints/azumarill.png new file mode 100644 index 0000000000000000000000000000000000000000..c20e5a73364f1bc24766535ad46c0e314933d1a4 GIT binary patch literal 84 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1(w;7kAr-fh6C4=+@jD#) j$8X29hQ-l9KEZ*Rf&V9u(oR`{Hz4Jnu6{1-oD!MbP0l+XkK9cUJN literal 0 HcmV?d00001 diff --git a/gfx/footprints/beedrill.png b/gfx/footprints/beedrill.png new file mode 100644 index 0000000000000000000000000000000000000000..b1b201a6b3914bb587669513a61d8ccada2f6fac GIT binary patch literal 83 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Ql2i3Ar-fh6Atk5F&G-p i_`#s^;~`4~4?6?HnLJht{rL&rAl06(elF{r5}E*)e-hdN literal 0 HcmV?d00001 diff --git a/gfx/footprints/bellossom.png b/gfx/footprints/bellossom.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/bellsprout.png b/gfx/footprints/bellsprout.png new file mode 100644 index 0000000000000000000000000000000000000000..bfec0b00fb2cd4eb9c934334ee140f544c5d36f0 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1hMq2tAr-fh6C7A=98Mgl zX^=c&V!@--sop literal 0 HcmV?d00001 diff --git a/gfx/footprints/blastoise.png b/gfx/footprints/blastoise.png new file mode 100644 index 0000000000000000000000000000000000000000..3884cf2d8083e8da24beb7c6558a91c73e8ad734 GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1#-1*YAr-fh6BwAEF*`K< zXP!{_?=vIYzt8jS4LhyF49NZN18V_4J0Epj>C;uc7or>mdKI;Vst0MEJ^nE(I) literal 0 HcmV?d00001 diff --git a/gfx/footprints/bulbasaur.png b/gfx/footprints/bulbasaur.png new file mode 100644 index 0000000000000000000000000000000000000000..b72f4ef2806948f2b356f04167b9e9e410aca1ef GIT binary patch literal 87 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1a-J@ZAr-fh6Ap0kF>L&p nu8{a&e)5C=%qlbN6RvVF#HMrHHElUHAEd+6)z4*}Q$iB}Mp+lD literal 0 HcmV?d00001 diff --git a/gfx/footprints/butterfree.png b/gfx/footprints/butterfree.png new file mode 100644 index 0000000000000000000000000000000000000000..159adbdef86f62ae4ca23e7f99a0df75d5dcea1f GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1GM+AuAr-fh6C9Y&us5*$ lXO~F)&pz4VM3d-Z28OxQxbh9&iG2pC_jL7hS?83{1OVut6?gyu literal 0 HcmV?d00001 diff --git a/gfx/footprints/caterpie.png b/gfx/footprints/caterpie.png new file mode 100644 index 0000000000000000000000000000000000000000..bd50e57bb46789148e280f17dd628efb58fedcc9 GIT binary patch literal 79 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1VxBIJAr-fh6Atjt;Ai0c e$8W%N<|sQucMx-{5l@Z|NTsK%pUXO@geCw*QxQA> literal 0 HcmV?d00001 diff --git a/gfx/footprints/celebi.png b/gfx/footprints/celebi.png new file mode 100644 index 0000000000000000000000000000000000000000..4300c77ac4865988600f7fc462c0c047b88b6c14 GIT binary patch literal 83 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Ql2i3Ar-fh6Ap0ZIJEp_ jR5>x) BAQS)q literal 0 HcmV?d00001 diff --git a/gfx/footprints/charmander.png b/gfx/footprints/charmander.png new file mode 100644 index 0000000000000000000000000000000000000000..e2afb6a89626106e53179d817880b70a798bc3d1 GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1ik>cxAr-fh6CBvt8*V%> qm|*aaN9E1`#|l6GAK-Y#@3D(Ygr+Ar-fh6C9Y>6OKIO wclh)ks)}pNRL=)nIA~2r>mdKI;Vst06udXg8%>k literal 0 HcmV?d00001 diff --git a/gfx/footprints/chikorita.png b/gfx/footprints/chikorita.png new file mode 100644 index 0000000000000000000000000000000000000000..e4c2833ea25792831b15a5c7d01d291db6ef9f29 GIT binary patch literal 80 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1;+`&!Ar-fh6BL*X>KTOo f)F-ga=w@bM=zPWexBteB#UQ1gu6{1-oD!Ml8lT z|Hr_5SpFX~&zb-K>mAhoeW*`J_;H|y!K-14!HxgyuM++>q_8pcB#U_j?J3X$nd9l| K=d#Wzp$Py>^&=?& literal 0 HcmV?d00001 diff --git a/gfx/footprints/clefairy.png b/gfx/footprints/clefairy.png new file mode 100644 index 0000000000000000000000000000000000000000..09f5d6b95fe22f5cc44a170d579d50c2b2cb8ca0 GIT binary patch literal 89 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn13Z5>GAr-fh6C9Y&us5*$ oXO~F)&)&LWW20b#UIZr>14BbI=iHVXo#G%pp00i_>zopr05dZc>Hq)$ literal 0 HcmV?d00001 diff --git a/gfx/footprints/cleffa.png b/gfx/footprints/cleffa.png new file mode 100644 index 0000000000000000000000000000000000000000..2cd7e79039d075e8a8d576dcc2fe86d7956fecfc GIT binary patch literal 78 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1qMj~}Ar-fh6BL*X>KTOo d)F fXK%oC<|sSE+-uB#r2~(A0IBqJ^>bP0l+XkKbiNbx literal 0 HcmV?d00001 diff --git a/gfx/footprints/crobat.png b/gfx/footprints/crobat.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/croconaw.png b/gfx/footprints/croconaw.png new file mode 100644 index 0000000000000000000000000000000000000000..784fc5cc19ad984de55ebe461b7ee05bbd4a1d6b GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1GM+AuAr-fh6CBv(8)iJ` lpYY(ge@%nn8TJV!%nWmWas7$2{^AN!@9FC2vd$@?2>=wC7XSbN literal 0 HcmV?d00001 diff --git a/gfx/footprints/cubone.png b/gfx/footprints/cubone.png new file mode 100644 index 0000000000000000000000000000000000000000..c1fe8ebe7a1cd7ee1247a45f1c8734adbf63f1c8 GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1GM+AuAr-fh6ArM=;Ai0c l$8T`xA3qnP7_;_476#|Z9Hyx$vG+mhJzf1=);T3K0RXvq6JG!T literal 0 HcmV?d00001 diff --git a/gfx/footprints/cyndaquil.png b/gfx/footprints/cyndaquil.png new file mode 100644 index 0000000000000000000000000000000000000000..f41e90a002591c1ec43bba3c9cd56fcab30811d7 GIT binary patch literal 83 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Ql2i3Ar-fh6Ap0B;Ai0c j$M10HAHN#ov;!;*;tSc=760~i2C4RR^>bP0l+XkKvyv1r literal 0 HcmV?d00001 diff --git a/gfx/footprints/delibird.png b/gfx/footprints/delibird.png new file mode 100644 index 0000000000000000000000000000000000000000..277bd9d2c429c6bd731673c98ab1674a25c42a97 GIT binary patch literal 89 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn13Z5>GAr-fh6C4=kF&i9u p#ynwzyXwFH2UQLT{b8SQhJhjWq=1c$`IqA$J)W+9F6*2UngD?=7|;L! literal 0 HcmV?d00001 diff --git a/gfx/footprints/dewgong.png b/gfx/footprints/dewgong.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/diglett.png b/gfx/footprints/diglett.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/ditto.png b/gfx/footprints/ditto.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/dodrio.png b/gfx/footprints/dodrio.png new file mode 100644 index 0000000000000000000000000000000000000000..947eeb1bee9db948ff467e5a7b1f95658e75a937 GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1mYyz-Ar-ewPaNcAP~c%X z*jmFHy^%SZ|3<)pe1)ox?-Dy$*=D?Wa{Tc&QQq5i^`RUIZ4V|pot(3s`TusouYw_a QkAV#HboFyt=akR{0I54A1^@s6 literal 0 HcmV?d00001 diff --git a/gfx/footprints/doduo.png b/gfx/footprints/doduo.png new file mode 100644 index 0000000000000000000000000000000000000000..43b2878fd672c4abb4da1ec429bada18e8cde09e GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1`kpS1Ar-fh6C4_t&lo&n zw(r@nu~Df0-~a9D8~*?Q&(Hk%|9^Ig2A>5i|Jm707#Kol^FOT>x;zPFgr}>Y%Q~lo FCIG9(As7Gv literal 0 HcmV?d00001 diff --git a/gfx/footprints/donphan.png b/gfx/footprints/donphan.png new file mode 100644 index 0000000000000000000000000000000000000000..a523afd479e7a42063071a269d088d6092f4e7af GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1#-1*YAr-fh6BwAEF*`K< zXP)w4`~T04jsO4GYaIM@{2xPrj7GD9{-4k2_2GXa1H)$-#j;us_h%sOp00i_>zopr013t) A9RL6T literal 0 HcmV?d00001 diff --git a/gfx/footprints/dratini.png b/gfx/footprints/dratini.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/drowzee.png b/gfx/footprints/drowzee.png new file mode 100644 index 0000000000000000000000000000000000000000..5b107a9100d93dff7fa9c5c9f8cddb4609076640 GIT binary patch literal 87 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1a-J@ZAr-fh6C9ZTm^mE! nXW#SV|9=KKriFd~`CY6T{mdKI;Vst0Pmz97ytkO literal 0 HcmV?d00001 diff --git a/gfx/footprints/ekans.png b/gfx/footprints/ekans.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/electabuzz.png b/gfx/footprints/electabuzz.png new file mode 100644 index 0000000000000000000000000000000000000000..4cbc6165854d9e3fdda135451e8b85fc28b2a095 GIT binary patch literal 98 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1nw~C>Ar-fh6D$%A9AHqi yt4T;m`1hZEX2OsEjO>Z^3?3hh4{*q_aWF7EXA literal 0 HcmV?d00001 diff --git a/gfx/footprints/entei.png b/gfx/footprints/entei.png new file mode 100644 index 0000000000000000000000000000000000000000..f1edae48fbe0401cb167aa2553485f66708627c7 GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn12A(dCAr-fh6BwAEF+0@! zV`gUl|NlID!;$~|0!@-G27mt7Gq@Ni2!E>&;P}Tc(9E!Olk_av?e{?jF?hQAxvX} j&o1zh-OZr>z*;$mseUXrcUJD03R3Oq>gTe~DWM4f$Db7{ literal 0 HcmV?d00001 diff --git a/gfx/footprints/exeggcute.png b/gfx/footprints/exeggcute.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/exeggutor.png b/gfx/footprints/exeggutor.png new file mode 100644 index 0000000000000000000000000000000000000000..e4c92e9c853e3d08b490e2b774be76cea81d52fc GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1+MX_sAr-fh6BwGA&+zb^ zk^jN(!13?@e|rIi8UO#=Gbl>@`_C?Q;6G!M0E0M};-=cIE_XoMJzf1=);T3K0RW>k B9CH8w literal 0 HcmV?d00001 diff --git a/gfx/footprints/farfetch_d.png b/gfx/footprints/farfetch_d.png new file mode 100644 index 0000000000000000000000000000000000000000..074cfa2368609a0c7ad9a9e255756b9425b14e5e GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1CY~;iAr-fh6C4=QBoYtT zKVWYD`}4EB#E<{~?HLqj{QsZcAi(qgKLh7)eut+23_S^LvltmZYYCg}?%Q+@WR9n+ KpUXO@geCx7y*(N$6F{bTy85}S Ib4q9e0E3AhUH||9 literal 0 HcmV?d00001 diff --git a/gfx/footprints/feraligatr.png b/gfx/footprints/feraligatr.png new file mode 100644 index 0000000000000000000000000000000000000000..44746d808a3ad375c800943bbb06c976d16d1440 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1N}eu`Ar-fh6BwB1F)KV` rp0I&YxW1vqHm>PEGuOcyh9m)o^t=52OxKq+fpmGg`njxgN@xNAS9TV% literal 0 HcmV?d00001 diff --git a/gfx/footprints/flaaffy.png b/gfx/footprints/flaaffy.png new file mode 100644 index 0000000000000000000000000000000000000000..f827fff9da7ee926ce05796f15f0e8655c1c8c0d GIT binary patch literal 80 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1;+`&!Ar-fh6Atjt;6K3e gkADVB1QRO*!?C+;ZpLezR)Lgyy85}Sb4q9e0B(>HtN;K2 literal 0 HcmV?d00001 diff --git a/gfx/footprints/flareon.png b/gfx/footprints/flareon.png new file mode 100644 index 0000000000000000000000000000000000000000..0e3bd7360716e46edb42c1bc5510dbf3f65c8af4 GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1CY~;iAr-fh6ArM=;AiMO z|Ge?Y|Njp6{{Lr}nDPGxb0_~Fhnf6;96Ig4IUM@OKjFduh9$xbX0H5|ok|Plg3R%B L^>bP0l+XkKz^NsB literal 0 HcmV?d00001 diff --git a/gfx/footprints/forretress.png b/gfx/footprints/forretress.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/furret.png b/gfx/footprints/furret.png new file mode 100644 index 0000000000000000000000000000000000000000..c1ed30f8b5a15c10e5080d34a2639a6d457ed477 GIT binary patch literal 80 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1;+`&!Ar-fh6Ap0B;Ai0c f$3KH5f{C4h;g%w6^Hsj4n;@m0u6{1-oD!MnqKTjzrIm4dW+y85}Sb4q9e08%FwAOHXW literal 0 HcmV?d00001 diff --git a/gfx/footprints/goldeen.png b/gfx/footprints/goldeen.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/golduck.png b/gfx/footprints/golduck.png new file mode 100644 index 0000000000000000000000000000000000000000..bc8355740f251d00a3b01fc01daed1529a8d9bb5 GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1#-1*YAr-fhA0(z(9AHp; z^OL{6LFoDU`h*An|NmzYI{4?mJ#$OKkN@m$H|iOL{;*33FfeTTEOna4dF5r0F`lk| JF6*2UngDIlBgFs! literal 0 HcmV?d00001 diff --git a/gfx/footprints/golem.png b/gfx/footprints/golem.png new file mode 100644 index 0000000000000000000000000000000000000000..b4697f0d064076eb5c2e8aa5252cc2a3611f10d2 GIT binary patch literal 102 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1x}GkMAr-fh6BwA~1fHd* zB|NY{fBwLMKmYBgB>ec#&YsAx^uwNk^BHqNQzIk8gLCaigS4P=0)tDnm{r-UW| DHcucN literal 0 HcmV?d00001 diff --git a/gfx/footprints/granbull.png b/gfx/footprints/granbull.png new file mode 100644 index 0000000000000000000000000000000000000000..27cf20f0fb2021d1923580e8cc0e8abef42c9738 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1+MX_sAr-fh6C9Z5pEouz zsJE+cX#DxVUgO~Z|Nq%lm=q6w_-`M;{-0gtErXD-v_p;~*F}(aPgg&ebxsLQ0N*7Y AQ2+n{ literal 0 HcmV?d00001 diff --git a/gfx/footprints/graveler.png b/gfx/footprints/graveler.png new file mode 100644 index 0000000000000000000000000000000000000000..1f9dbb18e5cdd86751a9e93c0a3d3beca82e8faa GIT binary patch literal 97 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn18lEnWAr-fh6ArN1%}-BA y_*e6ff%)_Q{{c-8|JSqe9QwyU;lclgCBh8vHVFSYo_PKaNUx`>pUXO@geCy`7$GYF literal 0 HcmV?d00001 diff --git a/gfx/footprints/grimer.png b/gfx/footprints/grimer.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/growlithe.png b/gfx/footprints/growlithe.png new file mode 100644 index 0000000000000000000000000000000000000000..42c792ad1ce6b19c91459e195add5ae3f898b407 GIT binary patch literal 92 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1%APKcAr-fh6C4b7-hb|Ofdr>mdKI;Vst0O<4@6#xJL literal 0 HcmV?d00001 diff --git a/gfx/footprints/gyarados.png b/gfx/footprints/gyarados.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/haunter.png b/gfx/footprints/haunter.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/heracross.png b/gfx/footprints/heracross.png new file mode 100644 index 0000000000000000000000000000000000000000..d55ab2bb0973f0c662496c8a98cb08db0bd2d919 GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1ik>cxAr-fh6B-(r4Vr#3 qb0r?&QF-$}S?EuF0!xG}4+Fzj1)jdf!`p9xGcxAr-fh6C4=+@jD#) q$IsXFpWlbmMRtY-gYu7sX$%ZAr-fh6C4gTe~DWM4f;@2OH literal 0 HcmV?d00001 diff --git a/gfx/footprints/hoothoot.png b/gfx/footprints/hoothoot.png new file mode 100644 index 0000000000000000000000000000000000000000..8eda30c9b4db4404dc8ef14df3898ec543f3178b GIT binary patch literal 107 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1MxHK?Ar-fh6C9Y${y041 z|Iet=eV?u4=l>f9AO8RU-`@E1|9^fSo^Sshh3Xwv@h`|`XLz)Wmo4Sy&Rrl=JYD@< J);T3K0RUq5B+&o> literal 0 HcmV?d00001 diff --git a/gfx/footprints/hoppip.png b/gfx/footprints/hoppip.png new file mode 100644 index 0000000000000000000000000000000000000000..a692ad323f3e76043f25d59bc49cc750e2f06e59 GIT binary patch literal 80 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1;+`&!Ar-fh6Atjt;Ai0c f$FIQ>!NbnLu)K(+<>6wvjL&jSZO|KHEZ{Q3WXhnfHXOD<^nD=)&dgn5xT2Lt;`;kWE>k6s6v;_2$= Jvd$@?2>@RvBzgb< literal 0 HcmV?d00001 diff --git a/gfx/footprints/houndour.png b/gfx/footprints/houndour.png new file mode 100644 index 0000000000000000000000000000000000000000..16ddff2d80e6eabe510d9c4bdfa3910104ede4ec GIT binary patch literal 93 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1DxNNmAr-fh6ArM=;AiOM t|Krf~pLxQM|MDI;{yQoj5K1W3U|^_yz-8>WO!GcSpQo#z%Q~loCIIg<8VUda literal 0 HcmV?d00001 diff --git a/gfx/footprints/hypno.png b/gfx/footprints/hypno.png new file mode 100644 index 0000000000000000000000000000000000000000..0f0be0f38eeb6670a086aa5a2f8fc2d7f4c22b9d GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1TAnVBAr-fh6BwAEF*`i^ zT&eK*^G{};Gynf5t4sX*pYEXc=KleXfBXW?42u@a*oRe^?E&fbboFyt=akR{0REXD AAOHXW literal 0 HcmV?d00001 diff --git a/gfx/footprints/igglybuff.png b/gfx/footprints/igglybuff.png new file mode 100644 index 0000000000000000000000000000000000000000..c6a5bda00a82d2742cc6fb63ed8e531c9d95f1d3 GIT binary patch literal 84 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1(w;7kAr-fh6Ap0BuxH@> jXYX)G&avSr--Bx`3=AD?#VOrEMIhy#u6{1-oD!M<)J7Dz literal 0 HcmV?d00001 diff --git a/gfx/footprints/ivysaur.png b/gfx/footprints/ivysaur.png new file mode 100644 index 0000000000000000000000000000000000000000..72db459a6c94de14cbc756f0a21f091388a8cfdb GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1+MX_sAr-fh6CBvt9eyxO z`1427_|LAD_OD@yG{cJJ5>J;}I`M(Dd%F6$taD0e0ssWR B9>)Lx literal 0 HcmV?d00001 diff --git a/gfx/footprints/jigglypuff.png b/gfx/footprints/jigglypuff.png new file mode 100644 index 0000000000000000000000000000000000000000..e0d259bf039f94211a4425477ba8fb0a84cbbb9e GIT binary patch literal 84 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1(w;7kAr-fh6C4w=d#Wzp$PzS+#Z<# literal 0 HcmV?d00001 diff --git a/gfx/footprints/jumpluff.png b/gfx/footprints/jumpluff.png new file mode 100644 index 0000000000000000000000000000000000000000..7942f9e7f7028960c93eb8e688117059176806d4 GIT binary patch literal 84 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1(w;7kAr-fh6Ap0BuxH@> kXYX)Gu9v}E=D;dW2026abtm-%zJio{y85}Sb4q9e0Krle9RL6T literal 0 HcmV?d00001 diff --git a/gfx/footprints/jynx.png b/gfx/footprints/jynx.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/kabuto.png b/gfx/footprints/kabuto.png new file mode 100644 index 0000000000000000000000000000000000000000..41dd30829a834a34bd2426c6934098ef2e84f580 GIT binary patch literal 74 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1f}SppAr-fh6BL*XFVdQ&MBb@0H*91asU7T literal 0 HcmV?d00001 diff --git a/gfx/footprints/kadabra.png b/gfx/footprints/kadabra.png new file mode 100644 index 0000000000000000000000000000000000000000..e4b202156f01cb6b7ffce1f04fbbe0a2707d2b6f GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1hMq2tAr-fh6BwGAZ5$po z^D;AkX0O&b_~AMKgs=bYjShbJ&)>7*KZD8-{sSCoY#fXXn%{&Kxwmf>0U6@y>gTe~ HDWM4faA+R6 literal 0 HcmV?d00001 diff --git a/gfx/footprints/kakuna.png b/gfx/footprints/kakuna.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/kangaskhan.png b/gfx/footprints/kangaskhan.png new file mode 100644 index 0000000000000000000000000000000000000000..9aee998f9326b60e317ea50c9bd3acc86fd62588 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1+MX_sAr-fh6BwAEF*`K< zXP%Pq@Be=W=Kufy%PX+VIQ`+jJu_S4fA(d(Yz&O^B?|1fzV!!b_jL7hS?83{1OVco B9kl=e literal 0 HcmV?d00001 diff --git a/gfx/footprints/kingdra.png b/gfx/footprints/kingdra.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/kingler.png b/gfx/footprints/kingler.png new file mode 100644 index 0000000000000000000000000000000000000000..58c9a6dac9bd7fac9f0796b47f777d4846e9eeec GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1+MX_sAr-f34+e5F81OhB zWdAK2612uWh*czrIl26U(&3X1s&1Z((=>{IMoHY}{^wR8kPXuA>FVdQ&MBb@09tPv A-2eap literal 0 HcmV?d00001 diff --git a/gfx/footprints/koffing.png b/gfx/footprints/koffing.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/krabby.png b/gfx/footprints/krabby.png new file mode 100644 index 0000000000000000000000000000000000000000..82475befe10abfa305796c37ef48b9f3a612ce92 GIT binary patch literal 89 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn13Z5>GAr-fh6AtkIuxIG} p|6fvKhT@Tj%sf2x5_}Ir_!;~;IUU|PzxWT*vd$@?2>@uU7mWY_ literal 0 HcmV?d00001 diff --git a/gfx/footprints/lanturn.png b/gfx/footprints/lanturn.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/lapras.png b/gfx/footprints/lapras.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/larvitar.png b/gfx/footprints/larvitar.png new file mode 100644 index 0000000000000000000000000000000000000000..73d86f99cfeb00fd57bfdefbb63a347c73ca8f9a GIT binary patch literal 78 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1qMj~}Ar-fh6BL*X(9_k=Wt~$(695@X5S0J` literal 0 HcmV?d00001 diff --git a/gfx/footprints/ledian.png b/gfx/footprints/ledian.png new file mode 100644 index 0000000000000000000000000000000000000000..8d51af1fa0c2c0c8ecc3872e7f11f9f9cb2a0c0e GIT binary patch literal 94 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1s-7;6Ar-fh6BwAE@jEpA u=by0Qf4|e8|Md(r9XuLDn>jbcNiZ;2XbD#&?vJnlY4mjUb6Mw<&;$VS^cfKV literal 0 HcmV?d00001 diff --git a/gfx/footprints/ledyba.png b/gfx/footprints/ledyba.png new file mode 100644 index 0000000000000000000000000000000000000000..8566a1eeb91c1a3c6abaed6cdf6f5096c16f7fa0 GIT binary patch literal 93 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1DxNNmAr-fh6C9Y$6du`k t{K@Bk)YQTJ-!aA_@jtuAhx&vAYz(_saI1NjeYpnG=jrO_vd$@?2>|Qi8k+zB literal 0 HcmV?d00001 diff --git a/gfx/footprints/lickitung.png b/gfx/footprints/lickitung.png new file mode 100644 index 0000000000000000000000000000000000000000..5c04d47fae809fb0a7a8d4d035923b8c7fb45b3b GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1#-1*YAr-fh6C4=+F*_Xk z$2{T3|Mtelpa1JM4*viDpHbuE!G8?QpBd}eG(H}bTP3kboP)v4RMcczamrGVF`lk| JF6*2UngDFwBMtxn literal 0 HcmV?d00001 diff --git a/gfx/footprints/lugia.png b/gfx/footprints/lugia.png new file mode 100644 index 0000000000000000000000000000000000000000..3a2634cbd6262773be9e544c8fd379fb0a28e061 GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1TAnVBAr-fh6BwAEF*`i^ zT&eK*^G{};Gynf93-kQ{Z>%8vt=@q1AHP5|gQK{lamV$=7eKl_UHx3vIVCg!0L3aD AYXATM literal 0 HcmV?d00001 diff --git a/gfx/footprints/machamp.png b/gfx/footprints/machamp.png new file mode 100644 index 0000000000000000000000000000000000000000..98ca4a6096d392d2482fc94d6c175a0fbe56bb62 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1+MX_sAr-fh6BwAKr4>Hj zm-CTf5c=QPVykuV|9nQT8_k{e1&^3}9@rmXV2Cmm&8kt)P6BE7boFyt=akR{0BN}z A_W%F@ literal 0 HcmV?d00001 diff --git a/gfx/footprints/machoke.png b/gfx/footprints/machoke.png new file mode 100644 index 0000000000000000000000000000000000000000..e2baf3c7a7325dcad527c95af87f6758c5fbcf7e GIT binary patch literal 93 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1DxNNmAr-fh6BwAQ1wP(q taH(Mv{GZrj+w`N^tENHl54(f_1H;wB0^7H0e7*$I=jrO_vd$@?2>`-U8IJ$} literal 0 HcmV?d00001 diff --git a/gfx/footprints/machop.png b/gfx/footprints/machop.png new file mode 100644 index 0000000000000000000000000000000000000000..2923d0b500dbc9144e1b9030d326f1eb4256f2e5 GIT binary patch literal 89 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn13Z5>GAr-fh6ArM=uxH@> pXRq+czGnlwaQy?8h?9&Za~ZPKInS;#)%ya{vd$@?2>?^07cBq) literal 0 HcmV?d00001 diff --git a/gfx/footprints/magby.png b/gfx/footprints/magby.png new file mode 100644 index 0000000000000000000000000000000000000000..43e684bb675b8f30cd53cfb53a6dfb879acdff47 GIT binary patch literal 87 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1a-J@ZAr-fh6ArNDwoH&;FjkPc5*KbLh*2~7YM@D*_Y literal 0 HcmV?d00001 diff --git a/gfx/footprints/magcargo.png b/gfx/footprints/magcargo.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/magikarp.png b/gfx/footprints/magikarp.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/magmar.png b/gfx/footprints/magmar.png new file mode 100644 index 0000000000000000000000000000000000000000..e86094f21ad72cccaabbabfa5131a334a61dcd95 GIT binary patch literal 95 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1YMw5RAr-fh6BwGAZ5$po v^Y;As&ptEZ-+%dLhoGeYj2<848zfj5+UJS$Efd~c4$|rA>gTe~DWM4f9sn9; literal 0 HcmV?d00001 diff --git a/gfx/footprints/magnemite.png b/gfx/footprints/magnemite.png new file mode 100644 index 0000000000000000000000000000000000000000..2778a081c32c43cbf11f24248d0f9552f47d84b5 GIT binary patch literal 81 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn15}q!OAr-fh6Atjt;B8>p h&)dVD)_AmlfkEW~!{3SbE(n3tdb;|#taD0e0sx!Y6m|dr literal 0 HcmV?d00001 diff --git a/gfx/footprints/magneton.png b/gfx/footprints/magneton.png new file mode 100644 index 0000000000000000000000000000000000000000..adafac908be9c34d25a0136da72317483ade212a GIT binary patch literal 89 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn13Z5>GAr-fh6Ap0BuxH?` olU7K~=U3sGk*KplB0@}zopr0Q@8rL;wH) literal 0 HcmV?d00001 diff --git a/gfx/footprints/mankey.png b/gfx/footprints/mankey.png new file mode 100644 index 0000000000000000000000000000000000000000..4cd398020de957096b08ca1d05e593f3e61d1ccb GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1=AJH&Ar-ewPafoCP~c%X z*eWuijU{^jq#y@};*Q@l&Np$ldZbP?b;-4TVf_2chSMiLd^|Gw=xe5=jY0xPz6f=L OjPi8#b6Mw<&;$UG%q4^X literal 0 HcmV?d00001 diff --git a/gfx/footprints/mantine.png b/gfx/footprints/mantine.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/mareep.png b/gfx/footprints/mareep.png new file mode 100644 index 0000000000000000000000000000000000000000..f659b154c48c6c84081a5910c9ee053f06ae3202 GIT binary patch literal 82 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1lAbP(Ar-fh6BL*Xq!~Et hqy;{*ANku5t;yiGim6uc+42t{#h$KyF6*2UngD>v6ORA@ literal 0 HcmV?d00001 diff --git a/gfx/footprints/marill.png b/gfx/footprints/marill.png new file mode 100644 index 0000000000000000000000000000000000000000..0b4dcd70ea78a23ca35a4a9c7299aa188bf5e1a8 GIT binary patch literal 83 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Ql2i3Ar-fh6C9ZTus5{) jW%psyX;hdYxq*ox`v?1<(-Z3^fmD0C`njxgN@xNA#v&C> literal 0 HcmV?d00001 diff --git a/gfx/footprints/marowak.png b/gfx/footprints/marowak.png new file mode 100644 index 0000000000000000000000000000000000000000..658c75468cbec921b814f37496f0416c03ba1410 GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1GM+AuAr-fh6ArM=uxH@> lXK!%mpS>F6G=|mAj0}a@Tnu;WudD~D_jL7hS?83{1OVoc6*B+; literal 0 HcmV?d00001 diff --git a/gfx/footprints/meganium.png b/gfx/footprints/meganium.png new file mode 100644 index 0000000000000000000000000000000000000000..f422f4c217162fdd45ea0153b8914146737c5e75 GIT binary patch literal 101 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1I-V|$Ar-fh6C4$1B3tn`BN7PCU6=Y{P5pCK>9zsiZR1XVcDw7xuGQ>{hqFVF6*2Ung9Yh B9r*wN literal 0 HcmV?d00001 diff --git a/gfx/footprints/meowth.png b/gfx/footprints/meowth.png new file mode 100644 index 0000000000000000000000000000000000000000..8dbc4762c956686ca24e2d6e93fce2d059c1d494 GIT binary patch literal 93 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1DxNNmAr-fh6ArM=;Ai0c tZSQdC2T#w@|BP-QBo1)2NJOv;Ffcgo=PZbsp63hF=jrO_vd$@?2>`k}7zh9W literal 0 HcmV?d00001 diff --git a/gfx/footprints/metapod.png b/gfx/footprints/metapod.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/mew.png b/gfx/footprints/mew.png new file mode 100644 index 0000000000000000000000000000000000000000..9ebeceecf92a77babb2ffdb08eed55812b533b2f GIT binary patch literal 87 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1a-J@ZAr-fh6C9ZTus5{) nW%psyVN|Plz%t`>&l*{Vt{0qB_VoA$f^>Mg`njxgN@xNABe)i; literal 0 HcmV?d00001 diff --git a/gfx/footprints/mewtwo.png b/gfx/footprints/mewtwo.png new file mode 100644 index 0000000000000000000000000000000000000000..99b44c6fa82c72d307cf62f69047de8957612de7 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1dY&$hAr-fh6E-9=H2wdh zaOfXH&kz15x0*Zc4VvU#BgTe~DWM4f?-Lez literal 0 HcmV?d00001 diff --git a/gfx/footprints/misdreavus.png b/gfx/footprints/misdreavus.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/moltres.png b/gfx/footprints/moltres.png new file mode 100644 index 0000000000000000000000000000000000000000..05486550538b38b02c8629686f38d57dd1a67c1a GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1`kpS1Ar-fh6B-(r6>4TQ zHvatZocRUI;pc}H9@#KY+3=rP`GY%Q~lo FCIFX`Ak6>( literal 0 HcmV?d00001 diff --git a/gfx/footprints/mr__mime.png b/gfx/footprints/mr__mime.png new file mode 100644 index 0000000000000000000000000000000000000000..2775e28ee364e69ec39123434a78eb841369ee3a GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1@}4e^Ar-fh6C4FVdQ&MBb@073K@B>(^b literal 0 HcmV?d00001 diff --git a/gfx/footprints/muk.png b/gfx/footprints/muk.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/murkrow.png b/gfx/footprints/murkrow.png new file mode 100644 index 0000000000000000000000000000000000000000..157a2a301d74d4fdd3e7c632f3eaadadc82b76f4 GIT binary patch literal 94 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1s-7;6Ar-fh6C9Y>9eyxO t_){R^AtA$7lzWbu^BMmPmIy;3MplL}0p7Y5#Sw}ijh?Q4F6*2UngDIi6+r+1 literal 0 HcmV?d00001 diff --git a/gfx/footprints/natu.png b/gfx/footprints/natu.png new file mode 100644 index 0000000000000000000000000000000000000000..bc0dc2a711aa60d29756f222882323b4b9e27a65 GIT binary patch literal 82 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1lAbP(Ar-fh6Ao}z@C0!D i<2Pvf$uQ@@1r~vS?6nnb*xvXzopr E0N3&%ZU6uP literal 0 HcmV?d00001 diff --git a/gfx/footprints/nidoqueen.png b/gfx/footprints/nidoqueen.png new file mode 100644 index 0000000000000000000000000000000000000000..aea8cb68cfdbee3e1283322ab67c836c36325d07 GIT binary patch literal 108 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1#-1*YAr-fB&urvnP~bV@ z;4RrOanrB&)VUm_O#{>=K^B@yEUHx3vIVCg! E03n1OcmMzZ literal 0 HcmV?d00001 diff --git a/gfx/footprints/ninetales.png b/gfx/footprints/ninetales.png new file mode 100644 index 0000000000000000000000000000000000000000..b4b5ac5736a93a7d287b3df04b619ef478b7cf65 GIT binary patch literal 98 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1nw~C>Ar-fh6C9Y&us0le z{@LN!|Nrb0I_bP0l+XkK)CnEc literal 0 HcmV?d00001 diff --git a/gfx/footprints/noctowl.png b/gfx/footprints/noctowl.png new file mode 100644 index 0000000000000000000000000000000000000000..908cc78852a88ba8e95a56bee544a54655cfef55 GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn12A(dCAr-fh6C9Y&C^Y?N zU~cC9-^kDN?N7VC!H56<>l+$>{;ywf@ZtaSM1u$a|2G~yHt#?4gyZ!MjSv6VFVIrpmu6sKe8#h*s8d}LWQM1!pUXO@ GgeCys?jf`Q literal 0 HcmV?d00001 diff --git a/gfx/footprints/oddish.png b/gfx/footprints/oddish.png new file mode 100644 index 0000000000000000000000000000000000000000..c2c3b4e5f6ebdd2fd368165efe41beafb0d59d85 GIT binary patch literal 80 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1;+`&!Ar-fh6BHQi7z~Z) gJg{d_`k=wiFzFlf*66I&vp`BcUHx3vIVCg!09-W^v;Y7A literal 0 HcmV?d00001 diff --git a/gfx/footprints/omanyte.png b/gfx/footprints/omanyte.png new file mode 100644 index 0000000000000000000000000000000000000000..b62fe08bc1d44f951c9fecf5960620e15dcf8831 GIT binary patch literal 78 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1qMj~}Ar-fh6BHQi7z~YP dSR8O*VPGgIW?EjP{Zk#J(9_k=Wt~$(695^r5QzW) literal 0 HcmV?d00001 diff --git a/gfx/footprints/omastar.png b/gfx/footprints/omastar.png new file mode 100644 index 0000000000000000000000000000000000000000..e65b2cdcb1851c47a6e30eeeb107c15b6120b039 GIT binary patch literal 83 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Ql2i3Ar-fh6Atj&F&KW9 jS2)P8cHj;(&ksh1lYA_DtE;xhgH(IE`njxgN@xNAw4)SS literal 0 HcmV?d00001 diff --git a/gfx/footprints/onix.png b/gfx/footprints/onix.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/paras.png b/gfx/footprints/paras.png new file mode 100644 index 0000000000000000000000000000000000000000..d93a68a49651254e18f12890bd065755943a1d92 GIT binary patch literal 81 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn15}q!OAr-fh6BO7a8anJ1 g9x)3T%O6-P#1L=5^uWST=mtowr>mdKI;Vst0AO4Z`2YX_ literal 0 HcmV?d00001 diff --git a/gfx/footprints/parasect.png b/gfx/footprints/parasect.png new file mode 100644 index 0000000000000000000000000000000000000000..0b043be11c97eb59a181af739f6cce1229d3270d GIT binary patch literal 83 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Ql2i3Ar-fh6Atj&9pFea jC}i;X(A<*q;RPeZ%1z9V#FoY!1*!IQ^>bP0l+XkK;A|Et literal 0 HcmV?d00001 diff --git a/gfx/footprints/persian.png b/gfx/footprints/persian.png new file mode 100644 index 0000000000000000000000000000000000000000..c46b7353f28bf2752641084befdef7bfdb1367e4 GIT binary patch literal 107 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1MxHK?Ar-fh6B6tW95_(( z?=vIYzyJU39XQei4u1G=AMotIJe$ZPX0AkjwT4p?KO_|x7}BC--rCLhrv@^`)78&q Iol`;+01am$N&o-= literal 0 HcmV?d00001 diff --git a/gfx/footprints/phanpy.png b/gfx/footprints/phanpy.png new file mode 100644 index 0000000000000000000000000000000000000000..e91020b82cffb4ed898bb39dbfaef72c09873c7f GIT binary patch literal 84 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1(w;7kAr-fh6Ao~``Onb# k|Gy#U29_BQ{x_`SWH_tHvoiD8yBv^mPgg&ebxsLQ06+d1vj6}9 literal 0 HcmV?d00001 diff --git a/gfx/footprints/pichu.png b/gfx/footprints/pichu.png new file mode 100644 index 0000000000000000000000000000000000000000..eb47b26dd202a6dcfe3d59f5a3ff39ad44d011a9 GIT binary patch literal 83 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Ql2i3Ar-fh6Ap0kF&Lg_ iS2)<;nqYUJL70I-pqH&?s^7uaAl06(elF{r5}E+2v=kx$ literal 0 HcmV?d00001 diff --git a/gfx/footprints/pidgeot.png b/gfx/footprints/pidgeot.png new file mode 100644 index 0000000000000000000000000000000000000000..4c0d151539b51c5788882fdd80330827dfffab8e GIT binary patch literal 105 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn12A(dCAr-fh6B-(r6>1nf zjH2(bjoL`{n;s5{4CtCj2FR=P&@6hygTe~DWM4fB+nX+ literal 0 HcmV?d00001 diff --git a/gfx/footprints/pidgey.png b/gfx/footprints/pidgey.png new file mode 100644 index 0000000000000000000000000000000000000000..6843cc03292d719b8e2f0caa399286057ec63a36 GIT binary patch literal 94 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1s-7;6Ar-fh6C9Y?&KNx6 u|IetA_e9D`njxgN@xNAxsenW literal 0 HcmV?d00001 diff --git a/gfx/footprints/piloswine.png b/gfx/footprints/piloswine.png new file mode 100644 index 0000000000000000000000000000000000000000..7f9e8ce5a7967d0756948214016dde80444541cd GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1dY&$hAr-fh6C9Y?DZ90_6>dp|Noz7P?Y%hpHb)!`-Cmb46JOT&W9(sDT7S#boFyt=akR{ E01y)$m;e9( literal 0 HcmV?d00001 diff --git a/gfx/footprints/pineco.png b/gfx/footprints/pineco.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/pinsir.png b/gfx/footprints/pinsir.png new file mode 100644 index 0000000000000000000000000000000000000000..724bdf0e5e809b1eb2bbd54e58526269d0e277b6 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1N}eu`Ar-fh6C4`&&#+6( r`2V54L4YUV5d(7=!z34_84FJ_1b6V7^>;nU2I=y2^>bP0l+XkKi{cm? literal 0 HcmV?d00001 diff --git a/gfx/footprints/politoed.png b/gfx/footprints/politoed.png new file mode 100644 index 0000000000000000000000000000000000000000..7f953a3c200b9cfa3c666e1519afb8d19f621744 GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1hMq2tAr-fh6B6tW95`^` zKcm+NWBDHk66za%@;Cqe|G!@1$J_r5tZ)A-Xdm=y@MUCTsDCZ|mgCf~R*)f{u6{1- HoD!MFVdQ&MBb@0Pczw6aWAK literal 0 HcmV?d00001 diff --git a/gfx/footprints/poliwhirl.png b/gfx/footprints/poliwhirl.png new file mode 100644 index 0000000000000000000000000000000000000000..af9c3151d7751af95f5548b0cba654516286bdde GIT binary patch literal 87 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1a-J@ZAr-fh6Ap0wV=(+& mFLCfcyW5R=20?ZQma<+3({1c6N>X*YARV5relF{r5}E)ZAr)2t literal 0 HcmV?d00001 diff --git a/gfx/footprints/poliwrath.png b/gfx/footprints/poliwrath.png new file mode 100644 index 0000000000000000000000000000000000000000..35e5faeaf0838b1fa3272094761a9012536bfbcb GIT binary patch literal 93 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1DxNNmAr-fh6C9Z88)p2p tpYY&+JwtOsn?OROz(;mBgL(%eCWa|{1cW^1mI{INdAjcxAr-fh6ArNbuxH@> qZEx`Cf4vBkPFgavN(Ik_QYMDO>$&6OOocc>nmk?oT-G@yGywoyfffw_ literal 0 HcmV?d00001 diff --git a/gfx/footprints/porygon.png b/gfx/footprints/porygon.png new file mode 100644 index 0000000000000000000000000000000000000000..8323d48e7b8db7a4f3006ef85e3181470097268c GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1GM+AuAr-fh6BwBPF)KW> l=Q||l_~)R?jQ<7-3=IDJ`D!2cbk~E_d%F6$taD0e0s!=(75@ML literal 0 HcmV?d00001 diff --git a/gfx/footprints/porygon2.png b/gfx/footprints/porygon2.png new file mode 100644 index 0000000000000000000000000000000000000000..93f5341ec7a1416d172af66648fffe1e911a121e GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1vYsxEAr-fh6C4=+@jD#) m$Itcgzdaw5uWW?A00YCNeBp4D6DI;d8a!S7T-G@yGywqk%oP^^ literal 0 HcmV?d00001 diff --git a/gfx/footprints/primeape.png b/gfx/footprints/primeape.png new file mode 100644 index 0000000000000000000000000000000000000000..7fafa2f2b455d0a35181808a67679673a85a5f60 GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1TAnVBAr-fh6B-z*75;tx z&%kUv;|Gt5#6M?_1xNnd8yxz_tah-T!Ht2DL2j;i)tO5VXM%Kly85}Sb4q9e0HR8-9FX zSNQq!Gb7ux|Nre52=n~^FW(^a?SEs}OnZX`j11O0CB40B^xlHBd%F6$taD0e0ss#e B9`^tM literal 0 HcmV?d00001 diff --git a/gfx/footprints/pupitar.png b/gfx/footprints/pupitar.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/quagsire.png b/gfx/footprints/quagsire.png new file mode 100644 index 0000000000000000000000000000000000000000..ef12d98b0896a8045df0591be3c8fb605a4c9b12 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1@}4e^Ar-fh6Bw8u8#_Gu oT&eK!zddKmUwMgx{~4167@kB*s6OBemjh|>boFyt=akR{0AiOHdjJ3c literal 0 HcmV?d00001 diff --git a/gfx/footprints/quilava.png b/gfx/footprints/quilava.png new file mode 100644 index 0000000000000000000000000000000000000000..3889017eaf18be6a1b892315396724a8c25f9592 GIT binary patch literal 84 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1(w;7kAr-fh6Ao}z@G)@C kHg-7lk6-QJf5z2n4AMdD2UbiG_zY6+>FVdQ&MBb@0MRlP5C8xG literal 0 HcmV?d00001 diff --git a/gfx/footprints/qwilfish.png b/gfx/footprints/qwilfish.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/raichu.png b/gfx/footprints/raichu.png new file mode 100644 index 0000000000000000000000000000000000000000..031468da7b66c607e0ae3a28ad82becc65c2e817 GIT binary patch literal 87 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1a-J@ZAr-fh6C9Y&$TzV3 nmsd#qFF%>Vdx2nrtN{bVvGqJ+$0H2AK{`BL{an^LB{Ts5_=psc literal 0 HcmV?d00001 diff --git a/gfx/footprints/raikou.png b/gfx/footprints/raikou.png new file mode 100644 index 0000000000000000000000000000000000000000..71a77b3ab715622ed0447153fabbe3ead650e1b7 GIT binary patch literal 95 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1YMw5RAr-fh6B-(r9nKW9 vdEEHlF8Key`~d}lO$kl^`6nd&JJ7(ukk2Y|G{0l^Uyx2uS3j3^P6Ar-fh6BwBP@jE>F yU(d$&?Eim$2abRL|Jx_13V0o`lE}%C5MW@i-YuW`#V^7Wq}kKe&t;ucLK6UY{2M|5 literal 0 HcmV?d00001 diff --git a/gfx/footprints/raticate.png b/gfx/footprints/raticate.png new file mode 100644 index 0000000000000000000000000000000000000000..e31fbefbd54cc807ebd78fde795155fbfeeaeca0 GIT binary patch literal 96 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1>Ygr+Ar-fh6CBvt8*V%> wnDFC|gTe~DWM4f)ut5* literal 0 HcmV?d00001 diff --git a/gfx/footprints/remoraid.png b/gfx/footprints/remoraid.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/rhydon.png b/gfx/footprints/rhydon.png new file mode 100644 index 0000000000000000000000000000000000000000..d7bde17e81118f3f09d934d03a11805a80e69ee0 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1dY&$hAr-fh6A~UICL~xS zoIh~j52MSUpY;um|LyIXB)u56Hgf*9cWC;_z%0SQ@Z^zPN8gmdEg%y-UHx3vIVCg! E0Ck2S1ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/rhyhorn.png b/gfx/footprints/rhyhorn.png new file mode 100644 index 0000000000000000000000000000000000000000..59dbe3128a87811ff4498f4b8dec263eec863805 GIT binary patch literal 87 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1a-J@ZAr-fh6C9Y?Y#bi- n+fGUN_y0cwW79)s`$=UCe4oXBu82(j0n*{=>gTe~DWM4fM)Mdj literal 0 HcmV?d00001 diff --git a/gfx/footprints/sandshrew.png b/gfx/footprints/sandshrew.png new file mode 100644 index 0000000000000000000000000000000000000000..f1bcd2fa3c85afe7c60db4f7c361b8ee919fe94e GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1ik>cxAr-fh6ArM=;B8>p q&)e~XS>?_D#R3V21_%Ez#;P+&Npbkz)2v$#(&Xvt=d#Wzp$PzXWEXA# literal 0 HcmV?d00001 diff --git a/gfx/footprints/sandslash.png b/gfx/footprints/sandslash.png new file mode 100644 index 0000000000000000000000000000000000000000..6ae1726f4c97bfdbe47408d47e16af675d1d9bcd GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1ik>cxAr-fh6C9Y&usJl{ qXY>2RDD>@rAjbxYri6bDOJo@=o^dXIDlO{=(&Xvt=d#Wzp$Pzk`WQO^ literal 0 HcmV?d00001 diff --git a/gfx/footprints/scizor.png b/gfx/footprints/scizor.png new file mode 100644 index 0000000000000000000000000000000000000000..15646bfd1b1f2e5798278b408be13059b1b613ae GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1@}4e^Ar-fh6BwA&EDqK) nv~Kv{;M8z*hGYW6LOwM%h7f0tk_!1)c90fNS3j3^P6LV~ZJ;nV;B?Lue%|F3sY5)k6~_P;Ue=YNMYj11wbvRCS2e(Hma@pScb JS?83{1OWNdA{zhz literal 0 HcmV?d00001 diff --git a/gfx/footprints/seadra.png b/gfx/footprints/seadra.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/seaking.png b/gfx/footprints/seaking.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/seel.png b/gfx/footprints/seel.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/sentret.png b/gfx/footprints/sentret.png new file mode 100644 index 0000000000000000000000000000000000000000..a692ad323f3e76043f25d59bc49cc750e2f06e59 GIT binary patch literal 80 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1;+`&!Ar-fh6Atjt;Ai0c f$FIQ>!NbnLu)K(+<>6wv lZSU~tf4vWr4r5poC&T-NJh}6}*rb8fd%F6$taD0e0ssZ!7AgP$ literal 0 HcmV?d00001 diff --git a/gfx/footprints/skarmory.png b/gfx/footprints/skarmory.png new file mode 100644 index 0000000000000000000000000000000000000000..2dfab09ee5cdf7ab28c3660750e527313587a91c GIT binary patch literal 102 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1x}GkMAr-fh6Brof*xHzR z{_vb(Z|IQsVPI|KVPpHvZ_xCg*@uVcM%(LBvLy-26(#qxvX mXK!#w&Znk9@DKZjEG7n#h3rM5J?o-C8a!S7T-G@yGywqhClvPp literal 0 HcmV?d00001 diff --git a/gfx/footprints/slowbro.png b/gfx/footprints/slowbro.png new file mode 100644 index 0000000000000000000000000000000000000000..a0dbfe51c54ca1f6be8a86fd52090a31b10409e0 GIT binary patch literal 93 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1DxNNmAr-fh6C9Y?Y#bi- t+fMlLU*5~$|NnZ1xeh0cZv1z=#K-W{Pjvmx0E6EkeV(pAr-fh6C4E kGb<$iXPo@Nz9CeY;Zr!EI4Kl<=SNBoD)11(DjN$IomAnc?Z`=d#Wz Gp$Py{j~|c# literal 0 HcmV?d00001 diff --git a/gfx/footprints/snubbull.png b/gfx/footprints/snubbull.png new file mode 100644 index 0000000000000000000000000000000000000000..bd00ed148e959a28ed397ebfaf606fcc9af7aa55 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1@}4e^Ar-fh6ArM=;Ah}` oZ0zvpf4$G4fBX|3{BHXri#OEL_p00i_>zopr0F`kXqyPW_ literal 0 HcmV?d00001 diff --git a/gfx/footprints/spearow.png b/gfx/footprints/spearow.png new file mode 100644 index 0000000000000000000000000000000000000000..6843cc03292d719b8e2f0caa399286057ec63a36 GIT binary patch literal 94 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1s-7;6Ar-fh6C9Y?&KNx6 u|IetA_ literal 0 HcmV?d00001 diff --git a/gfx/footprints/staryu.png b/gfx/footprints/staryu.png new file mode 100644 index 0000000000000000000000000000000000000000..bd50e57bb46789148e280f17dd628efb58fedcc9 GIT binary patch literal 79 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1VxBIJAr-fh6Atjt;Ai0c e$8W%N<|sQucMx-{5l@Z|NTsK%pUXO@geCw*QxQA> literal 0 HcmV?d00001 diff --git a/gfx/footprints/steelix.png b/gfx/footprints/steelix.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/sudowoodo.png b/gfx/footprints/sudowoodo.png new file mode 100644 index 0000000000000000000000000000000000000000..c8496cc9987fa592e74f29c9b9511dca9b18da9d GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1GM+AuAr-fh6C4e?$l}9TDL8?7n{an^LB{Ts5=1Ud> literal 0 HcmV?d00001 diff --git a/gfx/footprints/sunflora.png b/gfx/footprints/sunflora.png new file mode 100644 index 0000000000000000000000000000000000000000..a8f46a902c633b3bfd6f44d7be9962949f6eb168 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1@}4e^Ar-fh6BwB1@jD!P n#?O`5-}=B^Kt6!u8M8n$L(NY9bmL^>=^!nhu6{1-oD!M<4H6X( literal 0 HcmV?d00001 diff --git a/gfx/footprints/sunkern.png b/gfx/footprints/sunkern.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/swinub.png b/gfx/footprints/swinub.png new file mode 100644 index 0000000000000000000000000000000000000000..7926b2a5a51619dc5d0d0a0a2243d59364b84432 GIT binary patch literal 82 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1lAbP(Ar-fh6Atjt;B`2{ hu5j=_yIaFf3kHVCUMvPZZoGLQ#h$KyF6*2UngE--6Da@y literal 0 HcmV?d00001 diff --git a/gfx/footprints/tangela.png b/gfx/footprints/tangela.png new file mode 100644 index 0000000000000000000000000000000000000000..64808f76c0f486cfd21a66df56a849de51ec3fad GIT binary patch literal 98 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1nw~C>Ar-fh6C4 r{omjb|9?idHvTgPOlM3Jj;#`ASP{xK|NMUjOOP&4S3j3^P6y4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/teddiursa.png b/gfx/footprints/teddiursa.png new file mode 100644 index 0000000000000000000000000000000000000000..6dc6465c372dfaec530c3afe2a9a35b2f1ef3ebc GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1N}eu`Ar-fh6ArM=;AiMO r|Ge=Cd!53;|BN0t{yQojNSeXGkhg@>p j&)e~%xjErqL#R5#M;W%2hU?t#f>e9D`njxgN@xNA$OFY4CLQb6Mw<&;$Sn`4#^F literal 0 HcmV?d00001 diff --git a/gfx/footprints/typhlosion.png b/gfx/footprints/typhlosion.png new file mode 100644 index 0000000000000000000000000000000000000000..aae665cadd3dbcdcefe7dd918bef2875f139eadf GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1@}4e^Ar-fh6C9Xr*c)2T ovMVI=tNnYR^uX%}zd|NE!})hSHNRS!;z3$GUHx3vIVCg!04-M*t^fc4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/tyranitar.png b/gfx/footprints/tyranitar.png new file mode 100644 index 0000000000000000000000000000000000000000..c9a92aa5362b28ece4f228c4bee110047a72b1a3 GIT binary patch literal 99 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1TAnVBAr-fh6C4_ECbUHx3vIVCg!0Hm-S AR{#J2 literal 0 HcmV?d00001 diff --git a/gfx/footprints/tyrogue.png b/gfx/footprints/tyrogue.png new file mode 100644 index 0000000000000000000000000000000000000000..775ec554106bfe34b747d29d502013ef2da5b160 GIT binary patch literal 80 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1;+`&!Ar-fh6AtjtuxH@> fXK%r=L5GWh;fW)=oNdmV#~`Jiu6{1-oD!MeI-MM$=&To)XPgg&ebxsLQ0NHC7*Z=?k literal 0 HcmV?d00001 diff --git a/gfx/footprints/unown.png b/gfx/footprints/unown.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/ursaring.png b/gfx/footprints/ursaring.png new file mode 100644 index 0000000000000000000000000000000000000000..19b2cd7e64b4edbfc45c4c9178294a0075fef70d GIT binary patch literal 104 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1`kpS1Ar-fh6C4=Q1P<0W zG#;Gy{{uT)9osWz9-D9S4S)XEH%$8fKUpAwa|53R1H)W#p{yf8I}Jfbc)I$ztaD0e F0svLo9_#=B literal 0 HcmV?d00001 diff --git a/gfx/footprints/vaporeon.png b/gfx/footprints/vaporeon.png new file mode 100644 index 0000000000000000000000000000000000000000..38992da8855298931bb63543265cc75a42d9fd34 GIT binary patch literal 97 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn18lEnWAr-fh6ArM=;AiMO y|Ge?Y|Njp6{{Ls6z_CH1Wy61Fl^^yBFIgDo$qW5`c{{=oq}S8c&t;ucLK6VhxgO>K literal 0 HcmV?d00001 diff --git a/gfx/footprints/venomoth.png b/gfx/footprints/venomoth.png new file mode 100644 index 0000000000000000000000000000000000000000..41dd30829a834a34bd2426c6934098ef2e84f580 GIT binary patch literal 74 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1f}SppAr-fh6BL*X8-9FX zSNQq!Gb7ux|NreBIR5?r|9^pS0%zO*|BYQg|0_r`GAubEH!EGp*%xGjr>mdKI;Vst E0JTCP_W%F@ literal 0 HcmV?d00001 diff --git a/gfx/footprints/victreebel.png b/gfx/footprints/victreebel.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/vileplume.png b/gfx/footprints/vileplume.png new file mode 100644 index 0000000000000000000000000000000000000000..f66e817f257e986a8a9008e6a2dfcd850ba1ae4e GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1@}4e^Ar-fh6BwAE@jEpA n=T}SYSFl?k#Gb%n&n(2i;JTgHAY-xhLXZ|uS3j3^P6Ygr+Ar-fh6CBvt8*V%> xm|*aaN9Est`v%7w|I-_U{?s?Hd}dd<%dqyNkk8sD$Mry3Jzf1=);T3K0RVm)9jO2S literal 0 HcmV?d00001 diff --git a/gfx/footprints/weedle.png b/gfx/footprints/weedle.png new file mode 100644 index 0000000000000000000000000000000000000000..bd50e57bb46789148e280f17dd628efb58fedcc9 GIT binary patch literal 79 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1VxBIJAr-fh6Atjt;Ai0c e$8W%N<|sQucMx-{5l@Z|NTsK%pUXO@geCw*QxQA> literal 0 HcmV?d00001 diff --git a/gfx/footprints/weepinbell.png b/gfx/footprints/weepinbell.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/weezing.png b/gfx/footprints/weezing.png new file mode 100644 index 0000000000000000000000000000000000000000..dfe2ee3de9d088c1231dbadedf8ae4093d93763d GIT binary patch literal 69 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1Jf1F&Ar-fh6Bg((Ffar# UFrGcD(gu?EboFyt=akR{0Fq`71ONa4 literal 0 HcmV?d00001 diff --git a/gfx/footprints/wigglytuff.png b/gfx/footprints/wigglytuff.png new file mode 100644 index 0000000000000000000000000000000000000000..cd51d55438441492b676e0bc65f90eac49aad0f8 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1N}eu`Ar-fh6B7O%IB?*= se|EPUi-rDV9AOtZ^pBzEL3#rN!vaCRXU`&@Z3OA^boFyt=akR{04tdsz5oCK literal 0 HcmV?d00001 diff --git a/gfx/footprints/wobbuffet.png b/gfx/footprints/wobbuffet.png new file mode 100644 index 0000000000000000000000000000000000000000..dc526f71879f80e3466e09e72850765dac7b93bc GIT binary patch literal 80 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1;+`&!Ar-fh6AtjtuxH@> gXRpEXS^mx|#@(k_MY?xAxdBq@>FVdQ&MBb@0Gt*TJOBUy literal 0 HcmV?d00001 diff --git a/gfx/footprints/wooper.png b/gfx/footprints/wooper.png new file mode 100644 index 0000000000000000000000000000000000000000..bf1c3743f0cc8607c8198567bcc4955e052dafbc GIT binary patch literal 95 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1YMw5RAr-fh6CBvt8-9FX wSNQqUxaY@zdAA$?(;d`){6E0)j9=g`gUV)+{YEvNGe9~$UHx3vIVCg!0CxKwV*mgE literal 0 HcmV?d00001 diff --git a/gfx/footprints/xatu.png b/gfx/footprints/xatu.png new file mode 100644 index 0000000000000000000000000000000000000000..1e254027bbeafa3d7299f5c4c4c4a438ad4d9a5a GIT binary patch literal 86 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1vYsxEAr-fh6BwA&LYn?F m=rO6BW>$LhkcEE^0~5pfFqUI;ZV5GlGj9u6{1-oD!M&%^WoKl9SJ|Cy(L{Ld(KMm~U}gOP`a!N*Xf TKg}XwHpoCvS3j3^P6;EK`XK+{J{>iA_T!#+JexWcT-a}foZDM<-zS*xE b^K%j_%LX^mFwScUAVWP}{an^LB{Ts5WwI!8 literal 0 HcmV?d00001 diff --git a/gfx/frames/3.png b/gfx/frames/3.png new file mode 100644 index 0000000000000000000000000000000000000000..b10947cb716ac10d79ef419f79c6d3ad9568cd3f GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7U=UzpU|?WK{{Q0z0|SG(r;B4q#jWHY{A@fc zuE?_~Y)JpX^XP+d4O`I+L6QIe|Ic?6;YbP+P@RA9*N?_$4WVsPgg&ebxsLQ01m7r00000 literal 0 HcmV?d00001 diff --git a/gfx/frames/4.png b/gfx/frames/4.png new file mode 100644 index 0000000000000000000000000000000000000000..1bf1300f0e39fa4244bfe805c49603db47f785d8 GIT binary patch literal 126 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7U=UzpU|?WK{{Q0z0|SGrr;B4q#jVgY2YC+| z@GvRqE8nEX{(ZXdhY2NrYox#C4rITP2aGc<0SrEB)}@WS(Za&Erl f@+eR1nfZ@_^P<&r)f1UzAcH+!{an^LB{Ts5nQkcD literal 0 HcmV?d00001 diff --git a/gfx/frames/5.png b/gfx/frames/5.png new file mode 100644 index 0000000000000000000000000000000000000000..be4a509d1a9dda4261e0da19970604b83a84ce15 GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7U=UzpU|?WK{{Q0z0|SGJr;B4q#jWHY{A@fo zG~4+9I6UHK7Pw*jXXC^FAJ{!^{{PRv%t1h%^;*LJ`HV~M%H>G3FfmMFb9!+-mF*+Q N98Xt2mvv4FO#sM#B#Hn4 literal 0 HcmV?d00001 diff --git a/gfx/frames/6.png b/gfx/frames/6.png new file mode 100644 index 0000000000000000000000000000000000000000..e606ad673a112516d16c7c6886519494b3572f20 GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7U=UzpU|?WK{{Q0z0|SGlr;B4q#jWHY{A@fc zuCV|6|KI+DagE)90|#p4+#Ff|-}wLk|8Y5wMg_L7jq+=rd}dt0X2B}TBFW3(-Rih- SPNswh$S_Y=KbLh*2~7ai>Ly?S literal 0 HcmV?d00001 diff --git a/gfx/frames/7.png b/gfx/frames/7.png new file mode 100644 index 0000000000000000000000000000000000000000..7338f1213b245d0320d95427c45864c8cbddf1fb GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7U=UzpU|?WK{{Q0z0|SGdr;B4q#jV^PLp}xr z4kpi<2LDg5YbSNC?qr>=*ZR;zz(Bj^;sUnJJn4IS)pB9dC~aqw(8CvuBTSHFArapE3VAl#8E7L#%q>-*bAw=8U+@=Icx6Dyv^RS WG}EGe!C`BV8$4b8T-G@yGywqL4L#Zb literal 0 HcmV?d00001 diff --git a/gfx/icons.asm b/gfx/icons.asm new file mode 100644 index 0000000..c664516 --- /dev/null +++ b/gfx/icons.asm @@ -0,0 +1,41 @@ +Icons: ; used only for BANK(Icons) + +NullIcon: +PoliwagIcon: INCBIN "gfx/icons/poliwag.2bpp" +JigglypuffIcon: INCBIN "gfx/icons/jigglypuff.2bpp" +DiglettIcon: INCBIN "gfx/icons/diglett.2bpp" +PikachuIcon: INCBIN "gfx/icons/pikachu.2bpp" +StaryuIcon: INCBIN "gfx/icons/staryu.2bpp" +FishIcon: INCBIN "gfx/icons/fish.2bpp" +BirdIcon: INCBIN "gfx/icons/bird.2bpp" +MonsterIcon: INCBIN "gfx/icons/monster.2bpp" +ClefairyIcon: INCBIN "gfx/icons/clefairy.2bpp" +OddishIcon: INCBIN "gfx/icons/oddish.2bpp" +BugIcon: INCBIN "gfx/icons/bug.2bpp" +GhostIcon: INCBIN "gfx/icons/ghost.2bpp" +LaprasIcon: INCBIN "gfx/icons/lapras.2bpp" +HumanshapeIcon: INCBIN "gfx/icons/humanshape.2bpp" +FoxIcon: INCBIN "gfx/icons/fox.2bpp" +EquineIcon: INCBIN "gfx/icons/equine.2bpp" +ShellIcon: INCBIN "gfx/icons/shell.2bpp" +BlobIcon: INCBIN "gfx/icons/blob.2bpp" +SerpentIcon: INCBIN "gfx/icons/serpent.2bpp" +VoltorbIcon: INCBIN "gfx/icons/voltorb.2bpp" +SquirtleIcon: INCBIN "gfx/icons/squirtle.2bpp" +BulbasaurIcon: INCBIN "gfx/icons/bulbasaur.2bpp" +CharmanderIcon: INCBIN "gfx/icons/charmander.2bpp" +CaterpillarIcon: INCBIN "gfx/icons/caterpillar.2bpp" +UnownIcon: INCBIN "gfx/icons/unown.2bpp" +GeodudeIcon: INCBIN "gfx/icons/geodude.2bpp" +FighterIcon: INCBIN "gfx/icons/fighter.2bpp" +EggIcon: INCBIN "gfx/icons/egg.2bpp" +JellyfishIcon: INCBIN "gfx/icons/jellyfish.2bpp" +MothIcon: INCBIN "gfx/icons/moth.2bpp" +BatIcon: INCBIN "gfx/icons/bat.2bpp" +SnorlaxIcon: INCBIN "gfx/icons/snorlax.2bpp" +HoOhIcon: INCBIN "gfx/icons/ho_oh.2bpp" +LugiaIcon: INCBIN "gfx/icons/lugia.2bpp" +GyaradosIcon: INCBIN "gfx/icons/gyarados.2bpp" +SlowpokeIcon: INCBIN "gfx/icons/slowpoke.2bpp" +SudowoodoIcon: INCBIN "gfx/icons/sudowoodo.2bpp" +BigmonIcon: INCBIN "gfx/icons/bigmon.2bpp" diff --git a/gfx/icons/bat.png b/gfx/icons/bat.png new file mode 100644 index 0000000000000000000000000000000000000000..3ea2ea832dc04eb5714f7784ad6e9cc4788cbfc9 GIT binary patch literal 169 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|jG)5S5Q;#TijL#{&( zA}tT?*Suu%7vNWjQ<#^)Y$hhAY4gEL=S|U6_Dpd#e&?#?KUPVyx!y1kpSL=&$hT(K zzax@yGIGiew1j{Y*A3p@_@Sp$_lTRmqLoUFSo Ydapa^%+au)7eQ|DboFyt=akR{0IKyrNdN!< literal 0 HcmV?d00001 diff --git a/gfx/icons/bigmon.png b/gfx/icons/bigmon.png new file mode 100644 index 0000000000000000000000000000000000000000..4a77f1eceb0b1f496986c1d64ba940ecae450662 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|jH)5S5Q;#RW7hsOCc zA4+5&NNMX|>-dkS-o^Qiz literal 0 HcmV?d00001 diff --git a/gfx/icons/bird.png b/gfx/icons/bird.png new file mode 100644 index 0000000000000000000000000000000000000000..e13bc6cbace7db481c0d018021e1e47846145a94 GIT binary patch literal 176 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|ji)5S5Q;#Tqxeij~q zrk@NGE?i&`YM<5EazjMnpcI3Oi%Wyc1Z|(N?4$K<_L16e6_3=fRCU<$T=m*CVGv5lPyeeB179$$90iBF;Y_85`LL$BhGwK%vQDE6v#fK e@yO5f0*e`zn+F!$Vff7ha*C&`pUXO@geCxc;X4KZ literal 0 HcmV?d00001 diff --git a/gfx/icons/blob.png b/gfx/icons/blob.png new file mode 100644 index 0000000000000000000000000000000000000000..aef74ae64c5390676183587cde1fab25cd7acc5a GIT binary patch literal 174 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|ja)5S5Q;#Tqxeij~q zN6hvUEVfE`boep~EmHh1`A?^3Q~Hm|S2NFl&@|aH|KXJ@8;%}bvdScTqH%LpMh08+wJRG$c^0h>Yc-JJ;Y~>UarhPg dr8Is+28Qr2;lgunnb(6H;_2$=vd$@?2>_5UKIZ@c literal 0 HcmV?d00001 diff --git a/gfx/icons/bug.png b/gfx/icons/bug.png new file mode 100644 index 0000000000000000000000000000000000000000..97504f7219aaa2ea8f7947a77d1f1b6f0a969fee GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|jH)5S5Q;#Tqxeij~q zNBy=FEUx^S|FHQQS6$oZ7;Zb`KhL8Wp3Zv|wPA+i>4tRH=3^HVc-eZJ&pABm*uZwU zv;W^I9{GPaJ{u<(zuJF|YXM^ncfzyA9sm7x|DFGEyy5t~hr-zo_J>!BEj-GzTxzbE qbHseHs;|a>E?(G>{-gfKhkAw?M*dn~<5Jy0Zt`^Xb6Mw<&;$TQolX(} literal 0 HcmV?d00001 diff --git a/gfx/icons/bulbasaur.png b/gfx/icons/bulbasaur.png new file mode 100644 index 0000000000000000000000000000000000000000..1de6636f89b0fb9d644600ecf30a2800a92370ed GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq@~{)5S5Q;#Tqxeiokp z|8FpN^8a;cTKv%d@O;0QFgn?*nP z$LP3xn((S)8t;|H^Why2nbUtOuCQADZC2*Y7c<{F1cZLse}0Ajo_*~4nf}?6Puy4! Ovf0zs&t;ucLK6VB3qFnj literal 0 HcmV?d00001 diff --git a/gfx/icons/charmander.png b/gfx/icons/charmander.png new file mode 100644 index 0000000000000000000000000000000000000000..3d85f13164ee96033d5adb58ebdf023a8c6d3d51 GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq@~{)5S5Q;#Tqxeiokp z{5P061M4+D9uJl9nUnrQSW4&22SpQy84p*i(4J5rAe#1L#Z{p*AJVTLN@(L>E%w7$ z=4#efcF!BeH5=?1Oc?qr|2sabWfOFlumdKI;Vst03NnEf&c&j literal 0 HcmV?d00001 diff --git a/gfx/icons/clefairy.png b/gfx/icons/clefairy.png new file mode 100644 index 0000000000000000000000000000000000000000..0017d9ddb9919be88db7e4c389769774d86286be GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq@~%)5S5Q;#Tqxeij~q zN6i20+n8gxXGrpG^vy{7vEf4Z{DMXysA~-W*@2jR`OqW2LrD~%?ypj2dcIjnS>k2L~qS9I+D^7SnuRK@eDIV_j&&V TOK)3xfb92l^>bP0l+XkKQzJX= literal 0 HcmV?d00001 diff --git a/gfx/icons/diglett.png b/gfx/icons/diglett.png new file mode 100644 index 0000000000000000000000000000000000000000..307181f71ace911d256ac61b6d21ef758d068a89 GIT binary patch literal 129 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq}up)5S5Q;#Tqxeij~q zN6oeq5=#G_|DbNd;<2OaPx=oDsjTxKE;9PH9O~d_V*JCieAkRwl6D3XAB+`dHeKH1 iAU>l~ag9OKf=Y&Uq5hR6>0zHhW_!B&xvXPpYBsnVvUV~^{!E-| zd-#9w>R*!ovK>24I_wotl5qLKd^D_yW5LP){A>)Re;&3=Ffh#ens_>K!Rg~5TRmO< KT-G@yGywoCsW{XC literal 0 HcmV?d00001 diff --git a/gfx/icons/equine.png b/gfx/icons/equine.png new file mode 100644 index 0000000000000000000000000000000000000000..b3da7181b58e1fafff5655db886bcdf5eb434b4e GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq@~-)5S5Q;#Tqxeiokp z_8oAsjG*@Kd}ms N&7Q7)F6*2UngBR3JTL$N literal 0 HcmV?d00001 diff --git a/gfx/icons/fighter.png b/gfx/icons/fighter.png new file mode 100644 index 0000000000000000000000000000000000000000..9deab976ffbefd45aab89d2e6a96a262a8965f53 GIT binary patch literal 179 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|jQ)5S5Q;#TRI-Mohk zBp4n(e%N$s!5_&6&pApH3tE-m$aTBkXjmx2wXJZ4uH+Jrl9yxfAu+hW5V1^Q?5yKNu*hP-uF&UWG-*_cjwg|itOtvwaOi3{rMI> jwYPFS{CeNMiM|)*U)7uNg-z&t1agh1tDnm{r-UW|SD{9o literal 0 HcmV?d00001 diff --git a/gfx/icons/fish.png b/gfx/icons/fish.png new file mode 100644 index 0000000000000000000000000000000000000000..35dbb1d2f6ab5ccd7781d4f172b701b4895d1ae1 GIT binary patch literal 173 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EICAM0vV6hE&{2{=v_}^WVO? zLs;R_l)v?D_Dp~OOWL)4YVLS&n8!W5O~Y8`El=#3f}++JNo~!EN)BN&I*bk<7npdM zr`}~|<1Idht&TlR!u1YE)F<3nS=Un8?)Xfz`AjsAX}+rVg*_9*QWsR}I@}bP_CMnp ZBg6dU(Brii9DG3T@O1TaS?83{1OTgEKqLSF literal 0 HcmV?d00001 diff --git a/gfx/icons/fox.png b/gfx/icons/fox.png new file mode 100644 index 0000000000000000000000000000000000000000..0419c87c78c2faeb09b506c9e05837c391470b38 GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|jf)5S5Q;#TqxeiojD zN1y-O|Cj8OklB)MacgPT`45>dyZ-ac-(tmQJm=9Pp+t+VSyMR*AU04BN_rQqKH3&IfXqr>mdKI;Vst08S=I$p8QV literal 0 HcmV?d00001 diff --git a/gfx/icons/geodude.png b/gfx/icons/geodude.png new file mode 100644 index 0000000000000000000000000000000000000000..02db8771dcbd36b1ccc589e66ef3b3ba054b79e8 GIT binary patch literal 173 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EICAM0vV6hE&{2{=v_}!~XAo zdRl<#gU$qjr%?ij3RJRI8Z@7{6d=g9F?69KPf`q{B2T;6E-T}js28u!e^58MGVh^3 z!)n{Z_17By^Zd8}z|1*8Gvf$5vs_)<JNW-31Rr8}}p8QQ4 wR=(<##na9vwaxh6n9FoUqoeYV`~)9H246#$Sg+cBpFlQwy85}Sb4q9e0KM-p1^@s6 literal 0 HcmV?d00001 diff --git a/gfx/icons/gyarados.png b/gfx/icons/gyarados.png new file mode 100644 index 0000000000000000000000000000000000000000..fad5d8ae311f957d8d60de5330afbb65c98210a6 GIT binary patch literal 208 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq`MVr;B4q#jWHY{46~G z`I$TI&p13{K3rej#=pkwFAuxKoQ5MI`l)PFSLSs~`nB!)W;}@=dFmzpPHjBKt&{d+fz*|Q z1wp0-tcRBi9876*cI^GfqdqrkuB4sBMk~WV|2I4EtjNq1nNYD+is7iX_xzXd7sY^_ N>gnp|vd$@?2>_WLPwW5y literal 0 HcmV?d00001 diff --git a/gfx/icons/ho_oh.png b/gfx/icons/ho_oh.png new file mode 100644 index 0000000000000000000000000000000000000000..6ee91781e4974a9cbbadc2ed74b293f0ff80019c GIT binary patch literal 204 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq`MNr;B4q#jVgYhFpgX zB#wS`SDmEmZB-JiD734xiAQOQ-lE7|yDRtwk1Sn%eWl`p?U|QNKbV$&=H37HuVdzm zxxyc!qF0n&U9j4(TI1}x7pH0%L!XP+bT4(7a9%9%P{SU@3+?|T(x1s$PLIfRdeZB7 z;knqtGnckcV{<;pvuBUI@R>vMWn$5Gdp10L*l6Bw{zbVnK8vYC(QV1z`6Y)y&h&Kk Kb6Mw<&;$S%=u_DM literal 0 HcmV?d00001 diff --git a/gfx/icons/humanshape.png b/gfx/icons/humanshape.png new file mode 100644 index 0000000000000000000000000000000000000000..f5d0b9290c59c43dbbc9be9aa6231f1172046fbf GIT binary patch literal 161 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq@~z)5S5Q;#Tqxeij~i zo{Armb_Kc*(tj-8dT8Fm^NaKpHfBw=J|} zp4cCre@$V*F4mZDJpX^%|4C<%ZoR+9ewJiH=TU*rew}ShI~5mwvpCDlaP79+oX1~I QJ_p(D>FVdQ&MBb@0NVOKJOBUy literal 0 HcmV?d00001 diff --git a/gfx/icons/jellyfish.png b/gfx/icons/jellyfish.png new file mode 100644 index 0000000000000000000000000000000000000000..8583d5cdc23d4893eb89a05cbbdd7f35160b989e GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|je)5S5Q;#Tqxeiokp z_8*uz*RlSW{AXc$%ejN!hxZT9{2gLnjBBE{uA2Yw@v6{&JoP)oZWz~ylzdFL&^jP= zrXcB)VQQQI-}%2J|K0e%F}*>eRpEmam)U!U>r82EfsWG!*jgRJ`PzbceYz#>Zv21f aK7)zjLX7Vh#cTRtXL!2$xvX4sSg$@8M;pb#-m_f8^gt9&l6SNaD5K>XdDGSbeSNUjgTXN%A}uKMpQqVDPH& U@+oEdCJ(aT)78&qol`;+0PKG~BLDyZ literal 0 HcmV?d00001 diff --git a/gfx/icons/lapras.png b/gfx/icons/lapras.png new file mode 100644 index 0000000000000000000000000000000000000000..89ad063d0eceec1004badadb20afb610e2ce0bcc GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq@~%)5S5Q;#TsH!~g%= zA70L&@KOEBKl{VSmpVLJ!8M_}gtLRg^8fsY%-u`@Wv8_2+U$e3iW%212``M&mhfw} z(q#}*)N$B&A)(EFmhn%?fB)GfU6(BUAL`Ji$2yDMxRP}OgVe8d%?lU)=VVT1%$*c? TE=i0ZH}UzN$+<78p}Y}yGSHRlwr>2i+`^zP7%ndOsgz4n3YCYJiIKOF3T2w#gk!g@YV z`2m0Y-7*i2$dn4br)vc&?K+m*R86_XmUAMluDm$^!O-N&{D=IvSroz>56^$taos7AZ6ZUM zU>kF!_Dsot8EYB53UoiD|Cn-s^UAUR2j@Ms7ch8WKE=@FN~2>-ZWBlI3MO}sBNzA? j*Zkp;-xT&~@l1Ax7$NHeSAC}(1i8l3)z4*}Q$iB}*0n}> literal 0 HcmV?d00001 diff --git a/gfx/icons/moth.png b/gfx/icons/moth.png new file mode 100644 index 0000000000000000000000000000000000000000..f44440f5c802d08f78458999395c532e81182c50 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|jH)5S5Q;#TqxeiojD zM+fA8ALfZ-vytLiCF><9;Iz6illAaQ)|hTdzpWg)X+N&KxWb<}H|hneN>z`Tam|MR zhtD?{u=@Pj_&@plhn2@y%zt>9X|h1Z8yvHs<$mzeQJ z((Ze^-HuPL#kX+iBB+_hqxW2A#f!XiF9&U^bj=TJi$m|r*0$J?o L>gTe~DWM4fMJ+S8 literal 0 HcmV?d00001 diff --git a/gfx/icons/serpent.png b/gfx/icons/serpent.png new file mode 100644 index 0000000000000000000000000000000000000000..de575f088b89e386d0d6edc62bc12b06cff6ab15 GIT binary patch literal 145 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq@~y)5S5Q;#Tqxeiokp z|8FpN_WyHu#9%x@fcNM559ygxY!A;rr&8Vaf0m@f#>EF6oG!3>c&uPZT|A8`HCVZE zQKtxx8?RMenTYKz4b$`njxgN@xNAJzX<} literal 0 HcmV?d00001 diff --git a/gfx/icons/shell.png b/gfx/icons/shell.png new file mode 100644 index 0000000000000000000000000000000000000000..4daf2763424651d4352a1a0780266dace5988283 GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|jW)5S5Q;#Tqxeij~q zM;{vh^VFMcc_V4J_SLKOA6rVUCbb1`4)aa3n7Y+##=|G8QvWI>83vSHOHr73_56qQ zms<60|6_vRNdBu&Xq(xjAkpyR{3^W(l@5ECFKaw=nrRlh$x_L?EBF-_|1 z&DR%|J$o0wIp-u)w&yR oMK-Mbt;ziKP($rgu21)?nT@m@`wq{(tPOIJr>mdKI;Vst09|iP-T(jq literal 0 HcmV?d00001 diff --git a/gfx/icons/snorlax.png b/gfx/icons/snorlax.png new file mode 100644 index 0000000000000000000000000000000000000000..f2c1b0b74f317345b5958d66c217ec82fa0ad854 GIT binary patch literal 165 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq@~%)5S5Q;#TRIjhxL6 zGHxH;bDjv~wI-;B<$buXDBS6|p}1B1>1-#Xi;1-bmWHV{N44vp2;DsH!=zj~S8(}B z;ia1%*qmfdo~|`7s5bZg_O9f*wK9*BRe5_01GnGvbQSMXmz00$tF3E){_ppFJ5Iau TyHt65fb92l^>bP0l+XkKisn3@ literal 0 HcmV?d00001 diff --git a/gfx/icons/squirtle.png b/gfx/icons/squirtle.png new file mode 100644 index 0000000000000000000000000000000000000000..614aa21b29286b9b82a35ccb26d501d8440bf4c6 GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|jW)5S5Q;#TY#YpwX5n(PB)kB6pkG;K= zRV0{xzu2(-YtP+hl5^HJmvqm|y%ulqtJtTa%G~MHHEp|nsgle1j>mvTD~xjyRj`R;{Z?S7lv8S7jl^BuMo|c$E-Z5lHv3v V|5>L!o literal 0 HcmV?d00001 diff --git a/gfx/icons/unown.png b/gfx/icons/unown.png new file mode 100644 index 0000000000000000000000000000000000000000..0a4d0e426cc9bdd66e27f15ff47c4edf4fb41f23 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq}u?)5S5Q;#Tqxeij~q zN6hvUEUxgV>=0w%Y!x+NI>YMSF!j&IcEN;q4-XqKU*ItLyu~7ch4UFBgH1qs@a+ku QcR@yZy85}Sb4q9e02T)z-2eap literal 0 HcmV?d00001 diff --git a/gfx/icons/voltorb.png b/gfx/icons/voltorb.png new file mode 100644 index 0000000000000000000000000000000000000000..ef289541a0d7fe76a96af91893084e9f44bf91a4 GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq}uz)5S5Q;#Tqxeij~q zN6hvU5_o@{|Dc|;%C_al38@F?KNKz$pYp@x;@bHS&#wyoCh*AqI@1iZ7R?`Lxp}|3 hn}0cf#o*2}Muvqo5q{>aUj#uWd%F6$taD0e0st7kFIfNp literal 0 HcmV?d00001 diff --git a/gfx/intro/background.attrmap b/gfx/intro/background.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..98512513c595a2e8364eb572a5b40b03d12ff304 GIT binary patch literal 1024 YcmZP^1p^uaO*970GzJW#U`U4m01PW*VE_OC literal 0 HcmV?d00001 diff --git a/gfx/intro/background.pal b/gfx/intro/background.pal new file mode 100644 index 0000000..ae0faad --- /dev/null +++ b/gfx/intro/background.pal @@ -0,0 +1,79 @@ + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 0, 4, 5 + RGB 1, 8, 5 + RGB 4, 12, 9 + RGB 24, 12, 9 + + RGB 0, 4, 5 + RGB 9, 6, 8 + RGB 8, 16, 5 + RGB 5, 10, 4 + + RGB 31, 31, 31 + RGB 9, 6, 8 + RGB 18, 9, 9 + RGB 13, 8, 9 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 2, 5, 22 + RGB 1, 5, 12 + + RGB 31, 31, 31 + RGB 31, 10, 25 + RGB 31, 21, 0 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 21, 31 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 diff --git a/gfx/intro/background.png b/gfx/intro/background.png new file mode 100644 index 0000000000000000000000000000000000000000..dfb2b62ffed8121811f60ffb60cf8672e1b7271a GIT binary patch literal 562 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU~ph!U|?X_%WJ{Jz`*#^)5S5Q;?~=VhS|3r zM2^pQ5-xa|Fm;BWY?p$wwP`iG=$oYp9vSlwG&PCKheYpdbl(~*E~*#Y?(yWDbGf`r z_rh%MR=>YYk}5neMZ&LtSFtSI{e}5T{)M}L-&AY z*ZKD71En$M%L-G&S3msMuh?LG;4$w4|EHA<-oLXg-`LAv5Om35+*#IP`{QR$W$7h* z#RPHpO{^^sT#n3jFWj@Ee5*wXe{6&L$`jZ4HZd~T8^(l-WUrU z=l}CwzqZ1QQNm>x>xW~G)pzypCdXNp99{M|Eng+&!;IzD?=6fjNnE|#8~M6Nom1C6 z{d=_1DUnXq1K^GuFlhn%VvzZcv*6R~d5zgxe0|FKj&|Fvk& ze_jz+?iqK&T1~Ur_cNxcoqx{jkacs(l>^#LOXfUv4UPR|ukj-#^d8emiNKDgDLW0n z-0t1EGoCr+`J03^mFZVg9~aEcXPBei@-JoW$7o{|C TGn|>%1xgH_u6{1-oD!M7*PNK literal 0 HcmV?d00001 diff --git a/gfx/intro/crystal_unowns.attrmap b/gfx/intro/crystal_unowns.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..f97c9cb9304054798a0c45daee13d20708c2b240 GIT binary patch literal 1024 zcmZR;0{$ZbEYb`}(*K8nJR>6$6Eial3o9!d8#_A#1G@hR$zue;Fbf~N{zLZbD0}FI F003~|mG=Mu literal 0 HcmV?d00001 diff --git a/gfx/intro/crystal_unowns.pal b/gfx/intro/crystal_unowns.pal new file mode 100644 index 0000000..95f3e05 --- /dev/null +++ b/gfx/intro/crystal_unowns.pal @@ -0,0 +1,79 @@ + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 diff --git a/gfx/intro/crystal_unowns.png b/gfx/intro/crystal_unowns.png new file mode 100644 index 0000000000000000000000000000000000000000..130606b8510861317df0a1c80a4f270679f26b62 GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU=UzpU|?X_*lh5Xfq~(Qr;B4q#jV~zYraDU zJa3Pk5Uk>m&|d0e>Bi3}l&tTOYGwFMVC9iVCv0wO>T*vw(e?WKuRp7w9ABC6QCa9u z<)JF|Gd$^SzB`KAFCP**u+Z#~a+#7#$5DkyRuP%6zHSl{3H+XEHzGI~&uB_N?9%qV zv}G^zht10tALC%ZrO4Ona*%OF!J=NKx;vA#B?P!OUMX{F=< z3_h;WS7*MEx%XHxw?C}aX+o9v1^u-P--a!#l$5frKDwK`i31M~BphI1V+cu-`8lt@yb5HMr>mdKI;Vst0O@Z#%m4rY literal 0 HcmV?d00001 diff --git a/gfx/intro/grass2.png b/gfx/intro/grass2.png new file mode 100644 index 0000000000000000000000000000000000000000..49f5eabf6e5a0a4df36a14e2e83fad4d419684a7 GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1zMd|QAr-fhfAF*LBs}`_ z^Z#?nCr|(1PyfJgr+@yzFaCk&MD|5)XY2>e;|I|!KG8SPgA@w{LNE>8de literal 0 HcmV?d00001 diff --git a/gfx/intro/grass4.png b/gfx/intro/grass4.png new file mode 100644 index 0000000000000000000000000000000000000000..115d61f3866c1515700a30fe5d0bfd2c08bdcb49 GIT binary patch literal 75 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5b|_!45_%4{Nwxlhu7;$ bzPz_*Sku85c*Dw46Qs)1)z4*}Q$iB}%7hl0 literal 0 HcmV?d00001 diff --git a/gfx/intro/gs_magikarp_bg.pal b/gfx/intro/gs_magikarp_bg.pal new file mode 100644 index 0000000..9edb529 --- /dev/null +++ b/gfx/intro/gs_magikarp_bg.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 18, 23, 31 + RGB 15, 20, 31 + RGB 00, 00, 00 diff --git a/gfx/intro/gs_magikarp_ob.pal b/gfx/intro/gs_magikarp_ob.pal new file mode 100644 index 0000000..0887937 --- /dev/null +++ b/gfx/intro/gs_magikarp_ob.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 31, 31, 12 + RGB 08, 16, 28 + RGB 00, 00, 00 diff --git a/gfx/intro/gs_shellder_lapras_bg.pal b/gfx/intro/gs_shellder_lapras_bg.pal new file mode 100644 index 0000000..37400e5 --- /dev/null +++ b/gfx/intro/gs_shellder_lapras_bg.pal @@ -0,0 +1,4 @@ + RGB 19, 31, 19 + RGB 18, 23, 31 + RGB 11, 21, 28 + RGB 04, 16, 24 diff --git a/gfx/intro/gs_shellder_lapras_ob.pal b/gfx/intro/gs_shellder_lapras_ob.pal new file mode 100644 index 0000000..c443ff7 --- /dev/null +++ b/gfx/intro/gs_shellder_lapras_ob.pal @@ -0,0 +1,9 @@ + RGB 29, 29, 29 + RGB 20, 19, 20 + RGB 19, 06, 04 + RGB 03, 04, 06 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 00, 00 + RGB 03, 04, 06 diff --git a/gfx/intro/pichu_wooper.png b/gfx/intro/pichu_wooper.png new file mode 100644 index 0000000000000000000000000000000000000000..923e70b8335fc397443913c4d46f2a791f3e3d8a GIT binary patch literal 709 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU~ph!U|?X_%WJ{Jz`)ew>EaktaqI0A+q~Nj z0xI_KHhHOmQe^y z?cx+%$?%*tV_oCZ%0;XS;;VGh8@M(^ zMfbgsx!BAsymlAQ8{dx(6JHfvuVM{S;yAIAL8yv7Yo)A(w}QnNwkt}K0*R;BHoOqL z8q4m$Ww0vMlHrBmNil|%cNk}wglt&DP^NjcEtZMlYxf@W1*`{(JUS<8Y+`&>F37&c zepZBC&}xUNX@v_y?=_xkj4EU6VR*27>pRCq9J8`k=qz-SV^5P{?O>_ZU+B5Vb$Zk- z9_K%~6Tb5K^VY2Yf9;joJ!OaIu4?`2dzrMS7TPYBvi*K9ZC3T1*L%+~m~47xwD^0s z*W+nRkDH#o)pz4)@mq(-4#z*u|57^x7$O@gL~c&wc=Yz@riw5XwJX^drrw)7yT^?C!F}sbsW%@yS~KbR0_vvoohmGfxlMXDD zb!JP7kQCsxSi*Gf;pF{o5^2nFo6;5;^bNygm XzN2~mfuqM(fzqd^tDnm{r-UW|WDrXh literal 0 HcmV?d00001 diff --git a/gfx/intro/pulse.png b/gfx/intro/pulse.png new file mode 100644 index 0000000000000000000000000000000000000000..85bad34158ce8c5656daf6c034b0017271bb2a32 GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;ICI$uu2APGnoeT^N6FglULn>}9J-3nfkbyw! zLv=%m;0R4yuWyB1{0|Mw-!)$g4x> z{qW^Gi~d%v5qZ9~_)&p}NP*nl^Ov86O;L27Gx2 literal 0 HcmV?d00001 diff --git a/gfx/intro/suicune.pal b/gfx/intro/suicune.pal new file mode 100644 index 0000000..5b1be1a --- /dev/null +++ b/gfx/intro/suicune.pal @@ -0,0 +1,79 @@ + RGB 24, 12, 9 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 24, 12, 9 + RGB 31, 31, 31 + RGB 8, 9, 31 + RGB 0, 0, 0 + + RGB 24, 12, 9 + RGB 24, 12, 9 + RGB 24, 12, 9 + RGB 24, 12, 9 + + RGB 24, 12, 9 + RGB 24, 12, 9 + RGB 24, 12, 9 + RGB 24, 12, 9 + + RGB 24, 12, 9 + RGB 24, 12, 9 + RGB 24, 12, 9 + RGB 24, 12, 9 + + RGB 24, 12, 9 + RGB 24, 12, 9 + RGB 24, 12, 9 + RGB 24, 12, 9 + + RGB 24, 12, 9 + RGB 24, 12, 9 + RGB 24, 12, 9 + RGB 24, 12, 9 + + RGB 24, 12, 9 + RGB 24, 12, 9 + RGB 24, 12, 9 + RGB 24, 12, 9 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 12, 0, 31 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 21, 9, 0 + RGB 21, 9, 0 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 diff --git a/gfx/intro/suicune_back.attrmap b/gfx/intro/suicune_back.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..28e27ad62d656e77d0e95f4d2f67409f6dfa5907 GIT binary patch literal 1024 zcmZP|3b3%Su;5b&k!NGWriPuJoq>=%HhnNLkbXueU|?s53BzeZ@*ss!?TlFTGchqS zFu>&*n3Eaktack;T!~Dw* zA`B0@=O~DVwshP(aO{x7@-kP^>s&Sm8XiBJx3nrT%k{VRiX&HcO1@xmUUf{gD?)q8 z4lm=+)){Ovp-zWnEbraD`R=C6+6`KvtL*oGfA{XI?8IlDF2Uz&J-+>Zw5QlOV$r=` zg^v#%U%q!brh0)v!(HIeMn@jIiqf=36*VyrjU5H@^KP%?Ok@?{%?Rc@u$H04WWDm0 z26F~R19f&o#cV%5p$6UqN(^BZyU$H{s-VTVT#6-dpUB^PDvF)s>)qtONXLIBya&GIayiPsIP4ebFt5c&l;bx; z;`+1B?{_sZ{fLmC#{Mv|nZ3BdLEy__xi?o2@JFm@wTA%MXv}ZMx~> z6Mi{2XXXlaKP_czmh7bSEB|*F)-zjg<9|~m78(7rL(MRu>XOle>RX%3P6>9i&FTAX z*CgQh#gR4Q4CBQI=kM*<&-d^+$Bp$GTf0hBB7+mkOhO+dNJji}lTEkLy5+h4(eskG>#Dp$e@{wL8uJ~-v;$8Ab~xr9{QAV_y-8ii`ogZ6)4bbP zT5b5gnxiCqby%;d!QTakxWvDS&Y03DsbCyh$*ugr;2Q7ZV^&Q|n6547C^_u0we`lO zqf@LyH_OCzBuOOq3GF!YUT=Z2!u-Y^XKt_=^AtMjDhR8Gy$$k-;&GIgeHeAvCQ|WR ztsrm4TIJW@as$|IOp}h0ovXSkVe0gJrHOahj!rdUEmNM5)E%m~S?k8fJjUql3_owo tu3sp&plai>?TkO~FF2aV`0>y8Px=>Bb&B@7?%D>*OP;QNF6*2UngC~MkM#fm literal 0 HcmV?d00001 diff --git a/gfx/intro/suicune_back.tilemap b/gfx/intro/suicune_back.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..52829cc741b3861b033a0a8a3d76b6e3e7cc4d94 GIT binary patch literal 1024 zcmZP|3Y_Q28Mh0vB@7fdJLN|TnTsNS{l-lOhJe7J;E>R; za0Z4|tJkbWkq2`U5|ffsQq$5I7r-GBYzXVU-6-LnN`vL!_CY0Ns8@Mn)DE7N{f^{UCXS xET;V+(~-1exE~~sYy-Oe3=B{eP)ji7QB~lS2U)^`={{`gDG~cW3WjtD006I_zkC1y literal 0 HcmV?d00001 diff --git a/gfx/intro/suicune_close.pal b/gfx/intro/suicune_close.pal new file mode 100644 index 0000000..fdcf058 --- /dev/null +++ b/gfx/intro/suicune_close.pal @@ -0,0 +1,79 @@ + RGB 24, 12, 9 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 24, 12, 9 + RGB 31, 31, 31 + RGB 8, 9, 31 + RGB 0, 0, 0 + + RGB 24, 12, 9 + RGB 12, 20, 31 + RGB 19, 8, 31 + RGB 0, 0, 0 + + RGB 12, 20, 31 + RGB 8, 9, 31 + RGB 19, 8, 31 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 12, 20, 31 + RGB 8, 9, 31 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 0, 0, 0 diff --git a/gfx/intro/suicune_close.png b/gfx/intro/suicune_close.png new file mode 100644 index 0000000000000000000000000000000000000000..ef365de96daa6c01d7076598fb2c90dea63a7fe4 GIT binary patch literal 978 zcmeAS@N?(olHy`uVBq!ia0y~yU}ykgCI$uuhBZ&swlOd;&-8S045_&FcB*aOZ3B_x z^XFuITqLzZZ=o^Egr+6MvLSo=FK_YoU%0IMK(L0~<{xtNI;xCW_V45Gn&z|n<}MQ# zfeFw0|9?MdpXp1M+PoL<%N9+Tk$PcI@v)M{rV`1y zZqHY4v0J;f?DXQR9XwmicQVXv{KH{$YD?0Bmpu#%#rNFjh+fXKCW!G@ed&gr z7Zi6fJmdILdCEaK_)X%8Sq)Rwf=@?nc3kfH^re8wl$G359Hu;LHcb5QD0OvnjP2%c zl{J$#du^G#C^j(Z{Mm~6o4kDI3VcxdDzw4tP}U`!HhM>uFm|q;WW?bdEuw<*)G4o1zRyyX*sZvxGnDnOobM;`m_JAK!}dbiJKEQI zi@U2?RX8=ox*eH!H+`!NX59C2)rR};-YZ(Hn#p{B3Hz)X&%oJ7A2~m=<&=5i&ah_9 z?bom3avPJps(BtB=VCZ;``-2>E|V_-9V?!u_o<{UcbFacK|~>a!Dd}iE7lV)POJ}% zFTZ%_faZlMB6GM7E^>UU_GYn(FX=oC#>D)@^;ym94*EQnJX(^eiSn~WL3kYZh5J;bK7?l z=3vgsf;(wnx2RO|%{Y7YGSi#n12@;d%G5PxdnR{dex?ZXlqBJO4vX9(#WwgVZhm`% z|3{tVeo$_ zX0RhcXwe)dcK!$P$Nw`a>|=g^!1@ERUzF>}`JIdkXD$0EOA;iAP$ zmM&YqV&$sUYcS>4u3NuhwYpa4Mt literal 0 HcmV?d00001 diff --git a/gfx/intro/suicune_jump.png b/gfx/intro/suicune_jump.png new file mode 100644 index 0000000000000000000000000000000000000000..67cd7502a320faa25148babd6c3604e4a8503db1 GIT binary patch literal 1112 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU~ph!U|?X_%WJ{Jz`!E!>EaktajSQ#WA|-0 zk%p%wp&9yp(Y^`m8+G4&+wf%<@5HHFnKTzpTJ@dhb#|`TUFSL{{kz^ADy-TqPaaJ( zecQ)x_dR9zMy9{ae>p8J#CI=k*E_WS{n-<7`5If2_w_=08~ z%Vzw+e^Ec=Dwo46w`r4{{-57^K=b1KB(JN}!*0BFIJofUq4dVHcU2C1D2i-!-_pLX zox}S`#xu7*&K0{QuLUNmT8QmqRceu_d?5W$?B0un6HG~^%1;!JNfh(CO22=c$1dEb zwB!)ube45L6w@`%88DnNc&Kse)A^nTFO~^Bwmhl~db2bmIGq2T7xr;I5u(KSdxC^v9w^xU1IQ|!p-K1H9Y>w(6+%f8o~ zRMYGqgi0M`^$UB>!XYTxC#W6d((J_;va@5A=%Gy=5iP3hOp+T^SL|{%U@CA}#&X%? z@Pe4lt9l#WDLk=ji01Oto+zZ{HseHx+A$jqkBEql3yoa)s`;|qav=%_{mxuo)pGx- z?20cIzxz%XcLY>KWVSC$J8^M2lTN!tosz1hw^-FCFV+nVGY=Lu#U1QTS$I%6#nW+u z(ERn15o`>_d~@csrkCjleZJ)F_RuTKKTIz9!nWH#Tc0(2YLVT1HH<;jCVNI$_Sv>o zs~22fQLwl#yh?>>)q=I_R`0rf>C5#Q{+(PqChm#77sJ2QBd&J++biE6znc-puVLO3 zYo3?&E4Jl^@4ojtqwZhbvqF3dH}k7~w`DKhPtLnioj2*ojjL-Jw?F08eQ&59!~e>| z$Z86EMgRR}pVN*Vn$uOzYkoeEttTQv#j`!Sy6K1NMb@=DFQ1vwUi9Z@%M9b@TIDr6 zr+!WK5=-M)en#kGQQ0LkDRruM}8(hBv&;Gq7 z`QYIRu0yfu1w|J6`>(S1ODS4ZSNxd#cM8|`*8Nf3b!S_D$<_U-%4xl=S|7|MY!&L6 zyT9_wt#gJu4SMF=#mBR+ejjq@M!xLdB-ULsIL-T`ws}Ooj6eVW`nTxqUzuO?d)H-6 z_pB;eu-f{)`Qn{x9s7B=+u3ht`u=`doy|^V{g#;tIyQSho6M@uZZ)j^V4&qNm1%vP zg_#c1`;RIqiu&spn%|D$I$An^&wa1NEoYZH)cD2kyCw8PBDyRmQ0YRRCQoMfTdikP ziXG*D&Q|hVd-F@8-K5p$dN$Q=Zu+!+U7DcU>)D@^TsE(GvUS6s53io?{cwNRowugH e|L6Zd{apUZq+>O2%wv~=iVROzKbLh*2~7Y@-4EOV literal 0 HcmV?d00001 diff --git a/gfx/intro/suicune_jump.tilemap b/gfx/intro/suicune_jump.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..4ddef19c7f2726d8662adb632e09135de1e2ef4b GIT binary patch literal 1024 zcmZP=I)IUhnT3^&9hZXz1cih}M8(8$$tx%-DXXZespFD2Ff=kYF*P&CCGX(qmwZBEQgTXaS~@QIg2JNWlG3trT=Jvhqai^35C8y9I1b?e literal 0 HcmV?d00001 diff --git a/gfx/intro/suicune_run.png b/gfx/intro/suicune_run.png new file mode 100644 index 0000000000000000000000000000000000000000..470ff0c0bd2811bfc2634e9323016ccec02d079c GIT binary patch literal 792 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfr071r;B4q#jU&39M|13 z;Aoq8BP3L1-NjTsgGuYJE&ihM;_SQJD$y%jRj*6rI6pgkX3=gpfB(r(j1!pb+rB+( zTAn{6j#>1BsRF}$#yVDmh6l_Hs!Rn_SQrd1?7OTTDNvgvmX%rlA)5I_Zq*Yf(Mhdc z!Vc_hmJyCdp+?Kan5XBS`zLzAzM(iTjlsOg;ebvRi|y%W>wU$0-Z*p~s7>3%^s}1Z zaYOWxeRmkI@wm$O6!bB?V{2%?@V!pj?!g6)-_qTV47Hbew)O~!2xwd_J9xTQRnz$S zt|o7mSrsAN8zwBQ-Ol@}dE%#SO4}N4^;f<(yY0R$ATfSg+j$-j2AzrbryX72n0u+g zYf@}Xqr^65)qLZ1KiBpbq$M#<>Rl(Qy88ip!q$0fr^W{TdUEHi_BN9*M_*V+yuBa1 zMn8+;*KOV}+Yd*vpKx{FuEqB~KX6t4ig4?-dh56s9QziXait|XqQUCO)dLpE2cA0B zvWIfawF~uY((p-8Ns1EaIwkUD=^i0N%f9Ol`tg;VCN=6u|MOhg&ahXW{lDe}yWgT0 zj2P~`oUDCeYx)$$)ZNu_JbT~%ZC+Vc={sj(!>SwY;wKyR?4EpHv^_*1`{i73HI)}k zMa7oe6e5-`__gTE1#}dtEkHSZRrI8*=`$#JjsYx{j23ve3#Vfmq@Z-nKbQv<0qa4wFgc(RI^Pf z>n)m_sMlb_c#HLhp37$;mhIxPz76wa7bmTrP%M!pmHL0y!n+RXE;jy6-(qbzE1S~JfT5S>&I>{Dh6g0nWSXwzSIrZt$#|lE?3?(F=99-mJwo*7N-^|LZ{}VoCUo@k zg&mDuUkf)Cib&T?*)WU$-a&_X3nwu7Go(J4IpH5`r}a%n!Os2cpd|0<>gTe~DWM4f DarI?` literal 0 HcmV?d00001 diff --git a/gfx/intro/unown_1.pal b/gfx/intro/unown_1.pal new file mode 100644 index 0000000..7dfebf8 --- /dev/null +++ b/gfx/intro/unown_1.pal @@ -0,0 +1,4 @@ + RGB 24, 12, 09 + RGB 31, 31, 31 + RGB 12, 00, 31 + RGB 00, 00, 00 diff --git a/gfx/intro/unown_2.pal b/gfx/intro/unown_2.pal new file mode 100644 index 0000000..650eeb1 --- /dev/null +++ b/gfx/intro/unown_2.pal @@ -0,0 +1,4 @@ + RGB 24, 12, 09 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 diff --git a/gfx/intro/unown_a.attrmap b/gfx/intro/unown_a.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..8b1b66033a91d6c72b462f56e954d682365283cf GIT binary patch literal 1024 hcmZR;0{$ZbEYb`}(*H;0F+*S^g%7e{N7+L!1OP1Bm4^TT literal 0 HcmV?d00001 diff --git a/gfx/intro/unown_a.tilemap b/gfx/intro/unown_a.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..6a035d14a44cce14ee68dab5afd626e5959255b2 GIT binary patch literal 1024 zcmZR;0{$ZbEYb`}(*FmIJR=h`%q`g5Cm<*!j89%cQArt}yn&&SF+O<*M<-`|@&SQC b!T981av&O;`$6I`JecH>-7?A^dLaM+>KvJC literal 0 HcmV?d00001 diff --git a/gfx/intro/unown_back.png b/gfx/intro/unown_back.png new file mode 100644 index 0000000000000000000000000000000000000000..4d355a607a50602b0f1c08965d641b4966dade4b GIT binary patch literal 355 zcmeAS@N?(olHy`uVBq!ia0y~yU{GLSU`SwMU|?Vn{%QV{fq_xW)5S5Q;#TVgYri7~ z0&EW)7rNXk5YC&RYr)_#r$}ewJhf#vPVexF(*E?}yz)(*M-P?$U6Wg1&)>->rnpk6 zb*W&TX_(0|Chw)E4mB>*2wAs+Pg6tuulzrG-sN?TM|QY+^4+nL6wr~3Sg(Hj;5|X9 zp5w}0N`E=ZB33S{Im}UG@k%26ib#fLl1X+qTXLPdZa{_Bw4INlb@qHK?<&uIpzY?a z#dtIDZS0Ii(pAsDeT!ajDLbo6ZrjKHZ|_dbO;(lSnYqIFi_4M&eBVU$8=vx8$QD+z zS{*HZ@Y%57y|(e)uWj9aY_kh(E>BLjI~rRo9wB%%Y0VOCsh$^%TOF1uMn99hpYxD2 zvAyDYTV3<~LobRP%FcY#bAGPyidXDN0iVwEgW1zE=B`=p9KN5yu|(fepY!+>Q0RHO L`njxgN@xNANh6d+ literal 0 HcmV?d00001 diff --git a/gfx/intro/unown_hi.attrmap b/gfx/intro/unown_hi.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..3f7d23b64ea63ded299009b3c3352526109d56fa GIT binary patch literal 1024 zcmZR;0{$ZbEYb`}(*H;0F+%_?d>9!S8Br8bSsuk~5C_eCkPr%{raZD)qwJv<0su;+ Bm6HGf literal 0 HcmV?d00001 diff --git a/gfx/intro/unown_hi.tilemap b/gfx/intro/unown_hi.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..4af27a1587723d9d77772f3f6436ee4cf9e0fe40 GIT binary patch literal 1024 zcmZR;0{$ZbEYb`}(*H@4=i_JKWnjRqUrruu98UA~^zq3vGuYWP*y1xEtQ(L0w2^0F tWn+h$4585cCn72)4v~P8X!0tmYU)rK2!$pO5kw;CDUWQ|D0}FI005SXmEaktajSKzZQgAI zk>m4yteX=WyzZ8K;N68$~h{*Y69{{db;+L8YN_kC^DY zZ=WxIZOis+V7+xdCSGIf-iPnDFTC6A{^LkKZ-bCqn%7i|%OVl8r+<-ItIBjVg>wn# z{Ca^b8-;B@a$L_IyeTBE617zQ^vtwlF_+u2`rTwM78bmn8sy!VCv{@S)Bagy?EE$w zTN%Iq@LXBVl9n>*p_=;c`|qW;yj~=hU9kU|*IUU{zF6kWBU0a`@0zxj{M1{2;BTbn z)guy%+hQkHE-p3RS6b=n;OKBBd0W9Z@74qNW1DYsMaQg)TCqvLiD7~Gi%0{b;N5$e zH8`_w?_Rlg_RLj52RLW7J4ni}@Ok@O(?GHMQo!L=k*1y-f8JSk@>1t)XH^NY`5Z?a z=JF{ghbNTW{}I5?WyEO0C_I17yZL*jCN5>y`B74SlxO3OMNFbRKbks!z2A4Y;=zeU znk)_c2_ z6E6C%U4G|GC<7n&{aiVXIiIIcg*~?Gt%@U$r9q{l&{o&cjTA@NApV7POjDi z6ITg~Zs-@O6m-(as_|>rWbnKz8u-0+OTZf+u|n&*LX2Jyz&u*}!wmIh;-T zv@27_jBnPiQ(vU9#9jT9Μ}Q_o5veDAiuJL;-lM^4PIN(lYSUh!MTAiVn_$M1hU z6V#{QRG20)^KCmr#y^$~LJjj}9n>98D|j}^+B5R_+`Kt2{lLk&@6P4^VE?4~B6j@> RZZ%LA^K|udS?83{1OSodn7#l2 literal 0 HcmV?d00001 diff --git a/gfx/intro/unowns.tilemap b/gfx/intro/unowns.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..903f59ae5adb5f90ae98f9fd882c378fa82b84b3 GIT binary patch literal 1024 zcmZR;0{$ZbBxx@O1`bXJUIqpv>Hjc!FK-`T1_lX91_oZN@=?(-u?!3vnjrPq^k-$~ zp6PWkc*Er>!C_c1Ue zKtvfBtgIj`GywOPfgMK&sYEwvHIJ+t@Atc<{f#mTOf-j3I;t{zgfz4%N+_R~4f-bH^GIV?SR w%x~iS7t5#p5Q$rATgQC8z3B2+2maI}+?(bdvaU^dlm~K}r>mdKI;Vst08v3oZU6uP literal 0 HcmV?d00001 diff --git a/gfx/mail/dratini.png b/gfx/mail/dratini.png new file mode 100644 index 0000000000000000000000000000000000000000..51c0d4a9346e2c3f3723df0709f1eb7a4fd7d443 GIT binary patch literal 131 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7U=UzpU|?WK{{Q0z0|SGXr;B4q#VysIi<}IG z97mb{$(1Z@UZ-bqVC^Nwmhz~2o+PFDMcyraQWb|c9&5a*_aO6g>e;n!2cP8J5el1W kx8jghJlCer8r$pU$$R#j&0W9sb`;2TPgg&ebxsLQ0GiJ*Pyhe` literal 0 HcmV?d00001 diff --git a/gfx/mail/eevee.png b/gfx/mail/eevee.png new file mode 100644 index 0000000000000000000000000000000000000000..6c020746f1c2ce95a6aab9d1116526761699ea87 GIT binary patch literal 128 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7U=UzpU|?WK{{Q0z0|SG*r;B4q#Vy-Y7da0& zaIjottY@B<^15t7n2y7ZoE;N{-!<~B{NA|VY^iHW=Ak9G&WJua`$#J=Si0|orHTE% iokf!K`aibWykPu1P5ooSPp(HGqdi^yT-G@yGywor5il+Q literal 0 HcmV?d00001 diff --git a/gfx/mail/eon_mail_border_1.png b/gfx/mail/eon_mail_border_1.png new file mode 100644 index 0000000000000000000000000000000000000000..83c029e90b360a624dddde7edf842c53647f24d4 GIT binary patch literal 84 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznVBlb4U|?XFzt-Xv0|SG!r;B4q#jWHY{46{P mkC;Ep*C~8#lx$__YD{4~_gZwZX!fH2AmyH}elF{r5}E)e$`@z= literal 0 HcmV?d00001 diff --git a/gfx/mail/eon_mail_border_2.png b/gfx/mail/eon_mail_border_2.png new file mode 100644 index 0000000000000000000000000000000000000000..b34ffce17908d4ce20d8e09ae8b8254173d60d8d GIT binary patch literal 77 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5b<`=(6_)@2 literal 0 HcmV?d00001 diff --git a/gfx/mail/flower_1.png b/gfx/mail/flower_1.png new file mode 100644 index 0000000000000000000000000000000000000000..2147bef318d081d6ba9cb47239c9cb52475c3580 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1=AJH&Ar-fDPaNcAaNuA* z=)ko>CEDLp)8T_izWnEiEsHNca#t#BZC}&BspFKFg^a*~!!h5!eqrd8l}VntR(c1> NC{I^Emvv4FO#nW3BLn~d literal 0 HcmV?d00001 diff --git a/gfx/mail/flower_2.png b/gfx/mail/flower_2.png new file mode 100644 index 0000000000000000000000000000000000000000..3f0d34edce07ac2d02f9e70533ed8fcc1593102a GIT binary patch literal 106 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1hMq2tAr-fhfAF*LykPnN z@IO!e49S1SH3?}O(tjLaQ2F;kzQMC0BEfKjPK0a((-Lt8A8)Po^U@N$L56s``njxg HN@xNAv=bk$ literal 0 HcmV?d00001 diff --git a/gfx/mail/flower_mail_border.png b/gfx/mail/flower_mail_border.png new file mode 100644 index 0000000000000000000000000000000000000000..4d2ade2a7b6e8fec5230e5fc2cbcfe360d580c77 GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|CI$uuhW<5Gtqcqd0iG_7Ar-em`wnt4IC3zv z|Ixc~s;ppb^dwf9ic_ibv;7lH+;%*vn53g~BSFAdH|Nae_JFn9mcNpXxLObynp30G n&zbdtPm~#?TYJ@g1=->0>gTe~DWM4f(0nem literal 0 HcmV?d00001 diff --git a/gfx/mail/grass.png b/gfx/mail/grass.png new file mode 100644 index 0000000000000000000000000000000000000000..7e1f176193c1f8347aeb7bb8e14c40111e72a999 GIT binary patch literal 84 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@koI(O45_%4{NwZdgZJh= lv=R7dEb}bU;=o}BHil#aHpXlHX@5Y#4}awdYaMQ8)xhPVlu3}vr{&1RHE-vgQ8>FVdQ&MBb@ E05;SfBLDyZ literal 0 HcmV?d00001 diff --git a/gfx/mail/large_heart.png b/gfx/mail/large_heart.png new file mode 100644 index 0000000000000000000000000000000000000000..0753285746fc969ed79cadfa959ad5de7fc2c8e2 GIT binary patch literal 112 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1=AJH&Ar-fL&z$CDaNuCR z$jH4xC3^c35rrM^o^MF3IDWyH?59XZ|T5 U8xUvUn+-D2)78&qol`;+01?+DG5`Po literal 0 HcmV?d00001 diff --git a/gfx/mail/large_triangle.png b/gfx/mail/large_triangle.png new file mode 100644 index 0000000000000000000000000000000000000000..1a518f7746d3066782836f65e675703f6adf8bd8 GIT binary patch literal 110 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1rk*a2Ar-e=PjBR8P+(v_ z*uZQtY4z^L)fNs9e6?mb>&F!coOw{>e#7~5NUEJ4BJ!6{BKL4xsqQ^I^o`4MU MboFyt=akR{057Q|82|tP literal 0 HcmV?d00001 diff --git a/gfx/mail/litebluemail_border.png b/gfx/mail/litebluemail_border.png new file mode 100644 index 0000000000000000000000000000000000000000..485e390f8fdaad99d652afe7ab79928d5c3087ba GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|CI$uuhW<5Gtqcqd{+=$5Ar-e``vSQRDDXHl z{}wG0&3|x}eQyAtLW-64;iu0XFRQWgUECX~u^=E&<{{_DqaW1T>`ZotPuSL?{bq-G n(G2bVyJe?cT%B?CnQ*(@WF-&b>;?0yKvsCV`njxgN@xNAv28B` literal 0 HcmV?d00001 diff --git a/gfx/mail/lovely_mail_border.png b/gfx/mail/lovely_mail_border.png new file mode 100644 index 0000000000000000000000000000000000000000..48b8e7b7bbf3bb5c0a48cd544f4cd357a2f45973 GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2V9;PCue(ZRfOr8Aiply~{OeEjdb=$KQ=X`SZU9I;p&jxboFyt=akR{0G;t%lmGw# literal 0 HcmV?d00001 diff --git a/gfx/mail/morph_mail_border.png b/gfx/mail/morph_mail_border.png new file mode 100644 index 0000000000000000000000000000000000000000..0fc395ef881e49b3c076180e41a154b8a4fe76da GIT binary patch literal 76 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5cYI&45_%4{Nw+8#tuFM cWq}A5hSo#eth?$jh=G)Oy85}Sb4q9e0ER^qoB#j- literal 0 HcmV?d00001 diff --git a/gfx/mail/morph_mail_corner.png b/gfx/mail/morph_mail_corner.png new file mode 100644 index 0000000000000000000000000000000000000000..b4d151f4d79d658a2a12579deac1f3ce082790c2 GIT binary patch literal 110 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1rk*a2Ar-e&dm1?z95|Tx zr4~$#+B;E7;l)vLO95TKN84IF7dkt{X|PRd`%zHx@TC0jGyF@~m!vD-y*OK{3S^L{ LtDnm{r-UW|sl6bs literal 0 HcmV?d00001 diff --git a/gfx/mail/morph_mail_divider.png b/gfx/mail/morph_mail_divider.png new file mode 100644 index 0000000000000000000000000000000000000000..8a280b3996fa5f31f63258ba46ce80fb3b9215b8 GIT binary patch literal 74 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5cG6$45_%4{Nw+8#=ZuI aV{8noa(O@JJbAALQsn9C=d#Wzp$PzqSQRM% literal 0 HcmV?d00001 diff --git a/gfx/mail/music_mail_border.png b/gfx/mail/music_mail_border.png new file mode 100644 index 0000000000000000000000000000000000000000..035757ee407251558b2858d05afbdbb961c9868a GIT binary patch literal 107 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1MxHK?Ar-fhfAF*L)X!*S zVK!!-kghXa`!it>so$KE_!YqHMW!b!w%#srBY&z^s|uUEBw+qntFj7Fy= U7ftwaZa&CBPgg&ebxsLQ09O$wX8-^I literal 0 HcmV?d00001 diff --git a/gfx/mail/poliwag.png b/gfx/mail/poliwag.png new file mode 100644 index 0000000000000000000000000000000000000000..a1b092e60e0cd5a067aa2a8fb43f7f73391b568a GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7U=UzpU|?WK{{Q0z0|SGb1E_o0)-ndcjoO;QU!{A37YVQ9Ujv-}}bssl)$r>mdKI;Vst0Ah(7^#A|> literal 0 HcmV?d00001 diff --git a/gfx/mail/portraitmail_underline.png b/gfx/mail/portraitmail_underline.png new file mode 100644 index 0000000000000000000000000000000000000000..6c32516edb5868e4ca75b14f1bc1645c4690ff2c GIT binary patch literal 74 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5cG6$45_%4{Nw+8#y&oo a24#lL9lSq(8>owd6nVP(xvXEaktam)7fMa}~T z94!y!e?=8ccI9wi%%iORCnrQ;fF4Y3nN_35|7%r1hG^km+rGzq*S)FtnXs} ouM<03+AY5)B(Iq~`R1R`3>%*r#0mac(*Ux;)78&qol`;+0Gb&vQ~&?~ literal 0 HcmV?d00001 diff --git a/gfx/mail/small_heart.png b/gfx/mail/small_heart.png new file mode 100644 index 0000000000000000000000000000000000000000..51a61a19dc90fb5106b9d6c4c6b904bf824e80a9 GIT binary patch literal 84 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@koI(O45_%4{Nw-phldl} kn0W%eG|qg;Z-2PHnxSSMr=Bej+ZB*3oxJfdw`$8_cB}4G2cJ$K^i<={an^LB{Ts5(nlK$ literal 0 HcmV?d00001 diff --git a/gfx/mail/small_triangle.png b/gfx/mail/small_triangle.png new file mode 100644 index 0000000000000000000000000000000000000000..f5d98bf9d659ea2a2be402da6011f41075e61065 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@koRIrf%Q~loCIDMt9@hW> literal 0 HcmV?d00001 diff --git a/gfx/mail/surf_mail_border.png b/gfx/mail/surf_mail_border.png new file mode 100644 index 0000000000000000000000000000000000000000..c1b6d7f5dc2667cdebdabee1bccb6261a4619ff2 GIT binary patch literal 126 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|CI$uuhW<5GtqcqduAVNAAr-fBdv9|xC~&y4 zvS%y_D__FK;g>f3m*)}YBKfrcjk~tCxi9Q>n$LNEl0kWgOY_7R2J&B~JdsG*pV(#R cy6W#4rkT@CU#_UXJq2X2r>mdKI;Vst0M*qilmGw# literal 0 HcmV?d00001 diff --git a/gfx/mail/unused_grass.png b/gfx/mail/unused_grass.png new file mode 100644 index 0000000000000000000000000000000000000000..bdc18dbaaf1eb02046e99a14f6afa8b661d2a5a4 GIT binary patch literal 92 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznVBlb4U|?XFzt-Xv0|SGyr;B4q#jWHYpASB> vZ~n_(SKaoRjVGaL{zC(PX8yyB0*veo{~b7%EME2rq>I7R)z4*}Q$iB}In^5D literal 0 HcmV?d00001 diff --git a/gfx/mail/wave.png b/gfx/mail/wave.png new file mode 100644 index 0000000000000000000000000000000000000000..2f8d140c4d54e6d177a6e068a9ce5d84a563bd03 GIT binary patch literal 91 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2U=UzpU|?Wy39JNBN}eu`Ar-fhfBc`%*kt#? r_(OfeqyonkSJ>N_*(GMol&q*=$TSqsK9~J_1xUH4tDnm{r-UW|&-fYo literal 0 HcmV?d00001 diff --git a/gfx/memory_game/memory_game.png b/gfx/memory_game/memory_game.png new file mode 100644 index 0000000000000000000000000000000000000000..e0f1d3256c398ec9ea5a396c773456e0af8131c1 GIT binary patch literal 445 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU|7J!z`($e^=Ne_0|R4=r;B4q#jW0p_TGmb zB-lQwT2pcHyb}r0V<6@11tkR5W1jVcdKnbxi~J(zw9%HGNXkU9YI< zKQhp;J#uBnqWs^EMmzeUwt&?Gv7$;Rlo7KlK*+wj(_?4E-d0a*4vV`YOY&c2Vah& z%?`KoKF4|ss@dL_)p$oNwEVe;K{Q&?u)=fRmzs3~N4~NwV!dl-nD4T`MgLt8S901J z#^l@k3#NRUY^zj}rt)~(%gUA8eAr%z`P^9Rz3a5z-0NbjyWSl)KgI2}`MKrFZT)M@ zvN)$6tB`zp><7!!#g$GRiz>^Syn=O-y|+wz^k{$O{5x`4$rqSo7(wyk>FVdQ&MBb@ E0D}<9B>(^b literal 0 HcmV?d00001 diff --git a/gfx/misc.asm b/gfx/misc.asm new file mode 100644 index 0000000..a22e7b6 --- /dev/null +++ b/gfx/misc.asm @@ -0,0 +1,57 @@ +SECTION "Trainer Backpics", ROMX + +ChrisBackpic:: +INCBIN "gfx/player/chris_back.2bpp.lz" +DudeBackpic:: +INCBIN "gfx/battle/dude.2bpp.lz" + + +SECTION "Shrink Pics", ROMX + +Shrink1Pic:: +INCBIN "gfx/new_game/shrink1.2bpp.lz" +Shrink2Pic:: +INCBIN "gfx/new_game/shrink2.2bpp.lz" + + +SECTION "Unused Egg Pic", ROMX + +UnusedEggPic:: +; The G/S Egg pic. This is shifted up a few pixels. +INCBIN "gfx/pokemon/egg/unused_front.2bpp.lz" + + +SECTION "The End", ROMX + +TheEndGFX:: +INCBIN "gfx/credits/theend.2bpp" + + +SECTION "Font Inversed", ROMX + +FontInversed:: +INCBIN "gfx/font/font_inversed.1bpp" + + +SECTION "Copyright", ROMX + +CopyrightGFX:: +INCBIN "gfx/splash/copyright.2bpp" + + +SECTION "Intro Logo", ROMX + +GameFreakDittoGFX:: +INCBIN "gfx/splash/ditto.2bpp.lz" + + +SECTION "Unown Font", ROMX + +UnownFont:: +INCBIN "gfx/font/unown_font.2bpp" + + +SECTION "Pokégear GFX", ROMX + +PokegearGFX:: +INCBIN "gfx/pokegear/pokegear.2bpp.lz" diff --git a/gfx/mobile/ascii_font.png b/gfx/mobile/ascii_font.png new file mode 100644 index 0000000000000000000000000000000000000000..1c32d2bda310f87ea9891143cdb6afd379e920ca GIT binary patch literal 762 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qV6b3fU|?W~s@cAdfr06ur;B4q#jV<@hFLO> z0rMAK%+3kz``(j`v3K_X3B1v zR&^mS|NQLuudB18jvD5CsPyTb9^WRWcgx_^lf}}{-xaa$_@4FEX3p&=T}KNeLQ~k> zEPvlPH$(77%T9(ig=d^!ZfS>B=JOhAinR4QonGRt)qClw4NpYMq>0RohVjlm?|RFo z|Cqe~K=$D!67ya($t+RuSvlkMQP=gU0@;fMgdJO5Ds{iknU(d>fBiKPE>;)u2O`UT zKeAL6w>sEpd;L$G-nLXjhw*BVX5Nfc*&xQ!4Q(zHq>ftW=z6B{{hQ<)y?y_TJ#n2z zE4Hq1(B=tM_DorP&+W|8IodoL_7UvMthcfxg`T$b5?1}B6Utx^oE_P4X!+Dup%%q} zSys+Tr4v>hSY#mH&1HR8@IpjPaYVxjM~;NaC54Lf^mfSGYTbUi)X7vR1s7x}i;W>13of{R&Jn%h z(pYw1>xW<2q<3qto{Ie1%e3db;s^8aNsSkbgkp2E|EIEN?y-91{dnZ*8N42+ zzwLT+_r}~K5*@ZuOT(0crruw5@$#2V)raF5)?~er^^=TmxM#+&-|3+4gZ~-_6p9;~ z^c77QtM}dgDRg7o+xRN^WjE_?>gD8ruCiuo2+t9CbotSa?w;Rw`0w-zao>BqK_TJd z`q^i_CR?a7-Z-#b=^0BByHQKEuS4a6O;4m*tIFr`yLIqhza}I0;8)I$KhYY$CEESv z``Q!t%lC&rKm2d;@A)isJL>nd<@rnWGw!jUo7cBD;mZA(zfuSOKCY|(?eO5;+~4b$ zv(yRw5IS)8@5?VATof+unHs^+{(b2k8O}R(#s7cLcoeM=q&(qeoNDC{pJK)%6?}h~ X-@e~k&TB5!21?YPu6{1-oD!Mjbs>Y?n8W+Soq1xgf8u(Z2 zG4J~%nY~N@Dei3k^W*+rgJV66AN&^ydfQ!7jsJe}Df>;c5A&45nv<+|>{er7=Fhv+ z_Lk+rr&Vk-+1L0nFmNoePm;Mj)$Rw|o%PcSIZPUj7&gzm^zJBoZA7#4agjnJ}`I(CKO z?TMl21WDy(JfGTR%Tre)45!j^o5{Ekd8R2`dKV3R}vas^ZG3*miB! r(Ih#h!ddUPEjV?^(00SO(!L+;CAPBF4_`jE0fm&OtDnm{r-UW|APteg literal 0 HcmV?d00001 diff --git a/gfx/mobile/card_2.png b/gfx/mobile/card_2.png new file mode 100644 index 0000000000000000000000000000000000000000..1632e8451cf578d2103a8b3956e6082237dc477f GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0y~yU`SwKU=UzpU|?WqOSElaU|{&^>EaktajW)%zt<51 z5w;KQcP+cu>^ZRGH4jTkLUO>e8l-bY{mgsk^bGM+D(_5aG=Qir>i+uzGMuf4EfsnPvd=6w?fXX-u7S1#^Vp&|2OB`K5}#W!LY5I=Wlq>p+lg+ N@O1TaS?83{1OSs(gk=B# literal 0 HcmV?d00001 diff --git a/gfx/mobile/card_folder.png b/gfx/mobile/card_folder.png new file mode 100644 index 0000000000000000000000000000000000000000..89fc453ae9cd6ec2d2fa16bbd1479e462c9d7ed7 GIT binary patch literal 567 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{V2EI1U|?XlQ)hgZfr0U#r;B4q#jUB6HulYS z5NK>9&Yb%itS*PwpIx ze9fbm)wRO^dGqJKc{e89R-HFRs=$h6Qgm{&EaktaVz-;KP!*C z#DN9#9x`+!Wlc!8Sh8_NcVl*=&0$7~#{w~29@-mx8H~c#Mr~zU!?sBFL;)jnWm|KT pf{LJDL?=K literal 0 HcmV?d00001 diff --git a/gfx/mobile/card_list.png b/gfx/mobile/card_list.png new file mode 100644 index 0000000000000000000000000000000000000000..4086bff8bebf4840f6bb5059f36ef18af7be1ad7 GIT binary patch literal 235 zcmeAS@N?(olHy`uVBq!ia0y~yU`SwKU=UzpU|?WqOSElaU|`tf>EaktaVz(nA>UyI z9@Yynmt35j<{U~sq8Z?S;E{I$SNYp1s@C3ZyVxd8S@D(4|KI(|9D$oo1~nz>_=+y- zY*R8~U`o>9^I`wn&(bKU&0y8QH*1Or*DkgVMnmzfvZeUvz%r=~^bZ(^8}{xaq&-+gdlft}xqVy9^N#Ip~y pw;Wo$=j^oKZq|h@v0d|iGtT<(`L&h*&1)cEc)I$ztaD0e0suk}TjT%$ literal 0 HcmV?d00001 diff --git a/gfx/mobile/card_sprite.png b/gfx/mobile/card_sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..c343465a595263ea7b2cc9dba4c6a4840f621fa9 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1dY&$hAr-fhfAF*LggZMQ zmeeyaFffjZI(U^Qg|X9H*5{1CwW9&+(>in_4C9y>R&;6?Y?{Y=17w1ytDnm{r-UW| DokAO! literal 0 HcmV?d00001 diff --git a/gfx/mobile/chris_silhouette.png b/gfx/mobile/chris_silhouette.png new file mode 100644 index 0000000000000000000000000000000000000000..2952da07659b8546f85ee9bcd52bfd4a7501717d GIT binary patch literal 250 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V6b3fU|?W)@cC~y0|UcBPZ!6Kid$1BZRB-U zZYSX2#QE71}=^G#6}OiY#E-!6JW1 z;|53bd@VkwADS_%BP8=R56)oizH;GERPXy#@3zS~R(#?npP%mWkhWI2b+Tc4>VobG z96D`Bo?Z&jH07E)iM8y=-Q)T^>;4v;c(&Wvr{Z|*r5g+4?DqYxp7j4gNz6Z;)yIVR zmrdjOEm`XMmm|TVz_j#5$JMyWAHvS~e&k$YX`jVgR>8c@(*B^Zh z5w-{E2}KhHtSY3$@)9g(low3YHn_4-WgaV=LC%#Y-|Ispdkj_L|LwaTB-f;_P%%Z? zY1b~1A9IWT3S>X8&%Ctx0RJyjOGyI@PL96Qk=b&aESfH=Ut&*Y&7F4Y!ZUHsK8e%f zPp|TiOf`NRdt&_*NF4sUb92h+DF|YtY1!RuKT>^ zwCMU+{$RJXJBpXK~Gmdmvv4FO#ra1Y6k!S literal 0 HcmV?d00001 diff --git a/gfx/mobile/dialing_frame.png b/gfx/mobile/dialing_frame.png new file mode 100644 index 0000000000000000000000000000000000000000..faadc6f9c45806e81ced39f4144929c4fa938e36 GIT binary patch literal 149 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq@~$)5S5Q;#Tgtjl2ws zJj@RIhh^fI*PaxbBGPlnD6)^y;gmJ&-Q5-^ePsd;7L@M^$h!8=Wx;wCy%hcm;TcV? zGQ!rK^nagb6c7_Y^`;$ic&k9+O*zQkAH+TmO^Q`qsD_1-i6VNMU1FvlF(==_D}^86&Bg&VFj zeU*NbC_E#!-t+o_RsRKcc;`hw_`ZdV)J zFL|s|O*1c*mkp@vSsr~LGH5?r#q>q$9DCNvX&i7Bc+;qF#;%vI+rclP9@shLEs_!zJfrpvVHa<^{6AlkVzdWy-f8?V=p76WFTtF5&r zWQF}=MhoF)0nMVC^H<|P{cUF|k=EE8k;!?CB|$`k$@{5_j#!Mo50?-7u^H!b_Ju{b zmU?MuA506WIol7p(-)?CGGqkaXbm(tw(x;fyJGvv_J_;2wa=M(_>i9W zEN0`#bKYL+?B_RcYnL^&w76zv_lDuk^#4pNzFQRJ#ja!YD>R;cpo9N;w1ZIHwn+v) nYaSbT3YomRsQOR-#l80ZCBIZT=cydO1WHk!u6{1-oD!M<7ts(I literal 0 HcmV?d00001 diff --git a/gfx/mobile/dialpad.tilemap b/gfx/mobile/dialpad.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..a7ab408ff805cedf66b80d3023fb0363c001cfed GIT binary patch literal 360 zcmcDscW`uKWP$=7Cr1Z+u#i44Gm9cCn<6V4pFT*?!O=-ykC$ISM^H#dScFdxBnT4H z<>eN)0V6(Lkf4*ko~{ZnJBK1Cmm((@p9)A2B&5tMDyAbWq9Z86rwkI*(^XMcLg-b3 z3-U_KC~~qXaEaktaVz3q z1&--1?LD&ET2n>gV-*LUaGw>_(4Bap$iz8J|D?iA@kvXHt4=!p z5u2%9q`jz1N9n?+$qtj<63Ysc5t7x3)VCJxwDHwa_9XVrkuA;!w zv-z$-bl>F}<)ZT+Zt6KNvG>otm^o}ON^Lfr-_-Nw^}~~%J1hkBma*@O{Tiucu;E=l z+t;(J8lBtOFZ#0`*yq)Dyg{WhV6!Fj?6Z|_w@WX@-(#G&YM#r9^9=XYnlDdS5+f}5 z${^fJDThmAQi{mwDb=z|!n|xBYJGacJk!;v$0=~%sEaktack~W$L!l4 zBFE=nyQbKlByIKG_D$l+%!T38Cmw9tyY|RAVT&az0)E+6-I?vbQ{2mIX6u=74V~%} zmlmy0GSb-KmiTS&%!#_{g-pNMv>iWRuKxf1nZC44tKrl)dOiGK9+okl%Y9<|;E~*i z^Sg2-Gio!|-mgC3wW~+s$IH6{3=I<&X21B<)p*&zgXhcD-P{bPS$3qUa0={aU$E$v zHowB56J_Ui9W(s!JwM8L!=hL7&oenx&&@VdI9Sg3z&POR*vQNi#A#6( z?YN<#`WPO8CcUv^)zd|Dk{(bwn8AR{h z%VADn7Vs(i_m{zd^V%dIzugy8zGmNVG>g2_@Un=Igu4~M?_j1@9I%Zc@ zGE8xL$|ZKWW)5TBLHiHN^*usT`z35vHom(&u~kU!MSE34PGlhE&V0Be8-VP7mS}xT2%gjGsDz?(~K8{HrOtHz|`uXlUOF>A>Lu>lgPsv zaQF|ugsZ%~!VXr&Up%K9+djgB)WAhLbkvRW0Vs@s~dEGXNH3>5=Me8rqIO6Q^)9llVtcj0$ z&iQdnXL6w?p%>YwzBNt_Nm>aa}%IVmVJQT{G>_^Al-LHqZQ^>ZSAT_;&Nc`43m@d*1M? cZ+h{6M(>Y`A6-~)`~YQ9Pgg&ebxsLQ0K$#7o&W#< literal 0 HcmV?d00001 diff --git a/gfx/mobile/havewant_map.bin b/gfx/mobile/havewant_map.bin new file mode 100644 index 0000000000000000000000000000000000000000..3551a77c5ea2362d8d044b22b13bdcd28972423e GIT binary patch literal 1136 zcmY%3WvD2A2&a@0Jk7F3%58wGn#5qZhJHl zgjtH*lH5|<(%drKvfOgq@-Y282o(%0`1K>JWMCoPeysY5wqJ=`6$uJ+i;(DlZ*FmZ z81&+l;FRF>W}1(A_7Lk^#cIkh%V~@ literal 0 HcmV?d00001 diff --git a/gfx/mobile/kris_silhouette.png b/gfx/mobile/kris_silhouette.png new file mode 100644 index 0000000000000000000000000000000000000000..77ff319ed8628f60c4724892c7c2be76f744ff5e GIT binary patch literal 264 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V6b3fU|?W)@cC~y0|Uc(PZ!6Kid(H05Aq&X z;9GV~el+ zol@3%BXH&im6>NExOh(Kb@lm4NB^ALE3L0AFr$u5Nxeq%_S)QluynP_JgGdNe)KIa z`r%xE`tlYr#(Lq?5mcB U#s$vzHwAgo)78&qol`;+0Aj*y8vpVrEWdNK8p{l86cPUii$1H@e}~2L2dsg*>|rS)#^A;#Y?`{yDle>nf88 j+ZoB_VQISm{>w8w;@JJu(`)|~kb68`{an^LB{Ts5${t2C literal 0 HcmV?d00001 diff --git a/gfx/mobile/mobile_cable_2.png b/gfx/mobile/mobile_cable_2.png new file mode 100644 index 0000000000000000000000000000000000000000..d48a5ee51097c0fac220dd2144fb01d074a1747a GIT binary patch literal 196 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;ICI$uu2APGnoeT^N-JULvAr-fJ&u`>C6u`q0 z&|Q-GPsBv$popV}@*NS6GY+pzCKknl-oj>di-vS8F~r*PGr8e#82*Vx8TLqShRc^E_SsT-G@yGywn{uS+Wc literal 0 HcmV?d00001 diff --git a/gfx/mobile/mobile_center.attrmap b/gfx/mobile/mobile_center.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..bcece9e94815a2b02d9f10b8b0b4618ce266d1f8 GIT binary patch literal 360 mcmZR?1{g2^BO`_o1My-^7=U=al-Ns&UJNHQ5$|R!VG00YPymqt literal 0 HcmV?d00001 diff --git a/gfx/mobile/mobile_center.tilemap b/gfx/mobile/mobile_center.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..c6ae863be29ad865cabf6caa4c93cd35b2d53756 GIT binary patch literal 360 rcmYdD!~jXj3>YAVBC(82G>}D^c^J-PpuTz8IcOl4XggBVFhDv0%d;x? literal 0 HcmV?d00001 diff --git a/gfx/mobile/mobile_menu.png b/gfx/mobile/mobile_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..ae6cba38dafc046e310e862ba713890665730dfe GIT binary patch literal 177 zcmeAS@N?(olHy`uVBq!ia0y~yV8~!#VBlb4U|?XVGXC4fz`#)9>Eaktam)4mUd{#s z0oDg1kq0&NWSf_q%9z&VG{=oaT_E`Qp=Xu$Lh&>8@9Zr$d?KlvzN$oRfzX3J{f5Qw zW*Tep9&j@?wQ5mYdSGGh4~`u&>4C4DUS!^%`}WjLxt2GmdKI;Vst0HGH{xBvhE literal 0 HcmV?d00001 diff --git a/gfx/mobile/mobile_password.pal b/gfx/mobile/mobile_password.pal new file mode 100644 index 0000000..1dfb1bb --- /dev/null +++ b/gfx/mobile/mobile_password.pal @@ -0,0 +1,39 @@ + RGB 0, 0, 0 + RGB 3, 0, 0 + RGB 5, 0, 0 + RGB 31, 31, 29 + + RGB 0, 2, 10 + RGB 2, 10, 21 + RGB 0, 0, 0 + RGB 10, 26, 31 + + RGB 0, 0, 0 + RGB 0, 7, 8 + RGB 31, 8, 0 + RGB 1, 17, 15 + + RGB 31, 16, 0 + RGB 31, 22, 0 + RGB 31, 27, 0 + RGB 31, 31, 0 + + RGB 31, 18, 6 + RGB 0, 3, 0 + RGB 0, 9, 0 + RGB 0, 12, 0 + + RGB 0, 16, 0 + RGB 0, 22, 0 + RGB 0, 25, 0 + RGB 0, 27, 0 + + RGB 5, 5, 16 + RGB 8, 19, 28 + RGB 0, 0, 0 + RGB 31, 31, 31 + + RGB 31, 31, 29 + RGB 21, 21, 20 + RGB 11, 11, 10 + RGB 0, 0, 0 diff --git a/gfx/mobile/mobile_splash.attrmap b/gfx/mobile/mobile_splash.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..86666b3fd1013f416f6dd44ef6cbf0eeafb8d492 GIT binary patch literal 360 dcmZReH&9Sez_b#ZAT}`uOwCwK!!&>3MF2tf0f7Jj literal 0 HcmV?d00001 diff --git a/gfx/mobile/mobile_splash.pal b/gfx/mobile/mobile_splash.pal new file mode 100644 index 0000000..a726351 --- /dev/null +++ b/gfx/mobile/mobile_splash.pal @@ -0,0 +1,39 @@ + RGB 31, 31, 31 + RGB 04, 10, 20 + RGB 16, 19, 25 + RGB 25, 27, 29 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 diff --git a/gfx/mobile/mobile_splash.png b/gfx/mobile/mobile_splash.png new file mode 100644 index 0000000000000000000000000000000000000000..2ab921041ca83e1b24ac4f4b9b925553fc3e07d8 GIT binary patch literal 767 zcmeAS@N?(olHy`uVBq!ia0y~yU?^Z4t>Eaktacl3C{rqQZmYkS!idkF8;|e!-uxnAynHCQoS&b8-(*jzR{JLaw_Pczt zzaUb&qJ8$uhW|~II3@BN{MPH2_az5vDx1$a|NZ0M@9$o}pR4$J+Xf@qzcKUsdj9hN1ZTS*(hJ0Ako8ki;K;ORsU|g)IRBm^8(+P*Q77%WVpY8qmWD6 z=tHgiy=tZ@bCg4MAG_~p(%iv)=&=O<>`M$X=N?2HWMAQ`bj;<`H3O06Z_JBjJG>3t z7?pYFx=%o{TynbDCPq3cL0zT@LuN{$u$!h9s_UYF!&_ zlT>C{E?j25;(O$LOUKF;OVj#8sOr;`x-& zpNk4=zMa};ZuDjMUZvB0^Q*&B-0rj*#rQj|uCaUl^mF9$Y^5JY&r|CEn?3iFsGD{0 zf8J#IeD4p1*?VU&pZ**; z6Z`X{GL5%)HhiA^PVvyG7pfD?nQhG9&Q4#}CbR2sUP@BLJJU)V2BveoitF0Wu8Y%L z&-7VK;)u8SxeUYjnPyc5Mb{RzM`tE1JGkKbn@uKBrxw2SU$wM-W5Tio=8Te=A3kTz bkJ(qx&9?8H`Y)$gP|Egn^>bP0l+XkKAT?LJ literal 0 HcmV?d00001 diff --git a/gfx/mobile/mobile_splash.tilemap b/gfx/mobile/mobile_splash.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..81818e531fd3a7e119f57715bf36b15b704b0562 GIT binary patch literal 360 zcmZRe6JTUwW?^MxXX9XIVuV`B$;HjX%f~MuC?w3y#R(A<5fu}ckd%^^k(Cn@6@iG! zD<~={tEj4}YiMdI$V0>!v~_g#^bPd&4Rwu-p+XEMre@|AmR8m_ws!U~F$YH{XBSsD NcMnf5ZYh5d`Vz01Va#ixhu>X5y4^ytx|;LZykY6l;2>a}`Ubv_7@ znXUM6Q-|fRpO@SUH}T!megFGidHlW8hB*;$;v0^wx^#94r^&+o=YxV0_>TpLE;rj8 zxirLZ3#0R-*;!_rU-q0TFSqimefO^S*x^+UviT+D$B$R8*Uu{t=e#_7)1%IWpt(~I znB304AuJzeklM9g_+53EcF&S1F5M*(oa<^oC}`aMBzbp2m~ntZ#$jlqld|p09*%p*jk*;c z+y7Z1{%2n#_x|^14;=GX*|FqaY`&iF^}T)tZ=Sr`I(PLWQ_dF~-tH`M$rE&VwUsxJ zf%8>u$wuB8b8Q|z;<)?VNt9DIPhi3Ukvx8jJx06M=5O_qsA7H4r}6NBpGHm^tD)_-!aKi-V^NQVBQtx-xZkm;}w&;QI8%s-pb0>AYLGk11 L>gTe~DWM4fPEE~w literal 0 HcmV?d00001 diff --git a/gfx/mobile/mobile_trade.attrmap b/gfx/mobile/mobile_trade.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..6f4843dde5649c500c4ca1cd13c120d8dff01e27 GIT binary patch literal 1024 zcmZP=27rqTzbCl3@T=hBEaktaqI1sy?M6{ z1Q;G{W@YaXldR*}-!ge)7{#b_85)HfGIuEEVUqARysx@CqrbFO0LU z2e6eF9k?g!85wkEzpV?0wfsrzPbXNmCEPyIpSZ+y3Lg`<<+=&CY^%g}@g;HZGt#bk zs$h2EF7x|GdpB&IT={ESd-Q@^4gZs6HK-_B75Os!LbKreR*vm&965$>+mQy z?qGLrt3ERI!0&$_>oRl=87*bLv481xsUn+{u1)7@_kVp|s2 zFOcwEpkw;sZ0h;E7X^1%^7t#(tT_DZanMt1gVo;moxJ2fhZi5+uGFybkB0C0vkYwy zi*|-YO@F4AqrBicqrv?9D`Z|&OL{!NtTs29?fikNR=E;}7q1SU3vd(`i8X27=FlG_ zt)UxGz`4p-&2NQjF6-WnH=PS@@7k!A{`m9Z!)C^px6Osy&Iz(EjP*Jw@k9I=({*RY zdFM_qX^P`rBH_sUbP*p z1C}{Gjr`&5d%8XT%VjyNua>>i==~zI+OsJqGj z@HTTf(}w$#TRWfpZ~JjjM(j)*-=-H~^CsMHlF|Jlpc?YD>r58 z-kE#q`FEZ>vrBnHE--z$HDQb6U*1LOAC|I4?LWZ%N34$V+J*KDNw+h8fs&Y~tDnm{ Hr-UW|5CJ4N literal 0 HcmV?d00001 diff --git a/gfx/mobile/mobile_trade.tilemap b/gfx/mobile/mobile_trade.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..bb67a49f42f50a08ae13e3215c92832ff3441c1d GIT binary patch literal 1024 zcmb;)2EfA;zb9N=-Q4l1aBy^T#w%}Uk6+%#7QeieHGX*uOT6+Xre@~&+*fa4h*!E^ zPanU$kuhHRu<(dTdMvvY7_ zm)FtN*5cyEEf3Pg#ly?XheJO|o?k#vNLU2K!j477#3dx9u*-o&6{KZk<>Wyu>{vlj WNl94+yBtVVRZU%8LleZJDh2>^=+>eD literal 0 HcmV?d00001 diff --git a/gfx/mobile/mobile_trade_bg.pal b/gfx/mobile/mobile_trade_bg.pal new file mode 100644 index 0000000..d43c6e0 --- /dev/null +++ b/gfx/mobile/mobile_trade_bg.pal @@ -0,0 +1,39 @@ + RGB 18, 31, 15 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 00, 00, 00 + + RGB 31, 15, 1 + RGB 14, 14, 31 + RGB 12, 09, 31 + RGB 00, 00, 00 + + RGB 18, 31, 15 + RGB 14, 14, 31 + RGB 12, 09, 31 + RGB 00, 00, 00 + + RGB 18, 31, 15 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 00, 00, 00 + + RGB 18, 31, 15 + RGB 31, 07, 09 + RGB 18, 00, 01 + RGB 00, 00, 00 + + RGB 18, 31, 15 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 00, 00, 00 + + RGB 31, 15, 1 + RGB 18, 00, 30 + RGB 09, 00, 17 + RGB 00, 00, 00 + + RGB 18, 31, 15 + RGB 18, 00, 30 + RGB 09, 00, 17 + RGB 00, 00, 00 diff --git a/gfx/mobile/mobile_trade_lights.pal b/gfx/mobile/mobile_trade_lights.pal new file mode 100644 index 0000000..43e86a2 --- /dev/null +++ b/gfx/mobile/mobile_trade_lights.pal @@ -0,0 +1,19 @@ + RGB 0, 0, 0 + RGB 31, 31, 7 + RGB 20, 31, 6 + RGB 13, 20, 16 + + RGB 0, 0, 0 + RGB 7, 11, 17 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 31, 24, 4 + RGB 25, 12, 0 + RGB 31, 7, 4 + + RGB 0, 0, 0 + RGB 25, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 diff --git a/gfx/mobile/mobile_trade_lights.png b/gfx/mobile/mobile_trade_lights.png new file mode 100644 index 0000000000000000000000000000000000000000..cdf1bd11816ca8db9b3172893098d6454b9bad94 GIT binary patch literal 94 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1s-7;6Ar-fhfAF*L{Qtk7 vU2t`wU_#`AUBCaI|DVqB|9sC}hLcPTUl~j_>uzkg4btf8>gTe~DWM4fXNMiL literal 0 HcmV?d00001 diff --git a/gfx/mobile/mobile_trade_ob1.pal b/gfx/mobile/mobile_trade_ob1.pal new file mode 100644 index 0000000..a507d8b --- /dev/null +++ b/gfx/mobile/mobile_trade_ob1.pal @@ -0,0 +1,39 @@ + RGB 31, 31, 31 + RGB 31, 31, 12 + RGB 31, 13, 12 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 23, 15 + RGB 31, 18, 07 + RGB 31, 15, 00 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 00, 25 + RGB 31, 00, 25 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 09, 19, 31 + RGB 09, 19, 31 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 diff --git a/gfx/mobile/mobile_trade_ob2.pal b/gfx/mobile/mobile_trade_ob2.pal new file mode 100644 index 0000000..a4a1a12 --- /dev/null +++ b/gfx/mobile/mobile_trade_ob2.pal @@ -0,0 +1,39 @@ + RGB 31, 31, 31 + RGB 31, 31, 12 + RGB 31, 13, 12 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 23, 15 + RGB 31, 18, 07 + RGB 31, 15, 00 + + RGB 31, 31, 31 + RGB 20, 20, 20 + RGB 11, 11, 11 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 09, 19, 31 + RGB 09, 19, 31 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 00, 25 + RGB 31, 00, 25 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 diff --git a/gfx/mobile/mobile_trade_sprites.png b/gfx/mobile/mobile_trade_sprites.png new file mode 100644 index 0000000000000000000000000000000000000000..db774bf282a24953839a4488d9cb1a53e0344d87 GIT binary patch literal 205 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;ICI$uu2APGnoeT^NQ#@T9Ln>~?p54uRL_vV% z!o)eTPM+bcMIM@8nwh639G`xfMbIi!IAzA;DC{ZUzY9a@A8q{0dl9OtDnm{ Hr-UW|NQX}} literal 0 HcmV?d00001 diff --git a/gfx/mobile/password.attrmap b/gfx/mobile/password.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..7cd3613cb936652328a54eda2b69aed98468f621 GIT binary patch literal 360 ecmZR?1{g2^BO`_o17%`N7=SYK29x`+ged@CfB=yI literal 0 HcmV?d00001 diff --git a/gfx/mobile/password_bottom.tilemap b/gfx/mobile/password_bottom.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..6f449732bf489f8def8bf3bad736c54c42ed3e0c GIT binary patch literal 220 zcmYdhU{F+2R#8<`*U;3`*3s2tU`R=3zyKgIeFH-yV-r&|a|=r=kOGhxh(^XBF-Iq7 z7gslT4^J;|A74M*=J^K%1_g(NhJ{B&MuE&oNzTqe1GymcKyt_!t5|9p21o}0=UOAx literal 0 HcmV?d00001 diff --git a/gfx/mobile/password_shift.tilemap b/gfx/mobile/password_shift.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..1963e667a85b6f284aad050c14b49b3998d13ef4 GIT binary patch literal 140 zcmYdhU=R=#5*85^6PJ)=0E3idFoi;Z#2A^FSyd| f$jZqpfMq~pUYAV>S7t0Xdo*E07V`Xp#T5? literal 0 HcmV?d00001 diff --git a/gfx/mobile/phone_tiles.png b/gfx/mobile/phone_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..b02286e5fae1c17037313dbd46ec81418eed9e4a GIT binary patch literal 235 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznVDMmKU|?XF@YSe|fq`L@r;B4q#jV_P8~K_H z1lS(TpUNuE7V|-tr&(BdHYfA9${G%Jb9Z@Wre(Q=R0s^K`biZV!vERqNB|VX=>c{-|B~>xjx$?Wd^A05g%GhX;>HD6sJ*KtvE>SE@ikblX`ial~)r8SjLoT6)bkatFXYR2TK p%RX!B-|sp+hb`QCcG;uycidAAPgb|E^=g8A;pyt{=yTy_8e literal 0 HcmV?d00001 diff --git a/gfx/mobile/pichu_animated.png b/gfx/mobile/pichu_animated.png new file mode 100644 index 0000000000000000000000000000000000000000..2832fdb6a5cafc1db98c98ba4c2e8f233657e927 GIT binary patch literal 1939 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qV8~!%U|?Vf`?Nojfq^~B)5S5Q;#O<;{`@D$ zMCHVb7OGtp^W4S2mbCQ4{0YGgA{%F)cFa#G%H~oOx4f1o^RtPiG1$U2tufYITvGWB zALB-z1xbev4>WC?o|M+Yv`xFEkEGUVAh+BQo#L9$ChR9~b_)_e|D&zg`yK`>Cdf{zM9m)!qTF-W9Raj1V#}uCw?48Rc zF->IlPR))I#7-j?C{`NX=*)v{uOPEXAZB}tj$E;9vajn|C_|-T0F1!i+*ukKoC(ilc>dWtp zFOAfunWrs&tHXFN=;YkDik1^uZ-?)nU{J5p;LCL9cC)&RdWY`+ZicYT&@D&qe&=A~ zZFiX+@459n>w|qBVYSTjxU&y!dYs=;r_8|VC95X<=G=K5%l4de(IW2AnSC<1S04AA zw@3w*E%W#)ln!)@3`K5>gA+?oVV$n@=Ut3vx(VAM(`tFTTg21|4N7Br!8Ln2OmoSwW z{0uKR=50PxkCAW1F*);_>>n0Boo*)nv1{oUeGp)qm3K*O3d;qk~p{+pV2<e!LcgblPZj6>vuD8<*Z9WN+KGEB`+c4%{`I=^miv_n%f;=F zZ%5l`6qnHFnljTP9gfysEk}`f0NE9RC%eouYr%M$0b! zbfxW3ms}5@)#r~3y*|&dSO2cz$-z+Pv}-D#%Z^{^S|^2@L$zP_Ul44qzmQ+dpdx=u zGqLf+rh8u#5^vm$zs%OlX!OjFlY7yby|G1~gzNe;gSiiIFdRH+xAWtUfCt|Dj>#}6 zm~h`@y23pF^AxH7#}6s`zdw9W#P`O!l_Cv_Yu%Yw&wp-wfA1zH2J79ry4s8~lcjlW ziX`sknv}6LNUjUA&{?qPGPcL6syUy^u!f%dUKkoWFRG;yEbzsJijMzxo-5)MK zO1b34ySTPMwIR90=7_4y%=vr)N9(tq{>|=f$=g^WeYN9X_A!sDZO4w}Evd|Vx8HlV zU&-AP28EtAxwXZ4llFbq{a*jya7jys#oX&mHzv(pWHtZv0@-%`V>fvk5*P#&3ygAq zR|p8}?3hSrY7ib??4fEhnos<-T%roUsmVQ`8e&!UMQ^CnJT zzMSLovrP?VCSH>@7R_Axc-C~`7xGh7g4$j$V*74%%7Dj5YMb}QfW00JGY=M&uGS5@ z12Redu*A+kgiv=WJc1`BHdx_+w!)yHNkx8Bb&;Pw9VZsq$z^XqrW(^mA{^u-?7Z zi7UjvJ{K3aKCm`@x=O;H8qWmALshRXi>>){wW8>DY_nN+)UIaxiEaktacge>!Q8_J zJg!?C-Opt06mj%eutz+@!mVrq!{zBQE)H+h=jsW}pC`YP|DV{8jF@d@`u=5hW?f}rWa4W(HYSfsnN1Kg&&dp1wUctWL49H&^PytpYQtbkQ*iKczeqY=HS25 zm!wv!MaA1U=4NZVec8p_bv=|}%G+bD4QJVVAC34~3ITr>mDZO#g6f<|&=F$Z#G`u8Q?j!;Bhg zY-6>5_9ZY~aQ@NNE0cP+XvMSDmWMd>J)cFY2g|G$pK#fut;H{iX*thwj=+mDVg09_ z_vr6tIq+*Dk7i?wTz|@e<|{&zG{Yt+csz?*&-$Z{v3@Pfk3N<gYo)e$Bx8s5C0mH-jP5KYi dl|OL*;N~xI`V?~FiZduxc)I$ztaD0e0s!ML_{{(S literal 0 HcmV?d00001 diff --git a/gfx/mobile/select.png b/gfx/mobile/select.png new file mode 100644 index 0000000000000000000000000000000000000000..040205150504771da767898c03d2f34a0b7f7099 GIT binary patch literal 162 zcmeAS@N?(olHy`uVBq!ia0y~yU{GLSU~ph!U|?Vn2{pRRz`&5{>EaktaVz-;KPwNr zL_@>Rt6FWJ72ZAn{@*kCz}d*HSyx}JUbt|f!o>UE9hH_CDLiXwbC&$SfAY~E{pWrh z=4s@SmsObX@G%QV$`1jCMjrVE0t;vCxzNC_w#oPe2k(;uOH@n*8h_5;#ls+Z>AXu{ S<+D2=%ROEFT-G@yGywn^B|mBa literal 0 HcmV?d00001 diff --git a/gfx/mobile/select_start.png b/gfx/mobile/select_start.png new file mode 100644 index 0000000000000000000000000000000000000000..efa8d4a462e8e0ffbd5ddd77e84b0f01fbbbbca3 GIT binary patch literal 130 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7U=UzpU|?WK{{Q0z0|SGnr;B4q#jVh;-JAyu zM3`AK<@bb|G$^c=z9Y4%OL1-24`Gg-&ny%ZieLCio|IBK7Z|)zYx}XMLLc3i#X4*| j#^)>P_Cr8| literal 0 HcmV?d00001 diff --git a/gfx/mobile/stadium2_n64.attrmap b/gfx/mobile/stadium2_n64.attrmap new file mode 100644 index 0000000000000000000000000000000000000000..ef3adbf81ddb27e9e51d6c7f59cf2644c65faaa5 GIT binary patch literal 360 zcmY#n1OZeMl?RbW76XYeGJ-|G1cV7Cp%PFYL>^TPtQ{hu$iTp$pr8O1L5MNH#lTXG zAax833=j^81Sw?z1DM$m8YBeL3z7$^17VmQU@Q3?(tOLnTlQ Jfr%k$2LNG|2*m&Z literal 0 HcmV?d00001 diff --git a/gfx/mobile/stadium2_n64.png b/gfx/mobile/stadium2_n64.png new file mode 100644 index 0000000000000000000000000000000000000000..0e324906d4f853dfd9dfba307302a79089fd4212 GIT binary patch literal 787 zcmeAS@N?(olHy`uVBq!ia0y~yV2EH~V6b3fU|?Vn+f^aVz`%6N)5S5Q;#TZs$82Fo z5rzlbmvwKEm~~=Z&_)k_r?)4a9oA<``W!stT4SCU1qvp;j$~ft|qD85~eCaop zj8!w`1)C=CB8ed z&Bx_@mbu{cTcu~OM$fet)n+zG+4_CTt^Df~f4+|Xlj$sH$nT}(b#>B_r-_a2W@p$B z@&{xyB(J)ev`?}~{iw~?N}sm|zqdWBo;81dp>xOoO`@f*ls8vQiRsvp-F?Y&-If}c zYCVp=$$J@;jDu9Hue)9-(>%av;1D_`%Qa?2;GE>xB?j@Ua}V6*`@{A%$%|JzqTW45 zWNQ?o7~AF}{qC=hSg+dX!Oavqz5LwAMT|#wS$!&0HlFIWVR?8*=HvV$Z=X$Cf1Azb zY38%Nweb=w4sYyCPcJpgjkMycTsQmi>De0(-8wyA;Jv@{zguTo!)48O1Uc=gYN(iT z+R;SvN}acD&N{iD+VU%Ev*wBaOpfN-c<1^5j^)CFmoNIPDD}+MTP}3-Nd6V$v#L7E z-;~!~SHB{}b^Cj;NuSB2y=P@URP4<&U-7c{ljn`UVf8YH5_5vSOQ*XV$o1!)=zA$S z%hI5aSz7i)4ATsiX>tvks>bP=ZpSCE?lRXrC|2uH>gLYQY>;7ffoVg)g?w@Okm9*h z_|@(T#D!%^+x|MjcrNCB=wO6v9cH1g4|zZM*gL~IabNG^FZ1r&L`+^L{%!8`c{>@H zt9)6Xoe|)lub?L~pOsB^k-Mu}=IIXE#f!9W2fo$j{j(xF{EOu*zZ(y>E=&1#=0k;M z@z)c@GcykqKB*O8o$`B&k1Na5m24IB(K}7v#RW)K&jo+)z4*}Q$iB}=ci}% literal 0 HcmV?d00001 diff --git a/gfx/mobile/stadium2_n64.tilemap b/gfx/mobile/stadium2_n64.tilemap new file mode 100644 index 0000000..f7213ff --- /dev/null +++ b/gfx/mobile/stadium2_n64.tilemap @@ -0,0 +1,13 @@ + +121 ,-,./0 + +<=<7879:;$ GHG!"#ABCDEF$%$0 + +121 ,-,./0 +;<=<7879:;F$%$ GHG!"#ABCDEF$,./0 + + ,-,.79:;  7879CDEF$%$!"#ABCD ,-,./0&'()*+121 ,7879:;345643<=<7#ABCDEF>?@@?>GHG!"#A1 ,-,./0 + +121<7879:;<=<G!"#ABCDEF$%$ GHG!121 ,-,./0 + +1<=<7879:;< GHG!"#ABCDEF$%$ G \ No newline at end of file diff --git a/gfx/mobile/unused_mobile_pulses.pal b/gfx/mobile/unused_mobile_pulses.pal new file mode 100644 index 0000000..b51e421 --- /dev/null +++ b/gfx/mobile/unused_mobile_pulses.pal @@ -0,0 +1,11 @@ + RGB 31, 31, 31 + RGB 00, 00, 00 + + RGB 31, 00, 25 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 00, 00, 00 + + RGB 09, 19, 31 + RGB 00, 00, 00 diff --git a/gfx/mobile/up_arrow.png b/gfx/mobile/up_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..d8cfc7f3f1857be51c69fc234a1ec5f10ee2596c GIT binary patch literal 82 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@ko0tM45_%4{Nw-phyAu3 iwGY@AGM`cS^534Jem3X#XO5DQAjO`pelF{r5}E*V@)=|R literal 0 HcmV?d00001 diff --git a/gfx/mystery_gift/card_sprite.png b/gfx/mystery_gift/card_sprite.png new file mode 100644 index 0000000000000000000000000000000000000000..dd5381424e9f692e16789746146b64ab8c541b2b GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0y~yU{GLSU=UzpU|?X7xNW7vz`)?+>EaktaVz-;KP!*C z#DN9#9x`+!Wlc!8&=7iY>cCcqc@G(S3I+67m#`jCTDWkbVuGo_TZcAo35KOCjt&fw lT*r1WB-ik=HdnFDFlKP|Qs4bm^t%|yd{0+Dmvv4FO#l>{CgT7A literal 0 HcmV?d00001 diff --git a/gfx/mystery_gift/card_trade.png b/gfx/mystery_gift/card_trade.png new file mode 100644 index 0000000000000000000000000000000000000000..a84915b3104a50f946aa4e24a4a716e6702be3b1 GIT binary patch literal 620 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU{GLUU|?X_`qMmufq}``)5S5Q;#Tfu`|R5e zA`BnIw}?1jnDSm>&yFJ!`tDci*!Rns6`9_g;HP-7V&z18hXcVfCq$HZwtdTM?I;UQ z%G;G;Sn)z!L-df`ntk&^{%^m3kn`Q&FYjJjFfI!`e9)c6G-L()oQ7GC4f<|-Zrc`f zpFvdAfcQB#8O=Py!uv3V@13tE}(#_XHXxc-*Q z=TeTpH=>xFqokfxIi54Q6#TT)_gv4CW*NEv%(K))dRybtZoON0@O_7IVA?B&4{EH> zV%{}N3U9yP>S-gyI@k8U=~KNKuiqS<-@WcwY2m`nu8iLfY)%k#)fXw8tm|SZ)E&D( zNJppZ(T}vb9G&+Bq+PCxG#oRP`TgF1ZD?km@X_*!(n)S%jTKG0Tc^a;|5>vx{;p!s zPXBE|J8FMl%2>H7G-zSmKK_paE&0+HR>(8urO#fi8}+LHUm3?Mzim5TdF1`IxUHKq fzs!Hj&ZGYsOf0rA%@(t?10^F*S3j3^P6N9?Z;M;fz5FlV!PBRvP3ZRC*Ww?z#WM23WDRfqsXB7qM9OB0hO8(9I@!wSW0; zEY6NsV)a~G`|-=m%7E0%wizqmZ+2I>wZ?2k)#3$mZ%=eC;Zb%!*2vd#(MV+i-?3TO z&Sh=5bc><*#Njl)*>9a6l(DV*cRboy|G3eaD~Tqu{UO|*^%0-1v0Qs&#ON%Wrn!T$ z;_Nw27M7;-%{(jxm5*Qj-n$?_BBbHzFK62wGHhW9YuSarORR`~+ox%;gR6((+TY~| zV(TBRRhMSE^6~()=jsPKlOx@)JXvx-{a#Vg9ac?p$yhoTo)C@b94UGhP$^c%%*GgJ7g6rrioi@=gIqN_g!>_;dh2zi%##%Ox>9pcR)X$gVjpdd_xJZ zS~}+jAMaz^*XUR9v_&PnDthjwX|Thj-_c+S%a&Q*#<`c%8b69pOJI8P`Ibx(%cm)d z&yO9LxaFdB^t7jD^L8@#I2^NWc(whn=fbT!-E$7;xy%#2qmv=)xW0S+rT3|`je0jQ zeVG>4((tD1?}P6p9Ir#PvJyD!gg>}$`(WJT7%F?=HCK{r>4gQxD;r`?9Mxmg^`E-G zo?};nZ`-RImpOJWDp{y}Rp(v+cTkY<_8`5h z|CQ<-e&#fIl?$zC^J|I@eIb%@C7$7`ynaK<*Z<6am}O<3FPQ!Q!dg&*^mO%eS?83{ F1OWSRKXCv6 literal 0 HcmV?d00001 diff --git a/gfx/mystery_gift/name_card_bg.pal b/gfx/mystery_gift/name_card_bg.pal new file mode 100644 index 0000000..b7f9dc5 --- /dev/null +++ b/gfx/mystery_gift/name_card_bg.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 23, 16, 07 + RGB 23, 07, 07 + RGB 03, 07, 20 diff --git a/gfx/mystery_gift/name_card_ob.pal b/gfx/mystery_gift/name_card_ob.pal new file mode 100644 index 0000000..880b220 --- /dev/null +++ b/gfx/mystery_gift/name_card_ob.pal @@ -0,0 +1,4 @@ + RGB 00, 00, 00 + RGB 07, 05, 31 + RGB 14, 18, 31 + RGB 31, 31, 31 diff --git a/gfx/naming_screen/border.png b/gfx/naming_screen/border.png new file mode 100644 index 0000000000000000000000000000000000000000..36935ab8263f0fa5076fc1ca32d0e6129f97f3a0 GIT binary patch literal 82 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@ko0tM45_%4{Nw-phgt$_ i*%!t?RQMv_@sF8d{$ZYrP2sk!AjO`pelF{r5}E*Mv>6-# literal 0 HcmV?d00001 diff --git a/gfx/naming_screen/cursor.png b/gfx/naming_screen/cursor.png new file mode 100644 index 0000000000000000000000000000000000000000..a0429a3ad9b29ded3daf1dfd7625466482f5e2aa GIT binary patch literal 78 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2U=UzpU|?Wy39JNBqMj~}Ar-fh6A}_O{O@OF eJox|r3=W1poMKD=b`^SpRCv1jxvXbP0l+XkKN)#v{ literal 0 HcmV?d00001 diff --git a/gfx/naming_screen/middle_line.png b/gfx/naming_screen/middle_line.png new file mode 100644 index 0000000000000000000000000000000000000000..a34e82bf12bd49ec1042c0cc60bf3752405a5259 GIT binary patch literal 76 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5cYI&45_%4{Nw+8#wI?4 c27w-KhD9E{rC%1G*#=VP>FVdQ&MBb@0HS6UJpcdz literal 0 HcmV?d00001 diff --git a/gfx/naming_screen/underline.png b/gfx/naming_screen/underline.png new file mode 100644 index 0000000000000000000000000000000000000000..e92cd4d6a57cbcb5cba23f1d85656ec052532667 GIT binary patch literal 74 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5cG6$45_%4{Nw+8Mqb$j a1|^0aOL$9fE?T%0q{!3N&t;ucLK6UO?GzdS literal 0 HcmV?d00001 diff --git a/gfx/new_game/down_arrow.png b/gfx/new_game/down_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..33803e197e7b1358a8fecfbe55c49ad2d05b0ffc GIT binary patch literal 82 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@ko0tM45_%4{Nw-phYZFX iwGY@A+J95{^534JB%1U4le$V@kYZ0)KbLh*2~7ZNy%}`? literal 0 HcmV?d00001 diff --git a/gfx/new_game/gender_screen.pal b/gfx/new_game/gender_screen.pal new file mode 100644 index 0000000..ca8ae04 --- /dev/null +++ b/gfx/new_game/gender_screen.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 09, 30, 31 + RGB 01, 11, 31 + RGB 00, 00, 00 diff --git a/gfx/new_game/gender_screen.png b/gfx/new_game/gender_screen.png new file mode 100644 index 0000000000000000000000000000000000000000..7261781325d46f223be54456856093e53fb476fd GIT binary patch literal 71 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@;PZ5G45_%49I>^FQJRUN Xeg@aVJ-IgpKq@?4{an^LB{Ts574#9l literal 0 HcmV?d00001 diff --git a/gfx/new_game/shrink1.png b/gfx/new_game/shrink1.png new file mode 100644 index 0000000000000000000000000000000000000000..6cf5b80771956af61967e99cdd19cc115fb148b6 GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsTCI$uuhU2j{$qWn(&7LlfAr-gwUOLU$V8Fu= zaF9{v*y;&aTjN^S1f4Jy_`OxWXTgeAxwu(oiX{`$c;zP_Z);nq#u1hxxXMFuk>KI4 z;T5qfUaxw8^TVGlo*oN>i>mZ4Zx8g4DPJbKvGs+dcIBaGMhv1!4<_b_AOD(U5$wE7 pS|zXTF`uJ4*NZI*ukGa{9`nWCeb-@PZ}}hOEKgTImvv4FO#mubNKF6$ literal 0 HcmV?d00001 diff --git a/gfx/new_game/shrink2.png b/gfx/new_game/shrink2.png new file mode 100644 index 0000000000000000000000000000000000000000..276b4e7c709540d7ee76e65404d1cc199e3f500b GIT binary patch literal 156 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsTCI$uuhU2j{$qWn($(}BbAr-fhfAlj+xb2j< z!~aJk<{$rwJNEzo-&QWP|Np;U&iuPgM2n4H-Q>o+NAA~7|7VO`Z+l~|#g2N1xDCfo zvd-*z@bCH0|Mwdz!vAh`FT0xlj9H`0e!ly&e-HmB*q2P^VrWkPVH{T2Pz|!y)78&q Iol`;+0Czn>ApigX literal 0 HcmV?d00001 diff --git a/gfx/new_game/timeset_bg.png b/gfx/new_game/timeset_bg.png new file mode 100644 index 0000000000000000000000000000000000000000..e2bd6299c5234d2b1e221f37d9b46777a7d83e6e GIT binary patch literal 68 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@;P!NJ45_%4oN$1TfkA?S T(e3tTZjiL6tDnm{r-UW|$5;>%Bqu6{1- HoD!Mumve9QRH^Zy^_Km7myutVfOaR+DS8DhqNIG?i2 zI_|lz^2god{6_u^DfbK~RL-ApCYx>M_9Jo`a@r?sCS3mUKlrWpxGujKo{TBlWzz3gOPo$5I&<@$>Nf;gMJ0@YA^FNz{Y$AKFbBG!AZMSf=YD zaw664!~Di{(F-dM2k|P%#yE7gu5(CYobYu%r^dJc83q%69N<^^_lHsH_j7}eRDPv@ zj}`2iJA@4m#j$!AG;_>LQ%FqUSK<5r|GzxLtC#6|ep4Iff?Vh6>gTe~DWM4fq3TIP literal 0 HcmV?d00001 diff --git a/gfx/overworld/cut_grass.png b/gfx/overworld/cut_grass.png new file mode 100644 index 0000000000000000000000000000000000000000..b10e0cf8c4c96c17b9eed47b9fcc58e28173778d GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1zMd|QAr-fhfBgUdU%rk1 z&wqP^IZ=Q98#JdKsZV9wDq1gQ?4tYc%J~IH>krIpd}#l_o^64Z#79OK1LjWtZb=D= k9l!i_(|#oUZJX82L8Gb#Q443PN@p00i_>zopr08cD0=l}o! literal 0 HcmV?d00001 diff --git a/gfx/overworld/cut_tree.png b/gfx/overworld/cut_tree.png new file mode 100644 index 0000000000000000000000000000000000000000..c1f1bc97d4ae549e4c344c5bd3d0bcfc52f51116 GIT binary patch literal 140 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1!JaOTAr-fhfBgTy+4k`N z|L%Vz?QV0k8OwYuFH98RO%q77c=X`W`2!~|oH$p|lG!1ky-WX5@A}7{!TX5HSs-gXUHx3vIVCg!0EXB&od5s; literal 0 HcmV?d00001 diff --git a/gfx/overworld/fishing_rod.png b/gfx/overworld/fishing_rod.png new file mode 100644 index 0000000000000000000000000000000000000000..32d277269941e34d85322a30bdc63f36bfc485f7 GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2U=UzpU|?Wy39JNBdY&$hAr-fhAN)Um;KTff z%=XM3{|j8KV+S&}?&B>DccGYHKU*+0|W)dZx~)78&qol`;+ E0HoX?2><{9 literal 0 HcmV?d00001 diff --git a/gfx/overworld/grass_rustle.png b/gfx/overworld/grass_rustle.png new file mode 100644 index 0000000000000000000000000000000000000000..0b2d73e2c45b64cf404791c520dcdbc20e047207 GIT binary patch literal 88 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@koRoeMRWVB^(mfYu;{Da$NB}30s?i62F#!VnCp00i_>zopr03Oa8o&W#< literal 0 HcmV?d00001 diff --git a/gfx/overworld/headbutt_tree.png b/gfx/overworld/headbutt_tree.png new file mode 100644 index 0000000000000000000000000000000000000000..4cbb595f7e00e5921e0fea0d60a7e8a034554644 GIT binary patch literal 197 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|jN)5S5Q;#TsH|HuE? zAO3&-ufd~`5A|*KGK}AN=7&1{k+kF3^})C%E9Faif+#O+`z`v>8#+yeB$qBkrP%IPM!G>fAVVUL;J-Y z%!lW*@*U)nk9BsIuQU>xbk&7ULS8#2+FDKcpK@;AYsFFSX_HlS~Pa22WQ%mvv4FO#th~8dLxP literal 0 HcmV?d00001 diff --git a/gfx/overworld/kris_fish.png b/gfx/overworld/kris_fish.png new file mode 100644 index 0000000000000000000000000000000000000000..5e04951c676022f381004a786b9af8e4ca8e2239 GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznV9;P^|twz+kzC=}L8L#r~dzox9$BeAC62q};qHIbrd?uqEX(XIE&n7k592?fzN)zE0($ zQEa@(FRO`_&Mp5#g5Ei~{r_;zhda^RXW5=fwF;i0_IEBOX)?T=Jrm?aPgg&ebxsLQ E01ui_s{jB1 literal 0 HcmV?d00001 diff --git a/gfx/overworld/magnet_train_bg.tilemap b/gfx/overworld/magnet_train_bg.tilemap new file mode 100644 index 0000000..3a70aec --- /dev/null +++ b/gfx/overworld/magnet_train_bg.tilemap @@ -0,0 +1 @@ +LM\]LM\]11 11LM\]LM\] \ No newline at end of file diff --git a/gfx/overworld/magnet_train_fg.tilemap b/gfx/overworld/magnet_train_fg.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..2f5426834514350cc274ee0754d1fa52e08a12a1 GIT binary patch literal 80 zcmb1VW#i)F;^YDY5XH?SFCr=?B_$;(1qL8WT1HkyRZX2;UsD4NG}-mFv~_e9(^b literal 0 HcmV?d00001 diff --git a/gfx/overworld/npc_sprites.pal b/gfx/overworld/npc_sprites.pal new file mode 100644 index 0000000..b0f3347 --- /dev/null +++ b/gfx/overworld/npc_sprites.pal @@ -0,0 +1,39 @@ +; morn + RGB 28,31,16, 31,19,10, 31,07,01, 00,00,00 ; red + RGB 28,31,16, 31,19,10, 10,09,31, 00,00,00 ; blue + RGB 28,31,16, 31,19,10, 07,23,03, 00,00,00 ; green + RGB 28,31,16, 31,19,10, 15,10,03, 00,00,00 ; brown + RGB 28,31,16, 31,19,10, 30,10,06, 00,00,00 ; pink + RGB 31,31,31, 31,31,31, 13,13,13, 00,00,00 ; silver + RGB 22,31,10, 12,25,01, 05,14,00, 07,07,07 ; tree + RGB 28,31,16, 24,18,07, 20,15,03, 07,07,07 ; rock + +; day + RGB 27,31,27, 31,19,10, 31,07,01, 00,00,00 ; red + RGB 27,31,27, 31,19,10, 10,09,31, 00,00,00 ; blue + RGB 27,31,27, 31,19,10, 07,23,03, 00,00,00 ; green + RGB 27,31,27, 31,19,10, 15,10,03, 00,00,00 ; brown + RGB 27,31,27, 31,19,10, 30,10,06, 00,00,00 ; pink + RGB 31,31,31, 31,31,31, 13,13,13, 00,00,00 ; silver + RGB 22,31,10, 12,25,01, 05,14,00, 07,07,07 ; tree + RGB 27,31,27, 24,18,07, 20,15,03, 07,07,07 ; rock + +; nite + RGB 15,14,24, 31,19,10, 31,07,01, 00,00,00 ; red + RGB 15,14,24, 31,19,10, 10,09,31, 00,00,00 ; blue + RGB 15,14,24, 31,19,10, 07,23,03, 00,00,00 ; green + RGB 15,14,24, 31,19,10, 15,10,03, 00,00,00 ; brown + RGB 15,14,24, 31,19,10, 30,10,06, 00,00,00 ; pink + RGB 31,31,31, 31,31,31, 13,13,13, 00,00,00 ; silver + RGB 15,14,24, 08,13,19, 00,11,13, 00,00,00 ; tree + RGB 15,14,24, 12,09,15, 08,04,05, 00,00,00 ; rock + +; dark + RGB 01,01,02, 31,19,10, 31,07,01, 00,00,00 ; red + RGB 01,01,02, 31,19,10, 10,09,31, 00,00,00 ; blue + RGB 01,01,02, 31,19,10, 07,23,03, 00,00,00 ; green + RGB 01,01,02, 31,19,10, 15,10,03, 00,00,00 ; brown + RGB 01,01,02, 31,19,10, 30,10,06, 00,00,00 ; pink + RGB 31,31,31, 31,31,31, 13,13,13, 00,00,00 ; silver + RGB 01,01,02, 00,00,00, 00,00,00, 00,00,00 ; tree + RGB 01,01,02, 00,00,00, 00,00,00, 00,00,00 ; rock diff --git a/gfx/overworld/shadow.png b/gfx/overworld/shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..ba3dab5be5f4c7bed9941399aeb39cd7027e4521 GIT binary patch literal 84 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@koI(O45_%4{G-0%AwTnB kcD6R=1eO$ro&Wh67;?Eeu8ZW|tOP0dboFyt=akR{05t9vKL7v# literal 0 HcmV?d00001 diff --git a/gfx/overworld/trainer_battle.pal b/gfx/overworld/trainer_battle.pal new file mode 100644 index 0000000..b7d6789 --- /dev/null +++ b/gfx/overworld/trainer_battle.pal @@ -0,0 +1,4 @@ + RGB 31, 18, 29 + RGB 31, 11, 15 + RGB 31, 05, 05 + RGB 07, 07, 07 diff --git a/gfx/overworld/trainer_battle_dark.pal b/gfx/overworld/trainer_battle_dark.pal new file mode 100644 index 0000000..d1a35f3 --- /dev/null +++ b/gfx/overworld/trainer_battle_dark.pal @@ -0,0 +1,4 @@ + RGB 31, 18, 29 + RGB 31, 05, 05 + RGB 31, 05, 05 + RGB 31, 05, 05 diff --git a/gfx/overworld/trainer_battle_pokeball_tiles.png b/gfx/overworld/trainer_battle_pokeball_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..a4655d26e6d36fe26d7d7f8d6ad883dbc803653f GIT binary patch literal 89 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2U=UzpU|?Wy39JNB3Z5>GAr-fh6A}_O{6DEnUll%%&?CI*~vd$@?2>^=Y{28{ zx_gSwUZ>|zCe5wpx~%!fVN1Gazwo4mbAvmwj~}Et^4p_H^}gS?83{1ORFodH4VT literal 0 HcmV?d00001 diff --git a/gfx/pack/pack_f.pal b/gfx/pack/pack_f.pal new file mode 100644 index 0000000..a962d97 --- /dev/null +++ b/gfx/pack/pack_f.pal @@ -0,0 +1,29 @@ + RGB 31, 31, 31 + RGB 31, 14, 31 + RGB 31, 07, 31 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 14, 31 + RGB 31, 07, 31 + RGB 00, 00, 00 + + RGB 15, 15, 31 + RGB 31, 14, 31 + RGB 31, 07, 31 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 14, 31 + RGB 31, 07, 31 + RGB 31, 00, 00 + + RGB 31, 31, 31 + RGB 31, 14, 31 + RGB 31, 00, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 07, 19, 07 + RGB 07, 19, 07 + RGB 00, 00, 00 diff --git a/gfx/pack/pack_f.png b/gfx/pack/pack_f.png new file mode 100644 index 0000000000000000000000000000000000000000..fbe120bd108c63e6ac27439b9c7257527cc111d9 GIT binary patch literal 356 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U`SwM00F&nK?Vj!ZBG}+kcwMZCvVI;?7-9J zx=W(`h4zd-%`NLC^0dx*OZYpsRq2||`K_TETyXH5#JLBj|Ei0M-*Gw~Ch?i~kxFg3 zQq-ek*?TU={xEL8FZrTucGO3gFAE}a_*Xv2aVlv#?^&k*Vv~yZtB%@fVxFRfHw1HU zb?6^(6Zoop&MZ|gNBrZ-->0RVnU{CmvoqQsWy#1{6v00wYu%@P)8!7?%y{vq^vwIm z>HK&9ynLu!C-{0_(W`@P0sL=G_+BN>Ip%5Gvu@s!&B@Q5gN_Jktevi*E!UI0E;Y%x z%6_e&Z3nxt!S+WBU7D&G{+04Gx7|N2%2ez)A9u)h;di^oY$IXG$obR$ z^94P*Sx22WS6tw&P~R1+To(NO(TP3R_c}D~V_#5ZA&^`D_#xMa^K-f`hfP}#3O!F( KKbLh*2~7YB2Abdi literal 0 HcmV?d00001 diff --git a/gfx/pack/pack_menu.png b/gfx/pack/pack_menu.png new file mode 100644 index 0000000000000000000000000000000000000000..aa693cc40be5c0907ea9fa844d889547db236657 GIT binary patch literal 356 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qV9;PJo?A{qz)O^Qj!cESdr`prXnm(JBE!%xLZAPSjqr$H>tN0&j zNHre*$k9`Jh98x zQe*KVu>(#FF8fO-v`7SN&TKpK=tE=m!Jv)Pa)VE-yZV;dhB;4(#mJ4XGx6dhIjPQl zj9dBdv`Fr-Qd#}iIH7aXUTY2OH?A79lqaeF=kmC@OTGPRM(%g(glj+NtiEvh@-WbVB~9Hc;LOY%3JOQC)YQ=u4F7=+{X95o8yg(%`y$uK(C_Zhwr;y zHktT3F8cucu9@c^znLqpFy;P+)jem9HkPoj;OBN&?^RS0`YGQ21-HA}+BcTG8bYAp N^K|udS?83{1OQ)Fm=yp3 literal 0 HcmV?d00001 diff --git a/gfx/pack/pack_menu.tilemap b/gfx/pack/pack_menu.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..6c29f22c687ee8c0ec4d57834f4b766d346e9ce9 GIT binary patch literal 60 scmZQzVPRopW9Q)HVq#@wWd?Ia#l$5f5nOH_UOs*VS3pomSOm-k05LNGy8r+H literal 0 HcmV?d00001 diff --git a/gfx/pc/orange.pal b/gfx/pc/orange.pal new file mode 100644 index 0000000..299c6b2 --- /dev/null +++ b/gfx/pc/orange.pal @@ -0,0 +1,4 @@ + RGB 31, 15, 00 + RGB 23, 12, 00 + RGB 15, 07, 00 + RGB 00, 00, 00 diff --git a/gfx/pc/pc.png b/gfx/pc/pc.png new file mode 100644 index 0000000000000000000000000000000000000000..ce8fed73b3c3fc3ead5feb04f834ec4f1abf39d8 GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq}uw)5S5Q;#Tb`M=k~h z4wsAka%)y|%P!z%wdcO|>XBv7BJUED1IOg2}e9-RlvZ{K~*xNBeR Ug6)FM|3RjCy85}Sb4q9e02`nuK>z>% literal 0 HcmV?d00001 diff --git a/gfx/pc/pc_mail.png b/gfx/pc/pc_mail.png new file mode 100644 index 0000000000000000000000000000000000000000..fd4b2892f337e264b693dd2ac38e42203095fdd1 GIT binary patch literal 114 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1mYyz-Ar-fh6BroRiY`** ziQ#V0S<1IijE$FIwxq3I_>4@0q|kb)}1uX@Qhy4Q~X P0U74$>gTe~DWM4f)ZrjF literal 0 HcmV?d00001 diff --git a/gfx/pics.asm b/gfx/pics.asm new file mode 100644 index 0000000..3b9a0d5 --- /dev/null +++ b/gfx/pics.asm @@ -0,0 +1,775 @@ +; PokemonPicPointers and UnownPicPointers are assumed to start at the same +; address, but in different banks. This is enforced in layout.link. + + +SECTION "Pic Pointers", ROMX + +INCLUDE "data/pokemon/pic_pointers.asm" + + +SECTION "Unown Pic Pointers", ROMX + +INCLUDE "data/pokemon/unown_pic_pointers.asm" + + +SECTION "Trainer Pic Pointers", ROMX + +INCLUDE "data/trainers/pic_pointers.asm" + + +SECTION "Pics 1", ROMX + +HoOhFrontpic: INCBIN "gfx/pokemon/ho_oh/front.animated.2bpp.lz" +MachampFrontpic: INCBIN "gfx/pokemon/machamp/front.animated.2bpp.lz" +NinetalesFrontpic: INCBIN "gfx/pokemon/ninetales/front.animated.2bpp.lz" +FeraligatrFrontpic: INCBIN "gfx/pokemon/feraligatr/front.animated.2bpp.lz" +NidokingFrontpic: INCBIN "gfx/pokemon/nidoking/front.animated.2bpp.lz" +RaikouFrontpic: INCBIN "gfx/pokemon/raikou/front.animated.2bpp.lz" +LugiaFrontpic: INCBIN "gfx/pokemon/lugia/front.animated.2bpp.lz" +ArticunoFrontpic: INCBIN "gfx/pokemon/articuno/front.animated.2bpp.lz" +TaurosFrontpic: INCBIN "gfx/pokemon/tauros/front.animated.2bpp.lz" +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" + + +SECTION "Pics 2", ROMX + +BlastoiseFrontpic: INCBIN "gfx/pokemon/blastoise/front.animated.2bpp.lz" +RapidashFrontpic: INCBIN "gfx/pokemon/rapidash/front.animated.2bpp.lz" +MeganiumFrontpic: INCBIN "gfx/pokemon/meganium/front.animated.2bpp.lz" +NidoqueenFrontpic: INCBIN "gfx/pokemon/nidoqueen/front.animated.2bpp.lz" +HitmonleeFrontpic: INCBIN "gfx/pokemon/hitmonlee/front.animated.2bpp.lz" +ScizorFrontpic: INCBIN "gfx/pokemon/scizor/front.animated.2bpp.lz" +BeedrillFrontpic: INCBIN "gfx/pokemon/beedrill/front.animated.2bpp.lz" +ArcanineFrontpic: INCBIN "gfx/pokemon/arcanine/front.animated.2bpp.lz" +TyranitarFrontpic: INCBIN "gfx/pokemon/tyranitar/front.animated.2bpp.lz" +MoltresFrontpic: INCBIN "gfx/pokemon/moltres/front.animated.2bpp.lz" +ZapdosFrontpic: INCBIN "gfx/pokemon/zapdos/front.animated.2bpp.lz" +ArbokFrontpic: INCBIN "gfx/pokemon/arbok/front.animated.2bpp.lz" +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" + + +SECTION "Pics 3", ROMX + +SteelixFrontpic: INCBIN "gfx/pokemon/steelix/front.animated.2bpp.lz" +AlakazamFrontpic: INCBIN "gfx/pokemon/alakazam/front.animated.2bpp.lz" +GyaradosFrontpic: INCBIN "gfx/pokemon/gyarados/front.animated.2bpp.lz" +KangaskhanFrontpic: INCBIN "gfx/pokemon/kangaskhan/front.animated.2bpp.lz" +RhydonFrontpic: INCBIN "gfx/pokemon/rhydon/front.animated.2bpp.lz" +GolduckFrontpic: INCBIN "gfx/pokemon/golduck/front.animated.2bpp.lz" +RhyhornFrontpic: INCBIN "gfx/pokemon/rhyhorn/front.animated.2bpp.lz" +PidgeotFrontpic: INCBIN "gfx/pokemon/pidgeot/front.animated.2bpp.lz" +SlowbroFrontpic: INCBIN "gfx/pokemon/slowbro/front.animated.2bpp.lz" +ButterfreeFrontpic: INCBIN "gfx/pokemon/butterfree/front.animated.2bpp.lz" +WeezingFrontpic: INCBIN "gfx/pokemon/weezing/front.animated.2bpp.lz" +CloysterFrontpic: INCBIN "gfx/pokemon/cloyster/front.animated.2bpp.lz" +SkarmoryFrontpic: INCBIN "gfx/pokemon/skarmory/front.animated.2bpp.lz" +DewgongFrontpic: INCBIN "gfx/pokemon/dewgong/front.animated.2bpp.lz" +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" + + +SECTION "Pics 4", ROMX + +DodrioFrontpic: INCBIN "gfx/pokemon/dodrio/front.animated.2bpp.lz" +SlowkingFrontpic: INCBIN "gfx/pokemon/slowking/front.animated.2bpp.lz" +HitmontopFrontpic: INCBIN "gfx/pokemon/hitmontop/front.animated.2bpp.lz" +OnixFrontpic: INCBIN "gfx/pokemon/onix/front.animated.2bpp.lz" +BlisseyFrontpic: INCBIN "gfx/pokemon/blissey/front.animated.2bpp.lz" +MachokeFrontpic: INCBIN "gfx/pokemon/machoke/front.animated.2bpp.lz" +DragoniteFrontpic: INCBIN "gfx/pokemon/dragonite/front.animated.2bpp.lz" +PoliwrathFrontpic: INCBIN "gfx/pokemon/poliwrath/front.animated.2bpp.lz" +ScytherFrontpic: INCBIN "gfx/pokemon/scyther/front.animated.2bpp.lz" +AerodactylFrontpic: INCBIN "gfx/pokemon/aerodactyl/front.animated.2bpp.lz" +SeakingFrontpic: INCBIN "gfx/pokemon/seaking/front.animated.2bpp.lz" +MukFrontpic: INCBIN "gfx/pokemon/muk/front.animated.2bpp.lz" +CroconawFrontpic: INCBIN "gfx/pokemon/croconaw/front.animated.2bpp.lz" +HypnoFrontpic: INCBIN "gfx/pokemon/hypno/front.animated.2bpp.lz" +NidorinoFrontpic: INCBIN "gfx/pokemon/nidorino/front.animated.2bpp.lz" +SandslashFrontpic: INCBIN "gfx/pokemon/sandslash/front.animated.2bpp.lz" +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" + + +SECTION "Pics 5", ROMX + +GolbatFrontpic: INCBIN "gfx/pokemon/golbat/front.animated.2bpp.lz" +KinglerFrontpic: INCBIN "gfx/pokemon/kingler/front.animated.2bpp.lz" +ExeggcuteFrontpic: INCBIN "gfx/pokemon/exeggcute/front.animated.2bpp.lz" +MagcargoFrontpic: INCBIN "gfx/pokemon/magcargo/front.animated.2bpp.lz" +PersianFrontpic: INCBIN "gfx/pokemon/persian/front.animated.2bpp.lz" +StantlerFrontpic: INCBIN "gfx/pokemon/stantler/front.animated.2bpp.lz" +RaticateFrontpic: INCBIN "gfx/pokemon/raticate/front.animated.2bpp.lz" +VenomothFrontpic: INCBIN "gfx/pokemon/venomoth/front.animated.2bpp.lz" +PolitoedFrontpic: INCBIN "gfx/pokemon/politoed/front.animated.2bpp.lz" +ElectabuzzFrontpic: INCBIN "gfx/pokemon/electabuzz/front.animated.2bpp.lz" +MantineFrontpic: INCBIN "gfx/pokemon/mantine/front.animated.2bpp.lz" +LickitungFrontpic: INCBIN "gfx/pokemon/lickitung/front.animated.2bpp.lz" +KingdraFrontpic: INCBIN "gfx/pokemon/kingdra/front.animated.2bpp.lz" +CharmeleonFrontpic: INCBIN "gfx/pokemon/charmeleon/front.animated.2bpp.lz" +KadabraFrontpic: INCBIN "gfx/pokemon/kadabra/front.animated.2bpp.lz" +ExeggutorFrontpic: INCBIN "gfx/pokemon/exeggutor/front.animated.2bpp.lz" +GastlyFrontpic: INCBIN "gfx/pokemon/gastly/front.animated.2bpp.lz" +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" + + +SECTION "Pics 6", ROMX + +AriadosFrontpic: INCBIN "gfx/pokemon/ariados/front.animated.2bpp.lz" +NoctowlFrontpic: INCBIN "gfx/pokemon/noctowl/front.animated.2bpp.lz" +WartortleFrontpic: INCBIN "gfx/pokemon/wartortle/front.animated.2bpp.lz" +LaprasFrontpic: INCBIN "gfx/pokemon/lapras/front.animated.2bpp.lz" +GolemFrontpic: INCBIN "gfx/pokemon/golem/front.animated.2bpp.lz" +PoliwhirlFrontpic: INCBIN "gfx/pokemon/poliwhirl/front.animated.2bpp.lz" +UrsaringFrontpic: INCBIN "gfx/pokemon/ursaring/front.animated.2bpp.lz" +HoundoomFrontpic: INCBIN "gfx/pokemon/houndoom/front.animated.2bpp.lz" +KabutopsFrontpic: INCBIN "gfx/pokemon/kabutops/front.animated.2bpp.lz" +AmpharosFrontpic: INCBIN "gfx/pokemon/ampharos/front.animated.2bpp.lz" +NidorinaFrontpic: INCBIN "gfx/pokemon/nidorina/front.animated.2bpp.lz" +FlareonFrontpic: INCBIN "gfx/pokemon/flareon/front.animated.2bpp.lz" +FarfetchDFrontpic: INCBIN "gfx/pokemon/farfetch_d/front.animated.2bpp.lz" +VileplumeFrontpic: INCBIN "gfx/pokemon/vileplume/front.animated.2bpp.lz" +BayleefFrontpic: INCBIN "gfx/pokemon/bayleef/front.animated.2bpp.lz" +MagmarFrontpic: INCBIN "gfx/pokemon/magmar/front.animated.2bpp.lz" +TentacruelFrontpic: INCBIN "gfx/pokemon/tentacruel/front.animated.2bpp.lz" +ElekidFrontpic: INCBIN "gfx/pokemon/elekid/front.animated.2bpp.lz" +JumpluffFrontpic: INCBIN "gfx/pokemon/jumpluff/front.animated.2bpp.lz" +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" + + +SECTION "Pics 7", ROMX + +VaporeonFrontpic: INCBIN "gfx/pokemon/vaporeon/front.animated.2bpp.lz" +GirafarigFrontpic: INCBIN "gfx/pokemon/girafarig/front.animated.2bpp.lz" +DrowzeeFrontpic: INCBIN "gfx/pokemon/drowzee/front.animated.2bpp.lz" +SneaselFrontpic: INCBIN "gfx/pokemon/sneasel/front.animated.2bpp.lz" +BellossomFrontpic: INCBIN "gfx/pokemon/bellossom/front.animated.2bpp.lz" +SnorlaxFrontpic: INCBIN "gfx/pokemon/snorlax/front.animated.2bpp.lz" +WigglytuffFrontpic: INCBIN "gfx/pokemon/wigglytuff/front.animated.2bpp.lz" +YanmaFrontpic: INCBIN "gfx/pokemon/yanma/front.animated.2bpp.lz" +SmeargleFrontpic: INCBIN "gfx/pokemon/smeargle/front.animated.2bpp.lz" +ClefableFrontpic: INCBIN "gfx/pokemon/clefable/front.animated.2bpp.lz" +PonytaFrontpic: INCBIN "gfx/pokemon/ponyta/front.animated.2bpp.lz" +MurkrowFrontpic: INCBIN "gfx/pokemon/murkrow/front.animated.2bpp.lz" +GravelerFrontpic: INCBIN "gfx/pokemon/graveler/front.animated.2bpp.lz" +StarmieFrontpic: INCBIN "gfx/pokemon/starmie/front.animated.2bpp.lz" +PidgeottoFrontpic: INCBIN "gfx/pokemon/pidgeotto/front.animated.2bpp.lz" +LedybaFrontpic: INCBIN "gfx/pokemon/ledyba/front.animated.2bpp.lz" +GengarFrontpic: INCBIN "gfx/pokemon/gengar/front.animated.2bpp.lz" +OmastarFrontpic: INCBIN "gfx/pokemon/omastar/front.animated.2bpp.lz" +PiloswineFrontpic: INCBIN "gfx/pokemon/piloswine/front.animated.2bpp.lz" +DugtrioFrontpic: INCBIN "gfx/pokemon/dugtrio/front.animated.2bpp.lz" +MagnetonFrontpic: INCBIN "gfx/pokemon/magneton/front.animated.2bpp.lz" +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" + + +SECTION "Pics 8", ROMX + +SeelFrontpic: INCBIN "gfx/pokemon/seel/front.animated.2bpp.lz" +CrobatFrontpic: INCBIN "gfx/pokemon/crobat/front.animated.2bpp.lz" +ChanseyFrontpic: INCBIN "gfx/pokemon/chansey/front.animated.2bpp.lz" +TangelaFrontpic: INCBIN "gfx/pokemon/tangela/front.animated.2bpp.lz" +SnubbullFrontpic: INCBIN "gfx/pokemon/snubbull/front.animated.2bpp.lz" +GranbullFrontpic: INCBIN "gfx/pokemon/granbull/front.animated.2bpp.lz" +MiltankFrontpic: INCBIN "gfx/pokemon/miltank/front.animated.2bpp.lz" +HaunterFrontpic: INCBIN "gfx/pokemon/haunter/front.animated.2bpp.lz" +SunfloraFrontpic: INCBIN "gfx/pokemon/sunflora/front.animated.2bpp.lz" +UmbreonFrontpic: INCBIN "gfx/pokemon/umbreon/front.animated.2bpp.lz" +ChikoritaFrontpic: INCBIN "gfx/pokemon/chikorita/front.animated.2bpp.lz" +GoldeenFrontpic: INCBIN "gfx/pokemon/goldeen/front.animated.2bpp.lz" +EspeonFrontpic: INCBIN "gfx/pokemon/espeon/front.animated.2bpp.lz" +XatuFrontpic: INCBIN "gfx/pokemon/xatu/front.animated.2bpp.lz" +MewFrontpic: INCBIN "gfx/pokemon/mew/front.animated.2bpp.lz" +OctilleryFrontpic: INCBIN "gfx/pokemon/octillery/front.animated.2bpp.lz" +JynxFrontpic: INCBIN "gfx/pokemon/jynx/front.animated.2bpp.lz" +WobbuffetFrontpic: INCBIN "gfx/pokemon/wobbuffet/front.animated.2bpp.lz" +DelibirdFrontpic: INCBIN "gfx/pokemon/delibird/front.animated.2bpp.lz" +LedianFrontpic: INCBIN "gfx/pokemon/ledian/front.animated.2bpp.lz" +GloomFrontpic: INCBIN "gfx/pokemon/gloom/front.animated.2bpp.lz" +FlaaffyFrontpic: INCBIN "gfx/pokemon/flaaffy/front.animated.2bpp.lz" +IvysaurFrontpic: INCBIN "gfx/pokemon/ivysaur/front.animated.2bpp.lz" +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" + + +SECTION "Pics 9", ROMX + +EkansFrontpic: INCBIN "gfx/pokemon/ekans/front.animated.2bpp.lz" +SudowoodoFrontpic: INCBIN "gfx/pokemon/sudowoodo/front.animated.2bpp.lz" +PikachuFrontpic: INCBIN "gfx/pokemon/pikachu/front.animated.2bpp.lz" +SeadraFrontpic: INCBIN "gfx/pokemon/seadra/front.animated.2bpp.lz" +MagbyFrontpic: INCBIN "gfx/pokemon/magby/front.animated.2bpp.lz" +WeepinbellFrontpic: INCBIN "gfx/pokemon/weepinbell/front.animated.2bpp.lz" +TotodileFrontpic: INCBIN "gfx/pokemon/totodile/front.animated.2bpp.lz" +CorsolaFrontpic: INCBIN "gfx/pokemon/corsola/front.animated.2bpp.lz" +FirebreatherPic: INCBIN "gfx/trainers/firebreather.2bpp.lz" +MachopFrontpic: INCBIN "gfx/pokemon/machop/front.animated.2bpp.lz" +ChinchouFrontpic: INCBIN "gfx/pokemon/chinchou/front.animated.2bpp.lz" +RattataFrontpic: INCBIN "gfx/pokemon/rattata/front.animated.2bpp.lz" +ChampionPic: INCBIN "gfx/trainers/champion.2bpp.lz" +SpearowFrontpic: INCBIN "gfx/pokemon/spearow/front.animated.2bpp.lz" +MagikarpFrontpic: INCBIN "gfx/pokemon/magikarp/front.animated.2bpp.lz" +CharmanderFrontpic: INCBIN "gfx/pokemon/charmander/front.animated.2bpp.lz" +CuboneFrontpic: INCBIN "gfx/pokemon/cubone/front.animated.2bpp.lz" +BlackbeltTPic: INCBIN "gfx/trainers/blackbelt_t.2bpp.lz" +BikerPic: INCBIN "gfx/trainers/biker.2bpp.lz" +NidoranMFrontpic: INCBIN "gfx/pokemon/nidoran_m/front.animated.2bpp.lz" +PorygonFrontpic: INCBIN "gfx/pokemon/porygon/front.animated.2bpp.lz" +BrunoPic: INCBIN "gfx/trainers/bruno.2bpp.lz" +GrimerFrontpic: INCBIN "gfx/pokemon/grimer/front.animated.2bpp.lz" +StaryuFrontpic: INCBIN "gfx/pokemon/staryu/front.animated.2bpp.lz" +HikerPic: INCBIN "gfx/trainers/hiker.2bpp.lz" +MeowthFrontpic: INCBIN "gfx/pokemon/meowth/front.animated.2bpp.lz" +Porygon2Frontpic: INCBIN "gfx/pokemon/porygon2/front.animated.2bpp.lz" +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" + + +SECTION "Pics 10", ROMX + +MisdreavusFrontpic: INCBIN "gfx/pokemon/misdreavus/front.animated.2bpp.lz" +HoundourFrontpic: INCBIN "gfx/pokemon/houndour/front.animated.2bpp.lz" +MankeyFrontpic: INCBIN "gfx/pokemon/mankey/front.animated.2bpp.lz" +CelebiFrontpic: INCBIN "gfx/pokemon/celebi/front.animated.2bpp.lz" +MediumPic: INCBIN "gfx/trainers/medium.2bpp.lz" +PinecoFrontpic: INCBIN "gfx/pokemon/pineco/front.animated.2bpp.lz" +KrabbyFrontpic: INCBIN "gfx/pokemon/krabby/front.animated.2bpp.lz" +FisherPic: INCBIN "gfx/trainers/fisher.2bpp.lz" +JigglypuffFrontpic: INCBIN "gfx/pokemon/jigglypuff/front.animated.2bpp.lz" +ParasFrontpic: INCBIN "gfx/pokemon/paras/front.animated.2bpp.lz" +NidokingBackpic: INCBIN "gfx/pokemon/nidoking/back.2bpp.lz" +PokefanmPic: INCBIN "gfx/trainers/pokefan_m.2bpp.lz" +BoarderPic: INCBIN "gfx/trainers/boarder.2bpp.lz" +PsyduckFrontpic: INCBIN "gfx/pokemon/psyduck/front.animated.2bpp.lz" +SquirtleFrontpic: INCBIN "gfx/pokemon/squirtle/front.animated.2bpp.lz" +MachampBackpic: INCBIN "gfx/pokemon/machamp/back.2bpp.lz" +KoffingFrontpic: INCBIN "gfx/pokemon/koffing/front.animated.2bpp.lz" +VenonatFrontpic: INCBIN "gfx/pokemon/venonat/front.animated.2bpp.lz" +ExeggutorBackpic: INCBIN "gfx/pokemon/exeggutor/back.2bpp.lz" +LanturnFrontpic: INCBIN "gfx/pokemon/lanturn/front.animated.2bpp.lz" +TyrogueFrontpic: INCBIN "gfx/pokemon/tyrogue/front.animated.2bpp.lz" +SkiploomFrontpic: INCBIN "gfx/pokemon/skiploom/front.animated.2bpp.lz" +MareepFrontpic: INCBIN "gfx/pokemon/mareep/front.animated.2bpp.lz" +ChuckPic: INCBIN "gfx/trainers/chuck.2bpp.lz" +EeveeFrontpic: INCBIN "gfx/pokemon/eevee/front.animated.2bpp.lz" +ButterfreeBackpic: INCBIN "gfx/pokemon/butterfree/back.2bpp.lz" +ZubatFrontpic: INCBIN "gfx/pokemon/zubat/front.animated.2bpp.lz" +KimonoGirlPic: INCBIN "gfx/trainers/kimono_girl.2bpp.lz" +AlakazamBackpic: INCBIN "gfx/pokemon/alakazam/back.2bpp.lz" +AipomFrontpic: INCBIN "gfx/pokemon/aipom/front.animated.2bpp.lz" +AbraFrontpic: INCBIN "gfx/pokemon/abra/front.animated.2bpp.lz" +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" + + +SECTION "Pics 11", ROMX + +DodrioBackpic: INCBIN "gfx/pokemon/dodrio/back.2bpp.lz" +ClefairyFrontpic: INCBIN "gfx/pokemon/clefairy/front.animated.2bpp.lz" +SlugmaFrontpic: INCBIN "gfx/pokemon/slugma/front.animated.2bpp.lz" +GrowlitheFrontpic: INCBIN "gfx/pokemon/growlithe/front.animated.2bpp.lz" +SlowpokeFrontpic: INCBIN "gfx/pokemon/slowpoke/front.animated.2bpp.lz" +SmoochumFrontpic: INCBIN "gfx/pokemon/smoochum/front.animated.2bpp.lz" +JugglerPic: INCBIN "gfx/trainers/juggler.2bpp.lz" +MarillFrontpic: INCBIN "gfx/pokemon/marill/front.animated.2bpp.lz" +GuitaristPic: INCBIN "gfx/trainers/guitarist.2bpp.lz" +PokefanfPic: INCBIN "gfx/trainers/pokefan_f.2bpp.lz" +VenomothBackpic: INCBIN "gfx/pokemon/venomoth/back.2bpp.lz" +ClairPic: INCBIN "gfx/trainers/clair.2bpp.lz" +PokemaniacPic: INCBIN "gfx/trainers/pokemaniac.2bpp.lz" +OmanyteFrontpic: INCBIN "gfx/pokemon/omanyte/front.animated.2bpp.lz" +SkierPic: INCBIN "gfx/trainers/skier.2bpp.lz" +PupitarFrontpic: INCBIN "gfx/pokemon/pupitar/front.animated.2bpp.lz" +BellsproutFrontpic: INCBIN "gfx/pokemon/bellsprout/front.animated.2bpp.lz" +ShellderFrontpic: INCBIN "gfx/pokemon/shellder/front.animated.2bpp.lz" +TentacoolFrontpic: INCBIN "gfx/pokemon/tentacool/front.animated.2bpp.lz" +CleffaFrontpic: INCBIN "gfx/pokemon/cleffa/front.animated.2bpp.lz" +GyaradosBackpic: INCBIN "gfx/pokemon/gyarados/back.2bpp.lz" +NinetalesBackpic: INCBIN "gfx/pokemon/ninetales/back.2bpp.lz" +YanmaBackpic: INCBIN "gfx/pokemon/yanma/back.2bpp.lz" +PinsirBackpic: INCBIN "gfx/pokemon/pinsir/back.2bpp.lz" +LassPic: INCBIN "gfx/trainers/lass.2bpp.lz" +ClefableBackpic: INCBIN "gfx/pokemon/clefable/back.2bpp.lz" +DoduoFrontpic: INCBIN "gfx/pokemon/doduo/front.animated.2bpp.lz" +FeraligatrBackpic: INCBIN "gfx/pokemon/feraligatr/back.2bpp.lz" +DratiniFrontpic: INCBIN "gfx/pokemon/dratini/front.animated.2bpp.lz" +MagnetonBackpic: INCBIN "gfx/pokemon/magneton/back.2bpp.lz" +QwilfishFrontpic: INCBIN "gfx/pokemon/qwilfish/front.animated.2bpp.lz" +SuicuneBackpic: INCBIN "gfx/pokemon/suicune/back.2bpp.lz" +SlowkingBackpic: INCBIN "gfx/pokemon/slowking/back.2bpp.lz" +ElekidBackpic: INCBIN "gfx/pokemon/elekid/back.2bpp.lz" +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" + + +SECTION "Pics 12", ROMX + +VenusaurBackpic: INCBIN "gfx/pokemon/venusaur/back.2bpp.lz" +MoltresBackpic: INCBIN "gfx/pokemon/moltres/back.2bpp.lz" +SunfloraBackpic: INCBIN "gfx/pokemon/sunflora/back.2bpp.lz" +PhanpyFrontpic: INCBIN "gfx/pokemon/phanpy/front.animated.2bpp.lz" +RhydonBackpic: INCBIN "gfx/pokemon/rhydon/back.2bpp.lz" +LarvitarFrontpic: INCBIN "gfx/pokemon/larvitar/front.animated.2bpp.lz" +TyranitarBackpic: INCBIN "gfx/pokemon/tyranitar/back.2bpp.lz" +SandslashBackpic: INCBIN "gfx/pokemon/sandslash/back.2bpp.lz" +SeadraBackpic: INCBIN "gfx/pokemon/seadra/back.2bpp.lz" +TwinsPic: INCBIN "gfx/trainers/twins.2bpp.lz" +FarfetchDBackpic: INCBIN "gfx/pokemon/farfetch_d/back.2bpp.lz" +NidoranMBackpic: INCBIN "gfx/pokemon/nidoran_m/back.2bpp.lz" +LedybaBackpic: INCBIN "gfx/pokemon/ledyba/back.2bpp.lz" +CyndaquilBackpic: INCBIN "gfx/pokemon/cyndaquil/back.2bpp.lz" +BayleefBackpic: INCBIN "gfx/pokemon/bayleef/back.2bpp.lz" +OddishFrontpic: INCBIN "gfx/pokemon/oddish/front.animated.2bpp.lz" +RapidashBackpic: INCBIN "gfx/pokemon/rapidash/back.2bpp.lz" +DoduoBackpic: INCBIN "gfx/pokemon/doduo/back.2bpp.lz" +HoppipFrontpic: INCBIN "gfx/pokemon/hoppip/front.animated.2bpp.lz" +MankeyBackpic: INCBIN "gfx/pokemon/mankey/back.2bpp.lz" +MagmarBackpic: INCBIN "gfx/pokemon/magmar/back.2bpp.lz" +HypnoBackpic: INCBIN "gfx/pokemon/hypno/back.2bpp.lz" +QuilavaBackpic: INCBIN "gfx/pokemon/quilava/back.2bpp.lz" +CroconawBackpic: INCBIN "gfx/pokemon/croconaw/back.2bpp.lz" +SandshrewBackpic: INCBIN "gfx/pokemon/sandshrew/back.2bpp.lz" +SailorPic: INCBIN "gfx/trainers/sailor.2bpp.lz" +BeautyPic: INCBIN "gfx/trainers/beauty.2bpp.lz" +ShellderBackpic: INCBIN "gfx/pokemon/shellder/back.2bpp.lz" +ZubatBackpic: INCBIN "gfx/pokemon/zubat/back.2bpp.lz" +TeddiursaFrontpic: INCBIN "gfx/pokemon/teddiursa/front.animated.2bpp.lz" +CuboneBackpic: INCBIN "gfx/pokemon/cubone/back.2bpp.lz" +GruntmPic: INCBIN "gfx/trainers/grunt_m.2bpp.lz" +GloomBackpic: INCBIN "gfx/pokemon/gloom/back.2bpp.lz" +MagcargoBackpic: INCBIN "gfx/pokemon/magcargo/back.2bpp.lz" +KabutopsBackpic: INCBIN "gfx/pokemon/kabutops/back.2bpp.lz" +BeedrillBackpic: INCBIN "gfx/pokemon/beedrill/back.2bpp.lz" +ArcanineBackpic: INCBIN "gfx/pokemon/arcanine/back.2bpp.lz" +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" + + +SECTION "Pics 13", ROMX + +OmanyteBackpic: INCBIN "gfx/pokemon/omanyte/back.2bpp.lz" +PidgeyBackpic: INCBIN "gfx/pokemon/pidgey/back.2bpp.lz" +ScientistPic: INCBIN "gfx/trainers/scientist.2bpp.lz" +QwilfishBackpic: INCBIN "gfx/pokemon/qwilfish/back.2bpp.lz" +GligarBackpic: INCBIN "gfx/pokemon/gligar/back.2bpp.lz" +TyphlosionBackpic: INCBIN "gfx/pokemon/typhlosion/back.2bpp.lz" +CharmeleonBackpic: INCBIN "gfx/pokemon/charmeleon/back.2bpp.lz" +NidoqueenBackpic: INCBIN "gfx/pokemon/nidoqueen/back.2bpp.lz" +PichuFrontpic: INCBIN "gfx/pokemon/pichu/front.animated.2bpp.lz" +ElectabuzzBackpic: INCBIN "gfx/pokemon/electabuzz/back.2bpp.lz" +LedianBackpic: INCBIN "gfx/pokemon/ledian/back.2bpp.lz" +PupitarBackpic: INCBIN "gfx/pokemon/pupitar/back.2bpp.lz" +HeracrossBackpic: INCBIN "gfx/pokemon/heracross/back.2bpp.lz" +UnownDFrontpic: INCBIN "gfx/pokemon/unown_d/front.animated.2bpp.lz" +MiltankBackpic: INCBIN "gfx/pokemon/miltank/back.2bpp.lz" +SteelixBackpic: INCBIN "gfx/pokemon/steelix/back.2bpp.lz" +PersianBackpic: INCBIN "gfx/pokemon/persian/back.2bpp.lz" +LtSurgePic: INCBIN "gfx/trainers/lt_surge.2bpp.lz" +TeacherPic: INCBIN "gfx/trainers/teacher.2bpp.lz" +EggPic: INCBIN "gfx/pokemon/egg/front.animated.2bpp.lz" +EeveeBackpic: INCBIN "gfx/pokemon/eevee/back.2bpp.lz" +ShuckleFrontpic: INCBIN "gfx/pokemon/shuckle/front.animated.2bpp.lz" +PonytaBackpic: INCBIN "gfx/pokemon/ponyta/back.2bpp.lz" +RemoraidFrontpic: INCBIN "gfx/pokemon/remoraid/front.animated.2bpp.lz" +PoliwagFrontpic: INCBIN "gfx/pokemon/poliwag/front.animated.2bpp.lz" +OnixBackpic: INCBIN "gfx/pokemon/onix/back.2bpp.lz" +KoffingBackpic: INCBIN "gfx/pokemon/koffing/back.2bpp.lz" +BirdKeeperPic: INCBIN "gfx/trainers/bird_keeper.2bpp.lz" +FalknerPic: INCBIN "gfx/trainers/falkner.2bpp.lz" +KarenPic: INCBIN "gfx/trainers/karen.2bpp.lz" +NidorinaBackpic: INCBIN "gfx/pokemon/nidorina/back.2bpp.lz" +TentacruelBackpic: INCBIN "gfx/pokemon/tentacruel/back.2bpp.lz" +GrowlitheBackpic: INCBIN "gfx/pokemon/growlithe/back.2bpp.lz" +KogaPic: INCBIN "gfx/trainers/koga.2bpp.lz" +MachokeBackpic: INCBIN "gfx/pokemon/machoke/back.2bpp.lz" +RaichuBackpic: INCBIN "gfx/pokemon/raichu/back.2bpp.lz" +PoliwrathBackpic: INCBIN "gfx/pokemon/poliwrath/back.2bpp.lz" +SwimmermPic: INCBIN "gfx/trainers/swimmer_m.2bpp.lz" +SunkernFrontpic: INCBIN "gfx/pokemon/sunkern/front.animated.2bpp.lz" +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" + + +SECTION "Pics 14", ROMX + +SudowoodoBackpic: INCBIN "gfx/pokemon/sudowoodo/back.2bpp.lz" +FlaaffyBackpic: INCBIN "gfx/pokemon/flaaffy/back.2bpp.lz" +SentretFrontpic: INCBIN "gfx/pokemon/sentret/front.animated.2bpp.lz" +TogeticBackpic: INCBIN "gfx/pokemon/togetic/back.2bpp.lz" +BugsyPic: INCBIN "gfx/trainers/bugsy.2bpp.lz" +MarowakBackpic: INCBIN "gfx/pokemon/marowak/back.2bpp.lz" +GeodudeBackpic: INCBIN "gfx/pokemon/geodude/back.2bpp.lz" +ScytherBackpic: INCBIN "gfx/pokemon/scyther/back.2bpp.lz" +VileplumeBackpic: INCBIN "gfx/pokemon/vileplume/back.2bpp.lz" +HitmonchanBackpic: INCBIN "gfx/pokemon/hitmonchan/back.2bpp.lz" +JumpluffBackpic: INCBIN "gfx/pokemon/jumpluff/back.2bpp.lz" +CooltrainermPic: INCBIN "gfx/trainers/cooltrainer_m.2bpp.lz" +BlastoiseBackpic: INCBIN "gfx/pokemon/blastoise/back.2bpp.lz" +MisdreavusBackpic: INCBIN "gfx/pokemon/misdreavus/back.2bpp.lz" +TyrogueBackpic: INCBIN "gfx/pokemon/tyrogue/back.2bpp.lz" +GeodudeFrontpic: INCBIN "gfx/pokemon/geodude/front.animated.2bpp.lz" +ScizorBackpic: INCBIN "gfx/pokemon/scizor/back.2bpp.lz" +GirafarigBackpic: INCBIN "gfx/pokemon/girafarig/back.2bpp.lz" +StantlerBackpic: INCBIN "gfx/pokemon/stantler/back.2bpp.lz" +SmeargleBackpic: INCBIN "gfx/pokemon/smeargle/back.2bpp.lz" +CharizardBackpic: INCBIN "gfx/pokemon/charizard/back.2bpp.lz" +KadabraBackpic: INCBIN "gfx/pokemon/kadabra/back.2bpp.lz" +PrimeapeBackpic: INCBIN "gfx/pokemon/primeape/back.2bpp.lz" +FurretBackpic: INCBIN "gfx/pokemon/furret/back.2bpp.lz" +WartortleBackpic: INCBIN "gfx/pokemon/wartortle/back.2bpp.lz" +ExeggcuteBackpic: INCBIN "gfx/pokemon/exeggcute/back.2bpp.lz" +IgglybuffFrontpic: INCBIN "gfx/pokemon/igglybuff/front.animated.2bpp.lz" +RaticateBackpic: INCBIN "gfx/pokemon/raticate/back.2bpp.lz" +VulpixBackpic: INCBIN "gfx/pokemon/vulpix/back.2bpp.lz" +EkansBackpic: INCBIN "gfx/pokemon/ekans/back.2bpp.lz" +SeakingBackpic: INCBIN "gfx/pokemon/seaking/back.2bpp.lz" +BurglarPic: INCBIN "gfx/trainers/burglar.2bpp.lz" +PsyduckBackpic: INCBIN "gfx/pokemon/psyduck/back.2bpp.lz" +PikachuBackpic: INCBIN "gfx/pokemon/pikachu/back.2bpp.lz" +KabutoFrontpic: INCBIN "gfx/pokemon/kabuto/front.animated.2bpp.lz" +MareepBackpic: INCBIN "gfx/pokemon/mareep/back.2bpp.lz" +RemoraidBackpic: INCBIN "gfx/pokemon/remoraid/back.2bpp.lz" +DittoFrontpic: INCBIN "gfx/pokemon/ditto/front.animated.2bpp.lz" +KingdraBackpic: INCBIN "gfx/pokemon/kingdra/back.2bpp.lz" +CamperPic: INCBIN "gfx/trainers/camper.2bpp.lz" +WooperFrontpic: INCBIN "gfx/pokemon/wooper/front.animated.2bpp.lz" +ClefairyBackpic: INCBIN "gfx/pokemon/clefairy/back.2bpp.lz" +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" + + +SECTION "Pics 15", ROMX + +MewtwoBackpic: INCBIN "gfx/pokemon/mewtwo/back.2bpp.lz" +PokemonProfPic: INCBIN "gfx/trainers/oak.2bpp.lz" +CalPic: INCBIN "gfx/trainers/cal.2bpp.lz" +SwimmerfPic: INCBIN "gfx/trainers/swimmer_f.2bpp.lz" +DiglettFrontpic: INCBIN "gfx/pokemon/diglett/front.animated.2bpp.lz" +OfficerPic: INCBIN "gfx/trainers/officer.2bpp.lz" +MukBackpic: INCBIN "gfx/pokemon/muk/back.2bpp.lz" +DelibirdBackpic: INCBIN "gfx/pokemon/delibird/back.2bpp.lz" +SabrinaPic: INCBIN "gfx/trainers/sabrina.2bpp.lz" +MagikarpBackpic: INCBIN "gfx/pokemon/magikarp/back.2bpp.lz" +AriadosBackpic: INCBIN "gfx/pokemon/ariados/back.2bpp.lz" +SneaselBackpic: INCBIN "gfx/pokemon/sneasel/back.2bpp.lz" +UmbreonBackpic: INCBIN "gfx/pokemon/umbreon/back.2bpp.lz" +MurkrowBackpic: INCBIN "gfx/pokemon/murkrow/back.2bpp.lz" +IvysaurBackpic: INCBIN "gfx/pokemon/ivysaur/back.2bpp.lz" +SlowbroBackpic: INCBIN "gfx/pokemon/slowbro/back.2bpp.lz" +PsychicTPic: INCBIN "gfx/trainers/psychic_t.2bpp.lz" +GolduckBackpic: INCBIN "gfx/pokemon/golduck/back.2bpp.lz" +WeezingBackpic: INCBIN "gfx/pokemon/weezing/back.2bpp.lz" +EnteiBackpic: INCBIN "gfx/pokemon/entei/back.2bpp.lz" +GruntfPic: INCBIN "gfx/trainers/grunt_f.2bpp.lz" +HorseaFrontpic: INCBIN "gfx/pokemon/horsea/front.animated.2bpp.lz" +PidgeotBackpic: INCBIN "gfx/pokemon/pidgeot/back.2bpp.lz" +HoOhBackpic: INCBIN "gfx/pokemon/ho_oh/back.2bpp.lz" +PoliwhirlBackpic: INCBIN "gfx/pokemon/poliwhirl/back.2bpp.lz" +MewBackpic: INCBIN "gfx/pokemon/mew/back.2bpp.lz" +MachopBackpic: INCBIN "gfx/pokemon/machop/back.2bpp.lz" +AbraBackpic: INCBIN "gfx/pokemon/abra/back.2bpp.lz" +AerodactylBackpic: INCBIN "gfx/pokemon/aerodactyl/back.2bpp.lz" +KakunaFrontpic: INCBIN "gfx/pokemon/kakuna/front.animated.2bpp.lz" +DugtrioBackpic: INCBIN "gfx/pokemon/dugtrio/back.2bpp.lz" +WeepinbellBackpic: INCBIN "gfx/pokemon/weepinbell/back.2bpp.lz" +NidoranFBackpic: INCBIN "gfx/pokemon/nidoran_f/back.2bpp.lz" +GravelerBackpic: INCBIN "gfx/pokemon/graveler/back.2bpp.lz" +AipomBackpic: INCBIN "gfx/pokemon/aipom/back.2bpp.lz" +EspeonBackpic: INCBIN "gfx/pokemon/espeon/back.2bpp.lz" +WeedleFrontpic: INCBIN "gfx/pokemon/weedle/front.animated.2bpp.lz" +TotodileBackpic: INCBIN "gfx/pokemon/totodile/back.2bpp.lz" +SnubbullBackpic: INCBIN "gfx/pokemon/snubbull/back.2bpp.lz" +KinglerBackpic: INCBIN "gfx/pokemon/kingler/back.2bpp.lz" +GengarBackpic: INCBIN "gfx/pokemon/gengar/back.2bpp.lz" +RattataBackpic: INCBIN "gfx/pokemon/rattata/back.2bpp.lz" +YoungsterPic: INCBIN "gfx/trainers/youngster.2bpp.lz" +WillPic: INCBIN "gfx/trainers/will.2bpp.lz" +SchoolboyPic: INCBIN "gfx/trainers/schoolboy.2bpp.lz" +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" + + +SECTION "Pics 16", ROMX + +HoothootBackpic: INCBIN "gfx/pokemon/hoothoot/back.2bpp.lz" +NoctowlBackpic: INCBIN "gfx/pokemon/noctowl/back.2bpp.lz" +MortyPic: INCBIN "gfx/trainers/morty.2bpp.lz" +SlugmaBackpic: INCBIN "gfx/pokemon/slugma/back.2bpp.lz" +KabutoBackpic: INCBIN "gfx/pokemon/kabuto/back.2bpp.lz" +VictreebelBackpic: INCBIN "gfx/pokemon/victreebel/back.2bpp.lz" +MeowthBackpic: INCBIN "gfx/pokemon/meowth/back.2bpp.lz" +MeganiumBackpic: INCBIN "gfx/pokemon/meganium/back.2bpp.lz" +PicnickerPic: INCBIN "gfx/trainers/picnicker.2bpp.lz" +LickitungBackpic: INCBIN "gfx/pokemon/lickitung/back.2bpp.lz" +TogepiFrontpic: INCBIN "gfx/pokemon/togepi/front.animated.2bpp.lz" +SuperNerdPic: INCBIN "gfx/trainers/super_nerd.2bpp.lz" +HaunterBackpic: INCBIN "gfx/pokemon/haunter/back.2bpp.lz" +XatuBackpic: INCBIN "gfx/pokemon/xatu/back.2bpp.lz" +RedPic: INCBIN "gfx/trainers/red.2bpp.lz" +Porygon2Backpic: INCBIN "gfx/pokemon/porygon2/back.2bpp.lz" +JasminePic: INCBIN "gfx/trainers/jasmine.2bpp.lz" +PinecoBackpic: INCBIN "gfx/pokemon/pineco/back.2bpp.lz" +MetapodFrontpic: INCBIN "gfx/pokemon/metapod/front.animated.2bpp.lz" +SeelBackpic: INCBIN "gfx/pokemon/seel/back.2bpp.lz" +QuagsireBackpic: INCBIN "gfx/pokemon/quagsire/back.2bpp.lz" +WhitneyPic: INCBIN "gfx/trainers/whitney.2bpp.lz" +JolteonBackpic: INCBIN "gfx/pokemon/jolteon/back.2bpp.lz" +CaterpieFrontpic: INCBIN "gfx/pokemon/caterpie/front.animated.2bpp.lz" +HoppipBackpic: INCBIN "gfx/pokemon/hoppip/back.2bpp.lz" +BluePic: INCBIN "gfx/trainers/blue.2bpp.lz" +GranbullBackpic: INCBIN "gfx/pokemon/granbull/back.2bpp.lz" +GentlemanPic: INCBIN "gfx/trainers/gentleman.2bpp.lz" +ExecutivemPic: INCBIN "gfx/trainers/executive_m.2bpp.lz" +SpearowBackpic: INCBIN "gfx/pokemon/spearow/back.2bpp.lz" +SunkernBackpic: INCBIN "gfx/pokemon/sunkern/back.2bpp.lz" +LaprasBackpic: INCBIN "gfx/pokemon/lapras/back.2bpp.lz" +MagbyBackpic: INCBIN "gfx/pokemon/magby/back.2bpp.lz" +DragonairBackpic: INCBIN "gfx/pokemon/dragonair/back.2bpp.lz" +ZapdosBackpic: INCBIN "gfx/pokemon/zapdos/back.2bpp.lz" +ChikoritaBackpic: INCBIN "gfx/pokemon/chikorita/back.2bpp.lz" +CorsolaBackpic: INCBIN "gfx/pokemon/corsola/back.2bpp.lz" +ChinchouBackpic: INCBIN "gfx/pokemon/chinchou/back.2bpp.lz" +ChanseyBackpic: INCBIN "gfx/pokemon/chansey/back.2bpp.lz" +SkiploomBackpic: INCBIN "gfx/pokemon/skiploom/back.2bpp.lz" +SpinarakFrontpic: INCBIN "gfx/pokemon/spinarak/front.animated.2bpp.lz" +Rival2Pic: INCBIN "gfx/trainers/rival2.2bpp.lz" +UnownWFrontpic: INCBIN "gfx/pokemon/unown_w/front.animated.2bpp.lz" +CharmanderBackpic: INCBIN "gfx/pokemon/charmander/back.2bpp.lz" +RhyhornBackpic: INCBIN "gfx/pokemon/rhyhorn/back.2bpp.lz" +UnownCFrontpic: INCBIN "gfx/pokemon/unown_c/front.animated.2bpp.lz" +MistyPic: INCBIN "gfx/trainers/misty.2bpp.lz" +BlainePic: INCBIN "gfx/trainers/blaine.2bpp.lz" +UnownZFrontpic: INCBIN "gfx/pokemon/unown_z/front.animated.2bpp.lz" +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" + + +SECTION "Pics 17", ROMX + +ParasBackpic: INCBIN "gfx/pokemon/paras/back.2bpp.lz" +VaporeonBackpic: INCBIN "gfx/pokemon/vaporeon/back.2bpp.lz" +TentacoolBackpic: INCBIN "gfx/pokemon/tentacool/back.2bpp.lz" +ExecutivefPic: INCBIN "gfx/trainers/executive_f.2bpp.lz" +BulbasaurBackpic: INCBIN "gfx/pokemon/bulbasaur/back.2bpp.lz" +SmoochumBackpic: INCBIN "gfx/pokemon/smoochum/back.2bpp.lz" +PichuBackpic: INCBIN "gfx/pokemon/pichu/back.2bpp.lz" +HoundoomBackpic: INCBIN "gfx/pokemon/houndoom/back.2bpp.lz" +BellsproutBackpic: INCBIN "gfx/pokemon/bellsprout/back.2bpp.lz" +GrimerBackpic: INCBIN "gfx/pokemon/grimer/back.2bpp.lz" +LanturnBackpic: INCBIN "gfx/pokemon/lanturn/back.2bpp.lz" +PidgeottoBackpic: INCBIN "gfx/pokemon/pidgeotto/back.2bpp.lz" +StaryuBackpic: INCBIN "gfx/pokemon/staryu/back.2bpp.lz" +MrMimeBackpic: INCBIN "gfx/pokemon/mr__mime/back.2bpp.lz" +CaterpieBackpic: INCBIN "gfx/pokemon/caterpie/back.2bpp.lz" +VoltorbFrontpic: INCBIN "gfx/pokemon/voltorb/front.animated.2bpp.lz" +LugiaBackpic: INCBIN "gfx/pokemon/lugia/back.2bpp.lz" +PrycePic: INCBIN "gfx/trainers/pryce.2bpp.lz" +BrockPic: INCBIN "gfx/trainers/brock.2bpp.lz" +UnownGFrontpic: INCBIN "gfx/pokemon/unown_g/front.animated.2bpp.lz" +ArbokBackpic: INCBIN "gfx/pokemon/arbok/back.2bpp.lz" +PolitoedBackpic: INCBIN "gfx/pokemon/politoed/back.2bpp.lz" +DragoniteBackpic: INCBIN "gfx/pokemon/dragonite/back.2bpp.lz" +HitmonleeBackpic: INCBIN "gfx/pokemon/hitmonlee/back.2bpp.lz" +NatuFrontpic: INCBIN "gfx/pokemon/natu/front.animated.2bpp.lz" +UrsaringBackpic: INCBIN "gfx/pokemon/ursaring/back.2bpp.lz" +SagePic: INCBIN "gfx/trainers/sage.2bpp.lz" +TeddiursaBackpic: INCBIN "gfx/pokemon/teddiursa/back.2bpp.lz" +PhanpyBackpic: INCBIN "gfx/pokemon/phanpy/back.2bpp.lz" +UnownVFrontpic: INCBIN "gfx/pokemon/unown_v/front.animated.2bpp.lz" +KakunaBackpic: INCBIN "gfx/pokemon/kakuna/back.2bpp.lz" +WobbuffetBackpic: INCBIN "gfx/pokemon/wobbuffet/back.2bpp.lz" +TogepiBackpic: INCBIN "gfx/pokemon/togepi/back.2bpp.lz" +CrobatBackpic: INCBIN "gfx/pokemon/crobat/back.2bpp.lz" +BlisseyBackpic: INCBIN "gfx/pokemon/blissey/back.2bpp.lz" +AmpharosBackpic: INCBIN "gfx/pokemon/ampharos/back.2bpp.lz" +IgglybuffBackpic: INCBIN "gfx/pokemon/igglybuff/back.2bpp.lz" +AzumarillBackpic: INCBIN "gfx/pokemon/azumarill/back.2bpp.lz" +OctilleryBackpic: INCBIN "gfx/pokemon/octillery/back.2bpp.lz" +UnownSFrontpic: INCBIN "gfx/pokemon/unown_s/front.animated.2bpp.lz" +HorseaBackpic: INCBIN "gfx/pokemon/horsea/back.2bpp.lz" +SentretBackpic: INCBIN "gfx/pokemon/sentret/back.2bpp.lz" +UnownOFrontpic: INCBIN "gfx/pokemon/unown_o/front.animated.2bpp.lz" +UnownTFrontpic: INCBIN "gfx/pokemon/unown_t/front.animated.2bpp.lz" +WigglytuffBackpic: INCBIN "gfx/pokemon/wigglytuff/back.2bpp.lz" +ArticunoBackpic: INCBIN "gfx/pokemon/articuno/back.2bpp.lz" +DittoBackpic: INCBIN "gfx/pokemon/ditto/back.2bpp.lz" +WeedleBackpic: INCBIN "gfx/pokemon/weedle/back.2bpp.lz" +UnownHFrontpic: INCBIN "gfx/pokemon/unown_h/front.animated.2bpp.lz" +CleffaBackpic: INCBIN "gfx/pokemon/cleffa/back.2bpp.lz" +DrowzeeBackpic: INCBIN "gfx/pokemon/drowzee/back.2bpp.lz" +GastlyBackpic: INCBIN "gfx/pokemon/gastly/back.2bpp.lz" +FearowBackpic: INCBIN "gfx/pokemon/fearow/back.2bpp.lz" +MarillBackpic: INCBIN "gfx/pokemon/marill/back.2bpp.lz" +DratiniBackpic: INCBIN "gfx/pokemon/dratini/back.2bpp.lz" +ElectrodeBackpic: INCBIN "gfx/pokemon/electrode/back.2bpp.lz" +SkarmoryBackpic: INCBIN "gfx/pokemon/skarmory/back.2bpp.lz" +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" + + +SECTION "Pics 18", ROMX + +SpinarakBackpic: INCBIN "gfx/pokemon/spinarak/back.2bpp.lz" +RaikouBackpic: INCBIN "gfx/pokemon/raikou/back.2bpp.lz" +UnownKFrontpic: INCBIN "gfx/pokemon/unown_k/front.animated.2bpp.lz" +HoundourBackpic: INCBIN "gfx/pokemon/houndour/back.2bpp.lz" +PoliwagBackpic: INCBIN "gfx/pokemon/poliwag/back.2bpp.lz" +SquirtleBackpic: INCBIN "gfx/pokemon/squirtle/back.2bpp.lz" +ShuckleBackpic: INCBIN "gfx/pokemon/shuckle/back.2bpp.lz" +DewgongBackpic: INCBIN "gfx/pokemon/dewgong/back.2bpp.lz" +UnownBFrontpic: INCBIN "gfx/pokemon/unown_b/front.animated.2bpp.lz" +SlowpokeBackpic: INCBIN "gfx/pokemon/slowpoke/back.2bpp.lz" +DunsparceBackpic: INCBIN "gfx/pokemon/dunsparce/back.2bpp.lz" +DonphanBackpic: INCBIN "gfx/pokemon/donphan/back.2bpp.lz" +WooperBackpic: INCBIN "gfx/pokemon/wooper/back.2bpp.lz" +TaurosBackpic: INCBIN "gfx/pokemon/tauros/back.2bpp.lz" +UnownXFrontpic: INCBIN "gfx/pokemon/unown_x/front.animated.2bpp.lz" +UnownNFrontpic: INCBIN "gfx/pokemon/unown_n/front.animated.2bpp.lz" +TangelaBackpic: INCBIN "gfx/pokemon/tangela/back.2bpp.lz" +VoltorbBackpic: INCBIN "gfx/pokemon/voltorb/back.2bpp.lz" +UnownJFrontpic: INCBIN "gfx/pokemon/unown_j/front.animated.2bpp.lz" +MantineBackpic: INCBIN "gfx/pokemon/mantine/back.2bpp.lz" +UnownLFrontpic: INCBIN "gfx/pokemon/unown_l/front.animated.2bpp.lz" +PiloswineBackpic: INCBIN "gfx/pokemon/piloswine/back.2bpp.lz" +UnownMFrontpic: INCBIN "gfx/pokemon/unown_m/front.animated.2bpp.lz" +UnownFFrontpic: INCBIN "gfx/pokemon/unown_f/front.animated.2bpp.lz" +NatuBackpic: INCBIN "gfx/pokemon/natu/back.2bpp.lz" +UnownAFrontpic: INCBIN "gfx/pokemon/unown_a/front.animated.2bpp.lz" +GolemBackpic: INCBIN "gfx/pokemon/golem/back.2bpp.lz" +UnownUFrontpic: INCBIN "gfx/pokemon/unown_u/front.animated.2bpp.lz" +DiglettBackpic: INCBIN "gfx/pokemon/diglett/back.2bpp.lz" +UnownQFrontpic: INCBIN "gfx/pokemon/unown_q/front.animated.2bpp.lz" +UnownPFrontpic: INCBIN "gfx/pokemon/unown_p/front.animated.2bpp.lz" +UnownCBackpic: INCBIN "gfx/pokemon/unown_c/back.2bpp.lz" +JynxBackpic: INCBIN "gfx/pokemon/jynx/back.2bpp.lz" +GolbatBackpic: INCBIN "gfx/pokemon/golbat/back.2bpp.lz" +UnownYFrontpic: INCBIN "gfx/pokemon/unown_y/front.animated.2bpp.lz" +UnownGBackpic: INCBIN "gfx/pokemon/unown_g/back.2bpp.lz" +UnownIFrontpic: INCBIN "gfx/pokemon/unown_i/front.animated.2bpp.lz" +UnownVBackpic: INCBIN "gfx/pokemon/unown_v/back.2bpp.lz" +ForretressBackpic: INCBIN "gfx/pokemon/forretress/back.2bpp.lz" +UnownSBackpic: INCBIN "gfx/pokemon/unown_s/back.2bpp.lz" +UnownRFrontpic: INCBIN "gfx/pokemon/unown_r/front.animated.2bpp.lz" +UnownEBackpic: INCBIN "gfx/pokemon/unown_e/back.2bpp.lz" +UnownJBackpic: INCBIN "gfx/pokemon/unown_j/back.2bpp.lz" +UnownBBackpic: INCBIN "gfx/pokemon/unown_b/back.2bpp.lz" +UnownOBackpic: INCBIN "gfx/pokemon/unown_o/back.2bpp.lz" +UnownZBackpic: INCBIN "gfx/pokemon/unown_z/back.2bpp.lz" +UnownWBackpic: INCBIN "gfx/pokemon/unown_w/back.2bpp.lz" +UnownNBackpic: INCBIN "gfx/pokemon/unown_n/back.2bpp.lz" +UnownABackpic: INCBIN "gfx/pokemon/unown_a/back.2bpp.lz" +UnownMBackpic: INCBIN "gfx/pokemon/unown_m/back.2bpp.lz" +UnownKBackpic: INCBIN "gfx/pokemon/unown_k/back.2bpp.lz" +UnownTBackpic: INCBIN "gfx/pokemon/unown_t/back.2bpp.lz" +UnownXBackpic: INCBIN "gfx/pokemon/unown_x/back.2bpp.lz" +UnownLBackpic: INCBIN "gfx/pokemon/unown_l/back.2bpp.lz" +UnownUBackpic: INCBIN "gfx/pokemon/unown_u/back.2bpp.lz" +UnownQBackpic: INCBIN "gfx/pokemon/unown_q/back.2bpp.lz" +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" + + +SECTION "Pics 19", ROMX + +; Seems to be an accidental copy of the previous bank + +INCBIN "gfx/pokemon/spinarak/back.2bpp.lz" +INCBIN "gfx/pokemon/raikou/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_k/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/houndour/back.2bpp.lz" +INCBIN "gfx/pokemon/poliwag/back.2bpp.lz" +INCBIN "gfx/pokemon/squirtle/back.2bpp.lz" +INCBIN "gfx/pokemon/shuckle/back.2bpp.lz" +INCBIN "gfx/pokemon/dewgong/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_b/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/slowpoke/back.2bpp.lz" +INCBIN "gfx/pokemon/dunsparce/back.2bpp.lz" +INCBIN "gfx/pokemon/donphan/back.2bpp.lz" +INCBIN "gfx/pokemon/wooper/back.2bpp.lz" +INCBIN "gfx/pokemon/tauros/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_x/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/unown_n/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/tangela/back.2bpp.lz" +INCBIN "gfx/pokemon/voltorb/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_j/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/mantine/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_l/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/piloswine/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_m/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/unown_f/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/natu/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_a/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/golem/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_u/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/diglett/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_q/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/unown_p/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/unown_c/back.2bpp.lz" +INCBIN "gfx/pokemon/jynx/back.2bpp.lz" +INCBIN "gfx/pokemon/golbat/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_y/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/unown_g/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_i/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/unown_v/back.2bpp.lz" +INCBIN "gfx/pokemon/forretress/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_s/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_r/front.animated.2bpp.lz" +INCBIN "gfx/pokemon/unown_e/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_j/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_b/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_o/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_z/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_w/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_n/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_a/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_m/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_k/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_t/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_x/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_l/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_u/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_q/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_y/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_p/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_i/back.2bpp.lz" +INCBIN "gfx/pokemon/unown_r/back.2bpp.lz" diff --git a/gfx/player/chris.png b/gfx/player/chris.png new file mode 100644 index 0000000000000000000000000000000000000000..19869944e6bbb0bf34e9e157fc2aa03580c97e2e GIT binary patch literal 417 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsTCI$uuhU2j{$qWpP8J;eVAr-emFQ4@~>>$AY zf!Flg4qFrPz^V_dTuJ_iz6Ci7Y@78=!?q$Y-a$a|g>c2En1C0@l`FWTrUd1z=y(uZ z;@hMke4Oj#JC*4llqcJ7Hs(Bh=;)^E%gcH;>T;w@6gxF$?sU)*oTlTIVVrVj!^xnq zOCf7ygw@1W8!Y^}rK;9@k=X0S$J9LM*_rfZPPSJ*_58fz+sLo)UNR>72H9=0Qv4w9 zcrVnb#cZMUO6JQc0e3eG#Pr^&;1hACvNn7 zI!j+{EDuwb#=R2-E{z)*ST-r|cW8a^f7U}62~LBMI+bT__ss(f+`4|txV3Gz_F-51 zxwXF{$s+FC`x%ek7Ps`zOsnNy_-@uzPnK+Kty{D_6%Q~loCIC<^wwnL| literal 0 HcmV?d00001 diff --git a/gfx/player/chris_back.png b/gfx/player/chris_back.png new file mode 100644 index 0000000000000000000000000000000000000000..7bf3c50dbd3f4312dc6c1a6525cd856b23d58beb GIT binary patch literal 458 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-CI$uu28)~felajGPV{tf45_%4dvU+_VFwZR z58~dUN)fV~N;LJ9Vr61vxI7&TbF?cLy(@cRe=#e3A)i$VcarP*h3ozuxYF?;B_<|j zm(|oQqSh7PDxb$5J@~k-ref#u+WU-uBR}x-DSYi-p|jmhMs3BagBKg0%ybiHyPLNZUJ%5yre@h_Ov6nM}x zJew&tye9gW)x<`D^K3fqs~Ddp`}@{rUrb!%yY0|t{##rVPq>L_?O{IiYw@Y+9bs~F z6&bEQsZww|opN@clL^bQbIz?FuI^3}wGI58{C(QZtZQ@jP5QU8uGNm0xhrQ^@Q*zU zo=2UU=IQ*Z-@g*$DKF!H2y4R+kI@Q#o_+7rISOa zt;ykAv3>H<+GmAlR2t---}$;oQg|&(lT}i!z4?rD9rrJ(cN~3twXs&7DZMo2=9=^F zF5OJLIthh|I)Yyp9_QPbko#l3oC?df3%$GRRw^ldIp_64D!Vs$;ydYCuIX{o_Ii?_ ONb+>`b6Mw<&;$UE7tUz_ literal 0 HcmV?d00001 diff --git a/gfx/player/kris.png b/gfx/player/kris.png new file mode 100644 index 0000000000000000000000000000000000000000..7a855e676ed206efbb851fcbf7daba8420820f10 GIT binary patch literal 418 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsTCI$uuhU2j{$qWpPnVv3=Ar-euFYoncHWXp_ zFh$FPLvYCsj`r@1<%?sNm^@kXs%qM{ZjN=gE;i{MEiTl)^Xx&;ZjakX>lK&Uvb4`@ z7Ugb@4i#88XTjmA8cFf@c+)uTKYjf4Nk~b#_s`e1)|aQP&-}hEFnNk*IM3&!P0KCr z-Ki}RoxAn$BlV<^LE|`lO|S4#)&K|@%ppY zGfa`ujOTWOV|of;Cs6IxvX@<%p*+hwuhK~T(`IU<*m94{<%m1Zd{5Hr6kbL;3$$Cx7zmnh^4$jHdP%L=^W zdSNYxsCwar&5ssoo}a!XjM?&@yWabI)$Bj=8>?7i>odMh+jVP)@S-DihI%bCavg(o z!lE+*V#;!xXB}H~koRGRb-Ka2gOSp|`Oa&+NXc&gXm)C8t6%ivsq19)M83%GR6X*k zjN3xzn@i0()0OH!XPtgt&igCg<;Kh%rZX(HRpkB4cxpP1&GY-j#*p~>j`0M>h~8Pp zP5z{BP&Qq^PGK&KN>Kc~b73d>9F=apzWP_fNk-{{?76DNA!Zg+)+itOZNc8a*wMzY zBTDSY1ix;lIgjS}b~F_@x2QBTT)I3lxk^9%V)>ykhSwKPPCl@LDMv;8Z-AHs|Gz~t z+#2iGvY(%}ip6_-z|m)HUlV^xe*FA>|NcNZgDD~}70upl?0gbD^+9qwUtZv@<*!<9 zox1!^W0ml$c^Au8$nfkFe9iMaD3Vpmb@ItaU(_DXRok{`!eS@=`yY%?JeXmh(LCqV rhlNRxMZbwW{QH&H{14B)4X+>ZoAMWJ(L2dr35q^XS3j3^P694#zuc~FeuUCSA#EdB$mY&-Zx>UeUSm4qu7N0JsgPe}P zt_2_ZF5PV7^tpp4;F)0m``?K&jMMtgdT+CSb%`S?C^7iZSEUP6d?OFfnkDMM*jj9Q zl literal 0 HcmV?d00001 diff --git a/gfx/pokedex/pokedex_sgb.png b/gfx/pokedex/pokedex_sgb.png new file mode 100644 index 0000000000000000000000000000000000000000..bbacb114d217081a9d86f6155405e462063b8cdc GIT binary patch literal 429 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU{GLUU|?X_`qMmufq}8a)5S5Q;?~qjzFCJ2 z1X|f!%8fR^vSm@5{b+$UOVmVP{)y6GoMOLlFfZEe5cXDULTxzH<+*1|+=}LyoaL8% zJip!UUiBfSh7I$t`s6i4ip`ne%rMvZz-MQ+iUKxOuqoY(IQPX}QDoL+UTd|+b!+Tpg@enPj{OR23|o65r9CBC z{OH5qy3DGFo^~)z&=u@|zdNyqLI3tS)!n@sy%Q#R+?HC`&v3gcT3N?che2zFlf!{M z87BhLz8wfYbgEv4p)#4Rj9L7^%u^{1mR)5JqUN)3BwAX{SanuVvBYk6z%OPAW49CQ zv%F4nK6v@SKzl=`SHC9H^5WK?)>SgPeGE6s?X6hXNIxxfGAPQFx0_YX7}l_!;g)-O j5r2V7KI5~nBb5)tR~YvEEOO6b0mXx-tDnm{r-UW|xO=fu literal 0 HcmV?d00001 diff --git a/gfx/pokedex/question_mark.pal b/gfx/pokedex/question_mark.pal new file mode 100644 index 0000000..76519ba --- /dev/null +++ b/gfx/pokedex/question_mark.pal @@ -0,0 +1,4 @@ + RGB 11, 23, 00 + RGB 07, 17, 00 + RGB 06, 16, 03 + RGB 05, 12, 01 diff --git a/gfx/pokedex/question_mark.png b/gfx/pokedex/question_mark.png new file mode 100644 index 0000000000000000000000000000000000000000..e2b681c73cd9dfbd4194c07be7911c1838a1f48c GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsTCI$uuhU2j{$qWn(b)GJcAr-fdPCUqYz<|T` z>jl9(>dF-t{)T7HmUzUk62NiA`N_lZKW#6r7x*9e*Rt%EwCanjjKvcECDZHzVdAjlHx*GpL*wX*ik)5S5Q;#Tqxeiokp z_8*u#gS#7Bn2y)C@vmY0!=vuxJXO-qz(B)z&Z~f|G>a`+p~i?kI$1?Y}eNI%lHo`@78vyuNURhLEaktajUdvH!p)B zkJCh(2KS`W{wIt&6I(>eeKqE_{9uq#SmNZx>s7pPt@*xr>2@Ek7Id8R3kmrnwvEp( Zl`-{)+v=9}#lavmJzf1=);T3K0RV?(CIA2c literal 0 HcmV?d00001 diff --git a/gfx/pokegear/johto.bin b/gfx/pokegear/johto.bin new file mode 100644 index 0000000000000000000000000000000000000000..faa5efe7094faa4219e736bb01ff0ec394839073 GIT binary patch literal 361 zcmZQ$#{lADBCLXNpsXSyA|fItCL+SZ!U7dnR8)qFiHL}(f|V-qF$fAn)QO0Qf`tSb zr39II!D1>ZQc_Y+2tBaRF(pnE2SzZC?>|p#3v!a1+qmE zq)redCdkDpApy2of(zm(F)=|U2?++U7?T9IprE3XgqWC;goK0uSWHPmf*ZsG*&!jJ e0P+Hl1QbBTK$<{iNJwjFYH5q9VFW3=`hNiPpd8)+ literal 0 HcmV?d00001 diff --git a/gfx/pokegear/kanto.bin b/gfx/pokegear/kanto.bin new file mode 100644 index 0000000000000000000000000000000000000000..8a08cd8267d48e7795ac91e39c51da58ff9faaf7 GIT binary patch literal 361 zcmZQ$#{lADB1k|*RZvMnLJUbvMO6?age)d1C@3f-ApugSs>}n?Eh;D_CB+056BLwE zRso5s3QCEv3NkWDh=~ab@(2oYNlEcYNpVR@N%06WfyAW1N>w2wkD!p4m=qWYf)s(& zaq%lb)o}?*DJlv|2?`2IDS^$CQV^69l#-C(2C0*R*dZk$02Y&w5D*lU5|R)T9@65|R>95a$Uhg6x2bNhl~vDJm)|f&HeV ZtEVr+#lgqH!3ma@kPuVD2vTCJK+YV3%jMisvPf| z`{RTqOYP71Qy6x+KFBJqNs1D(bm0)`f2EVr@z8}&;qhh;k1dkfPNMNauO!r6`R*>= z{)UBxao&T<485b43IWIX@2j4$aJ~0D^PolBkK0?_n2tD{_`~vOQK_4UVJ7>Mz?GMt z{#Ye`{mSw3>aaEcoGflMZ_U4E^y7*DrEO*-~>kY~cYm3S* zHf}W)U%(T7N_0+8jC6anDf72gEK{og8>)&KbMB50ZR6YV^$g$Bf33oKAyNkw=7^q3 zXX9TjoDukQ+A6Ov559H^yD5b5NWGK0V6Of}`9fpr=cnz0k;PrI%b6Mw<&;$S`@}#8z literal 0 HcmV?d00001 diff --git a/gfx/pokegear/pokegear_f.pal b/gfx/pokegear/pokegear_f.pal new file mode 100644 index 0000000..78f48fb --- /dev/null +++ b/gfx/pokegear/pokegear_f.pal @@ -0,0 +1,30 @@ +; border + RGB 28, 31, 20 + RGB 21, 21, 21 + RGB 13, 13, 13 + RGB 00, 00, 00 +; earth + RGB 28, 31, 20 + RGB 00, 31, 00 + RGB 00, 00, 31 + RGB 00, 00, 00 +; mountain + RGB 28, 31, 20 + RGB 00, 31, 00 + RGB 15, 07, 00 + RGB 00, 00, 00 +; city (girl) + RGB 28, 31, 20 + RGB 10, 18, 31 + RGB 13, 06, 31 + RGB 00, 00, 00 +; point of interest + RGB 28, 31, 20 + RGB 00, 31, 00 + RGB 00, 00, 31 + RGB 31, 00, 00 +; mountain point of interest + RGB 28, 31, 20 + RGB 00, 31, 00 + RGB 15, 07, 00 + RGB 31, 00, 00 diff --git a/gfx/pokegear/pokegear_sprites.png b/gfx/pokegear/pokegear_sprites.png new file mode 100644 index 0000000000000000000000000000000000000000..746d4b4862ea90742c6294c6f4de259ac92ff1d1 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznV9;P!msS7+a?&Lz2M0F(A94gk1P*e{Y%o$!1ROiYX)KYAODRF4CE6U1pfU0Uw^>s m4?7b_V=(8TDSs78TR0hxOe~+>VZgNmWWJ}XpUXO@geCyUFfOwI literal 0 HcmV?d00001 diff --git a/gfx/pokegear/radio.tilemap.rle b/gfx/pokegear/radio.tilemap.rle new file mode 100644 index 0000000..b181ed7 --- /dev/null +++ b/gfx/pokegear/radio.tilemap.rle @@ -0,0 +1,5 @@ +O +OO7O89O:OHJ; +LNO +LN6XYZ[\]5LN& +'LNMLNMLMLMLMLNM \ No newline at end of file diff --git a/gfx/pokegear/town_map.png b/gfx/pokegear/town_map.png new file mode 100644 index 0000000000000000000000000000000000000000..3124c6bbd1544ba18ba38702661a88fa141768e4 GIT binary patch literal 441 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qV31&9U|?W~y|8Hp0|R4&r;B4q#jV^)hS`T4 zM2^SvMD{s}8JFd>`>=+0Z@b%cxbb_ApmW-9RjqTe+_F=ZTE1&eS<~wGQ;xCFd&j-* zgB6dIpS0fT|NZ~{UHO30-HuMPf7W;Z$vInoF1cSij#_{JTpz{Yg!k!_4_2 zITACtK3Cm5o0agIZ|=g)FB(z~WHTl+MlSlWRDJK%hK@$lYpN;@8ygaT?Xj7e5*xME zq0f?O#k-d?6q#R2COk_Jo6P)bmsF>I+Ct7G)}F$@+yHbNynNZ zjkMZVA8?W4HcRmKN$uI}@S1<^>eUSsM5mc0cypXA-oQ{D;Pk3{m&DcyOLyN*FL*3| zbK~vlU;To9|BVZKvstNm*X`@R=?(YmS2VUTH~S_CNLCa`N_?rlqxkHEX+yKcAM3Xl yJVIoma-5@idUh@{QIpiEJz@Fn#<72&X8dpX*m<+=&!ydt<7|9p-_vJ*&! z`y`zn1_lO}k|4j}|NsC0&((0NWME*7@pN$vskrras`n%oMGlwNJ^$yr*L8K7CLYl_ zelH~3Zh=P2wSU)NC)vD;X5K$zA~O@8H)XH(OW^|#ABZ1FvUs{(#r4YWKhwikaMW06*iK=2k^GnQ!1@Er zyTcdMurlyFh#MDrb}S7(x5WP8g6{S^-?l%9J^$uY!xO2Sk!lCF#^uM(d3vuQK)&H^ zYrPM9acG0F49mJ-M@7_`%o$842>ALcgE$wx@wIXFN9n2iXUfweCI*>JMZS3s0rt*a< z(!~lD*RKhvbbHtq((~_jQ`HRZUXZd*vv+`CNc-Y)s@bdPaxsRhx8>dCt yhE|#US}O4P?d6IsIxp>R&zW_yOaHm&55|T<4llJ=6>JO)3=E#GelF{r5}E)NSHS)N literal 0 HcmV?d00001 diff --git a/gfx/pokemon/abra/front.png b/gfx/pokemon/abra/front.png new file mode 100644 index 0000000000000000000000000000000000000000..cd3cbd7048e141541a9a9d4b29c7b9b6cfa92f72 GIT binary patch literal 674 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|Ns9#pCgg% z1XAHXNvDT_fq|tY$S?T+|NsAUHQXv07?>PAT^vIyZoQomUGzkO$93Ynf8T9hFmf<1 zvrk*~jCszgTs8XLcWax|~(%Utq-kBL;fQ9M805ZP%N6>7ihN;Z)B+dF7i) zi$&H(Oj@cX(^54fZ*riSl`T`?h0u$;ig^{g^P={=TD9g#bIaMy0ZEDM9o&|YyR`qL zhn)+$wl&ae(Xzi6r<^%!U9qEcXUfu=Yep}`o?iUval!TP=Vwa#PDeZ?5AU!*08P3TT+yw8=K%|*%3PH$Dtcr9XWcugMDXwt!iD`c9;9q+yK$4 zsX_-VwjFH{IIroo!tiQYWT`XnXO6AUZtmCh%vrZ%`{IvhZ8s`PXG~eCx@yZcNBvsi zZKu|l-w_sVeKoB*fi3p>rH+X6WfGd+=NG-2By?@U=ec}Rvsz|czM1#d<7;*6*y%VFpm*bMt<7KW9#La#R!p z1A~;@|Nqa`aI0isV6^pgaSW-r^>*q(p~DIsF0Ft6*RNv=I&kDj za(Y(vhPkyjLoaOkCU0*q(O$L4n5o2PPF2JC&gm;9enjn2aADn^!C;@qzj?%0G?`jP$ zKfkpov3&AJrw_J9jGC{xg|GW-C{2Dbr7#KWV{an^LB{Ts595}j* literal 0 HcmV?d00001 diff --git a/gfx/pokemon/aerodactyl/front.png b/gfx/pokemon/aerodactyl/front.png new file mode 100644 index 0000000000000000000000000000000000000000..3fdf99f6116988f4efc46db9d919b5675bd268fb GIT binary patch literal 1159 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|Ns9vbE=c0 zq8Jz$q~tCKFfcH%lmz(&|NsC0f3AjGB?AMCnx~6nNX4zUvtB3NR^VxMeE#=-T z#N>ZD*`C`}*8YuTYgrPk%EEN$WOGuFyN1xT3&N9L7;7H(PH{@ye{12905)z<#(OJm zQ#W6lRN$~XqG<|KsKMkD#i4rf*Es(KE+`S2FSF`siH;;|{iFHG0p3Y&zJX6KZT);a zMQg86d|2Go3Nu&EkQJ;)o9^V-zE~U7vF93JIGbdz_w%WTf4y#deb6R(=2eej&;1p1ai|#EVnsGx*0FD?ezFJ*Qw{^E&h84qqiB~ zI5TU4%&)4 z=b2kv1?KLLusCGpImI-`adZ3eJBL?929{4Vt?;%}brDss+#GgkZr)=N9`4S$JV#;@ z^fo=epu{S8R#>I_;5=@XXIZ6NILo{o1tGKj!gwHZ#vi$BMX{)5BB!JD#_2UQwRG zWqhfLd97o#r*2PLx^|t?!W%{N)GDWly!erzTODwU_Y9yzm={jBMH>$!{H zJ*avhIdzWJtG*MSe>u-evh{vg5woQ!Aym`zWBL-FiCQ~XZE!jq*?2}+w_mjLl<6+! zwfA=|kus@XW?l3$NVv~^QNi4IC+2zgo2{*zU+O+RSbfs!gEosI%S(1vC}|eYd#6wm zqhxr0C+7F+MyAAd&8SFLK-;jEnfPcA%p|FSRQb=CG|hn&i{R2^7(c zCGP1PABU7DEVTZ#L~I?eYW}Xp_cH%~?=HWqSfkHcR?;5vM)=^gcLJrY?{_utaI(K3 zYh=&9%h~%W^WDbP*6ZH=c)IKHH|xCpkH1;hCG2k&{+PL+x&3cnY`~tqFUucz?^iaF z+4t4DM{xhmcjX;BFI@Tj`!C;a&$W)QSvE+x_PT78!$0<2kL%9A0;8;paeMD?-UUt<7|9)?BvSKj< z1H;3oYrPp57+6Yz{DS}g|NlQ%!>y8mfzi^_#WAGf*43$wLWdPNTwCk^TbpZWDa^9E z?0a&V;eSq!8$th${D|teW@vrS@j;YZRWerS@akBvTq*1<-LCylG* z?=yZ)WcV@T?Dv&vyIYq(FJHcn+ic}k=Ly=ISS%Qy_1s`uc~5Ws@gKqrdl>J@wlx2h zJRljcFQEP0A>Dur{i|%(|C-3L&4y)#F=N-S^K9_xO)v~7x ze%)C8?$Haa*9n@Y2J5EGTak1ASNG(g>&1qAY#xtK7-cc_PYp8-m>eAWFDdQRD*4iB zKc4V%8gMYbICLqv*3XcEt1U&TqU7tUc*e3LtK&F>lNUd&dFPWJz4c-p!_hTdebXme SpI~5MVDNPHb6Mw<&;$VI#kB_j literal 0 HcmV?d00001 diff --git a/gfx/pokemon/aipom/front.png b/gfx/pokemon/aipom/front.png new file mode 100644 index 0000000000000000000000000000000000000000..72cc3b7183b4e697ec29c30654073b7789e46ba1 GIT binary patch literal 664 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsBL->kX;dh(*4|XF5I@N;*j1(Ijcr4%q2S&}t0sy> z{Im<(!)RJJS0JTd&rn=_PSs&29_L$=N&+8QABt+Qdv*Wivjx|TT(+g=t#DX(pecm? zj#KO-znjOnH?5r9YdI~l&VX@Y`>WI2wIttLsJ92m$Q5uaw^(pQbuZ+I+hUOZC~|YN zcEH)d3obDo=VfnCm?N^T@p_6$*42FW2_N?`$(rkxsJ=Tfb6(6M;XU;M8`xK`bto06 z)8ABPv3Qe1!jc1jPiY?gIj>4G<=lii*@*}2ato*Mf7p_tbVdKk+1U++i8+Ew-;Ui8 zbn}jRaOF`|s!{ZYj-;rbK%+Qq&8vr+^}F87SFAf1Gxuk$)#KKGi_fJf{$5}lm3`#P zc`M-^=dBi()h#vVezm~(*@de!R~v_?uRHfAeeTQ?#TRB;nzPT1%-r}oeICoLug2O( zxBoqJWVf^ZVOL}Rzda$Jqh^->t<7|9p-_vJ*&! z`y`zn1_lO}k|4j}|NsC0&((0NWME+2?CIhdQgQ3()RRRjiaah8KmGrIb1kc`$J7Q zhA7Vn&g<_PQfHozUh-UwgX!=#Gm$rOuc}`(|KPAw))mbEYF7PZ>(lx(*OZuD_H4V7 z{W>S%k=L6-gY$VYoxi7Zo|too!!K#0{;N0LwoWIC#D5!n^}b-Y`$e)}U8Cu%XYFqz zJ2ockXg|?!5YnCgVcrLQRX^_?KYoUHu3$XN6nyHUmG!iT31~>t$XA`$`&osnmNn^_JOPhCQEdGm9#QO?G(ato)~%_0!T=1{djt)lIi6 zrkLtDyy3L5>EM@Ic27U;VsypP%f%;)cUsoGohG#T$XkzFam)WLGvHfa6Z7HD-AKms nwQUQx@BT46?z^JwUj|tv&a=Y5Sh^S(7#KWV{an^LB{Ts5<-qBf literal 0 HcmV?d00001 diff --git a/gfx/pokemon/alakazam/front.png b/gfx/pokemon/alakazam/front.png new file mode 100644 index 0000000000000000000000000000000000000000..958aa11adc32418424886e85a6dd6e9d4fb6b23d GIT binary patch literal 1482 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@|NsBb=SU}FcOQJX57+{1fJ6dct|dUxVt*LoPS{PvtBLpL)Lc)=r}e6*ZOZ=}V>fzUKN`-9ORH zzf!B*$XfbRV&GGYHJoXgN#bF9)D2O)A-$^f@65e=VYX*po9PFHC+OwR*uQV1#9zMe*UU?EZ*e{^$=T91 zKRRsX-PLQiu|;`z^&iT5@BTH^NbZ^EnzWf0jxua4^IyKF!vFT+%(wopcNA>i^6EfG z`JoWrkhv*YVb)d+Qw1`%O<(n}R@3|A*;}vec6Lk7Z9O$-$#85(!_=B##%k4!LfHu8=?xVWwT#UYo1>fQ45XIdud$4vPwE%>K@9rwE#YriPJ zdr^8{?0Vtx)^*SM)?HK9&Q{L3b1~qJ!}A@7Sq;3~ZJzRd`TgMDEv|BpfP*Wnk1X7D zXpZJb))eLPFSn=f{CW3B$;7$NJLg)zcUbPcQ~%D}9ghW`#@+eoX6d8+TD*KuAm8Q_ zRR?8lPn}hIEm?k|&xiNvh2xK;-(_eVZx)a(7q}g}O;q4S)8@3_VyA_z-WB{v5cX6) z@v@jR!0EVbi;+u?h(X@-M=h_)st?NQZaOAgz9RZ@)GNdCEhla*dq2fGCZ+bctlp+; z$L1BecdwcGe#c_hYv1oA?(%+@G4ZQv`IZW^yM^ujYu@iz+`VS~j>GS_m)|jb_u=>* z!}@!L2V~#3%PzlTc;+Q6Ib4wQ2u+Me-vc85rRwccy z=D5|O|L4lrDF2Gx=e+%Exl8?o_ZJi@dtTU9ulX$dD`fIX+uRbqH`@0ZwHl2cAC-&$ z$tRxedn0-7`xT6~%6nUj-)*QlJ|j`{O`~b~loijXHa7f?D{{YU$S!|AYft!{hc}qZ z?*z_?=PdKzx!7hJ!{aV%9SOISY;&Gl+ibp5;C@`EX8QXC{XGx*`XbluIBa-YwtUNs z|C6j`HpdjT8*%kbL(U5z6WJNu)f>+(VVMIAfgXOgx)GRe$sL^Yq`vv z%~6HN|IN8N$NJHn&^epCio*)eWliJlDh>ndHNJ27td{??>`Q}u!RKrErWBsbN-g{U z&2shon&ahRY17|Fq^9osEZbci*8a2ayXET2eaV07jz5`mRq4KA-TvgFb6FGLOYFb@ z(Jo!|XWxl(mwn2gWGBAoc!z*Lyzdl#_}j-?E>p8V`Jn9Y_u%*f#Tf+mT(=KmaLkBy T)_KCfz`)??>gTe~DWM4f`Z3gc literal 0 HcmV?d00001 diff --git a/gfx/pokemon/alakazam/shiny.pal b/gfx/pokemon/alakazam/shiny.pal new file mode 100644 index 0000000..2e52d97 --- /dev/null +++ b/gfx/pokemon/alakazam/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 19, 03 + RGB 21, 02, 21 + diff --git a/gfx/pokemon/ampharos/anim.asm b/gfx/pokemon/ampharos/anim.asm new file mode 100644 index 0000000..3e09e9b --- /dev/null +++ b/gfx/pokemon/ampharos/anim.asm @@ -0,0 +1,9 @@ + frame 1, 10 + frame 2, 08 + setrepeat 7 + frame 2, 02 + frame 3, 02 + dorepeat 3 + frame 1, 06 + frame 4, 06 + endanim diff --git a/gfx/pokemon/ampharos/anim_idle.asm b/gfx/pokemon/ampharos/anim_idle.asm new file mode 100644 index 0000000..087f27b --- /dev/null +++ b/gfx/pokemon/ampharos/anim_idle.asm @@ -0,0 +1,6 @@ + frame 4, 10 + setrepeat 2 + frame 5, 06 + frame 6, 06 + dorepeat 2 + endanim diff --git a/gfx/pokemon/ampharos/back.png b/gfx/pokemon/ampharos/back.png new file mode 100644 index 0000000000000000000000000000000000000000..0e1075491d434e5ea87604a1b53098c1967149c3 GIT binary patch literal 394 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>pcBz}g@V1_p*p zo0Xy%7#LVeg8YI(!nqo5l?)7wnw~C>Ar-fdh6aiqR^VuU@~>R3DQb7u>grl)`&`qB zEHc7B{VzQF;lx>eLrKV{=DH_O!~(;4#a;;lp~tg0s{=cOg_^_^LmM9pa$7pS-J>=` z>daKmW}Y95mZhB1u{d~Td%wn%>Vu2cZIkBOxJP~-F3pLvlXI$GzPpsy32#P@h|(sA1vlFINPF-+8vGI%A uj7*=^B0S&bebrOxO+NU!Y5uM{#$S!B3zx22yo-T>fx*+&&t;ucLK6VmCaFdM literal 0 HcmV?d00001 diff --git a/gfx/pokemon/ampharos/front.png b/gfx/pokemon/ampharos/front.png new file mode 100644 index 0000000000000000000000000000000000000000..0cf155177e6f2650f834d4047bfea68af423c0ef GIT binary patch literal 1141 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dVC>*vW?*1YetP*W0|Nt3fKQ0)e-IE@8^poD zz;J1^QWOIN14~JeUoc2GSHrE6fq_ND)5S5Q;?~>Qw~Ov7@VHL=^8bH~a^ue1la^mL zoBMY8oFliHN*rGcEHBv?VNtuwrN!QJ^FeRzpNxizD?M5|T$+-7C(YO#B>zaZ(rj{m zc;dDk`MHx*)TCF>+I_~FZEn8eY~`0RUnl#QYregt`HWp<`Gi+X;|gDX%2^TnOzQe9 zwVl19OV3N|xK`L6ymnmPGPg|duI`cr2Tj)aszk9r6s^cpyzjKLgz;gnk+ssI)lO&C zxl~i+a?W{{vGLyL%s#m2;oF{fir0@umn}&vyjpp;{_c%W8zn^Q*Mz2OmMt$*yZs^0 z{`5YLk1rnR?QzXrzScnhuw!J(-IjDkU&GSdOSWC=_Ahccdnn}c{yM!((>1Mrg}iQS zvo1?4GhFR?vno~ckHyWk^FLj_7I}KtUK?qXhe8`?ONdFe{@%5V=W1Ek*|1Gw_pkQ8 z5qK4M|8-7@UgCdo!(R6jQD=75TsiTqJaN+{&9j12)Rup=R9&f)KR@*QqKhjxWrbuX zd2QFw8nthWe<|pda9)EY_SF=>y)<4s?Sn2iqZAi5<{+g)!(s4%B!lM;e zCz@II$3|$Iz4F>UTgG%}&X3jS0?#ZBbKPxujrqh~(<^a$7uI;m?$~CtaPHRi8)U+~ zO4CCkzgZUg3*TXU$57s2{V(@jhHumaYp;0e=X}`_b_MR443F;w9(+94y6@rNL$dvy zh6Tr0KV&YqC|hG&zT}JD6W#JR&$NEO`_;=7re|HizQ6e9JnJV@PiNU%eASn3lG(YY zB>epy!@|hSXj>73qM09?*Ux-^SJ8{{vCR2HnzGZcmUHPIII8?4Fhl0!IoZSa^3F+Q zKVmNDiHl)+dP4SkK=o6h%kJ+^I19gQUAcU9`?laU<(oz29zL9Dy=CIVL+dtwm}vcJ z(v9tYriZHU1}_wrQdoKS_bJ&+Eose@CRV%PhqeN5gfW=rqV{uO!PQ=|12!7scKi|zzAs-BY-jW{6t-?seC z_c`V7ZYXxQTbG@9^r%lXa?YKN3f*wz`gj z<30Qj_zKu}Jgz^)e(myJ3%eH&UyIkgVAgEmznUZ?e~MA<1LKc|&wO)0p)OJW;nRL+ zyLS(Me)oH~fp5*-SI_v&6x(+;w_oKiaM!(F`0hcV_=CRFvOM5eIv{JY?Z8IX9n5zc zzgze1nDn9U_&e{P?C%czmaT5C*uPlYEKc#>`-&%gd+s-Ww>}{Ipl|+3*^2$lcN#zU z?Jv6b@%E0xmG>S#=bKqwsbB7Mt<7KgDUzRz)uc z28KMXFFgzl3@jx6$|Noz>;a17Oz{u$7;uunKYwNU&LM;j$t`G11|Ns1~4y*5> zxv@1TXBIPUR+)I8wSvX$Mb*UOyj?A;=I(tMr5uv>CuGB#ST(uO%EQ0^?p$^HVbbZ9 ze`Xx<58canB4J0COg)F{k>?UW*qfb#O>E!(v}V7^ljTspnDh7|7v+6YPjhoPO%}aQ zek(e4Zs*H=A675$`N5*Oc)dmT8`U39E8O-i@_u07diezRfq4b*P0WAn=XzG0FwdX6 z;J)5~poD3I4Tx@%PC?{dr?}-*vW?*1YetP*W0|Nt3fKQ0)|NsA|IL+Cr z=*7Umkf-&fhk=2Cr6kBN`2YX^|8q6mDj679=Xkm}hE&{oJDaobi2;Y}!TZ>cy@mFyEXr1w5x!sBR(vr{n!*8YJY5w?Wy43Ej$gQcj7Q}YeBu%fF z5^3SH_omI4n~yarMAvyunO~mh^lckYpV>s|=DU}#oV7Wmb*sm2di)fHFM66yt8Vrt z?YweX%P>1_yV>FieJ8n}-gEfe-#$60DlcuD`B|HKbxYoP>s`}Nh4I->%-8bLTzGrU zvl+{ROoX1U_0ikX;Wo-mLrPnBN>xwLNaR{Hbak>6q3nT;0s81tg}=IJLGnDBMq9H^k}P zUH(!A**&usFWQ>Sm0&AzYhkc*RDOTivpwBMmwwVc;POhXdB*fhd2>q+C7czCU~>9@ zWm~U(I(J~IRmm2^7s9$*HPuV+2EUn^bz;)2<;fb;#Lo3tEib$D?3X~$><6n)e)_yj zJF#ionMm8GFV~j{TWRYSnmymKQsl6D)7fj*zQ}?uTzca5tqOXjHpS6DgJ$~N zc@`vms^*`}LeJF!Gv=_(o^HH2naA!JOYr7BZ3=Gk>s@a!8D(vdbe8GcNu{FRqwPIMIE{<)KRRcF~di5m|e^Es?p zBXft*b&cM;0M1M2WW6m6i;v4a%Dr>YLM4m4Jm=^A6SDb@ucgcPwBI~`=cA%c{S!W! za4oiXD;!^JY5RFdw&LSg?eYhyd%w=Lu9|bri@W?xM5WP>PU}-lbFO|i6)vB$d6T{h z=gC8|S63aeR4$*Az!!Dxj@Y{gmU?mTBHm4U&^P}vUr{kTYdK3fOZlJ7I~!lExwG-+ z=Az>l{kh9^j%o;(uQ6XW)%x0^sm<2gPEDR@9X5BS^)!ihYs=p_CGU0Se*3j=@(1nm zgy^v7*RmEIyU$SUR9e~Iy-1xFIp4U@ zT|0Va&)5TbF-$BVAV9{(xP+d`nKjLD^55Q@X8F_zDZzANN^b3wK#` zPwcNR`rSLI$gl_Bn(#Le5M zWvgPJt}oAVO5WT2eN*d4+tstH-0Nfe{=SbC+;TbW-33*%-_>E8mOZXKpHwS~*)WO16k%c%9wdl!-Inf8uhe#Oy4va6=by$ksJ zD|$z=Xw;76X%pw(xhNL9cw6%N@(Vda);p7*{61ZE+_ZenRH5v>kNd1Q+)aH}#r}BH zy~YQ95BhH07yNBqS60uS_pSViPuU6Y{y{V+)w{oW-|<)WAQ=9CwC~gXbFz{)f9^QCmLHbA!~1Jz zbKcHoy`779zI)zh)_v#B#K68LYi#gHbyz)r`GwTIi}wiE9+geyeYCz@z~U9yT&U?B c<$svu1fpgy)O_-Wfq{X+)78&qol`;+0AI%aq5uE@ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/arbok/shiny.pal b/gfx/pokemon/arbok/shiny.pal new file mode 100644 index 0000000..3c731f9 --- /dev/null +++ b/gfx/pokemon/arbok/shiny.pal @@ -0,0 +1,4 @@ + + RGB 18, 19, 11 + RGB 20, 10, 30 + diff --git a/gfx/pokemon/arcanine/anim.asm b/gfx/pokemon/arcanine/anim.asm new file mode 100644 index 0000000..d70f01a --- /dev/null +++ b/gfx/pokemon/arcanine/anim.asm @@ -0,0 +1,6 @@ + frame 1, 05 + frame 2, 25 + frame 3, 10 + frame 4, 10 + frame 7, 25 + endanim diff --git a/gfx/pokemon/arcanine/anim_idle.asm b/gfx/pokemon/arcanine/anim_idle.asm new file mode 100644 index 0000000..3eb0790 --- /dev/null +++ b/gfx/pokemon/arcanine/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 4 + frame 5, 09 + frame 6, 09 + dorepeat 1 + endanim diff --git a/gfx/pokemon/arcanine/back.png b/gfx/pokemon/arcanine/back.png new file mode 100644 index 0000000000000000000000000000000000000000..0358d93443030de891a7659dc42df3bce9e06489 GIT binary patch literal 468 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|9`LLF+&Lk z1_u6Vc5)013@jxUlQ=C2lP zom<~N772K^J@)PCbr)j#_q5*gPT9&S^L7WHW=ri_SMC>~4=3Gi-t%$V5wQ=-cK*qy z*7R3qOY|+DpuOi<@FQ>W2Xjo?4{>;_e_i#Z`N5Zn?YfKx(fhS;h#qC$)0F7->dlj> zHa-7BQ(~En`X5GK+8h?=)O^>@YfoPPqw9+9-OE0B{1dg~3V62p)}v$jUoV&Z*!9hh zxt2phf6tHZEZcI{L#xA_b{*KhZO-3WB^MuPhA)r5|CuAV>?Ysem3wDb%+H3cZuh^I!0% Ygt7JBz4`qU0|Nttr>mdKI;Vst05yTzSO5S3 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/arcanine/front.png b/gfx/pokemon/arcanine/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5a65299edc90e8028db68ff0b6c2b3b865f8cb1c GIT binary patch literal 1580 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU_8LV%)r2K;9c|^1_lP60G|-o|NsC0-)niy zP=bMhfq$Bv90LObOG%JlFi1RC!>y8mf%UYfi(^Q|t+%tgC*4-yah>??|Nr7{~NYK*54>y3p=|D*ivLjIz(-1Kzy9eDpxcEdBz`Q4$RVVAH{Q{o~SN2)%?N+JN z`;LSOT~t`S$rI}wJc%GbBGBcL*R_u-! zOERx|)-L?JwZ!4Aw_T3T-aA>(eNw&78^;~F(X^Vcb_#E0Ti`dZp0nw;6RO+ga`kRm zKAhs{X(qGNJ!yT5KkuxBJ*qmgx~T>B(|J-b&9*kNGj=D#d(is|m9=&|f;m%Dyt=imZ%3;l zcU!j~UB1%o^6j-1XTGm-T64(zU8(A|pVQxmFOlQ8@=C{z(Pn*9s?~$ieO$UPaw|S; zys+!i#tmm4tL{`rhNonMB_7?`*k*f1c0rML?K8d$u2N6<-jp!D+wn{4S>G$+<*Lq?#(>gRD2!ZF&yme-d*_aL#fjCHPTP` zuFDp;-zhvN%X=z9{e(uj!|6;;l~b~>V%FZMxgP$G;U#a0?%$c#QjBpe_jfSo-Yh#K zTkYfV4g!BfzPn(bzoR)fu;7TSo&93dtRCx}m93l+N_Q6C-}vi@z;ixM|Nl&H8mzOV zZ?W8z?JZ!h`6p4L_%360>&7Oia{AJQr#btbt*@~~>?>lw{p_+~`HwGc#qVxB zKH6qoQf2*&Z|0(3U7BZPvrbKqEPVIC>2#9q3EAA%%ac+kSnGs~R2`Ik&1G;-c2~sG z;&%+XW{dA6M!uV4eJ#pu=i^7&Q>>#Z{B}N8;wd^FD)G24wuI@<#{7PU@;hI4F_im= zJ-%aT{)DkS#w~S*^|NWh*X((_a?vlkTtic{naFE1pKG_u4423 zh3?Y(ILhuQu1>JYsk>9?E?c+D?&;ct(eDHn=9cD8x}jTsW&PFH_Rp7Ge5YLgEllZ|x z+xbqS<($)+hvUGs76w?_8XE{7&M1e^n$m!QA)9 z`_9DkQ=iv?l7xHFaqf2~io+_;X`PRJYPs4b{p-6qSM}Kz#hWgF_+Ev9fq}u()z4*} HQ$iB}1_}~@ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/arcanine/shiny.pal b/gfx/pokemon/arcanine/shiny.pal new file mode 100644 index 0000000..78da214 --- /dev/null +++ b/gfx/pokemon/arcanine/shiny.pal @@ -0,0 +1,4 @@ + + RGB 24, 17, 15 + RGB 19, 17, 01 + diff --git a/gfx/pokemon/ariados/anim.asm b/gfx/pokemon/ariados/anim.asm new file mode 100644 index 0000000..00a7a5d --- /dev/null +++ b/gfx/pokemon/ariados/anim.asm @@ -0,0 +1,7 @@ + frame 1, 12 + setrepeat 6 + frame 2, 03 + frame 3, 03 + dorepeat 2 + frame 1, 24 + endanim diff --git a/gfx/pokemon/ariados/anim_idle.asm b/gfx/pokemon/ariados/anim_idle.asm new file mode 100644 index 0000000..bce41a8 --- /dev/null +++ b/gfx/pokemon/ariados/anim_idle.asm @@ -0,0 +1,7 @@ + frame 1, 08 + setrepeat 2 + frame 4, 06 + frame 1, 06 + dorepeat 2 + frame 1, 08 + endanim diff --git a/gfx/pokemon/ariados/back.png b/gfx/pokemon/ariados/back.png new file mode 100644 index 0000000000000000000000000000000000000000..6d0bc737d31e520c0c4e3ea7d0d860466b8f7fa6 GIT binary patch literal 428 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7e=o?X*l;NW z14H*5{$vIQ29}Z_zu^D>|Nqa`aI0isVD$EMaSW-r^>zxU&|w7**Vg*~*5MP*>Yijg zRdP%1k9vnkcKz?$cO@#OUr~SY{G=G`c5$ZF4Cjx$d!~EZv;G7_@6T;t-#z@db-&0H znFmh}PCan6Q2CAR{f1-m%sbLov)MC;J@Rk(ajR}od98=x{#~zqz4okaT&}jvjiLTZ zxA2lP4qqNdEX+}!w#!50h3tZ42A9WQ@B1BiBE{Ek%^tShD`tJzmlZ6>>L(g_E?nX8 z!P<~<(xerh^F4JH;uv4t?AY^4c;c32-U}Iy+-F>yHA8r@t6GANcvb8|foX1H2eO<^ z|Er`qd{609o%$ntadYvjj^+$cyQWHK*Zjhj-a@UpGZ=Tocsp$F%~DB_JQ;M)l>1?C z#4>|bc1&^%H=bNcKK=W=^o1hf$7hy$Jq=6fW{}>0QRVNF{D$jSpS90j(AM$#e6*Y8 kl)one%l5LZ2>!!BFUczt8t`aq6@@&{m9G7i%eAWZ&z(@XmqD zn-9!AcwTy%Re9gj#&hMrRaid#jCn5C{z-Ak@9!!-66G5!_p=wNC`|vjT(~P^vRkJ1 z+)Ar?duFe)4?UB5YQce-Q<%$Cw|`r(sI9;Ders0H`sQm-?&N(-F}a}5^4c~@{#DY% z4;|~~ERjC`Ak$@wXI_~6k@!a`6CBh-_yJou2qTb^}l9`{2ztCy+WbMNex zUm^0Ui2K6E$wH;w%Oo_lO1xxmT5_-Adpq;0*bZKa60}DZS0GNP11+ zMQ<_NJQ=T|C(^H`YE3?E8+yKr z{;K-yGC#lQ`EQfb(4$#zbz@>O`yM3i-gl?}{It8) zlP4xUS$=xPb+*l^zv~zdFv~9UuQ4x{JEQEU&7R-&^6J_n`vo3top4`I=X}e8+gtw} zD>$CG?MvdR&9{%#5+-<4jt-Kf3#YF+N;9XHzg?mT?C@QPEC?bK;^ z6c2?t*gWY|t2rmzCZfON@T;Bs&&gidwVaXV(4E8^A7@y<$S4cBrugoKSNvr59gDYQ z&GX;s{HQVT^ycIPy5$>0uVk%|Q#>TAE4p@z+L~*;1;^{MUYqWe;wfxD8ocsw$@V*q zic3lj4$01NPdayl`<;XBro!oW(mJe5zBz2?n)Pm)wSm{qf9jJY%5N~X^BKNVV6S~K zOZai$zGfZ4grl+>H~nf?RM@E;z3oXKGW@siv1s`TkB6+~4*c8yxv3wMm2f<8gundG z!H@e6PBDB}(7mBIc7pXCp^Ve#oZm(4ck_7X@$SSl38C|kG%DsyQ3-swQH68bwLco3 zj}9rn+#}vLrCw!@218*y|I^EBKLoVt<7AGP+sQ&bBB z1H-#Eos|p>3@jx6$|Noz>;a17Oz^Lfy;uunK>+O`+>y9XJv?M z5t(%E=;1$-`%Z1DTF$&bqb>2NGVi{FOPue>Y3}=JaNA_<{km1!26fvLPK3Wa{Ieq|aK#3#p1K*W4DYwzKK;<_(cWvv zUsc@wDtcGx#x|jpus7BG%bDsr9sECKtyM{9vi;Q1dY>!mp8}la`PE~8% z$8o{`<*R5LX+7?W1E$MmdKI;Vst0M%@-A^-pY literal 0 HcmV?d00001 diff --git a/gfx/pokemon/articuno/front.png b/gfx/pokemon/articuno/front.png new file mode 100644 index 0000000000000000000000000000000000000000..bd0090d7b49c911154f1a70546a5c08184465149 GIT binary patch literal 1679 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@|Ns9{YyUe% zwJ%UR4I@?K~XYnys*H$lm@gg!axpV&v zEzM8MH}<{t+i|IAQj?m~&UNL^p{d47Roi|3c6Kyc=F$ zF&AJCe^(I8n0Uvg^XIIqCG)4==3KbumFgtF45N$DPiz|ZevmR+yX{Ngk#)&j+0Gh< zfxq5mluV!bXqSn%opIjA7Dj`mPo8?-@6w-8$9n2iTGx@K8}7IE<*42~>-cYi(N?{y zUyWjaxs^DUmL+%G=83$uqiz}VGwUsx({on4T=1SBwB%x;vdQ%H@|w)WyjRb(=y7-Z zshkg&n{f2{gtJvUj+-fa$v=3PDb@FGe+Q%Ij9d0AoY$0@`dj_%N?IKk;2Xdbp~hC~ z<#cgp`HrnOJ@r4|@tZKkbh4W|NAc!`Paam^?8-W@Ve1o#{hMCgkv_U+_45N$R+OeK z|52g(!mF}l_a2>&)^m?Ld&8>@iz${b+2O}OtI#wj;h?a2#=_g_ zx+eFX7F*YDiqDLBI&-7U%J4;g{4cGq$>g7#u{`8Wk)!9ut(+$vz8?RQc=X1lh3OFy zf*)QT_7!P}5&!t`T-rJz#zoH-cUnuIX?-ZT=%`bB$0z65bH1$Ni$o8t`^Y${@ui;W z!JWIyj-Gwz+x5EgoIlsK)2SEstms)Oy6LJ};;}6oJzbr*Jei`h_@dF(%F4|@1EzmT zIK1H5SJr@TQ>E%(9hsNJoF?unJ$8`JI|Dwa9uL#iN!@0Xl9Iam^M)%w2pcu}PM4(E;(z3K;i3s-)cXua!R(roJl z)fX4fslW5MnR@B0eevi_aXjO7*ESO09`whfto?9Rl}P~!^mz8#BSPLh=m;JoW; z^=`vSZrMfgQ};ZvOo@7zvFr7e6IJgnd|cATo*$C+u3_5*-ExzKVLP0Um%nq6xKiLQ zzBuqx$^qFc1@1Sro2#OW+1u_Ep4PN2XK;S^BCO^?S0y}=kb?W)?LN>9`U6-jDF|9)-nB#qpZHnyC2VYII|xXf9E0myVcrccg;h- zjeq{lvz{dHXjjnwjP;oLy8{pV4$IcJSiAjEtWY#^_nN%rNuTv~muZW6Q-AP0pEghY zj^Np;-CjI8JCwU}uj(G%_GgZK&W=?_yK;73S=qC4+1#S6gWbG5b0xp&EZ}|8WgWFq zTsx=WxU%`$9mz~>#qT6`-VrP3`ChSY$Kt|}`2D)?R#cxWd23fb<uAfor<&c5F?)eaG?p?wDfs zW7g-3-&L%bBz@=N$76QoTlQ=`D{Gs-=Rw~z^KUzy?>W?DPfoS z%4ObJ-1)eA=VLLc=sOGfdp&l4+`EkZ?yl7QbsH=11?Fwqa=`kz?A9s8@%!!GOL%TS zXU(=+$@;l$^2=kD$1RS1-?{j%-mPbSS@Q2h%cs;@SpT{4l&|1s`(@cpvF{v8cP#t9 z@uciZt|NALwBIpIt+mMJG~dbGTfOH2Uv2P}e*L#a>|4$rs(#n7bIa8Q;ddHqSbom3 zUbB0W{++~|Ke)?#&RhR8EB|2rZpXCk)7}-e&s7lISJ3Wu?D%KCa{_t<7A5?v8tED0X z0|QI?odqDOB*-uL|NsC0b2Z#585kITdAc};RNT5c^)=sN1&&r*%lH4!W$$Hby7kuG zcv=bP9RG!)J|`tABxT}@bbmAY?faJ=cFNyl(J!GhMp1T26F30+v^{&A)9^7kGn-d+!{Z`^?&ZV`b$TXFvWW zv_V4pJwu93bidzm#s!>rKi*c_6s7pNbm?>d&fxP6g*`k6<(~7MU~!$pXOQbS(WsQy z?6T40H#_C;zUfhCe{tQe$gTe~DWM4f;bD+m literal 0 HcmV?d00001 diff --git a/gfx/pokemon/azumarill/front.png b/gfx/pokemon/azumarill/front.png new file mode 100644 index 0000000000000000000000000000000000000000..9a51d67397a9038638490d56b54de58ec880dbd9 GIT binary patch literal 891 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|Ns9%)yKA4 zDl#xIu%zEv0HR8Q{DS}g|NlQ%!>y8mfmzDa#WAGf*4tS(C*3jNaBY46|9|lsR&EuC zSx+=MXRUgvH+!+{ncSUIiVsFRF&pXL^L7zg5R(5^Y(b#SmgKXCo?Me|GUoML@Iqk9 zQI`AC1&&)5&1Sj(VRp`y%~2mhE1GkB_lliozI*+ct=^BDZytO$F=ASMaj~z%+e^vk zd)LI8pPc@WVF^RZX0Ao~F^q1~a}Vyj`Fqu6*JhulU)$b4U374x($%V>#jBVjJfpbv zc6jx@J!yUWJI|y#{zvD^K7W)gPWJ2DTmSCsul{AhH7T;c#5q@-XENJnRVifPwP3%H_FTR-adIqu2Z@gsq zYR}1K!{FF@!XI^3k*Ma z-|g2}VxFinIpeDR(-YTnma*C2nyVc(F{+wBjOR`6Y?t<7fA5@OREq!u z1H&I_&PWCZ29}Z_zu^D>|Nqa`aI0isU~KkuaSW-r)jKt^>4*Y{OY5%xbC(C2^-ksd zd)0IAhOXp-=9zu{X}2=vB|9>1sk2ScJX*xMr|T}~7Rh^d?;7&l<{s((`+I?(!92b< z(o+u9MxI+rky@Pt>sJHC8=Y$Ot#uF+YvD_=Z zZ{i5La_RLl@k`qn0_5iuX&;dmxa-aSZOYCM=T6SBH-D}2k8xL=TX~f&HP-c!x12uD8JQg zoxa2De^vqtn(iFA<}cO;SbQrfvFJPOm@~EUSKfBM>x^&D9$xxkqu_7*Ya7>HbZaQx zu|76{VZ|$9agEwL2^q^38daE1Oy9SB@xc>v3rv+(zY}gOn|M}fp-ih4x9xX-Kc`(i zPg3_kQDU89AAjxN`$hZ;%Kfp=WBUre&o*g3muj2U5ODFj?~>})+q)*)K2F|u^r~~- rfx5p>O4a97%=xq0?)|n&{~1G4xn?|WnfZ%>fq}u()z4*}Q$iB}S1Z`r literal 0 HcmV?d00001 diff --git a/gfx/pokemon/bayleef/front.png b/gfx/pokemon/bayleef/front.png new file mode 100644 index 0000000000000000000000000000000000000000..9fd993152cc71e53f9256146a99a5c7f3fd5fd3c GIT binary patch literal 971 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1BYRp4-)`t|?+8j*wA zDrG zYAlpJGdc0sjyTVZt8&{Cf=cQ;`kI_I6HB{HI8!t?H9Rkx@L`T={9fBrHfEm1%+8Gt zj~Z2r`d_7s1|At`sqR;YDG3ZL6gvhpP(<`RIvI)5zcCt!a8_qGsT~<`_Tk^K~ zvOplqTiX+9(y=X<9b#B!h4|flCHj(oPq?rDg)Q4JyPjIR5g^Sbb}*vvJSvy3ra^T)=k8_tNRFW!4ALsT;M>6x8R=L&qa zSi*g9!_Q-LIm{(Znh!-dd=riJ75hwzpQ*n1`Jr+8huM`Y*L{)I z*WA_cuELYi)2zMWLf`aN%&Jm93oAWecOG-(-69irX@^&Ch>`WDpyYxIO(VS&Bsgs_f7vWb^06S)6Z4+uT1t<7|9_6+cSQ~c z28M}CW@RxjFtC&a`2~Z-b2Z#585kI|JzX3_DsJta>e+PIfP+Qw?|*xDwvDb*Pj(&= zKVBx@Vd}DfKSSUA^=*18yG3uGdtmRS@Y-1de;BV6 zKb<-0;X_mBh5E%>{x{h5n8I9*PGz>u-@R1*eIvs);ga0sBL)YQT5dhrvc6Z)c4@;~ zX3>V^?KWZQnl*(#Zr5Z?S*lXyD}E{Rr}PK+T#K_CPOnbMuX}MKprtn79BF^Aq#i_oDfZRh_ucoxn1g;V{D~hBe1dvSyfuKiO=tg5hME z*V(2=4T}WtvaX5st7=&))B1(mQb2Rl#K|7Ti~Oqmlvi~=3+Z0^pF!{gJHt6yyVDE| O3=E#GelF{r5}E);oyGb9 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/beedrill/front.png b/gfx/pokemon/beedrill/front.png new file mode 100644 index 0000000000000000000000000000000000000000..271eaa3b4dd36e4eb0085036e207c5dfe61cb50a GIT binary patch literal 1440 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|NsC0a}>WT zaxgG3Ok6T6i-CcGr6kBN7$lyn;a17Oz-sU5;uunK>uuEQSu)xjA+P@4x71})T9o_D z+H!xD@$8d%yI6L5_D=aEU&Hu=H~hsvRZCJy^PMWz+_Ii6&x0tPrGbb=?`;Pa<7hJaeoz$Sg zZdSh0>FrD{p$4NRiXRvMWM6W=1a^?4@gqdPh|90POKcd(# zQy?I)U*uTen{0;vtE9skWK|`O_J1jqYh!bC-jMsd`Nf1qH}^3~9@oF}ifKju>b^~4 z4U^{8Zgv%!_NJ;XN#(4AZ`9Gqx`GAXjH~zh2^;F=q*vLomX3QHbyMF zQ5JFHt*hT??_bmcUI|~vhM7*+*E#*U3vUr8M`Fj$!dn_E^a89lkxio`|aSc z!(2Hx@^WuKm&=^GtGeL9f)m^e9Gp3xdRYHAoMJLZVdL#ZZhP3y8}ze?7P-$_Wq0B1 zx||KneZq+m>@z-TD=j}ze$BA_h2I9QFZQ7pzXh(8X&a@?s#rF=y^C?J_f3v37s7rT zWOf;EVAtFFNKdz;jCZ}m&Hk1b9R1P@6b!3huR0yN-rm7VCF$P9us5Mrrq@2+IJK?V zW4pZdxA}#v>qV5}XT8XcJhaY6W`T>?$(f5hD&61DIq~ZBo=2DFO1@u^Xr06Rc&qEo zT}LbnW1O$psMKVSauGS~PjR{KBnPZi?a zn6ozfozk(G=dxLijy7>dL6z;CSN17dF`TrjisSqDfWuoVDfN+TjgH%)O`+F5@-61? z+mPb;rg-;fJ}2MCh)Wh9__9w<-Jp_N|K@3H`IOG`mcto(;f>`L%ZxwralY;_xo0?s z@x1jm)ms(pJHj7aOM51}`_?*HIr;nh8nye%mmF9%_0+|_6V_%AKb*3@#QdhOJf-)e z>U$0QPko<0_Vt(7?0NiHR{s5u`U>}b7I!;drze#y{8$(5hn5vi<8U505vU z##J1D&@yvf`aMU<${i17)gMT|KhXA4rjq@pZK#|4lYPn$WmPP9GtR4Mzq@DZ{%5i? z4@lp0tPI`zK=#1;J&XSwu>PR@{=ji-yL%tu{`x{wvq*P+S$q7@702Js34J2Fy*P~f{f_yYwd~JF=DxSS_iT;XciH#FVYfk= xS0Awcmv(MdU2&NF`yUm@q5h~pX#J1j+zhoXd#5P(F)%PNc)I$ztaD0e0syS*zB2#- literal 0 HcmV?d00001 diff --git a/gfx/pokemon/beedrill/shiny.pal b/gfx/pokemon/beedrill/shiny.pal new file mode 100644 index 0000000..cfbc999 --- /dev/null +++ b/gfx/pokemon/beedrill/shiny.pal @@ -0,0 +1,4 @@ + + RGB 17, 20, 13 + RGB 08, 07, 27 + diff --git a/gfx/pokemon/bellossom/anim.asm b/gfx/pokemon/bellossom/anim.asm new file mode 100644 index 0000000..bec149b --- /dev/null +++ b/gfx/pokemon/bellossom/anim.asm @@ -0,0 +1,9 @@ + frame 3, 12 + frame 1, 12 + frame 2, 12 + frame 4, 10 + frame 0, 12 + frame 4, 10 + frame 5, 12 + frame 4, 10 + endanim diff --git a/gfx/pokemon/bellossom/anim_idle.asm b/gfx/pokemon/bellossom/anim_idle.asm new file mode 100644 index 0000000..29e08fa --- /dev/null +++ b/gfx/pokemon/bellossom/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 6, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/bellossom/back.png b/gfx/pokemon/bellossom/back.png new file mode 100644 index 0000000000000000000000000000000000000000..53b24c2b435d9640e156b2cc5254058df68e3971 GIT binary patch literal 423 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f6vL#u*Zpk zf#LLtS9=*47+6Yz{DS}g|NlQ%!>y8mfzi#=#WAGf*4xnNJ{Cm|me>Ev;{rpbESh}x zed?r_+g3hO>`?muiQQ3rpT>tpi*|^u@a6B|6ti0+6m!PNB;lNr`!*eSrvt0GB<^i# zX^^>bX{Fim8F$PU^*=uF@az%I+Y&RHnalkGIMP{uEN}_d>13}rjJU-qFLD0ZBHx<& z6gp8+UKm(5-Pb04gVlu&zgr$_uiM!^IV8F8s$7v!7)w)m)1K1T zUB`~jHjoX7dj7J3pZN+)-5OR=$5WBa^PFsFOEBIKes9j=+{_ZGyW|5aQD`Yn-jB(p8Y=fpFRC8 z*Rd7n@7|L3d0NwxRXAG@vqw7t>Y`V=5k-&o_nutrZI6%l9*vW?*1YetP*W0|Nt3fKQ0)|NsB*IT;%E zI599VoIdetF9QPuOG%Jl@c;k+|L1DBRWdLzn|iu9hE&{oJG-+_Mv=$m_Lcwti=}SI z*c#usdrSG!w8^o)ZX#yWA95DSnA|$bQnAE&s@(2Y(#LM_QPx7tF!qAr79nS>f z_)>+oCD>`_3S>?8(tHum;xx4)!qs>Gj8}L3XL&{>1T)_LshwYPZ~t$P-2&H+Tw2yE zeJHZZ$|&)_)(l&-qYKvEQ4TuftR9vf|2~}4{qWVL9U`*Fe=Us2ooUKhel<4z^FgWX zxbKU6xEtAbUEK0farz@Q`=jp0kJtY*c{tZ&dE*Xqv29fgS0A3X$^WZM`>U=DPKW88 z`X`T^Tln+#lCbMD4^6ljyS-T?Z-Wz|M%k9eSF@H6wk}i{YEc+W_nDJxLqLJCslUJ z-09^{Sx(hmMZZ$C)3-Zso4a;?v=KXhwA%-(sE--*XR8IoUpu|cY4Jqs6S7bEijHqD zXs@b0B)d2}zv#G)+V>sIPxy-5XIZPo`u6|Tk$)S%DS*Ms(}5|~S>&?rmkqsFWw%}a zlQ2&}UMgLt&MZ$(^-R%Rxjzg3G{}X;-PE>T|79+huQC~XI zevg*1p7@&?F?o&~IKvNY%<1c}dh_IBc~OtE>jtNSqkK;6y>}enDU?sJJ|Sy=N_J`Q z-;$-xA#J~{-kh+^Nw)jy6SsnW8mo2CU(R&)`5SJ9@7(*uw)}zkJL@OM-&^ykME|hA zQ~sc$;{L=>Ki=(QzRmozYQLg{+;{b#>t6qv*delhfl;2d64Q=`a~WACkB?;@6lCRW z*NwV=CC5;4Y4%LHd0+o-dm>pnAvEI&UlIGx<~xq>9@HL}-~axB_3HLJ2g}21(p`~4 zjQxK-`_AU~YwSL7-H*(D(fEFi(T#)UVJ1>wogiO)1M#ijJg{E9`@3vS`qA>Ri<0f{ z*FcPa>|g92*;4sVLfxT={k?U?{g2roMPDaa|2Wt6e$Bo^{}|sX7`J*JWs_lGU|{fc L^>bP0l+XkKt<7zx2Q5y&x|J z28PRyRVoY&3@jx6$|Noz>;a17Oz{un2;uunK>+O_-la45GxU~NJUoYn>;jo%* z&0alAm8oC6xs{Utw6i3$et-Jwg3E*c7Wdlr1gU(MO?3;d1YerY;=#FzJCyCX>weA? z_JUtoH+-4Xd8twTV%dx%v+LHK{A%r$U=?s-dbF-KSKxNHYu68~(foUM;hTMj8&|)Z z?fpo-iJyClm?VSob%yF=TkRq`_OPE&NPhQHHFujswvlAxv>4qBp|f4%J994vpWZoh z`?)puk6yRDxS?THdtPMf#_wix{%|mai^kaRV{lr$rgFAG^#1ZyQAf@kdf4n$cC6q* zNgK1npUZkz_6Dh5`~KM0GrPjhqovM+<;x1E=gS^iWT%AQ`lXz%s&mr2Upt-AE?bmU VHi2<Bc!NX4zUvtIWdQQ&B8{QU3z9??As z(NpifdDGA9n>OiIZ~)8xE7M;5WSlaw^qx9~)if^(yXM=n;ZQFJ6>Pczm zo#$ANE|7X@C8*gvqvYszvzH2MJ!eh(+pv_S>Fe_5Eqq;a1%-mL|Cc^6WD_}VkUC%R zYYdyu+5Ki_FK1Y8K9M!`&ReaoP9+abK5wYo6(SJ&Xr^M3{&dA7+m88g#!VNvUelPW zXf`$DWbt2?-%U&BP3BJR%`?4a)NxCPzt|@2P+ECJ%lB31e2$l8MjT05x3phvm#gQo zmU~%eubvi}t?6^1V~(%LGtCN_OJ5FbXkWTYo%_vvzLghyF0Y-g&)4$K$tBEs^_&M@ z|6l#K4Ec3r;+)8$wx&6Z&#u;;oVjlvi{<5yg3o;3o|143x%gbb6l0-hJVz~xpI@A0{I&7r8A@)T$vE3KJ?|86`aJHd zvy9J&+FMSZbMm`!{nxs-ruXR@KkA;HnaMT_?wTi`eeBNH^ce5VpY}WLt<7e{89QQ`CP3 z28Qh4mPQN=3@jx6$|Noz>;a17Oz*y|*;uunK>+KZJvcm>E&X#xnpEGrAT9%{v zc2l>-d&`ZV6$>W0?7RN`*YxQ#cmJQuCN1@%PS`AALO^|#l!sjlliu~e2a-c)+o)Ez zzW))Evi^fo(>b0Qf884=uAi#70Xp{95H$JbHpK8MqB6vpW#CpBIS_z&{ z^IRLcBKVtl-ilRl`OFF4D6Ep7%D}F*NnxM|D>mQL$OyAGCNe*LC0Za$&bk7E}m}tcwUvm1L2M zaO^zXIElr@u-+)>#>b~YyQLl^ZFsnqcahwok4Iuy=6|jHJgG)rdETF?hV4xsE7B*3 zZr5bcTeC9t$I1;|9&OGK&n&2JzcuOoGM8Uk=ex?5zcz93j$CRjxASu7nx?aDJdga} zonNO>nY_PJCHcsfW9wL&^_wSU%s05##J+yt7Ue$P)xkE_>yGYMimKYdB`5gO`@-+9 a>@Ixlx_lX50~r_?7(8A5T-G@yGywn}!O8dl literal 0 HcmV?d00001 diff --git a/gfx/pokemon/blastoise/front.png b/gfx/pokemon/blastoise/front.png new file mode 100644 index 0000000000000000000000000000000000000000..f6623fe78daaa98bfaeee4765de99be20b976954 GIT binary patch literal 1477 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsBTmP$B9 z{byic$o_3<#K6G7QWE4B{Qv*||G64&l?)85DV{ElAr-gY&hFiIMT@7^^V{$Jn^pH; zaPmIBSZ-?7^-bl=s+klyYh1m4Hg!vGu-+fJ>q+E>dlz?2Im_4mZb#Tui;_hyj2W?& z5=IN}>1ZpSFV38*-_o9bUn@}F{-5=fN6XCBLg#wz-NLKNCgD8$)7000ir-hsuDit( z!@k7LzgNEY(+#n{J5vMb~{AuMeb1tMR** zhgTl?HF2F?vb3@0MzqUv=LnI>nE_I_+gEXWs-$gQ;aPHMUrq+IqgBT;n<$SJY!`dj zXDOaJc>N%EBCmC!*7D+6s|5Mojy%l`jrxAG;ZqmG%+Q-V%usUFun&;H%M`vG4kZsox`?Y_`)NRW`B{>gISgQ5= z`z@zaS(jBqZ(FC7e&~6yFTixF)XJ9U=7ACCj$Gew>BZjl)Adl#BWrzzu<{7y!0Q7sQ`JQc;RBh+IS#`8*>i0|U#N%dL?~^RgF#X$L9r9bUe8nf-a)}Kes^4iW zf3)G4EOSESqdvn8HpRzzBE)tiGwJZ(F=U_S{%!`-Y31^kcPu*J?-a7@l!FA*-@RyH zeSOD}bz1bh9ZcM7i;l}gyxaMhEkbTbGM7&O9Yf}6>F-`#lVH@*zT>!Yl_sYS_nk(j zS5Yp{r(Wo>zVKb8q4m+$lRef(eaWoiA2a-Wb}~nv+QBL|TPAPk;*WC++n>2^l-T>Y zPwe@L6Q|NztKXd{-CEp!L|T3N*`3N=+oo`;JJcPPH4FHl`p&5Q3Ae%jsjBZd=4xNx zv3O!;N|c>lp*t@ddu@NS=(`CDMKKG*ejJfK#DB5MMBh+ur*bi$XR-F3iC1IWIrDcY z*Z2l)jw^64o6KV$zH{+Pu8O0w9ile>qTeO_>v6x}^D=+O;fDv)H>AGHc<@lPyyU}& zHfy~P8&1h;{8g%vWV&&GQSG8FS-+$rZai1%Z7qHG;QdKin}!C~cN?aacz-f|w}Eed z(Sw=RGV)bVxypZ7&uua;|G-pkVD*rz{K+ht_97+Rn#^_%-C;m;YfYe=z?kU%}?Ur1!yF*Xb9#$BJ8RjF|jx$Kn_7 zPkSu>%5<5z{D#G?>~$e*8+>*?HVG_cd%ttB{+fqYm4O@1$^MdDDSfYi-F(UCdDgS$ zu0AU}+uE%B&ELMg_dm{mTb}T~{Lj_jvVYpYS^wDlm#=R3{f}p4H~;1PSNvOcw)MV( z{mI40pY_F`m5q(r^QiCO{@;<0`HsDR#y5q3=i^Vm3VW^HvTusMlh~JZ_s+(h$;HRZ zANJMmOP>G!#&hd$KjF-<9mzHO9#6Dh_T2j2&d1Mcj_a2Hnet<7|2(;Pil!3- z14A4OmpB6h14~JeU-19`|NrM|xK%PRF#Pv)aSW-r^>&Ik(-8#@XVabk=ej$7yqxqh zPb{@;7CYn1C0~w;*9$S6T(Cu>F(%pdUGRc=qN&#&6m49tp;#1{#cRTN{AiQG_Q!Go zi$r9^=X{N3xKyKEuDaoM^j};4xlC#199!Om?-e}y>d7=$?fq|?n}KAPP5%2&@@%HHoeWx(3FuXN6TLpcWD^9C0#Mf2BO zd!4aJ_d?Ac#x*V}9<$Z$_)04qFDtEOX|rVenx=QjiM=k+ooz;Tk&6oh0|SGntDnm{ Hr-UW|rN)$@ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/blissey/front.png b/gfx/pokemon/blissey/front.png new file mode 100644 index 0000000000000000000000000000000000000000..3d44eb5d6a78770f19804cd85d42b6b6320aa1be GIT binary patch literal 1070 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsBblZ&Tl zIx#RX#IbORGcYi)lmz(&|NsC0f3AjGB?ANVSx*8>3?OaAOW zvG`1Cabi=@`tHRke|O%G{$!adv#dy@V&7A%IN7wh+Gp+xpQvI`e|lLubJv|?DIU7a zSIriF_cq-$@269Ta?bUPm-E;HkGxbmJzuru#;!ztcZ;t}eD=mkg{I7!8oZsOz_9yD zW)6RfzVExV!ebu|P1ee7TeiD-Vfx&)WobV=r-v@PBvf|0?C3g`OV?b(+NUgaj;_5e zlFipS`Ge&4+Pt#=64UN4I{U8ubL~APf1arJjb|pEtzX%ay5oiAqok{5XD43`ySDCv z%)ZGRB>JluqGR(N9H&eA&b`aA_x|E_X$MNTKA2&4WnqdA)9bm@R@^GNH077uYo$+L zR5TwJd&ypJcP{$oxfeagmGpEbGar&_4_VmBT_7~z+qH8~VRE!qs)|1wG{;QAAcIDxmx!ROH#rr%$2ZKc~n z$8eLK&Tm5`6gaHzTwJPg@Xb8yp4{!X|MulF-Fsio!+pHYy#N^=m)~?>@O|Xp8}B>5 zuL;_d{xyGJ`qnEI|L0xZ)cy6Tt@av`g2S>u3mfO{nttbCYvlW#&94_XM86C0*Il>s zaKjVpcQ-ctF)yD}Rq=#RI-=qU-_xKklboBaEle+QuQe;*&||en=j8#}6sVoY>yOE< z`yyT*G4nKQ`GTj1VPW=T|4!w9`<1_0CxM72>pzd>Pb|>(le)6EiGhKE!PC{xWt~$( F699b~7@PnA literal 0 HcmV?d00001 diff --git a/gfx/pokemon/blissey/shiny.pal b/gfx/pokemon/blissey/shiny.pal new file mode 100644 index 0000000..862858e --- /dev/null +++ b/gfx/pokemon/blissey/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 13, 29 + RGB 14, 13, 24 + diff --git a/gfx/pokemon/bulbasaur/anim.asm b/gfx/pokemon/bulbasaur/anim.asm new file mode 100644 index 0000000..fce9af1 --- /dev/null +++ b/gfx/pokemon/bulbasaur/anim.asm @@ -0,0 +1,9 @@ + frame 1, 10 + frame 2, 10 + frame 1, 08 + frame 2, 06 + frame 4, 20 + frame 3, 06 + frame 0, 05 + frame 5, 05 + endanim diff --git a/gfx/pokemon/bulbasaur/anim_idle.asm b/gfx/pokemon/bulbasaur/anim_idle.asm new file mode 100644 index 0000000..ab75b51 --- /dev/null +++ b/gfx/pokemon/bulbasaur/anim_idle.asm @@ -0,0 +1,4 @@ + frame 5, 05 + frame 0, 05 + frame 5, 05 + endanim diff --git a/gfx/pokemon/bulbasaur/back.png b/gfx/pokemon/bulbasaur/back.png new file mode 100644 index 0000000000000000000000000000000000000000..c37b4b2c268391e55533e52b0be1280cce8d6f5c GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7pZq`Se~=*q z1H&bry8mfl<`c#WAGf*4rtJLWdPNSQdW&Z*Shf#iUm0 zFz4JAtL+V6T3$ro|8?ze(w@tVYEQZyx-PUbY;2w8JK@DPmA#9MXZwBKwRLF#o650L z4SCU(_bk-78)EoE&S?L-^TEbT)2$%x^tZYYh7*AdY(-v-wimKfmav*ki_260qrO4V z!lkrn$^E(eM2s5ae{4Uva>flk^*zg&j+n$|g$#Z^bl@xhLZeMcOkeRJ~_pI41vJD#Fk4 z{T{W0zh`ZbG@mKzzL&p6U5STbi8+@^fAM_9r-8}Z5m#@|ag>$*Fmw5U&L=fq{W1z$e7@|NsBV|D*l~ z88R?1T;f?ifq{X6r6kBN`2YX^|8q6mDj66U&v?2xhE&{oJBvGyS&@g;@cqB?cS$)( zWxNp+XDyr5sb!ivt)H>qBlwg$7ni_62aOUn{Wng|3Jdr8#k}6OP<>LmqRO_q3?EuXWX~@PE8Sw4xM`9zvwIEkF`~9Fsyy@ouMcFQ#C_;XdMIlb}8K>FJ4tMFfcH9 My85}Sb4q9e08$nGwEzGB literal 0 HcmV?d00001 diff --git a/gfx/pokemon/bulbasaur/shiny.pal b/gfx/pokemon/bulbasaur/shiny.pal new file mode 100644 index 0000000..bcd5ad0 --- /dev/null +++ b/gfx/pokemon/bulbasaur/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 28, 11 + RGB 31, 10, 06 + diff --git a/gfx/pokemon/butterfree/anim.asm b/gfx/pokemon/butterfree/anim.asm new file mode 100644 index 0000000..b1d1e79 --- /dev/null +++ b/gfx/pokemon/butterfree/anim.asm @@ -0,0 +1,7 @@ + frame 0, 04 + frame 2, 24 + setrepeat 3 + frame 0, 06 + frame 1, 06 + dorepeat 3 + endanim diff --git a/gfx/pokemon/butterfree/anim_idle.asm b/gfx/pokemon/butterfree/anim_idle.asm new file mode 100644 index 0000000..910725f --- /dev/null +++ b/gfx/pokemon/butterfree/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 10 + frame 1, 10 + dorepeat 1 + endanim diff --git a/gfx/pokemon/butterfree/back.png b/gfx/pokemon/butterfree/back.png new file mode 100644 index 0000000000000000000000000000000000000000..18757bb3e0b580c07e4ed6d6abd4e587230f065b GIT binary patch literal 499 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7Kjqy2Yns^% z3=Cy;XZRTy7+6Yz{DS}g|NlQ%!>y8mfpL_p~HXQ-$~EjDE52l z+w&kOPkA2G z`uBfy102u9XV2xoJR$Myu?n}3v9p+^C9WB4t__Mj;Ky|^HMN`7`QwUbBK^ zS`9d#+%tPDI8BWqqTsu+oTctnhtK;z9*_tsmPq=4DuVs~_m7e`R&uiwe;i79tN0=8 zj8aF5(?5|41wp%gob3m*eQj^ezNo_1_*^jR>Vz4aOQnvePf&HMIx!`8ev!wU#LdUn z-gB~g?HsY4=l$;nJSg{&%ba>Zyy?#7ja9~f)@cRiZ4df%b@zc5 z|770vu@B1J&G)G95%_VZqj|c*i%WLvyyo>5H=VWlD zd0DNtnx~#)OT5p9Z?Y@H(v@pHS44K-VE$~{+RS=iH7qyfcyn=0BfHwdM-%y`gm45e zcqi^1vYvITY?y48hFYA&c9&PbdCDHlZMarmbVU9?gPJ4Pyx;HGBN!MM7(8A5T-G@y GGywqeyxo5Q literal 0 HcmV?d00001 diff --git a/gfx/pokemon/butterfree/front.png b/gfx/pokemon/butterfree/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5b60425bf0a2808a23e2244d81af6b3cec9c2fce GIT binary patch literal 1052 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU|7My%)r3VWOp~8fq{W1z$e7@|Ns9}&i%ip zna#k!P*!(_pMimar6kBN`2YX^|8q6mDj67{U`Ps79Z8sY>{yO!vK6+nJA@6F39>vKCeLgYLWyASR>(a}@M^RXfB?5!OkeMe%;yAJQ1BeM0@#yPK>S6ivg zTQ_U5sYmeh)mNNPe_Zi$WxubPV#Y2Oo=e+iT1-iiR%GuxCLDe4MN_TmuBP+bpKWW; zF8$yzV`I}lff);w_b&ywDvbv06l?pd|Z&dkidgF8WZfys-BhpfBUZ%PXF8OEITyKC&o`SJzF^TTfE z?>?FmeKDu>TIj5eJ6oURdMGdFc>Fti+aKv0(=z{^<=%fu*0uit@Biz6r9N%T4UMtg z@c!uqiFd-Q{+>E}d#{I-`NOM+kMw4Sm3gE-;n*R$lWAqnEXQ&I$%i~*>vu6<+1JFh zqRMe$npyD2`~FRxnDQVd(GEklf?XG zm$RorR#(UiKC53d-t~r*OJp{8O?kR&v9D8jsnwEQhu3d>6EgMPfpt&U6m5R9`Qf57 z=IbZw?P9iWmcH9~=z(AP3YF75?@HS5pWyu9SFUjX*VcCt7F%qMuF58UvArhyQT0&p z-HiuDcQw!MP-9ImVNcJ#FT{W0b>BCE%zJDCuTvkHndMFMUz}?e`e9l)t4jXjtXkIV ztJk+ZIU4acTU<72^}6k^*S)!17&N`j{mHDR%_q{|>t<7pS;!ZzgIN_ z1B3fb)(s2{3@jx6$|Noz>;a17Oz^Ll!;uunK>+RIrLd^yoE{ebZ|Bp%Z?3gZ4 zt6#P%_&d+{kSF=|zf%sl@7?0h5@pSJ!_q{7bHU8>MvP1Nr*GGCayZ=Q;1tK$ekV^h zbBmWe|K0ADAD!;UX2dR>U3dMEx5K^tT?Tv8{+!af>JY=ZfX%Op|0P4z!t0U#;)^sI zC+BW*D=}|B{JQG4n^{-O#-;5?53p&5(Vr%&?pF7S@ zOh!tZcB?bpWxAqWd|a!QMS`R8=&xk9T{{;aedpg0URIKKHF?QBuG_zlnyv4cC{<+n zl(%6<*#A^c4z-4=-y+3Ut9m_lG9O)abkDabwcAfW7L@sGSokLDW4*$x>g3j>LlLi4 v{dW31V4YxFEbe+qrf=hnePR`MA@xndEGhQP;qMt37#KWV{an^LB{Ts5UW2C+ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/caterpie/front.png b/gfx/pokemon/caterpie/front.png new file mode 100644 index 0000000000000000000000000000000000000000..78130b1aafc8790781849af12d20e0f176a0dc56 GIT binary patch literal 479 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|Ns9dZ#Dey zRn5S_;C_>J0|NsCOG%Jl@c;k+|L1DBRWdLz)_J-(hE&{oJL6#95d#jFgP;HZk6|{u znKgYQ|J#LH8nb1-an6=FuOasG#e+tUz8n6}O`8`?NbIq_a#2Vo`NoXTcApz3wn@D? zF>y;wQm_kWl-7LtH6_d+nIBY{+qq9^UcJ0~_SK+i&5^BE8{|b_yk2g-al&`yd71@* z2jgyj-1a*yZQx{O6d-bXzBR&#H=<1vi`CW;JN8OLH>tK6L4* zF~>x4>jO)*H{9JH^RRFhcV^G2m3?m(&OF~@bN7djO78s3`7eJ+FDp3c+k3ul!2^k% zGmp*uQY#-XKIhB(DHTQEPw;n3&%gL>CIt4`ng708yqS6C^Ry~wyE{Mc=!pKQ$SY%H lsyuM@dD>g!|7X(oG06YrSyy#&c?Sb1=3M<;);T3K0Ra1nt<7AM~F=BKtW5 z1H*|mmkJmd7+6Yz{DS}g|NlQ%!>y8mfpL+ii(^Q|t=?&z)0h=GTo&&5KezoXZ;r9r z-%pdil{+>{DJcnFFg(Iu%a>>+*x1Xyh-IPYi{t7IUM#Njm9!4B#B}&Kd=;zuaO^fIum5RumMztcw2cG6lWsiC|XEwzubuVzeqOz<-HE8z1 z)u&`ZdK!*E@vF`95WP-990axT_bRUFJAZv`?WZ)>V@Kd|4F}d*bP5 z<_b17S(e-{X1~y^$;;l;A=_xPZH45uHjamkN1n{B;QSFZiD?hZH@SzuAMKg`_`-zm zei=0NxzH=^@@xkaqt_u zl2FVPsltCE+KD-<<%}=KP2(!3f(%QB*SwCIt#9vqoSfvcq;{&iO;+S*@vUz1JCruP zNa9@dCCY+p{Zz(Z$2PJo{U){ZV_-CAW5|QTGvCsrr|p~{{2;8z^8cp;@kcI2J>l<{ VVEwm>cP#@5c)I$ztaD0e0szwj~)ozoe_Y{=1OdGG&R-ks*& zePzpTU8_I7GHRlO(+@T_)v9-bp|(Qao2+*#2#Boec=u$|I)zQU=ToLy*0hMPefK-Av#9vKh`-6U`+e8kgw?dmx9NRbu~$DW>&KaW8Q=B9 z@2^JN;Io!WimlbPCi)BJ`tdWnBl zR&JOm{8_1fYlMZyCJFsru@^tAn>)o)DP~QnN^AGw$kc6@cZbEWwx)l~tn$Fn+*e@!5RN&3n41zC7rS z2|s@!(^mQToQcloI2O)hOqVN+FTMTn)u%PF*|sldyUOV{hP>Q(xuR!g_WhilW%tda z1y{bF?YckBueWyd%3~Yz!^#}K&GFQb3|@EJeDNHW)Z;U!`Cp%NGW;D`opm1x=CtmSYI*&0|SGntDnm{r-UW|9ZsXU literal 0 HcmV?d00001 diff --git a/gfx/pokemon/celebi/shiny.pal b/gfx/pokemon/celebi/shiny.pal new file mode 100644 index 0000000..1d73c80 --- /dev/null +++ b/gfx/pokemon/celebi/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 15, 15 + RGB 15, 04, 18 + diff --git a/gfx/pokemon/chansey/anim.asm b/gfx/pokemon/chansey/anim.asm new file mode 100644 index 0000000..3d07cc3 --- /dev/null +++ b/gfx/pokemon/chansey/anim.asm @@ -0,0 +1,9 @@ + frame 1, 06 + frame 4, 06 + frame 1, 06 + frame 2, 10 + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 5 + endanim diff --git a/gfx/pokemon/chansey/anim_idle.asm b/gfx/pokemon/chansey/anim_idle.asm new file mode 100644 index 0000000..8318520 --- /dev/null +++ b/gfx/pokemon/chansey/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/chansey/back.png b/gfx/pokemon/chansey/back.png new file mode 100644 index 0000000000000000000000000000000000000000..ea2296b37aa2506188d09d3861ad596e728d5f7b GIT binary patch literal 389 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|GZ`Gf3GWYM6OSoFn+r-A}Ryaul~Q zJM(jSzS36s8ZhNe_0(lkZ5&iO_eraGR^%7#2`SpX{cT3hT1T1i*|lHdlvEb0yR+_F vy}bYWJB`OidJOuTcW0)%7jw>Qdu^{T$Nt$ub6O1p0|SGntDnm{r-UW|J@=>d literal 0 HcmV?d00001 diff --git a/gfx/pokemon/chansey/front.png b/gfx/pokemon/chansey/front.png new file mode 100644 index 0000000000000000000000000000000000000000..0213b874d97aac0686b53b5d4e3fa138d67333a1 GIT binary patch literal 813 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1D4o{u4VM?NSb}P@^Q-tXSNw^_oAP_S6Xkfz~g72O6I#~i?}o&KVkitv_(%T zjP?67p-1gHWmnn5gcKxIeoHuWF1?k$_39GIl&$)7GAez@b`H+JxPA_i-!dvZ@}Yzd`ML zP96R=?atM>3;F7&3RR9eGJIOKz%>8)iCg7{H+whp6n(j{?%HFGxsM(+UcKihE_ZbE zL3j4b`8`}}*58=Ss-@FEI!Ll+2yUFq8N#o5CeA^3;+41OFE*c?Q~LSJ?t>g_+5;2b zu4XvK++O+iO{3wWy!LX#M9GO;^9^SfZrZNb;LGORxV9_E-{9=akO|SH>g_elg?Cw( z9jp7C6CIU*rkGJ@>AK$q>HRV4pUkpeFJ~=Uy5QQ>l8IZQ3%<{|++-Q25y=>#ac$$Y zQpWqqES{76jQ3ASTlTSbR-@(B=vfQ>0+J_kpMA3S|C!o;`&mi;#x;B^zZi$ilRV;J zeC6p|rp#wMTh5sjOL)(+T$ z`oBxl>p~0O>d#DGe*EXP_)W({=BHo(7sP-3`@c&U^ml!q-t>L?p8Ze$s=n8^)VI|C zTM{>Gx9k0P3AqK&=9g{wQ#)sWe{oz96n^?%_|NX#{o_A>TRc|mdKI;Vst0O13OrvLx| literal 0 HcmV?d00001 diff --git a/gfx/pokemon/chansey/shiny.pal b/gfx/pokemon/chansey/shiny.pal new file mode 100644 index 0000000..4d52ad9 --- /dev/null +++ b/gfx/pokemon/chansey/shiny.pal @@ -0,0 +1,4 @@ + + RGB 27, 25, 19 + RGB 13, 19, 01 + diff --git a/gfx/pokemon/charizard/anim.asm b/gfx/pokemon/charizard/anim.asm new file mode 100644 index 0000000..db965a3 --- /dev/null +++ b/gfx/pokemon/charizard/anim.asm @@ -0,0 +1,7 @@ + frame 0, 08 + frame 1, 16 + setrepeat 2 + frame 2, 09 + frame 1, 09 + dorepeat 3 + endanim diff --git a/gfx/pokemon/charizard/anim_idle.asm b/gfx/pokemon/charizard/anim_idle.asm new file mode 100644 index 0000000..c4a056b --- /dev/null +++ b/gfx/pokemon/charizard/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/charizard/back.png b/gfx/pokemon/charizard/back.png new file mode 100644 index 0000000000000000000000000000000000000000..2ad95496361971cf89a77305087acfb56c7a4151 GIT binary patch literal 436 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|38Ys(5sq( zfkC7$sFZ<$fu$tKFBl}AtKnA3z`z*n>Eaktack;SP9YaT9v9)-|JLW-FE|;jT9)?O zJ^iz5To}`n{;76b|1~;$o@sXPtGI%DR?zMLFFKznyvY6T z_C`3mceRyqYBjqGcTid--?eY^8&lrDddit5?_GQCYwm0nj_sCb`Hnr837H~yAgO_I zh1-`~!Uu#tEUsB4e#r4=>pT|gL)-nYPk(U1`25s>UIv}1*;7~4=QV6C(fvB3N+kJb zNu)Ms&HJy;g1j5`k5tMnaO!IR$@qHZ@q&F}JTFo$z8ouN_)QFAPfCeUYEe#5*!6BXN7vWF$!{5!Z~rW?&F$iO_KtZBPiIZ_JA41} zyTf7f%zo?NRF_xY= p-psp3&pv7A$)A=xUWGqk4>4vt{-JEzbp{3o22WQ%mvv4FO#pqiz@7jA literal 0 HcmV?d00001 diff --git a/gfx/pokemon/charizard/front.png b/gfx/pokemon/charizard/front.png new file mode 100644 index 0000000000000000000000000000000000000000..1cb0df9433ab8cce8a9e6d2c908d486f41738fa7 GIT binary patch literal 1217 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|NsC0Q4EG& z)eH;_B6UHf3=9k`B|(0{An{xcw@L;EmIO~1$B>F!Z)aUBdaJ-{6&qdr)b<*-VX-p^?BD$=>| zx=PXOJ!9?#?%lp0A0IBY?=LRuvi7T6;GEk(D#iPCD;7T4do7MB)MoNT zCaFp6e*bPXG|yQ$M<$`Q=?_N&XAr~GJxW+mrd2C71LBaWa`<4 z{MEBB%t%?MrEX`YGJmJrW`@dTi#C?6DVi3q>gE!BvPDEJ=Q3Nd%e#t-<|i^2mh&>L znCHlAxKWNbVXCFx`y|g3Cp&ZWEB~(4ZJT4QJU=>Swc=V&;ht|h9xan!hyl$%qfbexu-KR^IbnLrh4Rz=-+0>KBjpSQ#p&)Ui`9Vogddq zmg!D?&fX_}YuavXj1ZXdrggJ_Lm2yo&6ktCz8%WCBIpBA1y_GI=ZHR$-!%C%s6$biyKD|g2IA(b*Md$0Ulo?M= znkIcL%-lKc`lH94n(MuTUZt)&pUlCk7#mx2UGTKE+3BE|N6Zlu)-EU%H8<_Jrf^oh z%c`Qsx}i`tztiR1!Onw0fA(a|{LZJ+vQRixac;X+vz~Erv*8}e8HIZLVpI)_m+DyU z3S96bo#}L!wD8iaPmR{cd9N!?*S%-XdD(K^tgs)P%VK@bZ&+&iZc*;jkMm-`ow!uL zE$`CNuxIy{8Mc>2=1Kh8W1f}ZmHW4L$J_6_l&jvfzFToZ?cX$3wf#1)`gY%+5On)c ztXOIKE~QHTAlZZRAJ$lJxmCRQirsN8q0;vF4@+4DD&?2%YJRjxK6c8BzD4VfSpQ5o zY3RKF1)u6hrRlqpOFpw5mA-2z<>6KJbL~5c7>#TCrS3WY_g?qKJ-`2&PhTbeb>Ac2 zeb;5rCT#h+#(Eb2i_Py2T$JU$yHUA(*JANs?{_)BzU6*5@R$9neJ}Z9gZI9B@ibwj zwFu*ycQ1^~7hCVRT(-L2`{l35@-KFecfVV3|0Un;B{i32kN)_w8f1`rxy;?dlH=ZY zKbrTozPlmgefQ$5=B;{BFZkY=-i#`L@oN5J>$?kky{x?DOW5Oero28i_uYXFQuhm2 zTYqsfx;L>hV#bkOK8b6s#h!0|FF$D`)6YX1RtnnJu2lV@OqJOh?lze|z6yGPM>#tXjHOjXO@d%trk zKNBN9GuU9!y8{n)DKzI!o3@MDtz5!1=b+v^p}UG{Dr?tzGN-*-$m;mC`R8#~ovE5) z>#bL@R~y;C=5w#RBFk5^-nuPi>cqMWvQiU%1(r+vEH62JQ5Ndq`k%GObP0l+XkKE+0;Q literal 0 HcmV?d00001 diff --git a/gfx/pokemon/charizard/shiny.pal b/gfx/pokemon/charizard/shiny.pal new file mode 100644 index 0000000..88c195d --- /dev/null +++ b/gfx/pokemon/charizard/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 15, 21 + RGB 08, 21, 14 + diff --git a/gfx/pokemon/charmander/anim.asm b/gfx/pokemon/charmander/anim.asm new file mode 100644 index 0000000..ca3d169 --- /dev/null +++ b/gfx/pokemon/charmander/anim.asm @@ -0,0 +1,8 @@ + frame 0, 04 + frame 1, 08 + frame 2, 24 + frame 1, 08 + frame 4, 10 + frame 0, 10 + frame 4, 10 + endanim diff --git a/gfx/pokemon/charmander/anim_idle.asm b/gfx/pokemon/charmander/anim_idle.asm new file mode 100644 index 0000000..c4a056b --- /dev/null +++ b/gfx/pokemon/charmander/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/charmander/back.png b/gfx/pokemon/charmander/back.png new file mode 100644 index 0000000000000000000000000000000000000000..b5e6cc5a7be0f9d2d3acec5955e4c5672a06994a GIT binary patch literal 385 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|36!CtEMIc z0|Q^m`XdYs3@jx&IivaFkSg7pSm{htMo!;sb0Z@`%3jx{#u-4OEi2P zC{eLjy~Jt`?~5m|f4X5@Pe+5`&fGVDn*PWfo^^gp oR|>O*Z=?k literal 0 HcmV?d00001 diff --git a/gfx/pokemon/charmander/front.png b/gfx/pokemon/charmander/front.png new file mode 100644 index 0000000000000000000000000000000000000000..ba365e42a7c8298761b18be6039b1fa1537a406c GIT binary patch literal 786 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsC0XDe>i z)MQ{_;7eJ5gn@y9r6kBN7$lyn;a17Oz_iiR#WAGf*4r5mH{DU-Xl?xb@BN*Q6%Hz% z%P-HoxANbOyDI5{0zVhI*stVVr?%dRW46t`=Q-={KDf4MQa+pSw`Eflv+oO)$ow^U zXxg&i$r6zcPR{G|B~c|#p=R^nwtrt1`K9rSjIht?(@R<`Ri`@s?)(>{_R#s> z-GJFyqID7P9=&=f)S2o&!+pn*?0)^LSKkYro9HQ&b=`K+qvscQx7D%!PEFe_WcT#q zf7Z(HF^SXJ$aL?1VYeX5PtF-GcU9O1!Rw8?2LR1mg z;tLmh-oE&?^*zkOoqkB-{|saEa;V; zvA|91+?Lh;b6zgob0lo*$_G6Q+phiKIv3H!e|OE-@^d`*ZzQLkmOT9?Fm=A=;)O>X zJWonWtvWpO@XY=FOWx?bFZre5RoT9-bBTLVr~VSv^q4|1&ybEeg$x;*YNF{WSJRmC zLOgE14c{v=M^gWOt?S*N6T_~_n#?pV=4H~{DV%NmcI6KqM(x`=h zPA1#*cb&#sENN4`&IPpp(oWy9s3+;qk(q2#XAI=d$()lp_h3r#Sg>804ZFa?NcJpSds!e^K_Qm>n+Rf*$ z?(``2e|w%bGn)T-nvBl1IS*Y9H5pgde>pSrLixd&a{p!*9hPJk-&@%BJKE;QRO7D2 z7E4vrw|u)Oey*kWxp4X;wHF1?3ZC76a7Mo?K(uGh{L3d97#J8lUHx3vIVCg!0BXU0 ABme*a literal 0 HcmV?d00001 diff --git a/gfx/pokemon/charmander/shiny.pal b/gfx/pokemon/charmander/shiny.pal new file mode 100644 index 0000000..d7a346b --- /dev/null +++ b/gfx/pokemon/charmander/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 24, 06 + RGB 31, 16, 02 + diff --git a/gfx/pokemon/charmeleon/anim.asm b/gfx/pokemon/charmeleon/anim.asm new file mode 100644 index 0000000..3acce4a --- /dev/null +++ b/gfx/pokemon/charmeleon/anim.asm @@ -0,0 +1,8 @@ + frame 3, 08 + frame 2, 08 + frame 3, 08 + frame 2, 08 + frame 1, 15 + frame 3, 08 + frame 4, 30 + endanim diff --git a/gfx/pokemon/charmeleon/anim_idle.asm b/gfx/pokemon/charmeleon/anim_idle.asm new file mode 100644 index 0000000..00a77d1 --- /dev/null +++ b/gfx/pokemon/charmeleon/anim_idle.asm @@ -0,0 +1,7 @@ + frame 3, 08 + frame 4, 15 + setrepeat 2 + frame 0, 08 + frame 1, 10 + dorepeat 3 + endanim diff --git a/gfx/pokemon/charmeleon/back.png b/gfx/pokemon/charmeleon/back.png new file mode 100644 index 0000000000000000000000000000000000000000..60eb4666f5aeb34f64a943d6b8024e10d5c91bfd GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|J})Oii9Nt z1B1!uAE68k3@jx6$|Noz>;a17Oz!>T2;uunKYwtAANzRHq&J#=iTbs`~>C?DB zbCZYG#oya<9(!^8uhpo%+}_~tafK;fKvBMPJw?aeqv5|aP45liC0oA?-^e(-ea_CSnn|N`xnXm49mjVbU6AO{yzF*x%$)B zs7O)Y@bpJq1_(bT6fZUu80D@M8Y+Sk!;k;#(ebz8(#H z7xmhDy59EZw@bI0TiA-*zL;oK9(#WBJ^corCtZmb7r%_Ys;ip%Xuax=4QK3OD)1#{UdD=gG6EK|tmXZBpQ zxv_*}ny?h}L>{4t{w*yBp8i{u|6cHe{Fc5>^;7H9CfMKFRQ%_ahL*mZ>t9u|$lZeL zq_Q2hoaVIUczv3K{j2PzDkf94J|*u%!iQ{QXU!>y;Fx;OSmdJeDv7JYlCQF^-1eIF zy`9bX{afd0Q)U+KIderk%Q)oYrqy2}9WsPi1MHEdJcl zHL*eOf%^JyaS0O9!UyKC?_+%P_ts1Xhkf&O8BQH2oqeeN%BB7{7bgesIF|i=9yfiu zo_=iHu017{FXf-B{<*w|WqxI+-6x^iC#uzT^D0itwY$eXI{chj|7-FyQ~i~De|Amh z=(?4uU(qSv7}<7=&%bh|-l5_>y4lk|3mG5VRmL9o>F_^UxnFO?e`X!%H+TP2Ry=>Y z(i83qO*gy#=|NA53)I~0c$ipDh_iA`JpXv9$WNI#uZj83m&*Jsiwiozer`rtoYV>S zJ^N*vjQ5yK%vaqpVLIEViR&I3>i;}3{lld88clu66VpFWYOZ0A+jOG*iE4LEdR&(L z&EBU+yjSq7ukciU#2q)wv@xZ&C{D`d*feGRwGo}}aZ$?)o-JMKlsJ<;{($%9zGjhI zm(+znTsp?J*ktl~Z{?bqAy;4RKJTsls5d#uEJ)^Gq?%oK0g=27JGg zMhjB*Tse^OV(I2KL;bDmdn>||-Oo?@5VX2!@#LxBrbq2Qw;||K{G)G2CaszBeY(oj zZQt@Q#RsX@>OS(U=e#>>{+H<)H3pS8<7b7`?C;+Viq=n;o-VaN>HTHu^eK-;^>vNw z4|->C|7@JT&As}Keqi2>U*2V!eScL;Ugcbi-_#dezcTfCybt eV6Q&i^M%{#q*{g6+$o>}gTd3)&t;ucLK6Tz`V&V0 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/charmeleon/shiny.pal b/gfx/pokemon/charmeleon/shiny.pal new file mode 100644 index 0000000..7a86d2c --- /dev/null +++ b/gfx/pokemon/charmeleon/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 21, 15 + RGB 23, 09, 13 + diff --git a/gfx/pokemon/chikorita/anim.asm b/gfx/pokemon/chikorita/anim.asm new file mode 100644 index 0000000..19f9097 --- /dev/null +++ b/gfx/pokemon/chikorita/anim.asm @@ -0,0 +1,9 @@ + frame 0, 04 + frame 1, 24 + frame 0, 08 + setrepeat 2 + frame 2, 03 + frame 3, 04 + frame 4, 05 + dorepeat 4 + endanim diff --git a/gfx/pokemon/chikorita/anim_idle.asm b/gfx/pokemon/chikorita/anim_idle.asm new file mode 100644 index 0000000..cf685d8 --- /dev/null +++ b/gfx/pokemon/chikorita/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 06 + frame 5, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/chikorita/back.png b/gfx/pokemon/chikorita/back.png new file mode 100644 index 0000000000000000000000000000000000000000..5ce5ae068a66ae60f3c49780176a17a98eca3745 GIT binary patch literal 403 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjkl3#8L(Z z1_s}bq!$bf3@jx6$|Noz>;a17Oz-Z*@;uunK>+Y0jzM~2pE~#n%tM@fs?P86t z*Z1^Ie)d5~_o;nvmPNqfH`14{iZ_>6zI>; zIi>WqYWJaO8>*T+Vt)N{kCqF(A{-?WQxwdXEU=(%nf%+Cj7J={zKbg_espd3Mv0^~ zmX;2Ci`lZi3ouOHqr>>>qYb0q&fg5y3*H}^D#PHa&hXep)1Sfd>S>vC4p-Flnyu$E z&PzWlD{$8B;V1q4135ng5_aBFXM8om`3Xyg@^9G&S?vqACC#peCWK#7i+U$|;?8!q zvon@PBt5z%)46&5$?j+C8&}VKd0Tzq(|=E`H(cg^)beGg1>+2N4i1e;ubP#v>^1wt zF=0y!gTqZ#k*}q}jH+x}jBd#j=frS3vVCGnnEqjzM#(REy-v1O`mcoDL80pD>gTe~ HDWM4fxaq3a literal 0 HcmV?d00001 diff --git a/gfx/pokemon/chikorita/front.png b/gfx/pokemon/chikorita/front.png new file mode 100644 index 0000000000000000000000000000000000000000..584f05cbcf23325611acfe7b653431351a982a05 GIT binary patch literal 891 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-VEDkn%)r3l>U&L=fq{W1z$e7@|NsAM_a;j$ zWnf@n@a;%?!N9=4QWE4B{Qv*||G64&l?)8bQl2i3Ar-gY&U%}ts>spS`u*SgoyeeMK=x~yBc#kS|E0h z(!1M1CbFI(3m4A$diby7$_k~x7dngd&RX1#@{!(desjqNt?B+@qDcy}C2AM7=RSP$ zL?%4lAbn28Gmpt7N3D#n#e}D?J6DrpTYUR|Mws_X)6-$jZ!?(5MajeU@_Gt6jlkaWxFHMt(onY17>$2l-kgt@_rrm1|CMRFwZ(Aw7 zZp&54M`7pZmALVC&FnpQLgdvpowucGQ%jb6iNEwQUU7T<+H+4jvoiNxowEipI@l`{A=B@`(}53&x}4FGk52ABWJz@t<7e{ZX0cF=PM z28K6pc8N1EFtC&a`33*~|NnokhFc{A1EaX7i(^Q|t+i8M3$-e6v`nr2UvAemO^_|-AhFrugrHk?huDJR>TC7f3bq!v7?wSkzm*fZ-r?klrO(3F#=W@Mxc#>UMbn&y%)5RzFMK&YBr;m~zwmeF>US`|h*kcr zHq-nto5bP0l+XkK0rH+_ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/chinchou/front.png b/gfx/pokemon/chinchou/front.png new file mode 100644 index 0000000000000000000000000000000000000000..4af95c53eb623a5804dd17b53e326f6fb3ffbda7 GIT binary patch literal 727 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1~)of%nlM1jXe_3PjFGR=bB z6AJ!JFM6`d=h)=DEe!L*TV4cDXZYmj_vKK~lh5zJ=5u`QTkN)V{<-gJ+8M`|HN+<6 zg>iP&wEr(N?wEd0#OcPgl5>3r96PrDyD8ApaNjF&Tc24;0)sW5y7JU34A&Ud8?+us zshDsGvs$ioUa@H3FU1Y7W-A#b#7=Z(^vyh-X&%yft;R&B*D;~tO`GbGZOhvpPC8S1 zNNT}#gN*d3bnkw{D@E~#lXyQHFJ5)JX4Og0Ouy)`+RZMtg8!X%+pY1{6K zo7#*2#i`F?KUk6x{OYWUn#K&?9p)duo4%O(@T2tKjCdYLW;L!`Sfii z%;F~Liduf2w8Euhk$}Ok&51|l7pgN?woSY~*>T$uE-#r1&uy3V4>wLfvU0B9o|Maa zf0WeYZoL+<{1kL!M#uC;R|P%?ZMc^dClp`*WNF|F{mPRkKL0N~=?#IE`@lAT>HVx4 zSJ^3lZo1YUAB)5M&%JvN>YqKwzvl?IzG0e5ab>4?+@tM#j-2%VKXZB=LqxrDK=Kt6 QP_kw4boFyt=akR{05`Z>r2qf` literal 0 HcmV?d00001 diff --git a/gfx/pokemon/chinchou/shiny.pal b/gfx/pokemon/chinchou/shiny.pal new file mode 100644 index 0000000..3345612 --- /dev/null +++ b/gfx/pokemon/chinchou/shiny.pal @@ -0,0 +1,4 @@ + + RGB 22, 28, 12 + RGB 12, 14, 20 + diff --git a/gfx/pokemon/clefable/anim.asm b/gfx/pokemon/clefable/anim.asm new file mode 100644 index 0000000..31c49b8 --- /dev/null +++ b/gfx/pokemon/clefable/anim.asm @@ -0,0 +1,5 @@ + frame 0, 04 + frame 1, 10 + frame 2, 10 + frame 1, 10 + endanim diff --git a/gfx/pokemon/clefable/anim_idle.asm b/gfx/pokemon/clefable/anim_idle.asm new file mode 100644 index 0000000..c30d12e --- /dev/null +++ b/gfx/pokemon/clefable/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 07 + frame 3, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/clefable/back.png b/gfx/pokemon/clefable/back.png new file mode 100644 index 0000000000000000000000000000000000000000..b049faa134422bf86972b25b9be3f054ed51f7b1 GIT binary patch literal 500 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|G#)jwj~1t z1B2Vl_a+Ps3@jxyzE{M%DDls($udX4(Wz^b+H5)=y3RrkHEeY~C9 zW06q4UIDk=nt}(@zlSRHJb1`t!qhMKA}Xe)(y&l6nsKjuT+`wQw_4bbrdG>6c__f~ z_*e4uRoe5;b+%f|{^>YXduHjznfyoJwv^n?IQwGQwTC!WunJB!KmFhZng3|W9<)3>L-f|)lALTU)L;*G8; zGB7YOxXpZT!oa}5QWE4B3=+@PaI0isVD|KMaSW-r^)|A*@38>~kMaNi=cSwP`!BjY z@106@cP&D*4G`E`=E5lI;8Jo)q1B#Up$Jv`4{r37*-0l zB~GdTFYtc9_?1-U+QnKS$DXiOtUsKv?f9EBvxP%6nzZyE+Vfr3S+(qz@3Grgs)Gc! z?OL+tR;}v+hN}IS6f!G&w_i9nhq3a@y``MRyb^m8vqNp0|D2hu(=EH~eUh*2oVRm( z@~R?^-0Hieb3h}Wb?Mue%G?a05?i%iX^AtqJWPn)y7D5+f<0=iAA@!MCT=||wQ}o@ znG;M}L_N}rd9J!Ow`K0SZK+gq_5HeIojNk+Ssm=Tc}_mUU*Ej^v+jwm|Arrt*Y{t( zu=A!`{Cdqhm&MZ@W_fH=KJDDsuwiXQ5KkWCGdJ6VrB4i(UHkdvN=BB9Y+A(n&ZO!q zs^_p@|=&|;nZT;Bvt#10)O|$T%5tRW5W4{g=<*X&R{n1uZ?mIaF6xjm@u;` zp)4ZUD(>WxIYw$bjh=ohh?}IW>0Rl(#930{q4IB$%Tp?*+&Y-mJ*`x_Uy|W0SC#M0 z&`P%5Tk}}g-}u@o@?`VrSHJGdPuGv#SMoE+bNYJQ`#*%X8vOb>>5@?01Me+8FP?cP zexE<-&iNY6soR1cG}y)`P10w1ePsH!kmM)cZ54lNP73tT*AL|ok3V(v)amJb4U+Lz zDU? zdV2c4uhS(wChgy!vireX{nXc9oVUJDPkLi35MQrZcc1CjKOr~!k5TTWjk%4Yjhk{r;+Qi%i>7&gQZD@r8IPhQ5E3WG#PHS!(ZdsoZvV z&OCirr?+qQ_iju~KXxt<7|G#)jwj~1t z1B2Vl_a+Ps3@jx)z zrI+;T_D&PSj+q?}1@E8CC{2t1rF3St6s_IQpjyOF%&M1=^x zsx3F~ADyB;|LfuA-d-EVUny(veUzC!)iZ8ab$-o5_U6Qx!Ci{hW| qd->ZS$b%(M{CV5D<@Z0IKf*rk5!)3D$%e0>VE1(Ob6Mw<&;$V8P{U&L=fq{W1z$e7@|NsC0i>G8; zGB7YOxXpZT!oa}5QWE4B3=+@PaI0isU<&tiaSW-r^>*gPzQ+nYt{=bt|Nr@znWBWx z0_)ltv6h!IZhg7J$Rjgz+9zv$gU_ekGxQmcs65e|xWH?z!*2KMs`BA_3>PhwDidQ^ zf*$LA`Ze2OTlcbV+Y`T1B{<{`JUY<5c=iFUgo}+89C1xvcKoTwdl#@Bxp1tqK*Fp{ z;rO$VrwW^r6=fC-cr)z`moMp@4vkpj`*s61-z2<=RoUc9BeCKCdJ=wta zD(Cg1ja$Nh@yJeGu6|u-r<2tNU&96Gmps|JE!dK?)V^|tGvA){teMYe9;pd)R#x`A z{o;f{!da#Aoo+1-)$iQqqz8yC`ofx=mF9PCw#t>pRH^CJwF@S&3zoTB$ba-h@{)91B+pZD;hv6tw*Dz~GdTPDt%ZKHg<@0`)`sW*+yB9?yd(d2AQ z=Xul15`5{6WW|J6+nqJPtZvLKY@C}uO~LKF$UNJ_W{lhB8J@my&v;hQvbE^};m5BT z|F~jY@^EDoo*Y@f$?Z5F4EaP#K$M;kxQQ;cd}nBFwy$UMoF!skz{ zvisz7^|-lh@*>akH5ZK!*L`~=>2-cd`X%GY^C`BUgU|1{+&?w_mg2EzcX;0EB-iGJ zeY&G_{_LkaI<}MNd7kI_dghpMt?lNoXWo6Exnmxujqr8j#`J5?)9x9sf1Xwob>8Cq zo~y3O>PxvXt<7|3CX&wj~1t z14CX?aWDe|14~JeUoc2KSHrE6fq~(Jr;B4q#jUqf0)?6tcvvg-zwa;ZWOVUlSpIf? z;j-jZ@yQBHz8sUT=M8$oxYl69>J0@aPO;VbaZk#2zVJg?EYtJZ#fQbJ)486WzN)#z zyz<cKCeDniD$`mp5(yzRIAcid)gOP5XjbOu#XP7s_}0 zZ@a#5yLLEZb57>X;$V)=+lAiQh@TeFFZpn@?X}x}wvT-$%ziL8{?m-<4|=y}!JIW3 o_Da+FIBoxMi0!+#_@Dh$evwqxZ8}^b%Ryn{>FVdQ&MBb@07Ea3T>t<8 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/cleffa/front.png b/gfx/pokemon/cleffa/front.png new file mode 100644 index 0000000000000000000000000000000000000000..6c411c3adc42174978637e9d01b6c230eb8e57d7 GIT binary patch literal 600 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsC0&pwxJ z$-uzCke5^(%)r3FQWE4B3=+@PaI0isVEpds;uunK>up5jBvwU^;G+N5{Y~6jTAORn zObOY$^md0+_9cl!o8t|cYIc12=wPgOq@q>m@TR#FJq|qaov^?bQ+o^zAS!KHFn8mIWMPg8dbdDMH;v)Ci>Im4yxtap4GZt{Aq3Hhz(FiC!j z<}_=ufHh0?zdl^n@NeyefCIC3{#)Dds&k5(%iLpKAuCzj?ar-dEIoBQ;sN{ej}m{r z9=vkDXl;SwEVnzHuXn6|x~#Bmi=*EGhFg!8#WGg+F|{35wN~ZoYgl&R?}0sQ%XV0P z*kcgN)%!oaZb5E{p zaZdlix!xx#{NfpZ?N+vK*WR4jd;ZwYUHM?Sv48r!zjKNXu8!Gr=Njv=DXq7bdA5e> zM@q0g&9b`Oxju*KqVn1pr?)pd!&rmzFIb#pXZ7A$@%qcg)iodPI_}iSD%$so=U15O z@4c0wth3Lan9{FXG>u<0Z*R}!0?~fnNc}#m&0QU9jrUl@SY2)~pPQ+<_a)EEJMyJz zfoDOM|6^!x_Yaeoo3r@Ggy}U08sEs&txOkbpZ|L1#KZnyd(M1_JD>4s=T&3xnV(+G zTt8Yk_l_e{5Ah&LC~TEen75R^1LUHx3v IIVCg!04P)$;Q#;t literal 0 HcmV?d00001 diff --git a/gfx/pokemon/cleffa/shiny.pal b/gfx/pokemon/cleffa/shiny.pal new file mode 100644 index 0000000..1c08715 --- /dev/null +++ b/gfx/pokemon/cleffa/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 13, 25 + RGB 08, 18, 00 + diff --git a/gfx/pokemon/cloyster/anim.asm b/gfx/pokemon/cloyster/anim.asm new file mode 100644 index 0000000..12dc71d --- /dev/null +++ b/gfx/pokemon/cloyster/anim.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 1, 09 + frame 2, 09 + dorepeat 1 + frame 3, 09 + endanim diff --git a/gfx/pokemon/cloyster/anim_idle.asm b/gfx/pokemon/cloyster/anim_idle.asm new file mode 100644 index 0000000..885fb68 --- /dev/null +++ b/gfx/pokemon/cloyster/anim_idle.asm @@ -0,0 +1,3 @@ + frame 4, 52 + dorepeat 1 + endanim diff --git a/gfx/pokemon/cloyster/back.png b/gfx/pokemon/cloyster/back.png new file mode 100644 index 0000000000000000000000000000000000000000..4b4f9294afa4f02835bb1de48344afe194af8e41 GIT binary patch literal 556 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zcy%VvSKy^ z1B2N49~=w}3@jx6$|Noz>;a17Oz zqi6Qyaf##}TC6>H>%Z>qBlExLmwxc)y!M`RN#93rr=phvo_{(tKCBW^s`F}6{NHeD4H<%i4zUVxuvQEWv&z^}1FZhoo3$EvV7ag>hWmnL8Zsvf%N#Awzc1{tM z-<;&+5Uwd1&7Z#et5RH5ZN}b5%G`m*2iP|RF{r-#QEgChDLgizy=tGv6v5l4N6$&DiyHj{6VmkE_(uxY}w{ zns%e{i!!IC5le#HI#1I<0Jfi>hptA^H}aTrY>J& zwM53@x5Vy0Ol#Ejn7)cJ2<~XRy!(A{h;PcVKRMbxAGfUJaZ%T(6)G*T`eLyxw{zFk z^Sf3}`!!HVxeUR%Rk1zaIVJRDNj=v Q7#J8lUHx3vIVCg!0Qdp`PXGV_ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/cloyster/front.png b/gfx/pokemon/cloyster/front.png new file mode 100644 index 0000000000000000000000000000000000000000..fc725f85c3fb295515437d5613de6e989c87d160 GIT binary patch literal 1257 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsAMgSI9s zW-~A_h@Jnz!N9=4QWE4B{Qv*||G64&l?)6l9iA?ZAr-gY&U`!Vjsiy;>%0H+q*;Fk zsn6VEyZo+m-J6p1&umH^HcPjz*IV@MnN!yKmKNT79QtRo?{X{dyAr#;{N=mW4iT|^ z|9?;POL7bR?%DA|X7)!p`@9n8%d9sx+cgRjU$Um| za$j`pVVe1)DR)1<=3gDEB=FWFBW%_MCg<6U6r#2@IKNzKV6%9GfsDnpRoRPND!t?4 zmmhhl)abeX_K!jZx7jsu{3`$5lozTR{``66h~Q);b-|!Id&8BQ*Kfqu1~&;#+G6*Y zTWrx&*@pPVf|KL|qm+~cOC-6)#Q9W%K1>yNcb?xLgVA|70+ zTo}CT?bB%`dS0iUE-nq?jhX+;cG2a#ca674{!*UTlA9vHy_<2yLkF=uouV&GyFMJ` z&6)6dPOx5DgLg=`otc=|pX1L|@BHL440QKp_nu>RhE;Lv9`jvXmW(->RUOW!9u|1| zHr1%#_i46$s>zWV#(I-?;{yMO792^F`a{*HuiH20^&+Jm#>OT-F+GbfPUBuPXLqIk zZ8?|ivb9zHD*|qdG75fD4Rv3&TJkRU%9RFT4EM}7aLk>wdbP$}0aN+u$*0YxWnB$D zl6>D&Na~i%Iga_aLgzo(wS1|p!>=36?XNQ2KU+lFmregv^)RPh+P*#Dp5R^fWxf@c zOf5OS{BzzusWqm^U-0+ghJYI%-zTysas73EGeIhi{UP(4gyJ{XU;KO_S!Pga@#;d_ zpKA)Hc9UAI()ho7xOZB;+o(LD-6Zh?gSAqn&ntsB7RBx={N)!6%50wYX&iZehcV9c z!yM~F3x9}~tGtTXp**SmIp5;G!XGK`Jf1w<>3os#R-d&|<%vSJMk}?A0d|!=HdCy> zSj@@a^_)+&|BUQ1o5FSv@plTWbD7IOSnJ(c$WZl&FLHLPbyEG7qIT1H+~pqiB@g-% z3<}$4+$lPK=dks=0Ja;2?Ht?hB#N2ec{r`)Az$oV*>a1-Cw=og?j1iP8#iO;VXK|I zQjVo}s0V|L4vvXv?C802{)W~sQ#by^2C-Ysfh?D)9PMK<~!htpF&uXO zZ}^sU&u}MH#{H}{mvz=XgmU}Bdyb~>EzViLxVxwM#nC;7?`?*d0a9s$qB8T|!MDe| rE7`Zd1li$!);jCn$NKZub&NuJPHhiu&zmwZFfe$!`njxgN@xNAKQBy# literal 0 HcmV?d00001 diff --git a/gfx/pokemon/cloyster/shiny.pal b/gfx/pokemon/cloyster/shiny.pal new file mode 100644 index 0000000..973ccfb --- /dev/null +++ b/gfx/pokemon/cloyster/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 12, 28 + RGB 11, 04, 31 + diff --git a/gfx/pokemon/corsola/anim.asm b/gfx/pokemon/corsola/anim.asm new file mode 100644 index 0000000..35ce1e6 --- /dev/null +++ b/gfx/pokemon/corsola/anim.asm @@ -0,0 +1,6 @@ + frame 1, 10 + frame 2, 22 + frame 1, 10 + frame 0, 12 + frame 3, 18 + endanim diff --git a/gfx/pokemon/corsola/anim_idle.asm b/gfx/pokemon/corsola/anim_idle.asm new file mode 100644 index 0000000..1ebdbfc --- /dev/null +++ b/gfx/pokemon/corsola/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 4, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/corsola/back.png b/gfx/pokemon/corsola/back.png new file mode 100644 index 0000000000000000000000000000000000000000..8550813abee7a45015ee3a694ba3ed14847b5e83 GIT binary patch literal 388 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|3B*gbIWW7 z28J~*THhHM7+6Yz{DMK^xf*Vj3=E9Qo-U3d6}R3_@fKoMW}A~w&P;<-?&%$9nlO~4WCvutYR*ZaAFLxJrI15kHK%fzf0~x@da}j z_AwTl$Ww-eCnE*Mr~x|F3+QXmG48 zEP82f(UMh~Kbjb&`z9^>vXcA24)r^}6N}R}fBLLYxyq=^R{O=zDb-9no7ORiUs<&L zK**M3uKfOvf+-J|EO(g16~ijP8v3AD#>+rt{jGkbKRpT3hg=hHMeqH^jScop{%UFFq}voxW?O zs>`#Sz^1MIujaiuEcwmbKH>Itmh(Zvw+{(^nX_(^-JXA}rg!XIPoFBS-q0ZP+SMVM zagE*=wSZ+)mie!!+^NIXD zP19lUpQ!%Y!dIV#)Z=_3c6}5|{3PUfRygO+&B~QrZ*!%@^sg2ldARh-xwh8nQhWy= zF1@1W_(|yetZqeVebb}Xd#1pQfzbcd^r!az(2WzSG_h7VQ0o5a(uVv$$$T?Do%3d% zp%bU2d~J_OjA3QxOZN|#zE)m5<}EY>q7g*e9rk|RSM*f%jdtNP)fH1c+~bt|0zWi< zWjH)>`hs9R`AW{}zIhdyX8K|sHE~MTEOC!i*Y5Z@>C^&l{apXzb9-1+xY_u2JXyZz zr`@?zcVGYBA@ct5quQ7cK@eyY-}T)4e%-zjCn@bdR)J&x!9iemz&k#uOVNGN-3ezI Q7#J8lUHx3vIVCg!05s-ae*gdg literal 0 HcmV?d00001 diff --git a/gfx/pokemon/corsola/shiny.pal b/gfx/pokemon/corsola/shiny.pal new file mode 100644 index 0000000..8aec60d --- /dev/null +++ b/gfx/pokemon/corsola/shiny.pal @@ -0,0 +1,4 @@ + + RGB 13, 25, 28 + RGB 07, 14, 10 + diff --git a/gfx/pokemon/crobat/anim.asm b/gfx/pokemon/crobat/anim.asm new file mode 100644 index 0000000..b37885a --- /dev/null +++ b/gfx/pokemon/crobat/anim.asm @@ -0,0 +1,9 @@ + setrepeat 2 + frame 0, 05 + frame 1, 05 + frame 2, 05 + frame 3, 05 + frame 4, 05 + frame 5, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/crobat/anim_idle.asm b/gfx/pokemon/crobat/anim_idle.asm new file mode 100644 index 0000000..f513910 --- /dev/null +++ b/gfx/pokemon/crobat/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 5 + frame 0, 07 + frame 1, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/crobat/back.png b/gfx/pokemon/crobat/back.png new file mode 100644 index 0000000000000000000000000000000000000000..944c3a872ddbf27308080b0fa6628eac68feaea2 GIT binary patch literal 354 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7KgDUSqE|Ho z1B1h!>&qD!7+6Yz{DS}g|NlQ%!>y8mfsxVE#WAGf*4e4vOotUXTw2TjTW^4uh{Wu;B|8@4{? zcy(3#U6{wW$6Fgz>ZfX|TsSVE&ln=lvZw5U$OHcivkqrBICaT4?N}V#aNQuN&*}oR zgTeukD@}sJFSZ<7f9_n!%*J`KvrCT^{4>ja?9RDtRe05B*5h8r)~+uq6>Ilea^7h= zHCyz#wp+svbz|!%+qf7TPbq##56R)0cy>p&hn}0zw6~)opn2pS&_#j_u2pdI~jSn zyA7v*S-Dj^bm}bO%`sx_Bk~xzKOFTl(eB2YP)_d_-X!400D^Bl_$d*cdc0t$kk73%hvvOm?R48`KKV7L@m9OZYnn0v4iV*LgasEqj=|_ja=JU zp2}&tEWwBAASPNlwQ(pLUIXS-NW{nohfdhDK!qAMpXU(_41?Svxd%F^cwvkn() z=IJ{g(tYvp;m7OEKew%Wu`iiDr1toK>yUG|;zo$?*;f9UPG zZ@Bu-z4sEPOTSz1xxesb_WSaR{fB?c?tf?f;#B#GsYS1>R|HnF?|Zya&f=47|FokM z-)F30@T+OhD!o_TR50g)SEl-z2S-#sa)ksZJ)CIpna{QPhC+72N{tJxr*dq%Z#5jA ze6wDt$hA!Uft%p&vmZZvn9=^-T1@r+Z&|MAfBD{*?|5Hu|KYyFwe7$A-XHocySZO- z?|s8CHIO@;FJHg+{zKjI`|rz_h}3+|U0Hnpt<7pWO5Qnv*31 z0|R^Ju5tzj29}Z_zu^D>|Nqa`aI0isV663YaSW-rHFavV*kJ_@m&Tj_=dJFT7(VIP zoH~=4+#DS)b(}9QPjY;~ZN;G6!couI9B}(F`yXx}CY4W&3}!zzZD43TA-%y)@9?X~ zts9oaG@P(D*vz#2=$B71jj|o9Ds^m9t~CXwtjx68)A5qm{K%EhOXK6FnJKF~PQS-A z`~R~?9ttnM^C?{tDyYiUs9xxqlhnnxOj1VJaK+TiJaZO&iDkSK{`o*$zkr}J^TA!W z+%rP_nzkI^+~6fDdxvdOyUuJw-rW|`b_~HEHfSaAHcnQ!ykZ5^B zyzxfTu^+QqwzzFI@86p7@Z4b=w;0>^%?HY-uj7AuD5QAWBoWL5Wwp#aC>%=Qd}(&d`!) zzh&0O`(@R6T{9azy`FD6d1b=E%~B~Iu?+fpuZ0#YRS=!lux-l`V@GfGCBIFkJ<4GV zEtp}Jsu_DmdX1^f*6pSXp0e!C&bD<6idUat<8#aZqF$16L*}H=&TUNjFVuQudrofp zDOt$vGkc+rNS&|J=kvMCX7roLJhNXgd0x||ev@9seSI%pT)W5i=FOGEU(U*Gd^#!9 z&O$-!@UDGR=I+||-t_PRYjaoWlUcpTwmsq5CwsZ$@x`*`tnGmT(uE=`=c}y^nk}r6 zYW^+n@#GlZZ|_UHb~~{OR=7``$uL*BM)QEncVG5>=O;2X6X87Dm_2c9dyFX-(R&=CsK{mS6256W7LG>e+Vm zzy+1Ief(!)eV1M4zpV1)-~VO_v!9j+_kNxFw{w&E=0}sJ=N*0>b&XRe?NHP72dg7& z7A3Yx>p%6=GZg2l{UF3ucc{B}m3w)d)7m??3N}7aeV);C+$^2NKkk#4^o}c$=?A@+ zay4db`g6#8^5W*7Q>W+spIw<=^>}IGMSgwRIIBG+6))fKF%jSML1^#X3&wG`0(tg) z(X04$NvX>`ZdU$tR{e`@(TD#oJ$qpC^e)@?AB85w>^$l1)oJ3oiB*4V&jp?tVtbaz zmKU8)Kj`f^<;?CqDrJjP5|;7D6`i^JRP~PKukPty`|m$q+Bm_i@?~N3$L{G>)i)k5 zz2{z5+4;8PfSvx$7ZxBle7N**>0$5o>1=V6ULK43aOug{9sF@sd*r@X)@LT}f3o!W z>q6`A)6*Q+RCcPX|FqV>8{hwX&wduG@6*ry1#9Gk`37Xt|C!T2DC-}UmMpLI{PcGA z>^&^MdZ)jsZT`LI$?W>s({t7*&z?Sk{jQq+SK-v@)4iIH$m!dP%-<7o&t=zf@3|+~ rlp;R|McKy0e!TR_=O4HJUuNFzn!(Gx-|{dpFfe$!`njxgN@xNAcmP0} literal 0 HcmV?d00001 diff --git a/gfx/pokemon/croconaw/shiny.pal b/gfx/pokemon/croconaw/shiny.pal new file mode 100644 index 0000000..efba52b --- /dev/null +++ b/gfx/pokemon/croconaw/shiny.pal @@ -0,0 +1,4 @@ + + RGB 15, 21, 14 + RGB 13, 09, 23 + diff --git a/gfx/pokemon/cubone/anim.asm b/gfx/pokemon/cubone/anim.asm new file mode 100644 index 0000000..2f497e7 --- /dev/null +++ b/gfx/pokemon/cubone/anim.asm @@ -0,0 +1,11 @@ + frame 0, 04 + frame 5, 19 + frame 1, 08 + frame 2, 06 + frame 6, 03 + frame 3, 02 + frame 4, 40 + frame 3, 02 + frame 6, 02 + frame 1, 08 + endanim diff --git a/gfx/pokemon/cubone/anim_idle.asm b/gfx/pokemon/cubone/anim_idle.asm new file mode 100644 index 0000000..5721310 --- /dev/null +++ b/gfx/pokemon/cubone/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 5, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/cubone/back.png b/gfx/pokemon/cubone/back.png new file mode 100644 index 0000000000000000000000000000000000000000..d4069071bbe8eee3a5b938ae2e3086e56e91c8fc GIT binary patch literal 472 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjRJ=OOPT1 z1B3S_12F~$29}Z_zu^D>|Nqa`aI0isU@Z4^aSW-rb$4pyq{9XrF0SAIzPDj(X%U`ihreenMPkeEERt)p5@VJDY;vx7bgCGwzFjC;?m-` zd{=gqIQuDKkWSfD3`<5E|wqK1yAucpsoH&4(sn}LCW!PC{xWt~$(697#C(TV^7 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/cubone/front.png b/gfx/pokemon/cubone/front.png new file mode 100644 index 0000000000000000000000000000000000000000..de641c36d2f3db4913c35f4a51255eb822bc0384 GIT binary patch literal 855 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V3gosW?*2D)OB%VU|`@0@CkAK|NsBeIms7#J8>N`m}?|NsC0KUc%8l7WHgo2QFoNX4zUvl9CcD{!>2{`+6QPiuik z=o!76ciDHPMDE_M(PeXV%ar>vE+HH0T&)?v0xwX)oJJ{j1(x-|7o&PBGZ zPam~jvi!(WEq{??_9WG_DW>LA{PjPoE_vl!EPPC1>*uE029Ng-7Jr>FwNz{euU6Pi zrnVF*&)q%e+kLjo;CQ@m;|^c5Z;e|HpSKcZJ{Nq0X~XULOQmKXR++TT$Jt#kYqjUR znDQSF*2&g)_C&sR2w#`CpmoBnC-PI?SiV$^;P&o+TF1KUc9^+ZQ4EvmR*8jTJ`3cp zuaH!Vwf@5x(U%f$pL_B(SN7#CL3W0&X_==hbbIW+^%VFV$X1i@KD@+FaBuCTZF#L4 zuMcp<`+iq^`18fX$FVEDL-W%Mt>d4)d--h|*Gr?^`uukMyUcSWT5@XTv@CuWMB7N66ozU^U`@tuI8XSe5EZ0N9XuBv+0qvPLY z;k@9d!VUA=Z(G*RYx=lg?zCSM+~&M|Ty%KmGtU!}(~Y;yF|2%fW~N}?#eFv;tas*5 z`|5Me_~gtdJ_rwaSaIBEJ}~i3|9i#=tvUCZ9Znkjlylg}KH)v1O8UP^#@nsayq``o zR^aKdWZqL*dRQ{-UcoZ0_ZH1HLd9+0zipa#vP$js%r)tgjO7cSv9}rNKe@bX{Zt<7|NkDte@jgU z1_txlzn3#GFtC&a`2~Z-b2Z#585kHRdb&7;#fBwCF-js*ylK&iU&1Zb%-En39p2~+ET8?|zIrg47a-U(+qb8^d~?Y5 ztLS)@vCdlj zvr1z2?A12^3K-_yI5A~5i*ntvCfNn=Kg`+ArEa@ZF8}5-^(jn24;gf%>!mJ;2vk4# z%>4MY-_BhH^ZcFHEPtqwC)=?0;9Wtz%MZ`C9SQWGbiRM@(Rp<@g7-2s2bP5k2->Nd zeV^TQ#{0>eB=$o+oHQ%dlyp``={~z9yge;jqOaoOyK} zlhL|$k3{xf|H_>qbmLX>vbA;`Zyjc-iwN!v|0f(V*Ym$rM#~k^La7BVbLZK)&A%+F zRd?i#$$_yAkeeaJPci43xb#3R$!aSzOL2oWE<@&J9y1^{P^iA2J zjwxLee%}AL>&OlTCAG-*>9^Sz{uVl;Sm?MX$Y!OYJ+n8b%psn=a~K#H7(8A5T-G@y GGywoQ{o@S) literal 0 HcmV?d00001 diff --git a/gfx/pokemon/cyndaquil/front.png b/gfx/pokemon/cyndaquil/front.png new file mode 100644 index 0000000000000000000000000000000000000000..4edae6bc6fb41c47edd49db54436d6a5d06a8ce1 GIT binary patch literal 776 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsC0-(&c1 zsmZ{=U_Sfzas~zlmXaX9V32sOhFc{A1JiO(7srr_TW@E+E_$rM<92cR_xk6iyA&Ok z%zO84i@n0kBWw8&P0IBXikdCmwRTlw(&A>7^ZpMGmkRY3FeSeKlH)ipbuo|7Jh%1+ zuAux0Wm1tR1qGu2edyrRy7~FoJpD`;F21w7o|)JPe7UP6w5@}MnbWwO#dLvK`r|hT zjF!uOKk`uJqL?77#&0FFu1$v*CCaScYAbubh%Iw((;m4Q?s3|Dby05?Ybc#%WEGyG z^x(w42UP(}&Sdh<*r6b}Jm}R5lf!MQ8j__mxqlYOUa(#`Ii|R`wRv8C*rkm9TG3q^ zwmaI7RGd){nEXQagj3NG*EG|q?dr^?w>1u}=wJ3GX4QheD{2!&ST0{tn;^PIT3`Lx z@9(^Q8J~9X#kIfk6;PHa108rr`Xy6h(25Y=$%r`q?|0oo^x?)G)m zrfV^J=aoJ9`{?PG^wpWKOjK*<{JJh&eEYm<&Gdur%YSoU-BDTkNAUaSEUBW)nH9S~ z2KM^%1+7>sX136GpPamG+5h%7-^eR{3I|Jdq_4iv+xh3B@}wx6$!A@su2VnX!S{f@ z>5{u2-_c8r!RG_QlJ?d2@|>SgwedlYklehFno^%z7HFE!J!6s~|Df_r@!px93M?JMAXhe6Flbt9aJ^b>>;) h{aLlos-BrwJ>w7gE2U9$sEPpuJYD@<);T3K0RU`*bXNcX literal 0 HcmV?d00001 diff --git a/gfx/pokemon/cyndaquil/shiny.pal b/gfx/pokemon/cyndaquil/shiny.pal new file mode 100644 index 0000000..5b3df0b --- /dev/null +++ b/gfx/pokemon/cyndaquil/shiny.pal @@ -0,0 +1,4 @@ + + RGB 29, 23, 09 + RGB 22, 00, 19 + diff --git a/gfx/pokemon/delibird/anim.asm b/gfx/pokemon/delibird/anim.asm new file mode 100644 index 0000000..1c48b79 --- /dev/null +++ b/gfx/pokemon/delibird/anim.asm @@ -0,0 +1,11 @@ + frame 1, 02 + frame 2, 10 + setrepeat 2 + frame 3, 09 + frame 2, 09 + dorepeat 3 + frame 2, 13 + frame 1, 02 + frame 0, 05 + frame 6, 05 + endanim diff --git a/gfx/pokemon/delibird/anim_idle.asm b/gfx/pokemon/delibird/anim_idle.asm new file mode 100644 index 0000000..60587ef --- /dev/null +++ b/gfx/pokemon/delibird/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 4 + frame 4, 06 + frame 5, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/delibird/back.png b/gfx/pokemon/delibird/back.png new file mode 100644 index 0000000000000000000000000000000000000000..367d6055ac2b93aeff26c1a0b89426153efab173 GIT binary patch literal 447 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zqaN7cP9Y` z28K&>FMniUU|=Z;@(cd||NsA74Yx`L2F5r~7srr_TWhB^PCBf>;nMo|f4!ZfN`lFa znVXG$Z@npY4Y+)(-sHghcVArE8VZ_A8+=xVAAZ-#)$r>0h9_cQcxT-4ad;PIwc;eN z0*8zCD{BXVYiVLTrtmLgyRd_G5uerTopZv@{VMWFsC&7;A@sj-fNIim_IJE)2Qt!C z7$yF$-lM*mVb6y>|L1b|Z<=r@TVz_R&26{7z}3I@_%^8i+$;WGRC2~!#bZK^{Yoq? z+vl0g+OTfxwGos&c|Aduww$<{tI_9g=I!woiT9o?Brp#tRISb>D2B?B}+w;L77e z*TrV09sKj!Hm$F4nUSuUZaedbZ8N@eKiV(GeJpc*`n|{v@-~0_;}(e?__>AYA;S$O z?kamO+kYNs<}!5K$t*0q^=HTP=DH+(hWiJcd&;NTN1Jg@T;!qC$H2hA;OXk;vd$@? F2>>_t$^ZZW literal 0 HcmV?d00001 diff --git a/gfx/pokemon/delibird/front.png b/gfx/pokemon/delibird/front.png new file mode 100644 index 0000000000000000000000000000000000000000..591271b3abb6b2b46a403fec9ec238de2a3f182f GIT binary patch literal 951 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U<}}3W?*1A7tb5bz`(#0;1lBd|NsBBE&sne z2{14)T$+3NBLf2iOG%Jl@c;k+|L1DBRWdLzhk3driy}wc(eMA>?^Nzs zPPzy!=2@wTkdXnFpUac6dH2{IN)7QkISHk)YFiv%a0QYK&xi z+?R7LxAMcc8LX0)-&>D#Es;BwZ@|^{^Rthkj@&$f6tNpiBhR`TYaZa*;2dgmJ4IPT z&gi{^k+nc--*>rF=Tls~e@8mrQJln)QN#Y*@xbCV#&+%3d4|{S#P9j7vTlp%miBs1 zV|h~#Bk5y%*SvVO)ZNf?LQ(980~-p1-p{I1T$42S%Z^RSiON9-S2$GNyv|_q+mYdM z#ofSIyFBIjiCN2@ij`^8R|ob3OU}S@kU$alv0c zZ8)aqdZ3x>wTjdpkv$@Nt`yys)qh%Z+bwQqaj$e9 zKT%~iwu_T`as0IR48M2E`o7ZY6`D}^QvajS-OoWrTO4hV-S`|-^;u}|_SkK@XZIYL zEnOE^#kXL}{VrSmslqC$0(Ab>ElLUWMtlZQ#f4Y@nW#!7pJ(H*N7+O}I+)?l;NOhTX+@sBAFxQ^{I7v*t zW{=AA`Lm}_*)V5MO7V*J>1;=eK3tk|seg~j@-NEzXC?0*^j7n)tT?GKr+@l_o!8EK zn@)Y&{VRw!@H586M}PP49S@d*U~nzx^slOaVrnx_ zd;k7*scrhUuS~%Tyb5$cR1H- x#$KBqbY=RZ&xIdt<7KWFWKr>H3m z3=E}Cj9(ZS7+6Yz{DS}g|NlQ%!>y8mf#HLvi(^Q|t)rnAg_;dGnxFjtU%6uUw^a^_ zx9|R1#NWxu*nMI?|Aiym(G_0(31wTn7~V?6iJJcSYEt9cB%I8&#$rCpP46}HzW3bz ze%>hH(CY)sg{I6r-)i?kNp_{f%AKd;#*S3gQWdr9fa z#~)`V8dvWx6489)^+QGZ=elQk;)kXvob@b{P4usL&s@8H`wih~Jr-g~8XK*oSbqO5 sZaO!2S<@4xXNM>5O^BIvx~hV4`X1&Zh2m-b3=9kmp00i_>zopr04ddyivR!s literal 0 HcmV?d00001 diff --git a/gfx/pokemon/dewgong/front.png b/gfx/pokemon/dewgong/front.png new file mode 100644 index 0000000000000000000000000000000000000000..b73d51c07364a8b1d407afd1a7d17fd087d9dd83 GIT binary patch literal 1578 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU^3ufW?*1=G9@B|fq{W1z$e7@|NsAU*8X>j zn!>=qQ0m0^g@J*Ar6kBN`2YX^|8q6mDj679PkOpIhE&{oJGV3JjscJB+vWfNKR>p6 z&yk7DTSV@CnRCdXa$5LF^R9zC`S&wS4Bz!({+=tA>wDrvCw%;TR6Fjm?Hmsghh0(+ z)){Sd=nq=wvCi@D!MOpuUMbw%oi$-9$J!mH9a_6jeSCQTtCy;mhKtx|2a(cby&Ix+7)U%%oQsrmWFsY41`=324#4g21!bh0h9+c&GL z)zMyKY1o#MfE`MGoVQXF3!Gi86kjcI&P_4W@D-n0nlpK&&KmpGs@lztud?Hx&svrA zY0Al1;b-&C`yN*5$*-RJ>Qcc@?q>dv-V3L!+Ty=dY)ZOIl_PhszDVIa;U7=6XS<}^ zb-w;yXfu0}a9jC~=)A(fBNG|2ytjNfXQ(or;fT;5ohjARg?d{PCob$Qs8%eBRbQCX zdi`mo%dv&0R^MJ=BjPpZhqmISfKw8Drwn|)O*vZd^s89vkFD0%FPAI!tQI$_ayV%4 zS^QAzX3?Iw#q#yZ5m{c99nRam3i;K7yBU{m;V3?mrED5`WLNsFq|!@~Q?`bmKe(gr zbzn=fulnSG(49P1OBVgjDdbY|JL@{VRXdg|rB1-f^7RInXS0?yO%1AAsJ-yoeeJ&z z3swhMT1igNUVr9bnNXkhhMPUFgw6%;37!}EVEd^LiI;wyOOUv>*67!Z9KlOBFBh*Y zTmHT3Zt8!=^>2?_8lK%YTj8=2`@3&5tuFXld4ASE+i^5&*JM}z?z3@0X}M9Ca+g<# z-`VwGP0aimWtU8E_}qRXUR{1-cW?E3nG>>4_==AEKj?ci?cC1A9Q`|;XFa!h#3%W9 z+EnW!`DQ1q-`(Igzq3(vl69SF`HHl81@0j+vsc~YrP&dGhA z`-!>yOZL6nJDsmZKTUrZv0vv-Vfy(4vfkAoCz(Iz`##A!&;4(wb>8!v%;ih8pUkkn zl&f#QJ@V{5)$#?Ew@lYB@cBE@I?87H(sQy!?K=vC>sCv@TzI^Fp7j#$w{wG{1m^B= zX4u>RW~VbZ`?~Da?KJy1#JB`wk7U@@a-;9hUberXJm5dH-S8I_`_hYTDgH_dV%5 z%J*}M+`b;`tSweg`;IZ5DX($bx7g&1$$iC4%X!bOUGC3qy7j`Q$UVZ-R9PYMRHbnF zjtb)=sq-J6y7q0Nb=M{LZJ%aFJ(+3UC6xNU&u{y~zFXUL&dA+4B>Puy!~NEGJCjW} z=iXUZ^?!nOUP=F*hjB&i%H@CT-c@)jRcQYeC_ivr+Bf}9qgX)y4rb$@Gj=R~cv$c&y@)tGjt6!!umzVtHI}o{Z@%i!{{-?@MMD9Cm&0XH}lTZG85ZgP6&$5c^X6;Cx z{Qk$XI~z}x&)BiJ`1tcX7a31WmVY_m^iHAtkITD&#}9wZ5uLyJQE}K4zGv2Uy7v>c zGftI9{7yVoekSjY#(l;7&$4r`+np?baXaqcA4_fNa+xRA`<_{@c7C_vsdd@;NZG=6 z%ljW+?`ZzXSH!-v`Htf|h4Km3CuINgmdm{OF-H_h=m|{4kM=tUi=XyAKUKMI4v6@( z_|C;?GUumGwgx9zh%q}hwi~~zunDg_EE`|EuI9Mx@8YM@?{3W1zF&0wSeb(=O7(PGs{Z3*1x|;K{vx}cbzq>I`iK zek%88-_@N(!TS#Xon6yz6<#;t{e|bJ`aj9Oin07(2eO2*oagx|{~e2&#ZdfqrrhBE z$MR3IHRn#9ll`;1@z3r?xZgm&|EE>{hwt<7KPO7@n4uyA z1A|rlsa6IC29}Z_zu^D>|Nqa`aI0isVA$j7;uunK>+O_4zQYPU&YiXYt@)YWHn1^8 zeRrRr#dv8mTNS+mw&o|Ns$>{ZisN2)!1PZ-DaA6^Eb2Occvva95%aXjrW z@qRtIX^7c$S?|Nmh^9Q%_S zj3!A-ug>eA8~p#s~)oq4AW3E^&4O==drg1}0bU-xAJ+JKlTR&}`A#ugz-}5S=(u-yLr8Fim zxct;ex4!iL?1`6!J3mKE-nKm}`qHPV?@p^n1+DDf%6@4_ckXLV)+6uzHN#$ATRb80 z;l7PWRHF#5ZC&r!ei^}`Qy7xN)7WKwN0byRCj62Rsn>g-ecJDUv;}8HOto0SF{7s|&bB|8 zbFo(K1V_LFV}}P^B0qc1ED3mHZ1F`>Vy4|>yU8ErYuQ5GzuPUoYwH+UenS2Kzsp~& z5}z8YsaLNJpTO>KG3`UKL9H4HDl0!vyKilteR*|8p4p1WMS0%@K6>jM-Wj=k$=5{% zdEZJ}SNGn%lapFxXTF#-_RQHmo9pshi#PvcTY7%U`IIH+YbKsI`EWP=O6rU<{YiIr o*gZ6!^#1&l-^TSv)9o1e4+>A+H1$R;0|Nttr>mdKI;Vst0EVvn#{d8T literal 0 HcmV?d00001 diff --git a/gfx/pokemon/diglett/shiny.pal b/gfx/pokemon/diglett/shiny.pal new file mode 100644 index 0000000..ce41b39 --- /dev/null +++ b/gfx/pokemon/diglett/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 11, 04 + RGB 12, 06, 27 + diff --git a/gfx/pokemon/ditto/anim.asm b/gfx/pokemon/ditto/anim.asm new file mode 100644 index 0000000..4e14a01 --- /dev/null +++ b/gfx/pokemon/ditto/anim.asm @@ -0,0 +1,10 @@ + frame 5, 08 + frame 1, 08 + frame 2, 08 + frame 3, 06 + frame 2, 06 + frame 0, 12 + frame 6, 12 + frame 7, 12 + frame 8, 12 + endanim diff --git a/gfx/pokemon/ditto/anim_idle.asm b/gfx/pokemon/ditto/anim_idle.asm new file mode 100644 index 0000000..1ebdbfc --- /dev/null +++ b/gfx/pokemon/ditto/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 4, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/ditto/back.png b/gfx/pokemon/ditto/back.png new file mode 100644 index 0000000000000000000000000000000000000000..bf1f4cb1a0707519ad639ebb551692dfd2dde891 GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zc=}Lwq*+g z14HRwITr>729}Z_zu^D>|Nqa`aI0isV7TS!;uunK>+O`&LM;kBEHh{R|Ns1{s+UmW z-Mvqbkv8$ zZs!KW8;c+8`Nj7{*PrF9cuih|yUlI!dC%j`D$X!}tkY}xu;QM?oe%E}GLPR@n^pIM z!~B1%-g{ZzYmd#hE~t=}>0h@!#c%&qk;^vkkE)3KZ=Y4nuHJjN`m}?|NsC0KUc%8l7WFK*we)^q~g}wS#R^24R~Bne*L}wbA!k$ zi*3oFv%@-H+eaT)e6sk7PT{uR!uB_TkG8FKoD_8L4xihSoV9aTc--D8`{m^0{^O>C z3+5KqeOg@_SCja++-L11v*V?c*BtoG#%Zy#DVSHyU`0m6gNv@tr;neTw}4yZb~}6P z%bjx1!voq5c1!aVYQ6ZnwW{o1`>tu*IF(nrtEpXFuwPWM!!OQNt^eH<-e-62$^`PZ zJY`^xTi;zPx`6HZibt;}JKdimC3STrlk7KLnRh`ilENk`m5WBrTDofT&F1vqQtZas zZLM$CZ6A*g(89_EYf7e6xh?bKu~CjbYb^J?I!(Lk*y;tZXRiA5@#KC^?(-fO zxqR!jr@t0iIrWDc`+1G~2}Oq=%={O;Hl6L$x1MjjTulq|CFDOIe(C z=}TAGT5G(fY(m?Y;}-qxmExa2%t)?l`ziS>UE&MRXXEo{&R;P8!t+@0cbfF~vlaK= z?7wDg!+xNcp~v2qJwff2QO6~LYuAn6a$hs%w`5PSef&IK=6pq^_<7^Jx-`{8SB&#m z!#%6#F+Z?m_|^7Wavt-K`Na%hc+N9^kU22D>KVIXo@VAt+pjqc3=9mOu6{1-oD!M< Dba*^$ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/ditto/shiny.pal b/gfx/pokemon/ditto/shiny.pal new file mode 100644 index 0000000..bcc0638 --- /dev/null +++ b/gfx/pokemon/ditto/shiny.pal @@ -0,0 +1,4 @@ + + RGB 17, 22, 28 + RGB 09, 12, 27 + diff --git a/gfx/pokemon/dodrio/anim.asm b/gfx/pokemon/dodrio/anim.asm new file mode 100644 index 0000000..5776036 --- /dev/null +++ b/gfx/pokemon/dodrio/anim.asm @@ -0,0 +1,5 @@ + frame 1, 10 + frame 2, 10 + frame 4, 10 + frame 1, 09 + endanim diff --git a/gfx/pokemon/dodrio/anim_idle.asm b/gfx/pokemon/dodrio/anim_idle.asm new file mode 100644 index 0000000..96cc9d2 --- /dev/null +++ b/gfx/pokemon/dodrio/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 3, 10 + frame 0, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/dodrio/back.png b/gfx/pokemon/dodrio/back.png new file mode 100644 index 0000000000000000000000000000000000000000..abc232883d20a5b6362f4c29d327d178f1956a45 GIT binary patch literal 553 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f33x7ijyG& z14FsGs2KwT14~JeU-19`|NrM|xK%PRFrM&qaSW-rwRh^xB4g0oU)>Iojr=KXec6#w^`j6EcmfN)QPbJZmbq%j?#a^Hab3ufA7e z)40lQ&9NQ3l;`J$IRvsVxOuhed*n`ye^bt{$X2|Ou6l_7>-AerL5`{d-c|=bNiMrS zcWuv_t#=}B_VLLyh|6ea6c&2DS-IX^ZTiCdUfyrs98-C=;Y!6!mi`d+4gFmYIofzT z)dY!1Jj?79+( z&5m^^Qi4jZs@U4@6YEwfiDHx3+i`mJAAS38=g)bE`mB1GyKtqCniHGay@`URGw-Fj zpLp?Yk!KXQq~wHvbt&;OhMs!_gqmJ$*nFV4dEb{KN=J$mTfIwE}6IUG{oK#AQjL4gNolR_}P##k{a5OlQ)W*6=#@ zxZHhxNn8`}J?AKVos(Jez?FB;wa!a>WL`y`y!2_>2QJ>=TeG*G`?gT)=9D*bjF%;X zt0j_FtLlE5KTZDEQpd|PgWfIbJ1(YKb@9N%qt>n++x|RaHp zn(6sf_ENl?(@yiNnv0f2ipDre9xX_;eL5kwsCC6|-P;-LR-bYbvbo+ZO*`}7bT?yoSiOyVpO?R^p?|SeoSaS2Ic4WRt7R)oeP7Lf z`B1oYo?ez$t?(pP_YyW+ncTe3g_n$-c2@gtHvC}Gt5b4#QHsCC*_a8}8|OZH{VB0P zE@PV08Lq8OKW{rd;dkox*gkve#`!ZlWqB-Z|vs!KM*zw4<|BThwnP)$IEcMmqs93$?e0$Jw+03aYf_}}j zuBz}XJU*}Fh^#~0ntf}oPPVR@cBT5yBX->`kh;a8@2ckeDb zD7)wio4}QydByCN69ap53f=!EN$=>*Yq#Fx^KSXpgR);GcI><`$vSJw)@hg3${k{P z=C8zj&46}s!loz!A8-ui%#%UW}K1Aoy;*}vbFzG_^Z zdgozZ*4zc9P1|-X?h}cTSoJCVU54`BeUEQE?lZeIL+kpTi&t+*zI(x>b5OSbRmEg$ zw^Oq38p=5yq&)m7C=c=GNBzR%mFHgdTAwQpdv3Y<^PH<|{};^LY;`_z?(;Q%`yY#c zwSHh+exUqe_=g60X8uK6-Z9%no>{k!rzJCrZK z=eRTRO?k|niEqnU&iQ<`zV&m;n{t*bo?or2p4RPOtX*dOx9?x|)ywZK{`MggKi=U=TS-Q0BnQsgX3=E#GelF{r5}E+?HIMHA literal 0 HcmV?d00001 diff --git a/gfx/pokemon/dodrio/shiny.pal b/gfx/pokemon/dodrio/shiny.pal new file mode 100644 index 0000000..521bc01 --- /dev/null +++ b/gfx/pokemon/dodrio/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 24, 01 + RGB 18, 16, 00 + diff --git a/gfx/pokemon/doduo/anim.asm b/gfx/pokemon/doduo/anim.asm new file mode 100644 index 0000000..d9de3ff --- /dev/null +++ b/gfx/pokemon/doduo/anim.asm @@ -0,0 +1,8 @@ + frame 1, 12 + frame 2, 32 + frame 1, 24 + setrepeat 2 + frame 3, 08 + frame 1, 08 + dorepeat 4 + endanim diff --git a/gfx/pokemon/doduo/anim_idle.asm b/gfx/pokemon/doduo/anim_idle.asm new file mode 100644 index 0000000..1734fe7 --- /dev/null +++ b/gfx/pokemon/doduo/anim_idle.asm @@ -0,0 +1,7 @@ + frame 1, 12 + setrepeat 2 + frame 3, 06 + frame 1, 06 + dorepeat 2 + frame 1, 30 + endanim diff --git a/gfx/pokemon/doduo/back.png b/gfx/pokemon/doduo/back.png new file mode 100644 index 0000000000000000000000000000000000000000..8440b7af78c47db28c5ca82850af63b9fccab82e GIT binary patch literal 447 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zc$+|*~yTB zfgvSQ!jyr5fu$tKFZloe|NnC}+$tFu7~?!$978H@O`URE=!gP`v+B?P_4ghvZCI3D z`Qps2IcyP2rU>fHZxWew{fhGS1I|m=PiNM2^-7&Fd-<<93*cUG48}fkQ9lnRec*?TV6d zo6_4H>b{)M)!O0hT;{oPJq1U%mL2%}Kla=$ZsiAEv)dZ{x2{S4?c=4eW|x5SQLiu4 zE{nI9>a?E{yppH)w%b8D#@Xtit^lWR=;_JK3$735dwJl$zl-{UZ8a@&h(p&Va?=RUb|MIwBkYs|(u zc1R%dP(^7EZyCzTjKv&|IPb7pR=yiLco$i?#qv)gBv%j)3th7mR$cSo|CtF z{`RUHZhJF@*a{h*-Q5>ELHNSwofq_X|7Cly=G+(ihA-@ON3R~8&%nUI;OXk;vd$@? F2>?19$h!al literal 0 HcmV?d00001 diff --git a/gfx/pokemon/doduo/front.png b/gfx/pokemon/doduo/front.png new file mode 100644 index 0000000000000000000000000000000000000000..8c90b36f7fd7589b301ef10b42f882448a84601e GIT binary patch literal 650 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsB5&Gt%m zGGt(2NQsm%Wnf@nDGBlm{{R2~|6C2XN(KfdO-~ockcwMxr*r2WG2n19EdFnOy}>hw zJ!!pG=;~7|SFPGDeBe)(WF9%& zEBUM2)Vqty|8nhJ(=AkPk;48Z+HqmugHDI#%~i53;c~M)Gd$mzEahJze5(CuYA~&NPsVkbzjk?B{sj_EZ#Gv z$f{FSr0K4*4yRPfm7I)~?dsYlD|dd#I?yNm``xO-sluH{+l2xrY&_bUzwb8p$u}#y zme%bI@GZK$Rm?F=`f{dM;`|h4z0K-r%h-CWR%li%-7{;h5?joc~^SL#} zI9=@R?urO5%g@@~hUuTuw{#lsJlScSnVWV_K=z!>Ihk{R7}GZ#pE)Zl{_XoYiam2S zn$Ku3p0s|pvD)YDUGt3jq^14x7RO2$r`xRjP_D>3bGt?IJTnXBUx#Nx;QB{BJO|a% zPsydXvH$e93^u!;UXuBC&-s!PoA<`;VEDh$*go#H;F@U{y(AexiOki{Wt~$(69A0l BC>8(! literal 0 HcmV?d00001 diff --git a/gfx/pokemon/doduo/shiny.pal b/gfx/pokemon/doduo/shiny.pal new file mode 100644 index 0000000..f8093f6 --- /dev/null +++ b/gfx/pokemon/doduo/shiny.pal @@ -0,0 +1,4 @@ + + RGB 28, 23, 00 + RGB 18, 16, 00 + diff --git a/gfx/pokemon/donphan/anim.asm b/gfx/pokemon/donphan/anim.asm new file mode 100644 index 0000000..2efd255 --- /dev/null +++ b/gfx/pokemon/donphan/anim.asm @@ -0,0 +1,5 @@ + frame 2, 08 + frame 1, 24 + frame 3, 10 + frame 4, 06 + endanim diff --git a/gfx/pokemon/donphan/anim_idle.asm b/gfx/pokemon/donphan/anim_idle.asm new file mode 100644 index 0000000..5721310 --- /dev/null +++ b/gfx/pokemon/donphan/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 5, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/donphan/back.png b/gfx/pokemon/donphan/back.png new file mode 100644 index 0000000000000000000000000000000000000000..a156f85bf1449176e77e87932c333f5844278a5f GIT binary patch literal 352 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7KV|70%_t`Z z28Lt0-~Tc&FtC&a`33*~|NnokhFc{A1H*q$7srr_TW>=z3N;&W7(e;{zcN>2Yo6AR zZR|T|Z@;{RNpVMR{+^HP4~l(b$!BY*DcWaY%5~Gv{PmPF--o=1{9Zmd=hdHYzjXcM zOb>~@VXd8snvMqgiGPxV7%cmih2C27uS2OOYLn}~tJ5xhl<=G?Vs;}z1cgJ1A^?|sNVVgG#gBs;m6#d{kc$c8`4+Zf!m{j8__vQn0lyWLny7#J8BJYD@< J);T3K0RZ@Nob>NVRR>v)8+sg|##ZJ1lW$IRTBM*Ch z)&D0x{|Y?CF1YkI^;Je>s*t(nKh={PJUPsF9A+#M3w_ye{?x9c+`BSQo8|a&U4I~?H%D&u zj@`UxC)(ZLJ0X7RgV?9nXRCd6Jhkuny^IU9dHXj97$@^&2n+4^F;_FZ>bENP?YXkr+&5+Pe|_D7RMIN(f>st@$_Ba8+%WPpJYFG$lF{z^^KEs zu2$@gRllRoy6^Ff&t9SJgt-ein1<@myoGu)q&-_1~BYrnJbwAY!J#Rp_Xr|I1Z?A#sv z?!{rVb)Pz{yV5pxPd9$|!nh~2U``SH`h{oP|D+e66MrY5rLHTvt;g;W-^Gg}EbVs= z8hh&(AHTzxJ8|33ciiOy^<5ikTgnc}IyIj@?S4lwa<9e99_w#ck1Cei7#w6QzoU3S zv;0oI&5Sz}r-|)d8~FIU^)Drxiv5elW-AHox*xdIBR}QqRO<)R9(3G!-|+vA!6Dhz z2B&1N+F5hmdH>?{mKT5dDiS>3d7wgXZzTSYlk_-`Tl6_66a@NU|{fc L^>bP0l+XkKkmE#r literal 0 HcmV?d00001 diff --git a/gfx/pokemon/donphan/shiny.pal b/gfx/pokemon/donphan/shiny.pal new file mode 100644 index 0000000..d705694 --- /dev/null +++ b/gfx/pokemon/donphan/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 21, 20 + RGB 20, 10, 07 + diff --git a/gfx/pokemon/dragonair/anim.asm b/gfx/pokemon/dragonair/anim.asm new file mode 100644 index 0000000..739174f --- /dev/null +++ b/gfx/pokemon/dragonair/anim.asm @@ -0,0 +1,7 @@ + setrepeat 2 + frame 1, 08 + frame 2, 08 + frame 3, 08 + frame 2, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/dragonair/anim_idle.asm b/gfx/pokemon/dragonair/anim_idle.asm new file mode 100644 index 0000000..e7e9af0 --- /dev/null +++ b/gfx/pokemon/dragonair/anim_idle.asm @@ -0,0 +1,9 @@ + setrepeat 2 + frame 0, 05 + frame 4, 05 + dorepeat 1 + frame 0, 06 + frame 5, 06 + frame 6, 06 + frame 5, 06 + endanim diff --git a/gfx/pokemon/dragonair/back.png b/gfx/pokemon/dragonair/back.png new file mode 100644 index 0000000000000000000000000000000000000000..99c03894aff9b1c82ebd9c2e6639e188ed6fc363 GIT binary patch literal 430 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7-!tdGX7OGI z28PGBPIe3o3@jx6$|Noz>;a17O!07Ag;uunKYwfh|P0a=zE{EU!|Nr@^ps88o zk(sm0=7fFU;BaBv*8kB@-1qKZ-KuG4E@*l5xtd)(Lso- z9(~}RNtmhhLBoSWA0~WiT(J9uI(M&reo{ep?$wr>({Uif=Lb&0rijC_Q#n|<<~c`JQie2jHZ=2+HR&9=&rX~EmYj3-{Vg|1_& zS2Vgb`DmK^(S_zx3*ApgS6i}N;9YgsY{B|Ib>G@o2Rv99<}t47O^&p9=9;g2jxlHDhl)gqp##C=m`Jt-3+V-S}9n;LZy~2h!nmaa@uXuO){){zknG7BYzm>nI zJaJyFZgwPB!AxoP^1s{}i5oUo7PfesHn- lZQh+^_g_EUC-5JUcYenDYIR*v>22WQ%mvv4FO#mf;xY7Us literal 0 HcmV?d00001 diff --git a/gfx/pokemon/dragonair/front.png b/gfx/pokemon/dragonair/front.png new file mode 100644 index 0000000000000000000000000000000000000000..19feeeec1c1296af1ebb715671bd73f437cd61a0 GIT binary patch literal 1064 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U<}}3W?*1A7tb5bz`(#0;1lBd|NsA#Ar-gY&g$)xRpe+r`uX4cJ0Ig4 z1=VJo+!dL8_shAj92P6$Q-gz~uk9}?+OkLF#*z2Dod!!hwYIQ3Gd%r0$CTNZ@vNqp z*anur#|1<iTcXcH&=Z+-h0Xd<|XUqX(Y_h<0ec z?=+lm{@V`4`Q5V zUo|=udoj$pa#FkL#Gv21R!lai-^&tmc!srWrTG;#oAg!lcP1GJn)Ob)>3iXM^ADZ( zO?NI;MP%f+RD|U_im=}DisDLpB(qSj&BdwV@&P-CyHc|{zsl`oIKE4cX${ZawlkeC zZ*Q8t_#4mNIbp1szZ55Ra~An|2kdb=7TRE^end=1SVKNOJYoKq!v{7e`Uw}s@e9}5 zPVFxdUlXa%7A3V$=ceR?p7kk}FCFx~nRE`AoVU0%UBK`075;6%W-ses&ozr(F>kr? z$$yz|uDr6l*DEZon|=F?VHdy0v$ih_fAdFu2>KB8;gbC+?;G2~#r0Kl4m^3f^fL=@ z92XS+s@}t5um6>&b^3IbB8fdF_s&%t*K>W3&YiyPN^|#gmL(EMgV1H*S)63Y$J><4Ny3>XWA{WSoAWs=-n5RP~&ZnSSTi zq>qz6oP4Aj@b8#+Po2#km-xz;0u~jVn)Odrf1UBRtkA4@dHlQg%g28wfVT zQiZzy&iB(@@+>M>maTVq{CMf4Nh>!_?4JIrzF+#w&I--Na)NnrPRXI*^ZnwQEZB7ZIQ~249dYpIyXo7y?ZovT?vXU9^qlibOy7{%Oy6^lQH3YhyFE)< z3ZAR_7CcpTEqJcVTKjI#60W>GOVa=LP7gWSJ6(@y?({8FOP{Lpg`4R+9&VD>=biA7 z?Ovs)+J=MPH)4GC;tsi4*u^n@zxqUVp+RM*rp%r%hr-3f}a@%joi~O?QXBq3Tm4ShQ!PC{x JWt~$(696o6@WTKA literal 0 HcmV?d00001 diff --git a/gfx/pokemon/dragonair/shiny.pal b/gfx/pokemon/dragonair/shiny.pal new file mode 100644 index 0000000..7444294 --- /dev/null +++ b/gfx/pokemon/dragonair/shiny.pal @@ -0,0 +1,4 @@ + + RGB 21, 19, 31 + RGB 20, 15, 31 + diff --git a/gfx/pokemon/dragonite/anim.asm b/gfx/pokemon/dragonite/anim.asm new file mode 100644 index 0000000..2b2de65 --- /dev/null +++ b/gfx/pokemon/dragonite/anim.asm @@ -0,0 +1,12 @@ + frame 1, 12 + frame 2, 12 + setrepeat 2 + frame 3, 12 + frame 4, 12 + dorepeat 3 + frame 1, 12 + setrepeat 3 + frame 0, 12 + frame 1, 12 + dorepeat 8 + endanim diff --git a/gfx/pokemon/dragonite/anim_idle.asm b/gfx/pokemon/dragonite/anim_idle.asm new file mode 100644 index 0000000..5f760e8 --- /dev/null +++ b/gfx/pokemon/dragonite/anim_idle.asm @@ -0,0 +1,7 @@ + frame 0, 20 + frame 1, 20 + setrepeat 2 + frame 0, 05 + frame 5, 05 + dorepeat 3 + endanim diff --git a/gfx/pokemon/dragonite/back.png b/gfx/pokemon/dragonite/back.png new file mode 100644 index 0000000000000000000000000000000000000000..29ef7abea5350f76c620b72a083f11c65d1d9649 GIT binary patch literal 386 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f2>C_DyWBn zfkDhIrJI3)fu$tKFZloe|NnC}+$tFu7!^HT978H@-JKHMcUVDyW%=@V_0JiOHB?G^ z|K94+Ip>1uU7m!^{|)Y(7M}Cs?1@hwTFW={xSnXZe&286?TD7Bc9T}cHER=1B;Psw zjQ4T!a#>WoFwoPr(PZNK=pwvZt$Lk?#g60rD;PYj-d6Uk=jQyh z&Gxe{SC#SAkK6hcYh{kRT-$zN-j2rL?kx@X65a1K@EN=AW!pQ4SAg^DkxR|3amOwt zteP(Aoe;8K_d?MbU9$!|=FM(9?U>?u|FP{zI#d{Ldr~|-nJpkbFx~f&SIY6y!<00q#2NPafPVpQW&HqKQxI zFE!5Ml!Md0@m4Xr%+&t5%Oo$r#M|E2E#>2$BWsVex~Zf&7;dm}Wo>fHW<6mmbX0re zh95WBId8SGE1Z(}rs@0phS+p>1@(=Mg{~n>YCbTu#3dKj@|~GH!F#b-+QFyUKVQj2 zBwSj?c#%>3+Ns!gb6v`$uEp|~Ty|&>Qk}8%X`%T7ZuXNk9~@RWSf6an?RRcSo4i)U zZF=Xf$$ZmKC_bF^Yv4;*oWZb@Tj}b>n`e>*Of1WOYp>w1Go4+U zd)htH_U^tl+xlK!pAhD}MA0mD*9V3z?&tE(?|raox{nES*oq$&cO|@4YTQ)vx;=$I zZ29n`Lmr0;}XPXAkT`lEOy z`-f@e8j1&`?QelMXk3=Fx-9hcJaN1OHIF@-gfQf8SQ(9tj}~$H{8`LTKRNu z_trCO&95CeIcN0&)AtXKwxymgJ88Y)yr1;F!s(Z%?|E#duUC2e=7ivThW&mY`X0z0 zv~DVAdCzfAaF23@`wQ9sG4D05{*m6>yf6B_hyK^TFJbQwSnp+a$^XI^_aN_UpU`6Q zD)wu)&cwYx@Z$Q)dk^Jg8`!Jdx92|CcrWm$`MejhA?i)tzb)T4Tx0F8Y|mZWU)j!P zTHy||slK^<$@M*p-wD{yDgSa`(Ds3>$p^kfM)y67&0o!6J=2iBC3#IvANQwuFKr%5 z{-3|F<=)5kuY6~f^}q1F3jQs;H~Eh6xi5XE%U`!wwfFvycz-~9FSGW&!sX>UmB)MU zZG0$eUUhs{`J1nOvhOXXTI=n3th4-l#c|uBlh)g+zz&doKf!u^h5M;Uo|l&If81g6 z-zU85sVpyt)e~7So3zv?^U6<@Ja-dKdwPFPc?R#Q_&YsQFHS4}@&4dCl?U_6eZv27 zzK;;m{Jtl7Vi14D@hE1#y~t<7|NNSzQ}Hnd z28J)wK3->FU|=Z;@(cd||NsA74Yx`L21XW77srr_TW6;P3LRG9a7q3CuY8@tvcxru zF8f7)65ZU-YBKH9=LZYrBpLbGe6%_^Hm}mS*cvG>(#e$~X28^U{l?~ut-=>RrT8A; zJe%8ag>F4n-iv~J&*waVTm z*^!qIF5bIsS=bTQhQ2GJGlidWmI$+|wY>f4z2J;4n}c{s#bv!b7x~XM#!45yW;d8C zT)i!KSN7KFPZceeh2HXPw;9yF`>LGy;>3O6+}GpIf9Fm}PUyE_o7eKk*Eiqfm>jl;paY{C20#-%KBOS#zuj;#-Q$iTqB N;OXk;vd$@?2>=2ImZ<;$ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/dratini/front.png b/gfx/pokemon/dratini/front.png new file mode 100644 index 0000000000000000000000000000000000000000..9f49eb8f0bcaf44283a81642170e48dbbc41642a GIT binary patch literal 674 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsA=U$b;7 zKE}Yn@MYS^>kJGGEG0pH!T{D?~PGa%}zml%I*~|h7n9x0?$6(?4;yexx!~!0~5F9EFFesNq^H#*^~aO?VG{(>ZEK! z?~_DR17GvT1>f!}-${{lR6Hw@ZlEYH>GN#W!se4rI}@Ex{auqH^}r=*=03xRo`p94 z%q{{G9v`~OIB}Nh-Ug0~lQyw2`m}sgSRe8`)M@9t%8$1v#9U;%Gnt#C_V3xvF47a^ z8_nL^aXgL_i8`@0KOp#$1-r~$aXzOFeOjtll`Jz`{9lWmJa67L`=IR3r#3?21vV_b zpQUoR!}N|n|8*;j{g>uU5%2ahvH7Kye;%64oHxGzV&*it{&|_NzrT>onf#-8o~QXd z&ujAg(qCLNu6cCM_=C-75UjUhUa?H+)0uz+7mX*~@SkVsY4fQ^X?Oas%f`jZmgeVI z9BDS@u$AmGEoo$)Rzw*2~BYf3( ziLn2cd^amgw%=*Ho)_Hj30W#|&Dgr&wIr|GJVRC2Cz3{$mLGapna^LC^UC)8g>_zq z2WMBQZ95*ub>0{R^Y81dNWWHVynbHf{qq-|{+3)nFY?~`imzvOt<7|9`LIl%Qk= z28IgXd~XH@29}Z_zhIDfu7+DB0|O(2r;B4q#jUqf?+UdlaI~a;|9k%@hm_>3OMe%3 zAA5P5@#pF(`~SXe4&+tmYP)K#kv5$p+jNPYXx@C67#HhezQrHw-tCbO<8o-*{Akm| zv+k7~SMFT*QgBszUmp3XNLxi>=ZQ%l|FJY4IkWA~`8{b)KQ(n?jvToj^W7`yD7*BB z<=m%MCsjOraiBQlVLNwTWyb$Qf0q1McVWW}kr2+~XPh=2Tf>|=ecHW$nv82-oN+&5 zz3e=b-`=06${js5Zb+Y2f7{Hgqn@U2@oARtJ>i3!*>C;Y!*$ljCHFDk?bO8%65Bq{ zZGKeqe1q|XHBH%mO650JU7#J8BJYD@< J);T3K0RWXTp?d%T literal 0 HcmV?d00001 diff --git a/gfx/pokemon/drowzee/front.png b/gfx/pokemon/drowzee/front.png new file mode 100644 index 0000000000000000000000000000000000000000..2b3a43d266161a454e4904326f6515aed624f462 GIT binary patch literal 1013 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{v5>W?*1ATFWqtfq{W1z$e7@|NsC0_bN^a zN@ieSsPN7AW?*1oDGBlm28ritxK%PRFi-JxaSW-r^>)_nyr&90t{cDq|Nr@jI7b4< zm&7IKPRMM{>NFR>ec+PfQW-AeHFJ8O@Hcd9$v`ksgpy}f zE|*;AYV>l625d1m&d4~{AXv)vO5}~WAY;?L*F*ilts>4&JOU zWo&$1qmYxUc&g@&Lnp6%dQjQqdEnRM&qqH;ENcwfb+C7G1xtUYHpBd_{W=^=!XBAd ze3@JJ<&81xSsAHC&+0<2CkgB@t(2K1TlshK1H0J~?stv0x!pMQTrOSi`UDlD?@iY- z|JvRRXTFxC&G^OZ_s0oO7llOcU!v?bzs~Tzj?*i(@~3JEtR`GptM?|0%l?qC*>^tw zg5SctZ40}ba?VL4AD6g%#oT(!M*eRT%mm6VUw?Su#y^D*KLRt#0y2!Y_HNCKIzrO0aR%_a%{)kIVS6ybxn0u`6e!@C#p+fP=ttWg>_OicWII@TH#QrzmjN@4D z6#U+Cqnx#S?vn);%I9)D<9_At5t&o@VCjk<50<9R*+wsuip&M( z&k6)yGNP zB_iQ_j=ZXr-Q)A6ZFW!)lGSgb(|H4*bil{KP}U5I4DMb!EJY~I;F+4Rx02jX#I7vHYmJA6?$` zZyV3@?|Yv*)Kqf*+*iKu{ald3JzwU3xFlct%0fNkV(2Rd1_lOCS3j3^P6t<7KPO7@n4uyA z1A|rlsa6IC29}Z_zu^D>|Nqa`aI0isVASz+aSW-r^>(Ub(-8#@mezm&=bJORxfI+v zJ;#mT(`WjEOrPxi-{u~>P^PP%9nMiMcvpFi_^cCC?=hw;U7XLU@=JIF`-A2394S@* z*cVhC`#P;oNo0Yp(@fzN6R&eGT=yu6bGDpCC5vPJN&Xh$gxrst6&T%AH(cKSX*P4g zzIl=%dXd_RdYdMTC+#o-Sc5d5R;ke@#9|`{FP2bezW5`XyNw4 zXyr=x<9A-OEa!OPdLmYH`oH+3GcJ33bApsjV&40<34NUrz1w7GW`gwMi8_gU=DZSL z`t9B!kp^*%hhH{j+&E>Hs&JyOyEKkvZ7ommc6+tO?0fPPKAmJ>U|{fc^>bP0l+XkK D22iI{ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/dugtrio/front.png b/gfx/pokemon/dugtrio/front.png new file mode 100644 index 0000000000000000000000000000000000000000..9fe5e14a722380171569b606bce620d1f941b11b GIT binary patch literal 984 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU_8LV%)r2K;9c|^1_lP60G|-o|NsBbiBddf zsK~&;U{!yrm4ShQr6kBN`2YX^|8q6mDj67<%ROBjLn>~)o&9>!69tY|(R=^rnlnk6 zST+8+aqG0A>0RTOa~jxopAUbj$=c}f=bpl}1zX-!tI@<@@5zaxp*6n?-R# zeosvj&vLEYCbiW=G>l7aO^|ANq={b9b_TI*K)yeIy|HBJ6L$_-ORq`avz7$$<_3D)H$1&2|qmrE_^-K>aoiy{V z%>0(c7gZi#vA#X!-Bm-&Ss&kBGkE3=C)P5gF$t@6C% z7SB@W$=vkSo7;0N{KTZdvhB^&oqjoGUGMpObizT;xz|{WkL~mDXw@>CyZ8HyJ=fM= z>RVzbeP?QH?exXICrpB7t&_idzU2S9*uc_LZf@myQKgHMzF+_A>HU49nPFYBb@%N% zzn0gnO;iw5H|M?k8T3T? z+hnfBAJI0JwV$7SIXgM{=d+V97pvzhy+3I=^+I(KmwJp%h?~=>P9Y-;RQ(eJehklr>b`!F-4D9YcA8^#NH9mL1G@KAtaX z-{$o%j-ht9xP$zARv+DIAD*$hK}@Xr zJAv-cmtR>GviHZ-n0&T=w_t0d#R=J%`(f8RnO<3avtZq`W?k{I=~qk7{n)gN@6N}4 zAVSTi_;_*o1naQaIo4*aEjyAY8=jFBy~Fs9svB-*G$+1Q(bfq}u()z4*} HQ$iB}p7Yqm literal 0 HcmV?d00001 diff --git a/gfx/pokemon/dugtrio/shiny.pal b/gfx/pokemon/dugtrio/shiny.pal new file mode 100644 index 0000000..ce41b39 --- /dev/null +++ b/gfx/pokemon/dugtrio/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 11, 04 + RGB 12, 06, 27 + diff --git a/gfx/pokemon/dunsparce/anim.asm b/gfx/pokemon/dunsparce/anim.asm new file mode 100644 index 0000000..5427193 --- /dev/null +++ b/gfx/pokemon/dunsparce/anim.asm @@ -0,0 +1,7 @@ + frame 1, 12 + setrepeat 5 + frame 2, 03 + frame 3, 03 + dorepeat 2 + frame 4, 12 + endanim diff --git a/gfx/pokemon/dunsparce/anim_idle.asm b/gfx/pokemon/dunsparce/anim_idle.asm new file mode 100644 index 0000000..5721310 --- /dev/null +++ b/gfx/pokemon/dunsparce/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 5, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/dunsparce/back.png b/gfx/pokemon/dunsparce/back.png new file mode 100644 index 0000000000000000000000000000000000000000..d3fc9cc85eaf94dfc0213987f2a39edd197fd08e GIT binary patch literal 332 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|NoewQ}td3 z1_p&GOzRjJ7+6Yz{DMK^xf*Vj3=9mfJzX3_DsH`<;waXlz~k&${NK92bz0DY_ROIheIaVI$_{+yy;c_VMZ-rCa^k?Bu?w!BN+wo!Yf2LEs ziUr@F_EcT=X~9nyWza6>aF)a-d|EKE=-s+ zA!dP`?(C|`jeZ9DC*D5fUlDpuDCV2lZEdHh9-rs#oR{`zcCLQ0^ttdV+tWAn&&V@A lKY8!(#20o)J4z1o&rxG8?5s=|Vqjok@O1TaS?83{1OVh2koN!p literal 0 HcmV?d00001 diff --git a/gfx/pokemon/dunsparce/front.png b/gfx/pokemon/dunsparce/front.png new file mode 100644 index 0000000000000000000000000000000000000000..a2fbc6f189675346828005974b6cc207fbfe0e4c GIT binary patch literal 860 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{v5>W?*1ATFWqtfq{W1z$e7@|NsC0j~O~u z?`2?MP?*BBj)8%Jr6kBN7$lyn;a17O!1UYG#WAGf*4tU#lb$GWxHkU&|9=nH4-YG; zm2Yp}y>)2iOh4ZpjIJL`ycXq~G6)G5{G2+WK~qIgkE_$8i+i)})G2Y3+gvSrI=l8- z9jx>@IfC91Hvjg9 zIn2HC@^NoFi#Fry2)|z64>R}-r`q@Gb4BhtU{W2kxm@uUtDMk{AE%ay7f-*MxAwyf zw|2v{6K)2F+Mj=pRIsvry;p8u>?MB(2TwM*CQ{S+3g}) z`!7>o?^~(mw%tc+!+tY=c-Zio;nUr?!%p6}bK<)^zdo>^$5{Soe$m^;h%;YbUe=NI zee%q~_Dl6;_s!EzD;+(%?`h?xeam>JAK$pPtLkXlA46q>qpSHYu%3U)H2qy=+v}^F zJQn#bxX1p2)y#DZ|4$RI*;VOx-Q>kiA701ydXbEs&wkxYO$$Fr{tK%})U-1CzLe+u zWkVAOhOR9Oe#+;c^oGFr=c*q!aalcFs{Z5VhoE-(Sr60CdQXu4+pv9)iV3HhTI9z` z%a$JGx1N@8*n2^n(dB}?ij|Gcx9g+OJwr4ANd^a#M#D2ee*2L__WS-rJv>$t0 zn$9X}y?m2yW7of=pa*QiDBzak0C;ZJyYaY!|TF z^N4$@0_P5fukVGI+g`g>A~X4rPw&estk2$Cv@1sXG{znNHsf>Q)l}(IF;k|;d7m)W zFZ>h)hnM!B_ZE4k%K2$h%Ob60Ul~RA+TF4WI$N$sFvbZjEIzbpt+vqQt0|oygXT_# z1QU$>S*Lkl|LO0gPnO#3chT>d`h5DQKSA^2Pkr{bzy9gZrAVL3x|ef~fBFNm>r(u4 zRpCDh`X}Fi5^AmNJhaCpF>cY5rT=@U*Dt<7f2_r@$4P*J zf#GA$)fff_29}Z_zu^D>|Nqa`aI0isV65*s%X@?CsoOyr!ug_z+&0&9O zX6?&G>YaHly^3r9KGIG2D8DsAU}3|(rbWh3hm-@zus7^L6e@;5$8G0bq6 zpVh`Uui2hlvTn>?{5?;8cWPC%M>T7R!JL@=%vB{H{)>sdy_#gj@=-M4an(=>z~JfX=d#Wzp$Pz!+|g|S literal 0 HcmV?d00001 diff --git a/gfx/pokemon/eevee/front.png b/gfx/pokemon/eevee/front.png new file mode 100644 index 0000000000000000000000000000000000000000..b35e901c8d10e7754848dc3e88a13318a9174777 GIT binary patch literal 741 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-VEDkn%)r3l>U&L=fq{W1z$e7@|NsBTS`2%f z1Q-|?KIUAFVPIfjDGBlm{{R2~|6C2XN(Kg|7Ec$)kcwMxXWh5#Q{)h9-Zf-gIqHf#j zh}|ALQ#{P2)D*+JHv}yG@b$){C#7#TNxTXTb`ja8R_$m284K(K+bb5O_ zFn!0Ar7ThPFaNw)xF$H$u~f({+FD}QPPV6Pr#1_@h+KOWkl$dJ{o<6;m06j5WsN^w(+EH^SCX1(RIVwo2h9ZeRua9z39E&Yp=djX<|0L#Vz-rn=jIp|O%+aG zWzSc%x2P@7HvODI(8Cim87@sUek1$ffTY!{b8}{HoCMZC$@t_<`G-6!ODv1sqPllQ z_|I`HRG4ciZ29@@oQJCEKPH379nl}#jMvP5b*r!~d3x1T9&Pc5(~PAbPBWgP`1zRR z+K+)do}Y31act&7|ID=a7RI|J&Q>3uIn(XKvONW9WfK#o^UaBD7XE+m!HJn?_eq@D zQpqy?`O;*3@p-*q`keN0hD+2=qOG%Jl@c;k+|L1DBRWdLzMtizAhE&{oJN@*e!v-8IM?d`kFB7RR zyk6o)NGgByqa^uV8Z?ENWTP{p!H*sn$-ee^Be_s%i(typ znN{+&ediuHd+7L`;?VSBpTg-O#{TPqne)T;Mo;BR zoENn<>*IF9x~V)78&qol`;+03g9$wg3PC literal 0 HcmV?d00001 diff --git a/gfx/pokemon/ekans/anim.asm b/gfx/pokemon/ekans/anim.asm new file mode 100644 index 0000000..cfd686e --- /dev/null +++ b/gfx/pokemon/ekans/anim.asm @@ -0,0 +1,8 @@ + frame 1, 08 + frame 0, 05 + setrepeat 7 + frame 2, 03 + frame 3, 03 + dorepeat 3 + frame 2, 20 + endanim diff --git a/gfx/pokemon/ekans/anim_idle.asm b/gfx/pokemon/ekans/anim_idle.asm new file mode 100644 index 0000000..98c3ebe --- /dev/null +++ b/gfx/pokemon/ekans/anim_idle.asm @@ -0,0 +1,7 @@ + setrepeat 5 + frame 4, 02 + frame 5, 02 + frame 4, 02 + frame 0, 02 + dorepeat 1 + endanim diff --git a/gfx/pokemon/ekans/back.png b/gfx/pokemon/ekans/back.png new file mode 100644 index 0000000000000000000000000000000000000000..d61670da77e5d724436223c54f94ead8e80ef353 GIT binary patch literal 449 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7ztm~%S_Vr7 z1_t9>?57zR7+6Yz{DS}g|NlQ%!>y8mfic0;#WAGf*3qfAw;fjCa7lgk|NqYlXT>JZ z`F?Vju9j^(#1V0--d>?I{>fKWr+*6XkC?Xvi3LpLuL`X7U9#`q*SQnaTz{V`|66hE zQtyuE7x#Q&D7=|`%Tm5?g5J!{5w*spFE-oGtLjes*ImP|abRVR>CuS(SEm|Hyd{5e zy;y#IdEYzxgvX3Rhs1p1D{~q|7QCM;c|*2g*+IXACllsKMqM&Zdyy8iTZQ47WHP(? zt4A9+cb{BlXm;W9)t!r0c1@r5gr`xzG>u8ft|7ZUFubK^RmZ)J?)uMp&Iq2@H7Va> zoEF0W<#EzEtbHt65c?FeqvmJYD@<);T3K F0RT+L$r%6u literal 0 HcmV?d00001 diff --git a/gfx/pokemon/ekans/front.png b/gfx/pokemon/ekans/front.png new file mode 100644 index 0000000000000000000000000000000000000000..21f476943c3604105afbb4baa564fa1d568838af GIT binary patch literal 792 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-VEDkn%)r3l>U&L=fq{W1z$e7@|Ns9>oz|{p zuw-ChFuuipnt_3Vr6kBN`2YX^|8q6mDj67QC)C3j5tH|=C|(PVz>4e_6iU-^br7xtPOxozv# zxx7o&VS!OVc-Og!K9bk8B3Kui$zS@;q4z0a@0B|j?j1TSsjf5s=)zyBQYnnTn0_CZ zJNYopd}*tM0>9qsmZUue=eAvR;XdK>dCH?V2hJ{IoNj5HzO4D^tlmlexiE6#L_N#x$vV9PY|YnN0tf0jY@-OQ<7_LV=l z-W=R`KrriCk@oioIr*=;6`mep%kym8CQ$sN?TQ3@z;6EoTPkeKy>hR7DNr|g=lv*4 zFX!L>E8qRMR{vXZcXHU1?CtM;w=L1sn-ll=+Wdl<{qD!LmldkateSryWX0;=HMinD zr}x(=Z#=z`|K#Pf)2kGHJ{2k#UY5N6QD*mL$>&QQYx)thhq37j_Cfbb zpKXjU(6_q$?Eu(0LFqy1|Gej}Tz|e~ncZ>Uxt?=>Znc{H+_?T%P1=d$r+@Z{&wBmS zr=ppcB=CKw{1_p-7 z4)qTh7#LVeg8YI(!nqo5l?)7wIi4<#Ar-flPGu}(R^)I=efF<>osyQutYxP9v)5S1 z3rx^``kwhrn&%w`uFWTZ?PZ$WFk9QzPH2wHT%n!J8`Af)sy!?_JUy=Q*N%S|Do?7+ z<54qv5L141;cNvrucBJ+I~@G8I71wIKQWys+A{ma!o+pq2|pL8EfL<{5wzDpUP?i} z;Zjfe{-ewdOC0C!TfxwM!SvX_V5e=2H?;1ynnbB@%$xD-v0d4Mm+>t7*#2cMn0Cbc z*DS*m+2=bPcs1f49$Z%6>He+h-`n2{-+!z;T`3aS#&Gk~zJOrUO;J}bZ%}xk`~8Gj zMSkMrE3P~HKDE6#`uP3lt(W{&UzmS8xpkR)hl|Rbi`UE-#r+Ps!xg*yN;A_jj-1)s z7oYj4w?J_BJf5?Qp6)N-6`SAS!C=53C-=4bx@o5FI)9~&41F)6UKU2#ew{USD!=!Y zmHg2gR@cp84Ty1Z@;%5>X67b&;pNOwMT>^a-z&}Ut2x@2{ajV|k71SsS0Kae8{Zii P7#KWV{an^LB{Ts5bp_Dd literal 0 HcmV?d00001 diff --git a/gfx/pokemon/electabuzz/front.png b/gfx/pokemon/electabuzz/front.png new file mode 100644 index 0000000000000000000000000000000000000000..3d44a603af24d9b938d4af45cbe0d3cef6fe2984 GIT binary patch literal 1036 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{v5>W?*1ATFWqtfq{W1z$e7@KL}_ZYtdw2 zV3_Ps|A2vkfu$tKFBl}8tKnA3z`(rP)5S5Q;?~<)7pF-paFt&*Y!R%xqqZLpH%|5{ zP2%`^|5IaS#{F1hPc`F)x^~yC)}9^fd`ow73cvqxfPzb)(h&?K3^z$`pl=x zN2DXSL{9vzwNJ@e$a@z8Tg_A39|*$?@t>@|8M!_rjsMom)SBn7XUKm|+$-_av!r z7VjFj?h10$%E-M9M$V0G z^Zyy?y?U_>*K8Z%%d3{XIJGPx@8hK7ITyrP{f#>J9234aU*9*V}Yc@9sSor5X{-EzL4Ggx=1KaFt#%-HoH+`BCoP$Mc*wvFNMheK@moDX-(=GdTv4&I;^q4a&h*_s zk9l*b|B#NmrCalSX}f!TW#+^q-f_Fk-alFjgZIyQn~2Seu@kAtY|*={AkVeu2$N*z zpC6W$o>oS&$xd@V3aRf=Df#$hX`zM69+!|ksPK!wO}v-LrRUx|y}v*Ap5IjWc@A!C0_=MOb)jcH)H``MDHZOv@CJuKd>+Y54*%>FouIkHDcDDDtj3irvP zxT4md_ZhQ4S?aqga6kCcIbEr2jqI<9)8{#SYn|?3|5Q~(UsPXI|L?5l-knarYC4Oi zuRA|ogZtOtpOX|^KL(+~TKVw%$FJV6zJ9;@`uD=GwJ{%qK3@8N+`FDZ=dM4`{|_5e R85kHCJYD@<);T3K0RT&z?tuUR literal 0 HcmV?d00001 diff --git a/gfx/pokemon/electabuzz/shiny.pal b/gfx/pokemon/electabuzz/shiny.pal new file mode 100644 index 0000000..e932aa4 --- /dev/null +++ b/gfx/pokemon/electabuzz/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 25, 00 + RGB 18, 20, 00 + diff --git a/gfx/pokemon/electrode/anim.asm b/gfx/pokemon/electrode/anim.asm new file mode 100644 index 0000000..c143a5f --- /dev/null +++ b/gfx/pokemon/electrode/anim.asm @@ -0,0 +1,3 @@ + frame 1, 05 + frame 2, 40 + endanim diff --git a/gfx/pokemon/electrode/anim_idle.asm b/gfx/pokemon/electrode/anim_idle.asm new file mode 100644 index 0000000..7f30d94 --- /dev/null +++ b/gfx/pokemon/electrode/anim_idle.asm @@ -0,0 +1,2 @@ + frame 3, 45 + endanim diff --git a/gfx/pokemon/electrode/back.png b/gfx/pokemon/electrode/back.png new file mode 100644 index 0000000000000000000000000000000000000000..ea243bf3ce7c9d8e385dd3caa990031f11b97113 GIT binary patch literal 308 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjSHOF-=Vd z1_s@Ke_k*!FtC&a`33*~|NnokhFc{A1H)xc7srr_TW_b{6lyWxU^#i_|Nqa=46+Rr zp2W^uvuXDXnMEhU<5RgA)}Ol2#U;Dq`_ikklOAk65~?5;&zsn`zvo+mwAp*<3tQeL zNXWgHyl^_U;&#JcTkZ9{`#82A4rx}soXf(y&F3EHZnnuap4|O>sKe<2h#7$a zQ9qm=jSlS*`6*U(>rwue%7{-j*%NQ5f0aKVdH?*Qj{e?SDdUs>8H6^n?c4kE+-wF0 O1_n=8KbLh*2~7Y-Oobu< literal 0 HcmV?d00001 diff --git a/gfx/pokemon/electrode/front.png b/gfx/pokemon/electrode/front.png new file mode 100644 index 0000000000000000000000000000000000000000..25c181357a87a3a728c4715abc4e0315baa6c9d3 GIT binary patch literal 480 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|Ns9lUD|U@ zQ{D?SnuiL7*cWT?TqfeBMKa@jlci@-?R7< z)4nXD$#+k(sr#zE6`UI6AGK(G=9v|58;uf<7nNr=etKe3QIuzRO3^$f;%IW;^oo;H zudzN6?XXh_6TEm{p!l4_GTVyD5o>B0QYS8zYnk}Mo26h$V}?rnlw}tWbh~IvTv6J6 ztoEyMfajKk3yXGI8f{o@yW{AQ4wXlNKFVIa8gjjYk#DYfs&aQPR8x3&F2qIU(AP#0 z#lrGur8~cgHb?tw+1oGmVhfx7++@kQSM!*sOrFqJ^(oF#;%0h;bIEC0H$6q!lW!Az zc65uZ?JUYT^3by@l7+F*s?M9s^Gf~ayNkUar9F1$*nQu-akA|9{ae5IR6P@(_t3v; z8H@F&p2X<$74HrjZVNJkRs|pM~iKuVxnh*>3xJMgRH_KBsR^On-5~*w>@x#msLx^DCF_RbQHZ$@t~W oFFyOuKPlh*CvVz3&+~6?@yAT(|5<6qd!7Llb*_Fc>zopr01ZLkVgLXD literal 0 HcmV?d00001 diff --git a/gfx/pokemon/electrode/shiny.pal b/gfx/pokemon/electrode/shiny.pal new file mode 100644 index 0000000..b8509a8 --- /dev/null +++ b/gfx/pokemon/electrode/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 20, 17 + RGB 09, 02, 28 + diff --git a/gfx/pokemon/elekid/anim.asm b/gfx/pokemon/elekid/anim.asm new file mode 100644 index 0000000..8c6a08e --- /dev/null +++ b/gfx/pokemon/elekid/anim.asm @@ -0,0 +1,10 @@ + frame 1, 07 + setrepeat 7 + frame 2, 03 + frame 1, 03 + dorepeat 2 + setrepeat 4 + frame 4, 03 + frame 3, 03 + dorepeat 6 + endanim diff --git a/gfx/pokemon/elekid/anim_idle.asm b/gfx/pokemon/elekid/anim_idle.asm new file mode 100644 index 0000000..9f0c327 --- /dev/null +++ b/gfx/pokemon/elekid/anim_idle.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 5, 09 + frame 3, 09 + dorepeat 1 + frame 3, 20 + endanim diff --git a/gfx/pokemon/elekid/back.png b/gfx/pokemon/elekid/back.png new file mode 100644 index 0000000000000000000000000000000000000000..8049ca5ad5b08b27d62f71a94121b860714da189 GIT binary patch literal 508 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>pcBW_6GR0|P^~ zSymYX0|QG*kY6xJI9J21l7WG7wx^3@NX4zG)3}QcEAY5neE0W#i~tiS%MQiKnQz}* zzW*Sok2~dO>cxHjz8gA&TvUV(oK*X>=oPDXjZf8d6ZR7RD$j!JyO&rcG%}ms5>pIQ z@CaM*S1|SFs4!w?*nUFPSLE2E$bWB_wRy*1#g~CLyuITgnzlt`XGzdy{j%-8apkzpW2uF!7#s`^tuU-1f`P7>AB)^91zlHp>zp_6lmSx!a%F|PwHLfv-y><5v z{W*<0e&_t+xl+61hWhIM!{w-8hpUV5j0)l?7e?ETlA^`d0`|5zr=udwC5 zVTRa(|vu@V`29*&qM_ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/elekid/front.png b/gfx/pokemon/elekid/front.png new file mode 100644 index 0000000000000000000000000000000000000000..eaefbdc6c56a40c39f073fca8d8fd5ff21c777ce GIT binary patch literal 1092 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{v5>W?*1ATFWqtfq{W1z$e7@KL}`62T3q6 zFjSjml`$|du#^P(1%rfhHQXv07?>Y>x;TbZ+@IUo(v9SeQTSmgWVv z&2jF3pM7l02;OqDGlI>QZC*!;&s;XYhF3y@CS6(q#r=#TWlhh0jkz})>=DQ=-R63s z{en`%zBY*R?67FL4Ebn7*(5_FO=TAT&rl} zyVd3M^)#lczc&y43f`W2?agxk$&D-1^NVAr_1&v^^_$dW=iyV*BhCi@CmUj?iOOGqZ&P`o1R30{Vte z6f#!s`Xuxq;qf8w+&v+?1@tA)y|@)$kr{PeLZ5ez6Re{1voPevd+Tq;jq`eLl#xc^ho=`Z?wSk4=V$1zQs zK507Bo-2#*$69?9iZ+Zr{jYPnT8vZY$4kFG|DN<-&;I_5x6bR5bg{1=rg-kJc$see z+**HP$N>%giGN%wSFSx9a3Ss7=SevWG*(m;OY2XpnY>cG^|`8~yAJP->fmEK@0}`M^F;N6d)zHn^SDJ%mcrov$;5N|FK@+v+EemY-*-=l)8C~l&4ZKv zs=iK`8c=_-V&#!v-p9PBDl+|5eZ17}->vvfY+^}&ms;yL+I^ZNey6e%6jTtrY5$bJ zOW)|H)@%OuKIwhZ`@f9-*8RWjJ_xdFRA2K i`7)RPKa2if_OHHrs&h^HZ!j=0FnGH9xvXt<7f2^2cEdvN_ z;dyh0fq{XgB*-uL|NsC0b2Z#585kJjJzX3_DsH`<;@RY^$ly3n9jrj0IV*5Gcr(EUO+Ip_`xR=_Nef8WNfHr z`_dn}D30w>WklT5QH)j|a7+6Yz{DS}g|NlQ%!>y8mfpvqYi(^Q|t+%tg`<`g=xNLm=|NqZNn|NDP zWQFct%~Fk;b=Rky>+^uX! z@P^*sXWH@%q_j(JUj5N?>Pleex&u$w@SUEi6)n~?|51@;pI28+&!WZUAD3oWb!I!t z$GtUv)zLk#P2|{3tr{l&L%Zx;-MVk7?cmJ5oG1ChDf`@%=bV|byvq$wzp&zrT~WLA zc&3w!;+aheB4u+I`SYDpSR#QC>ao7`CE0?is=9CS|y({PKv29r>(;~CDb!RGvW{#Ni zl%HFsgqSU?V!xZYq+cXiI5B!*jLTy*YQ_TPZTkn?Sr_t~sq?b;=iGNlC5X8b-C5}JPe zpY4mb(z!JY_=7ebjX2?HDY<69F?WZy=^r1Z_L7BjHi_-s8j-GO-!kWFuwA&nUD?B3 zXQFQD#-*gC1@#%%%&PRe)&E-0T-X25zD(0t?@edL{n(1zzx1}q=I0x(D%ksb!OB}t zk6Le^9h>IxG$5M&)AZS~oAMu?ZIa{B%4@CFf2#2Lo(BIqvmecl|EFG_9JXoE!K0tf zJF(@3JFR~u@guKBq^j=P;p)k!4J&Sn+i>uU{Z(cw6kqlIt3rt78UCb)UiH$KT3;+q zT+eriC-yDdTeaJw7tK@L_RDR`QrTqaK3(&t(k8aPJgd}O3q@YG^3Cc!d9>eg*+qMw zzz-4k694@7?d-dKA@;()VAK0L>r*ZK{{*$>oeYh%*fa5}fzi@EkHq+GJtWOmhURTd z)re%ix8#BJcwETGK#&M5>{e{)Re7IAp=rYTHKyW7B~x8q4)*y+`pj*~4dzPC*~ z#eZkv&AtFnp(TA~k89`bTr65QZ_D0$TnqQh&z-TeId$&#zGF$g?&3vxmc{H&*SB@9 z__2fYqWZd>&2w&ln=WBGVdsR`%Hnq#jik=Zia%Vqm;d^m#tW9}6SKBV*PpdEw!r1AliuEaudRuxf+%0nV*}r{eq0nk& z-YWeahmG@YC$4e7$H^pDSK$7KIrr=S{$Cn{Guehc4U`DkDL8NE;mgdg)xt~m{5mW9#pPVk<+<$DXJsF~od43(M4o$1Vf&BI+W%PA z=@hjuv9I{Me`j*>@n?N!WoKLe<12rlUH)SKLD`ixCuMzqbXl{hUfcP2#_8)jlmFG_ z&9vq-Jz)JVQmdu{Oo*(;W`pvYHz4n2)R3`cCL+rSb+7@jC|}t}kL|d-uRR z?kRV9frR{y#o?vzcO2e)ll>h>#?J$?B8d<`{nsjgQylht&Q-hgul4gbA39zfc4E_y zua?^OdS8Fd3FW#!fAgnVzYbfjt_yhe*HSyM#xnh?ybMgs*7K3M?{3`L2nnHcvS)t;8zk_+U^|$-wZ}z{3%Yj1Ato)DUyC3`sxt6Cs>Q9yfmFb?YelF{r5}E+_1?cJk literal 0 HcmV?d00001 diff --git a/gfx/pokemon/entei/shiny.pal b/gfx/pokemon/entei/shiny.pal new file mode 100644 index 0000000..e806f7e --- /dev/null +++ b/gfx/pokemon/entei/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 10, 01 + RGB 10, 10, 08 + diff --git a/gfx/pokemon/espeon/anim.asm b/gfx/pokemon/espeon/anim.asm new file mode 100644 index 0000000..c228c07 --- /dev/null +++ b/gfx/pokemon/espeon/anim.asm @@ -0,0 +1,8 @@ + frame 0, 08 + frame 1, 26 + setrepeat 2 + frame 0, 07 + frame 2, 07 + frame 3, 07 + dorepeat 3 + endanim diff --git a/gfx/pokemon/espeon/anim_idle.asm b/gfx/pokemon/espeon/anim_idle.asm new file mode 100644 index 0000000..1ebdbfc --- /dev/null +++ b/gfx/pokemon/espeon/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 4, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/espeon/back.png b/gfx/pokemon/espeon/back.png new file mode 100644 index 0000000000000000000000000000000000000000..26d2d29735425c2b9485155033b51f95fe6d1e90 GIT binary patch literal 410 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f3EskwdNEC z1_r%t%U3ZlFtC&a`33*~|NnokhFc{A1EZyqXB{r|Oo6Uz@?^`w(kC$#;}96WTx&)9D#S48s_m*;_x<_AA^mUyvA|Ehy- zg{Dbj^3@FwO)oqN-MG(o%CVEzybmPi#%+85tlZ+rkJ-iX71fiR%*CcJdcMmfQg_q7 zH5QjXwpCfK)?B&Z1V1Bt>m61*h8(UV46YN{*ls4~%&+BmH`Q{Jzd`rZ&1`ebdyedG zEa7soOKXYR{#0e*r4XZMwTqvqgxBR9-|Jn(u;bxYK82E?KBGb@2j{NmEVCco{rdUR zw=ci9urWuhf1z~4IpKWPPHBIarGMAiH2r+N$L93Zi>>cjEGka^>3(p|`1I@p&*yc% z7t545n)%4Bp`h-mzpKCt9=};TL_0ngtDXM;blzm&fTh)rGhepFTh?m-V5nTeDr?xX SUXFo*fx*+&&t;ucLK6T3Yr1{_ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/espeon/front.png b/gfx/pokemon/espeon/front.png new file mode 100644 index 0000000000000000000000000000000000000000..dd68a6c1894c9701e69260fa4bd06cb8864ee449 GIT binary patch literal 897 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1~)o%K3T*^r~P@$=Znl@FB4+}^?RUiaFWp08^^O;_%W{A|TG)p+CNkk`*^ z@3Clndty_(`M8~G$nW%kC2b6o|LQ%k(@X!ETY#ggu-m@(8+wYs!Nqo~ z>GKrB&%0JM*A{=|a4@Sp^Ue1|OLFLx@XXb`Z%+S^T4_1s+&+o(#no=hO#Pekwk)5L zCx0{Nh>%}$d+OtK@lO_^zbEx(Xf~RLK69O-u)^Whx-TE6>FoL0%sDSnl6&Ka7q5-f zeO@L+HtAh>bNtnzBZvNO{@u2KC+K&&(3H7y&t^Tn6#GFS#5Hp2+Y)1a#TSlqML#T$ zID3?5gNun!z~=X_=f)giGW)H|pVw5$e{Ii%3|<+o6Mj!(AH-fLb!+SnP)HYdx!AMB zciYvun*Sd!xVGqFjSS1I5(#(FyPO^8nbfumxM*)U;_y|WTd6ESG~(52`#g8YUc)L@ zTaK)qZ(3J{9^S#bh+D@l*|dGzPR?Ih=hp6=_dh77s`}vC$>okUMjBq>e`Q(UwhFIF zS;Z`rwx^(VYT;_h1G`Iol=uHvuhgu3`Tyb4YlmD2Lj9 z_gGbDkIPAK1guxow>-+NUwL%ybeBJ0kMvGYIku6%!m~zm-+g_>7aq@lFZC$g9iPSW zjJ5r@YBcli-zy&f4a!wNeRB7G{hR7Zjyrz;on)$WBuD6;{?!E^R_gBhtvV^c^5r9@ zbhDpb(^C?k`hRS%*VLE275*s*3NP(H>K(Xy?|psO%;LTApVEIG^RAk&W_;{!rDxXD zKW{2ySS@mye)LRF=suiLmA{AO`u=+rnao?t-doF#BPnhd=c9ED z&&2oLI`$;?LClHmO%fZP_(V+E1Bd4y@2iqCe|zI;rOc|86Hl|>kJl<)Vfo|3Z*QYX qy8HJ}xgUS(c_An;>do~3GB~eRJ7a!SKA(Ysfx*+&&t;ucLK6TjkF}Zr literal 0 HcmV?d00001 diff --git a/gfx/pokemon/espeon/shiny.pal b/gfx/pokemon/espeon/shiny.pal new file mode 100644 index 0000000..8f2343d --- /dev/null +++ b/gfx/pokemon/espeon/shiny.pal @@ -0,0 +1,4 @@ + + RGB 14, 31, 10 + RGB 10, 16, 08 + diff --git a/gfx/pokemon/exeggcute/anim.asm b/gfx/pokemon/exeggcute/anim.asm new file mode 100644 index 0000000..d5ab582 --- /dev/null +++ b/gfx/pokemon/exeggcute/anim.asm @@ -0,0 +1,16 @@ + frame 0, 08 + setrepeat 2 + frame 1, 04 + frame 2, 04 + dorepeat 2 + frame 0, 01 + setrepeat 3 + frame 1, 03 + frame 2, 03 + dorepeat 7 + frame 0, 01 + frame 1, 04 + frame 2, 04 + frame 0, 08 + frame 3, 08 + endanim diff --git a/gfx/pokemon/exeggcute/anim_idle.asm b/gfx/pokemon/exeggcute/anim_idle.asm new file mode 100644 index 0000000..c4a056b --- /dev/null +++ b/gfx/pokemon/exeggcute/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/exeggcute/back.png b/gfx/pokemon/exeggcute/back.png new file mode 100644 index 0000000000000000000000000000000000000000..97f04b02ffe5c66836750a0422a736e3e8558d9f GIT binary patch literal 431 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|G&Ctj;0p_ z14Ha&1&~6Pk|4ieka(_!TO|Vnqo1dXV@SoVw^L3}JEFkhvh>ye|CLkPm1ceUvhSpt z`n6Dn*0p~hiAz1`(0{V%V?2w}+SSV-#UQorrCLiNLmtcXM=r1yHEXPI30cKR5|0{$(~{tp6+#D_Fg)! z(e2HF7aemAI%FkU-U>Tt73fGDjM;Kh_JsCMd7XI4TH8ilb%)Jw_Bt_Gd|A1%LxIUb ziI2hZMwZv)IVbNm+$q$oFHyds6~K2Pe#?{DACLZiv(D3Pnc?q_OS^LZz4MrP|MR^U zLORXdcKkMn@7o>xvu665e!)kFb<F;8T=>JT^gcK1k0(W94oBgKBqn5c!)lq zE7S9~HwzZ<*`!uaJTYs-W-F;l=Tr43eGXPhnR?Rm4)S8p=pT2rQ-J)yq4DzkahlZJpc>+czI({KCloS;6J(RkAXK0{B&FpcvK84h0^ z_wCJLmS(wjQa4Cs((1&^>m8oFm<= z;ekYi((Fi^mLwao_M#ban(HG}^L!=<{A!#W5-L zmGlBPzs6lz+viq!Hpc}!Zj3u%CK0Q0YvS6{sejt$ zh<#Yg-n8bD^)!afuJd9W*q>>>d~r*RotsCxw2Q-f{lV$dvdhf0l2`9%kvn)RnBjQ! z-aU`MR~!#mdabhkz2o(Y_QSfL`>Y?#DZj&zUvZqt;F)ak=6fIcLVMHpG$-9#xZCTD zSJ4sc7j5M(&sNCCeC*SHAo@PQeVV)8hdzN5*OCn1cQlwc3aA}9U_Gs|w>)OKxOShx zhd%Cvtvbi|B)7c=8Dhw&buaPuJl=bW&eiSZ8M}5JwGPR+|B0_Z=83FwUs$DkgUmMG zJ%PN51eqJ3YQthHYD2K&v^E8HVihF2W-+n&zXp1!9!?%u~wefH<9E&jXgah{tb_?~0p zyCr-T>`&i+P`a16?|jRzTqC<^{dqr%kR|p|6<t<7zckxWv&E8u zfx+gCQW66L14~JeU-19`|NrM|xK%PRFs}1-aSW-rwRYO;GG;}NmWh@B%hxGQcicSt z&kD=snP#6kn?1BY*>i8Jo4#7>^w+s@MXcRN=P~^9?H71&`ZC;hL9Xo*)9q7OWj?tJ zubi$|Uutvp*k6VFN;%4(V&$gA>Yx8)Bf<2=cV6j@{e`I$RxcOqVu~r7o%vPoz)`Pn zvJcm9IPzNg1c&I3s2pRp&*JRU&ICrgId#~RY9ZYxF^n35=iNEJtF8q7^LCCk?Sp_x>o4TYvkf&{ zEEyOWY|bbpF)%Q&lmz(&|NsC0f3AjGB?AMqou`XqNX4zUGfz%ZRpfAO{r&&{9ZiKr zFQ;6+E4cMS)SiRoB8*d`XI{E*=8?U>>MOrN-L223HcnGVV&IMthT_HTb~VT>_Tw$3^i&nweSuPrhV$lGUjZ_y_;|IZRSH#Qz*+jOKuyl-t} z1JkqeSc_wdj*-0+rS7TqNcc>1Dra!EVDnra$Dthl-y&7N_QU1bYhu3mO+I_{sUhnf z+quDu%P*L%vvZ1hqNVhVY4h^vlnmLguM{HW))@7%GYdHyR$9AgyPfy{w33nev_;5; zz;&Ez-(Cjj*l%0wIZ0UeWZGe4(N8T#%{R3=^)4@ec}_r>bIEh*o2Oniot}}u&RRtC z-?UHnC7v(|?fx&)QrXyc?9hXnU7h?!*~U>K4wqxscwa8r+z{|d)E# zlm7RLpS1n=e0)@x+n0d7h86x8`3lm$~=Ko~`=R5wDZ-EFt!9JeOQEwb&dQlRnQTZpm$y zr3E`YDnxp+4uqb&@Ed^Am$DzzBZWtMH=Jjf zQS5X@Wy^2fuc!3+)&0ywZk;b{kmt ze!O4mF8gBgyALkM-R~y0@6zbk-=)ms`Pb^%jH^YiRX@s|jdyD)zviAU_rbcga+!4s zpY?~89{mM>bR*_HL;omV?k&IK1uHPH6Uizt&1>OH$<%e5)B4wL16 zGFUR5y)VS;yTC|!S$d`J(@Bl0npfAReGNIg@Eqg+1^c4rhG=LtI?auBaa}aE=E6UR zsHK~)Xa`nA?8^9d(Qm!T!@#NR%}xt@-}1h`T5(gNUG;CY-5gOykn0Oek6)GDA6~Ar z?zHpjWxJA-*4FO5CcAjkGJel$)c0izO$I16MT20YkluK z36XjBmt)!3y_4rlaYHPldt<7zc<;*@EQjL z1H*xW2@@F@7+6Yz{DS}g|NlQ%!>y8mfw9ih#WAGf*4wGCHyu{sXlbndU!E7xa`ec& zIsdl?t2=+6yn5w{{9e`v^;yQ%{yTnM+W-CG^Yi-mstQ)_TwZ=e)$GQNd%^{a7$lkH4&QU{+NhJBVlZwEvjrPL9cN#CukMT)jl)TVvry|B3%m0Su5sylN=oX`W zKRvveW*l=431bWK*mUWtbc3|R5i9wr?+hwM%f)APNA(sS)A=p+iE%~!yNfd{H%R$1 zyiAP#F@fn$qJYeVjdA~2G+0A+UF;BSiszd4x+u~4y~C1iTscgauBW8bh8Z#$DCsS} zqT$+jp^-A(TE{M7(T)HB literal 0 HcmV?d00001 diff --git a/gfx/pokemon/farfetch_d/front.png b/gfx/pokemon/farfetch_d/front.png new file mode 100644 index 0000000000000000000000000000000000000000..1ad86679f3160418363875ac8707da8192b2053d GIT binary patch literal 1049 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{v5>W?*1ATFWqtfq{W1z$e7@|NsAclbsB& zaWF7294MGDk%57Mr6kBN`2YX^|8q6mDj67Sk<;XkYq5`6k1L=Q~7% z=X|nY&pF$Opj4wN>uHlPU6F4VJ!3 zy|t0$@y1a8OR6m%!5XVNUOP4B+6X*IT=Q@G>kpU2KM9ppc9vImR!*M&qj=AgIG)F0 z6`EWBr0!XgS~Ge2jlF9>2Duu0@43Qhciwx;A#bmvJFl$&6m;BPe~(MXk5{eJA9R(* zdA$~i-m}EAuHxl~OAnVG_U7L6CBgp5Qup72`e)ON4|)6Z9ou8l_qlQUEz!^Cyx-1> zv58;g|0#%tm41 z-A_Wkm7146#($o~8CI$JBYo!d0&cO&mvJhm_gwKk$gMBPY`w=Nw6*&A(se5PJ_rR* z?Rvjw3D=s>La*w@?^kk`8pb?OefwTa-_-g5$c63G`SfMuv?@F6>i2Cq?QOSAde0NZ z{0~C4^QLD^p8o3WleyE?(glj+c9p*^k6U%AtZ};3sfY(l-9Dc4zBB2Jw*J=SKL@%Q#mnCnFWF-!YNmDgs_$fAU|{fc L^>bP0l+XkK2|WFH literal 0 HcmV?d00001 diff --git a/gfx/pokemon/farfetch_d/shiny.pal b/gfx/pokemon/farfetch_d/shiny.pal new file mode 100644 index 0000000..2bae03e --- /dev/null +++ b/gfx/pokemon/farfetch_d/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 16, 14 + RGB 12, 20, 01 + diff --git a/gfx/pokemon/fearow/anim.asm b/gfx/pokemon/fearow/anim.asm new file mode 100644 index 0000000..6464fbc --- /dev/null +++ b/gfx/pokemon/fearow/anim.asm @@ -0,0 +1,7 @@ + frame 0, 02 + setrepeat 3 + frame 1, 08 + frame 3, 10 + frame 2, 06 + dorepeat 2 + endanim diff --git a/gfx/pokemon/fearow/anim_idle.asm b/gfx/pokemon/fearow/anim_idle.asm new file mode 100644 index 0000000..f073eba --- /dev/null +++ b/gfx/pokemon/fearow/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 4, 05 + frame 0, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/fearow/back.png b/gfx/pokemon/fearow/back.png new file mode 100644 index 0000000000000000000000000000000000000000..f6fc2a63a77ba9e26102b1abe65777127f2c1ca8 GIT binary patch literal 339 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zcotnzhMgl z1B35dM|}nc29}Z_zu^D>|Nqa`aI0isVEE+e;uunK>+O`=LQaYtuBGq)|9>uWp?Uh0 z>1kPNSv4!R3h;$^{r_>S!CKidQPMmj?rqP#fCweM2Z92x!g*}-+NQo|xyMqu_(0mn zsQtpP4kjEZA4Kjz084~m>uh4Q#rnH#3g=ec&^;Dq(wz9v$;*cLmx zr)P4p)XufKcT=N;GwYD1SvW^7TQ%3MjB7hf?XJgcUDh`7wDID@s~tn${#`6v$ekmU z{X|x8YU1iC=f5?T%09a-vg6Z9!@lj7$r27_HnR7%Cth8!f5FGxa<-b8O&?aib&fxG uI7$D{)9G)vJ>Tr~=l}QT+P|D0vL*|%>MWV`(3XLLfx*+&&t;ucLK6VcyOGxb literal 0 HcmV?d00001 diff --git a/gfx/pokemon/fearow/front.png b/gfx/pokemon/fearow/front.png new file mode 100644 index 0000000000000000000000000000000000000000..f003ce0f7c82b38f956dc9820ece68c78946d156 GIT binary patch literal 1316 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsA6qZI!e zwlFX-_`Y@2XJBApDGBlm{{R2~|6C2XN(Kg&!=5gVAr-gYM&ImHR^&Ny<^TWBZ1FR+ zGk+z9N6nnMC2f*kP7h=F^dPTotJxmBTq|0ZX`ocab@aKrKJPWDc{2|`KcxSuP5qg~ z)w<4g6Sgk2^DQv=V-b+R8|A!py7Z^UTWh}^?@6sr3e11OSM2_Fu2buOvy9KdHoOk* z+jd8vVY#lyDmQx-uOP=^!T*QlKkk=sJG&#z?Y`R1ug!1%ZZW^{M`#}37f#&}rY*b{ zKcZ5M9yoAy3hcVx7{q=`qw<$Y3!{hN&6o~hri>J+3CmteOf2TBS&(>6MWCwD#p74> zrGOaG{Xf$`&pX)^i z8QO8rSw8!TG#*q);eWjK@lOM$@_A0?iwu35PhMP5#l;qSW^;6(LvO|AaGlu#L5eL~ zmFBVBO}M?Hbo%;(Np~39W^_5;yIc{6YxZ*zp_-czI4WVM~YUMkkFf&mo5$4_fIY7 z*szA>A^ZCWA1BraRL%U;T;4HVW8s`FlOIXH|8Vi_;Z9#`1`@&a%tv zL~NC;s~*TQ_f_rnG1zv+^XwVxLp5JI7f#S!Xu`2aS?n3}rL1og4hP&5ITLlXvw6>j({I%;wO;qabo1w0DQ+F?3IIlm`(^>!3 ze8#Ee8Ebd5UOUWS^?pUV|Mcf-%w)J26bmzVM%BL&3{wrTKNB!Dz zi4Sq_Id)j@UCgZiweOg9+)LSt)#VCb`>t3Az4zFw{IxIVr1hloKhgIT({BjhGt^K$ zWaF^El0E5bWDonEr?O#r^$%rLgzlZO_Ncc0%x7r)p>M@E*-CcC$@dbUy@_$tF|&H# z;IQ#ozqPc#&vV(J1InNH)MbS(3vxV_ef9i=^_}o!gIM9lk9-k-9x8`vdd8hv*Oa5U zr`heQ6Z6tts%n}6r?%cY^X^OEysCnG(gmrkQPWs8H}I@HwdrW!`w3sJtL z_cnhv2l;YS>gj2^mF}-(rSCcFf9>m9_34@+Gja d{F779z)`7IU2c3t<7A65K*tsw^k z1B1y1qk{|#3@jx6$|Noz>;a17Oz%Tp-9A4NstB85bV`Z$p$W!(8^nrz=OEG*OTW;Oy_Q%?M0>0G}KU$M|zwtVIPN}!#!3BS%DCzBP(Fsf2?7CXFEL&^5 z-c?z^rRR5g!^%X@gOU4}?0-Hf`OWI*>%uL?+EP1bKYVd{&Y|K!p$GdkD*J9%&wiBJ zP+B$nM(b-fH-pP8;Z@9^iWl9izw7i`RUz>qpeLce( z;fB|X`VB8KElMt&=zTIkSdxfinietTcs`0)JwmraYfb1#*?E@zXz6#ad5_DcSp z_m62Onp@}vUi|TVs)6L=l7sQi<*QcJid|?AJgUW_cKr9<70Fk+XZWmEd);t5U&@GG zZ=1#xo_jiP1-ATCDAC+>)aG>LiN|6o=7ujn>AZIMs#|}*J4eHHdHHnCzLj4MzkMva z%O_;mc2j3g+Esa1(Mul`Bj<1Fe&OA;;qqdo-s`PauP(fjInw7Qth#uY-m357|9r&x z0)M`IVtaR;_Sq?Jwv&ugC!6JzJ)LpsL&M3}>i+D%FYP{AE45Ntw0vu7Oa7C|erzu< z&F1M9>D$HpP;;{ySxxHGZu~0ZxHj?7 zW$BRVVTyja0dp(P>n)VA?%ZOwz-VbepJ3~x-+{A(i+@O3%zpFjch^h)=wNBHrV#ap zO|BkM|5U4mX6m+U&*lx&IaKo3VnS|~?sBKDU~b-_9t<46^+#ZQ1Bj_Th$5 zQasOrgvY)50P`162rrk`%|>p#wW@ZL%K>b?NG zJB2$Q7aadT&H4m?YyKU>DYKT@7q%~nw>)?%^YaneoW-%N{C5(U^PIQ*(`hXbzoPob z5!u2$iKnu+-%-43v;L6vyN1nEqMm5}*uLw-mX-u!4N#PR)f;QCz$pD={Q`Bo=&h}-c+%}6zT`P9bS zFsAk9^XXmA3SCzei!*~$Rv)#i@-=7)5>X7d;(pv0b?B!;?*3cZ(eEb2^5?ZxZ##L5 zwcLUu!lnQ4m7R-40~mByhKiLQmfgoBTwd`iaplJNV)rilg)gq(dB~m3{wn&Nht7vy zYcaOkv$De1>L2o1LBil+-(lHy>wo+1AFRLmK0->B|8L)v3dXAY?;lLNlox3C#roC) z##AQ#=kI>W2Ig0MlV1KldB5{zo!=iXJ~>*vU-^<|(T$JA`ww4Q>2_j8R$BA#I`)%` zCY&&Eo;g=^b{)G1m&x=%IhDI#tRuSIzIXqrE}SM*asT~_mkO1Wq;|b6Pmwfoy7SH2 zLQ3UT%tqdlyYCfzLOE7kuzB2Meak0%03oUOTTNGvWvgZhP&M4F#G=IS@+ic zmW}FJb@I}Cga0abzFCVb$=>hmRB>FE;|NRc&gA>=4Z6K_;&(95v$rpDZ_ulK!gt`n zBja+0c5A+JnRgZtkJ}%RovLP6;GP-1=Q-adr(eS52kuJA?@0dhP2!vNFaA3VwRCyy z3ffDTnJ|24v(_j%+aojruCu+P$xjbp0E7R_dAXI vAMxp&3cs`Q>fH0?b1;z1yC2(kJmy~|;E-}gujCE`0|SGntDnm{r-UW|dsxjv literal 0 HcmV?d00001 diff --git a/gfx/pokemon/feraligatr/shiny.pal b/gfx/pokemon/feraligatr/shiny.pal new file mode 100644 index 0000000..afe21b2 --- /dev/null +++ b/gfx/pokemon/feraligatr/shiny.pal @@ -0,0 +1,4 @@ + + RGB 08, 17, 13 + RGB 12, 07, 31 + diff --git a/gfx/pokemon/flaaffy/anim.asm b/gfx/pokemon/flaaffy/anim.asm new file mode 100644 index 0000000..7af3dc9 --- /dev/null +++ b/gfx/pokemon/flaaffy/anim.asm @@ -0,0 +1,7 @@ + frame 1, 06 + setrepeat 5 + frame 3, 02 + frame 2, 02 + dorepeat 2 + frame 3, 18 + endanim diff --git a/gfx/pokemon/flaaffy/anim_idle.asm b/gfx/pokemon/flaaffy/anim_idle.asm new file mode 100644 index 0000000..1ebdbfc --- /dev/null +++ b/gfx/pokemon/flaaffy/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 4, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/flaaffy/back.png b/gfx/pokemon/flaaffy/back.png new file mode 100644 index 0000000000000000000000000000000000000000..36259453c44b0904cf6cd381a9b7b1d04ef9aa25 GIT binary patch literal 489 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|37<9kVG*9 z14B*Ol{^Lp29}Z_zhIDfu7+DB0|R4+r;B4q#jUp?w>L2>au`4P|NmzP)1pmpzx};2 zGjI9q0`Co5{|Cz}#vihn|M#_Z>H(4GC-iyZ?Cp#nE!}dTW5TyC#kP03`@Jv5cP8j- z{aeAQ^t_(ozDe!_zW46;xUzq=i|BobJ6Fv1@b9AZ7lE%>u4KkN4*1i|?5^_QQ1>)f zP088^GZ{q#=IxU1i4!*3*LpALSpe6$K2vQ;=}m%{`EIyu6;u9^aP34(E1Pkv=#jG; ztt{s@^gX|D^orJpg9f(8gVj%_TD4l<$`$-o-ZalMqC&Y^ga1I z*F>Ks*6KGKOU_3-vd!i{_%venLc$vnuG4#G74sPe`)=Xf9pinBq6_<>i#< ziWwLfYRazUF)%Q&lmz(&gT!+++$tFun4WvOIEGZ*dOPc4*<%GBmy2iq|NqP+6p@f~ z!nxdhdC_eX%ZnVI3P0^Emfo*xOi?P#I{&Rmr7`MYX8FDDwI;lLizIt?Ml%1i-xSti z&Ur*LJLAxw-#QONy)(2T8=mj55M6f5`|i~A-}Bn1%%5|}+e1QFv+GUGmUe4~H&&Wb zo6}F;`n|_)ljw4(XZZnpo-bkiB~cU>$LJkeJ6)->Wcif|zlAo0bf@kUTDsSC`IJYS zPPgiYnl9p8#lPCUk6(95ltB9Wc~|X9mp_`+*7{Dwb+5d-A&3uPmF>f&Nh@UQIuSA`n4VJrf;hgd8-iZv_b0Yy4j^UUsPRo%#caQwvuL?=4pFkwP*3n81@Y( z^Phdmj8p$}^Iz7PZ|69}Ci72b+B<*8ys3BPFP!<2W1n_F%tZce?)29+$FI(ua{c$U zD@`gVMZ!M>eYmv$;nJf_`Fl+6$$i^n^580?zHi0W=Sw-)f7@g7=qjUrZ$;@L?>WnU z%$xp7;O~U#A2jus-oCf@^QA3E=1p%Cvv{yndh*+fl@*7*J{<6_3YXrq?^Dq2JL+*k ze|A=^72LGMMt zt<7|38Rht)>72 z1H+osH4F?43@jx8sTDp51D@PG=H( zLeA+G3TYf%^BT29KR54Q5}hD;Ai%h_j_HP0LzzOuPoFb)wp4L3u2>$q(Cx>aSBIS$ z)=Bv@STD#HSNQeze{sxfm9^gI%VUIp3uIqB*&eUkBWSXhxh6^PC}T-}%6qOfhNmjC zQhum)FUlHW<Qu_U$B_-~uLxI{s+{*i8zdPLN=n-kM#oUf_a z8u6TWmB5|Xt(hSYd|Vi6j8)AW{>^0h+pJN<>SOQDvE6i9b>S=1mN&{B%6BA_dK{#S z6rE%euTT8GIpY6X&+Y0ZOLj5@3w=4uZ!6xAE12h+wD(5+K|VIs;=~qqP!xE&`njxg HN@xNA>x#qu literal 0 HcmV?d00001 diff --git a/gfx/pokemon/flareon/front.png b/gfx/pokemon/flareon/front.png new file mode 100644 index 0000000000000000000000000000000000000000..13a9af29a665368e89c10ae2203b43c7458fd1bc GIT binary patch literal 1090 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1)_nq9+PGF1la;|1a*@;i-^V zapP8w?&MV}k6&(M;4bkx`T5U6arxJUX$|QNyHEY9Eiy>l7uCk3&LO1Y0PhFBZSf1fuReK~;hI8~-lq!( zUe)gVzo1@X;=vbF4?ay`NXCNa33kILuW)b+kt?WC-iv*6Bo z8Z*}{$#ML7@FgSjMX~8`ef}Pu!~Qtpf_#jqGjAGSvytq&wk@|Z9b8gBR-8CFYgPzP zsbOkuck`3EXLjd)onn1fL3qKW;Pv|~?&$~h$NHN0YuGz?Uika#%Sr8cF^|_%4?pv~ zy7=Y%I_}l^&!?ZryjEN{@0_Bpx5wd*F2;|M`md(QdfD5S@ceS;)$q{1u_q;$MgjY^eJf^|8GSifl=48vN%p8h{&Veuq~c$bozk(2lT?_Ss3uur$;op! zQ82_yanIp%EgAE@HCwV3V)I_tOp;qW!)4Er6F={F6)!zJVfv@%q57=iTb`(Takute zxWmJ!pZd#@{nsI5LH(t#yMBlyvhGP@ z?Uv0?RNq~`c4qqn)fD%If*0#Q2#F}YO5gBAHNC^S}@BX{= z7EUCC3EjR zR1IEkUU`z`#v|1iZ}%MZRy)9_uUT~C(b9#NKb`e9m^&>$ZqxJg=K8&|5B%c}l`LCd zc`|#MUggQwnXLMWmDjBIv^=+by!82}OHY^Hj^FhcLey{F@6!HP_4BP)`nO0^62L;8`rS}he+o$KLY}?m-Z9XXXd%F6$taD0e0swHX6chje literal 0 HcmV?d00001 diff --git a/gfx/pokemon/flareon/shiny.pal b/gfx/pokemon/flareon/shiny.pal new file mode 100644 index 0000000..7e840a3 --- /dev/null +++ b/gfx/pokemon/flareon/shiny.pal @@ -0,0 +1,4 @@ + + RGB 30, 17, 01 + RGB 24, 09, 00 + diff --git a/gfx/pokemon/forretress/anim.asm b/gfx/pokemon/forretress/anim.asm new file mode 100644 index 0000000..1ee6264 --- /dev/null +++ b/gfx/pokemon/forretress/anim.asm @@ -0,0 +1,10 @@ + frame 1, 08 + frame 2, 16 + setrepeat 2 + frame 2, 05 + frame 3, 05 + frame 4, 05 + dorepeat 3 + frame 2, 25 + frame 1, 08 + endanim diff --git a/gfx/pokemon/forretress/anim_idle.asm b/gfx/pokemon/forretress/anim_idle.asm new file mode 100644 index 0000000..cf685d8 --- /dev/null +++ b/gfx/pokemon/forretress/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 06 + frame 5, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/forretress/back.png b/gfx/pokemon/forretress/back.png new file mode 100644 index 0000000000000000000000000000000000000000..a64fb148046b960826c4a985aaa8d3944c7fac07 GIT binary patch literal 229 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7e=O?S904x| z28M&45wZ*n3@jx6$|Noz>;a17Oz|i99;uunK>+OU4ld&`EH#%cJrUd#m8j}y_|PwNz9va>p@I=cH(LqLAA99LVpCEO5e0B z=hfz^uICmmT=Q9H?=vgUIlA5Md&+Dc^{;f6S+?9sVfwzrj~T5CVyCWq?R(n2rr~L` zK`*yrk@TuvS1ySxZZ_C@VEV)`=lNNZY1%V4ed|9glO2E5ReamVmFvDPX0|vcba&>q zGiC+)+ZgBEW%*$BMef&qyW@A#1C9qzd;7pJx|+v7ZreYhyw-@8Fmukmar#w%RE{t5 zwO=-0CO`bk%C727Nmp6*cfRs+)$H@J;&wO8UcKy`X|&10^DDOdT>GiBrEKTXnm>!p zMK^|RP;zUD)kx&cKP1>{nQZenO!T_>y6u`9^E9vNm04Pz{C7vj$Zv+xB$uZjW*MbL z_9yI4KJJ@azH|5SNgK0lbe5W_{<^%-OXZ^V!roPU2j0)<5h-p+_56~fYRbIL{mT5w zo)%9p6wWnqY?(4a(CqCDXLrT+Rr9v+d^)hd&CIbL?!sPo^V{O+`{I_ z;_rOrE(>`aZanOJ8nExY?D5HG_dnsQJSqE$vs~xMC&uyz6%+11<~uRpZS3l*yUmmkB{NEATqMva;4}X`f nSwH9f)X#g1K#IOy`p4k7!s}R!Mt3X&0|SGntDnm{r-UW|te(st literal 0 HcmV?d00001 diff --git a/gfx/pokemon/forretress/shiny.pal b/gfx/pokemon/forretress/shiny.pal new file mode 100644 index 0000000..84aa229 --- /dev/null +++ b/gfx/pokemon/forretress/shiny.pal @@ -0,0 +1,4 @@ + + RGB 18, 16, 02 + RGB 10, 10, 01 + diff --git a/gfx/pokemon/frame_pointers.asm b/gfx/pokemon/frame_pointers.asm new file mode 100644 index 0000000..5d87ea3 --- /dev/null +++ b/gfx/pokemon/frame_pointers.asm @@ -0,0 +1,254 @@ +FramesPointers: + table_width 3, FramesPointers + dba BulbasaurFrames + dba IvysaurFrames + dba VenusaurFrames + dba CharmanderFrames + dba CharmeleonFrames + dba CharizardFrames + dba SquirtleFrames + dba WartortleFrames + dba BlastoiseFrames + dba CaterpieFrames + dba MetapodFrames + dba ButterfreeFrames + dba WeedleFrames + dba KakunaFrames + dba BeedrillFrames + dba PidgeyFrames + dba PidgeottoFrames + dba PidgeotFrames + dba RattataFrames + dba RaticateFrames + dba SpearowFrames + dba FearowFrames + dba EkansFrames + dba ArbokFrames + dba PikachuFrames + dba RaichuFrames + dba SandshrewFrames + dba SandslashFrames + dba NidoranFFrames + dba NidorinaFrames + dba NidoqueenFrames + dba NidoranMFrames + dba NidorinoFrames + dba NidokingFrames + dba ClefairyFrames + dba ClefableFrames + dba VulpixFrames + dba NinetalesFrames + dba JigglypuffFrames + dba WigglytuffFrames + dba ZubatFrames + dba GolbatFrames + dba OddishFrames + dba GloomFrames + dba VileplumeFrames + dba ParasFrames + dba ParasectFrames + dba VenonatFrames + dba VenomothFrames + dba DiglettFrames + dba DugtrioFrames + dba MeowthFrames + dba PersianFrames + dba PsyduckFrames + dba GolduckFrames + dba MankeyFrames + dba PrimeapeFrames + dba GrowlitheFrames + dba ArcanineFrames + dba PoliwagFrames + dba PoliwhirlFrames + dba PoliwrathFrames + dba AbraFrames + dba KadabraFrames + dba AlakazamFrames + dba MachopFrames + dba MachokeFrames + dba MachampFrames + dba BellsproutFrames + dba WeepinbellFrames + dba VictreebelFrames + dba TentacoolFrames + dba TentacruelFrames + dba GeodudeFrames + dba GravelerFrames + dba GolemFrames + dba PonytaFrames + dba RapidashFrames + dba SlowpokeFrames + dba SlowbroFrames + dba MagnemiteFrames + dba MagnetonFrames + dba FarfetchDFrames + dba DoduoFrames + dba DodrioFrames + dba SeelFrames + dba DewgongFrames + dba GrimerFrames + dba MukFrames + dba ShellderFrames + dba CloysterFrames + dba GastlyFrames + dba HaunterFrames + dba GengarFrames + dba OnixFrames + dba DrowzeeFrames + dba HypnoFrames + dba KrabbyFrames + dba KinglerFrames + dba VoltorbFrames + dba ElectrodeFrames + dba ExeggcuteFrames + dba ExeggutorFrames + dba CuboneFrames + dba MarowakFrames + dba HitmonleeFrames + dba HitmonchanFrames + dba LickitungFrames + dba KoffingFrames + dba WeezingFrames + dba RhyhornFrames + dba RhydonFrames + dba ChanseyFrames + dba TangelaFrames + dba KangaskhanFrames + dba HorseaFrames + dba SeadraFrames + dba GoldeenFrames + dba SeakingFrames + dba StaryuFrames + dba StarmieFrames + dba MrMimeFrames + dba ScytherFrames + dba JynxFrames + dba ElectabuzzFrames + dba MagmarFrames + dba PinsirFrames + dba TaurosFrames + dba MagikarpFrames + dba GyaradosFrames + dba LaprasFrames + dba DittoFrames + dba EeveeFrames + dba VaporeonFrames + dba JolteonFrames + dba FlareonFrames + dba PorygonFrames + dba OmanyteFrames + dba OmastarFrames + dba KabutoFrames + dba KabutopsFrames + dba AerodactylFrames + dba SnorlaxFrames + dba ArticunoFrames + dba ZapdosFrames + dba MoltresFrames + dba DratiniFrames + dba DragonairFrames + dba DragoniteFrames + dba MewtwoFrames + dba MewFrames + dba ChikoritaFrames + dba BayleefFrames + dba MeganiumFrames + dba CyndaquilFrames + dba QuilavaFrames + dba TyphlosionFrames + dba TotodileFrames + dba CroconawFrames + dba FeraligatrFrames + dba SentretFrames + dba FurretFrames + dba HoothootFrames + dba NoctowlFrames + dba LedybaFrames + dba LedianFrames + dba SpinarakFrames + dba AriadosFrames + dba CrobatFrames + dba ChinchouFrames + dba LanturnFrames + dba PichuFrames + dba CleffaFrames + dba IgglybuffFrames + dba TogepiFrames + dba TogeticFrames + dba NatuFrames + dba XatuFrames + dba MareepFrames + dba FlaaffyFrames + dba AmpharosFrames + dba BellossomFrames + dba MarillFrames + dba AzumarillFrames + dba SudowoodoFrames + dba PolitoedFrames + dba HoppipFrames + dba SkiploomFrames + dba JumpluffFrames + dba AipomFrames + dba SunkernFrames + dba SunfloraFrames + dba YanmaFrames + dba WooperFrames + dba QuagsireFrames + dba EspeonFrames + dba UmbreonFrames + dba MurkrowFrames + dba SlowkingFrames + dba MisdreavusFrames + dba UnownFrames + dba WobbuffetFrames + dba GirafarigFrames + dba PinecoFrames + dba ForretressFrames + dba DunsparceFrames + dba GligarFrames + dba SteelixFrames + dba SnubbullFrames + dba GranbullFrames + dba QwilfishFrames + dba ScizorFrames + dba ShuckleFrames + dba HeracrossFrames + dba SneaselFrames + dba TeddiursaFrames + dba UrsaringFrames + dba SlugmaFrames + dba MagcargoFrames + dba SwinubFrames + dba PiloswineFrames + dba CorsolaFrames + dba RemoraidFrames + dba OctilleryFrames + dba DelibirdFrames + dba MantineFrames + dba SkarmoryFrames + dba HoundourFrames + dba HoundoomFrames + dba KingdraFrames + dba PhanpyFrames + dba DonphanFrames + dba Porygon2Frames + dba StantlerFrames + dba SmeargleFrames + dba TyrogueFrames + dba HitmontopFrames + dba SmoochumFrames + dba ElekidFrames + dba MagbyFrames + dba MiltankFrames + dba BlisseyFrames + dba RaikouFrames + dba EnteiFrames + dba SuicuneFrames + dba LarvitarFrames + dba PupitarFrames + dba TyranitarFrames + dba LugiaFrames + dba HoOhFrames + dba CelebiFrames + assert_table_length NUM_POKEMON diff --git a/gfx/pokemon/furret/anim.asm b/gfx/pokemon/furret/anim.asm new file mode 100644 index 0000000..a49ef28 --- /dev/null +++ b/gfx/pokemon/furret/anim.asm @@ -0,0 +1,7 @@ + frame 3, 22 + setrepeat 2 + frame 0, 08 + frame 1, 08 + frame 2, 08 + dorepeat 2 + endanim diff --git a/gfx/pokemon/furret/anim_idle.asm b/gfx/pokemon/furret/anim_idle.asm new file mode 100644 index 0000000..b7c3a8f --- /dev/null +++ b/gfx/pokemon/furret/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 4, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/furret/back.png b/gfx/pokemon/furret/back.png new file mode 100644 index 0000000000000000000000000000000000000000..906e6e7f1eae8586ed16b2ec90db8994bd079a1f GIT binary patch literal 450 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjv)-v6lb? z1H-kGy{{M;7+6Yz{DS}g|NlQ%!>y8mficn3#WAGf*3_wiLPr!hoK<)JpBsKrOXP~~ zW_fGf^^H;)n!g!Nd{R^}_4wl-U}C4hVyC#~E5l-=yjw1>OI&{UOG;ki&M=%5W$GVt zbPdPsb023}MSt3K;^&!Z{2Q4bth^qz|D^cdz={fcz4*pW>{Zr&j>n!pUKq)G(XOxI zth~D(yZNs!slfWLj{*<6hHIp^GCat5x8eco7nw$1-#~_{DKnlek72o`EmkUT&b9Ed zr$TswOncCJyK;%DV|lNB>&CH0`7%G)-=L!uc4X4G53DP6--raspPlyhjXc94Msww@ zohB?5+svNVoZWjwSYX*}rker*!M5?BDi9 zb^@!1(~+8wT=`9}yA{&(f5^`A_2>I>_{zU~@^X{^GyA)6?kk&d9~1`+p00i_>zopr E0H;a8v;Y7A literal 0 HcmV?d00001 diff --git a/gfx/pokemon/furret/front.png b/gfx/pokemon/furret/front.png new file mode 100644 index 0000000000000000000000000000000000000000..3ae88bf70f3ca1ab70246b83a38fb9a3c027a081 GIT binary patch literal 869 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1tEm`uG2TnfFcM zyRw#P8MjuxEIyPc>KJaIctdK&e6vF>j$cF?B))3S5}x;dxsrof`s~`QIrDz#o>;bc zul0#%Q)YPz9G5*inQs}R;sX08cJr9t*&0gj3fOPTX;Hm$&9>BQg?9=yDi7x5F$tF@ z8})WB+oqLdagSwny5gMu@0nI>D>~JM=CJ5YdZPQl!ExEiMF$>DpAfIIdynR#$z4od zf__Xn`~3Wa47q0%9oz7wc}x1r6E7!;etKm4huBb$>r_dUCvB;T>sMO`zZBtYayvgPUa=7c@dmv1}rU4`R|uRz+-NsCQb zV%|JHe{mn%@)t^1zDPF8lyN=0_uDMEfA+!$+iRyzF+HSsolj`W9qGbaRrWX0KW?9` zJX!hj{?n!H39oNToV8uRyXVNP`nVsH?I+EhzGIz$-sOg_ze(#ieK_QO=UdC6K3n~TH=Cd5CcM^I#^-%{=9Z_bA-_`#{q|fb$SJ-R z&$7qhq=Xr@S40 zgv2*Z+Ec+Ps*@lhQn2y*be0zquf22cU)nk+x_0H?x2yVQM%QLuNzeJJns|QMuSp^i zue`hDb-t=PGS9l=_f$#n!mrca3k)0V_W6HZ%EoVU^+ey-rKk8}6IbY$#v~=zc3O2y zz4o5#a^~yOqyHk~CzT|v(C3ucdTqMhr%PPM=e$Aizqr2Yub+p!E7u=mk7E))$R3xZ zan9(@@s(S?{kGWO{~1mc$Nfs(ld`7iitzfohi_DH#>Id7A72y)gTFrS`NBNqn3_<< U-$Sz*7#J8lUHx3vIVCg!0I`pn=l}o! literal 0 HcmV?d00001 diff --git a/gfx/pokemon/furret/shiny.pal b/gfx/pokemon/furret/shiny.pal new file mode 100644 index 0000000..fe5870b --- /dev/null +++ b/gfx/pokemon/furret/shiny.pal @@ -0,0 +1,4 @@ + + RGB 30, 13, 31 + RGB 15, 10, 02 + diff --git a/gfx/pokemon/gastly/anim.asm b/gfx/pokemon/gastly/anim.asm new file mode 100644 index 0000000..5ecd42a --- /dev/null +++ b/gfx/pokemon/gastly/anim.asm @@ -0,0 +1,7 @@ + frame 0, 04 + frame 1, 18 + frame 2, 24 + frame 1, 18 + frame 0, 12 + frame 1, 12 + endanim diff --git a/gfx/pokemon/gastly/anim_idle.asm b/gfx/pokemon/gastly/anim_idle.asm new file mode 100644 index 0000000..c4a056b --- /dev/null +++ b/gfx/pokemon/gastly/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/gastly/back.png b/gfx/pokemon/gastly/back.png new file mode 100644 index 0000000000000000000000000000000000000000..78f96fe93af5e8d6001cbfe26a17de5cd3b19165 GIT binary patch literal 319 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|J~_(55ryt z1_n0)eOm?w29}Z_zu^D>|Nqa`aI0isV7TY$;uunK>uu0Qp~DIs${+s!w-H&TaBJVY zg9Y2)UYj7mb@AxYqeu5MMeV+SU-m;)vRl~yW6{??=WM$0!RY1#g-?r_y$)S6tTkWB zB(L#PQ=?_&1euINj;O=T&u6Bs>Sgwtm%p#+I%oFrkkD^yE=T)RGikG|-6Z_<`=ittQE;`u%%{|3yLF+DGsXTn0zqX}FbJ^YxNB<{%>>wDJE`xdn?( b{bO{AWo2IGII)z0fq}u()z4*}Q$iB};=GWB literal 0 HcmV?d00001 diff --git a/gfx/pokemon/gastly/front.png b/gfx/pokemon/gastly/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5a28030d414d68df4c0cf182a6addccb66c8dfdb GIT binary patch literal 993 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|NsB*PTzYN z_A)RqxC!XnGB7Z(lmz(&|NsC0f3AjGB?ALv7=i2L` zPZ>VSSh<%U30wPK@SsfBu|tN>Lf@rGuIKeQ@bjwT)l<{>Bz5k~A5(~0|72_UM(#L= zhZ&nEglI*-h*B7c9Q=p6+=w;rhM8+zD5OnU+_7*;{@>a=VP`-pB9SXWZPjJ+8XF z#N~(;_l=77dCYsF4ji#oxK~*CPL_ks@@wC=uk7Y;7gWfZ-@E8mm2Wfg6JOp}rE880 zpM~8se9=2K z*^hS^zu#eg|HWQsE%nmviHi>wucI6ArH_ zKVrJ9kn_DnnAwuO%(9i|&0fp$Ufmz_WN)+6-1;wkuT~(tyYk#CoAj^j=Oa`1G|yL< z@R@IJO!c`__apAV|IpX#e9C&wa&>c;n0xOxNJKq-p}g*0`G%9ZYu_Ks-LshK+HF?L z=d#IOx!bDWS7hFNz9vqu|MQ%ymFHf8g5&?Tzs%d8%B3bP0l+XkK DeI@?P literal 0 HcmV?d00001 diff --git a/gfx/pokemon/gastly/shiny.pal b/gfx/pokemon/gastly/shiny.pal new file mode 100644 index 0000000..50e42ab --- /dev/null +++ b/gfx/pokemon/gastly/shiny.pal @@ -0,0 +1,4 @@ + + RGB 16, 17, 30 + RGB 05, 07, 11 + diff --git a/gfx/pokemon/gengar/anim.asm b/gfx/pokemon/gengar/anim.asm new file mode 100644 index 0000000..334e0af --- /dev/null +++ b/gfx/pokemon/gengar/anim.asm @@ -0,0 +1,8 @@ + frame 1, 06 + frame 4, 07 + frame 2, 50 + setrepeat 3 + frame 0, 09 + frame 3, 09 + dorepeat 4 + endanim diff --git a/gfx/pokemon/gengar/anim_idle.asm b/gfx/pokemon/gengar/anim_idle.asm new file mode 100644 index 0000000..7ef2870 --- /dev/null +++ b/gfx/pokemon/gengar/anim_idle.asm @@ -0,0 +1,8 @@ + setrepeat 2 + frame 5, 02 + frame 0, 02 + dorepeat 1 + frame 5, 09 + frame 6, 09 + frame 5, 09 + endanim diff --git a/gfx/pokemon/gengar/back.png b/gfx/pokemon/gengar/back.png new file mode 100644 index 0000000000000000000000000000000000000000..1cb67715db2e6addcbdbe6c2df65bcbff32e89cb GIT binary patch literal 396 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|6fzUi=l;q zf#J`c$Cnux7+6Yz{DMK^xf*Vj3=E9go-U3d6}R4odI}v@;8DKx|Nos07I6j>&V7kc zpWe{&w0FvrG4cJx$(QNqVLr!ReY#q?OP%<08$rJIkJA3F3R zjQ`lCu$z(VPP9nmzS8+IC5O|dG1?*i#Cg-da|&D2cs=JQ@6h}8@$kWexgC~QdlXVH zs81E^pTb~loyZatC}sBd#FEnNo|X+7<%O~penL+IdaKS?upKjf)fv!VcYS57^{wBV zf-^bxPUH(!wrTuOk)roQfQRLEi)7Pb{iZexLH>8Ayg$5M;ne#xBI~!iWK@`~c@g8^ zm4&h9)wyyoD91NMr20)7=QeuptIFfe$!`njxgN@xNAME9?g literal 0 HcmV?d00001 diff --git a/gfx/pokemon/gengar/front.png b/gfx/pokemon/gengar/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5fa68e3a04d68169213fe2874c28ac2676baccce GIT binary patch literal 917 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U<}}3W?*1A7tb5bz`(#0;1lBd|NsC0ngU)7 zEes3{f9^cK%)r3FQWE4B3=+@PaI0isU^ek|aSW-r^>)_lNrx3UTF*ZGd%sfJHH4+t z_^$QY{A2qw(c| zfQIi4IsB6syb)dJ%`)TpUH`}bei?}$w9(n3pzyD*w<*&{fAi~8LUMefjobaUD}6u7 zynE9E-75wvAKaen>95e;yo`ZwkIseYobxyNLKn2|S?DqO?OeWuwZSu8obJYZ%1WFI zsaFZu<>GCm(;)ezMvjN^jE4TV?cJUU^OUdfYcf7#5M#Gl5x1ayvgjuED`iaQ7|);8 z;9DgrxqG=#-wwCn8MCC0ZEx07{bd)`wZ?F#WU%LzBbsd%e}8hV;E69k|24tJH^Y?K zNIt1zp4Ls~xfYjJpIWB3Ih%YE%88q__0flWpM`#B7$kG_6gPHx-(Z?{fb%iG zE+e-okMzHuJtjA&zq$Cdr^{S#VrpE|9MOf65iZAG->$m(G01Q671d|9`lUa`d1L2a zKFO&6b&K>Kkv(5t?rCvmy~ZSw*k;#Zwui-({Y7Zl9u{BkPw%H4_Eyyj?Vprp8y8d% z6m-99`ZJad4^_Q4JW=JYFDP)@zGn(wC1?Gt=_w}sl`GlTr0-E__&R6$vR6m?AF6`= z;Jl|rRe$D69`}MxhnN1me_i(91w}o{&Nn8F@}DnVxFn|>9p@C?QgXyw`Mg`L<}2^O z_^$7TAMNz+9Y6Ye$AhI0mTvzXbY=RYeIj3%*2l+Jnd@Ja)PKlbsX6zPP+!H#75Zx{ zPOi~EyJyQ<{j+;gu1{|QL$LA{`mRs|e_dMt=kKL2X_fi@^ZKoi$nZb2sj05Mr{UX| zR2B5ZIO$e+>%YI3&dEuMmMPETHv3S^qR)y1|AxeQ#rXN%n)IVQ!Hg$h=c=N^j1qcL z6FpxYuG;g;c6qgFTkGCCZo<|g56`E2%D;PJU{=TAl${=sU?FVdQ&MBb@ E0CHKRHUIzs literal 0 HcmV?d00001 diff --git a/gfx/pokemon/gengar/shiny.pal b/gfx/pokemon/gengar/shiny.pal new file mode 100644 index 0000000..ccf6bf6 --- /dev/null +++ b/gfx/pokemon/gengar/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 00, 29 + RGB 15, 12, 23 + diff --git a/gfx/pokemon/geodude/anim.asm b/gfx/pokemon/geodude/anim.asm new file mode 100644 index 0000000..9949b1e --- /dev/null +++ b/gfx/pokemon/geodude/anim.asm @@ -0,0 +1,7 @@ + frame 0, 08 + frame 1, 16 + setrepeat 3 + frame 2, 07 + frame 1, 07 + dorepeat 3 + endanim diff --git a/gfx/pokemon/geodude/anim_idle.asm b/gfx/pokemon/geodude/anim_idle.asm new file mode 100644 index 0000000..e991ac4 --- /dev/null +++ b/gfx/pokemon/geodude/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 08 + frame 3, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/geodude/back.png b/gfx/pokemon/geodude/back.png new file mode 100644 index 0000000000000000000000000000000000000000..0b3acd0c1241ac0b585e2dc7ca44f9fc3863b685 GIT binary patch literal 471 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7Kc%PIDaw+8 zfx$xVoGb$a14~JeU-19`|NrM|xK%PRFqV0`IEGZ*S{ug6*KEL({pSDw%G|ynuTw^u zQw4->Sk86G{%@OL|AX>(bu08V;yIC zdNHt1QS*5Q^fkp34!ECp zIPybJFmv)rpNUt5@+vmQp3K>{i#vd-tJSl9i=&(cJ{g zx|eScA8u@TahbP1!sE-7ucpgV`hO@y%q`$#T7I$L@Va(ZvC54{kui59efCM)JzVU1 zA#KmY+D0uqiT9i>4QF@!p7DLp(Zm^g=T2I!{lfjE`s-KzhKu@##p@(a7|cF<&3gUc c|1}IJo7unb@pF%1U|?YIboFyt=akR{0F$)L5dZ)H literal 0 HcmV?d00001 diff --git a/gfx/pokemon/geodude/front.png b/gfx/pokemon/geodude/front.png new file mode 100644 index 0000000000000000000000000000000000000000..22fb6c4a7c6c61ea91af02e28dbf3f55c0e47bde GIT binary patch literal 557 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|Ns9_>8W;# zvSeUju#h_^%fP_EQWE4B{Qv*||G64&l?)7wXFOdTLn>~)o#EZrV!-3__|xC_Hf5H} z8u>iMl+SWVu2dCs{n`9jeb?6g`>(9il~mXi;!X`SROs^Od=AT0tkW>?GTQ^ru~v`S^3=rFE9`THh>K?UURX z`&_I3iIXRGtBt=hU^OJxkt^ON2i^FDK)S9tT`!=;Cs$4@)&G3Z$~ zFKuQxN2N;}^YK?xcb&L1RU+bB+~sS_uS}BgiP5*8vgLZltp(p^cwc+td}BDGv*OFok1TUbcRF4u3K4UX>oz%>l>BY$&aIZOwa$s8 zcNynDt<7|9`9E^Pm<6 z28P^iMFI>A3@jxw^ft(C6QScRL(l2;V7L zrM`yc@Xqk#OHa2d8TmLa>74iB-SrE7>(?*quVJ`b$Ksmaud~gaD(o zhpWUSFIo0}TZX>|wK;2-yqeAOV3~S3L$S%a+0I`ZEH9@B9pOuOxxC5DA|{mK?NPIW z7`d;;#|qk(@L6wh4nH+_L1wwaO7X)@7m8O_<*V&`l{q=XF|sd!L2+}qsGZHJhU2M> zZ=ABGM<_2nu;*vx-x+L2npZIBIGALpG0QNnTl1>@r079z2Js1D2i*_;YZcrz^`6_y zm`4*YF&gOJmOaR~VUJdatj7C_H8OJ;M1& literal 0 HcmV?d00001 diff --git a/gfx/pokemon/girafarig/front.png b/gfx/pokemon/girafarig/front.png new file mode 100644 index 0000000000000000000000000000000000000000..18071ac820c2344bc6dc285d8e592920e17c8fc6 GIT binary patch literal 1201 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@|NsC0w<Xz`(%3QWE4B3=+@PaI0isU%i5-yH)E*RxOm|KDl&z+L8# z$1Sg`)6Qg>%$l2>^XJhKm8C_7%ddxDdm$gU^5z-A$8#rbZVUbH#F2Jx*XyG_HD{w| z*LQ!ioV{3Qm)(SY!u~0d5lbh?8?8)PxO-Kx=GKD0PIa0`C&UO>U*bCT*6D5UC(qJ- z%@J8%uO|G874B-k@wHp4(>n3z{Kzj;mR){rcVj~A5~pu&;d?J72>vw9RgU&gk<2?3 z!!LMgO|Q+BD_jDKy05IZZIC$gZjoz!!W326yai<&&0{`Kmr!S4Q<`>V_3GdVv1@vJ zVw9V^Y}ebhgtS_f97$Oxe*f2f>2HftCUE9{$q4_vWSQC&DKGuF_W`q4uA19rHrZ&J z$JRCru&bnE0>6l8PHx*U4>^^2`j55{tAxc2nx zyyHfFhn_}lS@S@j>9<&D-t4U$OYBeV>jk;zgzKQp@Pwy zBQw^O1nqMvk?IPNH|4qWaYk^Js^i4C?+^IWPoA`zsS&&3VZm{M*Wrn~5*HqqE$5lU z@LaKE=VQ6^QBSIzCrOttX`R6Rx1`|Gio@mFr>6z~JMI6jLHkNV_%_KqEiZIF?O7Ij zBk*jIyZ%1Md-AoDXZRl4Ca?U}`@m%DV>eeDEYQnR*>ICFV*7_vUULhitxHaMM{H+~ zTmL^}&YBO6yGnBw`*C-zxa<2M*EQQ$SIKSRH0BzQD>K(TICxyFz2Z%Wb(GHkY1Tmn z?nvVw$2RA) z9`sGN(eAhI0}Gx83F@4GwNqRES>#X7DE7**AG6YrPD~fA3_B=`fQ9!2pUc+&+S6=5 zue_o%O#Qj+Wt-J^E88chmzLdo_#{$xUb#hO7+6)|J;6J0_+0k?%Sv~f@PFUuY5U)w zr(G`-En^?v*MEL$`Hv6Zc7EEO-#1_TctN%8JnjC^eHQOI-ofCH#5*6k=S;IU_1VBR Rhk=2C!PC{xWt~$(697JCMB4xW literal 0 HcmV?d00001 diff --git a/gfx/pokemon/girafarig/shiny.pal b/gfx/pokemon/girafarig/shiny.pal new file mode 100644 index 0000000..51b7f38 --- /dev/null +++ b/gfx/pokemon/girafarig/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 19, 00 + RGB 05, 04, 31 + diff --git a/gfx/pokemon/gligar/anim.asm b/gfx/pokemon/gligar/anim.asm new file mode 100644 index 0000000..caae53e --- /dev/null +++ b/gfx/pokemon/gligar/anim.asm @@ -0,0 +1,2 @@ + frame 1, 35 + endanim diff --git a/gfx/pokemon/gligar/anim_idle.asm b/gfx/pokemon/gligar/anim_idle.asm new file mode 100644 index 0000000..caae53e --- /dev/null +++ b/gfx/pokemon/gligar/anim_idle.asm @@ -0,0 +1,2 @@ + frame 1, 35 + endanim diff --git a/gfx/pokemon/gligar/back.png b/gfx/pokemon/gligar/back.png new file mode 100644 index 0000000000000000000000000000000000000000..64bcc503f88eb7dd838d4f97eb8791e8c35ecdff GIT binary patch literal 467 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f6j16$|Noz>;a17Oz*ywz;uunK>ul)lP0WfM!k_;CuZeN>osjpt z;?0)Jtu3<;Z2NY<|G$Q{RgBRd!wY(C+YfOF^Tg+B*a`j-Gd#E}?CK7cV4f>1GelY3 zIhN1*s+!nhxkSA21E0q#=YKOBj%NkTi(ei4=D1=+*HZ_Md&)1;tJM~(CPvxtosro5 z&w7c*Hb0A7d}fTtSr5)+@LFT`p!u(U|Vk{2;ir zNm0qc{qLdK4|LZ{txfCZ?=G9edM~f0Eb#97y#ft6>)&V`txr9%_HTpz;%=kkhYrTQ znRReiar@JA7S-|5XI9P*?oL0}(mz+DC*tiD*)2}B$J&j}pT2Hs>nuy^3G1}a@7Tbz zvG_LoH}4b660)@p%{irRc}9s@^GeHhQ^N;O1uQd?-wPdWvHhml^3BeA+O)&IKbXJX XW?$RH+B%Pcfq}u()z4*}Q$iB}(-_cp literal 0 HcmV?d00001 diff --git a/gfx/pokemon/gligar/front.png b/gfx/pokemon/gligar/front.png new file mode 100644 index 0000000000000000000000000000000000000000..729bc9d7f54a7ac71e3b817ca7cfbefb51e139bf GIT binary patch literal 748 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U`XI#W?*2*31W0&U|`@0@CkAK|Ns9v!zoUd zOBom#{A!*5FfcH%lmz(&|NsC0f3AjGB?ALfx2KC^NX4zU(>$jgR^V|_ef6*W-2%oI zmF*|(BA=-4;JU!@&*i#&!v916KI^21UHy~xUzs^@Tb+TwWJ$+U=IaVCYA1xUZT!XF z&$i)QR`j9CjQiAC_U0B?J~P&7?lt_FSis(N;`vcS#f)68xsCpZ-BX164^L)@lHRDO zdw5>)`jZC>&KN!|(c8hB%=2bP%mYQ%cIk>xV~J_|3{Mn9Dwa6U$(^xq&8?7kmm8R~ zE7y5H$cVdkCNbmAEVuLim)1{XYCC8C&4k$M1R)UxYlV-Xu2H z`22gr312ox3AMjkbKsK0qW8Qqlk)B^UfBDDVOsLjio8H&X=TYaldV0qWjca&PM2(c ze7Tsodz+)+`fs;C&CpnVux7`$4cpAFqjAPo;+A{ zy=IEj48<>5zJWy!Rm%%Q{+?O3RNE@zc=tg*mb0%e*>T?T_^GqzcCr1$q}xATEdDQ# z+te9R^P=lW2+zFgfV~k9r#}&7oS?_{I_&){A>%_^rQWl$nH#>I{rH7@_X)qdN4?Gb z>X-BDR%EXTfAYVtVt<^}i#YwvrC+wyZhv6pnr^%Qcg^be885qLnCWgk@+D+SuZaFn zzAY{x_g0CX;EU2aa^-{QtY5ANPPTb@vm1sgoZeC*6wI8`IZZ=2m~E4f_moae=E!AB z=iFdQX`S|>WfxOQ#+RD~43f7N_Z}`_ko>ip;o=8|l#GOBOp;%>Jh__Pa7L5$?b92K zGcN^w_jBP-`S)#YgXsk($*7p9Jt2*2jxIgn&3fYB^QBxV`g^7{zL`6n=fspVc@-xc z&z!$vtuM<`e$+eZfcPGf%caM?*+0d8406~fum88=<#F%xd%m#0^AarFaDn$A0|Ntt Mr>mdKI;Vst0Odbk`2YX_ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/gligar/shiny.pal b/gfx/pokemon/gligar/shiny.pal new file mode 100644 index 0000000..b33b2c3 --- /dev/null +++ b/gfx/pokemon/gligar/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 15, 19 + RGB 06, 06, 31 + diff --git a/gfx/pokemon/gloom/anim.asm b/gfx/pokemon/gloom/anim.asm new file mode 100644 index 0000000..2e535ef --- /dev/null +++ b/gfx/pokemon/gloom/anim.asm @@ -0,0 +1,11 @@ + frame 0, 04 + frame 1, 10 + frame 2, 14 + frame 3, 20 + frame 2, 10 + frame 3, 08 + frame 4, 07 + frame 5, 07 + frame 0, 06 + frame 5, 06 + endanim diff --git a/gfx/pokemon/gloom/anim_idle.asm b/gfx/pokemon/gloom/anim_idle.asm new file mode 100644 index 0000000..7f7e533 --- /dev/null +++ b/gfx/pokemon/gloom/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 10 + frame 5, 10 + dorepeat 1 + endanim diff --git a/gfx/pokemon/gloom/back.png b/gfx/pokemon/gloom/back.png new file mode 100644 index 0000000000000000000000000000000000000000..9308b29ae00981675f182450ee3682c2e5588c58 GIT binary patch literal 455 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|38_*$t#i zy#+WvJ11|5-zBG>5zu>>A@YEVA4Bl2`NoU94_HJecMGi+Vt2bGULmnMp)Zp0ns!j5 z&_5-?X9}trjla`E57_K1G;IGRN{Zo4)BWJ7An}AQ7Ivms-7FOwTM_&4H zM(pY%0ZD+S&&G#!=nGMhO;ZwF&+^!!%~pMGJBINP@FW8ShT@8xH7zpk9)eWc`+ z%<{(f-_EBq3JQPDla7~}FiTBN_E&p2f8Nte#>R&%_!`cu2d3xAoAKJTDzsN0~uV;Pb3FpTO>qV3I-(AN1L*qZQR4AvF{0iM83=9kmp00i_ I>zopr0PRk|x&QzG literal 0 HcmV?d00001 diff --git a/gfx/pokemon/gloom/front.png b/gfx/pokemon/gloom/front.png new file mode 100644 index 0000000000000000000000000000000000000000..34625df13562178e869ffbc357feac5aed04f4d2 GIT binary patch literal 800 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{v5>W?*1ATFWqtfq{W1z$e7@|NsC0lNp@6 zvKbf{f`g4NGcYi)lmz(&gT!+++$tFunD%?RIEGZ*dONE-?}-ABEAPMm^?Dzfd1mxX zT$NXTJ!G!?vwH~!6Be^H*vETKZOizY?L6kw~X`4<$6(To{D&WHjNFO z{oG({V&#|fGk>4{{d4vrOF6|A{W5+TS9m&`Rw=qWX0cgKJ09SvTE)x9Wqp8?@92fA zL9#*CbDtGF-+aO1TxbWQ!{r5nN&%|-4x3IW>Fz8xy>!QU(d0Fz3!a@a514)7)bST9 z=gkwg+8*{qw6~szpQHWl$*_~7g~n&f3lxlz}NL$bW)PX?dbEX&7*T2q^3)rV0S*< z^8Q7e)$8grQ~#O7ZEt%1-N|{n7*CmmbL2J8U$Oh`x!cwXR-D)jZ5qXJcSGUA0 zp3@I51;z5u68y+<%-!$QzGts@&Ix*5D0yGDXhqd^!Sjm8wdU|J?0)#!)wOAbl$V38 z-F|Dg{WI3*|C+Zat4Me~gGs8qOzFvgyyg#<{)^W<=?#PT4|?zQKD=j1pMn0%j~eB7+p&hD4z zIP?QI=T)rqUc6_?*1SC?S~n{)U#Q11rEgo*%HBS`L?-5g5I@_V2TM5{oc5ILsGIX$ zzgJXqM}1~|#P+}56&veUiu`WT+EAZax#OGlH+@IDes8FQPW|?-tk?Wrz5i}JQ)j~c z_qF?;C6#Vdp1ZEw&0g?whI=G0d(@*nzo$n`pUx)l{$0PfyLQU-D36og_15~ej6B~B W{sqjo_`|@!z~JfX=d#Wzp$P!bvTq;& literal 0 HcmV?d00001 diff --git a/gfx/pokemon/gloom/shiny.pal b/gfx/pokemon/gloom/shiny.pal new file mode 100644 index 0000000..998bfce --- /dev/null +++ b/gfx/pokemon/gloom/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 21, 05 + RGB 13, 17, 12 + diff --git a/gfx/pokemon/golbat/anim.asm b/gfx/pokemon/golbat/anim.asm new file mode 100644 index 0000000..27b36f1 --- /dev/null +++ b/gfx/pokemon/golbat/anim.asm @@ -0,0 +1,10 @@ + frame 0, 08 + setrepeat 2 + frame 2, 09 + frame 3, 09 + dorepeat 2 + setrepeat 3 + frame 3, 08 + frame 1, 08 + dorepeat 6 + endanim diff --git a/gfx/pokemon/golbat/anim_idle.asm b/gfx/pokemon/golbat/anim_idle.asm new file mode 100644 index 0000000..ac0d93c --- /dev/null +++ b/gfx/pokemon/golbat/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 06 + frame 4, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/golbat/back.png b/gfx/pokemon/golbat/back.png new file mode 100644 index 0000000000000000000000000000000000000000..5bc2b13366ce5752b50de409e27830ca1a421855 GIT binary patch literal 285 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7pIkjh)2WAn zf#IQk#Ww~929}Z_zu^D>|Nqa`aI0isVA$j7;uunK>+KY8z9R}e&cVO`mCMxyHi$Wi zO-&12ul1yTa)7|kFE8)6Y?y!XZ?Z#C^F{_4h8Ii>^EcRW$}q&vPiNSgW47OUgH^^i z=7a)khoWb8YK80`92MWH8O{lNvF{L$W;ocQ{$EHztV*`RvcXZ|{|+H$6|o85_?aT? z>hfG?>{@6Xc#dOx-QKNjIm|cKS^eJnatn{c=6KJan_COymdi!gCUoyr*u{T5@fuge n`!zRBQ&=Lxb>B!$?UaxE&*l@dQf?6g0|SGntDnm{r-UW|dq-@q literal 0 HcmV?d00001 diff --git a/gfx/pokemon/golbat/front.png b/gfx/pokemon/golbat/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5a7d1745a53d079d27207a3bb5757e4365e0804f GIT binary patch literal 1209 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsBV)pInR zdKefO9_m+oV_;xlDGBlm{{R2~|6C2XN(Kg&2u~NskcwMxXTRR|R*j=I_0zxicQ`a8 zd`(u%$}V31&fooEo?eiB^@dxr#9&7z*-LoU> z)PdwlQ-uXe{Ni}71Z1l9d%T>thnJoI#H(eInu1SwGw#klu=Zs3p|`$YuN*9&T-wUZ zW-Z~fE=<2!{$SdsZ_Dn?;)r4Ao_cYK_1S;dm{gP#6^ip2?{*%zd1Hoa4FC4)ihbdS zwKr7P7k&-R-@CmhW8=0kwhb{iQn&71vff1Kp1W#yzi;W!M=L6$*q0YGs$|ah`rlj7 zVzy$d>NdY)EBEeV+2MLkQK>g-P44M9=hD;-9@o#`RdU+$dSOfHg`Io_^Cf1QN%Fe{ zr7f8BA#we@Z>EZ|B3ImxKW2zNUXyc2Db&35M)za|b?%KqcN{;8*mfND+)=I5SIL|c z!%)c<$S9#iwWRy=5xz~0 z+uxeBu(!!4m>axtR?H765p>o}FITL`p>GHSXfEagb{^VawE;aeh6+BhERz zZ3Yp=oeW0b*yB(0l&n4VTn`OPF6jKhK?6R~lQM6uuZuYl}=iW9a?_vvFTB_Dn zx$E@&oa;`%vxUzU-Z8tYW4k8HzmVzI!!+*p9||jH#7{JNFTSC`hGk#Fz4yNRO0V6D zJonw6;q-bX#rZX#ex`rB@KSH&e}KJzN?a8jAg z+mdbcI7@k#eA->b`sIQuUrpXU47782FZN~Ef|8xaMVpq3=rkX+I_j15#iYS%g~qfq z*_XUtWpChkyu*FwvQ4keXB{*kKHrbFR&TvSiO3zrf{s_ zaIw{$Yi0{iGWaB1-`Slrui9*VxoiBU%6H}b{&$ki?mPTZVgBLkvF~KV`OczK4gbBq zP5s)praWb@@@v`1_a~~{uUUWl+P7`tzH8Q34wqTh$Gz8BWLN6e^{VfCm3xO*sqf2{ zrfpyQ6t!jwMqavI<*s9YBZ+mHw@{t7eZ$2k7N6JMGn^vt#``UM;5oajqvmIlt<=BD>N$sC>ygkGm6hDVHAKzs7o5)$x!2BXwWNrvFbj zy=r}~Ga?f8=Rms4j< zn*XY=Z29RQ%dD%W*{*0PzH4}*{fg|*pM8I7-0Su|4t??DxpmNsKaoz)^*0t<7|37)o{~!Sd z1_r}}SKl!(FtC&a`2~Z-b2Z#585kJbJzX3_DsHWv$}MzAfyd?Mo4@aM6d9eovJ0Q^31_9Quo%tU3 zBj2#roa~N!bK&vMNvZV*zVNd={^nTE{)69e_BNgmoDX!$88)eANO!6@?ayJ%l>W-* z>-2TE5ywsDP+fBdXSa=Ae_w7EN@8gFcx&1Qh7QIGX@yc;k zb6U=mca*K*XT9F|V2(uCcLRnFe%8y37eYgW9ep>EFI$nbuGr;3-V%d*Jq*vD zPE=13*eto3eNWW8EYS_KXT6)Xaq_xdyHXwRn=lA5+}QML?_?{DYnz_Re4WEk?$cDa z*Jk>hhKDPxm;UZ+OxPt}o2Jy5#3I?`Q=IlpIKw%g-`Ji{;S}42N}b!gXD^;E?lkHB t-+!j-*ExLNx#qt{&%Zp5^Q)QVv%J~V4w)}8Wnf@n@O1TaS?83{1ORbR*IWPq literal 0 HcmV?d00001 diff --git a/gfx/pokemon/goldeen/front.png b/gfx/pokemon/goldeen/front.png new file mode 100644 index 0000000000000000000000000000000000000000..c3a874b353869307690093922b7ebe35a6cbd363 GIT binary patch literal 824 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*y8mf$6%Zi(^Q|t+$bH%ibt(Oquz;{<&6`OS9Yg zm-BD0uHJP!ZRQ8X2Q6&{dmQxs*RB1rRdnIMhHRJS2RlzX#qLoH+LsvhF<9hOz(jq~ zNeYo>NA9ca3yl;PWMy$V^s>uC@{Ek2&{5_Piz($&+;JS8VJmD_&r1paJ566T(sq-i zsG!SU@o;Y6js=bjJSJ%UFJcj$#t^h-%csR%$L&8&^nX3^xJLYT6V9jodX>PEYiN{Toy2vjqz9tIu`14MlS;v0vRZvmo*OM$h zK}Ofzricj^yFa-zdxi^x=7D3|)Zg!!)}%B)?&!Ltxh%(RJ?gINnh2irI=)u=Nw?ub z#a-)!=ITndX=QP|W%1viDP^%_!NrN*TihHT&lJjCv50Gm-4@G#T^XX8w_a|j)a>?Z z+its|_2+^sALr~fwNY(w7Fd0ED}(Rtg5WQX?eUbG@uTdj1Z{_#cDp`3d2{8NM0!EomvMKB>M~Ci_A4MPNtV(JuW! zM!v(dKB}6YOm#5c7c%FWT|85E#P**;`tiGJUVd5%GU1nZ4d?S3&gC^H8*4tOPM@{r z$E5CvPpZqU{vZ4)#Q)rzZ+XP|>2p@potf@7{r}{jLIoD_T`&8c_lfMfT-B~GdW19n zk!JiR|3K@SmGy6KJ@7tUe9Jsu>37`Eqti328Q!k+p09t=vfy>+%a5wN`qONlcpsf! zyHBKUvVLN}{?^st<7zjf_3r>J8f zal^hW1_lO}k|4j}|NsC0&((0NWME*l@pN$vskn7?il@+F0}d9$zyIyk1*06;rq*_? zstKsP#hfPi^L*f;w~PuR(;q#stzgr6q-nr$*GQ`f>|(a%y-*+_+jfU@tN&Yv=Ddx*ciC#{r$6~$ zF0M9lui}Jqm(cy?zh-GzPniCz$)eQayU`qVCJX5uxAPg+EDO6A`orQt&XU(1EHi9Z z6#MQ-Jiw%+=d>(t@jk(V$_3@`GRl@;mwR3sTX!&N<+o?DRg#a>8n$OtAMXuSuDWN` z$$I17OowuT=Npb5VYwjrKZ^0KSkkNR;|iY`RhgE3_$4A?sC!^F#|%c6g#T#`R+d&z{E?>oGkm=C%w2x0lRR!}~166gP@gFe?8 Q7#J8lUHx3vIVCg!0HAxQ82|tP literal 0 HcmV?d00001 diff --git a/gfx/pokemon/golduck/front.png b/gfx/pokemon/golduck/front.png new file mode 100644 index 0000000000000000000000000000000000000000..172653ab23a8647b53e939e24711203413d1871b GIT binary patch literal 1594 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU_8LV%)r2K;9c|^1_lP60G|-o|NsAQU3<+b z>KFq9LxN#n76StVOG%Jl@c;k+|L1DBRWdNJ-t=^F45_&Fc20NM6Ad00$FKkY+wcnc zD+}Dat1>(AxsOq2>@(GtbrWR|?f=iHcV6E}>CVdo_Ijm_+*wu;*>hSwr?)z+-RwCG_>xPW2$> z?8)7V9||RtSN?PtziC#Pq>`AS{`{rt|EYr0Ue#F{eoxABx>Q@|yte3)LV0d>@rtee z8J88@UbQcNc}l+V)*FRV7rj3Fr=KFHa|z47KFFpzd7f3Q&hwAgpDV{ptSx3(rKH(OReGZ)CG9a`yAbC7E*D{QOJn+IFtWjlA(%BysAiLkl== z7Ar=yn!VSW_h@aw>X`6te*(XjoSGGVZbleWhsc3l@6I-4nlR5Zc;%7yI%0~)(e@Ws z-_laIW~=ji>GZN`$9|6P()(HYaqrV9ah_4=fpxv5hPG;*t4ow+QdCJ#Uh@O8EYQ`a9Pe+ANZ}y+DZ248I2du1dnL1-MM&5z~ldl>uwgdKVVXEs`L44T0Z68q)X}7 z7Zkg{Uh?U7#s;Z!pTNIsuIy}1dpDOUVybnRmvFhwce`a~ayy)3r=P#G(6vbYoyO^D zk21>d6c$XderK^hD8J>Lto;n@7pHe7znQQ7uHwqobFvRr%UgCWx>w*H|46p{i)vh< zySg&8}U7aQ+;&}Y11#T~|y@|0=9fsgr0?rhxc{M(`6qtEtv!*3~@fI~|%8a<9;xuQ0;>Tj{%2Kdv_==cA`;l?U)1J#{Mi zG2gyyXG48?*YpQ`ocYyrd#%}G_j=Yn>x*;eD0_F}@1b4y+WPKHJl7j3uGBQw`iA?a zzC*0#A9B?$-YsDFN)fK?zI;wLNvtrUBlph1)th+!@Rm0m)>eAX2Znw7`>Z*x-}!iA z^QOY%O6N}CIM!$FDz+EHpW&Tsk>j z^oRMi*e8)o3s%}_vfSgI!&F+jUwK=Fuxt6;^rLJtYbwKzYGn5$oZ0+p*~8Fzp&x9t z@4x@>m+$`jf_EVJ!AAT1=2`Q#|JPQAeXRbp=7Z7sRrTxsXr1>uJ?+->NLzXS?N1|H zzZO4TZnOHh%jRd1XN_;qN&hNvFV%LhSk=6##qBuYasTIi56(}`-*I@p_WdIF56@4{ zwXS0=|Kj(&$@OjwYn@?Zt{886TZ{G*M!|kteAgwmNn1&%~8ee4{djG zl}p@9-};R2@b5L#?j%;tzuIMe?)}Bk9gqLmY4=+Dy}wur_QH?*#qImgpW1nN=i}$a b$K`EhGJ8e!W=>;ZU|{fc^>bP0l+XkKtUnzv literal 0 HcmV?d00001 diff --git a/gfx/pokemon/golduck/shiny.pal b/gfx/pokemon/golduck/shiny.pal new file mode 100644 index 0000000..cfd29e9 --- /dev/null +++ b/gfx/pokemon/golduck/shiny.pal @@ -0,0 +1,4 @@ + + RGB 28, 10, 13 + RGB 07, 17, 30 + diff --git a/gfx/pokemon/golem/anim.asm b/gfx/pokemon/golem/anim.asm new file mode 100644 index 0000000..3860dd0 --- /dev/null +++ b/gfx/pokemon/golem/anim.asm @@ -0,0 +1,6 @@ + frame 0, 08 + frame 1, 12 + frame 2, 18 + frame 1, 12 + frame 3, 12 + endanim diff --git a/gfx/pokemon/golem/anim_idle.asm b/gfx/pokemon/golem/anim_idle.asm new file mode 100644 index 0000000..cf66cab --- /dev/null +++ b/gfx/pokemon/golem/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 4, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/golem/back.png b/gfx/pokemon/golem/back.png new file mode 100644 index 0000000000000000000000000000000000000000..4b39da3cdcf065ca519ba8c2d17c7f762d5c1cee GIT binary patch literal 288 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7Kc&UVDaw+8 zf#Dj1sU`yh14~JeU-19`|NrM|xK%PRFzokqaSW-r^>&gc-w_2KmcsA<|J!Ucw3alQ zZh3K{l50q%qvy+KAdt`aQF`6_?_G~QUE(xUWT$iZSJbigHXkfH5p-{@@;dE|+#Ls> zi}AKk<#Ud$doDOtxr(v6anc{hWqTP-)N=LreOR;Qv)E0|Gkf|LxVqn)y0r0gm~?dV z%Y!kouYP6}+&g0Sz~hIC=(hK9i93JnOWR=hWJf3G4WGc>MYn9HM^zU*X#BPM=#^gc pZN?H_YtB`kKV#mUctgZTK4d40{Lh)@4h#$o44$rjF6*2UngG!PdTRgx literal 0 HcmV?d00001 diff --git a/gfx/pokemon/golem/front.png b/gfx/pokemon/golem/front.png new file mode 100644 index 0000000000000000000000000000000000000000..8a8450b28331e9939d7cfddc12dd24afd9d44f88 GIT binary patch literal 963 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1%i@^g9`mvXKBJGJ}b`tRQq)Y95G;!V#j+VQVka^BgaE_&1S&kGq( zZ@7^vbjSC%5L>3hU+&rJcdQr;d0o5S>o{(CFQ;>)IONieH;n(DFWHfE$4>7p!+cR& zsShT+rB0~H{k7D1aii&%DXYDR4R2$Zzp{~M1n>SCuh)LxnR@g}`Od9kt~b7) z*u=f@{rBaHyL+zu%gXHIN|Wze?O3^r@4_t|0roXN6VAT)8uGmB7B6Fx&Zcg;4PPSP zDy5v~*%STDNjBif%46@8o}P_8vH4x%ohyuA{!Fe8X-tdQB|9Zi<_I*XXR{V%#6*NZCl=wBEK}(c=nR7 zHXaAk>N%h6tk_|)$W`y@%C9p*^c+NV_+J~o_t47pv0QOL?D&T7OGAydR6ADWYHMs} zPEViKR{Hny#^nD!u4yy z@3b_ zIFjp?xAh+f-tIH3HjNHh)=X)y|3<|Ax|;DwdxO?79j95j#~zw|44QYryOjUZfg|2e z7HremIO&C(dR&sDQ{4CWulF&$J?A}bW$tV@{`t4q_NaU-zz!gD^J$X zs6Ore@Byp-%*Fb9mUMibHa&y;ExZ22t-t0?H`y;=(YeRY?t_rsN1?9i$namw^k?4- z&+pl?x4-()(!Z^D_~Weh^;bVw`nL9teq7Z3<9i>d{@cG_zwqxqBrE;r#4pN!KK)wW zAFKT$$D8iWi|;yKTDS6?{?(sLt@elPS#rHTMAL5e=Ag7#1_lNOPgg&ebxsLQ0K5Fv A`2YX_ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/golem/shiny.pal b/gfx/pokemon/golem/shiny.pal new file mode 100644 index 0000000..d50b44f --- /dev/null +++ b/gfx/pokemon/golem/shiny.pal @@ -0,0 +1,4 @@ + + RGB 25, 15, 12 + RGB 19, 07, 03 + diff --git a/gfx/pokemon/granbull/anim.asm b/gfx/pokemon/granbull/anim.asm new file mode 100644 index 0000000..507b0a1 --- /dev/null +++ b/gfx/pokemon/granbull/anim.asm @@ -0,0 +1,7 @@ + frame 1, 32 + frame 0, 16 + setrepeat 2 + frame 1, 07 + frame 0, 07 + dorepeat 3 + endanim diff --git a/gfx/pokemon/granbull/anim_idle.asm b/gfx/pokemon/granbull/anim_idle.asm new file mode 100644 index 0000000..93bb36f --- /dev/null +++ b/gfx/pokemon/granbull/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 2, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/granbull/back.png b/gfx/pokemon/granbull/back.png new file mode 100644 index 0000000000000000000000000000000000000000..9ffdc7c992311fea066449d58c2793edd5e4dc3d GIT binary patch literal 389 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zc+bnwPFtg z14Fp0z*`0e29}Z_zu^D>|Nqa`aI0isU{vvRaSW-r^>)f_K4wJ@)~|E^|9`I4F}*eP z_pK?*PL>%52TYvu@8fF5Yd@OK36%?Rt@Zb{`f%pkl;ESM%cIM5-6Ebk9&uZ^lqut* za6Av&j}?`CVRAJG_b%8Y{40MxL&c|Er#g@O3CyT%m3nZhKl#GtC2vo56rMAlcgy>U zhR*f}7N1|Gh%VTj6#3aqWA=&JEO#~59(~QCb;X8l9_y1xi%(rOx(8V9ac+Bdt1JEB zI{#d&7>Tuuu6ZlyYtPypDjdC|>w>V4Zil;$c+*MFf{RA(*EdT!ESb>pBk@H*Ro25L zi!X{jo%`?b>w+n=^C~L0&R)iSzvb_rS}B|Kh#tc}fmPgh{ny9)*lXnmPruw2cRt|5 wUd8!J4$_V7?*iiTc>Y*y+cWR{VtYHu+Z=q>*WOz)FfcH9y85}Sb4q9e0P0Jv?EnA( literal 0 HcmV?d00001 diff --git a/gfx/pokemon/granbull/front.png b/gfx/pokemon/granbull/front.png new file mode 100644 index 0000000000000000000000000000000000000000..911bc59ae12d2170784e0d40f2a8fc729042001c GIT binary patch literal 820 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{V3@$c%)r1;1p{?o5<=yT8MS!}q6^ z=A>IceML+4!ai!O*q?J_(TbLuzpMBr#PG3xj9$$vu%%Skk@ZB6L&x!1*&Fv~&Gui_ z$58r|@4}3g><(|AiH0Y)omS)V3T^N`+;_Z2`M}=ieT@$kFI8M$`)B1H=fhJC%gh#k zQC;hM|L5%0&LOpJ*+zU%5?@Y{HkrtDCnlKrdDU-ghZPA~R}SoaxG;fnMxZKVhl6s` z7O5w7-a5Fi^vZ9bDORpw5-kb5tALiLlkn^{G2QqO-XS**HF)xV~pIJ4R* zQ+irt#cS4y#)@*5-?rIz>jnIYU*O*2c885ORs6{t7QuUkE9MDIv-`!}V08D*gs`8w zOo}Hj%{{`;aIWg$mv-sDDa;OAcB@|t<16v~ep0G!>l+5?*+0vfD%PqTIL)rLJh}H* z?WC*a7Vdl|i?hY;5_c9lEyzFOas2BXKM5~m>lfX=Yk%y$W7jgvZ^}-GrQUaZzv?`l z^R(PRTaRyE&&lr%wM+YscAih(oQq9}aJA|yek}2pwRGS2 zW#480-ThJjbJF#Q^V1)3S$|NC`y(9xO8;l8{>oE_rdORfGkp)MPmSj9`_uFf?mm5B zy3^Td`U_Q~j!%EYX7N!q^2el_2i`^>RV_cMZp*sK`{t)mRo5!rw8Hi4YB={CicGxA zd*rb0?bo+@Rf-+8rJE$JdapdO$jLa` zZl%Uu@q^k9POG@T?>zgXYUYmlbq|v7iYl(>D%o+>zS!=$H}~_&k5ymQXzu=f`T0ld zeJ!V_>&5S?dHHGS?|omy?@d3^G)e!Z_%J=|F4e~Gdhh+c m_T@hP*nK5GFFp0vf6V?lOU7(QzBDKsFnGH9xvXt<7-_tY2Daw+8 zf#KG>A6*O#3@jx6$|Noz>;a17Oz!>4_;uunK>+Mv}X@?CsTpD-%pUccDm7{8S z^IP_&&b9GElQ*2$|JT)+!Ttf~;@#UFeD78<3AY|z7CU{;vIWwOJH3BRZrH&clPD`H zGEL}MkDF8JjGdnXC+=>KPgAV$$yGaXTE<4|s@tb4C7+%!9zXZj&C7qy{c?|ev0G1? zi+W`L5-D8eGRf;(M8fmPIPZtwoj2TC_~V70%~$>(tDhw_**~7qC8TltaV+EAW{!(j zN+RuCrTQWcB`=ocy4b^39`|-_(uZ(XBV+deo*O^*d{EN-WhCH`&;9-HwinOOrXBk> zMa*7l$)S=;iT@kiT-NcP-uf7EN5!K*DK$0!@y?kaXDvRI7XIAK;zvdLw56+d9@9F1 ydh3fA@lGKwZ_8&K_NGPW|IIN}Jm6*agjKAH?G@(&4R!_w1_n=8KbLh*2~7YkamM`s literal 0 HcmV?d00001 diff --git a/gfx/pokemon/graveler/front.png b/gfx/pokemon/graveler/front.png new file mode 100644 index 0000000000000000000000000000000000000000..30cca1550a12c5c160f4f5d6392e5c0176e88503 GIT binary patch literal 957 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{v5>W?*1ATFWqtfq{W1z$e7@|Ns9zJyV>b zEEyOWZoT`_#lXP8QWE4B{Qv*||G64&l?)8bF`h1tAr-gYMs-iRZNOpj=KudVD1V$3@xNE~vocHj({ zdSRm1jr0Ge-D+n(5HkJSq+^Hmo-S_Luy%nUM^fy)EjRQ7*RAb)+MUZ{VlnkbxybFS z_e=v7FC1q0&%h_~lzA%0-MJ33Zz9<)2DE-Us~6r>-Ld!J(ai0c&jUnvMC%CiUYNRk zh5f4P3H}pbw>hji7Ten2!GCD=sSn0s%S3cLS8(15yu0>U-F>s8pOU7uZ(uznc73tI z)}XzocHhie)fMyNr(Tji5*X$#y^LX(7yqZlKX@(_-A|S)}#n-G^tIn8xsN%K_SDtr2a;n(N zmv{PCKRvnS_l{)#s*e-8?lIUjUg)0ZcI-@ayBm*<^&QXezFjY6ukMcL|Er_)H1w(H zfw-xkq7&k8rIpQo;o7fz_q7|t8bA9&_S666R$0{hH#}^~(@xX>vFS(9$EA z7mfeLxvymNKiT+K&r6i-6Mg17`Rw$W*S*HgZGE1V>3RMOrsX2e_0iY)f3Cc@IscYu zli^bJt1qv{Ry(KrRDO{E86d|G;LBFIFoeIYd~e_XOZK0Uvim&|;@^gQf|H%7?QM{D9I``+LiPN|K47y%ZxKE_* zO3lh=-utKM|LuIex~)R>im}r^KF0mazEnKEa$wo>tQ9^N*$X!cN#-n<>kvArTCjrS zbMKql4UH+E-iz)NSs(sWXz#a1 z{hf1P*JLX2W!Gdn=zLnrkpl{l|IG1GbM<%rc~ztNJaF~rrFG4@h5JnW(zEu3e1?bD zs^5jB_Ur!Dul!fP@|kz3{knI@um0V!OFsPb(pmbV@gUE?H2=I*UU{FZ#smk!qYMlT N44$rjF6*2UngH~P(O&=n literal 0 HcmV?d00001 diff --git a/gfx/pokemon/graveler/shiny.pal b/gfx/pokemon/graveler/shiny.pal new file mode 100644 index 0000000..36ba603 --- /dev/null +++ b/gfx/pokemon/graveler/shiny.pal @@ -0,0 +1,4 @@ + + RGB 23, 14, 12 + RGB 16, 11, 07 + diff --git a/gfx/pokemon/grimer/anim.asm b/gfx/pokemon/grimer/anim.asm new file mode 100644 index 0000000..781355f --- /dev/null +++ b/gfx/pokemon/grimer/anim.asm @@ -0,0 +1,5 @@ + frame 0, 04 + frame 2, 12 + frame 1, 08 + frame 2, 28 + endanim diff --git a/gfx/pokemon/grimer/anim_idle.asm b/gfx/pokemon/grimer/anim_idle.asm new file mode 100644 index 0000000..3776116 --- /dev/null +++ b/gfx/pokemon/grimer/anim_idle.asm @@ -0,0 +1,7 @@ + frame 3, 04 + setrepeat 2 + frame 1, 08 + frame 4, 08 + dorepeat 2 + frame 2, 16 + endanim diff --git a/gfx/pokemon/grimer/back.png b/gfx/pokemon/grimer/back.png new file mode 100644 index 0000000000000000000000000000000000000000..e5c70286b1ba05c9169d0f45b099721fc2ece15f GIT binary patch literal 386 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|6X8eGDk84 z1Hy8mfl<-Z#WAGf*4vP1zGefS>^HyfSC(Ef*Ja9_ zKf}{!_FbDCkC%tr`TsNh==1--$NJunIe9bl`dK%W*L3MPBpEPoe;!^Jwn1#?ONT3AQJUv>Ryv5E``me@8;E?|Qrvitx5 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/grimer/front.png b/gfx/pokemon/grimer/front.png new file mode 100644 index 0000000000000000000000000000000000000000..f71dca145ad5fd30d485afc662b8ee2603fb2d0e GIT binary patch literal 740 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsBr3oK3M zNM>MQc)a4hF9QPuOG%Jl@c;k+|L1DBRWdLzHG8@^hE&{oJEJ%6i2_f{1|UB zH(ZE$F@Jmc8Snnm;3$V9|M~j&u^iRWY4kjG&?8F6ru;$wOK1OZBhwcP!sXo-r1>uw z2{uw^PX4u|Mf-Kpsfwgn#jXt=eIbT>?yN3$Ue30-Sl~{^j&s&Jhc{37=I?#&k@#Hi z96tXivkV^bUplkvcdpP~k=zq$T@`6l4Ng97^z?H3pPF`Y`wfkdwY*R2w91TM7VU}L z*5#12H*tdWtd^&K;cvRLB{e5)p8iqeP0-@^-WT$tPFH_Vx+v;xaO7C}z9nqeeY1N# z+dVQrYH!^p@k(s!I`fyaE?xTa>5jy4=TmX7>aJ>+oV+vVS<2{rlW@<96f!6O03A#@asTQT6$<%lI)*U^?@(Ih~7M8qO(B)9@@l zw?SCXVzKMSPl-n*L!R~-2hQ6zr&F+ePG)G~>6zQ!$);~IzCPz=*7r%qD@)#6T;Bbq z;28+oKlAY@pVQfInSNkTpxB&1uB)?lKjK+k^w%!=J(t^I)pUuclcUcCEKa;#aB`;B zoxSHBS{2IYC_bJ1eWpag>6xno6VJ{J`?PJ&!R2!#y?-Vs! zS9b2~xt%vH&8_EH&iPq8$MSjF^E+?m%>FBJ?hj+5mGaI<+R|$o7#J8lUHx3vIVCg! E030Z3Z2$lO literal 0 HcmV?d00001 diff --git a/gfx/pokemon/grimer/shiny.pal b/gfx/pokemon/grimer/shiny.pal new file mode 100644 index 0000000..893276d --- /dev/null +++ b/gfx/pokemon/grimer/shiny.pal @@ -0,0 +1,4 @@ + + RGB 16, 19, 01 + RGB 11, 10, 10 + diff --git a/gfx/pokemon/growlithe/anim.asm b/gfx/pokemon/growlithe/anim.asm new file mode 100644 index 0000000..7a2d8b7 --- /dev/null +++ b/gfx/pokemon/growlithe/anim.asm @@ -0,0 +1,8 @@ + frame 0, 08 + frame 2, 10 + frame 0, 18 + setrepeat 3 + frame 1, 08 + frame 2, 08 + dorepeat 4 + endanim diff --git a/gfx/pokemon/growlithe/anim_idle.asm b/gfx/pokemon/growlithe/anim_idle.asm new file mode 100644 index 0000000..2fdd8e7 --- /dev/null +++ b/gfx/pokemon/growlithe/anim_idle.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 2, 08 + frame 3, 08 + dorepeat 1 + frame 2, 16 + endanim diff --git a/gfx/pokemon/growlithe/back.png b/gfx/pokemon/growlithe/back.png new file mode 100644 index 0000000000000000000000000000000000000000..e5e23b822825fe4e0b9e777bfb64cae59f2d6f12 GIT binary patch literal 448 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7e{YWEF((EF z28I@S{YVA|29}Z_zu^D>|Nqa`aI0isV2t;4aSW-rwRTEp-%$k)*Vf-9g4QhN=H#(*-_WeZjzLR}ne?$H&=*XB1_+9XwdhyO=wBoZ6$g_)6FX zxvF5#4e9rVa}I0S=Xpx6_*B#*zUqIUsM+k(_cJ3lX1l+8)Gj2yT#tLhdLh+&4-Mx@ zloyF#YIKt|EO-|GynSEhnNzxU)|ti)%>JtxWlh4D`OY+xpYlB=`1%jI7gpto3V}5; zHl5si6PDDPyMLJXg!z*5k#n}^E!ijPKlsjNU&3PYROM6ahr;z9?XHI+c~3X&omiRC z$+6V)K*)hg?!D?q=b8HkG79_8^q((eYs__i+vEh!?vC2-UCE3(oOVrmpC>!0tuZcm zl&QWY=Hbz7R-MR)T+d$IE>GF0%OA)W{{F-d`;vFVdQ&MBb@0Lmk{ AZ~y=R literal 0 HcmV?d00001 diff --git a/gfx/pokemon/growlithe/front.png b/gfx/pokemon/growlithe/front.png new file mode 100644 index 0000000000000000000000000000000000000000..333568169408c548502071f87fed4efecd5b846f GIT binary patch literal 655 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsBrn`3#* ziGhKEp+#Oll7WGNr6kBN`2YX^|8q6mDj67<^gLZ0Ln>~)oqoIMumX?E#Bcxq?-bjW z{N~Bpxtc14$G&Z9V40K1qrYR{gxBp%6OZ1XeeTSaAHLsutDQsIOCJ;-<9VH1>a0fe_>@ftN!v;Yu3Dl-`F0W(o8Adw9NJS%g@^`E(*!Y zJbSD2SKEzXw<>+XQ;zKqzgFDKT5j{ia>A8~kzEDHA`hR-Xq)b(>&xlQuj@QfU2RIc z>&Z!tmajeRlV&ms%rBT?Zsc@X)Z2G9_sJ>uBm=AVrysvF;qK(c_XQ1KPPKhBLvdw} zrBI;7tVvrd^$>Rb0_@(nA)slMCKe4C@Oxb&0S zm!->3Hkfk8d%T{td`5;}~s1XT<`3XHvV;ckK~^4=B;^j z=;4|5MazPpO*G!;T)ghDZu$nc*Nw(YJs%Hf~R?Ts|xw*^W+rK9~{Re!4)TYceUbp7KBQ>9MJ#I7C-6>d>W;Z4J+?KODt@Y+e zN}rZZKlbnp1lrr4zhn8iVBXH+wCZ^`i_)s+RX#ZL%;xinnO|)_HyT&Y`*~z0*R1k$ zAEwW-d_ME=%)>M556onmZGP^G?enR|R-F4E@D$a`os$8>KZ57}FgW~^{+#yc>Mc-; N@^tlcS?83{1OR>`MkfFO literal 0 HcmV?d00001 diff --git a/gfx/pokemon/growlithe/shiny.pal b/gfx/pokemon/growlithe/shiny.pal new file mode 100644 index 0000000..5033bfd --- /dev/null +++ b/gfx/pokemon/growlithe/shiny.pal @@ -0,0 +1,4 @@ + + RGB 23, 20, 07 + RGB 21, 13, 00 + diff --git a/gfx/pokemon/gyarados/anim.asm b/gfx/pokemon/gyarados/anim.asm new file mode 100644 index 0000000..9c16205 --- /dev/null +++ b/gfx/pokemon/gyarados/anim.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 1, 11 + frame 2, 11 + dorepeat 1 + endanim diff --git a/gfx/pokemon/gyarados/anim_idle.asm b/gfx/pokemon/gyarados/anim_idle.asm new file mode 100644 index 0000000..792fead --- /dev/null +++ b/gfx/pokemon/gyarados/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 3, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/gyarados/back.png b/gfx/pokemon/gyarados/back.png new file mode 100644 index 0000000000000000000000000000000000000000..12e94292799edb3560213cd4785f4f9e6a392d0e GIT binary patch literal 520 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7fA5^7SMfCl z28L9D3L^#v29}Z_zu^D>|Nqa`aI0isU|jC$;uunKYwpy}zQYPUE@#jD|Noh-M);PA z_mWjybv^nr6JwU_iP|wCoZ+ebk!sG4|4UXMY4(5N#A5HBTenf$#^cS+T_QhNBd)&S zN@vJpx72tLV`{ci=&)ncR?}bKLLRg$Jz$w5I_sh%V|-^d2fvU#b>KRw=oYVo87fKsM_>7S!d&l>7K4@b61>OtdOPfdi~7Zvsd#b#s~&7e{s#% znkEvO z|4;84j|=A(+gHE6)_mb%X1Vbx_5Iz2*~O|S-}*MQv!4AcF-?_k+R0cB;co|IG`3ew zHemF3y%8@xH9?K}<3umc(?PvS-!=5!@l81s+ONb`QZ3K)Me~W}B%NkggYue5ua73S zU1*;%KZH#-muZK)C4Y4ChBINzd*%pyd9dX|<=zCBFRYt*u6gBrPqF3PAX@d+n{@`4 b)ED{UWn6920iFpA3=9mOu6{1-oD!MI)@|Xst^=fsxBpa-*T<_T+x{YrkcO~z>f@hLUx?88d*WUCfLVZ=SD$A>G ztq)GCu0*@oaBfj#N|{;}yT{?$dP(y;Uzz4#czxSyd(8C+jlQR;e}8kXQTCRt+PhM_ z7(QE{BNR(JgCwWfa1Y%M`n)#)NU< z>Ph+Cuh?ALj46iKD}_sh+4T$Yu?VC%QOqvyS65epAm%?|!!8-`Ah|9>~_*7xnBJw~6%4S+6E^?6#Ze%Hm(~q-1*hp({T= zI!D?b@srap>|o?n{iW76J#v3*0FROHZpDJchbx~cPRcT6; zs8!ju=#5u~19wnXQ}~)^{SSC&tWyb}yYR}a6i+P42Mx!flP*;mh0*5Ax3yW;9}O@_!UyUG)udnG1JIO47|T_eqgv4}b9K(>WP z&D41Z%#!c3*aVc$US;=GP{U54?^)VO>9UEU5wR)`TKf`DZ#fuj@ZXj}-#Tdfd6{Fk zbni3@?a%pLymepuV}>sRDsP=$?aOn>I@WnKw(#t_Ri-Pyt$DgS@3YuEpBm<>gzffg)d*8{J$mhb(13E&xPybBf6ld(}x{x5j^`!Vb+vFFj1!iZn_p8|| zD!$pAd}B}iuE!Bw2J54n`f}Kc8dWO`qgPCOWwP!oSJ>*)_l`RA*1ur-&-ebsrS_TS zCBGVYj6U%#=J!@BcrJU*EPdC{1J+y4s@3j4Ypr5l_f+=B#PWojFZX@y3(zX7JRZRJ zz2dla(NSv-`%iu06S?nwe0bLXp5y%k=JyJxhE$opVSjJ%#P~yZ`3aTp3K5_B^y;Qf zeI(1zYI@Ro-n1DHW%Ud9J(11-x$%kYdCi#*W&6F)eCT7mQTB=Fy+g{X+*vB`AB0`8 z47g_cK0*KLH?@=2Rx2Oh%T}*&pPrt|X?gG9+)9tlG7b0lIJ-?gwB&EflM43N_ZU_t zEZ~Uw$hYdP!tLG$zL<}EnUlCevdTZsD))%iJMrR?>H7_K(bDNXd;hS%XIOJ=q3OvP z`5ks2`Hnn#vGqM;#ba5K_Zu9_UrNVUK9Eh>qa3l}$lcnL)=a)fOXfeBUH;|E6`m8H z_+qv9Y*9RIea1s6KJEO6KBuDN-O;H9jokMFPcX+U3tC~! z&pOznwIwqArd4=og?-x4sU0RMWqvzZAmiO#HM!Q0u6Ov}TkLuKq3^IY-}@i?KlIIg zE<0o1guh3uzs)P>dHeg=XTBrHdFKk}eBgV#Z_{~eruQ7W5BT2Cn0Iz*WqaN%=j5r6 zWWQa}zQcL$Q{T(X2W;;d&fhKUD&KO;t<7f6mgdm|+eB z14EjFP2`*rt(1NfWSTu?uymVCh=TY(sAJCR<+w6T8%n?1Q%RgTYdGI z>OF>{t#4|Jmt9xY=>M+1(z|48afsrY1cp-*j4IW;I2KLYeL#@0-tY2q^(XANrZTDu z3slZ8GCGi>)=;Y3dA#t%R~^@2$x9!i_xx&l^8YgPp&ECq31=%*etr+|&Epi-Kk!#B p>GF?!C+3Wse>WUopH%aNzs7(^>hekPQw$6Y44$rjF6*2UngHs0pBVrE literal 0 HcmV?d00001 diff --git a/gfx/pokemon/haunter/front.png b/gfx/pokemon/haunter/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5f6c2d1b3cef2fc95e86d8df328899e440af6a7f GIT binary patch literal 900 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1N`m}?|NsC0KUc%8l7WF)+0(@_q~g}wS-10!DDb#Qe*XXePQ%%w z3BnV?rfyT^U%hN5r`e1G5urmRM+(Z0I6E(?Sk<3i)s@mJS^Kx-<P^ED=brIc-`0kdQ%|V#WL7dBdoR6>d3}#Ez75OE}I?yYV*QZ?P5V;&#p{y z>EyL~ep2LfCFhC~?Mm6H#}nUq6;{JEV1Fmikh8Mj(s+tPFPU&+zFKViotiaDZxulZW+`Pof*2;aK*t5J=AMJmc ze0rIEkuMdS7t5|V-+j$^ZDW*Y&E+NU)l>3Tn19GsYt}ktw(sNwEBB}*<`UkE4^AY< zm_Fb+))m|rvP6Slq~P4%cH@S5|0hH%Y>7(>1prj)AjUY<9><7 zd1)V!)NhsGt9Ti>yy(WWrS5aTR37b@-V^e5^5JJo{p_t|;$D5(eE5Ot()qG%`kMU9 z&hW;)+AQ`c>XT6aAx?c(E<>4*la6dU>wR99uQIbyoKL?MV*200xUTj+BK(z_a-W21 z74<)Ea=vybPmM3`mX^Muy2IX$FTPYt`o8u#ChpX4ucqHQ&*+dq)gQx3&a9oHA1WWJ zX1MSC+caIK{j_&*$i}w!AB21>bt+dnvvW+)sr3Ak@Ir#~+#}Vk8!l(esK|6_KWO-Q z(iQ=m<7d2uIehe2xW&zy_VuFS$4RUb+HqWb?Z5Xt(S2{Hzms8ORDEB?%f)XBD_?%P z1PX}yDbpEbJ_JR6{a(59;c-6wh1%QP47KB&=F6IYIpm$?@0L{kcxmDCm%Y<7Ze>P& z7CLb=v#4^VR2KW%%9VR=99Gj`c;DjIBh{^!w;c3lUXkt<7ALKPhQKE%` zf#H-}Qw{?I14~JeU-19`|NrM|xK%PRFy?!@IEGZ*nme_7(_sY;m)5`k>-R0%(X>`` zr=Rs(mGr}hk8b&vtr?Xncv(&K=rM(*0ufE;uCtuGnZK4pqQlCbMd{dnp%wd1W<1ho ziP88}q5eWw>VA^nfe_OLx0Wr-e&1DdQ{=x`$^L7(bn>{P; z7+A6;w%2SBuxWTJ?QD1UELQ?k+aB$RgCaV{cgtjx-v%ao{5~`5Q|6PC%?tXLulgLh zV6IqXv*o1dxUKvD<~`zlZ}0u!?xg~oQij6wZ1Sw95-(IrIvQ-Uta$q2z<&5f1bJcrDJT^aaH-<9*r$Bh0i@*4lZq) zATen=?#?KnZlrp>b@ZxVGaA!H?>3ocz;eQRnzUNelf#eyeF>Pg+qU{Gzqbmf VhTjqs9R>yl22WQ%mvv4FO#o0z%R2x7 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/heracross/front.png b/gfx/pokemon/heracross/front.png new file mode 100644 index 0000000000000000000000000000000000000000..a8908ab865854fb2926be9cca5cf8d4c038d965d GIT binary patch literal 926 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*b1L3-wbXYH12h15&oTbq}OkmgS=?}--!*rAJ;rT@lUXWsp8Df z3z>!~)qSjQ`I%z9#pk$oUS+g7|4_tW>i&68r4^U>|NF2xLhNA0)#=k8eXL0FwUu1F zDJnVm2UAJcai@O@<*sv;a#nxhy87Uj&69&d3zwA$JFGs>GK;gRn(_31P72O1 zAFNWi{xjp(#4}$7nMxbnHaVXv{h~Nuaq^yt+BJ$c+57f;vnF1N7e8QRxa`9DBT`!o zHfH1|bXxBh*(b%>;5Iuo{dvP3Hu>~p+v%G_t+#xIQycaDiUafq#%bdn{C z?U~A14d3cb3sv3CR&iB*=s0P1@dTS~t1AC5m)>2;Qo&u<91T9%u_W<+O2748mG^n2 zMZT((sL}NgtfwKGD?0C{H@=HSMmF9$? zaBR zJ>5)bfjJR**z{XkW3_c2NRqro3PU3$9owDuloMu pQ}=B7Cs$ti5@PXxd;P!6LbB@KV%se*GB7YOc)I$ztaD0e0st77wfF!4 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/heracross/shiny.pal b/gfx/pokemon/heracross/shiny.pal new file mode 100644 index 0000000..3bc81cb --- /dev/null +++ b/gfx/pokemon/heracross/shiny.pal @@ -0,0 +1,4 @@ + + RGB 15, 09, 24 + RGB 13, 03, 16 + diff --git a/gfx/pokemon/hitmonchan/anim.asm b/gfx/pokemon/hitmonchan/anim.asm new file mode 100644 index 0000000..2899be9 --- /dev/null +++ b/gfx/pokemon/hitmonchan/anim.asm @@ -0,0 +1,10 @@ + frame 1, 20 + setrepeat 3 + frame 1, 06 + frame 2, 06 + dorepeat 2 + frame 1, 15 + frame 3, 06 + frame 1, 40 + frame 2, 10 + endanim diff --git a/gfx/pokemon/hitmonchan/anim_idle.asm b/gfx/pokemon/hitmonchan/anim_idle.asm new file mode 100644 index 0000000..2e53779 --- /dev/null +++ b/gfx/pokemon/hitmonchan/anim_idle.asm @@ -0,0 +1,7 @@ + frame 1, 40 + setrepeat 4 + frame 5, 09 + frame 4, 09 + dorepeat 2 + frame 4, 20 + endanim diff --git a/gfx/pokemon/hitmonchan/back.png b/gfx/pokemon/hitmonchan/back.png new file mode 100644 index 0000000000000000000000000000000000000000..6a2e663e3909bee3d787d856aa08c2bf9c9cb1f8 GIT binary patch literal 439 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zqUI0p2QRe z28K7S*~=Li7+6Yz{DS}g|NlQ%!>y8mficX}#WAGf*4wGx)0h=GTpPFlw>584N}BrA zpxI2lv-AC_@a`A&f8I6pRj=Kb>tsIRB;&P*m-TH0H`i?xH2cfob8_+n?~HZDti0gYv*jk!qjUvPkD{5L-{)!>c**SRde#_pc4MT$ z`^odfYES3*3dihEQGVJrjaA$4>TNWIY z(Qoklog2Jr8zV>UeuK|H53*GVZ(Y}symwB(0;Wsn4KnV9{x)8frX?rgfBo2`o~5T> u+&wVwz@6!=5{*_tN;TKKll=JS+F!9`zp=#k!E^=&1_n=8KbLh*2~7a?yuBCz literal 0 HcmV?d00001 diff --git a/gfx/pokemon/hitmonchan/front.png b/gfx/pokemon/hitmonchan/front.png new file mode 100644 index 0000000000000000000000000000000000000000..6575dad5a4205872a4718c4094b12516bed21edc GIT binary patch literal 894 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{v5>W?*1ATFWqtfq{W1z$e7@|NsAMtCR0Z zOkrSPc+;A_oPmLXr6kBN`2YX^|8q6mDj67~)oz-K|V=qU{ zb_Zt$;fF2{s;}yNDUS*8P+AaiL*Vzq8{AoLD|Yp7*!y;q+XBtI+#atIkKDO;+dW~Y z=C^}Cgg)Hx`N9;`9`|;&>1NL}&jlSXTId}Oyq_X=bi*-KSD_nM3bwDeKg@LH>aSgG zhg{!!)~#f%;&|}O$nL}&-wR@!cIDJ>-!ZG!cq9KS?iJp;@;rYtF5}erB zzfTL5_qWNuHo6|2H0{`|#q(|iCPlnI72TEb(e?hm?Weteew*~Vn?-8%Jq`}8XM5K? z6&G4?T*y+!O;!2Ab9c5SlJ2aw{;E0oc_$@BwoEs&ieQX+_w}(%;n{r(dKdm4ZS>ZC zG%cpDxnb&$g$?{H6WYp^EMg8kSS}NL()*-${ha9w;w<-=oL6?_e^Z&c)%@zT>2lwA zcbe__vh9FVw0~UG+m*LJo9o-MG(WeiczI1bL*|zJo-fy8Z>)*0eCgewA6J#1ARSlr z-tEtWrM1kD)%7iFzn=82KFY0s(B4NZPU-u!9iN2$)LZ85*^*xivJrwU<4^s(RBs=z zwfytaxd$FDeNe;sG-Y4O?$$d$FKyPZ{JiuD9L~}IEB#s3YNr0%^2b*3M&-}ietcef z?MQoN!oHG^x(4yH(toFEU;BA!6U&}Flb7s`x6{u}x0-n9?P~G!Da*YR_OYBaaxGZ= zJo8HD?eEKMe=_Or)T%gmR#ty)=~26QQ9%KA*0q6IO-W3QhXZ%iUD&k!;lam~mT#yn ze|;dXl5_j>V|Mzk=kG$CBY)mI;-KOY@5eQEk5vQg`cFSEJonjRj$Oa9RgK*C^*8>0 zpU!mt@rHQC4}VqPSH`5oP5HcZj=m}!KK(xZ({Jzk>C-m*I>*9}UWjk``Z(v|xVDNPHb6Mw<&;$T&ske^+ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/hitmonchan/shiny.pal b/gfx/pokemon/hitmonchan/shiny.pal new file mode 100644 index 0000000..ff930b7 --- /dev/null +++ b/gfx/pokemon/hitmonchan/shiny.pal @@ -0,0 +1,4 @@ + + RGB 16, 17, 12 + RGB 08, 03, 31 + diff --git a/gfx/pokemon/hitmonlee/anim.asm b/gfx/pokemon/hitmonlee/anim.asm new file mode 100644 index 0000000..97110fe --- /dev/null +++ b/gfx/pokemon/hitmonlee/anim.asm @@ -0,0 +1,12 @@ + frame 0, 04 + frame 5, 24 + frame 1, 12 + frame 2, 06 + frame 3, 10 + frame 4, 06 + frame 1, 05 + frame 2, 05 + frame 3, 05 + frame 4, 05 + frame 1, 08 + endanim diff --git a/gfx/pokemon/hitmonlee/anim_idle.asm b/gfx/pokemon/hitmonlee/anim_idle.asm new file mode 100644 index 0000000..5721310 --- /dev/null +++ b/gfx/pokemon/hitmonlee/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 5, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/hitmonlee/back.png b/gfx/pokemon/hitmonlee/back.png new file mode 100644 index 0000000000000000000000000000000000000000..9bc03d5e760d952995d3542a411345f418bc496c GIT binary patch literal 391 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zqMGix}}63vK#kl>-5Sp?kOyO9D4Cb&V1H@YRxCR zH13(VwRoJGEw9Dl?6%}?gL`A(ckv9NCu~)P_caeDpy<_l6C>8#+z@2gLo;JIsXY4;>in-51V x@}C!pzwrCN=cwV)zxVegFsh$=Z1s&%P>S_?|EXQu85kHCJYD@<);T3K0RUm|sz(3- literal 0 HcmV?d00001 diff --git a/gfx/pokemon/hitmonlee/front.png b/gfx/pokemon/hitmonlee/front.png new file mode 100644 index 0000000000000000000000000000000000000000..96b6430ce5781de5c6bcadbcf4f66a467834b217 GIT binary patch literal 1669 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@|NsA6i#4lT zsu>sWXNX4zU(Koj}QR88``u~5iR4!Xj z?~^BrlOI$+n`fODo}IXQ(}F4WM_ngq_x}33?(Hduzmaa!SW8}Vp4@w@PHLTF`knXB zcsboW53*Zwk3e;wnzxpwWbW}fl~ABcCX;oh>J z)A-DOj@awLGahlg3iCe6qw+}YN9`JeSBHd)Csc@qAI@@{J@I0dD8F3es~@TBKir?Q z_g8|D^NH|zC!|VbQ>Gr1nY_f|<=j%r%>Z|ra#;4c3TIZ`nL4nyERqpV^>n48rZ76X6(HV zjnU_Z>e5NSEiN9q96smV*AtHzq)&Ld?~Q-1^rSsAE>QSDwr&5UeF>#&cQoAii*zbpGcPdbvpfj!Rr@&i>?3p+`U*jb;CP>B2{_yl6IRD+Ks*! z6z>{72;pTZX+IpH5;CLj#!J3d&FI#W_Py^mEGgI(E&k%zo!Rduh(^BgeDdnNTY1JW zk(G0I>#%)TVy*L5NMVk}^xG;XulVFn$UV5SBY95w-G_`u6Xmu%nf-1>TT4kv+VSf% zH1l^kYgk)EpOfyCRksP4<5+p%q{5l?s#9OL6`wEe)t8%MmuyB@#j```TTL-?G?y9awF?eq&Ocd$sc&pcY}%=KFE_@u6*tcR8mO%~qOOa=fJdZr;sD;ja%?wd)lhI$E=VrG$Nr zrpl>(Z||3~M_yBOR*87eFlF(q^`>F(8g1UXWnjjUFz;ER+Sb%xu)Rm!T4ydx0>hHSVwi|SUw3VH#p3% zn0{9PIZhESq($4c6UF8Rgz%dHc3Z{mo4u;=`#SII1*Df&4NFY$}3Z?`(xwyk%U zGrPyqzj>2)bDj9mx32AnpvFA4v`^}H1;hDEN{+*Qva)J$;Vh{abNMkB>Ve@Ov2BtWoFpkPdxDD zXWzcV?yqH)4OUrODdd)|T64bKV9m6icM~ck-JbSt*E?U{;i{D{lT^8HvDnR{pHC@; zJ-4pdFI0Ywqx*$-ajv6yLc@nI&#mhmCKZaBX-YXXaD2MvXWOy52Hk?_n$)0nitF-7Z z%NLd7ovRsNzweN^aa}$k2Pqyt<7e{7CoP|#Wi z28MYG^3xa?7+6Yz{DS}g|NlQ%!>y8mfpMp&i(^Q|t*z5ePiryYaB;r+|Nm!|JxqqT zRu?|pxOJT-M?(L{cy{}GJN^>RdZ9TU)&Kb!f>h^BSEzTLz~torLup6f75}$Zdxe*r zQRcY(iCMvgUwB5{r}amw7F7vf`11J+>yd*D3*>&TQkP~Zp2^_lXHuWHQ|MJ-jr$jO zgDdThEDzRQ(|W|XO7K2Yhyq7(t8RGHzIks}gg;%|owOw-b+1dxhGPk4ZB%xfy8r#k_WM_rMBX2~^VjLez5}`$+DB7ndOu<_P?x^yTXv7_ z#`A=Y?Kxp@w;ohC*tF+x{*Dd1#rN``7ybK!XOp7)`PV&{zNjmn|0p*3={oT_99vlr zUzosN=o9#?+r|9Dvi!iyz8_pUK6&==E0nu@GUkeX!n|Q(wEdQZGmp&eqkg#OeSG=+ wld8Q9l(VO zjI&fjce1=ce{GHKjYXGE$8hZ5|526iZ_ke#<`gd{d%Pgk0ju_LpM66A!JOkaL|kC0y{8%`;K<71HYK9&OkV zVQFnY$4BU5&yhFo?`F*U7QuMA`NgdUoj49xg*fKN6-R6*Ht-#*{AF11yV0sSDQMp6 z&!0?gT~=pY?D&>x(u62G2>iOf~i8Ham!d$?pK&GWcXWigYBgU34}N!+q6NTijsUqRw=otgOV zXZ(eZpV)iU%OuadJMkuc0^_Upg9(dwyH<8J-;(!MShm@@W1@!A3U)S)DJ2K~v~1B_ zDe>Gwws=lI(<^Bw)kjYy)TIiy6!#mfmD+zVpy5K(y)fgQeTp1{P9Cbu7JE!Dd6{@$ za0bu$&#WqTnRkCA9{Ol<&blK(#>8P-Z*u>i3qM;fSlU#28Eltt{WqKIisFyN!Xl6B zw(Hw&3#^H*;wqicDY_tD|wV+7{IIMR$ ztGJ!C51wFm&o->wA*A^PyG{J*uyPNzrB({B+r^t@?_QG6W!W?TYsS2;RjXdUyR4X1 z+J36r?)j1DnYT`M2Y-FA>v8-g*;P;aOWn5?udq(|dVJrz8B4lf^Iex+XZ^4I?#7d+ zmsp#XhdfyRO)R%nXZ1WtBk-~abn{Q@hq zhCNL0u2@ggyy~|%IdajBRpmZc`{qZ!=ZJg%q3Zaedx5v7rOmv*`BsSawtE*nH}KCi z-k0ur^U#7*`(DeYRPBAW>Y=UnCMWTVIghVbhi&=TyejX%p=tAV>pk}#e&t&aipq~4 zjbF+Bn|F0_#E0)|V#mdKI;Vst E0QS8Z$N&HU literal 0 HcmV?d00001 diff --git a/gfx/pokemon/hitmontop/shiny.pal b/gfx/pokemon/hitmontop/shiny.pal new file mode 100644 index 0000000..5c88a27 --- /dev/null +++ b/gfx/pokemon/hitmontop/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 17, 20 + RGB 17, 07, 29 + diff --git a/gfx/pokemon/ho_oh/anim.asm b/gfx/pokemon/ho_oh/anim.asm new file mode 100644 index 0000000..68fbd38 --- /dev/null +++ b/gfx/pokemon/ho_oh/anim.asm @@ -0,0 +1,10 @@ + frame 0, 04 + frame 1, 08 + frame 2, 12 + setrepeat 5 + frame 0, 05 + frame 3, 05 + dorepeat 4 + frame 0, 06 + frame 4, 12 + endanim diff --git a/gfx/pokemon/ho_oh/anim_idle.asm b/gfx/pokemon/ho_oh/anim_idle.asm new file mode 100644 index 0000000..ac0d93c --- /dev/null +++ b/gfx/pokemon/ho_oh/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 06 + frame 4, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/ho_oh/back.png b/gfx/pokemon/ho_oh/back.png new file mode 100644 index 0000000000000000000000000000000000000000..c28d038d93fab25cc7ab5ec0ae8d9080951672c2 GIT binary patch literal 464 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|KC!=vRZ4=g4msGS#aoph9aQ*K4Fb+}A8Lz4) zi7=dRd*mOt)%D3+-AT?0AIf*tLVSOx=Y>8IK_4g>$N-nj*om3-zn-d3cY8FYnpGF`t16KyL~kiO<3gXmMmj? z`t5l4f1jH^%#$^}#EvLD_#^Yw-g)wmztg3s1$`}d`NLJh>=t9ZqcZoBipRR%3HtfI zQaAe6sU@E)bD+kX1%-qbZy7x<4 SrZ6xtFnGH9xvXns_EE1B9e)jOK~LYpREZG7-U$=9l7{^g`8qW!%_E5joA zH>Lg*3v5g^=6rI+^UA}`E8iSDblxYTG3AH9gPLTT)T2%N_!4?z4_a~r<_4_xb3PEF zuE3q(#w@?pChW<@ZBr(EyS`Ir{es1(K6?3;*C$<1>a7(i_LjH(G41%@hssSp6N3%Q z({~-TQ<0E7y(&kfC5`tCtJOzav&Yd)hN)kpCj8y$zSLhT`-ZlR!5^8MB{B9BC79jb zxYZsJT`BecXwrJskIC!UcCbmU`##}l>6CdsZ;Cp5RCE$9RDkvm{Yu3dfIEx$!y9B z%}Jco-bl61;|to(nj$tlg-@ocR6tMrYtkuJB zCGN8S*O#>O#rK9zf1qE|zPaFAq&oln5_aKvU9ZJFw*FjU{bJSh&t^48y~+zJT~597 zX)u-H0NdCLk;Qm2U_1rbotGkt=j0n>##KMg0!4#yPAuxGaItiJC`5G zmVNx{0Po$0!E@D;L*KpNQ$Ct!bp5kec~8}n6{mQ#?;bpqIrG_uiHb*^%6q!*3q+)nL%x58m16XW?^ivxbB2)x?AWAlzXFZi4neX3aRtQehF;x589fAJGR zskz4|zcX0aWO(uB(iwlg?`od9E~i{!Rs6A6VdW0dcM}^qr@i>RIOXD|XhCUJ$BXi% z?93CSRi8>~-#vJjuU^A9ut>ke{qEZhnhD7o5wH4gygl$GdfS@Pc6Yt+7nXEPu)cfo z@6@)HHy7OE-__h@*j0X@>f^D+?;f0E&1_R~mjAo^s;s3*^L~Gxy|x8!Qe4l4xJA`n zklop6xXt>=^tXKG?uRz6v_ALY0<-mR+36(}>H8ngYIvOe!2aHuAJwJqA6mXGeV4$y zZcEup>x>iz?N5Q_4Kj{R2fEtsbKey_kX*F-a=+NoKY`^JIzE>-Kj(YuRUYyF(4wpL zY9CtP8GPTh(crb-`V#iLulJW&at96;?F6WIC50>Fix!%6@yj zmP7pAkMlNHosaw*`+SWK|Nnw>rxvZ-KX>ylmb^KeH$^VBpR@T;OwRZ7k+oAk-7OBQ z@^ioae9acy`I~>;dH>?n>Z_OP%FlV7`z>qb_4%6R>WLG%B_rl;Ugg64>!{^wjqs{} zt!0JhvNQyQZG3OPvs`^?ci$h0L$8a&rtmK=Up{e%UAk-R{j*uGW*e{HZI%ACbZ;@o z$(=<>lfs{`*)k<=XUD0(mfF6@Dz9!oUL2-8vnz+Oc*bJ)UB~Xu*&Otjf9c8H_dmWX z-}77ceH|o!z3Th^ukZigzp^a<3hLcI+{u6cUg1OgZ)=Z;`@gO4fzhwW{15$XR|*{D SU}9ikVDNPHb6Mw<&;$TUQ*CAd literal 0 HcmV?d00001 diff --git a/gfx/pokemon/ho_oh/shiny.pal b/gfx/pokemon/ho_oh/shiny.pal new file mode 100644 index 0000000..64a56ec --- /dev/null +++ b/gfx/pokemon/ho_oh/shiny.pal @@ -0,0 +1,4 @@ + + RGB 25, 20, 00 + RGB 31, 08, 04 + diff --git a/gfx/pokemon/hoothoot/anim.asm b/gfx/pokemon/hoothoot/anim.asm new file mode 100644 index 0000000..a3c4197 --- /dev/null +++ b/gfx/pokemon/hoothoot/anim.asm @@ -0,0 +1,11 @@ + frame 1, 15 + frame 2, 04 + frame 3, 07 + frame 4, 07 + frame 3, 07 + frame 4, 07 + setrepeat 2 + frame 0, 05 + frame 5, 05 + dorepeat 7 + endanim diff --git a/gfx/pokemon/hoothoot/anim_idle.asm b/gfx/pokemon/hoothoot/anim_idle.asm new file mode 100644 index 0000000..182b306 --- /dev/null +++ b/gfx/pokemon/hoothoot/anim_idle.asm @@ -0,0 +1,7 @@ + setrepeat 2 + frame 0, 05 + frame 5, 05 + dorepeat 1 + frame 0, 13 + frame 5, 05 + endanim diff --git a/gfx/pokemon/hoothoot/back.png b/gfx/pokemon/hoothoot/back.png new file mode 100644 index 0000000000000000000000000000000000000000..73247ff34dfb409aa344218d8a3a0ba76624765e GIT binary patch literal 427 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zc<@Z(XfSq zf#JiBKvxC^29}Z_zu^D>|Nqa`aI0isVD$2IaSW-r^>kYJq$36#F0RG@t@#}_A~$CJ z7rR~|^NVvrPJ!3;V_Eu12N?KnpIW$V!W@O$vrbI1(K_|=T;uV@d^&1Z^KA`gZO}Ez zvrRbB>D-^j#wGZ_g{gJkZpN=#K|DzwO7o9hSj>O0=hltZ1s>b4x=Ya*-cf(7D& zQTJv>nfEVY3VSQ_ilOCR(g|hvOEKBOvC|gy@3`&s^7BK7vWqYGbB6~x*!iuxU$$?> zr6LARlTEv`Htn3fg;VzHEsr-7-dpYX*K(uur2pmbc18bvC%!SP`LV`f)3amSi(U&L=fq{W1z$e7@|NsAcvkesu zTR^fq0$mvx7+6Yz{DS}g|NlQ%!>y8mfl0#C#WAGf*4tUH^A0QUxaHQr|9_4-e#cQy zE#JHIXO_tFE^lZoIAXHsxk`rTx}Pi}FB_6(#d7@?H`JaOr}BIkTw zGr9WGFWV5c)80%~FAY;Yr|uQGSH6w$X?)YQ6839XFP%_M`*!iVhLVJ8VUyW4-UpU8 zoD!X1P2Fu6Bio(h%{=_(`4;mSL>sIp3bPH1sGwlwI1>BH+!emraZz}-FZl=0Jd#cB0yjn6(mydKPP>DisGB0T9u z+osAi@w1C0KZaI&yjEIr#8~_JleOt)?%eZiig)cf2R6NO**W9Vc`NtNo|+D^u5y`8 n@Vu4(nKjN&N&k1x*#1twdThk@O@A2}7#KWV{an^LB{Ts5M=~kX literal 0 HcmV?d00001 diff --git a/gfx/pokemon/hoothoot/shiny.pal b/gfx/pokemon/hoothoot/shiny.pal new file mode 100644 index 0000000..3606855 --- /dev/null +++ b/gfx/pokemon/hoothoot/shiny.pal @@ -0,0 +1,4 @@ + + RGB 23, 22, 06 + RGB 22, 02, 24 + diff --git a/gfx/pokemon/hoppip/anim.asm b/gfx/pokemon/hoppip/anim.asm new file mode 100644 index 0000000..d4e15f1 --- /dev/null +++ b/gfx/pokemon/hoppip/anim.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 1, 10 + frame 2, 10 + dorepeat 1 + endanim diff --git a/gfx/pokemon/hoppip/anim_idle.asm b/gfx/pokemon/hoppip/anim_idle.asm new file mode 100644 index 0000000..afbcfb4 --- /dev/null +++ b/gfx/pokemon/hoppip/anim_idle.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 0, 10 + frame 2, 10 + dorepeat 1 + frame 2, 20 + endanim diff --git a/gfx/pokemon/hoppip/back.png b/gfx/pokemon/hoppip/back.png new file mode 100644 index 0000000000000000000000000000000000000000..325c089931900b94751b1f6d9053ca77b4503f78 GIT binary patch literal 391 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7AGOzTt)V3Y z1H+5&4H66t3@jx6$|Noz>;a17Oz^LZw;uunK>upH%q{9Xr%&-5I=P^81KXUH+ zzcogaUv3fV2=Dy&F}>jd_k31)6E%UeOJ%$3Pphjfu74E&+mJP+D6-*(;=bI~R_TSU zwFaFICMG{0-ZRfBykh-~=iIik3kpr!)6c~p@3`i$rfDrh*lfE?^H_QOSk6xL4f&j@ z{%CIXK12I`#)}%&4${pi)U&tKsBp<;pJ13sOSMQIIsKSFB5>|}qaokY96IK;wbC zY*y0=e-ox$%}IPyQ!+Xi*XRZ`S?*sJ5WPcm!SxFL6`uPdiw=hP|2b}9IZ5oXibV6N wT@MO!k^_9c9%tIw5-~wd!t$@}+gJR40_-Q}PVhRFVdQ&MBb@0AJ;)EdT%j literal 0 HcmV?d00001 diff --git a/gfx/pokemon/hoppip/front.png b/gfx/pokemon/hoppip/front.png new file mode 100644 index 0000000000000000000000000000000000000000..19cd0d4739ba166ad19e8b21ee15b166d05a4319 GIT binary patch literal 527 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V5s0=W?*30zRqC<0|Nt3fKQ0)|NsA^_8P7= zv}9mlc=5eKf`Ng7r6kBN`2YX^|8q6mDj66U*Lk`)hE&{oJKb~IVFex+!P5WM=Ccf% z4RjubI^Qdnd9LhrDDbFetw9IJ0Y;9-LZ+tXWxA(1I>hf!km)~_C>`X`=Ct8SWYQ1K z`N|%0YvQ>dJ3eLZJt@w|wXkW`<|ZL&tGx$AThgDbZuVZy{)O8zQ{1rtS4Dmx@S@cYnf1P zagyGua-MZ37t<7|NLHZRL_3~ z1_ln1HK!OD7+6Yz{DS}g|NlQ%!>y8mfsx76#WAGf*4wE!`Hm=XxK923|G&+ShAFEu zjAkx>xNzf3+tkqDU$^^v4C3{_y1A;ebcD1ji#s*+`Zc&Mu+vnDi0s_-hT)s!@?W37 zU20g{zewX7!#9>$K3_$aF<$LtWMrJ^DDx({sbwMKT3d%81>x&L6C_jwSQw0?SBH2= z-Ps~~;?G)z#ga~I7`8PzFs{8+;-Gb)gQ?){ffNm^ho^QiRk>7735_@a z3lrWvU$HQv!zPEm^NYh>Ebsi<=T^>e z$obOwPbUkXq`eU8IQ>O!!n=;itJ%%k7ju`$tUg}8?xyMejr^A;vdw?0S{%*5z`)?? L>gTe~DWM4fQuUWv literal 0 HcmV?d00001 diff --git a/gfx/pokemon/horsea/front.png b/gfx/pokemon/horsea/front.png new file mode 100644 index 0000000000000000000000000000000000000000..28561768523436b218b0825b525f5bc142a4a032 GIT binary patch literal 529 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsA=-%F0_ z`Om<>z#+2c6axbTOG%Jl@c;k+|L1DBRWdLzZt!$*45_&Fc4lDTVFM1Ak7xeA-_w|I zy!1`N+Er^;9hJ|W<);Im^S>CY^9U7qal!M~m|jig{;^ z-%JuHSoV1WR8#!nnVuj0EEm6>CsgdV`^kyLlIeVNzj;n9xPRtFW1#utGqqlkZ)V@k zE8LgAY!hcx`tP)uD@pHWtAg$8FH~FQ()YLQZ^*G@d!Fzd+d3=VVNYJX>*tt<7|38_*OREaktaqI1rgJMSncw8&r|NmdfvR1_<+i_BUy&ct%n*W7U-$bsj)>ye)Um(Zy>)Tx-25;9JZm{dm+rMSuM}Ey;95*h<-DYE8U|{fc L^>bP0l+XkKAIX{) literal 0 HcmV?d00001 diff --git a/gfx/pokemon/houndoom/front.png b/gfx/pokemon/houndoom/front.png new file mode 100644 index 0000000000000000000000000000000000000000..0a831573460a3e9cf642d1ca8aa8643158278fd7 GIT binary patch literal 1203 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@|NsC0lNr1e zdl(oPq`dl*85kH?N`m}?LE^a@Zj}rSEJ2@yr`@`__ldffz|U(lF2&n0)F>%e{b#OU!frO9bU~J4z4~37i#1KF#5$L(3~ej& z2`X?_e3Nup@N}lwzNrl5hVzfClFnP=8&SG-GE40ANnd0|T{Bhwi*63smTwd!wSud= zHX>{lm%#ZA(hEY>_g|ZBy8q0zOm3}@bK{)6*yjrDv)}WnGR#YMih|s-?hjLE32b`5 zdsDUP{EEE}Zx*bbeKI3+-__T(Ja>z_|8%(U?|QfP3G-tCrK~vpdfAP?{)L3FXsT}6 zF>gw+eL(67wzdt&K5Mks%UAKhaIvQ{m3QRi~y~iMmttqEN^^BcMagF#Rjhub$Wjj8`^SrZ? zV|cB*+6?oF6|I9M)9cXGG7QLDt|2;)neU+(y>_jscDGXIwX zn^)SdXs=)Xa?!b)0l&93nSu0!5zFXPw^ybM;+2Z>? z1ownT#%y_g<-Wzb4QWsNelB_F+iQL8P(XLeRO_-m2iHaKNM5DRJ^O0ij6IiTvFfe% zW_lfJxzy$4Q@$yac6ns>BzJnSm0$U#|53%>r+n#2*_fx#Ce2|J=DTFLbMdv~TZQIL zwJ3DgT)EOYa#G#Lor^;p_A<)*?GH2;dMKjTNh<4)_#|8+$r4Z&cta+d#(ni zzf-8w+5Dl+dP>m0N!BG#Mav_82;338^Kto3<%iDiUPM0AEbsZ;zk_)ZU(F%e3Hz07 zAMky#`m9)B6Bj_P;a@`7m*^Ir0n>jXcvE!V01ELpzh z@^jI0jhOPIvcE3xeAs8(9aDV#l=nf|!ap4E6xLbIFJ#ZO-x*)nZgn}Puzj15+Rnu< z&E6T*p1%`#Z0#XgKht>aqGszgUkvJE&37E;Q2e?3kNTZP|DDOI9ntRsxPDr{yRr13 zEC_DAC-_bk3ZdX^qlPRRPJVLz8?zEo*Ier|5Ve|Mfcy9S*3LFL}_13M1bC2)}L} zcK849c~d!cmVaNPlTdhXb5Y~b>hq^q#lG9Fj(Fek6;03m>LdF;eVO|E)Y|WBswM?} zpL+YX?B|}1@3psIw_X;w`i-{vb?ajrY_Ev!x^O4FPGHvWQ+L1iJ$a*Tzqb6yzE3y8 j9*eJ(4`kbPbFK;l0|SGntDnm{r-UW|9V%2R literal 0 HcmV?d00001 diff --git a/gfx/pokemon/houndoom/shiny.pal b/gfx/pokemon/houndoom/shiny.pal new file mode 100644 index 0000000..cf16faf --- /dev/null +++ b/gfx/pokemon/houndoom/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 18, 20 + RGB 08, 07, 20 + diff --git a/gfx/pokemon/houndour/anim.asm b/gfx/pokemon/houndour/anim.asm new file mode 100644 index 0000000..c9913e6 --- /dev/null +++ b/gfx/pokemon/houndour/anim.asm @@ -0,0 +1,6 @@ + frame 1, 05 + frame 2, 05 + frame 1, 05 + frame 0, 07 + frame 3, 07 + endanim diff --git a/gfx/pokemon/houndour/anim_idle.asm b/gfx/pokemon/houndour/anim_idle.asm new file mode 100644 index 0000000..9606f87 --- /dev/null +++ b/gfx/pokemon/houndour/anim_idle.asm @@ -0,0 +1,7 @@ + frame 0, 08 + setrepeat 2 + frame 3, 07 + frame 4, 07 + dorepeat 2 + frame 3, 16 + endanim diff --git a/gfx/pokemon/houndour/back.png b/gfx/pokemon/houndour/back.png new file mode 100644 index 0000000000000000000000000000000000000000..bcaf2c7ca460f64417a32743914fec0265821c53 GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|38_*& zdE3S?1_lO}k|4ieka(_!TO|Vn!xv8%$B>F!Z>Jm-YBAt&_Wtz${~q0tw_y%D-zG}( zm#Os!xJ3Ov&fm6S1$)FPrw@KVBGneK__%eczRWi)5coUsV2^UJ!^}R86T$LKGmczI zoHz4MRH}vXeny*Go&(p_=NB{Vo^|bo#EzGdSJfFJSZZqDJ$QM!u+%B)hWhn|{9)Xu zi+EFdk~m)kGKA=#VE?nXk)1)6dFtj1R|EMkn+8kdUHdn8S@cqaink`mS2yjmZgl5P zUwUq-*pu+yqmCywW!W-E9xmARI_9fcLfPq7?(9bkpB;1I`@V9vPsQua4{uCZus&OR r-K&J{6@NI26dM`McIuqS`@p!dg`-C&^4m!U1_lOCS3j3^P6V;V!`?~2QkLJ+swjCjTZByO z%1&Ws&js&z6${!qs%@A4Tm5fMqtbSsE9Z;f_4c@=uj|U6%{gJF_t!nmeg6YmLi|(z zoVZ&bvfi=cb>HQiU)p6;Ihvbq-4w6P@I89)=A~ubWh=`>n4gD>TRnQRE^VF1{lY|! zoUHI*<^I)PVp3sqUKD0@EPN~N@Ym4nfOm-M3gPlex-yDuXFJqx+{Qa^!KFiP|JzO# zB&430+~Q_mEHbxGY39@am+$JV4(0FZymE$hIm64a#eEXVv-)Oy-DSQs{$!C#@kOtU zV!1^+XAPu+bTQV#lvj##F8ueZs9#%zdF#(jRn?s} z-L}K0wp}1R`2NLNt5@{fIoBHe+q1~-LqS(=%dWm(6I8|Yd{^opm-xBnX2ARl5f2K# z?nnuWf0wl3YF|x%Ty{UX#Ln3tTgNSmj$7m%r}SJE1oi*Rn)V4j zlJfmy`|iqv_l5NzZPzLGo~@qaDV6;vvG%m;YxX_qH3x6q5#Rgz-3QxsY*I0M*8i-Y z^Lf(eN#f5{pD+D?%KHGXzT>$*?zk$b%RsJ+*OX7csCHX*O9&`YGkCiCxvXt<7|Nk7r+GGX> z28N~oL)I}cFtC&a`2~Z-b2Z#585kH_JY5_^DsJta8aeHV0*7ns_W!oqeYm82UoAho zlIPbt1*NOE>P;W)UEU+~aBaHmy2sJSnFCm&k2lYo%y34Z;q=iJ2WB?B>~+ZhRLAUe zpYuggxWli?kDb0(?0xd>B$d9aY6Q>Qx63WWpjOd^sY~CBVP(JAQ7;wSiLXy8zC6gp zv)6w+)3-A$skND%4qR(kJM9#QYb>}L|~w{C*E!}3z*-dh{3)RNvb nvp!!G|4;hn_m{>E-zK-(D=+2XuQzFw2gQ@8tDnm{r-UW|!iU$Q literal 0 HcmV?d00001 diff --git a/gfx/pokemon/hypno/front.png b/gfx/pokemon/hypno/front.png new file mode 100644 index 0000000000000000000000000000000000000000..64c844425fef3e1cabdedf9c27afc253c6abe4c7 GIT binary patch literal 1173 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsC0&oQh` zW?*1oSo%K%B+gP2V`nUt;vag?aJNo^&6)fdrRN?H=vRmh3w*Ig)!FNKws&%D(wsYg7EcILXW6tjJ@;yA_w~>J+OGe< z9<)#L%EZR|i@rXHOD?>=GGu>6&?$v`sY~Pn{|2o*C$IP8`iAp9(<>J3xfi(q+3Q{0 zx&aEDt-Jl?!zR}5N=V$TvQ((wNwDI!L{sqXU2Xg;1P@mo4!ve(bv!cSwf@re8$Kj& ze_ET>vf-e6;55f}?V|;PVyeq^wp4_q2mfA@V%V#8SK)Sa@TEHjiWB!MsTOwjF{kHm zVCOVBf3rCzT5F$j@4H88Qv^2O*PHz2W@56cQ0dNZTeJe1?j8I0%4F)aJDlq-&+eW5 z$MBq!U$4MB4lk>-i^|q~ z74KJ;Pqtf+t#u8tKlJ;`50k47YX8&q#14Oz+reAmcjf8w9u3vcM{4K25<0r)#;X*c zr(ff<)n+})P%b`wcdNkN6AS#8KEIS`Z05Ps^1?>-t^uT z(dG+L|5chPGyi0<*!tKc@5u`b=XYJ-xK7)!XQ9$gzBSF;SZ@Div}vDr?%0vw#IGFB z*nF*foaRv(?rda~<9=7c z-mh7n({Ox_^$%H)7*oI6oM(3q7Js;)c`Ch6v;2dIP01^z)jzo3&1gElHH2;IR-0va z44L`Qy=OJ|>12O5qp|(y-pTV$*jiP;o6*SrNu&DNmOF~4*PM|xdE^}bEc}ik$Hdr_ z_}t?5bsZ11rDO`+pG{qK`zc?);rfr~?;QNw<=!6uR<^L+_T}qO!tXA8H8vI4a9Z}4 z%&w<*e?n|0lm`yWrqcK_`Qe>dZOc}~IclKsi;)@i?G zqwg5ret+X}-_5$?dgVR8WoO?x7{Al`{v+=473Oyt)$b(oB+6Ml;ERt}Ha=`t{)K1b zd0AU$nF9Cxj}6vSSd5%y3frHa4GxVfI-VUGS9qMyj-?zO{>i`7c>cF+&7S)UeNR6x z*njvKM!RZ?zLkfqzq4?nP9>||t@jsng_iP8NxdspE^^CYzTBJgC$ijAN{{H3 zFZd^T?_nMLwywegcT_m%eMb6Ei~Aoxf0o_H_CNi(^@~3>?8VwP7WXFxl*FGa|Iq$f t_EpK*=lsvDFT5{5^0V&&6vh`Hmp_?dFzYePlS`m-#naW#Wt~$(6972ALiGRu literal 0 HcmV?d00001 diff --git a/gfx/pokemon/hypno/shiny.pal b/gfx/pokemon/hypno/shiny.pal new file mode 100644 index 0000000..51f1460 --- /dev/null +++ b/gfx/pokemon/hypno/shiny.pal @@ -0,0 +1,4 @@ + + RGB 30, 09, 25 + RGB 18, 10, 13 + diff --git a/gfx/pokemon/idle_pointers.asm b/gfx/pokemon/idle_pointers.asm new file mode 100644 index 0000000..d7bc28f --- /dev/null +++ b/gfx/pokemon/idle_pointers.asm @@ -0,0 +1,254 @@ +AnimationIdlePointers: + table_width 2, AnimationIdlePointers + dw BulbasaurAnimationIdle + dw IvysaurAnimationIdle + dw VenusaurAnimationIdle + dw CharmanderAnimationIdle + dw CharmeleonAnimationIdle + dw CharizardAnimationIdle + dw SquirtleAnimationIdle + dw WartortleAnimationIdle + dw BlastoiseAnimationIdle + dw CaterpieAnimationIdle + dw MetapodAnimationIdle + dw ButterfreeAnimationIdle + dw WeedleAnimationIdle + dw KakunaAnimationIdle + dw BeedrillAnimationIdle + dw PidgeyAnimationIdle + dw PidgeottoAnimationIdle + dw PidgeotAnimationIdle + dw RattataAnimationIdle + dw RaticateAnimationIdle + dw SpearowAnimationIdle + dw FearowAnimationIdle + dw EkansAnimationIdle + dw ArbokAnimationIdle + dw PikachuAnimationIdle + dw RaichuAnimationIdle + dw SandshrewAnimationIdle + dw SandslashAnimationIdle + dw NidoranFAnimationIdle + dw NidorinaAnimationIdle + dw NidoqueenAnimationIdle + dw NidoranMAnimationIdle + dw NidorinoAnimationIdle + dw NidokingAnimationIdle + dw ClefairyAnimationIdle + dw ClefableAnimationIdle + dw VulpixAnimationIdle + dw NinetalesAnimationIdle + dw JigglypuffAnimationIdle + dw WigglytuffAnimationIdle + dw ZubatAnimationIdle + dw GolbatAnimationIdle + dw OddishAnimationIdle + dw GloomAnimationIdle + dw VileplumeAnimationIdle + dw ParasAnimationIdle + dw ParasectAnimationIdle + dw VenonatAnimationIdle + dw VenomothAnimationIdle + dw DiglettAnimationIdle + dw DugtrioAnimationIdle + dw MeowthAnimationIdle + dw PersianAnimationIdle + dw PsyduckAnimationIdle + dw GolduckAnimationIdle + dw MankeyAnimationIdle + dw PrimeapeAnimationIdle + dw GrowlitheAnimationIdle + dw ArcanineAnimationIdle + dw PoliwagAnimationIdle + dw PoliwhirlAnimationIdle + dw PoliwrathAnimationIdle + dw AbraAnimationIdle + dw KadabraAnimationIdle + dw AlakazamAnimationIdle + dw MachopAnimationIdle + dw MachokeAnimationIdle + dw MachampAnimationIdle + dw BellsproutAnimationIdle + dw WeepinbellAnimationIdle + dw VictreebelAnimationIdle + dw TentacoolAnimationIdle + dw TentacruelAnimationIdle + dw GeodudeAnimationIdle + dw GravelerAnimationIdle + dw GolemAnimationIdle + dw PonytaAnimationIdle + dw RapidashAnimationIdle + dw SlowpokeAnimationIdle + dw SlowbroAnimationIdle + dw MagnemiteAnimationIdle + dw MagnetonAnimationIdle + dw FarfetchDAnimationIdle + dw DoduoAnimationIdle + dw DodrioAnimationIdle + dw SeelAnimationIdle + dw DewgongAnimationIdle + dw GrimerAnimationIdle + dw MukAnimationIdle + dw ShellderAnimationIdle + dw CloysterAnimationIdle + dw GastlyAnimationIdle + dw HaunterAnimationIdle + dw GengarAnimationIdle + dw OnixAnimationIdle + dw DrowzeeAnimationIdle + dw HypnoAnimationIdle + dw KrabbyAnimationIdle + dw KinglerAnimationIdle + dw VoltorbAnimationIdle + dw ElectrodeAnimationIdle + dw ExeggcuteAnimationIdle + dw ExeggutorAnimationIdle + dw CuboneAnimationIdle + dw MarowakAnimationIdle + dw HitmonleeAnimationIdle + dw HitmonchanAnimationIdle + dw LickitungAnimationIdle + dw KoffingAnimationIdle + dw WeezingAnimationIdle + dw RhyhornAnimationIdle + dw RhydonAnimationIdle + dw ChanseyAnimationIdle + dw TangelaAnimationIdle + dw KangaskhanAnimationIdle + dw HorseaAnimationIdle + dw SeadraAnimationIdle + dw GoldeenAnimationIdle + dw SeakingAnimationIdle + dw StaryuAnimationIdle + dw StarmieAnimationIdle + dw MrMimeAnimationIdle + dw ScytherAnimationIdle + dw JynxAnimationIdle + dw ElectabuzzAnimationIdle + dw MagmarAnimationIdle + dw PinsirAnimationIdle + dw TaurosAnimationIdle + dw MagikarpAnimationIdle + dw GyaradosAnimationIdle + dw LaprasAnimationIdle + dw DittoAnimationIdle + dw EeveeAnimationIdle + dw VaporeonAnimationIdle + dw JolteonAnimationIdle + dw FlareonAnimationIdle + dw PorygonAnimationIdle + dw OmanyteAnimationIdle + dw OmastarAnimationIdle + dw KabutoAnimationIdle + dw KabutopsAnimationIdle + dw AerodactylAnimationIdle + dw SnorlaxAnimationIdle + dw ArticunoAnimationIdle + dw ZapdosAnimationIdle + dw MoltresAnimationIdle + dw DratiniAnimationIdle + dw DragonairAnimationIdle + dw DragoniteAnimationIdle + dw MewtwoAnimationIdle + dw MewAnimationIdle + dw ChikoritaAnimationIdle + dw BayleefAnimationIdle + dw MeganiumAnimationIdle + dw CyndaquilAnimationIdle + dw QuilavaAnimationIdle + dw TyphlosionAnimationIdle + dw TotodileAnimationIdle + dw CroconawAnimationIdle + dw FeraligatrAnimationIdle + dw SentretAnimationIdle + dw FurretAnimationIdle + dw HoothootAnimationIdle + dw NoctowlAnimationIdle + dw LedybaAnimationIdle + dw LedianAnimationIdle + dw SpinarakAnimationIdle + dw AriadosAnimationIdle + dw CrobatAnimationIdle + dw ChinchouAnimationIdle + dw LanturnAnimationIdle + dw PichuAnimationIdle + dw CleffaAnimationIdle + dw IgglybuffAnimationIdle + dw TogepiAnimationIdle + dw TogeticAnimationIdle + dw NatuAnimationIdle + dw XatuAnimationIdle + dw MareepAnimationIdle + dw FlaaffyAnimationIdle + dw AmpharosAnimationIdle + dw BellossomAnimationIdle + dw MarillAnimationIdle + dw AzumarillAnimationIdle + dw SudowoodoAnimationIdle + dw PolitoedAnimationIdle + dw HoppipAnimationIdle + dw SkiploomAnimationIdle + dw JumpluffAnimationIdle + dw AipomAnimationIdle + dw SunkernAnimationIdle + dw SunfloraAnimationIdle + dw YanmaAnimationIdle + dw WooperAnimationIdle + dw QuagsireAnimationIdle + dw EspeonAnimationIdle + dw UmbreonAnimationIdle + dw MurkrowAnimationIdle + dw SlowkingAnimationIdle + dw MisdreavusAnimationIdle + dw UnownAnimationIdle + dw WobbuffetAnimationIdle + dw GirafarigAnimationIdle + dw PinecoAnimationIdle + dw ForretressAnimationIdle + dw DunsparceAnimationIdle + dw GligarAnimationIdle + dw SteelixAnimationIdle + dw SnubbullAnimationIdle + dw GranbullAnimationIdle + dw QwilfishAnimationIdle + dw ScizorAnimationIdle + dw ShuckleAnimationIdle + dw HeracrossAnimationIdle + dw SneaselAnimationIdle + dw TeddiursaAnimationIdle + dw UrsaringAnimationIdle + dw SlugmaAnimationIdle + dw MagcargoAnimationIdle + dw SwinubAnimationIdle + dw PiloswineAnimationIdle + dw CorsolaAnimationIdle + dw RemoraidAnimationIdle + dw OctilleryAnimationIdle + dw DelibirdAnimationIdle + dw MantineAnimationIdle + dw SkarmoryAnimationIdle + dw HoundourAnimationIdle + dw HoundoomAnimationIdle + dw KingdraAnimationIdle + dw PhanpyAnimationIdle + dw DonphanAnimationIdle + dw Porygon2AnimationIdle + dw StantlerAnimationIdle + dw SmeargleAnimationIdle + dw TyrogueAnimationIdle + dw HitmontopAnimationIdle + dw SmoochumAnimationIdle + dw ElekidAnimationIdle + dw MagbyAnimationIdle + dw MiltankAnimationIdle + dw BlisseyAnimationIdle + dw RaikouAnimationIdle + dw EnteiAnimationIdle + dw SuicuneAnimationIdle + dw LarvitarAnimationIdle + dw PupitarAnimationIdle + dw TyranitarAnimationIdle + dw LugiaAnimationIdle + dw HoOhAnimationIdle + dw CelebiAnimationIdle + assert_table_length NUM_POKEMON diff --git a/gfx/pokemon/idles.asm b/gfx/pokemon/idles.asm new file mode 100644 index 0000000..952aae2 --- /dev/null +++ b/gfx/pokemon/idles.asm @@ -0,0 +1,252 @@ +BulbasaurAnimationIdle: INCLUDE "gfx/pokemon/bulbasaur/anim_idle.asm" +IvysaurAnimationIdle: INCLUDE "gfx/pokemon/ivysaur/anim_idle.asm" +VenusaurAnimationIdle: INCLUDE "gfx/pokemon/venusaur/anim_idle.asm" +CharmanderAnimationIdle: INCLUDE "gfx/pokemon/charmander/anim_idle.asm" +CharmeleonAnimationIdle: INCLUDE "gfx/pokemon/charmeleon/anim_idle.asm" +CharizardAnimationIdle: INCLUDE "gfx/pokemon/charizard/anim_idle.asm" +SquirtleAnimationIdle: INCLUDE "gfx/pokemon/squirtle/anim_idle.asm" +WartortleAnimationIdle: INCLUDE "gfx/pokemon/wartortle/anim_idle.asm" +BlastoiseAnimationIdle: INCLUDE "gfx/pokemon/blastoise/anim_idle.asm" +CaterpieAnimationIdle: INCLUDE "gfx/pokemon/caterpie/anim_idle.asm" +MetapodAnimationIdle: INCLUDE "gfx/pokemon/metapod/anim_idle.asm" +ButterfreeAnimationIdle: INCLUDE "gfx/pokemon/butterfree/anim_idle.asm" +WeedleAnimationIdle: INCLUDE "gfx/pokemon/weedle/anim_idle.asm" +KakunaAnimationIdle: INCLUDE "gfx/pokemon/kakuna/anim_idle.asm" +BeedrillAnimationIdle: INCLUDE "gfx/pokemon/beedrill/anim_idle.asm" +PidgeyAnimationIdle: INCLUDE "gfx/pokemon/pidgey/anim_idle.asm" +PidgeottoAnimationIdle: INCLUDE "gfx/pokemon/pidgeotto/anim_idle.asm" +PidgeotAnimationIdle: INCLUDE "gfx/pokemon/pidgeot/anim_idle.asm" +RattataAnimationIdle: INCLUDE "gfx/pokemon/rattata/anim_idle.asm" +RaticateAnimationIdle: INCLUDE "gfx/pokemon/raticate/anim_idle.asm" +SpearowAnimationIdle: INCLUDE "gfx/pokemon/spearow/anim_idle.asm" +FearowAnimationIdle: INCLUDE "gfx/pokemon/fearow/anim_idle.asm" +EkansAnimationIdle: INCLUDE "gfx/pokemon/ekans/anim_idle.asm" +ArbokAnimationIdle: INCLUDE "gfx/pokemon/arbok/anim_idle.asm" +PikachuAnimationIdle: INCLUDE "gfx/pokemon/pikachu/anim_idle.asm" +RaichuAnimationIdle: INCLUDE "gfx/pokemon/raichu/anim_idle.asm" +SandshrewAnimationIdle: INCLUDE "gfx/pokemon/sandshrew/anim_idle.asm" +SandslashAnimationIdle: INCLUDE "gfx/pokemon/sandslash/anim_idle.asm" +NidoranFAnimationIdle: INCLUDE "gfx/pokemon/nidoran_f/anim_idle.asm" +NidorinaAnimationIdle: INCLUDE "gfx/pokemon/nidorina/anim_idle.asm" +NidoqueenAnimationIdle: INCLUDE "gfx/pokemon/nidoqueen/anim_idle.asm" +NidoranMAnimationIdle: INCLUDE "gfx/pokemon/nidoran_m/anim_idle.asm" +NidorinoAnimationIdle: INCLUDE "gfx/pokemon/nidorino/anim_idle.asm" +NidokingAnimationIdle: INCLUDE "gfx/pokemon/nidoking/anim_idle.asm" +ClefairyAnimationIdle: INCLUDE "gfx/pokemon/clefairy/anim_idle.asm" +ClefableAnimationIdle: INCLUDE "gfx/pokemon/clefable/anim_idle.asm" +VulpixAnimationIdle: INCLUDE "gfx/pokemon/vulpix/anim_idle.asm" +NinetalesAnimationIdle: INCLUDE "gfx/pokemon/ninetales/anim_idle.asm" +JigglypuffAnimationIdle: INCLUDE "gfx/pokemon/jigglypuff/anim_idle.asm" +WigglytuffAnimationIdle: INCLUDE "gfx/pokemon/wigglytuff/anim_idle.asm" +ZubatAnimationIdle: INCLUDE "gfx/pokemon/zubat/anim_idle.asm" +GolbatAnimationIdle: INCLUDE "gfx/pokemon/golbat/anim_idle.asm" +OddishAnimationIdle: INCLUDE "gfx/pokemon/oddish/anim_idle.asm" +GloomAnimationIdle: INCLUDE "gfx/pokemon/gloom/anim_idle.asm" +VileplumeAnimationIdle: INCLUDE "gfx/pokemon/vileplume/anim_idle.asm" +ParasAnimationIdle: INCLUDE "gfx/pokemon/paras/anim_idle.asm" +ParasectAnimationIdle: INCLUDE "gfx/pokemon/parasect/anim_idle.asm" +VenonatAnimationIdle: INCLUDE "gfx/pokemon/venonat/anim_idle.asm" +VenomothAnimationIdle: INCLUDE "gfx/pokemon/venomoth/anim_idle.asm" +DiglettAnimationIdle: INCLUDE "gfx/pokemon/diglett/anim_idle.asm" +DugtrioAnimationIdle: INCLUDE "gfx/pokemon/dugtrio/anim_idle.asm" +MeowthAnimationIdle: INCLUDE "gfx/pokemon/meowth/anim_idle.asm" +PersianAnimationIdle: INCLUDE "gfx/pokemon/persian/anim_idle.asm" +PsyduckAnimationIdle: INCLUDE "gfx/pokemon/psyduck/anim_idle.asm" +GolduckAnimationIdle: INCLUDE "gfx/pokemon/golduck/anim_idle.asm" +MankeyAnimationIdle: INCLUDE "gfx/pokemon/mankey/anim_idle.asm" +PrimeapeAnimationIdle: INCLUDE "gfx/pokemon/primeape/anim_idle.asm" +GrowlitheAnimationIdle: INCLUDE "gfx/pokemon/growlithe/anim_idle.asm" +ArcanineAnimationIdle: INCLUDE "gfx/pokemon/arcanine/anim_idle.asm" +PoliwagAnimationIdle: INCLUDE "gfx/pokemon/poliwag/anim_idle.asm" +PoliwhirlAnimationIdle: INCLUDE "gfx/pokemon/poliwhirl/anim_idle.asm" +PoliwrathAnimationIdle: INCLUDE "gfx/pokemon/poliwrath/anim_idle.asm" +AbraAnimationIdle: INCLUDE "gfx/pokemon/abra/anim_idle.asm" +KadabraAnimationIdle: INCLUDE "gfx/pokemon/kadabra/anim_idle.asm" +AlakazamAnimationIdle: INCLUDE "gfx/pokemon/alakazam/anim_idle.asm" +MachopAnimationIdle: INCLUDE "gfx/pokemon/machop/anim_idle.asm" +MachokeAnimationIdle: INCLUDE "gfx/pokemon/machoke/anim_idle.asm" +MachampAnimationIdle: INCLUDE "gfx/pokemon/machamp/anim_idle.asm" +BellsproutAnimationIdle: INCLUDE "gfx/pokemon/bellsprout/anim_idle.asm" +WeepinbellAnimationIdle: INCLUDE "gfx/pokemon/weepinbell/anim_idle.asm" +VictreebelAnimationIdle: INCLUDE "gfx/pokemon/victreebel/anim_idle.asm" +TentacoolAnimationIdle: INCLUDE "gfx/pokemon/tentacool/anim_idle.asm" +TentacruelAnimationIdle: INCLUDE "gfx/pokemon/tentacruel/anim_idle.asm" +GeodudeAnimationIdle: INCLUDE "gfx/pokemon/geodude/anim_idle.asm" +GravelerAnimationIdle: INCLUDE "gfx/pokemon/graveler/anim_idle.asm" +GolemAnimationIdle: INCLUDE "gfx/pokemon/golem/anim_idle.asm" +PonytaAnimationIdle: INCLUDE "gfx/pokemon/ponyta/anim_idle.asm" +RapidashAnimationIdle: INCLUDE "gfx/pokemon/rapidash/anim_idle.asm" +SlowpokeAnimationIdle: INCLUDE "gfx/pokemon/slowpoke/anim_idle.asm" +SlowbroAnimationIdle: INCLUDE "gfx/pokemon/slowbro/anim_idle.asm" +MagnemiteAnimationIdle: INCLUDE "gfx/pokemon/magnemite/anim_idle.asm" +MagnetonAnimationIdle: INCLUDE "gfx/pokemon/magneton/anim_idle.asm" +FarfetchDAnimationIdle: INCLUDE "gfx/pokemon/farfetch_d/anim_idle.asm" +DoduoAnimationIdle: INCLUDE "gfx/pokemon/doduo/anim_idle.asm" +DodrioAnimationIdle: INCLUDE "gfx/pokemon/dodrio/anim_idle.asm" +SeelAnimationIdle: INCLUDE "gfx/pokemon/seel/anim_idle.asm" +DewgongAnimationIdle: INCLUDE "gfx/pokemon/dewgong/anim_idle.asm" +GrimerAnimationIdle: INCLUDE "gfx/pokemon/grimer/anim_idle.asm" +MukAnimationIdle: INCLUDE "gfx/pokemon/muk/anim_idle.asm" +ShellderAnimationIdle: INCLUDE "gfx/pokemon/shellder/anim_idle.asm" +CloysterAnimationIdle: INCLUDE "gfx/pokemon/cloyster/anim_idle.asm" +GastlyAnimationIdle: INCLUDE "gfx/pokemon/gastly/anim_idle.asm" +HaunterAnimationIdle: INCLUDE "gfx/pokemon/haunter/anim_idle.asm" +GengarAnimationIdle: INCLUDE "gfx/pokemon/gengar/anim_idle.asm" +OnixAnimationIdle: INCLUDE "gfx/pokemon/onix/anim_idle.asm" +DrowzeeAnimationIdle: INCLUDE "gfx/pokemon/drowzee/anim_idle.asm" +HypnoAnimationIdle: INCLUDE "gfx/pokemon/hypno/anim_idle.asm" +KrabbyAnimationIdle: INCLUDE "gfx/pokemon/krabby/anim_idle.asm" +KinglerAnimationIdle: INCLUDE "gfx/pokemon/kingler/anim_idle.asm" +VoltorbAnimationIdle: INCLUDE "gfx/pokemon/voltorb/anim_idle.asm" +ElectrodeAnimationIdle: INCLUDE "gfx/pokemon/electrode/anim_idle.asm" +ExeggcuteAnimationIdle: INCLUDE "gfx/pokemon/exeggcute/anim_idle.asm" +ExeggutorAnimationIdle: INCLUDE "gfx/pokemon/exeggutor/anim_idle.asm" +CuboneAnimationIdle: INCLUDE "gfx/pokemon/cubone/anim_idle.asm" +MarowakAnimationIdle: INCLUDE "gfx/pokemon/marowak/anim_idle.asm" +HitmonleeAnimationIdle: INCLUDE "gfx/pokemon/hitmonlee/anim_idle.asm" +HitmonchanAnimationIdle: INCLUDE "gfx/pokemon/hitmonchan/anim_idle.asm" +LickitungAnimationIdle: INCLUDE "gfx/pokemon/lickitung/anim_idle.asm" +KoffingAnimationIdle: INCLUDE "gfx/pokemon/koffing/anim_idle.asm" +WeezingAnimationIdle: INCLUDE "gfx/pokemon/weezing/anim_idle.asm" +RhyhornAnimationIdle: INCLUDE "gfx/pokemon/rhyhorn/anim_idle.asm" +RhydonAnimationIdle: INCLUDE "gfx/pokemon/rhydon/anim_idle.asm" +ChanseyAnimationIdle: INCLUDE "gfx/pokemon/chansey/anim_idle.asm" +TangelaAnimationIdle: INCLUDE "gfx/pokemon/tangela/anim_idle.asm" +KangaskhanAnimationIdle: INCLUDE "gfx/pokemon/kangaskhan/anim_idle.asm" +HorseaAnimationIdle: INCLUDE "gfx/pokemon/horsea/anim_idle.asm" +SeadraAnimationIdle: INCLUDE "gfx/pokemon/seadra/anim_idle.asm" +GoldeenAnimationIdle: INCLUDE "gfx/pokemon/goldeen/anim_idle.asm" +SeakingAnimationIdle: INCLUDE "gfx/pokemon/seaking/anim_idle.asm" +StaryuAnimationIdle: INCLUDE "gfx/pokemon/staryu/anim_idle.asm" +StarmieAnimationIdle: INCLUDE "gfx/pokemon/starmie/anim_idle.asm" +MrMimeAnimationIdle: INCLUDE "gfx/pokemon/mr__mime/anim_idle.asm" +ScytherAnimationIdle: INCLUDE "gfx/pokemon/scyther/anim_idle.asm" +JynxAnimationIdle: INCLUDE "gfx/pokemon/jynx/anim_idle.asm" +ElectabuzzAnimationIdle: INCLUDE "gfx/pokemon/electabuzz/anim_idle.asm" +MagmarAnimationIdle: INCLUDE "gfx/pokemon/magmar/anim_idle.asm" +PinsirAnimationIdle: INCLUDE "gfx/pokemon/pinsir/anim_idle.asm" +TaurosAnimationIdle: INCLUDE "gfx/pokemon/tauros/anim_idle.asm" +MagikarpAnimationIdle: INCLUDE "gfx/pokemon/magikarp/anim_idle.asm" +GyaradosAnimationIdle: INCLUDE "gfx/pokemon/gyarados/anim_idle.asm" +LaprasAnimationIdle: INCLUDE "gfx/pokemon/lapras/anim_idle.asm" +DittoAnimationIdle: INCLUDE "gfx/pokemon/ditto/anim_idle.asm" +EeveeAnimationIdle: INCLUDE "gfx/pokemon/eevee/anim_idle.asm" +VaporeonAnimationIdle: INCLUDE "gfx/pokemon/vaporeon/anim_idle.asm" +JolteonAnimationIdle: INCLUDE "gfx/pokemon/jolteon/anim_idle.asm" +FlareonAnimationIdle: INCLUDE "gfx/pokemon/flareon/anim_idle.asm" +PorygonAnimationIdle: INCLUDE "gfx/pokemon/porygon/anim_idle.asm" +OmanyteAnimationIdle: INCLUDE "gfx/pokemon/omanyte/anim_idle.asm" +OmastarAnimationIdle: INCLUDE "gfx/pokemon/omastar/anim_idle.asm" +KabutoAnimationIdle: INCLUDE "gfx/pokemon/kabuto/anim_idle.asm" +KabutopsAnimationIdle: INCLUDE "gfx/pokemon/kabutops/anim_idle.asm" +AerodactylAnimationIdle: INCLUDE "gfx/pokemon/aerodactyl/anim_idle.asm" +SnorlaxAnimationIdle: INCLUDE "gfx/pokemon/snorlax/anim_idle.asm" +ArticunoAnimationIdle: INCLUDE "gfx/pokemon/articuno/anim_idle.asm" +ZapdosAnimationIdle: INCLUDE "gfx/pokemon/zapdos/anim_idle.asm" +MoltresAnimationIdle: INCLUDE "gfx/pokemon/moltres/anim_idle.asm" +DratiniAnimationIdle: INCLUDE "gfx/pokemon/dratini/anim_idle.asm" +DragonairAnimationIdle: INCLUDE "gfx/pokemon/dragonair/anim_idle.asm" +DragoniteAnimationIdle: INCLUDE "gfx/pokemon/dragonite/anim_idle.asm" +MewtwoAnimationIdle: INCLUDE "gfx/pokemon/mewtwo/anim_idle.asm" +MewAnimationIdle: INCLUDE "gfx/pokemon/mew/anim_idle.asm" +ChikoritaAnimationIdle: INCLUDE "gfx/pokemon/chikorita/anim_idle.asm" +BayleefAnimationIdle: INCLUDE "gfx/pokemon/bayleef/anim_idle.asm" +MeganiumAnimationIdle: INCLUDE "gfx/pokemon/meganium/anim_idle.asm" +CyndaquilAnimationIdle: INCLUDE "gfx/pokemon/cyndaquil/anim_idle.asm" +QuilavaAnimationIdle: INCLUDE "gfx/pokemon/quilava/anim_idle.asm" +TyphlosionAnimationIdle: INCLUDE "gfx/pokemon/typhlosion/anim_idle.asm" +TotodileAnimationIdle: INCLUDE "gfx/pokemon/totodile/anim_idle.asm" +CroconawAnimationIdle: INCLUDE "gfx/pokemon/croconaw/anim_idle.asm" +FeraligatrAnimationIdle: INCLUDE "gfx/pokemon/feraligatr/anim_idle.asm" +SentretAnimationIdle: INCLUDE "gfx/pokemon/sentret/anim_idle.asm" +FurretAnimationIdle: INCLUDE "gfx/pokemon/furret/anim_idle.asm" +HoothootAnimationIdle: INCLUDE "gfx/pokemon/hoothoot/anim_idle.asm" +NoctowlAnimationIdle: INCLUDE "gfx/pokemon/noctowl/anim_idle.asm" +LedybaAnimationIdle: INCLUDE "gfx/pokemon/ledyba/anim_idle.asm" +LedianAnimationIdle: INCLUDE "gfx/pokemon/ledian/anim_idle.asm" +SpinarakAnimationIdle: INCLUDE "gfx/pokemon/spinarak/anim_idle.asm" +AriadosAnimationIdle: INCLUDE "gfx/pokemon/ariados/anim_idle.asm" +CrobatAnimationIdle: INCLUDE "gfx/pokemon/crobat/anim_idle.asm" +ChinchouAnimationIdle: INCLUDE "gfx/pokemon/chinchou/anim_idle.asm" +LanturnAnimationIdle: INCLUDE "gfx/pokemon/lanturn/anim_idle.asm" +PichuAnimationIdle: INCLUDE "gfx/pokemon/pichu/anim_idle.asm" +CleffaAnimationIdle: INCLUDE "gfx/pokemon/cleffa/anim_idle.asm" +IgglybuffAnimationIdle: INCLUDE "gfx/pokemon/igglybuff/anim_idle.asm" +TogepiAnimationIdle: INCLUDE "gfx/pokemon/togepi/anim_idle.asm" +TogeticAnimationIdle: INCLUDE "gfx/pokemon/togetic/anim_idle.asm" +NatuAnimationIdle: INCLUDE "gfx/pokemon/natu/anim_idle.asm" +XatuAnimationIdle: INCLUDE "gfx/pokemon/xatu/anim_idle.asm" +MareepAnimationIdle: INCLUDE "gfx/pokemon/mareep/anim_idle.asm" +FlaaffyAnimationIdle: INCLUDE "gfx/pokemon/flaaffy/anim_idle.asm" +AmpharosAnimationIdle: INCLUDE "gfx/pokemon/ampharos/anim_idle.asm" +BellossomAnimationIdle: INCLUDE "gfx/pokemon/bellossom/anim_idle.asm" +MarillAnimationIdle: INCLUDE "gfx/pokemon/marill/anim_idle.asm" +AzumarillAnimationIdle: INCLUDE "gfx/pokemon/azumarill/anim_idle.asm" +SudowoodoAnimationIdle: INCLUDE "gfx/pokemon/sudowoodo/anim_idle.asm" +PolitoedAnimationIdle: INCLUDE "gfx/pokemon/politoed/anim_idle.asm" +HoppipAnimationIdle: INCLUDE "gfx/pokemon/hoppip/anim_idle.asm" +SkiploomAnimationIdle: INCLUDE "gfx/pokemon/skiploom/anim_idle.asm" +JumpluffAnimationIdle: INCLUDE "gfx/pokemon/jumpluff/anim_idle.asm" +AipomAnimationIdle: INCLUDE "gfx/pokemon/aipom/anim_idle.asm" +SunkernAnimationIdle: INCLUDE "gfx/pokemon/sunkern/anim_idle.asm" +SunfloraAnimationIdle: INCLUDE "gfx/pokemon/sunflora/anim_idle.asm" +YanmaAnimationIdle: INCLUDE "gfx/pokemon/yanma/anim_idle.asm" +WooperAnimationIdle: INCLUDE "gfx/pokemon/wooper/anim_idle.asm" +QuagsireAnimationIdle: INCLUDE "gfx/pokemon/quagsire/anim_idle.asm" +EspeonAnimationIdle: INCLUDE "gfx/pokemon/espeon/anim_idle.asm" +UmbreonAnimationIdle: INCLUDE "gfx/pokemon/umbreon/anim_idle.asm" +MurkrowAnimationIdle: INCLUDE "gfx/pokemon/murkrow/anim_idle.asm" +SlowkingAnimationIdle: INCLUDE "gfx/pokemon/slowking/anim_idle.asm" +MisdreavusAnimationIdle: INCLUDE "gfx/pokemon/misdreavus/anim_idle.asm" +UnownAnimationIdle: INCLUDE "gfx/pokemon/unown/anim_idle.asm" +WobbuffetAnimationIdle: INCLUDE "gfx/pokemon/wobbuffet/anim_idle.asm" +GirafarigAnimationIdle: INCLUDE "gfx/pokemon/girafarig/anim_idle.asm" +PinecoAnimationIdle: INCLUDE "gfx/pokemon/pineco/anim_idle.asm" +ForretressAnimationIdle: INCLUDE "gfx/pokemon/forretress/anim_idle.asm" +DunsparceAnimationIdle: INCLUDE "gfx/pokemon/dunsparce/anim_idle.asm" +GligarAnimationIdle: INCLUDE "gfx/pokemon/gligar/anim_idle.asm" +SteelixAnimationIdle: INCLUDE "gfx/pokemon/steelix/anim_idle.asm" +SnubbullAnimationIdle: INCLUDE "gfx/pokemon/snubbull/anim_idle.asm" +GranbullAnimationIdle: INCLUDE "gfx/pokemon/granbull/anim_idle.asm" +QwilfishAnimationIdle: INCLUDE "gfx/pokemon/qwilfish/anim_idle.asm" +ScizorAnimationIdle: INCLUDE "gfx/pokemon/scizor/anim_idle.asm" +ShuckleAnimationIdle: INCLUDE "gfx/pokemon/shuckle/anim_idle.asm" +HeracrossAnimationIdle: INCLUDE "gfx/pokemon/heracross/anim_idle.asm" +SneaselAnimationIdle: INCLUDE "gfx/pokemon/sneasel/anim_idle.asm" +TeddiursaAnimationIdle: INCLUDE "gfx/pokemon/teddiursa/anim_idle.asm" +UrsaringAnimationIdle: INCLUDE "gfx/pokemon/ursaring/anim_idle.asm" +SlugmaAnimationIdle: INCLUDE "gfx/pokemon/slugma/anim_idle.asm" +MagcargoAnimationIdle: INCLUDE "gfx/pokemon/magcargo/anim_idle.asm" +SwinubAnimationIdle: INCLUDE "gfx/pokemon/swinub/anim_idle.asm" +PiloswineAnimationIdle: INCLUDE "gfx/pokemon/piloswine/anim_idle.asm" +CorsolaAnimationIdle: INCLUDE "gfx/pokemon/corsola/anim_idle.asm" +RemoraidAnimationIdle: INCLUDE "gfx/pokemon/remoraid/anim_idle.asm" +OctilleryAnimationIdle: INCLUDE "gfx/pokemon/octillery/anim_idle.asm" +DelibirdAnimationIdle: INCLUDE "gfx/pokemon/delibird/anim_idle.asm" +MantineAnimationIdle: INCLUDE "gfx/pokemon/mantine/anim_idle.asm" +SkarmoryAnimationIdle: INCLUDE "gfx/pokemon/skarmory/anim_idle.asm" +HoundourAnimationIdle: INCLUDE "gfx/pokemon/houndour/anim_idle.asm" +HoundoomAnimationIdle: INCLUDE "gfx/pokemon/houndoom/anim_idle.asm" +KingdraAnimationIdle: INCLUDE "gfx/pokemon/kingdra/anim_idle.asm" +PhanpyAnimationIdle: INCLUDE "gfx/pokemon/phanpy/anim_idle.asm" +DonphanAnimationIdle: INCLUDE "gfx/pokemon/donphan/anim_idle.asm" +Porygon2AnimationIdle: INCLUDE "gfx/pokemon/porygon2/anim_idle.asm" +StantlerAnimationIdle: INCLUDE "gfx/pokemon/stantler/anim_idle.asm" +SmeargleAnimationIdle: INCLUDE "gfx/pokemon/smeargle/anim_idle.asm" +TyrogueAnimationIdle: INCLUDE "gfx/pokemon/tyrogue/anim_idle.asm" +HitmontopAnimationIdle: INCLUDE "gfx/pokemon/hitmontop/anim_idle.asm" +SmoochumAnimationIdle: INCLUDE "gfx/pokemon/smoochum/anim_idle.asm" +ElekidAnimationIdle: INCLUDE "gfx/pokemon/elekid/anim_idle.asm" +MagbyAnimationIdle: INCLUDE "gfx/pokemon/magby/anim_idle.asm" +MiltankAnimationIdle: INCLUDE "gfx/pokemon/miltank/anim_idle.asm" +BlisseyAnimationIdle: INCLUDE "gfx/pokemon/blissey/anim_idle.asm" +RaikouAnimationIdle: INCLUDE "gfx/pokemon/raikou/anim_idle.asm" +EnteiAnimationIdle: INCLUDE "gfx/pokemon/entei/anim_idle.asm" +SuicuneAnimationIdle: INCLUDE "gfx/pokemon/suicune/anim_idle.asm" +LarvitarAnimationIdle: INCLUDE "gfx/pokemon/larvitar/anim_idle.asm" +PupitarAnimationIdle: INCLUDE "gfx/pokemon/pupitar/anim_idle.asm" +TyranitarAnimationIdle: INCLUDE "gfx/pokemon/tyranitar/anim_idle.asm" +LugiaAnimationIdle: INCLUDE "gfx/pokemon/lugia/anim_idle.asm" +HoOhAnimationIdle: INCLUDE "gfx/pokemon/ho_oh/anim_idle.asm" +CelebiAnimationIdle: INCLUDE "gfx/pokemon/celebi/anim_idle.asm" +EggAnimationIdle: INCLUDE "gfx/pokemon/egg/anim_idle.asm" diff --git a/gfx/pokemon/igglybuff/anim.asm b/gfx/pokemon/igglybuff/anim.asm new file mode 100644 index 0000000..b0e2607 --- /dev/null +++ b/gfx/pokemon/igglybuff/anim.asm @@ -0,0 +1,5 @@ + frame 0, 04 + frame 1, 08 + frame 2, 14 + frame 1, 06 + endanim diff --git a/gfx/pokemon/igglybuff/anim_idle.asm b/gfx/pokemon/igglybuff/anim_idle.asm new file mode 100644 index 0000000..c4a056b --- /dev/null +++ b/gfx/pokemon/igglybuff/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/igglybuff/back.png b/gfx/pokemon/igglybuff/back.png new file mode 100644 index 0000000000000000000000000000000000000000..7b34a17ff7db6d69cb8e97b3e3c3733f47477af5 GIT binary patch literal 358 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|G(wfR!vO? z28KzK8743=FtC&a`2~Z-b2Z#585kH@JzX3_DsJtadQhxYfx{*B+5i7PTc=J`eDKWo z`IcF$8y2kn8?Uf4^?JSROE=4wN56`?ZMTUmwrR;zOU!WJBxd29EU_;lp`bCIhtZSc zMydRNp$9oKDRJ|sN36_9ZDwRp*08l`JHBAKDXYkLk+~a`T4raif3-zPVUueB)4{Lt zlY><>*0QpQ{|oa|zWIRJ!6-p#i_6CQj6#gn|GtZgh5re_B^hjIQ7755Thjl{OpjU-eSS)W-T4z7QuAIeYEM68 z9Iq&4;oAJYGwo9k-?@2-6>2u0)8|=cT|Q^bd}8OdufI-MY_XivawJhd`TfjN-mOy? zR`X7;`WSZp4cq-f0meP|4!x1|H9yIcz+$_|%ie(jQl6bv~c@;mq@j xW5S;VcPv@m`1tkOb>i>OKB|27d0u)QLo$b8gV>k#Wef}q44$rjF6*2UngE3n;1&P? literal 0 HcmV?d00001 diff --git a/gfx/pokemon/igglybuff/shiny.pal b/gfx/pokemon/igglybuff/shiny.pal new file mode 100644 index 0000000..38ce5d7 --- /dev/null +++ b/gfx/pokemon/igglybuff/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 17, 31 + RGB 09, 24, 03 + diff --git a/gfx/pokemon/ivysaur/anim.asm b/gfx/pokemon/ivysaur/anim.asm new file mode 100644 index 0000000..1b5796d --- /dev/null +++ b/gfx/pokemon/ivysaur/anim.asm @@ -0,0 +1,5 @@ + frame 0, 06 + frame 1, 08 + frame 2, 20 + frame 1, 06 + endanim diff --git a/gfx/pokemon/ivysaur/anim_idle.asm b/gfx/pokemon/ivysaur/anim_idle.asm new file mode 100644 index 0000000..c778f1c --- /dev/null +++ b/gfx/pokemon/ivysaur/anim_idle.asm @@ -0,0 +1,7 @@ + setrepeat 2 + frame 0, 07 + frame 3, 07 + dorepeat 1 + frame 0, 08 + frame 1, 06 + endanim diff --git a/gfx/pokemon/ivysaur/back.png b/gfx/pokemon/ivysaur/back.png new file mode 100644 index 0000000000000000000000000000000000000000..325b5cdf51e6a01236e6910ee63b4968d8f2c317 GIT binary patch literal 423 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7pZq`Se^3hp z1H+F6k`@dM3@jx6$|Noz>;a17O!06`b;uunK>us>-q{9XrEWiHO%W+Dz#1yvP zaqpbIshT-u;{UJvpK*62^O%25<}*K%?_^l`w|9P}L(jxCp6Gh*KOG7C686-YE2N+J zaNRy4!rL_I$mvSaA6xTgL_Cyd*~9bpL3iWU=m!7Ug^X7FB3C%LerzmQzvaT&hF6!L zOxGSw)?e0sg6;-GTY0oDE0-xESOCob!B8->(sN>RTXjWtG$C)eARr{x;Xq*Yn4*q;s)UvnmHlHM^8FW zR^Zr_F6YC2dd^n;JMTplSFSS+f27*L;*v+Uz8BkhwmkRvmvw&Tq0%J{X8$`o75~L9{K@?Bg)ZGJ6SsBICrV^O2nx_LibZFe-CzpumaSY7b_{CQk! z&c`nOdo%v@`W*}t^XKpEogJ?rIPGK5i{jHh4=x0KT2?>dHBy z&$FS=5*9>Xxqj!mvD)>eywfvwEs6W(lXkM?*LL@e+D&ZFjf0W}U?Mr@?zvswa_nX$Q^Y^se*f_u9v%S`*d;KE4^TcnU!%*_B>H>w(+x0 zU#6=6HDbme*5zwV^*OTwR95#o*_Y2a@IATwym!Qb18vitemtJf9oN;qe0kL4sh@=Y zygMwiMn{bO#R=wj%Fnf(+Zk)S9xUD`?$FlRs+Rrf#z&zWPqr%ZES|Qt<7|G#*xVatC8 z28IW!?+O?g7+6Yz{DMK^xf*Vj3=9l+JY5_^DsH`<8ZFeKz{6r}`hEXrE)F#tp&RkN zshYQV9R*zWRg^a@(RBS$8m1oau>M#{yUdhN5_=m;HiShMUJ2>C{rRb3XV|43q8jG& z?|E$2-}>|#xB0}^H5E21Z_dfOw({4?iAGzUPA6PF6!M`$TO{dZf76DKMi;aXK0N)R zr0Mwc^I6Z?YU?B{Sbi8xm-zg=$!x>n?8g5b9Tm9(mpLDDME|+qq!XdcXR5fP@%jCU z=}oVWO)J!x!B)1*XS2<5U!K$E{6C8inlJm!$zOT=LDq34ac`b!vt^#|@OsV8Zo;~H SB~vlT-wd9velF{r5}E+9ABXk; literal 0 HcmV?d00001 diff --git a/gfx/pokemon/jigglypuff/front.png b/gfx/pokemon/jigglypuff/front.png new file mode 100644 index 0000000000000000000000000000000000000000..867134d13f24d17931b51162dc73c878837996b7 GIT binary patch literal 644 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsC07q2yJ z`Om<>@Idul0RsaAOG%JlFi1RC!>y8mfl1lZ#WAGf*4r6(^H>x)T3bK=dw)mt3S+&* z<@&T4QEW4QyRB}l^0n2F`CU?iz zrX^EWyqUV#)z)02bpMN}+OMk*IC6a2^(s+1^?gsUf#dqWo2Jh3JXfQgo^#Z7PUBl` z!*njo8X3#S)$S)GkM9spH?v*#ezM?}bcu5|zTvr>*H5!P=b-d*Swlzkw*!`sj&t=l zaGsp`#HZ+)w`H^Uxd(m5B_}0!J>~hAJMUrYyvCc)FJ$honx7sK^r?1UVpWmmob)q) z|0K;zjJuqa<=(gUbwmWNlV+)RbyVPO)LI3`_IfAFH z&rPvDx90uXZ*xw5PXjwo?fJ|(>6464&a{uQ-?dsQ^L%TpcB#PcW)1_p-u z_k7XPsmq!=RGH`lbAw>!dxqx|b@J3M{$EvP0|2vuTOC zQW}g4cPZRdVrkfB=6m^<-UW^&$HW-|I-Q;xx-^^(Ygl<)QC`M$cT-Ngtp>v)0|mCm zFD42-(g{kRAyT#WPVoy7HFjzeginy$LS?9Hcl zyG@+Vu}AAeaGwdUwZIc+M>!$e0~%#<+#7bCJ;|^2@`uy$$3KP54>&|DE?6?THYYXb zu%XlURR>mcntZ?5JiTA9dlPH-j<+uwKPH>1>t^k}!!d82q1C4vrS;QqEABGM(G~S( zUzso3=6REAM;Y(6{-7IAPR??8eBAV~+r@2F*Hvcw-d(|89m6Ul`&(%~0|Nttr>mdK II;Vst0RF+Og#Z8m literal 0 HcmV?d00001 diff --git a/gfx/pokemon/jolteon/front.png b/gfx/pokemon/jolteon/front.png new file mode 100644 index 0000000000000000000000000000000000000000..4f052d5597d9691550718aa4f9177a8631765b4a GIT binary patch literal 1091 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r12`^Lb)z)}+A7Yq{4)o`n1U|@da>EaktaqI1@n|UgVJgytx|Nmdil|N&tm|WTt zjgTcJ%RchWxO{fXCAkGTwhLlgnSRcdJGPoBoma%hEu`I-ZOu7_ylW>LIrLg8rmnbl zvhn0*4*#UzMq7#suXe;tS$ky1o@?om`&S(Z^>I&p^fg>|#`2d%+V8iAxX4_cFl)h7 zC({!#OJ~)XrEFe2bq(_pE}i}-GieA4>;3Ex)RoX(h4+Bw1XVbu-p z#UC3Zvm5gQBY3$dicfNqOWWWhHGNO^h7;Kas!tTPm$`;|RU}j@@q8?PdRHjDaDq+B zM=kxO3+hyjTid;7R8Dvv6Oo~-lv?dvWBg`*kKWT?ht%RHIh{(n)7fz}Q|xod#|_a- zojey#Kdz!*Z4`7tYvHuFUXGLJZ4=0GRO+hQ`|H*g&x2PE`P>OwW_0dwgj%jZnA6nu z>ouPk=H`8K^!nL%NpPyT`H`I!$4-k`>=zf_v|^HG!TtxfGS6DMOX8BGP2{;-Pwagw z;azQd)kq{LYtrQ;Ia7;!Yo!hUnG zSKL%>-u{C5#?jg9eJ+=7zpj4yjPaQxhEp=x-n+29X5Dr7!--Nxbr zTc#&=GfL?nte)FEMbjY0vC8wjcbS&KoCh+~kMPVsII-@?3gJ0&*S7Ms^$F`A)K+3) zw_S7i(~Z4rOVgWHe`+b);sJ2u;U%IPtg<_2JK2v>08=)A6<4yi=irxGRzVCTbVk#gLX{i?H zbnnW{2fIGkEzn+a-lH?lLZf$j&K1Eq?HPu;e=y2<&%C0+fE!gtE!oc?n@=GM2A zR?7YE9;d|?(Ys+@<;h)B%BPpdT{?F5itsh&e-;xnk3aV3@=B4fS47(8A5T-G@yGywn}CJny; literal 0 HcmV?d00001 diff --git a/gfx/pokemon/jolteon/shiny.pal b/gfx/pokemon/jolteon/shiny.pal new file mode 100644 index 0000000..81d8eda --- /dev/null +++ b/gfx/pokemon/jolteon/shiny.pal @@ -0,0 +1,4 @@ + + RGB 25, 22, 00 + RGB 15, 15, 06 + diff --git a/gfx/pokemon/jumpluff/anim.asm b/gfx/pokemon/jumpluff/anim.asm new file mode 100644 index 0000000..70bea7b --- /dev/null +++ b/gfx/pokemon/jumpluff/anim.asm @@ -0,0 +1,4 @@ + frame 1, 09 + frame 2, 09 + frame 3, 09 + endanim diff --git a/gfx/pokemon/jumpluff/anim_idle.asm b/gfx/pokemon/jumpluff/anim_idle.asm new file mode 100644 index 0000000..4f991f0 --- /dev/null +++ b/gfx/pokemon/jumpluff/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 08 + frame 4, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/jumpluff/back.png b/gfx/pokemon/jumpluff/back.png new file mode 100644 index 0000000000000000000000000000000000000000..1b72ecf2f02991b35a74de44362fefdb8020c114 GIT binary patch literal 436 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|9o$@m(wu@ z28O-<%l?(9Q%;6Kx&=EDy#MNZRSV3GXiX-+HO?+|Nr*ut7Lh9iLd{y^S%v@cWz0$&myDq3suU>O6D$rqjPQ^E@6StLMd7QbFWwKCvpeij zyVBo(r|aCAnl6aR?B!kTR_en!!E?U;v~`JzPK|BKN^`!+yS)|nI_LB+Bz2X8xS)?n z@+F;Trwq?JUd#S?<_PPoy2%nHrUbn*6z={DKXH`x|jv4*N`-=^KVE_9LYX5I;hq}a;1pG^7?WxxF) s-v&9!th&C889bJ+pE7nhsy<*YVPyTa>!IXB1_lNOPgg&ebxsLQ0GxBaWB>pF literal 0 HcmV?d00001 diff --git a/gfx/pokemon/jumpluff/front.png b/gfx/pokemon/jumpluff/front.png new file mode 100644 index 0000000000000000000000000000000000000000..1048e3937b80f8d46d48747a4ca0087959fdefc9 GIT binary patch literal 1064 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsBb_hx%J z9b;f%*z3RSKLY~;OG%Jl@c;k+|L1DBRWdLzANO=|45_&Fc6N8)YXu&cjnDu8uXJu; z>0xw!?{!yuGrwu5x=oITyR*}eU5DDW(stEtFLgb%C)m_he(7sd`I2{+?*7kR^{d$P zOc*mh7m(|!pUw+)frsxtI^JK=Aqpx_w=Z1v)?)V?D{nb9!@Wlct zD<*_qx6b(e(QKBd8awkGFOloX^0U6K^ILsm`l3^;cX}S~zE?QY*|XwwQnOa(_NqYZ z-%0foX3tRh$tK`Zz85FK^D^~sCtR&uX*%)F)a_t>G`v-2;cobqpRi2Hd(vMsY!_0Fj?F1yUx4oPe| zc&T}}HcxDL80*v3?2*kA3%(Wn%}rI^$YibWqLAOHm&{Svh%)={(XNdY14W?tKQA{R_TLo_uKHqD$ax@aMTv7LlQ!UdKn;>acuv*^dQ z?_RWoy{l+hy5H?xMd`}@x9>38J>mPHSf0Zj|L#HXyN2TS;D+C_@5=w!*SUZFHt+t$ zH>-W`IF`I97x+3e?Ta;=q``B(AX%}=_ZM2|xb1f?j^L?lf3+dwj-%4^kZqU#@GUaq zl8Rng*UlloF-3c-bzJ*W-}PJXU$oXS+rKz<^_8f}_b+Y|z1Vp_u>X1A{lN8SxLzha zD4#Mlhe@Zsj@{s+^@($`WtV3Dl(pvb_O-H7+IjzBUHfm@b5PhU@Mqh7M`iJoMdwx- zd*wV|^Xu%MR_iTi_ndsc!tBnTqq1xK=hRo6>(b%tt~<9%Le-=!!sOkHUZK;LtM6$T z&fEN|SLm_j>O9L0#qRPQZ;Qho?mid!@XMU5?+cF0+ozj;v|e_{@VoV~I~%`Q-}uY- z-Fglb{#$f^<9XSK!tX3TS(|)6IRE{PXMK9F|Ni8w-{)M^Zh!yb9T5EJd*>rFW07j0 Unw)ko0|Nttr>mdKI;Vst01Yq!ApigX literal 0 HcmV?d00001 diff --git a/gfx/pokemon/jumpluff/shiny.pal b/gfx/pokemon/jumpluff/shiny.pal new file mode 100644 index 0000000..c553ebe --- /dev/null +++ b/gfx/pokemon/jumpluff/shiny.pal @@ -0,0 +1,4 @@ + + RGB 25, 16, 29 + RGB 31, 08, 31 + diff --git a/gfx/pokemon/jynx/anim.asm b/gfx/pokemon/jynx/anim.asm new file mode 100644 index 0000000..1d640ae --- /dev/null +++ b/gfx/pokemon/jynx/anim.asm @@ -0,0 +1,7 @@ + setrepeat 2 + frame 0, 16 + frame 1, 16 + frame 2, 16 + frame 1, 16 + dorepeat 1 + endanim diff --git a/gfx/pokemon/jynx/anim_idle.asm b/gfx/pokemon/jynx/anim_idle.asm new file mode 100644 index 0000000..faaeffe --- /dev/null +++ b/gfx/pokemon/jynx/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/jynx/back.png b/gfx/pokemon/jynx/back.png new file mode 100644 index 0000000000000000000000000000000000000000..6478f6099dcf97a126f64206695a953ff38c91f6 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7Uo24l-f#{B z1B3o%y;}?n3@jx6$|Noz>;a17Oz;MLV#WAGf*4wEE`C1fsTuz_)|NrwgB|V{y z&OT<<1$@3&Dz~VLoQ>Q2OZei|MJfN?o}792;78J{?Fa4cVt(^36P#l)<3~G7u+z$| z;yHp7w)uaHuW4H=_*1Zg>%cXRhYJ6t8kkBJI~EG9WV+L^i1`MCh$P3MzX{SsDQn&T zstOrgI9y@A=UutdB@1`a6&K!YviN?1p-lVqKL&;HE8i5DW0uPWDdau#YS0wu+i~K% y$r|oEst^8cUNPY*gOl9N=@r3(tNJQ`Fw78P3S1Z3^q+x&fx*+&&t;ucLK6UEK6L;*~)o%y=#sRBpq)W84U-#P5M zh*RS4#dT#@&-gqyY1h?o+3)K0Q(BzyhSBr+I*E#VZ~eaU?CIH?UrlZEpMG<&|KZ}8 z_pqKly_5NbeUJGvzO1#s7VlxXdhKcQnQuC?xpqlz`0D;V+e_a#f%TV6f|h`|#Ab_r z4_1!L66(BRbsEOvz5$Lkyu~v(j>xU~sI)xP@$F^dVk8Hdx%i94OnDk|2o2&o@j{U>tWg^x!aUWNX15ZBSlk9qds&dGbaI~P>^ zzuta>ZOV%kyMb-&czUap_rI!_M|LllL-O_(@Cu>Y~@a~Q5 z!u21m_LNk-{BTL*fR+Bv?$9``ZK9c4Vilb^>Z=Y&>7RV4oDs0Eb9&0}yH8XtManBY zexS@X=x@xS!{s^)x~ ze#q_gn*Ac%)1LiZy6Im0sTV45^;7>Y+OvPkj*8d%7sKi~Xa8L~NiX+WycdVYTm7ZW zYj4FL($e4B4>JERi~iMJC%wP!npUB?VgBby%y(uVPt<7zqFVk*~^fD zfnmXwkFE?13@jx6$|Noz>;a17Oz$oD9;uunK>+O`&VuuwtTn_*E|3BuiGvmc2 zzaK1XzjJ$HR#j|#?blr#d!yD*-%#Z8<&DJMhvw&&u=~G}DLh;=wJm#}QO)X8C%7bR zKAa4gmo;a_{4Rr;%VU>vOyu8_^5^jJ`C0W0){PtbPH*SmXx#EUP+-P1C&e3~dIifB zIE@c|&JbYz)5pUoGqLi;tN8*fFCWcHfAV5q!ZCqaJ`b5&wgf4wt=Mqsa>lXd-i?c= z#f)8sT$8|b!gu9a3zkfN2C^*+i=ciQN5)kqqacd z#zw~F4BMBdP5(EO-$~Mt?L+y>ddu}HcWigM{_F2lKa>@5e(#)zFTP}+uCe!B)f+Rp b{1Crb9cO`<$T1%V1_lOCS3j3^P6smJcolc}py z?$$h6;NLSrB~tbFG!2>ae!?1wNrxH_m37+qcKgO=p0{x8(lP1E=KAe*vnWMy%Y@G- z5~DSvUv!Ic`}3Z6pI6%5v-r%bskdqlo{Zz>Vg9o&%P{?^-(1hRo^yY$J?Ek7!f=T( zh~w0|xt=ixHZ?Cit>!+jeBO7~u)v^p?TD+*8|(tl-|LwCe!(L<-}Dn(li6JJXG_QL zbDM4c^F?9)M}xVAx*|t!@qaIS^)+A1`IQd{elz}m>->k)b#3>*88_y+{q0#TBlk;k zx@FaibicV5>z=iqdm%Nildvd$@?2>||A`fmUL literal 0 HcmV?d00001 diff --git a/gfx/pokemon/kabuto/shiny.pal b/gfx/pokemon/kabuto/shiny.pal new file mode 100644 index 0000000..1248ce8 --- /dev/null +++ b/gfx/pokemon/kabuto/shiny.pal @@ -0,0 +1,4 @@ + + RGB 23, 24, 20 + RGB 14, 18, 10 + diff --git a/gfx/pokemon/kabutops/anim.asm b/gfx/pokemon/kabutops/anim.asm new file mode 100644 index 0000000..387559b --- /dev/null +++ b/gfx/pokemon/kabutops/anim.asm @@ -0,0 +1,7 @@ + frame 1, 40 + setrepeat 2 + frame 1, 05 + frame 2, 05 + dorepeat 2 + frame 1, 25 + endanim diff --git a/gfx/pokemon/kabutops/anim_idle.asm b/gfx/pokemon/kabutops/anim_idle.asm new file mode 100644 index 0000000..792fead --- /dev/null +++ b/gfx/pokemon/kabutops/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 3, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/kabutops/back.png b/gfx/pokemon/kabutops/back.png new file mode 100644 index 0000000000000000000000000000000000000000..2a1fde94d3cc44c6dbe1756999d0f84b37f34eb6 GIT binary patch literal 476 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zqFVk*~^fD zfnmXwkFE?13@jx6$|Noz>;a17Oz*z0+;uunK>+RIreTNM=Tn?Z4|NnE_?8YOW zSH72qu3Y&{f=#$a=709?6Y^h`{sh{0es3_TW&a>%@TB>|{&$WHuY_(gcWvN)o7mat z7oc!*i^taQE7{cqTJ9{_cagQBVZw6O$=Vlv=JfM(1lOJBTjcmuP-zi`D_2Lj@Y zC*3-BXvidy#%1QFpLxuc^A>L}Uzx^V$owMq$QA9tuFWQkzengk->-h)$GU~tdPzK-DnYXx z+6=bV30-KPmsY`xfpH;>+%lumg0|L;*iy4x= z3>g?07F_x0%D}+DQWE4B{Qv*||G64&l?)8b(>z@qLn>~)oq4jL&6dd}{7jJt%(PVZF%(q(XX@aPf5BbLvZ9V@!>na5XG)lVHCn~w)0z?x zGI52t!-dIbd9C*{Ez)15{_NN1s>6~8q!yU$eC@q%J45XGg1=%5)?L5vy_dP<`sE;f zPM)fHUzJbFCQNBKv^>C|?ZLA58k+?*motz0J=R|Mxch5@?}swKEAKcMQ_gO2xuUzFsO;Eo>w~X$ta9_t)YQv+ds!V}7OXQ{4}aBcchPH{^;IYTeCTvnu)d^i8o#I-`CpHEFn(@M`)c zhCAXmKbNvJLTHp^r^=tbH5oq1PmYhu3v$sH{d4J4$*%v0zde}# zZ1U?LOCL|~i?^zKng2ue-vxcwzuNnce3=;k>AhCmZ&kaxmvH&=zn5Mf|GT+P=5zXA zi;D24x%PU@+w#;Hx848urR?VE{Q7{5dz`!LVz}P?D&#+Kr+>GTn9er;Tm8&S4{VZG zf9sgC{OBTibEflucQ~0a{I0vhu;=CRz@5zfe|HqR_5a=RySVz@ao+>M_Ik|U{_bcx zQlIy$(1iJS-JK^f^M4iE{8~Ew?~W-qzC12Uy4-)d)7M^aXVmt;JN_)Y^X2iU`q_T= e@BaTt<7|9p-_vJ*&! z`y`zn1_lO}k|4j}|NsC0&((0NWME)S^mK6yskrras`n%oMGlwNJ^$yj|J2Y3J5!bP z#&`NN<|{f`J^w#WXMenXvK2$twFt4eiz}H^x^5j&TCQh(y2jb#QJlW!ln2@IUpTL* z{EGjQyEbgH@DU!#W#SFT-MKWoVB zpo{s1Wge$^4orT;;^uC{nD^D?nfKYab)r#$?h4!5A5|W5zR$QJ%6e}#%jxD~re`zS z7$SO2Ij^5qp8UVy=r)f~+Mo z!%Nq<9OH5Ly64??k+s3k{@z_Ea)DFNXUCCU@7`@pT9wiDq&1|8DI)sZ+>ZXaNjm4P z8W&%^%B;FZzmeG@I(DU2l9izT_lvJSB|e*GaesllX#~fTPL|Nw3=9kmp00i_>zopr E01=498vpGUu#FtC&a`33*~|NnokhFc{A1M^)^7srr_TW@E*p7cb4qqX((zxOtbd>NMv zH+~QLe0<%kxp{{LMUUiH<-X02yYRd0=#e@l%UkcOn~q%e|7}*R_~{{wySY;FK}E^= zhkglMe7VNems#fXm+3!_&txuNn6@Ob(&yU?1}pIy+)}&u>aV=l&tVr?9N5KkZY^{6 z9vr z_PnL(jJ#KmFVV{oZ(KGZ_S;0+#pR80EEc^lB$V#U+G-vznboYFuvg>v(nB%<1vi65 zZdhgdSnRqgb^nD@6@ybl$>Yy%-vbUlE*5QRU@m5S75lnN!bNAE^#+fhi=NF%$}C>) zWYd~_ChvTM{N8J3O;?U&X6!$0$CSoYxP0LOgXD^4zHb{3-aM5tO~LxPRq8Rt%O|e; zzHC~TQ@2XQWTEmCd%e!oPkBkZSFS#@&roF=<8k&rr=oD9@CSuO!ksIY?+)X-qNHfk z(IjWF^uvSS(_haD?lF26^m@wAWY1}lM^Yb^1-0xwe?lthf5h>(LBDEbA61^;awGrM zI$N(DT&Mmi3Fy6iu%vp$mOj?v>aRYNH#hNb7D<+wc;%bhREhOgJUt7F+>LhXecM>P zC|`I-#O8{MvP!)^*0_wMsU}Q(y*zn$wkO|Q{o~ieDWA_C_*L{`=LV(lEvAxAk5c7) zS8qwQ`C0S-_@usXg<5GJZ9H$h+uG*nZtt=8U#9)K&1F9&q`u#axIJ@SsOg(6A@5l? z3)}3Hx}adjB6nbEY^>d^|EsS*TYCTb(sxO{)8Dc9?>RCh>iN>JB%O$?2DG`sHIo)1CWr}G*4?+Hd7RVs{9%_e|kh^J$Wc-;tlYk9pTETk~0n-&p7xlfL3P{~Z~v z(+>zWmc|u1wxzdD|526*Ug`1%S?-uoXf-OT%Z>Dkh=-m|Bh>Hk&J*ZgO!&w4;a|ES~VBi>IH z8(&VHZt!W+wa=RRKWAixEvuLN&(Emrm~1Xsvjt>bi?TSmykm zDURO+f3olSeCfl}r#BBynZBVi6JdUC+^s!d*!PHZiN_t9IlaxmzhdQw<013Aq~nBw z{62}^+aG`EfVcYZzkk6l`u*?HzWq-MwHZ!C^Xh+}UgE$OyK8^Q=5U>R@soc2U;OpA vw@P1aedhi6Ti>UD`@6KZ{$+IBFGkr^<9oCJpN?i=U|{fc^>bP0l+XkKeC8ep literal 0 HcmV?d00001 diff --git a/gfx/pokemon/kadabra/shiny.pal b/gfx/pokemon/kadabra/shiny.pal new file mode 100644 index 0000000..3283190 --- /dev/null +++ b/gfx/pokemon/kadabra/shiny.pal @@ -0,0 +1,4 @@ + + RGB 28, 24, 10 + RGB 20, 09, 19 + diff --git a/gfx/pokemon/kakuna/anim.asm b/gfx/pokemon/kakuna/anim.asm new file mode 100644 index 0000000..fed9aab --- /dev/null +++ b/gfx/pokemon/kakuna/anim.asm @@ -0,0 +1,3 @@ + frame 0, 12 + frame 1, 24 + endanim diff --git a/gfx/pokemon/kakuna/anim_idle.asm b/gfx/pokemon/kakuna/anim_idle.asm new file mode 100644 index 0000000..4cf1be2 --- /dev/null +++ b/gfx/pokemon/kakuna/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 1, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/kakuna/back.png b/gfx/pokemon/kakuna/back.png new file mode 100644 index 0000000000000000000000000000000000000000..b7f2b2e5243be836a65f877c6d0b034d6dea87f4 GIT binary patch literal 356 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f9;&a(qbnD z28JXf^JNSS3@jx6$|Noz>;a17Oz{u?B;uunK>+aNxLahoME{Wg&|Npsa#xm6l zua8boyJftgLG{yo#%(87UsY;du;Q&|JI_xCyBESPx^?U}OuidliqiJ<9u*%gLT$a; zWtuLhEB|iXU+cVny4;i_`xeb}nJ(9oJ*zZ-*}WKd(UWh2(h9Vmz9?ARc&}r3_mw5j zUwyskX^^F-_TsurYV?oPmLX N!PC{xWt~$(69AR8pDh3Y literal 0 HcmV?d00001 diff --git a/gfx/pokemon/kakuna/front.png b/gfx/pokemon/kakuna/front.png new file mode 100644 index 0000000000000000000000000000000000000000..b34a398f9ca3794008df3f12569d45686362bb94 GIT binary patch literal 410 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U2XXE7sf>XujE@WWUs)EU`z%m%;9q`T!lXrY!ZNBWE?V09AKnpSG)ws8qF;&Ukqix$_6nq5_hj6NYc71MUtz;G1z;r(6UGlD7QjNkB6ZSnm?09nr(-nE? zj7?LxcrImW>i1r67SLJ0kkiP)OkrJ^{!RwckTYa;zXQ&6lc-XozJDd?f$$>zBKi50c%X%7gKw$gX;E=R>`MMlK&N$ zXl(K4M8eBI9XUD2+V`dyf19`CRhseC^98?p_CC$FYyP!&N6oWOGyi{>DcvK)A)f90 SaTNmt1B0ilpUXO@geCy}>#u(R literal 0 HcmV?d00001 diff --git a/gfx/pokemon/kakuna/shiny.pal b/gfx/pokemon/kakuna/shiny.pal new file mode 100644 index 0000000..335bdff --- /dev/null +++ b/gfx/pokemon/kakuna/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 27, 04 + RGB 13, 17, 07 + diff --git a/gfx/pokemon/kangaskhan/anim.asm b/gfx/pokemon/kangaskhan/anim.asm new file mode 100644 index 0000000..04a5dc3 --- /dev/null +++ b/gfx/pokemon/kangaskhan/anim.asm @@ -0,0 +1,8 @@ + frame 1, 30 + frame 5, 10 + frame 2, 12 + frame 3, 09 + frame 4, 09 + frame 3, 09 + frame 4, 15 + endanim diff --git a/gfx/pokemon/kangaskhan/anim_idle.asm b/gfx/pokemon/kangaskhan/anim_idle.asm new file mode 100644 index 0000000..aa1ebd5 --- /dev/null +++ b/gfx/pokemon/kangaskhan/anim_idle.asm @@ -0,0 +1,7 @@ + setrepeat 2 + frame 0, 06 + frame 6, 06 + dorepeat 1 + frame 0, 15 + frame 4, 25 + endanim diff --git a/gfx/pokemon/kangaskhan/back.png b/gfx/pokemon/kangaskhan/back.png new file mode 100644 index 0000000000000000000000000000000000000000..d69e041ca986f75ca2fd1cf4bf987a7a11a7f6dd GIT binary patch literal 530 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7Kc`sH$w`2L zfnj~qgSQL}3@jx6$|Noz>;a17Oz_`)V#WAGf*4fbLAO=OA#V7y1*Qxy!;b4DM za_Zfb%hR@O`4%tE@a=2)p8pe(khkKH5ECjt3FRo&k$5AUOC+EB9_dff51|42kAD;TQT%E1lhV9>p7dutk=hYuA zPpimX+gH{$&;KQt-ty%;Pqb|JpQFOI&v;W@+@7?J?}Xl{X|)AjQFAn4`>u5~Q$)4= zgw#2n+Z<1Je3)3UV|jJNt4iJp#mq-nce7~CJhA=WiQ>YI_ttaQD}7kmpnbT@Mpd_e z&f4!ipASBs_3F>hl^)v{o@ioAL%`w|32hk+MZhZ$%kb1&$tB~6T2wGEv}t$>R#h+C$5Is`({0}{$rigy%9Ig z^@;5cRaW1huDgM4-tILwO9d6B7XN=g@A3A^2ywYhZgsmaL?u5cp3$Y5!<)Lj`}kDW pREyciCkk>gzd!e^`NBv0GJZ})>$`s^FfcGMc)I$ztaD0e0szZ8^_2hs literal 0 HcmV?d00001 diff --git a/gfx/pokemon/kangaskhan/front.png b/gfx/pokemon/kangaskhan/front.png new file mode 100644 index 0000000000000000000000000000000000000000..abe680c64d2e99aaf5d84372958083e0fd7efcc5 GIT binary patch literal 1437 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dVC>*vW?*1YetP*W0|Nt3fKQ0)|NsBz6e~J8 z2{14)tZ#Y%5@#t1@(cd||NsA74Yx`L238wS7srr_TW{xdPP=Wu;mZ2{|Not03R@yN z1N~-y^Z8g}HP_<&ErCa3noD!^8J;$KhsbLf{;6G&{Gv1}&_M9|YmcbZr87P`SiN3# zCF|n{jt`-}QYDvS>fWsLK0Y~Tg|-~m9Q}Ipk2Cvx-1>E8ZkN>xuY9w&&(NHA>xnAc zUe0ODLKU+LE94F@o4kD+UtP{Z(MnMU!yBuVWfg3=*A`vdH9;sTYD>&?A^xdr&DmS+ zT)bEw|1DXioc1(Bd;O-6PV-e!!Qm(0Z}pgVKkn+6U5AyLPtUleBN%++wx4cyx0d0l z6VD&-i(fh^Mm~C~&DHN(o@;BfH{@Jx`MOMG)l$dfSM%1YPKxUM-q+s|K1u&+tx0tH zDdi{gYZKny4fWW=r!Fq+wAwmS(RAnbOSh|Dc9ku>vm`q8O5@frBUAHBy1c8;Nypw# zRJ%R9>(SzGtA2jV2;0iN@(a^-Rlc?BeLC&*)@}Y5rn}yCTJMI}OKxu9Tb6)pd^4*N9C7~~t`m%<}Z_sPL8oP*hPt^1^@t3zu;S9eP7Ce*fLf0Pd zqc7Y-H}aWQUr|c8Z%{iDB6nrQ!{q&fNpnxAoO<;2%F(&u$C-Wf8s3~%v$XlKbISMD zJ+`9j7WWG1ixI<;V$-LpS?e&%whRgbY8C3hfOiC$i2wD=(zj?zV5*JFCCi;p7Y7Q zc(`^`*?sprfwsTd?<8L9*cNp<=)s+Zs}E`WU%XyX{`i=zQ2hHApQDSNdnVdEwk?nO zcEic&lj@W^H-B<6}az)15;~)4HM_+?DNP_4vSA9hu)IxZ07Y?NiP~ z{pfcG?$`uxb6ruuK27yNV6@sR#tAq3kB5tu=-)An?hd#jFyn*JW4=3vx7D_D1o(9B zDmW}VIdb#Fl$kj%Rm&>^7M6AtwR=Wd#jdqJCVTkL1P9|Yvdtl0-NnZxPQSj=QFMHd z#QXwx{mVO>kHytL;VXK#z^-?aH8R{c{e8p^}$1-YN$ISo71@~ z_}zt<4?_Ej+XId##4EnLVCwf*IDl_Q^Bk)i>WLGq&vXa7PYc-RT$BA*@j|CX`H2|y zwVDrGtpC(|&M*lSe#)2cTDs+v`U%-f>#ZIiz1p_ZS+>>mM~n4^!q47!E>2y3C((BP zory5`dri^&(07}ERsLS%HO2Z_ZP;{9*PY3?(p7UgijMC&&&7Vn@a^VD!tW%$N6syD zkFMV-`Q5VoLi(MBobBg#Fe{hKJhiSdn!I$;p`U#5SxZh#u5nkcdeC9LZ{B;4cj&O< zpzIH^@(=yb`zHPDJ5#O#hkv5)e4Ib`eaE}aQRmB9zDNGu_gVI1ZP@9beIM*rKdo`E znSZrlU$g(W$g|I_&wY#JeQxddEi(69dCRxRr$77Vm+pJ~Cgx|sKIQXM-+z`BW`FXt z?+F~9DNos_{8{#AW!TTku; literal 0 HcmV?d00001 diff --git a/gfx/pokemon/kangaskhan/shiny.pal b/gfx/pokemon/kangaskhan/shiny.pal new file mode 100644 index 0000000..4925599 --- /dev/null +++ b/gfx/pokemon/kangaskhan/shiny.pal @@ -0,0 +1,4 @@ + + RGB 16, 16, 19 + RGB 03, 11, 03 + diff --git a/gfx/pokemon/kanto_frames.asm b/gfx/pokemon/kanto_frames.asm new file mode 100644 index 0000000..67a0661 --- /dev/null +++ b/gfx/pokemon/kanto_frames.asm @@ -0,0 +1,153 @@ +KantoFrames: ; used only for BANK(KantoFrames) + +BulbasaurFrames: INCLUDE "gfx/pokemon/bulbasaur/frames.asm" +IvysaurFrames: INCLUDE "gfx/pokemon/ivysaur/frames.asm" +VenusaurFrames: INCLUDE "gfx/pokemon/venusaur/frames.asm" +CharmanderFrames: INCLUDE "gfx/pokemon/charmander/frames.asm" +CharmeleonFrames: INCLUDE "gfx/pokemon/charmeleon/frames.asm" +CharizardFrames: INCLUDE "gfx/pokemon/charizard/frames.asm" +SquirtleFrames: INCLUDE "gfx/pokemon/squirtle/frames.asm" +WartortleFrames: INCLUDE "gfx/pokemon/wartortle/frames.asm" +BlastoiseFrames: INCLUDE "gfx/pokemon/blastoise/frames.asm" +CaterpieFrames: INCLUDE "gfx/pokemon/caterpie/frames.asm" +MetapodFrames: INCLUDE "gfx/pokemon/metapod/frames.asm" +ButterfreeFrames: INCLUDE "gfx/pokemon/butterfree/frames.asm" +WeedleFrames: INCLUDE "gfx/pokemon/weedle/frames.asm" +KakunaFrames: INCLUDE "gfx/pokemon/kakuna/frames.asm" +BeedrillFrames: INCLUDE "gfx/pokemon/beedrill/frames.asm" +PidgeyFrames: INCLUDE "gfx/pokemon/pidgey/frames.asm" +PidgeottoFrames: INCLUDE "gfx/pokemon/pidgeotto/frames.asm" +PidgeotFrames: INCLUDE "gfx/pokemon/pidgeot/frames.asm" +RattataFrames: INCLUDE "gfx/pokemon/rattata/frames.asm" +RaticateFrames: INCLUDE "gfx/pokemon/raticate/frames.asm" +SpearowFrames: INCLUDE "gfx/pokemon/spearow/frames.asm" +FearowFrames: INCLUDE "gfx/pokemon/fearow/frames.asm" +EkansFrames: INCLUDE "gfx/pokemon/ekans/frames.asm" +ArbokFrames: INCLUDE "gfx/pokemon/arbok/frames.asm" +PikachuFrames: INCLUDE "gfx/pokemon/pikachu/frames.asm" +RaichuFrames: INCLUDE "gfx/pokemon/raichu/frames.asm" +SandshrewFrames: INCLUDE "gfx/pokemon/sandshrew/frames.asm" +SandslashFrames: INCLUDE "gfx/pokemon/sandslash/frames.asm" +NidoranFFrames: INCLUDE "gfx/pokemon/nidoran_f/frames.asm" +NidorinaFrames: INCLUDE "gfx/pokemon/nidorina/frames.asm" +NidoqueenFrames: INCLUDE "gfx/pokemon/nidoqueen/frames.asm" +NidoranMFrames: INCLUDE "gfx/pokemon/nidoran_m/frames.asm" +NidorinoFrames: INCLUDE "gfx/pokemon/nidorino/frames.asm" +NidokingFrames: INCLUDE "gfx/pokemon/nidoking/frames.asm" +ClefairyFrames: INCLUDE "gfx/pokemon/clefairy/frames.asm" +ClefableFrames: INCLUDE "gfx/pokemon/clefable/frames.asm" +VulpixFrames: INCLUDE "gfx/pokemon/vulpix/frames.asm" +NinetalesFrames: INCLUDE "gfx/pokemon/ninetales/frames.asm" +JigglypuffFrames: INCLUDE "gfx/pokemon/jigglypuff/frames.asm" +WigglytuffFrames: INCLUDE "gfx/pokemon/wigglytuff/frames.asm" +ZubatFrames: INCLUDE "gfx/pokemon/zubat/frames.asm" +GolbatFrames: INCLUDE "gfx/pokemon/golbat/frames.asm" +OddishFrames: INCLUDE "gfx/pokemon/oddish/frames.asm" +GloomFrames: INCLUDE "gfx/pokemon/gloom/frames.asm" +VileplumeFrames: INCLUDE "gfx/pokemon/vileplume/frames.asm" +ParasFrames: INCLUDE "gfx/pokemon/paras/frames.asm" +ParasectFrames: INCLUDE "gfx/pokemon/parasect/frames.asm" +VenonatFrames: INCLUDE "gfx/pokemon/venonat/frames.asm" +VenomothFrames: INCLUDE "gfx/pokemon/venomoth/frames.asm" +DiglettFrames: INCLUDE "gfx/pokemon/diglett/frames.asm" +DugtrioFrames: INCLUDE "gfx/pokemon/dugtrio/frames.asm" +MeowthFrames: INCLUDE "gfx/pokemon/meowth/frames.asm" +PersianFrames: INCLUDE "gfx/pokemon/persian/frames.asm" +PsyduckFrames: INCLUDE "gfx/pokemon/psyduck/frames.asm" +GolduckFrames: INCLUDE "gfx/pokemon/golduck/frames.asm" +MankeyFrames: INCLUDE "gfx/pokemon/mankey/frames.asm" +PrimeapeFrames: INCLUDE "gfx/pokemon/primeape/frames.asm" +GrowlitheFrames: INCLUDE "gfx/pokemon/growlithe/frames.asm" +ArcanineFrames: INCLUDE "gfx/pokemon/arcanine/frames.asm" +PoliwagFrames: INCLUDE "gfx/pokemon/poliwag/frames.asm" +PoliwhirlFrames: INCLUDE "gfx/pokemon/poliwhirl/frames.asm" +PoliwrathFrames: INCLUDE "gfx/pokemon/poliwrath/frames.asm" +AbraFrames: INCLUDE "gfx/pokemon/abra/frames.asm" +KadabraFrames: INCLUDE "gfx/pokemon/kadabra/frames.asm" +AlakazamFrames: INCLUDE "gfx/pokemon/alakazam/frames.asm" +MachopFrames: INCLUDE "gfx/pokemon/machop/frames.asm" +MachokeFrames: INCLUDE "gfx/pokemon/machoke/frames.asm" +MachampFrames: INCLUDE "gfx/pokemon/machamp/frames.asm" +BellsproutFrames: INCLUDE "gfx/pokemon/bellsprout/frames.asm" +WeepinbellFrames: INCLUDE "gfx/pokemon/weepinbell/frames.asm" +VictreebelFrames: INCLUDE "gfx/pokemon/victreebel/frames.asm" +TentacoolFrames: INCLUDE "gfx/pokemon/tentacool/frames.asm" +TentacruelFrames: INCLUDE "gfx/pokemon/tentacruel/frames.asm" +GeodudeFrames: INCLUDE "gfx/pokemon/geodude/frames.asm" +GravelerFrames: INCLUDE "gfx/pokemon/graveler/frames.asm" +GolemFrames: INCLUDE "gfx/pokemon/golem/frames.asm" +PonytaFrames: INCLUDE "gfx/pokemon/ponyta/frames.asm" +RapidashFrames: INCLUDE "gfx/pokemon/rapidash/frames.asm" +SlowpokeFrames: INCLUDE "gfx/pokemon/slowpoke/frames.asm" +SlowbroFrames: INCLUDE "gfx/pokemon/slowbro/frames.asm" +MagnemiteFrames: INCLUDE "gfx/pokemon/magnemite/frames.asm" +MagnetonFrames: INCLUDE "gfx/pokemon/magneton/frames.asm" +FarfetchDFrames: INCLUDE "gfx/pokemon/farfetch_d/frames.asm" +DoduoFrames: INCLUDE "gfx/pokemon/doduo/frames.asm" +DodrioFrames: INCLUDE "gfx/pokemon/dodrio/frames.asm" +SeelFrames: INCLUDE "gfx/pokemon/seel/frames.asm" +DewgongFrames: INCLUDE "gfx/pokemon/dewgong/frames.asm" +GrimerFrames: INCLUDE "gfx/pokemon/grimer/frames.asm" +MukFrames: INCLUDE "gfx/pokemon/muk/frames.asm" +ShellderFrames: INCLUDE "gfx/pokemon/shellder/frames.asm" +CloysterFrames: INCLUDE "gfx/pokemon/cloyster/frames.asm" +GastlyFrames: INCLUDE "gfx/pokemon/gastly/frames.asm" +HaunterFrames: INCLUDE "gfx/pokemon/haunter/frames.asm" +GengarFrames: INCLUDE "gfx/pokemon/gengar/frames.asm" +OnixFrames: INCLUDE "gfx/pokemon/onix/frames.asm" +DrowzeeFrames: INCLUDE "gfx/pokemon/drowzee/frames.asm" +HypnoFrames: INCLUDE "gfx/pokemon/hypno/frames.asm" +KrabbyFrames: INCLUDE "gfx/pokemon/krabby/frames.asm" +KinglerFrames: INCLUDE "gfx/pokemon/kingler/frames.asm" +VoltorbFrames: INCLUDE "gfx/pokemon/voltorb/frames.asm" +ElectrodeFrames: INCLUDE "gfx/pokemon/electrode/frames.asm" +ExeggcuteFrames: INCLUDE "gfx/pokemon/exeggcute/frames.asm" +ExeggutorFrames: INCLUDE "gfx/pokemon/exeggutor/frames.asm" +CuboneFrames: INCLUDE "gfx/pokemon/cubone/frames.asm" +MarowakFrames: INCLUDE "gfx/pokemon/marowak/frames.asm" +HitmonleeFrames: INCLUDE "gfx/pokemon/hitmonlee/frames.asm" +HitmonchanFrames: INCLUDE "gfx/pokemon/hitmonchan/frames.asm" +LickitungFrames: INCLUDE "gfx/pokemon/lickitung/frames.asm" +KoffingFrames: INCLUDE "gfx/pokemon/koffing/frames.asm" +WeezingFrames: INCLUDE "gfx/pokemon/weezing/frames.asm" +RhyhornFrames: INCLUDE "gfx/pokemon/rhyhorn/frames.asm" +RhydonFrames: INCLUDE "gfx/pokemon/rhydon/frames.asm" +ChanseyFrames: INCLUDE "gfx/pokemon/chansey/frames.asm" +TangelaFrames: INCLUDE "gfx/pokemon/tangela/frames.asm" +KangaskhanFrames: INCLUDE "gfx/pokemon/kangaskhan/frames.asm" +HorseaFrames: INCLUDE "gfx/pokemon/horsea/frames.asm" +SeadraFrames: INCLUDE "gfx/pokemon/seadra/frames.asm" +GoldeenFrames: INCLUDE "gfx/pokemon/goldeen/frames.asm" +SeakingFrames: INCLUDE "gfx/pokemon/seaking/frames.asm" +StaryuFrames: INCLUDE "gfx/pokemon/staryu/frames.asm" +StarmieFrames: INCLUDE "gfx/pokemon/starmie/frames.asm" +MrMimeFrames: INCLUDE "gfx/pokemon/mr__mime/frames.asm" +ScytherFrames: INCLUDE "gfx/pokemon/scyther/frames.asm" +JynxFrames: INCLUDE "gfx/pokemon/jynx/frames.asm" +ElectabuzzFrames: INCLUDE "gfx/pokemon/electabuzz/frames.asm" +MagmarFrames: INCLUDE "gfx/pokemon/magmar/frames.asm" +PinsirFrames: INCLUDE "gfx/pokemon/pinsir/frames.asm" +TaurosFrames: INCLUDE "gfx/pokemon/tauros/frames.asm" +MagikarpFrames: INCLUDE "gfx/pokemon/magikarp/frames.asm" +GyaradosFrames: INCLUDE "gfx/pokemon/gyarados/frames.asm" +LaprasFrames: INCLUDE "gfx/pokemon/lapras/frames.asm" +DittoFrames: INCLUDE "gfx/pokemon/ditto/frames.asm" +EeveeFrames: INCLUDE "gfx/pokemon/eevee/frames.asm" +VaporeonFrames: INCLUDE "gfx/pokemon/vaporeon/frames.asm" +JolteonFrames: INCLUDE "gfx/pokemon/jolteon/frames.asm" +FlareonFrames: INCLUDE "gfx/pokemon/flareon/frames.asm" +PorygonFrames: INCLUDE "gfx/pokemon/porygon/frames.asm" +OmanyteFrames: INCLUDE "gfx/pokemon/omanyte/frames.asm" +OmastarFrames: INCLUDE "gfx/pokemon/omastar/frames.asm" +KabutoFrames: INCLUDE "gfx/pokemon/kabuto/frames.asm" +KabutopsFrames: INCLUDE "gfx/pokemon/kabutops/frames.asm" +AerodactylFrames: INCLUDE "gfx/pokemon/aerodactyl/frames.asm" +SnorlaxFrames: INCLUDE "gfx/pokemon/snorlax/frames.asm" +ArticunoFrames: INCLUDE "gfx/pokemon/articuno/frames.asm" +ZapdosFrames: INCLUDE "gfx/pokemon/zapdos/frames.asm" +MoltresFrames: INCLUDE "gfx/pokemon/moltres/frames.asm" +DratiniFrames: INCLUDE "gfx/pokemon/dratini/frames.asm" +DragonairFrames: INCLUDE "gfx/pokemon/dragonair/frames.asm" +DragoniteFrames: INCLUDE "gfx/pokemon/dragonite/frames.asm" +MewtwoFrames: INCLUDE "gfx/pokemon/mewtwo/frames.asm" +MewFrames: INCLUDE "gfx/pokemon/mew/frames.asm" diff --git a/gfx/pokemon/kingdra/anim.asm b/gfx/pokemon/kingdra/anim.asm new file mode 100644 index 0000000..14e0e98 --- /dev/null +++ b/gfx/pokemon/kingdra/anim.asm @@ -0,0 +1,9 @@ + frame 1, 12 + frame 2, 12 + frame 3, 12 + frame 0, 12 + setrepeat 3 + frame 4, 06 + frame 5, 06 + dorepeat 5 + endanim diff --git a/gfx/pokemon/kingdra/anim_idle.asm b/gfx/pokemon/kingdra/anim_idle.asm new file mode 100644 index 0000000..29e08fa --- /dev/null +++ b/gfx/pokemon/kingdra/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 6, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/kingdra/back.png b/gfx/pokemon/kingdra/back.png new file mode 100644 index 0000000000000000000000000000000000000000..9f0784999c41c956162039fa0d4bed0ebfc74d0d GIT binary patch literal 434 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|9`J#a?f`L z1_lKlrS6y=#+ah-tqrcxGR%40t-+fUx&f~yV*F1UI)W=)RU@^$W$ zRIEdpFKw_9zr(<%c;M+ml^5SW%=z0{xFnSfR&y;CYXZ`R`?kTMp0eH;J3pxO92*yZt+|-ZgNn6%9S>I{Rw( z$$3430ljUp`FpBcKl4;Gd2g`QU1`3n zcJI{*;{$6W{Thz+>ooJ~yxK26wQJ+WXz_^ELV5PPRF(77l_ccUydNknQ}i+1D>P}5 n!Q_pHWi>cnUXYBldc+_6iX&l8U+QlL1_lOCS3j3^P6*vW?*1YetP*W0|Nt3fKQ0)|NsC0@3l+5_A{9lBR?&O^=az?r?AhX^ zKJ`|}xhKc{wmmcHYN~POdH6?Z-u)YKA*>=!p_`rx`Y1g~+w}K(=!ugqm6OlREP46) z<%tc}um_ew_+uPkmTV?i>FO#G*fBl!pIQMdo;Iu-wyp3mPix{NLkSfZYQ|R;Tv)|Ks;j;{+ zm%MbCJN4|t-1uj$!QXyy+G+S7n$=h(Vf4P$=+Zu+GpRzmi(01y@l1;A+?W>OqjkL} zcuwDw&??LIPHFIndzUcD>%vLdt#)00?=*IWoU`7!IBZSayNsGAPy4b0 zuBW@bTfv+vUj9OI*N(*r?z0!RTenHx`{<|`*<)O>=MkS-5j$u33!}ToWZ!;ycc}bM zp_Y~3okG1Zxt))r+H4EjmsZ^_V*j0`RKN~*&V~0sa{u@5v+vewbp>Cn-S$`g zl6}bim#^yf`-HIg+#frfPfZEG(R8O`1ps8@H>VJ)ZsolAp3w1?7_x5_Fu9u%4@94C+P18 zVf2`n@z1LK$dvXwcRv19y!ZFum8W&?Z=@5sj-UR^Cz-Tl!^ z&qsCcRelv3Vg28&kE~9dJm=kaYdHpn@7D8t9@Vu6cK(*_f6%ypGgEnk^#R%X3D$Cp ze;kwDJE^?Lz2dZN>3*x7&QiYmI~MC{{gSo6{Qkh+qC48`V6|Y^JuWXgZV+Q!zT(N# s$9;BDU#u^@2PF=u+aIqlIBvh|bU^H^*Anj-7#J8lUHx3vIVCg!03SIuKL7v# literal 0 HcmV?d00001 diff --git a/gfx/pokemon/kingdra/shiny.pal b/gfx/pokemon/kingdra/shiny.pal new file mode 100644 index 0000000..2a65783 --- /dev/null +++ b/gfx/pokemon/kingdra/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 17, 15 + RGB 17, 11, 19 + diff --git a/gfx/pokemon/kingler/anim.asm b/gfx/pokemon/kingler/anim.asm new file mode 100644 index 0000000..b100d0b --- /dev/null +++ b/gfx/pokemon/kingler/anim.asm @@ -0,0 +1,9 @@ + setrepeat 2 + frame 1, 11 + frame 2, 11 + dorepeat 1 + frame 0, 11 + frame 2, 11 + frame 0, 15 + frame 2, 15 + endanim diff --git a/gfx/pokemon/kingler/anim_idle.asm b/gfx/pokemon/kingler/anim_idle.asm new file mode 100644 index 0000000..5cd0200 --- /dev/null +++ b/gfx/pokemon/kingler/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 4 + frame 0, 10 + frame 3, 10 + dorepeat 1 + endanim diff --git a/gfx/pokemon/kingler/back.png b/gfx/pokemon/kingler/back.png new file mode 100644 index 0000000000000000000000000000000000000000..02e058053ebd962b1aeeb659a6272ee1ad23220d GIT binary patch literal 417 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|GvlTy`~}q z1H-9>x7IK)FtC&a`33*~|NnokhFc{A1EYhdi(^Q|t*ukL*Bw#da7lgk|9@rR>IcbF z^WLe>zLNKhgXz+ge`g#_U9PUm)s*uTYF+Tql7Wub*6KCdUnf>qPZ>I`N zx5s8vUsOF{n<2Hj%K6H#2MKpx^s|)zvQXG>dBC1YN=PWKrDb-V3P;RWxd)!d!Wp`c zGF}p7Y^W_e!oZg+f8Bm=J?pbA`xz$08pJl(?JZIjV&;35aQ6I?N2{4vH^zy+W1B85 z89dcBreqrP#sA_@BpY+u{Yy`-I)6g!1?!vSnY=SNuBDke+=}Ag#{Oa--x=|?xuHzL zf#%C+>+oH8?D6w#gG7ShQ}HPsHi6O{yE``RW=dcv5`Drw;l?@Jn8f=_CGRopedEJz z@U?<*hR3b+Yn|7!S9NacsSw@H=e0Ouy6sDQhRS==7dBP0En(K3t@rLLhcW}Z&l~p7 Y?%ZtL+UNf>FfcH9y85}Sb4q9e0Mg>GApigX literal 0 HcmV?d00001 diff --git a/gfx/pokemon/kingler/front.png b/gfx/pokemon/kingler/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5631d87e75af5ca7eeed618fd90da40821757368 GIT binary patch literal 1094 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|NsB@JznoM z6&V;9PA$B(hJk^Br6kBN`2YX^|8q6mDj67pMma4k+aWP{J7I8z2Mt=R>h;j6U%DX z`)aJPbb#5@8G`srXdIs%zsnas*y1&`4oUo?+ zbk`KtRdI2S-W7aad>3;5I&JvsWfa#?xh{Bi8z1}9kb`z7*%P8&tOL@go^X)MpLl1x z%J;yNTTbpeGP5bFUr5AEDM<8u{_UR|-vzAoU+wu#W7>i#I$;Y~MBdy@Q#c_u?am3Y zfG;;4rls^SCT^Xp`7_*0H0<@I$&4XheY!siqWnoCZ!$&N zd)y5Ax6Sl)gO|$9^EwQBqgKZJ_@}sef%(qH)on&yY`<#FdR?}8PArpI>6R0`{e$k( z`jTB%7p_b2XYJnpZ(rO(ho$R-4yD>E&Xv(pzN#{VZ9Q6L_8YM;_%0|+uJqei;?935#Q?QYv*n^mc2{^7#q*t?C(SPB+d+a&pB1eZ@qGUeR3 z)_TXxEwy(aO8&Ciz1I4V;mrl5`%B&LnY=!{Som(^(SJWyTK}lljz7Ke{+578`<=OC z_dot6d;R^6y5nE1|J|-*|No-A;81=YdsoKGlJHF}e=x^Wcb?G8E;!{>RT z+dnPbD!=dEX03Ros@PZi(o64ew)$ZGt~%_y?dts@<$o9-@EY50|G(lM0|Nttr>mdK II;Vst0KO6(ZvX%Q literal 0 HcmV?d00001 diff --git a/gfx/pokemon/kingler/shiny.pal b/gfx/pokemon/kingler/shiny.pal new file mode 100644 index 0000000..9a9c381 --- /dev/null +++ b/gfx/pokemon/kingler/shiny.pal @@ -0,0 +1,4 @@ + + RGB 21, 22, 09 + RGB 12, 13, 11 + diff --git a/gfx/pokemon/koffing/anim.asm b/gfx/pokemon/koffing/anim.asm new file mode 100644 index 0000000..5a426a1 --- /dev/null +++ b/gfx/pokemon/koffing/anim.asm @@ -0,0 +1,6 @@ + frame 1, 20 + frame 2, 06 + frame 3, 05 + frame 4, 10 + frame 5, 15 + endanim diff --git a/gfx/pokemon/koffing/anim_idle.asm b/gfx/pokemon/koffing/anim_idle.asm new file mode 100644 index 0000000..c3ffc25 --- /dev/null +++ b/gfx/pokemon/koffing/anim_idle.asm @@ -0,0 +1,2 @@ + frame 5, 48 + endanim diff --git a/gfx/pokemon/koffing/back.png b/gfx/pokemon/koffing/back.png new file mode 100644 index 0000000000000000000000000000000000000000..fd156a89b739593851eb34666c8ddaac9c984545 GIT binary patch literal 464 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7e=g|U6vHVD z3=G;fm01i73@jx6$|Noz>;a17Oz?kpp;uunKYw9#kp~DIsu2bv(TbnB=F)cgh zlfLWEaW${#%~zl9j9>Kr@9clg?AvtL^Ea&VWZ1#v^MB7zrwJkq&vTM{56E}^6FzLG za88aP{cpwcPn-r#T?O3+ua7ePsPw*f(zm|L=T7!3ZKZ3$Gi@V0&I&#WS90;Pt$J|P zyQ%r+8)L(n>erYqFVdQ&MBb@04XKL%K!iX literal 0 HcmV?d00001 diff --git a/gfx/pokemon/koffing/front.png b/gfx/pokemon/koffing/front.png new file mode 100644 index 0000000000000000000000000000000000000000..1468a07f11b0bbb09aa7b3eeb8bd85e6772f1aa4 GIT binary patch literal 826 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{v5>W?*1ATFWqtfq{W1z$e7@|NsBzg3e7b zoWj7splwr`#lXP8QWE4B{Qv*||G64&l?)6_H$7b(Ln>~)o%J^CumMLK^PT^;(h6^P znX$|`Zl(Tah5a$<6YdW!m#v*z+o9NNFH*v;@QuyE>Hd6%-GToZ`>wS5$-L6D=&=xb z6!o#-{k4$iE(|tO%Uk;FJEVF4%Qe{4&s_dX`HN|^imTB+uXg*j%g#RjsCVIDy=DGA zU9k+O*kk`Ty#K4BxbfdtiD{QJc`GX4wlEaL&wtqO#$hMQ-zc@gK7#2ZgGHX~`DNWb zYafUlk>?XsiS%wTdb|8EqZOyownlsPRu#6-sgs%+k3YWNK7Gl77_|p${ERQ8oLy|f zvcYx2)J2tEyRNFVzj$f5>HKP~7n!Nkzcz0x4Q2hmt^Z!c^5&#&=hurEkAFO<&*bv^ z+`$#5b-K-eOOBsf8fIOzdFJa=r%vS^oWH~R`aTPN!JH1kr>b`f*hK1M;;bI<7j9G+ zuP@r;@*_6xkcK|*9L`UZ9`Wb?v(q=tQ(eV(>w${Wp(>s05Rw6oP>cVpdAdM|^zZzUC zIED6<=!V(p&()gn|KFvZNtN&QW3}e|{x@l%!TtDM*8t<7|GvlTy`~}q z1H-9>x7IK)FtC&a`33*~|NnokhFc{A1LJg07srr_TTiEYE@D>XaB1E3f3E%HrbV9L z?%z`>vz__Y@ZZIx2ZvXGUb_0{LN%pz&pFR6vG33?GTN!mO{9 zQ9j_A&|=rju~(4y!Mg7ZLJ2Z#v-Y`N^r@)Q^OW@r5uUU=mBF;I^?_`}Psex0ntPM# z88fBWR0`RDh%0R0CZ5G(&k&)g(csTu=CHR|Ki<&8@WJhuUKh<7ZcUasd;ap&-Hf)8 zjS{RCXD3uzI9)h5ZF9O|Wx%x`SqTyQ*S~5O+VOI2zo^EqA72@^>@eMJ7J?UWWts7sKh2-8bj_7!k;k6-FY(}v6QqH4kb50y>xEs52 zJ;U$JcOiQ{@~X~1-4hVV`1yH>21kkT2Zl#M512ic3oR&8FG)~yPmPYZ7f&lr6_NjH z))b`VtyagP^M2Ne^$lh+Pm^rEoG5c!Q&no7;Je9p?eDn!7t#*bY}U+tDL+r*^BiZX zdvj89d;jUSycV1yx#4(+_6A!;qx*MV{@)7QD{XL~yP)R4KZgGYxORQk-K4|7z`)?? L>gTe~DWM4f9;V%@ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/krabby/front.png b/gfx/pokemon/krabby/front.png new file mode 100644 index 0000000000000000000000000000000000000000..f790059e8cc6f38c63e3d90bad4c1954c11d63c5 GIT binary patch literal 850 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V07SMW?*3W`Qh9h1_lP60G|-o|NsBL@9}!C zsmQ>{D?^wHDBF{I+w+o;B(rwSY*-~Rvq$+Y5N zO8ldk_i0tOmu8yvuUX-7XWgD_`)U{ik`A9$xim{B%{FJ%u3JZPw1Z}!5S8@3`ryQ| z4QeV|;*TrGNX0jrO=qpVC8l!AVcvnv=;xQ$y`7j-X_vOQq~uo6{cpvLYSDd1Ip@@J zGcU88RC!oD%jFZ7kJ}HYoB3x?@bs|T3H)xpyu;@=-xQWJj++b59c2CBqUR{Bc~f?F zyupG6>LE6b&z-(()>)%Ek6GO>q}twl+G6uJhLVz5%6l2^&hI}}+xw&X-F9sO<;~9} zuFTQr>;IBdd5Lpn_W5gf3vLRpx3-T-s_hQmart*Dzn-`8odsu?zB^#!Q(ye-w#0X_ z68;O5&QFWAnpmbU_~UWdwIkw^7dJl_E4#0;L7`S6Z`+*@tW#gyV$#%9e7iU|{_MxX zo1c!ZQO(sB^1icvqvKJnzMBktXTECqx-PkAaen?|d4UNJBWnYdt}}PcXw|=PVrJqd zn-3Y^#1n5WY1|U-uEQEVdmqDWmW%&RgxY+*Ua>6q6A!!4yoV0QjI}=~pFi?!%R%FR zufDAPJ28EcrddUrN%ixYeyr9u%p&I@@DInli@x)AGFzU1@bA3cb4fN8n_@=07c-}o zzgD+3j@|c4l1axl*aiYWhuU5?JAYPU!o1n34=(SN)c8=B*QQf6@7!4{(>?QNe_d8# zYc3sqjO~2S#l4?+>=@qLG<(Lbw^^()PZJD(?z1^;7IVsYhbF^0V~eGSl55+TB5U0m zr6*iVcPX5%xy4TTKwPcb*S~Ahldj*oWE`xw@72t{I~R=1GqhM&i*zWL`GwKW8T}hwe^E38A z^SnfmvJ8k$O}O`h?`N-jZ(4u+J!3?6iM?@4Px_K}Wwsv&j1Mt<7|NdBUcF=PM z1_p7aONSU37+6Yz{DS}g|NlQ%!>y8mf#J8Oi(^Q|t+!JHg$^rlus+@U`~FTYm8>SQ z-?6t|mK@3pZ1UCo|Ks@igJS9yQER4JGK(!;Eh^pO;aw^Bt9KShc7T_lpwx>!(?o0c zvux>)IxODUEzZxzx~4^s>H4YHU#BK`Z#uF!^zYmo4Y9}W229&~;Nhlk^TQt=ReQJ1 zuJ!7=cIoRseWxG$c(C!o7X!x-)p_b=HDO^pwwed*^Le#Ig-yCs=}1?9cTdf+6>B#> z%zHDtUh>u{qdm(6Y?buor2l1pN!cQGG*zS{_6Fy~gEv0week((nPXXnc!ipS`W(%B zyOuD`5dL#)F6ZA4wI6v)SY@~${9&JN!pC(ZdBrFB`|mgmwm8mZWnf@n@O1TaS?83{ F1OQavnFRm< literal 0 HcmV?d00001 diff --git a/gfx/pokemon/lanturn/front.png b/gfx/pokemon/lanturn/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5b2eaeb5bc9932df839ae28f812e470249a88d2f GIT binary patch literal 847 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1t=`Ln>~)o%OP4i2+Yb?$_V@iy7o! ze40AzZp!u}{YxaSBy;BcT%8v5E1UhH-Hn@W7J=Q1=X?$+WVNr?=biU|2KS2iJ)+k& zX7oAelwVn6u=3%*Z8{>|Ma5n|j8S(LBpBDSSia}-stj{zo|Ij?=f(4f7af{I*xv^~ z;$1Ig+;AeSRr;hYgSgG}FeUbc=XEyS3zj^3?e5%q#^Xr5`PsmZo_8mGLj&c!uT7oa zoxnV$e_pzi*T-u=`lbb)epc6}r9GqP)9k;Z{pn_2tS**cvrhi4e6y@T`Ni?ll^icz z7O?Mds?K^ZR3&P*udmQlIK=VPqXh?TR=#%NX-u^E`i<>N$s9{PmIt+^ay8fIx-u6# zr|ii{=yR!AG0QdksM5SsRr$RtuiI9y+97YTRcQV)y+^0Fs4rI7#&AHp!bN5EblYa` zS0_}TKl$FX&FKDSD}jzu=8n+$TjX*ZH~$OVz3A=iB=JeI>=C&u%VjgKB)0F?^8K|> z|Da=u%t7z}R{Dt=AFlJZB%SrH$p0s&Z+K8nf9CJK50;+G-@RuEt9M*e?$+YCNlm8u zk`JOkP7=|G+ttLYui5xOm0e!tj7FT6%K~ow+gYDJ9PeJQV=NGGbE58F2i=8y8p;e# z_pg{$a@O9y`$Tm^>g9bET@Guuo5am(ZN7ZzuZnErBUM)Wl+P3QERo*g>;5Td+uO2p z-n-_nujCZEZ&uNHcS&rVQTjpegWmQBykAb3eo0Y(sd3z+$>r_SSrT$TOk$3(VA1&{ zlTdp;UZ_d8{-ti!_4rlA8h@7Bzt*qZWAb^rP28-X-gf%FZx$Kq_p;dOpZ%jM-cWZc zeo=6JrqsH>OHK7BzIC_wI6Z8S$iJWuK{Ef1^<{s07j4V`Fo|`|)i>99d+k^wB$%$< ziNE!9X`Z;@!Daieblv+t{nQff`j=`)BFL-xfWrCC~JC zzJGiuo~vH-&(a4=A1wVa9m=`?Qvc|C5GU?e?s0L4R2_r+XWxY~FfcH9y85}Sb4q9e E0D@4E`2YX_ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/lanturn/shiny.pal b/gfx/pokemon/lanturn/shiny.pal new file mode 100644 index 0000000..e1e3e4f --- /dev/null +++ b/gfx/pokemon/lanturn/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 23, 10 + RGB 16, 10, 31 + diff --git a/gfx/pokemon/lapras/anim.asm b/gfx/pokemon/lapras/anim.asm new file mode 100644 index 0000000..7a3c74f --- /dev/null +++ b/gfx/pokemon/lapras/anim.asm @@ -0,0 +1,6 @@ + frame 1, 10 + frame 2, 07 + frame 3, 40 + frame 2, 09 + frame 1, 10 + endanim diff --git a/gfx/pokemon/lapras/anim_idle.asm b/gfx/pokemon/lapras/anim_idle.asm new file mode 100644 index 0000000..936499f --- /dev/null +++ b/gfx/pokemon/lapras/anim_idle.asm @@ -0,0 +1,5 @@ + frame 4, 10 + frame 5, 30 + frame 0, 12 + frame 5, 12 + endanim diff --git a/gfx/pokemon/lapras/back.png b/gfx/pokemon/lapras/back.png new file mode 100644 index 0000000000000000000000000000000000000000..9c17ce37681a70182825fb08af75abdb63a8c137 GIT binary patch literal 428 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|9ow>Q_FJ( z28Q6812Y*I7+6Yz{DS}g|NlQ%!>y8mfzjL3#WAGf*3zlmLWdPNT*P<$pDSIr(WEOa zOZ~FSyJEqq49k02^Jkq}`ckyAZ{L;=eJ(CHp6+3ixVP5qda3R0yFvUrzpnYd#@=uK z%6YNpC3o4Hv1xJ`-+1w=@tR`+^Q&uCF6;fK)mpK){A8JPpy=Al{jJ~RJ!cCo+GxP` zAbAa^hgC&e($#g_Pv0$hJ}r4_?R!%(i6iEmH?3=g_uQ2iexP2Up%)eI`zwew+nvN&eay2`@-9$dVyO>K+Dtq zjvuuyx)Z*xUL&=AJw~@9g?AXk?sz6&@-Aa= zf9S)M=e)Xff}r4u{o%(h+&N@tp|>byQ{VZ9PsccK*JfURC0JFlPA9v6{qZ$&1#b?e l&r3;aIy2)%j@C!Uou}E3eT;9o!@$76;OXk;vd$@?2>{4K!LR@T literal 0 HcmV?d00001 diff --git a/gfx/pokemon/lapras/front.png b/gfx/pokemon/lapras/front.png new file mode 100644 index 0000000000000000000000000000000000000000..f6c2c483b6b457496d0642a821a5044e7b43d673 GIT binary patch literal 947 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@|NsBb*JeAl zJZE5F2(CFWlYxPOr6kBN`2YX^|8q6mDj67~)o!vd@wgQi<+M|%+5P>l#APz=EKALa(m?B(%^H;oNXs9IdDuf?f(>( zo13y(d(&=MtxkID&u6mZ+E1~^Ke)QK21~hkHl#M_I$X4th{AWxM7Wg zij{{+}-poV8eupNbkB8-!>(^lstcQ>gQ&E zi_4w2e$S5*P50dH5Z)iYGT%Yj{lF)+s%I|z+ro6bS2RBjm#>}}V!yCw#?#1KjB{n@ zv9;|z7jgZ>ExrnaUGiOfJ-9jfwa%x?T82fQiu#+q^!}3wedESDUYmQ1CtKgxu~z%- z$29e~aUWfntUFux^KP@sOI51gGwE7!;id33b2m<~YM%0Mm;2vSy1sMLtUPu){x%PD znzP_;)SbDBkdGq!5<^xt&x9sHFX0dJN>suBdbPW6pud`09EzVTv={}xz z*1OXv_+8wh{AFURlhRM!>UMfvA1`}$b^nJ)8|PZ-PuUyZe$674=?;U_=~ws4-9`A; zm3&ypSi>{#RKpy`8x4mmXK#FGy7saEea~5k%}#87{X;{eTr%N}{>rXD^>hB4_Y?N-+s|wyxB1EU@|3b@pWoI+w@r5J zS6&ox=RVBoaBU~vYH!~$&e=uld4V_RlCQ@FR59;4_5*4>lZ%%{R}=^EW1^7 TE=w^mFfe$!`njxgN@xNA7TC+y literal 0 HcmV?d00001 diff --git a/gfx/pokemon/lapras/shiny.pal b/gfx/pokemon/lapras/shiny.pal new file mode 100644 index 0000000..58fa3bc --- /dev/null +++ b/gfx/pokemon/lapras/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 13, 31 + RGB 16, 11, 31 + diff --git a/gfx/pokemon/larvitar/anim.asm b/gfx/pokemon/larvitar/anim.asm new file mode 100644 index 0000000..5e3c68d --- /dev/null +++ b/gfx/pokemon/larvitar/anim.asm @@ -0,0 +1,5 @@ + frame 3, 12 + frame 1, 12 + frame 2, 28 + frame 3, 08 + endanim diff --git a/gfx/pokemon/larvitar/anim_idle.asm b/gfx/pokemon/larvitar/anim_idle.asm new file mode 100644 index 0000000..c4a056b --- /dev/null +++ b/gfx/pokemon/larvitar/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/larvitar/back.png b/gfx/pokemon/larvitar/back.png new file mode 100644 index 0000000000000000000000000000000000000000..84e51b20b01b85e7633f33391361a5c408658746 GIT binary patch literal 379 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7pL~qtoMj6G z1H<<<)=L-|7+6Yz{DS}g|NlQ%!>y8mflSA7a@dljXdLiH`(eZ;Q0ypsO7dWU}!Gf!2L1Df~T$eNJ>mFs{~6+RNzG+pWd2;HE>05?jvO9Xa7uPjm`18h9CQo!!THf_FhJ z%ZaUfuJJ2wo?>_YOYeJ|3(+5PIEz+4|NZ^=vyK(|R_p(l#jie*7LhTR_l#t@(@j0$ zw{IWM+A0tcm);b7a7U+rflKWwi%?&d%p^4p(GRjKGm92jU%4Hyr{$N6v3tuoWFfe$!`njxgN@xNAX)m0+ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/larvitar/front.png b/gfx/pokemon/larvitar/front.png new file mode 100644 index 0000000000000000000000000000000000000000..3f58d0be6ff4d8909c396bccbbe8e18d1297f39c GIT binary patch literal 570 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|Ns9dALBS@ z*}}lU@O_Q-5(WkamXaX9;Q#;s|IgKMt7Kqcyy@xU7*cWT?TnjwM-_Nn&Yt=Izxbvh zOO5PG{_R>eTY{<{i5f3d+U?qrZOAbvVS)IUnLY}07o1OFd&%P5!0u9@>bJu~?0n~u z=M0xORa;u5bcneZO_?;!kxA0EWdHe2TW+o>ku3+NxGM7+xN?5kQt@Qb!HG7!1y^js z4}4g&Be&;nX+U>y^~Aar+cYN6nmi%mjYZ^+8~SMhPo?J{o4)nFiO);TQmLPkQ+!j~ zgvBi;%CJW6c;R@6`3jr+Veh3YoN^T0!jnXWRxb8gx^mj7=rwCk=T;Uu=FZJBIQLd# zhtw{spcf1B&P?%<+-qfFD!#6|DuPFO($WXn6ZUq0uDtmAa^3aqrwl$6b}Wevd$uIR z&EoitwcnC+J{`UMNB+N3c>20?e~RZmNE0~(tE{ic3a(qw@1z{ zS3VzO{fxVwDf0NLem35RhhBQui0YXhPHJ@2*3rp4YT^CUvHADR*Ua}LjuzIWqtdk;kDi2-}ReU g8;7Uw^G>g0ka{Y-H7vIL2LmWkxca%Qb4q9e0Ix;{B>(^b literal 0 HcmV?d00001 diff --git a/gfx/pokemon/larvitar/shiny.pal b/gfx/pokemon/larvitar/shiny.pal new file mode 100644 index 0000000..025a819 --- /dev/null +++ b/gfx/pokemon/larvitar/shiny.pal @@ -0,0 +1,4 @@ + + RGB 18, 23, 10 + RGB 20, 07, 23 + diff --git a/gfx/pokemon/ledian/anim.asm b/gfx/pokemon/ledian/anim.asm new file mode 100644 index 0000000..5cf6ede --- /dev/null +++ b/gfx/pokemon/ledian/anim.asm @@ -0,0 +1,8 @@ + frame 1, 04 + frame 2, 24 + setrepeat 7 + frame 1, 02 + frame 3, 02 + dorepeat 3 + frame 1, 08 + endanim diff --git a/gfx/pokemon/ledian/anim_idle.asm b/gfx/pokemon/ledian/anim_idle.asm new file mode 100644 index 0000000..936e90e --- /dev/null +++ b/gfx/pokemon/ledian/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 4, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/ledian/back.png b/gfx/pokemon/ledian/back.png new file mode 100644 index 0000000000000000000000000000000000000000..6dcd7eb538ef548023ed696d5479028607751b80 GIT binary patch literal 453 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|9`9EJwr_f z1_u3r7a&C}B|(0{An{xcw@L;E#uQH%$B>F!N2fYYJEFkhvh>xz@_AtajcT*vd_TpB zEvq{qI^M5jw&6%k%pV1_F+6TiUE40|o7CBTf97#3&>Qr75sc+qKN`vi%#D-53c#jA? zR&}mk=X~AA-tVN>?%&sZlUMNEFZp(IYD+}zIX}0Y-4~Y^I7mybW|_9XBmaur#`PCP zC$juiTQkQX=-;K&W*Wi^=arq>bzf+OdiSlDjd#n%9fTV8vY!(&@Ly{(DekN;!x?sg zFDo-G+-2_;|J=;^>*S*;JXOkR9KQ}8k~tW@NHm_c!Bk;C1n?3tyeCIz1@E@eSu}M({zzv_OqsO-(eSdv73Q`fx*+&&t;uc GLK6UX7Q`d~ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/ledian/front.png b/gfx/pokemon/ledian/front.png new file mode 100644 index 0000000000000000000000000000000000000000..d5773cbbaba0b286a94726b97c47ddbcd2923e56 GIT binary patch literal 832 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1@(g9T0Quvf2^?QdOlB@orptDq)CSw z%WSTRH@fpyPbf_MHvJIG#6xTEFuODPE}6y4f9Ocoj^j+6OLkduI9=Ptxz3g6b4u{5 zpNt)S$veb)S0`*)ms~TMW=fhSujylUYqVT2)oJf_%ZWYtd|^!g&6`Wg zPdwf|U2d_%?S}%vGxq**PHRhNx9wfEl9SDLt-JKCbF*6#77B|k|2=E>uWh|5^)btv zUh&mUdg0KZ9`g9zv+hX&-!Dzo@twTmQ-{3B+XGEqrTvdeW`QR#WGji^n7{3A&u6cy)dCjSYot zt!Z1e?LJ>Qw)*SKS-*}s`>whv-Y+N3A2!v)&#cP*(5<>VQqIg9PK5EE{C+m%gSTYyBoe)T|xYYML}175?MYf2gXzQ=w8572el>`g>{oheZ`w->xp(v0O@5AW5i zN{;&=RPk)-G2cB8mgd#(K6vo?9+A+;PnP~a>Rnl%DV=;TzU$GCfB%F&@BZzbvppg1 zPJEKx&iyH6yfY5{_THvkA(m6QQu=jyO+9C`!h4W2YW7cgKYh~lx)a{@+YYER{a|dE R!N9=4;OXk;vd$@?2>?^ij&T40 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/ledian/shiny.pal b/gfx/pokemon/ledian/shiny.pal new file mode 100644 index 0000000..f404bc1 --- /dev/null +++ b/gfx/pokemon/ledian/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 26, 00 + RGB 31, 17, 00 + diff --git a/gfx/pokemon/ledyba/anim.asm b/gfx/pokemon/ledyba/anim.asm new file mode 100644 index 0000000..28f2bec --- /dev/null +++ b/gfx/pokemon/ledyba/anim.asm @@ -0,0 +1,6 @@ + frame 1, 08 + setrepeat 2 + frame 2, 10 + frame 3, 12 + dorepeat 2 + endanim diff --git a/gfx/pokemon/ledyba/anim_idle.asm b/gfx/pokemon/ledyba/anim_idle.asm new file mode 100644 index 0000000..21cfa00 --- /dev/null +++ b/gfx/pokemon/ledyba/anim_idle.asm @@ -0,0 +1,6 @@ + frame 3, 07 + setrepeat 3 + frame 4, 05 + frame 3, 05 + dorepeat 2 + endanim diff --git a/gfx/pokemon/ledyba/back.png b/gfx/pokemon/ledyba/back.png new file mode 100644 index 0000000000000000000000000000000000000000..e9f080747086d333138911284235d5a49894f476 GIT binary patch literal 531 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7e{GJ_Jwr_f z28P(w&u1AJ7+6Yz{DS}g|NlQ%!>y8mfpL?ki(^Q|t*c>->BpWL{;qWyHPQ0l__ zlIvM!Y&r5-!!YubHIuVWi@ep{?)eFZTEE?1d~TiZvD}1tU4pv9=B8bmf07E!q(d`z zKNL`Ln-k}nkh7ZcSc&j`Nr~LAELrl~d9-F~1!m>6Z=UAfRkZoql9|iD$(>#uTWq!X z*3m@?56#`yRo_x}U!FAm^OdHxD{VeHm$Ot)-pL_z-P`g~DA)flE?FGYrOm$XyvmV! zL-^WQf3*GWAMZa5ClffezSS`7Vqjok@O1TaS?83{1OPd{@T33$ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/ledyba/front.png b/gfx/pokemon/ledyba/front.png new file mode 100644 index 0000000000000000000000000000000000000000..3176706321e67b6e08c9a68672e1534dd4c0e639 GIT binary patch literal 913 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1%af=t(lZG zmId+KPOc8WF3`uk;*HYUzdyP;eu{R^n-QO;Be8z{?D^lmT(H|$sk@v^FE*2x>x~Qy0`s{A*6p9pG@mVxqa>zcx6Ow0QjNE-e`S2@)-?U7shY@dJC(={ z$6YHT%>xd8{Wj@?z{4Hqe*XUrg|5$fR*}D7b zr~0{Us}i;>Tc2}ME>2zV-fQ7^+{`Dwt1x|Y`r=={@>pe7$MgI4+b^(o%4QyCSoP3w z>&2)SPC6AYlK5<_{<+x)?c#r;@XJE! zW8r-*KZU})-ZY87G8S4}SfbjvW-@%AoO>ifhV{#-xaE4%lVt_ww0Mi?h`rKWKVh4p zOQPVHV~dh{n{=1#TaeD=6#G$z^#seF!V~FSk5tq2?(oezdj0e}tL3YUpRHb9v9jXj z^p8Qte?D@5Yn#680Pjaj{jJycm~f;n`Jd)qUZvw2Cw2eno+HNRDl#{mzs4%Rh*O{U z+f9+b#fQ8n*P1b|Uo>|*+wYte7dJ1Q`%2Eor0{KylX5Lf98>aq=D%z9nA}u9JYQJ< zp=ZFJ5D*Oic**~%>JjU9LESwn%u_ZiWXlwvdg7`Hy-x{a508q)aZ zO?TV2nBm~3-hWCG->z}@7zElRdl(D0R!vzda>qOM($wdw-pl+eJ*Ag_n=<_Y{|BKx zr@fWy`YSp8>;vCbt`yY=!O+^3^N!cv{=DP)*QLLo7sf}%TYV0Si?{l8Y306>M@xfi zUmo#({wwH|_x7(#Tc+o|^0w3utzG%b`zRECwRv~nre8Zw3k-kN#rt<7|37HTHA77X z1_q00H6;cH29}Z_zhIDfu7+DB0|TS3r;B4q#jUqfP757Y;Bb9<@BjbjUHmRbe0IHF zRIaxqJ9#3}oKAB!0SnDsM*UiDw8c-)}$*K3KjUw?sfve3t$q*i` zfJ+=~Z{M}@vsG6WJTHw5W_0yho$*+^CotRO#t(&pJFmX4+Rk!f#ft~i4|-iZn{ZC? zllEGFL#?7IeHC1n4_K~=2wFXPL*?fuu9N+mKgOywJvLt`Jtc>2+hmS4h3lGj^md7* zx9M(x1i)jY{yoM#UJHhwVB(52&qx}2!IX-))o%cOmlFN|y z+_ZB&GaYAb40>Yo%e^wvG*M<5e@%A4zy=1#dH$8Wi78is6ea|@WV=z#Rs;<-9U9q-*s=<~dM z&nbQSN6uLTjuHvMBt#-cmPV^=gG(YVYyjR<4>7;n@@Pc9q z!)8xz4#t~Sa~-NGrtJLqpI1vw@n1vXTb1SWJJy_Rlv>xnwQ7U^gR9QVn$6gb96kGX zt@-4$GWAbq?>u>p|Bq$VUI~5aZOmI4cBqGhAH5f`Ih;4Z`114BlV`kfS#7!O){J)1 zN!DT>l5gcp7k<2Rpr>DDS%A9%yT$&Mol|F+E8I#wowT87iKXo|FQ!}*^E>Y+%oE%A zV^Vrod1KOgha}H?`%`8x|?M-FkK5%F!haSM5)`Dcxp%c&XcKrt4>YKWPE~lMBA| z>4|+;$o=M&{W0Z3)db_5S>^uGR`Tp^uNB*`Pn@>Pi`U#-=$md|d-6<`{NCCfw{KoZ zkPhiDUtzrME!XqUevc~K*50r=|M15CE4#8*?`~e-ZhR%}s$=K3^1QtKO_u$kpU!Pf zZd_UT;@jC@+Wi|~f`&WH?|u{z zRF1GKJ?_^avi_aHO3|S5CGR}$eyqPNYabUVH={MsW*^H=g_ZJm|FG4ibgsXnufU!x zQ^NA`q{3eoJKnmNd~bN`Uh}=-sVX_n_vHnjZIDYzyP?EIS&gbCjCU{g|D2}jQo^2Q zCVg3UmAca|X0zz;uld&8+!bAZpsDVz;laYd`R^J8IVM)I&s(tiUg25xA1xkxozqt? ztU5lqsPYspElnsRFM7Jx3;9wJ7m_by$+mBef6nrXEXrA9?rk;_GYT%P*L2?0Baz)vEp8 z=2=OK-{y&)eG;ByS=#<3sQlSwS(EwC6_!|ksBn39MONeWV$=2SCiv>Cv)-^|U)^2C z)ecI#9?#@o{?6m>MBV6Defw8fd;Rn+&#{>PZo&VU@-O9ii*_Y9B;Hl5O#8P_x&Hpd n{qIlQhd6nq^*_hEAKB-hHOLeAtf$Ptz`)??>gTe~DWM4fVst<7f3D|w5W{~4 z28OGVwbK|F7+6Yz{DS}g|NlQ%!>y8mflnd*!$P%C-ZZ660iohIZX9KedUBJISL67NH&xzO z;-9|DU!Bh&60$|WRKngOgz5OKvYG3*JKsE0$|g|AwQ=PN{&UQ6ow5z9_laHh-xlL4 z!qB?D>FRC=`EytPa!k0o-S?HyHHY&z=a?qc7)vm_m7iU7z09@PK%M8!QxWL`ws-z^ z3&a~%DCt&hom)TaDo@6iM$QMBV(TKFFT8tT1@|7tx$pn%47_`wnswd&(@YiCyVmyi kHa@-(6|~{i_nGyU%B%)&S7jA4FfcH9y85}Sb4q9e07>_p<^TWy literal 0 HcmV?d00001 diff --git a/gfx/pokemon/lugia/front.png b/gfx/pokemon/lugia/front.png new file mode 100644 index 0000000000000000000000000000000000000000..29c21ee3cb2110f509914239008c6d94a8bb446e GIT binary patch literal 2154 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU^3ufW?*1=G9@B|fq{W1z$e7@|NsBzdY%U{ z{AXZbxEfhIje&uIr6kBN`2YX^|8q6mDj66!I6Yk)Ln>~)o!ea`qsimy`0IcDxeo#! zOpP;&Lg&OnSfYs_SBZ2dMc^^v!-t~ncw3bthW3--zAONMI0NortUGj z(V9EuiqV#GyZ4Eq)AD`Rv@F_QnyX+Mxo_+Li-%hFp1pT}EUALdEM;8)}lDBQ>n9tMUB$^pV?rN5m+$GFPiz=v+t07fl5yI*VnK`2waAFZb^U&?Ze{$`NYv9$kZF%( zZC)1SBy)J~b^bD^CzB_qPqujMd2M-R_W|2TStnQBzss&qS`pOTT~M-qF1xuRH?uQG z_Pv8uv(lf$w@U9?(qtv5D_I%Al3OzvLo*?;fPd|F)aV0HPLnG4t7JNRDW?2Q*ei~217RkiP#u&>H} z`JBp4!DsgQ>TWR+srdG8Wx2p}h5G^Ps@#Q(&Xr!b4!Dy#Tl4u|U$r-Df4-7^TD94! zVMWxO*Rm(_>^f#AY_DP$-ehwy@O?nDi20kouY8f}j(z;ctJ*cnw-_?nUAIm<`)cbw z$CEZT*R2CsBkT7%KmQc?p5q%;&O!|*3#Pt13yoY0YZ{zSoZ@)#m@n4tLieYl1uHzi6&}x< zRBu~;Li#KJorQ-M^;^3rz5E<`b><(LGYhU?Y_)d#w?V&EZbvfnT)+9D_A)J(o^N)V z^83Qu&5Kw#T@O9~7N25Lwy!a5LBZ&>w4>tedRY%r=#K=W*NVz*OrpFZ*(pJ4bJ5 zmw(y)<7Kb)q-pnd9{vz{cL&H2DDf%sE?5jiSnf!Ezd0$5Tlu3&O_;vZ!_7+XJj}}9 z)P{9gKL~jtV5falR$TFWB!ivb5X(Zd+ARf^zA+W>XhuX^RK%2r=34_RMr}#1r%MTpy*QCJhk>2-&9SdyIgyU zjz_sU$d|t`YSO5c+nH>B((c_2-%snG^Hnaks|nMr2?K@8RqOJcmV>efWgl)XDt7;| z=1}_8&x_3e?4wETn`e}B9F9mTxH+lP3|H;D6{pPIj;+4t7Z7tuSK_4TeZf0(U)$(H{> ze$$e}xBu&wcU*b5_MYMT>%!#*^RF70_Y_@cF6WqkmATvlL}bjLI^TN9`B$CRQzoA{ zFWY@yYya;xayy&t{XZR%b^38gHfqNH50QJXT8A8xx+4gJU;9>+yX;kdB^&s@qssk? z^`d)%AR(4=7(DVka_Nt9=Jj_3|K}}u(q~^iGpP6Aj^oA*3=9mOu6{1-oD!M<@t#89 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/lugia/shiny.pal b/gfx/pokemon/lugia/shiny.pal new file mode 100644 index 0000000..22a7970 --- /dev/null +++ b/gfx/pokemon/lugia/shiny.pal @@ -0,0 +1,4 @@ + + RGB 18, 28, 28 + RGB 27, 00, 14 + diff --git a/gfx/pokemon/machamp/anim.asm b/gfx/pokemon/machamp/anim.asm new file mode 100644 index 0000000..8e015b3 --- /dev/null +++ b/gfx/pokemon/machamp/anim.asm @@ -0,0 +1,10 @@ + frame 0, 04 + frame 1, 30 + setrepeat 3 + frame 2, 05 + frame 6, 03 + frame 3, 05 + frame 4, 03 + dorepeat 3 + frame 7, 08 + endanim diff --git a/gfx/pokemon/machamp/anim_idle.asm b/gfx/pokemon/machamp/anim_idle.asm new file mode 100644 index 0000000..b3dcecd --- /dev/null +++ b/gfx/pokemon/machamp/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 5, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/machamp/back.png b/gfx/pokemon/machamp/back.png new file mode 100644 index 0000000000000000000000000000000000000000..9fd20fd701317549de88bedde9ef03aee0b597e7 GIT binary patch literal 580 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjjKLSCk?H z0|V=`SbGKr29}Z_zu^D>|Nqa`aI0isV0`T9;uunKYicO>y2Az>+TZ@Z|0873qH;BO zy65dJHxK@~^ZaG|k5zh(biW;}TRqwq|_OpBi%>yiYX zeQ&@2g@|@Xq)4nk;Qq~5P~VZq=FG;o zLA4L%61a+NBclXXxGTD7`w)p!kyA{rGeEX0zLuX4^lIE;gH#V$EQ+Xa>Vj@|5X7AUX zZypwJW9{I`o2I0&d4l4t$i+d7n&QrVD`qWHdvkN^?)E1EOxHg>*|IhzkVpN))C*a! z&P`T)mRD@9I-jkgd$GnF9-Zd2Lx1CIkK~!SnTOA-XnUyc%y-E)*WPmR#ZM8ga(Wey z4j&D$t<<}3^YPj0jaEl~Pu$0$G2i1yv2e(VEj8i)_?`JzSGg?FxE1wvvO%wATdv`h p*8acTj*FX993n0D+3Njc*!qf7qRHyhKL!Q{22WQ%mvv4FO#mL_3$XwI literal 0 HcmV?d00001 diff --git a/gfx/pokemon/machamp/front.png b/gfx/pokemon/machamp/front.png new file mode 100644 index 0000000000000000000000000000000000000000..b06c66af653fc474b2f2e13844c0aa7d25229a0d GIT binary patch literal 1958 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU_8LV%)r2K;9c|^1_lP60G|-o|NsB5of730 zrO3d*!1^rKo`HdZr6kBN`2YX^|8q6mDj68qT|HeKLn>~)jlNlS$AClh!~g#=o4Iu5 zPJf;-Z`lu%lO=Dm1(=SQ7G-~Kba~tD98eyxYp?dF>k89z3K?$iHtGqih~2Q$@^Qn) zEq69Za_K9aEz*|}YT%H4+BvO>Noa06H%t2RLJP)4Pgx%cw=iy5?NQM5v@t~{CW@=8 zP;a9Bi{}Rty_G&rQdL$+k+@|$`N8Q~1#^RU@;%wVMx}Y;|CvT<;gio*ai}$Xn!Qy- zWaE*8X8+_B#8-%Goa<3Kyjb*jScXyEu|S@=XU|NMIJKQ`a?*F^iOct2Xn1hhS!FTv z-&x1Go^i8<3Uf>lIc)z*;(Do;z|l`e*)Dx*b9ERuU25E&!Zo3=V;PU?!6UC$uevU3 zgXo6I(To`sBzwH0aJ0p$^!=TT*bPSn^f2`^fp%S z{JH4JhBNzo88Q#7IOXeO&OPO4%8joFO*T00!v>Bo7L)fpwfH*wompgPyr<3P8*^2!e-TL%^v}G> zV3_WF*4t*8ov_Ems)B+Y?<7;o%p+&*Ke5QJ@5zH#CpP9aD0lwyWi_(g;q=w#&Yi|* zk6!fcUi0|b^BH<44{!bbu8VK0N`^$M&(|#y_m*U`s8j{LKb2(l>(tFhkFP;@~3V_l29K%X5{lUo_(D&{(k6CHiYyQ>b>RL#%YUoM%hm)3SxT{$&>J6x3XK zf@=fck}20-@V%Ix`dj6}+^0%kuC2ete&W9MzAK#>OBtH&AJ5a8D4MZ4py!3Jy?5lM zPkhcNUtKoa)p4A)o z3Rh0DE_^6EYr3Zsv(f$!S1(tb?khi`kbSeQJYY%Mz9W_GX}-VTO)HP6TKY)V z{-kvkqr>}(;~mz|Waph1j<+vz4-parEj_W z4{KR13IEF%&}bE!|4a75qDf25|MH2x%&WZj{z75(+dqr$C+4PK|2n7K!sx3)e}(&Z zUG9e9dlR`CHRb&(-JP03^V0VyJL~c|c%MwdowAQzp_1)RVwk(isgF_pMCJGG5KEO6sNtG*>;a)#XkMIz}#QS z{?pRCLBG9>vdH^wh8|I6pC|0D6^tuNMR zSUN7)F)yz>{_v6Ick7K>BtLW0>0hmbeD5pq<=(xawD`Vb@o7Vz<@fJ@wcg^!vK*5gj$E6#{V$)#o%P}m+5hr|Z)FdCV_)|`w!`nN!qn&Ldk%-lO4qCJah~7N zv*%k+xr_S;(f2Rb9)QK@in`^gSV zobXMHmdmcb*j(PRt}gGt$KJ1(ncx55kp2{Ne#7$D5>EQZg6i6mGxS2YnwByhb&Pn> zzrZ4k>utaayKAi*H(uzwI5$lC_07+H{x8z+eN60o*;rn4!1iNbZgmG=#c?LqFJB*3 z&KJ!&wQO^3*y`1D-fy1u=gnQa)hz4kj@KWyezo^g)%rd6wCyX`-?@DG^!HPXFIZNu zpTixS^Yh{5!u`w!x$oD1w~pEy9`}Cg_Nx7h@4a8~-TKwvzDKfG->;~1|7yMJe&Fvl zb@%O7zbgN;sqXj&<`w^2CoenNV7hv5=2VqV_2>n+S}gBaiZ*+$d04Pl&P>2pqvF-s z1KacqF1){CD!l6c$MD~>*_pA(87E}_;$KMSgKV=uVf~LGnl(dHyYW&M0|Nttr>mdK II;Vst00@!Os{jB1 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/machamp/shiny.pal b/gfx/pokemon/machamp/shiny.pal new file mode 100644 index 0000000..afe8a06 --- /dev/null +++ b/gfx/pokemon/machamp/shiny.pal @@ -0,0 +1,4 @@ + + RGB 14, 17, 11 + RGB 09, 12, 04 + diff --git a/gfx/pokemon/machoke/anim.asm b/gfx/pokemon/machoke/anim.asm new file mode 100644 index 0000000..56fd791 --- /dev/null +++ b/gfx/pokemon/machoke/anim.asm @@ -0,0 +1,4 @@ + frame 1, 12 + frame 2, 40 + frame 1, 10 + endanim diff --git a/gfx/pokemon/machoke/anim_idle.asm b/gfx/pokemon/machoke/anim_idle.asm new file mode 100644 index 0000000..2116d5d --- /dev/null +++ b/gfx/pokemon/machoke/anim_idle.asm @@ -0,0 +1,9 @@ + frame 4, 06 + frame 5, 25 + frame 4, 05 + frame 6, 20 + setrepeat 2 + frame 3, 08 + frame 6, 08 + dorepeat 5 + endanim diff --git a/gfx/pokemon/machoke/back.png b/gfx/pokemon/machoke/back.png new file mode 100644 index 0000000000000000000000000000000000000000..a6f9c2c4cfcad7634f40bc317ce0abd95f104df7 GIT binary patch literal 447 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7-_jGcRZ)?F zf#IEwr8ffu14~JeU-19`|NrM|xK%PRFvfYhIEGZ*x;iCV=&%BZ>(Sl+ZNpinaLo9& zIc=8ToNAYOYyX}+6l1^Q`0RbIKJV<_{rYI4U+w5p|L*Uy<Nda5N&n=?AC7`n$_gVi~d|8NS3Z zX*w>wy;)def0);qy<8_aZm!A+QJeF;_Sb9XISlSgEG`~8a^cmC1xw5(M9i4&QM{0& zY0mc*9!Crdwz#bg*|>h z>5QyQUD~%Pv#7QwAge*9ahG;*tp=yD!;<8FzP~JG%jR;g%27N!L4wIF@=UtqRm1bI zJuDcC)a_2sN)!J&xxu>aYzdoMi|B5K14_3$c}*BAiWyg{+ZdGi)^i*vW?*1YetP*W0|Nt3fKQ0)|NsA6dZM-} zDl#xIywkDtW?*1oDGBlm{{R2~|6C2XN(Kg&Bc3jfAr-gY&gm?ZR^)LNeE$42 zcbdWX^kJA%V{8Aia~$7Ur)?CNdH>oboe&<8(4S9)RyDo)zGLR5%OCgGIHk;Oov=CH zW0%I&XjhK=i_`+sPF#AlcK2t7+w8ad%{MPv*ShAof|V6hyTHQv{l2!+wF-?WQ%apS zYiYBeSo`rUI$vBGwQ_T2R|ibvuBtod6*5)hc;n{RqSiNsOuSbYDU1B}aM$z7lH}_C za8XtIxRaSe_xTy=y|eTE=bs4;`r4r~@&28op9<%$(^_?{M98)(C}p05{q&U%OTxlt z9=)D$?elJ-%a*HqjxW2C5*rg0rWO2bm3I6O#?za(JQIlI_mkUO&@oYbARU7^>+~!b~Q;}kyn--mO&aB&YMtphT zPHTIER=EiKC;giRa(U)ID)D);IH2cEvHkzb{!`e@yv&4!12O7!v@H1GX5S(eJ+`D)QdC8LYqbkdnit=r_cPno_UR?_mYd-xNr zDI6uCy4{i=uFvn*U4Qyz&tEqARUdQ$%TLNimb|R#H-Z_6OM?n#Lm7?Ab=Cc>1#Pi-Ytm(ey5%*4E?JpC7+aKo(U7TkA&MD~RG!YfA=?3DN1QDn`#I8|9L@7;u=0B&yk@&#cFg8V;KzI)8ab2We8 z1HKH-)AxDqD7x*jTesxb*;jf|cT+TbzujTnXmndtHB43eY}p;gwL2Y|<7O_-->JMX z(II~Q1?hJgU*}wG?zWyLb@H@q@!H2v`|8ry?MR+=@vLln*7Gy6d=J~K<1}jTY@D+= z?_I>51E*y_XRFk`lZbcQ@u=?~*ZUod8xN?KZ#Z0gNLF))@($%4kG~fkH_tD;bN~Gc z&t1B+zSp(y{m`=ex9qp7se8qq?zx}XpvZZt<7zqBXHD@u`p zfk80g>P`j*29}Z_zu^D>|Nqa`aI0isU<~$jaSW-r^)~eOG-gGP<|qIESF(O=di>(e zZ95&?uO+u!@*2DT+`ezpuxP_)?WmRy=jAnY^mX$Cw`((V8O|``^i`#ZxKjUFccdd*T@WispOZNWX#*;60+6ug+g`sdrJ z6&?wJN=5sg#aVs`dVNrGKKGTToSj$aOCNk6cw}X~ayQ?0@;S s%KF7(o42Rc+?cRGM(oa^cuD)%#jFbsdY3OEZ?Ln>~)jkuV1M1e>73zj3-0u0Q&kp_6+`zQGFSo|nU8`W1VoAsq>$bI@{G3uJ%B+Z9pe~)t zQoyI1c4wCoXOCxK>bLn>j}1@E+cfnai)QQEC^Q{KI00>7j_6+#}Ow z@W!Pd>tvqQpJ00<+%V?QK+{w3azZ za#N1e>Ced*7;Y*?zwL?E>Mrq`SE-;lWqZ`YYZ(q{>sPR zhjn45i_uRW@rx@1rV4kxePC?0B6Jqt@fXIESCyXsZudEn>#T0>mnG7{4_^9hyzgC{ zyY6KAv;+2^W_~)Ae&YKZt<7|9^_tUV$hE z28J1B&#p2sFtC&a`2~Z-b2Z#585kIiJzX3_DsH_EjpjRSz@h!)UwPc2)v2mWuGSr2 zk{R_jfn&$_V?q9(3gCou6gb8Dp__04X14Rz_d`e7TG`;D-=H*W9@*YRe zf3VMLn|ETm!tzDO>e*X&s4^BYvo2P9utw=|I8Q#;-7F2xzVoHk3lt4(l@wI$&oI=r zZ_n1aD67~QRdceTF4@$pRp@5_)r!Rz7DaErH$V79Yh$xCSHb#Pn+JI>SM@C_?WvKT zwNp9ePs6rjg+^;;**0!1II^Y0ExEVp-nuvrt3Pjcwa)2HGh(rSvPo{8SJ^eLkGm(f z-Bl_NThq+4xxZ^dkl#Zyzh{TcT|I2sZvJR3Tr4E(CQ-~{cC5(Iw6y4CsC8j2-zn)W z_fvM{-zfMnPcTfg>Dy_0!B1R^7DvuL9mbW^Q(j_woZaat`{i}@;)VW?*1ATFWqtfq{W1z$e7@|NsC0r+DoZ zh+<%1m{IoZDgy%pOG%JlFi1RC!>y8mf$58{@BWdlCg~T-^52pZ4Q`&J;txZU6XQtz_bznel0GMTq8Yg+3h zA2t6}Zps?v0T_@7~!1E{9DiG_2FA0NpHW$oHWnHSu2Uhqb^cVX+Qy01$$4()MKe$lk&%7^q=lljx%UH$QR zPl!)y?`I)Br=P5QTAbsU=6}58aY;k}>XVp&!%tP$G&E4`EFgfJ(G z*t#%zX2r6fkBImp=XRtmYlCgqtmj@GqWXtzJLZ)6hVXx!XRE`-@cKaRE-^iY7vB~- zmKG@|zvDXKs;Q_oVQtrsXUocsF3NIk?w+<$>X&q557!J~_nQmP+*y25A@8PY-1;BW zoFD#MTxp?a)i_h0GpRmPK-A{Lr0GInXL+CW-v8b9PV--x)CtqAP9C{`cw&g0RRzEK z8T*fNdSP9YrlZ0|)_4Aw=WABN;ZDt+FWtXS|MB9V(ENMxhfe-gmAMyxXi|0Med{y6 rmG`S9%kOFko&Y(Is8fq}u()z4*}Q$iB}FV&7( literal 0 HcmV?d00001 diff --git a/gfx/pokemon/magby/shiny.pal b/gfx/pokemon/magby/shiny.pal new file mode 100644 index 0000000..ee96faf --- /dev/null +++ b/gfx/pokemon/magby/shiny.pal @@ -0,0 +1,4 @@ + + RGB 30, 26, 09 + RGB 31, 16, 00 + diff --git a/gfx/pokemon/magcargo/anim.asm b/gfx/pokemon/magcargo/anim.asm new file mode 100644 index 0000000..a36d96c --- /dev/null +++ b/gfx/pokemon/magcargo/anim.asm @@ -0,0 +1,6 @@ + frame 1, 05 + frame 2, 10 + frame 3, 10 + frame 4, 10 + frame 1, 25 + endanim diff --git a/gfx/pokemon/magcargo/anim_idle.asm b/gfx/pokemon/magcargo/anim_idle.asm new file mode 100644 index 0000000..7054543 --- /dev/null +++ b/gfx/pokemon/magcargo/anim_idle.asm @@ -0,0 +1,2 @@ + frame 1, 60 + endanim diff --git a/gfx/pokemon/magcargo/back.png b/gfx/pokemon/magcargo/back.png new file mode 100644 index 0000000000000000000000000000000000000000..a1db71ec2dfe13746bcd8ac120d7459c3188cb2f GIT binary patch literal 488 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f6dY>$f=rv zfx$}o?sWzR29}Z_zu^D>|Nqa`aI0isU~KnvaSW-r^>*sXNskS9oH-x;|6h5=H78@| zmyN64)>&}29(SFRv-$sHe*S-9{Qvm46c!#Akxx6|u!o_}IQ9Mkll=`dJe2AK-sU&0 zWM_}5+OEXclKQ8CjlJQpoTG%;^2G;B_Nd9M3p^gPdXv*i^%$45eb)-l??{>-s$;v3 zL-x>S`B@XsmNIB-TIa4hHZfmtd!}^V*`hLmcn1A^osHt9jAgAEg?IM9b~|HU`|gCl zOjLiN;I^-Qy~}^xPSkf=-BDt*r&{>sV~4tFhJUJ!HI)8e>?~K`bVhHB)(RuD17F`f zyEG*|{6YJI)&Eb#PF?&yi%%iXHeT7UgW-<6aA)7~9f=$&g-oFzPVKBIN}3YYKd0X= z%ue*omOXc$AAh#PV=d>FefBY~+!szaXG!iZZZ2cF`R{6&AG<+yzLewIhjD-VRy5ee z-G5uO@=?W+i+r*sn^(MG*%fQ@PDSJNDd7b-HCPW+$()c*VpM)RC29LY3uug#TNQKS`bEC!pQqZ~nj(73;?BPO z`A?tz4AQr|pZR!>?ZpZESkIhX9~hd#f5h(KY~kNFP0y9Y8H)ovIzF+6G~NjQx=b)- zxdqpRNo~70?Y7rVlC8$$KHpFNB4m?0 z!`8D}r)!N`Z(+WC|D8XVH*ASk$(!%Sv@PP~Y>t~kQ{zLG7wXzpYktkgS}5S z-DFPnFpbrlkhaz35Q}6R0Lf)bYpm?^RC`A>(nEE{R_7|Vnvq)yjj21!7XXK+owWPbC1jW{H2nV)}P(6 z%OaE0kT?IGMC;Qn7w^=&-rza8hgs_U>*wdVe=O3JzhhDNbFap~caJ{>#Xh)QQu|4$ zhsmz;q*|)poeu}Sb6Q_4`FPUXtp4Y5|G1=Vv4h>J`Ws#O8cn9{nexzGSv(;5sCPkB zRzUJW?-kkA4!xrKiVtlMCYmsi zoQ-TbxyPHP-^dHhUC`KWsb6WJoqMKoVN$t<7|31iYii8&f z1B2QvwNwTM29}Z_zu^D>|Nqa`aI0isV65_VaSW-rb#+Q)(Gdk6m%#6T-^;93nBl`} zmwf(F(N|~g-eW(+#pS<34VF@H#kw)tI?$qz?VbQ=lJm7nfCVQ1c47m>Q`TXnzDcMtaA;kTBVxy z|6Du$!MBDuz8CH3Q{VdjI`~EHn?R9(+|HM}ZzJONb7a*hXH=amiFxa*FfejgwsWqC-`n_wwPwd{>90<%3HpZ`gU)9z?WkTB zuKjdbK}V|j^Sr0qO-&5jT=#U!N^IMEqv2QS-))>fbvC)5$T68-!1t=7xUzsfXLhO3 zjoeo+SL!#cW@RjSdgn;c&UInu86Gnq_;9Ut($ej5>mFYD;$U%&zkY>*y!JxYAKbUu iOKdkXB}jf?zdMoj;@!D-J}@vaFnGH9xvXL;*+Mjxv-!kX$_P2B=%?)_aUD1B{;UXi283)_5e!Nk*Yzkt5j*S6-Z9c>hkU=C`qJfNlSy*}{i8rv`rDx>KY7&!xqS&z;rr zyxXDR`A&yjBzul=p6Jl?`>AxSS*4)qM~IB_zb6x?-r-jId&IEcjmg6L-RkpKxn^wb z$+QuCxHslNc$4x4HwLS(PuEYVds4lc<+Z>B(Kh9&XB)n8il&r#1q`VyMIP9Rw`lMoi`luT+g0N_{44G_V(!Fm8QBIw@z+spT>IZ_3wR# zZa*@d#2PnUebRRH2E%v3z55Jy#oh?-kzOe{>ENwRek^Z#;zB2+9g^I)Wd6b}W@mMm z-K;$@w=^&7`(D}qa}xq(583>jBTH}gt<824nkSMRp5%4x=hZu#TPKLA z9ru5|{4CRkqL`WPlBFF-KVQ2eA8pHHE7l$C8Yhq!TkXei?ctUWSrSk7_pF`1E$&zD zUX}2@D#m+{D1W%%J>#Wn$F*(yR!sNXl<2D;$+aeQ@0CX}SG_ahbY3mBIs0#6T+oB5 zaY>1LE_km@3I8f|)LEu0;*z)csY!9C*n~Ixe7$sV!LfNSmZm9H|B2CG+8N~Kbkq2< zx8e+)J)IYpRcWSP*cGSryESf6cC>!(-Ys7*UGu)bX8MOP{gc;3e#vLZ|@6#f8X)9`p&-iTi?BZ*Ja+yCueoWCw>85kHCJYD@<);T3K0RRLBjwS#A literal 0 HcmV?d00001 diff --git a/gfx/pokemon/magikarp/shiny.pal b/gfx/pokemon/magikarp/shiny.pal new file mode 100644 index 0000000..24fb007 --- /dev/null +++ b/gfx/pokemon/magikarp/shiny.pal @@ -0,0 +1,4 @@ + + RGB 25, 24, 00 + RGB 16, 16, 00 + diff --git a/gfx/pokemon/magmar/anim.asm b/gfx/pokemon/magmar/anim.asm new file mode 100644 index 0000000..9308cea --- /dev/null +++ b/gfx/pokemon/magmar/anim.asm @@ -0,0 +1,6 @@ + frame 1, 16 + setrepeat 3 + frame 2, 07 + frame 3, 07 + dorepeat 2 + endanim diff --git a/gfx/pokemon/magmar/anim_idle.asm b/gfx/pokemon/magmar/anim_idle.asm new file mode 100644 index 0000000..35cae5e --- /dev/null +++ b/gfx/pokemon/magmar/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 07 + frame 4, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/magmar/back.png b/gfx/pokemon/magmar/back.png new file mode 100644 index 0000000000000000000000000000000000000000..a1ab94d0b4e54337c33d905aac4048208ca57355 GIT binary patch literal 469 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|9>gNUQ0s; z1_r@7i^>=n7+6Yz{DMK^xf*Vj3=E7Vo-U3d6}P5N;S_5z;BfXX`fuHzvz0q^`MFe)<$If*Zt%9fY;%p_2XY8K(_|B(}R;*O#2~;Kpoiqi=4$M|cBrg82%sc(1&^ zHcg$!t3CES(~fOcU;B>;#G7-hIoErFwQ!YNez;iA*L7DnZ%LS-^ENS4+REs4V)NF} zr@mT@VT;-A9p<%6wOf6uFH?Rt{lRF( X&RPF_XWSv;?r6_{siTV{3Q3GYSKM1QG{8KTl@#tbR@oc`~M zf5Ty@kfrG68{=Ai$%NmSYqI$PD~8i1GD%_yRpu`B(KbsGy)G|3nZeQPP;~#914B{x zMO}d?_QqFYJQoC$TuwV~zB0MB(e1`$hLCwK>?%jo7IF8jT(Bfg`C8)#3kI$E#aw(X z%T9iJ5V+!Pz;-4MkD1eKCPo@GoS*(GovU)S&PwqXo3y&)t?p~3asm(j-8@mf;K!9C z$IaeF^8_T8=67XP_R6e!W$L?cnn1VerWChXzJ5}hLrySC$*34#J`l3rblJZRjK_Ko zZ?Im_S$pZL#naq*72iD=6>At13==q8ch@o{@JDE;F;`rbQ~D-!Td-uxeDBPuzZfr^ zb>xz-ah>x-arL>dEFY7k#ruvJWFL7g@bhSH{t;KEZT5FNj<1R~joCG4ThksXftR1> zY!80IvxXribV-<($L-*ylv)Mlb2TT$-oDU3x%B0|R{gV~8`4afZvMD*XLskc&W7)&di7ly zty|AoAL-Oz`6osBe2u49_NVFT`<`@6ee>su_vAJH(>~7D&#Y9R_4&Z`ZN0xI>c8#% zI8i^h`Zf2yDU4s*^w+AzeOzk$?veM=>0SDw@xKmDe^s;c-1Jv9FZb8)yJ9y--%xFN zP2s*JFBg1&?)}r^)zzPq{`8ytzS;d*^@UeO{k|jK{WXWDr)}2W7gDqGN6^Qm5R?A$ z+xJgCe3^g#al`sY-amWZ-+f-#;k=K(hV$O@___L?(^>82=pTI+hpb05{+IT?BQsfT zKB_L1jr_|TFO(E;KYrDFebIQWeIYe3=YL#kfA558)c-q&CNeNEFnGH9xvXt<7U)^);zo7sF z0|V!N4i*Lm29}Z_zu^D>|Nqa`aI0isVA${J;uunK>+KXrp(6?$ERFyE&kuJsKem=> z@7seXT~{w_RZuD_oyrmMO>%)%^r_39xV2cHwt7jzx&|KnYtyz2J> zN`m}?|NsC0KUc%8l7WHou&0Y-NX4zUvl#miDe$!3{`&v_^XStF zKED_yd+(XE-fi)1Y2Bk=y4fPYz4K?6^Y*%(wrtjZr=9L_wDzeF-vsq^HHOLpw`B}3Et88v zy=NC4JAQ~^W4i$JlILfZo?-m-#Aof5>~j)2xf3UcsRqvF3Fq}#$YLQBTeyrR#?kVj zkEeU<@fKrV_lE_?W=gwnIw=`hxa?8JNy**QvkpoIbsRHG?cy((obgid+8oUvHy-$i ztdKo-N3m8uJ!i7BgH5OP;jSJTP;jhi1BpYS8hS&x9L}Sj|naE146?uu@kv zu;_z6$$7Wtbc0+uby-Y;NaU|{fc^>bP0 Hl+XkKJZ0}R literal 0 HcmV?d00001 diff --git a/gfx/pokemon/magnemite/shiny.pal b/gfx/pokemon/magnemite/shiny.pal new file mode 100644 index 0000000..1ebbee1 --- /dev/null +++ b/gfx/pokemon/magnemite/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 20, 19 + RGB 20, 07, 07 + diff --git a/gfx/pokemon/magneton/anim.asm b/gfx/pokemon/magneton/anim.asm new file mode 100644 index 0000000..06d27a7 --- /dev/null +++ b/gfx/pokemon/magneton/anim.asm @@ -0,0 +1,11 @@ + frame 1, 08 + frame 2, 08 + frame 3, 08 + frame 4, 08 + frame 5, 08 + frame 6, 08 + frame 7, 08 + frame 1, 04 + frame 2, 04 + frame 3, 04 + endanim diff --git a/gfx/pokemon/magneton/anim_idle.asm b/gfx/pokemon/magneton/anim_idle.asm new file mode 100644 index 0000000..d0cba2e --- /dev/null +++ b/gfx/pokemon/magneton/anim_idle.asm @@ -0,0 +1,8 @@ + setrepeat 2 + frame 0, 10 + frame 8, 10 + dorepeat 1 + frame 1, 24 + frame 2, 24 + frame 3, 24 + endanim diff --git a/gfx/pokemon/magneton/back.png b/gfx/pokemon/magneton/back.png new file mode 100644 index 0000000000000000000000000000000000000000..1203c90d029745deacf9b1a0ee2d5c21462632d3 GIT binary patch literal 508 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7U)^);zo7sF z0|V!N4i*Lm29}Z_zu^D>|Nqa`aI0isV4Usg;uunKt94pn6SE?R^T9j+&xNwE9PIo1 z;@qtEj)R&Lc^ST`E8Fa0>*MHNpwD!;VZR>sdG<>T~b*Q|9%sY{b^+Hm` zKV3exE|+6C-MT6A>i&1HUEcV|%vY^p;A`~rPpaO&ox!{@=zT!M*2SSI$xk;p_uSxM z3TsGqSHADm6>@0tl(gE|B=#N8ewMaA{G}&+v+X~FUKZbNx7RBc{bO2{eOL0zl@DEW zqBzd}JF`XQ{XJ?(h5K#SOR>ZB8k6$lE z=kuG2Y>MK@tysqVU=E+gN>A~7E%8%!MK7`Q`>SdF%5>*wdSpL{VQkd81Fxjk literal 0 HcmV?d00001 diff --git a/gfx/pokemon/magneton/front.png b/gfx/pokemon/magneton/front.png new file mode 100644 index 0000000000000000000000000000000000000000..fa77862fd49ae0fc35f79eceb10c9717a1fe4a55 GIT binary patch literal 938 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VBEmL%)r2KLt5-60|Nt3fKQ0)|NsB1dyf4# z6kuRr;M~u_!oa}5QWE4B{Qv*||G64&l?)8bo}Mm_Ar-gY&U!oPwE{;Q>%0H+{GT|R zEYtmGVSM-Q_T9O@EGAq}Brjdt_d@m4oqI=)RJ8_qNu7+%n6&hswu|$NN&U=|ciz%E ztaJC>*Suddl?8VCZcgXAB>F4o>wTTh_=XL=@4kgNIyJgD%?n-eaY^F0jv%e|uZ%9Z z&aU0aoB7Q(tTI?p){*_);r_gd>_6Qex0ucd&;I`Nhf4ID6IpMwidLQ2G+|}pGBMWM z8)JU`{?lceXUoN}5tmzR9rzU24T zuXncB_+)%4p57m_bBE}6nR7F3(ktg`2S$rjt$VCl>E&|2dJwJB*imLT=o2P$my4$j~*QU?O=X>Qn%`z|^Ng?N+mgj{Pa_lh8OYIMN zM=x9b;7s5_mIl^1CjGyWaYX@|pC>V%XVm|>$FHLEk6-u`RpXii-lvk?_lVT-fprGN zGyQ9re!zQ$er;^6XUyuD_#$?z75YaxzWx$A%3Sb4sDcy8fj0fWFFh~ZRl&YT<#loU z`8_E@cTVjQxe@tX_5M>UecjclUNQeTN#;|~$|#eo)0cdc?lF95eIF|8@3g7l-19}g@}>M0osdl{jdo-*FfcH9y85}S Ib4q9e0CwiVw*UYD literal 0 HcmV?d00001 diff --git a/gfx/pokemon/magneton/shiny.pal b/gfx/pokemon/magneton/shiny.pal new file mode 100644 index 0000000..54c3a94 --- /dev/null +++ b/gfx/pokemon/magneton/shiny.pal @@ -0,0 +1,4 @@ + + RGB 15, 16, 18 + RGB 18, 11, 11 + diff --git a/gfx/pokemon/mankey/anim.asm b/gfx/pokemon/mankey/anim.asm new file mode 100644 index 0000000..01b8e3e --- /dev/null +++ b/gfx/pokemon/mankey/anim.asm @@ -0,0 +1,6 @@ + frame 1, 24 + setrepeat 3 + frame 0, 08 + frame 2, 08 + dorepeat 2 + endanim diff --git a/gfx/pokemon/mankey/anim_idle.asm b/gfx/pokemon/mankey/anim_idle.asm new file mode 100644 index 0000000..faaeffe --- /dev/null +++ b/gfx/pokemon/mankey/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/mankey/back.png b/gfx/pokemon/mankey/back.png new file mode 100644 index 0000000000000000000000000000000000000000..ba4901eaa4ade513b1d49a905b3d0dfba54f8c05 GIT binary patch literal 497 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|9)xI94|`- z28Q1AMspb$7+6Yz{DS}g|NlQ%!>y8mfpLPTi(^Q|t+%0`O-B?swygO7zcOXwgK6*f z^;@!R?D9Q&?ceeB&9!@U^Q1VQI4PFqUcOPDv}5h51rkxa!YYo1yP4a!c}X{?y;fA2 zbIwNK*e|1{t|cB#!uw2*Oo@!J6e{90_?;a2E1cWNID+yYmrSxV|E2nzNj2#UHLQdww7B9rhOe<&q=GY-TK`v&| zVbRHQ0WnM4LrOKf_8YF)de9?HHb=>XnLP#!m|%;`r%UYY^jMgt?Km(H$>NY?%`o{ zXZ|ImA0vIu_GQMrP1{`dJ-YkDyuzkp=I*~T!L#4KUYGlJvhcpf&UXRU0iwF!rs(wC ziJsOxckQZ$29JCqv(xrkzJ0l?c-irFf!4XxT=dwRA1qx`DQYZM;N5ibm`qCQ7V$1S zh3tqebJI;&`o8x+O*Oq9BfsHeghtnz{O#-yy6l@zakQ`gvGx%I0|SGntDnm{r-UW| Dfs@-x literal 0 HcmV?d00001 diff --git a/gfx/pokemon/mankey/front.png b/gfx/pokemon/mankey/front.png new file mode 100644 index 0000000000000000000000000000000000000000..1c0c21485472d08f2dc200108129b8d7f42ac539 GIT binary patch literal 708 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsBLUm7*X z%aVbCq4&JeTm}XPmXaX9;Q#;s|IgKMt7KqcO7?Vd45_&FcE-&h7eyWy&tL!lM_%F- zc#xMLC3ao&_(A4Kj?9fye!Dk*dfM2blQDPI@2W%Wr$cTAgaie~C$IXI66;v~s(gvy zm6cadykRU8Fbrs~nPQXEjRhd3&(Q)R`-R! z%a~U^?^c~6>8<+Wdc+0(iGIr}Bi0rj+qUF#Tc@z^)XRO*HEDJ^iMy08Ed76_al?bt z9EV=6^>wu3v={Ea>f?7fVDHPS$)ZQU7Ts3K=dZ|Ja___x$GwxwbV~DpDeDJw;S#$pPnIdNwpX*WHGt<7f3D?!ki=RB z28LwG^$!>r7+6Yz{DS}g|NlQ%!>y8mf#HUyi(^Q|t+!JS3N^`Z|?I7Pox#nJF+m!KVM?p7@`;nSvR=S0@K42wxK2tN9># z;pYiUcCxb;a2(s>_*^{SVQ&U+U*R?-W`?U5PjE$WXWab3z3_5!*r7@N<@t@(jofBN z>nfMou*dwCPqypqyw7{_)e3#aE#iwWTd%jeXCb!YluP&`r>g}`A~7=gOaPISspw7zVFEu4Cx6hiqkUtx{@9US2=iEz;Ilde% T|J%sGz`)??>gTe~DWM4fR}qIt literal 0 HcmV?d00001 diff --git a/gfx/pokemon/mantine/front.png b/gfx/pokemon/mantine/front.png new file mode 100644 index 0000000000000000000000000000000000000000..1102eb41bb6243f48906ecd300546b6fa25cf751 GIT binary patch literal 1166 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dVC>*vW?*1YetP*W0|Nt3fKQ0)|NsBbwfql~ zSj)h`kSw|W0RsaAOG%Jl@c;k+|L1DBRWdNJ=z6+1hE&{oJNsslf+B}&)vo>xz*bhRwucyPx=(%yX(nX;klpIru7*9G)q^_f3h7Yl@v(~zNUCy*!`%-d#xE^ z50m+Ce@dLGwTg|i_tO>sZ@1PhJnqk9<>jH9x?##2Nu9?t)h5~2XF3~tS^9SFmEf#Z zRQ-OiPV)KI5C4*tidt66efjMsU3vb&Z4bHDt9y^_tG%7 z^QnY&ce17UF1g7iCZbh(!KF`RXT7sIQ*OR$_l?awe_np)n-tkDi^`Nc8cfJK=ckg{bvkETebx z?Fw9~!#r)F=f+9557n)FZM@(}`sB~GHbVF9oB|Ieo;fpp*R9j5Kg`o#`9NWg`mTvj zGv0c+7p&4zWMiDeYd2MZ@!^>zE}{*~JijTKUi-q3(^fROVUq!awc&!L*%K$foT*k` z(055ih;cgOF^y-t9e?l~Xgm1T@MiIGiF;=i9F9gk<;i}V+7SCrLow*?s%ajp4IGNu z*U!B6q^~yixUAkfot?~0)^$AP7gWnD&c+tDo7-r=lPImeWBBUZj>8>inyvG8Hs|eZ z*5BEzw^Mokhl(?@_ao}&TkmLZ@O^h-KD+;p=0By@&-v=(XBW5U7aWw`X8C#X^Xb-d z#ReHSBG=EdmazX|z&WM*-GqQT$tnGJCWb`czum6z;(gmE`*kk+lt0N%eBV*yUI2wp ztd;Hy{_HzZ{%8M$l8KrV{iRFPcQZ_rx^!4^L%`#{#Fe{xGuGNX;=5U1T$VQ5dI5JM zo7U$Y&a*t1-*G%MKi_=IdD)&7dDU+UkAG-9X{X8l?uX0Q>;%qt98mZp@y^9VKb_xQ zh(5+yUK04puDs{ZhU2n)6>D}f-?+CV?9Ri6wG(F+@T(O&yD+A4)#%Q@&UJNA6v~$3ueU9#@m!9eB_; z|FrD7yrZ(IqA>;RY~@FO_f^~%d~f}z_V{+z{~v0P%m19`zj^Poh~*3n3=E#GelF{r G5}E+B9z37` literal 0 HcmV?d00001 diff --git a/gfx/pokemon/mantine/shiny.pal b/gfx/pokemon/mantine/shiny.pal new file mode 100644 index 0000000..cd743d8 --- /dev/null +++ b/gfx/pokemon/mantine/shiny.pal @@ -0,0 +1,4 @@ + + RGB 24, 27, 31 + RGB 06, 17, 31 + diff --git a/gfx/pokemon/mareep/anim.asm b/gfx/pokemon/mareep/anim.asm new file mode 100644 index 0000000..0bade86 --- /dev/null +++ b/gfx/pokemon/mareep/anim.asm @@ -0,0 +1,8 @@ + frame 1, 08 + frame 0, 07 + frame 1, 05 + setrepeat 2 + frame 0, 06 + frame 2, 06 + dorepeat 4 + endanim diff --git a/gfx/pokemon/mareep/anim_idle.asm b/gfx/pokemon/mareep/anim_idle.asm new file mode 100644 index 0000000..51fc59d --- /dev/null +++ b/gfx/pokemon/mareep/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 2, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/mareep/back.png b/gfx/pokemon/mareep/back.png new file mode 100644 index 0000000000000000000000000000000000000000..f0a89696c7bd99ecc074b6cdddfd58a6aa8ccb9d GIT binary patch literal 459 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7e{88`kmei) z28L;Dr;8aF7+6Yz{DS}g|NlQ%!>y8mficU|#WAGf*4C-qeTNlzTsA)cSHA9e!%r5C zm1QfZc%{fCH~R+tD%JSlr>CSZFm+1H32xi@*IA4fY;WM4`YZd8&^4QX+#HWwFZu1c z5iYd5IAR*Z2Aj;wT7SN-*={b8Zn@adJkmKmI)3`JNA6ba-H!JwXZk&vc`xCB>(*D+ zO@ekjCeQVDimg;%xbFEPE2$sOe@ue@WF)Sh;WpDMsr$|PV+-fnZLPTST2e6Z^hwUl zS57y0Y6FzH7Q|b&O>0iov0Suxp77L!btNZkw?|lSWB6)t=dfO{=6TUTvz21^#cM+t z7VX(CcXZ*Db>IFfR4dId+o+*>apxL0hBG@EsxFu>5Om*rWr?c#WA@2?e4-tzT4P@9 zG>UpJWRR!!;dezxZw*AC^X z_L`qE414)C8FcLU>zUSkX}w_E@Lc^Uzr1yA=G>2qQ(NjgmQ8xL_zopr0PU*BL;wH) literal 0 HcmV?d00001 diff --git a/gfx/pokemon/mareep/front.png b/gfx/pokemon/mareep/front.png new file mode 100644 index 0000000000000000000000000000000000000000..3ab91d605d722e81451dd92998ddec1896134084 GIT binary patch literal 640 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V5s0=W?*30zRqC<0|Nt3fKQ0)|NsAwEwv2N zoWsDtFpceWF#`hwOG%Jl@c;k+|L1DBRWdLz$$PpuhE&{oJN@pa!wMWNt+oHl?UX(V zPu39MYrWApcXE!1*jMT3+vaQ+xO!Kbhm@?HIz=f(kHhgusA8d}M^B1YWwJ@#x8C=U zcKhth^myF5`(@e9!;coGc8hpF`Q{(wyM9q?kds=a*W=3`Q)d-&d<|L?AY17iesJxa zioixj(YL2-S-d~TV~j$XId9ooW^ z^JvSAFV|Ibmu8zyj4N9fDHv~lV70+*27~=?OS8|!G&^cLJ$`&9+BCdoPl4Lw^>33dDHQrLhR`>dpN z&iH=iGwbtn&Ka+mmu~TJaml=$`QPtXK9ir9{*PfvpP>5hxGrS|1_lOCS3j3^P6t<7@0I=joRcO4 z1B3jg(s>LF3@jx6$|Noz>;a17O!0^J;#WAGf*4wFpd`A>GT;`tp`~Hqr#M+=E zZ|ZWzE-zX6IY1!OtNu45^GV&GUlUw53E%eq*OenPM=6=kV4v}$)gxtRM(Z!WX!#%ta$dRP>u9-bSOl{-J_VOFR?+#2_mintv;GO-_G;sb1*UsW0{ h6HoCw@R+@v$><+jV#z*>BMb}-44$rjF6*2UngFa6fc*df literal 0 HcmV?d00001 diff --git a/gfx/pokemon/marill/front.png b/gfx/pokemon/marill/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5b07959aaaa5f2307f10c9151b110ee32215920c GIT binary patch literal 719 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-VEDkn%)r3l>U&L=fq{W1z$e7@|NsA9+3(Le zX)-V{$Zsm0$H2hAQWE4B{Qv*||G64&l?)6_d7dtgAr-gY&b*m-M1jY(@X!DMcQzcU zV7+zD^F=d#0wQxJx<=i*TqtDxz9ThDwn^@cZ;7G4j7EE(kbY}% z_@cSZ(`=Y7EGd0{bFR-RtIHC%B1`U9ZcnR`?HAaapP}*a=Df$R3tD`C`ta6HohTI9 z67H1HnI)gvIaNbRp1;$`Re(G4z+=VZ(gn$lts6QR9(ipKW}02RbWOg&JMaIO^IDYm z`b~OiIm7N6`{wydlfIw%lXTJR$gC2vGqUi}iiDxAfLT(hat=RCGCou82q~B4~ zbiNM<4|P4AU>s34M=&I!z-^g8*dbk!WgGT18$X?3yd%i#+>|FiMbFk3yG_?@GfvLF zW#n48OmgLeGjBNL3b$xzZMhL}EYQ){sByN)`m!nOp7zY1&@YkJb0Gb@g|kzITDj$A z<)c}w4F_^d*D_3O&en2x@wLFAH93*dxpnD;;KY+NnKdka+$dN!rRp~7& zbuAX3(SOwQ_$*`kn;N@xrmBiLg)bf!9V`CSU~KI%C4SozpMU1nf9p4|N#8W@WR=?M znNQBJUpGE7)7Lin|Ll`h$87(7cqKXCc+t<7zjRJ=OOPT1 z1B3S_12F~$29}Z_zu^D>|Nqa`aI0isV9fS(aSW-rwRURbq$dg-E{*^G*T*?JoK?CP zx;EJOq{?5Hg`tb=vwP|<>Ie$ka{94sc-?*B`x&iyclWa|RhqY{VJExOyav11ozCZd z`e&w;Gw$i|d9C2v&)!&inC}aVUDdb5y$uWfnLdACxLlX%0&@=QJvNpgmfm@3%P+c2 z4rjXdQKigLe@Q{BQsC+N_cqQVf^2HYW4T9R4(6!>W*xgpYcwod~P<` z#ZEkMS7Coz)3ru+!@1Y3Clp1L-TimxiBee9eEyoWD<^mj(^8g2U-)qE`1E7P-{o^# z9pO{xP@H!qTz~c3s@%|?*!%;RnzI#nKdNBSG$AjcYO#=2M zMhBMZ_f6Az%6R1RwTkM6&UYpKul)&ryZa$)1Z%vsnrPo8mAZxkQ?J@RcXW;>zCLvK zMxVpYY>gi>zV{bGH0c(s4Mw3&I;?H!A`Ug{qzT|GbU(o(i7Wq%p#udz>Rb8WU~ QU|?YIboFyt=akR{05+}2MF0Q* literal 0 HcmV?d00001 diff --git a/gfx/pokemon/marowak/front.png b/gfx/pokemon/marowak/front.png new file mode 100644 index 0000000000000000000000000000000000000000..4007d0486ee271597b257ce7d01ec274e648a897 GIT binary patch literal 1099 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{v5>W?*1ATFWqtfq{W1z$e7@|Ns9>=OniT zDKaoHcyBTgV_;xlDGBlm{{R2~|6C2XN(KhzSDr48Ar-gY&f@KVs>9Jb_4EJ#pTiFH zYc0B4JGs)_TYcxrGfzWY52R-V|C-p{;Qy_^bYIYdnDgnUe!4LPRMnk&JHPwfw%+%HN8J?oYe2+&N92Z z-H_vH^_0@Ze(Sv>4(R0zJ=qqR>J_?}P4e#38LUZxrhig@F7qi1xnOZ1TJin{hixm4 zPDow<+M{hzey3I%qmQHCd%+uftr&C|FIg}doZ;Bx`ys8x@qLWS#?tGwa3>S z5oJ8KV|8F-;o^HYz21Ja?OX88BZAfD=aoy#)h*K_nnL-7()qJQg&MC-c4gRBKWE8K zCnJ`qdFP%wI8Dixe}2JI}v+v$Rn7p3TKqv&#eTy9RrQ`-JX#$Np_;%^ZGx zxp}o8EmuyiFlE{AP@Z(}b&HIikXJja%F3=cdPT8T^SoBh z6S}eNyh!LIlZ;gUz0od zCtF-^eVVkB?;h*y>C2|P@Vo!vl23~Fl=FK`glGC3dAM}u36lfg_oRHdI>Sj@f2Ipt z`}8uGZBLgnPn6tKqOhrTdV$KO*6B7%!EuM&<6cS2?)h^6YIs{gwO|C+$2fzZCr{**wSIb4ALFy-m&< z^KUGXwOhJC=oja!8R?~QCz~%#x8RxZ`WuJcljh5t=e+rHNHw3Mu=~OpUVYISC!7WM zDy(tKzW!HL@5YX2s+RK>C{`WzcHaG>Z~DBqm)7omrg~}F5ncVLwesW|b~*jEUk^N2UDChj z$=tVM`a8cJ^gif)F}~~HrTJf{_b?xQt$)^}_?5n|N%0%~+{|bHD(@`ZpQ7>S-y}!l zy84qgO#F<7C_|fLw^7+SI>otFQ@4p)_rSy8){w>w@oaK8;-srF0Q}ROp z?JoO||AIci;3fa~kNdU@&iuHqe9wE?JtBL){C~c*qF!^}@xQarKdxgun5^}Ac6HJ# Q1_lNOPgg&ebxsLQ08H^Hpa1{> literal 0 HcmV?d00001 diff --git a/gfx/pokemon/marowak/shiny.pal b/gfx/pokemon/marowak/shiny.pal new file mode 100644 index 0000000..2f20934 --- /dev/null +++ b/gfx/pokemon/marowak/shiny.pal @@ -0,0 +1,4 @@ + + RGB 18, 21, 15 + RGB 14, 15, 04 + diff --git a/gfx/pokemon/meganium/anim.asm b/gfx/pokemon/meganium/anim.asm new file mode 100644 index 0000000..e5db2c6 --- /dev/null +++ b/gfx/pokemon/meganium/anim.asm @@ -0,0 +1,10 @@ + frame 0, 06 + frame 1, 10 + frame 2, 26 + frame 1, 12 + frame 0, 08 + setrepeat 2 + frame 0, 07 + frame 3, 07 + dorepeat 6 + endanim diff --git a/gfx/pokemon/meganium/anim_idle.asm b/gfx/pokemon/meganium/anim_idle.asm new file mode 100644 index 0000000..b7c3a8f --- /dev/null +++ b/gfx/pokemon/meganium/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 4, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/meganium/back.png b/gfx/pokemon/meganium/back.png new file mode 100644 index 0000000000000000000000000000000000000000..5f51bdbff8498e1df9aa95764bb85bf07c1931fe GIT binary patch literal 414 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7pM6YXEeA-2 z)fWD*3=9k`B|(0{|NsC0pR3_k$-uy9>*?YcQgLhT)XqtV6?mL;U;h7JX*fe$!fZ=v zT9wZirI{9vDq04jPjXdv)|Ni&*?ni~2mYHv557$AeXhNCX=Vn8PSs17703J*AEJfzMRefVtQcLYw1Hf68mn-1{_}Ox@dQY*?u>d?5>jwT2{@RQsgn^s}X~T z{UevW1)lb5r~bZYH2pi{1OumT7Q2ugzjOYnSZ^1D35!ei3f*~m(EjB)wzlc_ T|MD|1Ffe$!`njxgN@xNArJ}J^ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/meganium/front.png b/gfx/pokemon/meganium/front.png new file mode 100644 index 0000000000000000000000000000000000000000..f520626a9bbf4022c6f02373fea8bfd728278ab3 GIT binary patch literal 1308 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsBl$0XKr zfK*s*;s46Oz`#-xEqb7#pwexW2X2@YK;}*Xyy{)ugfVbk(eHB{^H-f+t1{DmI#F8rW$F*A4zUx zbvWa5@uX0m>ylSiMT-t{ZQ57c&+EWb%inHjKBI4)(DAgFg(=~McE4XwJivHv`Y{tm zvC<3$ei6Md4v|Ho99>nXdKkO-<#%Knt@GR@`61I=c;)*5w^<=9o6Y23Xp7D$RQ7Ft z@3KVG>e$q`7a2QCDob0N_Pk#p{PU%4yAZ2y-~tYB+2b>r^t&u}cKSzfnTXz)kn!EH zBhRq&NhWhxr>MnAL$k=nXAIE~Zs{G7usHtn*z^(E{eN|_RH#bgI?dNSVJ_=u?XdCp6%KLTwesEerW1TOStgx}o4C~B zMJ)R#ffch^#44Gl)E~{sIQdR0Pg^`=b0D|ub!LkXDbw6m%R#!|s=_SK?bxqfk z7hWf21UdPO4}{+enm1G2^m)uqjtQm?xseT(`_FjINK1)zyu5CTbA@hRVaL9AJFae$ zEEZa?%3|x6_fqemigl3qHjd0S9hYOwS&Mp@;yH3=1qSI^8+VJi|MK;YNLE;S=x~PV zZFb&Q40|e9cw8}T2seJE<-az3W3$t1A*cFDRSX9%=U#7FHmT^ifXm;C=n1v~mqN7@ zo1BlW+<5w44^#K!&fRfbvwk0{IohacJKNK)sEdb3I4PpqO_g=F^U}3XB^fJPw(4!2 zxs4QFDKgVzI!rb$-Rk<5f7Q(J0zG#Fe<-av30ub(({+ypUJL} zIP7_~`k3VV4X34YeXQ@!E1$yCaO?N&)0{@1_*5Tkcqe>sOI*dZP)VVkogeN@Q)XQ1 zcJ)$EpOO7XK3A#mnxocEJ04lz+jz{kg8iZOJw+z|_ZE8|f9N}G&G-I?;-1IfKlXCf zo;AOBq3w)$$M(kiA9-s&^}c=XVtZd9=ePamUfX3tKiGQmbILyIx);^DY-H}KS-kXp z=?e9I2WLGqU8vhwdvBXqfv(a2xBE9P-g=@T#oxkvV$!iFTPfxVY9Au~`|97d+cI28 zi1^6&VzGJBat5jTORsG{^Ihy+dpK>ejsM)d>D80v7TItuL%H!&9f0XZeeEYd5W9DV;E(}PbL8ptuJfF=j z4s+DlZ-!6Pj=ryCU;gY5>-z^a zJ}-FRa|p$M;xm7heXsHJ&prqOg(_5c9q;=e%=@QXFZ%hd{0;*H1B0ilpUXO@geCyx C+Hmdw literal 0 HcmV?d00001 diff --git a/gfx/pokemon/meganium/shiny.pal b/gfx/pokemon/meganium/shiny.pal new file mode 100644 index 0000000..b09a172 --- /dev/null +++ b/gfx/pokemon/meganium/shiny.pal @@ -0,0 +1,4 @@ + + RGB 24, 24, 00 + RGB 28, 12, 05 + diff --git a/gfx/pokemon/meowth/anim.asm b/gfx/pokemon/meowth/anim.asm new file mode 100644 index 0000000..ed53bad --- /dev/null +++ b/gfx/pokemon/meowth/anim.asm @@ -0,0 +1,6 @@ + frame 1, 24 + setrepeat 2 + frame 2, 14 + frame 3, 14 + dorepeat 2 + endanim diff --git a/gfx/pokemon/meowth/anim_idle.asm b/gfx/pokemon/meowth/anim_idle.asm new file mode 100644 index 0000000..cf66cab --- /dev/null +++ b/gfx/pokemon/meowth/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 4, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/meowth/back.png b/gfx/pokemon/meowth/back.png new file mode 100644 index 0000000000000000000000000000000000000000..3883a636b8080d4c2f9054d0bf8b039485b0f7c1 GIT binary patch literal 420 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|Nmb0QYQ%p z28OGv+Kd?(7+6Yz{DMK^xf*Vj3=E9Uo-U3d6}R3_dChlNfuptc^S}3d3I$hqUH*5^ zV_N9p=Zq}Jf86Gm-v8}+xeAAN<+tBa3}^1UPDrnB=1GXwU?^Z05Iij6;j=WQIl5j| zOF_s*J&8$$;kEgVq6=q(U!GKbqJGTgFTarD0*+_@J?@GnY?8IVUT)sWbVfJvu$jWS zSxnj+j*I-03{tdmuxT?YVa>W0=FE6Qrlo^x35!zIdb{bLGgK3LzR!r$oa@^^Q}Kes zmNIq@ru}YHuDteL|Lp4rze=VJyW%^g8D!e5=J_)yN343HMdS X*k1W~_FrURU|{fc^>bP0l+XkKG~up5 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/meowth/front.png b/gfx/pokemon/meowth/front.png new file mode 100644 index 0000000000000000000000000000000000000000..55c5bf38acf8bc3cadf590b248c86506097d77c1 GIT binary patch literal 830 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsC0-^*U= zB*DPIaCKFiF#`hwOG%JlFi1RC!>y8mf$6TNi(^Q|t+zAZ_N`OkX?c0(@BPmU<2gE# zz8zPa-F$OTpp2JhtNV?hx{{A!On#{pON#*?8?s# z8j3B|25jAmf!)_+)>cpNHprZ@-Kc(bZBZika;Xast}fep_R7}Zb{0xfNpW1B@@$Db zuB8s2c=Z)e$IcLY)%jj)CIM-z!{a3GTfx>Db>BSJvo1?EM+KS|Pgc&*wJ_ zo=@uum-r%hs_g8ZP`}VuNf(y?i+G`YxU1Z4Kgs`YW~%eid-Dwa_74^7Ra+h^ z@4k8Eyq>>HXl(7p5Z%XbHodvZVK!I2&+dHo_1ptr6Blw{S6?`R-#bPB$>KAyXSe8N z&wcKjwyAv|kMYAS;SE0hQ(a7MC>58~I5N-rZMGn+@=WxW)XbGA6i z&pbSH|1r=0BDc$i;vye$@Bot%AcP1WW{XKu_)Ki9(+Z(;2Eyw|w< zi~j2TYMo6BpP$*l9l`a}vBT5jplz=ExdpSoZ~SNTHof3xXMWrCzdTBv+kZ>$3fcC1 z=Bmr@`5xxkD}TJY`R;j@ly7quZZWBU?(^)!G~>66bI#9PaB`Zlp&(y61lCPA{&7t5 z|F-G6=}Cf5ry1|lRoOpx_Ei4oX}pEj=brqzS)?ZTz0tT!_=Na53Eus0(yv(97amjo zo@nnZcTVQqoZ`*t<7U;UrKtC)j< zfuYjmP$UBb14~JeU-19`|NrM|xK%PRFfw_%IEGZ*dOLNa&|w1(XUAXv>(?>v{`ORg z>H1RVlNVg|6_`Sv$lJ>#1nXZ?YKz$F9I%x&z);RrwxHIQl~Mi1g~LW7*^68kFH5Xo zS?iy&Q_guxt4PQ9-K?iSnkYDL{$jwu@0zZ}{?u86$0rJ3C+<-GM?VIPijw$pdE6#ens$FSfli_rArq0bl?7#KWV L{an^LB{Ts5D_oWu literal 0 HcmV?d00001 diff --git a/gfx/pokemon/metapod/front.png b/gfx/pokemon/metapod/front.png new file mode 100644 index 0000000000000000000000000000000000000000..d67b1c5169643c16e636809e0b38988008d28c00 GIT binary patch literal 468 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsB1|1)?M zb1*P4RGJ)$WME)mDGBlm{{R2~|6C2XN(KhTVow*xkcwMxXWZ^PY{22t`15~#oSxt8 zsYwfhcCRvv2#vRrHIR^3b-BNl#a8yu|LIiCManr| zl~rm^ryoRIUue3ir9gB0@37Pt7E^b=4DNW7qM)_UY5AcGQ=OdREA%SDJ$xUAK6!k< z>Viu5n!g8LCFOCbSvTKuIJKQgKA89QswKxw=lm=_=kVk2oP)I%%CYBWOzNKfB~{_8AlXU754cR3-P^ zhk`T<<2gSy(wCf;)YRYGY;0&z{h&6W9Pb0p85`FsXqw*Q=; ajO!l=@d?zQn8Conz~JfX=d#Wzp$P!?$K134 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/metapod/shiny.pal b/gfx/pokemon/metapod/shiny.pal new file mode 100644 index 0000000..4d0b726 --- /dev/null +++ b/gfx/pokemon/metapod/shiny.pal @@ -0,0 +1,4 @@ + + RGB 28, 19, 13 + RGB 24, 14, 00 + diff --git a/gfx/pokemon/mew/anim.asm b/gfx/pokemon/mew/anim.asm new file mode 100644 index 0000000..3f8ce98 --- /dev/null +++ b/gfx/pokemon/mew/anim.asm @@ -0,0 +1,17 @@ + frame 1, 07 + frame 2, 07 + frame 3, 06 + frame 2, 06 + frame 3, 05 + frame 2, 05 + setrepeat 3 + frame 3, 03 + frame 2, 03 + dorepeat 7 + setrepeat 2 + frame 3, 25 + frame 2, 20 + dorepeat 11 + frame 0, 15 + frame 4, 15 + endanim diff --git a/gfx/pokemon/mew/anim_idle.asm b/gfx/pokemon/mew/anim_idle.asm new file mode 100644 index 0000000..9e264ee --- /dev/null +++ b/gfx/pokemon/mew/anim_idle.asm @@ -0,0 +1,8 @@ + setrepeat 2 + frame 0, 05 + frame 4, 05 + dorepeat 1 + frame 0, 10 + frame 4, 20 + dorepeat 1 + endanim diff --git a/gfx/pokemon/mew/back.png b/gfx/pokemon/mew/back.png new file mode 100644 index 0000000000000000000000000000000000000000..310328a391f6056cdcc8b9d7a9cbd2e5dea6360e GIT binary patch literal 411 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|G)abWz;nW z28IT;b-NfC7+6Yz{DMK^xf*Vj3=E7`o-U3d6}P5N^=3M(z~R!m^Z#7wK%Rh*LyPK8 zF`F#j_U*330rmg?nAb5E_!>4Ur*-aqDcjOj>de&UY@!1@}=zG4Pt(LmtN$%-c$BZye_RT959VZUE%MOZA$(L%O@_~BYEJ- zvC8PfcXx;{)Xx$);JLL?VQR2r{js^LnshmA81wS^_U&|USjn)Xx%ZOuvvmUNY-(60 zGn6~{-HH0RRA+{D^Yh(D&6_I4jIVZU39z|7;T&p%~sYe|CyIOVGU1zGJPEb P0|SGntDnm{r-UW|=zgz@ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/mew/front.png b/gfx/pokemon/mew/front.png new file mode 100644 index 0000000000000000000000000000000000000000..2a93d83032a0946940931529810edac1478d0356 GIT binary patch literal 809 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-VEDkn%)r3l>U&L=fq{W1z$e7@|NsC0tN&X@ zU1MNiXi!_Xi-CcGr6kBN7$lyn;a17Oz;wdX#WAGf*4vrgc`S+?u6sZH{~seN7;xOs zclNfGyFKO4Ne0B3Z=QWAJ^svPrpsNj~6jYb+_{B}&Rol)}$)C`AYWCcN zrveMkW*v6eB06uUN7up=6CeK)$?NE?(Y$+Hr6G`K9NcW;_pI zxzFgs=W{;6aORwoG6~Abvu561DR|CyS^t{{Q;VMj2uv|q7$i~lVIqrnnL_F<&snQC z#yQ<)vY)-?>7270Q%+4~3tJno{gmdEV~0{+s_=H5e$11lHX~McQsbGw97S8z_BW;+ zoyD!l{Af#_M;D7t)w4;lhCC5bDnU7HvFo^ljd?v&_m)OJO5M7n{a(}6j*Vqa60h20 zHm!B~nX#z%>~_hTnue9bd7>@P?@GoG86 zU$oSCjn(0bi!)_hu06>wRWo_$m%b%p-MN^#JFSXK)7BdwSa^;h-AY)ie7Ui-!7Cr% zx8g5(WMBCtSzVo30y608%=-(B&DQ5AB^(t@jFFiB>Tad3j_^r?S!Z20ygc({>AD@M zS7$PCh1}bAr<848F>}#{nLD!0y}mNdT)p+&7VWd1AGr62s@}tIZ^n_<$SeLsmOjR#Ddgkl%A9q}lVlgc`tFX2$Y`&X< zZtqhCZz;tK7nbmU4*d4P%Ki4b7gHyv)fV?$XsMp?qG7V^CF|v^Ma$%VWI66SZ~VRT znY_*UJMYuqeLhn=Z|D5kci*SK`)*wS==aQ$KRYAyv+b_Tyng;HD4>5v&i%m#gd UziZ1o1_lNOPgg&ebxsLQ0GI28U;qFB literal 0 HcmV?d00001 diff --git a/gfx/pokemon/mew/shiny.pal b/gfx/pokemon/mew/shiny.pal new file mode 100644 index 0000000..9b1a1cc --- /dev/null +++ b/gfx/pokemon/mew/shiny.pal @@ -0,0 +1,4 @@ + + RGB 18, 24, 31 + RGB 07, 11, 26 + diff --git a/gfx/pokemon/mewtwo/anim.asm b/gfx/pokemon/mewtwo/anim.asm new file mode 100644 index 0000000..a846823 --- /dev/null +++ b/gfx/pokemon/mewtwo/anim.asm @@ -0,0 +1,16 @@ + frame 3, 08 + setrepeat 2 + frame 2, 04 + frame 3, 02 + dorepeat 2 + setrepeat 3 + frame 4, 02 + frame 3, 02 + dorepeat 6 + setrepeat 5 + frame 5, 02 + frame 3, 01 + dorepeat 10 + frame 5, 14 + frame 3, 04 + endanim diff --git a/gfx/pokemon/mewtwo/anim_idle.asm b/gfx/pokemon/mewtwo/anim_idle.asm new file mode 100644 index 0000000..6b935e7 --- /dev/null +++ b/gfx/pokemon/mewtwo/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 1, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/mewtwo/back.png b/gfx/pokemon/mewtwo/back.png new file mode 100644 index 0000000000000000000000000000000000000000..e9675aaad580002d14f674f7cdc9e5bbb6d3a89e GIT binary patch literal 463 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjf)k7R{v$ z3=G@1R_HP?FtC&a`33*~|NnokhFc{A17n`2i(^Q|t+S!0n~o@OOn&nJf2FI#Mcr-H z(fpSs)iYIWa^C*epI}pW|KqQT3O#$XN*g%(#UHTFm*Bb^7a(Bek}P?Ax;CR5g9PJ= zxfdk4?(>zXf7!f1wjze}#uc9j>n2Rw!Cd2g=g{m!svRF(jhIapFD1+g2=Mcq@cgL# zBW=!E>QBNsceUD{=}$jY^0MLa(JS$cAMRe^Z@I}mMY&_q`kV6}dO6&*uCWQyb*S^( z!fjHgdSUlnP6t1x)0;S$?p=P?(m7xCs?_U4-3#`n=9n$a@U1fE%MN6k?p~J@(K=uF zNnu*P-?rBx+azmm6enM3zwt0VHQ>$rmqF3moZ5Ps(VN=R&kIefI>~cvv4TnH|JLho zYwn&kdsSL~MdPk&dk_2d71x|n<=p4AY;gI1rMr2j@U0yArju6-kKYLC<2})c(v46`|-rYxZ#QrhJII_+V U)7r1cz`(%Z>FVdQ&MBb@0M#bTe*gdg literal 0 HcmV?d00001 diff --git a/gfx/pokemon/mewtwo/front.png b/gfx/pokemon/mewtwo/front.png new file mode 100644 index 0000000000000000000000000000000000000000..07ab0771bd51ae3f3a5f86f83dd13aa49b950f0b GIT binary patch literal 1331 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@|NsA6m!50U zT*|<}uzhQVE&~GtOG%Jl@c;k+|L1DBRWdNJT=H~r45_&FcIMknj}dNYe~P1hcmO>d7FoN3f)xI5v`Q?v6A4EH6ssB}-X&?%g|rBn9r_p?2Z zKQqWZo)VUGd%>7sEiv5maUy|mnF$_7o@Sw=0YmR0DpUf8(|J=Lu?c+MNiucbv0C)#6K;WUg5&G|ESkH zOQp)X8E&7&3Xl3TxJ=l(qx^of)fdy3B@ejWd=*`@&}ocau0v~5$N-izI%>^ zKcuGk!-?PSN)yu0m1HY+FARTwRp9LBp5}5E=a+q#WcNFlUy!~lc=N`(cNz06a$ofs z?^tMkE(RpE)Y_|j$~%p_fx8x$xI+Z~$>04b{#~}B^8P{l+WQA5-g^78FXxi)UB*3^ zWH&7N)cS71pVavB9S=a79;cVEXBsVdyRC%1^5!EKy%&5hO&r#|;(L8;#bfJhCG4)I z>Tz3^Sf5zLr&09D^sZwWk4A?2o2GXQEbIgx%u#te@z`~qBqpuz7Z;!T$au!~(gw|W z4$7=c5 z9d5KLm9<*UNS;-k(UG0CGVKd**O#>UB8!}NU6nmC^=byAyyD!teJ9L5+R7@#e8^i- zB9-pexU$e-dmO~W@DO-s{c7K01OW+<|4!usdoRm=2`ax3eb+He>h?uh+Z~s=?=IZ< zzxCY#jpc{3`{Qb^B}wX4XQ_!MxSFocnR#$cR9pAC1+2QKKQ6vg$+mW$sOb7XN~gS& zS$8tJx$^IHkL?L;xbpU?>wy>TLFsV;?p-~riZsrp&w16p_?G&5r)_!SzH(8E?>$Qm zo8wiPwNRrkyU@S*-1?60&4o+n|Ey)-7p^99z!YZ9irLJhJHU_7?M-`_O(PTvp@gu2kpjsucqb-bnn;Q`jc})(4>uQRWjF~C~`K7 z?#$ZPJZIvXHH#W-FQ}eB`07{ileOD7zRm6{QLUY4xP-Z~wkhTLs`+8ZE(*`~Pq8&H z5mv0SD2XYrXlnA1|FFjT(@y!Ff?_4?M{hpMd{?prEd_r0$z11cGP(LDQ!fJp1B0il KpUXO@geCxvKa-3A literal 0 HcmV?d00001 diff --git a/gfx/pokemon/mewtwo/shiny.pal b/gfx/pokemon/mewtwo/shiny.pal new file mode 100644 index 0000000..c5dec4c --- /dev/null +++ b/gfx/pokemon/mewtwo/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 21, 22 + RGB 15, 15, 00 + diff --git a/gfx/pokemon/miltank/anim.asm b/gfx/pokemon/miltank/anim.asm new file mode 100644 index 0000000..384ef3f --- /dev/null +++ b/gfx/pokemon/miltank/anim.asm @@ -0,0 +1,7 @@ + frame 1, 10 + setrepeat 2 + frame 2, 09 + frame 1, 09 + dorepeat 2 + frame 3, 05 + endanim diff --git a/gfx/pokemon/miltank/anim_idle.asm b/gfx/pokemon/miltank/anim_idle.asm new file mode 100644 index 0000000..8318520 --- /dev/null +++ b/gfx/pokemon/miltank/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/miltank/back.png b/gfx/pokemon/miltank/back.png new file mode 100644 index 0000000000000000000000000000000000000000..28c4a906fbd581ba6aca8d467fa52642caf80ae9 GIT binary patch literal 476 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f3JFqp|Nqa`aI0isV666ZaSW-rbv5+%rXva*lb`(m|Fa{2^-5WM z|7PR4w_3b8Hn07=*!kIW^}0XTJ`3yHZjtj~uGes1sNga2yhwpXk73bYfx91%J)0|Z zNLzWHxQ%kn$GoRDUyb*~O59L*`giF92JxBY)8&j9o9vF6FO3jh@Uc`Vu=dxA${F8E z(vS7?9FAJ?bocQ)&fM>phoqX_Fm@1IES4AOb-J8s{*jx-Wox%=65Xqvo)GMLaYgi! zSCVq>$1-LHYVI{~x>`CTSz6T?XwXI6dXQ*54`+8}U&*RPFGVKSSUFyyMu;TM) zJDXfS<7xBN812#@UR&C={h{gs`8}Zt#(9GIJer5){vMWyO|P`PJa=D`fphHxamLeU zJl1JH>$bM}*fBfc%&FSQnj7hVk}BS$XU#mYiF?(=>qe4-apjI;|4trZdEO?^V*G8L z|9mr{#^QSq^!l&ZE8eP#xpI@Uc)na|pK9x@Jxbn%-U7icOy@YCcwOk-a6G+D%=_jR gTcJw{#p;6p*{dzMR(mg;4~iWIPgg&ebxsLQ0O3N?^Z)<= literal 0 HcmV?d00001 diff --git a/gfx/pokemon/miltank/front.png b/gfx/pokemon/miltank/front.png new file mode 100644 index 0000000000000000000000000000000000000000..b0965c8f660045bd243175f3a4d71e84735bdb49 GIT binary patch literal 857 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*mzcLzOOa{1m`Ta_aM-I`Cov-SH|w5K4YI>ze7&9uwG93@sk66p-5YB(@_?Kt`W)ztWYb(^uS*kX-O)<}Bk>CZ6-r zAK5k>yL#QTd&_*M@TqIAtkYb1%IAe((_W!jI}BEZWHi6Gl6$?RLTHa)qss1I%8RnE zUMmr`7fZO9SrH~LDIdnQ$n@xB?~sR$3x2O>ajOVBe%Z+J#FEetK_4)a7;E^-C?QCRSJ-{nn%R*``&7p_+}~X@(P@iq{>} zWv3o2$xX@gpS9hv_wS7zM?SEoM{%5Zxxk!T|GdwEWzrkCHnHqnc)fG=FQ)QtexK|_wsK4B5yx2=k?a& z+2?H^xmN#jfBb9d`cK|(YieFkZz`_%;O)}0@Xhx+&KJRZK6`tlJ>&7OJGuRed(AiR zLlNc0JnhBC>7UsxxUc$Yzxx~e_R&Pf?NYlwJ(SQ}zTm;LB{MfXkpGa##>>U^T)k;~ z3g4m=Ehi&`(sk-ic1`>fRN$~W{?Ix7tqaQPPX0agX8NrEk$;5lB)(m;@2hvoH}9vv zmcE|8E`C?tOBBYwTl$g5Yu-;k!v5!o{!iAo*YsTvah&iua8CcJwV%_jOLu=R_1yB4 zuj27^A;s8jW!jVf26bg*@^AUIw9qDZcG#APzk1itNcGi9-PCVfn`EBEBkEVYJ|9h!czWo02yWb11>)-vow0i%S(C^;+8KS)vzpDh^U}Iol OVDNPHb6Mw<&;$TGZ>8%1 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/miltank/shiny.pal b/gfx/pokemon/miltank/shiny.pal new file mode 100644 index 0000000..37792fe --- /dev/null +++ b/gfx/pokemon/miltank/shiny.pal @@ -0,0 +1,4 @@ + + RGB 23, 22, 26 + RGB 29, 10, 13 + diff --git a/gfx/pokemon/misdreavus/anim.asm b/gfx/pokemon/misdreavus/anim.asm new file mode 100644 index 0000000..fe29627 --- /dev/null +++ b/gfx/pokemon/misdreavus/anim.asm @@ -0,0 +1,4 @@ + frame 1, 18 + frame 2, 13 + frame 3, 13 + endanim diff --git a/gfx/pokemon/misdreavus/anim_idle.asm b/gfx/pokemon/misdreavus/anim_idle.asm new file mode 100644 index 0000000..270d8a9 --- /dev/null +++ b/gfx/pokemon/misdreavus/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 4, 08 + frame 0, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/misdreavus/back.png b/gfx/pokemon/misdreavus/back.png new file mode 100644 index 0000000000000000000000000000000000000000..890f1da221fe7be45b97a9d3b82d487c741bf6af GIT binary patch literal 395 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|J`tomsbx1 z14Dsy^A!dL29}Z_zu^D>|Nqa`aI0isVAS$-aSW-r^>(VK&|w80mWj{)*Yj~)IF$8n zVT`Eyt8X(D9#8p~Z2G~Y`9r~8pZJ!AbM_0RX4ZezNZBQ`Ti_)BbY|hu=PEm1MLMkA zsTILu$5DEKrEh5=ZTr(JjSU_fJ$+UnbNSQ4_0sR%OiE_{G^mMAGr1UhX_@D-`ATypTw;%5)jH0s zU;d@lyz#};wlh0EM%d)EyK*$SUT8aa`b=KA!((R_x5m4N?am+CKEGt%*(g8d{tIhG zSTzrR7Bru?@d_@5F198S(`b!c8%@~8FEfYl> zI;S6VsLsD2(Xes-?=tsY7uU0#Y5MkE;S8favksSGll5*;C^C4u`njxgN@xNAOYWz^ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/misdreavus/front.png b/gfx/pokemon/misdreavus/front.png new file mode 100644 index 0000000000000000000000000000000000000000..05c2dd338555f6b392015aa763156efe031818db GIT binary patch literal 668 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1K z?_I`av&<$>^Sslsf{uP^)v@&!1zG;<93-W``7F{nmg*)g6e#lAs-xqBo`Cb#e=9y* z{d%~zaqFTTp8`I(JBA)uzOQ>5@0oA67BOAPG}O0O(SE#>Zo9x!-^_`>t3t#r5~sKmSbRPZ+zfn$3^T-H4#$8G00a%zoYbkz2W;2mQ3tO9OtjoNRr zOQP0y@pZT7qWaseyWV)+^Qez&+pVoT_g}8Co%<)?8w1nzdbyL{FnIsr(o3x`I;L+q zFZ*E6^aD39x!x$&s?LyrU2drbD^ oeYg}W@bka-N$>yt)Auo4@-xa?8k@nyz`(%Z>FVdQ&MBb@02TK=cmMzZ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/misdreavus/shiny.pal b/gfx/pokemon/misdreavus/shiny.pal new file mode 100644 index 0000000..dbd1aac --- /dev/null +++ b/gfx/pokemon/misdreavus/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 25, 03 + RGB 15, 14, 03 + diff --git a/gfx/pokemon/moltres/anim.asm b/gfx/pokemon/moltres/anim.asm new file mode 100644 index 0000000..f353d30 --- /dev/null +++ b/gfx/pokemon/moltres/anim.asm @@ -0,0 +1,12 @@ + frame 1, 10 + frame 5, 10 + frame 2, 10 + frame 3, 10 + frame 4, 10 + frame 0, 10 + frame 1, 10 + frame 5, 10 + frame 1, 10 + frame 0, 12 + frame 1, 12 + endanim diff --git a/gfx/pokemon/moltres/anim_idle.asm b/gfx/pokemon/moltres/anim_idle.asm new file mode 100644 index 0000000..78dc719 --- /dev/null +++ b/gfx/pokemon/moltres/anim_idle.asm @@ -0,0 +1,8 @@ + frame 6, 05 + frame 0, 05 + frame 7, 05 + frame 1, 05 + frame 0, 12 + frame 1, 12 + frame 5, 12 + endanim diff --git a/gfx/pokemon/moltres/back.png b/gfx/pokemon/moltres/back.png new file mode 100644 index 0000000000000000000000000000000000000000..b8df5c69977c9cb8cd3b8e29821e5ba64375d6e6 GIT binary patch literal 447 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|9>mP|6~aU z28ISb{wE9!3@jxUn^sJ{^_w{=3Afbp5o@ZVJy*F`TwRc`W)yuq+fWB<4&jU6{bsZOIv=Ju042Y zoleUuLw1Y5=|($Fatp*woGbSJpWBXD-L?qjmiyvyA1&hQHp*|9bCrL> z3+=6a-&bCbv7L6E=YrQg-g69VpD@2robY`ArDOU0a|HPmUhEcswfotHtcB)IxieOD zY-#Yd=g7**bEx20y6H0C)*VtIxf)y6DY(4va7kGIV1{IGX!7iHDJ=8;@8cH@QT*a6 z-?(VG^}z$#ZemRHjk^@T+*{22V?yBU%fD=XG2f10D_F}bdX#~Ifx*+&&t;ucLK6V( ChsIq1 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/moltres/front.png b/gfx/pokemon/moltres/front.png new file mode 100644 index 0000000000000000000000000000000000000000..fa41824b6f78087acdabcb7e8b3271eef4a42e84 GIT binary patch literal 1647 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU_8LV%)r2K;9c|^1_lP60G|-o|NsC0-^%bm zS%QIqp+S%T2?GNIOG%JlFi1RC!>y8mfsN18#WAGf*4sI^%N{H6xK8}>zkc0LZ-vGW zhkfoYJu_=tXK{~?LB{hVd{=TeR6Y9IE6dsVa-Y8Pha=iGQ%HRol(OErnz%0&vZtMj5Zlw7`} znQ_ta`a%U2FFC%O@@$GBmz3`IyfI8||H^7V>C+73xa6ZN?Pu_u*sp4>QGVk_^li3| zJ+6jfQtVs!b$TFqeK+l`n`Mr#%x?G}<%w4y{=-E-FHa#AO73=F}l)kLL$-hN) zX-*G&Y)|ldwx^b|rk>_)^Gj4FO?X|w9PnL-_j2TMX`h*Indh9G-0?zA(P!7C?JLbI zPhZ~X-tn19@^w$|j+eo%E6#k5@tDd`xMjus>E4qsw4MmF-s&ll_^mL$UGH7<+sXWb z+aymc(W&3YHakG}>-m|H&tx}sZ&Xuy5&NlUS-M-t%Qt)_$5^&aj}YpKts?X!Pe z-eV-@nsBkEJ8p{qd~f-Zt$wjTUp*)zd!P zAy+14f3udd3aK;rDeE!OS>|NdeaGMNzux$Mwysc*{ULi|N@bqOFWHhG&&`i_$*S*9 zmXXxtUeszm;nlhw%HR0*e6?2MdzEmh`MzM}tWR8dpRGAc9XvC({FK!$mH68?)vBkC zeQBTB7oR(hD;L*PB|hf!lNGOXU&tObUHWgIYx);!qtX`fI`@@rSJ*=LFAfj{{U&%EF9fbSTm_??4)`l8=S z{4G2#yM|?3@$o0+Gj=wYd{!-IdFh?6_D(=)Ya#o-$9y&CWgkl45focG(K>DJMC%W_ z(Kv-QW0}@9z5>#qICPWp+4!x8}RE@TaWVJAprZ%H=!mLsjp% z|FLqv^7W$y@5`@rNxl2aHz&Jr_x*#>dp=lKbf>)&=(~7Ewm|QU%e#!d#V^Z4xDK41 zZZGoAA;x~j)}OLFw(FR@)9}3e%H`b&b=3naBVu+gRuL`R8MtF{&%WGlrShJlIL+6g z?^bY4m}*u2Cc0$*;r;1fx9?AXdVT8e(x-K?JLALOU7wnN^09nexZL*ZH)2i~V|Eo#4i{?z*SH|jy;hu7BoKH6&U-*@@y+H}(Jk literal 0 HcmV?d00001 diff --git a/gfx/pokemon/moltres/shiny.pal b/gfx/pokemon/moltres/shiny.pal new file mode 100644 index 0000000..523732d --- /dev/null +++ b/gfx/pokemon/moltres/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 11, 14 + RGB 21, 01, 00 + diff --git a/gfx/pokemon/mr__mime/anim.asm b/gfx/pokemon/mr__mime/anim.asm new file mode 100644 index 0000000..d114452 --- /dev/null +++ b/gfx/pokemon/mr__mime/anim.asm @@ -0,0 +1,10 @@ + frame 1, 08 + frame 2, 08 + frame 8, 08 + frame 3, 08 + frame 4, 08 + frame 5, 08 + frame 7, 08 + frame 0, 32 + frame 6, 06 + endanim diff --git a/gfx/pokemon/mr__mime/anim_idle.asm b/gfx/pokemon/mr__mime/anim_idle.asm new file mode 100644 index 0000000..29e08fa --- /dev/null +++ b/gfx/pokemon/mr__mime/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 6, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/mr__mime/back.png b/gfx/pokemon/mr__mime/back.png new file mode 100644 index 0000000000000000000000000000000000000000..6deab192950657ed10cbf7e210ea898caf96de62 GIT binary patch literal 371 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|3B*gbIWW7 z28J~*THhHM7+6Yz{DMK^xf*Vj3=E7yo-U3d6}R3_^=3M(z~Pd*g>uc zynMjs0!xl&{qNi7XRorem}c-QXqx%)$#p^jYcx+RSQuWwRQ~JUh0mtEPPX1G>tZ}t z1uo(#kq$lMSJnS<^Gnr+HNFgi&iax4497m+aq)^@%kp~p6#he1H_IL~)aK-FS~&gf z4%PZqd=qjVA{i{1HN<^4FdjM?&zN+3kCHM5x@zsPqYXV+aUu+9Yu~~PdLyh5O zfX|s1d>>}>{mpL3+tBf9!i(NIx7y8mf#sj4i(^Q|t+#V-PI_#>;oAD+f4v;{gsqH9 zpQpS#7JPMT(T;0;>O%8^o^js}?TbFTYr`e`JM$8}j_lK(mAJOAY2ORB9Wz#UCB}L; zo{b5y`klr3D65aD_R=V>UEB<__pV%^&luKP6MnVLd4F7S#o1N2g8SbFx&3~i z5n*sD@#*hU+u1zp6839_yRAy${?*~hm|}eU{o*zi$4rOq>$lFnUZ!ijLu}W79{nqc z=ecs~BaO6O0zSU=7PN`qI?+bt#yqdBx4axQmNVR(FiY|6i`*I96`~${fBboPmD^&g z?CaYto*!zO?p3u|=}I54inmzR5)+b}we!4dN$`=iSGS~ju@*5F6>~(b{U|Wuq|NN5 z`#!z!Wk`yjl`xA_sbOQq^VZ8!&aD@YyEcZbzN=o?JMZ|`c`~twN)PSb7Q=OEbK)zZ zS! zv8&u4fAHmRDib~zoHg(B`j*&>BK(#64oGuk1bt-++;i9FWB-Si;?;cHcWHggT(9L< zy=2{H`8D~FP`ef<*r%Ts1XzOd%KKXn}r{m+L z7h5#+zZxEs(D!6FZ8^-L&-*FUQSX5FpBf`IpFN+2`X!oUrcC$Zp2D)oF|JD7Z_4xv zxw=E%ha}}cOuCTwDF_K(`u{;l^U)rYaIHh$v)T85x+L}d-5wKj>m%OW-7OU>^L?&r z=$|~7!1-SP;=j;|4fRi#x@q%Fu_-Z+bDCGW=c;>h=|k0|q)uOfN2<5@Sn@n~OFmF- z*mqw1iE8J=kjDc051;fo?@`$-@pzBQ-2a^VC+*^)mR}P8eCda(#ADTuA0PNGZJmBb z{-T<`ubtg7@5u_syp=UrDmbSvD0se9S0kp9^ZSB=$4iYhVk$HFxx(WPl}~m%CX*5@ldsN=gmDS`m)W_-z;7HNr+eRmf*(+s@x_vaho15Kka=h$~(>r41ayxV>16Z zYelAIKlg`AMRMW~mVUK)ch38G<(=N?eV=z|>%V+n$Oj_K^dp}avgunsFVxcC`Mgj{ zKla>X8TrR^j*Avou~%vq$fXyTcTB(Y*`j#o%jbpX^w~YY7J#fVsyun(yIJMQQxIZX zrRT}-`#xNn`2OwZOEcfU{XA(Bh?w>M?Wal8-q$`>Rla}w8Hl(UZ}e$zZrmm)F?sqV zD6G@f*PXDQhta`-2dv`>Ee`{O_NOnHAib>H^G-ZS@4*#m-KY=3+I{Lfh< ztzWq2n9x(zqK24e3H{Rjvd>h#4mDoAxqFYw#Hgss=S%OcQ~hVL=g89H2?sdzOBvT3 zdGbN%xt!vQFN;42eYtyr|J(En5pHJsFQeV$^jGSseV<-buUQF(_xpdpe1ClHo+U>t z=THBZcE2+7{+rGZm$;)$Pk6ukU8tpR`Tn@(o+ta|%RgOu`*%n4^t|`S=k6&v|J|n#K6G7;OXk;vd$@?2>{-bvM~Sv literal 0 HcmV?d00001 diff --git a/gfx/pokemon/mr__mime/shiny.pal b/gfx/pokemon/mr__mime/shiny.pal new file mode 100644 index 0000000..d9a2acc --- /dev/null +++ b/gfx/pokemon/mr__mime/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 11, 31 + RGB 17, 19, 00 + diff --git a/gfx/pokemon/muk/anim.asm b/gfx/pokemon/muk/anim.asm new file mode 100644 index 0000000..e6b2ecf --- /dev/null +++ b/gfx/pokemon/muk/anim.asm @@ -0,0 +1,5 @@ + frame 1, 12 + frame 2, 12 + frame 3, 12 + frame 1, 12 + endanim diff --git a/gfx/pokemon/muk/anim_idle.asm b/gfx/pokemon/muk/anim_idle.asm new file mode 100644 index 0000000..58ad3b6 --- /dev/null +++ b/gfx/pokemon/muk/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 12 + frame 4, 12 + dorepeat 1 + endanim diff --git a/gfx/pokemon/muk/back.png b/gfx/pokemon/muk/back.png new file mode 100644 index 0000000000000000000000000000000000000000..e610da01cee7d9a63b2f6657bafe8cdc148c3f83 GIT binary patch literal 420 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|6X8eGDk84 z1Hy8mfzjF1#WAGf*3~J|la4BIxGb&yUoFQX|H8Db zrtha`=r4&3xut*hGk==BPvob|iijc>2X+^hGwn_eM*9Qywl8W>I@7w&>RQ7Dj+I=Z z1$-xV1eYc?K8;y)B_($L=Bv$<^cmiq6pFpyd412>|4~dThc9U_HBob%aQ0%uhj#&2 zXD^rae5qbIe^FG^vb?oN!kbfGJl*?MV(-b2wdZ^kW~?#%;H$5@<~xhcMK_hS+>)(T zFQ3~ciu+H_x&7F8l08xQ+5C<3LSy6W)p`2UEw=hU zX>jXqpU<06&hfc(yY7Ks%4<$rSnPfg{oPX0@x0tB<~PaxhWy#V1#5hmcO2iNU{$DC b`j64;6I-F6L7P7V0|SGntDnm{r-UW|nV`9L literal 0 HcmV?d00001 diff --git a/gfx/pokemon/muk/front.png b/gfx/pokemon/muk/front.png new file mode 100644 index 0000000000000000000000000000000000000000..c4369d8a69a23c16522b10fe8bda20620f288692 GIT binary patch literal 1066 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsB*1(qgr zBr`BDJYMnMmw|zSr6kBN`2YX^|8q6mDj67c8LjcPbZt z*AvgUz$vOQx9ZQ@*4NCBuGPI)==tb$^?Aglx{$TME3{ZwxW>v)mpgfEty=D%pJ7}| z`{R%Ou)nx<(y>y_BCz74D0<^9Sx zY`XgA`tws>xI4=i7H()+_x!$Dx-xV6>?^J-ue!GgylXKLw+>g0mg<|<&vpD-_;lrI zJB?#+e^O>S(~#j=o+vbHx^A7OMUZ-&?fa_t`FWda=G~q0X7d)&ZOYP0uhXvB1SIL@ zX_c;4zLAmLC-AFCEXljv(T~G=I`^%9`Cb|G*3ad47&q~K)4l)pQ026THv}e$sPwiO zw*EO;bpF`aW6e)Z_*$%`6<^(Gc`)@ufxP|o&H_26mD8RvYq~sXEU4mjXGl``7_M?( zj`MH!4v~G9Uw2H=6#OLgo6Gy+;tPB9=VzVhkovk|=dQ}Q`z@;L{hnQ%|4vSdzg+sl zW!p1sn%8|2i~b#US}rEjTx@;(w+;_Ka zd^Pddr5UAnbjwZrE=-A0vT8iCPb4`wi0662+L^5huF1i3n?!7XyMJJe=)5)kkz!By z$BTtia*pX zPZ4-=Dd=9&@x~9Dbm=#iT>%0)>h0@onl@{zu(b3_rMHh?mH8e%Ui9T zF6bAt&k5hxYrWx&?5&MS6Rp=IzwN%Wkh3prr?d4n@jH!2WWUU@*4ch@efk|irahBI zZlvE46fTH<&{v{h_fxjqL|L2RAjkGQ7X`dbb9%quQGB>!T~+KhekY}+>mK#Np#CGi zw@34KDqGx^Dz9k%V|=I4{ElP(PG+^3CwzaL-xWNxe&X?QI}IpY z0S@>3#qN9W2fi=A@>}+69f(<<9tw(&*gGHDs}mjK&MdBb#lXP8;OXk;vd$@?2>>5z B06_o% literal 0 HcmV?d00001 diff --git a/gfx/pokemon/muk/shiny.pal b/gfx/pokemon/muk/shiny.pal new file mode 100644 index 0000000..34c8de2 --- /dev/null +++ b/gfx/pokemon/muk/shiny.pal @@ -0,0 +1,4 @@ + + RGB 15, 20, 09 + RGB 10, 13, 03 + diff --git a/gfx/pokemon/murkrow/anim.asm b/gfx/pokemon/murkrow/anim.asm new file mode 100644 index 0000000..5c286ef --- /dev/null +++ b/gfx/pokemon/murkrow/anim.asm @@ -0,0 +1,9 @@ + frame 2, 10 + setrepeat 2 + frame 1, 06 + frame 2, 06 + dorepeat 2 + frame 1, 07 + frame 0, 07 + frame 1, 07 + endanim diff --git a/gfx/pokemon/murkrow/anim_idle.asm b/gfx/pokemon/murkrow/anim_idle.asm new file mode 100644 index 0000000..81583f5 --- /dev/null +++ b/gfx/pokemon/murkrow/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 3, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/murkrow/back.png b/gfx/pokemon/murkrow/back.png new file mode 100644 index 0000000000000000000000000000000000000000..255471a39796de54390d7b7b1b5b658dce4273ad GIT binary patch literal 407 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f9;xtrDYET z1B0@p&|L-w29}Z_zu^D>|Nqa`aI0isU^Me|aSW-rb#-bW(_sY;XVabk=Y~&=Vm@Bz>KZ#?&^^9mHqV<)JE z{k-yi_Vn32*R$3xwbe4(&Y#V%G2OW%XuUy;{la}3k|tc2oI?}(4!wzax>t^2hR9Wx zxpjBTZ5gMnh&Of+;F)ocOU!9&>?w%@wR5~Z|DMod-uy5r?$_%Q^T(OZyQC&c&(FWl zF8?g?RN0Y&bBm|nzr6Cd{@;1~C0~D>HFNUKBPsRKs~cywGaKdw-#)Y|{guh(hR2dO zkIdYos<2k$(}a#nE{<4r%b+`^it1_7-&CLGwn<-SPWUSSZ=1|V=4F}Oy))N^y<}iu OVDNPHb6Mw<&;$T4aIMM! literal 0 HcmV?d00001 diff --git a/gfx/pokemon/murkrow/front.png b/gfx/pokemon/murkrow/front.png new file mode 100644 index 0000000000000000000000000000000000000000..b17cf2d6c55a6444f2fc3d7babe6ef9a969a0fc8 GIT binary patch literal 887 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*Y7hqJZfO^n1i29q|f}&4sDORxSvN=T{+z4bYGY= zGe|9W;yo{{cI2k!ntS?!K4Oi25C7dOKJqMUk@YdBr}J(KOg_ftZpeJj<;eBzJpP&M z-+cU&vS+vcOjg%p9+TY|Hm@*Woo=$AfxGe_hZu+8!VUMnYbJ@${1Y4Rp>G(H)_!bh zeQ>jIsDCw+#c|`G+G*KwO1}LMdn|&k77Gb6Zd{NUc$7^!$F=2yfWXdO9dVuRHiBN? zo8q2HwnfVUmiZ!~QUW$Ks zb4|bM$+C8y>klShjW^1QW@h8Q8altVruoAUvy+lH40XKo)<{Zd=>DK%*Mpm&P_LPIz3K$J;tN z=l!;Dn<=N3rm5&gNCy52E?KVe{?|f&(`to)b6-vtJmjeVddcjZ|K2T%O&^6`c;|c(c7vtW4DU$of7t?J1*+?CujY&!B1oLb=mB`TncKDuksY(J}>sF zDeudqsn?9WLYdcAd8(c}w8C62VbSzm&t`}(+BNxw>d&6ZQ?AM?UiOyQeRo&0N|k5u zlpiji9OzC#s~Zgd+M8{60drjF{sa%YP|S-)n#wn?7eBXAK&JQ`Wn=|Ymbn?p7zV$Qn{Ua zepQ@t`nt`3z4h1bt^0cEs&}~l-Oo#__kH<4U;k+4-@<(+9O=)!)n@dapMHz;+Q*-h z-mrJs+r&4iz7c=!-DG7Of5P#O^IwH@%KQa)Q~dpleb`85kHCJYD@<);T3K0RUR7pC|wT literal 0 HcmV?d00001 diff --git a/gfx/pokemon/murkrow/shiny.pal b/gfx/pokemon/murkrow/shiny.pal new file mode 100644 index 0000000..8f015f0 --- /dev/null +++ b/gfx/pokemon/murkrow/shiny.pal @@ -0,0 +1,4 @@ + + RGB 29, 31, 03 + RGB 20, 02, 22 + diff --git a/gfx/pokemon/natu/anim.asm b/gfx/pokemon/natu/anim.asm new file mode 100644 index 0000000..bb60fc4 --- /dev/null +++ b/gfx/pokemon/natu/anim.asm @@ -0,0 +1,5 @@ + frame 1, 10 + frame 2, 10 + frame 3, 25 + frame 2, 10 + endanim diff --git a/gfx/pokemon/natu/anim_idle.asm b/gfx/pokemon/natu/anim_idle.asm new file mode 100644 index 0000000..7dd5afc --- /dev/null +++ b/gfx/pokemon/natu/anim_idle.asm @@ -0,0 +1,2 @@ + frame 4, 35 + endanim diff --git a/gfx/pokemon/natu/back.png b/gfx/pokemon/natu/back.png new file mode 100644 index 0000000000000000000000000000000000000000..923e342305bd8ed15dbba4f9a7f48aaff5a7c61d GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7AG9}nsiq+V z1H;y8mf#HCsi(^Q|t+!Jg#f~U&IJe&Uf6ln!)-86C z`)4lY%)Zajv{qJD_OC`-!ePF9&Ie*sS-6?5YBzOGSapb}CBtB_izpYj0vK;O9(tuJLx@KlweELA*I-X?{!PA!!Euzh@!5w>}0$Kg9pmFJ(a3y84%a5ug)iGhKE!PC{xWt~$(695!ubh7{e literal 0 HcmV?d00001 diff --git a/gfx/pokemon/natu/front.png b/gfx/pokemon/natu/front.png new file mode 100644 index 0000000000000000000000000000000000000000..4360e5b606762ecbe173e4b61cb32e4cf9e28e34 GIT binary patch literal 436 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsAk_GT~D zGz5wNePqGFz`#-x1Z1-B%Ys(@tiC zCHD30ZfWcuQT5Mj%Zs~k(g7KC9*Z0q*r###< v=lqG==hIW3*QC|XI`mnx=-K8ul?*O_1pc-iEx*XXz`)??>gTe~DWM4fdI8Z6 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/natu/shiny.pal b/gfx/pokemon/natu/shiny.pal new file mode 100644 index 0000000..0ee2b82 --- /dev/null +++ b/gfx/pokemon/natu/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 30, 19 + RGB 21, 21, 10 + diff --git a/gfx/pokemon/nidoking/anim.asm b/gfx/pokemon/nidoking/anim.asm new file mode 100644 index 0000000..f2441e4 --- /dev/null +++ b/gfx/pokemon/nidoking/anim.asm @@ -0,0 +1,5 @@ + frame 0, 06 + frame 1, 12 + frame 2, 36 + frame 1, 12 + endanim diff --git a/gfx/pokemon/nidoking/anim_idle.asm b/gfx/pokemon/nidoking/anim_idle.asm new file mode 100644 index 0000000..faaeffe --- /dev/null +++ b/gfx/pokemon/nidoking/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/nidoking/back.png b/gfx/pokemon/nidoking/back.png new file mode 100644 index 0000000000000000000000000000000000000000..d5af2af2e94936fb1285c397ed366339f6d709be GIT binary patch literal 597 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7KgDoqlwuSE z1H&=anr#dW3@jx6$|Noz>;a17O!1%?}#WAGf*4C*Pi{2>kIOo3p|Nm!FB-><@ zxjXrNms$IUv2!a&Y_{LU@Mr$LGauW3ZOB)s`}E7Z@xh-*9}oSx9awi#F}nZj_AmE? z9~8*_&b<5ck+{OA?DZ>MW-Y(REMFXV;#XPhilR7Gdxn!rT^#p+@iV-x{jn;TLFmIS zi))j)_~WC(1p}V@Hq^-rpKJ6`@wmtTA10UpM7iOj1eRp@~>g5UNg=Zew#GoPg^MUY!()A}-^>2*}by)H~ z_o(|?ow-wPb~&rAYTI~ME?-5dOu?@``SB)^%qnhS3JC~Zr%>h^^yy=Pi)=W zx%a@_i(i>8xU?_#UBKq+*V$k^BYc-3qiL=Cifw8;9=?rb+IzB~!G=GmWn-n^mzOi; z=U%j~*{;faGL&uAYW4cy`fqwW3~z+{*uG=3sO{NYa5mx3k*k+$Ep90M`B_}yw<`F7 znoR%Y)!UVtkBHtr((f@}@QU{CZ|goOOsVSGBEI?Uxp`%ew|sfk@Ul*j{f2jQVCw6} z%#0&%oK)7n?U6p9FlF!F&w;FVdQ I&MBb@0CiIwtpET3 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/nidoking/front.png b/gfx/pokemon/nidoking/front.png new file mode 100644 index 0000000000000000000000000000000000000000..1ed2d18bd82e16a5040eff1fd23da8a467fff789 GIT binary patch literal 1491 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|Ns9fhD)Oq zqZk+%js>LBv@xT0@hdD>* z^Xymuc7~>9r=L?<&bran%Ietl>9NSES{R_FFBJJ$9VDQ z$^U!y+)=t}%d@0C|CWTD+oK%zIdUtH&pN#H@^eYABdL$}tc;GiIqSyLjeaWszGS!9 zG8?{mrm^?KHO>&v^|c)9*RKp)u&bT#OW4-gB}>Xvc?(`HsA9iU_Azwwg4I)*Ty`j> zZC)%lS5k~2=V495B)vDnyE~tW%6vV~JHzdHh9{%d;^)C9*I5c|=N7u+zu=kp8RxbR zpBTqiyf3cE7)jVqIPszWk(=?&#xS|voXn>ibJWf*mu@&EcdTc=%VCN0WlO#X{XN#z zdwzB6qYGkB{`kZ%WwLy>f%Vdv>Q0sTjAjR=SvPv7G|>+ctTla!L26CSH>Z<^R^;5BEy zia_<9FwQMJJqPrPd1pC3+8r6fo1r4;n0ILVGe}C3y)74 z`{AA$Z{6pV2&$@WUR$?qDOW_cVt#k;njf!>W<*3U4iQe7v>_s^TO%^jy!+Ihn>v|i zzfNX+9shC5k5}DK?k zwe9hutc$-lrO5eCSh7T|xv+De&8c;&A&$=%g>^JXZTa0{()H|g_k)JZ`7PHr%B~Z; zdquYGQ77x)UX~Dvj>fXPhO(khGH>pEC*hcPIoi};{HdscocaZ?N%!_{;;8yOE zy8HQ@cF$7vVug9T7At4lnq5Dj^DITXL~Pr&gz` zl)9h!IepjS6))CVU$J}HSEKlG_qz&?gNv>E-dXH={Gt!as9$gW%Iuo{uE+Cc?Y}D9 ztaVsrpZL;EZa*LYmfCe+$MkHko1RHT?To6D<<>ft<7e{YVZSIa#H z1_s~F8rlpD3@jx6$|Noz>;a17Oz?kLf;uunK>uzYE*dYUsfJSABIEueaJVxrT@AF%~d0{dGq1 z$LxozkIxB-dQ%tn!?l^|z0rnUbB&L7I6MxoNz9&Gng7#wq4u@(yaj6?1x6dsovC>E z#@E+ZjOX4o_g@^sx{3r<*Zhh-&VwX^)3>BcY=F^z5Q|# Q1_lNOPgg&ebxsLQ0M{?dQUCw| literal 0 HcmV?d00001 diff --git a/gfx/pokemon/nidoqueen/front.png b/gfx/pokemon/nidoqueen/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5aaee10c2d7b9ee9d2d6f3f6f87a9fc51771eeda GIT binary patch literal 1567 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dVC>*vW?*1YetP*W0|Nt3fKQ0)|NsB*&9U@q zxyQi3;JaBvn}LCWr6kBN`2YX^|8q6mDj679_j$TFhE&{oJNx3SI|>}FozMT?-zm)6 zvLfTz>!W$6-?)}rTV7;Pst;Lob~(d>zpjh3zTI!`J8}2#zr}at&*b0MUs5%(Bk%|F zziAt;n5ORjbggzCztS2npILun99vuGyIo9i>%122({gA1ul`pq8vD<-&ey*wx9ak1 zMe{ivyKPTtsO(D+S#^d}U+`5gyXpzA(Bpd#M|p%rYz_Zw_)fC5b^fv1i0iF-N-DQb zlwLN?dGt!Nq%2c$k-t{B$!5E^t8y2ZCdypivb}kwPml7s9nvi?zsq)R|Gx8RXMprW z^&_P-CA5s#*b>VZnbex5eodBioB4H7`6Kt`>vrqz651Acxwq0Zk@uI}a^YBEuOl(j zO)}n^aTk6pnC{se8xbbC{_e$BT+3N^NX+sIWsl%KZqyXfn!2=Yheh$+@MwwKiI-YC zHWeA$y2XdZM!udEnP?k3^}&JVndR9QVa{=G?t9Pv(wK2_#WB$zr^9^TrdqT-|n@(r;6;dp3xPMNWxgmouYnh<4lwypO z@#TWKezVUe?)r9N>-&>_(_4)X|J|L-sFrj3fzXx*VzUo!3COu|Z~v#%v#)>2%BePc zKa+Z;%PCayVE3&>7lPg1WW7plvYEf^*DQyVU%oZ@>An@a!WOyJ@J_?{6Awh1pGFo?Fd~zVd$S z(OcYKS~^`{Jyf~8+v}XwX_w4JIa{)3#H;oeOkHwQQls!J_m>xJPyDCEPUVe{-#N+r zjrvBx-&3v5US4+e*16U=DNi1u+)jqQCQ8AovI~y*Kj^!AWY?p<0P&*ZRd)9Zk00`i zez%}i-2BeM$W$$!9nI4c_dVsC8JiaBen2+H@!T%yV)i>Z|EF0WyHjyUHu&K@>ockg zw%;+-oiy2clJz9(I+5}Rs^u9gf18$XDJec9n^Mywe&=AHhK=m{9nFddcCy6WEO~f9 zcI}R1hgH|IN4fg$Xg=I~I_4ptoXB6<#|LB!ST_~5Oa3Z;=U}+ABWC7^hEHyBo{4v6i#&XYM$B-st0R zw$rjli{0P!nU=p{NET={7mW;!Zr8Ykmp3Zyqr|-set7%(&RIMs) z)$+T%)<5J^;*X8omD!NHZujRaPv;4Ed2qCQG&lTei29qkbED^pQl{-cj|p5_6*_yN zoT^0Forixf?r~4^Wh#DGAUSD=lS=%Cwq6VL>O1LEf3E?h0AyUpUjD%Q-3tDntmO;V|J?JKPjg9Jar>H^H3wy9?TjySpI;bP z*uL^nd|~^WkB{f{7r$e0U+p5>x088U)8tKWI;?#ZmsQ8|?>y`|-}L0Vo(jF?GDYo2 zmKuLEEVp6*{{B&)P58X$r#{D2&U=62vux$Q$C{^$pH{BBGnGgG{M5&%i=XE2I6P0g z{gzh=#MZtD5#*596=3V$uT zyZGtpuYG5Ce)?K<{8>!phI@kZwE3@FFDibz^Ssvg$iJUz!|EB1cx7I7>YKHgfq{X+ M)78&qol`;+05ft2C;$Ke literal 0 HcmV?d00001 diff --git a/gfx/pokemon/nidoqueen/shiny.pal b/gfx/pokemon/nidoqueen/shiny.pal new file mode 100644 index 0000000..b27c118 --- /dev/null +++ b/gfx/pokemon/nidoqueen/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 16, 31 + RGB 11, 13, 08 + diff --git a/gfx/pokemon/nidoran_f/anim.asm b/gfx/pokemon/nidoran_f/anim.asm new file mode 100644 index 0000000..28a2221 --- /dev/null +++ b/gfx/pokemon/nidoran_f/anim.asm @@ -0,0 +1,7 @@ + frame 1, 04 + frame 2, 19 + setrepeat 3 + frame 3, 05 + frame 0, 05 + dorepeat 3 + endanim diff --git a/gfx/pokemon/nidoran_f/anim_idle.asm b/gfx/pokemon/nidoran_f/anim_idle.asm new file mode 100644 index 0000000..e31ce47 --- /dev/null +++ b/gfx/pokemon/nidoran_f/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 05 + frame 4, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/nidoran_f/back.png b/gfx/pokemon/nidoran_f/back.png new file mode 100644 index 0000000000000000000000000000000000000000..9fcaf581c2b7d1e8c7f9593eb93e3051edf34329 GIT binary patch literal 420 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7KV|LrWW!*Hg7I61wms@eS1X+=%1!zwM$FX{VE%CFpZRBb==f>$BkTiT@^ zZ(g}1C*rm5MeKt);wcM*_dZwndwo@->P@Cim!uaQxFD@yd*>63xrq#4bbfcr==9AkckFlnn{1Jla6*A;P5y0` zZ|0s18GC1>l_*MZSYHxlJi%n}WrE1lKI4S9f_zQeJEt(*JhR}9>Klen9CtQ%{bD-d zo630OABVc_SB+x^lg=$z=FC#;oVA-%bnsN<4SS;lNYIjT2qoU$N1wDHHka e!FT&Vqr`ExF7_=)o-;5oFnGH9xvX)^j!O-n>yW=kTzIynHL4x1cKRH>1<4!)1bk^FH=&c>U|ZQ^sAKzx}fKbmGfo z7vFApnb5rMWMc6`Zu#gli*_qtx>@3NwbQ6$PrOf7OUUtwj>3~}JW=i0q}-m_b0>j+ zcITWaNwMd*Ev9(U!`O}Ph?s6?qlSSS1)H2vM9f<6tP=!fbscL zgMS(`_a1##dd{D7bL`V@$%#{rn#f;&9~89j)$J$iQ&}EGpIA6S!rSnOZpfsx*(aw> z)fDdAdQ9t)OD2~=zjxl;A8O~4zxAqboj7?z+10f-8S@@qNzmD=Cw@=r-S3zGE&7U1 zeP*ub%dnhu?bY{n(`HV2W?OYPW18gS4HMOLUC!`lPBBd1lG8JVZGz8F6PDf6PjD(< zS@Ujfuajb%2)FahT^S(~ciA}|4ty>;2E&2tIj9vfA&Q&f;~3 z{qr2n#biWVq(0d`==t_5adYHuUW>zV?!u~bN+v(sU3OsRiq_+EB3=GWFwU+2r*Tds zz03IM%tvR=7aaTBTm8JJ`}thsd2&Z*KJqDC_U&xe{WtI5&JH{@GyDD-ftrG4`R#9i zr)}Q(V}c0B?|n0)Y%DLoPPuQsnXjUN?fX7SySwJmE_v6BCHnqum}9&(KWvUB*!=&G y|MJv+s!RL(^4Gh+XB-b#*$2=0d3w%ICea__!M7LbSTQg#FnGH9xvXt<7f6r-ck3b6p z0|S#v?^Ff`#^s(ajv*Dd)=s@Xt=WLbW$n!W|DSK2#eG7J-<#`XqTZ`TTkEY(=(C!! z+6&HDaW-FYr_ibZMrXIcrnfwXEZh#Y_dENRsNYTbU(D!}-~Kz1;XK1EAE!{h2Q##% zF?7hsd}^tSyulD5lh}Blfn`-OxBU+mb*lz#N1dwPMa(-~3_s7RV(t0CaHh$8K2zGl zmNn}pa~$B<7A#zJ#DL@L%S*5R7NwnJ%;J7zCiSYR=XcY+r=|=&FIkS*l`PmM5d2DX zg69kG0JEISa*KXXYMHkAYVyU_xY*3deHwL_H=J|M+L^kO&f)ooel25aM`~>ag1A)64@m8|>$WO%K*!|9e94 z+ZmO!Sz@d1$nR2m9(3NiaYN+J6yaYioBrvv`*LPRUsW=Z5i<<3pET>LzFT8;pG*SJ zRy*~$=&9bH(hnP+@4t7s_BDUA=tfhSzoC{-XP5UyzA?0u`Nhl-z`=BC-OViw3=9mO Lu6{1-oD!M|NJPL zi}y;#R{pD6o>#Y=ydsfY!?m{dbfdHE@5(g)b1hR&DwXYT>Ji(WlfK`6;_I1pH($r` z-?VSMQ>l?QY46QC)eWD77QSX$7`x-z&UQVMNbz-tZoS{5v&*k`&-eD}e&@Z*g^g@Q z;@&1bRH@QAa&DdTjN*qfN^d(}3a|-^eY|HC>~1{6YU;VO)u&fYxNvj!ox5MGi?*)O zmv-BG&gm-W-JC5t%Z|*RUT6RK?Yqc5$Byll zhYkp;o#9A1D0$s?&P3C67492HC2tnHrJegQ#kff{-DP*(0m+YBEFSdin_F;Tb)}AuMYG0t)pRBC=$-QtFD-t=!z0@|Jc3!XhZvpN6Uo7ro>o&A%zGe7Nx)h%=G#GUzK+3V8pzmc~1 Z%$#i_?y5RdQHcSRq+R`7);T3K0RYGxW~u-H literal 0 HcmV?d00001 diff --git a/gfx/pokemon/nidoran_m/shiny.pal b/gfx/pokemon/nidoran_m/shiny.pal new file mode 100644 index 0000000..771fd4e --- /dev/null +++ b/gfx/pokemon/nidoran_m/shiny.pal @@ -0,0 +1,4 @@ + + RGB 18, 21, 31 + RGB 17, 08, 15 + diff --git a/gfx/pokemon/nidorina/anim.asm b/gfx/pokemon/nidorina/anim.asm new file mode 100644 index 0000000..8d4e323 --- /dev/null +++ b/gfx/pokemon/nidorina/anim.asm @@ -0,0 +1,8 @@ + frame 3, 20 + setrepeat 2 + frame 0, 06 + frame 1, 12 + frame 0, 03 + frame 2, 06 + dorepeat 2 + endanim diff --git a/gfx/pokemon/nidorina/anim_idle.asm b/gfx/pokemon/nidorina/anim_idle.asm new file mode 100644 index 0000000..2a46251 --- /dev/null +++ b/gfx/pokemon/nidorina/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 04 + frame 4, 04 + dorepeat 1 + endanim diff --git a/gfx/pokemon/nidorina/back.png b/gfx/pokemon/nidorina/back.png new file mode 100644 index 0000000000000000000000000000000000000000..d334bfaab6201ef889b8f2d4fd1c613bd920cb08 GIT binary patch literal 489 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7pS|?IWpXhC z1H&bsS7{6k3@jx6$|Noz>;a17Oz}VsG;uunK>+Mv}ydwrYEGOUn|8MzB%WI?U zjBJ6}Bo>`_X9a)O*S~JOe>3=tHB%6a-LJGZ4yI3vLZRIs^zD`%E2w3B6(8{blDY!V zUDb6dFTP#h{qNDtf@3kSYR+43ZMACbajxW^=yHR-k^djJLidB%_Owd|OgT;ZCtGYI z7%Of^yu0@74uisJhRVs4BKfLk)GCNQTGq3nw?@lBV58D`mc?(Ff831@V~L-{TH#>n zJY(OEH@3@JV~)yJHCZR5KRNq;&Z_!548nb1yCxptFg(_|G@+CC!@sIEYS%jS7CT;v zV!COlZt-UOsmR&#T_Is#Z%+=bvg&F%vbrtroxkDFEe#p1S-GdAFC+_`<#^AK6&mcw z&+@9HNVfAY ze$Mx!>mJv!=d97pyT4rVwMHHLr%9PPmX_-q{)aDGxOYzAOjXsYc|B{a-Zt*LnOXm@ vtnjsOyTcSkt>-K6>}Ecbee+1bbN>DE>^VwKS1cJA7#KWV{an^LB{Ts5G8);% literal 0 HcmV?d00001 diff --git a/gfx/pokemon/nidorina/front.png b/gfx/pokemon/nidorina/front.png new file mode 100644 index 0000000000000000000000000000000000000000..c3e49f8e1336c0dd424abb9202ba6d57dd26fe98 GIT binary patch literal 979 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1+86pJfAMy=v~;{&=3sPWcTJ-mJHX6WCQT{d=_VteTY;x;iUnoI3Gc z&2!5KjghV|n#JW`{$|~}!c*PHuIO$t zaM)(?$n$%a)W^dNrCcYF=Y}_; zzPH+n#wDpuO)qN=tedq#Ve0iAroW6EcJkh>@ywZVE0I~t@0-zWv+h08T{?<)cgzm2 zt$lFS?b+14%{7eIjXuR(`7lGDE#j#vm^+)FMeE()n9=k8q!6J#fzp|Wh%2?dCv&}F%{FC4l(}V6GmCLSw2%WK% zqbA?g!=|hc_*qyg8a^}-Dzm#38e5bWC-HG0p_anx! zTxQjR`yVGr<^MhJEh5J3bI;_N><5j|uC%pM7k&8FKYQD@XyM8WD?VJB^7L5YtOMIV z+*N=5%hoeO`o)Hbip*27%}X;s%uLyH;lfkd=pEb5_h@c;@#EIAzwMpD8{TaAbk+Dp zOwr4L86_Y0$yDX^zCJ#qfN@>YO8+3(+-1#IlSNHtA@;z5(3-S1B9Q6(pd!st{k!q%~0e5DcQQgl2 z-iq;iLZI-={PWZIeYm7Dt<7ztw4LkY)== zK<)Wk1_lO}k|4j}|NsC0&((0NWME*d^mK6yskrra%1yCm1s<1^Xa4^$KBwe6fGu#b_?eTlfD83;vq-Q7a-_!n3nCq4I{v=2x3vTAmY}%O4uO zeYco;#T>s^uPbMToQctPdcJ)nUyj)%ag*sC?s-OYJ&Zd)tl;8NGFp(Lb<# literal 0 HcmV?d00001 diff --git a/gfx/pokemon/nidorino/front.png b/gfx/pokemon/nidorino/front.png new file mode 100644 index 0000000000000000000000000000000000000000..86d37de475a9e6309f7eb8cbe86199d54cd4d924 GIT binary patch literal 1181 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U<}}3W?*1A7tb5bz`(#0;1lBd|NsB3PFsUC zTR;M8&)+gIFtC&a`33*~|NnokhFc{A1B;EPi(^Q|t+%tfi=HZQw0(X4_kQK!vokt6 z%eGZ-lQnvKW+oep;KS9&gVgu~Z&s}cyA`6bnoGb@>$F%$yPb`eHP`VUjjT$Cj{JW7 zeH~+&Y0>0VMX_DmA1GY6C{WV=^mcE{Lcb?RolJQnZ9eYydwTP~mXwmB;^hA0_tn`# z99u0MLuQF)i7X9{5z*SYBWhXURBL9|tL^LupO?g&NOC?hGR^1vX(4T?88JhhE5O`N zK)-3-`khNY8T{;Q;`DMk({O^HjbZK<4rX1y;~@zrQ8cnGk1T;xm^)pGy7`JoTA*mO?G(;Z^%iA2IxqZG^$j0l($K`KH0x? z!kRUy(v>$fR=vqO{6x3f#MFs3F6qaqd535FPjo6=Z{ssf&CbBk=fJSd6{l+Vu(_$WGblib$40X%`O~lle)uAME#>Pd$Z+bn@gXZ#D&jVEa?r| za!Bb^a@7y3joYnQC+1sP=Unh}yw1N*^~C+ytDGr z1~o?SSP~f(tg)OeHe0B2WqW9calHw{0!fA`3;*A~f7th853g?;ukr>@pH{Pu&hC$F zhCf|iw>53KP^xB~;#k^zQf1{SzR8job0ROK><@h~<6+Ho@$71~m?g}Yj2Sci4zwID zYl(B5)FHDmK;5!h^8U*SY94OA4_zLJ-tjpkHTB z$J1tsPHAzj83L0(2%YLQb_s8KoK*E(b&8l+#w95e*A~^^tFxPL-B>Hh|LK(X6=t@o zI4MT&icZsY4~josJu6=>_gAQt|JaB7lOA-1A5?pB@4931Iqzu;&6V}{T$yvpWMZRS z<;t^reEz5J_!v|g*VHU;`*~6TTV!I=T!Q?g3$)1QQayyFg&zT}H5 zsc}}u-@ErrdG1}g@5{x{s;53LwTXuj_fL3#IlIRt{;{f895VdHy61}4F(dt-+f!HX zDXEKks#@)PdXGwNXw)$!{nnIE75lz?F}*s^?NiXFpih_jpR2mh42>%ai+Z&5mEf%h zs;{1kSG?qNIOz?7mGv*(@5TR`UvYAsb?)7`MY?g9HspMmRI&M>choQQij^1C^k1g- z^Tuh--V^ext>W=g$&gD^rXSO(f2Mk5@F?siO{~7O)Zxxvjwx`EQX`PVP zpZa7e1kOLgToZIrX2`zTfly?>X=M?|VQ0-r-*-|D8Ro X)4tlKNwJ)Pfq}u()z4*}Q$iB}xTP?I literal 0 HcmV?d00001 diff --git a/gfx/pokemon/nidorino/shiny.pal b/gfx/pokemon/nidorino/shiny.pal new file mode 100644 index 0000000..b6d2e6f --- /dev/null +++ b/gfx/pokemon/nidorino/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 23, 31 + RGB 23, 04, 25 + diff --git a/gfx/pokemon/ninetales/anim.asm b/gfx/pokemon/ninetales/anim.asm new file mode 100644 index 0000000..54104db --- /dev/null +++ b/gfx/pokemon/ninetales/anim.asm @@ -0,0 +1,9 @@ + frame 0, 07 + frame 1, 08 + frame 2, 09 + frame 3, 09 + frame 4, 10 + frame 3, 12 + frame 2, 10 + frame 1, 08 + endanim diff --git a/gfx/pokemon/ninetales/anim_idle.asm b/gfx/pokemon/ninetales/anim_idle.asm new file mode 100644 index 0000000..cf685d8 --- /dev/null +++ b/gfx/pokemon/ninetales/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 06 + frame 5, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/ninetales/back.png b/gfx/pokemon/ninetales/back.png new file mode 100644 index 0000000000000000000000000000000000000000..98af16d8a6895de30f16755159b4c972c01382cf GIT binary patch literal 519 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>pcB;go6y1_p+S znaaHk3=AwKL4Ls?;am;3N(KhTWu7jMAr-fJr*;Z88*sQJe*gb}Cnt*&-`16neM;xg zQB=z3ZuztEz=e&m_d7IS1njR>UeJ{h{boj%`Iom-`mWB{-_f*1^@q`g7$K1+$ve$4 zR)Gwz*YDd(`-j&WI|jy`I(*^%YEPjTnFegm>!x4j$*9||dc^DNioB}1Y>qKk UGi9gL9tOpvr>mdKI;Vst0FHa=$^ZZW literal 0 HcmV?d00001 diff --git a/gfx/pokemon/ninetales/front.png b/gfx/pokemon/ninetales/front.png new file mode 100644 index 0000000000000000000000000000000000000000..0bfeed4ebc77014e68dbb4b20278b899d804180f GIT binary patch literal 1573 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@KL{93sb*kc zV3?Sx+{?hgz)}+A7Yq{4)o`n1U|>Ds>EaktaqI2u#%+%^INDnO|Gi%+#KLMCxVie> z%-z}5%Y3bWHY+K`7yD}3HEj92!(@9-^vYS$dsD+or?}n_{PcHPyqV9oxy3>AESA|G zT=M5y-h{vEg6p^^*hD^Ee`w8;-?B@*PQ9yry`Dq!^^ac@N`KAZcv{mi!{On_R|(5j z+b1mh&2;DWx{r+Zy>6F|i9W2AeW~);vS;EPp$q2vlQ;kHJaNn7;xe7x{j)v?3Cm<@ z&AzZu;p5fCL5D+jw;T8@S$ufs%NJ2qrCqZb3!0gW1+1D&|E!vjS~6o#^989l$7_~w z-*uUo`hJ4x>pac$*suJdOH26{Zd{P_vC2b6JhntG^!|(hmrv(qvi;?S9=+5$a`&Lp z6>Xz6zAv72aHh_i;pyR$DdwzSa``3S`y{_KUhDon9Il-?=l)!N-fgAjsPXynv>Ej} zqMrVX^js6mO1Jsk+kB<1UvuW26AN}6pHl1ndAm;Webxm#j>qe0DQdlBG=J%JM|jJ{ zCtqtnc^2Vn>d6(H2l@n`ZTCOvdh99Zj>nVQf2}+iI`#Pk*>1hKg{!h-0EGy@rQl;`>o^LAJ4Rot9Uxqnrr=s%>{>K_kL-$ zHhG)PT#-_6LiT3z_TBEALq8@Sk-gwzqbA$4Q(1h?q@?3LPmV2m$``@pzxX86GsSX| zDutpujS)w9cQCI}SkS$w&^>$8<311m??to1JL`Beb}SD0yv@O0?ZPx`E!%<>hkgbw zzZ2LZqt014tDt@B)WaUj`X;p9S@`LIEHhWc)4naoWS`yWzw^*AVXF0#qe((Hp7ve3 zBByYF=VF#M8jqjMDs~Sv+s}PwhjOXNhEuX)mZ~ql?Kr&jWa_&Oam#YwahU!TEB`U8 zrrSEk_n-3}$N4*(SNuMjJ<)oW!2Jh(E25wEEz^pB!YB87*`158%62TixVFfBbHSP- zcYprwJ0Am{$-J|;Q@G>t^n!NXue0wkYBOy-F1t?SIA6I7*Nq2#$9G!^zguC?kXOY1 zLb_a}>cr3dxz<~3Rad?#a{udFI@$V?{!_kxitkQje={p@xy`ZXpzN(1F{&Sp%CBfm z=dix>@YSoZAID@frmnuTP~U3jo`PetQEQ`~D6B1Z4|!L>el=(NN!h=98$#c$IOY3p z#h(qQWv_WJaeddZefO&TX*&AA_{J{haN4KprGo0|M?#goK4h6mae%T1mbYD|^esa*S1@m_u^)ok}kxhJf_d#EjcWz<(-_W}c`wq*tTmK8b(^&g1 zft~sEor5wANpr2)zF+;eV{zE&=sSYiA5-6bDE-e?&cb)&L0>{{yY&nAoz6iA*xyYM z&^l(mu;Vc(`GE}ND+f8@qy2Nf-^E_Ka+$r>G2b|USE}6+Jek-a z$bYBNpxb@B{;@laR!cAFoyxz%cwENi$@@f~9fx22e75iS9P1vrro2V}`eD!g=KR=#pE%m7LZN!7V z_SmiM)_moEpUXO@geCw?>=hXR literal 0 HcmV?d00001 diff --git a/gfx/pokemon/ninetales/shiny.pal b/gfx/pokemon/ninetales/shiny.pal new file mode 100644 index 0000000..6b0dafc --- /dev/null +++ b/gfx/pokemon/ninetales/shiny.pal @@ -0,0 +1,4 @@ + + RGB 27, 22, 25 + RGB 17, 17, 23 + diff --git a/gfx/pokemon/noctowl/anim.asm b/gfx/pokemon/noctowl/anim.asm new file mode 100644 index 0000000..8e13e19 --- /dev/null +++ b/gfx/pokemon/noctowl/anim.asm @@ -0,0 +1,9 @@ + frame 0, 04 + frame 1, 20 + frame 3, 24 + frame 2, 20 + setrepeat 3 + frame 4, 06 + frame 2, 06 + dorepeat 5 + endanim diff --git a/gfx/pokemon/noctowl/anim_idle.asm b/gfx/pokemon/noctowl/anim_idle.asm new file mode 100644 index 0000000..5721310 --- /dev/null +++ b/gfx/pokemon/noctowl/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 5, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/noctowl/back.png b/gfx/pokemon/noctowl/back.png new file mode 100644 index 0000000000000000000000000000000000000000..6f7237943303ea473f1a2815d57e722aa9da7ec0 GIT binary patch literal 405 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7KP6c)O4E>m zfuWG2R-b`^fu$tKFZloe|NnC}+$tFu7)?A~978H@EuH#y*C7R-=FFo1-)oK?ZmJYBXCqJ5i*063sY-FM=!|ID=-!jC!wKu8VS8%BbX!bOj`8mP-+SN9 z&SrVknCd4mv8`&DvEerZ0|SGn LtDnm{r-UW|D*de` literal 0 HcmV?d00001 diff --git a/gfx/pokemon/noctowl/front.png b/gfx/pokemon/noctowl/front.png new file mode 100644 index 0000000000000000000000000000000000000000..bbc8b16236f128feb96ecf6b95fa7369b9937bc5 GIT binary patch literal 1072 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@|Ns9}k`<#g z4H+013OQ=^85kH?N`m}?|NsC0KUc%8l7WHwyr+v}NX4zUvl)w@C~&m4e*gc!n3-RA z^KQ|zKFcp#U-~xd>`&GZkvQYbw_gw37Oma?<>3MApARpozq{IC)xla^m3`FTqRyYs zY?8Ex%X78gwFea~`K-nF-#oLViuoP`TZhH(yBYiaSv1vIAJ+;8JblC_And=mwWEK6 zPLqU#;M4WC0kRx+@^c>E%VH4Yz2|AM!uw9INPojq)~0)^ZryVtcG(mxGMswEBzDpU zj;p5^-FUuuJ@O>ObmW%eYZfzIZyt(y;pxpD$xvx)c;5%@1=@Rz? zy`Q2pUuiG8>H3xXgiUC9&YwrEJ3T*#yi;L$GNCeS;WJ^!b76~RIaj0|Ok;Y!pJk!u zi_?b$*FEO*^W2_s`0+%&W86*N2N!Q$&anCR6orRZ!k_MYxVtZ}VdAO+wKb^|mavu2 zayjj>_tImIXKIGWES(kDJ#TsSt?Zm>QSXbF8zpTKI755ZddFs zT~6tg`=ut!f);7b*l^F^@;hUq{>5@OpU+G9e#f#WXQkaSSX8&@MfIsOfzchO{#vVD z@Qj*st?5~BxyB`bVW*RR$HiW~ygIpk{pqEL?%cI~owMw?>xZM?)GBV~X;-c*aevu& zNp`8VSNWfgcQ5ktUh_%cQs2dV?WFoH=8v1#TMOLT_s#*PWXiiA=S$qzFIkZLJD_UY zdzt4fyH(b`tU0tbHvDU{>yGq*Tjwq$Jz3Lm!PkHNS<%~U`LkSw9m`kE{pdfhqw=as z#;$KW{#{xnJ2ymD!t3d3Cok3aq6@9Aq`Y`+#{RdyKjb>g`l*Z0tqLtau{!LT`4-X2 z)YfM42_{wRgI&|N?rFXjmvX^srH-&$`g)tZIWP7ou`k_Swbf|Cq^m`_6Btg<$#&~o zb-k%J(_@#1hUg4sjWrwem}*?A=ew@I!^VTooIOgts zE?dPlx9VQtuEmIenDS2JE=b_`zIO>He>jvIRN7yXefVy+4PG33%;xE=dBl|)O^^pc=GS_)(lrZ zLjxXS-{aYfmfU-vvG(5k72mD%Zhh3>bHDN7U%s3@_ZJ4PY!QlJpIKAMeSXF1_vJUX won3S%Kj8h;`*ItvR6hm99n^^X7i8nNa+!qLSPK|2FfcH9y85}Sb4q9e0KKpgt<7|9`9Ee?tid z28Pw<3)2}G7+6Yz{DMK^xf*Vj3=E8no-U3d6}RqAeJFNFfy1r!{onhRtqX4)dARc5 zk#j4rzMI?Cwe(Le!vf_PyUSc1Q(QM0-|2ZJpy<54q2f17xvA*ve)6S(>~Unmzq9SHvZN*?GG1IhJ&Vqrab|xg9(s&*Ayl zV5`Ua1ET*@6jsS}o=b1>{rJ1D;gk2nZMM%JE8ZyJ=$rS`MDp0~1tM==Z}gWay%8Gm zBd9F8^y|k^r{n$JJ4Nk!{<_?XKU|TU@MizP(?4Ivr0-$)ww}v++m4gH3=9kmp00i_ I>zopr0BBF64gdfE literal 0 HcmV?d00001 diff --git a/gfx/pokemon/octillery/front.png b/gfx/pokemon/octillery/front.png new file mode 100644 index 0000000000000000000000000000000000000000..a2359dc98d3094bf22794f851d5eff6a60125285 GIT binary patch literal 780 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*UYr6kBN7$lyn;a17Oz_i-a#WAGf*4vp6H$7J1Xk~u>_x?{eN5P~i ze{RgYyZ6@2ZIg?dlpci_$NrCC{&4nBGh0G~SMoWJJYkX3zt?VAyX24GgQDu(8(bX< zvZplO^#znp5V^C=C`oU9i_;?EH{wmV7H%}RX05pQA+O(zu~tc}$>`|U=Sk;&Z3|cs zxx#OWcH@!F5f|eQB>A0d)cnw6Uwm5r#))`V3HOTnm4BIc>7O}ft);@g@x{dM>e9eB z;Y>SLtd@K4So*EM(pjl{!;G}O4<@BgtgJaNE_PC?yCLnc^Tk6w*=hMqS47`%{x6kYwR_Hv-5c&dxT+byf30ks)t)am?(hE)q<>g4PRh%*Yx=IrNz)B< z%eX5J82EC=X?;7u9{1_Mlm|;SZhX4Ld~(|!k%pJT`iZB#;~Hz8wSIZHU5R0Ps7upf zou>lNqd8LQsvR2+cwbrY_h_BMj*0bZOmUxt)b^Ngw9M^rXTQkmywYj9^qG0j_AHTL zF#99PkbTsfd9&rL&OKLlCLWk?s$ZJ-KtbVY54(QroyMXQ>Tyi}MD!PK718J1sBqFd z&)#lNNyW<#m-21nUy14*_3ruD|9#%{JO59z=%4&jXAwWCI_O``$;19l)0+~`dv}Cv zdb*VJbI!TxAF6h3v524LJ?**ogW`Q9=cb?gdC4-~3SwCNe;dEUQ|slvOZ@p(Df8yB nO~3W|$9(#-aliU2Ub4SguIbbFL+K|20|SGntDnm{r-UW|6asb; literal 0 HcmV?d00001 diff --git a/gfx/pokemon/octillery/shiny.pal b/gfx/pokemon/octillery/shiny.pal new file mode 100644 index 0000000..a5bdc9b --- /dev/null +++ b/gfx/pokemon/octillery/shiny.pal @@ -0,0 +1,4 @@ + + RGB 22, 28, 14 + RGB 20, 18, 03 + diff --git a/gfx/pokemon/oddish/anim.asm b/gfx/pokemon/oddish/anim.asm new file mode 100644 index 0000000..c8e0f9d --- /dev/null +++ b/gfx/pokemon/oddish/anim.asm @@ -0,0 +1,10 @@ + frame 1, 10 + frame 2, 20 + frame 1, 07 + frame 4, 05 + frame 0, 15 + setrepeat 2 + frame 0, 07 + frame 3, 07 + dorepeat 6 + endanim diff --git a/gfx/pokemon/oddish/anim_idle.asm b/gfx/pokemon/oddish/anim_idle.asm new file mode 100644 index 0000000..936e90e --- /dev/null +++ b/gfx/pokemon/oddish/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 4, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/oddish/back.png b/gfx/pokemon/oddish/back.png new file mode 100644 index 0000000000000000000000000000000000000000..11f40353d9c35498257e9d1f8f8640359b8ffd05 GIT binary patch literal 355 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7AGKG)(94T~ zfkFS@m%|JU3@jx6$|Noz>;a17Oz{uq3;uunK>+RHoLM;kB&Y7S7|KD>diB;Sr z=GzvF!w)_G9`ISny6QqHF$y>7^zdHd)@SS{|GscBaxzH@Lqr1e6)3EO`=QD_gnm-}8z6DLR#p z6=PJLC+o@QT|K7YIPw33=+n;o#sAh!tn=J@ORO#8PUl(QzYMBstXEdb{h!9bz`)?? L>gTe~DWM4fUWS{? literal 0 HcmV?d00001 diff --git a/gfx/pokemon/oddish/front.png b/gfx/pokemon/oddish/front.png new file mode 100644 index 0000000000000000000000000000000000000000..c493346134423699eea7970d8f99e4d55ac61d16 GIT binary patch literal 549 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsA^_DUFf zc`-0B=>Pk2n1O+Tr6kBN`2YX^|8q6mDj66Uk9fK`hE&{oJM&`RVFM1=jX(d_&*N3u zD7@~hvx%lwSaj(}PL}GYYa}n0vwz<>%jVuxJBHI%=@QyKC;nylYe{Wt_#&IFuOj2P zrg2i3h0=sDZ_Q&bxT}}mUg|wVc|rNiS}%^rzpFWasr>donr1Rd=zLR2sNaO29o%An zSj4M~uNg1-F5X$mlqw!wRd2Yp=%!bg(7I|_@m=#@7H{p%^gggYYAwGIiwa{VvmfJa z&u)LO!*7^3^JF$QJuo#eo%|$T?YmOiCfSvBM~fXS1sGIW7vC|fohO`WzT?C1k7vuC z|H#j0*?GuuUBLm5TNjo*{d`JJY(ob3R=&PJiXXRJS1#?mvt(A$mP&i`XdYvkm6-vu z*Mn`Jx6g6CED&&xHA>XAdb2y9TT-N|NHNP(E7Mo&<{iDZB7^PhTC<67-?MH@jV*b; z+V+$YW5G6d=fbpVn^PlmG4X_p|R7DV9uq z6R~j7r1W)t<7zqBXHvUn{6 z1H<=@cM1#)3@jx6$|Noz>;a17Oz?kIe;uunK>+aOZNrw$MTv%)WTl=?6xT;f> zR_DHQN6z!o42RPa{|i-r)j zAl|X1>&vOY{brRJ59gLfb~c`p-hH?yC||HvOU3Tl<7sNHIqQQf*11kFwn%$(Ot}6u zL;L+pyBie5HYiz4a=glNOCajUW#(17dVOxMZvOI%shqXSyiw+*;Eb)Gk0;K$)gKdn zMa52Vn{+orjqr&D{&U=}b2R3&ItVL%@wzU)ub_FU(F)dn)rGgVG)=YUEIzi$@X{u;C+y5p?8obj83P#@7#KWV{an^L HB{Ts5W>Ufj literal 0 HcmV?d00001 diff --git a/gfx/pokemon/omanyte/front.png b/gfx/pokemon/omanyte/front.png new file mode 100644 index 0000000000000000000000000000000000000000..1e47c7800b8e500c542f4c5e7d0c3d773ed25945 GIT binary patch literal 606 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|Ns9l?TNB1 zUdzD1@V(=m0s{jBOG%Jl@c;k+|L1DBRWdLz{`GWm45_&Fc1Cv|iz0{X)ZhRA-h5%p-X zn>9mE;j3VzPUi$KA#XEfmHSZ~x-z{-f8S7l9ok&=YSEHsI@3aqs|qB|Y|-VY3y5Jp zs+ks|ZVcXTdrKu^{2V-}`58;P;+6 z>ynzd@Lj8QiZAvpPuvv4JM-?<`^&t4w4UVeE{v79R2r7}rq-k6RfD(6^F6K}xv#g} z{BiEp;tI}d4woDQmc~cVXFn+}+HL*1Lc;Isn&-Axw*B`we3Ic5fB)&3AQ=CY=lu`n zb02cl=L9}vOyA@#c+nH< zv3Q=v<(1+;A6hJ)zeKa*T+XiICuinKOg9F>|C5aUW!&dH44)-@&co8>TuZyUtX6^A zrN!Lg=TdBWIny)LOXe)(apyC>t5WhyHoY${NG}}%-|d_^clOr1MMZhns)Rigebqdd zFW<*_G^ILk*>bzXDb;yt1p$*M7aO0+*ZY3wP5%7ZwT$k+#aw4peJNr9B^*~jmvv4F FO#lyA4u=2$ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/omanyte/shiny.pal b/gfx/pokemon/omanyte/shiny.pal new file mode 100644 index 0000000..cc1531b --- /dev/null +++ b/gfx/pokemon/omanyte/shiny.pal @@ -0,0 +1,4 @@ + + RGB 23, 19, 10 + RGB 12, 11, 11 + diff --git a/gfx/pokemon/omastar/anim.asm b/gfx/pokemon/omastar/anim.asm new file mode 100644 index 0000000..a98ae41 --- /dev/null +++ b/gfx/pokemon/omastar/anim.asm @@ -0,0 +1,4 @@ + frame 1, 10 + frame 2, 40 + frame 1, 06 + endanim diff --git a/gfx/pokemon/omastar/anim_idle.asm b/gfx/pokemon/omastar/anim_idle.asm new file mode 100644 index 0000000..abd553e --- /dev/null +++ b/gfx/pokemon/omastar/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 11 + frame 3, 11 + dorepeat 1 + endanim diff --git a/gfx/pokemon/omastar/back.png b/gfx/pokemon/omastar/back.png new file mode 100644 index 0000000000000000000000000000000000000000..c6ff219e7be6b5ffaa2c2aaf0cdfd95975fd5795 GIT binary patch literal 518 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zqBXHvUn{6 z1H<=@cM1#)3@jx6$|Noz>;a17Oz_`@Y#WAGf*3?k$P0WfM#!vp0*Ku_`c=c}e z+|1o`U4-g#-xl7ev%VwoXW{{WHtC3W&&Br%EU~%Ev0yIy-?^=z2Z#Qmy ztSTXM-_5FRdr$fP&(HgUEX5iVbQQhbtUW(U9ZHU5j-RJ zVQH}15dGD6*(zhlS=I)T1@0+MHWHUV{mF^vvsoUobv4U0r8RThI;N>kj27%*XT14k zC0B{-oCkBR-Ys@~_4VI@?)2SrE_yFKC+Y91ILA(4a>6P(mX$1OOiv^n`&!IyzqA*$ zSiWelJ433Qg!S9oTXGqz%hrBMC;rpUu6b{URW2RSV`qAm;E)^WXXc5>R;hdMW- z1lRn(etMI{ED!l!Q^Ax&+|H+YoYzOYyojDH^qF~y<%xyYTsX{pgPy6`ueTB9-zl)> z^nvW&DzAq#I0Ca}B<{QpG`o4u!E0&^$G`vE#9m!fylvL@_P53@!TFp%xl=T@c6j|@ Zwz$q-(a60(h=GBD!PC{xWt~$(696l6-q!#C literal 0 HcmV?d00001 diff --git a/gfx/pokemon/omastar/front.png b/gfx/pokemon/omastar/front.png new file mode 100644 index 0000000000000000000000000000000000000000..382bb5417ce995c1f6dc3f56b6a87d15b03941dd GIT binary patch literal 898 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*d!j6h z*D^3LeD8Rtz`(%3QWE4B{Qv*||G64&l?)8bik>cxAr-gY&g@>dRDs7e^ZWn*pFQG5 zSdLbvs7apjUFW`g;g+TAGBmrJPj7GL-p3ihQ6J&pG9mf$KCY6!aNft8G!+*(ofp!R zlIQ#F?Z`hVd+S3l)5$aM?47#6>R_gB=)s7arwdZ-Pl`EfvwAzcuH9^2KaHtHI!|A_ zt*0sU=tR}tn1!2WGFa_lm3#PKD=0}Ka}rC;y6cQ#P1owg~Y54?|jzw#4{X38pp?_`i>lLC|zZbld-L&)2oU8F)Bl+iE z5sE&sIFhyOI@iu!*p5WI> zzXMq}RWJBBy7`LSwp7Z?fNz8L{C_)nArB~5@w7l zr9v4Wz3U6=ORiR}y}tgMM%2OwdGehZ-&bV^HlK`RjyV;3P)MgYcXyhf*gPM{jlQ=< z-m0kYVpZ;Y7NEUt%lz8A4L@7XEnc|)kXl>rFUJGU@|Pb9GP-Qruc@>3u*{3avqV08 zJ)-rw$<``EQFr6KXxlBPv^6s`?{YV4E&H~#L{`ziFn{%#wNDrLpNm~EZF0>tJBOXT z-rBS8&bD8<*s?BVQoIG9zHFS;o|1}}%K8`G#E0|9F}`RDGb=u(W#mbS|mjH=if% z-gDGjvi@6zrpWC*A#fW$T)O{6wSLk5PeI8N_jS+jVd?I=^SnH6(=nyBS3O_MoW97` z)x7HQ(rfq4DmC|V-h85JwdYIzhf5u52fb%}zNEkr_lZlgGV_GfGga?vC%oq_`zSPR zPl%P&iwe(~nNODX6m(ACa(D`-{#JKgt2nJ0pM}_-$5)J1s@zQN+IUgr!eQ2Ei zPT|ujZ;5-KYacGn`q(;MDPZ@WD;8znPxjwu2y36tr$6_*_w&D(e#({aJI;ImaoCmdK II;Vst06c@M=l}o! literal 0 HcmV?d00001 diff --git a/gfx/pokemon/omastar/shiny.pal b/gfx/pokemon/omastar/shiny.pal new file mode 100644 index 0000000..2b80173 --- /dev/null +++ b/gfx/pokemon/omastar/shiny.pal @@ -0,0 +1,4 @@ + + RGB 25, 28, 02 + RGB 12, 11, 15 + diff --git a/gfx/pokemon/onix/anim.asm b/gfx/pokemon/onix/anim.asm new file mode 100644 index 0000000..31dc30c --- /dev/null +++ b/gfx/pokemon/onix/anim.asm @@ -0,0 +1,9 @@ + setrepeat 2 + frame 1, 12 + frame 2, 12 + frame 3, 12 + dorepeat 1 + frame 4, 12 + frame 5, 12 + frame 6, 12 + endanim diff --git a/gfx/pokemon/onix/anim_idle.asm b/gfx/pokemon/onix/anim_idle.asm new file mode 100644 index 0000000..77aaa10 --- /dev/null +++ b/gfx/pokemon/onix/anim_idle.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 0, 10 + frame 7, 10 + frame 8, 10 + dorepeat 1 + endanim diff --git a/gfx/pokemon/onix/back.png b/gfx/pokemon/onix/back.png new file mode 100644 index 0000000000000000000000000000000000000000..6aa7be5bc74687d9450e0a85f27a315a9d664350 GIT binary patch literal 469 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7-&4KR%P@+8 zfq|>+`eOzL29}Z_zu^D>|Nqa`aI0isU@Y-;aSW-rwRK8l(Gdk6m%#6T-^*lgJ#b7j zNc36qhPCe8xygTW8{5Anf4C6W#}W5!(GAIi&huUP=2|JsSSUO=z<4lNsj>Lce-#l1 z1py)E1?%z;ZCc(^)F<7VKYz-KOP9oNJLw(xe<^NaFWc_Dl_}ZM95;3r*0{de)#Uc* z?LQ6cuLr*GT5MRsc2@4IiHU1erBEMVajqi$ zLw8mR?{ayQ67^a-fpHzr;@h|1f8*Cy=ynk7IPi_}pnAi}iLf@3HUYknGQ$Ew}ow?EKv;Wh+}rLn>~)ozq=(M}f!H@%#V(JK1b| zau0N*E%#k?*2nzik52+juh%^BeK~&*N43?Ho^0!!tYdGz=;~wVKJ`a>lgZ=)@motT$SFGAnDW`z zQ)!C0wzu%ps_e$&x7TS;^<0#@^UuLP=ThBM27O|$Y@}7Y3{H#ulz-735jSOpa7J#o zOC;N=?ggvaBD8a?%hW~1_6Mb}{Je0DSJv<8ZH2$myY+mMF=(8(7=7VC2*`)vHN~1diZ@s)f z<<`=j=N5Wac?q0fTK?@;z}c58qTH?b_+NNdT;+dF*sEHkoBtihRms%-q0%zR&suH1 z2mE)NSTX;W?4mylZ_odJ_{A5|rE|+O&Kg}R>`zk?n{@J+)yu%J;J-5YRxfUz>GOFZ zvAg=YZ|5xD@_lGGVs$+pLBFv&K6ao!1WY-1zdW z`>JWTT&2X1{|b{Po;>++mW|T{P1}va_dnWvyV9%gmA~Uyx#Ew-wqN|$i$1Nb>h5g_ zSDq=+{kUyi^2b@X8~Wg%e{U+UYM0ySzqEeYYW-|J4_i447}jXN`@pgOj-&o+gJ*otrshw1f8xzk zyLS^TvX$>2Y&^L{j;xb?$xY)$%fN9tyZ5Xe^cmwcdgd5+6_KBDgSgsRZkyqS}t%pV)@<)v*mw0 z%V=Po9y!(e(!E72vew|fVeP);dG96c z?;D;jKQr(BjHlMm&X@aql6Ai8y)XG!%n6nIhL!u0XS}bd-j_V(eMIHH#q*)01S`k; z(y+t#7M;`Dq5Mg9;`<*H?>rQAn;Q!DvQ+s6vGO(7BcHC=%=PX^{f@_5&t)x{eKqpz z4(8c+8f)L3n0;rW`A+3mYs7Xazgp8|-DJHl5guTnHS~Pfx%7wK>K}HiPn6fB zzuR#ovU11bwVOW`xksmOJtsTeN?W|#q%_RWJOg3?$dEeq@(Xh1D`Mx|33NFq3xgBi zchtBSz~FK9osU1gnAmN7u1iqATw#YY96oL@JT7l8S`c*5*!d9y0|SGntDnm{r-UW| Dbv5oX literal 0 HcmV?d00001 diff --git a/gfx/pokemon/onix/shiny.pal b/gfx/pokemon/onix/shiny.pal new file mode 100644 index 0000000..6693596 --- /dev/null +++ b/gfx/pokemon/onix/shiny.pal @@ -0,0 +1,4 @@ + + RGB 15, 21, 04 + RGB 14, 11, 07 + diff --git a/gfx/pokemon/paras/anim.asm b/gfx/pokemon/paras/anim.asm new file mode 100644 index 0000000..d313f11 --- /dev/null +++ b/gfx/pokemon/paras/anim.asm @@ -0,0 +1,5 @@ + frame 0, 10 + frame 1, 14 + frame 2, 32 + frame 1, 08 + endanim diff --git a/gfx/pokemon/paras/anim_idle.asm b/gfx/pokemon/paras/anim_idle.asm new file mode 100644 index 0000000..faaeffe --- /dev/null +++ b/gfx/pokemon/paras/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/paras/back.png b/gfx/pokemon/paras/back.png new file mode 100644 index 0000000000000000000000000000000000000000..4962bde38b766fde04627b1f0b01f6949dbf9e72 GIT binary patch literal 402 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|36t`uLJ`F z1A}kSa(M;@29}Z_zhIDfu7+DB0|TR>r;B4q#jUrKPYNA2;BaRC^}k-v;5x>&-S0N<%xJVPsZZRC&LMneeN;LOT`_h&Z(~c!S{ff!{Y1D z(*24DmVe5~{PT-hA^pngSl*N$YyR_btd$j$+^M->SE-x9*M;1Rq`jP?4u^dysqc_* zNIQAD*WqMzyyC7kJlX0@SEP5Yk&v?ensvvo;ct1^oGhWP)AQ3Acx<#34t)#aT6f5+ zWqs`WiyPPY6|ySyFT3pY;q<~QE04+PMci7Z&l|G9FQB7jo$RHk^$um*yTTTn>tJ9m zVryoY?(Le)lJZ_#J@v}Z&9`|kI5JLM9@cO*@WH9L-ZxSK(&uMi3;!22ed}~(hrL^$ zntAo#Tm42gOEYVk@J#U)KUs}~BIDPeiM~)D_J^&8!IqJ&zh#5h22h}Sy85}Sb4q9e E0JbNqCjbBd literal 0 HcmV?d00001 diff --git a/gfx/pokemon/paras/front.png b/gfx/pokemon/paras/front.png new file mode 100644 index 0000000000000000000000000000000000000000..9e67fdc9e6eabcf7539eb5e7a7c9e5cfafa2e0a4 GIT binary patch literal 777 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsC0PnOs# z!N9=4;2X4Do`HdZr6kBN7$lyn;a17Oz_h~C#WAGf*4r5ui`FUdw0M5|dw*w&xq{ZB zxi62-w5+&jRp{%{P_uu^ruFNmGmCTQiJkH?oTHmo7rg6eymibDapS%9eL~k>Ewuem zk*m}a9dnge^{T_e4{7!HGfO>xnCq%1&bZww)_h&nqUOR?qpNeC9m?{XuM^uF`G5J# zS-xLIMA=O{lv=K-t1e$(Bb24T<9v@?JNq=2Il`>6TelSa5acz=+!Dyov-RSene(ow zobldw=1AYkOB?1iD(T2OS(zkS=`4E~p6FxrX&&o=hZkmK@T{#W(9^%yeA*#0Fl2`I z^d&Ew+I+iPVwd~;WZLv@r$_YMiARgCO^iEKxOUpp7v0w;rPf-epIiEJk9WV;?0e;0 zmX?+?1Aksr-gG15bW3UHDUF8}uVPp#+Y7gUsl06Ph*LRx-S2B(lCLgU|5L-S+w$g- zATz~ZeRH`s-?97AIQ?YNJI0N#+}-#!sa->+SG4Xw9Nh6n=1b~odR#R=Pcnqx5df$QaEqvhN0&$;bWGaqQ4`%qVxH?22*&dKE2FLz3obf}(t^7qf3GhbC5 m&%LOdKl^R*=K7D-&)8ExiR8X7dUO+%mOWklT-G@yGywpaht<7|KCfoSd)W+ zf#FH}kADmd3@jxGoM40@Bh?w%jkBP_S(F6XyKjk4J7t1?+jcCo8bRyHat* zp46IsYSZ3#`A1(cI~xDtsJv4{5NBMUooxIPIPSNxQ*USL(Sc|QiC6_Mvh#cEj`6kJ&cs8Gnnc?c-H#T#Q ztIf!LbI@MhZ*Q~3&GzfYPv5jGX0m*@e)k=nJs}3Mec!ZxC2}70KKQO}`=X=CfeL?q zuIo5HolUm+5nNskqHTphpv|6iFC#woyI z@8i4dh;z8sTj80y*Ej{57G8)xRI1pO&uEu;{YA5Fy>!;I2|L_`^mZ~$np$HaXfTP_ zW!H>iGoipK)0Mb)JUgeH_#o-=H^t0nix{UwWX>&iY05Z#ONn?}Q!v!q%I|tp_KMP} zsIG<+DKaO&sP!i7WL;9x>EoP#QM_i(b?db;JiJqD?Z0_&{@{@oF?jM@wQI{0H-lcQ zJ&$d!PL>r3Z>U(>uabmW;i9DV%nIp?>U8k~QaT7G?k*8vU7kNbH& z<}xpHkIM7cU{wCiHPhki%Z@o(cJj0K38?uoYqGmYK1u64`_k3d;fC!o^Z8w|Mb0HN z&zpS^Ue3cMELpc_M>z=o=_;S1^Z1%|7i&zl`}PLw_YcGh9?KqL%G=`{)o|B(32RJ6 z`<4c7i0~bzD4*_f18$DqEfwzD8_F5(Rlhr-?2;lKjY>9nnVBQi+tyU!oK@o`lg({U+o_GYsa^~d1sGXzZbBddV8;P z%4hR?g3@lScdFezQ#6cnR0TGde`zR;IB8YkzAjV9;h*sCgVtT^UF;;^+!J&)>yKcX zyLWNl)0)CMjahq?zh|F(cG39l<0|*J;a5UsCzo$nQ=`fFi~npuam(6r6@je0wbku$ ztF)#1m&@!)F5P#yWL?dzbkUyY zrt<7|NnVVvX>$Q z0|SSl{&EHe29}Z_zhIDfu7+DB0|R5Rr;B4q#jT~&qNk}Sa=0ia{jbh*^i>p|Gw<@h zsmGqGPE!38r=WRM={55P8^%!Yq?ev8^AGRR$`W4}x|uC_weIG3RSQ@iXvJP@3(>D) zUM5$a{@A&mRfTcwz0E!c${N@zb_e`yw-eCX_2m}Zmc>;suWB6^n~>=D`O|%Ihtprf z6}EV>+sHoq6j|&pbwFsM>xVl+&avF`@_VNWnHD(+CZEshZPm*mntA2e^*~WaU;pJ3q_Ngxz>rT##U=i`} z51holW}Qc`!PgmlPecP>DYbMglk?U$-OzsI4SP|!_qm_U1!oOz@*BQf$`%yvs`O@m z<7Ro=FAQFL1x+V>xnz5uVZ+t=p0igiao7F(+y3yZ>ayA|SI>T2)-R~KAZ)+7kpJQG z)l6R&ofn+@@88nq+1+;!?Ps$w|6AwzE^-6Ywc>T|28#c^MeeWY`_TM~pSj?o`UCdO XTpT=Xp@KaO3=9mOu6{1-oD!M*~G9Yh+j6d%-5JpChAb@1+01{f1B6{!hN@?T^wn$Q6eh zeJK^6#3iY=W$}%3g_4)f+xQx)?0NM*E5L>+FNk}|uePVA+zZv$DI3i{<+w;E`GvjH z6i<)Im*y;-e>?n(K-k?4E4(uLuEcvw+uOEWFE29dIhh=Bpl|($8E%%==bhx**D^c0 zU1+oCPMz~CEI!jtCNX5{gu^?|?diSTxmQ!E?Zd1RC6mP3&AuYtVqY~*%vpVH_4~?r z>y$E`vro8#7RKGUq;gtS%xV5yF^(!v>7}<`I!!n$@^M|r?T9Ycja<6dI=4^V>Nlb4 z<-Ds`jo!_0>LG z=PlyB>eL=3q;q_wl_zIjcZzm!s`?t%?l=4W?4u4|WQf0(rgfpI{HWzuCiTg?Vx6)& zCaja6buIU6MQoLW)buN2!l6lU*~CWxkddrPfpqurt8P~+H2u& zd6l`!*E^@(v|JnZ?ZdQx1;_UvlI^wmH^KT(5zF-jjt7H&Jn3t{Wcsq`_=Sr_UNP@> zXxC1*EBCQlwD!YE+08*^XSg5gm;3D6>N(x|%<{5{ZcTsA$$Cw=tMvcV;`6fGgoV>2 z<=>Y)En*i@Of9jqU$^5hN731S?ROUzpPD6K`|g0X{jWQM58eBj1RlE2w^sV|qUiW6 z`I+%8cJ@a4;d&nP*8G?lrmdrMGVITePisCl%e?!f{I*oeLC#(;Ci%|AuDOT%pJY$9 ze)Tf^&yE`cChr*5{+KA{y(hQ;>-EVF# zJ^o~x=8Gr4_4bIy7EWO*uW?s@a^B}8|Uw)n{KkMo-exVO~LVpeTQXXHhomTQ#kLv#rg6-_VeB^ zkS^b`aeKu+=k1;{yHzs^+Lwer?yH+0@#H68_so5Z-M{?gyYsGbw%4=YpJiu!a?Vcs r@RRSDZ`r)};P8VOTz^RRKjTYn&E;IbSN1b7Ffe$!`njxgN@xNA=$2$X literal 0 HcmV?d00001 diff --git a/gfx/pokemon/persian/shiny.pal b/gfx/pokemon/persian/shiny.pal new file mode 100644 index 0000000..6ede92a --- /dev/null +++ b/gfx/pokemon/persian/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 28, 10 + RGB 28, 09, 27 + diff --git a/gfx/pokemon/phanpy/anim.asm b/gfx/pokemon/phanpy/anim.asm new file mode 100644 index 0000000..5504c88 --- /dev/null +++ b/gfx/pokemon/phanpy/anim.asm @@ -0,0 +1,7 @@ + frame 1, 10 + frame 2, 10 + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 3 + endanim diff --git a/gfx/pokemon/phanpy/anim_idle.asm b/gfx/pokemon/phanpy/anim_idle.asm new file mode 100644 index 0000000..8318520 --- /dev/null +++ b/gfx/pokemon/phanpy/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/phanpy/back.png b/gfx/pokemon/phanpy/back.png new file mode 100644 index 0000000000000000000000000000000000000000..5efafc74ba470d25169962d08ed41e21073bd589 GIT binary patch literal 347 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7-?Q}EUN1ui z28MN)Ke90}FtC&a`33*~|NnokhFc{A1H&&*7srr_TW_bF6=N3UaTC7(dw;Q@&%Y}X zCD(Q41izcx!nLUW&*SNgo!?7jcOKJDH$3xbPKD7Q$4J!;oH>P&Nk^~mTpKw3z>&83 zTt)lNvF|&(j44I+VKH;EB0tN)j~{-2&^+MBVZFWSxii~*B`y)(nuq?TsZJKLxhn3n zuBGto&_3en%i6DC^ENB%JLl2^W{rkR)Oy~AZsR@OvFFMaN3kvamk&HytH{B><%^*8 zzN;y$J@Ts-U6_6={D?_}A0LF{I+w+Zo(>M-+HiH{SpIK1Sh~ z#0JHvl|kXHUN6;VTGTYTPq_5Fm2uA^4RN~-Pt81UE1Qf6GMBqxzwM(Vr?u#^W=VCpvtJ@|<6+=J&3DY26;P z*_S6TI1s%1;rW|JeoOY>V7;CCcK@H*dvz}8HGdJbU;pZNYtF)!0N5TA}O%=X4WgCCF-m*&g}ZmKbNRfT%NsCF(;_AVXbz;U#`iC(wcf(4=ekxN`JC+%`&}52R~j&V%3|$MX-?ru!WGU3Bg^T7>>=8JStk17I8kKOTu>Zx^$f#@#lLKk~h!GeDYxC;i_X5&o<24 z`1aU-c5{WT@!Q!KZ`T^{`khvO|4r4i`4!LDtuKhoImCKz QApt<7|NffhHA4ml z28R1Zipv=o7+6Yz{DS}g|NlQ%!>y8mfl=Jk#WAGf*4wEEg$^rlxZJ(_|NnEhMVxFK zKi-%*>Eyx|a}K>NQ}+K|7Z_ricVzvH2UlkW{1vl(Wp;l3#iwU?*3|WCvMs1(eKTF{ z$PA~9yaN*3!VOuo8T9mf3cel{VQ+jS+)(s4Va+1JZwq8!-V~UA$SLNFaKZ|vi_bXy z7S%8=VryVE47@2cW0jDl;nYedg}GCBEGFbkDr3w&_B?gEt<&n(1?jR=_Pr6f%QG{s zk=5@x|IKZ?j!i4uy5|@(XHlP0_T4pB>A}{UH~lV3;(v5=BhL=^zc*0LU&#VuYg{?0sWKO<$rfvE8w}o|b=~>s)+P$w7PCetrbNAGjBimk@ehb(B h>l^le_kJ(EB>UGh*nivoI>iSHI!{+Wmvv4FO#mA{r$zt( literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pichu/front.png b/gfx/pokemon/pichu/front.png new file mode 100644 index 0000000000000000000000000000000000000000..1557f73fb1ac0cdb33dca3ce3a1da49e466defae GIT binary patch literal 587 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsBrU(>v1 z$iTqBaKA`#IRgU&OG%Jl@c;k+|L1DBRWdLzzVdW&45_&FcIL&RBMKa@Pe1+tALA^d z+_cg7t&cUg{@t|oD>`HzPx}<#BiU|cIEQQXUXDQ3k|$eV>23BpP0$djcNIdRpM8rd{KB}H+wcTDZc zt0c6yaxq?-uq9)sWfA96bE(8HlQ}QPXo_unKkMHo`BZiL+IKD2&&_NSUTT>Y64F%= zU2uMuRqY!y0dsq$rkZ1O_kVCZu_?#)@U1)!rV{qKw=M3>wOq<_r1a+Qnj`80pM>1Q zPn6mw1l<-clKdSienH#l>%?C-br+Tx?^*mI^Q2DZ{9KD>wU~@`y&pCBvy;y}S+Fvo zr2LW;--B2C^cS;z-Nwhg(50z~n{Q`}hw$V(uhi|@_@wXp=*96fFz&Rtu=a@)%aVBY z>+5d4w%GopDycx|R)N*j$j>L1Ep1x8ytjPLBrC0*rSh+)7>Aum-LOt<7|34^sj*|cb z0|SeInm33l3GxdDiRWs#RWdLz%6YmthE&`-JIzz*umTTD>$Cs$eUU8=+=iB{^Ml@f z^Ux{l_*eK~*6~t?f>?ncyIQ+N6dTJeHMl!0f2as-+&|w-LseHkG5wl^>Dl-J#ax*MSJb$w4YKt zxzy)9f9P$c%sNeromD9w)#rp6;nb^^`oX8(tC;Tq|<7(r4aKwY< zeE;1kTq07p-5*+?{~69AIiF+y$1hP99~KH+pUi&6ch<*=41R7(b1J`^ovUE|seAt8 h{nj-KwFY{XqIP>VI9i|Y+yV+%22WQ%mvv4FO#m+>qhbI6 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pidgeot/front.png b/gfx/pokemon/pidgeot/front.png new file mode 100644 index 0000000000000000000000000000000000000000..a3e598a28f198fdd9a0122204161a6d4fbe809dd GIT binary patch literal 1078 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|NsC0LCJHR z1Q-|?SOnC(K~zbQUoc2KSHrE6fr0s|r;B4q#jUrqIw##x;Bi^_`~QDSHco+d1HaHo zUQOFKnST7>CQ;2Am(nPCee5zLs$|H1=C3K9> zRX^Zbmi*>G$@7`Lr)RQr*{0r~@6dOeZyS4wGb*9V8nGqiO!V`5C{qX8pK1Zj|f~PdE?a4Xc&G!Q=yxofA z19~cjS0t}oefYY8ik#7=gaeKb#Dcc{VtnLo^wzU)!i?N=3J+ZCH>qFTW6=3UE-X$w zCGkqG+XOY~Ug@A%Zd(rD&?)EVGizUadOlb;CF;$jqdQC@7l&G~-dwbQ>2%BJm)90d zJi5TPX?%vrK(GPikS8XxQA`>7{w&aK<$BfM~e%=EiOFKSs%scw;)wr1`1g$@_kPAch{rJQEz_L$=kG3n_!qvhXJ+9JMvy27!@ z_u3b2zRY*qj~Gw+;;X+bb*+47uJjCV(d#KE@5foD7k%?dnlo>~>|JwSpLJf2%(ln=Ka^QR}-h;mh<;u4KK)%!x_8v1eEL1x~Nbu;lxyT%>WdHdvS6 z`KH)L`LFd4FCV?zeD}5fj=ouL>9_ai)pQ-bwY<)uxPI-+$Cqo0L%H5Q@A0{5_hC=> zc25h_>qf_~os#ExEVEaO=vgQ&TV8dDXYDe(Jjy4&@4G7DU~7&1dyw^}7Ri*3Em> z*LPO-&CGWaJCpAkP6#iLxm#Fz{Hknt`Jb!19?vVk^SQ73Ug3G`ca_KOOYRBQecRKV zziYAo$8UR-S(mT2c4)a;=|1DB^OGC9+;u&CosHt z-Pbo~$H_%|jU)|TF{GW#JgKd@Xs`DAPqK%@>^h7ycHNJbX=N9iI{86Pp@5v}fkWCS z{mxh_EZ>==60N>jUAMz`@#(~MbKl+2=2u!*+CKNertQmeE(O`Ph|j#@Rj&M7>{u>K z`dz`_`O$aRzo?t|?m_-_*&Vwczv^3Uz3$zQ^`-3I$A1QvX9WIPV|}W$^tk>N+3)Yy tysJEJ`+moB+3$NE&ny3vc=sdorcJ8d>*Nwz85kHCJYD@<);T3K0RT)H2mb&7 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pidgeot/shiny.pal b/gfx/pokemon/pidgeot/shiny.pal new file mode 100644 index 0000000..68eefb1 --- /dev/null +++ b/gfx/pokemon/pidgeot/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 20, 14 + RGB 15, 17, 02 + diff --git a/gfx/pokemon/pidgeotto/anim.asm b/gfx/pokemon/pidgeotto/anim.asm new file mode 100644 index 0000000..5c927ba --- /dev/null +++ b/gfx/pokemon/pidgeotto/anim.asm @@ -0,0 +1,10 @@ + frame 1, 07 + frame 2, 07 + frame 3, 07 + frame 2, 30 + setrepeat 2 + frame 3, 06 + frame 2, 06 + dorepeat 5 + frame 2, 20 + endanim diff --git a/gfx/pokemon/pidgeotto/anim_idle.asm b/gfx/pokemon/pidgeotto/anim_idle.asm new file mode 100644 index 0000000..936e90e --- /dev/null +++ b/gfx/pokemon/pidgeotto/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 4, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/pidgeotto/back.png b/gfx/pokemon/pidgeotto/back.png new file mode 100644 index 0000000000000000000000000000000000000000..46c5970a4f7a75b34c36d39a917e772aadc39c82 GIT binary patch literal 382 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|34^sj*|cb z0|SeInm33l3GxdDiRWs#RWdLz%6hsuhE&{oJH=C|)qumLao_*B_Q6SNSN4mWhdnjr z^-%fss9QgdP3PaiPSX!o=IMJ3Bn#>f3!e+*DVKfs@yYQ;AI_woKFe16^+_p5@c z9<5)+KtiE{3<@-#p zz4B47l{P#&dc7y(ze<&j_N+#Q^qn4je0m%_|6DhI>Q<`bv^*Io_&B0+qny;if3?ny zFXVf*4W0kY;r6ewP!SQ!^`gX9AxSjyMAlY grWxj??;f!y__O7NXUlD3U|?YIboFyt=akR{0P8cHhyVZp literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pidgeotto/front.png b/gfx/pokemon/pidgeotto/front.png new file mode 100644 index 0000000000000000000000000000000000000000..cdf3f1a285c9289868dbd57978fe36b99b06c6fc GIT binary patch literal 877 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1uXmE*nb z(WJ86|NjGQKAt`r^e>XxrRv~{J=do1*eBKYbn277dHaR!JuKHHJx8g=xY1 ztM}96+xM{tHcMDpS|t3P@Y-+TmGAKrzB;e9&3REJXU2Y^cGktEbx$}~zYOMP@NSqH zp)pmb)R<+V{N{@~OLtv%V02luLHa~c1>1t?TfVHy469hS=gZqhPWYeuK3U?tg;w+m z>%$jo-vn09;(PU`WWv5J*UNGPekH!hW^CPOUG+V1*}8hSi>uc?msoL)LxF!bd$-&9 z&ahu;nl?KZd0##_Sug*AQ}~pm^1njITwUpBP@)#S~c`Tg%of z!7UfSBV`kp z!Nh_~Fwv%EJRs!so*7H7Fp}=S$`0Uy=wTTl5?5!*~5*~6BPGJ>zgv) zD0`r~`aP%Bhe<9+4%M5-F|llClCQ|*t$C^{YJ1AtBD!Tdi(YGm=cAyG=_(+`gP4t{(Sk-h{c8Clz-X>nHBC ziQi?Xxcl>^9dR?Jujo_NN5E9?IIlRbxL=iVQo3inr~J0iKgg_Q7^ih@!k#H$_(eT> zUcA-Epn37XHhlIz5|%$FzUkAmpGz0t<7|NUO}947$= z28NE!Q41Lu7+6Yz{DS}g|NlQ%!>y8mfpLkai(^Q|t*O%@CmmMcaasEA_x;KXZK=%j zX7n$KdD&iOsbnuV;nPcpC(=w8^W7F4t5LAHq7}~&T(7ty&C#Cm!sgbA0yd3}FD^Fy zec{Pc&)mYm=A@~<;@cmgW;QQmc z_uV_9<;;RRt0Ye?jumezn7DJQ+*tty>EL;#*QEtt@g&x)Iag|HBV^)`s=1Ka)8$Fk z)fR0*$7$|~3!2)5zcsk$$I1OXf7NT=y^18}3pxxluj+KF^xwRaBdA{R^6|IA+9!8r zM6+Zna7{dHJMr|>+4rLEUYe5oV(zl(%+`C$6ZwSG=eNpiub91$F-<#ZU+VI?%lfZ% zR~(&ob(Nc$((_AKDo>VFTAp=qUA|pGT)C#F+Ou-f;@lN}1_lzNg{Kf<)8on literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pidgey/front.png b/gfx/pokemon/pidgey/front.png new file mode 100644 index 0000000000000000000000000000000000000000..c65e7494ddaa903752c0d543a19aabde80d519ef GIT binary patch literal 777 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsAgzn4A7 zNq~WYp<{E@LIwr~mXaX9;Q#;s|IgKMt7KqcTH)#97*cWT?F`Sd!v-7@m;K));w?IMU2bz;Qgy58&-3NUjjB5exOq0QsJA=_sM{iA*uI7J zYD3(N>}$nLoyWf?EHqZo73fXw>Axzpeny(Gs!FrUj8?vN-sSdr=9tAQLmttc}+ps`lT~kuBaKbGu+;>zHv$-OIKn# zpWivp*WERXo4S3p4=Npcq@!fvUY)St?T*qVGrONm{6^aYFIF;2teCiCePC`npXTAC zOLLA1by#|;d6@}L@ci_2nuF`Z2O?W`K5C3#vUd5TeZNjWRcu|eQ>Iuqw!LFV_!~pV z-Bu|vp!%%64)5hTlORHnz^Y z%$NUh6o2?q^6p#n^9#O7b)`S}(o=S9+gkH^6Af9l<{1`0^!U&4;$LZ1nx)>VX%pEj zY!}-}7)(lcIp=cK*pBtOF$muOerERbWydq-rtf0CR`rZE+~#s~Z~88t7dDr_rF=ib zz0dCa9w-0v4-S-dYs@qJooK9h(|DV!nc-S?vkRMxlsB@p+;GfDc~`OELKU~VyyY^U zxHIpcoY*N7w45cQxT)}y<)_8z-+D^Ve9WAt<7|NffhHA4ml z28R1Zipv=o7+6Yz{DS}g|NlQ%!>y8mfziv;#WAGf*4C*PryW+{aFKoX|9>T`DQoL8 zyEV)Cd(ZJI2h{W`@0XE=Ezw!J(vHH%N6rCjBb-yCo^`Rkhsds zZoszYfXIYtf(ITpEo8s^tXoe}$@GGl!G!X?>zMeBnrqml>^Y8X%Y6~JJ(5#$>*{Iw zzamdoz4%{rpnA1AbH7|?U0395+YLGY&dic?l;fzIcFl~BNu$vq@};d{++iR2GqQ~_ z{J(s8ELX<**Ty@EHQn>6>zEa^X^z%jp-ew}M!V(N2d4S!yo&XcX?K=VuX~mq#Ivj? z@TIK5S^e`T{+_*Ssl*;67-r!A*W!eVwvvA0zMk734}H~Uw_WfuLucRX*`^L_?=mX> zWOm%0zNKZJ?PR+LHlKF;Nbc3>v)$z1aXfUTSJ0EK#s7@HF)rEArhPX(q)K1z+m=)N gD@&DUe7V6`?=Q-3bJgHUIw-U~UHx3vIVCg!0BaGkqyPW_ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pikachu/front.png b/gfx/pokemon/pikachu/front.png new file mode 100644 index 0000000000000000000000000000000000000000..07dcb4da6c494ce431ec7426e150d335cee83e68 GIT binary patch literal 799 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-VEDkn%)r3l>U&L=fq{W1z$e7@|NsB*uW4R0 zWME)mxL>5WoPmLXr6kBN`2YX^|8q6mDj67<_IbKEhE&{oJL`7d8wDQM=I{Ui7dIbl z(2vmyUF)W5%Rf2s__2gNZ3Xk(^{US49a<=KVBtY$MTe8WmVM8>E^niGaL0+eANjKt zpPtuzaqhRP*UrY-T{`#eC#ENvUp=GkEz;613)+K*A20V<6b>ZJciD9 z!V=9gORkk)d>SS(_if76(+eDZw_cw(BV@9#iPnXp<2T=^tvqj~a!&5dgQ`CfvHUw1 zZ(>`;?aXhvd+L-^1)E$i@3+YLFlVKbV4upS&>N=0ul^XRaJ3{(%9J=#roDHX*{QZg%WlN%RarIXU>`?>^_+rd z$?Hzf1i=}`Ef0>D9+-LQGxND4(Nj8%g;Nhm3cqVIUR-i==Ec8V#!)*S^oU)0S#3OL zpZV@NKXs$-e4hEg(9XCvG~rzOosFm8)TAW_%s;>5RL%MHcR$bA&fod|Y+cpl&!6vf zSv;;YJZq7>IpNsMMElLpc)0y7m~Vc2W6}KkKZ9O62-?jtj(;&hMnThWt0*Xid%F6$ JtaD0e0st&zenS8N literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pikachu/shiny.pal b/gfx/pokemon/pikachu/shiny.pal new file mode 100644 index 0000000..a89172f --- /dev/null +++ b/gfx/pokemon/pikachu/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 17, 00 + RGB 20, 02, 11 + diff --git a/gfx/pokemon/piloswine/anim.asm b/gfx/pokemon/piloswine/anim.asm new file mode 100644 index 0000000..63cef3e --- /dev/null +++ b/gfx/pokemon/piloswine/anim.asm @@ -0,0 +1,4 @@ + frame 1, 20 + frame 2, 10 + frame 3, 10 + endanim diff --git a/gfx/pokemon/piloswine/anim_idle.asm b/gfx/pokemon/piloswine/anim_idle.asm new file mode 100644 index 0000000..a0b6ceb --- /dev/null +++ b/gfx/pokemon/piloswine/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 12 + frame 3, 12 + dorepeat 1 + endanim diff --git a/gfx/pokemon/piloswine/back.png b/gfx/pokemon/piloswine/back.png new file mode 100644 index 0000000000000000000000000000000000000000..b2963e86fe7dc1501724c550e429370f4d3faf7e GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zqco-I0&R7 zULrG*fq{XgB*-uL|NsC0b2Z#585kJ$dAc};RNQ(y*_)3=k;A2R*Z;Zh3;$kx@FGub zCy7- z@xsmD8NAX=4|eVp>G>0oJXs+%b-In} p%?9$!3zmvKvlM<%+8XI0-<8MGAa|v0E&~GtgQu&X%Q~loCIHf~cC-Kh literal 0 HcmV?d00001 diff --git a/gfx/pokemon/piloswine/front.png b/gfx/pokemon/piloswine/front.png new file mode 100644 index 0000000000000000000000000000000000000000..822759c1cc579581cb2760812ba6f6d635e031f4 GIT binary patch literal 866 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*y8mftk_M#WAGf*4vr4Hyu{saBcnj|9_3hgo?&1 z^R}PMn7wWCj;D)wvwbuRleZjuy20?v?1s(nuGC-ZY}s4=HePz)oBxgnw~AhxZvNz4 z^R|0yRd23hHZ5o3-SqF-ue|2V|F*EqnVqpS|8U#iWXD|B`>UN*1rm1Iea~b2>1)8H zyW%WMu!@A!p+-ij>nC;|2x?&Nmpf=z%CTv&;O|V9$qyF0>WYZWepAdi^#)HECEeMNf~}aY3o!>vPkr4=M$VH~i~f5W2id zJ+0gS>IB9Ew+={b4zXXd>ZEG$ZH^l((-Nk>tPB*&K4Il$eQdWu;x0zRwv)w|(-z#X zh)9$9wf^wte>Y}}c|>f?N#1;B!n_WVSL@^QpRRhj<=L;0h#+0b7lxB9EO-3!IgpUZ zv1?cJ#WlL;PyYA3_=nw}ZNbkef4;pe{Py9+Szn>DN~Q&Rcz)205;m(*i!u}aQ4@?-L0&okco1(QBpVo`5l^b?8;vRKIAXYphypL*PW zd5ecLri=JJIFpdE_*cjDJx(XP8nVvAejc>!Iw?FSxoP4!x@nIfyYyC{wd_8Te z8%RbQ>JcF_L6 zrYE7;W?RejDwRJ5(^8M-Ko%|DxSna_Sy%CNuqaLQXdJ0|Xz dXWTF508{y=MYad!85kHCJYD@<);T3K0RUDqu3`WH literal 0 HcmV?d00001 diff --git a/gfx/pokemon/piloswine/shiny.pal b/gfx/pokemon/piloswine/shiny.pal new file mode 100644 index 0000000..3afb053 --- /dev/null +++ b/gfx/pokemon/piloswine/shiny.pal @@ -0,0 +1,4 @@ + + RGB 22, 19, 00 + RGB 19, 11, 00 + diff --git a/gfx/pokemon/pineco/anim.asm b/gfx/pokemon/pineco/anim.asm new file mode 100644 index 0000000..7b8a6ed --- /dev/null +++ b/gfx/pokemon/pineco/anim.asm @@ -0,0 +1,3 @@ + frame 1, 06 + frame 2, 18 + endanim diff --git a/gfx/pokemon/pineco/anim_idle.asm b/gfx/pokemon/pineco/anim_idle.asm new file mode 100644 index 0000000..c4a056b --- /dev/null +++ b/gfx/pokemon/pineco/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/pineco/back.png b/gfx/pokemon/pineco/back.png new file mode 100644 index 0000000000000000000000000000000000000000..ae6299015472c57f75c817bda831ba330616e0c3 GIT binary patch literal 387 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjW)?pq`}+ z3=Cfx6N(rZ7+6Yz{DS}g|NlQ%!>y8mflz=M>CToi^d=QpSm%8+dY6 za|^d|F!rd+MzKDSQ#3){|Dch&M<9rP7>WRQE`I$Ph*zwiyEC9kE(Rc)N|aG zHCxJh>$bjcUsB^(mpQI^vr_KFp2jp+*Ql=(x2asn%{ADRvAUS+h{Ts;b#JCb_~h=N zaQAk!0helOEr(;}(Jj}Pn+t9}DaQZfsF(SllRn2QI`t=oEv?>Tan0sqYyQ@5ewLf7 zcRw?@EOG6H*dyEigPS9pS9R_PGrU-(vAW7M_PUQ+&fF(^llHH1xMy8?KHgxRVBL{d sVfF_3qMheM)9!F&Z4Ku0-_t0+=qYzhn|0_51_lNOPgg&ebxsLQ09%cyH2?qr literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pineco/front.png b/gfx/pokemon/pineco/front.png new file mode 100644 index 0000000000000000000000000000000000000000..2d91d593256d089d2a10f366800a9b6d751b0df1 GIT binary patch literal 653 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|Ns9l-MTfX zXDI^%!&ke_% zeK|y`*GeeFSNPN8gbjaPqJK|5#$WnkzP0fS-`14CVb{C(iu7kr{>vwJ#a!K> z%N?p}t|T6Gi|yi;TLsxk6RP;9imu7d&^x_BbFF)P^c0!(%Dd;4zPUKzqG0WbiUi(U zt5W9wt2@2K)-FfNU@cG0tt+x2)6-q#1y<2HpFv8cw`mR;N+rjt_QKIQ%Cs4F7XOck;Jx<}mv-+syr`v_+qR)jq)Jzc4(E|wm0bpZ_^9@nOpy#EqhMpT+Nj_hJVi#KQ}Gs-^2h)XRdxO>zopr E0O!sv3jhEB literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pineco/shiny.pal b/gfx/pokemon/pineco/shiny.pal new file mode 100644 index 0000000..33ee632 --- /dev/null +++ b/gfx/pokemon/pineco/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 31, 05 + RGB 28, 10, 05 + diff --git a/gfx/pokemon/pinsir/anim.asm b/gfx/pokemon/pinsir/anim.asm new file mode 100644 index 0000000..c13e2e2 --- /dev/null +++ b/gfx/pokemon/pinsir/anim.asm @@ -0,0 +1,7 @@ + frame 1, 12 + frame 2, 08 + setrepeat 2 + frame 3, 12 + frame 4, 12 + dorepeat 3 + endanim diff --git a/gfx/pokemon/pinsir/anim_idle.asm b/gfx/pokemon/pinsir/anim_idle.asm new file mode 100644 index 0000000..d849824 --- /dev/null +++ b/gfx/pokemon/pinsir/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 08 + frame 1, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/pinsir/back.png b/gfx/pokemon/pinsir/back.png new file mode 100644 index 0000000000000000000000000000000000000000..978ba561b3ac6ed8e4edbf15a9b13a278c4f5946 GIT binary patch literal 514 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjSGFPmm=8 z1H*X%$;k{13@jx6$|Noz>;a17Oz_`%U#WAGf*3qevc`Sw;E}F0YmGiMZ7Tx|# zf31s@@BT$M-U$BeZ@+Rs@OQpR{S#}w2l?}QPVD%R7iSr=M<8g~%DLAs@2@|2iDA2A zRLD#zegA`r9}muc5OiU8!p{eOp_zQ{cY7vz-`g$AciC30A>8eyLUF^DbT>JD5s`JO z$}(N137;%jnWk>y3K!U(P--i4%lm0&fL`Q>1D9?rWzl5)XvUhH^(pI;-h%%R4?Fs` zi-eeJ9Pdfn<0Eu8mw&yI@x424Uko?cY(KD#?WVbWN$J!WQ6b60?Vj}|_8k%a)z7ZX zYx~8ndR>ljcfy0Ne@pMOrJUt&d^l^m+ip7_rOVZ_K^ijQZ+*kI&)BnW_W4$GR+9?Z zzn?#}AAK;}rTO|3-h25vc{O%({+KT6x}M{9aC>scbccYLm)E3@-hR06QgYCCr&B*R zK8Sj9WYYJwD=Weuthqi*Tzy4|#?9#kmOMM}{i?9=+xK72^gO?Xj7<*TnQL12r>Oq8 zB`N0hKWehA$rt(6ArX^rvSu@`R`Cn2p8hdLKs7&8{k>??vCcV3S>-FEt9qRNGwe-c WfA_fM<`o781_n=8KbLh*2~7ZW!RO=v literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pinsir/front.png b/gfx/pokemon/pinsir/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5bd4c4cee38652df769a407ad45ef5b8d889dbbd GIT binary patch literal 1137 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|Ns9>mlpQ~ zSu!v%oEMOs%)r3FQWE4B{Qv*||G64&l?)6l0-i38Ar-gY&gz_WSA)lu_51(-l{s5B zNF)|a^D-(5Enju-vnz-0HP6{E;&(9ATozoKAEe^7{mZZK&1X+*J-p+&D|cPX=erM# zPVD|#dilLjmw~DbSNC*n)fcM`cJ^&3+Vw$IQ~QwbyzIzXYfj%k!z)&O^ifV?;4e*w z;_f$#-rJpwd*1#lfGI}$Y4GzBmkRkwH4_?Z;+4vnll+`gzU%M%G1*-4jf!t3+j1vQ z4?Bjvi2}PGdZ|WC&!4-FtMkuZwN>rYLo?Z)KV5u!lU{hN-rK|LwGAWlPV~OJWtHw8 z7sj6#UQ`^*e)i&-o2O5tgx-9~v6K77k_v@d1_#sYdd;rdD(B=TmrcKat#J99+9e8> z)8oqj@3^G0Q2+Ge^76g$`xy6dRIz_Pq*j>N5WHD1?b^?vDSH~ zmiGOYi){RrziqOp%-wNwby~}0wvf?M%n{;u|~kz3d;eUCn#NyK_DDw$x=zW4v~K z=Z@L2(-YUPH}jDA${DtM-ZvGG=qV27u8StF?o2R$U2!3JJwvDTk#k-P4npqwCj@2GP3wu3*lvTXzs1Fg0$XF(-EGl{&0BXTv6?l*_SGxqP4Xw_M(*2~v3Fb9-znEN zSbuWWKXUr!73-AMFV8;ESaWA$&ACdB>UR;`Q(K?kVVrLLB|v!Ioy7hdp?&j<+W)qn z5Px^!`BTesj$QSS`MBP3V1+*(?|l5P__X@F2X_A&tq-X6?^OP{;!~q_*E{a=8Ap@f zNtFD)=AL{nb*`1kOCsz}AlrjWe--Le zrb~1?&bLQ26Kn4(BPy?Mk;*<_otoym)CKk0i{(6{5T$@}+_ymvPKop<$stor-Nt#=APftbJF zN7~N1@~t}T@PbYM=UokG{{23(H}}sA+tnv`{D|K1*gibg_)g@*pS27O3=E#GelF{r G5}E*V5i1G+ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pinsir/shiny.pal b/gfx/pokemon/pinsir/shiny.pal new file mode 100644 index 0000000..4f58677 --- /dev/null +++ b/gfx/pokemon/pinsir/shiny.pal @@ -0,0 +1,4 @@ + + RGB 23, 23, 09 + RGB 11, 11, 15 + diff --git a/gfx/pokemon/politoed/anim.asm b/gfx/pokemon/politoed/anim.asm new file mode 100644 index 0000000..d1943c1 --- /dev/null +++ b/gfx/pokemon/politoed/anim.asm @@ -0,0 +1,8 @@ + frame 0, 04 + frame 1, 08 + setrepeat 3 + frame 2, 07 + frame 3, 07 + dorepeat 3 + frame 1, 08 + endanim diff --git a/gfx/pokemon/politoed/anim_idle.asm b/gfx/pokemon/politoed/anim_idle.asm new file mode 100644 index 0000000..1ebdbfc --- /dev/null +++ b/gfx/pokemon/politoed/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 4, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/politoed/back.png b/gfx/pokemon/politoed/back.png new file mode 100644 index 0000000000000000000000000000000000000000..4376ca6ae7c52b6ac27a89367ec7338efe74f2fe GIT binary patch literal 375 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f9}7c|Nqa`aI0isU=;IoaSW-rb#%%_p;iSB)~6r-|F02Tvcc!W zOQW+_uH<#BSo_!hfNeor_LPdhmdBiXkN@p4;{RJa?@+tqo*2`_JG-ZF%d~p&Uf**- z%R~5qQ&#PZscqjxt$LD*d(|d62CUsH@QZ6nrNyJH9MQ;3{eA59pG>%KNS{)^lwz=+ zw=$P)PT9QaZVv=2#N*grUstzn*=F$Px6k*C2+p4K4>oR9Pd?1uZhVkuCu{QQ*@oNS zM@uw6+<9L*uIhwhu$sZvXKr_7_B=eBa5s1d@a&m|3-YC?%SguXT4*!E?B*1;)P9br<`RmT_ZAk?WPBp hXLEgjHQ{kreM=jc%hazOwG0dl44$rjF6*2UngG6%sZsy{ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/politoed/front.png b/gfx/pokemon/politoed/front.png new file mode 100644 index 0000000000000000000000000000000000000000..03aa089e3851c6bdf60ca82d3bc813316774b08a GIT binary patch literal 1058 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsBz{wrE8 zHDq955YaW4V_;xlDGBlm{{R2~|6C2XN(KhzgPtyqAr-gY&hE~;ZNTH|d+-1M=Wa@x zf%@L38rDj@U^*)Hd`4A(k-xD0`7a5_oM5a9Xb+;6i}6$Ql=dd)nu znpAnTUg}MrrgH1!DgGuWZ%xVDDnIp1wRp?y z^yli&cHqB*smY-s#q68?vh7aGXWi+}EhAqzJI6L9j&nB}i%scmsA9%Z*cSil! zbVI&OM#;R471rHHn;xmDY`y)PtbU@%vx;QZu)H>@(f*vCmg``=>th4VsUv-d8XN_IH-&e7o28^VkDl6L_opn>YmV%VyR))aZu6eE zk%{g7fyBuNgN>grom|OLbm-O`vt34vs$RFMTazOqUwhrzTAp%YmYQhbRrWmr~_S4q$hK+z!FV>mSRSPF%mo zxohpFP@V@~@(bo4)~M!j+NdOTcjFg6i`6q9X1{m%JK@-6H7oslj6A_k?}Fzizi(J* z7PkBzqx6mF_Y)>eep>WEcHdp|dk0-h^!7Ttx@WD--`jlH`Vb2Ix3_#t{Y|^?d{^?@ zV=LX)t^L?quJHPx_`QoY2Vb4D{xf~K-k!yEt6!h9);YJe+^74$^7|L>Tb|$hC}y=s z83jHruWo<4)cxMW?`AtU&#z>+et$xt{-NyI+=J;w^KTvgEX%j2df(yZ^7G{udh_0Q rJhy)Iv#(;G^1SyPVEAM5WA+o$)^}5G{1RtiU|{fc^>bP0l+XkKI*AEh literal 0 HcmV?d00001 diff --git a/gfx/pokemon/politoed/shiny.pal b/gfx/pokemon/politoed/shiny.pal new file mode 100644 index 0000000..1ba49cb --- /dev/null +++ b/gfx/pokemon/politoed/shiny.pal @@ -0,0 +1,4 @@ + + RGB 25, 19, 31 + RGB 11, 16, 15 + diff --git a/gfx/pokemon/poliwag/anim.asm b/gfx/pokemon/poliwag/anim.asm new file mode 100644 index 0000000..42c6ea7 --- /dev/null +++ b/gfx/pokemon/poliwag/anim.asm @@ -0,0 +1,7 @@ + frame 0, 12 + frame 3, 24 + setrepeat 2 + frame 0, 08 + frame 1, 08 + dorepeat 3 + endanim diff --git a/gfx/pokemon/poliwag/anim_idle.asm b/gfx/pokemon/poliwag/anim_idle.asm new file mode 100644 index 0000000..db42dcc --- /dev/null +++ b/gfx/pokemon/poliwag/anim_idle.asm @@ -0,0 +1,9 @@ + setrepeat 3 + frame 0, 06 + frame 4, 06 + dorepeat 1 + setrepeat 2 + frame 0, 10 + frame 2, 10 + dorepeat 5 + endanim diff --git a/gfx/pokemon/poliwag/back.png b/gfx/pokemon/poliwag/back.png new file mode 100644 index 0000000000000000000000000000000000000000..44348236e290731370deabfae1353cd69f6d9519 GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f6YnL(g~#E zoS&o%0|Ns~NswRg|NsC0=W4iBGB7Y)@N{tuskrra%5AY$1rC?YXaE2Il#t`%op?|B zx|V!e`$^X)mzVpq27W!n8`^8Q-7vboxU*u(Bk>SU+jB4cIh922Gcgz5dwA|WV_63C z9hUVLEB|x8&|~aL2oVTX=>MR8OIWo@&!zQ2=#DG9ZVHAx`q!zi(M{QVy(>pfbexJ?2z`)??>gTe~ HDWM4f`W}3G literal 0 HcmV?d00001 diff --git a/gfx/pokemon/poliwag/front.png b/gfx/pokemon/poliwag/front.png new file mode 100644 index 0000000000000000000000000000000000000000..c61c98fffaa3937c6d336f737fe23eda1952a622 GIT binary patch literal 627 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsB5IcZut zfmEFHlXPKVU|=Z;@(cd||NsA74Yx`L1|}g-7srr_TW_adEIOjV;d*xO|NrMh52#4R z+{Ch$?1AWLb8WKd)!FYPsuY5=Ze?}7 zOQ=r@^xHY@z>(tnqFXKUPvv{#)-iy|k)XTUEb0%=O$(DL;u{eY@8N6rI}r z+qL}3kG!Rqg`R9Xx+tSEfA>PM=q0I>4<7sXm)phTIKT2TZ-JDH_nzET5fE^@P?%_{ za^!vOeLv&t``pjX*(WQ*JI9e-X746jOXk;yC!c%Bv*s+%q3LrRISbN0?Rmg+%BPhz z-Jm+Ih>gESC4G|d$(eJ~i{_oIRC_*i|Dzu9rKcsA-`qWi@!_nRg0{T)+M>4Zf4?8} z=tOThG|_mro?OP0lQWaZ&KaMa`Q*(0XJ@W1iz{9har|!4visZTShm`wt86%76WnmYX7O=5gYyoH k`Og@iO#rL*dGL!dMoBzWt<7?^WDlXbDpB zeyP+11_lO}k|4j}|NsC0&((0NWME)4@^og{#RiX5)3fB*llana~H@a4-! z&yAk?k=YG>M#+C3y>4c#X%RO3A3xKg^I+ZsLq%!5w$?wFv^Shio;lfvGq|Z$+c!tP zicx)Eb96G75bFo?~eKT!@jZj?XlC9hi3Rbw&Hww?~<8A z^JD>Ltqt=WJzVoy)%-c59yiOkOnp=;p>o*kfuEws`fvN#=EU#zZ`}LxhtB?dCQ<+1 z2Gie6>*H6f;@su3pzuv_<~*C$HO<#vN>#|dvp%{tN9?$-`ElJiO{2AkXP@83f3Q~~ ztkKZwVxf(7P(}Z-`A*3@9L(=aaJ1WT^*%a!`f_&dUuM^noSc=J^1ciV3=E#GelF{r G5}E+-VXf={ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/poliwhirl/front.png b/gfx/pokemon/poliwhirl/front.png new file mode 100644 index 0000000000000000000000000000000000000000..0419f4f9ebfb4b59a80b6b2cac7afcadc3743b83 GIT binary patch literal 1072 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{v5>W?*1ATFWqtfq{W1z$e7@|NsA9#Vv-G zAQkVIN=;y3U|=Z;@(cd||NsA74Yx`L2IljgE{-7;x8Ba`E>cnCaAp1Xe}4GR1!dc< zzAOux?VI@2kbfQ1qIokniR9`8-80#EKjZPs{E7xU7ViB)EPI8Gk~^!^uc*w^Ruf#7 zd*afYRf|kltTw%8nbL#40k?KX|TP0>O$yJ%?OPx zeJ6TCjx_PD`Wkk?$nxqEm063g3WTkUVln-kYj8;5*P-A-(TrPHqBhJw;dNk%o?^Jx zh53)BZl2Me*4e3%)@yNU3x8~S)azrLZm}&2TeENXn%bmIK}M#X;$MyYcXdTRkCf+P zN!5B)xzVXH^5udF}S}wGuC- z>Vr%s1(`9udA9iNd2zYyy}vivPmrvOVHQ4e#5>*Ql=~%+T_O0Vm z8|UWkESqq#ef7JmuMDQXHPnvT^q2kZ3GdyfY8{uk$3=;q@0@<^NX4V2OCOx@KL4x# z!zF|FYYHAMomk8Danf5R{-|3YgW6wi>vgR-so^4Ne#HCSm!Jbv=2xDyXXaq7^xXT= zR^yPjooE;dd# zkd@7M0^+wuNwbmotJ=5uO`?^l<7&VN^} z%&z~gI$9+-?fmz>jiUPRsu#!HyYqdYZ_T~$=YHS&`8TL;|CBvn@+)8R?^>$6y5yVw R9tH*m22WQ%mvv4FO#qcC3w{6q literal 0 HcmV?d00001 diff --git a/gfx/pokemon/poliwhirl/shiny.pal b/gfx/pokemon/poliwhirl/shiny.pal new file mode 100644 index 0000000..1a5ee7b --- /dev/null +++ b/gfx/pokemon/poliwhirl/shiny.pal @@ -0,0 +1,4 @@ + + RGB 09, 16, 26 + RGB 08, 10, 31 + diff --git a/gfx/pokemon/poliwrath/anim.asm b/gfx/pokemon/poliwrath/anim.asm new file mode 100644 index 0000000..8a86415 --- /dev/null +++ b/gfx/pokemon/poliwrath/anim.asm @@ -0,0 +1,7 @@ + frame 3, 24 + frame 0, 12 + setrepeat 2 + frame 1, 08 + frame 2, 08 + dorepeat 3 + endanim diff --git a/gfx/pokemon/poliwrath/anim_idle.asm b/gfx/pokemon/poliwrath/anim_idle.asm new file mode 100644 index 0000000..c4a056b --- /dev/null +++ b/gfx/pokemon/poliwrath/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/poliwrath/back.png b/gfx/pokemon/poliwrath/back.png new file mode 100644 index 0000000000000000000000000000000000000000..fe6216970363ca8b10f9381d4ef1e42f3f082c39 GIT binary patch literal 446 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7-_ml;(6E|; zfx(!s=Mw`114~JeU-19`|NrM|xK%PRFvfbiIEGZ*dOO8?(hCI+SLX8n)p<|VHEw-n z%fFU3Ddb$B$dljyj{TSIG5p7>u9TMY_oQ&=fiA}{?Th}1L?{*i&r0|h9Qp4k!{ot$5IQKA?wJ7& zz8U`erzFu|S}pakhvVhD1s^7TF;@Dp>rNn#%5ksA2M=`D>6{UX_BdhF`k?i2DZkBK zpWOme#g%1P^GI80##7)OmZ}_P6V)+K+Cuh9dPwwGL6gavvLjDV9aPTKho#ra} z@Y_cUl`ro;KX>;VwT8eq8mqe-ZYsQL+K_#LD`3I7jd}kQ9~f*&UHJNlmv(-a>5hEy z120cH3-9}U)q+*CfALncEt0(dA6o5rDu2kt>>qnp0~dRcPNpaW0|SGntDnm{r-UW| Dm!!@7 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/poliwrath/front.png b/gfx/pokemon/poliwrath/front.png new file mode 100644 index 0000000000000000000000000000000000000000..a1271b9e236cb7400afcde5090910d1b07eae492 GIT binary patch literal 1145 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|NsA%mTQKF z)eH;_#(X`W7#J8>N`m}?|NsC0KUc%8l7WFm!qdeuq~g}wS-00cR^V~n`2GL?&n)*1 zS{Q02&w2!`d_G}Ql0n;s*VBql$7@!cTJ^8Z&C{o;;NNsoed+sCp=1~Eq~+@mTc9qARa zx)ZSQSOfbk{v*FT4q5I0rWKoRs^+cO@0tDndy4ve>r7=IpAOZzPx8W6Il5xgc(`z&G!#!@1st%`w-*cC3ix z`owB<*!@YfPSxZ?4||h}CoF$jn9Hg=IAXtAaX{n)M>{~wKfgw9Fe^$6Vu9_XM6TDa!32A2+yj%X<&A# z=9t-gsfpWeaNd12!O!SW3|H9GlEh;Im#e;9ogCoDuXKL~$K<~^;_uqt&TIeRqjy#M zarPbY<>yb$+bmf3e#PBmlQr}%+t!Aik$pEesBCxr_bvX`r!7wg7x61im-ndV(K%o# z+27AcgZLqA^it+vkFx$E((zIx;Pfz>Yh zMf2Yq9)ja77Vq|tsjL+UrAG_~!?w>U4+=qTk*2_xw8J{pO zR53s1`e*9<3zv7_R8`yaZRPnI_F0DxR(X{@i5$mgYphq)3huiio58y?^ru64 z$(_~vF3HM%Uv>X}-+&bt<7f9;;)e@zJn z28M`|uZ9c^3@jx6$|Noz>;a17Oz*y$#;uunK>uTujO-B?snm_#izvrn^7yH|J z$F~~K^-~YzVCk$YeptEB!B%^p#Cw(vdd#oX_Z_wt`nRurD$BJKbK2|*>e(aYD~y)A zL_sy)?4TlamM$QYG>g;mh z|H-J1CsU4Uh^@UXym8Og+$Pa~P9M(5o}crh`0Wea*WKs`|(=RyQk5gtwmqEKoYR@k z?U~EBCfDl2x)76&zeglGk8&ut281cxR`5MGt&?|jd(Tl#B! zM1#*XBuT=Y7t4=$W?*1ATFWqtfq{W1z$e7@|NsBj?kWD) zlwe?Bh$#7L$iTqBQWE4B{Qv*||G64&l?)8bHJ&bxAr-gY&g$-yR^)Nr`2PR@&wcU| zlMR>`Z_^Gf3VEw09iMYxhO&S3?`HAhJ=VtRMb2vXJR*9Y9F2A8=aLLOyZ(Oc?}yFH z&l@T2Jha6|+GJk)3#P5=+y4g?u-viVIrZG%)A#25xZiN>q+Gz&q($$TuJ3=y@af~_ zdC_s4M<#Xcttox^T=e;jB|8^fTfXYsFXOfCTp28K7!PK+cA4oml#C&->`}u9}omJD_g-R3e z=kYD{OHI}1iW1Yf6RLM7{J`x^-uf)l>a~wg%I{{0n7Y!!#x`cjh4s-#K(WiA|1m>|=1<$qF zV|96L!_z;}S1%rI;!rwMdTv5!i=6f0yZ4S=$r0KYQr#Ff!_IqW?>D)i3sKBpUfjEP zBT7BV8HA_k=*;-=*;{ z^cBBPuQ=^JZNf^$tuOUWZ`gWXoFKLR!>;{HT+gY0yqXa8b^4P7&;JQMu79V0a@L-g z`jHnaF2)P#r~g&GuaWYr^2ySTo7?{`ZCJW;_U8lM7h}18^Xg}M6zyKS%icTg(=Tqj zcltBmm;Y7u|ME&-6bi3?-ccp@-FlD9`+3JRZS?0K547!H{k-s~Hw;eM?YjG4(6gm~ zKU=)kpKISg`FVdQ&MBb@0Ig5on*aa+ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/ponyta/shiny.pal b/gfx/pokemon/ponyta/shiny.pal new file mode 100644 index 0000000..0358f40 --- /dev/null +++ b/gfx/pokemon/ponyta/shiny.pal @@ -0,0 +1,4 @@ + + RGB 23, 19, 16 + RGB 19, 13, 12 + diff --git a/gfx/pokemon/porygon/anim.asm b/gfx/pokemon/porygon/anim.asm new file mode 100644 index 0000000..1130a90 --- /dev/null +++ b/gfx/pokemon/porygon/anim.asm @@ -0,0 +1,8 @@ + setrepeat 3 + frame 1, 03 + frame 0, 03 + dorepeat 1 + frame 1, 25 + frame 2, 06 + frame 1, 06 + endanim diff --git a/gfx/pokemon/porygon/anim_idle.asm b/gfx/pokemon/porygon/anim_idle.asm new file mode 100644 index 0000000..81583f5 --- /dev/null +++ b/gfx/pokemon/porygon/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 3, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/porygon/back.png b/gfx/pokemon/porygon/back.png new file mode 100644 index 0000000000000000000000000000000000000000..6833d92068d1433b1258565a932caf365574482e GIT binary patch literal 366 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f6PnKsd^~` z14GC|b{+->29}Z_zu^D>|Nqa`aI0isVC405aSW-r^>*rMu_Fo`&Wb<(*U$U4YSDr+ z`w}zRVpXm=U4I_S$2(26oKmIw{6mpjkInw#)z6>kvcBK;{?Uwt4V4MqJZCjz4&7{~9d=h!GMVJ%rS`*Y_X{h}|*xeU2gn_jZ2KMEC3 zu;7h761P%yj>;UZ10~5aulELT=UJw~tJo|yX=T?M!R;@qk8ah`V37D$!hUPt%3U3u z)0)calom0bwoy>%Qr~?|`q85sd-p3ZVmLfWj&XKUhE;mbHIemkC3#HZFJ7s;I)wO3 z{PH_h{AtN{7uF3vhuQu29xZ&Sd7A&|F_T=TH`&wo1-@LlTmAoyt?rjMztQ9S$UGyL WmHS|S!W0Gu1_n=8KbLh*2~7Y){g|!* literal 0 HcmV?d00001 diff --git a/gfx/pokemon/porygon/front.png b/gfx/pokemon/porygon/front.png new file mode 100644 index 0000000000000000000000000000000000000000..ef4a1d78260caa78af42d2e7e79cd048f3945477 GIT binary patch literal 628 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*=TbXvShikR2xD)Wga9`cB2~D@37j|k0pWg8A`n`E6 zeLo7Hh6{>#9atc0EBQc3MqCi?${Pdk+5%1$iIZ z?sJ~`_#xb;xbH)lHJ6nAof#)9WL#Q~y?C}u`k{9DJ)>WLlv=*mU5@%5XWvqOeWuhD zhVunSFX!leFUfCW$gG+W*~ig!{b1^LE0g1v@sdXC`J0`ZJ}xkh%YJdtXc}YZ2eoCT z3!=mb?T*ZYucu7-Y5CG-%a^E0V)psW z?dcZMp%#Bu=-vG9=hd)%cmIwz$?s)8yjF_l>f300yu9xF&TkdRfBW0tTX4Po-pP;d zTwYPHmR|8*IsIQ_TovD<{FkaHI;&PrU%>uqY22X;g7d#l^04)3auF9`kj!1P#e8py za?_K4%cjS0y^V2RUASg?%(+_r3*B*1pt<7AC!FToEJz1 zugbhY1_lO}k|4j}|NsC0&((0NWME*__H=O!skrra>g#n!6gXPAKmU8bM=Q?3J$Lfw z&l^rI^L<|IA~^rKeUwH~O~CEL4NngI=3kZ8+R0z_wdm~s$BQ|>RhiZ*A7Sc_n`^UQ z!PbjEDS+cDqeYVM!i-b>3^tFwD!7?{ta5s85PviG5Z8*A<<&k7GVM|a=QCJ{@GFbe z#u&vsXFhrLHE;8rSIQ54UOZbCdq=RQc&UIqqu+<8<_?b%tr&ZM@UV1;^XYNV@y<{! z(A!n%*A+eWkmZeM+nlS;FVc(?%$w^by`w^*WTQAsTBYABr;5@{quE`nSQhQu;_H_2 znPd6cS!!Dy=8J^Yaw)Q9+8P;HhZMS8+NeMMvW;q}xtY_UZ>3jHOWY8z*MAL;*&Go;#zU7Tp;cYr<9TkGVeNh@bg`N8ob^V7Q5ZQmLcCS7-X^kLd_M)%klMi!;s z1A*1E8dgVLe8gDZDBW*9zd`lD1lDL4yWIA`A4H;)~KCp<}bJJ0@Vg`IC%q|PIGrZVNYqxr97RNduMF6T^ovuL@f z+CfX%3CmP$nLkNL#J_K-xEUIC@!w$vjXQ6CtxZ4YD|CRZ zw_N#RKeOrVgK`TN#?Hx2n{g!5xK?QU*%OSv^k-Y%WX}7lE?mMY(Ds^T-Q|TTzr3#N zpA*fK%fEHz-1KV)&i}sT(W2jq2LCqbAN{`Lhn)ER$B(M-=>NE6&*m+*lt<7|9?tyi<2e; z1H-NQcr^wF29}Z_zhIDfu7+DB0|R4%r;B4q#jUqf9j6^p;Be7>^{;$h!-@qn-rYQt z_2#?K`CS^tOc!c)ekP+lUZx6wzFR%OMc5v^neI*v* zD+4Y#Jjzi-Cn*hAa2Tcmn9}F_ZDrN&G|)Xi?a5VtS7uP{s@>H zn_Tw%_qs?n<7G~cho_!kJOBBNf>Hj)5@r|X4G-iQYbSkCm1TRgoYBah^-WW%L0@H# zb$ee3(|w^8BC!fLc&=r}a^BIAxG|r7b(1&O<9dd=47P7T51Y6xA-*+c`gI|7*XK7gTw&a?NarK?BmK$c7 zkCl)A;ZGL`ow4;w+2l1dH}TZwcM0v8u!84a%cqY{m(6NZWAm=e6PPX2Vl^#2;7R%l z4$qeJ;=xI)_^+0&>MQiREcikH+SXHAE^_%3PgS^{xa;~=s8W{kr{DyQAM76ABW64i zE7%t-T=(Le`qM;D{jW);{l`*VXRN4F^?k(lv~PLy&qEjQzDryivTV_h#!CyPFrHg1 zW3ug+#(Cv{P}x{XjSk1^n(YiXF5Wa;Ra)+$a_i9R>E|BXop@K-cBL%xakZXLYSd53 zOM#_rFAEYkmfbV!5L&%$(K4s3{f<+`9wy~aWK`=dh(7OM9ywj?^?tVwyM`2Y#%{X| zol84R#ZK4s&kWhjZfC0c{d9@V`ejQBgLP|bla^exy(c!i<;GE?Q*-qW9n8J4K)(0W zy}7#r{lnO@ExHug8B3#gyjv-x{>EwVdAkFDON_7RX_{&>PfVZfwwGm_>}8*hfGdZW ze*1NJ%^T;+HpXYSKGv*uvUE;ZI7c=qZ++?U?)@C)PB$GlO3#YR+|_G2S?J-p*%|&7 zp+O(_zvMXZ{=T$gDz8&t;DS^=r*pP4Pu5JTV5qzh^@2ZiRraKk8#~07<=H2CD;-SK z^%Yj%p7dr<%K1Ag2~`o#lI7PInXB(H?!0w9|IpE6-;_*LAFef!|GB+VcX{*s%{x3y zUsg#K7j>7sm7aa_w_)AIC6ij?ys|gMR<=zRTlDhYU$c*$uhc5Df|7e=(k^^llD_b^ z&x3&W8=U;i($2dZ%o*ojfNVPH`}bYwcnj*UB=#~_R-*ZU#~$id)dkStjR|TA3DF5 zc&_lUZ|crNvJ37U-05~&_H^I1%WBPT$7QvzhsrQK|JTKT`EmOl@r+NE>T_=C+(}#+ zdhX1{DW`oF6}6|i9XYva!S<)0e*J2gcE_>G=jxp}nV9$~7ixMk?yi~4c_=EvF!P+O z?S>PKvn`j`dS5DbXV!5NV4ZN`d+8xrHl04UJKj@tYM%G?7Mzz|yGiGk@H>qgjsHr| zNtQcQrZScsmkq5rE&FX>$GV-#KAinKlOrMy%HH4c*zCQ@y8{pU9`xNWcHOJ|N;dHQ zkHuB&HEYXtc0AsDZ{vf$%T>ou$g+R!vn-!;#X8{$gx~&^&*0sT_2nGpE)Y!|?>eg7 z3lQ*l_`8PwI~&)PzuB1_`M%;|pYPtst=4T-$1TfEzV>mylXxXta74Ct@8dbvRtbW9 z7LWTD-ea5@ac}41mE{Rv&zqJ%Fn`zZ{tn|oSs2{>-J|~a4f_MK0(S&K@N3@+h~*Fk e``fJR7_par!<=eM1_p+I zygPIm7#LVeg8YI(!nqo5l?)7wo}Mm_Ar-gQPVL-uSb@W}_4oh(e_A9Wo4nKK`5E`x zs*A*2y7k}GZ9l_xn-9$g<_0&uXVKukPCUZ+V4I~?<;RE0 zEs_#PwORfzm^3{?c9~bfw7XtbxnbY76u;0FpT?+lPj-{V<1-nB-ptqcusN*BeKwI_ zb%IRk)SwUj8!XtX3crR5vdaCo_g||kwB-7s8(AS=ye2&DP0H4*)Mq&^_A_jSS?uq# cAO6VCdBw?Hx@_%k1_lNOPgg&ebxsLQ0E=n7s{jB1 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/psyduck/front.png b/gfx/pokemon/psyduck/front.png new file mode 100644 index 0000000000000000000000000000000000000000..a207b04d8c3ae18cb42a028e6a2cd80495cb22bf GIT binary patch literal 605 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V5s0=W?*30zRqC<0|Nt3fKQ0)e-L1pQ*Ft> z!0?ZEhb{vH14~JeUoc2GSHrE6fr0Ulr;B4q#jUr~Bl8X$@VFd(`1gHG@nnrzar?ML zwl=9be)cI8W|w+gWO)4cQKpD#Mt7Qi`M=P2Ny#}Z%W`9bqmxwksYf@2e5UMZ4$(ig z?U-zKVbyDd# zp8sXs9WJq0vGQlK=VkRDd|yI#ycP6gJ867`!`p+KZHi-m@y?u=i&G80O>0l*vw3`{ zSv$O0iM^BCcu%9Uj#ANnq0X4f)ux->oA=zmr?hLcOYf=3D4~@Po=n)?#OT*{qi`21tr?bD}imnF^-G@JdAj#pz`R?PCi6?$ z7VW(-$unJ}L{06$=5rR`U!GZRJpWvc)o1onwbWOB=|xWOOO9qecnp>*nyH= z=Vdx|IN!fFw#irWoG|M*&vmIo&x7`!FIa1KdynP)bgq@BR5#9fXM8ay;?&XyKkb@p zTXz5MJ@-Z}S7P4zopr0Ad##a{vGU literal 0 HcmV?d00001 diff --git a/gfx/pokemon/psyduck/shiny.pal b/gfx/pokemon/psyduck/shiny.pal new file mode 100644 index 0000000..27cbf08 --- /dev/null +++ b/gfx/pokemon/psyduck/shiny.pal @@ -0,0 +1,4 @@ + + RGB 21, 19, 31 + RGB 10, 11, 20 + diff --git a/gfx/pokemon/pupitar/anim.asm b/gfx/pokemon/pupitar/anim.asm new file mode 100644 index 0000000..9b945e4 --- /dev/null +++ b/gfx/pokemon/pupitar/anim.asm @@ -0,0 +1,7 @@ + frame 1, 25 + setrepeat 2 + frame 0, 04 + frame 1, 04 + frame 2, 04 + dorepeat 2 + endanim diff --git a/gfx/pokemon/pupitar/anim_idle.asm b/gfx/pokemon/pupitar/anim_idle.asm new file mode 100644 index 0000000..794117d --- /dev/null +++ b/gfx/pokemon/pupitar/anim_idle.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 0, 04 + frame 1, 04 + frame 2, 04 + dorepeat 1 + endanim diff --git a/gfx/pokemon/pupitar/back.png b/gfx/pokemon/pupitar/back.png new file mode 100644 index 0000000000000000000000000000000000000000..ae19688abc36c5792b2dc05adbf5fdb7418b35e6 GIT binary patch literal 458 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7U%m8swV@#c z1B3MAyGIxp7+6Yz{DS}g|NlQ%!>y8mfict5#WAGf*4nAj(~c-`xGc>2UoF>~A#m~J z9OJsByI%+Gxz+LKwc`I3;Y%L~v+^vk|KoSTl{Z6dQJ0pAK(Qe|vxZyh-sv6YmBkkq zyYeURx9bt+%gA(;ZC9@T`krTpkSynXKQSj46=u=Kj72|Zwx85fx>31iy^BAm@%rwg z&L)~`|9aQ?G%u51ALJ6Zo`=D3PI>C9-+$7x-iN&?irf3%m1)M4!1oU4GG|WOCg5C&mVXb|4K5vO8)b;6uAb$`27rK*=xVDHdwsY zQdUdQ6S~av>y_aeq31;(zQ(05=)9JiS7ykhzTka*)+E<}Nu>wxJTvpI6TH_DanNCr z^hU;w?q|f-e0S<+Io0!R*{4mFnOU6+VzT;d>byA zE9l1kuy*J!-@RV%y7$=zxsI>4@2@MBH+=0*JYy-iHEx>qzh(a!S3P9kc=syn0tN;K N22WQ%mvv4FO#p~##PI+C literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pupitar/front.png b/gfx/pokemon/pupitar/front.png new file mode 100644 index 0000000000000000000000000000000000000000..afc1897d19324bbd2165448e5ec41773be5fa2de GIT binary patch literal 607 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{V3@$c%)r1UL`uFKn3PZ5&va!?j6>3Mz0ao+Jg5f8rJ-=G-Ma3DE;cGE^-nHud> z^&NNRKj^fyuwQI`?AAU*&fG@Yx!z~X#!XSjFK~HHcT4j5tIBY5>m$MCPk(n$akdNcRHjPsfSZokeP7g?g;6zKO-6PHV+gGDdG>x7v97^W=J|-!b`L93h;Tb5)pae*Chw zg}tYrhtHE_Ir;Bz?)piK#kkquzY}ScJRfX-aFWfryN%Df^79^Tb%?+I)%&`B?EWwA zb)E8mg{&W+&<}jSsd#_N*<%yqmE!*j&5eHqQBm^u5}Z;0+569n>9+*i>rTpU{NOF~ zXOjAwKSF!sr9N=)KXOq2;_2-gZ{Uh={$doqD?Ck?ZM`Z30|SGntDnm{r-UW|W$qQn literal 0 HcmV?d00001 diff --git a/gfx/pokemon/pupitar/shiny.pal b/gfx/pokemon/pupitar/shiny.pal new file mode 100644 index 0000000..a8c6cb7 --- /dev/null +++ b/gfx/pokemon/pupitar/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 11, 28 + RGB 15, 06, 06 + diff --git a/gfx/pokemon/quagsire/anim.asm b/gfx/pokemon/quagsire/anim.asm new file mode 100644 index 0000000..b762e54 --- /dev/null +++ b/gfx/pokemon/quagsire/anim.asm @@ -0,0 +1,5 @@ + frame 1, 09 + frame 2, 12 + frame 3, 09 + frame 4, 09 + endanim diff --git a/gfx/pokemon/quagsire/anim_idle.asm b/gfx/pokemon/quagsire/anim_idle.asm new file mode 100644 index 0000000..258c338 --- /dev/null +++ b/gfx/pokemon/quagsire/anim_idle.asm @@ -0,0 +1,3 @@ + frame 2, 35 + frame 1, 08 + endanim diff --git a/gfx/pokemon/quagsire/back.png b/gfx/pokemon/quagsire/back.png new file mode 100644 index 0000000000000000000000000000000000000000..d83a1b810b5865ba279b0ab8043f2bc7121f9abf GIT binary patch literal 380 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7U%d8tvBXja z28P7CyG;xX3@jx6$|Noz>;a17Oz$oqM;uunK>+V!N$Ii=wV`{nQX0ve2Y zQX*o)%~zV9%wuMJx5QU=JM*FATlx+18H6OBF!bE}z2tzwgn!0ICQ1h}oajt-S-)bF zk}aPt_ZfF*-3RA`&O7Y${ zwZh30pEU$7OPs*q(RMrR(Op)1iK@hJLZJ=c8FU4Tw=wuJXGS-)?Pq(l>!o`Ft9zPpYeqkoZ9l5xZ8%`8E=J9$cMf-CCilN|@hU+z)%wu519 z*wpp;VN-5z@lm?A;*}YTZdKWYXbVrH3o}gH@9*i1u=_xefRn&@Y4@~(48TNczQoVX{!yeRhQ zONwCWv3yanVRri8+m|vJ_f?B%CIJ$f8W@$E*=52bY%FDOq=~6d7|ID|rSf?X%bDf9l!XaNXNl|Ek;0XG=NjgYM1M v_x({^y6;No%dY8t<7|Npt-e=i9J z1_mRu7A6J;29}Z_zhIDfu7+DB0|R5Vr;B4q#jUARxP_P$d7M3~{#$eZbr2VeC=8ML zJnMjywvxJvbe|HBOoPqtcJU=WCJjEZFpmJ_@DFEc5nL484ZIRoOE`ct(AOOV6l;>X``o^J%ilQ@~Jx*S_SXu{#hMk zTxcP~o0FXW_v5sEf;$+U>&-PZIrgg<9csUFT{n=~N!xGE*GXTk&NWoZ|ev1kx*&SOparF;Zy`7UEXDZ~g{I-;~D`*ZqKTl&<`ukU#uBn%J_MAS%v23$x zpmk^HT%CYDYqRI>wBwPOIjgnw<+|s}{eqWbUO1S1)L+_xWp| zF8XNn)p_PT!%G7DqxQ~z5i@VOMpyUiYW*eOk6GN{XTHVtW?s+f4wL!Jy_2WtJ>Kzy f@yVCmKMbqXI87foo>69CU|{fc^>bP0l+XkKCk@Pb literal 0 HcmV?d00001 diff --git a/gfx/pokemon/quilava/front.png b/gfx/pokemon/quilava/front.png new file mode 100644 index 0000000000000000000000000000000000000000..96ccbb55165693b8b33449fa4cf6c80f429bb663 GIT binary patch literal 1069 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r179&7F{;5r2loK_I)+(dSIxgu0JyeiJ^-Pzbqr>tNeN1`U}YgUe$6 z&w`Q!#I{T@HxyXr@09#nzPu%+p=XNZ%C{d|FMd$(pVBDilzF?;z~a=68x{}Cq>Ngv zY~-5^+Rla_SiWVNlw69>&nJ^Dl;xKGV_Z7d=SEh5bjQq%^Evd28a*apCuf?EPD6Lo)AeTJ5xx@yv)C=vBc?aGDy2Ix#tO8F`@FNwmA-ws z^okXelWD^4h{>(09!AV{k9Mq8^DdsLIDeC>?Y`U2E?cWl{R~NRdBO7|M$03Tp;CUz zT4U9a{3}ieC$pTG>+bA#^4^oVJ@>ah4A+YK&+5Na=;4)yzT`xYBR^dG*;bgvJ^VRY za-|xV#KFakXFr%e(cEL~a8=p&dhj3f_!kzO$$j&eabGbNIsW`c`jpaVVf{Ovzwnrn{TxS{+015*{YPVNSwdY`@<{GciQO|tEV!WJ~D4vCKOvS_s_-pj}JJ${c!we z!92q^z}$83AI5KgC#S`mTwVAzR(1CMqC5Q)zxDd+d(M2+d#ho6+$+vMl`EvaURqGU zENk&~Z;st-8WZWxX$#YSpd#GO73VWp96d+r3{_e-$#0 zf2HbQQT6iW(&f|V#Z`eA``1jrS9@puj{eP!UH6ZN)_k$^+xOv-ogdGXr_#Inle3bv zE98$WCcb?4IO))*yT|wb-cc_9{oUhxwRbLipPs~O-rMH)GDPI2F;msaQ=XM)pDmfb zr>Ots(tU5*zD)Z0MEX>pS1yi(mBp-=+PF zri<~LW$)c$-#_cc(x;Uo?Y?WiUi#EhyK=gjdYtjzEoK`od3WF1bkY0rp8Z$7Yxh~a zSbBG}XG4PZ{{_>3{Zp>W>@Y9e7qYF$MgJ>X(sS=T?w0e@KS{Kno4)IljBR|@t0%9r h9{kdJXn)b$-cv&*Y}3^bt<7fA4*iqG1aI z1H6$|Noz>;a17Oz*y|*;uunKYip<{(_saUDKr27-^q1^b<4)~ zNzOep6N48_QMsXazUk1}Pu&48m;^sC#V2azbel7=%k6rUaAj+KPi~S}@+U`r_Jymi zzMflQQS6}cHoAEV1KZi10{y?TZwr0Qxw!nt%a+FHUmS!t3f;*|FGw{|ouQP@edR!T zOZFws6E#Wmv4+QkLvpl=A{>QIlMNi{C8ZVyr zzDDL2{<P*x&wHFB-*t+1yrIkK)_maXU! zdy`}+_@c9x!}Zh=jYfy73s|q}UdcUbo}4Q?Yf0sjbvs*M8ogHO@SXJckIvG<7mU$N zCS5(}gHK7?CBNgeQt{Y#J}o^%O`oTta?``D?@q}w-^wqG literal 0 HcmV?d00001 diff --git a/gfx/pokemon/qwilfish/front.png b/gfx/pokemon/qwilfish/front.png new file mode 100644 index 0000000000000000000000000000000000000000..15a0415cb9121fea5ed99a9ed17621889a7bbb7f GIT binary patch literal 640 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsBrdmp7} z*uucTaC%z3Gy?+zOG%Jl@c;k+|L1DBRWdLz$$PpuhE&{oJEJ@AumOi_%A}g!A3EyVvc|^a|l_l?#ms zdCKgs{%z*jIGc^zFL^Hs>E3b3X4k!CGqe{UU9s=W^F)hZI;|Ji`|R1O`cy7{$sM)p z`4ipm`FD~LW*7A{2e{p_m{pp!fk7UzD@!^>ec>md%iXAL-UYhGoH+gdAjl0}49+js)EKABQ znx`1wxaN6CQe{`K@dR08!}JYB+KId(Td*7e+bWn6ed@=!%v(W#j`BMRzd&dHpskxHLtxbOQto|n~|*)2Bj oF|TegeqFtJ3W$Jsq5tU_@g*-rPqqer&R_r~EmuF6bxsLQ0DqD$PXGV_ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/qwilfish/shiny.pal b/gfx/pokemon/qwilfish/shiny.pal new file mode 100644 index 0000000..97c3679 --- /dev/null +++ b/gfx/pokemon/qwilfish/shiny.pal @@ -0,0 +1,4 @@ + + RGB 24, 21, 22 + RGB 18, 00, 11 + diff --git a/gfx/pokemon/raichu/anim.asm b/gfx/pokemon/raichu/anim.asm new file mode 100644 index 0000000..781c4a8 --- /dev/null +++ b/gfx/pokemon/raichu/anim.asm @@ -0,0 +1,7 @@ + frame 0, 08 + frame 1, 06 + frame 2, 06 + frame 3, 28 + frame 2, 10 + frame 1, 08 + endanim diff --git a/gfx/pokemon/raichu/anim_idle.asm b/gfx/pokemon/raichu/anim_idle.asm new file mode 100644 index 0000000..95bdae5 --- /dev/null +++ b/gfx/pokemon/raichu/anim_idle.asm @@ -0,0 +1,5 @@ + frame 0, 06 + frame 4, 06 + frame 0, 04 + frame 4, 04 + endanim diff --git a/gfx/pokemon/raichu/back.png b/gfx/pokemon/raichu/back.png new file mode 100644 index 0000000000000000000000000000000000000000..36a0df5f3b2693253ad2a49945930384f23c5131 GIT binary patch literal 414 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|Nolh|6~RR z28J>jb6*Aq29}Z_zhIDfu7+DB0|TS2r;B4q#jUARZ%<-TmB&mzS`$s2wwKs*SLJJy&j;;))_Si9lfeeDM4zbo3;l|N51u)k}qXS4HLTSsJ`)}hUEUj7$mB-$q~ zu++cr_4QYr#5VI%_Z#P)=~`sHyxZVf-*wGv()1(uAKd-#LA-eUtESJi*N?^iCGyZWt! zF>BXCE|Has^@F63UUymgXA;w%sSjPV-_}<2JN}aVn65FAFRZL&$AyC@0uG+3JhV>v zZ;RI1RV$Y6V(XmZ=pJs{99n5rdO7$?SWL6mi}nw?|aQ{<9~z1+`9M|cKfy&mBxDR z*83eh_o~lolZz#Lq>o97T~CNS^>dZBJNw1wifBJJ($@>aU3L9A$i~8&@7hNqaW+=`mzG>CoLfP~JE0=`<|Bp@$sC`nZ z$h+>Q+Wrp?EN@rJ1ZXaPH%VFNxY+9(H4P8{+}o+daqis3$bU(C2b*5UY zRpc*?dZu{oFs;SAd2Za;<)G;_|Bj^hbB@scB`v{LW`8ePUp@0FgkRuDiiPo_Hn-V4 z{cpBy-@0y7pzcJ^kmW3M|9qMBW5ujP*Yloa&p)mmt7CF%TgiL(e{RyAZ@ihAft~>Zk3Q9Dt-(eILo94&K+`Q!2 zWn+%lGmcGt#c5i;#&`FdcOh|~x}Ng+$r`78xY)6?xsdH_OV<1iUL3|2lM78s=h)m6 z72;c+^Yp}(6)}a!A1t1{jjcN2#kH@h`eHuc3)||Ku*~Uq{~kX9&rAcj>yFxNqdMx|UP@O7YjSV#ld{P0zij!1=yxyV_CN01 zrx;&&oQv^(@$ry-5Bhet)laf6I4%3Z{`~^$cOOnX<}B~%^mvDWKd#^T=rQfPwb#A( z9JXhF%YN(D&wp2b_xe){owQee$<&&;5t0mX-UJ-^|zAF17=e1)i>cF6*2UngDxh8k7J4 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/raichu/shiny.pal b/gfx/pokemon/raichu/shiny.pal new file mode 100644 index 0000000..0491d1e --- /dev/null +++ b/gfx/pokemon/raichu/shiny.pal @@ -0,0 +1,4 @@ + + RGB 21, 19, 20 + RGB 24, 19, 02 + diff --git a/gfx/pokemon/raikou/anim.asm b/gfx/pokemon/raikou/anim.asm new file mode 100644 index 0000000..d178a18 --- /dev/null +++ b/gfx/pokemon/raikou/anim.asm @@ -0,0 +1,7 @@ + frame 1, 06 + setrepeat 5 + frame 2, 03 + frame 3, 03 + dorepeat 2 + frame 2, 35 + endanim diff --git a/gfx/pokemon/raikou/anim_idle.asm b/gfx/pokemon/raikou/anim_idle.asm new file mode 100644 index 0000000..e3944e8 --- /dev/null +++ b/gfx/pokemon/raikou/anim_idle.asm @@ -0,0 +1,7 @@ + frame 4, 20 + frame 5, 08 + frame 6, 08 + frame 4, 05 + frame 6, 05 + frame 4, 30 + endanim diff --git a/gfx/pokemon/raikou/back.png b/gfx/pokemon/raikou/back.png new file mode 100644 index 0000000000000000000000000000000000000000..0214e673cd1635d50f850017012e5c764c882f54 GIT binary patch literal 350 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>par!yLmY3=9mx z{+6-~3=AwKL4Ls?;am;3N(Kgozn(6RAr-gYPL336QQ&d${Qmd7O^T?=(sTP4E@AmS zk@xtIH=EDfSxbAoII_KJZpWOsSJ#j3Exi6v_CW1V@dN1&+ATe;=Z^+8dHPs3RHw}2 zm?dw0FXn?HyOp4zZlGyz;a{I7cRp8>bt{Cf-u}8lR`b!S>lwP9wMr{IIgA9~Wf@!F zuAS5AD_`m;a*07C@piSnVV_|*qw2z`arzAG-x8~SlpVYM@@`a8ole7QE6M&$)mL(6 zzgFa=1lmQs-S=vup3&OGqdP8Ee|Fg+qSDwsrO;Yr#)(Dgi@$5k3EXM*asDdyKB3F! z#IMzhFTVPFw~FCYA@iR+IjVf(*HSvS{bi8UWlc*EzPpQofq}u()z4*}Q$iB})x(mZ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/raikou/front.png b/gfx/pokemon/raikou/front.png new file mode 100644 index 0000000000000000000000000000000000000000..4854f2571439f82bed937c6b146f32c1ba7f311e GIT binary patch literal 1516 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dVC>*vW?*1YetP*W0|Nt3fKQ0)e-L1pV>pF@ zfg#x6QkH>%fu$tKFBl}8tKnA3z`)w=>EaktaqI1@o0IMsaJZ_z`~SZ$c43@D%=J%@NIW+jGK}X?Mz4Z@0|}7tj@($J%Z6ATQ{{6`f-$54T&UJ$usr z`p9MjeU-jn-t9NyYgBo6@T}lIYW-tZuh;zlWz*Q(y;@t3w}f0+%;l;0wUlF@wdYo+ z^=GuoF6!SBR-f!&l;*?w{kJE`S-QD}ML;fl3%oLpZ=W6k_dg?gy{gl~StnK(@YU`Z% zM9$(_ZZnT8>k9g}vB=LNRw$TrT~*m^#eYltejZ!AW`l;P_OGjPXP3;#Yn1E~^STVk+>Z0>6^&i%8y_2S0GC|w_Mr|u1zvv&2Dtz0Yg>Xh8|I-lnYn9@~u zZ3yGtaBkk3Eb}UXfBUx2Nmsq8b8^G>#ZOL~xv$;UwNuKjsNtG)qszkO@zzr(-_g6X zc(>p&#|^yk*X9ZA5ES!y&ba)?8mFG;iLYP#-3ZIK@lURPt9ey%jr+qQpXr9Zhm5#Q z@0@PPD2NN**u$FqEy?`F(}0aXk1n0CMon!H>(^_5A z-mb1_{I&M>>TMQ#IzOjOT605ubCr*%v68M{F0Nh_0z4t3GRK~w|8&#JB_8~Rm-Z6$;w(^Q2yLw?IX_la-MbAL+5t| z=Nw-+%NMj?^Lg(iU+nI}vGbhpy9fMSVz<&}znNscBIeMknbvNnI5#Z1`)#Im+T9jQ z_IEFK3FR+p-d_E#+-V!g4v)iw4ziPBcrF4#Tg%U)$wZS#chul1(t z_iqYz-VfaMIN7*=_g}vE@zFFsFxBY*An@^%L^|0*R)jF!vb7$I?_w+m|e!kGM zz((d+IUr4XM)5x_s;nq}ZwhY4rp`^rwiP}29Wgq|Rn&7)* zqV>8nzhx8C-Kx(rmhN!A|E^r&O?2xtr3HSrZ_1CXof7aox(iX@UlHdmku^sdl)S` z@P6?w-Q{6^cN(?MPJQEWa2uny!d%<(6MKqUdd_g=bF*H$SxUcvNm&H^Z(jaDyPPGp$Q>ElrB6K{`LsCf=bTV1OqlLq z%SAuLw~OBq{JsB4A2#^E+4_ZaxxiIax%wXKe+(0hgKBzQ-B&R%Ffe$!`njxgN@xNA Dg&p0E literal 0 HcmV?d00001 diff --git a/gfx/pokemon/raikou/shiny.pal b/gfx/pokemon/raikou/shiny.pal new file mode 100644 index 0000000..509a54c --- /dev/null +++ b/gfx/pokemon/raikou/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 15, 00 + RGB 25, 21, 00 + diff --git a/gfx/pokemon/rapidash/anim.asm b/gfx/pokemon/rapidash/anim.asm new file mode 100644 index 0000000..4bebac3 --- /dev/null +++ b/gfx/pokemon/rapidash/anim.asm @@ -0,0 +1,13 @@ + frame 0, 10 + frame 2, 36 + frame 0, 05 + frame 1, 05 + frame 2, 07 + frame 0, 06 + frame 1, 05 + frame 0, 07 + setrepeat 4 + frame 2, 12 + frame 3, 12 + dorepeat 9 + endanim diff --git a/gfx/pokemon/rapidash/anim_idle.asm b/gfx/pokemon/rapidash/anim_idle.asm new file mode 100644 index 0000000..ae6a4e5 --- /dev/null +++ b/gfx/pokemon/rapidash/anim_idle.asm @@ -0,0 +1,5 @@ + frame 0, 06 + frame 4, 06 + frame 0, 06 + frame 4, 06 + endanim diff --git a/gfx/pokemon/rapidash/back.png b/gfx/pokemon/rapidash/back.png new file mode 100644 index 0000000000000000000000000000000000000000..70de0e5ecafab2fa9e072b036b7bfbd5b36d0d6c GIT binary patch literal 466 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f9;;)e@zJn z28M`|uZ9c^3@jx6$|Noz>;a17Oz*y+%;uunK>*&Ul&S*dJWnzDz?<4cYa+8l;?PQEe-gtiH zd;OgPvsUUjEo+|_t@*WaiPG}v(UZ!)ZRak0byHa3O2g$J^A|9BFeR~^-tAo|CuJLxbNN z?B+K;6nI(la%;gawf9m#GUufR@BOvW+PP#)LjPLV6O95(D*Aew_NDgTXuR>6Wy`5W zH%#8{@O5WVSdjHH=W-C+-gJ#8iP3&74X@hnNERyX>HOCFzG3E(TkBFa8v7DL-Ljv5 zWli|3vO926V}M?w%;K31SM0;*vTiVTuorjWV&-*}eEB}p{dRmnBt zKXy182i%_=_@CjKsKM7S7hdxe{!xBxK4IOt?au!WKbYP;<=5`R6LS^h1Ou1qH_Bg6 XV6RTueSbXz0|SGntDnm{r-UW|Hrvh# literal 0 HcmV?d00001 diff --git a/gfx/pokemon/rapidash/front.png b/gfx/pokemon/rapidash/front.png new file mode 100644 index 0000000000000000000000000000000000000000..7930fd60601c0eb03e5ebd001f9ff80f3ae5ec98 GIT binary patch literal 1497 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsBj?kWD) zlwe?Bh$#7L$iTqBQWE4B{Qv*||G64&l?)856`n4RAr-gY&c1o;um(q4Rhn|03tn@RabXCmj`TCyo zo-9~)-QVT9iG*LPm&g+yQj*5vsG z=S5o8)6O4Fk9m2dZ|;j#V*b4oj)y4uT@5y#QTq0U7w_c#aU7d%O_IwD6@GIpHvej3 z+q^Stt?-54Cx4qrtrWB55w5zvBRW=G?XGg&Jj*FRw-jixcYNi^YvfPTGI~L>^jbn9)B^)Il(#Jjy-Tu z#pOrW?rjObr+e>ESsYLK*Qv3r_YV7V^^3he;iG%i?AJ}t&W6h!VoOc0EV|`??7Y{z znMc_fvMDPq#0k79bPx4fb^l4(W#)B{;pwT+=)mL9rxrL-l4gA8?;Nl7%#Gr*?CxO z#iIFt--LZME}wBS=IQfQf96_?RTy3Qoc+!t!)RsJe4aao-wq~xm}(uitD^n=oxsP6 z-4#bT>INbSHy`rlx#?b9dg+&Txq;U+(`zSBoxgMN!rYQ`&vf5;1ipOYIQvfH zt5x4Z*&B7=O_-I`vV{5Fgom3p{Ajf1VO~@Axc1!!BgVu_wa@rg8e6O87Pl|G#-kg3 zCvjzqEgO@r^qqzFHUjB>hwlF6`#QNc@b+`QAg_$Y(*iqF`>ku39c4tDm-~agk zhWit{FMh2%&Sg_{IqsWvmH*TX{-=ME_A?t*&R~{n;0)F3>wV(5SL^sp%S+ola{Huf z4o@xI&%Aiw@*C4%MqBCsmR)A7zv|rkDK~Ds|Iupwfqw_{%Q@Bxf~Psl9j+8FzvCF# zE>r04@~g)>>C3z#cloc&?*w`sV16f2eBQ2{=alffh_}&i3fcdjk~Q6$SL|-I;^|ZV zJBiz$&na^My)^Re+@f}s3-fmzc6iSI&S4iKEq=FKT|NKm-t({Q>*i1Oo$~ninm2Vb zKmT46^7U|S*pJt>VKwhJ@B06K2N+pA?)&|}Z|t<7|9)>!4@d#S zd1?FU3=9k`B|(0{|NsC0pR3_k$-ux^syuHLK5A_Gujx5Y}y&^o~TQ+orL%)n{}^zS`p1 ztbfP(!0cs~E7GKNzqQTM>)FY*!L)nRv7CoTbN8%mPZuve_3%gA)BHrf8=)73<%68L Wrlp1Ou4Q0gVDNPHb6Mw<&;$VZw#%RZ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/raticate/front.png b/gfx/pokemon/raticate/front.png new file mode 100644 index 0000000000000000000000000000000000000000..37695c19d39f718ff7f360593d59008ec7c9c4af GIT binary patch literal 1052 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*<(s`k<@%)PA4Df!&@z{9OL%Fm8-EvAj+^`$~O9Mcvl*;v8R{zn-hI z)_(Bq)5`5x>-=o_8BC|?r^&N)hx}>Xef8~1|EASPbqvBch<8|CbDd=WJ4EewXrlkM zi@TZL-qLs#K67Eq!R3ZbZ-dZ65B9L03x48CSY{CY}5J=l7{{M_#8|hpir5-@0!d3iFTU>a2AP`H{cz z`L+!*Z5QqesVPMjT5Da&m-k|MRz9D-KXS(+UB;C6i`-XQAANZ#IYartySH3^ikh$V zmF_;bQ!e0ic6cnHlEKbZE78Y&HAaFdue-%8KbU9wkwz01;r_?U^ER%Z%fIlj3ge=^ zYeW@q?5-~q;!uwYwc7X~C@QXn`N&dh;qN(NYa)F=pK-g$Y#4di_-1Cu$$RG{SJy6_ z#2T@A%~4ObiORD?=gmm(|HY;?+3B$|yNbHe-^p($t+^n(pzz2Op&Ds3S7DC^)6-|W z443T?6)Af5wrriA=JSZM4(nvYeoy!5jDKz3XN7ATn)e=%dt*D-VD5ZN_YGU_^!Rfm zY~A%>F3TjQr}}Zzr`H|!Hv8DWN2S{!>yWnoPD{H_LVMC=IkKOr)>iP{G1i}H>A&;c z8SgYb(TBqNFI!CeAD{6)Vpv-EV5Y6Uq1vHGftSnos4RSRMDhWnx^ksmp0g ztiGP`?oDlaFmd`E7Nx&7A18@jakHO3T~9wYZr7eK`3*klzB za(|%uDeRn&)SOuy7!|9ZP4yLQOCWovXwY2xj8BgXa4DG9Iss(SBV;92lY_5GhMEIs9MMUBUs z;wx8Hs@Pj7-fWzn!_cV~oVHI`e<9#H96b;Nteo|4L!pDw-C|9kU$q58p< z`%Mm>dHs9G2e#Lje_QaSez^SGBLBsm?}guM@6^hd-#-oxt?Ia6j4UTqbiBSC24!mo MPgg&ebxsLQ09qjIP5=M^ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/raticate/shiny.pal b/gfx/pokemon/raticate/shiny.pal new file mode 100644 index 0000000..a0c0f55 --- /dev/null +++ b/gfx/pokemon/raticate/shiny.pal @@ -0,0 +1,4 @@ + + RGB 23, 25, 15 + RGB 26, 16, 03 + diff --git a/gfx/pokemon/rattata/anim.asm b/gfx/pokemon/rattata/anim.asm new file mode 100644 index 0000000..c046396 --- /dev/null +++ b/gfx/pokemon/rattata/anim.asm @@ -0,0 +1,9 @@ + frame 1, 02 + frame 2, 02 + frame 3, 12 + frame 0, 10 + setrepeat 3 + frame 0, 05 + frame 4, 05 + dorepeat 5 + endanim diff --git a/gfx/pokemon/rattata/anim_idle.asm b/gfx/pokemon/rattata/anim_idle.asm new file mode 100644 index 0000000..e31ce47 --- /dev/null +++ b/gfx/pokemon/rattata/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 05 + frame 4, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/rattata/back.png b/gfx/pokemon/rattata/back.png new file mode 100644 index 0000000000000000000000000000000000000000..355f16b4bb550d695389a9e3bb1075a84479f1b3 GIT binary patch literal 436 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zt!n`i$o6t z1A~*o(J%%E29}Z_zu^D>|Nqa`aI0isU<~$jaSW-r^>*s*zQYC_E{V_n|F6u|+jnG# z*Zkcst5#L`85k70{Cj+zNoD_}?eew$GlK35hg`qUn4@j5cH4&E>85|bRrUMw8!$we z##lX+p7(NgT!O>z!rI*)!r3-a;S1JocXwslweRw_ReK$_CWKv>dcZ@VYHG$^jx;9r zU+Ze>#cPH5E_~(K%lPYp|ALoCt4~I}`fc-tPvN%xCDno#vB$U?#2Pu*IDfe_b>8M@ zS2@iD;-0E2m_2s#n_2ug^Zue6_kKpCBv!ngT#`_6Yi=a7-mz8JH`MM_FYtR<@w8jy z$t&*b??sEIzrOOl@8o0AJ3$5YyZYAVi~6k(H(pn@N#ZrH!bh_YhIhXx=&_h*>#42j z(^hX=``MrGgVTd8bA_LFW<0av-p1_r?nv8#dq&okul;N%Ijp_g@`35VdG*+JHuLgB t(_5qtwEG`(OR4#Fq=r`~^v>7%t|e>&U+?|nXJBAp@O1TaS?83{1OWYJ$0q;) literal 0 HcmV?d00001 diff --git a/gfx/pokemon/rattata/front.png b/gfx/pokemon/rattata/front.png new file mode 100644 index 0000000000000000000000000000000000000000..cb556cbdb1beab77fb50bf1be383fc4924b57c2c GIT binary patch literal 702 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsBDI(=`E z=wV=Ba8fuL#=yY9QWE4B{Qv*||G64&l?)6_v7RoDAr-gY&b-+7PJyE(_1WM1KRGh8 zr)K$Yy4lTpFK64#KCUV6`=@QYb(W`PP@cuWYq_e_V+)5R7_s&Gg}`h^dPgMtc=cG02{0DR}iD z`}BtLxoex&Jr0iC++?>s^+Xu^j4F-d8CP^(zdpNBbk>Vs?Ul8Y9|enX@5&Y2ce(J> zuPW{Z>R$3Q`BJ%-*4M1OL&^S`#)3Qcyge_wq1js`=Glwbnuk2nJ1!hlT`GBQ zj-k&(w(#}urWyq$Mf7CnGLcQpDhxS?Ny`B_fKK|H=&QeZO%$Y z;n%m0Ngj7UA({J))ja)+sr|<8b7znFMr@w`cxR-&Y4^FaY3ELq=9opEoAYuP)HF*T zOY5qlIv(R69WxgOyPcAjzj5*L-@0W_{`%ZI|K#tP`FrR8WM@ziExebhJ&%Ebfx*+& K&t;ucLK6V;bx*Va literal 0 HcmV?d00001 diff --git a/gfx/pokemon/rattata/shiny.pal b/gfx/pokemon/rattata/shiny.pal new file mode 100644 index 0000000..834a29c --- /dev/null +++ b/gfx/pokemon/rattata/shiny.pal @@ -0,0 +1,4 @@ + + RGB 22, 23, 19 + RGB 20, 17, 13 + diff --git a/gfx/pokemon/remoraid/anim.asm b/gfx/pokemon/remoraid/anim.asm new file mode 100644 index 0000000..1d8608d --- /dev/null +++ b/gfx/pokemon/remoraid/anim.asm @@ -0,0 +1,4 @@ + frame 1, 05 + frame 2, 10 + frame 3, 10 + endanim diff --git a/gfx/pokemon/remoraid/anim_idle.asm b/gfx/pokemon/remoraid/anim_idle.asm new file mode 100644 index 0000000..3e2b121 --- /dev/null +++ b/gfx/pokemon/remoraid/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 1, 07 + frame 4, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/remoraid/back.png b/gfx/pokemon/remoraid/back.png new file mode 100644 index 0000000000000000000000000000000000000000..2abcc55e0e85e144caca72416be96ad5fa85056c GIT binary patch literal 431 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7Kc(lpWl%K( z1B19i#ybWE29}Z_zu^D>|Nqa`aI0isVD$5JaSW-r^)@7O9kU?^^Y4GerafEv z-!;qKcvJFb*C*opH5ltU#sBsl^kUHcr>?^M>f^VJJ}$<8o6F;jRD%wj^Eo9DCGqgG z+ybx7f*dX8VkS1G7yqpjEI;O8osc-A@I>oFxf$+8k{W80GUSC`XCzEHfA!D7Sf`x} znjb_S?h^f@weiv2NoF;l`-7D@W$ldmbJFVbg>+v2NY^or-n7C(_Py$S=OpLqU=b%H{zRL0FI{C%7B?|p1~IM?9zjeK^^-POuIJNoKvSeHrrirR6o?-O`($xNqA liTB#M7*@4^ckT<-o9tv|I2T%N%fP_E;OXk;vd$@?2>=%cxo7|Y literal 0 HcmV?d00001 diff --git a/gfx/pokemon/remoraid/front.png b/gfx/pokemon/remoraid/front.png new file mode 100644 index 0000000000000000000000000000000000000000..d92ff58381e689d9299c76d22113416d3867c470 GIT binary patch literal 653 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsA|^nAAr zs%Btd5Ld`}$H2hAQWE4B{Qv*||G64&l?)6_I-V|$Ar-gY&WOxoQRHDgTm5~1F@rR- zZO)~XB|0BO)vlV&Sb9ZwQSX$+Zk&JE1RDNpGH!n3!r}DXsivosbrwTscf`XL2_3ra zyf3FSidzfq39N2QJ9psEWW}ym#Tz8fc|QE~IroK-K$t|XrQR;Z4cssOd+-Y_Js;Cj z*3xKY*0oHDOX8x!*^oyOO5Rg`XsqPsSY5hk#=rPuFK(`!x_wrY+pRT;vHJC~k?NU8 zH!sw_`KF=e=bO@#D>n1lPCpTFdP!&LwYzOe4g6l-{`0>kA1>9N9(ddHylj`I)s46M zIWFnZ|2oh42f8p`v0UqyY?Z3P`t;WwH>q8EPDxcQ!ZTh?I+vlr&MNV2*>S$7KZ+;a z<`2I2@Gjr12G+R^L6fDeqLeb7rA}rxS`|oaVAVe9sruJXYqF$%;O1j7JRc2vG9L+6 zmh676{Wd@%ru6^5^cm|f>`jl6mp;G4ZreQ02bQopM9byzMct#JJU;atj}+l`S_mkwcYc6Zk!h>^YEN; z%=0{(!@ha@^ZXqi{>oZ2@8*+r^DO03v?pyp@Jcc#FFZb3ChoAsS4O|RiWACjeLVw$ z^&fc{Wh&j~AH8J!ley&H-^bo7s*dH)Jh|o8?;G0tn04Pobe;X}^ZC$*y7`$Wn(yq| z`-Ef8-lcQytzt<7UmewB>7~fP zz@Rbdoiqaj14~JeU-19`|NrM|xK%PRFmCd6aSW-r^>(Uf&`|>(7u~Oa-}jiFE)oiR z!yzKN@AppAoAqn|KVL7;@L74EeO8s)p$V7&WH257G>v(FgFwxz{S2Eu8d*Bd%gAsz z@ml=5t+M}!3X8YSqHqSaI@W}n@8iWBF6{j=qg&(f(XXF2ebv7zdU8=}mAS&>kC(Ed zQd(Y`7li0>O=z9If8BI<*>(Svd4l6x5-qkp>$v#!cki*uYZtHEBY?vD93MSE*ZP{74UpqYY0_U1(mfcy?4>8uU ztWZsoeYzsQFDkGCTYiUHFYpmhy&80>L zzWQe`255bi$>y^SWwU0V*RuE5&yc2_jJI^Xw=;hzbrf44wnSx9!mPeC8{Vq9ub$)~ zoY(M8K$Jo2wOE)r!_w`uw|Gl$XZ&ICOzrzWbERz?)*Sn0X^`6cqT#=c_!@Jy?VFBf z%zJfwZVJn8&YPhdib~$+t46HJ&El%q^PxcYvE6EahD5pFbq61WC)|j=uWZNk;<}If olO3N7K6LYFG^8h-{KK$lImi5}Q(vYtFfcH9y85}Sb4q9e0LOyq*8l(j literal 0 HcmV?d00001 diff --git a/gfx/pokemon/rhydon/front.png b/gfx/pokemon/rhydon/front.png new file mode 100644 index 0000000000000000000000000000000000000000..18a5f0aed27576fe37e021644dfc4d7608d1fc21 GIT binary patch literal 1337 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsBhQ9YJk ziVO@48k62hGcYi)lmz(&|NsC0f3AjGB?AM?4Nn)xkcwMxqu)-tt-#}Q>wEq4sCWf~ zZ>?YIN|qH_<@QxLdUP+zty$a4ec&+vd-0AP_iOep^q=_PwbOi-9mshN#u2`h#mRE57#N8j+X02wGC!6*}PcZ-2B<0lQdg$wd563RB zp4zoQLNEF7`L~=NXBe-%j+znFaBJ71U>Bu(89POm&o^GHt>r3GbDT5i5BK&GrYIE^ zwp@u-zgweTZ4}*ZtoF=-X`#*4-FGW>-ZN=B{H<6f^Tn@pnQq6s+GQ@wmQ6c9XTpc* zhGgY87CWb_8a!j%xB0`ZHH@vNx`g-l#A;1?x$ntW#@Dkl3cPzOz2YQ}=5Nz7k>TRw zlDP1%X=jboCdt#;JnJ<@p4eLkZ8vh_ENDB@^U^)a70;gs2Sf3s^gf-mf^+*$Bicm2DA5qf_*IuaNb8b>Bf56*E{bUMzN z>8bxLHmS2=X0KO4sXgm=_Z0DE&39$)8~pAzG2hXh;+Nw6_WTa3ODje6n&!WGBmFS6 zTe?I_wd;rt<8voL>F{};(`GMG`?dv;^< zR9Ozy^#0$v_czJC*S&CJr6$wcIN`I0bzLv{O=I}GrfS~Y>)cPKEcyFIU9Qub?Zmxe zHl{iy%jroi$;MNw*Tv09_LQ5rCGTCKyo;yPI_G_c89#R{_sck(dig z7|t-E!Rzw7SLqABC)o5wy!K_@zb2z)YfWDzb6|(uw-s%PFOP0zc_m<2e{Wf|;^uwb zehGW8GGCNjv)286>ZePxORc@ir@Yg+`>}f0Veg_sXFFU)?my)4Px*In;_b(~ zuF4wsZM^-|w|vQN9pi|pNB(YDw|DDSUcVO+1(V~&?<$r@=_cu~ikf=2Py8<9CngWi z3YT^DS7jGu9LSSm$lrDN6_XqL1g^>7y7+e;o;XiHJ-K@G)~mAbUaCYq5%_e=Gq>dU zgSrP&?uv}}O5B(5igR2!yx6YxvTW|3`yT^zc81<~%_sRRW!_egIp23&mHpt`nc(>1 z+?AhpulT<8dfM_O-_7YWD_L*tw4fmW^v%M(DYh^94y49RXt&P)5n5i7bIt1d5zpr~ zFZi-I7(9MZ`rfzv&Q?=v=lV;s=1W`?nckJQPtJ=nVEVZD-HW?cb6@qHWB7dX<#*Y2 z#eDnUzu0@~<9FGxNw0sy14!d;;I73b$M-L>R;jF8Z2cp@guQ;L^_I>DnaT5C@R^>T zuzXi@ZE~zx%`)pZx0M;U8{a(`_u^=F`YvaQ%Uh<&z2^HDRqioW3v7xzEZnaYhkc!M z_5Z&)p*E?7zvhVkWDZzt<7UmewB>7~fP zz@Rbdoiqaj14~JeU-19`|NrM|xK%PRFnV~pIEGZ*dOP_cU$X;8bL+nU*8EWq&ZVmD zx)+xMb;Qjt%$!GS3 zJH#$D?%+_DOA2gU{jKBb{OTVYa~Q>I_Hpl@Cv{OW{oljyOAcCOEO}w###r~cQ~d4I z9L?q4b_RV9vh#%#wtkBJIE_7A%2i0UOWeb5ebK}TA9eHhx<2;iT@xc(YPd@}@%G8U z9N+#WrQWB7LgulnPnny+xA=uq-7Myxi}z_ByUCTa&CK0rr_Z`+za&;>M%zB0_mNZS z^U)<&)Ym(0@|=2qQcn4X1QjcX+Mrx{=3TxeCbbPqZd6vT`ewFo&+KiMoG&u98;*r> z-hFTTq+rbtuD$Pgv}~Ea%9uTlx}uRbTkoKUX{>ab+?KO%m}?Ezq}b{`Ul(S(@lagS h$A3rP&kGZipHsqiWLe2XYX$}e22WQ%mvv4FO#le^y=MRb literal 0 HcmV?d00001 diff --git a/gfx/pokemon/rhyhorn/front.png b/gfx/pokemon/rhyhorn/front.png new file mode 100644 index 0000000000000000000000000000000000000000..e053a97038f66ee0ef643983bfc6581386e005d0 GIT binary patch literal 1191 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|NsB$s2)o% zMFs{2jY;pM85kH?N`m}?|NsC0KUc%8l7WH6&C|s(q~g}wS>1ioiaf3x|Nj4f=iqgH z4rjH@(6?SaQKjl9Wj`?QSU&sOxv#tR#D4mf|NZNw+3UIQlBnY8$0tJEwJwA|2~1JC zP^vobbKSM@lvu?@yXs0KUJI*mua94HS@0h3jVLqT{!?&fKz6O~lfn{)NQn{a1YkQG;SZC?C^ zZ%_V2h;Ev4RL4?!uV4zRZo*1O^XNq?=a+YA*Dq`Px87>w-mUYDotdh+W^>0*2*3F# z>B>6Iw_ORgu@e_|OsomK<&pZ%aBGyz{dGl)O8IVySsL4#>6AY7_`-0eWG0{R+H*_S zH`s1^E(Hb`NixG4hw{L++n|yc+RzW(foGi>eI44n*(c?@3y*GOASOJc)A zzGG!>iIG>QMe3#;mc7MauD-+}N?-jOxE*GuX z{%(i!vb$^QS8XlnlYW=L=dAb6BUEBv*;!fNORL)KgSje>%N|`-WbB?Lvf+8(wM&e} z??kqqynZLJ)se^8Zq1HlnWB)rj}GfB`E=p{!z$6pLU(_DKT$nnv+})9`_%Nq54Ove zca-j{%6qN;!h+TO&co`t&cUsR%64nDwK6A^si z`62fGwGqX~<2ufy2H8E~dy;ro_H>Y!MdiNdeb)^qTYp(>ekU-!ddK5};~@Q@sE~PQ zai?&{;|b>!=YIa(_xX3HDi#UJ|w7)i?VGd{Xt<7zjcaXvLy!t z1H%p%nRyHh3@jx6$|Noz>;a17Oz_`@Y#WAGf*4xmVMMn%cn7{o0AH!nSrZU-Q ze)M@c&oCpQ_V6e5f1jqd-GBI(w@#uavhFs!ZFMAKv9Y1v;^WxbT(=rZOmI$`Bbaz3qhb2Vji&@woMA YpR&1B|5A=)U|?YIboFyt=akR{01P7DhyVZp literal 0 HcmV?d00001 diff --git a/gfx/pokemon/sandshrew/front.png b/gfx/pokemon/sandshrew/front.png new file mode 100644 index 0000000000000000000000000000000000000000..44b69f12b2b3a2812124d70f4991bbdf36969e11 GIT binary patch literal 810 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-VEDkn%)r3l>U&L=fq{W1z$e7@|NsA6rx+$% zaxgG3>~N8p$H2hAQWE4B{Qv*||G64&l?)6_Cp}#pLn>~)oprlti2;vG>CgZ5ajS2$ z9Zr~et39R6J48!zfndb6Ukt(%_eb8jzcQwD{T4MtiHGh`u+t(CTB9qYO^vQU7?WgpG@=GO8J}OYKuIjscJgRrI z+ozAmCo+m@=^v^*xaLcTxRlI+jk3*|vt>X1xDa+zTr6p>u)u7CH1U65qMTjk7r(M8 zKCjN~c4SAy{9<{oxz9Dl=KM~RJF)UqX_>~JuWJ`aZ>@i~+^xyZO7YyqXm0H@Pn^|D zxDQ;?eQ@)3g4*AhXWOpy#?0Z}XT%+KxkPc@dB${RbF+5cwLgXG7w(q-+Q)x?=Zw86 z3+}wwBvn#U=WueS*cv^bQ#Y5aQMjo3a#57QU5#62XSL7wa&5>vy=_fLqJKg3<=wCE z8lIWd_+BNiKe%-E#}JMvH{b1HUwGut-7DKxqqk({DwRl<^aV@U*KAIHV)uhvLsj^2 z?3vyb>2p5j*_b?UG2UT!Pb=e`&Rwv2zR<>k(ll;_io@1E;2K05RN z1mmyw-nieJJ$K!<>U_1u8{_tvU#`jzdw=%T-pImb7N7l#-TJLB$)*c@KKtF+YTDcH z#*??~n-6jfNPE@1mH(N4u$`N+=kb{kf6H{g#B(!+jit}|{JdX$Y^g=?oS%B<{xGge Xl`*j@tTtj`U|{fc^>bP0l+XkKPfC2^ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/sandshrew/shiny.pal b/gfx/pokemon/sandshrew/shiny.pal new file mode 100644 index 0000000..86d4873 --- /dev/null +++ b/gfx/pokemon/sandshrew/shiny.pal @@ -0,0 +1,4 @@ + + RGB 16, 16, 10 + RGB 11, 08, 15 + diff --git a/gfx/pokemon/sandslash/anim.asm b/gfx/pokemon/sandslash/anim.asm new file mode 100644 index 0000000..0e20b77 --- /dev/null +++ b/gfx/pokemon/sandslash/anim.asm @@ -0,0 +1,9 @@ + frame 0, 06 + frame 1, 14 + frame 0, 12 + frame 4, 07 + frame 2, 08 + frame 0, 12 + frame 4, 07 + frame 2, 08 + endanim diff --git a/gfx/pokemon/sandslash/anim_idle.asm b/gfx/pokemon/sandslash/anim_idle.asm new file mode 100644 index 0000000..7301446 --- /dev/null +++ b/gfx/pokemon/sandslash/anim_idle.asm @@ -0,0 +1,5 @@ + frame 0, 08 + frame 3, 06 + frame 0, 04 + frame 3, 04 + endanim diff --git a/gfx/pokemon/sandslash/back.png b/gfx/pokemon/sandslash/back.png new file mode 100644 index 0000000000000000000000000000000000000000..43704ad0854f6e86f909426b40fc1381062238d0 GIT binary patch literal 504 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjq2lwj~1t z1A|Kbu15?E3@jx6$|Noz>;a17Oz&PF0#WAGf*4wGq1rHnWIJ+kOpQ~Kvv2TvC z!=I^5?oF*o|I8E5ls*2TJ+WhFWAq=t z8HZMv9pO}UlAn0EHYs|2m&dafJ)7Uj3%BoxTAF%(iACd=eWsVr|I6fvmu zUsf80C~UEp`Kz>`O4xaE(W}MkG7ML0FTD<|;yM;6dGN*7?XTE)R<3>Uu3s}Yf7lu3v0%1T)MUdnwIP<7dCIax}P~>*7Wl)(uHc?J^$h^Zn0s`fw@Vl z0jvQ`3q@*veD(Rju&BQzREG1wOc!>6OZp{DGS^N_R_)umuJFi<7hNxWPqSLZOLG@? zn=#tWh&}uDo~Hkj?bWRP(v$9SZM$djrL2V|K3;jl?uqZNDZFEmzm&?Et7*mF2#PvS LS3j3^P6 z85kHCRPuK{VqjokDGBlm{{R2~|6C2XN(KfNc~2L|kcwMxBN_XiSa6tp_-`M-fFb$# zT#MybUoI(KU$#r#mz782dPvl7WBs35{-TP9)_;>#2&(_hnZQ}Blr-)61J#^6e=f%D z?Uvs8ll#H1u!NNS_20x51m-l{kNlKyWQ~dSue6DO4{(HeXSJ56eY$RBw7YcoJD&~d z?rW|s+9z0jE1pkeOWf|baPGhcr&(+Z=NCQwo}d#`*zkYC)}IX*W@s`#D~aU1!`&#+ zFww6eg=ypZ8++Q>%bR9La#ghz823+GaqGC#3TK!1O(K=8$EW|^*1sV?t3I?nr%||J zY5VKg^SprvR+l*MXW0LvQ}=PC%WhYhM+~pSjHlg6-XW}a%xY`8ab5e9c~@RUn`~`e zKDkNCO7qd@ydZYF_BA_sCtQ7)lh4-@^X;Kew5eIwalxM|d`DPMOiWslvB#C2(&*F}vLYCE3SL z6<#%aykiTC1=Gh8m-}hXxeN#XOsk9NDsfr4_rdiS3*Wr5`DL^vXTP@bVZpHe$3{vQ z+4J-o49xh#zvm<$meQTO?cUjaR~Oy7anM=NXtu24-G86XZ8u8J3Ugr+IPzB}`s_oS zbM}Hlf|>u{zW%V({`~YO+VMi4E@$-Xzg%K05XoxxLx^MYk3IJvdQVsUG0FY=vFSNQ zlYE`;J@S6m@F!xy`kGGr&r6pu?*AzizHiF&-}(EFOw~91`D*?Tq06%j{yy?HudaLO zo%uZC-V<-1n`P%~G!L7xJy}`t$h(8@+SxbpKPIhPZq%N;?~2v$%E#V0M^o=T^Zxen z!_vdk`Qoi=UVd1*SpVW!TS2*Umai zeLwtQ(I?eEieV?YUYzmi;)?I8s^)vgy8GkOI+ojg1qXc0#A`a)_PKm-u6^MBFFom@ zH@Du0L(`vCempmw?YHhelNzuqH6?e^mUU^S>r_$=&~=DjI6{(pznH z&4uYg8=rXZnWQaa_|kjfggdVt8aZk;#pajJJT0(fsg>F+i||jXrpvGW=fAe)!t@o& z8nvv!leX>)5ft<|vj5t2t3?s^uf0=wXa5R%k{uuaO7h<_{fif;|GWR|lKmVGT{A(I RjGdq&#M9N!Wt~$(698NfJZAs^ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/sandslash/shiny.pal b/gfx/pokemon/sandslash/shiny.pal new file mode 100644 index 0000000..db58412 --- /dev/null +++ b/gfx/pokemon/sandslash/shiny.pal @@ -0,0 +1,4 @@ + + RGB 16, 18, 04 + RGB 21, 06, 01 + diff --git a/gfx/pokemon/scizor/anim.asm b/gfx/pokemon/scizor/anim.asm new file mode 100644 index 0000000..9edfaa9 --- /dev/null +++ b/gfx/pokemon/scizor/anim.asm @@ -0,0 +1,9 @@ + frame 0, 06 + frame 5, 22 + setrepeat 3 + frame 2, 06 + frame 1, 06 + frame 3, 06 + dorepeat 3 + frame 6, 18 + endanim diff --git a/gfx/pokemon/scizor/anim_idle.asm b/gfx/pokemon/scizor/anim_idle.asm new file mode 100644 index 0000000..cf66cab --- /dev/null +++ b/gfx/pokemon/scizor/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 4, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/scizor/back.png b/gfx/pokemon/scizor/back.png new file mode 100644 index 0000000000000000000000000000000000000000..53cef907e5e4ced5ff1261949dccc3a3205a841f GIT binary patch literal 450 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f6d9s(kYvP zf#KAhZ3PSr3@jx6$|Noz>;a17Oz?kUi;uunK>+RIQNz95IE{*&C&n0X1BNQPfm1>2p5#Ya{4G45vVbJ+SoA*tI~L6RZesW`tu;2vYYhtY&i zVFi~-IsvQ2zAG}{Xw13T(0)U96YE;(cA4Oly9A1z_Iz;jV0~jN%E8B>w{+X31yME3 z6;p4lpWV9U(g8>N%`No_M-NFv7tiV5F=KDlZiBhJ6+LtG{(trmXM248&fjB9KF{sg zy7C0y_OEN1+bt^)EF8~}@MJf`&O7H$R5JeE^>%L2R`bxn+*L(J0;gEd=@yrq=5u*j z$WXA($yVia%3Y2v$)Qbu{@Blo-lV%t{;F|+&&2!x8TQMtXHDz7@5sQwz~JfX=d#Wz Gp$P!ZTEWo( literal 0 HcmV?d00001 diff --git a/gfx/pokemon/scizor/front.png b/gfx/pokemon/scizor/front.png new file mode 100644 index 0000000000000000000000000000000000000000..2adfb879f4089ce406b9afe3d3e04418d85ebeff GIT binary patch literal 1710 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dVC>*vW?*1YetP*W0|Nt3fKQ0)|NsB5IXPK6 zWiv1^oVv5EfPsO5r6kBN`2YX^|8q6mDj68qd_7$pLn>~)jp@uwvE2oMaE-Q%acT@i;e+85{KGp*WcI>~5~n!?B1Tk>>L zC(CCr1l7Ib^H4Bc;h+$9hjGR)x10%$@;>!#Iqx`p*z6seIQ!~l8dW-2martV9Fmke*%t){ga)AU=IY#xeu$X-YaX!vvTUe-=L(B2iG!c4gYD zDYps~yLO-av7doiQy`@FVAJo0OCdrDO-wr;+Z{jW-F&6}hje(%uLP!`?$dhZY+~V8 z`ON%ESc39oJ{6fTGH*9*+_yo+Au`E4CNqcW*tYK36Md37Q)DJ7Kj8>q<}f&LDu7|r z8jaR@R&$=tz2USv*jst>>wvH1OEFdvt+T&D5>I<5?<BBiTi6nfRz-R8OenDq%lFV+4tGc0Aw#xNAEac&PEA6ggwqvzt=aL)SSld;m zTdbXR-;&8Q>{!|!{@o6DR3GhGJV$8iTa%ZFURMy=d9Cxam^#`vyRSQ4MUOZ2@) zHgVJ3naVGCLYghZbIm{esq}nx%$EJnHnsds*L)eHHwB(_UGe0M;+MD2{Z1EGH_tk< z=Z&Uisx#xUiwQn|XSc0pP|nryQcnLAF|Dc0knh^QgG*$B)n83}UN_5H>D<}tubE^G zzCCk#DjS_(edAW#Lh}r#$G4ss%-EGQrCi6SO|ibW(rJQlrJ?6(<>pftUtQTKoOW;H z*^pP){F{>5*X=p{WIxNQ9J|ka(N4?>Ph{2Zbd^UWWZz4)u#Nc4$DMc9I`4JydFz}V zrtdd=WQT-;#ruML5BEGi|62C=hAr#LKV%v_dRLJf|Ng-o^*LRfzpIWH_~orFU*hsI zqbU6S1D>}LKO(MKtNc8+GilSB@(Trba@Up%ggH3xO}0|se$9GWaZ&c(WIGV^S#eSF zUT6Nb+8-9)6BKl|RX4w8y<<{~#gdL`RqhM^&AAivK7&o{aE#1r**&wjao>!2Kf_3> zcyIE|y%DcuqnnCWm%l0aUUgin+32eEwVl(K-rM*re_B=hXFi0xH(I&=XUg!am8*2` zNO>l!y8HD0f6F#=U0k<0skyiG&!WwfSkA24eChFhz0kU=k)r;luh&TFFAkp@%53s# z&92Xdk5Voy+C1ylshwA2)2}WJGV2t3xnx*oz zfAzUl+Hy~X`aILG`YOGxJnogAx~g2KBtXId-UDTemm_uGmrrm_H@){hpt*eR)kk&hzUiiS z-Ulpj1nHQ#_sfdST!~sqH%h|(-mK`A4WApjS)u(x)y2rr@R!VoV$-*J+VfhizWcEG z{`-p6nVp@(&vgsUA^6Xj;q)2ooBl1U)E>rb4BZ}Mh4o>t-lia(YgL| vt<7Uww^X?>Pnr z28LagW#<_f7+6Yz{DS}g|NlQ%!>y8mficC?#WAGf*4wG47admMaB2Pdzkc5->CXnM z*RAU|$+h6)nB4bqf8Fi|eZwi=P5O>-@ju~SaBfQnqh9L`rl{VY-6SQGa2+}jp5 z?@!owR>{EA+4^341patjF$-@EXOKO(vFlpCga51AG(i@l`Kvp&Nxot`B-Ve|cbBfn zgoE3%9(;^F{K&&cHmu{$*YKQY(}ilMUEta(c}z`V-}2p)**h8L?RA@3XJ+zx8(aD2 zo0=inrVIwXFJg2{n6HGHiKXNk7%ybfe0V%zpFMMS+e~HEYQ|@gyZnuv`zn5}c^t*k z7O!g8;CF{Hx`z3IY6`D-qniTzWlrH8?9aT}rUmuGjM z-#Z`j?&cZ+=dcD<1DAuv22yWZ=WUzJWmIQZ*qTxJ`KA1tqinlx39S4GiU&_uKbLh* G2~7aFuf34~ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/scyther/front.png b/gfx/pokemon/scyther/front.png new file mode 100644 index 0000000000000000000000000000000000000000..088adc5a47664c82a4d8195a0d4a1240bf8bedea GIT binary patch literal 1352 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dVC>*vW?*1YetP*W0|Nt3fKQ0)|NsB1uQBXB z$H2hAu&c7{JOcv*OG%Jl@c;k+|L1DBRWdNJJoj{Q45_&Fc20El69tYo(SQHz^PVJJ z$T)E4&1K!Z`v3Igf@b>HXp2eEsygPFu(3w~Au7zcZ=b z4qmnOP={xxr!w!)RbH36rqq`17VesQZ(rHVZ7uCVEmKw2HcUAC+TLMm&Z%n`^S`o6 zw9V$op8CB&^WyadDaCtDYCZ>Td7=|m_m%Nml>NsUK1zJ2dN=nMws1_}9CCV>xuw_2 z*o-^M<~etxOulO0`XgfUrr0>@basDCQdq!Wl?N^_d1A|aT&|d1xL33N#GxYYqgGok zDY32or5U7o?5y(Fx-jk)?M|Cc^uB2`oh7#SAM1e$%h&S1jNH?DMe+U0hJQ7-YkU`d z%M@5RIl=Pv3686`8h`B4TkusOL;FkIj^h{qCNI>s)t$_slAXZ%^6t)Lm0Jf{_)Uek z@``d9Ja^Qc=gj@vn(_jI{%YVof24*R{NqTB7m-4@; zZ`rw&dtrp4`<{qZHXj1-7zzumI(W&tsr78&JKvce6V#b!GGA4ACBNn3#Mr0mIl+$< zj#%1Nsdl?~&77ihBr|Jz;i9v~ZtYyh*K`VrTzzuFa?J+rLLN`CEZvj;lyk(Ly>CLYWcNztE#+!Ud1U6;nojo9p3@b@^616NHPdtIvN!g;cRHC}Zc-e-{?Z+V zB^y^tHq8#}j`*2XEqK;pkijK;gb#lS9wxhEh!vY#u?GHJ6Ou6$hzR*3!vans(;C<9_(#PEsNWYE?K{9h`l;_^OZGiB{f>j=Vawxu9+%$Y34=eorl%u2Cll(D0pe- z(rMOCOEy2~Gk9sU<8ea?+dB)zxs39D9?#?YUhWEx`>Jv|Y)|#&PJ`G7T+1K4-D!UE z?aoabN?Jn4@$Dz?6tu_w z-(kG&A>YN!Ijm~7v3IX6w!B-w9{u{xL$hT5{&Vvi`Q_N&Ie2?tTp8>3W0v(cr|H() z8p#fm!{znUD9J>SPublgk)QD3{>8QEao$9Fz%ka)&7U1X9q2%g({ z*oZ;yS5-bs%g*E{?ZWS7Of7t8@TBmBEc0fW!sAP99`qf&t^97s$;UISz2f)C7Pm+8 ztCqiMk>A05Ht#57c}9NCBfhAB&rN}Belx5q-u*u&`%7@oT}_^+`fU`uv%NtM6J$Y=Yy?L8c`pf+DktYot zj$giNsU7KY!s^MJIa6oZ*ruya`Sx^b^f- z=U(zX@z(o}+WA+D_CIc5YWv$~%yr`ZW~)bif9zIIx}QE3YWBzPJ07!}1Y17uacjH@ PDhfSa{an^LB{Ts5zf_tO literal 0 HcmV?d00001 diff --git a/gfx/pokemon/scyther/shiny.pal b/gfx/pokemon/scyther/shiny.pal new file mode 100644 index 0000000..550d6de --- /dev/null +++ b/gfx/pokemon/scyther/shiny.pal @@ -0,0 +1,4 @@ + + RGB 17, 24, 00 + RGB 28, 09, 00 + diff --git a/gfx/pokemon/seadra/anim.asm b/gfx/pokemon/seadra/anim.asm new file mode 100644 index 0000000..b5e4aa4 --- /dev/null +++ b/gfx/pokemon/seadra/anim.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 0, 10 + frame 1, 10 + frame 2, 10 + dorepeat 1 + endanim diff --git a/gfx/pokemon/seadra/anim_idle.asm b/gfx/pokemon/seadra/anim_idle.asm new file mode 100644 index 0000000..34165fe --- /dev/null +++ b/gfx/pokemon/seadra/anim_idle.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 0, 10 + frame 1, 10 + frame 3, 10 + dorepeat 1 + endanim diff --git a/gfx/pokemon/seadra/back.png b/gfx/pokemon/seadra/back.png new file mode 100644 index 0000000000000000000000000000000000000000..45ea0bd9065aa2fd0945db134d263759f107c280 GIT binary patch literal 508 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|9oqUSId6} z28IHYgHIS37+6Yz{DS}g|NlQ%!>y8mfpNB{i(^Q|t*ui%%Z@1UxGa42ubfXx@Wv-^ zv5$-19{Z)m%hCUlU;JN2`@#5IpYs`xuNM_y>Hi(B)3qkPhB@V!Qa{rRW2pv)9Xgs! z3-oIk(hROwJNQa&H)EF)Xt{rZ`OzANvi~e$e~dYH9Wgf$ig@{c!Vk_j3xqPby*W?L z-OR+_RMok<^W>JC#+v0^#;3g0J}BI=XZcX{>(}C-NTyVkmmN;q?=7xeW4d9<){{MU zE>^eKx5ZgM_tiTwu|;^}c3uP4H?c`~mCYG{i5iOD)>+7(m!)v3B&TO?d#~q~v(sf6 z^nORI=+)yYx0zncaE)ULi~Bi2{{-P%J9M7NS@S2@Fl;P$db|2@vQA$0`?3bYJE7y-!?1;@iH) zHXgaS)g$urtc-KhCoj;<(A_0`lJEUY>9cQcUgs1~aA7_&Z)SVbksD7K?l5^@O0N2! z6USucGx@!PT*MmFNvl@1KNF5)k@yySzaeYBv6?)WnS*Bo>%r64U$KAs$So-I{&PG7 P0|SGntDnm{r-UW|{OsH7 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/seadra/front.png b/gfx/pokemon/seadra/front.png new file mode 100644 index 0000000000000000000000000000000000000000..00a2a827d202f59bac11caea7fc758917f76eb50 GIT binary patch literal 791 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*w+8L>!r^e{5;+^^`!Sy2@<$s|KUX~~C;5=C~YJaqwwMgN;L zztQ-Z+K^@NGOGI z{4aUQD;>XKoWj_&=UJs-R8hCh3m<{4+g?l;>X})*Ff=uDmec&q*$Mx{mMH=GqFeM9oZHh40Ls-fNAk-PotwZLxIm ziA*S3kQR_7Ww`w8)Ghm-XHF?-`20ce>pI4qxUxv`>C9KAO{`%Lzp#Fxw|{N&Zk|>A z62(wz@Maj%bi_fMD8|H~f7HGNOW_T{suYt7wJ*~u%u z=g6MI!``PJJXp$?>K8ZZkc+wg*S7ahm(F@NbNaM%zZ$0-d{3KG$(gNh|LIcA9G1>) zPgR}oze@QW^yG87(VI$7zHgO(bK|tyBPRw&@M`OS+_LComzw@ZX`bdM+xCRKOpon4 z{8#9j7HdxB$#-*R|6Uq9|Lz_Ax3e}`S-8jD`g-x(I^FNyxBJw0q} zf5|h|$8|4__0KlEf4KBv-O1zL2Ocjy?p@zKy^i5Su+p)O<{uU_FfcH9y85}Sb4q9e E01|6|g8%>k literal 0 HcmV?d00001 diff --git a/gfx/pokemon/seadra/shiny.pal b/gfx/pokemon/seadra/shiny.pal new file mode 100644 index 0000000..7dab3b2 --- /dev/null +++ b/gfx/pokemon/seadra/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 11, 27 + RGB 10, 04, 29 + diff --git a/gfx/pokemon/seaking/anim.asm b/gfx/pokemon/seaking/anim.asm new file mode 100644 index 0000000..76dec6e --- /dev/null +++ b/gfx/pokemon/seaking/anim.asm @@ -0,0 +1,6 @@ + setrepeat 3 + frame 0, 12 + frame 1, 12 + frame 2, 12 + dorepeat 1 + endanim diff --git a/gfx/pokemon/seaking/anim_idle.asm b/gfx/pokemon/seaking/anim_idle.asm new file mode 100644 index 0000000..ec0b060 --- /dev/null +++ b/gfx/pokemon/seaking/anim_idle.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 0, 15 + frame 3, 15 + frame 4, 15 + dorepeat 1 + endanim diff --git a/gfx/pokemon/seaking/back.png b/gfx/pokemon/seaking/back.png new file mode 100644 index 0000000000000000000000000000000000000000..121608b9f5d075e4be43beb230b5342f76e2c026 GIT binary patch literal 476 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7KWFRr|3Lx_ z3=Fbw__-Mv7+6Yz{DS}g|NlQ%!>y8mfw9`t#WAGf*4wGKCovgvxHSIzUw_Ypr$utn z((`$1ioD())@@Mw|NJnKjOoSys#a zx2JRK3^S9?uK^z-wCB$G($ji;TG`yt1UI2m&CK5q2wyw<_O|riDjh}troKHl)DO&I zkP>WsxQ3shLf~F3yTYoO5Az$I#vjn0GLAfzNC~dya3@Z1ojvBdc~j)mg+`@bv4;i+6Qa^6h>5WHtMD+Z!A9 za{j9H<4}IJY;(ZPfSS8S5AMz=QRwj4d;RMAi4HHcr!kdf-u|+aS3Pg(8s(k5`u3}x z1fK<5^EqO6<%<4-)Pf7$rtJIFEmU5s*Rr0tCnGgm$<3-mcG~aUZvL$TT^YVD3X2S` zZCfw0p_5x+_j}Kt9UfcMP8uyzI@PVAbS!XV`@yphzoj2bKehT&Rc~W|-kX^@{Jyrb kTU#pTb_70W|H*vp5l8J7^D~DT7#J8lUHx3vIVCg!0H+n&O#lD@ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/seaking/front.png b/gfx/pokemon/seaking/front.png new file mode 100644 index 0000000000000000000000000000000000000000..7b06f5a27d45f3ec69d69c72b9b58ed2745585d3 GIT binary patch literal 1174 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsAUwtoK~ zB*4JHAp3@&n}LCWr6kBN`2YX^|8q6mDj679Og&v3Ln>~)oyD1V#DK%KvHricIoo5^ zdqUp9zM;#rtc}m|OMLj0CETmWc#B_9Z&uue+wY9R`%8;zjSZtBtKM8txb9`b$J-L4 z?dabc*!izl!hE9l)8N=|S89B}-%Q_pV+LD}Sm4VFsgSFTRpE*C3yr&@)Xp3%SUZRF z@co;ut!-aF?{wX~^iaY6z1O~94tiQMQ_6Fv(68QauRAX^HMwQvX9~!8JEku9Fw4D^ zx#ELYc;Lw@(T*jLj8@z{9Vl-+_X?xvceDGE+b>P3yBp5Ed46Ce|C^ytp zrOI7v$s#Yu>{We!OM{n2O}SxvY_53k1)VO@^8s8J^@Cl)-?|FU=(BpIVs6m3A|T4C z`mR9GkC{!{JL9)EPo3Z@FxBYSY@?f!6A}wMrcE$eb^7XUo;8M_mYTe-+4IRSsI)I= z`mJ)|MVF7A+Nxx9&0)vM*~@nYIJ`{vYva`XJ+oxro(C(oa9;e(@Ubr?@NDLp;`lRG zncEBO6?Zb<<8rUbD{MZvUPWXk|1Zmqu-80}f=h3vJUnR--fSS|uahUaZvUo9SMs~F z*3Af8?e7|EHqTwwXPvy6#kETo23J}a@0xM=!=2ZmQLCmhhrW1RvO4GdLR~ux9`@~8 zd$~?7N}TFG#rs^8cvooc-si5~0RdGH+}5sYU90x{a?*)P4awPxi$Z&!UEOqH(!(!n zQ)evmnE1nN#nL`+fBDk5sY1&&Cm!vZmGoTyUbI}qi?^+2U;U@vn6!7_u{({i?-ta) zo1qu6{LaRR=-{Z^HqWM7mivS~ooRjH@<+Au59vFZx15$;a9CFU8Q;CfeS#a->^RK1 zXeOuForke+Cxp?HO`3~kS$7OFk>Z^*VJt+G{e+TpKI~Qkm&nt4jYrAijwZr~1 zvI}hAG2|Ay`#ti0x8VO#*(Td}9~@tpmcO{Lqq2LpSUl;|v_G>W zSyiU!c!0(8zKI_e|CU|9Gdbk(`R~?cJDUG9mVeMI|I`1sZ`)k|or^Vh9+qvl-Z#(s z%FXY01dG3z?_l2jTXt7y!ow}O{c`0i)?bQFRZu$8V0~eJV6cYz9m9K{c1&4vZt5LD zRj18NTF-ilR_-~@|LN|T!gG;xi^HDJxoVkSiq4F$IG45WzM*Bh>D~7;=4{^7b<;9^ zscP}LNZEH5cM5krE;#(bN~PV literal 0 HcmV?d00001 diff --git a/gfx/pokemon/seaking/shiny.pal b/gfx/pokemon/seaking/shiny.pal new file mode 100644 index 0000000..be7291e --- /dev/null +++ b/gfx/pokemon/seaking/shiny.pal @@ -0,0 +1,4 @@ + + RGB 21, 27, 18 + RGB 26, 22, 02 + diff --git a/gfx/pokemon/seel/anim.asm b/gfx/pokemon/seel/anim.asm new file mode 100644 index 0000000..bb98ac0 --- /dev/null +++ b/gfx/pokemon/seel/anim.asm @@ -0,0 +1,7 @@ + frame 0, 06 + frame 2, 32 + setrepeat 2 + frame 0, 10 + frame 1, 10 + dorepeat 3 + endanim diff --git a/gfx/pokemon/seel/anim_idle.asm b/gfx/pokemon/seel/anim_idle.asm new file mode 100644 index 0000000..ef45619 --- /dev/null +++ b/gfx/pokemon/seel/anim_idle.asm @@ -0,0 +1,6 @@ + frame 2, 12 + setrepeat 2 + frame 0, 06 + frame 3, 06 + dorepeat 2 + endanim diff --git a/gfx/pokemon/seel/back.png b/gfx/pokemon/seel/back.png new file mode 100644 index 0000000000000000000000000000000000000000..45c050d447c1d5f6cf8d2825574455ebc8f1beb4 GIT binary patch literal 375 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7KWFX#_g>iy z3=DayleRN3FtC&a`33*~|NnokhFc{A1EZLyi(^Q|t-Dj*#SSa*xR~a@tABpvSlIN_ zdipv+3H!J>6hFOZR*7G^eLdsNoS&*Y?0K1vsj_fR;56-PHCV$i^MTQ3yZzZ`o(VDh z-yCuKnZ)yoh3?krl1~aQp1HYfZRoMH3|)e=tSXPc+iTHLHHGH}!)}3Ru@9eamSH+% zV4KBc-C*;`M{`N(mn*WCDe1l@TUSkWQRnA={6OR=?}tB={>nM*@u^~C6TafCH{H+T zCF|e0?-?^W`3w!GXs+G6@U_pY%fi>L?W)~iCeBrmR~OW|y6olbnY%?KIJY%$bMIXE zrJ<{+NAr%0$?{^x1Ly8DEYY3E7R}yN-NbLpFVdQ&MBb@0GDi;#Q*>R literal 0 HcmV?d00001 diff --git a/gfx/pokemon/seel/front.png b/gfx/pokemon/seel/front.png new file mode 100644 index 0000000000000000000000000000000000000000..a25d50d2f0ccd46f9d8c8dcdec6e39c4ee0a845b GIT binary patch literal 808 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*)5n+*`1iaDsOU9J5Ol#|E~gl%k|c6O6T}w>>!>}cIj@6Zvz&3|}QI7uEN39O5;weId2tG=B@r>~4SUftY zQfZJ=-cXY%)RMm5^v~ysDgo0h|C?R?+MxHETPsgeLFcJ+X-TPf!_u%R3K`X_qcq%_ z=Q^)BweVij62q<9C9J)hmYIE?X!(Z0fm^louIQJ`s!n+qm6J~G7CP&hG&z!m`{jvU z^-JVDI-DL&SkW-m*uq40S!!iZ!OKVK4jI)k#og%+Ii6`}nyyYdWhxW5L0N@?GvU?| zn=Lc!J!<--LQcqWw-t1P27(`E%&*H&(X$5oa@I?b=Zh zcU*?=Ge;orp=owop6YFh*~}>YQJwX!*1ts#Mkibucp6L}sKm3HuooPBsnH+C8W7OX zy069T&AxY!W1Q&JU88H?VFa& z8?D=(dEZexsC3tBeGRA9d8r1|_@E}!tVKtrC;U0vexgfXcKK(S^wfPNb6aNX=fW)i zJ43&hHT=1E@`SpF-mx#-Yc#(q{kDCV`u5%Z$KU>5+82MT=4JnfrS+R5Bn86F46ZUT PFfe$!`njxgN@xNA1R-{p literal 0 HcmV?d00001 diff --git a/gfx/pokemon/seel/shiny.pal b/gfx/pokemon/seel/shiny.pal new file mode 100644 index 0000000..bee9817 --- /dev/null +++ b/gfx/pokemon/seel/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 19, 22 + RGB 29, 07, 05 + diff --git a/gfx/pokemon/sentret/anim.asm b/gfx/pokemon/sentret/anim.asm new file mode 100644 index 0000000..3a5d023 --- /dev/null +++ b/gfx/pokemon/sentret/anim.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 15 + frame 1, 15 + dorepeat 1 + endanim diff --git a/gfx/pokemon/sentret/anim_idle.asm b/gfx/pokemon/sentret/anim_idle.asm new file mode 100644 index 0000000..56d5ae8 --- /dev/null +++ b/gfx/pokemon/sentret/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 07 + frame 2, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/sentret/back.png b/gfx/pokemon/sentret/back.png new file mode 100644 index 0000000000000000000000000000000000000000..ce452af47418422c9bd0b77f99d0e5c4149198e8 GIT binary patch literal 360 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zqLB3+ES5$ zfgvkYHj{yYfu$tKFZloe|NnC}+$tFu7}-5t978H@9i8@;@2~=gYvb>K?`;ldz5bs2 zzb9qp$#W|cLe(y@H5`xVV>EU?`1-?v#eA9zANo5faS6YwY|^@6Ys0zs6vxkxEbmiN z)_HN+wf@{La`AKjLuZSRwb*mZ?l-;g^!>(|TNR0)VlF0~`7ZKj zx#au6)73Wd>rzUyUL+{2x-4pcO-?fRXXgYv@2Z%XmId`9$F{eJeDO|9KeLU!%yO^j zv)}ot2|EvN6eweF@_WA8z_9OnkLmh38R{=RR+UdW;?%iYsIa5>^~0bl?I(*vSd_a8 zj%`YqA|M`;w|&8n9RW2{FZ@%z5vF+P>!kBe&rbeX{Qq<*=VhnPsUMlAE3yWtd6~;G QFfcH9y85}Sb4q9e0H&&)<^TWy literal 0 HcmV?d00001 diff --git a/gfx/pokemon/sentret/front.png b/gfx/pokemon/sentret/front.png new file mode 100644 index 0000000000000000000000000000000000000000..6e080188acd00b37f142b3a95be04498be905504 GIT binary patch literal 546 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{V3@$c%)r1jVfd0VkJeLM1q>U$mR&f$a})oHxOldM zf)1$7z zxL-6gcBAjPh~BKC+S?4yo0PuR>hLxgW-eQ`uTSD$zc=#-wP{Oy{Tka|=hcMH zxeeD^f9y+S+4L#oMrZYbC%Sbio=LUkOpIKmOs7_zIm_q$YBxj0l#~WPm9&|=<@D#6 z6;?d#*#4>Y?BY|rs*g{eF-Vn}rXAeZvt5~4X66DH;ZGY1xZGbK{Ci#~=yzPe0{uQ6 zjy1Ori@Uo`ufFx?(8-ChJhAI!Za&>%|KLQOX~f4Xp4TSovSiJ;)VJnOvU^(HOHX&U ze97YVTXt0*O86<*KL71u{lZ)NiU(%bbzZJ}S^40-?9Ge%j#u~mQr%)<|9JYhzn8A> zko4RoDS1!vt<7-{O?L){=vP zf#I!n-AV=q29}Z_zu^D>|Nqa`aI0isU~KSoaSW-rb#~hAO-l?oTpR!X|8L{8L#-<6 ze%q>bVcEHgEFCWY8ySBb`~7}$gT2N9@&ADb@>!U+i}UrQnn&`@6TW(*`|;BUzaCd} zD%e!={nK0b`sv*5*^kl>R^5?piBo%j@$H_Rq%Ct>o~M>47~QNmSCP~C?L|BD(JAUD zr{Ae?j$S3{TgQ>s6=o39v|rii=&s4f<_jjSu6RE4hn*6~JC>93f}AR5I=}pP{J6}x zrA?OC@o_%OYU4ErmsVS_&W&g4jeFQ}`_z(I8hIK~q8npMs$$jU-$!W|@E0t3v@^&! zOG2b6!>hyQ7M?N7Q?qeP zQ)tNQmX+Jiw#R+UzP=-A(yG^6Om!}0rM%iB)W0nH<0PRJ=96u=_uOFd*;yXtA$|Vn z_Cs9ayP4%!TV`F_S?=!e_U-eR9h3PF9-c6N56l0Wo{a5LNiyHneiVM&s&)AN<~>iJ o-rf0rGw*wQVY@p2nho`=TRB2ff3UDJFfcH9y85}Sb4q9e0Fx=%z5oCK literal 0 HcmV?d00001 diff --git a/gfx/pokemon/shellder/front.png b/gfx/pokemon/shellder/front.png new file mode 100644 index 0000000000000000000000000000000000000000..ff863bb560414a82f96223cfe8514d1293a1fa20 GIT binary patch literal 605 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsBDIAyQ3 z|LbcLS#+^OSj%}X<+ZTqc^?Opjb_JHP zBzMNWf7Nir#(vW)(WDuv3z8eQC|l+PE(u6mf61+Jd0J6;Kq3?G?3WF(sjuqGmdSFh zC@nYi zJ4|j-em2e@zO;S5#_U?sq`Oz5@azgEDGRyjmn|+`#f7~Kk{=rQBYnQ~U-u?Nm!T?G)u6{1-oD!M< DwzM2~ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/shellder/shiny.pal b/gfx/pokemon/shellder/shiny.pal new file mode 100644 index 0000000..21c389b --- /dev/null +++ b/gfx/pokemon/shellder/shiny.pal @@ -0,0 +1,4 @@ + + RGB 24, 17, 07 + RGB 21, 09, 04 + diff --git a/gfx/pokemon/shuckle/anim.asm b/gfx/pokemon/shuckle/anim.asm new file mode 100644 index 0000000..56b9624 --- /dev/null +++ b/gfx/pokemon/shuckle/anim.asm @@ -0,0 +1,9 @@ + frame 1, 07 + frame 2, 07 + frame 3, 12 + frame 1, 07 + setrepeat 2 + frame 0, 05 + frame 4, 05 + dorepeat 5 + endanim diff --git a/gfx/pokemon/shuckle/anim_idle.asm b/gfx/pokemon/shuckle/anim_idle.asm new file mode 100644 index 0000000..936e90e --- /dev/null +++ b/gfx/pokemon/shuckle/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 4, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/shuckle/back.png b/gfx/pokemon/shuckle/back.png new file mode 100644 index 0000000000000000000000000000000000000000..9e38480d77114a8f68ad1a5f57cd5aafa238e0a4 GIT binary patch literal 342 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|9`9IT15#4 z28Nw=7wZ@p7+6Yz{DMK^xf*Vj3=9lkJzX3_DsH` z?CLIjnc)7PwP6!$!C&#Hoor@q(Munk>u$GaI(YejFT1aheo=RxTI3 zZCLB@CS~Jx+gJCMo%aS+Fr9vv<$KSn)~?9y!&aGV?=IhcGehw6jvy5-Wf@InR<~C< zJrWmdTXtVkf8KAlV$OjTW`CC+nl`6>fyC9B7dC#$Tetf}?ET*h#1vSU&6S%}{5pO9 vwN*P-3As=0SG7oUm=bP0l+XkKSx=LM literal 0 HcmV?d00001 diff --git a/gfx/pokemon/shuckle/front.png b/gfx/pokemon/shuckle/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5220fe21dc636d0770d2d1abc6d8928d8b2c7569 GIT binary patch literal 633 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsC0Z`E9@ zD8azMu(R%B9RmXcOG%JlFi1RC!>y8mfl0#C#WAGf*4vr4iw-OBxJ>-^|NqWuVO-xN znE5@e-g+4Oz9~54%8_fhw)S2K;|nR~{f(B_yHmYZb!^U13Kj~JtM}d@eUBmT=1$@a&y@F0z%EbJ7vnFG8;yww{-h50}tklxOpNS{oDNSv@Dk;@D2>&IdJX zdcSTq-Vr)OCGhHxBc?H?CrcLe`|R=hGE=x|jk2EU`o5s=vdRwrb5EyNBpau`RA}no z_sxB>3yY_V`tT`CiZ@s?vpOP`_zDpbr9L3_k?>>F%=u&Nu)4MNsv7~iY#6^AcmDc-X z=944+=@x65b6V69^=(HU3oDqlW=r3>Ao<*^M9t{nvU46UeIW2={q)zB0n5)BtW0oD ze{eE&rEyGI_T0`j8y6aL>Xkm55+i0cdF8^AWgxg_P06#>R*&;$yyB5%t>0^NS<+zc zLE$eh=?tC$&#WfD&Flin7LUWnf@n@O1TaS?83{1OTYAB)R|q literal 0 HcmV?d00001 diff --git a/gfx/pokemon/shuckle/shiny.pal b/gfx/pokemon/shuckle/shiny.pal new file mode 100644 index 0000000..63b3644 --- /dev/null +++ b/gfx/pokemon/shuckle/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 22, 05 + RGB 15, 07, 31 + diff --git a/gfx/pokemon/skarmory/anim.asm b/gfx/pokemon/skarmory/anim.asm new file mode 100644 index 0000000..315ad5e --- /dev/null +++ b/gfx/pokemon/skarmory/anim.asm @@ -0,0 +1,6 @@ + setrepeat 3 + frame 1, 09 + frame 2, 09 + dorepeat 1 + frame 1, 08 + endanim diff --git a/gfx/pokemon/skarmory/anim_idle.asm b/gfx/pokemon/skarmory/anim_idle.asm new file mode 100644 index 0000000..4cf1be2 --- /dev/null +++ b/gfx/pokemon/skarmory/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 1, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/skarmory/back.png b/gfx/pokemon/skarmory/back.png new file mode 100644 index 0000000000000000000000000000000000000000..7005cb3368cc449e793f49f6c4573ca53843725e GIT binary patch literal 367 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7KPUTtkEJ35 z1A|z2Gf14JB*-uL|NsC0b2Z#585kJ(JY5_^DsF9^dRwU3fWxKn@BjL|9V%O;lCRBN z_RaM>hYEMs7gmm~v+igdaS8EsvSd0WB-o^A#Nv3t;pvg~8|rb)U9q!61Xtxvmd$D@ zaA~^5##L$Xg#W@y)}*p)&o|wkceS#ad~ zBGcC2?Kc)1$Oa`fYKCGV0oicDm`7)~_wRGhcnJ%~ V*DL(185kHCJYD@<);T3K0RY!>ni>EA literal 0 HcmV?d00001 diff --git a/gfx/pokemon/skarmory/front.png b/gfx/pokemon/skarmory/front.png new file mode 100644 index 0000000000000000000000000000000000000000..68e39d93dc39782875f03d18a6d9ba94c6f82c0f GIT binary patch literal 1108 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU|7My%)r3VWOp~8fq{W1z$e7@|NsAUvj6v3 zDl#xIh=n(AWnf@nDGBlm{{R2~|6C2XN(Khz&z>%hAr-gY&b;0CM2p9D?J=fw7Rmx zK26Lvf71B2H{y{^VPyLxKGyR3fD0C@q?e>TO0xFwCG%HZQg$I;;E?| z4tuXXeR{xdhg5M%^`YK`XA`bpd|UXKspz4N-9ay@TV@6Kctfgdt#_z=PvvNKoKD-F)Yl z{1KHYGCMq{-CzIkoV91_o~>%@y!vI@tFon&D)laKK0PY% z!N^E^+3jeau-aMSXMzn3Ru{OdXx!|+Rgn^ulk#rDm8uKxzZS=fT=Yh~P-xmRbdc6{A_qI#QTW@hAXwOrAORTtScQ}6y-`$FJC(pimj*S~(%w0@!Y zr2P8N%g^7Rw$m3nzL+g11Z^h?^G&;K^-`L4yT z|9=OS-;jE{seYk#j{4naJKuTS{j=QK?(WBzeg5S&yB=Sbo&WB~`qJa}m41(J^pzYJ z+_t)X<7QLgXS)L;pC#s$vsW%nYlF$2&}o(35vA>SULKq2EAsP#K&{rp#0}q1 zHqTxrueNKkx9qH)lKbpR+&yGx?VP!P&#GO@OZqlwzLyPA>1;D7MlkL)thipn|} SOsWhF3=E#GelF{r5}E*lsULIz literal 0 HcmV?d00001 diff --git a/gfx/pokemon/skarmory/shiny.pal b/gfx/pokemon/skarmory/shiny.pal new file mode 100644 index 0000000..80c5355 --- /dev/null +++ b/gfx/pokemon/skarmory/shiny.pal @@ -0,0 +1,4 @@ + + RGB 18, 22, 13 + RGB 05, 15, 01 + diff --git a/gfx/pokemon/skiploom/anim.asm b/gfx/pokemon/skiploom/anim.asm new file mode 100644 index 0000000..6b4f9f7 --- /dev/null +++ b/gfx/pokemon/skiploom/anim.asm @@ -0,0 +1,5 @@ + frame 0, 04 + frame 1, 10 + frame 2, 14 + frame 3, 14 + endanim diff --git a/gfx/pokemon/skiploom/anim_idle.asm b/gfx/pokemon/skiploom/anim_idle.asm new file mode 100644 index 0000000..b7c3a8f --- /dev/null +++ b/gfx/pokemon/skiploom/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 4, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/skiploom/back.png b/gfx/pokemon/skiploom/back.png new file mode 100644 index 0000000000000000000000000000000000000000..ffe1de9183a625944be70f39032152a05d45f4a8 GIT binary patch literal 405 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|9`8d(-cbv z28MY@&BYiP7+6Yz{DMK^xf*Vj3=E7Wo-U3d6}R4o-WEHoz`^|K|9>0Sk6{ba&r4Tl z<{nZFbpO(SpO0pgxcT*prfyn8VL&*68tA@~t zTx@LXLW`~j!6wGai0ZU z8xJr3cjU9}@%LgIjUTP9SXOlE%!C-j=(mq^#Ol?)UtjW<|L{AG$9vQ7?Pp+MVDNPH Kb6Mw<&;$S`KC-(2 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/skiploom/front.png b/gfx/pokemon/skiploom/front.png new file mode 100644 index 0000000000000000000000000000000000000000..313b5c9f3a4c310ede920bec985c827443f90950 GIT binary patch literal 638 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1#=yY9QWE4B3=+@PaI0isV3PH8aSW-r^>)_lq9Y0%trI{0dmkhCNa``` zZ{^F}Z+xzoSSn>5GEeR}bkC6C?DWHPH5k8beJ?%d$d`N})$@NXpT=$W7hO>!#db8_ zMkw98NBhj0|5^UCN!9P3jl3)po1oyqPVM6D94QyJlJFvAL>i z8M5m=1KspiCB^7He`m98qssATD{WPcu1#&axYX-t{4tkMHxurlKWFN-GMZv`_7xv< zzWBH0-q(dEcEA4Cd`{1Ri|6*zPno-q<$A8$Rxwj)>bDxNv(~ZAlcKvDk1EahpZ@ri zPV&~Avh3l4nRs|K z|BAH6gGY^yd`JqeXA@6cFP;DD(BW9FMe&QC8iZFq*D_YsUB30-JEoYc1(Ejix%Thp zi1^6zPNuJoSQA+r}M{aGit)lnE!~af3Wt(KZ z-(|_$L;#PyMisp@Iz=LA|lIK>~8SBk%>yWF=b;IYOP zjncb*e}ujndi}rTv2Q4$kIp)3TQcd=e${4VcOXs)g&(2rn{4=i> Ql%Nz>% literal 0 HcmV?d00001 diff --git a/gfx/pokemon/skiploom/shiny.pal b/gfx/pokemon/skiploom/shiny.pal new file mode 100644 index 0000000..3165d8e --- /dev/null +++ b/gfx/pokemon/skiploom/shiny.pal @@ -0,0 +1,4 @@ + + RGB 30, 24, 03 + RGB 18, 00, 20 + diff --git a/gfx/pokemon/slowbro/anim.asm b/gfx/pokemon/slowbro/anim.asm new file mode 100644 index 0000000..f2c809e --- /dev/null +++ b/gfx/pokemon/slowbro/anim.asm @@ -0,0 +1,12 @@ + frame 0, 04 + frame 1, 08 + frame 0, 28 + frame 1, 12 + setrepeat 2 + frame 2, 10 + frame 3, 10 + dorepeat 5 + frame 2, 24 + frame 0, 10 + frame 4, 10 + endanim diff --git a/gfx/pokemon/slowbro/anim_idle.asm b/gfx/pokemon/slowbro/anim_idle.asm new file mode 100644 index 0000000..cf66cab --- /dev/null +++ b/gfx/pokemon/slowbro/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 4, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/slowbro/back.png b/gfx/pokemon/slowbro/back.png new file mode 100644 index 0000000000000000000000000000000000000000..10c4b20e301c7493b41f894362338ede1dd0dbc8 GIT binary patch literal 412 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|39cFxhIN& zfnocGt+N;y7+6Yz{DMK^xf*Vj3=E9co-U3d6}R3_@!rO)z~MacP5pV%kIWq3_IzCZ zcEwpykB~+8e=YBB+<&t3meYdQTRZ>U`xTUWnRWL`UYUu9Zp=>kkb5{I?n>b>s89a$`k3|fUmo46xb zF0FHrW9YF{Ua)9${rp+m{W%S-8Z6x=HGDbGdf`SH%h!_A-9puuI~Bvy=5Qwjd`2889sWf zEk7=EK=#wV)t@>=zqlCYK1qpfHPmOi8<_mPrDubfqC_=wV1L292Mzpc-s~M*2OBgQ Q7#J8lUHx3vIVCg!0GkrBE&u=k literal 0 HcmV?d00001 diff --git a/gfx/pokemon/slowbro/front.png b/gfx/pokemon/slowbro/front.png new file mode 100644 index 0000000000000000000000000000000000000000..de0280bbf8790db2ed403b9f1a1fd083cf750ff4 GIT binary patch literal 1204 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV3gosW?*2jYd*S;fq{W1z$e7@|NsC0gL;yC zq8Jz$wr|)vi-CcGr6kBN7$lyn;a17Oz!L1~;uunK>+S59MNhPN+#K)!-v5~)N?`Ww zAOCimF81?Pd-*9*biv~t!N02G4v4dHcCI_gG~v%~HeuB&ex^I?KkY5tu|i{dzQTkF z>u(hK>a91@xpIPQZpplJ2<;v`~OVd0adnT&>wQQnlHM_*Lzy;S5G~3M-PAWC< z34T1^+8E}sg_D*2r2Yj<(FvOW{JXcMZkTe^H+5Z*E<-eDQEjFEV-wT0N(DF6Epc%5{D;mx!D|-tWqO3aa#gb#!)h6^M{1R-kp0G{z?~@YiPl6k-bsXk= zSJtBW;^mo}M{ZsCvEaD!jK5EkxV{=6->vvfWuC>&9hDQjqVE^KZJCg2^0x1%p=$B$ z%;bfyU#F|N*ZrS<;b5_H|Hl&`C5Z~r{E+~$>Yg*y^FzP0>I^RIK(E1q7G`C@+0F-!L4CF=>l z4k=Z=m+ie6(|Pvbq-DM389Q~fvlusJPKw#^kuQkbd+y`-+b>jP_BbDJZaroeZ;&u~ zQ^}MyeD&-z@;Of*IOS>fvU!*5tID}&E1g$%-(*;nTDWWHg852DR!@rD*1TN$)@zc> zZr#g)lgq#OMD(vL+`RQo{#U*iFC8-Z<@OvlNjRrqveK^7-G8m^k=r{}c4WSm^;3{h zHC}n=oHbjc#}&hw9y{y4@||sevYunp-{>i)IQM_G+00Ip&Zs?yZ>{q7 z`RnK@cjlz^nM|Lus&$;xvvlt@PMfgAa^uknr}OtL4xKUWj#RVVyFJd#H43rO{`W3U z?&AISM7H$ltF?l=%ZxhKmKTV#=Xp%;P2JasjzilpmVf!=u-ow88 z+V3CCJ}AG(`9Ssi2~Qs0vu@k+=ahAr-k!&6%LVKz*|*->U%?*PJN=$xOfphrxmUQ` zq<`(VO`p2oHa)faMSaz|Rk>!@&qsdD`}5Fpbza2w^O3#}juwYqyYl+^8lBUf=gW^g sw|?|l_T!vTn{?58g7-d(R~?skW-!@#^S<9y1_lNOPgg&ebxsLQ07r*SkN^Mx literal 0 HcmV?d00001 diff --git a/gfx/pokemon/slowbro/shiny.pal b/gfx/pokemon/slowbro/shiny.pal new file mode 100644 index 0000000..7c1a1e0 --- /dev/null +++ b/gfx/pokemon/slowbro/shiny.pal @@ -0,0 +1,4 @@ + + RGB 21, 10, 31 + RGB 18, 18, 00 + diff --git a/gfx/pokemon/slowking/anim.asm b/gfx/pokemon/slowking/anim.asm new file mode 100644 index 0000000..3ecdf59 --- /dev/null +++ b/gfx/pokemon/slowking/anim.asm @@ -0,0 +1,10 @@ + frame 1, 07 + frame 2, 25 + frame 3, 35 + frame 1, 07 + frame 2, 25 + setrepeat 2 + frame 0, 06 + frame 1, 06 + dorepeat 6 + endanim diff --git a/gfx/pokemon/slowking/anim_idle.asm b/gfx/pokemon/slowking/anim_idle.asm new file mode 100644 index 0000000..63de841 --- /dev/null +++ b/gfx/pokemon/slowking/anim_idle.asm @@ -0,0 +1,3 @@ + frame 1, 07 + frame 2, 50 + endanim diff --git a/gfx/pokemon/slowking/back.png b/gfx/pokemon/slowking/back.png new file mode 100644 index 0000000000000000000000000000000000000000..a2308a98afaa3d7c08fc4cb6dc406c7fb5dce935 GIT binary patch literal 507 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|G#+3UQGc8 z28K=S7o-^&7+6Yz{DMK^xf*Vj3=E93JY5_^DsC;EdV5>50*}k&Gyng8o_L36!lHG_ z@>#EQiX@v{{_kV?u}uAu{}I(R)q5;bvltGvh-=-SUJiftlQF{E#-J z{&OjwU~6@q@g-c@&31=0r%D?DyU!;_E#9~~uDqe8^%ew}fU|7h42ANu=g2+QQ|j?_t><_WsHJo?r=Yqj=l{yOEi-=$ysqEI_(1RB z)r}96zkd#KvwhVt?5D-FpB4 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/slowking/front.png b/gfx/pokemon/slowking/front.png new file mode 100644 index 0000000000000000000000000000000000000000..d648e8f0cb0ef539e3159bfd29cda3f19fe8df48 GIT binary patch literal 1098 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|NsC0#Z&fb z3NSD*Y+}D4&A`CGQWE4B3=+@PaI0isV1DW8;uunK>+P)DlO7vzxUl~H|9?-Do4EQe z%dP&wMQ7C>cSW6O5J)%HT&wR|RlSqt-)Fz)LSN^z%#r^5@sy_D+gXOU9QHp`PTX@u z)wAHqaXQciKJE5}bSyCQdP zUf`#i?AWZj?;L5%kE~wsDkNRowUnlw-GguTxTZI#GgsbP3u>8*+N6U`^T&R1k+npo!`R|lvEU7gl-158uDGGXGDYs%=il#ej!LXQv+*h46gxeW z{RQm5&)wg#_=`M9LCm`ycM5ktE;|E`X>+Qmuf4oX@J$*WF>Wi7mT^;k* z7=1mX==p@j!b){^qe}asYp*6*$~_G!z5Hy0yK1q=+un4R3xRxI(W1*=PGYD!<>~(_ zgT){!+ugFC>+SP)J&pxoh9}tVJk~zse$vo)Yn!R1gH@lj+1=tN6+&(a?v3r0QYK-E z#{>A>-uAW64Z0{ElyjNyP^+!`;|KcFGd!}rzTTdW11 o?$`UtTD~D39>)KV%l>ERuu)q5)ArqD1_lNOPgg&ebxsLQ0A;lo7ytkO literal 0 HcmV?d00001 diff --git a/gfx/pokemon/slowking/shiny.pal b/gfx/pokemon/slowking/shiny.pal new file mode 100644 index 0000000..6a893a0 --- /dev/null +++ b/gfx/pokemon/slowking/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 10, 31 + RGB 09, 05, 31 + diff --git a/gfx/pokemon/slowpoke/anim.asm b/gfx/pokemon/slowpoke/anim.asm new file mode 100644 index 0000000..eff22bb --- /dev/null +++ b/gfx/pokemon/slowpoke/anim.asm @@ -0,0 +1,4 @@ + frame 1, 05 + frame 2, 28 + frame 1, 10 + endanim diff --git a/gfx/pokemon/slowpoke/anim_idle.asm b/gfx/pokemon/slowpoke/anim_idle.asm new file mode 100644 index 0000000..63ef32f --- /dev/null +++ b/gfx/pokemon/slowpoke/anim_idle.asm @@ -0,0 +1,2 @@ + frame 3, 20 + endanim diff --git a/gfx/pokemon/slowpoke/back.png b/gfx/pokemon/slowpoke/back.png new file mode 100644 index 0000000000000000000000000000000000000000..8672dde51f8c36ef10dfeb5755aef7f2929d19b4 GIT binary patch literal 331 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|39c_t)>$L z1H(p(r6(8|7+6Yz{DMK^xf*Vj3=9mfJY5_^DsH`<>?n3vfrItupWpX)YN_1fh!Vfs z>g#jg$6%)6RyHKb-ULB`9i~|6yb<_p$VX%|qqHBPXmu+d`a2?hoRmXaX9V32sOhFc{A0~3pRc`*<)HqRC$MR%+!`3T2Cyy;vxhOh$Qmp}Zn31>L zVy3bw*LNNlQOwHK{~0EpEf_Q5-|i01Cb3=4;hGY{t0vCLP`Ew$+}FmAZ|n;tK73mC zj5A=<`TNbmS0-+`B^CK`QlE(D)uS~(nr5rSwgseY%I({=!u3)gr_R^9ue+bvv_!nW zd5dMqs@^Bx&hm9mPc@fZE$nyh`GKH&pI2y<`#D@#T&w=)PfY9*QK8mTDv5+UN?SY-nVON!Q~y6myJ%P z_dhm1p00O7eSV;S)hEf!o|;dRAD2|UH&#}P>-#qKJP)(v+7jVXJ7dAiw>)+|;dI*gpcd5_i4w|`_9YEx3nv+ zJ3r^X@$-9c?#%xCxO($d$L>k*-<@qbf9LLO*ZDhln}4<|uFp@iYo7IG=B%$X_urrW Zmm&M2(A7gPA01@?r5{&6mvv4FO#pt<7|NVLOF+)WL z1_nL(1;q>u3@jx6$|Noz>;a17Oz-a2};uunKYwc9dNi7OIu8-@#@Bi!|kkWa> zZ|1sJPLrmyI-BekzsW7=rYf?^-8ZVSXH%Gfweobe{0f#!X06gJ+P_N_=N7oQeEa9W zUwumQwKHyu(iVq#Y&z%Cw{R(2fs^X`z5-9~X|oEe{dZ=#GH+q9JiclZlZw2%+MVta zfh!BTKXN>GzG&e7qO&Sv*I7>cH=e5`J!;W>OM}ZY1cY$FfcGM Nc)I$ztaD0e0syA|uFn7f literal 0 HcmV?d00001 diff --git a/gfx/pokemon/slugma/front.png b/gfx/pokemon/slugma/front.png new file mode 100644 index 0000000000000000000000000000000000000000..ce63adac68d80d0c971006d92f412a51dda39f82 GIT binary patch literal 749 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V9elPW?*0t;`eN4U|`@0@CkAK|NsB@=hepy z6&V;9^yC*5GcYi)lmz(&|NsC0f3AjGB?ALfkEe@cNX4zUvvP}D6nI(;fB*kq+`qkJ zgX4Se>fGxyXIqwVcBu3x1X=NWOL(n6wDd*#Y5wF+&9!s3E^}GWoFovL{=x0Dz4D>y z8J8rl9z1pN*6IH_`?g=vf4cbFhHHk`4u?KJdhlc#0%$;ENa z;aW~>#QK?CIZT?_vwtKRazA{QDPKH4NbbUogurjhFSdqUXW#kal|fN#*rC!Ij^~*l z9exH_yq?GXefwYGLy?^~o><(PcHG`oEx7*LibKnem}tjO4=73XJ9Jl|SmFd9d`6zSv$r%i!O=8@rul9HeEVr>u?iQO>mUF8o$7cftnKT@%zR zRyMt6@y~pr6x_Qn;QZsDsJqW@v4!s~?J$1SWAS;pWixO3B!1}3SJ|JRY3gq< zUb?W8YmV`^2IJbw;^Q;h`coG$ox8GN|6`szzhu)tOfeR>0^6p1?oZLV8*erXyW zHB97wmT2PqTdjIm6uCF0tIbP7z56IuwghRS$#nADI?TBHEQV|atu#- zPBJe5Y3?z0lw-JUe)}n7&uhu2j5T)Y`xyTIuo2%|DdEe&z`)??>gTe~DWM4flZ#y+ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/slugma/shiny.pal b/gfx/pokemon/slugma/shiny.pal new file mode 100644 index 0000000..b66ef09 --- /dev/null +++ b/gfx/pokemon/slugma/shiny.pal @@ -0,0 +1,4 @@ + + RGB 21, 21, 21 + RGB 11, 11, 11 + diff --git a/gfx/pokemon/smeargle/anim.asm b/gfx/pokemon/smeargle/anim.asm new file mode 100644 index 0000000..c91168b --- /dev/null +++ b/gfx/pokemon/smeargle/anim.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 0, 07 + frame 2, 07 + frame 1, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/smeargle/anim_idle.asm b/gfx/pokemon/smeargle/anim_idle.asm new file mode 100644 index 0000000..e991ac4 --- /dev/null +++ b/gfx/pokemon/smeargle/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 08 + frame 3, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/smeargle/back.png b/gfx/pokemon/smeargle/back.png new file mode 100644 index 0000000000000000000000000000000000000000..22ba83c3c4186e8757610f99cdf58ae02f301eab GIT binary patch literal 439 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjv)uv8Evd z1H-Crxex{h29}Z_zu^D>|Nqa`aI0isU<~tgaSW-r^>)g|bw?C9T&Di~U%#(OL21ca z{@-Q3<(qGw5tPta`*;3)`9pK%KHXu-So_$>>HUws1g5{)suGgC3ocjKwMbs~Vo>YY z{~>BUTLioQud)~Nj3U3(olfQcWeTXRW-1W*uYaKt!>z@wo?-U-iH`Os2+iG2@3As3D#ujZQrSebd%xNuFs)cN~)^dKB-@;LG z)@g?Mw23eL7f+if^k8TD5v2)C0m0q}gtD2w(zu4zMMQ%}^bNLPU$FSaDf_u^J32rc=pny~FC$BgUmdjyLO1cIe3 uHbybdlC;%dzU!_a>&2@oEw}%LJ?^)%sh4Lza-5O5Ho!=rgJHW)l-H9fZZjjac;}sL zUGhnz`tHV{T@&MHmOON|h&All71ueFH$h70?Jq`S=^2JS*S|5_I=#!ONZA;8KgxOL zl6c#B+ZLSq!m(xUJpVv!^=sVM2m`E81roUKiMeCVTRV~hHIXM615g<_)l4#+>_%WS9_n! zSIb|;>y*V^rL%W`?+`P8q4W9j>5SYOpKr}GW=%PN=Jc(cDMoSIM3?aSuKu;GXRhU0 z!+?t?FUR#a{aD*toVsl7rS6b@Rc1WbUmyCt=5Vilw)?WPC$s1FEYl9QR9TiDHCJiF zm$in`)t9z~)o6s3Ejz)r*x=0H&Pn^c-;^CPu&mi}dFxKD*Mfnsi*}Sdz5ATF<#eCv z=`CxGCl!?OJUKt<^UUgnvKxyN`_|nQQRVranWg1&Z~KZzu6vKqiv86aWT|T%SiGq% zsB}etd)Qo+Q=Lp&PV?j^pMA7hjj^BQkJKg$Ue-@;HB_^9ak)4u5UKc;@|TYBNB?DMaEqKTC|AMd!g(Pw4eJBu~t zdpKk7ER=r4Tz;kI?c=^%|K;8pY_nQfZqUoxv$%>~UA4%{dQEwRBl{+vD%Zj**7HJx zvmYI{{mQ31fu;4p;VSm_qE5}wqs;FVw#gSPt<7|NfZbQjR$c z3=D4OOY<2R7+6Yz{DS}g|NlQ%!>y8mfl<=a#WAGf*43%Eg$^rlxE%fazdlcNkG|CB zD@K=R%(CTLA#rHFWP^2O`SO^Lv2)71_znXGbXv@j$X*=WgEu5aP`&x9)Rr90* zzLL4V{=H93PxLWFTlo8jJDIzExXzc7zUA)4>}J14RoBF%XM8$}yPtP4%~IOdojLE+ zqO-RYc_qxt|2}(}{vc;R`-7Vk>-ZmJUajDc5mEad@HlAxsvdRs1DmbVwyv4y5oYE?9X9pO>CMK4sJ=N9f{X0M&YaOB0^C2T$}uL`mYuk|~;yAj(}sPg6iJGtJ-!1b*a i3?UN)Z{R zZNm5CYLnl*QoDL>a|YwjONvoa+w8IvREyf#Y0E5R&J{KYZNZ}*6BcE zq1@XaRswn6pAX7$&RSt|a%s@K*@t?KR4!e8eM9MEg_LVcTi;@i#_j2U<#wODqxjj4 zX{iWz#5NVZ$Ul*f512%Y-qn2-wvl7C^OE=X@334w>(tGDrutG%24lQV)CrddFH`3x z^j8TV3JUsSZ&DMxljHQBXH!pYam;sdN}PGwesf0h{dap#YQ0gb&2d_ISH;)+y5Tn- zx9aTO3;NBQ|CXK!k+O{plrPgZ@wA&iTf%a) zNB+=*j+~i>-7UhZulC8UR?reY{c+QtYOd9 rMZq(l)eqj!nc1R0r|>SwR_$~gTe~DWM4f3`rmN literal 0 HcmV?d00001 diff --git a/gfx/pokemon/smoochum/shiny.pal b/gfx/pokemon/smoochum/shiny.pal new file mode 100644 index 0000000..ee3baba --- /dev/null +++ b/gfx/pokemon/smoochum/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 26, 07 + RGB 31, 12, 25 + diff --git a/gfx/pokemon/sneasel/anim.asm b/gfx/pokemon/sneasel/anim.asm new file mode 100644 index 0000000..7e50e4d --- /dev/null +++ b/gfx/pokemon/sneasel/anim.asm @@ -0,0 +1,3 @@ + frame 1, 04 + frame 2, 30 + endanim diff --git a/gfx/pokemon/sneasel/anim_idle.asm b/gfx/pokemon/sneasel/anim_idle.asm new file mode 100644 index 0000000..5c0fc9f --- /dev/null +++ b/gfx/pokemon/sneasel/anim_idle.asm @@ -0,0 +1,4 @@ + frame 3, 24 + frame 0, 09 + frame 4, 08 + endanim diff --git a/gfx/pokemon/sneasel/back.png b/gfx/pokemon/sneasel/back.png new file mode 100644 index 0000000000000000000000000000000000000000..4b1921c2a4f02a8ecd49dae426f5a4fceadba139 GIT binary patch literal 415 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|KD(mrDYTY z1H*~yIrA787+6Yz{DMK^xf*Vj3=E8Ro-U3d6}RS2^=3M(z~R!m^Z(q{4V)`7*4*6s z`APrMKcyWF+6=8+4&n@=yOMiWoN4t}d7f=xQ0r{>yTm)dO(kv_%Z&FOTq!JJE|-nZ zH7YP@evERwVEq15>++@*#~X6jU6k0+VbAzv6Y*iAsk>$h5@irIARCC1UJ-%wVGU;Gak_+4BxV)>D$9hVNBs^~( zo1`i8v})-(uKAOF-g5F(#$;9-)JpHnQm*vm2^2oMoqf}FU+=U7iCb^HzSg<$?}Yt% z{14f5KCfJ#edfTt6}bXhi97EKT>8{6lW%EJ>00A-_{Uk*kdzCzO^%BFWc*XgWzq0^ S_g)4D1_n=8KbLh*2~7Z}m9Y%~ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/sneasel/front.png b/gfx/pokemon/sneasel/front.png new file mode 100644 index 0000000000000000000000000000000000000000..958d314d93c920db9057258a8ae14d72d9098438 GIT binary patch literal 1004 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1$Wwo~$B|%fZk8|KDLvK65%@ zRY;b$nb#CE*T_Fx z@~Sg-aoxPbIVXye&M)t;Sy@-MV&R>6Un4!8rT5zX?S6Vm@{wsK&s;lmrJ~FQ?*msq z_d8nUZ1$!5mei3pJDFu{2D44_#CQ|(SbrU_JD`~nJb$<6s(Kp>CE}2hH-D%?x{HQBtJdF=zGuPRkB}jrQqeW$*b8-?iBY=))D%_otnIT z?`bg)mM5i8HO~BUj4ft=&l+j!(Xd{e_wk<7>-3seJWRAGVSZ_=#2;PU#8Pv1`ljRA zM%}eS>vccPbuOGzy@I_~OE25kCVR#01k=b;ej)R~V}ipRtqrKu+3X4z`s|DnUBN1yjS{_hxR9*Z;vnRZPw$__^v*A z`mvw>w|7L*VUJ-nmnCJmsd>xqSyY1OPAIi_RijW);rSwSof(()2~&{ zo_^xRq@&);?mb$X@bdZ|k(|GirXR9f?7QcQ$6;mdi@f@QY6AB9g3S{qPrsC3a?pFn z6V;ecL33l(^?SeDe-ipF^ko{uQT?foLLzeZ**$cA@8@@pSCrw zy3UvwzWi->Sn$%zPnH^7o&IgI)%EG$`gZOsG5WHnWb=jNM|Q5#pIel|%O795(njiW zY;C7}^Hdg@JyWWMb}lJC>K*=d>2YuS)7~Y=y>~oTtySIgNOj$d-LJfV?&JQm@wN9` z$*Jr2xmUrUNn|E`M|80FAO!N9|Hn)EXL$|cE^a-2j)8%J N!PC{xWt~$(69ATV=UD&% literal 0 HcmV?d00001 diff --git a/gfx/pokemon/sneasel/shiny.pal b/gfx/pokemon/sneasel/shiny.pal new file mode 100644 index 0000000..951cc37 --- /dev/null +++ b/gfx/pokemon/sneasel/shiny.pal @@ -0,0 +1,4 @@ + + RGB 28, 28, 09 + RGB 31, 09, 31 + diff --git a/gfx/pokemon/snorlax/anim.asm b/gfx/pokemon/snorlax/anim.asm new file mode 100644 index 0000000..76c7617 --- /dev/null +++ b/gfx/pokemon/snorlax/anim.asm @@ -0,0 +1,9 @@ + frame 1, 10 + frame 2, 43 + frame 1, 10 + frame 0, 15 + setrepeat 2 + frame 0, 09 + frame 3, 09 + dorepeat 5 + endanim diff --git a/gfx/pokemon/snorlax/anim_idle.asm b/gfx/pokemon/snorlax/anim_idle.asm new file mode 100644 index 0000000..448408f --- /dev/null +++ b/gfx/pokemon/snorlax/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 10 + frame 3, 10 + dorepeat 1 + endanim diff --git a/gfx/pokemon/snorlax/back.png b/gfx/pokemon/snorlax/back.png new file mode 100644 index 0000000000000000000000000000000000000000..8493ee5efa467a1bcd88e76c68f9879b7948189f GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7e{V{0wwD(J z1H-jj?~5527+6Yz{DS}g|NlQ%!>y8mfnlSki(^Q|t+!Jg`5F{>SQ5YguNMmt%vt#M z;t|{T2DwSTFVD|^&+f9q-@s|gbM6P~S^JrKzDPd^nW7YZfBAt6+eM!%?A;%5=W*Oy z%hmr(4}ST@HRJYsyXg(L^h@V4+-wM~ys};6oVQO~)o!y=HM1jY3Pr{PRj4{&;w$1*`+8itSZMBqH7N_XtnakR zn`QLOCq6c1*&p_`DpRkU>=2*u+x_CK)$aLI6t_+}cCvWmvZtjCJFit*@0qqUktbrE z#@55@vmK77ZQl6jyT_>@Td9J-_VNLq))84#cD9T3i;C+QM_VsCoA>)~)9Ic|$9Ayp zbu&G0nzM2V+b7O7%n|E%EeQwj&0W|(kL{yO`=75tw9wd`sBGePlv!576>vh(a%_BKC|{lHhjzK8i9u*}S`M=+je5pN(Z_nK?kA4Y!;PaP1wd$9g%}Zw~z7Ik2MpfLueg(Wc7PD^R9LLrC zFBjXXEav|cD1T&Tjcl#Q#O3^owF&v#zUw|n;r~8oG5^KqvR}SdwqI@EQ7%#2QO*9B z{oX+&I}ccIIN!x@dgT50$f>3#r;pc$Dan72T-yJ8&6&r22kcfim$7`0%>5=%8;~^p z)Wh1aElnG1!%8>R?>*n8BX%eKX*lP%$i(@gP#+wyejxjyul~06Hg)44b;m!m>DKID zY@<9e|Ni?6vyJ!N2l*1L2H|Nm?jNuBKbRA|0tbP0l+XkKL+#OY literal 0 HcmV?d00001 diff --git a/gfx/pokemon/snorlax/shiny.pal b/gfx/pokemon/snorlax/shiny.pal new file mode 100644 index 0000000..9a3ed5d --- /dev/null +++ b/gfx/pokemon/snorlax/shiny.pal @@ -0,0 +1,4 @@ + + RGB 27, 22, 11 + RGB 09, 07, 31 + diff --git a/gfx/pokemon/snubbull/anim.asm b/gfx/pokemon/snubbull/anim.asm new file mode 100644 index 0000000..de1e22e --- /dev/null +++ b/gfx/pokemon/snubbull/anim.asm @@ -0,0 +1,10 @@ + setrepeat 2 + frame 1, 07 + frame 2, 09 + frame 3, 09 + dorepeat 1 + setrepeat 3 + frame 4, 08 + frame 0, 08 + dorepeat 6 + endanim diff --git a/gfx/pokemon/snubbull/anim_idle.asm b/gfx/pokemon/snubbull/anim_idle.asm new file mode 100644 index 0000000..4b4e099 --- /dev/null +++ b/gfx/pokemon/snubbull/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 4, 12 + frame 5, 12 + dorepeat 1 + endanim diff --git a/gfx/pokemon/snubbull/back.png b/gfx/pokemon/snubbull/back.png new file mode 100644 index 0000000000000000000000000000000000000000..2c9635344c918aeb000892be9e9410bc82edc9d5 GIT binary patch literal 431 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|GYTcGANsY zfuX_V)_Dd729}Z_zu^D>|Nqa`aI0isVD$5JaSW-r^>*s(O@|dYT2jCNy}$F+(cOk~ z=gn^~x#aU%m!rw|<^6vb9G>yV9~NOe{k2Ok-s$Ph{Th82YF;tjS=wPx_iFkK`A@#` zE+Ugc{+$>hWfqaZULy{w`^OV1>@isnZ_>vs*KjFcp27|MN=q2C0KA+f-dd zeBVeJ&!|`*ut8hC>)7)POFg3Pyq@Fk7qK$8n5$P@`tpb8 z0^<{PEIf8H6-T*+lI{r}bH3(rOh4`6Hl{Zsg}>Ga<^8;7DD65u_2|znwLA5j6)hj# z=D2p|u9{1|{3ScSZ<)$nP4`XaFPnQr>wP~Z(Zl^i~Kwg(ovy)p?=k&<&pbEw{x}$3;$>2*~RhvK$*!I1_lNOPgg&ebxsLQ0EZ^S3jhEB literal 0 HcmV?d00001 diff --git a/gfx/pokemon/snubbull/front.png b/gfx/pokemon/snubbull/front.png new file mode 100644 index 0000000000000000000000000000000000000000..ee352f0e32aa91415d77ecfe76260e0536bc77bc GIT binary patch literal 882 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U{v5>W?*1ATFWqtfq{W1z$e7@|NsBbi?c0* zvKbf{8cc4TXJBApDGBlm{{R2~|6C2XN(KgIK~ERQkcwMxXI-3hSb@W}_4oh(d$gKn zNvIm%Zom7;XSwg;-W3a$Uz@V1W|IL!U1oe&^o2JkwI_0Q1ZfG`g&j-K`?mE7f28}7 z{#iBZw~c4*tg(z;b4T+Wk66mpt!$ri{IAwBO)uY=7RGriTKFoX!TU)0vu{(cue!kH z{3mgRnK$g8K0Le?G!K6PJHom=X@`X4+eF<7uE!Y7kpo#r5AdK)u4Sz-&Tg} z2PYTK%UZ#;uiwD)Me>X5^GecoNIXjA%J%c&iuk9u>B1qFV7nJ02hBg*L|n4Drt)Cj z4qvCMH5wDx4a|al&EICpq%A)vJyGu2=38;grZJSvxn?rmpybuTIu5}y&KoQRAq!Vt zk5g^kwze(J^y(h{yDq!ioPDb1Y}3w>GT+YvQod*>Ge zKFbMD*GA5BR(7`)-)(eW?K+oc+}@bx#Vq=)`nB5ny;l7CD;N9t#Tl)Wh`s%JlFo%4 z{6}X^Px$iSi7JO(k3-ob)sGrGD>>hODzOXPIob z)>d1`BInPxvl}W78oYfs`)+31j1|pk{}j*fIXH96oK@#6K3}`HHlWz+gW2_Ig6#T^ z!e>uP8Or@!MUFmU2cM8)^dz)~|?770Z`t$jD)2rg0>-p?I zUfST3Z7*AS@&@DQT^pV*?KC~N=gOOh&s3LAHs7=5*Xj4?ym#HZoAGSobQT-2pI?u7 z3;!$l^dYD})6Xu>Yx(^*=5e)-3E?ztQ9wQ;|Q>bL1h^_u7Ocb?Oa{c*gwZsj@e!aB`!`hU0oU23skWRHkyg(euj md|jz|PXFl7rSG3Em9IKrVD10qA|nF>1B0ilpUXO@geCwK0;)Lx literal 0 HcmV?d00001 diff --git a/gfx/pokemon/snubbull/shiny.pal b/gfx/pokemon/snubbull/shiny.pal new file mode 100644 index 0000000..04cda49 --- /dev/null +++ b/gfx/pokemon/snubbull/shiny.pal @@ -0,0 +1,4 @@ + + RGB 18, 21, 24 + RGB 26, 00, 26 + diff --git a/gfx/pokemon/spearow/anim.asm b/gfx/pokemon/spearow/anim.asm new file mode 100644 index 0000000..ac93186 --- /dev/null +++ b/gfx/pokemon/spearow/anim.asm @@ -0,0 +1,10 @@ + frame 1, 06 + frame 2, 09 + frame 1, 25 + frame 0, 25 + frame 3, 10 + setrepeat 4 + frame 3, 04 + frame 4, 04 + dorepeat 6 + endanim diff --git a/gfx/pokemon/spearow/anim_idle.asm b/gfx/pokemon/spearow/anim_idle.asm new file mode 100644 index 0000000..060340d --- /dev/null +++ b/gfx/pokemon/spearow/anim_idle.asm @@ -0,0 +1,6 @@ + setrepeat 3 + frame 1, 06 + frame 5, 06 + dorepeat 1 + frame 6, 07 + endanim diff --git a/gfx/pokemon/spearow/back.png b/gfx/pokemon/spearow/back.png new file mode 100644 index 0000000000000000000000000000000000000000..e25a137a205dbb2611df0e9ea832ec21d8a11258 GIT binary patch literal 416 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7KPQOedr&e1 z1H)voCov2R3@jx6$|Noz>;a17Oz-aI3;uunK>uqS@y2Az>%r*b5^&J{iYI%Rx zMXmB&oz?8Cp!jR;|Gf=-2f10kl_+Yzaxh*je$Ynq@qKfa!;y>l?5{+pFu(G4-jLtL z%~mccvv8yCzNHNJUrF(>`m+593J-WNRoZgL`3(OaCW6^ys^?o4?i}0$)FzzB8{5o zh2(2;nGNSRZfD>9y7keI62p(HUpEyUNk6f%U|U+1L>=drofQH_li8iG91l@ceY5nl zTfbo>UvRA5J?qjF%M0eNDv&haa5_5l?)v$XI-7nRyx&(`wrl@s@$$5L`8WK3@lRr6 WkFwy?UdzD1z~JfX=d#Wzp$P!{qOT?Z literal 0 HcmV?d00001 diff --git a/gfx/pokemon/spearow/front.png b/gfx/pokemon/spearow/front.png new file mode 100644 index 0000000000000000000000000000000000000000..85c2e7e230b55cea6bd696734b0790ca5aee32c2 GIT binary patch literal 840 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V3gosW?*2D)OB%VU|`@0@CkAK|NsA-Adc@r z$qWn(lf|CIFfcH%lmz(&|NsC0f3AjGB?AM~b59q?kcwMxXLaX2QQ&di`2PR@&&T*V z@&n3Oh3@vd>UH)`VUM9*^UNvxelx8zVVK+6&sMVB`((?3V~j;}XVm_Cx>QK(n|i)Y zMO?zA?wMutnqG1L-q^up!KK@xE_+~&W8voCiuRk{tiC64_~bA5++BWpQp@EQ2`TQi zI_H+9dPPc9acAE}bTFH^h-uQlrj(oOr2G8b^TyG2_C$v|=82qVck5j~P{p6+>3it7p~{8g$zRQ% zetabywQx;G8SC~p86TYa;Eevk9*xhN zZc0tF*;=Z>x%(-PWO~r8JSMGkIUhfM{OhB}d+e&+k(shy){4{reB;__aw5uvbL(W2 z)fI2nSQfa6Z(XA;o@ep6^!L^sk9st<%hp;vwmDL1f0;M+uw>T7UySFT2-Q6E(VKa2 z<^!JswQt7quVz2omfyx*5IT36kjyLb(s#4B`iULY)~((A?C{>uXXOv|ey1&M+utAm z=93l2u2+#Q$c5cSIGm>7eJ0J37ompe4+_{<|QjoKhxgpn%Z_dP- zyB_yU`*prZjr+YtvgWpjJj&@)QvOXep0{3n&dJdKM`ns@+MJp5&!4e4ynW8hx#!PV8e7l*DfoNli`hr()Ij!&|DJhu z!tTFk-u+JVz1aJHcJ0#|wSDXYbAHa9^OL#!s&Y)xr-`Zz3=9mOu6{1-oD!Mt<7|9ow-*HTRe z28L&!Ckrt!FtC&a`33*~|NnokhFc{A1H%_j7srr_TW=?M^Bqy(aqg`BZ_WQx;?NeU zm8U1p%A4?^d+r6pdsVO3ZvVIHL%{i;wwLXhPBhiEr@dMx^SMX9K|40jj6XOl@KOHP zX}7_@gQ(I vyTEmw0;`yYQd^U+5z2Z=ug^0~{=uOCotg(nV3=9mOu6{1-oD!M<*nE(F literal 0 HcmV?d00001 diff --git a/gfx/pokemon/spinarak/front.png b/gfx/pokemon/spinarak/front.png new file mode 100644 index 0000000000000000000000000000000000000000..e35c28646a58934db2e8b3448a7007da5ef9d962 GIT binary patch literal 474 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsA=uTAz^ zs>#5>@a*$sAqEBpmXaX9;Q#;s|IgKMt7Kqctn_qo45_&FHo|+;VFe!JYk%MW`CzWX zn<<_@Su*pYpTmtqEG8~33jg@In(G!XTo~Q%0@I*)QHwnW?F3^0Mhf%HoMG=~2PgHdcI8 zIoY#ctof8paNn7!TD40mN+(%F9_v%;x%T4W9;*prFQeL64eWN=sIr>goEhP^gk{zX zn~hf2l#a)&zO}UQ$eq45u16|aYj2%C7Ja4-X1#2^UM>x4&?uqdT`Ti&vCn76RtfyaAWU{LO1(c z?gb@Fl&?na`abj9S_|)&#$P0V@zl00IDaAih4K53l0UDeFX`gA9nWvKdE?C6o9ore zrytZm$GD6A;QO>cdEbiW2kOqh=&|Rct<7zjcaJQ1yQX z28PKA>f#Ix3@jx6$|Noz>;a17O!0_GE#WAGf*4rtTVuuYlSRMcWEANZka??q} z^`3Vkm-#$K#!a2~DjpvXRQSm1=lUo_^OwQX8RZX;NPL!-cu-dQ+n7QvS#+ zSaQVqz?0SZ;hkJUt z`1*Og3B`H_mhrvUjt2?Ey_U{b{kG@Qhd&pDtR1Z<*YQ4g?BJRp-Bq4!8)`C7wp=l) zX}-tKz>czI%1>uLuSmA~$0f)0X6~ZT3l(lRO%;&g)XzPsQB{^x-S*$(?>xSyTt@DN ycUX*HT|49-r^o-@aqH^#)(iXYM@IZ*w7a0hTADnKbpite1B0ilpUXO@geCy_PL2Tp literal 0 HcmV?d00001 diff --git a/gfx/pokemon/squirtle/front.png b/gfx/pokemon/squirtle/front.png new file mode 100644 index 0000000000000000000000000000000000000000..fd8f05fa9877b932c288370c708164d97f86a785 GIT binary patch literal 633 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-VEDkn%)r3l>U&L=fq{W1z$e7@|NsA6r#J;w z|7T!en4F+4&cMLHQWE4B{Qv*||G64&l?)6_5}q!OAr-gY&bryxY{29C_|E_T&ksg7 zBqhhWEt!{alw_Fg|(y*8zKjq}o$bv>t+a2}Z+ z{q)(YS8j@Pc2DTqT3hbY>bgRG#kU=cVt4dvc7_SQzU1O%D=@Q4I7ox__MMWHbsLVJ z(8`I8ziVzNu#ENjdBGhfd$URwx0k4OUW*kndble0@>*SiM?9Z49ofG8zo3Sy9LsLq z+f!E@JGm+-3tc;Z32kDU!p-h;eA1Z*2bbIo+I?Z4HRn>bJBosZk*tzU(ZS81 zHu3#DG2!PT)niAWZLRlI)p44jCVxwwqh*r$xw9Lh_*(?ZTJ%_DkHzCt&eJQ` z$11%Gv@T;QFrIB$C-q6eaQdq1mtT#S6c(@W_*`Q#zwN%xjjbnIoIF1ChB+N_&UwY) zvw5@mmA%(LI7p{eh_uK)_;Z!7fj30O@J={;36J7OmgM^j_2?ojKRIzpXO(S?u$)^D_dt zpC@)aDtr6Xtu$|2z2dC*_U4P(pQpWkvdYH%bMP`d^ViR3*3J7l_xa3!wae<~XP$%E rZhwBybmPDE3}cEP6jeCFfe$!`njxgN@xNA)6*@9 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/squirtle/shiny.pal b/gfx/pokemon/squirtle/shiny.pal new file mode 100644 index 0000000..8df9f82 --- /dev/null +++ b/gfx/pokemon/squirtle/shiny.pal @@ -0,0 +1,4 @@ + + RGB 13, 23, 08 + RGB 17, 25, 30 + diff --git a/gfx/pokemon/stantler/anim.asm b/gfx/pokemon/stantler/anim.asm new file mode 100644 index 0000000..c4a17df --- /dev/null +++ b/gfx/pokemon/stantler/anim.asm @@ -0,0 +1,8 @@ + frame 1, 14 + frame 0, 12 + frame 1, 14 + frame 0, 22 + frame 2, 08 + frame 0, 08 + frame 2, 08 + endanim diff --git a/gfx/pokemon/stantler/anim_idle.asm b/gfx/pokemon/stantler/anim_idle.asm new file mode 100644 index 0000000..792fead --- /dev/null +++ b/gfx/pokemon/stantler/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 3, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/stantler/back.png b/gfx/pokemon/stantler/back.png new file mode 100644 index 0000000000000000000000000000000000000000..90e7b4a65b35902e48db4f459e7591d55c8108b1 GIT binary patch literal 483 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zqi^_QL}}C zf#H44CocvD29}Z_zu^D>|Nqa`aI0isU~KYqaSW-rwKXiV?1%zS_mbcDcQ)Mg$+=W# zl0QwwW7?jUna_VtZw@LFlz)|f_`SG$Oi|JXVFBT1T~&A7W3?2|Og(s|qVas|!d+a> z-||&@+!PF&#Zzn>r+9o=`GDy)lR^5aQz_-$`^xs{e~Mhj_FZ+xRxVbyJy!2E&h=cf z(_sr=K6QH{x53#362T4+3X@f0y<)l6h5Kfo5zY7&u(Eif1;?|F7#?0%)Ns z$1N~?rT(5}ozx70xM^HFB5$4Af8N2N;mSw%@}0eX@;s|AowyyUGbLlQqI3>>r%Fp{ zUmD*5MMrgpgo9@%o|E~zxp|(6;})jLjgBTU)j}G`|jr`;kvt^sHxoKiQajZyH7knZ&yEmK>LXA pIim;9@ADtD{?#P^gZm+SpaE<4+m-hxF)%PNc)I$ztaD0e0swHI)FJ=? literal 0 HcmV?d00001 diff --git a/gfx/pokemon/stantler/front.png b/gfx/pokemon/stantler/front.png new file mode 100644 index 0000000000000000000000000000000000000000..ac8628445dcff5ca376606c86bbbad8c70d69777 GIT binary patch literal 1066 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|NsBJ)s~8y zEes3{?`uAJF)%Q&lmz(&|NsC0f3AjGB?ANVNlzEYkcwMxXFZ&xtjN)_^!MNUKiwRT z1WxvOcmCb9;_$7W*Zf5SUhY^r=Xt;Flj(E*)qiW?Iwc*zAT+bMm@AK6r%&a|o7e>t zqIbva%~|5a{Xt5xk=IlH$dQ9=`jY}mCj2`%w|W2cUq}8__8&2EcIi2KVfNxGapfDg zuJX;D67;{2jXh{@%wE|AlXEurUu*V^s@UwResfu)Y=pBncaU1`zqOP>FVmNES`IMs*D8BwkN95^)iQVR>?S?U-ltwtC`#8<=VeJ zY;PZ)eqH*R-zN6g?z@~8yc3!qk*&RR^6hJdTQ~WvJKNnB{i;+QoM5>6AZgOKz~?T9bIVK`j_Iqdv{kk^%kOooWu19UHT$#kKU7z1 zZcKGOdy3cMkJhqVLhi~tSr6u|ooLv=l()kxEBo#3yZ5CIKib2V`}WGY=)SKH4vO6s zyRwA&*S0IQt@C!r6bY?dG_k-xUdBvKF;kE+!!Os_^~pirD@*U}axqEhxx#0Xc_@Sh%1?aX-)j4PNshyL+iwCFw{5A}(d#W)_F_}@fp4=ex$k01w#hv& z>;8-DjrC%Kz1tQpt4OZT;r=Wnzb$C)`ENVY@BO!EyzSMwc)R7BZ0qLF9w%Da?HTRY zzTCI=)w$w%i>>?KS?qfJq7TYYf6=GHJnto+-9_2(*PrI^a+Z6=m$_P_aQ;iaF8{w9 z-({S7zP4eADHHCNKL~Pu_gsRDMPw-EzYf+3vksp?_)? zT3<6`Puy@#_VRUy%Fm*CrN`s=`R=T-4r80yH0ks*$8sHqS9xcR!g?3Ki}>Ys{zjR_ zIhE;=k-mrgr&-K9y~O(2lTWAam2^#)Ogd}VhJD#di}SjZ#awPw!; zrdG+v0VjL?r8HyXUP`__y2Xc2)%+$Ny6Jm?Ly$PECzD?`rhV4c1JHvuc ze|xxg6<=Osle0X3#tpIFJskyvy926=R(z)K->e@O7Bqy_bE7 zx^cVLX?oVJvkuZ?*sD{&-g=P~>kp6eC$B!vd?!)zWbyC5z{U2v-gA7oQ!aD2aNg%R zzx#^s7rwJTS9^Tt`yaXAWg~TMcD{FT`1EDpVvF|m@2qcKs;s%+IA!zm_iL7AcYiJq gb1#><8+gk83x`6&Ug77d3=9kmp00i_>zopr00e#uu>b%7 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/stantler/shiny.pal b/gfx/pokemon/stantler/shiny.pal new file mode 100644 index 0000000..efdc404 --- /dev/null +++ b/gfx/pokemon/stantler/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 20, 07 + RGB 20, 05, 01 + diff --git a/gfx/pokemon/starmie/anim.asm b/gfx/pokemon/starmie/anim.asm new file mode 100644 index 0000000..6fc894b --- /dev/null +++ b/gfx/pokemon/starmie/anim.asm @@ -0,0 +1,7 @@ + setrepeat 5 + frame 0, 06 + frame 1, 06 + dorepeat 1 + frame 2, 07 + frame 3, 07 + endanim diff --git a/gfx/pokemon/starmie/anim_idle.asm b/gfx/pokemon/starmie/anim_idle.asm new file mode 100644 index 0000000..0560a42 --- /dev/null +++ b/gfx/pokemon/starmie/anim_idle.asm @@ -0,0 +1,4 @@ + frame 2, 08 + frame 3, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/starmie/back.png b/gfx/pokemon/starmie/back.png new file mode 100644 index 0000000000000000000000000000000000000000..f4e67e4faf161021971a1a97b8fcbee138efaf3d GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7e{Czn9Lp&T z3=CflW-u}^FtC&a`33*~|NnokhFc{A1H(U07srr_TW=?M_8m3ga0$Hn_x&9;Hse~& zPn(u*=x_?^k9@NEyxs3|w|g%YcPLkIu3)s2sON}_H?P+^k{JOA9BGe)1 zciH5BO|etIdR{&(Y}2qRQTvJ~bGix3>bjr5yVrmC+4e;|H2W?*1ATFWqtfq{W1z$e7@|NsBjwld7I zoWj7s@YP@jBLf2iOG%Jl@c;k+|L1DBRWdLz>v_63hE&{oJF7A8tpZ2e$LD|VSBeT; ztcvp8mU8n&(d2o-bsIT;oQ+-de&>vzXXbI#Wc^>ou{na{U2sZ_+pp5C?jbSvA3vMG zX{6Jw#qlaVL9rq7r0@)#zv!w=?b{g3o&_J*A3nc-D@u|A9` z?^}q^!My!KFPL2#wey&I(|LE;XiayD{Z#9A;llMdnq}p&p^KP*YuNI?Sr!ugJG{$c zqV-pq_-&kBH*Ve0W1MLlRo7B+t+In#cH6mNmOT033*zionqdAiKl}ZoCZV^k zfnMGHYrj8eGX3>!iKaxFtns|vdw;Lv>Yd6j6n406^G~BiO|yS)s1hsOqVkd{dWUA> z*L^2?Rz26-P;lbCt}Ok_E&)7qOTS!v zQ`;1r;mW|fAhn$HZnDw!tzwQZMZ>S}K{EXAfzI`ec@NBudEp4mj>zA#|?jEhasPZ5z`-$gL+m3MSX;Y_~ zxHA=B&@pp0=AEm)}BjE%`h*Q$vVXEv-{H1>r(xtj9tH*m22WQ%mvv4FO#pdS$6EjZ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/starmie/shiny.pal b/gfx/pokemon/starmie/shiny.pal new file mode 100644 index 0000000..c9932cd --- /dev/null +++ b/gfx/pokemon/starmie/shiny.pal @@ -0,0 +1,4 @@ + + RGB 29, 09, 11 + RGB 11, 11, 31 + diff --git a/gfx/pokemon/staryu/anim.asm b/gfx/pokemon/staryu/anim.asm new file mode 100644 index 0000000..02c6545 --- /dev/null +++ b/gfx/pokemon/staryu/anim.asm @@ -0,0 +1,7 @@ + frame 1, 24 + frame 0, 08 + frame 1, 12 + frame 2, 04 + frame 3, 04 + frame 2, 04 + endanim diff --git a/gfx/pokemon/staryu/anim_idle.asm b/gfx/pokemon/staryu/anim_idle.asm new file mode 100644 index 0000000..d61a8b3 --- /dev/null +++ b/gfx/pokemon/staryu/anim_idle.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 0, 04 + frame 2, 04 + frame 3, 04 + dorepeat 1 + endanim diff --git a/gfx/pokemon/staryu/back.png b/gfx/pokemon/staryu/back.png new file mode 100644 index 0000000000000000000000000000000000000000..9cab96362e4366364068dec04ba6bf36c097fbca GIT binary patch literal 379 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zqcpqzorBO z14F&uEF}g829}Z_zu^D>|Nqa`aI0isV3hK7aSW-r^>&KqG*(3p7RAs1%JTwOF>L+y z^55=NicXgTpIondyQgvbo)dE&8$YdTcr`VFbzP6*9O>K>pVgzv`jx0?Ced#<}Z_?JTOk3&(O>+~eiTUBoT_V+CWv!Qcf=vMf;e~J)9v{{>b`hMYP`!lX|}mbu<0l{=I$~S@v^N=ZyA0 zF--E^F``P()O+5R-V^=Cwf-Uhr^GLQ!OJw1ZgaDo_dK8Nwtjeg4hxA49D+%a2zNPxCS`Ffe$!`njxgN@xNAlF^@! literal 0 HcmV?d00001 diff --git a/gfx/pokemon/staryu/front.png b/gfx/pokemon/staryu/front.png new file mode 100644 index 0000000000000000000000000000000000000000..74949a9b198a6583778b43badc920e08c37066f0 GIT binary patch literal 783 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*S*>xpM~4%V_S^9zpNx5@tH z#;2{$`!Dn;{giz^=PJv8r?0ljmt(%JQeSA=?)UBJ!C9dTZf}ee-g9b(^W;VGG8>z} zDotv>AbVMZQJcBa&c2)HsB6Pojay029suY9>S zT+Opm^TPT{&1=v19LfKa=^f|wF@65@Gl3767RtKsnR4NL*YtqLOQ*aMj$8DlQtkQD zFTZ>$H1~dex@U@=Vd@@{^_q`VqwE&8>~Z;N9B|BA`#{x)OSZ4n^v_B(^Q1Rv9NLuq zQ6pC4Ye-Fm`^5Sk*YYg(l>G8uzQ5#`xBc?{CE+*s{+o38W?6maf%|#&CvPV1-+x6- z;>K(Jv&L_}PIsH)SO4G&YtUZ~J yt@RI1uAD#pz~sdD{|n`RffVxT|8?H;h5JsVIMdpwLMH|W1_n=8KbLh*2~7aPV1s1< literal 0 HcmV?d00001 diff --git a/gfx/pokemon/staryu/shiny.pal b/gfx/pokemon/staryu/shiny.pal new file mode 100644 index 0000000..11546fa --- /dev/null +++ b/gfx/pokemon/staryu/shiny.pal @@ -0,0 +1,4 @@ + + RGB 18, 16, 19 + RGB 08, 13, 30 + diff --git a/gfx/pokemon/steelix/anim.asm b/gfx/pokemon/steelix/anim.asm new file mode 100644 index 0000000..5b6a63c --- /dev/null +++ b/gfx/pokemon/steelix/anim.asm @@ -0,0 +1,6 @@ + frame 1, 14 + frame 2, 18 + frame 3, 28 + frame 2, 08 + frame 1, 06 + endanim diff --git a/gfx/pokemon/steelix/anim_idle.asm b/gfx/pokemon/steelix/anim_idle.asm new file mode 100644 index 0000000..cf66cab --- /dev/null +++ b/gfx/pokemon/steelix/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 4, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/steelix/back.png b/gfx/pokemon/steelix/back.png new file mode 100644 index 0000000000000000000000000000000000000000..6788dacd9ea68de9043e7cbb9ee3080ed78b13e1 GIT binary patch literal 518 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7-&1`p*(sTU zf#C>C%6tX}29}Z_zu^D>|Nqa`aI0isU|j0y;uunK>uu=CX@?Csj4%EF|5<|N-lmeO z*@vHO^^EdPP|Vr>t^V)F?kD9HukY(89h<$^_(ew@^W@BL=NcrX80vF94IZ)f%dAN^ zcoS%y*m-}^8b&|PX+M}E{22r1nK(aYnz8K4%k7T}|9S1{?kKvWV)1b;#}iZ5cONX( z%e?h9`#824Ra}p_mePHnqOT072OvhZ~FyI~X{Jn7J@WH;ez-boX9Qi2t- zMOr=-eA%P@J!rFDv(0Bi6sLsrs?{KCY)iXT&e2 ze3>r5y3lm-MK`4zD{>z=K46TO{L_|@pzKp4sIX>LL`&!KCihE8UP>2a8N&Z$Tq{`M z$Tm$|;P|sE-+WCzB`OxQob5Rt6s*q6%X3-nsZ)oB?yH0owjI7vQ9lkPALkCRuv~R~ zXZd{ThG`zFc@F=3F5HnBonmpx{^9JSi;CImi>GxqEd25HM&_-j!uj&X8~CIi+6&b& Zbh)s_tYYT|&AEK+S(UU=8Ed7~z0hPlxgw%PVc<8Wrfh9CmG=rWuN=MHFUaS`NK9Pz(z;& z^xm#{s>0XAgm$j)+$-CX6`H{w67FQJVH8#r-RH$NIp*zRmYo}4tz8u`-8<*D^*jl& zt;TN`NJ?%!SmWm#{cftt-kpN0c6v;WIkRbTz0>p1c>kIGTluEGeRA~n>gVEzMlJ3@PTQ!W{^|p7Ip?yA`s$foTIBUC z@w3T)k=Uu8B57IM9Ake@5V>2M`_?oj`^VE~$&1#+ovP)TG8JHK)&L{OqI?C;kX0wHu_qXpS+rD;a zJI=cER^yIP{%kF$Wx5NsCgq)YqkXMW@4?C?5zBX6unFR?D0|tTXkU7&o%y=a(eFon z(#7_w1v9C6-QoT0^Poa1Y4*KXiD&PWrnl^0y;tr~`HmP<4!5V-r+N5y#tB9FrM)?M8N=VbToy%OX4L*cOOrGsNCX1hrxMSHk%NcjhpTy z9-Q}b$u6A@87sCk>^LMVw&Ce_rSdH#>A$0x_%^=~f;V!p%9k-)7 zbJ6S~cKguVn(ub>)=yPkI?epK?I1h57;hm4{d;gpHXX*5$GB7YOc)I$z JtaD0e0sxY}wmbj; literal 0 HcmV?d00001 diff --git a/gfx/pokemon/steelix/shiny.pal b/gfx/pokemon/steelix/shiny.pal new file mode 100644 index 0000000..d929c21 --- /dev/null +++ b/gfx/pokemon/steelix/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 15, 03 + RGB 15, 08, 08 + diff --git a/gfx/pokemon/sudowoodo/anim.asm b/gfx/pokemon/sudowoodo/anim.asm new file mode 100644 index 0000000..0e78f30 --- /dev/null +++ b/gfx/pokemon/sudowoodo/anim.asm @@ -0,0 +1,7 @@ + setrepeat 2 + frame 0, 10 + frame 1, 10 + frame 2, 10 + frame 1, 10 + dorepeat 1 + endanim diff --git a/gfx/pokemon/sudowoodo/anim_idle.asm b/gfx/pokemon/sudowoodo/anim_idle.asm new file mode 100644 index 0000000..ebed78b --- /dev/null +++ b/gfx/pokemon/sudowoodo/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 09 + frame 3, 09 + dorepeat 1 + endanim diff --git a/gfx/pokemon/sudowoodo/back.png b/gfx/pokemon/sudowoodo/back.png new file mode 100644 index 0000000000000000000000000000000000000000..cd7466ac386a45530e64969c7034bbc6b97a064d GIT binary patch literal 454 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7KPAe^u-KA; zfuZF?vMd7w14~JeU-19`|NrM|xK%PRFs6FCIEGZ*S{vH9?uY`1@UQ>>|A+)8G~HG` zpECXQ(%6L|>$cY0ocY0fe}23~!Tjw?0w45S0$Cg_{w^$M>agl+asG7o14B`heH-JA zski@R+uW;relb38bK!@Ap3^%^{s#1OToKwW>3?BTox+Qqf)CCdVgI9$V{9)pXXaIz zZxfEFq^og=&T+JLRZ2|zwq(JX`zPiYY@2Buxs%0zi`EOplLdmyTFZLoMXfq?L~cJv zwFW1nu2Guo0wbS=N>Ov0Rv9qz?|Ihz$)Gn-mP^-&X`ZTZ=b^a*{F~EW&taa{JjGP; z?QhW{RfV_$&*vEysVXdUt+Y60n5;@(a&PVeP%I=oX?-R9oBxhH!H z^c>x1bSpJK-t%RWa_=+lnxlDNvRB{8ljS&?)@Zr8%2(=x-@})wXCpSxcAncZo8`?v z$Jsl)74GckZ?Wat-W6@Y{ho!_O_QL;*~)`-c9G`CzdUV6d7>;?n8n&LDYi)4) z+!==B%e(YHl|?>LeAzXhgr;n0nht`GYBbMHZ<_wA z;eDlMefRWx9G6t}Zywn4P_@0jCa#L#=WoHIc^eGm7-JR08sij&dDlI9#**Qpc84Kg z(Nim7;fG-tezFQ1C3=VNI>mD8MbmVVFp#ND)1l@*s*Tyx-~GMt|Kr*_;`KVRORsbk Sd}Cl>VDNPHb6Mw<&;$UBe^WRB literal 0 HcmV?d00001 diff --git a/gfx/pokemon/sudowoodo/shiny.pal b/gfx/pokemon/sudowoodo/shiny.pal new file mode 100644 index 0000000..b82128b --- /dev/null +++ b/gfx/pokemon/sudowoodo/shiny.pal @@ -0,0 +1,4 @@ + + RGB 16, 20, 08 + RGB 29, 03, 12 + diff --git a/gfx/pokemon/suicune/anim.asm b/gfx/pokemon/suicune/anim.asm new file mode 100644 index 0000000..b44b77f --- /dev/null +++ b/gfx/pokemon/suicune/anim.asm @@ -0,0 +1,12 @@ + frame 1, 10 + frame 2, 10 + frame 3, 10 + frame 4, 10 + frame 5, 10 + setrepeat 2 + frame 6, 03 + frame 7, 03 + frame 8, 03 + frame 0, 03 + dorepeat 6 + endanim diff --git a/gfx/pokemon/suicune/anim_idle.asm b/gfx/pokemon/suicune/anim_idle.asm new file mode 100644 index 0000000..82df78d --- /dev/null +++ b/gfx/pokemon/suicune/anim_idle.asm @@ -0,0 +1,6 @@ + frame 9, 35 + setrepeat 2 + frame 0, 06 + frame 9, 06 + dorepeat 2 + endanim diff --git a/gfx/pokemon/suicune/back.png b/gfx/pokemon/suicune/back.png new file mode 100644 index 0000000000000000000000000000000000000000..b0245605569d845ba1a47a2339fc431ca695b339 GIT binary patch literal 518 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7AGP;?vA|LW z28Qr!j+P7z3@jx6$|Noz>;a17Oz_`@Y#WAGf*43%en+_}RIB(qg-!@+7rp=`# zs`Jg~+NoW1JT&9dE&H7edoE9|WS((bo8_MVB;p?8dh=BDb zJCAf9m2JEf?4z=!g6ry6y}eHy4{VHx>9E`NzDjRv&|QWN6Wso}>ND4Ue5RhT+fhic z>*y=lX6Xd8qd)q3yBO388K*232ysrD=`O?+aQ1C>i48-T!`2*|ca=9jx7{q2vSYY< zsp#pZ=Hyes`=eXd{NfayFFW6%=G%SFf>w9tYyX`8ocsCwN5D)g#+SDlrc|&uusm{I zaDOhFVN$Uy(+stj4hy1!ypM5IW@OA)U9j%py7rBh6Q|v=ynI02!IqIL&F#>PUyKpc z7B{SEnwF6rBDC)yGfXpH(8d{J!+1yO^|^2#?XlI~Ynh?(kCBgg z8{e~2H7c9DT$(d-K3na5_**pCtd3)a(W9z+Ij(0TuH4R8D9zA)FC_Tz;ZCzh{te}2 bf910-bDE#rlYWDNfq}u()z4*}Q$iB}N&)6P literal 0 HcmV?d00001 diff --git a/gfx/pokemon/suicune/front.png b/gfx/pokemon/suicune/front.png new file mode 100644 index 0000000000000000000000000000000000000000..f369cff81a957e0019610968d0b004da916d6573 GIT binary patch literal 1669 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU^3ufW?*1=G9@B|fq{W1z$e7@|Ns9{d;b>; zEM;I|2*2iN$-uzCQWE4B{Qv*||G64&l?)7QDxNNmAr-gY&h0L`qrl_J`u+d^o!u=A zAB}drH1T~p)8}z)yh_X2S2|jXRdy5jcG)#d=!?#rw((1V!v7Anx<2K^O_SF#vwB&H z#eeB4Rk6y(_Fh62>IHg>V{Sx zNti5sMVhtBHF<65A-49?863VD$Nakdc7?ZGb)QmKmUwoT&KgFYy-fdk79Z?e*0J4b z%DvYn7iM?A%2;wOxK6FYLi{qrk;_-ww{^dn9W#Gv%37s%HR&}@wM#y`)*Oo6y6awW z#CMlY2dyV!%h*=upE$IHJ5v0%URtx3i)6w+tq(a(#{y-KoKyJp`(P3N{){g@xWW9OCrUk;yU?ojr3`@iw%wFzzE z&$k-Ap1^0{GfApjMekPT#2aeoHQZJyJ`y`}(kTDLk0%S+C)yp`Iemp#@fAlY(Yy_v zto)PW(rceCT>i<*V|TZWBg0&S-&(@H@>`_1=N4s|1x&eAE8@PxyC~SNb;@tuT8GU3 z`3i4U(wwsL95%hpoUZi9X$9Z6NX}2pq08RyEcmc^hR)~m@=hD>nsRrkDH~#6wJ7q7 zY;!uNo*+BxdCXn|HkJ~$mku6ktVh)>kErF}d39@|?EUC{J9CXyeP^4Ozn|&Q`}2qR z^H=vj{djgK@!h}TcNZS+e!{o+a^BA7$Op5mD`w?%Je^=&5#%+q^2$p~lN%eK@m=Ih zIk2IbmGjIzk%A|Jc{`jv)fX^%`xS1#bMT3v?#qx1HwxOH-8<`E)yyRQ&frMXw^f4j zZiy!?r|se_*VyPH+PBNHJfmu_h~Cb_llnS&%SALOFh;)FBd%Rvx(w< zr?JGifZcS><|lm@Y@W7SOYzJoWS5%c{IE}rIj)fX)t>uB?um0%%NMB2K9ykHC0qVw zN$}?mk!7OgS0ZaYTE28|6D?n$w*I!t&7yX{d6Om{=`A=UJG11%%qNv%-0vJ7zBH_S zb@`_mt82w^+3LG&x*5k+UYl*dvGH-AZP}Y0kJS^8zrS#*RHW#YFjtj)WS6D-ekHM) z&Wi#Vp3hHrGWp`5)Xlz5>K%t}xs8kAtf`Z}U6=hX_U^(`24{Zn>DuKljE>AuY}Z_` zv(q`RS^J&AfyU%_6>-%wijU8jmAvWKg(CO2a&j-Tp7fnNt2&MM&P83;&@H!$+aqVM zd@Wn?i0?*VyzN=#@*AwHx!*N7F3x_JA@F8`wO7pjg5w{n+KbzZkJlfNtvD%L*7|gg z^&76!tmQ5i3@{GJ z@*4TO?|1dLs93%sz)oP@j^-Dt>t<7e{HKo&{_rt z28KEAhx{2B7+6Yz{DS}g|NlQ%!>y8mfpLbXi(^Q|t+mrQ`J4Ti@O!@*{Si zT9!%Rb5W~+tnB*A2ky52Jqi}Ly`QMJ^ka>xgv9Bl5dXOib*1N;T^_ZxS_#T%XS=b@ zGj4v#zEGdL!=}VX{acL35 zWE;_w6HkfRSe*E(bE58hhN^U^cG30IziicyaSO0M{`l%dLja>ow7W2Gd0WnwT}N&* z+`4va*(}$}+dHQ4IWRCj{q)@SJjVsNLP7=BqDSukbO#G8^;_uaOL*{Gi3 zhE(bDAm}hbjw*PPZ`CEn1i=dtI65-b|Bz{wL2pR*U3azI#b( zS$s9;>CVkAcmFKCAbo&2W3%0D>C*|a`zB?TKWBV>f%!OJ#kBbuWiDK4fYxZ|F{ zhoYsspB8aCavc;)zE!z%;$_-C1)Q6nCDk KelF{r5}E)9wbw2H literal 0 HcmV?d00001 diff --git a/gfx/pokemon/sunflora/front.png b/gfx/pokemon/sunflora/front.png new file mode 100644 index 0000000000000000000000000000000000000000..3771243637b6b037a30ce099d30b239ab03d9035 GIT binary patch literal 907 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1D&%nUIQWE4B{Qv*||G64&l?)8bTAnVBAr-gY&bnBnt;o^V`v33!oq-ov zUGJ8hJNt6OT$N~6SC?pR%+?#4agAopb$7gcz5d;beG_I}cqDe;-CVVEZU-(T zToPno_^@ex_JzUn&QVUlCa%DOdQzXyV6}Zxuql&gg0G z^tIXEs(f?1dh*2STbI6$d6TgB!KGULg@Hdgcg8JXN-nh1z4AMdGxWl>C96)_ti9%R zEnGDB(_s}&xld6_PNPVPSbM`2IutG6|;tvB#Q9G-n* z*KxkoS1f8#2M#yRNXm)Ie>Y33Pr^j9x^RsR)5;S~lg`w#>r@G;>}6PUEb)aV?{qsi zC1d#mxh%(YV%!#f(vy@ovEunrvY*{sVzI9N%stQ7pIgnXZ@T}Z(s_%ILQJj3`idVe zOq{;W?(PSnLvr8tv>Z?gGwZC#WZkh);B(Ll1-0A?O{10UL1(;g>@Gd*ooZibsQ*wv zN>HD5VPaGMqouwdett09vxWEl$GLCbGX1LSbn|T3?`vH1JCAezi66(j&tK<0x>Q>~ zQ#Ikkvoqe>|5fx=!SHWjT+)Lx-VxuYpWCzLoz;Uw-lzXvYMtKncPY32+T9}Jab4f0 z`|S~Vr*FF_MTD!B>#oYvrIqa2rYq0Rd8m3f&tT7%H~N)vSu!Q};t#b>zxH>jvHsfM z-WH#Qru|*|1Pb>b@~)Jd{=BeK&V2rH-#sPv{oGYM<{Uq}r^L3u`XEeh`kpCZ_=Ufs zllRP?$Ev-1^(#&?g#D}2tltljnzHB1{7;wo?X65AO=iwW0_7%8S3j3^P6t<7|Nc2g_7o=u z28IiP2c|PHFtC&a`33*~|NnokhFc{A1EYqgi(^Q|t-I4Mt~;W@;gb05|NqLVi*#Rg z-MzE?wVF!o^AiiMggmL|y;it}ZKcNk;I>uE+$9AgpD)d>{jl(umVR#Rg=hJTY%?Q{ zaAo|LdcN8B-rQp>b9V@E<+oc&?0qI@x}>)2$rZ+NPX+%&}>Ve z%W(hGvNV;jUv(?Kb{v|SVE30bOWREC?fTau6_*Y!JG7NuJvVx(tIn#e9hZtG1+2KV zNTgftTYjrXmWI{W4eUqmDd%o%TdNsu#`mU3=gTP`fz=N<3toGuF`fCcSpB5T!S9-^ zdA5s|zm*epmtatvZIzm^uAcn?YXidp=~vnf91BE0%N}5OAlk5>{mrfzhAGSp_RKf7 zOcGXh5UdP6^6%1&#xHzwHirMJDwajWddeS^VK1AuU%i}xfq}u()z4*}Q$iB}i<74w literal 0 HcmV?d00001 diff --git a/gfx/pokemon/sunkern/front.png b/gfx/pokemon/sunkern/front.png new file mode 100644 index 0000000000000000000000000000000000000000..5bc994e6de5315b84cffd71049706f25dac50780 GIT binary patch literal 539 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsBLf6kFT z#fgD|;X>en=?n}EEG0pH!T{D?xXaVUF{I+w+v#`n4lD4uZQTF8{`o`s zgh+!QX}cqOuV@AN^(yxHXTCLL*m5L6Adu;;gs}0$Q>Dx54dXpFI5ow2IvX$O^HjRk z;_76$_uis1f5-hi!pAz4<vCgy#dhdo_>nk~xvv#YY@b!jfA8vIX131>8#TN7Oj9EhoOWD2SNWjh zb;|Q8DbC+n6<4dM=B^b9^<(dCP8SSoZaC-pL1RJTFR3W8!n2bW@tkK8Ty8Gj zOZy^G?k-3F3-PnHJ-WFMe0*@@me-#cwH3Y!EL)FMxGho6DEwiu`K!^qV)=s`BjQc_ zbh8?l*RlD0x;AfXk>=G86R$YcO-Vmx{B&mj*B&TPtnPz_+93(wow_Q!jkW%GTTt<7zqdtVj-et0 z1A|V_=V%5729}Z_zu^D>|Nqa`aI0isVA$vB;uunK>+Ph|d`A>GT%UgW|KEng<$!xm z+S}5L$L2I&xOM9^2*fk)V4t5@DRANbIzFp6Th`1Lws^hBZPH?+502XPArGdlo%Um0 z%nzs62HgimYP9dZh&ngpr&IFVuIjTh-5+)~)o#82TSb>Md@$-NC;~s0= zB=kIMX6$6KmUSpzeTqGI%LW)alvyz4wPw+X_iQmM9 z(uI}NpCvv1q?Wr}SiSZ2Mr#f6$veF~@(wsSWxoj8HiN6`L6&NiMb(AQDQXXAetzX> zA|m}^*4{ge$ELoWxoGViyJde%zh0TOQ1|;PNh=ol5;IHPy=&5t<7@0Go`$Iy_0 zf#J~h!yF6@3@jx6$|Noz>;a17O!0^D+#WAGf*4w~nzQYC_-A{ktuRJQ@v?c5R zJ(>lr7)BB`vu6?8KIkg3=%!^-1Y3G}RB^X0CYi^x!9_I#J`@ z3nO2xDB1bv5$8!~Z_9M9D`z*n-=BG-bJ-0RiSW!>oDQ<9`maA)R&4Rc|Elzo=(bzV d*FL{zPDx`a7YsOgnSp_U!PC{xWt~$(698!mlcE3s literal 0 HcmV?d00001 diff --git a/gfx/pokemon/tangela/front.png b/gfx/pokemon/tangela/front.png new file mode 100644 index 0000000000000000000000000000000000000000..23c506929522eaf84ff44009c80766260240469e GIT binary patch literal 806 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{V3@$c%)r1~)jfk8y*MMiri{JMx6W+!h zs7X~j82ojCLvPt`cbEEX!*f^PeKCq{=-Mj(>~+)UO(M^?`SHX*di#&9z-yz|#u+N# zwH+pl&s4ke@7Cn0Or=-$z2UfUr##@d*p)6d{;!^YobxCB$ey-kb$g?GxQ^SSwKJdj zOD<+Ib*K%@+&@=(NtbkxQF_@q+Y9A<9~lh3a=1ivEq-L%_GM$lY29t_N{(D_diN>m zaH#V%o2yciCp%V{Zpx2d;wq?Mq!IcsGJ_#>;lidcgFSB;dUut%Ugc?+{J6mRt_Wk) zt*^!NY$9H&1namRFWm9`X6E0zOA9`^@HXD^;J7-s$@`znf_$5T-asP{M&0UK&6!;M z`dUnh$r=Q5jS;GRUO3iW@^;cuQs zzf;@yMaAyJ((0d_@w-wBUbdX8;Vf_9jE`FN@j7#SRE2On-@Ykj&mznFYBV<+&C0#c z9RDe}XBx}9=buy`olUpnCTV^a7Px%f{ZK0k%dKg~Ql{o3r; zQ}plV-VfeaQf(u$Z%c8=?|<#F&lslH9b_rkqssTgyyI~Fu6;i*naBUK{k)X#qeZ;Y zfp0aMC!SxfS*cYqPrp~r=FD`1zT$V!z4!k4T(go1qV}2h{hF8JXQuySI8rbDKzqlB RCt<7f38|H$WoDk zf#F*I1V07_29}Z_zu^D>|Nqa`aI0isV7TDv;uunK>+KY8p;iSR7GvY@`#%c{aM-tQ zH=DBSWm;2|;qOctmk}9TG0H#v~_o# znWnSxR)!vxp8Md(BqOe6n)VW2?cbWzY7ALYO}OWLx@z!q-=kuu@W;ENl?Ax>xs@<# z?{nc{^maZxyO;5G%dvom8y7?$WZfhE@3^R(H|M=)`HFRKg&B_@GW$RO!H>s%W-PK? zi7Oty;JC$~@N9dF$*CasD$!3HT&x)H3%_79I`X#V#>5zRdy6YXz=!`lUW?!aRn@@FZUUdhN?c zx46~4EpIsfa=x0sWx`tam5hnn%iGhv!qU^Pm#WI%4-`8mciwE$FT<`GTk6eA&zs!4 z;v_5LveV13Hl`@u>)fn4{kJr>aP=GSRXqB*Z-VkJoh$oZnyprR6|&dqoT1Yc_ltV( zw(-a&h#DnIN=IG~b^n++b&EjCb>(F~qER~oTOx9=`#pW~qSx^Cp72zWiQ36E4^9Q0 zGcT9*|ElYxdDN`q$mAoMB|6JDPM?)gF7LIe-S!ph{FaXriGK}ReA_xI7TF(qV_qlz z-Aiy){mjF?^)qZm_i*go-L=hIokhrd;-O=aH@(01Ssis3@V~s!J>`96({+oN8L~aA zCoEl@c2nt0al;MEG+8dimEBc4=CXeh*i>ca@UZIe!?o4wvBmY_b9<|fEGfL^D|otQ zqO*qHg?X(V*ESvX-5S~ji4p?cd@wf}X;CUTtp7x<0;n$kpvyEj%%WLZ4_+#$h-`mG%^wcE~H zm7G43C%P=ZIA`}B$Eo^u>36?=->Ufk#m1eF?T^UL5ZWkyC-L&)c}&Hp3J%LYo>qJ6 z;tD&(1ES>~f)(F9a+W={@_zTCGyZeW9pl%VKb(>E*yZtTx#!LYe5O-ot2RbGHF6fa zbMf_MPXEhyCQjBDD0tR)@xP5$3#b3Sh@y58%S~coi4Qr$?_4a}HB0|~al7-ur5m30 zDbLKAvZA>{G_Jt?xt8CaLo{oR5P z&ih*8?-WY6%##idd-TLcyF6o&_p~mNQ13q7w2OU#3HATPkc>Vg!lnQN5?{^0M5}aH?K`$4+Zn8EJC=t0L zBJ%2tsvS#t0^diaIXZhD@yQ)J_c_OD9@~A^@(&&FlHE5H8b?c?|G4b|-%>5(lhQv= z$Zp!}dC}#2W2W_wGqM7Uw**H!7%6QDy<@oT!!a=-cVUUkU&4#nkC-glXf%1R-eSHi zMMI7JjY6xQHn&=fSbti!G^*;ntlQO0(GJenEb#^II>8%r&rH1VoVh$=&xBMXPWFS$ z<`N8-PMW-B)zTHwX?~*m)-M}&-b)j`HxMHrQdb* z=viOmei!k4>h?QW;g=>-gJu{?5bSvhh0)zj&ivzJ%j* zuXW6isn&t<7zqQz~*iw;! zf#Ln$OD7o^7+6Yz{DS}g|NlQ%!>y8mf#JKSi(^Q|t+P`viZKiFxTHS&|9@vjtE!Wq z{H=-`o6m@_+nx%(~mi;=I~maNN0Ng zkALEIRn2<&U+M?0%{_j)VahY6fXU19_4pc8a+}_YSxsPFRsL;_L+p_iVM%;4yX&^v zY+$*?>gChpbL-V=ZtI^Z`Dsn=jQ;=I85Yl0lVH_pnrG)G@NHi?!*=ylp;^i040j`T zY&2$w-_I2IH$Z>A?2$Z{yVmJfe+T(j?wyxjYjghoYuU9C(t;O$b!fA@wf<2{ac59u zm~Zw+_R<#Nuho0zeEp}@%6p;npTxnMnz&7Z>;fNqo<}n|2#=y zP1?$k(!jH|os&8@%04c3p7;DRvr2x+6oZbscNP z%Lw}@U84M?NbyOx)b_y6zfK;?SI)$k?satW{d3bWeXiSwS8oyoRzK(s+u*l2g88&b z*hx#rtGDM|4Q;bp7;1OGW@~KvG|$}%hMXT|rrzqjGEaBPBlVD@uIZ_<-%p&sd#zP& zf^||kdB35!hJP;Iuna}IuZwE0nw)_RM>OzVWxpUg96dfo$( zbDzVQXF2&p;S-vths;Y``McNXDmOToij1|+?7zB zO;68!`1>5YSflvkp1_n=8KbLh*2~7aO CBO%cM literal 0 HcmV?d00001 diff --git a/gfx/pokemon/teddiursa/shiny.pal b/gfx/pokemon/teddiursa/shiny.pal new file mode 100644 index 0000000..f3b9973 --- /dev/null +++ b/gfx/pokemon/teddiursa/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 29, 10 + RGB 13, 20, 01 + diff --git a/gfx/pokemon/tentacool/anim.asm b/gfx/pokemon/tentacool/anim.asm new file mode 100644 index 0000000..72da385 --- /dev/null +++ b/gfx/pokemon/tentacool/anim.asm @@ -0,0 +1,5 @@ + frame 1, 09 + frame 2, 05 + frame 4, 10 + frame 5, 16 + endanim diff --git a/gfx/pokemon/tentacool/anim_idle.asm b/gfx/pokemon/tentacool/anim_idle.asm new file mode 100644 index 0000000..792fead --- /dev/null +++ b/gfx/pokemon/tentacool/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 3, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/tentacool/back.png b/gfx/pokemon/tentacool/back.png new file mode 100644 index 0000000000000000000000000000000000000000..7a7724189a577de093b6817f9c37b4273760d905 GIT binary patch literal 397 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7AGP%VcSDeh zSvy4!GcYi)lmz(&|NsC0f3AjGB?AMaj;D)bNX4zUQv)X*QQ&Yny6^v7amLtQvt9pB zhxiIz_7}J?c09GYoYJ;*JmqIs-`+v2?Q%#eZBvW zRYcO01{Q|XA{qihSGUJk7cJIvQj(hdfU{t4S7}}U$*(LK#w$H^)Fd62x>SocNJZVP z>0n+af54|9-15u2N3Rx!&1A@57Iit4|F6>pE1d%_1_@#19G>0sPugC%Je}DgbGa-x zcf0b*wh7D=nXDh4UcmQl#-8xL4%gk)3ts0ve(L?>p8?zMd*A;pVV^Yhcx2-9Cqk!R z+}+EztY28@zLMOv3t!!>(^dx9YO*+7$y{n~$nvwW-!+GGSKaDoCU@<$1Zw8QBz?Mm z*OTYT-(Kg-D$(zzd}?8Mn|wj*LFv4CU&N2wuMc3Wcb&9#F#`hwgQu&X%Q~loCIC6j BuV4TG literal 0 HcmV?d00001 diff --git a/gfx/pokemon/tentacool/front.png b/gfx/pokemon/tentacool/front.png new file mode 100644 index 0000000000000000000000000000000000000000..1e46847198b956cdaa4b6563789b0c215cdd9241 GIT binary patch literal 652 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-VEDkn%)r3l>U&L=fq{W1z$e7@|Ns9{OaFg2 z1gV&{Q}i$c0|QG*kYDis|NsBzYPeN0FfeI*x;TbZ+vLsB86AP2H z?mX?CEEzs`!Q9IotN9no&uQ-~bK7slA-k~5Z^iQh1@@zVLJR9N6kG03e!fnu`K{B1 zGRMt^9~NIaD*N&Ch2~=?6}Q!&V43r2hroune{B_1m5%isVL4L#gY#ve>7B{vB|GQ6 z(n$PPWgNV8;?C#OBJ{%66+C?X(n;52-?Sg?H||eh{@FX#YO>X2tIz(W$GkpAOk-Wi>Y0MWj|KV|6qRcaAjjVHF?pv0J$>$>5 zRtS{ucy;TLX2B!i%FHV>&%fxo{?dHz%L3`Sfs=Vxe`B9}an9_gcXXbo zLF}yeOE1csR=j!6?4{?HoLh3PX2JZEJ0s7XwKFyU&7^ux=5FkfJ^l;~3=E#GelF{r G5}E*@BR1^- literal 0 HcmV?d00001 diff --git a/gfx/pokemon/tentacool/shiny.pal b/gfx/pokemon/tentacool/shiny.pal new file mode 100644 index 0000000..1fec33a --- /dev/null +++ b/gfx/pokemon/tentacool/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 19, 31 + RGB 08, 19, 13 + diff --git a/gfx/pokemon/tentacruel/anim.asm b/gfx/pokemon/tentacruel/anim.asm new file mode 100644 index 0000000..0aeaa29 --- /dev/null +++ b/gfx/pokemon/tentacruel/anim.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 2, 15 + frame 1, 23 + dorepeat 1 + frame 2, 08 + endanim diff --git a/gfx/pokemon/tentacruel/anim_idle.asm b/gfx/pokemon/tentacruel/anim_idle.asm new file mode 100644 index 0000000..f0f2ae3 --- /dev/null +++ b/gfx/pokemon/tentacruel/anim_idle.asm @@ -0,0 +1,6 @@ + frame 2, 20 + setrepeat 7 + frame 2, 03 + frame 3, 03 + dorepeat 2 + endanim diff --git a/gfx/pokemon/tentacruel/back.png b/gfx/pokemon/tentacruel/back.png new file mode 100644 index 0000000000000000000000000000000000000000..4430f740fad0e8fbf2404a9166bd2a06c814a7df GIT binary patch literal 437 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7AGP%VH30zz z28P*RLqQ5zN`m}?|NsC0KUc%8l7WFS#M8wwq~g}wDbZrh3OuZw<^QYKRjM~^{rlSe z;}xwl0&)ip|2<9TUQ*Ne{lELaZUa`vWmC$#49=a`*xqH(dc9+5(c|MCY8>m6_ZS-7 zZb_ec^`gPNwivks(;g;BFg`u*e(1@yo`y~0zmIHv^~keAaDt6rlgUKU`u3c@cbsB% zV)J@$l$eVpCJCl-T%MfLePHo@Cxiax16QwKmP%6F@4i55#l?y!o@d<-s`2KG*Xo7E z9!E_)vxR$$dlsA2{I)Y;bz7#`lpTsbe(LsC?TwB;%5Eixw;yWr`uFRMaqkm*V+Yms z^Lbye_f2J&o0OCKxsN*}?u*S;8GD`O*2nWBE%P}ae`DsJZ!I}(`?O`bHij)CkLn&6 zx2@xFJ@8`9r+Z(OuACC;aDTZvFf4@q+1+eswtzjHw|E20kM6T+t5!M`v0t2ZA7h74 r`NGXlxF0ls-#oqM%aUy?Tf_yvaygTe~DWM4fu;{@4 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/tentacruel/front.png b/gfx/pokemon/tentacruel/front.png new file mode 100644 index 0000000000000000000000000000000000000000..fad5553feef06f02eea10cba79e3b39b62cfc7bc GIT binary patch literal 876 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*rq>!Z~$S?T+|NsAUHQXv07?`;|T^vIyZoQrHI&X~uPfPBzzxQ_@*?!~T zo2DyXe+9MXzKcxTF!#vG@Q%8NRt0g#xwqCOw8h+i^6%vo`J&n_PpX&K**sjl^iIOx z`EHd9%A3>L;^ud!gt4Ew_#`#-m8_cS3FBkilP`$;V561EqP7ncT=n-S@`bgx z=J8IuscFRi#>ly>g5mTmQ>O60Su-AUOznOwVK2^{R3o6eswH|a+YHX=V?k#NGP+J5 zDr{cU7I^G~+md1dz2p#{BUa1?rop@lZOTQHe2#F{*IkXi7|510Yw<7D#WU*uZk)OL zm(7xnsZaWh8@|l(S;!mll4;wfSo?h&>`eb&GJV|GVdbPh^+bzkv#v>3Y?HISOx6s; zq>s~2f1Pw?<@wBo7tjBkdNt*!|M4ot-u{*g@s}Gz?YeyUuYH{;Ges`LN;>4W+Y`OS zmlxlCVw}()u`BBJ##Y(CIbxZdF+72?m-q~1*B;DMX+M_1`%8B7$`prO{*ANmNW`oQ z`m62~<2_CFfp&<}g}nzi_58e=Z!=w*S!2>i*L1~_gy`n$hRz8drW!ubik*()RMuJK)p*ybFy)R^HC z+cud!D}%1bOwY(&bb9f=hbNycJ?lMtx|zP|o+J8|o$;T9p1W0^@HSo@9rvhp`XiH_ z&s9(DX?c@T*(t35^Jky`9ud8OIaN;^A_~^Lnd&BYy6Nu;@7{;p`i1AE&dl+#R@Qu2;U+v6=QuW6!_I8z*mQS9ZB_1l~%s7Rw{#g#2 z5PQK2vFmec+=NXv%rrC^uSgkbS}rbeXt2qglA!!B!2Rf)>8THwem!%hVfM?GDL=9p zKLi*2z1`HY%XQYQJA5m5HN8K$eD`7fpXr}3LA>)%UH|XV->P;0>pJi4jeoTL{d6P! z+WP%lK3%HYzvaIE+wb1L|ALkNpE>t<7|NUCjf5RRI z28Kz;!dMv?7+6Yz{DS}g|NlQ%!>y8mfl=Jk#WAGf*4rrug$^rlxHSI#U%zfc*UT^v zy}hkxLe9P^=1g+ESMgY%an7>dy4OivyYDKlVk%zwDneUIKX0YfshxZMyhRQOG!%vY zJJ!{$Ea1Wtp1dVyuCCg~FUeuA)CD+1cX3Q{U3z5QuUiSsTKtR~uh?8pX1>1SymX|p zSi0nu&@SiF&T`Jzq0>b#dQH6Xse50*yzl(Uw|``pJSq^IpcH5&)3B+k#G(8;AK!{y zTZ>kl3b7Jl@QW<_p199^_nUyUDGilRRM#6vY3{IK_`ts)JAA*zLSKi5efz}~UN-p2 z%QZhxuQ-19zopr0Q}{lVE_OC literal 0 HcmV?d00001 diff --git a/gfx/pokemon/togepi/front.png b/gfx/pokemon/togepi/front.png new file mode 100644 index 0000000000000000000000000000000000000000..3fc23b9d781ca7e3fcfa2f33569555d1ac8a88da GIT binary patch literal 469 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V5s0=W?*30zRqC<0|Nt3fKQ0)|NsBLUyJ&0 z*u%iUFzHwrD+2=qOG%Jl@c;k+|L1DBRWdLzmUy~2hE&{oJ3V^R5d{v{*4_VY`)#gR zFizUPa#qHzC98|21g1uBE4wva`opBl=Qo=+a!gGW3s&LzYW*df#rf@&H%YxS) zZI0A`_S>R=&;L_%8f?UwW`{qLXt{57efAUik0Q4c&Ms(}^`pRG)=V`y)wnKRsg<-UYpkXhWuV%K8f3I)08O&PmLZQRXcKr^Xs&*BOeYK_Wlh~ zDXcP^zQWn&t@kPeuP=+eV~w}vO=MlDUl!`I`es1uN|Py#`rUuMH#}^z75i-;$jY*c z;g0A3@5{Kp|GICMHNUYS&MY*-^siakzEw{3M?^0LZ47C=JZpDKZ+p(tRU4L^U2S`5 z>)-y6gX+u9TTG0q@rnXENv8pZ_D)=CiY6#o5P|#~O?0Sw5dx eJdg9dvAuK+#}_+uZ+!*^1_n=8KbLh*2~7Z1F4P|Y literal 0 HcmV?d00001 diff --git a/gfx/pokemon/togepi/shiny.pal b/gfx/pokemon/togepi/shiny.pal new file mode 100644 index 0000000..6e194e5 --- /dev/null +++ b/gfx/pokemon/togepi/shiny.pal @@ -0,0 +1,4 @@ + + RGB 30, 26, 11 + RGB 08, 15, 31 + diff --git a/gfx/pokemon/togetic/anim.asm b/gfx/pokemon/togetic/anim.asm new file mode 100644 index 0000000..1ed0353 --- /dev/null +++ b/gfx/pokemon/togetic/anim.asm @@ -0,0 +1,7 @@ + frame 2, 09 + frame 1, 09 + setrepeat 2 + frame 5, 09 + frame 4, 09 + dorepeat 3 + endanim diff --git a/gfx/pokemon/togetic/anim_idle.asm b/gfx/pokemon/togetic/anim_idle.asm new file mode 100644 index 0000000..c4a056b --- /dev/null +++ b/gfx/pokemon/togetic/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/togetic/back.png b/gfx/pokemon/togetic/back.png new file mode 100644 index 0000000000000000000000000000000000000000..9a92e0970fb4b71d886323242b93ba6211edc0e1 GIT binary patch literal 464 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjx{P=az;H z3=D5gmVqdik|4j}|NsC0&((0NWME*-_jGX#skk+D+C`>A3LLJDzyJTg#1 zw68%^`eH7}i}i{w|0NHd5!gMApGmH$!&=EEz>?~PR{Ea;KP-K?o+FTjw87D&})L&%ST*rluzTLyI1q zQCHNo_;{y#!Ucf>vjrZ%Uspd|*#1E0#ZINy>^t8od|5JOf)vMztTnqs+*%wrgfJb8 zRM&}I(m&h4s7h4Le(`)B@szU}tF5^=Gu>-RS+MGW;69F(Ovzu)baSt`W+J^eI{BZ$ZaM3O VS2GUmW?*1o@O1TaS?83{1OWW)(USlG literal 0 HcmV?d00001 diff --git a/gfx/pokemon/togetic/front.png b/gfx/pokemon/togetic/front.png new file mode 100644 index 0000000000000000000000000000000000000000..9851c901102937c2094f0b56fcde49c45845489f GIT binary patch literal 962 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@|NsAcmwtb4 zX~@99@YZA*h+-)T@(cd||NsA74Yx`L2IfRh7srr_TW@FGoF=Wv;}UrF|NqY>3M_B$ zsi@C9BXgR+Q+}C_*vbpG0jKW&ZODJ+#i?caPn1nL@T#L?s_=rk+xtQ^9d$JeO^PXSdRjvoSwXBre}-Nwbl=d1qB_*U@Z+ zyGPRB?%LaT_xEi-@7YRwy|UV-&089KgUNmw&&ASGe(%lU2bQkMyfyXjj2y=Gr^`jx zU0dNaebTZcB3um>nbng`(KOEU~ z&FAw0*@`$}&9FVEWM5dm2-Mqpo6FJ0Yu%m1lRn8lgV56kYcR-0@+2?f^i zmb=W(-X~d5blk@J)4s7@#dHR+-^ zX3Be8fx@=(zTm$19`8Kf{Rnw?qCBkf{>1OHFyhX{I}`7GtiAIwrD*<#b6lUUS+AbF t=HtH2N&7Z;fz0!I2hs?_KQ5maU#Xzfxv%&}Ap-*ggQu&X%Q~loCIExZ%}@XU literal 0 HcmV?d00001 diff --git a/gfx/pokemon/togetic/shiny.pal b/gfx/pokemon/togetic/shiny.pal new file mode 100644 index 0000000..10e7182 --- /dev/null +++ b/gfx/pokemon/togetic/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 24, 08 + RGB 02, 16, 31 + diff --git a/gfx/pokemon/totodile/anim.asm b/gfx/pokemon/totodile/anim.asm new file mode 100644 index 0000000..cf77dd6 --- /dev/null +++ b/gfx/pokemon/totodile/anim.asm @@ -0,0 +1,9 @@ + setrepeat 3 + frame 1, 10 + frame 2, 10 + dorepeat 1 + setrepeat 3 + frame 0, 10 + frame 2, 10 + dorepeat 5 + endanim diff --git a/gfx/pokemon/totodile/anim_idle.asm b/gfx/pokemon/totodile/anim_idle.asm new file mode 100644 index 0000000..52df376 --- /dev/null +++ b/gfx/pokemon/totodile/anim_idle.asm @@ -0,0 +1,6 @@ + frame 1, 35 + setrepeat 2 + frame 0, 06 + frame 3, 06 + dorepeat 2 + endanim diff --git a/gfx/pokemon/totodile/back.png b/gfx/pokemon/totodile/back.png new file mode 100644 index 0000000000000000000000000000000000000000..5cf6adf4287a08b51dfd6ed5478ecac9eacf2e70 GIT binary patch literal 405 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7pWJipxtAgX z14BUOE`J6F29}Z_zu^D>|Nqa`aI0isU^MY`aSW-r^>*rQp~DIsE`{I!|KGXjU_j%s zZ#&D>rk|5bW$Zms|Hov-<6ZJ6qi4VR`E5mhvc@&bTB{4p;@2!~1eTf9{%?L>b#>C` zC=~_9lHSY?i;j#lYyFe!Y;+gM8FZLkw_sq|)2YrN-Vnwx`<~B%y|xT%)!WYbvq;QL zRb!IU<^DP&e|rDvb!%^hK4qBjR5Q0zvtLlq(s2Qcosg`OGA)!1&|M zBJo5fZMC?DZSqMc&m7{_Nz%W?Q50DqH{QocjmsTH(6I;YtkpLSF37LHuQx85kHCJYD@< J);T3K0RX_EqeK7z literal 0 HcmV?d00001 diff --git a/gfx/pokemon/totodile/front.png b/gfx/pokemon/totodile/front.png new file mode 100644 index 0000000000000000000000000000000000000000..634d04189495339222b2b927607bd68d56f04db6 GIT binary patch literal 765 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|Ns9d_gs7K zrO3d*5RkdcpMimar6kBN`2YX^|8q6mDj67<=6Jd|hE&{o8*w{N$B={h&;S25Von@S zj3Ps=_(RoKt;#y?EoAU5U{R$Z!>^=Thcn_DC7CY&9Of7Nx}$L3qjr_U-M@k}nS=^h zZXGw`{^A zxrLU=HzpWvD&dKkkv$>og0O+=bLXjnb9GP6>z=r3YBYzaYn%LYfMR_f*d&15#`8^}ozb32GHj9?HymDOJ{9uXu?dV(E*)C46 zIkf9|!^&Is!|K)c_)n|8oiD806*vDUzn$^suTPAPPQE>vE|&0drsComt1$_$51g3E>DzR$ z`wgRNPut`|t^ZQ{o2TAQ_i_^4{q-6D{FjasOH`JKo=o3U8z6GrJF+%Ss3mY~_xXy| z_iEKHK7M4}T)h7L9=p%K&RCz{^ZCsDS?N;jDf5p#F+Qo^xM;y;8)2_i>)LPqlG^#( zr&#aS{-zn5cAwv}okcBf-4nsZ(w0hoO`L3tXE|Q{l;sxD7?E{ORi%JKLTT&gnK##2 z&OY9Jeo6V%D}C$_U*G;B-l}{!dy}5fTv_)0_tJl8&+q)+y8C>|=lwr@W*k17zUT_r z9jpK6mwlXRcs`~kEv59a@$yQy4VgF3+BCCP&Po69)h5`xa$dUHgTi@{5tXyj!;=0? bt$ZfG{e$?6=H~N(44`!F>gTe~DWM4fS6py< literal 0 HcmV?d00001 diff --git a/gfx/pokemon/totodile/shiny.pal b/gfx/pokemon/totodile/shiny.pal new file mode 100644 index 0000000..c947fe4 --- /dev/null +++ b/gfx/pokemon/totodile/shiny.pal @@ -0,0 +1,4 @@ + + RGB 18, 26, 15 + RGB 14, 09, 28 + diff --git a/gfx/pokemon/typhlosion/anim.asm b/gfx/pokemon/typhlosion/anim.asm new file mode 100644 index 0000000..576e733 --- /dev/null +++ b/gfx/pokemon/typhlosion/anim.asm @@ -0,0 +1,10 @@ + frame 1, 08 + setrepeat 6 + frame 2, 04 + frame 3, 04 + dorepeat 2 + setrepeat 2 + frame 5, 03 + frame 1, 03 + dorepeat 6 + endanim diff --git a/gfx/pokemon/typhlosion/anim_idle.asm b/gfx/pokemon/typhlosion/anim_idle.asm new file mode 100644 index 0000000..4da4517 --- /dev/null +++ b/gfx/pokemon/typhlosion/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 4, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/typhlosion/back.png b/gfx/pokemon/typhlosion/back.png new file mode 100644 index 0000000000000000000000000000000000000000..1808f308970bf5f87c35bc57597285946c04a95f GIT binary patch literal 462 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|NoxXJwpiw z28QJCm)RH?7+6Yz{DMK^xf*Vj3=E99o-U3d6}R3_@t$#O+J+cgy1uzdBaH{Hvt@cY)L z3+#U*+{Dz|UIfqG@cL}Wk@hN~uO@C0zn(O#lYjr!{NmH&J>IWo|6#S2;%ZZ>2%X8m Pz`)??>gTe~DWM4fRQbsx literal 0 HcmV?d00001 diff --git a/gfx/pokemon/typhlosion/front.png b/gfx/pokemon/typhlosion/front.png new file mode 100644 index 0000000000000000000000000000000000000000..aef81a01b6862da7e8f05ebec194ddeed6bef6ee GIT binary patch literal 1240 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@|NsC0?|I!b zlwe?BNdA7Aje&uIr6kBN7$lyn;a17Oz*6q%;uunK>+S5flb$GWxU$~+Ki9lzMQ4MW z{j#idk6hp7o9``na6NNU&>ZHommgdR;`qh7eE(901+~h1dm4)3{MQ-pOb;2DZzg_i>8M)-#T;kd{X-{ z#pf5!98`(d-DErKs>-fw0n2yk)V$bn^z4+|J`>z7I^WnM)#_Z*Ewqboj>e(2%eJ=t z;*@aRKgBb=wn+A@y+mkn*Fn)%EvAi~^SleEyt%k~+dH+!yVkt?DtU1aoo>ALOcg6z z&o`ST)?6oUd1(g2iu!A_CV8AHXblVDIc0j-ayqL7yQlhlUJ=E9!3wLdS=>(Ab({;? znM@R<{+P;zU!Ik(@6PMIbZemnTlnf*k)7#FcCLCQ@pZyg)>pmy)+eq8XL7ezXwHzI zcx7Tx6!XQ`@)^6!6K;g4x_B|Yci@@2F5uTQ>7^l4T}t)dC`%tnEyJqs#?XA z*|!|;b2Kh{a5?&6U8}1>>lRU|!XxXQ9#nqrp78v(zSF#;+xBTLD_Fh6>bdA;+eDXT zKP!7ZETl@cQ^KZ|RcmjU`rCHqWBFTGE}KY{$$u)TIa$uXK4zNf&W?4HxNdA^iM2mD z=hWK^{Iav}lwLY6r&Pj!m+Qfvi!Z02HEsWOVYRS#toh2nk6Amy84oLL+i;nK=VO!Z z{N&Vl+oH5XqD+oKMtU-j$V92& z2XX4#!}PQ|9)7D2d?n}eJw)JDh@qQXvPi>(V@n=P*cuzul6*{A{;q2Be z2Wmz9!WRBKEp?d1;T+?{=+0X*`7@RXguPt1n=$ctZ2pE)*++M`B((?MX5O9`&C@P-%~Yn`DqCi|Yv}`vp9hkv*wba^JFS!} zVh_7rzV;5|p{a=hIqx*?yt?}+;{mhqIdR4BPyLOc98Xhs{=Me%-;eY`!cW|_{R z8u#aX>bD<0wN`p}K;yn(k^7AI77zJq&dVw~x7|s6W_@l4^WCz%orhPy?6Zz}e&kN# z6KlR5htHP3*>U)M`J96G$Ma`cTbylrzayFF;`Tci-9J~qn_&5zyF8=r=;OYLY%vwA z$?q~=UraK1#&@%**hakBusopudDLaw@+)iPY998P3EeAh&oSOt!2a88r!oY7mYwL* zL!=fhpZDzTKkdYQ_b1+g!t;?&i^G1-3AIa~3TCFCk7Rvcp0Mw}V4*uq*~jTS9?SD5 XxXU>5|1@A=U|{fc^>bP0l+XkKazt3= literal 0 HcmV?d00001 diff --git a/gfx/pokemon/typhlosion/shiny.pal b/gfx/pokemon/typhlosion/shiny.pal new file mode 100644 index 0000000..5b3df0b --- /dev/null +++ b/gfx/pokemon/typhlosion/shiny.pal @@ -0,0 +1,4 @@ + + RGB 29, 23, 09 + RGB 22, 00, 19 + diff --git a/gfx/pokemon/tyranitar/anim.asm b/gfx/pokemon/tyranitar/anim.asm new file mode 100644 index 0000000..c665e08 --- /dev/null +++ b/gfx/pokemon/tyranitar/anim.asm @@ -0,0 +1,8 @@ + frame 1, 14 + frame 2, 16 + frame 3, 16 + frame 1, 14 + frame 4, 16 + frame 0, 16 + frame 4, 16 + endanim diff --git a/gfx/pokemon/tyranitar/anim_idle.asm b/gfx/pokemon/tyranitar/anim_idle.asm new file mode 100644 index 0000000..5721310 --- /dev/null +++ b/gfx/pokemon/tyranitar/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 08 + frame 5, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/tyranitar/back.png b/gfx/pokemon/tyranitar/back.png new file mode 100644 index 0000000000000000000000000000000000000000..07f6d1b5768ccbc4c97d0c60ad945929660564aa GIT binary patch literal 497 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7-}0QHI_Mq) z1H<~c7fKlz7+6Yz{DS}g|NlQ%!>y8mfpLPTi(^Q|t+`V*Y1Q=^D3|d;k1Xu&`EbNw7SFp!$=j@0VVvJehXVt4*(gV+O-@J7Xh` znAwSf=eboFnM~An3Cg7`t>8K#%F$H#ck;5zy+VJlefxDJKA2@;pnUZ2-U}y|Ond11 zHRh@d_d*8-2gYx+G(Jt>so8%tza{hV&J2xx&u(U)n&f$W_TGM%-zf_t8w-Q&o|RWz z)Zy}EiL05|y?@ybfz6$>9!<4i`meO*cZl{!o}UaWT7}l+a`5r7Jf44_PxINyV3pT5 z*FDU^Cga5w)eTR*7lV(bLOJYD?aRh=x6dJa=ENZ#G}_*ahqDs6&K6&Nparo z5xl+fP2S6oq0cu(?9O>-FqP}Z-JrG~-CaCEDF@DcVE*)mePfuciwFY)1B0ilpUXO@ GgeCyJ%i+8L literal 0 HcmV?d00001 diff --git a/gfx/pokemon/tyranitar/front.png b/gfx/pokemon/tyranitar/front.png new file mode 100644 index 0000000000000000000000000000000000000000..4b1ba3416a9d7c53293656bc3a50f83b70751973 GIT binary patch literal 1479 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@|Ns9j&l#$N z?lCYhte<z@qLn>~)oqcmo+>f|D`xb2J!ZyUOL9cG?VKZ8$x!v4;g>5HPvogcp7ozu zBQ5kTIFEVj(tUlNC6e#Ws-%r>rgi*vpZn|3?0|OdX`c@LNnMb1rf|}y1AU2sYb(O{ zw=d5v3vK-H?d3f4PVrqQ#exsr-g-{_yu$Ps$=7e5zxr{S(`^pUWj!aIvRCc6xoQog zmDA^~oqnG$?Xas<{q0)xXrrmJskh@J#h>Mm9&QZhJFEHgVd{xBna`_EZ0626JM(&b z{A36I+_OQEi+6gyIv165`O&tBt&$cq!>9T0$Wd;b*)eb1g57!fD><8WQ>WbAux3%e zoB8D>`zM>9s-OI(;otjDCO_XQggl=pm>PP0$&F1G*|H59-NKG{ZufL0mfv}H{qB`0 z*W0J8u4k`*!F#rIb~o!orpP$0i;s+67-wFcTegs+R7vPG4eWrS$5yT?=KH zd4JAavqa_cCEhE|F^reapW3Xl-05P3>A9DY9%`cAs~a@eUb$CvZOxw${;R2%R*65~ z`7SZ&bH=97z1tSQ-WAuop7G`%%iGhkQVQeBy96XQ8E#Iq_A5W6Irs98wc$^_Gy)IK zQY%T^GA7#8He8h5oz{0P zegDzlCAGSm<{xedCHTS0na2ini-C{dX{LH9mf%@!Fll`yo84@^T7ccLH}+d=)s%{&mx{eZlV`$*(wrj6R3NAFe_Myi5 z{f?=9&rII!{(H3Y_=V>sX&)YLEWKA~uXFbS-`o8K-g3L2%dRODxg&@IKX&g(KI8WL zPNDU-8_)X!D-OvXt~}0J&huPW{f^Z5> z?YRH&rQ*BtBY*oIz+wCe+3l~ze%~pSH+VPoeUW=t^;3kE2W9J9t?L*riMX^I3dFKA QFfcH9y85}Sb4q9e02`I=X#fBK literal 0 HcmV?d00001 diff --git a/gfx/pokemon/tyranitar/shiny.pal b/gfx/pokemon/tyranitar/shiny.pal new file mode 100644 index 0000000..4eebd8b --- /dev/null +++ b/gfx/pokemon/tyranitar/shiny.pal @@ -0,0 +1,4 @@ + + RGB 21, 18, 15 + RGB 19, 01, 31 + diff --git a/gfx/pokemon/tyrogue/anim.asm b/gfx/pokemon/tyrogue/anim.asm new file mode 100644 index 0000000..3c8a3ee --- /dev/null +++ b/gfx/pokemon/tyrogue/anim.asm @@ -0,0 +1,6 @@ + frame 1, 08 + setrepeat 4 + frame 2, 05 + frame 3, 06 + dorepeat 2 + endanim diff --git a/gfx/pokemon/tyrogue/anim_idle.asm b/gfx/pokemon/tyrogue/anim_idle.asm new file mode 100644 index 0000000..a0c4f2f --- /dev/null +++ b/gfx/pokemon/tyrogue/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 4, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/tyrogue/back.png b/gfx/pokemon/tyrogue/back.png new file mode 100644 index 0000000000000000000000000000000000000000..22c1d61c47cf30cf69150e976b04714694c8aa2b GIT binary patch literal 465 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zqfiykEH|y z1H6$|Noz>;a17Oz*ykv;uunKYilTH-w_2K=HLJ8?@d^IVbTWK zUbdB@OUvH1T-z6~V1M}ZXTjFBryu!qWOdl+b26U`c);=@<)lEZ`hh;}Jr8d%N;#gd zC<*=dS~~CkNonVEN4<}DH?6RIG|_-<>9KT{#0~4_PdVr;By~?X#PRiC(`HpW^(R~^ zl{$x7?p57>Ft6gATg>T4ozEwIFi0-idHVjG2d~c0Yk11i7g>BFPP<^|7KJHOf2s5o zl=?0Hr~V^xX;Zn)OTl$}AKdcTqP3fUd(hE_>ex?)DM4%tEe{JlXj&BiX;#aUne#+; z#k|ndby0dX#l^+bz3-B+D347|nt*u0e&&p-T(!&P%~7UVA``z(j#gS4-}~g{rmyn8 zsjIE4v(w$~F1s%Gt8qeG$!o69J7gO7q~GKg{cvTD@1r*?zb8IyRy5kH)h50nD%I-m zg463XriFfB_mNcW6Kc+*G0z{&J~fq}u()z4*}Q$iB}c1h9N literal 0 HcmV?d00001 diff --git a/gfx/pokemon/tyrogue/front.png b/gfx/pokemon/tyrogue/front.png new file mode 100644 index 0000000000000000000000000000000000000000..af8af4a4eee37db6cc0f01bbb907d6e9b976dae7 GIT binary patch literal 755 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsB@R!`}% zlwe?B`2D5Zi-CcGr6kBN`2YX^|8q6mDj67TmYX>oq1@zG;0l zH7n@I4at!86SfN+J?xq39`>l&=*j%t2|bgAcCTT7UKsA>6PV{cvwgA1u@YCy8Rz6r zZB=o}apGGxlPy4RsdWI)vx86kI{a2F67kYExv!?PGvFW7@su-5j%sOM@SOi>$?E>r zkasWlUeAf%di6<2z$+c*q}hFa0U;@KCmAWK8uNH2OT5S^S2bjdwNrc+a4hhC3Rj7+ z&io6~pE;D=SK3|RH~AVCc3W%03ij>KR$r0L3iSKJ+Hz&_IT6hSk&iJpF4`q!YE7Sv zdfP*to^b`ZZr%_!@92UK4tI&{6P8YaFS28N_~efSNq#d}J1wj+ZGNHWp4ATKuMft$ zEC2SM5-?Xyf%A#C?~AFn{U1%_mNH~loUXi-ZNH@c--S=|>HiGUoqimfS!wrc4&&i1 z`)bc6ygcK6&YnM>zP__kCt z-{SJ6jZh&s>Ys+ zlH)TgzrC|GR^Rgc%#`zw&wyb510I)>=RQC4Y9II1-F`mT_|2b;{`T{d$FeSkJ=!#1 z)BNki`QMB$-96o8`7Zs^QHI-|vfqstetf!P{z_}T-s0W!C4XN`wBP(~i*~wG#hgko z{F#3);{L8ewNS^||5}Z=ynk+f&VzrOTJaMeZ>EQbBp33`DmpLud%eKBITI!1)8)Xh zjwgNAxmr76uJkkSzy0Jnq+nw+zmucy`S+S2 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/tyrogue/shiny.pal b/gfx/pokemon/tyrogue/shiny.pal new file mode 100644 index 0000000..53e0a5c --- /dev/null +++ b/gfx/pokemon/tyrogue/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 19, 18 + RGB 09, 13, 29 + diff --git a/gfx/pokemon/umbreon/anim.asm b/gfx/pokemon/umbreon/anim.asm new file mode 100644 index 0000000..3f0ec81 --- /dev/null +++ b/gfx/pokemon/umbreon/anim.asm @@ -0,0 +1,8 @@ + frame 1, 07 + frame 2, 30 + setrepeat 2 + frame 2, 08 + frame 3, 08 + dorepeat 3 + frame 2, 30 + endanim diff --git a/gfx/pokemon/umbreon/anim_idle.asm b/gfx/pokemon/umbreon/anim_idle.asm new file mode 100644 index 0000000..91a8ce1 --- /dev/null +++ b/gfx/pokemon/umbreon/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 04 + frame 4, 04 + dorepeat 1 + endanim diff --git a/gfx/pokemon/umbreon/back.png b/gfx/pokemon/umbreon/back.png new file mode 100644 index 0000000000000000000000000000000000000000..f1cce4fc8aae49050350e281e983a21a2dfb00f3 GIT binary patch literal 433 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zqg0M&{C6u zf#J7YbR+`<14~JeU-19`|NrM|xK%PRFa~(KIEGZ*nmRRn+EE1_=iJQy)$>$L9v_na z(Nj9{wxW_bdr|p;XxqZ&?hNy+Pek=guxwiIE${R;dz#ip1{Q^l?19h&{HOmH(`b|AtQ6yxSJbJLUi`A}y_R~!-((?2j9 zXj{95E!(1V;n~->{8`OrORrTVy(+xmzsR54W=XQyLW`%j>zSuK;<9+TS*U>fL(M;a z5&Led#bN=zybqSnc+da2XIt*!h^agWc8QtIl)IGjnaNQ83!4JF!sb(7+fzSj%=)?E p`GVJl{k>cH53DF!%4q(^eu*wmOpSq73v|8Dpy)v(Urgj;{MTt2r;3 zl9Z-9t2c@~_F}OUIQzAKQL@@Phd2Kgox!9*TOYxyYz&ie)rz|#?{eNB*_F3_{f&a1%(G~OFF|et(TwBL` zKyHgUqi&4glig1$6(>Bao3?y`)|E+0`H4aW3JwI+Yg+aO007fRCdHaSRu0dWw2wK z!p>)Fm+f$BW&M_Vu5?A_T+J%R8ScIXkrM4(0$UPieXgw+pCVjRmu<*@KH%&VSD(im zm!~>hdXaZk$g%ca&Hk9;IZllwGbPu4Jrp^Mwfx(2@$`a|y*eKkOYE^WI-;;jbJnJH z?ANpvTAi-@*yT+5*uAX&f5JWX8B1T-UFfOC$s$Y7k_*`L}QN3+~>zmUYdUkh zveO{`fOpGJ3w_r!?4m4I7JoU?_RW}nV3+9UOJ{2KH%C47h?fDX3;koB)Y}_o(grnZf|6Xk0 zGv)nyz1e$IVmF-i7Q6It>Hq%e=e{rfzF%K;^?N=2o8qT(<1Q_fYoGqFWxB=xfVfNR zD>NCFiC1dYp7wqj9rviIbGpi=h6+z*?vCj>hjXV-f90ilQ0{&6bg4L2rdqBdl^K;Q zABH}-Jb8MSlF6scCrh{O*UGH-H&lo{;l1mL_J-v*M0Vewen*IJpT1(;q{H5DcNYB@ zdbHH_|0E;5#=qX3^(8eM>pM9!{tKPUxv>Ap^cO4ZH6N+o*e~))=vDl!2TM2BXCCw} z{(q@ydfK&)O3n>#XS_R1mExM#2!0g0cRK3A`90H@Chix$b^6dAk+1r#dsrf!{r+Ei m8E>`cOLxV~FZ#X5`S&k34}C7Sa1jFo1B0ilpUXO@geCyS%gzA+ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/umbreon/shiny.pal b/gfx/pokemon/umbreon/shiny.pal new file mode 100644 index 0000000..9173bbb --- /dev/null +++ b/gfx/pokemon/umbreon/shiny.pal @@ -0,0 +1,4 @@ + + RGB 10, 11, 31 + RGB 06, 07, 05 + diff --git a/gfx/pokemon/unown/anim.asm b/gfx/pokemon/unown/anim.asm new file mode 100644 index 0000000..3756c41 --- /dev/null +++ b/gfx/pokemon/unown/anim.asm @@ -0,0 +1,11 @@ + frame 1, 05 + frame 2, 05 + frame 3, 05 + frame 4, 05 + frame 5, 05 + frame 6, 05 + frame 7, 05 + frame 8, 05 + frame 9, 05 + frame 10, 05 + endanim diff --git a/gfx/pokemon/unown/anim_idle.asm b/gfx/pokemon/unown/anim_idle.asm new file mode 100644 index 0000000..73db06d --- /dev/null +++ b/gfx/pokemon/unown/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 11, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown/bitmask.asm b/gfx/pokemon/unown/bitmask.asm new file mode 100644 index 0000000..91a562a --- /dev/null +++ b/gfx/pokemon/unown/bitmask.asm @@ -0,0 +1,30 @@ +; 0 + db %00100000 + db %10101100 + db %01100111 + db %00000000 +; 1 + db %10100000 + db %10111100 + db %01100111 + db %00000000 +; 2 + db %10000000 + db %00110000 + db %00000100 + db %00000000 +; 3 + db %10100000 + db %10111100 + db %00100101 + db %00000000 +; 4 + db %00100000 + db %10101100 + db %00100101 + db %00000000 +; 5 + db %00000000 + db %00010000 + db %00000000 + db %00000000 diff --git a/gfx/pokemon/unown/frames.asm b/gfx/pokemon/unown/frames.asm new file mode 100644 index 0000000..b176918 --- /dev/null +++ b/gfx/pokemon/unown/frames.asm @@ -0,0 +1,44 @@ + dw .frame1 + dw .frame2 + dw .frame3 + dw .frame4 + dw .frame5 + dw .frame6 + dw .frame7 + dw .frame8 + dw .frame9 + dw .frame10 + dw .frame11 +.frame1 + db $00 ; bitmask + db $19, $1a, $1b, $1c, $00, $1d, $1e, $1f, $00, $20 +.frame2 + db $00 ; bitmask + db $19, $1a, $1b, $21, $00, $1d, $1e, $22, $00, $20 +.frame3 + db $01 ; bitmask + db $23, $24, $25, $26, $27, $1c, $00, $28, $29, $1f, $2a, $2b +.frame4 + db $01 ; bitmask + db $23, $24, $25, $26, $27, $21, $00, $28, $29, $22, $2a, $2b +.frame5 + db $02 ; bitmask + db $24, $27, $1c, $1f +.frame6 + db $02 ; bitmask + db $24, $27, $21, $22 +.frame7 + db $03 ; bitmask + db $19, $24, $1a, $1b, $27, $1c, $00, $2c, $1f, $2d +.frame8 + db $03 ; bitmask + db $19, $24, $1a, $1b, $27, $21, $00, $2c, $22, $2d +.frame9 + db $04 ; bitmask + db $23, $25, $2e, $1c, $00, $2f, $1f, $2d +.frame10 + db $04 ; bitmask + db $23, $25, $2e, $21, $00, $2f, $22, $2d +.frame11 + db $05 ; bitmask + db $27 diff --git a/gfx/pokemon/unown/normal.pal b/gfx/pokemon/unown/normal.pal new file mode 100644 index 0000000..19f5252 --- /dev/null +++ b/gfx/pokemon/unown/normal.pal @@ -0,0 +1,4 @@ + + RGB 15, 15, 16 + RGB 07, 07, 08 + diff --git a/gfx/pokemon/unown/shiny.pal b/gfx/pokemon/unown/shiny.pal new file mode 100644 index 0000000..6a30f11 --- /dev/null +++ b/gfx/pokemon/unown/shiny.pal @@ -0,0 +1,4 @@ + + RGB 14, 19, 31 + RGB 02, 11, 31 + diff --git a/gfx/pokemon/unown_a/anim.asm b/gfx/pokemon/unown_a/anim.asm new file mode 100644 index 0000000..add08b2 --- /dev/null +++ b/gfx/pokemon/unown_a/anim.asm @@ -0,0 +1,12 @@ + frame 0, 08 + frame 1, 08 + frame 2, 24 + frame 1, 08 + frame 0, 08 + setrepeat 2 + frame 3, 07 + frame 0, 07 + frame 4, 07 + frame 0, 07 + dorepeat 6 + endanim diff --git a/gfx/pokemon/unown_a/anim_idle.asm b/gfx/pokemon/unown_a/anim_idle.asm new file mode 100644 index 0000000..ec5f6fb --- /dev/null +++ b/gfx/pokemon/unown_a/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 5, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_a/back.png b/gfx/pokemon/unown_a/back.png new file mode 100644 index 0000000000000000000000000000000000000000..b1d6de88a1061fb527019eec2dda66d580cfda94 GIT binary patch literal 241 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|VS%TMV@SoVw^I&s9X8-`)_wZ_f91D1)3%7H$ree32%I>mzv;1s;QF|~ zn>~!>9EBS=dp1f+XkI?B*?=*Gb!&pm{Y6!dDydAO^K)mjs4y=H;qKA?aQP9pj;7~< zpe-D0nl7@wjZ2ieqqF02rcR4QKi|?Y$2k)x==N1EV~pUt+ws#(K>AmJLp>8;zU&L=fq{W1z$e7@|NsBh)h(8m zP7DkTI~^F@7#J8eJY5_^DsH`<@sR6?0#CDV&Hr+{*so?g5{Kot2SI~Z{5m!F<`Su>kH#I_8et~Gul}0d2 zaGPsw<;B<6PNZmmc>b|(!`VLdez|8omYeN9N2r`*Nn<(J!^bt}r1Na!XFZn5=VloH zKR0uuO3*o;Gf(Es6e~mywBViB=+oWyz#H_Q-`Nb zZ-MH4*7N>sTxGtS)|{K$v$yShv>@Ts%xTBMJGV|)R4^y7sUSrCF;BVd`|0j_J1mpW d#XLI0-gZ$qePdvl9s>gdgQu&X%Q~loCIBI$riuUn literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_anim_pointers.asm b/gfx/pokemon/unown_anim_pointers.asm new file mode 100644 index 0000000..334a5f9 --- /dev/null +++ b/gfx/pokemon/unown_anim_pointers.asm @@ -0,0 +1,29 @@ +UnownAnimationPointers: + table_width 2, UnownAnimationPointers + dw UnownAAnimation + dw UnownBAnimation + dw UnownCAnimation + dw UnownDAnimation + dw UnownEAnimation + dw UnownFAnimation + dw UnownGAnimation + dw UnownHAnimation + dw UnownIAnimation + dw UnownJAnimation + dw UnownKAnimation + dw UnownLAnimation + dw UnownMAnimation + dw UnownNAnimation + dw UnownOAnimation + dw UnownPAnimation + dw UnownQAnimation + dw UnownRAnimation + dw UnownSAnimation + dw UnownTAnimation + dw UnownUAnimation + dw UnownVAnimation + dw UnownWAnimation + dw UnownXAnimation + dw UnownYAnimation + dw UnownZAnimation + assert_table_length NUM_UNOWN diff --git a/gfx/pokemon/unown_anims.asm b/gfx/pokemon/unown_anims.asm new file mode 100644 index 0000000..6aa239e --- /dev/null +++ b/gfx/pokemon/unown_anims.asm @@ -0,0 +1,26 @@ +UnownAAnimation: INCLUDE "gfx/pokemon/unown_a/anim.asm" +UnownBAnimation: INCLUDE "gfx/pokemon/unown_b/anim.asm" +UnownCAnimation: INCLUDE "gfx/pokemon/unown_c/anim.asm" +UnownDAnimation: INCLUDE "gfx/pokemon/unown_d/anim.asm" +UnownEAnimation: INCLUDE "gfx/pokemon/unown_e/anim.asm" +UnownFAnimation: INCLUDE "gfx/pokemon/unown_f/anim.asm" +UnownGAnimation: INCLUDE "gfx/pokemon/unown_g/anim.asm" +UnownHAnimation: INCLUDE "gfx/pokemon/unown_h/anim.asm" +UnownIAnimation: INCLUDE "gfx/pokemon/unown_i/anim.asm" +UnownJAnimation: INCLUDE "gfx/pokemon/unown_j/anim.asm" +UnownKAnimation: INCLUDE "gfx/pokemon/unown_k/anim.asm" +UnownLAnimation: INCLUDE "gfx/pokemon/unown_l/anim.asm" +UnownMAnimation: INCLUDE "gfx/pokemon/unown_m/anim.asm" +UnownNAnimation: INCLUDE "gfx/pokemon/unown_n/anim.asm" +UnownOAnimation: INCLUDE "gfx/pokemon/unown_o/anim.asm" +UnownPAnimation: INCLUDE "gfx/pokemon/unown_p/anim.asm" +UnownQAnimation: INCLUDE "gfx/pokemon/unown_q/anim.asm" +UnownRAnimation: INCLUDE "gfx/pokemon/unown_r/anim.asm" +UnownSAnimation: INCLUDE "gfx/pokemon/unown_s/anim.asm" +UnownTAnimation: INCLUDE "gfx/pokemon/unown_t/anim.asm" +UnownUAnimation: INCLUDE "gfx/pokemon/unown_u/anim.asm" +UnownVAnimation: INCLUDE "gfx/pokemon/unown_v/anim.asm" +UnownWAnimation: INCLUDE "gfx/pokemon/unown_w/anim.asm" +UnownXAnimation: INCLUDE "gfx/pokemon/unown_x/anim.asm" +UnownYAnimation: INCLUDE "gfx/pokemon/unown_y/anim.asm" +UnownZAnimation: INCLUDE "gfx/pokemon/unown_z/anim.asm" diff --git a/gfx/pokemon/unown_b/anim.asm b/gfx/pokemon/unown_b/anim.asm new file mode 100644 index 0000000..abb3bdb --- /dev/null +++ b/gfx/pokemon/unown_b/anim.asm @@ -0,0 +1,8 @@ + frame 1, 08 + frame 2, 18 + frame 3, 06 + setrepeat 3 + frame 4, 04 + frame 5, 04 + dorepeat 4 + endanim diff --git a/gfx/pokemon/unown_b/anim_idle.asm b/gfx/pokemon/unown_b/anim_idle.asm new file mode 100644 index 0000000..4719fd8 --- /dev/null +++ b/gfx/pokemon/unown_b/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 03 + frame 6, 04 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_b/back.png b/gfx/pokemon/unown_b/back.png new file mode 100644 index 0000000000000000000000000000000000000000..a77426a43cb6027a8226d5ed30d0e85a58cae398 GIT binary patch literal 227 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|VUnkdV@SoVx51u52NZaO{`{Z+I>`O)!6xH-Ph=c~cpg4_l*Fhe@i@Vy zqeVwP{=yt_$xJ)-36dv1J0v?8IW(mOwz?m>wP+=u|0E9Q7yAWbEwWmEa@~qcl&aCG zSR_^V(`)bPzvpTfq%=N|xX`oV^W%uuT80MMHw^Nxrx1OP8jZ8N`_w8;I+ktbnZEB9|C*)m)nH>L+$Dv5Aa?k&h{~2zqH01P! z7%5q(X7`Pu&A9Kc@-v^EukW8~*)cEjw$E;(7qb(K1tVuZ>U)@~^QLP}ep_>%olVJs hqmqTso?CooSk54>;})rKpMima!PC{xWt~$(699le!t4M5 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_bitmask_pointers.asm b/gfx/pokemon/unown_bitmask_pointers.asm new file mode 100644 index 0000000..bfdc3ea --- /dev/null +++ b/gfx/pokemon/unown_bitmask_pointers.asm @@ -0,0 +1,29 @@ +UnownBitmasksPointers: + table_width 2, UnownBitmasksPointers + dw UnownABitmasks + dw UnownBBitmasks + dw UnownCBitmasks + dw UnownDBitmasks + dw UnownEBitmasks + dw UnownFBitmasks + dw UnownGBitmasks + dw UnownHBitmasks + dw UnownIBitmasks + dw UnownJBitmasks + dw UnownKBitmasks + dw UnownLBitmasks + dw UnownMBitmasks + dw UnownNBitmasks + dw UnownOBitmasks + dw UnownPBitmasks + dw UnownQBitmasks + dw UnownRBitmasks + dw UnownSBitmasks + dw UnownTBitmasks + dw UnownUBitmasks + dw UnownVBitmasks + dw UnownWBitmasks + dw UnownXBitmasks + dw UnownYBitmasks + dw UnownZBitmasks + assert_table_length NUM_UNOWN diff --git a/gfx/pokemon/unown_bitmasks.asm b/gfx/pokemon/unown_bitmasks.asm new file mode 100644 index 0000000..99604c9 --- /dev/null +++ b/gfx/pokemon/unown_bitmasks.asm @@ -0,0 +1,26 @@ +UnownABitmasks: INCLUDE "gfx/pokemon/unown_a/bitmask.asm" +UnownBBitmasks: INCLUDE "gfx/pokemon/unown_b/bitmask.asm" +UnownCBitmasks: INCLUDE "gfx/pokemon/unown_c/bitmask.asm" +UnownDBitmasks: INCLUDE "gfx/pokemon/unown_d/bitmask.asm" +UnownEBitmasks: INCLUDE "gfx/pokemon/unown_e/bitmask.asm" +UnownFBitmasks: INCLUDE "gfx/pokemon/unown_f/bitmask.asm" +UnownGBitmasks: INCLUDE "gfx/pokemon/unown_g/bitmask.asm" +UnownHBitmasks: INCLUDE "gfx/pokemon/unown_h/bitmask.asm" +UnownIBitmasks: INCLUDE "gfx/pokemon/unown_i/bitmask.asm" +UnownJBitmasks: INCLUDE "gfx/pokemon/unown_j/bitmask.asm" +UnownKBitmasks: INCLUDE "gfx/pokemon/unown_k/bitmask.asm" +UnownLBitmasks: INCLUDE "gfx/pokemon/unown_l/bitmask.asm" +UnownMBitmasks: INCLUDE "gfx/pokemon/unown_m/bitmask.asm" +UnownNBitmasks: INCLUDE "gfx/pokemon/unown_n/bitmask.asm" +UnownOBitmasks: INCLUDE "gfx/pokemon/unown_o/bitmask.asm" +UnownPBitmasks: INCLUDE "gfx/pokemon/unown_p/bitmask.asm" +UnownQBitmasks: INCLUDE "gfx/pokemon/unown_q/bitmask.asm" +UnownRBitmasks: INCLUDE "gfx/pokemon/unown_r/bitmask.asm" +UnownSBitmasks: INCLUDE "gfx/pokemon/unown_s/bitmask.asm" +UnownTBitmasks: INCLUDE "gfx/pokemon/unown_t/bitmask.asm" +UnownUBitmasks: INCLUDE "gfx/pokemon/unown_u/bitmask.asm" +UnownVBitmasks: INCLUDE "gfx/pokemon/unown_v/bitmask.asm" +UnownWBitmasks: INCLUDE "gfx/pokemon/unown_w/bitmask.asm" +UnownXBitmasks: INCLUDE "gfx/pokemon/unown_x/bitmask.asm" +UnownYBitmasks: INCLUDE "gfx/pokemon/unown_y/bitmask.asm" +UnownZBitmasks: INCLUDE "gfx/pokemon/unown_z/bitmask.asm" diff --git a/gfx/pokemon/unown_c/anim.asm b/gfx/pokemon/unown_c/anim.asm new file mode 100644 index 0000000..8916229 --- /dev/null +++ b/gfx/pokemon/unown_c/anim.asm @@ -0,0 +1,8 @@ + frame 0, 05 + frame 1, 05 + frame 2, 05 + setrepeat 2 + frame 3, 04 + frame 2, 04 + dorepeat 4 + endanim diff --git a/gfx/pokemon/unown_c/anim_idle.asm b/gfx/pokemon/unown_c/anim_idle.asm new file mode 100644 index 0000000..936e90e --- /dev/null +++ b/gfx/pokemon/unown_c/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 4, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_c/back.png b/gfx/pokemon/unown_c/back.png new file mode 100644 index 0000000000000000000000000000000000000000..a76e6caab916e60e09322d785944a844e2975675 GIT binary patch literal 279 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|;h3k3V@SoVw;|qQM-(`eKmIG1`*S@|@O#?D?^(i}A_A2a6$T7!tPhtM zUs4Qo;We* z@Q4?ZU%_Rv*xUU~;sOn(YoB|SKlv}1p8R~})1O;IY$R=GiT37mhI~|P+q^V&dz9z* zM}2Q=vm(ziHdVLW__yCb@W;b6P8RouZpKaQ-yU%7Q#E+nD{Z{b^;-Jjy;{Ew?sAws i_intydE~@*_RA?O+n(-WSk1t|z~JfX=d#Wzp$P!Es&Kvl literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_c/front.png b/gfx/pokemon/unown_c/front.png new file mode 100644 index 0000000000000000000000000000000000000000..4e2b2f151cc298b0250728704aebc2b5d1a900ef GIT binary patch literal 440 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsB1t6MBB zofsGxb~-S)F)%Qud%8G=RNQ(y{q(dW3LGv=fBdhXx1zb9n|$#4(-o%w{5oGsZ}YlipRiU(?%A5um1|z>8yUt2{jas~ z>7OI6cUs#!T1VI>=9&xZ2)*+O*V{afO}kZ^V8Ubxe7>cW(8< zzC*WVa-Hu#&z;F**8ExHd{ISp<<6tIq7lQ?6JV)_ZmqP96RErZYh5Kb5Q`>=?OYsRIgXQmbeSIueE6=Xm6B%*ez yTzXWg-<*RBiY<+&JU=lruAr!G&PU77>@Fsv1vQi1QWzK*7(8A5T-G@yGywoSqQA8O literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_d/anim.asm b/gfx/pokemon/unown_d/anim.asm new file mode 100644 index 0000000..a9a77fe --- /dev/null +++ b/gfx/pokemon/unown_d/anim.asm @@ -0,0 +1,7 @@ + setrepeat 2 + frame 2, 10 + frame 0, 08 + frame 1, 10 + frame 0, 08 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_d/anim_idle.asm b/gfx/pokemon/unown_d/anim_idle.asm new file mode 100644 index 0000000..8318520 --- /dev/null +++ b/gfx/pokemon/unown_d/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_d/back.png b/gfx/pokemon/unown_d/back.png new file mode 100644 index 0000000000000000000000000000000000000000..1d4547c82d4ac65c3a92233171f6b09ef653d201 GIT binary patch literal 236 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|VYa7>V@SoVw^MHOH7M{n$A16+f6a*&!O0i*T~-&W-n4r6y2XnZJ2hA{ z+&Q6|Ju@7={D@a;S6rTeRwGAubGsqk~{{~vsoV_;xx@^ov1?A6)!q;pBhLyqr#8_Q zQ*xF*$PfxYbC*@DtVw-0bFImn1BX2uUEbzvY)f$8$Ub|!_N8@kwd3C*cOz!{G7ah5YcirPvbUH;X6%~&=)e4@Gg}0cx6Be1%bPyyZP*U$$5($} zSZA6kAFD02{$`P9;?L=wSE4`fcw;EK)ag{oOfTcmDz$GWCs`I~FG!1;*CQim`QVrK z6>--nZn*~=E4Kb9+elzpr3BwvnQOj*mGo;>kzBJ;ZaPPKtHn|zt<7UtQf|Y3ank zz_8PS!Ht1|q1V&JF{I+w+bN!W4F){S$>0Civz@xM>GsqK7FW{w3nx$LShsGSc4K6~ zU!T=47&)fSP)ZL-isQ8WS3A|DArLT=H#^nEb(Qn+>P@VS1Ic>hzZ;ARP aj0d=x=j0u`9l*fAz~JfX=d#Wzp$P!C5L2N5 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_e/front.png b/gfx/pokemon/unown_e/front.png new file mode 100644 index 0000000000000000000000000000000000000000..8a9f132d1b9979854fb7ec23c35f2b8de0307b9d GIT binary patch literal 373 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;xZ@pN$vskrraMj(H)0#D1!kN^LF7ICbd@z#CO%*b2pi*Gw-X1+fX zbZMS(urYVSs>31=x)dLb79(gu_QI z3yL3>J!NUoY@Hl(%YTXEhtR}jg(^X535{#GKif>Un*4m`^*QMi@;$%?`(B7U6<%lV zJ$L2YYUQ~rZ|Uzlw<7PY_^UHQ9~w(a+)CvizCNR6bX?1Ju4V6sQa8~(v5&tzXjy*l c&-e1p{5Sh}IaLza0~kQz>FVdQ&MBb@0MoOj761SM literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_f/anim.asm b/gfx/pokemon/unown_f/anim.asm new file mode 100644 index 0000000..2423675 --- /dev/null +++ b/gfx/pokemon/unown_f/anim.asm @@ -0,0 +1,9 @@ + setrepeat 2 + frame 1, 11 + frame 2, 11 + dorepeat 1 + setrepeat 2 + frame 0, 08 + frame 3, 08 + dorepeat 5 + endanim diff --git a/gfx/pokemon/unown_f/anim_idle.asm b/gfx/pokemon/unown_f/anim_idle.asm new file mode 100644 index 0000000..936e90e --- /dev/null +++ b/gfx/pokemon/unown_f/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 4, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_f/back.png b/gfx/pokemon/unown_f/back.png new file mode 100644 index 0000000000000000000000000000000000000000..f4f54b351588a9ab6f375fdc39d985fe53052cef GIT binary patch literal 243 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|VUeecV@SoVw;`wb8WeaoKmGsz=0gV4v=mjjmj{EhzrV2P>+S8G&)Dpg zZfKxuX!UBj!P)l-ll+~d8c(tBV$y83TD-IMzd**4c7+WUUn1|R9%VAyk@R7)n%ma= z^${1Ye|cEEP505^`8{8QV!kftaWfTJWcbKU(`&o*ROUrTzVCg?`XNA*X=CzEmAx-n x8H=v(++$%XwPnulOm)#$&e!6lDmMxGweR5cn-4?)}{ci48+11)X#r7G8>+kTttKwO0y4pTGv92+9dh{$F z?Zj73CD9z|*DZ=)vtFLky+iNiO6e_kmU$oYFWu6*=hmckcYDi+ z7(dr}*^E5~OIG{M)8)+0H*n9I*mUGLr%K*D#-~!t_;k*77(Y7G zZ{b|>?ABrPcX=Gg;*|>5z0Bh;^Siirrq7(8T%Vm|FfcH9 My85}Sb4q9e06yTe`Tzg` literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_frame_pointers.asm b/gfx/pokemon/unown_frame_pointers.asm new file mode 100644 index 0000000..245cff0 --- /dev/null +++ b/gfx/pokemon/unown_frame_pointers.asm @@ -0,0 +1,29 @@ +UnownFramesPointers: + table_width 2, UnownFramesPointers + dw UnownAFrames + dw UnownBFrames + dw UnownCFrames + dw UnownDFrames + dw UnownEFrames + dw UnownFFrames + dw UnownGFrames + dw UnownHFrames + dw UnownIFrames + dw UnownJFrames + dw UnownKFrames + dw UnownLFrames + dw UnownMFrames + dw UnownNFrames + dw UnownOFrames + dw UnownPFrames + dw UnownQFrames + dw UnownRFrames + dw UnownSFrames + dw UnownTFrames + dw UnownUFrames + dw UnownVFrames + dw UnownWFrames + dw UnownXFrames + dw UnownYFrames + dw UnownZFrames + assert_table_length NUM_UNOWN diff --git a/gfx/pokemon/unown_frames.asm b/gfx/pokemon/unown_frames.asm new file mode 100644 index 0000000..d5ed3d6 --- /dev/null +++ b/gfx/pokemon/unown_frames.asm @@ -0,0 +1,28 @@ +UnownsFrames: ; used only for BANK(UnownsFrames) + +UnownAFrames: INCLUDE "gfx/pokemon/unown_a/frames.asm" +UnownBFrames: INCLUDE "gfx/pokemon/unown_b/frames.asm" +UnownCFrames: INCLUDE "gfx/pokemon/unown_c/frames.asm" +UnownDFrames: INCLUDE "gfx/pokemon/unown_d/frames.asm" +UnownEFrames: INCLUDE "gfx/pokemon/unown_e/frames.asm" +UnownFFrames: INCLUDE "gfx/pokemon/unown_f/frames.asm" +UnownGFrames: INCLUDE "gfx/pokemon/unown_g/frames.asm" +UnownHFrames: INCLUDE "gfx/pokemon/unown_h/frames.asm" +UnownIFrames: INCLUDE "gfx/pokemon/unown_i/frames.asm" +UnownJFrames: INCLUDE "gfx/pokemon/unown_j/frames.asm" +UnownKFrames: INCLUDE "gfx/pokemon/unown_k/frames.asm" +UnownLFrames: INCLUDE "gfx/pokemon/unown_l/frames.asm" +UnownMFrames: INCLUDE "gfx/pokemon/unown_m/frames.asm" +UnownNFrames: INCLUDE "gfx/pokemon/unown_n/frames.asm" +UnownOFrames: INCLUDE "gfx/pokemon/unown_o/frames.asm" +UnownPFrames: INCLUDE "gfx/pokemon/unown_p/frames.asm" +UnownQFrames: INCLUDE "gfx/pokemon/unown_q/frames.asm" +UnownRFrames: INCLUDE "gfx/pokemon/unown_r/frames.asm" +UnownSFrames: INCLUDE "gfx/pokemon/unown_s/frames.asm" +UnownTFrames: INCLUDE "gfx/pokemon/unown_t/frames.asm" +UnownUFrames: INCLUDE "gfx/pokemon/unown_u/frames.asm" +UnownVFrames: INCLUDE "gfx/pokemon/unown_v/frames.asm" +UnownWFrames: INCLUDE "gfx/pokemon/unown_w/frames.asm" +UnownXFrames: INCLUDE "gfx/pokemon/unown_x/frames.asm" +UnownYFrames: INCLUDE "gfx/pokemon/unown_y/frames.asm" +UnownZFrames: INCLUDE "gfx/pokemon/unown_z/frames.asm" diff --git a/gfx/pokemon/unown_g/anim.asm b/gfx/pokemon/unown_g/anim.asm new file mode 100644 index 0000000..39310ee --- /dev/null +++ b/gfx/pokemon/unown_g/anim.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 1, 06 + frame 2, 06 + frame 0, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_g/anim_idle.asm b/gfx/pokemon/unown_g/anim_idle.asm new file mode 100644 index 0000000..8318520 --- /dev/null +++ b/gfx/pokemon/unown_g/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_g/back.png b/gfx/pokemon/unown_g/back.png new file mode 100644 index 0000000000000000000000000000000000000000..c2d4e81cfd552da956e2a6f113a1d6684f1f7891 GIT binary patch literal 241 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|VS%TMV@SoVw^MF&H5l+X-~RId|IOG!;Z)8QKN95Focesj*WO$oFE1$I z$?*K!t8Z08`Td>?{xqm>O<-xb+^#L#SSs9lVxmX=wy)W$Ok0KiMjg&raPo!+gJqk^ z3#&Fii_iraT+7Xt$WgQu&X%Q~loCIH=?Tbcj> literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_g/front.png b/gfx/pokemon/unown_g/front.png new file mode 100644 index 0000000000000000000000000000000000000000..8bbfee819907001316827bcaa040be38aa9782d3 GIT binary patch literal 365 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;yE@pN$vskrra#!0?b0}j`R-~RvqS-QY4a7X8^j|UGO`68k#>lZZ9 zpFJRp!EWhXDgPCd*S=xWW6$9I&B%V_^zP z)3skaj%EsP_VIAP>bqjLUEZO6df(>y9lXVsxkD%+(c#tQF9|`)s7ewOT?5BHg zMt@IZcs#S0yY_qn5BtLOS2Frbekphqgc-5rzI2&)@YKV)$`?(`(=QpXuXx5TEywqJ T$EGMb22eP<`njxgN@xNAc2uNS literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_h/anim.asm b/gfx/pokemon/unown_h/anim.asm new file mode 100644 index 0000000..f094dca --- /dev/null +++ b/gfx/pokemon/unown_h/anim.asm @@ -0,0 +1,10 @@ + frame 5, 12 + frame 1, 06 + frame 2, 04 + frame 3, 03 + frame 4, 02 + frame 1, 02 + frame 2, 02 + frame 3, 02 + frame 4, 02 + endanim diff --git a/gfx/pokemon/unown_h/anim_idle.asm b/gfx/pokemon/unown_h/anim_idle.asm new file mode 100644 index 0000000..7561e0b --- /dev/null +++ b/gfx/pokemon/unown_h/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 5, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_h/back.png b/gfx/pokemon/unown_h/back.png new file mode 100644 index 0000000000000000000000000000000000000000..6677db077de5a16c14d910f285573d8b911bb1af GIT binary patch literal 271 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|VV|dqV@SoVw;_&9hZQ)o5B>kYr&KFd%<)}Ouu#*Ao$G|v{njw0aQX`- za`N#VYP%8}Cu+7us!n8C3QyFIOU8Tdc9`zTIdMToiszKav-|3)VKH0>9!U#mbCxi? zx4d|Vy;^a-@}CM71BnVPOIcpV8s+H%xkrVL&GQd9bNN!ogap310x}7Ag#PC%T7EIU zwsPv#h=-mo;^B2tUyp~^-TTUKQvZ@ydPbdXdG6suU&L=fq{W1z$e7@|NsBh)h(8m zP7DkTI~^F@7#J8+JY5_^DsH`<8QFJ4fybq=@V_;G=9x(sW(0XJjtr^!lBA_3@nQ1h zDOdJwWIXn==v;@asiMvVKKtwI_Xhja9*Fz-g30Vu*73BK8^6MC=7#NFt8Fg)?Wf=W z4HjD>!&$$TWZrvtIBLK3j^@gg;=Nz3w?2H>>m2RNuXrI(*7xDI-4~(@J4#Nf-wvDM ztY~XuDrsd?bKs@w6LZ$RXMgnWj=JewY}eLt%=h(1{>@%5btWIP-CHwb?y)2$uV0UP zEIuEevr^Hjc-f)m2Rut$`moH8< po>8Khe(1voM)CB22I>14ZXJt<7UtQf|Y3ank zz_8PS!Ht1|p}^C{F{I+w+bNbp2Mjov1^@g%e^5?brB!*SX>_)`oy3`0%Wgi@dzPrj zCD7XOnuUiksOEr{ww>s=ADp=fPd?9|&bW$!GrF;Yd%tL~hWnzHqRgNb4nJ7m#VU%` vXsvkIFynf=zx;de=?4z33TgejtDeC~foZMWo$DbC3=9mOu6{1-oD!M<%+5r! literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_i/front.png b/gfx/pokemon/unown_i/front.png new file mode 100644 index 0000000000000000000000000000000000000000..e396fc847c5562fbd578dc946b4c93614b79304b GIT binary patch literal 297 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;yo;pyTSQgQ3;3`f3Z10I&gU;qF25xTQQy;^XsOXBwftp^*Prm(El z+|T7ubk;)XSkt@hjJXYNiOQl9el_NAuvFHd^is^iOj;MQ=i z;mX>V(;wb8_FVSR@!iJvJgoL<=Fu_i+eE~cY`1-S>r>M6Ch4vFd;=5q{!u>iDV}v^ z)u$dCt<7UtQf|Y3ank zz_8PS!Ht1|q1)5NF{I+w+sW2^4F){Uub=!YSM!|6;lVMxk?|^X?4OiR(#e^bFP9rN zKP%T~QWWE0`e`xMbnVk~{Z2kTikHL}aW1i6b%V2@mg#`of%6BFkLW!7p~{uvI@v*d zMx^)T28n`BgEB_ZdgY$IT#0*sH=UUNozGz5yDGz;{co8R7>|Ab*8Fhhi}ii?zLhX% Y^fK%7^UZBzU|?YIboFyt=akR{0Gd8i1ONa4 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_j/front.png b/gfx/pokemon/unown_j/front.png new file mode 100644 index 0000000000000000000000000000000000000000..3c7205edd73b92af6769e4ab6ad5722ad20e726b GIT binary patch literal 344 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;xp_jGX#skrra#!0>w1p(HV$N&HTyy2*7;I2tCFF*O}$UmibOM>Q7 z3mIJ}uLiN^)uFd-wzekCF;B>!_vXO%JA#ticjeB!|Ngy)@rBw$J7PBb-l)8*U&RtV z+v_-U!_c5})^XRlqaH)(^t<7UtQf|Y3ank zz_8PS!Ht1|q21HPF{I+w+bPyU2NXD55_kTe+k9-ojTc6f{ROvgJW<^k7?P5j`t&!0 zXB?}ir?GGLzW!p$`_l~;nN=o9({4PpULHC{>izZg8gk-1=C;SACCZo+ V)+XI)W?*1o@O1TaS?83{1ON?mR+In$ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_k/front.png b/gfx/pokemon/unown_k/front.png new file mode 100644 index 0000000000000000000000000000000000000000..fef1793bfda4ca25d9f5d4115b43daf125837492 GIT binary patch literal 410 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;zP^mK6yskrra#%-a)3LLCYfBgR+lYBLRHE~&{@!JQ{lh=xymrSjmM|Ex<6Ri5ZF-129c?sbnRMXrzg8q7Bp9Wq&wl)UU$$?Mo}@}-e) zt88s6A}@1YDy-_ez2%|R4E7bR#j;XWTW%(m6mgwTGhW^h{ls#`HsjX|FMRuDlQ!ks z^5@R|OnU5lop(N#02e?dehTOl+N_>ZaK!p9}loBeqa)AFg#4oYyHfkMsPUFmq;`(#>Ifr_%27 zoOj{goEK&!*Yo{9UsGe%T^`%xhkwnJytwgI+Jigm@{S!!zIN8_z~a2J_33gRv$&rm Sn=|fV00p|MpUXO@geCy&NV-S> literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_l/anim.asm b/gfx/pokemon/unown_l/anim.asm new file mode 100644 index 0000000..d724203 --- /dev/null +++ b/gfx/pokemon/unown_l/anim.asm @@ -0,0 +1,11 @@ + setrepeat 2 + frame 0, 05 + frame 1, 06 + frame 2, 07 + frame 1, 06 + dorepeat 1 + frame 0, 10 + frame 3, 11 + frame 4, 12 + frame 3, 11 + endanim diff --git a/gfx/pokemon/unown_l/anim_idle.asm b/gfx/pokemon/unown_l/anim_idle.asm new file mode 100644 index 0000000..7561e0b --- /dev/null +++ b/gfx/pokemon/unown_l/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 5, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_l/back.png b/gfx/pokemon/unown_l/back.png new file mode 100644 index 0000000000000000000000000000000000000000..4e14c7d9f8dbcf972b57c44181e6f220a64b7086 GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|q1DsHF{I+w+sWQS4F(*}vkU%P-wv|Ba?$Wj%m=Y`lQ^$jhzb-rYMgfB zY3P$;jOLv$n8%^)*|uRzMu);z@hRo5 zMi0akOGQ2ZhT6T_{@|KR@fk^C|0#U%IBTp0mAolOd9k>EH6d SI_wM#3=E#GelF{r5}E*@3smR; literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_l/front.png b/gfx/pokemon/unown_l/front.png new file mode 100644 index 0000000000000000000000000000000000000000..1aeb48a6db4cd2f449c98763dbd92c2e6a901f29 GIT binary patch literal 362 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-VEDkn%)r3l>U&L=fq{W1z$e7@|NsBh)h(8m zP7DkTI~^F@7#J8OJzX3_DsH`hK!ByX`v3p)QBeZImuI^qtGu)O@TlMdcj|&0 zvmWaR&Ez?w=C*8#WbI;&6Yg9l=U;GL(Gb%*VbQm9;YJ;a<+amTt=B)F8`t#x{uL`Z z1|OzH&W{g%_?DxR`9sCM>vfXI>h<$Gnby3m-NU5e$q;h)lcoHxk|imzMb`F>lS^c( zkImbdzHco*OV^!OyVLD*__@rok8MnUBU$~d`5MPS)qw3y63pl`)rfX-!Pv3jfdsp+JAp)*{YWrP0EovKJVr-g%3WjZmh9g z{PDwzOUB<5Wm48SIu_V%XDTRL{;5Z9&b|EeDkt4DtDhZyZ@mADeS>swGJn2p7vl{E P1_lOCS3j3^P6t<7UtQf|Y3ank zz_8PS!Ht1|;hd+7V@SoVw;^x&m=!siKmB`e^QU2<`njCnnUlSFg1ANdUp#vB=#lpZ zj_s^Vm~4)vb1Z!G<;^+GpBL7uGR`_}_-s@BIMZ5Hi(-v+OXNuO3tkd7Wtt+Z7 zU;cMZbW-11?L)V(Khyd&E8!={vbGOF4VgPQj#Q`x$eQ|ZocMzMYIl(P!@jW2QdhMD zZ^{#d<_M*zoDfu;QsTnlD=(yECuH#Kxo@yZp~Rab*D4DA8B;dT>Sg<9Sd)0_QN`zH rCt1z^Fz&3*=GEE8@b6{$cczgTe~DWM4f8AW$| literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_m/front.png b/gfx/pokemon/unown_m/front.png new file mode 100644 index 0000000000000000000000000000000000000000..4a42a084fb0d73f209f28edffec84c17978c3cd1 GIT binary patch literal 491 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;yM<>}%WQgQ3;jOcZT4LDrRR{XEt=lO@@LBqw+Tm4*1!UQGl59lpl zG-b<{e5tEmZyCQDP58pUnsxc|)w{l3d03&^Vqp?8RkrW&`swq87uGJ@WuxWzT+i_P zs?yr(aE|E(Ev@NyD_XvtoLcyNc`EzsTM||qo)~POF`>&tWkT>MxYu*(-Ql zonIY%#Is&REq+?V{#HeoQP#JKBC$^3lF9i7c~I`y0goibYpHmvv4FO#s1j=c51s literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_n/anim.asm b/gfx/pokemon/unown_n/anim.asm new file mode 100644 index 0000000..2e8377d --- /dev/null +++ b/gfx/pokemon/unown_n/anim.asm @@ -0,0 +1,9 @@ + frame 0, 06 + frame 1, 06 + frame 2, 20 + frame 1, 06 + frame 0, 16 + frame 1, 03 + frame 2, 04 + frame 1, 03 + endanim diff --git a/gfx/pokemon/unown_n/anim_idle.asm b/gfx/pokemon/unown_n/anim_idle.asm new file mode 100644 index 0000000..8318520 --- /dev/null +++ b/gfx/pokemon/unown_n/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_n/back.png b/gfx/pokemon/unown_n/back.png new file mode 100644 index 0000000000000000000000000000000000000000..c6a7b1390391ab04267ceae5676dfd49892c00b7 GIT binary patch literal 236 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|VYa7>V@SoVw^JO2jwo=j%zXI2p3m^eiFI9;IalT8EPm;>v_r|-+S_f|sfbebqRW{ZHO%InQhKaQ1x8TaT9?YQ6e!vdaSh^Tzi& q70#{yw`XBa1bh8&n-=yL3`_c1%rE^>XJKGqVDNPHb6Mw<&;$TUab05o literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_n/front.png b/gfx/pokemon/unown_n/front.png new file mode 100644 index 0000000000000000000000000000000000000000..ee86bb8091d1ac9d9dfbc90d28169ba753cc8f72 GIT binary patch literal 472 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;xx_jGX#skrra#>KKX3LLJi|Nqa=ZkF;q=Xm>fL3nhHq@zZZ5%@16C&9BS*A6vD@f0F=~X|J3lZme@R^46A_V)?9< zi?y^b>Zfl7;W>S`5%V_TWdd|;eLzbH9?G56V-2Z-_H@8K@)!^9jBz6ABc(YWuWBS*5KA#CTzG9ppopgS|UoKl_$0w4P z81Kzfe6Vj~(D|C(H~+hzuPHQq{`6+`F=@>YXOfoOFn%qtFnxnqLwZLBOa4p|UpKEd zmRs@{jQvjroNws4VJzS>Pw~NRQj;T%tm-`t;PA42d`#I#MlVWoqcp(VZP?X^glZz fAI!8dXa2~TAj*H%`@St<7UtQf|Y3ank zz_8PS!3{)tx;TbZ+sN0%IVn?vmBlMEBBDZc!CQs4 zGqXz{Ke_j|#bv4Wy^DN1Yy0;;pVYE`Wf<4|x1X)2>mN0&<7r_kX~vsoV_;yM;OXKRQgQ3;jK;nr3LGw}fBx6+TieRDO<}sp&K$nUzT3W8hOP41 zx>c(_j-ys2pu_O!n)TPFKU&dsL8Inj@u!?mYtB7>sW?Yt-p*Rt*wQ6S3grb`nmPHx zJSQ#Nkhml?D5_|CvCL`}^ChoevYj%$`%UNV$+baSi-J2i{)8-&6`#UT&32}AudI)i z&CiDA@rhMIPnOS|wWKhHc}{nQu)|6fS|@ww`?G5ht4x2~n1xqBd8 zWxCa*T?;F9*PTBR(5teS;hXuvX>Vt#e&m?-!9@4P?=!Z)=AG~1-m>kxB=0dh=WDZT z<}X}xKH#U%)K4?5%x}-1eNs=s&U|)s!`YpZKdNi1^UCsS*2OxoC~=m(==EYLDk*!O oHY27cPpnN{{)3hI@1XfV88fblsr)xeZeak$ovWYAI;Vst0B#53CIA2c literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_p/anim.asm b/gfx/pokemon/unown_p/anim.asm new file mode 100644 index 0000000..84c929d --- /dev/null +++ b/gfx/pokemon/unown_p/anim.asm @@ -0,0 +1,4 @@ + frame 1, 10 + frame 2, 36 + frame 1, 06 + endanim diff --git a/gfx/pokemon/unown_p/anim_idle.asm b/gfx/pokemon/unown_p/anim_idle.asm new file mode 100644 index 0000000..8318520 --- /dev/null +++ b/gfx/pokemon/unown_p/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_p/back.png b/gfx/pokemon/unown_p/back.png new file mode 100644 index 0000000000000000000000000000000000000000..618b54087b413aa8a87dd1c1727c9ddb8d684a28 GIT binary patch literal 208 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|q2ANQF{I+w+bI{h4k&QAe*N|TzfJCztr8`zUkyGuKwK+bVtgm3W>C5ymSlRO{0|Ntt Mr>mdKI;Vst0Kv3UDF6Tf literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_p/front.png b/gfx/pokemon/unown_p/front.png new file mode 100644 index 0000000000000000000000000000000000000000..8c9652a0aa2c26aadfd2b3440124c41dafba12be GIT binary patch literal 335 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;zT=jq}YQgQ3;^oLwW6nL6VEB}|&(%|i0TfcMelF{r5}E)yLylbl literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_q/anim.asm b/gfx/pokemon/unown_q/anim.asm new file mode 100644 index 0000000..09b5462 --- /dev/null +++ b/gfx/pokemon/unown_q/anim.asm @@ -0,0 +1,7 @@ + setrepeat 2 + frame 0, 05 + frame 1, 05 + frame 2, 05 + frame 1, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_q/anim_idle.asm b/gfx/pokemon/unown_q/anim_idle.asm new file mode 100644 index 0000000..8318520 --- /dev/null +++ b/gfx/pokemon/unown_q/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_q/back.png b/gfx/pokemon/unown_q/back.png new file mode 100644 index 0000000000000000000000000000000000000000..5ee2eacb0ac5481d8c9424175c834a493abce1e3 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|q0H08F{I+w+bIY68Vop`HUIp#=U!1bFULQPQ(rDV{P?o8!v;L{jV>2$ zg_bL?EqD2H(&g8@3!GE~vsoV_;x-?djqeQgQ3;jMIEhiaaivzyJT&$#3znR#THQ-n@g`c3Kdp`YfTt zHL6Mi%cd=sU|TSm`^2_29y@A|zN+JTCH}@*YxD+J!vmw2R z;rxtq?ePJ=TPN>J|I}*j`JGE%H|xPnrI|OEzLtFOOK$eeIqxMiYt<7UtQf|Y3ank zz_8PS!Ht1|p~}<6F{I+w+bN!W4F){S$>0Cit4(p`70>AuJ~hX-NIFPq*0M}3k2x0Z zPLVS|uAEVM@q~@=%>(n;^_YVW+9_{kTFkXxG&rJ9h4b`M*F@H1;TN89g;#`dG~Euk z)KuW}EGFOg!47$Wtyfo6r`leL=h*pdnZP`OC+7c;@?Oeix-Zlnc8Gz2fx*+&&t;uc GLK6Uk~vsoV_;yo@9E+gQgQ3;3`3#A3IfcIfBv6;$Y9MUT=Hs?lh&mQUYBEUdb|tg z*lcw_c%f>-B4+6oCsd!zD)aTfR=z%O!BoBo`R^APn~y*DjXzk&tNKB!!IyFA%BS|m z4m;&memKtD6CfZY`C#i=jh#|+q|Mo$KM=jAykz^+=?V2}QV}i%c?QQfroWM_ZmVva zusgl)N!gA0ceh4Aj99w%fyK8T+vM{yYYWuMwFQ)O?{2&#dwkwc=JQ`T=FNP5^T$JW zO{onY?`B&3(A!ibpmd{Py%A%$_004S&n8^axTY-n?tR+7Jh4i~`8Hf^b~2yr7(hYc L>gTe~DWM4f(n5gM literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_s/anim.asm b/gfx/pokemon/unown_s/anim.asm new file mode 100644 index 0000000..d662b7d --- /dev/null +++ b/gfx/pokemon/unown_s/anim.asm @@ -0,0 +1,9 @@ + frame 1, 12 + frame 0, 10 + frame 2, 12 + frame 0, 24 + setrepeat 2 + frame 1, 03 + frame 2, 03 + dorepeat 5 + endanim diff --git a/gfx/pokemon/unown_s/anim_idle.asm b/gfx/pokemon/unown_s/anim_idle.asm new file mode 100644 index 0000000..8318520 --- /dev/null +++ b/gfx/pokemon/unown_s/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_s/back.png b/gfx/pokemon/unown_s/back.png new file mode 100644 index 0000000000000000000000000000000000000000..4a718be738e1aa97473b22e0e10a6b874b70984e GIT binary patch literal 249 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|VTGrQV@SoVw^O}^4lD3DPb~RwJ>6e=R*sTk;P&MzGjkf2{85Y)CmsRy` zPn9fgl#4y}^z8Fb-7S0hg_hnu|M%4Y4c~)ncEqjsWquVu?^H1Z0|SGntDnm{r-UW| D^C)M( literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_s/front.png b/gfx/pokemon/unown_s/front.png new file mode 100644 index 0000000000000000000000000000000000000000..c7495eccdd69542bf2d344a1994f232737cf004c GIT binary patch literal 366 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;yE^>lFzskrrax;Nip1s>LqKmL{H2?7d$;MuL{_WqU zvMOEoQ8pAUao-%k#D9wQg4OgU{$um9t(WggT)yyl*Pk6b-|>qz$2^bI>Fl%xa-aABF7n96icEN`Q6vvTLTnjbn=0iS)&8e2b~DbDT7 Vdu#701`!5OK)U+5taD0e0sssdpt<7UtQf|Y3ank zz_8PS!Ht1|q1w~MF{I+w+bPz32NZam3yc0+PhX&9$NeoJ)TvU~d7g|yfY&6Ia;Dn{ z7T${wIMyY^_8_Y0dDN>Gg|~m17!@6~_*<0UO5Cp7ZF$Mz3iDkC(FQJQ#`xA`7vW{o zG!k!_XmXrS+{yYbMv*N?@Y~T0pSH}$T4%~bwf_HG!T)48vs{wh;nNHZ3=E#GelF{r G5}E*YSx3+S literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_t/front.png b/gfx/pokemon/unown_t/front.png new file mode 100644 index 0000000000000000000000000000000000000000..3f5b7c7a2cba1438eaf344ad4499431747da2222 GIT binary patch literal 370 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;xZ^mK6yskrra#zU@V1D=-Z>EG+0Z_Qqlmvi!9+lHCH6`SUJO5c{- zxb>1Ls~u;)Me*D6j)Sos!LyI9H0KSNb(z0GLO~_RL*uO4G8x0eY${>rth)>p_};fL zvY$UbJ+A4m=Kf5R00&_Q&C;JfFW=AR>OI~6 zqkWlE!bTpo^t(5FT(=6ox$X8M-A1qFaNLH(b;2*+guPm1xA~3j#{Qe~>aSN=EE`Gwp4YL4yD+j#zhhkEk-mzN_{k|ro+#4Pr4Snv1D_>N^=oZQX_ c;vZ*9FD>BuKlgu7Jp(8(UHx3vIVCg!0FwTs9smFU literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_u/anim.asm b/gfx/pokemon/unown_u/anim.asm new file mode 100644 index 0000000..8475cb9 --- /dev/null +++ b/gfx/pokemon/unown_u/anim.asm @@ -0,0 +1,5 @@ + frame 0, 06 + frame 1, 12 + frame 2, 14 + frame 1, 12 + endanim diff --git a/gfx/pokemon/unown_u/anim_idle.asm b/gfx/pokemon/unown_u/anim_idle.asm new file mode 100644 index 0000000..8318520 --- /dev/null +++ b/gfx/pokemon/unown_u/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_u/back.png b/gfx/pokemon/unown_u/back.png new file mode 100644 index 0000000000000000000000000000000000000000..80a4cd17cfb35b0c68124b6e0d0e810d28b37046 GIT binary patch literal 257 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|VS}fOV@SoVw^O|N4jXW|*dG4-KIT$WuXO!VkDC=?VTZUS+Ln}*l$3mF z(>T;ykg-ST#*aV#cY5Mg)_n>+&9biIK<7nU4}XSGA4fhbO;d%ta?V@=UPcQ7qZke? z6>nUjdBAF3tU{!4A#*}!6!Wusrurk_j(lmobL8D0n;j(@^KTfphR=O#YsPW~vsoV_;y+^mK6yskrra#%-Zi1rAr%|NrOvuT;=jR2-KjRiRz3IXxoND>2bu zQsK}T9uc_Uvs~f z*btzTD6mX;q2X3VlR1)m&hOc!XtUjpztPQ$n{`g!LxGn%myTziNxtLRvRC868Osl6 zo-mm8lH95a}0Y;;}v+?B#I8w+7Ev2Sceg1%`* zGv{RTZZ!?^@II$t<7UtQf|Y3ank zz_8PS!Ht1|VX>!+V@SoVw^I&s9Wmf=nfvko|H|auOIPO1nt183)3XUC50bZZrFnaM z^Sc`9eGpLl$W|_8>zA-QUvLp)vu z=wE!2^yem@Y2A5M7Hz2vJ{#=`9TGRpTG<&-GBAX2{}7!KmE$md5=)6|w}ZaOt_6R? yMR+H%-k0d@Td<4q`#QnarILI9ZFl|8$a<1_N!j+d-x(Mf7(8A5T-G@yGywq1Yh3F9 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_v/front.png b/gfx/pokemon/unown_v/front.png new file mode 100644 index 0000000000000000000000000000000000000000..57fae628b58fa51c3f46add89f2a324b329e439d GIT binary patch literal 376 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;xZ_jGX#skrra#!aC^1{|)3pZ@=UQ%5CMO~?3GfT&!StRIK#skOSQ zZzI_f-YfVlK4)mWEuwrv&9=v4GJUf%W!80XlMK6m;?0~kwpa0`{Zb#EWm&Jjx;K`m z%X8BCvs|IYJBrUfEMfHR^DJZgm@j4aN^aQxwe+Ic8oMcN!3Ip!3bb>Jx#+whu%Uc8co!rT_o{ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_w/anim.asm b/gfx/pokemon/unown_w/anim.asm new file mode 100644 index 0000000..e46f6d4 --- /dev/null +++ b/gfx/pokemon/unown_w/anim.asm @@ -0,0 +1,5 @@ + frame 0, 06 + frame 1, 18 + frame 0, 06 + frame 2, 12 + endanim diff --git a/gfx/pokemon/unown_w/anim_idle.asm b/gfx/pokemon/unown_w/anim_idle.asm new file mode 100644 index 0000000..8318520 --- /dev/null +++ b/gfx/pokemon/unown_w/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_w/back.png b/gfx/pokemon/unown_w/back.png new file mode 100644 index 0000000000000000000000000000000000000000..d5fb67f4d6dfef91346392dbd212f1ea88da1e41 GIT binary patch literal 239 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|VVhP{3?!OWYUKZXJ@Va^H)~%{8 zpI?D9SQ0!Bote-T$GL1#{DDn>#qJ)vq$aSX-gUn?Lvxzt-@EMGRWIZ7`XzPeO`EG! zqy1V)-6&4rXJo2eH0Rm)=S~;zb1&$cRm*dcIemdKI;Vst0Gx(h{Qv*} literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_w/front.png b/gfx/pokemon/unown_w/front.png new file mode 100644 index 0000000000000000000000000000000000000000..34b335254ad5b87eb101cf458d5b7a8f9d040624 GIT binary patch literal 438 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;xR^>lFzskrra#%Zy`3LGwTKmPx}^O$-@K)LPPM&Il`j2kCvavnVU z_S^|?y$5|g4ttnSdK=ul`pa~Maq#PK1wj?h8w+kREwkLy=y6|F<5)#r*O6}a(uX@$ zrSHjHtDGjiYOCO~zbA`Z9eB_0u;4iy9w}?_M@r>LRNPLny?-T4cFwap%zWV4CmEyj zb_R~3QqPQ+Ox`%Z_{H0U&vvZfy)UQpRXA?q@#Yosn{8*ES-s%4{VSi&n6nsV{W8Td$SFMaNd6U|S^EW8>GbJ3=yWV>4%>j+>DWQ$K)`xvtW6HM9 z%6aoWKP%?n_D$DjKCpUh_4t|9=jgv@bXR}@5b317u`L7;kV><$?KBl*Cp%ozs>!g_N4cm%U#WzR)-&Ty3h6GKHb4uKvZMiDRm$%+Hsk+a~`QO%aH4NvPd6H6k>RcH>5#s9Svd$@?2>^cT%1;0Q literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_x/anim.asm b/gfx/pokemon/unown_x/anim.asm new file mode 100644 index 0000000..803892a --- /dev/null +++ b/gfx/pokemon/unown_x/anim.asm @@ -0,0 +1,7 @@ + setrepeat 2 + frame 0, 03 + frame 1, 06 + frame 0, 03 + frame 2, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_x/anim_idle.asm b/gfx/pokemon/unown_x/anim_idle.asm new file mode 100644 index 0000000..8318520 --- /dev/null +++ b/gfx/pokemon/unown_x/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 3, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_x/back.png b/gfx/pokemon/unown_x/back.png new file mode 100644 index 0000000000000000000000000000000000000000..f04142c773296ec205ff20f2dab95d91156ee68b GIT binary patch literal 226 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|VWOvtV@SoVw^L5@wJPwq%)I>nf4cU*2ltjtd*PRsY*H+tv39ACudnai zNs@oX&xkOzRWWUk=Gc&WV(a?#90kqX4?}9NTrcu2QL-~@{@2TJ;#YR+L_R0gi3g&T zCvk3)+tItiVe?Xv3vyQMTY{FYQNI2`dZO0r53crEOG7rltDT$q{&E4Yz(a<=x+kof g^Z&8fEn?mFk-6*bi-~6#7#J8lUHx3vIVCg!08t%U0{{R3 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_x/front.png b/gfx/pokemon/unown_x/front.png new file mode 100644 index 0000000000000000000000000000000000000000..e74987847a06630795b7b833f97a893dee6df8dd GIT binary patch literal 363 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U|7Jx%)r3ldHCKd1_lP60G|-o|NsA2SGQPN zIx#RX>~vsoV_;yE@^o9Bk;JjO<`^A2Ib!gtL09%Fj;S% z5^_q^&^eybSW+QeWR~&<)}VgRP;Z+V33~%sJDa{;^gBHzq-n1#%g)-;{JW;kqS^OZ zmOgS_a@aV};o(Agqk~oat_55TGK|jN?dG2&tCTp8Z@1qXZL@dZ9;3-sb=r5dxYvB` zN$k`dC3An4$jc|Kcw*-G81jIzBZ`knyeYj;I|gL$vPC zK3eORc46mvgKf?B9tR!NYv)hoU9a*}q3OY<5|%eBEk8@Xxzm41*t24v`ETpJ471nr UOfO(rJC^|zimrYx>zopr00$tOBLDyZ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_y/anim.asm b/gfx/pokemon/unown_y/anim.asm new file mode 100644 index 0000000..21fcd64 --- /dev/null +++ b/gfx/pokemon/unown_y/anim.asm @@ -0,0 +1,8 @@ + frame 0, 06 + frame 3, 24 + frame 0, 06 + setrepeat 3 + frame 1, 05 + frame 2, 05 + dorepeat 4 + endanim diff --git a/gfx/pokemon/unown_y/anim_idle.asm b/gfx/pokemon/unown_y/anim_idle.asm new file mode 100644 index 0000000..936e90e --- /dev/null +++ b/gfx/pokemon/unown_y/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 4, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_y/back.png b/gfx/pokemon/unown_y/back.png new file mode 100644 index 0000000000000000000000000000000000000000..c2452b00417a20053f88829ff57f5a713e16d5f2 GIT binary patch literal 232 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|VY;V_V@SoVw;_&v2NXCKKmA`n&u#k)pDi=yidBDL5NYg6V`pcVZ&;F$ zHOFqpD(IX=L-)4kk7;qIDmqS|R64%=lQy#uqXw@x%eR(P z?q{{0dGpQx%B{ZS?9pbkRBXcy(J9lEB<>rm(2EP~?Rb-=@Hd`A!1dkKju=I|E3r#2 l=Z8-flZ@`~zkD)IbsO_ki8Ipz85kHCJYD@<);T3K0RW|ASl0jm literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_y/front.png b/gfx/pokemon/unown_y/front.png new file mode 100644 index 0000000000000000000000000000000000000000..f444a7206173a990620c25e1442fe419cda393c1 GIT binary patch literal 410 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsB1t6MBB zofsGxb~-S)F)%QCdb&7}sW6092oxHqEA1hUt zi`;Z(yAhLe!0Gvn?(D{7MV)WEe{6n|^M320SN^g`KW-|D?OSzn!%V)F+NmM4d)0mm z$ZnFG5s<$1nw{MB<|BsxKUcoq`K{@air7y%r}UQa>vFvxtt4AE?`t{kb>pe^0}gZ5 zjdhcSZo0|m^;!zMl=E{(Uzt0H`+8~_S00Jd$wNNA?S6}-kiBoZQ7idqCDxZ zSffsBo|8D)e@*zfWQXyi9t-7jC+3|>H|yr%v+u4+yIgQCJ<5ARWLM!&pADMn=N#q; zrXP_kbo+MJWXTEBbPvXz&v-bGrFxvOyV)6|G##XSQ_Zv0|K`7JKCy3h>9qsFT3ZZw zQ+-<5%#KKg?>`*x>{52Ky8JB1{S!Sa8-m4y9}3Nz!lnG+RQi#b_Rr7ozq-cHX7A$Z R$H2hA;OXk;vd$@?2>_#8vr7N~ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/unown_z/anim.asm b/gfx/pokemon/unown_z/anim.asm new file mode 100644 index 0000000..a907ac8 --- /dev/null +++ b/gfx/pokemon/unown_z/anim.asm @@ -0,0 +1,8 @@ + frame 1, 06 + frame 2, 10 + frame 1, 03 + frame 0, 03 + frame 3, 03 + frame 0, 03 + frame 3, 03 + endanim diff --git a/gfx/pokemon/unown_z/anim_idle.asm b/gfx/pokemon/unown_z/anim_idle.asm new file mode 100644 index 0000000..936e90e --- /dev/null +++ b/gfx/pokemon/unown_z/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 05 + frame 4, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/unown_z/back.png b/gfx/pokemon/unown_z/back.png new file mode 100644 index 0000000000000000000000000000000000000000..73094c9faca07f6892f9f39378c29b646d98da97 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UtQf|Y3ank zz_8PS!Ht1|p~2I|F{I+w+bIY68Vop`uYdagUuU-3BJtaYg?g)>o24Ge$ldru`i;e} z4u{1{`5XG~X=c7S`|JKPe|DR_iJih-jC=oYVve29Y$r2;X~GJ@j@1thlO()6CoQyz zG6_-W_kF81s;~#KmYBgujZSowa06rpUW#FZSwsOW^dlQ&h_cUx1XL~$l`=+C!_fFk0 zt<=8x_jvc+my%U!-sf9Hru|Nj%goll(V`aTuwC!5-ddR>8|vN7_a!b)e<68qcI;y_ z9@_<+sy{Y=W_tUPecs9SJk^Ph(%(vcj+=YMcK7Zrj&F3#0 kh5gRINm#P^`C9g4mV83eIp6LuFfcH9y85}Sb4q9e0OIPS-T(jq literal 0 HcmV?d00001 diff --git a/gfx/pokemon/ursaring/anim.asm b/gfx/pokemon/ursaring/anim.asm new file mode 100644 index 0000000..06ff8fd --- /dev/null +++ b/gfx/pokemon/ursaring/anim.asm @@ -0,0 +1,8 @@ + frame 1, 13 + frame 4, 10 + setrepeat 4 + frame 2, 09 + frame 3, 09 + dorepeat 3 + frame 1, 10 + endanim diff --git a/gfx/pokemon/ursaring/anim_idle.asm b/gfx/pokemon/ursaring/anim_idle.asm new file mode 100644 index 0000000..8989074 --- /dev/null +++ b/gfx/pokemon/ursaring/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 5 + frame 0, 09 + frame 5, 09 + dorepeat 1 + endanim diff --git a/gfx/pokemon/ursaring/back.png b/gfx/pokemon/ursaring/back.png new file mode 100644 index 0000000000000000000000000000000000000000..26621852222a8b3c45cde75bbe4b07e6f6c76361 GIT binary patch literal 362 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>pcB;nFAu1_p*j z?>-tbFfg!`1o;JngmX3ADj66UIXzt*Ln>~)o#I$_Sb>LC`Rw2KcN93AIEB6~n!V4e z+vc|M3+6-XumAsQuJ?d*-3qPKi?b>wx;nUinw3>!ETVI}y5(C>NPxJ)zq#jmlKzM( zABZc?KeC~(+`0ddb-4JFXR{kW?)tRSAw**TtnUH-m3Kd^badDI`JUtTQRja<75;2e zxZhN|`JQOg-nl1s?^<=?UYviTHS^l_-mRvWHto-xDc342FKy8j5We92KK?VBf@b0I zDzl5u6~B#|Zxj@wz$dm?S;6~=`ZQ-IJauaJXLm{r~@-P6-xet()#w zuS{BZ&o67w!5<9gq=IM39e7hx&9Kzw==;mTFGIK8Ir`f1`SM*+`)Zf|Tx&2{anm&K z!q8BebLlzp&y9mNe|W!&{lk`Dv7df@|Fw6YX6WG!*6aRl5cp|z@_OLyD{njl_Al*O zzG~++Me~)Z6K6e;j7j+rmLe3^t?|uaW$4=8#^rq_%$qoGC#Z#rUgJ*L#j1IF&+h!} z)~+dGC(CTCc-(eQHonk4^U~Jayq}j$pVs_l>En+E;@`MSBwxQfr&}~fWL|@7tmBJW zN9~H123(sOm3-kUAmoMplwxz|mQty_>JF9Ekyst7X@YJ#YUUB|ZXylUax{kP7FZ6f%BhY=mrU)E%m~%C|S^X*AJGwg?BhVp8CwEyD#?C zsYi3Q?&%fGb6z^j>(DtH!}aGM`M;m^^6TOYWc3q&eCj znrZI8S~d3{!~y!1PXgNsu`((f2PV!mH+T2@NF=8oYf=K^;$c%1)XU(>uhIXf4d zGg|b?=~OtBtnapVS#7;@@$4^!>@&jW+_@*<7myXJ6ec7?YnSHJBy99en-pR$?tLm307M+uou-*N$UO>Ow za%t(I?1J`rW~^yzBtI;4`nqYESh+#)Y|X!OtWO-(3q0_EFHykmU4nXdv&EX7$#d7T zlw-m_cI8j{?*wlC>3?UUXoba&#~&Ty-YHD~-fArZ;_>y}-?4ZdbM2$PXWjb>+&SNI zKw&}g@z-;g7{BZIzUCiWInVpZxy8qS%)4p{V*U+$*YQ{O7wr=k5-2rlm$Wi z`PNDCKR>n{OZ5KrZR+Wx?AP~w@~ggA`!wg$&h;{$VOKYt<7-?H_;SJZz7 z28Oc*mN^Uz3@jx6$|Noz>;a17Oz-Z#>;uunK>ut#CB4$ON!=L{DFP_NLy*xX8 z_jb8MW|MuC7q%-V*IY0EJD;`Q^TT$Y?bCT~M7PbhlxtS&2!1p%vAxND<{=A_Q-u#M^fEbqX^!zdX-0 zd*g4}#MR;(CUVNK*>UsCe*R4$jcfgS!-fN!kA#H%o%|p>L?Q03g6|#?i{FJuDj$Wi z&Gk!~!+#>GYlB{s+^&ntb6eMG|8icnmd|$!=Ze?aAJ`AwvU!mB_tTYgi8~GV z9tkkIvi05DQhuhL5~VD;`(tw2?nEjJq(&WUce$Un&r$Oz?|){OU97#UuAh0!z`(%Z M>FVdQ&MBb@0QI7@#Q*>R literal 0 HcmV?d00001 diff --git a/gfx/pokemon/vaporeon/front.png b/gfx/pokemon/vaporeon/front.png new file mode 100644 index 0000000000000000000000000000000000000000..f8ed1175638c90cd0ec72f897335627f7bd0e03f GIT binary patch literal 947 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*3@AoEe5Hh*8P4dX~ZP89EKHPn+ z!1_*n+PPp}ds@F`nQD|O^@-cH?f>e!L1 zN>jG1Yp4p@60z}t)W?|pUJ;ip#NH*Hn!prLXzusKtmn7*QMo6Z9WEVv^dM?`aozn1 z))uS&t!(*iBjzI7u;Oxt0RQ_RC%w0?Te+`2zjy5izTf$8NT%*Vvi8uDU+~+;x&Wdc0S8YzlOe>J5Tqf&$?B7BT_CW%MzbooTMPJErT>G2ks4;|gvt_~CIqpqwkRgYYKB*{T| z?~$6=?^C`muR7^9{qwyY3#ZpOUMq^$SM}S*U)8zp+t;AC-)~o~T-CUEdSBcx_bShQ zua-tF_TB3;nZK%2_F;G2rp43i*2Vq$J>8eXWY5o4(|y<`S1+6HBk#{4R&`SDyogv; zC-e5JY{7e%^c(KE;61mSckh*5H!gVhcFXQ9VPEq#sB+ehmDBV5>w8%5R_s#=Q@s|Y z|B>_6zPLvdZeH`=u)TI~N;&V|h0}ZP7Dnqk9+cTz^5xP+Z+Cs!y(abRO70z>`@Qga z?VU>b@_Wbsy6v5^V!DCi^(xO(9nZe$eVwF|#qe{<^e21zt*c(vU-qtN_|&AzbFNRJ Rh=GBD!PC{xWt~$(69Cog&2Rt! literal 0 HcmV?d00001 diff --git a/gfx/pokemon/vaporeon/shiny.pal b/gfx/pokemon/vaporeon/shiny.pal new file mode 100644 index 0000000..b8571c7 --- /dev/null +++ b/gfx/pokemon/vaporeon/shiny.pal @@ -0,0 +1,4 @@ + + RGB 27, 21, 31 + RGB 15, 10, 24 + diff --git a/gfx/pokemon/venomoth/anim.asm b/gfx/pokemon/venomoth/anim.asm new file mode 100644 index 0000000..ec7e2f5 --- /dev/null +++ b/gfx/pokemon/venomoth/anim.asm @@ -0,0 +1,5 @@ + setrepeat 6 + frame 0, 06 + frame 1, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/venomoth/anim_idle.asm b/gfx/pokemon/venomoth/anim_idle.asm new file mode 100644 index 0000000..33fbd44 --- /dev/null +++ b/gfx/pokemon/venomoth/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 04 + frame 2, 04 + dorepeat 1 + endanim diff --git a/gfx/pokemon/venomoth/back.png b/gfx/pokemon/venomoth/back.png new file mode 100644 index 0000000000000000000000000000000000000000..5fbf6bba902fe34082a36ad309b8b488c191250f GIT binary patch literal 537 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7e=q1*vSu*@ z1Hy8mfpLeYi(^Q|t*O&Er!g6FxGs8|rpC`266#!SY|^KU>aP8|K9t#}>K%*}*uEaay+UYo{v*S#JC~ zmB5s@QRm~aHD#A=?1LMc1jPO`9698&hw<6w5=Puddjhzlm>H{9=7Y7UkQ_b|~x1sWLgBvQsVk(L7%5Ny0v&6AYadHxQ0_j@26+c6r+WqTfZJ`sGhMacir4;izYGk+fG@lyIF+uO8M*$ z#vC!rO&K{Oy5;R>iN*UU{92Q9yUgNsF>B4Y4}X*w#!tGs_=vQ_W%+&`dvgbKfr}rw vW!NuT&JdZhlbP*M>-4n40y`f3{l$JwgX2N6M~^-O0|SGntDnm{r-UW|!@}#R literal 0 HcmV?d00001 diff --git a/gfx/pokemon/venomoth/front.png b/gfx/pokemon/venomoth/front.png new file mode 100644 index 0000000000000000000000000000000000000000..eb3c291b8542bbf875253cf5076c7dd63ce4c268 GIT binary patch literal 1084 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU|7My%)r3VWOp~8fq{W1z$e7@|NsB@f{rC? z7Bes~EZ_4}o`HdZr6kBN`2YX^|8q6mDj67g-2JwfgMY?rdo-kNNo zFQ2D-K1ej1WMMh;$mH)o@4H=Ek~IJHf}2<7u;04N8<^vA+`~BXAn!T#z&qhb-rhLn z)G;~eWRCyF$t9DtGNzeXwy7tJ-g(A!X8yBPQqTG9^+Ik;Dw#a9@SH}jV9=D+_4-d$ zW*z-g{`sqW35Py*IR_KO?EirxD{%qQA zsC;bZ@efZOb>5YCtmh3m*V?>Cw!o)rVuVv)*af#0Y{z__{1^2J`hRfEImydxp7FJ> zj%w>3ep2Z3QR=k*(z=fqZKbv>lv?rl>WLP`i6ow}|#EvTk4^XJZm`@@$#-J#@kIx+ROsh;`o<;z!DO3jO!=!99K1iZSYPmocvgL}L+a(}EKawb z>^7}?z1$vdUa#8uh$lW$MKX5zvs9C(nZ64|E@q_czo&neIg2S%#6GpwPi6YLYcn@} zT9vzavckr#_pes2-YOVvooavI&bRva-5KgP-p@Mr{di(@W}+R7>fG{8%OA{Komp)3 z&y8nlmDG)fAM0& zz0FpWbN^27%X8c`Wl_^qW1X~0POj~r9qmQVSZ|M>(5y4(t)k{H-<_LRB$Rl~WZJlD zUtZJUxjSAl6s;|dY2@iEmlqDN($=}U^U%dZCof!l=;m6o%X#;)$Bbv#((ek^_TRJ9 zIS^WYrEcAd`Jrp2N{?SCTgQ8D*W&)3doM2pmY*=2u68%jvi8BHCDz+^e(^5<;bU_m zAg1K_W1B6C-*zqjRT;lOVBYkQy9;+6R?YXZx-0nh|6>mQU5C%w_8G*M9G|y1{O-on zhTiOVA0DoLc4>{Z*>4N4M~>wkIkwvm@Za6|J)^BO>56RhlI;G#@;9c(tzPrxoj?vRC+bO|+Q&j$`uf{spt%?Fd~}zKc2kKwNnR+rEs_ z0tKsM*Pg|c%xQWVZ~p22*SY02&t>md9xuQ5k^h|alMj2GlN#QixBg;3x4h-*_vf;9 z({W{BWwTw literal 0 HcmV?d00001 diff --git a/gfx/pokemon/venomoth/shiny.pal b/gfx/pokemon/venomoth/shiny.pal new file mode 100644 index 0000000..50d9712 --- /dev/null +++ b/gfx/pokemon/venomoth/shiny.pal @@ -0,0 +1,4 @@ + + RGB 16, 15, 31 + RGB 17, 06, 21 + diff --git a/gfx/pokemon/venonat/anim.asm b/gfx/pokemon/venonat/anim.asm new file mode 100644 index 0000000..f742d4e --- /dev/null +++ b/gfx/pokemon/venonat/anim.asm @@ -0,0 +1,15 @@ + frame 2, 10 + frame 0, 10 + frame 2, 10 + frame 0, 06 + frame 1, 06 + frame 0, 06 + setrepeat 3 + frame 1, 04 + frame 0, 04 + dorepeat 7 + setrepeat 2 + frame 1, 02 + frame 0, 02 + dorepeat 11 + endanim diff --git a/gfx/pokemon/venonat/anim_idle.asm b/gfx/pokemon/venonat/anim_idle.asm new file mode 100644 index 0000000..2c14af5 --- /dev/null +++ b/gfx/pokemon/venonat/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 12 + frame 2, 16 + dorepeat 1 + endanim diff --git a/gfx/pokemon/venonat/back.png b/gfx/pokemon/venonat/back.png new file mode 100644 index 0000000000000000000000000000000000000000..09b946146f02aaa33e7070365438b633e72826eb GIT binary patch literal 428 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|6EfbilLZ+ zf#LIFeR~E529}Z_zu^D>|Nqa`aI0isVD$EMaSW-rwKddx8jB*w&O;4zqW4AfS`?AyN07^s=zrfWLx& z=c~6H-IKRG99<;PeDU#(jctZCGMD5(N+%ykt}%GT!*6MP=+CCJvyXMGTF=$Z#%X1* z+?vVH_dU5Lv|zbS`DK+q8x6eA|48>1-O=qL$@y=kXIH{klXRZ>dVHnxTkIcvP1wQr zuE*U$?3n4V5Bnai?G||&6gs;?*=Oy+yu1BeQ_3#Zor&+iyR`l6n}`fIKmU7n(<2531_n=8KbLh*2~7ZQhPv1Q literal 0 HcmV?d00001 diff --git a/gfx/pokemon/venonat/front.png b/gfx/pokemon/venonat/front.png new file mode 100644 index 0000000000000000000000000000000000000000..466b6b4c34834885caecff5426e65092936bc03d GIT binary patch literal 636 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V5s0=W?*30zRqC<0|Nt3fKQ0)|NsA=YYId$ z6f-a|d|s??&%nUIQWE4B{Qv*||G64&l?)6_(w;7kAr-gYhF>gVQRJBXyT#I#Hmk2@2(F75AIy};`I|0x9z_*7Wiw)85V;nhAjLFrY0 z4Cho9gC)C^&F#*({f)3m_pZBOkaCELb@}eB84jl|2Lv9Q^7x75m49wG&%gP2yk=X) zYxfOGx$7+3Z>z5@KmM-6cqWhbVwH9qnaLC92CA&7dGjsd^^}y^i^O|A$GkXwSfxXU zd4@y0eBqKW`_?p?xSv%p7i|`nzQEk~a#DW1oYIWmXg!zx3Yqy;MiqX)J$o0&UD~po zw_46+Y2>>W!)=0>Evw^VqtGfw=USC})ph%=d%mAoo$5rJyM@=E+hg@vz0_@<4(F54ck-+*pO$h`?wa-J zX`tn-)lK%*`!CI`cviL4eC|rg=#|ESK|52QtTMj2Y;NJjnK?pc(&BS3evM2QTfh0- znbWVWE_Z499owlg_oVvgS7%lm&o5z{T7FcbzbLkUp~f4XV|<(|t{!GGes`>B=DC1l z{TCJ*|Kr|TG+03brHlLfJvFE+< z``>5ktLJb0TzK=xBIBrswt<7?{qHey=5^2 z1H+{g+a576FtC&a`33*~|NnokhFc{A17okJi(^Q|t+yfEWh{yu&PD&N!#U&czGaPy zzh5$yMX12-N&VlGOK)W7e6X&v59ti5KJw1Es-5#z!vECs{&SiyoHM9;6O!M?W+%QN z*_Ulc)gEJ;J5Q=xRo*W6YiU)fcwa_t>$6zx>o+ZCy^F1T;H+!W6dS}gucy|;_HjyD z-9-Ltg%5ib{_Xe>_V0@I)AZQy247SdFRI#aXPav#7PmxjjazUCvx8BRMb^%HjNym0 zR~gRbIep;w6n2LT&b*O*yH31n5zP)e^^)Z&TiwyGi43wLJkt5{ZuR0$mAjLtro?Eg zuQ_`0j{aTaYf3q%eowOdzHICJREGPKYMDl6H78#w*Kn6`|9(D;$A^7}*|u5DX|rBW zKKRA`@F}4q+>_6U%O9CMNmZcYf^^`Y<2p-JnvdtSx}1>U`=+GMVa4{bM2_XXs#UwW zlaazS(+_KczU~b?@lVH3S(KGIc19_O_P)7STBgd)T6CdTL*_@&lcoaUg#Of5hnu#~ ze;ylJBlcIOJUH;}BD?*blP26dbYQoIP#r@>CO3o3WcI}j3=9mOu6{1-oD!M{D?>fq_(7*cWT?d;c+o+xm%9{v39{hqap z6uJ!mCYNP(UAdN1KIt**g%4ZRmRjtyIB+~W)K7EzIu^}rjqRuRCiWsRp%ZJ@SPhH|FA@8ZR=|3w!~N4=N5j+?X10Iuce;*C!+LlT_n3xQuKSL z0~R{lCAOb>@_Xay6>`tEtQUD*m-q9sZlMHI=MpCS_MuE z&0l%d+n6(G!HKBbRh&h$w6C7cczRlM!>z3Br8S~KyMA>iPF2ho?Z`Y*BC%FQh}*aH z@VQ${ZrO&^bS}w^va~Ui+_$>@uG?9m2d0Zkt+TI`eh=yFn5zAmL;jU$Xl$68Dj)mO z)fcB;FipB?!|BfGrO{}|v(VOa*XLtqLM{`!Iy2TzdY$Q{B&qVPY{q}D`@8vkEn1(+ zIRBb0lqUCa*Z-hX1-n;N^GB|*4w8GeYT^y=^k4rPFcG1 z&_l7uX%{6F&&wV4*djRTVyJNKD$RAT_hxTCr!>d?+l*B^+%o<_RqOJ4eF%{`MXva8mq+V;pM1}QuGir%eSR}eDOfHx{(-@cU_D>m(P$(l1?K*&G) zP=%M~>lc}3v2s@ZmhXdKRSK}1vXrC4KfLcw?0C>;DBS-%>Rs`1=5mL5LcQS!o>f2N zdr|3j_PhTbMxz6t+N@;~INxy~!5??;Omy3+C3$GY=L52ys$05(g=~x4JzJthJlb9r zy00_8ctnzvB0c*Mu6WBev!;j=#Lgo*jr4>Xyc-R5+6vgby2 zF|W#p?XxPS6E@yqyv4{}c3@M%ak+?uoy{iY3$}e_i+HsramQn}h#N%icVD@Y@rGotI9@ekgXBvx7NL@4V#l}`}WALoH41k-MYqo-VSBk z#0T@NH);Fqc*tjeYV&E?4?CS-hrK&-K)C#a{`qEWzkqc+7pKpjbl^(Ft={A z>)6Evz|zo51j&UipRXcO35*v9rPx(Gk1VH_}CauSuF8`et+2 zck8-$fB9;D*B#%(`}Eu2zSP-Q-~N_;kn{EHZ`lh6K0W)}CwBU!_qz!p-{)CB`x}|R z^Ks_xkOFs1xF`JI>-*Zr`>da7?2dbHaN6YiYuS#keGmE`^jSb010(+#mFt}RI!Vg< zj-$n!H&%u0x_1)e-qjtH{qXT&qjlN(O7?P=@;~P9ez14lEZp~Kp$H=b0|SGntDnm{ Hr-UW|-$Tr1 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/venusaur/shiny.pal b/gfx/pokemon/venusaur/shiny.pal new file mode 100644 index 0000000..6cffe65 --- /dev/null +++ b/gfx/pokemon/venusaur/shiny.pal @@ -0,0 +1,4 @@ + + RGB 18, 25, 11 + RGB 31, 22, 03 + diff --git a/gfx/pokemon/victreebel/anim.asm b/gfx/pokemon/victreebel/anim.asm new file mode 100644 index 0000000..6e62911 --- /dev/null +++ b/gfx/pokemon/victreebel/anim.asm @@ -0,0 +1,6 @@ + frame 1, 10 + frame 2, 25 + frame 3, 10 + frame 4, 10 + frame 5, 10 + endanim diff --git a/gfx/pokemon/victreebel/anim_idle.asm b/gfx/pokemon/victreebel/anim_idle.asm new file mode 100644 index 0000000..bc7504d --- /dev/null +++ b/gfx/pokemon/victreebel/anim_idle.asm @@ -0,0 +1,6 @@ + setrepeat 2 + frame 0, 06 + frame 4, 06 + frame 5, 05 + dorepeat 1 + endanim diff --git a/gfx/pokemon/victreebel/back.png b/gfx/pokemon/victreebel/back.png new file mode 100644 index 0000000000000000000000000000000000000000..6f3ec484eaac3feef73b27113e4f51919f650a14 GIT binary patch literal 397 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7UwuvDe^539 z149VsRv`uk29}Z_zu^D>|Nqa`aI0isVASz+aSW-r^>)f_p=Jdhm(B0~|1VbLyv}mE z+I#up#m{G`E>Qaaad)%XyN5*#3gTYXc?SyvTU@HE5);FAcWO-6b~~79zx?5z$L)uw zO#ig{q}ahU(blHWIIaCx9gdwo^tt;$l!Kd+an9eMI+aWJepQ^hkayfcVEu)tq%D$# zCvR4>9G_pAqI=b4Ug_c09}P;ja0~jggdE>(-kkhy_XX{O_H6zc+}@1UMLR#tVddMW zAD-_V!M6UuvGvtT?{d~3=r|m%DLRLJAD7f5_IuyXc;2Y|a&|xO-5SOJ-3x9jYkpA6 zSoS098;hZ^tMJY0^64k}R)3u3*;Y99q}QGFPvN%aMTzr{{#mGUUiFLKuQSKP|AaXG z?=`;_`6%TJS5B~nW(=>N@6y@Ud2G_}O>9<|K4spum2J|K*!#5%3=9mOu6{1-oD!M< D{Z6r0 literal 0 HcmV?d00001 diff --git a/gfx/pokemon/victreebel/front.png b/gfx/pokemon/victreebel/front.png new file mode 100644 index 0000000000000000000000000000000000000000..7fc688ef3f519d2d109351c742a8050ddc85126d GIT binary patch literal 1203 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU<}}3W?*2r+u^&Ofq{W1z$e7@|NsBh*ChT2 zWiv1^gm7*ZVqjokDGBlm{{R2~|6C2XN(Kg&AWs*^kcwMxXLIH~HsEpf{QLWU<)XP) z!U7$vjag$C6wI>mUbOXtsnNylGK?QNzB~M>_;WX|&AZFq{fNcX6Ce8@_Wdg0JiUD7 zi?DxE$?IfJi%Z@u_IasZe5e0XLe0TikF%jY-*i2f&VyYic!cLVaeLE$s*#kgOT~zC6gU1Uq27t zcqV9nr*(_^k+{oJY0RE3D#cte*GriWGra3^xsamwf$7Y}i-N52O`^OD=fpQo{Ig}h z+)DQB3EyKCTGzU$eqCZc!9`V*-|)-HGRC%BGm|YV7hKU)@n8S5g_Nq zRGgQ5+7rnpQgUa~D*=O6QAm5p{E`)D& zT$rJzxa{A)2L{|5&d#1GufLO}*yHt?&P|(23g%qW5^wC7cG+i9k?p*nG50j|gmX28 z*Sc)^@$KO1oi|pv8CCJetYdwe7QmaVeB5q7L$FVjg!0MK%7z&8s4T^IcAX!*g`71d z=O!_4wcsgTo6mOjgpfz&;pJ}M>aM)j%D#0%)2b_F;~M?Rl9r5H?3P_-ym@!ygP_OS z5zm=Rryq=HR=mGMs+MQ2K5y`v1J~|e&vt(6(Ea@|V~dRN?$nyUZt^WR(&i>#QFz|{ zm+OMj6)W%6h9xnKJ6uIgcx`KDPCEbm`p-RQ8SYr$vHqw0{z3Tr2kP$yERQ(Z@cr7b zz{RTmR9I-6P4n)Ux?>D4`ESR_Er~MgJkB^JWfn7AV&pZ`rB}74EPk2Ob>&v0*jnqv ziK=njrz@;`4hikr5L4~`XNTCd==Tm{Vh=6Z-fOV$ENbrSn& zJMABK+V|6+{$2wLOb~w7^Z2TD8_&OM)~7be{~=E>_0!tzLR|?`>&?m{=Vb=-RHBIt<7|KCu;$t#H+lvk>a5#VZ|G!2@!MybK@4ni| zTqOZ!S%v&GDnNaZ2w)_bN-lsDJ0%TqpbH{pz2!_t8r^r+3|4`}WM|xWcrhHEo+#?H-}h zrdekts#bUU&pqH_d89RoJE6tBcDn2|+4N(5@mBhaGhff)yfa6$;`a+v-T$5qMVl3; zJ$FVdQ&MBb@0AFFbnE(I) literal 0 HcmV?d00001 diff --git a/gfx/pokemon/vileplume/front.png b/gfx/pokemon/vileplume/front.png new file mode 100644 index 0000000000000000000000000000000000000000..6a8a4c0fda5cae6d592337852b3b2c83dcaaca01 GIT binary patch literal 851 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|NsC0h7wL* z*$fN}0*N9A85kH?N`m}?LE^a@Zj}rSOrJbm978H@y`9xv^i+YvLGa)I`LkC%5O!UD zxh$_R-Fo--c@n&xbG#Y$)aEU|p|?U{_FP|PRW5~%YCXp}LvJtgFRy5;{1=w<=XljF zfA)t$li0o418-U|eUNXsBYI!nh?UnTBx=TVA9?qXxp}{Q74OG!C}?|EPR-*Zvh5fN1Cs*YBAn%}gAIeS$ zHOOq-6ymt|;H_!Q)2_YN`kw2|CT+1u*W$T>t#aUVG3LHE((7+At9*OvUc~&_*Y>^y z$Ng)~ZMIJ=t^E0CX3SUgntYGH{Yvj1RYSg>kCGQnSq@7o+kZP9`JnHJP11IUj<(p< zXC|g++*(kmU|753Zv4i0v0}c4^wXBS*Ngf3HyY{N%!=RFRWV2PDM!B8OB?aWGYlu^ zK6zB=cbxsxoEx{?i3gl~LV{>S$ohQQg|@0(A{O5VCDb^4^7 zGfiR9d2eN}Ih{OW-P0;`!ZYBp>@+7%b+f(Y5nQUq?;~o@?)}nN$(R0>ugUv;#8uB} z_ckhAzvuYO>f{4iDbMKlGbW3@U+{8m;s*ApJM!XB?l8QnI)09^Y?&pLH;?yEz`pvrK9eu5LEh#+U@b}w7rQi9@O9B?L@|E2S42n&; zesTZxMD7<}CbwC<_at9n_ij!5z&Dvi<6h#8&2H~ESRHsFYyR!Qy@&T6p1uA2iuE5` z?fUbl?r;9|ea#=+)%M@!g|h#DP#var;k9hs`-1mB+V6d2U9d#S@8XBA1q=)f44$rj JF6*2Ung9ZcknI2f literal 0 HcmV?d00001 diff --git a/gfx/pokemon/vileplume/shiny.pal b/gfx/pokemon/vileplume/shiny.pal new file mode 100644 index 0000000..d651516 --- /dev/null +++ b/gfx/pokemon/vileplume/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 21, 03 + RGB 08, 15, 13 + diff --git a/gfx/pokemon/voltorb/anim.asm b/gfx/pokemon/voltorb/anim.asm new file mode 100644 index 0000000..424e684 --- /dev/null +++ b/gfx/pokemon/voltorb/anim.asm @@ -0,0 +1,7 @@ + frame 0, 08 + frame 1, 08 + setrepeat 2 + frame 0, 06 + frame 1, 04 + dorepeat 3 + endanim diff --git a/gfx/pokemon/voltorb/anim_idle.asm b/gfx/pokemon/voltorb/anim_idle.asm new file mode 100644 index 0000000..d98c6c6 --- /dev/null +++ b/gfx/pokemon/voltorb/anim_idle.asm @@ -0,0 +1,6 @@ + frame 1, 04 + setrepeat 2 + frame 2, 08 + frame 0, 08 + dorepeat 2 + endanim diff --git a/gfx/pokemon/voltorb/back.png b/gfx/pokemon/voltorb/back.png new file mode 100644 index 0000000000000000000000000000000000000000..e2e46de54c9ae02b78e23ee623c7632e48c4e49b GIT binary patch literal 318 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjSHOF-=Vd z1_s@Ke_k*!FtC&a`33*~|NnokhFc{A1H)ZU7srr_TW_acE-3>q|4i)XO+#^zuS0aEQiB4!A38gP2aBTsqFZs{jgz!$J{!O z1ji3i4lmr9ewdoqznvR@{N1yTUkliS?0q=<7C)Pu6_(%?FfEDuj9`J_oiE+z=BDaR zWcr@P&tP_3&_Our8B1(RvBC+9)5?x#4m@6SW__B~`qO!f6a8ms`po*p@gn_($ew+^ zKKmr+)<``0cKAn=LteiTdy{Q!0h>mnsNlR5=8aF^w`|k>KPjQiy5iBpHih*4+y67@ Y-eT8a-E+8@fq{X+)78&qol`;+0FOC|O8@`> literal 0 HcmV?d00001 diff --git a/gfx/pokemon/voltorb/front.png b/gfx/pokemon/voltorb/front.png new file mode 100644 index 0000000000000000000000000000000000000000..90dcedaf9e023bea3bdee24808fb34e767761f28 GIT binary patch literal 399 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V5s0=W?*30zRqC<0|Nt3fKQ0)|NsA&F6}v{ zsmZ{=p!@I73kC)TmXaX9;Q#;s|IgKMt7Kqc)bn(445_&F_Ie^elOhLOLfp^)|1DX+ z?qXT8?bn5r+}NKgjpeaIbAR}4I5tnTcZQbot-!gyb81>*moM&RJUTU|K`T-svu>N> zMz0e)*jFpdrG8j3?`*zB`}&0Ck8bB|O9`DI&QbI^#EWrTb!9aBmlY+g5i>5a&f@!^ zXjX7y?P=$!oYUKtwqAVe@_FtFs}(9mn{1SqUwv);cBQd+&Z}K^g^$E9p8sI`+P>Q` z^jf|#zopr0FoiIX#fBK literal 0 HcmV?d00001 diff --git a/gfx/pokemon/voltorb/shiny.pal b/gfx/pokemon/voltorb/shiny.pal new file mode 100644 index 0000000..b8509a8 --- /dev/null +++ b/gfx/pokemon/voltorb/shiny.pal @@ -0,0 +1,4 @@ + + RGB 20, 20, 17 + RGB 09, 02, 28 + diff --git a/gfx/pokemon/vulpix/anim.asm b/gfx/pokemon/vulpix/anim.asm new file mode 100644 index 0000000..3574133 --- /dev/null +++ b/gfx/pokemon/vulpix/anim.asm @@ -0,0 +1,10 @@ + setrepeat 2 + frame 0, 10 + frame 1, 05 + frame 2, 05 + dorepeat 1 + setrepeat 2 + frame 0, 04 + frame 3, 05 + dorepeat 6 + endanim diff --git a/gfx/pokemon/vulpix/anim_idle.asm b/gfx/pokemon/vulpix/anim_idle.asm new file mode 100644 index 0000000..3cc6ee5 --- /dev/null +++ b/gfx/pokemon/vulpix/anim_idle.asm @@ -0,0 +1,6 @@ + frame 4, 10 + frame 3, 10 + frame 4, 10 + frame 0, 05 + frame 3, 05 + endanim diff --git a/gfx/pokemon/vulpix/back.png b/gfx/pokemon/vulpix/back.png new file mode 100644 index 0000000000000000000000000000000000000000..cd37be416dbb76b3ba196c9d60c3a823faeacf79 GIT binary patch literal 444 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|3BGst)>$L z14Eb4G#v&829}Z_zhIDfu7+DB0|R5Ur;B4q#jT@LUvE0Bz|nH}-S7RM1r55wF8;Cd zGrnB*jr+vc%6}g(oMShAaDJ}bDp5yEa~7AQtIU=E#XnQQ(gD7VmNRk7@>?kTMo2M zty&vpc`4O=x}Z}{3amK8GbMfUx?_#2v+o{|o9g=W zLU4J-ZCxof`R{KMPA0sPIP%u(%U=mzow?g5?rgppEk6IAq>Pbp!pB##f~%Vs{xyg! z-L)|CLVMQP)wlLl7*1gGSZnfl;;f8&yOP$QJiDNE>m#q2X9dg!*Q5VTsPc+?`f3y3 zm5Z;A22au{xajig_Wvcdvqff2)7jz6VIE;F#j_{wiSeU-Vb$VhZkdX!Z{LbIV`-Gx z6JWDWElMYFF4s-7n?f6AUEaj~*1`CZ?<>azzT#GCz6saP9`luM_p9>Td+lt{He;8k z8ex&!e=8X1%BV@bPcND6^7Wcc-b(h=U1El*WnU_#eo5Rr)abLkBrV%v5`RW#hkRRN z*lqTwDo*jm{LL9L=N~hv&AWW0R_=w8f*kYl&FwLYIg^!SF1D__bo@<+y2j+ET~2BK z^Pjhb{+wXJ*S!An^I1FW7vw%%`_6?w*w}2=k6#yVzj=1^L*neYyYI5p75iM@<8k)u zPS%)G8G*}{vu+e;RUc`z;XIM6uew_;X_wxfm%UXvKPB`YD!;qv;j^*ed$GsuW!m%S z*|qe#1{OV$Jau4$Btu%#tqo_ce*bZi;d)-1;E|RakDF36Ou6npUc~Mw^jO|(=kwfy z-X9O7@7Ndn%wpOemfX9I$L9b2em3vfQpWl@yuY5csOl#g@%Xd}$4wF_uCINlTL0(s z;SEogvZ!_6zqI|iD$Cy!-(Jj2lKD8vXy#pu$Eru?|1SG{$ot2%>1l_w;*jC5z&I&c z^*vu0)`-W=VtCzN;kmi?ls99<@jW69rRThb6J$SJs;!6VSoOW|tKGVL$FKh0Q6>L< z`u*b1!Rh`uNk{&kBx)c-l? x(248&^&iGRTRMmD_#TtLH{$kuX|H@K-kGh%G$qxcn1O+T!PC{xWt~$(695lVw9o(m literal 0 HcmV?d00001 diff --git a/gfx/pokemon/vulpix/shiny.pal b/gfx/pokemon/vulpix/shiny.pal new file mode 100644 index 0000000..0084507 --- /dev/null +++ b/gfx/pokemon/vulpix/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 24, 01 + RGB 22, 16, 01 + diff --git a/gfx/pokemon/wartortle/anim.asm b/gfx/pokemon/wartortle/anim.asm new file mode 100644 index 0000000..4e7e41f --- /dev/null +++ b/gfx/pokemon/wartortle/anim.asm @@ -0,0 +1,7 @@ + frame 0, 04 + frame 2, 34 + setrepeat 3 + frame 0, 09 + frame 1, 09 + dorepeat 3 + endanim diff --git a/gfx/pokemon/wartortle/anim_idle.asm b/gfx/pokemon/wartortle/anim_idle.asm new file mode 100644 index 0000000..c4a056b --- /dev/null +++ b/gfx/pokemon/wartortle/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/wartortle/back.png b/gfx/pokemon/wartortle/back.png new file mode 100644 index 0000000000000000000000000000000000000000..bb53292eb83c56db73e02bb4f798c064dd71017f GIT binary patch literal 439 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7zjcaJQ1O2T z28P7~IoB8%7+6Yz{DS}g|NlQ%!>y8mficX}#WAGf*4?SE*Bw#dXi0tc_kLx!LY&yv z*>mELt4Uv;dtOi^>Que_gZ^JZb;=QZEGMQsxVN`P`A&Y<;rBbZ&K>xq?_ZeCa{BHf zw$G=SiVf`UMPz81T2~wsd?B`FrSS9(sU6SK7QSEFv9^EJex}9$-W_(>E@SeLKU?Wlo}AKHH+J$qjK@=a&A>RbXByY{>LAQOvR0 zSL#k@X>!l)vkOCd3;y2Wyr!AkoR|2k^8nKVOAgzesfuCKR(=1{;_T((zV5jCEvH96 zro6N|zf0cD_RS69rUO4D8#7;B{$$0RaX?_Ryxi=4vPUnus(tI;TVaq@TPUh7gde({*Op`Xp%C`al&0|Nttr>mdKI;Vst041EsBme*a literal 0 HcmV?d00001 diff --git a/gfx/pokemon/wartortle/front.png b/gfx/pokemon/wartortle/front.png new file mode 100644 index 0000000000000000000000000000000000000000..f4a4ad33f70e226dd5dee1552a9661aa6997cc1d GIT binary patch literal 942 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U^u|R%)r1<>L;*~)oq0P?){w)s@$ditF|)gS z^&ijF2)e@VzdFP>fnjs+^}>$2{~UE`{C|Hd|Gvri)biHp2Z_i0<(xJ*?|ZmYXN!yt zcgW}G3}UiJm;7m*s=vHvOVY(PF2VtQr@6@GPYJt9M-n?KuyHIkxvk0d=C@jR-<{^g-A|S#Pn?i?AS8R* zFV?@hGt&J32X0(%n6vU%cEifzwJuxreV>UO>P@}NYpVF!L-Esus4KGH-W{l1m$bb; zVrx$C=eBm44btAb<_IqQ)pEE@JCfnNr_JIkkJZ~liq~2#)xSMU^K0X3o!9?;S4E@; zZ8WallDgJZG;*!0%i_aUM?$PMw|IK8uPp0Su6GN+r`B-G+jx6R$n7K2>=)iJwrtzF z?xvlR#}w$p;--k;ETR%2VS4*pSx>U|#$@>$+`b(MpZcVFysw(AT z^g*a;+AZ_9J}3ERPWNIIlDS~(pq$&#c6q^$6CU;t8(XKdMV;c?RWrf$rl0X#X12Il zeD}2El^Gu%RP6VXJZ|>;=PdrXhHn;Y%UteltNXU?dQ!>OyAPU-gp6BLejH@s4`WiT zc`TOTUVAlf#Z2KNInz7;o;klIQTtS(5wE)Yg-bg;9<5L`HqvC2P**Ika^dYUX=dB; ztN#Xzd3BuK)fsU9mgr_%G;^M7{l{@J|)*>T$YzoPzMX8tdVd`A{6-pjziz~JfX=d#Wz Gp$PzDPt3dk literal 0 HcmV?d00001 diff --git a/gfx/pokemon/wartortle/shiny.pal b/gfx/pokemon/wartortle/shiny.pal new file mode 100644 index 0000000..c108dfd --- /dev/null +++ b/gfx/pokemon/wartortle/shiny.pal @@ -0,0 +1,4 @@ + + RGB 13, 23, 08 + RGB 18, 19, 31 + diff --git a/gfx/pokemon/weedle/anim.asm b/gfx/pokemon/weedle/anim.asm new file mode 100644 index 0000000..59a5d5d --- /dev/null +++ b/gfx/pokemon/weedle/anim.asm @@ -0,0 +1,9 @@ + frame 0, 06 + frame 1, 18 + setrepeat 2 + frame 0, 06 + frame 3, 06 + frame 4, 06 + frame 3, 06 + dorepeat 3 + endanim diff --git a/gfx/pokemon/weedle/anim_idle.asm b/gfx/pokemon/weedle/anim_idle.asm new file mode 100644 index 0000000..d2e8d63 --- /dev/null +++ b/gfx/pokemon/weedle/anim_idle.asm @@ -0,0 +1,11 @@ + setrepeat 2 + frame 0, 04 + frame 2, 04 + dorepeat 1 + setrepeat 2 + frame 0, 05 + frame 3, 05 + frame 4, 05 + frame 3, 05 + dorepeat 5 + endanim diff --git a/gfx/pokemon/weedle/back.png b/gfx/pokemon/weedle/back.png new file mode 100644 index 0000000000000000000000000000000000000000..b20e4a53dcadfbb430ce63cce13a69473d9bed83 GIT binary patch literal 363 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7f2~LJoTdZ= z1H%+qp3RWQ-3+rk$HP0wm)$%@c-w{)L?pR_gdixAyKY5oDZV5cjyI~VcAIn^e`C<#yEG|YHd7B<|j_-FWUB$Tg7Gpq& z31`5(donM6&sgTcu!q^h>E(Au$Bey9lQ^GmS^l#1#ufX{t;Z*DBrAUHV0k&)_lrzd zmK|I3KC5_!Yk9`MoZss89JO4SI-->-o zf6NQ+{Z>0KbEAF1dxbv%VxqmizR!-^mz!=CGIBRCpJgt3QnN(x{bSqgSL{a(SoAzi ToPIGdFfe$!`njxgN@xNANwJv= literal 0 HcmV?d00001 diff --git a/gfx/pokemon/weedle/front.png b/gfx/pokemon/weedle/front.png new file mode 100644 index 0000000000000000000000000000000000000000..3dfa3524174498105208626907c68de7cc3d7c62 GIT binary patch literal 538 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsB5^=O{c zlwe?B*t~D{Qw9bGmXaX9;Q#;s|IgKMt7Kqc-0A7!7*cWT?Tp?$XGIRT*7tw!SN^G3 zAIp_-DJ@nwW}5Ea|+xT2X zv+~4D`xCEC5)=>4KC-Ed&1+9f%C1+t-PtZF#Jb*_5O7Xo^`(El4l7T8_O48s?B(b) zp;Rx@MRj3EK~I*M!4Y@Pa})RzwwZ=qb#zc)E4z|s#ZGy#-A|q+Sx+n9?!3V$zi08g znUg1IZLH!y7{aoJ@6aoQo(_|9&eI=!oz;4*N>%0W6ec{P?EqUxw z*7*xUW!1}UFVD+7|7ULciz~+0J-2=5v8$V}dEox{nL>X`=R4j{zh(S(<~N_}W&6!v zzdyV0i1FhK#@`R_``p8NpfTM@)wWXYv-^vg0yRgC6Azp)&N#mXqTx*UJj-3@Q&uvc w@6m94GBZM9W4cnQZMB+lc=fZ_HlLYUb%fhiPfgQdU|?YIboFyt=akR{0N2_3zyJUM literal 0 HcmV?d00001 diff --git a/gfx/pokemon/weedle/shiny.pal b/gfx/pokemon/weedle/shiny.pal new file mode 100644 index 0000000..45cc707 --- /dev/null +++ b/gfx/pokemon/weedle/shiny.pal @@ -0,0 +1,4 @@ + + RGB 23, 27, 05 + RGB 26, 07, 29 + diff --git a/gfx/pokemon/weepinbell/anim.asm b/gfx/pokemon/weepinbell/anim.asm new file mode 100644 index 0000000..becc116 --- /dev/null +++ b/gfx/pokemon/weepinbell/anim.asm @@ -0,0 +1,7 @@ + setrepeat 2 + frame 0, 05 + frame 1, 05 + frame 2, 05 + dorepeat 1 + frame 3, 12 + endanim diff --git a/gfx/pokemon/weepinbell/anim_idle.asm b/gfx/pokemon/weepinbell/anim_idle.asm new file mode 100644 index 0000000..81583f5 --- /dev/null +++ b/gfx/pokemon/weepinbell/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 07 + frame 3, 07 + dorepeat 1 + endanim diff --git a/gfx/pokemon/weepinbell/back.png b/gfx/pokemon/weepinbell/back.png new file mode 100644 index 0000000000000000000000000000000000000000..cb20b0da8744251c01225ef2bdfb7625f053f1ed GIT binary patch literal 410 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7pZ(wRy_XjQ z1B1<{RUmPek|4j}|NsC0&((0NWME*l^mK6yskpUws^g@i3LGw(zy6iWEe>S7XjE^Q z6Ev}|sY~Ni{xY31{q<2-vs-?hkbk`N-^@SE2WOq`z9VQn>C@@3ziu^*H>S<+dA?ad z^uQyv35uyJdc@NU*R#xcCpzn>Oxb3hrh8}0OL)5%mcM(q=z8{i4L=Xh#<<5_51vKL z>i$)i*t7RjA%o1JvcL%p1}78W={o!DUdQoea>E@)lOD5}XWn}^M?K?95#yQQ z^IzEy2wN+>nB07ixi6tC=lpzDqgsv)y&KME2rI7L6UNPFG5uBJf;Y-34AY+{zA{#d zNoV`()N-3g{@_-oYIC2%n?KLayB2u;M%K&XRk5YtuB}}3XcouBm&;dj)lPpD7;kie zL*`1p-L;*Gm4ShQr6kBN`2YX^|8q6mDj6796na6{Zqd zSGn3!Ls=#5@Bt$w22<8g`p)SGO%}XZ?V6T7%iO;{bM<1Mb&^iT9c4y044Vs$4Wf9K z)xB6y?r7z`B6EjXfp-+A{AZ)HZTF5Y)!&!Z_+)DS3;&LF$|kp;FYt9fJJEn+w`O@T$HXV7fjn-NEA;y}vN)lr0U!L~k(tea^ zFEgJbd3DvB3un&zib#Clc6`~v!v)LM9+@;U1iK1wHk)xJ!XH+$`^dCq&`=F6+}TPrndoaTF7g816*k?Or?s*hyj7R4|>?EN+AN5%4e zOMdNNumAF__nv(!ujc-?n7g|7_l`V{PnR~urQACns%8DX@VVW)JIDXV{bsD2FJrtb T@~#>K0|SGntDnm{r-UW|QLt<7e=g`;lx8sl z1B3Ll#W@TN3@jx6$|Noz>;a17O!06!V;uunK>*y3uvBL%&&dj_1&*k1`*i!Xo zS;gh)uV#Cm{QSrCh2pND|4tVy6RWIr=AJVyQM~BdR=t<;ch;e^#5V4(!EWe>xfBz$Ijh1IdluA zu?5PXjuLRJXJ~jO?Y#4&=z_+k2X6m&$yH5bsDF9ALA*JY?WZ~8Y`q4X3llOo7Sm!mS;#4^rZtLa!5=tjJr4F6X|FR|As$y1jXTPZnLy0EmWYZ3-;{3<%3$xWUkKR)a z)>x`mpYTtk<=l&VIae+&IGiL`e(AX86kfaesyU}r?pe$*m{8#HZ`!K|a}BK2_q}?n zoOIZFGRt}WGvTfuvy`=}zJ8{3WMt$Y(?j0voYx}C~?(!EM$|}^J zqHOke^VgD)Al^>T>5qIOWQ+tvFN#P^ob%^@zjgOz6<6hx zCvRGVSJ-5>e?G9nCoiu&W8d^OB4(HO`k(qVPiR)*qO97p^OfgZYEq zV{7FiBiv&iJek})rXKrOPky6uG@S;Cs7>{q5B3cM1-<7bJEtPd}wwF0y~!?_H1jrmPIXXCbt zM|?lleC4~buDoFe$1f3WS)29cN8G;_Y_V8h&aybjW=6lfW8KR;iod(wX4dUd@UhPk zYc257yyLH#`&^E_B)wy?t@X^E&dXY6T6ghz z%&ci~ZM8Ny%e_Lxe#7%V3H3G2H|5ssR6g=jXNB17+1c*`PH*}4tj+ogXRMZf`JH3R z@<&b|=3mKn_T>2$EGy4c-dQAahq3YVPRE;t>>I=moRkgSxp~KfzP<6~cQyvz+L0`F zdx!JN6Fqkfcb+&QySaGn9mD7?h3q|E#^pTs3Jctq{|zNpb=7U}W}4$L3(h06mT_j?H*JS2NosYImkSzjdQ!R_Z)yQ%MEae#LL}D_p|3 ze%*7v$KpPB3XOEx9FEH__j|u1nV;GE-G!;??*dBH-Ua+PxaIt*v$CgMHDB9lo0pr+ zoo;<7z0kelr0nI%^Q-qgp7(yob8EX!>tmCSosms8OnKV3v%{#UJ;>$ej^yn}-aqJz zOn=&U&YSNYhyKoF9#QM^6=J@37P34yf3tblosZQ!AMelqUUOXfUBUa!w_e?w`@Ta} zyqLY|aSgk`)_qfh4wdX{mMTxs4cGm>MvIgAy=~e1&8PP6eQtfs>N~{dUp4G|9`jB4 z@cI#-+@AaU?k#-AbowWsZT{WQvfpct$8)~7TU~$UA4BCi$Iqog1?>zB3=E#GelF{r G5}E*$b+IJ? literal 0 HcmV?d00001 diff --git a/gfx/pokemon/weezing/shiny.pal b/gfx/pokemon/weezing/shiny.pal new file mode 100644 index 0000000..8132fea --- /dev/null +++ b/gfx/pokemon/weezing/shiny.pal @@ -0,0 +1,4 @@ + + RGB 16, 20, 25 + RGB 09, 12, 23 + diff --git a/gfx/pokemon/wigglytuff/anim.asm b/gfx/pokemon/wigglytuff/anim.asm new file mode 100644 index 0000000..9ff3829 --- /dev/null +++ b/gfx/pokemon/wigglytuff/anim.asm @@ -0,0 +1,8 @@ + frame 0, 04 + frame 1, 20 + frame 2, 08 + frame 0, 08 + frame 2, 06 + frame 0, 06 + frame 2, 04 + endanim diff --git a/gfx/pokemon/wigglytuff/anim_idle.asm b/gfx/pokemon/wigglytuff/anim_idle.asm new file mode 100644 index 0000000..faaeffe --- /dev/null +++ b/gfx/pokemon/wigglytuff/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 3 + frame 0, 06 + frame 3, 06 + dorepeat 1 + endanim diff --git a/gfx/pokemon/wigglytuff/back.png b/gfx/pokemon/wigglytuff/back.png new file mode 100644 index 0000000000000000000000000000000000000000..5e264305b27fbe487429bb1ca5987df36a5b8e2a GIT binary patch literal 333 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|G#*xVatC8 z28IW!?+O?g7+6Yz{DMK^xf*Vj3=9l!JY5_^DsEk!8qL?Lz~eIW%)jqzn2v4}StGCZ zT}XK8%*R`7ynilb+jn`h-F5cOzu0&_MAiq-xm>!>z^vfu6+IKDua8!4XL! zig2;0I`Kzeclk+voY~KC;u6QK=)A3VQ)~h>e(E$-vcLHntuU#*O6SXUo;(JHxffj% zu1dTte_O3E>!p8V`rm4WxO??%J05>eRxr#h^MAr~W$6^AFJWhyib9RG>v?;a|5=t+ jD?Vv^v2Nx~!BwA_XX&xs`fVl!3NQvwS3j3^P6L;*q z{AXZbc%b^OfPsO5r6kBN7$lyn;a17O!1USE#WAGf*4xP2o0JtfM1KAMUwM3Y(d>_J z=C!ZAv?S=H2RBy|d+@J9=4!N6ugtwZXZloU-U62;w z{%B1Cvw>8CiO#1e$KZtwZyUoV*eZui$^5}3H`}7$h_?7qCtgXSPKl3@Vp& z^{SgXeLsez9c6CVq`Wg@3**}4?JM{mFkQQPUi+9}!|xM&R=g0~v^ZfGXY~dp7N6B^ z#~+?vKFil-^P-H7?PAOhI!{mfH1I~3b*dCquX}R)!_h^M=9_`+< zOYF9#+Pw*y^3|Zt<7pS6$|Noz>;a17O!0^q}#WAGf*4wEU#SSZQIII5rUmwTqx3X!M z?K>U2t*1>FT$}po`gx8uhZaW8+BRY4@6ApTx0hCHAjh^b|JD-uo+?B{%=qJ}<2W zOhWNq$=&IPBJuhM zJUlK?%4~iy-uA9=BE!Q~ZVUVl_)VV8(W#aA{3?e&+mXk+>#R y5}$TK`8Cd%SR>MJNLU1B0ilpUXO@geCy{@{&{l literal 0 HcmV?d00001 diff --git a/gfx/pokemon/wobbuffet/front.png b/gfx/pokemon/wobbuffet/front.png new file mode 100644 index 0000000000000000000000000000000000000000..e1b7935aadf3eadf4553ad4cea0ff5157b12ffd4 GIT binary patch literal 698 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{V3@$c%)r1@u{XQ#jvrzxXJ3z)^s`k=KHA%I#CfoeNmPIz4J4P38G}`5JyzEM{7{ zp^U-zLBPwv>l4bKYfSJ`RY*2dZ@f}tkTt!WMQh^yn;Q??Hg-AmOsf)S`qJKitNMN6 zM@}{z@MQ*-z$^BndEhnvc zUN4MOT_;_$qvmtm^~HR@Bvl(LEf=gkztg+;m-)l1v9il_c84cg#C35NtqHQbX*zG+ z&P6u8Q~h7~URUhV%N0rsPnVeCEp_#{&zrC{LRY;1KKZETxYy>Rpz7hMTMavNE@bgO z{{HB@%>4t;dX}f9lz+YGG41MutB(Jf4#YExJ(ObCc-F4Z@asU{!#eH@9~rp|g>I-g z9r*MAjO2lD7w)Kt<7-?H>vk5e%N z14Dmd-w6f=29}Z_zu^D>|Nqa`aI0isVEE|i;uunK>+O`=e1{cyoDcr{UoUq=bMbVC zZx$<83S_-zZjtb+eB8UAk0EDb=;TnxB+Zh_;BEgB1iD`q{SWcySW(7uwdRZPg$e&A zX9aEU*uFLXsZv@)t@p3h&#R_dGp=>KoGGrj*Y;~ASB0F@pZBr%Ii&@YL%)SRo{;b& z@$%Ks8!wXMbr^W?kf3@ks9pm7Q7lQ6E`OH#U t6JyaDuOF$PwqrZX=5v>?ZjQakJ~4sit;zZOstgPa44$rjF6*2UngFDSlb`?q literal 0 HcmV?d00001 diff --git a/gfx/pokemon/wooper/front.png b/gfx/pokemon/wooper/front.png new file mode 100644 index 0000000000000000000000000000000000000000..9a232b113c4b4eadacd74c03692d6e6c068c3f84 GIT binary patch literal 521 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-U^v0S%)r2~HYNBj0|Nt3fKQ0)|NsA6mY(Zz zDrR6{=r8O$!N9=4QWE4B{Qv*||G64&l?)7wD?D8sLn>~)opF29VFeD?sek|fkJ)*| zn{{&L?-IUqCb^SjIhxjNT>3<#RpD`5XsOKBDw&!i#KIij{DLXE0XI-+(+p^27N2cnaXw%zJ>w8D~#89ck6oSFaV%pIA+ zM?A|4pY?F7%s1Y0YLfBEnNNI*o*kdFux`ggo@K0U6O3=2*)o6PgT|V38mVWjz84)n zbWU>Pb=ys6SG;8u7kv_bMsnMAMyFavi#Z2xwKAP+$Q97tYxk(fP1|brtOnzAyFOVy z)^(U~oOjs!oJu;#{5$7sHqW2wyztL`o&V+#!JYGew*Qu#Z#+LQm~T$y5+ATi`Qm4+ Z43=Uo2ejME7#J8BJYD@<);T3K0RZ>*@5ulF literal 0 HcmV?d00001 diff --git a/gfx/pokemon/wooper/shiny.pal b/gfx/pokemon/wooper/shiny.pal new file mode 100644 index 0000000..aa34752 --- /dev/null +++ b/gfx/pokemon/wooper/shiny.pal @@ -0,0 +1,4 @@ + + RGB 31, 17, 31 + RGB 31, 21, 00 + diff --git a/gfx/pokemon/xatu/anim.asm b/gfx/pokemon/xatu/anim.asm new file mode 100644 index 0000000..13cbbe6 --- /dev/null +++ b/gfx/pokemon/xatu/anim.asm @@ -0,0 +1,9 @@ + frame 0, 04 + frame 3, 12 + frame 2, 12 + frame 1, 12 + setrepeat 2 + frame 0, 12 + frame 4, 12 + dorepeat 5 + endanim diff --git a/gfx/pokemon/xatu/anim_idle.asm b/gfx/pokemon/xatu/anim_idle.asm new file mode 100644 index 0000000..fe2221a --- /dev/null +++ b/gfx/pokemon/xatu/anim_idle.asm @@ -0,0 +1,10 @@ + setrepeat 2 + frame 0, 08 + frame 3, 08 + dorepeat 1 + frame 0, 18 + setrepeat 2 + frame 1, 08 + frame 2, 08 + dorepeat 6 + endanim diff --git a/gfx/pokemon/xatu/back.png b/gfx/pokemon/xatu/back.png new file mode 100644 index 0000000000000000000000000000000000000000..94f56f87dc543b716a2194121de7d9188007f984 GIT binary patch literal 396 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7AG9}nsiq+V z1H;y8mfl=Gj#WAGf*4wF(lUNivSR2d#Tl;e^+Obg3 zcz&{b`ISkLQ#_O}{{L~cp|^a`AEVEUlSE!$NIrS=)b7NRq=uQVmLK=%nOUwZJVUu& z@WAVaWj{4`G$|;=8!o=U6Z0cmaiBe6&wVOG2exyyg zJY{-P%cmdf6rLZgoW0KO(Uud(W;4jEJ(yX}xPDLEU8$+zj>VSTGyZ>`sQ-N119eA@ zeE~1U;)1SzFuVFgp~F&f{aefEd0EU!+SV;gZ~7g$zruX4=@AKsKi70TjHfaDTKiN> zI&sCqP=(#gjPmY{spEnH;Hy zjx8wueoSOxE}wwP@ADZMdrw6!xZBqB*lw3w$07c;f7ot66}x+Zfq{X+)78&qol`;+ E07zJ}kpKVy literal 0 HcmV?d00001 diff --git a/gfx/pokemon/xatu/front.png b/gfx/pokemon/xatu/front.png new file mode 100644 index 0000000000000000000000000000000000000000..f6335d27d99be3fb18b33fe73abb3843cc309d27 GIT binary patch literal 852 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VEDkn%)r1z1d4O z4H+01*8Y8D!N9=4QWE4B{Qv*||G64&l?)6_pFLe1Ln>~)oyD1VM1jZk;QxQ+dJ>1k zHu#FK%#zJq7J6KNLc`h97XLMxW5Yq3nc zvG!J>-Km;|PV*k;bDa73RcvmjO`gw@m7QJ*(&w)S9Dn1v+-r~2Nnw+xe77|CKUa9G zC>*)arg&ay7Uv$R1DEGc%GX@Bl&g&QgKgK-xs3)w>woNI%~RN4aPCs(qr%h$QL=uS zy{1w{R zXPMeD&JMF@Z}hobQ?!wFUYf?ip68AeqdbyBmZ`B{zo{?!hbMsh-1-%31s2Hd3F~{D zWzBB9N8VQF>xvCa_ayALNPg$eeax`(hw-Dj2Q{xUE2Y~e=sjVaz2<`0u@A=VcjwML z7M1&9=|Z`%#GvWXJS)>bF75OAdi&CP_Zd76>!)vcaX#kI%?$~X&lWzK-4Iz{$FRd> z$9aa;`mCROn;h4M#T)tl=+!@Y_vX(@Z+33hKY8TlbU)+#=iZNu8y|SLvz6^r(b=;} zKessjwfBy%s&{?~J-jrXCE>OA4eQG{r+cv6+s86#*Ot#q562e8gW#{*`$X2)tW*-; z7n1Vq)bumI9`AdC1iwhvzWjWA{hfZ}jstt-*+VyMSoh{tc*N_vIj$RO?9Y9FTw{Ok zf%mj_;rso&nQH9M)t;<<8UJh2|NoPIUz%R4Id|1>e%Gl7BIYMWH}tWre|vZOA*Tnj z=esV}WD2x5|GiSW>)vH0CZ>&rjFW0OAK!VWWFT~7-R@$s6Z^LOwszI<+_j4>mg!-T zUxB*%gqX)48ou>9*w`>~tukb~n#R(w>z~Q&K*p+@Jukc$|Fbbu{vC96{>e0x_*pq> zC-#Z#`p2UhssBUw#tU!n4L7I1I5hp1`4qEwsl)$Q>DMyIl*+v=uFVdQ I&MBb@0Kavc-T(jq literal 0 HcmV?d00001 diff --git a/gfx/pokemon/xatu/shiny.pal b/gfx/pokemon/xatu/shiny.pal new file mode 100644 index 0000000..00ac323 --- /dev/null +++ b/gfx/pokemon/xatu/shiny.pal @@ -0,0 +1,4 @@ + + RGB 19, 27, 00 + RGB 23, 12, 02 + diff --git a/gfx/pokemon/yanma/anim.asm b/gfx/pokemon/yanma/anim.asm new file mode 100644 index 0000000..6da78ff --- /dev/null +++ b/gfx/pokemon/yanma/anim.asm @@ -0,0 +1,8 @@ + frame 1, 10 + frame 0, 05 + frame 3, 05 + setrepeat 5 + frame 0, 03 + frame 2, 03 + dorepeat 4 + endanim diff --git a/gfx/pokemon/yanma/anim_idle.asm b/gfx/pokemon/yanma/anim_idle.asm new file mode 100644 index 0000000..66c12fb --- /dev/null +++ b/gfx/pokemon/yanma/anim_idle.asm @@ -0,0 +1,5 @@ + setrepeat 2 + frame 0, 04 + frame 3, 04 + dorepeat 1 + endanim diff --git a/gfx/pokemon/yanma/back.png b/gfx/pokemon/yanma/back.png new file mode 100644 index 0000000000000000000000000000000000000000..cc21b1a28c8a4eab183757a15104a77e2a0740a7 GIT binary patch literal 514 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7?{zI`sih?Y z1H<~$4+9t&7+6Yz{DS}g|NlQ%!>y8mfpMXyi(^Q|t=?%jryW+{aX$F#f4yFXsQ092 ziGJSe45sy3uf3_9QE%gUmcL#@MdRZBAI;_(9yOm&dHnXCU{m>|;{yU;Lo!4I{^&JKZ)Qzy{B4oEYkAl{z9mZ9QeA$Gv*w$@{bceG*#YDjIzw@O5*}>j$f^Oh1`& zFqLxyM_H@sw%&{fhu(7u=o^#eS9NPTski7aN^LcrEcLQzyUwX17`C!&>y%R4zoFAN257xL;* zS~4&&tUvuQfPsO5r6kBN`2YX^|8q6mDj67~)oq2nbiXw-L>F59dE4>BQ zSG??~m42PNZ1+ha!KW;30tY@^ZWdT4@@HO7{o;V+Sr49wzAb+?J$b!CgVKe>4WG4c zrn`zQ>92H)xXFB0C1GDBv*7}*jQc6A#^PTsv}cGjwQv};d&j?y5^w$;HK zI2K6#ea-1|aMPjtyF(}K>+M}4`1*^Fz|6Ih`1CiFxW@KgL9COiT z*wre)o)~yaQHb%l!&RHbZA-Nzx*5)`%VyEY^Zgb(X=#qauBpi{&b2A3@9&?rhND#K zYS)s@oT-;?uACw{?NncBY~^jSNh}ZEoYE02F7>lp!{`08^VbQjj+)QkM8sxpdfPQ= z&g^2d+>9H7B~pvp*5?El>7R(}3@$ZlKWyK6|Bn65?GINq$Am~slT~uOef#vam5++2 z{9?H#@Fzg)rrf^oT=%pl6dTNsR_R-6o!_5u^Bi}5(WdCCSRF6VBi*4nr=RmLoFsH? ze$wy7e~n)BPp^BV`u)SF3eD$>t^3Y>43CZrs{Xkw=cKOwOb7M5GPk|sj2cD1N*Y_mT}rlSi)iF=Zefd? z^dap`21njm?+Z^l&R!O{bH@ANs*st@JR2V`^^)|mTf;Pcx{KptZQTg=IIqPUS$8n& zFLh`=l)vYJYOKfXue|!1g?iu0_k{fT`tj1^rN_PNd#0~z;5<8TFN4|^(Z@VK&Y`wU z!SByV&bYASK37Pd(QOK>+zrZ_T|=V?)e9HWB>HH`j>Z) z@BO{wf0_L9DIt}aFP@$GUf8T~OW^cBq2%M<6PN$qVeuhIF0ocV{Fdq(*_HF(J^u51 mYq|XQikBd7?mzAQpW$1COd;FNk{t{T3=E#GelF{r5}E*rp1RTi literal 0 HcmV?d00001 diff --git a/gfx/pokemon/yanma/shiny.pal b/gfx/pokemon/yanma/shiny.pal new file mode 100644 index 0000000..cbbdc75 --- /dev/null +++ b/gfx/pokemon/yanma/shiny.pal @@ -0,0 +1,4 @@ + + RGB 09, 26, 10 + RGB 13, 14, 30 + diff --git a/gfx/pokemon/zapdos/anim.asm b/gfx/pokemon/zapdos/anim.asm new file mode 100644 index 0000000..67d6f0e --- /dev/null +++ b/gfx/pokemon/zapdos/anim.asm @@ -0,0 +1,6 @@ + frame 1, 10 + setrepeat 3 + frame 2, 10 + frame 3, 10 + dorepeat 2 + endanim diff --git a/gfx/pokemon/zapdos/anim_idle.asm b/gfx/pokemon/zapdos/anim_idle.asm new file mode 100644 index 0000000..0f59e63 --- /dev/null +++ b/gfx/pokemon/zapdos/anim_idle.asm @@ -0,0 +1,4 @@ + frame 1, 08 + frame 2, 50 + frame 1, 06 + endanim diff --git a/gfx/pokemon/zapdos/back.png b/gfx/pokemon/zapdos/back.png new file mode 100644 index 0000000000000000000000000000000000000000..8b1b740ea754ec7b9a86f262b3d0df0dd79fddea GIT binary patch literal 427 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-4rT@hhJ-tuTNxM_cmjMvT>t<7|Nl9|-WCQ1 z28LTtOxhV37+6Yz{DMK^xf*Vj3=E83o-U3d6}R3_J=u3efyd?Ts{j9=AG`5JVAAP1 zY+DzF1@W(!nE3xIJNFNcfDfV@?u$=%`6B8VCj6@{A;|JGM}uvm&!5MEc0vY6F7B0) z+0(?7z?R08ViU&Xm=LmjQcfUMLo2}>Gvg^HlySR6H?&3|h%I35Guw1?(wr}qPPy3atdqYm> zZU}V0P*u=jx|Q4HyMOWl-Lebm<;A_7oHtId^}o6&w)WPk&o>)uYZ$Mj-Fx+Q%Az@+ zJo#&9$?q&v{k?Cy9n+(#&7#xv8hmYf)uu$fXy+95bJecs)i-d{sc=v0`)gf}6UDq$wb#YO e7rl5|bgPc*AM2&e+xxbILfg~T&t;ucLK6VR#Jo@d literal 0 HcmV?d00001 diff --git a/gfx/pokemon/zapdos/front.png b/gfx/pokemon/zapdos/front.png new file mode 100644 index 0000000000000000000000000000000000000000..ae1b68cd02b13bda5a948f2a7ef3d6e03e96398f GIT binary patch literal 1258 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dV0gg6%)r2qXd0Twz`(#0;1lBd|NsC0&l&c% zFfcGM+*gNqBja0t&N}my}zT;kzvre zvwWHTtdiw#(~3nz8}n7Gia9@cwg0NRD7*2M%dNGmk2{y=a7~!Wi;iUM#pv-J@pezicvS{-xRpqsVyY2k}HwNy*k#MvwP~(xJn%fudnYEm6yf1n;p3I z??&Q8UaO0ieV?Olv$r4BJTFupJAdWj`xlNKJ>;9~9Xu=gMUCC*1Fzh_SVyklf2w|ZM5vT3_1*ZJM+>{6{3{NHzRVpN#A zT(0fqnG-cLWQ(0cD=l;;+;};i#deQt=_l>Puk812Z#@+(THtrud+D!0`86T@)-6h# zW?fk}=h+ID=gy`PGc_)Y3K}lew|f_wx}$WlNu%zmxnAwzzj)4DZ6;oZFS@E(a+NFFkJ6W2`a_3NwWcu8!4>m7rZd@qH z5Kdy`_gJ#QL;UmZxB6eJdt>*VsMTb-d~S``cHzgSeR{#>8403+A*bd{Y@QozRF(LyW83t*Ko|( zqqyg4(DLIOS|=IoFJ>?A-=&+FxL#w4>z3JnBxW&|I&)>LUZVGH6?^Wr%ZJiFtqU+e zEB$c8mH%a1dA}Sg;}O|#T6XD^YFv^~V%zF1fFVj?dlu z^DArlj7w*@F1Ehkad^tIRhcTda>=dJ=L|cgNuyA~TM)d%t@jA$!X2LyYqLorlfhOg3JFKA!kcQG@^=fS-*MF6*<3f*df96BpV{v^?w@dbXYh2A^||NnVf@M}M^(!` z4#_$j#TK-y++mcQWU#Ix^+_LR#JbY@HtU+MZ99}T%y%X)Xs~^EVbUwsa-N&t?2Fs? zJmd4+A5nEgcGC3i{yUsssFu%Jvj4E`mBat!%CEe$d-r3<t<7pIkjh)2WAn zf#IQk#Ww~929}Z_zu^D>|Nqa`aI0isU@Y`>aSW-rb#_|dBxXepm!tds&kbi$>P?yS zXKnCQuPyVpJjgiqW7*lO4QUKkmsYr@2=>OM@TaC_sh2F<-e7d1=&u8_&h(^*-{;)! zVRb3#(f)GhY{=<$83!(d+IuH`zo~CJz2tgi`sHo&IKS`u^?@ydC9jr$huw0{b?-UL zr`VjG9{1azvoSn4=%qqt&0m-IFIbl_Tx(x6e;vOP`wGQr`zQ&(tC^!x9S@K0zV!~Cy2Z}vP;3lN*Ay&!Yn z=4QE$>o$V_wz3!a8O!Wd)HtxMHctJ?tivo@W=6=%E|j0?5W&E_&`e=A&*hRA3R_=H z+;h%Yzkku)91E)%mOuJ6ug9OENbScL*W&cI zDa@MT{S2p9FFy79?_u$5(GSmdJ_%S17Dc&K0Tje&uIr6kBN`2YX^|8q6mDj67<*gahwLn>~)opHDChyq9J)X)Fk?@_kb z>L}ebGetde?~B&IT3rV?byKY`u&tdelD>ksPwqbTG}T#mFR?75i}Pkn_;^e%mDJOX}iZme2*!){r@g$+%rQH{rzGFR@@{BSX^BWS`|s||)sOmjmfFloeQY_OprIt>Z_~-=Zne(}Po3aAsPUwXFF%62#>~Z<%oyT;Gm2L9- z2A`zK#dcL2Pd|BjwB)b%G#$?0YCFUy9e%yqSpLe)hzfJ7!?TYDrZ2c!uy2M-ddcP) z!qM*(PqfeLtooAS8|UEtElcHxLdPe@)$(jkr;?eNBqcm-%Vvj9kCOemO?OIEmQq8^ zj9o>EQxw?4&TNu=!pgjb`|YWxj~lbKe+o4&G-iysRQBQw!`VBN-e3H(XM;Y^$Jguz ztNHe`w4akXrXxR}aqhW0A6p;4I`cOD->&(b5BAM3Jhb(F`kr$(-;ABp`Tm|+V!XVL zZTtM4f6u&4Uw7_K-Lu`lX8zoNGui&}zu9kp&wTWMw(S>VH7>{aNp)$z^2=VOpL&~~ dXa8CMIR9N9@gHhc+txCGl8~#P%Q~loCIEgAB69!$ literal 0 HcmV?d00001 diff --git a/gfx/pokemon/zubat/shiny.pal b/gfx/pokemon/zubat/shiny.pal new file mode 100644 index 0000000..722f84e --- /dev/null +++ b/gfx/pokemon/zubat/shiny.pal @@ -0,0 +1,4 @@ + + RGB 27, 15, 30 + RGB 10, 17, 06 + diff --git a/gfx/printer/bold_a.png b/gfx/printer/bold_a.png new file mode 100644 index 0000000000000000000000000000000000000000..56252c4233586d77bc18a02c467eac66f530363f GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@knwbJ45_%4{Nw-phy2Ee l+Yj@!AM9wH+4$c;fRUl~B4>(Y@kL9JdQVqBmvv4FO#s8r8bJU6 literal 0 HcmV?d00001 diff --git a/gfx/printer/bold_b.png b/gfx/printer/bold_b.png new file mode 100644 index 0000000000000000000000000000000000000000..8ce07a03c4d61d9bfd79495779748ad17da69ee7 GIT binary patch literal 77 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5b<mdKI;Vst0F8MWWB>pF literal 0 HcmV?d00001 diff --git a/gfx/printer/lv.png b/gfx/printer/lv.png new file mode 100644 index 0000000000000000000000000000000000000000..5176fc58556c4a07366cdcdd72fa58e78ec4e364 GIT binary patch literal 79 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5c70#45_%4{Nw+8#*R0Q fCnUONoM(1rsBz&;EQsO_1gZ3N^>bP0l+XkK{|**3 literal 0 HcmV?d00001 diff --git a/gfx/sgb/blk_packets.asm b/gfx/sgb/blk_packets.asm new file mode 100644 index 0000000..9dbcf04 --- /dev/null +++ b/gfx/sgb/blk_packets.asm @@ -0,0 +1,89 @@ +; macros taken from pokered's data/sgb_packets.asm +; names taken from pandocs +; http://gbdev.gg8.se/wiki/articles/SGB_Functions#SGB_Palette_Commands + +MACRO attr_blk + db (SGB_ATTR_BLK << 3) + ((\1 * 6) / 16 + 1) + db \1 +ENDM + +MACRO attr_blk_data + db \1 ; which regions are affected + db \2 + (\3 << 2) + (\4 << 4) ; palette for each region + db \5, \6, \7, \8 ; x1, y1, x2, y2 +ENDM + +BlkPacket_AllPal0: + attr_blk 1 + attr_blk_data %011, 0,0,0, 00,00, 19,17 + ds 8, 0 + +BlkPacket_GSIntroJigglypuffPikachu: + attr_blk 1 + attr_blk_data %111, 1,1,0, 00,10, 19,13 + ds 8, 0 + +BlkPacket_Battle: + attr_blk 5 + attr_blk_data %111, 2,2,0, 00,12, 19,17 ; text box: pal 2 + attr_blk_data %011, 1,1,0, 01,00, 10,03 ; enemy HP bar: pal 1 + attr_blk_data %011, 0,0,0, 10,08, 19,10 ; player HP+exp bar: pal 0 + attr_blk_data %011, 2,2,0, 00,04, 08,11 ; player mon: pal 2 + attr_blk_data %011, 3,3,0, 11,00, 19,07 ; enemy mon : pal 3 + +BlkPacket_StatsScreen: + attr_blk 1 + attr_blk_data %111, 1,1,0, 00,01, 07,07 ; mon: pal 1 + ds 8, 0 + +BlkPacket_MoveList: + attr_blk 1 + attr_blk_data %111, 1,1,0, 11,01, 19,02 + ds 8, 0 + +BlkPacket_Pokedex_PC: + attr_blk 1 + attr_blk_data %111, 1,1,0, 01,01, 08,08 ; mon: pal 1 + ds 8, 0 + +BlkPacket_PokedexUnownMode: + attr_blk 1 + attr_blk_data %111, 1,1,0, 07,05, 13,11 ; unown: pal 1 + ds 8, 0 + +BlkPacket_SlotMachine: + attr_blk 5 + attr_blk_data %011, 1,1,0, 00,00, 19,11 ; "3" rows and top of screen: pal 1 + attr_blk_data %011, 2,2,0, 00,04, 19,09 ; "2" rows: pal 2 + attr_blk_data %010, 3,3,0, 00,06, 19,07 ; "1" row: pal 3 + attr_blk_data %011, 0,0,0, 04,04, 15,09 ; slot reels: pal 0 + attr_blk_data %011, 0,0,0, 00,12, 19,17 ; text box: pal 0 + +BlkPacket_PartyMenu: ; unreferenced + attr_blk 7 + attr_blk_data %111, 0,0,1, 00,00, 02,12 + attr_blk_data %010, 0,0,0, 12,00, 18,01 + attr_blk_data %010, 0,0,0, 12,02, 18,03 + attr_blk_data %010, 0,0,0, 12,04, 18,05 + attr_blk_data %010, 0,0,0, 12,06, 18,07 + attr_blk_data %010, 0,0,0, 12,08, 18,09 + attr_blk_data %010, 0,0,0, 12,10, 18,11 + ds 4, 0 + +BlkPacket_GSTitleScreen: + attr_blk 3 + attr_blk_data %111, 0,0,2, 00,00, 19,04 + attr_blk_data %011, 3,3,0, 00,06, 19,17 + attr_blk_data %011, 1,1,0, 15,01, 18,04 + ds 12, 0 + +BlkPacket_BetaTitleScreen: + attr_blk 1 + attr_blk_data %111, 0,0,1, 00,00, 19,05 ; logo + ds 8, 0 + +BlkPacket_MagnetTrain: + attr_blk 2 + attr_blk_data %111, 2,2,0, 00,04, 19,13 ; fence + attr_blk_data %011, 1,1,0, 00,06, 19,11 ; train + ds 2, 0 diff --git a/gfx/sgb/gbc_only.png b/gfx/sgb/gbc_only.png new file mode 100644 index 0000000000000000000000000000000000000000..72bcf01317560c72b3a21cff383d07a435f9bcbe GIT binary patch literal 896 zcmeAS@N?(olHy`uVBq!ia0y~yU?^Zb z&oH?|eh=Rxqa^JEAr9ixq8)3@yXva+|D^u?G__7*w}@kq*`f+|HE++fO>5=Vj_Mrw zcOk~ny-j!be)%;5yfO=t6{c!(7Tr3uS-DKuKiv4j#{>UZ9qZecE)-D-;7$>(a1FTp z*l~l|!TFX>(XK34lXmHCzNW=f`n#OF_^Qd2w=di~L}q%Gu`)j8y49;GM z0=DoRI;H&8HiIjWMc&JAwhG6RQU=FX1;J-659j(nc=~s7DyL78jcZznkZr)s50fnb!5X*IqTT=OzA@vJr? zC(Rsh&XLR9rFwk&0x>O~74xrhJI_j(D4COo1RvN&uZczVO<8k9WasDgyDy8`6_%D?DN|#(Vr4MR;r_ank~drLgqoNu z=WKd;Ekr!)p7f;|3OyS+k1)DQPoDVJcSG7XO{Z8Ui+jyA|FvJAX;^eSCOyyA)b~86 z)V-O-i7eU|Kd%+7ian~i=KDT>tM;~&hhk4GK63W@;ryR=KAR+O{xQ}_a@+H_C{_6T zr3rju6}va4vh=eDK6`AZ;b^CI=*6e6D|3Z&#DAZf^v(Q|;QV_6Ki8@!<-V5f$d^mE z-~Ge)8As~6KDh(yUA{d`I4k3P>I8?a=Okf?oQvoAXC93B)9ZRiZ<2!1{%HsHKFrO^ zS=?xNH(WN^KqW);dYXV*+vA!!fOz`uvjf zPxG@Cj$AAFu5P{1vp{iwgn8#?wsn2Sl>G0$J=GVyE!ExnU;H2T%G&u)rY_sN0+h8p MUHx3vIVCg!0DYjSO8@`> literal 0 HcmV?d00001 diff --git a/gfx/sgb/pal_packets.asm b/gfx/sgb/pal_packets.asm new file mode 100644 index 0000000..b54e6f8 --- /dev/null +++ b/gfx/sgb/pal_packets.asm @@ -0,0 +1,96 @@ +; macros taken from pokered's data/sgb_packets.asm +; names taken from pandocs +; http://gbdev.gg8.se/wiki/articles/SGB_Functions#SGB_Palette_Commands + +MACRO sgb_pal_set + db (SGB_PAL_SET << 3) + 1 + dw PREDEFPAL_\1, PREDEFPAL_\2, PREDEFPAL_\3, PREDEFPAL_\4 + ds 7, 0 +ENDM + +MACRO sgb_pal01 + db (SGB_PAL01 << 3) + 1 +ENDM + +MACRO sgb_pal23 + db (SGB_PAL23 << 3) + 1 +ENDM + +PalPacket_GSTitleScreen: + sgb_pal_set GS_TITLE_SCREEN_0, GS_TITLE_SCREEN_1, GS_TITLE_SCREEN_2, GS_TITLE_SCREEN_3 + +PalPacket_MagnetTrain: + sgb_pal_set BETA_SHINY_GREENMON, CGB_BADGE, RB_BROWNMON, ROUTES + +PalPacket_BetaPoker: + sgb_pal_set BETA_POKER_0, BETA_POKER_1, BETA_POKER_2, BETA_POKER_3 + +PalPacket_UnownPuzzle: + sgb_pal_set UNOWN_PUZZLE, UNOWN_PUZZLE, UNOWN_PUZZLE, UNOWN_PUZZLE + +PalPacket_AllPal0: + sgb_pal_set ROUTES, ROUTES, ROUTES, ROUTES + +PalPacket_GSIntroShellderLapras: + sgb_pal_set GS_INTRO_SHELLDER_LAPRAS, ROUTES, ROUTES, ROUTES + +PalPacket_BetaIntroLapras: ; unreferenced + sgb_pal_set BETA_INTRO_LAPRAS, ROUTES, ROUTES, ROUTES + +PalPacket_GSIntroJigglypuffPikachu: + sgb_pal_set GS_INTRO_JIGGLYPUFF_PIKACHU_BG, GS_INTRO_JIGGLYPUFF_PIKACHU_OB, ROUTES, ROUTES + +PalPacket_GSIntroStartersTransition: + sgb_pal_set GS_INTRO_STARTERS_TRANSITION, ROUTES, ROUTES, ROUTES + +PalPacket_BetaIntroVenusaur: + sgb_pal_set BETA_INTRO_VENUSAUR, ROUTES, ROUTES, ROUTES + +PalPacket_Pack: + sgb_pal_set PACK, ROUTES, ROUTES, ROUTES + +PalPacket_BetaPikachuMinigame: + sgb_pal_set GS_INTRO_JIGGLYPUFF_PIKACHU_OB, ROUTES, ROUTES, ROUTES + +PalPacket_PartyMenu: + sgb_pal_set PARTY_ICON, HP_GREEN, HP_YELLOW, HP_RED + +PalPacket_BattleGrayscale: + sgb_pal_set BLACKOUT, BLACKOUT, BLACKOUT, BLACKOUT + +PalPacket_Pokegear: + sgb_pal_set POKEGEAR, ROUTES, ROUTES, ROUTES + +PalPacket_Pack2: ; unreferenced + sgb_pal_set PACK, ROUTES, ROUTES, ROUTES + +PalPacket_SlotMachine: + sgb_pal_set SLOT_MACHINE_0, SLOT_MACHINE_1, SLOT_MACHINE_2, SLOT_MACHINE_3 + +PalPacket_BetaTitleScreen: + sgb_pal_set BETA_LOGO_1, BETA_LOGO_2, DIPLOMA, RB_PURPLEMON + +PalPacket_Diploma: + sgb_pal_set DIPLOMA, ROUTES, ROUTES, ROUTES + +PalPacket_TradeTube: + sgb_pal_set TRADE_TUBE, ROUTES, ROUTES, ROUTES + +PalPacket_GamefreakLogo: + sgb_pal_set GS_INTRO_GAMEFREAK_LOGO, ROUTES, ROUTES, ROUTES + +PalPacket_Pal01: + sgb_pal01 + RGB 31, 31, 31 +rept 6 + RGB 00, 00, 00 +endr + db 0 + +PalPacket_Pal23: + sgb_pal23 + RGB 31, 31, 31 +rept 6 + RGB 00, 00, 00 +endr + db 0 diff --git a/gfx/sgb/predef.pal b/gfx/sgb/predef.pal new file mode 100644 index 0000000..745767d --- /dev/null +++ b/gfx/sgb/predef.pal @@ -0,0 +1,79 @@ + RGB 31,31,31, 22,25,19, 16,21,30, 00,00,00 ; PREDEFPAL_ROUTES + RGB 31,31,31, 27,28,31, 15,20,31, 00,00,00 ; PREDEFPAL_PALLET + RGB 31,31,31, 24,28,19, 15,20,31, 00,00,00 ; PREDEFPAL_VIRIDIAN + RGB 31,31,31, 24,24,24, 15,20,31, 00,00,00 ; PREDEFPAL_PEWTER + RGB 31,31,31, 21,23,31, 15,20,31, 00,00,00 ; PREDEFPAL_CERULEAN + RGB 31,31,31, 24,21,27, 15,20,31, 00,00,00 ; PREDEFPAL_LAVENDER + RGB 31,31,31, 31,24,16, 15,20,31, 00,00,00 ; PREDEFPAL_VERMILION + RGB 31,31,31, 25,30,26, 15,20,31, 00,00,00 ; PREDEFPAL_CELADON + RGB 31,31,31, 31,25,31, 15,20,31, 00,00,00 ; PREDEFPAL_FUCHSIA + RGB 31,31,31, 31,20,19, 15,20,31, 00,00,00 ; PREDEFPAL_CINNABAR + RGB 31,31,31, 31,26,19, 15,20,31, 00,00,00 ; PREDEFPAL_SAFFRON + RGB 31,31,31, 27,28,27, 15,20,31, 00,00,00 ; PREDEFPAL_INDIGO + RGB 31,31,31, 24,30,23, 15,20,31, 00,00,00 ; PREDEFPAL_NEW_BARK + RGB 31,31,31, 29,24,29, 15,20,31, 00,00,00 ; PREDEFPAL_CHERRYGROVE + RGB 31,31,31, 26,23,29, 15,20,31, 00,00,00 ; PREDEFPAL_VIOLET + RGB 31,31,31, 25,23,20, 15,20,31, 00,00,00 ; PREDEFPAL_AZALEA + RGB 31,31,31, 29,26,18, 15,20,31, 00,00,00 ; PREDEFPAL_GOLDENROD + RGB 31,31,31, 31,21,18, 15,20,31, 00,00,00 ; PREDEFPAL_ECRUTEAK + RGB 31,31,31, 26,25,31, 15,20,31, 00,00,00 ; PREDEFPAL_OLIVINE + RGB 31,31,31, 22,21,31, 15,20,31, 00,00,00 ; PREDEFPAL_CIANWOOD + RGB 31,31,31, 22,25,21, 15,20,31, 00,00,00 ; PREDEFPAL_MAHOGANY + RGB 31,31,31, 21,21,22, 15,20,31, 00,00,00 ; PREDEFPAL_BLACKTHORN + RGB 31,31,31, 31,20,20, 15,20,31, 00,00,00 ; PREDEFPAL_LAKE_OF_RAGE + RGB 31,31,31, 26,26,26, 15,20,31, 00,00,00 ; PREDEFPAL_SILVER_CAVE + RGB 31,31,31, 21,14,09, 15,20,20, 00,00,00 ; PREDEFPAL_DUNGEONS + RGB 31,31,31, 12,28,22, 15,20,20, 00,00,00 ; PREDEFPAL_NITE + RGB 31,31,31, 07,07,07, 02,03,03, 00,00,00 ; PREDEFPAL_BLACKOUT + RGB 31,31,31, 30,22,17, 16,14,19, 00,00,00 ; PREDEFPAL_DIPLOMA + RGB 31,31,31, 18,20,27, 11,15,23, 00,00,00 ; PREDEFPAL_TRADE_TUBE + RGB 31,31,31, 31,20,10, 26,10,06, 00,00,00 ; PREDEFPAL_POKEDEX + RGB 31,31,31, 21,25,29, 14,19,25, 00,00,00 ; PREDEFPAL_RB_CYANMON + RGB 31,31,31, 27,22,24, 21,15,23, 00,00,00 ; PREDEFPAL_RB_PURPLEMON + RGB 31,31,31, 28,20,15, 21,14,09, 00,00,00 ; PREDEFPAL_RB_BROWNMON + RGB 31,31,31, 20,26,16, 09,20,11, 00,00,00 ; PREDEFPAL_RB_GREENMON + RGB 31,31,31, 30,22,24, 28,15,21, 00,00,00 ; PREDEFPAL_RB_PINKMON + RGB 31,31,31, 31,28,14, 26,20,00, 00,00,00 ; PREDEFPAL_RB_YELLOWMON + RGB 31,31,31, 26,21,22, 15,15,18, 00,00,00 ; PREDEFPAL_CGB_BADGE + RGB 31,31,31, 23,19,13, 14,12,17, 00,00,00 ; PREDEFPAL_SHINY_MEWMON + RGB 31,31,31, 16,18,21, 10,12,18, 00,00,00 ; PREDEFPAL_SHINY_BLUEMON + RGB 31,31,31, 22,15,16, 17,02,05, 00,00,00 ; PREDEFPAL_SHINY_REDMON + RGB 31,31,31, 15,20,20, 05,16,16, 00,00,00 ; PREDEFPAL_SHINY_CYANMON + RGB 31,31,31, 23,15,19, 14,04,12, 00,00,00 ; PREDEFPAL_SHINY_PURPLEMON + RGB 31,31,31, 20,17,18, 18,13,11, 00,00,00 ; PREDEFPAL_SHINY_BROWNMON + RGB 31,31,31, 23,21,16, 12,12,10, 00,00,00 ; PREDEFPAL_SHINY_GREENMON + RGB 31,31,31, 21,25,29, 30,22,24, 00,00,00 ; PREDEFPAL_SHINY_PINKMON + RGB 31,31,31, 26,23,16, 29,14,09, 00,00,00 ; PREDEFPAL_SHINY_YELLOWMON + RGB 31,31,31, 18,18,18, 10,10,10, 00,00,00 ; PREDEFPAL_PARTY_ICON + RGB 31,31,31, 30,26,15, 00,23,00, 00,00,00 ; PREDEFPAL_HP_GREEN + RGB 31,31,31, 30,26,15, 31,23,00, 00,00,00 ; PREDEFPAL_HP_YELLOW + RGB 31,31,31, 30,26,15, 31,00,00, 00,00,00 ; PREDEFPAL_HP_RED + RGB 31,31,31, 29,26,19, 27,20,14, 00,00,00 ; PREDEFPAL_POKEGEAR + RGB 31,31,31, 24,20,10, 21,00,04, 00,00,00 ; PREDEFPAL_BETA_LOGO_1 + RGB 31,31,31, 31,20,10, 21,00,04, 00,00,00 ; PREDEFPAL_BETA_LOGO_2 + RGB 31,31,31, 30,26,16, 16,12,09, 00,00,00 ; PREDEFPAL_GS_INTRO_GAMEFREAK_LOGO + RGB 31,31,31, 15,28,26, 12,22,26, 03,16,14 ; PREDEFPAL_GS_INTRO_SHELLDER_LAPRAS + RGB 31,31,31, 15,28,26, 23,24,24, 00,00,00 ; PREDEFPAL_BETA_INTRO_LAPRAS + RGB 31,31,24, 07,27,19, 26,20,10, 19,12,08 ; PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_BG + RGB 31,31,31, 31,28,14, 31,13,31, 00,00,00 ; PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_OB + RGB 31,31,31, 16,18,21, 10,12,18, 00,00,00 ; PREDEFPAL_GS_INTRO_STARTERS_TRANSITION + RGB 31,31,31, 23,21,16, 12,12,10, 00,00,00 ; PREDEFPAL_BETA_INTRO_VENUSAUR + RGB 31,31,31, 31,14,00, 07,11,15, 00,00,00 ; PREDEFPAL_PACK + RGB 31,31,31, 26,21,22, 26,10,06, 00,00,00 ; PREDEFPAL_SLOT_MACHINE_0 + RGB 31,31,31, 30,27,04, 24,20,11, 00,00,00 ; PREDEFPAL_SLOT_MACHINE_1 + RGB 31,31,31, 31,13,25, 24,20,11, 00,00,00 ; PREDEFPAL_SLOT_MACHINE_2 + RGB 31,31,31, 16,19,29, 24,20,11, 00,00,00 ; PREDEFPAL_SLOT_MACHINE_3 + RGB 31,31,31, 30,22,24, 18,18,18, 16,10,07 ; PREDEFPAL_BETA_POKER_0 + RGB 31,31,31, 21,25,29, 18,18,18, 16,10,07 ; PREDEFPAL_BETA_POKER_1 + RGB 31,31,31, 20,26,16, 18,18,18, 16,10,07 ; PREDEFPAL_BETA_POKER_2 + RGB 31,31,31, 31,28,14, 18,18,18, 16,10,07 ; PREDEFPAL_BETA_POKER_3 + RGB 31,31,31, 18,18,18, 26,10,06, 00,00,00 ; PREDEFPAL_BETA_RADIO + RGB 31,31,31, 30,22,24, 28,15,21, 00,00,00 ; PREDEFPAL_BETA_POKEGEAR + RGB 31,31,31, 26,20,00, 16,19,29, 00,00,00 ; PREDEFPAL_47 + RGB 31,31,31, 16,02,30, 15,20,31, 00,00,00 ; PREDEFPAL_GS_TITLE_SCREEN_0 + RGB 31,31,31, 16,13,04, 15,20,31, 00,00,00 ; PREDEFPAL_GS_TITLE_SCREEN_1 + RGB 31,31,31, 28,04,02, 15,20,31, 00,00,00 ; PREDEFPAL_GS_TITLE_SCREEN_2 + RGB 31,31,31, 18,23,31, 15,20,31, 00,00,00 ; PREDEFPAL_GS_TITLE_SCREEN_3 + RGB 31,31,31, 24,20,11, 18,13,11, 00,00,00 ; PREDEFPAL_UNOWN_PUZZLE + RGB 31,31,31, 31,31,31, 25,30,00, 25,30,00 ; PREDEFPAL_GAMEFREAK_LOGO_OB + RGB 00,00,00, 08,11,11, 21,21,21, 31,31,31 ; PREDEFPAL_GAMEFREAK_LOGO_BG diff --git a/gfx/sgb/sgb_border.bin b/gfx/sgb/sgb_border.bin new file mode 100644 index 0000000000000000000000000000000000000000..5ad4fb0022c4d13ac84b5adf91ed192fef4fd578 GIT binary patch literal 1792 zcmZP~$VGdymVMI}*BBCmy1~NNDEkrd$ z1z9cxS&yKIkchB|aEMTdV2A*+DiIYC6A@Dp(-4yoV-#@#5oA4zB1$64BFZ63A&Mai zA?zX?BAg;zBHSW8BD^5mMI=NxMWjTeMR-McL}WxXMc73YM3D6uiWq^_8HJb$SP%)- z1&l=4L)b%%LJUJ#Mc6?4L)b#(1sI3~<^nK1tRaX{CPhCYW)PuFihe}Q7{f!E6#dv@ zh7|pX)C5j9;P@q7KPVj`(haHlA?XN~ZrDXg)elKWpfq4WmirAvKxvOHgf)bPEd4AZ zptOg`ous-SlEV?XlT`hX91hN%WVxSR1eEp=DS=e`Av!^608;*tq90LaA<7a`^drhF zL|H(B}SSfEQ!Y9Hh!Y`sB!Y(2SEj6`7v_*78 zEI}om2qfLWY6e94gI3BDSu=pr0Hl;x31J7PBT#6ti$HQGX*B~xCxnFLPUM;aB92Z1 E0C&!N1poj5 literal 0 HcmV?d00001 diff --git a/gfx/sgb/sgb_border.pal b/gfx/sgb/sgb_border.pal new file mode 100644 index 0000000..fd5aec4 --- /dev/null +++ b/gfx/sgb/sgb_border.pal @@ -0,0 +1,79 @@ + RGB 24, 06, 06 + RGB 24, 24, 26 + RGB 14, 15, 20 + RGB 04, 07, 10 + + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + + RGB 18, 24, 18 + RGB 31, 26, 15 + RGB 26, 19, 10 + RGB 12, 07, 05 + + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + + RGB 18, 06, 31 + RGB 31, 31, 29 + RGB 31, 12, 00 + RGB 00, 00, 00 + + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + + RGB 12, 31, 06 + RGB 22, 26, 30 + RGB 16, 17, 21 + RGB 00, 03, 00 + + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 + RGB 31, 31, 25 diff --git a/gfx/sgb/sgb_border.png b/gfx/sgb/sgb_border.png new file mode 100644 index 0000000000000000000000000000000000000000..054ab488021b690759da55269feb301027a30b8d GIT binary patch literal 608 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU{GLUU|?X_`qMmufq_Zg)5S5Q;#TS8{e71m z1diETv#<&mUG>!X>v>X|gvmBzA7VR`wL*lX?6r40$;sUAD367$_G`b7r&>;r=jLi}8{e!#yc&2SLsNaoLlx zB0>ut7+H1Z&1BngcF)s2=kA)Fzgx9Do+}_jDna<(g=OoESyle9{of@%|7o~b$Ndzh zHHJ@4?3?bsibFE+1>^0z%rR`673$2Vf78<1%xKOqx6Eu=_CGmQ7bl!Tg{uZ1SwB%eqfX;1@$i$a5E$CfTo59X^{TJopg1%tG*Bij*wa2oLd|qx$MWo{yL4dvS*t` zC6_4%U-))zkJPUHJl{I6RD>UUH>EQ3Sf`=5JRhUwo00|1*%f_-Of|pC7+#nh;s5($ zcDGk>O-&_7#`MY0KA9YNbo6XPON7qWwyRGBeiX0H@we&OgTe~DWM4f7&`%? literal 0 HcmV?d00001 diff --git a/gfx/slots/slots.pal b/gfx/slots/slots.pal new file mode 100644 index 0000000..0eec479 --- /dev/null +++ b/gfx/slots/slots.pal @@ -0,0 +1,79 @@ + RGB 31, 31, 31 + RGB 24, 25, 28 + RGB 24, 24, 09 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 30, 10, 06 + RGB 24, 24, 09 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 15, 31, 00 + RGB 24, 24, 09 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 15, 31 + RGB 24, 24, 09 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 15, 21, 31 + RGB 24, 24, 09 + RGB 00, 00, 00 + + RGB 31, 31, 11 + RGB 31, 31, 06 + RGB 24, 24, 09 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 19, 29 + RGB 25, 22, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 21, 21, 21 + RGB 13, 13, 13 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 30, 10, 06 + RGB 31, 00, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 12, 25, 01 + RGB 05, 14, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 12, 25, 01 + RGB 30, 10, 06 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 31, 06 + RGB 20, 15, 03 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 31, 06 + RGB 15, 21, 31 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 31, 06 + RGB 20, 15, 03 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 24, 21 + RGB 31, 13, 31 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 diff --git a/gfx/slots/slots.tilemap b/gfx/slots/slots.tilemap new file mode 100644 index 0000000000000000000000000000000000000000..5e920ed54e00fd08e42038c3132fe23206f1132a GIT binary patch literal 240 zcmY!a0VZY^RwX4ib`DMuPl*u=;Ns&}mXVW}fnjAXK5iaZXQ8i6&N2xtMCZ&atWcU6XNC(Mpq|Hym@@w$_x^c3@{9HAET5sBMgJw F2LOK<5(xkR literal 0 HcmV?d00001 diff --git a/gfx/slots/slots_1.png b/gfx/slots/slots_1.png new file mode 100644 index 0000000000000000000000000000000000000000..10431e7192fb7650f1810f94a52d6a67a05762e7 GIT binary patch literal 433 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznV3@(gz`(%JbXspE0|R4)r;B4q#jUB6HhLWn z5NZ3rgr&=S*_*I}lPV>X9j@pFximks`oX|w=i1Gc=O^}NN`lT;jUQZ#c6cm&|4`)i zT9H@v`O;At=0P*R2}+a_#Y~(zXjr;~(TbIbC<2JZmy3W zHZr|WgxKd#dgQ?2_si9$?qR^Z`+}!8vp=;L%{`W|i-TngFH_(9XD)}`4nHee$L^Bc zymj}+i*sK~7wAkZ@cCeH^=Z^{+es_+DzDngPmxg3_So{y@3$)RwO!1MS1)HRo8|JP zVS3OC)6TzJ4%|AL@=1J#fabne8&B}|F&;V}W$|%y^qilO?6UURi{Ga6TYTMIz2(|t zr{&gZ+CR;ex;F^(2PT*|vKbEmNBsf6cjw2$`hcDe5Y7F``${(6Vif zs-$0Q#PO(2VaIMQFloIjt(tvhUCQOEFJ&d{a*7$5?B~C|6q^6ygY3Ll0S|oIb&EI3 zC*4?TyFtj{b!Dk4;y!BP>MTo-dqTAAY-Kd($7`N2cpq zZyXGLog^*(*6eHf-o=k+-rc<1>|ENBo&R6VXIW|9<0$rfnR%u|ko7X-Z|46^WPH!_ z{wlci@>@^LypQis{5alQ&wkAQ{Ez2S|9{B-yKD1lfs2Rva%eS}8KCY6eXFk~=dg-UDIzP9UdMu5*7ya%1vU&DPuEqUP_}^A^(_ZmZFz4&3 b{~z7gceU|uujEZ(1tmF8S3j3^P6quE2~l*KpBgA1fHGakRRnRbEga;3_` znSFbI^33WE_?i~r*3roSXp5FzxwSuBWp zG2`f2a-pvv&RTd}y^2zJC=}8M>>kjdX_IIpGs0rEN9@DQA z$MjgVe^WNAESDk=$807h$0f##^L>0d-b)5)q~2fj>ND%?8>gnMy==eket6hP;qLr5 z%Zua|{*d1PS3Ja)vzm2YrP0D1pXJ_nPc8nX8CH2V;MMMr!9Pv?yN-W-zx?a%y$8>- z`<|COs>4UC~Lm%2N@y zPdRbFld!fqn32@0A}+D4=hUKU^+t=jvp4ulh8D^%tYUa)Ud-3d|60uK{ojLbTHAd= OiNMp<&t;ucLK6Td;RO!> literal 0 HcmV?d00001 diff --git a/gfx/splash/copyright.png b/gfx/splash/copyright.png new file mode 100644 index 0000000000000000000000000000000000000000..023bb93dd93b35d7a3d815a74c2e435779d850b4 GIT binary patch literal 262 zcmeAS@N?(olHy`uVBq!ia0y~yV0gj6z`()8z`(#T$Lvcx0|UcZPZ!6Kid#!3Y~(%U zz~j1hM^9^b0t3smj2D}t%n~G|to({RkMNi`sm{_?lC%z#U|3@<{;mGo-{z`M^33b} zW!~G`oZ7gW-7I*!#`)&z!y+G)vMuh#?C{|Ks&JF{OHr5*uVb27p@z^bZ+YciNi8Z{ zn7hB}tXsCGCGWTd_w(&d3Ldc+CpD`CFYpOe+SsY<^1C#9VcoRMi0$VN7wyZ~$a_>& zcG{^exl>&%_hwbd%BNnx8eFBia?#HRZ8lLcnO97G8kk#IYZDjL|Jm?gM!xr(b&YMk R&U26lJzf1=);T3K0RWgKXT$&i literal 0 HcmV?d00001 diff --git a/gfx/splash/ditto.pal b/gfx/splash/ditto.pal new file mode 100644 index 0000000..b1712ef --- /dev/null +++ b/gfx/splash/ditto.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 13, 11, 00 + RGB 23, 12, 28 + RGB 00, 00, 00 diff --git a/gfx/splash/ditto.png b/gfx/splash/ditto.png new file mode 100644 index 0000000000000000000000000000000000000000..0ed4094cfda981d71df37e7cd78242146157970f GIT binary patch literal 944 zcmeAS@N?(olHy`uVBq!ia0y~yU}ykgCI$uuhBZ&swlOd;mwUQ6hE&{oJAGr`H3Na; zhcCFl_+9ccZppmGLR;mm6;5;rIL|wD|ImfGL5EQ|AVTti7$bL+-($IoW@g?k%BS=grG5#99&?aqZ2nMq zB|1TEL15mhh4T`aUx-e)#kgvth&r>gNpm5Chwtvq?0MNtZ9)ag0vV!TxUOB2*4QY= zu%6M%`~btM>6!*24N{DsxkU6H3e9C_S#hsBB;d8ohY0TZo=+EL#8`cA5RK3OlWrcf zs;YDb>kq|e(P!SgC^4&;wfjX$_-FGO?+Ws7P5wIBm|@O}`5%7Dop#va7|Zs9_x=5& z?tQrhjCG7P55yh*7qqtSWvF;?_MmS-(!C|O+P=qF=p}sf<}#k}`6Oe;+-Y|XID9xM zedF5EM>lyVP5u2ynXjhg{{DZf%Rcb@(NCD2{9uWBZ4tZA!M|MxIIcgOBF6YCubsi9 zT`K0i(*OKVfefYQuVt3$GE|89D$e5KKGK?4V^Yf}!SNxr@TO?vyef&V3%P6`N*`|7 zRdYlCrD&=`_pyuPHw$6WIOpR$v`xTV9zZT{WiOBuSo8=v}Yx*;OrtR%j1B^%qa3eBEJDZeB* z%!Qa#_X=1h+$_sG8+o8RRDb=(oyG#c-Z6dH%r#wh&c?X){--xTx}39UrpBz*;xE3b z?YVH#N8mem-9dNX^|h@GyW{G_E_836&@z*$ZSf4Jw9-v2jQdutjN2M=dljdDqyOC% z-)^4y&uVa2_<+KEhDr1JtrM)?u>HHvc)&1WGn+KyvkmjtG~{_V91GI%a#fyMT&c*$ z#!$(zBIt3FLP&cSm&1llK7LFBZEaktaVz({Ay&l#GU=(%ZqAn{U6xvw!Y)9$b3Z3DsxuCI{lU(lTNr8 zr0(hX9-rVcOGx_||BjVn&1nLiEqi(dt|_hktg>YCHc@VNmJ@-}j8VUz^07~N{O-o5 b=^8WR?#6e_l)X{<8srR5S3j3^P6EaktaVxaXkn5-c zk27x+_dc%&>*Z@o8?QO7PdXvxadqv~gU#}jM0-OM6pVy6#&eww&GPO4>bNs~l25Eq zHY@)Gd)Mi~a!a~1=VZTFQPRb%hi2=~FD=czAm@0x`njxgN@xNA$ooU( literal 0 HcmV?d00001 diff --git a/gfx/sprites.asm b/gfx/sprites.asm new file mode 100644 index 0000000..212c0b2 --- /dev/null +++ b/gfx/sprites.asm @@ -0,0 +1,108 @@ +SECTION "Sprites 1", ROMX + +ChrisSpriteGFX:: INCBIN "gfx/sprites/chris.2bpp" +ChrisBikeSpriteGFX:: INCBIN "gfx/sprites/chris_bike.2bpp" +GameboyKidSpriteGFX:: INCBIN "gfx/sprites/gameboy_kid.2bpp" +RivalSpriteGFX:: INCBIN "gfx/sprites/rival.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" +BeautySpriteGFX:: INCBIN "gfx/sprites/beauty.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" +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" +GymGuideSpriteGFX:: INCBIN "gfx/sprites/gym_guide.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/sprites/beauty.png b/gfx/sprites/beauty.png new file mode 100644 index 0000000000000000000000000000000000000000..af5a7e7e767af7cff15977518c236f76bfd71ad9 GIT binary patch literal 263 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(ir;B4q#jT|m47m9$pdf5D({3GtvvP z4t#tVxjH^$>%9%jd8$usNYCvvi_WmHPtCubuK(r5^zBLdH#eAzm7IFWb-1-lr+xP_ z%Zw!^^Bbe@`ZL8?WI1L#N`L&Z@bZfblP?xOY(7`r`p9^fr~UV}_v;r={r+pex{LEk U7Q2QnWsna&UHx3vIVCg!0RJU(g#Z8m literal 0 HcmV?d00001 diff --git a/gfx/sprites/big_lapras.png b/gfx/sprites/big_lapras.png new file mode 100644 index 0000000000000000000000000000000000000000..45f27649e6a918c93594777f43c0806d20669aaf GIT binary patch literal 193 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|jJ)5S5Q;+E@KL#{&x zB5V)jbHv3pfAlF#>5+4Mk*8o^!P395yLowm;FGyd-pp0AuULNYQJbFsHz7^3b*GT_ zdZ%|2!xk&OyU#cAuV`^ZmZRv+`FR`sqHY{voF<_q*KH#3I@kNeI?W&535VSToYjA9 xP~K-F@Ul+j%*q39wud)WPx-Xc)cxqcKMXTdecuc1l&A-}&C}J-Wt~$(699mrN#_6n literal 0 HcmV?d00001 diff --git a/gfx/sprites/big_onix.png b/gfx/sprites/big_onix.png new file mode 100644 index 0000000000000000000000000000000000000000..6002767c217461d5286fbafb05fb5b4bf7f0ccd5 GIT binary patch literal 300 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;ICI$uu2APGnoeT^NpFLe1Ln>~mUfAe$I6#E$ z!T)V1FRAiA6FZ~fvO<625w+OK2W*|KudC)O=IL?m+QAuW@Le+~)A~#1qT+`YdU^8y zi~jvj@R)g?Lt?qtg?+})xSz@YK6=69XU6+rm&xsp+jku*-~IP%n8*WxdY_OREEi7S zK5nP2^}=Z1InkhlZ#MN=H-6iincG^+7`x^zciBS?{*}fS$x}3U&2Fk*9~P35AUDr3 z>&=I(28RNlFK4Xg2+7`7ca)jA^e$K4ij`{x&vc%NR`JjV={g`i;YboFyt=akR{ E0MH(SAOHXW literal 0 HcmV?d00001 diff --git a/gfx/sprites/big_snorlax.png b/gfx/sprites/big_snorlax.png new file mode 100644 index 0000000000000000000000000000000000000000..f53f7110547fd56f97790022528e56cc87fc1a72 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU{GLUU|?V<3EIDrfq|jU)5S5Q;#TsH|Njry zxBdU$|B0FNB7=b7sSp4CZ+IyPZtZ&b|2U7H!o;myemV`C{xxt;nAE&5lBeF~P?%v2 z4@;M9Y3$Z6$E&;^8@d=dT{RU76}UY9I12bFG#$3f0&56 m=$uVR__25^!;4kSfBrLW`4%YaZoDE4Z&#@vPZSvmL0s*ILTvyG$vA#2wzvsJT zv@6%))O%;{6yKNr5m#AJVCk@!UF27ZAmQ zEILt+;a=t`yL*0C4K@j~>?-?NeA3W1`wVT#h=pe7$H* z+RMEwXIf9+qB(!frv(RA?a)z~!}s*Zj;oiVUOYXscMwUEZ29)?`{%MrCvui^Y_su>YoF+5zB6g&aeK4&__!bM|7$Gu zNlE#%?8%g8Gn1yv%|FgRCF)YvJ-3c^f={QIop`y!;(Gk7w;T5BAKhpP3N%kwKbLh* G2~7Y!xui@0 literal 0 HcmV?d00001 diff --git a/gfx/sprites/bill.png b/gfx/sprites/bill.png new file mode 100644 index 0000000000000000000000000000000000000000..d72bb7ba1306f5530405b127a7124ebbcd19e4de GIT binary patch literal 307 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(dr;B4q#jUv$_WK<+ z5IAN(xou&0bffq+y|>rQ3sf$(9&LPfZ{c~ti*xrmF3~&TpSVQHwQ|;!o0E15bMfc| z@T*5I|6N-@fo<-DPg;t0c{=Bw-bt*umA%LRwrbqsck9uW>jCW7LvC7zMt)>1{pT=$?&p)<`Ol>V7I<|AEdJ)+;yR`2 z1^05NO8MADGdpZej3+)QRa-HuI;6D!jAYE^tvj<)7aXz=)YiVW;PEc*9UqUhinD0i zXa?&n_1Q4(Qls6R*Y5+(ML&M~b9j4qRHbI^@7iB_c`r5>|JtW_y2IjuFGairKG)Ytg?8&Bl5e>EOXOzP~dsG L`njxgN@xNAC-0qz literal 0 HcmV?d00001 diff --git a/gfx/sprites/black_belt.png b/gfx/sprites/black_belt.png new file mode 100644 index 0000000000000000000000000000000000000000..9aec228c52861e0de2b10d6a6d0e1a3287dd7187 GIT binary patch literal 279 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(kr;B4q#jW0cd#*zU zGOhA!V`G%~_}0a)nQVSS^o!WNLs242y1n@qq-ol^9$fmwWMQ$wKKXx{u5^i@u^+Jt<*Q?tHOIdR8pYn}IO z*%E$+76u`^rmj1^Ey}En}$Qw7ay{qde)QnliKfYKh~#qI#dU{$S5v lv4y?%_vO$Ei^c5&7@-4`Gqd%F6$taD0e0swz_ceell literal 0 HcmV?d00001 diff --git a/gfx/sprites/blaine.png b/gfx/sprites/blaine.png new file mode 100644 index 0000000000000000000000000000000000000000..6ce1f30925a74d30aee10b0e764ad12656b8ddba GIT binary patch literal 304 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(>r;B4q#jUyh8@-qv z1={K-3s1^6bJFr&f3dpL*?V@!`U%I5TZpmju5O*N+2WZdAM>W^%OkhPMf~3>alwgo z`;UmSvVAk-ssPZ`r(@=FfU*F z$nMKrnYV(!PR?%;)->o?^HFb8lfE@`xPO;(;vB)#>wdlJepS6xe`<(euNUWPi`^G* zFWt9McW%6J?XmOD-aEvV&U9?|3!g1yvtK83?ZFAD^A}dfp2*CI_m8N3vL)dBjfqcX zw!HrTrI!D#X^8~$D*aR6cKi?$d2{LF_wyHuP491>FilgTe~DWM4fAe4i! literal 0 HcmV?d00001 diff --git a/gfx/sprites/blue.png b/gfx/sprites/blue.png new file mode 100644 index 0000000000000000000000000000000000000000..17fc2fdc648b211de0686cb6abba39de40be15af GIT binary patch literal 321 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq{|3)5S5Q;#Thj!>q#& z012y((l?SwVIhTAQcAdAxUjUie#dTJHm!r%0^t z4&Su?x`{Eb{>oRqbryDx2v{GqW@Xp(nz`2sRxfM&vHr}LsrTM4{BFN+u9w9cAvwVl cmG;x?7!PkfU6t0gKpPY`p00i_>zopr0MN>g;{X5v literal 0 HcmV?d00001 diff --git a/gfx/sprites/boulder.png b/gfx/sprites/boulder.png new file mode 100644 index 0000000000000000000000000000000000000000..9b408e0214c8e62ab8b188e2a73a6c73656fbcb5 GIT binary patch literal 143 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1VV*9IAr-fhe;huLaQ;K) zRj>NC;MJF!B$uR}D@hCR_U28vFh}y$p#@@MngTY>JVQ tkYHt%l;GQ8VPGtikdTn}lT7+@^tlcS?83{1OSuNEHD57 literal 0 HcmV?d00001 diff --git a/gfx/sprites/brock.png b/gfx/sprites/brock.png new file mode 100644 index 0000000000000000000000000000000000000000..f9f8ec431c7f4e583c47d135df939cfc706d5e2f GIT binary patch literal 276 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(+r;B4q#jUv$Y`G3O z2(->`Gf~pZ&YRT6OKpcIdhH#d*r+cy0KJ?~~bN*6;cM-Pt`tCA3 z5ormRUobC-a|3@uyvWA<8JqRjEY*1a`Cj$?g(oL$mVOgevr}Q>TdxZ*j7^$vRquRb z5M}LFdssu{u|=wc=bjJQFP*%m2i;mA*L=tG&y1toDJH)j{EoZT_GWY4)6a^N!}k66 iitfLx`X=Om`U@`CAKTgXZ{=hGdDqj`&t;ucLK6T8_jBWNG!q=SDy777)lk zzh>8N|L@AKQw{y@OPq^5QXc+rPu)5LsrZHJQI9T}m?~WqZoA&k*F3-Ef{T>YjE5W| z9tS_<6^8tHTl`44r|F*MH_LEu=foNLRxxGWzY6br)y#U|y=Co$SqBy*NZ#)Gv&eXo zc*_A*mgP-}QJRrce?F97IJITli@!@;b$q*9COK{pxS4x@{=)U2d4HF2f1COKc+Gcb sd6h5o>i0d_`DydfP(9!HfD^8p>~)e(F5wP$Oa*z|)78&qol`;+0HrB@W&i*H literal 0 HcmV?d00001 diff --git a/gfx/sprites/bug_catcher.png b/gfx/sprites/bug_catcher.png new file mode 100644 index 0000000000000000000000000000000000000000..e1306b6a0223905b261d9eddbad0968ea4100d03 GIT binary patch literal 237 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq`L*r;B4q#jWHY{46{I zkC^QzBrq(p=i&J#@QAsc$^LMA=;|MmcDk=#rT^Hx;`F?S`_tG$PA+FtTQDPoBf!U* zdByh+i8BH%&L$^3Xcw3-A<L#>%BnOwxs>X@mUX>FVdQ&MBb@0DPBS>;M1& literal 0 HcmV?d00001 diff --git a/gfx/sprites/bugsy.png b/gfx/sprites/bugsy.png new file mode 100644 index 0000000000000000000000000000000000000000..b528045b5b20c8c0b1ae2351977e2495f8cb9e20 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Ur;B4q#jU9qY`G2@ zNF4ikT%Sdp_3VP#eveeOIu!IWSFV4+Sk>?MC``b%VOIsu!YcXOmICuN^qS&j{|R{1 zot2KL+i=|~_@nNbvUiHnE>e*O*DU;Z`KIihT6ct}Pwvx>84B_1glD+jY}Vze+;%nT z(v-@NE-yMWo+xqZT~w;k*<9$b{*k?{>Eh*S_LXjDIk((Z-7a+K$STgwLeDfxZ}6>{ z!)H@iwli$z=@%>S?A_nKP2bP0l+XkK{}Ol6 literal 0 HcmV?d00001 diff --git a/gfx/sprites/cal.png b/gfx/sprites/cal.png new file mode 100644 index 0000000000000000000000000000000000000000..9dfe77ff4ae7dbc6118cd41edcd748efc756a3ae GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Nr;B4q#jV~68@-qv zMO^baIFpR8Ml2CBb21D4m*BG7WcPzSuKfx2&N|x-TVJYXZ+sK(WBKNK&o$=rzXc9D z2`%4YP<-F|^SkCBD;;uFJ+_v5h^kIAZnn_oJ!Fs~(VyF1k;5Bw@50^lyvO#uG>F@K zi6P_7b3UW5E`J|geHWb+J9&GBI==${kId@bB|jp*vmSakLGgx`_3_Qti{30|(s>=F zn-^}{q2qgN7zrzSgG;gR~)bN!-MtC)x5Hwj=c!c7bu9CnWK5SH|Pofy_FZ@ zHnZN1kNGY;>7BpYpP*^aMBe+nNauT!U%B_;?dN5o3RBBjzfZp-epKY>vzE2K&rWM^KR9J)S>yftJWZ!9n01n@Ty*Sg_kU25 zpU+XNbmyM`nXW#`3HlY`PT_xku>E@EdOoODDXd!C>8Pymfw5=x(Ywol^j guhkt>9{g6`!|+*3!m!O)GaKZ3Pgg&ebxsLQ08NNl1^@s6 literal 0 HcmV?d00001 diff --git a/gfx/sprites/chris.png b/gfx/sprites/chris.png new file mode 100644 index 0000000000000000000000000000000000000000..1050bb02cd141cd08adf5175865219bc7aef8dad GIT binary patch literal 300 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~((r;B4q#jV~6hJJ?) zBwFRU-aR<#aYc4lTBcuOU}vi;qbbiEh2t;YES0oym}0bGj*=5knBQchXruS?5fiw+ zeo*=U{_p%hJtk?KC*KJr#abVkTRKBK)nN501s>^1Ljb>1E;;p19-WJ}dj z#tSQ^IG=J`RQJ*4*)FyGzix64avwHd)06Srr7ieQzL@3i)Bhje7zciHWte8EpSXXa z;U44d_fEGxd$*inpUqR}wA0asJgw~0r^ziX(U6j=p3!ppurv)}07Q(d}!kJdTA+r05ncc=c@|6(8Gf!9YieD7-80tyCCS3j3^ HP6^Gc^AT+OLJ fweR`E)8Y61H)ZYMKA+-p78IVIu6{1-oD!M<{)VTs literal 0 HcmV?d00001 diff --git a/gfx/sprites/chuck.png b/gfx/sprites/chuck.png new file mode 100644 index 0000000000000000000000000000000000000000..54300be2d1692c2f740f11b894ef1768ac9ea1cd GIT binary patch literal 276 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(+r;B4q#jV~6hFpgn z1YGS`C}eIE(s7+V!TZQ9FBhGhy&fE5Ny+)5!c$89CkA~t@qTsmqrMiGS!5f(@tHj{ z_X{j%VQTAtETVUj>zu@?kBbWI&zkL!G;Tayd~K1_K_=0hMcO;QMjrhBOtVIC=>$LD zE7RF0u&P4+hXtmEA$K6|?D^t-wJ(VJxdk8SP0=d_>JNG>)@*?etE>cK77 zm)>~Q{Kz@_a;ZUXbLRBcr^{>#-algKoav?ef6ugKv+r8CZnhV;ifD_J4VYUW7k&BS ihqv2rPMiNf*l*si9Y?-?d)e>< zL|o$onr_6Tq%V)2I+g#x)U1$YN4oYlA8FsP;fwZy;H&F3Ok8vRbltU_v~#^~Xd_Q} z)x@F_KMmH28lufEdq0|soZYdkVrAAX9(Uc+?xjmC=0BWsz95X-^WjUMfGd%{vJ;n_ zz3S@isOgxwmo4k~X_L=773KU7B)JST_97`ptYc$Cp2@4|ulx;>GF@ zT+?{I9R4kSS8lPayLR6>%U`n=U$)zIUS{8gGua<7E4KVaQ`r>w74-X0+}>|=aV?8lf6$DlHm$lsi>7^kW9@JM;OUgla)xt$ zEt%3TP-t(z=EkzfH?v=xjE>kcMuQ966YssanhEm0r>mdKI;Vst06s#7 ACjbBd literal 0 HcmV?d00001 diff --git a/gfx/sprites/cooltrainer_f.png b/gfx/sprites/cooltrainer_f.png new file mode 100644 index 0000000000000000000000000000000000000000..53bf81b137d52b84ff8fdac7e64152c138d5bd8c GIT binary patch literal 349 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq_xQ)5S5Q;#ThjN3X*U zB5n0qB^P~_Q(|^(42!uDns2aR?TtLAl%j@9y%n6?lYGq|3ocO-@fXbeVv~7?&*p!) z$Sy&ihs~Tb`@h?I7DM<&u;;B7$k^RE;x_^hm`7#WJ|ApVFs!2Py zxJ1u&vWAkYx#B$~ulMqr9l>$gN|DsBo*QUU(PcgSn_=wf~ zKfktl{|UJNal*dOO?HP*S(&$-Hl4-s+cNZ6=dY5v)8#HbQe&NX_v=*V*mI`egHrUR zY%jlXSuEVU&Scl67ha3^D_rDU|8>uTcV{~_uHCc!$tJSqYSf7p7ng&=&C}J-Wt~$( F695BqnKA$X literal 0 HcmV?d00001 diff --git a/gfx/sprites/cooltrainer_m.png b/gfx/sprites/cooltrainer_m.png new file mode 100644 index 0000000000000000000000000000000000000000..ffd94f410649464273bf5d2c4474800a67c4fb26 GIT binary patch literal 286 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(vr;B4q#jW0cL#{&x z60P&amPWG`7HXAw?segoTOhlq(Ys%9hliMLlbQERO&6IgKjFE|AOF8q3OXtv$65LR z^zR4f8{64)*_X_X&}6-}t21$y+vBj6ra4Pla)P)d91eS|Ok`x7&YO{A>ie+S*!Anv zjq6z-<$YrdxRGZTGR*D;Add2>=_DS4Qc`8?Ce5HWrtWKKWmt>zr2e rzfhfRI@5XAJ>!{&MVn>fc6{MXYu-8iXxy~@Adh>x`njxgN@xNAD2{cS literal 0 HcmV?d00001 diff --git a/gfx/sprites/daisy.png b/gfx/sprites/daisy.png new file mode 100644 index 0000000000000000000000000000000000000000..84f330f1d7b94bdeb521873f193f2c9bbdc7c388 GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Ur;B4q#jU9m47m;& zNVLXZY>3`v@#4vf_jWy0TN?emtvVYm$b1?!Ec_ zdk$H@eHi-aqS~niy-dw+s)n;p8n$VB_x`rje{gQ6+vXca3=(gq^Ry{4J1l19sWDyf z>h0!hHWwqLzaNP7p6}H)ovX&KwsD1$Wud~Y(=$$3r?{N7wST&NJ&WGt?Y50GV|;7; zYGQt@F40~3I#%FuRg~0@%8VzIL>{!S-(RAenQLye>Dh;hBgu2Qe%-zvTs76}Wr)}E jpjkUuSN^fTJGG8s)A5rsPN$nXLH_l0^>bP0l+XkKe_43J literal 0 HcmV?d00001 diff --git a/gfx/sprites/dragon.png b/gfx/sprites/dragon.png new file mode 100644 index 0000000000000000000000000000000000000000..3b6c621b8eb23eddd987e976a8306eb1a8f68486 GIT binary patch literal 327 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq{|F)5S5Q;?~>?hJJ?) zMA#neSDNM}9;`ae%4iFRRUxywiCc$inXtYOhnfW|&rIV2CN`BFu1!%Y7QT}#Csi(# zjfm#||7pqj_w^dtbq)H<;x9Zo%`*3d%B~vCK>PTDkZXDcHht|DNw*F&aBSRF`Ps1c z&x{1q`tKKG_N!&&^K+N%nfBxJzM1>nSNm-Ix@Ky|8eg+}CLC%4fm0kMrY7cwa4qX` zJN$*IRHV>kma6pmspk%MevaFzlkq_zFt$}FX$3dO>fkAsfo~;U+Y8yu`Au3sJ*ab% zUuVR5$LG6`+XgogkC literal 0 HcmV?d00001 diff --git a/gfx/sprites/elder.png b/gfx/sprites/elder.png new file mode 100644 index 0000000000000000000000000000000000000000..90b499f162eb0dbc9076fc34cea5469070d00263 GIT binary patch literal 319 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq{|D)5S5Q;?~p)j$Vfy zB#wR*?^e3$;_;Hzg=6QDmbeA26BP1xf0T$S&wF&NHq&*|dl5&W3v<#YeLe6)ZEJ*! zfcbwPg+DXIBNpqtxy@W$nw#h%^6Pm`WBEky5+&=J9Qp7IN{qiWq88XzdtI#X-+qZQ3Woa!< zgA+4Mg{QweGNWQ$!YXdo?mZ1_)6Z0Bf0(rG+2{D`+ZvCqOx}Gsq@m{6Z^?X5hQ`0i z@9zmm%DykX*T2_2?(LpP$5oGB{9Cr=MOmdKI;Vst05oruU;qFB literal 0 HcmV?d00001 diff --git a/gfx/sprites/elm.png b/gfx/sprites/elm.png new file mode 100644 index 0000000000000000000000000000000000000000..ed1439b6954119aea416df5607c2d489161630ec GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq{|H)5S5Q;?~p&8?z1@ zh`8#T#cj$cRLq`y^y3wK0Tb`pM;C@H&3-BLOVlmaN!I6c;2FkpJbZb?mR1{Qlot9*gGxnEj!C#{z%p W8@E!`jg`-V0>#tS&t;ucLK6UIppNbU literal 0 HcmV?d00001 diff --git a/gfx/sprites/entei.png b/gfx/sprites/entei.png new file mode 100644 index 0000000000000000000000000000000000000000..1ff4fd63cc6304f51ebc0aca20b0e202d02889ab GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1;hrvzAr-fhfBZlG&;GFd zV!7%zdtcvgJn~z@J{ZfSW^ttbc%a0Q!n%PeQm*R{kNh67PsTNm0$!y5xN_ji`45hb v%o@iI95`RF>gR=|HsNl6P2-ve{}1pp+-8$KrR^xX4P=$4tDnm{r-UW|6E-zM literal 0 HcmV?d00001 diff --git a/gfx/sprites/erika.png b/gfx/sprites/erika.png new file mode 100644 index 0000000000000000000000000000000000000000..22c157d82a88873245bb689ed6b5300c668b5289 GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq`Lzr;B4q#jU014Y>{( zNVGj%f2*OybE25c(T&qRWOprp&=}M5=#ut|;J!fi_rg}}b^AM-H297R#A*1-eRAF- z#<7DrL14;NiO*Zwn-IbhMtPiEnc0xZOJtDWg2mE;{W8LLZ0mX`OsG` pYSNEq3-<4Q>71^**QSmy>fQ102Q!^t)G2}d;OXk;vd$@?2>?)!WcvUB literal 0 HcmV?d00001 diff --git a/gfx/sprites/fairy.png b/gfx/sprites/fairy.png new file mode 100644 index 0000000000000000000000000000000000000000..06fe00768a46b2f1c9cccfcb75c10a6a5bd50ef4 GIT binary patch literal 317 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq{|5)5S5Q;#TbiL%+ig z0<0JOohD35;||)nB!V;kkW;`#2S!^j*PTxEy#Dxwt~_27CAOYm zy>+vi#ad1{V(qpo^6Sl)hqHWfc_Hff?BdxHFMsK(TNifEzpz{K-{Y^-S-3Pzx&s#S zd2T)QH1|}-e7%6sC!CYzc5d{D*=Iccy+B#P%9;i8ap^CO&L+oy-Tfu%$;JB%-tF8Q zuC6!X?Welwdfg3iv!vsz*7DlszIf|9@5Nj9-Fy2kZPcEd+!>60J@7I9B#naW#Wt~$(69A^2jV=HH literal 0 HcmV?d00001 diff --git a/gfx/sprites/falkner.png b/gfx/sprites/falkner.png new file mode 100644 index 0000000000000000000000000000000000000000..a9bc75dbde264c9e60f90b0d03e249c7fbc7c081 GIT binary patch literal 303 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(hr;B4q#jU9q484vx zNU%N-pWLvd^F%~O@&I`C7WPTrS$6ip`r9IUFN1v=jxL$fdbyBG z{x#FT2_h2;6u!QdtlGSAyTs+hd+(*@^!)7M%BwBixU5_>a!%6Rxlga2UowxQr}Ab( zPBYuOv(i73;~n40Nje|78Gd@>chhI0Gv0_FZLXifr|6l#GvL5gKJzJy8w|f_i~jra zPph`yRWoSEiwCED*$+;;$DA+uM11|dx#3nPewON6UYxUM&(BB9dYev9>wYtFGbkiH MUHx3vIVCg!0M;Li1ONa4 literal 0 HcmV?d00001 diff --git a/gfx/sprites/famicom.png b/gfx/sprites/famicom.png new file mode 100644 index 0000000000000000000000000000000000000000..15ff22d0a654dd1aa330c38a8ec13dfea56fe062 GIT binary patch literal 110 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1rk*a2Ar-fhfAF*Lyg0&M zr%;$>IAMa%&+{ML8xPNW=zq;iL2xEla%UR@=UUNkJpcI(lwYzk+)>vzn|9kz2xO3_ LtDnm{r-UW|C(j`k literal 0 HcmV?d00001 diff --git a/gfx/sprites/fisher.png b/gfx/sprites/fisher.png new file mode 100644 index 0000000000000000000000000000000000000000..a84a2e3716887c48f7590239d27bb933af8fa8d3 GIT binary patch literal 308 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(-r;B4q#jU9m46_a! zNVv@xjNFxxInA$dvqb!%Ha$ge>j>FhWtx_*Cs=14tv;Z+!m4%iQoG(g(pTd7G&SE| z;QIKn`NHz=E+4D}CfKU{ZhCl3wBotR+qA_$3f|3pS9|q>b@_S2?ZumnPI|mP&dQ$r z?!#rT$BxD;wmn$H-xb`mTvwydV0km!{@s_B@B5OtNujpd>bvCUz5c75!cR?EZ<@F* zj3-ZfQT7EihU%ZmHU)ZUH4JzlQUCTg{<@jkJn=hE-{OZfw>x+iSbn0saF zQGcz4?ymbjY<};5i8r${cjwypoGD>Hj`UpL_v@ejUY!Fv@rha&`y@Wq&u5*rwRS1% Rf@7fI@O1TaS?83{1OPmdjf?;Q literal 0 HcmV?d00001 diff --git a/gfx/sprites/fishing_guru.png b/gfx/sprites/fishing_guru.png new file mode 100644 index 0000000000000000000000000000000000000000..748444f8e4a767c9063ebb6893ba0870c919cd6a GIT binary patch literal 269 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Qr;B4q#jUv$Hu4@a z5OLx6k!pF;)izBng;QNR-~nfb(lU>;B8KM_c}jL+hbGOgT2WXYklo6%ANeE_51pcRW}Tk3w8EATdl|# z9M$K>{@B~zGGND&Cl*hi#2VOj3GP|A<-w&U`-xR5(OE184<>()f7uZ7aN?3ZPCqo7 Zsu*8?yuuo3{c1nRpPsIMF6*2UngGGxa7X|E literal 0 HcmV?d00001 diff --git a/gfx/sprites/fruit_tree.png b/gfx/sprites/fruit_tree.png new file mode 100644 index 0000000000000000000000000000000000000000..b276339070379fd52d6dab0811a42cfb9c13f818 GIT binary patch literal 148 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1(Vi}jAr-e60~pr-XZXXR zV9)Sj(`kN&(~J&}8II}bOlJ6$nc2^9Y~8BK43evsZeftxm%4;OY~QLW3`et81~YsJ z4drL}@5uO{;r|!@{|x_@aP4RK)yTA-;olOe{bp@SyO@+BNN@yO+zYgM0jEXuDQ>a+GpZK0bKo(yi%opB^y? zo0^7qv%WP9Jb7*MU7LHWw|ra59)HV6SMbV~YR|GFv-jzlyHBaSJDu~(B~L2qCxc7# VcE&BU%D6#Z^mO%eS?83{1OR*Ea3BBx literal 0 HcmV?d00001 diff --git a/gfx/sprites/gold_trophy.png b/gfx/sprites/gold_trophy.png new file mode 100644 index 0000000000000000000000000000000000000000..cc12f9f3416d3e39b447873a59744ee886c60a83 GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn14xTQKAr-fhfAF*L{FiKa z(U8Gme0V0CT5_B5X{TOEyOy?3#(%_l8BfWTunE<_X*|N1CUH=bK_!AYA!dW70|UcP WEzL`RX0lj=%=C2ib6Mw<&;$TKTO!v0 literal 0 HcmV?d00001 diff --git a/gfx/sprites/gramps.png b/gfx/sprites/gramps.png new file mode 100644 index 0000000000000000000000000000000000000000..abe61a31dd10941b8b4dea67797e4fa7480b64e3 GIT binary patch literal 338 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq_xd)5S5Q;?~^$gIU_Gu$3|Z505jJG;|)o|eonZPv{jZ@uze$Y;FH?tR6t!n4&E|IE#0o~F!Nqw@BLdYy%K ziDlGpjlC`Jxr6qt7vFf8jr&E*_xBgLdP`5;_H^To>s*}HVwJFRUzpHu!{Z- literal 0 HcmV?d00001 diff --git a/gfx/sprites/granny.png b/gfx/sprites/granny.png new file mode 100644 index 0000000000000000000000000000000000000000..763b2a2b1637f45eacf88c1f77bae04226dd4b8a GIT binary patch literal 360 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq_xq)5S5Q;?~p&8@-qv zMO^c@Tr>%Gkv`3mICs9pK|SA=t4`XA9JAJQ=y=UhdnLXmTWR-u?K6`c&Rp+V$^3Zk z8a8g}_J^OkD%0;(e(~r!NvVJvq3Q{e6Di$FslBP-MuffT$o=0cD+7q~Nnf_b0n6#6(_a@!` zCt3Oaw#&y2Mo(TIN!C>EyC|&^@g+Zgqrlx%8I3cl#%m!xTLZ_rhIXo~ z()a3@qz8(GU*fy*V_D~)+qv~sTnAIk-HVksPFLF|`grxJ9jr-P99p9d?;Vy65<9C`bK?G^bKiB|@8kV>M|f+9l;ai^F2|4$?RqLU ziqG61J$5lE+Ee>~<<)tF+%s-#T@nOm}BVxtqj)q1ENvOc&lawa@0x>96h^Z#dM8}M<=r6A9!S#pghlMCeLyOMU|@AyC&Pz3#eY?o&D@|_OI`+ zs|8lGGQGRS%k!pWP2hX+HD=+x(ev~R&-)4HlwF$eb>hyoMlMMTi+5CO&vT!mdhvG} z`!lBS!@s&1UNFC4UUc345!;!ctIp2!`}%hFheaF`ZO5;Lt!uW*cg&ot751_6FI!{7$Z+FCgm!M~ QGLY{)UHx3vIVCg!0BHtp{{R30 literal 0 HcmV?d00001 diff --git a/gfx/sprites/jasmine.png b/gfx/sprites/jasmine.png new file mode 100644 index 0000000000000000000000000000000000000000..0d8be19ec084c7574740f50e9ed4622f57dadb88 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Tr;B4q#jUCRhIxk! zMB4tVMZ9WA;hbW9!RL-btkvvObsn}3)qNrd4^8Uyy2}wfE7)Md(&d~pb#3Qy%L?d3 z+P(Z4Isb3sc^T!Ie6m8O#TEj+7oP?;=IzzKuw<(1=IH;*J?%D=wC~Ha)YSA>+eAKWHF+T>?Wj5J zohPT-(gk8ay`xuk7d z>i3s-`Q9-8uX=hY+A^GDe`?vCnyY74%#-=JVAa~JM-Hsa=d-={GFE>rkK3D*6$f&u Mr>mdKI;Vst0DW6koB#j- literal 0 HcmV?d00001 diff --git a/gfx/sprites/kimono_girl.png b/gfx/sprites/kimono_girl.png new file mode 100644 index 0000000000000000000000000000000000000000..0ea041f5bc29de4ea4f4a6822924a96f35069a0e GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Nr;B4q#jW1{jai2c zL|oS|7Hbk~pConbq(GF=|CYTa+uHv*yqt9Y#D%mAmxAWRRtWv&@>l&Sy>qj}-c?y% zCogam?)*^EUj88W)x(4Dm*^RWc*-uG|BR_NktJt&& zv7(4YfcLT850908xM8AtXPxK6^>NuhZd)IFI5YV4%IAkyUi$5)Yp~{;%~~(Ft2ZSB zBVX6Q`~CE<{@&}8_8jWjW48Kn+x+wWmCLgTe~DWM4fD!G;n literal 0 HcmV?d00001 diff --git a/gfx/sprites/koga.png b/gfx/sprites/koga.png new file mode 100644 index 0000000000000000000000000000000000000000..8afd066bd4969ea69b21e425f1eb828593f20181 GIT binary patch literal 253 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Or;B4q#jU0Nj$BOv zBChK_1BCu`PEKCJrM{R;IX*wTm)4Ch{BP zzhL;q@T*C(_TJ2g5w*KBzXbHwBz2trka%Hvm)F-;KlN7ePm$pwIx}AdPe1YPPQkWa ztDC~+hpEf`iQiRvRlN4Y-?&|&Q>QM^53%~Otwd+X-ZSf_T5sV#xG#0+W1{Fxcn1j;`AR6c$RRp7FFqgxE#*?zbN%$yv&ss?w_Uh6^K>m8aHQ3H?J#DtdWZ3`F!!R zSxrDxhhfMx?_EZdp;uYnKmH+O7kOd#o@LW@UNGL@ ztNc}N*^+ZttUWchOYT*>aH6tgyQ#`^A1l@{!{iJJd1Iz$0V`|S#Oriqm+qe;cWFw0 z|JCMW>gAEA`@TQFBxrA#x$=lP&su$L)@x|RJ`rd=A%oY~oSzbH%S1m6HRLB!q``4n`;9RhT%8c1@smH#y z-j-BdahCml>+jjc?;Lc4xL*BCSj}$sX!1VZNG_I={0q+Kq@QfiVAWj1 zSZ}^4O`mz`RhBEu++Df))`oMvuswg2ulK(77ca)Wo75IOjZS@{JypzZ&KJ?JWz}7- zYbQFT?2A$D8TCw!d{CuX*LYjA{>A9tX4vBK8_4Of1!6`gq=k`N;rUwnc) z=!DAtL*X6i{aoIkeIFL5Xy*LNZS0-u*LJ$}RH&59o8Nn1N3*OJ>zDnu_p18sefDxY V_8X_2(E9-jcu!Y9mvv4FO#m3Uvk?FQ literal 0 HcmV?d00001 diff --git a/gfx/sprites/kurt.png b/gfx/sprites/kurt.png new file mode 100644 index 0000000000000000000000000000000000000000..bd7fc20ea552b5c0853ecac23efc7d5758db280f GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Vr;B4q#jU9m46_a! zNVLX(c$9VV$UBb>k?>>sKgXdv4$Ac6@oDjr5i8yLC-P~>rJjk2b0!( zTR(%LUxquX_V-FNWkxaE4Uq}g)~Ri{uxrUPt1RDS@#}TJcIuixIh!o9_ID$5qSai% z$vdA<+Sbb z9@qU>mZqG%(z-H8e2O%7IyiMXA5f2Uo{ka86$M=X_KoSYrSH literal 0 HcmV?d00001 diff --git a/gfx/sprites/lance.png b/gfx/sprites/lance.png new file mode 100644 index 0000000000000000000000000000000000000000..5a2372dfa2f882dba1b697e7537c38653fe6ee08 GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(fr;B4q#jU9mZMm2X z1zP3ZTvmseg*i!;Yv*s+yOmua=bOaJ?;K&9Znw-)DtkRojXk0xU+D+4mc>!!#I$`g zrz^NlozTFgyuiieQPsMOyDueV+~T{w%~GlAyh~s6xv{^{)+%TZDTzmR$9IB)Q%uWuBPak{JQo;p&&7__F*&-bZZTG{s>3jk0S>OJbJU zur74*O{|Fv@^KHpRC#&U?w1etI_fWz6pMJXBWmO1^jk%49{Vfq`z$V*nXWR?bsL};Q9DixPfQ#H<37XcBv5Vv~(qzJsW&mejI52 z^3%5Qq=7}QBx8Xfi^PS(><6niw(l>oJ+!p=!QJI^vV+<0FEd)rJyUcmhr;Z9^TzkA zJEs<#l?$d6Z*~iuo$)X$C1Ccft?&2#e7v~#;`wH`&4OFP=ZGkO9MF0Q* literal 0 HcmV?d00001 diff --git a/gfx/sprites/link_receptionist.png b/gfx/sprites/link_receptionist.png new file mode 100644 index 0000000000000000000000000000000000000000..b6c98bbefae3880e4496085288d5b8259f044e3b GIT binary patch literal 266 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(or;B4q#jUv$47ma!ZAaZkW^Aiz9Y0t-^DrT?eIkh%a%*xoi;a|QFSD@o|iHNq! zGc^?l4o6Cx2fa6Le4R7%fyH}W0nfz((_A}N=>%Q5#PQ?sfy4exU81Qx`n{2 zDy|9n&ziP;Yu1uWR*q|(n7(K}`y}feY4>T9pUTcWJCTCyxk0@hM}*Gz&-~soSJE_f zr@{LpduH)g{iyw-`#%4Hn&bBJqkoUE-qd)S^9c)rwGrd-D9-WI|5>wL@aE_0B1C!6wd%ELXg!X^~W zb7Y^-vMcu3#}hxEMjokprkC+y-n{Q$_AH;i&;C*5)_tMgoGqfx(>Rmw_9(>rGQR!j z%da{0z3%?G_avU5%6sSa@xlDXOV6ym-(IO3{H3k@c}8Z=`^|4{Mcn>gecyQT(&HC1 h_J1(*)Y#tik71kD?U%e$cs7GP>*?y}vd$@?2>`Q|eKG(5 literal 0 HcmV?d00001 diff --git a/gfx/sprites/mom.png b/gfx/sprites/mom.png new file mode 100644 index 0000000000000000000000000000000000000000..36010c92d4be05a06d9541237b8d63abd993326d GIT binary patch literal 253 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Or;B4q#jU01_j4UG z5McYTzO5nJ@x-H)xl8mfI*7_xZ|U}5d|_e9M^P7nCjW~~`}_;-EcKg2ND<>~6@ Jvd$@?2>{2#X)pi) literal 0 HcmV?d00001 diff --git a/gfx/sprites/monster.png b/gfx/sprites/monster.png new file mode 100644 index 0000000000000000000000000000000000000000..80d615b2e8ed0142ac577a026f1ba3f8e18c5ace GIT binary patch literal 350 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq_xg)5S5Q;#Td1jebmy z0&VpceF|p<@4n5{`Jg&Yw*sb5XpZ^Nw5T6>vyP1Tz2=>`H~rwh zXLG0RyX{#VtQ&IoOwhl-4(e0%)IZz}TDY%Nx#IQ{d6#=N%*NYyKbhd`WdaH~Pgg&e IbxsLQ06y5E?*IS* literal 0 HcmV?d00001 diff --git a/gfx/sprites/morty.png b/gfx/sprites/morty.png new file mode 100644 index 0000000000000000000000000000000000000000..dcee550e0948c98b8f623ced9d208187b1f7900d GIT binary patch literal 282 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(nr;B4q#jU9mHf9|* z5OH0fW0JjLbBR_-;l4w0R_+O3SR;Q)#?4l}e_@u+KQ8Ckj8CSkp0mHI<<(VGX*QkX z*k4||Ar-fhf7Cbpw?8bu zmi51+U5f6;^dAQfFsQ`DE?C37i181PJCn;FNxr4aJ{s2~B|J#~vB7Ee%!ij3t>J02 u_wi0Q`160otwSIF3yZTK{%@mn}kV)zl>$mPgG$mNZiPr#3eH2Sg^}FC4a}sYL{pHTk@Er&*ix2{&m0J9bjly zd+m_CdFgAJxCVF6zs-%^hPqw& z8{6C~^q_Kuoa44h>YZoTsd;luIFfjJ?bo6&LI+myE-?9VKKs-CPd`51`{9*bp5K1d P9^_b0S3j3^P63v(!M=z)9l!^q`A+`Y;Y0WwR}SW`=sTLXFT4?>YTk+@q_L6 zyU+FQ4?+*5{BC$^T@>N--as(3=lN~HezV;V?oD0(Ht)v|t%Oe}4w!T{<{P)}^wiQ} z*si&LhseB4ozBv%Bo$=FYmKzjNvJdtQcLZ-Ty3$}q7@JWt@w zlT{pYHQaY~f6DEecA=^?XS@ADy&aopr^TF&Kdo^6@pbWC(=J3g%|5!Ligdxb=5iE6CrTu6{1-oD!M<{49Nq literal 0 HcmV?d00001 diff --git a/gfx/sprites/old_link_receptionist.png b/gfx/sprites/old_link_receptionist.png new file mode 100644 index 0000000000000000000000000000000000000000..fad0eedd8c4befdfdaf04a389edae80e9775500a GIT binary patch literal 141 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1A)YRdAr-fhfBbL!Z-2P{ zTEl;ydMD?%l6Gxvzl>{mN?3*Dy8iLFZw+HH?$CWT>yW~(71}Ki7o@crAD+*qR^4VF rtKiglc-}*MW`V!rf{a4#{Qub*xb`VXcx67j0+`njxgN@xNAFh3!Z literal 0 HcmV?d00001 diff --git a/gfx/sprites/pharmacist.png b/gfx/sprites/pharmacist.png new file mode 100644 index 0000000000000000000000000000000000000000..ed0fa1d28df56e1a9accfe7214e68a10569fa316 GIT binary patch literal 292 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(*r;B4q#jUCRj$Vfy zMB4rfaHX1UzT_HyRl{WGktt4hmn|x0GPi7Fzt-G>NL?N~c`=!sFjW`!&#VhtPy910RXPgtzNf37%Q~loCII->dj9|b literal 0 HcmV?d00001 diff --git a/gfx/sprites/poke_ball.png b/gfx/sprites/poke_ball.png new file mode 100644 index 0000000000000000000000000000000000000000..b12bf897cf0f90ea22fc2fee2e464d7613edd349 GIT binary patch literal 119 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq}u!)5S5Q;#Tqxeij~q zN6hvU5_o@{|Dc|;%C_Z)gw!j3MLS>K*XcjDWQE!vo*%mUjpC8|b*u)t9Kmj#2VEE# XxK8Gn*cnQ3f=u*u^>bP0l+XkKqsAn8 literal 0 HcmV?d00001 diff --git a/gfx/sprites/pokedex.png b/gfx/sprites/pokedex.png new file mode 100644 index 0000000000000000000000000000000000000000..63846bfadc854233ee9faf6194281d0eaf5a0d40 GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq}un)5S5Q;#Tqxeij~% zN6equ)7p}?cT6*o;r8}TwAd!(vZS#iG}2*XXr@D$#0*xIzP7eD1DON{CX-;d&Vx=2 Y4Ef(OHhX$22!hP?boFyt=akR{04v=guK)l5 literal 0 HcmV?d00001 diff --git a/gfx/sprites/pokefan_f.png b/gfx/sprites/pokefan_f.png new file mode 100644 index 0000000000000000000000000000000000000000..aa1fbc06fa399fea1ca8dab7bd5918bc9464d0f0 GIT binary patch literal 264 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(?r;B4q#jUmdhFpgX zMB4suVLhsP@S^KNzFXc)%nQGYr4_t-B@t3T_qGq1 zEzD8ldO+#gDJ7rpQVTyxeY|pmB`Uvt?rEK>2Mzl^vA3L@SU!2NZ_|@t)AwA5&-)y- z3*NBaU{CN?U#3-mUY}V0if_t}@O>_`cghs*srbER&g!z7)z6v)n}p^_ZanCA;92+M zk7q8v=Fj^hSgL*SvJ!{Hy?-msm*-b+_Fq3OPJ3@yRpy7k*KT{>u3GBoeS8Pkj_-`q WIX7|4TX|(W$cvt?elF{r5}E+uFL%iR literal 0 HcmV?d00001 diff --git a/gfx/sprites/pokefan_m.png b/gfx/sprites/pokefan_m.png new file mode 100644 index 0000000000000000000000000000000000000000..fea7979d32cb4ce477d97d7620cbe2f78ee69e73 GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Lr;B4q#jUC54Z99G zh_F47znn4a=CNZ%TRC>R^i60za?ffx$4ar;F^Lz_YLdCua>k|4k4m}a9t(aPHBVyKqz@Jr=Jo~W zd>2Ze-klmy7yh_C-21-RZZUD`?SJk{fBP%({j+NL=ZSV7=S|&rG%?*e+weqVpyeV} wqi=7&tpA>t={Bj)d*13@2R^hi-COaKagXNplbIirBtd@nboFyt=akR{0EKOWC;$Ke literal 0 HcmV?d00001 diff --git a/gfx/sprites/pryce.png b/gfx/sprites/pryce.png new file mode 100644 index 0000000000000000000000000000000000000000..69f152a3ce29e1bff761c62d173d067fe92d5ff6 GIT binary patch literal 298 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(pr;B4q#jUyLH)b7j zkYW3?>xw)>IB*XHtETIKn->evP2wt0q!FPH6~bE#O*@?%_d)#m7`YZp)dUUF-({XG7A zw>uUl%k9|7Wq53((yQ+Dy3@gKu3mC!d&1RwP8dBh*^?^%^VYo8g%58neB7aWJNBOj zuY>OYz1?kPv+n(El5+~qoV!=Mec$72`IjdBJ#l*X`8oz+zopr0JL;A4*&oF literal 0 HcmV?d00001 diff --git a/gfx/sprites/receptionist.png b/gfx/sprites/receptionist.png new file mode 100644 index 0000000000000000000000000000000000000000..0d102b04ae247442c542711203ac86f92f4ba742 GIT binary patch literal 237 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq`L*r;B4q#jUyhhFpgn z1YGw=US8slpoF@X{-YqouOZuEYmm4E|ZnYpK=BtIh(OQo@1l1vvR-Mo8IehS{JjNEty`jG@8xU=4S9MuGV(|a#sC}Q_VR;q$0xAsNa#*=>%xWzx6m)avJwYQ?{+sAn=+w4jn2YXqp zda!Ia*DG&cU;g*;3;$j{aPRzUo91YC$@kAM#jmY7e0Y=ay)IAyc)I$ztaD0e0swSN BgOLCL literal 0 HcmV?d00001 diff --git a/gfx/sprites/reds_mom.png b/gfx/sprites/reds_mom.png new file mode 100644 index 0000000000000000000000000000000000000000..5644764c021f1f250e0937df454c5a09515cd77b GIT binary patch literal 281 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Hr;B4q#jVx}hIxk! zMB40+u4>s;!D)S0VY)|glhFk0f}W5S-qXHthzcLypmb&7a>Fyz;_frExM;0R{kti3 z|M~aELVFcn_yh$m`$zmAyr&&R1sTQ=y=Y^P8>*zqFrvY5#u3`|?u1W42$c zu&U6IU3Y1wXY!>PCca^po}aJUIV(HzZ&pL#JkR#kCf^^P7xejcz_ZHqkhDjB+oc&> n+%{b8|9h}zGvn=)n{(% zbnjoYqxZ>;_ewjOn)jWXrG8-ZH<$A(9*ACCcZ~o2lxNdKzDM$j$uzHYf7$wdmC66J zmA^|mtUP~qG_U*g{jiH`{8#?D(~h)`-fNfrJGJR%$k2O78DGgu6{1- HoD!M<(>;m( literal 0 HcmV?d00001 diff --git a/gfx/sprites/rock.png b/gfx/sprites/rock.png new file mode 100644 index 0000000000000000000000000000000000000000..5a614d7bb1700fba45aa4d1b1e2c6002c97726e8 GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1k)AG&Ar-fhf7Cbrw?ACp z*7Bc6T*l>zq+fyQ2jdkbX&lBJtgVJd2C5!h1{OQptPEs0gi})lIynl{CWvq*qy&^C wWF%O;I-quE;cNd5KdV&DiXe#OK`kuyFs;h^>a_aeUr!1u(r0sr{-#Jl~@ zE9vp9C^@O{{KAh5e^33spV8d%c#^7+TD<43`47VvR-cZz-w?eO6a=2GelF{r5}E*& C2!g!; literal 0 HcmV?d00001 diff --git a/gfx/sprites/rocket.png b/gfx/sprites/rocket.png new file mode 100644 index 0000000000000000000000000000000000000000..43a71bd6e1f903d43c71e34331aceae1252296c1 GIT binary patch literal 247 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq`M4r;B4q#jW1{jhu%K z1YGR{pFjJxCGSnh%>&9Qy#0xD&iRIM6m~7p4B_%$%*gV5_hzQXgbiK%<-h(H%1geO zz~IDiN6l>6Lzj+w*CUPfmZ%C0`dbY}L9^9*Wln3|iD-#94;OkeZ;koEr4=TfF0 zPj%1w`80LCk=ZBf+9TyVvz`9TnHRtDqDH67lZP2E7c5P_egDgM#f@DoVJ9p6XU&V26{-vpIi^Wa09KG>0k5$TT+1+CWmz6<2@^tlcS?83{1OTe} BY&!q| literal 0 HcmV?d00001 diff --git a/gfx/sprites/rocket_girl.png b/gfx/sprites/rocket_girl.png new file mode 100644 index 0000000000000000000000000000000000000000..b8714ba6f709d6df596de52c5e6cf19ec1b3276c GIT binary patch literal 253 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Or;B4q#jUyhhFpgn z1YGxXnwe=!Nc#)yJrZ?$jleTLxx-ey;R4zpMYs*W-;7{CHZzu2tm&YDoR8Y?8|`u% zI2sz+KebqtH8^kIX>~{ctCHdxezyMPGOvzw$xlUr9JAU!9(I3nK`4~7kjF)db>HtB z&)3{vlh?b-ZfULT#wl-eUmjS!@_;|f!yHkqfcVwZ5?DSx=+8*0Y7VM>`rvWkzHg$k ziK>-V?b?lP&^%#x)SnWk*I!BwHRf5ZE?!jm{xUidq2BOAzHp00i_ I>zopr0D}5x`v3p{ literal 0 HcmV?d00001 diff --git a/gfx/sprites/sabrina.png b/gfx/sprites/sabrina.png new file mode 100644 index 0000000000000000000000000000000000000000..ef29e27d5ab60366c359b8c53b18846f6b3b635f GIT binary patch literal 260 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~()r;B4q#jT|i47mnl8uhR65oj)4N_qF=)1kL>F8j$N*c2lFQYw?=XfBjhO zeltmTz1oz=VwR<4`NMw8)eBR9KKQM+#s2D^Rhw3=+Hv%IamJe2|E;I~VOX{1rdWd6 RtR#^4JYD@<);T3K0RZvxZ&CmN literal 0 HcmV?d00001 diff --git a/gfx/sprites/sage.png b/gfx/sprites/sage.png new file mode 100644 index 0000000000000000000000000000000000000000..80223046743d433062edfa0c774a07efd5dff6a9 GIT binary patch literal 305 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Nr;B4q#jU9m4E>l5 z1zh)U(r&q9;VX5^Bup=nlaJx(GZqt#OLc-b_&;6m~CnL;Y78mBl9~1y&cj zSC+o|pxIdd@Zf$Yc3xSrwMQ4O{rR)j_`EyA8_xIdFE~20Uk>Lu{`W3V*QWcG2PYR5 zhH~5x?+v}-oe`2D^4KtU-WA*GB_HRgR+ps}gzqeTHD^&;T&NwxwU^ftXQpKIfWpGl L)z4*}Q$iB}Pi=tO literal 0 HcmV?d00001 diff --git a/gfx/sprites/sailor.png b/gfx/sprites/sailor.png new file mode 100644 index 0000000000000000000000000000000000000000..b4d3b5f2a95a703dc48ceb5fceb724857ec45bf1 GIT binary patch literal 307 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(dr;B4q#jV~68?z1@ zh`6p#3Z4}(LGj}y-Ij()^EVvNiF;;ggYo63woCVdfIl)~{>YWHS`on9}d zExTIq;N?rXmz?KV`1H=n<^-yQmlWz<%+xJh#b;b2yNYe^HAy@1*}7N$IXdpG)0i>6 zl0iG@SkS}+tZl2J_t`A-U-G3@ur~3^0&RAoRPU#q0zXIl8B!{I=5kIIe@_ZOaB8k2LwgH?al`tm)G=gzSCSbOa5 z=erWOt|(7iJgfK9#>U!gY5B?a?|&cte*MBy{|kxjcV4$n`X_AsZ@%xjp!Q?^cl>HV P!NcI`>gTe~DWM4f!vu-` literal 0 HcmV?d00001 diff --git a/gfx/sprites/scientist.png b/gfx/sprites/scientist.png new file mode 100644 index 0000000000000000000000000000000000000000..39c44291e1901b2b473ce2ca5756eb5e38707e46 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Xr;B4q#jW0c!*z!Y z1YF!XU8fwo5;F0UMED(r_Mg1RJAB+fuNTnleHy%j$Fi3{;bgs8gMz}o4QnQrUHiSK zStittEnn*w-^m?(7pq%O-V)nYb6dWI=o{ z`~5aPp{hw2dOmbtxx%&6uGmzDW!C*ld1v#`?gu=3s}$C+bo*JZ(x2KE_3gTe~DWM4fvXyu7 literal 0 HcmV?d00001 diff --git a/gfx/sprites/silver_trophy.png b/gfx/sprites/silver_trophy.png new file mode 100644 index 0000000000000000000000000000000000000000..458cda431b69a85c96bf3f1f5258a88bf1c545f9 GIT binary patch literal 120 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1_MR?|Ar-fhfAF*L{I~zW z%z3ThKaaeK#Sck4@76i#Ka{1C&VTryVG!_WvHgS}$^0sO28TJ$F|6R@5YOQfU|?8V VsIx17R{sK!k)E!8F6*2UngDO4BtQTF literal 0 HcmV?d00001 diff --git a/gfx/sprites/slowpoke.png b/gfx/sprites/slowpoke.png new file mode 100644 index 0000000000000000000000000000000000000000..d651ad3e6d74500e1af9685e37936fbbb09f1884 GIT binary patch literal 139 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1L7py-Ar-fhe_LE?a$X%gKY71^>bP0l+XkK)sZ(; literal 0 HcmV?d00001 diff --git a/gfx/sprites/snes.png b/gfx/sprites/snes.png new file mode 100644 index 0000000000000000000000000000000000000000..4eaae45916aea663d77a3e5a218702a9850fbed5 GIT binary patch literal 109 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1CY~;iAr-fhfAF*Lyg0&` zrf_iU1N+1CXJ&rmsh673aAZ~Jw*b8vqEcKcGO}+a{}~%7ykuqA)vo8rRF>rpGRM=^ K&t;ucLK6V~-5?eK literal 0 HcmV?d00001 diff --git a/gfx/sprites/standing_youngster.png b/gfx/sprites/standing_youngster.png new file mode 100644 index 0000000000000000000000000000000000000000..61a8b79c624e500d3c284aa8bc79e215d6b72b55 GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU@%}}U|?VQU|7i2pMUpFrKH~ZsWH|6=4<0MU^ UAMV&-I1A)pPgg&ebxsLQ0LryjeE2TVD9{1-_Z46f^n;4sb8YS%PV4s7KpK!co}6S8Z>7FFkMiZpE6-;cVpLo iowk|f94T_*ZIukUtO4aaj(@!ka*n5~pUXO@geCwEls_2& literal 0 HcmV?d00001 diff --git a/gfx/sprites/suicune.png b/gfx/sprites/suicune.png new file mode 100644 index 0000000000000000000000000000000000000000..c3aef5c6ca9985f826ce515aeaa19b4f50770f18 GIT binary patch literal 140 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1!JaOTAr-fhf5<2Qn*T66 zAlv3}==lQ$ZL4LN9`eLnu{@Rhm(_8_xaI@TlXQ!RPga~+@L=JIg9~(Ca4E(38O#w7 r3~UoPb;#Y%U=F8U)|n5}|2x|@ZS>*Z zxihybKZI3Qe6UhzVin0*>-u7yDA(F>gG`}A%Q&kS_d0Q=Xhd&)<5~8#l4X0o%ZICT z!YaRBet$UR0E6Nwiv{1VB(JYb(dRq#yg66@s(0Con(v$WJ2Fe}p8oKJ(OK)u%suzQ zL{zG)Yn&CIrYbIVd3x~u1-I7%uCvxm@Xky zrB7ZNP1O9+`0L^K{0#PQd6OUVJc+bYNdvWjm>>wD1$3{CA$`k8370wCF_j+?X;WEQU9772Mw zT)_O4nvMFJ$E!p`CvICL71!CPFn0p$WVPgwgcbMq{n@_lc*L!wzi(Mzcm9$2?h<>% zMQz@k0@jsESruZZ6qn?luhE}1rQ$~7l5J`eS$cY<<+^R#wB%IXUdKO^Tbm@6^L--g zY@X=Si8ppPCF*{fm8;l&?)QX0Y3~2}d+qnxFK&04yECJIMW45N%(=z)TZ|6eUGj6{?|~s z60QCY!3D-!95XjddhO0gd&wQMJX6pqG3f1$)L666LgFS{9;xkGaoa%c;>`cLOuWnP zh6pU&^-(nKkV)RNPru{23Jdw$xxYWQ7XN;xr>D2u=d8?`{#R0MLT;56E0#=j+h_eM zQL2}1hsvk7vEnjIPisg|RV(^Gxx0Shd4mf)2k$Pt@J4~#i#;vkZL{sd8CsetE4O3{ zeVwrXrsRXz>GK{$mb)+B`@6~T-j7uQYko1_;NRcCno%hxEPsI{>Pt0Pf3{{oO_BPW?}J^IF-72 z*M+x=c2?xdSH6*b@ci?x{*%Ysnw4ViZL7Awz4u*{dg7ELOT!*qU%JQlI{S>dwZHrJ zm#q3YyH4ZImLrzm+aCQ1`6ku%w7cEA$8*Qe`|lZ-uX{CnanbP0l+XkK D{^in6 literal 0 HcmV?d00001 diff --git a/gfx/sprites/surge.png b/gfx/sprites/surge.png new file mode 100644 index 0000000000000000000000000000000000000000..ae165c7ab223e92d4915428e8a3bdff49c87a2ab GIT binary patch literal 277 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Ur;B4q#jU9qtho+3 z2(Uf4?=Cf4WY)23YA030_BK3v%#x{ce1p&AdtNadg?@s8j<&u&dky?LqB!<#`*E{% zW`4QYoZCEkYbDz}7Dil4j=5XXvRc0|PL=W8Y>fkrD|+ul-`K$*C7!-)Vsx@JTYy2b zccb*o0DZZ@9;G{6v(_9@=32GF#(r=0@}GOYcc)J?VXF4jIUaCW#kupu)CDGNd)p%3Y#s!PR?IGiLcm(KS0fFFoO~xX@xElhVCr+N97n`_~E=8@u)2 zMty#^zcno|qlEE!2gBLza#a;iWIwd>R2*3)dZbF(VqJLgp7r7W9lPf$+&7h5xz=il zUg-(DVzVk&2~J)CrgxP(dyG5gR5bV$vYcQ(k-hqL-=Wh&osZ0q#(Cb$7EwyO(=DCe zAe8TMfH^3CqsB$;OJxtXxy3CAbw8#3c+%SLKCv|)7ytU${%S|2?amLt4mkv`Ii3lF3tJz ki2FywuImkf>-@j-{yun#v;N*!XHXD%y85}Sb4q9e0JbxdzyJUM literal 0 HcmV?d00001 diff --git a/gfx/sprites/swimmer_guy.png b/gfx/sprites/swimmer_guy.png new file mode 100644 index 0000000000000000000000000000000000000000..4c1818b2bca7bfc0c87e3694a1534a45f2a938f8 GIT binary patch literal 303 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(hr;B4q#jV;2hFOOl z1YGNrf>z(Uw^7PH++(5E1V5JQ_X0&-xtHD;E^#ZItn8A&;}kyeU{DmN|G$WBflZHF zYtM*%{+X|6^I+}9;5qYL3>D98a?a1~`S(=Q?RU-m1-+kGQeQcXten4~s^V+_qomZt z1Q~_j>luF+-pf0Yz1Ej)%C)u?XC^VeGjou9`p~{oy~a$z%t!Dr!%pQY_nh#y$@>G( z+_XH!df!etM&ZTdz*GA7lT9yX^^1qDzOwnk@#qEn4%OYsIM@10dDs5R+lQ~meii*X zwP|0`$?(wZ(6#4R8JTjg+pB-!tjzM6*QbcqCqFJpUbmZl%~N)5m48tufA97Lg@mW8 KpUXO@geCyl5{8%n literal 0 HcmV?d00001 diff --git a/gfx/sprites/teacher.png b/gfx/sprites/teacher.png new file mode 100644 index 0000000000000000000000000000000000000000..2107159e99739bef00783c9d6dafae19bd309580 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(Xr;B4q#jUCRws}m3 z0&e$D-Mr=UN$d&RN!2r2Uv4Iyl`P^}QgZtV7l+glO_?Pg9hWOs>drKr;PP;JLQ1W1 z-n@P8Tvih&h@U`H z4PElkVe+-54BL8RrdFR;yuLkSsX~Lw;lG#SMY?(`gX}N8U3t~={r)ee#jm7(>D*2K qJ2{{4|Lym?w(OhotgU3`;pFc(<(BM;J+o>S$k(2(elF{r5}E)R(SaEN literal 0 HcmV?d00001 diff --git a/gfx/sprites/twin.png b/gfx/sprites/twin.png new file mode 100644 index 0000000000000000000000000000000000000000..caa9f43af8e74cd2c8111b94a87934a4bd36ed11 GIT binary patch literal 254 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(ur;B4q#jUyhd$|r7 zh_w2@;(sJ0KG%BHYJP!qcg-JM`&wgTc4^#T*O==yZ&5(Or$nb`9ySY`m3}xo|M1ZJ zUU!H2JoEB7O*6l!o{93f)5t7y;Fd<3Z#HLin)(i-;1Aul>X$qY%57icD}3$1>)CBT z-Z7_ea~EurC@zcq`)R9zwG)RKx8u|WH;;6-T>i2%M=pRh{@}hSq3hgW1g;l JF6*2UngHTZX;}aO literal 0 HcmV?d00001 diff --git a/gfx/sprites/unused_guy.png b/gfx/sprites/unused_guy.png new file mode 100644 index 0000000000000000000000000000000000000000..d979b9a6ee319d2bba50f30440d0c02f818b4ecf GIT binary patch literal 250 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(mr;B4q#jU6347m;& zh_F3~&t_l#W?hqqzTm;LOJg5h@GLm3Imf0!qa%1>*sXFd@q^z?GTE0q)C5{puo?e3 z{9i6!ZjK9H;X54mNVE1Nwg^+KemTp2?dL!G3i!P~ri>EZm>Zs%h zdF^;`?#glL{3?Cj8^K!t^sX;2eJ{9CeCnOIZMD7${6OYp(MO_}JAnzy%i6zqv3^r_HV=-tr$jHW)*4F<={*R>HjsFkR c9V8f(7&_<6KVyF$Xa_Rc)78&qol`;+07mK}od5s; literal 0 HcmV?d00001 diff --git a/gfx/sprites/whitney.png b/gfx/sprites/whitney.png new file mode 100644 index 0000000000000000000000000000000000000000..ff8b28b987052bdd3d35d17acd998b284895ac31 GIT binary patch literal 298 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU`SwMU|?XV=GuCffq~(pr;B4q#jUyhhS`T4 zM2`QLV9K2qP{n?A<+j=JO0usKrUy?F-sQRQ{$akRw3koj-BA6Z$z-NbH>>;e!PnNR z-3k%;KMM0J?CbbboS1$(H(j-AitSUr@_s(o*Vl8Meom_v@Gow>A6mtKS=;GGruLz_ zj~{uhclJ8$ZDMsYFq1ykd46GB-_^jVQ%9QL^b3VV9XBw_ta)0bB{0RlmB#ViupGCp1Z}uAuFF9=l^eQrD36)ZTN}v`@>_QNBv6A zm7lz*vq&NJe)548cQRIdj4j_%dxGQZg43+d^Ow$BXfLOIRk>@u+i6fBc)I$ztaD0e F0st4hh9Up} literal 0 HcmV?d00001 diff --git a/gfx/sprites/will.png b/gfx/sprites/will.png new file mode 100644 index 0000000000000000000000000000000000000000..5229bb40497db22bdc5f2016da3dfdf154506491 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznU@%}}U|?V+UF;_$?|AwvUb%C;#8x0(T9;h zo%|tp^8;^I-yP;hJeptcR~PheyL0-Iw_Cua)e^fnA4u|U+8AvlaP2z3kjBY#>-RDi Wn5N9v*V@Jjae`1M zYAgO+WUf@;f3o)dlV0gch5St~_J&lHf84~m=#crmaGC28m%LZ6xF>pht*ZU0(~kYc zIqNpQK9x{pKZ~zE%Ie&-Qu8ItZcTYr@%hzW`LZcLum0Y&MX_(TCVPAY-{PM?3)$~f n{g1W^wCYOq@!RqgPTEAm+_hM3>!<3Voz5;mvv4FO#qW55tje} literal 0 HcmV?d00001 diff --git a/gfx/stats/mail.png b/gfx/stats/mail.png new file mode 100644 index 0000000000000000000000000000000000000000..53db461e5fc2ccf7f5c3a28036168cf6861755e3 GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@knwbJ45_%4oRE-kA?o0P ltqqPVn;o5*kFY7Ru`%esV3AIBaC#3?@9FC2vd$@?2>@zg7drp| literal 0 HcmV?d00001 diff --git a/gfx/stats/pages.pal b/gfx/stats/pages.pal new file mode 100644 index 0000000..837e10c --- /dev/null +++ b/gfx/stats/pages.pal @@ -0,0 +1,15 @@ +; pink + RGB 31, 31, 31 + RGB 31, 19, 31 + RGB 31, 15, 31 + RGB 00, 00, 00 +; green + RGB 31, 31, 31 + RGB 21, 31, 14 + RGB 17, 31, 00 + RGB 00, 00, 00 +; blue + RGB 31, 31, 31 + RGB 17, 31, 31 + RGB 17, 31, 31 + RGB 00, 00, 00 diff --git a/gfx/stats/party_menu_bg.pal b/gfx/stats/party_menu_bg.pal new file mode 100644 index 0000000..324109a --- /dev/null +++ b/gfx/stats/party_menu_bg.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 17, 19, 31 + RGB 14, 16, 31 + RGB 00, 00, 00 diff --git a/gfx/stats/party_menu_bg_mobile.pal b/gfx/stats/party_menu_bg_mobile.pal new file mode 100644 index 0000000..016eee5 --- /dev/null +++ b/gfx/stats/party_menu_bg_mobile.pal @@ -0,0 +1,4 @@ + RGB 31, 31, 31 + RGB 31, 19, 24 + RGB 30, 10, 06 + RGB 00, 00, 00 diff --git a/gfx/stats/party_menu_ob.pal b/gfx/stats/party_menu_ob.pal new file mode 100644 index 0000000..6acec53 --- /dev/null +++ b/gfx/stats/party_menu_ob.pal @@ -0,0 +1,39 @@ + RGB 27, 31, 27 + RGB 31, 19, 10 + RGB 31, 07, 04 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 31, 19, 10 + RGB 10, 14, 20 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 31, 19, 10 + RGB 31, 07, 04 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 31, 19, 10 + RGB 31, 07, 04 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 31, 19, 10 + RGB 31, 07, 04 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 31, 19, 10 + RGB 31, 07, 04 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 31, 19, 10 + RGB 31, 07, 04 + RGB 00, 00, 00 + + RGB 27, 31, 27 + RGB 31, 19, 10 + RGB 31, 07, 04 + RGB 00, 00, 00 diff --git a/gfx/stats/stats.pal b/gfx/stats/stats.pal new file mode 100644 index 0000000..5b12e02 --- /dev/null +++ b/gfx/stats/stats.pal @@ -0,0 +1,6 @@ +; pink + RGB 31, 19, 31 +; green + RGB 21, 31, 14 +; blue + RGB 17, 31, 31 diff --git a/gfx/stats/stats_tiles.png b/gfx/stats/stats_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..5da4a008e2d40db73c935528eae5d479bcd3f72b GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0y~yVCZ0AVBlb4U|?YIz4+lf0|UbZPZ!6Kid(Vg9k~uG z2(Vt@w>%J|dLj3q@{Z1un~T3>Ii0)}`d-naoO!?TF%^@h6=#x<@h{xOwoM?zo6&y9 zzI_vQ{_-Vm-F2_2WYV-=8+$>cNLjy4=k6u$5~`eT#<3;f{So;}73DMPD;@nOF-oSq zpA@~=w$Cx!>!P{K_x&NKmpJVd`nW{;qTO8g4E{HVEwt=2CvSiF$8X&?kQ+T+{an^L HB{Ts5+I>*J literal 0 HcmV?d00001 diff --git a/gfx/tileset_palette_maps.asm b/gfx/tileset_palette_maps.asm new file mode 100644 index 0000000..678eb18 --- /dev/null +++ b/gfx/tileset_palette_maps.asm @@ -0,0 +1,115 @@ +MACRO tilepal +; used in gfx/tilesets/*_palette_map.asm +; vram bank, pals + DEF x = \1 << OAM_TILE_BANK + rept (_NARG - 1) / 2 + dn (x | PAL_BG_\3), (x | PAL_BG_\2) + shift 2 + endr +ENDM + +TilesetKantoPalMap: +INCLUDE "gfx/tilesets/kanto_palette_map.asm" + +Tileset0PalMap: +TilesetJohtoPalMap: +INCLUDE "gfx/tilesets/johto_palette_map.asm" + +TilesetJohtoModernPalMap: +INCLUDE "gfx/tilesets/johto_modern_palette_map.asm" + +TilesetHousePalMap: +INCLUDE "gfx/tilesets/house_palette_map.asm" + +TilesetPlayersHousePalMap: +INCLUDE "gfx/tilesets/players_house_palette_map.asm" + +TilesetPokecenterPalMap: +INCLUDE "gfx/tilesets/pokecenter_palette_map.asm" + +TilesetGatePalMap: +INCLUDE "gfx/tilesets/gate_palette_map.asm" + +TilesetPortPalMap: +INCLUDE "gfx/tilesets/port_palette_map.asm" + +TilesetLabPalMap: +INCLUDE "gfx/tilesets/lab_palette_map.asm" + +TilesetFacilityPalMap: +INCLUDE "gfx/tilesets/facility_palette_map.asm" + +TilesetMartPalMap: +INCLUDE "gfx/tilesets/mart_palette_map.asm" + +TilesetMansionPalMap: +INCLUDE "gfx/tilesets/mansion_palette_map.asm" + +TilesetGameCornerPalMap: +INCLUDE "gfx/tilesets/game_corner_palette_map.asm" + +TilesetEliteFourRoomPalMap: +INCLUDE "gfx/tilesets/elite_four_room_palette_map.asm" + +TilesetTraditionalHousePalMap: +INCLUDE "gfx/tilesets/traditional_house_palette_map.asm" + +TilesetTowerPalMap: +INCLUDE "gfx/tilesets/tower_palette_map.asm" + +TilesetCavePalMap: +TilesetDarkCavePalMap: +INCLUDE "gfx/tilesets/cave_palette_map.asm" + +TilesetParkPalMap: +INCLUDE "gfx/tilesets/park_palette_map.asm" + +TilesetRuinsOfAlphPalMap: +TilesetBetaWordRoomPalMap: +TilesetHoOhWordRoomPalMap: +TilesetKabutoWordRoomPalMap: +TilesetOmanyteWordRoomPalMap: +TilesetAerodactylWordRoomPalMap: +INCLUDE "gfx/tilesets/ruins_of_alph_palette_map.asm" + +TilesetRadioTowerPalMap: +INCLUDE "gfx/tilesets/radio_tower_palette_map.asm" + +TilesetTrainStationPalMap: +INCLUDE "gfx/tilesets/train_station_palette_map.asm" + +TilesetUndergroundPalMap: +INCLUDE "gfx/tilesets/underground_palette_map.asm" + +TilesetChampionsRoomPalMap: +INCLUDE "gfx/tilesets/champions_room_palette_map.asm" + +TilesetLighthousePalMap: +INCLUDE "gfx/tilesets/lighthouse_palette_map.asm" + +TilesetPlayersRoomPalMap: +INCLUDE "gfx/tilesets/players_room_palette_map.asm" + +UnusedMuseumPalMap: ; unreferenced +INCLUDE "gfx/tilesets/unused_museum_palette_map.asm" + +TilesetIcePathPalMap: +INCLUDE "gfx/tilesets/ice_path_palette_map.asm" + +TilesetForestPalMap: +INCLUDE "gfx/tilesets/forest_palette_map.asm" + +TilesetPokeComCenterPalMap: +INCLUDE "gfx/tilesets/pokecom_center_palette_map.asm" + +TilesetBattleTowerInsidePalMap: +INCLUDE "gfx/tilesets/battle_tower_inside_palette_map.asm" + +TilesetBattleTowerOutsidePalMap: +INCLUDE "gfx/tilesets/battle_tower_outside_palette_map.asm" + +MapGroupPalettes: ; unreferenced +; entries correspond to MAPGROUP_* constants +rept NUM_MAP_GROUPS + db PAL_BG_ROOF +endr diff --git a/gfx/tilesets.asm b/gfx/tilesets.asm new file mode 100644 index 0000000..7fb6b57 --- /dev/null +++ b/gfx/tilesets.asm @@ -0,0 +1,337 @@ +MACRO tilecoll +; used in data/tilesets/*_collision.asm + db COLL_\1, COLL_\2, COLL_\3, COLL_\4 +ENDM + + +SECTION "Tileset Data 1", ROMX + +TilesetKantoGFX:: +INCBIN "gfx/tilesets/kanto.2bpp.lz" + +TilesetKantoMeta:: +INCBIN "data/tilesets/kanto_metatiles.bin" + +TilesetKantoColl:: +INCLUDE "data/tilesets/kanto_collision.asm" + +Tileset0GFX:: +TilesetJohtoGFX:: +INCBIN "gfx/tilesets/johto.2bpp.lz" + +Tileset0Meta:: +TilesetJohtoMeta:: +INCBIN "data/tilesets/johto_metatiles.bin" + +Tileset0Coll:: +TilesetJohtoColl:: +INCLUDE "data/tilesets/johto_collision.asm" + +TilesetIcePathGFX:: +INCBIN "gfx/tilesets/ice_path.2bpp.lz" + +TilesetIcePathMeta:: +INCBIN "data/tilesets/ice_path_metatiles.bin" + +TilesetIcePathColl:: +INCLUDE "data/tilesets/ice_path_collision.asm" + +TilesetPlayersRoomGFX:: +INCBIN "gfx/tilesets/players_room.2bpp.lz" + +TilesetPlayersRoomMeta:: +INCBIN "data/tilesets/players_room_metatiles.bin" + +TilesetPlayersRoomColl:: +INCLUDE "data/tilesets/players_room_collision.asm" + + +SECTION "Tileset Data 2", ROMX + +TilesetPokecenterGFX:: +INCBIN "gfx/tilesets/pokecenter.2bpp.lz" + +TilesetPokecenterMeta:: +INCBIN "data/tilesets/pokecenter_metatiles.bin" + +TilesetPokecenterColl:: +INCLUDE "data/tilesets/pokecenter_collision.asm" + +TilesetPortGFX:: +INCBIN "gfx/tilesets/port.2bpp.lz" + +TilesetPortMeta:: +INCBIN "data/tilesets/port_metatiles.bin" + +TilesetPortColl:: +INCLUDE "data/tilesets/port_collision.asm" + +TilesetPlayersHouseGFX:: +INCBIN "gfx/tilesets/players_house.2bpp.lz" + +TilesetPlayersHouseMeta:: +INCBIN "data/tilesets/players_house_metatiles.bin" + +TilesetPlayersHouseColl:: +INCLUDE "data/tilesets/players_house_collision.asm" + +TilesetMansionGFX:: +INCBIN "gfx/tilesets/mansion.2bpp.lz" + +TilesetMansionMeta:: +INCBIN "data/tilesets/mansion_metatiles.bin" + +TilesetMansionColl:: +INCLUDE "data/tilesets/mansion_collision.asm" + +TilesetCaveGFX:: +INCBIN "gfx/tilesets/cave.2bpp.lz" + +TilesetCaveMeta:: +TilesetDarkCaveMeta:: +INCBIN "data/tilesets/cave_metatiles.bin" + +TilesetCaveColl:: +TilesetDarkCaveColl:: +INCLUDE "data/tilesets/cave_collision.asm" + + +SECTION "Tileset Data 3", ROMX + +TilesetTowerGFX:: +INCBIN "gfx/tilesets/tower.2bpp.lz" + +TilesetTowerMeta:: +INCBIN "data/tilesets/tower_metatiles.bin" + +TilesetTowerColl:: +INCLUDE "data/tilesets/tower_collision.asm" + +TilesetLabGFX:: +INCBIN "gfx/tilesets/lab.2bpp.lz" + +TilesetLabMeta:: +INCBIN "data/tilesets/lab_metatiles.bin" + +TilesetLabColl:: +INCLUDE "data/tilesets/lab_collision.asm" + +TilesetMartGFX:: +INCBIN "gfx/tilesets/mart.2bpp.lz" + +TilesetMartMeta:: +INCBIN "data/tilesets/mart_metatiles.bin" + +TilesetMartColl:: +INCLUDE "data/tilesets/mart_collision.asm" + +TilesetGameCornerGFX:: +INCBIN "gfx/tilesets/game_corner.2bpp.lz" + +TilesetGameCornerMeta:: +INCBIN "data/tilesets/game_corner_metatiles.bin" + +TilesetGameCornerColl:: +INCLUDE "data/tilesets/game_corner_collision.asm" + +TilesetTrainStationGFX:: +INCBIN "gfx/tilesets/train_station.2bpp.lz" + +TilesetTrainStationMeta:: +INCBIN "data/tilesets/train_station_metatiles.bin" + +TilesetTrainStationColl:: +INCLUDE "data/tilesets/train_station_collision.asm" + +TilesetForestMeta:: +INCBIN "data/tilesets/forest_metatiles.bin" + + +SECTION "Tileset Data 4", ROMX + +TilesetEliteFourRoomGFX:: +INCBIN "gfx/tilesets/elite_four_room.2bpp.lz" + +TilesetEliteFourRoomMeta:: +INCBIN "data/tilesets/elite_four_room_metatiles.bin" + +TilesetEliteFourRoomColl:: +INCLUDE "data/tilesets/elite_four_room_collision.asm" + +TilesetParkGFX:: +INCBIN "gfx/tilesets/park.2bpp.lz" + +TilesetParkMeta:: +INCBIN "data/tilesets/park_metatiles.bin" + +TilesetParkColl:: +INCLUDE "data/tilesets/park_collision.asm" + +TilesetRadioTowerGFX:: +INCBIN "gfx/tilesets/radio_tower.2bpp.lz" + +TilesetRadioTowerMeta:: +INCBIN "data/tilesets/radio_tower_metatiles.bin" + +TilesetRadioTowerColl:: +INCLUDE "data/tilesets/radio_tower_collision.asm" + +TilesetUndergroundGFX:: +INCBIN "gfx/tilesets/underground.2bpp.lz" + +TilesetUndergroundMeta:: +INCBIN "data/tilesets/underground_metatiles.bin" + +TilesetUndergroundColl:: +INCLUDE "data/tilesets/underground_collision.asm" + +TilesetDarkCaveGFX:: +INCBIN "gfx/tilesets/dark_cave.2bpp.lz" + +UnusedTilesetJohtoMeta:: ; unreferenced +INCBIN "data/tilesets/unused_johto_metatiles.bin" + +UnusedTilesetJohtoColl:: ; unreferenced +INCLUDE "data/tilesets/unused_johto_collision.asm" + + +SECTION "Tileset Data 5", ROMX + +TilesetPokeComCenterGFX:: +INCBIN "gfx/tilesets/pokecom_center.2bpp.lz" + +TilesetPokeComCenterMeta:: +INCBIN "data/tilesets/pokecom_center_metatiles.bin" + +TilesetPokeComCenterColl:: +INCLUDE "data/tilesets/pokecom_center_collision.asm" + +TilesetBattleTowerInsideGFX:: +INCBIN "gfx/tilesets/battle_tower_inside.2bpp.lz" + +TilesetBattleTowerInsideMeta:: +INCBIN "data/tilesets/battle_tower_inside_metatiles.bin" + +TilesetBattleTowerInsideColl:: +INCLUDE "data/tilesets/battle_tower_inside_collision.asm" + +TilesetGateGFX:: +INCBIN "gfx/tilesets/gate.2bpp.lz" + +TilesetGateMeta:: +INCBIN "data/tilesets/gate_metatiles.bin" + +TilesetGateColl:: +INCLUDE "data/tilesets/gate_collision.asm" + +TilesetJohtoModernGFX:: +TilesetBattleTowerOutsideGFX:: +INCBIN "gfx/tilesets/johto_modern.2bpp.lz" + +TilesetJohtoModernMeta:: +INCBIN "data/tilesets/johto_modern_metatiles.bin" + +TilesetJohtoModernColl:: +INCLUDE "data/tilesets/johto_modern_collision.asm" + +TilesetTraditionalHouseGFX:: +INCBIN "gfx/tilesets/traditional_house.2bpp.lz" + +TilesetTraditionalHouseMeta:: +INCBIN "data/tilesets/traditional_house_metatiles.bin" + +TilesetTraditionalHouseColl:: +INCLUDE "data/tilesets/traditional_house_collision.asm" + + +SECTION "Tileset Data 6", ROMX + +TilesetForestGFX:: +INCBIN "gfx/tilesets/forest.2bpp.lz" + +TilesetChampionsRoomGFX:: +INCBIN "gfx/tilesets/champions_room.2bpp.lz" + +TilesetChampionsRoomMeta:: +INCBIN "data/tilesets/champions_room_metatiles.bin" + +TilesetChampionsRoomColl:: +INCLUDE "data/tilesets/champions_room_collision.asm" + +TilesetHouseGFX:: +INCBIN "gfx/tilesets/house.2bpp.lz" + +TilesetHouseMeta:: +INCBIN "data/tilesets/house_metatiles.bin" + +TilesetHouseColl:: +INCLUDE "data/tilesets/house_collision.asm" + +TilesetLighthouseGFX:: +INCBIN "gfx/tilesets/lighthouse.2bpp.lz" + +TilesetLighthouseMeta:: +INCBIN "data/tilesets/lighthouse_metatiles.bin" + +TilesetLighthouseColl:: +INCLUDE "data/tilesets/lighthouse_collision.asm" + +TilesetForestColl:: +INCLUDE "data/tilesets/forest_collision.asm" + +TilesetFacilityGFX:: +INCBIN "gfx/tilesets/facility.2bpp.lz" + +TilesetFacilityMeta:: +INCBIN "data/tilesets/facility_metatiles.bin" + +TilesetFacilityColl:: +INCLUDE "data/tilesets/facility_collision.asm" + +TilesetBattleTowerOutsideMeta:: +INCBIN "data/tilesets/battle_tower_outside_metatiles.bin" + +TilesetBattleTowerOutsideColl:: +INCLUDE "data/tilesets/battle_tower_outside_collision.asm" + +TilesetBetaWordRoomMeta:: +INCBIN "data/tilesets/beta_word_room_metatiles.bin" + +TilesetBetaWordRoomColl:: +TilesetHoOhWordRoomColl:: +TilesetKabutoWordRoomColl:: +TilesetOmanyteWordRoomColl:: +TilesetAerodactylWordRoomColl:: +INCLUDE "data/tilesets/beta_word_room_collision.asm" + + +SECTION "Tileset Data 7", ROMX + +TilesetRuinsOfAlphGFX:: +TilesetBetaWordRoomGFX:: +TilesetHoOhWordRoomGFX:: +TilesetKabutoWordRoomGFX:: +TilesetOmanyteWordRoomGFX:: +TilesetAerodactylWordRoomGFX:: +INCBIN "gfx/tilesets/ruins_of_alph.2bpp.lz" + +TilesetRuinsOfAlphMeta:: +INCBIN "data/tilesets/ruins_of_alph_metatiles.bin" + +TilesetRuinsOfAlphColl:: +INCLUDE "data/tilesets/ruins_of_alph_collision.asm" + + +SECTION "Tileset Data 8", ROMX + +TilesetHoOhWordRoomMeta:: +INCBIN "data/tilesets/ho_oh_word_room_metatiles.bin" + +TilesetKabutoWordRoomMeta:: +INCBIN "data/tilesets/kabuto_word_room_metatiles.bin" + +TilesetOmanyteWordRoomMeta:: +INCBIN "data/tilesets/omanyte_word_room_metatiles.bin" + +TilesetAerodactylWordRoomMeta:: +INCBIN "data/tilesets/aerodactyl_word_room_metatiles.bin" diff --git a/gfx/tilesets/aerodactyl_word_room.png b/gfx/tilesets/aerodactyl_word_room.png new file mode 100644 index 0000000000000000000000000000000000000000..7ae272358df4bf1f6a428757e87e694cb17bffbc GIT binary patch literal 1884 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq`Aw)5S5Q;#O+d`R>Oj zMC(3z$?iPKudUsf?)R>jH%@liy#qp@0vCY|1((!Rxd z^M)3gs>Gb6gAVDE(yJ#q6y5papfKB+@3Z<7gC~0mjh^Q`s#&j6srICFdi>SZ{{CNI z)qeHba$7J`pvtqa(}!_m)COaP$wkHNRoidZ7P9v;=I3mm?_d8-J(#h|=}11OlFgSq z_Q^a2m%rS5xVpa1pHWEh*nKVAKU>+pOgkO_Poc=}R`m~ihgp5Q4^Nh^=Fj(5(tMi# zt)arQ?!Ei{y{j44O>y1p@x?rgcmKb`Zo-Gc8yFrl0^~iblKkj{AfBCP8t#EpJ66;~3 z__a3=Yn^smt>bz4g29WNoi!?Qcg1byE~z{v_sPchbIm4>x?lO;l@fF3o-OvUIu-nF zLrltKn||@T*6~}Ww*R>Jw`St7a>+|>Rf9m>l=bCF9 zrg6_)a{tG}@PCUAr9}Fi(%@UVXVPMcy*BTq6X(C0F;jSL{KDF@JJb%^!^QC`S3;%p}omcF(Tl|&<_kV)} zo%0fSTj%I=om~II{5bymUuIC1ifK5nq@lushg(5 zsutTFM!}M2KUb-1GgQw=zkdDx&Ux#f-{iWN#sA*pXSG%IeBBDp+i#_BC(ZR&2@6qw zEv#7|=Q?q9@1)5w>kf2F2?)H@f6wfot*CbAO6EtMITBOfIr)8<#mZ2u>0YpN8}so= z{pY1DG7}E7JXd_YUuc7m`^qwxHi_>ZM;O+84i&w}&F_AAv9h6`Q@YO|mC0?VH4uWZtNs5;N=nB9}CStoz*4?HpR^>5a*S1V`eOgPW^wmHo~ zfcI;dgYFd1$q{>XG$hn#rOuoyEVW}cdp^^B{uBPZtWFiV-vK0Bv5 zEMxYY4Kk}w-R_6l8F1>W4PSVoXtERqZ#qEcc&h6@R=gZ7kvhlA_a?#hY#uf4374^2? zT<{`B*6e28!{5eSXZ!?s(hfT0XP)@4b0NCSW1elx-R9mk2YHTO+`yLRE}WL0He2?z z;UVE|)f*<-}AF!Ry@8CQ!rg*2iIc zR>5$_)CRrf+s__f%JQR=Lz$gnUqP+BLQLPsD}fDazY>)eJ-ec~aJ$IXE5XSP2b%-# zE~yAD*7A^xd)UU{sQ**Tl7Zc%vh=8F@6QRIOuw6hz9>i-u`fzk;WKel(9D{DmMeFe z+Iz(XY%4t2?mPdhZTPf1D}Ee&+{JIfdLdT!?}d(^?-J@h?0Cf7J5??BjquOlBL!S~ zA9j3Uu)8u#_{v7v{mISJ62hB1{Ta8MtjfCmY>J6}N?w9b4D%0>9s91Q+&%Pf`=6i+ zpBUyD{1?o!=W%?U#$R`)tyl6Jqv?T9A-WqPKDY48HOL!xn{@ABJHflHvLJ86u_LS% z2|t=|I=nJp`l$Jo!o9On!u#G&WE7H~6PlEy;jnb3N?nR{qWB#H$pe$q*0c0lcd01( z^?2l4F1opzA%ywFK@}4z;ZEBXtn<>JI+_1iqV;1n*IS`G9Uni6@PtZoOp)tK&_8S| zpH(@NN1tuW`TdWM&f`zJ8y?@JHCfJl?W3l3ewN=w>qBb|yv{xjRti=3o4aD~bLZ>p zw0MnAb3W$FV!nP`yoRCr+tp(n$1k5S+<8yvdh;ay2S<EVGL4KR(JZAY5;%9@| zqdqu3D_PB)TNZL?g0G%!hutPwv!?#GSx& L^>bP0l+XkKdaH#z literal 0 HcmV?d00001 diff --git a/gfx/tilesets/aerodactyl_word_room_palette_map.asm b/gfx/tilesets/aerodactyl_word_room_palette_map.asm new file mode 100644 index 0000000..5ebde24 --- /dev/null +++ b/gfx/tilesets/aerodactyl_word_room_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, WATER, WATER, WATER, WATER, YELLOW, YELLOW, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, BROWN, BROWN, YELLOW, YELLOW, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, RED, RED, RED, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, RED, RED, RED, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + +rept 16 + db $ff +endr + + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN diff --git a/gfx/tilesets/battle_tower_inside.pal b/gfx/tilesets/battle_tower_inside.pal new file mode 100644 index 0000000..4e71a55 --- /dev/null +++ b/gfx/tilesets/battle_tower_inside.pal @@ -0,0 +1,40 @@ +; gray + RGB 30, 28, 26 + RGB 19, 19, 19 + RGB 13, 13, 13 + RGB 07, 07, 07 +; red + RGB 30, 28, 26 + RGB 31, 19, 24 + RGB 30, 10, 06 + RGB 07, 07, 07 +; green + RGB 18, 24, 09 + RGB 15, 20, 01 + RGB 09, 13, 00 + RGB 07, 07, 07 +; water (blue) + RGB 30, 28, 26 + RGB 15, 16, 31 + RGB 09, 09, 31 + RGB 07, 07, 07 +; yellow + RGB 30, 28, 26 + RGB 31, 31, 07 + RGB 31, 16, 01 + RGB 07, 07, 07 +; brown + RGB 26, 24, 17 + RGB 21, 17, 07 + RGB 16, 13, 03 + RGB 07, 07, 07 +; roof + RGB 05, 05, 16 + RGB 08, 19, 28 + RGB 00, 00, 00 + RGB 31, 31, 31 +; text + RGB 31, 31, 16 + RGB 31, 31, 16 + RGB 14, 09, 00 + RGB 00, 00, 00 diff --git a/gfx/tilesets/battle_tower_inside.png b/gfx/tilesets/battle_tower_inside.png new file mode 100644 index 0000000000000000000000000000000000000000..cf9e12d53aeba9f464d07f9d55a4f0206e8ce7b6 GIT binary patch literal 1004 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq{9mr;B4q#jUqj9J8g} zMHn84D=+QR$Pg`S-ZaHc>EMb*N7ubPX}X4a(F%d4sBe<1CTF&CzT-c!v^^nb(qShZ zDNb$mscV|Q%nESQvz?-~T*yg4^}Ex$iwi?#f_-*f{jyimvn)HK-odo#u4PTt=X+;n zvo4+G`{1F%F9sLp29bta=NTfZ)?GO@Yk5ct;}ILzFD)r{ecPe$aRN7Gs`h?<`km7zb*|#BrHw8pLdsTW z&VIqn)|W4?+H^1Wxca2tQ)|js8P(5T5%c}^zE+9Z4VC_`>YdwC^{ij~kZC^Mqd#9` zHpk-47amwfyjZNiGi7Z=4wH(^`P(zI)tq0dIlAmxP6r)Tbe(vR0O+qC{@ zS}bt2R^`ii&8_=CXy@*_Hb*9sBewLrS-S6*CaEPqR>UW5d=eGAw9WA5tH%mVCw5O~ z*`v>3xz|~tF+O(huP-@q4*RT_CN;BZB&@$#ll7is#@7FwR*?-yPTy~z?l+y~iCI76 z$wc`FYg3#YwjC8!J{8CDV5Q$D|0C;Tn4Mmf3tSC2V7c{mzm%F%k-mr7Oo0rhpjGD- z4&GhE##@xlWcSN@!tSXR=N=d~FKYM_Xpnxul&x~n=H;w8VeSjOO;Q@tIy2g%-!E$D zHf!F!{dj|0!g`k}=QuS)`x#e0@@#sM66H`RT~R&3s@?KTvHq?(9oY=(o<*@cmRIBm z);yo1*hN0Jz5m$)U2}A^u%2eg_ZX{%kswQ&fvHd&$Fq# zgX>T6%Y)0Kr~9&0ewie7z{kwQ{P3*GfK##0xQ{p+y{cVS%usM!t;zKBhmSw!-P}^A zQGJ2?EBlq5tO^Vd9^Uh13tH6hd#!szP36U?XW0>}ukPqN5pBbA_iCMoF55fNMdr;4 z2@9?~s^Dz68~RU0{)EsaHFF_zhIPx?&aY7B{9M0schmw-kL#CA_kG!O^;gWIx{iwd zPZzL#;-9=k=9=PxO>Ai#1vQp=ansxFGA>x2a1Z`_n&GQ_GS{*M5cx)rtTB literal 0 HcmV?d00001 diff --git a/gfx/tilesets/battle_tower_inside_palette_map.asm b/gfx/tilesets/battle_tower_inside_palette_map.asm new file mode 100644 index 0000000..1abce2a --- /dev/null +++ b/gfx/tilesets/battle_tower_inside_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, RED, WATER, WATER, GRAY, GRAY, WATER, WATER + tilepal 0, WATER, WATER, WATER, WATER, WATER, WATER, BROWN, BROWN + tilepal 0, WATER, RED, WATER, WATER, GRAY, GRAY, WATER, WATER + tilepal 0, WATER, WATER, WATER, WATER, WATER, WATER, BROWN, BROWN + tilepal 0, WATER, RED, RED, RED, RED, WATER, GRAY, GRAY + tilepal 0, WATER, WATER, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 0, WATER, RED, RED, RED, RED, WATER, GRAY, WATER + tilepal 0, GRAY, GRAY, BROWN, RED, BROWN, BROWN, BROWN, BROWN + tilepal 0, RED, BROWN, RED, BROWN, BROWN, BROWN, RED, RED + tilepal 0, WATER, WATER, WATER, RED, RED, RED, RED, WATER + tilepal 0, BROWN, YELLOW, RED, BROWN, BROWN, BROWN, RED, RED + tilepal 0, WATER, RED, RED, RED, RED, GRAY, RED, WATER + +rept 16 + db $ff +endr + + tilepal 1, GRAY, WATER, GRAY, WATER, WATER, WATER, ROOF, ROOF + tilepal 1, YELLOW, YELLOW, GRAY, GRAY, WATER, WATER, RED, RED + tilepal 1, GRAY, RED, RED, WATER, WATER, WATER, WATER, WATER + tilepal 1, RED, GRAY, GRAY, GRAY, GREEN, YELLOW, RED, RED + tilepal 1, GRAY, GRAY, RED, RED, WATER, WATER, GRAY, GRAY + tilepal 1, YELLOW, YELLOW, BROWN, YELLOW, WATER, WATER, YELLOW, RED + tilepal 1, GRAY, GRAY, RED, RED, GRAY, WATER, WATER, WATER + tilepal 1, GRAY, GRAY, BROWN, YELLOW, RED, RED, YELLOW, RED + tilepal 1, GRAY, GRAY, RED, RED, RED, RED, WATER, WATER + tilepal 1, GRAY, GRAY, YELLOW, BROWN, WATER, WATER, GRAY, BROWN + tilepal 1, RED, RED, RED, RED, RED, RED, GRAY, GRAY + tilepal 1, YELLOW, YELLOW, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY diff --git a/gfx/tilesets/battle_tower_outside.png b/gfx/tilesets/battle_tower_outside.png new file mode 100644 index 0000000000000000000000000000000000000000..1c080ff458ccb40151635d074c326b959e9b4448 GIT binary patch literal 2324 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq~<;r;B4q#jV(B^#Q@* zV#obC1YM>HDC*rU^FI1u$`a=dKh=Y0s3b6Xl?qQP?@o%%W!L2PD^K6H``^QoKY?$z z-O63E;_{Nq>+Z7kd@o&a+kTZ$y6{u?*q%o>E=HCw>(0H}7~tGs6xFe_`dxKk%zNo~ zdlct?w|zdZ`rJ-&3F+O^T&-q?VqC^DBJOeKea@eFWD?%^eSh)d?T?hMu7<~j4^)!l zbMI_a-ZHs$Wrvb+Kl9xwakqc$e!S8%Z_)nyCZ8-WxSrVd`1*e_Cv}%BqnT5>Ir*+T zC+rbvydQU4X#d$DrO;Vd)EZd*1v+jr{ITABE3#wuhFLzZg4S(FWIWJ%x2ymAGBx!` zpDn9=|NdVt@bLYqt&W#G?kr}rfSl>yJsgY zW_z^n@8R1Yw_I4AFT7~w|MiWY&Fy?w|H=J&d~j~&gSkFVT+@H?GF)5b;u6--b7e!d z5$}|nQk_bhPd<=5bJXF4-GrXto9j-QOt|agu`Jhlclw2pK*MIWpqPj3a|33xeJjgV z|Evcwr>-BuO@Y&e{O^BO6jv|4u30`E=@<`C?l`dO!S$h&pd%*EeI4r?tfS z8paRZkA8kw<1aX`|HmpViwDQ{My;IJ8D=4HgKNW!uN8mNJ{Q>J#josM)ET+G*C8{{ zRnMYK@_Y#26u1r{cjO+U4!@F=)1uH4r7%RaW~vj67qFV`J$ zF|dwgN?7I9Yaje-`Ig@{4vu}kZ?sQ_XLfRbk!!op&-Ph0!Q9~(gW}v(sq=f*Z{#pF?i?cg$uM^zXR#q&{$Mfb-wz%CuX>?=CO0XL$D9u0e=zMp4y@ z-1B>L!Y!|`=sq)Abw7HGY{P_d32n&*TZ*4J&0g;)Z2e&shgp{4_qhusUDw`WVQ1s~ zDDhaL{ndJcB>L)mLgkNhaUY<2+6C z({8CZo3P%!D`woVYuAdY=|?BmKCi>`H-{+svd zqkkS#PfSe7C%3{YebLidb9KdvB^GhiY@NMLGDBm*2HtB=V|IuBN&TmH>|OKud_(E; z-(Gh`&33GRlzB_I;QjyWzwZCwyKeq|CBuozgYNnpV|EM4@q}#UElWi z)vjliUiX>rb9V1EC_EQ;WtV71!NqH-dgl|aTzvRC;?5$Y+rIirsyx-RbAsBx{8wKj6` z>AbTl3{ls0B+Jy+NHmy>J`8PH!yMb|>guue+|^YIKE5&etJ>x&EBE~6F`qZ3kw=7K zHs2;=Sp)SOEt-4`cYZuAkJOg1?q}cgZ)8e@iYnhel+rnpb3ym% z?VRf$UtX%)eYW_S*Tz%FBED`~E9IG3$@cw3TDoVe+WG)y{d&9GGhU_UB&;>xG-rb8 zhDC1OYOB~g7-s5Myt%OAiLcOsg&WmmT1*<=ahV5(pGe;k4av(^;NpSxq@@*^vGI_^C`b@@O< zQ~9-&1rwN)=JWih-g}JWlTbm~R-?eFs|74B2v2TYw&8k5>+xqR=c}@F75x@IsmI9? z%sC?~$uC*Ur_j^DP|URO0S8mzEHCESL2=1it~(DMiKyRi#QUYQco9#|%yOxlGVFXs z>Q`SdvnTD{7{{`#&i`;BOOnioO-n>NQhJI~X7q&|3gJ(!fWf9P_zl3U;@*xe6}hxO=QIlBZPoU0=Gud~TM;t?w42~tr6p#cIGE0?q$_I*{IqcrrzVR}L%H^E`8%{aQOwhJMlV{X4TzXKB;fHB>X7|N_IR~cgee>{!b+>pk@1!O>iHyTjtb7*~ zCNa*~p~V=(sF1*{bx&zQQa_KTMylw}Mh-douw}<9oDQ$6zO&)uK4nJqX%1y zg>?@+N-bggK6ldB`%nHyJyrAOtJ}};gTIKi>+T`1lU;lM>Db86xtGaufrTm8dc%8# z1JNp~^8Zr*)*JOtc~-Gp{?~^~?#KJ(o-*wJGn z*`s{snsFZ#(~{SJZ1QG4J^zBv!OQz%qgtOh_Z+iZ^rc>e+b=Nn%CbUGbH~%w&t;uc GLK6U+C|HXC literal 0 HcmV?d00001 diff --git a/gfx/tilesets/battle_tower_outside_palette_map.asm b/gfx/tilesets/battle_tower_outside_palette_map.asm new file mode 100644 index 0000000..dfc74a9 --- /dev/null +++ b/gfx/tilesets/battle_tower_outside_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, BROWN, BROWN, RED, GREEN, GREEN, GRAY, RED + tilepal 0, RED, RED, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF + tilepal 0, ROOF, ROOF, ROOF, GREEN, WATER, GREEN, BROWN, BROWN + tilepal 0, RED, RED, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN + tilepal 0, BROWN, BROWN, BROWN, RED, RED, BROWN, YELLOW, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GREEN, BROWN + tilepal 0, BROWN, BROWN, WATER, WATER, BROWN, BROWN, BROWN, YELLOW + tilepal 0, YELLOW, BROWN, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN + tilepal 0, RED, BROWN, WATER, WATER, BROWN, GREEN, BROWN, BROWN + tilepal 0, BROWN, WATER, GRAY, BROWN, BROWN, BROWN, GRAY, GRAY + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, WATER, GRAY, GRAY, GRAY, BROWN, BROWN, GRAY, GRAY + +rept 16 + db $ff +endr + + tilepal 1, RED, WATER, WATER, ROOF, ROOF, ROOF, ROOF, ROOF + tilepal 1, RED, RED, RED, ROOF, RED, WATER, WATER, WATER + tilepal 1, WATER, WATER, WATER, ROOF, ROOF, ROOF, ROOF, ROOF + tilepal 1, ROOF, ROOF, ROOF, ROOF, ROOF, RED, RED, RED + tilepal 1, RED, ROOF, ROOF, ROOF, ROOF, ROOF, RED, RED + tilepal 1, RED, RED, RED, RED, RED, RED, RED, RED + tilepal 1, RED, RED, RED, RED, RED, YELLOW, YELLOW, YELLOW + tilepal 1, YELLOW, RED, RED, RED, WATER, WATER, WATER, RED + tilepal 1, RED, RED, ROOF, RED, RED, ROOF, RED, RED + tilepal 1, RED, ROOF, ROOF, RED, RED, RED, ROOF, ROOF + tilepal 1, RED, RED, RED, RED, YELLOW, RED, GREEN, RED + tilepal 1, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, RED, ROOF diff --git a/gfx/tilesets/beta_word_room.png b/gfx/tilesets/beta_word_room.png new file mode 100644 index 0000000000000000000000000000000000000000..7ae272358df4bf1f6a428757e87e694cb17bffbc GIT binary patch literal 1884 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq`Aw)5S5Q;#O+d`R>Oj zMC(3z$?iPKudUsf?)R>jH%@liy#qp@0vCY|1((!Rxd z^M)3gs>Gb6gAVDE(yJ#q6y5papfKB+@3Z<7gC~0mjh^Q`s#&j6srICFdi>SZ{{CNI z)qeHba$7J`pvtqa(}!_m)COaP$wkHNRoidZ7P9v;=I3mm?_d8-J(#h|=}11OlFgSq z_Q^a2m%rS5xVpa1pHWEh*nKVAKU>+pOgkO_Poc=}R`m~ihgp5Q4^Nh^=Fj(5(tMi# zt)arQ?!Ei{y{j44O>y1p@x?rgcmKb`Zo-Gc8yFrl0^~iblKkj{AfBCP8t#EpJ66;~3 z__a3=Yn^smt>bz4g29WNoi!?Qcg1byE~z{v_sPchbIm4>x?lO;l@fF3o-OvUIu-nF zLrltKn||@T*6~}Ww*R>Jw`St7a>+|>Rf9m>l=bCF9 zrg6_)a{tG}@PCUAr9}Fi(%@UVXVPMcy*BTq6X(C0F;jSL{KDF@JJb%^!^QC`S3;%p}omcF(Tl|&<_kV)} zo%0fSTj%I=om~II{5bymUuIC1ifK5nq@lushg(5 zsutTFM!}M2KUb-1GgQw=zkdDx&Ux#f-{iWN#sA*pXSG%IeBBDp+i#_BC(ZR&2@6qw zEv#7|=Q?q9@1)5w>kf2F2?)H@f6wfot*CbAO6EtMITBOfIr)8<#mZ2u>0YpN8}so= z{pY1DG7}E7JXd_YUuc7m`^qwxHi_>ZM;O+84i&w}&F_AAv9h6`Q@YO|mC0?VH4uWZtNs5;N=nB9}CStoz*4?HpR^>5a*S1V`eOgPW^wmHo~ zfcI;dgYFd1$q{>XG$hn#rOuoyEVW}cdp^^B{uBPZtWFiV-vK0Bv5 zEMxYY4Kk}w-R_6l8F1>W4PSVoXtERqZ#qEcc&h6@R=gZ7kvhlA_a?#hY#uf4374^2? zT<{`B*6e28!{5eSXZ!?s(hfT0XP)@4b0NCSW1elx-R9mk2YHTO+`yLRE}WL0He2?z z;UVE|)f*<-}AF!Ry@8CQ!rg*2iIc zR>5$_)CRrf+s__f%JQR=Lz$gnUqP+BLQLPsD}fDazY>)eJ-ec~aJ$IXE5XSP2b%-# zE~yAD*7A^xd)UU{sQ**Tl7Zc%vh=8F@6QRIOuw6hz9>i-u`fzk;WKel(9D{DmMeFe z+Iz(XY%4t2?mPdhZTPf1D}Ee&+{JIfdLdT!?}d(^?-J@h?0Cf7J5??BjquOlBL!S~ zA9j3Uu)8u#_{v7v{mISJ62hB1{Ta8MtjfCmY>J6}N?w9b4D%0>9s91Q+&%Pf`=6i+ zpBUyD{1?o!=W%?U#$R`)tyl6Jqv?T9A-WqPKDY48HOL!xn{@ABJHflHvLJ86u_LS% z2|t=|I=nJp`l$Jo!o9On!u#G&WE7H~6PlEy;jnb3N?nR{qWB#H$pe$q*0c0lcd01( z^?2l4F1opzA%ywFK@}4z;ZEBXtn<>JI+_1iqV;1n*IS`G9Uni6@PtZoOp)tK&_8S| zpH(@NN1tuW`TdWM&f`zJ8y?@JHCfJl?W3l3ewN=w>qBb|yv{xjRti=3o4aD~bLZ>p zw0MnAb3W$FV!nP`yoRCr+tp(n$1k5S+<8yvdh;ay2S<EVGL4KR(JZAY5;%9@| zqdqu3D_PB)TNZL?g0G%!hutPwv!?#GSx& L^>bP0l+XkKdaH#z literal 0 HcmV?d00001 diff --git a/gfx/tilesets/beta_word_room_palette_map.asm b/gfx/tilesets/beta_word_room_palette_map.asm new file mode 100644 index 0000000..5ebde24 --- /dev/null +++ b/gfx/tilesets/beta_word_room_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, WATER, WATER, WATER, WATER, YELLOW, YELLOW, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, BROWN, BROWN, YELLOW, YELLOW, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, RED, RED, RED, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, RED, RED, RED, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + +rept 16 + db $ff +endr + + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN diff --git a/gfx/tilesets/bg_tiles.pal b/gfx/tilesets/bg_tiles.pal new file mode 100644 index 0000000..3605e21 --- /dev/null +++ b/gfx/tilesets/bg_tiles.pal @@ -0,0 +1,53 @@ +; morn + RGB 28,31,16, 21,21,21, 13,13,13, 07,07,07 ; gray + RGB 28,31,16, 31,19,24, 30,10,06, 07,07,07 ; red + RGB 22,31,10, 12,25,01, 05,14,00, 07,07,07 ; green + RGB 31,31,31, 08,12,31, 01,04,31, 07,07,07 ; water + RGB 28,31,16, 31,31,07, 31,16,01, 07,07,07 ; yellow + RGB 28,31,16, 24,18,07, 20,15,03, 07,07,07 ; brown + RGB 28,31,16, 15,31,31, 05,17,31, 07,07,07 ; roof + RGB 31,31,16, 31,31,16, 14,09,00, 00,00,00 ; text + +; day + RGB 27,31,27, 21,21,21, 13,13,13, 07,07,07 ; gray + RGB 27,31,27, 31,19,24, 30,10,06, 07,07,07 ; red + RGB 22,31,10, 12,25,01, 05,14,00, 07,07,07 ; green + RGB 31,31,31, 08,12,31, 01,04,31, 07,07,07 ; water + RGB 27,31,27, 31,31,07, 31,16,01, 07,07,07 ; yellow + RGB 27,31,27, 24,18,07, 20,15,03, 07,07,07 ; brown + RGB 27,31,27, 15,31,31, 05,17,31, 07,07,07 ; roof + RGB 31,31,16, 31,31,16, 14,09,00, 00,00,00 ; text + +; nite + RGB 15,14,24, 11,11,19, 07,07,12, 00,00,00 ; gray + RGB 15,14,24, 14,07,17, 13,00,08, 00,00,00 ; red + RGB 15,14,24, 08,13,19, 00,11,13, 00,00,00 ; green + RGB 15,14,24, 05,05,17, 03,03,10, 00,00,00 ; water + RGB 30,30,11, 16,14,18, 16,14,10, 00,00,00 ; yellow + RGB 15,14,24, 12,09,15, 08,04,05, 00,00,00 ; brown + RGB 15,14,24, 13,12,23, 11,09,20, 00,00,00 ; roof + RGB 31,31,16, 31,31,16, 14,09,00, 00,00,00 ; text + +; dark + RGB 01,01,02, 00,00,00, 00,00,00, 00,00,00 ; gray + RGB 01,01,02, 00,00,00, 00,00,00, 00,00,00 ; red + RGB 01,01,02, 00,00,00, 00,00,00, 00,00,00 ; green + RGB 01,01,02, 00,00,00, 00,00,00, 00,00,00 ; water + RGB 30,30,11, 00,00,00, 00,00,00, 00,00,00 ; yellow + RGB 01,01,02, 00,00,00, 00,00,00, 00,00,00 ; brown + RGB 01,01,02, 00,00,00, 00,00,00, 00,00,00 ; roof + RGB 31,31,16, 31,31,16, 14,09,00, 00,00,00 ; text + +; indoor + RGB 30,28,26, 19,19,19, 13,13,13, 07,07,07 ; gray + RGB 30,28,26, 31,19,24, 30,10,06, 07,07,07 ; red + RGB 18,24,09, 15,20,01, 09,13,00, 07,07,07 ; green + RGB 30,28,26, 15,16,31, 09,09,31, 07,07,07 ; water + RGB 30,28,26, 31,31,07, 31,16,01, 07,07,07 ; yellow + RGB 26,24,17, 21,17,07, 16,13,03, 07,07,07 ; brown + RGB 30,28,26, 17,19,31, 14,16,31, 07,07,07 ; roof + RGB 31,31,16, 31,31,16, 14,09,00, 00,00,00 ; text + +; overworld water + RGB 23,23,31, 18,19,31, 13,12,31, 07,07,07 ; morn/day + RGB 15,13,27, 10,09,20, 04,03,18, 00,00,00 ; nite diff --git a/gfx/tilesets/cave.png b/gfx/tilesets/cave.png new file mode 100644 index 0000000000000000000000000000000000000000..fe15a740e6ced24010b6b5e84c16444fe7ca787f GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU@%}}U|?X_rf+(ffr0s)r;B4q#jUrK<9(t- zWscYH6}e`wwf9C+TiRhG?M7CqZwj29Th8i=#B39_RNznRO;o7;l=^w$qyvY}n6Nkn zmFBvIFT8u}u+tL$OW$-fJ;jZ;`}v9}>wAl?$z+1J?mswDv+8encJL1Fj4ZppttX6V8dLgi_C(5nyQh?w_j@*Yo?L(|Bcoy(F>|>nY zdqn=5-J4W~gLkLM?W@+jwr}13n?~)0hd$rwziKFz|Fgy`BISUV8N&+oJiY&#`wG4s zwrml4{_9U)s?=L~)(r*+q&G0xmHELlMbS3wIvTvwsyiNE z`(CwZ(ZqCy`q}%RT6-qVH}z3DyxhW}O8R6&BXi4ylHIp+Gg7!E115xW+*F&mZJ)w! z6|pA9cDSlLy{q)97nbHx-}f+?=>%)|;%BZ~ zZs?t6Jz2-Pkde>hRmVl;E|~=>30^yz&TX&v?z}57aml_^ulM>_e!k83n6&)P;RTr& zTH2!7r%sCEdZf_DxWz?fYPfpW*$tC&d?#DSN?w>*R-HFfI@w$MahGGf%9c<&)$f^>4vW~9q#8!h|9dan?2DtZ1?(;uQWSn zs9as3Iqkn@!HoNAbKA~cIlXpewZT&>)tnuEp_)r~_X7c2D-VIc#L} z^Xb*S>m5R7vo6!x)@|_KX6EL$nfEfqX3t+!zErMZSCqOz=-M<5L&M@c^HPp>U)j(* zD~{VV`@X&4w^FuBerfd{_V-(Bbv@s`-Wm8*Eq%edXL`b$-|63DwpJC}nXvUk(f=O| z1tszex^=^Tc$axGO^N6fH07UK%hA*zD&TdeCeFO$X0fLRBh%6tCdFUt8D}3BZRpPb x7oPAji1ooAN7jUz)l3FO3z-~V{%7dk&**dPh{5#A>EWOp?&<31vd$@?2>_H+=Slzo literal 0 HcmV?d00001 diff --git a/gfx/tilesets/cave_palette_map.asm b/gfx/tilesets/cave_palette_map.asm new file mode 100644 index 0000000..73c09eb --- /dev/null +++ b/gfx/tilesets/cave_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, BROWN, BROWN, GRAY, GRAY, GREEN, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, GRAY, GRAY, WATER, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, YELLOW, YELLOW, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY + tilepal 0, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY + tilepal 0, WATER, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + +rept 16 + db $ff +endr + + tilepal 1, BROWN, BROWN, GRAY, GRAY, GREEN, BROWN, BROWN, BROWN + tilepal 1, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, GRAY, GRAY, WATER, BROWN, BROWN, BROWN + tilepal 1, GRAY, GRAY, YELLOW, YELLOW, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY + tilepal 1, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY + tilepal 1, WATER, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY diff --git a/gfx/tilesets/champions_room.png b/gfx/tilesets/champions_room.png new file mode 100644 index 0000000000000000000000000000000000000000..e32c2fb28e249de6518c0c9ef779ba344c4be2b2 GIT binary patch literal 2267 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq`R@r;B4q#jVh3^*O=U zMUS7~{8vFmbK6YW88bg|&uF^Iu{7h<9gR9q8MojoH=f0oPxyP$OV#=2maPALAwp~# zCj%6Z&Xdww>-T6$-SL^hYbT$2v(>C4Q`&iP?8_y853=aG9ZB+Io5`j2qA4#tB5vwJoKTKk< z3GdzbEatsz7enXVP8&v*jbUmIVS2Nqq|4tmoW0GT(Ju6}A|+bVfe99TQl6Up44_oeu;Yz z@86(X#wJ&SYX45+4%}<`;Kxx41p?)8;Ab5<(yF8c9x_6tCTJR7gHnar2H}g3o{M zm}4OFLaF1anEbE62ixjgzBJZ7>EA8vrAnsCpZ{3xNO_``^}_) z6MO&Vp(B4=0L1wG;hFevJiDvUR%Kr6A@?rE^o%Oz`?4${I zV-07*(Ho9#$Ny!uCm;XxcB+x4z!|%U2EJud4Oi#HGDsfS|I*jrUsaQ%=$Lk(p;W`q ze^+&Gu=`9&=?~&$DsWo#xqd3+QHC;|%GC$Iz2cr$Rk-?SbJ=O>eT~t(?*s(0t>I?L zxslVTSL8m^M8CG~)T_Xt@0(K(=!ZMkhA%i27M9Vo-BH{0&5;R=TbQ;Sy562>q@A@O zXVSHDPJ=A2^-j<4-hFR+?Qsal!cPZ8^ml5et`OY7QSqy>ggd;pV)45!{^}$tx8-~( zU2GTJcv(I^<6ph(?$rNhuKqnI_I#Fg?Tn2#YmA?7KXu@V^Y88ZEI(a}*ztSoK~KA@ zv9s)V*gMYVjF7n8csc%~yi581509JI)!)4T^wzGDs>ix#xE&6geJhfP`%}K~Tk-D~ zH(t!L`&puSDR77GZ{eeCS87zD-{ZSS*Dn{2Q_VA6&)>iFvSDw%PsN7a zIkQhX*W{d$OWY@v|Ja7-Z0n)ic}utSw4d&gCCQK{R-_yX@=Ei9bVHz85tPQi8{=C^ui(hxRJpQrj7}^ zOj=7Peq9$AE^(=ay$mf=5np(KupHgCF4{!13g6kOnD-R_ilaF!`|hj^sM;dINj z7jq_l7D{dWCtOf@zbTZx=+Pl%CMWs&Ih9N*U1uM1&wUiBs?k=@0k(e|{Tyu7uk# zy76boy-`y5|D%%8qpoo0qJ4An=e+oJvWMM$cYC&x_j&QhryDXG4qfnM*et(w=`qe3 zwJ#i*oEnV;?t7WOQB&CbME9-=!(*!j+on7FxU9(9HF1f2_0PEvHUwUF6qwpjXk@u& zMf4Jdbt@~kxHQz?Sh?MG!o9@;cORRa)%Dxv8v1d)>CgT>o1ffUYVXE)=dshu(ogr7~b?)e=jS_-C&%Z^}NgFz01POEG7(hx&;KzE2=$T`RG}1 z)`Hlxwr>~;SXN%vFJ8yY`H#iIIoeNh#@YU!7Yx0e3d*k%o9@k7n#X)XLfvO;UdvxVjpasWA8}lB! z3AFuJoz`-+OU32!n=T{1md8r^6O_I*GI@kfIbeEjZfZccga1L{Da>=#raW{CQMG7y zcqA<2mp>t$bDf85!^~Jk4{^~<;{yRtK3zUzZ(n|~wA|Ry@p_MIPu=^po2G4FRAP>o zUMPLZt#N6oM6HvqQN!^SzKQ9TsUd8PL3g&ieU~*M-YzQHUNq^Igy|=<@5=?fId+Jz za;mra*QKo_#_1#}`{ojjnzE%x=KG*eu=KAyZ%-Q{K$4SH5^H zsk77lxkBcx@*xe53! ze?87fGXCz(+h*#st2=4d-{0$g3#ToKG6;3NWZn^xP(S6`&|M1 z$<)hh9OfQ0X?T-AaqT*W-$fU_w(|V*zW#UFv>$~N7PCn_|COiFmgMdy_+s{#&Vukc z=b!LDoKv;#=8@7*AMdW2abl-H?rTQxCFftBe)V(PLf%giw?!ve)UHhaw5+5ym@4Ohp#b2u$?RyZtZ$s3~mzkfd zMBl$k|0$Nw{eDk`(xdP-Pr{GYO>W*}_$W)E>}tYiw)|_mTvKkTE!BNtv!U|#v+jg2 zou-|uK2!w%aXEHxRm#g>FORA`^|XCjYWp^@_3mf$*XplcT~aUQ)m(b7%2hOFilhAB zyU7tXOH?N_T;4H%d)1cj_Zr^rX}slGVH=iU!?gL(wpeZ6x;;-f-H1B1VzGxoSkR=> z{aU;wUU$+&cl`gcpiEle(){mP6a75zoNBoBb>_E34z+Iy(y9BH+M4E>`@EgFH*aCz zx&5qOk68rf{0&!-oWt&>nO^Mr&)Bt}VUOLLyZM)zUxTuUr>mdKI;Vst E0D(D`G5`Po literal 0 HcmV?d00001 diff --git a/gfx/tilesets/dark_cave_palette_map.asm b/gfx/tilesets/dark_cave_palette_map.asm new file mode 100644 index 0000000..73c09eb --- /dev/null +++ b/gfx/tilesets/dark_cave_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, BROWN, BROWN, GRAY, GRAY, GREEN, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, GRAY, GRAY, WATER, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, YELLOW, YELLOW, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY + tilepal 0, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY + tilepal 0, WATER, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + +rept 16 + db $ff +endr + + tilepal 1, BROWN, BROWN, GRAY, GRAY, GREEN, BROWN, BROWN, BROWN + tilepal 1, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, GRAY, GRAY, WATER, BROWN, BROWN, BROWN + tilepal 1, GRAY, GRAY, YELLOW, YELLOW, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY + tilepal 1, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY + tilepal 1, WATER, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY diff --git a/gfx/tilesets/elite_four_room.png b/gfx/tilesets/elite_four_room.png new file mode 100644 index 0000000000000000000000000000000000000000..27f64afa266d55c0c303b8ba7d35a07ad204495a GIT binary patch literal 1272 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU@%}}U|?X_rf+(ffq`Yer;B4q#Vy+@`5D3C z636au+j;5i29-DW*0=~pugQ>^#bkiL3?eV zZDrm^u03>E^m(7;TeCSC?{hZQO8nlYU#y@JmchK+Nyu#F=GB(f{&{yBXSd9`UwQ8H zzUP+W41PB5XY{!oZPFa0J+FioaH-Fp!xXrYli@_#g0={OMP+$ce$H93F=kfpGp5u< zGv+f+Z`6#lk3D%m#@@bUKF6*()8BrqJ>K!hkZnS{K*zZ=Pn=#`^co06NOjGg$rTtp zv2oUihMBJE3uW2A2_FrwE7#s@d}Axm4L#=WH4nnXqMSSLx;*Q0|MvFHyx7yx9t#xa z*CZy+J)bdAu1i?N|9!NXrmc^mfw87nHsh?FU8nS4|6VM;f5mjk?-ONnCM@-{esn9W z;i{%eRBHMh?lu8G#!bIZvN7wjX>FZ7d;R5J5kC9wFYjmV$+D}7&}#n8d(&=0LvTb) z#`aBNT#VQH+b>H#{*d@wLT0{m%YqUkWx44h+S$u)1aqsclWlO0zpl0Cni_+cgS*e& zl*#)<;>yprn4GTqdM~_>dDcrtm)2W8no?&!iaGsZv1^g7-xIIrD5E04qnIW*+4}a{ zmM`kvo(r;-&3gH)X}?l&jb0|#o5!l@|kn|)3$pbSbA{rxA!GqY!BV@ zTQr9+@V8h`=7o#q_mvq>>1*$}aa+}euY`B?1Xun8<&~$HKMC^)e9gb;_f3+-Ji`9j+D3xmrh)dl%Cw@cj!^al;Tp9g@fW^)&p-O^ z%F;6vo_9|^Wqx=`&S78C+&N-gnPiyf-&U3nNbHI$vME1&zpA+Si8dvR)?(jJ! z^=SW3hs|QA{IV9Tmi6!Z!oYrC-+Jbzz6Ct@&b1_N`K-@d`eH`)Tf3a+k8gOJq&cnP zo1xvLxR&pPuH8SOA5W(FFsOEa{H1wZ_{0Af4Q+BBw;qSNaId~I`LeV+-@3K_0$&TV z);O33uwHNy=xlf;-o5decJ4v*_W67D7!RJxXIZ7ZV5OUl(8Vj47yT(t{@ihK*^J%M zon@D8b(NKEgfu9EmzMzZQQz?q0FQC zb=&-{DZT;cnN%VacxEkIdGX4T6T8aSZS!E*v%O995jS)2Wf!LuL*GyDbJzELJI#G$ zWx?mXGvZ$k&)t1<$!vA0f8|pJisx1zFS;z`QMBdGjd}ckKA2eA1(ZFRb#}6_xV3)# ziH})*yvL`XtN&HYZu4R?mmc%n>FPzF7N|~mGgW%#@-mGNhc~de==#n*{{G3LxB|_E zA9xq3FB59pUH(MugxYR7{&Oc)u1sDl_AaM zk>mb(d8gKHP8;#cBu=aP2G1tdgT+_QR*onw%q*B-q)(a zAGsRDLX{WCI%lnni;c_|I`XA&{_1Ic3lDGSwUe7E6FlGZ*t@MPE;D`~-#%}O$nnCo zD7DAu)zkQd*PIIqWP8r`{2s$JOCg0U`73waF3C~puS^s3J)HSyCDXk|` zj;=Gi7urOC9;u_JmxVEFIOr=G)gE1Hyr$SuNMIrJjrWCT*SsuaJaDG#Ot*af zleT-kl5#@xOc^ZL<3c}8nqViWa>#YN$O3{0Ym5{rda@~@6AKitdU_qpW~e~)R*xzo)h&HsGfFDt*^e0RI6t@?&D z|0I%4f4$dMlu@_ZXOmUY_Wky=TdP(qba>Bu%p$%zYGsHVN1#sG{QY|znr?09cTeGx z^)cD%7MdgU@WtI@Ty$8fwN3ut4`15^(Ex@S zN)ESk1RH&%+MfTd`R}~-Ug5$EuMV7EvB6G}>8+ET`TMjNS1wkGa8?KxJnBEr*vDwW z=WslE*QMBb5)%${ZDCn%5znR}wwK{QUwxA_|DKh(=ZYs>x!pANw@byLw*m)lJjpsf z{hC>_<%=2r*Dr|Rxv_ZrBWf@zMyzP{Q z4TfiJ%x(7?{!n)aUNDor>3;wDM;xD?FMD1V_jjRgz$aZs%MSgC34UkZ3M`cT&E!>B zbFI+i^W~{8d#CUVEbWl-a%@?4a?1J2;0^hc3QE>Ts?D9%m?|eW=gosZhfJ-OR-OB; zEMH@IN$A33rw5a_1YFmMJf->Ti_{N$N3IijUB&a)ZROOwzwA+*(m_cjmBzBn_z9jr z_vQ3I{1iDmYT6X}9%e?typ68ge(;&vS_*o-D!ZD`sk2>XfncpaFW==GlkzMjJ;XYyQL)_fv&v*f*Jj0_cLxCB;S4wV3D@pScbS?83{1OPC39AE$d literal 0 HcmV?d00001 diff --git a/gfx/tilesets/flower/dmg_1.png b/gfx/tilesets/flower/dmg_1.png new file mode 100644 index 0000000000000000000000000000000000000000..428514af4fbe64bd27f8e6552c79e32c6d0337c8 GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@Q1ogTe~DWM4fiiREM literal 0 HcmV?d00001 diff --git a/gfx/tilesets/flower/dmg_2.png b/gfx/tilesets/flower/dmg_2.png new file mode 100644 index 0000000000000000000000000000000000000000..9a51250170c22dce82629fda4caedad24e5dab57 GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@Q1of7}4+GaZPcu$s0^JZWO>t#Fc9i2BDq{-9O&t;ucLK6TPFB(e# literal 0 HcmV?d00001 diff --git a/gfx/tilesets/forest-tree/4.png b/gfx/tilesets/forest-tree/4.png new file mode 100644 index 0000000000000000000000000000000000000000..04ef9f31990690dd692fdec082a805b30a319f4d GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@Q1oJ6)03=osa6{{Z%$=1SzYf_kdfrS^0tR?asD-4_wR>ipKg=x`Kx-E_1eXo zn-Z@+TxxJEBlt6u-;}kh%{~5k?0$9V*$oYztgRjA+NwBRZ=5p8f4^uYqiJIO`SKS1 zCwAZe*4^Lx{T*|Q53}N@(+ou%C3Zc3pEx_7Zh3O?$mTHZzx@LIed^QywzrFk%KYF+ zIL~}x?U|`MelMlJ{IY3fl2Kat{#M_eNxLT&NG+VU)7|<1or@=T*{4^(@=+BrxOCr_ zOXcx`pArjlc0~rVNrkb zT4;GTFFHMwz5mJs!Ozu`_!XrY7BgM_C7AO$E?>(@?_gfTu35`B{FL2)qf6~|_-|#2 z@Bcqdb}!l(*JsShaYtkZ#|-PG3{I2hT&U+&ET7usde1KXl7et{{vw8NGp$`W+OoDV zep*#`c+y>qlQ&|@dQZAG#^t>Ga#2o*L-LD6eX3wh#NlvWE-Ai^duBB9Co=Btx}aMv{=&k{N4vYQ}b@UYoQ*E6GQkNZL)vb z-H$xIbN2l=8vmNVPMbcv^4^kt8a8v-p3N7TrL@g%W&ZpXd((|Rx*aQvVBK{|RY+(5 z{KjsX^Bgja(x)>%rId=T6f(T^q*lLJX%Xj*Z#)KTPi88|&e>bIVl&f|V25exx>0$R=Q5-dW8hTA2&XYH|1-0I>9uhc$4I=2DJs6)7A+T-8RZf z=Mg^^`8{&hLoEycx@xIijUcHPd|x8}ohuL1`fT%G^6Un-p1+~ed$?aGzZ7!Pk4)OT zo;8(SKCn`?WyY@iO~TKm z_fLEqH+OEC%j^Y<-S24#E^cRFe|*?tzmGy85}Sb4q9e0H4G=WB>pF literal 0 HcmV?d00001 diff --git a/gfx/tilesets/forest_palette_map.asm b/gfx/tilesets/forest_palette_map.asm new file mode 100644 index 0000000..6967880 --- /dev/null +++ b/gfx/tilesets/forest_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, BROWN, BROWN, RED, YELLOW, GREEN, BROWN, YELLOW + tilepal 0, YELLOW, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, GREEN + tilepal 0, BROWN, BROWN, BROWN, RED, WATER, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, GREEN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN + tilepal 0, GREEN, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, GREEN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN + tilepal 0, GREEN, GREEN, GREEN, BROWN, GREEN, BROWN, BROWN, GREEN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + +rept 16 + db $ff +endr + + tilepal 1, GRAY, BROWN, BROWN, RED, YELLOW, GREEN, BROWN, YELLOW + tilepal 1, YELLOW, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, GREEN + tilepal 1, BROWN, BROWN, BROWN, RED, WATER, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, GREEN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN + tilepal 1, GREEN, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, GREEN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN + tilepal 1, GREEN, GREEN, GREEN, BROWN, GREEN, BROWN, BROWN, GREEN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN diff --git a/gfx/tilesets/fountain/1.png b/gfx/tilesets/fountain/1.png new file mode 100644 index 0000000000000000000000000000000000000000..657a5c4556f5938e610f4f59743e584ed95f972c GIT binary patch literal 79 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5c70#45_%4%)y)5u=q-d ffTigqMHLYSr!v+pp<#EuKq@_5{an^LB{Ts5qw*83 literal 0 HcmV?d00001 diff --git a/gfx/tilesets/fountain/2.png b/gfx/tilesets/fountain/2.png new file mode 100644 index 0000000000000000000000000000000000000000..af4652b642633352477106a4151af063290f9a31 GIT binary patch literal 81 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@knnVI45_%4%)y)5u=vJm ho{PbfhnyvyoEY6T*c5Vhoi78a^>p=fS?83{1OV!=6-xjB literal 0 HcmV?d00001 diff --git a/gfx/tilesets/fountain/3.png b/gfx/tilesets/fountain/3.png new file mode 100644 index 0000000000000000000000000000000000000000..ed9c492e8ec255f309a99a709a4a573038ab0189 GIT binary patch literal 87 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@kn?nL45_%4+%fCag#S|( o{?m5;8rJqDr0qk102e1KL;8O9t#g(!+z09KboFyt=akR{00qYzYXATM literal 0 HcmV?d00001 diff --git a/gfx/tilesets/fountain/4.png b/gfx/tilesets/fountain/4.png new file mode 100644 index 0000000000000000000000000000000000000000..cfc95eea7f8d4f1a35a898a8068836159009927a GIT binary patch literal 89 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@Q1End45_%4+%fCag#S|> qev4^aIg#h#LY~BhJPQ}{C@y43-pL-adn$V?NROwhpUXO@geCw>`y5mN literal 0 HcmV?d00001 diff --git a/gfx/tilesets/fountain/5.png b/gfx/tilesets/fountain/5.png new file mode 100644 index 0000000000000000000000000000000000000000..a8c9475f9b9ce99c10054cb4c04ac0245219ad9c GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@knwbJ45_%4+%fOegjuHq lq)r*wPD+eY>0oqGT*%-r%;p$=L^=bc-qY33Wt~$(698mL7S8|x literal 0 HcmV?d00001 diff --git a/gfx/tilesets/game_corner.png b/gfx/tilesets/game_corner.png new file mode 100644 index 0000000000000000000000000000000000000000..d519dd636fee162f027bd40b5a1c201d061457e1 GIT binary patch literal 1562 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfr0g*r;B4q#jU4T@B0Ub z%P@S%Z`59sJWcyfWaJr_(@JwAe<-dLa`Mh_HVxFPIN!mi{I31xozr1Cj}8mX;$41G zGQoNChnB7-wnDX6+Euefo;A&InmB!_v|-xJnObP-RNE%(!-|YUAA}%zW$q zTOPa-E4XmA9cRd-2D!wfO_2;%Y7D$82X1d+y}plUoi&R>jY&a6`Q!WE4Tj83@fx$0 zRZ8BSEZ?pm)jK;v;Cg^-roE!Cp~6}32EKc7G5M$V2ybuGwC!b3P-e@?W1Yfe@u?_X zzm2ivKzb+R-knURDqH?soY;S;YZ-IgsT2jJKLv#`7hfF}nQ*dEWTv(aB2UQjB`?gLU>*|CLwQ3v3qD znaR_T!PS@<{3S}xA|pZO6F8vh`9Yi zMr}48%*JO@pi^b zW-#jPm6{{uxZkZQHrQSA~tzmxG;bA;4F^~1MqHal+ z_EK4cUFz$3?cEf#ySxki%w|USNB;WcY-hgI$YzqxcP|Dzmjl<6o}4y)AhK?kz}JYs zd2#LUs#Uv|HRpz9r*E|WWU065gG0w$i)znjQ*Ay)c_!MkAAA$EfqnHpF7Fv>AI%*< z?3MmwF4t{xympUp%8xgJ&Eb>HodaD0pV~y41>I_AWO+3CX;4;uS!nYnVY`gK zkIMWk^-nEXWzwC=vSK#h6{kptLW$4qePPTZKAxq;Neh`)gw>0Q=>FPt@9Gp|(<$Fv zI;OF799C#PW4vL9l=)SLFFnFZ-b_bcvRDS+t^9Ji_MKGqp7fZ|dCV;@1bJGnygKmI zi>WGXMsaCb_}8k2b%w6BhD`6fKRYQ8$AY?r!gGJ{*~M7OLj%;%5neLFe4?$4}C`r&5TS4I9Pmgi5u@>c4-*pInQ zC$m>C>tLGkVNtW`=Z6y8{0$3#I(to(-7~5Dd8E#fc|I4ULrr83@9OeAHA^VrvCh^R zna`QM1WSy}qGujFyhY&yZ&84~_iygZ=Q|jlbAEi&qtDo-5Z$nmCE?8G*JAf}U+#G0 z`r-EXd9hOV>#Vh2-eOQr3H)`fZ)ued^P3)-KVRCHD|NjVKe>)6)aL&g2Dc4e+b71G z+(`Y@p_nmWs*sGQvGY?{T)~Ru<@t&P7>x0&=A1@vB zx2|J~c*Sxc$bH?0otkDz(Z)=9*O-|z=c)Ada&CAhWcGJ&Y?W-cadfgACw8B0F3awJGnRBVq-*{a zS*gTwGF{an^LB{Ts5Fx1oL literal 0 HcmV?d00001 diff --git a/gfx/tilesets/game_corner_palette_map.asm b/gfx/tilesets/game_corner_palette_map.asm new file mode 100644 index 0000000..34bb9f6 --- /dev/null +++ b/gfx/tilesets/game_corner_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, GRAY, BROWN, RED, BROWN, GREEN, GREEN, GREEN + tilepal 0, GREEN, GREEN, GRAY, GRAY, RED, RED, GREEN, BROWN + tilepal 0, GRAY, GRAY, GRAY, RED, BROWN, GREEN, GRAY, GRAY + tilepal 0, GRAY, GREEN, GRAY, GRAY, RED, RED, BROWN, BROWN + tilepal 0, BROWN, BROWN, RED, RED, BROWN, BROWN, GRAY, GRAY + tilepal 0, GRAY, GREEN, RED, RED, GREEN, GRAY, RED, RED + tilepal 0, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN + tilepal 0, BROWN, BROWN, RED, RED, GREEN, BROWN, RED, RED + tilepal 0, ROOF, ROOF, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, ROOF, RED, RED + tilepal 0, RED, ROOF, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, WATER, ROOF, ROOF, WATER, WATER + +rept 16 + db $ff +endr + + tilepal 1, YELLOW, RED, YELLOW, RED, GREEN, GREEN, BROWN, ROOF + tilepal 1, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF, BROWN + tilepal 1, YELLOW, RED, YELLOW, RED, GREEN, GREEN, BROWN, ROOF + tilepal 1, ROOF, GRAY, GRAY, GRAY, GRAY, RED, ROOF, ROOF + tilepal 1, YELLOW, RED, YELLOW, RED, WATER, WATER, RED, RED + tilepal 1, RED, RED, RED, RED, GREEN, GRAY, RED, RED + tilepal 1, RED, RED, YELLOW, YELLOW, WATER, WATER, BROWN, BROWN + tilepal 1, BROWN, BROWN, RED, RED, GREEN, ROOF, RED, RED + tilepal 1, RED, RED, YELLOW, YELLOW, ROOF, ROOF, RED, RED + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, ROOF, RED, RED + tilepal 1, RED, GRAY, GRAY, GRAY, GRAY, GRAY, RED, RED + tilepal 1, GRAY, GRAY, GRAY, WATER, ROOF, ROOF, WATER, WATER diff --git a/gfx/tilesets/gate.png b/gfx/tilesets/gate.png new file mode 100644 index 0000000000000000000000000000000000000000..5036f9066d833dc81e7c5ebd24b153c47c84775f GIT binary patch literal 1141 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq})w)5S5Q;?~wyJVC8Qom+ z<;H{&X3JFB z{k1#)d(U%Q28S^Iq&|%WnQ;xN4CWt1Rd3bZIwEsl>=e@!qj@#Denpv2>^*@xkTf3%Ol9!=BsIf@t9fQA)Sh3d`&I5~>dzSj}X3V;#sp&jp zoA4>dn65%6r%GwzuAPnyjFs9G3?(IA`R&=*UZiJ~*UXg3cjJGauA_Z#ci^U?i7L!4 zF_+pJ4>BA$C^h4VtEc0iB}^`pxn~9O$Q^xjRdW-g6=z3$xWh{R%~DFtchAg-U(sf1 z@Z+^VTW3q~qN`_m*4*Z_b(y-tcF!SEwwr6FO%$@>eSa&O$%$urnkiqP~wwq|O_HSZg%XS!@!Z_@DE{0^%hXR6bTdNZqf+yF$I^J;pv&mt`^3)36^@9S zc^=p}F~4Tt^Qhz7@?zgNcx*a)So9K8*{c0MoE8Pkl3rchYrf6QiRYN@#{UO?+4~)e z4Yt2%wQY}Jk+X!!?jtu7_HT3EqWoZ`G1IqoYjaxU8tlG0`OMlQ`DXuqleKl_LUjgT zr$-;ZW$u*d*WkR#hg)ImD?TKR*`?5&mC=idw5yh ztBum%xvsHRh~05H{Xwn&6JPVIecSK<{vwgTH*eL(-9JBZN`!nD&|l%~@`_hWQ)m*rg(3t|qKG|%+)x#G2M;XEsd89Z@omwY?C@)T5=~}DEFV1Xm*+O< zoBi>Kw$KNcrfGLsJ{{+L^y<{lr~WSK_6IB_=kXs%Z=US3dbh(eC5L10{nV!CZpfO= z)==SRwjq9{=z_I;T1!_6_b%{n{LAGsDU|J>OsKlo%2E!~(W)`PnUub1CTQ-z^6Vr@pxNJ+a<<`uclI zUTa8f`aNIx?-6Z9`#JL0OzwuqtNlHHmBsf07#+C2Kh%A_{e{`Pj6mgyr>mdKI;Vst E0RHR}l>h($ literal 0 HcmV?d00001 diff --git a/gfx/tilesets/gate_palette_map.asm b/gfx/tilesets/gate_palette_map.asm new file mode 100644 index 0000000..7854d3a --- /dev/null +++ b/gfx/tilesets/gate_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, GRAY, WATER, WATER, RED, GREEN, GREEN, GREEN + tilepal 0, GREEN, GREEN, GRAY, GRAY, GRAY, GRAY, GREEN, GREEN + tilepal 0, WATER, GRAY, WATER, WATER, RED, BROWN, BROWN, WATER + tilepal 0, GREEN, GREEN, GRAY, GRAY, GRAY, GRAY, BROWN, WATER + tilepal 0, GREEN, GREEN, GRAY, GRAY, GREEN, GREEN, WATER, WATER + tilepal 0, RED, RED, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN + tilepal 0, GREEN, GREEN, GREEN, GREEN, GRAY, WATER, WATER, WATER + tilepal 0, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, WATER, WATER + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, WATER, WATER, GRAY, GRAY + +rept 16 + db $ff +endr + + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GREEN, GREEN + tilepal 1, GRAY, GRAY, GRAY, GRAY, ROOF, RED, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, BROWN, WATER + tilepal 1, GRAY, ROOF, RED, GRAY, GRAY, WATER, GRAY, GRAY + tilepal 1, RED, RED, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN + tilepal 1, GRAY, GRAY, GRAY, GRAY, RED, WATER, WATER, WATER + tilepal 1, GREEN, GREEN, GREEN, GREEN, GREEN, GREEN, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, WATER, WATER + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, WATER, WATER, GRAY, GRAY diff --git a/gfx/tilesets/ho_oh_word_room.png b/gfx/tilesets/ho_oh_word_room.png new file mode 100644 index 0000000000000000000000000000000000000000..7ae272358df4bf1f6a428757e87e694cb17bffbc GIT binary patch literal 1884 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq`Aw)5S5Q;#O+d`R>Oj zMC(3z$?iPKudUsf?)R>jH%@liy#qp@0vCY|1((!Rxd z^M)3gs>Gb6gAVDE(yJ#q6y5papfKB+@3Z<7gC~0mjh^Q`s#&j6srICFdi>SZ{{CNI z)qeHba$7J`pvtqa(}!_m)COaP$wkHNRoidZ7P9v;=I3mm?_d8-J(#h|=}11OlFgSq z_Q^a2m%rS5xVpa1pHWEh*nKVAKU>+pOgkO_Poc=}R`m~ihgp5Q4^Nh^=Fj(5(tMi# zt)arQ?!Ei{y{j44O>y1p@x?rgcmKb`Zo-Gc8yFrl0^~iblKkj{AfBCP8t#EpJ66;~3 z__a3=Yn^smt>bz4g29WNoi!?Qcg1byE~z{v_sPchbIm4>x?lO;l@fF3o-OvUIu-nF zLrltKn||@T*6~}Ww*R>Jw`St7a>+|>Rf9m>l=bCF9 zrg6_)a{tG}@PCUAr9}Fi(%@UVXVPMcy*BTq6X(C0F;jSL{KDF@JJb%^!^QC`S3;%p}omcF(Tl|&<_kV)} zo%0fSTj%I=om~II{5bymUuIC1ifK5nq@lushg(5 zsutTFM!}M2KUb-1GgQw=zkdDx&Ux#f-{iWN#sA*pXSG%IeBBDp+i#_BC(ZR&2@6qw zEv#7|=Q?q9@1)5w>kf2F2?)H@f6wfot*CbAO6EtMITBOfIr)8<#mZ2u>0YpN8}so= z{pY1DG7}E7JXd_YUuc7m`^qwxHi_>ZM;O+84i&w}&F_AAv9h6`Q@YO|mC0?VH4uWZtNs5;N=nB9}CStoz*4?HpR^>5a*S1V`eOgPW^wmHo~ zfcI;dgYFd1$q{>XG$hn#rOuoyEVW}cdp^^B{uBPZtWFiV-vK0Bv5 zEMxYY4Kk}w-R_6l8F1>W4PSVoXtERqZ#qEcc&h6@R=gZ7kvhlA_a?#hY#uf4374^2? zT<{`B*6e28!{5eSXZ!?s(hfT0XP)@4b0NCSW1elx-R9mk2YHTO+`yLRE}WL0He2?z z;UVE|)f*<-}AF!Ry@8CQ!rg*2iIc zR>5$_)CRrf+s__f%JQR=Lz$gnUqP+BLQLPsD}fDazY>)eJ-ec~aJ$IXE5XSP2b%-# zE~yAD*7A^xd)UU{sQ**Tl7Zc%vh=8F@6QRIOuw6hz9>i-u`fzk;WKel(9D{DmMeFe z+Iz(XY%4t2?mPdhZTPf1D}Ee&+{JIfdLdT!?}d(^?-J@h?0Cf7J5??BjquOlBL!S~ zA9j3Uu)8u#_{v7v{mISJ62hB1{Ta8MtjfCmY>J6}N?w9b4D%0>9s91Q+&%Pf`=6i+ zpBUyD{1?o!=W%?U#$R`)tyl6Jqv?T9A-WqPKDY48HOL!xn{@ABJHflHvLJ86u_LS% z2|t=|I=nJp`l$Jo!o9On!u#G&WE7H~6PlEy;jnb3N?nR{qWB#H$pe$q*0c0lcd01( z^?2l4F1opzA%ywFK@}4z;ZEBXtn<>JI+_1iqV;1n*IS`G9Uni6@PtZoOp)tK&_8S| zpH(@NN1tuW`TdWM&f`zJ8y?@JHCfJl?W3l3ewN=w>qBb|yv{xjRti=3o4aD~bLZ>p zw0MnAb3W$FV!nP`yoRCr+tp(n$1k5S+<8yvdh;ay2S<EVGL4KR(JZAY5;%9@| zqdqu3D_PB)TNZL?g0G%!hutPwv!?#GSx& L^>bP0l+XkKdaH#z literal 0 HcmV?d00001 diff --git a/gfx/tilesets/ho_oh_word_room_palette_map.asm b/gfx/tilesets/ho_oh_word_room_palette_map.asm new file mode 100644 index 0000000..5ebde24 --- /dev/null +++ b/gfx/tilesets/ho_oh_word_room_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, WATER, WATER, WATER, WATER, YELLOW, YELLOW, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, BROWN, BROWN, YELLOW, YELLOW, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, RED, RED, RED, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, RED, RED, RED, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + +rept 16 + db $ff +endr + + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN diff --git a/gfx/tilesets/house.pal b/gfx/tilesets/house.pal new file mode 100644 index 0000000..a9f8b74 --- /dev/null +++ b/gfx/tilesets/house.pal @@ -0,0 +1,40 @@ +; gray + RGB 30, 28, 26 + RGB 19, 19, 19 + RGB 13, 13, 13 + RGB 07, 07, 07 +; red + RGB 30, 28, 26 + RGB 31, 19, 24 + RGB 30, 10, 06 + RGB 07, 07, 07 +; green + RGB 30, 28, 26 + RGB 15, 20, 01 + RGB 09, 13, 00 + RGB 07, 07, 07 +; water (blue) + RGB 30, 28, 26 + RGB 15, 16, 31 + RGB 09, 09, 31 + RGB 07, 07, 07 +; yellow + RGB 30, 28, 26 + RGB 31, 31, 07 + RGB 31, 16, 01 + RGB 07, 07, 07 +; brown + RGB 26, 24, 17 + RGB 21, 17, 07 + RGB 16, 13, 03 + RGB 07, 07, 07 +; roof (glass) + RGB 30, 28, 26 + RGB 31, 19, 24 + RGB 16, 13, 03 + RGB 07, 07, 07 +; text + RGB 31, 31, 16 + RGB 31, 31, 16 + RGB 14, 09, 00 + RGB 00, 00, 00 diff --git a/gfx/tilesets/house.png b/gfx/tilesets/house.png new file mode 100644 index 0000000000000000000000000000000000000000..ce3547bb828f272206645d4a293c53929a8fb3e9 GIT binary patch literal 1254 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq`YMr;B4q#jUqj?q^R< z7h(S}`HAnc%o(1uc5K@)sjPEL;1!kTQ@7H~RUc z`rK!2hmcF&ms70x6H4P^HDh<(igb55e&>XWL&#UBDVYr~obKMd`*ioV_VWUU3GAK? zUQB`ft_(cx=XL(ys?S`b(O^9LZ@v@zNtdJFd{19q`|@HSn?S)4%ZNFR8-8~(*zKND zCh_Uwd6TzQf9FcCnG|5Qs^uYbp3AkQ36Gx6th=!y^K)5rY1_<)oqkI`-lH_JdF!^Dhc3+Et2lJ0U}5B3*#KwlyPE7tQ42Xc>`{9AR1uO|ChbMV}{ ztglvQu8Q^N=lz`d;!%@?S8iH!zs^ZUbUaeez4l7DRPl4~l5kd? z-^cG8TxL!DcXY?9zeg8pJ`$~D5=ia7UKVs%-u92lkHTr|bhhNm-L}-}eEdkEK|t32 z*XxbHl-SujwyhKwkD7AqM?oF)qkCD0CYHx-wX%Fs=XAtt^6&7R@4Ax9CbQmIuAcB` zgEx0nH}jQ)?Li^CwkQ357I=i0)pjBGg0<&s-cH;6gLVH@mz7q#?kw7}-10yZL(QlC zv9;NDrFE+tbcB+YR7~c>P4+t+%Sfo9!N%1`XcJ zc23u|X^F3Vc9_?tda8s)^z9$|o*VryWX@c+k~N-rpU*S~_Z3V!Rx@1ryTtOIB_}PO zWVnKVXC8-x)eI;537e|R^*`^O&S(%N9KattY0dYg!A7=9<-(fJ&&^HU=XQ^y*s%75 zmW9&fhdr~mKj1$*MU!)aPlLsGt_HQ4Oe}kjKFW5DNo!PUxX=1PC|y7OzcZ=!CjKKt2PGBD|rtSpOQzRaU;Afl> zDJ-AL=cK$|t6_WOdB=1yriSPm+9>AN--0awN$9<%`+;zH&2!4(Lbyu;CGYwq(cE z#Yw^1obAuV8w-UEHrQ-A(Cn1h|M@e2u0d7@cfq0}$)-GO?QI`#FJu1w<8t#oNAEhr z#_$Gqk=Z}^UN6W$yITBOZ0}0058|vFHkVvHJK?3m?~nQizg{YRqJE6;IuYM@Y^USjM{2Bj)O#_%AXwN^^A7?@q T36(Hff(kHCS3j3^P6cqCTi**4np0PSRWSA!D>AoqsA~nOQ{DS_uO{Ybel!D$m zn6vWvxw*#Q z=fuzZ|M}1P(<}}WGdHWbDgA8x!|+Cb`GWiB_~$Hi+VE1rZxNfq61&K+-a@5+Z+uOD z(-$u>Er|2wx0fCg3>$b{Dg@e;Hx@XhFmC##p&Y^*HA(6aTSES^k4!8qZi+eQ`57kI zvo4-n-cfWnaB|kZxRVJTSsXE^Z3XI>a=aQZ z6flNP3@O@j^+mhR<{f3pOtV6CnHQg6S1OgsT&i_6iz`S(bcVl{L-FZ`d5u$6K3L; zFCJOlTprPu`lILJ$1lt=+ag46PvLH^IZ>-^b3FIT&p#I~=|pvxe+b?9vnN|k>`eA# z&rfR(T~3}oFROb=k@nTDhU@!0f4+1)R{QZ!arxv=9-ox?7Q{u~-oO-M^Wx7xduzM> z2LE22T`M&yC;ZEo8#l5eHMJdn9_+K1KQqHSx9**T788q%!(R10^Q$^kCR;N6Pk8iu zV~SVF%c~bRw0$|&=n>SEp~|$c+A-}>q-p!+FQ2789kwvg-!tQj%AxEvwhztf1@2tA ze~!&zfkoXNF}-_JHi$4j9R^T%ZGWZmr? zBJ<_miHU6gFttE3VrFFxPHQ)T8&`FZS} z$$`zME*xgEYqmd^SWrTRRK+3wvn+Iz zGeg4>t*aGFjV3RWzyFyhE{~a4;9RLwMSuSBE>$s^>0YU2`$DxsC(L2VWaeox17=RfR=8u(QGIQuY+ps5Neq<)@G3N9lQ% zOqF<&k{i>+BE#@Ov_X6FX*a(~g`Ag;*FJozec;aWZwHj4E!h4lb-nCrefGB`Zj(cz z)f3(&#s`Z99riB2aQA=U>_cp7GZX&a`L}xK%A?i)l7d!58=ZY4-^uns(llTGt<28) z#4fx2PcMG9&)9C>FX*^vW8B0Tvnd=?63*|FKDz5teB6ycGpk>5M1P5G+h6yKue6$$Sa@8rwfJMea5^_H8N&sEMa+qM*C^j04U-ElPXM&YEogZtSw z2}r5BM++Qaum4b?b#CJM-D>xZ&c53d9dx}YN~AesaU0jxEse}3ru&3VQ~F9*sU6&2 znz+f)Iydu)(wPrjF>HQ^Dz;1u=rXzH_x@Ym-7QOk>nu8-6&3WX-dMq>ANqaIrCZfo ze6DMkAFVk%`;G7|fm<&(x;eQoFuKpCuVs@doIiES6Ity$qKe;BOHTnUxtXuRWyHVzZJIO=a66Di+6O_FatN5s0jwBd~krzE$cjo1bKwo;BXK zP$_}8e>umdg#sNL9$%>u=J9PiJX98t2zueyS9^9|ua*Cm zZ=2U1&*NL_tai$v)w4uq#))5{U!RrO?lFoE3cvI-eC4U)|au!Bwh*$nUXS0clXC;jL7Iq#zm(ZzhA9quEq!0Pu+Fqv|UWcH8r!@6`p>I`XPDovw)M{Vv$MJp9qW_D$YZEia~p zrJmiIxa54`)aMb(ao-*q`$undiJDxq@p?@96uHI6LzGq(&&WJB6F0ox)-c+YicvYZ8{HANU=9$8TxqCi7?qILmr}zG?@xN%1 zkm+A%-%WiYR~~sgi0{?Rj1C*gJ?rOv{LXvTXpPf@LmX=s^&ZeUXR+bd7k7)L(wT+BRq3zuO98f(yjDUFUil zyzy^{_7<%88s+>&t($$ttx36zGuE**7D_w(e%H5F=R|OX?zA^cV;1H~9XOWfl0UcC z-)Fa9yy@;yiORq2$ZU3mqxEix2j@{9d)CiC0wX^){!De}3gxO@5gm`-YPSOnWTXXI6$QH>}DmuI&3=ZM^S9LAzB4*Nvs794$J{ z!Euvc9&+^hJS*ySagEdY#}nTFWj0#2VU4>&b$ac&JW--kcG43@{)%6?}(6TQX4>+?)IF+@XC(uZNTcF`=2vysKKcTKHbf_PAEK{5L>(}^~GaeA#q+x6LdH&mwoTz7^B6kdQ%D(29AOm!h+N`laNDjO*7&$>raZX_!=z`ElK?)%(pW?rFUIR=l8Jpk1@eZc4AT zEn`I60sp#f?2PY?Zk=Pi^E~Ua`jv3CQh8l_?uG-0rKK$y&Wea@KWx5u)6evji+Hbd zy1Le#8y_1F7W+j%&?*S@^7zsJt3Gtjx#%O(?DP2m_V18j3p{ zEUG{I&%So~rR(2xug4iT@L2^eytbdQnl~`r`Zzd#+xe_3~PjS)C6SIm8_YhQb7JtFx6%D}yeQx7QvSpzGer{o_7%FUe`(tgdCpqq!c6ylW>(7c zH=gEDVF@^teMrwpX7S(9+R#@Qj=#PYmh2^1^w9IkqODQKTlec+xpigXrk%5&v>fU_ z)8*~NF+0iruFC0K@Bh8a%l)(F+@0O;3Nj28^&J&2F1BMR6!M?DC}&mZ=bE(GojJWz zg@fh>J?C(krlYU?T{5oy%7tx{Pn3VNK(_%QM+KF>}cqJcS>`=)2?4@WbbxgLxzO{GJI#Li(^)EHu)H_ zyELQJ$_*#t7>!#Ln)r_Nay(eg64Wr=ZC$%_oF!+($7P0Z53Oa|zB^C*tNXi|hvF0` zDhZ{%5w_`?#9;5-dSGV8lZBq|rwX~cB{AG|n>~T)$4-GC)dof9IpTa5`BpJ0T;P>t zd{MQ~+jMhv>cl0Rm*!OY3CwjkT4;Y@o$?0l^_BPg{qM|DJ^A{}xyKgA{1PKqXS55q z9b?;nYFeOz%#^O_Iwz{cmqcndu2hQ3kK0{GPlk z->;h>E^SkALLqXwdB;KJcNgRV`+Hr+_ptV7Z=N3dj25wa?qxOz8{`) zyqB1!<7*!fpj0VU&QKF7$d@rKqo}{{a`N)NUr(J*ZvAm{;?6DYYKP;WH?lrbvOIfw z=c4Bqy!O6LO}hSn6Z4hhm0e1OhF832q_!FhN4Z`vc9wc$CH&n=F2m-iVxZ7vE-S{y z>P<^D-rcqBud!=pZ(J|_e9zWfZL7DZq#bX{YCawDDlBEET>H;?){Gne3;k#Rx4faA ax#Vv22Fn*OKQb^dFnGH9xvXHDC*rU^FI1u$`a=dKh=Y0s3b6Xl?qQP?@o%%W!L2PD^K6H``^QoKY?$z z-O63E;_{Nq>+Z7kd@o&a+kTZ$y6{u?*q%o>E=HCw>(0H}7~tGs6xFe_`dxKk%zNo~ zdlct?w|zdZ`rJ-&3F+O^T&-q?VqC^DBJOeKea@eFWD?%^eSh)d?T?hMu7<~j4^)!l zbMI_a-ZHs$Wrvb+Kl9xwakqc$e!S8%Z_)nyCZ8-WxSrVd`1*e_Cv}%BqnT5>Ir*+T zC+rbvydQU4X#d$DrO;Vd)EZd*1v+jr{ITABE3#wuhFLzZg4S(FWIWJ%x2ymAGBx!` zpDn9=|NdVt@bLYqt&W#G?kr}rfSl>yJsgY zW_z^n@8R1Yw_I4AFT7~w|MiWY&Fy?w|H=J&d~j~&gSkFVT+@H?GF)5b;u6--b7e!d z5$}|nQk_bhPd<=5bJXF4-GrXto9j-QOt|agu`Jhlclw2pK*MIWpqPj3a|33xeJjgV z|Evcwr>-BuO@Y&e{O^BO6jv|4u30`E=@<`C?l`dO!S$h&pd%*EeI4r?tfS z8paRZkA8kw<1aX`|HmpViwDQ{My;IJ8D=4HgKNW!uN8mNJ{Q>J#josM)ET+G*C8{{ zRnMYK@_Y#26u1r{cjO+U4!@F=)1uH4r7%RaW~vj67qFV`J$ zF|dwgN?7I9Yaje-`Ig@{4vu}kZ?sQ_XLfRbk!!op&-Ph0!Q9~(gW}v(sq=f*Z{#pF?i?cg$uM^zXR#q&{$Mfb-wz%CuX>?=CO0XL$D9u0e=zMp4y@ z-1B>L!Y!|`=sq)Abw7HGY{P_d32n&*TZ*4J&0g;)Z2e&shgp{4_qhusUDw`WVQ1s~ zDDhaL{ndJcB>L)mLgkNhaUY<2+6C z({8CZo3P%!D`woVYuAdY=|?BmKCi>`H-{+svd zqkkS#PfSe7C%3{YebLidb9KdvB^GhiY@NMLGDBm*2HtB=V|IuBN&TmH>|OKud_(E; z-(Gh`&33GRlzB_I;QjyWzwZCwyKeq|CBuozgYNnpV|EM4@q}#UElWi z)vjliUiX>rb9V1EC_EQ;WtV71!NqH-dgl|aTzvRC;?5$Y+rIirsyx-RbAsBx{8wKj6` z>AbTl3{ls0B+Jy+NHmy>J`8PH!yMb|>guue+|^YIKE5&etJ>x&EBE~6F`qZ3kw=7K zHs2;=Sp)SOEt-4`cYZuAkJOg1?q}cgZ)8e@iYnhel+rnpb3ym% z?VRf$UtX%)eYW_S*Tz%FBED`~E9IG3$@cw3TDoVe+WG)y{d&9GGhU_UB&;>xG-rb8 zhDC1OYOB~g7-s5Myt%OAiLcOsg&WmmT1*<=ahV5(pGe;k4av(^;NpSxq@@*^vGI_^C`b@@O< zQ~9-&1rwN)=JWih-g}JWlTbm~R-?eFs|74B2v2TYw&8k5>+xqR=c}@F75x@IsmI9? z%sC?~$uC*Ur_j^DP|URO0S8mzEHCESL2=1it~(DMiKyRi#QUYQco9#|%yOxlGVFXs z>Q`SdvnTD{7{{`#&i`;BOOnioO-n>NQhJI~X7q&|3gJ(!fWf9P_zl3U;@*xe6}hxO=QIlBZPoU0=Gud~TM;t?w42~tr6p#cIGE0?q$_I*{IqcrrzVR}L%H^E`8%{aQOwhJMlV{X4TzXKB;fHB>X7|N_IR~cgee>{!b+>pk@1!O>iHyTjtb7*~ zCNa*~p~V=(sF1*{bx&zQQa_KTMylw}Mh-douw}<9oDQ$6zO&)uK4nJqX%1y zg>?@+N-bggK6ldB`%nHyJyrAOtJ}};gTIKi>+T`1lU;lM>Db86xtGaufrTm8dc%8# z1JNp~^8Zr*)*JOtc~-Gp{?~^~?#KJ(o-*wJGn z*`s{snsFZ#(~{SJZ1QG4J^zBv!OQz%qgtOh_Z+iZ^rc>e+b=Nn%CbUGbH~%w&t;uc GLK6U+C|HXC literal 0 HcmV?d00001 diff --git a/gfx/tilesets/johto_modern_palette_map.asm b/gfx/tilesets/johto_modern_palette_map.asm new file mode 100644 index 0000000..f2af7a9 --- /dev/null +++ b/gfx/tilesets/johto_modern_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, BROWN, BROWN, RED, GREEN, GREEN, GRAY, ROOF + tilepal 0, RED, RED, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF + tilepal 0, ROOF, ROOF, ROOF, GREEN, WATER, GREEN, BROWN, BROWN + tilepal 0, RED, RED, BROWN, BROWN, BROWN, GRAY, GREEN, GREEN + tilepal 0, GRAY, GRAY, BROWN, RED, RED, GRAY, YELLOW, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GRAY, RED + tilepal 0, GRAY, BROWN, BROWN, GRAY, BROWN, GRAY, GRAY, YELLOW + tilepal 0, YELLOW, BROWN, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN + tilepal 0, RED, BROWN, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, WATER, GRAY, BROWN, BROWN, BROWN, GRAY, GRAY + tilepal 0, GRAY, BROWN, BROWN, GRAY, BROWN, GRAY, GRAY, GRAY + tilepal 0, WATER, GRAY, GRAY, GRAY, BROWN, BROWN, GRAY, GRAY + +rept 16 + db $ff +endr + + tilepal 1, GRAY, BROWN, BROWN, RED, GREEN, GREEN, GRAY, ROOF + tilepal 1, RED, RED, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF + tilepal 1, ROOF, ROOF, ROOF, GREEN, WATER, GREEN, BROWN, ROOF + tilepal 1, ROOF, ROOF, ROOF, BROWN, BROWN, GRAY, GREEN, GREEN + tilepal 1, GRAY, GRAY, BROWN, RED, RED, GRAY, YELLOW, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GRAY, RED + tilepal 1, GRAY, BROWN, BROWN, GRAY, BROWN, GRAY, GRAY, YELLOW + tilepal 1, YELLOW, BROWN, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN + tilepal 1, RED, BROWN, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, WATER, GRAY, BROWN, BROWN, BROWN, GRAY, GRAY + tilepal 1, GRAY, BROWN, BROWN, GRAY, RED, RED, GREEN, GREEN + tilepal 1, YELLOW, ROOF, ROOF, ROOF, ROOF, ROOF, RED, ROOF diff --git a/gfx/tilesets/johto_palette_map.asm b/gfx/tilesets/johto_palette_map.asm new file mode 100644 index 0000000..62fbd2d --- /dev/null +++ b/gfx/tilesets/johto_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, BROWN, BROWN, RED, GREEN, GREEN, GRAY, RED + tilepal 0, RED, RED, ROOF, ROOF, ROOF, ROOF, ROOF, ROOF + tilepal 0, ROOF, ROOF, ROOF, GREEN, WATER, GREEN, BROWN, BROWN + tilepal 0, RED, RED, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN + tilepal 0, BROWN, BROWN, BROWN, RED, RED, BROWN, YELLOW, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN + tilepal 0, BROWN, BROWN, WATER, WATER, BROWN, BROWN, BROWN, YELLOW + tilepal 0, YELLOW, BROWN, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN + tilepal 0, RED, BROWN, WATER, WATER, BROWN, GREEN, BROWN, BROWN + tilepal 0, BROWN, WATER, GRAY, BROWN, BROWN, BROWN, GRAY, GRAY + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, WATER, GRAY, GRAY, GRAY, BROWN, BROWN, GRAY, GRAY + +rept 16 + db $ff +endr + + tilepal 1, BROWN, BROWN, BROWN, RED, RED, RED, RED, RED + tilepal 1, RED, RED, RED, RED, RED, RED, RED, RED + tilepal 1, RED, RED, RED, RED, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, GRAY, GRAY, BROWN, BROWN, BROWN + tilepal 1, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, BROWN + tilepal 1, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, BROWN + tilepal 1, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, BROWN + tilepal 1, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN diff --git a/gfx/tilesets/kabuto_word_room.png b/gfx/tilesets/kabuto_word_room.png new file mode 100644 index 0000000000000000000000000000000000000000..7ae272358df4bf1f6a428757e87e694cb17bffbc GIT binary patch literal 1884 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq`Aw)5S5Q;#O+d`R>Oj zMC(3z$?iPKudUsf?)R>jH%@liy#qp@0vCY|1((!Rxd z^M)3gs>Gb6gAVDE(yJ#q6y5papfKB+@3Z<7gC~0mjh^Q`s#&j6srICFdi>SZ{{CNI z)qeHba$7J`pvtqa(}!_m)COaP$wkHNRoidZ7P9v;=I3mm?_d8-J(#h|=}11OlFgSq z_Q^a2m%rS5xVpa1pHWEh*nKVAKU>+pOgkO_Poc=}R`m~ihgp5Q4^Nh^=Fj(5(tMi# zt)arQ?!Ei{y{j44O>y1p@x?rgcmKb`Zo-Gc8yFrl0^~iblKkj{AfBCP8t#EpJ66;~3 z__a3=Yn^smt>bz4g29WNoi!?Qcg1byE~z{v_sPchbIm4>x?lO;l@fF3o-OvUIu-nF zLrltKn||@T*6~}Ww*R>Jw`St7a>+|>Rf9m>l=bCF9 zrg6_)a{tG}@PCUAr9}Fi(%@UVXVPMcy*BTq6X(C0F;jSL{KDF@JJb%^!^QC`S3;%p}omcF(Tl|&<_kV)} zo%0fSTj%I=om~II{5bymUuIC1ifK5nq@lushg(5 zsutTFM!}M2KUb-1GgQw=zkdDx&Ux#f-{iWN#sA*pXSG%IeBBDp+i#_BC(ZR&2@6qw zEv#7|=Q?q9@1)5w>kf2F2?)H@f6wfot*CbAO6EtMITBOfIr)8<#mZ2u>0YpN8}so= z{pY1DG7}E7JXd_YUuc7m`^qwxHi_>ZM;O+84i&w}&F_AAv9h6`Q@YO|mC0?VH4uWZtNs5;N=nB9}CStoz*4?HpR^>5a*S1V`eOgPW^wmHo~ zfcI;dgYFd1$q{>XG$hn#rOuoyEVW}cdp^^B{uBPZtWFiV-vK0Bv5 zEMxYY4Kk}w-R_6l8F1>W4PSVoXtERqZ#qEcc&h6@R=gZ7kvhlA_a?#hY#uf4374^2? zT<{`B*6e28!{5eSXZ!?s(hfT0XP)@4b0NCSW1elx-R9mk2YHTO+`yLRE}WL0He2?z z;UVE|)f*<-}AF!Ry@8CQ!rg*2iIc zR>5$_)CRrf+s__f%JQR=Lz$gnUqP+BLQLPsD}fDazY>)eJ-ec~aJ$IXE5XSP2b%-# zE~yAD*7A^xd)UU{sQ**Tl7Zc%vh=8F@6QRIOuw6hz9>i-u`fzk;WKel(9D{DmMeFe z+Iz(XY%4t2?mPdhZTPf1D}Ee&+{JIfdLdT!?}d(^?-J@h?0Cf7J5??BjquOlBL!S~ zA9j3Uu)8u#_{v7v{mISJ62hB1{Ta8MtjfCmY>J6}N?w9b4D%0>9s91Q+&%Pf`=6i+ zpBUyD{1?o!=W%?U#$R`)tyl6Jqv?T9A-WqPKDY48HOL!xn{@ABJHflHvLJ86u_LS% z2|t=|I=nJp`l$Jo!o9On!u#G&WE7H~6PlEy;jnb3N?nR{qWB#H$pe$q*0c0lcd01( z^?2l4F1opzA%ywFK@}4z;ZEBXtn<>JI+_1iqV;1n*IS`G9Uni6@PtZoOp)tK&_8S| zpH(@NN1tuW`TdWM&f`zJ8y?@JHCfJl?W3l3ewN=w>qBb|yv{xjRti=3o4aD~bLZ>p zw0MnAb3W$FV!nP`yoRCr+tp(n$1k5S+<8yvdh;ay2S<EVGL4KR(JZAY5;%9@| zqdqu3D_PB)TNZL?g0G%!hutPwv!?#GSx& L^>bP0l+XkKdaH#z literal 0 HcmV?d00001 diff --git a/gfx/tilesets/kabuto_word_room_palette_map.asm b/gfx/tilesets/kabuto_word_room_palette_map.asm new file mode 100644 index 0000000..5ebde24 --- /dev/null +++ b/gfx/tilesets/kabuto_word_room_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, WATER, WATER, WATER, WATER, YELLOW, YELLOW, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, BROWN, BROWN, YELLOW, YELLOW, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, RED, RED, RED, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, RED, RED, RED, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + +rept 16 + db $ff +endr + + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN diff --git a/gfx/tilesets/kanto.png b/gfx/tilesets/kanto.png new file mode 100644 index 0000000000000000000000000000000000000000..a3036406eb796220493ba42e0ae7b6a0d45548e0 GIT binary patch literal 1301 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU@%}}U|?X_rf+(ffq~_Yr;B4q#Vy|{^*O?+ z636AQg}S-!YP)6-D0yV=E!ESH{yvoNiHX)a%{1layHe(6z88HFyn;fP?GN;%&Sg^L zF;Us;e4?pp%lm^z5*^Bpi5>5F!_KV4=G(xLwW+N%MOjgC`#!t(rQK$4|7O_#-E;qW z?fmZzh7GUk9_KnqB&#(X`C)Fflq+sSjJZMC+oP_Jg=Zx``0IKs?6Id&G^5ytLpli( zc2#-F`FyOQQ`}Vfauk;&8YO#)UGQ$cci&9vuSS5z-5Z&V47@$Q{gDnnocbBoosvEa zdj%v#IXu*uk}r!nJbj>^`~JmWjR$N?i}`+JCM@94XnguAZ4)SB_ybG{e$J})_B zwOA5I!E#34L`5z&v*6T-^|dQ_3ELY(~idU35z*oD!CaCr!np|krkF{`ICM? z(W2nNl*3F(URK-kcl@kpb6TVLZ988y!&K9&Ww(q}7=H*dItje6iDeN9jlQydru3f{ zmJ19Y6b~5hoY!0{w%}64u3sYNDt8&)am_pEnCagaHs6V1{fEAd*H5wDlrOM(!I2;u zslIMw;+$AdO{V$x9<1GXE_`B1wd`Nba@R{=zHR8V7B2U4-cy-yQ<;y&i>1EdU(Nh7 zmPNrc)h}J-j^FdHE5$XYTj{~=?ML1&UDUknj(3~n>vPZbTbmr8n+SaRq&rV>Pf}b% z+B!b*jP`!!wuhYu9<^>w_^zArv@PM#+pCeK`lpxP2{-mXcHsec+nmx18SnRGq^>wq zWxOVBmT1tnjd!*uw;A$VJxhPR#>g^YTEdNWSM8HtZ@S5|^rY09r1Cie4E~q9PQ~_` z^0%zeF)p+GoN}1+?;6{r2R0&kpY`5x^|M?zpE^f=ZTOUvhZ5e*<_-RJyr0pvGI$gem3}B^`hp5 z%v$-i`)~S`1{)QoiL%GB`{NQT=x_o^N**dN8P)KK!>*MGsr1`2(irTm-a zoMvrEX5F$`X~BvO`ME`FHM+L7RyZuL`5FKQ+E8hB&|66g~-ucw_b+! zo4-G}eDYnU3kz0yNm)%f{8=@ynz8gX1qa470xzVt@mM|EVs za(Zje(ooSi`MbnEFY>mR=vvcde=oRmx{cg<0q^AXQzj?;co$o9=xd?EK6dZ9`ChFz z6*naQ(Yt>6qs7v#;cZGa9mYGfpELNnKA3b~yz0Hm($_5uIp%Aud9>0}LDu=eV|_XWyJ_V8@m6~nQCseWCy*0qwvvk!M{ z^Sml#Ew7vX$)qx>>0lW50ukpV(VuSBb$|Xw-1_>|$2#7i{q)yUa}=ks{SZ&~HY|1w S{^|fK?>t@oT-G@yGywpFePPl7 literal 0 HcmV?d00001 diff --git a/gfx/tilesets/kanto_palette_map.asm b/gfx/tilesets/kanto_palette_map.asm new file mode 100644 index 0000000..e3e497f --- /dev/null +++ b/gfx/tilesets/kanto_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, BROWN, BROWN, RED, BROWN, ROOF, ROOF, ROOF + tilepal 0, ROOF, ROOF, YELLOW, YELLOW, YELLOW, GRAY, BROWN, GRAY + tilepal 0, GRAY, BROWN, ROOF, BROWN, WATER, ROOF, ROOF, ROOF + tilepal 0, ROOF, ROOF, GRAY, BROWN, BROWN, GRAY, BROWN, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, BROWN, ROOF, ROOF, BROWN + tilepal 0, ROOF, ROOF, GRAY, GRAY, GREEN, GREEN, GREEN, GRAY + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, ROOF, GRAY, GRAY, GRAY, GRAY, GREEN, GREEN, GRAY + tilepal 0, GREEN, GREEN, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN + tilepal 0, BROWN, BROWN, GRAY, BROWN, GRAY, GRAY, GRAY, RED + tilepal 0, GREEN, GREEN, GREEN, ROOF, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, GRAY, BROWN, GRAY, GRAY, GRAY, GRAY + +rept 16 + db $ff +endr + + tilepal 1, GRAY, BROWN, BROWN, RED, BROWN, ROOF, ROOF, ROOF + tilepal 1, ROOF, ROOF, YELLOW, YELLOW, YELLOW, GRAY, BROWN, GRAY + tilepal 1, GRAY, BROWN, ROOF, BROWN, WATER, ROOF, ROOF, ROOF + tilepal 1, ROOF, ROOF, GRAY, BROWN, BROWN, GRAY, BROWN, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, BROWN, ROOF, ROOF, BROWN + tilepal 1, ROOF, ROOF, GRAY, GRAY, GREEN, GREEN, GREEN, GRAY + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, ROOF, GRAY, GRAY, GRAY, GRAY, GREEN, GREEN, GRAY + tilepal 1, GREEN, GREEN, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN + tilepal 1, BROWN, BROWN, GRAY, BROWN, GRAY, GRAY, GRAY, RED + tilepal 1, GREEN, GREEN, GREEN, ROOF, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, GRAY, BROWN, GRAY, GRAY, GRAY, GRAY diff --git a/gfx/tilesets/lab.png b/gfx/tilesets/lab.png new file mode 100644 index 0000000000000000000000000000000000000000..75301c7e25a3d6c32155401a111329adba84d758 GIT binary patch literal 2022 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq{Lkr;B4q#jVh3u{k2w zMH|k~nt5!a*Pi6GH5>G=JXm$kYpu|wc9Fn6-svlxr>3ag*(@|o$7|DtimU9O9AXxR z878=wTD z*QdG7`hE7N{dYbFmx)1QizL{jbgwg-tz~@E7FV}k#GqjY>xCD-B5VITu4Fb}^unz~ z)@&vBPZkMz^IvN2Wgpr1KRtR~GNR+!lzrxmZEaR{g%8r0*2wJNy&-tz<%@f`Sh#u` z8yj`&BQu!<85x#`gt7{E{9MMncEQpE2llqky?sPe;^?QA?5E}uH$y&dZ=E~MqVsvy~vakNKa>HyViKwbAjE@r@lJf z&h@SjwmUn&KA`bv_j<*5(sx%kJ^1LaZD?S3uF{LaEAn*qf9YG{OC4I@&R;EYsp<5&h5%!X!^06rGb|@(_so$W?}nVZcktDd(^@8sB@m{XG_t~;nLxGt{49n z7&6v~7PAnHK9ULR(q-dyIRY0_C+OuTRvPW2zGJ})p6vE+wAgAu;FvbSIz>gd`?BfuHa;}Yjn0$1clPf`%>&xe zZM*vTzuetBGn!2xt-8Uf`Fl%g8vjw=d;N>-_kCEruDbvCzmKkYtP2wKSX3VPZGW75 zm-)frE031`Jloloyt6%JtA+HHXh)fUAJ*=(-J8w%VbZaG8T*q(B`?ZdIe({elB13t z^A;v{&B31#K!jD z{WDdyZeRXP*X{kO+t;29dau0p_pdn{?CY|Q9H?fP|7HCVTd@NhOr)%@IP1(d5ZWVQQIp|zt{4{+{p2Nn+H=bFR zF&sKtFmW==2HgW&G=5xLyxZ2ym48xjqSwkDr@GrFZq3!?k-F2#plQ$<@l<`S7>_g8 z?0GYrH+|rl!O)?aF=6SgsZHEF9>2Jlv@2M-YFYt{>LJaPjOh~=?T)C~X|Vn?o! zs8#o+tOS`0D|&TOn(KUDtt&`Mu$aBvPw)8Dw-u2aay9mSe5@q8VndR{+;G!%E|>l; zQcU8M&9Ajk;-0A%z?rQ7;iguRwyOzo3nzFF$fl`=2i#YCEMe#hdl{rpL9IHayv_&&Ik&a>v1;e#p5jFU=c znapIF!!4>jT{1$1r>9cFDk&r=O>)6nvn9gi6B-TJYWUf0H~LrUaZF&>H(gW^rQ$!6 zfyvwH!q12coF4n9%<$-9JnVEor9sJmm-4l{TUr}uJ$oQ{S*gM4+Ln1|o@};fG-6w{ z*EG=a-}$+!|Cg$j=;XUzKh-65qvC>GsfE;s*KS{4^|^^mc*@88#h}(;Owf1buj;qlBKD-?Q_lQVyPsTRac54Gx>%I2T;=d^ZrXzSs2xHj%R@fvb}u@3;4sUI z7M>6%rWmg|@6+c9FlhdeLG{M zHzi!UFU5Sj+#q0Pf*(g@7=1YA#k4?ZniJcLc&{CY&RMW0KX_}e+R(bL zuZi*3^iMHf+om(b=X5tV?CL7pDZ}_h|LKh>Im(O`Mhvd$@?2>_iH7vul{ literal 0 HcmV?d00001 diff --git a/gfx/tilesets/lava/2.png b/gfx/tilesets/lava/2.png new file mode 100644 index 0000000000000000000000000000000000000000..1512e35ad51c549ce72ded9b05a91144f094f12f GIT binary patch literal 89 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@Q1End45_%4?7^GLG53^! qz{v{-PCZy~Vu8vDffJ_$q_`Mt+E~)#mQM5r>G5>+b6Mw<&;$VZh8k%A literal 0 HcmV?d00001 diff --git a/gfx/tilesets/lava/3.png b/gfx/tilesets/lava/3.png new file mode 100644 index 0000000000000000000000000000000000000000..449c2a317b7f4e749bc002eccd181a86f6899626 GIT binary patch literal 87 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@kn?nL45_%4%)y(=!J9lo n>Xd-kNr4lm1hh^u2ywD9*e9|wKh|Wv3DV)|>gTe~DWM4fF<%t; literal 0 HcmV?d00001 diff --git a/gfx/tilesets/lava/4.png b/gfx/tilesets/lava/4.png new file mode 100644 index 0000000000000000000000000000000000000000..8e4c8e0e50744c4028467b57089b46ead8ffa670 GIT binary patch literal 79 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@5c70#45_%4%)y)LuwW(6 fx<($wH4bJB4&|&myc6^mgH(FD`njxgN@xNAn?w^J literal 0 HcmV?d00001 diff --git a/gfx/tilesets/lighthouse.png b/gfx/tilesets/lighthouse.png new file mode 100644 index 0000000000000000000000000000000000000000..0da4b3919613269f427695ec714bd52f3b230b9f GIT binary patch literal 1226 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq`YBr;B4q#jUqj?`O|W z6=DByS#Rns-dSbuqtj;^&t6^9`tMZ8tR-d(eFH_Vt*M>A>1|T-gQk5`VmpGgCyQP` zw5*SBI?w&x35(T^b2V{IFA@3Q?6TF2jsR$hPjtg}0uxvc*ErAaC=fmt5v3|BtL>}n6_thTtk zV2a8a#+(L&e5sJ*kC!yA3~4bhma*wjmDpw&%htCzq^o(=l&h^XUWWY^SpJeBDU5ke z=kdG3p$mTn^%X1Wa+Y_**90-Ax-P!NIbHP2(fHR*vcetCds-~Q*gjTBUa5cewBgLV z(;f1U6OWufrZX05TU5U@H<)~~g}W`?OuwS1 zWXaEj zQraS2PF!HtFWWsAe6RSPUO1;g_hP@&?L5N+w^Hq_FI<~;@MvB`-l|u+Umj>1yT2|g zX}!c_RQ@~4t7GA}N3E`pnI!iZ?rgBi$^Gb3o+oS|`#NgE`7J6EW>VUB`p*2M z$(ZTe8xeyA!YoJ5Ot_h?+B0!S>b|27zGzki3!SMw>6mwW^QHUu)7}Mb)JnZJ^E%6t zb3ebv9+`Yy*jH!v#t9SO^skF+EwI{r|2_MR3E7L9G>SH_(%1QK^o9TWm)9SUv!uMq z=|1!SY>`Dx!Kdj*+AdzS+-aHki{Z>~LG>R@JozfS>YCrR&VOrb^(_3=rag_<9|j~Z zZ(6Z*%1@Jv^7rL-mDTJ&?)gS;@AIadx0`f1IhW4*A*6S2SM{464{LXO#$9Ge4!yDR z%IV6bO-%dN|7}!=5}i2Fv|!Syhqf7UtgSbML$=?2J$3O5CcVF$&)14iI4xLN*W>oo zB||~=x`OD}xPPk~^7EcD-8|ji@SAf}C_iIc&@p94gJAw)+Pgg&ebxsLQ0BA~AKL7v# literal 0 HcmV?d00001 diff --git a/gfx/tilesets/lighthouse_palette_map.asm b/gfx/tilesets/lighthouse_palette_map.asm new file mode 100644 index 0000000..5f80e3a --- /dev/null +++ b/gfx/tilesets/lighthouse_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, WATER, WATER, WATER, BROWN, WATER, WATER, RED + tilepal 0, RED, ROOF, ROOF, BROWN, ROOF, RED, RED, RED + tilepal 0, ROOF, WATER, ROOF, BROWN, ROOF, WATER, WATER, RED + tilepal 0, RED, ROOF, ROOF, WATER, ROOF, RED, RED, RED + tilepal 0, ROOF, ROOF, WATER, BROWN, RED, WATER, WATER, GRAY + tilepal 0, GRAY, GRAY, GRAY, BROWN, ROOF, ROOF, GRAY, GRAY + tilepal 0, ROOF, ROOF, WATER, WATER, RED, ROOF, BROWN, GRAY + tilepal 0, GRAY, GRAY, GRAY, BROWN, BROWN, ROOF, BROWN, WATER + tilepal 0, YELLOW, YELLOW, ROOF, ROOF, BROWN, BROWN, BROWN, BROWN + tilepal 0, RED, RED, GRAY, GRAY, GREEN, GREEN, ROOF, ROOF + tilepal 0, YELLOW, YELLOW, ROOF, ROOF, ROOF, ROOF, GRAY, GRAY + tilepal 0, RED, RED, GREEN, GREEN, ROOF, ROOF, GRAY, GRAY + +rept 16 + db $ff +endr + + tilepal 1, BROWN, BROWN, ROOF, GRAY, GRAY, BROWN, BROWN, RED + tilepal 1, RED, RED, RED, BROWN, RED, RED, RED, RED + tilepal 1, ROOF, WATER, ROOF, BROWN, RED, WATER, WATER, RED + tilepal 1, RED, RED, RED, WATER, RED, RED, RED, RED + tilepal 1, ROOF, ROOF, WATER, BROWN, RED, WATER, WATER, GRAY + tilepal 1, GRAY, GRAY, GRAY, BROWN, RED, ROOF, GRAY, GRAY + tilepal 1, ROOF, ROOF, WATER, WATER, RED, RED, BROWN, GRAY + tilepal 1, GRAY, GRAY, GRAY, BROWN, BROWN, ROOF, BROWN, WATER + tilepal 1, RED, RED, ROOF, ROOF, BROWN, BROWN, GRAY, GRAY + tilepal 1, RED, RED, GRAY, GRAY, GREEN, GREEN, ROOF, ROOF + tilepal 1, RED, RED, ROOF, ROOF, ROOF, ROOF, GRAY, GRAY + tilepal 1, RED, RED, GREEN, GREEN, ROOF, ROOF, GRAY, GRAY diff --git a/gfx/tilesets/mansion.png b/gfx/tilesets/mansion.png new file mode 100644 index 0000000000000000000000000000000000000000..44e697a1b679ca918ff25e2093507a7dcb223e59 GIT binary patch literal 2047 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfr0&)r;B4q#jVn5xjxa) zMUTtJS@A4fHTR*Jeo%L=3{NXV->t;OU#p~U`gB=&{0VT{J<(^S@S4=$o5Wv;v93%> zI>0qo=m>Ar^M=Ih{)-p6&SEJF+3va8a`x4yhi|3+6w0vKQq{TAg@Yx}!uoj}Ps=*- zb?>(R{rvyW`O0&}>m(f%&R8ZhX3)a%!-34K{AkjrB5%y_1c8|Ng&8(EVW#9~vIC>;Eh z)^O>HbB^$%j(3Tr%n3SEg_=II9owYMFzt-4li~`=195FU_uQ1`a9`yA(8|Wr;>0D+ zs3kMU+Jtr0lgE>mFgG!9Osrvi&YI0N=lXxu<&zq=TB(>Z?rLXtV&R-{ZGpb#5?`-h zl2tB^uiNv5C)`-HK>zbKfm^fZ_N31Ec)R3Mw$6>x{&VSPng7gPxRcwh$6sC7Jil6F zA=iOFp{8mp&BBiV44nKuVY=bwV%`&-4@9+>Pm8U5e2QVU@S_*s_Fd%ftvr}xd!*pX z(c4UqB0Hv*MAu4v`1<2d`?0&7IiD1d=%3&D;D>LjsnnkZKey&*He5Wg$=Cny;%N-$ zteNyO_O7qdm%MYBTSQi2vUPtZSKa^fyJHG|Eqqid@aMqf@437;R9#MNu?~EFF>0-A z2G_hh3dJHG94xv^5~>Q_Ub{}4$gHXz=o zNedOtBd)ak4N!N}+3mDcFzyp%Rry{>yE zZqI8|wqwDQ8|M_yF1eZhZRR)gYp)zG$A(x)bC~@u>b=PvwesZcZ|BbF$#TpudHlNJ z#0N_*UcTIo8fSY2?*H6dCVEJ`JN>4_vw4l)^E@Z;b!_}1F(Z6^T(dYnaEV-b#?)h?gTj{ zUXi&*KU*uhMU1SKUms{|`s*32e%hw%z})xywtoN5P|cU(v4AgN|8u#>NcIyar7k?E zcZ~U#JmY*3+r2BkkN*GoQPr{8h-s6~k)=HT`ppa%I*u?N^7{IzAfAiSC;m)H+P)(P zcy2WY_Z?=ly@jMY0=A z-1Pl(!I>0WyQ!PH@|fOL8P%O>czNK5#gv!j_g^efRbgO1eoJ?Kiq8CJ&RVXW31*SM z_OSi3d&_1M`m5XRrSBXQEmI?%f5I~aSSF+g9Ce*lq12!nex~<#?dhZ(r}l05N{ViU5CVFY*4RL4w zxGxUeQMSP^mYRsi?JMm*`~C8%+rOUgZZ*23etOPs=c@;e<1$63y_0uOSklgreZGT@ zh3T*nllZ(ZcK^Sf{nqNpBe-2KAfsEl<yZA zaACyb$B*ald&jra`!FAq!P&5D)tzr{=zT3SzP9_>!Mnv_iV3U%2gO!9-49vOe0N)g z!hspqPq@FNTGQUxMR7BIu}fqLkf?d~q`!Z+bI(QPD%lG5 zO9vc3`pwC;{4m*_QSlqopXC<>SYK&G$W9Y1NSejcli{#*kwnot_12$H{cDtJKD`rT zSn%o4iGaG)Ae--h=ie26=pTQdDWUwI-V28V^W%TI?31}>^P*v8f{StF&Ek6#i~kn? zT$C@a-!ZHruJTbp9r?e24F?$Oy-)+yZ)Q&UiA`Dvi{tx9$q ztNrE1`!D1;KD=%aaP1L|+_O3HrPvD3oBpLMvK$}ONFDGk<`+E_q|LO%fbrb4E$y5< zjohM}DwY@TKl#^w*14?B+ zG<9A#u$s^Fezsq0f8dtps5<9|`>Q&ROZD93*b{XpF5|$q?YR{*G~O+6dK#WqI_c0l z0j9s7uYKPT@qS{HX_Qf`?A@I1)T$HAU2hY%?I;y(3=P`gbW&v5hQkjH(t^d7a?R>_ zdpqDn)1$t#zVUU=`|ScJGtHR&hbjN9^NxwHVmZT`wj~tqUSjl;@y@lz{RjQ8*s7~s zy&2x@aCDM&NFB4Y!h{tEe_EOEjAqvQy!ut)Z?%H{#ZE_sCLc10ZeE<7S0ur-s`kXq z=WmK-4=Wt^NPI6)y)g4YdcTQ7JjaGyM5KGQvM}@cl-{#te3C*_jcOG*>BhH z{q*6}JmGWuPW>tA_$2);jit>oDmJ54b%yGKRdGRY?QC1Z*pIapPI)Zs-Wch1`KJ5K f*NPtkAO4o#bY^GNLF;|~pqky&)z4*}Q$iB}$+soX3d=XlMXY&map?@ zyJedCRsOa~>PNGPJO3obdU&iwTmBllwijEJZrGBb8^UAy`_agiE z)%(BCnf%+!V*d#a7uD{pAJ>21$=vB?as2i6_>G1^ENUh%A5O1(zrxtMxIM`H`OH=6 zZ$244SoBQw$j;n9RiBP2CBLgLOTQC-gNb3v)NR|g9TF~#KQ#S@+I)|58M_W$yXnay zu{CO~=!zzX%ld!sGBLF3=Df;h>08v~w6e|N@y2WKq`P+=+O5+ncO&sGv-Bm#B*)1G z^5q-n1X!#o@lAiwxtycI!&ql>(8mi;RvZ49?5CYL&A>)LaDl<-C{bN1iaV3M>A#i+`k0_rGI8 z?~J@hd^L}A8#M(!Y)hHTk)SuPpw64&YooAvVL(lSfW5_sC3hG+mL$e5c(skO=52(y z!LkDVN$#(iRMtOG`{y6Gydll=@ArS3zKWjEoydNC{!?ac1}DCxe_V1hjarNybqoiV zWYn!;)p~K@eGJ2*Sqv7UzDuWkUUW!WKTP9FXOb?vh5UhoR~;6L@j0E^5V0sB;R1t; zqTq^!TX?!n?Tqb`vrhivZE%#}iu)o^e*A7+{Gm*S8zxK|Y~FtyU#3s?$ycb*=#+ot zq^ri7^I<8Y$=_>pTGuX^_oUY$;`~jk6>SHu1XM75O`N8+&hyo3r^F3hd2^S@K3{+4ddCu%dp9QV1>Djx-TwQOjOQ7>Mx8W?!(IpWao9gt z=Db^Z-oB70e_Sd&US)h1uH{f)Bz5iRLRq?WWYa`B^@A@F!Kg;S7 z!s#TOV`S~3_jP9B)Zs&Izw7iaMCn@hScr8WrdlHSF=(vkluf2Wl4GNuIqsw=dF z7iMI1T$-g>C%h||_mojZvMcNFW9N3Ai}Lc-tXum>F*JEoPP@s5MsWfsr~atDaqP+rAsvPY->J`;8!z6HGF^7}Z-Xd1}^D=C&|KQO4qz zoJ!oSS-&Ni_DrAK3p&ON#ibNH}x!M%WmnvWXXx1DkPbK1D#1;f77QybpKv+oe{TOM4h8pdGJ zXxPg5q`Js*!R|m4mTO-Zh}YiLEV%t#(wK{dL8Exh`-k=a`wbSYvyupT5aJQb87*0w z>)3l}CBv09K{xbSnZ4$2;hFHY;PY`C_T|}D>T6k_$v-bDC~BQ)(beF|@7%bS(WS0^ z{jVGTIhT&t#c*qU(e{czBgpi7*?f>7S#p8;XP&7m+ZvvT+uu_aD9zaP)7hf&klnPD>gmk2(;Y%4S}}Dg zvChmZnt$)51uH|fL!-$Ap&KuKS1c%PW?!3Ow1;KUz2A@T&--?-f1#&tCPUpzdv#ai U)@cjZ+kPgg&ebxsLQ05ClvoB#j- literal 0 HcmV?d00001 diff --git a/gfx/tilesets/mart_palette_map.asm b/gfx/tilesets/mart_palette_map.asm new file mode 100644 index 0000000..991510d --- /dev/null +++ b/gfx/tilesets/mart_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, YELLOW, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GREEN, GREEN, WATER, RED, GRAY, GRAY, ROOF, ROOF + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, BROWN, BROWN, BROWN, RED, ROOF, ROOF, GRAY, YELLOW + tilepal 0, GRAY, GRAY, RED, RED, RED, RED, WATER, WATER + tilepal 0, WATER, WATER, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, RED, RED, RED, RED, WATER, WATER + tilepal 0, WATER, WATER, RED, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, RED, RED, RED + tilepal 0, GREEN, GRAY, GREEN, GREEN, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, RED, YELLOW, YELLOW, YELLOW, ROOF, ROOF + tilepal 0, ROOF, ROOF, ROOF, ROOF, RED, RED, BROWN, BROWN + +rept 16 + db $ff +endr + + tilepal 1, GRAY, GRAY, GRAY, GREEN, GREEN, GREEN, GREEN, GRAY + tilepal 1, GRAY, GREEN, GREEN, RED, RED, WATER, WATER, ROOF + tilepal 1, GRAY, GRAY, GRAY, YELLOW, YELLOW, YELLOW, ROOF, GRAY + tilepal 1, GRAY, GRAY, WATER, GRAY, GRAY, GRAY, YELLOW, YELLOW + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, RED, WATER, RED + tilepal 1, RED, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, RED, RED, RED, RED, RED, RED, RED, RED + tilepal 1, RED, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GREEN, GREEN, GREEN, GREEN + tilepal 1, GRAY, GRAY, WATER, GRAY, WATER, RED, BROWN, BROWN diff --git a/gfx/tilesets/omanyte_word_room.png b/gfx/tilesets/omanyte_word_room.png new file mode 100644 index 0000000000000000000000000000000000000000..7ae272358df4bf1f6a428757e87e694cb17bffbc GIT binary patch literal 1884 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq`Aw)5S5Q;#O+d`R>Oj zMC(3z$?iPKudUsf?)R>jH%@liy#qp@0vCY|1((!Rxd z^M)3gs>Gb6gAVDE(yJ#q6y5papfKB+@3Z<7gC~0mjh^Q`s#&j6srICFdi>SZ{{CNI z)qeHba$7J`pvtqa(}!_m)COaP$wkHNRoidZ7P9v;=I3mm?_d8-J(#h|=}11OlFgSq z_Q^a2m%rS5xVpa1pHWEh*nKVAKU>+pOgkO_Poc=}R`m~ihgp5Q4^Nh^=Fj(5(tMi# zt)arQ?!Ei{y{j44O>y1p@x?rgcmKb`Zo-Gc8yFrl0^~iblKkj{AfBCP8t#EpJ66;~3 z__a3=Yn^smt>bz4g29WNoi!?Qcg1byE~z{v_sPchbIm4>x?lO;l@fF3o-OvUIu-nF zLrltKn||@T*6~}Ww*R>Jw`St7a>+|>Rf9m>l=bCF9 zrg6_)a{tG}@PCUAr9}Fi(%@UVXVPMcy*BTq6X(C0F;jSL{KDF@JJb%^!^QC`S3;%p}omcF(Tl|&<_kV)} zo%0fSTj%I=om~II{5bymUuIC1ifK5nq@lushg(5 zsutTFM!}M2KUb-1GgQw=zkdDx&Ux#f-{iWN#sA*pXSG%IeBBDp+i#_BC(ZR&2@6qw zEv#7|=Q?q9@1)5w>kf2F2?)H@f6wfot*CbAO6EtMITBOfIr)8<#mZ2u>0YpN8}so= z{pY1DG7}E7JXd_YUuc7m`^qwxHi_>ZM;O+84i&w}&F_AAv9h6`Q@YO|mC0?VH4uWZtNs5;N=nB9}CStoz*4?HpR^>5a*S1V`eOgPW^wmHo~ zfcI;dgYFd1$q{>XG$hn#rOuoyEVW}cdp^^B{uBPZtWFiV-vK0Bv5 zEMxYY4Kk}w-R_6l8F1>W4PSVoXtERqZ#qEcc&h6@R=gZ7kvhlA_a?#hY#uf4374^2? zT<{`B*6e28!{5eSXZ!?s(hfT0XP)@4b0NCSW1elx-R9mk2YHTO+`yLRE}WL0He2?z z;UVE|)f*<-}AF!Ry@8CQ!rg*2iIc zR>5$_)CRrf+s__f%JQR=Lz$gnUqP+BLQLPsD}fDazY>)eJ-ec~aJ$IXE5XSP2b%-# zE~yAD*7A^xd)UU{sQ**Tl7Zc%vh=8F@6QRIOuw6hz9>i-u`fzk;WKel(9D{DmMeFe z+Iz(XY%4t2?mPdhZTPf1D}Ee&+{JIfdLdT!?}d(^?-J@h?0Cf7J5??BjquOlBL!S~ zA9j3Uu)8u#_{v7v{mISJ62hB1{Ta8MtjfCmY>J6}N?w9b4D%0>9s91Q+&%Pf`=6i+ zpBUyD{1?o!=W%?U#$R`)tyl6Jqv?T9A-WqPKDY48HOL!xn{@ABJHflHvLJ86u_LS% z2|t=|I=nJp`l$Jo!o9On!u#G&WE7H~6PlEy;jnb3N?nR{qWB#H$pe$q*0c0lcd01( z^?2l4F1opzA%ywFK@}4z;ZEBXtn<>JI+_1iqV;1n*IS`G9Uni6@PtZoOp)tK&_8S| zpH(@NN1tuW`TdWM&f`zJ8y?@JHCfJl?W3l3ewN=w>qBb|yv{xjRti=3o4aD~bLZ>p zw0MnAb3W$FV!nP`yoRCr+tp(n$1k5S+<8yvdh;ay2S<EVGL4KR(JZAY5;%9@| zqdqu3D_PB)TNZL?g0G%!hutPwv!?#GSx& L^>bP0l+XkKdaH#z literal 0 HcmV?d00001 diff --git a/gfx/tilesets/omanyte_word_room_palette_map.asm b/gfx/tilesets/omanyte_word_room_palette_map.asm new file mode 100644 index 0000000..5ebde24 --- /dev/null +++ b/gfx/tilesets/omanyte_word_room_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, WATER, WATER, WATER, WATER, YELLOW, YELLOW, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, BROWN, BROWN, YELLOW, YELLOW, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, RED, RED, RED, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, RED, RED, RED, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + +rept 16 + db $ff +endr + + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN diff --git a/gfx/tilesets/park.png b/gfx/tilesets/park.png new file mode 100644 index 0000000000000000000000000000000000000000..830affef7f87520f4ea686354e50bd5e79c3e4ec GIT binary patch literal 1310 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq~_zr;B4q#jUqfF6IY^ z${as0Bb{@?N~lYLGr9TKg_X0DlsGxJH}_7+%-MZ6SfWLZugx}6VpUudS|H~J7YBESZG;(;*7{!cjrI9^R;YG#ZTrZw@q@3 z?7vs<+kgN4oMwg^je!WJ4dd~5gTl^UwITGVAg% za2ebXezWV+s>X*5Uv~RB)v9Q`k__3g@(j;LqePz_Z}+@Cvo-70(*p{MjR*8Zp6ZLl z_deRYVS=v3iW1##tu=P}+M7Ovu0Njgr%G!L!}$qGl6s~6YxxWwnyyef@}ys|Cpa-u zFJ;2z-njnbd!x=UmzOvMvfgd*$SUJ`d`xZQ%B>7~PY@+>C=@jM-OK!Gxib*?cu~-?R^u;U4(1~xo(3?rIzwVuyE>yqCdrIEQlDCVl zXc*TW&$JJ&lV7khJgoa@PEGfLpKlk}nt4a{gnd*g@6J_P8n`FtrNr4t+_3g>P2t__&bcFJm2%!wDy&pIys z{e5}6pAO^V6=$MeIXTHau(i;C;-{A6j`lrUs@YKII&KcGF zzRLs{e~O`*l?~qa1 zdnm8%Ho;RC>Pc)7Ooi{MmNx2NalYB z&KcSVwjSk?QY?D6SETSd?T4?BK{z(VQgJ zxPrB){l>*LPY+yY*uT*z`P^BC$6IZBXsOts!db&p{-_onLVeUHkvJo=MXgIo+19-EdJ5N z)qPL>>O@@}j&$T}oaX*8|5BsRXXb_v%#6DwA7~wPGxDGIX5vbs> dVfnZH!2V5I{3&{`;>$n7 zWscYT&bldTxb}%tV<$k}w zzVfE4f8E+E?DxN2IPvSj?Eei3@}B~XCwOSbZPGb@|NWggx6d-SKAUs?XYKy|_uv1~ zV^|Q!FTZXr(^^Z#Ff&FW%?6Pc@0X!#*R7o=erPW1j0}dJqpPoOTYN=rF{JSh<{r9gYTT+K<->0cTjDLkUdvdkh__S|#MU)z6 z&)4$|`_5i`@o!rBE452(C-~<)cvmIS_*bCdzI4RBCN_^l)3&8N=q~!4re++k-uZi8 zjMQf31N#*sAD#ZxoR${I96fK(WjXm|3Q^ zwnVH;Sc+rzQHMVn=Qf8$EZTkl{#CU|r5y7|LZug%oUFDwdv?WpR4H1sKf36utW~(*K4^-S2j- z|CY4cr{CN9`h)3LTc&$IkDlh7n7rWjA-`{NjSLMO4U5X=JaXdv*f@Rf^DBzqtgi3~ z)Gz6KkicPmMdRVVN12naGrW^}(6zWvh~4?R=p(D@ikn5oOkx!CHl6wYo!6_z<&2RPc89JS z{aP=}v-IPHiDvEsON~3Lk{eZe*zY>8IxDIuWU}qWW#j!P+mAK-6`R=F$j?dh$?sFS z^`+^>K?~>THjiAEgj}JQk6ym`{eVZDshaUY#3vO)gMun8CIQJ4PZ^senZIc5`^@v< zTKeImo{E(62EOv@181|oE;^Y51mOC&V2?J(IH z?8P}TsQ&y%_bcT-yLk<=Pjkx2luoKKoK*4o+GAVcf9mNUCavqelR0bee}-?#lRf(8 RvX+8!u&1k^%Q~loCIC^_<>deX literal 0 HcmV?d00001 diff --git a/gfx/tilesets/players_house_palette_map.asm b/gfx/tilesets/players_house_palette_map.asm new file mode 100644 index 0000000..5d08983 --- /dev/null +++ b/gfx/tilesets/players_house_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, BROWN, BROWN, BROWN, RED, GREEN, WATER, WATER + tilepal 0, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, RED, BROWN, WATER, WATER + tilepal 0, BROWN, BROWN, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, GRAY, GRAY, WATER, WATER, BROWN, BROWN + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY + tilepal 0, GRAY, GRAY, BROWN, BROWN, WATER, WATER, BROWN, BROWN + tilepal 0, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + +rept 16 + db $ff +endr + + tilepal 1, GRAY, BROWN, BROWN, BROWN, RED, GREEN, WATER, WATER + tilepal 1, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, RED, BROWN, WATER, WATER + tilepal 1, BROWN, BROWN, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 1, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, GRAY, GRAY, GRAY, GRAY, WATER, WATER, BROWN, BROWN + tilepal 1, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, GRAY, GRAY + tilepal 1, GRAY, GRAY, BROWN, BROWN, WATER, WATER, BROWN, BROWN + tilepal 1, BROWN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN diff --git a/gfx/tilesets/players_room.png b/gfx/tilesets/players_room.png new file mode 100644 index 0000000000000000000000000000000000000000..a0f268eb585dc401b8d22506d02bf6b740de5d93 GIT binary patch literal 1221 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU@%}}U|?X_rf+(ffq|vR)5S5Q;#TaGT%YJv zk>mc}krVj&JiKE(uZX5?5SqnnZ_?uNJYb@J$qjaaN8XPP1Q

oZ_}rdc}21woPKe z9V^~2ZC`%sZ$gux@>*u`Z9hM8dbrK8sMPH=_|U5O`f+jIY44gzv+vybU48E7{BQ<` zFFO_L0yZWoCHv_&6fSJ$qXa~akyKkxHtdt5KGKvz?z;q|Dji;fE&ui5j>o7bxOZe9Ow z4<6UKVJ=JGuUXg9kjx-1R+aW6#X#;qk)p3u4tM@~IzXxUMfug$@(DV;4j=e#Y? z1QWCWL5KJZHktnHXZRE-bMx5GNk=E?uHFATU?rP^*TENApFimdaB5B4ljCV5arunI zgnlCpJ~w4wW^0E$ja4bnM15>tU6ABZ;NBs+^04d!!-q=3T$3i-+H5Ea}y&rGGaZ_Mh36UbkOR?SVw{;~TP^e|M!T?#isZruDT{ zS3Jd~sVMI9-jBCtc@+PxQ}~>;?@M28hN7)VX{XH=F7C7OZyEn{EeP1P`Onv-Jo_H` zG8%9!NZiNh!r!f@*5Kmz=i97<%hsI<%)fF?C;aEC$4|F?6xBU*?Z~7pce3oBGhVoU z?aXHJWh?txcmqXGI7J

lDQ7{Eg-8xyXKiIT z#c-b?K$L@tnTdgcjg3))fr*usfgxbqCM<%7@1Y1bv9Pjy3g}%uAwZOqA)sDW=i$9g z0ZI%?XBin{&hjxTGb%%hFE&ZW<8amkMo2lvCdsJB_F8eKA-QKvme$V0a z`|bq>C^1BwWnl<88^{>Q*az46oKcD);%qNt7Gp0X3j+fKqZBK{f?mcl#$HB72IZ`? zj67Lq85XcIGQf(jnT*gPlTDIQjtN>y8iP7i@<;9;@Y{Iwz_HTMy@$6St#?|^yLvLH z1lSAduN`|HF3QHuz{1GIz{t$Pz!0!|Q@tn)I|F+_V1Oty4+Dq-rDiXtRHgZT)eGRU6d17O`aOgC(??XDR?Ob;c-dWlc<~lMYAV+QXS~U4 SoW6g14$XN`4m9gQc`N|Ef#5^{ literal 0 HcmV?d00001 diff --git a/mobile/news/news_3.bin b/mobile/news/news_3.bin new file mode 100644 index 0000000000000000000000000000000000000000..f4adbc0dbcbfd5b76f57c847e86b2ae352c74e67 GIT binary patch literal 1462 zcmZQr5U9R^)rf(Kfmwu$k(q%JGzW@CH z!DiLVU$_|nVX5vrbZHZey=(KHdjVH2-3(A_EndabTEA*G!*qt(42+44|0P)&g;*pc z89y<=nOhnDYy3C(&+zk*>ZHeWjqAY%KKI{rzJBYD`v>ZmJ3pRWzwP?v(4)t;d4c6* zPi?w?ICRs^ZI|o!+&aJS-t)k42C#(C<9@G=H_q?7=MUzpg4`j$_m)-Yg`2yMco}a$ zzc(;^)9p>Sk3#HF^S^NG{9cHo!R|NS8?bxRo_nfb-FN-@n^v!QEL^|m{N8}6>mK*W zU$}YluK$%w=l2GX5Ww*a|Nn#V|NqepvCsfcWhiB6WthS+gJB8728Kk2Jx~Y=U{K&P zvoSI-{O?@R-7w#{e%t*6_1iY>-5hXn&ygDkHf`Hfziac69f$7)9J+s?zO%7yHM{E8 zt=o48TsFBGpqzA;K{@#>1EUesf90gJ%*x4U8KG=8<>a$WAohg=n;_o5>%ZmtJ>&Wv z2D>+5@sKDlbMo194EGq`F`y)w2!<^T|Nkd|lT8dm9Mnf?3`GnL3=Eq_!JbJu%fP75{9h&METeMDSw<+E zNjc>#6Nt^s21-yM?;PB;y&l;&B!(PXY%*ywfIY9uWXj~q6p#kurJN06N@OZv3SeSq zWCrIRW+rBkcmMxi3=WF<3=0{!LAi%%D}*g2}K$Cn6N=mpfR(lC!I|>3yLsA ziU2!nE5j*<`wRi198Ani3=C{+j1mmYEG!HR0oyjA2r@A^eVEix2 z#?8RO$i=|O46=Xsrg~8pb_Vue+UTGlI8~Zlx+kVPll)p83 z0W2&qr0N&ILIgvqdI3CK0t2>Ozh_W?`iQE~SO2 ON/OFF +; bit 6-4 - SO2 output level (volume) (# 0-7) +; bit 3 - Vin->SO1 ON/OFF +; bit 2-0 - SO1 output level (volume) (# 0-7) + db +wSoundOutput:: +; corresponds to rNR51 +; bit 4-7: ch1-4 so2 on/off +; bit 0-3: ch1-4 so1 on/off + db +wPitchSweep:: +; corresponds to rNR10 +; bit 7: unused +; bit 4-6: sweep time +; bit 3: sweep direction +; but 0-2: sweep shift + db + +wMusicID:: dw +wMusicBank:: db +wNoiseSampleAddress:: dw +wNoiseSampleDelay:: db + ds 1 +wMusicNoiseSampleSet:: db +wSFXNoiseSampleSet:: db + +wLowHealthAlarm:: +; bit 7: on/off +; bit 4: pitch +; bit 0-3: counter + db + +wMusicFade:: +; fades volume over x frames +; bit 7: fade in/out +; bit 0-5: number of frames for each volume level +; $00 = none (default) + db +wMusicFadeCount:: db +wMusicFadeID:: dw + + ds 5 + +wCryPitch:: dw +wCryLength:: dw + +wLastVolume:: db +wUnusedMusicF9Flag:: db + +wSFXPriority:: +; if nonzero, turn off music when playing sfx + db + + ds 1 + +wChannel1JumpCondition:: db +wChannel2JumpCondition:: db +wChannel3JumpCondition:: db +wChannel4JumpCondition:: db + +wStereoPanningMask:: db + +wCryTracks:: +; plays only in left or right track depending on what side the monster is on +; both tracks active outside of battle + db + +wSFXDuration:: db +wCurSFX:: +; id of sfx currently playing + db + +wAudioEnd:: + +wMapMusic:: db + +wDontPlayMapMusicOnReload:: db + + +SECTION "WRAM", WRAM0 + +wLZAddress:: dw +wLZBank:: db + + ds 1 + +wBoxAlignment:: db + +wInputType:: db +wAutoInputAddress:: dw +wAutoInputBank:: db +wAutoInputLength:: db + +wDebugFlags:: db +wGameLogicPaused:: db +wSpriteUpdatesEnabled:: db + +wUnusedScriptByte:: db + +wMapTimeOfDay:: db + + ds 3 + +wPrinterConnectionOpen:: db +wPrinterOpcode:: db + + ds 1 + +wDisableTextAcceleration:: db +wPrevLandmark:: db +wCurLandmark:: db +wLandmarkSignTimer:: dw + +wLinkMode:: +; a LINK_* value for the link type + db + +wScriptVar:: db + +wPlayerNextMovement:: db +wPlayerMovement:: db + + ds 2 + +wMovementObject:: + db +wMovementDataBank:: db +wMovementDataAddress:: dw +wIndexedMovement2Pointer:: dw + + ds 2 + +wContinueReadingMovement:: db + +UNION +wObjectPriorities:: ds NUM_OBJECT_STRUCTS + +NEXTU +wMovementPointer:: dw + ds 3 +wTempObjectCopyMapObjectIndex:: db +wTempObjectCopySprite:: db +wTempObjectCopySpriteVTile:: db +wTempObjectCopyPalette:: db +wTempObjectCopyMovement:: db +wTempObjectCopyRange:: db +wTempObjectCopyX:: db +wTempObjectCopyY:: db +wTempObjectCopyRadius:: db +ENDU + + ds 1 + +wTileDown:: db +wTileUp:: db +wTileLeft:: db +wTileRight:: db + +wTilePermissions:: +; set if tile behavior prevents +; you from walking in that direction +; bit 3: down +; bit 2: up +; bit 1: left +; bit 0: right + db + + +SECTION "wSpriteAnims", WRAM0 + +UNION +wSpriteAnimData:: + +wSpriteAnimDict:: +; wSpriteAnimDict pairs keys with values +; keys: SPRITE_ANIM_DICT_* indexes (taken from SpriteAnimSeqData) +; values: vTiles0 offsets + ds NUM_SPRITEANIMDICT_ENTRIES * 2 + +wSpriteAnimationStructs:: +; wSpriteAnim1 - wSpriteAnim10 +for n, 1, NUM_SPRITE_ANIM_STRUCTS + 1 +; field 0: index +; fields 1-3: loaded from SpriteAnimSeqData +wSpriteAnim{d:n}:: sprite_anim_struct wSpriteAnim{d:n} +endr +wSpriteAnimationStructsEnd:: + +NEXTU +; mobile data +wMobileWRAM:: +wMobileErrorCodeBuffer:: ds 3 +wc303:: ds 2 +wc305:: ds 1 +wc306:: ds 1 +wc307:: ds 1 +wc308:: ds 1 +wc309:: ds 1 +wc30a:: ds 1 +wc30b:: ds 1 +wc30c:: ds 1 +wc30d:: ds 1 +wc30e:: ds 1 +wc30f:: ds 1 +wc310:: ds 1 +wc311:: ds 1 +wc312:: ds 1 +wc313:: ds 1 +wc314:: ds 5 +wc319:: db +wc31a:: db +wc31b:: db +wc31c:: db +wc31d:: db +wc31e:: db +wc31f:: db +wc320:: ds 38 +wc346:: ds 102 +wc3ac:: ds 8 +ENDU + +wSpriteAnimCount:: db +wCurSpriteOAMAddr:: db + +wCurIcon:: db + +wCurIconTile:: db +UNION +wSpriteAnimID:: +wCurSpriteOAMFlags:: db +NEXTU +wSpriteAnimAddrBackup:: dw +ENDU +wCurAnimVTile:: db +wCurAnimXCoord:: db +wCurAnimYCoord:: db +wCurAnimXOffset:: db +wCurAnimYOffset:: db +wGlobalAnimYOffset:: db +wGlobalAnimXOffset:: db + +wSpriteAnimDataEnd:: + + ds 11 + +; mobile data +wc3cc:: ds 1 +wEmailAddress:: ds MOBILE_EMAIL_LENGTH + ds 1 +wc3ec:: ds 1 +wc3ed:: ds 1 +wc3ee:: ds 1 +wc3ef:: ds 1 +wc3f0:: ds 1 +wc3f1:: ds 1 +wc3f2:: ds 1 +wc3f3:: ds 1 +wc3f4:: ds 1 +wc3f5:: ds 1 +wc3f6:: ds 1 +wc3f7:: ds 1 +wc3f8:: ds 1 +wc3f9:: ds 1 +wc3fa:: ds 1 +wc3fb:: ds 1 +wc3fc:: ds 1 + ds 3 +wMobileWRAMEnd:: + + +SECTION "Sprites", WRAM0 + +wShadowOAM:: +; wShadowOAMSprite00 - wShadowOAMSprite39 +for n, NUM_SPRITE_OAM_STRUCTS +wShadowOAMSprite{02d:n}:: sprite_oam_struct wShadowOAMSprite{02d:n} +endr +wShadowOAMEnd:: + + +SECTION "Tilemap", WRAM0 + +wTilemap:: +; 20x18 grid of 8x8 tiles + ds SCREEN_WIDTH * SCREEN_HEIGHT +wTilemapEnd:: + + +; This union spans 480 bytes. +SECTION UNION "Miscellaneous", WRAM0 + +; surrounding tiles +; This buffer determines the size for the rest of the union; +; it uses exactly 480 bytes. +wSurroundingTiles:: ds SURROUNDING_WIDTH * SURROUNDING_HEIGHT + + +SECTION UNION "Miscellaneous", WRAM0 + +; box save buffer +; SaveBoxAddress uses this buffer in three steps because it +; needs more space than the buffer can hold. +wBoxPartialData:: ds 480 +wBoxPartialDataEnd:: + + +SECTION UNION "Miscellaneous", WRAM0 + +; battle tower temp struct +wBT_OTTemp:: battle_tower_struct wBT_OTTemp + + +SECTION UNION "Miscellaneous", WRAM0 + +; battle data +wBattle:: +wEnemyMoveStruct:: move_struct wEnemyMoveStruct +wPlayerMoveStruct:: move_struct wPlayerMoveStruct + +wEnemyMonNickname:: ds MON_NAME_LENGTH +wBattleMonNickname:: ds MON_NAME_LENGTH + +wBattleMon:: battle_struct wBattleMon + + ds 2 + +wWildMon:: db + ds 1 + +wEnemyTrainerItem1:: db +wEnemyTrainerItem2:: db +wEnemyTrainerBaseReward:: db +wEnemyTrainerAIFlags:: ds 3 +wOTClassName:: ds TRAINER_CLASS_NAME_LENGTH + +wCurOTMon:: db + +wBattleParticipantsNotFainted:: +; Bit array. Bits 0 - 5 correspond to party members 1 - 6. +; Bit set if the mon appears in battle. +; Bit cleared if the mon faints. +; Backed up if the enemy switches. +; All bits cleared if the enemy faints. + db + +wTypeModifier:: +; >10: super-effective +; 10: normal +; <10: not very effective +; bit 7: stab + db + +wCriticalHit:: +; 0 if not critical +; 1 for a critical hit +; 2 for a OHKO + db + +wAttackMissed:: +; nonzero for a miss + db + +wPlayerSubStatus1:: db +wPlayerSubStatus2:: db +wPlayerSubStatus3:: db +wPlayerSubStatus4:: db +wPlayerSubStatus5:: db + +wEnemySubStatus1:: db +wEnemySubStatus2:: db +wEnemySubStatus3:: db +wEnemySubStatus4:: db +wEnemySubStatus5:: db + +wPlayerRolloutCount:: db +wPlayerConfuseCount:: db +wPlayerToxicCount:: db +wPlayerDisableCount:: db +wPlayerEncoreCount:: db +wPlayerPerishCount:: db +wPlayerFuryCutterCount:: db +wPlayerProtectCount:: db + +wEnemyRolloutCount:: db +wEnemyConfuseCount:: db +wEnemyToxicCount:: db +wEnemyDisableCount:: db +wEnemyEncoreCount:: db +wEnemyPerishCount:: db +wEnemyFuryCutterCount:: db +wEnemyProtectCount:: db + +wPlayerDamageTaken:: dw +wEnemyDamageTaken:: dw + +wBattleReward:: ds 3 + +wBattleAnimParam:: db + +wBattleScriptBuffer:: ds 40 + +wBattleScriptBufferAddress:: dw + +wTurnEnded:: db + + ds 1 + +wPlayerStats:: +wPlayerAttack:: dw +wPlayerDefense:: dw +wPlayerSpeed:: dw +wPlayerSpAtk:: dw +wPlayerSpDef:: dw + ds 1 + +wEnemyStats:: +wEnemyAttack:: dw +wEnemyDefense:: dw +wEnemySpeed:: dw +wEnemySpAtk:: dw +wEnemySpDef:: dw + ds 1 + +wPlayerStatLevels:: +wPlayerAtkLevel:: db +wPlayerDefLevel:: db +wPlayerSpdLevel:: db +wPlayerSAtkLevel:: db +wPlayerSDefLevel:: db +wPlayerAccLevel:: db +wPlayerEvaLevel:: db + ds 1 + +wEnemyStatLevels:: +wEnemyAtkLevel:: db +wEnemyDefLevel:: db +wEnemySpdLevel:: db +wEnemySAtkLevel:: db +wEnemySDefLevel:: db +wEnemyAccLevel:: db +wEnemyEvaLevel:: db + ds 1 + +wEnemyTurnsTaken:: db +wPlayerTurnsTaken:: db + ds 1 + +wPlayerSubstituteHP:: db +wEnemySubstituteHP:: db + +wUnusedPlayerLockedMove:: db + ds 1 + +wCurPlayerMove:: db +wCurEnemyMove:: db + +wLinkBattleRNCount:: +; how far through the prng stream + db + +wEnemyItemState:: db + ds 2 +wCurEnemyMoveNum:: db + +wEnemyHPAtTimeOfPlayerSwitch:: dw +wPayDayMoney:: ds 3 + +wSafariMonAngerCount:: db ; unreferenced +wSafariMonEating:: db + ds 1 +wEnemyBackupDVs:: dw ; used when enemy is transformed +wAlreadyDisobeyed:: db + +wDisabledMove:: db +wEnemyDisabledMove:: db +wWhichMonFaintedFirst:: db + +; exists so you can't counter on switch +wLastPlayerCounterMove:: db +wLastEnemyCounterMove:: db + +wEnemyMinimized:: db + +wAlreadyFailed:: db + +wBattleParticipantsIncludingFainted:: db +wBattleLowHealthAlarm:: db +wPlayerMinimized:: db +wPlayerScreens:: +; bit +; 0 spikes +; 1 +; 2 safeguard +; 3 light screen +; 4 reflect +; 5-7 unused + db + +wEnemyScreens:: +; see wPlayerScreens + db + +wPlayerSafeguardCount:: db +wPlayerLightScreenCount:: db +wPlayerReflectCount:: db + ds 1 + +wEnemySafeguardCount:: db +wEnemyLightScreenCount:: db +wEnemyReflectCount:: db + ds 1 + + ds 1 + +wBattleWeather:: +; 00 normal +; 01 rain +; 02 sun +; 03 sandstorm +; 04 rain stopped +; 05 sunliight faded +; 06 sandstorm subsided + db + +wWeatherCount:: +; # turns remaining + db + +wLoweredStat:: db +wEffectFailed:: db +wFailedMessage:: db +wEnemyGoesFirst:: db + +wPlayerIsSwitching:: db +wEnemyIsSwitching:: db + +wPlayerUsedMoves:: +; add a move that has been used once by the player +; added in order of use + ds NUM_MOVES + +wEnemyAISwitchScore:: db +wEnemySwitchMonParam:: db +wEnemySwitchMonIndex:: db +wTempLevel:: db +wLastPlayerMon:: db +wLastPlayerMove:: db +wLastEnemyMove:: db + +wPlayerFutureSightCount:: db +wEnemyFutureSightCount:: db + +wGivingExperienceToExpShareHolders:: db + +wBackupEnemyMonBaseStats:: ds NUM_EXP_STATS +wBackupEnemyMonCatchRate:: db +wBackupEnemyMonBaseExp:: db + +wPlayerFutureSightDamage:: dw +wEnemyFutureSightDamage:: dw +wPlayerRageCounter:: db +wEnemyRageCounter:: db + +wBeatUpHitAtLeastOnce:: db + +wPlayerTrappingMove:: db +wEnemyTrappingMove:: db +wPlayerWrapCount:: db +wEnemyWrapCount:: db +wPlayerCharging:: db +wEnemyCharging:: db + +wBattleEnded:: db + +wWildMonMoves:: ds NUM_MOVES +wWildMonPP:: ds NUM_MOVES + +wAmuletCoin:: db + +wSomeoneIsRampaging:: db + +wPlayerJustGotFrozen:: db +wEnemyJustGotFrozen:: db +wBattleEnd:: + + +SECTION UNION "Miscellaneous", WRAM0 + +; link patch lists +wPlayerPatchLists:: ds SERIAL_PATCH_LIST_LENGTH +wOTPatchLists:: ds SERIAL_PATCH_LIST_LENGTH + + +SECTION UNION "Miscellaneous", WRAM0 + +; mobile +wMobileTransferData:: ds 480 + + +SECTION UNION "Miscellaneous", WRAM0 + +; This union spans 200 bytes. +UNION +; timeset temp storage +wTimeSetBuffer:: + ds 20 +wInitHourBuffer:: db + ds 9 +wInitMinuteBuffer:: db + ds 19 +wTimeSetBufferEnd:: + +NEXTU +; hall of fame temp struct +wHallOfFameTemp:: hall_of_fame wHallOfFameTemp + +NEXTU +; odd egg +wOddEgg:: party_struct wOddEgg +wOddEggName:: ds MON_NAME_LENGTH +wOddEggOT:: ds NAME_LENGTH + +NEXTU +; debug mon color picker +wDebugMiddleColors:: +wDebugLightColor:: ds 2 +wDebugDarkColor:: ds 2 + ds 6 +wDebugRedChannel:: db +wDebugGreenChannel:: db +wDebugBlueChannel:: db + +NEXTU +; debug tileset color picker +wDebugPalette:: +wDebugWhiteTileColor:: ds 2 +wDebugLightTileColor:: ds 2 +wDebugDarkTileColor:: ds 2 +wDebugBlackTileColor:: ds 2 + +NEXTU +wMobileMonSender:: ds NAME_LENGTH_JAPANESE - 1 +wMobileMon:: party_struct wMobileMon +wMobileMonOT:: ds NAME_LENGTH_JAPANESE - 1 +wMobileMonNick:: ds NAME_LENGTH_JAPANESE - 1 +wMobileMonMail:: mailmsg_jp wMobileMonMail + +NEXTU +wOfferEmail:: ds MOBILE_EMAIL_LENGTH +wOfferTrainerID:: dw +wOfferSecretID:: dw +wOfferGender:: db +wOfferSpecies:: db +wOfferReqGender:: db +wOfferReqSpecies:: db +wOfferMonSender:: ds NAME_LENGTH_JAPANESE - 1 +wOfferMon:: party_struct wOfferMon +wOfferMonOT:: ds NAME_LENGTH_JAPANESE - 1 +wOfferMonNick:: ds NAME_LENGTH_JAPANESE - 1 +wOfferMonMail:: mailmsg_jp wOfferMonMail + +NEXTU +wUnknownGender:: db +wUnknownSpecies:: db +wUnknownReqGender:: db +wUnknownReqSpecies:: db +wUnknownMonSender:: ds NAME_LENGTH_JAPANESE - 1 +wUnknownMon:: party_struct wUnknownMon +wUnknownMonOT:: ds NAME_LENGTH_JAPANESE - 1 +wUnknownMonNick:: ds NAME_LENGTH_JAPANESE - 1 +wUnknownMonMail:: mailmsg_jp wUnknownMonMail + +NEXTU +wc608:: ds 7 +wc60f:: ds 9 +wc618:: ds 48 +wc648:: ds 2 +wc64a:: ds 62 +wc688:: ds 2 +wc68a:: ds 15 +wc699:: ds 15 +wc6a8:: ds 40 +ENDU + +; This union spans 280 bytes. +UNION +; pokedex +wPokedexDataStart:: +wDexListingScrollOffset:: dw ; offset of the first displayed entry from the start +wDexListingCursor:: db ; Dex cursor +wDexListingEnd:: dw ; Last mon to display +wDexListingHeight:: db ; number of entries displayed at once in the dex listing +wCurDexMode:: db ; Pokedex Mode +wDexSearchMonType1:: db ; first type to search +wDexSearchMonType2:: db ; second type to search +wDexSearchResultCount:: dw +wDexArrowCursorPosIndex:: db +wDexArrowCursorDelayCounter:: db +wDexArrowCursorBlinkCounter:: db +wDexSearchSlowpokeFrame:: db +wUnlockedUnownMode:: db +wDexCurUnownIndex:: db +wDexUnownCount:: db +wDexConvertedMonType:: db ; mon type converted from dex search mon type +wDexListingScrollOffsetBackup:: dw +wDexListingCursorBackup:: db +wBackupDexListingCursor:: db +wBackupDexListingPage:: dw +wDexCurLocation:: db +wPokedexStatus:: db +wPokedexDisplayNumber:: dw +wDexLastSeenIndex:: db ; index into wPokedexSeen containing the last non-zero value +wDexLastSeenValue:: db ; value at index +wDexTempCounter:: dw +wPokedexDataEnd:: + +wPrevDexEntry:: dw +wPrevDexEntryBackup:: dw +wPrevDexEntryJumptableIndex:: db + +wPokedexNameBuffer:: ds MON_NAME_LENGTH + ds 231 + +NEXTU +; pokegear +wPokegearPhoneDisplayPosition:: db +wPokegearPhoneCursorPosition:: db +wPokegearPhoneScrollPosition:: db +wPokegearPhoneSelectedPerson:: db +wPokegearPhoneSubmenuCursor:: db +wPokegearMapCursorObjectPointer:: dw +wPokegearMapCursorLandmark:: db +wPokegearMapPlayerIconLandmark:: db +wPokegearRadioChannelBank:: db +wPokegearRadioChannelAddr:: dw +wPokegearRadioMusicPlaying:: db + +NEXTU +; trade +wPlayerTrademon:: trademon wPlayerTrademon +wOTTrademon:: trademon wOTTrademon +wTradeAnimAddress:: dw +wLinkPlayer1Name:: ds NAME_LENGTH +wLinkPlayer2Name:: ds NAME_LENGTH +wLinkTradeSendmonSpecies:: db +wLinkTradeGetmonSpecies:: db + +NEXTU +; naming screen +wNamingScreenDestinationPointer:: dw +wNamingScreenCurNameLength:: db +wNamingScreenMaxNameLength:: db +wNamingScreenType:: db +wNamingScreenCursorObjectPointer:: dw +wNamingScreenLastCharacter:: db +wNamingScreenStringEntryCoord:: dw + +NEXTU +; slot machine +wSlots:: +wReel1:: slot_reel wReel1 +wReel2:: slot_reel wReel2 +wReel3:: slot_reel wReel3 +wReel1Stopped:: ds 3 +wReel2Stopped:: ds 3 +wReel3Stopped:: ds 3 +wSlotBias:: db +wSlotBet:: db +wFirstTwoReelsMatching:: db +wFirstTwoReelsMatchingSevens:: db +wSlotMatched:: db +wCurReelStopped:: ds 3 +wPayout:: dw +wCurReelXCoord:: db +wCurReelYCoord:: db + ds 2 +wSlotBuildingMatch:: db +wSlotsDataEnd:: + ds 28 +wSlotsEnd:: + +NEXTU +; card flip +wDeck:: ds 4 * 6 +wDeckEnd:: +wCardFlipNumCardsPlayed:: db +wCardFlipFaceUpCard:: db +wDiscardPile:: ds 4 * 6 +wDiscardPileEnd:: + +; beta poker game +wBetaPokerSGBPals:: dw + ds 1 +wBetaPokerSGBAttr:: db +wBetaPokerSGBCol:: db +wBetaPokerSGBRow:: db + +NEXTU +; unused memory game +wMemoryGameCards:: ds 9 * 5 +wMemoryGameCardsEnd:: +wMemoryGameLastCardPicked:: db +wMemoryGameCard1:: db +wMemoryGameCard2:: db +wMemoryGameCard1Location:: db +wMemoryGameCard2Location:: db +wMemoryGameNumberTriesRemaining:: db +wMemoryGameLastMatches:: ds 5 +wMemoryGameCounter:: db +wMemoryGameNumCardsMatched:: db + +NEXTU +; unown puzzle +wPuzzlePieces:: ds 6 * 6 + +NEXTU +; mobile data +wc6d0:: ds 56 +wc708:: db +wc709:: db +wc70a:: db +wc70b:: db +wc70c:: db +wc70d:: db +wc70e:: db +wc70f:: db +wc710:: db +wc711:: db +wc712:: ds 7 +wc719:: ds 53 +wc74e:: ds 107 +wc7b9:: ds 1 +wc7ba:: ds 1 +wc7bb:: ds 2 +wc7bd:: ds 19 +wc7d0:: ds 1 +wc7d1:: ds 1 +wc7d2:: ds 1 +wc7d3:: ds 2 +ENDU + + +SECTION "Unused Map Buffer", WRAM0 + +; This was a buffer for map-related pointers in the 1997 G/S prototype. +; See wMapBuffer in pokegold-spaceworld's wram.asm. +wUnusedMapBuffer:: ds 24 +wUnusedMapBufferEnd:: + + +SECTION UNION "Overworld Map", WRAM0 + +; overworld map blocks +wOverworldMapBlocks:: ds 1300 +wOverworldMapBlocksEnd:: + + +SECTION UNION "Overworld Map", WRAM0 + +; GB Printer data +wGameboyPrinterRAM:: +wGameboyPrinter2bppSource:: ds 40 tiles +wGameboyPrinter2bppSourceEnd:: +wUnusedGameboyPrinterSafeCancelFlag:: db +wPrinterRowIndex:: db + +; Printer data +wPrinterData:: ds 4 +wPrinterChecksum:: dw +wPrinterHandshake:: db +wPrinterStatusFlags:: +; bit 7: set if error 1 (battery low) +; bit 6: set if error 4 (too hot or cold) +; bit 5: set if error 3 (paper jammed or empty) +; if this and the previous byte are both $ff: error 2 (connection error) + db + +wHandshakeFrameDelay:: db +wPrinterSerialFrameDelay:: db +wPrinterSendByteOffset:: dw +wPrinterSendByteCounter:: dw + +; tilemap backup? +wPrinterTilemapBuffer:: ds SCREEN_HEIGHT * SCREEN_WIDTH +wPrinterStatus:: db + ds 1 +; High nibble is for margin before the image, low nibble is for after. +wPrinterMargins:: db +wPrinterExposureTime:: db + ds 16 +wGameboyPrinterRAMEnd:: + + +SECTION UNION "Overworld Map", WRAM0 + +; bill's pc data +wBillsPCData:: +wBillsPCPokemonList:: +; (species, box number, list index) x30 + ds 4 * 30 + ds 690 +wBillsPC_ScrollPosition:: db +wBillsPC_CursorPosition:: db +wBillsPC_NumMonsInBox:: db +wBillsPC_NumMonsOnScreen:: db +wBillsPC_LoadedBox:: db ; 0 if party, 1 - 14 if box, 15 if active box +wBillsPC_BackupScrollPosition:: db +wBillsPC_BackupCursorPosition:: db +wBillsPC_BackupLoadedBox:: db +wBillsPC_MonHasMail:: db + ds 5 +wBillsPCDataEnd:: + + +SECTION UNION "Overworld Map", WRAM0 + +; Hall of Fame data +wHallOfFamePokemonList:: hall_of_fame wHallOfFamePokemonList + + +SECTION UNION "Overworld Map", WRAM0 + +; debug color picker +wDebugOriginalColors:: ds 256 * 4 + + +SECTION UNION "Overworld Map", WRAM0 + +; raw link data +wLinkData:: ds 1300 +wLinkDataEnd:: + + +SECTION UNION "Overworld Map", WRAM0 + +; link data members +wLinkPlayerName:: ds NAME_LENGTH +wLinkPartyCount:: db +wLinkPartySpecies:: ds PARTY_LENGTH +wLinkPartyEnd:: db ; older code doesn't check PartyCount + +UNION +; link player data +wLinkPlayerData:: +; wLinkPlayerPartyMon1 - wLinkPlayerPartyMon6 +for n, 1, PARTY_LENGTH + 1 +wLinkPlayerPartyMon{d:n}:: party_struct wLinkPlayerPartyMon{d:n} +endr + +wLinkPlayerPartyMonOTs:: +; wLinkPlayerPartyMon1OT - wLinkPlayerPartyMon6OT +for n, 1, PARTY_LENGTH + 1 +wLinkPlayerPartyMon{d:n}OT:: ds NAME_LENGTH +endr + +wLinkPlayerPartyMonNicknames:: +; wLinkPlayerPartyMon1Nickname - wLinkPlayerPartyMon6Nickname +for n, 1, PARTY_LENGTH + 1 +wLinkPlayerPartyMon{d:n}Nickname:: ds MON_NAME_LENGTH +endr + +NEXTU +; time capsule party data +wTimeCapsulePlayerData:: +; wTimeCapsulePartyMon1 - wTimeCapsulePartyMon6 +for n, 1, PARTY_LENGTH + 1 +wTimeCapsulePartyMon{d:n}:: red_party_struct wTimeCapsulePartyMon{d:n} +endr + +wTimeCapsulePartyMonOTs:: +; wTimeCapsulePartyMon1OT - wTimeCapsulePartyMon6OT +for n, 1, PARTY_LENGTH + 1 +wTimeCapsulePartyMon{d:n}OT:: ds NAME_LENGTH +endr + +wTimeCapsulePartyMonNicknames:: +; wTimeCapsulePartyMon1Nickname - wTimeCapsulePartyMon6Nickname +for n, 1, PARTY_LENGTH + 1 +wTimeCapsulePartyMon{d:n}Nickname:: ds MON_NAME_LENGTH +endr + +ENDU + + +SECTION UNION "Overworld Map", WRAM0 + +; link data prep + ds 1000 +wCurLinkOTPartyMonTypePointer:: dw + +wLinkOTPartyMonTypes:: +; wLinkOTPartyMon1Type - wLinkOTPartyMon6Type +for n, 1, PARTY_LENGTH + 1 +wLinkOTPartyMon{d:n}Type:: dw +endr + + +SECTION UNION "Overworld Map", WRAM0 + +; link mail data + ds 500 +wLinkPlayerMail:: +wLinkPlayerMailPreamble:: ds SERIAL_MAIL_PREAMBLE_LENGTH +wLinkPlayerMailMessages:: ds (MAIL_MSG_LENGTH + 1) * PARTY_LENGTH +wLinkPlayerMailMetadata:: ds (MAIL_STRUCT_LENGTH - (MAIL_MSG_LENGTH + 1)) * PARTY_LENGTH +wLinkPlayerMailPatchSet:: ds 100 + SERIAL_PATCH_PREAMBLE_LENGTH +wLinkPlayerMailEnd:: + ds 10 +wLinkOTMail:: +wLinkOTMailMessages:: ds (MAIL_MSG_LENGTH + 1) * PARTY_LENGTH +wLinkOTMailMetadata:: ds (MAIL_STRUCT_LENGTH - (MAIL_MSG_LENGTH + 1)) * PARTY_LENGTH +wLinkOTMailPatchSet:: ds 100 + SERIAL_PATCH_PREAMBLE_LENGTH +wLinkOTMailPadding:: ds SERIAL_MAIL_PREAMBLE_LENGTH +wLinkOTMailEnd:: + ds 10 + + +SECTION UNION "Overworld Map", WRAM0 + +; received link mail data + ds 500 +wLinkReceivedMail:: ds MAIL_STRUCT_LENGTH * PARTY_LENGTH +wLinkReceivedMailEnd:: db + + +SECTION UNION "Overworld Map", WRAM0 + +; mystery gift data +wMysteryGiftStaging:: ds 80 + +UNION +wMysteryGiftTrainer:: ds 1 + (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 1 +wMysteryGiftTrainerEnd:: + +NEXTU +wNameCardData:: ds NAME_LENGTH + 2 + 2 + 1 + 8 + 12 +wNameCardDataEnd:: + +NEXTU +wMysteryGiftCardHolderName:: ds PLAYER_NAME_LENGTH +ENDU + + ds 138 + +wMysteryGiftPartnerData:: +wMysteryGiftPartnerGameVersion:: db +wMysteryGiftPartnerID:: dw +wMysteryGiftPartnerName:: ds NAME_LENGTH +wMysteryGiftPartnerDexCaught:: db +wMysteryGiftPartnerSentDeco:: db +wMysteryGiftPartnerWhichItem:: db +wMysteryGiftPartnerWhichDeco:: db +wMysteryGiftPartnerBackupItem:: db + ds 1 +wMysteryGiftPartnerDataEnd:: + + ds 60 + +wMysteryGiftPlayerData:: +wMysteryGiftPlayerGameVersion:: db +wMysteryGiftPlayerID:: dw +wMysteryGiftPlayerName:: ds NAME_LENGTH +wMysteryGiftPlayerDexCaught:: db +wMysteryGiftPlayerSentDeco:: db +wMysteryGiftPlayerWhichItem:: db +wMysteryGiftPlayerWhichDeco:: db +wMysteryGiftPlayerBackupItem:: db + ds 1 +wMysteryGiftPlayerDataEnd:: + + +SECTION UNION "Overworld Map", WRAM0 + + ds $200 + +; mystery gift data +wUnusedMysteryGiftStagedDataLength:: db +wMysteryGiftMessageCount:: db +wMysteryGiftStagedDataLength:: db + + +SECTION UNION "Overworld Map", WRAM0 + + ds $200 + +; blank credits tile buffer +wCreditsBlankFrame2bpp:: ds 4 * 4 tiles +wCreditsBlankFrame2bppEnd:: + + +SECTION UNION "Overworld Map", WRAM0 + +; mobile +wc800:: db +wc801:: db +wc802:: db +wc803:: db +wc804:: db +wc805:: db +wc806:: db +wc807:: db +wc808:: dw +wc80a:: db +wc80b:: db +wc80c:: dw +wc80e:: db +wc80f:: db +wc810:: dw +wMobileSDK_PacketChecksum:: dw +wc814:: db +wc815:: db +wc816:: dw +wMobileSDK_AdapterType:: db +wc819:: db +wc81a:: db +wc81b:: db +wc81c:: db +wc81d:: db +wMobileSDK_SendCommandID:: db +wc81f:: db +wc820:: db +wc821:: db +wc822:: db +wc823:: ds 4 +wc827:: dw +wc829:: dw +wc82b:: db +wc82c:: db +wc82d:: db +wc82e:: db +wc82f:: ds 3 +wc832:: db +wc833:: db +wc834:: db +wc835:: db +wc836:: ds 8 +wc83e:: ds 20 +wc852:: ds 20 +wc866:: ds 4 +wc86a:: db +wc86b:: db +wc86c:: db +wc86d:: db +wc86e:: dw +wc870:: db +wc871:: db +wc872:: db +wc873:: db +wc874:: db +wc875:: db +wc876:: db +wc877:: db +wc878:: dw +wc87a:: db +wc87b:: db +wc87c:: db +wc87d:: db +wc87e:: db +wc87f:: db +wc880:: dw +wc882:: db +wc883:: db +wc884:: ds 8 +wc88c:: ds 32 +wc8ac:: ds 26 +wc8c6:: db +wc8c7:: db +wc8c8:: db +wc8c9:: db +wc8ca:: ds 44 +wc8f6:: ds 8 +wc8fe:: db +wc8ff:: ds 15 +wc90e:: ds 8 +wc916:: ds 16 +wc926:: ds 8 +wc92e:: ds 75 +wc979:: db +wc97a:: ds 5 +wc97f:: db +wc980:: db +wc981:: db +wc982:: db +wc983:: dw +wc985:: db +wc986:: db +wc987:: db +wMobileAPIIndex:: db +wc989:: db +wc98a:: db +wc98b:: db +wc98c:: db +wc98d:: db +wc98e:: db +wc98f:: db +wc990:: db +wc991:: db +wc992:: db +wc993:: db +wc994:: db +wc995:: ds 16 +wc9a5:: ds 5 +wc9aa:: db +wc9ab:: db +wc9ac:: db +wc9ad:: db +wc9ae:: db +wc9af:: dw +wc9b1:: db +wc9b2:: ds 3 +wc9b5:: db +wc9b6:: ds 121 + +wMobileSDK_ReceivePacketBufferAlt:: ds 11 +wMobileSDK_ReceivedBytes:: dw +wMobileSDK_ReceivePacketBuffer:: ds 250 +wcb36:: db + ds 16 +wMobileSDK_PacketBuffer:: ds 281 +wcc60:: ds 1 +wcc61:: ds 1 +wcc62:: ds 2 +wcc64:: ds 1 +wcc65:: ds 57 + ds 22 +wccb4:: ds 1 +wccb5:: ds 3 +wccb8:: ds 1 +wccb9:: ds 1 +wccba:: ds 90 + + +if DEF(_DEBUG) +SECTION UNION "Overworld Map", WRAM0 + +; debug room RTC values +wDebugRoomRTCSec:: db +wDebugRoomRTCMin:: db +wDebugRoomRTCHour:: db +wDebugRoomRTCDay:: dw +wDebugRoomRTCCurSec:: db +wDebugRoomRTCCurMin:: db +wDebugRoomRTCCurHour:: db +wDebugRoomRTCCurDay:: dw + +; debug room paged values +wDebugRoomCurPage:: db +wDebugRoomCurValue:: db +wDebugRoomAFunction:: dw +wDebugRoomStartFunction:: dw +wDebugRoomSelectFunction:: dw +wDebugRoomAutoFunction:: dw +wDebugRoomPageCount:: db +wDebugRoomPagesPointer:: dw + +wDebugRoomROMChecksum:: dw +wDebugRoomCurChecksumBank:: db + +UNION +; debug room new item values +wDebugRoomItemID:: db +wDebugRoomItemQuantity:: db +NEXTU +; debug room new pokemon values +wDebugRoomMon:: box_struct wDebugRoomMon +wDebugRoomMonBox:: db +NEXTU +; debug room GB ID values +wDebugRoomGBID:: dw +ENDU + +endc + + +SECTION "Video", WRAM0 + +UNION +; bg map +wBGMapBuffer:: ds 40 +wBGMapPalBuffer:: ds 40 +wBGMapBufferPointers:: ds 20 * 2 +wBGMapBufferEnd:: + +NEXTU +; credits +wCreditsPos:: dw +wCreditsTimer:: db + +NEXTU +; mobile data +wMobileMonSpeciesPointer:: dw +wMobileMonStructPointer:: dw +wMobileMonOTPointer:: dw +wMobileMonNicknamePointer:: dw +wMobileMonMailPointer:: dw + +NEXTU +; more mobile data +wcd20:: ds 1 +wcd21:: ds 1 +wcd22:: ds 1 +wcd23:: ds 1 +wcd24:: ds 1 +wMobileCommsJumptableIndex:: ds 1 +wcd26:: ds 1 +wcd27:: ds 1 +wcd28:: ds 1 +wcd29:: ds 1 + +wMobileMonIndex:: +wMobileMonMiscSpecies:: +wcd2a:: db + +UNION +wTempOddEggNickname:: ds MON_NAME_LENGTH +NEXTU +wcd2b:: ds 1 +wcd2c:: ds 1 +wcd2d:: ds 1 +wcd2e:: ds 1 +wcd2f:: ds 1 +wcd30:: ds 1 +wcd31:: ds 1 +wcd32:: ds 1 +wcd33:: ds 1 +wcd34:: ds 1 +wcd35:: ds 1 +ENDU + +; current time for link/mobile? +wcd36:: db ; hours +wcd37:: db ; mins +wcd38:: db ; secs + +wcd39:: ds 1 +wcd3a:: ds 1 +wcd3b:: ds 1 +wBattleTowerRoomMenu2JumptableIndex:: ds 1 +wcd3d:: ds 1 +wcd3e:: ds 1 +wcd3f:: ds 1 +wcd40:: ds 1 +wcd41:: ds 1 +wcd42:: ds 1 +wcd43:: ds 1 + +; some sort of timer in link battles +wMobileInactivityTimerMinutes:: db ; mins +wMobileInactivityTimerSeconds:: db ; secs +wMobileInactivityTimerFrames:: db ; frames +wcd47:: ds 1 + + ds 1 + +wBTTempOTSprite:: +wcd49:: db + +wcd4a:: ds 1 +wcd4b:: ds 1 + +wEZChatCursorXCoord:: +wcd4c:: db +wEZChatCursorYCoord:: +wcd4d:: db + +wcd4e:: ds 1 +wcd4f:: ds 1 +wcd50:: ds 1 +wcd51:: ds 1 +wcd52:: ds 1 + +wMobileOpponentBattleMessage:: ; ds 12 +wcd53:: ds 1 +wcd54:: ds 1 +wcd55:: ds 1 +wcd56:: ds 1 +wcd57:: ds 1 +wcd58:: ds 1 +wcd59:: ds 1 +wcd5a:: ds 1 +wcd5b:: ds 1 +wcd5c:: ds 1 +wcd5d:: ds 1 +wcd5e:: ds 1 +wcd5f:: ds 1 +wcd60:: ds 2 +wcd62:: ds 1 +wcd63:: ds 1 +wcd64:: ds 1 +wcd65:: ds 1 +wcd66:: ds 1 +wcd67:: ds 1 +wcd68:: ds 1 +wcd69:: ds 1 +wcd6a:: ds 1 +wcd6b:: ds 1 +wcd6c:: ds 1 +wcd6d:: ds 1 +wcd6e:: ds 1 +wcd6f:: ds 1 +wcd70:: ds 1 +wcd71:: ds 1 +wcd72:: ds 1 +wcd73:: ds 1 +wcd74:: ds 1 + +wOTMonSelection:: ds 2 ; ds BATTLETOWER_PARTY_LENGTH +wcd77:: ds 1 + +wMobileCrashCheckPointer:: dw +wcd7a:: ds 2 +wcd7c:: ds 3 +wcd7f:: ds 1 +wcd80:: ds 1 +wcd81:: ds 1 +wcd82:: ds 1 +wcd83:: ds 1 +wcd84:: ds 1 +wcd85:: ds 4 +wcd89:: ds 1 +wcd8a:: ds 1 +wcd8b:: ds 1 +wcd8c:: ds 1 +wcd8d:: ds 11 +ENDU + +wDefaultSGBLayout:: db + +wPlayerHPPal:: db +wEnemyHPPal:: db + +wHPPals:: ds PARTY_LENGTH +wCurHPPal:: db + + ds 7 + +wSGBPals:: ds 48 + +wAttrmap:: +; 20x18 grid of bg tile attributes for 8x8 tiles +; read horizontally from the top row +; bit 7: priority +; bit 6: y flip +; bit 5: x flip +; bit 4: pal # (non-cgb) +; bit 3: vram bank (cgb only) +; bit 2-0: pal # (cgb only) + ds SCREEN_WIDTH * SCREEN_HEIGHT +wAttrmapEnd:: + +UNION +; addresses dealing with serial comms + ds 1 +wcf42:: db + ds 1 +wcf44:: db +wcf45:: db + +NEXTU +wTileAnimBuffer:: ds 1 tiles +ENDU + +; link data +UNION +wOtherPlayerLinkMode:: db +wOtherPlayerLinkAction:: db + ds 3 +wPlayerLinkAction:: db +wUnusedLinkAction:: db + ds 3 +NEXTU +wLinkReceivedSyncBuffer:: ds 5 +wLinkPlayerSyncBuffer:: ds 5 +ENDU +wLinkTimeoutFrames:: dw +wLinkByteTimeout:: dw + +wMonType:: db + +wCurSpecies:: db + +wNamedObjectType:: db + + ds 1 + +wJumptableIndex:: +wBattleTowerBattleEnded:: + db + +UNION +; intro data +wIntroSceneFrameCounter:: db +wIntroSceneTimer:: db + +NEXTU +; title data +wTitleScreenSelectedOption:: db +wTitleScreenTimer:: dw + +NEXTU +; credits data +wCreditsBorderFrame:: db +wCreditsBorderMon:: db +wCreditsLYOverride:: db + +NEXTU +; pokegear +wPokegearCard:: db +wPokegearMapRegion:: db +wUnusedPokegearByte:: db + +NEXTU +; pack +wPackJumptableIndex:: db +wCurPocket:: db +wPackUsedItem:: db + +NEXTU +; trainer card badges +wTrainerCardBadgeFrameCounter:: db +wTrainerCardBadgeTileID:: db +wTrainerCardBadgeAttributes:: db + +NEXTU +; slot machine +wSlotsDelay:: db + ds 1 +wUnusedSlotReelIconDelay:: db + +NEXTU +; card flip +wCardFlipCursorY:: db +wCardFlipCursorX:: db +wCardFlipWhichCard:: db + +NEXTU +; unused memory game +wMemoryGameCardChoice:: db + +NEXTU +; magnet train +wMagnetTrainOffset:: db +wMagnetTrainPosition:: db +wMagnetTrainWaitCounter:: db + +NEXTU +; unown puzzle data +wHoldingUnownPuzzlePiece:: db +wUnownPuzzleCursorPosition:: db +wUnownPuzzleHeldPiece:: db + +NEXTU +; battle transitions +wBattleTransitionCounter:: db +wBattleTransitionSineWaveOffset:: +wBattleTransitionSpinQuadrant:: db + +NEXTU +; bill's pc +wUnusedBillsPCData:: ds 3 + +NEXTU +; debug mon color picker +wDebugColorRGBJumptableIndex:: db +wDebugColorCurColor:: db +wDebugColorCurMon:: db + +NEXTU +; debug tileset color picker +wDebugTilesetCurPalette:: db +wDebugTilesetRGBJumptableIndex:: db +wDebugTilesetCurColor:: db + +NEXTU +; stats screen +wStatsScreenFlags:: db + +NEXTU +; battle tower +wNrOfBeatenBattleTowerTrainers:: db + ds 1 +wBattleTowerRoomMenuJumptableIndex:: db + +NEXTU +; miscellaneous +wFrameCounter:: +wMomBankDigitCursorPosition:: +wNamingScreenLetterCase:: +wHallOfFameMonCounter:: +wTradeDialog:: + db +wFrameCounter2:: +wPrinterQueueLength:: +wUnusedSGB1eColorOffset:: + db +wUnusedTradeAnimPlayEvolutionMusic:: db + +NEXTU +; mobile +wcf64:: db +wcf65:: db +wcf66:: db +ENDU + +wRequested2bppSize:: db +wRequested2bppSource:: dw +wRequested2bppDest:: dw + +wRequested1bppSize:: db +wRequested1bppSource:: dw +wRequested1bppDest:: dw + +wMenuMetadata:: +wWindowStackPointer:: dw +wMenuJoypad:: db +wMenuSelection:: db +wMenuSelectionQuantity:: db +wWhichIndexSet:: db +wScrollingMenuCursorPosition:: db +wWindowStackSize:: db + ds 8 +wMenuMetadataEnd:: + +; menu header +wMenuHeader:: +wMenuFlags:: db +wMenuBorderTopCoord:: db +wMenuBorderLeftCoord:: db +wMenuBorderBottomCoord:: db +wMenuBorderRightCoord:: db +wMenuDataPointer:: dw +wMenuCursorPosition:: db + ds 1 +wMenuDataBank:: db + ds 6 +wMenuHeaderEnd:: + +wMenuData:: +wMenuDataFlags:: db + +UNION +; Vertical Menu/DoNthMenu/SetUpMenu +wMenuDataItems:: db +wMenuDataIndicesPointer:: dw +wMenuDataDisplayFunctionPointer:: dw +wMenuDataPointerTableAddr:: dw + +NEXTU +; 2D Menu +wMenuData_2DMenuDimensions:: db +wMenuData_2DMenuSpacing:: db +wMenuData_2DMenuItemStringsBank:: db +wMenuData_2DMenuItemStringsAddr:: dw +wMenuData_2DMenuFunctionBank:: db +wMenuData_2DMenuFunctionAddr:: dw + +NEXTU +; Scrolling Menu +wMenuData_ScrollingMenuHeight:: db +wMenuData_ScrollingMenuWidth:: db +wMenuData_ScrollingMenuItemFormat:: db +wMenuData_ItemsPointerBank:: db +wMenuData_ItemsPointerAddr:: dw +wMenuData_ScrollingMenuFunction1:: ds 3 +wMenuData_ScrollingMenuFunction2:: ds 3 +wMenuData_ScrollingMenuFunction3:: ds 3 +ENDU +wMenuDataEnd:: + +wMoreMenuData:: +w2DMenuData:: +w2DMenuCursorInitY:: db +w2DMenuCursorInitX:: db +w2DMenuNumRows:: db +w2DMenuNumCols:: db +w2DMenuFlags1:: +; bit 7: Disable checking of wMenuJoypadFilter +; bit 6: Enable sprite animations +; bit 5: Wrap around vertically +; bit 4: Wrap around horizontally +; bit 3: Set bit 7 in w2DMenuFlags2 and exit the loop if bit 5 is disabled and we tried to go too far down +; bit 2: Set bit 7 in w2DMenuFlags2 and exit the loop if bit 5 is disabled and we tried to go too far up +; bit 1: Set bit 7 in w2DMenuFlags2 and exit the loop if bit 4 is disabled and we tried to go too far left +; bit 0: Set bit 7 in w2DMenuFlags2 and exit the loop if bit 4 is disabled and we tried to go too far right + db +w2DMenuFlags2:: db +w2DMenuCursorOffsets:: db +wMenuJoypadFilter:: db +w2DMenuDataEnd:: + +wMenuCursorY:: db +wMenuCursorX:: db +wCursorOffCharacter:: db +wCursorCurrentTile:: dw + ds 3 +wMoreMenuDataEnd:: + +wOverworldDelay:: db +wTextDelayFrames:: db +wVBlankOccurred:: db + +wPredefID:: db +wPredefHL:: dw +wPredefAddress:: dw +wFarCallBC:: dw + +wUnusedLinkCommunicationByte:: db + +wGameTimerPaused:: +; bit 0: game timer paused +; bit 7: something mobile + db + + ds 1 + +wJoypadDisable:: +; bits 4, 6, or 7 can be used to disable joypad input +; bit 4 +; bit 6: ongoing mon faint animation +; bit 7: ongoing sgb data transfer + db + + ds 1 + +wInBattleTowerBattle:: +; 0 not in BattleTower-Battle +; 1 BattleTower-Battle + db + + ds 1 + +wFXAnimID:: dw + +wPlaceBallsX:: db +wPlaceBallsY:: db + +wTileAnimationTimer:: db + +; palette backups? +wBGP:: db +wOBP0:: db +wOBP1:: db + +wNumHits:: db + + ds 1 + +wOptions:: +; bit 0-2: number of frames to delay when printing text +; fast 1; mid 3; slow 5 +; bit 3: ? +; bit 4: no text delay +; bit 5: stereo off/on +; bit 6: battle style shift/set +; bit 7: battle scene off/on + db +wSaveFileExists:: db +wTextboxFrame:: +; bits 0-2: textbox frame 0-7 + db +wTextboxFlags:: +; bit 0: 1-frame text delay +; bit 4: no text delay + db +wGBPrinterBrightness:: +; bit 0-6: brightness +; lightest: $00 +; lighter: $20 +; normal: $40 (default) +; darker: $60 +; darkest: $7F + db +wOptions2:: +; bit 1: menu account off/on + db + ds 2 +wOptionsEnd:: + +; Time buffer, for counting the amount of time since +; an event began. +wSecondsSince:: db +wMinutesSince:: db +wHoursSince:: db +wDaysSince:: db + + ds 7 + +wTempLoopCounter:: db + + +SECTION "16-bit WRAM home data", WRAM0 +; align to $20 + +wConversionTableBitmap:: ds $20 + + +SECTION "WRAM 1", WRAMX + +wGBCOnlyDecompressBuffer:: ; a $540-byte buffer that continues past this SECTION + +wBetaTitleSequenceOpeningType:: +; This selected the title screen animation (fire/notes) in pokegold-spaceworld. + db + +wDefaultSpawnpoint:: db + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; mon buffer +wBufferMonNickname:: ds MON_NAME_LENGTH +wBufferMonOT:: ds NAME_LENGTH +wBufferMon:: party_struct wBufferMon + ds 8 +wMonOrItemNameBuffer:: ds NAME_LENGTH + ds NAME_LENGTH + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; poke seer +wSeerAction:: db +wSeerNickname:: ds MON_NAME_LENGTH +wSeerCaughtLocation:: ds 17 +wSeerTimeOfDay:: ds NAME_LENGTH +wSeerOT:: ds NAME_LENGTH +wSeerOTGrammar:: db +wSeerCaughtLevelString:: ds 4 +wSeerCaughtLevel:: db +wSeerCaughtData:: db +wSeerCaughtGender:: db + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; mail temp storage +wTempMail:: mailmsg wTempMail + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; bug-catching contest +wBugContestResults:: + bugcontestwinner wBugContestFirstPlace + bugcontestwinner wBugContestSecondPlace + bugcontestwinner wBugContestThirdPlace +wBugContestWinnersEnd:: + bugcontestwinner wBugContestTemp + ds 4 +wBugContestWinnerName:: ds NAME_LENGTH + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; mart items +wMartItem1BCD:: ds 3 +wMartItem2BCD:: ds 3 +wMartItem3BCD:: ds 3 +wMartItem4BCD:: ds 3 +wMartItem5BCD:: ds 3 +wMartItem6BCD:: ds 3 +wMartItem7BCD:: ds 3 +wMartItem8BCD:: ds 3 +wMartItem9BCD:: ds 3 +wMartItem10BCD:: ds 3 + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; town map data +wTownMapPlayerIconLandmark:: db +UNION +wTownMapCursorLandmark:: db +wTownMapCursorObjectPointer:: dw +NEXTU +wTownMapCursorCoordinates:: dw +wStartFlypoint:: db +wEndFlypoint:: db +ENDU + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; phone call data +wPhoneScriptBank:: db +wPhoneCaller:: dw + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; radio data +wCurRadioLine:: db +wNextRadioLine:: db +wRadioTextDelay:: db +wNumRadioLinesPrinted:: db +wOaksPKMNTalkSegmentCounter:: db + ds 5 +wRadioText:: ds 2 * SCREEN_WIDTH + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; lucky number show +wLuckyNumberDigitsBuffer:: ds 5 + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; movement buffer data +wMovementBufferCount:: db +wMovementBufferObject:: db +wUnusedMovementBufferBank:: db +wUnusedMovementBufferPointer:: dw +wMovementBuffer:: ds 55 + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; box printing +wWhichBoxMonToPrint:: db +wFinishedPrintingBox:: db +wAddrOfBoxToPrint:: dw +wBankOfBoxToPrint:: db +wWhichBoxToPrint:: db + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; Unown printing +wPrintedUnownTileSource:: ds 1 tiles +wPrintedUnownTileDest:: ds 1 tiles + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; trainer HUD data + ds 1 +wPlaceBallsDirection:: db +wTrainerHUDTiles:: ds 4 + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; mobile participant nicknames + ds 4 +wMobileParticipant1Nickname:: ds NAME_LENGTH_JAPANESE +wMobileParticipant2Nickname:: ds NAME_LENGTH_JAPANESE +wMobileParticipant3Nickname:: ds NAME_LENGTH_JAPANESE + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; battle exp gain +wExperienceGained:: ds 3 + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; earthquake data buffer +wEarthquakeMovementDataBuffer:: ds 5 + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; switching items in pack +wSwitchItemBuffer:: ds 2 ; may store 1 or 2 bytes + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; switching pokemon in party +; may store a name, partymon, or mail +wSwitchMonBuffer:: +UNION + ds NAME_LENGTH +NEXTU + ds PARTYMON_STRUCT_LENGTH +NEXTU + ds MAIL_STRUCT_LENGTH +ENDU + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; giving pokemon mail +wMonMailMessageBuffer:: ds MAIL_MSG_LENGTH + 1 + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; bill's pc +UNION +wBoxNameBuffer:: ds BOX_NAME_LENGTH +NEXTU + ds 1 +wBillsPCTempListIndex:: db +wBillsPCTempBoxCount:: db +ENDU + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; prof. oak's pc +wTempPokedexSeenCount:: db +wTempPokedexCaughtCount:: db + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; player's room pc +UNION +wDecoNameBuffer:: ds ITEM_NAME_LENGTH +NEXTU +wNumOwnedDecoCategories:: db +wOwnedDecoCategories:: ds 16 +ENDU + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; trade +wCurTradePartyMon:: db +wCurOTTradePartyMon:: db +wBufferTrademonNickname:: ds MON_NAME_LENGTH + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; link battle record data +wLinkBattleRecordBuffer:: +wLinkBattleRecordName:: ds NAME_LENGTH +wLinkBattleRecordWins:: dw +wLinkBattleRecordLosses:: dw +wLinkBattleRecordDraws:: dw + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; miscellaneous +wTempDayOfWeek:: +wPrevPartyLevel:: +wCurBeatUpPartyMon:: +wUnownPuzzleCornerTile:: +wKeepSevenBiasChance:: +wPokeFluteCuredSleep:: +wTempRestorePPItem:: +wApricorns:: +wSuicuneFrame:: + db + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; debug color picker +wDebugColorIsTrainer:: db +wDebugColorIsShiny:: db +wDebugColorCurTMHM:: db + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; mobile? +wd002:: ds 1 +wd003:: ds 1 +wd004:: ds 1 + ds 3 +wd008:: ds 2 + ds 6 +wd010:: ds 1 +wd011:: ds 1 +wd012:: ds 1 +wd013:: ds 1 +wd014:: ds 2 + ds 1 +wd017:: ds 1 +wd018:: ds 1 +wd019:: ds 1 + ds 19 +wd02d:: ds 1 +wd02e:: ds 1 +wd02f:: ds 1 +wd030:: ds 1 +wd031:: ds 1 +wd032:: ds 1 +wd033:: ds 1 +wd034:: ds 2 +wd036:: ds 2 + + +SECTION UNION "Miscellaneous WRAM 1", WRAMX + +; Every previous SECTION UNION takes up 60 or fewer bytes, +; except the initial "mon buffer" one. + ds 60 + +UNION +; trainer data +wSeenTrainerBank:: db +wSeenTrainerDistance:: db +wSeenTrainerDirection:: db +wTempTrainer:: +wTempTrainerEventFlag:: dw +wTempTrainerClass:: db +wTempTrainerID:: db +wSeenTextPointer:: dw +wWinTextPointer:: dw +wLossTextPointer:: dw +wScriptAfterPointer:: dw +wRunningTrainerBattleScript:: db +wTempTrainerEnd:: + +NEXTU +; menu items list +wMenuItemsList:: ds 16 +wMenuItemsListEnd:: + +NEXTU +; fruit tree data +wCurFruitTree:: db +wCurFruit:: db + +NEXTU +; item ball data +wItemBallData:: +wItemBallItemID:: db +wItemBallQuantity:: db +wItemBallDataEnd:: + +NEXTU +; hidden item data +wHiddenItemData:: +wHiddenItemEvent:: dw +wHiddenItemID:: db +wHiddenItemDataEnd:: + +NEXTU +; elevator data +wElevatorData:: +wElevatorPointerBank:: db +wElevatorPointer:: dw +wElevatorOriginFloor:: db +wElevatorDataEnd:: + +NEXTU +; coord event data +wCurCoordEvent:: +wCurCoordEventSceneID:: db +wCurCoordEventMapY:: db +wCurCoordEventMapX:: db + ds 1 +wCurCoordEventScriptAddr:: dw + +NEXTU +; BG event data +wCurBGEvent:: +wCurBGEventYCoord:: db +wCurBGEventXCoord:: db +wCurBGEventType:: db +wCurBGEventScriptAddr:: dw + +NEXTU +; mart data +wMartType:: db +wMartPointerBank:: db +wMartPointer:: dw +wMartJumptableIndex:: db +wBargainShopFlags:: db + +NEXTU +; player movement data +wCurInput:: +wFacingTileID:: db +wWalkingIntoNPC:: db +wWalkingIntoLand:: db +wWalkingIntoEdgeWarp:: db +wMovementAnimation:: db +wWalkingDirection:: db +wFacingDirection:: db +wWalkingX:: db +wWalkingY:: db +wWalkingTile:: db + ds 6 +wPlayerTurningDirection:: db + +NEXTU +; std script buffer + ds 1 +wJumpStdScriptBuffer:: ds 3 + +NEXTU +; phone script data +wCheckedTime:: db +wPhoneListIndex:: db +wNumAvailableCallers:: db +wAvailableCallers:: ds CONTACT_LIST_SIZE + +NEXTU +; phone caller contact + ds 1 +wCallerContact:: ds PHONE_CONTACT_SIZE + +NEXTU +; backup menu data + ds 7 +wMenuCursorPositionBackup:: db +wMenuScrollPositionBackup:: db + +NEXTU +; poison step data +wPoisonStepData:: +wPoisonStepFlagSum:: db +wPoisonStepPartyFlags:: ds PARTY_LENGTH +wPoisonStepDataEnd:: +ENDU + + ds 23 + + +SECTION "More WRAM 1", WRAMX + +wTMHMMoveNameBackup:: ds MOVE_NAME_LENGTH + +wStringBuffer1:: ds STRING_BUFFER_LENGTH +wStringBuffer2:: ds STRING_BUFFER_LENGTH +wStringBuffer3:: ds STRING_BUFFER_LENGTH +wStringBuffer4:: ds STRING_BUFFER_LENGTH +wStringBuffer5:: ds STRING_BUFFER_LENGTH + +wBattleMenuCursorPosition:: db + + ds 1 + +wCurBattleMon:: +; index of the player's mon currently in battle (0-5) + db + +wCurMoveNum:: db + +wLastPocket:: db + +wPCItemsCursor:: db +wPartyMenuCursor:: db +wItemsPocketCursor:: db +wKeyItemsPocketCursor:: db +wBallsPocketCursor:: db +wTMHMPocketCursor:: db + +wPCItemsScrollPosition:: db + ds 1 +wItemsPocketScrollPosition:: db +wKeyItemsPocketScrollPosition:: db +wBallsPocketScrollPosition:: db +wTMHMPocketScrollPosition:: db + +wSwitchMon:: +wSwitchItem:: +wSwappingMove:: +wd0e3:: ; mobile + db + +wMenuScrollPosition:: ds 4 + +wQueuedScriptBank:: db +wQueuedScriptAddr:: dw + +wNumMoves:: db + +wFieldMoveSucceeded:: +wItemEffectSucceeded:: +wBattlePlayerAction:: +; 0 - use move +; 1 - use item +; 2 - switch +wSolvedUnownPuzzle:: + db + +wVramState:: +; bit 0: overworld sprite updating on/off +; bit 1: something to do with sprite updates +; bit 6: something to do with text +; bit 7: on when surf initiates +; flickers when climbing waterfall + db + +wBattleResult:: +; WIN, LOSE, or DRAW +; bit 6: caught celebi +; bit 7: box full + db +wUsingItemWithSelect:: db + +UNION +; mart data +wCurMartCount:: db +wCurMartItems:: ds 15 + +NEXTU +; elevator data +wCurElevatorCount:: db +wCurElevatorFloors:: ds 15 + +NEXTU +; mailbox data +wCurMessageScrollPosition:: db +wCurMessageIndex:: db +wMailboxCount:: db +wMailboxItems:: ds MAILBOX_CAPACITY +ENDU + +wListPointer:: dw +wUnusedNamesPointer:: dw + +wItemAttributesPointer:: dw + +wCurItem:: db +wCurItemQuantity:: +wMartItemID:: + db + +wCurPartySpecies:: db + +wCurPartyMon:: +; index of mon's party location (0-5) + db + +wWhichHPBar:: +; 0: Enemy +; 1: Player +; 2: Party Menu + db + +wPokemonWithdrawDepositParameter:: +; 0: Take from PC +; 1: Put into PC +; 2: Take from Day-Care +; 3: Put into Day-Care + db + +wItemQuantityChange:: db +wItemQuantity:: db + +wTempMon:: party_struct wTempMon + +wSpriteFlags:: db + +wHandlePlayerStep:: db + + ds 1 + +wPartyMenuActionText:: db + +wItemAttributeValue:: db + +wCurPartyLevel:: db + +wScrollingMenuListSize:: db + + ds 1 + +; used when following a map warp +wNextWarp:: db +wNextMapGroup:: db +wNextMapNumber:: db +wPrevWarp:: db +wPrevMapGroup:: db +wPrevMapNumber:: db + +wPlayerBGMapOffsetX:: db ; used in FollowNotExact; unit is pixels +wPlayerBGMapOffsetY:: db ; used in FollowNotExact; unit is pixels + +; Player movement +wPlayerStepVectorX:: db +wPlayerStepVectorY:: db +wPlayerStepFlags:: db +wPlayerStepDirection:: db + +wBGMapAnchor:: dw + +UNION +wUsedSprites:: ds SPRITE_GFX_LIST_CAPACITY * 2 +wUsedSpritesEnd:: + +NEXTU + ds 31 +wd173:: db ; related to command queue type 3 +ENDU + +wOverworldMapAnchor:: dw +wPlayerMetatileY:: db +wPlayerMetatileX:: db + +wMapPartial:: +wMapAttributesBank:: db +wMapTileset:: db +wEnvironment:: db +wMapAttributesPointer:: dw +wMapPartialEnd:: + +wMapAttributes:: +wMapBorderBlock:: db +; width/height are in blocks (2x2 walkable tiles, 4x4 graphics tiles) +wMapHeight:: db +wMapWidth:: db +wMapBlocksBank:: db +wMapBlocksPointer:: dw +wMapScriptsBank:: db +wMapScriptsPointer:: dw +wMapEventsPointer:: dw +; bit set +wMapConnections:: db +wMapAttributesEnd:: + +wNorthMapConnection:: map_connection_struct wNorth +wSouthMapConnection:: map_connection_struct wSouth +wWestMapConnection:: map_connection_struct wWest +wEastMapConnection:: map_connection_struct wEast + +wTileset:: +wTilesetBank:: db +wTilesetAddress:: dw +wTilesetBlocksBank:: db +wTilesetBlocksAddress:: dw +wTilesetCollisionBank:: db +wTilesetCollisionAddress:: dw +wTilesetAnim:: dw ; bank 3f + ds 2 ; unused +wTilesetPalettes:: dw ; bank 3f +wTilesetEnd:: + assert wTilesetEnd - wTileset == TILESET_LENGTH + +wEvolvableFlags:: flag_array PARTY_LENGTH + +wForceEvolution:: db + +UNION +; general-purpose HP buffers +wHPBuffer1:: dw +wHPBuffer2:: dw +wHPBuffer3:: dw + +NEXTU +; HP bar animations +wCurHPAnimMaxHP:: dw +wCurHPAnimOldHP:: dw +wCurHPAnimNewHP:: dw +wCurHPAnimPal:: db +wCurHPBarPixels:: db +wNewHPBarPixels:: db +wCurHPAnimDeltaHP:: dw +wCurHPAnimLowHP:: db +wCurHPAnimHighHP:: db + +NEXTU +; move AI +wEnemyAIMoveScores:: ds NUM_MOVES + +NEXTU +; switch AI +wEnemyEffectivenessVsPlayerMons:: flag_array PARTY_LENGTH +wPlayerEffectivenessVsEnemyMons:: flag_array PARTY_LENGTH + +NEXTU +; battle HUD +wBattleHUDTiles:: ds PARTY_LENGTH + +NEXTU +; thrown ball data +wFinalCatchRate:: db +wThrownBallWobbleCount:: db + +NEXTU +; evolution data +wEvolutionOldSpecies:: db +wEvolutionNewSpecies:: db +wEvolutionPicOffset:: db +wEvolutionCanceled:: db + +NEXTU +; experience +wExpToNextLevel:: ds 3 + +NEXTU +; PP Up +wPPUpPPBuffer:: ds NUM_MOVES + +NEXTU +; lucky number show +wMonIDDigitsBuffer:: ds 5 + +NEXTU +; mon submenu +wMonSubmenuCount:: db +wMonSubmenuItems:: ds NUM_MONMENU_ITEMS + 1 + +NEXTU +; field move data +wFieldMoveData:: +wFieldMoveJumptableIndex:: db +wEscapeRopeOrDigType:: +wSurfingPlayerState:: +wFishingRodUsed:: db +wCutWhirlpoolOverworldBlockAddr:: dw +wCutWhirlpoolReplacementBlock:: db +wCutWhirlpoolAnimationType:: +wStrengthSpecies:: +wFishingResult:: db + ds 1 +wFieldMoveDataEnd:: + +NEXTU +; hidden items +wCurMapScriptBank:: db +wRemainingBGEventCount:: db +wBottomRightYCoord:: db +wBottomRightXCoord:: db + +NEXTU +; heal machine anim +wHealMachineAnimType:: db +wHealMachineTempOBP1:: db +wHealMachineAnimState:: db + +NEXTU +; decorations +wCurDecoration:: db +wSelectedDecorationSide:: db +wSelectedDecoration:: db +wOtherDecoration:: db +wChangedDecorations:: db +wCurDecorationCategory:: db + +NEXTU +; withdraw/deposit items +wPCItemQuantityChange:: db +wPCItemQuantity:: db + +NEXTU +; mail +wCurMailAuthorID:: dw +wCurMailIndex:: db + +NEXTU +; kurt +wKurtApricornCount:: db +wKurtApricornItems:: ds 10 + +NEXTU +; tree mons +wTreeMonCoordScore:: db +wTreeMonOTIDScore:: db + +NEXTU +; restart clock +wRestartClockCurDivision:: db +wRestartClockPrevDivision:: db +wRestartClockUpArrowYCoord:: db +wRestartClockDay:: db +wRestartClockHour:: db +wRestartClockMin:: db + +NEXTU +; link + ds 9 +wLinkBattleRNPreamble:: ds SERIAL_RN_PREAMBLE_LENGTH +wLinkBattleRNs:: ds SERIAL_RNS_LENGTH + +NEXTU +; mobile +wd1ea:: ds 1 +wd1eb:: ds 1 +wd1ec:: ds 1 +wd1ed:: ds 1 +wd1ee:: ds 1 +wd1ef:: ds 1 +wd1f0:: ds 1 +wd1f1:: ds 1 +wd1f2:: ds 1 +wd1f3:: ds 1 + ds 6 + +NEXTU +; miscellaneous bytes +wSkipMovesBeforeLevelUp:: +wRegisteredPhoneNumbers:: +wListMovesLineSpacing:: db +wSwitchMonTo:: db +wSwitchMonFrom:: db + ds 4 +wCurEnemyItem:: db + +NEXTU +; miscellaneous words +wBuySellItemPrice:: +wTempMysteryGiftTimer:: +wMagikarpLength:: dw + +NEXTU +; 16-bit wram + ds 13 +wOtherTrainerType:: db +wTrainerGroupBank:: db + +ENDU + +wTempEnemyMonSpecies:: db +wTempBattleMonSpecies:: db + +UNION +wOTLinkBattleRNData:: ds SERIAL_RN_PREAMBLE_LENGTH + SERIAL_RNS_LENGTH +NEXTU +wEnemyMon:: battle_struct wEnemyMon +wEnemyMonBaseStats:: ds NUM_EXP_STATS +wEnemyMonCatchRate:: db +wEnemyMonBaseExp:: db +wEnemyMonEnd:: +ENDU + +wBattleMode:: +; 0: overworld +; 1: wild battle +; 2: trainer battle + db + +wTempWildMonSpecies:: db + +wOtherTrainerClass:: +; class (Youngster, Bug Catcher, etc.) of opposing trainer +; 0 if opponent is a wild Pokémon, not a trainer + db + +; BATTLETYPE_* values +wBattleType:: db + +wOtherTrainerID:: +; which trainer of the class that you're fighting +; (Joey, Mikey, Albert, etc.) + db + +wForcedSwitch:: db + +wTrainerClass:: db + +wUnownLetter:: db + +wMoveSelectionMenuType:: db + +; corresponds to the data/pokemon/base_stats/*.asm contents +wCurBaseData:: +wBaseSpecies:: db +wBaseStats:: +wBaseHP:: db +wBaseAttack:: db +wBaseDefense:: db +wBaseSpeed:: db +wBaseSpecialAttack:: db +wBaseSpecialDefense:: db +wBaseType:: +wBaseType1:: db +wBaseType2:: db +wBaseCatchRate:: db +wBaseExp:: db +wBaseItems:: +wBaseItem1:: db +wBaseItem2:: db +wBaseGender:: db +wBaseUnknown1:: db +wBaseEggSteps:: db +wBaseUnknown2:: db +wBasePicSize:: db +wBaseUnusedFrontpic:: dw +wBaseUnusedBackpic:: dw +wBaseGrowthRate:: db +wBaseEggGroups:: db +wBaseTMHM:: flag_array NUM_TM_HM_TUTOR +wCurBaseDataEnd:: + assert wCurBaseDataEnd - wCurBaseData == BASE_DATA_SIZE + +wCurDamage:: dw + + ds 2 + +wMornEncounterRate:: db +wDayEncounterRate:: db +wNiteEncounterRate:: db +wWaterEncounterRate:: db +wListMoves_MoveIndicesBuffer:: ds NUM_MOVES +wPutativeTMHMMove:: db +wInitListType:: db +wBattleHasJustStarted:: db + +wNamedObjectIndex:: +wTextDecimalByte:: +wTempByteValue:: +wNumSetBits:: +wTypeMatchup:: +wCurType:: +wTempSpecies:: +wTempIconSpecies:: +wTempTMHM:: +wTempPP:: +wNextBoxOrPartyIndex:: +wChosenCableClubRoom:: +wBreedingCompatibility:: +wApplyStatLevelMultipliersToEnemy:: +wUsePPUp:: +wd265:: ; mobile + db + +wFailedToFlee:: db +wNumFleeAttempts:: db +wMonTriedToEvolve:: db + +wTimeOfDay:: db + + ds 1 + + +SECTION "Enemy Party", WRAMX + +UNION +wPokedexShowPointerAddr:: dw +wPokedexShowPointerBank:: db + ds 3 +wd271:: dw ; mobile + +NEXTU +wUnusedEggHatchFlag:: db + +NEXTU +; enemy party +wOTPartyData:: +wOTPlayerName:: ds NAME_LENGTH +wOTPlayerID:: dw + ds 8 +wOTPartyCount:: db +wOTPartySpecies:: ds PARTY_LENGTH +wOTPartyEnd:: db ; older code doesn't check PartyCount +ENDU + +UNION +; ot party mons +wOTPartyMons:: +; wOTPartyMon1 - wOTPartyMon6 +for n, 1, PARTY_LENGTH + 1 +wOTPartyMon{d:n}:: party_struct wOTPartyMon{d:n} +endr + +wOTPartyMonOTs:: +; wOTPartyMon1OT - wOTPartyMon6OT +for n, 1, PARTY_LENGTH + 1 +wOTPartyMon{d:n}OT:: ds NAME_LENGTH +endr + +wOTPartyMonNicknames:: +; wOTPartyMon1Nickname - wOTPartyMon6Nickname +for n, 1, PARTY_LENGTH + 1 +wOTPartyMon{d:n}Nickname:: ds MON_NAME_LENGTH +endr +wOTPartyDataEnd:: + +NEXTU +; catch tutorial dude pack +wDudeNumItems:: db +wDudeItems:: ds 2 * 4 + 1 + +wDudeNumKeyItems:: db +wDudeKeyItems:: ds 18 + 1 + +wDudeNumBalls:: db +wDudeBalls:: ds 2 * 4 + 1 +ENDU + + ds 4 + +wd430:: ; mobile +wBattleAction:: db + +wLinkBattleSentAction:: db +wMapStatus:: db +wMapEventStatus:: db + +wScriptFlags:: +; bit 3: run deferred script + db + ds 1 +wScriptFlags2:: +; bit 0: count steps +; bit 1: coord events +; bit 2: warps and connections +; bit 4: wild encounters +; bit 5: unknown + db + +wScriptMode:: db +wScriptRunning:: db +wScriptBank:: db +wScriptPos:: dw + +wScriptStackSize:: db +wScriptStack:: ds 3 * 5 + ds 1 +wScriptDelay:: db + +wDeferredScriptBank:: +wScriptTextBank:: + db +wDeferredScriptAddr:: +wScriptTextAddr:: + dw + ds 1 +wWildEncounterCooldown:: db + +wXYComparePointer:: dw + ds 4 + +wBattleScriptFlags:: db + ds 1 +wPlayerSpriteSetupFlags:: +; bit 7: if set, cancel wPlayerAction +; bit 6: RefreshMapSprites doesn't reload player sprite +; bit 5: if set, set facing according to bits 0-1 +; bit 2: female player has been transformed into male +; bits 0-1: direction facing + db + +wMapReentryScriptQueueFlag:: db +wMapReentryScriptBank:: db +wMapReentryScriptAddress:: dw + + ds 4 + +wTimeCyclesSinceLastCall:: db +wReceiveCallDelay_MinsRemaining:: db +wReceiveCallDelay_StartTime:: ds 3 + + ds 3 + +wBugContestMinsRemaining:: db +wBugContestSecsRemaining:: db + + ds 2 + +wMapStatusEnd:: + + ds 2 + +wCrystalData:: +wPlayerGender:: +; bit 0: +; 0 male +; 1 female + db +wd473:: ds 1 +wd474:: ds 1 +wd475:: ds 1 +wd476:: ds 1 +wd477:: ds 1 +wd478:: ds 1 +wCrystalDataEnd:: + +wd479:: ds 2 + +wGameData:: +wPlayerData:: +wPlayerID:: dw + +wPlayerName:: ds NAME_LENGTH +wMomsName:: ds NAME_LENGTH +wRivalName:: ds NAME_LENGTH +wRedsName:: ds NAME_LENGTH +wGreensName:: ds NAME_LENGTH + +wSavedAtLeastOnce:: db +wSpawnAfterChampion:: db + +; init time set at newgame +wStartDay:: db +wStartHour:: db +wStartMinute:: db +wStartSecond:: db + +wRTC:: ds 4 + + ds 4 + +wDST:: +; bit 7: dst + db + +wGameTime:: ; used only for BANK(wGameTime) +wGameTimeCap:: db +wGameTimeHours:: dw +wGameTimeMinutes:: db +wGameTimeSeconds:: db +wGameTimeFrames:: db + + ds 2 + +wCurDay:: db + + ds 1 + +wObjectFollow_Leader:: db +wObjectFollow_Follower:: db +wCenteredObject:: db +wFollowerMovementQueueLength:: db +wFollowMovementQueue:: ds 5 + +wObjectStructs:: +wPlayerStruct:: object_struct wPlayer ; player is object struct 0 +; wObjectStruct1 - wObjectStruct12 +for n, 1, NUM_OBJECT_STRUCTS +wObject{d:n}Struct:: object_struct wObject{d:n} +endr + +wCmdQueue:: ds CMDQUEUE_CAPACITY * CMDQUEUE_ENTRY_SIZE + + ds 40 + +wMapObjects:: +wPlayerObject:: map_object wPlayer ; player is map object 0 +; wMap1Object - wMap15Object +for n, 1, NUM_OBJECTS +wMap{d:n}Object:: map_object wMap{d:n} +endr + +wObjectMasks:: ds NUM_OBJECTS + +wVariableSprites:: ds $100 - SPRITE_VARS + +wEnteredMapFromContinue:: db + ds 2 +wTimeOfDayPal:: db + ds 4 +wTimeOfDayPalFlags:: db +wTimeOfDayPalset:: db +wCurTimeOfDay:: db + + ds 1 + +wSecretID:: dw +wStatusFlags:: +; bit 0: pokedex +; bit 1: unown dex +; bit 2: flash +; bit 3: caught pokerus +; bit 4: rocket signal +; bit 5: wild encounters on/off +; bit 6: hall of fame +; bit 7: bug contest on + db + +wStatusFlags2:: +; bit 0: rockets +; bit 1: safari game (unused) +; bit 2: bug contest timer +; bit 3: unused +; bit 4: bike shop call +; bit 5: can use sweet scent +; bit 6: reached goldenrod +; bit 7: rockets in mahogany + db + +wMoney:: ds 3 +wMomsMoney:: ds 3 + +wMomSavingMoney:: +; bit 0: saving some money +; bit 1: saving half money (unused) +; bit 2: saving all money (unused) +; bit 7: active + db + +wCoins:: dw + +wBadges:: +wJohtoBadges:: flag_array NUM_JOHTO_BADGES +wKantoBadges:: flag_array NUM_KANTO_BADGES + +wTMsHMs:: ds NUM_TMS + NUM_HMS + +wNumItems:: db +wItems:: ds MAX_ITEMS * 2 + 1 + +wNumKeyItems:: db +wKeyItems:: ds MAX_KEY_ITEMS + 1 + +wNumBalls:: db +wBalls:: ds MAX_BALLS * 2 + 1 + +wNumPCItems:: db +wPCItems:: ds MAX_PC_ITEMS * 2 + 1 + +wPokegearFlags:: +; bit 0: map +; bit 1: radio +; bit 2: phone +; bit 3: expn +; bit 7: on/off + db +wRadioTuningKnob:: db +wLastDexMode:: db + ds 1 +wWhichRegisteredItem:: db +wRegisteredItem:: db + +wPlayerState:: db + +wHallOfFameCount:: db + ds 1 +wTradeFlags:: flag_array NUM_NPC_TRADES + ds 1 +wMooMooBerries:: db +wUndergroundSwitchPositions:: db +wFarfetchdPosition:: db + + ds 13 + +; map scene ids +wPokecenter2FSceneID:: db +wTradeCenterSceneID:: db +wColosseumSceneID:: db +wTimeCapsuleSceneID:: db +wPowerPlantSceneID:: db +wCeruleanGymSceneID:: db +wRoute25SceneID:: db +wTrainerHouseB1FSceneID:: db +wVictoryRoadGateSceneID:: db +wSaffronMagnetTrainStationSceneID:: db +wRoute16GateSceneID:: db +wRoute17Route18GateSceneID:: db +wIndigoPlateauPokecenter1FSceneID:: db +wWillsRoomSceneID:: db +wKogasRoomSceneID:: db +wBrunosRoomSceneID:: db +wKarensRoomSceneID:: db +wLancesRoomSceneID:: db +wHallOfFameSceneID:: db +wRoute27SceneID:: db +wNewBarkTownSceneID:: db +wElmsLabSceneID:: db +wPlayersHouse1FSceneID:: db +wRoute29SceneID:: db +wCherrygroveCitySceneID:: db +wMrPokemonsHouseSceneID:: db +wRoute32SceneID:: db +wRoute35NationalParkGateSceneID:: db +wRoute36SceneID:: db +wRoute36NationalParkGateSceneID:: db +wAzaleaTownSceneID:: db +wGoldenrodGymSceneID:: db +wGoldenrodMagnetTrainStationSceneID:: db +wGoldenrodPokecenter1FSceneID:: db +wOlivineCitySceneID:: db +wRoute34SceneID:: db +wRoute34IlexForestGateSceneID:: db +wEcruteakTinTowerEntranceSceneID:: db +wWiseTriosRoomSceneID:: db +wEcruteakPokecenter1FSceneID:: db +wEcruteakGymSceneID:: db +wMahoganyTownSceneID:: db +wRoute42SceneID:: db +wCianwoodCitySceneID:: db +wBattleTower1FSceneID:: db +wBattleTowerBattleRoomSceneID:: db +wBattleTowerElevatorSceneID:: db +wBattleTowerHallwaySceneID:: db +wBattleTowerOutsideSceneID:: db +wRoute43GateSceneID:: db +wMountMoonSceneID:: db +wSproutTower3FSceneID:: db +wTinTower1FSceneID:: db +wBurnedTower1FSceneID:: db +wBurnedTowerB1FSceneID:: db +wRadioTower5FSceneID:: db +wRuinsOfAlphOutsideSceneID:: db +wRuinsOfAlphResearchCenterSceneID:: db +wRuinsOfAlphHoOhChamberSceneID:: db +wRuinsOfAlphKabutoChamberSceneID:: db +wRuinsOfAlphOmanyteChamberSceneID:: db +wRuinsOfAlphAerodactylChamberSceneID:: db +wRuinsOfAlphInnerChamberSceneID:: db +wMahoganyMart1FSceneID:: db +wTeamRocketBaseB1FSceneID:: db +wTeamRocketBaseB2FSceneID:: db +wTeamRocketBaseB3FSceneID:: db +wGoldenrodUndergroundSwitchRoomEntrancesSceneID:: db +wSilverCaveRoom3SceneID:: db +wVictoryRoadSceneID:: db +wDragonsDenB1FSceneID:: db +wDragonShrineSceneID:: db +wOlivinePortSceneID:: db +wVermilionPortSceneID:: db +wFastShip1FSceneID:: db +wFastShipB1FSceneID:: db +wMountMoonSquareSceneID:: db +wMobileTradeRoomSceneID:: db +wMobileBattleRoomSceneID:: db + + ds 49 + +; fight counts +wJackFightCount:: db +wBeverlyFightCount:: db ; unreferenced +wHueyFightCount:: db +wGavenFightCount:: db +wBethFightCount:: db +wJoseFightCount:: db +wReenaFightCount:: db +wJoeyFightCount:: db +wWadeFightCount:: db +wRalphFightCount:: db +wLizFightCount:: db +wAnthonyFightCount:: db +wToddFightCount:: db +wGinaFightCount:: db +wIrwinFightCount:: db ; unreferenced +wArnieFightCount:: db +wAlanFightCount:: db +wDanaFightCount:: db +wChadFightCount:: db +wDerekFightCount:: db ; unreferenced +wTullyFightCount:: db +wBrentFightCount:: db +wTiffanyFightCount:: db +wVanceFightCount:: db +wWiltonFightCount:: db +wKenjiFightCount:: db ; unreferenced +wParryFightCount:: db +wErinFightCount:: db + + ds 100 + +wEventFlags:: flag_array NUM_EVENTS + +wCurBox:: db + + ds 2 + +wBoxNames:: ds BOX_NAME_LENGTH * NUM_BOXES + +wCelebiEvent:: +; bit 2: forest is restless + db + + ds 1 + +wBikeFlags:: +; bit 0: using strength +; bit 1: always on bike +; bit 2: downhill + db + ds 1 ; cleared along with wBikeFlags by ResetBikeFlags + +wCurMapSceneScriptPointer:: dw + +wCurCaller:: dw +wCurMapWarpCount:: db +wCurMapWarpsPointer:: dw +wCurMapCoordEventCount:: db +wCurMapCoordEventsPointer:: dw +wCurMapBGEventCount:: db +wCurMapBGEventsPointer:: dw +wCurMapObjectEventCount:: db +wCurMapObjectEventsPointer:: dw +wCurMapSceneScriptCount:: db +wCurMapSceneScriptsPointer:: dw +wCurMapCallbackCount:: db +wCurMapCallbacksPointer:: dw + + ds 2 + +; Sprite id of each decoration +wDecoBed:: db +wDecoCarpet:: db +wDecoPlant:: db +wDecoPoster:: db +wDecoConsole:: db +wDecoLeftOrnament:: db +wDecoRightOrnament:: db +wDecoBigDoll:: db + +; Items bought from Mom +wWhichMomItem:: db +wWhichMomItemSet:: db +wMomItemTriggerBalance:: ds 3 + +wDailyResetTimer:: dw +wDailyFlags1:: db +wDailyFlags2:: db +wSwarmFlags:: db + ds 2 +wTimerEventStartDay:: db + ds 3 + +wFruitTreeFlags:: flag_array NUM_FRUIT_TREES + + ds 2 + +wLuckyNumberDayTimer:: dw + ds 2 +wSpecialPhoneCallID:: db + ds 3 +wBugContestStartTime:: ds 4 ; day, hour, min, sec +wUnusedTwoDayTimerOn:: db +wUnusedTwoDayTimer:: db +wUnusedTwoDayTimerStartDate:: db + ds 4 +wMobileOrCable_LastSelection:: db +wdc41:: ds 1 +wdc42:: ds 8 +wBuenasPassword:: db +wBlueCardBalance:: db +wDailyRematchFlags:: ds 4 +wDailyPhoneItemFlags:: ds 4 +wDailyPhoneTimeOfDayFlags:: ds 4 +wKenjiBreakTimer:: ds 2 ; Kenji +wYanmaMapGroup:: db +wYanmaMapNumber:: db +wPlayerMonSelection:: ds 3 +wdc5f:: db +wdc60:: db + + ds 18 + +wStepCount:: db +wPoisonStepCount:: db + ds 2 +wHappinessStepCount:: db + ds 1 + +wParkBallsRemaining:: +wSafariBallsRemaining:: db +wSafariTimeRemaining:: dw + +wPhoneList:: ds CONTACT_LIST_SIZE + 1 + + ds 22 + +wLuckyNumberShowFlag:: db + ds 1 +wLuckyIDNumber:: dw + +wRepelEffect:: db ; If a Repel is in use, it contains the nr of steps it's still active +wBikeStep:: dw +wKurtApricornQuantity:: db + +wPlayerDataEnd:: + +wCurMapData:: + +wVisitedSpawns:: flag_array NUM_SPAWNS + +wDigWarpNumber:: db +wDigMapGroup:: db +wDigMapNumber:: db + +; used on maps like second floor pokécenter, which are reused, so we know which +; map to return to +wBackupWarpNumber:: db +wBackupMapGroup:: db +wBackupMapNumber:: db + + ds 3 + +wLastSpawnMapGroup:: db +wLastSpawnMapNumber:: db + +wWarpNumber:: db +wMapGroup:: db +wMapNumber:: db +wYCoord:: db +wXCoord:: db +wScreenSave:: ds SCREEN_META_WIDTH * SCREEN_META_HEIGHT + +wCurMapDataEnd:: + + +SECTION "Party", WRAMX + +wPokemonData:: + +wPartyCount:: db +wPartySpecies:: ds PARTY_LENGTH +wPartyEnd:: db ; older code doesn't check wPartyCount + +wPartyMons:: +; wPartyMon1 - wPartyMon6 +for n, 1, PARTY_LENGTH + 1 +wPartyMon{d:n}:: party_struct wPartyMon{d:n} +endr + +wPartyMonOTs:: +; wPartyMon1OT - wPartyMon6OT +for n, 1, PARTY_LENGTH + 1 +wPartyMon{d:n}OT:: ds NAME_LENGTH +endr + +wPartyMonNicknames:: +; wPartyMon1Nickname - wPartyMon6Nickname +for n, 1, PARTY_LENGTH + 1 +wPartyMon{d:n}Nickname:: ds MON_NAME_LENGTH +endr +wPartyMonNicknamesEnd:: + + ds 22 + +wPokedexCaught:: flag_array NUM_POKEMON +wEndPokedexCaught:: + +wPokedexSeen:: flag_array NUM_POKEMON +wEndPokedexSeen:: + +wUnownDex:: ds NUM_UNOWN +wUnlockedUnowns:: db +wFirstUnownSeen:: db + +wDayCareMan:: +; bit 7: active +; bit 6: egg ready +; bit 5: monsters are compatible +; bit 0: monster 1 in day-care + db + +wBreedMon1Nickname:: ds MON_NAME_LENGTH +wBreedMon1OT:: ds NAME_LENGTH +wBreedMon1:: box_struct wBreedMon1 + +wDayCareLady:: +; bit 7: active +; bit 0: monster 2 in day-care + db + +wStepsToEgg:: + db +wBreedMotherOrNonDitto:: +; z: yes +; nz: no + db + +wBreedMon2Nickname:: ds MON_NAME_LENGTH +wBreedMon2OT:: ds NAME_LENGTH +wBreedMon2:: box_struct wBreedMon2 + +wEggMonNickname:: ds MON_NAME_LENGTH +wEggMonOT:: ds NAME_LENGTH +wEggMon:: box_struct wEggMon + +wBugContestSecondPartySpecies:: db +wContestMon:: party_struct wContestMon + +wDunsparceMapGroup:: db +wDunsparceMapNumber:: db +wFishingSwarmFlag:: db + +wRoamMon1:: roam_struct wRoamMon1 +wRoamMon2:: roam_struct wRoamMon2 +wRoamMon3:: roam_struct wRoamMon3 + +wRoamMons_CurMapNumber:: db +wRoamMons_CurMapGroup:: db +wRoamMons_LastMapNumber:: db +wRoamMons_LastMapGroup:: db + +wBestMagikarpLengthFeet:: db +wBestMagikarpLengthInches:: db +wMagikarpRecordHoldersName:: ds NAME_LENGTH + +wPokemonDataEnd:: +wGameDataEnd:: + + +SECTION "Pic Animations", WRAMX + +wTempTilemap:: +; 20x18 grid of 8x8 tiles + ds SCREEN_WIDTH * SCREEN_HEIGHT + +; PokeAnim data +wPokeAnimStruct:: +wPokeAnimSceneIndex:: db +wPokeAnimPointer:: dw +wPokeAnimSpecies:: db +wPokeAnimUnownLetter:: db +wPokeAnimSpeciesOrUnown:: db +wPokeAnimGraphicStartTile:: db +wPokeAnimCoord:: dw +wPokeAnimFrontpicHeight:: db +wPokeAnimIdleFlag:: db +wPokeAnimSpeed:: db +wPokeAnimPointerBank:: db +wPokeAnimPointerAddr:: dw +wPokeAnimFramesBank:: db +wPokeAnimFramesAddr:: dw +wPokeAnimBitmaskBank:: db +wPokeAnimBitmaskAddr:: dw +wPokeAnimFrame:: db +wPokeAnimJumptableIndex:: db +wPokeAnimRepeatTimer:: db +wPokeAnimCurBitmask:: db +wPokeAnimWaitCounter:: db +wPokeAnimCommand:: db +wPokeAnimParameter:: db + ds 1 +wPokeAnimBitmaskCurCol:: db +wPokeAnimBitmaskCurRow:: db +wPokeAnimBitmaskCurBit:: db +wPokeAnimBitmaskBuffer:: ds 7 + ds 2 +wPokeAnimStructEnd:: + + +SECTION "16-bit WRAM tables", WRAMX +; align this section to $100 + wram_conversion_table wPokemonIndexTable, MON_TABLE + wram_conversion_table wMoveIndexTable, MOVE_TABLE + + +SECTION "Battle Tower RAM", WRAMX + +w3_d000:: ds 1 +w3_d001:: ds 1 +w3_d002:: ds 16 +w3_d012:: ds $6e +w3_d080:: ds 1 +w3_d081:: ds $f +w3_d090:: ds $70 + +w3_d100:: +wBT_OTTrainer:: battle_tower_struct wBT_OT + ds $20 +wBT_TrainerTextIndex:: db + ds 1 +w3_d202:: battle_tower_struct w3_d202 +w3_d2e2:: battle_tower_struct w3_d2e2 +w3_d3c2:: battle_tower_struct w3_d3c2 +w3_d4a2:: battle_tower_struct w3_d4a2 +w3_d582:: battle_tower_struct w3_d582 +w3_d662:: battle_tower_struct w3_d662 + +UNION +w3_d742:: battle_tower_struct w3_d742 + +NEXTU + ds $be +w3_d800:: ds BG_MAP_WIDTH * SCREEN_HEIGHT + +NEXTU + ds $be +wBTChoiceOfLvlGroup:: db + ds $1 +w3_d802:: ds 12 +w3_d80e:: db + ds $1 +w3_d810:: + ds $59 +w3_d869:: ds $17 +w3_d880:: ds 1 +w3_d881:: ds 8 +w3_d889:: ds 1 +w3_d88a:: ds 4 +w3_d88e:: ds 1 +w3_d88f:: ds 4 +w3_d893:: ds 1 +w3_d894:: ds 1 +w3_d895:: ds 11 +w3_d8a0:: ds 1 +w3_d8a1:: ds 1 +w3_d8a2:: ds 1 +w3_d8a3:: ds 1 +ENDU + + ds $1c0 + +w3_dc00:: ds SCREEN_WIDTH * SCREEN_HEIGHT +UNION +w3_dd68:: ds SCREEN_WIDTH * SCREEN_HEIGHT + + ds $11c + +w3_dfec:: ds $10 +w3_dffc:: ds 4 +NEXTU + ds $98 +w3_de00:: ds $200 +ENDU + + +SECTION "News Script RAM", WRAMX + +w4_d000:: ds $1000 + + +SECTION "GBC Video", WRAMX, ALIGN[8] + +; eight 4-color palettes each +wGBCPalettes:: ; used only for BANK(wGBCPalettes) +wBGPals1:: ds 8 palettes +wOBPals1:: ds 8 palettes +wBGPals2:: ds 8 palettes +wOBPals2:: ds 8 palettes + + align 8 +wLYOverrides:: ds SCREEN_HEIGHT_PX +wLYOverridesEnd:: + + ds 1 + +wMagnetTrain:: ; used only for BANK(wMagnetTrain) +wMagnetTrainDirection:: db +wMagnetTrainInitPosition:: db +wMagnetTrainHoldPosition:: db +wMagnetTrainFinalPosition:: db +wMagnetTrainPlayerSpriteInitX:: db + + ds 106 + + align 8 +wLYOverridesBackup:: ds SCREEN_HEIGHT_PX +wLYOverridesBackupEnd:: + + +SECTION "Battle Animations", WRAMX + +wBattleAnimTileDict:: +; wBattleAnimTileDict pairs keys with values +; keys: ANIM_GFX_* indexes (taken from anim_*gfx arguments) +; values: vTiles0 offsets + ds NUM_BATTLEANIMTILEDICT_ENTRIES * 2 + +wActiveAnimObjects:: +; wAnimObject1 - wAnimObject10 +for n, 1, NUM_ANIM_OBJECTS + 1 +wAnimObject{d:n}:: battle_anim_struct wAnimObject{d:n} +endr + +wActiveBGEffects:: +; wBGEffect1 - wBGEffect5 +for n, 1, NUM_BG_EFFECTS + 1 +wBGEffect{d:n}:: battle_bg_effect wBGEffect{d:n} +endr + +wLastAnimObjectIndex:: db + +wBattleAnimFlags:: db +wBattleAnimAddress:: dw +wBattleAnimDelay:: db +wBattleAnimParent:: dw +wBattleAnimLoops:: db +wBattleAnimVar:: db +wBattleAnimByte:: db +wBattleAnimOAMPointerLo:: db + +UNION +wBattleObjectTempID:: db +wBattleObjectTempXCoord:: db +wBattleObjectTempYCoord:: db +wBattleObjectTempParam:: db + +NEXTU +wBattleBGEffectTempID:: db +wBattleBGEffectTempJumptableIndex:: db +wBattleBGEffectTempTurn:: db +wBattleBGEffectTempParam:: db + +NEXTU +wBattleAnimTempOAMFlags:: db +wBattleAnimTempFixY:: db +wBattleAnimTempTileID:: db +wBattleAnimTempXCoord:: db +wBattleAnimTempYCoord:: db +wBattleAnimTempXOffset:: db +wBattleAnimTempYOffset:: db +wBattleAnimTempFrameOAMFlags:: db +wBattleAnimTempPalette:: db + +NEXTU +wBattleAnimGFXTempTileID:: +wBattleAnimGFXTempPicHeight:: db + +NEXTU +wBattleSineWaveTempProgress:: db +wBattleSineWaveTempOffset:: db +wBattleSineWaveTempAmplitude:: db +wBattleSineWaveTempTimer:: db + +NEXTU +wBattlePicResizeTempBaseTileID:: db +wBattlePicResizeTempPointer:: dw +ENDU + +UNION + ds 50 +wBattleAnimEnd:: + +NEXTU +wSurfWaveBGEffect:: ds $40 +wSurfWaveBGEffectEnd:: +ENDU + + +SECTION "Mobile RAM and Pokedex Listings", WRAMX + +UNION +w5_d800:: ds $200 +w5_da00:: ds $200 +w5_dc00:: ds $d +w5_dc0d:: ds 4 +w5_dc11:: ds 9 +w5_MobileOpponentBattleMessages:: ds $c +w5_MobileOpponentBattleStartMessage:: ds $c +w5_MobileOpponentBattleWinMessage:: ds $c +w5_MobileOpponentBattleLossMessage:: ds $c + +NEXTU +wPokedexOrder:: ds 2 * (NUM_POKEMON + 1) ; enough room to expand to 1,407 entries + +ENDU + +SECTION "Scratch RAM", WRAMX + +UNION +wScratchTilemap:: ds BG_MAP_WIDTH * BG_MAP_HEIGHT +wScratchAttrmap:: ds BG_MAP_WIDTH * BG_MAP_HEIGHT + +NEXTU +wDecompressScratch:: ds $100 tiles + +NEXTU +; unidentified uses +w6_d000:: ds $1000 +ENDU + + +SECTION "Stack RAM", WRAMX + +wWindowStack:: ds $1000 - 1 +wWindowStackBottom:: ds 1 diff --git a/replace.sh b/replace.sh new file mode 100644 index 0000000..ab28140 --- /dev/null +++ b/replace.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# $1: phrase to find +# $2: phrase to replace $1 + +sed -i 's/\<'$1'\>/'$2'/' $(grep -lwr --include="*.asm" --exclude-dir="crowdmap" --exclude-dir="utils" --exclude-dir=".git" --exclude-dir="animatedgifs" --exclude-dir="patch" $1) diff --git a/rgbdscheck.asm b/rgbdscheck.asm new file mode 100644 index 0000000..5e8f854 --- /dev/null +++ b/rgbdscheck.asm @@ -0,0 +1,16 @@ +MAJOR EQU 0 +MINOR EQU 6 +PATCH EQU 0 + +WRONG_RGBDS EQUS "fail \"pokecrystal requires rgbds v0.6.0 or newer.\"" + +IF !DEF(__RGBDS_MAJOR__) || !DEF(__RGBDS_MINOR__) || !DEF(__RGBDS_PATCH__) + WRONG_RGBDS +ELSE +IF (__RGBDS_MAJOR__ < MAJOR) || \ + (__RGBDS_MAJOR__ == MAJOR && __RGBDS_MINOR__ < MINOR) || \ + (__RGBDS_MAJOR__ == MAJOR && __RGBDS_MINOR__ == MINOR && __RGBDS_PATCH__ < PATCH) || \ + (__RGBDS_MAJOR__ == MAJOR && __RGBDS_MINOR__ == MINOR && __RGBDS_PATCH__ == PATCH && DEF(__RGBDS_RC__)) + WRONG_RGBDS +ENDC +ENDC diff --git a/tools/.gitignore b/tools/.gitignore new file mode 100644 index 0000000..7825a9e --- /dev/null +++ b/tools/.gitignore @@ -0,0 +1,10 @@ +bpp2png +gfx +lzcomp +make_patch +palette +png_dimensions +pokemon_animation +pokemon_animation_graphics +scan_includes +stadium diff --git a/tools/Makefile b/tools/Makefile new file mode 100644 index 0000000..3c213f0 --- /dev/null +++ b/tools/Makefile @@ -0,0 +1,38 @@ +.PHONY: all clean + +CC := gcc +CFLAGS := -O3 -flto -std=c11 -Wall -Wextra -pedantic + +tools := \ + bpp2png \ + lzcomp \ + gfx \ + make_patch \ + png_dimensions \ + pokemon_animation \ + pokemon_animation_graphics \ + scan_includes \ + stadium + +all: $(tools) + @: + +clean: + $(RM) $(tools) + +gfx: common.h +png_dimensions: common.h +pokemon_animation: common.h +pokemon_animation_graphics: common.h +scan_includes: common.h +stadium: common.h + +bpp2png: bpp2png.c lodepng/lodepng.c common.h lodepng/lodepng.h + $(CC) $(CFLAGS) -o $@ bpp2png.c lodepng/lodepng.c + +lzcomp: CFLAGS += -Wno-strict-overflow -Wno-sign-compare +lzcomp: $(wildcard lz/*.c) $(wildcard lz/*.h) + $(CC) $(CFLAGS) -o $@ lz/*.c + +%: %.c + $(CC) $(CFLAGS) -o $@ $< diff --git a/tools/bpp2png.c b/tools/bpp2png.c new file mode 100644 index 0000000..8dbc2e9 --- /dev/null +++ b/tools/bpp2png.c @@ -0,0 +1,240 @@ +#define PROGRAM_NAME "bpp2png" +#define USAGE_OPTS "[-h|--help] [-w width] [-d depth] [-p in.gbcpal] [-t] in.2bpp|in.1bpp out.png" + +#include "common.h" +#include "lodepng/lodepng.h" + +struct Options { + unsigned int width; + unsigned int depth; + const char *palette; + bool transpose; +}; + +typedef uint8_t Palette[4][3]; + +void parse_args(int argc, char *argv[], struct Options *options) { + struct option long_options[] = { + {"width", required_argument, 0, 'w'}, + {"depth", required_argument, 0, 'd'}, + {"palette", required_argument, 0, 'p'}, + {"transpose", no_argument, 0, 't'}, + {"help", no_argument, 0, 'h'}, + {0} + }; + for (int opt; (opt = getopt_long(argc, argv, "w:d:p:th", long_options)) != -1;) { + switch (opt) { + case 'w': + options->width = (unsigned int)strtoul(optarg, NULL, 0); + if (options->width % 8) { + error_exit("Width not divisible by 8 px: %u\n", options->width); + } + break; + case 'd': + options->depth = (unsigned int)strtoul(optarg, NULL, 0); + if (options->depth != 1 && options->depth != 2) { + error_exit("Depth is not 1 or 2: %u\n", options->depth); + } + break; + case 'p': + options->palette = optarg; + break; + case 't': + options->transpose = true; + break; + case 'h': + usage_exit(0); + break; + default: + usage_exit(1); + } + } +} + +bool is_1bpp(const char *filename) { + const char *end = strrchr(filename, '.'); + return end && strlen(end) == 5 && end[1] == '1' && (end[2] == 'b' || end[2] == 'B') + && (end[3] == 'p' || end[3] == 'P') && (end[4] == 'p' || end[4] == 'P'); +} + +uint8_t *extend_1bpp_to_2bpp(uint8_t *bpp_data, long *size) { + *size *= 2; + bpp_data = xrealloc(bpp_data, *size); + for (long i = *size - 2; i >= 0; i -= 2) { + bpp_data[i] = bpp_data[i + 1] = bpp_data[i >> 1]; + } + return bpp_data; +} + +void mingle_2bpp_planes(uint8_t *bpp_data, long size) { + for (long i = 0; i < size; i += 2) { + // Interleave aka "mingle" bits + // +#define EXPAND_PLANE(b) (((((b) * 0x0101010101010101ULL & 0x8040201008040201ULL) * 0x0102040810204081ULL) >> 48) & 0xAAAA) + uint16_t r = (EXPAND_PLANE(bpp_data[i]) >> 1) | EXPAND_PLANE(bpp_data[i + 1]); + bpp_data[i] = r >> 8; + bpp_data[i + 1] = r & 0xff; + } +} + +unsigned int calculate_size(long bytes, unsigned int *width) { + long pixels = bytes * 4; + if (pixels % (8 * 8)) { + return 0; + } + if (!*width) { + // If no width is specified, try to guess an appropriate one +#define GUESS_SIZE(w, h) pixels == (w) * (h) * 8 * 8 ? (w) * 8 + *width = GUESS_SIZE(5, 5) // mon pic + : GUESS_SIZE(6, 6) // mon front/back pic + : GUESS_SIZE(7, 7) // mon/trainer pic + : GUESS_SIZE(2, 4) // mon icon + : GUESS_SIZE(2, 12) // walking sprite + : GUESS_SIZE(2, 6) // standing sprite + : GUESS_SIZE(2, 2) // still sprite + : GUESS_SIZE(4, 4) // big sprite + : pixels > 16 * 8 * 8 ? 16 * 8 // maximum width + : (unsigned int)(pixels / 8); + } + unsigned int height = (unsigned int)((pixels + *width * 8 - 1) / (*width * 8) * 8); + if (*width == 0 || height == 0) { + error_exit("Not divisible into 8x8-px tiles: %ux%u\n", *width, height); + } + return height; +} + +uint8_t *pad_to_rectangle(uint8_t *bpp_data, long filesize, unsigned int width, unsigned int height) { + unsigned int size = width * height / 4; + if (size > filesize) { + bpp_data = xrealloc(bpp_data, size); + // Fill padding with white + memset(bpp_data + filesize, 0, size - filesize); + } + return bpp_data; +} + +uint8_t *transpose_tiles(uint8_t *bpp_data, unsigned int width, unsigned int height) { + unsigned int size = width * height / 4; + uint8_t *transposed = xmalloc(size); + unsigned int cols = width / 8; + for (unsigned int i = 0; i < size; i++) { + unsigned int j = (i / 0x10) * cols * 0x10; + j = (j % size) + 0x10 * (j / size) + (i % 0x10); + transposed[j] = bpp_data[i]; + } + free(bpp_data); + return transposed; +} + +uint8_t *rearrange_tiles_to_scanlines(uint8_t *bpp_data, unsigned int width, unsigned int height) { + unsigned int size = width * height / 4; + uint8_t *rearranged = xmalloc(size); + unsigned int cols = width / 8; + unsigned int j = 0; + for (unsigned int line = 0; line < height; line++) { + unsigned int row = line / 8; + for (unsigned int col = 0; col < cols; col++) { + unsigned int i = ((row * cols + col) * 8 + line % 8) * 2; + rearranged[j] = bpp_data[i]; + rearranged[j + 1] = bpp_data[i + 1]; + j += 2; + } + } + free(bpp_data); + return rearranged; +} + +void read_gbcpal(Palette palette, const char *filename) { + long filesize; + uint8_t *pal_data = read_u8(filename, &filesize); + if (filesize != 4 * 2) { + error_exit("Invalid .gbcpal file: \"%s\"\n", filename); + } + for (int i = 0; i < 4; i++) { + uint8_t b1 = pal_data[i * 2], b2 = pal_data[i * 2 + 1]; +#define RGB5_TO_RGB8(x) (uint8_t)(((x) << 3) | ((x) >> 2)) + palette[i][0] = RGB5_TO_RGB8(b1 & 0x1f); // red + palette[i][1] = RGB5_TO_RGB8(((b1 & 0xe0) >> 5) | ((b2 & 0x03) << 3)); // green + palette[i][2] = RGB5_TO_RGB8((b2 & 0x7c) >> 2); // blue + } + free(pal_data); +} + +unsigned int write_png(const char *filename, uint8_t *bpp_data, unsigned int width, unsigned int height, Palette palette) { + LodePNGState state; + lodepng_state_init(&state); + state.info_raw.bitdepth = state.info_png.color.bitdepth = 2; + + if (palette) { + state.info_raw.colortype = state.info_png.color.colortype = LCT_PALETTE; + for (int i = 0; i < 4; i++) { + uint8_t *color = palette[i]; + lodepng_palette_add(&state.info_raw, color[0], color[1], color[2], 0xff); + lodepng_palette_add(&state.info_png.color, color[0], color[1], color[2], 0xff); + } + } else { + state.info_raw.colortype = state.info_png.color.colortype = LCT_GREY; + // 2-bit PNG white/light/dark/gray indexes are the inverse of 2bpp + for (unsigned int i = 0; i < width * height / 4; i++) { + bpp_data[i] = ~bpp_data[i]; + } + } + + unsigned char *buffer; + size_t buffer_size; + lodepng_encode(&buffer, &buffer_size, bpp_data, width, height, &state); + unsigned int error = state.error; + lodepng_state_cleanup(&state); + if (!error) { + error = lodepng_save_file(buffer, buffer_size, filename); + } + + free(buffer); + return error; +} + +int main(int argc, char *argv[]) { + struct Options options = {0}; + parse_args(argc, argv, &options); + + argc -= optind; + argv += optind; + if (argc != 2) { + usage_exit(1); + } + + Palette palette = {0}; + if (options.palette) { + read_gbcpal(palette, options.palette); + } + + const char *bpp_filename = argv[0]; + long filesize; + uint8_t *bpp_data = read_u8(bpp_filename, &filesize); + if (!options.depth) { + options.depth = is_1bpp(bpp_filename) ? 1 : 2; + } + if (!filesize || filesize % (8 * options.depth)) { + error_exit("Invalid .%dbpp file: \"%s\"\n", options.depth, bpp_filename); + } + if (options.depth == 1) { + bpp_data = extend_1bpp_to_2bpp(bpp_data, &filesize); + } + mingle_2bpp_planes(bpp_data, filesize); + + unsigned int height = calculate_size(filesize, &options.width); + bpp_data = pad_to_rectangle(bpp_data, filesize, options.width, height); + if (options.transpose) { + bpp_data = transpose_tiles(bpp_data, options.width, height); + } + bpp_data = rearrange_tiles_to_scanlines(bpp_data, options.width, height); + + const char *png_filename = argv[1]; + unsigned int error = write_png(png_filename, bpp_data, options.width, height, options.palette ? palette : NULL); + if (error) { + error_exit("Could not write to file \"%s\": %s\n", png_filename, lodepng_error_text(error)); + } + + free(bpp_data); + return 0; +} diff --git a/tools/common.h b/tools/common.h new file mode 100644 index 0000000..97d901e --- /dev/null +++ b/tools/common.h @@ -0,0 +1,151 @@ +#ifndef GUARD_COMMON_H +#define GUARD_COMMON_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef PROGRAM_NAME +#error Define PROGRAM_NAME before including common.h! +#endif +#ifndef USAGE_OPTS +#error Define USAGE_OPTS before including common.h! +#endif + +#define COUNTOF(...) (sizeof(__VA_ARGS__) / sizeof(*(__VA_ARGS__))) + +#define error_exit(...) exit((fprintf(stderr, PROGRAM_NAME ": " __VA_ARGS__), 1)) + +noreturn void usage_exit(int status) { + fprintf(stderr, "Usage: " PROGRAM_NAME " " USAGE_OPTS "\n"); + exit(status); +} + +int getopt_long_index; +#define getopt_long(argc, argv, optstring, longopts) getopt_long(argc, argv, optstring, longopts, &getopt_long_index) + +void *xmalloc(size_t size) { + errno = 0; + void *m = malloc(size); + if (!m) { + error_exit("Could not allocate %zu bytes: %s\n", size, strerror(errno)); + } + return m; +} + +void *xcalloc(size_t size) { + errno = 0; + void *m = calloc(size, 1); + if (!m) { + error_exit("Could not allocate %zu bytes: %s\n", size, strerror(errno)); + } + return m; +} + +void *xrealloc(void *m, size_t size) { + errno = 0; + m = realloc(m, size); + if (!m) { + error_exit("Could not allocate %zu bytes: %s\n", size, strerror(errno)); + } + return m; +} + +FILE *xfopen(const char *filename, char rw) { + char mode[3] = {rw, 'b', '\0'}; + errno = 0; + FILE *f = fopen(filename, mode); + if (!f) { + error_exit("Could not open file \"%s\": %s\n", filename, strerror(errno)); + } + return f; +} + +void xfread(uint8_t *data, size_t size, const char *filename, FILE *f) { + errno = 0; + if (fread(data, 1, size, f) != size) { + fclose(f); + error_exit("Could not read from file \"%s\": %s\n", filename, strerror(errno)); + } +} + +void xfwrite(const uint8_t *data, size_t size, const char *filename, FILE *f) { + errno = 0; + if (fwrite(data, 1, size, f) != size) { + fclose(f); + error_exit("Could not write to file \"%s\": %s\n", filename, strerror(errno)); + } +} + +long xfsize(const char *filename, FILE *f) { + long size = -1; + errno = 0; + if (!fseek(f, 0, SEEK_END)) { + size = ftell(f); + if (size != -1) { + rewind(f); + } + } + if (size == -1) { + error_exit("Could not measure file \"%s\": %s\n", filename, strerror(errno)); + } + return size; +} + +uint8_t *read_u8(const char *filename, long *size) { + FILE *f = xfopen(filename, 'r'); + *size = xfsize(filename, f); + uint8_t *data = xmalloc(*size); + xfread(data, *size, filename, f); + fclose(f); + return data; +} + +void write_u8(const char *filename, uint8_t *data, size_t size) { + FILE *f = xfopen(filename, 'w'); + xfwrite(data, size, filename, f); + fclose(f); +} + +uint32_t read_png_width(const char *filename) { + FILE *f = xfopen(filename, 'r'); + uint8_t header[16] = {0}; + xfread(header, sizeof(header), filename, f); + static uint8_t expected_header[16] = { + 0x89, 'P', 'N', 'G', '\r', '\n', 0x1A, '\n', // signature + 0, 0, 0, 13, // IHDR chunk length + 'I', 'H', 'D', 'R', // IHDR chunk type + }; + if (memcmp(header, expected_header, sizeof(header))) { + fclose(f); + error_exit("Not a valid PNG file: \"%s\"\n", filename); + } + uint8_t bytes[4] = {0}; + xfread(bytes, sizeof(bytes), filename, f); + fclose(f); + return (bytes[0] << 24) | (bytes[1] << 16) | (bytes[2] << 8) | bytes[3]; +} + +void read_dimensions(const char *filename, int *width) { + long filesize; + uint8_t *bytes = read_u8(filename, &filesize); + if (filesize != 1) { + error_exit("%s: invalid dimensions file\n", filename); + } + uint8_t dimensions = bytes[0]; + free(bytes); + *width = dimensions & 0xF; + int height = dimensions >> 4; + if (*width != height || (*width != 5 && *width != 6 && *width != 7)) { + error_exit("%s: invalid dimensions: %dx%d tiles\n", filename, *width, height); + } +} + +#endif // GUARD_COMMON_H diff --git a/tools/consts.py b/tools/consts.py new file mode 100644 index 0000000..37c8595 --- /dev/null +++ b/tools/consts.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Usage: python consts.py constants/some_constants.asm + +View numeric values of `const`ants. +""" + +import sys +import re + +const_value = 0 +const_inc = 1 + +def asm_int(s): + base = {'$': 16, '&': 8, '%': 2}.get(s[0], 10) + return int(s if base == 10 else s[1:], base) + +def print_const(s, v): + print(f'{s} == {v} == ${v:x}') + +def parse_for_constants(line): + global const_value, const_inc + if not (m := re.match(r'^\s+([A-Za-z_][A-Za-z0-9_@#]*)(?:\s+([^;\\n]+))?', line)): + return + macro, rest = m.groups() + args = [arg.strip() for arg in rest.split(',')] if rest else [] + if args and not args[-1]: + args = args[:-1] + if macro == 'const_def': + const_value = asm_int(args[0]) if len(args) >= 1 else 0 + const_inc = asm_int(args[1]) if len(args) >= 2 else 1 + elif macro == 'const': + print_const(args[0], const_value) + const_value += const_inc + elif macro == 'shift_const': + print_const(args[0], 1 << const_value) + print_const(args[0] + '_F', const_value) + const_value += const_inc + elif macro == 'const_skip': + const_value += const_inc * (asm_int(args[0]) if len(args) >= 1 else 1) + elif macro == 'const_next': + const_value = asm_int(args[0]) + +def main(): + if len(sys.argv) < 2: + print(f'Usage: {sys.argv[0]} constants/some_constants.asm', file=sys.stderr) + sys.exit(1) + for filename in sys.argv[1:]: + with open(filename, 'r', encoding='utf-8') as file: + for line in file: + parse_for_constants(line) + +if __name__ == '__main__': + main() diff --git a/tools/free_space.awk b/tools/free_space.awk new file mode 100644 index 0000000..168fde8 --- /dev/null +++ b/tools/free_space.awk @@ -0,0 +1,78 @@ +#!/usr/bin/gawk -f + +# Usage: tools/free_space.awk [BANK=] pokecrystal.map + +# The BANK argument allows printing free space in one, all, or none of the ROM's banks. +# Valid arguments are numbers (in decimal "42" or hexadecimal "0x2a"), "all" or "none". +# If not specified, defaults to "none". +# The `BANK` argument MUST be before the map file name, otherwise it has no effect! +# Yes: tools/free_space.awk BANK=all pokecrystal.map +# No: tools/free_space.awk pokecrystal.map BANK=42 + +# Copyright (c) 2020, Eldred Habert. +# SPDX-License-Identifier: MIT + +BEGIN { + nb_banks = 0 + free = 0 + rom_bank = 0 # Safety net for malformed files + + # Default settings + # Variables assigned via the command-line (except through `-v`) are *after* `BEGIN` + BANK="none" +} + +# Only accept ROM banks, ignore everything else +toupper($0) ~ /^[ \t]*ROM[0X][ \t]+BANK[ \t]+#/ { + nb_banks++ + rom_bank = 1 + split($0, fields, /[ \t]/) + bank_num = strtonum(substr(fields[3], 2)) +} + +function register_bank(amount) { + free += amount + rom_bank = 0 # Reject upcoming banks by default + + if (BANK ~ /all/ || BANK == bank_num) { + printf "Bank %3d: %5d/16384 (%.2f%%)\n", bank_num, amount, amount * 100 / 16384 + } +} +function register_bank_str(str) { + if (str ~ /\$[0-9A-F]+/) { + register_bank(strtonum("0x" substr(str, 2))) + } else { + printf "Malformed number? \"%s\" does not start with '$'\n", str + } +} + +rom_bank && toupper($0) ~ /^[ \t]*EMPTY$/ { + # Empty bank + register_bank(16384) +} +rom_bank && toupper($0) ~ /^[ \t]*SLACK:[ \t]/ { + # Old (rgbds <=0.6.0) end-of-bank free space + register_bank_str($2) +} +rom_bank && toupper($0) ~ /^[ \t]*TOTAL EMPTY:[ \t]/ { + # New (rgbds >=0.6.1) total free space + register_bank_str($3) +} + +END { + # Determine number of banks, by rounding to upper power of 2 + total_banks = 2 # Smallest size is 2 banks + while (total_banks < nb_banks) { + total_banks *= 2 + } + + # RGBLINK omits "trailing" ROM banks, so fake them + bank_num = nb_banks + while (bank_num < total_banks) { + register_bank(16384) + bank_num++ + } + + total = total_banks * 16384 + printf "Free space: %5d/%5d (%.2f%%)\n", free, total, free * 100 / total +} diff --git a/tools/gfx.c b/tools/gfx.c new file mode 100644 index 0000000..c8f0b03 --- /dev/null +++ b/tools/gfx.c @@ -0,0 +1,300 @@ +#define PROGRAM_NAME "gfx" +#define USAGE_OPTS "[-h|--help] [--trim-whitespace] [--remove-whitespace] [--interleave] [--remove-duplicates [--keep-whitespace]] [--remove-xflip] [--remove-yflip] [--preserve indexes] [-d|--depth depth] [-p|--png filename.png] [-o|--out outfile] infile" + +#include "common.h" + +struct Options { + bool trim_whitespace; + bool remove_whitespace; + bool interleave; + bool remove_duplicates; + bool keep_whitespace; + bool remove_xflip; + bool remove_yflip; + int *preserved; + int num_preserved; + int depth; + char *png_file; + char *outfile; +}; + +struct Options options = {.depth = 2}; + +void parse_args(int argc, char *argv[]) { + struct option long_options[] = { + {"remove-whitespace", no_argument, 0, 'R'}, + {"trim-whitespace", no_argument, 0, 'T'}, + {"interleave", no_argument, 0, 'I'}, + {"remove-duplicates", no_argument, 0, 'D'}, + {"keep-whitespace", no_argument, 0, 'W'}, + {"remove-xflip", no_argument, 0, 'X'}, + {"remove-yflip", no_argument, 0, 'Y'}, + {"preserve", required_argument, 0, 'r'}, + {"png", required_argument, 0, 'p'}, + {"depth", required_argument, 0, 'd'}, + {"out", required_argument, 0, 'o'}, + {"help", no_argument, 0, 'h'}, + {0} + }; + for (int opt; (opt = getopt_long(argc, argv, "d:o:p:h", long_options)) != -1;) { + switch (opt) { + case 'R': + options.remove_whitespace = true; + break; + case 'T': + options.trim_whitespace = true; + break; + case 'I': + options.interleave = true; + break; + case 'D': + options.remove_duplicates = true; + break; + case 'W': + options.keep_whitespace = true; + break; + case 'X': + options.remove_xflip = true; + break; + case 'Y': + options.remove_yflip = true; + break; + case 'r': + for (char *token = strtok(optarg, ","); token; token = strtok(NULL, ",")) { + options.preserved = xrealloc(options.preserved, ++options.num_preserved * sizeof(*options.preserved)); + options.preserved[options.num_preserved-1] = strtoul(token, NULL, 0); + } + break; + case 'd': + options.depth = strtoul(optarg, NULL, 0); + break; + case 'p': + options.png_file = optarg; + break; + case 'o': + options.outfile = optarg; + break; + case 'h': + usage_exit(0); + break; + default: + usage_exit(1); + } + } +} + +struct Graphic { + uint8_t *data; + long size; +}; + +bool is_preserved(int index) { + for (int i = 0; i < options.num_preserved; i++) { + if (options.preserved[i] == index) { + return true; + } + } + return false; +} + +void shift_preserved(int removed_index) { + for (int i = 0; i < options.num_preserved; i++) { + if (options.preserved[i] >= removed_index) { + options.preserved[i]--; + } + } +} + +bool is_whitespace(const uint8_t *tile, int tile_size) { + for (int i = 0; i < tile_size; i++) { + if (tile[i] != 0) { + return false; + } + } + return true; +} + +void trim_whitespace(struct Graphic *graphic) { + int tile_size = options.depth * 8; + for (int i = graphic->size - tile_size; i > 0; i -= tile_size) { + if (is_whitespace(&graphic->data[i], tile_size) && !is_preserved(i / tile_size)) { + graphic->size = i; + } else { + break; + } + } +} + +int get_tile_size(void) { + return options.depth * (options.interleave ? 16 : 8); +} + +void remove_whitespace(struct Graphic *graphic) { + int tile_size = get_tile_size(); + graphic->size &= ~(tile_size - 1); + int i = 0; + for (int j = 0, d = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) { + for (; j < graphic->size && is_whitespace(&graphic->data[j], tile_size) && !is_preserved(j / tile_size - d); j += tile_size, d++) { + shift_preserved(j / tile_size - d); + } + if (j >= graphic->size) { + break; + } else if (j > i) { + memcpy(&graphic->data[i], &graphic->data[j], tile_size); + } + } + graphic->size = i; +} + +bool tile_exists(const uint8_t *tile, const uint8_t *tiles, int tile_size, int num_tiles) { + for (int i = 0; i < num_tiles; i++) { + bool match = true; + for (int j = 0; j < tile_size; j++) { + if (tile[j] != tiles[i * tile_size + j]) { + match = false; + break; + } + } + if (match) { + return true; + } + } + return false; +} + +void remove_duplicates(struct Graphic *graphic) { + int tile_size = get_tile_size(); + graphic->size &= ~(tile_size - 1); + int num_tiles = 0; + for (int i = 0, j = 0, d = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) { + for (; j < graphic->size && tile_exists(&graphic->data[j], graphic->data, tile_size, num_tiles); j += tile_size, d++) { + if ((options.keep_whitespace && is_whitespace(&graphic->data[j], tile_size)) || is_preserved(j / tile_size - d)) { + break; + } + shift_preserved(j / tile_size - d); + } + if (j >= graphic->size) { + break; + } + if (j > i) { + memcpy(&graphic->data[i], &graphic->data[j], tile_size); + } + num_tiles++; + } + graphic->size = num_tiles * tile_size; +} + +// for (int i = 0; i < 256; i++) +// for (int bit = 0; bit < 8; bit++) { +// flipped[i] |= ((i >> bit) & 1) << (7 - bit); +const uint8_t flipped[256] = { + 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, + 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, + 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, + 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, + 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, + 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, + 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, + 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, + 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, + 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, + 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, + 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, + 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, + 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, + 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, + 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff +}; + +bool flip_exists(const uint8_t *tile, const uint8_t *tiles, int tile_size, int num_tiles, bool xflip, bool yflip) { + uint8_t flip[tile_size]; // VLA + memset(flip, 0, tile_size); + int half_size = tile_size / 2; + for (int i = 0; i < tile_size; i++) { + int j = yflip ? (options.interleave && i < half_size ? half_size : tile_size) - 1 - (i ^ 1) : i; + flip[j] = xflip ? flipped[tile[i]] : tile[i]; + } + return tile_exists(flip, tiles, tile_size, num_tiles); +} + +void remove_flip(struct Graphic *graphic, bool xflip, bool yflip) { + int tile_size = get_tile_size(); + graphic->size &= ~(tile_size - 1); + int num_tiles = 0; + for (int i = 0, j = 0, d = 0; i < graphic->size && j < graphic->size; i += tile_size, j += tile_size) { + for (; j < graphic->size && flip_exists(&graphic->data[j], graphic->data, tile_size, num_tiles, xflip, yflip); j += tile_size, d++) { + if ((options.keep_whitespace && is_whitespace(&graphic->data[j], tile_size)) || is_preserved(j / tile_size - d)) { + break; + } + shift_preserved(j / tile_size - d); + } + if (j >= graphic->size) { + break; + } + if (j > i) { + memcpy(&graphic->data[i], &graphic->data[j], tile_size); + } + num_tiles++; + } + graphic->size = num_tiles * tile_size; +} + +void interleave(struct Graphic *graphic, int width) { + int tile_size = options.depth * 8; + int width_tiles = width / 8; + int num_tiles = graphic->size / tile_size; + uint8_t *interleaved = xmalloc(graphic->size); + for (int i = 0; i < num_tiles; i++) { + int row = i / width_tiles; + int tile = i * 2 - (row % 2 ? width_tiles * (row + 1) - 1 : width_tiles * row); + memcpy(&interleaved[tile * tile_size], &graphic->data[i * tile_size], tile_size); + } + graphic->size = num_tiles * tile_size; + memcpy(graphic->data, interleaved, graphic->size); + free(interleaved); +} + +int main(int argc, char *argv[]) { + parse_args(argc, argv); + + argc -= optind; + argv += optind; + if (argc < 1) { + usage_exit(1); + } + + struct Graphic graphic; + graphic.data = read_u8(argv[0], &graphic.size); + + if (options.trim_whitespace) { + trim_whitespace(&graphic); + } + if (options.interleave) { + if (!options.png_file) { + error_exit("--interleave needs --png to infer dimensions\n"); + } + int width = read_png_width(options.png_file); + interleave(&graphic, width); + } + if (options.remove_duplicates) { + remove_duplicates(&graphic); + } + if (options.remove_xflip) { + remove_flip(&graphic, true, false); + } + if (options.remove_yflip) { + remove_flip(&graphic, false, true); + } + if (options.remove_xflip && options.remove_yflip) { + remove_flip(&graphic, true, true); + } + if (options.remove_whitespace) { + remove_whitespace(&graphic); + } + if (options.outfile) { + write_u8(options.outfile, graphic.data, graphic.size); + } + + free(graphic.data); + return 0; +} diff --git a/tools/lodepng/lodepng.c b/tools/lodepng/lodepng.c new file mode 100644 index 0000000..7e6ffde --- /dev/null +++ b/tools/lodepng/lodepng.c @@ -0,0 +1,6497 @@ +/* +LodePNG version 20210627 + +Copyright (c) 2005-2021 Lode Vandevenne + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +/* +The manual and changelog are in the header file "lodepng.h" +Rename this file to lodepng.cpp to use it for C++, or to lodepng.c to use it for C. +*/ + +#include "lodepng.h" + +#ifdef LODEPNG_COMPILE_DISK +#include /* LONG_MAX */ +#include /* file handling */ +#endif /* LODEPNG_COMPILE_DISK */ + +#ifdef LODEPNG_COMPILE_ALLOCATORS +#include /* allocations */ +#endif /* LODEPNG_COMPILE_ALLOCATORS */ + +#if defined(_MSC_VER) && (_MSC_VER >= 1310) /*Visual Studio: A few warning types are not desired here.*/ +#pragma warning( disable : 4244 ) /*implicit conversions: not warned by gcc -Wall -Wextra and requires too much casts*/ +#pragma warning( disable : 4996 ) /*VS does not like fopen, but fopen_s is not standard C so unusable here*/ +#endif /*_MSC_VER */ + +const char* LODEPNG_VERSION_STRING = "20210627"; + +/* +This source file is built up in the following large parts. The code sections +with the "LODEPNG_COMPILE_" #defines divide this up further in an intermixed way. +-Tools for C and common code for PNG and Zlib +-C Code for Zlib (huffman, deflate, ...) +-C Code for PNG (file format chunks, adam7, PNG filters, color conversions, ...) +-The C++ wrapper around all of the above +*/ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* // Tools for C, and common code for PNG and Zlib. // */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ + +/*The malloc, realloc and free functions defined here with "lodepng_" in front +of the name, so that you can easily change them to others related to your +platform if needed. Everything else in the code calls these. Pass +-DLODEPNG_NO_COMPILE_ALLOCATORS to the compiler, or comment out +#define LODEPNG_COMPILE_ALLOCATORS in the header, to disable the ones here and +define them in your own project's source files without needing to change +lodepng source code. Don't forget to remove "static" if you copypaste them +from here.*/ + +#ifdef LODEPNG_COMPILE_ALLOCATORS +static void* lodepng_malloc(size_t size) { +#ifdef LODEPNG_MAX_ALLOC + if(size > LODEPNG_MAX_ALLOC) return 0; +#endif + return malloc(size); +} + +/* NOTE: when realloc returns NULL, it leaves the original memory untouched */ +static void* lodepng_realloc(void* ptr, size_t new_size) { +#ifdef LODEPNG_MAX_ALLOC + if(new_size > LODEPNG_MAX_ALLOC) return 0; +#endif + return realloc(ptr, new_size); +} + +static void lodepng_free(void* ptr) { + free(ptr); +} +#else /*LODEPNG_COMPILE_ALLOCATORS*/ +/* TODO: support giving additional void* payload to the custom allocators */ +void* lodepng_malloc(size_t size); +void* lodepng_realloc(void* ptr, size_t new_size); +void lodepng_free(void* ptr); +#endif /*LODEPNG_COMPILE_ALLOCATORS*/ + +/* convince the compiler to inline a function, for use when this measurably improves performance */ +/* inline is not available in C90, but use it when supported by the compiler */ +#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || (defined(__cplusplus) && (__cplusplus >= 199711L)) +#define LODEPNG_INLINE inline +#else +#define LODEPNG_INLINE /* not available */ +#endif + +/* restrict is not available in C90, but use it when supported by the compiler */ +#if (defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))) ||\ + (defined(_MSC_VER) && (_MSC_VER >= 1400)) || \ + (defined(__WATCOMC__) && (__WATCOMC__ >= 1250) && !defined(__cplusplus)) +#define LODEPNG_RESTRICT __restrict +#else +#define LODEPNG_RESTRICT /* not available */ +#endif + +/* Replacements for C library functions such as memcpy and strlen, to support platforms +where a full C library is not available. The compiler can recognize them and compile +to something as fast. */ + +static void lodepng_memcpy(void* LODEPNG_RESTRICT dst, + const void* LODEPNG_RESTRICT src, size_t size) { + size_t i; + for(i = 0; i < size; i++) ((char*)dst)[i] = ((const char*)src)[i]; +} + +static void lodepng_memset(void* LODEPNG_RESTRICT dst, + int value, size_t num) { + size_t i; + for(i = 0; i < num; i++) ((char*)dst)[i] = (char)value; +} + +/* does not check memory out of bounds, do not use on untrusted data */ +static size_t lodepng_strlen(const char* a) { + const char* orig = a; + /* avoid warning about unused function in case of disabled COMPILE... macros */ + (void)(&lodepng_strlen); + while(*a) a++; + return (size_t)(a - orig); +} + +#define LODEPNG_MAX(a, b) (((a) > (b)) ? (a) : (b)) +#define LODEPNG_MIN(a, b) (((a) < (b)) ? (a) : (b)) +#define LODEPNG_ABS(x) ((x) < 0 ? -(x) : (x)) + +#if defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_DECODER) +/* Safely check if adding two integers will overflow (no undefined +behavior, compiler removing the code, etc...) and output result. */ +static int lodepng_addofl(size_t a, size_t b, size_t* result) { + *result = a + b; /* Unsigned addition is well defined and safe in C90 */ + return *result < a; +} +#endif /*defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_DECODER)*/ + +#ifdef LODEPNG_COMPILE_DECODER +/* Safely check if multiplying two integers will overflow (no undefined +behavior, compiler removing the code, etc...) and output result. */ +static int lodepng_mulofl(size_t a, size_t b, size_t* result) { + *result = a * b; /* Unsigned multiplication is well defined and safe in C90 */ + return (a != 0 && *result / a != b); +} + +#ifdef LODEPNG_COMPILE_ZLIB +/* Safely check if a + b > c, even if overflow could happen. */ +static int lodepng_gtofl(size_t a, size_t b, size_t c) { + size_t d; + if(lodepng_addofl(a, b, &d)) return 1; + return d > c; +} +#endif /*LODEPNG_COMPILE_ZLIB*/ +#endif /*LODEPNG_COMPILE_DECODER*/ + + +/* +Often in case of an error a value is assigned to a variable and then it breaks +out of a loop (to go to the cleanup phase of a function). This macro does that. +It makes the error handling code shorter and more readable. + +Example: if(!uivector_resize(&lz77_encoded, datasize)) ERROR_BREAK(83); +*/ +#define CERROR_BREAK(errorvar, code){\ + errorvar = code;\ + break;\ +} + +/*version of CERROR_BREAK that assumes the common case where the error variable is named "error"*/ +#define ERROR_BREAK(code) CERROR_BREAK(error, code) + +/*Set error var to the error code, and return it.*/ +#define CERROR_RETURN_ERROR(errorvar, code){\ + errorvar = code;\ + return code;\ +} + +/*Try the code, if it returns error, also return the error.*/ +#define CERROR_TRY_RETURN(call){\ + unsigned error = call;\ + if(error) return error;\ +} + +/*Set error var to the error code, and return from the void function.*/ +#define CERROR_RETURN(errorvar, code){\ + errorvar = code;\ + return;\ +} + +/* +About uivector, ucvector and string: +-All of them wrap dynamic arrays or text strings in a similar way. +-LodePNG was originally written in C++. The vectors replace the std::vectors that were used in the C++ version. +-The string tools are made to avoid problems with compilers that declare things like strncat as deprecated. +-They're not used in the interface, only internally in this file as static functions. +-As with many other structs in this file, the init and cleanup functions serve as ctor and dtor. +*/ + +#ifdef LODEPNG_COMPILE_ZLIB +#ifdef LODEPNG_COMPILE_ENCODER +/*dynamic vector of unsigned ints*/ +typedef struct uivector { + unsigned* data; + size_t size; /*size in number of unsigned longs*/ + size_t allocsize; /*allocated size in bytes*/ +} uivector; + +static void uivector_cleanup(void* p) { + ((uivector*)p)->size = ((uivector*)p)->allocsize = 0; + lodepng_free(((uivector*)p)->data); + ((uivector*)p)->data = NULL; +} + +/*returns 1 if success, 0 if failure ==> nothing done*/ +static unsigned uivector_resize(uivector* p, size_t size) { + size_t allocsize = size * sizeof(unsigned); + if(allocsize > p->allocsize) { + size_t newsize = allocsize + (p->allocsize >> 1u); + void* data = lodepng_realloc(p->data, newsize); + if(data) { + p->allocsize = newsize; + p->data = (unsigned*)data; + } + else return 0; /*error: not enough memory*/ + } + p->size = size; + return 1; /*success*/ +} + +static void uivector_init(uivector* p) { + p->data = NULL; + p->size = p->allocsize = 0; +} + +/*returns 1 if success, 0 if failure ==> nothing done*/ +static unsigned uivector_push_back(uivector* p, unsigned c) { + if(!uivector_resize(p, p->size + 1)) return 0; + p->data[p->size - 1] = c; + return 1; +} +#endif /*LODEPNG_COMPILE_ENCODER*/ +#endif /*LODEPNG_COMPILE_ZLIB*/ + +/* /////////////////////////////////////////////////////////////////////////// */ + +/*dynamic vector of unsigned chars*/ +typedef struct ucvector { + unsigned char* data; + size_t size; /*used size*/ + size_t allocsize; /*allocated size*/ +} ucvector; + +/*returns 1 if success, 0 if failure ==> nothing done*/ +static unsigned ucvector_resize(ucvector* p, size_t size) { + if(size > p->allocsize) { + size_t newsize = size + (p->allocsize >> 1u); + void* data = lodepng_realloc(p->data, newsize); + if(data) { + p->allocsize = newsize; + p->data = (unsigned char*)data; + } + else return 0; /*error: not enough memory*/ + } + p->size = size; + return 1; /*success*/ +} + +static ucvector ucvector_init(unsigned char* buffer, size_t size) { + ucvector v; + v.data = buffer; + v.allocsize = v.size = size; + return v; +} + +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_PNG +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + +/*free string pointer and set it to NULL*/ +static void string_cleanup(char** out) { + lodepng_free(*out); + *out = NULL; +} + +/*also appends null termination character*/ +static char* alloc_string_sized(const char* in, size_t insize) { + char* out = (char*)lodepng_malloc(insize + 1); + if(out) { + lodepng_memcpy(out, in, insize); + out[insize] = 0; + } + return out; +} + +/* dynamically allocates a new string with a copy of the null terminated input text */ +static char* alloc_string(const char* in) { + return alloc_string_sized(in, lodepng_strlen(in)); +} +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +#endif /*LODEPNG_COMPILE_PNG*/ + +/* ////////////////////////////////////////////////////////////////////////// */ + +#if defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_PNG) +static unsigned lodepng_read32bitInt(const unsigned char* buffer) { + return (((unsigned)buffer[0] << 24u) | ((unsigned)buffer[1] << 16u) | + ((unsigned)buffer[2] << 8u) | (unsigned)buffer[3]); +} +#endif /*defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_PNG)*/ + +#if defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_ENCODER) +/*buffer must have at least 4 allocated bytes available*/ +static void lodepng_set32bitInt(unsigned char* buffer, unsigned value) { + buffer[0] = (unsigned char)((value >> 24) & 0xff); + buffer[1] = (unsigned char)((value >> 16) & 0xff); + buffer[2] = (unsigned char)((value >> 8) & 0xff); + buffer[3] = (unsigned char)((value ) & 0xff); +} +#endif /*defined(LODEPNG_COMPILE_PNG) || defined(LODEPNG_COMPILE_ENCODER)*/ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / File IO / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_DISK + +/* returns negative value on error. This should be pure C compatible, so no fstat. */ +static long lodepng_filesize(const char* filename) { + FILE* file; + long size; + file = fopen(filename, "rb"); + if(!file) return -1; + + if(fseek(file, 0, SEEK_END) != 0) { + fclose(file); + return -1; + } + + size = ftell(file); + /* It may give LONG_MAX as directory size, this is invalid for us. */ + if(size == LONG_MAX) size = -1; + + fclose(file); + return size; +} + +/* load file into buffer that already has the correct allocated size. Returns error code.*/ +static unsigned lodepng_buffer_file(unsigned char* out, size_t size, const char* filename) { + FILE* file; + size_t readsize; + file = fopen(filename, "rb"); + if(!file) return 78; + + readsize = fread(out, 1, size, file); + fclose(file); + + if(readsize != size) return 78; + return 0; +} + +unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* filename) { + long size = lodepng_filesize(filename); + if(size < 0) return 78; + *outsize = (size_t)size; + + *out = (unsigned char*)lodepng_malloc((size_t)size); + if(!(*out) && size > 0) return 83; /*the above malloc failed*/ + + return lodepng_buffer_file(*out, (size_t)size, filename); +} + +/*write given buffer to the file, overwriting the file, it doesn't append to it.*/ +unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename) { + FILE* file; + file = fopen(filename, "wb" ); + if(!file) return 79; + fwrite(buffer, 1, buffersize, file); + fclose(file); + return 0; +} + +#endif /*LODEPNG_COMPILE_DISK*/ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* // End of common code and tools. Begin of Zlib related code. // */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_ZLIB +#ifdef LODEPNG_COMPILE_ENCODER + +typedef struct { + ucvector* data; + unsigned char bp; /*ok to overflow, indicates bit pos inside byte*/ +} LodePNGBitWriter; + +static void LodePNGBitWriter_init(LodePNGBitWriter* writer, ucvector* data) { + writer->data = data; + writer->bp = 0; +} + +/*TODO: this ignores potential out of memory errors*/ +#define WRITEBIT(writer, bit){\ + /* append new byte */\ + if(((writer->bp) & 7u) == 0) {\ + if(!ucvector_resize(writer->data, writer->data->size + 1)) return;\ + writer->data->data[writer->data->size - 1] = 0;\ + }\ + (writer->data->data[writer->data->size - 1]) |= (bit << ((writer->bp) & 7u));\ + ++writer->bp;\ +} + +/* LSB of value is written first, and LSB of bytes is used first */ +static void writeBits(LodePNGBitWriter* writer, unsigned value, size_t nbits) { + if(nbits == 1) { /* compiler should statically compile this case if nbits == 1 */ + WRITEBIT(writer, value); + } else { + /* TODO: increase output size only once here rather than in each WRITEBIT */ + size_t i; + for(i = 0; i != nbits; ++i) { + WRITEBIT(writer, (unsigned char)((value >> i) & 1)); + } + } +} + +/* This one is to use for adding huffman symbol, the value bits are written MSB first */ +static void writeBitsReversed(LodePNGBitWriter* writer, unsigned value, size_t nbits) { + size_t i; + for(i = 0; i != nbits; ++i) { + /* TODO: increase output size only once here rather than in each WRITEBIT */ + WRITEBIT(writer, (unsigned char)((value >> (nbits - 1u - i)) & 1u)); + } +} +#endif /*LODEPNG_COMPILE_ENCODER*/ + +#ifdef LODEPNG_COMPILE_DECODER + +typedef struct { + const unsigned char* data; + size_t size; /*size of data in bytes*/ + size_t bitsize; /*size of data in bits, end of valid bp values, should be 8*size*/ + size_t bp; + unsigned buffer; /*buffer for reading bits. NOTE: 'unsigned' must support at least 32 bits*/ +} LodePNGBitReader; + +/* data size argument is in bytes. Returns error if size too large causing overflow */ +static unsigned LodePNGBitReader_init(LodePNGBitReader* reader, const unsigned char* data, size_t size) { + size_t temp; + reader->data = data; + reader->size = size; + /* size in bits, return error if overflow (if size_t is 32 bit this supports up to 500MB) */ + if(lodepng_mulofl(size, 8u, &reader->bitsize)) return 105; + /*ensure incremented bp can be compared to bitsize without overflow even when it would be incremented 32 too much and + trying to ensure 32 more bits*/ + if(lodepng_addofl(reader->bitsize, 64u, &temp)) return 105; + reader->bp = 0; + reader->buffer = 0; + return 0; /*ok*/ +} + +/* +ensureBits functions: +Ensures the reader can at least read nbits bits in one or more readBits calls, +safely even if not enough bits are available. +Returns 1 if there are enough bits available, 0 if not. +*/ + +/*See ensureBits documentation above. This one ensures exactly 1 bit */ +/*static unsigned ensureBits1(LodePNGBitReader* reader) { + if(reader->bp >= reader->bitsize) return 0; + reader->buffer = (unsigned)reader->data[reader->bp >> 3u] >> (reader->bp & 7u); + return 1; +}*/ + +/*See ensureBits documentation above. This one ensures up to 9 bits */ +static unsigned ensureBits9(LodePNGBitReader* reader, size_t nbits) { + size_t start = reader->bp >> 3u; + size_t size = reader->size; + if(start + 1u < size) { + reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u); + reader->buffer >>= (reader->bp & 7u); + return 1; + } else { + reader->buffer = 0; + if(start + 0u < size) reader->buffer |= reader->data[start + 0]; + reader->buffer >>= (reader->bp & 7u); + return reader->bp + nbits <= reader->bitsize; + } +} + +/*See ensureBits documentation above. This one ensures up to 17 bits */ +static unsigned ensureBits17(LodePNGBitReader* reader, size_t nbits) { + size_t start = reader->bp >> 3u; + size_t size = reader->size; + if(start + 2u < size) { + reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u) | + ((unsigned)reader->data[start + 2] << 16u); + reader->buffer >>= (reader->bp & 7u); + return 1; + } else { + reader->buffer = 0; + if(start + 0u < size) reader->buffer |= reader->data[start + 0]; + if(start + 1u < size) reader->buffer |= ((unsigned)reader->data[start + 1] << 8u); + reader->buffer >>= (reader->bp & 7u); + return reader->bp + nbits <= reader->bitsize; + } +} + +/*See ensureBits documentation above. This one ensures up to 25 bits */ +static LODEPNG_INLINE unsigned ensureBits25(LodePNGBitReader* reader, size_t nbits) { + size_t start = reader->bp >> 3u; + size_t size = reader->size; + if(start + 3u < size) { + reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u) | + ((unsigned)reader->data[start + 2] << 16u) | ((unsigned)reader->data[start + 3] << 24u); + reader->buffer >>= (reader->bp & 7u); + return 1; + } else { + reader->buffer = 0; + if(start + 0u < size) reader->buffer |= reader->data[start + 0]; + if(start + 1u < size) reader->buffer |= ((unsigned)reader->data[start + 1] << 8u); + if(start + 2u < size) reader->buffer |= ((unsigned)reader->data[start + 2] << 16u); + reader->buffer >>= (reader->bp & 7u); + return reader->bp + nbits <= reader->bitsize; + } +} + +/*See ensureBits documentation above. This one ensures up to 32 bits */ +static LODEPNG_INLINE unsigned ensureBits32(LodePNGBitReader* reader, size_t nbits) { + size_t start = reader->bp >> 3u; + size_t size = reader->size; + if(start + 4u < size) { + reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u) | + ((unsigned)reader->data[start + 2] << 16u) | ((unsigned)reader->data[start + 3] << 24u); + reader->buffer >>= (reader->bp & 7u); + reader->buffer |= (((unsigned)reader->data[start + 4] << 24u) << (8u - (reader->bp & 7u))); + return 1; + } else { + reader->buffer = 0; + if(start + 0u < size) reader->buffer |= reader->data[start + 0]; + if(start + 1u < size) reader->buffer |= ((unsigned)reader->data[start + 1] << 8u); + if(start + 2u < size) reader->buffer |= ((unsigned)reader->data[start + 2] << 16u); + if(start + 3u < size) reader->buffer |= ((unsigned)reader->data[start + 3] << 24u); + reader->buffer >>= (reader->bp & 7u); + return reader->bp + nbits <= reader->bitsize; + } +} + +/* Get bits without advancing the bit pointer. Must have enough bits available with ensureBits. Max nbits is 31. */ +static unsigned peekBits(LodePNGBitReader* reader, size_t nbits) { + /* The shift allows nbits to be only up to 31. */ + return reader->buffer & ((1u << nbits) - 1u); +} + +/* Must have enough bits available with ensureBits */ +static void advanceBits(LodePNGBitReader* reader, size_t nbits) { + reader->buffer >>= nbits; + reader->bp += nbits; +} + +/* Must have enough bits available with ensureBits */ +static unsigned readBits(LodePNGBitReader* reader, size_t nbits) { + unsigned result = peekBits(reader, nbits); + advanceBits(reader, nbits); + return result; +} + +/* Public for testing only. steps and result must have numsteps values. */ +unsigned lode_png_test_bitreader(const unsigned char* data, size_t size, + size_t numsteps, const size_t* steps, unsigned* result) { + size_t i; + LodePNGBitReader reader; + unsigned error = LodePNGBitReader_init(&reader, data, size); + if(error) return 0; + for(i = 0; i < numsteps; i++) { + size_t step = steps[i]; + unsigned ok; + if(step > 25) ok = ensureBits32(&reader, step); + else if(step > 17) ok = ensureBits25(&reader, step); + else if(step > 9) ok = ensureBits17(&reader, step); + else ok = ensureBits9(&reader, step); + if(!ok) return 0; + result[i] = readBits(&reader, step); + } + return 1; +} +#endif /*LODEPNG_COMPILE_DECODER*/ + +static unsigned reverseBits(unsigned bits, unsigned num) { + /*TODO: implement faster lookup table based version when needed*/ + unsigned i, result = 0; + for(i = 0; i < num; i++) result |= ((bits >> (num - i - 1u)) & 1u) << i; + return result; +} + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Deflate - Huffman / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +#define FIRST_LENGTH_CODE_INDEX 257 +#define LAST_LENGTH_CODE_INDEX 285 +/*256 literals, the end code, some length codes, and 2 unused codes*/ +#define NUM_DEFLATE_CODE_SYMBOLS 288 +/*the distance codes have their own symbols, 30 used, 2 unused*/ +#define NUM_DISTANCE_SYMBOLS 32 +/*the code length codes. 0-15: code lengths, 16: copy previous 3-6 times, 17: 3-10 zeros, 18: 11-138 zeros*/ +#define NUM_CODE_LENGTH_CODES 19 + +/*the base lengths represented by codes 257-285*/ +static const unsigned LENGTHBASE[29] + = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, + 67, 83, 99, 115, 131, 163, 195, 227, 258}; + +/*the extra bits used by codes 257-285 (added to base length)*/ +static const unsigned LENGTHEXTRA[29] + = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, + 4, 4, 4, 4, 5, 5, 5, 5, 0}; + +/*the base backwards distances (the bits of distance codes appear after length codes and use their own huffman tree)*/ +static const unsigned DISTANCEBASE[30] + = {1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, + 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577}; + +/*the extra bits of backwards distances (added to base)*/ +static const unsigned DISTANCEEXTRA[30] + = {0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, + 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13}; + +/*the order in which "code length alphabet code lengths" are stored as specified by deflate, out of this the huffman +tree of the dynamic huffman tree lengths is generated*/ +static const unsigned CLCL_ORDER[NUM_CODE_LENGTH_CODES] + = {16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}; + +/* ////////////////////////////////////////////////////////////////////////// */ + +/* +Huffman tree struct, containing multiple representations of the tree +*/ +typedef struct HuffmanTree { + unsigned* codes; /*the huffman codes (bit patterns representing the symbols)*/ + unsigned* lengths; /*the lengths of the huffman codes*/ + unsigned maxbitlen; /*maximum number of bits a single code can get*/ + unsigned numcodes; /*number of symbols in the alphabet = number of codes*/ + /* for reading only */ + unsigned char* table_len; /*length of symbol from lookup table, or max length if secondary lookup needed*/ + unsigned short* table_value; /*value of symbol from lookup table, or pointer to secondary table if needed*/ +} HuffmanTree; + +static void HuffmanTree_init(HuffmanTree* tree) { + tree->codes = 0; + tree->lengths = 0; + tree->table_len = 0; + tree->table_value = 0; +} + +static void HuffmanTree_cleanup(HuffmanTree* tree) { + lodepng_free(tree->codes); + lodepng_free(tree->lengths); + lodepng_free(tree->table_len); + lodepng_free(tree->table_value); +} + +/* amount of bits for first huffman table lookup (aka root bits), see HuffmanTree_makeTable and huffmanDecodeSymbol.*/ +/* values 8u and 9u work the fastest */ +#define FIRSTBITS 9u + +/* a symbol value too big to represent any valid symbol, to indicate reading disallowed huffman bits combination, +which is possible in case of only 0 or 1 present symbols. */ +#define INVALIDSYMBOL 65535u + +/* make table for huffman decoding */ +static unsigned HuffmanTree_makeTable(HuffmanTree* tree) { + static const unsigned headsize = 1u << FIRSTBITS; /*size of the first table*/ + static const unsigned mask = (1u << FIRSTBITS) /*headsize*/ - 1u; + size_t i, numpresent, pointer, size; /*total table size*/ + unsigned* maxlens = (unsigned*)lodepng_malloc(headsize * sizeof(unsigned)); + if(!maxlens) return 83; /*alloc fail*/ + + /* compute maxlens: max total bit length of symbols sharing prefix in the first table*/ + lodepng_memset(maxlens, 0, headsize * sizeof(*maxlens)); + for(i = 0; i < tree->numcodes; i++) { + unsigned symbol = tree->codes[i]; + unsigned l = tree->lengths[i]; + unsigned index; + if(l <= FIRSTBITS) continue; /*symbols that fit in first table don't increase secondary table size*/ + /*get the FIRSTBITS MSBs, the MSBs of the symbol are encoded first. See later comment about the reversing*/ + index = reverseBits(symbol >> (l - FIRSTBITS), FIRSTBITS); + maxlens[index] = LODEPNG_MAX(maxlens[index], l); + } + /* compute total table size: size of first table plus all secondary tables for symbols longer than FIRSTBITS */ + size = headsize; + for(i = 0; i < headsize; ++i) { + unsigned l = maxlens[i]; + if(l > FIRSTBITS) size += (1u << (l - FIRSTBITS)); + } + tree->table_len = (unsigned char*)lodepng_malloc(size * sizeof(*tree->table_len)); + tree->table_value = (unsigned short*)lodepng_malloc(size * sizeof(*tree->table_value)); + if(!tree->table_len || !tree->table_value) { + lodepng_free(maxlens); + /* freeing tree->table values is done at a higher scope */ + return 83; /*alloc fail*/ + } + /*initialize with an invalid length to indicate unused entries*/ + for(i = 0; i < size; ++i) tree->table_len[i] = 16; + + /*fill in the first table for long symbols: max prefix size and pointer to secondary tables*/ + pointer = headsize; + for(i = 0; i < headsize; ++i) { + unsigned l = maxlens[i]; + if(l <= FIRSTBITS) continue; + tree->table_len[i] = l; + tree->table_value[i] = pointer; + pointer += (1u << (l - FIRSTBITS)); + } + lodepng_free(maxlens); + + /*fill in the first table for short symbols, or secondary table for long symbols*/ + numpresent = 0; + for(i = 0; i < tree->numcodes; ++i) { + unsigned l = tree->lengths[i]; + unsigned symbol = tree->codes[i]; /*the huffman bit pattern. i itself is the value.*/ + /*reverse bits, because the huffman bits are given in MSB first order but the bit reader reads LSB first*/ + unsigned reverse = reverseBits(symbol, l); + if(l == 0) continue; + numpresent++; + + if(l <= FIRSTBITS) { + /*short symbol, fully in first table, replicated num times if l < FIRSTBITS*/ + unsigned num = 1u << (FIRSTBITS - l); + unsigned j; + for(j = 0; j < num; ++j) { + /*bit reader will read the l bits of symbol first, the remaining FIRSTBITS - l bits go to the MSB's*/ + unsigned index = reverse | (j << l); + if(tree->table_len[index] != 16) return 55; /*invalid tree: long symbol shares prefix with short symbol*/ + tree->table_len[index] = l; + tree->table_value[index] = i; + } + } else { + /*long symbol, shares prefix with other long symbols in first lookup table, needs second lookup*/ + /*the FIRSTBITS MSBs of the symbol are the first table index*/ + unsigned index = reverse & mask; + unsigned maxlen = tree->table_len[index]; + /*log2 of secondary table length, should be >= l - FIRSTBITS*/ + unsigned tablelen = maxlen - FIRSTBITS; + unsigned start = tree->table_value[index]; /*starting index in secondary table*/ + unsigned num = 1u << (tablelen - (l - FIRSTBITS)); /*amount of entries of this symbol in secondary table*/ + unsigned j; + if(maxlen < l) return 55; /*invalid tree: long symbol shares prefix with short symbol*/ + for(j = 0; j < num; ++j) { + unsigned reverse2 = reverse >> FIRSTBITS; /* l - FIRSTBITS bits */ + unsigned index2 = start + (reverse2 | (j << (l - FIRSTBITS))); + tree->table_len[index2] = l; + tree->table_value[index2] = i; + } + } + } + + if(numpresent < 2) { + /* In case of exactly 1 symbol, in theory the huffman symbol needs 0 bits, + but deflate uses 1 bit instead. In case of 0 symbols, no symbols can + appear at all, but such huffman tree could still exist (e.g. if distance + codes are never used). In both cases, not all symbols of the table will be + filled in. Fill them in with an invalid symbol value so returning them from + huffmanDecodeSymbol will cause error. */ + for(i = 0; i < size; ++i) { + if(tree->table_len[i] == 16) { + /* As length, use a value smaller than FIRSTBITS for the head table, + and a value larger than FIRSTBITS for the secondary table, to ensure + valid behavior for advanceBits when reading this symbol. */ + tree->table_len[i] = (i < headsize) ? 1 : (FIRSTBITS + 1); + tree->table_value[i] = INVALIDSYMBOL; + } + } + } else { + /* A good huffman tree has N * 2 - 1 nodes, of which N - 1 are internal nodes. + If that is not the case (due to too long length codes), the table will not + have been fully used, and this is an error (not all bit combinations can be + decoded): an oversubscribed huffman tree, indicated by error 55. */ + for(i = 0; i < size; ++i) { + if(tree->table_len[i] == 16) return 55; + } + } + + return 0; +} + +/* +Second step for the ...makeFromLengths and ...makeFromFrequencies functions. +numcodes, lengths and maxbitlen must already be filled in correctly. return +value is error. +*/ +static unsigned HuffmanTree_makeFromLengths2(HuffmanTree* tree) { + unsigned* blcount; + unsigned* nextcode; + unsigned error = 0; + unsigned bits, n; + + tree->codes = (unsigned*)lodepng_malloc(tree->numcodes * sizeof(unsigned)); + blcount = (unsigned*)lodepng_malloc((tree->maxbitlen + 1) * sizeof(unsigned)); + nextcode = (unsigned*)lodepng_malloc((tree->maxbitlen + 1) * sizeof(unsigned)); + if(!tree->codes || !blcount || !nextcode) error = 83; /*alloc fail*/ + + if(!error) { + for(n = 0; n != tree->maxbitlen + 1; n++) blcount[n] = nextcode[n] = 0; + /*step 1: count number of instances of each code length*/ + for(bits = 0; bits != tree->numcodes; ++bits) ++blcount[tree->lengths[bits]]; + /*step 2: generate the nextcode values*/ + for(bits = 1; bits <= tree->maxbitlen; ++bits) { + nextcode[bits] = (nextcode[bits - 1] + blcount[bits - 1]) << 1u; + } + /*step 3: generate all the codes*/ + for(n = 0; n != tree->numcodes; ++n) { + if(tree->lengths[n] != 0) { + tree->codes[n] = nextcode[tree->lengths[n]]++; + /*remove superfluous bits from the code*/ + tree->codes[n] &= ((1u << tree->lengths[n]) - 1u); + } + } + } + + lodepng_free(blcount); + lodepng_free(nextcode); + + if(!error) error = HuffmanTree_makeTable(tree); + return error; +} + +/* +given the code lengths (as stored in the PNG file), generate the tree as defined +by Deflate. maxbitlen is the maximum bits that a code in the tree can have. +return value is error. +*/ +static unsigned HuffmanTree_makeFromLengths(HuffmanTree* tree, const unsigned* bitlen, + size_t numcodes, unsigned maxbitlen) { + unsigned i; + tree->lengths = (unsigned*)lodepng_malloc(numcodes * sizeof(unsigned)); + if(!tree->lengths) return 83; /*alloc fail*/ + for(i = 0; i != numcodes; ++i) tree->lengths[i] = bitlen[i]; + tree->numcodes = (unsigned)numcodes; /*number of symbols*/ + tree->maxbitlen = maxbitlen; + return HuffmanTree_makeFromLengths2(tree); +} + +#ifdef LODEPNG_COMPILE_ENCODER + +/*BPM: Boundary Package Merge, see "A Fast and Space-Economical Algorithm for Length-Limited Coding", +Jyrki Katajainen, Alistair Moffat, Andrew Turpin, 1995.*/ + +/*chain node for boundary package merge*/ +typedef struct BPMNode { + int weight; /*the sum of all weights in this chain*/ + unsigned index; /*index of this leaf node (called "count" in the paper)*/ + struct BPMNode* tail; /*the next nodes in this chain (null if last)*/ + int in_use; +} BPMNode; + +/*lists of chains*/ +typedef struct BPMLists { + /*memory pool*/ + unsigned memsize; + BPMNode* memory; + unsigned numfree; + unsigned nextfree; + BPMNode** freelist; + /*two heads of lookahead chains per list*/ + unsigned listsize; + BPMNode** chains0; + BPMNode** chains1; +} BPMLists; + +/*creates a new chain node with the given parameters, from the memory in the lists */ +static BPMNode* bpmnode_create(BPMLists* lists, int weight, unsigned index, BPMNode* tail) { + unsigned i; + BPMNode* result; + + /*memory full, so garbage collect*/ + if(lists->nextfree >= lists->numfree) { + /*mark only those that are in use*/ + for(i = 0; i != lists->memsize; ++i) lists->memory[i].in_use = 0; + for(i = 0; i != lists->listsize; ++i) { + BPMNode* node; + for(node = lists->chains0[i]; node != 0; node = node->tail) node->in_use = 1; + for(node = lists->chains1[i]; node != 0; node = node->tail) node->in_use = 1; + } + /*collect those that are free*/ + lists->numfree = 0; + for(i = 0; i != lists->memsize; ++i) { + if(!lists->memory[i].in_use) lists->freelist[lists->numfree++] = &lists->memory[i]; + } + lists->nextfree = 0; + } + + result = lists->freelist[lists->nextfree++]; + result->weight = weight; + result->index = index; + result->tail = tail; + return result; +} + +/*sort the leaves with stable mergesort*/ +static void bpmnode_sort(BPMNode* leaves, size_t num) { + BPMNode* mem = (BPMNode*)lodepng_malloc(sizeof(*leaves) * num); + size_t width, counter = 0; + for(width = 1; width < num; width *= 2) { + BPMNode* a = (counter & 1) ? mem : leaves; + BPMNode* b = (counter & 1) ? leaves : mem; + size_t p; + for(p = 0; p < num; p += 2 * width) { + size_t q = (p + width > num) ? num : (p + width); + size_t r = (p + 2 * width > num) ? num : (p + 2 * width); + size_t i = p, j = q, k; + for(k = p; k < r; k++) { + if(i < q && (j >= r || a[i].weight <= a[j].weight)) b[k] = a[i++]; + else b[k] = a[j++]; + } + } + counter++; + } + if(counter & 1) lodepng_memcpy(leaves, mem, sizeof(*leaves) * num); + lodepng_free(mem); +} + +/*Boundary Package Merge step, numpresent is the amount of leaves, and c is the current chain.*/ +static void boundaryPM(BPMLists* lists, BPMNode* leaves, size_t numpresent, int c, int num) { + unsigned lastindex = lists->chains1[c]->index; + + if(c == 0) { + if(lastindex >= numpresent) return; + lists->chains0[c] = lists->chains1[c]; + lists->chains1[c] = bpmnode_create(lists, leaves[lastindex].weight, lastindex + 1, 0); + } else { + /*sum of the weights of the head nodes of the previous lookahead chains.*/ + int sum = lists->chains0[c - 1]->weight + lists->chains1[c - 1]->weight; + lists->chains0[c] = lists->chains1[c]; + if(lastindex < numpresent && sum > leaves[lastindex].weight) { + lists->chains1[c] = bpmnode_create(lists, leaves[lastindex].weight, lastindex + 1, lists->chains1[c]->tail); + return; + } + lists->chains1[c] = bpmnode_create(lists, sum, lastindex, lists->chains1[c - 1]); + /*in the end we are only interested in the chain of the last list, so no + need to recurse if we're at the last one (this gives measurable speedup)*/ + if(num + 1 < (int)(2 * numpresent - 2)) { + boundaryPM(lists, leaves, numpresent, c - 1, num); + boundaryPM(lists, leaves, numpresent, c - 1, num); + } + } +} + +unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequencies, + size_t numcodes, unsigned maxbitlen) { + unsigned error = 0; + unsigned i; + size_t numpresent = 0; /*number of symbols with non-zero frequency*/ + BPMNode* leaves; /*the symbols, only those with > 0 frequency*/ + + if(numcodes == 0) return 80; /*error: a tree of 0 symbols is not supposed to be made*/ + if((1u << maxbitlen) < (unsigned)numcodes) return 80; /*error: represent all symbols*/ + + leaves = (BPMNode*)lodepng_malloc(numcodes * sizeof(*leaves)); + if(!leaves) return 83; /*alloc fail*/ + + for(i = 0; i != numcodes; ++i) { + if(frequencies[i] > 0) { + leaves[numpresent].weight = (int)frequencies[i]; + leaves[numpresent].index = i; + ++numpresent; + } + } + + lodepng_memset(lengths, 0, numcodes * sizeof(*lengths)); + + /*ensure at least two present symbols. There should be at least one symbol + according to RFC 1951 section 3.2.7. Some decoders incorrectly require two. To + make these work as well ensure there are at least two symbols. The + Package-Merge code below also doesn't work correctly if there's only one + symbol, it'd give it the theoretical 0 bits but in practice zlib wants 1 bit*/ + if(numpresent == 0) { + lengths[0] = lengths[1] = 1; /*note that for RFC 1951 section 3.2.7, only lengths[0] = 1 is needed*/ + } else if(numpresent == 1) { + lengths[leaves[0].index] = 1; + lengths[leaves[0].index == 0 ? 1 : 0] = 1; + } else { + BPMLists lists; + BPMNode* node; + + bpmnode_sort(leaves, numpresent); + + lists.listsize = maxbitlen; + lists.memsize = 2 * maxbitlen * (maxbitlen + 1); + lists.nextfree = 0; + lists.numfree = lists.memsize; + lists.memory = (BPMNode*)lodepng_malloc(lists.memsize * sizeof(*lists.memory)); + lists.freelist = (BPMNode**)lodepng_malloc(lists.memsize * sizeof(BPMNode*)); + lists.chains0 = (BPMNode**)lodepng_malloc(lists.listsize * sizeof(BPMNode*)); + lists.chains1 = (BPMNode**)lodepng_malloc(lists.listsize * sizeof(BPMNode*)); + if(!lists.memory || !lists.freelist || !lists.chains0 || !lists.chains1) error = 83; /*alloc fail*/ + + if(!error) { + for(i = 0; i != lists.memsize; ++i) lists.freelist[i] = &lists.memory[i]; + + bpmnode_create(&lists, leaves[0].weight, 1, 0); + bpmnode_create(&lists, leaves[1].weight, 2, 0); + + for(i = 0; i != lists.listsize; ++i) { + lists.chains0[i] = &lists.memory[0]; + lists.chains1[i] = &lists.memory[1]; + } + + /*each boundaryPM call adds one chain to the last list, and we need 2 * numpresent - 2 chains.*/ + for(i = 2; i != 2 * numpresent - 2; ++i) boundaryPM(&lists, leaves, numpresent, (int)maxbitlen - 1, (int)i); + + for(node = lists.chains1[maxbitlen - 1]; node; node = node->tail) { + for(i = 0; i != node->index; ++i) ++lengths[leaves[i].index]; + } + } + + lodepng_free(lists.memory); + lodepng_free(lists.freelist); + lodepng_free(lists.chains0); + lodepng_free(lists.chains1); + } + + lodepng_free(leaves); + return error; +} + +/*Create the Huffman tree given the symbol frequencies*/ +static unsigned HuffmanTree_makeFromFrequencies(HuffmanTree* tree, const unsigned* frequencies, + size_t mincodes, size_t numcodes, unsigned maxbitlen) { + unsigned error = 0; + while(!frequencies[numcodes - 1] && numcodes > mincodes) --numcodes; /*trim zeroes*/ + tree->lengths = (unsigned*)lodepng_malloc(numcodes * sizeof(unsigned)); + if(!tree->lengths) return 83; /*alloc fail*/ + tree->maxbitlen = maxbitlen; + tree->numcodes = (unsigned)numcodes; /*number of symbols*/ + + error = lodepng_huffman_code_lengths(tree->lengths, frequencies, numcodes, maxbitlen); + if(!error) error = HuffmanTree_makeFromLengths2(tree); + return error; +} +#endif /*LODEPNG_COMPILE_ENCODER*/ + +/*get the literal and length code tree of a deflated block with fixed tree, as per the deflate specification*/ +static unsigned generateFixedLitLenTree(HuffmanTree* tree) { + unsigned i, error = 0; + unsigned* bitlen = (unsigned*)lodepng_malloc(NUM_DEFLATE_CODE_SYMBOLS * sizeof(unsigned)); + if(!bitlen) return 83; /*alloc fail*/ + + /*288 possible codes: 0-255=literals, 256=endcode, 257-285=lengthcodes, 286-287=unused*/ + for(i = 0; i <= 143; ++i) bitlen[i] = 8; + for(i = 144; i <= 255; ++i) bitlen[i] = 9; + for(i = 256; i <= 279; ++i) bitlen[i] = 7; + for(i = 280; i <= 287; ++i) bitlen[i] = 8; + + error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DEFLATE_CODE_SYMBOLS, 15); + + lodepng_free(bitlen); + return error; +} + +/*get the distance code tree of a deflated block with fixed tree, as specified in the deflate specification*/ +static unsigned generateFixedDistanceTree(HuffmanTree* tree) { + unsigned i, error = 0; + unsigned* bitlen = (unsigned*)lodepng_malloc(NUM_DISTANCE_SYMBOLS * sizeof(unsigned)); + if(!bitlen) return 83; /*alloc fail*/ + + /*there are 32 distance codes, but 30-31 are unused*/ + for(i = 0; i != NUM_DISTANCE_SYMBOLS; ++i) bitlen[i] = 5; + error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DISTANCE_SYMBOLS, 15); + + lodepng_free(bitlen); + return error; +} + +#ifdef LODEPNG_COMPILE_DECODER + +/* +returns the code. The bit reader must already have been ensured at least 15 bits +*/ +static unsigned huffmanDecodeSymbol(LodePNGBitReader* reader, const HuffmanTree* codetree) { + unsigned short code = peekBits(reader, FIRSTBITS); + unsigned short l = codetree->table_len[code]; + unsigned short value = codetree->table_value[code]; + if(l <= FIRSTBITS) { + advanceBits(reader, l); + return value; + } else { + unsigned index2; + advanceBits(reader, FIRSTBITS); + index2 = value + peekBits(reader, l - FIRSTBITS); + advanceBits(reader, codetree->table_len[index2] - FIRSTBITS); + return codetree->table_value[index2]; + } +} +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_DECODER + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Inflator (Decompressor) / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +/*get the tree of a deflated block with fixed tree, as specified in the deflate specification +Returns error code.*/ +static unsigned getTreeInflateFixed(HuffmanTree* tree_ll, HuffmanTree* tree_d) { + unsigned error = generateFixedLitLenTree(tree_ll); + if(error) return error; + return generateFixedDistanceTree(tree_d); +} + +/*get the tree of a deflated block with dynamic tree, the tree itself is also Huffman compressed with a known tree*/ +static unsigned getTreeInflateDynamic(HuffmanTree* tree_ll, HuffmanTree* tree_d, + LodePNGBitReader* reader) { + /*make sure that length values that aren't filled in will be 0, or a wrong tree will be generated*/ + unsigned error = 0; + unsigned n, HLIT, HDIST, HCLEN, i; + + /*see comments in deflateDynamic for explanation of the context and these variables, it is analogous*/ + unsigned* bitlen_ll = 0; /*lit,len code lengths*/ + unsigned* bitlen_d = 0; /*dist code lengths*/ + /*code length code lengths ("clcl"), the bit lengths of the huffman tree used to compress bitlen_ll and bitlen_d*/ + unsigned* bitlen_cl = 0; + HuffmanTree tree_cl; /*the code tree for code length codes (the huffman tree for compressed huffman trees)*/ + + if(!ensureBits17(reader, 14)) return 49; /*error: the bit pointer is or will go past the memory*/ + + /*number of literal/length codes + 257. Unlike the spec, the value 257 is added to it here already*/ + HLIT = readBits(reader, 5) + 257; + /*number of distance codes. Unlike the spec, the value 1 is added to it here already*/ + HDIST = readBits(reader, 5) + 1; + /*number of code length codes. Unlike the spec, the value 4 is added to it here already*/ + HCLEN = readBits(reader, 4) + 4; + + bitlen_cl = (unsigned*)lodepng_malloc(NUM_CODE_LENGTH_CODES * sizeof(unsigned)); + if(!bitlen_cl) return 83 /*alloc fail*/; + + HuffmanTree_init(&tree_cl); + + while(!error) { + /*read the code length codes out of 3 * (amount of code length codes) bits*/ + if(lodepng_gtofl(reader->bp, HCLEN * 3, reader->bitsize)) { + ERROR_BREAK(50); /*error: the bit pointer is or will go past the memory*/ + } + for(i = 0; i != HCLEN; ++i) { + ensureBits9(reader, 3); /*out of bounds already checked above */ + bitlen_cl[CLCL_ORDER[i]] = readBits(reader, 3); + } + for(i = HCLEN; i != NUM_CODE_LENGTH_CODES; ++i) { + bitlen_cl[CLCL_ORDER[i]] = 0; + } + + error = HuffmanTree_makeFromLengths(&tree_cl, bitlen_cl, NUM_CODE_LENGTH_CODES, 7); + if(error) break; + + /*now we can use this tree to read the lengths for the tree that this function will return*/ + bitlen_ll = (unsigned*)lodepng_malloc(NUM_DEFLATE_CODE_SYMBOLS * sizeof(unsigned)); + bitlen_d = (unsigned*)lodepng_malloc(NUM_DISTANCE_SYMBOLS * sizeof(unsigned)); + if(!bitlen_ll || !bitlen_d) ERROR_BREAK(83 /*alloc fail*/); + lodepng_memset(bitlen_ll, 0, NUM_DEFLATE_CODE_SYMBOLS * sizeof(*bitlen_ll)); + lodepng_memset(bitlen_d, 0, NUM_DISTANCE_SYMBOLS * sizeof(*bitlen_d)); + + /*i is the current symbol we're reading in the part that contains the code lengths of lit/len and dist codes*/ + i = 0; + while(i < HLIT + HDIST) { + unsigned code; + ensureBits25(reader, 22); /* up to 15 bits for huffman code, up to 7 extra bits below*/ + code = huffmanDecodeSymbol(reader, &tree_cl); + if(code <= 15) /*a length code*/ { + if(i < HLIT) bitlen_ll[i] = code; + else bitlen_d[i - HLIT] = code; + ++i; + } else if(code == 16) /*repeat previous*/ { + unsigned replength = 3; /*read in the 2 bits that indicate repeat length (3-6)*/ + unsigned value; /*set value to the previous code*/ + + if(i == 0) ERROR_BREAK(54); /*can't repeat previous if i is 0*/ + + replength += readBits(reader, 2); + + if(i < HLIT + 1) value = bitlen_ll[i - 1]; + else value = bitlen_d[i - HLIT - 1]; + /*repeat this value in the next lengths*/ + for(n = 0; n < replength; ++n) { + if(i >= HLIT + HDIST) ERROR_BREAK(13); /*error: i is larger than the amount of codes*/ + if(i < HLIT) bitlen_ll[i] = value; + else bitlen_d[i - HLIT] = value; + ++i; + } + } else if(code == 17) /*repeat "0" 3-10 times*/ { + unsigned replength = 3; /*read in the bits that indicate repeat length*/ + replength += readBits(reader, 3); + + /*repeat this value in the next lengths*/ + for(n = 0; n < replength; ++n) { + if(i >= HLIT + HDIST) ERROR_BREAK(14); /*error: i is larger than the amount of codes*/ + + if(i < HLIT) bitlen_ll[i] = 0; + else bitlen_d[i - HLIT] = 0; + ++i; + } + } else if(code == 18) /*repeat "0" 11-138 times*/ { + unsigned replength = 11; /*read in the bits that indicate repeat length*/ + replength += readBits(reader, 7); + + /*repeat this value in the next lengths*/ + for(n = 0; n < replength; ++n) { + if(i >= HLIT + HDIST) ERROR_BREAK(15); /*error: i is larger than the amount of codes*/ + + if(i < HLIT) bitlen_ll[i] = 0; + else bitlen_d[i - HLIT] = 0; + ++i; + } + } else /*if(code == INVALIDSYMBOL)*/ { + ERROR_BREAK(16); /*error: tried to read disallowed huffman symbol*/ + } + /*check if any of the ensureBits above went out of bounds*/ + if(reader->bp > reader->bitsize) { + /*return error code 10 or 11 depending on the situation that happened in huffmanDecodeSymbol + (10=no endcode, 11=wrong jump outside of tree)*/ + /* TODO: revise error codes 10,11,50: the above comment is no longer valid */ + ERROR_BREAK(50); /*error, bit pointer jumps past memory*/ + } + } + if(error) break; + + if(bitlen_ll[256] == 0) ERROR_BREAK(64); /*the length of the end code 256 must be larger than 0*/ + + /*now we've finally got HLIT and HDIST, so generate the code trees, and the function is done*/ + error = HuffmanTree_makeFromLengths(tree_ll, bitlen_ll, NUM_DEFLATE_CODE_SYMBOLS, 15); + if(error) break; + error = HuffmanTree_makeFromLengths(tree_d, bitlen_d, NUM_DISTANCE_SYMBOLS, 15); + + break; /*end of error-while*/ + } + + lodepng_free(bitlen_cl); + lodepng_free(bitlen_ll); + lodepng_free(bitlen_d); + HuffmanTree_cleanup(&tree_cl); + + return error; +} + +/*inflate a block with dynamic of fixed Huffman tree. btype must be 1 or 2.*/ +static unsigned inflateHuffmanBlock(ucvector* out, LodePNGBitReader* reader, + unsigned btype, size_t max_output_size) { + unsigned error = 0; + HuffmanTree tree_ll; /*the huffman tree for literal and length codes*/ + HuffmanTree tree_d; /*the huffman tree for distance codes*/ + + HuffmanTree_init(&tree_ll); + HuffmanTree_init(&tree_d); + + if(btype == 1) error = getTreeInflateFixed(&tree_ll, &tree_d); + else /*if(btype == 2)*/ error = getTreeInflateDynamic(&tree_ll, &tree_d, reader); + + while(!error) /*decode all symbols until end reached, breaks at end code*/ { + /*code_ll is literal, length or end code*/ + unsigned code_ll; + ensureBits25(reader, 20); /* up to 15 for the huffman symbol, up to 5 for the length extra bits */ + code_ll = huffmanDecodeSymbol(reader, &tree_ll); + if(code_ll <= 255) /*literal symbol*/ { + if(!ucvector_resize(out, out->size + 1)) ERROR_BREAK(83 /*alloc fail*/); + out->data[out->size - 1] = (unsigned char)code_ll; + } else if(code_ll >= FIRST_LENGTH_CODE_INDEX && code_ll <= LAST_LENGTH_CODE_INDEX) /*length code*/ { + unsigned code_d, distance; + unsigned numextrabits_l, numextrabits_d; /*extra bits for length and distance*/ + size_t start, backward, length; + + /*part 1: get length base*/ + length = LENGTHBASE[code_ll - FIRST_LENGTH_CODE_INDEX]; + + /*part 2: get extra bits and add the value of that to length*/ + numextrabits_l = LENGTHEXTRA[code_ll - FIRST_LENGTH_CODE_INDEX]; + if(numextrabits_l != 0) { + /* bits already ensured above */ + length += readBits(reader, numextrabits_l); + } + + /*part 3: get distance code*/ + ensureBits32(reader, 28); /* up to 15 for the huffman symbol, up to 13 for the extra bits */ + code_d = huffmanDecodeSymbol(reader, &tree_d); + if(code_d > 29) { + if(code_d <= 31) { + ERROR_BREAK(18); /*error: invalid distance code (30-31 are never used)*/ + } else /* if(code_d == INVALIDSYMBOL) */{ + ERROR_BREAK(16); /*error: tried to read disallowed huffman symbol*/ + } + } + distance = DISTANCEBASE[code_d]; + + /*part 4: get extra bits from distance*/ + numextrabits_d = DISTANCEEXTRA[code_d]; + if(numextrabits_d != 0) { + /* bits already ensured above */ + distance += readBits(reader, numextrabits_d); + } + + /*part 5: fill in all the out[n] values based on the length and dist*/ + start = out->size; + if(distance > start) ERROR_BREAK(52); /*too long backward distance*/ + backward = start - distance; + + if(!ucvector_resize(out, out->size + length)) ERROR_BREAK(83 /*alloc fail*/); + if(distance < length) { + size_t forward; + lodepng_memcpy(out->data + start, out->data + backward, distance); + start += distance; + for(forward = distance; forward < length; ++forward) { + out->data[start++] = out->data[backward++]; + } + } else { + lodepng_memcpy(out->data + start, out->data + backward, length); + } + } else if(code_ll == 256) { + break; /*end code, break the loop*/ + } else /*if(code_ll == INVALIDSYMBOL)*/ { + ERROR_BREAK(16); /*error: tried to read disallowed huffman symbol*/ + } + /*check if any of the ensureBits above went out of bounds*/ + if(reader->bp > reader->bitsize) { + /*return error code 10 or 11 depending on the situation that happened in huffmanDecodeSymbol + (10=no endcode, 11=wrong jump outside of tree)*/ + /* TODO: revise error codes 10,11,50: the above comment is no longer valid */ + ERROR_BREAK(51); /*error, bit pointer jumps past memory*/ + } + if(max_output_size && out->size > max_output_size) { + ERROR_BREAK(109); /*error, larger than max size*/ + } + } + + HuffmanTree_cleanup(&tree_ll); + HuffmanTree_cleanup(&tree_d); + + return error; +} + +static unsigned inflateNoCompression(ucvector* out, LodePNGBitReader* reader, + const LodePNGDecompressSettings* settings) { + size_t bytepos; + size_t size = reader->size; + unsigned LEN, NLEN, error = 0; + + /*go to first boundary of byte*/ + bytepos = (reader->bp + 7u) >> 3u; + + /*read LEN (2 bytes) and NLEN (2 bytes)*/ + if(bytepos + 4 >= size) return 52; /*error, bit pointer will jump past memory*/ + LEN = (unsigned)reader->data[bytepos] + ((unsigned)reader->data[bytepos + 1] << 8u); bytepos += 2; + NLEN = (unsigned)reader->data[bytepos] + ((unsigned)reader->data[bytepos + 1] << 8u); bytepos += 2; + + /*check if 16-bit NLEN is really the one's complement of LEN*/ + if(!settings->ignore_nlen && LEN + NLEN != 65535) { + return 21; /*error: NLEN is not one's complement of LEN*/ + } + + if(!ucvector_resize(out, out->size + LEN)) return 83; /*alloc fail*/ + + /*read the literal data: LEN bytes are now stored in the out buffer*/ + if(bytepos + LEN > size) return 23; /*error: reading outside of in buffer*/ + + lodepng_memcpy(out->data + out->size - LEN, reader->data + bytepos, LEN); + bytepos += LEN; + + reader->bp = bytepos << 3u; + + return error; +} + +static unsigned lodepng_inflatev(ucvector* out, + const unsigned char* in, size_t insize, + const LodePNGDecompressSettings* settings) { + unsigned BFINAL = 0; + LodePNGBitReader reader; + unsigned error = LodePNGBitReader_init(&reader, in, insize); + + if(error) return error; + + while(!BFINAL) { + unsigned BTYPE; + if(!ensureBits9(&reader, 3)) return 52; /*error, bit pointer will jump past memory*/ + BFINAL = readBits(&reader, 1); + BTYPE = readBits(&reader, 2); + + if(BTYPE == 3) return 20; /*error: invalid BTYPE*/ + else if(BTYPE == 0) error = inflateNoCompression(out, &reader, settings); /*no compression*/ + else error = inflateHuffmanBlock(out, &reader, BTYPE, settings->max_output_size); /*compression, BTYPE 01 or 10*/ + if(!error && settings->max_output_size && out->size > settings->max_output_size) error = 109; + if(error) break; + } + + return error; +} + +unsigned lodepng_inflate(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGDecompressSettings* settings) { + ucvector v = ucvector_init(*out, *outsize); + unsigned error = lodepng_inflatev(&v, in, insize, settings); + *out = v.data; + *outsize = v.size; + return error; +} + +static unsigned inflatev(ucvector* out, const unsigned char* in, size_t insize, + const LodePNGDecompressSettings* settings) { + if(settings->custom_inflate) { + unsigned error = settings->custom_inflate(&out->data, &out->size, in, insize, settings); + out->allocsize = out->size; + if(error) { + /*the custom inflate is allowed to have its own error codes, however, we translate it to code 110*/ + error = 110; + /*if there's a max output size, and the custom zlib returned error, then indicate that error instead*/ + if(settings->max_output_size && out->size > settings->max_output_size) error = 109; + } + return error; + } else { + return lodepng_inflatev(out, in, insize, settings); + } +} + +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_ENCODER + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Deflator (Compressor) / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +static const size_t MAX_SUPPORTED_DEFLATE_LENGTH = 258; + +/*search the index in the array, that has the largest value smaller than or equal to the given value, +given array must be sorted (if no value is smaller, it returns the size of the given array)*/ +static size_t searchCodeIndex(const unsigned* array, size_t array_size, size_t value) { + /*binary search (only small gain over linear). TODO: use CPU log2 instruction for getting symbols instead*/ + size_t left = 1; + size_t right = array_size - 1; + + while(left <= right) { + size_t mid = (left + right) >> 1; + if(array[mid] >= value) right = mid - 1; + else left = mid + 1; + } + if(left >= array_size || array[left] > value) left--; + return left; +} + +static void addLengthDistance(uivector* values, size_t length, size_t distance) { + /*values in encoded vector are those used by deflate: + 0-255: literal bytes + 256: end + 257-285: length/distance pair (length code, followed by extra length bits, distance code, extra distance bits) + 286-287: invalid*/ + + unsigned length_code = (unsigned)searchCodeIndex(LENGTHBASE, 29, length); + unsigned extra_length = (unsigned)(length - LENGTHBASE[length_code]); + unsigned dist_code = (unsigned)searchCodeIndex(DISTANCEBASE, 30, distance); + unsigned extra_distance = (unsigned)(distance - DISTANCEBASE[dist_code]); + + size_t pos = values->size; + /*TODO: return error when this fails (out of memory)*/ + unsigned ok = uivector_resize(values, values->size + 4); + if(ok) { + values->data[pos + 0] = length_code + FIRST_LENGTH_CODE_INDEX; + values->data[pos + 1] = extra_length; + values->data[pos + 2] = dist_code; + values->data[pos + 3] = extra_distance; + } +} + +/*3 bytes of data get encoded into two bytes. The hash cannot use more than 3 +bytes as input because 3 is the minimum match length for deflate*/ +static const unsigned HASH_NUM_VALUES = 65536; +static const unsigned HASH_BIT_MASK = 65535; /*HASH_NUM_VALUES - 1, but C90 does not like that as initializer*/ + +typedef struct Hash { + int* head; /*hash value to head circular pos - can be outdated if went around window*/ + /*circular pos to prev circular pos*/ + unsigned short* chain; + int* val; /*circular pos to hash value*/ + + /*TODO: do this not only for zeros but for any repeated byte. However for PNG + it's always going to be the zeros that dominate, so not important for PNG*/ + int* headz; /*similar to head, but for chainz*/ + unsigned short* chainz; /*those with same amount of zeros*/ + unsigned short* zeros; /*length of zeros streak, used as a second hash chain*/ +} Hash; + +static unsigned hash_init(Hash* hash, unsigned windowsize) { + unsigned i; + hash->head = (int*)lodepng_malloc(sizeof(int) * HASH_NUM_VALUES); + hash->val = (int*)lodepng_malloc(sizeof(int) * windowsize); + hash->chain = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize); + + hash->zeros = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize); + hash->headz = (int*)lodepng_malloc(sizeof(int) * (MAX_SUPPORTED_DEFLATE_LENGTH + 1)); + hash->chainz = (unsigned short*)lodepng_malloc(sizeof(unsigned short) * windowsize); + + if(!hash->head || !hash->chain || !hash->val || !hash->headz|| !hash->chainz || !hash->zeros) { + return 83; /*alloc fail*/ + } + + /*initialize hash table*/ + for(i = 0; i != HASH_NUM_VALUES; ++i) hash->head[i] = -1; + for(i = 0; i != windowsize; ++i) hash->val[i] = -1; + for(i = 0; i != windowsize; ++i) hash->chain[i] = i; /*same value as index indicates uninitialized*/ + + for(i = 0; i <= MAX_SUPPORTED_DEFLATE_LENGTH; ++i) hash->headz[i] = -1; + for(i = 0; i != windowsize; ++i) hash->chainz[i] = i; /*same value as index indicates uninitialized*/ + + return 0; +} + +static void hash_cleanup(Hash* hash) { + lodepng_free(hash->head); + lodepng_free(hash->val); + lodepng_free(hash->chain); + + lodepng_free(hash->zeros); + lodepng_free(hash->headz); + lodepng_free(hash->chainz); +} + + + +static unsigned getHash(const unsigned char* data, size_t size, size_t pos) { + unsigned result = 0; + if(pos + 2 < size) { + /*A simple shift and xor hash is used. Since the data of PNGs is dominated + by zeroes due to the filters, a better hash does not have a significant + effect on speed in traversing the chain, and causes more time spend on + calculating the hash.*/ + result ^= ((unsigned)data[pos + 0] << 0u); + result ^= ((unsigned)data[pos + 1] << 4u); + result ^= ((unsigned)data[pos + 2] << 8u); + } else { + size_t amount, i; + if(pos >= size) return 0; + amount = size - pos; + for(i = 0; i != amount; ++i) result ^= ((unsigned)data[pos + i] << (i * 8u)); + } + return result & HASH_BIT_MASK; +} + +static unsigned countZeros(const unsigned char* data, size_t size, size_t pos) { + const unsigned char* start = data + pos; + const unsigned char* end = start + MAX_SUPPORTED_DEFLATE_LENGTH; + if(end > data + size) end = data + size; + data = start; + while(data != end && *data == 0) ++data; + /*subtracting two addresses returned as 32-bit number (max value is MAX_SUPPORTED_DEFLATE_LENGTH)*/ + return (unsigned)(data - start); +} + +/*wpos = pos & (windowsize - 1)*/ +static void updateHashChain(Hash* hash, size_t wpos, unsigned hashval, unsigned short numzeros) { + hash->val[wpos] = (int)hashval; + if(hash->head[hashval] != -1) hash->chain[wpos] = hash->head[hashval]; + hash->head[hashval] = (int)wpos; + + hash->zeros[wpos] = numzeros; + if(hash->headz[numzeros] != -1) hash->chainz[wpos] = hash->headz[numzeros]; + hash->headz[numzeros] = (int)wpos; +} + +/* +LZ77-encode the data. Return value is error code. The input are raw bytes, the output +is in the form of unsigned integers with codes representing for example literal bytes, or +length/distance pairs. +It uses a hash table technique to let it encode faster. When doing LZ77 encoding, a +sliding window (of windowsize) is used, and all past bytes in that window can be used as +the "dictionary". A brute force search through all possible distances would be slow, and +this hash technique is one out of several ways to speed this up. +*/ +static unsigned encodeLZ77(uivector* out, Hash* hash, + const unsigned char* in, size_t inpos, size_t insize, unsigned windowsize, + unsigned minmatch, unsigned nicematch, unsigned lazymatching) { + size_t pos; + unsigned i, error = 0; + /*for large window lengths, assume the user wants no compression loss. Otherwise, max hash chain length speedup.*/ + unsigned maxchainlength = windowsize >= 8192 ? windowsize : windowsize / 8u; + unsigned maxlazymatch = windowsize >= 8192 ? MAX_SUPPORTED_DEFLATE_LENGTH : 64; + + unsigned usezeros = 1; /*not sure if setting it to false for windowsize < 8192 is better or worse*/ + unsigned numzeros = 0; + + unsigned offset; /*the offset represents the distance in LZ77 terminology*/ + unsigned length; + unsigned lazy = 0; + unsigned lazylength = 0, lazyoffset = 0; + unsigned hashval; + unsigned current_offset, current_length; + unsigned prev_offset; + const unsigned char *lastptr, *foreptr, *backptr; + unsigned hashpos; + + if(windowsize == 0 || windowsize > 32768) return 60; /*error: windowsize smaller/larger than allowed*/ + if((windowsize & (windowsize - 1)) != 0) return 90; /*error: must be power of two*/ + + if(nicematch > MAX_SUPPORTED_DEFLATE_LENGTH) nicematch = MAX_SUPPORTED_DEFLATE_LENGTH; + + for(pos = inpos; pos < insize; ++pos) { + size_t wpos = pos & (windowsize - 1); /*position for in 'circular' hash buffers*/ + unsigned chainlength = 0; + + hashval = getHash(in, insize, pos); + + if(usezeros && hashval == 0) { + if(numzeros == 0) numzeros = countZeros(in, insize, pos); + else if(pos + numzeros > insize || in[pos + numzeros - 1] != 0) --numzeros; + } else { + numzeros = 0; + } + + updateHashChain(hash, wpos, hashval, numzeros); + + /*the length and offset found for the current position*/ + length = 0; + offset = 0; + + hashpos = hash->chain[wpos]; + + lastptr = &in[insize < pos + MAX_SUPPORTED_DEFLATE_LENGTH ? insize : pos + MAX_SUPPORTED_DEFLATE_LENGTH]; + + /*search for the longest string*/ + prev_offset = 0; + for(;;) { + if(chainlength++ >= maxchainlength) break; + current_offset = (unsigned)(hashpos <= wpos ? wpos - hashpos : wpos - hashpos + windowsize); + + if(current_offset < prev_offset) break; /*stop when went completely around the circular buffer*/ + prev_offset = current_offset; + if(current_offset > 0) { + /*test the next characters*/ + foreptr = &in[pos]; + backptr = &in[pos - current_offset]; + + /*common case in PNGs is lots of zeros. Quickly skip over them as a speedup*/ + if(numzeros >= 3) { + unsigned skip = hash->zeros[hashpos]; + if(skip > numzeros) skip = numzeros; + backptr += skip; + foreptr += skip; + } + + while(foreptr != lastptr && *backptr == *foreptr) /*maximum supported length by deflate is max length*/ { + ++backptr; + ++foreptr; + } + current_length = (unsigned)(foreptr - &in[pos]); + + if(current_length > length) { + length = current_length; /*the longest length*/ + offset = current_offset; /*the offset that is related to this longest length*/ + /*jump out once a length of max length is found (speed gain). This also jumps + out if length is MAX_SUPPORTED_DEFLATE_LENGTH*/ + if(current_length >= nicematch) break; + } + } + + if(hashpos == hash->chain[hashpos]) break; + + if(numzeros >= 3 && length > numzeros) { + hashpos = hash->chainz[hashpos]; + if(hash->zeros[hashpos] != numzeros) break; + } else { + hashpos = hash->chain[hashpos]; + /*outdated hash value, happens if particular value was not encountered in whole last window*/ + if(hash->val[hashpos] != (int)hashval) break; + } + } + + if(lazymatching) { + if(!lazy && length >= 3 && length <= maxlazymatch && length < MAX_SUPPORTED_DEFLATE_LENGTH) { + lazy = 1; + lazylength = length; + lazyoffset = offset; + continue; /*try the next byte*/ + } + if(lazy) { + lazy = 0; + if(pos == 0) ERROR_BREAK(81); + if(length > lazylength + 1) { + /*push the previous character as literal*/ + if(!uivector_push_back(out, in[pos - 1])) ERROR_BREAK(83 /*alloc fail*/); + } else { + length = lazylength; + offset = lazyoffset; + hash->head[hashval] = -1; /*the same hashchain update will be done, this ensures no wrong alteration*/ + hash->headz[numzeros] = -1; /*idem*/ + --pos; + } + } + } + if(length >= 3 && offset > windowsize) ERROR_BREAK(86 /*too big (or overflown negative) offset*/); + + /*encode it as length/distance pair or literal value*/ + if(length < 3) /*only lengths of 3 or higher are supported as length/distance pair*/ { + if(!uivector_push_back(out, in[pos])) ERROR_BREAK(83 /*alloc fail*/); + } else if(length < minmatch || (length == 3 && offset > 4096)) { + /*compensate for the fact that longer offsets have more extra bits, a + length of only 3 may be not worth it then*/ + if(!uivector_push_back(out, in[pos])) ERROR_BREAK(83 /*alloc fail*/); + } else { + addLengthDistance(out, length, offset); + for(i = 1; i < length; ++i) { + ++pos; + wpos = pos & (windowsize - 1); + hashval = getHash(in, insize, pos); + if(usezeros && hashval == 0) { + if(numzeros == 0) numzeros = countZeros(in, insize, pos); + else if(pos + numzeros > insize || in[pos + numzeros - 1] != 0) --numzeros; + } else { + numzeros = 0; + } + updateHashChain(hash, wpos, hashval, numzeros); + } + } + } /*end of the loop through each character of input*/ + + return error; +} + +/* /////////////////////////////////////////////////////////////////////////// */ + +static unsigned deflateNoCompression(ucvector* out, const unsigned char* data, size_t datasize) { + /*non compressed deflate block data: 1 bit BFINAL,2 bits BTYPE,(5 bits): it jumps to start of next byte, + 2 bytes LEN, 2 bytes NLEN, LEN bytes literal DATA*/ + + size_t i, numdeflateblocks = (datasize + 65534u) / 65535u; + unsigned datapos = 0; + for(i = 0; i != numdeflateblocks; ++i) { + unsigned BFINAL, BTYPE, LEN, NLEN; + unsigned char firstbyte; + size_t pos = out->size; + + BFINAL = (i == numdeflateblocks - 1); + BTYPE = 0; + + LEN = 65535; + if(datasize - datapos < 65535u) LEN = (unsigned)datasize - datapos; + NLEN = 65535 - LEN; + + if(!ucvector_resize(out, out->size + LEN + 5)) return 83; /*alloc fail*/ + + firstbyte = (unsigned char)(BFINAL + ((BTYPE & 1u) << 1u) + ((BTYPE & 2u) << 1u)); + out->data[pos + 0] = firstbyte; + out->data[pos + 1] = (unsigned char)(LEN & 255); + out->data[pos + 2] = (unsigned char)(LEN >> 8u); + out->data[pos + 3] = (unsigned char)(NLEN & 255); + out->data[pos + 4] = (unsigned char)(NLEN >> 8u); + lodepng_memcpy(out->data + pos + 5, data + datapos, LEN); + datapos += LEN; + } + + return 0; +} + +/* +write the lz77-encoded data, which has lit, len and dist codes, to compressed stream using huffman trees. +tree_ll: the tree for lit and len codes. +tree_d: the tree for distance codes. +*/ +static void writeLZ77data(LodePNGBitWriter* writer, const uivector* lz77_encoded, + const HuffmanTree* tree_ll, const HuffmanTree* tree_d) { + size_t i = 0; + for(i = 0; i != lz77_encoded->size; ++i) { + unsigned val = lz77_encoded->data[i]; + writeBitsReversed(writer, tree_ll->codes[val], tree_ll->lengths[val]); + if(val > 256) /*for a length code, 3 more things have to be added*/ { + unsigned length_index = val - FIRST_LENGTH_CODE_INDEX; + unsigned n_length_extra_bits = LENGTHEXTRA[length_index]; + unsigned length_extra_bits = lz77_encoded->data[++i]; + + unsigned distance_code = lz77_encoded->data[++i]; + + unsigned distance_index = distance_code; + unsigned n_distance_extra_bits = DISTANCEEXTRA[distance_index]; + unsigned distance_extra_bits = lz77_encoded->data[++i]; + + writeBits(writer, length_extra_bits, n_length_extra_bits); + writeBitsReversed(writer, tree_d->codes[distance_code], tree_d->lengths[distance_code]); + writeBits(writer, distance_extra_bits, n_distance_extra_bits); + } + } +} + +/*Deflate for a block of type "dynamic", that is, with freely, optimally, created huffman trees*/ +static unsigned deflateDynamic(LodePNGBitWriter* writer, Hash* hash, + const unsigned char* data, size_t datapos, size_t dataend, + const LodePNGCompressSettings* settings, unsigned final) { + unsigned error = 0; + + /* + A block is compressed as follows: The PNG data is lz77 encoded, resulting in + literal bytes and length/distance pairs. This is then huffman compressed with + two huffman trees. One huffman tree is used for the lit and len values ("ll"), + another huffman tree is used for the dist values ("d"). These two trees are + stored using their code lengths, and to compress even more these code lengths + are also run-length encoded and huffman compressed. This gives a huffman tree + of code lengths "cl". The code lengths used to describe this third tree are + the code length code lengths ("clcl"). + */ + + /*The lz77 encoded data, represented with integers since there will also be length and distance codes in it*/ + uivector lz77_encoded; + HuffmanTree tree_ll; /*tree for lit,len values*/ + HuffmanTree tree_d; /*tree for distance codes*/ + HuffmanTree tree_cl; /*tree for encoding the code lengths representing tree_ll and tree_d*/ + unsigned* frequencies_ll = 0; /*frequency of lit,len codes*/ + unsigned* frequencies_d = 0; /*frequency of dist codes*/ + unsigned* frequencies_cl = 0; /*frequency of code length codes*/ + unsigned* bitlen_lld = 0; /*lit,len,dist code lengths (int bits), literally (without repeat codes).*/ + unsigned* bitlen_lld_e = 0; /*bitlen_lld encoded with repeat codes (this is a rudimentary run length compression)*/ + size_t datasize = dataend - datapos; + + /* + If we could call "bitlen_cl" the the code length code lengths ("clcl"), that is the bit lengths of codes to represent + tree_cl in CLCL_ORDER, then due to the huffman compression of huffman tree representations ("two levels"), there are + some analogies: + bitlen_lld is to tree_cl what data is to tree_ll and tree_d. + bitlen_lld_e is to bitlen_lld what lz77_encoded is to data. + bitlen_cl is to bitlen_lld_e what bitlen_lld is to lz77_encoded. + */ + + unsigned BFINAL = final; + size_t i; + size_t numcodes_ll, numcodes_d, numcodes_lld, numcodes_lld_e, numcodes_cl; + unsigned HLIT, HDIST, HCLEN; + + uivector_init(&lz77_encoded); + HuffmanTree_init(&tree_ll); + HuffmanTree_init(&tree_d); + HuffmanTree_init(&tree_cl); + /* could fit on stack, but >1KB is on the larger side so allocate instead */ + frequencies_ll = (unsigned*)lodepng_malloc(286 * sizeof(*frequencies_ll)); + frequencies_d = (unsigned*)lodepng_malloc(30 * sizeof(*frequencies_d)); + frequencies_cl = (unsigned*)lodepng_malloc(NUM_CODE_LENGTH_CODES * sizeof(*frequencies_cl)); + + if(!frequencies_ll || !frequencies_d || !frequencies_cl) error = 83; /*alloc fail*/ + + /*This while loop never loops due to a break at the end, it is here to + allow breaking out of it to the cleanup phase on error conditions.*/ + while(!error) { + lodepng_memset(frequencies_ll, 0, 286 * sizeof(*frequencies_ll)); + lodepng_memset(frequencies_d, 0, 30 * sizeof(*frequencies_d)); + lodepng_memset(frequencies_cl, 0, NUM_CODE_LENGTH_CODES * sizeof(*frequencies_cl)); + + if(settings->use_lz77) { + error = encodeLZ77(&lz77_encoded, hash, data, datapos, dataend, settings->windowsize, + settings->minmatch, settings->nicematch, settings->lazymatching); + if(error) break; + } else { + if(!uivector_resize(&lz77_encoded, datasize)) ERROR_BREAK(83 /*alloc fail*/); + for(i = datapos; i < dataend; ++i) lz77_encoded.data[i - datapos] = data[i]; /*no LZ77, but still will be Huffman compressed*/ + } + + /*Count the frequencies of lit, len and dist codes*/ + for(i = 0; i != lz77_encoded.size; ++i) { + unsigned symbol = lz77_encoded.data[i]; + ++frequencies_ll[symbol]; + if(symbol > 256) { + unsigned dist = lz77_encoded.data[i + 2]; + ++frequencies_d[dist]; + i += 3; + } + } + frequencies_ll[256] = 1; /*there will be exactly 1 end code, at the end of the block*/ + + /*Make both huffman trees, one for the lit and len codes, one for the dist codes*/ + error = HuffmanTree_makeFromFrequencies(&tree_ll, frequencies_ll, 257, 286, 15); + if(error) break; + /*2, not 1, is chosen for mincodes: some buggy PNG decoders require at least 2 symbols in the dist tree*/ + error = HuffmanTree_makeFromFrequencies(&tree_d, frequencies_d, 2, 30, 15); + if(error) break; + + numcodes_ll = LODEPNG_MIN(tree_ll.numcodes, 286); + numcodes_d = LODEPNG_MIN(tree_d.numcodes, 30); + /*store the code lengths of both generated trees in bitlen_lld*/ + numcodes_lld = numcodes_ll + numcodes_d; + bitlen_lld = (unsigned*)lodepng_malloc(numcodes_lld * sizeof(*bitlen_lld)); + /*numcodes_lld_e never needs more size than bitlen_lld*/ + bitlen_lld_e = (unsigned*)lodepng_malloc(numcodes_lld * sizeof(*bitlen_lld_e)); + if(!bitlen_lld || !bitlen_lld_e) ERROR_BREAK(83); /*alloc fail*/ + numcodes_lld_e = 0; + + for(i = 0; i != numcodes_ll; ++i) bitlen_lld[i] = tree_ll.lengths[i]; + for(i = 0; i != numcodes_d; ++i) bitlen_lld[numcodes_ll + i] = tree_d.lengths[i]; + + /*run-length compress bitlen_ldd into bitlen_lld_e by using repeat codes 16 (copy length 3-6 times), + 17 (3-10 zeroes), 18 (11-138 zeroes)*/ + for(i = 0; i != numcodes_lld; ++i) { + unsigned j = 0; /*amount of repetitions*/ + while(i + j + 1 < numcodes_lld && bitlen_lld[i + j + 1] == bitlen_lld[i]) ++j; + + if(bitlen_lld[i] == 0 && j >= 2) /*repeat code for zeroes*/ { + ++j; /*include the first zero*/ + if(j <= 10) /*repeat code 17 supports max 10 zeroes*/ { + bitlen_lld_e[numcodes_lld_e++] = 17; + bitlen_lld_e[numcodes_lld_e++] = j - 3; + } else /*repeat code 18 supports max 138 zeroes*/ { + if(j > 138) j = 138; + bitlen_lld_e[numcodes_lld_e++] = 18; + bitlen_lld_e[numcodes_lld_e++] = j - 11; + } + i += (j - 1); + } else if(j >= 3) /*repeat code for value other than zero*/ { + size_t k; + unsigned num = j / 6u, rest = j % 6u; + bitlen_lld_e[numcodes_lld_e++] = bitlen_lld[i]; + for(k = 0; k < num; ++k) { + bitlen_lld_e[numcodes_lld_e++] = 16; + bitlen_lld_e[numcodes_lld_e++] = 6 - 3; + } + if(rest >= 3) { + bitlen_lld_e[numcodes_lld_e++] = 16; + bitlen_lld_e[numcodes_lld_e++] = rest - 3; + } + else j -= rest; + i += j; + } else /*too short to benefit from repeat code*/ { + bitlen_lld_e[numcodes_lld_e++] = bitlen_lld[i]; + } + } + + /*generate tree_cl, the huffmantree of huffmantrees*/ + for(i = 0; i != numcodes_lld_e; ++i) { + ++frequencies_cl[bitlen_lld_e[i]]; + /*after a repeat code come the bits that specify the number of repetitions, + those don't need to be in the frequencies_cl calculation*/ + if(bitlen_lld_e[i] >= 16) ++i; + } + + error = HuffmanTree_makeFromFrequencies(&tree_cl, frequencies_cl, + NUM_CODE_LENGTH_CODES, NUM_CODE_LENGTH_CODES, 7); + if(error) break; + + /*compute amount of code-length-code-lengths to output*/ + numcodes_cl = NUM_CODE_LENGTH_CODES; + /*trim zeros at the end (using CLCL_ORDER), but minimum size must be 4 (see HCLEN below)*/ + while(numcodes_cl > 4u && tree_cl.lengths[CLCL_ORDER[numcodes_cl - 1u]] == 0) { + numcodes_cl--; + } + + /* + Write everything into the output + + After the BFINAL and BTYPE, the dynamic block consists out of the following: + - 5 bits HLIT, 5 bits HDIST, 4 bits HCLEN + - (HCLEN+4)*3 bits code lengths of code length alphabet + - HLIT + 257 code lengths of lit/length alphabet (encoded using the code length + alphabet, + possible repetition codes 16, 17, 18) + - HDIST + 1 code lengths of distance alphabet (encoded using the code length + alphabet, + possible repetition codes 16, 17, 18) + - compressed data + - 256 (end code) + */ + + /*Write block type*/ + writeBits(writer, BFINAL, 1); + writeBits(writer, 0, 1); /*first bit of BTYPE "dynamic"*/ + writeBits(writer, 1, 1); /*second bit of BTYPE "dynamic"*/ + + /*write the HLIT, HDIST and HCLEN values*/ + /*all three sizes take trimmed ending zeroes into account, done either by HuffmanTree_makeFromFrequencies + or in the loop for numcodes_cl above, which saves space. */ + HLIT = (unsigned)(numcodes_ll - 257); + HDIST = (unsigned)(numcodes_d - 1); + HCLEN = (unsigned)(numcodes_cl - 4); + writeBits(writer, HLIT, 5); + writeBits(writer, HDIST, 5); + writeBits(writer, HCLEN, 4); + + /*write the code lengths of the code length alphabet ("bitlen_cl")*/ + for(i = 0; i != numcodes_cl; ++i) writeBits(writer, tree_cl.lengths[CLCL_ORDER[i]], 3); + + /*write the lengths of the lit/len AND the dist alphabet*/ + for(i = 0; i != numcodes_lld_e; ++i) { + writeBitsReversed(writer, tree_cl.codes[bitlen_lld_e[i]], tree_cl.lengths[bitlen_lld_e[i]]); + /*extra bits of repeat codes*/ + if(bitlen_lld_e[i] == 16) writeBits(writer, bitlen_lld_e[++i], 2); + else if(bitlen_lld_e[i] == 17) writeBits(writer, bitlen_lld_e[++i], 3); + else if(bitlen_lld_e[i] == 18) writeBits(writer, bitlen_lld_e[++i], 7); + } + + /*write the compressed data symbols*/ + writeLZ77data(writer, &lz77_encoded, &tree_ll, &tree_d); + /*error: the length of the end code 256 must be larger than 0*/ + if(tree_ll.lengths[256] == 0) ERROR_BREAK(64); + + /*write the end code*/ + writeBitsReversed(writer, tree_ll.codes[256], tree_ll.lengths[256]); + + break; /*end of error-while*/ + } + + /*cleanup*/ + uivector_cleanup(&lz77_encoded); + HuffmanTree_cleanup(&tree_ll); + HuffmanTree_cleanup(&tree_d); + HuffmanTree_cleanup(&tree_cl); + lodepng_free(frequencies_ll); + lodepng_free(frequencies_d); + lodepng_free(frequencies_cl); + lodepng_free(bitlen_lld); + lodepng_free(bitlen_lld_e); + + return error; +} + +static unsigned deflateFixed(LodePNGBitWriter* writer, Hash* hash, + const unsigned char* data, + size_t datapos, size_t dataend, + const LodePNGCompressSettings* settings, unsigned final) { + HuffmanTree tree_ll; /*tree for literal values and length codes*/ + HuffmanTree tree_d; /*tree for distance codes*/ + + unsigned BFINAL = final; + unsigned error = 0; + size_t i; + + HuffmanTree_init(&tree_ll); + HuffmanTree_init(&tree_d); + + error = generateFixedLitLenTree(&tree_ll); + if(!error) error = generateFixedDistanceTree(&tree_d); + + if(!error) { + writeBits(writer, BFINAL, 1); + writeBits(writer, 1, 1); /*first bit of BTYPE*/ + writeBits(writer, 0, 1); /*second bit of BTYPE*/ + + if(settings->use_lz77) /*LZ77 encoded*/ { + uivector lz77_encoded; + uivector_init(&lz77_encoded); + error = encodeLZ77(&lz77_encoded, hash, data, datapos, dataend, settings->windowsize, + settings->minmatch, settings->nicematch, settings->lazymatching); + if(!error) writeLZ77data(writer, &lz77_encoded, &tree_ll, &tree_d); + uivector_cleanup(&lz77_encoded); + } else /*no LZ77, but still will be Huffman compressed*/ { + for(i = datapos; i < dataend; ++i) { + writeBitsReversed(writer, tree_ll.codes[data[i]], tree_ll.lengths[data[i]]); + } + } + /*add END code*/ + if(!error) writeBitsReversed(writer,tree_ll.codes[256], tree_ll.lengths[256]); + } + + /*cleanup*/ + HuffmanTree_cleanup(&tree_ll); + HuffmanTree_cleanup(&tree_d); + + return error; +} + +static unsigned lodepng_deflatev(ucvector* out, const unsigned char* in, size_t insize, + const LodePNGCompressSettings* settings) { + unsigned error = 0; + size_t i, blocksize, numdeflateblocks; + Hash hash; + LodePNGBitWriter writer; + + LodePNGBitWriter_init(&writer, out); + + if(settings->btype > 2) return 61; + else if(settings->btype == 0) return deflateNoCompression(out, in, insize); + else if(settings->btype == 1) blocksize = insize; + else /*if(settings->btype == 2)*/ { + /*on PNGs, deflate blocks of 65-262k seem to give most dense encoding*/ + blocksize = insize / 8u + 8; + if(blocksize < 65536) blocksize = 65536; + if(blocksize > 262144) blocksize = 262144; + } + + numdeflateblocks = (insize + blocksize - 1) / blocksize; + if(numdeflateblocks == 0) numdeflateblocks = 1; + + error = hash_init(&hash, settings->windowsize); + + if(!error) { + for(i = 0; i != numdeflateblocks && !error; ++i) { + unsigned final = (i == numdeflateblocks - 1); + size_t start = i * blocksize; + size_t end = start + blocksize; + if(end > insize) end = insize; + + if(settings->btype == 1) error = deflateFixed(&writer, &hash, in, start, end, settings, final); + else if(settings->btype == 2) error = deflateDynamic(&writer, &hash, in, start, end, settings, final); + } + } + + hash_cleanup(&hash); + + return error; +} + +unsigned lodepng_deflate(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGCompressSettings* settings) { + ucvector v = ucvector_init(*out, *outsize); + unsigned error = lodepng_deflatev(&v, in, insize, settings); + *out = v.data; + *outsize = v.size; + return error; +} + +static unsigned deflate(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGCompressSettings* settings) { + if(settings->custom_deflate) { + unsigned error = settings->custom_deflate(out, outsize, in, insize, settings); + /*the custom deflate is allowed to have its own error codes, however, we translate it to code 111*/ + return error ? 111 : 0; + } else { + return lodepng_deflate(out, outsize, in, insize, settings); + } +} + +#endif /*LODEPNG_COMPILE_DECODER*/ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Adler32 / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +static unsigned update_adler32(unsigned adler, const unsigned char* data, unsigned len) { + unsigned s1 = adler & 0xffffu; + unsigned s2 = (adler >> 16u) & 0xffffu; + + while(len != 0u) { + unsigned i; + /*at least 5552 sums can be done before the sums overflow, saving a lot of module divisions*/ + unsigned amount = len > 5552u ? 5552u : len; + len -= amount; + for(i = 0; i != amount; ++i) { + s1 += (*data++); + s2 += s1; + } + s1 %= 65521u; + s2 %= 65521u; + } + + return (s2 << 16u) | s1; +} + +/*Return the adler32 of the bytes data[0..len-1]*/ +static unsigned adler32(const unsigned char* data, unsigned len) { + return update_adler32(1u, data, len); +} + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Zlib / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_DECODER + +static unsigned lodepng_zlib_decompressv(ucvector* out, + const unsigned char* in, size_t insize, + const LodePNGDecompressSettings* settings) { + unsigned error = 0; + unsigned CM, CINFO, FDICT; + + if(insize < 2) return 53; /*error, size of zlib data too small*/ + /*read information from zlib header*/ + if((in[0] * 256 + in[1]) % 31 != 0) { + /*error: 256 * in[0] + in[1] must be a multiple of 31, the FCHECK value is supposed to be made that way*/ + return 24; + } + + CM = in[0] & 15; + CINFO = (in[0] >> 4) & 15; + /*FCHECK = in[1] & 31;*/ /*FCHECK is already tested above*/ + FDICT = (in[1] >> 5) & 1; + /*FLEVEL = (in[1] >> 6) & 3;*/ /*FLEVEL is not used here*/ + + if(CM != 8 || CINFO > 7) { + /*error: only compression method 8: inflate with sliding window of 32k is supported by the PNG spec*/ + return 25; + } + if(FDICT != 0) { + /*error: the specification of PNG says about the zlib stream: + "The additional flags shall not specify a preset dictionary."*/ + return 26; + } + + error = inflatev(out, in + 2, insize - 2, settings); + if(error) return error; + + if(!settings->ignore_adler32) { + unsigned ADLER32 = lodepng_read32bitInt(&in[insize - 4]); + unsigned checksum = adler32(out->data, (unsigned)(out->size)); + if(checksum != ADLER32) return 58; /*error, adler checksum not correct, data must be corrupted*/ + } + + return 0; /*no error*/ +} + + +unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, + size_t insize, const LodePNGDecompressSettings* settings) { + ucvector v = ucvector_init(*out, *outsize); + unsigned error = lodepng_zlib_decompressv(&v, in, insize, settings); + *out = v.data; + *outsize = v.size; + return error; +} + +/*expected_size is expected output size, to avoid intermediate allocations. Set to 0 if not known. */ +static unsigned zlib_decompress(unsigned char** out, size_t* outsize, size_t expected_size, + const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) { + unsigned error; + if(settings->custom_zlib) { + error = settings->custom_zlib(out, outsize, in, insize, settings); + if(error) { + /*the custom zlib is allowed to have its own error codes, however, we translate it to code 110*/ + error = 110; + /*if there's a max output size, and the custom zlib returned error, then indicate that error instead*/ + if(settings->max_output_size && *outsize > settings->max_output_size) error = 109; + } + } else { + ucvector v = ucvector_init(*out, *outsize); + if(expected_size) { + /*reserve the memory to avoid intermediate reallocations*/ + ucvector_resize(&v, *outsize + expected_size); + v.size = *outsize; + } + error = lodepng_zlib_decompressv(&v, in, insize, settings); + *out = v.data; + *outsize = v.size; + } + return error; +} + +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_ENCODER + +unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, + size_t insize, const LodePNGCompressSettings* settings) { + size_t i; + unsigned error; + unsigned char* deflatedata = 0; + size_t deflatesize = 0; + + error = deflate(&deflatedata, &deflatesize, in, insize, settings); + + *out = NULL; + *outsize = 0; + if(!error) { + *outsize = deflatesize + 6; + *out = (unsigned char*)lodepng_malloc(*outsize); + if(!*out) error = 83; /*alloc fail*/ + } + + if(!error) { + unsigned ADLER32 = adler32(in, (unsigned)insize); + /*zlib data: 1 byte CMF (CM+CINFO), 1 byte FLG, deflate data, 4 byte ADLER32 checksum of the Decompressed data*/ + unsigned CMF = 120; /*0b01111000: CM 8, CINFO 7. With CINFO 7, any window size up to 32768 can be used.*/ + unsigned FLEVEL = 0; + unsigned FDICT = 0; + unsigned CMFFLG = 256 * CMF + FDICT * 32 + FLEVEL * 64; + unsigned FCHECK = 31 - CMFFLG % 31; + CMFFLG += FCHECK; + + (*out)[0] = (unsigned char)(CMFFLG >> 8); + (*out)[1] = (unsigned char)(CMFFLG & 255); + for(i = 0; i != deflatesize; ++i) (*out)[i + 2] = deflatedata[i]; + lodepng_set32bitInt(&(*out)[*outsize - 4], ADLER32); + } + + lodepng_free(deflatedata); + return error; +} + +/* compress using the default or custom zlib function */ +static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, + size_t insize, const LodePNGCompressSettings* settings) { + if(settings->custom_zlib) { + unsigned error = settings->custom_zlib(out, outsize, in, insize, settings); + /*the custom zlib is allowed to have its own error codes, however, we translate it to code 111*/ + return error ? 111 : 0; + } else { + return lodepng_zlib_compress(out, outsize, in, insize, settings); + } +} + +#endif /*LODEPNG_COMPILE_ENCODER*/ + +#else /*no LODEPNG_COMPILE_ZLIB*/ + +#ifdef LODEPNG_COMPILE_DECODER +static unsigned zlib_decompress(unsigned char** out, size_t* outsize, size_t expected_size, + const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) { + if(!settings->custom_zlib) return 87; /*no custom zlib function provided */ + (void)expected_size; + return settings->custom_zlib(out, outsize, in, insize, settings); +} +#endif /*LODEPNG_COMPILE_DECODER*/ +#ifdef LODEPNG_COMPILE_ENCODER +static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, + size_t insize, const LodePNGCompressSettings* settings) { + if(!settings->custom_zlib) return 87; /*no custom zlib function provided */ + return settings->custom_zlib(out, outsize, in, insize, settings); +} +#endif /*LODEPNG_COMPILE_ENCODER*/ + +#endif /*LODEPNG_COMPILE_ZLIB*/ + +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_ENCODER + +/*this is a good tradeoff between speed and compression ratio*/ +#define DEFAULT_WINDOWSIZE 2048 + +void lodepng_compress_settings_init(LodePNGCompressSettings* settings) { + /*compress with dynamic huffman tree (not in the mathematical sense, just not the predefined one)*/ + settings->btype = 2; + settings->use_lz77 = 1; + settings->windowsize = DEFAULT_WINDOWSIZE; + settings->minmatch = 3; + settings->nicematch = 128; + settings->lazymatching = 1; + + settings->custom_zlib = 0; + settings->custom_deflate = 0; + settings->custom_context = 0; +} + +const LodePNGCompressSettings lodepng_default_compress_settings = {2, 1, DEFAULT_WINDOWSIZE, 3, 128, 1, 0, 0, 0}; + + +#endif /*LODEPNG_COMPILE_ENCODER*/ + +#ifdef LODEPNG_COMPILE_DECODER + +void lodepng_decompress_settings_init(LodePNGDecompressSettings* settings) { + settings->ignore_adler32 = 0; + settings->ignore_nlen = 0; + settings->max_output_size = 0; + + settings->custom_zlib = 0; + settings->custom_inflate = 0; + settings->custom_context = 0; +} + +const LodePNGDecompressSettings lodepng_default_decompress_settings = {0, 0, 0, 0, 0, 0}; + +#endif /*LODEPNG_COMPILE_DECODER*/ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* // End of Zlib related code. Begin of PNG related code. // */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_PNG + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / CRC32 / */ +/* ////////////////////////////////////////////////////////////////////////// */ + + +#ifndef LODEPNG_NO_COMPILE_CRC +/* CRC polynomial: 0xedb88320 */ +static unsigned lodepng_crc32_table[256] = { + 0u, 1996959894u, 3993919788u, 2567524794u, 124634137u, 1886057615u, 3915621685u, 2657392035u, + 249268274u, 2044508324u, 3772115230u, 2547177864u, 162941995u, 2125561021u, 3887607047u, 2428444049u, + 498536548u, 1789927666u, 4089016648u, 2227061214u, 450548861u, 1843258603u, 4107580753u, 2211677639u, + 325883990u, 1684777152u, 4251122042u, 2321926636u, 335633487u, 1661365465u, 4195302755u, 2366115317u, + 997073096u, 1281953886u, 3579855332u, 2724688242u, 1006888145u, 1258607687u, 3524101629u, 2768942443u, + 901097722u, 1119000684u, 3686517206u, 2898065728u, 853044451u, 1172266101u, 3705015759u, 2882616665u, + 651767980u, 1373503546u, 3369554304u, 3218104598u, 565507253u, 1454621731u, 3485111705u, 3099436303u, + 671266974u, 1594198024u, 3322730930u, 2970347812u, 795835527u, 1483230225u, 3244367275u, 3060149565u, + 1994146192u, 31158534u, 2563907772u, 4023717930u, 1907459465u, 112637215u, 2680153253u, 3904427059u, + 2013776290u, 251722036u, 2517215374u, 3775830040u, 2137656763u, 141376813u, 2439277719u, 3865271297u, + 1802195444u, 476864866u, 2238001368u, 4066508878u, 1812370925u, 453092731u, 2181625025u, 4111451223u, + 1706088902u, 314042704u, 2344532202u, 4240017532u, 1658658271u, 366619977u, 2362670323u, 4224994405u, + 1303535960u, 984961486u, 2747007092u, 3569037538u, 1256170817u, 1037604311u, 2765210733u, 3554079995u, + 1131014506u, 879679996u, 2909243462u, 3663771856u, 1141124467u, 855842277u, 2852801631u, 3708648649u, + 1342533948u, 654459306u, 3188396048u, 3373015174u, 1466479909u, 544179635u, 3110523913u, 3462522015u, + 1591671054u, 702138776u, 2966460450u, 3352799412u, 1504918807u, 783551873u, 3082640443u, 3233442989u, + 3988292384u, 2596254646u, 62317068u, 1957810842u, 3939845945u, 2647816111u, 81470997u, 1943803523u, + 3814918930u, 2489596804u, 225274430u, 2053790376u, 3826175755u, 2466906013u, 167816743u, 2097651377u, + 4027552580u, 2265490386u, 503444072u, 1762050814u, 4150417245u, 2154129355u, 426522225u, 1852507879u, + 4275313526u, 2312317920u, 282753626u, 1742555852u, 4189708143u, 2394877945u, 397917763u, 1622183637u, + 3604390888u, 2714866558u, 953729732u, 1340076626u, 3518719985u, 2797360999u, 1068828381u, 1219638859u, + 3624741850u, 2936675148u, 906185462u, 1090812512u, 3747672003u, 2825379669u, 829329135u, 1181335161u, + 3412177804u, 3160834842u, 628085408u, 1382605366u, 3423369109u, 3138078467u, 570562233u, 1426400815u, + 3317316542u, 2998733608u, 733239954u, 1555261956u, 3268935591u, 3050360625u, 752459403u, 1541320221u, + 2607071920u, 3965973030u, 1969922972u, 40735498u, 2617837225u, 3943577151u, 1913087877u, 83908371u, + 2512341634u, 3803740692u, 2075208622u, 213261112u, 2463272603u, 3855990285u, 2094854071u, 198958881u, + 2262029012u, 4057260610u, 1759359992u, 534414190u, 2176718541u, 4139329115u, 1873836001u, 414664567u, + 2282248934u, 4279200368u, 1711684554u, 285281116u, 2405801727u, 4167216745u, 1634467795u, 376229701u, + 2685067896u, 3608007406u, 1308918612u, 956543938u, 2808555105u, 3495958263u, 1231636301u, 1047427035u, + 2932959818u, 3654703836u, 1088359270u, 936918000u, 2847714899u, 3736837829u, 1202900863u, 817233897u, + 3183342108u, 3401237130u, 1404277552u, 615818150u, 3134207493u, 3453421203u, 1423857449u, 601450431u, + 3009837614u, 3294710456u, 1567103746u, 711928724u, 3020668471u, 3272380065u, 1510334235u, 755167117u +}; + +/*Return the CRC of the bytes buf[0..len-1].*/ +unsigned lodepng_crc32(const unsigned char* data, size_t length) { + unsigned r = 0xffffffffu; + size_t i; + for(i = 0; i < length; ++i) { + r = lodepng_crc32_table[(r ^ data[i]) & 0xffu] ^ (r >> 8u); + } + return r ^ 0xffffffffu; +} +#else /* !LODEPNG_NO_COMPILE_CRC */ +unsigned lodepng_crc32(const unsigned char* data, size_t length); +#endif /* !LODEPNG_NO_COMPILE_CRC */ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Reading and writing PNG color channel bits / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +/* The color channel bits of less-than-8-bit pixels are read with the MSB of bytes first, +so LodePNGBitWriter and LodePNGBitReader can't be used for those. */ + +static unsigned char readBitFromReversedStream(size_t* bitpointer, const unsigned char* bitstream) { + unsigned char result = (unsigned char)((bitstream[(*bitpointer) >> 3] >> (7 - ((*bitpointer) & 0x7))) & 1); + ++(*bitpointer); + return result; +} + +/* TODO: make this faster */ +static unsigned readBitsFromReversedStream(size_t* bitpointer, const unsigned char* bitstream, size_t nbits) { + unsigned result = 0; + size_t i; + for(i = 0 ; i < nbits; ++i) { + result <<= 1u; + result |= (unsigned)readBitFromReversedStream(bitpointer, bitstream); + } + return result; +} + +static void setBitOfReversedStream(size_t* bitpointer, unsigned char* bitstream, unsigned char bit) { + /*the current bit in bitstream may be 0 or 1 for this to work*/ + if(bit == 0) bitstream[(*bitpointer) >> 3u] &= (unsigned char)(~(1u << (7u - ((*bitpointer) & 7u)))); + else bitstream[(*bitpointer) >> 3u] |= (1u << (7u - ((*bitpointer) & 7u))); + ++(*bitpointer); +} + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / PNG chunks / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +unsigned lodepng_chunk_length(const unsigned char* chunk) { + return lodepng_read32bitInt(&chunk[0]); +} + +void lodepng_chunk_type(char type[5], const unsigned char* chunk) { + unsigned i; + for(i = 0; i != 4; ++i) type[i] = (char)chunk[4 + i]; + type[4] = 0; /*null termination char*/ +} + +unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, const char* type) { + if(lodepng_strlen(type) != 4) return 0; + return (chunk[4] == type[0] && chunk[5] == type[1] && chunk[6] == type[2] && chunk[7] == type[3]); +} + +unsigned char lodepng_chunk_ancillary(const unsigned char* chunk) { + return((chunk[4] & 32) != 0); +} + +unsigned char lodepng_chunk_private(const unsigned char* chunk) { + return((chunk[6] & 32) != 0); +} + +unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk) { + return((chunk[7] & 32) != 0); +} + +unsigned char* lodepng_chunk_data(unsigned char* chunk) { + return &chunk[8]; +} + +const unsigned char* lodepng_chunk_data_const(const unsigned char* chunk) { + return &chunk[8]; +} + +unsigned lodepng_chunk_check_crc(const unsigned char* chunk) { + unsigned length = lodepng_chunk_length(chunk); + unsigned CRC = lodepng_read32bitInt(&chunk[length + 8]); + /*the CRC is taken of the data and the 4 chunk type letters, not the length*/ + unsigned checksum = lodepng_crc32(&chunk[4], length + 4); + if(CRC != checksum) return 1; + else return 0; +} + +void lodepng_chunk_generate_crc(unsigned char* chunk) { + unsigned length = lodepng_chunk_length(chunk); + unsigned CRC = lodepng_crc32(&chunk[4], length + 4); + lodepng_set32bitInt(chunk + 8 + length, CRC); +} + +unsigned char* lodepng_chunk_next(unsigned char* chunk, unsigned char* end) { + if(chunk >= end || end - chunk < 12) return end; /*too small to contain a chunk*/ + if(chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e && chunk[3] == 0x47 + && chunk[4] == 0x0d && chunk[5] == 0x0a && chunk[6] == 0x1a && chunk[7] == 0x0a) { + /* Is PNG magic header at start of PNG file. Jump to first actual chunk. */ + return chunk + 8; + } else { + size_t total_chunk_length; + unsigned char* result; + if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return end; + result = chunk + total_chunk_length; + if(result < chunk) return end; /*pointer overflow*/ + return result; + } +} + +const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk, const unsigned char* end) { + if(chunk >= end || end - chunk < 12) return end; /*too small to contain a chunk*/ + if(chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e && chunk[3] == 0x47 + && chunk[4] == 0x0d && chunk[5] == 0x0a && chunk[6] == 0x1a && chunk[7] == 0x0a) { + /* Is PNG magic header at start of PNG file. Jump to first actual chunk. */ + return chunk + 8; + } else { + size_t total_chunk_length; + const unsigned char* result; + if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return end; + result = chunk + total_chunk_length; + if(result < chunk) return end; /*pointer overflow*/ + return result; + } +} + +unsigned char* lodepng_chunk_find(unsigned char* chunk, unsigned char* end, const char type[5]) { + for(;;) { + if(chunk >= end || end - chunk < 12) return 0; /* past file end: chunk + 12 > end */ + if(lodepng_chunk_type_equals(chunk, type)) return chunk; + chunk = lodepng_chunk_next(chunk, end); + } +} + +const unsigned char* lodepng_chunk_find_const(const unsigned char* chunk, const unsigned char* end, const char type[5]) { + for(;;) { + if(chunk >= end || end - chunk < 12) return 0; /* past file end: chunk + 12 > end */ + if(lodepng_chunk_type_equals(chunk, type)) return chunk; + chunk = lodepng_chunk_next_const(chunk, end); + } +} + +unsigned lodepng_chunk_append(unsigned char** out, size_t* outsize, const unsigned char* chunk) { + unsigned i; + size_t total_chunk_length, new_length; + unsigned char *chunk_start, *new_buffer; + + if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return 77; + if(lodepng_addofl(*outsize, total_chunk_length, &new_length)) return 77; + + new_buffer = (unsigned char*)lodepng_realloc(*out, new_length); + if(!new_buffer) return 83; /*alloc fail*/ + (*out) = new_buffer; + (*outsize) = new_length; + chunk_start = &(*out)[new_length - total_chunk_length]; + + for(i = 0; i != total_chunk_length; ++i) chunk_start[i] = chunk[i]; + + return 0; +} + +/*Sets length and name and allocates the space for data and crc but does not +set data or crc yet. Returns the start of the chunk in chunk. The start of +the data is at chunk + 8. To finalize chunk, add the data, then use +lodepng_chunk_generate_crc */ +static unsigned lodepng_chunk_init(unsigned char** chunk, + ucvector* out, + unsigned length, const char* type) { + size_t new_length = out->size; + if(lodepng_addofl(new_length, length, &new_length)) return 77; + if(lodepng_addofl(new_length, 12, &new_length)) return 77; + if(!ucvector_resize(out, new_length)) return 83; /*alloc fail*/ + *chunk = out->data + new_length - length - 12u; + + /*1: length*/ + lodepng_set32bitInt(*chunk, length); + + /*2: chunk name (4 letters)*/ + lodepng_memcpy(*chunk + 4, type, 4); + + return 0; +} + +/* like lodepng_chunk_create but with custom allocsize */ +static unsigned lodepng_chunk_createv(ucvector* out, + unsigned length, const char* type, const unsigned char* data) { + unsigned char* chunk; + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, length, type)); + + /*3: the data*/ + lodepng_memcpy(chunk + 8, data, length); + + /*4: CRC (of the chunkname characters and the data)*/ + lodepng_chunk_generate_crc(chunk); + + return 0; +} + +unsigned lodepng_chunk_create(unsigned char** out, size_t* outsize, + unsigned length, const char* type, const unsigned char* data) { + ucvector v = ucvector_init(*out, *outsize); + unsigned error = lodepng_chunk_createv(&v, length, type, data); + *out = v.data; + *outsize = v.size; + return error; +} + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / Color types, channels, bits / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +/*checks if the colortype is valid and the bitdepth bd is allowed for this colortype. +Return value is a LodePNG error code.*/ +static unsigned checkColorValidity(LodePNGColorType colortype, unsigned bd) { + switch(colortype) { + case LCT_GREY: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) return 37; break; + case LCT_RGB: if(!( bd == 8 || bd == 16)) return 37; break; + case LCT_PALETTE: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 )) return 37; break; + case LCT_GREY_ALPHA: if(!( bd == 8 || bd == 16)) return 37; break; + case LCT_RGBA: if(!( bd == 8 || bd == 16)) return 37; break; + case LCT_MAX_OCTET_VALUE: return 31; /* invalid color type */ + default: return 31; /* invalid color type */ + } + return 0; /*allowed color type / bits combination*/ +} + +static unsigned getNumColorChannels(LodePNGColorType colortype) { + switch(colortype) { + case LCT_GREY: return 1; + case LCT_RGB: return 3; + case LCT_PALETTE: return 1; + case LCT_GREY_ALPHA: return 2; + case LCT_RGBA: return 4; + case LCT_MAX_OCTET_VALUE: return 0; /* invalid color type */ + default: return 0; /*invalid color type*/ + } +} + +static unsigned lodepng_get_bpp_lct(LodePNGColorType colortype, unsigned bitdepth) { + /*bits per pixel is amount of channels * bits per channel*/ + return getNumColorChannels(colortype) * bitdepth; +} + +/* ////////////////////////////////////////////////////////////////////////// */ + +void lodepng_color_mode_init(LodePNGColorMode* info) { + info->key_defined = 0; + info->key_r = info->key_g = info->key_b = 0; + info->colortype = LCT_RGBA; + info->bitdepth = 8; + info->palette = 0; + info->palettesize = 0; +} + +/*allocates palette memory if needed, and initializes all colors to black*/ +static void lodepng_color_mode_alloc_palette(LodePNGColorMode* info) { + size_t i; + /*if the palette is already allocated, it will have size 1024 so no reallocation needed in that case*/ + /*the palette must have room for up to 256 colors with 4 bytes each.*/ + if(!info->palette) info->palette = (unsigned char*)lodepng_malloc(1024); + if(!info->palette) return; /*alloc fail*/ + for(i = 0; i != 256; ++i) { + /*Initialize all unused colors with black, the value used for invalid palette indices. + This is an error according to the PNG spec, but common PNG decoders make it black instead. + That makes color conversion slightly faster due to no error handling needed.*/ + info->palette[i * 4 + 0] = 0; + info->palette[i * 4 + 1] = 0; + info->palette[i * 4 + 2] = 0; + info->palette[i * 4 + 3] = 255; + } +} + +void lodepng_color_mode_cleanup(LodePNGColorMode* info) { + lodepng_palette_clear(info); +} + +unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source) { + lodepng_color_mode_cleanup(dest); + lodepng_memcpy(dest, source, sizeof(LodePNGColorMode)); + if(source->palette) { + dest->palette = (unsigned char*)lodepng_malloc(1024); + if(!dest->palette && source->palettesize) return 83; /*alloc fail*/ + lodepng_memcpy(dest->palette, source->palette, source->palettesize * 4); + } + return 0; +} + +LodePNGColorMode lodepng_color_mode_make(LodePNGColorType colortype, unsigned bitdepth) { + LodePNGColorMode result; + lodepng_color_mode_init(&result); + result.colortype = colortype; + result.bitdepth = bitdepth; + return result; +} + +static int lodepng_color_mode_equal(const LodePNGColorMode* a, const LodePNGColorMode* b) { + size_t i; + if(a->colortype != b->colortype) return 0; + if(a->bitdepth != b->bitdepth) return 0; + if(a->key_defined != b->key_defined) return 0; + if(a->key_defined) { + if(a->key_r != b->key_r) return 0; + if(a->key_g != b->key_g) return 0; + if(a->key_b != b->key_b) return 0; + } + if(a->palettesize != b->palettesize) return 0; + for(i = 0; i != a->palettesize * 4; ++i) { + if(a->palette[i] != b->palette[i]) return 0; + } + return 1; +} + +void lodepng_palette_clear(LodePNGColorMode* info) { + if(info->palette) lodepng_free(info->palette); + info->palette = 0; + info->palettesize = 0; +} + +unsigned lodepng_palette_add(LodePNGColorMode* info, + unsigned char r, unsigned char g, unsigned char b, unsigned char a) { + if(!info->palette) /*allocate palette if empty*/ { + lodepng_color_mode_alloc_palette(info); + if(!info->palette) return 83; /*alloc fail*/ + } + if(info->palettesize >= 256) { + return 108; /*too many palette values*/ + } + info->palette[4 * info->palettesize + 0] = r; + info->palette[4 * info->palettesize + 1] = g; + info->palette[4 * info->palettesize + 2] = b; + info->palette[4 * info->palettesize + 3] = a; + ++info->palettesize; + return 0; +} + +/*calculate bits per pixel out of colortype and bitdepth*/ +unsigned lodepng_get_bpp(const LodePNGColorMode* info) { + return lodepng_get_bpp_lct(info->colortype, info->bitdepth); +} + +unsigned lodepng_get_channels(const LodePNGColorMode* info) { + return getNumColorChannels(info->colortype); +} + +unsigned lodepng_is_greyscale_type(const LodePNGColorMode* info) { + return info->colortype == LCT_GREY || info->colortype == LCT_GREY_ALPHA; +} + +unsigned lodepng_is_alpha_type(const LodePNGColorMode* info) { + return (info->colortype & 4) != 0; /*4 or 6*/ +} + +unsigned lodepng_is_palette_type(const LodePNGColorMode* info) { + return info->colortype == LCT_PALETTE; +} + +unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info) { + size_t i; + for(i = 0; i != info->palettesize; ++i) { + if(info->palette[i * 4 + 3] < 255) return 1; + } + return 0; +} + +unsigned lodepng_can_have_alpha(const LodePNGColorMode* info) { + return info->key_defined + || lodepng_is_alpha_type(info) + || lodepng_has_palette_alpha(info); +} + +static size_t lodepng_get_raw_size_lct(unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) { + size_t bpp = lodepng_get_bpp_lct(colortype, bitdepth); + size_t n = (size_t)w * (size_t)h; + return ((n / 8u) * bpp) + ((n & 7u) * bpp + 7u) / 8u; +} + +size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color) { + return lodepng_get_raw_size_lct(w, h, color->colortype, color->bitdepth); +} + + +#ifdef LODEPNG_COMPILE_PNG + +/*in an idat chunk, each scanline is a multiple of 8 bits, unlike the lodepng output buffer, +and in addition has one extra byte per line: the filter byte. So this gives a larger +result than lodepng_get_raw_size. Set h to 1 to get the size of 1 row including filter byte. */ +static size_t lodepng_get_raw_size_idat(unsigned w, unsigned h, unsigned bpp) { + /* + 1 for the filter byte, and possibly plus padding bits per line. */ + /* Ignoring casts, the expression is equal to (w * bpp + 7) / 8 + 1, but avoids overflow of w * bpp */ + size_t line = ((size_t)(w / 8u) * bpp) + 1u + ((w & 7u) * bpp + 7u) / 8u; + return (size_t)h * line; +} + +#ifdef LODEPNG_COMPILE_DECODER +/*Safely checks whether size_t overflow can be caused due to amount of pixels. +This check is overcautious rather than precise. If this check indicates no overflow, +you can safely compute in a size_t (but not an unsigned): +-(size_t)w * (size_t)h * 8 +-amount of bytes in IDAT (including filter, padding and Adam7 bytes) +-amount of bytes in raw color model +Returns 1 if overflow possible, 0 if not. +*/ +static int lodepng_pixel_overflow(unsigned w, unsigned h, + const LodePNGColorMode* pngcolor, const LodePNGColorMode* rawcolor) { + size_t bpp = LODEPNG_MAX(lodepng_get_bpp(pngcolor), lodepng_get_bpp(rawcolor)); + size_t numpixels, total; + size_t line; /* bytes per line in worst case */ + + if(lodepng_mulofl((size_t)w, (size_t)h, &numpixels)) return 1; + if(lodepng_mulofl(numpixels, 8, &total)) return 1; /* bit pointer with 8-bit color, or 8 bytes per channel color */ + + /* Bytes per scanline with the expression "(w / 8u) * bpp) + ((w & 7u) * bpp + 7u) / 8u" */ + if(lodepng_mulofl((size_t)(w / 8u), bpp, &line)) return 1; + if(lodepng_addofl(line, ((w & 7u) * bpp + 7u) / 8u, &line)) return 1; + + if(lodepng_addofl(line, 5, &line)) return 1; /* 5 bytes overhead per line: 1 filterbyte, 4 for Adam7 worst case */ + if(lodepng_mulofl(line, h, &total)) return 1; /* Total bytes in worst case */ + + return 0; /* no overflow */ +} +#endif /*LODEPNG_COMPILE_DECODER*/ +#endif /*LODEPNG_COMPILE_PNG*/ + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + +static void LodePNGUnknownChunks_init(LodePNGInfo* info) { + unsigned i; + for(i = 0; i != 3; ++i) info->unknown_chunks_data[i] = 0; + for(i = 0; i != 3; ++i) info->unknown_chunks_size[i] = 0; +} + +static void LodePNGUnknownChunks_cleanup(LodePNGInfo* info) { + unsigned i; + for(i = 0; i != 3; ++i) lodepng_free(info->unknown_chunks_data[i]); +} + +static unsigned LodePNGUnknownChunks_copy(LodePNGInfo* dest, const LodePNGInfo* src) { + unsigned i; + + LodePNGUnknownChunks_cleanup(dest); + + for(i = 0; i != 3; ++i) { + size_t j; + dest->unknown_chunks_size[i] = src->unknown_chunks_size[i]; + dest->unknown_chunks_data[i] = (unsigned char*)lodepng_malloc(src->unknown_chunks_size[i]); + if(!dest->unknown_chunks_data[i] && dest->unknown_chunks_size[i]) return 83; /*alloc fail*/ + for(j = 0; j < src->unknown_chunks_size[i]; ++j) { + dest->unknown_chunks_data[i][j] = src->unknown_chunks_data[i][j]; + } + } + + return 0; +} + +/******************************************************************************/ + +static void LodePNGText_init(LodePNGInfo* info) { + info->text_num = 0; + info->text_keys = NULL; + info->text_strings = NULL; +} + +static void LodePNGText_cleanup(LodePNGInfo* info) { + size_t i; + for(i = 0; i != info->text_num; ++i) { + string_cleanup(&info->text_keys[i]); + string_cleanup(&info->text_strings[i]); + } + lodepng_free(info->text_keys); + lodepng_free(info->text_strings); +} + +static unsigned LodePNGText_copy(LodePNGInfo* dest, const LodePNGInfo* source) { + size_t i = 0; + dest->text_keys = NULL; + dest->text_strings = NULL; + dest->text_num = 0; + for(i = 0; i != source->text_num; ++i) { + CERROR_TRY_RETURN(lodepng_add_text(dest, source->text_keys[i], source->text_strings[i])); + } + return 0; +} + +static unsigned lodepng_add_text_sized(LodePNGInfo* info, const char* key, const char* str, size_t size) { + char** new_keys = (char**)(lodepng_realloc(info->text_keys, sizeof(char*) * (info->text_num + 1))); + char** new_strings = (char**)(lodepng_realloc(info->text_strings, sizeof(char*) * (info->text_num + 1))); + + if(new_keys) info->text_keys = new_keys; + if(new_strings) info->text_strings = new_strings; + + if(!new_keys || !new_strings) return 83; /*alloc fail*/ + + ++info->text_num; + info->text_keys[info->text_num - 1] = alloc_string(key); + info->text_strings[info->text_num - 1] = alloc_string_sized(str, size); + if(!info->text_keys[info->text_num - 1] || !info->text_strings[info->text_num - 1]) return 83; /*alloc fail*/ + + return 0; +} + +unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str) { + return lodepng_add_text_sized(info, key, str, lodepng_strlen(str)); +} + +void lodepng_clear_text(LodePNGInfo* info) { + LodePNGText_cleanup(info); +} + +/******************************************************************************/ + +static void LodePNGIText_init(LodePNGInfo* info) { + info->itext_num = 0; + info->itext_keys = NULL; + info->itext_langtags = NULL; + info->itext_transkeys = NULL; + info->itext_strings = NULL; +} + +static void LodePNGIText_cleanup(LodePNGInfo* info) { + size_t i; + for(i = 0; i != info->itext_num; ++i) { + string_cleanup(&info->itext_keys[i]); + string_cleanup(&info->itext_langtags[i]); + string_cleanup(&info->itext_transkeys[i]); + string_cleanup(&info->itext_strings[i]); + } + lodepng_free(info->itext_keys); + lodepng_free(info->itext_langtags); + lodepng_free(info->itext_transkeys); + lodepng_free(info->itext_strings); +} + +static unsigned LodePNGIText_copy(LodePNGInfo* dest, const LodePNGInfo* source) { + size_t i = 0; + dest->itext_keys = NULL; + dest->itext_langtags = NULL; + dest->itext_transkeys = NULL; + dest->itext_strings = NULL; + dest->itext_num = 0; + for(i = 0; i != source->itext_num; ++i) { + CERROR_TRY_RETURN(lodepng_add_itext(dest, source->itext_keys[i], source->itext_langtags[i], + source->itext_transkeys[i], source->itext_strings[i])); + } + return 0; +} + +void lodepng_clear_itext(LodePNGInfo* info) { + LodePNGIText_cleanup(info); +} + +static unsigned lodepng_add_itext_sized(LodePNGInfo* info, const char* key, const char* langtag, + const char* transkey, const char* str, size_t size) { + char** new_keys = (char**)(lodepng_realloc(info->itext_keys, sizeof(char*) * (info->itext_num + 1))); + char** new_langtags = (char**)(lodepng_realloc(info->itext_langtags, sizeof(char*) * (info->itext_num + 1))); + char** new_transkeys = (char**)(lodepng_realloc(info->itext_transkeys, sizeof(char*) * (info->itext_num + 1))); + char** new_strings = (char**)(lodepng_realloc(info->itext_strings, sizeof(char*) * (info->itext_num + 1))); + + if(new_keys) info->itext_keys = new_keys; + if(new_langtags) info->itext_langtags = new_langtags; + if(new_transkeys) info->itext_transkeys = new_transkeys; + if(new_strings) info->itext_strings = new_strings; + + if(!new_keys || !new_langtags || !new_transkeys || !new_strings) return 83; /*alloc fail*/ + + ++info->itext_num; + + info->itext_keys[info->itext_num - 1] = alloc_string(key); + info->itext_langtags[info->itext_num - 1] = alloc_string(langtag); + info->itext_transkeys[info->itext_num - 1] = alloc_string(transkey); + info->itext_strings[info->itext_num - 1] = alloc_string_sized(str, size); + + return 0; +} + +unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag, + const char* transkey, const char* str) { + return lodepng_add_itext_sized(info, key, langtag, transkey, str, lodepng_strlen(str)); +} + +/* same as set but does not delete */ +static unsigned lodepng_assign_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size) { + if(profile_size == 0) return 100; /*invalid ICC profile size*/ + + info->iccp_name = alloc_string(name); + info->iccp_profile = (unsigned char*)lodepng_malloc(profile_size); + + if(!info->iccp_name || !info->iccp_profile) return 83; /*alloc fail*/ + + lodepng_memcpy(info->iccp_profile, profile, profile_size); + info->iccp_profile_size = profile_size; + + return 0; /*ok*/ +} + +unsigned lodepng_set_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size) { + if(info->iccp_name) lodepng_clear_icc(info); + info->iccp_defined = 1; + + return lodepng_assign_icc(info, name, profile, profile_size); +} + +void lodepng_clear_icc(LodePNGInfo* info) { + string_cleanup(&info->iccp_name); + lodepng_free(info->iccp_profile); + info->iccp_profile = NULL; + info->iccp_profile_size = 0; + info->iccp_defined = 0; +} +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +void lodepng_info_init(LodePNGInfo* info) { + lodepng_color_mode_init(&info->color); + info->interlace_method = 0; + info->compression_method = 0; + info->filter_method = 0; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + info->background_defined = 0; + info->background_r = info->background_g = info->background_b = 0; + + LodePNGText_init(info); + LodePNGIText_init(info); + + info->time_defined = 0; + info->phys_defined = 0; + + info->gama_defined = 0; + info->chrm_defined = 0; + info->srgb_defined = 0; + info->iccp_defined = 0; + info->iccp_name = NULL; + info->iccp_profile = NULL; + + LodePNGUnknownChunks_init(info); +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +} + +void lodepng_info_cleanup(LodePNGInfo* info) { + lodepng_color_mode_cleanup(&info->color); +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + LodePNGText_cleanup(info); + LodePNGIText_cleanup(info); + + lodepng_clear_icc(info); + + LodePNGUnknownChunks_cleanup(info); +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +} + +unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source) { + lodepng_info_cleanup(dest); + lodepng_memcpy(dest, source, sizeof(LodePNGInfo)); + lodepng_color_mode_init(&dest->color); + CERROR_TRY_RETURN(lodepng_color_mode_copy(&dest->color, &source->color)); + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + CERROR_TRY_RETURN(LodePNGText_copy(dest, source)); + CERROR_TRY_RETURN(LodePNGIText_copy(dest, source)); + if(source->iccp_defined) { + CERROR_TRY_RETURN(lodepng_assign_icc(dest, source->iccp_name, source->iccp_profile, source->iccp_profile_size)); + } + + LodePNGUnknownChunks_init(dest); + CERROR_TRY_RETURN(LodePNGUnknownChunks_copy(dest, source)); +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + return 0; +} + +/* ////////////////////////////////////////////////////////////////////////// */ + +/*index: bitgroup index, bits: bitgroup size(1, 2 or 4), in: bitgroup value, out: octet array to add bits to*/ +static void addColorBits(unsigned char* out, size_t index, unsigned bits, unsigned in) { + unsigned m = bits == 1 ? 7 : bits == 2 ? 3 : 1; /*8 / bits - 1*/ + /*p = the partial index in the byte, e.g. with 4 palettebits it is 0 for first half or 1 for second half*/ + unsigned p = index & m; + in &= (1u << bits) - 1u; /*filter out any other bits of the input value*/ + in = in << (bits * (m - p)); + if(p == 0) out[index * bits / 8u] = in; + else out[index * bits / 8u] |= in; +} + +typedef struct ColorTree ColorTree; + +/* +One node of a color tree +This is the data structure used to count the number of unique colors and to get a palette +index for a color. It's like an octree, but because the alpha channel is used too, each +node has 16 instead of 8 children. +*/ +struct ColorTree { + ColorTree* children[16]; /*up to 16 pointers to ColorTree of next level*/ + int index; /*the payload. Only has a meaningful value if this is in the last level*/ +}; + +static void color_tree_init(ColorTree* tree) { + lodepng_memset(tree->children, 0, 16 * sizeof(*tree->children)); + tree->index = -1; +} + +static void color_tree_cleanup(ColorTree* tree) { + int i; + for(i = 0; i != 16; ++i) { + if(tree->children[i]) { + color_tree_cleanup(tree->children[i]); + lodepng_free(tree->children[i]); + } + } +} + +/*returns -1 if color not present, its index otherwise*/ +static int color_tree_get(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) { + int bit = 0; + for(bit = 0; bit < 8; ++bit) { + int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1); + if(!tree->children[i]) return -1; + else tree = tree->children[i]; + } + return tree ? tree->index : -1; +} + +#ifdef LODEPNG_COMPILE_ENCODER +static int color_tree_has(ColorTree* tree, unsigned char r, unsigned char g, unsigned char b, unsigned char a) { + return color_tree_get(tree, r, g, b, a) >= 0; +} +#endif /*LODEPNG_COMPILE_ENCODER*/ + +/*color is not allowed to already exist. +Index should be >= 0 (it's signed to be compatible with using -1 for "doesn't exist") +Returns error code, or 0 if ok*/ +static unsigned color_tree_add(ColorTree* tree, + unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned index) { + int bit; + for(bit = 0; bit < 8; ++bit) { + int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1); + if(!tree->children[i]) { + tree->children[i] = (ColorTree*)lodepng_malloc(sizeof(ColorTree)); + if(!tree->children[i]) return 83; /*alloc fail*/ + color_tree_init(tree->children[i]); + } + tree = tree->children[i]; + } + tree->index = (int)index; + return 0; +} + +/*put a pixel, given its RGBA color, into image of any color type*/ +static unsigned rgba8ToPixel(unsigned char* out, size_t i, + const LodePNGColorMode* mode, ColorTree* tree /*for palette*/, + unsigned char r, unsigned char g, unsigned char b, unsigned char a) { + if(mode->colortype == LCT_GREY) { + unsigned char gray = r; /*((unsigned short)r + g + b) / 3u;*/ + if(mode->bitdepth == 8) out[i] = gray; + else if(mode->bitdepth == 16) out[i * 2 + 0] = out[i * 2 + 1] = gray; + else { + /*take the most significant bits of gray*/ + gray = ((unsigned)gray >> (8u - mode->bitdepth)) & ((1u << mode->bitdepth) - 1u); + addColorBits(out, i, mode->bitdepth, gray); + } + } else if(mode->colortype == LCT_RGB) { + if(mode->bitdepth == 8) { + out[i * 3 + 0] = r; + out[i * 3 + 1] = g; + out[i * 3 + 2] = b; + } else { + out[i * 6 + 0] = out[i * 6 + 1] = r; + out[i * 6 + 2] = out[i * 6 + 3] = g; + out[i * 6 + 4] = out[i * 6 + 5] = b; + } + } else if(mode->colortype == LCT_PALETTE) { + int index = color_tree_get(tree, r, g, b, a); + if(index < 0) return 82; /*color not in palette*/ + if(mode->bitdepth == 8) out[i] = index; + else addColorBits(out, i, mode->bitdepth, (unsigned)index); + } else if(mode->colortype == LCT_GREY_ALPHA) { + unsigned char gray = r; /*((unsigned short)r + g + b) / 3u;*/ + if(mode->bitdepth == 8) { + out[i * 2 + 0] = gray; + out[i * 2 + 1] = a; + } else if(mode->bitdepth == 16) { + out[i * 4 + 0] = out[i * 4 + 1] = gray; + out[i * 4 + 2] = out[i * 4 + 3] = a; + } + } else if(mode->colortype == LCT_RGBA) { + if(mode->bitdepth == 8) { + out[i * 4 + 0] = r; + out[i * 4 + 1] = g; + out[i * 4 + 2] = b; + out[i * 4 + 3] = a; + } else { + out[i * 8 + 0] = out[i * 8 + 1] = r; + out[i * 8 + 2] = out[i * 8 + 3] = g; + out[i * 8 + 4] = out[i * 8 + 5] = b; + out[i * 8 + 6] = out[i * 8 + 7] = a; + } + } + + return 0; /*no error*/ +} + +/*put a pixel, given its RGBA16 color, into image of any color 16-bitdepth type*/ +static void rgba16ToPixel(unsigned char* out, size_t i, + const LodePNGColorMode* mode, + unsigned short r, unsigned short g, unsigned short b, unsigned short a) { + if(mode->colortype == LCT_GREY) { + unsigned short gray = r; /*((unsigned)r + g + b) / 3u;*/ + out[i * 2 + 0] = (gray >> 8) & 255; + out[i * 2 + 1] = gray & 255; + } else if(mode->colortype == LCT_RGB) { + out[i * 6 + 0] = (r >> 8) & 255; + out[i * 6 + 1] = r & 255; + out[i * 6 + 2] = (g >> 8) & 255; + out[i * 6 + 3] = g & 255; + out[i * 6 + 4] = (b >> 8) & 255; + out[i * 6 + 5] = b & 255; + } else if(mode->colortype == LCT_GREY_ALPHA) { + unsigned short gray = r; /*((unsigned)r + g + b) / 3u;*/ + out[i * 4 + 0] = (gray >> 8) & 255; + out[i * 4 + 1] = gray & 255; + out[i * 4 + 2] = (a >> 8) & 255; + out[i * 4 + 3] = a & 255; + } else if(mode->colortype == LCT_RGBA) { + out[i * 8 + 0] = (r >> 8) & 255; + out[i * 8 + 1] = r & 255; + out[i * 8 + 2] = (g >> 8) & 255; + out[i * 8 + 3] = g & 255; + out[i * 8 + 4] = (b >> 8) & 255; + out[i * 8 + 5] = b & 255; + out[i * 8 + 6] = (a >> 8) & 255; + out[i * 8 + 7] = a & 255; + } +} + +/*Get RGBA8 color of pixel with index i (y * width + x) from the raw image with given color type.*/ +static void getPixelColorRGBA8(unsigned char* r, unsigned char* g, + unsigned char* b, unsigned char* a, + const unsigned char* in, size_t i, + const LodePNGColorMode* mode) { + if(mode->colortype == LCT_GREY) { + if(mode->bitdepth == 8) { + *r = *g = *b = in[i]; + if(mode->key_defined && *r == mode->key_r) *a = 0; + else *a = 255; + } else if(mode->bitdepth == 16) { + *r = *g = *b = in[i * 2 + 0]; + if(mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r) *a = 0; + else *a = 255; + } else { + unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ + size_t j = i * mode->bitdepth; + unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); + *r = *g = *b = (value * 255) / highest; + if(mode->key_defined && value == mode->key_r) *a = 0; + else *a = 255; + } + } else if(mode->colortype == LCT_RGB) { + if(mode->bitdepth == 8) { + *r = in[i * 3 + 0]; *g = in[i * 3 + 1]; *b = in[i * 3 + 2]; + if(mode->key_defined && *r == mode->key_r && *g == mode->key_g && *b == mode->key_b) *a = 0; + else *a = 255; + } else { + *r = in[i * 6 + 0]; + *g = in[i * 6 + 2]; + *b = in[i * 6 + 4]; + if(mode->key_defined && 256U * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r + && 256U * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g + && 256U * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b) *a = 0; + else *a = 255; + } + } else if(mode->colortype == LCT_PALETTE) { + unsigned index; + if(mode->bitdepth == 8) index = in[i]; + else { + size_t j = i * mode->bitdepth; + index = readBitsFromReversedStream(&j, in, mode->bitdepth); + } + /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ + *r = mode->palette[index * 4 + 0]; + *g = mode->palette[index * 4 + 1]; + *b = mode->palette[index * 4 + 2]; + *a = mode->palette[index * 4 + 3]; + } else if(mode->colortype == LCT_GREY_ALPHA) { + if(mode->bitdepth == 8) { + *r = *g = *b = in[i * 2 + 0]; + *a = in[i * 2 + 1]; + } else { + *r = *g = *b = in[i * 4 + 0]; + *a = in[i * 4 + 2]; + } + } else if(mode->colortype == LCT_RGBA) { + if(mode->bitdepth == 8) { + *r = in[i * 4 + 0]; + *g = in[i * 4 + 1]; + *b = in[i * 4 + 2]; + *a = in[i * 4 + 3]; + } else { + *r = in[i * 8 + 0]; + *g = in[i * 8 + 2]; + *b = in[i * 8 + 4]; + *a = in[i * 8 + 6]; + } + } +} + +/*Similar to getPixelColorRGBA8, but with all the for loops inside of the color +mode test cases, optimized to convert the colors much faster, when converting +to the common case of RGBA with 8 bit per channel. buffer must be RGBA with +enough memory.*/ +static void getPixelColorsRGBA8(unsigned char* LODEPNG_RESTRICT buffer, size_t numpixels, + const unsigned char* LODEPNG_RESTRICT in, + const LodePNGColorMode* mode) { + unsigned num_channels = 4; + size_t i; + if(mode->colortype == LCT_GREY) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i]; + buffer[3] = 255; + } + if(mode->key_defined) { + buffer -= numpixels * num_channels; + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + if(buffer[0] == mode->key_r) buffer[3] = 0; + } + } + } else if(mode->bitdepth == 16) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i * 2]; + buffer[3] = mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r ? 0 : 255; + } + } else { + unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ + size_t j = 0; + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); + buffer[0] = buffer[1] = buffer[2] = (value * 255) / highest; + buffer[3] = mode->key_defined && value == mode->key_r ? 0 : 255; + } + } + } else if(mode->colortype == LCT_RGB) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + lodepng_memcpy(buffer, &in[i * 3], 3); + buffer[3] = 255; + } + if(mode->key_defined) { + buffer -= numpixels * num_channels; + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + if(buffer[0] == mode->key_r && buffer[1]== mode->key_g && buffer[2] == mode->key_b) buffer[3] = 0; + } + } + } else { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = in[i * 6 + 0]; + buffer[1] = in[i * 6 + 2]; + buffer[2] = in[i * 6 + 4]; + buffer[3] = mode->key_defined + && 256U * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r + && 256U * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g + && 256U * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b ? 0 : 255; + } + } + } else if(mode->colortype == LCT_PALETTE) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + unsigned index = in[i]; + /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ + lodepng_memcpy(buffer, &mode->palette[index * 4], 4); + } + } else { + size_t j = 0; + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + unsigned index = readBitsFromReversedStream(&j, in, mode->bitdepth); + /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ + lodepng_memcpy(buffer, &mode->palette[index * 4], 4); + } + } + } else if(mode->colortype == LCT_GREY_ALPHA) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i * 2 + 0]; + buffer[3] = in[i * 2 + 1]; + } + } else { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i * 4 + 0]; + buffer[3] = in[i * 4 + 2]; + } + } + } else if(mode->colortype == LCT_RGBA) { + if(mode->bitdepth == 8) { + lodepng_memcpy(buffer, in, numpixels * 4); + } else { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = in[i * 8 + 0]; + buffer[1] = in[i * 8 + 2]; + buffer[2] = in[i * 8 + 4]; + buffer[3] = in[i * 8 + 6]; + } + } + } +} + +/*Similar to getPixelColorsRGBA8, but with 3-channel RGB output.*/ +static void getPixelColorsRGB8(unsigned char* LODEPNG_RESTRICT buffer, size_t numpixels, + const unsigned char* LODEPNG_RESTRICT in, + const LodePNGColorMode* mode) { + const unsigned num_channels = 3; + size_t i; + if(mode->colortype == LCT_GREY) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i]; + } + } else if(mode->bitdepth == 16) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i * 2]; + } + } else { + unsigned highest = ((1U << mode->bitdepth) - 1U); /*highest possible value for this bit depth*/ + size_t j = 0; + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + unsigned value = readBitsFromReversedStream(&j, in, mode->bitdepth); + buffer[0] = buffer[1] = buffer[2] = (value * 255) / highest; + } + } + } else if(mode->colortype == LCT_RGB) { + if(mode->bitdepth == 8) { + lodepng_memcpy(buffer, in, numpixels * 3); + } else { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = in[i * 6 + 0]; + buffer[1] = in[i * 6 + 2]; + buffer[2] = in[i * 6 + 4]; + } + } + } else if(mode->colortype == LCT_PALETTE) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + unsigned index = in[i]; + /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ + lodepng_memcpy(buffer, &mode->palette[index * 4], 3); + } + } else { + size_t j = 0; + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + unsigned index = readBitsFromReversedStream(&j, in, mode->bitdepth); + /*out of bounds of palette not checked: see lodepng_color_mode_alloc_palette.*/ + lodepng_memcpy(buffer, &mode->palette[index * 4], 3); + } + } + } else if(mode->colortype == LCT_GREY_ALPHA) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i * 2 + 0]; + } + } else { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = buffer[1] = buffer[2] = in[i * 4 + 0]; + } + } + } else if(mode->colortype == LCT_RGBA) { + if(mode->bitdepth == 8) { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + lodepng_memcpy(buffer, &in[i * 4], 3); + } + } else { + for(i = 0; i != numpixels; ++i, buffer += num_channels) { + buffer[0] = in[i * 8 + 0]; + buffer[1] = in[i * 8 + 2]; + buffer[2] = in[i * 8 + 4]; + } + } + } +} + +/*Get RGBA16 color of pixel with index i (y * width + x) from the raw image with +given color type, but the given color type must be 16-bit itself.*/ +static void getPixelColorRGBA16(unsigned short* r, unsigned short* g, unsigned short* b, unsigned short* a, + const unsigned char* in, size_t i, const LodePNGColorMode* mode) { + if(mode->colortype == LCT_GREY) { + *r = *g = *b = 256 * in[i * 2 + 0] + in[i * 2 + 1]; + if(mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r) *a = 0; + else *a = 65535; + } else if(mode->colortype == LCT_RGB) { + *r = 256u * in[i * 6 + 0] + in[i * 6 + 1]; + *g = 256u * in[i * 6 + 2] + in[i * 6 + 3]; + *b = 256u * in[i * 6 + 4] + in[i * 6 + 5]; + if(mode->key_defined + && 256u * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r + && 256u * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g + && 256u * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b) *a = 0; + else *a = 65535; + } else if(mode->colortype == LCT_GREY_ALPHA) { + *r = *g = *b = 256u * in[i * 4 + 0] + in[i * 4 + 1]; + *a = 256u * in[i * 4 + 2] + in[i * 4 + 3]; + } else if(mode->colortype == LCT_RGBA) { + *r = 256u * in[i * 8 + 0] + in[i * 8 + 1]; + *g = 256u * in[i * 8 + 2] + in[i * 8 + 3]; + *b = 256u * in[i * 8 + 4] + in[i * 8 + 5]; + *a = 256u * in[i * 8 + 6] + in[i * 8 + 7]; + } +} + +unsigned lodepng_convert(unsigned char* out, const unsigned char* in, + const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in, + unsigned w, unsigned h) { + size_t i; + ColorTree tree; + size_t numpixels = (size_t)w * (size_t)h; + unsigned error = 0; + + if(mode_in->colortype == LCT_PALETTE && !mode_in->palette) { + return 107; /* error: must provide palette if input mode is palette */ + } + + if(lodepng_color_mode_equal(mode_out, mode_in)) { + size_t numbytes = lodepng_get_raw_size(w, h, mode_in); + lodepng_memcpy(out, in, numbytes); + return 0; + } + + if(mode_out->colortype == LCT_PALETTE) { + size_t palettesize = mode_out->palettesize; + const unsigned char* palette = mode_out->palette; + size_t palsize = (size_t)1u << mode_out->bitdepth; + /*if the user specified output palette but did not give the values, assume + they want the values of the input color type (assuming that one is palette). + Note that we never create a new palette ourselves.*/ + if(palettesize == 0) { + palettesize = mode_in->palettesize; + palette = mode_in->palette; + /*if the input was also palette with same bitdepth, then the color types are also + equal, so copy literally. This to preserve the exact indices that were in the PNG + even in case there are duplicate colors in the palette.*/ + if(mode_in->colortype == LCT_PALETTE && mode_in->bitdepth == mode_out->bitdepth) { + size_t numbytes = lodepng_get_raw_size(w, h, mode_in); + lodepng_memcpy(out, in, numbytes); + return 0; + } + } + if(palettesize < palsize) palsize = palettesize; + color_tree_init(&tree); + for(i = 0; i != palsize; ++i) { + const unsigned char* p = &palette[i * 4]; + error = color_tree_add(&tree, p[0], p[1], p[2], p[3], (unsigned)i); + if(error) break; + } + } + + if(!error) { + if(mode_in->bitdepth == 16 && mode_out->bitdepth == 16) { + for(i = 0; i != numpixels; ++i) { + unsigned short r = 0, g = 0, b = 0, a = 0; + getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); + rgba16ToPixel(out, i, mode_out, r, g, b, a); + } + } else if(mode_out->bitdepth == 8 && mode_out->colortype == LCT_RGBA) { + getPixelColorsRGBA8(out, numpixels, in, mode_in); + } else if(mode_out->bitdepth == 8 && mode_out->colortype == LCT_RGB) { + getPixelColorsRGB8(out, numpixels, in, mode_in); + } else { + unsigned char r = 0, g = 0, b = 0, a = 0; + for(i = 0; i != numpixels; ++i) { + getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); + error = rgba8ToPixel(out, i, mode_out, &tree, r, g, b, a); + if(error) break; + } + } + } + + if(mode_out->colortype == LCT_PALETTE) { + color_tree_cleanup(&tree); + } + + return error; +} + + +/* Converts a single rgb color without alpha from one type to another, color bits truncated to +their bitdepth. In case of single channel (gray or palette), only the r channel is used. Slow +function, do not use to process all pixels of an image. Alpha channel not supported on purpose: +this is for bKGD, supporting alpha may prevent it from finding a color in the palette, from the +specification it looks like bKGD should ignore the alpha values of the palette since it can use +any palette index but doesn't have an alpha channel. Idem with ignoring color key. */ +unsigned lodepng_convert_rgb( + unsigned* r_out, unsigned* g_out, unsigned* b_out, + unsigned r_in, unsigned g_in, unsigned b_in, + const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in) { + unsigned r = 0, g = 0, b = 0; + unsigned mul = 65535 / ((1u << mode_in->bitdepth) - 1u); /*65535, 21845, 4369, 257, 1*/ + unsigned shift = 16 - mode_out->bitdepth; + + if(mode_in->colortype == LCT_GREY || mode_in->colortype == LCT_GREY_ALPHA) { + r = g = b = r_in * mul; + } else if(mode_in->colortype == LCT_RGB || mode_in->colortype == LCT_RGBA) { + r = r_in * mul; + g = g_in * mul; + b = b_in * mul; + } else if(mode_in->colortype == LCT_PALETTE) { + if(r_in >= mode_in->palettesize) return 82; + r = mode_in->palette[r_in * 4 + 0] * 257u; + g = mode_in->palette[r_in * 4 + 1] * 257u; + b = mode_in->palette[r_in * 4 + 2] * 257u; + } else { + return 31; + } + + /* now convert to output format */ + if(mode_out->colortype == LCT_GREY || mode_out->colortype == LCT_GREY_ALPHA) { + *r_out = r >> shift ; + } else if(mode_out->colortype == LCT_RGB || mode_out->colortype == LCT_RGBA) { + *r_out = r >> shift ; + *g_out = g >> shift ; + *b_out = b >> shift ; + } else if(mode_out->colortype == LCT_PALETTE) { + unsigned i; + /* a 16-bit color cannot be in the palette */ + if((r >> 8) != (r & 255) || (g >> 8) != (g & 255) || (b >> 8) != (b & 255)) return 82; + for(i = 0; i < mode_out->palettesize; i++) { + unsigned j = i * 4; + if((r >> 8) == mode_out->palette[j + 0] && (g >> 8) == mode_out->palette[j + 1] && + (b >> 8) == mode_out->palette[j + 2]) { + *r_out = i; + return 0; + } + } + return 82; + } else { + return 31; + } + + return 0; +} + +#ifdef LODEPNG_COMPILE_ENCODER + +void lodepng_color_stats_init(LodePNGColorStats* stats) { + /*stats*/ + stats->colored = 0; + stats->key = 0; + stats->key_r = stats->key_g = stats->key_b = 0; + stats->alpha = 0; + stats->numcolors = 0; + stats->bits = 1; + stats->numpixels = 0; + /*settings*/ + stats->allow_palette = 1; + stats->allow_greyscale = 1; +} + +/*function used for debug purposes with C++*/ +/*void printColorStats(LodePNGColorStats* p) { + std::cout << "colored: " << (int)p->colored << ", "; + std::cout << "key: " << (int)p->key << ", "; + std::cout << "key_r: " << (int)p->key_r << ", "; + std::cout << "key_g: " << (int)p->key_g << ", "; + std::cout << "key_b: " << (int)p->key_b << ", "; + std::cout << "alpha: " << (int)p->alpha << ", "; + std::cout << "numcolors: " << (int)p->numcolors << ", "; + std::cout << "bits: " << (int)p->bits << std::endl; +}*/ + +/*Returns how many bits needed to represent given value (max 8 bit)*/ +static unsigned getValueRequiredBits(unsigned char value) { + if(value == 0 || value == 255) return 1; + /*The scaling of 2-bit and 4-bit values uses multiples of 85 and 17*/ + if(value % 17 == 0) return value % 85 == 0 ? 2 : 4; + return 8; +} + +/*stats must already have been inited. */ +unsigned lodepng_compute_color_stats(LodePNGColorStats* stats, + const unsigned char* in, unsigned w, unsigned h, + const LodePNGColorMode* mode_in) { + size_t i; + ColorTree tree; + size_t numpixels = (size_t)w * (size_t)h; + unsigned error = 0; + + /* mark things as done already if it would be impossible to have a more expensive case */ + unsigned colored_done = lodepng_is_greyscale_type(mode_in) ? 1 : 0; + unsigned alpha_done = lodepng_can_have_alpha(mode_in) ? 0 : 1; + unsigned numcolors_done = 0; + unsigned bpp = lodepng_get_bpp(mode_in); + unsigned bits_done = (stats->bits == 1 && bpp == 1) ? 1 : 0; + unsigned sixteen = 0; /* whether the input image is 16 bit */ + unsigned maxnumcolors = 257; + if(bpp <= 8) maxnumcolors = LODEPNG_MIN(257, stats->numcolors + (1u << bpp)); + + stats->numpixels += numpixels; + + /*if palette not allowed, no need to compute numcolors*/ + if(!stats->allow_palette) numcolors_done = 1; + + color_tree_init(&tree); + + /*If the stats was already filled in from previous data, fill its palette in tree + and mark things as done already if we know they are the most expensive case already*/ + if(stats->alpha) alpha_done = 1; + if(stats->colored) colored_done = 1; + if(stats->bits == 16) numcolors_done = 1; + if(stats->bits >= bpp) bits_done = 1; + if(stats->numcolors >= maxnumcolors) numcolors_done = 1; + + if(!numcolors_done) { + for(i = 0; i < stats->numcolors; i++) { + const unsigned char* color = &stats->palette[i * 4]; + error = color_tree_add(&tree, color[0], color[1], color[2], color[3], i); + if(error) goto cleanup; + } + } + + /*Check if the 16-bit input is truly 16-bit*/ + if(mode_in->bitdepth == 16 && !sixteen) { + unsigned short r = 0, g = 0, b = 0, a = 0; + for(i = 0; i != numpixels; ++i) { + getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); + if((r & 255) != ((r >> 8) & 255) || (g & 255) != ((g >> 8) & 255) || + (b & 255) != ((b >> 8) & 255) || (a & 255) != ((a >> 8) & 255)) /*first and second byte differ*/ { + stats->bits = 16; + sixteen = 1; + bits_done = 1; + numcolors_done = 1; /*counting colors no longer useful, palette doesn't support 16-bit*/ + break; + } + } + } + + if(sixteen) { + unsigned short r = 0, g = 0, b = 0, a = 0; + + for(i = 0; i != numpixels; ++i) { + getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); + + if(!colored_done && (r != g || r != b)) { + stats->colored = 1; + colored_done = 1; + } + + if(!alpha_done) { + unsigned matchkey = (r == stats->key_r && g == stats->key_g && b == stats->key_b); + if(a != 65535 && (a != 0 || (stats->key && !matchkey))) { + stats->alpha = 1; + stats->key = 0; + alpha_done = 1; + } else if(a == 0 && !stats->alpha && !stats->key) { + stats->key = 1; + stats->key_r = r; + stats->key_g = g; + stats->key_b = b; + } else if(a == 65535 && stats->key && matchkey) { + /* Color key cannot be used if an opaque pixel also has that RGB color. */ + stats->alpha = 1; + stats->key = 0; + alpha_done = 1; + } + } + if(alpha_done && numcolors_done && colored_done && bits_done) break; + } + + if(stats->key && !stats->alpha) { + for(i = 0; i != numpixels; ++i) { + getPixelColorRGBA16(&r, &g, &b, &a, in, i, mode_in); + if(a != 0 && r == stats->key_r && g == stats->key_g && b == stats->key_b) { + /* Color key cannot be used if an opaque pixel also has that RGB color. */ + stats->alpha = 1; + stats->key = 0; + alpha_done = 1; + } + } + } + } else /* < 16-bit */ { + unsigned char r = 0, g = 0, b = 0, a = 0; + for(i = 0; i != numpixels; ++i) { + getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); + + if(!bits_done && stats->bits < 8) { + /*only r is checked, < 8 bits is only relevant for grayscale*/ + unsigned bits = getValueRequiredBits(r); + if(bits > stats->bits) stats->bits = bits; + } + bits_done = (stats->bits >= bpp); + + if(!colored_done && (r != g || r != b)) { + stats->colored = 1; + colored_done = 1; + if(stats->bits < 8) stats->bits = 8; /*PNG has no colored modes with less than 8-bit per channel*/ + } + + if(!alpha_done) { + unsigned matchkey = (r == stats->key_r && g == stats->key_g && b == stats->key_b); + if(a != 255 && (a != 0 || (stats->key && !matchkey))) { + stats->alpha = 1; + stats->key = 0; + alpha_done = 1; + if(stats->bits < 8) stats->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ + } else if(a == 0 && !stats->alpha && !stats->key) { + stats->key = 1; + stats->key_r = r; + stats->key_g = g; + stats->key_b = b; + } else if(a == 255 && stats->key && matchkey) { + /* Color key cannot be used if an opaque pixel also has that RGB color. */ + stats->alpha = 1; + stats->key = 0; + alpha_done = 1; + if(stats->bits < 8) stats->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ + } + } + + if(!numcolors_done) { + if(!color_tree_has(&tree, r, g, b, a)) { + error = color_tree_add(&tree, r, g, b, a, stats->numcolors); + if(error) goto cleanup; + if(stats->numcolors < 256) { + unsigned char* p = stats->palette; + unsigned n = stats->numcolors; + p[n * 4 + 0] = r; + p[n * 4 + 1] = g; + p[n * 4 + 2] = b; + p[n * 4 + 3] = a; + } + ++stats->numcolors; + numcolors_done = stats->numcolors >= maxnumcolors; + } + } + + if(alpha_done && numcolors_done && colored_done && bits_done) break; + } + + if(stats->key && !stats->alpha) { + for(i = 0; i != numpixels; ++i) { + getPixelColorRGBA8(&r, &g, &b, &a, in, i, mode_in); + if(a != 0 && r == stats->key_r && g == stats->key_g && b == stats->key_b) { + /* Color key cannot be used if an opaque pixel also has that RGB color. */ + stats->alpha = 1; + stats->key = 0; + alpha_done = 1; + if(stats->bits < 8) stats->bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ + } + } + } + + /*make the stats's key always 16-bit for consistency - repeat each byte twice*/ + stats->key_r += (stats->key_r << 8); + stats->key_g += (stats->key_g << 8); + stats->key_b += (stats->key_b << 8); + } + +cleanup: + color_tree_cleanup(&tree); + return error; +} + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS +/*Adds a single color to the color stats. The stats must already have been inited. The color must be given as 16-bit +(with 2 bytes repeating for 8-bit and 65535 for opaque alpha channel). This function is expensive, do not call it for +all pixels of an image but only for a few additional values. */ +static unsigned lodepng_color_stats_add(LodePNGColorStats* stats, + unsigned r, unsigned g, unsigned b, unsigned a) { + unsigned error = 0; + unsigned char image[8]; + LodePNGColorMode mode; + lodepng_color_mode_init(&mode); + image[0] = r >> 8; image[1] = r; image[2] = g >> 8; image[3] = g; + image[4] = b >> 8; image[5] = b; image[6] = a >> 8; image[7] = a; + mode.bitdepth = 16; + mode.colortype = LCT_RGBA; + error = lodepng_compute_color_stats(stats, image, 1, 1, &mode); + lodepng_color_mode_cleanup(&mode); + return error; +} +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +/*Computes a minimal PNG color model that can contain all colors as indicated by the stats. +The stats should be computed with lodepng_compute_color_stats. +mode_in is raw color profile of the image the stats were computed on, to copy palette order from when relevant. +Minimal PNG color model means the color type and bit depth that gives smallest amount of bits in the output image, +e.g. gray if only grayscale pixels, palette if less than 256 colors, color key if only single transparent color, ... +This is used if auto_convert is enabled (it is by default). +*/ +static unsigned auto_choose_color(LodePNGColorMode* mode_out, + const LodePNGColorMode* mode_in, + const LodePNGColorStats* stats) { + unsigned error = 0; + unsigned palettebits; + size_t i, n; + size_t numpixels = stats->numpixels; + unsigned palette_ok, gray_ok; + + unsigned alpha = stats->alpha; + unsigned key = stats->key; + unsigned bits = stats->bits; + + mode_out->key_defined = 0; + + if(key && numpixels <= 16) { + alpha = 1; /*too few pixels to justify tRNS chunk overhead*/ + key = 0; + if(bits < 8) bits = 8; /*PNG has no alphachannel modes with less than 8-bit per channel*/ + } + + gray_ok = !stats->colored; + if(!stats->allow_greyscale) gray_ok = 0; + if(!gray_ok && bits < 8) bits = 8; + + n = stats->numcolors; + palettebits = n <= 2 ? 1 : (n <= 4 ? 2 : (n <= 16 ? 4 : 8)); + palette_ok = n <= 256 && bits <= 8 && n != 0; /*n==0 means likely numcolors wasn't computed*/ + if(numpixels < n * 2) palette_ok = 0; /*don't add palette overhead if image has only a few pixels*/ + if(gray_ok && !alpha && bits <= palettebits) palette_ok = 0; /*gray is less overhead*/ + if(!stats->allow_palette) palette_ok = 0; + + if(palette_ok) { + const unsigned char* p = stats->palette; + lodepng_palette_clear(mode_out); /*remove potential earlier palette*/ + for(i = 0; i != stats->numcolors; ++i) { + error = lodepng_palette_add(mode_out, p[i * 4 + 0], p[i * 4 + 1], p[i * 4 + 2], p[i * 4 + 3]); + if(error) break; + } + + mode_out->colortype = LCT_PALETTE; + mode_out->bitdepth = palettebits; + + if(mode_in->colortype == LCT_PALETTE && mode_in->palettesize >= mode_out->palettesize + && mode_in->bitdepth == mode_out->bitdepth) { + /*If input should have same palette colors, keep original to preserve its order and prevent conversion*/ + lodepng_color_mode_cleanup(mode_out); + lodepng_color_mode_copy(mode_out, mode_in); + } + } else /*8-bit or 16-bit per channel*/ { + mode_out->bitdepth = bits; + mode_out->colortype = alpha ? (gray_ok ? LCT_GREY_ALPHA : LCT_RGBA) + : (gray_ok ? LCT_GREY : LCT_RGB); + if(key) { + unsigned mask = (1u << mode_out->bitdepth) - 1u; /*stats always uses 16-bit, mask converts it*/ + mode_out->key_r = stats->key_r & mask; + mode_out->key_g = stats->key_g & mask; + mode_out->key_b = stats->key_b & mask; + mode_out->key_defined = 1; + } + } + + return error; +} + +#endif /* #ifdef LODEPNG_COMPILE_ENCODER */ + +/* +Paeth predictor, used by PNG filter type 4 +The parameters are of type short, but should come from unsigned chars, the shorts +are only needed to make the paeth calculation correct. +*/ +static unsigned char paethPredictor(short a, short b, short c) { + short pa = LODEPNG_ABS(b - c); + short pb = LODEPNG_ABS(a - c); + short pc = LODEPNG_ABS(a + b - c - c); + /* return input value associated with smallest of pa, pb, pc (with certain priority if equal) */ + if(pb < pa) { a = b; pa = pb; } + return (pc < pa) ? c : a; +} + +/*shared values used by multiple Adam7 related functions*/ + +static const unsigned ADAM7_IX[7] = { 0, 4, 0, 2, 0, 1, 0 }; /*x start values*/ +static const unsigned ADAM7_IY[7] = { 0, 0, 4, 0, 2, 0, 1 }; /*y start values*/ +static const unsigned ADAM7_DX[7] = { 8, 8, 4, 4, 2, 2, 1 }; /*x delta values*/ +static const unsigned ADAM7_DY[7] = { 8, 8, 8, 4, 4, 2, 2 }; /*y delta values*/ + +/* +Outputs various dimensions and positions in the image related to the Adam7 reduced images. +passw: output containing the width of the 7 passes +passh: output containing the height of the 7 passes +filter_passstart: output containing the index of the start and end of each + reduced image with filter bytes +padded_passstart output containing the index of the start and end of each + reduced image when without filter bytes but with padded scanlines +passstart: output containing the index of the start and end of each reduced + image without padding between scanlines, but still padding between the images +w, h: width and height of non-interlaced image +bpp: bits per pixel +"padded" is only relevant if bpp is less than 8 and a scanline or image does not + end at a full byte +*/ +static void Adam7_getpassvalues(unsigned passw[7], unsigned passh[7], size_t filter_passstart[8], + size_t padded_passstart[8], size_t passstart[8], unsigned w, unsigned h, unsigned bpp) { + /*the passstart values have 8 values: the 8th one indicates the byte after the end of the 7th (= last) pass*/ + unsigned i; + + /*calculate width and height in pixels of each pass*/ + for(i = 0; i != 7; ++i) { + passw[i] = (w + ADAM7_DX[i] - ADAM7_IX[i] - 1) / ADAM7_DX[i]; + passh[i] = (h + ADAM7_DY[i] - ADAM7_IY[i] - 1) / ADAM7_DY[i]; + if(passw[i] == 0) passh[i] = 0; + if(passh[i] == 0) passw[i] = 0; + } + + filter_passstart[0] = padded_passstart[0] = passstart[0] = 0; + for(i = 0; i != 7; ++i) { + /*if passw[i] is 0, it's 0 bytes, not 1 (no filtertype-byte)*/ + filter_passstart[i + 1] = filter_passstart[i] + + ((passw[i] && passh[i]) ? passh[i] * (1u + (passw[i] * bpp + 7u) / 8u) : 0); + /*bits padded if needed to fill full byte at end of each scanline*/ + padded_passstart[i + 1] = padded_passstart[i] + passh[i] * ((passw[i] * bpp + 7u) / 8u); + /*only padded at end of reduced image*/ + passstart[i + 1] = passstart[i] + (passh[i] * passw[i] * bpp + 7u) / 8u; + } +} + +#ifdef LODEPNG_COMPILE_DECODER + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / PNG Decoder / */ +/* ////////////////////////////////////////////////////////////////////////// */ + +/*read the information from the header and store it in the LodePNGInfo. return value is error*/ +unsigned lodepng_inspect(unsigned* w, unsigned* h, LodePNGState* state, + const unsigned char* in, size_t insize) { + unsigned width, height; + LodePNGInfo* info = &state->info_png; + if(insize == 0 || in == 0) { + CERROR_RETURN_ERROR(state->error, 48); /*error: the given data is empty*/ + } + if(insize < 33) { + CERROR_RETURN_ERROR(state->error, 27); /*error: the data length is smaller than the length of a PNG header*/ + } + + /*when decoding a new PNG image, make sure all parameters created after previous decoding are reset*/ + /* TODO: remove this. One should use a new LodePNGState for new sessions */ + lodepng_info_cleanup(info); + lodepng_info_init(info); + + if(in[0] != 137 || in[1] != 80 || in[2] != 78 || in[3] != 71 + || in[4] != 13 || in[5] != 10 || in[6] != 26 || in[7] != 10) { + CERROR_RETURN_ERROR(state->error, 28); /*error: the first 8 bytes are not the correct PNG signature*/ + } + if(lodepng_chunk_length(in + 8) != 13) { + CERROR_RETURN_ERROR(state->error, 94); /*error: header size must be 13 bytes*/ + } + if(!lodepng_chunk_type_equals(in + 8, "IHDR")) { + CERROR_RETURN_ERROR(state->error, 29); /*error: it doesn't start with a IHDR chunk!*/ + } + + /*read the values given in the header*/ + width = lodepng_read32bitInt(&in[16]); + height = lodepng_read32bitInt(&in[20]); + /*TODO: remove the undocumented feature that allows to give null pointers to width or height*/ + if(w) *w = width; + if(h) *h = height; + info->color.bitdepth = in[24]; + info->color.colortype = (LodePNGColorType)in[25]; + info->compression_method = in[26]; + info->filter_method = in[27]; + info->interlace_method = in[28]; + + /*errors returned only after the parsing so other values are still output*/ + + /*error: invalid image size*/ + if(width == 0 || height == 0) CERROR_RETURN_ERROR(state->error, 93); + /*error: invalid colortype or bitdepth combination*/ + state->error = checkColorValidity(info->color.colortype, info->color.bitdepth); + if(state->error) return state->error; + /*error: only compression method 0 is allowed in the specification*/ + if(info->compression_method != 0) CERROR_RETURN_ERROR(state->error, 32); + /*error: only filter method 0 is allowed in the specification*/ + if(info->filter_method != 0) CERROR_RETURN_ERROR(state->error, 33); + /*error: only interlace methods 0 and 1 exist in the specification*/ + if(info->interlace_method > 1) CERROR_RETURN_ERROR(state->error, 34); + + if(!state->decoder.ignore_crc) { + unsigned CRC = lodepng_read32bitInt(&in[29]); + unsigned checksum = lodepng_crc32(&in[12], 17); + if(CRC != checksum) { + CERROR_RETURN_ERROR(state->error, 57); /*invalid CRC*/ + } + } + + return state->error; +} + +static unsigned unfilterScanline(unsigned char* recon, const unsigned char* scanline, const unsigned char* precon, + size_t bytewidth, unsigned char filterType, size_t length) { + /* + For PNG filter method 0 + unfilter a PNG image scanline by scanline. when the pixels are smaller than 1 byte, + the filter works byte per byte (bytewidth = 1) + precon is the previous unfiltered scanline, recon the result, scanline the current one + the incoming scanlines do NOT include the filtertype byte, that one is given in the parameter filterType instead + recon and scanline MAY be the same memory address! precon must be disjoint. + */ + + size_t i; + switch(filterType) { + case 0: + for(i = 0; i != length; ++i) recon[i] = scanline[i]; + break; + case 1: { + size_t j = 0; + for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i]; + for(i = bytewidth; i != length; ++i, ++j) recon[i] = scanline[i] + recon[j]; + break; + } + case 2: + if(precon) { + for(i = 0; i != length; ++i) recon[i] = scanline[i] + precon[i]; + } else { + for(i = 0; i != length; ++i) recon[i] = scanline[i]; + } + break; + case 3: + if(precon) { + size_t j = 0; + for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i] + (precon[i] >> 1u); + /* Unroll independent paths of this predictor. A 6x and 8x version is also possible but that adds + too much code. Whether this speeds up anything depends on compiler and settings. */ + if(bytewidth >= 4) { + for(; i + 3 < length; i += 4, j += 4) { + unsigned char s0 = scanline[i + 0], r0 = recon[j + 0], p0 = precon[i + 0]; + unsigned char s1 = scanline[i + 1], r1 = recon[j + 1], p1 = precon[i + 1]; + unsigned char s2 = scanline[i + 2], r2 = recon[j + 2], p2 = precon[i + 2]; + unsigned char s3 = scanline[i + 3], r3 = recon[j + 3], p3 = precon[i + 3]; + recon[i + 0] = s0 + ((r0 + p0) >> 1u); + recon[i + 1] = s1 + ((r1 + p1) >> 1u); + recon[i + 2] = s2 + ((r2 + p2) >> 1u); + recon[i + 3] = s3 + ((r3 + p3) >> 1u); + } + } else if(bytewidth >= 3) { + for(; i + 2 < length; i += 3, j += 3) { + unsigned char s0 = scanline[i + 0], r0 = recon[j + 0], p0 = precon[i + 0]; + unsigned char s1 = scanline[i + 1], r1 = recon[j + 1], p1 = precon[i + 1]; + unsigned char s2 = scanline[i + 2], r2 = recon[j + 2], p2 = precon[i + 2]; + recon[i + 0] = s0 + ((r0 + p0) >> 1u); + recon[i + 1] = s1 + ((r1 + p1) >> 1u); + recon[i + 2] = s2 + ((r2 + p2) >> 1u); + } + } else if(bytewidth >= 2) { + for(; i + 1 < length; i += 2, j += 2) { + unsigned char s0 = scanline[i + 0], r0 = recon[j + 0], p0 = precon[i + 0]; + unsigned char s1 = scanline[i + 1], r1 = recon[j + 1], p1 = precon[i + 1]; + recon[i + 0] = s0 + ((r0 + p0) >> 1u); + recon[i + 1] = s1 + ((r1 + p1) >> 1u); + } + } + for(; i != length; ++i, ++j) recon[i] = scanline[i] + ((recon[j] + precon[i]) >> 1u); + } else { + size_t j = 0; + for(i = 0; i != bytewidth; ++i) recon[i] = scanline[i]; + for(i = bytewidth; i != length; ++i, ++j) recon[i] = scanline[i] + (recon[j] >> 1u); + } + break; + case 4: + if(precon) { + size_t j = 0; + for(i = 0; i != bytewidth; ++i) { + recon[i] = (scanline[i] + precon[i]); /*paethPredictor(0, precon[i], 0) is always precon[i]*/ + } + + /* Unroll independent paths of the paeth predictor. A 6x and 8x version is also possible but that + adds too much code. Whether this speeds up anything depends on compiler and settings. */ + if(bytewidth >= 4) { + for(; i + 3 < length; i += 4, j += 4) { + unsigned char s0 = scanline[i + 0], s1 = scanline[i + 1], s2 = scanline[i + 2], s3 = scanline[i + 3]; + unsigned char r0 = recon[j + 0], r1 = recon[j + 1], r2 = recon[j + 2], r3 = recon[j + 3]; + unsigned char p0 = precon[i + 0], p1 = precon[i + 1], p2 = precon[i + 2], p3 = precon[i + 3]; + unsigned char q0 = precon[j + 0], q1 = precon[j + 1], q2 = precon[j + 2], q3 = precon[j + 3]; + recon[i + 0] = s0 + paethPredictor(r0, p0, q0); + recon[i + 1] = s1 + paethPredictor(r1, p1, q1); + recon[i + 2] = s2 + paethPredictor(r2, p2, q2); + recon[i + 3] = s3 + paethPredictor(r3, p3, q3); + } + } else if(bytewidth >= 3) { + for(; i + 2 < length; i += 3, j += 3) { + unsigned char s0 = scanline[i + 0], s1 = scanline[i + 1], s2 = scanline[i + 2]; + unsigned char r0 = recon[j + 0], r1 = recon[j + 1], r2 = recon[j + 2]; + unsigned char p0 = precon[i + 0], p1 = precon[i + 1], p2 = precon[i + 2]; + unsigned char q0 = precon[j + 0], q1 = precon[j + 1], q2 = precon[j + 2]; + recon[i + 0] = s0 + paethPredictor(r0, p0, q0); + recon[i + 1] = s1 + paethPredictor(r1, p1, q1); + recon[i + 2] = s2 + paethPredictor(r2, p2, q2); + } + } else if(bytewidth >= 2) { + for(; i + 1 < length; i += 2, j += 2) { + unsigned char s0 = scanline[i + 0], s1 = scanline[i + 1]; + unsigned char r0 = recon[j + 0], r1 = recon[j + 1]; + unsigned char p0 = precon[i + 0], p1 = precon[i + 1]; + unsigned char q0 = precon[j + 0], q1 = precon[j + 1]; + recon[i + 0] = s0 + paethPredictor(r0, p0, q0); + recon[i + 1] = s1 + paethPredictor(r1, p1, q1); + } + } + + for(; i != length; ++i, ++j) { + recon[i] = (scanline[i] + paethPredictor(recon[i - bytewidth], precon[i], precon[j])); + } + } else { + size_t j = 0; + for(i = 0; i != bytewidth; ++i) { + recon[i] = scanline[i]; + } + for(i = bytewidth; i != length; ++i, ++j) { + /*paethPredictor(recon[i - bytewidth], 0, 0) is always recon[i - bytewidth]*/ + recon[i] = (scanline[i] + recon[j]); + } + } + break; + default: return 36; /*error: invalid filter type given*/ + } + return 0; +} + +static unsigned unfilter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { + /* + For PNG filter method 0 + this function unfilters a single image (e.g. without interlacing this is called once, with Adam7 seven times) + out must have enough bytes allocated already, in must have the scanlines + 1 filtertype byte per scanline + w and h are image dimensions or dimensions of reduced image, bpp is bits per pixel + in and out are allowed to be the same memory address (but aren't the same size since in has the extra filter bytes) + */ + + unsigned y; + unsigned char* prevline = 0; + + /*bytewidth is used for filtering, is 1 when bpp < 8, number of bytes per pixel otherwise*/ + size_t bytewidth = (bpp + 7u) / 8u; + /*the width of a scanline in bytes, not including the filter type*/ + size_t linebytes = lodepng_get_raw_size_idat(w, 1, bpp) - 1u; + + for(y = 0; y < h; ++y) { + size_t outindex = linebytes * y; + size_t inindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/ + unsigned char filterType = in[inindex]; + + CERROR_TRY_RETURN(unfilterScanline(&out[outindex], &in[inindex + 1], prevline, bytewidth, filterType, linebytes)); + + prevline = &out[outindex]; + } + + return 0; +} + +/* +in: Adam7 interlaced image, with no padding bits between scanlines, but between + reduced images so that each reduced image starts at a byte. +out: the same pixels, but re-ordered so that they're now a non-interlaced image with size w*h +bpp: bits per pixel +out has the following size in bits: w * h * bpp. +in is possibly bigger due to padding bits between reduced images. +out must be big enough AND must be 0 everywhere if bpp < 8 in the current implementation +(because that's likely a little bit faster) +NOTE: comments about padding bits are only relevant if bpp < 8 +*/ +static void Adam7_deinterlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { + unsigned passw[7], passh[7]; + size_t filter_passstart[8], padded_passstart[8], passstart[8]; + unsigned i; + + Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); + + if(bpp >= 8) { + for(i = 0; i != 7; ++i) { + unsigned x, y, b; + size_t bytewidth = bpp / 8u; + for(y = 0; y < passh[i]; ++y) + for(x = 0; x < passw[i]; ++x) { + size_t pixelinstart = passstart[i] + (y * passw[i] + x) * bytewidth; + size_t pixeloutstart = ((ADAM7_IY[i] + (size_t)y * ADAM7_DY[i]) * (size_t)w + + ADAM7_IX[i] + (size_t)x * ADAM7_DX[i]) * bytewidth; + for(b = 0; b < bytewidth; ++b) { + out[pixeloutstart + b] = in[pixelinstart + b]; + } + } + } + } else /*bpp < 8: Adam7 with pixels < 8 bit is a bit trickier: with bit pointers*/ { + for(i = 0; i != 7; ++i) { + unsigned x, y, b; + unsigned ilinebits = bpp * passw[i]; + unsigned olinebits = bpp * w; + size_t obp, ibp; /*bit pointers (for out and in buffer)*/ + for(y = 0; y < passh[i]; ++y) + for(x = 0; x < passw[i]; ++x) { + ibp = (8 * passstart[i]) + (y * ilinebits + x * bpp); + obp = (ADAM7_IY[i] + (size_t)y * ADAM7_DY[i]) * olinebits + (ADAM7_IX[i] + (size_t)x * ADAM7_DX[i]) * bpp; + for(b = 0; b < bpp; ++b) { + unsigned char bit = readBitFromReversedStream(&ibp, in); + setBitOfReversedStream(&obp, out, bit); + } + } + } + } +} + +static void removePaddingBits(unsigned char* out, const unsigned char* in, + size_t olinebits, size_t ilinebits, unsigned h) { + /* + After filtering there are still padding bits if scanlines have non multiple of 8 bit amounts. They need + to be removed (except at last scanline of (Adam7-reduced) image) before working with pure image buffers + for the Adam7 code, the color convert code and the output to the user. + in and out are allowed to be the same buffer, in may also be higher but still overlapping; in must + have >= ilinebits*h bits, out must have >= olinebits*h bits, olinebits must be <= ilinebits + also used to move bits after earlier such operations happened, e.g. in a sequence of reduced images from Adam7 + only useful if (ilinebits - olinebits) is a value in the range 1..7 + */ + unsigned y; + size_t diff = ilinebits - olinebits; + size_t ibp = 0, obp = 0; /*input and output bit pointers*/ + for(y = 0; y < h; ++y) { + size_t x; + for(x = 0; x < olinebits; ++x) { + unsigned char bit = readBitFromReversedStream(&ibp, in); + setBitOfReversedStream(&obp, out, bit); + } + ibp += diff; + } +} + +/*out must be buffer big enough to contain full image, and in must contain the full decompressed data from +the IDAT chunks (with filter index bytes and possible padding bits) +return value is error*/ +static unsigned postProcessScanlines(unsigned char* out, unsigned char* in, + unsigned w, unsigned h, const LodePNGInfo* info_png) { + /* + This function converts the filtered-padded-interlaced data into pure 2D image buffer with the PNG's colortype. + Steps: + *) if no Adam7: 1) unfilter 2) remove padding bits (= possible extra bits per scanline if bpp < 8) + *) if adam7: 1) 7x unfilter 2) 7x remove padding bits 3) Adam7_deinterlace + NOTE: the in buffer will be overwritten with intermediate data! + */ + unsigned bpp = lodepng_get_bpp(&info_png->color); + if(bpp == 0) return 31; /*error: invalid colortype*/ + + if(info_png->interlace_method == 0) { + if(bpp < 8 && w * bpp != ((w * bpp + 7u) / 8u) * 8u) { + CERROR_TRY_RETURN(unfilter(in, in, w, h, bpp)); + removePaddingBits(out, in, w * bpp, ((w * bpp + 7u) / 8u) * 8u, h); + } + /*we can immediately filter into the out buffer, no other steps needed*/ + else CERROR_TRY_RETURN(unfilter(out, in, w, h, bpp)); + } else /*interlace_method is 1 (Adam7)*/ { + unsigned passw[7], passh[7]; size_t filter_passstart[8], padded_passstart[8], passstart[8]; + unsigned i; + + Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); + + for(i = 0; i != 7; ++i) { + CERROR_TRY_RETURN(unfilter(&in[padded_passstart[i]], &in[filter_passstart[i]], passw[i], passh[i], bpp)); + /*TODO: possible efficiency improvement: if in this reduced image the bits fit nicely in 1 scanline, + move bytes instead of bits or move not at all*/ + if(bpp < 8) { + /*remove padding bits in scanlines; after this there still may be padding + bits between the different reduced images: each reduced image still starts nicely at a byte*/ + removePaddingBits(&in[passstart[i]], &in[padded_passstart[i]], passw[i] * bpp, + ((passw[i] * bpp + 7u) / 8u) * 8u, passh[i]); + } + } + + Adam7_deinterlace(out, in, w, h, bpp); + } + + return 0; +} + +static unsigned readChunk_PLTE(LodePNGColorMode* color, const unsigned char* data, size_t chunkLength) { + unsigned pos = 0, i; + color->palettesize = chunkLength / 3u; + if(color->palettesize == 0 || color->palettesize > 256) return 38; /*error: palette too small or big*/ + lodepng_color_mode_alloc_palette(color); + if(!color->palette && color->palettesize) { + color->palettesize = 0; + return 83; /*alloc fail*/ + } + + for(i = 0; i != color->palettesize; ++i) { + color->palette[4 * i + 0] = data[pos++]; /*R*/ + color->palette[4 * i + 1] = data[pos++]; /*G*/ + color->palette[4 * i + 2] = data[pos++]; /*B*/ + color->palette[4 * i + 3] = 255; /*alpha*/ + } + + return 0; /* OK */ +} + +static unsigned readChunk_tRNS(LodePNGColorMode* color, const unsigned char* data, size_t chunkLength) { + unsigned i; + if(color->colortype == LCT_PALETTE) { + /*error: more alpha values given than there are palette entries*/ + if(chunkLength > color->palettesize) return 39; + + for(i = 0; i != chunkLength; ++i) color->palette[4 * i + 3] = data[i]; + } else if(color->colortype == LCT_GREY) { + /*error: this chunk must be 2 bytes for grayscale image*/ + if(chunkLength != 2) return 30; + + color->key_defined = 1; + color->key_r = color->key_g = color->key_b = 256u * data[0] + data[1]; + } else if(color->colortype == LCT_RGB) { + /*error: this chunk must be 6 bytes for RGB image*/ + if(chunkLength != 6) return 41; + + color->key_defined = 1; + color->key_r = 256u * data[0] + data[1]; + color->key_g = 256u * data[2] + data[3]; + color->key_b = 256u * data[4] + data[5]; + } + else return 42; /*error: tRNS chunk not allowed for other color models*/ + + return 0; /* OK */ +} + + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS +/*background color chunk (bKGD)*/ +static unsigned readChunk_bKGD(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + if(info->color.colortype == LCT_PALETTE) { + /*error: this chunk must be 1 byte for indexed color image*/ + if(chunkLength != 1) return 43; + + /*error: invalid palette index, or maybe this chunk appeared before PLTE*/ + if(data[0] >= info->color.palettesize) return 103; + + info->background_defined = 1; + info->background_r = info->background_g = info->background_b = data[0]; + } else if(info->color.colortype == LCT_GREY || info->color.colortype == LCT_GREY_ALPHA) { + /*error: this chunk must be 2 bytes for grayscale image*/ + if(chunkLength != 2) return 44; + + /*the values are truncated to bitdepth in the PNG file*/ + info->background_defined = 1; + info->background_r = info->background_g = info->background_b = 256u * data[0] + data[1]; + } else if(info->color.colortype == LCT_RGB || info->color.colortype == LCT_RGBA) { + /*error: this chunk must be 6 bytes for grayscale image*/ + if(chunkLength != 6) return 45; + + /*the values are truncated to bitdepth in the PNG file*/ + info->background_defined = 1; + info->background_r = 256u * data[0] + data[1]; + info->background_g = 256u * data[2] + data[3]; + info->background_b = 256u * data[4] + data[5]; + } + + return 0; /* OK */ +} + +/*text chunk (tEXt)*/ +static unsigned readChunk_tEXt(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + unsigned error = 0; + char *key = 0, *str = 0; + + while(!error) /*not really a while loop, only used to break on error*/ { + unsigned length, string2_begin; + + length = 0; + while(length < chunkLength && data[length] != 0) ++length; + /*even though it's not allowed by the standard, no error is thrown if + there's no null termination char, if the text is empty*/ + if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/ + + key = (char*)lodepng_malloc(length + 1); + if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ + + lodepng_memcpy(key, data, length); + key[length] = 0; + + string2_begin = length + 1; /*skip keyword null terminator*/ + + length = (unsigned)(chunkLength < string2_begin ? 0 : chunkLength - string2_begin); + str = (char*)lodepng_malloc(length + 1); + if(!str) CERROR_BREAK(error, 83); /*alloc fail*/ + + lodepng_memcpy(str, data + string2_begin, length); + str[length] = 0; + + error = lodepng_add_text(info, key, str); + + break; + } + + lodepng_free(key); + lodepng_free(str); + + return error; +} + +/*compressed text chunk (zTXt)*/ +static unsigned readChunk_zTXt(LodePNGInfo* info, const LodePNGDecoderSettings* decoder, + const unsigned char* data, size_t chunkLength) { + unsigned error = 0; + + /*copy the object to change parameters in it*/ + LodePNGDecompressSettings zlibsettings = decoder->zlibsettings; + + unsigned length, string2_begin; + char *key = 0; + unsigned char* str = 0; + size_t size = 0; + + while(!error) /*not really a while loop, only used to break on error*/ { + for(length = 0; length < chunkLength && data[length] != 0; ++length) ; + if(length + 2 >= chunkLength) CERROR_BREAK(error, 75); /*no null termination, corrupt?*/ + if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/ + + key = (char*)lodepng_malloc(length + 1); + if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ + + lodepng_memcpy(key, data, length); + key[length] = 0; + + if(data[length + 1] != 0) CERROR_BREAK(error, 72); /*the 0 byte indicating compression must be 0*/ + + string2_begin = length + 2; + if(string2_begin > chunkLength) CERROR_BREAK(error, 75); /*no null termination, corrupt?*/ + + length = (unsigned)chunkLength - string2_begin; + zlibsettings.max_output_size = decoder->max_text_size; + /*will fail if zlib error, e.g. if length is too small*/ + error = zlib_decompress(&str, &size, 0, &data[string2_begin], + length, &zlibsettings); + /*error: compressed text larger than decoder->max_text_size*/ + if(error && size > zlibsettings.max_output_size) error = 112; + if(error) break; + error = lodepng_add_text_sized(info, key, (char*)str, size); + break; + } + + lodepng_free(key); + lodepng_free(str); + + return error; +} + +/*international text chunk (iTXt)*/ +static unsigned readChunk_iTXt(LodePNGInfo* info, const LodePNGDecoderSettings* decoder, + const unsigned char* data, size_t chunkLength) { + unsigned error = 0; + unsigned i; + + /*copy the object to change parameters in it*/ + LodePNGDecompressSettings zlibsettings = decoder->zlibsettings; + + unsigned length, begin, compressed; + char *key = 0, *langtag = 0, *transkey = 0; + + while(!error) /*not really a while loop, only used to break on error*/ { + /*Quick check if the chunk length isn't too small. Even without check + it'd still fail with other error checks below if it's too short. This just gives a different error code.*/ + if(chunkLength < 5) CERROR_BREAK(error, 30); /*iTXt chunk too short*/ + + /*read the key*/ + for(length = 0; length < chunkLength && data[length] != 0; ++length) ; + if(length + 3 >= chunkLength) CERROR_BREAK(error, 75); /*no null termination char, corrupt?*/ + if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/ + + key = (char*)lodepng_malloc(length + 1); + if(!key) CERROR_BREAK(error, 83); /*alloc fail*/ + + lodepng_memcpy(key, data, length); + key[length] = 0; + + /*read the compression method*/ + compressed = data[length + 1]; + if(data[length + 2] != 0) CERROR_BREAK(error, 72); /*the 0 byte indicating compression must be 0*/ + + /*even though it's not allowed by the standard, no error is thrown if + there's no null termination char, if the text is empty for the next 3 texts*/ + + /*read the langtag*/ + begin = length + 3; + length = 0; + for(i = begin; i < chunkLength && data[i] != 0; ++i) ++length; + + langtag = (char*)lodepng_malloc(length + 1); + if(!langtag) CERROR_BREAK(error, 83); /*alloc fail*/ + + lodepng_memcpy(langtag, data + begin, length); + langtag[length] = 0; + + /*read the transkey*/ + begin += length + 1; + length = 0; + for(i = begin; i < chunkLength && data[i] != 0; ++i) ++length; + + transkey = (char*)lodepng_malloc(length + 1); + if(!transkey) CERROR_BREAK(error, 83); /*alloc fail*/ + + lodepng_memcpy(transkey, data + begin, length); + transkey[length] = 0; + + /*read the actual text*/ + begin += length + 1; + + length = (unsigned)chunkLength < begin ? 0 : (unsigned)chunkLength - begin; + + if(compressed) { + unsigned char* str = 0; + size_t size = 0; + zlibsettings.max_output_size = decoder->max_text_size; + /*will fail if zlib error, e.g. if length is too small*/ + error = zlib_decompress(&str, &size, 0, &data[begin], + length, &zlibsettings); + /*error: compressed text larger than decoder->max_text_size*/ + if(error && size > zlibsettings.max_output_size) error = 112; + if(!error) error = lodepng_add_itext_sized(info, key, langtag, transkey, (const char*)str, size); + lodepng_free(str); + } else { + error = lodepng_add_itext_sized(info, key, langtag, transkey, (const char*)(data + begin), length); + } + + break; + } + + lodepng_free(key); + lodepng_free(langtag); + lodepng_free(transkey); + + return error; +} + +static unsigned readChunk_tIME(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + if(chunkLength != 7) return 73; /*invalid tIME chunk size*/ + + info->time_defined = 1; + info->time.year = 256u * data[0] + data[1]; + info->time.month = data[2]; + info->time.day = data[3]; + info->time.hour = data[4]; + info->time.minute = data[5]; + info->time.second = data[6]; + + return 0; /* OK */ +} + +static unsigned readChunk_pHYs(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + if(chunkLength != 9) return 74; /*invalid pHYs chunk size*/ + + info->phys_defined = 1; + info->phys_x = 16777216u * data[0] + 65536u * data[1] + 256u * data[2] + data[3]; + info->phys_y = 16777216u * data[4] + 65536u * data[5] + 256u * data[6] + data[7]; + info->phys_unit = data[8]; + + return 0; /* OK */ +} + +static unsigned readChunk_gAMA(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + if(chunkLength != 4) return 96; /*invalid gAMA chunk size*/ + + info->gama_defined = 1; + info->gama_gamma = 16777216u * data[0] + 65536u * data[1] + 256u * data[2] + data[3]; + + return 0; /* OK */ +} + +static unsigned readChunk_cHRM(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + if(chunkLength != 32) return 97; /*invalid cHRM chunk size*/ + + info->chrm_defined = 1; + info->chrm_white_x = 16777216u * data[ 0] + 65536u * data[ 1] + 256u * data[ 2] + data[ 3]; + info->chrm_white_y = 16777216u * data[ 4] + 65536u * data[ 5] + 256u * data[ 6] + data[ 7]; + info->chrm_red_x = 16777216u * data[ 8] + 65536u * data[ 9] + 256u * data[10] + data[11]; + info->chrm_red_y = 16777216u * data[12] + 65536u * data[13] + 256u * data[14] + data[15]; + info->chrm_green_x = 16777216u * data[16] + 65536u * data[17] + 256u * data[18] + data[19]; + info->chrm_green_y = 16777216u * data[20] + 65536u * data[21] + 256u * data[22] + data[23]; + info->chrm_blue_x = 16777216u * data[24] + 65536u * data[25] + 256u * data[26] + data[27]; + info->chrm_blue_y = 16777216u * data[28] + 65536u * data[29] + 256u * data[30] + data[31]; + + return 0; /* OK */ +} + +static unsigned readChunk_sRGB(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) { + if(chunkLength != 1) return 98; /*invalid sRGB chunk size (this one is never ignored)*/ + + info->srgb_defined = 1; + info->srgb_intent = data[0]; + + return 0; /* OK */ +} + +static unsigned readChunk_iCCP(LodePNGInfo* info, const LodePNGDecoderSettings* decoder, + const unsigned char* data, size_t chunkLength) { + unsigned error = 0; + unsigned i; + size_t size = 0; + /*copy the object to change parameters in it*/ + LodePNGDecompressSettings zlibsettings = decoder->zlibsettings; + + unsigned length, string2_begin; + + info->iccp_defined = 1; + if(info->iccp_name) lodepng_clear_icc(info); + + for(length = 0; length < chunkLength && data[length] != 0; ++length) ; + if(length + 2 >= chunkLength) return 75; /*no null termination, corrupt?*/ + if(length < 1 || length > 79) return 89; /*keyword too short or long*/ + + info->iccp_name = (char*)lodepng_malloc(length + 1); + if(!info->iccp_name) return 83; /*alloc fail*/ + + info->iccp_name[length] = 0; + for(i = 0; i != length; ++i) info->iccp_name[i] = (char)data[i]; + + if(data[length + 1] != 0) return 72; /*the 0 byte indicating compression must be 0*/ + + string2_begin = length + 2; + if(string2_begin > chunkLength) return 75; /*no null termination, corrupt?*/ + + length = (unsigned)chunkLength - string2_begin; + zlibsettings.max_output_size = decoder->max_icc_size; + error = zlib_decompress(&info->iccp_profile, &size, 0, + &data[string2_begin], + length, &zlibsettings); + /*error: ICC profile larger than decoder->max_icc_size*/ + if(error && size > zlibsettings.max_output_size) error = 113; + info->iccp_profile_size = size; + if(!error && !info->iccp_profile_size) error = 100; /*invalid ICC profile size*/ + return error; +} +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +unsigned lodepng_inspect_chunk(LodePNGState* state, size_t pos, + const unsigned char* in, size_t insize) { + const unsigned char* chunk = in + pos; + unsigned chunkLength; + const unsigned char* data; + unsigned unhandled = 0; + unsigned error = 0; + + if(pos + 4 > insize) return 30; + chunkLength = lodepng_chunk_length(chunk); + if(chunkLength > 2147483647) return 63; + data = lodepng_chunk_data_const(chunk); + if(data + chunkLength + 4 > in + insize) return 30; + + if(lodepng_chunk_type_equals(chunk, "PLTE")) { + error = readChunk_PLTE(&state->info_png.color, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "tRNS")) { + error = readChunk_tRNS(&state->info_png.color, data, chunkLength); +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + } else if(lodepng_chunk_type_equals(chunk, "bKGD")) { + error = readChunk_bKGD(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "tEXt")) { + error = readChunk_tEXt(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "zTXt")) { + error = readChunk_zTXt(&state->info_png, &state->decoder, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "iTXt")) { + error = readChunk_iTXt(&state->info_png, &state->decoder, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "tIME")) { + error = readChunk_tIME(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "pHYs")) { + error = readChunk_pHYs(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "gAMA")) { + error = readChunk_gAMA(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "cHRM")) { + error = readChunk_cHRM(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "sRGB")) { + error = readChunk_sRGB(&state->info_png, data, chunkLength); + } else if(lodepng_chunk_type_equals(chunk, "iCCP")) { + error = readChunk_iCCP(&state->info_png, &state->decoder, data, chunkLength); +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + } else { + /* unhandled chunk is ok (is not an error) */ + unhandled = 1; + } + + if(!error && !unhandled && !state->decoder.ignore_crc) { + if(lodepng_chunk_check_crc(chunk)) return 57; /*invalid CRC*/ + } + + return error; +} + +/*read a PNG, the result will be in the same color type as the PNG (hence "generic")*/ +static void decodeGeneric(unsigned char** out, unsigned* w, unsigned* h, + LodePNGState* state, + const unsigned char* in, size_t insize) { + unsigned char IEND = 0; + const unsigned char* chunk; + unsigned char* idat; /*the data from idat chunks, zlib compressed*/ + size_t idatsize = 0; + unsigned char* scanlines = 0; + size_t scanlines_size = 0, expected_size = 0; + size_t outsize = 0; + + /*for unknown chunk order*/ + unsigned unknown = 0; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + unsigned critical_pos = 1; /*1 = after IHDR, 2 = after PLTE, 3 = after IDAT*/ +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + + + /* safe output values in case error happens */ + *out = 0; + *w = *h = 0; + + state->error = lodepng_inspect(w, h, state, in, insize); /*reads header and resets other parameters in state->info_png*/ + if(state->error) return; + + if(lodepng_pixel_overflow(*w, *h, &state->info_png.color, &state->info_raw)) { + CERROR_RETURN(state->error, 92); /*overflow possible due to amount of pixels*/ + } + + /*the input filesize is a safe upper bound for the sum of idat chunks size*/ + idat = (unsigned char*)lodepng_malloc(insize); + if(!idat) CERROR_RETURN(state->error, 83); /*alloc fail*/ + + chunk = &in[33]; /*first byte of the first chunk after the header*/ + + /*loop through the chunks, ignoring unknown chunks and stopping at IEND chunk. + IDAT data is put at the start of the in buffer*/ + while(!IEND && !state->error) { + unsigned chunkLength; + const unsigned char* data; /*the data in the chunk*/ + + /*error: size of the in buffer too small to contain next chunk*/ + if((size_t)((chunk - in) + 12) > insize || chunk < in) { + if(state->decoder.ignore_end) break; /*other errors may still happen though*/ + CERROR_BREAK(state->error, 30); + } + + /*length of the data of the chunk, excluding the length bytes, chunk type and CRC bytes*/ + chunkLength = lodepng_chunk_length(chunk); + /*error: chunk length larger than the max PNG chunk size*/ + if(chunkLength > 2147483647) { + if(state->decoder.ignore_end) break; /*other errors may still happen though*/ + CERROR_BREAK(state->error, 63); + } + + if((size_t)((chunk - in) + chunkLength + 12) > insize || (chunk + chunkLength + 12) < in) { + CERROR_BREAK(state->error, 64); /*error: size of the in buffer too small to contain next chunk*/ + } + + data = lodepng_chunk_data_const(chunk); + + unknown = 0; + + /*IDAT chunk, containing compressed image data*/ + if(lodepng_chunk_type_equals(chunk, "IDAT")) { + size_t newsize; + if(lodepng_addofl(idatsize, chunkLength, &newsize)) CERROR_BREAK(state->error, 95); + if(newsize > insize) CERROR_BREAK(state->error, 95); + lodepng_memcpy(idat + idatsize, data, chunkLength); + idatsize += chunkLength; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + critical_pos = 3; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + } else if(lodepng_chunk_type_equals(chunk, "IEND")) { + /*IEND chunk*/ + IEND = 1; + } else if(lodepng_chunk_type_equals(chunk, "PLTE")) { + /*palette chunk (PLTE)*/ + state->error = readChunk_PLTE(&state->info_png.color, data, chunkLength); + if(state->error) break; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + critical_pos = 2; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + } else if(lodepng_chunk_type_equals(chunk, "tRNS")) { + /*palette transparency chunk (tRNS). Even though this one is an ancillary chunk , it is still compiled + in without 'LODEPNG_COMPILE_ANCILLARY_CHUNKS' because it contains essential color information that + affects the alpha channel of pixels. */ + state->error = readChunk_tRNS(&state->info_png.color, data, chunkLength); + if(state->error) break; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*background color chunk (bKGD)*/ + } else if(lodepng_chunk_type_equals(chunk, "bKGD")) { + state->error = readChunk_bKGD(&state->info_png, data, chunkLength); + if(state->error) break; + } else if(lodepng_chunk_type_equals(chunk, "tEXt")) { + /*text chunk (tEXt)*/ + if(state->decoder.read_text_chunks) { + state->error = readChunk_tEXt(&state->info_png, data, chunkLength); + if(state->error) break; + } + } else if(lodepng_chunk_type_equals(chunk, "zTXt")) { + /*compressed text chunk (zTXt)*/ + if(state->decoder.read_text_chunks) { + state->error = readChunk_zTXt(&state->info_png, &state->decoder, data, chunkLength); + if(state->error) break; + } + } else if(lodepng_chunk_type_equals(chunk, "iTXt")) { + /*international text chunk (iTXt)*/ + if(state->decoder.read_text_chunks) { + state->error = readChunk_iTXt(&state->info_png, &state->decoder, data, chunkLength); + if(state->error) break; + } + } else if(lodepng_chunk_type_equals(chunk, "tIME")) { + state->error = readChunk_tIME(&state->info_png, data, chunkLength); + if(state->error) break; + } else if(lodepng_chunk_type_equals(chunk, "pHYs")) { + state->error = readChunk_pHYs(&state->info_png, data, chunkLength); + if(state->error) break; + } else if(lodepng_chunk_type_equals(chunk, "gAMA")) { + state->error = readChunk_gAMA(&state->info_png, data, chunkLength); + if(state->error) break; + } else if(lodepng_chunk_type_equals(chunk, "cHRM")) { + state->error = readChunk_cHRM(&state->info_png, data, chunkLength); + if(state->error) break; + } else if(lodepng_chunk_type_equals(chunk, "sRGB")) { + state->error = readChunk_sRGB(&state->info_png, data, chunkLength); + if(state->error) break; + } else if(lodepng_chunk_type_equals(chunk, "iCCP")) { + state->error = readChunk_iCCP(&state->info_png, &state->decoder, data, chunkLength); + if(state->error) break; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + } else /*it's not an implemented chunk type, so ignore it: skip over the data*/ { + /*error: unknown critical chunk (5th bit of first byte of chunk type is 0)*/ + if(!state->decoder.ignore_critical && !lodepng_chunk_ancillary(chunk)) { + CERROR_BREAK(state->error, 69); + } + + unknown = 1; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + if(state->decoder.remember_unknown_chunks) { + state->error = lodepng_chunk_append(&state->info_png.unknown_chunks_data[critical_pos - 1], + &state->info_png.unknown_chunks_size[critical_pos - 1], chunk); + if(state->error) break; + } +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + } + + if(!state->decoder.ignore_crc && !unknown) /*check CRC if wanted, only on known chunk types*/ { + if(lodepng_chunk_check_crc(chunk)) CERROR_BREAK(state->error, 57); /*invalid CRC*/ + } + + if(!IEND) chunk = lodepng_chunk_next_const(chunk, in + insize); + } + + if(!state->error && state->info_png.color.colortype == LCT_PALETTE && !state->info_png.color.palette) { + state->error = 106; /* error: PNG file must have PLTE chunk if color type is palette */ + } + + if(!state->error) { + /*predict output size, to allocate exact size for output buffer to avoid more dynamic allocation. + If the decompressed size does not match the prediction, the image must be corrupt.*/ + if(state->info_png.interlace_method == 0) { + size_t bpp = lodepng_get_bpp(&state->info_png.color); + expected_size = lodepng_get_raw_size_idat(*w, *h, bpp); + } else { + size_t bpp = lodepng_get_bpp(&state->info_png.color); + /*Adam-7 interlaced: expected size is the sum of the 7 sub-images sizes*/ + expected_size = 0; + expected_size += lodepng_get_raw_size_idat((*w + 7) >> 3, (*h + 7) >> 3, bpp); + if(*w > 4) expected_size += lodepng_get_raw_size_idat((*w + 3) >> 3, (*h + 7) >> 3, bpp); + expected_size += lodepng_get_raw_size_idat((*w + 3) >> 2, (*h + 3) >> 3, bpp); + if(*w > 2) expected_size += lodepng_get_raw_size_idat((*w + 1) >> 2, (*h + 3) >> 2, bpp); + expected_size += lodepng_get_raw_size_idat((*w + 1) >> 1, (*h + 1) >> 2, bpp); + if(*w > 1) expected_size += lodepng_get_raw_size_idat((*w + 0) >> 1, (*h + 1) >> 1, bpp); + expected_size += lodepng_get_raw_size_idat((*w + 0), (*h + 0) >> 1, bpp); + } + + state->error = zlib_decompress(&scanlines, &scanlines_size, expected_size, idat, idatsize, &state->decoder.zlibsettings); + } + if(!state->error && scanlines_size != expected_size) state->error = 91; /*decompressed size doesn't match prediction*/ + lodepng_free(idat); + + if(!state->error) { + outsize = lodepng_get_raw_size(*w, *h, &state->info_png.color); + *out = (unsigned char*)lodepng_malloc(outsize); + if(!*out) state->error = 83; /*alloc fail*/ + } + if(!state->error) { + lodepng_memset(*out, 0, outsize); + state->error = postProcessScanlines(*out, scanlines, *w, *h, &state->info_png); + } + lodepng_free(scanlines); +} + +unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h, + LodePNGState* state, + const unsigned char* in, size_t insize) { + *out = 0; + decodeGeneric(out, w, h, state, in, insize); + if(state->error) return state->error; + if(!state->decoder.color_convert || lodepng_color_mode_equal(&state->info_raw, &state->info_png.color)) { + /*same color type, no copying or converting of data needed*/ + /*store the info_png color settings on the info_raw so that the info_raw still reflects what colortype + the raw image has to the end user*/ + if(!state->decoder.color_convert) { + state->error = lodepng_color_mode_copy(&state->info_raw, &state->info_png.color); + if(state->error) return state->error; + } + } else { /*color conversion needed*/ + unsigned char* data = *out; + size_t outsize; + + /*TODO: check if this works according to the statement in the documentation: "The converter can convert + from grayscale input color type, to 8-bit grayscale or grayscale with alpha"*/ + if(!(state->info_raw.colortype == LCT_RGB || state->info_raw.colortype == LCT_RGBA) + && !(state->info_raw.bitdepth == 8)) { + return 56; /*unsupported color mode conversion*/ + } + + outsize = lodepng_get_raw_size(*w, *h, &state->info_raw); + *out = (unsigned char*)lodepng_malloc(outsize); + if(!(*out)) { + state->error = 83; /*alloc fail*/ + } + else state->error = lodepng_convert(*out, data, &state->info_raw, + &state->info_png.color, *w, *h); + lodepng_free(data); + } + return state->error; +} + +unsigned lodepng_decode_memory(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, + size_t insize, LodePNGColorType colortype, unsigned bitdepth) { + unsigned error; + LodePNGState state; + lodepng_state_init(&state); + state.info_raw.colortype = colortype; + state.info_raw.bitdepth = bitdepth; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*disable reading things that this function doesn't output*/ + state.decoder.read_text_chunks = 0; + state.decoder.remember_unknown_chunks = 0; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + error = lodepng_decode(out, w, h, &state, in, insize); + lodepng_state_cleanup(&state); + return error; +} + +unsigned lodepng_decode32(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize) { + return lodepng_decode_memory(out, w, h, in, insize, LCT_RGBA, 8); +} + +unsigned lodepng_decode24(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize) { + return lodepng_decode_memory(out, w, h, in, insize, LCT_RGB, 8); +} + +#ifdef LODEPNG_COMPILE_DISK +unsigned lodepng_decode_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename, + LodePNGColorType colortype, unsigned bitdepth) { + unsigned char* buffer = 0; + size_t buffersize; + unsigned error; + /* safe output values in case error happens */ + *out = 0; + *w = *h = 0; + error = lodepng_load_file(&buffer, &buffersize, filename); + if(!error) error = lodepng_decode_memory(out, w, h, buffer, buffersize, colortype, bitdepth); + lodepng_free(buffer); + return error; +} + +unsigned lodepng_decode32_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename) { + return lodepng_decode_file(out, w, h, filename, LCT_RGBA, 8); +} + +unsigned lodepng_decode24_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename) { + return lodepng_decode_file(out, w, h, filename, LCT_RGB, 8); +} +#endif /*LODEPNG_COMPILE_DISK*/ + +void lodepng_decoder_settings_init(LodePNGDecoderSettings* settings) { + settings->color_convert = 1; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + settings->read_text_chunks = 1; + settings->remember_unknown_chunks = 0; + settings->max_text_size = 16777216; + settings->max_icc_size = 16777216; /* 16MB is much more than enough for any reasonable ICC profile */ +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + settings->ignore_crc = 0; + settings->ignore_critical = 0; + settings->ignore_end = 0; + lodepng_decompress_settings_init(&settings->zlibsettings); +} + +#endif /*LODEPNG_COMPILE_DECODER*/ + +#if defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) + +void lodepng_state_init(LodePNGState* state) { +#ifdef LODEPNG_COMPILE_DECODER + lodepng_decoder_settings_init(&state->decoder); +#endif /*LODEPNG_COMPILE_DECODER*/ +#ifdef LODEPNG_COMPILE_ENCODER + lodepng_encoder_settings_init(&state->encoder); +#endif /*LODEPNG_COMPILE_ENCODER*/ + lodepng_color_mode_init(&state->info_raw); + lodepng_info_init(&state->info_png); + state->error = 1; +} + +void lodepng_state_cleanup(LodePNGState* state) { + lodepng_color_mode_cleanup(&state->info_raw); + lodepng_info_cleanup(&state->info_png); +} + +void lodepng_state_copy(LodePNGState* dest, const LodePNGState* source) { + lodepng_state_cleanup(dest); + *dest = *source; + lodepng_color_mode_init(&dest->info_raw); + lodepng_info_init(&dest->info_png); + dest->error = lodepng_color_mode_copy(&dest->info_raw, &source->info_raw); if(dest->error) return; + dest->error = lodepng_info_copy(&dest->info_png, &source->info_png); if(dest->error) return; +} + +#endif /* defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) */ + +#ifdef LODEPNG_COMPILE_ENCODER + +/* ////////////////////////////////////////////////////////////////////////// */ +/* / PNG Encoder / */ +/* ////////////////////////////////////////////////////////////////////////// */ + + +static unsigned writeSignature(ucvector* out) { + size_t pos = out->size; + const unsigned char signature[] = {137, 80, 78, 71, 13, 10, 26, 10}; + /*8 bytes PNG signature, aka the magic bytes*/ + if(!ucvector_resize(out, out->size + 8)) return 83; /*alloc fail*/ + lodepng_memcpy(out->data + pos, signature, 8); + return 0; +} + +static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) { + unsigned char *chunk, *data; + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 13, "IHDR")); + data = chunk + 8; + + lodepng_set32bitInt(data + 0, w); /*width*/ + lodepng_set32bitInt(data + 4, h); /*height*/ + data[8] = (unsigned char)bitdepth; /*bit depth*/ + data[9] = (unsigned char)colortype; /*color type*/ + data[10] = 0; /*compression method*/ + data[11] = 0; /*filter method*/ + data[12] = interlace_method; /*interlace method*/ + + lodepng_chunk_generate_crc(chunk); + return 0; +} + +/* only adds the chunk if needed (there is a key or palette with alpha) */ +static unsigned addChunk_PLTE(ucvector* out, const LodePNGColorMode* info) { + unsigned char* chunk; + size_t i, j = 8; + + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, info->palettesize * 3, "PLTE")); + + for(i = 0; i != info->palettesize; ++i) { + /*add all channels except alpha channel*/ + chunk[j++] = info->palette[i * 4 + 0]; + chunk[j++] = info->palette[i * 4 + 1]; + chunk[j++] = info->palette[i * 4 + 2]; + } + + lodepng_chunk_generate_crc(chunk); + return 0; +} + +static unsigned addChunk_tRNS(ucvector* out, const LodePNGColorMode* info) { + unsigned char* chunk = 0; + + if(info->colortype == LCT_PALETTE) { + size_t i, amount = info->palettesize; + /*the tail of palette values that all have 255 as alpha, does not have to be encoded*/ + for(i = info->palettesize; i != 0; --i) { + if(info->palette[4 * (i - 1) + 3] != 255) break; + --amount; + } + if(amount) { + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, amount, "tRNS")); + /*add the alpha channel values from the palette*/ + for(i = 0; i != amount; ++i) chunk[8 + i] = info->palette[4 * i + 3]; + } + } else if(info->colortype == LCT_GREY) { + if(info->key_defined) { + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 2, "tRNS")); + chunk[8] = (unsigned char)(info->key_r >> 8); + chunk[9] = (unsigned char)(info->key_r & 255); + } + } else if(info->colortype == LCT_RGB) { + if(info->key_defined) { + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 6, "tRNS")); + chunk[8] = (unsigned char)(info->key_r >> 8); + chunk[9] = (unsigned char)(info->key_r & 255); + chunk[10] = (unsigned char)(info->key_g >> 8); + chunk[11] = (unsigned char)(info->key_g & 255); + chunk[12] = (unsigned char)(info->key_b >> 8); + chunk[13] = (unsigned char)(info->key_b & 255); + } + } + + if(chunk) lodepng_chunk_generate_crc(chunk); + return 0; +} + +static unsigned addChunk_IDAT(ucvector* out, const unsigned char* data, size_t datasize, + LodePNGCompressSettings* zlibsettings) { + unsigned error = 0; + unsigned char* zlib = 0; + size_t zlibsize = 0; + + error = zlib_compress(&zlib, &zlibsize, data, datasize, zlibsettings); + if(!error) { + error = lodepng_chunk_createv(out, zlibsize, "IDAT", zlib); + } + lodepng_free(zlib); + return error; +} + +static unsigned addChunk_IEND(ucvector* out) { + return lodepng_chunk_createv(out, 0, "IEND", 0); +} + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + +static unsigned addChunk_tEXt(ucvector* out, const char* keyword, const char* textstring) { + unsigned char* chunk = 0; + size_t keysize = lodepng_strlen(keyword), textsize = lodepng_strlen(textstring); + size_t size = keysize + 1 + textsize; + if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/ + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, size, "tEXt")); + lodepng_memcpy(chunk + 8, keyword, keysize); + chunk[8 + keysize] = 0; /*null termination char*/ + lodepng_memcpy(chunk + 9 + keysize, textstring, textsize); + lodepng_chunk_generate_crc(chunk); + return 0; +} + +static unsigned addChunk_zTXt(ucvector* out, const char* keyword, const char* textstring, + LodePNGCompressSettings* zlibsettings) { + unsigned error = 0; + unsigned char* chunk = 0; + unsigned char* compressed = 0; + size_t compressedsize = 0; + size_t textsize = lodepng_strlen(textstring); + size_t keysize = lodepng_strlen(keyword); + if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/ + + error = zlib_compress(&compressed, &compressedsize, + (const unsigned char*)textstring, textsize, zlibsettings); + if(!error) { + size_t size = keysize + 2 + compressedsize; + error = lodepng_chunk_init(&chunk, out, size, "zTXt"); + } + if(!error) { + lodepng_memcpy(chunk + 8, keyword, keysize); + chunk[8 + keysize] = 0; /*null termination char*/ + chunk[9 + keysize] = 0; /*compression method: 0*/ + lodepng_memcpy(chunk + 10 + keysize, compressed, compressedsize); + lodepng_chunk_generate_crc(chunk); + } + + lodepng_free(compressed); + return error; +} + +static unsigned addChunk_iTXt(ucvector* out, unsigned compress, const char* keyword, const char* langtag, + const char* transkey, const char* textstring, LodePNGCompressSettings* zlibsettings) { + unsigned error = 0; + unsigned char* chunk = 0; + unsigned char* compressed = 0; + size_t compressedsize = 0; + size_t textsize = lodepng_strlen(textstring); + size_t keysize = lodepng_strlen(keyword), langsize = lodepng_strlen(langtag), transsize = lodepng_strlen(transkey); + + if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/ + + if(compress) { + error = zlib_compress(&compressed, &compressedsize, + (const unsigned char*)textstring, textsize, zlibsettings); + } + if(!error) { + size_t size = keysize + 3 + langsize + 1 + transsize + 1 + (compress ? compressedsize : textsize); + error = lodepng_chunk_init(&chunk, out, size, "iTXt"); + } + if(!error) { + size_t pos = 8; + lodepng_memcpy(chunk + pos, keyword, keysize); + pos += keysize; + chunk[pos++] = 0; /*null termination char*/ + chunk[pos++] = (compress ? 1 : 0); /*compression flag*/ + chunk[pos++] = 0; /*compression method: 0*/ + lodepng_memcpy(chunk + pos, langtag, langsize); + pos += langsize; + chunk[pos++] = 0; /*null termination char*/ + lodepng_memcpy(chunk + pos, transkey, transsize); + pos += transsize; + chunk[pos++] = 0; /*null termination char*/ + if(compress) { + lodepng_memcpy(chunk + pos, compressed, compressedsize); + } else { + lodepng_memcpy(chunk + pos, textstring, textsize); + } + lodepng_chunk_generate_crc(chunk); + } + + lodepng_free(compressed); + return error; +} + +static unsigned addChunk_bKGD(ucvector* out, const LodePNGInfo* info) { + unsigned char* chunk = 0; + if(info->color.colortype == LCT_GREY || info->color.colortype == LCT_GREY_ALPHA) { + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 2, "bKGD")); + chunk[8] = (unsigned char)(info->background_r >> 8); + chunk[9] = (unsigned char)(info->background_r & 255); + } else if(info->color.colortype == LCT_RGB || info->color.colortype == LCT_RGBA) { + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 6, "bKGD")); + chunk[8] = (unsigned char)(info->background_r >> 8); + chunk[9] = (unsigned char)(info->background_r & 255); + chunk[10] = (unsigned char)(info->background_g >> 8); + chunk[11] = (unsigned char)(info->background_g & 255); + chunk[12] = (unsigned char)(info->background_b >> 8); + chunk[13] = (unsigned char)(info->background_b & 255); + } else if(info->color.colortype == LCT_PALETTE) { + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 1, "bKGD")); + chunk[8] = (unsigned char)(info->background_r & 255); /*palette index*/ + } + if(chunk) lodepng_chunk_generate_crc(chunk); + return 0; +} + +static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time) { + unsigned char* chunk; + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 7, "tIME")); + chunk[8] = (unsigned char)(time->year >> 8); + chunk[9] = (unsigned char)(time->year & 255); + chunk[10] = (unsigned char)time->month; + chunk[11] = (unsigned char)time->day; + chunk[12] = (unsigned char)time->hour; + chunk[13] = (unsigned char)time->minute; + chunk[14] = (unsigned char)time->second; + lodepng_chunk_generate_crc(chunk); + return 0; +} + +static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info) { + unsigned char* chunk; + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 9, "pHYs")); + lodepng_set32bitInt(chunk + 8, info->phys_x); + lodepng_set32bitInt(chunk + 12, info->phys_y); + chunk[16] = info->phys_unit; + lodepng_chunk_generate_crc(chunk); + return 0; +} + +static unsigned addChunk_gAMA(ucvector* out, const LodePNGInfo* info) { + unsigned char* chunk; + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 4, "gAMA")); + lodepng_set32bitInt(chunk + 8, info->gama_gamma); + lodepng_chunk_generate_crc(chunk); + return 0; +} + +static unsigned addChunk_cHRM(ucvector* out, const LodePNGInfo* info) { + unsigned char* chunk; + CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 32, "cHRM")); + lodepng_set32bitInt(chunk + 8, info->chrm_white_x); + lodepng_set32bitInt(chunk + 12, info->chrm_white_y); + lodepng_set32bitInt(chunk + 16, info->chrm_red_x); + lodepng_set32bitInt(chunk + 20, info->chrm_red_y); + lodepng_set32bitInt(chunk + 24, info->chrm_green_x); + lodepng_set32bitInt(chunk + 28, info->chrm_green_y); + lodepng_set32bitInt(chunk + 32, info->chrm_blue_x); + lodepng_set32bitInt(chunk + 36, info->chrm_blue_y); + lodepng_chunk_generate_crc(chunk); + return 0; +} + +static unsigned addChunk_sRGB(ucvector* out, const LodePNGInfo* info) { + unsigned char data = info->srgb_intent; + return lodepng_chunk_createv(out, 1, "sRGB", &data); +} + +static unsigned addChunk_iCCP(ucvector* out, const LodePNGInfo* info, LodePNGCompressSettings* zlibsettings) { + unsigned error = 0; + unsigned char* chunk = 0; + unsigned char* compressed = 0; + size_t compressedsize = 0; + size_t keysize = lodepng_strlen(info->iccp_name); + + if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/ + error = zlib_compress(&compressed, &compressedsize, + info->iccp_profile, info->iccp_profile_size, zlibsettings); + if(!error) { + size_t size = keysize + 2 + compressedsize; + error = lodepng_chunk_init(&chunk, out, size, "iCCP"); + } + if(!error) { + lodepng_memcpy(chunk + 8, info->iccp_name, keysize); + chunk[8 + keysize] = 0; /*null termination char*/ + chunk[9 + keysize] = 0; /*compression method: 0*/ + lodepng_memcpy(chunk + 10 + keysize, compressed, compressedsize); + lodepng_chunk_generate_crc(chunk); + } + + lodepng_free(compressed); + return error; +} + +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +static void filterScanline(unsigned char* out, const unsigned char* scanline, const unsigned char* prevline, + size_t length, size_t bytewidth, unsigned char filterType) { + size_t i; + switch(filterType) { + case 0: /*None*/ + for(i = 0; i != length; ++i) out[i] = scanline[i]; + break; + case 1: /*Sub*/ + for(i = 0; i != bytewidth; ++i) out[i] = scanline[i]; + for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - scanline[i - bytewidth]; + break; + case 2: /*Up*/ + if(prevline) { + for(i = 0; i != length; ++i) out[i] = scanline[i] - prevline[i]; + } else { + for(i = 0; i != length; ++i) out[i] = scanline[i]; + } + break; + case 3: /*Average*/ + if(prevline) { + for(i = 0; i != bytewidth; ++i) out[i] = scanline[i] - (prevline[i] >> 1); + for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - ((scanline[i - bytewidth] + prevline[i]) >> 1); + } else { + for(i = 0; i != bytewidth; ++i) out[i] = scanline[i]; + for(i = bytewidth; i < length; ++i) out[i] = scanline[i] - (scanline[i - bytewidth] >> 1); + } + break; + case 4: /*Paeth*/ + if(prevline) { + /*paethPredictor(0, prevline[i], 0) is always prevline[i]*/ + for(i = 0; i != bytewidth; ++i) out[i] = (scanline[i] - prevline[i]); + for(i = bytewidth; i < length; ++i) { + out[i] = (scanline[i] - paethPredictor(scanline[i - bytewidth], prevline[i], prevline[i - bytewidth])); + } + } else { + for(i = 0; i != bytewidth; ++i) out[i] = scanline[i]; + /*paethPredictor(scanline[i - bytewidth], 0, 0) is always scanline[i - bytewidth]*/ + for(i = bytewidth; i < length; ++i) out[i] = (scanline[i] - scanline[i - bytewidth]); + } + break; + default: return; /*invalid filter type given*/ + } +} + +/* integer binary logarithm, max return value is 31 */ +static size_t ilog2(size_t i) { + size_t result = 0; + if(i >= 65536) { result += 16; i >>= 16; } + if(i >= 256) { result += 8; i >>= 8; } + if(i >= 16) { result += 4; i >>= 4; } + if(i >= 4) { result += 2; i >>= 2; } + if(i >= 2) { result += 1; /*i >>= 1;*/ } + return result; +} + +/* integer approximation for i * log2(i), helper function for LFS_ENTROPY */ +static size_t ilog2i(size_t i) { + size_t l; + if(i == 0) return 0; + l = ilog2(i); + /* approximate i*log2(i): l is integer logarithm, ((i - (1u << l)) << 1u) + linearly approximates the missing fractional part multiplied by i */ + return i * l + ((i - (1u << l)) << 1u); +} + +static unsigned filter(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, + const LodePNGColorMode* color, const LodePNGEncoderSettings* settings) { + /* + For PNG filter method 0 + out must be a buffer with as size: h + (w * h * bpp + 7u) / 8u, because there are + the scanlines with 1 extra byte per scanline + */ + + unsigned bpp = lodepng_get_bpp(color); + /*the width of a scanline in bytes, not including the filter type*/ + size_t linebytes = lodepng_get_raw_size_idat(w, 1, bpp) - 1u; + + /*bytewidth is used for filtering, is 1 when bpp < 8, number of bytes per pixel otherwise*/ + size_t bytewidth = (bpp + 7u) / 8u; + const unsigned char* prevline = 0; + unsigned x, y; + unsigned error = 0; + LodePNGFilterStrategy strategy = settings->filter_strategy; + + /* + There is a heuristic called the minimum sum of absolute differences heuristic, suggested by the PNG standard: + * If the image type is Palette, or the bit depth is smaller than 8, then do not filter the image (i.e. + use fixed filtering, with the filter None). + * (The other case) If the image type is Grayscale or RGB (with or without Alpha), and the bit depth is + not smaller than 8, then use adaptive filtering heuristic as follows: independently for each row, apply + all five filters and select the filter that produces the smallest sum of absolute values per row. + This heuristic is used if filter strategy is LFS_MINSUM and filter_palette_zero is true. + + If filter_palette_zero is true and filter_strategy is not LFS_MINSUM, the above heuristic is followed, + but for "the other case", whatever strategy filter_strategy is set to instead of the minimum sum + heuristic is used. + */ + if(settings->filter_palette_zero && + (color->colortype == LCT_PALETTE || color->bitdepth < 8)) strategy = LFS_ZERO; + + if(bpp == 0) return 31; /*error: invalid color type*/ + + if(strategy >= LFS_ZERO && strategy <= LFS_FOUR) { + unsigned char type = (unsigned char)strategy; + for(y = 0; y != h; ++y) { + size_t outindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/ + size_t inindex = linebytes * y; + out[outindex] = type; /*filter type byte*/ + filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, type); + prevline = &in[inindex]; + } + } else if(strategy == LFS_MINSUM) { + /*adaptive filtering*/ + unsigned char* attempt[5]; /*five filtering attempts, one for each filter type*/ + size_t smallest = 0; + unsigned char type, bestType = 0; + + for(type = 0; type != 5; ++type) { + attempt[type] = (unsigned char*)lodepng_malloc(linebytes); + if(!attempt[type]) error = 83; /*alloc fail*/ + } + + if(!error) { + for(y = 0; y != h; ++y) { + /*try the 5 filter types*/ + for(type = 0; type != 5; ++type) { + size_t sum = 0; + filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); + + /*calculate the sum of the result*/ + if(type == 0) { + for(x = 0; x != linebytes; ++x) sum += (unsigned char)(attempt[type][x]); + } else { + for(x = 0; x != linebytes; ++x) { + /*For differences, each byte should be treated as signed, values above 127 are negative + (converted to signed char). Filtertype 0 isn't a difference though, so use unsigned there. + This means filtertype 0 is almost never chosen, but that is justified.*/ + unsigned char s = attempt[type][x]; + sum += s < 128 ? s : (255U - s); + } + } + + /*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/ + if(type == 0 || sum < smallest) { + bestType = type; + smallest = sum; + } + } + + prevline = &in[y * linebytes]; + + /*now fill the out values*/ + out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/ + for(x = 0; x != linebytes; ++x) out[y * (linebytes + 1) + 1 + x] = attempt[bestType][x]; + } + } + + for(type = 0; type != 5; ++type) lodepng_free(attempt[type]); + } else if(strategy == LFS_ENTROPY) { + unsigned char* attempt[5]; /*five filtering attempts, one for each filter type*/ + size_t bestSum = 0; + unsigned type, bestType = 0; + unsigned count[256]; + + for(type = 0; type != 5; ++type) { + attempt[type] = (unsigned char*)lodepng_malloc(linebytes); + if(!attempt[type]) error = 83; /*alloc fail*/ + } + + if(!error) { + for(y = 0; y != h; ++y) { + /*try the 5 filter types*/ + for(type = 0; type != 5; ++type) { + size_t sum = 0; + filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); + lodepng_memset(count, 0, 256 * sizeof(*count)); + for(x = 0; x != linebytes; ++x) ++count[attempt[type][x]]; + ++count[type]; /*the filter type itself is part of the scanline*/ + for(x = 0; x != 256; ++x) { + sum += ilog2i(count[x]); + } + /*check if this is smallest sum (or if type == 0 it's the first case so always store the values)*/ + if(type == 0 || sum > bestSum) { + bestType = type; + bestSum = sum; + } + } + + prevline = &in[y * linebytes]; + + /*now fill the out values*/ + out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/ + for(x = 0; x != linebytes; ++x) out[y * (linebytes + 1) + 1 + x] = attempt[bestType][x]; + } + } + + for(type = 0; type != 5; ++type) lodepng_free(attempt[type]); + } else if(strategy == LFS_PREDEFINED) { + for(y = 0; y != h; ++y) { + size_t outindex = (1 + linebytes) * y; /*the extra filterbyte added to each row*/ + size_t inindex = linebytes * y; + unsigned char type = settings->predefined_filters[y]; + out[outindex] = type; /*filter type byte*/ + filterScanline(&out[outindex + 1], &in[inindex], prevline, linebytes, bytewidth, type); + prevline = &in[inindex]; + } + } else if(strategy == LFS_BRUTE_FORCE) { + /*brute force filter chooser. + deflate the scanline after every filter attempt to see which one deflates best. + This is very slow and gives only slightly smaller, sometimes even larger, result*/ + size_t size[5]; + unsigned char* attempt[5]; /*five filtering attempts, one for each filter type*/ + size_t smallest = 0; + unsigned type = 0, bestType = 0; + unsigned char* dummy; + LodePNGCompressSettings zlibsettings; + lodepng_memcpy(&zlibsettings, &settings->zlibsettings, sizeof(LodePNGCompressSettings)); + /*use fixed tree on the attempts so that the tree is not adapted to the filtertype on purpose, + to simulate the true case where the tree is the same for the whole image. Sometimes it gives + better result with dynamic tree anyway. Using the fixed tree sometimes gives worse, but in rare + cases better compression. It does make this a bit less slow, so it's worth doing this.*/ + zlibsettings.btype = 1; + /*a custom encoder likely doesn't read the btype setting and is optimized for complete PNG + images only, so disable it*/ + zlibsettings.custom_zlib = 0; + zlibsettings.custom_deflate = 0; + for(type = 0; type != 5; ++type) { + attempt[type] = (unsigned char*)lodepng_malloc(linebytes); + if(!attempt[type]) error = 83; /*alloc fail*/ + } + if(!error) { + for(y = 0; y != h; ++y) /*try the 5 filter types*/ { + for(type = 0; type != 5; ++type) { + unsigned testsize = (unsigned)linebytes; + /*if(testsize > 8) testsize /= 8;*/ /*it already works good enough by testing a part of the row*/ + + filterScanline(attempt[type], &in[y * linebytes], prevline, linebytes, bytewidth, type); + size[type] = 0; + dummy = 0; + zlib_compress(&dummy, &size[type], attempt[type], testsize, &zlibsettings); + lodepng_free(dummy); + /*check if this is smallest size (or if type == 0 it's the first case so always store the values)*/ + if(type == 0 || size[type] < smallest) { + bestType = type; + smallest = size[type]; + } + } + prevline = &in[y * linebytes]; + out[y * (linebytes + 1)] = bestType; /*the first byte of a scanline will be the filter type*/ + for(x = 0; x != linebytes; ++x) out[y * (linebytes + 1) + 1 + x] = attempt[bestType][x]; + } + } + for(type = 0; type != 5; ++type) lodepng_free(attempt[type]); + } + else return 88; /* unknown filter strategy */ + + return error; +} + +static void addPaddingBits(unsigned char* out, const unsigned char* in, + size_t olinebits, size_t ilinebits, unsigned h) { + /*The opposite of the removePaddingBits function + olinebits must be >= ilinebits*/ + unsigned y; + size_t diff = olinebits - ilinebits; + size_t obp = 0, ibp = 0; /*bit pointers*/ + for(y = 0; y != h; ++y) { + size_t x; + for(x = 0; x < ilinebits; ++x) { + unsigned char bit = readBitFromReversedStream(&ibp, in); + setBitOfReversedStream(&obp, out, bit); + } + /*obp += diff; --> no, fill in some value in the padding bits too, to avoid + "Use of uninitialised value of size ###" warning from valgrind*/ + for(x = 0; x != diff; ++x) setBitOfReversedStream(&obp, out, 0); + } +} + +/* +in: non-interlaced image with size w*h +out: the same pixels, but re-ordered according to PNG's Adam7 interlacing, with + no padding bits between scanlines, but between reduced images so that each + reduced image starts at a byte. +bpp: bits per pixel +there are no padding bits, not between scanlines, not between reduced images +in has the following size in bits: w * h * bpp. +out is possibly bigger due to padding bits between reduced images +NOTE: comments about padding bits are only relevant if bpp < 8 +*/ +static void Adam7_interlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { + unsigned passw[7], passh[7]; + size_t filter_passstart[8], padded_passstart[8], passstart[8]; + unsigned i; + + Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); + + if(bpp >= 8) { + for(i = 0; i != 7; ++i) { + unsigned x, y, b; + size_t bytewidth = bpp / 8u; + for(y = 0; y < passh[i]; ++y) + for(x = 0; x < passw[i]; ++x) { + size_t pixelinstart = ((ADAM7_IY[i] + y * ADAM7_DY[i]) * w + ADAM7_IX[i] + x * ADAM7_DX[i]) * bytewidth; + size_t pixeloutstart = passstart[i] + (y * passw[i] + x) * bytewidth; + for(b = 0; b < bytewidth; ++b) { + out[pixeloutstart + b] = in[pixelinstart + b]; + } + } + } + } else /*bpp < 8: Adam7 with pixels < 8 bit is a bit trickier: with bit pointers*/ { + for(i = 0; i != 7; ++i) { + unsigned x, y, b; + unsigned ilinebits = bpp * passw[i]; + unsigned olinebits = bpp * w; + size_t obp, ibp; /*bit pointers (for out and in buffer)*/ + for(y = 0; y < passh[i]; ++y) + for(x = 0; x < passw[i]; ++x) { + ibp = (ADAM7_IY[i] + y * ADAM7_DY[i]) * olinebits + (ADAM7_IX[i] + x * ADAM7_DX[i]) * bpp; + obp = (8 * passstart[i]) + (y * ilinebits + x * bpp); + for(b = 0; b < bpp; ++b) { + unsigned char bit = readBitFromReversedStream(&ibp, in); + setBitOfReversedStream(&obp, out, bit); + } + } + } + } +} + +/*out must be buffer big enough to contain uncompressed IDAT chunk data, and in must contain the full image. +return value is error**/ +static unsigned preProcessScanlines(unsigned char** out, size_t* outsize, const unsigned char* in, + unsigned w, unsigned h, + const LodePNGInfo* info_png, const LodePNGEncoderSettings* settings) { + /* + This function converts the pure 2D image with the PNG's colortype, into filtered-padded-interlaced data. Steps: + *) if no Adam7: 1) add padding bits (= possible extra bits per scanline if bpp < 8) 2) filter + *) if adam7: 1) Adam7_interlace 2) 7x add padding bits 3) 7x filter + */ + unsigned bpp = lodepng_get_bpp(&info_png->color); + unsigned error = 0; + + if(info_png->interlace_method == 0) { + *outsize = h + (h * ((w * bpp + 7u) / 8u)); /*image size plus an extra byte per scanline + possible padding bits*/ + *out = (unsigned char*)lodepng_malloc(*outsize); + if(!(*out) && (*outsize)) error = 83; /*alloc fail*/ + + if(!error) { + /*non multiple of 8 bits per scanline, padding bits needed per scanline*/ + if(bpp < 8 && w * bpp != ((w * bpp + 7u) / 8u) * 8u) { + unsigned char* padded = (unsigned char*)lodepng_malloc(h * ((w * bpp + 7u) / 8u)); + if(!padded) error = 83; /*alloc fail*/ + if(!error) { + addPaddingBits(padded, in, ((w * bpp + 7u) / 8u) * 8u, w * bpp, h); + error = filter(*out, padded, w, h, &info_png->color, settings); + } + lodepng_free(padded); + } else { + /*we can immediately filter into the out buffer, no other steps needed*/ + error = filter(*out, in, w, h, &info_png->color, settings); + } + } + } else /*interlace_method is 1 (Adam7)*/ { + unsigned passw[7], passh[7]; + size_t filter_passstart[8], padded_passstart[8], passstart[8]; + unsigned char* adam7; + + Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); + + *outsize = filter_passstart[7]; /*image size plus an extra byte per scanline + possible padding bits*/ + *out = (unsigned char*)lodepng_malloc(*outsize); + if(!(*out)) error = 83; /*alloc fail*/ + + adam7 = (unsigned char*)lodepng_malloc(passstart[7]); + if(!adam7 && passstart[7]) error = 83; /*alloc fail*/ + + if(!error) { + unsigned i; + + Adam7_interlace(adam7, in, w, h, bpp); + for(i = 0; i != 7; ++i) { + if(bpp < 8) { + unsigned char* padded = (unsigned char*)lodepng_malloc(padded_passstart[i + 1] - padded_passstart[i]); + if(!padded) ERROR_BREAK(83); /*alloc fail*/ + addPaddingBits(padded, &adam7[passstart[i]], + ((passw[i] * bpp + 7u) / 8u) * 8u, passw[i] * bpp, passh[i]); + error = filter(&(*out)[filter_passstart[i]], padded, + passw[i], passh[i], &info_png->color, settings); + lodepng_free(padded); + } else { + error = filter(&(*out)[filter_passstart[i]], &adam7[padded_passstart[i]], + passw[i], passh[i], &info_png->color, settings); + } + + if(error) break; + } + } + + lodepng_free(adam7); + } + + return error; +} + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS +static unsigned addUnknownChunks(ucvector* out, unsigned char* data, size_t datasize) { + unsigned char* inchunk = data; + while((size_t)(inchunk - data) < datasize) { + CERROR_TRY_RETURN(lodepng_chunk_append(&out->data, &out->size, inchunk)); + out->allocsize = out->size; /*fix the allocsize again*/ + inchunk = lodepng_chunk_next(inchunk, data + datasize); + } + return 0; +} + +static unsigned isGrayICCProfile(const unsigned char* profile, unsigned size) { + /* + It is a gray profile if bytes 16-19 are "GRAY", rgb profile if bytes 16-19 + are "RGB ". We do not perform any full parsing of the ICC profile here, other + than check those 4 bytes to grayscale profile. Other than that, validity of + the profile is not checked. This is needed only because the PNG specification + requires using a non-gray color model if there is an ICC profile with "RGB " + (sadly limiting compression opportunities if the input data is grayscale RGB + data), and requires using a gray color model if it is "GRAY". + */ + if(size < 20) return 0; + return profile[16] == 'G' && profile[17] == 'R' && profile[18] == 'A' && profile[19] == 'Y'; +} + +static unsigned isRGBICCProfile(const unsigned char* profile, unsigned size) { + /* See comment in isGrayICCProfile*/ + if(size < 20) return 0; + return profile[16] == 'R' && profile[17] == 'G' && profile[18] == 'B' && profile[19] == ' '; +} +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +unsigned lodepng_encode(unsigned char** out, size_t* outsize, + const unsigned char* image, unsigned w, unsigned h, + LodePNGState* state) { + unsigned char* data = 0; /*uncompressed version of the IDAT chunk data*/ + size_t datasize = 0; + ucvector outv = ucvector_init(NULL, 0); + LodePNGInfo info; + const LodePNGInfo* info_png = &state->info_png; + + lodepng_info_init(&info); + + /*provide some proper output values if error will happen*/ + *out = 0; + *outsize = 0; + state->error = 0; + + /*check input values validity*/ + if((info_png->color.colortype == LCT_PALETTE || state->encoder.force_palette) + && (info_png->color.palettesize == 0 || info_png->color.palettesize > 256)) { + state->error = 68; /*invalid palette size, it is only allowed to be 1-256*/ + goto cleanup; + } + if(state->encoder.zlibsettings.btype > 2) { + state->error = 61; /*error: invalid btype*/ + goto cleanup; + } + if(info_png->interlace_method > 1) { + state->error = 71; /*error: invalid interlace mode*/ + goto cleanup; + } + state->error = checkColorValidity(info_png->color.colortype, info_png->color.bitdepth); + if(state->error) goto cleanup; /*error: invalid color type given*/ + state->error = checkColorValidity(state->info_raw.colortype, state->info_raw.bitdepth); + if(state->error) goto cleanup; /*error: invalid color type given*/ + + /* color convert and compute scanline filter types */ + lodepng_info_copy(&info, &state->info_png); + if(state->encoder.auto_convert) { + LodePNGColorStats stats; + lodepng_color_stats_init(&stats); +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + if(info_png->iccp_defined && + isGrayICCProfile(info_png->iccp_profile, info_png->iccp_profile_size)) { + /*the PNG specification does not allow to use palette with a GRAY ICC profile, even + if the palette has only gray colors, so disallow it.*/ + stats.allow_palette = 0; + } + if(info_png->iccp_defined && + isRGBICCProfile(info_png->iccp_profile, info_png->iccp_profile_size)) { + /*the PNG specification does not allow to use grayscale color with RGB ICC profile, so disallow gray.*/ + stats.allow_greyscale = 0; + } +#endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */ + state->error = lodepng_compute_color_stats(&stats, image, w, h, &state->info_raw); + if(state->error) goto cleanup; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + if(info_png->background_defined) { + /*the background chunk's color must be taken into account as well*/ + unsigned r = 0, g = 0, b = 0; + LodePNGColorMode mode16 = lodepng_color_mode_make(LCT_RGB, 16); + lodepng_convert_rgb(&r, &g, &b, info_png->background_r, info_png->background_g, info_png->background_b, &mode16, &info_png->color); + state->error = lodepng_color_stats_add(&stats, r, g, b, 65535); + if(state->error) goto cleanup; + } +#endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */ + state->error = auto_choose_color(&info.color, &state->info_raw, &stats); + if(state->error) goto cleanup; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*also convert the background chunk*/ + if(info_png->background_defined) { + if(lodepng_convert_rgb(&info.background_r, &info.background_g, &info.background_b, + info_png->background_r, info_png->background_g, info_png->background_b, &info.color, &info_png->color)) { + state->error = 104; + goto cleanup; + } + } +#endif /* LODEPNG_COMPILE_ANCILLARY_CHUNKS */ + } +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + if(info_png->iccp_defined) { + unsigned gray_icc = isGrayICCProfile(info_png->iccp_profile, info_png->iccp_profile_size); + unsigned rgb_icc = isRGBICCProfile(info_png->iccp_profile, info_png->iccp_profile_size); + unsigned gray_png = info.color.colortype == LCT_GREY || info.color.colortype == LCT_GREY_ALPHA; + if(!gray_icc && !rgb_icc) { + state->error = 100; /* Disallowed profile color type for PNG */ + goto cleanup; + } + if(gray_icc != gray_png) { + /*Not allowed to use RGB/RGBA/palette with GRAY ICC profile or vice versa, + or in case of auto_convert, it wasn't possible to find appropriate model*/ + state->error = state->encoder.auto_convert ? 102 : 101; + goto cleanup; + } + } +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + if(!lodepng_color_mode_equal(&state->info_raw, &info.color)) { + unsigned char* converted; + size_t size = ((size_t)w * (size_t)h * (size_t)lodepng_get_bpp(&info.color) + 7u) / 8u; + + converted = (unsigned char*)lodepng_malloc(size); + if(!converted && size) state->error = 83; /*alloc fail*/ + if(!state->error) { + state->error = lodepng_convert(converted, image, &info.color, &state->info_raw, w, h); + } + if(!state->error) { + state->error = preProcessScanlines(&data, &datasize, converted, w, h, &info, &state->encoder); + } + lodepng_free(converted); + if(state->error) goto cleanup; + } else { + state->error = preProcessScanlines(&data, &datasize, image, w, h, &info, &state->encoder); + if(state->error) goto cleanup; + } + + /* output all PNG chunks */ { +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + size_t i; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + /*write signature and chunks*/ + state->error = writeSignature(&outv); + if(state->error) goto cleanup; + /*IHDR*/ + state->error = addChunk_IHDR(&outv, w, h, info.color.colortype, info.color.bitdepth, info.interlace_method); + if(state->error) goto cleanup; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*unknown chunks between IHDR and PLTE*/ + if(info.unknown_chunks_data[0]) { + state->error = addUnknownChunks(&outv, info.unknown_chunks_data[0], info.unknown_chunks_size[0]); + if(state->error) goto cleanup; + } + /*color profile chunks must come before PLTE */ + if(info.iccp_defined) { + state->error = addChunk_iCCP(&outv, &info, &state->encoder.zlibsettings); + if(state->error) goto cleanup; + } + if(info.srgb_defined) { + state->error = addChunk_sRGB(&outv, &info); + if(state->error) goto cleanup; + } + if(info.gama_defined) { + state->error = addChunk_gAMA(&outv, &info); + if(state->error) goto cleanup; + } + if(info.chrm_defined) { + state->error = addChunk_cHRM(&outv, &info); + if(state->error) goto cleanup; + } +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + /*PLTE*/ + if(info.color.colortype == LCT_PALETTE) { + state->error = addChunk_PLTE(&outv, &info.color); + if(state->error) goto cleanup; + } + if(state->encoder.force_palette && (info.color.colortype == LCT_RGB || info.color.colortype == LCT_RGBA)) { + /*force_palette means: write suggested palette for truecolor in PLTE chunk*/ + state->error = addChunk_PLTE(&outv, &info.color); + if(state->error) goto cleanup; + } + /*tRNS (this will only add if when necessary) */ + state->error = addChunk_tRNS(&outv, &info.color); + if(state->error) goto cleanup; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*bKGD (must come between PLTE and the IDAt chunks*/ + if(info.background_defined) { + state->error = addChunk_bKGD(&outv, &info); + if(state->error) goto cleanup; + } + /*pHYs (must come before the IDAT chunks)*/ + if(info.phys_defined) { + state->error = addChunk_pHYs(&outv, &info); + if(state->error) goto cleanup; + } + + /*unknown chunks between PLTE and IDAT*/ + if(info.unknown_chunks_data[1]) { + state->error = addUnknownChunks(&outv, info.unknown_chunks_data[1], info.unknown_chunks_size[1]); + if(state->error) goto cleanup; + } +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + /*IDAT (multiple IDAT chunks must be consecutive)*/ + state->error = addChunk_IDAT(&outv, data, datasize, &state->encoder.zlibsettings); + if(state->error) goto cleanup; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*tIME*/ + if(info.time_defined) { + state->error = addChunk_tIME(&outv, &info.time); + if(state->error) goto cleanup; + } + /*tEXt and/or zTXt*/ + for(i = 0; i != info.text_num; ++i) { + if(lodepng_strlen(info.text_keys[i]) > 79) { + state->error = 66; /*text chunk too large*/ + goto cleanup; + } + if(lodepng_strlen(info.text_keys[i]) < 1) { + state->error = 67; /*text chunk too small*/ + goto cleanup; + } + if(state->encoder.text_compression) { + state->error = addChunk_zTXt(&outv, info.text_keys[i], info.text_strings[i], &state->encoder.zlibsettings); + if(state->error) goto cleanup; + } else { + state->error = addChunk_tEXt(&outv, info.text_keys[i], info.text_strings[i]); + if(state->error) goto cleanup; + } + } + /*LodePNG version id in text chunk*/ + if(state->encoder.add_id) { + unsigned already_added_id_text = 0; + for(i = 0; i != info.text_num; ++i) { + const char* k = info.text_keys[i]; + /* Could use strcmp, but we're not calling or reimplementing this C library function for this use only */ + if(k[0] == 'L' && k[1] == 'o' && k[2] == 'd' && k[3] == 'e' && + k[4] == 'P' && k[5] == 'N' && k[6] == 'G' && k[7] == '\0') { + already_added_id_text = 1; + break; + } + } + if(already_added_id_text == 0) { + state->error = addChunk_tEXt(&outv, "LodePNG", LODEPNG_VERSION_STRING); /*it's shorter as tEXt than as zTXt chunk*/ + if(state->error) goto cleanup; + } + } + /*iTXt*/ + for(i = 0; i != info.itext_num; ++i) { + if(lodepng_strlen(info.itext_keys[i]) > 79) { + state->error = 66; /*text chunk too large*/ + goto cleanup; + } + if(lodepng_strlen(info.itext_keys[i]) < 1) { + state->error = 67; /*text chunk too small*/ + goto cleanup; + } + state->error = addChunk_iTXt( + &outv, state->encoder.text_compression, + info.itext_keys[i], info.itext_langtags[i], info.itext_transkeys[i], info.itext_strings[i], + &state->encoder.zlibsettings); + if(state->error) goto cleanup; + } + + /*unknown chunks between IDAT and IEND*/ + if(info.unknown_chunks_data[2]) { + state->error = addUnknownChunks(&outv, info.unknown_chunks_data[2], info.unknown_chunks_size[2]); + if(state->error) goto cleanup; + } +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + state->error = addChunk_IEND(&outv); + if(state->error) goto cleanup; + } + +cleanup: + lodepng_info_cleanup(&info); + lodepng_free(data); + + /*instead of cleaning the vector up, give it to the output*/ + *out = outv.data; + *outsize = outv.size; + + return state->error; +} + +unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, const unsigned char* image, + unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth) { + unsigned error; + LodePNGState state; + lodepng_state_init(&state); + state.info_raw.colortype = colortype; + state.info_raw.bitdepth = bitdepth; + state.info_png.color.colortype = colortype; + state.info_png.color.bitdepth = bitdepth; + lodepng_encode(out, outsize, image, w, h, &state); + error = state.error; + lodepng_state_cleanup(&state); + return error; +} + +unsigned lodepng_encode32(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h) { + return lodepng_encode_memory(out, outsize, image, w, h, LCT_RGBA, 8); +} + +unsigned lodepng_encode24(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h) { + return lodepng_encode_memory(out, outsize, image, w, h, LCT_RGB, 8); +} + +#ifdef LODEPNG_COMPILE_DISK +unsigned lodepng_encode_file(const char* filename, const unsigned char* image, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth) { + unsigned char* buffer; + size_t buffersize; + unsigned error = lodepng_encode_memory(&buffer, &buffersize, image, w, h, colortype, bitdepth); + if(!error) error = lodepng_save_file(buffer, buffersize, filename); + lodepng_free(buffer); + return error; +} + +unsigned lodepng_encode32_file(const char* filename, const unsigned char* image, unsigned w, unsigned h) { + return lodepng_encode_file(filename, image, w, h, LCT_RGBA, 8); +} + +unsigned lodepng_encode24_file(const char* filename, const unsigned char* image, unsigned w, unsigned h) { + return lodepng_encode_file(filename, image, w, h, LCT_RGB, 8); +} +#endif /*LODEPNG_COMPILE_DISK*/ + +void lodepng_encoder_settings_init(LodePNGEncoderSettings* settings) { + lodepng_compress_settings_init(&settings->zlibsettings); + settings->filter_palette_zero = 1; + settings->filter_strategy = LFS_MINSUM; + settings->auto_convert = 1; + settings->force_palette = 0; + settings->predefined_filters = 0; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + settings->add_id = 0; + settings->text_compression = 1; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +} + +#endif /*LODEPNG_COMPILE_ENCODER*/ +#endif /*LODEPNG_COMPILE_PNG*/ + +#ifdef LODEPNG_COMPILE_ERROR_TEXT +/* +This returns the description of a numerical error code in English. This is also +the documentation of all the error codes. +*/ +const char* lodepng_error_text(unsigned code) { + switch(code) { + case 0: return "no error, everything went ok"; + case 1: return "nothing done yet"; /*the Encoder/Decoder has done nothing yet, error checking makes no sense yet*/ + case 10: return "end of input memory reached without huffman end code"; /*while huffman decoding*/ + case 11: return "error in code tree made it jump outside of huffman tree"; /*while huffman decoding*/ + case 13: return "problem while processing dynamic deflate block"; + case 14: return "problem while processing dynamic deflate block"; + case 15: return "problem while processing dynamic deflate block"; + /*this error could happen if there are only 0 or 1 symbols present in the huffman code:*/ + case 16: return "invalid code while processing dynamic deflate block"; + case 17: return "end of out buffer memory reached while inflating"; + case 18: return "invalid distance code while inflating"; + case 19: return "end of out buffer memory reached while inflating"; + case 20: return "invalid deflate block BTYPE encountered while decoding"; + case 21: return "NLEN is not ones complement of LEN in a deflate block"; + + /*end of out buffer memory reached while inflating: + This can happen if the inflated deflate data is longer than the amount of bytes required to fill up + all the pixels of the image, given the color depth and image dimensions. Something that doesn't + happen in a normal, well encoded, PNG image.*/ + case 22: return "end of out buffer memory reached while inflating"; + case 23: return "end of in buffer memory reached while inflating"; + case 24: return "invalid FCHECK in zlib header"; + case 25: return "invalid compression method in zlib header"; + case 26: return "FDICT encountered in zlib header while it's not used for PNG"; + case 27: return "PNG file is smaller than a PNG header"; + /*Checks the magic file header, the first 8 bytes of the PNG file*/ + case 28: return "incorrect PNG signature, it's no PNG or corrupted"; + case 29: return "first chunk is not the header chunk"; + case 30: return "chunk length too large, chunk broken off at end of file"; + case 31: return "illegal PNG color type or bpp"; + case 32: return "illegal PNG compression method"; + case 33: return "illegal PNG filter method"; + case 34: return "illegal PNG interlace method"; + case 35: return "chunk length of a chunk is too large or the chunk too small"; + case 36: return "illegal PNG filter type encountered"; + case 37: return "illegal bit depth for this color type given"; + case 38: return "the palette is too small or too big"; /*0, or more than 256 colors*/ + case 39: return "tRNS chunk before PLTE or has more entries than palette size"; + case 40: return "tRNS chunk has wrong size for grayscale image"; + case 41: return "tRNS chunk has wrong size for RGB image"; + case 42: return "tRNS chunk appeared while it was not allowed for this color type"; + case 43: return "bKGD chunk has wrong size for palette image"; + case 44: return "bKGD chunk has wrong size for grayscale image"; + case 45: return "bKGD chunk has wrong size for RGB image"; + case 48: return "empty input buffer given to decoder. Maybe caused by non-existing file?"; + case 49: return "jumped past memory while generating dynamic huffman tree"; + case 50: return "jumped past memory while generating dynamic huffman tree"; + case 51: return "jumped past memory while inflating huffman block"; + case 52: return "jumped past memory while inflating"; + case 53: return "size of zlib data too small"; + case 54: return "repeat symbol in tree while there was no value symbol yet"; + /*jumped past tree while generating huffman tree, this could be when the + tree will have more leaves than symbols after generating it out of the + given lengths. They call this an oversubscribed dynamic bit lengths tree in zlib.*/ + case 55: return "jumped past tree while generating huffman tree"; + case 56: return "given output image colortype or bitdepth not supported for color conversion"; + case 57: return "invalid CRC encountered (checking CRC can be disabled)"; + case 58: return "invalid ADLER32 encountered (checking ADLER32 can be disabled)"; + case 59: return "requested color conversion not supported"; + case 60: return "invalid window size given in the settings of the encoder (must be 0-32768)"; + case 61: return "invalid BTYPE given in the settings of the encoder (only 0, 1 and 2 are allowed)"; + /*LodePNG leaves the choice of RGB to grayscale conversion formula to the user.*/ + case 62: return "conversion from color to grayscale not supported"; + /*(2^31-1)*/ + case 63: return "length of a chunk too long, max allowed for PNG is 2147483647 bytes per chunk"; + /*this would result in the inability of a deflated block to ever contain an end code. It must be at least 1.*/ + case 64: return "the length of the END symbol 256 in the Huffman tree is 0"; + case 66: return "the length of a text chunk keyword given to the encoder is longer than the maximum of 79 bytes"; + case 67: return "the length of a text chunk keyword given to the encoder is smaller than the minimum of 1 byte"; + case 68: return "tried to encode a PLTE chunk with a palette that has less than 1 or more than 256 colors"; + case 69: return "unknown chunk type with 'critical' flag encountered by the decoder"; + case 71: return "invalid interlace mode given to encoder (must be 0 or 1)"; + case 72: return "while decoding, invalid compression method encountering in zTXt or iTXt chunk (it must be 0)"; + case 73: return "invalid tIME chunk size"; + case 74: return "invalid pHYs chunk size"; + /*length could be wrong, or data chopped off*/ + case 75: return "no null termination char found while decoding text chunk"; + case 76: return "iTXt chunk too short to contain required bytes"; + case 77: return "integer overflow in buffer size"; + case 78: return "failed to open file for reading"; /*file doesn't exist or couldn't be opened for reading*/ + case 79: return "failed to open file for writing"; + case 80: return "tried creating a tree of 0 symbols"; + case 81: return "lazy matching at pos 0 is impossible"; + case 82: return "color conversion to palette requested while a color isn't in palette, or index out of bounds"; + case 83: return "memory allocation failed"; + case 84: return "given image too small to contain all pixels to be encoded"; + case 86: return "impossible offset in lz77 encoding (internal bug)"; + case 87: return "must provide custom zlib function pointer if LODEPNG_COMPILE_ZLIB is not defined"; + case 88: return "invalid filter strategy given for LodePNGEncoderSettings.filter_strategy"; + case 89: return "text chunk keyword too short or long: must have size 1-79"; + /*the windowsize in the LodePNGCompressSettings. Requiring POT(==> & instead of %) makes encoding 12% faster.*/ + case 90: return "windowsize must be a power of two"; + case 91: return "invalid decompressed idat size"; + case 92: return "integer overflow due to too many pixels"; + case 93: return "zero width or height is invalid"; + case 94: return "header chunk must have a size of 13 bytes"; + case 95: return "integer overflow with combined idat chunk size"; + case 96: return "invalid gAMA chunk size"; + case 97: return "invalid cHRM chunk size"; + case 98: return "invalid sRGB chunk size"; + case 99: return "invalid sRGB rendering intent"; + case 100: return "invalid ICC profile color type, the PNG specification only allows RGB or GRAY"; + case 101: return "PNG specification does not allow RGB ICC profile on gray color types and vice versa"; + case 102: return "not allowed to set grayscale ICC profile with colored pixels by PNG specification"; + case 103: return "invalid palette index in bKGD chunk. Maybe it came before PLTE chunk?"; + case 104: return "invalid bKGD color while encoding (e.g. palette index out of range)"; + case 105: return "integer overflow of bitsize"; + case 106: return "PNG file must have PLTE chunk if color type is palette"; + case 107: return "color convert from palette mode requested without setting the palette data in it"; + case 108: return "tried to add more than 256 values to a palette"; + /*this limit can be configured in LodePNGDecompressSettings*/ + case 109: return "tried to decompress zlib or deflate data larger than desired max_output_size"; + case 110: return "custom zlib or inflate decompression failed"; + case 111: return "custom zlib or deflate compression failed"; + /*max text size limit can be configured in LodePNGDecoderSettings. This error prevents + unreasonable memory consumption when decoding due to impossibly large text sizes.*/ + case 112: return "compressed text unreasonably large"; + /*max ICC size limit can be configured in LodePNGDecoderSettings. This error prevents + unreasonable memory consumption when decoding due to impossibly large ICC profile*/ + case 113: return "ICC profile unreasonably large"; + } + return "unknown error code"; +} +#endif /*LODEPNG_COMPILE_ERROR_TEXT*/ + +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* // C++ Wrapper // */ +/* ////////////////////////////////////////////////////////////////////////// */ +/* ////////////////////////////////////////////////////////////////////////// */ + +#ifdef LODEPNG_COMPILE_CPP +namespace lodepng { + +#ifdef LODEPNG_COMPILE_DISK +unsigned load_file(std::vector& buffer, const std::string& filename) { + long size = lodepng_filesize(filename.c_str()); + if(size < 0) return 78; + buffer.resize((size_t)size); + return size == 0 ? 0 : lodepng_buffer_file(&buffer[0], (size_t)size, filename.c_str()); +} + +/*write given buffer to the file, overwriting the file, it doesn't append to it.*/ +unsigned save_file(const std::vector& buffer, const std::string& filename) { + return lodepng_save_file(buffer.empty() ? 0 : &buffer[0], buffer.size(), filename.c_str()); +} +#endif /* LODEPNG_COMPILE_DISK */ + +#ifdef LODEPNG_COMPILE_ZLIB +#ifdef LODEPNG_COMPILE_DECODER +unsigned decompress(std::vector& out, const unsigned char* in, size_t insize, + const LodePNGDecompressSettings& settings) { + unsigned char* buffer = 0; + size_t buffersize = 0; + unsigned error = zlib_decompress(&buffer, &buffersize, 0, in, insize, &settings); + if(buffer) { + out.insert(out.end(), &buffer[0], &buffer[buffersize]); + lodepng_free(buffer); + } + return error; +} + +unsigned decompress(std::vector& out, const std::vector& in, + const LodePNGDecompressSettings& settings) { + return decompress(out, in.empty() ? 0 : &in[0], in.size(), settings); +} +#endif /* LODEPNG_COMPILE_DECODER */ + +#ifdef LODEPNG_COMPILE_ENCODER +unsigned compress(std::vector& out, const unsigned char* in, size_t insize, + const LodePNGCompressSettings& settings) { + unsigned char* buffer = 0; + size_t buffersize = 0; + unsigned error = zlib_compress(&buffer, &buffersize, in, insize, &settings); + if(buffer) { + out.insert(out.end(), &buffer[0], &buffer[buffersize]); + lodepng_free(buffer); + } + return error; +} + +unsigned compress(std::vector& out, const std::vector& in, + const LodePNGCompressSettings& settings) { + return compress(out, in.empty() ? 0 : &in[0], in.size(), settings); +} +#endif /* LODEPNG_COMPILE_ENCODER */ +#endif /* LODEPNG_COMPILE_ZLIB */ + + +#ifdef LODEPNG_COMPILE_PNG + +State::State() { + lodepng_state_init(this); +} + +State::State(const State& other) { + lodepng_state_init(this); + lodepng_state_copy(this, &other); +} + +State::~State() { + lodepng_state_cleanup(this); +} + +State& State::operator=(const State& other) { + lodepng_state_copy(this, &other); + return *this; +} + +#ifdef LODEPNG_COMPILE_DECODER + +unsigned decode(std::vector& out, unsigned& w, unsigned& h, const unsigned char* in, + size_t insize, LodePNGColorType colortype, unsigned bitdepth) { + unsigned char* buffer = 0; + unsigned error = lodepng_decode_memory(&buffer, &w, &h, in, insize, colortype, bitdepth); + if(buffer && !error) { + State state; + state.info_raw.colortype = colortype; + state.info_raw.bitdepth = bitdepth; + size_t buffersize = lodepng_get_raw_size(w, h, &state.info_raw); + out.insert(out.end(), &buffer[0], &buffer[buffersize]); + } + lodepng_free(buffer); + return error; +} + +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + const std::vector& in, LodePNGColorType colortype, unsigned bitdepth) { + return decode(out, w, h, in.empty() ? 0 : &in[0], (unsigned)in.size(), colortype, bitdepth); +} + +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + State& state, + const unsigned char* in, size_t insize) { + unsigned char* buffer = NULL; + unsigned error = lodepng_decode(&buffer, &w, &h, &state, in, insize); + if(buffer && !error) { + size_t buffersize = lodepng_get_raw_size(w, h, &state.info_raw); + out.insert(out.end(), &buffer[0], &buffer[buffersize]); + } + lodepng_free(buffer); + return error; +} + +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + State& state, + const std::vector& in) { + return decode(out, w, h, state, in.empty() ? 0 : &in[0], in.size()); +} + +#ifdef LODEPNG_COMPILE_DISK +unsigned decode(std::vector& out, unsigned& w, unsigned& h, const std::string& filename, + LodePNGColorType colortype, unsigned bitdepth) { + std::vector buffer; + /* safe output values in case error happens */ + w = h = 0; + unsigned error = load_file(buffer, filename); + if(error) return error; + return decode(out, w, h, buffer, colortype, bitdepth); +} +#endif /* LODEPNG_COMPILE_DECODER */ +#endif /* LODEPNG_COMPILE_DISK */ + +#ifdef LODEPNG_COMPILE_ENCODER +unsigned encode(std::vector& out, const unsigned char* in, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth) { + unsigned char* buffer; + size_t buffersize; + unsigned error = lodepng_encode_memory(&buffer, &buffersize, in, w, h, colortype, bitdepth); + if(buffer) { + out.insert(out.end(), &buffer[0], &buffer[buffersize]); + lodepng_free(buffer); + } + return error; +} + +unsigned encode(std::vector& out, + const std::vector& in, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth) { + if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84; + return encode(out, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth); +} + +unsigned encode(std::vector& out, + const unsigned char* in, unsigned w, unsigned h, + State& state) { + unsigned char* buffer; + size_t buffersize; + unsigned error = lodepng_encode(&buffer, &buffersize, in, w, h, &state); + if(buffer) { + out.insert(out.end(), &buffer[0], &buffer[buffersize]); + lodepng_free(buffer); + } + return error; +} + +unsigned encode(std::vector& out, + const std::vector& in, unsigned w, unsigned h, + State& state) { + if(lodepng_get_raw_size(w, h, &state.info_raw) > in.size()) return 84; + return encode(out, in.empty() ? 0 : &in[0], w, h, state); +} + +#ifdef LODEPNG_COMPILE_DISK +unsigned encode(const std::string& filename, + const unsigned char* in, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth) { + std::vector buffer; + unsigned error = encode(buffer, in, w, h, colortype, bitdepth); + if(!error) error = save_file(buffer, filename); + return error; +} + +unsigned encode(const std::string& filename, + const std::vector& in, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth) { + if(lodepng_get_raw_size_lct(w, h, colortype, bitdepth) > in.size()) return 84; + return encode(filename, in.empty() ? 0 : &in[0], w, h, colortype, bitdepth); +} +#endif /* LODEPNG_COMPILE_DISK */ +#endif /* LODEPNG_COMPILE_ENCODER */ +#endif /* LODEPNG_COMPILE_PNG */ +} /* namespace lodepng */ +#endif /*LODEPNG_COMPILE_CPP*/ diff --git a/tools/lodepng/lodepng.h b/tools/lodepng/lodepng.h new file mode 100644 index 0000000..3e1da92 --- /dev/null +++ b/tools/lodepng/lodepng.h @@ -0,0 +1,2019 @@ +/* +LodePNG version 20210627 + +Copyright (c) 2005-2021 Lode Vandevenne + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source + distribution. +*/ + +#ifndef LODEPNG_H +#define LODEPNG_H + +#include /*for size_t*/ + +extern const char* LODEPNG_VERSION_STRING; + +/* +The following #defines are used to create code sections. They can be disabled +to disable code sections, which can give faster compile time and smaller binary. +The "NO_COMPILE" defines are designed to be used to pass as defines to the +compiler command to disable them without modifying this header, e.g. +-DLODEPNG_NO_COMPILE_ZLIB for gcc. +In addition to those below, you can also define LODEPNG_NO_COMPILE_CRC to +allow implementing a custom lodepng_crc32. +*/ +/*deflate & zlib. If disabled, you must specify alternative zlib functions in +the custom_zlib field of the compress and decompress settings*/ +#ifndef LODEPNG_NO_COMPILE_ZLIB +#define LODEPNG_COMPILE_ZLIB +#endif + +/*png encoder and png decoder*/ +#ifndef LODEPNG_NO_COMPILE_PNG +#define LODEPNG_COMPILE_PNG +#endif + +/*deflate&zlib decoder and png decoder*/ +#ifndef LODEPNG_NO_COMPILE_DECODER +#define LODEPNG_COMPILE_DECODER +#endif + +/*deflate&zlib encoder and png encoder*/ +#ifndef LODEPNG_NO_COMPILE_ENCODER +#define LODEPNG_COMPILE_ENCODER +#endif + +/*the optional built in harddisk file loading and saving functions*/ +#ifndef LODEPNG_NO_COMPILE_DISK +#define LODEPNG_COMPILE_DISK +#endif + +/*support for chunks other than IHDR, IDAT, PLTE, tRNS, IEND: ancillary and unknown chunks*/ +#ifndef LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS +#define LODEPNG_COMPILE_ANCILLARY_CHUNKS +#endif + +/*ability to convert error numerical codes to English text string*/ +#ifndef LODEPNG_NO_COMPILE_ERROR_TEXT +#define LODEPNG_COMPILE_ERROR_TEXT +#endif + +/*Compile the default allocators (C's free, malloc and realloc). If you disable this, +you can define the functions lodepng_free, lodepng_malloc and lodepng_realloc in your +source files with custom allocators.*/ +#ifndef LODEPNG_NO_COMPILE_ALLOCATORS +#define LODEPNG_COMPILE_ALLOCATORS +#endif + +/*compile the C++ version (you can disable the C++ wrapper here even when compiling for C++)*/ +#ifdef __cplusplus +#ifndef LODEPNG_NO_COMPILE_CPP +#define LODEPNG_COMPILE_CPP +#endif +#endif + +#ifdef LODEPNG_COMPILE_CPP +#include +#include +#endif /*LODEPNG_COMPILE_CPP*/ + +#ifdef LODEPNG_COMPILE_PNG +/*The PNG color types (also used for raw image).*/ +typedef enum LodePNGColorType { + LCT_GREY = 0, /*grayscale: 1,2,4,8,16 bit*/ + LCT_RGB = 2, /*RGB: 8,16 bit*/ + LCT_PALETTE = 3, /*palette: 1,2,4,8 bit*/ + LCT_GREY_ALPHA = 4, /*grayscale with alpha: 8,16 bit*/ + LCT_RGBA = 6, /*RGB with alpha: 8,16 bit*/ + /*LCT_MAX_OCTET_VALUE lets the compiler allow this enum to represent any invalid + byte value from 0 to 255 that could be present in an invalid PNG file header. Do + not use, compare with or set the name LCT_MAX_OCTET_VALUE, instead either use + the valid color type names above, or numeric values like 1 or 7 when checking for + particular disallowed color type byte values, or cast to integer to print it.*/ + LCT_MAX_OCTET_VALUE = 255 +} LodePNGColorType; + +#ifdef LODEPNG_COMPILE_DECODER +/* +Converts PNG data in memory to raw pixel data. +out: Output parameter. Pointer to buffer that will contain the raw pixel data. + After decoding, its size is w * h * (bytes per pixel) bytes larger than + initially. Bytes per pixel depends on colortype and bitdepth. + Must be freed after usage with free(*out). + Note: for 16-bit per channel colors, uses big endian format like PNG does. +w: Output parameter. Pointer to width of pixel data. +h: Output parameter. Pointer to height of pixel data. +in: Memory buffer with the PNG file. +insize: size of the in buffer. +colortype: the desired color type for the raw output image. See explanation on PNG color types. +bitdepth: the desired bit depth for the raw output image. See explanation on PNG color types. +Return value: LodePNG error code (0 means no error). +*/ +unsigned lodepng_decode_memory(unsigned char** out, unsigned* w, unsigned* h, + const unsigned char* in, size_t insize, + LodePNGColorType colortype, unsigned bitdepth); + +/*Same as lodepng_decode_memory, but always decodes to 32-bit RGBA raw image*/ +unsigned lodepng_decode32(unsigned char** out, unsigned* w, unsigned* h, + const unsigned char* in, size_t insize); + +/*Same as lodepng_decode_memory, but always decodes to 24-bit RGB raw image*/ +unsigned lodepng_decode24(unsigned char** out, unsigned* w, unsigned* h, + const unsigned char* in, size_t insize); + +#ifdef LODEPNG_COMPILE_DISK +/* +Load PNG from disk, from file with given name. +Same as the other decode functions, but instead takes a filename as input. + +NOTE: Wide-character filenames are not supported, you can use an external method +to handle such files and decode in-memory.*/ +unsigned lodepng_decode_file(unsigned char** out, unsigned* w, unsigned* h, + const char* filename, + LodePNGColorType colortype, unsigned bitdepth); + +/*Same as lodepng_decode_file, but always decodes to 32-bit RGBA raw image. + +NOTE: Wide-character filenames are not supported, you can use an external method +to handle such files and decode in-memory.*/ +unsigned lodepng_decode32_file(unsigned char** out, unsigned* w, unsigned* h, + const char* filename); + +/*Same as lodepng_decode_file, but always decodes to 24-bit RGB raw image. + +NOTE: Wide-character filenames are not supported, you can use an external method +to handle such files and decode in-memory.*/ +unsigned lodepng_decode24_file(unsigned char** out, unsigned* w, unsigned* h, + const char* filename); +#endif /*LODEPNG_COMPILE_DISK*/ +#endif /*LODEPNG_COMPILE_DECODER*/ + + +#ifdef LODEPNG_COMPILE_ENCODER +/* +Converts raw pixel data into a PNG image in memory. The colortype and bitdepth + of the output PNG image cannot be chosen, they are automatically determined + by the colortype, bitdepth and content of the input pixel data. + Note: for 16-bit per channel colors, needs big endian format like PNG does. +out: Output parameter. Pointer to buffer that will contain the PNG image data. + Must be freed after usage with free(*out). +outsize: Output parameter. Pointer to the size in bytes of the out buffer. +image: The raw pixel data to encode. The size of this buffer should be + w * h * (bytes per pixel), bytes per pixel depends on colortype and bitdepth. +w: width of the raw pixel data in pixels. +h: height of the raw pixel data in pixels. +colortype: the color type of the raw input image. See explanation on PNG color types. +bitdepth: the bit depth of the raw input image. See explanation on PNG color types. +Return value: LodePNG error code (0 means no error). +*/ +unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, + const unsigned char* image, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth); + +/*Same as lodepng_encode_memory, but always encodes from 32-bit RGBA raw image.*/ +unsigned lodepng_encode32(unsigned char** out, size_t* outsize, + const unsigned char* image, unsigned w, unsigned h); + +/*Same as lodepng_encode_memory, but always encodes from 24-bit RGB raw image.*/ +unsigned lodepng_encode24(unsigned char** out, size_t* outsize, + const unsigned char* image, unsigned w, unsigned h); + +#ifdef LODEPNG_COMPILE_DISK +/* +Converts raw pixel data into a PNG file on disk. +Same as the other encode functions, but instead takes a filename as output. + +NOTE: This overwrites existing files without warning! + +NOTE: Wide-character filenames are not supported, you can use an external method +to handle such files and encode in-memory.*/ +unsigned lodepng_encode_file(const char* filename, + const unsigned char* image, unsigned w, unsigned h, + LodePNGColorType colortype, unsigned bitdepth); + +/*Same as lodepng_encode_file, but always encodes from 32-bit RGBA raw image. + +NOTE: Wide-character filenames are not supported, you can use an external method +to handle such files and encode in-memory.*/ +unsigned lodepng_encode32_file(const char* filename, + const unsigned char* image, unsigned w, unsigned h); + +/*Same as lodepng_encode_file, but always encodes from 24-bit RGB raw image. + +NOTE: Wide-character filenames are not supported, you can use an external method +to handle such files and encode in-memory.*/ +unsigned lodepng_encode24_file(const char* filename, + const unsigned char* image, unsigned w, unsigned h); +#endif /*LODEPNG_COMPILE_DISK*/ +#endif /*LODEPNG_COMPILE_ENCODER*/ + + +#ifdef LODEPNG_COMPILE_CPP +namespace lodepng { +#ifdef LODEPNG_COMPILE_DECODER +/*Same as lodepng_decode_memory, but decodes to an std::vector. The colortype +is the format to output the pixels to. Default is RGBA 8-bit per channel.*/ +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + const unsigned char* in, size_t insize, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + const std::vector& in, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +#ifdef LODEPNG_COMPILE_DISK +/* +Converts PNG file from disk to raw pixel data in memory. +Same as the other decode functions, but instead takes a filename as input. + +NOTE: Wide-character filenames are not supported, you can use an external method +to handle such files and decode in-memory. +*/ +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + const std::string& filename, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +#endif /* LODEPNG_COMPILE_DISK */ +#endif /* LODEPNG_COMPILE_DECODER */ + +#ifdef LODEPNG_COMPILE_ENCODER +/*Same as lodepng_encode_memory, but encodes to an std::vector. colortype +is that of the raw input data. The output PNG color type will be auto chosen.*/ +unsigned encode(std::vector& out, + const unsigned char* in, unsigned w, unsigned h, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +unsigned encode(std::vector& out, + const std::vector& in, unsigned w, unsigned h, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +#ifdef LODEPNG_COMPILE_DISK +/* +Converts 32-bit RGBA raw pixel data into a PNG file on disk. +Same as the other encode functions, but instead takes a filename as output. + +NOTE: This overwrites existing files without warning! + +NOTE: Wide-character filenames are not supported, you can use an external method +to handle such files and decode in-memory. +*/ +unsigned encode(const std::string& filename, + const unsigned char* in, unsigned w, unsigned h, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +unsigned encode(const std::string& filename, + const std::vector& in, unsigned w, unsigned h, + LodePNGColorType colortype = LCT_RGBA, unsigned bitdepth = 8); +#endif /* LODEPNG_COMPILE_DISK */ +#endif /* LODEPNG_COMPILE_ENCODER */ +} /* namespace lodepng */ +#endif /*LODEPNG_COMPILE_CPP*/ +#endif /*LODEPNG_COMPILE_PNG*/ + +#ifdef LODEPNG_COMPILE_ERROR_TEXT +/*Returns an English description of the numerical error code.*/ +const char* lodepng_error_text(unsigned code); +#endif /*LODEPNG_COMPILE_ERROR_TEXT*/ + +#ifdef LODEPNG_COMPILE_DECODER +/*Settings for zlib decompression*/ +typedef struct LodePNGDecompressSettings LodePNGDecompressSettings; +struct LodePNGDecompressSettings { + /* Check LodePNGDecoderSettings for more ignorable errors such as ignore_crc */ + unsigned ignore_adler32; /*if 1, continue and don't give an error message if the Adler32 checksum is corrupted*/ + unsigned ignore_nlen; /*ignore complement of len checksum in uncompressed blocks*/ + + /*Maximum decompressed size, beyond this the decoder may (and is encouraged to) stop decoding, + return an error, output a data size > max_output_size and all the data up to that point. This is + not hard limit nor a guarantee, but can prevent excessive memory usage. This setting is + ignored by the PNG decoder, but is used by the deflate/zlib decoder and can be used by custom ones. + Set to 0 to impose no limit (the default).*/ + size_t max_output_size; + + /*use custom zlib decoder instead of built in one (default: null). + Should return 0 if success, any non-0 if error (numeric value not exposed).*/ + unsigned (*custom_zlib)(unsigned char**, size_t*, + const unsigned char*, size_t, + const LodePNGDecompressSettings*); + /*use custom deflate decoder instead of built in one (default: null) + if custom_zlib is not null, custom_inflate is ignored (the zlib format uses deflate). + Should return 0 if success, any non-0 if error (numeric value not exposed).*/ + unsigned (*custom_inflate)(unsigned char**, size_t*, + const unsigned char*, size_t, + const LodePNGDecompressSettings*); + + const void* custom_context; /*optional custom settings for custom functions*/ +}; + +extern const LodePNGDecompressSettings lodepng_default_decompress_settings; +void lodepng_decompress_settings_init(LodePNGDecompressSettings* settings); +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_ENCODER +/* +Settings for zlib compression. Tweaking these settings tweaks the balance +between speed and compression ratio. +*/ +typedef struct LodePNGCompressSettings LodePNGCompressSettings; +struct LodePNGCompressSettings /*deflate = compress*/ { + /*LZ77 related settings*/ + unsigned btype; /*the block type for LZ (0, 1, 2 or 3, see zlib standard). Should be 2 for proper compression.*/ + unsigned use_lz77; /*whether or not to use LZ77. Should be 1 for proper compression.*/ + unsigned windowsize; /*must be a power of two <= 32768. higher compresses more but is slower. Default value: 2048.*/ + unsigned minmatch; /*minimum lz77 length. 3 is normally best, 6 can be better for some PNGs. Default: 0*/ + unsigned nicematch; /*stop searching if >= this length found. Set to 258 for best compression. Default: 128*/ + unsigned lazymatching; /*use lazy matching: better compression but a bit slower. Default: true*/ + + /*use custom zlib encoder instead of built in one (default: null)*/ + unsigned (*custom_zlib)(unsigned char**, size_t*, + const unsigned char*, size_t, + const LodePNGCompressSettings*); + /*use custom deflate encoder instead of built in one (default: null) + if custom_zlib is used, custom_deflate is ignored since only the built in + zlib function will call custom_deflate*/ + unsigned (*custom_deflate)(unsigned char**, size_t*, + const unsigned char*, size_t, + const LodePNGCompressSettings*); + + const void* custom_context; /*optional custom settings for custom functions*/ +}; + +extern const LodePNGCompressSettings lodepng_default_compress_settings; +void lodepng_compress_settings_init(LodePNGCompressSettings* settings); +#endif /*LODEPNG_COMPILE_ENCODER*/ + +#ifdef LODEPNG_COMPILE_PNG +/* +Color mode of an image. Contains all information required to decode the pixel +bits to RGBA colors. This information is the same as used in the PNG file +format, and is used both for PNG and raw image data in LodePNG. +*/ +typedef struct LodePNGColorMode { + /*header (IHDR)*/ + LodePNGColorType colortype; /*color type, see PNG standard or documentation further in this header file*/ + unsigned bitdepth; /*bits per sample, see PNG standard or documentation further in this header file*/ + + /* + palette (PLTE and tRNS) + + Dynamically allocated with the colors of the palette, including alpha. + This field may not be allocated directly, use lodepng_color_mode_init first, + then lodepng_palette_add per color to correctly initialize it (to ensure size + of exactly 1024 bytes). + + The alpha channels must be set as well, set them to 255 for opaque images. + + When decoding, by default you can ignore this palette, since LodePNG already + fills the palette colors in the pixels of the raw RGBA output. + + The palette is only supported for color type 3. + */ + unsigned char* palette; /*palette in RGBARGBA... order. Must be either 0, or when allocated must have 1024 bytes*/ + size_t palettesize; /*palette size in number of colors (amount of used bytes is 4 * palettesize)*/ + + /* + transparent color key (tRNS) + + This color uses the same bit depth as the bitdepth value in this struct, which can be 1-bit to 16-bit. + For grayscale PNGs, r, g and b will all 3 be set to the same. + + When decoding, by default you can ignore this information, since LodePNG sets + pixels with this key to transparent already in the raw RGBA output. + + The color key is only supported for color types 0 and 2. + */ + unsigned key_defined; /*is a transparent color key given? 0 = false, 1 = true*/ + unsigned key_r; /*red/grayscale component of color key*/ + unsigned key_g; /*green component of color key*/ + unsigned key_b; /*blue component of color key*/ +} LodePNGColorMode; + +/*init, cleanup and copy functions to use with this struct*/ +void lodepng_color_mode_init(LodePNGColorMode* info); +void lodepng_color_mode_cleanup(LodePNGColorMode* info); +/*return value is error code (0 means no error)*/ +unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source); +/* Makes a temporary LodePNGColorMode that does not need cleanup (no palette) */ +LodePNGColorMode lodepng_color_mode_make(LodePNGColorType colortype, unsigned bitdepth); + +void lodepng_palette_clear(LodePNGColorMode* info); +/*add 1 color to the palette*/ +unsigned lodepng_palette_add(LodePNGColorMode* info, + unsigned char r, unsigned char g, unsigned char b, unsigned char a); + +/*get the total amount of bits per pixel, based on colortype and bitdepth in the struct*/ +unsigned lodepng_get_bpp(const LodePNGColorMode* info); +/*get the amount of color channels used, based on colortype in the struct. +If a palette is used, it counts as 1 channel.*/ +unsigned lodepng_get_channels(const LodePNGColorMode* info); +/*is it a grayscale type? (only colortype 0 or 4)*/ +unsigned lodepng_is_greyscale_type(const LodePNGColorMode* info); +/*has it got an alpha channel? (only colortype 2 or 6)*/ +unsigned lodepng_is_alpha_type(const LodePNGColorMode* info); +/*has it got a palette? (only colortype 3)*/ +unsigned lodepng_is_palette_type(const LodePNGColorMode* info); +/*only returns true if there is a palette and there is a value in the palette with alpha < 255. +Loops through the palette to check this.*/ +unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info); +/* +Check if the given color info indicates the possibility of having non-opaque pixels in the PNG image. +Returns true if the image can have translucent or invisible pixels (it still be opaque if it doesn't use such pixels). +Returns false if the image can only have opaque pixels. +In detail, it returns true only if it's a color type with alpha, or has a palette with non-opaque values, +or if "key_defined" is true. +*/ +unsigned lodepng_can_have_alpha(const LodePNGColorMode* info); +/*Returns the byte size of a raw image buffer with given width, height and color mode*/ +size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color); + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS +/*The information of a Time chunk in PNG.*/ +typedef struct LodePNGTime { + unsigned year; /*2 bytes used (0-65535)*/ + unsigned month; /*1-12*/ + unsigned day; /*1-31*/ + unsigned hour; /*0-23*/ + unsigned minute; /*0-59*/ + unsigned second; /*0-60 (to allow for leap seconds)*/ +} LodePNGTime; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +/*Information about the PNG image, except pixels, width and height.*/ +typedef struct LodePNGInfo { + /*header (IHDR), palette (PLTE) and transparency (tRNS) chunks*/ + unsigned compression_method;/*compression method of the original file. Always 0.*/ + unsigned filter_method; /*filter method of the original file*/ + unsigned interlace_method; /*interlace method of the original file: 0=none, 1=Adam7*/ + LodePNGColorMode color; /*color type and bits, palette and transparency of the PNG file*/ + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /* + Suggested background color chunk (bKGD) + + This uses the same color mode and bit depth as the PNG (except no alpha channel), + with values truncated to the bit depth in the unsigned integer. + + For grayscale and palette PNGs, the value is stored in background_r. The values + in background_g and background_b are then unused. + + So when decoding, you may get these in a different color mode than the one you requested + for the raw pixels. + + When encoding with auto_convert, you must use the color model defined in info_png.color for + these values. The encoder normally ignores info_png.color when auto_convert is on, but will + use it to interpret these values (and convert copies of them to its chosen color model). + + When encoding, avoid setting this to an expensive color, such as a non-gray value + when the image is gray, or the compression will be worse since it will be forced to + write the PNG with a more expensive color mode (when auto_convert is on). + + The decoder does not use this background color to edit the color of pixels. This is a + completely optional metadata feature. + */ + unsigned background_defined; /*is a suggested background color given?*/ + unsigned background_r; /*red/gray/palette component of suggested background color*/ + unsigned background_g; /*green component of suggested background color*/ + unsigned background_b; /*blue component of suggested background color*/ + + /* + Non-international text chunks (tEXt and zTXt) + + The char** arrays each contain num strings. The actual messages are in + text_strings, while text_keys are keywords that give a short description what + the actual text represents, e.g. Title, Author, Description, or anything else. + + All the string fields below including strings, keys, names and language tags are null terminated. + The PNG specification uses null characters for the keys, names and tags, and forbids null + characters to appear in the main text which is why we can use null termination everywhere here. + + A keyword is minimum 1 character and maximum 79 characters long (plus the + additional null terminator). It's discouraged to use a single line length + longer than 79 characters for texts. + + Don't allocate these text buffers yourself. Use the init/cleanup functions + correctly and use lodepng_add_text and lodepng_clear_text. + + Standard text chunk keywords and strings are encoded using Latin-1. + */ + size_t text_num; /*the amount of texts in these char** buffers (there may be more texts in itext)*/ + char** text_keys; /*the keyword of a text chunk (e.g. "Comment")*/ + char** text_strings; /*the actual text*/ + + /* + International text chunks (iTXt) + Similar to the non-international text chunks, but with additional strings + "langtags" and "transkeys", and the following text encodings are used: + keys: Latin-1, langtags: ASCII, transkeys and strings: UTF-8. + keys must be 1-79 characters (plus the additional null terminator), the other + strings are any length. + */ + size_t itext_num; /*the amount of international texts in this PNG*/ + char** itext_keys; /*the English keyword of the text chunk (e.g. "Comment")*/ + char** itext_langtags; /*language tag for this text's language, ISO/IEC 646 string, e.g. ISO 639 language tag*/ + char** itext_transkeys; /*keyword translated to the international language - UTF-8 string*/ + char** itext_strings; /*the actual international text - UTF-8 string*/ + + /*time chunk (tIME)*/ + unsigned time_defined; /*set to 1 to make the encoder generate a tIME chunk*/ + LodePNGTime time; + + /*phys chunk (pHYs)*/ + unsigned phys_defined; /*if 0, there is no pHYs chunk and the values below are undefined, if 1 else there is one*/ + unsigned phys_x; /*pixels per unit in x direction*/ + unsigned phys_y; /*pixels per unit in y direction*/ + unsigned phys_unit; /*may be 0 (unknown unit) or 1 (metre)*/ + + /* + Color profile related chunks: gAMA, cHRM, sRGB, iCPP + + LodePNG does not apply any color conversions on pixels in the encoder or decoder and does not interpret these color + profile values. It merely passes on the information. If you wish to use color profiles and convert colors, please + use these values with a color management library. + + See the PNG, ICC and sRGB specifications for more information about the meaning of these values. + */ + + /* gAMA chunk: optional, overridden by sRGB or iCCP if those are present. */ + unsigned gama_defined; /* Whether a gAMA chunk is present (0 = not present, 1 = present). */ + unsigned gama_gamma; /* Gamma exponent times 100000 */ + + /* cHRM chunk: optional, overridden by sRGB or iCCP if those are present. */ + unsigned chrm_defined; /* Whether a cHRM chunk is present (0 = not present, 1 = present). */ + unsigned chrm_white_x; /* White Point x times 100000 */ + unsigned chrm_white_y; /* White Point y times 100000 */ + unsigned chrm_red_x; /* Red x times 100000 */ + unsigned chrm_red_y; /* Red y times 100000 */ + unsigned chrm_green_x; /* Green x times 100000 */ + unsigned chrm_green_y; /* Green y times 100000 */ + unsigned chrm_blue_x; /* Blue x times 100000 */ + unsigned chrm_blue_y; /* Blue y times 100000 */ + + /* + sRGB chunk: optional. May not appear at the same time as iCCP. + If gAMA is also present gAMA must contain value 45455. + If cHRM is also present cHRM must contain respectively 31270,32900,64000,33000,30000,60000,15000,6000. + */ + unsigned srgb_defined; /* Whether an sRGB chunk is present (0 = not present, 1 = present). */ + unsigned srgb_intent; /* Rendering intent: 0=perceptual, 1=rel. colorimetric, 2=saturation, 3=abs. colorimetric */ + + /* + iCCP chunk: optional. May not appear at the same time as sRGB. + + LodePNG does not parse or use the ICC profile (except its color space header field for an edge case), a + separate library to handle the ICC data (not included in LodePNG) format is needed to use it for color + management and conversions. + + For encoding, if iCCP is present, gAMA and cHRM are recommended to be added as well with values that match the ICC + profile as closely as possible, if you wish to do this you should provide the correct values for gAMA and cHRM and + enable their '_defined' flags since LodePNG will not automatically compute them from the ICC profile. + + For encoding, the ICC profile is required by the PNG specification to be an "RGB" profile for non-gray + PNG color types and a "GRAY" profile for gray PNG color types. If you disable auto_convert, you must ensure + the ICC profile type matches your requested color type, else the encoder gives an error. If auto_convert is + enabled (the default), and the ICC profile is not a good match for the pixel data, this will result in an encoder + error if the pixel data has non-gray pixels for a GRAY profile, or a silent less-optimal compression of the pixel + data if the pixels could be encoded as grayscale but the ICC profile is RGB. + + To avoid this do not set an ICC profile in the image unless there is a good reason for it, and when doing so + make sure you compute it carefully to avoid the above problems. + */ + unsigned iccp_defined; /* Whether an iCCP chunk is present (0 = not present, 1 = present). */ + char* iccp_name; /* Null terminated string with profile name, 1-79 bytes */ + /* + The ICC profile in iccp_profile_size bytes. + Don't allocate this buffer yourself. Use the init/cleanup functions + correctly and use lodepng_set_icc and lodepng_clear_icc. + */ + unsigned char* iccp_profile; + unsigned iccp_profile_size; /* The size of iccp_profile in bytes */ + + /* End of color profile related chunks */ + + + /* + unknown chunks: chunks not known by LodePNG, passed on byte for byte. + + There are 3 buffers, one for each position in the PNG where unknown chunks can appear. + Each buffer contains all unknown chunks for that position consecutively. + The 3 positions are: + 0: between IHDR and PLTE, 1: between PLTE and IDAT, 2: between IDAT and IEND. + + For encoding, do not store critical chunks or known chunks that are enabled with a "_defined" flag + above in here, since the encoder will blindly follow this and could then encode an invalid PNG file + (such as one with two IHDR chunks or the disallowed combination of sRGB with iCCP). But do use + this if you wish to store an ancillary chunk that is not supported by LodePNG (such as sPLT or hIST), + or any non-standard PNG chunk. + + Do not allocate or traverse this data yourself. Use the chunk traversing functions declared + later, such as lodepng_chunk_next and lodepng_chunk_append, to read/write this struct. + */ + unsigned char* unknown_chunks_data[3]; + size_t unknown_chunks_size[3]; /*size in bytes of the unknown chunks, given for protection*/ +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +} LodePNGInfo; + +/*init, cleanup and copy functions to use with this struct*/ +void lodepng_info_init(LodePNGInfo* info); +void lodepng_info_cleanup(LodePNGInfo* info); +/*return value is error code (0 means no error)*/ +unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source); + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS +unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str); /*push back both texts at once*/ +void lodepng_clear_text(LodePNGInfo* info); /*use this to clear the texts again after you filled them in*/ + +unsigned lodepng_add_itext(LodePNGInfo* info, const char* key, const char* langtag, + const char* transkey, const char* str); /*push back the 4 texts of 1 chunk at once*/ +void lodepng_clear_itext(LodePNGInfo* info); /*use this to clear the itexts again after you filled them in*/ + +/*replaces if exists*/ +unsigned lodepng_set_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size); +void lodepng_clear_icc(LodePNGInfo* info); /*use this to clear the texts again after you filled them in*/ +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ + +/* +Converts raw buffer from one color type to another color type, based on +LodePNGColorMode structs to describe the input and output color type. +See the reference manual at the end of this header file to see which color conversions are supported. +return value = LodePNG error code (0 if all went ok, an error if the conversion isn't supported) +The out buffer must have size (w * h * bpp + 7) / 8, where bpp is the bits per pixel +of the output color type (lodepng_get_bpp). +For < 8 bpp images, there should not be padding bits at the end of scanlines. +For 16-bit per channel colors, uses big endian format like PNG does. +Return value is LodePNG error code +*/ +unsigned lodepng_convert(unsigned char* out, const unsigned char* in, + const LodePNGColorMode* mode_out, const LodePNGColorMode* mode_in, + unsigned w, unsigned h); + +#ifdef LODEPNG_COMPILE_DECODER +/* +Settings for the decoder. This contains settings for the PNG and the Zlib +decoder, but not the Info settings from the Info structs. +*/ +typedef struct LodePNGDecoderSettings { + LodePNGDecompressSettings zlibsettings; /*in here is the setting to ignore Adler32 checksums*/ + + /* Check LodePNGDecompressSettings for more ignorable errors such as ignore_adler32 */ + unsigned ignore_crc; /*ignore CRC checksums*/ + unsigned ignore_critical; /*ignore unknown critical chunks*/ + unsigned ignore_end; /*ignore issues at end of file if possible (missing IEND chunk, too large chunk, ...)*/ + /* TODO: make a system involving warnings with levels and a strict mode instead. Other potentially recoverable + errors: srgb rendering intent value, size of content of ancillary chunks, more than 79 characters for some + strings, placement/combination rules for ancillary chunks, crc of unknown chunks, allowed characters + in string keys, etc... */ + + unsigned color_convert; /*whether to convert the PNG to the color type you want. Default: yes*/ + +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + unsigned read_text_chunks; /*if false but remember_unknown_chunks is true, they're stored in the unknown chunks*/ + + /*store all bytes from unknown chunks in the LodePNGInfo (off by default, useful for a png editor)*/ + unsigned remember_unknown_chunks; + + /* maximum size for decompressed text chunks. If a text chunk's text is larger than this, an error is returned, + unless reading text chunks is disabled or this limit is set higher or disabled. Set to 0 to allow any size. + By default it is a value that prevents unreasonably large strings from hogging memory. */ + size_t max_text_size; + + /* maximum size for compressed ICC chunks. If the ICC profile is larger than this, an error will be returned. Set to + 0 to allow any size. By default this is a value that prevents ICC profiles that would be much larger than any + legitimate profile could be to hog memory. */ + size_t max_icc_size; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +} LodePNGDecoderSettings; + +void lodepng_decoder_settings_init(LodePNGDecoderSettings* settings); +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_ENCODER +/*automatically use color type with less bits per pixel if losslessly possible. Default: AUTO*/ +typedef enum LodePNGFilterStrategy { + /*every filter at zero*/ + LFS_ZERO = 0, + /*every filter at 1, 2, 3 or 4 (paeth), unlike LFS_ZERO not a good choice, but for testing*/ + LFS_ONE = 1, + LFS_TWO = 2, + LFS_THREE = 3, + LFS_FOUR = 4, + /*Use filter that gives minimum sum, as described in the official PNG filter heuristic.*/ + LFS_MINSUM, + /*Use the filter type that gives smallest Shannon entropy for this scanline. Depending + on the image, this is better or worse than minsum.*/ + LFS_ENTROPY, + /* + Brute-force-search PNG filters by compressing each filter for each scanline. + Experimental, very slow, and only rarely gives better compression than MINSUM. + */ + LFS_BRUTE_FORCE, + /*use predefined_filters buffer: you specify the filter type for each scanline*/ + LFS_PREDEFINED +} LodePNGFilterStrategy; + +/*Gives characteristics about the integer RGBA colors of the image (count, alpha channel usage, bit depth, ...), +which helps decide which color model to use for encoding. +Used internally by default if "auto_convert" is enabled. Public because it's useful for custom algorithms.*/ +typedef struct LodePNGColorStats { + unsigned colored; /*not grayscale*/ + unsigned key; /*image is not opaque and color key is possible instead of full alpha*/ + unsigned short key_r; /*key values, always as 16-bit, in 8-bit case the byte is duplicated, e.g. 65535 means 255*/ + unsigned short key_g; + unsigned short key_b; + unsigned alpha; /*image is not opaque and alpha channel or alpha palette required*/ + unsigned numcolors; /*amount of colors, up to 257. Not valid if bits == 16 or allow_palette is disabled.*/ + unsigned char palette[1024]; /*Remembers up to the first 256 RGBA colors, in no particular order, only valid when numcolors is valid*/ + unsigned bits; /*bits per channel (not for palette). 1,2 or 4 for grayscale only. 16 if 16-bit per channel required.*/ + size_t numpixels; + + /*user settings for computing/using the stats*/ + unsigned allow_palette; /*default 1. if 0, disallow choosing palette colortype in auto_choose_color, and don't count numcolors*/ + unsigned allow_greyscale; /*default 1. if 0, choose RGB or RGBA even if the image only has gray colors*/ +} LodePNGColorStats; + +void lodepng_color_stats_init(LodePNGColorStats* stats); + +/*Get a LodePNGColorStats of the image. The stats must already have been inited. +Returns error code (e.g. alloc fail) or 0 if ok.*/ +unsigned lodepng_compute_color_stats(LodePNGColorStats* stats, + const unsigned char* image, unsigned w, unsigned h, + const LodePNGColorMode* mode_in); + +/*Settings for the encoder.*/ +typedef struct LodePNGEncoderSettings { + LodePNGCompressSettings zlibsettings; /*settings for the zlib encoder, such as window size, ...*/ + + unsigned auto_convert; /*automatically choose output PNG color type. Default: true*/ + + /*If true, follows the official PNG heuristic: if the PNG uses a palette or lower than + 8 bit depth, set all filters to zero. Otherwise use the filter_strategy. Note that to + completely follow the official PNG heuristic, filter_palette_zero must be true and + filter_strategy must be LFS_MINSUM*/ + unsigned filter_palette_zero; + /*Which filter strategy to use when not using zeroes due to filter_palette_zero. + Set filter_palette_zero to 0 to ensure always using your chosen strategy. Default: LFS_MINSUM*/ + LodePNGFilterStrategy filter_strategy; + /*used if filter_strategy is LFS_PREDEFINED. In that case, this must point to a buffer with + the same length as the amount of scanlines in the image, and each value must <= 5. You + have to cleanup this buffer, LodePNG will never free it. Don't forget that filter_palette_zero + must be set to 0 to ensure this is also used on palette or low bitdepth images.*/ + const unsigned char* predefined_filters; + + /*force creating a PLTE chunk if colortype is 2 or 6 (= a suggested palette). + If colortype is 3, PLTE is _always_ created.*/ + unsigned force_palette; +#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS + /*add LodePNG identifier and version as a text chunk, for debugging*/ + unsigned add_id; + /*encode text chunks as zTXt chunks instead of tEXt chunks, and use compression in iTXt chunks*/ + unsigned text_compression; +#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/ +} LodePNGEncoderSettings; + +void lodepng_encoder_settings_init(LodePNGEncoderSettings* settings); +#endif /*LODEPNG_COMPILE_ENCODER*/ + + +#if defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) +/*The settings, state and information for extended encoding and decoding.*/ +typedef struct LodePNGState { +#ifdef LODEPNG_COMPILE_DECODER + LodePNGDecoderSettings decoder; /*the decoding settings*/ +#endif /*LODEPNG_COMPILE_DECODER*/ +#ifdef LODEPNG_COMPILE_ENCODER + LodePNGEncoderSettings encoder; /*the encoding settings*/ +#endif /*LODEPNG_COMPILE_ENCODER*/ + LodePNGColorMode info_raw; /*specifies the format in which you would like to get the raw pixel buffer*/ + LodePNGInfo info_png; /*info of the PNG image obtained after decoding*/ + unsigned error; +} LodePNGState; + +/*init, cleanup and copy functions to use with this struct*/ +void lodepng_state_init(LodePNGState* state); +void lodepng_state_cleanup(LodePNGState* state); +void lodepng_state_copy(LodePNGState* dest, const LodePNGState* source); +#endif /* defined(LODEPNG_COMPILE_DECODER) || defined(LODEPNG_COMPILE_ENCODER) */ + +#ifdef LODEPNG_COMPILE_DECODER +/* +Same as lodepng_decode_memory, but uses a LodePNGState to allow custom settings and +getting much more information about the PNG image and color mode. +*/ +unsigned lodepng_decode(unsigned char** out, unsigned* w, unsigned* h, + LodePNGState* state, + const unsigned char* in, size_t insize); + +/* +Read the PNG header, but not the actual data. This returns only the information +that is in the IHDR chunk of the PNG, such as width, height and color type. The +information is placed in the info_png field of the LodePNGState. +*/ +unsigned lodepng_inspect(unsigned* w, unsigned* h, + LodePNGState* state, + const unsigned char* in, size_t insize); +#endif /*LODEPNG_COMPILE_DECODER*/ + +/* +Reads one metadata chunk (other than IHDR) of the PNG file and outputs what it +read in the state. Returns error code on failure. +Use lodepng_inspect first with a new state, then e.g. lodepng_chunk_find_const +to find the desired chunk type, and if non null use lodepng_inspect_chunk (with +chunk_pointer - start_of_file as pos). +Supports most metadata chunks from the PNG standard (gAMA, bKGD, tEXt, ...). +Ignores unsupported, unknown, non-metadata or IHDR chunks (without error). +Requirements: &in[pos] must point to start of a chunk, must use regular +lodepng_inspect first since format of most other chunks depends on IHDR, and if +there is a PLTE chunk, that one must be inspected before tRNS or bKGD. +*/ +unsigned lodepng_inspect_chunk(LodePNGState* state, size_t pos, + const unsigned char* in, size_t insize); + +#ifdef LODEPNG_COMPILE_ENCODER +/*This function allocates the out buffer with standard malloc and stores the size in *outsize.*/ +unsigned lodepng_encode(unsigned char** out, size_t* outsize, + const unsigned char* image, unsigned w, unsigned h, + LodePNGState* state); +#endif /*LODEPNG_COMPILE_ENCODER*/ + +/* +The lodepng_chunk functions are normally not needed, except to traverse the +unknown chunks stored in the LodePNGInfo struct, or add new ones to it. +It also allows traversing the chunks of an encoded PNG file yourself. + +The chunk pointer always points to the beginning of the chunk itself, that is +the first byte of the 4 length bytes. + +In the PNG file format, chunks have the following format: +-4 bytes length: length of the data of the chunk in bytes (chunk itself is 12 bytes longer) +-4 bytes chunk type (ASCII a-z,A-Z only, see below) +-length bytes of data (may be 0 bytes if length was 0) +-4 bytes of CRC, computed on chunk name + data + +The first chunk starts at the 8th byte of the PNG file, the entire rest of the file +exists out of concatenated chunks with the above format. + +PNG standard chunk ASCII naming conventions: +-First byte: uppercase = critical, lowercase = ancillary +-Second byte: uppercase = public, lowercase = private +-Third byte: must be uppercase +-Fourth byte: uppercase = unsafe to copy, lowercase = safe to copy +*/ + +/* +Gets the length of the data of the chunk. Total chunk length has 12 bytes more. +There must be at least 4 bytes to read from. If the result value is too large, +it may be corrupt data. +*/ +unsigned lodepng_chunk_length(const unsigned char* chunk); + +/*puts the 4-byte type in null terminated string*/ +void lodepng_chunk_type(char type[5], const unsigned char* chunk); + +/*check if the type is the given type*/ +unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, const char* type); + +/*0: it's one of the critical chunk types, 1: it's an ancillary chunk (see PNG standard)*/ +unsigned char lodepng_chunk_ancillary(const unsigned char* chunk); + +/*0: public, 1: private (see PNG standard)*/ +unsigned char lodepng_chunk_private(const unsigned char* chunk); + +/*0: the chunk is unsafe to copy, 1: the chunk is safe to copy (see PNG standard)*/ +unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk); + +/*get pointer to the data of the chunk, where the input points to the header of the chunk*/ +unsigned char* lodepng_chunk_data(unsigned char* chunk); +const unsigned char* lodepng_chunk_data_const(const unsigned char* chunk); + +/*returns 0 if the crc is correct, 1 if it's incorrect (0 for OK as usual!)*/ +unsigned lodepng_chunk_check_crc(const unsigned char* chunk); + +/*generates the correct CRC from the data and puts it in the last 4 bytes of the chunk*/ +void lodepng_chunk_generate_crc(unsigned char* chunk); + +/* +Iterate to next chunks, allows iterating through all chunks of the PNG file. +Input must be at the beginning of a chunk (result of a previous lodepng_chunk_next call, +or the 8th byte of a PNG file which always has the first chunk), or alternatively may +point to the first byte of the PNG file (which is not a chunk but the magic header, the +function will then skip over it and return the first real chunk). +Will output pointer to the start of the next chunk, or at or beyond end of the file if there +is no more chunk after this or possibly if the chunk is corrupt. +Start this process at the 8th byte of the PNG file. +In a non-corrupt PNG file, the last chunk should have name "IEND". +*/ +unsigned char* lodepng_chunk_next(unsigned char* chunk, unsigned char* end); +const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk, const unsigned char* end); + +/*Finds the first chunk with the given type in the range [chunk, end), or returns NULL if not found.*/ +unsigned char* lodepng_chunk_find(unsigned char* chunk, unsigned char* end, const char type[5]); +const unsigned char* lodepng_chunk_find_const(const unsigned char* chunk, const unsigned char* end, const char type[5]); + +/* +Appends chunk to the data in out. The given chunk should already have its chunk header. +The out variable and outsize are updated to reflect the new reallocated buffer. +Returns error code (0 if it went ok) +*/ +unsigned lodepng_chunk_append(unsigned char** out, size_t* outsize, const unsigned char* chunk); + +/* +Appends new chunk to out. The chunk to append is given by giving its length, type +and data separately. The type is a 4-letter string. +The out variable and outsize are updated to reflect the new reallocated buffer. +Returne error code (0 if it went ok) +*/ +unsigned lodepng_chunk_create(unsigned char** out, size_t* outsize, unsigned length, + const char* type, const unsigned char* data); + + +/*Calculate CRC32 of buffer*/ +unsigned lodepng_crc32(const unsigned char* buf, size_t len); +#endif /*LODEPNG_COMPILE_PNG*/ + + +#ifdef LODEPNG_COMPILE_ZLIB +/* +This zlib part can be used independently to zlib compress and decompress a +buffer. It cannot be used to create gzip files however, and it only supports the +part of zlib that is required for PNG, it does not support dictionaries. +*/ + +#ifdef LODEPNG_COMPILE_DECODER +/*Inflate a buffer. Inflate is the decompression step of deflate. Out buffer must be freed after use.*/ +unsigned lodepng_inflate(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGDecompressSettings* settings); + +/* +Decompresses Zlib data. Reallocates the out buffer and appends the data. The +data must be according to the zlib specification. +Either, *out must be NULL and *outsize must be 0, or, *out must be a valid +buffer and *outsize its size in bytes. out must be freed by user after usage. +*/ +unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGDecompressSettings* settings); +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_ENCODER +/* +Compresses data with Zlib. Reallocates the out buffer and appends the data. +Zlib adds a small header and trailer around the deflate data. +The data is output in the format of the zlib specification. +Either, *out must be NULL and *outsize must be 0, or, *out must be a valid +buffer and *outsize its size in bytes. out must be freed by user after usage. +*/ +unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGCompressSettings* settings); + +/* +Find length-limited Huffman code for given frequencies. This function is in the +public interface only for tests, it's used internally by lodepng_deflate. +*/ +unsigned lodepng_huffman_code_lengths(unsigned* lengths, const unsigned* frequencies, + size_t numcodes, unsigned maxbitlen); + +/*Compress a buffer with deflate. See RFC 1951. Out buffer must be freed after use.*/ +unsigned lodepng_deflate(unsigned char** out, size_t* outsize, + const unsigned char* in, size_t insize, + const LodePNGCompressSettings* settings); + +#endif /*LODEPNG_COMPILE_ENCODER*/ +#endif /*LODEPNG_COMPILE_ZLIB*/ + +#ifdef LODEPNG_COMPILE_DISK +/* +Load a file from disk into buffer. The function allocates the out buffer, and +after usage you should free it. +out: output parameter, contains pointer to loaded buffer. +outsize: output parameter, size of the allocated out buffer +filename: the path to the file to load +return value: error code (0 means ok) + +NOTE: Wide-character filenames are not supported, you can use an external method +to handle such files and decode in-memory. +*/ +unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* filename); + +/* +Save a file from buffer to disk. Warning, if it exists, this function overwrites +the file without warning! +buffer: the buffer to write +buffersize: size of the buffer to write +filename: the path to the file to save to +return value: error code (0 means ok) + +NOTE: Wide-character filenames are not supported, you can use an external method +to handle such files and encode in-memory +*/ +unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename); +#endif /*LODEPNG_COMPILE_DISK*/ + +#ifdef LODEPNG_COMPILE_CPP +/* The LodePNG C++ wrapper uses std::vectors instead of manually allocated memory buffers. */ +namespace lodepng { +#ifdef LODEPNG_COMPILE_PNG +class State : public LodePNGState { + public: + State(); + State(const State& other); + ~State(); + State& operator=(const State& other); +}; + +#ifdef LODEPNG_COMPILE_DECODER +/* Same as other lodepng::decode, but using a State for more settings and information. */ +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + State& state, + const unsigned char* in, size_t insize); +unsigned decode(std::vector& out, unsigned& w, unsigned& h, + State& state, + const std::vector& in); +#endif /*LODEPNG_COMPILE_DECODER*/ + +#ifdef LODEPNG_COMPILE_ENCODER +/* Same as other lodepng::encode, but using a State for more settings and information. */ +unsigned encode(std::vector& out, + const unsigned char* in, unsigned w, unsigned h, + State& state); +unsigned encode(std::vector& out, + const std::vector& in, unsigned w, unsigned h, + State& state); +#endif /*LODEPNG_COMPILE_ENCODER*/ + +#ifdef LODEPNG_COMPILE_DISK +/* +Load a file from disk into an std::vector. +return value: error code (0 means ok) + +NOTE: Wide-character filenames are not supported, you can use an external method +to handle such files and decode in-memory +*/ +unsigned load_file(std::vector& buffer, const std::string& filename); + +/* +Save the binary data in an std::vector to a file on disk. The file is overwritten +without warning. + +NOTE: Wide-character filenames are not supported, you can use an external method +to handle such files and encode in-memory +*/ +unsigned save_file(const std::vector& buffer, const std::string& filename); +#endif /* LODEPNG_COMPILE_DISK */ +#endif /* LODEPNG_COMPILE_PNG */ + +#ifdef LODEPNG_COMPILE_ZLIB +#ifdef LODEPNG_COMPILE_DECODER +/* Zlib-decompress an unsigned char buffer */ +unsigned decompress(std::vector& out, const unsigned char* in, size_t insize, + const LodePNGDecompressSettings& settings = lodepng_default_decompress_settings); + +/* Zlib-decompress an std::vector */ +unsigned decompress(std::vector& out, const std::vector& in, + const LodePNGDecompressSettings& settings = lodepng_default_decompress_settings); +#endif /* LODEPNG_COMPILE_DECODER */ + +#ifdef LODEPNG_COMPILE_ENCODER +/* Zlib-compress an unsigned char buffer */ +unsigned compress(std::vector& out, const unsigned char* in, size_t insize, + const LodePNGCompressSettings& settings = lodepng_default_compress_settings); + +/* Zlib-compress an std::vector */ +unsigned compress(std::vector& out, const std::vector& in, + const LodePNGCompressSettings& settings = lodepng_default_compress_settings); +#endif /* LODEPNG_COMPILE_ENCODER */ +#endif /* LODEPNG_COMPILE_ZLIB */ +} /* namespace lodepng */ +#endif /*LODEPNG_COMPILE_CPP*/ + +/* +TODO: +[.] test if there are no memory leaks or security exploits - done a lot but needs to be checked often +[.] check compatibility with various compilers - done but needs to be redone for every newer version +[X] converting color to 16-bit per channel types +[X] support color profile chunk types (but never let them touch RGB values by default) +[ ] support all public PNG chunk types (almost done except sBIT, sPLT and hIST) +[ ] make sure encoder generates no chunks with size > (2^31)-1 +[ ] partial decoding (stream processing) +[X] let the "isFullyOpaque" function check color keys and transparent palettes too +[X] better name for the variables "codes", "codesD", "codelengthcodes", "clcl" and "lldl" +[ ] allow treating some errors like warnings, when image is recoverable (e.g. 69, 57, 58) +[ ] make warnings like: oob palette, checksum fail, data after iend, wrong/unknown crit chunk, no null terminator in text, ... +[ ] error messages with line numbers (and version) +[ ] errors in state instead of as return code? +[ ] new errors/warnings like suspiciously big decompressed ztxt or iccp chunk +[ ] let the C++ wrapper catch exceptions coming from the standard library and return LodePNG error codes +[ ] allow user to provide custom color conversion functions, e.g. for premultiplied alpha, padding bits or not, ... +[ ] allow user to give data (void*) to custom allocator +[X] provide alternatives for C library functions not present on some platforms (memcpy, ...) +*/ + +#endif /*LODEPNG_H inclusion guard*/ + +/* +LodePNG Documentation +--------------------- + +0. table of contents +-------------------- + + 1. about + 1.1. supported features + 1.2. features not supported + 2. C and C++ version + 3. security + 4. decoding + 5. encoding + 6. color conversions + 6.1. PNG color types + 6.2. color conversions + 6.3. padding bits + 6.4. A note about 16-bits per channel and endianness + 7. error values + 8. chunks and PNG editing + 9. compiler support + 10. examples + 10.1. decoder C++ example + 10.2. decoder C example + 11. state settings reference + 12. changes + 13. contact information + + +1. about +-------- + +PNG is a file format to store raster images losslessly with good compression, +supporting different color types and alpha channel. + +LodePNG is a PNG codec according to the Portable Network Graphics (PNG) +Specification (Second Edition) - W3C Recommendation 10 November 2003. + +The specifications used are: + +*) Portable Network Graphics (PNG) Specification (Second Edition): + http://www.w3.org/TR/2003/REC-PNG-20031110 +*) RFC 1950 ZLIB Compressed Data Format version 3.3: + http://www.gzip.org/zlib/rfc-zlib.html +*) RFC 1951 DEFLATE Compressed Data Format Specification ver 1.3: + http://www.gzip.org/zlib/rfc-deflate.html + +The most recent version of LodePNG can currently be found at +http://lodev.org/lodepng/ + +LodePNG works both in C (ISO C90) and C++, with a C++ wrapper that adds +extra functionality. + +LodePNG exists out of two files: +-lodepng.h: the header file for both C and C++ +-lodepng.c(pp): give it the name lodepng.c or lodepng.cpp (or .cc) depending on your usage + +If you want to start using LodePNG right away without reading this doc, get the +examples from the LodePNG website to see how to use it in code, or check the +smaller examples in chapter 13 here. + +LodePNG is simple but only supports the basic requirements. To achieve +simplicity, the following design choices were made: There are no dependencies +on any external library. There are functions to decode and encode a PNG with +a single function call, and extended versions of these functions taking a +LodePNGState struct allowing to specify or get more information. By default +the colors of the raw image are always RGB or RGBA, no matter what color type +the PNG file uses. To read and write files, there are simple functions to +convert the files to/from buffers in memory. + +This all makes LodePNG suitable for loading textures in games, demos and small +programs, ... It's less suitable for full fledged image editors, loading PNGs +over network (it requires all the image data to be available before decoding can +begin), life-critical systems, ... + +1.1. supported features +----------------------- + +The following features are supported by the decoder: + +*) decoding of PNGs with any color type, bit depth and interlace mode, to a 24- or 32-bit color raw image, + or the same color type as the PNG +*) encoding of PNGs, from any raw image to 24- or 32-bit color, or the same color type as the raw image +*) Adam7 interlace and deinterlace for any color type +*) loading the image from harddisk or decoding it from a buffer from other sources than harddisk +*) support for alpha channels, including RGBA color model, translucent palettes and color keying +*) zlib decompression (inflate) +*) zlib compression (deflate) +*) CRC32 and ADLER32 checksums +*) colorimetric color profile conversions: currently experimentally available in lodepng_util.cpp only, + plus alternatively ability to pass on chroma/gamma/ICC profile information to other color management system. +*) handling of unknown chunks, allowing making a PNG editor that stores custom and unknown chunks. +*) the following chunks are supported by both encoder and decoder: + IHDR: header information + PLTE: color palette + IDAT: pixel data + IEND: the final chunk + tRNS: transparency for palettized images + tEXt: textual information + zTXt: compressed textual information + iTXt: international textual information + bKGD: suggested background color + pHYs: physical dimensions + tIME: modification time + cHRM: RGB chromaticities + gAMA: RGB gamma correction + iCCP: ICC color profile + sRGB: rendering intent + +1.2. features not supported +--------------------------- + +The following features are _not_ supported: + +*) some features needed to make a conformant PNG-Editor might be still missing. +*) partial loading/stream processing. All data must be available and is processed in one call. +*) The following public chunks are not (yet) supported but treated as unknown chunks by LodePNG: + sBIT + hIST + sPLT + + +2. C and C++ version +-------------------- + +The C version uses buffers allocated with alloc that you need to free() +yourself. You need to use init and cleanup functions for each struct whenever +using a struct from the C version to avoid exploits and memory leaks. + +The C++ version has extra functions with std::vectors in the interface and the +lodepng::State class which is a LodePNGState with constructor and destructor. + +These files work without modification for both C and C++ compilers because all +the additional C++ code is in "#ifdef __cplusplus" blocks that make C-compilers +ignore it, and the C code is made to compile both with strict ISO C90 and C++. + +To use the C++ version, you need to rename the source file to lodepng.cpp +(instead of lodepng.c), and compile it with a C++ compiler. + +To use the C version, you need to rename the source file to lodepng.c (instead +of lodepng.cpp), and compile it with a C compiler. + + +3. Security +----------- + +Even if carefully designed, it's always possible that LodePNG contains possible +exploits. If you discover one, please let me know, and it will be fixed. + +When using LodePNG, care has to be taken with the C version of LodePNG, as well +as the C-style structs when working with C++. The following conventions are used +for all C-style structs: + +-if a struct has a corresponding init function, always call the init function when making a new one +-if a struct has a corresponding cleanup function, call it before the struct disappears to avoid memory leaks +-if a struct has a corresponding copy function, use the copy function instead of "=". + The destination must also be inited already. + + +4. Decoding +----------- + +Decoding converts a PNG compressed image to a raw pixel buffer. + +Most documentation on using the decoder is at its declarations in the header +above. For C, simple decoding can be done with functions such as +lodepng_decode32, and more advanced decoding can be done with the struct +LodePNGState and lodepng_decode. For C++, all decoding can be done with the +various lodepng::decode functions, and lodepng::State can be used for advanced +features. + +When using the LodePNGState, it uses the following fields for decoding: +*) LodePNGInfo info_png: it stores extra information about the PNG (the input) in here +*) LodePNGColorMode info_raw: here you can say what color mode of the raw image (the output) you want to get +*) LodePNGDecoderSettings decoder: you can specify a few extra settings for the decoder to use + +LodePNGInfo info_png +-------------------- + +After decoding, this contains extra information of the PNG image, except the actual +pixels, width and height because these are already gotten directly from the decoder +functions. + +It contains for example the original color type of the PNG image, text comments, +suggested background color, etc... More details about the LodePNGInfo struct are +at its declaration documentation. + +LodePNGColorMode info_raw +------------------------- + +When decoding, here you can specify which color type you want +the resulting raw image to be. If this is different from the colortype of the +PNG, then the decoder will automatically convert the result. This conversion +always works, except if you want it to convert a color PNG to grayscale or to +a palette with missing colors. + +By default, 32-bit color is used for the result. + +LodePNGDecoderSettings decoder +------------------------------ + +The settings can be used to ignore the errors created by invalid CRC and Adler32 +chunks, and to disable the decoding of tEXt chunks. + +There's also a setting color_convert, true by default. If false, no conversion +is done, the resulting data will be as it was in the PNG (after decompression) +and you'll have to puzzle the colors of the pixels together yourself using the +color type information in the LodePNGInfo. + + +5. Encoding +----------- + +Encoding converts a raw pixel buffer to a PNG compressed image. + +Most documentation on using the encoder is at its declarations in the header +above. For C, simple encoding can be done with functions such as +lodepng_encode32, and more advanced decoding can be done with the struct +LodePNGState and lodepng_encode. For C++, all encoding can be done with the +various lodepng::encode functions, and lodepng::State can be used for advanced +features. + +Like the decoder, the encoder can also give errors. However it gives less errors +since the encoder input is trusted, the decoder input (a PNG image that could +be forged by anyone) is not trusted. + +When using the LodePNGState, it uses the following fields for encoding: +*) LodePNGInfo info_png: here you specify how you want the PNG (the output) to be. +*) LodePNGColorMode info_raw: here you say what color type of the raw image (the input) has +*) LodePNGEncoderSettings encoder: you can specify a few settings for the encoder to use + +LodePNGInfo info_png +-------------------- + +When encoding, you use this the opposite way as when decoding: for encoding, +you fill in the values you want the PNG to have before encoding. By default it's +not needed to specify a color type for the PNG since it's automatically chosen, +but it's possible to choose it yourself given the right settings. + +The encoder will not always exactly match the LodePNGInfo struct you give, +it tries as close as possible. Some things are ignored by the encoder. The +encoder uses, for example, the following settings from it when applicable: +colortype and bitdepth, text chunks, time chunk, the color key, the palette, the +background color, the interlace method, unknown chunks, ... + +When encoding to a PNG with colortype 3, the encoder will generate a PLTE chunk. +If the palette contains any colors for which the alpha channel is not 255 (so +there are translucent colors in the palette), it'll add a tRNS chunk. + +LodePNGColorMode info_raw +------------------------- + +You specify the color type of the raw image that you give to the input here, +including a possible transparent color key and palette you happen to be using in +your raw image data. + +By default, 32-bit color is assumed, meaning your input has to be in RGBA +format with 4 bytes (unsigned chars) per pixel. + +LodePNGEncoderSettings encoder +------------------------------ + +The following settings are supported (some are in sub-structs): +*) auto_convert: when this option is enabled, the encoder will +automatically choose the smallest possible color mode (including color key) that +can encode the colors of all pixels without information loss. +*) btype: the block type for LZ77. 0 = uncompressed, 1 = fixed huffman tree, + 2 = dynamic huffman tree (best compression). Should be 2 for proper + compression. +*) use_lz77: whether or not to use LZ77 for compressed block types. Should be + true for proper compression. +*) windowsize: the window size used by the LZ77 encoder (1 - 32768). Has value + 2048 by default, but can be set to 32768 for better, but slow, compression. +*) force_palette: if colortype is 2 or 6, you can make the encoder write a PLTE + chunk if force_palette is true. This can used as suggested palette to convert + to by viewers that don't support more than 256 colors (if those still exist) +*) add_id: add text chunk "Encoder: LodePNG " to the image. +*) text_compression: default 1. If 1, it'll store texts as zTXt instead of tEXt chunks. + zTXt chunks use zlib compression on the text. This gives a smaller result on + large texts but a larger result on small texts (such as a single program name). + It's all tEXt or all zTXt though, there's no separate setting per text yet. + + +6. color conversions +-------------------- + +An important thing to note about LodePNG, is that the color type of the PNG, and +the color type of the raw image, are completely independent. By default, when +you decode a PNG, you get the result as a raw image in the color type you want, +no matter whether the PNG was encoded with a palette, grayscale or RGBA color. +And if you encode an image, by default LodePNG will automatically choose the PNG +color type that gives good compression based on the values of colors and amount +of colors in the image. It can be configured to let you control it instead as +well, though. + +To be able to do this, LodePNG does conversions from one color mode to another. +It can convert from almost any color type to any other color type, except the +following conversions: RGB to grayscale is not supported, and converting to a +palette when the palette doesn't have a required color is not supported. This is +not supported on purpose: this is information loss which requires a color +reduction algorithm that is beyond the scope of a PNG encoder (yes, RGB to gray +is easy, but there are multiple ways if you want to give some channels more +weight). + +By default, when decoding, you get the raw image in 32-bit RGBA or 24-bit RGB +color, no matter what color type the PNG has. And by default when encoding, +LodePNG automatically picks the best color model for the output PNG, and expects +the input image to be 32-bit RGBA or 24-bit RGB. So, unless you want to control +the color format of the images yourself, you can skip this chapter. + +6.1. PNG color types +-------------------- + +A PNG image can have many color types, ranging from 1-bit color to 64-bit color, +as well as palettized color modes. After the zlib decompression and unfiltering +in the PNG image is done, the raw pixel data will have that color type and thus +a certain amount of bits per pixel. If you want the output raw image after +decoding to have another color type, a conversion is done by LodePNG. + +The PNG specification gives the following color types: + +0: grayscale, bit depths 1, 2, 4, 8, 16 +2: RGB, bit depths 8 and 16 +3: palette, bit depths 1, 2, 4 and 8 +4: grayscale with alpha, bit depths 8 and 16 +6: RGBA, bit depths 8 and 16 + +Bit depth is the amount of bits per pixel per color channel. So the total amount +of bits per pixel is: amount of channels * bitdepth. + +6.2. color conversions +---------------------- + +As explained in the sections about the encoder and decoder, you can specify +color types and bit depths in info_png and info_raw to change the default +behaviour. + +If, when decoding, you want the raw image to be something else than the default, +you need to set the color type and bit depth you want in the LodePNGColorMode, +or the parameters colortype and bitdepth of the simple decoding function. + +If, when encoding, you use another color type than the default in the raw input +image, you need to specify its color type and bit depth in the LodePNGColorMode +of the raw image, or use the parameters colortype and bitdepth of the simple +encoding function. + +If, when encoding, you don't want LodePNG to choose the output PNG color type +but control it yourself, you need to set auto_convert in the encoder settings +to false, and specify the color type you want in the LodePNGInfo of the +encoder (including palette: it can generate a palette if auto_convert is true, +otherwise not). + +If the input and output color type differ (whether user chosen or auto chosen), +LodePNG will do a color conversion, which follows the rules below, and may +sometimes result in an error. + +To avoid some confusion: +-the decoder converts from PNG to raw image +-the encoder converts from raw image to PNG +-the colortype and bitdepth in LodePNGColorMode info_raw, are those of the raw image +-the colortype and bitdepth in the color field of LodePNGInfo info_png, are those of the PNG +-when encoding, the color type in LodePNGInfo is ignored if auto_convert + is enabled, it is automatically generated instead +-when decoding, the color type in LodePNGInfo is set by the decoder to that of the original + PNG image, but it can be ignored since the raw image has the color type you requested instead +-if the color type of the LodePNGColorMode and PNG image aren't the same, a conversion + between the color types is done if the color types are supported. If it is not + supported, an error is returned. If the types are the same, no conversion is done. +-even though some conversions aren't supported, LodePNG supports loading PNGs from any + colortype and saving PNGs to any colortype, sometimes it just requires preparing + the raw image correctly before encoding. +-both encoder and decoder use the same color converter. + +The function lodepng_convert does the color conversion. It is available in the +interface but normally isn't needed since the encoder and decoder already call +it. + +Non supported color conversions: +-color to grayscale when non-gray pixels are present: no error is thrown, but +the result will look ugly because only the red channel is taken (it assumes all +three channels are the same in this case so ignores green and blue). The reason +no error is given is to allow converting from three-channel grayscale images to +one-channel even if there are numerical imprecisions. +-anything to palette when the palette does not have an exact match for a from-color +in it: in this case an error is thrown + +Supported color conversions: +-anything to 8-bit RGB, 8-bit RGBA, 16-bit RGB, 16-bit RGBA +-any gray or gray+alpha, to gray or gray+alpha +-anything to a palette, as long as the palette has the requested colors in it +-removing alpha channel +-higher to smaller bitdepth, and vice versa + +If you want no color conversion to be done (e.g. for speed or control): +-In the encoder, you can make it save a PNG with any color type by giving the +raw color mode and LodePNGInfo the same color mode, and setting auto_convert to +false. +-In the decoder, you can make it store the pixel data in the same color type +as the PNG has, by setting the color_convert setting to false. Settings in +info_raw are then ignored. + +6.3. padding bits +----------------- + +In the PNG file format, if a less than 8-bit per pixel color type is used and the scanlines +have a bit amount that isn't a multiple of 8, then padding bits are used so that each +scanline starts at a fresh byte. But that is NOT true for the LodePNG raw input and output. +The raw input image you give to the encoder, and the raw output image you get from the decoder +will NOT have these padding bits, e.g. in the case of a 1-bit image with a width +of 7 pixels, the first pixel of the second scanline will the 8th bit of the first byte, +not the first bit of a new byte. + +6.4. A note about 16-bits per channel and endianness +---------------------------------------------------- + +LodePNG uses unsigned char arrays for 16-bit per channel colors too, just like +for any other color format. The 16-bit values are stored in big endian (most +significant byte first) in these arrays. This is the opposite order of the +little endian used by x86 CPU's. + +LodePNG always uses big endian because the PNG file format does so internally. +Conversions to other formats than PNG uses internally are not supported by +LodePNG on purpose, there are myriads of formats, including endianness of 16-bit +colors, the order in which you store R, G, B and A, and so on. Supporting and +converting to/from all that is outside the scope of LodePNG. + +This may mean that, depending on your use case, you may want to convert the big +endian output of LodePNG to little endian with a for loop. This is certainly not +always needed, many applications and libraries support big endian 16-bit colors +anyway, but it means you cannot simply cast the unsigned char* buffer to an +unsigned short* buffer on x86 CPUs. + + +7. error values +--------------- + +All functions in LodePNG that return an error code, return 0 if everything went +OK, or a non-zero code if there was an error. + +The meaning of the LodePNG error values can be retrieved with the function +lodepng_error_text: given the numerical error code, it returns a description +of the error in English as a string. + +Check the implementation of lodepng_error_text to see the meaning of each code. + +It is not recommended to use the numerical values to programmatically make +different decisions based on error types as the numbers are not guaranteed to +stay backwards compatible. They are for human consumption only. Programmatically +only 0 or non-0 matter. + + +8. chunks and PNG editing +------------------------- + +If you want to add extra chunks to a PNG you encode, or use LodePNG for a PNG +editor that should follow the rules about handling of unknown chunks, or if your +program is able to read other types of chunks than the ones handled by LodePNG, +then that's possible with the chunk functions of LodePNG. + +A PNG chunk has the following layout: + +4 bytes length +4 bytes type name +length bytes data +4 bytes CRC + +8.1. iterating through chunks +----------------------------- + +If you have a buffer containing the PNG image data, then the first chunk (the +IHDR chunk) starts at byte number 8 of that buffer. The first 8 bytes are the +signature of the PNG and are not part of a chunk. But if you start at byte 8 +then you have a chunk, and can check the following things of it. + +NOTE: none of these functions check for memory buffer boundaries. To avoid +exploits, always make sure the buffer contains all the data of the chunks. +When using lodepng_chunk_next, make sure the returned value is within the +allocated memory. + +unsigned lodepng_chunk_length(const unsigned char* chunk): + +Get the length of the chunk's data. The total chunk length is this length + 12. + +void lodepng_chunk_type(char type[5], const unsigned char* chunk): +unsigned char lodepng_chunk_type_equals(const unsigned char* chunk, const char* type): + +Get the type of the chunk or compare if it's a certain type + +unsigned char lodepng_chunk_critical(const unsigned char* chunk): +unsigned char lodepng_chunk_private(const unsigned char* chunk): +unsigned char lodepng_chunk_safetocopy(const unsigned char* chunk): + +Check if the chunk is critical in the PNG standard (only IHDR, PLTE, IDAT and IEND are). +Check if the chunk is private (public chunks are part of the standard, private ones not). +Check if the chunk is safe to copy. If it's not, then, when modifying data in a critical +chunk, unsafe to copy chunks of the old image may NOT be saved in the new one if your +program doesn't handle that type of unknown chunk. + +unsigned char* lodepng_chunk_data(unsigned char* chunk): +const unsigned char* lodepng_chunk_data_const(const unsigned char* chunk): + +Get a pointer to the start of the data of the chunk. + +unsigned lodepng_chunk_check_crc(const unsigned char* chunk): +void lodepng_chunk_generate_crc(unsigned char* chunk): + +Check if the crc is correct or generate a correct one. + +unsigned char* lodepng_chunk_next(unsigned char* chunk): +const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk): + +Iterate to the next chunk. This works if you have a buffer with consecutive chunks. Note that these +functions do no boundary checking of the allocated data whatsoever, so make sure there is enough +data available in the buffer to be able to go to the next chunk. + +unsigned lodepng_chunk_append(unsigned char** out, size_t* outsize, const unsigned char* chunk): +unsigned lodepng_chunk_create(unsigned char** out, size_t* outsize, unsigned length, + const char* type, const unsigned char* data): + +These functions are used to create new chunks that are appended to the data in *out that has +length *outsize. The append function appends an existing chunk to the new data. The create +function creates a new chunk with the given parameters and appends it. Type is the 4-letter +name of the chunk. + +8.2. chunks in info_png +----------------------- + +The LodePNGInfo struct contains fields with the unknown chunk in it. It has 3 +buffers (each with size) to contain 3 types of unknown chunks: +the ones that come before the PLTE chunk, the ones that come between the PLTE +and the IDAT chunks, and the ones that come after the IDAT chunks. +It's necessary to make the distinction between these 3 cases because the PNG +standard forces to keep the ordering of unknown chunks compared to the critical +chunks, but does not force any other ordering rules. + +info_png.unknown_chunks_data[0] is the chunks before PLTE +info_png.unknown_chunks_data[1] is the chunks after PLTE, before IDAT +info_png.unknown_chunks_data[2] is the chunks after IDAT + +The chunks in these 3 buffers can be iterated through and read by using the same +way described in the previous subchapter. + +When using the decoder to decode a PNG, you can make it store all unknown chunks +if you set the option settings.remember_unknown_chunks to 1. By default, this +option is off (0). + +The encoder will always encode unknown chunks that are stored in the info_png. +If you need it to add a particular chunk that isn't known by LodePNG, you can +use lodepng_chunk_append or lodepng_chunk_create to the chunk data in +info_png.unknown_chunks_data[x]. + +Chunks that are known by LodePNG should not be added in that way. E.g. to make +LodePNG add a bKGD chunk, set background_defined to true and add the correct +parameters there instead. + + +9. compiler support +------------------- + +No libraries other than the current standard C library are needed to compile +LodePNG. For the C++ version, only the standard C++ library is needed on top. +Add the files lodepng.c(pp) and lodepng.h to your project, include +lodepng.h where needed, and your program can read/write PNG files. + +It is compatible with C90 and up, and C++03 and up. + +If performance is important, use optimization when compiling! For both the +encoder and decoder, this makes a large difference. + +Make sure that LodePNG is compiled with the same compiler of the same version +and with the same settings as the rest of the program, or the interfaces with +std::vectors and std::strings in C++ can be incompatible. + +CHAR_BITS must be 8 or higher, because LodePNG uses unsigned chars for octets. + +*) gcc and g++ + +LodePNG is developed in gcc so this compiler is natively supported. It gives no +warnings with compiler options "-Wall -Wextra -pedantic -ansi", with gcc and g++ +version 4.7.1 on Linux, 32-bit and 64-bit. + +*) Clang + +Fully supported and warning-free. + +*) Mingw + +The Mingw compiler (a port of gcc for Windows) should be fully supported by +LodePNG. + +*) Visual Studio and Visual C++ Express Edition + +LodePNG should be warning-free with warning level W4. Two warnings were disabled +with pragmas though: warning 4244 about implicit conversions, and warning 4996 +where it wants to use a non-standard function fopen_s instead of the standard C +fopen. + +Visual Studio may want "stdafx.h" files to be included in each source file and +give an error "unexpected end of file while looking for precompiled header". +This is not standard C++ and will not be added to the stock LodePNG. You can +disable it for lodepng.cpp only by right clicking it, Properties, C/C++, +Precompiled Headers, and set it to Not Using Precompiled Headers there. + +NOTE: Modern versions of VS should be fully supported, but old versions, e.g. +VS6, are not guaranteed to work. + +*) Compilers on Macintosh + +LodePNG has been reported to work both with gcc and LLVM for Macintosh, both for +C and C++. + +*) Other Compilers + +If you encounter problems on any compilers, feel free to let me know and I may +try to fix it if the compiler is modern and standards compliant. + + +10. examples +------------ + +This decoder example shows the most basic usage of LodePNG. More complex +examples can be found on the LodePNG website. + +NOTE: these examples do not support wide-character filenames, you can use an +external method to handle such files and encode or decode in-memory + +10.1. decoder C++ example +------------------------- + +#include "lodepng.h" +#include + +int main(int argc, char *argv[]) { + const char* filename = argc > 1 ? argv[1] : "test.png"; + + //load and decode + std::vector image; + unsigned width, height; + unsigned error = lodepng::decode(image, width, height, filename); + + //if there's an error, display it + if(error) std::cout << "decoder error " << error << ": " << lodepng_error_text(error) << std::endl; + + //the pixels are now in the vector "image", 4 bytes per pixel, ordered RGBARGBA..., use it as texture, draw it, ... +} + +10.2. decoder C example +----------------------- + +#include "lodepng.h" + +int main(int argc, char *argv[]) { + unsigned error; + unsigned char* image; + size_t width, height; + const char* filename = argc > 1 ? argv[1] : "test.png"; + + error = lodepng_decode32_file(&image, &width, &height, filename); + + if(error) printf("decoder error %u: %s\n", error, lodepng_error_text(error)); + + / * use image here * / + + free(image); + return 0; +} + +11. state settings reference +---------------------------- + +A quick reference of some settings to set on the LodePNGState + +For decoding: + +state.decoder.zlibsettings.ignore_adler32: ignore ADLER32 checksums +state.decoder.zlibsettings.custom_...: use custom inflate function +state.decoder.ignore_crc: ignore CRC checksums +state.decoder.ignore_critical: ignore unknown critical chunks +state.decoder.ignore_end: ignore missing IEND chunk. May fail if this corruption causes other errors +state.decoder.color_convert: convert internal PNG color to chosen one +state.decoder.read_text_chunks: whether to read in text metadata chunks +state.decoder.remember_unknown_chunks: whether to read in unknown chunks +state.info_raw.colortype: desired color type for decoded image +state.info_raw.bitdepth: desired bit depth for decoded image +state.info_raw....: more color settings, see struct LodePNGColorMode +state.info_png....: no settings for decoder but ouput, see struct LodePNGInfo + +For encoding: + +state.encoder.zlibsettings.btype: disable compression by setting it to 0 +state.encoder.zlibsettings.use_lz77: use LZ77 in compression +state.encoder.zlibsettings.windowsize: tweak LZ77 windowsize +state.encoder.zlibsettings.minmatch: tweak min LZ77 length to match +state.encoder.zlibsettings.nicematch: tweak LZ77 match where to stop searching +state.encoder.zlibsettings.lazymatching: try one more LZ77 matching +state.encoder.zlibsettings.custom_...: use custom deflate function +state.encoder.auto_convert: choose optimal PNG color type, if 0 uses info_png +state.encoder.filter_palette_zero: PNG filter strategy for palette +state.encoder.filter_strategy: PNG filter strategy to encode with +state.encoder.force_palette: add palette even if not encoding to one +state.encoder.add_id: add LodePNG identifier and version as a text chunk +state.encoder.text_compression: use compressed text chunks for metadata +state.info_raw.colortype: color type of raw input image you provide +state.info_raw.bitdepth: bit depth of raw input image you provide +state.info_raw: more color settings, see struct LodePNGColorMode +state.info_png.color.colortype: desired color type if auto_convert is false +state.info_png.color.bitdepth: desired bit depth if auto_convert is false +state.info_png.color....: more color settings, see struct LodePNGColorMode +state.info_png....: more PNG related settings, see struct LodePNGInfo + + +12. changes +----------- + +The version number of LodePNG is the date of the change given in the format +yyyymmdd. + +Some changes aren't backwards compatible. Those are indicated with a (!) +symbol. + +Not all changes are listed here, the commit history in github lists more: +https://github.com/lvandeve/lodepng + +*) 27 jun 2021: added warnings that file reading/writing functions don't support + wide-character filenames (support for this is not planned, opening files is + not the core part of PNG decoding/decoding and is platform dependent). +*) 17 okt 2020: prevent decoding too large text/icc chunks by default. +*) 06 mar 2020: simplified some of the dynamic memory allocations. +*) 12 jan 2020: (!) added 'end' argument to lodepng_chunk_next to allow correct + overflow checks. +*) 14 aug 2019: around 25% faster decoding thanks to huffman lookup tables. +*) 15 jun 2019: (!) auto_choose_color API changed (for bugfix: don't use palette + if gray ICC profile) and non-ICC LodePNGColorProfile renamed to + LodePNGColorStats. +*) 30 dec 2018: code style changes only: removed newlines before opening braces. +*) 10 sep 2018: added way to inspect metadata chunks without full decoding. +*) 19 aug 2018: (!) fixed color mode bKGD is encoded with and made it use + palette index in case of palette. +*) 10 aug 2018: (!) added support for gAMA, cHRM, sRGB and iCCP chunks. This + change is backwards compatible unless you relied on unknown_chunks for those. +*) 11 jun 2018: less restrictive check for pixel size integer overflow +*) 14 jan 2018: allow optionally ignoring a few more recoverable errors +*) 17 sep 2017: fix memory leak for some encoder input error cases +*) 27 nov 2016: grey+alpha auto color model detection bugfix +*) 18 apr 2016: Changed qsort to custom stable sort (for platforms w/o qsort). +*) 09 apr 2016: Fixed colorkey usage detection, and better file loading (within + the limits of pure C90). +*) 08 dec 2015: Made load_file function return error if file can't be opened. +*) 24 okt 2015: Bugfix with decoding to palette output. +*) 18 apr 2015: Boundary PM instead of just package-merge for faster encoding. +*) 24 aug 2014: Moved to github +*) 23 aug 2014: Reduced needless memory usage of decoder. +*) 28 jun 2014: Removed fix_png setting, always support palette OOB for + simplicity. Made ColorProfile public. +*) 09 jun 2014: Faster encoder by fixing hash bug and more zeros optimization. +*) 22 dec 2013: Power of two windowsize required for optimization. +*) 15 apr 2013: Fixed bug with LAC_ALPHA and color key. +*) 25 mar 2013: Added an optional feature to ignore some PNG errors (fix_png). +*) 11 mar 2013: (!) Bugfix with custom free. Changed from "my" to "lodepng_" + prefix for the custom allocators and made it possible with a new #define to + use custom ones in your project without needing to change lodepng's code. +*) 28 jan 2013: Bugfix with color key. +*) 27 okt 2012: Tweaks in text chunk keyword length error handling. +*) 8 okt 2012: (!) Added new filter strategy (entropy) and new auto color mode. + (no palette). Better deflate tree encoding. New compression tweak settings. + Faster color conversions while decoding. Some internal cleanups. +*) 23 sep 2012: Reduced warnings in Visual Studio a little bit. +*) 1 sep 2012: (!) Removed #define's for giving custom (de)compression functions + and made it work with function pointers instead. +*) 23 jun 2012: Added more filter strategies. Made it easier to use custom alloc + and free functions and toggle #defines from compiler flags. Small fixes. +*) 6 may 2012: (!) Made plugging in custom zlib/deflate functions more flexible. +*) 22 apr 2012: (!) Made interface more consistent, renaming a lot. Removed + redundant C++ codec classes. Reduced amount of structs. Everything changed, + but it is cleaner now imho and functionality remains the same. Also fixed + several bugs and shrunk the implementation code. Made new samples. +*) 6 nov 2011: (!) By default, the encoder now automatically chooses the best + PNG color model and bit depth, based on the amount and type of colors of the + raw image. For this, autoLeaveOutAlphaChannel replaced by auto_choose_color. +*) 9 okt 2011: simpler hash chain implementation for the encoder. +*) 8 sep 2011: lz77 encoder lazy matching instead of greedy matching. +*) 23 aug 2011: tweaked the zlib compression parameters after benchmarking. + A bug with the PNG filtertype heuristic was fixed, so that it chooses much + better ones (it's quite significant). A setting to do an experimental, slow, + brute force search for PNG filter types is added. +*) 17 aug 2011: (!) changed some C zlib related function names. +*) 16 aug 2011: made the code less wide (max 120 characters per line). +*) 17 apr 2011: code cleanup. Bugfixes. Convert low to 16-bit per sample colors. +*) 21 feb 2011: fixed compiling for C90. Fixed compiling with sections disabled. +*) 11 dec 2010: encoding is made faster, based on suggestion by Peter Eastman + to optimize long sequences of zeros. +*) 13 nov 2010: added LodePNG_InfoColor_hasPaletteAlpha and + LodePNG_InfoColor_canHaveAlpha functions for convenience. +*) 7 nov 2010: added LodePNG_error_text function to get error code description. +*) 30 okt 2010: made decoding slightly faster +*) 26 okt 2010: (!) changed some C function and struct names (more consistent). + Reorganized the documentation and the declaration order in the header. +*) 08 aug 2010: only changed some comments and external samples. +*) 05 jul 2010: fixed bug thanks to warnings in the new gcc version. +*) 14 mar 2010: fixed bug where too much memory was allocated for char buffers. +*) 02 sep 2008: fixed bug where it could create empty tree that linux apps could + read by ignoring the problem but windows apps couldn't. +*) 06 jun 2008: added more error checks for out of memory cases. +*) 26 apr 2008: added a few more checks here and there to ensure more safety. +*) 06 mar 2008: crash with encoding of strings fixed +*) 02 feb 2008: support for international text chunks added (iTXt) +*) 23 jan 2008: small cleanups, and #defines to divide code in sections +*) 20 jan 2008: support for unknown chunks allowing using LodePNG for an editor. +*) 18 jan 2008: support for tIME and pHYs chunks added to encoder and decoder. +*) 17 jan 2008: ability to encode and decode compressed zTXt chunks added + Also various fixes, such as in the deflate and the padding bits code. +*) 13 jan 2008: Added ability to encode Adam7-interlaced images. Improved + filtering code of encoder. +*) 07 jan 2008: (!) changed LodePNG to use ISO C90 instead of C++. A + C++ wrapper around this provides an interface almost identical to before. + Having LodePNG be pure ISO C90 makes it more portable. The C and C++ code + are together in these files but it works both for C and C++ compilers. +*) 29 dec 2007: (!) changed most integer types to unsigned int + other tweaks +*) 30 aug 2007: bug fixed which makes this Borland C++ compatible +*) 09 aug 2007: some VS2005 warnings removed again +*) 21 jul 2007: deflate code placed in new namespace separate from zlib code +*) 08 jun 2007: fixed bug with 2- and 4-bit color, and small interlaced images +*) 04 jun 2007: improved support for Visual Studio 2005: crash with accessing + invalid std::vector element [0] fixed, and level 3 and 4 warnings removed +*) 02 jun 2007: made the encoder add a tag with version by default +*) 27 may 2007: zlib and png code separated (but still in the same file), + simple encoder/decoder functions added for more simple usage cases +*) 19 may 2007: minor fixes, some code cleaning, new error added (error 69), + moved some examples from here to lodepng_examples.cpp +*) 12 may 2007: palette decoding bug fixed +*) 24 apr 2007: changed the license from BSD to the zlib license +*) 11 mar 2007: very simple addition: ability to encode bKGD chunks. +*) 04 mar 2007: (!) tEXt chunk related fixes, and support for encoding + palettized PNG images. Plus little interface change with palette and texts. +*) 03 mar 2007: Made it encode dynamic Huffman shorter with repeat codes. + Fixed a bug where the end code of a block had length 0 in the Huffman tree. +*) 26 feb 2007: Huffman compression with dynamic trees (BTYPE 2) now implemented + and supported by the encoder, resulting in smaller PNGs at the output. +*) 27 jan 2007: Made the Adler-32 test faster so that a timewaste is gone. +*) 24 jan 2007: gave encoder an error interface. Added color conversion from any + greyscale type to 8-bit greyscale with or without alpha. +*) 21 jan 2007: (!) Totally changed the interface. It allows more color types + to convert to and is more uniform. See the manual for how it works now. +*) 07 jan 2007: Some cleanup & fixes, and a few changes over the last days: + encode/decode custom tEXt chunks, separate classes for zlib & deflate, and + at last made the decoder give errors for incorrect Adler32 or Crc. +*) 01 jan 2007: Fixed bug with encoding PNGs with less than 8 bits per channel. +*) 29 dec 2006: Added support for encoding images without alpha channel, and + cleaned out code as well as making certain parts faster. +*) 28 dec 2006: Added "Settings" to the encoder. +*) 26 dec 2006: The encoder now does LZ77 encoding and produces much smaller files now. + Removed some code duplication in the decoder. Fixed little bug in an example. +*) 09 dec 2006: (!) Placed output parameters of public functions as first parameter. + Fixed a bug of the decoder with 16-bit per color. +*) 15 okt 2006: Changed documentation structure +*) 09 okt 2006: Encoder class added. It encodes a valid PNG image from the + given image buffer, however for now it's not compressed. +*) 08 sep 2006: (!) Changed to interface with a Decoder class +*) 30 jul 2006: (!) LodePNG_InfoPng , width and height are now retrieved in different + way. Renamed decodePNG to decodePNGGeneric. +*) 29 jul 2006: (!) Changed the interface: image info is now returned as a + struct of type LodePNG::LodePNG_Info, instead of a vector, which was a bit clumsy. +*) 28 jul 2006: Cleaned the code and added new error checks. + Corrected terminology "deflate" into "inflate". +*) 23 jun 2006: Added SDL example in the documentation in the header, this + example allows easy debugging by displaying the PNG and its transparency. +*) 22 jun 2006: (!) Changed way to obtain error value. Added + loadFile function for convenience. Made decodePNG32 faster. +*) 21 jun 2006: (!) Changed type of info vector to unsigned. + Changed position of palette in info vector. Fixed an important bug that + happened on PNGs with an uncompressed block. +*) 16 jun 2006: Internally changed unsigned into unsigned where + needed, and performed some optimizations. +*) 07 jun 2006: (!) Renamed functions to decodePNG and placed them + in LodePNG namespace. Changed the order of the parameters. Rewrote the + documentation in the header. Renamed files to lodepng.cpp and lodepng.h +*) 22 apr 2006: Optimized and improved some code +*) 07 sep 2005: (!) Changed to std::vector interface +*) 12 aug 2005: Initial release (C++, decoder only) + + +13. contact information +----------------------- + +Feel free to contact me with suggestions, problems, comments, ... concerning +LodePNG. If you encounter a PNG image that doesn't work properly with this +decoder, feel free to send it and I'll use it to find and fix the problem. + +My email address is (puzzle the account and domain together with an @ symbol): +Domain: gmail dot com. +Account: lode dot vandevenne. + + +Copyright (c) 2005-2021 Lode Vandevenne +*/ diff --git a/tools/lz/global.c b/tools/lz/global.c new file mode 100644 index 0000000..4d26ace --- /dev/null +++ b/tools/lz/global.c @@ -0,0 +1,35 @@ +#include "proto.h" + +const struct compressor compressors[] = { + // NOTE: the "flags" field for each compressor will be set to the chosen/current method number minus the base + // number for that particular compressor. That means that each compressor will use a zero-based flags value. + {.methods = 72, .name = "singlepass", .function = &try_compress_single_pass}, // 0-71 + {.methods = 2, .name = "null", .function = &store_uncompressed}, // 72-73 + {.methods = 6, .name = "repetitions", .function = &try_compress_repetitions}, // 74-79 + {.methods = 16, .name = "multipass", .function = &try_compress_multi_pass}, // 80-95 + {0} // end of the list +}; + +const unsigned char bit_flipping_table[] = { + // For each byte, the table contains that same byte with its bits flipped around (for instance, + // 0x58 (01011000 binary) becomes 0x1a (00011010 binary)). This is faster than flipping bits + // manually at runtime. + 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, + 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8, + 0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4, + 0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc, + 0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2, + 0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa, + 0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6, + 0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe, + 0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1, 0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1, + 0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9, 0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9, + 0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5, 0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5, + 0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed, 0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd, + 0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3, 0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3, + 0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb, 0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb, + 0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7, 0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7, + 0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef, 0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff +}; + +char option_name_buffer[] = "-?"; // used to extract the name of a short option (separated from its argument) diff --git a/tools/lz/main.c b/tools/lz/main.c new file mode 100644 index 0000000..62e6dc4 --- /dev/null +++ b/tools/lz/main.c @@ -0,0 +1,54 @@ +#include "proto.h" + +int main (int argc, char ** argv) { + struct options options = get_options(argc, argv); + unsigned short size; + unsigned char * file_buffer = read_file_into_buffer(options.input, &size); + struct command * commands; + if (options.mode & 2) { + unsigned short original_size = size, remainder; + commands = get_commands_from_file(file_buffer, &size, &remainder); + if (!commands) error_exit(1, "invalid command stream"); + if (options.mode == 2) { + unsigned char * uncompressed = get_uncompressed_data(commands, file_buffer, &size); + if (!uncompressed) error_exit(1, "output data is too large"); + write_raw_data_to_file(options.output, uncompressed, size); + free(uncompressed); + } else + write_commands_and_padding_to_textfile(options.output, commands, size, file_buffer, original_size - remainder, remainder); + } else { + commands = compress(file_buffer, &size, options.method); + (options.mode ? write_commands_to_textfile : write_commands_to_file)(options.output, commands, size, file_buffer, options.alignment); + } + free(file_buffer); + free(commands); + return 0; +} + +struct command * compress (const unsigned char * data, unsigned short * size, unsigned method) { + unsigned char * bitflipped = malloc(*size); + unsigned current; + for (current = 0; current < *size; current ++) bitflipped[current] = bit_flipping_table[data[current]]; + const struct compressor * compressor = compressors; + struct command * result; + if (method < COMPRESSION_METHODS) { + while (method >= compressor -> methods) method -= (compressor ++) -> methods; + result = compressor -> function(data, bitflipped, size, method); + } else { + struct command * compressed_sequences[COMPRESSION_METHODS]; + unsigned short lengths[COMPRESSION_METHODS]; + unsigned flags = 0; + for (current = 0; current < COMPRESSION_METHODS; current ++) { + lengths[current] = *size; + if (flags == compressor -> methods) { + flags = 0; + compressor ++; + } + compressed_sequences[current] = compressor -> function(data, bitflipped, lengths + current, flags ++); + } + result = select_optimal_sequence(compressed_sequences, lengths, size); + for (current = 0; current < COMPRESSION_METHODS; current ++) free(compressed_sequences[current]); + } + free(bitflipped); + return result; +} diff --git a/tools/lz/merging.c b/tools/lz/merging.c new file mode 100644 index 0000000..79abb6d --- /dev/null +++ b/tools/lz/merging.c @@ -0,0 +1,102 @@ +#include "proto.h" + +struct command * select_optimal_sequence (struct command ** sequences, const unsigned short * lengths, unsigned short * final_length) { + struct command * compressor_sequences[NUM_COMPRESSORS * 2]; + unsigned short compressor_lengths[NUM_COMPRESSORS * 2]; + struct command * inverted_sequences[COMPRESSION_METHODS]; + unsigned short inverted_lengths[COMPRESSION_METHODS]; + unsigned p, current, method = 0; + for (current = 0; current < NUM_COMPRESSORS; current ++) { + compressor_sequences[current] = select_command_sequence(sequences + method, lengths + method, compressors[current].methods, compressor_lengths + current); + compressor_sequences[current + NUM_COMPRESSORS] = select_command_sequence(sequences + method, lengths + method, -(int) compressors[current].methods, + compressor_lengths + (current + NUM_COMPRESSORS)); + for (p = 0; p < compressors[current].methods; p ++) { + inverted_sequences[method + compressors[current].methods - 1 - p] = sequences[method + p]; + inverted_lengths[method + compressors[current].methods - 1 - p] = lengths[method + p]; + } + method += compressors[current].methods; + } + unsigned short final_lengths[8]; + struct command * final_sequences[8] = { + select_command_sequence(compressor_sequences, compressor_lengths, NUM_COMPRESSORS, final_lengths), + select_command_sequence(compressor_sequences, compressor_lengths, -NUM_COMPRESSORS, final_lengths + 1), + select_command_sequence(compressor_sequences + NUM_COMPRESSORS, compressor_lengths + NUM_COMPRESSORS, NUM_COMPRESSORS, final_lengths + 2), + select_command_sequence(compressor_sequences + NUM_COMPRESSORS, compressor_lengths + NUM_COMPRESSORS, -NUM_COMPRESSORS, final_lengths + 3), + select_command_sequence(sequences, lengths, COMPRESSION_METHODS, final_lengths + 4), + select_command_sequence(sequences, lengths, -COMPRESSION_METHODS, final_lengths + 5), + select_command_sequence(inverted_sequences, inverted_lengths, COMPRESSION_METHODS, final_lengths + 6), + select_command_sequence(inverted_sequences, inverted_lengths, -COMPRESSION_METHODS, final_lengths + 7) + }; + for (current = 0; current < (2 * NUM_COMPRESSORS); current ++) free(compressor_sequences[current]); + struct command * result = select_command_sequence(final_sequences, final_lengths, 8, final_length); + for (current = 0; current < 8; current ++) free(final_sequences[current]); + return result; +} + +struct command * select_command_sequence (struct command ** sequences, const unsigned short * lengths, int count, unsigned short * final_length) { + // negative count indicates iterating backwards + unsigned short min_sequence = 0, min_length = compressed_length(*sequences, *lengths); + unsigned short seq, len; + int backwards = 0; + if (count < 0) { + backwards = 1; + count = -count; + } + for (seq = 1; seq < count; seq ++) { + len = compressed_length(sequences[seq], lengths[seq]); + if (len < min_length) { + min_sequence = seq; + min_length = len; + } + } + *final_length = lengths[min_sequence]; + struct command * current = malloc(*final_length * sizeof(struct command)); + memcpy(current, sequences[min_sequence], *final_length * sizeof(struct command)); + struct command * new; + for (seq = 1; seq < count; seq ++) { + if (backwards) seq = count - seq; + new = merge_command_sequences(current, *final_length, sequences[(seq + min_sequence) % count], lengths[(seq + min_sequence) % count], final_length); + if (backwards) seq = count - seq; // restore the value for the loop + free(current); + current = new; + } + return current; +} + +struct command * merge_command_sequences (const struct command * current, unsigned short current_length, const struct command * new, unsigned short new_length, + unsigned short * result_length) { + struct command * result = malloc(sizeof(struct command) * (current_length + new_length)); + struct command * current_command = result; + const struct command * saved_current; + const struct command * saved_new; + unsigned short current_pos, new_pos; + while (current_length) { + if (current -> count == new -> count) { + *(current_command ++) = pick_best_command(2, *(current ++), *(new ++)); + current_length --; + continue; + } + saved_current = current; + saved_new = new; + current_pos = (current ++) -> count; + new_pos = (new ++) -> count; + current_length --; + while (current_pos != new_pos) + if (current_pos < new_pos) { + current_pos += (current ++) -> count; + current_length --; + } else + new_pos += (new ++) -> count; + current_pos = compressed_length(saved_current, current - saved_current); + new_pos = compressed_length(saved_new, new - saved_new); + if (new_pos < current_pos) { + memcpy(current_command, saved_new, sizeof(struct command) * (new - saved_new)); + current_command += new - saved_new; + } else { + memcpy(current_command, saved_current, sizeof(struct command) * (current - saved_current)); + current_command += current - saved_current; + } + } + *result_length = current_command - result; + return result; +} diff --git a/tools/lz/mpcomp.c b/tools/lz/mpcomp.c new file mode 100644 index 0000000..c882985 --- /dev/null +++ b/tools/lz/mpcomp.c @@ -0,0 +1,112 @@ +#include "proto.h" + +/* + Multi-pass compressor: performs an initial pass generating a single command for each byte position in the data and + refines the command stream further in subsequent passes. + Methods defined: 16 + Flags values: the flags are a bitfield; each bit triggers some alternate behavior if set: + 1: always emit a literal command (0) for the first byte of the file + 2: when reducing a two-byte repetition (2) command in the overlap elimination pass, don't force it to contain a + whole number of repetitions (i.e., an even count) + 4: don't emit copy commands (4, 5, 6) with a count of 3 + 8: don't emit single-byte repetition (1) commands +*/ + +struct command * try_compress_multi_pass (const unsigned char * data, const unsigned char * flipped, unsigned short * size, unsigned flags) { + struct command * result = calloc(*size, sizeof(struct command)); + unsigned char * reversed = malloc(*size); + short * sources = malloc(*size * sizeof(short)); + unsigned short pos, next, current = 0; + for (pos = 0; pos < *size; pos ++) { + reversed[pos] = data[*size - 1 - pos]; + sources[pos] = -1; + } + for (pos = (flags & 1); pos < *size; pos += (result[pos].count >= MULTIPASS_SKIP_THRESHOLD) ? result[pos].count : 1) { + result[pos] = pick_command_for_pass(data, flipped, reversed, sources, *size, pos, flags); + if ((result[pos].command >= 4) || (result[pos].count < MULTIPASS_SKIP_THRESHOLD)) sources[current ++] = pos; + } + free(reversed); + free(sources); + for (pos = 0; pos < *size; pos ++) { + for (current = 1; current < result[pos].count; current ++) if (result[pos + current].count > result[pos].count) { + result[pos].count = current; + if ((result[pos].command == 2) && (current & 1) && !(flags & 2)) result[pos].count --; + } + if (result[pos].count <= command_size(result[pos])) result[pos] = (struct command) {.command = 0, .count = 0}; + } + for (pos = 0; pos < *size; pos ++) + if (!result[pos].command) { + for (current = 1; (current < MAX_COMMAND_COUNT) && ((pos + current) < *size); current ++) if (result[pos + current].command) break; + result[pos] = (struct command) {.command = 0, .count = current, .value = pos}; + } else if (result[pos].count > MAX_COMMAND_COUNT) { + result[pos + MAX_COMMAND_COUNT] = result[pos]; + result[pos + MAX_COMMAND_COUNT].count -= MAX_COMMAND_COUNT; + if ((result[pos + MAX_COMMAND_COUNT].command >= 4) && (result[pos + MAX_COMMAND_COUNT].value >= 0)) + result[pos + MAX_COMMAND_COUNT].value += (result[pos].command == 6) ? -MAX_COMMAND_COUNT : MAX_COMMAND_COUNT; + result[pos].count = MAX_COMMAND_COUNT; + } + for (next = pos = 0; pos < *size; pos ++) + if (pos == next) + next += result[pos].count; + else + result[pos].command = 7; + repack(&result, size); + return result; +} + +struct command pick_command_for_pass (const unsigned char * data, const unsigned char * flipped, const unsigned char * reversed, const short * sources, + unsigned short length, unsigned short position, unsigned flags) { + struct command result = pick_repetition_for_pass(data, length, position, flags); + if (result.count >= MULTIPASS_SKIP_THRESHOLD) return result; + unsigned char p; + for (p = 0; p < 3; p ++) { + struct command temp = pick_copy_for_pass(data, p[(const unsigned char * []) {data, flipped, reversed}], sources, p + 4, length, position, flags); + if (temp.command == 7) continue; + if (temp.count > result.count) result = temp; + } + if ((result.command >= 4) && (result.value >= (position - LOOKBACK_LIMIT))) result.value -= position; + return result; +} + +struct command pick_repetition_for_pass (const unsigned char * data, unsigned short length, unsigned short position, unsigned flags) { + unsigned short p; + if (data[position]) { + if ((position + 1) >= length) return (struct command) {.command = 1, .count = 1, .value = data[position]}; + struct command result; + if (!(flags & 8) && (data[position] == data[position + 1])) + result = (struct command) {.command = 1, .value = data[position]}; + else + result = (struct command) {.command = 2, .value = data[position] | (data[position + 1] << 8)}; + for (p = 1; ((position + p) < length) && (p < LOOKAHEAD_LIMIT); p ++) if (data[position + p] != data[position + (p & 1)]) break; + result.count = p; + return result; + } else { + for (p = position + 1; (p < length) && (p < (position + LOOKAHEAD_LIMIT)); p ++) if (data[p]) break; + return (struct command) {.command = 3, .count = p - position}; + } +} + +struct command pick_copy_for_pass (const unsigned char * data, const unsigned char * reference, const short * sources, unsigned char command_type, + unsigned short length, unsigned short position, unsigned flags) { + struct command result = {.command = 7, .count = (flags & 4) ? 4 : 3}; + if (length < 3) return result; + unsigned refpos, count; + const unsigned char * current; + unsigned char buffer[6] = {0}; + memcpy(buffer, reference + length - 3, 3); + while (*sources >= 0) { + refpos = *(sources ++); + if (command_type == 6) refpos = length - 1 - refpos; + if (refpos >= (length - 3)) + current = buffer + refpos - (length - 3); + else + current = reference + refpos; + if (memcmp(data + position, current, ((position + 4) > length) ? length - position : 4)) continue; + for (count = 4; (count < (length - position)) && (count < (length - refpos)); count ++) if (data[position + count] != current[count]) break; + if (count > (length - refpos)) count = length - refpos; + if (count > (length - position)) count = length - position; + if (result.count > count) continue; + result = (struct command) {.command = command_type, .count = count, .value = sources[-1]}; + } + return result; +} diff --git a/tools/lz/nullcomp.c b/tools/lz/nullcomp.c new file mode 100644 index 0000000..d4535bd --- /dev/null +++ b/tools/lz/nullcomp.c @@ -0,0 +1,20 @@ +#include "proto.h" + +/* + Null compressor: stores data uncompressed, using literal (0) commands only. + Methods defined: 2 + Flags values: 0 = split a trailing 33-to-64-byte block at the end into two short blocks; 1 = don't +*/ + +struct command * store_uncompressed (__attribute__((unused)) const unsigned char * data, __attribute__((unused)) const unsigned char * bitflipped, unsigned short * size, unsigned flags) { + unsigned short position, block, remainder = *size; + struct command * result = NULL; + *size = 0; + for (position = 0; remainder; position += block, remainder -= block) { + block = (remainder > MAX_COMMAND_COUNT) ? MAX_COMMAND_COUNT : remainder; + if (!(flags & 1) && (block <= (2 * SHORT_COMMAND_COUNT)) && (block > SHORT_COMMAND_COUNT)) block = SHORT_COMMAND_COUNT; + result = realloc(result, sizeof(struct command) * (1 + *size)); + result[(*size) ++] = (struct command) {.command = 0, .count = block, .value = position}; + } + return result; +} diff --git a/tools/lz/options.c b/tools/lz/options.c new file mode 100644 index 0000000..8e5d05a --- /dev/null +++ b/tools/lz/options.c @@ -0,0 +1,141 @@ +#include "proto.h" + +struct options get_options (int argc, char ** argv) { + struct options result = {.input = NULL, .output = NULL, .mode = 0, .alignment = 0, .method = COMPRESSION_METHODS}; + const char * program_name = *argv; + int compressor = -1; + if (argc == 1) usage(program_name); + for (argv ++; *argv; argv ++) { + if (**argv != '-') break; + if (!1[*argv]) break; + if (!strcmp(*argv, "--")) { + argv ++; + break; + } else if (!(strcmp(*argv, "--text") && strcmp(*argv, "-t"))) + result.mode = 1; + else if (!(strcmp(*argv, "--binary") && strcmp(*argv, "-b"))) + result.mode = 0; + else if (!(strcmp(*argv, "--uncompress") && strcmp(*argv, "-u"))) + result.mode = 2; + else if (!(strcmp(*argv, "--dump") && strcmp(*argv, "-d"))) + result.mode = 3; + else if (!(strcmp(*argv, "--align") && strncmp(*argv, "-a", 2))) + result.alignment = parse_numeric_option_argument(&argv, 12); + else if (!(strcmp(*argv, "--method") && strncmp(*argv, "-m", 2))) + result.method = parse_numeric_option_argument(&argv, COMPRESSION_METHODS - 1); + else if (!(strcmp(*argv, "--compressor") && strncmp(*argv, "-c", 2))) + compressor = parse_compressor_option_argument(&argv); + else if (!(strcmp(*argv, "--optimize") && strcmp(*argv, "-o"))) { + result.method = COMPRESSION_METHODS; + compressor = -1; + } else if (!(strcmp(*argv, "--help") && strcmp(*argv, "-?"))) + usage(program_name); + else if (!(strcmp(*argv, "--list") && strcmp(*argv, "-l"))) + list_compressors(); + else + error_exit(3, "unknown option: %s", *argv); + } + if (compressor >= 0) { + if (result.method >= COMPRESSION_METHODS) result.method = 0; + if (result.method >= compressors[compressor].methods) + error_exit(3, "method for the %s compressor must be between 0 and %u", compressors[compressor].name, compressors[compressor].methods - 1); + while (compressor > 0) result.method += compressors[-- compressor].methods; + } + if (*argv) { + if (strcmp(*argv, "-")) result.input = *argv; + if (*(++ argv)) { + if (argv[1]) error_exit(3, "too many command-line arguments"); + if (strcmp(*argv, "-")) result.output = *argv; + } + } + return result; +} + +unsigned parse_numeric_option_argument (char *** alp, unsigned limit) { + const char * option; + const char * value = get_argument_for_option(alp, &option); + char * error; + unsigned long result = strtoul(value, &error, 10); + if (*error) error_exit(3, "invalid argument to option %s", option); + if (result > limit) error_exit(3, "argument to option %s must be between 0 and %u", option, limit); + return result; +} + +int parse_compressor_option_argument (char *** alp) { + const char * name = get_argument_for_option(alp, NULL); + if (!strcmp(name, "*")) return -1; + int result = -1; + unsigned length = strlen(name); + const struct compressor * compressor; + for (compressor = compressors; compressor -> name; compressor ++) { + if (strncmp(name, compressor -> name, length)) continue; + if (result >= 0) error_exit(3, "ambiguous compressor prefix: %s", name); + result = compressor - compressors; + } + if (result < 0) error_exit(3, "unknown compressor: %s", name); + return result; +} + +const char * get_argument_for_option (char *** alp, const char ** option_name) { + // alp: argument list pointer (i.e., address of the current value of argv after indexing) + // will point at the last consumed argument on exit (since the caller will probably increment it once more) + const char * option; + const char * result; + if (1[**alp] == '-') { + option = *((*alp) ++); + result = **alp; + } else { + option_name_buffer[1] = 1[**alp]; + option = option_name_buffer; + result = **alp + 2; + } + if (!(result && *result)) error_exit(3, "option %s requires an argument", option); + if (option_name) *option_name = option; + return result; +} + +noreturn usage (const char * program_name) { + fprintf(stderr, "Usage: %s [] [ []]\n\n", program_name); + fputs("Execution mode:\n", stderr); + fputs(" -b, --binary Output the command stream as binary data (default).\n", stderr); + fputs(" -t, --text Output the command stream as text.\n", stderr); + fputs(" -u, --uncompress Process a compressed file and output the original data.\n", stderr); + fputs(" -d, --dump Process a compressed file and dump the command stream as\n", stderr); + fputs(" text (as if compressed with the --text option).\n", stderr); + fputs(" -l, --list List compressors and their method numbers.\n", stderr); + fputs(" -?, --help Print this help text and exit.\n", stderr); + fputs("Compression options:\n", stderr); + fputs(" -o, --optimize Use the best combination of compression\n", stderr); + fputs(" methods available (default).\n", stderr); + fputs(" -m, --method Use only one specific compression method.\n", stderr); + fprintf(stderr, " Valid method numbers are between 0 and %u.\n", COMPRESSION_METHODS - 1); + fputs(" -c, --compressor Use the specified compressor: the method\n", stderr); + fputs(" number will be relative to that compressor.\n", stderr); + fputs(" Any prefix of the compressor name may be\n", stderr); + fputs(" specified. Use * to indicate any compressor.\n", stderr); + fputs(" -a, --align Pad the compressed output with zeros until\n", stderr); + fputs(" the size has the specified number of low bits\n", stderr); + fputs(" cleared (default: 0).\n", stderr); + fputs("The source and output filenames can be given as - (or omitted) to use standard\n", stderr); + fputs("input and output. Use -- to indicate that subsequent arguments are file names.\n", stderr); + exit(3); +} + +noreturn list_compressors (void) { + const struct compressor * compressor; + unsigned current, length = 10; + for (compressor = compressors; compressor -> name; compressor ++) if ((current = strlen(compressor -> name)) > length) length = current; + fprintf(stderr, "%-*s Offset Methods\n", length, "Compressor"); + for (current = 0; current < length; current ++) putc('-', stderr); + fputs(" ------ -------\n", stderr); + current = 0; + for (compressor = compressors; compressor -> name; compressor ++) { + fprintf(stderr, "%-*s %6u %7u\n", length, compressor -> name, current, compressor -> methods); + current += compressor -> methods; + } + putc('\n', stderr); + fputs("Note: the offset indicates the compressor's lowest method number when the\n", stderr); + fputs("--compressor option is not given. When that option is used, every compressor's\n", stderr); + fputs("methods are numbered from zero.\n", stderr); + exit(3); +} diff --git a/tools/lz/output.c b/tools/lz/output.c new file mode 100644 index 0000000..484a951 --- /dev/null +++ b/tools/lz/output.c @@ -0,0 +1,146 @@ +#include "proto.h" + +void write_commands_to_textfile (const char * file, const struct command * commands, unsigned count, const unsigned char * input_stream, + unsigned char alignment) { + FILE * fp = file ? fopen(file, "w") : stdout; + if (!fp) error_exit(1, "could not open file %s for writing", file); + unsigned length = 0; + while (count --) { + write_command_to_textfile(fp, *commands, input_stream); + length += command_size(*(commands ++)); + } + if (fputs("\tlzend\n", fp) < 0) error_exit(1, "could not write terminator to compressed output"); + length = ~length & ((1 << alignment) - 1); + if (length --) { + int rv = fputs("\tdb 0", fp); + while ((rv >= 0) && length --) rv = fputs(", 0", fp); + if (rv >= 0) rv = -(putc('\n', fp) == EOF); + if (rv < 0) error_exit(1, "could not write padding to compressed output"); + } + if (file) fclose(fp); +} + +void write_commands_and_padding_to_textfile (const char * file, const struct command * commands, unsigned count, const unsigned char * input_stream, + unsigned padding_offset, unsigned padding_size) { + FILE * fp = file ? fopen(file, "w") : stdout; + if (!fp) error_exit(1, "could not open file %s for writing", file); + while (count --) write_command_to_textfile(fp, *(commands ++), input_stream); + if (fputs("\tlzend\n", fp) < 0) error_exit(1, "could not write terminator to compressed output"); + if (padding_size) { + input_stream += padding_offset; + int rv = 0; + unsigned pos; + const char * prefix = "\tdb"; + for (pos = 0; (rv >= 0) && (pos < padding_size); pos ++) { + if (input_stream[pos]) + rv = fprintf(fp, "%s $%02hhx", prefix, input_stream[pos]); + else + rv = fprintf(fp, "%s 0", prefix); + prefix = ","; + } + if (rv >= 0) rv = -(putc('\n', fp) == EOF); + if (rv < 0) error_exit(1, "could not write padding to compressed output"); + } + if (file) fclose(fp); +} + +void write_command_to_textfile (FILE * fp, struct command command, const unsigned char * input_stream) { + if ((!command.count) || (command.count > MAX_COMMAND_COUNT)) error_exit(2, "invalid command in output stream"); + int rv, pos; + const char * kind; + switch (command.command) { + case 0: + if ((rv = fprintf(fp, "\tlzdata")) < 0) break; + for (pos = 0; pos < command.count; pos ++) if ((rv = fprintf(fp, "%s$%02hhx", pos ? ", " : " ", input_stream[command.value + pos])) < 0) break; + rv = putc('\n', fp); + break; + case 1: + if ((command.value < 0) || (command.value > 255)) error_exit(2, "invalid command in output stream"); + rv = fprintf(fp, "\tlzrepeat %u, $%02hhx\n", command.count, (unsigned char) command.value); + break; + case 2: + if (command.value < 0) error_exit(2, "invalid command in output stream"); + rv = fprintf(fp, "\tlzrepeat %u, $%02hhx, $%02hhx\n", command.count, (unsigned char) command.value, (unsigned char) (command.value >> 8)); + break; + case 3: + rv = fprintf(fp, "\tlzzero %u\n", command.count); + break; + case 4: + kind = "normal"; + goto copy; + case 5: + kind = "flipped"; + goto copy; + case 6: + kind = "reversed"; + copy: + if ((command.value < -LOOKBACK_LIMIT) || (command.value >= MAX_FILE_SIZE)) error_exit(2, "invalid command in output stream"); + if (command.value < 0) + rv = fprintf(fp, "\tlzcopy %s, %u, %d\n", kind, command.count, command.value); + else + rv = fprintf(fp, "\tlzcopy %s, %u, $%04hx\n", kind, command.count, (unsigned short) command.value); + break; + default: + error_exit(2, "invalid command in output stream"); + } + if (rv < 0) error_exit(1, "could not write command to compressed output"); +} + +void write_commands_to_file (const char * file, const struct command * commands, unsigned count, const unsigned char * input_stream, unsigned char alignment) { + FILE * fp = file ? fopen(file, "wb") : stdout; + if (!fp) error_exit(1, "could not open file %s for writing", file); + unsigned length = 0; + while (count --) { + write_command_to_file(fp, *commands, input_stream); + length += command_size(*(commands ++)); + } + if (putc(-1, fp) == EOF) error_exit(1, "could not write terminator to compressed output"); + length = ~length & ((1 << alignment) - 1); + while (length --) if (putc(0, fp) == EOF) error_exit(1, "could not write padding to compressed output"); + if (file) fclose(fp); +} + +void write_command_to_file (FILE * fp, struct command command, const unsigned char * input_stream) { + if ((!command.count) || (command.count > MAX_COMMAND_COUNT)) error_exit(2, "invalid command in output stream"); + unsigned char buf[4]; + unsigned char * pos = buf; + int n; + command.count --; + if (command.count < SHORT_COMMAND_COUNT) + *(pos ++) = (command.command << 5) + command.count; + else { + *(pos ++) = 224 + (command.command << 2) + (command.count >> 8); + *(pos ++) = command.count; + } + switch (command.command) { + case 1: case 2: + if ((command.value < 0) || (command.value >= (1 << (command.command << 3)))) error_exit(2, "invalid command in output stream"); + for (n = 0; n < command.command; n ++) *(pos ++) = command.value >> (n << 3); + case 0: case 3: + break; + default: + if ((command.value < -LOOKBACK_LIMIT) || (command.value >= MAX_FILE_SIZE)) error_exit(2, "invalid command in output stream"); + if (command.value < 0) + *(pos ++) = command.value ^ 127; + else { + *(pos ++) = command.value >> 8; + *(pos ++) = command.value; + } + } + if (fwrite(buf, 1, pos - buf, fp) != (pos - buf)) error_exit(1, "could not write command to compressed output"); + if (command.command) return; + command.count ++; + if (fwrite(input_stream + command.value, 1, command.count, fp) != command.count) error_exit(1, "could not write data to compressed output"); +} + +void write_raw_data_to_file (const char * file, const void * data, unsigned length) { + FILE * fp = file ? fopen(file, "w") : stdout; + if (!fp) error_exit(1, "could not open file %s for writing", file); + while (length) { + unsigned rv = fwrite(data, 1, length, fp); + if (!rv) error_exit(1, "could not write raw data to output"); + data = (const char *) data + rv; + length -= rv; + } + if (file) fclose(fp); +} diff --git a/tools/lz/packing.c b/tools/lz/packing.c new file mode 100644 index 0000000..0cb9fae --- /dev/null +++ b/tools/lz/packing.c @@ -0,0 +1,56 @@ +#include "proto.h" + +void optimize (struct command * commands, unsigned short count) { + while (count && (commands -> command == 7)) commands ++, count --; + if (count < 2) return; + struct command * end = commands + count; + struct command * next; + for (next = commands + 1; next < end; next ++) { + if (next -> command == 7) continue; + if ( + !(commands -> command) && + (command_size(*next) == next -> count) && + ((commands -> count + next -> count) <= MAX_COMMAND_COUNT) && + ((commands -> count > SHORT_COMMAND_COUNT) || ((commands -> count + next -> count) <= SHORT_COMMAND_COUNT)) + ) { + commands -> count += next -> count; + next -> command = 7; + continue; + } + if (next -> command == commands -> command) + switch (commands -> command) { + case 0: + if ((commands -> value + commands -> count) != next -> value) break; + commands -> count += next -> count; + next -> command = 7; + if (commands -> count <= MAX_COMMAND_COUNT) continue; + next -> command = 0; + next -> value = commands -> value + MAX_COMMAND_COUNT; + next -> count = commands -> count - MAX_COMMAND_COUNT; + commands -> count = MAX_COMMAND_COUNT; + break; + case 1: + if (commands -> value != next -> value) break; + // fallthrough + case 3: + if ((commands -> count + next -> count) <= MAX_COMMAND_COUNT) { + commands -> count += next -> count; + next -> command = 7; + continue; + } + next -> count = (commands -> count + next -> count) - MAX_COMMAND_COUNT; + commands -> count = MAX_COMMAND_COUNT; + } + commands = next; + } +} + +void repack (struct command ** commands, unsigned short * length) { + struct command * new_commands = malloc(sizeof(struct command) * *length); + struct command * current = new_commands; + unsigned short p; + for (p = 0; p < *length; p ++) if (p[*commands].command != 7) *(current ++) = p[*commands]; + free(*commands); + *commands = new_commands; + *length = current - new_commands; +} diff --git a/tools/lz/proto.h b/tools/lz/proto.h new file mode 100644 index 0000000..8457742 --- /dev/null +++ b/tools/lz/proto.h @@ -0,0 +1,107 @@ +#include +#include +#include +#include + +#define NUM_COMPRESSORS 4 +#define COMPRESSION_METHODS 96 /* sum of all values for the methods field in compressors */ +#define MAX_FILE_SIZE 32768 +#define SHORT_COMMAND_COUNT 32 +#define MAX_COMMAND_COUNT 1024 +#define LOOKBACK_LIMIT 128 /* highest negative valid count for a copy command */ +#define LOOKAHEAD_LIMIT 3072 /* maximum lookahead distance for the first pass of multi-pass compression */ +#define MULTIPASS_SKIP_THRESHOLD 64 + +#if __STDC_VERSION__ >= 201112L + // forces "noreturn void", which is silly and redundant; this is simpler + #define noreturn _Noreturn void +#else + #define noreturn void /* fallback */ +#endif + +struct command { + unsigned command: 3; // commands 0-6 as per compression spec; command 7 is used as a dummy placeholder + unsigned count: 12; // always equals the uncompressed data length + signed value: 17; // offset for commands 0 (into source) and 4-6 (into decompressed output); repeated bytes for commands 1-2 +}; + +struct compressor { + unsigned methods; + const char * name; + struct command * (* function) (const unsigned char *, const unsigned char *, unsigned short *, unsigned); +}; + +struct options { + const char * input; + const char * output; + unsigned method; // method to use, or >= COMPRESSION_METHODS to try them all + unsigned char mode; // 0: compress, 1: compress to text, 2: uncompress, 3: dump commands as text + unsigned char alignment; // 1 << value +}; + +// global.c +extern const struct compressor compressors[]; +extern const unsigned char bit_flipping_table[]; +extern char option_name_buffer[]; + +// main.c +int main(int, char **); +struct command * compress(const unsigned char *, unsigned short *, unsigned); + +// merging.c +struct command * select_optimal_sequence(struct command **, const unsigned short *, unsigned short *); +struct command * select_command_sequence(struct command **, const unsigned short *, int, unsigned short *); +struct command * merge_command_sequences(const struct command *, unsigned short, const struct command *, unsigned short, unsigned short *); + +// mpcomp.c +struct command * try_compress_multi_pass(const unsigned char *, const unsigned char *, unsigned short *, unsigned); +struct command pick_command_for_pass(const unsigned char *, const unsigned char *, const unsigned char *, const short *, unsigned short, + unsigned short, unsigned); +struct command pick_repetition_for_pass(const unsigned char *, unsigned short, unsigned short, unsigned); +struct command pick_copy_for_pass(const unsigned char *, const unsigned char *, const short *, unsigned char, unsigned short, unsigned short, unsigned); + +// nullcomp.c +struct command * store_uncompressed(const unsigned char *, const unsigned char *, unsigned short *, unsigned); + +// options.c +struct options get_options(int, char **); +unsigned parse_numeric_option_argument(char ***, unsigned); +int parse_compressor_option_argument(char ***); +const char * get_argument_for_option(char ***, const char **); +noreturn usage(const char *); +noreturn list_compressors(void); + +// output.c +void write_commands_to_textfile(const char *, const struct command *, unsigned, const unsigned char *, unsigned char); +void write_commands_and_padding_to_textfile(const char *, const struct command *, unsigned, const unsigned char *, unsigned, unsigned); +void write_command_to_textfile(FILE *, struct command, const unsigned char *); +void write_commands_to_file(const char *, const struct command *, unsigned, const unsigned char *, unsigned char); +void write_command_to_file(FILE *, struct command, const unsigned char *); +void write_raw_data_to_file(const char *, const void *, unsigned); + +// packing.c +void optimize(struct command *, unsigned short); +void repack(struct command **, unsigned short *); + +// repcomp.c +struct command * try_compress_repetitions(const unsigned char *, const unsigned char *, unsigned short *, unsigned); +struct command find_repetition_at_position(const unsigned char *, unsigned short, unsigned short); + +// spcomp.c +struct command * try_compress_single_pass(const unsigned char *, const unsigned char *, unsigned short *, unsigned); +struct command find_best_copy(const unsigned char *, unsigned short, unsigned short, const unsigned char *, unsigned); +unsigned short scan_forwards(const unsigned char *, unsigned short, const unsigned char *, unsigned short, short *); +unsigned short scan_backwards(const unsigned char *, unsigned short, unsigned short, short *); +struct command find_best_repetition(const unsigned char *, unsigned short, unsigned short); + +// uncomp.c +struct command * get_commands_from_file(const unsigned char *, unsigned short * restrict, unsigned short * restrict); +unsigned char * get_uncompressed_data(const struct command *, const unsigned char *, unsigned short *); + +// util.c +noreturn error_exit(int, const char *, ...); +unsigned char * read_file_into_buffer(const char *, unsigned short *); +struct command pick_best_command(unsigned, struct command, ...); +int is_better(struct command, struct command); +short command_size(struct command); +unsigned short compressed_length(const struct command *, unsigned short); diff --git a/tools/lz/repcomp.c b/tools/lz/repcomp.c new file mode 100644 index 0000000..f2bbad8 --- /dev/null +++ b/tools/lz/repcomp.c @@ -0,0 +1,63 @@ +#include "proto.h" + +/* + Repetitions compressor: compresses the data only using a subset of the available repetition commands. + Methods defined: 6 + Flags values: the value plus one is taken as a bitfield indicating which kinds of repetition commands are used + (lowest bit to highest: repeat single byte (1), repeat two bytes (2), repeat zeros (3)). +*/ + +struct command * try_compress_repetitions (const unsigned char * data, __attribute__((unused)) const unsigned char * bitflipped, unsigned short * size, unsigned flags) { + unsigned short pos = 0, skipped = 0; + struct command * result = malloc(*size * sizeof(struct command)); + struct command * current = result; + struct command candidate; + flags = (flags + 1) << 1; + while (pos < *size) { + candidate = find_repetition_at_position(data, pos, *size); + if ((candidate.command == 3) && !(flags & 8)) { + candidate.command = 1; + candidate.value = 0; + } + if ((candidate.command == 1) && !(flags & 2)) { + candidate.command = 2; + candidate.value |= candidate.value << 8; + } + if ((flags & (1 << candidate.command)) && (command_size(candidate) <= candidate.count)) { + if (skipped) *(current ++) = (struct command) {.command = 0, .count = skipped, .value = pos - skipped}; + skipped = 0; + *(current ++) = candidate; + pos += candidate.count; + } else { + pos ++; + if ((++ skipped) == MAX_COMMAND_COUNT) { + *(current ++) = (struct command) {.command = 0, .count = MAX_COMMAND_COUNT, .value = pos - MAX_COMMAND_COUNT}; + skipped = 0; + } + } + } + if (skipped) *(current ++) = (struct command) {.command = 0, .count = skipped, .value = pos - skipped}; + *size = current - result; + result = realloc(result, *size * sizeof(struct command)); + return result; +} + +struct command find_repetition_at_position (const unsigned char * data, unsigned short position, unsigned short length) { + if ((position + 1) >= length) return data[position] ? ((struct command) {.command = 7}) : ((struct command) {.command = 3, .count = 1}); + unsigned char value[2] = {data[position], data[position + 1]}; + unsigned repcount, limit = length - position; + if (limit > MAX_COMMAND_COUNT) limit = MAX_COMMAND_COUNT; + for (repcount = 2; (repcount < limit) && (data[position + repcount] == value[repcount & 1]); repcount ++); + struct command result; + result.count = repcount; + if (*value != value[1]) { + if (!*value && (repcount < 3)) return (struct command) {.command = 3, .count = 1}; + result.command = 2; + result.value = ((unsigned) (*value)) | (((unsigned) (value[1])) << 8); + } else if (*value) { + result.command = 1; + result.value = *value; + } else + result.command = 3; + return result; +} diff --git a/tools/lz/spcomp.c b/tools/lz/spcomp.c new file mode 100644 index 0000000..b618483 --- /dev/null +++ b/tools/lz/spcomp.c @@ -0,0 +1,141 @@ +#include "proto.h" + +/* + Single-pass compressor: attempts to compress the data in a single pass, selecting the best command at each + position within some constraints. + Methods defined: 72 + Flags values: + Bit fields (will trigger alternate behavior if set): + 1: prefer repetition commands over copy commands of equal count + 2: don't emit a copy or repetition with a count equal to its size when the previous command is a literal (0) that + is not at maximum size (32 or 1024) + 4: don't emit long copy commands + Selector values (pick one from each group and add them to the bit fields): + - Scan delay: number of bytes that are forced into literal (0) commands after each non-literal command: + 0: 0 bytes + 8: 1 byte + 16: 2 bytes + - Copy command preference (when the command counts are tied), in order from most to least: + 0: normal (4), reversed (6), flipped (5) + 24: reversed (6), flipped (5), normal (4) + 48: flipped (5), reversed (6), normal (4) +*/ + +struct command * try_compress_single_pass (const unsigned char * data, const unsigned char * bitflipped, unsigned short * length, unsigned flags) { + struct command * commands = malloc(sizeof(struct command) * *length); + memset(commands, -1, sizeof(struct command) * *length); + struct command * current_command = commands; + unsigned short position = 0, previous_data = 0; + unsigned char scan_delay = 0, scan_delay_flag = (flags >> 3) % 3; + struct command copy, repetition; + while (position < *length) { + copy = find_best_copy(data, position, *length, bitflipped, flags); + repetition = find_best_repetition(data, position, *length); + if (flags & 1) + *current_command = pick_best_command(2, repetition, copy); + else + *current_command = pick_best_command(2, copy, repetition); + *current_command = pick_best_command(2, (struct command) {.command = 0, .count = 1, .value = position}, *current_command); + if ((flags & 2) && (command_size(*current_command) == current_command -> count)) + if (previous_data && (previous_data != SHORT_COMMAND_COUNT) && (previous_data != MAX_COMMAND_COUNT)) + *current_command = (struct command) {.command = 0, .count = 1, .value = position}; + if (scan_delay_flag) { + if (scan_delay >= scan_delay_flag) + scan_delay = 0; + else if (current_command -> command) { + scan_delay ++; + *current_command = (struct command) {.command = 0, .count = 1, .value = position}; + } + } + if (current_command -> command) + previous_data = 0; + else + previous_data += current_command -> count; + position += (current_command ++) -> count; + } + optimize(commands, current_command - commands); + repack(&commands, length); + return commands; +} + +struct command find_best_copy (const unsigned char * data, unsigned short position, unsigned short length, const unsigned char * bitflipped, unsigned flags) { + struct command simple = {.command = 7}; + struct command flipped = simple, backwards = simple; + short count, offset; + if ((count = scan_forwards(data + position, length - position, data, position, &offset))) + simple = (struct command) {.command = 4, .count = count, .value = offset}; + if ((count = scan_forwards(data + position, length - position, bitflipped, position, &offset))) + flipped = (struct command) {.command = 5, .count = count, .value = offset}; + if ((count = scan_backwards(data, length - position, position, &offset))) + backwards = (struct command) {.command = 6, .count = count, .value = offset}; + struct command command; + switch (flags / 24) { + case 0: command = pick_best_command(3, simple, backwards, flipped); break; + case 1: command = pick_best_command(3, backwards, flipped, simple); break; + case 2: command = pick_best_command(3, flipped, backwards, simple); + } + if ((flags & 4) && (command.count > SHORT_COMMAND_COUNT)) command.count = SHORT_COMMAND_COUNT; + return command; +} + +unsigned short scan_forwards (const unsigned char * target, unsigned short limit, const unsigned char * source, unsigned short real_position, short * offset) { + unsigned short best_match, best_length = 0; + unsigned short current_length; + unsigned short position; + for (position = 0; position < real_position; position ++) { + if (source[position] != *target) continue; + for (current_length = 0; (current_length < limit) && (source[position + current_length] == target[current_length]); current_length ++); + if (current_length > MAX_COMMAND_COUNT) current_length = MAX_COMMAND_COUNT; + if (current_length < best_length) continue; + best_match = position; + best_length = current_length; + } + if (!best_length) return 0; + if ((best_match + LOOKBACK_LIMIT) >= real_position) + *offset = best_match - real_position; + else + *offset = best_match; + return best_length; +} + +unsigned short scan_backwards (const unsigned char * data, unsigned short limit, unsigned short real_position, short * offset) { + if (real_position < limit) limit = real_position; + unsigned short best_match, best_length = 0; + unsigned short current_length; + unsigned short position; + for (position = 0; position < real_position; position ++) { + if (data[position] != data[real_position]) continue; + for (current_length = 0; (current_length <= position) && (current_length < limit) && + (data[position - current_length] == data[real_position + current_length]); current_length ++); + if (current_length > MAX_COMMAND_COUNT) current_length = MAX_COMMAND_COUNT; + if (current_length < best_length) continue; + best_match = position; + best_length = current_length; + } + if (!best_length) return 0; + if ((best_match + LOOKBACK_LIMIT) >= real_position) + *offset = best_match - real_position; + else + *offset = best_match; + return best_length; +} + +struct command find_best_repetition (const unsigned char * data, unsigned short position, unsigned short length) { + if ((position + 1) >= length) return data[position] ? ((struct command) {.command = 7}) : ((struct command) {.command = 3, .count = 1}); + unsigned char value[2] = {data[position], data[position + 1]}; + unsigned repcount, limit = length - position; + if (limit > MAX_COMMAND_COUNT) limit = MAX_COMMAND_COUNT; + for (repcount = 2; (repcount < limit) && (data[position + repcount] == value[repcount & 1]); repcount ++); + struct command result; + result.count = repcount; + if (*value != value[1]) { + if (!*value && (repcount < 3)) return (struct command) {.command = 3, .count = 1}; + result.command = 2; + result.value = ((unsigned) (*value)) | (((unsigned) (value[1])) << 8); + } else if (*value) { + result.command = 1; + result.value = *value; + } else + result.command = 3; + return result; +} diff --git a/tools/lz/uncomp.c b/tools/lz/uncomp.c new file mode 100644 index 0000000..b22fc75 --- /dev/null +++ b/tools/lz/uncomp.c @@ -0,0 +1,92 @@ +#include "proto.h" + +struct command * get_commands_from_file (const unsigned char * data, unsigned short * restrict size, unsigned short * restrict slack) { + struct command * result = malloc(*size * sizeof(struct command)); + unsigned short remaining = *size; + struct command * current = result; + const unsigned char * rp = data; + while (1) { + if (!(remaining --)) goto error; + current -> command = *rp >> 5; + current -> count = *(rp ++) & 31; + if (current -> command == 7) { + current -> command = current -> count >> 2; + current -> count = (current -> count & 3) << 8; + if (current -> command == 7) { + // long commands inside long commands are not allowed, but if the count is 0x300 here, it means that the original byte was 0xff + if (current -> count == 0x300) break; + goto error; + } + if (!(remaining --)) goto error; + current -> count |= *(rp ++); + } + current -> count ++; + switch (current -> command) { + case 0: + if (remaining <= current -> count) goto error; + current -> value = rp - data; + rp += current -> count; + remaining -= current -> count; + case 3: + break; + case 1: case 2: { + unsigned char p; + if (remaining <= current -> command) goto error; + current -> value = 0; + for (p = 0; p < current -> command; p ++) current -> value |= *(rp ++) << (p << 3); + remaining -= current -> command; + } break; + default: + if (!(remaining --)) goto error; + if ((current -> value = *(rp ++)) & 128) + current -> value = 127 - current -> value; + else { + if (!(remaining --)) goto error; + current -> value = (current -> value << 8) | *(rp ++); + } + } + current ++; + } + if (slack) *slack = *size - (rp - data); + *size = current - result; + return realloc(result, (*size ? *size : 1) * sizeof(struct command)); + error: + free(result); + return NULL; +} + +unsigned char * get_uncompressed_data (const struct command * commands, const unsigned char * compressed, unsigned short * size) { + const struct command * limit = commands + *size; + unsigned char * result = malloc(MAX_FILE_SIZE + MAX_COMMAND_COUNT); + unsigned char * current = result; + unsigned short p; + for (; commands < limit; commands ++) { + switch (commands -> command) { + case 0: + memcpy(current, compressed + commands -> value, commands -> count); + current += commands -> count; + break; + case 1: case 2: + for (p = 0; p < commands -> count; p ++) *(current ++) = commands -> value >> ((p % commands -> command) << 3); + break; + case 3: + memset(current, 0, commands -> count); + current += commands -> count; + break; + default: { + const unsigned char * ref = ((commands -> value < 0) ? current : result) + commands -> value; + for (p = 0; p < commands -> count; p ++) { + current[p] = ref[(commands -> command == 6) ? -(int) p : p]; + if (commands -> command == 5) current[p] = bit_flipping_table[current[p]]; + } + current += commands -> count; + } + } + if ((current - result) > MAX_FILE_SIZE) { + free(result); + return NULL; + } + } + *size = current - result; + return realloc(result, *size ? *size : 1); +} diff --git a/tools/lz/util.c b/tools/lz/util.c new file mode 100644 index 0000000..d77ac7b --- /dev/null +++ b/tools/lz/util.c @@ -0,0 +1,54 @@ +#include "proto.h" + +noreturn error_exit (int error_code, const char * error, ...) { + va_list ap; + va_start(ap, error); + fputs("error: ", stderr); + vfprintf(stderr, error, ap); + va_end(ap); + fputc('\n', stderr); + exit(error_code); +} + +unsigned char * read_file_into_buffer (const char * file, unsigned short * size) { + FILE * fp = file ? fopen(file, "rb") : stdin; + if (!fp) error_exit(1, "could not open file %s for reading", file); + unsigned char * buf = malloc(MAX_FILE_SIZE + 1); + int rv = fread(buf, 1, MAX_FILE_SIZE + 1, fp); + if (file) fclose(fp); + if (rv < 0) error_exit(1, "could not read from file %s", file); + if (rv > MAX_FILE_SIZE) error_exit(1, "file %s is too big", file ? file : ""); + *size = rv; + return buf; +} + +struct command pick_best_command (unsigned count, struct command command, ...) { + struct command result = command; + va_list ap; + va_start(ap, command); + while (-- count) { + command = va_arg(ap, struct command); + if (is_better(command, result)) result = command; + } + va_end(ap); + return result; +} + +int is_better (struct command new, struct command old) { + if (new.command == 7) return 0; + if (old.command == 7) return 1; + short new_savings = new.count - command_size(new), old_savings = old.count - command_size(old); + return new_savings > old_savings; +} + +short command_size (struct command command) { + short header_size = 1 + (command.count > SHORT_COMMAND_COUNT); + if (command.command & 4) return header_size + 1 + (command.value >= 0); + return header_size + command.command[(short []) {command.count, 1, 2, 0}]; +} + +unsigned short compressed_length (const struct command * commands, unsigned short count) { + unsigned short current, total = 0; + for (current = 0; current < count; current ++) if (commands[current].command != 7) total += command_size(commands[current]); + return total; +} diff --git a/tools/make_patch.c b/tools/make_patch.c new file mode 100644 index 0000000..113911c --- /dev/null +++ b/tools/make_patch.c @@ -0,0 +1,471 @@ +#define PROGRAM_NAME "make_patch" +#define USAGE_OPTS "labels.sym constants.sym patched.gbc original.gbc vc.patch.template vc.patch" + +#include "common.h" + +#include + +struct Buffer { + size_t item_size; + size_t size; + size_t capacity; + void *data; +}; + +struct Symbol { + struct Symbol *next; + unsigned int address; + unsigned int offset; + char name[]; // C99 FAM +}; + +struct Patch { + unsigned int offset; + unsigned int size; +}; + +struct Buffer *buffer_create(size_t item_size) { + struct Buffer *buffer = xmalloc(sizeof(*buffer)); + buffer->item_size = item_size; + buffer->size = 0; + buffer->capacity = 0x10; + buffer->data = xmalloc(buffer->capacity * item_size); + return buffer; +} + +void buffer_append(struct Buffer *buffer, const void *item) { + if (buffer->size >= buffer->capacity) { + buffer->capacity = (buffer->capacity + 1) * 2; + buffer->data = xrealloc(buffer->data, buffer->capacity * buffer->item_size); + } + memcpy((char *)buffer->data + (buffer->size++ * buffer->item_size), item, buffer->item_size); +} + +void buffer_free(struct Buffer *buffer) { + free(buffer->data); + free(buffer); +} + +void symbol_append(struct Symbol **symbols, const char *name, int bank, int address) { + size_t name_len = strlen(name) + 1; + struct Symbol *symbol = xmalloc(sizeof(*symbol) + name_len); + symbol->address = address; + symbol->offset = address < 0x8000 + ? (bank > 0 ? address + (bank - 1) * 0x4000 : address) // ROM addresses are relative to their bank + : address - 0x8000; // RAM addresses are relative to the start of all RAM + memcpy(symbol->name, name, name_len); + symbol->next = *symbols; + *symbols = symbol; +} + +void symbol_free(struct Symbol *symbols) { + for (struct Symbol *next; symbols; symbols = next) { + next = symbols->next; + free(symbols); + } +} + +const struct Symbol *symbol_find(const struct Symbol *symbols, const char *name) { + size_t name_len = strlen(name); + for (const struct Symbol *symbol = symbols; symbol; symbol = symbol->next) { + size_t sym_name_len = strlen(symbol->name); + if (name_len > sym_name_len) { + continue; + } + const char *sym_name = symbol->name; + if (name[0] == '.') { + // If `name` is a local label, compare it to the local part of `symbol->name` + sym_name += sym_name_len - name_len; + } + if (!strcmp(sym_name, name)) { + return symbol; + } + } + error_exit("Error: Unknown symbol: \"%s\"\n", name); +} + +const struct Symbol *symbol_find_cat(const struct Symbol *symbols, const char *prefix, const char *suffix) { + char *sym_name = xmalloc(strlen(prefix) + strlen(suffix) + 1); + sprintf(sym_name, "%s%s", prefix, suffix); + const struct Symbol *symbol = symbol_find(symbols, sym_name); + free(sym_name); + return symbol; +} + +int parse_number(const char *input, int base) { + char *endptr; + int n = (int)strtol(input, &endptr, base); + if (endptr == input || *endptr || n < 0) { + error_exit("Error: Cannot parse number: \"%s\"\n", input); + } + return n; +} + +void parse_symbol_value(char *input, int *restrict bank, int *restrict address) { + char *colon = strchr(input, ':'); + if (!colon) { + error_exit("Error: Cannot parse bank+address: \"%s\"\n", input); + } + *colon++ = '\0'; + *bank = parse_number(input, 16); + *address = parse_number(colon, 16); +} + +void parse_symbols(const char *filename, struct Symbol **symbols) { + FILE *file = xfopen(filename, 'r'); + struct Buffer *buffer = buffer_create(1); + + enum { SYM_PRE, SYM_VALUE, SYM_SPACE, SYM_NAME } state = SYM_PRE; + int bank = 0; + int address = 0; + + for (;;) { + int c = getc(file); + if (c == EOF || c == '\n' || c == '\r' || c == ';' || (state == SYM_NAME && (c == ' ' || c == '\t'))) { + if (state == SYM_NAME) { + // The symbol name has ended; append the buffered symbol + buffer_append(buffer, &(char []){'\0'}); + symbol_append(symbols, buffer->data, bank, address); + } + // Skip to the next line, ignoring anything after the symbol value and name + state = SYM_PRE; + while (c != EOF && c != '\n' && c != '\r') { + c = getc(file); + } + if (c == EOF) { + break; + } + } else if (c != ' ' && c != '\t') { + if (state == SYM_PRE || state == SYM_SPACE) { + // The symbol value or name has started; buffer its contents + if (++state == SYM_NAME) { + // The symbol name has started; parse the buffered value + buffer_append(buffer, &(char []){'\0'}); + parse_symbol_value(buffer->data, &bank, &address); + } + buffer->size = 0; + } + buffer_append(buffer, &c); + } else if (state == SYM_VALUE) { + // The symbol value has ended; wait to see if a name comes after it + state = SYM_SPACE; + } + } + + fclose(file); + buffer_free(buffer); +} + +int strfind(const char *s, const char *list[], int count) { + for (int i = 0; i < count; i++) { + if (!strcmp(s, list[i])) { + return i; + } + } + return -1; +} + +#define vstrfind(s, ...) strfind(s, (const char *[]){__VA_ARGS__}, COUNTOF((const char *[]){__VA_ARGS__})) + +int parse_arg_value(const char *arg, bool absolute, const struct Symbol *symbols, const char *patch_name) { + // Comparison operators for "ConditionValueB" evaluate to their particular values + int op = vstrfind(arg, "==", ">", "<", ">=", "<=", "!=", "||"); + if (op >= 0) { + return op == 6 ? 0x11 : op; // "||" is 0x11 + } + + // Literal numbers evaluate to themselves + if (isdigit((unsigned)arg[0]) || arg[0] == '+') { + return parse_number(arg, 0); + } + + // Symbols evaluate to their offset or address, plus an optional offset mod + int offset_mod = 0; + char *plus = strchr(arg, '+'); + if (plus) { + offset_mod = parse_number(plus, 0); + *plus = '\0'; + } + const char *sym_name = !strcmp(arg, "@") ? patch_name : arg; // "@" is the current patch label + const struct Symbol *symbol = symbol_find(symbols, sym_name); + return (absolute ? symbol->offset : symbol->address) + offset_mod; +} + +void interpret_command(char *command, const struct Symbol *current_hook, const struct Symbol *symbols, struct Buffer *patches, FILE *restrict new_rom, FILE *restrict orig_rom, FILE *restrict output) { + // Strip all leading spaces and all but one trailing space + int x = 0; + for (int i = 0; command[i]; i++) { + if (!isspace((unsigned)command[i]) || (i > 0 && !isspace((unsigned)command[i - 1]))) { + command[x++] = command[i]; + } + } + command[x - (x > 0 && isspace((unsigned)command[x - 1]))] = '\0'; + + // Count the arguments + int argc = 0; + for (const char *c = command; *c; c++) { + if (isspace((unsigned)*c)) { + argc++; + } + } + + // Get the arguments + char *argv[argc]; // VLA + char *arg = command; + for (int i = 0; i < argc; i++) { + while (*arg && !isspace((unsigned)*arg)) { + arg++; + } + if (!*arg) { + break; + } + *arg++ = '\0'; + argv[i] = arg; + } + + // Use the arguments + if (vstrfind(command, "patch", "PATCH", "patch_", "PATCH_", "patch/", "PATCH/") >= 0) { + if (argc > 2) { + error_exit("Error: Invalid arguments for command: \"%s\"\n", command); + } + if (!current_hook) { + error_exit("Error: No current patch for command: \"%s\"\n", command); + } + int current_offset = current_hook->offset + (argc > 0 ? parse_number(argv[0], 0) : 0); + if (fseek(orig_rom, current_offset, SEEK_SET)) { + error_exit("Error: Cannot seek to \"vc_patch %s\" in the original ROM\n", current_hook->name); + } + if (fseek(new_rom, current_offset, SEEK_SET)) { + error_exit("Error: Cannot seek to \"vc_patch %s\" in the new ROM\n", current_hook->name); + } + int length; + if (argc == 2) { + length = parse_number(argv[1], 0); + } else { + const struct Symbol *current_hook_end = symbol_find_cat(symbols, current_hook->name, "_End"); + length = current_hook_end->offset - current_offset; + } + buffer_append(patches, &(struct Patch){current_offset, length}); + bool modified = false; + if (length == 1) { + int c = getc(new_rom); + modified = c != getc(orig_rom); + fprintf(output, isupper((unsigned)command[0]) ? "0x%02X" : "0x%02x", c); + } else { + if (command[strlen(command) - 1] != '/') { + fprintf(output, command[strlen(command) - 1] == '_' ? "a%d: " : "a%d:", length); + } + for (int i = 0; i < length; i++) { + if (i) { + putc(' ', output); + } + int c = getc(new_rom); + modified |= c != getc(orig_rom); + fprintf(output, isupper((unsigned)command[0]) ? "%02X" : "%02x", c); + } + } + if (!modified) { + fprintf(stderr, PROGRAM_NAME ": Warning: \"vc_patch %s\" doesn't alter the ROM\n", current_hook->name); + } + + } else if (vstrfind(command, "dws", "DWS", "dws_", "DWS_", "dws/", "DWS/") >= 0) { + if (argc < 1) { + error_exit("Error: Invalid arguments for command: \"%s\"\n", command); + } + if (command[strlen(command) - 1] != '/') { + fprintf(output, command[strlen(command) - 1] == '_' ? "a%d: " : "a%d:", argc * 2); + } + for (int i = 0; i < argc; i++) { + int value = parse_arg_value(argv[i], false, symbols, current_hook->name); + if (value > 0xffff) { + error_exit("Error: Invalid value for \"%s\" argument: 0x%x\n", command, value); + } + if (i) { + putc(' ', output); + } + fprintf(output, isupper((unsigned)command[0]) ? "%02X %02X": "%02x %02x", value & 0xff, value >> 8); + } + + } else if (vstrfind(command, "db", "DB", "db_", "DB_", "db/", "DB/") >= 0) { + if (argc != 1) { + error_exit("Error: Invalid arguments for command: \"%s\"\n", command); + } + int value = parse_arg_value(argv[0], false, symbols, current_hook->name); + if (value > 0xff) { + error_exit("Error: Invalid value for \"%s\" argument: 0x%x\n", command, value); + } + if (command[strlen(command) - 1] != '/') { + fputs(command[strlen(command) - 1] == '_' ? "a1: " : "a1:", output); + } + fprintf(output, isupper((unsigned)command[0]) ? "%02X" : "%02x", value); + + } else if (vstrfind(command, "hex", "HEX", "HEx", "Hex", "heX", "hEX", "hex~", "HEX~", "HEx~", "Hex~", "heX~", "hEX~") >= 0) { + if (argc != 1 && argc != 2) { + error_exit("Error: Invalid arguments for command: \"%s\"\n", command); + } + int value = parse_arg_value(argv[0], command[strlen(command) - 1] != '~', symbols, current_hook->name); + int padding = argc > 1 ? parse_number(argv[1], 0) : 2; + if (vstrfind(command, "HEx", "HEx~") >= 0) { + fprintf(output, "0x%0*X%02x", padding - 2, value >> 8, value & 0xff); + } else if (vstrfind(command, "Hex", "Hex~") >= 0) { + fprintf(output, "0x%0*X%03x", padding - 3, value >> 12, value & 0xfff); + } else if (vstrfind(command, "heX", "heX~") >= 0) { + fprintf(output, "0x%0*x%02X", padding - 2, value >> 8, value & 0xff); + } else if (vstrfind(command, "hEX", "hEX~") >= 0) { + fprintf(output, "0x%0*x%03X", padding - 3, value >> 12, value & 0xfff); + } else { + fprintf(output, isupper((unsigned)command[0]) ? "0x%0*X" : "0x%0*x", padding, value); + } + + } else { + error_exit("Error: Unknown command: \"%s\"\n", command); + } +} + +void skip_to_next_line(FILE *restrict input, FILE *restrict output) { + for (int c = getc(input); c != EOF; c = getc(input)) { + putc(c, output); + if (c == '\n' || c == '\r') { + break; + } + } +} + +struct Buffer *process_template(const char *template_filename, const char *patch_filename, FILE *restrict new_rom, FILE *restrict orig_rom, const struct Symbol *symbols) { + FILE *input = xfopen(template_filename, 'r'); + FILE *output = xfopen(patch_filename, 'w'); + + struct Buffer *patches = buffer_create(sizeof(struct Patch)); + struct Buffer *buffer = buffer_create(1); + + // The ROM checksum will always differ + buffer_append(patches, &(struct Patch){0x14e, 2}); + // The Stadium data (see stadium.c) will always differ + unsigned int rom_size = (unsigned int)xfsize("", orig_rom); + if (rom_size == 128 * 0x4000) { + unsigned int stadium_size = 24 + 6 + 2 + 128 * 2 * 2; + buffer_append(patches, &(struct Patch){rom_size - stadium_size, stadium_size}); + } + + // Fill in the template + const struct Symbol *current_hook = NULL; + for (int c = getc(input); c != EOF; c = getc(input)) { + switch (c) { + case ';': + // ";" comments until the end of the line + putc(c, output); + skip_to_next_line(input, output); + break; + + case '{': + // "{...}" is a template command; buffer its contents + buffer->size = 0; + for (c = getc(input); c != EOF && c != '}'; c = getc(input)) { + buffer_append(buffer, &c); + } + buffer_append(buffer, &(char []){'\0'}); + // Interpret the command in the context of the current patch + interpret_command(buffer->data, current_hook, symbols, patches, new_rom, orig_rom, output); + break; + + case '[': + // "[...]" is a patch label; buffer its contents + putc(c, output); + bool alternate = false; + buffer->size = 0; + for (c = getc(input); c != EOF; c = getc(input)) { + if (!alternate && c == '@') { + // "@" designates an alternate name for the ".VC_" label + alternate = true; + buffer->size = 0; + } else if (c == ']') { + putc(c, output); + break; + } else { + if (!alternate) { + putc(c, output); + if (!isalnum(c) && c != '_') { + // Convert non-identifier characters to underscores + c = '_'; + } + } + buffer_append(buffer, &c); + } + } + buffer_append(buffer, &(char []){'\0'}); + // The current patch should have a corresponding ".VC_" label + current_hook = symbol_find_cat(symbols, ".VC_", buffer->data); + skip_to_next_line(input, output); + break; + + default: + putc(c, output); + } + } + + rewind(orig_rom); + rewind(new_rom); + + fclose(input); + fclose(output); + buffer_free(buffer); + return patches; +} + +int compare_patch(const void *patch1, const void *patch2) { + unsigned int offset1 = ((const struct Patch *)patch1)->offset; + unsigned int offset2 = ((const struct Patch *)patch2)->offset; + return offset1 > offset2 ? 1 : offset1 < offset2 ? -1 : 0; +} + +bool verify_completeness(FILE *restrict orig_rom, FILE *restrict new_rom, struct Buffer *patches) { + qsort(patches->data, patches->size, patches->item_size, compare_patch); + for (unsigned int offset = 0, index = 0; ; offset++) { + int orig_byte = getc(orig_rom); + int new_byte = getc(new_rom); + if (orig_byte == EOF || new_byte == EOF) { + return orig_byte == new_byte; + } + struct Patch *patch = &((struct Patch *)patches->data)[index]; + if (index < patches->size && patch->offset == offset) { + if (fseek(orig_rom, patch->size, SEEK_CUR)) { + return false; + } + if (fseek(new_rom, patch->size, SEEK_CUR)) { + return false; + } + offset += patch->size; + index++; + } else if (orig_byte != new_byte) { + fprintf(stderr, PROGRAM_NAME ": Warning: Unpatched difference at offset: 0x%x\n", offset); + fprintf(stderr, " Original ROM value: 0x%02x\n", orig_byte); + fprintf(stderr, " Patched ROM value: 0x%02x\n", new_byte); + fprintf(stderr, " Current patch offset: 0x%06x\n", patch->offset); + return false; + } + } +} + +int main(int argc, char *argv[]) { + if (argc != 7) { + usage_exit(1); + } + + struct Symbol *symbols = NULL; + parse_symbols(argv[1], &symbols); + parse_symbols(argv[2], &symbols); + + FILE *new_rom = xfopen(argv[3], 'r'); + FILE *orig_rom = xfopen(argv[4], 'r'); + struct Buffer *patches = process_template(argv[5], argv[6], new_rom, orig_rom, symbols); + + if (!verify_completeness(orig_rom, new_rom, patches)) { + fprintf(stderr, PROGRAM_NAME ": Warning: Not all ROM differences are defined by \"%s\"\n", argv[6]); + } + + symbol_free(symbols); + fclose(new_rom); + fclose(orig_rom); + buffer_free(patches); + return 0; +} diff --git a/tools/palfix.py b/tools/palfix.py new file mode 100644 index 0000000..a0b431d --- /dev/null +++ b/tools/palfix.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Usage: python palfix.py image.png + +Fix the palette format of the input image. Colored images (Pokémon or trainer +sprites) will become indexed, with a palette sorted {white, light color, dark +color, black}. Grayscale images will become two-bit grayscale. +""" + +import sys + +import png + +def rgb8_to_rgb5(c): + r, g, b = c + return (r // 8, g // 8, b // 8) + +def rgb5_to_rgb8(c): + r, g, b = c + return (r * 8 + r // 4, g * 8 + g // 4, b * 8 + b // 4) + +def invert(c): + r, g, b = c + return (31 - r, 31 - g, 31 - b) + +def luminance(c): + r, g, b = c + return 0.299 * r**2 + 0.587 * g**2 + 0.114 * b**2 + +def rgb5_pixels(row): + yield from (rgb8_to_rgb5(row[x:x+3]) for x in range(0, len(row), 4)) + +def is_grayscale(palette): + return (palette == ((31, 31, 31), (21, 21, 21), (10, 10, 10), (0, 0, 0)) or + palette == ((31, 31, 31), (20, 20, 20), (10, 10, 10), (0, 0, 0))) + +def fix_pal(filename): + with open(filename, 'rb') as file: + width, height, rows = png.Reader(file).asRGBA8()[:3] + rows = list(rows) + b_and_w = {(0, 0, 0), (31, 31, 31)} + colors = {c for row in rows for c in rgb5_pixels(row)} - b_and_w + if not colors: + colors = {(21, 21, 21), (10, 10, 10)} + elif len(colors) == 1: + c = colors.pop() + colors = {c, invert(c)} + elif len(colors) != 2: + return False + palette = tuple(sorted(colors | b_and_w, key=luminance, reverse=True)) + assert len(palette) == 4 + rows = [list(map(palette.index, rgb5_pixels(row))) for row in rows] + if is_grayscale(palette): + rows = [[3 - c for c in row] for row in rows] + writer = png.Writer(width, height, greyscale=True, bitdepth=2, compression=9) + else: + palette = tuple(map(rgb5_to_rgb8, palette)) + writer = png.Writer(width, height, palette=palette, bitdepth=8, compression=9) + with open(filename, 'wb') as file: + writer.write(file, rows) + return True + +def main(): + if len(sys.argv) < 2: + print(f'Usage: {sys.argv[0]} pic.png', file=sys.stderr) + sys.exit(1) + for filename in sys.argv[1:]: + if not filename.lower().endswith('.png'): + print(f'{filename} is not a .png file!', file=sys.stderr) + elif not fix_pal(filename): + print(f'{filename} has too many colors!', file=sys.stderr) + +if __name__ == '__main__': + main() diff --git a/tools/png.py b/tools/png.py new file mode 100644 index 0000000..dd9746b --- /dev/null +++ b/tools/png.py @@ -0,0 +1,2357 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# png.py - PNG encoder/decoder in pure Python +# +# Copyright (C) 2006 Johann C. Rocholl +# Portions Copyright (C) 2009 David Jones +# And probably portions Copyright (C) 2006 Nicko van Someren +# +# Original concept by Johann C. Rocholl. +# +# LICENCE (MIT) +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation files +# (the "Software"), to deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, +# publish, distribute, sublicense, and/or sell copies of the Software, +# and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +""" +The ``png`` module can read and write PNG files. + +Installation and Overview +------------------------- + +``pip install pypng`` + +For help, type ``import png; help(png)`` in your python interpreter. + +A good place to start is the :class:`Reader` and :class:`Writer` classes. + +Coverage of PNG formats is fairly complete; +all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per pixel) and +colour combinations are supported: + +- greyscale (1/2/4/8/16 bit); +- RGB, RGBA, LA (greyscale with alpha) with 8/16 bits per channel; +- colour mapped images (1/2/4/8 bit). + +Interlaced images, +which support a progressive display when downloading, +are supported for both reading and writing. + +A number of optional chunks can be specified (when writing) +and understood (when reading): ``tRNS``, ``bKGD``, ``gAMA``. + +The ``sBIT`` chunk can be used to specify precision for +non-native bit depths. + +Requires Python 3.5 or higher. +Installation is trivial, +but see the ``README.txt`` file (with the source distribution) for details. + +Full use of all features will need some reading of the PNG specification +http://www.w3.org/TR/2003/REC-PNG-20031110/. + +The package also comes with command line utilities. + +- ``pripamtopng`` converts + `Netpbm `_ PAM/PNM files to PNG; +- ``pripngtopam`` converts PNG to file PAM/PNM. + +There are a few more for simple PNG manipulations. + +Spelling and Terminology +------------------------ + +Generally British English spelling is used in the documentation. +So that's "greyscale" and "colour". +This not only matches the author's native language, +it's also used by the PNG specification. + +Colour Models +------------- + +The major colour models supported by PNG (and hence by PyPNG) are: + +- greyscale; +- greyscale--alpha; +- RGB; +- RGB--alpha. + +Also referred to using the abbreviations: L, LA, RGB, RGBA. +Each letter codes a single channel: +*L* is for Luminance or Luma or Lightness (greyscale images); +*A* stands for Alpha, the opacity channel +(used for transparency effects, but higher values are more opaque, +so it makes sense to call it opacity); +*R*, *G*, *B* stand for Red, Green, Blue (colour image). + +Lists, arrays, sequences, and so on +----------------------------------- + +When getting pixel data out of this module (reading) and +presenting data to this module (writing) there are +a number of ways the data could be represented as a Python value. + +The preferred format is a sequence of *rows*, +which each row being a sequence of *values*. +In this format, the values are in pixel order, +with all the values from all the pixels in a row +being concatenated into a single sequence for that row. + +Consider an image that is 3 pixels wide by 2 pixels high, and each pixel +has RGB components: + +Sequence of rows:: + + list([R,G,B, R,G,B, R,G,B], + [R,G,B, R,G,B, R,G,B]) + +Each row appears as its own list, +but the pixels are flattened so that three values for one pixel +simply follow the three values for the previous pixel. + +This is the preferred because +it provides a good compromise between space and convenience. +PyPNG regards itself as at liberty to replace any sequence type with +any sufficiently compatible other sequence type; +in practice each row is an array (``bytearray`` or ``array.array``). + +To allow streaming the outer list is sometimes +an iterator rather than an explicit list. + +An alternative format is a single array holding all the values. + +Array of values:: + + [R,G,B, R,G,B, R,G,B, + R,G,B, R,G,B, R,G,B] + +The entire image is one single giant sequence of colour values. +Generally an array will be used (to save space), not a list. + +The top row comes first, +and within each row the pixels are ordered from left-to-right. +Within a pixel the values appear in the order R-G-B-A +(or L-A for greyscale--alpha). + +There is another format, which should only be used with caution. +It is mentioned because it is used internally, +is close to what lies inside a PNG file itself, +and has some support from the public API. +This format is called *packed*. +When packed, each row is a sequence of bytes (integers from 0 to 255), +just as it is before PNG scanline filtering is applied. +When the bit depth is 8 this is the same as a sequence of rows; +when the bit depth is less than 8 (1, 2 and 4), +several pixels are packed into each byte; +when the bit depth is 16 each pixel value is decomposed into 2 bytes +(and `packed` is a misnomer). +This format is used by the :meth:`Writer.write_packed` method. +It isn't usually a convenient format, +but may be just right if the source data for +the PNG image comes from something that uses a similar format +(for example, 1-bit BMPs, or another PNG file). +""" + +__version__ = "0.0.21" + +import collections +import io # For io.BytesIO +import itertools +import math +# http://www.python.org/doc/2.4.4/lib/module-operator.html +import operator +import re +import struct +import sys +# http://www.python.org/doc/2.4.4/lib/module-warnings.html +import warnings +import zlib + +from array import array + + +__all__ = ['Image', 'Reader', 'Writer', 'write_chunks', 'from_array'] + + +# The PNG signature. +# http://www.w3.org/TR/PNG/#5PNG-file-signature +signature = struct.pack('8B', 137, 80, 78, 71, 13, 10, 26, 10) + +# The xstart, ystart, xstep, ystep for the Adam7 interlace passes. +adam7 = ((0, 0, 8, 8), + (4, 0, 8, 8), + (0, 4, 4, 8), + (2, 0, 4, 4), + (0, 2, 2, 4), + (1, 0, 2, 2), + (0, 1, 1, 2)) + + +def adam7_generate(width, height): + """ + Generate the coordinates for the reduced scanlines + of an Adam7 interlaced image + of size `width` by `height` pixels. + + Yields a generator for each pass, + and each pass generator yields a series of (x, y, xstep) triples, + each one identifying a reduced scanline consisting of + pixels starting at (x, y) and taking every xstep pixel to the right. + """ + + for xstart, ystart, xstep, ystep in adam7: + if xstart >= width: + continue + yield ((xstart, y, xstep) for y in range(ystart, height, ystep)) + + +# Models the 'pHYs' chunk (used by the Reader) +Resolution = collections.namedtuple('_Resolution', 'x y unit_is_meter') + + +def group(s, n): + return list(zip(* [iter(s)] * n)) + + +def isarray(x): + return isinstance(x, array) + + +def check_palette(palette): + """ + Check a palette argument (to the :class:`Writer` class) for validity. + Returns the palette as a list if okay; + raises an exception otherwise. + """ + + # None is the default and is allowed. + if palette is None: + return None + + p = list(palette) + if not (0 < len(p) <= 256): + raise ProtocolError( + "a palette must have between 1 and 256 entries," + " see https://www.w3.org/TR/PNG/#11PLTE") + seen_triple = False + for i, t in enumerate(p): + if len(t) not in (3, 4): + raise ProtocolError( + "palette entry %d: entries must be 3- or 4-tuples." % i) + if len(t) == 3: + seen_triple = True + if seen_triple and len(t) == 4: + raise ProtocolError( + "palette entry %d: all 4-tuples must precede all 3-tuples" % i) + for x in t: + if int(x) != x or not(0 <= x <= 255): + raise ProtocolError( + "palette entry %d: " + "values must be integer: 0 <= x <= 255" % i) + return p + + +def check_sizes(size, width, height): + """ + Check that these arguments, if supplied, are consistent. + Return a (width, height) pair. + """ + + if not size: + return width, height + + if len(size) != 2: + raise ProtocolError( + "size argument should be a pair (width, height)") + if width is not None and width != size[0]: + raise ProtocolError( + "size[0] (%r) and width (%r) should match when both are used." + % (size[0], width)) + if height is not None and height != size[1]: + raise ProtocolError( + "size[1] (%r) and height (%r) should match when both are used." + % (size[1], height)) + return size + + +def check_color(c, greyscale, which): + """ + Checks that a colour argument for transparent or background options + is the right form. + Returns the colour + (which, if it's a bare integer, is "corrected" to a 1-tuple). + """ + + if c is None: + return c + if greyscale: + try: + len(c) + except TypeError: + c = (c,) + if len(c) != 1: + raise ProtocolError("%s for greyscale must be 1-tuple" % which) + if not is_natural(c[0]): + raise ProtocolError( + "%s colour for greyscale must be integer" % which) + else: + if not (len(c) == 3 and + is_natural(c[0]) and + is_natural(c[1]) and + is_natural(c[2])): + raise ProtocolError( + "%s colour must be a triple of integers" % which) + return c + + +class Error(Exception): + def __str__(self): + return self.__class__.__name__ + ': ' + ' '.join(self.args) + + +class FormatError(Error): + """ + Problem with input file format. + In other words, PNG file does not conform to + the specification in some way and is invalid. + """ + + +class ProtocolError(Error): + """ + Problem with the way the programming interface has been used, + or the data presented to it. + """ + + +class ChunkError(FormatError): + pass + + +class Default: + """The default for the greyscale parameter.""" + + +class Writer: + """ + PNG encoder in pure Python. + """ + + def __init__(self, width=None, height=None, + size=None, + greyscale=Default, + alpha=False, + bitdepth=8, + palette=None, + transparent=None, + background=None, + gamma=None, + compression=None, + interlace=False, + planes=None, + colormap=None, + maxval=None, + chunk_limit=2**20, + x_pixels_per_unit=None, + y_pixels_per_unit=None, + unit_is_meter=False): + """ + Create a PNG encoder object. + + Arguments: + + width, height + Image size in pixels, as two separate arguments. + size + Image size (w,h) in pixels, as single argument. + greyscale + Pixels are greyscale, not RGB. + alpha + Input data has alpha channel (RGBA or LA). + bitdepth + Bit depth: from 1 to 16 (for each channel). + palette + Create a palette for a colour mapped image (colour type 3). + transparent + Specify a transparent colour (create a ``tRNS`` chunk). + background + Specify a default background colour (create a ``bKGD`` chunk). + gamma + Specify a gamma value (create a ``gAMA`` chunk). + compression + zlib compression level: 0 (none) to 9 (more compressed); + default: -1 or None. + interlace + Create an interlaced image. + chunk_limit + Write multiple ``IDAT`` chunks to save memory. + x_pixels_per_unit + Number of pixels a unit along the x axis (write a + `pHYs` chunk). + y_pixels_per_unit + Number of pixels a unit along the y axis (write a + `pHYs` chunk). Along with `x_pixel_unit`, this gives + the pixel size ratio. + unit_is_meter + `True` to indicate that the unit (for the `pHYs` + chunk) is metre. + + The image size (in pixels) can be specified either by using the + `width` and `height` arguments, or with the single `size` + argument. + If `size` is used it should be a pair (*width*, *height*). + + The `greyscale` argument indicates whether input pixels + are greyscale (when true), or colour (when false). + The default is true unless `palette=` is used. + + The `alpha` argument (a boolean) specifies + whether input pixels have an alpha channel (or not). + + `bitdepth` specifies the bit depth of the source pixel values. + Each channel may have a different bit depth. + Each source pixel must have values that are + an integer between 0 and ``2**bitdepth-1``, where + `bitdepth` is the bit depth for the corresponding channel. + For example, 8-bit images have values between 0 and 255. + PNG only stores images with bit depths of + 1,2,4,8, or 16 (the same for all channels). + When `bitdepth` is not one of these values or where + channels have different bit depths, + the next highest valid bit depth is selected, + and an ``sBIT`` (significant bits) chunk is generated + that specifies the original precision of the source image. + In this case the supplied pixel values will be rescaled to + fit the range of the selected bit depth. + + The PNG file format supports many bit depth / colour model + combinations, but not all. + The details are somewhat arcane + (refer to the PNG specification for full details). + Briefly: + Bit depths < 8 (1,2,4) are only allowed with greyscale and + colour mapped images; + colour mapped images cannot have bit depth 16. + + For colour mapped images + (in other words, when the `palette` argument is specified) + the `bitdepth` argument must match one of + the valid PNG bit depths: 1, 2, 4, or 8. + (It is valid to have a PNG image with a palette and + an ``sBIT`` chunk, but the meaning is slightly different; + it would be awkward to use the `bitdepth` argument for this.) + + The `palette` option, when specified, + causes a colour mapped image to be created: + the PNG colour type is set to 3; + `greyscale` must not be true; `alpha` must not be true; + `transparent` must not be set. + The bit depth must be 1,2,4, or 8. + When a colour mapped image is created, + the pixel values are palette indexes and + the `bitdepth` argument specifies the size of these indexes + (not the size of the colour values in the palette). + + The palette argument value should be a sequence of 3- or + 4-tuples. + 3-tuples specify RGB palette entries; + 4-tuples specify RGBA palette entries. + All the 4-tuples (if present) must come before all the 3-tuples. + A ``PLTE`` chunk is created; + if there are 4-tuples then a ``tRNS`` chunk is created as well. + The ``PLTE`` chunk will contain all the RGB triples in the same + sequence; + the ``tRNS`` chunk will contain the alpha channel for + all the 4-tuples, in the same sequence. + Palette entries are always 8-bit. + + If specified, the `transparent` and `background` parameters must be + a tuple with one element for each channel in the image. + Either a 3-tuple of integer (RGB) values for a colour image, or + a 1-tuple of a single integer for a greyscale image. + + If specified, the `gamma` parameter must be a positive number + (generally, a `float`). + A ``gAMA`` chunk will be created. + Note that this will not change the values of the pixels as + they appear in the PNG file, + they are assumed to have already + been converted appropriately for the gamma specified. + + The `compression` argument specifies the compression level to + be used by the ``zlib`` module. + Values from 1 to 9 (highest) specify compression. + 0 means no compression. + -1 and ``None`` both mean that the ``zlib`` module uses + the default level of compression (which is generally acceptable). + + If `interlace` is true then an interlaced image is created + (using PNG's so far only interlace method, *Adam7*). + This does not affect how the pixels should be passed in, + rather it changes how they are arranged into the PNG file. + On slow connexions interlaced images can be + partially decoded by the browser to give + a rough view of the image that is + successively refined as more image data appears. + + .. note :: + + Enabling the `interlace` option requires the entire image + to be processed in working memory. + + `chunk_limit` is used to limit the amount of memory used whilst + compressing the image. + In order to avoid using large amounts of memory, + multiple ``IDAT`` chunks may be created. + """ + + # At the moment the `planes` argument is ignored; + # its purpose is to act as a dummy so that + # ``Writer(x, y, **info)`` works, where `info` is a dictionary + # returned by Reader.read and friends. + # Ditto for `colormap`. + + width, height = check_sizes(size, width, height) + del size + + if not is_natural(width) or not is_natural(height): + raise ProtocolError("width and height must be integers") + if width <= 0 or height <= 0: + raise ProtocolError("width and height must be greater than zero") + # http://www.w3.org/TR/PNG/#7Integers-and-byte-order + if width > 2 ** 31 - 1 or height > 2 ** 31 - 1: + raise ProtocolError("width and height cannot exceed 2**31-1") + + if alpha and transparent is not None: + raise ProtocolError( + "transparent colour not allowed with alpha channel") + + # bitdepth is either single integer, or tuple of integers. + # Convert to tuple. + try: + len(bitdepth) + except TypeError: + bitdepth = (bitdepth, ) + for b in bitdepth: + valid = is_natural(b) and 1 <= b <= 16 + if not valid: + raise ProtocolError( + "each bitdepth %r must be a positive integer <= 16" % + (bitdepth,)) + + # Calculate channels, and + # expand bitdepth to be one element per channel. + palette = check_palette(palette) + alpha = bool(alpha) + colormap = bool(palette) + if greyscale is Default and palette: + greyscale = False + greyscale = bool(greyscale) + if colormap: + color_planes = 1 + planes = 1 + else: + color_planes = (3, 1)[greyscale] + planes = color_planes + alpha + if len(bitdepth) == 1: + bitdepth *= planes + + bitdepth, self.rescale = check_bitdepth_rescale( + palette, + bitdepth, + transparent, alpha, greyscale) + + # These are assertions, because above logic should have + # corrected or raised all problematic cases. + if bitdepth < 8: + assert greyscale or palette + assert not alpha + if bitdepth > 8: + assert not palette + + transparent = check_color(transparent, greyscale, 'transparent') + background = check_color(background, greyscale, 'background') + + # It's important that the true boolean values + # (greyscale, alpha, colormap, interlace) are converted + # to bool because Iverson's convention is relied upon later on. + self.width = width + self.height = height + self.transparent = transparent + self.background = background + self.gamma = gamma + self.greyscale = greyscale + self.alpha = alpha + self.colormap = colormap + self.bitdepth = int(bitdepth) + self.compression = compression + self.chunk_limit = chunk_limit + self.interlace = bool(interlace) + self.palette = palette + self.x_pixels_per_unit = x_pixels_per_unit + self.y_pixels_per_unit = y_pixels_per_unit + self.unit_is_meter = bool(unit_is_meter) + + self.color_type = (4 * self.alpha + + 2 * (not greyscale) + + 1 * self.colormap) + assert self.color_type in (0, 2, 3, 4, 6) + + self.color_planes = color_planes + self.planes = planes + # :todo: fix for bitdepth < 8 + self.psize = (self.bitdepth / 8) * self.planes + + def write(self, outfile, rows): + """ + Write a PNG image to the output file. + `rows` should be an iterable that yields each row + (each row is a sequence of values). + The rows should be the rows of the original image, + so there should be ``self.height`` rows of + ``self.width * self.planes`` values. + If `interlace` is specified (when creating the instance), + then an interlaced PNG file will be written. + Supply the rows in the normal image order; + the interlacing is carried out internally. + + .. note :: + + Interlacing requires the entire image to be in working memory. + """ + + # Values per row + vpr = self.width * self.planes + + def check_rows(rows): + """ + Yield each row in rows, + but check each row first (for correct width). + """ + for i, row in enumerate(rows): + try: + wrong_length = len(row) != vpr + except TypeError: + # When using an itertools.ichain object or + # other generator not supporting __len__, + # we set this to False to skip the check. + wrong_length = False + if wrong_length: + # Note: row numbers start at 0. + raise ProtocolError( + "Expected %d values but got %d values, in row %d" % + (vpr, len(row), i)) + yield row + + if self.interlace: + fmt = 'BH'[self.bitdepth > 8] + a = array(fmt, itertools.chain(*check_rows(rows))) + return self.write_array(outfile, a) + + nrows = self.write_passes(outfile, check_rows(rows)) + if nrows != self.height: + raise ProtocolError( + "rows supplied (%d) does not match height (%d)" % + (nrows, self.height)) + return nrows + + def write_passes(self, outfile, rows): + """ + Write a PNG image to the output file. + + Most users are expected to find the :meth:`write` or + :meth:`write_array` method more convenient. + + The rows should be given to this method in the order that + they appear in the output file. + For straightlaced images, this is the usual top to bottom ordering. + For interlaced images the rows should have been interlaced before + passing them to this function. + + `rows` should be an iterable that yields each row + (each row being a sequence of values). + """ + + # Ensure rows are scaled (to 4-/8-/16-bit), + # and packed into bytes. + + if self.rescale: + rows = rescale_rows(rows, self.rescale) + + if self.bitdepth < 8: + rows = pack_rows(rows, self.bitdepth) + elif self.bitdepth == 16: + rows = unpack_rows(rows) + + return self.write_packed(outfile, rows) + + def write_packed(self, outfile, rows): + """ + Write PNG file to `outfile`. + `rows` should be an iterator that yields each packed row; + a packed row being a sequence of packed bytes. + + The rows have a filter byte prefixed and + are then compressed into one or more IDAT chunks. + They are not processed any further, + so if bitdepth is other than 1, 2, 4, 8, 16, + the pixel values should have been scaled + before passing them to this method. + + This method does work for interlaced images but it is best avoided. + For interlaced images, the rows should be + presented in the order that they appear in the file. + """ + + self.write_preamble(outfile) + + # http://www.w3.org/TR/PNG/#11IDAT + if self.compression is not None: + compressor = zlib.compressobj(self.compression) + else: + compressor = zlib.compressobj() + + # data accumulates bytes to be compressed for the IDAT chunk; + # it's compressed when sufficiently large. + data = bytearray() + + # raise i scope out of the for loop. set to -1, because the for loop + # sets i to 0 on the first pass + i = -1 + for i, row in enumerate(rows): + # Add "None" filter type. + # Currently, it's essential that this filter type be used + # for every scanline as + # we do not mark the first row of a reduced pass image; + # that means we could accidentally compute + # the wrong filtered scanline if we used + # "up", "average", or "paeth" on such a line. + data.append(0) + data.extend(row) + if len(data) > self.chunk_limit: + compressed = compressor.compress(data) + if len(compressed): + write_chunk(outfile, b'IDAT', compressed) + data = bytearray() + + compressed = compressor.compress(bytes(data)) + flushed = compressor.flush() + if len(compressed) or len(flushed): + write_chunk(outfile, b'IDAT', compressed + flushed) + # http://www.w3.org/TR/PNG/#11IEND + write_chunk(outfile, b'IEND') + return i + 1 + + def write_preamble(self, outfile): + # http://www.w3.org/TR/PNG/#5PNG-file-signature + outfile.write(signature) + + # http://www.w3.org/TR/PNG/#11IHDR + write_chunk(outfile, b'IHDR', + struct.pack("!2I5B", self.width, self.height, + self.bitdepth, self.color_type, + 0, 0, self.interlace)) + + # See :chunk:order + # http://www.w3.org/TR/PNG/#11gAMA + if self.gamma is not None: + write_chunk(outfile, b'gAMA', + struct.pack("!L", int(round(self.gamma * 1e5)))) + + # See :chunk:order + # http://www.w3.org/TR/PNG/#11sBIT + if self.rescale: + write_chunk( + outfile, b'sBIT', + struct.pack('%dB' % self.planes, + * [s[0] for s in self.rescale])) + + # :chunk:order: Without a palette (PLTE chunk), + # ordering is relatively relaxed. + # With one, gAMA chunk must precede PLTE chunk + # which must precede tRNS and bKGD. + # See http://www.w3.org/TR/PNG/#5ChunkOrdering + if self.palette: + p, t = make_palette_chunks(self.palette) + write_chunk(outfile, b'PLTE', p) + if t: + # tRNS chunk is optional; + # Only needed if palette entries have alpha. + write_chunk(outfile, b'tRNS', t) + + # http://www.w3.org/TR/PNG/#11tRNS + if self.transparent is not None: + if self.greyscale: + fmt = "!1H" + else: + fmt = "!3H" + write_chunk(outfile, b'tRNS', + struct.pack(fmt, *self.transparent)) + + # http://www.w3.org/TR/PNG/#11bKGD + if self.background is not None: + if self.greyscale: + fmt = "!1H" + else: + fmt = "!3H" + write_chunk(outfile, b'bKGD', + struct.pack(fmt, *self.background)) + + # http://www.w3.org/TR/PNG/#11pHYs + if (self.x_pixels_per_unit is not None and + self.y_pixels_per_unit is not None): + tup = (self.x_pixels_per_unit, + self.y_pixels_per_unit, + int(self.unit_is_meter)) + write_chunk(outfile, b'pHYs', struct.pack("!LLB", *tup)) + + def write_array(self, outfile, pixels): + """ + Write an array that holds all the image values + as a PNG file on the output file. + See also :meth:`write` method. + """ + + if self.interlace: + if type(pixels) != array: + # Coerce to array type + fmt = 'BH'[self.bitdepth > 8] + pixels = array(fmt, pixels) + return self.write_passes( + outfile, + self.array_scanlines_interlace(pixels) + ) + else: + return self.write_passes( + outfile, + self.array_scanlines(pixels) + ) + + def array_scanlines(self, pixels): + """ + Generates rows (each a sequence of values) from + a single array of values. + """ + + # Values per row + vpr = self.width * self.planes + stop = 0 + for y in range(self.height): + start = stop + stop = start + vpr + yield pixels[start:stop] + + def array_scanlines_interlace(self, pixels): + """ + Generator for interlaced scanlines from an array. + `pixels` is the full source image as a single array of values. + The generator yields each scanline of the reduced passes in turn, + each scanline being a sequence of values. + """ + + # http://www.w3.org/TR/PNG/#8InterlaceMethods + # Array type. + fmt = 'BH'[self.bitdepth > 8] + # Value per row + vpr = self.width * self.planes + + # Each iteration generates a scanline starting at (x, y) + # and consisting of every xstep pixels. + for lines in adam7_generate(self.width, self.height): + for x, y, xstep in lines: + # Pixels per row (of reduced image) + ppr = int(math.ceil((self.width - x) / float(xstep))) + # Values per row (of reduced image) + reduced_row_len = ppr * self.planes + if xstep == 1: + # Easy case: line is a simple slice. + offset = y * vpr + yield pixels[offset: offset + vpr] + continue + # We have to step by xstep, + # which we can do one plane at a time + # using the step in Python slices. + row = array(fmt) + # There's no easier way to set the length of an array + row.extend(pixels[0:reduced_row_len]) + offset = y * vpr + x * self.planes + end_offset = (y + 1) * vpr + skip = self.planes * xstep + for i in range(self.planes): + row[i::self.planes] = \ + pixels[offset + i: end_offset: skip] + yield row + + +def write_chunk(outfile, tag, data=b''): + """ + Write a PNG chunk to the output file, including length and + checksum. + """ + + data = bytes(data) + # http://www.w3.org/TR/PNG/#5Chunk-layout + outfile.write(struct.pack("!I", len(data))) + outfile.write(tag) + outfile.write(data) + checksum = zlib.crc32(tag) + checksum = zlib.crc32(data, checksum) + checksum &= 2 ** 32 - 1 + outfile.write(struct.pack("!I", checksum)) + + +def write_chunks(out, chunks): + """Create a PNG file by writing out the chunks.""" + + out.write(signature) + for chunk in chunks: + write_chunk(out, *chunk) + + +def rescale_rows(rows, rescale): + """ + Take each row in rows (an iterator) and yield + a fresh row with the pixels scaled according to + the rescale parameters in the list `rescale`. + Each element of `rescale` is a tuple of + (source_bitdepth, target_bitdepth), + with one element per channel. + """ + + # One factor for each channel + fs = [float(2 ** s[1] - 1)/float(2 ** s[0] - 1) + for s in rescale] + + # Assume all target_bitdepths are the same + target_bitdepths = set(s[1] for s in rescale) + assert len(target_bitdepths) == 1 + (target_bitdepth, ) = target_bitdepths + typecode = 'BH'[target_bitdepth > 8] + + # Number of channels + n_chans = len(rescale) + + for row in rows: + rescaled_row = array(typecode, iter(row)) + for i in range(n_chans): + channel = array( + typecode, + (int(round(fs[i] * x)) for x in row[i::n_chans])) + rescaled_row[i::n_chans] = channel + yield rescaled_row + + +def pack_rows(rows, bitdepth): + """Yield packed rows that are a byte array. + Each byte is packed with the values from several pixels. + """ + + assert bitdepth < 8 + assert 8 % bitdepth == 0 + + # samples per byte + spb = int(8 / bitdepth) + + def make_byte(block): + """Take a block of (2, 4, or 8) values, + and pack them into a single byte. + """ + + res = 0 + for v in block: + res = (res << bitdepth) + v + return res + + for row in rows: + a = bytearray(row) + # Adding padding bytes so we can group into a whole + # number of spb-tuples. + n = float(len(a)) + extra = math.ceil(n / spb) * spb - n + a.extend([0] * int(extra)) + # Pack into bytes. + # Each block is the samples for one byte. + blocks = group(a, spb) + yield bytearray(make_byte(block) for block in blocks) + + +def unpack_rows(rows): + """Unpack each row from being 16-bits per value, + to being a sequence of bytes. + """ + for row in rows: + fmt = '!%dH' % len(row) + yield bytearray(struct.pack(fmt, *row)) + + +def make_palette_chunks(palette): + """ + Create the byte sequences for a ``PLTE`` and + if necessary a ``tRNS`` chunk. + Returned as a pair (*p*, *t*). + *t* will be ``None`` if no ``tRNS`` chunk is necessary. + """ + + p = bytearray() + t = bytearray() + + for x in palette: + p.extend(x[0:3]) + if len(x) > 3: + t.append(x[3]) + if t: + return p, t + return p, None + + +def check_bitdepth_rescale( + palette, bitdepth, transparent, alpha, greyscale): + """ + Returns (bitdepth, rescale) pair. + """ + + if palette: + if len(bitdepth) != 1: + raise ProtocolError( + "with palette, only a single bitdepth may be used") + (bitdepth, ) = bitdepth + if bitdepth not in (1, 2, 4, 8): + raise ProtocolError( + "with palette, bitdepth must be 1, 2, 4, or 8") + if transparent is not None: + raise ProtocolError("transparent and palette not compatible") + if alpha: + raise ProtocolError("alpha and palette not compatible") + if greyscale: + raise ProtocolError("greyscale and palette not compatible") + return bitdepth, None + + # No palette, check for sBIT chunk generation. + + if greyscale and not alpha: + # Single channel, L. + (bitdepth,) = bitdepth + if bitdepth in (1, 2, 4, 8, 16): + return bitdepth, None + if bitdepth > 8: + targetbitdepth = 16 + elif bitdepth == 3: + targetbitdepth = 4 + else: + assert bitdepth in (5, 6, 7) + targetbitdepth = 8 + return targetbitdepth, [(bitdepth, targetbitdepth)] + + assert alpha or not greyscale + + depth_set = tuple(set(bitdepth)) + if depth_set in [(8,), (16,)]: + # No sBIT required. + (bitdepth, ) = depth_set + return bitdepth, None + + targetbitdepth = (8, 16)[max(bitdepth) > 8] + return targetbitdepth, [(b, targetbitdepth) for b in bitdepth] + + +# Regex for decoding mode string +RegexModeDecode = re.compile("(LA?|RGBA?);?([0-9]*)", flags=re.IGNORECASE) + + +def from_array(a, mode=None, info={}): + """ + Create a PNG :class:`Image` object from a 2-dimensional array. + One application of this function is easy PIL-style saving: + ``png.from_array(pixels, 'L').save('foo.png')``. + + Unless they are specified using the *info* parameter, + the PNG's height and width are taken from the array size. + The first axis is the height; the second axis is the + ravelled width and channel index. + The array is treated is a sequence of rows, + each row being a sequence of values (``width*channels`` in number). + So an RGB image that is 16 pixels high and 8 wide will + occupy a 2-dimensional array that is 16x24 + (each row will be 8*3 = 24 sample values). + + *mode* is a string that specifies the image colour format in a + PIL-style mode. It can be: + + ``'L'`` + greyscale (1 channel) + ``'LA'`` + greyscale with alpha (2 channel) + ``'RGB'`` + colour image (3 channel) + ``'RGBA'`` + colour image with alpha (4 channel) + + The mode string can also specify the bit depth + (overriding how this function normally derives the bit depth, + see below). + Appending ``';16'`` to the mode will cause the PNG to be + 16 bits per channel; + any decimal from 1 to 16 can be used to specify the bit depth. + + When a 2-dimensional array is used *mode* determines how many + channels the image has, and so allows the width to be derived from + the second array dimension. + + The array is expected to be a ``numpy`` array, + but it can be any suitable Python sequence. + For example, a list of lists can be used: + ``png.from_array([[0, 255, 0], [255, 0, 255]], 'L')``. + The exact rules are: ``len(a)`` gives the first dimension, height; + ``len(a[0])`` gives the second dimension. + It's slightly more complicated than that because + an iterator of rows can be used, and it all still works. + Using an iterator allows data to be streamed efficiently. + + The bit depth of the PNG is normally taken from + the array element's datatype + (but if *mode* specifies a bitdepth then that is used instead). + The array element's datatype is determined in a way which + is supposed to work both for ``numpy`` arrays and for Python + ``array.array`` objects. + A 1 byte datatype will give a bit depth of 8, + a 2 byte datatype will give a bit depth of 16. + If the datatype does not have an implicit size, + like the above example where it is a plain Python list of lists, + then a default of 8 is used. + + The *info* parameter is a dictionary that can + be used to specify metadata (in the same style as + the arguments to the :class:`png.Writer` class). + For this function the keys that are useful are: + + height + overrides the height derived from the array dimensions and + allows *a* to be an iterable. + width + overrides the width derived from the array dimensions. + bitdepth + overrides the bit depth derived from the element datatype + (but must match *mode* if that also specifies a bit depth). + + Generally anything specified in the *info* dictionary will + override any implicit choices that this function would otherwise make, + but must match any explicit ones. + For example, if the *info* dictionary has a ``greyscale`` key then + this must be true when mode is ``'L'`` or ``'LA'`` and + false when mode is ``'RGB'`` or ``'RGBA'``. + """ + + # We abuse the *info* parameter by modifying it. Take a copy here. + # (Also typechecks *info* to some extent). + info = dict(info) + + # Syntax check mode string. + match = RegexModeDecode.match(mode) + if not match: + raise Error("mode string should be 'RGB' or 'L;16' or similar.") + + mode, bitdepth = match.groups() + if bitdepth: + bitdepth = int(bitdepth) + + # Colour format. + if 'greyscale' in info: + if bool(info['greyscale']) != ('L' in mode): + raise ProtocolError("info['greyscale'] should match mode.") + info['greyscale'] = 'L' in mode + + alpha = 'A' in mode + if 'alpha' in info: + if bool(info['alpha']) != alpha: + raise ProtocolError("info['alpha'] should match mode.") + info['alpha'] = alpha + + # Get bitdepth from *mode* if possible. + if bitdepth: + if info.get("bitdepth") and bitdepth != info['bitdepth']: + raise ProtocolError( + "bitdepth (%d) should match bitdepth of info (%d)." % + (bitdepth, info['bitdepth'])) + info['bitdepth'] = bitdepth + + # Fill in and/or check entries in *info*. + # Dimensions. + width, height = check_sizes( + info.get("size"), + info.get("width"), + info.get("height")) + if width: + info["width"] = width + if height: + info["height"] = height + + if "height" not in info: + try: + info['height'] = len(a) + except TypeError: + raise ProtocolError( + "len(a) does not work, supply info['height'] instead.") + + planes = len(mode) + if 'planes' in info: + if info['planes'] != planes: + raise Error("info['planes'] should match mode.") + + # In order to work out whether we the array is 2D or 3D we need its + # first row, which requires that we take a copy of its iterator. + # We may also need the first row to derive width and bitdepth. + a, t = itertools.tee(a) + row = next(t) + del t + + testelement = row + if 'width' not in info: + width = len(row) // planes + info['width'] = width + + if 'bitdepth' not in info: + try: + dtype = testelement.dtype + # goto the "else:" clause. Sorry. + except AttributeError: + try: + # Try a Python array.array. + bitdepth = 8 * testelement.itemsize + except AttributeError: + # We can't determine it from the array element's datatype, + # use a default of 8. + bitdepth = 8 + else: + # If we got here without exception, + # we now assume that the array is a numpy array. + if dtype.kind == 'b': + bitdepth = 1 + else: + bitdepth = 8 * dtype.itemsize + info['bitdepth'] = bitdepth + + for thing in ["width", "height", "bitdepth", "greyscale", "alpha"]: + assert thing in info + + return Image(a, info) + + +# So that refugee's from PIL feel more at home. Not documented. +fromarray = from_array + + +class Image: + """A PNG image. You can create an :class:`Image` object from + an array of pixels by calling :meth:`png.from_array`. It can be + saved to disk with the :meth:`save` method. + """ + + def __init__(self, rows, info): + """ + .. note :: + + The constructor is not public. Please do not call it. + """ + + self.rows = rows + self.info = info + + def save(self, file): + """Save the image to the named *file*. + + See `.write()` if you already have an open file object. + + In general, you can only call this method once; + after it has been called the first time the PNG image is written, + the source data will have been streamed, and + cannot be streamed again. + """ + + w = Writer(**self.info) + + with open(file, 'wb') as fd: + w.write(fd, self.rows) + + def write(self, file): + """Write the image to the open file object. + + See `.save()` if you have a filename. + + In general, you can only call this method once; + after it has been called the first time the PNG image is written, + the source data will have been streamed, and + cannot be streamed again. + """ + + w = Writer(**self.info) + w.write(file, self.rows) + + +class Reader: + """ + Pure Python PNG decoder in pure Python. + """ + + def __init__(self, _guess=None, filename=None, file=None, bytes=None): + """ + The constructor expects exactly one keyword argument. + If you supply a positional argument instead, + it will guess the input type. + Choose from the following keyword arguments: + + filename + Name of input file (a PNG file). + file + A file-like object (object with a read() method). + bytes + ``bytes`` or ``bytearray`` with PNG data. + + """ + keywords_supplied = ( + (_guess is not None) + + (filename is not None) + + (file is not None) + + (bytes is not None)) + if keywords_supplied != 1: + raise TypeError("Reader() takes exactly 1 argument") + + # Will be the first 8 bytes, later on. See validate_signature. + self.signature = None + self.transparent = None + # A pair of (len,type) if a chunk has been read but its data and + # checksum have not (in other words the file position is just + # past the 4 bytes that specify the chunk type). + # See preamble method for how this is used. + self.atchunk = None + + if _guess is not None: + if isarray(_guess): + bytes = _guess + elif isinstance(_guess, str): + filename = _guess + elif hasattr(_guess, 'read'): + file = _guess + + if bytes is not None: + self.file = io.BytesIO(bytes) + elif filename is not None: + self.file = open(filename, "rb") + elif file is not None: + self.file = file + else: + raise ProtocolError("expecting filename, file or bytes array") + + def chunk(self, lenient=False): + """ + Read the next PNG chunk from the input file; + returns a (*type*, *data*) tuple. + *type* is the chunk's type as a byte string + (all PNG chunk types are 4 bytes long). + *data* is the chunk's data content, as a byte string. + + If the optional `lenient` argument evaluates to `True`, + checksum failures will raise warnings rather than exceptions. + """ + + self.validate_signature() + + # http://www.w3.org/TR/PNG/#5Chunk-layout + if not self.atchunk: + self.atchunk = self._chunk_len_type() + if not self.atchunk: + raise ChunkError("No more chunks.") + length, type = self.atchunk + self.atchunk = None + + data = self.file.read(length) + if len(data) != length: + raise ChunkError( + 'Chunk %s too short for required %i octets.' + % (type, length)) + checksum = self.file.read(4) + if len(checksum) != 4: + raise ChunkError('Chunk %s too short for checksum.' % type) + verify = zlib.crc32(type) + verify = zlib.crc32(data, verify) + verify = struct.pack('!I', verify) + if checksum != verify: + (a, ) = struct.unpack('!I', checksum) + (b, ) = struct.unpack('!I', verify) + message = ("Checksum error in %s chunk: 0x%08X != 0x%08X." + % (type.decode('ascii'), a, b)) + if lenient: + warnings.warn(message, RuntimeWarning) + else: + raise ChunkError(message) + return type, data + + def chunks(self): + """Return an iterator that will yield each chunk as a + (*chunktype*, *content*) pair. + """ + + while True: + t, v = self.chunk() + yield t, v + if t == b'IEND': + break + + def undo_filter(self, filter_type, scanline, previous): + """ + Undo the filter for a scanline. + `scanline` is a sequence of bytes that + does not include the initial filter type byte. + `previous` is decoded previous scanline + (for straightlaced images this is the previous pixel row, + but for interlaced images, it is + the previous scanline in the reduced image, + which in general is not the previous pixel row in the final image). + When there is no previous scanline + (the first row of a straightlaced image, + or the first row in one of the passes in an interlaced image), + then this argument should be ``None``. + + The scanline will have the effects of filtering removed; + the result will be returned as a fresh sequence of bytes. + """ + + # :todo: Would it be better to update scanline in place? + result = scanline + + if filter_type == 0: + return result + + if filter_type not in (1, 2, 3, 4): + raise FormatError( + 'Invalid PNG Filter Type. ' + 'See http://www.w3.org/TR/2003/REC-PNG-20031110/#9Filters .') + + # Filter unit. The stride from one pixel to the corresponding + # byte from the previous pixel. Normally this is the pixel + # size in bytes, but when this is smaller than 1, the previous + # byte is used instead. + fu = max(1, self.psize) + + # For the first line of a pass, synthesize a dummy previous + # line. An alternative approach would be to observe that on the + # first line 'up' is the same as 'null', 'paeth' is the same + # as 'sub', with only 'average' requiring any special case. + if not previous: + previous = bytearray([0] * len(scanline)) + + # Call appropriate filter algorithm. Note that 0 has already + # been dealt with. + fn = (None, + undo_filter_sub, + undo_filter_up, + undo_filter_average, + undo_filter_paeth)[filter_type] + fn(fu, scanline, previous, result) + return result + + def _deinterlace(self, raw): + """ + Read raw pixel data, undo filters, deinterlace, and flatten. + Return a single array of values. + """ + + # Values per row (of the target image) + vpr = self.width * self.planes + + # Values per image + vpi = vpr * self.height + # Interleaving writes to the output array randomly + # (well, not quite), so the entire output array must be in memory. + # Make a result array, and make it big enough. + if self.bitdepth > 8: + a = array('H', [0] * vpi) + else: + a = bytearray([0] * vpi) + source_offset = 0 + + for lines in adam7_generate(self.width, self.height): + # The previous (reconstructed) scanline. + # `None` at the beginning of a pass + # to indicate that there is no previous line. + recon = None + for x, y, xstep in lines: + # Pixels per row (reduced pass image) + ppr = int(math.ceil((self.width - x) / float(xstep))) + # Row size in bytes for this pass. + row_size = int(math.ceil(self.psize * ppr)) + + filter_type = raw[source_offset] + source_offset += 1 + scanline = raw[source_offset: source_offset + row_size] + source_offset += row_size + recon = self.undo_filter(filter_type, scanline, recon) + # Convert so that there is one element per pixel value + flat = self._bytes_to_values(recon, width=ppr) + if xstep == 1: + assert x == 0 + offset = y * vpr + a[offset: offset + vpr] = flat + else: + offset = y * vpr + x * self.planes + end_offset = (y + 1) * vpr + skip = self.planes * xstep + for i in range(self.planes): + a[offset + i: end_offset: skip] = \ + flat[i:: self.planes] + + return a + + def _iter_bytes_to_values(self, byte_rows): + """ + Iterator that yields each scanline; + each scanline being a sequence of values. + `byte_rows` should be an iterator that yields + the bytes of each row in turn. + """ + + for row in byte_rows: + yield self._bytes_to_values(row) + + def _bytes_to_values(self, bs, width=None): + """Convert a packed row of bytes into a row of values. + Result will be a freshly allocated object, + not shared with the argument. + """ + + if self.bitdepth == 8: + return bytearray(bs) + if self.bitdepth == 16: + return array('H', + struct.unpack('!%dH' % (len(bs) // 2), bs)) + + assert self.bitdepth < 8 + if width is None: + width = self.width + # Samples per byte + spb = 8 // self.bitdepth + out = bytearray() + mask = 2**self.bitdepth - 1 + shifts = [self.bitdepth * i + for i in reversed(list(range(spb)))] + for o in bs: + out.extend([mask & (o >> i) for i in shifts]) + return out[:width] + + def _iter_straight_packed(self, byte_blocks): + """Iterator that undoes the effect of filtering; + yields each row as a sequence of packed bytes. + Assumes input is straightlaced. + `byte_blocks` should be an iterable that yields the raw bytes + in blocks of arbitrary size. + """ + + # length of row, in bytes + rb = self.row_bytes + a = bytearray() + # The previous (reconstructed) scanline. + # None indicates first line of image. + recon = None + for some_bytes in byte_blocks: + a.extend(some_bytes) + while len(a) >= rb + 1: + filter_type = a[0] + scanline = a[1: rb + 1] + del a[: rb + 1] + recon = self.undo_filter(filter_type, scanline, recon) + yield recon + if len(a) != 0: + # :file:format We get here with a file format error: + # when the available bytes (after decompressing) do not + # pack into exact rows. + raise FormatError('Wrong size for decompressed IDAT chunk.') + assert len(a) == 0 + + def validate_signature(self): + """ + If signature (header) has not been read then read and + validate it; otherwise do nothing. + No signature (empty read()) will raise EOFError; + An invalid signature will raise FormatError. + EOFError is raised to make possible the case where + a program can read multiple PNG files from the same stream. + The end of the stream can be distinguished from non-PNG files + or corrupted PNG files. + """ + + if self.signature: + return + self.signature = self.file.read(8) + if len(self.signature) == 0: + raise EOFError("End of PNG stream.") + if self.signature != signature: + raise FormatError("PNG file has invalid signature.") + + def preamble(self, lenient=False): + """ + Extract the image metadata by reading + the initial part of the PNG file up to + the start of the ``IDAT`` chunk. + All the chunks that precede the ``IDAT`` chunk are + read and either processed for metadata or discarded. + + If the optional `lenient` argument evaluates to `True`, + checksum failures will raise warnings rather than exceptions. + """ + + self.validate_signature() + + while True: + if not self.atchunk: + self.atchunk = self._chunk_len_type() + if self.atchunk is None: + raise FormatError('This PNG file has no IDAT chunks.') + if self.atchunk[1] == b'IDAT': + return + self.process_chunk(lenient=lenient) + + def _chunk_len_type(self): + """ + Reads just enough of the input to + determine the next chunk's length and type; + return a (*length*, *type*) pair where *type* is a byte sequence. + If there are no more chunks, ``None`` is returned. + """ + + x = self.file.read(8) + if not x: + return None + if len(x) != 8: + raise FormatError( + 'End of file whilst reading chunk length and type.') + length, type = struct.unpack('!I4s', x) + if length > 2 ** 31 - 1: + raise FormatError('Chunk %s is too large: %d.' % (type, length)) + # Check that all bytes are in valid ASCII range. + # https://www.w3.org/TR/2003/REC-PNG-20031110/#5Chunk-layout + type_bytes = set(bytearray(type)) + if not(type_bytes <= set(range(65, 91)) | set(range(97, 123))): + raise FormatError( + 'Chunk %r has invalid Chunk Type.' + % list(type)) + return length, type + + def process_chunk(self, lenient=False): + """ + Process the next chunk and its data. + This only processes the following chunk types: + ``IHDR``, ``PLTE``, ``bKGD``, ``tRNS``, ``gAMA``, ``sBIT``, ``pHYs``. + All other chunk types are ignored. + + If the optional `lenient` argument evaluates to `True`, + checksum failures will raise warnings rather than exceptions. + """ + + type, data = self.chunk(lenient=lenient) + method = '_process_' + type.decode('ascii') + m = getattr(self, method, None) + if m: + m(data) + + def _process_IHDR(self, data): + # http://www.w3.org/TR/PNG/#11IHDR + if len(data) != 13: + raise FormatError('IHDR chunk has incorrect length.') + (self.width, self.height, self.bitdepth, self.color_type, + self.compression, self.filter, + self.interlace) = struct.unpack("!2I5B", data) + + check_bitdepth_colortype(self.bitdepth, self.color_type) + + if self.compression != 0: + raise FormatError( + "Unknown compression method %d" % self.compression) + if self.filter != 0: + raise FormatError( + "Unknown filter method %d," + " see http://www.w3.org/TR/2003/REC-PNG-20031110/#9Filters ." + % self.filter) + if self.interlace not in (0, 1): + raise FormatError( + "Unknown interlace method %d, see " + "http://www.w3.org/TR/2003/REC-PNG-20031110/#8InterlaceMethods" + " ." + % self.interlace) + + # Derived values + # http://www.w3.org/TR/PNG/#6Colour-values + colormap = bool(self.color_type & 1) + greyscale = not(self.color_type & 2) + alpha = bool(self.color_type & 4) + color_planes = (3, 1)[greyscale or colormap] + planes = color_planes + alpha + + self.colormap = colormap + self.greyscale = greyscale + self.alpha = alpha + self.color_planes = color_planes + self.planes = planes + self.psize = float(self.bitdepth) / float(8) * planes + if int(self.psize) == self.psize: + self.psize = int(self.psize) + self.row_bytes = int(math.ceil(self.width * self.psize)) + # Stores PLTE chunk if present, and is used to check + # chunk ordering constraints. + self.plte = None + # Stores tRNS chunk if present, and is used to check chunk + # ordering constraints. + self.trns = None + # Stores sBIT chunk if present. + self.sbit = None + + def _process_PLTE(self, data): + # http://www.w3.org/TR/PNG/#11PLTE + if self.plte: + warnings.warn("Multiple PLTE chunks present.") + self.plte = data + if len(data) % 3 != 0: + raise FormatError( + "PLTE chunk's length should be a multiple of 3.") + if len(data) > (2 ** self.bitdepth) * 3: + raise FormatError("PLTE chunk is too long.") + if len(data) == 0: + raise FormatError("Empty PLTE is not allowed.") + + def _process_bKGD(self, data): + try: + if self.colormap: + if not self.plte: + warnings.warn( + "PLTE chunk is required before bKGD chunk.") + self.background = struct.unpack('B', data) + else: + self.background = struct.unpack("!%dH" % self.color_planes, + data) + except struct.error: + raise FormatError("bKGD chunk has incorrect length.") + + def _process_tRNS(self, data): + # http://www.w3.org/TR/PNG/#11tRNS + self.trns = data + if self.colormap: + if not self.plte: + warnings.warn("PLTE chunk is required before tRNS chunk.") + else: + if len(data) > len(self.plte) / 3: + # Was warning, but promoted to Error as it + # would otherwise cause pain later on. + raise FormatError("tRNS chunk is too long.") + else: + if self.alpha: + raise FormatError( + "tRNS chunk is not valid with colour type %d." % + self.color_type) + try: + self.transparent = \ + struct.unpack("!%dH" % self.color_planes, data) + except struct.error: + raise FormatError("tRNS chunk has incorrect length.") + + def _process_gAMA(self, data): + try: + self.gamma = struct.unpack("!L", data)[0] / 100000.0 + except struct.error: + raise FormatError("gAMA chunk has incorrect length.") + + def _process_sBIT(self, data): + self.sbit = data + if (self.colormap and len(data) != 3 or + not self.colormap and len(data) != self.planes): + raise FormatError("sBIT chunk has incorrect length.") + + def _process_pHYs(self, data): + # http://www.w3.org/TR/PNG/#11pHYs + self.phys = data + fmt = "!LLB" + if len(data) != struct.calcsize(fmt): + raise FormatError("pHYs chunk has incorrect length.") + self.x_pixels_per_unit, self.y_pixels_per_unit, unit = \ + struct.unpack(fmt, data) + self.unit_is_meter = bool(unit) + + def read(self, lenient=False): + """ + Read the PNG file and decode it. + Returns (`width`, `height`, `rows`, `info`). + + May use excessive memory. + + `rows` is a sequence of rows; + each row is a sequence of values. + + If the optional `lenient` argument evaluates to True, + checksum failures will raise warnings rather than exceptions. + """ + + def iteridat(): + """Iterator that yields all the ``IDAT`` chunks as strings.""" + while True: + type, data = self.chunk(lenient=lenient) + if type == b'IEND': + # http://www.w3.org/TR/PNG/#11IEND + break + if type != b'IDAT': + continue + # type == b'IDAT' + # http://www.w3.org/TR/PNG/#11IDAT + if self.colormap and not self.plte: + warnings.warn("PLTE chunk is required before IDAT chunk") + yield data + + self.preamble(lenient=lenient) + raw = decompress(iteridat()) + + if self.interlace: + def rows_from_interlace(): + """Yield each row from an interlaced PNG.""" + # It's important that this iterator doesn't read + # IDAT chunks until it yields the first row. + bs = bytearray(itertools.chain(*raw)) + arraycode = 'BH'[self.bitdepth > 8] + # Like :meth:`group` but + # producing an array.array object for each row. + values = self._deinterlace(bs) + vpr = self.width * self.planes + for i in range(0, len(values), vpr): + row = array(arraycode, values[i:i+vpr]) + yield row + rows = rows_from_interlace() + else: + rows = self._iter_bytes_to_values(self._iter_straight_packed(raw)) + info = dict() + for attr in 'greyscale alpha planes bitdepth interlace'.split(): + info[attr] = getattr(self, attr) + info['size'] = (self.width, self.height) + for attr in 'gamma transparent background'.split(): + a = getattr(self, attr, None) + if a is not None: + info[attr] = a + if getattr(self, 'x_pixels_per_unit', None): + info['physical'] = Resolution(self.x_pixels_per_unit, + self.y_pixels_per_unit, + self.unit_is_meter) + if self.plte: + info['palette'] = self.palette() + return self.width, self.height, rows, info + + def read_flat(self): + """ + Read a PNG file and decode it into a single array of values. + Returns (*width*, *height*, *values*, *info*). + + May use excessive memory. + + `values` is a single array. + + The :meth:`read` method is more stream-friendly than this, + because it returns a sequence of rows. + """ + + x, y, pixel, info = self.read() + arraycode = 'BH'[info['bitdepth'] > 8] + pixel = array(arraycode, itertools.chain(*pixel)) + return x, y, pixel, info + + def palette(self, alpha='natural'): + """ + Returns a palette that is a sequence of 3-tuples or 4-tuples, + synthesizing it from the ``PLTE`` and ``tRNS`` chunks. + These chunks should have already been processed (for example, + by calling the :meth:`preamble` method). + All the tuples are the same size: + 3-tuples if there is no ``tRNS`` chunk, + 4-tuples when there is a ``tRNS`` chunk. + + Assumes that the image is colour type + 3 and therefore a ``PLTE`` chunk is required. + + If the `alpha` argument is ``'force'`` then an alpha channel is + always added, forcing the result to be a sequence of 4-tuples. + """ + + if not self.plte: + raise FormatError( + "Required PLTE chunk is missing in colour type 3 image.") + plte = group(array('B', self.plte), 3) + if self.trns or alpha == 'force': + trns = array('B', self.trns or []) + trns.extend([255] * (len(plte) - len(trns))) + plte = list(map(operator.add, plte, group(trns, 1))) + return plte + + def asDirect(self): + """ + Returns the image data as a direct representation of + an ``x * y * planes`` array. + This removes the need for callers to deal with + palettes and transparency themselves. + Images with a palette (colour type 3) are converted to RGB or RGBA; + images with transparency (a ``tRNS`` chunk) are converted to + LA or RGBA as appropriate. + When returned in this format the pixel values represent + the colour value directly without needing to refer + to palettes or transparency information. + + Like the :meth:`read` method this method returns a 4-tuple: + + (*width*, *height*, *rows*, *info*) + + This method normally returns pixel values with + the bit depth they have in the source image, but + when the source PNG has an ``sBIT`` chunk it is inspected and + can reduce the bit depth of the result pixels; + pixel values will be reduced according to the bit depth + specified in the ``sBIT`` chunk. + PNG nerds should note a single result bit depth is + used for all channels: + the maximum of the ones specified in the ``sBIT`` chunk. + An RGB565 image will be rescaled to 6-bit RGB666. + + The *info* dictionary that is returned reflects + the `direct` format and not the original source image. + For example, an RGB source image with a ``tRNS`` chunk + to represent a transparent colour, + will start with ``planes=3`` and ``alpha=False`` for the + source image, + but the *info* dictionary returned by this method + will have ``planes=4`` and ``alpha=True`` because + an alpha channel is synthesized and added. + + *rows* is a sequence of rows; + each row being a sequence of values + (like the :meth:`read` method). + + All the other aspects of the image data are not changed. + """ + + self.preamble() + + # Simple case, no conversion necessary. + if not self.colormap and not self.trns and not self.sbit: + return self.read() + + x, y, pixels, info = self.read() + + if self.colormap: + info['colormap'] = False + info['alpha'] = bool(self.trns) + info['bitdepth'] = 8 + info['planes'] = 3 + bool(self.trns) + plte = self.palette() + + def iterpal(pixels): + for row in pixels: + row = [plte[x] for x in row] + yield array('B', itertools.chain(*row)) + pixels = iterpal(pixels) + elif self.trns: + # It would be nice if there was some reasonable way + # of doing this without generating a whole load of + # intermediate tuples. But tuples does seem like the + # easiest way, with no other way clearly much simpler or + # much faster. (Actually, the L to LA conversion could + # perhaps go faster (all those 1-tuples!), but I still + # wonder whether the code proliferation is worth it) + it = self.transparent + maxval = 2 ** info['bitdepth'] - 1 + planes = info['planes'] + info['alpha'] = True + info['planes'] += 1 + typecode = 'BH'[info['bitdepth'] > 8] + + def itertrns(pixels): + for row in pixels: + # For each row we group it into pixels, then form a + # characterisation vector that says whether each + # pixel is opaque or not. Then we convert + # True/False to 0/maxval (by multiplication), + # and add it as the extra channel. + row = group(row, planes) + opa = map(it.__ne__, row) + opa = map(maxval.__mul__, opa) + opa = list(zip(opa)) # convert to 1-tuples + yield array( + typecode, + itertools.chain(*map(operator.add, row, opa))) + pixels = itertrns(pixels) + targetbitdepth = None + if self.sbit: + sbit = struct.unpack('%dB' % len(self.sbit), self.sbit) + targetbitdepth = max(sbit) + if targetbitdepth > info['bitdepth']: + raise Error('sBIT chunk %r exceeds bitdepth %d' % + (sbit, self.bitdepth)) + if min(sbit) <= 0: + raise Error('sBIT chunk %r has a 0-entry' % sbit) + if targetbitdepth: + shift = info['bitdepth'] - targetbitdepth + info['bitdepth'] = targetbitdepth + + def itershift(pixels): + for row in pixels: + yield [p >> shift for p in row] + pixels = itershift(pixels) + return x, y, pixels, info + + def _as_rescale(self, get, targetbitdepth): + """Helper used by :meth:`asRGB8` and :meth:`asRGBA8`.""" + + width, height, pixels, info = get() + maxval = 2**info['bitdepth'] - 1 + targetmaxval = 2**targetbitdepth - 1 + factor = float(targetmaxval) / float(maxval) + info['bitdepth'] = targetbitdepth + + def iterscale(): + for row in pixels: + yield [int(round(x * factor)) for x in row] + if maxval == targetmaxval: + return width, height, pixels, info + else: + return width, height, iterscale(), info + + def asRGB8(self): + """ + Return the image data as an RGB pixels with 8-bits per sample. + This is like the :meth:`asRGB` method except that + this method additionally rescales the values so that + they are all between 0 and 255 (8-bit). + In the case where the source image has a bit depth < 8 + the transformation preserves all the information; + where the source image has bit depth > 8, then + rescaling to 8-bit values loses precision. + No dithering is performed. + Like :meth:`asRGB`, + an alpha channel in the source image will raise an exception. + + This function returns a 4-tuple: + (*width*, *height*, *rows*, *info*). + *width*, *height*, *info* are as per the :meth:`read` method. + + *rows* is the pixel data as a sequence of rows. + """ + + return self._as_rescale(self.asRGB, 8) + + def asRGBA8(self): + """ + Return the image data as RGBA pixels with 8-bits per sample. + This method is similar to :meth:`asRGB8` and :meth:`asRGBA`: + The result pixels have an alpha channel, *and* + values are rescaled to the range 0 to 255. + The alpha channel is synthesized if necessary + (with a small speed penalty). + """ + + return self._as_rescale(self.asRGBA, 8) + + def asRGB(self): + """ + Return image as RGB pixels. + RGB colour images are passed through unchanged; + greyscales are expanded into RGB triplets + (there is a small speed overhead for doing this). + + An alpha channel in the source image will raise an exception. + + The return values are as for the :meth:`read` method except that + the *info* reflect the returned pixels, not the source image. + In particular, + for this method ``info['greyscale']`` will be ``False``. + """ + + width, height, pixels, info = self.asDirect() + if info['alpha']: + raise Error("will not convert image with alpha channel to RGB") + if not info['greyscale']: + return width, height, pixels, info + info['greyscale'] = False + info['planes'] = 3 + + if info['bitdepth'] > 8: + def newarray(): + return array('H', [0]) + else: + def newarray(): + return bytearray([0]) + + def iterrgb(): + for row in pixels: + a = newarray() * 3 * width + for i in range(3): + a[i::3] = row + yield a + return width, height, iterrgb(), info + + def asRGBA(self): + """ + Return image as RGBA pixels. + Greyscales are expanded into RGB triplets; + an alpha channel is synthesized if necessary. + The return values are as for the :meth:`read` method except that + the *info* reflect the returned pixels, not the source image. + In particular, for this method + ``info['greyscale']`` will be ``False``, and + ``info['alpha']`` will be ``True``. + """ + + width, height, pixels, info = self.asDirect() + if info['alpha'] and not info['greyscale']: + return width, height, pixels, info + typecode = 'BH'[info['bitdepth'] > 8] + maxval = 2**info['bitdepth'] - 1 + maxbuffer = struct.pack('=' + typecode, maxval) * 4 * width + + if info['bitdepth'] > 8: + def newarray(): + return array('H', maxbuffer) + else: + def newarray(): + return bytearray(maxbuffer) + + if info['alpha'] and info['greyscale']: + # LA to RGBA + def convert(): + for row in pixels: + # Create a fresh target row, then copy L channel + # into first three target channels, and A channel + # into fourth channel. + a = newarray() + convert_la_to_rgba(row, a) + yield a + elif info['greyscale']: + # L to RGBA + def convert(): + for row in pixels: + a = newarray() + convert_l_to_rgba(row, a) + yield a + else: + assert not info['alpha'] and not info['greyscale'] + # RGB to RGBA + + def convert(): + for row in pixels: + a = newarray() + convert_rgb_to_rgba(row, a) + yield a + info['alpha'] = True + info['greyscale'] = False + info['planes'] = 4 + return width, height, convert(), info + + +def decompress(data_blocks): + """ + `data_blocks` should be an iterable that + yields the compressed data (from the ``IDAT`` chunks). + This yields decompressed byte strings. + """ + + # Currently, with no max_length parameter to decompress, + # this routine will do one yield per IDAT chunk: Not very + # incremental. + d = zlib.decompressobj() + # Each IDAT chunk is passed to the decompressor, then any + # remaining state is decompressed out. + for data in data_blocks: + # :todo: add a max_length argument here to limit output size. + yield bytearray(d.decompress(data)) + yield bytearray(d.flush()) + + +def check_bitdepth_colortype(bitdepth, colortype): + """ + Check that `bitdepth` and `colortype` are both valid, + and specified in a valid combination. + Returns (None) if valid, raise an Exception if not valid. + """ + + if bitdepth not in (1, 2, 4, 8, 16): + raise FormatError("invalid bit depth %d" % bitdepth) + if colortype not in (0, 2, 3, 4, 6): + raise FormatError("invalid colour type %d" % colortype) + # Check indexed (palettized) images have 8 or fewer bits + # per pixel; check only indexed or greyscale images have + # fewer than 8 bits per pixel. + if colortype & 1 and bitdepth > 8: + raise FormatError( + "Indexed images (colour type %d) cannot" + " have bitdepth > 8 (bit depth %d)." + " See http://www.w3.org/TR/2003/REC-PNG-20031110/#table111 ." + % (bitdepth, colortype)) + if bitdepth < 8 and colortype not in (0, 3): + raise FormatError( + "Illegal combination of bit depth (%d)" + " and colour type (%d)." + " See http://www.w3.org/TR/2003/REC-PNG-20031110/#table111 ." + % (bitdepth, colortype)) + + +def is_natural(x): + """A non-negative integer.""" + try: + is_integer = int(x) == x + except (TypeError, ValueError): + return False + return is_integer and x >= 0 + + +def undo_filter_sub(filter_unit, scanline, previous, result): + """Undo sub filter.""" + + ai = 0 + # Loops starts at index fu. Observe that the initial part + # of the result is already filled in correctly with + # scanline. + for i in range(filter_unit, len(result)): + x = scanline[i] + a = result[ai] + result[i] = (x + a) & 0xff + ai += 1 + + +def undo_filter_up(filter_unit, scanline, previous, result): + """Undo up filter.""" + + for i in range(len(result)): + x = scanline[i] + b = previous[i] + result[i] = (x + b) & 0xff + + +def undo_filter_average(filter_unit, scanline, previous, result): + """Undo up filter.""" + + ai = -filter_unit + for i in range(len(result)): + x = scanline[i] + if ai < 0: + a = 0 + else: + a = result[ai] + b = previous[i] + result[i] = (x + ((a + b) >> 1)) & 0xff + ai += 1 + + +def undo_filter_paeth(filter_unit, scanline, previous, result): + """Undo Paeth filter.""" + + # Also used for ci. + ai = -filter_unit + for i in range(len(result)): + x = scanline[i] + if ai < 0: + a = c = 0 + else: + a = result[ai] + c = previous[ai] + b = previous[i] + p = a + b - c + pa = abs(p - a) + pb = abs(p - b) + pc = abs(p - c) + if pa <= pb and pa <= pc: + pr = a + elif pb <= pc: + pr = b + else: + pr = c + result[i] = (x + pr) & 0xff + ai += 1 + + +def convert_la_to_rgba(row, result): + for i in range(3): + result[i::4] = row[0::2] + result[3::4] = row[1::2] + + +def convert_l_to_rgba(row, result): + """ + Convert a grayscale image to RGBA. + This method assumes the alpha channel in result is + already correctly initialized. + """ + for i in range(3): + result[i::4] = row + + +def convert_rgb_to_rgba(row, result): + """ + Convert an RGB image to RGBA. + This method assumes the alpha channel in result is + already correctly initialized. + """ + for i in range(3): + result[i::4] = row[i::3] + + +# Only reason to include this in this module is that +# several utilities need it, and it is small. +def binary_stdin(): + """ + A sys.stdin that returns bytes. + """ + + return sys.stdin.buffer + + +def binary_stdout(): + """ + A sys.stdout that accepts bytes. + """ + + stdout = sys.stdout.buffer + + # On Windows the C runtime file orientation needs changing. + if sys.platform == "win32": + import msvcrt + import os + msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) + + return stdout + + +def cli_open(path): + if path == "-": + return binary_stdin() + return open(path, "rb") + + +def main(argv): + """ + Run command line PNG. + Which reports version. + """ + print(__version__, __file__) + + +if __name__ == '__main__': + try: + main(sys.argv) + except Error as e: + print(e, file=sys.stderr) diff --git a/tools/png_dimensions.c b/tools/png_dimensions.c new file mode 100644 index 0000000..261582c --- /dev/null +++ b/tools/png_dimensions.c @@ -0,0 +1,23 @@ +#define PROGRAM_NAME "png_dimensions" +#define USAGE_OPTS "front.png front.dimensions" + +#include "common.h" + +uint8_t read_png_dimensions(const char *filename) { + uint32_t width_px = read_png_width(filename); + if (width_px != 40 && width_px != 48 && width_px != 56) { + error_exit("Not a valid width for \"%s\": %" PRIu32 " px\n", filename, width_px); + } + uint8_t width_tiles = (uint8_t)(width_px / 8); + return (width_tiles << 4) | width_tiles; +} + +int main(int argc, char *argv[]) { + if (argc < 3) { + usage_exit(1); + } + + uint8_t output_byte = read_png_dimensions(argv[1]); + write_u8(argv[2], &output_byte, 1); + return 0; +} diff --git a/tools/pokemon_animation.c b/tools/pokemon_animation.c new file mode 100644 index 0000000..2c8ad64 --- /dev/null +++ b/tools/pokemon_animation.c @@ -0,0 +1,195 @@ +#define PROGRAM_NAME "pokemon_animation" +#define USAGE_OPTS "[-h|--help] [-b|--bitmasks] [-f|--frames] front.animated.tilemap front.dimensions" + +#include "common.h" + +struct Options { + bool use_bitmasks; + bool use_frames; +}; + +void parse_args(int argc, char *argv[], struct Options *options) { + struct option long_options[] = { + {"bitmasks", no_argument, 0, 'b'}, + {"frames", no_argument, 0, 'f'}, + {"help", no_argument, 0, 'h'}, + {0} + }; + for (int opt; (opt = getopt_long(argc, argv, "bfh", long_options)) != -1;) { + switch (opt) { + case 'b': + options->use_bitmasks = true; + break; + case 'f': + options->use_frames = true; + break; + case 'h': + usage_exit(0); + break; + default: + usage_exit(1); + } + } +} + +struct Frame { + uint8_t *data; + int size; + int bitmask; +}; + +struct Frames { + struct Frame *frames; + int num_frames; +}; + +struct Bitmask { + uint8_t *data; + int bitlength; +}; + +struct Bitmasks { + struct Bitmask *bitmasks; + int num_bitmasks; +}; + +int bitmask_exists(const struct Bitmask *bitmask, const struct Bitmasks *bitmasks) { + for (int i = 0; i < bitmasks->num_bitmasks; i++) { + struct Bitmask existing = bitmasks->bitmasks[i]; + if (bitmask->bitlength != existing.bitlength) { + continue; + } + bool match = true; + int length = (bitmask->bitlength + 7) / 8; + for (int j = 0; j < length; j++) { + if (bitmask->data[j] != existing.data[j]) { + match = false; + break; + } + } + if (match) { + return i; + } + } + return -1; +} + +void make_frames(const uint8_t *tilemap, long tilemap_size, int width, struct Frames *frames, struct Bitmasks *bitmasks) { + int num_tiles_per_frame = width * width; + int num_frames = tilemap_size / num_tiles_per_frame - 1; + + frames->frames = xmalloc((sizeof *frames->frames) * num_frames); + frames->num_frames = num_frames; + + bitmasks->bitmasks = xmalloc((sizeof *bitmasks->bitmasks) * num_frames); + bitmasks->num_bitmasks = 0; + + const uint8_t *first_frame = &tilemap[0]; + const uint8_t *this_frame = &tilemap[num_tiles_per_frame]; + for (int i = 0; i < num_frames; i++) { + struct Frame *frame = xmalloc(sizeof *frame); + frame->data = xmalloc(num_tiles_per_frame); + frame->size = 0; + + struct Bitmask *bitmask = xmalloc(sizeof *bitmask); + bitmask->data = xcalloc((num_tiles_per_frame + 7) / 8); + bitmask->bitlength = 0; + + for (int j = 0; j < num_tiles_per_frame; j++) { + if (bitmask->bitlength % 8 == 0) { + bitmask->data[bitmask->bitlength / 8] = 0; + } + bitmask->data[bitmask->bitlength / 8] >>= 1; + if (this_frame[j] != first_frame[j]) { + frame->data[frame->size] = this_frame[j]; + frame->size++; + bitmask->data[bitmask->bitlength / 8] |= (1 << 7); + } + bitmask->bitlength++; + } + // tile order ABCDEFGHIJKLMNOP... becomes db order %HGFEDCBA %PONMLKJI ... + int last = bitmask->bitlength - 1; + bitmask->data[last / 8] >>= (7 - (last % 8)); + + frame->bitmask = bitmask_exists(bitmask, bitmasks); + if (frame->bitmask == -1) { + frame->bitmask = bitmasks->num_bitmasks; + bitmasks->bitmasks[bitmasks->num_bitmasks] = *bitmask; + bitmasks->num_bitmasks++; + } else { + free(bitmask->data); + free(bitmask); + } + frames->frames[i] = *frame; + this_frame += num_tiles_per_frame; + } +} + +void print_frames(struct Frames *frames) { + for (int i = 0; i < frames->num_frames; i++) { + printf("\tdw .frame%d\n", i + 1); + } + for (int i = 0; i < frames->num_frames; i++) { + const struct Frame *frame = &frames->frames[i]; + printf(".frame%d\n", i + 1); + printf("\tdb $%02x ; bitmask\n", frame->bitmask); + if (frame->size > 0) { + for (int j = 0; j < frame->size; j++) { + if (j % 12 == 0) { + if (j) { + putchar('\n'); + } + printf("\tdb $%02x", frame->data[j]); + } else { + printf(", $%02x", frame->data[j]); + } + } + putchar('\n'); + } + } +} + +void print_bitmasks(const struct Bitmasks *bitmasks) { + for (int i = 0; i < bitmasks->num_bitmasks; i++) { + struct Bitmask bitmask = bitmasks->bitmasks[i]; + printf("; %d\n", i); + int length = (bitmask.bitlength + 7) / 8; + for (int j = 0; j < length; j++) { + printf("\tdb %%"); + for (int k = 0; k < 8; k++) { + putchar(((bitmask.data[j] >> (7 - k)) & 1) ? '1' : '0'); + } + putchar('\n'); + } + } +} + +int main(int argc, char *argv[]) { + struct Options options = {0}; + parse_args(argc, argv, &options); + + argc -= optind; + argv += optind; + if (argc < 2) { + usage_exit(1); + } + + int width; + read_dimensions(argv[1], &width); + long tilemap_size; + uint8_t *tilemap = read_u8(argv[0], &tilemap_size); + + struct Frames frames = {0}; + struct Bitmasks bitmasks = {0}; + make_frames(tilemap, tilemap_size, width, &frames, &bitmasks); + + if (options.use_frames) { + print_frames(&frames); + } + if (options.use_bitmasks) { + print_bitmasks(&bitmasks); + } + + free(tilemap); + return 0; +} diff --git a/tools/pokemon_animation_graphics.c b/tools/pokemon_animation_graphics.c new file mode 100644 index 0000000..32078d4 --- /dev/null +++ b/tools/pokemon_animation_graphics.c @@ -0,0 +1,171 @@ +#define PROGRAM_NAME "pokemon_animation_graphics" +#define USAGE_OPTS "[-h|--help] [-o|--output front.animated.2bpp] [-t|--tilemap front.animated.tilemap] [--girafarig] front.2bpp front.dimensions" + +#include "common.h" + +struct Options { + const char *out_filename; + const char *map_filename; + bool girafarig; +}; + +void parse_args(int argc, char *argv[], struct Options *options) { + struct option long_options[] = { + {"output", required_argument, 0, 'o'}, + {"tilemap", required_argument, 0, 't'}, + {"girafarig", no_argument, 0, 'g'}, + {"help", no_argument, 0, 'h'}, + {0} + }; + for (int opt; (opt = getopt_long(argc, argv, "o:t:h", long_options)) != -1;) { + switch (opt) { + case 'o': + options->out_filename = optarg; + break; + case 't': + options->map_filename = optarg; + break; + case 'g': + options->girafarig = true; + break; + case 'h': + usage_exit(0); + break; + default: + usage_exit(1); + } + } +} + +#define TILE_SIZE 16 + +void transpose_tiles(uint8_t *tiles, int width, int size) { + uint8_t *new_tiles = xmalloc(size); + for (int i = 0; i < size; i++) { + int j = i / TILE_SIZE * width * TILE_SIZE; + j = (j / size) * TILE_SIZE + j % size + i % TILE_SIZE; + new_tiles[j] = tiles[i]; + } + memcpy(tiles, new_tiles, size); + free(new_tiles); +} + +int get_tile_index(const uint8_t *tile, const uint8_t *tiles, int num_tiles, int preferred_tile_id) { + if (preferred_tile_id >= 0 && preferred_tile_id < num_tiles) { + if (!memcmp(tile, &tiles[preferred_tile_id * TILE_SIZE], TILE_SIZE)) { + return preferred_tile_id; + } + } + for (int i = 0; i < num_tiles; i++) { + if (!memcmp(tile, &tiles[i * TILE_SIZE], TILE_SIZE)) { + return i; + } + } + return -1; +} + +uint8_t *read_tiles(const char *filename, int width, long *tiles_size) { + int frame_size = width * width * TILE_SIZE; + + uint8_t *tiles = read_u8(filename, tiles_size); + if (!*tiles_size) { + error_exit("%s: empty file\n", filename); + } else if (*tiles_size % TILE_SIZE) { + error_exit("%s: not divisible into 8x8-px 2bpp tiles\n", filename); + } else if (*tiles_size % frame_size) { + error_exit("%s: not divisible into %dx%d-tile frames\n", filename, width, width); + } + + int num_frames = *tiles_size / frame_size; + for (int i = 0; i < num_frames; i++) { + transpose_tiles(&tiles[i * frame_size], width, frame_size); + } + + return tiles; +} + +void write_graphics(const char *filename, const uint8_t *tiles, long tiles_size, int num_tiles_per_frame, bool girafarig) { + int max_size = tiles_size; + int max_num_tiles = max_size / TILE_SIZE; + if (girafarig) { + // Ensure space for a duplicate of tile 0 at the end + max_size += TILE_SIZE; + } + uint8_t *data = xmalloc(max_size); + + int num_tiles = 0; +#define DATA_APPEND_TILES(tile, length) do { \ + memcpy(&data[num_tiles * TILE_SIZE], &tiles[(tile) * TILE_SIZE], (length) * TILE_SIZE); \ + num_tiles += (length); \ +} while (0) + // Copy the first frame directly + DATA_APPEND_TILES(0, num_tiles_per_frame); + // Skip redundant tiles in the animated frames + for (int i = num_tiles_per_frame; i < max_num_tiles; i++) { + int index = get_tile_index(&tiles[i * TILE_SIZE], data, num_tiles, i % num_tiles_per_frame); + if (index == -1) { + DATA_APPEND_TILES(i, 1); + } + } + if (girafarig) { + // Add a duplicate of tile 0 to the end + DATA_APPEND_TILES(0, 1); + } +#undef DATA_APPEND_TILES + + write_u8(filename, data, num_tiles * TILE_SIZE); + free(data); +} + +void write_tilemap(const char *filename, const uint8_t *tiles, long tiles_size, int num_tiles_per_frame, bool girafarig) { + int size = tiles_size / TILE_SIZE; + uint8_t *data = xmalloc(size); + + int num_tiles = num_tiles_per_frame; + // Copy the first frame directly + for (int i = 0; i < num_tiles_per_frame; i++) { + data[i] = i; + } + // Skip redundant tiles in the animated frames + for (int i = num_tiles_per_frame; i < size; i++) { + int index = get_tile_index(&tiles[i * TILE_SIZE], tiles, i, i % num_tiles_per_frame); + int tile; + if (girafarig && index == 0) { + tile = num_tiles; + } else if (index == -1) { + tile = num_tiles++; + } else { + tile = data[index]; + } + data[i] = tile; + } + + write_u8(filename, data, size); + free(data); +} + +int main(int argc, char *argv[]) { + struct Options options = {0}; + parse_args(argc, argv, &options); + + argc -= optind; + argv += optind; + if (argc < 2) { + usage_exit(1); + } + + int width; + read_dimensions(argv[1], &width); + long tiles_size; + uint8_t *tiles = read_tiles(argv[0], width, &tiles_size); + + if (options.out_filename) { + write_graphics(options.out_filename, tiles, tiles_size, width * width, options.girafarig); + } + if (options.map_filename) { + write_tilemap(options.map_filename, tiles, tiles_size, width * width, options.girafarig); + } + + free(tiles); + return 0; +} diff --git a/tools/rgb555.py b/tools/rgb555.py new file mode 100644 index 0000000..bf65031 --- /dev/null +++ b/tools/rgb555.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Usage: python rgb555.py image.png + +Round all colors of the input image to RGB555. +""" + +import sys + +import png + +def rgb8_to_rgb5(c): + return (c & 0b11111000) | (c >> 5) + +def round_pal(filename): + with open(filename, 'rb') as file: + width, height, rows = png.Reader(file).asRGBA8()[:3] + rows = list(rows) + for row in rows: + del row[3::4] + rows = [[rgb8_to_rgb5(c) for c in row] for row in rows] + writer = png.Writer(width, height, greyscale=False, bitdepth=8, compression=9) + with open(filename, 'wb') as file: + writer.write(file, rows) + +def main(): + if len(sys.argv) < 2: + print(f'Usage: {sys.argv[0]} pic.png', file=sys.stderr) + sys.exit(1) + for filename in sys.argv[1:]: + if not filename.lower().endswith('.png'): + print(f'{filename} is not a .png file!', file=sys.stderr) + round_pal(filename) + +if __name__ == '__main__': + main() diff --git a/tools/scan_includes.c b/tools/scan_includes.c new file mode 100644 index 0000000..e57ddc3 --- /dev/null +++ b/tools/scan_includes.c @@ -0,0 +1,98 @@ +#define PROGRAM_NAME "scan_includes" +#define USAGE_OPTS "[-h|--help] [-s|--strict] filename.asm" + +#include "common.h" + +void parse_args(int argc, char *argv[], bool *strict) { + struct option long_options[] = { + {"strict", no_argument, 0, 's'}, + {"help", no_argument, 0, 'h'}, + {0} + }; + for (int opt; (opt = getopt_long(argc, argv, "sh", long_options)) != -1;) { + switch (opt) { + case 's': + *strict = true; + break; + case 'h': + usage_exit(0); + break; + default: + usage_exit(1); + } + } +} + +void scan_file(const char *filename, bool strict) { + errno = 0; + FILE *f = fopen(filename, "rb"); + if (!f) { + if (strict) { + error_exit("Could not open file \"%s\": %s\n", filename, strerror(errno)); + } else { + return; + } + } + + long size = xfsize(filename, f); + char *contents = xmalloc(size + 1); + xfread((uint8_t *)contents, size, filename, f); + fclose(f); + contents[size] = '\0'; + + for (char *ptr = contents; ptr && ptr - contents < size; ptr++) { + bool is_incbin = false, is_include = false; + switch (*ptr) { + case ';': + ptr = strchr(ptr, '\n'); + if (!ptr) { + fprintf(stderr, "%s: no newline at end of file\n", filename); + } + break; + case '"': + ptr++; + ptr = strchr(ptr, '"'); + if (ptr) { + ptr++; + } else { + fprintf(stderr, "%s: unterminated string\n", filename); + } + break; + case 'I': + case 'i': + is_incbin = !strncmp(ptr, "INCBIN", 6) || !strncmp(ptr, "incbin", 6); + is_include = !strncmp(ptr, "INCLUDE", 7) || !strncmp(ptr, "include", 7); + if (is_incbin || is_include) { + ptr = strchr(ptr, '"'); + if (ptr) { + ptr++; + char *include_path = ptr; + size_t length = strcspn(ptr, "\""); + ptr += length + 1; + include_path[length] = '\0'; + printf("%s ", include_path); + if (is_include) { + scan_file(include_path, strict); + } + } + } + break; + } + } + + free(contents); +} + +int main(int argc, char *argv[]) { + bool strict = false; + parse_args(argc, argv, &strict); + + argc -= optind; + argv += optind; + if (argc < 1) { + usage_exit(1); + } + + scan_file(argv[0], strict); + return 0; +} diff --git a/tools/stadium.c b/tools/stadium.c new file mode 100644 index 0000000..473e277 --- /dev/null +++ b/tools/stadium.c @@ -0,0 +1,203 @@ +#define PROGRAM_NAME "stadium" +#define USAGE_OPTS "[-h|--help] [-e|--european] pokecrystal.gbc" + +#include "common.h" + +void parse_args(int argc, char *argv[], bool *european) { + struct option long_options[] = { + {"european", no_argument, 0, 'e'}, + {"help", no_argument, 0, 'h'}, + {0} + }; + for (int opt; (opt = getopt_long(argc, argv, "eh", long_options)) != -1;) { + switch (opt) { + case 'e': + *european = true; + break; + case 'h': + usage_exit(0); + break; + default: + usage_exit(1); + } + } +} + +// A matching ROM has 128 banks +#define NUM_BANKS 128 +// ROM banks are 0x4000 bytes +#define BANK_SIZE 0x4000 +// A matching ROM is 2 MB +#define ROM_SIZE (NUM_BANKS * BANK_SIZE) + +// The Game Boy cartridge header stores a global checksum at 0x014E-0x014F +#define GLOBAL_OFF 0x014E + +// ASCII "base" header + 2-byte version (Crystal only) +uint8_t base10[6] = {'b', 'a', 's', 'e', 1, 0}; +// "base" header + version + 2-byte CRC +#define BASE_HEADER_SIZE (COUNTOF(base10) + 2) +// bit flags per bank indicating if it matches the base ROM's bank +#define BASE_DATA_SIZE (NUM_BANKS / 8) +// "base" header + version + CRC + bank bit flags +#define BASE_TOTAL_SIZE (BASE_HEADER_SIZE + BASE_DATA_SIZE) +// The base data is stored before the Stadium data +#define BASE_OFF (N64PS3_OFF - BASE_TOTAL_SIZE) + +// ASCII "N64PS3" header (Stadium G/S was the third Japanese Stadium release for N64) +uint8_t n64ps3[6] = {'N', '6', '4', 'P', 'S', '3'}; +// "N64PS3" header + 2-byte CRC +#define N64PS3_HEADER_SIZE (COUNTOF(n64ps3) + 2) +// 2-byte checksums per half-bank +#define N64PS3_DATA_SIZE (NUM_BANKS * 2 * 2) +// "N64PS3" header + CRC + half-bank checksums +#define N64PS3_TOTAL_SIZE (N64PS3_HEADER_SIZE + N64PS3_DATA_SIZE) +// The Stadium data is stored at the end of the ROM +#define N64PS3_OFF (ROM_SIZE - N64PS3_TOTAL_SIZE) + +// The CRC polynomial value +#define CRC_POLY 0xC387 +// The CRC initial value (also used for checksums) +#define CRC_INIT 0xFEFE +// The CRC initial value for Crystal base data +#define CRC_INIT_BASE 0xACDE +// The CRC lookup table +uint16_t crc_table[256]; + +#define SET_U16BE(file, v) do { \ + (file)[0] = (uint8_t)(((v) & 0xFF00) >> 8); \ + (file)[1] = (uint8_t)(((v) & 0x00FF) >> 0); \ +} while (0) + +// CRCs of every bank in the base ROM, crystal_base0.bin +uint16_t base0_crcs[NUM_BANKS] = { + 0x9650, 0x8039, 0x2D8F, 0xD75A, 0xAC50, 0x5D55, 0xE94B, 0x9886, + 0x2A46, 0xB5AC, 0xC3D3, 0x79C4, 0xCE55, 0xA95E, 0xEF78, 0x9B50, + 0x82BA, 0x8716, 0x5895, 0xAD33, 0x4EF0, 0xE434, 0xC521, 0xBFB1, + 0xB352, 0xA497, 0xCA84, 0xD3F5, 0x3C79, 0xB61A, 0xAE1B, 0xF314, + 0x00B3, 0x7C0A, 0x1018, 0x7F6B, 0x1CFF, 0x15AF, 0x4078, 0xE473, + 0x081C, 0x4B9D, 0x2FFC, 0xD9D0, 0x2CBA, 0xCD8C, 0x004C, 0x773C, + 0xF040, 0x3585, 0xF924, 0x6FD5, 0xC5E4, 0xD918, 0x1228, 0x1C86, + 0x21C0, 0x77F3, 0x6206, 0x0110, 0x152F, 0x0F74, 0xCEDF, 0xBBFE, + 0xE382, 0x5C15, 0xFD4D, 0x954C, 0xD2D9, 0xCA2F, 0x14B1, 0x9D2F, + 0x172C, 0xEA0C, 0x4EAD, 0x604B, 0x0659, 0xF4C5, 0x4168, 0xD151, + 0x58C7, 0x99BF, 0x77D3, 0xCDEC, 0x61B5, 0x1A48, 0xD614, 0x7FB0, + 0x91D5, 0x812A, 0x812A, 0x82B2, 0xDCE2, 0x9067, 0x6DB3, 0x3DC7, + 0xDCB8, 0xA1CE, 0x9C21, 0x4A23, 0xB50F, 0x63E6, 0xE78A, 0x9238, + 0x644D, 0x1BD6, 0xB5B6, 0x1AB9, 0x9D07, 0xC849, 0x6992, 0x10CA, + 0x4453, 0xA3A1, 0x5A18, 0xAFE0, 0x7F2B, 0xFC38, 0xFC38, 0xBA98, + 0x5AEB, 0xFC38, 0xFC38, 0xFC38, 0xFC38, 0xEFAD, 0x6D83, 0xFC38 +}; + +// CRCs of every bank in the European base ROM, crystal_base1.bin +uint16_t base1_crcs[NUM_BANKS] = { + 0x5416, 0xFD37, 0xC4A4, 0xBC37, 0x9458, 0xB489, 0xE94B, 0x9906, + 0x2A46, 0xDEA9, 0x17F4, 0xF447, 0xCE55, 0xD843, 0xC5B2, 0xAE13, + 0x4E91, 0x3984, 0xD984, 0xD02F, 0x77B8, 0x4D8D, 0x1F8C, 0x7185, + 0xBA34, 0xA497, 0xE813, 0xFF97, 0x245E, 0xB61A, 0xCEF0, 0x8BF4, + 0xA786, 0x4CE5, 0xA9B8, 0x1988, 0xEF53, 0x2A24, 0x4588, 0x6084, + 0x2609, 0x4B9D, 0x8C33, 0xD9D0, 0x2CBA, 0xCD8C, 0xDA4F, 0xE020, + 0xF040, 0x3585, 0x2B21, 0xAEEA, 0xC5E4, 0xD918, 0x1228, 0x1C86, + 0x78B3, 0xF4B1, 0x7577, 0x0110, 0x152F, 0x0F74, 0xCCDD, 0x3444, + 0x58A8, 0x1FB0, 0xDACE, 0x954C, 0xD2D9, 0xF7CB, 0xEE99, 0xA5F0, + 0x172C, 0xEA0C, 0x4EAD, 0x604B, 0x0659, 0xF4C5, 0x4168, 0xD151, + 0x58C7, 0x99BF, 0x77D3, 0xCDEC, 0x61B5, 0x1A48, 0xD614, 0x7FB0, + 0x91D5, 0x812A, 0x812A, 0x82B2, 0x5C2C, 0x91E6, 0x79C5, 0xF2BF, + 0xDCB8, 0xA1CE, 0x9C21, 0x579B, 0x4B59, 0x21F5, 0xB2B6, 0x58AD, + 0xC91D, 0xB96F, 0x4DCE, 0xBA03, 0x9D07, 0x7A7E, 0xC77E, 0xB8AA, + 0xF7E4, 0xA7A4, 0x22E8, 0xAFE0, 0xE0C8, 0xFC38, 0xFC38, 0x2277, + 0x5AEB, 0xFC38, 0xFC38, 0x4314, 0x25B0, 0xCE7B, 0x12FA, 0xDD05 +}; + +uint16_t calculate_checksum(uint16_t checksum, uint8_t *file, size_t size) { + for (size_t i = 0; i < size; i++) { + checksum += file[i]; + } + return checksum; +} + +uint16_t calculate_crc(uint16_t crc, uint8_t *file, size_t size) { + for (size_t i = 0; i < size; i++) { + crc = (crc >> 8) ^ crc_table[(crc & 0xFF) ^ file[i]]; + } + return crc; +} + +void calculate_checksums(uint8_t *file, bool european) { + // Initialize the CRC table + for (uint16_t i = 0; i < COUNTOF(crc_table); i++) { + uint16_t rem = 0; + for (uint16_t y = 0, c = i; y < 8; y++, c >>= 1) { + rem = (rem >> 1) ^ ((rem ^ c) & 1 ? CRC_POLY : 0); + } + crc_table[i] = rem; + } + + // Clear the global checksum + SET_U16BE(file + GLOBAL_OFF, 0); + + // Initialize the base data (this should be free space anyway) + memset(file + BASE_OFF, 0, BASE_TOTAL_SIZE); + memcpy(file + BASE_OFF, base10, COUNTOF(base10)); + + // Use the appropriate base CRCs + uint16_t *base_crcs = base0_crcs; + if (european) { + base_crcs = base1_crcs; + file[BASE_OFF + COUNTOF(base10) - 1] = 1; + } + + // Calculate the base data bits using bank CRCs + // Bits indicate if the bank CRC matches the base one + for (size_t i = 0; i < BASE_DATA_SIZE; i++) { + uint8_t bits = 0; + for (size_t j = 0; j < 8; j++) { + size_t bank = i * 8 + j; + uint16_t crc = calculate_crc(CRC_INIT, file + bank * BANK_SIZE, BANK_SIZE); + bits |= (crc == base_crcs[bank]) << j; + } + file[BASE_OFF + BASE_HEADER_SIZE + i] = bits; + } + + // Calculate the CRC of the base data + uint16_t crc = calculate_crc(CRC_INIT_BASE, file + BASE_OFF, BASE_TOTAL_SIZE); + SET_U16BE(file + BASE_OFF + BASE_HEADER_SIZE - 2, crc); + + // Initialize the Stadium data (this should be free space anyway) + memset(file + N64PS3_OFF, 0, N64PS3_TOTAL_SIZE); + memcpy(file + N64PS3_OFF, n64ps3, COUNTOF(n64ps3)); + + // Calculate the half-bank checksums + for (size_t i = 0; i < NUM_BANKS * 2; i++) { + uint16_t checksum = calculate_checksum(CRC_INIT, file + i * BANK_SIZE / 2, BANK_SIZE / 2); + SET_U16BE(file + N64PS3_OFF + N64PS3_HEADER_SIZE + i * 2, checksum); + } + + // Calculate the CRC of the half-bank checksums + crc = calculate_crc(CRC_INIT, file + N64PS3_OFF + N64PS3_HEADER_SIZE, N64PS3_DATA_SIZE); + SET_U16BE(file + N64PS3_OFF + N64PS3_HEADER_SIZE - 2, crc); + + // Calculate the global checksum + uint16_t globalsum = calculate_checksum(0, file, ROM_SIZE); + SET_U16BE(file + GLOBAL_OFF, globalsum); +} + +int main(int argc, char *argv[]) { + bool european = false; + parse_args(argc, argv, &european); + + argc -= optind; + argv += optind; + if (argc < 1) { + usage_exit(1); + } + + char *filename = argv[0]; + long filesize; + uint8_t *file = read_u8(filename, &filesize); + if (filesize == ROM_SIZE) { + calculate_checksums(file, european); + } + write_u8(filename, file, filesize); + return 0; +} diff --git a/tools/sym_comments.py b/tools/sym_comments.py new file mode 100644 index 0000000..af0a936 --- /dev/null +++ b/tools/sym_comments.py @@ -0,0 +1,52 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Usage: python sym_comments.py file.asm [pokecrystal.sym] > file_commented.asm + +Comments each label in file.asm with its bank:address from the sym file. +""" + +import sys +import re + +def main(): + if len(sys.argv) not in {2, 3}: + print(f'Usage: {sys.argv[0]} file.asm [pokecrystal.sym] > file_commented.asm', file=sys.stderr) + sys.exit(1) + + wram_name = sys.argv[1] + sym_name = sys.argv[2] if len(sys.argv) == 3 else 'pokecrystal.sym' + + sym_def_rx = re.compile(r'(^{sym})(:.*)|(^\.{sym})(.*)'.format(sym=r'[A-Za-z_][A-Za-z0-9_#@]*')) + + sym_addrs = {} + with open(sym_name, 'r', encoding='utf-8') as file: + for line in file: + line = line.split(';', 1)[0].rstrip() + parts = line.split(' ', 1) + if len(parts) != 2: + continue + addr, sym = parts + sym_addrs[sym] = addr + + with open(wram_name, 'r', encoding='utf-8') as file: + cur_label = None + for line in file: + line = line.rstrip() + if (m = re.match(sym_def_rx, line)): + sym, rest = m.group(1), m.group(2) + if sym is None and rest is None: + sym, rest = m.group(3), m.group(4) + key = sym + if not sym.startswith('.'): + cur_label = sym + elif cur_label: + key = cur_label + sym + if key in sym_addrs: + addr = sym_addrs[key] + line = sym + rest + ' ; ' + addr + print(line) + +if __name__ == '__main__': + main() diff --git a/tools/unique.py b/tools/unique.py new file mode 100644 index 0000000..34530a3 --- /dev/null +++ b/tools/unique.py @@ -0,0 +1,106 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +""" +Usage: python unique.py [-f|--flip] [-x|--cross] image.png + +Erase duplicate tiles from an input image. +-f or --flip counts X/Y mirrored tiles as duplicates. +-x or --cross erases with a cross instead of a blank tile. +""" + +import sys + +import png + +def rgb5_pixels(row): + yield from (tuple(c // 8 for c in row[x:x+3]) for x in range(0, len(row), 4)) + +def rgb8_pixels(row): + yield from (c * 8 + c // 4 for pixel in row for c in pixel) + +def gray_pixels(row): + yield from (pixel[0] // 10 for pixel in row) + +def rows_to_tiles(rows, width, height): + assert len(rows) == height and len(rows[0]) == width + yield from (tuple(tuple(row[x:x+8]) for row in rows[y:y+8]) + for y in range(0, height, 8) for x in range(0, width, 8)) + +def tiles_to_rows(tiles, width, height): + assert width % 8 == 0 and height % 8 == 0 + width, height = width // 8, height // 8 + tiles = list(tiles) + assert len(tiles) == width * height + tile_rows = (tiles[y:y+width] for y in range(0, width * height, width)) + yield from ([tile[y][x] for tile in tile_row for x in range(8)] + for tile_row in tile_rows for y in range(8)) + +def tile_variants(tile, flip): + yield tile + if flip: + yield tile[::-1] + yield tuple(row[::-1] for row in tile) + yield tuple(row[::-1] for row in tile[::-1]) + +def unique_tiles(tiles, flip, cross): + if cross: + blank = [[(0, 0, 0)] * 8 for _ in range(8)] + for y in range(8): + blank[y][y] = blank[y][7 - y] = (31, 31, 31) + blank = tuple(tuple(row) for row in blank) + else: + blank = tuple(tuple([(31, 31, 31)] * 8) for _ in range(8)) + seen = set() + for tile in tiles: + if any(variant in seen for variant in tile_variants(tile, flip)): + yield blank + else: + yield tile + seen.add(tile) + +def is_grayscale(colors): + return (colors.issubset({(31, 31, 31), (21, 21, 21), (10, 10, 10), (0, 0, 0)}) or + colors.issubset({(31, 31, 31), (20, 20, 20), (10, 10, 10), (0, 0, 0)})) + +def erase_duplicates(filename, flip, cross): + with open(filename, 'rb') as file: + width, height, rows = png.Reader(file).asRGBA8()[:3] + rows = [list(rgb5_pixels(row)) for row in rows] + if width % 8 or height % 8: + return False + tiles = unique_tiles(rows_to_tiles(rows, width, height), flip, cross) + rows = list(tiles_to_rows(tiles, width, height)) + if is_grayscale({c for row in rows for c in row}): + rows = [list(gray_pixels(row)) for row in rows] + writer = png.Writer(width, height, greyscale=True, bitdepth=2, compression=9) + else: + rows = [list(rgb8_pixels(row)) for row in rows] + writer = png.Writer(width, height, greyscale=False, bitdepth=8, compression=9) + with open(filename, 'wb') as file: + writer.write(file, rows) + return True + +def main(): + flip = cross = False + while True: + if len(sys.argv) < 2: + print(f'Usage: {sys.argv[0]} [-f|--flip] [-x|--cross] tileset.png', file=sys.stderr) + sys.exit(1) + elif sys.argv[1] in {'-f', '--flip'}: + flip = True + elif sys.argv[1] in {'-x', '--cross'}: + cross = True + elif sys.argv[1] in {'-fx', '-xf'}: + flip = cross = True + else: + break + sys.argv.pop(1) + for filename in sys.argv[1:]: + if not filename.lower().endswith('.png'): + print(f'{filename} is not a .png file!', file=sys.stderr) + elif not erase_duplicates(filename, flip, cross): + print(f'{filename} is not divisible into 8x8 tiles!', file=sys.stderr) + +if __name__ == '__main__': + main() diff --git a/vc/pokecrystal.constants.asm b/vc/pokecrystal.constants.asm new file mode 100644 index 0000000..d009664 --- /dev/null +++ b/vc/pokecrystal.constants.asm @@ -0,0 +1,39 @@ +; These are all the asm constants needed to make the crystal11_vc patch. + +MACRO vc_const + DEF x = \1 + println "00:{04x:x} \1" ; same format as rgblink's .sym file +ENDM + +; [fight begin] + vc_const SCREEN_HEIGHT_PX + +; [print forbid 2] + vc_const A_BUTTON +; [print forbid 3] + vc_const MAPGROUP_CIANWOOD + vc_const MAP_CIANWOOD_PHOTO_STUDIO +; [print forbid 5] + vc_const NO_INPUT + vc_const B_BUTTON + vc_const D_UP + vc_const D_DOWN + +; [FPA 001 Begin] + vc_const FISSURE +; [FPA 002 Begin] + vc_const SELFDESTRUCT +; [FPA 003 Begin] + vc_const THUNDER +; [FPA 004 Begin] + vc_const FLASH +; [FPA 005 Begin] + vc_const EXPLOSION +; [FPA 006 Begin] + vc_const HORN_DRILL +; [FPA 007 Begin] + vc_const HYPER_BEAM + +; [FPA 042801 Begin] + vc_const PRESENT + vc_const anim_1gfx_command diff --git a/vc/pokecrystal.patch.template b/vc/pokecrystal.patch.template new file mode 100644 index 0000000..bad44b6 --- /dev/null +++ b/vc/pokecrystal.patch.template @@ -0,0 +1,699 @@ +;Format Sample +;[xxxx] ;User-defined Name (Max:31 chars) +;Mode = 1 ;1:Fixcode; 2:Fixvalue; 3:Mask; 4:Palette; 5:Double Frame Buffer +;Type = 0 ;0:Begin 1:End +;Index = 0 ;Index +;Address = x1F8000 ;ROM Address +;MemAddress = x2000 ;RAM Address +;Fixcode = 0 ;Mode1: Fixed Rom Code; Mode2: Fixed Value +;DelayFrame = 0 ;Delay Frame +;FadeFrame = 0 ;Fade Frame 0:Off +;DarkEnable0 = 0 ;0:Off, 1:On (for Normal Mode) +;ReduceEnable0 = 0 ;0:Off, 1:On (for Normal Mode) +;MotionBEnable0 = 0 ;0:Off, 1:Black Fade, 2:, 3:Frame Blend (for Normal Mode) +;Dark0 = 10 ;0~10 (for Normal Mode) +;ReduceColorR0 = 0 ;0~31 (for Normal Mode) +;ReduceColorG0 = 0 ;0~31 (for Normal Mode) +;ReduceColorB0 = 0 ;0~31 (for Normal Mode) +;MotionBlur0 = 31 ;0~31 (for Normal Mode) +;DarkEnable1 = 0 ;0:Off, 1:On (for Green Mode) +;ReduceEnable1 = 0 ;0:Off, 1:On (for Green Mode) +;MotionBEnable1 = 0 ;0:Off, 1:Black Fade, 2:, 3:Frame Blend (for Green Mode) +;Dark1 = 10 ;0~10 (for Green Mode) +;ReduceColorR1 = 0 ;0~31 (for Green Mode) +;ReduceColorG1 = 0 ;0~31 (for Green Mode) +;ReduceColorB1 = 0 ;0~31 (for Green Mode) +;MotionBlur1 = 31 ;0~31 (for Green Mode) +;PaletteX = c31,31,31 ;X:0~15, cR,G,B (0~31) + +[Network10@Wireless_net_delay_1] +Mode = 1 +Address = {HEX @+1 4} +Fixcode = {PATCH +1} + +[Network11@Wireless_net_delay_2] +Mode = 1 +Address = {HEX @+1 4} +Fixcode = {PATCH +1} + +[send_send_buf2@Wireless_WaitLinkTransfer] +Mode = 2 +Address = {HEX @ 4} +Type = 29 + +[send_send_buf2_ret@Wireless_WaitLinkTransfer_ret] +Mode = 2 +Address = {HEX @ 4} +Type = 30 + +[Network358@Wireless_ExchangeBytes_Gen2toGen1_RNG_state] +Mode = 2 +Address = {HEX @} +Type = 4 + +[Network359@Wireless_ExchangeBytes_Gen2toGen1_party_structs] +Mode = 2 +Address = {HEX @} +Type = 4 + +[Network364@Wireless_ExchangeBytes_Gen2toGen1_patch_lists] +Mode = 2 +Address = {HEX @} +;fix pokemon ?? in name +Type = 26 + +[Network360@Wireless_ExchangeBytes_RNG_state] +Mode = 2 +Address = {HEX @} +Type = 4 + +[Wireless_ExchangeBytes_party_mons] +Mode = 2 +Address = {HEX @} +Type = 4 + +[Network361@Wireless_ExchangeBytes_party_structs] +Mode = 2 +Address = {HEX @} +Type = 4 + +[Network362@Wireless_ExchangeBytes_patch_lists] +Mode = 2 +Address = {HEX @} +Type = 4 + +[Network363@Wireless_ExchangeBytes_mail] +Mode = 2 +Address = {HEX @} +Type = 4 + +[Network_RECHECK@Wireless_net_recheck] +Mode = 2 +Address = {HEX @} +Type = 7 + +[send_byt2@Wireless_start_exchange] +Mode = 2 +Address = {HEX @+5} +Type = 31 + +[send_byt2_ret@Wireless_end_exchange] +Mode = 2 +Address = {HEX @} +Type = 32 + +[send_byt2_wait@Wireless_net_delay_3] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[send_dummy@Wireless_start_send_zero_bytes] +Mode = 2 +Address = {HEX @} +Type = 33 + +[send_dummy_wait@Wireless_net_delay_4] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[send_dummy_end@Wireless_end_send_zero_bytes] +Mode = 2 +Address = {HEX @} +Type = 34 + +[NetworkDelay1@Wireless_net_delay_5] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[NetworkDelay2@Wireless_net_delay_6] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[NetworkDelay3@Wireless_net_delay_7] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[NetworkDelay4@Wireless_net_delay_8] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +[NetworkDelay6@Wireless_net_delay_9] +Mode = 1 +Address = {HEX @+1} +Fixcode = {PATCH +1} + +;no use[Network_STOP] +;Mode = 2 +;Address = 0xF4D34 +;Type = 8 + +;no use[Network_END] +;Mode = 2 +;Address = 0xF4D3C +;Type = 9 + +[Network_RESET@Unknown_network_reset] +Mode = 2 +Address = {HEX @ 5} +Type = 10 + +[E_YESNO@Unknown_yesorno_ret] +Mode = 2 +Address = {HEX @} +Type = 15 + +[linkCable fake begin@Link_fake_connection_status] +Mode = 2 +Address = {HEX @} +Type = 16 + +[linkCable fake end@Wireless_prompt] +Mode = 2 +Address = {HEX @} +Type = 17 + +;MURIYARI +[linkCable block input@Wireless_TryQuickSave_block_input_1] +Mode = 2 +Address = {HEX @} +Type = 18 +[linkCable block input2@Wireless_TryQuickSave_block_input_2] +Mode = 2 +Address = {HEX @} +Type = 24 +[save game end@Trade_save_game_end] +Mode = 2 +Address = {HEX @} +Type = 20 +[term_exit@Wireless_term_exit] +Mode = 2 +Address = {HEX @} +Type = 25 +[room_check@Wireless_room_check] +Mode = 2 +Address = {HEX @} +Type = 27 +[to_play2_mons1@Wireless_TimeCapsule] +Mode = 2 +Address = {HEX @} +Type = 11 +[to_play2_trade@Wireless_TradeCenter] +Mode = 2 +Address = {HEX @} +Type = 12 +[to_play2_battle@Wireless_Colosseum] +Mode = 2 +Address = {HEX @} +Type = 13 +[ret_heya@ExitLinkCommunications_ret] +Mode = 2 +Address = {HEX @} +Type = 14 + + + + + +;ROM:3FBCD ld b, $3E ; '>' +;ROM:3FBCF inc de +;ROM:3FBD0 call unk_2D55 +;ROM:3FBD3 xor a +;ROM:3FBD4 ld [byte_FFD2], a +;ROM:3FBD6 ld [byte_FF4A], a +;ROM:3FBD8 call unk_31C2 +;ROM:3FBDB call unk_2FE2 +; +;ROM:3FBCD: 06 3E 13 CD + +;0003fbb5h: 06 3E 13 CD ; .>.? + +[fight begin@Unknown_InitBattleDisplay] +Mode = 11 +Type = 0 +Index = 1 +Address = {HEx @} +Fixcode={db SCREEN_HEIGHT_PX} + +;12 1b 0b 79 b0 find next C9 + + +; print forbid 1 +;ROM:1758D ld a, [byte_FFA9] +;ROM:1758F and 2 +;ROM:17591 jr nz, unk_75B4 +;ROM:17593 ld a, [byte_FFA9] +;ROM:17595 and 1 ;e6 01 +;ROM:17597 jr nz, unk_75A1 +; +; change "and 1" to "and 0" +;00017595h: E6 01 20 08 CD BF 75 CD 2E 03 18 E9 FA 57 CE F5 ; ? .涂u?..辁W熙 +;00016c76h: E6 01 20 08 CD A0 6C CD 5A 04 18 E9 FA 63 CF F5 ; ? .蜖l蚙..辁c硝 +[print forbid 1@Forbid_printing_Unown] +Mode = 1 +Address = {hex @} +Fixcode={patch} + + + +[print forbid 2@Forbid_printing_PC_Box] +Mode = 6 +Type = 0 +Address = {hex @} +MemAddress={hex~ hJoyPressed} +Fixcode={db NO_INPUT} +ConditionType = 0 +ConditionValueA = {dws_ wWindowStackPointer wWindowStackPointer+1 wMenuJoypad wMenuSelection wMenuSelection wMenuCursorY hJoyPressed hJoyPressed hJoyPressed hJoyPressed} +ConditionValueB = {dws_ == == == >= <= == != != != != } +ConditionValueC = {dws_ 0xdd 0xd3 A_BUTTON 0x00 0x0f 0x03 D_DOWN D_UP B_BUTTON NO_INPUT } + +; -----ddddfffffff99999ccccc77777----0xd9c7 no ..............Mem Write: pc32 = 0x230b addr = 0xd9c7 value = 0x8 +; 0xd9c7 is the room number. + + +[print forbid 3@Forbid_printing_photo_studio] +Mode = 6 +Type = 0 +Address = {hex @} +MemAddress={hex~ hJoyPressed} +Fixcode={db NO_INPUT} +ConditionType = 0 +ConditionValueA = {dws_ wWindowStackPointer wWindowStackPointer+1 wMenuJoypad wMenuSelection wMenuCursorY wMapGroup wMapNumber wYCoord wXCoord hJoyPressed hJoyPressed hJoyPressed hJoyPressed} +ConditionValueB = {dws_ == == == == == == == == == != != != != } +ConditionValueC = {dws_ 0xaf 0xdf NO_INPUT 0x00 0x01 MAPGROUP_CIANWOOD MAP_CIANWOOD_PHOTO_STUDIO 0x04 0x02 D_DOWN D_UP B_BUTTON NO_INPUT } + + +;ROM:BB29C call unk_934 +;ROM:BB29F ld a, [byte_FFA9] +;ROM:BB2A1 and $B +;ROM:BB2A3 jr z, unk_B29C +;ROM:BB2A5 and 8 +;ROM:BB2A7 jr nz, unk_B2AA +;ROM:BB2A9 ret +; 000bb2a5h: E6 08 20 01 +; 000b92a3h: E6 08 20 01 ; ? . +; change "and 8" to "and 0" +[print forbid 4@Forbid_printing_mail] +Mode = 1 +Address = {hex @} +Fixcode={patch} + + +;ROM:401D6 call unk_50A5 +;ROM:401D9 ld hl, $FFA9 +;ROM:401DC ld a, [hl] +;ROM:401DD and 2 +;ROM:401DF jr nz, unk_1F8 +;ROM:401E1 ld a, [hl] +;ROM:401E2 and 1 +;ROM:401E4 jr nz, unk_1EE +;ROM:401E6 call unk_4562 +;ROM:401E9 ret nc +;ROM:401EA call unk_4114 +;ROM:401ED ret +; -----6666666666ddddddddd88888----0xc6d8 no ..............Mem Write: pc32 = 0x4109b addr = 0xc6d8 value = 0x0 + +;00040266h: 7E E6 01 20 08 ; ~? . +[print forbid 5@Forbid_printing_Pokedex] +Mode = 6 +Type = 0 +Address = {hex @} +MemAddress={hex~ hJoyPressed} +Fixcode={db NO_INPUT} +ConditionType = 0 +ConditionValueA = {dws_ wWindowStackPointer wWindowStackPointer+1 wMenuJoypad wMenuSelection wDexArrowCursorPosIndex hJoyPressed hJoyPressed hJoyPressed hJoyPressed} +ConditionValueB = {dws_ == == == == == != != != != } +ConditionValueC = {dws_ 0xa1 0xdb A_BUTTON 0x00 0x03 D_DOWN D_UP B_BUTTON NO_INPUT } + + + + +;0x29e97 +; call ir_main +; ld d,a ; IR_STAT +; xor a + + +; _IRcomm_end 0x2a1b9 +; ld hl,ir_read_buf | 21 50 c7 +; ld de,ir_read_buf_stk | 11 00 c8 +; ld bc,15 | +; call block_move | +; | +;00104bf8h: FE 03 30 24 +;00104bf0h: FE 03 30 24 3E 41 21 0B 51 CF CD FB 50 ; ?0$>A!.Q贤鸓 +;00104bf0h: FE 03 30 24 3E 41 21 0B 51 CF CD FB 50 ; ?0$>A!.Q贤鸓 +;the code below is Set_send_data2 +; 3E 41 21 0A 51 CF CD FA 50 +; 3E 41 21 0B 51 CF CD FB 50 +; -------> +; BCALL G_BANK0b,set_send_data2 +; call read_buf_clr +; + +;001048dbh: 3E 02 EA 01 CA 3E 14 EA 02 CA F0 FF F5 CD 94 4A +;001048dbh: 3E 02 EA 01 CA 3E 14 EA 02 CA F0 FF F5 CD 9D 4A +[infrared fake 0@Infrared_stage_party_data] +Mode = 1 +Address = {hex @} +Fixcode={PATCH} + + +;00104c3ch: CD 66 4D CD 9E 4D CD E5 4D F0 BC FE 10 CA 24 4D +;00104a95h: F3 3E 3A 21 E9 4F CF CD 5E 4D CD 96 4D CD DD 4D ; ?:!镺贤^M蜄M洼M +;00104a9ch: CD 5E 4D CD 96 4D CD DD 4D F0 BC FE 10 ; 蚟M蜄M洼M鸺? + +[infrared fake 1@Infrared_ExchangeMysteryGiftData_function] +Mode = 1 +Address = {hex @} +Fixcode={patch} + +[infrared fake 2@Infrared_ExchangeMysteryGiftData_start] +Mode = 2 +Address = {hex @} +Type = 101 + +[infrared fake 3@Infrared_ExchangeMysteryGiftData_loop_done] +Mode = 2 +Address = {hex @} +Type = 102 + +[infrared fake 4@Infrared_ExchangeMysteryGiftData_end] +Mode = 2 +Address = {hex @} +Type = 103 + + +;///////////// +;////fpa//////// +;/////////rangel zhang /////////// + +;PC:51-4118=20 000CC118 LY:012 AF:00A0 BC:E400 DE:E4E4 HL:FFA0 SP:DFC1 +;PC:51-411A=FA 000CC11A LY:012 AF:00A0 BC:E400 DE:E4E4 HL:FFA0 SP:DFC1 +;PC:51-411D=CB 000CC11D LY:012 AF:61A0 BC:E400 DE:E4E4 HL:FFA0 SP:DFC1 +;PC:51-411F=20 000CC11F LY:012 AF:61A0 BC:E400 DE:E4E4 HL:FFA0 SP:DFC1 +;PC:51-4121=CD 000CC121 LY:012 AF:61A0 BC:E400 DE:E4E4 HL:FFA0 SP:DFC1 +;PC:51-417A=CD 000CC17A LY:012 AF:61A0 BC:E400 DE:E4E4 HL:FFA0 SP:DFBF +;PC:51-41CA=3E 000CC1CA LY:012 AF:61A0 BC:E400 DE:E4E4 HL:FFA0 SP:DFBD +;PC:51-41CC=EA 000CC1CC LY:012 AF:01A0 BC:E400 DE:E4E4 HL:FFA0 SP:DFBD + +;ROM:CC118 jr nz, unk_C14D +;ROM:CC11A ld a, [byte_D1AB] +;ROM:CC11D bit 7, a +;ROM:CC11F jr nz, unk_C138 +;ROM:CC121 call unk_417A +;ROM:CC124 call unk_415A +;ROM:CC127 call unk_47F7 + +;000cc13eh: 6F 26 00 11 ; o&.. +;000cc156h: 6F 26 00 11 ; o&.. +;000cc137h: 38 17 CD 92 41 CD 72 41 CD 95 48 CD D3 41 AF E0 ; 8.蛼A蛂A蜁H陀A +;000cc128h: 38 17 CD A1 41 CD 63 41 CD A4 48 CD E2 41 AF E0 ; 8.汀A蚦A亭H外A + +;the 7th bit of the [byte_D1AB],decide whether the animation should be played. +;if it's zero , the game code will play fighting animation . otherwise, game code +; will jump to unk_C138 and avoiding playing animation. +; so we can begin out FPA patch right at address 0xcc121 . + + +;DarkEnable0 = 0 ;0:Off, 1:On (for Normal Mode) +;ReduceEnable0 = 0 ;0:Off, 1:On (for Normal Mode) +;MotionBEnable0 = 0 ;0:Off, 1:Black Fade, 2:, 3:Frame Blend (for Normal Mode) +;Dark0 = 10 ;0~10 (for Normal Mode) +;012532 +; +[FPA 001 Begin@Reduce_move_anim_flashing] +Mode = 3 +Type = 0 +Address = {hex @} +DarkEnable0 = 1 +Dark0 = 4 +MotionBEnable0 = 3 +MotionBlur0 = 11 +ConditionType = 0 +ConditionValueA = {dws_ wFXAnimID} +ConditionValueB = {dws_ == } +ConditionValueC = {dws_ FISSURE } + +;ROM:35D09 ld [byte_CFB6], a +;ROM:35D0C ld a, d +;ROM:35D0D ld [byte_CFB7], a +;ROM:35D10 ld c, 3 +;ROM:35D12 call unk_468 +;ROM:35D15 ld hl, $40E5 +;ROM:35D18 ld a, $33 ; '3' +;ROM:35D1A rst 8 +;ROM:35D1B ret +; EA B6 CF 7A EA B7 CF 0E 03 CD 68 04 21 E5 40 3E +;00035d09h: EA C2 CF 7A EA C3 CF 0E 03 CD 68 04 21 D6 40 3E +;00035d09h: EA C2 CF 7A EA C3 CF 0E 03 CD 68 04 21 D8 40 3E + +;******dc7d--------------- Mem Write: pc32 = 0x30a7 addr = 0xd066 value = 0x2c +;******dc7d--------------- Mem Write: pc32 = 0x30a7 addr = 0xd067 value = 0x3a +;******dc7d--------------- Mem Write: pc32 = 0x30a7 addr = 0xd068 value = 0xb8 +;******dc7d--------------- Mem Write: pc32 = 0x30a7 addr = 0xd069 value = 0x50 +; ------------ Mem Write: pc32 = 0x35d09 addr = 0xcfb6 value = 0x78 +;s e l d e s c +; + +[FPA 002 Begin@Reduce_move_anim_flashing] +Mode = 3 +Type = 0 +Address = {hex @} +DarkEnable0 = 1 +Dark0 = 4 +MotionBEnable0 = 3 +MotionBlur0 = 11 +ConditionType = 0 +ConditionValueA = {dws_ wFXAnimID } +ConditionValueB = {dws_ == } +ConditionValueC = {dws_ SELFDESTRUCT} + + +; lightening +; -------------- Mem Write: pc32 = 0x35d09 addr = 0xcfb6 value = 0x57 +[FPA 003 Begin@Reduce_move_anim_flashing] +Mode = 3 +Type = 0 +Address = {hex @} +DarkEnable0 = 1 +Dark0 = 4 +MotionBEnable0 = 3 +MotionBlur0 = 15 +ConditionType = 0 +ConditionValueA = {dws_ wFXAnimID} +ConditionValueB = {dws_ == } +ConditionValueC = {dws_ THUNDER } + + + + +;ji wa lei 011800 + +[FPA 004 Begin@Reduce_move_anim_flashing] +Mode = 3 +Type = 0 +Address = {hex @} +DarkEnable0 = 1 +Dark0 = 4 +MotionBEnable0 = 3 +MotionBlur0 = 15 +ConditionType = 0 +ConditionValueA = {dws_ wFXAnimID} +ConditionValueB = {dws_ == } +ConditionValueC = {dws_ FLASH } + + +;skill name 1 : ..............Mem Write: pc32 = 0x30db addr = 0xcf87 value = 0x2c +;skill name 2 : ..............Mem Write: pc32 = 0x30db addr = 0xcf88 value = 0x3a +;skill name 3 : ..............Mem Write: pc32 = 0x30db addr = 0xcf89 value = 0xb8 +;skill name 4 : ..............Mem Write: pc32 = 0x30db addr = 0xcf8a value = 0x50 +;skill name 5 : ..............Mem Write: pc32 = 0x30db addr = 0xcf8b value = 0x8f +;skill name 6 : ..............Mem Write: pc32 = 0x30db addr = 0xcf8c value = 0x9d +; include 2 pieces of animationl. +;ji ba lu 011607 + +[FPA 005 Begin@Reduce_move_anim_flashing] +Mode = 3 +Type = 0 +Address = {hex @} +DarkEnable0 = 1 +Dark0 = 4 +MotionBEnable0 = 3 +MotionBlur0 = 15 +ConditionType = 0 +ConditionValueA = {dws_ wFXAnimID} +ConditionValueB = {dws_ == } +ConditionValueC = {dws_ EXPLOSION} + + +;skill name 1 : ..............Mem Write: pc32 = 0x30db addr = 0xcf87 value = 0x30 +;skill name 2 : ..............Mem Write: pc32 = 0x30db addr = 0xcf88 value = 0xb2 +;skill name 3 : ..............Mem Write: pc32 = 0x30db addr = 0xcf89 value = 0x3a +;skill name 4 : ..............Mem Write: pc32 = 0x30db addr = 0xcf8a value = 0xb8 +;skill name 5 : ..............Mem Write: pc32 = 0x30db addr = 0xcf8b value = 0xca +;skill name 6 : ..............Mem Write: pc32 = 0x30db addr = 0xcf8c value = 0xc2 +; da yi ba ha ku ci 011441 + +[FPA 006 Begin@Reduce_move_anim_flashing] +Mode = 3 +Type = 0 +Address = {hex @} +DarkEnable0 = 1 +Dark0 = 4 +MotionBEnable0 = 3 +MotionBlur0 = 11 +ConditionType = 0 +ConditionValueA = {dws_ wFXAnimID } +ConditionValueB = {dws_ == } +ConditionValueC = {dws_ HORN_DRILL} + + + +;skill name 1 : ..............Mem Write: pc32 = 0x30db addr = 0xcf87 value = 0x9b +;skill name 2 : ..............Mem Write: pc32 = 0x30db addr = 0xcf88 value = 0xa5 +;skill name 3 : ..............Mem Write: pc32 = 0x30db addr = 0xcf89 value = 0xac +;skill name 4 : ..............Mem Write: pc32 = 0x30db addr = 0xcf8a value = 0x8b +;skill name 5 : ..............Mem Write: pc32 = 0x30db addr = 0xcf8b value = 0xae +;skill name 6 : ..............Mem Write: pc32 = 0x30db addr = 0xcf8c value = 0x50 +; 011251 +; +[FPA 007 Begin@Reduce_move_anim_flashing] +Mode = 3 +Type = 0 +Address = {hex @} +DarkEnable0 = 1 +Dark0 = 5 +MotionBEnable0 = 3 +MotionBlur0 = 7 +ConditionType = 0 +ConditionValueA = {dws_ wFXAnimID } +ConditionValueB = {dws_ == } +ConditionValueC = {dws_ HYPER_BEAM} + + + + +;-----111111111111111144444444444444----0xc902 no ..............Mem Write: pc32 = 0xcc46a addr = 0xc902 value = 0xd + +;000cc473h: FE 4F D0 cd ; 﨩? +;000cc495h: FE 4F D0 CD ; 﨩型 +;000cc497h: FE 4F D0 CD ; 﨩型 +; -------------0xd4170xd4170xd4170xd417--------------- Mem Write: pc32 = 0x3a89 addr = 0xd417 value = 0xd1 +;000cc486h: FE 4F D0 CD 7D 3A 22 FA 19 D4 22 C5 E5 6F 26 00 ; 﨩型}:"??佩o&. +[FPA 042801 Begin@Reduce_move_anim_flashing_PRESENT] +Mode = 3 +Type = 0 +Address = {HEX @} +DarkEnable0 = 1 +Dark0 = 5 +MotionBEnable0 = 3 +MotionBlur0 = 11 +ConditionType = 0 +ConditionValueA = {dws_ wFXAnimID wBattleAnimByte } +ConditionValueB = {dws_ == == } +ConditionValueC = {dws_ PRESENT anim_1gfx_command} + + + + +;ROM:CC139 call unk_4192 +;ROM:CC13C call unk_4172 +;ROM:CC13F call unk_4895 +;ROM:CC142 call unk_41D3 +;ROM:CC145 xor a + +;ROM:CC154 jr z, unk_C16E +;ROM:CC156 ld l, a +;ROM:CC157 ld h, 0 +;ROM:CC159 ld de, $10E +;ROM:CC15C add hl, de +;ROM:CC15D ld a, l +; CC156 6F 26 00 11 0E 01 + +; 000cc147h: 6F 26 00 11 0E 01 ; o&.... + +;exit point + +[FPA 001 End@Stop_reducing_move_anim_flashing] +Mode = 3 +Type = 1 +Address = {hex @} + + +;-----ddddff0xff690xff69fffff----0xffa0 no ....-------------..........Mem Write: pc32 = 0x8c352 addr = 0xffa0 value = 0x1 +;-----ddddff0xff690xff69fffff----0xce57 no ....----5555555577777---------..........Mem Write: pc32 = 0x8c483 addr = 0xce57 value = 0x1a +;0008c352h: 36 01 FA 57 CE CB 7F 20 08 ; 6.鶺嗡 . +;0008c229h: 36 01 FA 57 CF CB 7F 20 08 CD 14 43 CD 5A 04 18 ; 6.鶺纤 .?C蚙.. +[FPA link fight begin@Reduce_battle_transition_flashing] +Mode = 3 +Type = 0 +Address = {hex @} +DarkEnable0 = 1 +Dark0 = 5 +MotionBEnable0 = 3 +MotionBlur0 = 11 + +;-----ddddff0xff690xff69fffff----0xffa0 no ....-------------..........Mem Write: pc32 = 0x8c382 addr = 0xffa0 value = 0x0 +;0008c382h: E0 A0 CD 2E 03 C9 ; 酄?.? +;******ccccccccccceeeeeeeeeee55555555577777777--------------- Mem Write: pc32 = 0x8c483 addr = 0xce57 value = 0x15 +;******ccccccccccceeeeeeeeeee55555555577777777--------------- Mem Write: pc32 = 0x8c483 addr = 0xce57 value = 0x16 +;******ccccccccccceeeeeeeeeee55555555577777777--------------- Mem Write: pc32 = 0x8c483 addr = 0xce57 value = 0x17 + +;40 90 e4 01 3E at 3E +;0008c3e4h: 40 90 E4 01 3E at 3E ; @愪.> +[FPA link fight End0@Stop_reducing_battle_transition_flashing_WavyOutro] +Mode = 3 +Type = 1 +Address = {HEx @} + +;3D 20 EF C9 3E 01 at 3E +; 0008c439h: 3D 20 EF C9 3E at 3e ; = 锷> +[FPA link fight End1@Stop_reducing_battle_transition_flashing_SpinOutro] +Mode = 3 +Type = 1 +Address = {HEx @} + +;01 FF 3E 01 at 3E +;0008c576h: 01 FF 3E 01 ; .>. +[FPA link fight End2@Stop_reducing_battle_transition_flashing_ScatterOutro] +Mode = 3 +Type = 1 +Address = {HEx @} + +;32 00 19 00 3e 01 at 3e +;0008c764h: 32 00 19 00 3E 01 ; 2...>. +[FPA link fight End3@Stop_reducing_battle_transition_flashing_ZoomToBlack] +Mode = 3 +Type = 1 +Address = {HEx @} + +;ROM:8C25A ld [byte_FFC6], a +;ROM:8C25C ld [byte_FFC7], a +;ROM:8C25E ld [byte_FFC8], a +;ROM:8C260 ld [byte_FFD0], a +;ROM:8C262 ld a, 1 +;ROM:8C264 ld [byte_FF70], a +;ROM:8C266 pop af +;ROM:8C267 ld [byte_FF9E], a --------------------at here . +;ROM:8C269 call unk_45A +;ROM:8C26C ret + + +;ROM:8C298 xor a searching code : AF 22 22 77 CD +;ROM:8C299 ldi [hl], a +;ROM:8C29A ldi [hl], a +;ROM:8C29B ld [hl], a +;ROM:8C29C call unk_46D8 +;ROM:8C29F ret +;0008c298h: AF 22 22 77 CD ; ?"w? + + +[FPA link fight End4@Stop_reducing_battle_transition_flashing] +Mode = 3 +Type = 1 +Address = {hex @} \ No newline at end of file

C6x-_3CfxuQ1k%7qR}u6L&^x^xmDOox4iwzWSYYdkR-4 z6|&vacYLG0c;|_jDkm;^i}xE`SDSLLKd*D{PHux4W6Zn7{4>4wO^Nz@rkbVW#*=&Y z)9&)hRP7dIXV1{n=?dMIacS;`!cgXYlKVQ9CKu-&acG-ps2sUdt)=VP#Fw=nAMX!* zDiCOSpDXCA#+eNVGtS8No>B_@aP(Av-W`T3e0MpRRdTF_UHyK{k-KPYBP9R-#>bsC z>(1LeKf-^D|CjC;1G81DCf>MpU|QIzV*mtU0q!pp3b>*EMoDaiYHA=Cx2sR?BV28^zildWwdsP-p{b=TwUCE zmACB@2Ca_kB0Vx5Zf5zwzTWoz2`_nve4m@~9gAnR$;@Vms8{A^-fVq#?k7#bk83i1 zbF4~O<)rYCd+}Y16`3crziEi5X`9TNBpejCZt~i$ z(2u{j2lVVW*k8GYCDm)nxj%Drei?0z&)a$`jnTy*U@hafoR!T%XD`)P{d&Uu@ozuZ_JmUfBkvaDSma!o-`e!V=*plE;CpC3o&{&YL;VjP+VA`9 zKhOQX@BP^ZfmWGh>4GokCc2+2I-FopvtSj&s<*%Vb}1a0+RY%JYybV)`^_hp`Z5== zxW2zWN1jQ1y@6PK{lSOx)!(i%)IE|Hknt?8|5T;$2~mbe&b4!*J+B)I%}dqSI&&@j ziqkuWgq#Yc9*0$dX7}#J{TCEXyS_(@ZS#KC10O7V4UM<%Oj)w++}eqU`1=jdH7f)< zeowrya#ik`ifOw&6JN(!Cr5IM6s=hBTk^Du>~)XIYkTA_c00;F{KLn@;8!Ui%JkH& zO=x!Dv)znU$@NmWxYb6cg44k`dCqi!j&3i}?Fo##wHQAs zHq^J?`o-9Hwp~EOT1q;Te@7q73D2J6Jm+|0>XScBzsj6oc;kUk!t?cF9uHq!ZHzBh zudh?tej(xxCu7UMwHNN*Nn&fvVr87ZX&RS>K-j!M&d~i%2Q-s)TmIY$cL<-kYV!6j zevxA(vyOD_+Vbnzj^`ql4U-eOMOdvYotJ+O=QIK!{WX6^?x`_A64a=6@h>04Gs_dPqu1ZKwR4eCeBZ#{55)uO{? zzI{W2PrFCf^hEP=k>gh4OPNwd?=9RunS;Sah#{`weV6QuWj&qtrvI2PaGkSOxzHM^ z>TSqb(04%l#@QtbF2|1xy^!=*d0+d#--#*L{RLy$_Y(^bwV#(3QAw6~@Lo232 zgE3#p(8?gQWjm*X{3IRYn;{v+{31f{_rFt>mvELp#<=Kg($x6^4aW|yNV{iuN6FND zyW2w!#X9ANd4@Kg4`Z2@8Mf^%zkct?#jvtd=aaf~7)nf~w#n*U*ffWgxqjE=y8ZHg zJt5lq#$^wg&)Khj$npBYtpyPRhr~jRXLb~=4)V?aBoxcM?QTZPl)d}&mVFgC@$2{P zO#)IyD-<~kTDzy8j#Hd|FVOLGBj-#<5AF0hjy((47oE-GNIdMbWkPqE_5$8nY8sIq z&Khcs`udTkidkv4RsW;5xHliTxsoFzVOjF2OwK#?88^=b9WL==*tqFhk0N)azf6il ziD+lk+0;++2^nny8WZdV`%li?r>5Yw;f5z4^VSHlHG4kYoA74I<2lbgA4Xr_?3B*U zc<$hqPcxRS;q(pSvHMUtd-ekcZpNoRU#{#n*B5q(WVxeot>e76LQ3T4ieG{=cHdd2 z9r>wIgsI>0=)TDgEX5aJhQ0c}Qp?hltIm7PJMB5kg!L}h_=YcAA-3ef_8&~&7@2OS z`I-b9Z=QA2@9L6#D~Br@|E;4OxHA}a7qD(&kf~?RU~zT6Tg){JRQ`Cn`njxgN@xNA DxEL1$ literal 0 HcmV?d00001 diff --git a/gfx/tilesets/pokecenter_palette_map.asm b/gfx/tilesets/pokecenter_palette_map.asm new file mode 100644 index 0000000..78508b5 --- /dev/null +++ b/gfx/tilesets/pokecenter_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, RED, GRAY, WATER, WATER, WATER, ROOF, ROOF + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, WATER, WATER, WATER + tilepal 0, GRAY, RED, RED, WATER, WATER, WATER, WATER, WATER + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GREEN, GREEN, GRAY + tilepal 0, GRAY, GRAY, RED, RED, WATER, WATER, GRAY, GRAY + tilepal 0, GRAY, GRAY, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, RED, RED, GRAY, WATER, WATER, WATER + tilepal 0, WATER, WATER, WATER, WATER, GRAY, GRAY, WATER, GRAY + tilepal 0, GRAY, GRAY, RED, RED, RED, RED, WATER, WATER + tilepal 0, YELLOW, YELLOW, GRAY, GRAY, GRAY, RED, RED, GRAY + tilepal 0, RED, RED, RED, RED, RED, RED, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + +rept 16 + db $ff +endr + + tilepal 1, GRAY, RED, GRAY, WATER, WATER, WATER, ROOF, ROOF + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, WATER, WATER, WATER + tilepal 1, GRAY, RED, RED, WATER, WATER, WATER, WATER, WATER + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GREEN, GREEN, GRAY + tilepal 1, GRAY, GRAY, RED, RED, WATER, WATER, GRAY, GRAY + tilepal 1, GRAY, GRAY, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, RED, RED, GRAY, WATER, WATER, WATER + tilepal 1, WATER, WATER, WATER, WATER, GRAY, GRAY, WATER, GRAY + tilepal 1, GRAY, GRAY, RED, RED, RED, RED, WATER, WATER + tilepal 1, YELLOW, YELLOW, GRAY, GRAY, GRAY, RED, RED, GRAY + tilepal 1, RED, RED, RED, RED, RED, RED, GRAY, GRAY + tilepal 1, YELLOW, YELLOW, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY diff --git a/gfx/tilesets/pokecom_center.pal b/gfx/tilesets/pokecom_center.pal new file mode 100644 index 0000000..9fe7b76 --- /dev/null +++ b/gfx/tilesets/pokecom_center.pal @@ -0,0 +1,40 @@ +; gray + RGB 30, 28, 26 + RGB 19, 19, 19 + RGB 13, 13, 13 + RGB 07, 07, 07 +; red + RGB 30, 28, 26 + RGB 31, 19, 24 + RGB 30, 10, 06 + RGB 07, 07, 07 +; green + RGB 18, 24, 09 + RGB 15, 20, 01 + RGB 09, 13, 00 + RGB 07, 07, 07 +; water (blue) + RGB 30, 28, 26 + RGB 17, 19, 31 + RGB 14, 16, 31 + RGB 07, 07, 07 +; yellow + RGB 31, 26, 21 + RGB 31, 20, 01 + RGB 14, 16, 31 + RGB 07, 07, 07 +; brown + RGB 21, 17, 07 + RGB 17, 19, 31 + RGB 16, 13, 03 + RGB 07, 07, 07 +; roof + RGB 05, 05, 16 + RGB 08, 19, 28 + RGB 00, 00, 00 + RGB 31, 31, 31 +; text + RGB 31, 31, 16 + RGB 31, 31, 16 + RGB 14, 09, 00 + RGB 00, 00, 00 diff --git a/gfx/tilesets/pokecom_center.png b/gfx/tilesets/pokecom_center.png new file mode 100644 index 0000000000000000000000000000000000000000..fbbf270b322f16f9854b1ed40baf22c0fae7241e GIT binary patch literal 2485 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq}Ee)5S5Q;+E~S!T{lN zvE%oTxiBfU>~QSK70&pO)Z@@$?*2U^^868{BCitjNv|ung&*4br||mji-qT2_RO62 zP2-lF$fZ;A=IT4@TjF!Be6zY$5q@j2(bkBER=LluiX#H&Y`iVa7rnPr{p7uB?j1an zJ-=;!Ut53w{_nlp7i50ipcCJ^XWrAv`=0E5Cg^)Q@<0Ylha`(?8iQ}Q8$(~s{|EW| zZoaoRy}icBY>!v;U-4se(i{tC33j-o?yO3hd#dlJ+okRX-&y)*)~rY0xG2c5uei5i zn&Hvu!PAxA%$GJj!g5sLGGpX7yEOL$_4+$S68|qf^xHv&>%ra3$*Cvpt6$Z%d_414 z@L|YswF0uA5Ra@uPv8fOm@JgW%$`tCV>3FNZDmh*7#=zvASK zgW6G(zcV@9pYp}vz^mJ4D;+OC%N4p2Y4y~kI(p6WG-jWT#-$Om+wzz;c*-3U;;`5f za_h~PQ`aVzIP89V!DESN{zo?T2Fqj06GC`5YE3p>&X)H@r@o2dit<{kh`NOQ$5-6F z4}1*$9+B|iar^D*N>Bc-`t#blH{Mro*^01AhC0p#9NOYRHth_ZYtGF~*_o=zdMIY% z#A_)wy$rgWqZY4M5vt{1yn0ihO1>p`!6uzczIQIJiMgtOS=9Il&yU5ijD5{a$NDC# z&N7>2+BL^@ckCL=vwp?hYfJ9Wtvktbbe36odmQr_`>Jp6_GwQrXRo*~nItwlCB;$p zL;dgli#M&QtuoV#e^@k&)A-1?bAgW@#o4z0pVD>U#DkmC)$1(&O|I^2m|yFEpoJ-o zVR?Rw;sU-PuJ*FaE}C!d3x05CS*J8X`N6vfH}5>uwm)^$MJO}gW1+)b4!!@fJ0%tB z1@>;VsS;+|;`2L~Nrr=AM-~GYqaNQgZZH344#qDH$_Ju0a!lawdCGsunActLfoIwL z%Z$uSOku{Z7q35`u<(@OPR zGX6@te%Qa|XXPE=lYMp(C)nr9WW;nNoVYak>)+MSDwBP?Xg4KPH$TGkWaRwc12>s10m5C#g%F=kEuAs$yiLc z^}BzFYs!D~>k(@+XKq?mvZ^fg@yWMR)|bsD-OLeJG-sN_v`6Rj6V~reTCtl?$H%YT zIC<@=M~`;?eDjcP;&O{!kq7bvy1TONofH&TooW|5USo5o;5LUDw+D+!L3GIT=X3Lz zUWGmtvU%RueplOaL#S8K(i)FUhI`2s8`ac!?4Ui(bjb-(vXoNI$2Q^Cx4Mf>9O zrDxx|&Ghc=<#+SL)$4XhEZiizLpM*le|Lws-sGhWEZz=Xk~!T6*jKcdPu7}zV(X4u zx6SN#JbGonRAe(_GE2nw5E`+KsC3zQ+=*oU}ghC^jseuBp35bOp=Q#ioDr@3P(?K ziw>>+^G}3n^#suRe?}t$1q(r8&Igw1)%J%B~D9F=TAAaUe zwHV{-#-KGjcCmz1Zs)R_Bkh%ccc=M1^#fi?(LUY{yNi83JiHU|Yt6g##a0fdV2v4zFn%^7jTQTWDwMS;$^|}k*>CV?b zJQ12uuUETAf%WO^Q&QeuUVFTs?%(rqQ$b|Fy})~#?>$RHmn^)NX}4?L-n-s&XEv0+ z>zN=pC2Q%eTAi0`gBKo(ywS>kpFQUIdd}-CPdkd1EYP`_`L*HvSBGMrobQcY>+-6% zFW}L17L9c_&fdN7PTlU0s~c-%4@~u7)%$)r&#`d-J3Z@rSGO%=I-~S_&aWKf{UQ9X ze=apgj*}*vJz|)fKUq>S{ z7q(x_*9p9AA6T+ZZiW5vYyX`2&wto-y>!E*rpJtCZ$jh#6rA>5z_(vBV$;eE7S-PD z>uyWR$}Q{BKD6}K^~N-oxr~SNer{)3Q=8kfcKXxwi2JvV^?6)e7ic=CGq^n!U<@ry z7ZPV&S6xhYz2?Ejdzbb|C3oxQ*67Q6E?E{kY^{_YZ&()E-I8<@oR?_WEcEDP>LRY6%aUxF80Y)_lvXe90T;cJJiuJv_m|!T(>~E>6&SSN)Ig*ZL!eYci69kDpbL=a0X?r&31m zVQK8;W1;_Jn13nO3f6U&i~X@Y_`d7?%z0;S^Tj82U1o62{C{-*CAGcMm0BLVC2xuS zJv#I7P1#*1u2fru{#|@jan8d0g&a(QhZK)~+$rnB@8_$!|KRkY1Nwke`UszsZN3-oT^Li7kRWh zyqX$)PuuG6YmIR0>%eu*!`lnEjC{}}zOcY6Em Uq;TKrAE5S_r>mdKI;Vst0QPyRssI20 literal 0 HcmV?d00001 diff --git a/gfx/tilesets/pokecom_center_palette_map.asm b/gfx/tilesets/pokecom_center_palette_map.asm new file mode 100644 index 0000000..75ee649 --- /dev/null +++ b/gfx/tilesets/pokecom_center_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, WATER, WATER, WATER, WATER, WATER, WATER, WATER + tilepal 0, WATER, WATER, GRAY, GRAY, RED, GRAY, WATER, WATER + tilepal 0, RED, WATER, GRAY, WATER, WATER, WATER, RED, RED + tilepal 0, WATER, WATER, GRAY, GRAY, GRAY, GREEN, GREEN, GRAY + tilepal 0, GRAY, GRAY, RED, RED, RED, WATER, WATER, WATER + tilepal 0, RED, RED, BROWN, BROWN, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, RED, RED, RED, WATER, WATER, WATER + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, WATER, GRAY + tilepal 0, GRAY, GRAY, WATER, WATER, WATER, WATER, RED, WATER + tilepal 0, YELLOW, YELLOW, WATER, WATER, GRAY, RED, RED, GRAY + tilepal 0, RED, RED, WATER, WATER, WATER, WATER, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, WATER, WATER, GRAY, GRAY, YELLOW, YELLOW + +rept 16 + db $ff +endr + + tilepal 1, GRAY, GRAY, GRAY, WATER, RED, RED, WATER, WATER + tilepal 1, WATER, WATER, WATER, WATER, WATER, WATER, GRAY, WATER + tilepal 1, GRAY, GRAY, GRAY, GRAY, RED, RED, WATER, WATER + tilepal 1, WATER, WATER, WATER, WATER, WATER, WATER, WATER, WATER + tilepal 1, RED, RED, GRAY, GRAY, RED, RED, WATER, WATER + tilepal 1, WATER, WATER, WATER, WATER, WATER, WATER, GREEN, GREEN + tilepal 1, WATER, RED, WATER, BROWN, WATER, WATER, WATER, WATER + tilepal 1, WATER, WATER, WATER, WATER, WATER, WATER, GREEN, GREEN + tilepal 1, GRAY, GRAY, WATER, WATER, WATER, WATER, GRAY, GRAY + tilepal 1, WATER, WATER, WATER, WATER, WATER, WATER, BROWN, BROWN + tilepal 1, GRAY, GRAY, WATER, WATER, WATER, WATER, GRAY, GRAY + tilepal 1, WATER, WATER, WATER, WATER, WATER, WATER, BROWN, BROWN diff --git a/gfx/tilesets/port.png b/gfx/tilesets/port.png new file mode 100644 index 0000000000000000000000000000000000000000..3e05e0da727b9b7094aedec10469dbccc4adbb19 GIT binary patch literal 1048 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU@%}}U|?X_rf+(ffr0tHr;B4q#jVsUce7EoF7T)1vpD`(^X!IJY?;ZI@oNP+_us zyY$g1+h^6+8s{IcX1vAv=A=Q)3=h+lk5!l2l?6{X>X<&CA-^I{?9O#QmJ*HGuTL=8 zaI&edOHnLadh_$~^LvYx9$)##eoD6RMUM2xKWa;VeP^l?VcIh%_te2jL3@9TSIuXP zhzJQ}JDMQNZo9SKeWl>is=jS?YPaVcd78?&(yW{_$zsQwH2ou2E2~UC-)l}!ojtkY z+nNTMDbpQpH>Zc(sZ~(rCc+%@5yF23FGjg)sTsilR$7hM==J|HD zt2->T9rD7ecfQwWOFLZe-S+NBz;}iN``p;B|6&Syx6gmdp{bsKR)R%nmTl;e2ohny(#k0@1xLx61e_rPQ(=WMql@+>9$LPu}JkGO?b<3CY zbFBYHuS^$u_xWnH%DPvEH+~v0#lAh6ujezh>en`JnLh!K{%|o%zGf0Slae|8@yFtu zDOOQl!bPqV_U)FGa7cL=!+5~Yy7WPN!!@N30@2Sq^W^T`xKY5fLaN}5&Z*^W*M-i! zxq3B}(Lb;twqdW^Q;r+64!&DsGJCzyZa=m=3l|7AMlyE^{09m|47MBR-jmFMi1XQbEqFA)h-pBeKYwc4zXWZA`*(*e~P9v%s*KFN`3c}@Mk%^ z9M4j6PTdpkC_W*2qq}37z`Vmw9ATfQIhPAYSE@=*HZ$m$na*K$reTJ2^d3#Nn~lGW zMeP!6K8FixdITJ3jCkY!^wohVZj0c(8v8D?Jz+n@^NH#4saaAF7L@!HI;W>{)@r}t z?=$8hAr`x2-xY1&rk(gpWRdp$^NrMovb<*0skZIB;`sY!$w`0o)U(g;e*f>? z&+_woWd%~XycD@JI+d11bu2q5sIU@7mjYzMr%sW!K0{2ZX z|Fv7H&AzN*rsksOoq6XNd(TTU+dQ4kI;HA;cYNG@=CD2TvIYXR558WT9?K(icLx6q zX1BH)f&SyA6QpK5cWS!Q@Yd7JLP^P%Bx&@u)qAL*?|(J+&tx34ee=e z`Ptm+i#CRKTED#G-KaeKMypM2(++;Qz4Ly?>a=uE%-OmyK67WMMTNiv*$m0;ecT&T zp1ky4+j-dXj)29~-vSRl%jA{Vv;O^%vaaN+pYfgF!n?M`b>9@@%ip_gp=`o_IUS2V z(_e3{+9BKRHFH;Vt^3q2BLjw@bF7{oL8VKs_h$N+Gc8!OUcdU%<-OHn4A=YKYxt%|jZDHM;taCFhpG(N%MuhxqF$G{7l(B_eaCLxr>%uk9JNv@p|p*uA5ssqCyz*_eM^6yk)sM-*lmu zuFE60SH9Mk-d6I(ZLM{_L+Tv~!G^zlx(+fzd(GJPu`R7yyj*8v!V4WWyW5j~@ofy> z5_#&Y4r@kN-PiWq#A8av4Li;n_c$-oSK7BCHYF{G`_kus4e0uqYpjnkn0e}6yRc4X z5BCS@>+H!fUzqPmDP9%4)ZXSCzxj0@)o7%kvC`{NA4B-2CEEk^Au-SGKE3>z{JDko)5EUx)dp z*4ribJb5i4v3F8)P3Q){Xo>no3jf6adRU(|KDg@g>!(TTEUVY94mn=l7%wUD>J87w zt&>e|9x}FOv1pyJ(o-y|Gt1d@&z%2DW+%NnzF+^p$%1oERgL!D{GKZre@vKhblRdb z0tYv`RBimyRI}rX_phHdvt1ec1a;F6ykz`2=ULF{2!@7km+cY-RS8TAs&Cbj8D~xN z%Hy%H4Vdo{?y>u1M8nkCryDLa_i0OVC-hi|Ss1)*?Z5Hm_8YHbOh0OZWZAwQdHi~b z_>C`)WnWkIq}IBItvcMGtd`oTwc^DKj&I7l43(mFjP7zxzS(7P#mXv4ROi%1nG1Er zpANMacyC^;Jgv^2zrcT9v;?1-^{@F1e)HscrQK!!-e+V!F0lW|6wk>ni6;+T6STGr z{Bv1g%JZmwE1tc+Sw7 literal 0 HcmV?d00001 diff --git a/gfx/tilesets/roofs/new_bark.png b/gfx/tilesets/roofs/new_bark.png new file mode 100644 index 0000000000000000000000000000000000000000..1aa48fb87efa7d301d66e4a90b4f078b0519764c GIT binary patch literal 102 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|CI$uuhW<5Gtqcqdx}GkMAr-fhA4IdU2uo}T znzPVB-~a>bDupUM5>lG>-_Si8L+;jT5@|CPK$N*1QKbLh*2~7aP CPaG}) literal 0 HcmV?d00001 diff --git a/gfx/tilesets/roofs/olivine.png b/gfx/tilesets/roofs/olivine.png new file mode 100644 index 0000000000000000000000000000000000000000..14bc411aa38d047b5516822636062e565ec18966 GIT binary patch literal 97 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|CI$uuhW<5Gtqcqd8lEnWAr-fhH~i;ksh8Li x#(0ox&y)-efffS?#*e=Ow#qYPrll!djbaeE?Ca3;KwAo=*VEO{Wt~$(698;#8v_6U literal 0 HcmV?d00001 diff --git a/gfx/tilesets/roofs/violet.png b/gfx/tilesets/roofs/violet.png new file mode 100644 index 0000000000000000000000000000000000000000..1d68754f95749426f88b7f885ab953beecf0617c GIT binary patch literal 103 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|CI$uuhW<5GtqcqddY&$hAr-fhH$<_rcuRCF zaB*%_Xkp~)xZdt1%aECtw&6cNOMSu=%_A9WL|o(<*2#F<_V=o+2btjM>gTe~DWM4f D-VYoE literal 0 HcmV?d00001 diff --git a/gfx/tilesets/ruins_of_alph.png b/gfx/tilesets/ruins_of_alph.png new file mode 100644 index 0000000000000000000000000000000000000000..7ae272358df4bf1f6a428757e87e694cb17bffbc GIT binary patch literal 1884 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq`Aw)5S5Q;#O+d`R>Oj zMC(3z$?iPKudUsf?)R>jH%@liy#qp@0vCY|1((!Rxd z^M)3gs>Gb6gAVDE(yJ#q6y5papfKB+@3Z<7gC~0mjh^Q`s#&j6srICFdi>SZ{{CNI z)qeHba$7J`pvtqa(}!_m)COaP$wkHNRoidZ7P9v;=I3mm?_d8-J(#h|=}11OlFgSq z_Q^a2m%rS5xVpa1pHWEh*nKVAKU>+pOgkO_Poc=}R`m~ihgp5Q4^Nh^=Fj(5(tMi# zt)arQ?!Ei{y{j44O>y1p@x?rgcmKb`Zo-Gc8yFrl0^~iblKkj{AfBCP8t#EpJ66;~3 z__a3=Yn^smt>bz4g29WNoi!?Qcg1byE~z{v_sPchbIm4>x?lO;l@fF3o-OvUIu-nF zLrltKn||@T*6~}Ww*R>Jw`St7a>+|>Rf9m>l=bCF9 zrg6_)a{tG}@PCUAr9}Fi(%@UVXVPMcy*BTq6X(C0F;jSL{KDF@JJb%^!^QC`S3;%p}omcF(Tl|&<_kV)} zo%0fSTj%I=om~II{5bymUuIC1ifK5nq@lushg(5 zsutTFM!}M2KUb-1GgQw=zkdDx&Ux#f-{iWN#sA*pXSG%IeBBDp+i#_BC(ZR&2@6qw zEv#7|=Q?q9@1)5w>kf2F2?)H@f6wfot*CbAO6EtMITBOfIr)8<#mZ2u>0YpN8}so= z{pY1DG7}E7JXd_YUuc7m`^qwxHi_>ZM;O+84i&w}&F_AAv9h6`Q@YO|mC0?VH4uWZtNs5;N=nB9}CStoz*4?HpR^>5a*S1V`eOgPW^wmHo~ zfcI;dgYFd1$q{>XG$hn#rOuoyEVW}cdp^^B{uBPZtWFiV-vK0Bv5 zEMxYY4Kk}w-R_6l8F1>W4PSVoXtERqZ#qEcc&h6@R=gZ7kvhlA_a?#hY#uf4374^2? zT<{`B*6e28!{5eSXZ!?s(hfT0XP)@4b0NCSW1elx-R9mk2YHTO+`yLRE}WL0He2?z z;UVE|)f*<-}AF!Ry@8CQ!rg*2iIc zR>5$_)CRrf+s__f%JQR=Lz$gnUqP+BLQLPsD}fDazY>)eJ-ec~aJ$IXE5XSP2b%-# zE~yAD*7A^xd)UU{sQ**Tl7Zc%vh=8F@6QRIOuw6hz9>i-u`fzk;WKel(9D{DmMeFe z+Iz(XY%4t2?mPdhZTPf1D}Ee&+{JIfdLdT!?}d(^?-J@h?0Cf7J5??BjquOlBL!S~ zA9j3Uu)8u#_{v7v{mISJ62hB1{Ta8MtjfCmY>J6}N?w9b4D%0>9s91Q+&%Pf`=6i+ zpBUyD{1?o!=W%?U#$R`)tyl6Jqv?T9A-WqPKDY48HOL!xn{@ABJHflHvLJ86u_LS% z2|t=|I=nJp`l$Jo!o9On!u#G&WE7H~6PlEy;jnb3N?nR{qWB#H$pe$q*0c0lcd01( z^?2l4F1opzA%ywFK@}4z;ZEBXtn<>JI+_1iqV;1n*IS`G9Uni6@PtZoOp)tK&_8S| zpH(@NN1tuW`TdWM&f`zJ8y?@JHCfJl?W3l3ewN=w>qBb|yv{xjRti=3o4aD~bLZ>p zw0MnAb3W$FV!nP`yoRCr+tp(n$1k5S+<8yvdh;ay2S<EVGL4KR(JZAY5;%9@| zqdqu3D_PB)TNZL?g0G%!hutPwv!?#GSx& L^>bP0l+XkKdaH#z literal 0 HcmV?d00001 diff --git a/gfx/tilesets/ruins_of_alph_palette_map.asm b/gfx/tilesets/ruins_of_alph_palette_map.asm new file mode 100644 index 0000000..5ebde24 --- /dev/null +++ b/gfx/tilesets/ruins_of_alph_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, WATER, WATER, WATER, WATER, YELLOW, YELLOW, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, BROWN, BROWN, YELLOW, YELLOW, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, RED, RED, RED, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, RED, RED, RED, GRAY, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, YELLOW, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + +rept 16 + db $ff +endr + + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN diff --git a/gfx/tilesets/tower-pillar/1.png b/gfx/tilesets/tower-pillar/1.png new file mode 100644 index 0000000000000000000000000000000000000000..c22fb2a13ff317539e88e50d04a675ca5eea6b84 GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2V9;PY&5~so mbRr`=nYp%Hs1aGz^ndReEABHYFDnZ{=6kyOxvXpS6kR~jc%SfIQfHwUGx4Qt>IO7Zhc6QoV{VujID`{%wZOy kv(4U2NN5QB*m=C(G&z^^=8BtzW+1~oUHx3vIVCg!0Jw-Sr2qf` literal 0 HcmV?d00001 diff --git a/gfx/tilesets/tower-pillar/5.png b/gfx/tilesets/tower-pillar/5.png new file mode 100644 index 0000000000000000000000000000000000000000..b7796c8d67c9da2ba053565d2e38cdbc35186efa GIT binary patch literal 117 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2V9;Pb1(VTQp`dq+5--GNk Wk~w(aPc^6qndj;1=d#Wzp$PycktsL; literal 0 HcmV?d00001 diff --git a/gfx/tilesets/tower-pillar/6.png b/gfx/tilesets/tower-pillar/6.png new file mode 100644 index 0000000000000000000000000000000000000000..0ca0e5936f67ef8b5599d0c5628c6e2e0ad9841e GIT binary patch literal 116 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2V9;P|u&YoV|go^=s0~u$L##J9116-o=yoD75>P)+$YXcI)QeugS{{@7jNQ&1Bur U;@RQlk_0l&)78&qol`;+0H)+7k^lez literal 0 HcmV?d00001 diff --git a/gfx/tilesets/tower-pillar/7.png b/gfx/tilesets/tower-pillar/7.png new file mode 100644 index 0000000000000000000000000000000000000000..3aa4b4e94a0c426dfa28b592177d4780f48c3c6c GIT binary patch literal 115 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2V9;PgTe~DWM4fhH@g7 literal 0 HcmV?d00001 diff --git a/gfx/tilesets/tower-pillar/9.png b/gfx/tilesets/tower-pillar/9.png new file mode 100644 index 0000000000000000000000000000000000000000..da74607be7de782f163c52b5b23b547b9bd0edd4 GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2V9;P2GTUa~3uzy#L+;*Q$x=zwK z>W*VTUBuC{hjK>G9|zN0&CE!kzC@ciDQa%R?fJPb2}8oYviCq=AQ(q&F#(`hl>H-qV1ub`3Rm89~| zRu4XMH5e)`pS<{NP^pwah8z2_=ZEi4s1G_I!Md;Jg?Q}s%M8blFcxStEK^$b{?w-0 zy3mwLsS22%KE?lKHDnwDw2~yne|)Q{+^EkGuNCrEw#e%geT+t30hmL_Xs*{ z+A=r(BE!oEY%C=meWmT1Yb&DK@2r+OlaMaOa!bu2vW0Qc)tvrSs}Gp9{0TYC#`VU? zz~R~AOLMjyYZp<7(!3y$dcb4jqp-U#Pey%YOwpHpJ(X9YeX)^v(2_4Dn}rOmE(x&) zEXWCV*{tDaxXHjijiKnJ&7Y&m+^$R#yO>KG*ZJ2QoVmGF;qzgYA3|$X`p=kH_b2RG zzUcUl!fnx|#T`E{O338;Fcxts6j%fZR#+!kF7!x96pwo~=k|Q2BO(oomx6C5fB)fq z_pIJI&IxQ6q`CMt6L@$UCpmntUcc4jDwoAom zYEt*keJJX1lAF8t=R>#OH35tEwQ0V&B{}Pval@&ygS&1m>Ys4*=ti?{m6hAptT)by zJI8RLwJokbMu$~2A$L|$x{!`DTf(&d@?SMg2NYK|Zkzu5$+w=(`-$y+41%6^SrOj?P`X0ZmnijnmgD6nnIh_Yk53R;yU29yy_ym!i?#)H^h!TeZw-Z z=z)sE9Nlyo!$*n!S+*BU_lk?YF;(3a_&ab)kHq6br%5NKIM~g9s^G-Vpj9^ct~KXP zm%4jilQ#BM)Y#37QCXsSa%x(GRm^th-DTdknZ{~Y17wcoe~G)W?yty1ugj`hr>#!) z{HpnJ$MZ1LX#u70=lNcLPH)?uZZhS~q1`uU2Qg;A>d>XozH-!s74D6TCAQb5KdGGVeU3pfwCv;A z$~On!9$5Ep;<_f=ODgGcXAPt#v@f`EqTyfs+NHtw1l>PdoIh=|hDlIvjfQZ-^aZ&# zpO+;uNQXWMx%oJKK4XDb(19CM8Bf$7F@7NVf#=76rdee>9d}<@kSVp(+2fGQ35RpH zc;)Us-dmqH9{r{)mn*JZyqPqI*X{X(4 zKaTcFm>=1yn%e)fWE+3^o?VhBa~Z!d?b{?GywGCxkt0vfn{L+-tGcu7=h3B`jYQHr zuhiQwJ-;g^u7&I5eg2K|QJZgF+4Fs?ciN3NZqX;^zL;?-@eI?Kvlo^5Ev^eb**^8w zAqzIyNL7>VzfWDYRhC!szWQVV$b>p z%fU}kw`@Zku4`9Mn3X-rD`2Zk)ru?5zr9fP)_*qsBjmdF!!zTZ2PF=CUw*QknPKj3_wsjF z=UqRne@~2wG5XmOp1yuYlNc6`*HZabXV=xZX?o18Em*?vH>AFzQm9dSewXNv7ccMf zNU;3axmVnArHFRSyff<#n=;r3UNv7X?6&3tn@3}m&z;VHUk?A~yy+$M;N%-~_w_ax z^wf?owwFqr@GZqCOyYOBKV!P7=-)cmumaE2q9q1(Qh%egZvG1qag}oD>b5+4F4bs7 zTH~Es=N@;KE6#c?2|=@F@>H+Ac2Kt|F}zRgn4faa#Z?n*ZtqL~X7%RMv*4{@}o@$l(3f(+%%ATO`jsaHHcy(xj!6-oHK{&a1|RH(z%_!| z!{}Jasm5Ce)4qqWIB={8Su|ZX=w3PN)U3jX>lQk!tix7G4AXhMZ|I*eOYp1&x9##7&UhVDstzMIgIII|wx54jzCb@CNwPWblKQx2)K*vR!ga_sPvh!f(v zu_`Zg<<&|!d|Bkegkn~&g>N5jxDl0c z=h>a6*U=k({cKlP_?^w^bui4?tVTiVP;3gvm+Wh=rhfN#=y01D)FEobZjqT}cy_G| zqs~$X(~OTZx3xOZXN%x!QL~mJ$(0pT}Sn!Zh39k zX7j#s!{-A_F1D5N6<(>?*T!Wlx@*dZTS*m-EV=w26E|K|%}srKe4FRxBizalSH3!Z xygOQRb@5y?hKv8NSQhZjVSawVvVbq)FT1_07i&$sRRXBo@pScbS?83{1OWa-C5`|9 literal 0 HcmV?d00001 diff --git a/gfx/tilesets/traditional_house_palette_map.asm b/gfx/tilesets/traditional_house_palette_map.asm new file mode 100644 index 0000000..5daa0da --- /dev/null +++ b/gfx/tilesets/traditional_house_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, BROWN, WATER, WATER, RED, GRAY, GRAY, GRAY + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, WATER, WATER, RED, BROWN, GRAY, GRAY + tilepal 0, BROWN, BROWN, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, GRAY + tilepal 0, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, RED, GRAY + tilepal 0, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, WATER, WATER + tilepal 0, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, BROWN + tilepal 0, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, WATER, BROWN + +rept 16 + db $ff +endr + + tilepal 1, GRAY, BROWN, WATER, WATER, RED, GRAY, GRAY, GRAY + tilepal 1, BROWN, BROWN, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, WATER, WATER, RED, BROWN, GRAY, GRAY + tilepal 1, BROWN, BROWN, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN + tilepal 1, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, GRAY + tilepal 1, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, GRAY, GRAY, BROWN, BROWN, BROWN, BROWN, RED, GRAY + tilepal 1, GRAY, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, WATER, WATER + tilepal 1, BROWN, BROWN, BROWN, BROWN, GREEN, GREEN, GREEN, BROWN + tilepal 1, BROWN, BROWN, BROWN, BROWN, BROWN, BROWN, WATER, BROWN diff --git a/gfx/tilesets/train_station.png b/gfx/tilesets/train_station.png new file mode 100644 index 0000000000000000000000000000000000000000..b0704b9dfa9e8692d3a9e8c4d647c8891ed42297 GIT binary patch literal 1162 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq^B^)5S5Q;?~=%@jlV1 zA`BlcmreiZ@3lQnHk(IirlZL+pKlv_FLX0INobvDFsln(bW|}CJm4bfvhh5_Vv{Q&A7k&bR=%4)n{$1TrS6a9z@OavDjqMM z7-7FibYr8&&2=I7n%^0y9QyHaBfs^!=?j=Y25W_CB{=&tCCrv;+1vT(WoXNSS4&=o zGHP+~sHv-3FZkH@qF}ZD^PiUzADqrin72XT_wT(+4hANx?T}k-#(~0EZ=SrTY}4F~dnHp`9vok)a`MB9dk)r@JYzny?n1O_xk&>cg`RF z*?#>std}xp6sWW{XirQ3s>pCbVe-X>@c!vBluXbM@w=3-a8j%PWInloBP`C z@5@g@HmwmdPb|3^Di=nx>@m08_5F+W_h}2-Ryc19^k|kbdFyKy%Ahj;Wp?e!<Fn?DM(C-bDkZ@oBb8!F~Go_~65BX_!G`~B+l z%{Qg$*DdB&_%Qi+RkQdlW>e$y`|eqkZSX$u{Q9Mr%kS5`d2P7poAukp;y)i4Sb9D$ zx*?@^-JWyC*=v$zvhS0Xv!x@yKVh&`6S&IPJlmt{`5TTq$NzIam?vmG<>&ik@i$Ge e8@T^Hf8c*1+VA*N}g^Z`GpUXO@geCxjoFMuD literal 0 HcmV?d00001 diff --git a/gfx/tilesets/train_station_palette_map.asm b/gfx/tilesets/train_station_palette_map.asm new file mode 100644 index 0000000..f52f5bb --- /dev/null +++ b/gfx/tilesets/train_station_palette_map.asm @@ -0,0 +1,29 @@ + tilepal 0, GRAY, GRAY, GREEN, GREEN, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, RED, GRAY + tilepal 0, GRAY, GRAY, GREEN, GREEN, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, RED, GRAY + tilepal 0, GRAY, GREEN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, YELLOW, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, WATER, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 0, GRAY, GRAY, GRAY, GRAY, GRAY, ROOF, GRAY, GRAY + tilepal 0, YELLOW, YELLOW, YELLOW, YELLOW, WATER, WATER, WATER, WATER + tilepal 0, BROWN, BROWN, GRAY, GRAY, GREEN, GREEN, WATER, WATER + tilepal 0, WATER, GREEN, GREEN, WATER, BROWN, BROWN, BROWN, GREEN + tilepal 0, BROWN, BROWN, GRAY, GRAY, GREEN, GREEN, WATER, WATER + +rept 16 + db $ff +endr + + tilepal 1, WATER, WATER, WATER, WATER, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, RED, GRAY + tilepal 1, GRAY, GRAY, GREEN, GREEN, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, RED, GRAY + tilepal 1, GRAY, GREEN, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, YELLOW, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, WATER, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY, GRAY + tilepal 1, GRAY, GRAY, GRAY, GRAY, GRAY, ROOF, GRAY, GRAY + tilepal 1, YELLOW, YELLOW, YELLOW, YELLOW, WATER, WATER, WATER, WATER + tilepal 1, BROWN, BROWN, GRAY, GRAY, GREEN, GREEN, WATER, WATER + tilepal 1, WATER, GREEN, GREEN, WATER, BROWN, BROWN, BROWN, GREEN + tilepal 1, BROWN, BROWN, GRAY, GRAY, GREEN, GREEN, WATER, WATER diff --git a/gfx/tilesets/underground.png b/gfx/tilesets/underground.png new file mode 100644 index 0000000000000000000000000000000000000000..c33c3fd5bdb07280a8b51a1d8bc72eeb8e7e1ab0 GIT binary patch literal 1111 zcmeAS@N?(olHy`uVBq!ia0y~yU}#`qU`SwMU|?X_wb0gtfq_NN)5S5Q;?~>M4Wp+>Y)(>ndu{FgnX=1X9js5dZ(coP z?)jSe@%O*8dNB$t+;oI3FlX!hT@0_@?6+{}aJspPW2eF9uY4H~Dq&2HZM! z)9Q%B<+a_l0)I>2zuPY&(=fp>_Mb)1#p?I}ggcJLEcknL;j;~|+61=zXAr+%Uu&SF zyy#?Oc$<;3*@g`dnCzT>9rhP=Dq)Y1T*sjJBwp}RxxvNjt9GSkIZa|nD_$CL<|UJ& zZEU~)gGZiD=RQ9_dih!MhP}Hs3wNJvIW1)L`HV4%>DXRPve=_&Q@0O z3nq>Xo;G@CyE-OrwZ3~gU|H%brs;aFYTsQ*Djn*QnRJ z1($yi;}2YXT5U@BOTMLkq8-Oy)yrS$ReSOIv%vk8>}(5WEL9C>{CK3geg9S-z4KPV z<-ts0td};Kzgw_?wU%@HnOlFnv#0*zj1=3lIEH<5jlPqNVX?JdEyoHt-n`unDN|S3Elhr0n_H( zo&M?AI@KRRWDoq6n!e7kuaMiJ@mK8W_1B`#Z@aqpv4+n(*VFUsw`%pJ zxRq(%4KOp449{NcyINhQb??ax!{{@=+QQq)1^0)WT@qut6ju0bv1IhaX7Q1ajzh&An`IOZPx+L$Y^GC%Uhc{D%XB}_UcG!Fzr!QNNy>Mk8GI5K zm*)vuZ1`GQuihfaJMW2?Ou`G5&JQZi#hP=O>s9$QFLcd#keW6j@>_^jki#5)-=8@L zq~ZhL$W$yg@XPGd6k&Mg9NxjK(#f=bqwwkIxrvrK8wJIq&QuC$Ikc4=;@|)9bWOw? zmII4?t{f6RJ%7W>TMiqY&pXLI$h3R6$8|GzPvm50vkNeF957g&E% ze2eyPL8m*ynI=vB4FAM@KQp}REHO0x!I8j`zr9j%hk6j#E(iAFR{s~%_o(bt58BEf z+YtV6`Z2b>MmyDmE<9%1V=Bx3ikE+Zi15nh-wi6SCzX8Lyhpr=u`&7Y?*kKGGBV$@ znDu=Uivf4|SGnyzm5bcl59@NS_i>tbZuX~^+ZvS#QR1^$uQF@+=0E&0gWJPaILKYV zM4x4|zuegdZW+&c#^;_eubQrMdSP3EaktaVwdFH=RQ_ zm4lacVS#}px7vE9ldA&?ITo9UcsWgJ4AAsZ_4~@O{GVk0^#%1mLE1fC{an^LB{Ts5 D5N#R| literal 0 HcmV?d00001 diff --git a/gfx/tilesets/whirlpool/1.png b/gfx/tilesets/whirlpool/1.png new file mode 100644 index 0000000000000000000000000000000000000000..4641dbc0d0e2bedb4100f5c34e29cf298b94ddf0 GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2U{GLUU|?Wy(5_p{z`zjc>EaktaZB`sB42}o zNW;Vblk!#MmM6Ru{2=18xb?TeY&Gt?mfaTne_YIK5@2_C^SKIF-LqFRtfhOp zq|$txq+9%=ELkOYwCVjnE_wf^R<$DgmCwic^@>&3n(N;c09oeg>gTe~DWM4fW4EaktaZB`!Ay8(u_q$t?3r-MutaN~QrRg(tFA}?DohTG-#c=Vqbv2B&zXqFo^#GUxx=cf z;>xx0vGnxKQq7lIbEaktaZB`+HCKay z0K>(dOLC@u6-m6=P}TK-Q|F7_q*Enk-?r5;1>3UOe{A`l(Z1%!;lwY3|BZuEWL9=@ zsS1Br%T(Z;r78XJso9bMS>Cs6jJG9-CoVd{p7lXFbmrWNg&@m3UHx3vIVCg!0P8$6 Af&c&j literal 0 HcmV?d00001 diff --git a/gfx/tilesets/whirlpool/4.png b/gfx/tilesets/whirlpool/4.png new file mode 100644 index 0000000000000000000000000000000000000000..2175c5957ea414c68440fd8a80cd4b48e58c02a4 GIT binary patch literal 145 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2U{GLUU|?Wy(5_p{z`zjU>EaktaZB`sAySaT}#{mLt z4>l?*>S_jbt<7BUP0(!3AzlgYrHd4u>{_{BEd1d0E+(b?SgO|Pph4-^|7So>zfJdd46PwQxHtC(?Ssk^l` z|I$|%eD)QGltrAIv6e4GaKlx`_Z%}y3m;T2x^T4dcCo8Q*Vb)0uQ+bs-g`}Oo4apP zxA3;~eS5YY_1yk^b;xV4P17nGPyf+>ddo?3)}i?-Lz9U@6I;G3! z;yVGJkB1xB*M4ujy)Z~e^t+4S#}ysl9q%5NPuk-6RlMN2rkMGjk*HYYhDGsH z-K1*f1zopr014LXjQ{`u literal 0 HcmV?d00001 diff --git a/gfx/title/logo.png b/gfx/title/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2bfff59c9d8d4a188e2df4c35c5bc066954e6237 GIT binary patch literal 1044 zcmeAS@N?(olHy`uVBq!ia0y~yU|7Jwz~I2dz`(%pDZu&?0|WDIPZ!6Kid##s+4etj zlVJaF++v#2`YFB}FXwmOx#Pa!;>%x=nQgjCefbkYUX)z@wQY(2T*1r>IgV4!KJW%9 zb_Gw#-nMX&<94M7C;v-IuV-}KC{ogXyE2bVSan5|XD;s->$N);uW2&7WHdpv=HZpdmgWTeLQcU+liTyn zjs&EuZjt-cdDHO8o>hmlUv)`Lb7v_yd)52W!?x$0d&;AxP1s>6`P2Eh!FmP55FTT# zg$~8*3#N1L@96H(&1ckn%oeJ!^~tk!+8H%@Pmat!XJEy_zgW(Bp;m;%J*ku5wR3o@ z7g}r;VcZ;Uky>&5JG0iOrZ2ZqY5T;oZ*tR?jvG^g zufMQRJ{l_faF>kb^y3%*@N<0Oy346zXC(OjY%9~fh0i?hX6$d4dnci^xV`SY(SZfm zA4`QW|2tcKm|dIch~tr!`&fDUKIHy=n&eTVa6z$f&kc^8lD4UGS)AEB9yiB0-dlEK zmc!E<3?*fpe=iDLQc_Wv$f>gH(Ytlo5g$6upGLM^{MhqQ{po&@sJTv^D=fq>DLoPW z){xV8@RH^eXT9Bm{rndmEKGdMBb(OpFl*|(LoD6*xpq3A;9@f}Y}mwDxZS5{(M#Tg z5>K?!SnK?Hb~I?s6Z$9kE%RBomX5Q^^xot5q?r5Gx^h<-+?uJqaB0b@P%{O#mHRe- z%RHMAepr3oW1dISTecPR$8rW9Rz0GiD!y%=sr;th>U(A?*fd^s{_`ny1?SwS>SD6- zFX!F=%WS>%r=-svyUw#u3XOapmDo%AFZ*awSL3sGuK7c&ZN)Kf{f?!mCAZBjG=Jx( zmRZPF`1szDyDI0hXD~$FoBH%Yz~NX<-#doK`VMQAvhueFGM|%K{%(@v5rL;=7M4xb zKhk-*dw9Zk-<|Pr{SOOC^?j23@xkK9<4fw)5|e{WYyPc#I^Vdy_MQFz8}YlI9+#Kf z_v-N8e{XB+O=DsY^~-NteK6y7TXc+^oE+QY!x^R}f1kG-|9JTNyd0m~_rKNhg$t&C zzM4=fSs39Mvqt&R=Wjg!K1D7*wl?}x>e+$^4?n-)+4gSN+xY7L45jT()6InSvO(G1 M)78&qol`;+0OS<&EC2ui literal 0 HcmV?d00001 diff --git a/gfx/title/suicune.png b/gfx/title/suicune.png new file mode 100644 index 0000000000000000000000000000000000000000..074a8ebf7e6ce9a1c70122baffb8fc2b2ec743cc GIT binary patch literal 809 zcmeAS@N?(olHy`uVBq!ia0y~yU}ykgCI$uuhBZ&swlOd;eeiT~45_&FcDiHNT?3vr z)>~7AE|~5*!^l>%Rc@)f;M}`8RiYQS9^9&PbK0k8d&6IB(&sts{mFHbZ1jKm41c~I z)$K100~qC*nLfxoaA#oVxW^En#Nh79Ai(_A*fxmeqPEz=Y2WzjvKT6T*2k=H>Ix`i zdU1e*eYM9juW47Z9&9>%b3fBB_JVTr22yEzxbDW=g`g$6dTiF7a2es!?SU>%a zYf9+v_*=*xk*@J9p`}>lLmoo~XYHGOWpiFJF zU<;Wv=MmSDO|lx5Gd|9Yui|{}qvKF?;j7C@%^z$L(dXw)-Mi$=sh#HQZ!AuX@2O?a z{{3C^nzSjy-*;@k?h3ADe&XxguEqDgJa85NiuGktyLad{NZrm~xKYjK5R-}GI^Lem zY%!W9DU#RJm;B%x$LBu-vh5pk(;mMCHc)mQ<=5K5}ANA3m`KzYG`KJ$9 z_cZ)x@W_3@l@ZNw=eFlMhwF{E{G1~2EY#h1A|n}QO5a*E!$cy#i?333Ip*Sa)c%M@H#@lf8+ z+VHo)(jEO=&sg6$uT=G%W4%$caBpGXy`P_}g+AX~UEg#6`4)cp$TtiB%K5JlUb7=- zL2pAd^TbT~G`EnYG7L4V-mX|1)={<=-k048B_n}w!LM0 zCHd$(>x+He@@yqP86^A4*e#9)d1;ocTrZU{gPYIwm9?!um*tjE!jHd+-*7wn)_cZ^ zeI;28d*b*sTcT!Y%##??????????@*+,-.DE \ No newline at end of file diff --git a/gfx/trade/border_cable_top.tilemap b/gfx/trade/border_cable_top.tilemap new file mode 100644 index 0000000..eab0f6c --- /dev/null +++ b/gfx/trade/border_cable_top.tilemap @@ -0,0 +1 @@ +?@ E \ No newline at end of file diff --git a/gfx/trade/border_mobile.tilemap b/gfx/trade/border_mobile.tilemap new file mode 100644 index 0000000..495e01e --- /dev/null +++ b/gfx/trade/border_mobile.tilemap @@ -0,0 +1 @@ +?@ EEEEEEEE EEEEEEBC/$%&/>??????????@89:;<=DE \ No newline at end of file diff --git a/gfx/trade/border_tiles.png b/gfx/trade/border_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..390b107fdaa0cb3429e12536ce89852fd139c1f3 GIT binary patch literal 542 zcmeAS@N?(olHy`uVBq!ia0y~yV6b3dU#_P1H0S*NIq&^j>F|fkiZ641WqK64lwV0>sh)Gi@!rnW(uaiK#(&&) zc4yWUsX07;b^T5nZF18;$UN}jaPhK#COcK>lk5C@DOGWY;(T>DPF*=trXYT&H1L-` zN3EjS?|)rO+njQYwXPVR*P2&c6j*qKUHff!qRox}Cl9-yO33iL+@IOHZVbGrrn;8@{`wE^pQ;~Oy!h>Ttz!)@!-ab9$geoIbNcVt@QV&hC&Zk( z5PL>_&%xWXm)-T9;x&<-3^v+M3>#n9YH}d(Kt@YvqJ zorO2kHruK3?vH%GUE1c&-)W0Zn}wfA<=Cw|@7i|OjXEDKqZ7XPd7R{4Ao7TNY8<1e z!n=;svpzTN;jt3w%`Ic3IOT Y#1MU5r>rNF#}{O(r>mdKI;Vst00ieIF#rGn literal 0 HcmV?d00001 diff --git a/gfx/trade/cable.png b/gfx/trade/cable.png new file mode 100644 index 0000000000000000000000000000000000000000..d06d8a877e2d14d439472721a93433a39dc96649 GIT binary patch literal 100 zcmeAS@N?(olHy`uVBq!ia0y~yVBlb2U=UzpU|?Wy39JNB+MX_sAr-fhfBc`%*zwPx zfgxGLSwq0pa81mdKI;Vst0F#0n APXGV_ literal 0 HcmV?d00001 diff --git a/gfx/trade/game_boy.png b/gfx/trade/game_boy.png new file mode 100644 index 0000000000000000000000000000000000000000..3fcf9c224433270068de7572fe895dd3bee9c65c GIT binary patch literal 214 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{U~ph!U|?V{{=M0nfq`MJr;B4q#jUHCFLE*) za?cHs;}m zgUjZ4(dQli4n5VLw*Sb(6-Hk3G;WuC5Pl%?i`yaA>tDbf*$Ywui`Z>^wZGO?HBM_; zvFz=|#U_1vw%7Y@E{aX+wR8-cwWrt1LUDe_lhCxMB`>E1=C0X4?T=xU@#E7o-d=w? Veg4{1tDPVRd%F6$taD0e0sugiThjml literal 0 HcmV?d00001 diff --git a/gfx/trade/game_boy.tilemap b/gfx/trade/game_boy.tilemap new file mode 100644 index 0000000..5f77212 --- /dev/null +++ b/gfx/trade/game_boy.tilemap @@ -0,0 +1 @@ +12222345667849::;8<=>>?@ABCCDEFGCHIJACKLMNOPPPQR \ No newline at end of file diff --git a/gfx/trade/link_cable.png b/gfx/trade/link_cable.png new file mode 100644 index 0000000000000000000000000000000000000000..64eafdfb010715b27c120f00c781b8556ef97493 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0y~yV31&7V9;P&%0{=Y-{^JUxAWbI+W!MQ-O-*`KO9 z+9#{w-^;dk(UIHIliy~D-7$@rT4)rqF6T#kVoiO}hZ`4rUZ?t(254;-IvFD`p}F8* zOu?+&dyfO=?ma9#LneW<{~m9V#-8{mCOdX)*qrkw`bZDYBCi8lK8@!-W<EaktajW$FM&2U| zJgfownToNGUv+I@2{v#lI`n&j#~Z08@ACKE w`lC82tP|seekfc@*|bDjez8^i=ehTPF|yXp_?72S^cmzbPgg&ebxsLQ0KjNY*Z=?k literal 0 HcmV?d00001 diff --git a/gfx/trade/unused_gs_border_tiles.png b/gfx/trade/unused_gs_border_tiles.png new file mode 100644 index 0000000000000000000000000000000000000000..d3ac169fcc74601b3c4acc108b4f4e11f5ca38aa GIT binary patch literal 175 zcmeAS@N?(olHy`uVBq!ia0y~yV2}V|CI$uuhW<5GtqcqdWu7jMAr-e&dk=CRcHm*z z?&&I{c76dDpM7X+VXC-A(>%3Mjz}xx{?x?jjxGOpDWNp#xtC>5iUBXf^>2cQU>4mmy>vrqiUv|3u)u)dh95RV1FSRd) cFIm5X@tbl?;Kb+ulR+-=boFyt=akR{0JX0};{X5v literal 0 HcmV?d00001 diff --git a/gfx/trainer_card/badges.png b/gfx/trainer_card/badges.png new file mode 100644 index 0000000000000000000000000000000000000000..4e5820da8e54dce2a6789c999c826570a326e57d GIT binary patch literal 517 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznVA#OKz`($eX|nPY0|Vn3PZ!6Kid(f44`$tV z5NNB9HnrGiarCNffXbuVcBR=i4Y4Y^rGBlu7F{#`a^VvD2gPX~HCi{guGzI3NaVzR z(&{S~%}EdE@?_q|C%^jc%>48;MaIs(0=Zi%zKDkvd}l2yDChqDTJquTcN{%E4@9=_ zDCknN^V->}n98;@-+M~Xg5Ks2>?eXRyUsI-*|6kc<5IPURWBBvu9n~McrV|l*9)WB z-nZUw%i&F3swHzM(cwfsM~-G-$CZT%j%kW{2U;SgUD*H2q5Z`Jqql`0)|}!I+Avkj zXX5?y;wK(gFdkd{H2P|G{F0je9vk8`uBtkw`MsQ+<9f+L<)wyfg1Cy_no5&4*WENdyrI;zGHvMYcv%?4OE$KOwHR)*9 zq@@d2-I6%}-a9_@$>nCN3Z)tLqIGjxq;4Gh`#y8)tKRpl?JqSmPILGDlDjf>{*|Y9 dCtC#Fw`ZuGQ08j(=`bjMJzf1=);T3K0RVa5^|}B6 literal 0 HcmV?d00001 diff --git a/gfx/trainer_card/card_right_corner.png b/gfx/trainer_card/card_right_corner.png new file mode 100644 index 0000000000000000000000000000000000000000..fa9aea0241ada4886886a4416aafe7c763dfd8c0 GIT binary patch literal 90 zcmeAS@N?(olHy`uVBq!ia0y~yVBi2@CI$uuhSgVoeq&%@Q1ox)QA7thyU+qXbs_ME$BU+0n+5@>gTe~DWM4fee@pI literal 0 HcmV?d00001 diff --git a/gfx/trainer_card/card_status.png b/gfx/trainer_card/card_status.png new file mode 100644 index 0000000000000000000000000000000000000000..b33bb20296833ae7103cf3e2d84276cca8d0b53d GIT binary patch literal 121 zcmeAS@N?(olHy`uVBq!ia0y~yU@%}{VBlb4U|?Xl@WI-Ofq}un)5S5Q;#M+8YxDpA zlK+$$RnEy*x7nZJG5f=FY(D=DX3P2i>)DvACv4(BBf!V(!KT6Z>_2;<-G}BQ|35VQ ZFfj;dxyfiY^ZWyu>FMg{vd$@?2>|!{CCC5( literal 0 HcmV?d00001 diff --git a/gfx/trainer_card/chris_card.png b/gfx/trainer_card/chris_card.png new file mode 100644 index 0000000000000000000000000000000000000000..977981d41faf2b8804002665f16d2f37741851c1 GIT binary patch literal 412 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V6b3fU|?W)@cC~y0|R5Sr;B4q#Vy-QXT1(P z2(W+PHT|~3)H{lRlK-J^L5>33WF5Kw#}T=6L;;Kgy}3ht;WN@gK0 zA2fHVIZo(I{-$l&BA;kv{n?*mnt0&%ZP_!Erc0hPT-wI-Im>g6M3{{C3n7(|&AvrJ zfg($0Nu}|v6kPUWOI2-lT=Y8ssM*U7zjl6oL++3D#+rXpwnG@tpa}HRnWUM|1ebA3rX5qASTq@R7Hxq$TUwq}HYX?idE|ziO}PxnT9` S#M1wuVE1(Ob6Mw<&;$V7R;%Rz literal 0 HcmV?d00001 diff --git a/gfx/trainer_card/kris_card.png b/gfx/trainer_card/kris_card.png new file mode 100644 index 0000000000000000000000000000000000000000..2ffa1115993992d853343986d70607660a572dca GIT binary patch literal 414 zcmeAS@N?(olHy`uVBq!ia0y~yV9;P-V6b3fU|?W)@cC~y0|R5Kr;B4q#jVs!hThDE zBJ3ZgXjyQmdlU-tiC^?{-|dlk!gKBG$Xj|!JF?ulcZr-oy0&0;v-ex2T=D%*Uez3Y zw(QzsT-#SE#8^7EPr0#AW%~@pKNWjgj@vuhL~)c|4&(W;_|awNU>DI|j!jN0UvT@C z@yFRXmcL%|MR{h9=&DT%FWsAvviJc2|FSr?O)Z7HWSW!b_yuOMzvK1r*uDNhx{mxg9INrJ5@S@|GEzftUWGU`;hxZZ-OU+wOW{ITMCfs;^yyM+L3zp)! zx0E!_=uVaFo0Jm2XZeq8_a`Yr7k~AwSb1gUT3c-;X3bg0CMBugo_OBqZG!8(92I4& znQbY@c9w{od|-d`LYb~%2ba4!+xD`9uF-O`} zqE)?g&WgaJyKb6_?)%X&p=+gu$cdFDIZ@NOPrR;j??_(C(z@3~++u;!?j>SjSF{?B zta!p8E!0$A)nKf?{1_*1qpPTGz)CF-j+Uc|vddStsMY#-*={ztb$R)A>-+nDwlCO! zEoV~e2L6g8D)*-MCwwwdOjT*yw11iB&I1#cXkCVH&>v+m*EBs0fL8EHSVA`h0$ zQ|V~D*ZoJ!#7D?Fo8jOISAl;VWxA6#v?~hrCQgW6|J7V-$CM7mvV%%fH2e)G8Y--r zd9b1}ax#9+7rFxcU7t_{3&qm%l{MgO6ONtd@?WR z($f61xF>Ln>XKWGN0$q zzt;NTWq+rF56XX3qnd}hnRjaOr=4rY9vN0^1be`*viO^p6rl&>AH@y4hz3r386TeG^7w*lmPk%iv>{X5u z=j+{1Iit6h?4P$KsPJJ!_)M>Fb5tyUWL?+%-0h>fyUbMB{&Mefqe%Dad9kNLiVsCa zFD!ifv!eNVcLrzEgbgQNX}fz}(`IsBwZPzzu;EXWl^qA-HmEW&R<2i?@aC|y;ivga qGUS8~PP1A3U-kQb&96Onf7p+e|0$o9op=D0>pWfkT-G@yGywp#1;=Or literal 0 HcmV?d00001 diff --git a/gfx/trainer_card/trainer_card.png b/gfx/trainer_card/trainer_card.png new file mode 100644 index 0000000000000000000000000000000000000000..88ce35bcae00020ef9362d09a3bd5e8f889a0c75 GIT binary patch literal 135 zcmeAS@N?(olHy`uVBq!ia0y~yU=UznV31&9U|?XFQ*Bkqz`)?=>EaktaVzxHM&1So z5vBk(gP*G{8nP#7uivja=XmTo!@frh9A<7^(;XOga@$m8G#+|z!t<7f2=3U$*YHf zfx+Eo&wB<229}Z_zu^D>|Nqa`aI0isVBG5I;uunK>+Q7LMTZSITpIuWukSn3q_;6S zdH=Rqp0_-UdJ@D{CjS50F4hn(aOREXs|g?93Z}>SpL`-zfAHY1WgnToNG&|Yx$+x( zSCt3LWyVlf+tUIY)*drFU)0z6wRKhFoXv9Hk{iz$N*y`uS-O}(u5su52Rg!UG~+}? zV;dW{${RUul?$%>omVP$P;8^^isBRfb-5*VGb3jOc6V<&)H_YEx@jTDo~`SOdZsVA zXreT$ns0mP(wmEPuI$g5`(;*TV)RB)^ZoO0UlZJv*^)h>$yZ?C$!|MjPV46x&7LD! zdVbN|;x)V5Zn1pt`mgf4A zS#!2`uLxC(>FM}jvguyb{Qrkuxp4)_J>K*xg8k%1)kQnsd#0V7w<+L>$rC-@=i4u^ zd2z~$So>Aw@Lzmz=iy<-;}aw8)n>T)|TwR{Y)p78G6o#$o0dj98RUa0(%XFmJa t#BFgBr>1Ye$y#Y%S^B)XFjQwf|4MBRC%w?;Q49t<7zqH3oQ39mG z-(=HP1_lO}k|4j}|NsC0&((0NWME*@^mK6yskpUu+S{@g0}hweXMgYSWODW~S$DF( zYTNC+>(U87COrPJo%=S+#s9Y~7<`uT-7t6={_zHb;FA4^{co~f*6ZY5p={1`DzJ6e z%ayy+)2tN&%%dlICoY?>=BIMa*~U|(W2;klkm2$fPt>nxb!WcuS@{1~$>${{zbfk` zdiKAG4w;oFoY9b|De31{t0tBo6C&JDU9(Cnb3?<<28LNW8Tn74PTqo5&zBzL=*gbxacR-MsRutK=8CyZ@KN1pXCz^?h$pFbSLK9bXDlBbomIj8 z?$x@4n{8V4CADIz{M)1truF524EpRk&vB{9J@tP{p|aJx5587ZkDX(vzEG=BT6{XQ z<-XaW^J}^{ac=RNwkpO?eNEGa&rho?3~i@spE&=fbYtR;&sK7!nwI7lswUL=ooeFS za^}_L&}|hfBt`2?Cu}gBy3lQ9R9DM{Hn(LP+~=>Hz-+sm<%zw7d~}+gz*BX$W>uF- zS6A*`9eQaVXQ4njPs%*AZ%(~`8oQ5(b{3qp_rE3?xg_T&_nt>CB^L5mkM*6-N_+K4 z*_QRh-KQHbZDHCe)~jPspOeax(`&2eyuvSR@6~z2KhLi(#U}WAz)?SR{L#CagCWxXX0(T-|B~&95gTe~ HDWM4ffe$7| literal 0 HcmV?d00001 diff --git a/gfx/trainers/bird_keeper.png b/gfx/trainers/bird_keeper.png new file mode 100644 index 0000000000000000000000000000000000000000..de938ad2bffceb7b35fdaeae14627231261398e9 GIT binary patch literal 489 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9xwZVe&Nw z28NRcr@I*#7+6Yz{DS}g|NlQ%!>y8mfw9BW#WAGf*4k;@eTNlzTt1%p`+iSC^5i9+ z8y35YW~s)p|B=jiJD)vCi?591kHQJRNu`^NTN+Jk9EwHEWg@;VXgQ(2u2aJ^vA4K@ zgqH4hOu6`wrKMq0XJsbt!C_bI>wIxVHhJAL@)VWs5UbZG|1%4tt;%nOrDNIm7FqGcH-a(SDtbR!QenUBsuWN2fZ9^xx=IW@vz5j$3i1*zKHE|Yi;&hyP#p?O1Kozqp#%L|$b1!YU3zs$T z-sIX)WDwdz-_~MWt<7f34anJ1Cif zfnkf!i|q^y3@jx6$|Noz>;a17Oz$E19;uunKYi(Hfq$3I(m!JIq|5HR@Vd(X9 zG38~|*QGcfE?oNOJ?r16=?bjJ3U`}bh}p=@@Hg&qjz-~?fbTopgdZJi_-^y^-;45l ztS?UgWHoOT?)P5sxQX>n$Kxiob2~ijVlL|EbRMZ#@mc!xgk3s1^_{`lUez0lS;EXx z4ktZ1e~0tF@`kl5o1EsBE)V&+`q`}GdU>Y8%%_suzm=cbx-k3yMvblKPld%6KAnEy zXv;jM(9qru&l_h3_vozVD;1C{Xcd0+FC`;!wdLvmoGJS<@2yHR-B@Xo9)G!3>CCZp zt4^HG5VoBD;ks?|)lY$2n%bz-yNYyJ@^ZR;6^}e|1t9`ri za(9hEkL8x7O3CZDF;3eRtP;Ld>BK+Rm4-f9AKyeB4tV(OK<3Q#F|Se`4m3+AH$VTE zFI9GJibS+iV8AmKd)_aCeL*@w-XA0iGm^b-?_xc3>+0S~)tf3^7&pHDmJ(TY>!8X_ zj)!-CPe>H3mNplTOc!3geR&DDMa3tJe}+#M`!St7Q~hDjdFjOClY|*W+aIe5xLy%C zwEPw4jAc&$4@^FHd0+GK`fZ!@a^K6fWm+8nx2a-AjnWd~I45ldqv*8mZ;^~M8~Ppp zUwF0EcdBkcp>|46TX^YB!H}{&q0-J@luxg2+|sw< nukYL|?Q#0^&*h6VHR}UvI8Xndcyt*90|SGntDnm{r-UW|vT`i< literal 0 HcmV?d00001 diff --git a/gfx/trainers/blaine.png b/gfx/trainers/blaine.png new file mode 100644 index 0000000000000000000000000000000000000000..1afc558fda514083c4f83180faeae4e88d0f3914 GIT binary patch literal 431 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9xqTWmGZ) z1H+qDL0=gd7+6Yz{DS}g|NlQ%!>y8mfzi*?#WAGf*4b$X`;I8^I5+?O|9_7F`>9mZ zLjJ`MFTC`yQ7!bzIPzZS+*c;%<1uz!f`&q0EgL_0ylY7FNV4e;a|oMfccS&9>$=I8 z4vVB4IrHmZ&6MtWxct;j?vus|*JkVv@14gu<4Wb$6QN2ud8@QyA8bv|J*VfCKh0pX z@@nBX*H3;f&dSj|J!$ewxtF)QBCS`S_`9AnE${UG)m|;kd|Mf-V@iW-M2jkEDL#jaD!@t?&JXr(s9TEfd+*;?F-N+%BGS(`2>KyXUi3zWU*OoF}&+ zz9f2ee@5Pkjsu)G4ddqam-e~Zz0Is#ejrpvCLm;z$-&-D*?WX1O6xpP)~LR};Lero zC%oI*Q>0A$7aiHiW?8ZPmi*HlN^PFVdQ&MBb@0E98bTmS$7 literal 0 HcmV?d00001 diff --git a/gfx/trainers/blue.png b/gfx/trainers/blue.png new file mode 100644 index 0000000000000000000000000000000000000000..76a1e81afa9f6dce97c717b48ef8607c003d380b GIT binary patch literal 430 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|Nod%vez62 z28ONL?#~z)7+6Yz{DMK^xf*Vj3=E9Eo-U3d6}PrdJDJC9$m6W~@&Esww`}G<3A*Ia z%d+nW@74?5H|=?1oIY@GQgCTLq1f2L5;&Rr(#mNufu@&Y1Hzt5xTx z>n07W)BJN*Yx7Kgu_+;%lRKNIeaYQvZ@*8Hyz!FfVnW;NUhCP3SGT6=C+$02ICY_D zSb`&i_Kkz8;(pRH!LyEbbKhHGaj5gs+78y$b~e`@>4zH_e8ord#jZ|uVr)?9Gjb~dtI{w1^9jIg^`yAOz-IQEP2o#28P#o0@4$4<&% z@9<>uUm?`7_*GJ=j<9pFo~K=cw$=mA(6BqckCtl0J~ei-=ubZ)Z4y~nc(O=8p!)fd zxCyh4=4Nwc)NS4yc7Dmyi06x9W;r`lgze>fmhF03bh&7n_}lr%r{v5@udR2u)w?^U j_W8c>*Bk$Be8Qf5oW0`TH{~7%1_lOCS3j3^P6t<7e{7CrcF-IK z28M;7S>`b?FtC&a`33*~|NnokhFc{A1LG4<7srr_TW6<5Pij%%arJ!n@4L-2PltsU z*FQY`YMIS5$0FzK|Cx^0#CuX7N~^7YV^s0p`QR$gDbJ0Ur@3u7(ye=Z>K=u6NBGuo zzuIxD*{X>*TqkNzfVskN>1N5rENcIG%mj8{IWT=@%8{KN`=dX|DOF46_HUfCNZL-v z*2L%amODEllddYvy*1h3%?;btC9hUE@H925JWy0;5S(ecDB1m}it)`ul?`P)OSU>& zXwu2IblJFLcWLR6gb2`Z)8#Hzc;2&@nA-IiRX$$h z_)14iqFvAJ_3`XRyTn-Ey>m}gF*UBUuzb5-4N;*$cx;935{RczA2m>)XCjJy+(P)7&eXc|SAjzRy1ogU_p_ q^UQv~uHG2_z5RB{Z@0bC^%vqepBYTgm1JOGVDNPHb6Mw<&;$T~P7JO9 literal 0 HcmV?d00001 diff --git a/gfx/trainers/brock.png b/gfx/trainers/brock.png new file mode 100644 index 0000000000000000000000000000000000000000..0aea8a946c351666ce3823f47cc235547d4968ae GIT binary patch literal 409 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9whvu_Z`_ z&82-p3=9k`B|(0{|NsC0pR3_k$-uy9;pyTSQgLhTwAbqn8Speq|NeXbr-`4@4@UP= z*CQ7ue499Xa_QRp(%;#?Y&6-SaQeb@MyA8h=5q4AZsZcuTbX{6F6Xq-1FNr>EF{EPa9@&&tdoWExLO7)TFDmOT|B(`h3ki z>~rC~WVQ&V?@vxK1u-l;bJKe9j;9{#e;IYkuWdSIvh|#<-u%{wRS6ONp+ykL9(+Ro31|LVWtm(*h2uzp^W RECT}rgQu&X%Q~loCIA++yi5Q9 literal 0 HcmV?d00001 diff --git a/gfx/trainers/bruno.png b/gfx/trainers/bruno.png new file mode 100644 index 0000000000000000000000000000000000000000..c8a003eea79e90a837e1f946afc89ff6c94fadad GIT binary patch literal 636 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7f37FlDJYqN zfkA$9aWn%114~JeU-19`|NrM|xK%PRFiCs5IEGZ*Iy)_L+G7I_*N1!mzTbINMNxI# zq}Qvb9>Jj-<6mHG6|!n>e5BQrsS^7Oua)P8{{CTJ5|`f4rO7>)dGC3P!jzn_2UYJ6ZZr{( zYiRnYd!fAY?OfKTiF>AJp3^v)n7-^+?X2kwzkg*+dmziKH<|tN;=pqr$6x8M_`7=2 zJ)b<8KY@P?Q*$~Qm!7&|@@VD}k;zv?9SzT!{dSfK(lI$Bvtf1``~2XN6N~jqqyNdv z|5U{TUEl;*Qe~|X-(*YynXk8tn+Lr#P#M~9`y9#GXR!q|Hub6-G-R{DB zerNJacZzsbOKjaOvNLzq{;k!DhXvLqJv)DDdywN#25;u)y*}?OHdZt7ntWpT?d2F^ zRhZpg)L?se*HZV_w?aQLZsEGBudwMt@{i=QMxFq(waST^GhQjJ4SMq?smI~jhu<0g z%6m?3T5{PTT>a*~^5Bt<7f3GLVFlY(` z1B151xxEYw3@jx6$|Noz>;a17Oz_`ZK#WAGf*4wb#)0h=GCO`TAzw+s$T$kJL z_Puf5n10Jxs###e(weu~|8GaUHDLW@@p^sb3?bP`j<2;tv^|!kNR-Pwuv6V3}8acM7ijNaW<2eb)L*j+Mct z9$&q8IsY~H&6mIb?Muws^biML)w@^sO>FP5x>&SFbNQnqa*O)k?RwPZV{x*v%4}7H zD8KNE+JeM4rvej}Onfw@^y|cnO==OU%LBLlh>^If?!03EygIX;_a#cN89lBvu-l^h z>dFHjE+d=Vt$uD!XZBBC?i&(o@YP#lHqSAU2yeD|0`CoiJ0BeLFyy`JJ2zD9!OXzL zi&i_nGp$U1a?2`3^Cb7;qjek%I>nQ7dQKEKYGk!sI>p>+V)C|Bzw7Fj2bV(D*!NFA z!g}Jo-lB&mo*!7dySDAOZGmf?-er$TrRLe)HOG3UPjC}03Vm_sP0^u!cTCLlB&4gj zKTkO1c(`*@S%LKOj*U9+cvG&NemSGRSoDiMzrMs;g|wBgg7(=dr+!&p_j(`e9od%; j_b+e$<8!TkgZy1)wo?br|8-+vU|{fc^>bP0l+XkK3oY^c literal 0 HcmV?d00001 diff --git a/gfx/trainers/bugsy.png b/gfx/trainers/bugsy.png new file mode 100644 index 0000000000000000000000000000000000000000..8b1f89537ffb3e373ee5698866906fbae74918d9 GIT binary patch literal 500 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7e{D*2_F6** z28IfC`#1&$29}Z_zu^D>|Nqa`aI0isV4Upf;uunK>+Q7LMTZSITv&hq{~xolA;o&F zW9^Gz(@yF0Pbw03E=m3~f4>dahuHbIr!QEldHxewmS9`9nUDYI*sS_DXH#FtzP(K=tkW$r7OhUcn7Q-r^T|(rrY1kVEV%Gj z$)lp^GmDojdU?a7@8S(cW3!mEfsfg?#4(1M?`^o2|NZC(Wy!9K#q-j*r-*7U;<+IA za*l7SxPY&~8Lc+^^i^y(Z;B-}Z7h2w_uz`RpQ}r!$Ai$qX)zCa*(zSdE!|bga@$Ai zmRiPEhil3Cyc@oHMIUE2$(EXA+4pDaZ`K!&cgiX8#&6v8b=H|BuICT#xn@72^Lg{V^b1ttHkMp`RyCCI(xe4%|hR?@vI#(JYj z)FjSj|L<7UUbr5@R}yTrhSPJ4>U9ZiIr-=(dRA3m?JeR(gV@VUZ>St%U|?YIboFyt I=akR{0Lf_F_5c6? literal 0 HcmV?d00001 diff --git a/gfx/trainers/burglar.png b/gfx/trainers/burglar.png new file mode 100644 index 0000000000000000000000000000000000000000..241eaa2dc2a8ad07cbb471077605487b02659033 GIT binary patch literal 478 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|GdR3S#d8& zfMZcT0|Ns~NswRg|NsC0=W4iBGB7aKdb&7rKUR21UxjC!{wN*120-{=GT*n5SdV`oGD& z?m5a^nco(q1}>31a_gy1t#$ZnXOp8Z;`I-#^pP@;}8p_sa^u zjEYhXZJ!>)AF6j&Fh+lW#@anvAH{SO1CB)a%v<--N3_YH@0ojzxAbCtGqZShSjv$eq(=fYW9uei|1{SmG`@JSV~52 zMP@|cV=wd6v`Z_$H*^PA2^kB`SuVnNVB*DYYlV|5C!M&W#L>Hl|88VfcIJbONhidE zUvtf{J{m44{2;q}=iG)u{k-fy!cRg(EhFu_T2Jov+4Da5S)H@NR=?@VPoy`bT-~v@ hF@MJvspH?+i{@}>W=-E+!N9=4;OXk;vd$@?2>>+n&Ak8s literal 0 HcmV?d00001 diff --git a/gfx/trainers/cal.png b/gfx/trainers/cal.png new file mode 100644 index 0000000000000000000000000000000000000000..31a38cc5400d65fcb0e07a76f70a3617464ded41 GIT binary patch literal 484 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7e{M?hRxeEk z1_qgAkvawj29}Z_zu^D>|Nqa`aI0isU~KkuaSW-rwRT!$-Vp~5m&RTH=UxsdxjoY( z`4pG^v^8}}@n`-;Ds6B%-m#-=-t%rA#@+X-I8t_sm0YNOr;&8@XaRHbx`~?{&(y~B z?~R#q;E~rMZHoyz78r3P+~V|4eYCMsmNx>>mZTymCFPvR>ZiGh_GOJ@UO_S!w!< z3#mN^<{nyi!{oumD?W`kGk^R^TOoDiyXHL6@-m_YI&1x|KggmjZgd&_lE2R zyS<`{*Dk--PkZRQErv-7Pp&2N4CcxT<@6B{@aqaq5=9jHxZJ+|`3cU`T; rYIjnqtDg(L{N_JYgxN4Xgo7#KWV{an^LB{Ts5gxu8? literal 0 HcmV?d00001 diff --git a/gfx/trainers/camper.png b/gfx/trainers/camper.png new file mode 100644 index 0000000000000000000000000000000000000000..72e043eea14477887ddddd629570c56b25e300e0 GIT binary patch literal 483 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9_5C^*I3s z28P;&=I0q07+6Yz{DMK^xf*Vj3=E7-o-U3d6}O&FyS?p@0*}kdGyng8R^(jh%5RqV zQ|;FUt=T^7aII@* zn<7lFuPS(CrTKRglh<|cwNfwLIlLEqxq9#%?+4G#S(jxWao=6A-2KVoOsDeivIQ4n z-rD~Tte$jsiRMc)2bLRl4S)H$+tLiq>~!6Gd-jsofeYWwu;@tZD`uBkE}fy!!@X83 z&TL}ngu}tiPOD};@encRb312XS0>8bGU31D&O6Ur489gl7s}dK`QDrTBg?u(>7JW& zJ@1LW6WYRY##dW4_~S(GMZWAsXHRB-+hB1)^6rtv>W*Ju3fnEx2=%UQFkQRYlV^2f zui$^V8v4fQn~TR%%0+%h@2@NC$^`HfwU=XNadUAK28`^J(uNA21!{p~yVHJn&` z=8w#>m@5ajX*oEbI==PPGiH^EeWH8LRkPjqd={0Qd;gA%#Ct3Kv!84@O;+UZeq$iB p=jpG^^UWWl-=AsTbN@f1>n^rq->2<~Vqjok@O1TaS?83{1OVHX+k*fA literal 0 HcmV?d00001 diff --git a/gfx/trainers/champion.png b/gfx/trainers/champion.png new file mode 100644 index 0000000000000000000000000000000000000000..02494e7487fe2ba91068a3b07b82fa56e1ede9b1 GIT binary patch literal 617 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9(#OS}#oo z28M?_PM0t+FtC&a`33*~|NnokhFc{A0~3d*i(^Q|t+~@8r?nbzxHw<^_x+A!1A|oU zHu<|%pYpmEnr!)2GBIbqei_dXJ|Wq|D*I1-lThS-Q~pO~JInL^^^HH6)~#Al%es6P zx7nXLPmXL^Rx|O;>~HFlCax7vlgeite!2EV$C=edCq+LidUr`2-*o81uPNmmfF^i#>ovim3duGTe57wjz7$ewg%mr?A( z;#tewYSfjLZkQmfbh@%(~6UT4<>gyyo}TwF>nNy)~?Ndzx4tN#60a(y$K82n^gk zF=?x~a-;e|k=2d2riD+CUefs5xKrIg<)v%ntpb7Vi?8_=ZBLwf%~8(bPQ$l@pYtQE zRbR?(xp6J9sBg>JoMT+iTMqx7`y_eE>pL;-0hgWAr)@oJWZzhDVVT?HaPd3KcRask za@*&mrH~Bk@+X`*Uv<_k@lScWW!uGvsZ*Sj=jBLbmCrl+w%<1TLH^>}yE8NA`xpO} b{m%ZyhTrSalL^WU3=9mOu6{1-oD!Mt<7f377t*~y84 zfuZ8X!zBz13@jx6$|Noz>;a17Oz{Kt8;uunKYwI-bNkj>LrTx*c?#(8mgrCUUH3`!s=JZ6##NQ&+ZKo@i3Z$WoZ7s;>dQ8}+{8lR54D$< z*|4nO*S^DH8?fjGySw{@Vx7)&OI~dWIqJwb^bNIlVP)*(`AsySkSx?wJ-L+Wsc(~gp*@*?-k6%Anar|HNNsnc#S?Zo7s{fyueQlPfIp5@q+e0qTP>#QPIC+h%+wbBB zx=wm0CruOZpHp(h;cU$1m^lUaTz($R$(?sN&N=@<-;ur5JP&5=+5bFVdQ&MBb@07En%=>Px# literal 0 HcmV?d00001 diff --git a/gfx/trainers/clair.png b/gfx/trainers/clair.png new file mode 100644 index 0000000000000000000000000000000000000000..0a8ca2a58a468c741a65dfcfd1f3c199ed12d7ac GIT binary patch literal 566 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7e{V{%Q&bBB z14H^%%`XfL3@jx6$|Noz>;a17OzY$t)5^SsIHXxXU+1 zX3m>1xH(NziJyDzdq33;U5oa#rJRgNn95wm zc=RNjQ!q0xcVXw7-@Sr!qH1iUWPLiz)oy;8rL!h4^<PspAp``HxU8|(~- znYVU|_m_2@^ByJel^t9?o$J*5RLceBlNQJM`Ev%mdA0UsWonE2Exub9YEz}`)?1XY zi(cWM+rlBPzcVAp&_+$y&q6J{QrOzAao##J#r+YHuL{4WGV_EKO}u_rP-dfhf58Ro z3ug0UjHOcDrtg;A+OY7)#5+souJimD?e*@pMeDqMD*2y#H$7s1QoAVVJ`eXhmrwh6 z{_dHn@-nDjvd3wj%67|l58gbP@Wl9p$2R`LR~I(?XNuDQXT9!4z-i7ubBcc_-Dwiu znQc*4vgTlLxyi};f(hvX{X6t*ZdSc}aP6X##obMPv7xW8H11%T;2(dhf<0O(q5NIh zos9GslFcD(M^A4s(VUhy;mzJVB0KAX!!9WIzopr00__gcmMzZ literal 0 HcmV?d00001 diff --git a/gfx/trainers/cooltrainer_f.png b/gfx/trainers/cooltrainer_f.png new file mode 100644 index 0000000000000000000000000000000000000000..9547ba3776af71af22fc391e737db445336f0400 GIT binary patch literal 487 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7e{D+jRxb$# z1_trFJF6HN7+6Yz{DS}g|NlQ%!>y8mfw9fg#WAGf*4=5hw;fjCa7ldj|Nl>o1%{bD zFCKqfxOMf-BIypL|4AFyIKN?dx?!8egASb-)!csBO9%K;J;nUAuJ4&Dl5u|K-UbzM zHCuhwl3;tzRrPgCT8mOc-7oBUDE`8K^{cbt-3(3FC93_7IP_dv%zk)h%902z_SI{- zU1V&C(m7q8r&ubJzaro>S!WM0xp{f)|Um&#n0UAUSrdjw4&YOlAFLO*Ev@I@eI`r4a>h|#|=I$3G{O)8F z?=G}EIbA|jZ}kr548A2_o;yXKOOlLxeC(B>={2pkrQ71z3`+m=r3v$}&x!RfNHH)r uiMM#jS*K$1t<7e{D+jRxb$# z1_trFJF6HN7+6Yz{DS}g|NlQ%!>y8mfw9BW#WAGf*4$~`>y9XJxHSI!UmsU_EiZ^W zwBv6HVE zm9;OgZI##&&>N*T)70~#WZDCvprWP6U4QF6VEV4I_omPO$eO9I|FT6fev|*u`sw7l z4}s>M+vw?iPQl2vf z(bk(bJw7?{MpAEWX=9`3dfR07;Ch}*;TyC}SuOWC#vge1Qn-)XyUEbfzQ{bP{q6kz zQ0Cjy-|pLGG^20%vP_)|8+NU{m3T?)%a@8S1FPuJtGdR!*k9b>o^!{lY;w|(nGa-q z{NJ<9YFd1I>U5@iq3Q_*$s2BcU-^H3GxMfn->r|SRZJDUJjc!S*Q6B}OOJe$l}j&< wJ6Fwnj(zdFFK3_m7e?LfJCL_x`9k}*3G6Sn-EjTSz`(%Z>FVdQ&MBb@017?e>Hq)$ literal 0 HcmV?d00001 diff --git a/gfx/trainers/erika.png b/gfx/trainers/erika.png new file mode 100644 index 0000000000000000000000000000000000000000..9b1c282dd32e4b54a1edd3daa15846dc3f37600f GIT binary patch literal 458 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9?uhWwjFn z0|Wo1-SP|!3@jx?}5ywm4SU$wDYrpAy7VL1-DPgJO0>`a8u3j_U8S(kzqJvte z97<06@80NGIO(Te<1I(aIakhge}A{iqK2Wv_z??R!O4^Juby~vDS%a~GNEa^%DpeW z5!Rd7jvws1S#(nR!;e!Hf-?X2pS^2w>xg5zyz+O>rtKd!dEdN$!a7BXZI*a_$OQ%l O1_n=8KbLh*2~7a=w9qC1 literal 0 HcmV?d00001 diff --git a/gfx/trainers/executive_f.png b/gfx/trainers/executive_f.png new file mode 100644 index 0000000000000000000000000000000000000000..ec1419758b622c5402e41816f72b9920c55e232e GIT binary patch literal 418 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9xxE9L;0~ z28NJW^WO{%3@jx6$|Noz>;a17O!071d;uunK>+ZD3J|;sRm)z@r-}_W^pY?E# zdC1Kaq;kaDGEVu^d8RW8Uy9E7^c>;IVtf?Ev;399BkvpCPxMZ)K2N!`j>R;AZHmC2 zC3EK#J-We^m>i%R!~A^8{^W#~gyw?G))zMHQap}{m-tR!aPW6{?4W*lX+hs)mloIL z=UrZ_3>db_DDUrIb;CJ7p*Hxbq=hDsqI_b zc7XTDwuw60Yl9X2KKC`qcD^`Lejz>Z!0yV{ONwq z-Oo8pc6Pn7P-&m%M`MHe4OgbbVvuyFfcMDCOcQF2RpKJ8>Z56}r YME3prgbc4SFfcH9y85}Sb4q9e01UUa`2YX_ literal 0 HcmV?d00001 diff --git a/gfx/trainers/executive_m.png b/gfx/trainers/executive_m.png new file mode 100644 index 0000000000000000000000000000000000000000..e88db5a78c4f9a3918adbee899b163b700711cef GIT binary patch literal 420 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7f38QfShJXc zf#Ka%ZdC>b29}Z_zu^D>|Nqa`aI0isV089$aSW-rwRhTXF=j;$m&Tv}>-(7P%DSHz zh$V6dS1>&~AB!St?ieo_JKH@Q5>MUIfd@nOtFUYu^^ib|>WY^L}F7XQa|J(dfk; zkCRUuw7q3F_?4fCTcf_vI&8CEh9P5SD((>8_Bpm*(|F4N?F&L7jKzDq*C@A`Qt<7f3K(5Qu99p z1H+j=_f;4e7+6Yz{DS}g|NlQ%!>y8mfpM0ni(^Q|t+Uf^_Z>FiaB2MczkZ$MfljlP zy}!4t3|Tsic9n~7*G~>dwfm{RJ5|i*DK5?X=or6a;YXgQ%}KKI z8=qWQHA`Asa(>$a&)D-OE)mvkpEP1+$~n>$->?cwJ>X~j`&e{#2amUB*2Gy$5|*c* z+Om9g8&kN7#`70bQr6}AKHtI(IAuins zQ>8OwTg5Mme6_Nb*WcAAwA;&sb>{y!FMQ7)*6h6;Dm`h}>dXhKPh^rSC+6)~$GZGv z5YrAJwQ33j-$(^U32fn7z9zyCnYadYox+fM<@l9boY$O;$#7FP7ne`jY&`OnWW{YN&xY@0pz z;nu9~0iUo(5_YZt<7f3GL%oMtiu z14HJGE7uqp7+6Yz{DS}g|NlQ%!>y8mfyvm@#WAGf*4AmAd4~;noOM6_|6jRL&%1AP z8RN4>%(LE2-Nbh*`OjmepMBB?q$kbj&SyDZ!P~WmvD5s{k`IQfi=Mlv{pg&0^3=In zW~UVH;v!KS*V@M=UzHAR+EX}L=A=L#>kii zzPjqs^n2oRQ-@vKC$&yU-NZWQ>#`-v3O@F0y=;oUxh=Py*UM_`=RG0xDMOozd&+5> z$b)Mh*@mQT$iCjv{N{m_vANK$B)>Mk^|jjCSFYSSFegR2^X#=(de_5yg5@T)A361# z@7D34NvY@ZRt<7|Gg*MGP#<8 zf#KNmh>r{m3@jx6$|Noz>;a17O!1&G6#WAGf*4b&dXB`mWX_;C1zdX)Tuq*d_ zR&2)atNMpj0#EJFo$^hb=hD7KeYI|qXD@t@apWxi1U+p~ztfif^%q$K(d;Uaqo1$X!Rpp0YmG3+{>goHVLvfmUPV%d(Dz@I0OK#O$ zPtbm`yWMWtanaMR>#SlH&f_vZal5f2$G~g$ju$cKEWLdW`8!{p@=|xJ>Pf}@3T8pN zE@o-xpYOhK=*7!K7Z;&zLB_Kij}YA3O0lym#7 zN@`K`{Vq89_o2C^XH3M@y8~Ul_pxN!sj7cozUyp^;+re7S1kDwA}`hSIee;GKWmHP zRg=m;|D2A^I(kwyKPF#m=c7RV@b@PwC0+-wey@M}+c)OhQ#hPc*Ke7|z`(%Z>FVdQ I&MBb@0A9-x)c^nh literal 0 HcmV?d00001 diff --git a/gfx/trainers/gentleman.png b/gfx/trainers/gentleman.png new file mode 100644 index 0000000000000000000000000000000000000000..2ae2eaf1cbe322a0c82fac680ca25fd4f065026f GIT binary patch literal 443 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7f379j%d47! zf#Ioy=LQA_29}Z_zu^D>|Nqa`aI0isV2tu~aSW-rwRd_X-ys7Ym*n$*-}h`^qVUmB zm{Vzi=&NLz^@(fab)M{6uxDBqpV)%OTrFCihgWueye4Wt_vCM}w9J=>Ei?6Wc;_T6 zu=hL|bA0`lm8{=BSL@1|yzfw`*)1Yqc3t$5jO4VZY|OWAx!t^F&9$BF;mLM2^%*NC z@onTvIb}I}@rplZ!sApkfYu9|eR?e>d_fIFMNdb3R{g?j@%fo;6KI&U# zR~%CC?CeP<*McC1brUL-G@8@19N5zPZzhN@$?$QgV$$99{Y}}0$3jduPPXk#zHL-y zb1!K%%cgV({wR%vn0E)XkLsxl%A91nTfNWf_Oo4|KL5P5{I1p1_@B3q3tSg@YMXSd zq3XuLm98)ENIqXQck!*AH4Iny@B9<~@#`=5b`}nk#R}qw7#J8BJYD@<);T3K0RRa9 B$F2YX literal 0 HcmV?d00001 diff --git a/gfx/trainers/grunt_f.png b/gfx/trainers/grunt_f.png new file mode 100644 index 0000000000000000000000000000000000000000..8c69953f716dba655196c7fd0d081b410c25630d GIT binary patch literal 467 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9?*Q9787t z28Q;f3GxgK3@jx=Vxax#C^OGYCp>q=NCWJkj!nS<1%%tOH>R;Gg8^3(8x-HwJvhDE_bN5p7 z{UyvQ8QXoQGn(B9WuG0b8seva@UK+U=0|$Tu3V}O&l1*4&3&{QOquzDVbK-nOIjh!B4o%E_ z7vBAQqc39oXQ5b1BHzuUlX!bA*~|0xl=t<7|GuYssgouH z1B0W2@n;4G29}Z_zu^D>|Nqa`aI0isV9fP&aSW-rwRKvw*kJ_@m$PU7eZS-4_)(BK z^R&Nz@cQJ0mStalKM<{GeAr_#Yok+Jz@|dQNi&zQIaO|K+^+DSH|bsV z+sA(KfcvHgD|RkfK55OCNyna_RQ9|z+pwW~m6k_v<<+$G$)XXb!t?e`yt*dVe)gSc z*C@-4vR7=2e9rYA(-K`)w>YYTvFzoEB;AcmpB64Z@o|Z($E#feCQI%;QOaJ&5!S?e zW_#5AiJywDygqk3&3KFKmP7aNzuYCi%lhdq7(8A5T-G@yGywo*>eiY7 literal 0 HcmV?d00001 diff --git a/gfx/trainers/guitarist.png b/gfx/trainers/guitarist.png new file mode 100644 index 0000000000000000000000000000000000000000..2fac74bd5e9132bbfd5c29e0efdf014e2ee109bf GIT binary patch literal 575 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9|V8|4y0= z3=A>_U3VB57+6Yz{DMK^xf*Vj3=E9-JY5_^DsG*fc5xb$B9F7;&;Rvt9?=OQT)(yy z+gPtF@|3>SxAf2K?j!mVH*U&bsT1Z^?a_T#^x*Ni@SYUDO}DPqEScAEka6q23B8Pc zO}YQy>3-qzTf~0w+p@5UF=x-Q-hPxN{`BpiR}VC~WO6dwQuCSgA+z)iU{x9m@?WD`Bt5esfU)^F+dz_d3#)%K_8s8n$ z{G*#Okxg)yD$_laV~ZZm37R7JNBNE8EX&7xpSJJ$+U^x;S#T`i+Y+4%HzcYQx3iyq z@GJ85mp$SWo1a1G53F-xx^}zd3aN`T2FnBkxbjfBi?{-HGQ`@8*ZjPdk5m k@tdrikH6)wm0y?7_TcgtsFX2dU|?YIboFyt=akR{0EhD!q5uE@ literal 0 HcmV?d00001 diff --git a/gfx/trainers/hiker.png b/gfx/trainers/hiker.png new file mode 100644 index 0000000000000000000000000000000000000000..ff1712cbce933551d82c2213ed2d3bc26aa0b512 GIT binary patch literal 632 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7zqi^e+i5QY z1H=D+4;mR57+6Yz{DS}g|NlQ%!>y8mfl1uc#WAGf*4b&V%d!Fw_JO>CV|~jX>Fdi^OZ<5*|K-$k{gm&yd|Q9XYCozdo$UDg z!~ON|N>46Z{J+rFjXTIGsrXLV zI63W^@(t%z^IGpde0jT0W2NSWVz;eD=J6tiwnwztk6jKiyTpD!vF(vj&j0$>&pGrNZ)_u$o=au*9WG+p)&*U+$acX69s6p>aU(^D_p+mv4#_9NuB?4Fz%uec6f z;CN<|W60RC&fvs@Ekc*h@NO{=Gs(?h>)3YVRMxASm8o-|KHA7V#d39%%tNCK)6UDP zsJ}2aa%Ga)mbainKX+z=3#;)*8=IS+7L#Sz1759Wn7C-AWFNnP`Gua_u9O6HYWxK1_n=8KbLh*2~7a0vm@aE literal 0 HcmV?d00001 diff --git a/gfx/trainers/janine.png b/gfx/trainers/janine.png new file mode 100644 index 0000000000000000000000000000000000000000..4e041f1aa0d04d4a4218c11fc77487175a8f7985 GIT binary patch literal 472 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9whzwbNb( z28PE4pH?t1FtC&a`33*~|NnokhFc{A17o?Ti(^Q|t+&&9^9~zuw4D9;@4byh-7M8u z(U_H!m+cIi9rce#=0U~U{~z1g%N(!XbCN%A&hsm)^)J(fiH>|0W(F%_cqTdbG_P3Z z`s-hj@Y1C!hho1*#yq;ZxNY^ue~*%Q-+BDnrqrADr+LfCM@%fwcLe1qI2HdDf3x1V z^`y#HOZB5`*gK~t6}T0ZO!?LO`RgPz!9`D7WKIOUJT%u~2LHDj#=wU^H>YHjm=>kU zn0udEzVvLW;!aVoa*d4Zm&G`qF7o)Yca{H^JCEi)U!)np(KM6OUx|O8!@Q~a$K)1F zSnL1v+44i$L4GoO>#pACuvE=jpt1L2teoqEGf^*!H~;mG?M%CJ@!-W?kCL*yQtOnD zJ_odn%O2Hk@z+u~*ZA_L^SRzv2A8(k+Q$Xj?kv}HPTyz7p3{7Jdzkc4qFfcH9y85}Sb4q9e06at9P5=M^ literal 0 HcmV?d00001 diff --git a/gfx/trainers/jasmine.png b/gfx/trainers/jasmine.png new file mode 100644 index 0000000000000000000000000000000000000000..25a7a9b5e44e4bd0f4b2c2638140e59cf458b7aa GIT binary patch literal 457 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7e{D)oi&qo_ z1H6$|Noz>;a17Oz?k9b;uunKYwtAcrXvO%&W^kO&%Mqu>8FWu zP)-_`xDB^Kg8L46`CA6{lT#0`pF2a0W6_xdpTGJs@CYzfhJ4aFzso`U*sc8=4rg+D ze|V(ef0W_zAOB4Zo@$n}OwPagv)Mj#Vq)`8#$BmF=X}dV*2Kn(D&~0_J2f6wob|=A zWz#7Kqn!+^Z5BJ~9NfX@(zU@cCSkhFTM2D@t>U%0@w?AO_1#z+>N@Xkvi5{WyPU%^ z&&r9%uxa|uyvt_U^pk;Ss+O_2>|fd-q4JomFayg{J$O59)SgY{>g` zMCeJhbH43g{}0=a2N%q|KD{#5wnj+#Ti2%d?Vs58R3*h-xBGeeAAj(CHpYVt6JIef PFfe$!`njxgN@xNA*AdBE literal 0 HcmV?d00001 diff --git a/gfx/trainers/juggler.png b/gfx/trainers/juggler.png new file mode 100644 index 0000000000000000000000000000000000000000..90001c3ce62c2935dfc8d34f1dbadb26e4076ef8 GIT binary patch literal 572 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7f2}&m%kVz~ z1A|%G$7}`$29}Z_zu^D>|Nqa`aI0isV7%?=;uunKYwk2gF(yS0m%B56-?x-?$tia| zomIW}M^nS%r8aCHwVVG~L((u<0|+Q)>fPcGW~LS9?$=AWtF3b)pC z&i=i{dN!V!G5+0~qN$pz}Z@avxgL(2Lmn!a8kS`3pfMQn~v z%MA5oIUu|0Zc4wMu>LZp1**GptNYg8aPntmkjtIDz$&Goli|RQkLochp|?_IFR12i zT&ym9P0(`ry?;W*5|z5EPBP>ceOC~DSS8=~;Yi%OOe>AQJln*#Kj+u!UbSg`>j%FR zvTP?dUT>Uh5*2oHcWgTe~DWM4fejfvU literal 0 HcmV?d00001 diff --git a/gfx/trainers/karen.png b/gfx/trainers/karen.png new file mode 100644 index 0000000000000000000000000000000000000000..46081bdae5390e965ca65318d7b34c022321e3ea GIT binary patch literal 489 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9wjFS|>{e z28Oc3NfQ|u7+6Yz{DS}g|NlQ%!>y8mfw9BW#WAGf*3)T`lMWkjxVV1*``#vLvg+}f zjQ{(BQq?tWna?KmeykTi5k4U(cgpjn$M-4}-nnTuLuD3Q=KUKClDm{rQu)u+JmB>> zevvz{WzqCa>wV5$kDd@)Ae6VBe^#KG(9A`BJR7q~&)%Jw7u4zj@ ztZF#9P;5!wgo!^F6dJXNns3a>{?@DAJ8vnI;H??1c^m&+{5xkxx^thQNML=@onKzR zoo)A;Twd|>s9f!Kp2v^m*Oz|}o_BIZZeiqF%M{&?pC4bWwy!BPFgO1;(^%AZ(gUMM zKV0)KJpaSJZEZR4{Ea(x(^>!SJ?!)ztG?g(wY<5(##9@54`>uHf5sq>=&PUm&#}cci-5VT~xcu_}v4gr{SNz$*4bFaYZX5 zF}mWS%+`-x60-M%g`K~u3f(Ley4oDJEpX9Q=V@Z=e7OU+Y4vQqQMFksN^P&H@X`{8 vQ-;|~WEQVHk!{jv)RFt6q;FnLvBSEx@-`i8(VSDo7(l?&)z4*}Q$iB}ShnG- literal 0 HcmV?d00001 diff --git a/gfx/trainers/kimono_girl.png b/gfx/trainers/kimono_girl.png new file mode 100644 index 0000000000000000000000000000000000000000..8f55ab1b2e61d52cab59b2e5617b2ca10e7e80e3 GIT binary patch literal 604 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9(#OH7`R3 z1_sd&o@@*Z3@jx6$|Noz>;a17O!1&wK#WAGf*3@a;Wk(b^ToQl$uV2TLkhEFq z(Y!f%(fJZ`N=mPdoc}e{L`eKTE^M&o>`duHtP67cmz;gSa(D8D>q~ZNbZt&un0sNJ zzEJ+FMs43c%uZrwcB#$mJ)Y(AeA1eIKZJ5;`uJrBR#;DNX6DK%j9Z?!_|3=fY@P)X zg6@YFWE^+5vNZ8Jpn0Y0s#Q}p^Zfs|6AmX?c3u_inEQB^f>?LmgEu8RY^5b-f9pS6 z+BKv84}aQ}-!G?ZWT@M7`_d~hY5s%9CHuPWOyF^3Wil7}a@VDldsD3B>5j8T3JV3U z=E@$e>vu8RYm*~&M^FBuyspRTbL&2C)D;UcX$*MoC#m^Y^2N=6y0YHOW8!u$yV3a4 zzaZ{O@I4K-|2YRZT(_-WsQvV(@rsW1b9cGr1TL{zT4t~BzF~=$UgZ&^!1W48El(!w zy;Ehr@_Ls>_2uRhir+6EmwtKe<>QAjA#&jcrgFdB8rI0o%4nXnG_3O)=O^2$Hz7NY zF-&@PE%T2_Ym7oUUvP)rf}EM3n0BofbW2P<&s4$s`I}p%Z_q`C$4~dk8+E_raa+6~ zlS3q>(gH_|IeFay+1V$ z>|xvF`R#zr#Ag+(_JZ-xQqI^#9uBKNw66P|aQO61FUtL%lpguZ%$3P?e%6Bce+&!^ N44$rjF6*2Ung9a*6^{S_ literal 0 HcmV?d00001 diff --git a/gfx/trainers/koga.png b/gfx/trainers/koga.png new file mode 100644 index 0000000000000000000000000000000000000000..ed77f264c9a91cb35d41e41292c56131d12e95b5 GIT binary patch literal 489 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7e{V{0vSl^{ z1H+tB`zQtm29}Z_zu^D>|Nqa`aI0isVC?X8aSW-r^>*6LzQYC_u8qI{|Bu;xQC5UdyPd@0X&Jou5(kl1tPkc$DV4zt~vq(wK z%s`|I*DI zlhr2*`epB3{YY%u$t~BfT)TDLQEzi+#*#y}+f!ogIeK3xv>)SnTcY||<(0Hu%2ex> z5wj0yoW6BK$vrm6{mQwM-%Gb#JAYC|;@ZqTi<~dL?yX~7$^S_)tZ2vDgBxBRxayW3 yvrPX2_l1}}x2GKaxcgLez)I^01t&v)GW^WtQdIb^&BVaKz~JfX=d#Wzp$P!PSK=%H literal 0 HcmV?d00001 diff --git a/gfx/trainers/lass.png b/gfx/trainers/lass.png new file mode 100644 index 0000000000000000000000000000000000000000..18e375a21a5a1b470d8ea6ee66203449c7ae965c GIT binary patch literal 564 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7f3C+c+vyww z14GE{&O`|Nqa`aI0isV7%<<;uunKYwNV`X-x(^F0;@4|NmLdSaXp# z_s2Jj*aNFPjViAg{`uVZofsaVZjKZ7+hch1x+U$ELQVCVJ?)7ZV1Y^`3D`z!5HPydYxi6?7V(x#|P zYv0y+HGlOi-lLkWPyhbtN#~j6b0IhKmEykzJcWLr8To$BQs181($m2=YgVVX=n|W| z6J9Pp9sF#bm!VIN%UPWzo2D|cX6aRaQ+dd=Ge+a{DWN;h3X2r`HcvSf*0z7O#f4Yg zOT^=P+kQ)i#!NW3{ZpxZwVm^%-2KK?hBvfKtGh4cRQp>_+Fa=DH`$_jO7)w-Weo0% zI~S*f$#(Z{P7eruA$&ID`W*I4eE zRw$_9cs(Gmxp-E&jcwyS^A%jb4+WR~GoQC@t7D|o^`v*3bS}(UyY|gm+H9?{&3BzW@6#j8@;|><%sX;eWM1_4eYUbv%Mb3nr(MU8 Yw2}RT@f%M*1_lNOPgg&ebxsLQ0D)Nq<^TWy literal 0 HcmV?d00001 diff --git a/gfx/trainers/lt_surge.png b/gfx/trainers/lt_surge.png new file mode 100644 index 0000000000000000000000000000000000000000..44e7db6dc3125458e89885a1abc65cd44d22a6ef GIT binary patch literal 531 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7f3Bz4s~Dt0 zLE}pY0|Ns~NswRg|NsC0=W4iBGB7Z1@^oY?7JFKTIv2c$4RVVcL?Fl&vh)24-`4&hPz4&PF=ooDJ0dOV_f%e)h3 zn=5ZjTN$)=Z^0!gi^FFdTuw`0;(IL6I4w`0*IC9-bitED(n1Xm8`Y&no*g(Nvhn`p z8bhHe*FHo&O=zDv$KE6Fy}&WEhps2Z3ofw7olal!tHSTv>hycsHb({3jds3a^`DU@ zGGpT0-yMsj+N=XF6-xe4bb2;x|0i3wYrC|(*g_*q`#Y+cUu`d#q#PK&eiff7Vot?S2}ct-Seof5^`} z?k}D?=6#Hsu$n%~ybKOnRS--uzCf;0iXR-Bz oZB^^8{=d%k$^3uR{eJzBJ?y`hBu{r`U|?YIboFyt=akR{0M6d``v3p{ literal 0 HcmV?d00001 diff --git a/gfx/trainers/medium.png b/gfx/trainers/medium.png new file mode 100644 index 0000000000000000000000000000000000000000..4828a771d961719521c296e24fc35f1d2b2a5fe3 GIT binary patch literal 615 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7f37Fl%d41y zf#I`f)hh-D29}Z_zu^D>|Nqa`aI0isU}E!haSW-rb#~grNzDp8Es5X%-v4<*P2h=3 zPW_!Zxw2M|(puN2yH)mnQT)V1`5pcI=RS+&*x!U!t-oTK(!auGrLAG3viC3DSC@3O z)44geZ157(Jf3quqJOSIZntYI`_VOLkM8@oy?LI5&Fxh|Gb8pE$FQ%~lm5BO?DjG< zfeD9|XS{#PAiqXy9qSsNfTizj%D8^5H4azH8%3ROMd_9*Enm&F zxv1V1>Olc=4$;QXE++f!Ela+}v$;`y7!BVK1&Aj`yk3#B&b1yqGvuIc>M zZg_Q%^$Cehf@-=3ckiDMvs3`lzaQTgY%?q}R_EYdhl>-G99~e3|SA aW}`@s?70h?3Kt<7|9(!((jZL+ z28Q##_p=xn7+6Yz{DS}g|NlQ%!>y8mfict5#WAGf*4}B{eTNKqTyoFro>HmNfmC? z+$opx(nXcSYr+*}_n=iOn^ZC%s0*H%b>RBJoQq*SBC+e*qo*vcnK|j|!6ox=wWRQB zFV`!r>`eOBZ*gSFtA^Y1@m+~)exEqybUVfDg8Bv5Vy|Dmc^00R-8a98l!-a^J8r_% z$H{z!{dGsqd|IEeZi(yqt~m1zHV;lrw|(9E@hjssmuU%6RYo>dvovLap~;gkUN3YJIOO>3T2UYh@`it$?Tlt-T~CEQvqC=_$w zEN6dN=nSnZuNLHqhTIHcJ;xTDztd2BUEIkT)i+}IoY>EQOwVHTXWt3?+II4#y)Wr< zF)}--R=Odo%-=|V7q5W)&s_)4a_3CGt?cglEh*%`-2WRdstxzWS@7?vX8q)wFfp8g Pfq}u()z4*}Q$iB}jtb3h literal 0 HcmV?d00001 diff --git a/gfx/trainers/morty.png b/gfx/trainers/morty.png new file mode 100644 index 0000000000000000000000000000000000000000..7f817e1a2b216c56f950bb6cdba359837f1a5514 GIT binary patch literal 480 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|GpWob z1H)>Q$%YIJ3@jx6$|Noz>;a17Oz*z6;;uunK>+JN0eTNlznuUM=z5mmL<9f&~ zu6KVew`{$7B#wp^-FF+0J?H_ORV$2lz`{D|{**0fX> zMu{*Nt>T^u&3z3`&mxpOdbas%Uw4uyPjNWHT&D2$lE<|KEn7Y54c*$@LiR56%q~65 zHJT}PZkxW-bBURjjE%pogYJE9bLT2w{FAqR`Gl8-=g!}`yz7+9kFT$8);3klOI;8V zwu5PI!)3i3zU_tC7o;yNp8a%91=qDxXIE{nFqwAJPS44|{gdCh(vxe;vfh46+s3Yb zE5x|m>iNuEldVtR-09bC5P!~;UfZTuz{}%4z0C582jfebfD?CCP3d^CpoHzg`~#ks z{+sXEBwX6K|0G|0L+e9XiTUL>1s%8D@p!_ta+N9n?3h)>Pd_9)jeI%#kfOoHTl?o6 nQrxg-_nl8i=Qrkm`_H`pAN%M0^I9nk3=9mOu6{1-oD!M<_CebZ literal 0 HcmV?d00001 diff --git a/gfx/trainers/mysticalman.png b/gfx/trainers/mysticalman.png new file mode 100644 index 0000000000000000000000000000000000000000..aac6bf026933d0f4cbbbe77355fa7b9f14e3a218 GIT binary patch literal 503 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9ok3i)9M~ z1H)G4KdTrR7+6Yz{DS}g|NlQ%!>y8mfpMCri(^Q|t-aGa`|r-$B(GgeHtss|;0GMQX* z*vDKtc@xvzzD!bTPtu z!i>gO|Jg3>GH=z{n<4i$RkW<>Yem}KQ!~Y@zX^QY?^5BPT^W_U>C@7xo)0%R|9cTy zY}DLU+1R*t(e{c||De@7BA)HzZ+8A4aIR>Q`ud4ms^^Csj!-DLA7sO}`rY1yy*$fP zw@Z0sOb*l0Tb}OfD%a(&EysA`h{{^sbk3i1SgtFGaxT2e>}clj#UL+bLpSwYJFp`O|aB+oHQxZx1V4dUWB^mcC_%^XC^&p4lK%wKeeHsTQtdD=U4b zCGDK@XX`d;?beChTo>PkwJviO?&Z6l{3`vqrP7s`=0_Y~dIX%ibK#}qzeAdPOREB> zZ0|DhdL=&RpPl*sAe+R+@6TDSELuOa*1l;@-77D-UF)0v{JAFoZUd*d@Gj@O3=9km Mp00i_>zopr0JQe#`Tzg` literal 0 HcmV?d00001 diff --git a/gfx/trainers/oak.png b/gfx/trainers/oak.png new file mode 100644 index 0000000000000000000000000000000000000000..4b4fab1a30c0218797f1b510b443bf182a077cc6 GIT binary patch literal 507 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7e{4=vb_)Xo z1H-GnHjp$+NswRg|NsC0=W4iBGB7aC@^oNBtv}5u#+i-2Z8Pom3Z@q1nk$3HWZ}Qvbd9nROBR88$P3M;BTYR0?YN}r8=h%Ar zzH08;b2lf~u4j`tyZohIm~w=K<%60%cC7#2y$`exxUaQ*GLK{A%S)UUg?#RxPVC)v zwQ!bo`^GIXVb0ZR%Xrw;qL;WTPW5@Y*ose)r-I9|%Jcc0lQR>q{XMLfF=giGDWAIz z#BprAqx(?#f8%$*jWVXIWTY=Sq&$>;Ds1eqp^0(v4*rUqR}AOHBtQISN^P!5*tu0l z$?RP1m9t+brgC&E{{L|8P~GIX1eLo{Gldzx3vM*Z$lUZyVcN>MiYgyo-Z;4;XFAvV zN75gT*>1Zw>qkUZZc6;c-bs%;b~b#w?)&M+mOGJ8+H;;-TBUdY(cl*k^3rl)Gh3DN zlJTBVvDMSZ43%ux?Hm5wQ`*mB$oi3MQM%!)hs-Qux7Dw5zKLJwFVdQ&MBb@0OS+olK=n! literal 0 HcmV?d00001 diff --git a/gfx/trainers/officer.png b/gfx/trainers/officer.png new file mode 100644 index 0000000000000000000000000000000000000000..a5afe293a9427cdc5aeb126a80c075d8463f5b10 GIT binary patch literal 432 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|NWR#vez62 z1_r**PyaD6FtC&a`33*~|NnokhFc{A1EasEi(^Q|t+m&@g^nn2ummi8U;kXOVgANt zJh{EIQznLMDQw(Y&;RA1(c9)llP&kQw(#7z#VT^~`P0gv0JSaVe0G=Sa=eha75Dp2 z&uJ5`AFCdAv%k_bWX|$x-?p2ryZ@n8$i)*aY|B3-@~>QSasQl4X}sU1q%(JasZcr; zGu4*+!V%Zb6RqNot0o<>_$?6}_GE?mm#t!{IwmS56PHWa8m+#a_-3oO`)VVT`^8_&1#fPAe);8`*6Y#9?=Ds6 ziatBF;YvJfo@RgPq7BF8w+3a#F8cD`@Rr+T@gH|he#sv=^~ANS##{3F#Z*~6_Mf47 zx1}$n>S|@bXHZPdw$l3<&7QH-iNij1TG{TF1rN`r@>P{{#)MaK-&S3+ey6M!_w&15 p`xJj`?rXf+wEo?vEvtI?Tb$Xh)-u@tWME)m@O1TaS?83{1OU)Z!)gEk literal 0 HcmV?d00001 diff --git a/gfx/trainers/picnicker.png b/gfx/trainers/picnicker.png new file mode 100644 index 0000000000000000000000000000000000000000..0721244f0fdc5e5d4f56ec22e78443b6fd878ab0 GIT binary patch literal 443 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9_5C&{6>g z28PWKRC5^^7+6Yz{DMK^xf*Vj3=E7>o-U3d6}RqAJ2~l)0gsF7*Z=>GZ_RNC<-2Qn zCNU;K;c0s3wWQg9+Z$ypUq(D(kkQ}JushAjaI>ne$+~!6rMM=xM(cHAFSl$__VJu` zcyBKozg*&NwU_$WqIw-IKYiNx>~CDZq=D>9?l^06>Dn;& z|H01>a{cUh>{z@yYf{G}9gn;RleTR*BgqltTK9NpvyS_fVoz3r1;_hinUR*MGIBBzYqESV$6vv%Xm8Nq4 vmLk8>&6PJ=ECYG{?PqWwc)#^eWeo$X30oT1ytB0o3=9mOu6{1-oD!Mt<7|GlTUTCtje zf#FlBmKXyA14~JeU-19`|NrM|xK%PRFdp`FaSW-rb#~h8O@|dYS_;4az5nxsuc7bq zAMY)4FQ5Ft8o{aYNnY$Z)0gj)ngjn;pMQENbiw7i7rVNy@0j?y>CV4P>c5__yeWQN zbSnAYmnzo2O?p%2CTyrmysf%i;c{KXB$;Do2bHfZtSn=e)qKgZzc*v;uDku0PnE8^ zcFOJZrxlA|Md>+9S}p(d<$&uv=|j`jD4PlGsdlz;Y4LfyC`5VZk57vjStR5xvd%pE zcHh$FXHNOVYq3W^DYDRgHzX#=iGi%|7~d3l7WvOTvBi=xAbkJXhcRc=%NE+plu{ zjKx=0Uk{LwyYf6N#Nf+D^JNq4PCko0A^n0cu~IA6@wAL(=zQs&(PHwiit;~*7uc+^ z{~tE#sNy99C*hM9Cf6~4H3@VOYhVB1(w36zldewuctoDkF;sx73TBzOJbEhifMM3uE zl(_+43|7d_%@bW*87>pEYtD@$RTt<7|9(#PS|=w4 z28JlZoJs};29}Z_zu^D>|Nqa`aI0isVEpFk;uunK>+Ceoq9Y1CuC4$6zLzm+oN;OG znnQ=mL~YIrsr^dtz9>H3uyMv~jVNI+dDFfXH&;z8+V;26hwJK-uJ%k(rj|O3Gdef5 zrU=B81YNZVHr$%NzIb7%{QYK2v%L*k4|;UAclEbzD0=&QMVnAyoF>ECkAlmy%3W^O zyxO<8+qQpyn&6hUnA!1{5@Ibc#O{+hs3QCM+yRyHpDF@r9||JHe`Llr0^5R=NVsH;;8e~lW+OWs9n0-4msZS5}s(u zdfG2%YKpX<+|907VO#cZVX4v`nkMTFmU9NXd=8z1~A?*8p5 zK>=yMkw`{)O3{XG4RW*e`Q`xv`?W?AkJB>ysPvQkj)KJ@pr? z`NUfFXvqn`g1S4eeZME~tKt7t^uKqatb*JEGv+Wok0t&5<#%2P?r7cL%vYhOSuYr8 z*QasFxc|fLDW7+*j&U|J-F``KPyha_r|+!&KV$vkx;66L+}yfMcjlHbFfcH9y85}S Ib4q9e0RHt<7|9ok7w&oND z28KZP+wBYt3@jx6$|Noz>;a17Ozi_>!X|26S1cY~z-$uEDbt7fs)@%p&F3EUCAf5&8v?bm*omwzi}G%Ru2 zpwX#!z}8Ag!Q@(ffm-fMJ8qdf93RYn1O)AKP+>m1WqZQ>TRYPX+zXz>uD#h9+c|ZT z)a;wn1uJ(+??0F~_n$`bgae6Aw+okK$!3PB$?-{kkx2Ar3QU-I=;1;hRt@dMl^MPZ z>PzmS`n-~AKJJKm|xPJeR1R#K@oP-J%Pi)*tO-zh~)UR)=| zw(^_gAB9e7`7--68xQu1cZXTaa%Sn=I2&4Pxc~Z*pBkL(wl>CoHI}O$EXYr-C_As9 zwA|9UXZ1X7tIjzWCeIX>VV}@+eZ`J$JzKLgFF$*0^uCoDg&XgD&ndWsL@nLF$gf)CE3-4scHCt<7|9?tLvX>JB z1HuwAT3@jxnsz7pZwH;j_n_^q#!JKWb-Jn2Il$?exp_n7E4N z_gOv@yg%>SaxzsQ=*+BH9BPsetM1K@$ebST zRgTU|yw$Q|f<>0{TDKcp?pAd>%>MtQ*X-6J-v`StXImWFV*r6UHTu*)046>ufKBarA%Y8)W=%>1ivn=2RHerALO+UIO2R% z_ow#Jl`n5vvBg|{6D=OO!KT<;T{LTd+Kt?$mmWMX{-M5Lt<7|9xvuQ1ToG z28PW)`P3K~7+6Yz{DS}g|NlQ%!>y8mfic^3dAGubxt zNL0gxkWJzV(@*B~biaO>-zQ=|BkyqDB}u^>9rxY}OHoTu{n(Rx)C-lb zOjCR)QT1o$H_wcepk4DXb3~tBH`QVN@gHhFQpfs3|0=A@zOg^$-Zb_1mNlzqRurB; z$Svb7yLV&jXXz(O%@h3g^iEQ`Qmw`@^}^a6Q*_yzpM+MMuWDns9Q#!;^u04zdclq@ zORv5wUf6YO=~IncEbS5Bs{M?*0~P!Z++Yx6S8+V^tpBBnur-Iib#-&DXu&e&+mAoE ziG4evd7jZj&$98^ha$e){4g#Z2pR5&q=6PM2dIU(qz; zeXJhQ6*%pWNPyRI7D3%5J8Z6foUv4=XsK%MhLmTYMSd8>ZEWRGSzX(8nt_3V!PC{x JWt~$(698J-$yERV literal 0 HcmV?d00001 diff --git a/gfx/trainers/red.png b/gfx/trainers/red.png new file mode 100644 index 0000000000000000000000000000000000000000..bd6d4a37d1c077b1fdae6b66ada230f13e81b108 GIT binary patch literal 458 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9nc%R!b)a z28O9UGN}v<3@jx6$|Noz>;a17Oz?kXj;uunK>+H0P>kb=mI5+?O|G%c2GxNPk zW`%$EmeNaADGF^VYvrR9IOUa@uWyQU6A|1HV6t5)xs0W-xjUYNYmWCP$(72H6VpOt z4J0#P8J?f$?!AWbSyyvW-nJ_~CTnC)>ZlnXYibTI)(=&2O51zQ<|xlQE@Ojf)<-=J zdMvIlo^)`_yt6Cy7OXFS+tHP^b@2}ElOju-(;7I{To>C-u{HL2c77-Gse&kh9ce17 z*GjoqO;A3_9x=)2-HIju9SbfgS|~s06Mf##-?Uyq-B+`DznbLav^1H8(sSOl$5l6F zPk(N_qc15kxu+Ch2=s1=6{{J}k)DQZ6N975aPI!MU$W0$#El|C>8Ux;5do zA3wvKW3SqcE%q^fzbM7Te9h&Y&18iKy-&g}W#;i-3oA;teZTvv<@?*Ix#_ O1B0ilpUXO@geCx~rpK@V literal 0 HcmV?d00001 diff --git a/gfx/trainers/rival1.png b/gfx/trainers/rival1.png new file mode 100644 index 0000000000000000000000000000000000000000..60e29553d84ad7ce8f684fa6e5c924888355f28e GIT binary patch literal 502 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7e{YKAHAOE5 z28KHE=FJQY3@jx6$|Noz>;a17Oz&O>@#WAGf*4*jbeTNM=TpD-&pL^ZlM&K6D z(^qn5xqLF7F@NRF>4FV^jUFg2KJjp$2d^uWUxBS>%#mj-lM-YKeA=$QIqd6bQeh!I z=|PP9CJ}q~%PV%YB)$3Z$&D-2!_DXC#|g>?LOn;TEgZCa&1Xi(#78tc$6D%}rheJm zEP7?nU59s{LZ8f%4eKi96N@}pW%hHv&+n&ec+ML6Mv2H4*3?`Pb!%6Zi%~yZ{nzZi z(nkrkr+V+!AGPSL(w zoo2SVUf-;SfT9=Mdymag?zq6>=KbY@32SX%lmnx6ik`3H9I15HgBCsC{_H6A<2%hZ zLyGZYzv$MpZzZJiF7a(I3S~_8PC3Tem$Hz_%)I~VTc-C`%eV0I*;-nehTk;a{-Lnw zgNNUQ5{-neC-*j~%wCm!Nv&!5v)z}T<-|s=_GP)5rxP2?dfsx~q}*!-qIX{Mzj)x6 z9+~iEqjKTJOwF&W%Vdl8Y{}cROFQGi%5`rP>VBzzNSST_{3^%O3m3hG7#J8BJYD@< J);T3K0RT@*;9LLz literal 0 HcmV?d00001 diff --git a/gfx/trainers/rival2.png b/gfx/trainers/rival2.png new file mode 100644 index 0000000000000000000000000000000000000000..b3f0ec48eac354b27b353ed05bfddb4c32f80ef0 GIT binary patch literal 429 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7e{YKAHAOE5 z28KHE=FJQY3@jx6$|Noz>;a17O!06-Y;uunKYwxtXn+_Rpv^3WKFP}DFrT5%S z<8-!1T)Xw@vS&{0Ha?tsAFB7xdZE0- z(e&@F*cF$09?0k`nz0felzSWc^ST8V=FLhhSn?IY5 z9Q>kwWLC9&jK`Zlx9-mWe?R7EW^9n0-uz2%|DD?0qZ#-v;H<%C_a1AxpAqHxXAg9n z2yJl=nzTYESKMCkW!ZI)qqn7fj6{TNmJ~eOBdW8!qyP98&#k+iCCWeD&0mwCaZEF( zwBxME$)K~0?fqNMJyW#kE~%X<_*{00==3R^)=cwmHqW(Med&eA`)fZ0EA~!cU-wKW lok4f!{S!uKKEI!>Uw49Cu)1h%Is*d(gQu&X%Q~loCIFTdzmWg{ literal 0 HcmV?d00001 diff --git a/gfx/trainers/sabrina.png b/gfx/trainers/sabrina.png new file mode 100644 index 0000000000000000000000000000000000000000..815768c839e56e14db9635a57ed57f7436c44e9c GIT binary patch literal 484 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9xxEF-tE7 z1_qZ&*)a?Z3@jx6$|Noz>;a17Oz}W2R;uunKYwpzUP0a=zE+;?z|6h|RxN7ak zrcC$SGw0~M@37HXp?ji4aQ5QXpR)=poSh0M9`RnMn>nZXLSh4t!2P{`b>CRuW-gek zz#M(pwP{Ax%W3P(cP?3ZTBl9V$3f?@&*b+L*D7gG-}UZ5n2P#_exIJLKXkGzZ~Aq% zo8C3v;GK4Lqi;sT7p?P-8*cnuG3I*oQc~Ml~>O_jn3`y;hSXo>szST^mBL5Go;6uPqMLgs(N+ghdzH?R-N#f zk|+P>E{S}cyJX6>6P^Ehe)yUw-|k?Fh<~uJCS=`%T@&vtYo323Per~+{;#87y@O4o zyK$E3lmAWfL90Eg@9bQ^PG;8H7+upS^QOB$e+ap_mFBHFw)PKSh)?d?WwR!knl4K@ zYkKBU@K!Tb)8%u0S@us>Pq?>KYI@P-pr1^;XQ?}?Z_RyUSl@p?_nh$i>E)4KdLH^8 r3kw&%S8z}1ZE{R`;>uqB?!5h9BaUR2&h+yP3=9mOu6{1-oD!Mt<7|9xwZlhaZL z28M%c_bM?kFtC&a`33*~|NnokhFc{A1EYeci(^Q|t+Uq-79CdLVF}ps>wmqTlY&pt z&82hurp~;e<>j?msU8A%bu~`9JBivkH5GJ! zH7uVIAhi7-r-jjX>F0_3v+oPF$R6w$wLB6dBRsv-ab@h^v^mFrb?9A~vuulc_1}q? zj8(Qb=gnnJbK1dky71EZ3kkZXXX%E7pLW@?>Zrxa3W@VcrI~Xk{q&CERi9m!!fJZy zp_X>&sr0wzC1Q(gcn!rZ)UE%{!+(tYEz!&6O+bQ zG8=BMy0_}kvmX`m-RZ~M4v2oq?kGQene*!p+mb)xF}CH*wO_5K%=`R4;duq?UcVcf rFIsrN=GgTe~DWM4fSca_p literal 0 HcmV?d00001 diff --git a/gfx/trainers/sailor.png b/gfx/trainers/sailor.png new file mode 100644 index 0000000000000000000000000000000000000000..09dee6b73eb01a598e74bf1e86a83060e3555207 GIT binary patch literal 508 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7f2`P2!ZMqI zfuZ@CN*x0O14~JeU-19`|NrM|xK%PRFwXXLaSW-rwRak0(Gdj>*N4Ubt<4)2sI5LY zcUxN7BQ-mFC83VGjgEV2JLgVfWcthvt<7f377eJLnh# z1Hy8mfich1#WAGf*4t^GMb3sCE{*&C&sEMaIT9M? z@cO|o>FDzg#xJ`6+@39Y&w?TU-3KQjXYqS8cvo+3H{VkfxkfImdB+(H3dqyRWUdRp=X<|`~$_fB)X zc=^?W_O!{D+%|K~(7by!IOX?>rJLUFy?E-~=C8k=9H?o_eo@$QPltz9bGcaO6^DxL z64w$!J?F=~f4lRh)q?(sL6cY)ITZa`!+R>~z()Nwj%=q_y%)(=co_fHVeTE?2Tq>+ zB0h7CqC+;m36InZyi+_U&ga5ct#>jdsLNFKYSr>|L0bFP`SS~Bh0@)c`t-e&#ut<7e{4=vP<9Uk z1H+LIov#@f7+6Yz{DS}g|NlQ%!>y8mfpL|mi(^Q|t+mrS`wlDcxFkON|G)C%!HLrv zVs%4~LRaE$j5tvjZcpmagV*Hooz? zrfG*(Q1Jr=c8kl0CSSg^eQ!pTQ?2cRqHR`TvG*BY%-+4v?DWRhrYlW+^@Cok)f`@P zKH{MX7oXS6-?vk)-`eu=b+G(`xBd6NZ?koNvMOzxgsIBXkDR-=uQK1$&h=x0&0dc` zVlQQOHXYyhrbnnG*5KBJ>WssMTyNf9bm}ck{jphyA$dW`aZ6*J%scuEUg-+!Zsb|| zOmOmC+joEepO*aVGJ}2Yp62;06I=?XAD$5Y>Gm}3M>P_MpZ$2YJarzcxqHaBXT>&; h@^t?e+0{$e``lo!(|;=bl!1YP!PC{xWt~$(697{r@#p{m literal 0 HcmV?d00001 diff --git a/gfx/trainers/skier.png b/gfx/trainers/skier.png new file mode 100644 index 0000000000000000000000000000000000000000..7f9466f1a829a652211393a95f9cf40084eda045 GIT binary patch literal 567 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9npMF~ed8 z1_q&rE8a3NFtC&a`33*~|NnokhFc{A1LHMM7srr_TXUyz<{eSsaqa#8_kGOzBWHXL zh^#!R@#^sH?Ts1R6}n$m8UE?~pK#>k_2=`h?@&4_cU$OPTT4RXZi?Lc;T2!x2%x;CWFQ?}0JT;H+#ch!mwd0;g*wzXvIi0Qd zpZr&@Y;nQ-i?UJ=Gi?s;bvkmUARzwAsy`gnAMTl(&+aPBNfVT94s5%%%g59*KQ!>d z;g-@RH??_}&i%=@%SW*H$UCdq&#nJ9#7sLNa=yg5zR_$!=%#7+>>}GX=qjhX&0BUM zWqzCNvJhvpo2m02t__O4&FvxfeVX@5m2Rb@du`{X%Xl#xzioGLX}ps8tIBHqvPA(= z+%C%}e%26Ns(JB&-8sv7%B#=1E>@{H7%J4x=rdiR+Wf6 z=dRhk5h9u5y&1=u#hZ@ovXEcybt2OK(t5W`~)*57U1}WC-N*@11$7DE{NWPq}>JukXzGe9h^Ktw!cm-uSrJ-V?rl amKT}DDd+O)>R$#11_n=8KbLh*2~7ZGk_68H literal 0 HcmV?d00001 diff --git a/gfx/trainers/super_nerd.png b/gfx/trainers/super_nerd.png new file mode 100644 index 0000000000000000000000000000000000000000..8636f2262d5309c4eabd1dc557555ae82e83b763 GIT binary patch literal 454 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9xvulov<^ z>&pmk1_lO}k|4j}|NsC0&((0NWME)S^>lFzskrra+Q~_W40v4DzWe__ealThk2Iyi zM-3WU%RV^g=2rB~|NADpM}_Un-RFlsC|+0bba#y2BHP8`eqOcRV)>FtW|kukES+u6 zPp7y{3e_`R7G&a3d(@aY^r_DSwNvd&G_R&C5qV>W z7&s^9OcYD^o#=a2=G42@|Bo-$WC$~g_|8_bbCdC;mmSS-8X6T%)qb9@OW|-*tY9j< zQLxh2h1+0( zUpG-IwtM?;uQJ6w)32Y{%QtiOqB{qFCLcZ!Y`8f3ZTUAQyR literal 0 HcmV?d00001 diff --git a/gfx/trainers/swimmer_f.png b/gfx/trainers/swimmer_f.png new file mode 100644 index 0000000000000000000000000000000000000000..affef5f5ed5b2d6dae06fbf3164a536dac819516 GIT binary patch literal 489 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7f38K-uvn3S zfgy)|^%e#O29}Z_zu^D>|Nqa`aI0isVC?X8aSW-r^>o_BX@?a!Tv~trua8T0IGd?G z>H1mcSxe#$CK_bEoiDG!bJQ-vaK7FDA5Tj7wpmLou_<^Y62V*{Epe`M(OJRCCk=#| z1%9aXJ?WgplgGMSSy|oUNa?mYcb;5TT>Y}gWZAo>proZ+EE=6JRc0>ekT}2l{zHLF zJHk0WeVXv%z!9xYC;lzCJoB-FR@Tuamt8`RE?TyLcadB2G`ah7m0HV{CTta*e&E;{ z2|4Q-1$I^~Q!R}8xlO-By4|yl^|st7z0D^!E&7eu<0aasZ?Gw^+q@)!JG5PE@$r;( zU)qlR$>fV|-?CY0hx7$c>3eVQsMiV*1T1GeQBwXA8rLn`K13IhWJgQu&X%Q~loCIF~E-1Yzf literal 0 HcmV?d00001 diff --git a/gfx/trainers/swimmer_m.png b/gfx/trainers/swimmer_m.png new file mode 100644 index 0000000000000000000000000000000000000000..2c0442385ea775e6bddc6e64630ebb9cf1a6d040 GIT binary patch literal 467 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7FQMqQHk*Ti zfnm$@V-XAt3@jx6$|Noz>;a17Oz*ywz;uunK>+Q6=n+_{*v~d3Z_dbTTX-?SV zS+5V5SnWI^{!c9A$^CoMXW|kT-Ss=!W?Jqx?`Nr2#B$Go`W~0U-#OD z<5HUGKI7?epWrLX3v-v~uD3pp&tAIeNKJN0$deCic1=IeXu;=tlr!RdV%_<_lA^)~9hZDvSLp6_ zS8f%La!^&O>Put<7|9@$VQnvhX;Dx=%q=== zsaEFsyY^|v%_y%ki#zVsJ-=d=YOSiae6xJOvfJxt#j;tgU49%4W5O5<`1?1a_w$BcU7u~Wv z@2MF?g(#jhW@Ni=uW&j~(CAE?8h^z3*~brT*irLk2g^jcjjEqw0={zXt85Iey<5<( z@ZRAT-}JdVYi?cLH{)wTQA5qvWs4_2Uwt}e?#t_s*^eo3t<7|9`8~bBVPK z3=9$zTTB=j7+6Yz{DMK^xf*Vj3=E8GJzX3_DsH_EyEy5v0td^t|NnoogdJ76%h$~7VB&nwv9xP7SorFG0bM(StQk;U154od_q zWEg%=n6bg|yxy)@5A#z$yp~0z1oJ9!?R%h7V*Nl#?Qr{Cr(JQ6JNd*H^fexlOe_D!2W}$dwt}LhacLWG%ZA6!wIoXc?a z+=|q@Yc_OVSf}(n`t_DMN4Sb}&P|)Pl6(JoY46{Lhb=YE6>x8Nkk)*^DkXJIf?Q5tr%56K@l_TGI+p+U}k7V)uw6CzwqUwCNbLE=LlIITSok(iS zvZ`)8vUt61(E8=yc6bz=^Lw^`3kU!FWI@i5EB6kC7IN+MIqaQqFK9>1NBP3Pv-X&6 jczCp)f6t{_-FnlPT;i59*gi8bFfe$!`njxgN@xNAFi7^^ literal 0 HcmV?d00001 diff --git a/gfx/trainers/whitney.png b/gfx/trainers/whitney.png new file mode 100644 index 0000000000000000000000000000000000000000..b9b4aa497946bdab7dd01023e775e07751774627 GIT binary patch literal 469 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9pzqT1x>2 z28JyMK5{cKFtC&a`33*~|NnokhFc{A17nG&i(^Q|t-I59ma!`GIOqQS|KHN1t&TPENy zlK-h)0bf+NFVgQ+PHA%g5LvaX=%Zzx)bquAIp^mV%?tnctKsP!rq|I)Tb>`VPxx=O bCVuHn*6pGCx^o#A7#KWV{an^LB{Ts53_;K% literal 0 HcmV?d00001 diff --git a/gfx/trainers/will.png b/gfx/trainers/will.png new file mode 100644 index 0000000000000000000000000000000000000000..599f7cce8d3b80a039cb80b88e31d4ec295ec3ff GIT binary patch literal 471 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7zqi`!nxX(m z)>0>*fq{XgB*-uL|NsC0b2Z#585kJLJY5_^DsCN}-Z<&70*6cM-~aV?tcuGH%2b$_ z`^}npYoFesuFULw<_ve{GZslZODDX}VBe)uEc!NS(Mea4t~1t)C(Jl_;wqQI4M#~` zZ!Trc(uZE0PxZo8uQ{F(pYG9feT8TB#GW~(uhw6dDsfrFdU?bB*X4^AN~J3)tUoBS ztJa52zG0V8r$pl8w3A1Q=S3{O6D6wq$W24($E@lj#WS}0hz9yDmcBUYbI?ES)*~j~ zeC7B0rUVI|44;~u+|%9bY$Cj#@zu4jUsrxRR>Z>2yVs#!zIzp~jrMh+wbe(;_MU0H zdTU@z91`L;31cY|~Ec z@84qmo-J$X#EvNi;VFixT0uGw-Y9Dx{q4#6MAW{|BE`b~`L$KgrA{yvz0^2$Qy_r>ZJ>~EZ(Fq@w1+ErF#GP*XmlMFgSABkg!{3)uz5bq=OU~4MNl#Gz b!Mf}z$NAj#*S|0@Ffe$!`njxgN@xNA#{<$j literal 0 HcmV?d00001 diff --git a/gfx/trainers/youngster.png b/gfx/trainers/youngster.png new file mode 100644 index 0000000000000000000000000000000000000000..9b6d96eead057bed4bdb13b8cac98623e7e846d2 GIT binary patch literal 449 zcmeAS@N?(olHy`uVBq!ia0y~yV6XsT4rT@hhWQbvbr={JcmjMvT>t<7|9q*JSMpv4 z1_o=F`3VdR3@jx6$|Noz>;a17Oz?k6a;uunK>+Lkpyu$`Ot|!m`zQ1#hiN!{t zORT%Jm|5ap{4Ac<`Oo*xh2sKh=QpVBOtcjUf6d*sJ7${5tQ*D~WS6W_SUl~@B$KAA zU-myt~@FJVX=i0I}WWqvU>fSg|*L*T-xpz zd49*E@N?Y90^eWF`L^r)5Rw%lvdS7hIA{*wv3t6AZ&ClK`r*!n=4&GC9 z&MzvwP1_lNOPgg&e IbxsLQ0P`ZxTL1t6 literal 0 HcmV?d00001 diff --git a/gfx/unown_puzzle/aerodactyl.png b/gfx/unown_puzzle/aerodactyl.png new file mode 100644 index 0000000000000000000000000000000000000000..c7b37bbbb8b15c61244440a5ad9a6d98a2f5c550 GIT binary patch literal 324 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-CI$uu28)~felajGa(lWshE&{&o#dEz)PTdK z_T)y9Z~KFG@K2j%J8?#^n8&~TTRK8a+gn+>RZ$LIfvnA@8sp?C#o7wvTqYF zZkQZ5;ji=}2g%(Bp0Y8&-Lm#F)8y=nQaXz6!r7S|<)!x)JdBY)Vc@NQ!Y$q{LP zuWbCFD{K0T_153Y+}UdR9@iUpr)@eE^CEZ!(**GswW_~Fp7CDyTl)CZ0=unY`+q4_ duKv3_)c)arz1}tXmn}fSvd$@?2>?e!jClY6 literal 0 HcmV?d00001 diff --git a/gfx/unown_puzzle/cursor.png b/gfx/unown_puzzle/cursor.png new file mode 100644 index 0000000000000000000000000000000000000000..c10b810fe707e33de7c55757de69995f90e6c1bb GIT binary patch literal 75 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRdCI$uuh60TpG7Jn1LY^*;Ar-fh6B?NR{r~?z b*oT4P;A5?o@e`sifmC_A`njxgN@xNAT1XUE literal 0 HcmV?d00001 diff --git a/gfx/unown_puzzle/hooh.png b/gfx/unown_puzzle/hooh.png new file mode 100644 index 0000000000000000000000000000000000000000..bb8be6cfaa1c1a769bda91802522db9eba116bac GIT binary patch literal 349 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-CI$uu28)~felajGs(89MhE&{2ofO!0*nr2S z)>CrTf3ZcsBLe<=FR*;tC$nqHU5Q6~A|(6O{`p)42}fO1?*g^ss>Iz3n~gD-Q5nmUa;N7Q)(NL&2pjLZXU;*i=oAw`&;df1xn({3(&slC=loR4=sWvWd%id;UqIe9#(WQx9~_Tuqt||sxEu7@ ztSis`1?TUE_n+c#>^^tJZKLfcGcC4Qp*MRMGv#=0uZ=P8E-SdixH)B=xl7*aJL={$ z|4yi$`yl?~t)JJv2Xf~Ze$Dg|DCSfx^wx)z4*}Q$iB} DO-!4O literal 0 HcmV?d00001 diff --git a/gfx/unown_puzzle/kabuto.png b/gfx/unown_puzzle/kabuto.png new file mode 100644 index 0000000000000000000000000000000000000000..823401cc581d3096e82bdf211b6126747054453a GIT binary patch literal 276 zcmeAS@N?(olHy`uVBq!ia0y~yU@!n-CI$uu28)~felajG-1c;F45_%4J1LOwhysVp z-X(PfEbp4-|1R&GQzW_UUEcQWq%T_=CpL=3ueM$ATq~mTVuuw&)A~9_W)7zhOsZ>| z=1LeGa&PgBXi^Z#lzFgs8p9QiWJarhPuW~tpYY}GGh4CcGxKrTXSX;@wmqKYX;<$U zkQ%NZP_^M7*g+!4ut@n!QOwas(&t`s_QN^fHE*9biC6+Xpn z8Q+f0jbR^IQ>RLB1L2mRvvar^k+}e?O7ZC;=z#}JwEHp&h|Z* e&XURt{>o(aS?T$OjvM?S?|QoWxvX %11100000 + ld a, [hl] + add a + add a ; << 3 + add a + + ; This is our new control code. + and LZ_CMD + push af + + ld a, [hli] + and LZ_LONG_HI + ld b, a + ld a, [hli] + ld c, a + + ; read at least 1 byte + inc bc + jr .command + +.short + push af + + ld a, [hli] + and LZ_LEN + ld c, a + ld b, 0 + + ; read at least 1 byte + inc c + +.command + ; Increment loop counts. + ; We bail the moment they hit 0. + inc b + inc c + + pop af + + bit LZ_RW, a + jr nz, .rewrite + + cp LZ_ITERATE + jr z, .Iter + cp LZ_ALTERNATE + jr z, .Alt + cp LZ_ZERO + jr z, .Zero + +; Literal +; Read literal data for bc bytes. +.lloop + dec c + jr nz, .lnext + dec b + jp z, .Main + +.lnext + ld a, [hli] + ld [de], a + inc de + jr .lloop + +.Iter: +; Write the same byte for bc bytes. + ld a, [hli] + +.iloop + dec c + jr nz, .inext + dec b + jp z, .Main + +.inext + ld [de], a + inc de + jr .iloop + +.Alt: +; Alternate two bytes for bc bytes. + dec c + jr nz, .anext1 + dec b + jp z, .adone1 +.anext1 + ld a, [hli] + ld [de], a + inc de + + dec c + jr nz, .anext2 + dec b + jp z, .adone2 +.anext2 + ld a, [hld] + ld [de], a + inc de + + jr .Alt + + ; Skip past the bytes we were alternating. +.adone1 + inc hl +.adone2 + inc hl + jr .Main + +.Zero: +; Write 0 for bc bytes. + xor a + +.zloop + dec c + jr nz, .znext + dec b + jp z, .Main + +.znext + ld [de], a + inc de + jr .zloop + +.rewrite +; Repeat decompressed data from output. + push hl + push af + + ld a, [hli] + bit 7, a ; sign + jr z, .positive + +; negative + ; hl = de + -a + and %01111111 + cpl + add e + ld l, a + ld a, -1 + adc d + ld h, a + jr .ok + +.positive +; Positive offsets are two bytes. + ld l, [hl] + ld h, a + ; add to starting output address + ld a, [wLZAddress] + add l + ld l, a + ld a, [wLZAddress + 1] + adc h + ld h, a + +.ok + pop af + + cp LZ_REPEAT + jr z, .Repeat + cp LZ_FLIP + jr z, .Flip + cp LZ_REVERSE + jr z, .Reverse + +; Since LZ_LONG is command 7, +; only commands 0-6 are passed in. +; This leaves room for an extra command 7. +; However, lengths longer than 768 +; would be interpreted as LZ_END. + +; More practically, LZ_LONG is not recursive. +; For now, it defaults to LZ_REPEAT. + +.Repeat: +; Copy decompressed data for bc bytes. + dec c + jr nz, .rnext + dec b + jr z, .donerw + +.rnext + ld a, [hli] + ld [de], a + inc de + jr .Repeat + +.Flip: +; Copy bitflipped decompressed data for bc bytes. + dec c + jr nz, .fnext + dec b + jp z, .donerw + +.fnext + ld a, [hli] + push bc + lb bc, 0, 8 + +.floop + rra + rl b + dec c + jr nz, .floop + + ld a, b + pop bc + + ld [de], a + inc de + jr .Flip + +.Reverse: +; Copy reversed decompressed data for bc bytes. + dec c + jr nz, .rvnext + + dec b + jp z, .donerw + +.rvnext + ld a, [hld] + ld [de], a + inc de + jr .Reverse + +.donerw + pop hl + + bit 7, [hl] + jr nz, .next + inc hl ; positive offset is two bytes +.next + inc hl + jp .Main diff --git a/home/delay.asm b/home/delay.asm new file mode 100644 index 0000000..ebdcccb --- /dev/null +++ b/home/delay.asm @@ -0,0 +1,20 @@ +DelayFrame:: +; Wait for one frame + ld a, 1 + ld [wVBlankOccurred], a + +; Wait for the next VBlank, halting to conserve battery +.halt + halt + nop + ld a, [wVBlankOccurred] + and a + jr nz, .halt + ret + +DelayFrames:: +; Wait c frames + call DelayFrame + dec c + jr nz, DelayFrames + ret diff --git a/home/double_speed.asm b/home/double_speed.asm new file mode 100644 index 0000000..b3839e3 --- /dev/null +++ b/home/double_speed.asm @@ -0,0 +1,27 @@ +; The CGB hardware introduces Double Speed Mode. +; While active, the clock speed is doubled. + +; The hardware can switch between normal speed +; and double speed at any time, but LCD output +; collapses during the switch. + +DoubleSpeed:: + ld hl, rKEY1 + bit 7, [hl] + jr z, SwitchSpeed + ret + +NormalSpeed:: + ld hl, rKEY1 + bit 7, [hl] + ret z + +SwitchSpeed:: + set 0, [hl] + xor a + ldh [rIF], a + ldh [rIE], a + ld a, $30 + ldh [rJOYP], a + stop ; rgbasm adds a nop after this instruction by default + ret diff --git a/home/fade.asm b/home/fade.asm new file mode 100644 index 0000000..267cb4a --- /dev/null +++ b/home/fade.asm @@ -0,0 +1,107 @@ +; Functions to fade the screen in and out. + +RotateFourPalettesRight:: + ldh a, [hCGB] + and a + jr z, .dmg + ld hl, IncGradGBPalTable_00 + ld b, 4 + jr RotatePalettesRight + +.dmg + ld hl, IncGradGBPalTable_08 + ld b, 4 + jr RotatePalettesRight + +RotateThreePalettesRight:: + ldh a, [hCGB] + and a + jr z, .dmg + ld hl, IncGradGBPalTable_05 + ld b, 3 + jr RotatePalettesRight + +.dmg + ld hl, IncGradGBPalTable_13 + ld b, 3 +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 + ld a, [hli] + call DmgToCgbBGPals + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + call DmgToCgbObjPals + ld c, 8 + call DelayFrames + pop de + dec b + jr nz, RotatePalettesRight + ret + +RotateFourPalettesLeft:: + ldh a, [hCGB] + and a + jr z, .dmg + ld hl, IncGradGBPalTable_04 - 1 + ld b, 4 + jr RotatePalettesLeft + +.dmg + ld hl, IncGradGBPalTable_12 - 1 + ld b, 4 + jr RotatePalettesLeft + +RotateThreePalettesLeft:: + ldh a, [hCGB] + and a + jr z, .dmg + ld hl, IncGradGBPalTable_07 - 1 + ld b, 3 + jr RotatePalettesLeft + +.dmg + ld hl, IncGradGBPalTable_15 - 1 + ld b, 3 +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 + ld a, [hld] + ld d, a + ld a, [hld] + ld e, a + call DmgToCgbObjPals + ld a, [hld] + call DmgToCgbBGPals + ld c, 8 + call DelayFrames + pop de + dec b + jr nz, RotatePalettesLeft + ret + +IncGradGBPalTable_00:: dc 3,3,3,3, 3,3,3,3, 3,3,3,3 +IncGradGBPalTable_01:: dc 3,3,3,2, 3,3,3,2, 3,3,3,2 +IncGradGBPalTable_02:: dc 3,3,2,1, 3,3,2,1, 3,3,2,1 +IncGradGBPalTable_03:: dc 3,2,1,0, 3,2,1,0, 3,2,1,0 + +IncGradGBPalTable_04:: dc 3,2,1,0, 3,2,1,0, 3,2,1,0 +IncGradGBPalTable_05:: dc 2,1,0,0, 2,1,0,0, 2,1,0,0 +IncGradGBPalTable_06:: dc 1,0,0,0, 1,0,0,0, 1,0,0,0 + +IncGradGBPalTable_07:: dc 0,0,0,0, 0,0,0,0, 0,0,0,0 +; bgp obp1 obp2 +IncGradGBPalTable_08:: dc 3,3,3,3, 3,3,3,3, 3,3,3,3 +IncGradGBPalTable_09:: dc 3,3,3,2, 3,3,3,2, 3,3,2,0 +IncGradGBPalTable_10:: dc 3,3,2,1, 3,2,1,0, 3,2,1,0 +IncGradGBPalTable_11:: dc 3,2,1,0, 3,1,0,0, 3,2,0,0 + +IncGradGBPalTable_12:: dc 3,2,1,0, 3,1,0,0, 3,2,0,0 +IncGradGBPalTable_13:: dc 2,1,0,0, 2,0,0,0, 2,1,0,0 +IncGradGBPalTable_14:: dc 1,0,0,0, 1,0,0,0, 1,0,0,0 + +IncGradGBPalTable_15:: dc 0,0,0,0, 0,0,0,0, 0,0,0,0 diff --git a/home/farcall.asm b/home/farcall.asm new file mode 100644 index 0000000..5e8da29 --- /dev/null +++ b/home/farcall.asm @@ -0,0 +1,48 @@ +FarCall_de:: +; Call a:de. +; Preserves other registers. + ldh [hTempBank], a + ldh a, [hROMBank] + push af + ldh a, [hTempBank] + rst Bankswitch + call FarCall_JumpToDE + jr ReturnFarCall + +FarCall_JumpToDE: + push de + ret + +FarCall_hl:: +; Call a:hl. +; Preserves other registers. + ldh [hTempBank], a + ldh a, [hROMBank] + push af + ldh a, [hTempBank] + rst Bankswitch + call FarCall_JumpToHL + ; fallthrough + +ReturnFarCall:: +; We want to retain the contents of f. +; To do this, we can pop to bc instead of af. + ld a, b + ld [wFarCallBC], a + ld a, c + ld [wFarCallBC + 1], a + +; Restore the working bank. + pop bc + ld a, b + rst Bankswitch + +; Restore the contents of bc. + ld a, [wFarCallBC] + ld b, a + ld a, [wFarCallBC + 1] + ld c, a + ret + +FarCall_JumpToHL:: + jp hl diff --git a/home/flag.asm b/home/flag.asm new file mode 100644 index 0000000..243b0e0 --- /dev/null +++ b/home/flag.asm @@ -0,0 +1,113 @@ +ResetMapBufferEventFlags:: + xor a + ld hl, wEventFlags + ld [hli], a + ret + +ResetBikeFlags:: + xor a + ld hl, wBikeFlags + ld [hli], a + ld [hl], a + ret + +ResetFlashIfOutOfCave:: + ld a, [wEnvironment] + cp ROUTE + jr z, .outdoors + cp TOWN + jr z, .outdoors + ret + +.outdoors + ld hl, wStatusFlags + res STATUSFLAGS_FLASH_F, [hl] + ret + +EventFlagAction:: + ld hl, wEventFlags + call FlagAction + ret + +FlagAction:: +; Perform action b on bit de in flag array hl. + +; inputs: +; b: function +; 0 RESET_FLAG clear bit +; 1 SET_FLAG set bit +; 2 CHECK_FLAG check bit +; de: bit number +; hl: pointer to the flag array + + ; get index within the byte + ld a, e + and 7 + + ; shift de right by three bits (get the index within memory) +rept 3 + srl d + rr e +endr + add hl, de + + ; implement a decoder + ld c, 1 + rrca + jr nc, .one + rlc c +.one + rrca + jr nc, .two + rlc c + rlc c +.two + rrca + jr nc, .three + swap c +.three + + ; check b's value: 0, 1, 2 + ld a, b + cp SET_FLAG + jr c, .clearbit ; RESET_FLAG + jr z, .setbit ; SET_FLAG + + ; check bit + ld a, [hl] + and c + ld c, a + ret + +.setbit + ; set bit + ld a, [hl] + or c + ld [hl], a + ret + +.clearbit + ; clear bit + ld a, c + cpl + and [hl] + ld [hl], a + ret + +CheckReceivedDex:: + ld de, ENGINE_POKEDEX + ld b, CHECK_FLAG + farcall EngineFlagAction + ld a, c + and a + ret + +xor_a:: + xor a + ret + +xor_a_dec_a:: + xor a + dec a + ret + diff --git a/home/game_time.asm b/home/game_time.asm new file mode 100644 index 0000000..5a67324 --- /dev/null +++ b/home/game_time.asm @@ -0,0 +1,118 @@ +ResetGameTime:: + xor a + ld [wGameTimeCap], a + ld [wGameTimeHours], a + ld [wGameTimeHours + 1], a + ld [wGameTimeMinutes], a + ld [wGameTimeSeconds], a + ld [wGameTimeFrames], a + ret + +GameTimer:: + nop + + ldh a, [rSVBK] + push af + ld a, BANK(wGameTime) + ldh [rSVBK], a + + call .Function + + pop af + ldh [rSVBK], a + ret + +.Function: +; Increment the game timer by one frame. +; The game timer is capped at 999:59:59.00. + +; Don't update if game logic is paused. + ld a, [wGameLogicPaused] + and a + ret nz + +; Is the timer paused? + ld hl, wGameTimerPaused + bit GAME_TIMER_PAUSED_F, [hl] + ret z + +; Is the timer already capped? + ld hl, wGameTimeCap + bit 0, [hl] + ret nz + +; +1 frame + ld hl, wGameTimeFrames + ld a, [hl] + inc a + + cp 60 ; frames/second + jr nc, .second + + ld [hl], a + ret + +.second + xor a + ld [hl], a + +; +1 second + ld hl, wGameTimeSeconds + ld a, [hl] + inc a + + cp 60 ; seconds/minute + jr nc, .minute + + ld [hl], a + ret + +.minute + xor a + ld [hl], a + +; +1 minute + ld hl, wGameTimeMinutes + ld a, [hl] + inc a + + cp 60 ; minutes/hour + jr nc, .hour + + ld [hl], a + ret + +.hour + xor a + ld [hl], a + +; +1 hour + ld a, [wGameTimeHours] + ld h, a + ld a, [wGameTimeHours + 1] + ld l, a + inc hl + +; Cap the timer after 1000 hours. + ld a, h + cp HIGH(1000) + jr c, .ok + + ld a, l + cp LOW(1000) + jr c, .ok + + ld hl, wGameTimeCap + set 0, [hl] + + ld a, 59 ; 999:59:59.00 + ld [wGameTimeMinutes], a + ld [wGameTimeSeconds], a + ret + +.ok + ld a, h + ld [wGameTimeHours], a + ld a, l + ld [wGameTimeHours + 1], a + ret diff --git a/home/gfx.asm b/home/gfx.asm new file mode 100644 index 0000000..339f5c3 --- /dev/null +++ b/home/gfx.asm @@ -0,0 +1,392 @@ +DEF TILES_PER_CYCLE EQU 8 +DEF MOBILE_TILES_PER_CYCLE EQU 6 + +Get2bppViaHDMA:: + ldh a, [rLCDC] + bit rLCDC_ENABLE, a + jp z, Copy2bpp + + homecall HDMATransfer2bpp + + ret + +Get1bppViaHDMA:: + ldh a, [rLCDC] + bit rLCDC_ENABLE, a + jp z, Copy1bpp + + homecall HDMATransfer1bpp + + ret + +FarCopyBytesDouble_DoubleBankSwitch:: + ldh [hTempBank], a + ldh a, [hROMBank] + push af + ldh a, [hTempBank] + rst Bankswitch + + call FarCopyBytesDouble + + pop af + rst Bankswitch + ret + +SafeHDMATransfer: ; unreferenced + dec c + ldh a, [hBGMapMode] + push af + xor a + ldh [hBGMapMode], a + ldh a, [hROMBank] + push af + ld a, b + rst Bankswitch + +.loop +; load the source and target MSB and LSB + ld a, d + ldh [rHDMA1], a ; source MSB + ld a, e + and $f0 + ldh [rHDMA2], a ; source LSB + ld a, h + and $1f + ldh [rHDMA3], a ; target MSB + ld a, l + and $f0 + ldh [rHDMA4], a ; target LSB +; stop when c < TILES_PER_CYCLE + ld a, c + cp TILES_PER_CYCLE + jr c, .done +; decrease c by TILES_PER_CYCLE + sub TILES_PER_CYCLE + ld c, a +; DMA transfer state + ld a, $f + ldh [hDMATransfer], a + call DelayFrame +; add $100 to hl and de + ld a, l + add LOW($100) + ld l, a + ld a, h + adc HIGH($100) + ld h, a + ld a, e + add LOW($100) + ld e, a + ld a, d + adc HIGH($100) + ld d, a + jr .loop + +.done + ld a, c + and $7f ; pretty silly, considering at most bits 0-2 would be set + ldh [hDMATransfer], a + call DelayFrame + pop af + rst Bankswitch + + pop af + ldh [hBGMapMode], a + ret + +UpdatePlayerSprite:: + farcall _UpdatePlayerSprite + ret + +LoadStandardFont:: + farcall _LoadStandardFont + ret + +LoadFontsBattleExtra:: + farcall _LoadFontsBattleExtra + ret + +LoadFontsExtra:: + farcall _LoadFontsExtra1 + farcall _LoadFontsExtra2 + ret + +LoadFontsExtra2: ; unreferenced + farcall _LoadFontsExtra2 + ret + +DecompressRequest2bpp:: + push de + ld a, BANK(sScratch) + call OpenSRAM + push bc + + ld de, sScratch + ld a, b + call FarDecompress + + pop bc + pop hl + + ld de, sScratch + call Request2bpp + call CloseSRAM + ret + +FarCopyBytes:: +; copy bc bytes from a:hl to de + + ldh [hTempBank], a + ldh a, [hROMBank] + push af + ldh a, [hTempBank] + rst Bankswitch + + call CopyBytes + + pop af + rst Bankswitch + ret + +FarCopyBytesDouble: +; Copy bc bytes from a:hl to bc*2 bytes at de, +; doubling each byte in the process. + + ldh [hTempBank], a + ldh a, [hROMBank] + push af + ldh a, [hTempBank] + rst Bankswitch + +; switcheroo, de <> hl + ld a, h + ld h, d + ld d, a + ld a, l + ld l, e + ld e, a + + inc b + inc c + jr .dec + +.loop + ld a, [de] + inc de + ld [hli], a + ld [hli], a +.dec + dec c + jr nz, .loop + dec b + jr nz, .loop + + pop af + rst Bankswitch + ret + +Request2bpp:: +; Load 2bpp at b:de to occupy c tiles of hl. + ldh a, [hBGMapMode] + push af + xor a + ldh [hBGMapMode], a + + ldh a, [hROMBank] + push af + ld a, b + rst Bankswitch + + ldh a, [hTilesPerCycle] + push af + ld a, TILES_PER_CYCLE + ldh [hTilesPerCycle], a + + ld a, [wLinkMode] + cp LINK_MOBILE + jr nz, .NotMobile + ldh a, [hMobile] + and a + jr nz, .NotMobile + ld a, MOBILE_TILES_PER_CYCLE + ldh [hTilesPerCycle], a + +.NotMobile: + ld a, e + ld [wRequested2bppSource], a + ld a, d + ld [wRequested2bppSource + 1], a + ld a, l + ld [wRequested2bppDest], a + ld a, h + ld [wRequested2bppDest + 1], a +.loop + ld a, c + ld hl, hTilesPerCycle + cp [hl] + jr nc, .cycle + + ld [wRequested2bppSize], a +.wait + call DelayFrame + ld a, [wRequested2bppSize] + and a + jr nz, .wait + + pop af + ldh [hTilesPerCycle], a + + pop af + rst Bankswitch + + pop af + ldh [hBGMapMode], a + ret + +.cycle + ldh a, [hTilesPerCycle] + ld [wRequested2bppSize], a + +.wait2 + call DelayFrame + ld a, [wRequested2bppSize] + and a + jr nz, .wait2 + + ld a, c + ld hl, hTilesPerCycle + sub [hl] + ld c, a + jr .loop + +Request1bpp:: +; Load 1bpp at b:de to occupy c tiles of hl. + ldh a, [hBGMapMode] + push af + xor a + ldh [hBGMapMode], a + + ldh a, [hROMBank] + push af + ld a, b + rst Bankswitch + + ldh a, [hTilesPerCycle] + push af + ld a, TILES_PER_CYCLE + ldh [hTilesPerCycle], a + + ld a, [wLinkMode] + cp LINK_MOBILE + jr nz, .NotMobile + ldh a, [hMobile] + and a + jr nz, .NotMobile + ld a, MOBILE_TILES_PER_CYCLE + ldh [hTilesPerCycle], a + +.NotMobile: + ld a, e + ld [wRequested1bppSource], a + ld a, d + ld [wRequested1bppSource + 1], a + ld a, l + ld [wRequested1bppDest], a + ld a, h + ld [wRequested1bppDest + 1], a +.loop + ld a, c + ld hl, hTilesPerCycle + cp [hl] + jr nc, .cycle + + ld [wRequested1bppSize], a +.wait + call DelayFrame + ld a, [wRequested1bppSize] + and a + jr nz, .wait + + pop af + ldh [hTilesPerCycle], a + + pop af + rst Bankswitch + + pop af + ldh [hBGMapMode], a + ret + +.cycle + ldh a, [hTilesPerCycle] + ld [wRequested1bppSize], a + +.wait2 + call DelayFrame + ld a, [wRequested1bppSize] + and a + jr nz, .wait2 + + ld a, c + ld hl, hTilesPerCycle + sub [hl] + ld c, a + jr .loop + +Get2bpp:: +; copy c 2bpp tiles from b:de to hl + ldh a, [rLCDC] + bit rLCDC_ENABLE, a + jp nz, Request2bpp + ; fallthrough + +Copy2bpp: + push hl + ld h, d + ld l, e + pop de + +; bank + ld a, b + +; bc = c * LEN_2BPP_TILE + push af + swap c + ld a, $f + and c + ld b, a + ld a, $f0 + and c + ld c, a + pop af + + jp FarCopyBytes + +Get1bpp:: +; copy c 1bpp tiles from b:de to hl + ldh a, [rLCDC] + bit rLCDC_ENABLE, a + jp nz, Request1bpp + ; fallthrough + +Copy1bpp:: + push de + ld d, h + ld e, l + +; bank + ld a, b + +; bc = c * LEN_1BPP_TILE + push af + ld h, 0 + ld l, c + add hl, hl + add hl, hl + add hl, hl + ld b, h + ld c, l + pop af + + pop hl + jp FarCopyBytesDouble diff --git a/home/header.asm b/home/header.asm new file mode 100644 index 0000000..a450c07 --- /dev/null +++ b/home/header.asm @@ -0,0 +1,70 @@ +; rst vectors (called through the rst instruction) + +SECTION "rst0", ROM0[$0000] + di + jp Start + +SECTION "rst8", ROM0[$0008] +FarCall:: + jp FarCall_hl + +SECTION "rst10", ROM0[$0010] +Bankswitch:: + ldh [hROMBank], a + ld [MBC3RomBank], a + ret + +SECTION "rst18", ROM0[$0018] + rst $38 + +SECTION "rst20", ROM0[$0020] + rst $38 + +SECTION "rst28", ROM0[$0028] +JumpTable:: + push de + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] +; SECTION "rst30", ROM0[$0030] + ld l, a + pop de + jp hl + +SECTION "rst38", ROM0[$0038] + rst $38 + + +; Game Boy hardware interrupts + +SECTION "vblank", ROM0[$0040] + jp VBlank + +SECTION "lcd", ROM0[$0048] + jp LCD + +SECTION "timer", ROM0[$0050] + jp MobileTimer + +SECTION "serial", ROM0[$0058] + jp Serial + +SECTION "joypad", ROM0[$0060] + jp Joypad + + +SECTION "Header", ROM0[$0100] + +Start:: +; Nintendo requires all Game Boy ROMs to begin with a nop ($00) and a jp ($C3) +; to the starting address. + nop + jp _Start + +; The Game Boy cartridge header data is patched over by rgbfix. +; This makes sure it doesn't get used for anything else. + + ds $0150 - @, $00 diff --git a/home/hm_moves.asm b/home/hm_moves.asm new file mode 100644 index 0000000..3862a7a --- /dev/null +++ b/home/hm_moves.asm @@ -0,0 +1,28 @@ +; HM moves can't be forgotten + +IsHM:: + cp HM01 + jr c, .NotHM + scf + ret +.NotHM: + and a + ret + +IsHMMove:: + call GetMoveIndexFromID + ld b, h + ld c, l + ld hl, .HMMoves + ld de, 2 + jp IsInWordArray + +.HMMoves: + dw CUT + dw FLY + dw SURF + dw STRENGTH + dw FLASH + dw WATERFALL + dw WHIRLPOOL + dw -1 ; end diff --git a/home/indirection.asm b/home/indirection.asm new file mode 100644 index 0000000..db0ced6 --- /dev/null +++ b/home/indirection.asm @@ -0,0 +1,76 @@ +LoadIndirectPointer:: + ; in: a:hl: indirect table, bc: index + ; out: a:hl: pointer to element, b: copy of a, c: clobbered, de: preserved, zero flag: set if pointer is null + push de + ld d, a + ldh a, [hROMBank] + push af + ld a, d + rst Bankswitch + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + add a, a + jr nc, .loop + res 7, d + dec bc + ld a, b + and c + inc a + jr nz, .loop +.null + ld hl, 0 + ld b, h +.done + pop af + rst Bankswitch + pop de + ld a, h + or l + ld a, b + ret + +.next + inc hl + inc hl + inc hl + cpl + inc a + add a, c + ld c, a + jr c, .loop ;subtracting by addition has the carry flipped + dec b +.loop + ld a, [hli] + and a + jr z, .null + inc b + dec b + jr nz, .next + cp c + jr c, .next + jr z, .next + + ld a, [hli] + ld b, a + ld a, [hli] + ld h, [hl] + ld l, a + or h + jr z, .done ;no point in setting them to zero if they already are + ld a, c + ld c, e + ld e, b + ld b, d + call AddNTimes + ld b, e + jr .done + +LoadDoubleIndirectPointer:: + ; for indirect tables of near pointers to data, used for structures of varying size + ; same calling convention as LoadIndirectPointer + call LoadIndirectPointer + call nz, GetFarWord + ld a, b + ret diff --git a/home/init.asm b/home/init.asm new file mode 100644 index 0000000..44bff55 --- /dev/null +++ b/home/init.asm @@ -0,0 +1,216 @@ +Reset:: + di + call InitSound + xor a + ldh [hMapAnims], a + call ClearPalettes + xor a + ldh [rIF], a + ld a, 1 << VBLANK + ldh [rIE], a + ei + + ld hl, wJoypadDisable + set JOYPAD_DISABLE_SGB_TRANSFER_F, [hl] + + ld c, 32 + call DelayFrames + + jr Init + +_Start:: + cp $11 + jr z, .cgb + xor a ; FALSE + jr .load + +.cgb + ld a, TRUE + +.load + ldh [hCGB], a + ld a, TRUE + ldh [hSystemBooted], a + +Init:: + di + + xor a + ldh [rIF], a + ldh [rIE], a + ldh [rRP], a + ldh [rSCX], a + ldh [rSCY], a + ldh [rSB], a + ldh [rSC], a + ldh [rWX], a + ldh [rWY], a + ldh [rBGP], a + ldh [rOBP0], a + ldh [rOBP1], a + ldh [rTMA], a + ldh [rTAC], a + ld [wBetaTitleSequenceOpeningType], a + + ld a, %100 ; Start timer at 4096Hz + ldh [rTAC], a + +.wait + ldh a, [rLY] + cp LY_VBLANK + 1 + jr nz, .wait + + xor a + ldh [rLCDC], a + +; Clear WRAM bank 0 + ld hl, WRAM0_Begin + ld bc, WRAM0_End - WRAM0_Begin +.ByteFill: + ld [hl], 0 + inc hl + dec bc + ld a, b + or c + jr nz, .ByteFill + + ld sp, wStackTop + +; Clear HRAM + ldh a, [hCGB] + push af + ldh a, [hSystemBooted] + push af + xor a + ld hl, HRAM_Begin + ld bc, HRAM_End - HRAM_Begin + call ByteFill + pop af + ldh [hSystemBooted], a + pop af + ldh [hCGB], a + ld a, -1 + ldh [hSRAMBank], a + + call ClearWRAM + ld a, 1 + ldh [rSVBK], a + call ClearVRAM + call ClearSprites + call ClearsScratch + + ld a, BANK(WriteOAMDMACodeToHRAM) ; aka BANK(GameInit) + rst Bankswitch + + call WriteOAMDMACodeToHRAM + + xor a + ldh [hMapAnims], a + ldh [hSCX], a + ldh [hSCY], a + ldh [rJOYP], a + + ld a, $8 ; HBlank int enable + ldh [rSTAT], a + + ld a, $90 + ldh [hWY], a + ldh [rWY], a + + ld a, 7 + ldh [hWX], a + ldh [rWX], a + + ld a, LCDC_DEFAULT ; %11100011 + ; LCD on + ; Win tilemap 1 + ; Win on + ; BG/Win tiledata 0 + ; BG Tilemap 0 + ; OBJ 8x8 + ; OBJ on + ; BG on + ldh [rLCDC], a + + ld a, CONNECTION_NOT_ESTABLISHED + ldh [hSerialConnectionStatus], a + + farcall InitCGBPals + + ld a, HIGH(vBGMap1) + ldh [hBGMapAddress + 1], a + xor a ; LOW(vBGMap1) + ldh [hBGMapAddress], a + + farcall StartClock + + xor a ; SRAM_DISABLE + ld [MBC3LatchClock], a + ld [MBC3SRamEnable], a + + ldh a, [hCGB] + and a + jr z, .no_double_speed + call NormalSpeed +.no_double_speed + + xor a + ldh [rIF], a + ld a, IE_DEFAULT + ldh [rIE], a + ei + + call DelayFrame + + predef InitSGBBorder + + call InitSound + xor a + ld [wMapMusic], a + jp GameInit + +ClearVRAM:: +; Wipe VRAM banks 0 and 1 + + ld a, 1 + ldh [rVBK], a + call .clear + + xor a ; 0 + ldh [rVBK], a +.clear + ld hl, VRAM_Begin + ld bc, VRAM_End - VRAM_Begin + xor a + call ByteFill + ret + +ClearWRAM:: +; Wipe swappable WRAM banks (1-7) +; Assumes CGB or AGB + + ld a, 1 +.bank_loop + push af + ldh [rSVBK], a + xor a + ld hl, WRAM1_Begin + ld bc, WRAM1_End - WRAM1_Begin + call ByteFill + pop af + inc a + cp 8 + jr c, .bank_loop + ret + +ClearsScratch:: +; Wipe the first 32 bytes of sScratch + + ld a, BANK(sScratch) + call OpenSRAM + ld hl, sScratch + ld bc, $20 + xor a + call ByteFill + call CloseSRAM + ret diff --git a/home/item.asm b/home/item.asm new file mode 100644 index 0000000..9e15879 --- /dev/null +++ b/home/item.asm @@ -0,0 +1,70 @@ +DoItemEffect:: + farcall _DoItemEffect + ret + +CheckTossableItem:: + push hl + push de + push bc + farcall _CheckTossableItem + pop bc + pop de + pop hl + ret + +TossItem:: + push hl + push de + push bc + ldh a, [hROMBank] + push af + ld a, BANK(_TossItem) + rst Bankswitch + + call _TossItem + + pop bc + ld a, b + rst Bankswitch + pop bc + pop de + pop hl + ret + +ReceiveItem:: + push bc + ldh a, [hROMBank] + push af + ld a, BANK(_ReceiveItem) + rst Bankswitch + push hl + push de + + call _ReceiveItem + + pop de + pop hl + pop bc + ld a, b + rst Bankswitch + pop bc + ret + +CheckItem:: + push hl + push de + push bc + ldh a, [hROMBank] + push af + ld a, BANK(_CheckItem) + rst Bankswitch + + call _CheckItem + + pop bc + ld a, b + rst Bankswitch + pop bc + pop de + pop hl + ret diff --git a/home/joypad.asm b/home/joypad.asm new file mode 100644 index 0000000..9612427 --- /dev/null +++ b/home/joypad.asm @@ -0,0 +1,483 @@ +Joypad:: +; Replaced by UpdateJoypad, called from VBlank instead of the useless +; joypad interrupt. + +; This is a placeholder in case the interrupt is somehow enabled. + reti + +ClearJoypad:: + xor a +; Pressed this frame (delta) + ldh [hJoyPressed], a +; Currently pressed + ldh [hJoyDown], a + ret + +UpdateJoypad:: +; This is called automatically every frame in VBlank. +; 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. + +; Updates: + +; hJoypadReleased: released this frame (delta) +; hJoypadPressed: pressed this frame (delta) +; hJoypadDown: currently pressed +; hJoypadSum: pressed so far + +; Any of these three bits can be used to disable input. + ld a, [wJoypadDisable] + and (1 << JOYPAD_DISABLE_MON_FAINT_F) | (1 << JOYPAD_DISABLE_SGB_TRANSFER_F) | (1 << 4) + ret nz + +; If we're saving, input is disabled. + ld a, [wGameLogicPaused] + and a + ret nz + +; We can only get four inputs at a time. +; We take d-pad first for no particular reason. + ld a, R_DPAD + ldh [rJOYP], a +; Read twice to give the request time to take. + ldh a, [rJOYP] + ldh a, [rJOYP] + +; The Joypad register output is in the lo nybble (inversed). +; We make the hi nybble of our new container d-pad input. + cpl + and $f + swap a + +; We'll keep this in b for now. + ld b, a + +; Buttons make 8 total inputs (A, B, Select, Start). +; We can fit this into one byte. + ld a, R_BUTTONS + ldh [rJOYP], a +; Wait for input to stabilize. +rept 6 + ldh a, [rJOYP] +endr +; Buttons take the lo nybble. + cpl + and $f + or b + ld b, a + +; Reset the joypad register since we're done with it. + ld a, $30 + ldh [rJOYP], a + +; To get the delta we xor the last frame's input with the new one. + ldh a, [hJoypadDown] ; last frame + ld e, a + xor b + ld d, a +; Released this frame: + and e + ldh [hJoypadReleased], a +; Pressed this frame: + ld a, d + and b + ldh [hJoypadPressed], a + +; Add any new presses to the list of collective presses: + ld c, a + ldh a, [hJoypadSum] + or c + ldh [hJoypadSum], a + +; Currently pressed: + ld a, b + ldh [hJoypadDown], a + +; Now that we have the input, we can do stuff with it. + +; For example, soft reset: + and A_BUTTON | B_BUTTON | SELECT | START + cp A_BUTTON | B_BUTTON | SELECT | START + jp z, Reset + + ret + +GetJoypad:: +; Update mirror joypad input from hJoypadDown (real input) + +; hJoyReleased: released this frame (delta) +; hJoyPressed: pressed this frame (delta) +; hJoyDown: currently pressed + +; bit 0 A +; 1 B +; 2 SELECT +; 3 START +; 4 RIGHT +; 5 LEFT +; 6 UP +; 7 DOWN + + push af + push hl + push de + push bc + +; The player input can be automated using an input stream. +; See more below. + ld a, [wInputType] + cp AUTO_INPUT + jr z, .auto + +; To get deltas, take this and last frame's input. + ldh a, [hJoypadDown] ; real input + ld b, a + ldh a, [hJoyDown] ; last frame mirror + ld e, a + +; Released this frame: + xor b + ld d, a + and e + ldh [hJoyReleased], a + +; Pressed this frame: + ld a, d + and b + ldh [hJoyPressed], a + +; It looks like the collective presses got commented out here. + ld c, a + +; Currently pressed: + ld a, b + ldh [hJoyDown], a ; frame input + +.quit + pop bc + pop de + pop hl + pop af + ret + +.auto +; Use a predetermined input stream (used in the catching tutorial). + +; Stream format: [input][duration] +; A value of $ff will immediately end the stream. + +; Read from the input stream. + ldh a, [hROMBank] + push af + ld a, [wAutoInputBank] + rst Bankswitch + + ld hl, wAutoInputAddress + ld a, [hli] + ld h, [hl] + ld l, a + +; We only update when the input duration has expired. + ld a, [wAutoInputLength] + and a + jr z, .updateauto + +; Until then, don't change anything. + dec a + ld [wAutoInputLength], a + pop af + rst Bankswitch + jr .quit + +.updateauto +; An input of $ff will end the stream. + ld a, [hli] + cp -1 + jr z, .stopauto + ld b, a + +; A duration of $ff will end the stream indefinitely. + ld a, [hli] + ld [wAutoInputLength], a + cp -1 + jr nz, .next + +; The current input is overwritten. + dec hl + dec hl + ld b, NO_INPUT + jr .finishauto + +.next +; On to the next input... + ld a, l + ld [wAutoInputAddress], a + ld a, h + ld [wAutoInputAddress + 1], a + jr .finishauto + +.stopauto + call StopAutoInput + ld b, NO_INPUT + +.finishauto + pop af + rst Bankswitch + ld a, b + ldh [hJoyPressed], a ; pressed + ldh [hJoyDown], a ; input + jr .quit + +StartAutoInput:: +; Start reading automated input stream at a:hl. + + ld [wAutoInputBank], a + ld a, l + ld [wAutoInputAddress], a + ld a, h + ld [wAutoInputAddress + 1], a +; Start reading the stream immediately. + xor a + ld [wAutoInputLength], a +; Reset input mirrors. + xor a + ldh [hJoyPressed], a ; pressed this frame + ldh [hJoyReleased], a ; released this frame + ldh [hJoyDown], a ; currently pressed + + ld a, AUTO_INPUT + ld [wInputType], a + ret + +StopAutoInput:: +; Clear variables related to automated input. + xor a + ld [wAutoInputBank], a + ld [wAutoInputAddress], a + ld [wAutoInputAddress + 1], a + ld [wAutoInputLength], a +; Back to normal input. + ld [wInputType], a + ret + +JoyTitleScreenInput:: ; unreferenced +.loop + call DelayFrame + + push bc + call JoyTextDelay + pop bc + +; Save data can be deleted by pressing Up + B + Select. + ldh a, [hJoyDown] + cp D_UP | SELECT | B_BUTTON + jr z, .keycombo + +; Press Start or A to start the game. + ldh a, [hJoyLast] + and START | A_BUTTON + jr nz, .keycombo + + dec c + jr nz, .loop + + and a + ret + +.keycombo + scf + ret + +JoyWaitAorB:: +.loop + call DelayFrame + call GetJoypad + ldh a, [hJoyPressed] + and A_BUTTON | B_BUTTON + ret nz + call UpdateTimeAndPals + jr .loop + +WaitButton:: + ldh a, [hOAMUpdate] + push af + ld a, 1 + ldh [hOAMUpdate], a + call WaitBGMap + call JoyWaitAorB + pop af + ldh [hOAMUpdate], a + ret + +JoyTextDelay:: + call GetJoypad + ldh a, [hInMenu] + and a + ldh a, [hJoyPressed] + jr z, .ok + ldh a, [hJoyDown] +.ok + ldh [hJoyLast], a + ldh a, [hJoyPressed] + and a + jr z, .checkframedelay + ld a, 15 + ld [wTextDelayFrames], a + ret + +.checkframedelay + ld a, [wTextDelayFrames] + and a + jr z, .restartframedelay + xor a + ldh [hJoyLast], a + ret + +.restartframedelay + ld a, 5 + ld [wTextDelayFrames], a + ret + +WaitPressAorB_BlinkCursor:: +; Show a blinking cursor in the lower right-hand +; corner of a textbox and wait until A or B is +; pressed. +; +; NOTE: The cursor has to be shown before calling +; this function or no cursor will be shown at all. + ldh a, [hMapObjectIndex] + push af + ldh a, [hObjectStructIndex] + push af + xor a + ldh [hMapObjectIndex], a + ld a, 6 + ldh [hObjectStructIndex], a + +.loop + push hl + hlcoord 18, 17 + call BlinkCursor + pop hl + + call JoyTextDelay + ldh a, [hJoyLast] + and A_BUTTON | B_BUTTON + jr z, .loop + + pop af + ldh [hObjectStructIndex], a + pop af + ldh [hMapObjectIndex], a + ret + +SimpleWaitPressAorB:: +.loop + call JoyTextDelay + ldh a, [hJoyLast] + and A_BUTTON | B_BUTTON + jr z, .loop + ret + +PromptButton:: +; Show a blinking cursor in the lower right-hand +; corner of a textbox and wait until A or B is +; pressed, afterwards, play a sound. + ld a, [wLinkMode] + and a + jr nz, .link + call .wait_input + push de + ld de, SFX_READ_TEXT_2 + call PlaySFX + pop de + ret + +.link + ld c, 65 + jp DelayFrames + +.wait_input + ldh a, [hOAMUpdate] + push af + ld a, $1 + ldh [hOAMUpdate], a + ld a, [wInputType] + or a + jr z, .input_wait_loop + farcall _DudeAutoInput_A + +.input_wait_loop + call .blink_cursor + call JoyTextDelay + ldh a, [hJoyPressed] + and A_BUTTON | B_BUTTON + jr nz, .received_input + call UpdateTimeAndPals + ld a, $1 + ldh [hBGMapMode], a + call DelayFrame + jr .input_wait_loop + +.received_input + pop af + ldh [hOAMUpdate], a + ret + +.blink_cursor + ldh a, [hVBlankCounter] + and %00010000 ; bit 4, a + jr z, .cursor_off + ld a, "▼" + jr .load_cursor_state + +.cursor_off + lda_coord 17, 17 + +.load_cursor_state + ldcoord_a 18, 17 + ret + +BlinkCursor:: + push bc + ld a, [hl] + ld b, a + ld a, "▼" + cp b + pop bc + jr nz, .place_arrow + ldh a, [hMapObjectIndex] + dec a + ldh [hMapObjectIndex], a + ret nz + ldh a, [hObjectStructIndex] + dec a + ldh [hObjectStructIndex], a + ret nz + ld a, "─" + ld [hl], a + ld a, -1 + ldh [hMapObjectIndex], a + ld a, 6 + ldh [hObjectStructIndex], a + ret + +.place_arrow + ldh a, [hMapObjectIndex] + and a + ret z + dec a + ldh [hMapObjectIndex], a + ret nz + dec a + ldh [hMapObjectIndex], a + ldh a, [hObjectStructIndex] + dec a + ldh [hObjectStructIndex], a + ret nz + ld a, 6 + ldh [hObjectStructIndex], a + ld a, "▼" + ld [hl], a + ret diff --git a/home/lcd.asm b/home/lcd.asm new file mode 100644 index 0000000..f4c084c --- /dev/null +++ b/home/lcd.asm @@ -0,0 +1,63 @@ +; LCD handling + +LCD:: + push af + ldh a, [hLCDCPointer] + and a + jr z, .done + +; At this point it's assumed we're in BANK(wLYOverrides)! + push bc + ldh a, [rLY] + ld c, a + ld b, HIGH(wLYOverrides) + ld a, [bc] + ld b, a + ldh a, [hLCDCPointer] + ld c, a + ld a, b + ldh [c], a + pop bc + +.done + pop af + reti + +DisableLCD:: +; Turn the LCD off + +; Don't need to do anything if the LCD is already off + ldh a, [rLCDC] + bit rLCDC_ENABLE, a + ret z + + xor a + ldh [rIF], a + ldh a, [rIE] + ld b, a + +; Disable VBlank + res VBLANK, a + ldh [rIE], a + +.wait +; Wait until VBlank would normally happen + ldh a, [rLY] + cp LY_VBLANK + 1 + jr nz, .wait + + ldh a, [rLCDC] + and ~(1 << rLCDC_ENABLE) + ldh [rLCDC], a + + xor a + ldh [rIF], a + ld a, b + ldh [rIE], a + ret + +EnableLCD:: + ldh a, [rLCDC] + set rLCDC_ENABLE, a + ldh [rLCDC], a + ret diff --git a/home/map.asm b/home/map.asm new file mode 100644 index 0000000..70ba898 --- /dev/null +++ b/home/map.asm @@ -0,0 +1,2248 @@ +; Functions dealing with rendering and interacting with maps. + +ClearUnusedMapBuffer:: + ld hl, wUnusedMapBuffer + ld bc, wUnusedMapBufferEnd - wUnusedMapBuffer + xor a + jp ByteFill + +CheckScenes:: +; Checks wCurMapSceneScriptPointer. If it's empty, returns -1 in a. Otherwise, returns the active scene ID in a. + push hl + ld hl, wCurMapSceneScriptPointer + ld a, [hli] + ld h, [hl] + ld l, a + or h + ld a, [hl] + jr nz, .scene_exists + ld a, -1 + +.scene_exists + pop hl + ret + +GetCurrentMapSceneID:: +; Grabs the wram map scene script pointer for the current map and loads it into wCurMapSceneScriptPointer. +; If there is no scene, both bytes of wCurMapSceneScriptPointer are wiped clean. +; Copy the current map group and number into bc. This is needed for GetMapSceneID. + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a +; Blank out wCurMapSceneScriptPointer; this is the default scenario. + xor a + ld [wCurMapSceneScriptPointer], a + ld [wCurMapSceneScriptPointer + 1], a + call GetMapSceneID + ret c ; The map is not in the scene script table +; Load the scene script pointer from de into wCurMapSceneScriptPointer + ld a, e + ld [wCurMapSceneScriptPointer], a + ld a, d + ld [wCurMapSceneScriptPointer + 1], a + xor a + ret + +GetMapSceneID:: +; Searches the scene_var 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_var table, returns carry. + push bc + ldh a, [hROMBank] + push af + ld a, BANK(MapScenes) + rst Bankswitch + + ld hl, MapScenes +.loop + push hl + ld a, [hli] ; map group, or terminator + cp -1 + jr z, .end ; the current map is not in the scene_var table + cp b + jr nz, .next ; map group did not match + ld a, [hli] ; map number + cp c + jr z, .found ; we found our map + +.next + pop hl + ld de, 4 ; scene_var size + add hl, de + jr .loop + +.end + scf + jr .done + +.found + ld e, [hl] + inc hl + ld d, [hl] + +.done + pop hl + pop bc + ld a, b + rst Bankswitch + + pop bc + ret + +OverworldTextModeSwitch:: + call LoadMapPart + jp SwapTextboxPalettes + +LoadMapPart:: + ldh a, [hROMBank] + push af + + ld a, [wTilesetBlocksBank] + rst Bankswitch + call LoadMetatiles + + ld a, "■" + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + + ld a, BANK(_LoadMapPart) + rst Bankswitch + call _LoadMapPart + + pop af + rst Bankswitch + ret + +LoadMetatiles:: + ; de <- wOverworldMapAnchor + ld a, [wOverworldMapAnchor] + ld e, a + ld a, [wOverworldMapAnchor + 1] + ld d, a + ld hl, wSurroundingTiles + ld b, SCREEN_META_HEIGHT + +.row + push de + push hl + ld c, SCREEN_META_WIDTH + +.col + push de + push hl + ; Load the current map block. + ; If the current map block is a border block, load the border block. + ld a, [de] + and a + jr nz, .ok + ld a, [wMapBorderBlock] + +.ok + ; Load the current wSurroundingTiles address into de. + ld e, l + ld d, h + ; Set hl to the address of the current metatile data ([wTilesetBlocksAddress] + (a) tiles). +; BUG: LoadMetatiles wraps around past 128 blocks (see docs/bugs_and_glitches.md) + add a + ld l, a + ld h, 0 + add hl, hl + add hl, hl + add hl, hl + ld a, [wTilesetBlocksAddress] + add l + ld l, a + ld a, [wTilesetBlocksAddress + 1] + adc h + ld h, a + + ; copy the 4x4 metatile +rept METATILE_WIDTH - 1 +rept METATILE_WIDTH + ld a, [hli] + ld [de], a + inc de +endr + ld a, e + add SURROUNDING_WIDTH - METATILE_WIDTH + ld e, a + jr nc, .next\@ + inc d +.next\@ +endr +rept METATILE_WIDTH + ld a, [hli] + ld [de], a + inc de +endr + ; Next metatile + pop hl + ld de, METATILE_WIDTH + add hl, de + pop de + inc de + dec c + jp nz, .col + ; Next metarow + pop hl + ld de, SURROUNDING_WIDTH * METATILE_WIDTH + add hl, de + pop de + ld a, [wMapWidth] + add MAP_CONNECTION_PADDING_WIDTH * 2 + add e + ld e, a + jr nc, .ok2 + inc d +.ok2 + dec b + jp nz, .row + ret + +ReturnToMapFromSubmenu:: + ld a, MAPSETUP_SUBMENU + ldh [hMapEntryMethod], a + farcall RunMapSetupScript + xor a + ldh [hMapEntryMethod], a + ret + +CheckWarpTile:: + call GetDestinationWarpNumber + ret nc + + push bc + farcall CheckDirectionalWarp + pop bc + ret nc + + call CopyWarpData + scf + ret + +WarpCheck:: + call GetDestinationWarpNumber + ret nc + jp CopyWarpData + +GetDestinationWarpNumber:: + farcall CheckWarpCollision + ret nc + + ldh a, [hROMBank] + push af + + call SwitchToMapScriptsBank + call .GetDestinationWarpNumber + + pop de + ld a, d + rst Bankswitch + ret + +.GetDestinationWarpNumber: + ld a, [wPlayerMapY] + sub 4 + ld e, a + ld a, [wPlayerMapX] + sub 4 + ld d, a + ld a, [wCurMapWarpCount] + and a + ret z + + ld c, a + ld hl, wCurMapWarpsPointer + ld a, [hli] + ld h, [hl] + ld l, a +.loop + push hl + ld a, [hli] + cp e + jr nz, .next + ld a, [hli] + cp d + jr nz, .next + jr .found_warp + +.next + pop hl + ld a, WARP_EVENT_SIZE + add l + ld l, a + jr nc, .okay + inc h + +.okay + dec c + jr nz, .loop + xor a + ret + +.found_warp + pop hl + call .IncreaseHLTwice + ret nc ; never encountered + + ld a, [wCurMapWarpCount] + inc a + sub c + ld c, a + scf + ret + +.IncreaseHLTwice: + inc hl + inc hl + scf + ret + +CopyWarpData:: + ldh a, [hROMBank] + push af + + call SwitchToMapScriptsBank + call .CopyWarpData + + pop af + rst Bankswitch + scf + ret + +.CopyWarpData: + push bc + ld hl, wCurMapWarpsPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld a, c + dec a + ld bc, WARP_EVENT_SIZE + call AddNTimes + ld bc, 2 ; warp number + add hl, bc + ld a, [hli] + cp -1 + jr nz, .skip + ld hl, wBackupWarpNumber + ld a, [hli] + +.skip + pop bc + ld [wNextWarp], a + ld a, [hli] + ld [wNextMapGroup], a + ld a, [hli] + ld [wNextMapNumber], a + + ld a, c + ld [wPrevWarp], a + ld a, [wMapGroup] + ld [wPrevMapGroup], a + ld a, [wMapNumber] + ld [wPrevMapNumber], a + scf + ret + +CheckOutdoorMap:: + cp ROUTE + ret z + cp TOWN + ret + +CheckIndoorMap:: + cp INDOOR + ret z + cp CAVE + ret z + cp DUNGEON + ret z + cp GATE + ret + +LoadMapAttributes:: + call CopyMapPartialAndAttributes + call SwitchToMapScriptsBank + call ReadMapScripts + xor a ; do not skip object events + jp ReadMapEvents + +LoadMapAttributes_SkipObjects:: + call CopyMapPartialAndAttributes + call SwitchToMapScriptsBank + call ReadMapScripts + ld a, TRUE ; skip object events + jp ReadMapEvents + +CopyMapPartialAndAttributes:: + call CopyMapPartial + call SwitchToMapAttributesBank + call GetMapAttributesPointer + call CopyMapAttributes + jp GetMapConnections + +ReadMapEvents:: + push af + ld hl, wMapEventsPointer + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + call ReadWarps + call ReadCoordEvents + call ReadBGEvents + + pop af + and a ; skip object events? + ret nz + + jp ReadObjectEvents + +ReadMapScripts:: + ld hl, wMapScriptsPointer + ld a, [hli] + ld h, [hl] + ld l, a + call ReadMapSceneScripts + jp ReadMapCallbacks + +CopyMapAttributes:: + ld de, wMapAttributes + ld c, wMapAttributesEnd - wMapAttributes +.loop + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .loop + ret + +GetMapConnections:: + ld a, $ff + ld [wNorthConnectedMapGroup], a + ld [wSouthConnectedMapGroup], a + ld [wWestConnectedMapGroup], a + ld [wEastConnectedMapGroup], a + + ld a, [wMapConnections] + ld b, a + + bit NORTH_F, b + jr z, .no_north + ld de, wNorthMapConnection + call GetMapConnection +.no_north + + bit SOUTH_F, b + jr z, .no_south + ld de, wSouthMapConnection + call GetMapConnection +.no_south + + bit WEST_F, b + jr z, .no_west + ld de, wWestMapConnection + call GetMapConnection +.no_west + + bit EAST_F, b + ret z + ld de, wEastMapConnection +; fallthrough + +GetMapConnection:: +; Load map connection struct at hl into de. + ld c, wSouthMapConnection - wNorthMapConnection +.loop + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .loop + ret + +ReadMapSceneScripts:: + ld a, [hli] ; scene_script count + ld c, a + ld [wCurMapSceneScriptCount], a + ld a, l + ld [wCurMapSceneScriptsPointer], a + ld a, h + ld [wCurMapSceneScriptsPointer + 1], a + ld a, c + and a + ret z + + ld bc, SCENE_SCRIPT_SIZE + jp AddNTimes + +ReadMapCallbacks:: + ld a, [hli] + ld c, a + ld [wCurMapCallbackCount], a + ld a, l + ld [wCurMapCallbacksPointer], a + ld a, h + ld [wCurMapCallbacksPointer + 1], a + ld a, c + and a + ret z + + ld bc, CALLBACK_SIZE + jp AddNTimes + +ReadWarps:: + ld a, [hli] + ld c, a + ld [wCurMapWarpCount], a + ld a, l + ld [wCurMapWarpsPointer], a + ld a, h + ld [wCurMapWarpsPointer + 1], a + ld a, c + and a + ret z + ld bc, WARP_EVENT_SIZE + jp AddNTimes + +ReadCoordEvents:: + ld a, [hli] + ld c, a + ld [wCurMapCoordEventCount], a + ld a, l + ld [wCurMapCoordEventsPointer], a + ld a, h + ld [wCurMapCoordEventsPointer + 1], a + + ld a, c + and a + ret z + + ld bc, COORD_EVENT_SIZE + jp AddNTimes + +ReadBGEvents:: + ld a, [hli] + ld c, a + ld [wCurMapBGEventCount], a + ld a, l + ld [wCurMapBGEventsPointer], a + ld a, h + ld [wCurMapBGEventsPointer + 1], a + + ld a, c + and a + ret z + + ld bc, BG_EVENT_SIZE + jp AddNTimes + +ReadObjectEvents:: + push hl + call ClearObjectStructs + pop de + ld hl, wMap1Object + ld a, [de] + inc de + ld [wCurMapObjectEventCount], a + ld a, e + ld [wCurMapObjectEventsPointer], a + ld a, d + ld [wCurMapObjectEventsPointer + 1], a + + ld a, [wCurMapObjectEventCount] + call CopyMapObjectEvents + +; get NUM_OBJECTS - [wCurMapObjectEventCount] +; BUG: ReadObjectEvents overflows into wObjectMasks (see docs/bugs_and_glitches.md) + ld a, [wCurMapObjectEventCount] + ld c, a + ld a, NUM_OBJECTS + sub c + jr z, .skip + + ; could have done "inc hl" instead + ld bc, 1 + add hl, bc + ld bc, MAPOBJECT_LENGTH +.loop + ld [hl], 0 + inc hl + ld [hl], -1 + dec hl + add hl, bc + dec a + jr nz, .loop + +.skip + ld h, d + ld l, e + ret + +CopyMapObjectEvents:: + and a + ret z + + ld c, a +.loop + push bc + push hl + ld a, $ff + ld [hli], a + ld b, OBJECT_EVENT_SIZE +.loop2 + ld a, [de] + inc de + ld [hli], a + dec b + jr nz, .loop2 + + pop hl + ld bc, MAPOBJECT_LENGTH + add hl, bc + pop bc + dec c + jr nz, .loop + ret + +ClearObjectStructs:: + ld hl, wObject1Struct + ld bc, OBJECT_LENGTH * (NUM_OBJECT_STRUCTS - 1) + xor a + call ByteFill + +; Just to make sure (this is rather pointless) + ld hl, wObject1Struct + ld de, OBJECT_LENGTH + ld c, NUM_OBJECT_STRUCTS - 1 + xor a +.loop + ld [hl], a + add hl, de + dec c + jr nz, .loop + ret + +GetWarpDestCoords:: + call GetMapScriptsBank + rst Bankswitch + + ld hl, wMapEventsPointer + ld a, [hli] + ld h, [hl] + ld l, a +rept 3 ; get to the warp coords + inc hl +endr + ld a, [wWarpNumber] + dec a + ld c, a + ld b, 0 + ld a, WARP_EVENT_SIZE + call AddNTimes + ld a, [hli] + ld [wYCoord], a + ld a, [hli] + ld [wXCoord], a + ; destination warp number + ld a, [hli] + cp -1 + jr nz, .skip + call .backup + +.skip + farcall GetMapScreenCoords + ret + +.backup + ld a, [wPrevWarp] + ld [wBackupWarpNumber], a + ld a, [wPrevMapGroup] + ld [wBackupMapGroup], a + ld a, [wPrevMapNumber] + ld [wBackupMapNumber], a + ret + +LoadBlockData:: + ld hl, wOverworldMapBlocks + ld bc, wOverworldMapBlocksEnd - wOverworldMapBlocks + ld a, 0 + call ByteFill + call ChangeMap + call FillMapConnections + ld a, MAPCALLBACK_TILES + jp RunMapCallback + +ChangeMap:: + ldh a, [hROMBank] + push af + + ld hl, wOverworldMapBlocks + ld a, [wMapWidth] + ldh [hConnectedMapWidth], a + add $6 + ldh [hConnectionStripLength], a + ld c, a + ld b, 0 + add hl, bc + add hl, bc + add hl, bc + ld c, 3 + add hl, bc + ld a, [wMapBlocksBank] + rst Bankswitch + + ld a, [wMapBlocksPointer] + ld e, a + ld a, [wMapBlocksPointer + 1] + ld d, a + ld a, [wMapHeight] + ld b, a +.row + push hl + ldh a, [hConnectedMapWidth] + ld c, a +.col + ld a, [de] + inc de + ld [hli], a + dec c + jr nz, .col + pop hl + ldh a, [hConnectionStripLength] + add l + ld l, a + jr nc, .okay + inc h +.okay + dec b + jr nz, .row + + pop af + rst Bankswitch + ret + +FillMapConnections:: +; North + ld a, [wNorthConnectedMapGroup] + cp $ff + jr z, .South + ld b, a + ld a, [wNorthConnectedMapNumber] + ld c, a + call GetAnyMapBlocksBank + + ld a, [wNorthConnectionStripPointer] + ld l, a + ld a, [wNorthConnectionStripPointer + 1] + ld h, a + ld a, [wNorthConnectionStripLocation] + ld e, a + ld a, [wNorthConnectionStripLocation + 1] + ld d, a + ld a, [wNorthConnectionStripLength] + ldh [hConnectionStripLength], a + ld a, [wNorthConnectedMapWidth] + ldh [hConnectedMapWidth], a + call FillNorthConnectionStrip + +.South: + ld a, [wSouthConnectedMapGroup] + cp $ff + jr z, .West + ld b, a + ld a, [wSouthConnectedMapNumber] + ld c, a + call GetAnyMapBlocksBank + + ld a, [wSouthConnectionStripPointer] + ld l, a + ld a, [wSouthConnectionStripPointer + 1] + ld h, a + ld a, [wSouthConnectionStripLocation] + ld e, a + ld a, [wSouthConnectionStripLocation + 1] + ld d, a + ld a, [wSouthConnectionStripLength] + ldh [hConnectionStripLength], a + ld a, [wSouthConnectedMapWidth] + ldh [hConnectedMapWidth], a + call FillSouthConnectionStrip + +.West: + ld a, [wWestConnectedMapGroup] + cp $ff + jr z, .East + ld b, a + ld a, [wWestConnectedMapNumber] + ld c, a + call GetAnyMapBlocksBank + + ld a, [wWestConnectionStripPointer] + ld l, a + ld a, [wWestConnectionStripPointer + 1] + ld h, a + ld a, [wWestConnectionStripLocation] + ld e, a + ld a, [wWestConnectionStripLocation + 1] + ld d, a + ld a, [wWestConnectionStripLength] + ld b, a + ld a, [wWestConnectedMapWidth] + ldh [hConnectionStripLength], a + call FillWestConnectionStrip + +.East: + ld a, [wEastConnectedMapGroup] + cp $ff + ret z + ld b, a + ld a, [wEastConnectedMapNumber] + ld c, a + call GetAnyMapBlocksBank + + ld a, [wEastConnectionStripPointer] + ld l, a + ld a, [wEastConnectionStripPointer + 1] + ld h, a + ld a, [wEastConnectionStripLocation] + ld e, a + ld a, [wEastConnectionStripLocation + 1] + ld d, a + ld a, [wEastConnectionStripLength] + ld b, a + ld a, [wEastConnectedMapWidth] + ldh [hConnectionStripLength], a + jp FillEastConnectionStrip + +FillNorthConnectionStrip:: +FillSouthConnectionStrip:: + ld c, 3 +.y + push de + + push hl + ldh a, [hConnectionStripLength] + ld b, a +.x + ld a, [hli] + ld [de], a + inc de + dec b + jr nz, .x + pop hl + + ldh a, [hConnectedMapWidth] + ld e, a + ld d, 0 + add hl, de + pop de + + ld a, [wMapWidth] + add 6 + add e + ld e, a + jr nc, .okay + inc d +.okay + dec c + jr nz, .y + ret + +FillWestConnectionStrip:: +FillEastConnectionStrip:: +.loop + ld a, [wMapWidth] + add 6 + ldh [hConnectedMapWidth], a + + push de + + push hl + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + pop hl + + ldh a, [hConnectionStripLength] + ld e, a + ld d, 0 + add hl, de + pop de + + ldh a, [hConnectedMapWidth] + add e + ld e, a + jr nc, .okay + inc d +.okay + dec b + jr nz, .loop + ret + +LoadMapStatus:: + ld [wMapStatus], a + ret + +CallScript:: +; Call a script at a:hl. + + ld [wScriptBank], a + ld a, l + ld [wScriptPos], a + ld a, h + ld [wScriptPos + 1], a + + ld a, PLAYEREVENT_MAPSCRIPT + ld [wScriptRunning], a + + scf + ret + +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 + +RunMapCallback:: +; Will run the first callback found with execution index equal to a. + ld b, a + ldh a, [hROMBank] + push af + call SwitchToMapScriptsBank + call .FindCallback + jr nc, .done + + call GetMapScriptsBank + ld b, a + ld d, h + ld e, l + call ExecuteCallbackScript + +.done + pop af + rst Bankswitch + ret + +.FindCallback: + ld a, [wCurMapCallbackCount] + ld c, a + and a + ret z + ld hl, wCurMapCallbacksPointer + ld a, [hli] + ld h, [hl] + ld l, a + or h + ret z + ld de, CALLBACK_SIZE +.loop + ld a, [hl] + cp b + jr z, .found + add hl, de + dec c + jr nz, .loop + xor a + ret + +.found + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + scf + ret + +ExecuteCallbackScript:: +; Do map callback de and return to script bank b. + farcall CallCallback + ld a, [wScriptMode] + push af + ld hl, wScriptFlags + ld a, [hl] + push af + set 1, [hl] + farcall EnableScriptMode + farcall ScriptEvents + pop af + ld [wScriptFlags], a + pop af + ld [wScriptMode], a + ret + +MapTextbox:: + ldh a, [hROMBank] + push af + + ld a, b + rst Bankswitch + + push hl + call SpeechTextbox + call SafeUpdateSprites + ld a, 1 + ldh [hOAMUpdate], a + call ApplyTilemap + pop hl + call PrintTextboxText + xor a + ldh [hOAMUpdate], a + + pop af + rst Bankswitch + ret + +Call_a_de:: +; Call a:de. + + ldh [hTempBank], a + ldh a, [hROMBank] + push af + ldh a, [hTempBank] + rst Bankswitch + + call .de + + pop af + rst Bankswitch + ret + +.de + push de + ret + +GetMovementData:: +; Initialize the movement data for object c at b:hl + ldh a, [hROMBank] + push af + ld a, b + rst Bankswitch + + ld a, c + call LoadMovementDataPointer + + pop hl + ld a, h + rst Bankswitch + ret + +GetScriptByte:: +; Return byte at wScriptBank:wScriptPos in a. + + push hl + push bc + ldh a, [hROMBank] + push af + ld a, [wScriptBank] + rst Bankswitch + + ld hl, wScriptPos + ld c, [hl] + inc hl + ld b, [hl] + + ld a, [bc] + + inc bc + ld [hl], b + dec hl + ld [hl], c + + ld b, a + pop af + rst Bankswitch + ld a, b + pop bc + pop hl + ret + +ObjectEvent:: + jumptextfaceplayer ObjectEventText + +ObjectEventText:: + text_far _ObjectEventText + text_end + +BGEvent:: ; unreferenced + jumptext BGEventText + +BGEventText:: + text_far _BGEventText + text_end + +CoordinatesEvent:: ; unreferenced + jumptext CoordinatesEventText + +CoordinatesEventText:: + text_far _CoordinatesEventText + text_end + +CheckObjectMask:: + ldh a, [hMapObjectIndex] + ld e, a + ld d, 0 + ld hl, wObjectMasks + add hl, de + ld a, [hl] + ret + +MaskObject:: + ldh a, [hMapObjectIndex] + ld e, a + ld d, 0 + ld hl, wObjectMasks + add hl, de + ld [hl], -1 ; masked + ret + +UnmaskObject:: + ldh a, [hMapObjectIndex] + ld e, a + ld d, 0 + ld hl, wObjectMasks + add hl, de + ld [hl], 0 ; unmasked + ret + +if DEF(_DEBUG) +ComputeROMXChecksum:: + ldh a, [hROMBank] + push af + ld a, c + rst Bankswitch + ld hl, $4000 ; ROMX start +.loop + ld a, [hli] + add e + ld e, a + ld a, d + adc 0 + ld d, a + ld a, h + cp $80 ; HIGH(ROMX end) + jr c, .loop + pop af + rst Bankswitch + ret +endc + +ScrollMapUp:: + hlcoord 0, 0 + ld de, wBGMapBuffer + call BackupBGMapRow + ld c, 2 * SCREEN_WIDTH + call ScrollBGMapPalettes + ld a, [wBGMapAnchor] + ld e, a + ld a, [wBGMapAnchor + 1] + ld d, a + call UpdateBGMapRow + ld a, $1 + ldh [hBGMapUpdate], a + ret + +ScrollMapDown:: + hlcoord 0, SCREEN_HEIGHT - 2 + ld de, wBGMapBuffer + call BackupBGMapRow + ld c, 2 * SCREEN_WIDTH + call ScrollBGMapPalettes + ld a, [wBGMapAnchor] + ld l, a + ld a, [wBGMapAnchor + 1] + ld h, a + ld bc, BG_MAP_WIDTH tiles + add hl, bc +; cap d at HIGH(vBGMap0) + ld a, h + and %00000011 + or HIGH(vBGMap0) + ld e, l + ld d, a + call UpdateBGMapRow + ld a, $1 + ldh [hBGMapUpdate], a + ret + +ScrollMapLeft:: + hlcoord 0, 0 + ld de, wBGMapBuffer + call BackupBGMapColumn + ld c, 2 * SCREEN_HEIGHT + call ScrollBGMapPalettes + ld a, [wBGMapAnchor] + ld e, a + ld a, [wBGMapAnchor + 1] + ld d, a + call UpdateBGMapColumn + ld a, $1 + ldh [hBGMapUpdate], a + ret + +ScrollMapRight:: + hlcoord SCREEN_WIDTH - 2, 0 + ld de, wBGMapBuffer + call BackupBGMapColumn + ld c, 2 * SCREEN_HEIGHT + call ScrollBGMapPalettes + ld a, [wBGMapAnchor] + ld e, a + and %11100000 + ld b, a + ld a, e + add SCREEN_HEIGHT + and %00011111 + or b + ld e, a + ld a, [wBGMapAnchor + 1] + ld d, a + call UpdateBGMapColumn + ld a, $1 + ldh [hBGMapUpdate], a + ret + +BackupBGMapRow:: + ld c, 2 * SCREEN_WIDTH +.loop + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .loop + ret + +BackupBGMapColumn:: + ld c, SCREEN_HEIGHT +.loop + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + inc de + ld a, SCREEN_WIDTH - 1 + add l + ld l, a + jr nc, .skip + inc h + +.skip + dec c + jr nz, .loop + ret + +UpdateBGMapRow:: + ld hl, wBGMapBufferPointers + push de + call .iteration + pop de + ld a, BG_MAP_WIDTH + add e + ld e, a + +.iteration + ld c, 10 +.loop + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, e + inc a + inc a + and $1f + ld b, a + ld a, e + and $e0 + or b + ld e, a + dec c + jr nz, .loop + ld a, SCREEN_WIDTH + ldh [hBGMapTileCount], a + ret + +UpdateBGMapColumn:: + ld hl, wBGMapBufferPointers + ld c, SCREEN_HEIGHT +.loop + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, BG_MAP_WIDTH + add e + ld e, a + jr nc, .skip + inc d +; cap d at HIGH(vBGMap0) + ld a, d + and %11 + or HIGH(vBGMap0) + ld d, a + +.skip + dec c + jr nz, .loop + ld a, SCREEN_HEIGHT + ldh [hBGMapTileCount], a + ret + +LoadTilesetGFX:: + ld hl, wTilesetAddress + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wTilesetBank] + ld e, a + + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + + ld a, e + ld de, wDecompressScratch + call FarDecompress + + ld hl, wDecompressScratch + ld de, vTiles2 + ld bc, $60 tiles + call CopyBytes + + ldh a, [rVBK] + push af + ld a, BANK(vTiles5) + ldh [rVBK], a + + ld hl, wDecompressScratch + $60 tiles + ld de, vTiles5 + ld bc, $60 tiles + call CopyBytes + + pop af + ldh [rVBK], a + + pop af + ldh [rSVBK], a + +; These tilesets support dynamic per-mapgroup roof tiles. + ld a, [wMapTileset] + cp TILESET_JOHTO + jr z, .load_roof + cp TILESET_JOHTO_MODERN + jr z, .load_roof + cp TILESET_BATTLE_TOWER_OUTSIDE + jr z, .load_roof + jr .skip_roof + +.load_roof + farcall LoadMapGroupRoof + +.skip_roof + xor a + ldh [hTileAnimFrame], a + ret + +BufferScreen:: + ld hl, wOverworldMapAnchor + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wScreenSave + ld c, SCREEN_META_HEIGHT + ld b, SCREEN_META_WIDTH +.row + push bc + push hl +.col + ld a, [hli] + ld [de], a + inc de + dec b + jr nz, .col + pop hl + ld a, [wMapWidth] + add 6 + ld c, a + ld b, 0 + add hl, bc + pop bc + dec c + jr nz, .row + ret + +SaveScreen:: + ld hl, wOverworldMapAnchor + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wScreenSave + ld a, [wMapWidth] + add 6 + ldh [hMapObjectIndex], a + ld a, [wPlayerStepDirection] + and a + jr z, .down + cp UP + jr z, .up + cp LEFT + jr z, .left + cp RIGHT + jr z, .right + ret + +.up + ld de, wScreenSave + SCREEN_META_WIDTH + ldh a, [hMapObjectIndex] + ld c, a + ld b, 0 + add hl, bc + jr .vertical + +.down + ld de, wScreenSave +.vertical + ld b, SCREEN_META_WIDTH + ld c, SCREEN_META_HEIGHT - 1 + jr SaveScreen_LoadConnection + +.left + ld de, wScreenSave + 1 + inc hl + jr .horizontal + +.right + ld de, wScreenSave +.horizontal + ld b, SCREEN_META_WIDTH - 1 + ld c, SCREEN_META_HEIGHT + jr SaveScreen_LoadConnection + +LoadConnectionBlockData:: + ld hl, wOverworldMapAnchor + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wMapWidth] + add 6 + ldh [hConnectionStripLength], a + ld de, wScreenSave + ld b, SCREEN_META_WIDTH + ld c, SCREEN_META_HEIGHT +; fallthrough + +SaveScreen_LoadConnection:: +.row + push bc + push hl + push de +.col + ld a, [de] + inc de + ld [hli], a + dec b + jr nz, .col + pop de + ld a, e + add 6 + ld e, a + jr nc, .okay + inc d +.okay + pop hl + ldh a, [hConnectionStripLength] + ld c, a + ld b, 0 + add hl, bc + pop bc + dec c + jr nz, .row + ret + +GetMovementPermissions:: + xor a + ld [wTilePermissions], a + call .LeftRight + call .UpDown +; get coords of current tile + ld a, [wPlayerMapX] + ld d, a + ld a, [wPlayerMapY] + ld e, a + call GetCoordTile + ld [wPlayerTile], a + call .CheckHiNybble + ret nz + + ld a, [wPlayerTile] + and 7 + ld hl, .MovementPermissionsData + add l + ld l, a + ld a, 0 + adc h + ld h, a + ld a, [hl] + ld hl, wTilePermissions + or [hl] + ld [hl], a + ret + +.MovementPermissionsData: + db DOWN_MASK + db UP_MASK + db LEFT_MASK + db RIGHT_MASK + db DOWN_MASK | RIGHT_MASK + db UP_MASK | RIGHT_MASK + db DOWN_MASK | LEFT_MASK + db UP_MASK | LEFT_MASK + +.UpDown: + ld a, [wPlayerMapX] + ld d, a + ld a, [wPlayerMapY] + ld e, a + + push de + inc e + call GetCoordTile + ld [wTileDown], a + call .Down + + pop de + dec e + call GetCoordTile + ld [wTileUp], a + jr .Up + +.LeftRight: + ld a, [wPlayerMapX] + ld d, a + ld a, [wPlayerMapY] + ld e, a + + push de + dec d + call GetCoordTile + ld [wTileLeft], a + call .Left + + pop de + inc d + call GetCoordTile + ld [wTileRight], a + jr .Right + +.Down: + call .CheckHiNybble + ret nz + ld a, [wTileDown] + and %111 + cp COLL_UP_WALL & %111 ; COLL_UP_BUOY & %111 + jr z, .ok_down + cp COLL_UP_RIGHT_WALL & %111 ; COLL_UP_RIGHT_BUOY & %111 + jr z, .ok_down + cp COLL_UP_LEFT_WALL & %111 ; COLL_UP_LEFT_BUOY & %111 + ret nz + +.ok_down + ld a, [wTilePermissions] + or FACE_DOWN + ld [wTilePermissions], a + ret + +.Up: + call .CheckHiNybble + ret nz + ld a, [wTileUp] + and %111 + cp COLL_DOWN_WALL & %111 ; COLL_DOWN_BUOY & %111 + jr z, .ok_up + cp COLL_DOWN_RIGHT_WALL & %111 ; COLL_DOWN_RIGHT_BUOY & %111 + jr z, .ok_up + cp COLL_DOWN_LEFT_WALL & %111 ; COLL_DOWN_LEFT_BUOY & %111 + ret nz + +.ok_up + ld a, [wTilePermissions] + or FACE_UP + ld [wTilePermissions], a + ret + +.Right: + call .CheckHiNybble + ret nz + ld a, [wTileRight] + and %111 + cp COLL_LEFT_WALL & %111 ; COLL_LEFT_BUOY & %111 + jr z, .ok_right + cp COLL_DOWN_LEFT_WALL & %111 ; COLL_DOWN_LEFT_BUOY & %111 + jr z, .ok_right + cp COLL_UP_LEFT_WALL & %111 ; COLL_UP_LEFT_BUOY & %111 + ret nz + +.ok_right + ld a, [wTilePermissions] + or FACE_RIGHT + ld [wTilePermissions], a + ret + +.Left: + call .CheckHiNybble + ret nz + ld a, [wTileLeft] + and %111 + cp COLL_RIGHT_WALL & %111 ; COLL_RIGHT_BUOY & %111 + jr z, .ok_left + cp COLL_DOWN_RIGHT_WALL & %111 ; COLL_DOWN_RIGHT_BUOY & %111 + jr z, .ok_left + cp COLL_UP_RIGHT_WALL & %111 ; COLL_UP_RIGHT_BUOY & %111 + ret nz + +.ok_left + ld a, [wTilePermissions] + or FACE_LEFT + ld [wTilePermissions], a + ret + +.CheckHiNybble: + and $f0 + cp HI_NYBBLE_SIDE_WALLS + ret z + cp HI_NYBBLE_SIDE_BUOYS + ret + +GetFacingTileCoord:: +; Return map coordinates in (d, e) and tile id in a +; of the tile the player is facing. + + ld a, [wPlayerDirection] + and %1100 + srl a + srl a + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld de, .Directions + add hl, de + + ld d, [hl] + inc hl + ld e, [hl] + inc hl + + ld a, [hli] + ld h, [hl] + ld l, a + + ld a, [wPlayerMapX] + add d + ld d, a + ld a, [wPlayerMapY] + add e + ld e, a + ld a, [hl] + ret + +.Directions: + ; x, y + db 0, 1 + dw wTileDown + db 0, -1 + dw wTileUp + db -1, 0 + dw wTileLeft + db 1, 0 + dw wTileRight + +GetCoordTile:: +; Get the collision byte for tile d, e + call GetBlockLocation + ld a, [hl] + and a + jr z, .nope + ld l, a + ld h, 0 + add hl, hl + add hl, hl + ld a, [wTilesetCollisionAddress] + ld c, a + ld a, [wTilesetCollisionAddress + 1] + ld b, a + add hl, bc + rr d + jr nc, .nocarry + inc hl + +.nocarry + rr e + jr nc, .nocarry2 + inc hl + inc hl + +.nocarry2 + ld a, [wTilesetCollisionBank] + jp GetFarByte + +.nope + ld a, -1 + ret + +GetBlockLocation:: + ld a, [wMapWidth] + add 6 + ld c, a + ld b, 0 + ld hl, wOverworldMapBlocks + 1 + add hl, bc + ld a, e + srl a + jr z, .nope + and a +.loop + srl a + jr nc, .ok + add hl, bc + +.ok + sla c + rl b + and a + jr nz, .loop + +.nope + ld c, d + srl c + ld b, 0 + add hl, bc + ret + +CheckFacingBGEvent:: + call GetFacingTileCoord +; Load facing into b. + ld b, a +; Convert the coordinates at de to within-boundaries coordinates. + ld a, d + sub 4 + ld d, a + ld a, e + sub 4 + ld e, a +; If there are no BG events, we don't need to be here. + ld a, [wCurMapBGEventCount] + and a + ret z + + ld c, a + ldh a, [hROMBank] + push af + call SwitchToMapScriptsBank + call CheckIfFacingTileCoordIsBGEvent + pop hl + ld a, h + rst Bankswitch + ret + +CheckIfFacingTileCoordIsBGEvent:: +; Checks to see if you are facing a BG event. If so, copies it into wCurBGEvent and sets carry. + ld hl, wCurMapBGEventsPointer + ld a, [hli] + ld h, [hl] + ld l, a +.loop + push hl + ld a, [hli] + cp e + jr nz, .next + ld a, [hli] + cp d + jr nz, .next + jr .copysign + +.next + pop hl + ld a, BG_EVENT_SIZE + add l + ld l, a + jr nc, .nocarry + inc h + +.nocarry + dec c + jr nz, .loop + xor a + ret + +.copysign + pop hl + ld de, wCurBGEvent + ld bc, BG_EVENT_SIZE + call CopyBytes + scf + ret + +CheckCurrentMapCoordEvents:: +; If there are no coord events, we don't need to be here. + ld a, [wCurMapCoordEventCount] + and a + ret z +; Copy the coord event count into c. + ld c, a + ldh a, [hROMBank] + push af + call SwitchToMapScriptsBank + call .CoordEventCheck + pop hl + ld a, h + rst Bankswitch + ret + +.CoordEventCheck: +; Checks to see if you are standing on a coord event. If yes, copies the event to wCurCoordEvent and sets carry. + ld hl, wCurMapCoordEventsPointer + ld a, [hli] + ld h, [hl] + ld l, a +; Load the active scene ID into b + call CheckScenes + ld b, a +; Load your current coordinates into de. This will be used to check if your position is in the coord event table for the current map. + ld a, [wPlayerMapX] + sub 4 + ld d, a + ld a, [wPlayerMapY] + sub 4 + ld e, a + +.loop + push hl + ld a, [hli] + cp b + jr z, .got_id + cp -1 + jr nz, .next + +.got_id + ld a, [hli] + cp e + jr nz, .next + ld a, [hli] + cp d + jr nz, .next + jr .copy_coord_event + +.next + pop hl + ld a, COORD_EVENT_SIZE + add l + ld l, a + jr nc, .nocarry + inc h + +.nocarry + dec c + jr nz, .loop + xor a + ret + +.copy_coord_event + pop hl + ld de, wCurCoordEvent + ld bc, COORD_EVENT_SIZE + call CopyBytes + scf + ret + +FadeToMenu:: + xor a + ldh [hBGMapMode], a + call LoadStandardMenuHeader + farcall FadeOutPalettes + call ClearSprites + jp DisableSpriteUpdates + +CloseSubmenu:: + call ClearBGPalettes + call ReloadTilesetAndPalettes + call UpdateSprites + call ExitMenu + jr FinishExitMenu + +ExitAllMenus:: + call ClearBGPalettes + call ExitMenu + call ReloadTilesetAndPalettes + call UpdateSprites +FinishExitMenu:: + ld b, SCGB_MAPPALS + call GetSGBLayout + farcall LoadOW_BGPal7 + call WaitBGMap2 + farcall FadeInPalettes + jp EnableSpriteUpdates + +ReturnToMapWithSpeechTextbox:: + push af + ld a, $1 + ld [wSpriteUpdatesEnabled], a + call ClearBGPalettes + call ClearSprites + call ReloadTilesetAndPalettes + hlcoord 0, 12 + lb bc, 4, 18 + call Textbox + ld hl, wVramState + set 0, [hl] + call UpdateSprites + call WaitBGMap2 + ld b, SCGB_MAPPALS + call GetSGBLayout + farcall LoadOW_BGPal7 + call UpdateTimePals + call DelayFrame + ld a, $1 + ldh [hMapAnims], a + pop af + ret + +ReloadTilesetAndPalettes:: + call DisableLCD + call ClearSprites + farcall RefreshSprites + call LoadStandardFont + call LoadFontsExtra + ldh a, [hROMBank] + push af + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call SwitchToAnyMapAttributesBank + farcall UpdateTimeOfDayPal + call OverworldTextModeSwitch + call LoadTilesetGFX + ld a, 9 + call SkipMusic + pop af + rst Bankswitch + jp EnableLCD + +GetMapPointer:: + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a +GetAnyMapPointer:: +; Prior to calling this function, you must have switched banks so that +; MapGroupPointers is visible. + +; inputs: +; b = map group, c = map number + +; outputs: +; hl points to the map within its group + push bc ; save map number for later + + ; get pointer to map group + dec b + ld c, b + ld b, 0 + ld hl, MapGroupPointers + add hl, bc + add hl, bc + + ld a, [hli] + ld h, [hl] + ld l, a + pop bc ; restore map number + + ; find the cth map within the group + dec c + ld b, 0 + ld a, MAP_LENGTH + jp AddNTimes + +GetMapField:: +; Extract data from the current map's group entry. + +; inputs: +; de = offset of desired data within the map (a MAP_* constant) + +; outputs: +; bc = data from the current map's field +; (e.g., de = MAP_TILESET would return a pointer to the tileset id) + + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a +GetAnyMapField:: + ; bankswitch + ldh a, [hROMBank] + push af + ld a, BANK(MapGroupPointers) + rst Bankswitch + + call GetAnyMapPointer + add hl, de + ld c, [hl] + inc hl + ld b, [hl] + + ; bankswitch back + pop af + rst Bankswitch + ret + +SwitchToMapAttributesBank:: + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a +SwitchToAnyMapAttributesBank:: + call GetAnyMapAttributesBank + rst Bankswitch + ret + +GetMapAttributesBank:: ; unreferenced + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a +GetAnyMapAttributesBank:: + push hl + push de + ld de, MAP_MAPATTRIBUTES_BANK + call GetAnyMapField + ld a, c + pop de + pop hl + ret + +CopyMapPartial:: +; Copy map data bank, tileset, environment, and map data address +; from the current map's entry within its group. + ldh a, [hROMBank] + push af + ld a, BANK(MapGroupPointers) + rst Bankswitch + + call GetMapPointer + ld de, wMapPartial + ld bc, wMapPartialEnd - wMapPartial + call CopyBytes + + pop af + rst Bankswitch + ret + +SwitchToMapScriptsBank:: + ld a, [wMapScriptsBank] + rst Bankswitch + ret + +GetMapScriptsBank:: + ld a, [wMapScriptsBank] + ret + +GetAnyMapBlocksBank:: +; Return the blockdata bank for group b map c. + push hl + push de + push bc + + push bc + ld de, MAP_MAPATTRIBUTES + call GetAnyMapField + ld l, c + ld h, b + pop bc + + push hl + ld de, MAP_MAPATTRIBUTES_BANK + call GetAnyMapField + pop hl + + ld de, MAP_MAPATTRIBUTES ; blockdata bank + add hl, de + ld a, c + call GetFarByte + rst Bankswitch + + pop bc + pop de + pop hl + ret + +GetMapAttributesPointer:: +; returns the current map's data pointer in hl. + push bc + push de + ld de, MAP_MAPATTRIBUTES + call GetMapField + ld l, c + ld h, b + pop de + pop bc + ret + +GetMapEnvironment:: + push hl + push de + push bc + ld de, MAP_ENVIRONMENT + call GetMapField + ld a, c + pop bc + pop de + pop hl + ret + +GetAnyMapEnvironment:: + push hl + push de + push bc + ld de, MAP_ENVIRONMENT + call GetAnyMapField + ld a, c + pop bc + pop de + pop hl + ret + +GetAnyMapTileset:: + ld de, MAP_TILESET + call GetAnyMapField + ld a, c + ret + +GetWorldMapLocation:: +; given a map group/id in bc, return its location on the Pokégear map. + push hl + push de + push bc + + ld de, MAP_LOCATION + call GetAnyMapField + ld a, c + + pop bc + pop de + pop hl + ret + +GetMapMusic:: + push hl + push bc + ld de, MAP_MUSIC + call GetMapField + ld a, c + cp MUSIC_MAHOGANY_MART + jr z, .mahoganymart + bit RADIO_TOWER_MUSIC_F, c + jr nz, .radiotower + farcall Function8b342 + ld e, c + ld d, 0 +.done + pop bc + pop hl + ret + +.radiotower + ld a, [wStatusFlags2] + bit STATUSFLAGS2_ROCKETS_IN_RADIO_TOWER_F, a + jr z, .clearedradiotower + ld de, MUSIC_ROCKET_OVERTURE + jr .done + +.clearedradiotower + ; the rest of the byte + ld a, c + and RADIO_TOWER_MUSIC - 1 + ld e, a + ld d, 0 + jr .done + +.mahoganymart + ld a, [wStatusFlags2] + bit STATUSFLAGS2_ROCKETS_IN_MAHOGANY_F, a + jr z, .clearedmahogany + ld de, MUSIC_ROCKET_HIDEOUT + jr .done + +.clearedmahogany + ld de, MUSIC_CHERRYGROVE_CITY + jr .done + +GetMapTimeOfDay:: + call GetPhoneServiceTimeOfDayByte + and $f + ret + +GetMapPhoneService:: + call GetPhoneServiceTimeOfDayByte + and $f0 + swap a + ret + +GetPhoneServiceTimeOfDayByte:: + push hl + push bc + + ld de, MAP_PALETTE + call GetMapField + ld a, c + + pop bc + pop hl + ret + +GetFishingGroup:: + push de + push hl + push bc + + ld de, MAP_FISHGROUP + call GetMapField + ld a, c + + pop bc + pop hl + pop de + ret + +LoadMapTileset:: + push hl + push bc + + ld hl, Tilesets + ld bc, TILESET_LENGTH + ld a, [wMapTileset] + call AddNTimes + + ld de, wTilesetBank + ld bc, TILESET_LENGTH + + ld a, BANK(Tilesets) + call FarCopyBytes + + pop bc + pop hl + ret diff --git a/home/map_objects.asm b/home/map_objects.asm new file mode 100644 index 0000000..bd17c0f --- /dev/null +++ b/home/map_objects.asm @@ -0,0 +1,575 @@ +; Functions handling map objects. + +GetSpritePalette:: + push hl + push de + push bc + ld c, a + + farcall _GetSpritePalette + + ld a, c + pop bc + pop de + pop hl + ret + +GetSpriteVTile:: + push hl + push bc + ld hl, wUsedSprites + 2 + ld c, SPRITE_GFX_LIST_CAPACITY - 1 + ld b, a + ldh a, [hMapObjectIndex] + cp 0 + jr z, .nope + ld a, b +.loop + cp [hl] + jr z, .found + inc hl + inc hl + dec c + jr nz, .loop + ld a, [wUsedSprites + 1] + scf + jr .done + +.nope + ld a, [wUsedSprites + 1] + jr .done + +.found + inc hl + xor a + ld a, [hl] + +.done + pop bc + pop hl + ret + +DoesSpriteHaveFacings:: + push de + push hl + + ld b, a + ldh a, [hROMBank] + push af + ld a, BANK(_DoesSpriteHaveFacings) + rst Bankswitch + + ld a, b + call _DoesSpriteHaveFacings + ld c, a + + pop de + ld a, d + rst Bankswitch + + pop hl + pop de + ret + +GetPlayerTile:: + ld a, [wPlayerTile] + call GetTileCollision + ld b, a + ret + +CheckOnWater:: + ld a, [wPlayerTile] + call GetTileCollision + sub WATER_TILE + ret z + and a + ret + +GetTileCollision:: +; Get the collision type of tile a. + + push de + push hl + + ld hl, TileCollisionTable + ld e, a + ld d, 0 + add hl, de + + ldh a, [hROMBank] + push af + ld a, BANK(TileCollisionTable) + rst Bankswitch + ld e, [hl] + pop af + rst Bankswitch + + ld a, e + and $f ; lo nybble only + + pop hl + pop de + ret + +CheckGrassTile:: + ld d, a + and $f0 + cp HI_NYBBLE_TALL_GRASS + jr z, .check + cp HI_NYBBLE_WATER + jr nz, .nope +.check + ld a, d + and LO_NYBBLE_GRASS + ret z +.nope + scf + ret + +CheckSuperTallGrassTile:: + cp COLL_LONG_GRASS + ret z + cp COLL_LONG_GRASS_1C + ret + +CheckCutTreeTile:: + cp COLL_CUT_TREE + ret z + cp COLL_CUT_TREE_1A + ret + +CheckHeadbuttTreeTile:: + cp COLL_HEADBUTT_TREE + ret z + cp COLL_HEADBUTT_TREE_1D + ret + +CheckCounterTile:: + cp COLL_COUNTER + ret z + cp COLL_COUNTER_98 + ret + +CheckPitTile:: + cp COLL_PIT + ret z + cp COLL_PIT_68 + ret + +CheckIceTile:: + cp COLL_ICE + ret z + cp COLL_ICE_2B + ret z + scf + ret + +CheckWhirlpoolTile:: + nop + cp COLL_WHIRLPOOL + ret z + cp COLL_WHIRLPOOL_2C + ret z + scf + ret + +CheckWaterfallTile:: + cp COLL_WATERFALL + ret z + cp COLL_CURRENT_DOWN + ret + +CheckStandingOnEntrance:: + ld a, [wPlayerTile] + cp COLL_DOOR + ret z + cp COLL_DOOR_79 + ret z + cp COLL_STAIRCASE + ret z + cp COLL_CAVE + ret + +GetMapObject:: +; Return the location of map object a in bc. + ld hl, wMapObjects + ld bc, MAPOBJECT_LENGTH + call AddNTimes + ld b, h + ld c, l + ret + +CheckObjectVisibility:: +; Sets carry if the object is not visible on the screen. + ldh [hMapObjectIndex], a + call GetMapObject + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, bc + ld a, [hl] + cp -1 + jr z, .not_visible + ldh [hObjectStructIndex], a + call GetObjectStruct + and a + ret + +.not_visible + scf + ret + +CheckObjectTime:: + ld hl, MAPOBJECT_HOUR_1 + add hl, bc + ld a, [hl] + cp -1 + jr nz, .check_hour + ld hl, MAPOBJECT_TIMEOFDAY + add hl, bc + ld a, [hl] + cp -1 + jr z, .timeofday_always + ld hl, .TimesOfDay + ld a, [wTimeOfDay] + add l + ld l, a + jr nc, .ok + inc h + +.ok + ld a, [hl] + ld hl, MAPOBJECT_TIMEOFDAY + add hl, bc + and [hl] + jr nz, .timeofday_always + scf + ret + +.timeofday_always + and a + ret + +.TimesOfDay: +; entries correspond to TimeOfDay values + db MORN + db DAY + db NITE + +.check_hour + ld hl, MAPOBJECT_HOUR_1 + add hl, bc + ld d, [hl] + ld hl, MAPOBJECT_HOUR_2 + add hl, bc + ld e, [hl] + ld hl, hHours + ld a, d + cp e + ret z + jr c, .check_timeofday + ld a, [hl] + cp d + ret nc + cp e + ret z + ccf + ret + +.check_timeofday + ld a, e + cp [hl] + ret c + ld a, [hl] + cp d + ret + +UnmaskCopyMapObjectStruct:: + ldh [hMapObjectIndex], a + call UnmaskObject + ldh a, [hMapObjectIndex] + call GetMapObject + farcall CopyObjectStruct + ret + +ApplyDeletionToMapObject:: + ldh [hMapObjectIndex], a + call GetMapObject + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, bc + ld a, [hl] + cp -1 + ret z ; already hidden + ld [hl], -1 + push af + call .CheckStopFollow + pop af + call GetObjectStruct + farcall DeleteMapObject + ret + +.CheckStopFollow: + ld hl, wObjectFollow_Leader + cp [hl] + jr z, .ok + ld hl, wObjectFollow_Follower + cp [hl] + ret nz +.ok + farcall StopFollow + ld a, -1 + ld [wObjectFollow_Leader], a + ld [wObjectFollow_Follower], a + ret + +DeleteObjectStruct:: + call ApplyDeletionToMapObject + jp MaskObject + +CopyPlayerObjectTemplate:: + push hl + call GetMapObject + ld d, b + ld e, c + ld a, -1 + ld [de], a + inc de + pop hl + ld bc, MAPOBJECT_LENGTH - 1 + jp CopyBytes + +LoadMovementDataPointer:: +; Load the movement data pointer for object a. + ld [wMovementObject], a + ldh a, [hROMBank] + ld [wMovementDataBank], a + ld a, l + ld [wMovementDataAddress], a + ld a, h + ld [wMovementDataAddress + 1], a + ld a, [wMovementObject] + call CheckObjectVisibility + ret c + + ld hl, OBJECT_MOVEMENT_TYPE + add hl, bc + ld [hl], SPRITEMOVEDATA_SCRIPTED + + ld hl, OBJECT_STEP_TYPE + add hl, bc + ld [hl], STEP_TYPE_RESET + + ld hl, wVramState + set 7, [hl] + and a + ret + +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. + push bc + push de + ld hl, wObjectStructs + ld de, OBJECT_LENGTH + ld c, NUM_OBJECT_STRUCTS +.loop + ld a, [hl] + and a + jr z, .break + add hl, de + dec c + jr nz, .loop + xor a + jr .done + +.break + ld a, NUM_OBJECT_STRUCTS + sub c + scf + +.done + pop de + pop bc + ret + +GetSpriteMovementFunction:: + ld hl, OBJECT_MOVEMENT_TYPE + add hl, bc + ld a, [hl] + cp NUM_SPRITEMOVEDATA + jr c, .ok + xor a + +.ok + ld hl, SpriteMovementData + SPRITEMOVEATTR_MOVEMENT + ld e, a + ld d, 0 +rept NUM_SPRITEMOVEDATA_FIELDS + add hl, de +endr + ld a, [hl] + ret + +GetInitialFacing:: + push bc + push de + ld e, a + ld d, 0 + ld hl, SpriteMovementData + SPRITEMOVEATTR_FACING +rept NUM_SPRITEMOVEDATA_FIELDS + add hl, de +endr + ld a, BANK(SpriteMovementData) + call GetFarByte + add a + add a + maskbits NUM_DIRECTIONS, 2 + pop de + pop bc + ret + +CopySpriteMovementData:: + ld l, a + ldh a, [hROMBank] + push af + ld a, BANK(SpriteMovementData) + rst Bankswitch + ld a, l + push bc + + call .CopyData + + pop bc + pop af + rst Bankswitch + + ret + +.CopyData: + ld hl, OBJECT_MOVEMENT_TYPE + add hl, de + ld [hl], a + + push de + ld e, a + ld d, 0 + ld hl, SpriteMovementData + SPRITEMOVEATTR_FACING +rept NUM_SPRITEMOVEDATA_FIELDS + add hl, de +endr + ld b, h + ld c, l + pop de + + ld a, [bc] + inc bc + rlca + rlca + maskbits NUM_DIRECTIONS, 2 + ld hl, OBJECT_DIRECTION + add hl, de + ld [hl], a + + ld a, [bc] + inc bc + ld hl, OBJECT_ACTION + add hl, de + ld [hl], a + + ld a, [bc] + inc bc + ld hl, OBJECT_FLAGS1 + add hl, de + ld [hl], a + + ld a, [bc] + inc bc + ld hl, OBJECT_FLAGS2 + add hl, de + ld [hl], a + + ld a, [bc] + inc bc + ld hl, OBJECT_PALETTE + add hl, de + ld [hl], a + ret + +_GetMovementIndex:: +; Switch to the movement data bank + ldh a, [hROMBank] + push af + ld a, [hli] + rst Bankswitch +; Load the current script byte as given by OBJECT_MOVEMENT_INDEX, and increment OBJECT_MOVEMENT_INDEX + ld a, [hli] + ld d, [hl] + ld hl, OBJECT_MOVEMENT_INDEX + add hl, bc + add [hl] + ld e, a + ld a, d + adc 0 + ld d, a + inc [hl] + ld a, [de] + ld h, a + pop af + rst Bankswitch + + ld a, h + ret + +SetVramState_Bit0:: ; unreferenced + ld hl, wVramState + set 0, [hl] + ret + +ResetVramState_Bit0:: ; unreferenced + ld hl, wVramState + res 0, [hl] + ret + +UpdateSprites:: + ld a, [wVramState] + bit 0, a + ret z + + farcall UpdateAllObjectsFrozen + farcall _UpdateSprites + ret + +GetObjectStruct:: + ld bc, OBJECT_LENGTH + ld hl, wObjectStructs + call AddNTimes + ld b, h + ld c, l + ret + +DoesObjectHaveASprite:: + ld hl, OBJECT_SPRITE + add hl, bc + ld a, [hl] + and a + ret + +SetSpriteDirection:: + ; preserves other flags + push af + ld hl, OBJECT_DIRECTION + add hl, bc + ld a, [hl] + and %11110011 + ld e, a + pop af + maskbits NUM_DIRECTIONS, 2 + or e + ld [hl], a + ret + +GetSpriteDirection:: + ld hl, OBJECT_DIRECTION + add hl, bc + ld a, [hl] + maskbits NUM_DIRECTIONS, 2 + ret diff --git a/home/math.asm b/home/math.asm new file mode 100644 index 0000000..8e95016 --- /dev/null +++ b/home/math.asm @@ -0,0 +1,58 @@ +SimpleMultiply:: +; Return a * c. + and a + ret z + + push bc + ld b, a + xor a +.loop + add c + dec b + jr nz, .loop + pop bc + ret + +SimpleDivide:: +; Divide a by c. Return quotient b and remainder a. + ld b, 0 +.loop + inc b + sub c + jr nc, .loop + dec b + add c + ret + +Multiply:: +; Multiply hMultiplicand (3 bytes) by hMultiplier. Result in hProduct. +; All values are big endian. + push hl + push bc + + callfar _Multiply + + pop bc + pop hl + ret + +Divide:: +; Divide hDividend length b (max 4 bytes) by hDivisor. Result in hQuotient. +; All values are big endian. + push hl + push de + push bc + homecall _Divide + pop bc + pop de + pop hl + ret + +SubtractAbsolute:: ; unreferenced +; Return |a - b|, sign in carry. + sub b + ret nc + cpl + add 1 + scf + ret diff --git a/home/menu.asm b/home/menu.asm new file mode 100644 index 0000000..c487cea --- /dev/null +++ b/home/menu.asm @@ -0,0 +1,813 @@ +Load2DMenuData:: + push hl + push bc + ld hl, w2DMenuData + ld b, w2DMenuDataEnd - w2DMenuData +.loop + ld a, [de] + inc de + ld [hli], a + dec b + jr nz, .loop + + ; Reset menu state + ld a, $1 + ld [hli], a ; wMenuCursorY + ld [hli], a ; wMenuCursorX + xor a + ld [hli], a ; wCursorOffCharacter + ld [hli], a ; wCursorCurrentTile + ld [hli], a + pop bc + pop hl + ret + +StaticMenuJoypad:: + callfar _StaticMenuJoypad + jr GetMenuJoypad + +ScrollingMenuJoypad:: + callfar _ScrollingMenuJoypad +; fallthrough + +GetMenuJoypad:: + push bc + push af + ldh a, [hJoyLast] + and D_PAD + ld b, a + ldh a, [hJoyPressed] + and BUTTONS + or b + ld b, a + pop af + ld a, b + pop bc + ret + +PlaceHollowCursor:: + ld hl, wCursorCurrentTile + ld a, [hli] + ld h, [hl] + ld l, a + ld [hl], "▷" + ret + +HideCursor:: + ld hl, wCursorCurrentTile + ld a, [hli] + ld h, [hl] + ld l, a + ld [hl], " " + ret + +PushWindow:: + callfar _PushWindow + ret + +ExitMenu:: + push af + callfar _ExitMenu + pop af + ret + +InitVerticalMenuCursor:: + callfar _InitVerticalMenuCursor + ret + +CloseWindow:: + push af + call ExitMenu + call ApplyTilemap + call UpdateSprites + pop af + ret + +RestoreTileBackup:: + call MenuBoxCoord2Tile + call .copy + call MenuBoxCoord2Attr + +.copy + call GetMenuBoxDims + inc b + inc c + +.row + push bc + push hl + +.col + ld a, [de] + ld [hli], a + dec de + dec c + jr nz, .col + + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + + ret + +PopWindow:: + ld b, wMenuHeaderEnd - wMenuHeader + ld de, wMenuHeader +.loop + ld a, [hld] + ld [de], a + inc de + dec b + jr nz, .loop + ret + +GetMenuBoxDims:: + ld a, [wMenuBorderTopCoord] ; top + ld b, a + ld a, [wMenuBorderBottomCoord] ; bottom + sub b + ld b, a + ld a, [wMenuBorderLeftCoord] ; left + ld c, a + ld a, [wMenuBorderRightCoord] ; right + sub c + ld c, a + ret + +CopyMenuData:: + push hl + push de + push bc + push af + ld hl, wMenuDataPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wMenuData + ld bc, wMenuDataEnd - wMenuData + call CopyBytes + pop af + pop bc + pop de + pop hl + ret + +GetWindowStackTop:: + ld hl, wWindowStackPointer + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + ret + +PlaceVerticalMenuItems:: + call CopyMenuData + ld hl, wMenuDataPointer + ld e, [hl] + inc hl + ld d, [hl] + call GetMenuTextStartCoord + call Coord2Tile ; hl now contains the tilemap address where we will start printing text. + inc de + ld a, [de] ; Number of items + inc de + ld b, a +.loop + push bc + call PlaceString + inc de + ld bc, 2 * SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .loop + + ld a, [wMenuDataFlags] + bit 4, a + ret z + + call MenuBoxCoord2Tile + ld a, [de] + ld c, a + inc de + ld b, 0 + add hl, bc + jp PlaceString + +MenuBox:: + call MenuBoxCoord2Tile + call GetMenuBoxDims + dec b + dec c + jp Textbox + +GetMenuTextStartCoord:: + ld a, [wMenuBorderTopCoord] + ld b, a + inc b + ld a, [wMenuBorderLeftCoord] + ld c, a + inc c +; bit 6: if not set, leave extra room on top + ld a, [wMenuDataFlags] + bit 6, a + jr nz, .bit_6_set + inc b + +.bit_6_set +; bit 7: if set, leave extra room on the left + ld a, [wMenuDataFlags] + bit 7, a + ret z + inc c + ret + +ClearMenuBoxInterior:: + call MenuBoxCoord2Tile + ld bc, SCREEN_WIDTH + 1 + add hl, bc + call GetMenuBoxDims + dec b + dec c + jp ClearBox + +ClearWholeMenuBox:: + call MenuBoxCoord2Tile + call GetMenuBoxDims + inc c + inc b + jp ClearBox + +MenuBoxCoord2Tile:: + ld a, [wMenuBorderLeftCoord] + ld c, a + ld a, [wMenuBorderTopCoord] + ld b, a + ; fallthrough + +Coord2Tile:: +; Return the address of wTilemap(c, b) in hl. + xor a + ld h, a + ld l, b + ld a, c + ld b, h + ld c, l + add hl, hl + add hl, hl + add hl, bc + add hl, hl + add hl, hl + ld c, a + xor a + ld b, a + add hl, bc + bccoord 0, 0 + add hl, bc + ret + +MenuBoxCoord2Attr:: + ld a, [wMenuBorderLeftCoord] + ld c, a + ld a, [wMenuBorderTopCoord] + ld b, a + ; fallthrough + +Coord2Attr:: ; unreferenced +; Return the address of wAttrmap(c, b) in hl. + xor a + ld h, a + ld l, b + ld a, c + ld b, h + ld c, l + add hl, hl + add hl, hl + add hl, bc + add hl, hl + add hl, hl + ld c, a + xor a + ld b, a + add hl, bc + bccoord 0, 0, wAttrmap + add hl, bc + ret + +LoadMenuHeader:: + call CopyMenuHeader + jp PushWindow + +CopyMenuHeader:: + ld de, wMenuHeader + ld bc, wMenuHeaderEnd - wMenuHeader + call CopyBytes + ldh a, [hROMBank] + ld [wMenuDataBank], a + ret + +StoreMenuCursorPosition:: + ld [wMenuCursorPosition], a + ret + +MenuTextbox:: + push hl + call LoadMenuTextbox + pop hl + jp PrintText + +LoadMenuTextbox:: + ld hl, .MenuHeader + jp LoadMenuHeader + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw vTiles0 + db 0 ; default option + +MenuTextboxBackup:: + call MenuTextbox + jp CloseWindow + +LoadStandardMenuHeader:: + ld hl, .MenuHeader + jp LoadMenuHeader + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw 0 + db 1 ; default option + +VerticalMenu:: + xor a + ldh [hBGMapMode], a + call MenuBox + call UpdateSprites + call PlaceVerticalMenuItems + call ApplyTilemap + call CopyMenuData + ld a, [wMenuDataFlags] + bit 7, a + jr z, .cancel + call InitVerticalMenuCursor + call StaticMenuJoypad + call MenuClickSound + bit 1, a + jr z, .okay +.cancel + scf + ret + +.okay + and a + ret + +GetMenu2:: + call LoadMenuHeader + call VerticalMenu + call CloseWindow + ld a, [wMenuCursorY] + ret + +CopyNameFromMenu:: + push hl + push bc + push af + ld hl, wMenuDataPointer + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + pop af + call GetNthString + ld d, h + ld e, l + call CopyName1 + pop bc + pop hl + ret + +PlaceGenericTwoOptionBox:: ; unreferenced + call LoadMenuHeader + jr InterpretTwoOptionMenu + +YesNoBox:: + lb bc, SCREEN_WIDTH - 6, 7 +; fallthrough + +PlaceYesNoBox:: +; Return nc (yes) or c (no). + push bc + ld hl, YesNoMenuHeader + call CopyMenuHeader + pop bc +; This seems to be an overflow prevention, +; but it was coded wrong. + ld a, b + cp SCREEN_WIDTH - 1 - 5 + jr nz, .okay ; should this be "jr nc"? + ld a, SCREEN_WIDTH - 1 - 5 + ld b, a + +.okay + ld a, b + ld [wMenuBorderLeftCoord], a + add 5 + ld [wMenuBorderRightCoord], a + ld a, c + ld [wMenuBorderTopCoord], a + add 4 + ld [wMenuBorderBottomCoord], a + call PushWindow +; fallthrough + +InterpretTwoOptionMenu:: + call VerticalMenu + push af + ld c, $f + call DelayFrames + call CloseWindow + pop af + jr c, .no + ld a, [wMenuCursorY] + cp 2 ; no + jr z, .no + and a + ret + +.no + ld a, 2 + ld [wMenuCursorY], a + scf + ret + +YesNoMenuHeader:: + db MENU_BACKUP_TILES ; flags + menu_coords 10, 5, 15, 9 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 2 + db "YES@" + db "NO@" + +OffsetMenuHeader:: + call _OffsetMenuHeader + jp PushWindow + +_OffsetMenuHeader:: + push de + call CopyMenuHeader + pop de + ld a, [wMenuBorderLeftCoord] + ld h, a + ld a, [wMenuBorderRightCoord] + sub h + ld h, a + ld a, d + ld [wMenuBorderLeftCoord], a + add h + ld [wMenuBorderRightCoord], a + ld a, [wMenuBorderTopCoord] + ld l, a + ld a, [wMenuBorderBottomCoord] + sub l + ld l, a + ld a, e + ld [wMenuBorderTopCoord], a + add l + ld [wMenuBorderBottomCoord], a + ret + +DoNthMenu:: + call DrawVariableLengthMenuBox + call MenuWriteText + call InitMenuCursorAndButtonPermissions + call GetStaticMenuJoypad + call GetMenuJoypad + jp MenuClickSound + +SetUpMenu:: + call DrawVariableLengthMenuBox + call MenuWriteText + call InitMenuCursorAndButtonPermissions + ld hl, w2DMenuFlags1 + set 7, [hl] + ret + +DrawVariableLengthMenuBox:: + call CopyMenuData + call GetMenuIndexSet + call AutomaticGetMenuBottomCoord + jp MenuBox + +MenuWriteText:: + xor a + ldh [hBGMapMode], a + call GetMenuIndexSet ; sort out the text + call RunMenuItemPrintingFunction ; actually write it + call SafeUpdateSprites + ldh a, [hOAMUpdate] + push af + ld a, $1 + ldh [hOAMUpdate], a + call ApplyTilemap + pop af + ldh [hOAMUpdate], a + ret + +AutomaticGetMenuBottomCoord:: + ld a, [wMenuBorderLeftCoord] + ld c, a + ld a, [wMenuBorderRightCoord] + sub c + ld c, a + ld a, [wMenuDataItems] + add a + inc a + ld b, a + ld a, [wMenuBorderTopCoord] + add b + ld [wMenuBorderBottomCoord], a + ret + +GetMenuIndexSet:: + ld hl, wMenuDataIndicesPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wWhichIndexSet] + and a + jr z, .skip + ld b, a + ld c, -1 +.loop + ld a, [hli] + cp c + jr nz, .loop + dec b + jr nz, .loop + +.skip + ld d, h + ld e, l + ld a, [hl] + ld [wMenuDataItems], a + ret + +RunMenuItemPrintingFunction:: + call MenuBoxCoord2Tile + ld bc, 2 * SCREEN_WIDTH + 2 + add hl, bc +.loop + inc de + ld a, [de] + cp -1 + ret z + ld [wMenuSelection], a + push de + push hl + ld d, h + ld e, l + ld hl, wMenuDataDisplayFunctionPointer + call ._hl_ + pop hl + ld de, 2 * SCREEN_WIDTH + add hl, de + pop de + jr .loop + +._hl_ + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +InitMenuCursorAndButtonPermissions:: + call InitVerticalMenuCursor + ld hl, wMenuJoypadFilter + ld a, [wMenuDataFlags] + bit 3, a + jr z, .disallow_select + set START_F, [hl] + +.disallow_select + ld a, [wMenuDataFlags] + bit 2, a + ret z + set D_LEFT_F, [hl] + set D_RIGHT_F, [hl] + ret + +GetScrollingMenuJoypad:: + call ScrollingMenuJoypad + ld hl, wMenuJoypadFilter + and [hl] + jr ContinueGettingMenuJoypad + +GetStaticMenuJoypad:: + xor a + ld [wMenuJoypad], a + call StaticMenuJoypad +; fallthrough + +ContinueGettingMenuJoypad: + bit A_BUTTON_F, a + jr nz, .a_button + bit B_BUTTON_F, a + jr nz, .b_start + bit START_F, a + jr nz, .b_start + bit D_RIGHT_F, a + jr nz, .d_right + bit D_LEFT_F, a + jr nz, .d_left + xor a + ld [wMenuJoypad], a + jr .done + +.d_right + ld a, D_RIGHT + ld [wMenuJoypad], a + jr .done + +.d_left + ld a, D_LEFT + ld [wMenuJoypad], a + jr .done + +.a_button + ld a, A_BUTTON + ld [wMenuJoypad], a + +.done + call GetMenuIndexSet + ld a, [wMenuCursorY] + ld l, a + ld h, 0 + add hl, de + ld a, [hl] + ld [wMenuSelection], a + ld a, [wMenuCursorY] + ld [wMenuCursorPosition], a + and a + ret + +.b_start + ld a, B_BUTTON + ld [wMenuJoypad], a + ld a, -1 + ld [wMenuSelection], a + scf + ret + +PlaceMenuStrings:: + push de + ld hl, wMenuDataPointerTableAddr + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wMenuSelection] + call GetNthString + ld d, h + ld e, l + pop hl + jp PlaceString + +PlaceNthMenuStrings:: + push de + ld a, [wMenuSelection] + call GetMenuDataPointerTableEntry + inc hl + inc hl + ld a, [hli] + ld d, [hl] + ld e, a + pop hl + jp PlaceString + +MenuJumptable:: + ld a, [wMenuSelection] + call GetMenuDataPointerTableEntry + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +GetMenuDataPointerTableEntry:: + ld e, a + ld d, 0 + ld hl, wMenuDataPointerTableAddr + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + add hl, de + add hl, de + add hl, de + ret + +ClearWindowData:: + ld hl, wMenuMetadata + call .ClearMenuData + ld hl, wMenuHeader + call .ClearMenuData + ld hl, wMenuData + call .ClearMenuData + ld hl, wMoreMenuData + call .ClearMenuData + + ldh a, [rSVBK] + push af + ld a, BANK(wWindowStack) + ldh [rSVBK], a + + xor a + ld hl, wWindowStackBottom + ld [hld], a + ld [hld], a + ld a, l + ld [wWindowStackPointer], a + ld a, h + ld [wWindowStackPointer + 1], a + + pop af + ldh [rSVBK], a + ret + +.ClearMenuData: + ld bc, wMenuMetadataEnd - wMenuMetadata + assert wMenuMetadataEnd - wMenuMetadata == wMenuHeaderEnd - wMenuHeader + assert wMenuMetadataEnd - wMenuMetadata == wMenuDataEnd - wMenuData + assert wMenuMetadataEnd - wMenuMetadata == wMoreMenuDataEnd - wMoreMenuData + xor a + jp ByteFill + +MenuClickSound:: + push af + and A_BUTTON | B_BUTTON + jr z, .nosound + ld hl, wMenuFlags + bit 3, [hl] + jr nz, .nosound + call PlayClickSFX +.nosound + pop af + ret + +PlayClickSFX:: + push de + ld de, SFX_READ_TEXT_2 + call PlaySFX + pop de + ret + +MenuTextboxWaitButton:: + call MenuTextbox + call WaitButton + jp ExitMenu + +Place2DMenuItemName:: + ldh [hTempBank], a + ldh a, [hROMBank] + push af + ldh a, [hTempBank] + rst Bankswitch + + call PlaceString + pop af + rst Bankswitch + + ret + +_2DMenu:: + ldh a, [hROMBank] + ld [wMenuData_2DMenuItemStringsBank], a + farcall _2DMenu_ + ld a, [wMenuCursorPosition] + ret + +InterpretBattleMenu:: + ldh a, [hROMBank] + ld [wMenuData_2DMenuItemStringsBank], a + farcall _InterpretBattleMenu + ld a, [wMenuCursorPosition] + ret + +InterpretMobileMenu:: ; unreferenced + ldh a, [hROMBank] + ld [wMenuData_2DMenuItemStringsBank], a + farcall _InterpretMobileMenu + ld a, [wMenuCursorPosition] + ret diff --git a/home/mobile.asm b/home/mobile.asm new file mode 100644 index 0000000..dbdb0f2 --- /dev/null +++ b/home/mobile.asm @@ -0,0 +1,255 @@ +MobileAPI:: +; Mobile + cp $2 + ld [wMobileAPIIndex], a + ld a, l + ld [wc986], a + ld a, h + ld [wc987], a + jr nz, .okay + + ld [wc982], a + ld a, l + ld [wc981], a + ld hl, wc983 + ld a, c + ld [hli], a + ld a, b + ld [hl], a + +.okay + ld hl, wc822 + set 6, [hl] + ldh a, [hROMBank] + push af + ld a, BANK(_MobileAPI) + ld [wc981], a + rst Bankswitch + + jp _MobileAPI + +ReturnMobileAPI:: +; Return from _MobileAPI + ld [wc986], a + ld a, l + ld [wc987], a + ld a, h + ld [wMobileAPIIndex], a + + pop bc + ld a, b + ld [wc981], a + rst Bankswitch + + ld hl, wc822 + res 6, [hl] + ld hl, wc987 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wc986] + ret + +MobileReceive:: + ldh a, [hROMBank] + push af + ld a, BANK(_MobileReceive) + ld [wc981], a + rst Bankswitch + + call _MobileReceive + pop bc + ld a, b + ld [wc981], a + rst Bankswitch + + ret + +MobileTimer:: + push af + push bc + push de + push hl + + ldh a, [hMobile] + and a + jr z, .pop_ret + + xor a + ldh [rTAC], a + +; Turn off timer interrupt + ldh a, [rIF] + and 1 << VBLANK | 1 << LCD_STAT | 1 << SERIAL | 1 << JOYPAD + ldh [rIF], a + + ld a, [wc86a] + or a + jr z, .pop_ret + + ld a, [wc822] + bit 1, a + jr nz, .skip_timer + + ldh a, [rSC] + and 1 << rSC_ON + jr nz, .skip_timer + + ldh a, [hROMBank] + push af + ld a, BANK(_Timer) + ld [wc981], a + rst Bankswitch + + call _Timer + + pop bc + ld a, b + ld [wc981], a + rst Bankswitch + +.skip_timer + ldh a, [rTMA] + ldh [rTIMA], a + + ld a, 1 << rTAC_ON | rTAC_65536_HZ + ldh [rTAC], a + +.pop_ret + pop hl + pop de + pop bc + pop af + reti + +Function3eea:: + push hl + push bc + ld de, wAttrmap - wTilemap + add hl, de + inc b + inc b + inc c + inc c + call Function3f35 + pop bc + pop hl + jp MobileHome_PlaceBox + +Function3f20:: + hlcoord 0, 0, wAttrmap + ld b, 6 + ld c, 20 + call Function3f35 + hlcoord 0, 0 + ld b, 4 + ld c, 18 + jp MobileHome_PlaceBox + +Function3f35:: + ld a, 6 + ld de, SCREEN_WIDTH +.row + push bc + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + add hl, de + pop bc + dec b + jr nz, .row + ret + +MobileHome_PlaceBox: + push bc + call .FillTop + pop bc +.RowLoop: + push bc + call .FillMiddle + pop bc + dec b + jr nz, .RowLoop + call .FillBottom + ret + +.FillTop: + ld a, $63 + ld d, $62 + ld e, $64 + jr .FillRow + +.FillBottom: + ld a, $68 + ld d, $67 + ld e, $69 + jr .FillRow + +.FillMiddle: + ld a, $7f + ld d, $65 + ld e, $66 + +.FillRow: + push hl + ld [hl], d + inc hl +.FillLoop: + ld [hli], a + dec c + jr nz, .FillLoop + ld [hl], e + pop hl + ld de, SCREEN_WIDTH + add hl, de + ret + +Function3f7c:: + call MenuBoxCoord2Tile + call GetMenuBoxDims + dec b + dec c + jp Function3eea + +Function3f88:: + ld hl, wDecompressScratch + ld b, 0 +.row + push bc + ld c, 1 tiles / 2 +.col + ld a, [de] + inc de + cpl + ld [hl], 0 + inc hl + ld [hli], a + dec c + jr nz, .col + pop bc + dec c + jr nz, .row + ret + +Function3f9f:: + ld hl, wDecompressScratch +.row + push bc + ld c, 1 tiles / 2 +.col + ld a, [de] + inc de + inc de + cpl + ld [hl], $0 + inc hl + ld [hli], a + dec c + jr nz, .col + pop bc + dec c + jr nz, .row + ret diff --git a/home/movement.asm b/home/movement.asm new file mode 100644 index 0000000..4aaa117 --- /dev/null +++ b/home/movement.asm @@ -0,0 +1,128 @@ +InitMovementBuffer:: + ld [wMovementBufferObject], a + xor a + ld [wMovementBufferCount], a + ld [wUnusedMovementBufferBank], a + ld a, LOW(wMovementBuffer) + ld [wUnusedMovementBufferPointer], a + ld a, HIGH(wMovementBuffer) + ld [wUnusedMovementBufferPointer + 1], a + ret + +DecrementMovementBufferCount:: + ld a, [wMovementBufferCount] + and a + ret z + dec a + ld [wMovementBufferCount], a + ret + +AppendToMovementBuffer:: + push hl + push de + ld hl, wMovementBufferCount + ld e, [hl] + inc [hl] + ld d, 0 + ld hl, wMovementBuffer + add hl, de + ld [hl], a + pop de + pop hl + ret + +AppendToMovementBufferNTimes:: + push af + ld a, c + and a + jr nz, .okay + pop af + ret + +.okay + pop af +.loop + call AppendToMovementBuffer + dec c + jr nz, .loop + ret + +ComputePathToWalkToPlayer:: + push af +; compare x coords, load left/right into h, and x distance into d + ld a, b + sub d + ld h, LEFT + jr nc, .got_x_distance + dec a + cpl + ld h, RIGHT + +.got_x_distance + ld d, a +; compare y coords, load up/down into l, and y distance into e + ld a, c + sub e + ld l, UP + jr nc, .got_y_distance + dec a + cpl + ld l, DOWN + +.got_y_distance + ld e, a +; if the x distance is less than the y distance, swap h and l, and swap d and e + cp d + jr nc, .done + ld a, h + ld h, l + ld l, a + ld a, d + ld d, e + ld e, a + +.done + pop af + ld b, a +; Add movement in the longer direction first... + ld a, h + call .GetMovementData + ld c, d + call AppendToMovementBufferNTimes +; ... then add the shorter direction. + ld a, l + call .GetMovementData + ld c, e + call AppendToMovementBufferNTimes + ret + +.GetMovementData: + push de + push hl + ld l, b + ld h, 0 + add hl, hl + add hl, hl + ld e, a + ld d, 0 + add hl, de + ld de, .MovementData + add hl, de + ld a, [hl] + pop hl + pop de + ret + +.MovementData: + slow_step DOWN + slow_step UP + slow_step LEFT + slow_step RIGHT + step DOWN + step UP + step LEFT + step RIGHT + big_step DOWN + big_step UP + big_step LEFT + big_step RIGHT diff --git a/home/moves.asm b/home/moves.asm new file mode 100644 index 0000000..5e3b511 --- /dev/null +++ b/home/moves.asm @@ -0,0 +1,36 @@ +GetMoveAttribute:: +; Return attribute a of move l in a; clobbers hl. +; Replaces the old GetMoveAttr (renamed to avoid confusion). + sub 1 + push bc + ld c, a + ld a, l + jr c, .done + call GetMoveAddress + ld b, 0 + add hl, bc + call GetFarByte +.done + pop bc + ret + +GetMoveAddress:: +; Get the far address for move a's attributes in a:hl. +; This structure will not contain the animation byte! All MOVE_* constants must be reduced by 1 when indexing. + push bc + call GetMoveIndexFromID + ld b, h + ld c, l + ld hl, Moves + ld a, BANK(Moves) + call LoadIndirectPointer + pop bc + ret + +GetMoveData:: +; Copy move struct a to de. + ld [de], a + inc de + call GetMoveAddress + ld bc, MOVE_LENGTH - 1 + jp FarCopyBytes diff --git a/home/names.asm b/home/names.asm new file mode 100644 index 0000000..d4fdf62 --- /dev/null +++ b/home/names.asm @@ -0,0 +1,284 @@ +NamesPointers:: +; entries correspond to GetName constants (see constants/text_constants.asm); MON_NAME and MOVE_NAME are not handled by this table + dba ItemNames ; ITEM_NAME + dbw 0, wPartyMonOTs ; PARTY_OT_NAME + dbw 0, wOTPartyMonOTs ; ENEMY_OT_NAME + dba TrainerClassNames ; TRAINER_NAME + +GetName:: +; Return name wCurSpecies from name list wNamedObjectType in wStringBuffer1. + + ldh a, [hROMBank] + push af + push hl + push bc + push de + + ld a, [wCurSpecies] + ld [wNamedObjectIndex], a + + ld a, [wNamedObjectType] + dec a ; MON_NAME + ld hl, GetPokemonName + jr z, .go + dec a ; MOVE_NAME + ld hl, GetMoveName + jr z, .go + dec a + ld hl, .generic_function +.go + call _hl_ + + pop de + pop bc + pop hl + pop af + rst Bankswitch + ret + +.generic_function + ld l, a + add a, a + add a, l + add a, LOW(NamesPointers) + ld l, a + ld a, HIGH(NamesPointers) + adc 0 + ld h, a + ld a, [hli] + rst Bankswitch + ld a, [hli] + ld h, [hl] + ld l, a + + ld a, [wCurSpecies] + dec a + call GetNthString + + ld de, wStringBuffer1 + ld bc, ITEM_NAME_LENGTH + jp CopyBytes + +GetNthString16:: +; Like GetNthString, but with a 16-bit index in bc + inc b + jr .handle_loop + +.loop + xor a + call GetNthString.loop ; will act as a = $100 +.handle_loop + dec b + jr nz, .loop + ld a, c + ; fallthrough + +GetNthString:: +; Return the address of the +; ath string starting from hl. + + and a + ret z + +.loop + push bc + ld b, a + ld c, "@" +.readChar + ld a, [hli] + cp c + jr nz, .readChar + dec b + jr nz, .readChar + pop bc + ret + +GetBasePokemonName:: +; Discards gender (Nidoran). + + push hl + call GetPokemonName + + ld hl, wStringBuffer1 +.loop + ld a, [hl] + cp "@" + jr z, .quit + cp "♂" + jr z, .end + cp "♀" + jr z, .end + inc hl + jr .loop +.end + ld [hl], "@" +.quit + pop hl + ret + +GetPokemonName:: +; Get Pokemon name for wNamedObjectIndex. + + ldh a, [hROMBank] + push af + push hl + ld a, BANK(PokemonNames) + rst Bankswitch + +; Each name is ten characters + ld a, [wNamedObjectIndex] + call GetPokemonIndexFromID + ld e, l + ld d, h + add hl, hl + add hl, hl + add hl, de + add hl, hl + ld de, PokemonNames - 10 + add hl, de + +; Terminator + ld de, wStringBuffer1 + push de + ld bc, MON_NAME_LENGTH - 1 + call CopyBytes + ld hl, wStringBuffer1 + MON_NAME_LENGTH - 1 + ld [hl], "@" + pop de + + pop hl + pop af + rst Bankswitch + ret + +GetItemName:: +; Get item name for wNamedObjectIndex. + + push hl + push bc + ld a, [wNamedObjectIndex] + + cp TM01 + jr nc, .TM + + ld [wCurSpecies], a + ld a, ITEM_NAME + ld [wNamedObjectType], a + call GetName + jr .Copied +.TM: + call GetTMHMName +.Copied: + ld de, wStringBuffer1 + pop bc + pop hl + ret + +GetTMHMName:: +; Get TM/HM name for item wNamedObjectIndex. + + push hl + push de + push bc + ld a, [wNamedObjectIndex] + push af + +; TM/HM prefix + cp HM01 + push af + jr c, .TM + + ld hl, .HMText + ld bc, .HMTextEnd - .HMText + jr .copy + +.TM: + ld hl, .TMText + ld bc, .TMTextEnd - .TMText + +.copy + ld de, wStringBuffer1 + call CopyBytes + +; TM/HM number + push de + ld a, [wNamedObjectIndex] + ld c, a + callfar GetTMHMNumber + pop de + +; HM numbers start from 51, not 1 + pop af + ld a, c + jr c, .not_hm + sub NUM_TMS +.not_hm + +; Divide and mod by 10 to get the top and bottom digits respectively + ld b, "0" +.mod10 + sub 10 + jr c, .done_mod + inc b + jr .mod10 + +.done_mod + add 10 + push af + ld a, b + ld [de], a + inc de + pop af + + ld b, "0" + add b + ld [de], a + +; End the string + inc de + ld a, "@" + ld [de], a + + pop af + ld [wNamedObjectIndex], a + pop bc + pop de + pop hl + ret + +.TMText: + db "TM" +.TMTextEnd: + db "@" + +.HMText: + db "HM" +.HMTextEnd: + db "@" + +INCLUDE "home/hm_moves.asm" + +GetMoveName:: + push hl + push bc + ldh a, [hROMBank] + push af + ld a, BANK(MoveNames) + rst Bankswitch + ld a, [wNamedObjectIndex] + call GetMoveIndexFromID + dec hl + ld b, h + ld c, l + ld hl, MoveNames + call GetNthString16 + ld de, wStringBuffer1 + push de + ld bc, MOVE_NAME_LENGTH + call CopyBytes + pop de + pop af + rst Bankswitch + pop bc + pop hl + ret diff --git a/home/palettes.asm b/home/palettes.asm new file mode 100644 index 0000000..a65ffff --- /dev/null +++ b/home/palettes.asm @@ -0,0 +1,329 @@ +; Functions dealing with palettes. + +UpdatePalsIfCGB:: +; update bgp data from wBGPals2 +; update obp data from wOBPals2 +; return carry if successful + +; check cgb + ldh a, [hCGB] + and a + ret z + +UpdateCGBPals:: +; return carry if successful +; any pals to update? + ldh a, [hCGBPalUpdate] + and a + ret z + ; fallthrough + +ForceUpdateCGBPals:: + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals2) + ldh [rSVBK], a + + ld hl, wBGPals2 + +; copy 8 pals to bgpd + ld a, 1 << rBGPI_AUTO_INCREMENT + ldh [rBGPI], a + ld c, LOW(rBGPD) + ld b, 8 / 2 +.bgp +rept (1 palettes) * 2 + ld a, [hli] + ldh [c], a +endr + + dec b + jr nz, .bgp + +; hl is now wOBPals2 + +; copy 8 pals to obpd + ld a, 1 << rOBPI_AUTO_INCREMENT + ldh [rOBPI], a + ld c, LOW(rOBPD) + ld b, 8 / 2 +.obp +rept (1 palettes) * 2 + ld a, [hli] + ldh [c], a +endr + + dec b + jr nz, .obp + + pop af + ldh [rSVBK], a + +; clear pal update queue + xor a + ldh [hCGBPalUpdate], a + + scf + ret + +DmgToCgbBGPals:: +; exists to forego reinserting cgb-converted image data + +; input: a -> bgp + + ldh [rBGP], a + push af + +; Don't need to be here if DMG + ldh a, [hCGB] + and a + jr z, .end + + push hl + push de + push bc + + ldh a, [rSVBK] + push af + + ld a, BANK(wBGPals2) + ldh [rSVBK], a + +; copy & reorder bg pal buffer + ld hl, wBGPals2 ; to + ld de, wBGPals1 ; from +; order + ldh a, [rBGP] + ld b, a +; all pals + ld c, 8 + call CopyPals +; request pal update + ld a, TRUE + ldh [hCGBPalUpdate], a + + pop af + ldh [rSVBK], a + + pop bc + pop de + pop hl +.end + pop af + ret + +DmgToCgbObjPals:: +; exists to forego reinserting cgb-converted image data + +; input: d -> obp1 +; e -> obp2 + + ld a, e + ldh [rOBP0], a + ld a, d + ldh [rOBP1], a + + ldh a, [hCGB] + and a + ret z + + push hl + push de + push bc + + ldh a, [rSVBK] + push af + + ld a, BANK(wOBPals2) + ldh [rSVBK], a + +; copy & reorder obj pal buffer + ld hl, wOBPals2 ; to + ld de, wOBPals1 ; from +; order + ldh a, [rOBP0] + ld b, a +; all pals + ld c, 8 + call CopyPals +; request pal update + ld a, TRUE + ldh [hCGBPalUpdate], a + + pop af + ldh [rSVBK], a + + pop bc + pop de + pop hl + ret + +DmgToCgbObjPal0:: + ldh [rOBP0], a + push af + +; Don't need to be here if not CGB + ldh a, [hCGB] + and a + jr z, .dmg + + push hl + push de + push bc + + ldh a, [rSVBK] + push af + ld a, BANK(wOBPals2) + ldh [rSVBK], a + + ld hl, wOBPals2 palette 0 + ld de, wOBPals1 palette 0 + ldh a, [rOBP0] + ld b, a + ld c, 1 + call CopyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + + pop af + ldh [rSVBK], a + + pop bc + pop de + pop hl + +.dmg + pop af + ret + +DmgToCgbObjPal1:: + ldh [rOBP1], a + push af + + ldh a, [hCGB] + and a + jr z, .dmg + + push hl + push de + push bc + + ldh a, [rSVBK] + push af + ld a, BANK(wOBPals2) + ldh [rSVBK], a + + ld hl, wOBPals2 palette 1 + ld de, wOBPals1 palette 1 + ldh a, [rOBP1] + ld b, a + ld c, 1 + call CopyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + + pop af + ldh [rSVBK], a + + pop bc + pop de + pop hl + +.dmg + pop af + ret + +CopyPals:: +; copy c palettes in order b from de to hl + + push bc + ld c, NUM_PAL_COLORS +.loop + push de + push hl + +; get pal color + ld a, b + maskbits 1 << PAL_COLOR_SIZE +; 2 bytes per color + add a + ld l, a + ld h, 0 + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + +; dest + pop hl +; write color + ld [hl], e + inc hl + ld [hl], d + inc hl +; next pal color +rept PAL_COLOR_SIZE + srl b +endr +; source + pop de +; done pal? + dec c + jr nz, .loop + +; de += 8 (next pal) + ld a, PALETTE_SIZE + add e + jr nc, .ok + inc d +.ok + ld e, a + +; how many more pals? + pop bc + dec c + jr nz, CopyPals + ret + +ClearVBank1:: + ldh a, [hCGB] + and a + ret z + + ld a, 1 + ldh [rVBK], a + + ld hl, VRAM_Begin + ld bc, VRAM_End - VRAM_Begin + xor a + call ByteFill + + xor a + ldh [rVBK], a + ret + +ReloadSpritesNoPalettes:: + ldh a, [hCGB] + and a + ret z + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals2) + ldh [rSVBK], a + ld hl, wBGPals2 + ld bc, (8 palettes) + (2 palettes) + xor a + call ByteFill + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + jp DelayFrame + +SwapTextboxPalettes:: + homecall _SwapTextboxPalettes + ret + +ScrollBGMapPalettes:: + homecall _ScrollBGMapPalettes + ret diff --git a/home/pokedex_flags.asm b/home/pokedex_flags.asm new file mode 100644 index 0000000..b9e9b7c --- /dev/null +++ b/home/pokedex_flags.asm @@ -0,0 +1,110 @@ +CountSetBits:: +; Count the number of set bits in b bytes starting from hl. +; Return in a, c and [wNumSetBits]. + ld c, 0 +.next + ld a, [hli] + ld e, a + ld d, 8 + +.count + srl e + ld a, 0 + adc c + ld c, a + dec d + jr nz, .count + + dec b + jr nz, .next + + ld a, c + ld [wNumSetBits], a + ret + +CountSetBits16:: +; Count the number of set bits in bc bytes starting from hl - assumes bc < $1000 +; Returns in bc; hl points to the end of the buffer; clobbers everything else +; Assumes that CountSetBits will leave hl pointing to the end of the buffer + swap b + ld a, c + swap a + and $f + or b + ld d, a + ld a, c + jr z, .small_count + ld bc, 0 + and $f + jr z, .loop + push de + call .small_count + pop de +.loop + push bc + push de + ld b, $10 + call CountSetBits + pop de + pop bc + add a, c + ld c, a + jr nc, .handle_loop + inc b +.handle_loop + dec d + jr nz, .loop + ret + +.small_count + ld b, a + call CountSetBits + ld b, 0 + ret + +GetWeekday:: + ld a, [wCurDay] +.mod + sub 7 + jr nc, .mod + add 7 + ret + +SetSeenAndCaughtMon:: + call GetPokemonFlagIndex + push de + call SetSeenMonIndex + pop de +SetCaughtMonIndex:: + ld hl, wPokedexCaught + jr SetPokedexStatusMonIndex + +SetSeenMon:: + call GetPokemonFlagIndex +SetSeenMonIndex:: + ld hl, wPokedexSeen +SetPokedexStatusMonIndex: + ld b, SET_FLAG + jr FlagActionBaseOne + +CheckCaughtMon:: + call GetPokemonFlagIndex +CheckCaughtMonIndex:: + ld hl, wPokedexCaught + jr CheckPokedexStatusMonIndex + +CheckSeenMon:: + call GetPokemonFlagIndex +CheckSeenMonIndex:: + ld hl, wPokedexSeen +CheckPokedexStatusMonIndex: + ld b, CHECK_FLAG +FlagActionBaseOne: + dec de + jp FlagAction + +GetPokemonFlagIndex: + call GetPokemonIndexFromID + ld d, h + ld e, l + ret diff --git a/home/pokemon.asm b/home/pokemon.asm new file mode 100644 index 0000000..556e249 --- /dev/null +++ b/home/pokemon.asm @@ -0,0 +1,318 @@ +IsAPokemon:: +; Return carry if species a is not a Pokemon. + and a + jr z, .NotAPokemon + cp EGG + jr z, .Pokemon + cp MON_TABLE_ENTRIES + 1 + jr c, .Pokemon + +.NotAPokemon: + scf + ret + +.Pokemon: + and a + ret + +DrawBattleHPBar:: +; Draw an HP bar d tiles long at hl +; Fill it up to e pixels + + push hl + push de + push bc + +; Place 'HP:' + ld a, $60 + ld [hli], a + ld a, $61 + ld [hli], a + +; Draw a template + push hl + ld a, $62 ; empty bar +.template + ld [hli], a + dec d + jr nz, .template + ld a, $6b ; bar end + add b + ld [hl], a + pop hl + +; Safety check # pixels + ld a, e + and a + jr nz, .fill + ld a, c + and a + jr z, .done + ld e, 1 + +.fill +; Keep drawing tiles until pixel length is reached + ld a, e + sub TILE_WIDTH + jr c, .lastbar + + ld e, a + ld a, $6a ; full bar + ld [hli], a + ld a, e + and a + jr z, .done + jr .fill + +.lastbar + ld a, $62 ; empty bar + add e ; + e + ld [hl], a + +.done + pop bc + pop de + pop hl + ret + +PrepMonFrontpic:: + ld a, $1 + ld [wBoxAlignment], a + +_PrepMonFrontpic:: + ld a, [wCurPartySpecies] + call IsAPokemon + jr c, .not_pokemon + + push hl + ld de, vTiles2 + predef GetMonFrontpic + pop hl + xor a + ldh [hGraphicStartTile], a + lb bc, 7, 7 + predef PlaceGraphic + xor a + ld [wBoxAlignment], a + ret + +.not_pokemon + xor a + ld [wBoxAlignment], a + inc a + ld [wCurPartySpecies], a + ret + +PlayStereoCry:: + push af + ld a, 1 + ld [wStereoPanningMask], a + pop af + call _PlayMonCry + call WaitSFX + ret + +PlayStereoCry2:: +; Don't wait for the cry to end. +; Used during pic animations. + push af + ld a, 1 + ld [wStereoPanningMask], a + pop af + jp _PlayMonCry + +PlayMonCry:: + call PlayMonCry2 + call WaitSFX + ret + +PlayMonCry2:: +; Don't wait for the cry to end. + push af + xor a + ld [wStereoPanningMask], a + ld [wCryTracks], a + pop af + call _PlayMonCry + ret + +_PlayMonCry:: + push hl + push de + push bc + + call GetCryIndex + jr c, .done + + ld e, c + ld d, b + call PlayCry + +.done + pop bc + pop de + pop hl + ret + +LoadCry:: + call GetCryIndex + ret c + + ldh a, [hROMBank] + push af + ld a, BANK(PokemonCries) + rst Bankswitch + + ld hl, PokemonCries +rept MON_CRY_LENGTH + add hl, bc +endr + + ld e, [hl] + inc hl + ld d, [hl] + inc hl + + ld a, [hli] + ld [wCryPitch], a + ld a, [hli] + ld [wCryPitch + 1], a + ld a, [hli] + ld [wCryLength], a + ld a, [hl] + ld [wCryLength + 1], a + + pop af + rst Bankswitch + and a + ret + +GetCryIndex:: + and a + jr z, .no + cp MON_TABLE_ENTRIES + 1 + jr nc, .no + + push hl + call GetPokemonIndexFromID + dec hl + ld b, h + ld c, l + pop hl + and a + ret + +.no + scf + ret + +PrintLevel:: +; Print wTempMonLevel at hl + + ld a, [wTempMonLevel] + ld [hl], "" + inc hl + +; How many digits? + ld c, 2 + cp 100 ; This is distinct from MAX_LEVEL. + jr c, Print8BitNumLeftAlign + +; 3-digit numbers overwrite the :L. + dec hl + inc c + jr Print8BitNumLeftAlign + +PrintLevel_Force3Digits:: +; Print :L and all 3 digits + ld [hl], "" + inc hl + ld c, 3 + +Print8BitNumLeftAlign:: + ld [wTextDecimalByte], a + ld de, wTextDecimalByte + ld b, PRINTNUM_LEFTALIGN | 1 + jp PrintNum + +GetBaseData:: + push bc + push de + push hl + ldh a, [hROMBank] + push af + +; Egg doesn't have BaseData + ld a, [wCurSpecies] + cp EGG + jr z, .egg + +; Get BaseData + call GetPokemonIndexFromID + ld b, h + ld c, l + ld a, BANK(BaseData) + ld hl, BaseData + call LoadIndirectPointer + ; jr z, + rst Bankswitch + ld de, wCurBaseData + ld bc, BASE_DATA_SIZE + call CopyBytes + jr .end + +.egg + ld de, UnusedEggPic + +; Sprite dimensions + ld b, $55 ; 5x5 + ld hl, wBasePicSize + ld [hl], b + +; Beta front and back sprites +; (see pokegold-spaceworld's data/pokemon/base_stats/*) + ld hl, wBaseUnusedFrontpic + ld [hl], e + inc hl + ld [hl], d + inc hl + ld [hl], e + inc hl + ld [hl], d + jr .end ; useless + +.end +; Replace Pokedex # with species + ld a, [wCurSpecies] + ld [wBaseSpecies], a + + pop af + rst Bankswitch + pop hl + pop de + pop bc + ret + +GetCurNickname:: + ld a, [wCurPartyMon] + ld hl, wPartyMonNicknames + +GetNickname:: +; Get nickname a from list hl. + + push hl + push bc + + call SkipNames + ld de, wStringBuffer1 + + push de + ld bc, MON_NAME_LENGTH + call CopyBytes + pop de + + callfar CorrectNickErrors + + pop bc + pop hl + ret diff --git a/home/predef.asm b/home/predef.asm new file mode 100644 index 0000000..eb9a2f9 --- /dev/null +++ b/home/predef.asm @@ -0,0 +1,52 @@ +Predef:: +; Call predefined function a. +; Preserves bc, de, hl and f. + + ld [wPredefID], a + ldh a, [hROMBank] + push af + + ld a, BANK(GetPredefPointer) + rst Bankswitch + call GetPredefPointer ; stores hl in wPredefHL + +; Switch to the new function's bank + rst Bankswitch + +; Instead of directly calling stuff, +; push it to the stack in reverse. + + ld hl, .Return + push hl + +; Call the Predef function + ld a, [wPredefAddress] + ld h, a + ld a, [wPredefAddress + 1] + ld l, a + push hl + +; Get hl back + ld a, [wPredefHL] + ld h, a + ld a, [wPredefHL + 1] + ld l, a + ret + +.Return: +; Clean up after the Predef call + + ld a, h + ld [wPredefHL], a + ld a, l + ld [wPredefHL + 1], a + + pop hl + ld a, h + rst Bankswitch + + ld a, [wPredefHL] + ld h, a + ld a, [wPredefHL + 1] + ld l, a + ret diff --git a/home/print_bcd.asm b/home/print_bcd.asm new file mode 100644 index 0000000..67bc503 --- /dev/null +++ b/home/print_bcd.asm @@ -0,0 +1,79 @@ +PrintBCDNumber:: +; function to print a BCD (Binary-coded decimal) number +; de = address of BCD number +; hl = destination address +; c = flags and length +; bit 7: if set, do not print leading zeroes +; if unset, print leading zeroes +; bit 6: if set, left-align the string (do not pad empty digits with spaces) +; if unset, right-align the string +; bit 5: if set, print currency symbol at the beginning of the string +; if unset, do not print the currency symbol +; bits 0-4: length of BCD number in bytes +; Note that bits 5 and 7 are modified during execution. The above reflects +; their meaning at the beginning of the functions's execution. + ld b, c ; save flags in b + res PRINTNUM_LEADINGZEROS_F, c + res PRINTNUM_LEFTALIGN_F, c + res PRINTNUM_MONEY_F, c ; c now holds the length + bit PRINTNUM_MONEY_F, b + jr z, .loop + bit PRINTNUM_LEADINGZEROS_F, b + jr nz, .loop ; skip currency symbol + ld [hl], "¥" + inc hl +.loop + ld a, [de] + swap a + call PrintBCDDigit ; print upper digit + ld a, [de] + call PrintBCDDigit ; print lower digit + inc de + dec c + jr nz, .loop + bit PRINTNUM_LEADINGZEROS_F, b + ret z ; if so, we are done +; every digit of the BCD number is zero + bit PRINTNUM_LEFTALIGN_F, b + jr nz, .skipLeftAlignmentAdjustment +; the string is left-aligned; it needs to be moved back one space + dec hl +.skipLeftAlignmentAdjustment + bit PRINTNUM_MONEY_F, b + jr z, .skipCurrencySymbol + ld [hl], "¥" ; currency symbol + inc hl +.skipCurrencySymbol + ld [hl], "0" + call PrintLetterDelay + inc hl + ret + +PrintBCDDigit:: + and %00001111 + and a + jr z, .zeroDigit +; nonzero digit + bit PRINTNUM_LEADINGZEROS_F, b ; have any non-space characters been printed? + jr z, .outputDigit +; if bit 7 is set, then no numbers have been printed yet + bit PRINTNUM_MONEY_F, b + jr z, .skipCurrencySymbol + ld [hl], "¥" + inc hl + res PRINTNUM_MONEY_F, b +.skipCurrencySymbol + res PRINTNUM_LEADINGZEROS_F, b ; unset 7 to indicate that a nonzero digit has been reached +.outputDigit + add "0" + ld [hli], a + jp PrintLetterDelay + +.zeroDigit + bit PRINTNUM_LEADINGZEROS_F, b ; either printing leading zeroes or already reached a nonzero digit? + jr z, .outputDigit ; if so, print a zero digit + bit PRINTNUM_LEFTALIGN_F, b + ret nz + ld a, " " + ld [hli], a ; if right-aligned, "print" a space by advancing the pointer + ret diff --git a/home/print_text.asm b/home/print_text.asm new file mode 100644 index 0000000..48a445a --- /dev/null +++ b/home/print_text.asm @@ -0,0 +1,127 @@ +PrintLetterDelay:: +; Wait before printing the next letter. + +; The text speed setting in wOptions is actually a frame count: +; fast: 1 frame +; mid: 3 frames +; slow: 5 frames + +; wTextboxFlags[!0] and A or B override text speed with a one-frame delay. +; wOptions[4] and wTextboxFlags[!1] disable the delay. + + ld a, [wOptions] + bit NO_TEXT_SCROLL, a + ret nz + +; non-scrolling text? + ld a, [wTextboxFlags] + bit NO_TEXT_DELAY_F, a + ret z + + push hl + push de + push bc + +; force fast scroll? + ld a, [wTextboxFlags] + bit FAST_TEXT_DELAY_F, a + jr z, .fast + +; text speed + ld a, [wOptions] + and %111 + jr .updatedelay + +.fast + ld a, TEXT_DELAY_FAST + +.updatedelay + ld [wTextDelayFrames], a + +.checkjoypad + call GetJoypad + +; input override + ld a, [wDisableTextAcceleration] + and a + jr nz, .wait + +; Wait one frame if holding A or B. + ldh a, [hJoyDown] + bit A_BUTTON_F, a + jr z, .checkb + jr .delay +.checkb + bit B_BUTTON_F, a + jr z, .wait + +.delay + call DelayFrame + jr .end + +.wait + ld a, [wTextDelayFrames] + and a + jr nz, .checkjoypad + +.end + pop bc + pop de + pop hl + ret + +CopyDataUntil:: +; Copy [hl .. bc) to de. + +; In other words, the source data is +; from hl up to but not including bc, +; and the destination is de. + + ld a, [hli] + ld [de], a + inc de + ld a, h + cp b + jr nz, CopyDataUntil + ld a, l + cp c + jr nz, CopyDataUntil + ret + +PrintNum:: + homecall _PrintNum + ret + +MobilePrintNum:: + homecall _MobilePrintNum + ret + +FarPrintText:: + ldh [hTempBank], a + ldh a, [hROMBank] + push af + ldh a, [hTempBank] + rst Bankswitch + + call PrintText + + pop af + rst Bankswitch + ret + +CallPointerAt:: + ldh a, [hROMBank] + push af + ld a, [hli] + rst Bankswitch + + ld a, [hli] + ld h, [hl] + ld l, a + + call _hl_ + + pop hl + ld a, h + rst Bankswitch + ret diff --git a/home/printer.asm b/home/printer.asm new file mode 100644 index 0000000..745399a --- /dev/null +++ b/home/printer.asm @@ -0,0 +1,41 @@ +PrinterReceive:: + homecall _PrinterReceive + ret + +AskSerial:: +; send out a handshake while serial int is off + ld a, [wPrinterConnectionOpen] + bit 0, a + ret z + +; if we're still interpreting data, don't try to receive + ld a, [wPrinterOpcode] + and a + ret nz + +; once every 6 frames + ld hl, wHandshakeFrameDelay + inc [hl] + ld a, [hl] + cp 6 + ret c + + xor a + ld [hl], a + + ld a, $0c + ld [wPrinterOpcode], a + +; handshake + ld a, $88 + ldh [rSB], a + +; switch to internal clock + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + +; start transfer + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + + ret diff --git a/home/queue_script.asm b/home/queue_script.asm new file mode 100644 index 0000000..27dafa3 --- /dev/null +++ b/home/queue_script.asm @@ -0,0 +1,12 @@ +QueueScript:: +; Push pointer hl in the current bank to wQueuedScriptBank. + ldh a, [hROMBank] + +FarQueueScript:: +; Push pointer a:hl to wQueuedScriptBank. + ld [wQueuedScriptBank], a + ld a, l + ld [wQueuedScriptAddr], a + ld a, h + ld [wQueuedScriptAddr + 1], a + ret diff --git a/home/random.asm b/home/random.asm new file mode 100644 index 0000000..06f554b --- /dev/null +++ b/home/random.asm @@ -0,0 +1,80 @@ +Random:: +; A simple hardware-based random number generator (RNG). + +; Two random numbers are generated by adding and subtracting +; the divider to the respective values every time it's called. + +; The divider is a register that increments at a rate of 16384Hz. +; For comparison, the Game Boy operates at a clock speed of 4.2MHz. + +; Additionally, an equivalent function is executed in VBlank. + +; This leaves a with the value in hRandomSub. + + push bc + + ldh a, [rDIV] + ld b, a + ldh a, [hRandomAdd] + adc b + ldh [hRandomAdd], a + + ldh a, [rDIV] + ld b, a + ldh a, [hRandomSub] + sbc b + ldh [hRandomSub], a + + pop bc + ret + +BattleRandom:: +; _BattleRandom lives in another bank. + +; It handles all RNG calls in the battle engine, allowing +; link battles to remain in sync using a shared PRNG. + + ldh a, [hROMBank] + push af + ld a, BANK(_BattleRandom) + rst Bankswitch + + call _BattleRandom + + ld [wPredefHL + 1], a + pop af + rst Bankswitch + ld a, [wPredefHL + 1] + ret + +RandomRange:: +; Return a random number between 0 and a (non-inclusive). + + push bc + ld c, a + + ; b = $100 % c + xor a + sub c +.mod + sub c + jr nc, .mod + add c + ld b, a + + ; Get a random number + ; from 0 to $ff - b. + push bc +.loop + call Random + ldh a, [hRandomAdd] + ld c, a + add b + jr c, .loop + ld a, c + pop bc + + call SimpleDivide + + pop bc + ret diff --git a/home/region.asm b/home/region.asm new file mode 100644 index 0000000..7e0fc5f --- /dev/null +++ b/home/region.asm @@ -0,0 +1,32 @@ +IsInJohto:: +; Return 0 if the player is in Johto, and 1 in Kanto. + + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetWorldMapLocation + + cp LANDMARK_FAST_SHIP + jr z, .Johto + + cp LANDMARK_SPECIAL + jr nz, .CheckRegion + + ld a, [wBackupMapGroup] + ld b, a + ld a, [wBackupMapNumber] + ld c, a + call GetWorldMapLocation + +.CheckRegion: + cp KANTO_LANDMARK + jr nc, .Kanto + +.Johto: + xor a ; JOHTO_REGION + ret + +.Kanto: + ld a, KANTO_REGION + ret diff --git a/home/scrolling_menu.asm b/home/scrolling_menu.asm new file mode 100644 index 0000000..cde0e02 --- /dev/null +++ b/home/scrolling_menu.asm @@ -0,0 +1,61 @@ +ScrollingMenu:: + call CopyMenuData + ldh a, [hROMBank] + push af + + ld a, BANK(_ScrollingMenu) ; aka BANK(_InitScrollingMenu) + rst Bankswitch + + call _InitScrollingMenu + call .UpdatePalettes + call _ScrollingMenu + + pop af + rst Bankswitch + + ld a, [wMenuJoypad] + ret + +.UpdatePalettes: + ld hl, wVramState + bit 0, [hl] + jp nz, UpdateTimePals + jp SetPalettes + +InitScrollingMenu:: + ld a, [wMenuBorderTopCoord] + dec a + ld b, a + ld a, [wMenuBorderBottomCoord] + sub b + ld d, a + ld a, [wMenuBorderLeftCoord] + dec a + ld c, a + ld a, [wMenuBorderRightCoord] + sub c + ld e, a + push de + call Coord2Tile + pop bc + jp Textbox + +JoyTextDelay_ForcehJoyDown:: + call DelayFrame + + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + call JoyTextDelay + pop af + ldh [hInMenu], a + + ldh a, [hJoyLast] + and D_RIGHT + D_LEFT + D_UP + D_DOWN + ld c, a + ldh a, [hJoyPressed] + and A_BUTTON + B_BUTTON + SELECT + START + or c + ld c, a + ret diff --git a/home/serial.asm b/home/serial.asm new file mode 100644 index 0000000..bedbefc --- /dev/null +++ b/home/serial.asm @@ -0,0 +1,407 @@ +Serial:: +; The serial interrupt. + + push af + push bc + push de + push hl + + ldh a, [hMobileReceive] + and a + jr nz, .mobile + + ld a, [wPrinterConnectionOpen] + bit 0, a + jr nz, .printer + + ldh a, [hSerialConnectionStatus] + inc a ; is it equal to CONNECTION_NOT_ESTABLISHED? + jr z, .establish_connection + + ldh a, [rSB] + ldh [hSerialReceive], a + + ldh a, [hSerialSend] + ldh [rSB], a + + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr z, .player2 + + ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) + ldh [rSC], a + jr .player2 + +.mobile + call MobileReceive + jr .end + +.printer + call PrinterReceive + jr .end + +.establish_connection + ldh a, [rSB] + cp USING_EXTERNAL_CLOCK + jr z, .player1 + cp USING_INTERNAL_CLOCK + jr nz, .player2 + +.player1 + ldh [hSerialReceive], a + ldh [hSerialConnectionStatus], a + cp USING_INTERNAL_CLOCK + jr z, ._player2 + + xor a + ldh [rSB], a + + ld a, 3 + ldh [rDIV], a +.delay_loop + ldh a, [rDIV] + bit 7, a + jr nz, .delay_loop + + ld a, (0 << rSC_ON) | (0 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (0 << rSC_CLOCK) + ldh [rSC], a + jr .player2 + +._player2 + xor a + ldh [rSB], a + +.player2 + ld a, TRUE + ldh [hSerialReceivedNewData], a + ld a, SERIAL_NO_DATA_BYTE + ldh [hSerialSend], a + +.end + pop hl + pop de + pop bc + pop af + reti + +Serial_ExchangeBytes:: +; send bc bytes from hl, receive bc bytes to de + ld a, TRUE + ldh [hSerialIgnoringInitialData], a + +.loop + ld a, [hl] + ldh [hSerialSend], a + call Serial_ExchangeByte + push bc + ld b, a + inc hl + + ld a, 48 +.wait + dec a + jr nz, .wait + + ldh a, [hSerialIgnoringInitialData] + and a + ld a, b + pop bc + jr z, .load + dec hl + cp SERIAL_PREAMBLE_BYTE + jr nz, .loop + xor a ; FALSE + ldh [hSerialIgnoringInitialData], a + jr .loop + +.load + ld [de], a + inc de + dec bc + ld a, b + or c + jr nz, .loop + ret + +Serial_ExchangeByte:: +.timeout_loop + xor a + ldh [hSerialReceivedNewData], a + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr nz, .not_player_2 + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a +.not_player_2 +.loop + ldh a, [hSerialReceivedNewData] + and a + jr nz, .await_new_data + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr nz, .not_player_1_or_timed_out + call CheckLinkTimeoutFramesNonzero + jr z, .not_player_1_or_timed_out + call .ShortDelay + push hl + ld hl, wLinkTimeoutFrames + 1 + inc [hl] + jr nz, .no_rollover_up + dec hl + inc [hl] + +.no_rollover_up + pop hl + call CheckLinkTimeoutFramesNonzero + jr nz, .loop + jp SerialDisconnected + +.not_player_1_or_timed_out + ldh a, [rIE] + and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) + cp 1 << SERIAL + jr nz, .loop + ld a, [wLinkByteTimeout] + dec a + ld [wLinkByteTimeout], a + jr nz, .loop + ld a, [wLinkByteTimeout + 1] + dec a + ld [wLinkByteTimeout + 1], a + jr nz, .loop + ldh a, [hSerialConnectionStatus] + cp USING_EXTERNAL_CLOCK + jr z, .await_new_data + + ld a, 255 +.long_delay_loop + dec a + jr nz, .long_delay_loop + +.await_new_data + xor a + ldh [hSerialReceivedNewData], a + ldh a, [rIE] + and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) + sub 1 << SERIAL + jr nz, .non_serial_interrupts_enabled + + ; a == 0 + assert LOW(SERIAL_LINK_BYTE_TIMEOUT) == 0 + ld [wLinkByteTimeout], a + ld a, HIGH(SERIAL_LINK_BYTE_TIMEOUT) + ld [wLinkByteTimeout + 1], a + +.non_serial_interrupts_enabled + ldh a, [hSerialReceive] + cp SERIAL_NO_DATA_BYTE + ret nz + call CheckLinkTimeoutFramesNonzero + jr z, .timed_out + push hl + ld hl, wLinkTimeoutFrames + 1 + ld a, [hl] + dec a + ld [hld], a + inc a + jr nz, .no_rollover + dec [hl] + +.no_rollover + pop hl + call CheckLinkTimeoutFramesNonzero + jr z, SerialDisconnected + +.timed_out + ldh a, [rIE] + and (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) + cp 1 << SERIAL + ld a, SERIAL_NO_DATA_BYTE + ret z + ld a, [hl] + ldh [hSerialSend], a + call DelayFrame + jp .timeout_loop + +.ShortDelay: + ld a, 15 +.short_delay_loop + dec a + jr nz, .short_delay_loop + ret + +CheckLinkTimeoutFramesNonzero:: + push hl + ld hl, wLinkTimeoutFrames + ld a, [hli] + or [hl] + pop hl + ret + +; This sets wLinkTimeoutFrames to $ffff, since +; a is always 0 when it is called. +SerialDisconnected:: + dec a + ld [wLinkTimeoutFrames], a + ld [wLinkTimeoutFrames + 1], a + ret + +; This is used to check that both players entered the same Cable Club room. +Serial_ExchangeSyncBytes:: + ld hl, wLinkPlayerSyncBuffer + ld de, wLinkReceivedSyncBuffer + ld c, 2 + ld a, TRUE + ldh [hSerialIgnoringInitialData], a +.exchange + call DelayFrame + ld a, [hl] + ldh [hSerialSend], a + call Serial_ExchangeByte + ld b, a + inc hl + ldh a, [hSerialIgnoringInitialData] + and a + ld a, FALSE + ldh [hSerialIgnoringInitialData], a + jr nz, .exchange + ld a, b + ld [de], a + inc de + dec c + jr nz, .exchange + ret + +Serial_PrintWaitingTextAndSyncAndExchangeNybble:: + call LoadTilemapToTempTilemap + callfar PlaceWaitingText + call WaitLinkTransfer + jp SafeLoadTempTilemapToTilemap + +Serial_SyncAndExchangeNybble:: ; unreferenced + call LoadTilemapToTempTilemap + callfar PlaceWaitingText + jp WaitLinkTransfer ; pointless + +WaitLinkTransfer:: + vc_hook Wireless_WaitLinkTransfer + ld a, $ff + ld [wOtherPlayerLinkAction], a +.loop + call LinkTransfer + call DelayFrame + call CheckLinkTimeoutFramesNonzero + jr z, .check + push hl + ld hl, wLinkTimeoutFrames + 1 + dec [hl] + jr nz, .skip + dec hl + dec [hl] + jr nz, .skip + ; We might be disconnected + pop hl + xor a + jp SerialDisconnected + +.skip + pop hl + +.check + ld a, [wOtherPlayerLinkAction] + inc a + jr z, .loop + + vc_patch Wireless_net_delay_1 +if DEF(_CRYSTAL_VC) + ld b, 26 +else + ld b, 10 +endc + vc_patch_end +.receive + call DelayFrame + call LinkTransfer + dec b + jr nz, .receive + + vc_patch Wireless_net_delay_2 +if DEF(_CRYSTAL_VC) + ld b, 26 +else + ld b, 10 +endc + vc_patch_end +.acknowledge + call DelayFrame + call LinkDataReceived + dec b + jr nz, .acknowledge + + ld a, [wOtherPlayerLinkAction] + ld [wOtherPlayerLinkMode], a + vc_hook Wireless_WaitLinkTransfer_ret + ret + +LinkTransfer:: + push bc + ld b, SERIAL_TIMECAPSULE + ld a, [wLinkMode] + cp LINK_TIMECAPSULE + jr z, .got_high_nybble + ld b, SERIAL_TIMECAPSULE + jr c, .got_high_nybble + cp LINK_TRADECENTER + ld b, SERIAL_TRADECENTER + jr z, .got_high_nybble + ld b, SERIAL_BATTLE + +.got_high_nybble + call .Receive + ld a, [wPlayerLinkAction] + add b + ldh [hSerialSend], a + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + jr nz, .player_1 + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + +.player_1 + call .Receive + pop bc + ret + +.Receive: + ldh a, [hSerialReceive] + ld [wOtherPlayerLinkMode], a + and $f0 + cp b + ret nz + xor a + ldh [hSerialReceive], a + ld a, [wOtherPlayerLinkMode] + and $f + ld [wOtherPlayerLinkAction], a + ret + +LinkDataReceived:: +; Let the other system know that the data has been received. + xor a + ldh [hSerialSend], a + ldh a, [hSerialConnectionStatus] + cp USING_INTERNAL_CLOCK + ret nz + ld a, (0 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CLOCK) + ldh [rSC], a + ret diff --git a/home/sine.asm b/home/sine.asm new file mode 100644 index 0000000..3601e1e --- /dev/null +++ b/home/sine.asm @@ -0,0 +1,9 @@ +Cosine:: ; unreferenced +; a = d * cos(a * pi/32) + add %010000 ; cos(x) = sin(x + pi/2) + ; fallthrough +Sine:: +; a = d * sin(a * pi/32) + ld e, a + homecall _Sine + ret diff --git a/home/sprite_anims.asm b/home/sprite_anims.asm new file mode 100644 index 0000000..c751282 --- /dev/null +++ b/home/sprite_anims.asm @@ -0,0 +1,31 @@ +InitSpriteAnimStruct:: + ld [wSpriteAnimID], a + ldh a, [hROMBank] + push af + + ld a, BANK(_InitSpriteAnimStruct) + rst Bankswitch + ld a, [wSpriteAnimID] + + call _InitSpriteAnimStruct + + pop af + rst Bankswitch + + ret + +ReinitSpriteAnimFrame:: + ld [wSpriteAnimID], a + ldh a, [hROMBank] + push af + + ld a, BANK(_ReinitSpriteAnimFrame) + rst Bankswitch + ld a, [wSpriteAnimID] + + call _ReinitSpriteAnimFrame + + pop af + rst Bankswitch + + ret diff --git a/home/sprite_updates.asm b/home/sprite_updates.asm new file mode 100644 index 0000000..d3fe6ee --- /dev/null +++ b/home/sprite_updates.asm @@ -0,0 +1,19 @@ +DisableSpriteUpdates:: + xor a + ldh [hMapAnims], a + ld a, [wVramState] + res 0, a + ld [wVramState], a + xor a + ld [wSpriteUpdatesEnabled], a + ret + +EnableSpriteUpdates:: + ld a, $1 + ld [wSpriteUpdatesEnabled], a + ld a, [wVramState] + set 0, a + ld [wVramState], a + ld a, $1 + ldh [hMapAnims], a + ret diff --git a/home/sram.asm b/home/sram.asm new file mode 100644 index 0000000..5b3b9f3 --- /dev/null +++ b/home/sram.asm @@ -0,0 +1,30 @@ +OpenSRAM:: +; if invalid bank, sram is disabled + cp NUM_SRAM_BANKS + jr nc, CloseSRAM + +; switch to sram bank a + push af +; latch clock data + ld a, 1 + ld [MBC3LatchClock], a +; enable sram/clock write + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a +; select sram bank + pop af + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ret + +CloseSRAM:: + push af + ld a, -1 + ldh [hSRAMBank], a + ld a, SRAM_DISABLE +; reset clock latch for next time + ld [MBC3LatchClock], a +; disable sram/clock write + ld [MBC3SRamEnable], a + pop af + ret diff --git a/home/stone_queue.asm b/home/stone_queue.asm new file mode 100644 index 0000000..5639d7d --- /dev/null +++ b/home/stone_queue.asm @@ -0,0 +1,124 @@ +HandleStoneQueue:: + ldh a, [hROMBank] + push af + + call SwitchToMapScriptsBank + call .WarpAction + + pop bc + ld a, b + rst Bankswitch + ret + +.WarpAction: + ld hl, OBJECT_MAP_OBJECT_INDEX + add hl, de + ld a, [hl] + cp $ff + ret nc + + ld l, a + push hl + call .IsObjectOnWarp + pop hl + ret nc + ld d, a + ld e, l + call .IsObjectInStoneTable + ret nc + call CallMapScript + farcall EnableScriptMode + scf + ret + +.IsObjectOnWarp: + push de + + ld hl, OBJECT_MAP_X + add hl, de + ld a, [hl] + ld hl, OBJECT_MAP_Y + add hl, de + ld e, [hl] + + sub 4 + ld d, a + ld a, e + sub 4 + ld e, a + call .check_on_warp + + pop de + ret + +.check_on_warp + ld hl, wCurMapWarpsPointer + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wCurMapWarpCount] + and a + ret z + +.loop + push af + ld a, [hl] + cp e + jr nz, .not_on_warp + inc hl + ld a, [hld] + cp d + jr z, .found_warp + +.not_on_warp + ld a, WARP_EVENT_SIZE + add l + ld l, a + jr nc, .no_carry + inc h +.no_carry + + pop af + dec a + jr nz, .loop + and a + ret + +.found_warp + pop af + ld d, a + ld a, [wCurMapWarpCount] + sub d + inc a + scf + ret + +.IsObjectInStoneTable: + inc e + ld hl, CMDQUEUE_ADDR + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a +.loop2 + ld a, [hli] + cp $ff + ret z + cp d + jr nz, .next_inc3 + ld a, [hli] + cp e + jr nz, .next_inc2 + ld a, [hli] + ld h, [hl] + ld l, a + scf + ret + +.next_inc3 + inc hl + +.next_inc2 + inc hl + inc hl + jr .loop2 diff --git a/home/string.asm b/home/string.asm new file mode 100644 index 0000000..86de2e2 --- /dev/null +++ b/home/string.asm @@ -0,0 +1,35 @@ +InitString:: +; Init a string of length c. + push hl + jr _InitString + +InitName:: +; Intended for names, so this function is limited to ten characters. + push hl + ld c, NAME_LENGTH - 1 +_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 +.loop + ld a, [hli] + cp "@" + jr z, .blank + cp " " + jr nz, .notblank + dec c + jr nz, .loop +.blank + pop bc + ld l, e + ld h, d + pop de + ld b, 0 + inc c + call CopyBytes + ret + +.notblank + pop bc + pop hl + ret diff --git a/home/text.asm b/home/text.asm new file mode 100644 index 0000000..6d80e88 --- /dev/null +++ b/home/text.asm @@ -0,0 +1,1044 @@ +ClearBox:: +; Fill a c*b box at hl with blank tiles. + ld a, " " +; fallthrough + +FillBoxWithByte:: +.row + push bc + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .row + ret + +ClearTilemap:: +; Fill wTilemap with blank tiles. + + hlcoord 0, 0 + ld a, " " + ld bc, wTilemapEnd - wTilemap + call ByteFill + + ; Update the BG Map. + ldh a, [rLCDC] + bit rLCDC_ENABLE, a + ret z + jp WaitBGMap + +ClearScreen:: + ld a, PAL_BG_TEXT + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + jr ClearTilemap + +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. + push bc + push hl + call TextboxBorder + pop hl + pop bc + jr TextboxPalette + +TextboxBorder:: + ; Top + push hl + ld a, "┌" + ld [hli], a + inc a ; "─" + call .PlaceChars + inc a ; "┐" + ld [hl], a + pop hl + + ; Middle + ld de, SCREEN_WIDTH + add hl, de +.row + push hl + ld a, "│" + ld [hli], a + ld a, " " + call .PlaceChars + ld [hl], "│" + pop hl + + ld de, SCREEN_WIDTH + add hl, de + dec b + jr nz, .row + + ; Bottom + ld a, "└" + ld [hli], a + ld a, "─" + call .PlaceChars + ld [hl], "┘" + + ret + +.PlaceChars: +; Place char a c times. + ld d, c +.loop + ld [hli], a + dec d + jr nz, .loop + ret + +TextboxPalette:: +; Fill text box width c height b at hl with pal 7 + ld de, wAttrmap - wTilemap + add hl, de + inc b + inc b + inc c + inc c + ld a, PAL_BG_TEXT +.col + push bc + push hl +.row + ld [hli], a + dec c + jr nz, .row + pop hl + ld de, SCREEN_WIDTH + add hl, de + pop bc + dec b + jr nz, .col + ret + +SpeechTextbox:: +; Standard textbox. + hlcoord TEXTBOX_X, TEXTBOX_Y + ld b, TEXTBOX_INNERH + ld c, TEXTBOX_INNERW + jp Textbox + +RadioTerminator:: + ld hl, .stop + ret + +.stop: + text_end + +PrintText:: + call SetUpTextbox + ; fallthrough + +BuenaPrintText:: + push hl + hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW + call ClearBox + pop hl + ; fallthrough + +PrintTextboxText:: + bccoord TEXTBOX_INNERX, TEXTBOX_INNERY + call PlaceHLTextAtBC + ret + +SetUpTextbox:: + push hl + call SpeechTextbox + call UpdateSprites + call ApplyTilemap + pop hl + ret + +FarPlaceString:: + ld c, a + ldh a, [hROMBank] + ld b, a + ld a, c + rst Bankswitch + + push bc + call PlaceString + + pop af + rst Bankswitch + ret + +PlaceString:: + push hl + ; fallthrough + +PlaceNextChar:: + ld a, [de] + cp "@" + jr nz, CheckDict + ld b, h + ld c, l + pop hl + ret + +DummyChar:: ; unreferenced + pop de + ; fallthrough + +NextChar:: + inc de + jp PlaceNextChar + +CheckDict:: +MACRO dict + assert CHARLEN(\1) == 1 + if \1 == 0 + and a + else + cp \1 + endc + if ISCONST(\2) + ; Replace a character with another one + jr nz, .not\@ + ld a, \2 + .not\@: + elif !STRCMP(STRSUB("\2", 1, 1), ".") + ; Locals can use a short jump + jr z, \2 + else + jp z, \2 + endc +ENDM + + dict "", MobileScriptChar + dict "", LineChar + dict "", NextLineChar + dict "", CarriageReturnChar + dict "", NullChar + dict "", _ContTextNoPause + dict "<_CONT>", _ContText + dict "", Paragraph + dict "", PrintMomsName + dict "", PrintPlayerName + dict "", PrintRivalName + dict "", PlaceJPRoute + dict "", PlaceWatashi + dict "", PlaceKokoWa + dict "", PrintRedsName + dict "", PrintGreensName + dict "#", PlacePOKe + dict "", PCChar + dict "", RocketChar + dict "", TMChar + dict "", TrainerChar + dict "", PlaceKougeki + dict "", LineFeedChar + dict "", ContText + dict "<……>", SixDotsChar + dict "", DoneText + dict "", PromptText + dict "", PlacePKMN + dict "", PlacePOKE + dict "%", NextChar + dict "¯", " " + dict "", PlaceDexEnd + dict "", PlaceMoveTargetsName + dict "", PlaceMoveUsersName + dict "", PlaceEnemysName + dict "", PlaceGenderedPlayerName + dict "゚", .place + dict "゙", .place + + cp FIRST_REGULAR_TEXT_CHAR + jr nc, .place +; dakuten or handakuten + cp "パ" + jr nc, .handakuten +; dakuten + cp FIRST_HIRAGANA_DAKUTEN_CHAR + jr nc, .hiragana_dakuten +; katakana dakuten + add "カ" - "ガ" + jr .place_dakuten + +.hiragana_dakuten + add "か" - "が" +.place_dakuten + ld b, "゙" ; dakuten + jr .place + +.handakuten + cp "ぱ" + jr nc, .hiragana_handakuten +; katakana handakuten + add "ハ" - "パ" + jr .place_handakuten + +.hiragana_handakuten + add "は" - "ぱ" +.place_handakuten + ld b, "゚" ; handakuten + +.place + ld [hli], a + call PrintLetterDelay + jp NextChar + +MobileScriptChar:: + ld c, l + ld b, h + farcall RunMobileScript + jp PlaceNextChar + +MACRO print_name + push de + ld de, \1 + jp PlaceCommandCharacter +ENDM + +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:: + ldh a, [hBattleTurn] + xor 1 + jr PlaceBattlersName + +PlaceMoveUsersName:: + ldh a, [hBattleTurn] + ; fallthrough + +PlaceBattlersName: + push de + and a + jr nz, .enemy + + ld de, wBattleMonNickname + jr PlaceCommandCharacter + +.enemy + ld de, EnemyText + call PlaceString + ld h, b + ld l, c + ld de, wEnemyMonNickname + jr PlaceCommandCharacter + +PlaceEnemysName:: + push de + + ld a, [wLinkMode] + and a + jr nz, .linkbattle + + ld a, [wTrainerClass] + cp RIVAL1 + jr z, .rival + cp RIVAL2 + jr z, .rival + + ld de, wOTClassName + call PlaceString + ld h, b + ld l, c + ld de, String_Space + call PlaceString + push bc + callfar Battle_GetTrainerName + pop hl + ld de, wStringBuffer1 + jr PlaceCommandCharacter + +.rival + ld de, wRivalName + jr PlaceCommandCharacter + +.linkbattle + ld de, wOTClassName + jr PlaceCommandCharacter + +PlaceGenderedPlayerName:: + push de + ld de, wPlayerName + call PlaceString + ld h, b + ld l, c + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + ld de, KunSuffixText + jr z, PlaceCommandCharacter + ld de, ChanSuffixText +; fallthrough + +PlaceCommandCharacter:: + call PlaceString + ld h, b + ld l, c + pop de + jp NextChar + +TMCharText:: db "TM@" +TrainerCharText:: db "TRAINER@" +PCCharText:: db "PC@" +RocketCharText:: db "ROCKET@" +PlacePOKeText:: db "POKé@" +KougekiText:: db "こうげき@" +SixDotsCharText:: db "……@" +EnemyText:: db "Enemy @" +PlacePKMNText:: db "@" +PlacePOKEText:: db "@" +String_Space:: db " @" +; These strings have been dummied out. +PlaceJPRouteText:: +PlaceWatashiText:: +PlaceKokoWaText:: db "@" +KunSuffixText:: db "@" +ChanSuffixText:: db "@" + +NextLineChar:: + pop hl + ld bc, SCREEN_WIDTH * 2 + add hl, bc + push hl + jp NextChar + +LineFeedChar:: + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + push hl + jp NextChar + +CarriageReturnChar:: + pop hl + push de + ld bc, -wTilemap + $10000 + add hl, bc + ld de, -SCREEN_WIDTH + ld c, 1 +.loop + ld a, h + and a + jr nz, .next + ld a, l + cp SCREEN_WIDTH + jr c, .done + +.next + add hl, de + inc c + jr .loop + +.done + hlcoord 0, 0 + ld de, SCREEN_WIDTH + ld a, c +.loop2 + and a + jr z, .done2 + add hl, de + dec a + jr .loop2 + +.done2 + pop de + inc de + ld a, [de] + ld c, a + ld b, 0 + add hl, bc + push hl + jp NextChar + +LineChar:: + pop hl + hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2 + push hl + jp NextChar + +Paragraph:: + push de + + ld a, [wLinkMode] + cp LINK_COLOSSEUM + jr z, .linkbattle + cp LINK_MOBILE + jr z, .linkbattle + call LoadBlinkingCursor + +.linkbattle + call Text_WaitBGMap + call PromptButton + hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + lb bc, TEXTBOX_INNERH - 1, TEXTBOX_INNERW + call ClearBox + call UnloadBlinkingCursor + ld c, 20 + call DelayFrames + hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + pop de + jp NextChar + +_ContText:: + ld a, [wLinkMode] + or a + jr nz, .communication + call LoadBlinkingCursor + +.communication + call Text_WaitBGMap + + push de + call PromptButton + pop de + + ld a, [wLinkMode] + or a + call z, UnloadBlinkingCursor + ; fallthrough + +_ContTextNoPause:: + push de + call TextScroll + call TextScroll + hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2 + pop de + jp NextChar + +ContText:: + push de + ld de, .cont + ld b, h + ld c, l + call PlaceString + ld h, b + ld l, c + pop de + jp NextChar + +.cont: db "<_CONT>@" + +PlaceDexEnd:: +; Ends a Pokédex entry in Gen 1. +; Dex entries are now regular strings. + ld [hl], "." + pop hl + ret + +PromptText:: + ld a, [wLinkMode] + cp LINK_COLOSSEUM + jr z, .ok + cp LINK_MOBILE + jr z, .ok + call LoadBlinkingCursor + +.ok + call Text_WaitBGMap + call PromptButton + ld a, [wLinkMode] + cp LINK_COLOSSEUM + jr z, DoneText + cp LINK_MOBILE + jr z, DoneText + call UnloadBlinkingCursor + +DoneText:: + pop hl + ld de, .stop + dec de + ret + +.stop: + text_end + +NullChar:: + ld a, "?" + ld [hli], a + call PrintLetterDelay + jp NextChar + +TextScroll:: + hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + decoord TEXTBOX_INNERX, TEXTBOX_INNERY - 1 + ld a, TEXTBOX_INNERH - 1 + +.col + push af + ld c, TEXTBOX_INNERW + +.row + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .row + + inc de + inc de + inc hl + inc hl + pop af + dec a + jr nz, .col + + hlcoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2 + ld a, " " + ld bc, TEXTBOX_INNERW + call ByteFill + ld c, 5 + call DelayFrames + ret + +Text_WaitBGMap:: + push bc + ldh a, [hOAMUpdate] + push af + ld a, 1 + ldh [hOAMUpdate], a + + call WaitBGMap + + pop af + ldh [hOAMUpdate], a + pop bc + ret + +LoadBlinkingCursor:: + ld a, "▼" + ldcoord_a 18, 17 + ret + +UnloadBlinkingCursor:: + lda_coord 17, 17 + ldcoord_a 18, 17 + ret + +PlaceFarString:: + ld b, a + ldh a, [hROMBank] + push af + + ld a, b + rst Bankswitch + call PlaceString + + pop af + rst Bankswitch + ret + +PokeFluteTerminator:: + ld hl, .stop + ret + +.stop: + text_end + +PlaceHLTextAtBC:: + ld a, [wTextboxFlags] + push af + set NO_TEXT_DELAY_F, a + ld [wTextboxFlags], a + + call DoTextUntilTerminator + + pop af + ld [wTextboxFlags], a + ret + +DoTextUntilTerminator:: + ld a, [hli] + cp TX_END + ret z + call .TextCommand + jr DoTextUntilTerminator + +.TextCommand: + push hl + push bc + ld c, a + ld b, 0 + ld hl, TextCommands + add hl, bc + add hl, bc + ld e, [hl] + inc hl + ld d, [hl] + pop bc + pop hl + + ; jp de + push de + ret + +TextCommands:: +; entries correspond to TX_* constants (see macros/scripts/text.asm) + table_width 2, TextCommands + dw TextCommand_START ; TX_START + dw TextCommand_RAM ; TX_RAM + dw TextCommand_BCD ; TX_BCD + dw TextCommand_MOVE ; TX_MOVE + dw TextCommand_BOX ; TX_BOX + dw TextCommand_LOW ; TX_LOW + dw TextCommand_PROMPT_BUTTON ; TX_PROMPT_BUTTON + dw TextCommand_SCROLL ; TX_SCROLL + dw TextCommand_START_ASM ; TX_START_ASM + dw TextCommand_DECIMAL ; TX_DECIMAL + dw TextCommand_PAUSE ; TX_PAUSE + dw TextCommand_SOUND ; TX_SOUND_DEX_FANFARE_50_79 + dw TextCommand_DOTS ; TX_DOTS + dw TextCommand_WAIT_BUTTON ; TX_WAIT_BUTTON + dw TextCommand_SOUND ; TX_SOUND_DEX_FANFARE_20_49 + dw TextCommand_SOUND ; TX_SOUND_ITEM + dw TextCommand_SOUND ; TX_SOUND_CAUGHT_MON + dw TextCommand_SOUND ; TX_SOUND_DEX_FANFARE_80_109 + dw TextCommand_SOUND ; TX_SOUND_FANFARE + dw TextCommand_SOUND ; TX_SOUND_SLOT_MACHINE_START + dw TextCommand_STRINGBUFFER ; TX_STRINGBUFFER + dw TextCommand_DAY ; TX_DAY + dw TextCommand_FAR ; TX_FAR + assert_table_length NUM_TEXT_CMDS + +TextCommand_START:: +; write text until "@" + ld d, h + ld e, l + ld h, b + ld l, c + call PlaceString + ld h, d + ld l, e + inc hl + ret + +TextCommand_RAM:: +; write text from a ram address (little endian) + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + push hl + ld h, b + ld l, c + call PlaceString + pop hl + ret + +TextCommand_FAR:: +; write text from a different bank (little endian) + ldh a, [hROMBank] + push af + + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + + rst Bankswitch + + push hl + ld h, d + ld l, e + call DoTextUntilTerminator + pop hl + + pop af + rst Bankswitch + ret + +TextCommand_BCD:: +; write bcd from address, typically ram + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + push hl + ld h, b + ld l, c + ld c, a + call PrintBCDNumber + ld b, h + ld c, l + pop hl + ret + +TextCommand_MOVE:: +; move to a new tile + ld a, [hli] + ld [wMenuScrollPosition + 2], a + ld c, a + ld a, [hli] + ld [wMenuScrollPosition + 2 + 1], a + ld b, a + ret + +TextCommand_BOX:: +; draw a box (height, width) + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld b, a + ld a, [hli] + ld c, a + push hl + ld h, d + ld l, e + call Textbox + pop hl + ret + +TextCommand_LOW:: +; write text at (1,16) + bccoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2 + ret + +TextCommand_PROMPT_BUTTON:: +; wait for button press; show arrow + ld a, [wLinkMode] + cp LINK_COLOSSEUM + jp z, TextCommand_WAIT_BUTTON + cp LINK_MOBILE + jp z, TextCommand_WAIT_BUTTON + + push hl + call LoadBlinkingCursor + push bc + call PromptButton + pop bc + call UnloadBlinkingCursor + pop hl + ret + +TextCommand_SCROLL:: +; pushes text up two lines and sets the BC cursor to the border tile +; below the first character column of the text box. + push hl + call UnloadBlinkingCursor + call TextScroll + call TextScroll + pop hl + bccoord TEXTBOX_INNERX, TEXTBOX_INNERY + 2 + ret + +TextCommand_START_ASM:: +; run assembly code + bit 7, h + jr nz, .not_rom + jp hl + +.not_rom + ld a, TX_END + ld [hl], a + ret + +TextCommand_DECIMAL:: +; print a decimal number + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + push hl + ld h, b + ld l, c + ld b, a + and $f + ld c, a + ld a, b + and $f0 + swap a + set PRINTNUM_LEFTALIGN_F, a + ld b, a + call PrintNum + ld b, h + ld c, l + pop hl + ret + +TextCommand_PAUSE:: +; wait for button press or 30 frames + push hl + push bc + call GetJoypad + ldh a, [hJoyDown] + and A_BUTTON | B_BUTTON + jr nz, .done + ld c, 30 + call DelayFrames +.done + pop bc + pop hl + ret + +TextCommand_SOUND:: +; play a sound effect from TextSFX + push bc + dec hl + ld a, [hli] + ld b, a + push hl + ld hl, TextSFX +.loop + ld a, [hli] + cp -1 + jr z, .done + cp b + jr z, .play + inc hl + inc hl + jr .loop + +.play + push de + ld e, [hl] + inc hl + ld d, [hl] + call PlaySFX + call WaitSFX + pop de + +.done + pop hl + pop bc + ret + +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 + dbw TX_SOUND_ITEM, SFX_ITEM + dbw TX_SOUND_CAUGHT_MON, SFX_CAUGHT_MON + dbw TX_SOUND_DEX_FANFARE_80_109, SFX_DEX_FANFARE_80_109 + dbw TX_SOUND_SLOT_MACHINE_START, SFX_SLOT_MACHINE_START + db -1 + +TextCommand_DOTS:: +; wait for button press or 30 frames while printing "…"s + ld a, [hli] + ld d, a + push hl + ld h, b + ld l, c + +.loop + push de + ld a, "…" + ld [hli], a + call GetJoypad + ldh a, [hJoyDown] + and A_BUTTON | B_BUTTON + jr nz, .next + ld c, 10 + call DelayFrames +.next + pop de + dec d + jr nz, .loop + + ld b, h + ld c, l + pop hl + ret + +TextCommand_WAIT_BUTTON:: +; wait for button press; don't show arrow + push hl + push bc + call PromptButton + pop bc + pop hl + ret + +TextCommand_STRINGBUFFER:: +; Print a string from one of the following: +; 0: wStringBuffer3 +; 1: wStringBuffer4 +; 2: wStringBuffer5 +; 3: wStringBuffer2 +; 4: wStringBuffer1 +; 5: wEnemyMonNickname +; 6: wBattleMonNickname + ld a, [hli] + push hl + ld e, a + ld d, 0 + ld hl, StringBufferPointers + add hl, de + add hl, de + ld a, BANK(StringBufferPointers) + call GetFarWord + ld d, h + ld e, l + ld h, b + ld l, c + call PlaceString + pop hl + ret + +TextCommand_DAY:: +; print the day of the week + call GetWeekday + push hl + push bc + ld c, a + ld b, 0 + ld hl, .Days + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld d, h + ld e, l + pop hl + call PlaceString + ld h, b + ld l, c + ld de, .Day + call PlaceString + pop hl + ret + +.Days: + dw .Sun + dw .Mon + dw .Tues + dw .Wednes + dw .Thurs + dw .Fri + dw .Satur + +.Sun: db "SUN@" +.Mon: db "MON@" +.Tues: db "TUES@" +.Wednes: db "WEDNES@" +.Thurs: db "THURS@" +.Fri: db "FRI@" +.Satur: db "SATUR@" +.Day: db "DAY@" diff --git a/home/tilemap.asm b/home/tilemap.asm new file mode 100644 index 0000000..6c32760 --- /dev/null +++ b/home/tilemap.asm @@ -0,0 +1,226 @@ +ClearBGPalettes:: + call ClearPalettes +WaitBGMap:: +; Tell VBlank to update BG Map + ld a, 1 ; BG Map 0 tiles + ldh [hBGMapMode], a +; Wait for it to do its magic + ld c, 4 + jp DelayFrames + +WaitBGMap2:: + ldh a, [hCGB] + and a + jr z, .bg0 + + ld a, 2 + ldh [hBGMapMode], a + ld c, 4 + call DelayFrames + +.bg0 + ld a, 1 + ldh [hBGMapMode], a + ld c, 4 + jp DelayFrames + +IsCGB:: + ldh a, [hCGB] + and a + ret + +ApplyTilemap:: + ldh a, [hCGB] + and a + jr z, .dmg + + ld a, [wSpriteUpdatesEnabled] + and a + jr z, .dmg + + ld a, 1 + ldh [hBGMapMode], a + jr CopyTilemapAtOnce + +.dmg +; WaitBGMap + ld a, 1 + ldh [hBGMapMode], a + ld c, 4 + jp DelayFrames + +CGBOnly_CopyTilemapAtOnce:: + ldh a, [hCGB] + and a + jr z, WaitBGMap + +CopyTilemapAtOnce:: + ldh a, [hBGMapMode] + push af + xor a + ldh [hBGMapMode], a + + ldh a, [hMapAnims] + push af + xor a + ldh [hMapAnims], a + +.wait + ldh a, [rLY] + cp $80 - 1 + jr c, .wait + + di + ld a, BANK(vBGMap2) + ldh [rVBK], a + hlcoord 0, 0, wAttrmap + call .CopyBGMapViaStack + ld a, BANK(vBGMap0) + ldh [rVBK], a + hlcoord 0, 0 + call .CopyBGMapViaStack + +.wait2 + ldh a, [rLY] + cp $80 - 1 + jr c, .wait2 + ei + + pop af + ldh [hMapAnims], a + pop af + ldh [hBGMapMode], a + ret + +.CopyBGMapViaStack: +; Copy all tiles to vBGMap + ld [hSPBuffer], sp + ld sp, hl + ldh a, [hBGMapAddress + 1] + ld h, a + ld l, 0 + ld a, SCREEN_HEIGHT + ldh [hTilesPerCycle], a + ld b, 1 << 1 ; not in v/hblank + ld c, LOW(rSTAT) + +.loop +rept SCREEN_WIDTH / 2 + pop de +; if in v/hblank, wait until not in v/hblank +.loop\@ + ldh a, [c] + and b + jr nz, .loop\@ +; load vBGMap + ld [hl], e + inc l + ld [hl], d + inc l +endr + + ld de, BG_MAP_WIDTH - SCREEN_WIDTH + add hl, de + ldh a, [hTilesPerCycle] + dec a + ldh [hTilesPerCycle], a + jr nz, .loop + + ldh a, [hSPBuffer] + ld l, a + ldh a, [hSPBuffer + 1] + ld h, a + ld sp, hl + ret + +SetPalettes:: +; Inits the Palettes +; depending on the system the monochromes palettes or color palettes + ldh a, [hCGB] + and a + jr nz, .SetPalettesForGameBoyColor + ld a, %11100100 + ldh [rBGP], a + ld a, %11010000 + ldh [rOBP0], a + ldh [rOBP1], a + ret + +.SetPalettesForGameBoyColor: + push de + ld a, %11100100 + call DmgToCgbBGPals + lb de, %11100100, %11100100 + call DmgToCgbObjPals + pop de + ret + +ClearPalettes:: +; Make all palettes white + +; CGB: make all the palette colors white + ldh a, [hCGB] + and a + jr nz, .cgb + +; DMG: just change palettes to 0 (white) + xor a + ldh [rBGP], a + ldh [rOBP0], a + ldh [rOBP1], a + ret + +.cgb + ldh a, [rSVBK] + push af + + ld a, BANK(wBGPals2) + ldh [rSVBK], a + +; Fill wBGPals2 and wOBPals2 with $ffff (white) + ld hl, wBGPals2 + ld bc, 16 palettes + ld a, $ff + call ByteFill + + pop af + ldh [rSVBK], a + +; Request palette update + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +GetMemSGBLayout:: + ld b, SCGB_DEFAULT +GetSGBLayout:: +; load sgb packets unless dmg + + ldh a, [hCGB] + and a + jr nz, .sgb + + ldh a, [hSGB] + and a + ret z + +.sgb + predef_jump LoadSGBLayout + +SetHPPal:: +; Set palette for hp bar pixel length e at hl. + call GetHPPal + ld [hl], d + ret + +GetHPPal:: +; Get palette for hp bar pixel length e in d. + ld d, HP_GREEN + ld a, e + cp (HP_BAR_LENGTH_PX * 50 / 100) ; 24 + ret nc + inc d ; HP_YELLOW + cp (HP_BAR_LENGTH_PX * 21 / 100) ; 10 + ret nc + inc d ; HP_RED + ret diff --git a/home/time.asm b/home/time.asm new file mode 100644 index 0000000..b8d2045 --- /dev/null +++ b/home/time.asm @@ -0,0 +1,271 @@ +; Functions relating to the timer interrupt and the real-time-clock. + +Timer:: ; unreferenced + push af + ldh a, [hMobile] + and a + jr z, .not_mobile + call MobileTimer + +.not_mobile + pop af + reti + +LatchClock:: +; latch clock counter data + ld a, 0 + ld [MBC3LatchClock], a + ld a, 1 + ld [MBC3LatchClock], a + ret + +UpdateTime:: + call GetClock + call FixDays + call FixTime + farcall GetTimeOfDay + ret + +GetClock:: +; store clock data in hRTCDayHi-hRTCSeconds + +; enable clock r/w + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a + +; clock data is 'backwards' in hram + + call LatchClock + ld hl, MBC3SRamBank + ld de, MBC3RTC + + ld [hl], RTC_S + ld a, [de] + maskbits 60 + ldh [hRTCSeconds], a + + ld [hl], RTC_M + ld a, [de] + maskbits 60 + ldh [hRTCMinutes], a + + ld [hl], RTC_H + ld a, [de] + maskbits 24 + ldh [hRTCHours], a + + ld [hl], RTC_DL + ld a, [de] + ldh [hRTCDayLo], a + + ld [hl], RTC_DH + ld a, [de] + ldh [hRTCDayHi], a + +; unlatch clock / disable clock r/w + jp CloseSRAM + +FixDays:: +; fix day count +; mod by 140 + +; check if day count > 255 (bit 8 set) + ldh a, [hRTCDayHi] ; DH + bit 0, a + jr z, .daylo +; reset dh (bit 8) + res 0, a + ldh [hRTCDayHi], a + +; mod 140 +; mod twice since bit 8 (DH) was set + ldh a, [hRTCDayLo] +.modh + sub 140 + jr nc, .modh +.modl + sub 140 + jr nc, .modl + add 140 + +; update dl + ldh [hRTCDayLo], a + +; flag for sRTCStatusFlags + ld a, %01000000 + jr .set + +.daylo +; quit if fewer than 140 days have passed + ldh a, [hRTCDayLo] + cp 140 + jr c, .quit + +; mod 140 +.mod + sub 140 + jr nc, .mod + add 140 + +; update dl + ldh [hRTCDayLo], a + +; flag for sRTCStatusFlags + ld a, %00100000 + +.set +; update clock with modded day value + push af + call SetClock + pop af + scf + ret + +.quit + xor a + ret + +FixTime:: +; add ingame time (set at newgame) to current time +; store time in wCurDay, hHours, hMinutes, hSeconds + +; second + ldh a, [hRTCSeconds] + ld c, a + ld a, [wStartSecond] + add c + sub 60 + jr nc, .updatesec + add 60 +.updatesec + ldh [hSeconds], a + +; minute + ccf ; carry is set, so turn it off + ldh a, [hRTCMinutes] + ld c, a + ld a, [wStartMinute] + adc c + sub 60 + jr nc, .updatemin + add 60 +.updatemin + ldh [hMinutes], a + +; hour + ccf ; carry is set, so turn it off + ldh a, [hRTCHours] + ld c, a + ld a, [wStartHour] + adc c + sub 24 + jr nc, .updatehr + add 24 +.updatehr + ldh [hHours], a + +; day + ccf ; carry is set, so turn it off + ldh a, [hRTCDayLo] + ld c, a + ld a, [wStartDay] + adc c + ld [wCurDay], a + ret + +InitTimeOfDay:: + xor a + ld [wStringBuffer2], a + ld a, 0 ; useless + ld [wStringBuffer2 + 3], a + jr InitTime + +InitDayOfWeek:: + call UpdateTime + ldh a, [hHours] + ld [wStringBuffer2 + 1], a + ldh a, [hMinutes] + ld [wStringBuffer2 + 2], a + ldh a, [hSeconds] + ld [wStringBuffer2 + 3], a + jr InitTime ; useless + +InitTime:: + farcall _InitTime + ret + +ClearClock:: + xor a + ldh [hRTCSeconds], a + ldh [hRTCMinutes], a + ldh [hRTCHours], a + ldh [hRTCDayLo], a + ldh [hRTCDayHi], a +; fallthrough + +SetClock:: +; set clock data from hram + +; enable clock r/w + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a + +; set clock data +; stored 'backwards' in hram + + call LatchClock + ld hl, MBC3SRamBank + ld de, MBC3RTC + +; seconds + ld [hl], RTC_S + ldh a, [hRTCSeconds] + ld [de], a +; minutes + ld [hl], RTC_M + ldh a, [hRTCMinutes] + ld [de], a +; hours + ld [hl], RTC_H + ldh a, [hRTCHours] + ld [de], a +; day lo + ld [hl], RTC_DL + ldh a, [hRTCDayLo] + ld [de], a +; day hi + ld [hl], RTC_DH + ldh a, [hRTCDayHi] + res 6, a ; make sure timer is active + ld [de], a + +; cleanup + jp CloseSRAM ; unlatch clock, disable clock r/w + +ClearRTCStatus:: ; unreferenced +; clear sRTCStatusFlags + xor a + push af + ld a, BANK(sRTCStatusFlags) + call OpenSRAM + pop af + ld [sRTCStatusFlags], a + jp CloseSRAM + +RecordRTCStatus:: +; append flags to sRTCStatusFlags + ld hl, sRTCStatusFlags + push af + ld a, BANK(sRTCStatusFlags) + call OpenSRAM + pop af + or [hl] + ld [hl], a + jp CloseSRAM + +CheckRTCStatus:: +; check sRTCStatusFlags + ld a, BANK(sRTCStatusFlags) + call OpenSRAM + ld a, [sRTCStatusFlags] + jp CloseSRAM diff --git a/home/time_palettes.asm b/home/time_palettes.asm new file mode 100644 index 0000000..7dc4e77 --- /dev/null +++ b/home/time_palettes.asm @@ -0,0 +1,22 @@ +UpdateTimeAndPals:: +; update time and time-sensitive palettes + +; rtc enabled? + ld a, [wSpriteUpdatesEnabled] + cp 0 + ret z + + call UpdateTime + +; obj update on? + ld a, [wVramState] + bit 0, a ; obj update + ret z + +TimeOfDayPals:: + callfar _TimeOfDayPals + ret + +UpdateTimePals:: + callfar _UpdateTimePals + ret diff --git a/home/trainers.asm b/home/trainers.asm new file mode 100644 index 0000000..a7ee528 --- /dev/null +++ b/home/trainers.asm @@ -0,0 +1,244 @@ +CheckTrainerBattle:: + ldh a, [hROMBank] + push af + + call SwitchToMapScriptsBank + call _CheckTrainerBattle + + pop bc + ld a, b + rst Bankswitch + ret + +_CheckTrainerBattle:: +; Check if any trainer on the map sees the player and wants to battle. + +; Skip the player object. + ld a, 1 + ld de, wMap1Object + +.loop + +; Start a battle if the object: + push af + push de + +; Has a sprite + ld hl, MAPOBJECT_SPRITE + add hl, de + ld a, [hl] + and a + jr z, .next + +; Is a trainer + ld hl, MAPOBJECT_TYPE + add hl, de + ld a, [hl] + and MAPOBJECT_TYPE_MASK + cp OBJECTTYPE_TRAINER + jr nz, .next + +; Is visible on the map + ld hl, MAPOBJECT_OBJECT_STRUCT_ID + add hl, de + ld a, [hl] + cp -1 + jr z, .next + +; Is facing the player... + call GetObjectStruct + call FacingPlayerDistance_bc + jr nc, .next + +; ...within their sight range + ld hl, MAPOBJECT_SIGHT_RANGE + add hl, de + ld a, [hl] + cp b + jr c, .next + +; And hasn't already been beaten + push bc + push de + ld hl, MAPOBJECT_SCRIPT_POINTER + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ld e, [hl] + inc hl + ld d, [hl] + ld b, CHECK_FLAG + call EventFlagAction + ld a, c + pop de + pop bc + and a + jr z, .startbattle + +.next + pop de + ld hl, MAPOBJECT_LENGTH + add hl, de + ld d, h + ld e, l + + pop af + inc a + cp NUM_OBJECTS + jr nz, .loop + xor a + ret + +.startbattle + pop de + pop af + ldh [hLastTalked], a + ld a, b + ld [wSeenTrainerDistance], a + ld a, c + ld [wSeenTrainerDirection], a + jr LoadTrainer_continue + +TalkToTrainer:: + ld a, 1 + ld [wSeenTrainerDistance], a + ld a, -1 + ld [wSeenTrainerDirection], a + +LoadTrainer_continue:: + call GetMapScriptsBank + ld [wSeenTrainerBank], a + + ldh a, [hLastTalked] + call GetMapObject + + ld hl, MAPOBJECT_SCRIPT_POINTER + add hl, bc + ld a, [wSeenTrainerBank] + call GetFarWord + ld de, wTempTrainer + ld bc, wTempTrainerEnd - wTempTrainer + ld a, [wSeenTrainerBank] + call FarCopyBytes + xor a + ld [wRunningTrainerBattleScript], a + scf + ret + +FacingPlayerDistance_bc:: + push de + call FacingPlayerDistance + ld b, d + ld c, e + pop de + ret + +FacingPlayerDistance:: +; Return carry if the sprite at bc is facing the player, +; its distance in d, and its direction in e. + + ld hl, OBJECT_MAP_X ; x + add hl, bc + ld d, [hl] + + ld hl, OBJECT_MAP_Y ; y + add hl, bc + ld e, [hl] + + ld a, [wPlayerMapX] + cp d + jr z, .CheckY + + ld a, [wPlayerMapY] + cp e + jr z, .CheckX + + and a + ret + +.CheckY: + ld a, [wPlayerMapY] + sub e + jr z, .NotFacing + jr nc, .Above + +; Below + cpl + inc a + ld d, a + ld e, OW_UP + jr .CheckFacing + +.Above: + ld d, a + ld e, OW_DOWN + jr .CheckFacing + +.CheckX: + ld a, [wPlayerMapX] + sub d + jr z, .NotFacing + jr nc, .Left + +; Right + cpl + inc a + ld d, a + ld e, OW_LEFT + jr .CheckFacing + +.Left: + ld d, a + ld e, OW_RIGHT + +.CheckFacing: + call GetSpriteDirection + cp e + jr nz, .NotFacing + scf + ret + +.NotFacing: + and a + ret + +CheckTrainerFlag:: ; unreferenced + push bc + ld hl, OBJECT_MAP_OBJECT_INDEX + add hl, bc + ld a, [hl] + call GetMapObject + ld hl, MAPOBJECT_SCRIPT_POINTER + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + call GetMapScriptsBank + call GetFarWord + ld d, h + ld e, l + push de + ld b, CHECK_FLAG + call EventFlagAction + pop de + ld a, c + and a + pop bc + ret + +PrintWinLossText:: + ld a, [wBattleResult] + ld hl, wWinTextPointer + and $f ; WIN? + jr z, .ok + ld hl, wLossTextPointer + +.ok + ld a, [hli] + ld h, [hl] + ld l, a + call GetMapScriptsBank + call FarPrintText + call WaitBGMap + jp WaitPressAorB_BlinkCursor diff --git a/home/vblank.asm b/home/vblank.asm new file mode 100644 index 0000000..0efa6cd --- /dev/null +++ b/home/vblank.asm @@ -0,0 +1,421 @@ +; VBlank is the interrupt responsible for updating VRAM. + +; In Pokemon Crystal, VBlank has been hijacked to act as the +; main loop. After time-sensitive graphics operations have been +; performed, joypad input and sound functions are executed. + +; This prevents the display and audio output from lagging. + +VBlank:: + push af + push bc + push de + push hl + + ldh a, [hVBlank] + and 7 + + ld e, a + ld d, 0 + ld hl, .VBlanks + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + + call _hl_ + + call GameTimer + + pop hl + pop de + pop bc + pop af + reti + +.VBlanks: + dw VBlank0 + dw VBlank1 + dw VBlank2 + dw VBlank3 + dw VBlank4 + dw VBlank5 + dw VBlank6 + dw VBlank0 ; just in case + +VBlank0:: +; normal operation + +; rng +; scx, scy, wy, wx +; bg map buffer +; palettes +; dma transfer +; bg map +; tiles +; oam +; joypad +; sound + + ; inc frame counter + ld hl, hVBlankCounter + inc [hl] + + ; advance random variables + ldh a, [rDIV] + ld b, a + ldh a, [hRandomAdd] + adc b + ldh [hRandomAdd], a + + ldh a, [rDIV] + ld b, a + ldh a, [hRandomSub] + sbc b + ldh [hRandomSub], a + + ldh a, [hROMBank] + ldh [hROMBankBackup], a + + ldh a, [hSCX] + ldh [rSCX], a + ldh a, [hSCY] + ldh [rSCY], a + ldh a, [hWY] + ldh [rWY], a + ldh a, [hWX] + ldh [rWX], a + + ; There's only time to call one of these in one vblank. + ; Calls are in order of priority. + + call UpdateBGMapBuffer + jr c, .done + call UpdatePalsIfCGB + jr c, .done + call DMATransfer + jr c, .done + call UpdateBGMap + + ; These have their own timing checks. + + call Serve2bppRequest + call Serve1bppRequest + call AnimateTileset + +.done + + ldh a, [hOAMUpdate] + and a + jr nz, .done_oam + call hTransferShadowOAM +.done_oam + + ; vblank-sensitive operations are done + + xor a + ld [wVBlankOccurred], a + + ld a, [wOverworldDelay] + and a + jr z, .ok + dec a + ld [wOverworldDelay], a +.ok + + ld a, [wTextDelayFrames] + and a + jr z, .ok2 + dec a + ld [wTextDelayFrames], a +.ok2 + + call UpdateJoypad + + ld a, BANK(_UpdateSound) + rst Bankswitch + call _UpdateSound + ldh a, [hROMBankBackup] + rst Bankswitch + + ldh a, [hSeconds] + ldh [hUnusedBackup], a + + ret + +VBlank2:: +; sound only + + ldh a, [hROMBank] + ldh [hROMBankBackup], a + + ld a, BANK(_UpdateSound) + rst Bankswitch + call _UpdateSound + + ldh a, [hROMBankBackup] + rst Bankswitch + + xor a + ld [wVBlankOccurred], a + ret + +VBlank1:: +; scx, scy +; palettes +; bg map +; tiles +; oam +; sound / lcd stat + + ldh a, [hROMBank] + ldh [hROMBankBackup], a + + ldh a, [hSCX] + ldh [rSCX], a + ldh a, [hSCY] + ldh [rSCY], a + + call UpdatePals + jr c, .done + + call UpdateBGMap + call Serve2bppRequest_VBlank + + call hTransferShadowOAM + +.done + xor a + ld [wVBlankOccurred], a + + ; get requested ints + ldh a, [rIF] + ld b, a + ; discard requested ints + xor a + ldh [rIF], a + ; enable lcd stat + ld a, 1 << LCD_STAT + ldh [rIE], a + ; rerequest serial int if applicable (still disabled) + ; request lcd stat + ld a, b + and 1 << SERIAL + or 1 << LCD_STAT + ldh [rIF], a + + ei + ld a, BANK(_UpdateSound) + rst Bankswitch + call _UpdateSound + ldh a, [hROMBankBackup] + rst Bankswitch + di + + ; get requested ints + ldh a, [rIF] + ld b, a + ; discard requested ints + xor a + ldh [rIF], a + ; enable ints besides joypad + ld a, IE_DEFAULT + ldh [rIE], a + ; rerequest ints + ld a, b + ldh [rIF], a + ret + +UpdatePals:: +; update pals for either dmg or cgb + + ldh a, [hCGB] + and a + jp nz, UpdateCGBPals + + ; update gb pals + ld a, [wBGP] + ldh [rBGP], a + ld a, [wOBP0] + ldh [rOBP0], a + ld a, [wOBP1] + ldh [rOBP1], a + + and a + ret + +VBlank3:: +; scx, scy +; palettes +; bg map +; tiles +; oam +; sound / lcd stat + + ldh a, [hROMBank] + ldh [hROMBankBackup], a + + ldh a, [hSCX] + ldh [rSCX], a + ldh a, [hSCY] + ldh [rSCY], a + + ldh a, [hCGBPalUpdate] + and a + call nz, ForceUpdateCGBPals + jr c, .done + + call UpdateBGMap + call Serve2bppRequest_VBlank + + call hTransferShadowOAM +.done + + xor a + ld [wVBlankOccurred], a + + ldh a, [rIF] + push af + xor a + ldh [rIF], a + ld a, 1 << LCD_STAT + ldh [rIE], a + ldh [rIF], a + + ei + ld a, BANK(_UpdateSound) + rst Bankswitch + call _UpdateSound + ldh a, [hROMBankBackup] + rst Bankswitch + di + + ; request lcdstat + ldh a, [rIF] + ld b, a + ; and any other ints + pop af + or b + ld b, a + ; reset ints + xor a + ldh [rIF], a + ; enable ints besides joypad + ld a, IE_DEFAULT + ldh [rIE], a + ; request ints + ld a, b + ldh [rIF], a + ret + +VBlank4:: +; bg map +; tiles +; oam +; joypad +; serial +; sound + + ldh a, [hROMBank] + ldh [hROMBankBackup], a + + call UpdateBGMap + call Serve2bppRequest + + call hTransferShadowOAM + + call UpdateJoypad + + xor a + ld [wVBlankOccurred], a + + call AskSerial + + ld a, BANK(_UpdateSound) + rst Bankswitch + call _UpdateSound + + ldh a, [hROMBankBackup] + rst Bankswitch + ret + +VBlank5:: +; scx +; palettes +; bg map +; tiles +; joypad +; + + ldh a, [hROMBank] + ldh [hROMBankBackup], a + + ldh a, [hSCX] + ldh [rSCX], a + + call UpdatePalsIfCGB + jr c, .done + + call UpdateBGMap + call Serve2bppRequest +.done + + xor a + ld [wVBlankOccurred], a + + call UpdateJoypad + + xor a + ldh [rIF], a + ld a, 1 << LCD_STAT + ldh [rIE], a + ; request lcd stat + ldh [rIF], a + + ei + ld a, BANK(_UpdateSound) + rst Bankswitch + call _UpdateSound + ldh a, [hROMBankBackup] + rst Bankswitch + di + + xor a + ldh [rIF], a + ; enable ints besides joypad + ld a, IE_DEFAULT + ldh [rIE], a + ret + +VBlank6:: +; palettes +; tiles +; dma transfer +; sound + + ldh a, [hROMBank] + ldh [hROMBankBackup], a + + ; inc frame counter + ld hl, hVBlankCounter + inc [hl] + + call UpdateCGBPals + jr c, .done + + call Serve2bppRequest + call Serve1bppRequest + call DMATransfer +.done + + xor a + ld [wVBlankOccurred], a + + ld a, BANK(_UpdateSound) + rst Bankswitch + call _UpdateSound + + ldh a, [hROMBankBackup] + rst Bankswitch + ret diff --git a/home/video.asm b/home/video.asm new file mode 100644 index 0000000..9100fd8 --- /dev/null +++ b/home/video.asm @@ -0,0 +1,459 @@ +; Functions dealing with VRAM. + +DMATransfer:: +; Return carry if the transfer is completed. + + ldh a, [hDMATransfer] + and a + ret z + +; Start transfer + ldh [rHDMA5], a + +; Execution is halted until the transfer is complete. + + xor a + ldh [hDMATransfer], a + scf + ret + +UpdateBGMapBuffer:: +; Copy [hBGMapTileCount] 16x8 tiles from wBGMapBuffer +; to bg map addresses in wBGMapBufferPointers. + +; [hBGMapTileCount] must be even since this is done in pairs. + +; Return carry on success. + + ldh a, [hBGMapUpdate] + and a + ret z + + ldh a, [rVBK] + push af + +; Relocate the stack pointer to wBGMapBufferPointers + ld [hSPBuffer], sp + ld hl, wBGMapBufferPointers + ld sp, hl + +; We can now pop the addresses of affected spots on the BG Map + + ld hl, wBGMapPalBuffer + ld de, wBGMapBuffer + +.next +; Copy a pair of 16x8 blocks (one 16x16 block) + +rept 2 +; Get our BG Map address + pop bc + +; Palettes + ld a, 1 + ldh [rVBK], a + + ld a, [hli] + ld [bc], a + inc c + ld a, [hli] + ld [bc], a + dec c + +; Tiles + xor a + ldh [rVBK], a + + ld a, [de] + inc de + ld [bc], a + inc c + ld a, [de] + inc de + ld [bc], a +endr + +; We've done 2 16x8 blocks + ldh a, [hBGMapTileCount] + dec a + dec a + ldh [hBGMapTileCount], a + + jr nz, .next + +; Restore the stack pointer + ldh a, [hSPBuffer] + ld l, a + ldh a, [hSPBuffer + 1] + ld h, a + ld sp, hl + + pop af + ldh [rVBK], a + + xor a + ldh [hBGMapUpdate], a + scf + ret + +WaitTop:: +; Wait until the top third of the BG Map is being updated. + + ldh a, [hBGMapMode] + and a + ret z + + ldh a, [hBGMapThird] + and a + jr z, .done + + call DelayFrame + jr WaitTop + +.done + xor a + ldh [hBGMapMode], a + ret + +UpdateBGMap:: +; Update the BG Map, in thirds, from wTilemap and wAttrmap. + + ldh a, [hBGMapMode] + and a ; 0 + ret z + +; BG Map 0 + dec a ; 1 + jr z, .Tiles + dec a ; 2 + jr z, .Attr + +; BG Map 1 + dec a ; useless + + ldh a, [hBGMapAddress] + ld l, a + ldh a, [hBGMapAddress + 1] + ld h, a + push hl + + xor a ; LOW(vBGMap1) + ldh [hBGMapAddress], a + ld a, HIGH(vBGMap1) + ldh [hBGMapAddress + 1], a + + ldh a, [hBGMapMode] + push af + cp 3 + call z, .Tiles + pop af + cp 4 + call z, .Attr + + pop hl + ld a, l + ldh [hBGMapAddress], a + ld a, h + ldh [hBGMapAddress + 1], a + ret + +.Attr: + ld a, 1 + ldh [rVBK], a + + hlcoord 0, 0, wAttrmap + call .update + + xor a + ldh [rVBK], a + ret + +.Tiles: + hlcoord 0, 0 + +.update + ld [hSPBuffer], sp + +; Which third? + ldh a, [hBGMapThird] + and a ; 0 + jr z, .top + dec a ; 1 + jr z, .middle + ; 2 + +DEF THIRD_HEIGHT EQU SCREEN_HEIGHT / 3 + +; bottom + ld de, 2 * THIRD_HEIGHT * SCREEN_WIDTH + add hl, de + ld sp, hl + + ldh a, [hBGMapAddress + 1] + ld h, a + ldh a, [hBGMapAddress] + ld l, a + + ld de, 2 * THIRD_HEIGHT * BG_MAP_WIDTH + add hl, de + +; Next time: top third + xor a + jr .start + +.middle + ld de, THIRD_HEIGHT * SCREEN_WIDTH + add hl, de + ld sp, hl + + ldh a, [hBGMapAddress + 1] + ld h, a + ldh a, [hBGMapAddress] + ld l, a + + ld de, THIRD_HEIGHT * BG_MAP_WIDTH + add hl, de + +; Next time: bottom third + ld a, 2 + jr .start + +.top + ld sp, hl + + ldh a, [hBGMapAddress + 1] + ld h, a + ldh a, [hBGMapAddress] + ld l, a + +; Next time: middle third + ld a, 1 + +.start +; Which third to update next time + ldh [hBGMapThird], a + +; Rows of tiles in a third + ld a, THIRD_HEIGHT + +; Discrepancy between wTilemap and BGMap + ld bc, BG_MAP_WIDTH - (SCREEN_WIDTH - 1) + +.row +; Copy a row of 20 tiles +rept SCREEN_WIDTH / 2 - 1 + pop de + ld [hl], e + inc l + ld [hl], d + inc l +endr + pop de + ld [hl], e + inc l + ld [hl], d + + add hl, bc + dec a + jr nz, .row + + ldh a, [hSPBuffer] + ld l, a + ldh a, [hSPBuffer + 1] + ld h, a + ld sp, hl + ret + +Serve1bppRequest:: +; Only call during the first fifth of VBlank + + ld a, [wRequested1bppSize] + and a + ret z + +; Back out if we're too far into VBlank + ldh a, [rLY] + cp LY_VBLANK + ret c + cp LY_VBLANK + 2 + ret nc + +; Copy [wRequested1bppSize] 1bpp tiles from [wRequested1bppSource] to [wRequested1bppDest] + + ld [hSPBuffer], sp + +; Source + ld hl, wRequested1bppSource + ld a, [hli] + ld h, [hl] + ld l, a + ld sp, hl + +; Destination + ld hl, wRequested1bppDest + ld a, [hli] + ld h, [hl] + ld l, a + +; # tiles to copy + ld a, [wRequested1bppSize] + ld b, a + + xor a + ld [wRequested1bppSize], a + +.next + +rept 3 + pop de + ld [hl], e + inc l + ld [hl], e + inc l + ld [hl], d + inc l + ld [hl], d + inc l +endr + pop de + ld [hl], e + inc l + ld [hl], e + inc l + ld [hl], d + inc l + ld [hl], d + + inc hl + dec b + jr nz, .next + + ld a, l + ld [wRequested1bppDest], a + ld a, h + ld [wRequested1bppDest + 1], a + + ld [wRequested1bppSource], sp + + ldh a, [hSPBuffer] + ld l, a + ldh a, [hSPBuffer + 1] + ld h, a + ld sp, hl + ret + +Serve2bppRequest:: +; Only call during the first fifth of VBlank + + ld a, [wRequested2bppSize] + and a + ret z + +; Back out if we're too far into VBlank + ldh a, [rLY] + cp LY_VBLANK + ret c + cp LY_VBLANK + 2 + ret nc + jr _Serve2bppRequest + +Serve2bppRequest_VBlank:: + ld a, [wRequested2bppSize] + and a + ret z + +_Serve2bppRequest:: +; Copy [wRequested2bppSize] 2bpp tiles from [wRequested2bppSource] to [wRequested2bppDest] + + ld [hSPBuffer], sp + +; Source + ld hl, wRequested2bppSource + ld a, [hli] + ld h, [hl] + ld l, a + ld sp, hl + +; Destination + ld hl, wRequested2bppDest + ld a, [hli] + ld h, [hl] + ld l, a + +; # tiles to copy + ld a, [wRequested2bppSize] + ld b, a + + xor a + ld [wRequested2bppSize], a + +.next + +rept 7 + pop de + ld [hl], e + inc l + ld [hl], d + inc l +endr + pop de + ld [hl], e + inc l + ld [hl], d + + inc hl + dec b + jr nz, .next + + ld a, l + ld [wRequested2bppDest], a + ld a, h + ld [wRequested2bppDest + 1], a + + ld [wRequested2bppSource], sp + + ldh a, [hSPBuffer] + ld l, a + ldh a, [hSPBuffer + 1] + ld h, a + ld sp, hl + ret + +AnimateTileset:: +; Only call during the first fifth of VBlank + + ldh a, [hMapAnims] + and a + ret z + +; Back out if we're too far into VBlank + ldh a, [rLY] + cp LY_VBLANK + ret c + cp LY_VBLANK + 7 + ret nc + + ldh a, [hROMBank] + push af + ld a, BANK(_AnimateTileset) + rst Bankswitch + + ldh a, [rSVBK] + push af + ld a, BANK(wTilesetAnim) + ldh [rSVBK], a + + ldh a, [rVBK] + push af + xor a + ldh [rVBK], a + + call _AnimateTileset + + pop af + ldh [rVBK], a + pop af + ldh [rSVBK], a + pop af + rst Bankswitch + ret diff --git a/home/window.asm b/home/window.asm new file mode 100644 index 0000000..0a1a448 --- /dev/null +++ b/home/window.asm @@ -0,0 +1,93 @@ +RefreshScreen:: + call ClearWindowData + ldh a, [hROMBank] + push af + ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; aka BANK(LoadFonts_NoOAMUpdate) + rst Bankswitch + + call ReanchorBGMap_NoOAMUpdate + call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + call LoadFonts_NoOAMUpdate + + pop af + rst Bankswitch + ret + +CloseText:: + ldh a, [hOAMUpdate] + push af + ld a, $1 + ldh [hOAMUpdate], a + + call .CloseText + + pop af + ldh [hOAMUpdate], a + ld hl, wVramState + res 6, [hl] + ret + +.CloseText: + call ClearWindowData + xor a + ldh [hBGMapMode], a + call OverworldTextModeSwitch + call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + xor a + ldh [hBGMapMode], a + call SafeUpdateSprites + ld a, $90 + ldh [hWY], a + call UpdatePlayerSprite + farcall InitMapNameSign + farcall LoadOverworldFont + ret + +OpenText:: + call ClearWindowData + ldh a, [hROMBank] + push af + ld a, BANK(ReanchorBGMap_NoOAMUpdate) ; aka BANK(LoadFonts_NoOAMUpdate) + rst Bankswitch + + call ReanchorBGMap_NoOAMUpdate ; clear bgmap + call SpeechTextbox + call _OpenAndCloseMenu_HDMATransferTilemapAndAttrmap ; anchor bgmap + call LoadFonts_NoOAMUpdate ; load font + pop af + rst Bankswitch + + ret + +_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap:: + ldh a, [hOAMUpdate] + push af + ld a, $1 + ldh [hOAMUpdate], a + + farcall OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + + pop af + ldh [hOAMUpdate], a + ret + +SafeUpdateSprites:: + ldh a, [hOAMUpdate] + push af + ldh a, [hBGMapMode] + push af + xor a + ldh [hBGMapMode], a + ld a, $1 + ldh [hOAMUpdate], a + + call UpdateSprites + + xor a + ldh [hOAMUpdate], a + call DelayFrame + pop af + ldh [hBGMapMode], a + pop af + ldh [hOAMUpdate], a + ret diff --git a/includes.asm b/includes.asm new file mode 100644 index 0000000..e79b955 --- /dev/null +++ b/includes.asm @@ -0,0 +1,76 @@ +INCLUDE "charmap.asm" + +INCLUDE "macros/asserts.asm" +INCLUDE "macros/const.asm" +INCLUDE "macros/predef.asm" +INCLUDE "macros/farcall.asm" +INCLUDE "macros/data.asm" +INCLUDE "macros/code.asm" +INCLUDE "macros/gfx.asm" +INCLUDE "macros/coords.asm" +INCLUDE "macros/vc.asm" +INCLUDE "macros/wram_16bit.asm" +INCLUDE "macros/indirection.asm" +INCLUDE "macros/lists.asm" + +INCLUDE "macros/scripts/audio.asm" +INCLUDE "macros/scripts/maps.asm" +INCLUDE "macros/scripts/events.asm" +INCLUDE "macros/scripts/text.asm" +INCLUDE "macros/scripts/movement.asm" +INCLUDE "macros/scripts/battle_commands.asm" +INCLUDE "macros/scripts/battle_anims.asm" +INCLUDE "macros/scripts/oam_anims.asm" +INCLUDE "macros/scripts/pic_anims.asm" + +INCLUDE "macros/legacy.asm" + +INCLUDE "constants/hardware_constants.asm" +INCLUDE "constants/deco_constants.asm" +INCLUDE "constants/wram_constants.asm" +INCLUDE "constants/misc_constants.asm" +INCLUDE "constants/input_constants.asm" +INCLUDE "constants/gfx_constants.asm" +INCLUDE "constants/text_constants.asm" +INCLUDE "constants/audio_constants.asm" +INCLUDE "constants/battle_anim_constants.asm" +INCLUDE "constants/battle_constants.asm" +INCLUDE "constants/collision_constants.asm" +INCLUDE "constants/credits_constants.asm" +INCLUDE "constants/cry_constants.asm" +INCLUDE "constants/engine_flags.asm" +INCLUDE "constants/event_flags.asm" +INCLUDE "constants/icon_constants.asm" +INCLUDE "constants/landmark_constants.asm" +INCLUDE "constants/map_constants.asm" +INCLUDE "constants/map_data_constants.asm" +INCLUDE "constants/map_object_constants.asm" +INCLUDE "constants/map_setup_constants.asm" +INCLUDE "constants/mart_constants.asm" +INCLUDE "constants/menu_constants.asm" +INCLUDE "constants/mobile_constants.asm" +INCLUDE "constants/move_constants.asm" +INCLUDE "constants/move_effect_constants.asm" +INCLUDE "constants/item_constants.asm" +INCLUDE "constants/item_data_constants.asm" +INCLUDE "constants/music_constants.asm" +INCLUDE "constants/npc_trade_constants.asm" +INCLUDE "constants/phone_constants.asm" +INCLUDE "constants/pokemon_constants.asm" +INCLUDE "constants/pokemon_data_constants.asm" +INCLUDE "constants/printer_constants.asm" +INCLUDE "constants/radio_constants.asm" +INCLUDE "constants/scgb_constants.asm" +INCLUDE "constants/script_constants.asm" +INCLUDE "constants/serial_constants.asm" +INCLUDE "constants/sfx_constants.asm" +INCLUDE "constants/sprite_anim_constants.asm" +INCLUDE "constants/sprite_constants.asm" +INCLUDE "constants/sprite_data_constants.asm" +INCLUDE "constants/tileset_constants.asm" +INCLUDE "constants/trainer_constants.asm" +INCLUDE "constants/trainer_data_constants.asm" +INCLUDE "constants/type_constants.asm" +INCLUDE "constants/battle_tower_constants.asm" +INCLUDE "constants/16_bit_translation_constants.asm" +INCLUDE "constants/16_bit_locking_constants.asm" ; MUST come after the translation constants file! diff --git a/layout.link b/layout.link new file mode 100644 index 0000000..c6c5faa --- /dev/null +++ b/layout.link @@ -0,0 +1,395 @@ +ROM0 + org $0000 + "NULL" + org $0000 + "rst0" + org $0008 + "rst8" + org $0010 + "rst10" + org $0018 + "rst18" + org $0020 + "rst20" + org $0028 + "rst28" + org $0038 + "rst38" + org $0040 + "vblank" + org $0048 + "lcd" + org $0050 + "timer" + org $0058 + "serial" + org $0060 + "joypad" + org $0100 + "Header" + org $0150 + "Home" +ROMX $01 + "bank1" +ROMX $02 + "bank2" +ROMX $03 + "bank3" +ROMX $04 + "bank4" +ROMX $05 + "bank5" +ROMX $06 + "Tileset Data 1" +ROMX $07 + "Roofs" + "Tileset Data 2" + "Extra Songs 1" +ROMX $08 + "Clock Reset" + "Tileset Data 3" + "Egg Move Pointers" + "Egg Moves 1" +ROMX $09 + "bank9" +ROMX $0a + "bankA" + "Trainer Backpics" +ROMX $0b + "bankB" +ROMX $0c + "Tileset Data 4" +ROMX $0d + "Effect Commands" +ROMX $0e + "Enemy Trainers" + "Enemy Trainer Parties 2" +ROMX $0f + "Battle Core" +ROMX $10 + "bank10" + "Evolutions and Attacks Pointers" + "Evolutions and Attacks 1" +ROMX $11 + "bank11" +ROMX $12 + "Crystal Features 1" + "Egg Moves 2" + "Evolutions and Attacks 2" +ROMX $13 + "bank13" + "Shrink Pics" + "bank13_2" +ROMX $14 + "bank14" + "Unused Egg Pic" +ROMX $15 + "Map Scripts 1" +ROMX $16 + "Map Scripts 2" +ROMX $17 + "Map Scripts 3" +ROMX $18 + "Map Scripts 4" +ROMX $19 + "Crystal Phone Text" +ROMX $1a + "Map Scripts 5" +ROMX $1b + "Map Scripts 6" +ROMX $1c + "Map Scripts 7" +ROMX $1d + "Map Scripts 8" +ROMX $1e + "Map Scripts 9" +ROMX $1f + "Map Scripts 10" +ROMX $20 + "bank20" +ROMX $21 + "bank21" +ROMX $22 + "Crystal Features 2" +ROMX $23 + "bank23" +ROMX $24 + "bank24" +ROMX $25 + "Maps" + "Events" +ROMX $26 + "Map Scripts 11" +ROMX $27 + "Map Scripts 12" +ROMX $28 + "Phone Scripts 1" +ROMX $29 + "Phone Text" +ROMX $2a + "Map Blocks 1" +ROMX $2b + "Map Blocks 2" +ROMX $2c + "Map Blocks 3" +ROMX $2d + "Tileset Data 5" +ROMX $2e + "bank2E" +ROMX $2f + "Phone Scripts 2" +ROMX $30 + "Sprites 1" +ROMX $31 + "Sprites 2" +ROMX $32 + "bank32" + "The End" +ROMX $33 + "Move Animations" + "Extra Songs 2" +ROMX $34 + "Pic Animations 1" +ROMX $35 + "Pic Animations 2" +ROMX $36 + "Font Inversed" + "Pic Animations 3" +ROMX $37 + "Tileset Data 6" +ROMX $38 + "bank38" +ROMX $39 + "Copyright" + "bank39" +ROMX $3a + "Audio" + "Songs 1" +ROMX $3b + "Songs 2" +ROMX $3c + "Songs 3" + "Sound Effects" + "Cries" +ROMX $3d + "Songs 4" +ROMX $3e + "bank3E" +ROMX $3f + "bank3F" +ROMX $40 + "mobile40" +ROMX $41 + "bank41" + "Enemy Trainer Parties 1" +ROMX $42 + "mobile42" + "Intro Logo" + "Credits" +ROMX $43 + "Title" +ROMX $44 + "Mobile Adapter SDK" +ROMX $45 + "Mobile Adapter SDK Mail" + "mobile45" +ROMX $46 + "mobile46" +ROMX $47 + "Battle Tower" +ROMX $48 + "Pic Pointers" + "Pics 1" +ROMX $49 + "Unown Pic Pointers" + "Pics 2" +ROMX $4a + "Trainer Pic Pointers" + "Pics 3" +ROMX $4b + "Pics 4" +ROMX $4c + "Pics 5" +ROMX $4d + "Pics 6" +ROMX $4e + "Pics 7" +ROMX $4f + "Pics 8" +ROMX $50 + "Pics 9" +ROMX $51 + "Pics 10" +ROMX $52 + "Pics 11" +ROMX $53 + "Pics 12" +ROMX $54 + "Pics 13" +ROMX $55 + "Pics 14" +ROMX $56 + "Pics 15" +ROMX $57 + "Pics 16" +ROMX $58 + "Pics 17" +ROMX $59 + "Pics 18" +ROMX $5a + "Pics 19" +ROMX $5b + "bank5B" +ROMX $5c + "mobile5C" +ROMX $5d + "Crystal Phone Text 2" +ROMX $5e + "UpdateBattleHUDs" + "Songs 5" + "Crystal Sound Effects" + "mobile5E" +ROMX $5f + "mobile5F" +ROMX $60 + "Map Scripts 13" + "Pokedex Entries 001-064" +ROMX $61 + "Map Scripts 14" +ROMX $62 + "Map Scripts 15" +ROMX $63 + "Map Scripts 16" +ROMX $64 + "Map Scripts 17" +ROMX $65 + "Map Scripts 18" +ROMX $66 + "Map Scripts 19" +ROMX $67 + "Map Scripts 20" +ROMX $68 + "Map Scripts 21" +ROMX $69 + "Map Scripts 22" +ROMX $6a + "Map Scripts 23" +ROMX $6b + "Map Scripts 24" +ROMX $6c + "Phone Text 2" + "Map Scripts 25" +ROMX $6d + "Special Phone Text" +ROMX $6e + "Pokedex Entries 065-128" +ROMX $6f + "Text 1" +ROMX $70 + "Text 2" +ROMX $71 + "Text 3" +ROMX $72 + "Miscellaneous Text" +ROMX $73 + "Pokedex Entries 129-192" +ROMX $74 + "Pokedex Entries 193-251" +ROMX $75 + "16-bit ID stuff" +ROMX $77 + "Unown Font" + "Print Party" + "Tileset Data 7" + "bank77" + "Pokégear GFX" + "European Mail" +ROMX $78 + "Debug Room" + "Tileset Data 8" +ROMX $7b + "Battle Tower Text" +ROMX $7c + "Battle Tower Trainer Data" +ROMX $7d + "Mobile News Data" +ROMX $7e + "Crystal Events" +ROMX $7f + org $7de0 + "Stadium 2 Checksums" +WRAM0 + "Stack" + "Audio RAM" + "WRAM" + align 8 + "wSpriteAnims" + align 8 + "Sprites" + "Tilemap" + "Miscellaneous" + "Unused Map Buffer" + align 8 + "Overworld Map" + align 4 + "Video" + align 5 + "16-bit WRAM home data" +WRAMX 1 + "WRAM 1" + "Miscellaneous WRAM 1" + "More WRAM 1" + "Enemy Party" + "Party" +WRAMX 2 + "Pic Animations" + align 8 + "16-bit WRAM tables" +WRAMX 3 + "Battle Tower RAM" +WRAMX 4 + "News Script RAM" +WRAMX 5 + align 8 + "GBC Video" + org $d300 + "Battle Animations" + org $d500 + "Mobile RAM and Pokedex Listings" +WRAMX 6 + "Scratch RAM" +WRAMX 7 + "Stack RAM" +VRAM $00 + "VRAM0" +VRAM $01 + "VRAM1" +SRAM $00 + "Scratch" + org $a600 + "SRAM Bank 0" + org $ae00 + "Saved 16-bit conversion tables" + "Backup Save" +SRAM $01 + "Save" + "Active Box" + "Link Battle Data" + "SRAM Hall of Fame" + "SRAM Crystal Data" + "SRAM Battle Tower" +SRAM $02 + "Boxes 1-7" +SRAM $03 + "Boxes 8-14" +SRAM $04 + "SRAM Mobile 1" +SRAM $05 + "SRAM Mobile 2" +SRAM $06 + "SRAM Mobile 3" +SRAM $07 + "SRAM Mobile 4" +HRAM + "OAM DMA" + "HRAM" diff --git a/lib/mobile/mail.asm b/lib/mobile/mail.asm new file mode 100644 index 0000000..b428fcb --- /dev/null +++ b/lib/mobile/mail.asm @@ -0,0 +1,5160 @@ +; A library included as part of the Mobile Adapter GB SDK. + +setcharmap ascii + + +SECTION "Mobile Adapter SDK Mail", ROMX + +String_114000: + db "---", 0 +String_114004: + db "CGB-AAAA-00", 0, 0 + +Unknown_114011: + dw String_114033 + dw String_11403a + dw String_114043 + dw String_11404e + dw String_114053 + dw String_114058 + dw String_114062 + dw String_114074 + dw String_11408d + dw String_11409f + dw String_1140b8 + dw String_1140e6 + dw String_114110 + dw String_11413f + dw String_114160 + dw String_114160 + dw String_114163 + +String_114033: + db "From: ", 0 +String_11403a: + db "Sender: ", 0 +String_114043: + db "Reply-To: ", 0 +String_11404e: + db "To: ", 0 +String_114053: + db "Cc: ", 0 +String_114058: + db "Subject: ", 0 +String_114062: + db "MIME-Version: 1.0", 0 +String_114074: + db "X-Game-title: XXXXXXXXXX", 0 +String_11408d: + db "X-Game-code: CGB-", 0 +String_11409f: + db "X-GBmail-type: exclusive", 0 +String_1140b8: + db "Content-Type: text/plain; charset=iso-2022-jp", 0 +String_1140e6: + db "Content-Type: multipart/mixed; boundary=\"", 0 +String_114110: + db "Content-Type: Application/Octet-Stream; name=\"", 0 +String_11413f: + db "Content-Transfer-Encoding:Base64", 0 +String_114160: + db "--", 0 +String_114163: + db ".", 0 + +Jumptable_114165: + dw Stubbed_Function114268 + dw Function114269 + dw Function11433c + dw Function1143b7 + dw Function1144d1 + dw Function114b55 + dw Function114bbc + dw Function114cd9 + dw Function114e62 + dw Function1152b8 + dw Function1154d4 + dw Function1156cc + dw Function1159fb + +Unknown_11417f: + dw .From + dw .Sender + dw .ReplyTo + dw .To + dw .CC + dw .Subject + dw .Date + dw .ContentType + dw .MimeVersion + dw .XMailer + dw .XGameTitle + dw .XGameCode + dw .XGBMailType + +.From: + db "FROM:", 0 +.Sender: + db "SENDER:", 0 +.ReplyTo: + db "REPLY-TO:", 0 +.To: + db "TO:", 0 +.CC: + db "CC:", 0 +.Subject: + db "SUBJECT:", 0 +.Date: + db "DATE:", 0 +.ContentType: + db "CONTENT-TYPE:", 0 +.MimeVersion: + db "MIME-VERSION:", 0 +.XMailer: + db "X-MAILER:", 0 +.XGameTitle: + db "X-GAME-TITLE:", 0 +.XGameCode: + db "X-GAME-CODE:", 0 +.XGBMailType: + db "X-GBMAIL-TYPE:", 0 + +String_114218: + db "NAME=", 0 +String_11421e: + db "MULTIPART", 0 +String_114228: + db "BOUNDARY=", 0 +String_114232: + db "=?ISO-2022-JP?B?", 0 + +Function114243:: + ld a, SRAM_ENABLE + ld [MBC3SRamEnable], a + ldh a, [hSRAMBank] + push af ; if [$dc02] == 0, this is popped to pc. + push de + ld a, [$dc02] + add a + ld e, a + ld d, 0 + ld hl, Jumptable_114165 + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + pop de + jp hl + +Function11425c: + ld [$dc02], a + pop af + ldh [hSRAMBank], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ret + +Stubbed_Function114268: + ret + +Function114269: + ld h, d + ld l, e + xor a + ld [$dc02], a + ld [$dc03], a + ld a, [hli] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + inc hl + ld c, [hl] + inc hl + ld b, [hl] +.asm_114282 + ld a, [de] + and a + jr z, .asm_1142a4 + ld h, a + ld a, [$dc03] + and a + jr nz, .asm_114292 + ld a, h + cp $80 + jr nc, .asm_1142ae + +.asm_114292 + ld a, h + cp $d + jr z, .asm_1142bb + xor a + ld [$dc02], a +.asm_11429b + inc e + call z, Function114333 + dec bc + ld a, b + or c + jr nz, .asm_114282 + +.asm_1142a4 + ld a, [$dc03] + and a + jr nz, .asm_114303 + ld b, $80 + jr .asm_1142b0 + +.asm_1142ae + ld b, $81 + +.asm_1142b0 + ld a, [$dc00] + ld c, a + ld a, $1 + ld h, d + ld l, e + jp Function11425c + +.asm_1142bb + and a + jr z, .asm_1142a4 + inc e + call z, Function114333 + dec bc + ld a, b + or c + jr z, .asm_1142a4 + ld a, [de] + ld h, a + ld a, [$dc03] + and a + jr nz, .asm_1142d4 + ld a, h + cp $80 + jr nc, .asm_1142ae + +.asm_1142d4 + ld a, h + cp $a + jr nz, .asm_1142ae + ld a, [$dc03] + and a + jr nz, .asm_11430d + ld a, [$dc02] + and a + jr nz, .asm_114309 + ld a, $1 + ld [$dc02], a + inc e + call z, Function114333 + dec bc + ld a, b + or c + jr z, .asm_1142a4 + ld a, [de] + cp $20 + jr z, .asm_11429b + cp $9 + jr z, .asm_11429b + jr .asm_114282 + +.asm_1142fe + xor a + ld b, a + jp Function11425c + +.asm_114303 + xor a + ld b, $1 + jp Function11425c + +.asm_114309 + xor a + ld [$dc02], a + +.asm_11430d + ld a, [$dc02] + and a + jr nz, .asm_1142fe + ld a, $1 + ld [$dc03], a + inc e + call z, Function114333 + dec bc + ld a, b + or c + jr z, .asm_1142a4 + ld a, [de] + and a + jp z, .asm_1142a4 + cp $2e + jp nz, .asm_114282 + ld a, $1 + ld [$dc02], a + jp .asm_11429b + +Function114333: + push bc + ld bc, $dc00 + call Function115d80 + pop bc + ret + +Function11433c: + push de + ld h, d + ld l, e + ld c, [hl] + inc hl + ld e, [hl] + inc hl + ld d, [hl] + ld b, $b + call Function1143f3 + cp $2 + jr z, .asm_114358 + and a + jr z, .asm_114360 + pop hl +.asm_114351 + xor a + ld b, $3 + jp Function11425c + +.asm_114357 + pop hl + +.asm_114358 + pop hl + ld a, $1 + ld b, $82 + jp Function11425c + +.asm_114360 + ld a, h + ld [$dc03], a + pop hl + push bc + push de + ld c, [hl] + inc hl + ld e, [hl] + inc hl + ld d, [hl] + inc hl + ld b, $c + call Function1143f3 + cp $2 + jr z, .asm_114357 + and a + jr z, .asm_114381 + xor a + ld b, $2 + pop hl + pop hl + jp Function11425c + +.asm_114381 + pop de + pop bc + ld a, [$dc03] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + call Function114c0b + ld hl, String_114004 +.asm_114394 + ld de, $dc24 +.asm_114397 + ld a, [hli] + and a + jr z, .asm_1143ad + ld b, a + ld a, [de] + inc de + cp b + jr z, .asm_114397 +.asm_1143a1 + ld a, [hli] + and a + jr nz, .asm_1143a1 + ld a, [hl] + and a + jr nz, .asm_114394 + ld b, a + jp Function11425c + +.asm_1143ad + ld a, [de] + and a + jr nz, .asm_114351 + xor a + ld b, $1 + jp Function11425c + +Function1143b7: + ld a, [de] + ld b, a + inc de + ld a, [de] + ld c, a + inc de + ld a, [de] + ld h, a + inc de + ld a, [de] + inc de + push de + ld d, a + ld e, h + call Function1143f3 + cp $2 + jr z, .asm_1143eb + and a + jr nz, .asm_1143ed + ld a, h + pop hl + push af + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, [hli] + ld h, [hl] + ld l, a + pop af + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld [hl], b + xor a + jp Function11425c + +.asm_1143eb + ld b, $82 + +.asm_1143ed + ld a, $1 + pop hl + jp Function11425c + +Function1143f3: + call .asm_114412 + and a + jr nz, .asm_11440d + ld a, $4 + cp b + jr c, .asm_114407 + jr z, .asm_114402 +.asm_114400 + xor a + ret + +.asm_114402 + ld a, $0 + cp c + jr nc, .asm_114400 + +.asm_114407 + lb bc, $4, $0 + ld a, $2 + ret + +.asm_11440d + ld a, $1 + ld b, $84 + ret + +.asm_114412: + ld a, c + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld hl, Unknown_11417f + ld a, b + add a + ld c, a + ld b, 0 + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld c, $0 + jr .asm_11444a + +.asm_11442b + ld a, [de] + and a + jp z, .asm_1144c2 + inc e + call z, Function1144c8 + cp "\r" + jr nz, .asm_11442b + ld a, [de] + inc e + call z, Function1144c8 + cp "\n" + jr nz, .asm_11442b + ld a, [de] + cp "." + jr z, .asm_1144ae + cp "\r" + jr z, .asm_1144b8 + +.asm_11444a + ld a, [$dc00] + ld [$dc02], a + ld a, [de] + and a + jr z, .asm_1144c2 + inc e + call z, Function1144c8 + cp "a" + jr c, .asm_114462 + cp "z" + 1 + jr nc, .asm_114462 + sub $20 + +.asm_114462 + ld b, a + ld a, [hl] + and a + jr z, .asm_114476 + cp b + jr nz, .asm_11446e + inc c + inc hl + jr .asm_11444a + +.asm_11446e + ld a, c + and a + jr z, .asm_11442b + dec c + dec hl + jr .asm_11446e + +.asm_114476 + ld a, " " + cp b + jr z, .asm_114481 + ld a, "\n" + cp b + jr z, .asm_114481 + dec de + +.asm_114481 + ld h, d + ld l, e + ld bc, NULL +.asm_114486 + ld a, [de] + and a + jr z, .asm_1144c2 + inc bc + inc e + call z, Function1144c8 + cp "\r" + jr nz, .asm_114486 + ld a, [de] + inc bc + inc e + call z, Function1144c8 + cp "\n" + jr nz, .asm_114486 + ld a, [de] + cp " " + jr z, .asm_114486 + cp "\t" + jr z, .asm_114486 + ld d, h + ld e, l + ld a, [$dc02] + ld h, a + xor a + ret + +.asm_1144ae + inc e + call z, Function1144c8 + ld a, [de] + cp "\r" + jp nz, .asm_11442b + +.asm_1144b8 + inc e + call z, Function1144c8 + ld a, [de] + cp "\n" + jp nz, .asm_11442b + +.asm_1144c2 + ld a, $0 + ld [hl], a + ld a, $1 + ret + +Function1144c8: + push bc + ld bc, $dc00 + call Function115d80 + pop bc + ret + +Function1144d1: + call Function114561 + dec de + dec de + push de + inc de + inc de + inc de + inc hl + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc hl + ld a, [de] + ld [hld], a + dec de + ld a, [de] + ld [hl], a + xor a + ld [wDecoBigDoll], a + ld [$dc17], a + ld a, $2 + ld [$dc0e], a + ld hl, $dc03 + ld c, [hl] + inc hl + ld e, [hl] + inc hl + ld d, [hl] + call Function114576 + cp $2 + jr z, .asm_11455b + and a + jr z, .asm_114511 + ld a, $1 + ld [$dc0d], a + call Function1146fa + and a + jr nz, .asm_11455b + jr .asm_11451c + +.asm_114511 + call Function1146a4 + and a + jr nz, .asm_11455b + ld a, $2 + ld [$dc0d], a + +.asm_11451c + pop hl + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + ld a, [$dc0d] + ld [de], a + ld b, $0 + ld a, [wDecoBigDoll] + and a + jr z, .asm_114537 + ld b, $1 + +.asm_114537 + ld hl, $dc06 + ld a, [hl] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld hl, $dc09 + ld e, [hl] + inc hl + ld d, [hl] + dec de + ld a, d + or e + jr z, .asm_114559 + ld hl, wCurMapSceneScriptCount + ld e, [hl] + inc hl + ld d, [hl] + xor a + ld [de], a + jp Function11425c + +.asm_114559 + ld b, $83 + +.asm_11455b + pop hl + ld a, $1 + jp Function11425c + +Function114561: + ld hl, $dc03 + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hl], a + ret + +Function114576: + xor a + ld [wDecoBed], a + ld b, $7 + call Function1143f3 + cp $2 + jr z, .asm_1145b6 + and a + jr nz, .asm_1145b4 + ld a, h + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + push hl + push de + push bc + ld hl, $dc24 + call Function115d53 + call Function1145c5 + pop bc + pop de + pop hl + and a + jr z, .asm_1145bf + ld a, b + and a + jr nz, .asm_1145ba + ld a, h + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld hl, String_114218 + call Function114acf + +.asm_1145b4 + xor a + ret + +.asm_1145b6 + ld b, $82 + jr .asm_1145bc + +.asm_1145ba + ld b, $81 + +.asm_1145bc + ld a, $2 + ret + +.asm_1145bf + ld a, $1 + ld [wDecoBed], a + ret + +Function1145c5: + ld hl, $dc24 + ld de, String_11421e + ld c, $0 +.asm_1145cd + ld a, [hli] + and a + jr z, .asm_1145ef + cp $20 + jr z, .asm_1145cd + cp $d + jr z, .asm_1145f8 + cp $61 + jr c, .asm_1145e3 + cp $7b + jr nc, .asm_1145e3 + sub $20 + +.asm_1145e3 + ld b, a + ld a, [de] + and a + jr z, .asm_11460e + inc de + cp b + jr z, .asm_1145cd + dec de + jr .asm_1145cd + +.asm_1145ef + ld b, $0 + jr .asm_1145f5 + +.asm_1145f3 + ld b, $81 + +.asm_1145f5 + ld a, $1 + ret + +.asm_1145f8 + ld a, [hli] + and a + jr z, .asm_1145f3 + cp $a + jr nz, .asm_1145f3 + ld a, [hli] + and a + jr z, .asm_1145f3 + cp $20 + jr z, .asm_1145cd + cp $9 + jr z, .asm_1145cd + jr .asm_1145f3 + +.asm_11460e + ld a, c + and a + jr nz, .asm_114619 + ld c, $1 + ld de, String_114228 + jr .asm_1145cd + +.asm_114619 + dec hl + ld a, [hl] + cp $22 + jr nz, .asm_114620 + inc hl + +.asm_114620 + ld de, $ddc8 + ld b, $0 + ld c, $40 +.asm_114627 + ld a, [hli] + cp $22 + jr z, .asm_114636 + cp $d + jr z, .asm_114636 + ld [de], a + inc de + inc b + dec c + jr nz, .asm_114627 + +.asm_114636 + ld a, b + ld [wPartyMon5Defense], a + xor a + ret + +Function11463c: + ld a, [$dc00] + push af + push de + ld hl, $ddc8 + ld a, [wPartyMon5Defense] + ld b, a +.asm_114648 + ld a, [de] + ld c, a + ld a, [hli] + cp c + jr nz, .asm_11468a + inc e + call z, Function11469b + dec b + jr nz, .asm_114648 + ld a, [de] + cp $2d + jr z, .asm_114673 + cp $d + jr nz, .asm_11468a + xor a + ld [wDecoCarpet], a +.asm_114662 + inc e + call z, Function11469b + ld a, [de] + cp $a + jr nz, .asm_11468a + inc e + call z, Function11469b + xor a + pop hl + pop hl + ret + +.asm_114673 + inc e + call z, Function11469b + ld a, [de] + cp $2d + jr nz, .asm_11468a + inc e + call z, Function11469b + ld a, $1 + ld [wDecoCarpet], a + ld a, [de] + cp $d + jr z, .asm_114662 + +.asm_11468a + pop de + pop af + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + xor a + ld [wDecoCarpet], a + ld a, $1 + ret + +Function11469b: + push bc + ld bc, $dc00 + call Function115d80 + pop bc + ret + +Function1146a4: + call Function114867 + and a + jr nz, .asm_1146e4 + ld hl, $dc03 + ld a, [hli] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + call Function114a18 + and a + jr nz, .asm_1146e8 + call Function1148c2 + and a + jr nz, .asm_1146e4 + ld hl, $dc03 + ld a, [hli] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + call Function114a7a + and a + jr nz, .asm_1146e8 +.asm_1146da + dec bc + dec bc + call Function1149cc + and a + jr nz, .asm_1146e4 + xor a + ret + +.asm_1146e4 + ld b, $83 + jr .asm_1146f7 + +.asm_1146e8 + ld a, [$dc17] + and a + jr z, .asm_1146f5 + ld a, $1 + ld [wDecoBigDoll], a + jr .asm_1146da + +.asm_1146f5 + ld b, $81 + +.asm_1146f7 + ld a, $1 + ret + +Function1146fa: + call Function114867 + and a + jp nz, .asm_11478a + ld hl, $dc03 + ld a, [hli] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + call Function114a18 + and a + jp nz, .asm_11478e + call Function1149cc + and a + jp nz, .asm_11478a + ld a, $1 + ld [$dc0e], a + ld a, [$dc00] + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, $1 + ld [wDecoRightOrnament], a + call Function1147cd + and a + jp nz, .asm_1147b7 +.asm_114737 + call Function114843 + cp $1 + jr nz, .asm_114749 + ld a, [$dc17] + and a + jr z, .asm_114794 + ld a, $1 + ld [wDecoBigDoll], a + +.asm_114749 + call Function11494d + and a + jr nz, .asm_11478a + ld a, [wDecoBigDoll] + and a + jr nz, .asm_114786 + ld hl, $dc03 + ld a, [hli] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + call Function1147cd + and a + jr nz, .asm_1147b7 + ld a, [$dc0e] + cp $3 + jr nz, .asm_114773 + dec bc + dec bc + +.asm_114773 + call Function1149cc + and a + jr nz, .asm_11478a + ld a, [$dc0d] + inc a + ld [$dc0d], a + ld a, [wDecoBigDoll] + and a + jr z, .asm_114799 + +.asm_114786 + ld b, $1 + jr .asm_1147cb + +.asm_11478a + ld b, $83 + jr .asm_114796 + +.asm_11478e + ld a, [$dc17] + and a + jr nz, .asm_114796 + +.asm_114794 + ld b, $81 + +.asm_114796 + ld a, $1 + ret + +.asm_114799 + ld a, [wDecoCarpet] + and a + jr z, .asm_114737 + jr .asm_1147cb + + ld hl, $dc03 + ld a, [hli] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + call Function114a7a + and a + jr z, .asm_1147cb + xor a + ld [wDecoBigDoll], a + +.asm_1147b7 + ld a, [$dc17] + and a + jr z, .asm_114794 + ld a, $1 + ld [wDecoBigDoll], a + ld a, [$dc0d] + cp $1 + jr nz, .asm_114773 + ld b, $1 + +.asm_1147cb + xor a + ret + +Function1147cd: + ld bc, NULL + ld a, [wDecoRightOrnament] + and a + jr nz, .asm_11480c +.asm_1147d6 + ld a, [de] + and a + jr z, .asm_11482f + inc e + call z, Function11483a + inc bc + cp $d + jr nz, .asm_1147d6 + ld a, [de] + cp $a + jr nz, .asm_11482f +.asm_1147e8 + inc bc + inc e + call z, Function11483a + ld a, [de] + cp $20 + jr z, .asm_114827 + cp $9 + jr z, .asm_114827 + cp $d + jr nz, .asm_11482b + inc e + call z, Function11483a + ld a, [de] + cp $a + jr nz, .asm_11482f + inc e + call z, Function11483a + ld a, h + and a + jr z, .asm_11480c + dec bc + +.asm_11480c + ld a, [de] + cp $2d + jr nz, .asm_1147d6 + inc e + call z, Function11483a + ld a, [de] + cp $2d + jr nz, .asm_1147d6 + inc e + call z, Function11483a + push bc + call Function11463c + pop bc + and a + jr nz, .asm_1147d6 + ret + +.asm_114827 + ld h, $1 + jr .asm_1147e8 + +.asm_11482b + ld h, $0 + jr .asm_11480c + +.asm_11482f + and a + jr nz, .asm_114837 + ld a, $1 + ld [$dc17], a + +.asm_114837 + ld a, $1 + ret + +Function11483a: + push bc + ld bc, $dc00 + call Function115d80 + pop bc + ret + +Function114843: + ld a, [$dc00] + push af + push de + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + call Function114a18 + and a + jr nz, .asm_11485f + pop de + pop af + ld [$dc00], a + ld hl, String_114218 + call Function114acf + ret + +.asm_11485f + pop de + pop af + ld [$dc00], a + ld a, $1 + ret + +Function114867: + ld hl, $dc06 + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + ld a, $2 + ld [de], a + inc e + call z, Function1148b9 + ld a, $1 + ld [de], a + inc e + call z, Function1148b9 + ld hl, $dc03 + ld a, [hli] + ld [de], a + inc e + call z, Function1148b9 + ld a, [hli] + ld [de], a + inc e + call z, Function1148b9 + ld a, [hli] + ld [de], a + inc e + call z, Function1148b9 + ld hl, $dc06 + ld a, [wCurMapBGEventCount] + ld [hli], a + ld [hl], e + inc hl + ld [hl], d + inc hl + ld c, [hl] + inc hl + ld b, [hl] + ld d, $5 +.asm_1148a9 + dec bc + ld a, b + or c + jr z, .asm_1148b6 + dec d + jr nz, .asm_1148a9 + ld [hl], b + dec hl + ld [hl], c + xor a + ret + +.asm_1148b6 + ld a, $1 + ret + +Function1148b9: + push bc + ld bc, wCurMapBGEventCount + call Function115d80 + pop bc + ret + +Function1148c2: + ld hl, $dc06 + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + ld a, c + ld [de], a + inc e + call z, Function114944 + ld a, b + ld [de], a + inc e + call z, Function114944 + ld a, [$dc0e] + ld [de], a + inc e + call z, Function114944 + cp $3 + jr nz, .asm_114904 + ld hl, wDecoPlant + ld a, [hli] + ld [de], a + inc e + call z, Function114944 + ld a, [hli] + ld [de], a + inc e + call z, Function114944 + ld a, [hli] + ld [de], a + inc e + call z, Function114944 + ld a, [hli] + ld [de], a + inc e + call z, Function114944 + +.asm_114904 + ld hl, $dc03 + ld a, [hli] + ld [de], a + inc e + call z, Function114944 + ld a, [hli] + ld [de], a + inc e + call z, Function114944 + ld a, [hli] + ld [de], a + inc e + call z, Function114944 + ld hl, $dc06 + ld a, [wCurMapBGEventCount] + ld [hli], a + ld [hl], e + inc hl + ld [hl], d + inc hl + ld c, [hl] + inc hl + ld b, [hl] + ld a, [$dc0e] + cp $3 + jr z, .asm_114932 + ld d, $6 + jr .asm_114934 + +.asm_114932 + ld d, $a + +.asm_114934 + dec bc + ld a, b + or c + jr z, .asm_114941 + dec d + jr nz, .asm_114934 + ld [hl], b + dec hl + ld [hl], c + xor a + ret + +.asm_114941 + ld a, $1 + ret + +Function114944: + push bc + ld bc, wCurMapBGEventCount + call Function115d80 + pop bc + ret + +Function11494d: + ld hl, $dc06 + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + ld a, [$dc0e] + ld [de], a + inc e + call z, Function1149c3 + cp $3 + jr nz, .asm_114983 + ld hl, wDecoPlant + ld a, [hli] + ld [de], a + inc e + call z, Function1149c3 + ld a, [hli] + ld [de], a + inc e + call z, Function1149c3 + ld a, [hli] + ld [de], a + inc e + call z, Function1149c3 + ld a, [hli] + ld [de], a + inc e + call z, Function1149c3 + +.asm_114983 + ld hl, $dc03 + ld a, [hli] + ld [de], a + inc e + call z, Function1149c3 + ld a, [hli] + ld [de], a + inc e + call z, Function1149c3 + ld a, [hli] + ld [de], a + inc e + call z, Function1149c3 + ld hl, $dc06 + ld a, [wCurMapBGEventCount] + ld [hli], a + ld [hl], e + inc hl + ld [hl], d + inc hl + ld c, [hl] + inc hl + ld b, [hl] + ld a, [$dc0e] + cp $3 + jr z, .asm_1149b1 + ld d, $4 + jr .asm_1149b3 + +.asm_1149b1 + ld d, $8 + +.asm_1149b3 + dec bc + ld a, b + or c + jr z, .asm_1149c0 + dec d + jr nz, .asm_1149b3 + ld [hl], b + dec hl + ld [hl], c + xor a + ret + +.asm_1149c0 + ld a, $1 + ret + +Function1149c3: + push bc + ld bc, wCurMapBGEventCount + call Function115d80 + pop bc + ret + +Function1149cc: + ld hl, $dc06 + ld a, [hl] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + push de + ld hl, $dc09 + ld e, [hl] + inc hl + ld d, [hl] + dec de + ld a, d + or e + jr z, .asm_114a0b + dec de + ld a, d + or e + jr z, .asm_114a0b + ld [hl], d + dec hl + ld [hl], e + ld hl, wCurMapSceneScriptCount + ld e, [hl] + inc hl + ld d, [hl] + ld a, c + ld [de], a + inc e + call z, Function114a0f + ld a, b + ld [de], a + inc e + call z, Function114a0f + ld hl, $dc06 + ld a, [wCurMapBGEventCount] + ld [hli], a + ld [hl], e + inc hl + ld [hl], d + pop de + xor a + ret + +.asm_114a0b + pop de + ld a, $1 + ret + +Function114a0f: + push bc + ld bc, wCurMapBGEventCount + call Function115d80 + pop bc + ret + +Function114a18: + ld bc, NULL + ld h, b +.asm_114a1c + inc bc + ld a, [de] + and a + jr z, .asm_114a66 + inc e + call z, Function114a71 + cp $d + jr nz, .asm_114a1c + ld a, [de] + cp $a + jr nz, .asm_114a66 +.asm_114a2e + inc bc + inc e + call z, Function114a71 + ld a, [de] + cp $20 + jr z, .asm_114a5e + cp $9 + jr z, .asm_114a5e + cp $d + jr nz, .asm_114a62 + inc e + call z, Function114a71 + ld a, [de] + cp $a + jr nz, .asm_114a66 + inc e + call z, Function114a71 + ld a, h + and a + jr z, .asm_114a52 + dec bc + +.asm_114a52 + ld hl, $dc03 + ld a, [$dc00] + ld [hli], a + ld [hl], e + inc hl + ld [hl], d + xor a + ret + +.asm_114a5e + ld h, $1 + jr .asm_114a2e + +.asm_114a62 + ld h, $0 + jr .asm_114a1c + +.asm_114a66 + and a + jr nz, .asm_114a6e + ld a, $1 + ld [$dc17], a + +.asm_114a6e + ld a, $1 + ret + +Function114a71: + push bc + ld bc, $dc00 + call Function115d80 + pop bc + ret + +Function114a7a: + ld bc, NULL +.asm_114a7d + inc bc + ld a, [de] + and a + jr z, .asm_114abb + inc e + call z, Function114ac6 + cp $d + jr nz, .asm_114a7d + ld a, [de] + cp $a + jr nz, .asm_114abb + inc e + call z, Function114ac6 + inc bc + ld a, [de] + cp $2e + jr nz, .asm_114a7d + inc e + call z, Function114ac6 + ld a, [de] + cp $d + jr nz, .asm_114a7d + inc e + call z, Function114ac6 + ld a, [de] + cp $a + jr nz, .asm_114abb + inc e + call z, Function114ac6 + ld hl, $dc03 + ld a, [$dc00] + ld [hli], a + ld [hl], e + inc hl + ld [hl], d + xor a + ret + +.asm_114abb + and a + jr nz, .asm_114ac3 + ld a, $1 + ld [$dc17], a + +.asm_114ac3 + ld a, $1 + ret + +Function114ac6: + push bc + ld bc, $dc00 + call Function115d80 + pop bc + ret + +Function114acf: +.asm_114acf + push hl + push bc +.asm_114ad1 + ld a, [hl] + ld b, a + ld a, [de] + inc e + call z, Function114b4c + cp $61 + jr c, .asm_114ae2 + cp $7b + jr nc, .asm_114ae2 + sub $20 + +.asm_114ae2 + cp b + jr z, .asm_114af4 + pop bc + dec bc + push bc + ld a, b + or c + jr nz, .asm_114ad1 +.asm_114aec + ld a, $2 + ld [$dc0e], a + pop bc + pop hl + ret + +.asm_114af4 + inc hl +.asm_114af5 + ld a, [hli] + and a + jr z, .asm_114b19 + ld b, a + ld a, [de] + inc e + call z, Function114b4c + cp $61 + jr c, .asm_114b09 + cp $7b + jr nc, .asm_114b09 + sub $20 + +.asm_114b09 + cp b + jr nz, .asm_114b15 + pop bc + dec bc + push bc + ld a, b + or c + jr nz, .asm_114af5 + jr .asm_114aec + +.asm_114b15 + pop bc + pop hl + jr .asm_114acf + +.asm_114b19 + ld b, $0 + ld c, $40 + ld a, [de] + cp $22 + jr nz, .asm_114b26 + inc e + call z, Function114b4c + +.asm_114b26 + ld hl, wDecoPlant + ld a, [$dc00] + ld [hli], a + ld [hl], e + inc hl + ld [hl], d + inc hl +.asm_114b31 + ld a, [de] + cp $22 + jr z, .asm_114b42 + cp $d + jr z, .asm_114b42 + inc e + call z, Function114b4c + inc b + dec c + jr nz, .asm_114b31 + +.asm_114b42 + ld [hl], b + pop bc + pop hl + ld a, $3 + ld [$dc0e], a + xor a + ret + +Function114b4c: + push bc + ld bc, $dc00 + call Function115d80 + pop bc + ret + +Function114b55: + call Function114561 + ld b, $0 + ld hl, $dc03 + ld c, [hl] + inc hl + ld e, [hl] + inc hl + ld d, [hl] + ld hl, $dc24 +.asm_114b65 + push de + push bc + push hl + call Function1143f3 + cp $2 + jr z, .asm_114bb2 + and a + jr nz, .asm_114b8c + ld a, h + pop hl + inc hl + ld [hld], a + ld a, $1 + ld [hli], a + inc hl + ld [hl], e + inc hl + ld [hl], d + inc hl + ld [hl], c + inc hl + ld [hl], b + inc hl +.asm_114b82 + pop bc + pop de + inc b + ld a, b + cp $d + jr z, .asm_114b96 + jr .asm_114b65 + +.asm_114b8c + pop hl + xor a +rept NAME_LENGTH_JAPANESE + ld [hli], a +endr + jr .asm_114b82 + +.asm_114b96 + ld hl, $dc06 + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + inc hl + ld bc, $004e + ld hl, $dc24 + call Function115d6a + jp Function11425c + +.asm_114bb2 + ld a, $1 + pop bc + pop bc + pop bc + ld b, $82 + jp Function11425c + +Function114bbc: + ld h, d + ld l, e + ld a, [hli] + ld b, a + ld a, [hli] + ld c, a + ld a, [hli] + ld e, a + ld d, [hl] + inc hl + push hl + call Function1143f3 + cp $2 + jr z, .asm_114c03 + and a + jr nz, .asm_114bff + ld a, h + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + call Function114c0b + ld hl, $dc24 + call Function114c5e + ld a, b + or c + jr z, .asm_114bff + pop hl + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, [hli] + ld e, a + ld d, [hl] + ld hl, $dc24 + push bc + call Function115d6a + pop hl + jp Function11425c + +.asm_114bff + ld b, $84 + jr .asm_114c05 + +.asm_114c03 + ld b, $82 + +.asm_114c05 + ld a, $1 + pop hl + jp Function11425c + +Function114c0b: + ld hl, $dc24 + push bc + call Function115d53 + pop bc + ld hl, $dc24 + ld d, h + ld e, l +.asm_114c18 + ld a, [hli] + cp $d + jr z, .asm_114c34 + ld [de], a + inc de + dec bc + ld a, b + or c + jr nz, .asm_114c18 +.asm_114c24 + xor a + ld [de], a + ld hl, $dc24 + ld bc, NULL +.asm_114c2c + ld a, [hli] + inc bc + and a + jr nz, .asm_114c2c + dec bc + xor a + ret + +.asm_114c34 + dec bc + ld a, b + or c + jr z, .asm_114c24 + ld a, [hli] + cp $a + jr nz, .asm_114c18 + dec bc + ld a, b + or c + jr z, .asm_114c24 + ld a, [hli] + cp $20 + jr z, .asm_114c4e + cp $9 + jr z, .asm_114c4e + jr .asm_114c24 + +.asm_114c4e + dec bc + ld a, b + or c + jr z, .asm_114c24 + jr .asm_114c18 + +Function114c55: ; unreferenced + push bc + ld bc, $dc00 + call Function115d80 + pop bc + ret + +Function114c5e: + ld de, wPartyMon5Defense + push hl +.asm_114c62 + ld a, [hli] + ld [de], a + inc de + and a + jr z, .asm_114cc6 + cp $3d + jr nz, .asm_114c62 + ld a, [hli] + ld [de], a + inc de + cp $3f + jr nz, .asm_114c62 + dec de + dec de +.asm_114c75 + ld a, [hli] + cp $3f + jr nz, .asm_114c75 + ld a, [hli] + cp $42 + jr nz, .asm_114cb8 + inc hl + ld bc, NULL + push hl +.asm_114c84 + inc bc + ld a, [hli] + cp $3f + jr nz, .asm_114c84 + inc bc + ld a, [hli] + cp $3d + jr nz, .asm_114c84 + dec bc + dec bc + ld a, l + ld [$dc03], a + ld a, h + ld [$dc04], a + pop hl + push de + call Function115c49 + pop de + ld h, d + ld l, e + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a +.asm_114ca6 + ld a, [hli] + ld [de], a + inc de + dec bc + ld a, b + or c + jr nz, .asm_114ca6 + ld a, [$dc03] + ld l, a + ld a, [$dc04] + ld h, a + jr .asm_114c62 + +.asm_114cb8 + ld a, $3d + ld [de], a + inc de + ld a, $3f + ld [de], a + inc de +.asm_114cc0 + ld a, [hli] + ld [de], a + inc de + and a + jr nz, .asm_114cc0 + +.asm_114cc6 + ld [de], a + pop hl + ld de, wPartyMon5Defense + ld bc, NULL +.asm_114cce + inc bc + ld a, [de] + ld [hli], a + inc de + and a + jr z, .asm_114cd7 + jr .asm_114cce + +.asm_114cd7 + dec bc + ret + +Function114cd9: + ld h, d + ld l, e + ld b, [hl] + inc hl + ld c, [hl] + inc hl + ld e, [hl] + inc hl + ld d, [hl] + inc hl + push hl + call Function1143f3 + and a + jr nz, .asm_114d33 + ld [$dc03], a + ld [$dc04], a + ld a, h + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld hl, $dc24 + call Function114d39 + ld hl, $dc24 + call Function114d99 + pop hl + push hl +rept 4 + inc hl +endr + ld a, [hld] + cp b + jr c, .asm_114d2d + jr z, .asm_114d29 +.asm_114d11 + pop hl + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld hl, wPartyMon5Defense + call Function115d6a + xor a + jp Function11425c + +.asm_114d29 + ld a, [hli] + cp c + jr nc, .asm_114d11 + +.asm_114d2d + ld b, $83 + jr .asm_114d33 + + ld b, $82 + +.asm_114d33 + pop hl + ld a, $1 + jp Function11425c + +Function114d39: +.asm_114d39 + ld a, [$dc04] + and a + jr nz, .asm_114d4a + ld a, [de] + cp $28 + jr z, .asm_114d55 + cp $22 + jr z, .asm_114d55 + jr .asm_114d7f + +.asm_114d4a + ld a, [de] + cp $29 + jr z, .asm_114d5f + cp $22 + jr z, .asm_114d6f + jr .asm_114d84 + +.asm_114d55 + ld [$dc03], a + ld a, $1 + ld [$dc04], a + jr .asm_114d84 + +.asm_114d5f + ld a, [$dc03] + cp $28 + jr nz, .asm_114d84 + xor a + ld [$dc03], a + ld [$dc04], a + jr .asm_114d84 + +.asm_114d6f + ld a, [$dc03] + cp $22 + jr nz, .asm_114d84 + xor a + ld [$dc03], a + ld [$dc04], a + jr .asm_114d84 + +.asm_114d7f + cp $20 + jr z, .asm_114d84 + ld [hli], a + +.asm_114d84 + dec bc + ld a, b + or c + jr z, .asm_114d96 + inc e + jr nz, .asm_114d39 + push bc + ld bc, $dc00 + call Function115d80 + pop bc + jr .asm_114d39 + +.asm_114d96 + xor a + ld [hli], a + ret + +Function114d99: + ld de, wPartyMon5Defense + xor a + ld [de], a +.asm_114d9e + ld a, [hli] + call Function114df1 + and a + jr z, .asm_114dde + cp $40 + jr nz, .asm_114d9e + dec hl +.asm_114daa + dec hl + ld a, [hl] + call Function114e2d + and a + jr z, .asm_114daa + inc hl + push hl + ld b, $0 +.asm_114db6 + ld a, [hli] + cp $40 + jr z, .asm_114dc1 + call Function114e2d + and a + jr nz, .asm_114dc4 + +.asm_114dc1 + inc b + jr .asm_114db6 + +.asm_114dc4 + pop hl + ld a, [wPartyMon5Defense] + and a + jr z, .asm_114dd2 + ld a, $2c + inc de + ld [de], a + ld a, [wPartyMon5Defense] + +.asm_114dd2 + inc a + ld [wPartyMon5Defense], a +.asm_114dd6 + inc de + ld a, [hli] + ld [de], a + dec b + jr nz, .asm_114dd6 + jr .asm_114d9e + +.asm_114dde + inc de + xor a + ld [de], a + ld a, $dd + cpl + ld h, a + ld a, $c8 + cpl + ld l, a + inc hl + add hl, de + ld b, h + ld c, l + inc bc + inc bc + xor a + ret + +Function114df1: + cp $1b + ret nz + ld a, [hli] + and a + jr z, .asm_114e2b + cp $24 + jr nz, .asm_114e09 + ld a, [hli] + and a + jr z, .asm_114e2b + cp $42 + jr z, .asm_114e0b + cp $40 + jr z, .asm_114e0b + dec hl + +.asm_114e09 + dec hl + ret + +.asm_114e0b + ld a, [hli] + and a + jr z, .asm_114e2b + cp $1b + jr nz, .asm_114e0b + ld a, [hli] + and a + jr z, .asm_114e2b + cp $28 + jr nz, .asm_114e0b + ld a, [hli] + and a + jr z, .asm_114e2b + cp $42 + jr z, .asm_114e29 + cp $4a + jr z, .asm_114e29 + jr .asm_114e0b + +.asm_114e29 + ld a, [hli] + ret + +.asm_114e2b + xor a + ret + +Function114e2d: + cp $30 + jr c, .asm_114e45 + cp $40 + jr c, .asm_114e58 + cp $41 + jr c, .asm_114e45 + cp $5b + jr c, .asm_114e58 + cp $61 + jr c, .asm_114e45 + cp $7b + jr c, .asm_114e58 + +.asm_114e45 + cp $20 + jr z, .asm_114e58 + cp $2d + jr z, .asm_114e58 + cp $2e + jr z, .asm_114e58 + cp $5f + jr z, .asm_114e58 +.asm_114e55 + ld a, $1 + ret + +.asm_114e58 + cp $3c + jr z, .asm_114e55 + cp $3e + jr z, .asm_114e55 + xor a + ret + +Function114e62: + ld a, c + and a + jr nz, .asm_114e6f + ld a, [wTimerEventStartDay] + and a + jp z, Function11425c + jr .asm_114e76 + +.asm_114e6f + xor a + ld [wTimerEventStartDay], a + call Function114ee9 + +.asm_114e76 + call Function114f0a + cp $ff + jp z, Function11425c + and a + jr nz, .asm_114e99 + call Function114ea0 + and a + jr nz, .asm_114e99 + ld hl, $dc09 + ld a, [hli] + cpl + ld e, a + ld a, [hli] + cpl + ld d, a + inc de + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + xor a + jp Function11425c + +.asm_114e99 + ld a, $1 + ld b, $83 + jp Function11425c + +Function114ea0: + ld hl, $dc06 + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, $d + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_114edb + inc e + call z, Function114ee0 + ld a, $a + ld [de], a + dec bc + inc e + call z, Function114ee0 + ld hl, $dc06 + ld a, [wCurMapBGEventCount] + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld [hl], b + xor a + ld [wTimerEventStartDay], a + ret + +.asm_114edb + ld a, $1 + ld b, $83 + ret + +Function114ee0: + push bc + ld bc, wCurMapBGEventCount + call Function115d80 + pop bc + ret + +Function114ee9: + ld hl, $dc03 + ld a, b + ld [hli], a + ld a, c + ld [hli], a + ld [hli], a + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld c, a + ld [hli], a + inc de + ld a, [de] + ld b, a + ld [hli], a + inc de + ld a, c + ld [hli], a + ld a, b + ld [hli], a + ld a, e + ld [hli], a + ld [hl], d + ret + +Function114f0a: + call Function114f39 + and a + jr nz, .asm_114f26 + ld a, [$dc03] + cp $6 + jr c, .asm_114f21 + cp $c + jr z, .asm_114f23 + call Function114f59 + and a + jr nz, .asm_114f23 + +.asm_114f21 + xor a + ret + +.asm_114f23 + ld a, $1 + ret + +.asm_114f26 + call Function114f59 + and a + jr nz, .asm_114f23 + ld hl, $dc0d + ld e, [hl] + inc hl + ld d, [hl] + ld a, [de] + and a + jr z, .asm_114f21 + ld a, $ff + ret + +Function114f39: + ld hl, $dc0d + ld e, [hl] + inc hl + ld d, [hl] + inc hl + ld a, [de] + and a + jr z, .asm_114f58 + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld hl, $dc0d + ld [hl], e + inc hl + ld [hl], d + ld a, $1 + ret + +.asm_114f58 + ret + +Function114f59: + ld a, [wTimerEventStartDay] + and a + jr nz, .asm_114f7c + ld a, [$dc03] + cp $11 + jr z, .asm_114fa7 + add a + ld e, a + ld d, 0 + ld hl, Unknown_114011 + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call Function115020 + and a + jr nz, .asm_114fe7 + ld a, $1 + ld [wTimerEventStartDay], a + +.asm_114f7c + ld a, [$dc03] + cp $5 + jr c, .asm_114fc9 + jr z, .asm_114fec + cp $8 + jr c, .asm_114fa5 + jr z, .asm_114ff4 + cp $b + jr c, .asm_114fa5 + jr z, .asm_114ffc + cp $c + jr z, .asm_115007 + cp $d + jr z, .asm_114fa5 + cp $10 + jr c, .asm_115015 + jr z, .asm_114fa5 + cp $12 + jr c, .asm_114fa5 + jr .asm_114fe7 + +.asm_114fa5 + xor a + ret + +.asm_114fa7 + ld hl, wDecoBed + ld c, [hl] + inc hl + ld a, [hli] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + ld hl, $dc24 + call Function115d53 + ld hl, $dc24 + call Function115020 + and a + jr nz, .asm_114fe7 + jr .asm_11501e + +.asm_114fc9 + call Function115062 + and a + jr nz, .asm_114fe7 + ld a, [$dc04] + dec a + ld [$dc04], a + and a + jr z, .asm_114fdf + call Function114f39 + and a + jr nz, .asm_114fc9 + +.asm_114fdf + ld a, [$dc05] + ld [$dc04], a + jr .asm_11501e + +.asm_114fe7 + ld a, $1 + ld b, $83 + ret + +.asm_114fec + call Function115062 + and a + jr nz, .asm_114fe7 + jr .asm_11501e + +.asm_114ff4 + call Function115179 + and a + jr nz, .asm_114fe7 + jr .asm_11501e + +.asm_114ffc + ld hl, String_114000 + call Function115217 + and a + jr nz, .asm_114fe7 + jr .asm_11501e + +.asm_115007 + call Function11528f + ld hl, $dc24 + call Function115217 + and a + jr nz, .asm_114fe7 + jr .asm_11501e + +.asm_115015 + ld hl, String_114000 + call Function115217 + and a + jr nz, .asm_114fe7 + +.asm_11501e + xor a + ret + +Function115020: + push hl + ld hl, $dc06 + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + pop hl +.asm_115036 + ld a, [hli] + and a + jr z, .asm_115046 + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_115056 + inc e + call z, Function115059 + jr .asm_115036 + +.asm_115046 + ld hl, $dc06 + ld a, [wCurMapBGEventCount] + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld [hl], b + xor a + ret + +.asm_115056 + ld a, $1 + ret + +Function115059: + push bc + ld bc, wCurMapBGEventCount + call Function115d80 + pop bc + ret + +Function115062: + ld hl, wDecoBed + ld a, [hli] + and a + jr z, .asm_1150ae + ld c, a + ld a, [hli] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + ld b, $0 + ld hl, $dc24 + ld a, [wTimerEventStartDay] + cp $1 + jr z, .asm_11509b + cp $2 + jr z, .asm_115098 + cp $3 + jr nz, .asm_1150b2 + ld a, $2c + ld [hli], a + ld a, $d + ld [hli], a + ld a, $a + ld [hli], a + ld a, $9 + ld [hli], a + jr .asm_11509b + +.asm_115098 + ld a, $2c + ld [hli], a + +.asm_11509b + call Function115d53 + call Function1150b3 + call Function115136 + ld a, [wTimerEventStartDay] + inc a + cp $4 + jr nz, .asm_1150ae + ld a, $2 + +.asm_1150ae + ld [wTimerEventStartDay], a + xor a + +.asm_1150b2 + ret + +Function1150b3: + ld hl, $dc24 + ld de, wPartyMon5Defense + ld b, $0 +.asm_1150bb + ld c, $0 + ld a, [hli] + cp $1b + jr z, .asm_1150c9 + ld [de], a + inc de + and a + jr z, .asm_115133 + jr .asm_1150bb + +.asm_1150c9 + inc c + ld a, [hl] + cp $24 + jr nz, .asm_1150bb + inc hl + inc c + ld a, [hl] + cp $42 + jr z, .asm_1150dc + cp $40 + jr z, .asm_1150dc + jr .asm_1150bb + +.asm_1150dc + push hl +.asm_1150dd + inc c + ld a, [hli] + and a + jr z, .asm_115133 + cp $1b + jr nz, .asm_1150dd + inc c + ld a, [hli] + cp $28 + jr nz, .asm_1150dd + inc c + ld a, [hli] + cp $42 + jr z, .asm_1150f8 + cp $4a + jr z, .asm_1150f8 + jr .asm_1150dd + +.asm_1150f8 + ld a, l + ld [wDecoConsole], a + ld a, h + ld [wDecoLeftOrnament], a + ld hl, String_114232 +.asm_115103 + ld a, [hli] + and a + jr z, .asm_11510b + ld [de], a + inc de + jr .asm_115103 + +.asm_11510b + pop hl + dec hl + dec hl + push de + call Function1158c2 + pop de + ld h, d + ld l, e + ld c, [hl] + inc hl + ld b, [hl] + inc hl +.asm_115119 + ld a, [hli] + ld [de], a + inc de + dec bc + ld a, b + or c + jr nz, .asm_115119 + ld a, $3f + ld [de], a + inc de + ld a, $3d + ld [de], a + inc de + ld a, [wDecoConsole] + ld l, a + ld a, [wDecoLeftOrnament] + ld h, a + jr .asm_1150bb + +.asm_115133 + xor a + ld [de], a + ret + +Function115136: + ld hl, $dc06 + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld hl, wPartyMon5Defense +.asm_11514d + ld a, [hli] + and a + jr z, .asm_11515d + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_11516d + inc e + call z, Function115170 + jr .asm_11514d + +.asm_11515d + ld hl, $dc06 + ld a, [wCurMapBGEventCount] + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld [hl], b + xor a + ret + +.asm_11516d + ld a, $1 + ret + +Function115170: + push bc + ld bc, wCurMapBGEventCount + call Function115d80 + pop bc + ret + +Function115179: + ld hl, $dc06 + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld hl, $013f + ld a, [hli] + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_1151ef + inc e + call z, Function11520e + ld a, [hli] + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_1151ef + inc e + call z, Function11520e + ld a, [hli] + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_1151ef + inc e + call z, Function11520e + ld a, [hli] + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_1151ef + inc e + call z, Function11520e + ld a, $2d + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_1151ef + inc e + call z, Function11520e + ld a, [$014c] + ld h, a + and $f0 + swap a + cp $a + jr nc, .asm_1151d8 + add $30 + jr .asm_1151da + +.asm_1151d8 + add $37 + +.asm_1151da + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_1151ef + inc e + call z, Function11520e + ld a, h + and $f + cp $a + jr nc, .asm_1151f2 + add $30 + jr .asm_1151f4 + +.asm_1151ef + ld a, $1 + ret + +.asm_1151f2 + add $37 + +.asm_1151f4 + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_1151ef + inc e + call z, Function11520e + ld hl, $dc06 + ld a, [wCurMapBGEventCount] + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld [hl], b + xor a + ret + +Function11520e: + push bc + ld bc, wCurMapBGEventCount + call Function115d80 + pop bc + ret + +Function115217: + push hl + ld hl, $dc06 + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + pop hl +.asm_11522d + ld a, [hli] + and a + jr z, .asm_11523d + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_115262 + inc e + call z, Function115286 + jr .asm_11522d + +.asm_11523d + ld a, [$dc03] + cp $b + jr z, .asm_115278 + cp $c + jr z, .asm_115278 + cp $e + jr z, .asm_115252 + cp $f + jr z, .asm_115265 + jr .asm_115262 + +.asm_115252 + ld hl, $dc06 + ld a, [wCurMapBGEventCount] + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld [hl], b + xor a + ret + +.asm_115262 + ld a, $1 + ret + +.asm_115265 + ld h, $2 +.asm_115267 + ld a, $2d + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_115262 + inc e + call z, Function115286 + dec h + jr nz, .asm_115267 + jr .asm_115252 + +.asm_115278 + ld a, $22 + ld [de], a + dec bc + ld a, b + or c + jr z, .asm_115262 + inc e + call z, Function115286 + jr .asm_115252 + +Function115286: + push bc + ld bc, wCurMapBGEventCount + call Function115d80 + pop bc + ret + +Function11528f: + ld hl, wDecoBed + ld c, [hl] + inc hl + ld a, [hli] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld hl, $dc24 +.asm_1152a4 + ld a, [de] + ld [hli], a + inc e + call z, Function1152af + dec c + jr nz, .asm_1152a4 + ld [hl], c + ret + +Function1152af: + push bc + ld bc, $dc00 + call Function115d80 + pop bc + ret + +Function1152b8: + push bc + call Function11537d + push de + ld h, d + ld l, e + ld a, [hli] + ld b, a + ld c, $1 + call Function1153d2 + pop de + and a + jr nz, .asm_1152f9 +.asm_1152ca + ld hl, $dc0d + ld e, [hl] + inc hl + ld d, [hl] +.asm_1152d0 + ld a, [$dc03] + cp $3 + jr nz, .asm_1152d8 + push de + +.asm_1152d8 + cp $5 + jr nz, .asm_1152e7 + pop hl + ld a, [hli] + ld b, a + ld c, $3 + call Function1153d2 + and a + jr nz, .asm_1152f9 + +.asm_1152e7 + ld a, [de] + inc de + and a + jr nz, .asm_115301 + ld a, [$dc03] + cp $6 + jr z, .asm_115335 + inc a + ld [$dc03], a + jr .asm_1152d0 + +.asm_1152f9 + pop hl + ld a, $1 + ld b, $83 + jp Function11425c + +.asm_115301 + ld hl, $dc0d + ld [hl], e + inc hl + ld [hl], d +.asm_115307 + ld [$dc05], a + ld a, $1 + ld [$dc04], a + call Function1153b5 + call Function114f59 + and a + jr nz, .asm_1152f9 + ld a, [$dc05] + dec a + jr nz, .asm_115307 + ld a, [$dc03] + inc a + ld [$dc03], a + call Function114ea0 + and a + jr nz, .asm_1152f9 + ld [wTimerEventStartDay], a + ld a, [$dc03] + cp $6 + jr nz, .asm_1152ca + +.asm_115335 + call Function1153b5 + xor a + ld [wTimerEventStartDay], a + call Function114f59 + and a + jr nz, .asm_1152f9 + call Function114ea0 + and a + jr nz, .asm_1152f9 + ld a, [$dc03] + inc a + ld [$dc03], a + cp $9 + jr nz, .asm_115335 + pop bc + ld a, b + and a + jr z, .asm_11536b + call Function1153b5 + xor a + ld [wTimerEventStartDay], a + call Function114f59 + and a + jr nz, .asm_1152f9 + call Function114ea0 + and a + jr nz, .asm_1152f9 + +.asm_11536b + ld hl, $dc09 + ld a, [hli] + cpl + ld e, a + ld a, [hli] + cpl + ld d, a + inc de + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + xor a + jp Function11425c + +Function11537d: + ld hl, $dc06 + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + ld b, a + inc de + ld a, [de] + ld [hli], a + inc hl + ld a, [de] + ld [hld], a + ld a, b + ld [hli], a + inc de + ld hl, wDecoRightOrnament + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld hl, $dc0d + ld [hl], e + inc hl + ld [hl], d + xor a + ld [$dc03], a + ld [wTimerEventStartDay], a + ret + +Function1153b5: + ld hl, $dc0d + ld e, [hl] + inc hl + ld d, [hl] + inc hl + inc hl + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hl], a + inc de + ld a, [de] + ld [wDecoBed], a + inc de + ld hl, $dc0d + ld [hl], e + inc hl + ld [hl], d + ret + +Function1153d2: + ld a, [$dc03] + ld d, a + ld a, [$dc04] + ld e, a + push de + xor a + ld [$dc03], a + ld [$dc04], a + ld a, $24 + ld [wDecoConsole], a + ld a, $dc + ld [wDecoLeftOrnament], a + push bc + jr .asm_1153f4 + +.asm_1153ef + ld a, [hli] + and a + jr z, .asm_115426 + ld b, a + +.asm_1153f4 + push bc +.asm_1153f5 + ld a, [hli] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + inc hl + ld c, [hl] + inc hl + push hl + ld a, [wDecoConsole] + ld l, a + ld a, [wDecoLeftOrnament] + ld h, a + push bc + ld b, $0 + call Function115d53 + inc hl + ld [hl], a + pop bc + ld a, l + ld e, a + ld [wDecoConsole], a + ld a, h + ld d, a + ld [wDecoLeftOrnament], a + dec b + jr z, .asm_11542b + pop hl + jr .asm_1153f5 + +.asm_115426 + dec c + jr nz, .asm_1153ef + jr .asm_115430 + +.asm_11542b + pop hl + pop bc + dec c + jr nz, .asm_1153ef + +.asm_115430 + ld a, l + ld [wDecoConsole], a + ld a, h + ld [wDecoLeftOrnament], a + xor a + ld [de], a + ld hl, $dc24 +.asm_11543d + ld a, [hli] + and a + jr nz, .asm_11543d + ld a, [hl] + and a + jr z, .asm_115457 + dec hl + ld a, $2c + ld [hli], a + jr .asm_11543d + +.asm_11544b + pop hl + ld a, h + ld [$dc03], a + ld a, l + ld [$dc04], a + ld a, $1 + ret + +.asm_115457 + ld hl, $dc24 + call Function114d99 + ld hl, $ddc8 +.asm_115460 + ld a, [hli] + and a + jr z, .asm_11546d + cp $2c + jr nz, .asm_115460 + dec hl + xor a + ld [hli], a + jr .asm_115460 + +.asm_11546d + pop de + ld a, e + cp $1 + jr z, .asm_115477 + xor a + ld [hli], a + jr .asm_115478 + +.asm_115477 + dec bc + +.asm_115478 + ld hl, $dc18 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, b + cp h + jr c, .asm_11548c + jr nz, .asm_11544b + ld a, c + cp l + jr c, .asm_11548c + jr z, .asm_11548c + jr .asm_11544b + +.asm_11548c + ld hl, $dc18 + ld a, c + cpl + ld e, a + ld a, b + cpl + ld d, a + inc de + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + ld de, $dc18 + ld a, l + ld [de], a + inc de + ld a, h + ld [de], a + ld hl, wDecoRightOrnament + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + ld hl, $ddc8 + call Function115d6a + ld hl, wDecoRightOrnament + ld a, [wCurMapBGEventCount] + ld [hli], a + ld [hl], e + inc hl + ld [hl], d + ld a, [wDecoConsole] + ld e, a + ld a, [wDecoLeftOrnament] + ld d, a + pop hl + ld a, h + ld [$dc03], a + ld a, l + ld [$dc04], a + xor a + ret + +Function1154d4: + xor a + ld [wTimerEventStartDay], a + call Function1155af + call Function11560a + and a + jr nz, .asm_11552c + call Function1155d1 + ld a, [wDecoRightOrnament] + dec a + ld [wDecoRightOrnament], a + and a + jp z, .asm_115577 + cp $1 + jr nz, .asm_115531 + xor a + ld [wDailyResetTimer], a +.asm_1154f7 + ld a, [wDecoBigDoll] + cp $2 + jr z, .asm_115502 + cp $3 + jr z, .asm_11550f + +.asm_115502 + ld a, $a + ld [$dc03], a + call Function114f59 + and a + jr z, .asm_11551a + jr .asm_11552c + +.asm_11550f + ld a, $c + ld [$dc03], a + call Function114f59 + and a + jr nz, .asm_11552c + +.asm_11551a + call Function114ea0 + and a + jr nz, .asm_11552c + call Function114ea0 + and a + jr nz, .asm_11552c + call Function11560a + and a + jr z, .asm_1155a0 + +.asm_11552c + ld a, $1 + jp Function11425c + +.asm_115531 + ld a, $1 + ld [wDailyResetTimer], a + ld a, $b + ld [$dc03], a + call Function114f59 + and a + jr nz, .asm_11552c + call Function114ea0 + and a + jr nz, .asm_11552c +.asm_115547 + call Function114ea0 + and a + jr nz, .asm_11552c + ld a, $e + ld [$dc03], a + call Function114f59 + and a + jr nz, .asm_11552c + call Function114ea0 + and a + jr nz, .asm_11552c + jr .asm_1154f7 + +.asm_115560 + call Function114ea0 + and a + jr nz, .asm_11552c + ld a, [wDailyResetTimer] + and a + jr z, .asm_11557d + ld a, $f + ld [$dc03], a + call Function114f59 + and a + jr nz, .asm_11552c + +.asm_115577 + call Function114ea0 + and a + jr nz, .asm_11552c + +.asm_11557d + ld a, $10 + ld [$dc03], a + call Function114f59 + and a + jr nz, .asm_11552c + call Function114ea0 + and a + jr nz, .asm_11552c + ld hl, $dc09 + ld a, [hli] + cpl + ld e, a + ld a, [hli] + cpl + ld d, a + inc de + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + xor a + jp Function11425c + +.asm_1155a0 + ld a, [wDecoRightOrnament] + dec a + ld [wDecoRightOrnament], a + and a + jr z, .asm_115560 + call Function1155d1 + jr .asm_115547 + +Function1155af: + ld hl, $dc06 + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + ld b, a + inc de + ld a, [de] + ld [hli], a + ld [hl], b + inc hl + ld [hli], a + inc de + ld a, [de] + ld [wDecoRightOrnament], a + inc de + ld a, e + ld [hli], a + ld [hl], d + call Function1155d1 + ret + +Function1155d1: + ld a, [$dc0d] + ld l, a + ld a, [$dc0e] + ld h, a + ld a, [hli] + ld [wDecoBigDoll], a + cp $3 + jr nz, .asm_1155f0 + ld de, wDecoCarpet + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + ld a, [hli] + ld [wDecoBed], a + +.asm_1155f0 + ld de, $dc17 + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + ld a, l + ld [$dc0d], a + ld a, h + ld [$dc0e], a + ret + +Function11560a: + ld a, [$dc06] + ld [wCurMapBGEventCount], a + ld a, [$dc17] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld hl, $dc1a + ld c, [hl] + inc hl + ld b, [hl] + ld a, [wCurMapCallbackCount] + cp b + jp c, .asm_1156b1 + jr nz, .asm_115631 + ld a, [$dc09] + cp c + jp c, .asm_1156b1 + +.asm_115631 + ld a, b + or c + jr z, .asm_1156a9 + ld a, [$dc09] + ld l, a + ld a, [wCurMapCallbackCount] + ld h, a + ld a, c + cpl + ld e, a + ld a, b + cpl + ld d, a + inc de + add hl, de + ld a, l + ld [$dc09], a + ld a, h + ld [wCurMapCallbackCount], a +.asm_11564d + ld a, $3 + cp b + jr c, .asm_1156b6 + jr nz, .asm_115659 + ld a, $db + cp c + jr c, .asm_1156b6 + +.asm_115659 + ld a, [$dc1a] + ld e, a + ld a, [$dc1b] + ld d, a + ld a, c + cpl + ld l, a + ld a, b + cpl + ld h, a + inc hl + add hl, de + ld a, l + ld [$dc1a], a + ld a, h + ld [$dc1b], a + push bc + ld hl, $dc18 + ld e, [hl] + inc hl + ld d, [hl] + ld hl, $dc24 + call Function115d53 + ld hl, $dc18 + ld [hl], e + inc hl + ld [hl], d + pop bc + ld a, [wCurMapBGEventCount] + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld hl, wCurMapSceneScriptCount + ld e, [hl] + inc hl + ld d, [hl] + ld hl, $dc24 + call Function115d6a + ld hl, wCurMapSceneScriptCount + ld [hl], e + inc hl + ld [hl], d + ld hl, $dc1a + ld c, [hl] + inc hl + ld b, [hl] + ld a, b + or c + jr nz, .asm_11564d + +.asm_1156a9 + ld a, [wCurMapBGEventCount] + ld [$dc06], a + xor a + ret + +.asm_1156b1 + ld a, $1 + ld b, $83 + ret + +.asm_1156b6 + ld a, $3 + cpl + ld h, a + ld a, $db + cpl + ld l, a + add hl, bc + ld de, $dc1a + ld a, l + ld [de], a + inc de + ld a, h + ld [de], a + ld bc, $03db + jr .asm_115659 + +Function1156cc: + ld a, [wTimerEventStartDay] + and a + jp z, Function11425c + cp $2 + jr z, .asm_1156fa + cp $3 + jr z, .asm_1156fd + cp $4 + jr z, .asm_1156fd + cp $5 + jr z, .asm_115716 + cp $ff + jr z, .asm_11572b + cp $1 + jp nz, Function11425c + call Function115732 + call Function11575c + ld a, h + ld [wDecoPoster], a + ld a, l + ld [wDecoPlant], a + +.asm_1156fa + call Function1157d0 + +.asm_1156fd + call Function11581e + and a + jr nz, .asm_11572b + ld a, [wTimerEventStartDay] + cp $5 + jr z, .asm_115716 + ld a, [wDecoPoster] + ld h, a + ld a, [wDecoPlant] + ld l, a + xor a + jp Function11425c + +.asm_115716 + ld hl, wCurMapCallbackCount + ld a, [hli] + cpl + ld e, a + ld a, [hli] + cpl + ld d, a + inc de + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + xor a + ld [wTimerEventStartDay], a + jp Function11425c + +.asm_11572b + ld a, $1 + ld b, $83 + jp Function11425c + +Function115732: + ld hl, $dc02 + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + dec de + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hli], a + ld a, c + ld [hli], a + ld [hl], b + ret + +Function11575c: + ld hl, $dc05 + ld a, [hli] + ld h, [hl] + ld l, a + ld e, $10 + ld b, $0 + ld c, b + ld d, b + ld a, $3 +.asm_11576a + rl l + rl h + rl d + cp d + jr c, .asm_11577c + rl c + rl b + dec e + jr nz, .asm_11576a + jr .asm_11578a + +.asm_11577c + ld a, d + sub $3 + ld d, a + ld a, $3 + scf + rl c + rl b + dec e + jr nz, .asm_11576a + +.asm_11578a + ld a, d + and a + jr z, .asm_11578f + inc bc + +.asm_11578f + sla c + rl b + sla c + rl b + ld h, b + ld l, c + push hl + ld e, $10 + ld b, $0 + ld c, b + ld d, b + ld a, $40 +.asm_1157a2 + rl l + rl h + rl d + cp d + jr c, .asm_1157b4 + rl c + rl b + dec e + jr nz, .asm_1157a2 + jr .asm_1157c3 + +.asm_1157b4 + ld a, d + sub $40 + ld d, a + ld a, $40 + scf + rl c + rl b + dec e + jr nz, .asm_1157a2 + inc bc + +.asm_1157c3 + and a + sla c + rl b + pop hl + add hl, bc + ld a, $2 + ld [wTimerEventStartDay], a + ret + +Function1157d0: + ld hl, $dc05 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [$dc0e] + ld c, a + ld a, [wDecoBed] + ld b, a + cp h + jr c, .asm_1157eb + jr nz, .asm_1157e9 + ld a, c + cp l + jr c, .asm_1157eb + jr z, .asm_1157eb + +.asm_1157e9 + ld b, h + ld c, l + +.asm_1157eb + push bc + ld a, b + cpl + ld b, a + ld a, c + cpl + ld c, a + inc bc + add hl, bc + ld a, l + ld [$dc05], a + ld a, h + ld [$dc06], a + ld a, h + or l + jr nz, .asm_11580f + pop bc + ld a, c + ld [$dc0e], a + ld a, b + ld [wDecoBed], a + ld a, $4 + ld [wTimerEventStartDay], a + ret + +.asm_11580f + pop bc + ld a, c + ld [$dc0e], a + ld a, b + ld [wDecoBed], a + ld a, $3 + ld [wTimerEventStartDay], a + ret + +Function11581e: + ld a, [wTimerEventStartDay] + and a + ret z + ld a, [$dc0e] + ld c, a + ld a, [wDecoBed] + ld b, a + ld hl, $dc02 + ld a, [hli] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + ld hl, $dc24 + push bc + call Function115d53 + pop bc + ld hl, $dc02 + ld a, [$dc00] + ld [hli], a + ld [hl], e + inc hl + ld [hl], d + ld hl, $dc24 + ld de, wPartyMon5Defense + call Function1158c2 + ld hl, wPartyMon5Defense + ld c, [hl] + inc hl + ld b, [hl] + inc hl + push hl + ld a, [wCurMapCallbackCount] + ld l, a + ld a, [wCurMapCallbacksPointer] + ld h, a + cp b + jr c, .asm_1158bb + jr nz, .asm_11586e + ld a, l + cp c + jr c, .asm_1158bb + +.asm_11586e + push bc + ld a, b + cpl + ld b, a + ld a, c + cpl + ld c, a + inc bc + add hl, bc + ld a, l + ld [wCurMapCallbackCount], a + ld a, h + ld [wCurMapCallbacksPointer], a + pop bc + pop hl + ld hl, wCurMapSceneScriptCount + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + ld hl, wPartyMon5Speed + call Function115d6a + ld hl, wCurMapSceneScriptCount + ld a, [wCurMapBGEventCount] + ld [hli], a + ld a, e + ld [hli], a + ld [hl], d + ld a, [wTimerEventStartDay] + cp $3 + jr z, .asm_1158b4 + cp $4 + jr z, .asm_1158ad + jr .asm_1158bc + +.asm_1158ad + ld a, $5 + ld [wTimerEventStartDay], a + jr .asm_1158b9 + +.asm_1158b4 + ld a, $2 + ld [wTimerEventStartDay], a + +.asm_1158b9 + xor a + ret + +.asm_1158bb + pop hl + +.asm_1158bc + ld a, $ff + ld [wTimerEventStartDay], a + ret + +Function1158c2: + ld a, e + ld [wSwarmFlags], a + ld a, d + ld [$dc21], a + xor a + ld [$dc22], a + xor a + ld [de], a + inc de + ld [de], a + inc de + ld a, c + ld [$dc19], a + ld a, b + ld [$dc1a], a + ld c, e + ld b, d + ld e, l + ld d, h + ld l, c + ld h, b + xor a + ld [wDailyFlags2], a + +.asm_1158e5 + ld b, $3 + push hl + ld hl, $dc1b +.asm_1158eb + ld a, [de] + inc de + ld [hli], a + dec b + jr nz, .asm_1158eb + ld a, [$dc19] + ld c, a + ld a, [$dc1a] + ld b, a + xor a + or b + jr nz, .asm_115914 + ld a, $2 + cp c + jr c, .asm_115914 + push hl + dec hl + ld a, c + ld [wDailyFlags2], a +.asm_115908 + xor a + ld [hld], a + inc c + ld a, $3 + cp c + jr nz, .asm_115908 + pop hl + ld bc, $0003 + +.asm_115914 + dec bc + dec bc + dec bc + ld a, c + ld [$dc19], a + ld a, b + ld [$dc1a], a + push de + push hl + ld hl, wSwarmFlags + ld a, [hli] + ld h, [hl] + ld l, a + ld e, [hl] + inc hl + ld d, [hl] +rept 4 + inc de +endr + ld [hl], d + dec hl + ld [hl], e + pop hl + dec hl + ld c, [hl] + dec hl + ld b, [hl] + dec hl + ld a, [hl] + ld d, a + srl a + srl a + ld [hli], a + ld a, $3 + and d + ld d, a + ld a, $f0 + and b + or d + swap a + ld [hli], a + ld a, $f + and b + ld d, a + ld a, c + and $c0 + or d + rlca + rlca + ld [hli], a + ld a, $3f + and c + ld [hld], a + dec hl + dec hl + pop de + ld b, h + ld c, l + pop hl + ld a, [bc] + inc bc + call Function1159dc + ld [hli], a + ld a, [bc] + inc bc + call Function1159dc + ld [hli], a + ld a, [bc] + inc bc + call Function1159dc + ld [hli], a + ld a, [bc] + inc bc + call Function1159dc + ld [hli], a + ld a, [$dc22] + inc a + cp $10 + jr nz, .asm_1159b1 + push af + push bc + ld a, [$dc19] + ld b, a + ld a, [$dc1a] + or b + jr nz, .asm_115998 + ld a, [$dc05] + ld b, a + ld a, [$dc06] + or b + jr nz, .asm_115998 + pop bc + pop af + jr .asm_1159c4 + +.asm_115998 + pop bc + pop af + ld a, $d + ld [hli], a + ld a, $a + ld [hli], a + push hl + ld hl, wSwarmFlags + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hli] + ld c, a + ld b, [hl] + inc bc + inc bc + ld a, b + ld [hld], a + ld [hl], c + pop hl + xor a + +.asm_1159b1 + ld [$dc22], a + ld a, [$dc19] + cp $0 + jp nz, .asm_1158e5 + ld a, [$dc1a] + cp $0 + jp nz, .asm_1158e5 + +.asm_1159c4 + ld a, [wDailyFlags2] + cp $0 + jr z, .asm_1159d8 + push hl + dec hl + ld b, a +.asm_1159ce + ld a, $3d + ld [hld], a + inc b + ld a, $3 + cp b + jr nz, .asm_1159ce + pop hl + +.asm_1159d8 + ld a, $0 + ld [hl], a + ret + +Function1159dc: + cp $1a + jr c, .asm_1159ef + cp $34 + jr c, .asm_1159f2 + cp $3e + jr c, .asm_1159f5 + cp $3e + jr z, .asm_1159f8 + ld a, $2f + ret + +.asm_1159ef + add $41 + ret + +.asm_1159f2 + add $47 + ret + +.asm_1159f5 + sub $4 + ret + +.asm_1159f8 + ld a, $2b + ret + +Function1159fb: + ld a, [wTimerEventStartDay] + and a + jp z, Function11425c + cp $2 + jr z, .asm_115a29 + cp $3 + jr z, .asm_115a2c + cp $4 + jr z, .asm_115a2c + cp $5 + jr z, .asm_115a45 + cp $ff + jr z, .asm_115a5a + cp $1 + jp nz, Function11425c + call Function115732 + call Function115a5f + ld a, h + ld [wDecoPlant], a + ld a, l + ld [wDecoPoster], a + +.asm_115a29 + call Function115ab0 + +.asm_115a2c + call Function115b00 + and a + jr nz, .asm_115a5a + ld a, [wTimerEventStartDay] + cp $5 + jr z, .asm_115a45 + ld a, [wDecoPoster] + ld h, a + ld a, [wDecoPlant] + ld l, a + xor a + jp Function11425c + +.asm_115a45 + ld hl, wCurMapCallbackCount + ld a, [hli] + cpl + ld e, a + ld a, [hli] + cpl + ld d, a + inc de + ld a, [hli] + ld h, [hl] + ld l, a + add hl, de + xor a + ld [wTimerEventStartDay], a + jp Function11425c + +.asm_115a5a + ld a, $1 + jp Function11425c + +Function115a5f: + ld hl, $dc05 + ld a, [hli] + ld h, [hl] + ld l, a + push hl + ld e, $10 + ld b, $0 + ld c, b + ld d, b + ld a, $42 +.asm_115a6e + rl l + rl h + rl d + cp d + jr c, .asm_115a80 + rl c + rl b + dec e + jr nz, .asm_115a6e + jr .asm_115a8e + +.asm_115a80 + ld a, d + sub $42 + ld d, a + ld a, $42 + scf + rl c + rl b + dec e + jr nz, .asm_115a6e + +.asm_115a8e + sla c + rl b + pop hl + ld a, b + cpl + ld b, a + ld a, c + cpl + ld c, a + inc bc + add hl, bc + srl h + rr l + srl h + rr l + ld b, h + ld c, l + sla c + rl b + add hl, bc + ld a, $2 + ld [wTimerEventStartDay], a + ret + +Function115ab0: + ld hl, $dc05 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [$dc0e] + ld c, a + ld a, [wDecoBed] + ld b, a + cp h + jr c, .asm_115acb + jr nz, .asm_115ac9 + ld a, c + cp l + jr c, .asm_115acb + jr z, .asm_115acb + +.asm_115ac9 + ld b, h + ld c, l + +.asm_115acb + push bc + ld a, b + cpl + ld b, a + ld a, c + cpl + ld c, a + inc bc + add hl, bc + ld a, l + ld [$dc05], a + ld a, h + ld [$dc06], a + ld a, h + or l + jr nz, .asm_115af0 + pop bc + ld a, c + ld [$dc0e], a + ld a, b + ld [wDecoBed], a + ld a, $4 + ld [wTimerEventStartDay], a + xor a + ret + +.asm_115af0 + pop bc + ld a, c + ld [$dc0e], a + ld a, b + ld [wDecoBed], a + ld a, $3 + ld [wTimerEventStartDay], a + xor a + ret + +Function115b00: + ld a, [wTimerEventStartDay] + and a + ret z + ld a, [$dc0e] + ld c, a + ld a, [wDecoBed] + ld b, a + ld hl, $dc02 + ld a, [hli] + ld [$dc00], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + ld hl, wPartyMon5Defense + push bc + call Function115bc8 + pop hl + and a + jr z, .asm_115b43 + cp $2 + jr z, .asm_115b3b + ld a, [wTimerEventStartDay] + cp $4 + jr z, .asm_115b43 + inc hl + inc hl + jr .asm_115b43 + +.asm_115b36 + pop hl + ld b, $83 + jr .asm_115b3d + +.asm_115b3b + ld b, $81 + +.asm_115b3d + ld a, $ff + ld [wTimerEventStartDay], a + ret + +.asm_115b43 + ld a, [wDecoCarpet] + add a + cpl + ld c, a + ld b, $ff + inc bc + add hl, bc + ld b, h + ld c, l + ld hl, $dc02 + ld a, [$dc00] + ld [hli], a + ld [hl], e + inc hl + ld [hl], d + ld hl, wPartyMon5Defense + ld de, $dc24 + call Function115c49 + ld hl, $dc24 + ld c, [hl] + inc hl + ld b, [hl] + inc hl + push hl + ld a, [wCurMapCallbackCount] + ld l, a + ld a, [wCurMapCallbacksPointer] + ld h, a + cp b + jr c, .asm_115b36 + jr nz, .asm_115b7b + ld a, l + cp c + jr c, .asm_115b36 + +.asm_115b7b + push bc + ld a, b + cpl + ld b, a + ld a, c + cpl + ld c, a + inc bc + add hl, bc + ld a, l + ld [wCurMapCallbackCount], a + ld a, h + ld [wCurMapCallbacksPointer], a + pop bc + pop hl + ld hl, wCurMapSceneScriptCount + ld a, [hli] + ld [wCurMapBGEventCount], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld e, [hl] + inc hl + ld d, [hl] + ld hl, $dc26 + call Function115d6a + ld hl, wCurMapSceneScriptCount + ld a, [wCurMapBGEventCount] + ld [hli], a + ld a, e + ld [hli], a + ld [hl], d + ld a, [wTimerEventStartDay] + cp $3 + jr z, .asm_115bc1 + cp $4 + jr z, .asm_115bba + jr .asm_115b3b + +.asm_115bba + ld a, $5 + ld [wTimerEventStartDay], a + jr .asm_115bc6 + +.asm_115bc1 + ld a, $2 + ld [wTimerEventStartDay], a + +.asm_115bc6 + xor a + ret + +Function115bc8: + xor a + ld [wDecoCarpet], a +.asm_115bcc + ld a, [de] + ld [hli], a + inc e + call z, .Function115c3d + dec bc + ld a, b + or c + jr z, .asm_115c46 + ld a, [de] + ld [hli], a + inc e + call z, .Function115c3d + dec bc + ld a, b + or c + jr z, .asm_115c1b + ld a, [de] + ld [hli], a + inc e + call z, .Function115c3d + dec bc + ld a, b + or c + jr z, .asm_115c46 + ld a, [de] + ld [hli], a + inc e + call z, .Function115c3d + dec bc + ld a, b + or c + jr z, .asm_115c3a + ld a, [de] + cp $d + jr nz, .asm_115bcc + inc e + call z, .Function115c3d + ld a, [de] + cp $a + jr nz, .asm_115c46 + inc e + call z, .Function115c3d + dec bc + ld a, b + or c + jr z, .asm_115c46 + ld a, [wDecoCarpet] + inc a + ld [wDecoCarpet], a + dec bc + ld a, b + or c + jr nz, .asm_115bcc + +.asm_115c1b + ld a, [wTimerEventStartDay] + cp $4 + jr z, .asm_115c33 + ld a, [de] + ld [hli], a + inc e + call z, .Function115c3d + ld a, [de] + ld [hli], a + inc e + call z, .Function115c3d + xor a + ld [hl], a + ld a, $1 + ret + +.asm_115c33 + dec hl + dec hl + xor a + ld [hl], a + ld a, $1 + ret + +.asm_115c3a + xor a + ld [hl], a + ret + +.Function115c3d: + push bc + ld bc, $dc00 + call Function115d80 + pop bc + ret + +.asm_115c46 + ld a, $2 + ret + +Function115c49: + ld a, e + ld [wDailyFlags2], a + ld a, d + ld [wSwarmFlags], a + xor a + ld [de], a + inc de + ld [de], a + inc de + + ld a, c + ld [$dc19], a + ld a, b + ld [$dc1a], a + ld c, e + ld b, d + ld e, l + ld d, h + ld l, c + ld h, b + +.asm_115c64 + ld a, [$dc1a] + or a + jr nz, .asm_115c71 + ld a, [$dc19] + cp $4 + jr c, .asm_115c99 + +.asm_115c71 + ld b, $4 + push hl + ld hl, $dc1b +.asm_115c77 + ld a, [de] + inc de + call .decodeBase64Character + ld [hli], a + dec b + jr nz, .asm_115c77 + ld a, [$dc19] + ld c, a + ld a, [$dc1a] + ld b, a +rept 4 + dec bc +endr +.asm_115c8c + ld a, [de] + cp $d + jr z, .asm_115c95 + cp $a + jr nz, .asm_115c9f + +.asm_115c95 + inc de + dec bc + jr .asm_115c8c + +.asm_115c99 + ld a, $ff + ld [wTimerEventStartDay], a + ret + +.asm_115c9f + ld a, c + ld [$dc19], a + ld a, b + ld [$dc1a], a + push de + push hl + ld hl, wDailyFlags2 + ld a, [hli] + ld h, [hl] + ld l, a + ld e, [hl] + inc hl + ld d, [hl] + inc de + inc de + inc de + ld [hl], d + dec hl + ld [hl], e + pop hl + dec hl + ld d, [hl] + dec hl + ld c, [hl] + dec hl + ld b, [hl] + dec hl + ld a, [hl] + sla b + sla b + sla b + rla + sla b + rla + ld [hli], a + ld [hl], b + inc hl + rrc c + rrc c + ld [hl], c + dec hl + ld a, $f + and c + or [hl] + ld [hli], a + ld a, [hli] + and $c0 + or [hl] + dec hl + ld [hld], a + dec hl + pop de + ld b, h + ld c, l + pop hl + ld a, [bc] + ld [hli], a + inc bc + ld a, [bc] + ld [hli], a + inc bc + ld a, [bc] + ld [hli], a + ld a, [$dc19] + cp $0 + jp nz, .asm_115c64 + ld a, [$dc1a] + cp $0 + jp nz, .asm_115c64 + ret + +.decodeBase64Character + cp "+" + jr c, .asm_115d27 + jr z, .asm_115d2f + cp "/" + jr c, .asm_115d27 + jr z, .asm_115d32 + cp "0" + jr c, .asm_115d27 + cp "9" + 1 + jr c, .asm_115d35 + cp "=" + jr c, .asm_115d27 + jr z, .asm_115d38 + cp "A" + jr c, .asm_115d27 + cp "Z" + 1 + jr c, .asm_115d4d + cp "a" + jr c, .asm_115d27 + cp "z" + 1 + jr c, .asm_115d50 + +.asm_115d27 + pop hl + pop hl + ld a, $ff + ld [wTimerEventStartDay], a + ret + +.asm_115d2f + ld a, $3e + ret + +.asm_115d32 + ld a, $3f + ret + +.asm_115d35 + add $4 + ret + +.asm_115d38 + push de + push hl + ld a, [wDailyFlags2] + ld l, a + ld a, [wSwarmFlags] + ld h, a + ld e, [hl] + inc hl + ld d, [hl] + dec de + ld [hl], d + dec hl + ld [hl], e + pop hl + pop de + xor a + ret + +.asm_115d4d + sub $41 + ret + +.asm_115d50 + sub $47 + ret + +Function115d53: +.asm_115d53 + ld a, [de] + ld [hli], a + inc e + call z, Function115d61 + dec bc + ld a, b + or c + jr nz, .asm_115d53 + xor a + ld [hl], a + ret + +Function115d61: + push bc + ld bc, $dc00 + call Function115d80 + pop bc + ret + +Function115d6a: +.asm_115d6a + ld a, [hli] + ld [de], a + inc e + call z, Function115d77 + dec bc + ld a, b + or c + jr nz, .asm_115d6a + xor a + ret + +Function115d77: + push bc + ld bc, wCurMapBGEventCount + call Function115d80 + pop bc + ret + +Function115d80: + ld e, a + ld a, d + cp $bf + jr z, .asm_115d8b + inc d + ld a, e + ld e, $0 + ret + +.asm_115d8b + ld a, [bc] + inc a + ld [bc], a + ldh [hSRAMBank], a + ld [MBC3SRamBank], a + ld a, e + ld d, $a0 + ld e, $0 + ret diff --git a/lib/mobile/main.asm b/lib/mobile/main.asm new file mode 100644 index 0000000..1a86018 --- /dev/null +++ b/lib/mobile/main.asm @@ -0,0 +1,9546 @@ +; A library included as part of the Mobile Adapter GB SDK. + +setcharmap ascii + +; Mobile Adapter protocol commands +DEF MOBILE_COMMAND_BEGIN_SESSION EQU $10 +DEF MOBILE_COMMAND_END_SESSION EQU $11 +DEF MOBILE_COMMAND_DIAL_TELEPHONE EQU $12 +DEF MOBILE_COMMAND_HANG_UP_TELEPHONE EQU $13 +DEF MOBILE_COMMAND_WAIT_FOR_TELEPHONE_CALL EQU $14 +DEF MOBILE_COMMAND_TRANSFER_DATA EQU $15 +DEF MOBILE_COMMAND_TELEPHONE_STATUS EQU $17 +DEF MOBILE_COMMAND_READ_CONFIGURATION_DATA EQU $19 +DEF MOBILE_COMMAND_WRITE_CONFIGURATION_DATA EQU $1a +DEF MOBILE_COMMAND_TRANSFER_DATA_END EQU $1f +DEF MOBILE_COMMAND_ISP_LOGIN EQU $21 +DEF MOBILE_COMMAND_ISP_LOGOUT EQU $22 +DEF MOBILE_COMMAND_OPEN_TCP_CONNECTION EQU $23 +DEF MOBILE_COMMAND_CLOSE_TCP_CONNECTION EQU $24 +DEF MOBILE_COMMAND_DNS_QUERY EQU $28 +DEF MOBILE_COMMAND_ERROR EQU $6e + + +SECTION "Mobile Adapter SDK", ROMX + +MobileSDK_CopyBytes: +; Copy b bytes from hl to de +.loop + ld a, [hli] + ld [de], a + inc de + dec b + jr nz, .loop + ret + +MobileSDK_CopyString: +; 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 +; copied zero. +.loop + ld a, [hli] + ld [de], a + or a + ret z + inc de + inc bc + jr .loop + +MobileSDK_CopyStringLen: +; 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 +; in bc. + push bc + ld c, $0 + ld b, a + dec b +.loop + ld a, [hli] + ld [de], a + or a + jr z, .done + inc de + inc c + dec b + jr nz, .loop + xor a + ld [de], a + +.done + ld a, c + pop bc + add c + ld c, a + ld a, b + adc 0 + ld b, a + ret + +ResetReceivePacketBuffer: +; Clear two bytes at wMobileSDK_ReceivedBytes + xor a + ld hl, wMobileSDK_ReceivedBytes + ld [hli], a + ld [hl], a + ret + +_MobileAPI:: +; Use the byte at wMobileAPIIndex as a parameter +; for a dw. +; If [wMobileAPIIndex] not in {MOBILEAPI_06, MOBILEAPI_07, MOBILEAPI_08}, +; clear [wc835]. + push de + ld a, [wMobileAPIIndex] + cp MOBILEAPI_06 + jr z, .noreset + cp MOBILEAPI_07 + jr z, .noreset + cp MOBILEAPI_08 + jr z, .noreset + xor a + ld [wc835], a + ld a, [wMobileAPIIndex] +.noreset + ; Get the pointer + ld d, 0 + ld e, a + ld hl, .dw + add hl, de + ; Store the low byte in [wMobileAPIIndex] + ld a, [hli] + ld [wMobileAPIIndex], a + ld a, [hl] + ; restore de + pop de + ld hl, ReturnMobileAPI ; return here + push hl + ; If the destination function is not Function110236, + ; call Function1100b4. + ld h, a + ld a, [wMobileAPIIndex] + ld l, a + push hl + ld a, LOW(Function110236) + cp l + jr nz, .okay + ld a, HIGH(Function110236) + cp h +.okay + call nz, Function1100b4 + ld hl, wc986 + ld a, [hli] + ld h, [hl] + ld l, a + ret ; indirectly jump to the function loaded from the dw, which returns to ReturnMobileAPI. + +.dw + dw Function110115 + dw Function110236 + dw Function110291 + dw Function1103ac + dw Function110438 + dw Function1104c6 + dw Function110578 + dw Function110582 + dw Function11058c + dw Function1105dd + dw Function1106ef + dw Function110757 + dw Function1107ff + dw Function110899 + dw Function1108a3 + dw Function110905 + dw Function1109a4 + dw Function1109f9 + dw Function110a5b + dw Function110c3c + dw Function110c9e + dw Function110ddd + dw Function1111fe + dw Function1113fe + dw MobileAPI_SetTimer + dw MobileAPI_TelephoneStatus + dw Function111596 + dw Function11162d + dw Function11032c + dw Function11148c + dw Function111610 + dw Function1103ac + dw Function110235 + dw Function111540 + +Function1100b4: + push bc +.loop + di + ld a, [wc800] + ld b, a + ld a, [wc80b] + ld c, a + ld a, [wc822] + ei + or a + bit 0, a + jr z, .done + ld a, b + or a + jr nz, .loop + ld a, c + cp $4 + jr z, .loop + xor a + ld [wc80f], a + ld hl, wc821 + set 1, [hl] + scf +.done + pop bc + ret + +MobileAPI_SetTimer: + xor a + ldh [rTAC], a + ld e, c + ld b, a + ld hl, Unknown_112089 + add hl, bc + ld c, [hl] + inc hl + ldh a, [rKEY1] + bit 7, a + jr nz, .asm_1100f9 + ld a, e + sra c + ld a, e + cp $4 + jr nc, .asm_1100f9 + ld de, $000f + add hl, de + +.asm_1100f9 + ld a, c + ldh [rTMA], a + ldh [rTIMA], a + ld a, [hli] + ld [wc81f], a + ld [wc816], a + ld a, [hl] + ld [wc820], a + ld [wc815], a + ld c, LOW(rTAC) + ld a, rTAC_65536_HZ + ldh [c], a + ld a, 1 << rTAC_ON | rTAC_65536_HZ + ldh [c], a + ret + +Function110115: + ld hl, wc821 + bit 1, [hl] + jr nz, .asm_110120 + xor a + ld l, a + ld h, a + ret + +.asm_110120 + res 1, [hl] + ld a, [wc80f] + ld e, a + cp $22 + jr z, .asm_11016a + cp $23 + jr z, .asm_11016a + cp $25 + jr z, .asm_11016a + cp $26 + jr z, .asm_11018e + cp $24 + jr z, .asm_1101a4 + cp $30 + jp z, .asm_1101f8 + cp $31 + jp z, .asm_11020d + cp $32 + jr z, .asm_1101a4 + cp $33 + jr z, .asm_1101a4 + swap a + and $f + cp $1 + jr z, .asm_11016a + cp $0 + jr z, .asm_11015d +.asm_110158 + ld hl, 0 +.asm_11015b + ld a, e + ret + +.asm_11015d + ld a, e + add $15 + ld e, a + xor a + ld hl, wc810 + ld [hli], a + ld [hl], a + ld hl, wc821 + +.asm_11016a + xor a + ld [wc86d], a + ld [hl], a + ld [wc807], a + inc a + ld [wc86a], a + ld hl, wc822 + res 0, [hl] + res 5, [hl] + ld hl, wMobileSDK_PacketBuffer + xor a + ld [hli], a + inc a + ld [hl], a + call Function111686 + ld a, $15 + cp e + jr nz, .asm_110158 + jr .asm_1101d7 + +.asm_11018e + ld a, [wc821] + bit 4, a + ld a, $1 + jr z, .asm_11016a + ld a, $2 + ld [wc86a], a + ld a, [wc805] + ld [wc807], a + jr .asm_110158 + +.asm_1101a4 + res 0, [hl] + ld hl, wc822 + res 5, [hl] + ld hl, wc821 + res 7, [hl] + res 6, [hl] + set 5, [hl] + xor a + ld [wc86d], a + ld [wc9af], a + ld a, $2 + ld [wc86a], a + ld a, $4 + ld [wc807], a + ld a, e + cp $32 + jr z, .asm_1101d7 + cp $33 + jr z, .asm_1101d7 + cp $30 + jr z, .asm_1101d7 + cp $31 + jp nz, .asm_110158 + +.asm_1101d7 + ld hl, wc810 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, $32 + cp e + jp nz, .asm_11015b + ld a, $3 + cp h + jp nz, .asm_11015b + dec a + cp l + jr z, .asm_1101f2 + dec a + cp l + jp nz, .asm_11015b + +.asm_1101f2 + ld bc, wc880 + jp .asm_11015b + +.asm_1101f8 + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $a4 + jr z, .asm_1101a4 + ld a, $3 + ld [wc86a], a + ld hl, wc810 + ld a, [hli] + ld h, [hl] + ld l, a + jp .asm_11015b + +.asm_11020d + ld a, [wc810] + cp $2 + jr z, .asm_1101a4 + cp $3 + jr z, .asm_1101a4 + ld a, $4 + ld [wc86a], a + ld hl, wc810 + ld a, [hli] + ld h, [hl] + ld l, a + jp .asm_11015b + +Function110226: + ld a, $21 + +Function110228: + ld [wc80f], a + ld hl, wc821 + set 1, [hl] + ret + +Function110231: + ld a, $20 + jr Function110228 + +Function110235: + nop + +Function110236: + ld a, [wMobileAPIIndex] + push af + push bc + push hl + xor a + ldh [rTAC], a + ldh a, [rIF] + and $1b + ldh [rIF], a + call ResetReceivePacketBuffer + ld bc, $0452 + ld hl, wc800 +.asm_11024e + xor a + ld [hli], a + dec bc + ld a, c + or b + jr nz, .asm_11024e + ld a, [wc822] + set 6, a + ld [wc822], a + pop hl + ld a, l + ld [wc981], a + ld a, h + ld [wc982], a + pop bc + ld hl, wc983 + ld a, c + ld [hli], a + ld a, b + ld [hl], a + ld hl, wc86e + ld a, e + ld [hli], a + ld [hl], d + xor a + ld [wc819], a + ld c, $c + call MobileAPI_SetTimer + call Function1104b0 + pop af + cp $35 + jr nz, .asm_110289 + ld a, $2b + jr .asm_11028b + +.asm_110289 + ld a, $a + +.asm_11028b + ld [wc86a], a + jp Function110432 + +Function110291: + ld a, [wc821] + bit 1, a + jr z, .asm_1102a6 + ld a, [wc80f] + cp $14 + jr z, .asm_1102b3 + cp $25 + jr z, .asm_1102b3 + ld a, [wc821] + +.asm_1102a6 + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $1 + jp nz, Function110226 + +.asm_1102b3 + xor a + ldh [rTAC], a + xor a + ld [wc819], a + ld a, l + ld b, h + ld hl, wc880 + ld [hli], a + ld a, b + ld [hli], a + ld a, c + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ld a, [wc870] + ld c, a + call MobileAPI_SetTimer + ld hl, wc829 + ld a, LOW(wc872) + ld [hli], a + ld a, HIGH(wc872) + ld [hl], a + ld de, wMobileSDK_PacketBuffer + ld b, MobilePacket_WriteConfigurationData.End - MobilePacket_WriteConfigurationData + ld hl, MobilePacket_WriteConfigurationData + call MobileSDK_CopyBytes + ld a, [wc882] + ld c, a + or a + jr z, .asm_1102f2 + cp $80 + jr nc, .asm_1102f2 + ld c, $80 + jr .asm_1102f4 + +.asm_1102f2 + ld a, $80 + +.asm_1102f4 + ld b, a + inc a + ld [de], a + inc de + ld a, $80 + add c + ld hl, wc882 + ld [hli], a + ld a, [hl] + ld [de], a + inc de + add $80 + ld [hl], a + ld hl, wc880 + ld a, [hli] + ld h, [hl] + ld l, a + ld c, b + call MobileSDK_CopyBytes + ld a, l + ld [wc880], a + ld a, h + ld [wc880 + 1], a + ld b, c + inc b + call Function111f63 + call Function1104b0 + ld a, $2e + ld [wc86a], a + ld hl, wc821 + res 1, [hl] + set 0, [hl] + ret + +Function11032c: + ld a, [wc821] + bit 1, a + jp nz, Function110226 + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $1 + jp nz, Function110226 + xor a + ldh [rTAC], a + ld [wc819], a + ld hl, wc880 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld a, b + ld [hli], a + ld hl, wc829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ld a, [wc870] + ld c, a + call MobileAPI_SetTimer + ld de, wMobileSDK_PacketBuffer + ld b, 6 ; header size + ld hl, MobilePacket_ReadConfigurationDataPart1 + call MobileSDK_CopyBytes + ld a, [wc883] + ld [de], a + inc de + ld a, [wc882] + ld c, a + or a + jr z, .asm_11037f + cp $80 + jr nc, .asm_11037f + ld c, $80 + jr .asm_110381 + +.asm_11037f + ld a, $80 + +.asm_110381 + ld [de], a + inc de + ld b, $2 + call Function111f63 + call Function1104b0 + ld a, $2d + ld [wc86a], a + jp Function110432 + +Function110393: + ld c, LOW(rIE) + ldh a, [c] + or (1 << SERIAL) | (1 << TIMER) + ldh [c], a + ret + +Function11039a: + ld b, $0 +.asm_11039c + inc b + jr z, .asm_1103a3 + ld a, [hli] + or a + jr nz, .asm_11039c + +.asm_1103a3 + ld a, b + cp c + jr nc, .asm_1103aa + cp $2 + ret + +.asm_1103aa + scf + ret + +Function1103ac: + ld a, [wc821] + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $1 + jp nz, Function110226 + push hl + ld c, $15 + call Function11039a + jr c, .asm_1103d2 + ld c, $22 + call Function11039a + jr c, .asm_1103d2 + ld c, $12 + call Function11039a + jr nc, .isp_login + +.asm_1103d2 + pop hl + jp Function110231 + +.isp_login + xor a + ldh [rTAC], a + ld [wc86d], a + ld [wc97a], a + ld a, [wc870] + ld c, a + call MobileAPI_SetTimer + ld hl, wc829 + ld a, LOW(wc880) + ld [hli], a + ld a, HIGH(wc880) + ld [hl], a + call Mobile_DialTelephone + push hl + ld b, a + call Function111f63 + ld b, MobilePacket_ISPLogin.End - MobilePacket_ISPLogin + ld hl, MobilePacket_ISPLogin + ld de, wMobileSDK_PacketBuffer + 45 + call MobileSDK_CopyBytes + inc de + inc de + pop hl + ld bc, 0 + call MobileSDK_CopyString + ld a, c + ld [wMobileSDK_PacketBuffer + 51], a + ld [wc86b], a + push de + inc de + ld bc, 0 + ld a, $20 + call MobileSDK_CopyStringLen + ld l, e + ld h, d + pop de + ld a, c + ld [de], a + ld a, [wc86b] + add c + add $a + ld [wMobileSDK_PacketBuffer + 50], a + call Function1104b0 + ld a, $b + ld [wc86a], a + +Function110432: + ld hl, wc821 + set 0, [hl] + ret + +Function110438: + ld a, [wc821] + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $1 + jp nz, Function110226 + push hl + ld c, $15 + call Function11039a + jr nc, .asm_110454 + pop hl + jp Function110231 + +.asm_110454 + xor a + ldh [rTAC], a + ld [wc97a], a + ld a, [wc870] + ld c, a + call MobileAPI_SetTimer + ld hl, wc98f + ld a, LOW(wc880 + 1) + ld [hli], a + ld a, HIGH(wc880 + 1) + ld [hli], a + xor a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld a, $ff + ld [wc86e], a + call Mobile_DialTelephone + ld b, a + call Function111f63 + call Function1104b0 + ld a, $c + ld [wc86a], a + jr Function110432 + +Mobile_DialTelephone: + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_DialTelephone + ld b, MobilePacket_DialTelephone.End - MobilePacket_DialTelephone + call MobileSDK_CopyBytes + pop bc + pop hl + push bc + ld a, [wMobileSDK_AdapterType] + cp $8c + jr c, .asm_11049e + ld a, $3 + jr .asm_1104a1 + +.asm_11049e + ld a, [wc871] + +.asm_1104a1 + ld [de], a + inc de + ld bc, $0001 + ld a, MOBILE_PHONE_NUMBER_LENGTH + call MobileSDK_CopyStringLen + ld a, c + ld [wMobileSDK_PacketBuffer + 5], a + ret + +Function1104b0: + xor a + ld [wMobileSDK_SendCommandID], a + call Function110393 + xor a + ld [wc86b], a + ld de, MobilePacket_Idle.End - MobilePacket_Idle + ld hl, MobilePacket_Idle + ld b, 1 + jp PacketSendBytes + +Function1104c6: + ld a, [wc821] + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $4 + jr z, .asm_110526 + cp $3 + jr z, .asm_110526 + cp $2 + jp nz, Function110226 + ld hl, wc822 + bit 4, [hl] + jr nz, .asm_110507 + ld a, $2 + ld [wc86b], a + ld a, MOBILE_COMMAND_ISP_LOGOUT | $80 + ld [wMobileSDK_SendCommandID], a + ld de, MobilePacket_ISPLogout.End - MobilePacket_ISPLogout + ld hl, MobilePacket_ISPLogout + ld b, $5 + call PacketSendBytes +.asm_1104fa + ld a, $e + ld [wc86a], a + ld hl, wc821 + set 0, [hl] + res 3, [hl] + ret + +.asm_110507 + ld a, [wc807] + or a + jr nz, .asm_11051f + ld a, $1 + ld [wc86a], a + ld hl, wc822 + res 4, [hl] + ld hl, wc821 + ld a, [hl] + and $17 + ld [hl], a + ret + +.asm_11051f + ld a, $2 + ld [wc86b], a + jr .asm_1104fa + +.asm_110526 + call Function112724 + xor a + ld [wc86b], a + ld de, wMobileSDK_PacketBuffer + 32 + ld hl, MobilePacket_TransferData + ld b, $6 + call MobileSDK_CopyBytes + ld a, [wc86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + ld a, $7 + ld [de], a + inc de + ld a, [wc86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_1120c1 + call MobileSDK_CopyString + ld b, c + call Function111f63 + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 + ld [wMobileSDK_SendCommandID], a + ld hl, wMobileSDK_PacketBuffer + ld b, $5 + call PacketSendBytes + ld a, $e + ld [wc86a], a + jp Function110432 + +Function110578: + ld b, $25 + call Function110596 + or a + jp nz, Function1135ba + ret + +Function110582: + ld b, $26 + call Function110596 + or a + jp nz, Function11359d + ret + +Function11058c: + ld b, $27 + call Function110596 + or a + jp nz, Function1135ad + ret + +Function110596: + ld a, [wc821] + bit 0, a + jr nz, .asm_1105d9 + ld a, [wc86a] + cp $1 + jr nz, .asm_1105d9 + ld a, [wc835] + or a + ret nz + ld a, b + ld [wcb36], a + xor a + ldh [rTAC], a + ld a, e + ld [wc86e], a + ld a, d + ld [wc86e + 1], a + xor a + ld [wc819], a + ld a, [wc870] + ld c, a + call MobileAPI_SetTimer + ld hl, wc829 + ld a, LOW(wc880) + ld [hli], a + ld a, HIGH(wc880) + ld [hl], a + call Function1104b0 + ld a, [wcb36] + ld [wc86a], a + xor a + jp Function110432 + +.asm_1105d9 + pop hl + jp Function110226 + +Function1105dd: + ld a, [wc821] + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $1 + jp nz, Function110226 + xor a + ldh [rTAC], a + ld a, [wc870] + ld c, a + call MobileAPI_SetTimer + ld hl, wc98f + ld a, LOW(wc880 + 1) + ld [hli], a + ld a, HIGH(wc880 + 1) + ld [hli], a + xor a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld a, $ff + ld [wc86e], a + call Function1104b0 + ld a, $d + ld [wc86a], a + jp Function110432 + +Function110615: + ld b, $15 + ld [wc86e], a + or a + jr z, .asm_110625 + dec a + jr z, .asm_11062c + dec a + jp z, .asm_1106c1 + ret + +.asm_110625 + ld a, $19 + ld hl, wc83e + jr .asm_110631 + +.asm_11062c + ld a, $6e + ld hl, wc852 + +.asm_110631 + push hl + push bc + ld [wMobileSDK_PacketBuffer + 91], a + ld hl, wc829 + ld a, LOW(wMobileSDK_PacketBuffer + 86) + ld [hli], a + ld a, HIGH(wMobileSDK_PacketBuffer + 86) + ld [hl], a + xor a + ld [wMobileSDK_PacketBuffer + 90], a + ld [wc86b], a + ld [wc9af], a + ld de, wMobileSDK_PacketBuffer + 80 + ld hl, MobilePacket_OpenTCPConnection + ld b, MobilePacket_OpenTCPConnection.End - MobilePacket_OpenTCPConnection + call MobileSDK_CopyBytes + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_DNSQuery + ld b, MobilePacket_DNSQuery.End - MobilePacket_DNSQuery + call MobileSDK_CopyBytes + pop bc + pop hl + push de + inc de + ld a, b + ld bc, 0 + call MobileSDK_CopyStringLen + ld a, c + pop hl + ld [hl], a + ld b, c + call Function111f63 + ld a, [wc86e] + cp $2 + jr nz, .asm_1106ac + ld a, [wMobileSDK_ReceivePacketBuffer + 128] + or a + jr z, .asm_1106ac + ld hl, wc995 + ld a, [hli] + cp $99 + jr nz, .asm_1106ac + ld a, [hli] + cp $66 + jr nz, .asm_1106ac + ld a, [hli] + cp $23 + jr nz, .asm_1106ac + ld a, $2 + ld [wc86e], a + dec a + ld [wc86b], a + ld a, $a3 + ld de, $0010 + ld hl, wc995 + call Function111f02 + ld a, $f + ld [wc86a], a + jp Function110432 + +.asm_1106ac + ld hl, wMobileSDK_PacketBuffer + ld a, MOBILE_COMMAND_DNS_QUERY | $80 + ld [wMobileSDK_SendCommandID], a + ld b, $5 + call PacketSendBytes + ld a, $f + ld [wc86a], a + jp Function110432 + +.asm_1106c1 + ld b, $50 + ld hl, wc876 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, $0007 + add hl, de + ld de, wc8ff +.asm_1106d0 + ld a, [hli] + ld [de], a + cp $2f + jr z, .asm_1106da + inc de + dec b + jr nz, .asm_1106d0 + +.asm_1106da + xor a + ld [de], a + dec hl + ld a, l + ld [wc876], a + ld a, h + ld [wc877], a + ld hl, wc8ff + ld a, $50 + ld b, $40 + jp .asm_110631 + +Function1106ef: + ld a, [wc821] + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $2 + jp nz, Function110226 + ld a, [wc86d] + or a + jp nz, Function110226 + push hl + ld c, $20 + call Function11039a + jr nc, .asm_110712 + pop hl + jp Function110231 + +.asm_110712 + xor a + ld [wc86b], a + ld de, wMobileSDK_PacketBuffer + 96 + ld hl, MobilePacket_TransferData + ld b, $6 + call MobileSDK_CopyBytes + ld de, wMobileSDK_PacketBuffer + 112 + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + inc de + inc de + ld bc, $0001 + ld hl, Unknown_11209e + call MobileSDK_CopyString + pop hl + push hl + ld b, $ff +.asm_11073b + inc b + ld a, [hli] + or a + jr z, .asm_110744 + cp $40 + jr nz, .asm_11073b + +.asm_110744 + ld a, c + add b + add $2 + ld [wMobileSDK_PacketBuffer + 117], a + pop hl + call MobileSDK_CopyBytes + call Function11295e + ld a, $0 + jp Function110615 + +Function110757: + ld a, [wc821] + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $3 + jp nz, Function110226 + ld a, [wc98a] + or a + jp nz, Function110226 + push hl +.asm_11076f + ld a, [hli] + or a + jr nz, .asm_11076f + ld a, [hl] + or a + jp z, .asm_1107fb + pop hl + push hl + ld c, $20 + call Function11039a + jr c, .asm_1107fb +.asm_110781 + ld c, $81 + call Function11039a + jr c, .asm_1107fb + xor a + cp [hl] + jr nz, .asm_110781 + call Function112724 + xor a + ld [wc86b], a + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $6 + call MobileSDK_CopyBytes + ld a, [wc86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + ld de, wMobileSDK_PacketBuffer + 12 + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + ld de, wMobileSDK_PacketBuffer + 18 + ld a, [wc86c] + ld [de], a + inc de + ld bc, $0001 + ld de, wMobileSDK_PacketBuffer + 19 + ld hl, Unknown_1120a4 + call MobileSDK_CopyString + pop hl + call MobileSDK_CopyString + ld a, $3e + ld [de], a + inc de + inc c + ld a, l + ld [wc87c], a + ld a, h + ld [wc87d], a + call Function11295e + ld a, c + ld [wMobileSDK_PacketBuffer + 17], a + ld b, c + call Function111f63 + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 + ld [wMobileSDK_SendCommandID], a + ld hl, wMobileSDK_PacketBuffer + 12 + ld d, $0 + ld e, c + ld b, $5 + call PacketSendBytes + ld a, $15 + ld [wc86a], a + jp Function110432 + +.asm_1107fb + pop hl + jp Function110231 + +Function1107ff: + ld a, [wc821] + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $3 + jp nz, Function110226 + ld a, [wc98a] + or a + jp z, Function110226 + ld a, c + or b + jp z, Function110231 + ld a, l + ld [wc87c], a + ld a, h + ld [wc87d], a + ld hl, wc87e + ld a, c + ld [hli], a + ld a, b + ld [hli], a + ld a, d + ld [wc86e + 1], a + call Function112724 + ld hl, wc98a + ld a, [hl] + and $1 + xor $1 + ld [wc86b], a + inc [hl] + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $6 + call MobileSDK_CopyBytes + ld de, wMobileSDK_PacketBuffer + 6 + ld a, [wc86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + ld de, wMobileSDK_PacketBuffer + 150 + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + ld de, wMobileSDK_PacketBuffer + 156 + ld a, [wc86c] + ld [de], a + ld a, [wc86b] + or a + jr nz, .asm_110891 + ld bc, $0001 + ld de, wMobileSDK_PacketBuffer + 157 + ld hl, Unknown_1120ba + call MobileSDK_CopyString + ld a, c + ld [wMobileSDK_PacketBuffer + 155], a + ld b, c + call Function111f63 + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 + ld [wMobileSDK_SendCommandID], a + ld de, $0011 + ld hl, wMobileSDK_PacketBuffer + 150 + ld b, $5 + call PacketSendBytes + +.asm_110891 + ld a, $16 + ld [wc86a], a + jp Function110432 + +Function110899: + ld a, [wc86a] + cp $3 + jp nz, Function110226 + jr Function1108ab + +Function1108a3: + ld a, [wc86a] + cp $4 + jp nz, Function110226 + +Function1108ab: + ld hl, wc821 + bit 0, [hl] + jp nz, Function110226 + call Function112724 + xor a + ld [wc86b], a + ld de, wMobileSDK_PacketBuffer + 32 + ld hl, MobilePacket_TransferData + ld b, $6 + call MobileSDK_CopyBytes + ld a, [wc86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + ld a, $7 + ld [de], a + inc de + ld a, [wc86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_1120c1 + call MobileSDK_CopyString + ld b, c + call Function111f63 + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 + ld [wMobileSDK_SendCommandID], a + ld hl, wMobileSDK_PacketBuffer + ld b, $5 + call PacketSendBytes + ld a, $17 + ld [wc86a], a + jp Function110432 + +Function110905: + ld a, [wc821] + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $2 + jp nz, Function110226 + ld a, [wc86d] + or a + jp nz, Function110226 + xor a + ld [wc86b], a + push hl + ld c, $20 + call Function11039a + jr c, .asm_11092f + ld c, $22 + call Function11039a + jr nc, .asm_110933 + +.asm_11092f + pop hl + jp Function110231 + +.asm_110933 + ld de, wMobileSDK_PacketBuffer + 96 + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + inc de + inc de + ld hl, Unknown_1120c8 + call MobileSDK_CopyString + pop hl + push hl + ld b, $ff +.asm_11094a + inc b + ld a, [hli] + or a + jr z, .asm_110953 + cp $40 + jr nz, .asm_11094a + +.asm_110953 + ld a, b + add $6 + ld c, a + ld [wMobileSDK_PacketBuffer + 101], a + pop hl + ld de, wMobileSDK_PacketBuffer + 108 + call MobileSDK_CopyBytes +.asm_110961 + ld a, [hli] + or a + jr nz, .asm_110961 + call Function11295e + ld a, c + ld [wMobileSDK_PacketBuffer + 101], a + ld bc, $0006 + ld de, wMobileSDK_PacketBuffer + 172 + ld a, $20 + call MobileSDK_CopyStringLen + call Function11295e + ld a, c + ld [wMobileSDK_PacketBuffer + 165], a + ld de, wMobileSDK_PacketBuffer + 160 + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + ld de, wMobileSDK_PacketBuffer + 167 + ld hl, Unknown_1120ce + ld b, $5 + call MobileSDK_CopyBytes + ld de, wMobileSDK_PacketBuffer + 128 + ld hl, MobilePacket_TransferData + ld b, $6 + call MobileSDK_CopyBytes + ld a, $1 + jp Function110615 + +Function1109a4: + ld hl, wc821 + bit 0, [hl] + jp nz, Function110226 + ld a, [wc86a] + cp $4 + jp nz, Function110226 + ld a, e + ld [wc86e], a + ld a, d + ld [wc86e + 1], a + xor a + ld [wc86b], a + call Function112729 + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + ld a, $7 + ld [de], a + inc de + ld a, [wc86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_1120d4 + call MobileSDK_CopyString + ld b, c + call Function111f63 + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 + ld [wMobileSDK_SendCommandID], a + ld hl, wMobileSDK_PacketBuffer + ld b, $5 + call PacketSendBytes + ld a, $18 + ld [wc86a], a + jp Function110432 + +Function1109f9: + ld a, [wc821] + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $4 + jp nz, Function110226 + xor a + ld [wc86b], a + ld a, e + ld [wc86e], a + ld a, d + ld [wc86e + 1], a + ld a, l + or h + jp z, Function110231 + push hl + call Function112729 + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + ld a, $d + ld [de], a + inc de + ld a, [wc86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_1120db + call MobileSDK_CopyString + ld de, wMobileSDK_PacketBuffer + 12 + pop hl + call Function110d37 + ld b, c + call Function111f63 + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 + ld [wMobileSDK_SendCommandID], a + ld hl, wMobileSDK_PacketBuffer + ld b, $5 + call PacketSendBytes + ld a, $1d + ld [wc86a], a + jp Function110432 + +Function110a5b: + ld a, [wc821] + bit 2, a + jr z, .asm_110a6d + ld a, [wc86a] + cp $1a + jp nz, Function110226 + jp Function110af4 + +.asm_110a6d + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $4 + jp nz, Function110226 + ld a, l + or h + jp z, Function110231 + ld a, l + ld [wc86e], a + ld a, h + ld [wc86e + 1], a + ld hl, wc827 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc de + inc de + dec bc + dec bc + ld hl, wc98f + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld a, b + ld [hl], a + ld hl, wc829 + ld a, LOW(wc880) + ld [hli], a + ld a, HIGH(wc880) + ld [hli], a + ld a, $80 + ld [hli], a + xor a + ld [hli], a + xor a + ld [hli], a + ld [hli], a + xor a + ld [wc86b], a + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + ld a, $d + ld [de], a + inc de + ld a, [wc86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_1120e8 + call MobileSDK_CopyString + ld de, wMobileSDK_PacketBuffer + 12 + ld hl, wc86e + ld a, [hli] + ld h, [hl] + ld l, a + call Function110d37 + ld b, c + call Function111f63 + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 + ld [wMobileSDK_SendCommandID], a + ld hl, wMobileSDK_PacketBuffer + ld b, $5 + call PacketSendBytes + ld a, $1a + ld [wc86a], a + jp Function110432 + +Function110af4: + ld hl, wc827 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc de + inc de + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld e, [hl] + ld a, b + or c + ld [wc86e], a + ld [wc86e + 1], a + jr z, .asm_110b5c + dec bc + dec bc + ld a, [wc993] + or a + jp nz, .asm_110bd5 + ld a, [wc994] + or a + jr z, .asm_110b1c + ld e, a + +.asm_110b1c + xor a + ld [wc994], a + cp b + jr nz, .asm_110b5c + ld a, e + cp c + jr c, .asm_110b5c + push bc + sub c + ld [hl], a + ld b, c + ld hl, wc82d + ld a, [wc993] + add c + ld [hli], a + ld a, b + adc 0 + ld [hl], a + xor a + ld [wc993], a + ld hl, wMobileSDK_ReceivePacketBuffer + 3 + ld a, [hli] + inc hl + sub e + dec a + ld e, a + ld d, 0 + add hl, de + ld a, [wc829] + ld e, a + ld a, [wc829 + 1] + ld d, a + call MobileSDK_CopyBytes + pop bc + ld hl, wc827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, c + ld [hli], a + ld [hl], b + ret + +.asm_110b5c + ld a, c + sub e + ld c, a + ld a, b + sbc $0 + ld b, a + ld a, c + ld [hli], a + ld [hl], b + ld hl, wc82d + ld a, [wc993] + add e + ld [hli], a + ld a, 0 + adc 0 + ld [hl], a + xor a + ld [wc993], a + ld a, [wc86e] + or a + jr z, .asm_110b9b + ld b, e + ld hl, wMobileSDK_ReceivePacketBuffer + 3 + ld a, [hli] + inc hl + sub e + dec a + ld e, a + ld d, 0 + add hl, de + ld a, [wc829] + ld e, a + ld a, [wc829 + 1] + ld d, a + call MobileSDK_CopyBytes + ld hl, wc829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + +.asm_110b9b + call Function1127f3 + jr z, .asm_110bbb + di + ld hl, wc821 + res 2, [hl] + ld a, $1 + ld [wc86b], a + ld de, $000b + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 + ld [wMobileSDK_SendCommandID], a + ld hl, wMobileSDK_PacketBuffer + 128 + ld b, $5 + jp PacketSendBytes + +.asm_110bbb + ld a, $4 + ld [wc86a], a + ld hl, wc821 + res 0, [hl] + res 2, [hl] + ld hl, wc827 + ld a, [hli] + ld e, a + ld d, [hl] + ld hl, wc82d + ld b, $2 + jp MobileSDK_CopyBytes + +.asm_110bd5 + ld e, a + xor a + cp b + jr nz, .asm_110c05 + ld a, e + cp c + jr c, .asm_110c05 + ld b, c + ld hl, wc993 + ld a, [hl] + sub c + ld [hl], a + ld a, $80 + sub e + ld e, a + ld d, 0 + ld hl, wc880 + add hl, de + ld a, [wc829] + ld e, a + ld a, [wc829 + 1] + ld d, a + call MobileSDK_CopyBytes + ld hl, wc827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, c + ld [hli], a + xor a + ld [hl], a + ret + +.asm_110c05 + push hl + push bc + ld a, [wc993] + ld b, a + ld a, $80 + sub e + ld e, a + ld d, 0 + ld hl, wc880 + add hl, de + ld a, [wc829] + ld e, a + ld a, [wc829 + 1] + ld d, a + call MobileSDK_CopyBytes + ld a, e + ld [wc829], a + ld a, d + ld [wc829 + 1], a + pop bc + ld a, [wc993] + ld e, a + ld a, c + sub e + ld c, a + ld a, b + sbc $0 + ld b, a + ld a, [wc994] + ld e, a + pop hl + jp .asm_110b1c + +Function110c3c: + ld a, [wc821] + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $4 + jp nz, Function110226 + ld a, l + or h + jp z, Function110231 + ld a, l + ld [wc86e], a + ld a, h + ld [wc86e + 1], a + call Function112729 + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + ld a, $d + ld [de], a + inc de + ld a, [wc86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_1120f5 + call MobileSDK_CopyString + ld de, wMobileSDK_PacketBuffer + 12 + ld hl, wc86e + ld a, [hli] + ld h, [hl] + ld l, a + call Function110d37 + ld b, c + call Function111f63 + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 + ld [wMobileSDK_SendCommandID], a + ld hl, wMobileSDK_PacketBuffer + ld b, $5 + call PacketSendBytes + ld a, $1b + ld [wc86a], a + jp Function110432 + +Function110c9e: + ld a, [wc821] + bit 2, a + jr z, .asm_110cb0 + ld a, [wc86a] + cp $1c + jp nz, Function110226 + jp Function110af4 + +.asm_110cb0 + bit 0, a + jp nz, Function110226 + ld a, [wc86a] + cp $4 + jp nz, Function110226 + ld a, l + or h + jp z, Function110231 + ld a, l + ld [wc86e], a + ld a, h + ld [wc86e + 1], a + ld hl, wc827 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc de + inc de + dec bc + dec bc + ld hl, wc98f + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld a, b + ld [hl], a + ld hl, wc829 + ld a, LOW(wc880) + ld [hli], a + ld a, HIGH(wc880) + ld [hli], a + ld a, $80 + ld [hli], a + xor a + ld [hli], a + xor a + ld [hli], a + ld [hli], a + xor a + ld [wc86b], a + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + ld a, $e + ld [de], a + inc de + ld a, [wc86c] + ld [de], a + inc de + ld bc, $0001 + ld hl, Unknown_112102 + call MobileSDK_CopyString + ld de, wMobileSDK_PacketBuffer + 11 + ld hl, wc86e + ld a, [hli] + ld h, [hl] + ld l, a + call Function110d37 + ld b, c + call Function111f63 + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 + ld [wMobileSDK_SendCommandID], a + ld hl, wMobileSDK_PacketBuffer + ld b, $5 + call PacketSendBytes + ld a, $1c + ld [wc86a], a + jp Function110432 + +Function110d37: + push bc + push de + ld b, 0 +.check_under_10k + ld a, HIGH(10000) + cp h + jr c, .subtract_10k + jr nz, .done_10k + ld a, LOW(10000) + cp l + jr z, .subtract_10k + jr nc, .done_10k + +.subtract_10k + inc b + ld a, b + ld bc, -10000 + add hl, bc + ld b, a + jr .check_under_10k + +.done_10k + ld a, $30 + or b + ld [de], a + inc de + ld b, 0 +.check_under_1k + ld a, HIGH(1000) + cp h + jr c, .subtract_1k + jr nz, .done_1k + ld a, LOW(1000) + cp l + jr z, .subtract_1k + jr nc, .done_1k + +.subtract_1k + inc b + ld a, b + ld bc, -1000 + add hl, bc + ld b, a + jr .check_under_1k + +.done_1k + ld a, $30 + or b + ld [de], a + inc de + ld b, 0 +.check_under_100 + ld a, HIGH(100) + cp h + jr nz, .subtract_100 + ld a, LOW(100) + cp l + jr z, .subtract_100 + jr nc, .check_under_10 + +.subtract_100 + inc b + ld a, b + ld bc, -100 + add hl, bc + ld b, a + jr .check_under_100 + +.check_under_10 + ld a, $30 + or b + ld [de], a + inc de + ld b, $0 + ld a, l +.subtract_10 + cp 10 + jr c, .done_10 + sub 10 + inc b + jr .subtract_10 + +.done_10 + ld l, a + ld a, $30 + or b + ld [de], a + inc de + ld a, $30 + or l + ld [de], a + pop de + ld l, e + ld h, d + ld b, $5 +.find_first_digit + ld a, [hl] + cp $30 + jr nz, .found_first_digit + inc hl + dec b + jr nz, .find_first_digit + jr .done + +.found_first_digit + ld a, $5 + cp b + jr z, .done + sub b + ld c, a + ld a, [wMobileSDK_PacketBuffer + 5] + sub c + ld c, a + ld [wMobileSDK_PacketBuffer + 5], a + push hl + ld b, $1 +.penultimate_loop + inc b + ld a, [hli] + cp $d + jr nz, .penultimate_loop + pop hl + call MobileSDK_CopyBytes + pop hl + ret + +.done + pop bc +.last_loop + ld a, [de] + inc de + cp $a + jr nz, .last_loop + ret + +Function110ddd: + ld a, [wc821] + bit 2, a + ld a, [wc86a] + jr z, .asm_110e00 + cp $13 + jp z, Function111044 + cp $1f + jp z, Function111044 + cp $21 + jp z, Function111044 + jp Function110226 + +.asm_110df9 + pop hl +.asm_110dfa + pop hl + pop hl + pop hl +.asm_110dfd + jp Function110231 + +.asm_110e00 + cp $2 + jp nz, Function110226 + ld a, [wc821] + bit 0, a + jp nz, Function110226 + ld a, [wc86d] + or a + jp nz, Function110226 + ld a, l + ld [wc9b5], a + ld a, h + ld [wc9b6], a + xor a + ld [wc989], a + ld [wc9a5], a + ld [wc98a], a + ld [wc993], a + ld a, [hli] + ld [wc833], a + ld a, [hli] + ld [wc834], a + inc hl + inc hl + ld a, l + ld [wc97f], a + ld a, h + ld [wc980], a + dec hl + dec hl + ld a, [hli] + ld h, [hl] + ld l, a + ld a, LOW(wc880) + cp l + jr nz, .asm_110e4a + ld a, HIGH(wc880) + cp h + jr z, .asm_110dfd + +.asm_110e4a + push hl + push de + push bc + push hl + ld b, URIPrefix.End - URIPrefix + ld de, URIPrefix +.asm_110e53 + ld a, [de] + inc de + cp [hl] + jr nz, .asm_110df9 + inc hl + dec b + jr nz, .asm_110e53 + push hl + ld b, HTTPUploadURL.End - HTTPUploadURL + ld c, $0 + ld de, HTTPUploadURL +.asm_110e64 + ld a, [de] + inc de + cp [hl] + jr nz, .asm_110e70 + inc hl + dec b + jr nz, .asm_110e64 + pop hl + jr .asm_110df9 + +.asm_110e70 + pop hl + push hl + ld b, HTTPRankingURL.End - HTTPRankingURL + ld c, $0 + ld de, HTTPRankingURL +.asm_110e79 + ld a, [de] + inc de + cp [hl] + jr nz, .asm_110e86 + inc hl + dec b + jr nz, .asm_110e79 + pop hl + jp .asm_110df9 + +.asm_110e86 + pop hl + push hl + ld b, HTTPUtilityURL.End - HTTPUtilityURL + ld c, $0 + ld de, HTTPUtilityURL +.asm_110e8f + ld a, [de] + inc de + cp [hl] + jr nz, .asm_110ea2 + inc hl + dec b + jr nz, .asm_110e8f + pop hl + ld a, $1 + ld [wc98a], a + ld c, $1 + jr .asm_110eb3 + +.asm_110ea2 + pop hl + ld b, HTTPDownloadURL.End - HTTPDownloadURL + ld c, $0 + ld de, HTTPDownloadURL +.asm_110eaa + ld a, [de] + inc de + cp [hl] + jr nz, .asm_110ecb + inc hl + dec b + jr nz, .asm_110eaa + +.asm_110eb3 + ld hl, wc97f + ld a, [hli] + ld h, [hl] + ld l, a + ld c, $12 + call Function11039a + jp c, .asm_110df9 + ld c, $12 + call Function11039a + jp c, .asm_110df9 + ld c, $1 + +.asm_110ecb + ld a, c + ld [wc98f], a + ld [wMobileSDK_ReceivePacketBuffer + 128], a + pop hl + call Function1111d7 + ld a, b + cp $4 + jr c, .asm_110ee3 + jp nz, .asm_110dfa + xor a + or c + jp nz, .asm_110dfa + +.asm_110ee3 + ld hl, wc98b + xor a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + pop bc + pop de + pop hl + ld a, l + ld [wc876], a + ld a, h + ld [wc877], a + ld hl, wc872 + ld a, c + ld [hli], a + ld a, b + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc hl + inc hl + xor a + ld [wc994], a + +Function110f07: + ld hl, wc833 + ld a, [hli] + ld h, [hl] + ld l, a + or h + jr z, .asm_110f12 + xor a + ld [hl], a + +.asm_110f12 + ld hl, wc991 + xor a + ld [hli], a + ld [hl], a + ld hl, wc866 + ld a, [hli] + or [hl] + inc hl + or [hl] + inc hl + or [hl] + jr nz, .asm_110f28 + ld a, $2 + jp Function110615 + +.asm_110f28 + ld a, $2 + ld [wc86e], a + ld a, $1f + ld [wMobileSDK_PacketBuffer + 10], a + ld a, $90 + ld [wMobileSDK_PacketBuffer + 11], a + ld a, $1 + ld [wc86b], a + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_OpenTCPConnection + ld b, $6 + call MobileSDK_CopyBytes + ld hl, wc866 + ld b, $4 + call MobileSDK_CopyBytes + inc de + inc de + ld b, $6 + call Function111f63 + ld a, [wMobileSDK_ReceivePacketBuffer + 128] + or a + jr z, .asm_110f95 + ld hl, wc995 + ld a, [hli] + cp $99 + jr nz, .asm_110f8a + ld a, [hli] + cp $66 + jr nz, .asm_110f8a + ld a, [hli] + cp $23 + jr nz, .asm_110f8a + ld a, $2 + ld [wc86e], a + dec a + ld [wc86b], a + ld a, $a3 + ld de, $0010 + ld hl, wc995 + call Function111f02 + ld a, $f + ld [wc86a], a + jp Function110432 + +.asm_110f8a + ld hl, wMobileSDK_PacketBuffer + ld de, wc995 + ld b, $10 + call MobileSDK_CopyBytes + +.asm_110f95 + ld de, $0010 + ld hl, wMobileSDK_PacketBuffer + ld a, MOBILE_COMMAND_OPEN_TCP_CONNECTION | $80 + ld [wMobileSDK_SendCommandID], a + ld b, $5 + call PacketSendBytes + ld a, $f + ld [wc86a], a + jp Function110432 + +URIPrefix: + db "http://" +.End + +HTTPDownloadURL: + db "gameboy.datacenter.ne.jp/cgb/download" +.End + +HTTPUploadURL: + db "gameboy.datacenter.ne.jp/cgb/upload" +.End + +HTTPUtilityURL: + db "gameboy.datacenter.ne.jp/cgb/utility" +.End + +HTTPRankingURL: + db "gameboy.datacenter.ne.jp/cgb/ranking" +.End + +Function111044: + ld hl, wc827 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc de + inc de + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld e, [hl] + ld a, b + or c + ld [wc86e], a + ld [wc86e + 1], a + dec bc + dec bc + jp z, Function1111ca + ld a, [wc991] + or a + call nz, Function11115f + xor a + cp e + jp z, .asm_1110eb + xor a + cp b + jr nz, .asm_1110ac + ld a, e + cp c + jr c, .asm_1110ac + push bc + sub c + ld [hl], a + ld b, c + ld hl, wc82d + ld a, c + ld [hli], a + xor a + ld [hl], a + ld hl, wMobileSDK_ReceivePacketBuffer + 3 + ld a, [hli] + inc hl + sub e + dec a + ld e, a + ld d, 0 + add hl, de + ld a, [wc829] + ld e, a + ld a, [wc829 + 1] + ld d, a + call MobileSDK_CopyBytes + pop bc + ld a, [wc991] + ld l, a + ld h, 0 + add hl, bc + ld c, l + ld b, h + xor a + ld [wc991], a + ld hl, wc827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, c + ld [hli], a + ld [hl], b + ret + +.asm_1110ac + ld a, c + sub e + ld c, a + ld a, b + sbc $0 + ld b, a + ld a, c + ld [hli], a + ld [hl], b + ld hl, wc82d + ld a, [wc991] + add e + ld [hli], a + ld a, 0 + adc 0 + ld [hl], a + xor a + ld [wc991], a + ld a, [wc86e] + or a + jr z, .asm_1110eb + ld b, e + ld hl, wMobileSDK_ReceivePacketBuffer + 3 + ld a, [hli] + inc hl + sub e + dec a + ld e, a + ld d, 0 + add hl, de + ld a, [wc829] + ld e, a + ld a, [wc829 + 1] + ld d, a + call MobileSDK_CopyBytes + ld hl, wc829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + +.asm_1110eb + di + ld a, $2 + ld [wc989], a + ld hl, wc821 + res 2, [hl] + ld a, [wMobileSDK_ReceivePacketBuffer] + cp MOBILE_COMMAND_TRANSFER_DATA_END | $80 + jr z, .asm_111144 + ld de, $000b + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 + ld [wMobileSDK_SendCommandID], a + ld hl, wMobileSDK_PacketBuffer + ld b, $5 + call PacketSendBytes + ld a, $1 + ld [wc86b], a + ret + + ld hl, wc827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wc82d] + ld [hli], a + ld a, [wc82e] + ld [hl], a + ld hl, wc98f + inc [hl] + ld a, $f + ld [wc86a], a + ld a, $1 + ld [wc86b], a + ld a, [wc86d] + ld [wc86e], a + xor a + ld [wc989], a + ld a, $a3 + ld de, $0010 + ld hl, wc995 + jp Function111f02 + +.asm_111144 + res 0, [hl] + ld hl, wc827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wc82d] + ld [hli], a + ld a, [wc82e] + ld [hl], a + ld a, $2 + ld [wc86a], a + xor a + ld [wc86d], a + ei + ret + +Function11115f: + ld e, a + xor a + cp b + jr nz, .asm_111168 + ld a, c + cp e + jr c, .asm_1111a2 + +.asm_111168 + push hl + push bc + ld b, e + ld c, e + ld a, [wc993] + sub e + ld e, a + ld d, 0 + ld hl, wc880 + add hl, de + ld a, [wc829] + ld e, a + ld a, [wc829 + 1] + ld d, a + call MobileSDK_CopyBytes + ld hl, wc829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ld e, c + ld a, c + ld hl, wc82d + ld [hli], a + xor a + ld [hl], a + pop bc + ld a, c + sub e + ld c, a + ld a, b + sbc $0 + ld b, a + ld a, [wc992] + ld [wc82b], a + ld e, a + pop hl + ret + +.asm_1111a2 + ld a, e + sub c + ld [wc991], a + ld a, [wc993] + sub e + ld e, a + ld d, 0 + ld hl, wc880 + add hl, de + ld a, [wc829] + ld e, a + ld a, [wc829 + 1] + ld d, a + ld b, c + call MobileSDK_CopyBytes + ld hl, wc827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, c + ld [hli], a + xor a + ld [hl], a + pop af + ret + +Function1111ca: + ld hl, wc821 + res 2, [hl] + ld a, $6 + ld [wc86b], a + jp Function112430 + +Function1111d7: + push hl + ld hl, wc866 + ld a, [hli] + or [hl] + inc hl + or [hl] + inc hl + or [hl] + pop hl + jr nz, .asm_1111ee + ld de, $0007 + add hl, de +.asm_1111e8 + ld a, [hli] + cp $2f + jr nz, .asm_1111e8 + dec hl + +.asm_1111ee + ld bc, -1 +.asm_1111f1 + ld a, [hli] + inc bc + or a + jr nz, .asm_1111f1 + ld hl, wc87a + ld a, c + ld [hli], a + ld a, b + ld [hl], a + ret + +Function1111fe: + ld a, [wc821] + bit 2, a + ld a, [wc86a] + jp nz, Function1113ea + cp $2 + jp nz, Function110226 + ld a, [wc821] + bit 0, a + jp nz, Function110226 + ld a, [wc86d] + or a + jp nz, Function110226 + xor a + ld [wc989], a + ld [wc98a], a + ld [wc993], a + push hl + push de + push bc + push hl +rept 4 + inc hl +endr + ld a, [hli] + ld [wc833], a + ld a, [hli] + ld [wc834], a + inc hl + inc hl + ld a, l + ld [wc97f], a + ld a, h + ld [wc980], a + dec hl + dec hl + ld a, [hli] + ld h, [hl] + ld l, a + ld a, LOW(wc880) + cp l + jr nz, .asm_111251 + ld a, HIGH(wc880) + cp h + jp z, Function1113f7 + +.asm_111251 + ld b, URIPrefix.End - URIPrefix + ld de, URIPrefix +.asm_111256 + ld a, [de] + inc de + cp [hl] + jp nz, Function1113f7 + inc hl + dec b + jr nz, .asm_111256 + push hl + ld b, HTTPDownloadURL.End - HTTPDownloadURL + ld c, $0 + ld de, HTTPDownloadURL +.asm_111268 + ld a, [de] + inc de + cp [hl] + jr nz, .asm_111275 + inc hl + dec b + jr nz, .asm_111268 + pop hl + jp Function1113f7 + +.asm_111275 + pop hl + push hl + ld b, HTTPRankingURL.End - HTTPRankingURL + ld c, $0 + ld de, HTTPRankingURL +.asm_11127e + ld a, [de] + inc de + cp [hl] + jr nz, .asm_11128f + inc hl + dec b + jr nz, .asm_11127e + ld a, $2 + ld [wc98a], a + pop hl + jr .asm_1112a0 + +.asm_11128f + pop hl + ld b, HTTPUploadURL.End - HTTPUploadURL + ld c, $0 + ld de, HTTPUploadURL +.asm_111297 + ld a, [de] + inc de + cp [hl] + jr nz, .asm_1112cc + inc hl + dec b + jr nz, .asm_111297 + +.asm_1112a0 + ld a, [hli] + or a + jr nz, .asm_1112a0 +.asm_1112a4 + ld a, [hld] + cp $2f + jr nz, .asm_1112a4 + inc hl + inc hl + ld a, [hl] + cp $30 + jr c, .asm_1112cc + cp $3a + jr nc, .asm_1112cc + ld hl, wc97f + ld a, [hli] + ld h, [hl] + ld l, a + ld c, $12 + call Function11039a + jp c, Function1113f7 + ld c, $12 + call Function11039a + jp c, Function1113f7 + ld c, $1 + +.asm_1112cc + ld a, c + ld [wc98f], a + ld [wMobileSDK_ReceivePacketBuffer + 128], a + pop hl + ld de, $0006 + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + call Function1111d7 + ld a, b + cp $4 + jr c, .asm_1112eb + jp nz, Function1113f8 + xor a + or c + jp nz, Function1113f8 + +.asm_1112eb + pop bc + pop de + pop hl + ld a, l + ld [wc876], a + ld a, h + ld [wc877], a + ld hl, wc872 + ld a, c + ld [hli], a + ld a, b + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc hl + inc hl + ld a, e + ld [hli], a + ld a, d + ld [hl], a + call Function111335 + ld hl, wc876 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hli] + ld [wc9aa], a + ld a, [hli] + ld [wc9ab], a + ld a, [hli] + ld [wc9ac], a + ld a, [hli] + ld [wc9ad], a + inc hl + inc hl + ld a, [hli] + ld [wc876], a + ld a, [hl] + ld [wc877], a + ld a, [wc98f] + xor $1 + ld [wc994], a + jp Function110f07 + +Function111335: + ld hl, wc876 + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + xor a + ld [wc8c9], a +.asm_111344 + ld de, $8ad0 + add hl, de + jr nc, .asm_11134e + add $3 + jr .asm_111344 + +.asm_11134e + ld de, $7530 + add hl, de +.asm_111352 + ld de, $d8f0 + add hl, de + jr nc, .asm_11135b + inc a + jr .asm_111352 + +.asm_11135b + ld de, $2710 + add hl, de + ld [wc8c6], a + xor a +.asm_111363 + ld de, $f448 + add hl, de + jr nc, .asm_11136d + add $30 + jr .asm_111363 + +.asm_11136d + ld de, $0bb8 + add hl, de +.asm_111371 + ld de, $fc18 + add hl, de + jr nc, .asm_11137b + add $10 + jr .asm_111371 + +.asm_11137b + ld de, $03e8 + add hl, de +.asm_11137f + ld de, $fed4 + add hl, de + jr nc, .asm_111389 + add $3 + jr .asm_11137f + +.asm_111389 + ld de, $012c + add hl, de +.asm_11138d + ld de, $ff9c + add hl, de + jr nc, .asm_111396 + inc a + jr .asm_11138d + +.asm_111396 + ld de, $0064 + add hl, de + ld [wc8c7], a + xor a +.asm_11139e + ld de, $ffe2 + add hl, de + jr nc, .asm_1113a8 + add $30 + jr .asm_11139e + +.asm_1113a8 + ld de, $001e + add hl, de +.asm_1113ac + ld de, $fff6 + add hl, de + jr nc, .asm_1113b6 + add $10 + jr .asm_1113ac + +.asm_1113b6 + ld de, $000a + add hl, de + add l + ld [wc8c8], a + ld de, wc9a5 + ld hl, wc8c6 + ld a, [hli] + or $30 + ld [de], a + inc de + ld a, [hl] + swap a + and $f + or $30 + ld [de], a + inc de + ld a, [hli] + and $f + or $30 + ld [de], a + inc de + ld a, [hl] + swap a + and $f + or $30 + ld [de], a + inc de + ld a, [hl] + and $f + or $30 + ld [de], a + inc de + ret + +Function1113ea: + cp $14 + jp z, Function111044 + cp $24 + jp z, Function111044 + jp Function110226 + +Function1113f7: + pop hl + +Function1113f8: + pop hl + pop hl + pop hl + jp Function110231 + +Function1113fe: + ld a, [wc822] + bit 4, a + jp z, .asm_11147f + bit 7, a + jp nz, .asm_11147f + ld a, [wc821] + bit 0, a + jp nz, .asm_11147f +.asm_111413 + ld a, [wc800] + or a + jr nz, .asm_111413 + di + ld a, [wc821] + bit 3, a + jp nz, .asm_11147b + ld a, [wc807] + or a + jr nz, .asm_111436 + ld hl, wc821 + set 1, [hl] + ld a, $23 + ld [wc80f], a + ld a, $ff + ei + ret + +.asm_111436 + xor a + ld [wc86b], a + push hl + ld hl, wc829 + xor a + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + pop hl + ld a, [hli] + or a + jr z, .asm_111485 + cp $81 + jr nc, .asm_111485 + ld c, a + inc a + inc a + ld [de], a + inc de + ld a, $ff + ld [de], a + inc de + ld a, c + ld [de], a + inc de + ld b, c + call MobileSDK_CopyBytes + ld b, c + inc b + inc b + call Function111f63 + ld hl, wc822 + set 7, [hl] + ld hl, wc821 + set 0, [hl] + ld a, $0 + ei + ret + +.asm_11147b + ei + ld a, $1 + ret + +.asm_11147f + call Function110226 + ld a, $ff + ret + +.asm_111485 + ei + call Function110231 + ld a, $ff + ret + +Function11148c: + ld a, [wc822] + bit 4, a + jp z, Function110226 + ld a, [wc821] + bit 0, a + jp nz, Function110226 + bit 3, a + jp z, Function110226 + ld e, l + ld d, h + ld a, [wc992] + or a + jr nz, .asm_111507 + ld a, [wc993] + ld c, a + ld b, 0 + ld hl, wMobileSDK_ReceivePacketBuffer + 4 + add hl, bc + ld a, [hli] + or a + jr z, .asm_1114bb + cp $81 + jr c, .asm_1114bd + +.asm_1114bb + ld a, $80 + +.asm_1114bd + ld b, a + inc c + add c + ld [wc993], a + ld a, [wc994] + dec a + sub b + ld c, a + ld [wc994], a + ld a, b + ld [de], a + inc de + call MobileSDK_CopyBytes +.asm_1114d2 + xor a + or c + jr nz, .asm_1114dc + ld hl, wc821 + res 3, [hl] + ret + +.asm_1114dc + ld a, [hli] + or a + jr z, .asm_1114e4 + cp $81 + jr c, .asm_1114e6 + +.asm_1114e4 + ld a, $80 + +.asm_1114e6 + cp c + ret c + ld [wc991], a + dec c + ld a, c + or a + jr z, .asm_111500 + ld [wc992], a + ld b, a + ld de, wc880 + call MobileSDK_CopyBytes +.asm_1114fa + ld hl, wc821 + res 3, [hl] + ret + +.asm_111500 + ld a, $ff + ld [wc992], a + jr .asm_1114fa + +.asm_111507 + cp $ff + jr nz, .asm_11150c + xor a + +.asm_11150c + ld b, a + ld a, [wc991] + sub b + ld c, a + ld hl, wc880 + ld a, [wc991] + ld [de], a + inc de + ld a, b + or a + jr z, .asm_111521 + call MobileSDK_CopyBytes + +.asm_111521 + ld hl, wMobileSDK_ReceivePacketBuffer + 5 + ld b, c + call MobileSDK_CopyBytes + push hl + ld a, c + inc a + ld [wc993], a + ld b, a + ld a, [wMobileSDK_ReceivePacketBuffer + 3] + sub b + ld [wc994], a + ld c, a + xor a + ld hl, wc991 + ld [hli], a + ld [hl], a + pop hl + jr .asm_1114d2 + +Function111540: + nop + +MobileAPI_TelephoneStatus: + ld hl, wc821 + bit 0, [hl] + jp nz, Function110226 + ld a, [wc86a] + cp $5 + jp nc, Function110226 + ld [wc985], a + ld a, e + ld [wc86e], a + ld a, d + ld [wc86e + 1], a + ld a, [wc807] + cp $2 + jr c, .asm_111582 + xor a + ld [wc86b], a + ld a, MOBILE_COMMAND_TELEPHONE_STATUS | $80 + ld hl, MobilePacket_TelephoneStatus + call PacketSendEmptyBody +.asm_11156f + ld a, [wMobileAPIIndex] + cp $40 + jr nz, .asm_11157a + ld a, $2c + jr .asm_11157c + +.asm_11157a + ld a, $1e + +.asm_11157c + ld [wc86a], a + jp Function110432 + +.asm_111582 + xor a + ldh [rTAC], a + ld a, [wc870] + ld c, a + call MobileAPI_SetTimer + call Function1104b0 + ld a, $1 + ld [wc86b], a + jr .asm_11156f + +Function111596: + ld hl, wc86a + ld a, [hl] + cp $1 + jp z, Function110226 + cp $2a + jp z, Function110226 + ld a, [wc800] + bit 1, a + jr nz, .asm_1115af + ld a, $2a + jr Function1115e4 + +.asm_1115af + ld a, [wMobileSDK_SendCommandID] + cp $92 + jr nz, .asm_1115dd + ld a, $2a + ld b, $0 + di + ld [hli], a + ld [hl], b + ld hl, wc822 + res 5, [hl] + res 0, [hl] + xor a + ld [wc80b], a + ld [wc800], a + ld a, $8 + ld [wc807], a + call ResetReceivePacketBuffer + call Function11164f + ld hl, wc821 + set 0, [hl] + ei + ret + +.asm_1115dd + ld a, $2a + ld [hli], a + ld a, $1 + ld [hl], a + ret + +Function1115e4: + di + push af + ld hl, wc821 + set 0, [hl] + ld a, $1 + ld [wc86b], a + ld a, [wc86d] + or a + ld a, [wMobileSDK_ReceivePacketBuffer] + jr z, .asm_111609 + cp MOBILE_COMMAND_TRANSFER_DATA_END | $80 + jr z, .asm_11160d + cp MOBILE_COMMAND_CLOSE_TCP_CONNECTION | $80 + jr z, .asm_11160d +.asm_111601 + call Function112430 +.asm_111604 + pop af + ld [wc86a], a + ret + +.asm_111609 + cp $a3 + jr z, .asm_111601 + +.asm_11160d + ei + jr .asm_111604 + +Function111610: + ld hl, wc86a + ld a, [hl] + dec a + jp z, Function110226 + dec a + jp z, Function110226 + ld a, [wc800] + or a + jr nz, .asm_111626 + ld a, $28 + jr Function1115e4 + +.asm_111626 + ld a, $28 + ld b, $2 + ld [hli], a + ld [hl], b + ret + +Function11162d: + ld a, [wc86a] + cp $1 + jp nz, Function110226 + xor a + ld hl, wMobileSDK_PacketBuffer + ld [hli], a + ld [hl], a + call Function111686 + call ResetReceivePacketBuffer + ld bc, $0452 + ld hl, wc800 +.asm_111647 + xor a + ld [hli], a + dec bc + ld a, c + or b + jr nz, .asm_111647 + ret + +Function11164f: + ld hl, wc815 + xor a + ld [hli], a + ld a, [wc81f] + ld b, a + ld a, [wMobileSDK_AdapterType] + ld a, b + srl a + srl a + add b + add b + ld [hl], a + ret + +Function111664: + ld hl, wMobileSDK_ReceivedBytes + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [wMobileSDK_SendCommandID] + cp $ff + jr z, .asm_111679 + ld a, [wc822] + bit 0, a + jr z, .asm_11167c +.asm_111679 + ld hl, wMobileSDK_ReceivePacketBufferAlt +.asm_11167c + add hl, de + ld [hl], c + inc de + ld hl, wMobileSDK_ReceivedBytes + ld a, e + ld [hli], a + ld [hl], d + ret + +Function111686: + xor a + ldh [rTAC], a + ld c, LOW(rIE) + ldh a, [c] + and ~(1 << SERIAL | 1 << TIMER) + ldh [c], a + ld a, [wMobileSDK_PacketBuffer + 1] + ld [wc86a], a + ld a, [wMobileSDK_PacketBuffer] + ld c, a + ld hl, wc821 + ld a, [hl] + or c + ld [hl], a + ret + +Function1116a0: + ld a, $1 + jr Function1116a9 + +Function1116a4: + set 1, [hl] + ld a, [wc86a] + +Function1116a9: + ld [wMobileSDK_PacketBuffer + 1], a + ld hl, wc815 + xor a + ld [hli], a + ld a, [wc81f] + rla + ld [hl], a + ld hl, wc821 + ld a, [hl] + ld b, a + and $d + ld [hl], a + ld a, $2 + and b + ld [wMobileSDK_PacketBuffer], a + ret + +_MobileReceive:: + ld a, [wc800] + rrca + jp nc, Function1118bc + rrca + jp c, Function1117e7 + ld hl, wc801 + ld a, [hli] + ld d, [hl] + ld e, a + dec de + ld a, d + ld [hld], a + ld a, e + ld [hl], a + cp $2 + jp nc, Function1118bc + ld a, d + or a + jp nz, Function1118bc + ld hl, wc808 + add hl, de + ldh a, [rSB] + ld [hl], a + ld a, $8 + cp l + jp nz, Function1118bc + ld a, [wMobileSDK_SendCommandID] + cp $ff + jr z, .asm_111716 + ld a, $f2 + cp [hl] + jp z, Function111796 + dec a + cp [hl] + jp z, Function1117a0 + dec a + cp [hl] + jp z, Function1117a0 + ld a, [wc807] + cp $1 + jr nz, .asm_111716 + ld a, [wc806] + or a + jr z, .asm_111778 +.asm_111716 + ld a, [wMobileSDK_SendCommandID] + cp -1 + jr z, .asm_111730 + cp MOBILE_COMMAND_ERROR | $80 + jr z, .asm_111727 + cp MOBILE_COMMAND_TRANSFER_DATA_END | $80 + jr nz, .asm_111727 + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 +.asm_111727 + cp [hl] + jr nz, asm_11179a + ld a, [wMobileSDK_AdapterType] + or a + jr z, .asm_111730 +.asm_111730 + xor a + ld [wc819], a + ld a, $3 + ld [wc800], a + xor a + ld hl, wc80a + ld [hli], a + ld [hli], a + ld [hli], a + ld hl, wc81f + ld a, [hli] + ld b, a + ld a, [hl] + ld hl, wc815 + ld [hli], a + ld a, b + ld [hli], a + ld a, [wc822] + bit 0, a + jr z, .asm_111757 + ld a, $b + jr .asm_111774 +.asm_111757 + ld a, [wMobileSDK_SendCommandID] + cp -1 + jr z, .asm_11176e + cp MOBILE_COMMAND_DIAL_TELEPHONE | $80 + jr z, .asm_111772 + cp MOBILE_COMMAND_OPEN_TCP_CONNECTION | $80 + jr z, .asm_111772 + cp MOBILE_COMMAND_DNS_QUERY | $80 + jr z, .asm_111772 + ld a, $20 + jr .asm_111774 +.asm_11176e + ld a, $3 + jr .asm_111774 +.asm_111772 + ld a, $60 +.asm_111774 + ld [hl], a + jp Function1118bc +.asm_111778 + xor a + ld [wc800], a +Function11177c: + ld hl, wc820 + ld a, [hld] + ld e, a + ld a, [hl] + dec a + ld b, $3 +.asm_111785 + or a + rra + rr e + dec b + jr nz, .asm_111785 + or a + inc a + ld hl, wc816 + ld [hld], a + ld [hl], e + jp Function1118bc + +Function111796: + ld b, $a + jr asm_1117a2 +asm_11179a: + xor a + ld [hli], a + ld [hl], a + jp Function1118bc + +Function1117a0: + ld b, $3 +asm_1117a2: + ld hl, wc822 + set 3, [hl] + ld hl, wc815 + ld a, [wc820] + ld [hli], a + ld a, [wc81f] + ld [hl], a + xor a + ld [wc800], a + ld hl, wc819 + inc [hl] + ld a, b + cp [hl] + jp nc, Function1118bc + xor a + ld hl, wc806 + ld [hli], a + ld [wc800], a + ld a, $6 + ld [hl], a + ld hl, wc821 + set 1, [hl] + ld a, $15 + ld [wc80f], a + ld hl, wc810 + ld a, [wc808] + and $f + cp $2 + jr nz, .asm_1117e1 + inc a +.asm_1117e1 + ld [hli], a + xor a + ld [hl], a + jp Function1118bc + +Function1117e7: + ld a, [wc80b] + or a + jr z, .asm_1117f8 + dec a + jp z, Function11186e + dec a + jp z, Function111884 + jp Function111892 +.asm_1117f8 + ld hl, wc80a + ld a, [hl] + or a + jr nz, .asm_111803 + ld b, $99 + jr .asm_111805 +.asm_111803 + ld b, $66 +.asm_111805 + ldh a, [rSB] + cp b + jr z, .asm_111840 + cp $d2 + jr nz, .asm_111817 + xor a + ld [wc9ae], a +.asm_111812 + xor a + ld [hl], a + jp Function1118bc +.asm_111817 + ld a, [wc9ae] + inc a + ld [wc9ae], a + cp $14 + jr c, .asm_111812 + ld a, $6 + ld [wc807], a + ld a, $10 + ld [wc80f], a + xor a + ld [wc800], a + ld hl, wc822 + res 0, [hl] + ld hl, wc821 + ld a, [hl] + set 1, a + and $f + ld [hl], a + jr Function1118bc +.asm_111840 + inc [hl] + ld a, $2 + cp [hl] + jr nz, Function1118bc + xor a + ld [hli], a + inc [hl] + ld hl, wMobileSDK_PacketChecksum + ld b, $3 +.asm_11184e + ld [hli], a + dec b + jr nz, .asm_11184e + ld a, [wc822] + bit 4, a + jr z, .asm_111864 + ld b, a + ld a, [wc821] + bit 3, a + jr nz, .asm_111864 + jp Function11177c +.asm_111864 + ld a, [wc820] + ld [hli], a + ld a, [wc81f] + ld [hl], a + jr Function1118bc + +Function11186e: + call Function1118c2 + ld a, $4 + cp [hl] + jr nz, Function1118bc + xor a + ld [hli], a + ldh a, [rSB] + ld [wc80c], a + inc [hl] + or a + jr nz, Function1118bc + inc [hl] + jr Function1118bc + +Function111884: + call Function1118c2 + ld a, [wc80c] + cp [hl] + jr nz, Function1118bc + xor a + ld [hli], a + inc [hl] + jr Function1118bc + +Function111892: + ldh a, [rSB] + ld c, a + call Function111664 + ld hl, wc80a + inc [hl] + ld a, $2 + cp [hl] + jr c, .asm_1118b4 + ld a, [wc80a] + add $11 + ld e, a + ld d, $c8 + ld a, [de] + cp c + jr z, Function1118bc + ld a, $1 + ld [wc814], a + jr Function1118bc +.asm_1118b4 + ld a, $4 + cp [hl] + jr nz, Function1118bc + xor a + ld [hli], a + inc [hl] +Function1118bc: + ld hl, wc822 + res 1, [hl] + ret + +Function1118c2: + ldh a, [rSB] + ld c, a + ld b, 0 + ld hl, wMobileSDK_PacketChecksum + ld a, [hli] + ld l, [hl] + ld h, a + add hl, bc + ld a, h + ld [wMobileSDK_PacketChecksum], a + ld a, l + ld [wMobileSDK_PacketChecksum + 1], a + call Function111664 + ld hl, wc80a + inc [hl] + ret + +_Timer:: + ld a, [wc80b] + cp $4 + call z, Function111b3c + call Function11214e + ld hl, wc807 + ld a, [hli] + cp $2 + jr c, .asm_111927 + ld a, [hli] + ld b, a + ld a, [hl] + ld c, a + and b + cp $ff + jr z, .asm_1118fe + ld a, c + or b + jr nz, .asm_111927 +.asm_1118fe + ld hl, wc807 + ld a, $6 + cp [hl] + jp z, Function111b3b + ld [hl], a + ld a, $10 + ld [wc80f], a + xor a + ld [wc800], a + ld hl, wc822 + res 0, [hl] + ld hl, wc821 + ld a, [hl] + and $f + or $2 + ld [hl], a + ld a, $10 + ld [wc80f], a + jp Function111b3b +.asm_111927 + ld a, [wc800] + cp $1 + jp z, Function111b21 + cp $3 + jp z, Function111a2a + ld a, [wc807] + cp $1 + jp c, Function111b3b + ld hl, wc815 + dec [hl] + jp nz, Function111b3b + inc hl + dec [hl] + jp nz, Function111b3b + ld hl, wc807 + ld a, [wc822] + bit 3, a + jp nz, Function111a0b + bit 4, a + jr nz, .asm_11199c + ld a, [hl] + cp $1 + jp z, Function1119f0_BeginSession + cp $a + jr z, .asm_111984 + cp $8 + jr z, .asm_11197d + ld a, [wc86a] + cp $2a + jr z, .asm_111991 + cp $d + jr nz, .asm_111977 + ld a, [wc86b] + cp $4 + jr nc, .asm_11199c +.asm_111977 + call Function111f97 + jp Function111b3b +.asm_11197d + ld a, [wc805] + ld [hl], a + jp Function111b3b +.asm_111984 + xor a + ld [hl], a + ld hl, wc821 + res 0, [hl] + call Function111686 + jp Function111b3b +.asm_111991 + xor a + ld [hl], a + ld [wc821], a + call Function111686 + jp Function111b3b +.asm_11199c + ld b, a + ld [hl], a + or a + jp z, Function111b3b + ld a, [wc822] + bit 7, a + jr nz, .asm_1119be +.asm_1119a9 + ld a, [wc821] + bit 3, a + jr nz, .asm_111977 + ld de, MobilePacket_TransferData.End - MobilePacket_TransferData + ld hl, MobilePacket_TransferData + ld a, $95 + call Function111f02 + jp Function111b3b +.asm_1119be + ld a, [wc821] + bit 3, a + jr nz, .asm_1119dd + ld a, [wMobileSDK_PacketBuffer + 5] + add $a + ld e, a + ld d, 0 + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 + ld [wMobileSDK_SendCommandID], a + ld hl, wMobileSDK_PacketBuffer + ld b, $5 + call PacketSendBytes + jp Function111b3b +.asm_1119dd + ld hl, wc821 + set 1, [hl] + res 0, [hl] + ld hl, wc822 + res 7, [hl] + ld a, $21 + ld [wc80f], a + jr .asm_1119a9 + +Function1119f0_BeginSession: + ld a, MOBILE_COMMAND_BEGIN_SESSION | $80 + ld [wMobileSDK_SendCommandID], a + ld [wc808], a + ld b, $5 + ld de, MobilePacket_BeginSession.End - MobilePacket_BeginSession + ld hl, MobilePacket_BeginSession + call PacketSendBytes + ld a, $1 + ld [wc806], a + jp Function111b3b + +Function111a0b: + ld a, [hl] + cp $6 + jp z, Function111b3b + ld hl, wc822 + res 3, [hl] + res 0, [hl] + ld hl, wc81a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld h, [hl] + ld l, a + ld b, $5 + call PacketSendBytes + jp Function111b3b + +Function111a2a: + ld hl, wc80b + ld a, [hld] + or a + jr z, asm_111a47 + cp $3 + jr nz, asm_111a40 + ld a, [hl] + cp $2 + jp z, Function111ab9 + cp $3 + jp z, Function111abd +asm_111a40: + ld a, $4b + +Function111a42: + ldh [rSB], a + jp Function111b2e + +asm_111a47: + ld hl, wc815 + dec [hl] + jr nz, asm_111a40 + inc hl + dec [hl] + jr nz, asm_111a40 + inc hl + dec [hl] + jr z, .asm_111a63 + ld hl, wc81f + ld a, [hli] + ld d, a + ld a, [hl] + ld hl, wc815 + ld [hli], a + ld a, d + ld [hli], a + jr asm_111a40 +.asm_111a63 + di + ld a, [wc86a] + cp $2a + jr z, .asm_111aa8 + ld hl, wc9b2 + inc [hl] + ld a, [hl] + cp $1 + jr z, .asm_111a91 + ld hl, wc822 + res 5, [hl] + res 0, [hl] + ld hl, wc821 + res 4, [hl] + ld a, $0 + ld [wc805], a + ld a, $29 + ld [wc86a], a + ld a, $1 + ld [wc806], a + jr .asm_111aa8 +.asm_111a91 + ld a, $29 + ld [wc86a], a + xor a + ld [wc806], a + ld [wc86b], a + ld [wc80b], a + ld [wc800], a + ld a, $8 + ld [wc807], a +.asm_111aa8 + call ResetReceivePacketBuffer + call Function11164f + ld hl, wc822 + res 5, [hl] + res 0, [hl] + ei + jp Function111b3b + +Function111ab9: + ld a, $80 + jr Function111a42 + +Function111abd: + ld a, [wc814] + or a + jr nz, .asm_111acb + ld a, [wMobileSDK_ReceivePacketBuffer] + xor $80 + jp Function111a42 +.asm_111acb + ld hl, wc819 + inc [hl] + ld a, $3 + cp [hl] + jr z, .asm_111afe + call ResetReceivePacketBuffer + ld a, $3 + ld [wc800], a + xor a + ld hl, wc80a + ld [hli], a + ld [hli], a + ld [hl], a + ld hl, wc815 + ld a, [wc820] + ld [hli], a + ld a, [wc81f] + ld [hli], a + ld a, [wc822] + bit 0, a + jr z, .asm_111af9 + ld a, $b + jr .asm_111afb +.asm_111af9 + ld a, $20 +.asm_111afb + ld [hli], a + jr .asm_111b1c +.asm_111afe + ld hl, wc806 + xor a + ld [hli], a + ld [wc800], a + ld a, $6 + ld [hl], a + ld hl, wc821 + set 1, [hl] + ld a, $15 + ld [wc80f], a + ld a, $2 + ld [wc810], a + xor a + ld [wc810 + 1], a +.asm_111b1c + ld a, $f1 + jp Function111a42 + +Function111b21: + ld hl, wc803 + ld a, [hli] + ld e, a + ld d, [hl] + ld a, [de] + ldh [rSB], a + inc de + ld a, d + ld [hld], a + ld [hl], e + +Function111b2e: + ld hl, wc822 + set 1, [hl] + ld a, (0 << rSC_ON) | (1 << rSC_CGB) | (1 << rSC_CLOCK) + ldh [rSC], a + ld a, (1 << rSC_ON) | (1 << rSC_CGB) | (1 << rSC_CLOCK) + ldh [rSC], a + +Function111b3b: + ret + +Function111b3c: + xor a + ld [wc819], a + ld [wc80b], a + ld hl, wc9b1 + ld [hli], a + ld [hl], a + ld [wc800], a + ld hl, wc822 + res 5, [hl] + bit 0, [hl] + jr z, .asm_111b59 + ld a, [wMobileSDK_ReceivePacketBufferAlt] + jr .asm_111b5c +.asm_111b59 + ld a, [wMobileSDK_ReceivePacketBuffer] +.asm_111b5c + + cp MOBILE_COMMAND_TRANSFER_DATA_END | $80 + jr nz, .asm_111b62 + ld a, MOBILE_COMMAND_TRANSFER_DATA | $80 +.asm_111b62 + ld b, a + + ld hl, Function111e28 + push hl + cp MOBILE_COMMAND_ERROR | $80 + jp z, GetErrorCode + ld a, [wMobileSDK_SendCommandID] + cp -1 + jp z, Function111ef8 + cp MOBILE_COMMAND_TRANSFER_DATA | $80 + jp z, Function111c17 + cp MOBILE_COMMAND_DNS_QUERY | $80 + jp z, Function111d23 + cp MOBILE_COMMAND_OPEN_TCP_CONNECTION | $80 + jr z, .asm_111bbe + cp MOBILE_COMMAND_CLOSE_TCP_CONNECTION | $80 + jr z, .asm_111bbe + cp MOBILE_COMMAND_HANG_UP_TELEPHONE | $80 + jr z, .asm_111be0 + cp MOBILE_COMMAND_READ_CONFIGURATION_DATA | $80 + jr z, .asm_111bf0 + cp MOBILE_COMMAND_WRITE_CONFIGURATION_DATA | $80 + jp z, Function111c06 + cp MOBILE_COMMAND_TELEPHONE_STATUS | $80 + jp z, Function111d70 + cp MOBILE_COMMAND_ISP_LOGIN | $80 + jr z, .asm_111bd0 + cp MOBILE_COMMAND_ISP_LOGOUT | $80 + jr z, .asm_111bca + cp MOBILE_COMMAND_BEGIN_SESSION | $80 + jp z, ParseResponse_BeginSession + cp MOBILE_COMMAND_WAIT_FOR_TELEPHONE_CALL | $80 + jp z, Function111d65 + cp MOBILE_COMMAND_DIAL_TELEPHONE | $80 + jp z, Function111d65 + ld hl, wc822 + res 0, [hl] + ld a, $a + ld [wc807], a + xor a + ld [wc800], a + ret + +.asm_111bbe + ld a, [wMobileSDK_ReceivePacketBuffer + 4] + ld [wc86c], a + ld a, $4 + ld [wc807], a + ret + +.asm_111bca + ld a, $3 + ld [wc807], a + ret + +.asm_111bd0 + ld a, $4 + ld [wc807], a + ld de, wc823 + ld hl, wMobileSDK_ReceivePacketBuffer + 4 + ld b, $4 + jp MobileSDK_CopyBytes + +.asm_111be0 + ld a, $2 + ld [wc807], a + ld hl, wc822 + res 4, [hl] + ld hl, wc821 + res 4, [hl] + ret + +.asm_111bf0 + ld hl, wc829 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_ReceivePacketBuffer + 3 ; packet size + ld a, [hli] + dec a + ld b, a + inc hl + call MobileSDK_CopyBytes + ld a, $2 + ld [wc807], a + ret + +Function111c06: + ld de, wc872 + ld hl, wMobileSDK_ReceivePacketBuffer + 4 + ld b, $2 + call MobileSDK_CopyBytes + ld a, $2 + ld [wc807], a + ret + +Function111c17: + ld a, [wMobileSDK_ReceivePacketBuffer] + cp MOBILE_COMMAND_TRANSFER_DATA_END | $80 + jp z, Function111d07 + ld a, [wc86e + 1] + ld b, a + ld a, [wc86e] + or b + jp z, Function111d07 + ld hl, wc82b + ld a, [hli] + ld e, a + ld d, [hl] + ld a, [wMobileSDK_ReceivePacketBuffer + 3] + dec a + jp z, Function111d07 + ld c, a + ld a, [wc822] + bit 4, a + jp z, Function111cc2 + ld a, [wc992] + or a + jr nz, .asm_111c89 + ld a, [wMobileSDK_ReceivePacketBuffer + 5] + or a + jr z, .asm_111c50 + cp $81 + jr c, .asm_111c52 +.asm_111c50 + ld a, $80 +.asm_111c52 + ld b, a + ld a, [wMobileSDK_ReceivePacketBuffer + 3] + dec a + dec a + cp b + jr c, .asm_111c6e +.asm_111c5b + ld hl, wc821 + set 3, [hl] + ld hl, wc993 + ld a, $1 + ld [hli], a + ld a, [wMobileSDK_ReceivePacketBuffer + 3] + dec a + ld [hl], a + jp Function111d07 +.asm_111c6e + ld hl, wc992 + or a + jr z, .asm_111c83 + ld [hld], a + ld [hl], b + ld b, a + ld hl, wMobileSDK_ReceivePacketBuffer + 6 + ld de, wc880 + call MobileSDK_CopyBytes + jp Function111d07 +.asm_111c83 + ld a, $ff + ld [hld], a + ld [hl], b + jr Function111d07 +.asm_111c89 + cp $ff + jr nz, .asm_111c9d + ld hl, wc991 + ld a, [hli] + ld b, a + ld a, [wMobileSDK_ReceivePacketBuffer + 3] + dec a + cp b + jr nc, .asm_111c5b + jr z, .asm_111c5b + xor a + ld [hl], a +.asm_111c9d + ld hl, wc991 + ld a, [hli] + sub [hl] + ld b, a + ld a, [wMobileSDK_ReceivePacketBuffer + 3] + dec a + cp b + jr nc, .asm_111c5b + jr z, .asm_111c5b + ld b, a + ld l, [hl] + ld h, $0 + add l + ld [wc992], a + ld de, wc880 + add hl, de + ld e, l + ld d, h + ld hl, wMobileSDK_ReceivePacketBuffer + 5 + call MobileSDK_CopyBytes + jr Function111d07 + +Function111cc2: + xor a + cp d + jr nz, .asm_111cda + ld a, c + cp e + jr c, .asm_111cda + jr z, .asm_111cda + ld a, [wc821] + set 2, a + ld [wc821], a + ld a, c + sub e + ld c, e + ld e, a + jr .asm_111ce1 +.asm_111cda + ld a, e + sub c + ld e, a + ld a, d + sbc $0 + ld d, a +.asm_111ce1 + ld a, d + ld [hld], a + ld [hl], e + ld a, [wc829] + ld e, a + ld a, [wc829 + 1] + ld d, a + ld hl, wMobileSDK_ReceivePacketBuffer + 5 + ld a, c + or a + jr z, Function111d07 + ld b, a + call MobileSDK_CopyBytes + ld hl, wc829 + ld a, e + ld [hli], a + ld [hl], d + ld de, $3 + add hl, de + ld a, [hl] + add c + ld [hli], a + jr nc, Function111d07 + inc [hl] + +Function111d07: + ld a, [wc822] + bit 4, a + jr z, .asm_111d1c + bit 7, a + jr z, .asm_111d1c + ld hl, wc822 + res 7, [hl] + ld hl, wc821 + res 0, [hl] +.asm_111d1c + ld a, [wc805] + ld [wc807], a + ret + +Function111d23: + ld a, [wc829] + ld e, a + ld a, [wc829 + 1] + ld d, a + ld hl, wMobileSDK_ReceivePacketBuffer + 4 + ld b, $4 + call MobileSDK_CopyBytes + ld a, $4 + ld [wc807], a + ret + +ParseResponse_BeginSession: + ld de, wMobileSDK_ReceivePacketBuffer + 3 + ld hl, MobilePacket_BeginSession + 5 + ld b, 1 + STRLEN("NINTENDO") +.check_loop + ld a, [de] + inc de + cp [hl] + jr nz, .check_done + inc hl + dec b + jr nz, .check_loop +.check_done + ld a, b + or a + jr nz, .done + + ld a, [wMobileSDK_ReceivePacketBuffer + 14] ; device type + cp $80 + jr c, .fail + cp $90 + jr nc, .fail +.done + ld [wMobileSDK_AdapterType], a + ld a, $2 + ld [wc807], a + ret +.fail + xor a + jr .done + +Function111d65: + ld a, $3 + ld [wc807], a + ld hl, wc821 + set 4, [hl] + ret + +Function111d70: + ld hl, wc822 + bit 0, [hl] + jr z, .asm_111dc0 + ld a, [wc805] + ld [wc807], a + ld a, [wMobileSDK_ReceivePacketBufferAlt + 4] + ld b, a + call Function111dd9 + call Function111e15 + res 0, [hl] + ld a, b + cp $7 + jr z, .asm_111da9 + or a + ret nz + ld hl, wc821 + res 4, [hl] + set 1, [hl] + ld a, [wc822] + bit 4, a + jr nz, .asm_111dbb + ld a, $23 + ld [wc80f], a + ld a, $6 + ld [wc807], a + ret +.asm_111da9 + ld hl, wc821 + res 4, [hl] + set 1, [hl] + ld a, $11 + ld [wc80f], a + ld a, $6 + ld [wc807], a + ret +.asm_111dbb + xor a + ld [wc807], a + ret +.asm_111dc0 + ld hl, wc86e + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wMobileSDK_ReceivePacketBuffer + 4] + ld b, a + call Function111dd9 + call Function111e15 + ld a, b + ld [hl], a + ld a, [wc805] + ld [wc807], a + ret + +Function111dd9: + cp $ff + jr z, .asm_111de7 + or a + ret z + cp $4 + jr z, .asm_111dea + cp $5 + jr z, .asm_111e12 +.asm_111de7 + ld b, $7 + ret +.asm_111dea + ld b, $5 + ld a, [wc822] + bit 0, a + jr z, .asm_111df8 + ld a, [wc86a] + jr .asm_111dfb +.asm_111df8 + ld a, [wc985] +.asm_111dfb + cp $4 + ret z + cp $1c + ret z + cp $1a + ret z + dec b + cp $3 + ret z + ld b, $1 + ld a, [wc822] + bit 4, a + ret z + inc b + ret +.asm_111e12 + ld b, $3 + ret + +Function111e15: + ld a, b + and $7 + rrca + rrca + rrca + push hl + ld l, a + ld a, [wc821] + and $1f + or l + ld [wc821], a + pop hl + ret + +Function111e28: + jp ResetReceivePacketBuffer + +GetErrorCode: +; Converts an error packet into a BCD error code + ld a, [wMobileSDK_SendCommandID] + cp -1 + jp z, Function111ef8 + ld a, [wc86a] + cp $d + jr z, .asm_111e48 + cp $2a + jr z, .asm_111e48 + ld a, $6 + ld [wc807], a + ld hl, wc821 + set 1, [hl] +.asm_111e48 + ld a, [wc822] + bit 0, a + jr z, .asm_111e54 + ld hl, wMobileSDK_ReceivePacketBufferAlt + 4 + jr .asm_111e57 +.asm_111e54 + ld hl, wMobileSDK_ReceivePacketBuffer + 4 +.asm_111e57 + ld a, [hli] + ld [wc80e], a + cp MOBILE_COMMAND_BEGIN_SESSION + jr z, .adapter_not_plugged_in + cp MOBILE_COMMAND_DIAL_TELEPHONE + jr z, .dial_telephone + cp MOBILE_COMMAND_HANG_UP_TELEPHONE + jr z, .hang_up_logout + cp MOBILE_COMMAND_TRANSFER_DATA + jr z, .transfer_data + cp MOBILE_COMMAND_READ_CONFIGURATION_DATA + jr z, .read_configuration_data + cp MOBILE_COMMAND_ISP_LOGIN + jr z, .isp_login + cp MOBILE_COMMAND_ISP_LOGOUT + jr z, .hang_up_logout + cp MOBILE_COMMAND_OPEN_TCP_CONNECTION + jr z, .open_tcp_connection + cp MOBILE_COMMAND_CLOSE_TCP_CONNECTION + jr z, .close_tcp_connection + cp MOBILE_COMMAND_DNS_QUERY + jr z, .dns_query + ld a, [hl] + +.store_error_code + ld [wc80f], a + ret + +.adapter_not_plugged_in + ld a, $10 + jr .store_error_code + +.dial_telephone + ld a, [hl] + or $0 + jr z, .asm_111e9d + cp $2 + jr z, .asm_111e99 + ld a, $13 + jr .store_error_code +.asm_111e99 + ld a, $17 + jr .store_error_code +.asm_111e9d + ld a, $12 + jr .store_error_code + +.hang_up_logout + ld hl, wc821 + res 1, [hl] + res 4, [hl] + ld a, $2 + ld [wc807], a + ret + +.transfer_data + ld a, [hl] + cp $1 + jr nz, .asm_111ed3 + ld a, [wc822] + bit 4, a + jr z, .asm_111ed3 + res 4, a + ld [wc822], a + ld hl, wc821 + ld a, [hl] + and $f + or $2 + ld [hl], a + ld a, $23 + ld [wc80f], a + ld a, $6 + ld [wc807], a + ret +.asm_111ed3 + ld hl, wc822 + res 5, [hl] + ld a, $24 + jr .store_error_code + +.read_configuration_data + ld a, $14 + jr .store_error_code + +.isp_login + ld a, $22 + jr .store_error_code + +.open_tcp_connection + ld hl, wc821 + res 1, [hl] + +.dns_query + ld a, $24 + jr .store_error_code + +.close_tcp_connection + ld hl, wc821 + res 1, [hl] + ld a, $3 + ld [wc807], a + ret + +Function111ef8: + ld a, [wc805] + ld [wc807], a + ret + +PacketSendEmptyBody: + ld de, 10 + +Function111f02: + ld [wMobileSDK_SendCommandID], a + ld b, $5 + +PacketSendBytes: +; hl = bytes +; de = size +; b = ? + call Function1100b4 + ret c + ld a, [wc800] + cp $0 + jr z, .asm_111f17 + call Function110226 + scf + ret +.asm_111f17 + ldh a, [rSC] + and 1 << rSC_ON + jr nz, .asm_111f17 + di + ld a, [wMobileSDK_SendCommandID] + cp $ff + jr z, .asm_111f35 + ld a, l + ld [wc81c], a + ld a, h + ld [wc81d], a + ld a, e + ld [wc81a], a + ld a, d + ld [wc81b], a +.asm_111f35 + ld a, e + ld [wc801], a + ld a, d + ld [wc802], a + ld a, l + ld [wc803], a + ld a, h + ld [wc804], a + ld hl, wc807 + ld a, [hl] + cp b + jr z, .asm_111f4f + ld [wc805], a +.asm_111f4f + ld a, b + ld [wc807], a + xor a + ld [wc806], a + ld a, $1 + ld [wc800], a + ld hl, wc822 + set 5, [hl] + ei + ret + +Function111f63: + push de + ld hl, 0 + ld c, b + xor a + cp b + jr z, .asm_111f71 +.asm_111f6c + call Function111f8d + jr nz, .asm_111f6c + +.asm_111f71 + ld b, $4 +.asm_111f73 + call Function111f8d + jr nz, .asm_111f73 + ld e, l + ld d, h + ld hl, $000a + add hl, bc + ld c, l + ld b, h + pop hl + ld a, d + ld [hli], a + ld a, e + ld [hli], a + ld a, $80 + ld [hli], a + xor a + ld [hl], a + ld e, c + ld d, b + ret + +Function111f8d: + dec de + ld a, [de] + add l + ld l, a + ld a, $0 + adc h + ld h, a + dec b + ret + +Function111f97: + ld hl, wc822 + bit 0, [hl] + ret nz + ld a, [wc807] + cp $2 + jr c, .done + cp $5 + jr z, .done + cp $6 + jr nz, .hang_up + ld a, [wc80f] + cp $22 + jr z, .done + cp $23 + jr z, .done + cp $26 + jr z, .done + swap a + and $f + cp $1 + jr z, .done + cp $0 + jr z, .done + cp $8 + jr nz, .hang_up +.done + scf + ret +.hang_up + ld b, $5 + ld hl, wMobileSDK_SendCommandID + ld a, [hl] + cp -1 + jr z, .begin_session + ld a, MOBILE_COMMAND_TELEPHONE_STATUS | $80 + ld [hl], a + ld hl, MobilePacket_TelephoneStatus + ld de, MobilePacket_TelephoneStatus.End - MobilePacket_TelephoneStatus + call PacketSendBytes + ld hl, wc822 + set 0, [hl] + ret +.begin_session + ld hl, MobilePacket_BeginSession + ld de, MobilePacket_BeginSession.End - MobilePacket_BeginSession + jp PacketSendBytes + + ds 14 + +MobilePacket_Idle: + db $4b +.End + +MobilePacket_BeginSession: + db $99, $66, MOBILE_COMMAND_BEGIN_SESSION, $00, $00, $08, "NINTENDO", $02, $77, $80, $00 +.End + +MobilePacket_EndSession: + db $99, $66, MOBILE_COMMAND_END_SESSION, $00, $00, $00, $00, $11, $80, $00 +.End + +MobilePacket_DialTelephone: + db $99, $66, MOBILE_COMMAND_DIAL_TELEPHONE, $00, $00, $00 +.End + +MobilePacket_HangUpTelephone: + db $99, $66, MOBILE_COMMAND_HANG_UP_TELEPHONE, $00, $00, $00, $00, $13, $80, $00 +.End + +MobilePacket_TelephoneStatus: + db $99, $66, MOBILE_COMMAND_TELEPHONE_STATUS, $00, $00, $00, $00, $17, $80, $00 +.End + +MobilePacket_ISPLogin: + db $99, $66, MOBILE_COMMAND_ISP_LOGIN, $00, $00 +.End + +MobilePacket_ISPLogout: + db $99, $66, MOBILE_COMMAND_ISP_LOGOUT, $00, $00, $00, $00, $22, $80, $00 +.End + +MobilePacket_ReadConfigurationDataPart1: + db $99, $66, MOBILE_COMMAND_READ_CONFIGURATION_DATA, $00, $00, $02, $00, $60, $00, $7b, $80, $00 +.End + +MobilePacket_ReadConfigurationDataPart2: + db $99, $66, MOBILE_COMMAND_READ_CONFIGURATION_DATA, $00, $00, $02, $60, $60, $00, $db, $80, $00 +.End + +MobilePacket_WriteConfigurationData: + db $99, $66, MOBILE_COMMAND_WRITE_CONFIGURATION_DATA, $00, $00 +.End + +MobilePacket_DNSQuery: + db $99, $66, MOBILE_COMMAND_DNS_QUERY, $00, $00 +.End + +MobilePacket_WaitForTelephoneCall: + db $99, $66, MOBILE_COMMAND_WAIT_FOR_TELEPHONE_CALL, $00, $00, $00, $00, $14, $80, $00 +.End + +MobilePacket_TransferData: + db $99, $66, MOBILE_COMMAND_TRANSFER_DATA, $00, $00, $01, $ff, $01, $15, $80, $00 +.End + +MobilePacket_OpenTCPConnection: + db $99, $66, MOBILE_COMMAND_OPEN_TCP_CONNECTION, $00, $00, $06 +.End + +MobilePacket_CloseTCPConnection: + db $99, $66, MOBILE_COMMAND_CLOSE_TCP_CONNECTION, $00, $00, $01 +.End + +Unknown_112089: + db -20, $14, $c9 + db -28, $0f, $0e + db -32, $0c, $53 + db -60, $07, $94 + db -80, $05, $ee + db -20, $10, $b4 + db -28, $0c, $dd + +Unknown_11209e: + db "HELO ", 0 +Unknown_1120a4: + db "MAIL FROM:<", 0 +Unknown_1120b0: + db "RCPT TO:<", 0 +Unknown_1120ba: + db "DATA\r\n", 0 +Unknown_1120c1: + db "QUIT\r\n", 0 +Unknown_1120c8: + db "USER ", 0 +Unknown_1120ce: + db "PASS ", 0 +Unknown_1120d4: + db "STAT\r\n", 0 +Unknown_1120db: + db "LIST 00000\r\n", 0 +Unknown_1120e8: + db "RETR 00000\r\n", 0 +Unknown_1120f5: + db "DELE 00000\r\n", 0 +Unknown_112102: + db "TOP 00000 0\r\n", 0 +Unknown_112110: + db "GET ", 0 +Unknown_112115: + db " HTTP/1.0\r\n", 0 +Unknown_112121: + db "User-Agent: CGB-", 0 +Unknown_112132: + db "\r\n\r\n", 0 +Unknown_112137: + db "POST ", 0 +Unknown_11213d: + db "Content-Length: ", 0 + +Function11214e: + ld a, [wc822] + bit 5, a + ret nz + ld a, [wc86a] + cp $a + ret c + ld c, a + cp $d + jr z, .asm_112187 + cp $f + jr z, .asm_112196 + cp $29 + jr z, .asm_112175 + cp $2a + jr z, .asm_112175 + cp $28 + jr z, .asm_112175 +.asm_11216f + ld a, [wc807] + cp $6 + ret z +.asm_112175 + ld b, $0 + sla c + ld hl, Jumptable_1121ac - 2 * $a + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + push hl + ld hl, wc86b + inc [hl] + ld a, [hl] + ret +.asm_112187 + ld c, a + ld a, [wc86b] + cp $1 + jr nz, .asm_11216f + ld hl, wc821 + res 1, [hl] + jr .asm_112175 +.asm_112196 + ld c, a + ld a, [wc80f] + cp $24 + jr nz, .asm_11216f + ld a, [wc86b] + cp $1 + jr nz, .asm_11216f + ld hl, wc821 + res 1, [hl] + jr .asm_112175 + +Jumptable_1121ac: + dw Function1121f6 + dw Function112271 + dw Function112373 + dw Function1123b6 + dw Function1123e1 + dw Function112451 + dw Function112715 + dw Function11273a + dw Function11299c + dw Function112d33 + dw Function112d33 + dw Function112840 + dw Function1128db + dw Function112969 + dw Function112a56 + dw Function112b71 + dw Function112bec + dw Function112bbb + dw Function112bec + dw Function112b71 + dw Function1134cb + dw Function112d33 + dw Function112d33 + dw Function112d33 + dw Function112d33 + dw Function112d33 + dw Function112d33 + dw Function113519 + dw Function113519 + dw Function113519 + dw Function113e42 + dw Function113ef2 + dw Function113f2d + dw Function1121f6 + dw Function1134cb + dw Function113672 + dw Function113626 + +Function1121f6: + dec a + jr z, .asm_1121fe + dec a + jr z, .asm_112210 + dec [hl] + ret + +.asm_1121fe + ld a, [wMobileSDK_AdapterType] + or a + jr z, .asm_112206 + jr Mobile_EndSession + +.asm_112206 + ld a, $10 + call Function11225d + res 0, [hl] + set 1, [hl] + ret + +.asm_112210 + ld hl, wc86e + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wMobileSDK_AdapterType] + cp $88 + jr c, .asm_112249 + sub $88 + ld [hl], a + + ; There aren't more than four adapters + cp $4 + jr c, .asm_112226 + ld a, $3 +.asm_112226 + + ; The green adapter was scrapped, so the red adapter is the third + cp $3 + jr nz, .asm_11222b + dec a +.asm_11222b + + ld b, a + ld a, $4 + sub b + ld d, a + rlca + add d + ld c, a + xor a + cp b + jr z, .asm_11223a + ld a, $3 + xor b + +.asm_11223a + ld hl, wc871 + ld [hld], a + ld [hl], c + ld a, [wc86a] + cp $a + jr nz, Function112251 + jp Function1116a0 + +.asm_112249 + ld a, $10 + call Function11225d + jp Function1116a4 + +Function112251: + xor a + ld [wc821], a + ld [wc807], a + inc a + ld [wc86a], a + ret + +Function11225d: + ld [wc80f], a + ld a, $5 + ld [wc86a], a + ld hl, wc821 + ret + +Mobile_EndSession: + ld a, MOBILE_COMMAND_END_SESSION | $80 + ld hl, MobilePacket_EndSession + jp PacketSendEmptyBody + +Function112271: + dec a + jr z, .asm_11228c + dec a + jr z, .asm_112292 + dec a + jr z, .asm_1122a1 + dec a + jp z, .asm_112309 + dec a + jp z, .asm_112326 + dec a + jp z, .asm_112335 + dec a + jp z, .asm_112342 + dec [hl] + ret + +.asm_11228c + ld hl, MobilePacket_ReadConfigurationDataPart1 + jp Function11236b + +.asm_112292 + ld hl, wc829 + ld a, LOW(wc8ca + 22) + ld [hli], a + ld a, HIGH(wc8ca + 22) + ld [hli], a + ld hl, MobilePacket_ReadConfigurationDataPart2 + jp Function11236b + +.asm_1122a1 + ld hl, wc880 + ld a, [hli] + cp "M" + jr nz, .asm_1122f5 + ld a, [hld] + cp "A" + jr nz, .asm_1122f5 + ld b, $be + ld de, 0 +.asm_1122b3 + ld a, [hli] + add e + ld e, a + ld a, $0 + adc d + ld d, a + dec b + jr nz, .asm_1122b3 + ld a, [hli] + cp d + jr nz, .asm_1122fc + ld a, [hl] + cp e + jr nz, .asm_1122fc + ld hl, wc884 + ld de, wc836 + ld b, $8 + call MobileSDK_CopyBytes + ld hl, wc8ca + ld b, $2c + call MobileSDK_CopyBytes + ld a, [wMobileSDK_PacketBuffer + 50] + ld c, a + sub $8 + ld e, a + ld d, 0 + ld hl, wMobileSDK_PacketBuffer + 51 + add hl, de + ld e, l + ld d, h + ld hl, wc836 + ld b, $8 + call MobileSDK_CopyBytes + ld b, c + call Function111f63 + jr Function11235a + +.asm_1122f5 + ld a, $25 + ld [wc872], a + jr .asm_112301 + +.asm_1122fc + ld a, $14 + ld [wc872], a + +.asm_112301 + ld a, $6 + ld [wc86b], a + jp Mobile_EndSession + +.asm_112309 + ld a, [wc821] + and $e0 + jr nz, .asm_112314 + ld b, $92 + jr Function11234b + +.asm_112314 + cp $e0 + ld a, $11 + jr z, .asm_11231b + inc a + +.asm_11231b + ld [wc872], a + ld a, $6 + ld [wc86b], a + jp Mobile_EndSession + +.asm_112326 + ld d, a + ld a, [wMobileSDK_PacketBuffer + 50] + add $a + ld e, a + ld hl, wMobileSDK_PacketBuffer + 45 + ld a, $a1 + jp Function111f02 + +.asm_112335 + ld a, $2 + ld [wc86a], a + ld hl, wc821 + res 0, [hl] + set 5, [hl] + ret + +.asm_112342 + ld a, [wc872] + call Function11225d + jp Function1116a4 + +Function11234b: + ld a, [wMobileSDK_PacketBuffer + 5] + add $a + ld e, a + ld d, 0 + ld hl, wMobileSDK_PacketBuffer + ld a, b + jp Function111f02 + +Function11235a: + ld hl, wc86e + ld a, LOW(wc880) + ld [hli], a + ld a, HIGH(wc880) + ld [hl], a + ld a, MOBILE_COMMAND_TELEPHONE_STATUS | $80 + ld hl, MobilePacket_TelephoneStatus + jp PacketSendEmptyBody + +Function11236b: + ld a, $99 + ld de, $000c + jp Function111f02 + +Function112373: + dec a + jr z, Function11235a + dec a + jr z, .asm_112381 + dec a + jr z, .asm_11239b + dec a + jr z, .asm_1123ad + dec [hl] + ret + +.asm_112381 + ld a, [wc821] + and $e0 + jr nz, .asm_11238c + ld b, $92 + jr Function11234b + +.asm_11238c + cp $e0 + ld a, $11 + jr z, .asm_112393 + inc a + +.asm_112393 + ld a, $3 + ld [wc86b], a + jp Mobile_EndSession + +.asm_11239b + ld hl, wc822 + set 4, [hl] + ld a, $2 + ld [wc86a], a + ld hl, wc821 + res 0, [hl] + set 6, [hl] + ret + +.asm_1123ad + ld a, [wc872] + call Function11225d + jp Function1116a4 + +Function1123b6: + dec a + jr z, .wait_for_call + dec a + jr z, .asm_1123c6 + ret + +.asm_1123bd + dec [hl] + +.wait_for_call + ld a, MOBILE_COMMAND_WAIT_FOR_TELEPHONE_CALL | $80 + ld hl, MobilePacket_WaitForTelephoneCall + jp PacketSendEmptyBody + +.asm_1123c6 + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $ee + jr z, .asm_1123bd + ld hl, wc822 + set 4, [hl] + ld a, $2 + ld [wc86a], a + ld hl, wc821 + res 0, [hl] + set 6, [hl] + set 5, [hl] + ret + +Function1123e1: + dec a + jr z, .asm_1123f2 + dec a + jr z, .asm_11240a + dec a + jr z, .asm_112416 + dec a + jr z, .asm_11241e + dec a + jr z, .asm_112421 + dec [hl] + ret + +.asm_1123f2 + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jr z, .asm_112408 + call Function1127e1 + jr z, .asm_112408 + ld hl, wc86b + dec [hl] + ld hl, wMobileSDK_PacketBuffer + 32 + jp Function1127c5 + +.asm_112408 + jr Function112430 + +.asm_11240a + xor a + ld [wc86d], a + ld a, MOBILE_COMMAND_ISP_LOGOUT | $80 + ld hl, MobilePacket_ISPLogout + jp PacketSendEmptyBody + +.asm_112416 + ld a, MOBILE_COMMAND_HANG_UP_TELEPHONE | $80 + ld hl, MobilePacket_HangUpTelephone + jp PacketSendEmptyBody + +.asm_11241e + jp Mobile_EndSession + +.asm_112421 + ld hl, wc822 + res 4, [hl] + ld hl, wc821 + ld a, [hl] + and $f + ld [hl], a + jp Function1116a0 + +Function112430: + ld a, $3 + ld [wc807], a + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_CloseTCPConnection + ld b, MobilePacket_CloseTCPConnection.End - MobilePacket_CloseTCPConnection + call MobileSDK_CopyBytes + ld a, [wc86c] + ld [de], a + inc de + inc b + call Function111f63 + ld a, $a4 + ld hl, wMobileSDK_PacketBuffer + jp Function111f02 + +Function112451: + dec a + jr z, .asm_112458 + dec a + jr z, .asm_112496 + ret + +.asm_112458 + ld b, $6 + ld de, wMobileSDK_PacketBuffer + 92 + call Function111f63 + ld a, [wc86e] + inc a + cp $3 + jr nz, .asm_11248b + ld a, [wMobileSDK_ReceivePacketBuffer + 128] + or a + jr z, .asm_11248b + ld hl, wc995 + ld a, [hli] + cp $99 + jr nz, .asm_112480 + ld a, [hli] + cp $66 + jr nz, .asm_112480 + ld a, [hli] + cp $23 + jr z, .asm_11248b + +.asm_112480 + ld hl, wMobileSDK_PacketBuffer + 80 + ld de, wc995 + ld b, $10 + call MobileSDK_CopyBytes + +.asm_11248b + ld a, $a3 + ld de, $0010 + ld hl, wMobileSDK_PacketBuffer + 80 + jp Function111f02 + +.asm_112496 + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $a3 + jr z, .asm_1124ce + ld a, [wc822] + bit 3, a + jr z, .asm_1124ab + dec [hl] + ld a, $3 + ld [wc807], a + ret + +.asm_1124ab + ld a, [wc9af] + cp $5 + jr c, .asm_1124b8 + ld hl, wc821 + set 1, [hl] + ret + +.asm_1124b8 + dec [hl] + ld hl, wc9af + inc [hl] + ld hl, wc822 + set 3, [hl] + ld hl, wc815 + ld a, [wc820] + ld [hli], a + ld a, [wc81f] + ld [hl], a + ret + +.asm_1124ce + xor a + ld [wc9af], a + ld a, [wc86e] + inc a + ld [wc86d], a + dec a + jp z, Function11261c + dec a + jp z, Function112654 + dec a + jp z, Function112597 + dec a + jp z, Function112566 + call Function1125c7 + push de + ld de, wc880 + ld hl, wc827 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, $1 + ld [wc86e], a + ld a, $fa + ld [hli], a + xor a + ld [hli], a + xor a + ld [hli], a + ld [hli], a + pop de + ld a, $1 + ld [wc994], a + call Function11269b + ld a, $5 + ld [wc86b], a + call Function112534 + ld a, [wc9a5] + or a + jr z, .asm_112521 + ld a, $1 + +.asm_112521 + add $23 + ld [wc86a], a + ld a, [wc98a] + cp $2 + jr nz, .asm_112531 + xor a + ld [wc9a5], a + +.asm_112531 + jp Function1125bf + +Function112534: + ld b, $fa + ld hl, wc880 + xor a +.asm_11253a + ld [hli], a + dec b + jr nz, .asm_11253a + ld a, [wc876] + ld [wc87c], a + ld a, [wc877] + ld [wc87d], a + ld a, [wc87a] + ld [wc87e], a + ld a, [wc87b] + ld [wc87f], a + ld a, c + ld [wMobileSDK_PacketBuffer + 17], a + ld b, c + call Function111f63 + ld a, $95 + ld hl, wMobileSDK_PacketBuffer + 12 + jp Function111f02 + +Function112566: + call Function1125c7 + ld a, [wMobileSDK_PacketBuffer + 19] + and $1 + or a + jr nz, .asm_11257d + ld a, [wc98a] + cp $2 + jr nz, .asm_11257d + ld a, $1 + ld [wc994], a + +.asm_11257d + call Function11269b + ld a, $5 + ld [wc86b], a + call Function112534 + ld a, [wc9a5] + or a + jr z, .asm_112590 + ld a, $1 + +.asm_112590 + add $21 + ld [wc86a], a + jr Function1125bf + +Function112597: + call Function1125c7 + call Function11269b + ld a, $5 + ld [wc86b], a + call Function112534 + ld a, [wc98f] + ld b, a + ld a, [wc994] + and $1 + add $13 + bit 0, b + jr z, .asm_1125bc + sub $13 + add $1f + dec b + sla b + add b + +.asm_1125bc + ld [wc86a], a + +Function1125bf: + ld hl, wc821 + set 0, [hl] + res 2, [hl] + ret + +Function1125c7: + ld hl, wc872 + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, [hli] + ld e, a + ld d, [hl] + ld a, [wc994] + and $1 + xor $1 + ld [wc86b], a + ld hl, wc827 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + inc de + inc de + ld a, LOW(wc880) + ld [hli], a + ld a, HIGH(wc880) + ld [hli], a + dec bc + dec bc + ld a, $fa + ld [hli], a + ld a, $0 + ld [hli], a + xor a + ld [hli], a + ld [hli], a + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $6 + call MobileSDK_CopyBytes + ld a, [wc86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + ld de, wMobileSDK_PacketBuffer + 12 + ld hl, MobilePacket_TransferData + ld b, $5 + call MobileSDK_CopyBytes + inc de + ld a, [wc86c] + ld [de], a + inc de + ret + +Function11261c: + xor a + ld [wc86b], a + ld a, [wc86c] + ld [wMobileSDK_PacketBuffer + 118], a + ld de, wMobileSDK_PacketBuffer + 102 + ld [de], a + inc de + ld b, $1 + call Function111f63 + call Function112724 + ld a, [wMobileSDK_PacketBuffer + 117] + ld b, a + ld de, wMobileSDK_PacketBuffer + 118 + add e + ld e, a + ld a, $0 + adc d + ld d, a + call Function111f63 + ld hl, wMobileSDK_PacketBuffer + 96 + call Function1127c5 + ld a, $11 + ld [wc86a], a + +Function11264e: + ld hl, wc821 + set 0, [hl] + ret + +Function112654: + xor a + ld [wc86b], a + ld a, [wc86c] + ld [wMobileSDK_PacketBuffer + 102], a + ld [wMobileSDK_PacketBuffer + 166], a + ld de, wMobileSDK_PacketBuffer + 134 + ld [de], a + inc de + ld b, $1 + call Function111f63 + call Function112724 + ld a, [wMobileSDK_PacketBuffer + 165] + ld b, a + ld de, wMobileSDK_PacketBuffer + 166 + add e + ld e, a + ld a, $0 + adc d + ld d, a + call Function111f63 + ld a, [wMobileSDK_PacketBuffer + 101] + ld b, a + ld de, wMobileSDK_PacketBuffer + 102 + add e + ld e, a + ld a, $0 + adc d + ld d, a + call Function111f63 + ld hl, wMobileSDK_PacketBuffer + 128 + call Function1127c5 + ld a, $12 + ld [wc86a], a + jr Function11264e + +Function11269b: + ld bc, $0001 + ld hl, Unknown_112110 + ld a, [wc994] + or a + call nz, Function1126ac + call MobileSDK_CopyString + ret + +Function1126ac: + ld hl, Unknown_112137 + ret + +Function1126b0: + ld hl, Unknown_112115 + jp MobileSDK_CopyString + +Function1126b6: + ld hl, Unknown_112121 + call MobileSDK_CopyString + ld hl, $013f + ld b, $4 + call MobileSDK_CopyBytes + ld a, $2d + ld [de], a + inc de + ld a, [$014c] + and $f0 + swap a + or $30 + ld [de], a + inc de + ld a, [$014c] + and $f + or $30 + ld [de], a + inc de + ld a, $7 + add c + ld c, a + ld hl, Unknown_112132 + jp MobileSDK_CopyString + +Function1126e6: + xor a + ld [wc86b], a + ld hl, Unknown_11213d + call MobileSDK_CopyString + ld hl, wc9a5 + ld b, $5 +.asm_1126f5 + ld a, [hl] + cp $30 + jr nz, .asm_112701 + inc hl + dec b + ld a, $1 + cp b + jr nz, .asm_1126f5 + +.asm_112701 + push bc + call MobileSDK_CopyBytes + ld a, $d + ld [de], a + inc de + ld a, $a + ld [de], a + inc de + pop bc + ld a, b + add $2 + add c + ld c, a + or c + ret + +Function112715: + xor a + ld [wc86c], a + ld a, $2 + ld [wc86a], a + ld hl, wc821 + res 0, [hl] + ret + +Function112724: + ld a, $ff + ld [wc86e], a + +Function112729: + push hl + ld hl, wc82c + xor a + ld [hld], a + ld a, $ff + ld [hld], a + ld a, HIGH(wc880) + ld [hld], a + ld a, LOW(wc880) + ld [hl], a + pop hl + ret + +Function11273a: + dec a + jr z, .asm_112752 + dec a + jr z, .asm_11278f + dec a + jr z, .asm_112744 + ret + +.asm_112744 + xor a + ld [wc86d], a + ld a, $30 + call Function11225d + set 1, [hl] + res 0, [hl] + ret + +.asm_112752 + call Function1127e1 + jr nz, .asm_11277a + ld hl, wc880 + call Function112b11 + ld a, $2 + cp d + jr nz, .asm_1127b7 + ld a, $20 + cp e + jr nz, .asm_1127b7 + call Function112724 + ld a, [wMobileSDK_PacketBuffer + 117] + add $a + ld e, a + ld d, 0 + ld a, $95 + ld hl, wMobileSDK_PacketBuffer + 112 + jp Function111f02 + +.asm_11277a + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jr z, Function1127cd + ld hl, wc86b + dec [hl] + xor a + ld [wMobileSDK_ReceivePacketBuffer + 3], a + ld hl, wMobileSDK_PacketBuffer + 96 + jp Function1127c5 + +.asm_11278f + call Function1127e1 + jr nz, .asm_11277a + ld hl, wc880 + call Function112b11 + ld a, $2 + cp d + jr nz, .asm_1127b7 + ld a, $50 + cp e + jr nz, .asm_1127b7 + ld a, $3 + ld [wc86a], a + ld hl, wc821 + ld a, [hl] + and $d6 + or $80 + ld [hl], a + xor a + ld [wc98a], a + ret + +.asm_1127b7 + ld hl, wc810 + ld a, e + ld [hli], a + ld [hl], d + ld a, $2 + ld [wc86b], a + jp Function112430 + +Function1127c5: + ld de, $000b + ld a, $95 + jp Function111f02 + +Function1127cd: + ld hl, wc810 + xor a + ld [hli], a + ld [hl], a + xor a + ld [wc86d], a + ld a, $30 + call Function11225d + set 1, [hl] + res 0, [hl] + ret + +Function1127e1: + call Function112807 + ld hl, wc832 + +Function1127e7: + ld a, [hli] + cp $d + ret nz + ld a, [hl] + cp $a + ret nz + ld a, $20 + ld [hl], a + ret + +Function1127f3: + call Function112807 + ld hl, wc82f + ld a, [hli] + cp $d + ret nz + ld a, [hli] + cp $a + ret nz + ld a, [hli] + cp $2e + ret nz + jr Function1127e7 + +Function112807: + push bc + push de + ld hl, wMobileSDK_ReceivePacketBuffer + 3 + ld a, [hl] + dec a + jr z, .asm_11282d + ld c, a + cp $5 + jr nc, .asm_112830 + ld a, $5 + sub c + ld b, a + ld e, c + ld d, $0 + ld hl, wc82f + add hl, de + ld de, wc82f + call MobileSDK_CopyBytes + ld hl, wMobileSDK_ReceivePacketBuffer + 5 + ld b, c +.asm_11282a + call MobileSDK_CopyBytes + +.asm_11282d + pop de + pop bc + ret + +.asm_112830 + sub $5 + ld c, a + ld b, 0 + ld hl, wMobileSDK_ReceivePacketBuffer + 5 + add hl, bc + ld b, $5 + ld de, wc82f + jr .asm_11282a + +Function112840: + dec a + jr z, .asm_112844 + ret + +.asm_112844 + call Function1127e1 + jr nz, .asm_1128ab + ld hl, wc880 + ld a, [hli] + cp $32 + jr nz, Function1128bd + ld a, [hli] + cp $35 + jr nz, Function1128bd + call Function112724 + ld hl, wc87c + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hl] + or a + jr z, .asm_11289d + push hl + ld hl, wc86b + dec [hl] + ld bc, $0001 + ld de, wMobileSDK_PacketBuffer + 19 + ld hl, Unknown_1120b0 + call MobileSDK_CopyString + pop hl + ld a, $80 + call MobileSDK_CopyStringLen + ld a, $3e + ld [de], a + inc de + inc c + ld a, l + ld [wc87c], a + ld a, h + ld [wc87d], a + call Function11295e + ld a, c + ld [wMobileSDK_PacketBuffer + 17], a + ld b, c + call Function111f63 + ld hl, wMobileSDK_PacketBuffer + 12 + ld d, $0 + ld e, c + ld a, $95 + jp Function111f02 + +.asm_11289d + ld a, $3 + ld [wc86a], a + call Function1128d3 + ld a, $1 + ld [wc98a], a + ret + +.asm_1128ab + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jp z, Function1127cd + ld hl, wc86b + dec [hl] + ld hl, wMobileSDK_PacketBuffer + jp Function1127c5 + +Function1128bd: + ld hl, wc880 + call Function112b11 + ld hl, wc810 + ld a, e + ld [hli], a + ld [hl], d + ld a, $30 + call Function11225d + set 1, [hl] + res 0, [hl] + ret + +Function1128d3: + ld hl, wc821 + res 0, [hl] + res 2, [hl] + ret + +Function1128db: + dec a + jr z, .asm_112947 + dec a + jr z, .asm_1128e5 + dec a + jr z, .asm_112913 + ret + +.asm_1128e5 + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jp z, Function1127cd + call Function113482 + ld a, [wc86e + 1] + or a + jr nz, .asm_112901 + ld a, $3 + ld [wc86a], a + ld hl, wc821 + res 0, [hl] + ret + +.asm_112901 + call Function112724 + ld de, wMobileSDK_PacketBuffer + 5 + ld a, $1 + ld [de], a + inc de + inc de + ld b, $1 + call Function111f63 + jr .asm_112941 + +.asm_112913 + call Function1127e1 + jr nz, .asm_11293d + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jp z, Function1127cd + ld hl, wc880 + call Function112b11 + ld a, d + cp $2 + jr nz, .asm_11295b + ld a, e + cp $50 + jr nz, .asm_11295b + ld a, $3 + ld [wc86a], a + call Function1128d3 + xor a + ld [wc98a], a + ret + +.asm_11293d + ld hl, wc86b + dec [hl] + +.asm_112941 + ld hl, wMobileSDK_PacketBuffer + jp Function1127c5 + +.asm_112947 + call Function1127e1 + jr nz, .asm_11293d + ld hl, wc880 + call Function112b11 + ld a, d + cp $3 + jr nz, .asm_11295b + ld a, e + cp $54 + ret z + +.asm_11295b + jp Function1128bd + +Function11295e: + ld a, $d + ld [de], a + inc de + inc c + ld a, $a + ld [de], a + inc de + inc c + ret + +Function112969: + dec a + jr z, .asm_112970 + dec a + jr z, .asm_112989 + ret + +.asm_112970 + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jr z, .asm_112986 + call Function1127e1 + jr z, .asm_112986 + ld hl, wc86b + dec [hl] + ld hl, wMobileSDK_PacketBuffer + 32 + jp Function1127c5 + +.asm_112986 + jp Function112430 + +.asm_112989 + xor a + ld [wc86d], a + ld a, $2 + ld [wc86a], a + ld hl, wc821 + res 0, [hl] + res 7, [hl] + set 5, [hl] + ret + +Function11299c: + dec a + jr z, .asm_1129aa + dec a + jr z, .asm_1129c9 + dec a + jr z, .asm_1129e7 + dec a + jp z, .asm_112a1d + ret + +.asm_1129aa + call Function1127e1 + jr nz, .asm_1129fe + ld a, [wc880] + cp $2b + jr nz, .asm_112a0f + call Function112724 + ld a, [wMobileSDK_PacketBuffer + 101] + add $a + ld e, a + ld d, 0 + ld a, $95 + ld hl, wMobileSDK_PacketBuffer + 96 + jp Function111f02 + +.asm_1129c9 + ld d, a + call Function1127e1 + jr nz, .asm_1129fe + ld a, [wc880] + cp $2b + jr nz, .asm_112a0f + call Function112724 + ld a, [wMobileSDK_PacketBuffer + 165] + add $a + ld e, a + ld a, $95 + ld hl, wMobileSDK_PacketBuffer + 160 + jp Function111f02 + +.asm_1129e7 + call Function1127e1 + jr nz, .asm_1129fe + ld a, [wc880] + cp $2b + jr nz, .asm_112a0f + ld a, $4 + ld [wc86a], a + call Function1128d3 + set 7, [hl] + ret + +.asm_1129fe + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jr z, Function112a42 + ld hl, wc86b + dec [hl] + ld hl, wMobileSDK_PacketBuffer + 128 + jp Function1127c5 + +.asm_112a0f + ld a, [wc86b] + ld [wMobileSDK_PacketBuffer + 32], a + ld a, $3 + ld [wc86b], a + jp Function112430 + +.asm_112a1d + xor a + ld [wc86d], a + ld de, $0002 + ld a, [wMobileSDK_PacketBuffer + 32] + cp $1 + jr z, .asm_112a2c + inc de +.asm_112a2c + +Function112a2c: + ld hl, wc821 + set 1, [hl] + res 0, [hl] + ld hl, wc80f + ld a, $31 + ld [hli], a + ld a, e + ld [hli], a + ld [hl], d + ld a, $5 + ld [wc86a], a + ret + +Function112a42: + ld hl, wc810 + xor a + ld [hli], a + ld [hl], a + xor a + ld [wc86d], a + ld a, $31 + call Function11225d + set 1, [hl] + res 0, [hl] + ret + +Function112a56: + dec a + jr z, .asm_112a5a + ret + +.asm_112a5a + call Function1127e1 + jr nz, .asm_112a95 + ld hl, wc880 + ld a, [hli] + cp $2b + jr nz, .asm_112aa6 +.asm_112a67 + ld a, [hli] + cp $20 + jr nz, .asm_112a67 + call Function112aac + ld a, [wc86e] + ld c, a + ld a, [wc86e + 1] + ld b, a + ld a, e + ld [bc], a + inc bc + ld a, d + ld [bc], a + call Function112aac + ld hl, wc86e + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld a, $4 + ld [wc86a], a + jp Function1128d3 + +.asm_112a95 + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jr z, Function112a42 + ld hl, wc86b + dec [hl] + ld hl, wMobileSDK_PacketBuffer + 128 + jp Function1127c5 + +.asm_112aa6 + ld de, $0005 + jp Function112a2c + +Function112aac: + ld a, [wc872] + push af + ld a, [wc873] + push af + ld a, [wc874] + push af + ld bc, 0 + ld de, 0 +.asm_112abe + ld a, [hli] + cp $d + jr z, .asm_112b04 + cp $20 + jr z, .asm_112b04 + and $f + ld b, a + sla e + rl d + rl c + ld a, e + ld [wc872], a + ld a, d + ld [wc873], a + ld a, c + ld [wc874], a + sla e + rl d + rl c + sla e + rl d + rl c + ld a, [wc872] + add e + ld e, a + ld a, [wc873] + adc d + ld d, a + ld a, [wc874] + adc c + ld c, a + ld a, b + add e + ld e, a + ld a, $0 + adc d + ld d, a + ld a, $0 + adc c + ld c, a + jr .asm_112abe + +.asm_112b04 + pop af + ld [wc874], a + pop af + ld [wc873], a + pop af + ld [wc872], a + ret + +Function112b11: + ld a, [wc872] + push af + ld a, [wc873] + push af + ld a, [wc874] + push af + ld bc, $0300 + ld de, wc872 + call .asm_112b60 + call nc, .asm_112b60 + call nc, .asm_112b60 + dec hl +.asm_112b2d + ld a, [hli] + cp "\r" + jr z, .asm_112b36 + cp " " + jr nz, .asm_112b2d + +.asm_112b36 + push hl + ld hl, wc872 + ld de, 0 + ld a, b + or a + jr z, .asm_112b49 + dec a + jr z, .asm_112b4b + dec a + jr z, .asm_112b4f + jr .asm_112b52 + +.asm_112b49 + ld a, [hli] + ld d, a + +.asm_112b4b + ld a, [hli] + swap a + ld e, a + +.asm_112b4f + ld a, [hli] + or e + ld e, a + +.asm_112b52 + pop hl + pop af + ld [wc874], a + pop af + ld [wc873], a + pop af + ld [wc872], a + ret + +.asm_112b60: + ld a, [hli] + cp "0" + jr c, .asm_112b6f + cp "9" + 1 + jr nc, .asm_112b6f + and $f + ld [de], a + inc de + dec b + ret + +.asm_112b6f + scf + ret + +Function112b71: + dec a + jr z, .asm_112b75 + ret + +.asm_112b75 + call Function1127e1 + jr nz, .asm_112ba3 + ld hl, wc880 + ld a, [hli] + cp $2b + jr nz, .asm_112bb5 +.asm_112b82 + ld a, [hli] + cp $20 + jr nz, .asm_112b82 +.asm_112b87 + ld a, [hli] + cp $20 + jr nz, .asm_112b87 + call Function112aac + ld hl, wc86e + ld a, [hli] + ld h, [hl] + ld l, a + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, c + ld [hli], a + ld a, $4 + ld [wc86a], a + jp Function1128d3 + +.asm_112ba3 + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jp z, Function112a42 + ld hl, wc86b + dec [hl] + ld hl, wMobileSDK_PacketBuffer + 128 + jp Function1127c5 + +.asm_112bb5 + ld de, $0004 + jp Function112a2c + +Function112bbb: + dec a + jr z, .asm_112bbf + ret + +.asm_112bbf + call Function1127e1 + jr nz, .asm_112bd4 + ld hl, wc880 + ld a, [hli] + cp $2b + jr nz, .asm_112be6 + ld a, $4 + ld [wc86a], a + jp Function1128d3 + +.asm_112bd4 + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jp z, Function112a42 + ld hl, wc86b + dec [hl] + ld hl, wMobileSDK_PacketBuffer + 128 + jp Function1127c5 + +.asm_112be6 + ld de, $0004 + jp Function112a2c + +Function112bec: + dec a + jr z, .asm_112bf7 + dec a + jp z, .asm_112cdb + dec a + ret nz + dec [hl] + ret + +.asm_112bf7 + ld a, [wc880] + cp $2d + jr nz, .asm_112c03 + call Function1127e1 + jr z, .asm_112c0b + +.asm_112c03 + ld a, [wc821] + bit 2, a + jp z, .asm_112cef + +.asm_112c0b + ld hl, wc86b + inc [hl] + ld hl, wc880 + ld a, [hli] + cp $2b + jp nz, Function112d20 + ld b, $7f +.asm_112c1a + ld a, [hli] + dec b + cp $a + jr nz, .asm_112c1a + push hl + ld hl, wc98f + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, b + ld [wc82d], a + ld a, [hli] + ld h, [hl] + sub b + ld l, a + ld a, h + sbc $0 + ld h, a + jr nc, .asm_112c56 + cp $ff + jr nz, .asm_112c56 + ld hl, wc991 + ld a, [hli] + ld c, a + inc hl + ld a, b + sub c + ld [hli], a + ld a, [wc82b] + ld [hl], a + ld hl, wc827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, c + ld [hli], a + xor a + ld [hl], a + pop hl + ld b, c + jp MobileSDK_CopyBytes + +.asm_112c56 + ld [wc993], a + ld a, [wc82b] + ld c, a + ld [wc994], a + push hl + ld a, l + sub c + ld l, a + ld a, h + sbc $0 + ld h, a + jr nc, .asm_112c9f + cp $ff + jr nz, .asm_112c9f + ld a, c + ld [wMobileSDK_ReceivePacketBuffer + 1], a + ld a, [wMobileSDK_ReceivePacketBuffer + 3] + sub c + pop hl + ld c, l + pop hl + push af + call MobileSDK_CopyBytes + pop af + push de + ld hl, wMobileSDK_ReceivePacketBuffer + 4 + ld e, a + ld d, 0 + add hl, de + pop de + ld b, c + call MobileSDK_CopyBytes + ld a, [wMobileSDK_ReceivePacketBuffer + 1] + sub c + ld [wc994], a + ld hl, wc827 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wc991] + ld [hli], a + xor a + ld [hl], a + ret + +.asm_112c9f + ld [wc994], a + ld a, l + ld [wc82b], a + ld a, h + ld [wc82c], a + pop hl + pop hl + call MobileSDK_CopyBytes + ld a, [wMobileSDK_ReceivePacketBuffer + 3] + sub c + push de + ld hl, wMobileSDK_ReceivePacketBuffer + 4 + ld e, a + ld d, 0 + add hl, de + pop de + ld b, c + call MobileSDK_CopyBytes + ld a, [wc82d] + add c + ld [wc82d], a + ld a, [wc82e] + adc 0 + ld [wc82e], a + ld hl, wc829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ld hl, wc821 + res 2, [hl] + +.asm_112cdb + ld a, [wc821] + bit 2, a + jr z, .asm_112cea + ld a, $2 + ld [wc86b], a + jp .asm_112d09 + +.asm_112cea + call Function1127f3 + jr z, .asm_112d01 + +.asm_112cef + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jp z, Function112a42 + ld hl, wc86b + dec [hl] + ld hl, wMobileSDK_PacketBuffer + 128 + jp Function1127c5 + +.asm_112d01 + ld a, $4 + ld [wc86a], a + call Function1128d3 + +.asm_112d09 + ld a, [wc86e] + ld l, a + ld a, [wc86e + 1] + or l + ret z + ld hl, wc827 + ld a, [hli] + ld e, a + ld d, [hl] + ld hl, wc82d + ld b, $2 + jp MobileSDK_CopyBytes + +Function112d20: + ld a, [wc86a] + cp $1a + jr nz, .asm_112d2d + ld de, $0004 + jp Function112a2c + +.asm_112d2d + ld de, $0004 + jp Function112a2c + +Function112d33: + dec a + jr z, .asm_112d87 + dec a + jr z, .asm_112d9f + dec a + jp z, .asm_112e46 + dec a + jr z, .asm_112d4d + dec a + jp z, Function113317 + dec a + jp z, Function113386 + dec a + jp .asm_112e46 + +.asm_112d4c ; unreferenced + ret + +.asm_112d4d + ld a, [wc86a] + cp $23 + jr z, .asm_112d6d + cp $1f + jr z, .asm_112d60 + cp $20 + jr z, .asm_112d6d + cp $22 + jr nz, .asm_112d82 + +.asm_112d60 + ld hl, wc98b + ld a, [hli] + cp $1 + jr nz, .asm_112d82 + ld a, [hl] + cp $4 + jr nz, .asm_112d82 + +.asm_112d6d + ld hl, wc86e + xor a + ld [hli], a + ld [hl], a + ld hl, wc82b + ld [hli], a + ld [hl], a + ld hl, wc821 + res 2, [hl] + ld hl, wc86b + dec [hl] + dec [hl] + +.asm_112d82 + ld hl, wc86b + dec [hl] + ret + +.asm_112d87 + call Function113482 + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $6 + call MobileSDK_CopyBytes + ld a, [wc86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + +.asm_112d9f + ld a, [wc821] + bit 2, a + jr z, .asm_112dab + ld a, $3 + ld [hl], a + jr .asm_112dc1 + +.asm_112dab + ld a, [wMobileSDK_ReceivePacketBuffer] + cp MOBILE_COMMAND_TRANSFER_DATA_END | $80 + jr z, .asm_112dc1 + ld hl, wc86b + dec [hl] + ld de, $000b + ld hl, wMobileSDK_PacketBuffer + ld b, $5 + jp PacketSendBytes + +.asm_112dc1 + ld a, [wc989] + cp $2 + jr nc, .asm_112df2 + call Function112f61 + bit 2, a + ret nz + cp $3 + jr z, .asm_112e38 + cp $1 + jr nz, .asm_112df2 + ld a, [wc86a] + cp $1f + jr z, .asm_112de1 + cp $20 + jr nz, .asm_112df2 + +.asm_112de1 + ld hl, wc98b + ld a, [hli] + cp $1 + jr nz, .asm_112df2 + ld a, $4 + cp [hl] + jr nz, .asm_112df2 + xor a + ld [wc990], a + +.asm_112df2 + ld a, [wc86e] + ld l, a + ld a, [wc86e + 1] + or l + ret z + ld a, [wc86a] + cp $13 + jr z, .asm_112e21 + cp $14 + jr z, .asm_112e21 + cp $20 + ret z + cp $22 + ret z + cp $23 + ret z + cp $1f + jr nz, .asm_112e21 + ld hl, wc98b + ld a, [hli] + cp $0 + ret nz + ld a, $2 + cp [hl] + ret nz + ld a, [wc86a] + +.asm_112e21 + cp $24 + jr nz, .asm_112e2a + ld hl, wc878 + jr .asm_112e2d + +.asm_112e2a + ld hl, wc827 + +.asm_112e2d + ld a, [hli] + ld e, a + ld d, [hl] + ld hl, wc82d + ld b, $2 + jp MobileSDK_CopyBytes + +.asm_112e38 + ld hl, wc821 + set 1, [hl] + res 0, [hl] + ld de, wc98b + ld a, $24 + jr .asm_112e95 + +.asm_112e46 + ld a, [wc86a] + cp $1f + jr z, .asm_112ea6 + cp $20 + jr z, .asm_112ea6 + ld a, [wc98a] + cp $1 + jr z, .asm_112e65 + ld a, [wc86a] + cp $21 + jp z, .asm_112eea + cp $22 + jp z, .asm_112eea + +.asm_112e65 + ld a, [wc990] + or a + jp z, .asm_112f3d +.asm_112e6c + ld hl, wc98c + ld a, [hld] + cp $3 + jr nz, .asm_112e7f + ld a, [hl] + or a + jr z, .asm_112e7f + cp $3 + jr nc, .asm_112e7f + call Function1133fe + +.asm_112e7f + ld hl, wc821 + set 1, [hl] + res 0, [hl] + ld de, wc98b + ld a, [wc990] + cp $1 + ld a, $32 + jr z, .asm_112e95 + inc de + inc de + inc a + +.asm_112e95 + ld [wc80f], a + ld hl, wc810 + ld a, [de] + inc de + ld [hli], a + ld a, [de] + ld [hl], a + ld a, $5 + ld [wc86a], a + ret + +.asm_112ea6 + ld hl, wc98b + ld a, [hli] + ld h, [hl] + ld l, a + cp $0 + jr nz, .asm_112ec1 + ld a, $2 + cp h + jr nz, .asm_112ec1 + ld a, [wc98d] + ld b, a + ld a, [wc98e] + or b + jr nz, .asm_112e6c + jr .asm_112f3d + +.asm_112ec1 + ld a, $1 + cp l + jr nz, .asm_112e6c + ld a, $4 + cp h + jr nz, .asm_112e6c + ld a, [wc9a5] + or a + jr nz, .asm_112efb + ld a, [wc86e] + ld l, a + ld a, [wc86e + 1] + or l + jr nz, .asm_112efb + ld a, $2 + ld [wc86a], a + xor a + ld [wc86d], a + ld hl, wc821 + res 0, [hl] + ret + +.asm_112eea + ld hl, wc98b + ld a, [hli] + ld h, [hl] + ld l, a + cp $0 + jp nz, .asm_112e6c + ld a, $2 + cp h + jp nz, .asm_112e6c + +.asm_112efb + ld a, [wc98d] + ld b, a + ld a, [wc98e] + cp b + jp nz, .asm_112e6c + or a + jr z, .asm_112f13 + cp $1 + jp nz, .asm_112e6c + ld a, $1 + ld [wc993], a + +.asm_112f13 + ld a, [wc86b] + cp $7 + jr z, .asm_112f3d + ld hl, wc98f + inc [hl] + ld a, $f + ld [wc86a], a + ld a, $1 + ld [wc86b], a + ld a, [wc86d] + ld [wc86e], a + xor a + ld [wc989], a + ld a, $a3 + ld de, $0010 + ld hl, wc995 + jp Function111f02 + +.asm_112f3d + ld a, [wc993] + cp $1 + jr nz, .asm_112f52 + ld a, $2 + ld [wc990], a + ld hl, wc98d + dec a + ld [hli], a + ld [hl], a + jp .asm_112e7f + +.asm_112f52 + ld a, $2 + ld [wc86a], a + xor a + ld [wc86d], a + ld hl, wc821 + res 0, [hl] + ret + +Function112f61: + ld hl, wc989 + ld a, [hl] + or a + jr nz, .asm_112f8a + inc [hl] + ld hl, wc880 + ld de, $0008 + add hl, de +.asm_112f70 + ld a, [hli] + cp $20 + jr z, .asm_112f70 + dec hl + ld d, $0 + cp $32 + jr z, .asm_112f7d + inc d + +.asm_112f7d + ld a, d + ld [wc990], a + call Function112b11 + ld hl, wc98b + ld a, e + ld [hli], a + ld [hl], d + +.asm_112f8a + ld hl, wc880 + ld a, [wc82d] + ld b, a + or a + jr nz, .asm_112fa1 + ld hl, wc98b + ld a, $0 + ld [hli], a + ld [hl], a + ld a, $1 + ld [wc990], a + ret + +.asm_112fa1 + call Function112fd5 + call Function113008 + call Function113026 + call Function113054 + call Function113167 + call Function113180 + call Function113268 + jr c, .asm_112fc9 + ld a, $d + cp [hl] + jr z, .asm_112fc2 + ld a, $a + cp [hl] + jr nz, .asm_112fa1 + +.asm_112fc2 + ld hl, wc990 + res 2, [hl] + jr .asm_112fce + +.asm_112fc9 + ld hl, wc990 + set 2, [hl] + +.asm_112fce + call Function11306b + ld a, [wc990] + ret + +Function112fd5: + ld de, Unknown_113001 + push hl + call Function113281 + jr nc, .asm_112fe0 + pop hl + ret + +.asm_112fe0 + pop de + push bc + push de + push hl + ld b, $0 +.asm_112fe6 + inc b + ld a, [hli] + cp $a + jr nz, .asm_112fe6 + pop hl + ld c, b + ld a, [wc833] + ld e, a + ld a, [wc834] + ld d, a + or e + jr z, .asm_112ffe + call MobileSDK_CopyBytes + xor a + ld [de], a + +.asm_112ffe + pop hl + pop bc + ret + +Unknown_113001: + db "date: ", 0 + +Function113008: + ld de, Unknown_1132a6 + push hl + call Function113273 + jr nc, .asm_113013 + pop hl + ret + +.asm_113013 + call Function112b11 + ld hl, wc98d + ld a, e + ld [hli], a + ld [hl], d + pop hl + ld a, d + or e + ret z + ld a, $2 + ld [wc990], a + ret + +Function113026: + ld de, Unknown_1132b2 + push hl + call Function113273 + jr nc, .asm_113031 + pop hl + ret + +.asm_113031 + pop hl + push bc + push hl + push hl + ld b, $0 +.asm_113037 + inc b + ld a, [hli] + cp $a + jr nz, .asm_113037 + pop hl + ld c, b + ld de, wMobileSDK_PacketBuffer + 18 + call MobileSDK_CopyBytes + ld hl, wMobileSDK_PacketBuffer + 18 + ld de, wc9b5 + ld b, c + call MobileSDK_CopyBytes + xor a + ld [de], a + pop hl + pop bc + ret + +Function113054: + ld de, Unknown_1132bf + push hl + call Function113273 + jr nc, .asm_11305f + pop hl + ret + +.asm_11305f + push bc + ld de, wc9b5 + ld b, $30 + call Function1136c1 + pop bc + pop hl + ret + +Function11306b: + ld hl, wc880 + ld a, [wc82d] + ld b, a + +Function113072: + call Function113268 + jp nc, Function113089 + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jp nz, Function1131a9 + push hl + ld hl, wc990 + res 2, [hl] + pop hl + jr Function113095 + +Function113089: + ld a, [hl] + cp $d + jr z, .asm_113094 + cp $a + jr z, Function113095 + jr Function113072 + +.asm_113094 + inc hl + +Function113095: + inc hl + push bc + ld a, [wc872] + ld b, a + ld a, [wc873] + or b + pop bc + jr z, .asm_1130b3 + ld a, [wc86a] + cp $23 + jr z, .asm_1130b3 + cp $20 + jr z, .asm_1130b3 + cp $22 + jr z, .asm_1130b3 + jr .asm_1130d6 + +.asm_1130b3 + xor a + ld hl, wc86e + ld [hli], a + ld [hl], a + ld hl, wc821 + res 2, [hl] + ld a, [wc86a] + cp $13 + jr z, .asm_1130c8 + cp $14 + ret nz + +.asm_1130c8 + ld a, $6 + ld [wc86b], a + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + ret z + jp Function112430 + +.asm_1130d6 + ld a, [wc82b] + ld c, a + dec b + dec b + ld a, b + ld [wc82d], a + jr z, .asm_11310d + ld a, [wc873] + ld d, a + ld a, [wc872] + ld e, a + dec de + dec de + xor a + or d + jr nz, .asm_1130f5 + ld a, e + cp b + jp c, Function113206 + +.asm_1130f5 + ld a, e + sub b + ld [wc82b], a + ld a, d + sbc $0 + ld [wc82c], a + ld a, [wc874] + ld e, a + ld a, [wc875] + ld d, a + inc de + inc de + call MobileSDK_CopyBytes + +.asm_11310d + ld a, [wMobileSDK_ReceivePacketBuffer] + cp $9f + jr z, .asm_113150 + ld a, [wMobileSDK_ReceivePacketBuffer + 3] + or a + jr z, .asm_113150 + ld l, c + sub c + ld c, a + ld a, l + ld hl, wMobileSDK_ReceivePacketBuffer + 4 + add hl, bc + ld b, a + push de + ld a, [wc82b] + ld e, a + ld a, [wc82c] + ld d, a + xor a + or d + jr nz, .asm_113135 + ld a, e + cp b + jp c, Function113245 + +.asm_113135 + pop de + push hl + ld hl, wc82d + ld a, [hl] + add b + ld [hli], a + ld a, [hl] + adc 0 + ld [hl], a + ld c, b + pop hl + call MobileSDK_CopyBytes + ld hl, wc82b + ld a, [hl] + sub c + ld [hli], a + ld a, [hl] + sbc $0 + ld [hl], a + +.asm_113150 + ld hl, wc829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ld hl, wc821 + res 2, [hl] + ld a, $1 + ld [wc86b], a + ld a, $2 + ld [wc989], a + ret + +Function113167: + ld de, Unknown_1132ff + push hl + call Function113273 + jr nc, .asm_113172 + pop hl + ret + +.asm_113172 + pop de + push bc + push de + push hl + ld b, $0 +.asm_113178 + inc b + ld a, [hli] + cp $a + jr nz, .asm_113178 + jr Function113197 + +Function113180: + ld de, Unknown_11330c + push hl + call Function113273 + jr nc, .asm_11318b + pop hl + ret + +.asm_11318b + pop de + push bc + push de + push hl + ld b, $0 +.asm_113191 + inc b + ld a, [hli] + cp $a + jr nz, .asm_113191 + +Function113197: + pop hl + ld c, b + ld de, wMobileSDK_PacketBuffer + 16 + ld a, b + ld [de], a + inc de + dec b + dec b + call MobileSDK_CopyBytes + xor a + ld [de], a + pop hl + pop bc + ret + +Function1131a9: + ld hl, wc979 + ld de, wc880 + ld b, $0 + ld c, b + ld a, [hl] + cp $a + jr z, .asm_1131c4 +.asm_1131b7 + ld a, [hld] + inc b + cp $a + jr nz, .asm_1131b7 + inc hl + inc hl + dec b + ld c, b + call MobileSDK_CopyBytes + +.asm_1131c4 + ld a, [wc82b] + ld b, a + add c + ld c, a + push bc + ld a, $ff + sub b + ld c, a + ld b, 0 + ld hl, wMobileSDK_ReceivePacketBuffer + 4 + add hl, bc + pop bc + call MobileSDK_CopyBytes + ld a, c + ld [wc82d], a + ld a, $fa + sub c + ld [wc82b], a + ld hl, wc829 + ld a, e + ld [hli], a + ld a, d + ld [hl], a + ld l, e + ld h, d + ld de, wc97a +.asm_1131ef + xor a + ld [hli], a + ld a, l + cp e + jr nz, .asm_1131ef + ld a, d + cp h + jr nz, .asm_1131ef + ld hl, wc821 + res 2, [hl] + ld hl, wc86b + dec [hl] + dec [hl] + ld a, $4 + ret + +Function113206: + ld a, b + sub e + ld [wc991], a + ld a, [wc821] + bit 2, a + ld a, c + jr nz, .asm_113214 + xor a + +.asm_113214 + ld [wc992], a + ld b, e + ld c, e + ld a, [wc874] + ld e, a + ld a, [wc875] + ld d, a + inc de + inc de + call MobileSDK_CopyBytes + ld a, [wc991] + ld [wc993], a + ld b, a + ld de, wc880 + call MobileSDK_CopyBytes + ld hl, wc82d + ld a, c + ld [hli], a + xor a + ld [hl], a + ld hl, wc821 + set 2, [hl] + ld a, $3 + ld [wc86b], a + ret + +Function113245: + ld a, b + sub e + ld [wc992], a + ld [wc82b], a + ld b, e + ld c, e + pop de + call MobileSDK_CopyBytes + ld hl, wc82d + ld a, c + add [hl] + ld [hli], a + ld a, $0 + adc [hl] + ld [hl], a + ld hl, wc821 + set 2, [hl] + ld a, $3 + ld [wc86b], a + ret + +Function113268: +.asm_113268 + dec b + ld a, [hli] + cp $a + ret z + xor a + or b + jr nz, .asm_113268 + scf + ret + +Function113273: + ld c, $0 +.asm_113275 + ld a, [de] + inc de + or a + ret z + xor [hl] + inc hl + or c + ld c, a + jr z, .asm_113275 + scf + ret + +Function113281: + ld c, $0 + push hl + ld l, e + ld h, d + pop de +.asm_113287 + ld a, [de] + inc de + call Function11329d + xor [hl] + inc hl + or c + ld c, a + xor a + cp [hl] + jr z, .asm_113298 + cp c + jr z, .asm_113287 + scf + +.asm_113298 + push hl + ld l, e + ld h, d + pop de + ret + +Function11329d: + cp $41 + ret c + cp $5b + ret nc + or $20 + ret + +Unknown_1132a6: + db "Gb-Status: ", 0 +Unknown_1132b2: + db "Gb-Auth-ID: ", 0 +Unknown_1132bf: + db "WWW-Authenticate: GB00 name=", $22, 0 +Unknown_1132dd: + db "Content-Type: application/x-cgb", $d, "\n", 0 +Unknown_1132ff: + db "URI-header: ", 0 +Unknown_11330c: + db "Location: ", 0 + +Function113317: + ld a, $1 + ld [wc86b], a + ld de, wMobileSDK_PacketBuffer + 18 + ld a, [wc86c] + ld [de], a + inc de + ld bc, $0001 + call Function1126b0 + ld hl, Unknown_1132dd + ld a, [wc9a5] + or a + call nz, MobileSDK_CopyString + ld a, [wc86a] + cp $22 + jr nz, .asm_113344 + ld a, [wc98a] + cp $2 + jr nz, .asm_113351 + jr .asm_113348 + +.asm_113344 + cp $24 + jr nz, .asm_113351 + +.asm_113348 + ld a, [wc9a5] + or a + jr z, .asm_11336a + call Function1133de + +.asm_113351 + ld hl, wc9b5 + call MobileSDK_CopyString + call Function1126b6 + ld a, c + ld [wMobileSDK_PacketBuffer + 17], a + ld b, c + call Function111f63 + ld a, $95 + ld hl, wMobileSDK_PacketBuffer + 12 + jp Function111f02 + +.asm_11336a + ld hl, Unknown_113372 + call MobileSDK_CopyString + jr .asm_113351 + +Unknown_113372: + db "Content-Length: 0", $d, "\n", 0 + +Function113386: + call Function113482 + ld a, $1 + ld [wc86b], a + ld de, wMobileSDK_PacketBuffer + ld hl, MobilePacket_TransferData + ld b, $6 + call MobileSDK_CopyBytes + ld a, [wc86c] + ld [de], a + inc de + ld b, $1 + call Function111f63 + ld de, wMobileSDK_PacketBuffer + 12 + ld hl, MobilePacket_TransferData + ld b, $6 + call MobileSDK_CopyBytes + ld a, [wc86d] + cp $3 + jp nz, Function113317 + ld de, wMobileSDK_PacketBuffer + 18 + ld a, [wc86c] + ld [de], a + inc de + ld bc, $0001 + call Function1126b0 + ld a, [wc994] + or a + call nz, Function1133de + call Function1126b6 + ld a, c + ld [wMobileSDK_PacketBuffer + 17], a + ld b, c + call Function111f63 + ld a, $95 + ld hl, wMobileSDK_PacketBuffer + 12 + jp Function111f02 + +Function1133de: + call Function1126e6 + xor a + ld [wc86b], a + ld a, [wc9aa] + ld [wc87c], a + ld a, [wc9ab] + ld [wc87d], a + ld a, [wc9ac] + ld [wc87e], a + ld a, [wc9ad] + ld [wc87f], a + ret + +Function1133fe: + ld hl, wMobileSDK_PacketBuffer + 17 + ld a, [hli] + cp "h" + jr nz, .asm_113432 + ld a, [hli] + cp "t" + jr nz, .asm_113432 + ld a, [hli] + cp "t" + jr nz, .asm_113432 + ld a, [hli] + cp "p" + jr nz, .asm_113432 + ld a, [hli] + cp ":" + jr nz, .asm_113432 + ld a, [hli] + cp "/" + jr nz, .asm_113432 + ld a, [hli] + cp "/" + jr nz, .asm_113432 + ld hl, wMobileSDK_PacketBuffer + 16 + ld de, wc880 + ld a, [hli] + ld b, a + call MobileSDK_CopyBytes + xor a + ld [de], a + ret + +.asm_113432 + ld a, [wMobileSDK_PacketBuffer + 17] + cp "/" + jr z, .asm_113460 + ld de, wc880 + ld hl, wc9b5 + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + call MobileSDK_CopyString + ld l, e + ld h, d +.asm_11344c + ld a, [hld] + cp "/" + jr nz, .asm_11344c + inc hl + inc hl + ld e, l + ld d, h +.asm_113455 + ld hl, wMobileSDK_PacketBuffer + 16 + ld a, [hli] + ld b, a + call MobileSDK_CopyBytes + xor a + ld [de], a + ret + +.asm_113460 + ld de, wc880 + ld hl, wc9b5 + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hl] + cp "/" + jr z, .asm_113478 + ld b, $7 + call MobileSDK_CopyBytes + +.asm_113478 + ld a, [hli] + ld [de], a + inc de + cp "/" + jr nz, .asm_113478 + dec de + jr .asm_113455 + +Function113482: + ld hl, wc87f + ld a, [hld] + ld b, a + ld a, [hld] + ld c, a + ld a, b + or c + ret z + pop hl + ld hl, rSC + add hl, bc + jr c, .asm_113496 + xor a + ld l, a + ld h, a + +.asm_113496 + ld e, l + ld d, h + ld hl, wc87f + ld a, d + ld [hld], a + ld a, e + ld [hld], a + jr nc, .asm_1134a3 + ld c, $fe + +.asm_1134a3 + ld a, [hld] + ld l, [hl] + ld h, a + ld a, c + inc a + ld [wMobileSDK_PacketBuffer + 5], a + ld de, wMobileSDK_PacketBuffer + 7 + ld b, c + call MobileSDK_CopyBytes + ld a, l + ld [wc87c], a + ld a, h + ld [wc87d], a + ld b, c + inc b + call Function111f63 + ld hl, wc86b + dec [hl] + ld hl, wMobileSDK_PacketBuffer + ld a, $95 + jp Function111f02 + +Function1134cb: + dec a + jr z, .asm_1134d9 + dec a + jr z, .asm_1134f4 + dec a + jr z, .asm_1134fc + dec a + jr z, .asm_11350e + dec [hl] + ret + +.asm_1134d9 + ld a, [wMobileSDK_ReceivePacketBuffer + 4] + cp $0 + jr z, .asm_1134f0 + cp $ff + jr z, .asm_1134f0 + ld a, [wc985] + ld [wc86a], a + ld hl, wc821 + res 0, [hl] + ret + +.asm_1134f0 + inc [hl] + inc [hl] + jr .asm_1134fc + +.asm_1134f4 + ld a, MOBILE_COMMAND_TELEPHONE_STATUS | $80 + ld hl, MobilePacket_TelephoneStatus + jp PacketSendEmptyBody + +.asm_1134fc + ld hl, wc86e + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wMobileSDK_ReceivePacketBuffer + 6] + cp $f0 + jr c, .asm_11350b + set 7, [hl] + +.asm_11350b + jp Mobile_EndSession + +.asm_11350e + ld a, [wc86a] + cp $1e + jp nz, Function112251 + jp Function1116a0 + +Function113519: + dec a + jr z, .asm_113527 + dec a + jr z, .asm_11352d + dec a + jr z, .asm_11353c + dec a + jr z, .asm_11353f + dec [hl] + ret + +.asm_113527 + ld hl, MobilePacket_ReadConfigurationDataPart1 + jp Function11236b + +.asm_11352d + ld hl, wc829 + ld a, LOW(wc8ca + 22) + ld [hli], a + ld a, HIGH(wc8ca + 22) + ld [hli], a + ld hl, MobilePacket_ReadConfigurationDataPart2 + jp Function11236b + +.asm_11353c + jp Mobile_EndSession + +.asm_11353f + ld hl, wc880 + ld a, [hli] + cp "M" + jr nz, .asm_113586 + ld a, [hld] + cp "A" + jr nz, .asm_113586 + ld b, $be + ld de, 0 +.asm_113551 + ld a, [hli] + add e + ld e, a + ld a, $0 + adc d + ld d, a + dec b + jr nz, .asm_113551 + ld a, [hli] + cp d + jr nz, .asm_11358a + ld a, [hl] + cp e + jr nz, .asm_11358a + ld a, [wc86e] + ld e, a + ld a, [wc86e + 1] + ld d, a + ld hl, .asm_11357e + push hl + ld a, [wc86a] + cp $25 + jr z, Function1135ba + cp $26 + jr z, Function11359d + cp $27 + jr z, Function1135ad +.asm_11357e + ld a, $1 + ld [wc835], a + jp Function1116a0 + +.asm_113586 + ld a, $25 + jr .asm_11358c + +.asm_11358a + ld a, $14 + +.asm_11358c + call Function11225d + jp Function1116a4 + +Function113592: + push de + ld l, e + ld h, d + xor a + ld [hl], a + inc de + call MobileSDK_CopyBytes + pop de + ret + +Function11359d: + ld b, $20 + call Function113592 + ld a, $21 + ld hl, wc88c + call MobileSDK_CopyStringLen + xor a + ld [de], a + ret + +Function1135ad: + ld b, $1e + call Function113592 + ld a, $1f + ld hl, wc8ac + jp MobileSDK_CopyStringLen + +Function1135ba: + ld b, $65 + call Function113592 + ld hl, wc8f6 + call Function1135eb + ld a, $11 + ld hl, wc8fe + call MobileSDK_CopyStringLen + inc de + ld hl, wc90e + call Function1135eb + ld a, $11 + ld hl, wc916 + call MobileSDK_CopyStringLen + inc de + ld hl, wc926 + call Function1135eb + ld a, $11 + ld hl, wc92e + jp MobileSDK_CopyStringLen + +Function1135eb: + ld b, $8 +.asm_1135ed + ld a, [hl] + swap a + and $f + cp $f + jr z, .asm_11361c + or $30 + cp $3a + call z, Function113620 + cp $3b + call z, Function113623 + ld [de], a + inc de + ld a, [hli] + and $f + cp $f + jr z, .asm_11361c + or $30 + cp $3a + call z, Function113620 + cp $3b + call z, Function113623 + ld [de], a + inc de + dec b + jr nz, .asm_1135ed + +.asm_11361c + xor a + ld [de], a + inc de + ret + +Function113620: + ld a, $23 + ret + +Function113623: + ld a, $2a + ret + +Function113626: + dec a + jr z, .asm_113634 + dec a + jr z, .asm_113639 + dec a + jr z, .asm_11366c + dec a + jr z, .asm_11366f + dec [hl] + ret + +.asm_113634 + ld b, $9a + jp Function11234b + +.asm_113639 + ld a, [wc882] + or a + jr nz, .asm_113642 + inc [hl] + jr .asm_11366c + +.asm_113642 + ld de, wMobileSDK_PacketBuffer + 5 + ld c, a + inc a + ld [de], a + inc de + ld a, $80 + ld [de], a + inc de + ld hl, wc880 + ld a, [hli] + ld h, [hl] + ld l, a + ld b, c + call MobileSDK_CopyBytes + ld b, c + inc b + call Function111f63 + ld a, [wMobileSDK_PacketBuffer + 5] + add $a + ld e, a + ld d, 0 + ld a, $9a + ld hl, wMobileSDK_PacketBuffer + jp Function111f02 + +.asm_11366c + jp Mobile_EndSession + +.asm_11366f + jp Function1116a0 + +Function113672: + dec a + jr z, .asm_113680 + dec a + jr z, .asm_113686 + dec a + jr z, .asm_1136bb + dec a + jr z, .asm_1136be + dec [hl] + ret + +.asm_113680 + ld hl, wMobileSDK_PacketBuffer + jp Function11236b + +.asm_113686 + ld a, [wc882] + or a + jr z, .asm_113693 + cp $81 + jr nc, .asm_113693 + inc [hl] + jr .asm_1136bb + +.asm_113693 + ld hl, wMobileSDK_PacketBuffer + 7 + sub $80 + ld [hld], a + ld a, $80 + ld [hl], a + ld de, wMobileSDK_PacketBuffer + 8 + ld b, $2 + call Function111f63 + ld hl, wc880 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, $0080 + add hl, de + ld e, h + ld a, l + ld hl, wc829 + ld [hli], a + ld [hl], e + ld hl, wMobileSDK_PacketBuffer + jp Function11236b + +.asm_1136bb + jp Mobile_EndSession + +.asm_1136be + jp Function1116a0 + +Function1136c1: + xor a + ld [wMobileSDK_PacketBuffer + 225], a + ld a, l + ld [wMobileSDK_PacketBuffer + 192], a + ld a, h + ld [wMobileSDK_PacketBuffer + 193], a + ld hl, wMobileSDK_PacketBuffer + 194 + ld a, e + ld [hli], a + ld a, d + ld [hli], a + ld a, b + ld [hli], a + ld hl, wMobileSDK_PacketBuffer + 192 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wMobileSDK_PacketBuffer + 32 + ld b, $30 + ld c, b + call MobileSDK_CopyBytes + ld hl, wc97f + ld a, [hli] + ld h, [hl] + ld l, a +.asm_1136eb + ld a, [hli] + or a + jr nz, .asm_1136eb + call MobileSDK_CopyString + ld a, $37 + cp c + inc a + jr nc, .asm_1136ff + ld a, $2 + ld [wMobileSDK_PacketBuffer + 225], a + ld a, $78 + +.asm_1136ff + sub c + ld b, a + ld a, $80 + ld [de], a + inc de + xor a +.asm_113706 + dec b + jr z, .asm_11370d + ld [de], a + inc de + jr .asm_113706 + +.asm_11370d + or a + sla c + rl b + sla c + rl b + sla c + rl b + ld a, c + ld [de], a + inc de + ld a, b + ld [de], a + inc de + ld l, e + ld h, d + ld b, $6 + xor a +.asm_113725 + ld [hli], a + dec b + jr nz, .asm_113725 + ld de, wMobileSDK_PacketBuffer + 160 + ld hl, Unknown_113b7e + ld b, $10 + call MobileSDK_CopyBytes + +.asm_113734 + ld hl, wMobileSDK_PacketBuffer + 197 + ld a, LOW(MD5_K_Table) + ld [hli], a + ld a, HIGH(MD5_K_Table) + ld [hl], a + ld hl, wMobileSDK_PacketBuffer + 199 + ld a, LOW(Unknown_113a70) + ld [hli], a + ld a, HIGH(Unknown_113a70) + ld [hl], a + ld hl, wMobileSDK_PacketBuffer + 160 + ld de, wMobileSDK_PacketBuffer + 209 + ld b, $10 + call MobileSDK_CopyBytes + +.asm_113751 + ld hl, wMobileSDK_PacketBuffer + 199 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hli] + ld c, a + push hl + call Function113909 + ld hl, wMobileSDK_PacketBuffer + 176 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 184 + call Function113a32 + pop hl + ld a, [hli] + ld d, [hl] + inc hl + ld e, a + push hl + ld a, [wMobileSDK_PacketBuffer + 225] + bit 0, a + jr z, .asm_11377c + ld hl, $0040 + add hl, de + ld e, l + ld d, h + +.asm_11377c + ld hl, wMobileSDK_PacketBuffer + 32 + add hl, de + ld e, l + ld d, h + ld hl, wMobileSDK_PacketBuffer + 184 + call Function113a32 + ld hl, wMobileSDK_PacketBuffer + 197 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 184 + call Function113a32 + pop hl + ld a, [hli] + ld b, a + ld a, l + ld [wMobileSDK_PacketBuffer + 199], a + ld a, h + ld [wMobileSDK_PacketBuffer + 200], a + ld hl, wMobileSDK_PacketBuffer + 184 + call Function113a40 + ld hl, wMobileSDK_PacketBuffer + 178 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 184 + call Function113a32 + ld hl, wMobileSDK_PacketBuffer + 176 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 184 + ld b, $4 + call MobileSDK_CopyBytes + ld hl, wMobileSDK_PacketBuffer + 197 + ld a, [hli] + ld h, [hl] + ld l, a +rept 4 + inc hl +endr + ld a, h + ld [wMobileSDK_PacketBuffer + 198], a + ld a, l + ld [wMobileSDK_PacketBuffer + 197], a + cp $8e ; LOW(MD5_K_Table + $100) ??? + jp nz, .asm_113751 + ld de, wMobileSDK_PacketBuffer + 209 + ld hl, wMobileSDK_PacketBuffer + 160 + call Function113a32 + ld de, wMobileSDK_PacketBuffer + 213 + call Function113a32 + ld de, wMobileSDK_PacketBuffer + 217 + call Function113a32 + ld de, wMobileSDK_PacketBuffer + 221 + call Function113a32 + ld hl, wMobileSDK_PacketBuffer + 225 + bit 1, [hl] + jr z, .asm_1137fc + dec [hl] + jp .asm_113734 + +.asm_1137fc + ld hl, wMobileSDK_PacketBuffer + 32 + ld de, wMobileSDK_PacketBuffer + 80 + ld bc, $0030 + call Function113d66 + ld hl, wMobileSDK_PacketBuffer + 194 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, Unknown_113a55 + call MobileSDK_CopyString + ld hl, wMobileSDK_PacketBuffer + 80 + ld bc, $0020 + call Function113c8e + ld a, l + ld [wMobileSDK_PacketBuffer + 194], a + ld a, h + ld [wMobileSDK_PacketBuffer + 195], a + ld b, $12 + ld hl, wMobileSDK_PacketBuffer + 80 + ld de, wMobileSDK_PacketBuffer + 32 +.asm_11382d + ld a, $40 + and [hl] + rlca + ld c, a + ld a, [hli] + bit 4, a + jr z, .asm_113839 + set 6, c + +.asm_113839 + bit 2, a + jr z, .asm_11383f + set 5, c + +.asm_11383f + bit 0, a + jr z, .asm_113845 + set 4, c + +.asm_113845 + ld a, [hli] + bit 6, a + jr z, .asm_11384c + set 3, c + +.asm_11384c + bit 4, a + jr z, .asm_113852 + set 2, c + +.asm_113852 + bit 2, a + jr z, .asm_113858 + set 1, c + +.asm_113858 + bit 0, a + jr z, .asm_11385e + set 0, c + +.asm_11385e + ld a, c + ld [de], a + inc de + dec b + jr nz, .asm_11382d + ld b, $12 + ld hl, wMobileSDK_PacketBuffer + 115 + ld de, wMobileSDK_PacketBuffer + 67 +.asm_11386c + ld a, $2 + and [hl] + rrca + ld c, a + ld a, [hld] + bit 3, a + jr z, .asm_113878 + set 1, c + +.asm_113878 + bit 5, a + jr z, .asm_11387e + set 2, c + +.asm_11387e + bit 7, a + jr z, .asm_113884 + set 3, c + +.asm_113884 + ld a, [hld] + bit 1, a + jr z, .asm_11388b + set 4, c + +.asm_11388b + bit 3, a + jr z, .asm_113891 + set 5, c + +.asm_113891 + bit 5, a + jr z, .asm_113897 + set 6, c + +.asm_113897 + bit 7, a + jr z, .asm_11389d + set 7, c + +.asm_11389d + ld a, c + ld [de], a + dec de + dec b + jr nz, .asm_11386c + ld b, $10 + ld de, wMobileSDK_PacketBuffer + 80 + ld hl, wMobileSDK_PacketBuffer + 160 + call MobileSDK_CopyBytes + ld bc, $0010 + ld hl, wc97f + ld a, [hli] + ld h, [hl] + ld l, a + call MobileSDK_CopyString + ld a, $24 + sub c + ld b, a + ld l, e + ld h, d + ld a, $ff +.asm_1138c2 + ld [hli], a + dec b + jr nz, .asm_1138c2 + xor a + ld [hl], a + ld b, $24 + ld hl, wMobileSDK_PacketBuffer + 32 + ld de, wMobileSDK_PacketBuffer + 80 +.asm_1138d0 + ld a, [de] + inc de + xor [hl] + ld c, $0 + bit 0, a + jr z, .asm_1138db + set 3, c + +.asm_1138db + bit 3, a + jr z, .asm_1138e1 + set 6, c + +.asm_1138e1 + bit 6, a + jr z, .asm_1138e7 + set 0, c + +.asm_1138e7 + and $b6 + or c + ld [hli], a + dec b + jr nz, .asm_1138d0 + ld hl, wMobileSDK_PacketBuffer + 194 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 32 + ld bc, $0024 + call Function113c8e + ld a, $22 + ld [hli], a + ld a, $d + ld [hli], a + ld a, $a + ld [hli], a + xor a + ld [hl], a + ret + +Function113909: + call Function11391e + ld a, c + and $f0 + swap a + or a + jr z, Function11392f + dec a + jr z, Function113973 + dec a + jp z, Function1139b7 + jp Function1139de + +Function11391e: + and $f + ld e, a + ld d, 0 + ld hl, Unknown_113b70 + add hl, de + ld de, wMobileSDK_PacketBuffer + 176 + ld b, $8 + jp MobileSDK_CopyBytes + +Function11392f: + ld hl, wMobileSDK_PacketBuffer + 178 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wMobileSDK_PacketBuffer + 184 + ld b, $4 + call MobileSDK_CopyBytes + ld hl, wMobileSDK_PacketBuffer + 180 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 184 + call Function113a0b + ld hl, wMobileSDK_PacketBuffer + 178 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wMobileSDK_PacketBuffer + 188 + ld b, $4 + call MobileSDK_CopyBytes + ld hl, wMobileSDK_PacketBuffer + 188 + call Function113a1f + ld hl, wMobileSDK_PacketBuffer + 182 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 188 + call Function113a0b + ld hl, wMobileSDK_PacketBuffer + 184 + ld de, wMobileSDK_PacketBuffer + 188 + call Function113a15 + ret + +Function113973: + ld hl, wMobileSDK_PacketBuffer + 178 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wMobileSDK_PacketBuffer + 184 + ld b, $4 + call MobileSDK_CopyBytes + ld hl, wMobileSDK_PacketBuffer + 182 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 184 + call Function113a0b + ld hl, wMobileSDK_PacketBuffer + 182 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wMobileSDK_PacketBuffer + 188 + ld b, $4 + call MobileSDK_CopyBytes + ld hl, wMobileSDK_PacketBuffer + 188 + call Function113a1f + ld hl, wMobileSDK_PacketBuffer + 180 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 188 + call Function113a0b + ld hl, wMobileSDK_PacketBuffer + 184 + ld de, wMobileSDK_PacketBuffer + 188 + call Function113a15 + ret + +Function1139b7: + ld hl, wMobileSDK_PacketBuffer + 178 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wMobileSDK_PacketBuffer + 184 + ld b, $4 + call MobileSDK_CopyBytes + ld hl, wMobileSDK_PacketBuffer + 180 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 184 + call Function113a28 + ld hl, wMobileSDK_PacketBuffer + 182 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 184 + call Function113a28 + ret + +Function1139de: + ld hl, wMobileSDK_PacketBuffer + 182 + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wMobileSDK_PacketBuffer + 184 + ld b, $4 + call MobileSDK_CopyBytes + ld hl, wMobileSDK_PacketBuffer + 184 + call Function113a1f + ld hl, wMobileSDK_PacketBuffer + 178 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 184 + call Function113a15 + ld hl, wMobileSDK_PacketBuffer + 180 + ld a, [hli] + ld d, [hl] + ld e, a + ld hl, wMobileSDK_PacketBuffer + 184 + call Function113a28 + ret + +Function113a0b: + ld b, $4 +.asm_113a0d + ld a, [de] + inc de + and [hl] + ld [hli], a + dec b + jr nz, .asm_113a0d + ret + +Function113a15: + ld b, $4 +.asm_113a17 + ld a, [de] + inc de + or [hl] + ld [hli], a + dec b + jr nz, .asm_113a17 + ret + +Function113a1f: + ld b, $4 +.asm_113a21 + ld a, [hl] + cpl + ld [hli], a + dec b + jr nz, .asm_113a21 + ret + +Function113a28: + ld b, $4 +.asm_113a2a + ld a, [de] + inc de + xor [hl] + ld [hli], a + dec b + jr nz, .asm_113a2a + ret + +Function113a32: + ld a, [de] + inc de + add [hl] + ld [hli], a + ld b, $3 +.asm_113a38 + ld a, [de] + inc de + adc [hl] + ld [hli], a + dec b + jr nz, .asm_113a38 + ret + +Function113a40: +.asm_113a40 + or a + push hl + ld a, [hli] + rla + ld a, [hl] + rla + ld [hli], a + ld a, [hl] + rla + ld [hli], a + ld a, [hl] + rla + ld [hl], a + pop hl + ld a, [hl] + rla + ld [hl], a + dec b + jr nz, .asm_113a40 + ret + +Unknown_113a55: + db "Authorization: GB00 name=", $22, 0 + +Unknown_113a70: + db $00, $00, $00, $07, $06, $04, $00, $0c, $04, $08, $00, $11, $02, $0c, $00, $16 + db $00, $10, $00, $07, $06, $14, $00, $0c, $04, $18, $00, $11, $02, $1c, $00, $16 + db $00, $20, $00, $07, $06, $24, $00, $0c, $04, $28, $00, $11, $02, $2c, $00, $16 + db $00, $30, $00, $07, $06, $34, $00, $0c, $04, $38, $00, $11, $02, $3c, $00, $16 + db $10, $04, $00, $05, $16, $18, $00, $09, $14, $2c, $00, $0e, $12, $00, $00, $14 + db $10, $14, $00, $05, $16, $28, $00, $09, $14, $3c, $00, $0e, $12, $10, $00, $14 + db $10, $24, $00, $05, $16, $38, $00, $09, $14, $0c, $00, $0e, $12, $20, $00, $14 + db $10, $34, $00, $05, $16, $08, $00, $09, $14, $1c, $00, $0e, $12, $30, $00, $14 + db $20, $14, $00, $04, $26, $20, $00, $0b, $24, $2c, $00, $10, $22, $38, $00, $17 + db $20, $04, $00, $04, $26, $10, $00, $0b, $24, $1c, $00, $10, $22, $28, $00, $17 + db $20, $34, $00, $04, $26, $00, $00, $0b, $24, $0c, $00, $10, $22, $18, $00, $17 + db $20, $24, $00, $04, $26, $30, $00, $0b, $24, $3c, $00, $10, $22, $08, $00, $17 + db $30, $00, $00, $06, $36, $1c, $00, $0a, $34, $38, $00, $0f, $32, $14, $00, $15 + 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 + +Unknown_113b70: + dw wMobileSDK_PacketBuffer + 160 + dw wMobileSDK_PacketBuffer + 164 + dw wMobileSDK_PacketBuffer + 168 + dw wMobileSDK_PacketBuffer + 172 + dw wMobileSDK_PacketBuffer + 160 + dw wMobileSDK_PacketBuffer + 164 + dw wMobileSDK_PacketBuffer + 168 + +Unknown_113b7e: + db $01, $23, $45, $67, $89, $ab, $cd, $ef + db $fe, $dc, $ba, $98, $76, $54, $32, $10 + +MD5_K_Table: + dl $d76aa478, $e8c7b756, $242070db, $c1bdceee + dl $f57c0faf, $4787c62a, $a8304613, $fd469501 + dl $698098d8, $8b44f7af, $ffff5bb1, $895cd7be + dl $6b901122, $fd987193, $a679438e, $49b40821 + dl $f61e2562, $c040b340, $265e5a51, $e9b6c7aa + dl $d62f105d, $02441453, $d8a1e681, $e7d3fbc8 + dl $21e1cde6, $c33707d6, $f4d50d87, $455a14ed + dl $a9e3e905, $fcefa3f8, $676f02d9, $8d2a4c8a + dl $fffa3942, $8771f681, $6d9d6122, $fde5380c + dl $a4beea44, $4bdecfa9, $f6bb4b60, $bebfbc70 + dl $289b7ec6, $eaa127fa, $d4ef3085, $04881d05 + dl $d9d4d039, $e6db99e5, $1fa27cf8, $c4ac5665 + dl $f4292244, $432aff97, $ab9423a7, $fc93a039 + dl $655b59c3, $8f0ccc92, $ffeff47d, $85845dd1 + dl $6fa87e4f, $fe2ce6e0, $a3014314, $4e0811a1 + dl $f7537e82, $bd3af235, $2ad7d2bb, $eb86d391 + +Function113c8e: + ld a, c + ld [wMobileSDK_PacketBuffer + 201], a + ld a, b + ld [wMobileSDK_PacketBuffer + 202], a + ld c, e + ld b, d + ld e, l + ld d, h + ld l, c + ld h, b + xor a + ld [wMobileSDK_PacketBuffer + 207], a + +.asm_113ca0 + ld b, $3 + push hl + ld hl, wMobileSDK_PacketBuffer + 203 +.asm_113ca6 + ld a, [de] + inc de + ld [hli], a + dec b + jr nz, .asm_113ca6 + ld a, [wMobileSDK_PacketBuffer + 201] + ld c, a + ld a, [wMobileSDK_PacketBuffer + 202] + ld b, a + xor a + or b + jr nz, .asm_113ccf + ld a, $2 + cp c + jr c, .asm_113ccf + push hl + dec hl + ld a, c + ld [wMobileSDK_PacketBuffer + 207], a +.asm_113cc3 + xor a + ld [hld], a + inc c + ld a, $3 + cp c + jr nz, .asm_113cc3 + pop hl + ld bc, $0003 + +.asm_113ccf + dec bc + dec bc + dec bc + ld a, c + ld [wMobileSDK_PacketBuffer + 201], a + ld a, b + ld [wMobileSDK_PacketBuffer + 202], a + push de + dec hl + ld c, [hl] + dec hl + ld b, [hl] + dec hl + ld a, [hl] + ld d, a + srl a + srl a + ld [hli], a + ld a, $3 + and d + ld d, a + ld a, $f0 + and b + or d + swap a + ld [hli], a + ld a, $f + and b + ld d, a + ld a, c + and $c0 + or d + rlca + rlca + ld [hli], a + ld a, $3f + and c + ld [hld], a + dec hl + dec hl + pop de + ld b, h + ld c, l + pop hl + ld a, [bc] + inc bc + call Function113d47 + ld [hli], a + ld a, [bc] + inc bc + call Function113d47 + ld [hli], a + ld a, [bc] + inc bc + call Function113d47 + ld [hli], a + ld a, [bc] + inc bc + call Function113d47 + ld [hli], a + ld a, [wMobileSDK_PacketBuffer + 201] + cp $0 + jp nz, .asm_113ca0 + ld a, [wMobileSDK_PacketBuffer + 202] + cp $0 + jp nz, .asm_113ca0 + ld a, [wMobileSDK_PacketBuffer + 207] + cp $0 + jr z, .asm_113d43 + push hl + dec hl + ld b, a +.asm_113d39 + ld a, $3d + ld [hld], a + inc b + ld a, $3 + cp b + jr nz, .asm_113d39 + pop hl + +.asm_113d43 + ld a, $0 + ld [hl], a + ret + +Function113d47: + cp $1a + jr c, .asm_113d5a + cp $34 + jr c, .asm_113d5d + cp $3e + jr c, .asm_113d60 + cp $3e + jr z, .asm_113d63 + ld a, $2f + ret + +.asm_113d5a + add $41 + ret + +.asm_113d5d + add $47 + ret + +.asm_113d60 + sub $4 + ret + +.asm_113d63 + ld a, $2b + ret + +Function113d66: + ld a, c + ld [wMobileSDK_PacketBuffer + 201], a + ld a, b + ld [wMobileSDK_PacketBuffer + 202], a + ld c, e + ld b, d + ld e, l + ld d, h + ld l, c + ld h, b +.asm_113d74 + ld a, [wMobileSDK_PacketBuffer + 202] + or a + jr nz, .asm_113d82 + ld a, [wMobileSDK_PacketBuffer + 201] + cp $4 + jp c, .asm_113e26 + +.asm_113d82 + ld b, $4 + push hl + ld hl, wMobileSDK_PacketBuffer + 203 +.asm_113d88 + ld a, [de] + inc de + call .decodeBase64Character + ld [hli], a + dec b + jr nz, .asm_113d88 + ld a, [wMobileSDK_PacketBuffer + 201] + ld c, a + ld a, [wMobileSDK_PacketBuffer + 202] + ld b, a +rept 4 + dec bc +endr + ld a, b + or c + jr z, .asm_113dae +.asm_113da1 + ld a, [de] + cp $d + jr z, .asm_113daa + cp $a + jr nz, .asm_113dae + +.asm_113daa + inc de + dec bc + jr .asm_113da1 + +.asm_113dae + ld a, c + ld [wMobileSDK_PacketBuffer + 201], a + ld a, b + ld [wMobileSDK_PacketBuffer + 202], a + push de + dec hl + ld d, [hl] + dec hl + ld c, [hl] + dec hl + ld b, [hl] + dec hl + ld a, [hl] + sla b + sla b + sla b + rla + sla b + rla + ld [hli], a + ld [hl], b + inc hl + rrc c + rrc c + ld [hl], c + dec hl + ld a, $f + and c + or [hl] + ld [hli], a + ld a, [hli] + and $c0 + or [hl] + dec hl + ld [hld], a + dec hl + pop de + ld b, h + ld c, l + pop hl + ld a, [bc] + ld [hli], a + inc bc + ld a, [bc] + ld [hli], a + inc bc + ld a, [bc] + ld [hli], a + ld a, [wMobileSDK_PacketBuffer + 201] + or a + jr nz, .asm_113d74 + ld a, [wMobileSDK_PacketBuffer + 202] + or a + jp nz, .asm_113d74 + xor a + ld [hl], a + ret + +.decodeBase64Character: + cp "+" + jr c, .asm_113e24 + jr z, .asm_113e31 + cp "/" + jr c, .asm_113e24 + jr z, .asm_113e34 + cp "0" + jr c, .asm_113e24 + cp "9" + 1 + jr c, .asm_113e37 + cp "=" + jr c, .asm_113e24 + jr z, .asm_113e3a + cp "A" + jr c, .asm_113e24 + cp "Z" + 1 + jr c, .asm_113e3c + cp "a" + jr c, .asm_113e24 + cp "z" + 1 + jr c, .asm_113e3f + +.asm_113e24 + pop hl + pop hl +.asm_113e26 + ld hl, wc821 + set 1, [hl] + ld a, $20 + ld [wc80f], a + ret + +.asm_113e31 + ld a, $3e + ret + +.asm_113e34 + ld a, $3f + ret + +.asm_113e37 + add $4 + ret + +.asm_113e3a + xor a + ret + +.asm_113e3c + sub $41 + ret + +.asm_113e3f + sub $47 + ret + +Function113e42: + dec a + jr z, .asm_113e4f + dec a + jr z, .asm_113e85 + dec a + jr z, .asm_113ea8 + dec a + jr z, .asm_113eb0 + ret + +.asm_113e4f + ld a, [wc807] + cp $8 + jr nz, .asm_113e58 +.asm_113e56 + dec [hl] + ret + +.asm_113e58 + xor a + ld [wc86d], a + ld a, $2 + ld [wc86a], a + ld hl, wc821 + ld a, [hl] + and $10 + set 5, a + ld [hl], a + jp Function113eb8 + +.asm_113e6d + ld a, [wc86d] + or a + ld a, [wMobileSDK_ReceivePacketBuffer] + jr z, .asm_113e81 + cp $9f + jr z, .asm_113e85 + cp $a4 + jr z, .asm_113e85 +.asm_113e7e + jp Function112430 + +.asm_113e81 + cp $a3 + jr z, .asm_113e7e + +.asm_113e85 + xor a + ld [wc86d], a + ld [wMobileSDK_SendCommandID], a + ld a, $2 + ld [wc86a], a + ld a, $3 + ld [wc807], a + ld hl, wc821 + ld a, [hl] + and $10 + set 5, a + ld [hl], a + ld hl, wc822 + bit 0, [hl] + call z, Function111f97 + ret + +.asm_113ea8 + ld a, [wc807] + cp $8 + jr z, .asm_113e56 + ret + +.asm_113eb0 + ld a, $1 + ld [wc86b], a + jp .asm_113e6d + +Function113eb8: + ld a, $ff + ld [wMobileSDK_SendCommandID], a + ld hl, wc822 + res 5, [hl] + res 0, [hl] + jp Function111f97 + +Function113ec7: ; unreferenced + ld hl, wc822 + ld a, [hl] + push af + res 3, [hl] + res 0, [hl] + ld hl, wc81a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld h, [hl] + ld l, a + inc hl + inc hl + ld a, [hld] + dec hl + xor $80 + ld [wMobileSDK_SendCommandID], a + ld b, $5 + call PacketSendBytes + pop af + bit 0, a + ret z + ld hl, wc822 + set 0, [hl] + ret + +Function113ef2: + dec a + jr z, .asm_113efa + dec a + jr z, .asm_113f03 + dec [hl] + ret + +.asm_113efa + ld a, [wc807] + cp $8 + jr nz, Function113eb8 + dec [hl] + ret + +.asm_113f03 + ld a, $26 + call Function11225d + ld a, $2a + ld [wc86a], a + ld hl, wc820 + ld a, [hld] + ld h, [hl] + ld l, a + ld e, l + ld d, h + add hl, de + add hl, de + ld e, l + ld d, h + ld hl, wc815 + ld e, a + ld [hli], a + ld a, d + ld [hl], a + xor a + ld [wc800], a + ld hl, wMobileSDK_PacketBuffer + ld a, $2 + ld [hli], a + dec a + ld [hl], a + ret + +Function113f2d: + dec a + jr z, .asm_113f35 + dec a + jr z, .asm_113f4f + dec [hl] + ret + +.asm_113f35 + ld a, [wc807] + cp $8 + jr nz, .asm_113f3e + dec [hl] + ret + +.asm_113f3e + xor a + ld [wMobileSDK_ReceivePacketBuffer], a + ld [wMobileSDK_ReceivePacketBufferAlt], a + ld a, [wMobileSDK_SendCommandID] + cp $91 + jr z, .asm_113f4f + jp Function113eb8 + +.asm_113f4f + xor a + ld [wc86d], a + ld hl, wc821 + set 0, [hl] + ld hl, wc822 + xor a + ld [hl], a + xor a + ld [wc80b], a + xor a + ld [wMobileSDK_PacketBuffer], a + ld hl, wc820 + ld a, [hld] + ld h, [hl] + ld l, a + ld e, l + ld d, h + add hl, de + add hl, de + ld e, l + ld d, h + ld hl, wc815 + ld e, a + ld [hli], a + ld a, d + ld [hl], a + xor a + ld [wc800], a + ld hl, wMobileSDK_PacketBuffer + xor a + ld [hli], a + inc a + ld [hl], a + ret diff --git a/macros/asserts.asm b/macros/asserts.asm new file mode 100644 index 0000000..f0fa52a --- /dev/null +++ b/macros/asserts.asm @@ -0,0 +1,65 @@ +; Macros to verify assumptions about the data or code + +MACRO table_width + DEF CURRENT_TABLE_WIDTH = \1 + if _NARG == 2 + REDEF CURRENT_TABLE_START EQUS "\2" + else + REDEF CURRENT_TABLE_START EQUS "._table_width\@" + {CURRENT_TABLE_START}: + endc +ENDM + +MACRO assert_table_length + DEF x = \1 + assert x * CURRENT_TABLE_WIDTH == @ - {CURRENT_TABLE_START}, \ + "{CURRENT_TABLE_START}: expected {d:x} entries, each {d:CURRENT_TABLE_WIDTH} bytes" +ENDM + +MACRO list_start + DEF list_index = 0 + if _NARG == 1 + REDEF CURRENT_LIST_START EQUS "\1" + else + REDEF CURRENT_LIST_START EQUS "._list_start\@" + {CURRENT_LIST_START}: + endc +ENDM + +MACRO li + assert !STRIN(\1, "@"), STRCAT("String terminator \"@\" in list entry: ", \1) + db \1, "@" + DEF list_index += 1 +ENDM + +MACRO assert_list_length + DEF x = \1 + assert x == list_index, \ + "{CURRENT_LIST_START}: expected {d:x} entries, got {d:list_index}" +ENDM + +MACRO def_grass_wildmons +;\1: map id + REDEF CURRENT_GRASS_WILDMONS_MAP EQUS "\1" + REDEF CURRENT_GRASS_WILDMONS_LABEL EQUS "._def_grass_wildmons_\1" +{CURRENT_GRASS_WILDMONS_LABEL}: + map_id \1 +ENDM + +MACRO end_grass_wildmons + assert GRASS_WILDDATA_LENGTH == @ - {CURRENT_GRASS_WILDMONS_LABEL}, \ + "def_grass_wildmons {CURRENT_GRASS_WILDMONS_MAP}: expected {d:GRASS_WILDDATA_LENGTH} bytes" +ENDM + +MACRO def_water_wildmons +;\1: map id + REDEF CURRENT_WATER_WILDMONS_MAP EQUS "\1" + REDEF CURRENT_WATER_WILDMONS_LABEL EQUS "._def_water_wildmons_\1" +{CURRENT_WATER_WILDMONS_LABEL}: + map_id \1 +ENDM + +MACRO end_water_wildmons + assert WATER_WILDDATA_LENGTH == @ - {CURRENT_WATER_WILDMONS_LABEL}, \ + "def_water_wildmons {CURRENT_WATER_WILDMONS_MAP}: expected {d:WATER_WILDDATA_LENGTH} bytes" +ENDM diff --git a/macros/code.asm b/macros/code.asm new file mode 100644 index 0000000..6856b1d --- /dev/null +++ b/macros/code.asm @@ -0,0 +1,96 @@ +; Syntactic sugar macros + +MACRO lb ; r, hi, lo + ld \1, ((\2) & $ff) << 8 | ((\3) & $ff) +ENDM + +MACRO ln ; r, hi, lo + ld \1, ((\2) & $f) << 4 | ((\3) & $f) +ENDM + +; Design patterns + +MACRO jumptable + ld a, [\2] + ld e, a + ld d, 0 + ld hl, \1 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl +ENDM + +MACRO maskbits +; masks just enough bits to cover values 0 to \1 - 1 +; \2 is an optional shift amount +; e.g. "maskbits 26" becomes "and %00011111" (since 26 - 1 = %00011001) +; and "maskbits 3, 2" becomes "and %00001100" (since "maskbits 3" becomes %00000011) +; example usage in rejection sampling: +; .loop +; call Random +; maskbits 26 +; cp 26 +; jr nc, .loop + assert 0 < (\1) && (\1) <= $100, "bitmask must be 8-bit" + DEF x = 1 + rept 8 + if x + 1 < (\1) + DEF x = (x << 1) | 1 + endc + endr + if _NARG == 2 + and x << (\2) + else + and x + endc +ENDM + +MACRO calc_sine_wave +; input: a = a signed 6-bit value +; output: a = d * sin(a * pi/32) + and %111111 + cp %100000 + jr nc, .negative\@ + call .apply\@ + ld a, h + ret +.negative\@ + and %011111 + call .apply\@ + ld a, h + xor $ff + inc a + ret +.apply\@ + ld e, a + ld a, d + ld d, 0 +if _NARG == 1 + ld hl, \1 +else + ld hl, .sinetable\@ +endc + add hl, de + add hl, de + ld e, [hl] + inc hl + ld d, [hl] + ld hl, 0 +.multiply\@ ; factor amplitude + srl a + jr nc, .even\@ + add hl, de +.even\@ + sla e + rl d + and a + jr nz, .multiply\@ + ret +if _NARG == 0 +.sinetable\@ + sine_table 32 +endc +ENDM diff --git a/macros/const.asm b/macros/const.asm new file mode 100644 index 0000000..4b7acdd --- /dev/null +++ b/macros/const.asm @@ -0,0 +1,48 @@ +; Enumerate constants + +MACRO const_def + if _NARG >= 1 + DEF const_value = \1 + else + DEF const_value = 0 + endc + if _NARG >= 2 + DEF const_inc = \2 + else + DEF const_inc = 1 + endc +ENDM + +MACRO const + DEF \1 EQU const_value + DEF const_value += const_inc +ENDM + +MACRO shift_const + DEF \1 EQU 1 << const_value + DEF const_value += const_inc +ENDM + +MACRO const_skip + if _NARG >= 1 + DEF const_value += const_inc * (\1) + else + DEF const_value += const_inc + endc +ENDM + +MACRO const_next + if (const_value > 0 && \1 < const_value) || (const_value < 0 && \1 > const_value) + fail "const_next cannot go backwards from {const_value} to \1" + else + DEF const_value = \1 + endc +ENDM + +MACRO rb_skip + if _NARG == 1 + rsset _RS + \1 + else + rsset _RS + 1 + endc +ENDM diff --git a/macros/coords.asm b/macros/coords.asm new file mode 100644 index 0000000..e899e68 --- /dev/null +++ b/macros/coords.asm @@ -0,0 +1,59 @@ +; Coordinate macros + +DEF hlcoord EQUS "coord hl," +DEF bccoord EQUS "coord bc," +DEF decoord EQUS "coord de," + +MACRO coord +; register, x, y[, origin] + if _NARG < 4 + ld \1, (\3) * SCREEN_WIDTH + (\2) + wTilemap + else + ld \1, (\3) * SCREEN_WIDTH + (\2) + \4 + endc +ENDM + +DEF hlbgcoord EQUS "bgcoord hl," +DEF bcbgcoord EQUS "bgcoord bc," +DEF debgcoord EQUS "bgcoord de," + +MACRO bgcoord +; register, x, y[, origin] + if _NARG < 4 + ld \1, (\3) * BG_MAP_WIDTH + (\2) + vBGMap0 + else + ld \1, (\3) * BG_MAP_WIDTH + (\2) + \4 + endc +ENDM + +MACRO dwcoord +; x, y + rept _NARG / 2 + dw (\2) * SCREEN_WIDTH + (\1) + wTilemap + shift 2 + endr +ENDM + +MACRO ldcoord_a +; x, y[, origin] + if _NARG < 3 + ld [(\2) * SCREEN_WIDTH + (\1) + wTilemap], a + else + ld [(\2) * SCREEN_WIDTH + (\1) + \3], a + endc +ENDM + +MACRO lda_coord +; x, y[, origin] + if _NARG < 3 + ld a, [(\2) * SCREEN_WIDTH + (\1) + wTilemap] + else + ld a, [(\2) * SCREEN_WIDTH + (\1) + \3] + endc +ENDM + +MACRO menu_coords +; x1, y1, x2, y2 + db \2, \1 ; start coords + db \4, \3 ; end coords +ENDM diff --git a/macros/data.asm b/macros/data.asm new file mode 100644 index 0000000..a113155 --- /dev/null +++ b/macros/data.asm @@ -0,0 +1,114 @@ +; Value macros + +; Many arbitrary percentages are simple base-10 or base-16 values: +; - 10 = 4 percent +; - 15 = 6 percent +; - $10 = 6 percent + 1 = 7 percent - 1 +; - 20 = 8 percent +; - 25 = 10 percent +; - 30 = 12 percent +; - 40 = 16 percent +; - 50 = 20 percent - 1 +; - 60 = 24 percent - 1 +; - 70 = 28 percent - 1 +; - 80 = 31 percent + 1 = 32 percent - 1 +; - 85 = 33 percent + 1 = 34 percent - 1 +; - 100 = 39 percent + 1 = 40 percent - 2 +; - 120 = 47 percent + 1 +; - 123 = 49 percent - 1 +; - 160 = 63 percent +; - 180 = 71 percent - 1 = 70 percent + 2 +; - 200 = 79 percent - 1 +; - 230 = 90 percent + 1 +DEF percent EQUS "* $ff / 100" + +; e.g. 1 out_of 2 == 50 percent + 1 == $80 +DEF out_of EQUS "* $100 /" + +MACRO assert_power_of_2 + assert (\1) & ((\1) - 1) == 0, "\1 must be a power of 2" +ENDM + +; Constant data (db, dw, dl) macros + +MACRO dwb + dw \1 + db \2 +ENDM + +MACRO dbw + db \1 + dw \2 +ENDM + +MACRO dbbbw + db \1, \2, \3 + dw \4 +ENDM + +MACRO dbwbb + db \1 + dw \2 + db \3, \4 +ENDM + +MACRO dbwbw + db \1 + dw \2 + db \3 + dw \4 +ENDM + +MACRO dn ; nybbles + rept _NARG / 2 + db ((\1) << 4) | (\2) + shift 2 + endr +ENDM + +MACRO dc ; "crumbs" + rept _NARG / 4 + db ((\1) << 6) | ((\2) << 4) | ((\3) << 2) | (\4) + shift 4 + endr +ENDM + +MACRO dt ; three-byte (big-endian) + db LOW((\1) >> 16), HIGH(\1), LOW(\1) +ENDM + +MACRO dd ; four-byte (big-endian) + db HIGH((\1) >> 16), LOW((\1) >> 16), HIGH(\1), LOW(\1) +ENDM + +MACRO bigdw ; big-endian word + db HIGH(\1), LOW(\1) +ENDM + +MACRO dba ; dbw bank, address + rept _NARG + dbw BANK(\1), \1 + shift + endr +ENDM + +MACRO dab ; dwb address, bank + rept _NARG + dwb \1, BANK(\1) + shift + endr +ENDM + +MACRO bcd + rept _NARG + dn ((\1) % 100) / 10, (\1) % 10 + shift + endr +ENDM + +MACRO sine_table +; \1 samples of sin(x) from x=0 to x<0.5 turns (pi radians) + for x, \1 + dw sin(x * 0.5 / (\1)) + endr +ENDM diff --git a/macros/farcall.asm b/macros/farcall.asm new file mode 100644 index 0000000..b884c8f --- /dev/null +++ b/macros/farcall.asm @@ -0,0 +1,23 @@ +; Far calls to another bank + +MACRO farcall ; bank, address + ld a, BANK(\1) + ld hl, \1 + rst FarCall +ENDM + +MACRO callfar ; address, bank + ld hl, \1 + ld a, BANK(\1) + rst FarCall +ENDM + +MACRO homecall + ldh a, [hROMBank] + push af + ld a, BANK(\1) + rst Bankswitch + call \1 + pop af + rst Bankswitch +ENDM diff --git a/macros/gfx.asm b/macros/gfx.asm new file mode 100644 index 0000000..630b131 --- /dev/null +++ b/macros/gfx.asm @@ -0,0 +1,60 @@ +; Graphics macros + +MACRO assert_valid_rgb + rept _NARG + assert 0 <= (\1) && (\1) <= 31, "RGB channel must be 0-31" + shift + endr +ENDM + +MACRO RGB + rept _NARG / 3 + assert_valid_rgb \1, \2, \3 + dw palred (\1) + palgreen (\2) + palblue (\3) + shift 3 + endr +ENDM + +DEF palred EQUS "(1 << 0) *" +DEF palgreen EQUS "(1 << 5) *" +DEF palblue EQUS "(1 << 10) *" + +DEF palettes EQUS "* PALETTE_SIZE" +DEF palette EQUS "+ PALETTE_SIZE *" +DEF color EQUS "+ PAL_COLOR_SIZE *" + +DEF tiles EQUS "* LEN_2BPP_TILE" +DEF tile EQUS "+ LEN_2BPP_TILE *" + +; extracts the middle two colors from a 2bpp binary palette +; example usage: +; INCBIN "foo.gbcpal", middle_colors +DEF middle_colors EQUS "PAL_COLOR_SIZE, PAL_COLOR_SIZE * 2" + +MACRO dbpixel + if _NARG >= 4 + ; x tile, y tile, x pixel, y pixel + db \1 * TILE_WIDTH + \3, \2 * TILE_WIDTH + \4 + else + ; x tile, y tile + db \1 * TILE_WIDTH, \2 * TILE_WIDTH + endc +ENDM + +MACRO ldpixel + if _NARG >= 5 + ; register, x tile, y tile, x pixel, y pixel + lb \1, \2 * TILE_WIDTH + \4, \3 * TILE_WIDTH + \5 + else + ; register, x tile, y tile + lb \1, \2 * TILE_WIDTH, \3 * TILE_WIDTH + endc +ENDM + +DEF depixel EQUS "ldpixel de," +DEF bcpixel EQUS "ldpixel bc," + +MACRO dbsprite +; x tile, y tile, x pixel, y pixel, vtile offset, attributes + db (\2 * TILE_WIDTH) % $100 + \4, (\1 * TILE_WIDTH) % $100 + \3, \5, \6 +ENDM diff --git a/macros/indirection.asm b/macros/indirection.asm new file mode 100644 index 0000000..03145cf --- /dev/null +++ b/macros/indirection.asm @@ -0,0 +1,76 @@ +DEF ___current_indirect_size = 0 + +; usage: +; Table: +; indirect_table , (0-1) +; indirect_entries , +; (repeat as many times as necessary) +; indirect_table_end + +MACRO indirect_table + ; arguments: entry size, initial index (0 or 1) + assert ((\2) * (\2)) == (\2), \ + "indirect table error: invalid initial index (must be 0 or 1)" + assert !___current_indirect_size, \ + "indirect table error: there's already an active indirect table" + assert (\1) > 0, \ + "indirect table error: the entry size must be positive" + assert (\1) <= $7FFF, \ + "indirect table error: entry size is set to an invalid value" + DEF ___current_indirect_index = \2 + DEF ___current_indirect_size = \1 + dw (\1) | ((\2) << 15) +ENDM + +MACRO indirect_entries + ; arguments: next max index, far label (omit for zero/no data), far bank (if different from label) + assert ___current_indirect_size != 0, \ + "indirect table error: there's no active indirect table" + assert (\1) >= ___current_indirect_index, \ + "indirect table error: attempted to move backwards" + DEF ___current_indirect_count = (\1) + 1 - ___current_indirect_index + DEF ___current_indirect_index = (\1) + 1 + DEF ___current_indirect_iteration_limit = ___current_indirect_count / $FF + DEF ___current_indirect_count = ___current_indirect_count % $FF + DEF ___current_indirect_count_total = ((___current_indirect_iteration_limit * $FF) + ___current_indirect_count) + if _NARG > 1 + assert (\2.IndirectEnd - \2) == ___current_indirect_size * ___current_indirect_count_total, \ + "\2: expected {d:___current_indirect_count_total} entries, each {d:___current_indirect_size} bytes" + endc + if ___current_indirect_iteration_limit + FOR ___current_indirect_iteration, ___current_indirect_iteration_limit + db $FF + if _NARG == 1 + db 0, 0, 0 + else + if _NARG == 2 + db BANK(\2) + else + db \3 + endc + dw (\2) + $FF * ___current_indirect_size * ___current_indirect_iteration + endc + endr + endc + if ___current_indirect_count + db ___current_indirect_count + if _NARG == 1 + db 0, 0, 0 + else + if _NARG == 2 + db BANK(\2) + else + db \3 + endc + dw (\2) + $FF * ___current_indirect_size * ___current_indirect_iteration_limit + endc + endc +ENDM + +MACRO indirect_table_end + ; no arguments + assert ___current_indirect_size != 0, \ + "indirect table error: there's no active indirect table" + db 0 + DEF ___current_indirect_size = 0 +ENDM diff --git a/macros/legacy.asm b/macros/legacy.asm new file mode 100644 index 0000000..68310da --- /dev/null +++ b/macros/legacy.asm @@ -0,0 +1,407 @@ +; Legacy support for old pokecrystal. +; Allows porting scripts with as few edits as possible. +; Legacy support not in this file can be found by looking for the keyword: "LEGACY" + +; macros/farcall.asm +DEF callba EQUS "farcall" +DEF callab EQUS "callfar" + +; macros/gfx.asm +MACRO dsprite + dbsprite \3, \1, \4, \2, \5, \6 +ENDM + +; macros/data.asm + +MACRO dbbw + db \1, \2 + dw \3 +ENDM + +MACRO dbww + db \1 + dw \2, \3 +ENDM + +MACRO dbwww + db \1 + dw \2, \3, \4 +ENDM + +; macros/scripts/audio.asm +DEF __ EQU 0 +DEF CC EQU 13 + +MACRO musicheader + channel_count \1 + channel \2, \3 +ENDM + +MACRO sound + note \1, \2 + db \3 + dw \4 +ENDM + +MACRO noise + note \1, \2 + db \3 + db \4 +ENDM + +MACRO notetype + if _NARG >= 2 + note_type \1, \2 >> 4, \2 & $0f + else + note_type \1 + endc +ENDM + +MACRO pitchoffset + transpose \1, \2 - 1 +ENDM + +DEF dutycycle EQUS "duty_cycle" + +MACRO intensity + volume_envelope \1 >> 4, \1 & $0f +ENDM + +MACRO soundinput + pitch_sweep \1 >> 4, \1 & $0f +ENDM + +DEF unknownmusic0xde EQUS "sound_duty" +MACRO sound_duty + db duty_cycle_pattern_cmd + if _NARG == 4 + db \1 | (\2 << 2) | (\3 << 4) | (\4 << 6) + else + db \1 + endc +ENDM + +DEF togglesfx EQUS "toggle_sfx" + +MACRO slidepitchto + pitch_slide \1, (8 - \2), \3 +ENDM + +DEF togglenoise EQUS "toggle_noise" + +MACRO panning + force_stereo_panning ((\1 >> 4) & 1), (\1 & 1) +ENDM + +DEF tone EQUS "pitch_offset" +DEF restartchannel EQUS "restart_channel" +DEF newsong EQUS "new_song" +DEF sfxpriorityon EQUS "sfx_priority_on" +DEF sfxpriorityoff EQUS "sfx_priority_off" + +MACRO stereopanning + stereo_panning ((\1 >> 4) & 1), (\1 & 1) +ENDM + +DEF sfxtogglenoise EQUS "sfx_toggle_noise" +DEF setcondition EQUS "set_condition" +DEF jumpif EQUS "sound_jump_if" +DEF jumpchannel EQUS "sound_jump" +DEF loopchannel EQUS "sound_loop" +DEF callchannel EQUS "sound_call" +DEF endchannel EQUS "sound_ret" + +; macros/scripts/events.asm + +DEF checkmorn EQUS "checktime MORN" +DEF checkday EQUS "checktime DAY" +DEF checknite EQUS "checktime NITE" + +DEF jump EQUS "sjump" +DEF farjump EQUS "farsjump" +DEF priorityjump EQUS "sdefer" +DEF prioritysjump EQUS "sdefer" +DEF ptcall EQUS "memcall" +DEF ptjump EQUS "memjump" +DEF ptpriorityjump EQUS "stopandsjump" +DEF ptcallasm EQUS "memcallasm" + +DEF if_equal EQUS "ifequal" +DEF if_not_equal EQUS "ifnotequal" +DEF if_greater_than EQUS "ifgreater" +DEF if_less_than EQUS "ifless" +DEF end_all EQUS "endall" +DEF return EQUS "endcallback" +DEF reloadandreturn EQUS "reloadend" + +DEF checkmaptriggers EQUS "checkmapscene" +DEF domaptrigger EQUS "setmapscene" +DEF checktriggers EQUS "checkscene" +DEF dotrigger EQUS "setscene" + +DEF faceperson EQUS "faceobject" +DEF moveperson EQUS "moveobject" +DEF writepersonxy EQUS "writeobjectxy" +DEF spriteface EQUS "turnobject" +DEF objectface EQUS "turnobject" +DEF applymovement2 EQUS "applymovementlasttalked" + +DEF writebyte EQUS "setval" +DEF addvar EQUS "addval" +DEF copybytetovar EQUS "readmem" +DEF copyvartobyte EQUS "writemem" +DEF checkcode EQUS "readvar" +DEF writevarcode EQUS "writevar" +DEF writecode EQUS "loadvar" + +DEF MEM_BUFFER_0 EQUS "STRING_BUFFER_3" +DEF MEM_BUFFER_1 EQUS "STRING_BUFFER_4" +DEF MEM_BUFFER_2 EQUS "STRING_BUFFER_5" + +DEF vartomem EQUS "getnum" +DEF mapnametotext EQUS "getcurlandmarkname" +DEF readcoins EQUS "getcoins" + +MACRO pokenamemem + getmonname \2, \1 +ENDM + +MACRO itemtotext + getitemname \2, \1 +ENDM + +MACRO landmarktotext + getlandmarkname \2, \1 +ENDM + +MACRO trainertotext + gettrainername \3, \1, \2 +ENDM + +MACRO trainerclassname + gettrainerclassname \2, \1 +ENDM + +MACRO name + getname \3, \1, \2 +ENDM + +MACRO stringtotext + getstring \2, \1 +ENDM + +MACRO readmoney + getmoney \2, \1 +ENDM + +DEF RAM2MEM EQUS "getnum" +DEF loadfont EQUS "opentext" +DEF loadmenudata EQUS "loadmenu" +DEF loadmenuheader EQUS "loadmenu" +DEF writebackup EQUS "closewindow" +DEF interpretmenu EQUS "_2dmenu" +DEF interpretmenu2 EQUS "verticalmenu" +DEF buttonsound EQUS "promptbutton" +DEF battlecheck EQUS "randomwildmon" +DEF loadtrainerdata EQUS "loadtemptrainer" +DEF loadpokedata EQUS "loadwildmon" +DEF returnafterbattle EQUS "reloadmapafterbattle" +DEF trainerstatus EQUS "trainerflagaction" +DEF talkaftercancel EQUS "endifjustbattled" +DEF talkaftercheck EQUS "checkjustbattled" +DEF playrammusic EQUS "encountermusic" +DEF reloadmapmusic EQUS "dontrestartmapmusic" +DEF resetfuncs EQUS "endall" +DEF storetext EQUS "battletowertext" +DEF displaylocation EQUS "landmarktotext" +DEF givepokeitem EQUS "givepokemail" +DEF checkpokeitem EQUS "checkpokemail" +DEF passtoengine EQUS "autoinput" +DEF verbosegiveitem2 EQUS "verbosegiveitemvar" +DEF loadbytec2cf EQUS "writeunusedbyte" +DEF writeunusedbytebuffer EQUS "writeunusedbyte" + +; macros/scripts/maps.asm + +MACRO mapconst + map_const \1, \3, \2 +ENDM + +DEF maptrigger EQUS "scene_script" + +MACRO warp_def + warp_event \2, \1, \4, \3 +ENDM + +MACRO xy_trigger + coord_event \3, \2, \1, \5 +ENDM + +MACRO signpost + bg_event \2, \1, \3, \4 +ENDM + +MACRO person_event + object_event \3, \2, \1, \4, \5, \6, \7, \8, \9, \<10>, \<11>, \<12>, \<13> +ENDM + +DEF PERSONTYPE_SCRIPT EQUS "OBJECTTYPE_SCRIPT" +DEF PERSONTYPE_ITEMBALL EQUS "OBJECTTYPE_ITEMBALL" +DEF PERSONTYPE_TRAINER EQUS "OBJECTTYPE_TRAINER" + +DEF SCENE_DEFAULT EQU 0 +DEF SCENE_FINISHED EQU 1 + +; macros/scripts/movement.asm + +DEF show_person EQUS "show_object" +DEF hide_person EQUS "hide_object" +DEF remove_person EQUS "remove_object" + +DEF turn_head_down EQUS "turn_head DOWN" +DEF turn_head_up EQUS "turn_head UP" +DEF turn_head_left EQUS "turn_head LEFT" +DEF turn_head_right EQUS "turn_head RIGHT" +DEF turn_step_down EQUS "turn_step DOWN" +DEF turn_step_up EQUS "turn_step UP" +DEF turn_step_left EQUS "turn_step LEFT" +DEF turn_step_right EQUS "turn_step RIGHT" +DEF slow_step_down EQUS "slow_step DOWN" +DEF slow_step_up EQUS "slow_step UP" +DEF slow_step_left EQUS "slow_step LEFT" +DEF slow_step_right EQUS "slow_step RIGHT" +DEF step_down EQUS "step DOWN" +DEF step_up EQUS "step UP" +DEF step_left EQUS "step LEFT" +DEF step_right EQUS "step RIGHT" +DEF big_step_down EQUS "big_step DOWN" +DEF big_step_up EQUS "big_step UP" +DEF big_step_left EQUS "big_step LEFT" +DEF big_step_right EQUS "big_step RIGHT" +DEF slow_slide_step_down EQUS "slow_slide_step DOWN" +DEF slow_slide_step_up EQUS "slow_slide_step UP" +DEF slow_slide_step_left EQUS "slow_slide_step LEFT" +DEF slow_slide_step_right EQUS "slow_slide_step RIGHT" +DEF slide_step_down EQUS "slide_step DOWN" +DEF slide_step_up EQUS "slide_step UP" +DEF slide_step_left EQUS "slide_step LEFT" +DEF slide_step_right EQUS "slide_step RIGHT" +DEF fast_slide_step_down EQUS "fast_slide_step DOWN" +DEF fast_slide_step_up EQUS "fast_slide_step UP" +DEF fast_slide_step_left EQUS "fast_slide_step LEFT" +DEF fast_slide_step_right EQUS "fast_slide_step RIGHT" +DEF turn_away_down EQUS "turn_away DOWN" +DEF turn_away_up EQUS "turn_away UP" +DEF turn_away_left EQUS "turn_away LEFT" +DEF turn_away_right EQUS "turn_away RIGHT" +DEF turn_in_down EQUS "turn_in DOWN" +DEF turn_in_up EQUS "turn_in UP" +DEF turn_in_left EQUS "turn_in LEFT" +DEF turn_in_right EQUS "turn_in RIGHT" +DEF turn_waterfall_down EQUS "turn_waterfall DOWN" +DEF turn_waterfall_up EQUS "turn_waterfall UP" +DEF turn_waterfall_left EQUS "turn_waterfall LEFT" +DEF turn_waterfall_right EQUS "turn_waterfall RIGHT" +DEF slow_jump_step_down EQUS "slow_jump_step DOWN" +DEF slow_jump_step_up EQUS "slow_jump_step UP" +DEF slow_jump_step_left EQUS "slow_jump_step LEFT" +DEF slow_jump_step_right EQUS "slow_jump_step RIGHT" +DEF jump_step_down EQUS "jump_step DOWN" +DEF jump_step_up EQUS "jump_step UP" +DEF jump_step_left EQUS "jump_step LEFT" +DEF jump_step_right EQUS "jump_step RIGHT" +DEF fast_jump_step_down EQUS "fast_jump_step DOWN" +DEF fast_jump_step_up EQUS "fast_jump_step UP" +DEF fast_jump_step_left EQUS "fast_jump_step LEFT" +DEF fast_jump_step_right EQUS "fast_jump_step RIGHT" + +DEF step_sleep_1 EQUS "step_sleep 1" +DEF step_sleep_2 EQUS "step_sleep 2" +DEF step_sleep_3 EQUS "step_sleep 3" +DEF step_sleep_4 EQUS "step_sleep 4" +DEF step_sleep_5 EQUS "step_sleep 5" +DEF step_sleep_6 EQUS "step_sleep 6" +DEF step_sleep_7 EQUS "step_sleep 7" +DEF step_sleep_8 EQUS "step_sleep 8" + +; macros/scripts/text.asm +DEF text_from_ram EQUS "text_ram" +DEF start_asm EQUS "text_asm" +DEF deciram EQUS "text_decimal" +DEF interpret_data EQUS "text_pause" +DEF limited_interpret_data EQUS "text_dots" +DEF link_wait_button EQUS "text_waitbutton" +DEF text_linkwaitbutton EQUS "text_waitbutton" +DEF text_linkpromptbutton EQUS "text_waitbutton" +DEF current_day EQUS "text_today" +DEF text_jump EQUS "text_far" + +; macros/scripts/battle_anims.asm +DEF anim_enemyfeetobj EQUS "anim_battlergfx_2row" +DEF anim_playerheadobj EQUS "anim_battlergfx_1row" +DEF anim_clearsprites EQUS "anim_keepsprites" + +; macros/scripts/oam_anims.asm +DEF dorestart EQUS "oamrestart" +DEF dowait EQUS "oamwait" +DEF delanim EQUS "oamdel" + +; engine/events/std_scripts.asm +DEF pokecenternurse EQUS "PokecenterNurseScript" +DEF difficultbookshelf EQUS "DifficultBookshelfScript" +DEF picturebookshelf EQUS "PictureBookshelfScript" +DEF magazinebookshelf EQUS "MagazineBookshelfScript" +DEF teamrocketoath EQUS "TeamRocketOathScript" +DEF incenseburner EQUS "IncenseBurnerScript" +DEF merchandiseshelf EQUS "MerchandiseShelfScript" +DEF townmap EQUS "TownMapScript" +DEF window EQUS "WindowScript" +DEF tv EQUS "TVScript" +DEF homepage EQUS "HomepageScript" +DEF radio1 EQUS "Radio1Script" +DEF radio2 EQUS "Radio2Script" +DEF trashcan EQUS "TrashCanScript" +DEF strengthboulder EQUS "StrengthBoulderScript" +DEF smashrock EQUS "SmashRockScript" +DEF pokecentersign EQUS "PokecenterSignScript" +DEF martsign EQUS "MartSignScript" +DEF goldenrodrockets EQUS "GoldenrodRocketsScript" +DEF radiotowerrockets EQUS "RadioTowerRocketsScript" +DEF elevatorbutton EQUS "ElevatorButtonScript" +DEF daytotext EQUS "DayToTextScript" +DEF bugcontestresultswarp EQUS "BugContestResultsWarpScript" +DEF bugcontestresults EQUS "BugContestResultsScript" +DEF initializeevents EQUS "InitializeEventsScript" +DEF asknumber1m EQUS "AskNumber1MScript" +DEF asknumber2m EQUS "AskNumber2MScript" +DEF registerednumberm EQUS "RegisteredNumberMScript" +DEF numberacceptedm EQUS "NumberAcceptedMScript" +DEF numberdeclinedm EQUS "NumberDeclinedMScript" +DEF phonefullm EQUS "PhoneFullMScript" +DEF rematchm EQUS "RematchMScript" +DEF giftm EQUS "GiftMScript" +DEF packfullm EQUS "PackFullMScript" +DEF rematchgiftm EQUS "RematchGiftMScript" +DEF asknumber1f EQUS "AskNumber1FScript" +DEF asknumber2f EQUS "AskNumber2FScript" +DEF registerednumberf EQUS "RegisteredNumberFScript" +DEF numberacceptedf EQUS "NumberAcceptedFScript" +DEF numberdeclinedf EQUS "NumberDeclinedFScript" +DEF phonefullf EQUS "PhoneFullFScript" +DEF rematchf EQUS "RematchFScript" +DEF giftf EQUS "GiftFScript" +DEF packfullf EQUS "PackFullFScript" +DEF rematchgiftf EQUS "RematchGiftFScript" +DEF gymstatue1 EQUS "GymStatue1Script" +DEF gymstatue2 EQUS "GymStatue2Script" +DEF receiveitem EQUS "ReceiveItemScript" +DEF receivetogepiegg EQUS "ReceiveTogepiEggScript" +DEF pcscript EQUS "PCScript" +DEF gamecornercoinvendor EQUS "GameCornerCoinVendorScript" +DEF happinesschecknpc EQUS "HappinessCheckScript" + +; constants/sprite_constants.asm +DEF SPRITE_BUENA EQUS "SPRITE_BEAUTY" + +DEF PAL_NPC_SILVER EQUS "PAL_NPC_EMOTE" +DEF PAL_OW_SILVER EQUS "PAL_OW_EMOTE" diff --git a/macros/lists.asm b/macros/lists.asm new file mode 100644 index 0000000..5635e0f --- /dev/null +++ b/macros/lists.asm @@ -0,0 +1,19 @@ +MACRO list_item +.__item\1 +if (_NARG > 1) + db .__item\2 - .__item\1 +endc +ENDM + +DEF current_list_item = 0 + +MACRO next_list_item +DEF next_list_item_index = current_list_item + 1 + list_item {d:current_list_item}, {d:next_list_item_index} +DEF current_list_item = next_list_item_index +ENDM + +MACRO end_list_items + list_item {d:current_list_item} +DEF current_list_item = 0 +ENDM diff --git a/macros/predef.asm b/macros/predef.asm new file mode 100644 index 0000000..a32b9a3 --- /dev/null +++ b/macros/predef.asm @@ -0,0 +1,17 @@ +; Predef function calls + +MACRO lda_predef +; Some functions load the predef id +; without immediately calling Predef. + ld a, (\1Predef - PredefPointers) / 3 +ENDM + +MACRO predef + lda_predef \1 + call Predef +ENDM + +MACRO predef_jump + lda_predef \1 + jp Predef +ENDM diff --git a/macros/ram.asm b/macros/ram.asm new file mode 100644 index 0000000..c51db64 --- /dev/null +++ b/macros/ram.asm @@ -0,0 +1,408 @@ +; Structures in RAM + +MACRO flag_array + ds ((\1) + 7) / 8 +ENDM + +MACRO box_struct +\1Species:: db +\1Item:: db +\1Moves:: ds NUM_MOVES +\1ID:: dw +\1Exp:: ds 3 +\1StatExp:: +\1HPExp:: dw +\1AtkExp:: dw +\1DefExp:: dw +\1SpdExp:: dw +\1SpcExp:: dw +\1DVs:: dw +\1PP:: ds NUM_MOVES +\1Happiness:: db +\1PokerusStatus:: db +\1CaughtData:: +\1CaughtTime:: +\1CaughtLevel:: db +\1CaughtGender:: +\1CaughtLocation:: db +\1Level:: db +\1BoxEnd:: +ENDM + +MACRO party_struct + box_struct \1 +\1Status:: db +\1Unused:: db +\1HP:: dw +\1MaxHP:: dw +\1Stats:: ; big endian +\1Attack:: dw +\1Defense:: dw +\1Speed:: dw +\1SpclAtk:: dw +\1SpclDef:: dw +\1StructEnd:: +ENDM + +MACRO red_box_struct +\1Species:: db +\1HP:: dw +\1BoxLevel:: db +\1Status:: db +\1Type:: +\1Type1:: db +\1Type2:: db +\1CatchRate:: db +\1Moves:: ds NUM_MOVES +\1ID:: dw +\1Exp:: ds 3 +\1HPExp:: dw +\1AttackExp:: dw +\1DefenseExp:: dw +\1SpeedExp:: dw +\1SpecialExp:: dw +\1DVs:: dw +\1PP:: ds NUM_MOVES +ENDM + +MACRO red_party_struct + red_box_struct \1 +\1Level:: db +\1Stats:: +\1MaxHP:: dw +\1Attack:: dw +\1Defense:: dw +\1Speed:: dw +\1Special:: dw +ENDM + +MACRO battle_struct +\1Species:: db +\1Item:: db +\1Moves:: ds NUM_MOVES +\1DVs:: dw +\1PP:: ds NUM_MOVES +\1Happiness:: db +\1Level:: db +\1Status:: ds 2 +\1HP:: dw +\1MaxHP:: dw +\1Stats:: ; big endian +\1Attack:: dw +\1Defense:: dw +\1Speed:: dw +\1SpclAtk:: dw +\1SpclDef:: dw +\1Type:: +\1Type1:: db +\1Type2:: db +\1StructEnd:: +ENDM + +MACRO box +\1Count:: db +\1Species:: ds MONS_PER_BOX + 1 +\1Mons:: + ; \1Mon1 - \1Mon20 + for n, 1, MONS_PER_BOX + 1 + \1Mon{d:n}:: box_struct \1Mon{d:n} + endr +\1MonOTs:: + ; \1Mon1OT - \1Mon20OT + for n, 1, MONS_PER_BOX + 1 + \1Mon{d:n}OT:: ds NAME_LENGTH + endr +\1MonNicknames:: + ; \1Mon1Nickname - \1Mon20Nickname + for n, 1, MONS_PER_BOX + 1 + \1Mon{d:n}Nickname:: ds MON_NAME_LENGTH + endr +\1MonNicknamesEnd:: +\1End:: + ds 2 ; padding +ENDM + +MACRO map_connection_struct +\1ConnectedMapGroup:: db +\1ConnectedMapNumber:: db +\1ConnectionStripPointer:: dw +\1ConnectionStripLocation:: dw +\1ConnectionStripLength:: db +\1ConnectedMapWidth:: db +\1ConnectionStripYOffset:: db +\1ConnectionStripXOffset:: db +\1ConnectionWindow:: dw +ENDM + +MACRO channel_struct +\1MusicID:: dw +\1MusicBank:: db +\1Flags1:: db ; 0:on/off 1:subroutine 2:looping 3:sfx 4:noise 5:rest +\1Flags2:: db ; 0:vibrato on/off 1:pitch slide 2:duty cycle pattern 4:pitch offset +\1Flags3:: db ; 0:vibrato up/down 1:pitch slide direction +\1MusicAddress:: dw +\1LastMusicAddress:: dw + dw +\1NoteFlags:: db ; 5:rest +\1Condition:: db ; conditional jumps +\1DutyCycle:: db ; bits 6-7 (0:12.5% 1:25% 2:50% 3:75%) +\1VolumeEnvelope:: db ; hi:volume lo:fade +\1Frequency:: dw ; 11 bits +\1Pitch:: db ; 0:rest 1-c:note +\1Octave:: db ; 7-0 (0 is highest) +\1Transposition:: db ; raises existing octaves (to repeat phrases) +\1NoteDuration:: db ; frames remaining for the current note +\1Field16:: ds 1 + ds 1 +\1LoopCount:: db +\1Tempo:: dw +\1Tracks:: db ; hi:left lo:right +\1DutyCyclePattern:: 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 +\1PitchSlideTarget:: dw ; frequency endpoint for pitch slide +\1PitchSlideAmount:: db +\1PitchSlideAmountFraction:: db +\1Field25:: db + ds 1 +\1PitchOffset:: dw +\1Field29:: ds 1 +\1Field2a:: ds 2 +\1Field2c:: ds 1 +\1NoteLength:: db ; frames per 16th note +\1Field2e:: ds 1 +\1Field2f:: ds 1 +\1Field30:: ds 1 + ds 1 +ENDM + +MACRO battle_tower_struct +\1Name:: ds NAME_LENGTH - 1 +\1TrainerClass:: db + ; \1Mon1 - \1Mon3 and \1Mon1Name - \1Mon3Name + for n, 1, BATTLETOWER_PARTY_LENGTH + 1 + \1Mon{d:n}:: party_struct \1Mon{d:n} + \1Mon{d:n}Name:: ds MON_NAME_LENGTH + endr +\1TrainerData:: ds BATTLETOWER_TRAINERDATALENGTH +\1TrainerEnd:: +ENDM + +MACRO mailmsg +\1Message:: ds MAIL_MSG_LENGTH +\1MessageEnd:: db +\1Author:: ds PLAYER_NAME_LENGTH +\1Nationality:: dw +\1AuthorID:: dw +\1Species:: db +\1Type:: db +\1End:: +ENDM + +MACRO mailmsg_jp +\1Message:: ds MAIL_MSG_LENGTH +\1MessageEnd:: db +\1Author:: ds NAME_LENGTH_JAPANESE - 1 +\1AuthorID:: dw +\1Species:: db +\1Type:: db +\1End:: +ENDM + +MACRO roam_struct +\1Species:: db +\1Level:: db +\1MapGroup:: db +\1MapNumber:: db +\1HP:: db +\1DVs:: dw +ENDM + +MACRO bugcontestwinner +\1WinnerID:: db +\1Mon:: db +\1Score:: dw +ENDM + +MACRO hof_mon +\1Species:: dw +\1ID:: dw +\1DVs:: dw +\1Level:: db +\1Nickname:: ds MON_NAME_LENGTH - 1 +\1End:: +ENDM + +MACRO hall_of_fame +\1WinCount:: db + ; \1Mon1 - \1Mon6 + for n, 1, PARTY_LENGTH + 1 + \1Mon{d:n}:: hof_mon \1Mon{d:n} + endr +\1End:: dw +ENDM + +MACRO link_battle_record +\1ID:: dw +\1Name:: ds NAME_LENGTH - 1 +\1Wins:: dw +\1Losses:: dw +\1Draws:: dw +\1End:: +ENDM + +MACRO trademon +\1Species:: db +\1SpeciesName:: ds MON_NAME_LENGTH +\1Nickname:: ds MON_NAME_LENGTH +\1SenderName:: ds NAME_LENGTH +\1OTName:: ds NAME_LENGTH +\1DVs:: dw +\1ID:: dw +\1CaughtData:: db +\1End:: +ENDM + +MACRO move_struct +\1Animation:: db +\1Effect:: db +\1Power:: db +\1Type:: db +\1Accuracy:: db +\1PP:: db +\1EffectChance:: db +ENDM + +MACRO slot_reel +\1ReelAction:: db +\1TilemapAddr:: dw +\1Position:: db +\1SpinDistance:: db +\1SpinRate:: db +\1OAMAddr:: dw +\1XCoord:: db +\1ManipCounter:: db +\1ManipDelay:: db +\1Field0b:: ds 1 +\1Field0c:: ds 1 +\1Field0d:: ds 1 +\1Field0e:: ds 1 +\1StopDelay:: db +ENDM + +MACRO object_struct +\1Sprite:: db +\1MapObjectIndex:: db +\1SpriteTile:: db +\1MovementType:: db +\1Flags:: dw +\1Palette:: db +\1Walking:: db +\1Direction:: db +\1StepType:: db +\1StepDuration:: db +\1Action:: db +\1StepFrame:: db +\1Facing:: db +\1Tile:: db +\1LastTile:: db +\1MapX:: db +\1MapY:: db +\1LastMapX:: db +\1LastMapY:: db +\1InitX:: db +\1InitY:: db +\1Radius:: db +\1SpriteX:: db +\1SpriteY:: db +\1SpriteXOffset:: db +\1SpriteYOffset:: db +\1MovementIndex:: db +\1StepIndex:: db +\1Field1d:: ds 1 +\1Field1e:: ds 1 +\1JumpHeight:: db +\1Range:: db + ds 7 +\1StructEnd:: +ENDM + +MACRO map_object +\1ObjectStructID:: db +\1ObjectSprite:: db +\1ObjectYCoord:: db +\1ObjectXCoord:: db +\1ObjectMovement:: db +\1ObjectRadius:: db +\1ObjectHour1:: db +\1ObjectHour2:: +\1ObjectTimeOfDay:: db +\1ObjectPalette:: +\1ObjectType:: db +\1ObjectSightRange:: db +\1ObjectScript:: dw +\1ObjectEventFlag:: dw + ds 2 +ENDM + +MACRO sprite_oam_struct +\1YCoord:: db +\1XCoord:: db +\1TileID:: db +\1Attributes:: db +; bit 7: priority +; bit 6: y flip +; bit 5: x flip +; bit 4: pal # (non-cgb) +; bit 3: vram bank (cgb only) +; bit 2-0: pal # (cgb only) +ENDM + +MACRO sprite_anim_struct +\1Index:: db +\1FramesetID:: db +\1AnimSeqID:: db +\1TileID:: db +\1XCoord:: db +\1YCoord:: db +\1XOffset:: db +\1YOffset:: db +\1Duration:: db +\1DurationOffset:: db +\1FrameIndex:: db +\1JumptableIndex:: db +\1Var1:: ds 1 +\1Var2:: ds 1 +\1Var3:: ds 1 +\1Var4:: ds 1 +ENDM + +MACRO battle_anim_struct +\1Index:: db +\1OAMFlags:: db +\1FixY:: db +\1FramesetID:: db +\1Function:: db +\1Palette:: db +\1TileID:: db +\1XCoord:: db +\1YCoord:: db +\1XOffset:: db +\1YOffset:: db +\1Param:: db +\1Duration:: db +\1Frame:: db +\1JumptableIndex:: db +\1Var1:: db +\1Var2:: db + ds 7 +ENDM + +MACRO battle_bg_effect +\1Function:: db +\1JumptableIndex:: db +\1BattleTurn:: db +\1Param:: db +ENDM diff --git a/macros/scripts/audio.asm b/macros/scripts/audio.asm new file mode 100644 index 0000000..5375380 --- /dev/null +++ b/macros/scripts/audio.asm @@ -0,0 +1,320 @@ +MACRO channel_count + assert 0 < (\1) && (\1) <= NUM_MUSIC_CHANS, \ + "channel_count must be 1-{d:NUM_MUSIC_CHANS}" + DEF _num_channels = \1 - 1 +ENDM + +MACRO channel + assert 0 < (\1) && (\1) <= NUM_CHANNELS, \ + "channel id must be 1-{d:NUM_CHANNELS}" + dn (_num_channels << 2), \1 - 1 ; channel id + dw \2 ; address + DEF _num_channels = 0 +ENDM + +MACRO note + dn (\1), (\2) - 1 ; pitch, length +ENDM + +MACRO drum_note + note \1, \2 ; drum instrument, length +ENDM + +MACRO rest + note 0, \1 ; length +ENDM + +MACRO square_note + db \1 ; length + if \3 < 0 + dn \2, %1000 | (\3 * -1) ; volume envelope + else + dn \2, \3 ; volume envelope + endc + dw \4 ; frequency +ENDM + +MACRO noise_note + db \1 ; length + if \3 < 0 + dn \2, %1000 | (\3 * -1) ; volume envelope + else + dn \2, \3 ; volume envelope + endc + db \4 ; frequency +ENDM + +; MusicCommands indexes (see audio/engine.asm) + const_def $d0 +DEF FIRST_MUSIC_CMD EQU const_value + + const octave_cmd ; $d0 +MACRO octave + assert 1 <= (\1) && (\1) <= 8, "octave must be 1-8" + db octave_cmd + 8 - (\1) ; octave +ENDM + + const_skip 7 ; all octave values + + const note_type_cmd ; $d8 +MACRO note_type + db note_type_cmd + db \1 ; note length + if _NARG >= 2 + if \3 < 0 + dn \2, %1000 | (\3 * -1) ; volume envelope + else + dn \2, \3 ; volume envelope + endc + endc +ENDM + +; only valid on the noise channel +MACRO drum_speed + note_type \1 ; note length +ENDM + + const transpose_cmd ; $d9 +MACRO transpose + db transpose_cmd + dn \1, \2 ; num octaves, num pitches +ENDM + + const tempo_cmd ; $da +MACRO tempo + db tempo_cmd + bigdw \1 ; tempo +ENDM + + const duty_cycle_cmd ; $db +MACRO duty_cycle + db duty_cycle_cmd + db \1 ; duty cycle +ENDM + + const volume_envelope_cmd ; $dc +MACRO volume_envelope + db volume_envelope_cmd + if \2 < 0 + dn \1, %1000 | (\2 * -1) ; volume envelope + else + dn \1, \2 ; volume envelope + endc +ENDM + + const pitch_sweep_cmd ; $dd +MACRO pitch_sweep + db pitch_sweep_cmd + if \2 < 0 + dn \1, %1000 | (\2 * -1) ; pitch sweep + else + dn \1, \2 ; pitch sweep + endc +ENDM + + const duty_cycle_pattern_cmd ; $de +MACRO duty_cycle_pattern + db duty_cycle_pattern_cmd + db (\1 << 6) | (\2 << 4) | (\3 << 2) | (\4 << 0) ; duty cycle pattern +ENDM + + const toggle_sfx_cmd ; $df +MACRO toggle_sfx + db toggle_sfx_cmd +ENDM + + const pitch_slide_cmd ; $e0 +MACRO pitch_slide + db pitch_slide_cmd + db \1 - 1 ; duration + dn 8 - \2, \3 % 12 ; octave, pitch +ENDM + + const vibrato_cmd ; $e1 +MACRO vibrato + db vibrato_cmd + db \1 ; delay + if _NARG > 2 + dn \2, \3 ; extent, rate + else + db \2 ; LEGACY: Support for 1-arg extent + endc +ENDM + + const unknownmusic0xe2_cmd ; $e2 +MACRO unknownmusic0xe2 + db unknownmusic0xe2_cmd + db \1 ; unknown +ENDM + + const toggle_noise_cmd ; $e3 +MACRO toggle_noise + db toggle_noise_cmd + if _NARG > 0 + db \1 ; drum kit + endc +ENDM + + const force_stereo_panning_cmd ; $e4 +MACRO force_stereo_panning + db force_stereo_panning_cmd + dn %1111 * (1 && \1), %1111 * (1 && \2) ; left enable, right enable +ENDM + + const volume_cmd ; $e5 +MACRO volume + db volume_cmd + if _NARG > 1 + dn \1, \2 ; left volume, right volume + else + db \1 ; LEGACY: Support for 1-arg volume + endc +ENDM + + const pitch_offset_cmd ; $e6 +MACRO pitch_offset + db pitch_offset_cmd + bigdw \1 ; pitch offset +ENDM + + const unknownmusic0xe7_cmd ; $e7 +MACRO unknownmusic0xe7 + db unknownmusic0xe7_cmd + db \1 ; unknown +ENDM + + const unknownmusic0xe8_cmd ; $e8 +MACRO unknownmusic0xe8 + db unknownmusic0xe8_cmd + db \1 ; unknown +ENDM + + const tempo_relative_cmd ; $e9 +MACRO tempo_relative + db tempo_relative_cmd + db \1 ; tempo adjustment +ENDM + + const restart_channel_cmd ; $ea +MACRO restart_channel + db restart_channel_cmd + dw \1 ; address +ENDM + + const new_song_cmd ; $eb +MACRO new_song + db new_song_cmd + dw \1 ; id +ENDM + + const sfx_priority_on_cmd ; $ec +MACRO sfx_priority_on + db sfx_priority_on_cmd +ENDM + + const sfx_priority_off_cmd ; $ed +MACRO sfx_priority_off + db sfx_priority_off_cmd +ENDM + + const unknownmusic0xee_cmd ; $ee +MACRO unknownmusic0xee + db unknownmusic0xee_cmd + dw \1 ; address +ENDM + + const stereo_panning_cmd ; $ef +MACRO stereo_panning + db stereo_panning_cmd + dn %1111 * (1 && \1), %1111 * (1 && \2) ; left enable, right enable +ENDM + + const sfx_toggle_noise_cmd ; $f0 +MACRO sfx_toggle_noise + db sfx_toggle_noise_cmd + if _NARG > 0 + db \1 ; drum kit + endc +ENDM + + const music0xf1_cmd ; $f1 +MACRO music0xf1 + db music0xf1_cmd +ENDM + + const music0xf2_cmd ; $f2 +MACRO music0xf2 + db music0xf2_cmd +ENDM + + const music0xf3_cmd ; $f3 +MACRO music0xf3 + db music0xf3_cmd +ENDM + + const music0xf4_cmd ; $f4 +MACRO music0xf4 + db music0xf4_cmd +ENDM + + const music0xf5_cmd ; $f5 +MACRO music0xf5 + db music0xf5_cmd +ENDM + + const music0xf6_cmd ; $f6 +MACRO music0xf6 + db music0xf6_cmd +ENDM + + const music0xf7_cmd ; $f7 +MACRO music0xf7 + db music0xf7_cmd +ENDM + + const music0xf8_cmd ; $f8 +MACRO music0xf8 + db music0xf8_cmd +ENDM + + const unknownmusic0xf9_cmd ; $f9 +MACRO unknownmusic0xf9 + db unknownmusic0xf9_cmd +ENDM + + const set_condition_cmd ; $fa +MACRO set_condition + db set_condition_cmd + db \1 ; condition +ENDM + + const sound_jump_if_cmd ; $fb +MACRO sound_jump_if + db sound_jump_if_cmd + db \1 ; condition + dw \2 ; address +ENDM + + const sound_jump_cmd ; $fc +MACRO sound_jump + db sound_jump_cmd + dw \1 ; address +ENDM + + const sound_loop_cmd ; $fd +MACRO sound_loop + db sound_loop_cmd + db \1 ; count + dw \2 ; address +ENDM + + const sound_call_cmd ; $fe +MACRO sound_call + db sound_call_cmd + dw \1 ; address +ENDM + + const sound_ret_cmd ; $ff +MACRO sound_ret + db sound_ret_cmd +ENDM diff --git a/macros/scripts/battle_anims.asm b/macros/scripts/battle_anims.asm new file mode 100644 index 0000000..d944b5e --- /dev/null +++ b/macros/scripts/battle_anims.asm @@ -0,0 +1,301 @@ +; BattleAnimCommands indexes (see engine/battle_anims/anim_commands.asm) + const_def $d0 +DEF FIRST_BATTLE_ANIM_CMD EQU const_value + +MACRO anim_wait + assert (\1) < FIRST_BATTLE_ANIM_CMD, "anim_wait argument must be less than {FIRST_BATTLE_ANIM_CMD}" + db \1 +ENDM + + const anim_obj_command ; $d0 +MACRO anim_obj + db anim_obj_command + if _NARG <= 4 + db \1 ; object + db \2 ; x + db \3 ; y + db \4 ; param + else + ; LEGACY: Support the tile+offset format + db \1 ; object + db (\2) * 8 + (\3) ; x_tile, x + db (\4) * 8 + (\5) ; y_tile, y + db \6 ; param + endc +ENDM + + const anim_1gfx_command ; $d1 +MACRO anim_1gfx + db anim_1gfx_command + db \1 ; gfx1 +ENDM + + const anim_2gfx_command ; $d2 +MACRO anim_2gfx + db anim_2gfx_command + db \1 ; gfx1 + db \2 ; gfx2 +ENDM + + const anim_3gfx_command ; $d3 +MACRO anim_3gfx + db anim_3gfx_command + db \1 ; gfx1 + db \2 ; gfx2 + db \3 ; gfx3 +ENDM + + const anim_4gfx_command ; $d4 +MACRO anim_4gfx + db anim_4gfx_command + db \1 ; gfx1 + db \2 ; gfx2 + db \3 ; gfx3 + db \4 ; gfx4 +ENDM + + const anim_5gfx_command ; $d5 +MACRO anim_5gfx + db anim_5gfx_command + db \1 ; gfx1 + db \2 ; gfx2 + db \3 ; gfx3 + db \4 ; gfx4 + db \5 ; gfx5 +ENDM + + const anim_incobj_command ; $d6 +MACRO anim_incobj + db anim_incobj_command + db \1 ; object_id +ENDM + + const anim_setobj_command ; $d7 +MACRO anim_setobj + db anim_setobj_command + db \1 ; object_id + db \2 ; value +ENDM + + const anim_incbgeffect_command ; $d8 +MACRO anim_incbgeffect + db anim_incbgeffect_command + db \1 ; effect +ENDM + + const anim_battlergfx_2row_command ; $d9 +MACRO anim_battlergfx_2row + db anim_battlergfx_2row_command +ENDM + + const anim_battlergfx_1row_command ; $da +MACRO anim_battlergfx_1row + db anim_battlergfx_1row_command +ENDM + + const anim_checkpokeball_command ; $db +MACRO anim_checkpokeball + db anim_checkpokeball_command +ENDM + + const anim_transform_command ; $dc +MACRO anim_transform + db anim_transform_command +ENDM + + const anim_raisesub_command ; $dd +MACRO anim_raisesub + db anim_raisesub_command +ENDM + + const anim_dropsub_command ; $de +MACRO anim_dropsub + db anim_dropsub_command +ENDM + + const anim_resetobp0_command ; $df +MACRO anim_resetobp0 + db anim_resetobp0_command +ENDM + + const anim_sound_command ; $e0 +MACRO anim_sound + db anim_sound_command + db (\1 << 2) | \2 ; duration, tracks + db \3 ; sound_id +ENDM + + const anim_cry_command ; $e1 +MACRO anim_cry + db anim_cry_command + db \1 ; pitch +ENDM + + const anim_minimizeopp_command ; $e2 +MACRO anim_minimizeopp + db anim_minimizeopp_command +ENDM + + const anim_oamon_command ; $e3 +MACRO anim_oamon + db anim_oamon_command +ENDM + + const anim_oamoff_command ; $e4 +MACRO anim_oamoff + db anim_oamoff_command +ENDM + + const anim_clearobjs_command ; $e5 +MACRO anim_clearobjs + db anim_clearobjs_command +ENDM + + const anim_beatup_command ; $e6 +MACRO anim_beatup + db anim_beatup_command +ENDM + + const anim_0xe7_command ; $e7 +MACRO anim_0xe7 + db anim_0xe7_command +ENDM + + const anim_updateactorpic_command ; $e8 +MACRO anim_updateactorpic + db anim_updateactorpic_command +ENDM + + const anim_minimize_command ; $e9 +MACRO anim_minimize + db anim_minimize_command +ENDM + + const anim_0xea_command ; $ea +MACRO anim_0xea + db anim_0xea_command +ENDM + + const anim_0xeb_command ; $eb +MACRO anim_0xeb + db anim_0xeb_command +ENDM + + const anim_0xec_command ; $ec +MACRO anim_0xec + db anim_0xec_command +ENDM + + const anim_0xed_command ; $ed +MACRO anim_0xed + db anim_0xed_command +ENDM + + const anim_if_param_and_command ; $ee +MACRO anim_if_param_and + db anim_if_param_and_command + db \1 ; value + dw \2 ; address +ENDM + + const anim_jumpuntil_command ; $ef +MACRO anim_jumpuntil + db anim_jumpuntil_command + dw \1 ; address +ENDM + + const anim_bgeffect_command ; $f0 +MACRO anim_bgeffect + db anim_bgeffect_command + db \1 ; effect + db \2 ; jumptable index + db \3 ; battle turn + db \4 ; unknown +ENDM + + const anim_bgp_command ; $f1 +MACRO anim_bgp + db anim_bgp_command + db \1 ; colors +ENDM + + const anim_obp0_command ; $f2 +MACRO anim_obp0 + db anim_obp0_command + db \1 ; colors +ENDM + + const anim_obp1_command ; $f3 +MACRO anim_obp1 + db anim_obp1_command + db \1 ; colors +ENDM + + const anim_keepsprites_command ; $f4 +MACRO anim_keepsprites + db anim_keepsprites_command +ENDM + + const anim_0xf5_command ; $f5 +MACRO anim_0xf5 + db anim_0xf5_command +ENDM + + const anim_0xf6_command ; $f6 +MACRO anim_0xf6 + db anim_0xf6_command +ENDM + + const anim_0xf7_command ; $f7 +MACRO anim_0xf7 + db anim_0xf7_command +ENDM + + const anim_if_param_equal_command ; $f8 +MACRO anim_if_param_equal + db anim_if_param_equal_command + db \1 ; value + dw \2 ; address +ENDM + + const anim_setvar_command ; $f9 +MACRO anim_setvar + db anim_setvar_command + db \1 ; value +ENDM + + const anim_incvar_command ; $fa +MACRO anim_incvar + db anim_incvar_command +ENDM + + const anim_if_var_equal_command ; $fb +MACRO anim_if_var_equal + db anim_if_var_equal_command + db \1 ; value + dw \2 ; address +ENDM + + const anim_jump_command ; $fc +MACRO anim_jump + db anim_jump_command + dw \1 ; address +ENDM + + const anim_loop_command ; $fd +MACRO anim_loop + db anim_loop_command + db \1 ; count + dw \2 ; address +ENDM + + const anim_call_command ; $fe +MACRO anim_call + db anim_call_command + dw \1 ; address +ENDM + + const anim_ret_command ; $ff +MACRO anim_ret + db anim_ret_command +ENDM diff --git a/macros/scripts/battle_commands.asm b/macros/scripts/battle_commands.asm new file mode 100644 index 0000000..180ff85 --- /dev/null +++ b/macros/scripts/battle_commands.asm @@ -0,0 +1,187 @@ +MACRO command + const \1_command + DEF \1 EQUS "db \1_command" +ENDM + +; BattleCommandPointers indexes (see data/battle/effect_command_pointers.asm) + const_def 1 + command checkturn ; 01 + command checkobedience ; 02 + command usedmovetext ; 03 + command doturn ; 04 + command critical ; 05 + command damagestats ; 06 + command stab ; 07 + command damagevariation ; 08 + command checkhit ; 09 + command lowersub ; 0a + command moveanimnosub ; 0b + command raisesub ; 0c + command failuretext ; 0d + command applydamage ; 0e + command criticaltext ; 0f + command supereffectivetext ; 10 + command checkfaint ; 11 + command buildopponentrage ; 12 + command poisontarget ; 13 + command sleeptarget ; 14 + command draintarget ; 15 + command eatdream ; 16 + command burntarget ; 17 + command freezetarget ; 18 + command paralyzetarget ; 19 + command selfdestruct ; 1a + command mirrormove ; 1b + command statup ; 1c + command statdown ; 1d + command payday ; 1e + command conversion ; 1f + command resetstats ; 20 + command storeenergy ; 21 + command unleashenergy ; 22 + command forceswitch ; 23 + command endloop ; 24 + command flinchtarget ; 25 + command ohko ; 26 + command recoil ; 27 + command mist ; 28 + command focusenergy ; 29 + command confuse ; 2a + command confusetarget ; 2b + command heal ; 2c + command transform ; 2d + command screen ; 2e + command poison ; 2f + command paralyze ; 30 + command substitute ; 31 + command rechargenextturn ; 32 + command mimic ; 33 + command metronome ; 34 + command leechseed ; 35 + command splash ; 36 + command disable ; 37 + command cleartext ; 38 + command charge ; 39 + command checkcharge ; 3a + command traptarget ; 3b + command effect0x3c ; 3c + command rampage ; 3d + command checkrampage ; 3e + command constantdamage ; 3f + command counter ; 40 + command encore ; 41 + command painsplit ; 42 + command snore ; 43 + command conversion2 ; 44 + command lockon ; 45 + command sketch ; 46 + command defrostopponent ; 47 + command sleeptalk ; 48 + command destinybond ; 49 + command spite ; 4a + command falseswipe ; 4b + command healbell ; 4c + command kingsrock ; 4d + command triplekick ; 4e + command kickcounter ; 4f + command thief ; 50 + command arenatrap ; 51 + command nightmare ; 52 + command defrost ; 53 + command curse ; 54 + command protect ; 55 + command spikes ; 56 + command foresight ; 57 + command perishsong ; 58 + command startsandstorm ; 59 + command endure ; 5a + command checkcurl ; 5b + command rolloutpower ; 5c + command effect0x5d ; 5d + command furycutter ; 5e + command attract ; 5f + command happinesspower ; 60 + command present ; 61 + command damagecalc ; 62 + command frustrationpower ; 63 + command safeguard ; 64 + command checksafeguard ; 65 + command getmagnitude ; 66 + command batonpass ; 67 + command pursuit ; 68 + command clearhazards ; 69 + command healmorn ; 6a + command healday ; 6b + command healnite ; 6c + command hiddenpower ; 6d + command startrain ; 6e + command startsun ; 6f + command attackup ; 70 + command defenseup ; 71 + command speedup ; 72 + command specialattackup ; 73 + command specialdefenseup ; 74 + command accuracyup ; 75 + command evasionup ; 76 + command attackup2 ; 77 + command defenseup2 ; 78 + command speedup2 ; 79 + command specialattackup2 ; 7a + command specialdefenseup2 ; 7b + command accuracyup2 ; 7c + command evasionup2 ; 7d + command attackdown ; 7e + command defensedown ; 7f + command speeddown ; 80 + command specialattackdown ; 81 + command specialdefensedown ; 82 + command accuracydown ; 83 + command evasiondown ; 84 + command attackdown2 ; 85 + command defensedown2 ; 86 + command speeddown2 ; 87 + command specialattackdown2 ; 88 + command specialdefensedown2 ; 89 + command accuracydown2 ; 8a + command evasiondown2 ; 8b + command statupmessage ; 8c + command statdownmessage ; 8d + command statupfailtext ; 8e + command statdownfailtext ; 8f + command effectchance ; 90 + command statdownanim ; 91 + command statupanim ; 92 + command switchturn ; 93 + command fakeout ; 94 + command bellydrum ; 95 + command psychup ; 96 + command rage ; 97 + command doubleflyingdamage ; 98 + command doubleundergrounddamage ; 99 + command mirrorcoat ; 9a + command checkfuturesight ; 9b + command futuresight ; 9c + command doubleminimizedamage ; 9d + command skipsuncharge ; 9e + command thunderaccuracy ; 9f + command teleport ; a0 + command beatup ; a1 + command ragedamage ; a2 + command resettypematchup ; a3 + command allstatsup ; a4 + command bidefailtext ; a5 + command raisesubnoanim ; a6 + command lowersubnoanim ; a7 + command beatupfailtext ; a8 + command clearmissdamage ; a9 + command movedelay ; aa + command moveanim ; ab + command tristatuschance ; ac + command supereffectivelooptext ; ad + command startloop ; ae + command curl ; af +DEF NUM_EFFECT_COMMANDS EQU const_value - 1 + + const_def -1, -1 + command endmove ; ff + command endturn ; fe diff --git a/macros/scripts/events.asm b/macros/scripts/events.asm new file mode 100644 index 0000000..25a1395 --- /dev/null +++ b/macros/scripts/events.asm @@ -0,0 +1,1080 @@ +; ScriptCommandTable indexes (see engine/overworld/scripting.asm) + const_def + + const scall_command ; $00 +MACRO scall + db scall_command + dw \1 ; pointer +ENDM + + const farscall_command ; $01 +MACRO farscall + db farscall_command + dba \1 +ENDM + + const memcall_command ; $02 +MACRO memcall + db memcall_command + dw \1 ; pointer +ENDM + + const sjump_command ; $03 +MACRO sjump + db sjump_command + dw \1 ; pointer +ENDM + + const farsjump_command ; $04 +MACRO farsjump + db farsjump_command + dba \1 +ENDM + + const memjump_command ; $05 +MACRO memjump + db memjump_command + dw \1 ; pointer +ENDM + + const ifequal_command ; $06 +MACRO ifequal + db ifequal_command + db \1 ; byte + dw \2 ; pointer +ENDM + + const ifnotequal_command ; $07 +MACRO ifnotequal + db ifnotequal_command + db \1 ; byte + dw \2 ; pointer +ENDM + + const iffalse_command ; $08 +MACRO iffalse + db iffalse_command + dw \1 ; pointer +ENDM + + const iftrue_command ; $09 +MACRO iftrue + db iftrue_command + dw \1 ; pointer +ENDM + + const ifgreater_command ; $0a +MACRO ifgreater + db ifgreater_command + db \1 ; byte + dw \2 ; pointer +ENDM + + const ifless_command ; $0b +MACRO ifless + db ifless_command + db \1 ; byte + dw \2 ; pointer +ENDM + + const jumpstd_command ; $0c +MACRO jumpstd + db jumpstd_command + dw (\1StdScript - StdScripts) / 3 +ENDM + + const callstd_command ; $0d +MACRO callstd + db callstd_command + dw (\1StdScript - StdScripts) / 3 +ENDM + + const callasm_command ; $0e +MACRO callasm + db callasm_command + dba \1 +ENDM + + const special_command ; $0f +MACRO special + db special_command + dw (\1Special - SpecialsPointers) / 3 +ENDM + + const memcallasm_command ; $10 +MACRO memcallasm + db memcallasm_command + dw \1 ; asm +ENDM + + const checkmapscene_command ; $11 +MACRO checkmapscene + db checkmapscene_command + map_id \1 ; map +ENDM + + const setmapscene_command ; $12 +MACRO setmapscene + db setmapscene_command + map_id \1 ; map + db \2 ; scene_id +ENDM + + const checkscene_command ; $13 +MACRO checkscene + db checkscene_command +ENDM + + const setscene_command ; $14 +MACRO setscene + db setscene_command + db \1 ; scene_id +ENDM + + const setval_command ; $15 +MACRO setval + db setval_command + db \1 ; value +ENDM + + const addval_command ; $16 +MACRO addval + db addval_command + db \1 ; value +ENDM + + const random_command ; $17 +MACRO random + db random_command + db \1 ; input +ENDM + + const checkver_command ; $18 +MACRO checkver + db checkver_command +ENDM + + const readmem_command ; $19 +MACRO readmem + db readmem_command + dw \1 ; address +ENDM + + const writemem_command ; $1a +MACRO writemem + db writemem_command + dw \1 ; address +ENDM + + const loadmem_command ; $1b +MACRO loadmem + db loadmem_command + dw \1 ; address + db \2 ; value +ENDM + + const readvar_command ; $1c +MACRO readvar + db readvar_command + db \1 ; variable_id +ENDM + + const writevar_command ; $1d +MACRO writevar + db writevar_command + db \1 ; variable_id +ENDM + + const loadvar_command ; $1e +MACRO loadvar + if STRIN("\1", "VAR_") != 1 + ; LEGACY: Support for the old name of "loadmem" + loadmem \1, \2 + else + db loadvar_command + db \1 ; variable_id + db \2 ; value + endc +ENDM + + const giveitem_command ; $1f +MACRO giveitem + if _NARG == 1 + giveitem \1, 1 + else + db giveitem_command + db \1 ; item + db \2 ; quantity + endc +ENDM + + const takeitem_command ; $20 +MACRO takeitem + if _NARG == 1 + takeitem \1, 1 + else + db takeitem_command + db \1 ; item + db \2 ; quantity + endc +ENDM + + const checkitem_command ; $21 +MACRO checkitem + db checkitem_command + db \1 ; item +ENDM + + const givemoney_command ; $22 +MACRO givemoney + db givemoney_command + db \1 ; account + dt \2 ; money +ENDM + + const takemoney_command ; $23 +MACRO takemoney + db takemoney_command + db \1 ; account + dt \2 ; money +ENDM + + const checkmoney_command ; $24 +MACRO checkmoney + db checkmoney_command + db \1 ; account + dt \2 ; money +ENDM + + const givecoins_command ; $25 +MACRO givecoins + db givecoins_command + dw \1 ; coins +ENDM + + const takecoins_command ; $26 +MACRO takecoins + db takecoins_command + dw \1 ; coins +ENDM + + const checkcoins_command ; $27 +MACRO checkcoins + db checkcoins_command + dw \1 ; coins +ENDM + + const addcellnum_command ; $28 +MACRO addcellnum + db addcellnum_command + db \1 ; person +ENDM + + const delcellnum_command ; $29 +MACRO delcellnum + db delcellnum_command + db \1 ; person +ENDM + + const checkcellnum_command ; $2a +MACRO checkcellnum + db checkcellnum_command + db \1 ; person +ENDM + + const checktime_command ; $2b +MACRO checktime + db checktime_command + db \1 ; time +ENDM + + const checkpoke_command ; $2c +MACRO checkpoke + db checkpoke_command + dw \1 ; pkmn +ENDM + + const givepoke_command ; $2d +MACRO givepoke + if _NARG == 2 + givepoke \1, \2, NO_ITEM, FALSE + elif _NARG == 3 + givepoke \1, \2, \3, FALSE + elif _NARG == 5 + givepoke \1, \2, \3, TRUE, \4, \5 + else + db givepoke_command + dw \1 ; pokemon + db \2 ; level + db \3 ; item + db \4 ; trainer + if \4 + dw \5 ; nickname_pointer + dw \6 ; ot_name_pointer + endc + endc +ENDM + + const giveegg_command ; $2e +MACRO giveegg + db giveegg_command + dw \1 ; pkmn + db \2 ; level +ENDM + + const givepokemail_command ; $2f +MACRO givepokemail + db givepokemail_command + dw \1 ; pointer +ENDM + + const checkpokemail_command ; $30 +MACRO checkpokemail + db checkpokemail_command + dw \1 ; pointer +ENDM + + const checkevent_command ; $31 +MACRO checkevent + db checkevent_command + dw \1 ; event_flag +ENDM + + const clearevent_command ; $32 +MACRO clearevent + db clearevent_command + dw \1 ; event_flag +ENDM + + const setevent_command ; $33 +MACRO setevent + db setevent_command + dw \1 ; event_flag +ENDM + + const checkflag_command ; $34 +MACRO checkflag + db checkflag_command + dw \1 ; engine_flag +ENDM + + const clearflag_command ; $35 +MACRO clearflag + db clearflag_command + dw \1 ; engine_flag +ENDM + + const setflag_command ; $36 +MACRO setflag + db setflag_command + dw \1 ; engine_flag +ENDM + + const wildon_command ; $37 +MACRO wildon + db wildon_command +ENDM + + const wildoff_command ; $38 +MACRO wildoff + db wildoff_command +ENDM + + const xycompare_command ; $39 +MACRO xycompare + db xycompare_command + dw \1 ; pointer +ENDM + + const warpmod_command ; $3a +MACRO warpmod + db warpmod_command + db \1 ; warp_id + map_id \2 ; map +ENDM + + const blackoutmod_command ; $3b +MACRO blackoutmod + db blackoutmod_command + map_id \1 ; map +ENDM + + const warp_command ; $3c +MACRO warp + db warp_command + map_id \1 ; map + db \2 ; x + db \3 ; y +ENDM + + const getmoney_command ; $3d +MACRO getmoney + db getmoney_command + db \2 ; account + db \1 ; string_buffer +ENDM + + const getcoins_command ; $3e +MACRO getcoins + db getcoins_command + db \1 ; string_buffer +ENDM + + const getnum_command ; $3f +MACRO getnum + db getnum_command + db \1 ; string_buffer +ENDM + + const getmonname_command ; $40 +MACRO getmonname + db getmonname_command + dw \2 ; pokemon + db \1 ; string_buffer +ENDM + + const getitemname_command ; $41 +MACRO getitemname + db getitemname_command + db \2 ; item + db \1 ; string_buffer +ENDM + + const getcurlandmarkname_command ; $42 +MACRO getcurlandmarkname + db getcurlandmarkname_command + db \1 ; string_buffer +ENDM + + const gettrainername_command ; $43 +MACRO gettrainername + db gettrainername_command + db \2 ; trainer_group + db \3 ; trainer_id + db \1 ; string_buffer +ENDM + + const getstring_command ; $44 +MACRO getstring + db getstring_command + dw \2 ; text_pointer + db \1 ; string_buffer +ENDM + + const itemnotify_command ; $45 +MACRO itemnotify + db itemnotify_command +ENDM + + const pocketisfull_command ; $46 +MACRO pocketisfull + db pocketisfull_command +ENDM + + const opentext_command ; $47 +MACRO opentext + db opentext_command +ENDM + + const refreshscreen_command ; $48 +MACRO refreshscreen + if _NARG == 0 + refreshscreen 0 + else + db refreshscreen_command + db \1 ; dummy + endc +ENDM + + const closetext_command ; $49 +MACRO closetext + db closetext_command +ENDM + + const writeunusedbyte_command ; $4a +MACRO writeunusedbyte + db writeunusedbyte_command + db \1 ; byte +ENDM + + const farwritetext_command ; $4b +MACRO farwritetext + db farwritetext_command + dba \1 +ENDM + + const writetext_command ; $4c +MACRO writetext + db writetext_command + dw \1 ; text_pointer +ENDM + + const repeattext_command ; $4d +MACRO repeattext + db repeattext_command + db \1 ; byte + db \2 ; byte +ENDM + + const yesorno_command ; $4e +MACRO yesorno + db yesorno_command +ENDM + + const loadmenu_command ; $4f +MACRO loadmenu + db loadmenu_command + dw \1 ; menu_header +ENDM + + const closewindow_command ; $50 +MACRO closewindow + db closewindow_command +ENDM + + const jumptextfaceplayer_command ; $51 +MACRO jumptextfaceplayer + db jumptextfaceplayer_command + dw \1 ; text_pointer +ENDM + + const farjumptext_command ; $52 +MACRO farjumptext + db farjumptext_command + dba \1 +ENDM + + const jumptext_command ; $53 +MACRO jumptext + db jumptext_command + dw \1 ; text_pointer +ENDM + + const waitbutton_command ; $54 +MACRO waitbutton + db waitbutton_command +ENDM + + const promptbutton_command ; $55 +MACRO promptbutton + db promptbutton_command +ENDM + + const pokepic_command ; $56 +MACRO pokepic + db pokepic_command + dw \1 ; pokemon +ENDM + + const closepokepic_command ; $57 +MACRO closepokepic + db closepokepic_command +ENDM + + const _2dmenu_command ; $58 +MACRO _2dmenu + db _2dmenu_command +ENDM + + const verticalmenu_command ; $59 +MACRO verticalmenu + db verticalmenu_command +ENDM + + const loadpikachudata_command ; $5a +MACRO loadpikachudata + db loadpikachudata_command +ENDM + + const randomwildmon_command ; $5b +MACRO randomwildmon + db randomwildmon_command +ENDM + + const loadtemptrainer_command ; $5c +MACRO loadtemptrainer + db loadtemptrainer_command +ENDM + + const loadwildmon_command ; $5d +MACRO loadwildmon + db loadwildmon_command + dw \1 ; pokemon + db \2 ; level +ENDM + + const loadtrainer_command ; $5e +MACRO loadtrainer + db loadtrainer_command + db \1 ; trainer_group + db \2 ; trainer_id +ENDM + + const startbattle_command ; $5f +MACRO startbattle + db startbattle_command +ENDM + + const reloadmapafterbattle_command ; $60 +MACRO reloadmapafterbattle + db reloadmapafterbattle_command +ENDM + + const catchtutorial_command ; $61 +MACRO catchtutorial + db catchtutorial_command + db \1 ; byte +ENDM + + const trainertext_command ; $62 +MACRO trainertext + db trainertext_command + db \1 ; text_id +ENDM + + const trainerflagaction_command ; $63 +MACRO trainerflagaction + db trainerflagaction_command + db \1 ; action +ENDM + + const winlosstext_command ; $64 +MACRO winlosstext + db winlosstext_command + dw \1 ; win_text_pointer + dw \2 ; loss_text_pointer +ENDM + + const scripttalkafter_command ; $65 +MACRO scripttalkafter + db scripttalkafter_command +ENDM + + const endifjustbattled_command ; $66 +MACRO endifjustbattled + db endifjustbattled_command +ENDM + + const checkjustbattled_command ; $67 +MACRO checkjustbattled + db checkjustbattled_command +ENDM + + const setlasttalked_command ; $68 +MACRO setlasttalked + db setlasttalked_command + db \1 ; object id +ENDM + + const applymovement_command ; $69 +MACRO applymovement + db applymovement_command + db \1 ; object id + dw \2 ; data +ENDM + + const applymovementlasttalked_command ; $6a +MACRO applymovementlasttalked + db applymovementlasttalked_command + dw \1 ; data +ENDM + + const faceplayer_command ; $6b +MACRO faceplayer + db faceplayer_command +ENDM + + const faceobject_command ; $6c +MACRO faceobject + db faceobject_command + db \1 ; object1 + db \2 ; object2 +ENDM + + const variablesprite_command ; $6d +MACRO variablesprite + db variablesprite_command + db \1 - SPRITE_VARS ; byte + db \2 ; sprite +ENDM + + const disappear_command ; $6e +MACRO disappear + db disappear_command + db \1 ; object id +ENDM + + const appear_command ; $6f +MACRO appear + db appear_command + db \1 ; object id +ENDM + + const follow_command ; $70 +MACRO follow + db follow_command + db \1 ; object2 + db \2 ; object1 +ENDM + + const stopfollow_command ; $71 +MACRO stopfollow + db stopfollow_command +ENDM + + const moveobject_command ; $72 +MACRO moveobject + db moveobject_command + db \1 ; object id + db \2 ; x + db \3 ; y +ENDM + + const writeobjectxy_command ; $73 +MACRO writeobjectxy + db writeobjectxy_command + db \1 ; object id +ENDM + + const loademote_command ; $74 +MACRO loademote + db loademote_command + db \1 ; bubble +ENDM + + const showemote_command ; $75 +MACRO showemote + db showemote_command + db \1 ; bubble + db \2 ; object id + db \3 ; time +ENDM + + const turnobject_command ; $76 +MACRO turnobject + db turnobject_command + db \1 ; object id + db \2 ; facing +ENDM + + const follownotexact_command ; $77 +MACRO follownotexact + db follownotexact_command + db \1 ; object2 + db \2 ; object1 +ENDM + + const earthquake_command ; $78 +MACRO earthquake + db earthquake_command + db \1 ; param +ENDM + + const changemapblocks_command ; $79 +MACRO changemapblocks + db changemapblocks_command + dba \1 ; map_data_pointer +ENDM + + const changeblock_command ; $7a +MACRO changeblock + db changeblock_command + db \1 ; x + db \2 ; y + db \3 ; block +ENDM + + const reloadmap_command ; $7b +MACRO reloadmap + db reloadmap_command +ENDM + + const reloadmappart_command ; $7c +MACRO reloadmappart + db reloadmappart_command +ENDM + + const writecmdqueue_command ; $7d +MACRO writecmdqueue + db writecmdqueue_command + dw \1 ; queue_pointer +ENDM + + const delcmdqueue_command ; $7e +MACRO delcmdqueue + db delcmdqueue_command + db \1 ; byte +ENDM + + const playmusic_command ; $7f +MACRO playmusic + db playmusic_command + dw \1 ; music_pointer +ENDM + + const encountermusic_command ; $80 +MACRO encountermusic + db encountermusic_command +ENDM + + const musicfadeout_command ; $81 +MACRO musicfadeout + db musicfadeout_command + dw \1 ; music + db \2 ; fadetime +ENDM + + const playmapmusic_command ; $82 +MACRO playmapmusic + db playmapmusic_command +ENDM + + const dontrestartmapmusic_command ; $83 +MACRO dontrestartmapmusic + db dontrestartmapmusic_command +ENDM + + const cry_command ; $84 +MACRO cry + db cry_command + dw \1 ; cry_id +ENDM + + const playsound_command ; $85 +MACRO playsound + db playsound_command + dw \1 ; sound_pointer +ENDM + + const waitsfx_command ; $86 +MACRO waitsfx + db waitsfx_command +ENDM + + const warpsound_command ; $87 +MACRO warpsound + db warpsound_command +ENDM + + const specialsound_command ; $88 +MACRO specialsound + db specialsound_command +ENDM + + const autoinput_command ; $89 +MACRO autoinput + db autoinput_command + dba \1 +ENDM + + const newloadmap_command ; $8a +MACRO newloadmap + db newloadmap_command + db \1 ; which_method +ENDM + + const pause_command ; $8b +MACRO pause + db pause_command + db \1 ; length +ENDM + + const deactivatefacing_command ; $8c +MACRO deactivatefacing + db deactivatefacing_command + db \1 ; time +ENDM + + const sdefer_command ; $8d +MACRO sdefer + db sdefer_command + dw \1 ; pointer +ENDM + + const warpcheck_command ; $8e +MACRO warpcheck + db warpcheck_command +ENDM + + const stopandsjump_command ; $8f +MACRO stopandsjump + db stopandsjump_command + dw \1 ; pointer +ENDM + + const endcallback_command ; $90 +MACRO endcallback + db endcallback_command +ENDM + + const end_command ; $91 +MACRO end + db end_command +ENDM + + const reloadend_command ; $92 +MACRO reloadend + db reloadend_command + db \1 ; which_method +ENDM + + const endall_command ; $93 +MACRO endall + db endall_command +ENDM + + const pokemart_command ; $94 +MACRO pokemart + db pokemart_command + db \1 ; dialog_id + dw \2 ; mart_id +ENDM + + const elevator_command ; $95 +MACRO elevator + db elevator_command + dw \1 ; floor_list_pointer +ENDM + + const trade_command ; $96 +MACRO trade + db trade_command + db \1 ; trade_id +ENDM + + const askforphonenumber_command ; $97 +MACRO askforphonenumber + db askforphonenumber_command + db \1 ; number +ENDM + + const phonecall_command ; $98 +MACRO phonecall + db phonecall_command + dw \1 ; caller_name +ENDM + + const hangup_command ; $99 +MACRO hangup + db hangup_command +ENDM + + const describedecoration_command ; $9a +MACRO describedecoration + db describedecoration_command + db \1 ; byte +ENDM + + const fruittree_command ; $9b +MACRO fruittree + db fruittree_command + db \1 ; tree_id +ENDM + + const specialphonecall_command ; $9c +MACRO specialphonecall + db specialphonecall_command + dw \1 ; call_id +ENDM + + const checkphonecall_command ; $9d +MACRO checkphonecall + db checkphonecall_command +ENDM + + const verbosegiveitem_command ; $9e +MACRO verbosegiveitem + if _NARG == 1 + verbosegiveitem \1, 1 + else + db verbosegiveitem_command + db \1 ; item + db \2 ; quantity + endc +ENDM + + const verbosegiveitemvar_command ; $9f +MACRO verbosegiveitemvar + db verbosegiveitemvar_command + db \1 ; item + db \2 ; var +ENDM + + const swarm_command ; $a0 +MACRO swarm + db swarm_command + db \1 ; flag + map_id \2 ; map +ENDM + + const halloffame_command ; $a1 +MACRO halloffame + db halloffame_command +ENDM + + const credits_command ; $a2 +MACRO credits + db credits_command +ENDM + + const warpfacing_command ; $a3 +MACRO warpfacing + db warpfacing_command + db \1 ; facing + map_id \2 ; map + db \3 ; x + db \4 ; y +ENDM + + const battletowertext_command ; $a4 +MACRO battletowertext + db battletowertext_command + db \1 ; bttext_id +ENDM + + const getlandmarkname_command ; $a5 +MACRO getlandmarkname + db getlandmarkname_command + db \2 ; landmark_id + db \1 ; string_buffer +ENDM + + const gettrainerclassname_command ; $a6 +MACRO gettrainerclassname + db gettrainerclassname_command + db \2 ; trainer_group + db \1 ; string_buffer +ENDM + + const getname_command ; $a7 +MACRO getname + db getname_command + db \2 ; type + db \3 ; id + db \1 ; memory +ENDM + + const wait_command ; $a8 +MACRO wait + db wait_command + db \1 ; duration +ENDM + + const checksave_command ; $a9 +MACRO checksave + db checksave_command +ENDM + + const loadmonindex_command ; $aa +MACRO loadmonindex + db loadmonindex_command + dw \2 ; pokemon + db \1 ; 0: don't reserve, 1-8: reserve in specific spot +ENDM + + const checkmaplockedmons_command ; $ab +MACRO checkmaplockedmons + db checkmaplockedmons_command +ENDM + +DEF NUM_EVENT_COMMANDS EQU const_value diff --git a/macros/scripts/maps.asm b/macros/scripts/maps.asm new file mode 100644 index 0000000..1181ba5 --- /dev/null +++ b/macros/scripts/maps.asm @@ -0,0 +1,190 @@ +MACRO map_id +;\1: map id + assert DEF(GROUP_\1) && DEF(MAP_\1), \ + "Missing 'map_const \1' in constants/map_constants.asm" + db GROUP_\1, MAP_\1 +ENDM + +DEF object_const_def EQUS "const_def 2" + +MACRO def_scene_scripts + REDEF _NUM_SCENE_SCRIPTS EQUS "_NUM_SCENE_SCRIPTS_\@" + db {_NUM_SCENE_SCRIPTS} + const_def + DEF {_NUM_SCENE_SCRIPTS} = 0 +ENDM + +MACRO scene_const +;\1: scene id constant + const \1 + EXPORT \1 +ENDM + +MACRO scene_script +;\1: script pointer +;\2: scene id constant + dw \1 + dw 0 ; filler + if _NARG == 2 + scene_const \2 + else + const_skip + endc + DEF {_NUM_SCENE_SCRIPTS} += 1 +ENDM + +MACRO def_callbacks + REDEF _NUM_CALLBACKS EQUS "_NUM_CALLBACKS_\@" + db {_NUM_CALLBACKS} + DEF {_NUM_CALLBACKS} = 0 +ENDM + +MACRO callback +;\1: type: a MAPCALLBACK_* constant +;\2: script pointer + dbw \1, \2 + DEF {_NUM_CALLBACKS} += 1 +ENDM + +MACRO def_warp_events + REDEF _NUM_WARP_EVENTS EQUS "_NUM_WARP_EVENTS_\@" + db {_NUM_WARP_EVENTS} + DEF {_NUM_WARP_EVENTS} = 0 +ENDM + +MACRO warp_event +;\1: x: left to right, starts at 0 +;\2: y: top to bottom, starts at 0 +;\3: map id: from constants/map_constants.asm +;\4: warp destination: starts at 1 + db \2, \1, \4 + map_id \3 + DEF {_NUM_WARP_EVENTS} += 1 +ENDM + +MACRO def_coord_events + REDEF _NUM_COORD_EVENTS EQUS "_NUM_COORD_EVENTS_\@" + db {_NUM_COORD_EVENTS} + DEF {_NUM_COORD_EVENTS} = 0 +ENDM + +MACRO coord_event +;\1: x: left to right, starts at 0 +;\2: y: top to bottom, starts at 0 +;\3: scene id: a SCENE_* constant; controlled by setscene/setmapscene +;\4: script pointer + db \3, \2, \1 + db 0 ; filler + dw \4 + dw 0 ; filler + DEF {_NUM_COORD_EVENTS} += 1 +ENDM + +MACRO def_bg_events + REDEF _NUM_BG_EVENTS EQUS "_NUM_BG_EVENTS_\@" + db {_NUM_BG_EVENTS} + DEF {_NUM_BG_EVENTS} = 0 +ENDM + +MACRO bg_event +;\1: x: left to right, starts at 0 +;\2: y: top to bottom, starts at 0 +;\3: function: a BGEVENT_* constant +;\4: script pointer + db \2, \1, \3 + dw \4 + DEF {_NUM_BG_EVENTS} += 1 +ENDM + +MACRO def_object_events + REDEF _NUM_OBJECT_EVENTS EQUS "_NUM_OBJECT_EVENTS_\@" + db {_NUM_OBJECT_EVENTS} + DEF {_NUM_OBJECT_EVENTS} = 0 +ENDM + +MACRO object_event +;\1: x: left to right, starts at 0 +;\2: y: top to bottom, starts at 0 +;\3: sprite: a SPRITE_* constant +;\4: movement function: a SPRITEMOVEDATA_* constant +;\5, \6: movement radius: x, y +;\7, \8: hour limits: h1, h2 (0-23) +; * if h1 < h2, the object_event will only appear from h1 to h2 +; * if h1 > h2, the object_event will not appear from h2 to h1 +; * if h1 == h2, the object_event will always appear +; * if h1 == -1, h2 is treated as a time-of-day value: +; a combo of MORN, DAY, and/or NITE, or -1 to always appear +;\9: palette: a PAL_NPC_* constant, or 0 for sprite default +;\<10>: function: a OBJECTTYPE_* constant +;\<11>: sight range: applies to OBJECTTYPE_TRAINER +;\<12>: script pointer +;\<13>: event flag: an EVENT_* constant, or -1 to always appear + db \3, \2 + 4, \1 + 4, \4 + dn \6, \5 + db \7, \8 + dn \9, \<10> + db \<11> + dw \<12>, \<13> + ; the dummy PlayerObjectTemplate object_event has no def_object_events + if DEF(_NUM_OBJECT_EVENTS) + DEF {_NUM_OBJECT_EVENTS} += 1 + endc +ENDM + +MACRO trainer +;\1: trainer group +;\2: trainer id +;\3: flag: an EVENT_BEAT_* constant +;\4: seen text +;\5: win text +;\6: loss text +;\7: after-battle text + dw \3 + db \1, \2 + dw \4, \5, \6, \7 +ENDM + +MACRO itemball +;\1: item: from constants/item_constants.asm +;\2: quantity: default 1 + if _NARG == 1 + itemball \1, 1 + else + db \1, \2 + endc +ENDM + +MACRO hiddenitem +;\1: item: from constants/item_constants.asm +;\2: flag: an EVENT_* constant + dwb \2, \1 +ENDM + +MACRO elevfloor +;\1: floor: a FLOOR_* constant +;\2: warp destination: starts at 1 +;\3: map id + db \1, \2 + map_id \3 +ENDM + +MACRO conditional_event +;\1: flag: an EVENT_* constant +;\2: script pointer + dw \1, \2 +ENDM + +MACRO cmdqueue +;\1: type: a CMDQUEUE_* constant +;\2: data pointer + dbw \1, \2 + dw 0 ; filler +ENDM + +MACRO stonetable +;\1: warp id +;\2: object_event id +;\3: script pointer + db \1, \2 + dw \3 +ENDM diff --git a/macros/scripts/movement.asm b/macros/scripts/movement.asm new file mode 100644 index 0000000..b5fc59b --- /dev/null +++ b/macros/scripts/movement.asm @@ -0,0 +1,222 @@ +; MovementPointers indexes (see engine/overworld/movement.asm) + const_def 0, 4 + +; Directional movements + + const movement_turn_head ; $00 +MACRO turn_head + db movement_turn_head | \1 +ENDM + + const movement_turn_step ; $04 +MACRO turn_step + db movement_turn_step | \1 +ENDM + + const movement_slow_step ; $08 +MACRO slow_step + db movement_slow_step | \1 +ENDM + + const movement_step ; $0c +MACRO step + db movement_step | \1 +ENDM + + const movement_big_step ; $10 +MACRO big_step + db movement_big_step | \1 +ENDM + + const movement_slow_slide_step ; $14 +MACRO slow_slide_step + db movement_slow_slide_step | \1 +ENDM + + const movement_slide_step ; $18 +MACRO slide_step + db movement_slide_step | \1 +ENDM + + const movement_fast_slide_step ; $1c +MACRO fast_slide_step + db movement_fast_slide_step | \1 +ENDM + + const movement_turn_away ; $20 +MACRO turn_away + db movement_turn_away | \1 +ENDM + + const movement_turn_in ; $24 +MACRO turn_in + db movement_turn_in | \1 +ENDM + + const movement_turn_waterfall ; $28 +MACRO turn_waterfall + db movement_turn_waterfall | \1 +ENDM + + const movement_slow_jump_step ; $2c +MACRO slow_jump_step + db movement_slow_jump_step | \1 +ENDM + + const movement_jump_step ; $30 +MACRO jump_step + db movement_jump_step | \1 +ENDM + + const movement_fast_jump_step ; $34 +MACRO fast_jump_step + db movement_fast_jump_step | \1 +ENDM + +DEF const_inc = 1 + +; Control + const movement_remove_sliding ; $38 +MACRO remove_sliding + db movement_remove_sliding +ENDM + + const movement_set_sliding ; $39 +MACRO set_sliding + db movement_set_sliding +ENDM + + const movement_remove_fixed_facing ; $3a +MACRO remove_fixed_facing + db movement_remove_fixed_facing +ENDM + + const movement_fix_facing ; $3b +MACRO fix_facing + db movement_fix_facing +ENDM + + const movement_show_object ; $3c +MACRO show_object + db movement_show_object +ENDM + + const movement_hide_object ; $3d +MACRO hide_object + db movement_hide_object +ENDM + +; Sleep + + const movement_step_sleep ; $3e +MACRO step_sleep + if \1 <= 8 + db movement_step_sleep + \1 - 1 + else + db movement_step_sleep + 8, \1 + endc +ENDM + + const_skip 8 ; all step_sleep values + + const movement_step_end ; $47 +MACRO step_end + db movement_step_end +ENDM + + const movement_step_48 ; $48 +MACRO step_48 + db movement_step_48 + db \1 ; ??? +ENDM + + const movement_remove_object ; $49 +MACRO remove_object + db movement_remove_object +ENDM + + const movement_step_loop ; $4a +MACRO step_loop + db movement_step_loop +ENDM + + const movement_step_4b ; $4b +MACRO step_4b + db movement_step_4b +ENDM + + const movement_teleport_from ; $4c +MACRO teleport_from + db movement_teleport_from +ENDM + + const movement_teleport_to ; $4d +MACRO teleport_to + db movement_teleport_to +ENDM + + const movement_skyfall ; $4e +MACRO skyfall + db movement_skyfall +ENDM + + const movement_step_dig ; $4f +MACRO step_dig + db movement_step_dig + db \1 ; length +ENDM + + const movement_step_bump ; $50 +MACRO step_bump + db movement_step_bump +ENDM + + const movement_fish_got_bite ; $51 +MACRO fish_got_bite + db movement_fish_got_bite +ENDM + + const movement_fish_cast_rod ; $52 +MACRO fish_cast_rod + db movement_fish_cast_rod +ENDM + + const movement_hide_emote ; $53 +MACRO hide_emote + db movement_hide_emote +ENDM + + const movement_show_emote ; $54 +MACRO show_emote + db movement_show_emote +ENDM + + const movement_step_shake ; $55 +MACRO step_shake + db movement_step_shake + db \1 ; displacement +ENDM + + const movement_tree_shake ; $56 +MACRO tree_shake + db movement_tree_shake +ENDM + + const movement_rock_smash ; $57 +MACRO rock_smash + db movement_rock_smash + db \1 ; length +ENDM + + const movement_return_dig ; $58 +MACRO return_dig + db movement_return_dig + db \1 ; length +ENDM + + const movement_skyfall_top ; $59 +MACRO skyfall_top + db movement_skyfall_top +ENDM + +DEF NUM_MOVEMENT_CMDS EQU const_value diff --git a/macros/scripts/oam_anims.asm b/macros/scripts/oam_anims.asm new file mode 100644 index 0000000..f3fa9bf --- /dev/null +++ b/macros/scripts/oam_anims.asm @@ -0,0 +1,38 @@ +; Battle and sprite OAM animations + +MACRO oamframe + db \1 ; duration + DEF x = \2 + assert !(x & (1 << (OAM_X_FLIP + 1) | 1 << (OAM_Y_FLIP + 1))), \ + "oamframe duration overflows into X/Y flip bits" + if _NARG > 2 + rept _NARG - 2 + DEF x |= 1 << (\3 + 1) + shift + endr + endc + db x ; flags +ENDM + + const_def -1, -1 + + const oamend_command ; $ff +MACRO oamend + db oamend_command +ENDM + + const oamrestart_command ; $fe +MACRO oamrestart + db oamrestart_command +ENDM + + const oamwait_command ; $fd +MACRO oamwait + db oamwait_command + db \1 ; frames +ENDM + + const oamdelete_command ; $fc +MACRO oamdelete + db oamdelete_command +ENDM diff --git a/macros/scripts/pic_anims.asm b/macros/scripts/pic_anims.asm new file mode 100644 index 0000000..4532046 --- /dev/null +++ b/macros/scripts/pic_anims.asm @@ -0,0 +1,28 @@ +MACRO frame + if _NARG <= 2 + db \1 ; index + db \2 ; duration + else + ; LEGACY: Support for the old name of "oamanim" + oamanim \# + endc +ENDM + + const_def -1, -1 + + const endanim_command ; $ff +MACRO endanim + db endanim_command +ENDM + + const setrepeat_command ; $fe +MACRO setrepeat + db setrepeat_command + db \1 ; amount of times to repeat +ENDM + + const dorepeat_command ; $fd +MACRO dorepeat + db dorepeat_command + db \1 ; command offset to jump to +ENDM diff --git a/macros/scripts/text.asm b/macros/scripts/text.asm new file mode 100644 index 0000000..fac922b --- /dev/null +++ b/macros/scripts/text.asm @@ -0,0 +1,147 @@ +DEF text EQUS "db TX_START," ; Start writing text. +DEF next EQUS "db \"\"," ; Move a line down. +DEF line EQUS "db \"\"," ; Start writing at the bottom line. +DEF page EQUS "db \"@\"," ; Start a new Pokédex page. +DEF para EQUS "db \"\"," ; Start a new paragraph. +DEF cont EQUS "db \"\"," ; Scroll to the next line. +DEF done EQUS "db \"\"" ; End a text box. +DEF prompt EQUS "db \"\"" ; Prompt the player to end a text box (initiating some other event). + +; TextCommands indexes (see home/text.asm) + const_def + + const TX_START ; $00 +MACRO text_start + db TX_START +ENDM + + const TX_RAM ; $01 +MACRO text_ram + db TX_RAM + dw \1 +ENDM + + const TX_BCD ; $02 +MACRO text_bcd + db TX_BCD + dw \1 + db \2 +ENDM + + const TX_MOVE ; $03 +MACRO text_move + db TX_MOVE + dw \1 +ENDM + + const TX_BOX ; $04 +MACRO text_box + db TX_BOX + dw \1 + db \2, \3 +ENDM + + const TX_LOW ; $05 +MACRO text_low + db TX_LOW +ENDM + + const TX_PROMPT_BUTTON ; $06 +MACRO text_promptbutton + db TX_PROMPT_BUTTON +ENDM + + const TX_SCROLL ; $07 +MACRO text_scroll + db TX_SCROLL +ENDM + + const TX_START_ASM ; $08 +MACRO text_asm + db TX_START_ASM +ENDM + + const TX_DECIMAL ; $09 +MACRO text_decimal + db TX_DECIMAL + dw \1 ; address + dn \2, \3 ; bytes, digits +ENDM + + const TX_PAUSE ; $0a +MACRO text_pause + db TX_PAUSE +ENDM + + const TX_SOUND_DEX_FANFARE_50_79 ; $0b +MACRO sound_dex_fanfare_50_79 + db TX_SOUND_DEX_FANFARE_50_79 +ENDM + + const TX_DOTS ; $0c +MACRO text_dots + db TX_DOTS + db \1 +ENDM + + const TX_WAIT_BUTTON ; $0d +MACRO text_waitbutton + db TX_WAIT_BUTTON +ENDM + + const TX_SOUND_DEX_FANFARE_20_49 ; $0e +MACRO sound_dex_fanfare_20_49 + db TX_SOUND_DEX_FANFARE_20_49 +ENDM + + const TX_SOUND_ITEM ; $0f +MACRO sound_item + db TX_SOUND_ITEM +ENDM + + const TX_SOUND_CAUGHT_MON ; $10 +MACRO sound_caught_mon + db TX_SOUND_CAUGHT_MON +ENDM + + const TX_SOUND_DEX_FANFARE_80_109 ; $11 +MACRO sound_dex_fanfare_80_109 + db TX_SOUND_DEX_FANFARE_80_109 +ENDM + + const TX_SOUND_FANFARE ; $12 +MACRO sound_fanfare + db TX_SOUND_FANFARE +ENDM + + const TX_SOUND_SLOT_MACHINE_START ; $13 +MACRO sound_slot_machine_start + db TX_SOUND_SLOT_MACHINE_START +ENDM + + const TX_STRINGBUFFER ; $14 +MACRO text_buffer + db TX_STRINGBUFFER + db \1 +ENDM + + const TX_DAY ; $15 +MACRO text_today + db TX_DAY +ENDM + + const TX_FAR ; $16 +MACRO text_far + db TX_FAR + dw \1 + db BANK(\1) +ENDM + +DEF NUM_TEXT_CMDS EQU const_value + + const_next $50 + + const TX_END ; $50 +MACRO text_end + db TX_END +ENDM diff --git a/macros/vc.asm b/macros/vc.asm new file mode 100644 index 0000000..c2298fb --- /dev/null +++ b/macros/vc.asm @@ -0,0 +1,29 @@ +; Virtual Console macros + +MACRO vc_hook + if DEF(_CRYSTAL_VC) + .VC_\1:: + endc +ENDM + +MACRO vc_patch + if DEF(_CRYSTAL_VC) + assert !DEF(CURRENT_VC_PATCH), "Already started a vc_patch" + DEF CURRENT_VC_PATCH EQUS "\1" + .VC_{CURRENT_VC_PATCH}:: + endc +ENDM + +MACRO vc_patch_end + if DEF(_CRYSTAL_VC) + assert DEF(CURRENT_VC_PATCH), "No vc_patch started" + .VC_{CURRENT_VC_PATCH}_End:: + PURGE CURRENT_VC_PATCH + endc +ENDM + +MACRO vc_assert + if DEF(_CRYSTAL_VC) + assert \# + endc +ENDM diff --git a/macros/wram_16bit.asm b/macros/wram_16bit.asm new file mode 100644 index 0000000..97e2c5f --- /dev/null +++ b/macros/wram_16bit.asm @@ -0,0 +1,65 @@ +MACRO ___wram_conversion_table + ; in: + ; 1: name of the table; will be prefixed to all definitions + ; 2: table size, in entries + ; 3: locked ID table size + ; 4: last allocations table size + ; 5: cache size + assert (\2) <= $FE, \ + "16-bit conversion table error: too many table entries" + assert (\2) >= $20, \ + "16-bit conversion table error: too many table entries" + assert ((\3) + (\4)) <= (\2), \ + "16-bit conversion table error: too many fixed indexes" + + assert (\4) >= 2, \ + "16-bit conversion table error: recent allocations table must contain at least two entries" + + assert !((\5) & ((\5) - 1)), \ + "16-bit conversion table error: invalid cache size" + + assert ((\3) + (\4) + (\5)) <= $100, \ + "16-bit conversion table error: cache would straddle a $100 alignment boundary" + +\1:: + +\1UsedSlots:: db +\1LastAllocatedIndex:: db ; index into LastAllocated +\1Entries:: ds 2 * (\2) +\1EntriesEnd:: + +; pad to a multiple of $100; ensure that the remaining values share the same high byte + DEF ___total_bytes = 2 + (2 * (\2)) + (\3) + (\4) + (\5) + if LOW(___total_bytes) + ds $100 - LOW(___total_bytes) + endc + + if \5 + \1EntryCache:: ds \5 + endc + + if \3 + \1LockedEntries:: ds \3 + endc + +\1LastAllocated:: ds \4 + +\1End:: + +ENDM + +MACRO wram_conversion_table + ; uses constants to invoke the macro above + ; in: WRAM prefix, constant prefix + assert \2_MINIMUM_RESERVED_INDEX <= $FF, \ + "16-bit conversion table error: $FF must be declared as a reserved index" + + assert \2_ENTRIES < \2_MINIMUM_RESERVED_INDEX, \ + "16-bit conversion table error: table entries and reserved indexes overlap" + + ___wram_conversion_table \1, \ + \2_ENTRIES, \ + \2_LOCKED_ENTRIES, \ + \2_SAVED_RECENT_INDEXES, \ + \2_CACHE_SIZE +ENDM diff --git a/main.asm b/main.asm new file mode 100644 index 0000000..8095928 --- /dev/null +++ b/main.asm @@ -0,0 +1,695 @@ +SECTION "bank1", ROMX + +INCLUDE "engine/link/place_waiting_text.asm" +INCLUDE "engine/gfx/load_push_oam.asm" +INCLUDE "engine/overworld/map_objects.asm" +INCLUDE "engine/menus/intro_menu.asm" +INCLUDE "engine/overworld/init_map.asm" +INCLUDE "engine/pokemon/learn.asm" +INCLUDE "engine/pokemon/correct_nick_errors.asm" +INCLUDE "engine/math/math.asm" +INCLUDE "data/items/attributes.asm" +INCLUDE "engine/overworld/npc_movement.asm" +INCLUDE "engine/events/happiness_egg.asm" +INCLUDE "engine/events/shuckle.asm" +INCLUDE "engine/events/haircut.asm" + + +SECTION "bank2", ROMX + +INCLUDE "engine/overworld/player_object.asm" +INCLUDE "engine/math/sine.asm" +INCLUDE "engine/predef.asm" +INCLUDE "engine/gfx/color.asm" + + +SECTION "bank3", ROMX + +INCLUDE "engine/events/checktime.asm" +INCLUDE "engine/events/specials.asm" +INCLUDE "engine/math/print_num.asm" +INCLUDE "engine/pokemon/health.asm" +INCLUDE "engine/events/overworld.asm" +INCLUDE "engine/items/items.asm" +INCLUDE "engine/overworld/player_step.asm" +INCLUDE "engine/battle/anim_hp_bar.asm" +INCLUDE "engine/pokemon/move_mon.asm" +INCLUDE "engine/pokemon/bills_pc_top.asm" +INCLUDE "engine/pokemon/breedmon_level_growth.asm" +INCLUDE "engine/events/bug_contest/caught_mon.asm" +INCLUDE "engine/items/item_effects.asm" +INCLUDE "engine/battle_anims/pokeball_wobble.asm" +INCLUDE "engine/pokemon/knows_move.asm" + + +SECTION "bank4", ROMX + +INCLUDE "engine/items/pack.asm" +INCLUDE "engine/overworld/time.asm" +INCLUDE "engine/items/tmhm2.asm" +INCLUDE "engine/menus/naming_screen.asm" +INCLUDE "engine/events/misc_scripts.asm" +INCLUDE "engine/events/heal_machine_anim.asm" +INCLUDE "engine/events/whiteout.asm" +INCLUDE "engine/events/forced_movement.asm" +INCLUDE "engine/events/itemfinder.asm" +INCLUDE "engine/menus/start_menu.asm" +INCLUDE "engine/pokemon/mon_menu.asm" +INCLUDE "engine/overworld/select_menu.asm" +INCLUDE "engine/events/elevator.asm" +INCLUDE "engine/events/bug_contest/contest.asm" +INCLUDE "engine/events/repel.asm" +INCLUDE "engine/events/hidden_item.asm" +INCLUDE "engine/events/std_collision.asm" +INCLUDE "engine/events/bug_contest/judging.asm" +INCLUDE "engine/events/pokerus/apply_pokerus_tick.asm" +INCLUDE "engine/events/bug_contest/contest_2.asm" +INCLUDE "engine/pokemon/correct_party_errors.asm" +INCLUDE "engine/math/get_square_root.asm" + + +SECTION "bank5", ROMX + +INCLUDE "engine/rtc/rtc.asm" +INCLUDE "engine/overworld/overworld.asm" +INCLUDE "engine/overworld/tile_events.asm" +INCLUDE "engine/menus/save.asm" +INCLUDE "engine/overworld/spawn_points.asm" +INCLUDE "engine/overworld/map_setup.asm" +INCLUDE "engine/events/pokecenter_pc.asm" +INCLUDE "engine/items/mart.asm" +INCLUDE "engine/events/money.asm" +INCLUDE "data/items/marts.asm" +INCLUDE "engine/events/mom.asm" +INCLUDE "engine/events/daycare.asm" +INCLUDE "engine/events/print_unown.asm" +INCLUDE "engine/events/print_photo.asm" +INCLUDE "engine/pokemon/breeding.asm" + + +SECTION "Roofs", ROMX + +INCLUDE "engine/tilesets/mapgroup_roofs.asm" + + +SECTION "Clock Reset", ROMX + +INCLUDE "engine/rtc/restart_clock.asm" + + +SECTION "bank9", ROMX + +INCLUDE "data/text_buffers.asm" +INCLUDE "engine/menus/menu.asm" +INCLUDE "engine/items/update_item_description.asm" +INCLUDE "engine/events/pokepic.asm" +INCLUDE "engine/overworld/map_objects_2.asm" +INCLUDE "engine/menus/scrolling_menu.asm" +INCLUDE "engine/items/switch_items.asm" +INCLUDE "engine/menus/menu_2.asm" +INCLUDE "engine/pokemon/mon_submenu.asm" +INCLUDE "engine/battle/menu.asm" +INCLUDE "engine/items/buy_sell_toss.asm" +INCLUDE "engine/menus/trainer_card.asm" +INCLUDE "engine/events/prof_oaks_pc.asm" +INCLUDE "engine/overworld/decorations.asm" +INCLUDE "engine/pokemon/level_up_happiness.asm" +INCLUDE "engine/battle/read_trainer_dvs.asm" +INCLUDE "engine/battle/returntobattle_useball.asm" +INCLUDE "engine/battle/consume_held_item.asm" +INCLUDE "data/moves/effects.asm" +INCLUDE "engine/events/kurt_selectquantity_interpretjoypad.asm" + + +SECTION "bankA", ROMX + +INCLUDE "engine/overworld/wildmons.asm" + + +SECTION "bankB", ROMX + +INCLUDE "engine/battle/trainer_huds.asm" +INCLUDE "data/trainers/class_names.asm" +INCLUDE "engine/battle/ai/redundant.asm" +INCLUDE "engine/events/move_deleter.asm" +INCLUDE "engine/link/mystery_gift_2.asm" +INCLUDE "engine/items/tmhm.asm" +INCLUDE "engine/pokemon/print_move_description.asm" +INCLUDE "engine/events/pokerus/pokerus.asm" +INCLUDE "engine/battle/start_battle.asm" +INCLUDE "engine/gfx/place_graphic.asm" + + +SECTION "Effect Commands", ROMX + +INCLUDE "engine/battle/effect_commands.asm" + + +SECTION "Enemy Trainers", ROMX + +INCLUDE "engine/battle/ai/items.asm" +INCLUDE "engine/battle/ai/scoring.asm" +INCLUDE "engine/battle/read_trainer_attributes.asm" +INCLUDE "engine/battle/read_trainer_party.asm" + + +SECTION "Battle Core", ROMX + +INCLUDE "engine/battle/core.asm" +INCLUDE "data/battle/effect_command_pointers.asm" + + +SECTION "bank10", ROMX + +INCLUDE "engine/pokedex/pokedex.asm" +INCLUDE "data/moves/moves.asm" +INCLUDE "engine/pokemon/evolve.asm" + + +SECTION "bank11", ROMX + +INCLUDE "engine/events/fruit_trees.asm" +INCLUDE "engine/battle/ai/move.asm" +INCLUDE "engine/pokedex/pokedex_2.asm" +INCLUDE "engine/pokemon/mail.asm" + + +SECTION "Crystal Features 1", ROMX + +INCLUDE "engine/menus/init_gender.asm" +INCLUDE "engine/items/pack_kris.asm" +INCLUDE "engine/events/move_tutor.asm" +INCLUDE "engine/gfx/crystal_layouts.asm" +INCLUDE "engine/events/celebi.asm" +INCLUDE "engine/menus/main_menu.asm" +INCLUDE "mobile/mobile_menu.asm" +INCLUDE "engine/pokemon/search_owned.asm" +INCLUDE "mobile/mobile_12_2.asm" +INCLUDE "engine/events/buena_menu.asm" + + +SECTION "bank13", ROMX + +INCLUDE "engine/tilesets/map_palettes.asm" +INCLUDE "gfx/tileset_palette_maps.asm" +INCLUDE "data/collision/collision_permissions.asm" +INCLUDE "engine/menus/empty_sram.asm" +INCLUDE "engine/menus/savemenu_copytilemapatonce.asm" +INCLUDE "engine/events/checksave.asm" +INCLUDE "data/maps/scenes.asm" +INCLUDE "engine/overworld/load_map_part.asm" +INCLUDE "engine/phone/phonering_copytilemapatonce.asm" + + +SECTION "bank13_2", ROMX + +INCLUDE "engine/link/link_2.asm" +INCLUDE "engine/rtc/reset_password.asm" +INCLUDE "engine/menus/delete_save.asm" +INCLUDE "data/tilesets.asm" +INCLUDE "engine/smallflag.asm" +INCLUDE "engine/gfx/trademon_frontpic.asm" +INCLUDE "engine/events/pokerus/check_pokerus.asm" +INCLUDE "engine/events/lucky_number.asm" +INCLUDE "engine/pokemon/caught_data.asm" +INCLUDE "engine/pokemon/search_party.asm" +INCLUDE "engine/pokemon/stats_screen.asm" +INCLUDE "engine/events/catch_tutorial.asm" +INCLUDE "engine/movie/evolution_animation.asm" +INCLUDE "engine/movie/init_hof_credits.asm" +INCLUDE "engine/events/battle_tower/get_trainer_class.asm" +INCLUDE "engine/battle/sliding_intro.asm" +INCLUDE "mobile/print_opp_message.asm" +INCLUDE "engine/battle/check_battle_scene.asm" +INCLUDE "engine/movie/gbc_only.asm" +INCLUDE "engine/events/poke_seer.asm" + + +SECTION "bank14", ROMX + +INCLUDE "engine/pokemon/party_menu.asm" +INCLUDE "engine/events/poisonstep.asm" +INCLUDE "engine/events/sweet_scent.asm" +INCLUDE "engine/events/squirtbottle.asm" +INCLUDE "engine/events/card_key.asm" +INCLUDE "engine/events/basement_key.asm" +INCLUDE "engine/events/sacred_ash.asm" +INCLUDE "engine/pokemon/tempmon.asm" +INCLUDE "engine/pokemon/types.asm" +INCLUDE "engine/pokemon/mon_stats.asm" +INCLUDE "engine/link/init_list.asm" +INCLUDE "engine/pokemon/experience.asm" +INCLUDE "engine/pokemon/switchpartymons.asm" +INCLUDE "engine/gfx/load_pics.asm" +INCLUDE "engine/pokemon/move_mon_wo_mail.asm" +INCLUDE "data/pokemon/base_stats.asm" +INCLUDE "data/pokemon/names.asm" + + +SECTION "Crystal Phone Text", ROMX + +INCLUDE "data/phone/text/irwin_caller.asm" +INCLUDE "data/phone/text/arnie_caller.asm" +INCLUDE "data/phone/text/alan_caller.asm" +INCLUDE "data/phone/text/dana_caller.asm" +INCLUDE "data/phone/text/chad_caller.asm" +INCLUDE "data/phone/text/derek_caller.asm" +INCLUDE "data/phone/text/tully_caller.asm" +INCLUDE "data/phone/text/brent_caller.asm" +INCLUDE "data/phone/text/tiffany_caller.asm" +INCLUDE "data/phone/text/vance_caller.asm" +INCLUDE "data/phone/text/wilton_caller.asm" +INCLUDE "data/phone/text/kenji_caller.asm" +INCLUDE "data/phone/text/parry_caller.asm" +INCLUDE "data/phone/text/erin_caller.asm" + + +SECTION "bank20", ROMX + +INCLUDE "engine/overworld/player_movement.asm" +INCLUDE "engine/events/engine_flags.asm" +INCLUDE "engine/overworld/variables.asm" +INCLUDE "data/text/battle.asm" + + +SECTION "bank21", ROMX + +INCLUDE "engine/printer/printer_serial.asm" +INCLUDE "engine/printer/printer.asm" +INCLUDE "gfx/battle_anims.asm" +INCLUDE "engine/events/halloffame.asm" + + +SECTION "Crystal Features 2", ROMX + +INCLUDE "engine/events/kurt.asm" +INCLUDE "engine/gfx/player_gfx.asm" +INCLUDE "mobile/mobile_22.asm" +INCLUDE "engine/events/unown_walls.asm" +INCLUDE "engine/events/buena.asm" +INCLUDE "engine/events/dratini.asm" +INCLUDE "engine/events/battle_tower/rules.asm" +INCLUDE "mobile/mobile_22_2.asm" + + +SECTION "bank23", ROMX + +INCLUDE "engine/tilesets/timeofday_pals.asm" +INCLUDE "engine/battle/battle_transition.asm" +INCLUDE "engine/events/field_moves.asm" +INCLUDE "engine/events/magnet_train.asm" +INCLUDE "engine/battle/battlestart_copytilemapatonce.asm" +INCLUDE "engine/gfx/sprites.asm" +INCLUDE "engine/gfx/mon_icons.asm" + + +SECTION "bank24", ROMX + +INCLUDE "engine/phone/phone.asm" +INCLUDE "engine/rtc/timeset.asm" +INCLUDE "engine/pokegear/pokegear.asm" +INCLUDE "engine/events/fish.asm" +INCLUDE "engine/games/slot_machine.asm" +INCLUDE "data/pokemon/first_stages.asm" + +SECTION "Phone Scripts 1", ROMX + +INCLUDE "engine/phone/scripts/generic_caller.asm" +INCLUDE "engine/phone/scripts/jack_gossip.asm" +INCLUDE "engine/phone/scripts/liz_gossip.asm" +INCLUDE "engine/phone/scripts/chad_gossip.asm" +INCLUDE "engine/phone/scripts/brent_gossip.asm" +INCLUDE "engine/phone/scripts/irwin_gossip.asm" +INCLUDE "engine/phone/scripts/hangups.asm" +INCLUDE "engine/phone/scripts/reminders.asm" +INCLUDE "engine/phone/scripts/hangups_2.asm" +INCLUDE "engine/phone/scripts/reminders_2.asm" +INCLUDE "engine/phone/scripts/bike_shop.asm" +INCLUDE "engine/phone/scripts/buena.asm" + + +SECTION "Phone Text", ROMX + +INCLUDE "data/phone/text/anthony_overworld.asm" +INCLUDE "data/phone/text/todd_overworld.asm" +INCLUDE "data/phone/text/gina_overworld.asm" +INCLUDE "data/phone/text/irwin_overworld.asm" +INCLUDE "data/phone/text/arnie_overworld.asm" +INCLUDE "data/phone/text/alan_overworld.asm" +INCLUDE "data/phone/text/dana_overworld.asm" +INCLUDE "data/phone/text/chad_overworld.asm" +INCLUDE "data/phone/text/derek_overworld.asm" +INCLUDE "data/phone/text/tully_overworld.asm" +INCLUDE "data/phone/text/brent_overworld.asm" +INCLUDE "data/phone/text/tiffany_overworld.asm" +INCLUDE "data/phone/text/vance_overworld.asm" +INCLUDE "data/phone/text/wilton_overworld.asm" +INCLUDE "data/phone/text/kenji_overworld.asm" +INCLUDE "data/phone/text/parry_overworld.asm" +INCLUDE "data/phone/text/erin_overworld.asm" + + +SECTION "bank2E", ROMX + +INCLUDE "engine/events/map_name_sign.asm" +INCLUDE "engine/events/checkforhiddenitems.asm" +INCLUDE "engine/events/treemons.asm" +INCLUDE "engine/events/fishing_gfx.asm" +INCLUDE "engine/pokegear/radio.asm" +INCLUDE "engine/pokemon/mail_2.asm" + + +SECTION "Phone Scripts 2", ROMX + +INCLUDE "engine/events/std_scripts.asm" +INCLUDE "engine/phone/scripts/unused.asm" +INCLUDE "engine/phone/scripts/mom.asm" +INCLUDE "engine/phone/scripts/bill.asm" +INCLUDE "engine/phone/scripts/elm.asm" +INCLUDE "engine/phone/scripts/jack.asm" +INCLUDE "engine/phone/scripts/beverly.asm" +INCLUDE "engine/phone/scripts/huey.asm" +INCLUDE "engine/phone/scripts/gaven.asm" +INCLUDE "engine/phone/scripts/beth.asm" +INCLUDE "engine/phone/scripts/jose.asm" +INCLUDE "engine/phone/scripts/reena.asm" +INCLUDE "engine/phone/scripts/joey.asm" +INCLUDE "engine/phone/scripts/wade.asm" +INCLUDE "engine/phone/scripts/ralph.asm" +INCLUDE "engine/phone/scripts/liz.asm" +INCLUDE "engine/phone/scripts/anthony.asm" +INCLUDE "engine/phone/scripts/todd.asm" +INCLUDE "engine/phone/scripts/gina.asm" +INCLUDE "engine/phone/scripts/irwin.asm" +INCLUDE "engine/phone/scripts/arnie.asm" +INCLUDE "engine/phone/scripts/alan.asm" +INCLUDE "engine/phone/scripts/dana.asm" +INCLUDE "engine/phone/scripts/chad.asm" +INCLUDE "engine/phone/scripts/derek.asm" +INCLUDE "engine/phone/scripts/tully.asm" +INCLUDE "engine/phone/scripts/brent.asm" +INCLUDE "engine/phone/scripts/tiffany.asm" +INCLUDE "engine/phone/scripts/vance.asm" +INCLUDE "engine/phone/scripts/wilton.asm" +INCLUDE "engine/phone/scripts/kenji.asm" +INCLUDE "engine/phone/scripts/parry.asm" +INCLUDE "engine/phone/scripts/erin.asm" +INCLUDE "engine/phone/scripts/generic_callee.asm" +INCLUDE "engine/events/trainer_scripts.asm" + + +SECTION "bank32", ROMX + +INCLUDE "engine/battle_anims/bg_effects.asm" +INCLUDE "data/moves/animations.asm" +INCLUDE "engine/events/poisonstep_pals.asm" + + +SECTION "Move Animations", ROMX + +INCLUDE "engine/events/bug_contest/display_stats.asm" +INCLUDE "engine/battle_anims/anim_commands.asm" +INCLUDE "engine/battle_anims/core.asm" +INCLUDE "engine/battle_anims/functions.asm" +INCLUDE "engine/battle_anims/helpers.asm" + + +SECTION "Pic Animations 1", ROMX + +INCLUDE "engine/gfx/pic_animation.asm" +INCLUDE "gfx/pokemon/anim_pointers.asm" +INCLUDE "gfx/pokemon/anims.asm" +INCLUDE "gfx/pokemon/idle_pointers.asm" +INCLUDE "gfx/pokemon/idles.asm" +INCLUDE "gfx/pokemon/unown_anim_pointers.asm" +INCLUDE "gfx/pokemon/unown_anims.asm" +INCLUDE "gfx/pokemon/unown_idle_pointers.asm" +INCLUDE "gfx/pokemon/unown_idles.asm" +INCLUDE "gfx/pokemon/bitmask_pointers.asm" +INCLUDE "gfx/pokemon/bitmasks.asm" +INCLUDE "gfx/pokemon/unown_bitmask_pointers.asm" +INCLUDE "gfx/pokemon/unown_bitmasks.asm" + + +SECTION "Pic Animations 2", ROMX + +INCLUDE "gfx/pokemon/frame_pointers.asm" +INCLUDE "gfx/pokemon/kanto_frames.asm" + + +SECTION "Pic Animations 3", ROMX + +INCLUDE "gfx/pokemon/johto_frames.asm" +INCLUDE "gfx/pokemon/unown_frame_pointers.asm" +INCLUDE "gfx/pokemon/unown_frames.asm" + + +SECTION "bank38", ROMX + +INCLUDE "engine/events/print_unown_2.asm" +INCLUDE "engine/games/card_flip.asm" +INCLUDE "engine/games/unown_puzzle.asm" +INCLUDE "engine/games/memory_game.asm" +INCLUDE "engine/pokemon/bills_pc.asm" + + +SECTION "bank39", ROMX + +INCLUDE "engine/menus/options_menu.asm" +INCLUDE "engine/movie/splash.asm" +INCLUDE "engine/movie/intro.asm" + + +SECTION "bank3E", ROMX + +INCLUDE "engine/gfx/load_font.asm" +INCLUDE "engine/link/time_capsule.asm" +INCLUDE "engine/events/name_rater.asm" +INCLUDE "engine/events/play_slow_cry.asm" +INCLUDE "engine/pokedex/new_pokedex_entry.asm" +INCLUDE "engine/link/time_capsule_2.asm" +INCLUDE "engine/pokedex/unown_dex.asm" +INCLUDE "engine/events/magikarp.asm" +INCLUDE "engine/battle/hidden_power.asm" +INCLUDE "engine/battle/misc.asm" + + +SECTION "bank3F", ROMX + +INCLUDE "engine/tilesets/tileset_anims.asm" +INCLUDE "engine/events/npc_trade.asm" +INCLUDE "engine/events/mom_phone.asm" + + +SECTION "mobile40", ROMX + +INCLUDE "mobile/mobile_40.asm" + + +SECTION "bank41", ROMX + +INCLUDE "engine/gfx/dma_transfer.asm" +INCLUDE "gfx/emotes.asm" +INCLUDE "engine/overworld/warp_connection.asm" +INCLUDE "engine/link/mystery_gift.asm" +INCLUDE "engine/battle/used_move_text.asm" +INCLUDE "mobile/mobile_41.asm" +INCLUDE "engine/gfx/load_overworld_font.asm" + + +SECTION "mobile42", ROMX + +INCLUDE "mobile/mobile_42.asm" + + +SECTION "Title", ROMX + +INCLUDE "engine/movie/title.asm" + + +SECTION "mobile45", ROMX + +INCLUDE "mobile/mobile_45_sprite_engine.asm" +INCLUDE "mobile/mobile_45_2.asm" +INCLUDE "mobile/mobile_45_stadium.asm" + + +SECTION "mobile46", ROMX + +INCLUDE "mobile/mobile_46.asm" + + +SECTION "Battle Tower", ROMX + +INCLUDE "engine/events/battle_tower/trainer_text.asm" + + +SECTION "bank5B", ROMX + +INCLUDE "mobile/mobile_5b.asm" +INCLUDE "engine/link/link_trade.asm" +INCLUDE "engine/link/link.asm" +INCLUDE "engine/battle/link_result.asm" + + +SECTION "mobile5C", ROMX + +INCLUDE "mobile/mobile_5c.asm" + + +SECTION "Crystal Phone Text 2", ROMX + +INCLUDE "data/phone/text/bike_shop.asm" +INCLUDE "data/phone/text/jack_caller.asm" +INCLUDE "data/phone/text/beverly_caller.asm" +INCLUDE "data/phone/text/huey_caller.asm" +INCLUDE "data/phone/text/gaven_caller.asm" +INCLUDE "data/phone/text/beth_caller.asm" +INCLUDE "data/phone/text/jose_caller.asm" +INCLUDE "data/phone/text/reena_caller.asm" +INCLUDE "data/phone/text/joey_caller.asm" +INCLUDE "data/phone/text/wade_caller.asm" +INCLUDE "data/phone/text/ralph_caller.asm" +INCLUDE "data/phone/text/liz_caller.asm" +INCLUDE "data/phone/text/anthony_caller.asm" +INCLUDE "data/phone/text/todd_caller.asm" +INCLUDE "data/phone/text/gina_caller.asm" + + +SECTION "UpdateBattleHUDs", ROMX + +INCLUDE "engine/battle/update_battle_huds.asm" + + +SECTION "mobile5E", ROMX + +INCLUDE "mobile/mobile_5e.asm" + + +SECTION "mobile5F", ROMX + +INCLUDE "mobile/mobile_5f.asm" + + +SECTION "Phone Text 2", ROMX + +INCLUDE "data/text/std_text.asm" +INCLUDE "data/phone/text/jack_overworld.asm" +INCLUDE "data/phone/text/beverly_overworld.asm" +INCLUDE "data/phone/text/huey_overworld.asm" +INCLUDE "data/phone/text/gaven_overworld.asm" +INCLUDE "data/phone/text/beth_overworld.asm" +INCLUDE "data/phone/text/jose_overworld.asm" +INCLUDE "data/phone/text/reena_overworld.asm" +INCLUDE "data/phone/text/joey_overworld.asm" +INCLUDE "data/phone/text/wade_overworld.asm" +INCLUDE "data/phone/text/ralph_overworld.asm" +INCLUDE "data/phone/text/liz_overworld.asm" + + +SECTION "Special Phone Text", ROMX + +INCLUDE "data/phone/text/mom.asm" +INCLUDE "data/phone/text/bill.asm" +INCLUDE "data/phone/text/elm.asm" +INCLUDE "data/phone/text/jack_callee.asm" +INCLUDE "data/phone/text/beverly_callee.asm" +INCLUDE "data/phone/text/huey_callee.asm" +INCLUDE "data/phone/text/unknown_callee.asm" +INCLUDE "data/phone/text/gaven_callee.asm" +INCLUDE "data/phone/text/beth_callee.asm" +INCLUDE "data/phone/text/jose_callee.asm" +INCLUDE "data/phone/text/reena_callee.asm" +INCLUDE "data/phone/text/joey_callee.asm" +INCLUDE "data/phone/text/wade_callee.asm" +INCLUDE "data/phone/text/ralph_callee.asm" +INCLUDE "data/phone/text/liz_callee.asm" +INCLUDE "data/phone/text/anthony_callee.asm" +INCLUDE "data/phone/text/todd_callee.asm" +INCLUDE "data/phone/text/gina_callee.asm" +INCLUDE "data/phone/text/irwin_callee.asm" +INCLUDE "data/phone/text/arnie_callee.asm" +INCLUDE "data/phone/text/alan_callee.asm" +INCLUDE "data/phone/text/dana_callee.asm" +INCLUDE "data/phone/text/chad_callee.asm" +INCLUDE "data/phone/text/derek_callee.asm" +INCLUDE "data/phone/text/tully_callee.asm" +INCLUDE "data/phone/text/brent_callee.asm" +INCLUDE "data/phone/text/tiffany_callee.asm" +INCLUDE "data/phone/text/vance_callee.asm" +INCLUDE "data/phone/text/wilton_callee.asm" +INCLUDE "data/phone/text/kenji_callee.asm" +INCLUDE "data/phone/text/parry_callee.asm" +INCLUDE "data/phone/text/erin_callee.asm" +INCLUDE "data/phone/text/unused.asm" + + +SECTION "Miscellaneous Text", ROMX + +INCLUDE "data/items/names.asm" +INCLUDE "engine/items/print_item_description.asm" +INCLUDE "data/moves/names.asm" +INCLUDE "engine/overworld/landmarks.asm" + + +SECTION "Print Party", ROMX + +INCLUDE "engine/printer/print_party.asm" + + +SECTION "bank77", ROMX + +INCLUDE "engine/rtc/print_hours_mins.asm" +INCLUDE "engine/events/diploma.asm" +INCLUDE "engine/pokedex/pokedex_3.asm" +INCLUDE "engine/events/catch_tutorial_input.asm" +INCLUDE "engine/pokegear/townmap_convertlinebreakcharacters.asm" + + +SECTION "European Mail", ROMX + +INCLUDE "engine/pokemon/european_mail.asm" + + +SECTION "Debug Room", ROMX + +if DEF(_DEBUG) +INCLUDE "engine/debug/debug_room.asm" +endc + + +SECTION "Battle Tower Text", ROMX + +INCLUDE "data/battle_tower/trainer_text.asm" + + +SECTION "Battle Tower Trainer Data", ROMX + +INCLUDE "data/battle_tower/unknown.asm" + + +SECTION "Mobile News Data", ROMX + +INCLUDE "mobile/news/news.asm" + + +SECTION "Crystal Events", ROMX + +INCLUDE "engine/events/battle_tower/load_trainer.asm" +INCLUDE "engine/events/odd_egg.asm" + + +SECTION "Stadium 2 Checksums", ROMX[$7DE0], BANK[$7F] + +; The end of the ROM is taken up by checksums of the content, apparently used +; by Pokémon Stadium 2 due to the checksums' "N64PS3" header. (In Japan, +; Pokémon Stadium Gold and Silver was the third Stadium release for N64.) +; This SECTION reserves space for those checksums. +; If it is removed, also remove the "tools/stadium" command in the Makefile. + +SECTION "16-bit ID stuff", ROMX + +INCLUDE "engine/16/table_functions.asm" + +; own section +INCLUDE "data/trainers/parties.asm" diff --git a/maps/AzaleaGym.asm b/maps/AzaleaGym.asm new file mode 100644 index 0000000..ccb70eb --- /dev/null +++ b/maps/AzaleaGym.asm @@ -0,0 +1,382 @@ + object_const_def + const AZALEAGYM_BUGSY + const AZALEAGYM_BUG_CATCHER1 + const AZALEAGYM_BUG_CATCHER2 + const AZALEAGYM_BUG_CATCHER3 + const AZALEAGYM_TWIN1 + const AZALEAGYM_TWIN2 + const AZALEAGYM_GYM_GUIDE + +AzaleaGym_MapScripts: + def_scene_scripts + + def_callbacks + +AzaleaGymBugsyScript: + faceplayer + opentext + checkevent EVENT_BEAT_BUGSY + iftrue .FightDone + writetext BugsyText_INeverLose + waitbutton + closetext + winlosstext BugsyText_ResearchIncomplete, 0 + loadtrainer BUGSY, BUGSY1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_BUGSY + opentext + writetext Text_ReceivedHiveBadge + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_HIVEBADGE + readvar VAR_BADGES + scall AzaleaGymActivateRockets +.FightDone: + checkevent EVENT_GOT_TM49_FURY_CUTTER + iftrue .GotFuryCutter + setevent EVENT_BEAT_TWINS_AMY_AND_MAY + setevent EVENT_BEAT_BUG_CATCHER_BENNY + setevent EVENT_BEAT_BUG_CATCHER_AL + setevent EVENT_BEAT_BUG_CATCHER_JOSH + writetext BugsyText_HiveBadgeSpeech + promptbutton + verbosegiveitem TM_FURY_CUTTER + iffalse .NoRoomForFuryCutter + setevent EVENT_GOT_TM49_FURY_CUTTER + writetext BugsyText_FuryCutterSpeech + waitbutton + closetext + end + +.GotFuryCutter: + writetext BugsyText_BugMonsAreDeep + waitbutton +.NoRoomForFuryCutter: + closetext + end + +AzaleaGymActivateRockets: + ifequal 7, .RadioTowerRockets + ifequal 6, .GoldenrodRockets + end + +.GoldenrodRockets: + jumpstd GoldenrodRocketsScript + +.RadioTowerRockets: + jumpstd RadioTowerRocketsScript + +TrainerTwinsAmyandmay1: + trainer TWINS, AMYANDMAY1, EVENT_BEAT_TWINS_AMY_AND_MAY, TwinsAmyandmay1SeenText, TwinsAmyandmay1BeatenText, 0, .AfterScript + +.AfterScript: + endifjustbattled + opentext + writetext TwinsAmyandmay1AfterBattleText + waitbutton + closetext + end + +TrainerTwinsAmyandmay2: + trainer TWINS, AMYANDMAY2, EVENT_BEAT_TWINS_AMY_AND_MAY, TwinsAmyandmay2SeenText, TwinsAmyandmay2BeatenText, 0, .AfterScript + +.AfterScript: + endifjustbattled + opentext + writetext TwinsAmyandmay2AfterBattleText + waitbutton + closetext + end + +TrainerBugCatcherBenny: + trainer BUG_CATCHER, BUG_CATCHER_BENNY, EVENT_BEAT_BUG_CATCHER_BENNY, BugCatcherBennySeenText, BugCatcherBennyBeatenText, 0, .AfterScript + +.AfterScript: + endifjustbattled + opentext + writetext BugCatcherBennyAfterBattleText + waitbutton + closetext + end + +TrainerBugCatcherAl: + trainer BUG_CATCHER, AL, EVENT_BEAT_BUG_CATCHER_AL, BugCatcherAlSeenText, BugCatcherAlBeatenText, 0, .AfterScript + +.AfterScript: + endifjustbattled + opentext + writetext BugCatcherAlAfterBattleText + waitbutton + closetext + end + +TrainerBugCatcherJosh: + trainer BUG_CATCHER, JOSH, EVENT_BEAT_BUG_CATCHER_JOSH, BugCatcherJoshSeenText, BugCatcherJoshBeatenText, 0, .AfterScript + +.AfterScript: + endifjustbattled + opentext + writetext BugCatcherJoshAfterBattleText + waitbutton + closetext + end + +AzaleaGymGuideScript: + faceplayer + checkevent EVENT_BEAT_BUGSY + iftrue .AzaleaGymGuideWinScript + opentext + writetext AzaleaGymGuideText + waitbutton + closetext + end + +.AzaleaGymGuideWinScript: + opentext + writetext AzaleaGymGuideWinText + waitbutton + closetext + end + +AzaleaGymStatue: + checkflag ENGINE_HIVEBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, BUGSY, BUGSY1 + jumpstd GymStatue2Script + +BugsyText_INeverLose: + text "I'm BUGSY!" + line "I never lose when" + + para "it comes to bug" + line "#MON." + + para "My research is" + line "going to make me" + + para "the authority on" + line "bug #MON!" + + para "Let me demonstrate" + line "what I've learned" + cont "from my studies." + done + +BugsyText_ResearchIncomplete: + text "Whoa, amazing!" + line "You're an expert" + cont "on #MON!" + + para "My research isn't" + line "complete yet." + + para "OK, you win. Take" + line "this BADGE." + done + +Text_ReceivedHiveBadge: + text " received" + line "HIVEBADGE." + done + +BugsyText_HiveBadgeSpeech: + text "Do you know the" + line "benefits of HIVE-" + cont "BADGE?" + + para "If you have it," + line "#MON up to L30" + + para "will obey you," + line "even traded ones." + + para "#MON that know" + line "CUT will be able" + + para "to use it outside" + line "of battle too." + + para "Here, I also want" + line "you to have this." + done + +BugsyText_FuryCutterSpeech: + text "TM49 contains" + line "FURY CUTTER." + + para "If you don't miss," + line "it gets stronger" + cont "every turn." + + para "The longer your" + line "battle goes, the" + cont "better it gets." + + para "Isn't that great?" + line "I discovered it!" + done + +BugsyText_BugMonsAreDeep: + text "Bug #MON are" + line "deep. There are" + + para "many mysteries to" + line "be explored." + + para "Study your favor-" + line "ites thoroughly." + done + +BugCatcherBennySeenText: + text "Bug #MON evolve" + line "young. So they get" + + para "stronger that much" + line "faster." + done + +BugCatcherBennyBeatenText: + text "Just evolving" + line "isn't enough!" + done + +BugCatcherBennyAfterBattleText: + text "#MON become" + line "stronger if they" + cont "evolve. Really!" + done + +BugCatcherAlSeenText: + text "Bug #MON are" + line "cool and tough!" + + para "I'll prove it to" + line "you!" + done + +BugCatcherAlBeatenText: + text "You proved how" + line "tough you are…" + done + +BugCatcherAlAfterBattleText: + text "They're so cool," + line "but most girls" + + para "don't like bug" + line "#MON." + + para "I don't know why…" + done + +BugCatcherJoshSeenText: + text "You saved all the" + line "SLOWPOKE? Whew," + cont "you're mighty!" + + para "But my grown-up" + line "#MON are pretty" + cont "tough too!" + done + +BugCatcherJoshBeatenText: + text "Urrgggh!" + done + +BugCatcherJoshAfterBattleText: + text "I guess I should" + line "teach them better" + cont "moves…" + done + +TwinsAmyandmay1SeenText: + text "AMY: Hi! Are you" + line "challenging the" + cont "LEADER? No way!" + done + +TwinsAmyandmay1BeatenText: + text "AMY & MAY: Oh," + line "double goodness!" + done + +TwinsAmyandmay1AfterBattleText: + text "AMY: You're" + line "really strong!" + done + +TwinsAmyandmay2SeenText: + text "MAY: You want to" + line "see the LEADER?" + cont "We come first!" + done + +TwinsAmyandmay2BeatenText: + text "AMY & MAY: Oh," + line "double goodness!" + done + +TwinsAmyandmay2AfterBattleText: + text "MAY: Our bug #-" + line "MON lost! Oh, what" + cont "a shame." + done + +AzaleaGymGuideText: + text "Yo, challenger!" + + para "BUGSY's young, but" + line "his knowledge of" + + para "bug #MON is for" + line "real." + + para "It's going to be" + line "tough without my" + cont "advice." + + para "Let's see… Bug" + line "#MON don't like" + cont "fire." + + para "Flying-type moves" + line "are super-effec-" + cont "tive too." + done + +AzaleaGymGuideWinText: + text "Well done! That" + line "was a great clash" + + para "of talented young" + line "trainers." + + para "With people like" + line "you, the future of" + cont "#MON is bright!" + done + +AzaleaGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 15, AZALEA_TOWN, 5 + warp_event 5, 15, AZALEA_TOWN, 5 + + def_coord_events + + def_bg_events + bg_event 3, 13, BGEVENT_READ, AzaleaGymStatue + bg_event 6, 13, BGEVENT_READ, AzaleaGymStatue + + def_object_events + object_event 5, 7, SPRITE_BUGSY, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, AzaleaGymBugsyScript, -1 + object_event 5, 3, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerBugCatcherBenny, -1 + object_event 8, 8, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBugCatcherAl, -1 + object_event 0, 2, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBugCatcherJosh, -1 + object_event 4, 10, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsAmyandmay1, -1 + object_event 5, 10, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsAmyandmay2, -1 + object_event 7, 13, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, AzaleaGymGuideScript, -1 diff --git a/maps/AzaleaGym.blk b/maps/AzaleaGym.blk new file mode 100644 index 0000000..db2e23a --- /dev/null +++ b/maps/AzaleaGym.blk @@ -0,0 +1,2 @@ + +! %& \ No newline at end of file diff --git a/maps/AzaleaMart.asm b/maps/AzaleaMart.asm new file mode 100644 index 0000000..26d7d27 --- /dev/null +++ b/maps/AzaleaMart.asm @@ -0,0 +1,60 @@ + object_const_def + const AZALEAMART_CLERK + const AZALEAMART_COOLTRAINER_M + const AZALEAMART_BUG_CATCHER + +AzaleaMart_MapScripts: + def_scene_scripts + + def_callbacks + +AzaleaMartClerkScript: + opentext + pokemart MARTTYPE_STANDARD, MART_AZALEA + closetext + end + +AzaleaMartCooltrainerMScript: + jumptextfaceplayer AzaleaMartCooltrainerMText + +AzaleaMartBugCatcherScript: + jumptextfaceplayer AzaleaMartBugCatcherText + +AzaleaMartCooltrainerMText: + text "There's no GREAT" + line "BALL here. #" + + para "BALLS will have" + line "to do." + + para "I wish KURT would" + line "make me some of" + cont "his custom BALLS." + done + +AzaleaMartBugCatcherText: + text "A GREAT BALL is" + line "better for catch-" + cont "ing #MON than a" + cont "# BALL." + + para "But KURT's might" + line "be better some-" + cont "times." + done + +AzaleaMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, AZALEA_TOWN, 3 + warp_event 3, 7, AZALEA_TOWN, 3 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaMartClerkScript, -1 + object_event 2, 5, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaMartCooltrainerMScript, -1 + object_event 7, 2, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, AzaleaMartBugCatcherScript, -1 diff --git a/maps/AzaleaPokecenter1F.asm b/maps/AzaleaPokecenter1F.asm new file mode 100644 index 0000000..4d24c6c --- /dev/null +++ b/maps/AzaleaPokecenter1F.asm @@ -0,0 +1,93 @@ + object_const_def + const AZALEAPOKECENTER1F_NURSE + const AZALEAPOKECENTER1F_GENTLEMAN + const AZALEAPOKECENTER1F_FISHING_GURU + const AZALEAPOKECENTER1F_POKEFAN_F + +AzaleaPokecenter1F_MapScripts: + def_scene_scripts + scene_script AzaleaPokecenter1FNoopScene ; unusable + + def_callbacks + +AzaleaPokecenter1FNoopScene: + end + +AzaleaPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +AzaleaPokecenter1FGentlemanScript: + jumptextfaceplayer AzaleaPokecenter1FGentlemanText + +AzaleaPokecenter1FFishingGuruScript: + jumptextfaceplayer AzaleaPokecenter1FFishingGuruText + +AzaleaPokecenter1FPokefanFScript: + jumptextfaceplayer AzaleaPokecenter1FPokefanFText + +AzaleaPokecenter1FGentlemanText: + text "Do your #MON" + line "know HM moves?" + + para "Those moves can" + line "be used even if" + + para "your #MON has" + line "fainted." + done + +AzaleaPokecenter1FUnusedText: ; unreferenced + text "This BILL guy" + line "created the system" + + para "for storing" + line "#MON in a PC." + + para "BILL's PC can" + line "store up to 20" + cont "#MON per BOX." + done + +AzaleaPokecenter1FFishingGuruText: + text "BILL's PC can" + line "store up to 20" + cont "#MON per BOX." + done + +AzaleaPokecenter1FPokefanFText: + text "Do you know about" + line "APRICORNS?" + + para "Crack one open," + line "hollow it out and" + + para "fit it with a" + line "special device." + + para "Then you can catch" + line "#MON with it." + + para "Before # BALLS" + line "were invented," + + para "everyone used" + line "APRICORNS." + done + +AzaleaPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, AZALEA_TOWN, 1 + warp_event 4, 7, AZALEA_TOWN, 1 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaPokecenter1FNurseScript, -1 + object_event 9, 6, SPRITE_GENTLEMAN, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaPokecenter1FGentlemanScript, -1 + object_event 6, 1, SPRITE_FISHING_GURU, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaPokecenter1FFishingGuruScript, -1 + object_event 1, 4, SPRITE_POKEFAN_F, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaPokecenter1FPokefanFScript, -1 diff --git a/maps/AzaleaTown.asm b/maps/AzaleaTown.asm new file mode 100644 index 0000000..7830be8 --- /dev/null +++ b/maps/AzaleaTown.asm @@ -0,0 +1,496 @@ + object_const_def + const AZALEATOWN_AZALEA_ROCKET1 + const AZALEATOWN_GRAMPS + const AZALEATOWN_TEACHER + const AZALEATOWN_YOUNGSTER + const AZALEATOWN_SLOWPOKE1 + const AZALEATOWN_SLOWPOKE2 + const AZALEATOWN_SLOWPOKE3 + const AZALEATOWN_SLOWPOKE4 + const AZALEATOWN_FRUIT_TREE + const AZALEATOWN_RIVAL + const AZALEATOWN_AZALEA_ROCKET3 + const AZALEATOWN_KURT_OUTSIDE + +AzaleaTown_MapScripts: + def_scene_scripts + scene_script AzaleaTownNoop1Scene, SCENE_AZALEATOWN_NOOP + scene_script AzaleaTownNoop2Scene, SCENE_AZALEATOWN_RIVAL_BATTLE + scene_script AzaleaTownNoop3Scene, SCENE_AZALEATOWN_KURT_RETURNS_GS_BALL + + def_callbacks + callback MAPCALLBACK_NEWMAP, AzaleaTownFlypointCallback + +AzaleaTownNoop1Scene: + end + +AzaleaTownNoop2Scene: + end + +AzaleaTownNoop3Scene: + end + +AzaleaTownFlypointCallback: + setflag ENGINE_FLYPOINT_AZALEA + endcallback + +AzaleaTownRivalBattleScene1: + moveobject AZALEATOWN_RIVAL, 11, 11 + turnobject PLAYER, RIGHT + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + pause 15 + appear AZALEATOWN_RIVAL + applymovement AZALEATOWN_RIVAL, AzaleaTownRivalBattleApproachMovement1 + turnobject PLAYER, DOWN + sjump AzaleaTownRivalBattleScript + +AzaleaTownRivalBattleScene2: + turnobject PLAYER, RIGHT + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + pause 15 + appear AZALEATOWN_RIVAL + applymovement AZALEATOWN_RIVAL, AzaleaTownRivalBattleApproachMovement2 + turnobject PLAYER, UP +AzaleaTownRivalBattleScript: + playmusic MUSIC_RIVAL_ENCOUNTER + opentext + writetext AzaleaTownRivalBeforeText + waitbutton + closetext + setevent EVENT_RIVAL_AZALEA_TOWN + checkevent EVENT_GOT_TOTODILE_FROM_ELM + iftrue .Totodile + checkevent EVENT_GOT_CHIKORITA_FROM_ELM + iftrue .Chikorita + winlosstext AzaleaTownRivalWinText, AzaleaTownRivalLossText + setlasttalked AZALEATOWN_RIVAL + loadtrainer RIVAL1, RIVAL1_2_TOTODILE + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .AfterBattle + +.Totodile: + winlosstext AzaleaTownRivalWinText, AzaleaTownRivalLossText + setlasttalked AZALEATOWN_RIVAL + loadtrainer RIVAL1, RIVAL1_2_CHIKORITA + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .AfterBattle + +.Chikorita: + winlosstext AzaleaTownRivalWinText, AzaleaTownRivalLossText + setlasttalked AZALEATOWN_RIVAL + loadtrainer RIVAL1, RIVAL1_2_CYNDAQUIL + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .AfterBattle + +.AfterBattle: + playmusic MUSIC_RIVAL_AFTER + opentext + writetext AzaleaTownRivalAfterText + waitbutton + closetext + turnobject PLAYER, LEFT + applymovement AZALEATOWN_RIVAL, AzaleaTownRivalBattleExitMovement + playsound SFX_EXIT_BUILDING + disappear AZALEATOWN_RIVAL + setscene SCENE_AZALEATOWN_NOOP + waitsfx + playmapmusic + end + +AzaleaTownRocket1Script: + jumptextfaceplayer AzaleaTownRocket1Text + +AzaleaTownRocket2Script: + jumptextfaceplayer AzaleaTownRocket2Text + +AzaleaTownGrampsScript: + faceplayer + opentext + checkevent EVENT_CLEARED_SLOWPOKE_WELL + iftrue .ClearedWell + writetext AzaleaTownGrampsTextBefore + waitbutton + closetext + end + +.ClearedWell: + writetext AzaleaTownGrampsTextAfter + waitbutton + closetext + end + +AzaleaTownTeacherScript: + jumptextfaceplayer AzaleaTownTeacherText + +AzaleaTownYoungsterScript: + jumptextfaceplayer AzaleaTownYoungsterText + +AzaleaTownSlowpokeScript: + opentext + writetext AzaleaTownSlowpokeText1 + pause 60 + writetext AzaleaTownSlowpokeText2 + cry SLOWPOKE + waitbutton + closetext + end + +UnusedWoosterScript: ; unreferenced + faceplayer + opentext + writetext WoosterText + cry QUAGSIRE + waitbutton + closetext + end + +AzaleaTownCelebiScene: + applymovement PLAYER, AzaleaTownPlayerLeavesKurtsHouseMovement + opentext + writetext AzaleaTownKurtText1 + promptbutton + turnobject AZALEATOWN_KURT_OUTSIDE, RIGHT + writetext AzaleaTownKurtText2 + promptbutton + writetext AzaleaTownKurtText3 + waitbutton + verbosegiveitem GS_BALL + turnobject AZALEATOWN_KURT_OUTSIDE, LEFT + setflag ENGINE_FOREST_IS_RESTLESS + clearevent EVENT_ILEX_FOREST_LASS + setevent EVENT_ROUTE_34_ILEX_FOREST_GATE_LASS + setscene SCENE_AZALEATOWN_NOOP + closetext + end + +AzaleaTownKurtScript: + faceplayer + opentext + writetext AzaleaTownKurtText3 + waitbutton + turnobject AZALEATOWN_KURT_OUTSIDE, LEFT + closetext + end + +AzaleaTownSign: + jumptext AzaleaTownSignText + +KurtsHouseSign: + jumptext KurtsHouseSignText + +AzaleaGymSign: + jumptext AzaleaGymSignText + +SlowpokeWellSign: + jumptext SlowpokeWellSignText + +CharcoalKilnSign: + jumptext CharcoalKilnSignText + +AzaleaTownIlextForestSign: + jumptext AzaleaTownIlexForestSignText + +AzaleaTownPokecenterSign: + jumpstd PokecenterSignScript + +AzaleaTownMartSign: + jumpstd MartSignScript + +WhiteApricornTree: + fruittree FRUITTREE_AZALEA_TOWN + +AzaleaTownHiddenFullHeal: + hiddenitem FULL_HEAL, EVENT_AZALEA_TOWN_HIDDEN_FULL_HEAL + +AzaleaTownRivalBattleApproachMovement1: + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + turn_head UP + step_end + +AzaleaTownRivalBattleApproachMovement2: + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + turn_head DOWN + step_end + +AzaleaTownRivalBattleExitMovement: + step LEFT + step LEFT + step LEFT + step_end + +AzaleaTownPlayerLeavesKurtsHouseMovement: + step LEFT + step LEFT + step UP + turn_head LEFT + step_end + +AzaleaTownRivalBeforeText: + text "…Tell me some-" + line "thing." + + para "Is it true that" + line "TEAM ROCKET has" + cont "returned?" + + para "What? You beat" + line "them? Hah! Quit" + cont "lying." + + para "You're not joking?" + line "Then let's see how" + cont "good you are." + done + +AzaleaTownRivalWinText: + text "… Humph! Useless" + line "#MON!" + + para "Listen, you. You" + line "only won because" + + para "my #MON were" + line "weak." + done + +AzaleaTownRivalAfterText: + text "I hate the weak." + + para "#MON, trainers." + line "It doesn't matter" + cont "who or what." + + para "I'm going to be" + line "strong and wipe" + cont "out the weak." + + para "That goes for TEAM" + line "ROCKET too." + + para "They act big and" + line "tough in a group." + + para "But get them" + line "alone, and they're" + cont "weak." + + para "I hate them all." + + para "You stay out of my" + line "way. A weakling" + + para "like you is only a" + line "distraction." + done + +AzaleaTownRivalLossText: + text "…Humph! I knew" + line "you were lying." + done + +AzaleaTownRocket1Text: + text "It's unsafe to go" + line "in there, so I'm" + cont "standing guard." + + para "Aren't I a good" + line "Samaritan?" + done + +AzaleaTownRocket2Text: + text "Do you know about" + line "SLOWPOKETAIL? I" + cont "heard it's tasty!" + + para "Aren't you glad I" + line "told you that?" + done + +AzaleaTownGrampsTextBefore: + text "The SLOWPOKE have" + line "disappeared from" + cont "town…" + + para "I heard their" + line "TAILS are being" + cont "sold somewhere." + done + +AzaleaTownGrampsTextAfter: + text "The SLOWPOKE have" + line "returned." + + para "Knowing them, they" + line "could've just been" + + para "goofing off some-" + line "where." + done + +AzaleaTownTeacherText: + text "Did you come to" + line "get KURT to make" + cont "some BALLS?" + + para "A lot of people do" + line "just that." + done + +AzaleaTownYoungsterText: + text "Cut through AZALEA" + line "and you'll be in" + cont "ILEX FOREST." + + para "But these skinny" + line "trees make it" + + para "impossible to get" + line "through." + + para "The CHARCOAL MAN's" + line "#MON can CUT" + cont "down trees." + done + +AzaleaTownSlowpokeText1: + text "SLOWPOKE: …" + + para "<……> <……> <……>" + done + +AzaleaTownSlowpokeText2: + text "<……> <……>Yawn?" + done + +WoosterText: + text "WOOSTER: Gugyoo…" + done + +AzaleaTownKurtText1: + text "ILEX FOREST is" + line "restless!" + + para "What is going on?" + done + +AzaleaTownKurtText2: + text ", here's" + line "your GS BALL back!" + done + +AzaleaTownKurtText3: + text "Could you go see" + line "why ILEX FOREST is" + cont "so restless?" + done + +AzaleaTownSignText: + text "AZALEA TOWN" + line "Where People and" + + para "#MON Live in" + line "Happy Harmony" + done + +KurtsHouseSignText: + text "KURT'S HOUSE" + done + +AzaleaGymSignText: + text "AZALEA TOWN" + line "#MON GYM" + cont "LEADER: BUGSY" + + para "The Walking" + line "Bug #MON" + cont "Encyclopedia" + done + +SlowpokeWellSignText: + text "SLOWPOKE WELL" + + para "Also known as the" + line "RAINMAKER WELL." + + para "Locals believe" + line "that a SLOWPOKE's" + cont "yawn summons rain." + + para "Records show that" + line "a SLOWPOKE's yawn" + + para "ended a drought" + line "400 years ago." + done + +CharcoalKilnSignText: + text "CHARCOAL KILN" + done + +AzaleaTownIlexForestSignText: + text "ILEX FOREST" + + para "Enter through the" + line "gate." + done + +AzaleaTown_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 15, 9, AZALEA_POKECENTER_1F, 1 + warp_event 21, 13, CHARCOAL_KILN, 1 + warp_event 21, 5, AZALEA_MART, 2 + warp_event 9, 5, KURTS_HOUSE, 1 + warp_event 10, 15, AZALEA_GYM, 1 + warp_event 31, 7, SLOWPOKE_WELL_B1F, 1 + warp_event 2, 10, ILEX_FOREST_AZALEA_GATE, 3 + warp_event 2, 11, ILEX_FOREST_AZALEA_GATE, 4 + + def_coord_events + coord_event 5, 10, SCENE_AZALEATOWN_RIVAL_BATTLE, AzaleaTownRivalBattleScene1 + coord_event 5, 11, SCENE_AZALEATOWN_RIVAL_BATTLE, AzaleaTownRivalBattleScene2 + coord_event 9, 6, SCENE_AZALEATOWN_KURT_RETURNS_GS_BALL, AzaleaTownCelebiScene + + def_bg_events + bg_event 19, 9, BGEVENT_READ, AzaleaTownSign + bg_event 10, 9, BGEVENT_READ, KurtsHouseSign + bg_event 14, 15, BGEVENT_READ, AzaleaGymSign + bg_event 29, 7, BGEVENT_READ, SlowpokeWellSign + bg_event 19, 13, BGEVENT_READ, CharcoalKilnSign + bg_event 16, 9, BGEVENT_READ, AzaleaTownPokecenterSign + bg_event 22, 5, BGEVENT_READ, AzaleaTownMartSign + bg_event 3, 9, BGEVENT_READ, AzaleaTownIlextForestSign + bg_event 31, 6, BGEVENT_ITEM, AzaleaTownHiddenFullHeal + + def_object_events + object_event 31, 9, SPRITE_AZALEA_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownRocket1Script, EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET + object_event 21, 9, SPRITE_GRAMPS, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownGrampsScript, -1 + object_event 15, 13, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, AzaleaTownTeacherScript, -1 + object_event 7, 9, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, AzaleaTownYoungsterScript, -1 + object_event 8, 17, SPRITE_SLOWPOKE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownSlowpokeScript, EVENT_AZALEA_TOWN_SLOWPOKES + object_event 18, 9, SPRITE_SLOWPOKE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownSlowpokeScript, EVENT_AZALEA_TOWN_SLOWPOKES + object_event 29, 9, SPRITE_SLOWPOKE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownSlowpokeScript, EVENT_AZALEA_TOWN_SLOWPOKES + object_event 15, 15, SPRITE_SLOWPOKE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownSlowpokeScript, EVENT_AZALEA_TOWN_SLOWPOKES + object_event 8, 2, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, WhiteApricornTree, -1 + object_event 11, 10, SPRITE_AZALEA_ROCKET, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_AZALEA_TOWN + object_event 10, 16, SPRITE_AZALEA_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownRocket2Script, EVENT_SLOWPOKE_WELL_ROCKETS + object_event 6, 5, SPRITE_KURT_OUTSIDE, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AzaleaTownKurtScript, EVENT_AZALEA_TOWN_KURT diff --git a/maps/AzaleaTown.blk b/maps/AzaleaTown.blk new file mode 100644 index 0000000..24bb788 --- /dev/null +++ b/maps/AzaleaTown.blk @@ -0,0 +1,10 @@ +// +hqqqq + +lrrrr3 +/// + +WZWG[\ xJ<G]^ + ;;WKWG///< + + \ No newline at end of file diff --git a/maps/BattleTower1F.asm b/maps/BattleTower1F.asm new file mode 100644 index 0000000..a43ea66 --- /dev/null +++ b/maps/BattleTower1F.asm @@ -0,0 +1,813 @@ + object_const_def + const BATTLETOWER1F_RECEPTIONIST + const BATTLETOWER1F_YOUNGSTER + const BATTLETOWER1F_COOLTRAINER_F + const BATTLETOWER1F_BUG_CATCHER + const BATTLETOWER1F_GRANNY + +BattleTower1F_MapScripts: + def_scene_scripts + scene_script BattleTower1FCheckStateScene, SCENE_BATTLETOWER1F_CHECKSTATE + scene_script BattleTower1FNoopScene, SCENE_BATTLETOWER1F_NOOP + + def_callbacks + +BattleTower1FCheckStateScene: + setval BATTLETOWERACTION_CHECKSAVEFILEISYOURS + special BattleTowerAction + iffalse .SkipEverything + setval BATTLETOWERACTION_GET_CHALLENGE_STATE ; readmem sBattleTowerChallengeState + special BattleTowerAction + ifequal $0, .SkipEverything + ifequal $2, .LeftWithoutSaving + ifequal $3, .SkipEverything + ifequal $4, .SkipEverything + opentext + writetext Text_WeveBeenWaitingForYou + waitbutton + closetext + sdefer Script_ResumeBattleTowerChallenge + end + +.LeftWithoutSaving + sdefer BattleTower_LeftWithoutSaving + setval BATTLETOWERACTION_CHALLENGECANCELED + special BattleTowerAction + setval BATTLETOWERACTION_06 + special BattleTowerAction +.SkipEverything: + setscene SCENE_BATTLETOWER1F_NOOP + ; fallthrough +BattleTower1FNoopScene: + end + +BattleTower1FRulesSign: + opentext + writetext Text_ReadBattleTowerRules + yesorno + iffalse .skip + writetext Text_BattleTowerRules + waitbutton +.skip: + closetext + end + +BattleTower1FReceptionistScript: + setval BATTLETOWERACTION_GET_CHALLENGE_STATE ; readmem sBattleTowerChallengeState + special BattleTowerAction + ifequal $3, Script_BeatenAllTrainers2 ; maps/BattleTowerBattleRoom.asm + opentext + writetext Text_BattleTowerWelcomesYou + promptbutton + setval BATTLETOWERACTION_CHECK_EXPLANATION_READ ; if new save file: bit 1, [sBattleTowerSaveFileFlags] + special BattleTowerAction + ifnotequal $0, Script_Menu_ChallengeExplanationCancel + sjump Script_BattleTowerIntroductionYesNo + +Script_Menu_ChallengeExplanationCancel: + writetext Text_WantToGoIntoABattleRoom + setval TRUE + special Menu_ChallengeExplanationCancel + ifequal 1, Script_ChooseChallenge + ifequal 2, Script_BattleTowerExplanation + sjump Script_BattleTowerHopeToServeYouAgain + +Script_ChooseChallenge: + setval BATTLETOWERACTION_RESETDATA ; ResetBattleTowerTrainerSRAM + special BattleTowerAction + special CheckForBattleTowerRules + ifnotequal FALSE, Script_WaitButton + writetext Text_SaveBeforeEnteringBattleRoom + yesorno + iffalse Script_Menu_ChallengeExplanationCancel + setscene SCENE_BATTLETOWER1F_CHECKSTATE + special TryQuickSave + iffalse Script_Menu_ChallengeExplanationCancel + setscene SCENE_BATTLETOWER1F_NOOP + setval BATTLETOWERACTION_SET_EXPLANATION_READ ; set 1, [sBattleTowerSaveFileFlags] + special BattleTowerAction + special BattleTowerRoomMenu + ifequal $a, Script_Menu_ChallengeExplanationCancel + ifnotequal $0, Script_MobileError + setval BATTLETOWERACTION_11 + special BattleTowerAction + writetext Text_RightThisWayToYourBattleRoom + waitbutton + closetext + setval BATTLETOWERACTION_CHOOSEREWARD + special BattleTowerAction + sjump Script_WalkToBattleTowerElevator + +Script_ResumeBattleTowerChallenge: + closetext + setval BATTLETOWERACTION_LOADLEVELGROUP ; load choice of level group + special BattleTowerAction +Script_WalkToBattleTowerElevator: + musicfadeout MUSIC_NONE, 8 + setmapscene BATTLE_TOWER_BATTLE_ROOM, SCENE_BATTLETOWERBATTLEROOM_ENTER + setmapscene BATTLE_TOWER_ELEVATOR, SCENE_BATTLETOWERELEVATOR_ENTER + setmapscene BATTLE_TOWER_HALLWAY, SCENE_BATTLETOWERHALLWAY_ENTER + follow BATTLETOWER1F_RECEPTIONIST, PLAYER + applymovement BATTLETOWER1F_RECEPTIONIST, MovementData_BattleTower1FWalkToElevator + setval BATTLETOWERACTION_0A + special BattleTowerAction + warpsound + disappear BATTLETOWER1F_RECEPTIONIST + stopfollow + applymovement PLAYER, MovementData_BattleTowerHallwayPlayerEntersBattleRoom + warpcheck + end + +Script_GivePlayerHisPrize: + setval BATTLETOWERACTION_1C + special BattleTowerAction + setval BATTLETOWERACTION_GIVEREWARD + special BattleTowerAction + ifequal POTION, Script_YourPackIsStuffedFull + getitemname STRING_BUFFER_4, USE_SCRIPT_VAR + giveitem ITEM_FROM_MEM, 5 + writetext Text_PlayerGotFive + setval BATTLETOWERACTION_1D + special BattleTowerAction + closetext + end + +Script_YourPackIsStuffedFull: + writetext Text_YourPackIsStuffedFull + waitbutton + closetext + end + +Script_BattleTowerIntroductionYesNo: + writetext Text_WouldYouLikeToHearAboutTheBattleTower + yesorno + iffalse Script_BattleTowerSkipExplanation +Script_BattleTowerExplanation: + writetext Text_BattleTowerIntroduction_2 +Script_BattleTowerSkipExplanation: + setval BATTLETOWERACTION_SET_EXPLANATION_READ + special BattleTowerAction + sjump Script_Menu_ChallengeExplanationCancel + +Script_BattleTowerHopeToServeYouAgain: + writetext Text_WeHopeToServeYouAgain + waitbutton + closetext + end + +Script_MobileError2: ; unreferenced + special BattleTowerMobileError + closetext + end + +Script_WaitButton: + waitbutton + closetext + end + +Script_ChooseChallenge2: ; unreferenced + writetext Text_SaveBeforeEnteringBattleRoom + yesorno + iffalse Script_Menu_ChallengeExplanationCancel + special TryQuickSave + iffalse Script_Menu_ChallengeExplanationCancel + setval BATTLETOWERACTION_SET_EXPLANATION_READ + special BattleTowerAction + special Function1700ba + ifequal $a, Script_Menu_ChallengeExplanationCancel + ifnotequal $0, Script_MobileError + writetext Text_ReceivedAListOfLeadersOnTheHonorRoll + turnobject BATTLETOWER1F_RECEPTIONIST, LEFT + writetext Text_PleaseConfirmOnThisMonitor + waitbutton + turnobject BATTLETOWER1F_RECEPTIONIST, DOWN + closetext + end + +Script_StartChallenge: ; unreferenced + setval BATTLETOWERACTION_LEVEL_CHECK + special BattleTowerAction + ifnotequal $0, Script_AMonLevelExceeds + setval BATTLETOWERACTION_UBERS_CHECK + special BattleTowerAction + ifnotequal $0, Script_MayNotEnterABattleRoomUnderL70 + special CheckForBattleTowerRules + ifnotequal FALSE, Script_WaitButton + setval BATTLETOWERACTION_05 + special BattleTowerAction + ifequal $0, .zero + writetext Text_CantBeRegistered_PreviousRecordDeleted + sjump .continue + +.zero + writetext Text_CantBeRegistered +.continue + yesorno + iffalse Script_Menu_ChallengeExplanationCancel + writetext Text_SaveBeforeReentry + yesorno + iffalse Script_Menu_ChallengeExplanationCancel + setscene SCENE_BATTLETOWER1F_CHECKSTATE + special TryQuickSave + iffalse Script_Menu_ChallengeExplanationCancel + setscene SCENE_BATTLETOWER1F_NOOP + setval BATTLETOWERACTION_06 + special BattleTowerAction + setval BATTLETOWERACTION_12 + special BattleTowerAction + writetext Text_RightThisWayToYourBattleRoom + waitbutton + sjump Script_ResumeBattleTowerChallenge + +Script_ReachedBattleLimit: ; unreferenced + writetext Text_FiveDayBattleLimit_Mobile + waitbutton + sjump Script_BattleTowerHopeToServeYouAgain + +Script_AMonLevelExceeds: + writetext Text_AMonLevelExceeds + waitbutton + sjump Script_Menu_ChallengeExplanationCancel + +Script_MayNotEnterABattleRoomUnderL70: + writetext Text_MayNotEnterABattleRoomUnderL70 + waitbutton + sjump Script_Menu_ChallengeExplanationCancel + +Script_MobileError: + special BattleTowerMobileError + closetext + end + +BattleTower_LeftWithoutSaving: + opentext + writetext Text_BattleTower_LeftWithoutSaving + waitbutton + sjump Script_BattleTowerHopeToServeYouAgain + +BattleTower1FYoungsterScript: + faceplayer + opentext + writetext Text_BattleTowerYoungster + waitbutton + closetext + turnobject BATTLETOWER1F_YOUNGSTER, RIGHT + end + +BattleTower1FCooltrainerFScript: + jumptextfaceplayer Text_BattleTowerCooltrainerF + +BattleTower1FBugCatcherScript: + jumptextfaceplayer Text_BattleTowerBugCatcher + +BattleTower1FGrannyScript: + jumptextfaceplayer Text_BattleTowerGranny + +MovementData_BattleTower1FWalkToElevator: + step UP + step UP + step UP + step UP + step UP +MovementData_BattleTowerHallwayPlayerEntersBattleRoom: + step UP + step_end + +MovementData_BattleTowerElevatorExitElevator: + step DOWN + step_end + +MovementData_BattleTowerHallwayWalkTo1020Room: + step RIGHT + step RIGHT +MovementData_BattleTowerHallwayWalkTo3040Room: + step RIGHT + step RIGHT + step UP + step RIGHT + turn_head LEFT + step_end + +MovementData_BattleTowerHallwayWalkTo90100Room: + step LEFT + step LEFT +MovementData_BattleTowerHallwayWalkTo7080Room: + step LEFT + step LEFT +MovementData_BattleTowerHallwayWalkTo5060Room: + step LEFT + step LEFT + step UP + step LEFT + turn_head RIGHT + step_end + +MovementData_BattleTowerBattleRoomPlayerWalksIn: + step UP + step UP + step UP + step UP + turn_head RIGHT + step_end + +MovementData_BattleTowerBattleRoomOpponentWalksIn: + slow_step DOWN + slow_step DOWN + slow_step DOWN + turn_head LEFT + step_end + +MovementData_BattleTowerBattleRoomOpponentWalksOut: + turn_head UP + slow_step UP + slow_step UP + slow_step UP + step_end + +MovementData_BattleTowerBattleRoomReceptionistWalksToPlayer: + slow_step RIGHT + slow_step RIGHT + slow_step UP + slow_step UP + step_end + +MovementData_BattleTowerBattleRoomReceptionistWalksAway: + slow_step DOWN + slow_step DOWN + slow_step LEFT + slow_step LEFT + turn_head RIGHT + step_end + +MovementData_BattleTowerBattleRoomPlayerTurnsToFaceReceptionist: + turn_head DOWN + step_end + +MovementData_BattleTowerBattleRoomPlayerTurnsToFaceNextOpponent: + turn_head RIGHT + step_end + +Text_BattleTowerWelcomesYou: + text "BATTLE TOWER" + line "welcomes you!" + + para "I could show you" + line "to a BATTLE ROOM." + done + +Text_WantToGoIntoABattleRoom: + text "Want to go into a" + line "BATTLE ROOM?" + done + +Text_RightThisWayToYourBattleRoom: + text "Right this way to" + line "your BATTLE ROOM." + done + +Text_BattleTowerIntroduction_1: ; unreferenced + text "BATTLE TOWER is a" + line "facility made for" + cont "#MON battles." + + para "Countless #MON" + line "trainers gather" + + para "from all over to" + line "hold battles in" + + para "specially designed" + line "BATTLE ROOMS." + + para "There are many" + line "BATTLE ROOMS in" + cont "the BATTLE TOWER." + + para "Each ROOM holds" + line "seven trainers." + + para "If you defeat the" + line "seven in a ROOM," + + para "and you have a" + line "good record, you" + + para "could become the" + line "ROOM's LEADER." + + para "All LEADERS will" + line "be recorded in the" + + para "HONOR ROLL for" + line "posterity." + + para "You may challenge" + line "in up to five" + + para "BATTLE ROOMS each" + line "day." + + para "However, you may" + line "battle only once a" + + para "day in any given" + line "ROOM." + + para "To interrupt a" + line "session, you must" + + para "SAVE. If not, you" + line "won't be able to" + + para "resume your ROOM" + line "challenge." + + para "" + done + +Text_BattleTowerIntroduction_2: + text "BATTLE TOWER is a" + line "facility made for" + cont "#MON battles." + + para "Countless #MON" + line "trainers gather" + + para "from all over to" + line "hold battles in" + + para "specially designed" + line "BATTLE ROOMS." + + para "There are many" + line "BATTLE ROOMS in" + cont "the BATTLE TOWER." + + para "Each ROOM holds" + line "seven trainers." + + para "Beat them all, and" + line "win a prize." + + para "To interrupt a" + line "session, you must" + + para "SAVE. If not, you" + line "won't be able to" + + para "resume your ROOM" + line "challenge." + + para "" + done + +Text_ReceivedAListOfLeadersOnTheHonorRoll: + text "Received a list of" + line "LEADERS on the" + cont "HONOR ROLL." + + para "" + done + +Text_PleaseConfirmOnThisMonitor: + text "Please confirm on" + line "this monitor." + done + +Text_ThankYou: ; unreferenced + text "Thank you!" + + para "" + done + +Text_ThanksForVisiting: + text "Thanks for" + line "visiting!" + done + +Text_BeatenAllTheTrainers_Mobile: ; unreferenced + text "Congratulations!" + + para "You've beaten all" + line "the trainers!" + + para "Your feat may be" + line "worth registering," + + para ". With your" + line "results, you may" + + para "be chosen as a" + line "ROOM LEADER." + + para "" + done + +Text_CongratulationsYouveBeatenAllTheTrainers: + text "Congratulations!" + + para "You've beaten all" + line "the trainers!" + + para "For that, you get" + line "this great prize!" + + para "" + done + +Text_AskRegisterRecord_Mobile: ; unreferenced + text "Would you like to" + line "register your" + + para "record with the" + line "CENTER?" + done + +Text_PlayerGotFive: + text " got five" + line "@" + text_ram wStringBuffer4 + text "!@" + sound_item + text_promptbutton + text_end + +Text_YourPackIsStuffedFull: + text "Oops, your PACK is" + line "stuffed full." + + para "Please make room" + line "and come back." + done + +Text_YourRegistrationIsComplete: ; unreferenced + text "Your registration" + line "is complete." + + para "Please come again!" + done + +Text_WeHopeToServeYouAgain: + text "We hope to serve" + line "you again." + done + +Text_PleaseStepThisWay: + text "Please step this" + line "way." + done + +Text_WouldYouLikeToHearAboutTheBattleTower: + text "Would you like to" + line "hear about the" + cont "BATTLE TOWER?" + done + +Text_CantBeRegistered: + text "Your record from" + line "the previous" + + para "BATTLE ROOM can't" + line "be registered. OK?" + done + +Text_CantBeRegistered_PreviousRecordDeleted: + text "Your record from" + line "the previous" + + para "BATTLE ROOM can't" + line "be registered." + + para "Also, the existing" + line "record will be" + cont "deleted. OK?" + done + +Text_CheckTheLeaderHonorRoll: ; unreferenced + text "Check the LEADER" + line "HONOR ROLL?" + done + +Text_ReadBattleTowerRules: + text "BATTLE TOWER rules" + line "are written here." + + para "Read the rules?" + done + +Text_BattleTowerRules: + text "Three #MON may" + line "enter battles." + + para "All three must be" + line "different." + + para "The items they" + line "hold must also be" + cont "different." + + para "Certain #MON" + line "may also have" + + para "level restrictions" + line "placed on them." + done + +Text_BattleTower_LeftWithoutSaving: + text "Excuse me!" + line "You didn't SAVE" + + para "before exiting" + line "the BATTLE ROOM." + + para "I'm awfully sorry," + line "but your challenge" + + para "will be declared" + line "invalid." + done + +Text_YourMonWillBeHealedToFullHealth: + text "Your #MON will" + line "be healed to full" + cont "health." + done + +Text_NextUpOpponentNo: + text "Next up, opponent" + line "no.@" + text_ram wStringBuffer3 + text ". Ready?" + done + +Text_SaveBeforeConnecting_Mobile: ; unreferenced + text "Your session will" + line "be SAVED before" + + para "connecting with" + line "the CENTER." + done + +Text_SaveBeforeEnteringBattleRoom: + text "Before entering" + line "the BATTLE ROOM," + + para "your progress will" + line "be saved." + done + +Text_SaveAndEndTheSession: + text "SAVE and end the" + line "session?" + done + +Text_SaveBeforeReentry: + text "Your record will" + line "be SAVED before" + + para "you go back into" + line "the previous ROOM." + done + +Text_CancelYourBattleRoomChallenge: + text "Cancel your BATTLE" + line "ROOM challenge?" + done + +Text_RegisterRecordOnFile_Mobile: ; unreferenced + text "We have your" + line "previous record on" + + para "file. Would you" + line "like to register" + cont "it at the CENTER?" + done + +Text_WeveBeenWaitingForYou: + text "We've been waiting" + line "for you. This way" + + para "to a BATTLE ROOM," + line "please." + done + +Text_FiveDayBattleLimit_Mobile: + text "You may enter only" + line "five BATTLE ROOMS" + cont "each day." + + para "Please come back" + line "tomorrow." + done + +Text_TooMuchTimeElapsedNoRegister: + text "Sorry, but it's" + line "not possible to" + + para "register your" + line "current record at" + + para "the CENTER because" + line "too much time has" + + para "elapsed since the" + line "start of your" + cont "challenge." + done + +Text_RegisterRecordTimedOut_Mobile: ; unreferenced +; duplicate of Text_TooMuchTimeElapsedNoRegister + text "Sorry, but it's" + line "not possible to" + + para "register your most" + line "recent record at" + + para "the CENTER because" + line "too much time has" + + para "elapsed since the" + line "start of your" + cont "challenge." + done + +Text_AMonLevelExceeds: + text "One or more of" + line "your #MON's" + cont "levels exceeds @" + text_decimal wScriptVar, 1, 3 + text "." + done + +Text_MayNotEnterABattleRoomUnderL70: + text_ram wcd49 + text " may not" + line "enter a BATTLE" + cont "ROOM under L70." + + para "This BATTLE ROOM" + line "is for L@" + text_decimal wScriptVar, 1, 3 + text "." + done + +Text_BattleTowerYoungster: + text "Destroyed by the" + line "first opponent in" + + para "no time at all…" + line "I'm no good…" + done + +Text_BattleTowerCooltrainerF: + text "There are lots of" + line "BATTLE ROOMS, but" + + para "I'm going to win" + line "them all!" + done + +Text_BattleTowerGranny: + text "It's a grueling" + line "task, not being" + + para "able to use items" + line "in battle." + + para "Making your" + line "#MON hold items" + + para "is the key to" + line "winning battles." + done + +Text_BattleTowerBugCatcher: + text "I'm trying to see" + line "how far I can go" + + para "using just bug" + line "#MON." + + para "Don't let there be" + line "any fire #MON…" + done + +BattleTower1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 9, BATTLE_TOWER_OUTSIDE, 3 + warp_event 8, 9, BATTLE_TOWER_OUTSIDE, 4 + warp_event 7, 0, BATTLE_TOWER_ELEVATOR, 1 + + def_coord_events + + def_bg_events + bg_event 6, 6, BGEVENT_READ, BattleTower1FRulesSign + + def_object_events + object_event 7, 6, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BattleTower1FReceptionistScript, -1 + object_event 14, 9, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BattleTower1FYoungsterScript, -1 + object_event 4, 9, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BattleTower1FCooltrainerFScript, -1 + object_event 1, 3, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BattleTower1FBugCatcherScript, -1 + object_event 14, 3, SPRITE_GRANNY, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BattleTower1FGrannyScript, -1 diff --git a/maps/BattleTower1F.blk b/maps/BattleTower1F.blk new file mode 100644 index 0000000..faf2e5e --- /dev/null +++ b/maps/BattleTower1F.blk @@ -0,0 +1 @@ +*+)(  \ No newline at end of file diff --git a/maps/BattleTowerBattleRoom.asm b/maps/BattleTowerBattleRoom.asm new file mode 100644 index 0000000..1cf4438 --- /dev/null +++ b/maps/BattleTowerBattleRoom.asm @@ -0,0 +1,153 @@ + object_const_def + const BATTLETOWERBATTLEROOM_YOUNGSTER + const BATTLETOWERBATTLEROOM_RECEPTIONIST + +BattleTowerBattleRoom_MapScripts: + def_scene_scripts + scene_script BattleTowerBattleRoomEnterScene, SCENE_BATTLETOWERBATTLEROOM_ENTER + scene_script BattleTowerBattleRoomNoopScene, SCENE_BATTLETOWERBATTLEROOM_NOOP + + def_callbacks + +BattleTowerBattleRoomEnterScene: + disappear BATTLETOWERBATTLEROOM_YOUNGSTER + sdefer Script_BattleRoom + setscene SCENE_BATTLETOWERBATTLEROOM_NOOP + ; fallthrough +BattleTowerBattleRoomNoopScene: + end + +Script_BattleRoom: + applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerWalksIn +; beat all 7 opponents in a row +Script_BattleRoomLoop: + setval BATTLETOWERBATTLEROOM_YOUNGSTER + special LoadOpponentTrainerAndPokemonWithOTSprite + appear BATTLETOWERBATTLEROOM_YOUNGSTER + warpsound + waitsfx + applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksIn + opentext + battletowertext BATTLETOWERTEXT_INTRO + promptbutton + closetext + special BattleTowerBattle ; predef StartBattle + special FadeOutPalettes + reloadmap + ifnotequal $0, Script_FailedBattleTowerChallenge + readmem wNrOfBeatenBattleTowerTrainers + ifequal BATTLETOWER_STREAK_LENGTH, Script_BeatenAllTrainers + applymovement BATTLETOWERBATTLEROOM_YOUNGSTER, MovementData_BattleTowerBattleRoomOpponentWalksOut + warpsound + disappear BATTLETOWERBATTLEROOM_YOUNGSTER + applymovement BATTLETOWERBATTLEROOM_RECEPTIONIST, MovementData_BattleTowerBattleRoomReceptionistWalksToPlayer + applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerTurnsToFaceReceptionist + opentext + writetext Text_YourMonWillBeHealedToFullHealth + waitbutton + closetext + playmusic MUSIC_HEAL + special FadeOutPalettes + special LoadMapPalettes + pause 60 + special FadeInPalettes + special RestartMapMusic + opentext + writetext Text_NextUpOpponentNo + yesorno + iffalse Script_DontBattleNextOpponent +Script_ContinueAndBattleNextOpponent: + closetext + applymovement PLAYER, MovementData_BattleTowerBattleRoomPlayerTurnsToFaceNextOpponent + applymovement BATTLETOWERBATTLEROOM_RECEPTIONIST, MovementData_BattleTowerBattleRoomReceptionistWalksAway + sjump Script_BattleRoomLoop + +Script_DontBattleNextOpponent: + writetext Text_SaveAndEndTheSession + yesorno + iffalse Script_DontSaveAndEndTheSession + setval BATTLETOWERACTION_SAVELEVELGROUP ; save level group + special BattleTowerAction + setval BATTLETOWERACTION_SAVEOPTIONS ; choose reward + special BattleTowerAction + setval BATTLETOWERACTION_SAVE_AND_QUIT ; quicksave + special BattleTowerAction + playsound SFX_SAVE + waitsfx + special FadeOutPalettes + special Reset +Script_DontSaveAndEndTheSession: + writetext Text_CancelYourBattleRoomChallenge + yesorno + iffalse Script_ContinueAndBattleNextOpponent + setval BATTLETOWERACTION_CHALLENGECANCELED + special BattleTowerAction + setval BATTLETOWERACTION_06 + special BattleTowerAction + closetext + special FadeOutPalettes + warpfacing UP, BATTLE_TOWER_1F, 7, 7 + opentext + sjump Script_BattleTowerHopeToServeYouAgain + +Script_FailedBattleTowerChallenge: + pause 60 + special BattleTowerFade + warpfacing UP, BATTLE_TOWER_1F, 7, 7 + setval BATTLETOWERACTION_CHALLENGECANCELED + special BattleTowerAction + opentext + writetext Text_ThanksForVisiting + waitbutton + closetext + end + +Script_BeatenAllTrainers: + pause 60 + special BattleTowerFade + warpfacing UP, BATTLE_TOWER_1F, 7, 7 +Script_BeatenAllTrainers2: + opentext + writetext Text_CongratulationsYouveBeatenAllTheTrainers + sjump Script_GivePlayerHisPrize + +Script_TooMuchTimeElapsedNoRegister: ; unreferenced + setval BATTLETOWERACTION_CHALLENGECANCELED + special BattleTowerAction + opentext + writetext Text_TooMuchTimeElapsedNoRegister + waitbutton + closetext + end + +Script_ChallengeCanceled: ; unreferenced + setval BATTLETOWERACTION_CHALLENGECANCELED + special BattleTowerAction + setval BATTLETOWERACTION_06 + special BattleTowerAction + opentext + writetext Text_ThanksForVisiting + writetext Text_WeHopeToServeYouAgain + waitbutton + closetext + end + +Text_ReturnedAfterSave_Mobile: ; unreferenced + text "You'll be returned" + line "after you SAVE." + done + +BattleTowerBattleRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, BATTLE_TOWER_HALLWAY, 4 + warp_event 4, 7, BATTLE_TOWER_HALLWAY, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 4, 0, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BATTLE_TOWER_BATTLE_ROOM_YOUNGSTER + object_event 1, 6, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1 diff --git a/maps/BattleTowerBattleRoom.blk b/maps/BattleTowerBattleRoom.blk new file mode 100644 index 0000000..21a7d9a --- /dev/null +++ b/maps/BattleTowerBattleRoom.blk @@ -0,0 +1,3 @@ +  + ## +"! \ No newline at end of file diff --git a/maps/BattleTowerElevator.asm b/maps/BattleTowerElevator.asm new file mode 100644 index 0000000..8775ce7 --- /dev/null +++ b/maps/BattleTowerElevator.asm @@ -0,0 +1,57 @@ + object_const_def + const BATTLETOWERELEVATOR_RECEPTIONIST + +BattleTowerElevator_MapScripts: + def_scene_scripts + scene_script BattleTowerElevatorEnterScene, SCENE_BATTLETOWERELEVATOR_ENTER + scene_script BattleTowerElevatorNoopScene, SCENE_BATTLETOWERELEVATOR_NOOP + + def_callbacks + +BattleTowerElevatorEnterScene: + sdefer BattleTowerElevatorRideElevatorScript + setscene SCENE_BATTLETOWERELEVATOR_NOOP + ; fallthrough +BattleTowerElevatorNoopScene: + end + +BattleTowerElevatorRideElevatorScript: + follow BATTLETOWERELEVATOR_RECEPTIONIST, PLAYER + applymovement BATTLETOWERELEVATOR_RECEPTIONIST, MovementData_BattleTowerElevatorReceptionistWalksIn + applymovement PLAYER, MovementData_BattleTowerElevatorPlayerWalksIn + setval BATTLETOWERACTION_0A + special BattleTowerAction + playsound SFX_ELEVATOR + earthquake 60 + waitsfx + follow BATTLETOWERELEVATOR_RECEPTIONIST, PLAYER + applymovement BATTLETOWERELEVATOR_RECEPTIONIST, MovementData_BattleTowerElevatorExitElevator + stopfollow + warpsound + disappear BATTLETOWERELEVATOR_RECEPTIONIST + applymovement PLAYER, MovementData_BattleTowerElevatorExitElevator + warpcheck + end + +MovementData_BattleTowerElevatorReceptionistWalksIn: + step RIGHT + turn_head DOWN + step_end + +MovementData_BattleTowerElevatorPlayerWalksIn: + turn_head DOWN + step_end + +BattleTowerElevator_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 1, 3, BATTLE_TOWER_HALLWAY, 1 + warp_event 2, 3, BATTLE_TOWER_HALLWAY, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 2, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MovementData_BattleTowerElevatorReceptionistWalksIn, -1 diff --git a/maps/BattleTowerElevator.blk b/maps/BattleTowerElevator.blk new file mode 100644 index 0000000..6f38e7d --- /dev/null +++ b/maps/BattleTowerElevator.blk @@ -0,0 +1 @@ +&',- \ No newline at end of file diff --git a/maps/BattleTowerHallway.asm b/maps/BattleTowerHallway.asm new file mode 100644 index 0000000..1f47e4c --- /dev/null +++ b/maps/BattleTowerHallway.asm @@ -0,0 +1,94 @@ + object_const_def + const BATTLETOWERHALLWAY_RECEPTIONIST + +BattleTowerHallway_MapScripts: + def_scene_scripts + scene_script BattleTowerHallwayEnterScene, SCENE_BATTLETOWERHALLWAY_ENTER + scene_script BattleTowerHallwayNoopScene, SCENE_BATTLETOWERHALLWAY_NOOP + + def_callbacks + +BattleTowerHallwayEnterScene: + sdefer BattleTowerHallwayChooseBattleRoomScript + setscene SCENE_BATTLETOWERHALLWAY_NOOP + ; fallthrough +BattleTowerHallwayNoopScene: + end + +BattleTowerHallwayChooseBattleRoomScript: + follow BATTLETOWERHALLWAY_RECEPTIONIST, PLAYER + callasm .asm_load_battle_room + sjump .WalkToChosenBattleRoom + +.asm_load_battle_room + ldh a, [rSVBK] + push af + + ld a, BANK(wBTChoiceOfLvlGroup) + ldh [rSVBK], a + ld a, [wBTChoiceOfLvlGroup] + ld [wScriptVar], a + + pop af + ldh [rSVBK], a + ret + +; enter different rooms for different levels to battle against +; at least it should look like that +; because all warps lead to the same room +.WalkToChosenBattleRoom: + ifequal 3, .L30L40 + ifequal 4, .L30L40 + ifequal 5, .L50L60 + ifequal 6, .L50L60 + ifequal 7, .L70L80 + ifequal 8, .L70L80 + ifequal 9, .L90L100 + ifequal 10, .L90L100 + applymovement BATTLETOWERHALLWAY_RECEPTIONIST, MovementData_BattleTowerHallwayWalkTo1020Room + sjump .EnterBattleRoom + +.L30L40: + applymovement BATTLETOWERHALLWAY_RECEPTIONIST, MovementData_BattleTowerHallwayWalkTo3040Room + sjump .EnterBattleRoom + +.L50L60: + applymovement BATTLETOWERHALLWAY_RECEPTIONIST, MovementData_BattleTowerHallwayWalkTo5060Room + sjump .EnterBattleRoom + +.L70L80: + applymovement BATTLETOWERHALLWAY_RECEPTIONIST, MovementData_BattleTowerHallwayWalkTo7080Room + sjump .EnterBattleRoom + +.L90L100: + applymovement BATTLETOWERHALLWAY_RECEPTIONIST, MovementData_BattleTowerHallwayWalkTo90100Room + sjump .EnterBattleRoom + +.EnterBattleRoom: + faceobject PLAYER, BATTLETOWERHALLWAY_RECEPTIONIST + opentext + writetext Text_PleaseStepThisWay + waitbutton + closetext + stopfollow + applymovement PLAYER, MovementData_BattleTowerHallwayPlayerEntersBattleRoom + warpcheck + end + +BattleTowerHallway_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 11, 1, BATTLE_TOWER_ELEVATOR, 1 + warp_event 5, 0, BATTLE_TOWER_BATTLE_ROOM, 1 + warp_event 7, 0, BATTLE_TOWER_BATTLE_ROOM, 1 + warp_event 9, 0, BATTLE_TOWER_BATTLE_ROOM, 1 + warp_event 13, 0, BATTLE_TOWER_BATTLE_ROOM, 1 + warp_event 15, 0, BATTLE_TOWER_BATTLE_ROOM, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 11, 2, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BattleTowerHallway_MapEvents, -1 diff --git a/maps/BattleTowerHallway.blk b/maps/BattleTowerHallway.blk new file mode 100644 index 0000000..cb12c17 --- /dev/null +++ b/maps/BattleTowerHallway.blk @@ -0,0 +1 @@ +%$$$$$$$$$$$ \ No newline at end of file diff --git a/maps/BattleTowerOutside.asm b/maps/BattleTowerOutside.asm new file mode 100644 index 0000000..930595a --- /dev/null +++ b/maps/BattleTowerOutside.asm @@ -0,0 +1,148 @@ + object_const_def + const BATTLETOWEROUTSIDE_STANDING_YOUNGSTER + const BATTLETOWEROUTSIDE_BEAUTY + const BATTLETOWEROUTSIDE_SAILOR + const BATTLETOWEROUTSIDE_LASS + +BattleTowerOutside_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_TILES, BattleTowerOutsideNoopCallback + callback MAPCALLBACK_OBJECTS, BattleTowerOutsideShowCiviliansCallback + +BattleTowerOutsideNoopCallback: + endcallback + +BattleTowerOutsideShowCiviliansCallback: + clearevent EVENT_BATTLE_TOWER_OPEN_CIVILIANS + endcallback + +BattleTowerOutsideYoungsterScript: + jumptextfaceplayer BattleTowerOutsideYoungsterText + +BattleTowerOutsideBeautyScript: + jumptextfaceplayer BattleTowerOutsideBeautyText + +BattleTowerOutsideSailorScript: + jumptextfaceplayer BattleTowerOutsideSailorText + +BattleTowerOutsideSign: + jumptext BattleTowerOutsideSignText + +BattleTowerOutsideYoungsterText_NotYetOpen: ; unreferenced + text "Wow, the BATTLE" + line "TOWER is huge! My" + + para "neck is tired from" + line "looking up at it." + done + +BattleTowerOutsideYoungsterText_Mobile: ; unreferenced + text "Wow, the BATTLE" + line "TOWER is huge!" + + para "Since there are a" + line "whole bunch of" + + para "trainers inside," + line "there must also be" + + para "a wide variety of" + line "#MON." + done + +BattleTowerOutsideYoungsterText: + text "Wow, the BATTLE" + line "TOWER is huge!" + + para "There must be many" + line "kinds of #MON" + cont "in there!" + done + +BattleTowerOutsideBeautyText_NotYetOpen: ; unreferenced + text "What on earth do" + line "they do here?" + + para "If the name says" + line "anything, I guess" + + para "it must be for" + line "#MON battles." + done + +BattleTowerOutsideBeautyText: + text "You can use only" + line "three #MON." + + para "It's so hard to" + line "decide which three" + + para "should go into" + line "battle…" + done + +BattleTowerOutsideSailorText_Mobile: ; unreferenced + text "Ehehehe…" + line "I sneaked out of" + cont "work to come here." + + para "I'm never giving" + line "up until I become" + cont "a LEADER!" + done + +BattleTowerOutsideSailorText: + text "Hehehe, I snuck" + line "out from work." + + para "I can't bail out" + line "until I've won!" + + para "I have to win it" + line "all. That I must!" + done + +BattleTowerOutsideSignText_NotYetOpen: ; unreferenced +; originally shown when the Battle Tower was closed + text "BATTLE TOWER" + done + +BattleTowerOutsideSignText: + text "BATTLE TOWER" + + para "Take the Ultimate" + line "Trainer Challenge!" + done + +BattleTowerOutsideText_DoorsClosed: ; unreferenced +; originally shown when the Battle Tower was closed + text "The BATTLE TOWER's" + line "doors are closed…" + done + +BattleTowerOutsideText_DoorsOpen: ; unreferenced +; originally shown after the Battle Tower opened + text "It's open!" + done + +BattleTowerOutside_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 8, 21, ROUTE_40_BATTLE_TOWER_GATE, 3 + warp_event 9, 21, ROUTE_40_BATTLE_TOWER_GATE, 4 + warp_event 8, 9, BATTLE_TOWER_1F, 1 + warp_event 9, 9, BATTLE_TOWER_1F, 2 + + def_coord_events + + def_bg_events + bg_event 10, 10, BGEVENT_READ, BattleTowerOutsideSign + + def_object_events + object_event 6, 12, SPRITE_STANDING_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BattleTowerOutsideYoungsterScript, -1 + object_event 13, 11, SPRITE_BEAUTY, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BattleTowerOutsideBeautyScript, -1 + object_event 12, 18, SPRITE_SAILOR, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BattleTowerOutsideSailorScript, EVENT_BATTLE_TOWER_OPEN_CIVILIANS + object_event 12, 24, SPRITE_LASS, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1 diff --git a/maps/BattleTowerOutside.blk b/maps/BattleTowerOutside.blk new file mode 100644 index 0000000..a10b8c5 --- /dev/null +++ b/maps/BattleTowerOutside.blk @@ -0,0 +1,3 @@ +    ! + +**2*3- +3./ +301+3 \ No newline at end of file diff --git a/maps/BillsBrothersHouse.asm b/maps/BillsBrothersHouse.asm new file mode 100644 index 0000000..14cf8a3 --- /dev/null +++ b/maps/BillsBrothersHouse.asm @@ -0,0 +1,41 @@ + object_const_def + const BILLSBROTHERSHOUSE_POKEFAN_F + const BILLSBROTHERSHOUSE_YOUNGSTER + +BillsBrothersHouse_MapScripts: + def_scene_scripts + + def_callbacks + +BillsBrotherScript: + jumptextfaceplayer BillsBrotherText + +BillsBrothersHouseYoungsterScript: + jumptextfaceplayer BillsBrothersHouseYoungsterText + +BillsBrotherText: + text "My grandpa is at " + line "my brother BILL's" + cont "on CERULEAN CAPE." + done + +BillsBrothersHouseYoungsterText: + text "I saw these weird," + line "slow #MON on" + cont "CYCLING ROAD." + done + +BillsBrothersHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, FUCHSIA_CITY, 4 + warp_event 3, 7, FUCHSIA_CITY, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BillsBrotherScript, -1 + object_event 6, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BillsBrothersHouseYoungsterScript, -1 diff --git a/maps/BillsFamilysHouse.asm b/maps/BillsFamilysHouse.asm new file mode 100644 index 0000000..07e6103 --- /dev/null +++ b/maps/BillsFamilysHouse.asm @@ -0,0 +1,260 @@ + object_const_def + const BILLSFAMILYSHOUSE_BILL + const BILLSFAMILYSHOUSE_POKEFAN_F + const BILLSFAMILYSHOUSE_TWIN + +BillsFamilysHouse_MapScripts: + def_scene_scripts + + def_callbacks + +BillScript: + faceplayer + opentext + checkevent EVENT_GOT_EEVEE + iftrue .GotEevee + writetext BillTakeThisEeveeText + yesorno + iffalse .Refused + writetext BillImCountingOnYouText + promptbutton + waitsfx + readvar VAR_PARTYCOUNT + ifequal PARTY_LENGTH, .NoRoom + writetext ReceivedEeveeText + playsound SFX_CAUGHT_MON + waitsfx + givepoke EEVEE, 20 + setevent EVENT_GOT_EEVEE + writetext BillEeveeMayEvolveText + waitbutton + closetext + end + +.NoRoom: + writetext BillPartyFullText + waitbutton + closetext + end + +.Refused: + writetext BillNoEeveeText + waitbutton + closetext + end + +.GotEevee: + writetext BillPopWontWorkText + waitbutton + closetext + end + +BillsMomScript: + faceplayer + opentext + checkevent EVENT_MET_BILL + iffalse .HaventMetBill + writetext BillsMomText_BeforeEcruteak + waitbutton + closetext + end + +.HaventMetBill: + writetext BillsMomText_AfterEcruteak + waitbutton + closetext + end + +BillsSisterScript: + faceplayer + opentext + checkcellnum PHONE_BILL + iftrue .GotBillsNumber + writetext BillsSisterUsefulNumberText + askforphonenumber PHONE_BILL + ifequal PHONE_CONTACTS_FULL, .NoRoom + ifequal PHONE_CONTACT_REFUSED, .Refused + waitsfx + addcellnum PHONE_BILL + writetext RecordedBillsNumberText + playsound SFX_REGISTER_PHONE_NUMBER + waitsfx + promptbutton +.GotBillsNumber: + writetext BillsSisterStorageSystemText + waitbutton + closetext + end + +.Refused: + writetext BillsSisterRefusedNumberText + waitbutton + closetext + end + +.NoRoom: + writetext BillsSisterPhoneFullText + promptbutton + sjump .Refused + +BillsHouseBookshelf1: + jumpstd PictureBookshelfScript + +BillsHouseBookshelf2: + jumpstd MagazineBookshelfScript + +BillsHouseRadio: + jumpstd Radio2Script + +BillTakeThisEeveeText: + text "BILL: Hi, !" + line "Do us a favor and" + cont "take this EEVEE." + + para "It came over when" + line "I was adjusting" + cont "the TIME CAPSULE." + + para "Someone has to" + line "take care of it," + + para "but I don't like" + line "being outside." + + para "Can I count on you" + line "to play with it," + cont "?" + done + +BillImCountingOnYouText: + text "BILL: I knew you'd" + line "come through!" + + para "Way to go! You're" + line "the real deal!" + + para "OK, I'm counting" + line "on you." + + para "Take good care of" + line "it!" + done + +ReceivedEeveeText: + text " received" + line "EEVEE!" + done + +BillEeveeMayEvolveText: + text "BILL: PROF.ELM" + line "claims EEVEE may" + + para "evolve in new and" + line "unknown ways." + done + +BillPartyFullText: + text "Whoa, wait. You" + line "can't carry any" + cont "more #MON." + done + +BillNoEeveeText: + text "Oh… Now what to" + line "do?" + done + +BillPopWontWorkText: + text "BILL: My pop, he" + line "won't work. All he" + + para "does is goof off" + line "all day long." + + para "He's getting to be" + line "a real headache…" + done + +BillsMomText_BeforeEcruteak: + text "Oh, you collect" + line "#MON? My son" + cont "BILL is an expert." + + para "He just got called" + line "to the #MON" + + para "CENTER in ECRUTEAK" + line "CITY." + + para "My husband went" + line "off to the GAME" + + para "CORNER without" + line "being called…" + done + +BillsMomText_AfterEcruteak: + text "My husband was" + line "once known as a" + + para "#MANIAC." + line "BILL must have" + + para "taken after his" + line "father." + done + +BillsSisterUsefulNumberText: + text "Are you a trainer?" + + para "I've got a useful" + line "phone number for" + cont "you." + done + +RecordedBillsNumberText: + text " recorded" + line "BILL's number." + done + +BillsSisterRefusedNumberText: + text "My brother made" + line "the PC #MON" + cont "storage system." + + para "I was going to" + line "give you BILL's" + cont "number…" + done + +BillsSisterPhoneFullText: + text "You can't record" + line "any more numbers." + done + +BillsSisterStorageSystemText: + text "My big brother" + line "BILL made the PC" + + para "#MON storage" + line "system." + done + +BillsFamilysHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, GOLDENROD_CITY, 4 + warp_event 3, 7, GOLDENROD_CITY, 4 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, BillsHouseBookshelf2 + bg_event 1, 1, BGEVENT_READ, BillsHouseBookshelf1 + bg_event 7, 1, BGEVENT_READ, BillsHouseRadio + + def_object_events + object_event 2, 3, SPRITE_BILL, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BillScript, EVENT_MET_BILL + object_event 5, 3, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BillsMomScript, -1 + object_event 5, 4, SPRITE_TWIN, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BillsSisterScript, -1 diff --git a/maps/BillsHouse.asm b/maps/BillsHouse.asm new file mode 100644 index 0000000..9670ae0 --- /dev/null +++ b/maps/BillsHouse.asm @@ -0,0 +1,390 @@ + object_const_def + const BILLSHOUSE_GRAMPS + + const_def 1 ; locked Pokémon ID table entries, used for species checking + const BILLSHOUSE_INDEX_LICKITUNG + const BILLSHOUSE_INDEX_ODDISH + const BILLSHOUSE_INDEX_STARYU + const BILLSHOUSE_INDEX_GROWLITHE + const BILLSHOUSE_INDEX_VULPIX + const BILLSHOUSE_INDEX_PICHU + +BillsHouse_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, BillsHouseLoadReservedIDsCallback + +BillsHouseLoadReservedIDsCallback: + loadmonindex BILLSHOUSE_INDEX_LICKITUNG, LICKITUNG + loadmonindex BILLSHOUSE_INDEX_ODDISH, ODDISH + loadmonindex BILLSHOUSE_INDEX_STARYU, STARYU + loadmonindex BILLSHOUSE_INDEX_GROWLITHE, GROWLITHE + loadmonindex BILLSHOUSE_INDEX_VULPIX, VULPIX + loadmonindex BILLSHOUSE_INDEX_PICHU, PICHU + endcallback + +BillsGrandpa: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue .JustShowedSomething + checkevent EVENT_GOT_THUNDERSTONE_FROM_BILLS_GRANDPA + iftrue .GotThunderstone + checkevent EVENT_MET_BILLS_GRANDPA + iftrue .MetGrandpa + writetext BillsGrandpaIntroText + promptbutton + setevent EVENT_MET_BILLS_GRANDPA +.MetGrandpa: + checkevent EVENT_SHOWED_PICHU_TO_BILLS_GRANDPA + iftrue .ShowedPichu + checkevent EVENT_SHOWED_GROWLITHE_VULPIX_TO_BILLS_GRANDPA + iftrue .ShowedGrowlitheVulpix + checkevent EVENT_SHOWED_STARYU_TO_BILLS_GRANDPA + iftrue .ShowedStaryu + checkevent EVENT_SHOWED_ODDISH_TO_BILLS_GRANDPA + iftrue .ShowedOddish + checkevent EVENT_SHOWED_LICKITUNG_TO_BILLS_GRANDPA + iftrue .ShowedLickitung + writetext BillsGrandpaLickitungText + promptbutton + writetext BillsGrandpaAskToSeeMonText + yesorno + iffalse .SaidNo + scall .ExcitedToSee + special BillsGrandfather + iffalse .SaidNo + checkmaplockedmons + ifnotequal BILLSHOUSE_INDEX_LICKITUNG, .WrongPokemon + scall .CorrectPokemon + setevent EVENT_SHOWED_LICKITUNG_TO_BILLS_GRANDPA + sjump .ShowedLickitung + +.GotEverstone: + writetext BillsGrandpaOddishText + promptbutton + writetext BillsGrandpaAskToSeeMonText + yesorno + iffalse .SaidNo + scall .ExcitedToSee + special BillsGrandfather + iffalse .SaidNo + checkmaplockedmons + ifnotequal BILLSHOUSE_INDEX_ODDISH, .WrongPokemon + scall .CorrectPokemon + setevent EVENT_SHOWED_ODDISH_TO_BILLS_GRANDPA + sjump .ShowedOddish + +.GotLeafStone: + writetext BillsGrandpaStaryuText + promptbutton + writetext BillsGrandpaAskToSeeMonText + yesorno + iffalse .SaidNo + scall .ExcitedToSee + special BillsGrandfather + iffalse .SaidNo + checkmaplockedmons + ifnotequal BILLSHOUSE_INDEX_STARYU, .WrongPokemon + scall .CorrectPokemon + setevent EVENT_SHOWED_STARYU_TO_BILLS_GRANDPA + sjump .ShowedStaryu + +.GotWaterStone: + checkver + iftrue .AskVulpix + writetext BillsGrandpaGrowlitheText + promptbutton + writetext BillsGrandpaAskToSeeMonText + yesorno + iffalse .SaidNo + scall .ExcitedToSee + special BillsGrandfather + iffalse .SaidNo + checkmaplockedmons + ifnotequal BILLSHOUSE_INDEX_GROWLITHE, .WrongPokemon + scall .CorrectPokemon + setevent EVENT_SHOWED_GROWLITHE_VULPIX_TO_BILLS_GRANDPA + sjump .ShowedGrowlitheVulpix + +.AskVulpix: + writetext BillsGrandpaVulpixText + promptbutton + writetext BillsGrandpaAskToSeeMonText + yesorno + iffalse .SaidNo + scall .ExcitedToSee + special BillsGrandfather + iffalse .SaidNo + checkmaplockedmons + ifnotequal BILLSHOUSE_INDEX_VULPIX, .WrongPokemon + scall .CorrectPokemon + setevent EVENT_SHOWED_GROWLITHE_VULPIX_TO_BILLS_GRANDPA + sjump .ShowedGrowlitheVulpix + +.GotFireStone: + writetext BillsGrandpaPichuText + promptbutton + writetext BillsGrandpaAskToSeeMonText + yesorno + iffalse .SaidNo + scall .ExcitedToSee + special BillsGrandfather + iffalse .SaidNo + checkmaplockedmons + ifnotequal BILLSHOUSE_INDEX_PICHU, .WrongPokemon + scall .CorrectPokemon + setevent EVENT_SHOWED_PICHU_TO_BILLS_GRANDPA + sjump .ShowedPichu + +.ShowedLickitung: + checkevent EVENT_GOT_EVERSTONE_FROM_BILLS_GRANDPA + iftrue .GotEverstone + scall .ReceiveItem + verbosegiveitem EVERSTONE + iffalse .BagFull + setevent EVENT_GOT_EVERSTONE_FROM_BILLS_GRANDPA + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + closetext + end + +.ShowedOddish: + checkevent EVENT_GOT_LEAF_STONE_FROM_BILLS_GRANDPA + iftrue .GotLeafStone + scall .ReceiveItem + verbosegiveitem LEAF_STONE + iffalse .BagFull + setevent EVENT_GOT_LEAF_STONE_FROM_BILLS_GRANDPA + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + closetext + end + +.ShowedStaryu: + checkevent EVENT_GOT_WATER_STONE_FROM_BILLS_GRANDPA + iftrue .GotWaterStone + scall .ReceiveItem + verbosegiveitem WATER_STONE + iffalse .BagFull + setevent EVENT_GOT_WATER_STONE_FROM_BILLS_GRANDPA + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + closetext + end + +.ShowedGrowlitheVulpix: + checkevent EVENT_GOT_FIRE_STONE_FROM_BILLS_GRANDPA + iftrue .GotFireStone + scall .ReceiveItem + verbosegiveitem FIRE_STONE + iffalse .BagFull + setevent EVENT_GOT_FIRE_STONE_FROM_BILLS_GRANDPA + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + closetext + end + +.ShowedPichu: + scall .ReceiveItem + verbosegiveitem THUNDERSTONE + iffalse .BagFull + setevent EVENT_GOT_THUNDERSTONE_FROM_BILLS_GRANDPA + closetext + end + +.ExcitedToSee: + writetext BillsGrandpaExcitedToSeeText + promptbutton + end + +.SaidNo: + writetext BillsGrandpaYouDontHaveItTextText + waitbutton + closetext + end + +.CorrectPokemon: + writetext BillsGrandpaShownPokemonText + promptbutton + end + +.ReceiveItem: + writetext BillsGrandpaTokenOfAppreciationText + promptbutton + end + +.JustShowedSomething: + writetext BillsGrandpaComeAgainText + waitbutton + closetext + end + +.GotThunderstone: + writetext BillsGrandpaShownAllThePokemonText + waitbutton + closetext + end + +.WrongPokemon: + writetext BillsGrandpaWrongPokemonText + waitbutton + closetext + end + +.BagFull: + closetext + end + +BillsGrandpaIntroText: + text "Hm? You know BILL?" + line "He's my grandson." + + para "He's in JOHTO. He" + line "does something" + + para "with PCs, so I'm" + line "house-sitting." + done + +BillsGrandpaAskToSeeMonText: + text "If you have that" + line "#MON, may I see" + cont "it, please?" + done + +BillsGrandpaExcitedToSeeText: + text "You will show me?" + line "How good of you!" + done + +BillsGrandpaYouDontHaveItTextText: + text "You don't have it?" + line "That's too bad…" + done + +BillsGrandpaShownPokemonText: + text "Ah, so that is" + line "@" + text_ram wStringBuffer3 + text "?" + + para "Isn't it cute!" + line "That's so kind of" + cont "you." + done + +BillsGrandpaTokenOfAppreciationText: + text "Thanks!" + + para "This is a token of" + line "my appreciation." + done + +BillsGrandpaComeAgainText: + text "Come visit again" + line "sometime." + done + +BillsGrandpaShownAllThePokemonText: + text "Thanks for showing" + line "me so many cute" + cont "#MON." + + para "I really enjoyed" + line "myself. I'm glad" + + para "I've lived such a" + line "long life." + done + +BillsGrandpaWrongPokemonText: + text "Hm?" + + para "That's not the" + line "#MON that I was" + cont "told about." + done + +BillsGrandpaLickitungText: + text "My grandson BILL" + line "told me about a" + + para "#MON that has a" + line "long tongue." + done + +BillsGrandpaOddishText: + text "Ah, my grandson" + line "mentioned a round," + + para "green #MON that" + line "has leaves growing" + cont "on its head." + done + +BillsGrandpaStaryuText: + text "Do you know of a" + line "sea #MON that" + + para "has a red sphere" + line "in its body?" + + para "You know, the one" + line "that's shaped like" + cont "a star?" + + para "I heard that it" + line "appears at night." + + para "I would surely" + line "like to see it." + done + +BillsGrandpaGrowlitheText: + text "BILL told me about" + line "a #MON that is" + + para "very loyal to its" + line "trainer." + + para "It's supposed to" + line "ROAR well." + done + +BillsGrandpaVulpixText: + text "I heard about a" + line "cute #MON that" + cont "has six tails." + + para "I would love to" + line "hug a cute #MON" + cont "like that." + done + +BillsGrandpaPichuText: + text "Do you know that" + line "hugely popular" + cont "#MON?" + + para "The #MON that" + line "has a yellow body" + cont "and red cheeks." + + para "I would love to" + line "see what it looks" + + para "like before it" + line "evolves." + done + +BillsHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ROUTE_25, 1 + warp_event 3, 7, ROUTE_25, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_UP, 0, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BillsGrandpa, -1 diff --git a/maps/BlackthornCity.asm b/maps/BlackthornCity.asm new file mode 100644 index 0000000..888ee19 --- /dev/null +++ b/maps/BlackthornCity.asm @@ -0,0 +1,346 @@ + object_const_def + const BLACKTHORNCITY_SUPER_NERD1 + const BLACKTHORNCITY_SUPER_NERD2 + const BLACKTHORNCITY_GRAMPS1 + const BLACKTHORNCITY_GRAMPS2 + const BLACKTHORNCITY_BLACK_BELT + const BLACKTHORNCITY_COOLTRAINER_F1 + const BLACKTHORNCITY_YOUNGSTER1 + const BLACKTHORNCITY_SANTOS + const BLACKTHORNCITY_COOLTRAINER_F2 + +BlackthornCity_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, BlackthornCityFlypointCallback + callback MAPCALLBACK_OBJECTS, BlackthornCitySantosCallback + +BlackthornCityFlypointCallback: + setflag ENGINE_FLYPOINT_BLACKTHORN + endcallback + +BlackthornCitySantosCallback: + readvar VAR_WEEKDAY + ifequal SATURDAY, .SantosAppears + disappear BLACKTHORNCITY_SANTOS + endcallback + +.SantosAppears: + appear BLACKTHORNCITY_SANTOS + endcallback + +BlackthornSuperNerdScript: + faceplayer + opentext + checkevent EVENT_BEAT_CLAIR + iftrue .BeatClair + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .ClearedRadioTower + writetext Text_ClairIsOut + waitbutton + closetext + end + +.ClearedRadioTower: + writetext Text_ClairIsIn + waitbutton + closetext + end + +.BeatClair: + writetext Text_ClairIsBeaten + waitbutton + closetext + end + +BlackthornGramps1Script: + jumptextfaceplayer BlackthornGrampsRefusesEntryText + +BlackthornGramps2Script: + jumptextfaceplayer BlackthornGrampsGrantsEntryText + +BlackthornBlackBeltScript: + faceplayer + opentext + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .ClearedRadioTower + writetext BlackBeltText_WeirdRadio + waitbutton + closetext + end + +.ClearedRadioTower: + writetext BlackBeltText_VoicesInMyHead + waitbutton + closetext + end + +BlackthornCooltrainerF1Script: + jumptextfaceplayer BlackthornCooltrainerF1Text + +BlackthornYoungsterScript: + jumptextfaceplayer BlackthornYoungsterText + +BlackthornCooltrainerF2Script: + jumptextfaceplayer BlackthornCooltrainerF2Text + +SantosScript: + faceplayer + opentext + checkevent EVENT_GOT_SPELL_TAG_FROM_SANTOS + iftrue .Saturday + readvar VAR_WEEKDAY + ifnotequal SATURDAY, .NotSaturday + checkevent EVENT_MET_SANTOS_OF_SATURDAY + iftrue .MetSantos + writetext MeetSantosText + promptbutton + setevent EVENT_MET_SANTOS_OF_SATURDAY +.MetSantos: + writetext SantosGivesGiftText + promptbutton + verbosegiveitem SPELL_TAG + iffalse .Done + setevent EVENT_GOT_SPELL_TAG_FROM_SANTOS + writetext SantosGaveGiftText + waitbutton + closetext + end + +.Saturday: + writetext SantosSaturdayText + waitbutton +.Done: + closetext + end + +.NotSaturday: + writetext SantosNotSaturdayText + waitbutton + closetext + end + +BlackthornCitySign: + jumptext BlackthornCitySignText + +BlackthornGymSign: + jumptext BlackthornGymSignText + +MoveDeletersHouseSign: + jumptext MoveDeletersHouseSignText + +DragonDensSign: + jumptext DragonDensSignText + +BlackthornCityTrainerTips: + jumptext BlackthornCityTrainerTipsText + +BlackthornCityPokecenterSign: + jumpstd PokecenterSignScript + +BlackthornCityMartSign: + jumpstd MartSignScript + +Text_ClairIsOut: + text "I am sorry." + + para "CLAIR, our GYM" + line "LEADER, entered" + + para "the DRAGON'S DEN" + line "behind the GYM." + + para "I have no idea" + line "when our LEADER" + cont "will return." + done + +Text_ClairIsIn: + text "CLAIR, our GYM" + line "LEADER, is waiting" + cont "for you." + + para "However, it would" + line "be impossible for" + + para "a run-of-the-mill" + line "trainer to win." + done + +Text_ClairIsBeaten: + text "You defeated" + line "CLAIR?" + + para "That's amazing!" + + para "I've never heard" + line "of her losing to" + + para "anyone other than" + line "LANCE." + done + +BlackthornGrampsRefusesEntryText: + text "No. Only chosen" + line "trainers may train" + + para "here." + line "Please leave." + done + +BlackthornGrampsGrantsEntryText: + text "If CLAIR allows" + line "it, her grand-" + cont "father--our MASTER" + cont "--will also." + + para "You may enter." + done + +BlackBeltText_WeirdRadio: + text "My radio's busted?" + line "Lately, I only get" + cont "this weird signal." + done + +BlackBeltText_VoicesInMyHead: + text "Arooo! Voices in" + line "my head!" + + para "Huh? I'm listening" + line "to my radio!" + done + +BlackthornCooltrainerF1Text: + text "Are you going to" + line "make your #MON" + cont "forget some moves?" + done + +BlackthornYoungsterText: + text "Dragon masters all" + line "come from the city" + cont "of BLACKTHORN." + done + +MeetSantosText: + text "SANTOS: …" + + para "It's Saturday…" + + para "I'm SANTOS of" + line "Saturday…" + done + +SantosGivesGiftText: + text "You can have this…" + done + +SantosGaveGiftText: + text "SANTOS: …" + + para "SPELL TAG…" + + para "Ghost-type moves" + line "get stronger…" + + para "It will frighten" + line "you…" + done + +SantosSaturdayText: + text "SANTOS: …" + + para "See you again on" + line "another Saturday…" + + para "I won't have any" + line "more gifts…" + done + +SantosNotSaturdayText: + text "SANTOS: Today's" + line "not Saturday…" + done + +BlackthornCooltrainerF2Text: + text "Wow, you came" + line "through the ICE" + cont "PATH?" + + para "You must be a real" + line "hotshot trainer!" + done + +BlackthornCitySignText: + text "BLACKTHORN CITY" + + para "A Quiet Mountain" + line "Retreat" + done + +BlackthornGymSignText: + text "BLACKTHORN CITY" + line "#MON GYM" + cont "LEADER: CLAIR" + + para "The Blessed User" + line "of Dragon #MON" + done + +MoveDeletersHouseSignText: + text "MOVE DELETER'S" + line "HOUSE" + done + +DragonDensSignText: + text "DRAGON'S DEN" + line "AHEAD" + done + +BlackthornCityTrainerTipsText: + text "TRAINER TIPS" + + para "A #MON holding" + line "a MIRACLEBERRY" + + para "will cure itself" + line "of any status" + cont "problem." + done + +BlackthornCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 18, 11, BLACKTHORN_GYM_1F, 1 + warp_event 13, 21, BLACKTHORN_DRAGON_SPEECH_HOUSE, 1 + warp_event 29, 23, BLACKTHORN_EMYS_HOUSE, 1 + warp_event 15, 29, BLACKTHORN_MART, 2 + warp_event 21, 29, BLACKTHORN_POKECENTER_1F, 1 + warp_event 9, 31, MOVE_DELETERS_HOUSE, 1 + warp_event 36, 9, ICE_PATH_1F, 2 + warp_event 20, 1, DRAGONS_DEN_1F, 1 + + def_coord_events + + def_bg_events + bg_event 34, 24, BGEVENT_READ, BlackthornCitySign + bg_event 17, 13, BGEVENT_READ, BlackthornGymSign + bg_event 7, 31, BGEVENT_READ, MoveDeletersHouseSign + bg_event 21, 3, BGEVENT_READ, DragonDensSign + bg_event 5, 25, BGEVENT_READ, BlackthornCityTrainerTips + bg_event 16, 29, BGEVENT_READ, BlackthornCityMartSign + bg_event 22, 29, BGEVENT_READ, BlackthornCityPokecenterSign + + def_object_events + object_event 18, 12, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BlackthornSuperNerdScript, EVENT_BLACKTHORN_CITY_SUPER_NERD_BLOCKS_GYM + object_event 19, 12, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BlackthornSuperNerdScript, EVENT_BLACKTHORN_CITY_SUPER_NERD_DOES_NOT_BLOCK_GYM + object_event 20, 2, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGramps1Script, EVENT_BLACKTHORN_CITY_GRAMPS_BLOCKS_DRAGONS_DEN + object_event 21, 2, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGramps2Script, EVENT_BLACKTHORN_CITY_GRAMPS_NOT_BLOCKING_DRAGONS_DEN + object_event 24, 31, SPRITE_BLACK_BELT, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BlackthornBlackBeltScript, -1 + object_event 9, 25, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BlackthornCooltrainerF1Script, -1 + object_event 13, 15, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornYoungsterScript, -1 + object_event 22, 20, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SantosScript, EVENT_BLACKTHORN_CITY_SANTOS_OF_SATURDAY + object_event 35, 19, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BlackthornCooltrainerF2Script, -1 diff --git a/maps/BlackthornCity.blk b/maps/BlackthornCity.blk new file mode 100644 index 0000000..9814d9c --- /dev/null +++ b/maps/BlackthornCity.blk @@ -0,0 +1,23 @@ +qqqqqqqiorsrnqhqqqqqqqqqorrmi +G +hqhqqqqoqqormorrmTvUlnhqqqqiqqiqqiTvvy5zUhhorrrmqqiqomX55Yhhiorsnqqiqi +XYXYhhiiKWhqqiqi +XYGhlmihrrmqi +hqomKWhqqormWKW +jpkWhqi +hqqi + +lrmhqihqqiVZVVZ +VVlrmZVjqqomVVVZVVVVVV +hqomxEhqi + + +hqi + + +jppqqix +hjpppi + +jppppqhqqqqk + +jppqqqqjpqqqq \ No newline at end of file diff --git a/maps/BlackthornDragonSpeechHouse.asm b/maps/BlackthornDragonSpeechHouse.asm new file mode 100644 index 0000000..8d33c0e --- /dev/null +++ b/maps/BlackthornDragonSpeechHouse.asm @@ -0,0 +1,59 @@ + object_const_def + const BLACKTHORNDRAGONSPEECHHOUSE_GRANNY + const BLACKTHORNDRAGONSPEECHHOUSE_EKANS + +BlackthornDragonSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +BlackthornDragonSpeechHouseGrannyScript: + jumptextfaceplayer BlackthornDragonSpeechHouseGrannyText + +BlackthornDragonSpeechHouseDratiniScript: + opentext + writetext BlackthornDragonSpeechHouseDratiniText + cry DRATINI + waitbutton + closetext + end + +BlackthornDragonSpeechHousePictureBookshelf: ; unreferenced + jumpstd PictureBookshelfScript + +BlackthornDragonSpeechHouseMagazineBookshelf: ; unreferenced + jumpstd MagazineBookshelfScript + +BlackthornDragonSpeechHouseGrannyText: + text "A clan of trainers" + line "who can freely" + + para "command dragons" + line "live right here in" + cont "BLACKTHORN." + + para "As a result, there" + line "are many legends" + + para "about dragons in" + line "this town." + done + +BlackthornDragonSpeechHouseDratiniText: + text "DRATINI: Draa!" + done + +BlackthornDragonSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, BLACKTHORN_CITY, 2 + warp_event 3, 7, BLACKTHORN_CITY, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_GRANNY, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornDragonSpeechHouseGrannyScript, -1 + object_event 5, 5, SPRITE_EKANS, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BlackthornDragonSpeechHouseDratiniScript, -1 diff --git a/maps/BlackthornEmysHouse.asm b/maps/BlackthornEmysHouse.asm new file mode 100644 index 0000000..89c8d08 --- /dev/null +++ b/maps/BlackthornEmysHouse.asm @@ -0,0 +1,34 @@ + object_const_def + const BLACKTHORNEMYSHOUSE_EMY + +BlackthornEmysHouse_MapScripts: + def_scene_scripts + + def_callbacks + +Emy: + faceplayer + opentext + trade NPC_TRADE_EMY + waitbutton + closetext + end + +EmysHouseBookshelf: + jumpstd MagazineBookshelfScript + +BlackthornEmysHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, BLACKTHORN_CITY, 3 + warp_event 3, 7, BLACKTHORN_CITY, 3 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, EmysHouseBookshelf + bg_event 1, 1, BGEVENT_READ, EmysHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_LASS, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Emy, -1 diff --git a/maps/BlackthornGym1F.asm b/maps/BlackthornGym1F.asm new file mode 100644 index 0000000..8047f3f --- /dev/null +++ b/maps/BlackthornGym1F.asm @@ -0,0 +1,410 @@ + object_const_def + const BLACKTHORNGYM1F_CLAIR + const BLACKTHORNGYM1F_COOLTRAINER_M1 + const BLACKTHORNGYM1F_COOLTRAINER_M2 + const BLACKTHORNGYM1F_COOLTRAINER_F + const BLACKTHORNGYM1F_GYM_GUIDE + +BlackthornGym1F_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_TILES, BlackthornGym1FBouldersCallback + +BlackthornGym1FBouldersCallback: + checkevent EVENT_BOULDER_IN_BLACKTHORN_GYM_1 + iffalse .skip1 + changeblock 8, 2, $3b ; fallen boulder 2 +.skip1 + checkevent EVENT_BOULDER_IN_BLACKTHORN_GYM_2 + iffalse .skip2 + changeblock 2, 4, $3a ; fallen boulder 1 +.skip2 + checkevent EVENT_BOULDER_IN_BLACKTHORN_GYM_3 + iffalse .skip3 + changeblock 8, 6, $3b ; fallen boulder 2 +.skip3 + endcallback + +BlackthornGymClairScript: + faceplayer + opentext + checkflag ENGINE_RISINGBADGE + iftrue .AlreadyGotBadge + checkevent EVENT_BEAT_CLAIR + iftrue .FightDone + writetext ClairIntroText + waitbutton + closetext + winlosstext ClairWinText, 0 + loadtrainer CLAIR, CLAIR1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_CLAIR + opentext + writetext ClairText_GoToDragonsDen + waitbutton + closetext + setevent EVENT_BEAT_COOLTRAINERM_PAUL + setevent EVENT_BEAT_COOLTRAINERM_CODY + setevent EVENT_BEAT_COOLTRAINERM_MIKE + setevent EVENT_BEAT_COOLTRAINERF_FRAN + setevent EVENT_BEAT_COOLTRAINERF_LOLA + clearevent EVENT_MAHOGANY_MART_OWNERS + setevent EVENT_BLACKTHORN_CITY_GRAMPS_BLOCKS_DRAGONS_DEN + clearevent EVENT_BLACKTHORN_CITY_GRAMPS_NOT_BLOCKING_DRAGONS_DEN + end + +.FightDone: + writetext ClairText_TooMuchToExpect + waitbutton + closetext + end + +.AlreadyGotBadge: + checkevent EVENT_GOT_TM24_DRAGONBREATH + iftrue .GotTM24 + writetext BlackthornGymClairText_YouKeptMeWaiting + promptbutton + giveitem TM_DRAGONBREATH + iffalse .BagFull + getitemname STRING_BUFFER_3, TM_DRAGONBREATH + writetext BlackthornGymText_ReceivedTM24 + playsound SFX_ITEM + waitsfx + itemnotify + setevent EVENT_GOT_TM24_DRAGONBREATH + writetext BlackthornGymClairText_DescribeTM24 + promptbutton + sjump .GotTM24 + +.BagFull: + writetext BlackthornGymClairText_BagFull + waitbutton + closetext + end + +.GotTM24: + writetext BlackthornGymClairText_League + waitbutton + closetext + end + +TrainerCooltrainermPaul: + trainer COOLTRAINERM, PAUL, EVENT_BEAT_COOLTRAINERM_PAUL, CooltrainermPaulSeenText, CooltrainermPaulBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainermPaulAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainermMike: + trainer COOLTRAINERM, MIKE, EVENT_BEAT_COOLTRAINERM_MIKE, CooltrainermMikeSeenText, CooltrainermMikeBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainermMikeAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainerfLola: + trainer COOLTRAINERF, LOLA, EVENT_BEAT_COOLTRAINERF_LOLA, CooltrainerfLolaSeenText, CooltrainerfLolaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainerfLolaAfterBattleText + waitbutton + closetext + end + +BlackthornGymGuideScript: + faceplayer + opentext + checkevent EVENT_BEAT_CLAIR + iftrue .BlackthornGymGuideWinScript + writetext BlackthornGymGuideText + waitbutton + closetext + end + +.BlackthornGymGuideWinScript: + writetext BlackthornGymGuideWinText + waitbutton + closetext + end + +BlackthornGymStatue: + checkflag ENGINE_RISINGBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, CLAIR, CLAIR1 + jumpstd GymStatue2Script + +ClairIntroText: + text "I am CLAIR." + + para "The world's best" + line "dragon master." + + para "I can hold my own" + line "against even the" + + para "#MON LEAGUE's" + line "ELITE FOUR." + + para "Do you still want" + line "to take me on?" + + para "…Fine." + line "Let's do it!" + + para "As a GYM LEADER," + line "I will use my full" + + para "power against any" + line "opponent!" + done + +ClairWinText: + text "I lost?" + + para "I don't believe" + line "it. There must be" + cont "some mistake…" + done + +ClairText_GoToDragonsDen: + text "I won't admit" + line "this." + + para "I may have lost," + line "but you're still" + + para "not ready for the" + line "#MON LEAGUE." + + para "I know. You should" + line "take the dragon" + cont "user challenge." + + para "Behind this GYM is" + line "a place called" + cont "DRAGON'S DEN." + + para "There is a small" + line "shrine at its" + + para "center." + line "Go there." + + para "If you can prove" + line "that you've lost" + + para "your lazy ideals," + line "I will recognize" + + para "you as a trainer" + line "worthy of a GYM" + cont "BADGE!" + done + +ClairText_TooMuchToExpect: + text "What's the matter?" + + para "Is it too much to" + line "expect of you?" + done + +BlackthornGymClairText_YouKeptMeWaiting: + text "You've kept me" + line "waiting!" + + para "Here! Take this!" + done + +BlackthornGymText_ReceivedTM24: + text " received" + line "TM24." + done + +BlackthornGymClairText_DescribeTM24: + text "That contains" + line "DRAGONBREATH." + + para "No, it doesn't" + line "have anything to" + cont "do with my breath." + + para "If you don't want" + line "it, you don't have" + cont "to take it." + done + +BlackthornGymClairText_BagFull: + text "What is this? You" + line "don't have room?" + done + +BlackthornGymClairText_League: + text "What's the matter?" + + para "Aren't you headed" + line "to the #MON" + cont "LEAGUE?" + + para "Don't you know" + line "where it is?" + + para "From here, go to" + line "NEW BARK TOWN." + + para "Then SURF east." + line "The route there is" + cont "very tough." + + para "Don't you dare" + line "lose at the #-" + cont "MON LEAGUE!" + + para "If you do, I'll" + line "feel even worse" + + para "about having lost" + line "to you!" + + para "Give it every-" + line "thing you've got." + done + +CooltrainermPaulSeenText: + text "Your first battle" + line "against dragons?" + + para "I'll show you how" + line "tough they are!" + done + +CooltrainermPaulBeatenText: + text "My dragon #MON" + line "lost?" + done + +CooltrainermPaulAfterBattleText: + text "LANCE told you" + line "that he'd like to" + + para "see you again?" + line "Not a chance!" + done + +CooltrainermMikeSeenText: + text "My chance of" + line "losing? Not even" + cont "one percent!" + done + +CooltrainermMikeBeatenText: + text "That's odd." + done + +CooltrainermMikeAfterBattleText: + text "I know my short-" + line "comings now." + + para "Thanks for showing" + line "me!" + done + +CooltrainerfLolaSeenText: + text "Dragons are sacred" + line "#MON." + + para "They are full of" + line "life energy." + + para "If you're not" + line "serious, you won't" + + para "be able to beat" + line "them." + done + +CooltrainerfLolaBeatenText: + text "Way to go!" + done + +CooltrainerfLolaAfterBattleText: + text "Dragons are weak" + line "against dragon-" + cont "type moves." + done + +BlackthornGymGuideText: + text "Yo! CHAMP in" + line "making!" + + para "It's been a long" + line "journey, but we" + + para "are almost done!" + line "Count on me!" + + para "CLAIR uses the" + line "mythical and sac-" + cont "red dragon-type" + cont "#MON." + + para "You can't damage" + line "them very easily." + + para "But you know," + line "they're supposed" + + para "to be weak against" + line "ice-type moves." + done + +BlackthornGymGuideWinText: + text "You were great to" + line "beat CLAIR!" + + para "All that's left is" + line "the #MON LEAGUE" + cont "challenge." + + para "You're on the way" + line "to becoming the" + cont "#MON CHAMPION!" + done + +BlackthornGym1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 17, BLACKTHORN_CITY, 1 + warp_event 5, 17, BLACKTHORN_CITY, 1 + warp_event 1, 7, BLACKTHORN_GYM_2F, 1 + warp_event 7, 9, BLACKTHORN_GYM_2F, 2 + warp_event 2, 6, BLACKTHORN_GYM_2F, 3 + warp_event 7, 7, BLACKTHORN_GYM_2F, 4 + warp_event 7, 6, BLACKTHORN_GYM_2F, 5 + + def_coord_events + + def_bg_events + bg_event 3, 15, BGEVENT_READ, BlackthornGymStatue + bg_event 6, 15, BGEVENT_READ, BlackthornGymStatue + + def_object_events + object_event 5, 3, SPRITE_CLAIR, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BlackthornGymClairScript, -1 + object_event 6, 6, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainermMike, -1 + object_event 1, 14, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainermPaul, -1 + object_event 9, 2, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerCooltrainerfLola, -1 + object_event 7, 15, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BlackthornGymGuideScript, -1 diff --git a/maps/BlackthornGym1F.blk b/maps/BlackthornGym1F.blk new file mode 100644 index 0000000..c869c9a --- /dev/null +++ b/maps/BlackthornGym1F.blk @@ -0,0 +1 @@ +,,,,,+ 00 + )-+- - )-++-+---------- \ No newline at end of file diff --git a/maps/BlackthornGym2F.asm b/maps/BlackthornGym2F.asm new file mode 100644 index 0000000..d3aac65 --- /dev/null +++ b/maps/BlackthornGym2F.asm @@ -0,0 +1,148 @@ + object_const_def + const BLACKTHORNGYM2F_COOLTRAINER_M + const BLACKTHORNGYM2F_COOLTRAINER_F + const BLACKTHORNGYM2F_BOULDER1 + const BLACKTHORNGYM2F_BOULDER2 + const BLACKTHORNGYM2F_BOULDER3 + const BLACKTHORNGYM2F_BOULDER4 + const BLACKTHORNGYM2F_BOULDER5 + const BLACKTHORNGYM2F_BOULDER6 + +BlackthornGym2F_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_CMDQUEUE, BlackthornGym2FSetUpStoneTableCallback + +BlackthornGym2FSetUpStoneTableCallback: + writecmdqueue .CommandQueue + endcallback + +.CommandQueue: + cmdqueue CMDQUEUE_STONETABLE, .StoneTable ; check if any stones are sitting on a warp + +.StoneTable: + stonetable 5, BLACKTHORNGYM2F_BOULDER1, .Boulder1 + stonetable 3, BLACKTHORNGYM2F_BOULDER2, .Boulder2 + stonetable 4, BLACKTHORNGYM2F_BOULDER3, .Boulder3 + db -1 ; end + +.Boulder1: + disappear BLACKTHORNGYM2F_BOULDER1 + sjump .Fall + +.Boulder2: + disappear BLACKTHORNGYM2F_BOULDER2 + sjump .Fall + +.Boulder3: + disappear BLACKTHORNGYM2F_BOULDER3 + sjump .Fall + +.Fall: + pause 30 + scall .FX + opentext + writetext BlackthornGym2FBoulderFellText + waitbutton + closetext + end + +.FX: + playsound SFX_STRENGTH + earthquake 80 + end + +BlackthornGymBoulder: + jumpstd StrengthBoulderScript + +TrainerCooltrainermCody: + trainer COOLTRAINERM, CODY, EVENT_BEAT_COOLTRAINERM_CODY, CooltrainermCodySeenText, CooltrainermCodyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainermCodyAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainerfFran: + trainer COOLTRAINERF, FRAN, EVENT_BEAT_COOLTRAINERF_FRAN, CooltrainerfFranSeenText, CooltrainerfFranBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainerfFranAfterBattleText + waitbutton + closetext + end + +CooltrainermCodySeenText: + text "It's not as if we" + line "all use dragon-" + cont "type #MON." + done + +CooltrainermCodyBeatenText: + text "Rats! If only I" + line "had a dragon!" + done + +CooltrainermCodyAfterBattleText: + text "Members of our" + line "dragon-user clan" + + para "can use dragon" + line "#MON only after" + + para "our MASTER allows" + line "it." + done + +CooltrainerfFranSeenText: + text "I can't allow a" + line "nameless trainer" + cont "past me!" + + para "CLAIR would be" + line "livid if I did!" + done + +CooltrainerfFranBeatenText: + text "Awww… I lost…" + done + +CooltrainerfFranAfterBattleText: + text "Uh-oh… CLAIR is" + line "going to be mad…" + done + +BlackthornGym2FBoulderFellText: + text "The boulder fell" + line "through!" + done + +BlackthornGym2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 1, 7, BLACKTHORN_GYM_1F, 3 + warp_event 7, 9, BLACKTHORN_GYM_1F, 4 + warp_event 2, 5, BLACKTHORN_GYM_1F, 5 ; hole + warp_event 8, 7, BLACKTHORN_GYM_1F, 6 ; hole + warp_event 8, 3, BLACKTHORN_GYM_1F, 7 ; hole + + def_coord_events + + def_bg_events + + def_object_events + object_event 4, 1, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerCooltrainermCody, -1 + object_event 4, 11, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerCooltrainerfFran, -1 + object_event 8, 2, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_1 + object_event 2, 3, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_2 + object_event 6, 16, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_3 + object_event 3, 3, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGymBoulder, -1 + object_event 6, 1, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGymBoulder, -1 + object_event 8, 14, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornGymBoulder, -1 diff --git a/maps/BlackthornGym2F.blk b/maps/BlackthornGym2F.blk new file mode 100644 index 0000000..85f4a03 --- /dev/null +++ b/maps/BlackthornGym2F.blk @@ -0,0 +1 @@ +######- - ##(-# -#(-#--#----- \ No newline at end of file diff --git a/maps/BlackthornMart.asm b/maps/BlackthornMart.asm new file mode 100644 index 0000000..3c8b0a3 --- /dev/null +++ b/maps/BlackthornMart.asm @@ -0,0 +1,61 @@ + object_const_def + const BLACKTHORNMART_CLERK + const BLACKTHORNMART_COOLTRAINER_M + const BLACKTHORNMART_BLACK_BELT + +BlackthornMart_MapScripts: + def_scene_scripts + + def_callbacks + +BlackthornMartClerkScript: + opentext + pokemart MARTTYPE_STANDARD, MART_BLACKTHORN + closetext + end + +BlackthornMartCooltrainerMScript: + jumptextfaceplayer BlackthornMartCooltrainerMText + +BlackthornMartBlackBeltScript: + jumptextfaceplayer BlackthornMartBlackBeltText + +BlackthornMartCooltrainerMText: + text "You can't buy MAX" + line "REVIVE, but it" + + para "fully restores a" + line "fainted #MON." + + para "Beware--it won't" + line "restore PP, the" + + para "POWER POINTS" + line "needed for moves." + done + +BlackthornMartBlackBeltText: + text "MAX REPEL keeps" + line "weak #MON away" + cont "from you." + + para "It's the longest" + line "lasting of the" + cont "REPEL sprays." + done + +BlackthornMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, BLACKTHORN_CITY, 4 + warp_event 3, 7, BLACKTHORN_CITY, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornMartClerkScript, -1 + object_event 7, 6, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornMartCooltrainerMScript, -1 + object_event 5, 2, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BlackthornMartBlackBeltScript, -1 diff --git a/maps/BlackthornPokecenter1F.asm b/maps/BlackthornPokecenter1F.asm new file mode 100644 index 0000000..ba28ece --- /dev/null +++ b/maps/BlackthornPokecenter1F.asm @@ -0,0 +1,66 @@ + object_const_def + const BLACKTHORNPOKECENTER1F_NURSE + const BLACKTHORNPOKECENTER1F_GENTLEMAN + const BLACKTHORNPOKECENTER1F_TWIN + const BLACKTHORNPOKECENTER1F_COOLTRAINER_M + +BlackthornPokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +BlackthornPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +BlackthornPokecenter1FGentlemanScript: + jumptextfaceplayer BlackthornPokecenter1FGentlemanText + +BlackthornPokecenter1FTwinScript: + jumptextfaceplayer BlackthornPokecenter1FTwinText + +BlackthornPokecenter1FCooltrainerMScript: + jumpstd HappinessCheckScript + +BlackthornPokecenter1FGentlemanText: + text "Deep inside far-" + line "off INDIGO PLATEAU" + + para "is the #MON" + line "LEAGUE." + + para "I hear the best" + line "trainers gather" + + para "there from around" + line "the country." + done + +BlackthornPokecenter1FTwinText: + text "There was this" + line "move I just had" + + para "to teach my #-" + line "MON." + + para "So I got the MOVE" + line "DELETER to make it" + cont "forget an HM move." + done + +BlackthornPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, BLACKTHORN_CITY, 5 + warp_event 4, 7, BLACKTHORN_CITY, 5 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornPokecenter1FNurseScript, -1 + object_event 5, 3, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BlackthornPokecenter1FGentlemanScript, -1 + object_event 1, 4, SPRITE_TWIN, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BlackthornPokecenter1FTwinScript, -1 + object_event 7, 6, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BlackthornPokecenter1FCooltrainerMScript, -1 diff --git a/maps/BluesHouse.asm b/maps/BluesHouse.asm new file mode 100644 index 0000000..55a38d1 --- /dev/null +++ b/maps/BluesHouse.asm @@ -0,0 +1,157 @@ + object_const_def + const BLUESHOUSE_DAISY + +BluesHouse_MapScripts: + def_scene_scripts + + def_callbacks + +DaisyScript: + faceplayer + opentext + readvar VAR_HOUR + ifequal 15, .ThreePM + writetext DaisyHelloText + waitbutton + closetext + end + +.ThreePM: + checkflag ENGINE_DAISYS_GROOMING + iftrue .AlreadyGroomedMon + writetext DaisyOfferGroomingText + yesorno + iffalse .Refused + writetext DaisyWhichMonText + waitbutton + special DaisysGrooming + ifequal $0, .Refused + ifequal $1, .CantGroomEgg + setflag ENGINE_DAISYS_GROOMING + writetext DaisyAlrightText + waitbutton + closetext + special FadeOutPalettes + playmusic MUSIC_HEAL + pause 60 + special FadeInPalettes + special RestartMapMusic + opentext + writetext GroomedMonLooksContentText + special PlayCurMonCry + promptbutton + writetext DaisyAllDoneText + waitbutton + closetext + end + +.AlreadyGroomedMon: + writetext DaisyAlreadyGroomedText + waitbutton + closetext + end + +.Refused: + writetext DaisyRefusedText + waitbutton + closetext + end + +.CantGroomEgg: + writetext DaisyCantGroomEggText + waitbutton + closetext + end + +DaisyHelloText: + text "DAISY: Hi! My kid" + line "brother is the GYM" + + para "LEADER in VIRIDIAN" + line "CITY." + + para "But he goes out" + line "of town so often," + + para "it causes problems" + line "for the trainers." + done + +DaisyOfferGroomingText: + text "DAISY: Hi! Good" + line "timing. I'm about" + cont "to have some tea." + + para "Would you like to" + line "join me?" + + para "Oh, your #MON" + line "are a bit dirty." + + para "Would you like me" + line "to groom one?" + done + +DaisyWhichMonText: + text "DAISY: Which one" + line "should I groom?" + done + +DaisyAlrightText: + text "DAISY: OK, I'll" + line "get it looking" + cont "nice in no time." + done + +GroomedMonLooksContentText: + text_ram wStringBuffer3 + text " looks" + line "content." + done + +DaisyAllDoneText: + text "DAISY: There you" + line "go! All done." + + para "See? Doesn't it" + line "look nice?" + + para "It's such a cute" + line "#MON." + done + +DaisyAlreadyGroomedText: + text "DAISY: I always" + line "have tea around" + + para "this time. Come" + line "join me." + done + +DaisyRefusedText: + text "DAISY: You don't" + line "want to have one" + + para "groomed? OK, we'll" + line "just have tea." + done + +DaisyCantGroomEggText: + text "DAISY: Oh, sorry." + line "I honestly can't" + cont "groom an EGG." + done + +BluesHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, PALLET_TOWN, 2 + warp_event 3, 7, PALLET_TOWN, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_DAISY, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DaisyScript, -1 diff --git a/maps/BrunosRoom.asm b/maps/BrunosRoom.asm new file mode 100644 index 0000000..32e8489 --- /dev/null +++ b/maps/BrunosRoom.asm @@ -0,0 +1,139 @@ + object_const_def + const BRUNOSROOM_BRUNO + +BrunosRoom_MapScripts: + def_scene_scripts + scene_script BrunosRoomLockDoorScene, SCENE_BRUNOSROOM_LOCK_DOOR + scene_script BrunosRoomNoopScene, SCENE_BRUNOSROOM_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, BrunosRoomDoorsCallback + +BrunosRoomLockDoorScene: + sdefer BrunosRoomDoorLocksBehindYouScript + end + +BrunosRoomNoopScene: + end + +BrunosRoomDoorsCallback: + checkevent EVENT_BRUNOS_ROOM_ENTRANCE_CLOSED + iffalse .KeepEntranceOpen + changeblock 4, 14, $2a ; wall +.KeepEntranceOpen: + checkevent EVENT_BRUNOS_ROOM_EXIT_OPEN + iffalse .KeepExitClosed + changeblock 4, 2, $16 ; open door +.KeepExitClosed: + endcallback + +BrunosRoomDoorLocksBehindYouScript: + applymovement PLAYER, BrunosRoom_EnterMovement + refreshscreen $86 + playsound SFX_STRENGTH + earthquake 80 + changeblock 4, 14, $2a ; wall + reloadmappart + closetext + setscene SCENE_BRUNOSROOM_NOOP + setevent EVENT_BRUNOS_ROOM_ENTRANCE_CLOSED + waitsfx + end + +BrunoScript_Battle: + faceplayer + opentext + checkevent EVENT_BEAT_ELITE_4_BRUNO + iftrue BrunoScript_AfterBattle + writetext BrunoScript_BrunoBeforeText + waitbutton + closetext + winlosstext BrunoScript_BrunoBeatenText, 0 + loadtrainer BRUNO, BRUNO1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_ELITE_4_BRUNO + opentext + writetext BrunoScript_BrunoDefeatText + waitbutton + closetext + playsound SFX_ENTER_DOOR + changeblock 4, 2, $16 ; open door + reloadmappart + closetext + setevent EVENT_BRUNOS_ROOM_EXIT_OPEN + waitsfx + end + +BrunoScript_AfterBattle: + writetext BrunoScript_BrunoDefeatText + waitbutton + closetext + end + +BrunosRoom_EnterMovement: + step UP + step UP + step UP + step UP + step_end + +BrunoScript_BrunoBeforeText: + text "I am BRUNO of the" + line "ELITE FOUR." + + para "I always train to" + line "the extreme be-" + cont "cause I believe in" + cont "our potential." + + para "That is how we" + line "became strong." + + para "Can you withstand" + line "our power?" + + para "Hm? I see no fear" + line "in you. You look" + + para "determined. Per-" + line "fect for battle!" + + para "Ready, ?" + line "You will bow down" + + para "to our overwhelm-" + line "ing power!" + + para "Hoo hah!" + done + +BrunoScript_BrunoBeatenText: + text "Why? How could we" + line "lose?" + done + +BrunoScript_BrunoDefeatText: + text "Having lost, I" + line "have no right to" + cont "say anything…" + + para "Go face your next" + line "challenge!" + done + +BrunosRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 17, KOGAS_ROOM, 3 + warp_event 5, 17, KOGAS_ROOM, 4 + warp_event 4, 2, KARENS_ROOM, 1 + warp_event 5, 2, KARENS_ROOM, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 7, SPRITE_BRUNO, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BrunoScript_Battle, -1 diff --git a/maps/BrunosRoom.blk b/maps/BrunosRoom.blk new file mode 100644 index 0000000..63cbed0 --- /dev/null +++ b/maps/BrunosRoom.blk @@ -0,0 +1 @@ +"4444,888,+888++,8,+++8++**-**-- \ No newline at end of file diff --git a/maps/BurnedTower1F.asm b/maps/BurnedTower1F.asm new file mode 100644 index 0000000..60e0b8a --- /dev/null +++ b/maps/BurnedTower1F.asm @@ -0,0 +1,309 @@ + object_const_def + const BURNEDTOWER1F_ROCK + const BURNEDTOWER1F_EUSINE + const BURNEDTOWER1F_RIVAL + const BURNEDTOWER1F_MORTY + const BURNEDTOWER1F_POKE_BALL + +BurnedTower1F_MapScripts: + def_scene_scripts + scene_script BurnedTower1FMeetEusineScene, SCENE_BURNEDTOWER1F_MEET_EUSINE + scene_script BurnedTower1FNoop1Scene, SCENE_BURNEDTOWER1F_RIVAL_BATTLE + scene_script BurnedTower1FNoop2Scene, SCENE_BURNEDTOWER1F_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, BurnedTower1FHoleAndLadderCallback + +BurnedTower1FMeetEusineScene: + sdefer BurnedTower1FMeetEusineScript + end + +BurnedTower1FNoop1Scene: + end + +BurnedTower1FNoop2Scene: + end + +BurnedTower1FHoleAndLadderCallback: + checkevent EVENT_HOLE_IN_BURNED_TOWER + iftrue .KeepHoleOpen + changeblock 10, 8, $32 ; floor +.KeepHoleOpen: + checkevent EVENT_RELEASED_THE_BEASTS + iftrue .HideBasement + changeblock 6, 14, $09 ; ladder +.HideBasement: + endcallback + +BurnedTower1FMeetEusineScript: + turnobject BURNEDTOWER1F_EUSINE, DOWN + showemote EMOTE_SHOCK, BURNEDTOWER1F_EUSINE, 15 + applymovement BURNEDTOWER1F_EUSINE, BurnedTower1FEusineMovement + opentext + writetext BurnedTower1FEusineIntroText + waitbutton + closetext + moveobject BURNEDTOWER1F_EUSINE, 9, 14 + setscene SCENE_BURNEDTOWER1F_RIVAL_BATTLE + end + +BurnedTowerRivalBattleScript: + showemote EMOTE_SHOCK, BURNEDTOWER1F_RIVAL, 15 + special FadeOutMusic + pause 15 + turnobject BURNEDTOWER1F_RIVAL, RIGHT + pause 15 + applymovement PLAYER, BurnedTowerMovement_PlayerWalksToRival + applymovement BURNEDTOWER1F_RIVAL, BurnedTowerMovement_RivalWalksToPlayer + playmusic MUSIC_RIVAL_ENCOUNTER + opentext + writetext BurnedTowerRival_BeforeText + waitbutton + closetext + checkevent EVENT_GOT_TOTODILE_FROM_ELM + iftrue .totodile + checkevent EVENT_GOT_CHIKORITA_FROM_ELM + iftrue .chikorita + winlosstext BurnedTowerRival_WinText, BurnedTowerRival_LossText + setlasttalked BURNEDTOWER1F_RIVAL + loadtrainer RIVAL1, RIVAL1_3_TOTODILE + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .returnfrombattle + +.totodile + winlosstext BurnedTowerRival_WinText, BurnedTowerRival_LossText + setlasttalked BURNEDTOWER1F_RIVAL + loadtrainer RIVAL1, RIVAL1_3_CHIKORITA + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .returnfrombattle + +.chikorita + winlosstext BurnedTowerRival_WinText, BurnedTowerRival_LossText + setlasttalked BURNEDTOWER1F_RIVAL + loadtrainer RIVAL1, RIVAL1_3_CYNDAQUIL + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .returnfrombattle + +.returnfrombattle + playmusic MUSIC_RIVAL_AFTER + opentext + writetext BurnedTowerRival_AfterText1 + waitbutton + closetext + setscene SCENE_BURNEDTOWER1F_NOOP + setevent EVENT_RIVAL_BURNED_TOWER + special FadeOutMusic + pause 15 + earthquake 50 + showemote EMOTE_SHOCK, PLAYER, 15 + playsound SFX_ENTER_DOOR + waitsfx + changeblock 10, 8, $25 ; hole + reloadmappart + pause 15 + applymovement PLAYER, BurnedTower1FMovement_PlayerStartsToFall + playsound SFX_KINESIS + showemote EMOTE_SHOCK, BURNEDTOWER1F_RIVAL, 20 + opentext + writetext BurnedTowerRival_AfterText2 + waitbutton + closetext + setevent EVENT_HOLE_IN_BURNED_TOWER + pause 15 + warpcheck + end + +BurnedTower1FEusineScript: + jumptextfaceplayer BurnedTower1FEusineText + +BurnedTower1FMortyScript: + jumptextfaceplayer BurnedTower1FMortyText + +BurnedTower1FRock: + jumpstd SmashRockScript + +BurnedTower1FHiddenEther: + hiddenitem ETHER, EVENT_BURNED_TOWER_1F_HIDDEN_ETHER + +BurnedTower1FHiddenUltraBall: + hiddenitem ULTRA_BALL, EVENT_BURNED_TOWER_1F_HIDDEN_ULTRA_BALL + +BurnedTower1FHPUp: + itemball HP_UP + +BurnedTowerMovement_PlayerWalksToRival: + step LEFT + step_end + +BurnedTowerMovement_RivalWalksToPlayer: + step RIGHT + step_end + +BurnedTower1FMovement_PlayerStartsToFall: + skyfall_top + step_end + +BurnedTower1FEusineMovement: + step DOWN + step LEFT + step LEFT + step LEFT + step DOWN + step_end + +BurnedTowerRival_BeforeText: + text "<……> <……> <……>" + + para "…Oh, it's you." + + para "I came looking for" + line "some legendary" + + para "#MON that they" + line "say roosts here." + + para "But there's" + line "nothing here!" + + para "Nothing after all" + line "the trouble of" + + para "coming to this" + line "dump? No way!" + + para "It's all your" + line "fault!" + done + +BurnedTowerRival_WinText: + text "…Humph!" + + para "This is why I hate" + line "battling wimps." + + para "There's no" + line "challenge in it." + done + +BurnedTowerRival_AfterText1: + text "…Aw, whatever." + + para "You would never be" + line "able to catch a" + + para "legendary #MON" + line "anyway." + done + +BurnedTowerRival_LossText: + text "…Humph!" + + para "This is why I hate" + line "battling wimps." + + para "It's just a waste" + line "of my time." + done + +BurnedTowerRival_AfterText2: + text "Humph!" + + para "What are you doing" + line "falling into a" + + para "hole? Some genius" + line "you are!" + + para "Serves you right!" + done + +BurnedTower1FEusineIntroText: + text "EUSINE: My name's" + line "EUSINE." + + para "I'm on the trail" + line "of a #MON named" + cont "SUICUNE." + + para "And you are…?" + + para "? Glad to" + line "meet you!" + + para "I heard rumors" + line "that SUICUNE is in" + + para "this BURNED TOWER," + line "so I came to look." + + para "But where exactly" + line "could it be?" + done + +BurnedTower1FEusineText: + text "EUSINE: I heard" + line "that SUICUNE is in" + + para "this BURNED TOWER," + line "so I came to look." + + para "But where exactly" + line "could it be?" + done + +BurnedTower1FMortyText: + text "MORTY: ECRUTEAK's" + line "GYM LEADER has to" + + para "study what are" + line "said to be the" + + para "legendary #MON" + line "--SUICUNE, ENTEI" + cont "and RAIKOU." + + para "EUSINE is here, so" + line "I've decided to" + + para "investigate the" + line "TOWER with him." + done + +BurnedTower1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 15, ECRUTEAK_CITY, 13 + warp_event 10, 15, ECRUTEAK_CITY, 13 + warp_event 10, 9, BURNED_TOWER_B1F, 1 + warp_event 5, 5, BURNED_TOWER_B1F, 1 ; inaccessible, left over from G/S + warp_event 5, 6, BURNED_TOWER_B1F, 1 ; inaccessible, left over from G/S + warp_event 4, 6, BURNED_TOWER_B1F, 1 ; inaccessible, left over from G/S + warp_event 15, 4, BURNED_TOWER_B1F, 2 ; inaccessible, left over from G/S + warp_event 15, 5, BURNED_TOWER_B1F, 2 ; inaccessible, left over from G/S + warp_event 10, 7, BURNED_TOWER_B1F, 3 ; inaccessible, left over from G/S + warp_event 5, 14, BURNED_TOWER_B1F, 4 ; inaccessible, left over from G/S + warp_event 4, 14, BURNED_TOWER_B1F, 4 ; inaccessible, left over from G/S + warp_event 14, 14, BURNED_TOWER_B1F, 5 ; inaccessible, left over from G/S + warp_event 15, 14, BURNED_TOWER_B1F, 5 ; inaccessible, left over from G/S + warp_event 7, 15, BURNED_TOWER_B1F, 6 ; inaccessible, left over from G/S + + def_coord_events + coord_event 11, 9, SCENE_BURNEDTOWER1F_RIVAL_BATTLE, BurnedTowerRivalBattleScript + + def_bg_events + bg_event 8, 7, BGEVENT_ITEM, BurnedTower1FHiddenEther + bg_event 13, 11, BGEVENT_ITEM, BurnedTower1FHiddenUltraBall + + def_object_events + object_event 15, 4, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BurnedTower1FRock, -1 + object_event 12, 12, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BurnedTower1FEusineScript, EVENT_BURNED_TOWER_1F_EUSINE + object_event 8, 9, SPRITE_RIVAL, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, ObjectEvent, EVENT_RIVAL_BURNED_TOWER + object_event 14, 14, SPRITE_MORTY, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BurnedTower1FMortyScript, EVENT_BURNED_TOWER_MORTY + object_event 14, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, BurnedTower1FHPUp, EVENT_BURNED_TOWER_1F_HP_UP diff --git a/maps/BurnedTower1F.blk b/maps/BurnedTower1F.blk new file mode 100644 index 0000000..16b7cf7 --- /dev/null +++ b/maps/BurnedTower1F.blk @@ -0,0 +1,3 @@ +!2432"4 3 63 3 525 5443 +4  62% + 54 3562 42 4 3 : 6 \ No newline at end of file diff --git a/maps/BurnedTowerB1F.asm b/maps/BurnedTowerB1F.asm new file mode 100644 index 0000000..c3d148b --- /dev/null +++ b/maps/BurnedTowerB1F.asm @@ -0,0 +1,261 @@ + object_const_def + const BURNEDTOWERB1F_BOULDER + const BURNEDTOWERB1F_RAIKOU1 + const BURNEDTOWERB1F_ENTEI1 + const BURNEDTOWERB1F_SUICUNE1 + const BURNEDTOWERB1F_RAIKOU2 + const BURNEDTOWERB1F_ENTEI2 + const BURNEDTOWERB1F_SUICUNE2 + const BURNEDTOWERB1F_POKE_BALL + const BURNEDTOWERB1F_EUSINE + +BurnedTowerB1F_MapScripts: + def_scene_scripts + scene_script BurnedTowerB1FNoop1Scene, SCENE_BURNEDTOWERB1F_RELEASE_THE_BEASTS + scene_script BurnedTowerB1FNoop2Scene, SCENE_BURNEDTOWERB1F_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, BurnedTowerB1FLadderCallback + +BurnedTowerB1FNoop1Scene: + end + +BurnedTowerB1FNoop2Scene: + end + +BurnedTowerB1FLadderCallback: + checkevent EVENT_RELEASED_THE_BEASTS + iftrue .HideLadder + changeblock 6, 14, $02 ; floor +.HideLadder: + endcallback + +ReleaseTheBeasts: + playmusic MUSIC_NONE + pause 30 + appear BURNEDTOWERB1F_RAIKOU1 + turnobject PLAYER, UP + pause 5 + disappear BURNEDTOWERB1F_RAIKOU2 + pause 15 + cry RAIKOU + appear BURNEDTOWERB1F_ENTEI1 + turnobject PLAYER, UP + pause 5 + disappear BURNEDTOWERB1F_ENTEI2 + pause 15 + cry ENTEI + appear BURNEDTOWERB1F_SUICUNE1 + turnobject PLAYER, UP + pause 5 + disappear BURNEDTOWERB1F_SUICUNE2 + pause 15 + cry SUICUNE + pause 15 + playsound SFX_WARP_FROM + turnobject PLAYER, LEFT + applymovement BURNEDTOWERB1F_RAIKOU1, BurnedTowerRaikouMovement + disappear BURNEDTOWERB1F_RAIKOU1 + waitsfx + playsound SFX_WARP_FROM + turnobject PLAYER, RIGHT + applymovement BURNEDTOWERB1F_ENTEI1, BurnedTowerEnteiMovement + disappear BURNEDTOWERB1F_ENTEI1 + waitsfx + pause 15 + playsound SFX_WARP_FROM + turnobject PLAYER, UP + applymovement BURNEDTOWERB1F_SUICUNE1, BurnedTowerSuicuneMovement1 + playsound SFX_WARP_FROM + turnobject PLAYER, DOWN + applymovement BURNEDTOWERB1F_SUICUNE1, BurnedTowerSuicuneMovement2 + turnobject PLAYER, UP + pause 20 + cry SUICUNE + pause 30 + playsound SFX_WARP_FROM + applymovement BURNEDTOWERB1F_SUICUNE1, BurnedTowerSuicuneMovement3 + turnobject PLAYER, DOWN + disappear BURNEDTOWERB1F_SUICUNE1 + waitsfx + special RestartMapMusic + setscene SCENE_BURNEDTOWERB1F_NOOP + setevent EVENT_RELEASED_THE_BEASTS + special InitRoamMons + setmapscene ECRUTEAK_GYM, SCENE_ECRUTEAKGYM_NOOP + setmapscene CIANWOOD_CITY, SCENE_CIANWOODCITY_SUICUNE_AND_EUSINE + clearevent EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY + setevent EVENT_ECRUTEAK_GYM_GRAMPS + clearevent EVENT_ECRUTEAK_CITY_GRAMPS + setevent EVENT_BURNED_TOWER_MORTY + setevent EVENT_BURNED_TOWER_1F_EUSINE + appear BURNEDTOWERB1F_EUSINE + refreshscreen + changeblock 6, 14, $1b ; ladder + reloadmappart + closetext + setscene SCENE_BURNEDTOWERB1F_NOOP + end + +BurnedTowerB1FEusine: + faceplayer + opentext + writetext BurnedTowerB1FEusineText + waitbutton + closetext + readvar VAR_FACING + ifequal UP, .Movement2 + applymovement BURNEDTOWERB1F_EUSINE, BurnedTowerB1FEusineMovement1 + sjump .Finish + +.Movement2: + applymovement BURNEDTOWERB1F_EUSINE, BurnedTowerB1FEusineMovement2 +.Finish: + disappear BURNEDTOWERB1F_EUSINE + playsound SFX_EXIT_BUILDING + waitsfx + end + +BurnedTowerB1FTMEndure: + itemball TM_ENDURE + +BurnedTowerB1FBoulder: + jumpstd StrengthBoulderScript + +BurnedTowerRaikouMovement: + set_sliding + fast_jump_step DOWN + fast_jump_step LEFT + remove_sliding + step_end + +BurnedTowerEnteiMovement: + set_sliding + fast_jump_step RIGHT + fast_jump_step DOWN + fast_jump_step RIGHT + remove_sliding + step_end + +BurnedTowerSuicuneMovement1: + set_sliding + fast_jump_step RIGHT + fast_jump_step DOWN + fast_jump_step DOWN + fast_jump_step LEFT + remove_sliding + step_end + +BurnedTowerSuicuneMovement2: + set_sliding + fast_jump_step LEFT + fast_jump_step UP + big_step UP + fast_jump_step RIGHT + remove_sliding + step_end + +BurnedTowerUnusedMovement: ; unreferenced + set_sliding + big_step DOWN + remove_sliding + step_end + +BurnedTowerSuicuneMovement3: + set_sliding + big_step UP + fast_jump_step RIGHT + fast_jump_step DOWN + fast_jump_step DOWN + fast_jump_step DOWN + fast_jump_step DOWN + remove_sliding + step_end + +BurnedTowerB1FEusineMovement2: + step LEFT + step LEFT + step DOWN + step DOWN + step LEFT + step DOWN + step_end + +BurnedTowerB1FEusineMovement1: + step DOWN + step LEFT + step LEFT + step LEFT + step DOWN + step DOWN + step_end + +BurnedTowerB1FEusineText: + text "EUSINE: I dug a" + line "hole here, too…" + + para "I was shocked!" + + para "SUICUNE raced by" + line "like a blur, right" + + para "in front of my" + line "eyes!" + + para "For ten years I" + line "chased SUICUNE," + + para "and I finally got" + line "to see it." + + para "I'm all choked up!" + + para ", I owe" + line "this all to you!" + + para "Thank you!" + + para "I heard that the" + line "legendary #MON" + + para "of ECRUTEAK test" + line "chosen humans by" + + para "allowing them to" + line "get close." + + para "I'm going to track" + line "SUICUNE." + + para ", let's" + line "meet again!" + + para "Farewell!" + done + +BurnedTowerB1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 10, 9, BURNED_TOWER_1F, 3 + warp_event 17, 7, BURNED_TOWER_1F, 7 + warp_event 10, 8, BURNED_TOWER_1F, 9 + warp_event 3, 13, BURNED_TOWER_1F, 10 + warp_event 17, 14, BURNED_TOWER_1F, 12 + warp_event 7, 15, BURNED_TOWER_1F, 14 + + def_coord_events + coord_event 10, 6, SCENE_BURNEDTOWERB1F_RELEASE_THE_BEASTS, ReleaseTheBeasts + + def_bg_events + + def_object_events + object_event 17, 8, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BurnedTowerB1FBoulder, -1 + object_event 7, 3, SPRITE_RAIKOU, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1 + object_event 12, 3, SPRITE_ENTEI, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1 + object_event 10, 4, SPRITE_SUICUNE, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1 + object_event 7, 3, SPRITE_RAIKOU, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_EMOTE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2 + object_event 12, 3, SPRITE_ENTEI, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_EMOTE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2 + object_event 10, 4, SPRITE_SUICUNE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_EMOTE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2 + object_event 16, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, BurnedTowerB1FTMEndure, EVENT_BURNED_TOWER_B1F_TM_ENDURE + object_event 10, 12, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BurnedTowerB1FEusine, EVENT_EUSINE_IN_BURNED_TOWER diff --git a/maps/BurnedTowerB1F.blk b/maps/BurnedTowerB1F.blk new file mode 100644 index 0000000..f2e61cf --- /dev/null +++ b/maps/BurnedTowerB1F.blk @@ -0,0 +1,8 @@ +   +  + + + 0 + +  ( +1 01+ *(! !+  \ No newline at end of file diff --git a/maps/CeladonCafe.asm b/maps/CeladonCafe.asm new file mode 100644 index 0000000..2eb5359 --- /dev/null +++ b/maps/CeladonCafe.asm @@ -0,0 +1,226 @@ + object_const_def + const CELADONCAFE_SUPER_NERD + const CELADONCAFE_FISHER1 + const CELADONCAFE_FISHER2 + const CELADONCAFE_FISHER3 + const CELADONCAFE_TEACHER + +CeladonCafe_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonCafeChef: + faceplayer + opentext + writetext ChefText_Eatathon + waitbutton + closetext + end + +CeladonCafeFisher1: + opentext + writetext Fisher1Text_Snarfle + waitbutton + closetext + faceplayer + opentext + writetext Fisher1Text_Concentration + waitbutton + closetext + turnobject CELADONCAFE_FISHER1, LEFT + end + +CeladonCafeFisher2: + opentext + writetext Fisher2Text_GulpChew + waitbutton + closetext + faceplayer + opentext + writetext Fisher2Text_Quantity + waitbutton + closetext + turnobject CELADONCAFE_FISHER2, RIGHT + end + +CeladonCafeFisher3: + opentext + writetext Fisher3Text_MunchMunch + waitbutton + closetext + faceplayer + opentext + writetext Fisher3Text_GoldenrodIsBest + waitbutton + closetext + turnobject CELADONCAFE_FISHER3, RIGHT + end + +CeladonCafeTeacher: + checkitem COIN_CASE + iftrue .HasCoinCase + opentext + writetext TeacherText_CrunchCrunch + waitbutton + closetext + faceplayer + opentext + writetext TeacherText_NoCoinCase + waitbutton + closetext + turnobject CELADONCAFE_TEACHER, LEFT + end + +.HasCoinCase: + opentext + writetext TeacherText_KeepEating + waitbutton + closetext + turnobject CELADONCAFE_TEACHER, RIGHT + opentext + writetext TeacherText_MoreChef + waitbutton + closetext + turnobject CELADONCAFE_TEACHER, LEFT + end + +EatathonContestPoster: + jumptext EatathonContestPosterText + +CeladonCafeTrashcan: + checkevent EVENT_FOUND_LEFTOVERS_IN_CELADON_CAFE + iftrue .TrashEmpty + giveitem LEFTOVERS + iffalse .PackFull + opentext + getitemname STRING_BUFFER_3, LEFTOVERS + writetext FoundLeftoversText + playsound SFX_ITEM + waitsfx + itemnotify + closetext + setevent EVENT_FOUND_LEFTOVERS_IN_CELADON_CAFE + end + +.PackFull: + opentext + getitemname STRING_BUFFER_3, LEFTOVERS + writetext FoundLeftoversText + promptbutton + writetext NoRoomForLeftoversText + waitbutton + closetext + end + +.TrashEmpty: + jumpstd TrashCanScript + +ChefText_Eatathon: + text "Hi!" + + para "We're holding an" + line "eatathon contest." + + para "We can't serve you" + line "right now. Sorry." + done + +Fisher1Text_Snarfle: + text "…Snarfle, chew…" + done + +Fisher1Text_Concentration: + text "Don't talk to me!" + + para "You'll break my" + line "concentration!" + done + +Fisher2Text_GulpChew: + text "…Gulp… Chew…" + done + +Fisher2Text_Quantity: + text "I take quantity" + line "over quality!" + + para "I'm happy when I'm" + line "full!" + done + +Fisher3Text_MunchMunch: + text "Munch, munch…" + done + +Fisher3Text_GoldenrodIsBest: + text "The food is good" + line "here, but GOLDEN-" + cont "ROD has the best" + cont "food anywhere." + done + +TeacherText_CrunchCrunch: + text "Crunch… Crunch…" + done + +TeacherText_NoCoinCase: + text "Nobody here will" + line "give you a COIN" + + para "CASE. You should" + line "look in JOHTO." + done + +TeacherText_KeepEating: + text "Crunch… Crunch…" + + para "I can keep eating!" + done + +TeacherText_MoreChef: + text "More, CHEF!" + done + +EatathonContestPosterText: + text "Eatathon Contest!" + line "No time limit!" + + para "A battle without" + line "end! The biggest" + + para "muncher gets it" + line "all for free!" + done + +FoundLeftoversText: + text " found" + line "@" + text_ram wStringBuffer3 + text "!" + done + +NoRoomForLeftoversText: + text "But can't" + line "hold another item…" + done + +CeladonCafe_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 6, 7, CELADON_CITY, 9 + warp_event 7, 7, CELADON_CITY, 9 + + def_coord_events + + def_bg_events + bg_event 5, 0, BGEVENT_READ, EatathonContestPoster + bg_event 7, 1, BGEVENT_READ, CeladonCafeTrashcan + + def_object_events + object_event 9, 3, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CeladonCafeChef, -1 + object_event 4, 6, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonCafeFisher1, -1 + object_event 1, 7, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonCafeFisher2, -1 + object_event 1, 2, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonCafeFisher3, -1 + object_event 4, 3, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonCafeTeacher, -1 diff --git a/maps/CeladonCafe.blk b/maps/CeladonCafe.blk new file mode 100644 index 0000000..cc3c921 --- /dev/null +++ b/maps/CeladonCafe.blk @@ -0,0 +1 @@ +-().,.  \ No newline at end of file diff --git a/maps/CeladonCity.asm b/maps/CeladonCity.asm new file mode 100644 index 0000000..a0a9a18 --- /dev/null +++ b/maps/CeladonCity.asm @@ -0,0 +1,269 @@ + object_const_def + const CELADONCITY_FISHER + const CELADONCITY_POLIWAG + const CELADONCITY_TEACHER1 + const CELADONCITY_GRAMPS1 + const CELADONCITY_GRAMPS2 + const CELADONCITY_YOUNGSTER1 + const CELADONCITY_YOUNGSTER2 + const CELADONCITY_TEACHER2 + const CELADONCITY_LASS + +CeladonCity_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, CeladonCityFlypointCallback + +CeladonCityFlypointCallback: + setflag ENGINE_FLYPOINT_CELADON + endcallback + +CeladonCityFisherScript: + jumptextfaceplayer CeladonCityFisherText + +CeladonCityPoliwrath: + opentext + writetext CeladonCityPoliwrathText + cry POLIWRATH + waitbutton + closetext + end + +CeladonCityTeacher1Script: + jumptextfaceplayer CeladonCityTeacher1Text + +CeladonCityGramps1Script: + jumptextfaceplayer CeladonCityGramps1Text + +CeladonCityGramps2Script: + jumptextfaceplayer CeladonCityGramps2Text + +CeladonCityYoungster1Script: + jumptextfaceplayer CeladonCityYoungster1Text + +CeladonCityYoungster2Script: + jumptextfaceplayer CeladonCityYoungster2Text + +CeladonCityTeacher2Script: + jumptextfaceplayer CeladonCityTeacher2Text + +CeladonCityLassScript: + jumptextfaceplayer CeladonCityLassText + +CeladonCitySign: + jumptext CeladonCitySignText + +CeladonGymSign: + jumptext CeladonGymSignText + +CeladonCityDeptStoreSign: + jumptext CeladonCityDeptStoreSignText + +CeladonCityMansionSign: + jumptext CeladonCityMansionSignText + +CeladonCityGameCornerSign: + jumptext CeladonCityGameCornerSignText + +CeladonCityTrainerTips: + jumptext CeladonCityTrainerTipsText + +CeladonCityPokecenterSign: + jumpstd PokecenterSignScript + +CeladonCityHiddenPpUp: + hiddenitem PP_UP, EVENT_CELADON_CITY_HIDDEN_PP_UP + +CeladonCityFisherText: + text "This POLIWRATH is" + line "my partner." + + para "I wonder if it'll" + line "ever evolve into a" + cont "frog #MON." + done + +CeladonCityPoliwrathText: + text "POLIWRATH: Croak!" + done + +CeladonCityTeacher1Text: + text "I lost at the slot" + line "machines again…" + + para "We girls also play" + line "the slots now." + + para "You should check" + line "them out too." + done + +CeladonCityGramps1Text: + text "GRIMER have been" + line "appearing lately." + + para "See that pond out" + line "in front of the" + + para "house? GRIMER live" + line "there now." + + para "Where did they" + line "come from? This is" + cont "a serious problem…" + done + +CeladonCityGramps2Text: + text "Nihihi! This GYM" + line "is great! Only" + + para "girls are allowed" + line "here!" + done + +CeladonCityYoungster1Text: + text "Want to know a" + line "secret?" + + para "CELADON MANSION" + line "has a hidden back" + cont "door." + done + +CeladonCityYoungster2Text: + text "They're holding an" + line "eating contest at" + cont "the restaurant." + + para "Just watching them" + line "go at it makes me" + cont "feel bloated…" + done + +CeladonCityTeacher2Text: + text "CELADON DEPT.STORE" + line "has the biggest" + + para "and best selection" + line "of merchandise." + + para "If you can't get" + line "it there, you" + + para "can't get it any-" + line "where." + + para "Gee… I sound like" + line "a sales clerk." + done + +CeladonCityLassText_Mobile: ; unreferenced + text "I love being" + line "surrounded by tall" + cont "buildings!" + + para "Isn't it true that" + line "GOLDENROD #MON" + + para "CENTER was made" + line "much, much bigger?" + + para "That is so neat!" + line "I wish we had a" + + para "place like that in" + line "KANTO…" + done + +CeladonCityLassText: + text "Looking at the" + line "ground while I was" + + para "walking made me" + line "dizzy." + done + +CeladonCitySignText: + text "CELADON CITY" + + para "The City of" + line "Rainbow Dreams" + done + +CeladonGymSignText: + text "CELADON CITY" + line "#MON GYM" + cont "LEADER: ERIKA" + + para "The Nature-Loving" + line "Princess" + done + +CeladonCityDeptStoreSignText: + text "Find What You" + line "Need at CELADON" + cont "DEPT.STORE!" + done + +CeladonCityMansionSignText: + text "CELADON MANSION" + done + +CeladonCityGameCornerSignText: + text "The Playground for" + line "Everybody--CELADON" + cont "GAME CORNER" + done + +CeladonCityTrainerTipsText: + text "TRAINER TIPS" + + para "GUARD SPEC." + line "protects #MON" + + para "against SPECIAL" + line "attacks such as" + cont "fire and water." + + para "Get your items at" + line "CELADON DEPT." + cont "STORE!" + done + +CeladonCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 9, CELADON_DEPT_STORE_1F, 1 + warp_event 16, 9, CELADON_MANSION_1F, 1 + warp_event 16, 3, CELADON_MANSION_1F, 3 + warp_event 17, 3, CELADON_MANSION_1F, 3 + warp_event 29, 9, CELADON_POKECENTER_1F, 1 + warp_event 18, 19, CELADON_GAME_CORNER, 1 + warp_event 23, 19, CELADON_GAME_CORNER_PRIZE_ROOM, 1 + warp_event 10, 29, CELADON_GYM, 1 + warp_event 25, 29, CELADON_CAFE, 1 + + def_coord_events + + def_bg_events + bg_event 23, 21, BGEVENT_READ, CeladonCitySign + bg_event 11, 31, BGEVENT_READ, CeladonGymSign + bg_event 6, 9, BGEVENT_READ, CeladonCityDeptStoreSign + bg_event 13, 9, BGEVENT_READ, CeladonCityMansionSign + bg_event 19, 21, BGEVENT_READ, CeladonCityGameCornerSign + bg_event 29, 21, BGEVENT_READ, CeladonCityTrainerTips + bg_event 30, 9, BGEVENT_READ, CeladonCityPokecenterSign + bg_event 37, 21, BGEVENT_ITEM, CeladonCityHiddenPpUp + + def_object_events + object_event 26, 11, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonCityFisherScript, -1 + object_event 27, 11, SPRITE_POLIWAG, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonCityPoliwrath, -1 + object_event 20, 24, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonCityTeacher1Script, -1 + object_event 14, 16, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CeladonCityGramps1Script, -1 + object_event 8, 31, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonCityGramps2Script, -1 + object_event 18, 13, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonCityYoungster1Script, -1 + object_event 24, 33, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonCityYoungster2Script, -1 + object_event 6, 14, SPRITE_TEACHER, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonCityTeacher2Script, -1 + object_event 7, 22, SPRITE_LASS, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonCityLassScript, -1 diff --git a/maps/CeladonCity.blk b/maps/CeladonCity.blk new file mode 100644 index 0000000..46655bb --- /dev/null +++ b/maps/CeladonCity.blk @@ -0,0 +1,16 @@ + T! + +ooooo +oooo +hi !U T!UUUUUUUmhihiUhi ! ! !Um7:s7~y7:~7~7~|rUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU0wwwwwUwwwUUUUUN T! !U ! !UUUUUg7:~|~U7~7~UUUUUCPVwVwUVwwwUUUUUUUUUUUUUUUUUmUUUUUUUUUUUUUUUUUm !  !UU ! ! ! !m7~7~UU7~|~7~7~mUUUUy !UUUUUUUUU + +/7~UUUUUUUUU +m + + + + + + +llllll`lll + \ No newline at end of file diff --git a/maps/CeladonDeptStore1F.asm b/maps/CeladonDeptStore1F.asm new file mode 100644 index 0000000..92a592f --- /dev/null +++ b/maps/CeladonDeptStore1F.asm @@ -0,0 +1,92 @@ + object_const_def + const CELADONDEPTSTORE1F_RECEPTIONIST + const CELADONDEPTSTORE1F_GENTLEMAN + const CELADONDEPTSTORE1F_TEACHER + +CeladonDeptStore1F_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonDeptStore1FReceptionistScript: + jumptextfaceplayer CeladonDeptStore1FReceptionistText + +CeladonDeptStore1FGentlemanScript: + jumptextfaceplayer CeladonDeptStore1FGentlemanText + +CeladonDeptStore1FTeacherScript: + jumptextfaceplayer CeladonDeptStore1FTeacherText + +CeladonDeptStore1FDirectory: + jumptext CeladonDeptStore1FDirectoryText + +CeladonDeptStore1FElevatorButton: + jumpstd ElevatorButtonScript + +CeladonDeptStore1FReceptionistText: + text "Hello! Welcome to" + line "CELADON DEPT." + cont "STORE!" + + para "The directory is" + line "on the wall." + done + +CeladonDeptStore1FGentlemanText: + text "This DEPT.STORE is" + line "part of the same" + + para "chain as the one" + line "in GOLDENROD CITY." + + para "They were both" + line "renovated at the" + cont "same time." + done + +CeladonDeptStore1FTeacherText: + text "This is my first" + line "time here." + + para "It's so big…" + + para "I'm afraid I'll" + line "get lost." + done + +CeladonDeptStore1FDirectoryText: + text "1F: SERVICE" + line " COUNTER" + + para "2F: TRAINER'S" + line " MARKET" + + para "3F: TM SHOP" + + para "4F: WISEMAN GIFTS" + + para "5F: DRUG STORE" + + para "6F: ROOFTOP" + line " SQUARE" + done + +CeladonDeptStore1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 7, CELADON_CITY, 1 + warp_event 8, 7, CELADON_CITY, 1 + warp_event 15, 0, CELADON_DEPT_STORE_2F, 2 + warp_event 2, 0, CELADON_DEPT_STORE_ELEVATOR, 1 + + def_coord_events + + def_bg_events + bg_event 14, 0, BGEVENT_READ, CeladonDeptStore1FDirectory + bg_event 3, 0, BGEVENT_READ, CeladonDeptStore1FElevatorButton + + def_object_events + object_event 10, 1, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore1FReceptionistScript, -1 + object_event 11, 4, SPRITE_GENTLEMAN, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore1FGentlemanScript, -1 + object_event 5, 3, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore1FTeacherScript, -1 diff --git a/maps/CeladonDeptStore2F.asm b/maps/CeladonDeptStore2F.asm new file mode 100644 index 0000000..4517930 --- /dev/null +++ b/maps/CeladonDeptStore2F.asm @@ -0,0 +1,87 @@ + object_const_def + const CELADONDEPTSTORE2F_CLERK1 + const CELADONDEPTSTORE2F_CLERK2 + const CELADONDEPTSTORE2F_POKEFAN_M + const CELADONDEPTSTORE2F_YOUNGSTER + +CeladonDeptStore2F_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonDeptStore2FClerk1Script: + faceplayer + opentext + pokemart MARTTYPE_STANDARD, MART_CELADON_2F_1 + closetext + end + +CeladonDeptStore2FClerk2Script: + faceplayer + opentext + pokemart MARTTYPE_STANDARD, MART_CELADON_2F_2 + closetext + end + +CeladonDeptStore2FPokefanMScript: + jumptextfaceplayer CeladonDeptStore2FPokefanMText + +CeladonDeptStore2FYoungsterScript: + jumptextfaceplayer CeladonDeptStore2FYoungsterText + +CeladonDeptStore2FDirectory: + jumptext CeladonDeptStore2FDirectoryText + +CeladonDeptStore2FElevatorButton: + jumpstd ElevatorButtonScript + +CeladonDeptStore2FPokefanMText: + text "I just recently" + line "became a trainer." + + para "My son encouraged" + line "me to do it." + + para "I'm impressed by" + line "the selection of" + cont "convenient items." + done + +CeladonDeptStore2FYoungsterText: + text "My dad's having a" + line "hard time learning" + + para "the names of items" + line "and how they are" + + para "supposed to be" + line "used…" + done + +CeladonDeptStore2FDirectoryText: + text "Top Grade Items" + line "for Trainers!" + + para "2F: TRAINER'S" + line " MARKET" + done + +CeladonDeptStore2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 12, 0, CELADON_DEPT_STORE_3F, 1 + warp_event 15, 0, CELADON_DEPT_STORE_1F, 3 + warp_event 2, 0, CELADON_DEPT_STORE_ELEVATOR, 1 + + def_coord_events + + def_bg_events + bg_event 14, 0, BGEVENT_READ, CeladonDeptStore2FDirectory + bg_event 3, 0, BGEVENT_READ, CeladonDeptStore2FElevatorButton + + def_object_events + object_event 13, 5, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore2FClerk1Script, -1 + object_event 14, 5, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore2FClerk2Script, -1 + object_event 5, 2, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore2FPokefanMScript, -1 + object_event 6, 2, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore2FYoungsterScript, -1 diff --git a/maps/CeladonDeptStore3F.asm b/maps/CeladonDeptStore3F.asm new file mode 100644 index 0000000..c877392 --- /dev/null +++ b/maps/CeladonDeptStore3F.asm @@ -0,0 +1,114 @@ + object_const_def + const CELADONDEPTSTORE3F_CLERK + const CELADONDEPTSTORE3F_YOUNGSTER + const CELADONDEPTSTORE3F_GAMEBOY_KID1 + const CELADONDEPTSTORE3F_GAMEBOY_KID2 + const CELADONDEPTSTORE3F_SUPER_NERD + +CeladonDeptStore3F_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonDeptStore3FClerkScript: + faceplayer + opentext + pokemart MARTTYPE_STANDARD, MART_CELADON_3F + closetext + end + +CeladonDeptStore3FYoungsterScript: + jumptextfaceplayer CeladonDeptStore3FYoungsterText + +CeladonDeptStore3FGameboyKid1Script: + faceplayer + opentext + writetext CeladonDeptStore3FGameboyKid1Text + waitbutton + closetext + turnobject CELADONDEPTSTORE3F_GAMEBOY_KID1, DOWN + end + +CeladonDeptStore3FGameboyKid2Script: + faceplayer + opentext + writetext CeladonDeptStore3FGameboyKid2Text + waitbutton + closetext + turnobject CELADONDEPTSTORE3F_GAMEBOY_KID2, DOWN + end + +CeladonDeptStore3FSuperNerdScript: + jumptextfaceplayer CeladonDeptStore3FSuperNerdText + +CeladonDeptStore3FElevatorButton: + jumpstd ElevatorButtonScript + +CeladonDeptStore3FDirectory: + jumptext CeladonDeptStore3FDirectoryText + +CeladonDeptStore3FYoungsterText: + text "I can't decide" + line "which #MON I" + + para "should use this TM" + line "on…" + done + +CeladonDeptStore3FGameboyKid1Text: + text "Uh-oh! I traded my" + line "#MON without" + + para "removing the UP-" + line "GRADE from it." + done + +CeladonDeptStore3FGameboyKid2Text: + text "Yeah! I'm finally" + line "getting a PORYGON!" + + para "I'm no good at the" + line "slots, so I could" + + para "never get enough" + line "coins…" + + para "…Huh?" + + para "The traded PORYGON" + line "turned into a dif-" + cont "ferent #MON!" + done + +CeladonDeptStore3FSuperNerdText: + text "The TM SHOP sells" + line "some rare moves." + done + +CeladonDeptStore3FDirectoryText: + text "3F: TM SHOP" + + para "Make Your #MON" + line "Stronger!" + done + +CeladonDeptStore3F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 12, 0, CELADON_DEPT_STORE_2F, 1 + warp_event 15, 0, CELADON_DEPT_STORE_4F, 2 + warp_event 2, 0, CELADON_DEPT_STORE_ELEVATOR, 1 + + def_coord_events + + def_bg_events + bg_event 14, 0, BGEVENT_READ, CeladonDeptStore3FDirectory + bg_event 3, 0, BGEVENT_READ, CeladonDeptStore3FElevatorButton + + def_object_events + object_event 7, 1, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore3FClerkScript, -1 + object_event 6, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore3FYoungsterScript, -1 + object_event 9, 1, SPRITE_GAMEBOY_KID, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore3FGameboyKid1Script, -1 + object_event 10, 1, SPRITE_GAMEBOY_KID, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore3FGameboyKid2Script, -1 + object_event 13, 4, SPRITE_SUPER_NERD, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore3FSuperNerdScript, -1 diff --git a/maps/CeladonDeptStore4F.asm b/maps/CeladonDeptStore4F.asm new file mode 100644 index 0000000..def1bf7 --- /dev/null +++ b/maps/CeladonDeptStore4F.asm @@ -0,0 +1,68 @@ + object_const_def + const CELADONDEPTSTORE4F_CLERK + const CELADONDEPTSTORE4F_SUPER_NERD + const CELADONDEPTSTORE4F_YOUNGSTER + +CeladonDeptStore4F_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonDeptStore4FClerkScript: + faceplayer + opentext + pokemart MARTTYPE_STANDARD, MART_CELADON_4F + closetext + end + +CeladonDeptStore4FSuperNerdScript: + jumptextfaceplayer CeladonDeptStore4FSuperNerdText + +CeladonDeptStore4FYoungsterScript: + jumptextfaceplayer CeladonDeptStore4FYoungsterText + +CeladonDeptStore4FDirectory: + jumptext CeladonDeptStore4FDirectoryText + +CeladonDeptStore4FElevatorButton: + jumpstd ElevatorButtonScript + +CeladonDeptStore4FSuperNerdText: + text "I'm here to buy" + line "SURF MAIL to send" + cont "to my girlfriend." + done + +CeladonDeptStore4FYoungsterText: + text "This is the only" + line "place where you" + + para "can buy LOVELY" + line "MAIL." + done + +CeladonDeptStore4FDirectoryText: + text "Express Yourself" + line "With Gifts!" + + para "4F: WISEMAN GIFTS" + done + +CeladonDeptStore4F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 12, 0, CELADON_DEPT_STORE_5F, 1 + warp_event 15, 0, CELADON_DEPT_STORE_3F, 2 + warp_event 2, 0, CELADON_DEPT_STORE_ELEVATOR, 1 + + def_coord_events + + def_bg_events + bg_event 14, 0, BGEVENT_READ, CeladonDeptStore4FDirectory + bg_event 3, 0, BGEVENT_READ, CeladonDeptStore4FElevatorButton + + def_object_events + object_event 13, 5, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore4FClerkScript, -1 + object_event 7, 6, SPRITE_SUPER_NERD, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore4FSuperNerdScript, -1 + object_event 8, 2, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore4FYoungsterScript, -1 diff --git a/maps/CeladonDeptStore5F.asm b/maps/CeladonDeptStore5F.asm new file mode 100644 index 0000000..bba92d0 --- /dev/null +++ b/maps/CeladonDeptStore5F.asm @@ -0,0 +1,91 @@ + object_const_def + const CELADONDEPTSTORE5F_CLERK1 + const CELADONDEPTSTORE5F_CLERK2 + const CELADONDEPTSTORE5F_GENTLEMAN + const CELADONDEPTSTORE5F_SAILOR + const CELADONDEPTSTORE5F_TEACHER + +CeladonDeptStore5F_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonDeptStore5FClerk1Script: + faceplayer + opentext + pokemart MARTTYPE_STANDARD, MART_CELADON_5F_1 + closetext + end + +CeladonDeptStore5FClerk2Script: + faceplayer + opentext + pokemart MARTTYPE_STANDARD, MART_CELADON_5F_2 + closetext + end + +CeladonDeptStore5FGentlemanScript: + jumptextfaceplayer CeladonDeptStore5FGentlemanText + +CeladonDeptStore5FSailorScript: + jumptextfaceplayer CeladonDeptStore5FSailorText + +CeladonDeptStore5FTeacherScript: + jumptextfaceplayer CeladonDeptStore5FTeacherText + +CeladonDeptStore5FDirectory: + jumptext CeladonDeptStore5FDirectoryText + +CeladonDeptStore5FElevatorButton: + jumpstd ElevatorButtonScript + +CeladonDeptStore5FGentlemanText: + text "I want to buy some" + line "items that raise" + + para "#MON stats, but" + line "I don't have" + cont "enough money…" + done + +CeladonDeptStore5FSailorText: + text "I want PP UP, so I" + line "can raise the PP" + + para "of moves. But you" + line "can't buy it…" + done + +CeladonDeptStore5FTeacherText: + text "Using items on" + line "them makes #-" + cont "MON happy." + + para "They hate certain" + line "items, though…" + done + +CeladonDeptStore5FDirectoryText: + text "5F: DRUG STORE" + done + +CeladonDeptStore5F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 12, 0, CELADON_DEPT_STORE_4F, 1 + warp_event 15, 0, CELADON_DEPT_STORE_6F, 1 + warp_event 2, 0, CELADON_DEPT_STORE_ELEVATOR, 1 + + def_coord_events + + def_bg_events + bg_event 14, 0, BGEVENT_READ, CeladonDeptStore5FDirectory + bg_event 3, 0, BGEVENT_READ, CeladonDeptStore5FElevatorButton + + def_object_events + object_event 7, 5, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore5FClerk1Script, -1 + object_event 8, 5, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore5FClerk2Script, -1 + object_event 13, 5, SPRITE_GENTLEMAN, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore5FGentlemanScript, -1 + object_event 3, 4, SPRITE_SAILOR, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore5FSailorScript, -1 + object_event 1, 7, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore5FTeacherScript, -1 diff --git a/maps/CeladonDeptStore6F.asm b/maps/CeladonDeptStore6F.asm new file mode 100644 index 0000000..2b0f7ce --- /dev/null +++ b/maps/CeladonDeptStore6F.asm @@ -0,0 +1,168 @@ +DEF CELADONDEPTSTORE6F_FRESH_WATER_PRICE EQU 200 +DEF CELADONDEPTSTORE6F_SODA_POP_PRICE EQU 300 +DEF CELADONDEPTSTORE6F_LEMONADE_PRICE EQU 350 + + object_const_def + const CELADONDEPTSTORE6F_SUPER_NERD + const CELADONDEPTSTORE6F_YOUNGSTER + +CeladonDeptStore6F_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_TILES, CeladonDeptStore6FHideRooftopStairsCallback + +CeladonDeptStore6FHideRooftopStairsCallback: + changeblock 12, 0, $03 ; wall + endcallback + +CeladonDeptStore6FSuperNerdScript: + jumptextfaceplayer CeladonDeptStore6FSuperNerdText + +CeladonDeptStore6FYoungsterScript: + jumptextfaceplayer CeladonDeptStore6FYoungsterText + +CeladonDeptStore6FVendingMachine: + opentext + writetext CeladonVendingText +.Start: + special PlaceMoneyTopRight + loadmenu .MenuHeader + verticalmenu + closewindow + ifequal 1, .FreshWater + ifequal 2, .SodaPop + ifequal 3, .Lemonade + closetext + end + +.FreshWater: + checkmoney YOUR_MONEY, CELADONDEPTSTORE6F_FRESH_WATER_PRICE + ifequal HAVE_LESS, .NotEnoughMoney + giveitem FRESH_WATER + iffalse .NotEnoughSpace + takemoney YOUR_MONEY, CELADONDEPTSTORE6F_FRESH_WATER_PRICE + getitemname STRING_BUFFER_3, FRESH_WATER + sjump .VendItem + +.SodaPop: + checkmoney YOUR_MONEY, CELADONDEPTSTORE6F_SODA_POP_PRICE + ifequal HAVE_LESS, .NotEnoughMoney + giveitem SODA_POP + iffalse .NotEnoughSpace + takemoney YOUR_MONEY, CELADONDEPTSTORE6F_SODA_POP_PRICE + getitemname STRING_BUFFER_3, SODA_POP + sjump .VendItem + +.Lemonade: + checkmoney YOUR_MONEY, CELADONDEPTSTORE6F_LEMONADE_PRICE + ifequal HAVE_LESS, .NotEnoughMoney + giveitem LEMONADE + iffalse .NotEnoughSpace + takemoney YOUR_MONEY, CELADONDEPTSTORE6F_LEMONADE_PRICE + getitemname STRING_BUFFER_3, LEMONADE + sjump .VendItem + +.VendItem: + pause 10 + playsound SFX_ENTER_DOOR + writetext CeladonClangText + promptbutton + itemnotify + sjump .Start + +.NotEnoughMoney: + writetext CeladonVendingNoMoneyText + waitbutton + sjump .Start + +.NotEnoughSpace: + writetext CeladonVendingNoSpaceText + waitbutton + sjump .Start + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 2, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 4 ; items + db "FRESH WATER ¥{d:CELADONDEPTSTORE6F_FRESH_WATER_PRICE}@" + db "SODA POP ¥{d:CELADONDEPTSTORE6F_SODA_POP_PRICE}@" + db "LEMONADE ¥{d:CELADONDEPTSTORE6F_LEMONADE_PRICE}@" + db "CANCEL@" + +CeladonDeptStore6FDirectory: + jumptext CeladonDeptStore6FDirectoryText + +CeladonDeptStore6FElevatorButton: ; unreferenced + jumpstd ElevatorButtonScript + +CeladonVendingText: + text "A vending machine!" + line "Here's the menu." + done + +CeladonClangText: + text "Clang!" + + para "@" + text_ram wStringBuffer3 + text_start + line "popped out." + done + +CeladonVendingNoMoneyText: + text "Oops, not enough" + line "money…" + done + +CeladonVendingNoSpaceText: + text "There's no more" + line "room for stuff…" + done + +CeladonDeptStore6FSuperNerdText: + text "A vending machine" + line "with a prize rou-" + cont "lette…" + + para "You never see" + line "those anymore." + done + +CeladonDeptStore6FYoungsterText: + text "Aww! There's no" + line "games here!" + + para "I wanted to play…" + done + +CeladonDeptStore6FDirectoryText: + text "6F: ROOFTOP SQUARE" + line "VENDING MACHINES" + done + +CeladonDeptStore6F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 15, 0, CELADON_DEPT_STORE_5F, 2 + warp_event 2, 0, CELADON_DEPT_STORE_ELEVATOR, 1 + + def_coord_events + + def_bg_events + bg_event 14, 0, BGEVENT_READ, CeladonDeptStore6FDirectory + bg_event 3, 0, BGEVENT_READ, CeladonDeptStore1FElevatorButton + bg_event 8, 1, BGEVENT_UP, CeladonDeptStore6FVendingMachine + bg_event 9, 1, BGEVENT_UP, CeladonDeptStore6FVendingMachine + bg_event 10, 1, BGEVENT_UP, CeladonDeptStore6FVendingMachine + bg_event 11, 1, BGEVENT_UP, CeladonDeptStore6FVendingMachine + + def_object_events + object_event 9, 2, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore6FSuperNerdScript, -1 + object_event 12, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonDeptStore6FYoungsterScript, -1 diff --git a/maps/CeladonDeptStoreElevator.asm b/maps/CeladonDeptStoreElevator.asm new file mode 100644 index 0000000..fbaa641 --- /dev/null +++ b/maps/CeladonDeptStoreElevator.asm @@ -0,0 +1,40 @@ +CeladonDeptStoreElevator_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonDeptStoreElevatorScript: + opentext + elevator CeladonDeptStoreElevatorData + closetext + iffalse .Done + pause 5 + playsound SFX_ELEVATOR + earthquake 60 + waitsfx +.Done: + end + +CeladonDeptStoreElevatorData: + db 6 ; floors + elevfloor FLOOR_1F, 4, CELADON_DEPT_STORE_1F + elevfloor FLOOR_2F, 3, CELADON_DEPT_STORE_2F + elevfloor FLOOR_3F, 3, CELADON_DEPT_STORE_3F + elevfloor FLOOR_4F, 3, CELADON_DEPT_STORE_4F + elevfloor FLOOR_5F, 3, CELADON_DEPT_STORE_5F + elevfloor FLOOR_6F, 2, CELADON_DEPT_STORE_6F + db -1 ; end + +CeladonDeptStoreElevator_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 1, 3, CELADON_DEPT_STORE_1F, -1 + warp_event 2, 3, CELADON_DEPT_STORE_1F, -1 + + def_coord_events + + def_bg_events + bg_event 3, 0, BGEVENT_READ, CeladonDeptStoreElevatorScript + + def_object_events diff --git a/maps/CeladonGameCorner.asm b/maps/CeladonGameCorner.asm new file mode 100644 index 0000000..f94a097 --- /dev/null +++ b/maps/CeladonGameCorner.asm @@ -0,0 +1,339 @@ + object_const_def + const CELADONGAMECORNER_CLERK + const CELADONGAMECORNER_RECEPTIONIST + const CELADONGAMECORNER_POKEFAN_M + const CELADONGAMECORNER_TEACHER + const CELADONGAMECORNER_FISHING_GURU + const CELADONGAMECORNER_FISHER1 + const CELADONGAMECORNER_FISHER2 + const CELADONGAMECORNER_GYM_GUIDE + const CELADONGAMECORNER_GRAMPS + +CeladonGameCorner_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonGameCornerClerkScript: + jumpstd GameCornerCoinVendorScript + +CeladonGameCornerReceptionistScript: + jumptextfaceplayer CeladonGameCornerReceptionistText + +CeladonGameCornerPokefanMScript: + faceplayer + opentext + writetext CeladonGameCornerPokefanMText + waitbutton + closetext + turnobject CELADONGAMECORNER_POKEFAN_M, LEFT + end + +CeladonGameCornerTeacherScript: + faceplayer + opentext + writetext CeladonGameCornerTeacherText + waitbutton + closetext + turnobject CELADONGAMECORNER_TEACHER, RIGHT + end + +CeladonGameCornerFishingGuruScript: + faceplayer + opentext + writetext CeladonGameCornerFishingGuruText + waitbutton + closetext + turnobject CELADONGAMECORNER_FISHING_GURU, RIGHT + end + +CeladonGameCornerFisherScript: + faceplayer + opentext + checkevent EVENT_GOT_COINS_FROM_GAMBLER_AT_CELADON + iftrue .GotCoins + writetext CeladonGameCornerFisherText1 + promptbutton + checkitem COIN_CASE + iffalse .NoCoinCase + checkcoins MAX_COINS - 1 + ifequal HAVE_MORE, .FullCoinCase + getstring STRING_BUFFER_4, .coinname + scall .GiveCoins + givecoins 18 + setevent EVENT_GOT_COINS_FROM_GAMBLER_AT_CELADON +.GotCoins: + writetext CeladonGameCornerFisherText2 + waitbutton + closetext + turnobject LAST_TALKED, LEFT + end + +.GiveCoins: + jumpstd ReceiveItemScript + end + +.coinname + db "COIN@" + +.NoCoinCase: + writetext CeladonGameCornerFisherNoCoinCaseText + waitbutton + closetext + turnobject LAST_TALKED, LEFT + end + +.FullCoinCase: + writetext CeladonGameCornerFisherFullCoinCaseText + waitbutton + closetext + turnobject LAST_TALKED, LEFT + end + +CeladonGymGuideScript: + jumptextfaceplayer CeladonGymGuideText + +CeladonGameCornerGrampsScript: + faceplayer + opentext + writetext CeladonGameCornerGrampsText + waitbutton + closetext + turnobject CELADONGAMECORNER_GRAMPS, LEFT + end + +CeladonGameCornerPoster1Script: + jumptext CeladonGameCornerPoster1Text + +CeladonGameCornerPoster2Script: + jumptext CeladonGameCornerPoster2Text + +CeladonGameCornerLuckySlotMachineScript: + random 6 + ifequal 0, CeladonGameCornerSlotMachineScript + refreshscreen + setval FALSE + special SlotMachine + closetext + end + +CeladonGameCornerSlotMachineScript: + refreshscreen + setval TRUE + special SlotMachine + closetext + end + +CeladonGameCornerCardFlipScript: + refreshscreen + special CardFlip + closetext + end + +CeladonGameCornerLighterScript: + jumptext CeladonGameCornerLighterText + +CeladonGameCornerSodaCanScript: + opentext + writetext CeladonGameCornerSodaCanText + waitbutton + special CardFlip + closetext + end + +CeladonGameCornerUnusedMovementData: ; unreferenced + step RIGHT + turn_head LEFT + step_end + +CeladonGameCornerReceptionistText: + text "Welcome!" + + para "You may exchange" + line "your coins for" + + para "fabulous prizes" + line "next door." + done + +CeladonGameCornerPokefanMText: + text "The slot machines" + line "are all state of" + cont "the art." + done + +CeladonGameCornerTeacherText: + text "It's this machine" + line "I want." + + para "It cleaned me out" + line "yesterday, so it" + + para "should pay out" + line "today." + done + +CeladonGameCornerFishingGuruText: + text "I think this slot" + line "machine will pay" + cont "out…" + + para "The odds vary" + line "among machines." + done + +CeladonGameCornerFisherText1: + text "Gahahaha!" + + para "The coins just" + line "keep popping out!" + + para "Hm? What, kid? You" + line "want to play?" + + para "I'll share my luck" + line "with you!" + done + +CeladonGameCornerFisherText2: + text "Gahahaha!" + + para "It makes me feel" + line "good to do nice" + + para "things for other" + line "people!" + done + +CeladonGameCornerFisherNoCoinCaseText: + text "Hey, you don't" + line "have a COIN CASE." + + para "How am I supposed" + line "to give you any" + cont "coins, kid?" + done + +CeladonGameCornerFisherFullCoinCaseText: + text "Hey, your COIN" + line "CASE is full, kid." + + para "You must be riding" + line "a winning streak" + cont "too." + done + +CeladonGymGuideText: + text "Hey! CHAMP in" + line "making!" + + para "Are you playing" + line "the slots too?" + + para "I'm trying to get" + line "enough coins for a" + cont "prize #MON." + + para "But I don't have" + line "enough coins yet…" + done + +CeladonGameCornerGrampsText: + text "Hmmm… The odds are" + line "surely better for" + + para "PIKACHU's line," + line "but… What to do?" + done + +CeladonGameCornerPoster1Text: + text "Hey!" + + para "Underneath this" + line "poster…" + + para "There's nothing!" + done + +CeladonGameCornerPoster2Text: + text "Hey!" + + para "Underneath this" + line "poster…" + + para "There's nothing!" + done + +CeladonGameCornerLighterText: + text "There's a lighter" + line "here." + done + +CeladonGameCornerSodaCanText: + text "A can of soda…" + + para "Someone must be" + line "coming back…" + + para "Huh? It's empty!" + done + +CeladonGameCorner_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 14, 13, CELADON_CITY, 6 + warp_event 15, 13, CELADON_CITY, 6 + + def_coord_events + + def_bg_events + bg_event 1, 6, BGEVENT_READ, CeladonGameCornerCardFlipScript + bg_event 1, 7, BGEVENT_READ, CeladonGameCornerCardFlipScript + bg_event 1, 8, BGEVENT_READ, CeladonGameCornerCardFlipScript + bg_event 1, 9, BGEVENT_READ, CeladonGameCornerCardFlipScript + bg_event 1, 10, BGEVENT_READ, CeladonGameCornerCardFlipScript + bg_event 1, 11, BGEVENT_LEFT, CeladonGameCornerCardFlipScript + bg_event 6, 6, BGEVENT_READ, CeladonGameCornerCardFlipScript + bg_event 6, 7, BGEVENT_READ, CeladonGameCornerCardFlipScript + bg_event 6, 8, BGEVENT_READ, CeladonGameCornerCardFlipScript + bg_event 6, 9, BGEVENT_READ, CeladonGameCornerSodaCanScript + bg_event 6, 10, BGEVENT_READ, CeladonGameCornerCardFlipScript + bg_event 6, 11, BGEVENT_RIGHT, CeladonGameCornerCardFlipScript + bg_event 7, 6, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 7, 7, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 7, 8, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 7, 9, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 7, 10, BGEVENT_READ, CeladonGameCornerSlotMachineScript + bg_event 7, 11, BGEVENT_LEFT, CeladonGameCornerLuckySlotMachineScript + bg_event 12, 6, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 12, 7, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 12, 8, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 12, 9, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 12, 10, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 12, 11, BGEVENT_RIGHT, CeladonGameCornerLuckySlotMachineScript + bg_event 13, 6, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 13, 7, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 13, 8, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 13, 9, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 13, 10, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 13, 11, BGEVENT_LEFT, CeladonGameCornerLuckySlotMachineScript + bg_event 18, 6, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 18, 7, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 18, 8, BGEVENT_READ, CeladonGameCornerLighterScript + bg_event 18, 9, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 18, 10, BGEVENT_READ, CeladonGameCornerLuckySlotMachineScript + bg_event 18, 11, BGEVENT_RIGHT, CeladonGameCornerLuckySlotMachineScript + bg_event 15, 0, BGEVENT_READ, CeladonGameCornerPoster1Script + bg_event 9, 0, BGEVENT_READ, CeladonGameCornerPoster2Script + + def_object_events + object_event 5, 2, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerClerkScript, -1 + object_event 3, 2, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerReceptionistScript, -1 + object_event 14, 10, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerPokefanMScript, -1 + object_event 17, 7, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerTeacherScript, -1 + object_event 11, 7, SPRITE_FISHING_GURU, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerFishingGuruScript, -1 + object_event 8, 10, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, DAY, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerFisherScript, -1 + object_event 8, 10, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, NITE, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerFisherScript, -1 + object_event 11, 3, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonGymGuideScript, -1 + object_event 2, 8, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerGrampsScript, -1 diff --git a/maps/CeladonGameCorner.blk b/maps/CeladonGameCorner.blk new file mode 100644 index 0000000..4d40a2e --- /dev/null +++ b/maps/CeladonGameCorner.blk @@ -0,0 +1 @@ +( (  '      \ No newline at end of file diff --git a/maps/CeladonGameCornerPrizeRoom.asm b/maps/CeladonGameCornerPrizeRoom.asm new file mode 100644 index 0000000..55ab9aa --- /dev/null +++ b/maps/CeladonGameCornerPrizeRoom.asm @@ -0,0 +1,286 @@ +DEF CELADONGAMECORNERPRIZEROOM_TM32_COINS EQU 1500 +DEF CELADONGAMECORNERPRIZEROOM_TM29_COINS EQU 3500 +DEF CELADONGAMECORNERPRIZEROOM_TM15_COINS EQU 7500 +DEF CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS EQU 2222 +DEF CELADONGAMECORNERPRIZEROOM_PORYGON_COINS EQU 5555 +DEF CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS EQU 8888 + + object_const_def + const CELADONGAMECORNERPRIZEROOM_GENTLEMAN + const CELADONGAMECORNERPRIZEROOM_PHARMACIST + +CeladonGameCornerPrizeRoom_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonGameCornerPrizeRoomGentlemanScript: + jumptextfaceplayer CeladonGameCornerPrizeRoomGentlemanText + +CeladonGameCornerPrizeRoomPharmacistScript: + jumptextfaceplayer CeladonGameCornerPrizeRoomPharmacistText + +CeladonGameCornerPrizeRoomTMVendor: + faceplayer + opentext + writetext CeladonPrizeRoom_PrizeVendorIntroText + waitbutton + checkitem COIN_CASE + iffalse CeladonPrizeRoom_NoCoinCase + writetext CeladonPrizeRoom_AskWhichPrizeText +CeladonPrizeRoom_tmcounterloop: + special DisplayCoinCaseBalance + loadmenu CeladonPrizeRoom_TMMenuHeader + verticalmenu + closewindow + ifequal 1, .DoubleTeam + ifequal 2, .Psychic + ifequal 3, .HyperBeam + sjump CeladonPrizeRoom_CancelPurchaseScript + +.DoubleTeam: + checkcoins CELADONGAMECORNERPRIZEROOM_TM32_COINS + ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins + getitemname STRING_BUFFER_3, TM_DOUBLE_TEAM + scall CeladonPrizeRoom_askbuy + iffalse CeladonPrizeRoom_CancelPurchaseScript + giveitem TM_DOUBLE_TEAM + iffalse CeladonPrizeRoom_notenoughroom + takecoins CELADONGAMECORNERPRIZEROOM_TM32_COINS + sjump CeladonPrizeRoom_purchased + +.Psychic: + checkcoins CELADONGAMECORNERPRIZEROOM_TM29_COINS + ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins + getitemname STRING_BUFFER_3, TM_PSYCHIC_M + scall CeladonPrizeRoom_askbuy + iffalse CeladonPrizeRoom_CancelPurchaseScript + giveitem TM_PSYCHIC_M + iffalse CeladonPrizeRoom_notenoughroom + takecoins CELADONGAMECORNERPRIZEROOM_TM29_COINS + sjump CeladonPrizeRoom_purchased + +.HyperBeam: + checkcoins CELADONGAMECORNERPRIZEROOM_TM15_COINS + ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins + getitemname STRING_BUFFER_3, TM_HYPER_BEAM + scall CeladonPrizeRoom_askbuy + iffalse CeladonPrizeRoom_CancelPurchaseScript + giveitem TM_HYPER_BEAM + iffalse CeladonPrizeRoom_notenoughroom + takecoins CELADONGAMECORNERPRIZEROOM_TM15_COINS + sjump CeladonPrizeRoom_purchased + +CeladonPrizeRoom_askbuy: + writetext CeladonPrizeRoom_ConfirmPurchaseText + yesorno + end + +CeladonPrizeRoom_purchased: + waitsfx + playsound SFX_TRANSACTION + writetext CeladonPrizeRoom_HereYouGoText + waitbutton + sjump CeladonPrizeRoom_tmcounterloop + +CeladonPrizeRoom_notenoughcoins: + writetext CeladonPrizeRoom_NotEnoughCoinsText + waitbutton + closetext + end + +CeladonPrizeRoom_notenoughroom: + writetext CeladonPrizeRoom_NotEnoughRoomText + waitbutton + closetext + end + +CeladonPrizeRoom_CancelPurchaseScript: + writetext CeladonPrizeRoom_ComeAgainText + waitbutton + closetext + end + +CeladonPrizeRoom_NoCoinCase: + writetext CeladonPrizeRoom_NoCoinCaseText + waitbutton + closetext + end + +CeladonPrizeRoom_TMMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 2, 15, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 4 ; items + db "TM32 {d:CELADONGAMECORNERPRIZEROOM_TM32_COINS}@" + db "TM29 {d:CELADONGAMECORNERPRIZEROOM_TM29_COINS}@" + db "TM15 {d:CELADONGAMECORNERPRIZEROOM_TM15_COINS}@" + db "CANCEL@" + +CeladonGameCornerPrizeRoomPokemonVendor: + faceplayer + opentext + writetext CeladonPrizeRoom_PrizeVendorIntroText + waitbutton + checkitem COIN_CASE + iffalse CeladonPrizeRoom_NoCoinCase +.loop + writetext CeladonPrizeRoom_AskWhichPrizeText + special DisplayCoinCaseBalance + loadmenu .MenuHeader + verticalmenu + closewindow + ifequal 1, .Pikachu + ifequal 2, .Porygon + ifequal 3, .Larvitar + sjump CeladonPrizeRoom_CancelPurchaseScript + +.Pikachu: + checkcoins CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS + ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins + readvar VAR_PARTYCOUNT + ifequal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom + getmonname STRING_BUFFER_3, PIKACHU + scall CeladonPrizeRoom_askbuy + iffalse CeladonPrizeRoom_CancelPurchaseScript + waitsfx + playsound SFX_TRANSACTION + writetext CeladonPrizeRoom_HereYouGoText + waitbutton + loadmonindex 1, PIKACHU + special GameCornerPrizeMonCheckDex + givepoke PIKACHU, 25 + takecoins CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS + sjump .loop + +.Porygon: + checkcoins CELADONGAMECORNERPRIZEROOM_PORYGON_COINS + ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins + readvar VAR_PARTYCOUNT + ifequal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom + getmonname STRING_BUFFER_3, PORYGON + scall CeladonPrizeRoom_askbuy + iffalse CeladonPrizeRoom_CancelPurchaseScript + waitsfx + playsound SFX_TRANSACTION + writetext CeladonPrizeRoom_HereYouGoText + waitbutton + loadmonindex 2, PORYGON + special GameCornerPrizeMonCheckDex + givepoke PORYGON, 15 + takecoins CELADONGAMECORNERPRIZEROOM_PORYGON_COINS + sjump .loop + +.Larvitar: + checkcoins CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS + ifequal HAVE_LESS, CeladonPrizeRoom_notenoughcoins + readvar VAR_PARTYCOUNT + ifequal PARTY_LENGTH, CeladonPrizeRoom_notenoughroom + getmonname STRING_BUFFER_3, LARVITAR + scall CeladonPrizeRoom_askbuy + iffalse CeladonPrizeRoom_CancelPurchaseScript + waitsfx + playsound SFX_TRANSACTION + writetext CeladonPrizeRoom_HereYouGoText + waitbutton + loadmonindex 3, LARVITAR + special GameCornerPrizeMonCheckDex + givepoke LARVITAR, 40 + takecoins CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS + sjump .loop + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 2, 17, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 4 ; items + db "PIKACHU {d:CELADONGAMECORNERPRIZEROOM_PIKACHU_COINS}@" + db "PORYGON {d:CELADONGAMECORNERPRIZEROOM_PORYGON_COINS}@" + db "LARVITAR {d:CELADONGAMECORNERPRIZEROOM_LARVITAR_COINS}@" + db "CANCEL@" + +CeladonGameCornerPrizeRoomGentlemanText: + text "I wanted PORYGON," + line "but I was short by" + cont "100 coins…" + done + +CeladonGameCornerPrizeRoomPharmacistText: + text "Whew…" + + para "I've got to stay" + line "calm and cool…" + + para "I can't lose my" + line "cool, or I'll lose" + cont "all my money…" + done + +CeladonPrizeRoom_PrizeVendorIntroText: + text "Welcome!" + + para "We exchange your" + line "coins for fabulous" + cont "prizes!" + done + +CeladonPrizeRoom_AskWhichPrizeText: + text "Which prize would" + line "you like?" + done + +CeladonPrizeRoom_ConfirmPurchaseText: + text "OK, so you wanted" + line "a @" + text_ram wStringBuffer3 + text "?" + done + +CeladonPrizeRoom_HereYouGoText: + text "Here you go!" + done + +CeladonPrizeRoom_NotEnoughCoinsText: + text "You don't have" + line "enough coins." + done + +CeladonPrizeRoom_NotEnoughRoomText: + text "You have no room" + line "for it." + done + +CeladonPrizeRoom_ComeAgainText: + text "Oh. Please come" + line "back with coins!" + done + +CeladonPrizeRoom_NoCoinCaseText: + text "Oh? You don't have" + line "a COIN CASE." + done + +CeladonGameCornerPrizeRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 5, CELADON_CITY, 7 + warp_event 3, 5, CELADON_CITY, 7 + + def_coord_events + + def_bg_events + bg_event 2, 1, BGEVENT_READ, CeladonGameCornerPrizeRoomTMVendor + bg_event 4, 1, BGEVENT_READ, CeladonGameCornerPrizeRoomPokemonVendor + + def_object_events + object_event 0, 2, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerPrizeRoomGentlemanScript, -1 + object_event 4, 4, SPRITE_PHARMACIST, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGameCornerPrizeRoomPharmacistScript, -1 diff --git a/maps/CeladonGameCornerPrizeRoom.blk b/maps/CeladonGameCornerPrizeRoom.blk new file mode 100644 index 0000000..3bda538 --- /dev/null +++ b/maps/CeladonGameCornerPrizeRoom.blk @@ -0,0 +1 @@ +  \ No newline at end of file diff --git a/maps/CeladonGym.asm b/maps/CeladonGym.asm new file mode 100644 index 0000000..c03441a --- /dev/null +++ b/maps/CeladonGym.asm @@ -0,0 +1,287 @@ + object_const_def + const CELADONGYM_ERIKA + const CELADONGYM_LASS1 + const CELADONGYM_LASS2 + const CELADONGYM_BEAUTY + const CELADONGYM_TWIN1 + const CELADONGYM_TWIN2 + +CeladonGym_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonGymErikaScript: + faceplayer + opentext + checkflag ENGINE_RAINBOWBADGE + iftrue .FightDone + writetext ErikaBeforeBattleText + waitbutton + closetext + winlosstext ErikaBeatenText, 0 + loadtrainer ERIKA, ERIKA1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_ERIKA + setevent EVENT_BEAT_LASS_MICHELLE + setevent EVENT_BEAT_PICNICKER_TANYA + setevent EVENT_BEAT_BEAUTY_JULIA + setevent EVENT_BEAT_TWINS_JO_AND_ZOE + opentext + writetext PlayerReceivedRainbowBadgeText + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_RAINBOWBADGE +.FightDone: + checkevent EVENT_GOT_TM19_GIGA_DRAIN + iftrue .GotGigaDrain + writetext ErikaExplainTMText + promptbutton + verbosegiveitem TM_GIGA_DRAIN + iffalse .GotGigaDrain + setevent EVENT_GOT_TM19_GIGA_DRAIN +.GotGigaDrain: + writetext ErikaAfterBattleText + waitbutton + closetext + end + +TrainerLassMichelle: + trainer LASS, MICHELLE, EVENT_BEAT_LASS_MICHELLE, LassMichelleSeenText, LassMichelleBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext LassMichelleAfterBattleText + waitbutton + closetext + end + +TrainerPicnickerTanya: + trainer PICNICKER, TANYA, EVENT_BEAT_PICNICKER_TANYA, PicnickerTanyaSeenText, PicnickerTanyaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PicnickerTanyaAfterBattleText + waitbutton + closetext + end + +TrainerBeautyJulia: + trainer BEAUTY, JULIA, EVENT_BEAT_BEAUTY_JULIA, BeautyJuliaSeenText, BeautyJuliaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BeautyJuliaAfterBattleText + waitbutton + closetext + end + +TrainerTwinsJoAndZoe1: + trainer TWINS, JOANDZOE1, EVENT_BEAT_TWINS_JO_AND_ZOE, TwinsJoAndZoe1SeenText, TwinsJoAndZoe1BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext TwinsJoAndZoe1AfterBattleText + waitbutton + closetext + end + +TrainerTwinsJoAndZoe2: + trainer TWINS, JOANDZOE2, EVENT_BEAT_TWINS_JO_AND_ZOE, TwinsJoAndZoe2SeenText, TwinsJoAndZoe2BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext TwinsJoAndZoe2AfterBattleText + waitbutton + closetext + end + +CeladonGymStatue: + checkflag ENGINE_RAINBOWBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, ERIKA, ERIKA1 + jumpstd GymStatue2Script + +ErikaBeforeBattleText: + text "ERIKA: Hello…" + line "Lovely weather," + + para "isn't it?" + line "It's so pleasant…" + + para "…I'm afraid I may" + line "doze off…" + + para "My name is ERIKA." + line "I am the LEADER of" + cont "CELADON GYM." + + para "…Oh? All the way" + line "from JOHTO, you" + cont "say? How nice…" + + para "Oh. I'm sorry, I" + line "didn't realize" + + para "that you wished to" + line "challenge me." + + para "Very well, but I" + line "shall not lose." + done + +ErikaBeatenText: + text "ERIKA: Oh!" + line "I concede defeat…" + + para "You are remarkably" + line "strong…" + + para "I shall give you" + line "RAINBOWBADGE…" + done + +PlayerReceivedRainbowBadgeText: + text " received" + line "RAINBOWBADGE." + done + +ErikaExplainTMText: + text "ERIKA: That was a" + line "delightful match." + + para "I felt inspired." + line "Please, I wish you" + cont "to have this TM." + + para "It is GIGA DRAIN." + + para "It is a wonderful" + line "move that drains" + + para "half the damage it" + line "inflicts to heal" + cont "your #MON." + + para "Please use it if" + line "it pleases you…" + done + +ErikaAfterBattleText: + text "ERIKA: Losing" + line "leaves a bitter" + cont "aftertaste…" + + para "But knowing that" + line "there are strong" + + para "trainers spurs me" + line "to do better…" + done + +LassMichelleSeenText: + text "Do you think a" + line "girls-only GYM" + cont "is rare?" + done + +LassMichelleBeatenText: + text "Oh, bleah!" + done + +LassMichelleAfterBattleText: + text "I just got care-" + line "less, that's all!" + done + +PicnickerTanyaSeenText: + text "Oh, a battle?" + line "That's kind of" + cont "scary, but OK!" + done + +PicnickerTanyaBeatenText: + text "Oh, that's it?" + done + +PicnickerTanyaAfterBattleText: + text "Oh, look at all" + line "your BADGES. No" + + para "wonder I couldn't" + line "win!" + done + +BeautyJuliaSeenText: + text "Were you looking" + line "at these flowers" + cont "or at me?" + done + +BeautyJuliaBeatenText: + text "How annoying!" + done + +BeautyJuliaAfterBattleText: + text "How do I go about" + line "becoming ladylike" + cont "like ERIKA?" + done + +TwinsJoAndZoe1SeenText: + text "We'll show you" + line "#MON moves that" + cont "ERIKA taught us!" + done + +TwinsJoAndZoe1BeatenText: + text "Oh… We lost…" + done + +TwinsJoAndZoe1AfterBattleText: + text "ERIKA will get you" + line "back for us!" + done + +TwinsJoAndZoe2SeenText: + text "We're going to" + line "protect ERIKA!" + done + +TwinsJoAndZoe2BeatenText: + text "We couldn't win…" + done + +TwinsJoAndZoe2AfterBattleText: + text "ERIKA is much," + line "much stronger!" + done + +CeladonGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 17, CELADON_CITY, 8 + warp_event 5, 17, CELADON_CITY, 8 + + def_coord_events + + def_bg_events + bg_event 3, 15, BGEVENT_READ, CeladonGymStatue + bg_event 6, 15, BGEVENT_READ, CeladonGymStatue + + def_object_events + object_event 5, 3, SPRITE_ERIKA, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonGymErikaScript, -1 + object_event 7, 8, SPRITE_LASS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerLassMichelle, -1 + object_event 2, 8, SPRITE_LASS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerPicnickerTanya, -1 + object_event 3, 5, SPRITE_BEAUTY, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerBeautyJulia, -1 + object_event 4, 10, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsJoAndZoe1, -1 + object_event 5, 10, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsJoAndZoe2, -1 diff --git a/maps/CeladonGym.blk b/maps/CeladonGym.blk new file mode 100644 index 0000000..8c273e8 --- /dev/null +++ b/maps/CeladonGym.blk @@ -0,0 +1 @@ + ###  ##!" \ No newline at end of file diff --git a/maps/CeladonMansion1F.asm b/maps/CeladonMansion1F.asm new file mode 100644 index 0000000..67ab337 --- /dev/null +++ b/maps/CeladonMansion1F.asm @@ -0,0 +1,96 @@ + object_const_def + const CELADONMANSION1F_GRANNY + const CELADONMANSION1F_GROWLITHE1 + const CELADONMANSION1F_CLEFAIRY + const CELADONMANSION1F_GROWLITHE2 + +CeladonMansion1F_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonMansionManager: + jumptextfaceplayer CeladonMansionManagerText + +CeladonMansion1FMeowth: + opentext + writetext CeladonMansion1FMeowthText + cry MEOWTH + waitbutton + closetext + end + +CeladonMansion1FClefairy: + opentext + writetext CeladonMansion1FClefairyText + cry CLEFAIRY + waitbutton + closetext + end + +CeladonMansion1FNidoranF: + opentext + writetext CeladonMansion1FNidoranFText + cry NIDORAN_F + waitbutton + closetext + end + +CeladonMansionManagersSuiteSign: + jumptext CeladonMansionManagersSuiteSignText + +CeladonMansion1FBookshelf: + jumpstd PictureBookshelfScript + +CeladonMansionManagerText: + text "My dear #MON" + line "keep me company," + + para "so I don't ever" + line "feel lonely." + + para "MEOWTH even brings" + line "money home." + done + +CeladonMansion1FMeowthText: + text "MEOWTH: Meow!" + done + +CeladonMansion1FClefairyText: + text "CLEFAIRY: Clef" + line "cleff!" + done + +CeladonMansion1FNidoranFText: + text "NIDORAN: Kya" + line "kyaoo!" + done + +CeladonMansionManagersSuiteSignText: + text "CELADON MANSION" + line "MANAGER'S SUITE" + done + +CeladonMansion1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 6, 9, CELADON_CITY, 2 + warp_event 7, 9, CELADON_CITY, 2 + warp_event 3, 0, CELADON_CITY, 3 + warp_event 0, 0, CELADON_MANSION_2F, 1 + warp_event 7, 0, CELADON_MANSION_2F, 4 + + def_coord_events + + def_bg_events + bg_event 5, 8, BGEVENT_UP, CeladonMansionManagersSuiteSign + bg_event 0, 3, BGEVENT_READ, CeladonMansion1FBookshelf + bg_event 2, 3, BGEVENT_READ, CeladonMansion1FBookshelf + + def_object_events + object_event 1, 5, SPRITE_GRANNY, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonMansionManager, -1 + object_event 2, 6, SPRITE_GROWLITHE, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonMansion1FMeowth, -1 + object_event 3, 4, SPRITE_CLEFAIRY, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonMansion1FClefairy, -1 + object_event 4, 4, SPRITE_GROWLITHE, SPRITEMOVEDATA_POKEMON, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonMansion1FNidoranF, -1 diff --git a/maps/CeladonMansion1F.blk b/maps/CeladonMansion1F.blk new file mode 100644 index 0000000..0dffa3b --- /dev/null +++ b/maps/CeladonMansion1F.blk @@ -0,0 +1,2 @@ +  +    \ No newline at end of file diff --git a/maps/CeladonMansion2F.asm b/maps/CeladonMansion2F.asm new file mode 100644 index 0000000..2e3e7c5 --- /dev/null +++ b/maps/CeladonMansion2F.asm @@ -0,0 +1,66 @@ +CeladonMansion2F_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonMansion2FComputer: + jumptext CeladonMansion2FComputerText + +CeladonMansion2FMeetingRoomSign: + jumptext CeladonMansion2FMeetingRoomSignText + +CeladonMansion2FBookshelf: + jumpstd DifficultBookshelfScript + +CeladonMansion2FComputerText: + text " turned on" + line "the PC." + + para "…" + + para "Someone was in the" + line "middle of compos-" + cont "ing an e-mail." + + para "…I hope you'll" + line "come visit KANTO." + + para "I think you'll be" + line "surprised at how" + + para "much things have" + line "changed here." + + para "You'll also see" + line "many #MON that" + + para "aren't native to" + line "JOHTO." + + para "To the PRODUCER" + + para "…" + done + +CeladonMansion2FMeetingRoomSignText: + text "GAME FREAK" + line "MEETING ROOM" + done + +CeladonMansion2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 0, CELADON_MANSION_1F, 4 + warp_event 1, 0, CELADON_MANSION_3F, 2 + warp_event 6, 0, CELADON_MANSION_3F, 3 + warp_event 7, 0, CELADON_MANSION_1F, 5 + + def_coord_events + + def_bg_events + bg_event 0, 3, BGEVENT_READ, CeladonMansion2FComputer + bg_event 5, 8, BGEVENT_UP, CeladonMansion2FMeetingRoomSign + bg_event 2, 3, BGEVENT_READ, CeladonMansion2FBookshelf + + def_object_events diff --git a/maps/CeladonMansion2F.blk b/maps/CeladonMansion2F.blk new file mode 100644 index 0000000..0784ef8 --- /dev/null +++ b/maps/CeladonMansion2F.blk @@ -0,0 +1,2 @@ +  +    \ No newline at end of file diff --git a/maps/CeladonMansion3F.asm b/maps/CeladonMansion3F.asm new file mode 100644 index 0000000..fb5e7b1 --- /dev/null +++ b/maps/CeladonMansion3F.asm @@ -0,0 +1,211 @@ + object_const_def + const CELADONMANSION3F_COOLTRAINER_M + const CELADONMANSION3F_GYM_GUIDE + const CELADONMANSION3F_SUPER_NERD + const CELADONMANSION3F_FISHER + +CeladonMansion3F_MapScripts: + def_scene_scripts + + def_callbacks + +GameFreakGameDesignerScript: + faceplayer + opentext + writetext GameFreakGameDesignerText + readvar VAR_DEXUNCAUGHT + ifless 3, .CompletedPokedex ; ignore Mew and Celebi + waitbutton + closetext + end + +.CompletedPokedex: + promptbutton + writetext GameFreakGameDesignerCompletedPokedexText + playsound SFX_DEX_FANFARE_230_PLUS + waitsfx + writetext GameFreakGameDesignerPauseForDiplomaText + promptbutton + special Diploma + writetext GameFreakGameDesignerAfterDiplomaText + waitbutton + closetext + setevent EVENT_ENABLE_DIPLOMA_PRINTING + end + +GameFreakGraphicArtistScript: + faceplayer + opentext + checkevent EVENT_ENABLE_DIPLOMA_PRINTING + iftrue .CanPrintDiploma + writetext GameFreakGraphicArtistText + waitbutton + closetext + end + +.CanPrintDiploma: + writetext GameFreakGraphicArtistPrintDiplomaText + yesorno + iffalse .Refused + special PrintDiploma + closetext + end + +.Refused: + writetext GameFreakGraphicArtistRefusedText + waitbutton + closetext + end + +.CancelPrinting: ; unreferenced + writetext GameFreakGraphicArtistErrorText + waitbutton + closetext + end + +GameFreakProgrammerScript: + jumptextfaceplayer GameFreakProgrammerText + +GameFreakCharacterDesignerScript: + jumptextfaceplayer GameFreakCharacterDesignerText + +CeladonMansion3FDevRoomSign: + jumptext CeladonMansion3FDevRoomSignText + +CeladonMansion3FDrawing: + jumptext CeladonMansion3FDrawingText + +CeladonMansion3FGameProgram: + jumptext CeladonMansion3FGameProgramText + +CeladonMansion3FReferenceMaterial: + jumptext CeladonMansion3FReferenceMaterialText + +GameFreakGameDesignerText: + text "Is that right?" + + para "I'm the GAME" + line "DESIGNER!" + + para "Filling up your" + line "#DEX is tough," + cont "but don't give up!" + done + +GameFreakGameDesignerCompletedPokedexText: + text "Wow! Excellent!" + line "You completed your" + cont "#DEX!" + + para "Congratulations!" + done + +GameFreakGameDesignerPauseForDiplomaText: + text "…" + done + +GameFreakGameDesignerAfterDiplomaText: + text "The GRAPHIC ARTIST" + line "will print out a" + cont "DIPLOMA for you." + + para "You should go show" + line "it off." + done + +GameFreakGraphicArtistText: + text "I'm the GRAPHIC" + line "ARTIST." + + para "I drew you!" + done + +GameFreakGraphicArtistPrintDiplomaText: + text "I'm the GRAPHIC" + line "ARTIST." + + para "Oh, you completed" + line "your #DEX?" + + para "Want me to print" + line "out your DIPLOMA?" + done + +GameFreakGraphicArtistRefusedText: + text "Give me a shout if" + line "you want your" + cont "DIPLOMA printed." + done + +GameFreakGraphicArtistErrorText: + text "Something's wrong." + line "I'll have to can-" + cont "cel printing." + done + +GameFreakProgrammerText: + text "Who, me? I'm the" + line "PROGRAMMER." + + para "Play the slot" + line "machines!" + done + +GameFreakCharacterDesignerText: + text "Aren't the TWINS" + line "adorable?" + + para "JASMINE's pretty" + line "too." + + para "Oh, I love them!" + done + +CeladonMansion3FDevRoomSignText: + text "GAME FREAK" + line "DEVELOPMENT ROOM" + done + +CeladonMansion3FDrawingText: + text "It's a detailed" + line "drawing of a" + cont "pretty girl." + done + +CeladonMansion3FGameProgramText: + text "It's the game" + line "program. Messing" + + para "with it could put" + line "a bug in the game!" + done + +CeladonMansion3FReferenceMaterialText: + text "It's crammed with" + line "reference materi-" + cont "als. There's even" + cont "a # DOLL." + done + +CeladonMansion3F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 0, CELADON_MANSION_ROOF, 1 + warp_event 1, 0, CELADON_MANSION_2F, 2 + warp_event 6, 0, CELADON_MANSION_2F, 3 + warp_event 7, 0, CELADON_MANSION_ROOF, 2 + + def_coord_events + + def_bg_events + bg_event 5, 8, BGEVENT_UP, CeladonMansion3FDevRoomSign + bg_event 4, 3, BGEVENT_UP, CeladonMansion3FDrawing + bg_event 1, 6, BGEVENT_UP, CeladonMansion3FGameProgram + bg_event 1, 3, BGEVENT_UP, CeladonMansion3FReferenceMaterial + + def_object_events + object_event 3, 6, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GameFreakGameDesignerScript, -1 + object_event 3, 4, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GameFreakGraphicArtistScript, -1 + object_event 0, 7, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GameFreakProgrammerScript, -1 + object_event 0, 4, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GameFreakCharacterDesignerScript, -1 diff --git a/maps/CeladonMansion3F.blk b/maps/CeladonMansion3F.blk new file mode 100644 index 0000000..bce6ec7 --- /dev/null +++ b/maps/CeladonMansion3F.blk @@ -0,0 +1 @@ +    \ No newline at end of file diff --git a/maps/CeladonMansionRoof.asm b/maps/CeladonMansionRoof.asm new file mode 100644 index 0000000..c0915d4 --- /dev/null +++ b/maps/CeladonMansionRoof.asm @@ -0,0 +1,48 @@ + object_const_def + const CELADONMANSIONROOF_FISHER + +CeladonMansionRoof_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonMansionRoofFisherScript: + jumptextfaceplayer CeladonMansionRoofFisherText + +CeladonMansionRoofGraffiti: + jumptext CeladonMansionRoofGraffitiText + +CeladonMansionRoofFisherText: + text "High places--I do" + line "love them so!" + + para "I'd say the only" + line "thing that loves" + + para "heights as much as" + line "me is smoke!" + done + +CeladonMansionRoofGraffitiText: + text "There's graffiti" + line "on the wall…" + + para " added a" + line "moustache!" + done + +CeladonMansionRoof_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 1, 1, CELADON_MANSION_3F, 1 + warp_event 6, 1, CELADON_MANSION_3F, 4 + warp_event 2, 5, CELADON_MANSION_ROOF_HOUSE, 1 + + def_coord_events + + def_bg_events + bg_event 6, 1, BGEVENT_LEFT, CeladonMansionRoofGraffiti + + def_object_events + object_event 7, 5, SPRITE_FISHER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonMansionRoofFisherScript, -1 diff --git a/maps/CeladonMansionRoof.blk b/maps/CeladonMansionRoof.blk new file mode 100644 index 0000000..dfe26fe --- /dev/null +++ b/maps/CeladonMansionRoof.blk @@ -0,0 +1 @@ +$%"#(),+&',+!+* \ No newline at end of file diff --git a/maps/CeladonMansionRoofHouse.asm b/maps/CeladonMansionRoofHouse.asm new file mode 100644 index 0000000..25c8372 --- /dev/null +++ b/maps/CeladonMansionRoofHouse.asm @@ -0,0 +1,129 @@ + object_const_def + const CELADONMANSIONROOFHOUSE_PHARMACIST + +CeladonMansionRoofHouse_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonMansionRoofHousePharmacistScript: + faceplayer + opentext + checkevent EVENT_GOT_TM03_CURSE + iftrue .GotCurse + writetext CeladonMansionRoofHousePharmacistIntroText + promptbutton + checktime NITE + iftrue .Night + writetext CeladonMansionRoofHousePharmacistNotNightText + waitbutton + closetext + end + +.Night: + writetext CeladonMansionRoofHousePharmacistStoryText + promptbutton + verbosegiveitem TM_CURSE + iffalse .NoRoom + setevent EVENT_GOT_TM03_CURSE +.GotCurse: + writetext CeladonMansionRoofHousePharmacistCurseText + waitbutton +.NoRoom: + closetext + end + +CeladonMansionRoofHousePharmacistIntroText: + text "Let me recount a" + line "terrifying tale…" + done + +CeladonMansionRoofHousePharmacistNotNightText: + text "Then again, it's" + line "not as scary while" + + para "it's still light" + line "outside." + + para "Come back after" + line "sunset, OK?" + done + +CeladonMansionRoofHousePharmacistStoryText: + text "Once upon a time," + line "there was a little" + + para "boy who was given" + line "a new BICYCLE…" + + para "He wanted to try" + line "it right away…" + + para "He was having so" + line "much fun that he" + + para "didn't notice the" + line "sun had set…" + + para "While riding home" + line "in the pitch-black" + + para "night, the bike" + line "suddenly slowed!" + + para "The pedals became" + line "heavy!" + + para "When he stopped" + line "pedaling, the bike" + + para "began slipping" + line "backwards!" + + para "It was as if the" + line "bike were cursed" + + para "and trying to drag" + line "him into oblivion!" + + para "…" + + para "…" + + para "SHRIEEEEK!" + + para "The boy had been" + line "riding uphill on" + cont "CYCLING ROAD!" + + para "…" + line "Ba-dum ba-dum!" + + para "For listening so" + line "patiently, you may" + cont "take this--TM03!" + done + +CeladonMansionRoofHousePharmacistCurseText: + text "TM03 is CURSE." + + para "It's a terrifying" + line "move that slowly" + + para "whittles down the" + line "victim's HP." + done + +CeladonMansionRoofHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CELADON_MANSION_ROOF, 3 + warp_event 3, 7, CELADON_MANSION_ROOF, 3 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 2, SPRITE_PHARMACIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonMansionRoofHousePharmacistScript, -1 diff --git a/maps/CeladonPokecenter1F.asm b/maps/CeladonPokecenter1F.asm new file mode 100644 index 0000000..ab14764 --- /dev/null +++ b/maps/CeladonPokecenter1F.asm @@ -0,0 +1,163 @@ + object_const_def + const CELADONPOKECENTER1F_NURSE + const CELADONPOKECENTER1F_GENTLEMAN + const CELADONPOKECENTER1F_PHARMACIST + const CELADONPOKECENTER1F_COOLTRAINER_F + const CELADONPOKECENTER1F_EUSINE + +CeladonPokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +CeladonPokecenter1FGentlemanScript: + jumpstd HappinessCheckScript + +CeladonPokecenter1FCooltrainerFScript: + jumptextfaceplayer CeladonPokecenter1FCooltrainerFText + +CeladonPokecenter1FPharmacistScript: + jumptextfaceplayer CeladonPokecenter1FPharmacistText + +CeladonEusine: + faceplayer + opentext + writetext CeladonEusineText1 + promptbutton + loadmonindex 1, SUICUNE + special MonCheck + iffalse .NoSuicune + special BeastsCheck + iftrue .HoOh + writetext NoBeastsText + waitbutton +.NoSuicune: + closetext + end + +.HoOh: + writetext EusineLeavesCeladonText + waitbutton + closetext + readvar VAR_FACING + ifequal UP, .Location1 + applymovement CELADONPOKECENTER1F_EUSINE, .Movement1 + sjump .Continue + +.Location1: + applymovement CELADONPOKECENTER1F_EUSINE, .Movement2 +.Continue: + disappear CELADONPOKECENTER1F_EUSINE + playsound SFX_EXIT_BUILDING + waitsfx + end + +.Movement2: + step LEFT + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +.Movement1: + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +CeladonPokecenter1FCooltrainerFText: + text "ERIKA is a master" + line "of grass #MON." + + para "She'll make you" + line "pay if you don't" + cont "watch yourself." + done + +CeladonPokecenter1FPharmacistText: + text "TEAM ROCKET's" + line "hideout is in the" + + para "basement of the" + line "GAME CORNER." + + para "Oh, wait. That was" + line "three years ago." + done + +CeladonEusineText1: + text "EUSINE: Hi!" + + para "I'm back visiting" + line "my hometown." + + para "It's been quite a" + line "while." + done + +EusineLeavesCeladonText: + text ", have you" + line "heard?" + + para "There have been" + line "fresh rumors of a" + + para "rainbow-colored" + line "#MON appearing" + cont "at TIN TOWER." + + para "I've just had my" + line "party healed, so" + + para "now I'm headed to" + line "ECRUTEAK." + + para "I'll be seeing" + line "you, !" + done + +NoBeastsText: + text "Oh, by the way," + line "." + + para "Have you caught" + line "the legendary" + + para "#MON RAIKOU and" + line "ENTEI?" + + para "<……><……><……>" + + para "Okay…" + + para "If you catch even" + line "one, I hope that" + cont "you'll inform me." + + para "I'm counting on" + line "you, !" + done + +CeladonPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, CELADON_CITY, 5 + warp_event 4, 7, CELADON_CITY, 5 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonPokecenter1FNurseScript, -1 + object_event 1, 5, SPRITE_GENTLEMAN, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeladonPokecenter1FGentlemanScript, -1 + object_event 0, 3, SPRITE_PHARMACIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeladonPokecenter1FPharmacistScript, -1 + object_event 8, 6, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeladonPokecenter1FCooltrainerFScript, -1 + object_event 4, 3, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeladonEusine, EVENT_SET_WHEN_FOUGHT_HO_OH diff --git a/maps/CeladonPokecenter2FBeta.asm b/maps/CeladonPokecenter2FBeta.asm new file mode 100644 index 0000000..ba4eab2 --- /dev/null +++ b/maps/CeladonPokecenter2FBeta.asm @@ -0,0 +1,16 @@ +CeladonPokecenter2FBeta_MapScripts: + def_scene_scripts + + def_callbacks + +CeladonPokecenter2FBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 7, CELADON_POKECENTER_1F, 3 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/CeruleanCity.asm b/maps/CeruleanCity.asm new file mode 100644 index 0000000..2482d7d --- /dev/null +++ b/maps/CeruleanCity.asm @@ -0,0 +1,306 @@ + object_const_def + const CERULEANCITY_COOLTRAINER_M + const CERULEANCITY_SUPER_NERD + const CERULEANCITY_SLOWPOKE + const CERULEANCITY_COOLTRAINER_F + const CERULEANCITY_FISHER + const CERULEANCITY_YOUNGSTER + +CeruleanCity_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, CeruleanCityFlypointCallback + +CeruleanCityFlypointCallback: + setflag ENGINE_FLYPOINT_CERULEAN + endcallback + +CeruleanCityCooltrainerMScript: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext CeruleanCityCooltrainerMText1 + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext CeruleanCityCooltrainerMText2 + waitbutton + closetext + end + +CeruleanCitySuperNerdScript: + jumptextfaceplayer CeruleanCitySuperNerdText + +CeruleanCitySlowbro: + opentext + writetext CeruleanCitySlowbroText + cry SLOWBRO + waitbutton + closetext + end + +CeruleanCityCooltrainerFScript: + faceplayer + opentext + writetext CeruleanCityCooltrainerFText1 + waitbutton + closetext + turnobject CERULEANCITY_COOLTRAINER_F, LEFT + opentext + writetext CeruleanCityCooltrainerFText2 + waitbutton + closetext + opentext + writetext CeruleanCitySlowbroText + cry SLOWBRO + waitbutton + closetext + opentext + writetext CeruleanCityCooltrainerFText3 + waitbutton + closetext + end + +CeruleanCityFisherScript: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + checkevent EVENT_MET_ROCKET_GRUNT_AT_CERULEAN_GYM + iftrue .MetCeruleanRocket +.ReturnedMachinePart: + writetext CeruleanCityFisherText + waitbutton + closetext + end + +.MetCeruleanRocket: + writetext CeruleanCityFisherRocketTipText + waitbutton + closetext + end + +CeruleanCityYoungsterScript: + faceplayer + opentext + writetext CeruleanCityYoungsterText1 + waitbutton + closetext + checkevent EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY + iffalse .BerserkGenePingsItemfinder + end + +.BerserkGenePingsItemfinder: + waitsfx + playsound SFX_SECOND_PART_OF_ITEMFINDER + waitsfx + playsound SFX_TRANSACTION + waitsfx + playsound SFX_SECOND_PART_OF_ITEMFINDER + waitsfx + playsound SFX_TRANSACTION + waitsfx + playsound SFX_SECOND_PART_OF_ITEMFINDER + waitsfx + playsound SFX_TRANSACTION + waitsfx + playsound SFX_SECOND_PART_OF_ITEMFINDER + waitsfx + playsound SFX_TRANSACTION + waitsfx + showemote EMOTE_SHOCK, CERULEANCITY_YOUNGSTER, 15 + turnobject CERULEANCITY_YOUNGSTER, LEFT + opentext + writetext CeruleanCityYoungsterText2 + waitbutton + closetext + end + +CeruleanCitySign: + jumptext CeruleanCitySignText + +CeruleanGymSign: + jumptext CeruleanGymSignText + +CeruleanBikeShopSign: + jumptext CeruleanBikeShopSignText + +CeruleanPoliceSign: + jumptext CeruleanPoliceSignText + +CeruleanCapeSign: + jumptext CeruleanCapeSignText + +CeruleanLockedDoor: + jumptext CeruleanLockedDoorText + +CeruleanCityPokecenterSign: + jumpstd PokecenterSignScript + +CeruleanCityMartSign: + jumpstd MartSignScript + +CeruleanCityHiddenBerserkGene: + hiddenitem BERSERK_GENE, EVENT_FOUND_BERSERK_GENE_IN_CERULEAN_CITY + +CeruleanCityCooltrainerMText1: + text "KANTO's POWER" + line "PLANT?" + + para "It's near the end" + line "of ROUTE 9, the" + + para "road that heads" + line "east from here." + + para "I think there was" + line "an accident of" + cont "some sort there." + done + +CeruleanCityCooltrainerMText2: + text "You're collecting" + line "every single kind" + cont "of #MON?" + + para "That must be quite" + line "a challenge, but" + cont "it sounds fun too." + done + +CeruleanCitySuperNerdText: + text "The CAPE in the" + line "north is a good" + + para "place for dates." + line "Girls like it!" + done + +CeruleanCitySlowbroText: + text "SLOWBRO: Yarah?" + done + +CeruleanCityCooltrainerFText1: + text "My SLOWBRO and I" + line "make an awesome" + cont "combination!" + done + +CeruleanCityCooltrainerFText2: + text "SLOWBRO, show me" + line "your CONFUSION!" + done + +CeruleanCityCooltrainerFText3: + text "…" + done + +CeruleanCityFisherText: + text "I'm a huge fan of" + line "CERULEAN GYM's" + cont "MISTY." + done + +CeruleanCityFisherRocketTipText: + text "I saw this shady" + line "guy go off toward" + cont "CERULEAN's CAPE." + done + +CeruleanCityYoungsterText1: + text "There used to be a" + line "cave here that had" + + para "horribly powerful" + line "#MON in it." + done + +CeruleanCityYoungsterText2: + text "Ayuh?" + + para "My ITEMFINDER is" + line "responding…" + done + +CeruleanCitySignText: + text "CERULEAN CITY" + + para "A Mysterious Blue" + line "Aura Surrounds It" + done + +CeruleanGymSignText: + text "CERULEAN CITY" + line "#MON GYM" + cont "LEADER: MISTY" + + para "The Tomboyish" + line "Mermaid" + done + +CeruleanBikeShopSignText: + text "There's a notice" + line "here…" + + para "The BIKE SHOP has" + line "moved to GOLDENROD" + cont "CITY in JOHTO…" + done + +CeruleanPoliceSignText: + text "There's a notice" + line "here…" + + para "Stamp out thievery" + line "and make the city" + + para "a friendlier, more" + line "cheerful place!" + + para "CERULEAN POLICE" + done + +CeruleanCapeSignText: + text "CERULEAN CAPE" + line "AHEAD" + done + +CeruleanLockedDoorText: + text "It's locked…" + done + +CeruleanCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 15, CERULEAN_GYM_BADGE_SPEECH_HOUSE, 1 + warp_event 28, 17, CERULEAN_POLICE_STATION, 1 + warp_event 13, 19, CERULEAN_TRADE_SPEECH_HOUSE, 1 + warp_event 19, 21, CERULEAN_POKECENTER_1F, 1 + warp_event 30, 23, CERULEAN_GYM, 1 + warp_event 25, 29, CERULEAN_MART, 2 + + def_coord_events + + def_bg_events + bg_event 23, 23, BGEVENT_READ, CeruleanCitySign + bg_event 27, 25, BGEVENT_READ, CeruleanGymSign + bg_event 11, 29, BGEVENT_READ, CeruleanBikeShopSign + bg_event 25, 17, BGEVENT_READ, CeruleanPoliceSign + bg_event 23, 7, BGEVENT_READ, CeruleanCapeSign + bg_event 14, 29, BGEVENT_READ, CeruleanLockedDoor + bg_event 20, 21, BGEVENT_READ, CeruleanCityPokecenterSign + bg_event 26, 29, BGEVENT_READ, CeruleanCityMartSign + bg_event 2, 12, BGEVENT_ITEM, CeruleanCityHiddenBerserkGene + + def_object_events + object_event 15, 23, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanCityCooltrainerMScript, -1 + object_event 23, 15, SPRITE_SUPER_NERD, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanCitySuperNerdScript, -1 + object_event 20, 24, SPRITE_SLOWPOKE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeruleanCitySlowbro, -1 + object_event 21, 24, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeruleanCityCooltrainerFScript, -1 + object_event 30, 26, SPRITE_FISHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeruleanCityFisherScript, -1 + object_event 6, 12, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeruleanCityYoungsterScript, -1 diff --git a/maps/CeruleanCity.blk b/maps/CeruleanCity.blk new file mode 100644 index 0000000..9995648 --- /dev/null +++ b/maps/CeruleanCity.blk @@ -0,0 +1,30 @@ +,,,,,,,)CPCCCCCC,+WWWWW%CN +CCCCCC,)CCCCCCC + + +m,)11m,)t +t + + +n1m0m+% +t +tttm%Ct +t + + +n +mCC 0  +1 0tCC +Ntkk\  !Ntwww + + + + +|r  +PRQQN/\aRttN +tttttt11_NtttN  !tt_NtttN +Vf0 |s0_NtttPaNtttNNtttQQQm]n + + + +N]MQQQ@t \ No newline at end of file diff --git a/maps/CeruleanGym.asm b/maps/CeruleanGym.asm new file mode 100644 index 0000000..f337eac --- /dev/null +++ b/maps/CeruleanGym.asm @@ -0,0 +1,383 @@ + object_const_def + const CERULEANGYM_ROCKET + const CERULEANGYM_MISTY + const CERULEANGYM_SWIMMER_GIRL1 + const CERULEANGYM_SWIMMER_GIRL2 + const CERULEANGYM_SWIMMER_GUY + const CERULEANGYM_GYM_GUIDE + +CeruleanGym_MapScripts: + def_scene_scripts + scene_script CeruleanGymNoopScene, SCENE_CERULEANGYM_NOOP + scene_script CeruleanGymGruntRunsOutScene, SCENE_CERULEANGYM_GRUNT_RUNS_OUT + + def_callbacks + +CeruleanGymNoopScene: + end + +CeruleanGymGruntRunsOutScene: + sdefer CeruleanGymGruntRunsOutScript + end + +CeruleanGymGruntRunsOutScript: + applymovement CERULEANGYM_ROCKET, CeruleanGymGruntRunsDownMovement + playsound SFX_TACKLE + applymovement CERULEANGYM_ROCKET, CeruleanGymGruntRunsIntoYouMovement + playmusic MUSIC_ROCKET_ENCOUNTER + opentext + writetext CeruleanGymGruntIntroText + waitbutton + closetext + showemote EMOTE_SHOCK, CERULEANGYM_ROCKET, 15 + applymovement CERULEANGYM_ROCKET, CeruleanGymGruntBacksAwayMovement + opentext + writetext CeruleanGymGruntBigMistakeText + waitbutton + closetext + applymovement CERULEANGYM_ROCKET, CeruleanGymGruntMovesCloseMovement + opentext + writetext CeruleanGymGruntByeText + waitbutton + closetext + applymovement CERULEANGYM_ROCKET, CeruleanGymGruntRunsOutMovement + playsound SFX_EXIT_BUILDING + disappear CERULEANGYM_ROCKET + setevent EVENT_MET_ROCKET_GRUNT_AT_CERULEAN_GYM + clearevent EVENT_ROUTE_24_ROCKET + clearevent EVENT_ROUTE_25_MISTY_BOYFRIEND + setscene SCENE_CERULEANGYM_NOOP + setmapscene ROUTE_25, SCENE_ROUTE25_MISTYS_DATE + setmapscene POWER_PLANT, SCENE_POWERPLANT_NOOP + waitsfx + special RestartMapMusic + pause 15 + turnobject PLAYER, DOWN + pause 15 + end + +CeruleanGymMistyScript: + faceplayer + opentext + checkflag ENGINE_CASCADEBADGE + iftrue .FightDone + writetext MistyIntroText + waitbutton + closetext + winlosstext MistyWinLossText, 0 + loadtrainer MISTY, MISTY1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_MISTY + setevent EVENT_BEAT_SWIMMERF_DIANA + setevent EVENT_BEAT_SWIMMERF_BRIANA + setevent EVENT_BEAT_SWIMMERM_PARKER + opentext + writetext ReceivedCascadeBadgeText + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_CASCADEBADGE +.FightDone: + writetext MistyFightDoneText + waitbutton + closetext + end + +TrainerSwimmerfDiana: + trainer SWIMMERF, DIANA, EVENT_BEAT_SWIMMERF_DIANA, SwimmerfDianaSeenText, SwimmerfDianaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfDianaAfterBattleText + waitbutton + closetext + end + +TrainerSwimmerfBriana: + trainer SWIMMERF, BRIANA, EVENT_BEAT_SWIMMERF_BRIANA, SwimmerfBrianaSeenText, SwimmerfBrianaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfBrianaAfterBattleText + waitbutton + closetext + end + +TrainerSwimmermParker: + trainer SWIMMERM, PARKER, EVENT_BEAT_SWIMMERM_PARKER, SwimmermParkerSeenText, SwimmermParkerBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermParkerAfterBattleText + waitbutton + closetext + end + +CeruleanGymGuideScript: + faceplayer + opentext + checkevent EVENT_BEAT_MISTY + iftrue .CeruleanGymGuideWinScript + writetext CeruleanGymGuideText + waitbutton + closetext + end + +.CeruleanGymGuideWinScript: + writetext CeruleanGymGuideWinText + waitbutton + closetext + end + +CeruleanGymHiddenMachinePart: + hiddenitem MACHINE_PART, EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM + +CeruleanGymStatue1: + checkevent EVENT_TRAINERS_IN_CERULEAN_GYM + iffalse CeruleanGymStatue + opentext + writetext CeruleanGymNote1Text + waitbutton + closetext + end + +CeruleanGymStatue2: + checkevent EVENT_TRAINERS_IN_CERULEAN_GYM + iffalse CeruleanGymStatue + opentext + writetext CeruleanGymNote2Text + waitbutton + closetext + end + +CeruleanGymStatue: + checkflag ENGINE_CASCADEBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, MISTY, MISTY1 + jumpstd GymStatue2Script + +CeruleanGymGruntRunsDownMovement: + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + step_end + +CeruleanGymGruntRunsOutMovement: + big_step RIGHT + big_step DOWN + step_end + +CeruleanGymGruntRunsIntoYouMovement: + fix_facing + set_sliding + jump_step UP + remove_sliding + remove_fixed_facing + step_sleep 8 + step_sleep 8 + step DOWN + step DOWN + step_end + +CeruleanGymGruntMovesCloseMovement: + big_step DOWN + step_end + +CeruleanGymGruntBacksAwayMovement: + fix_facing + slow_step UP + remove_fixed_facing + step_end + +CeruleanGymGruntIntroText: + text "Oops! I so sorry!" + line "You not hurt," + cont "okay?" + + para "I very busy." + line "No time for talk-" + cont "ing with you. Not" + cont "good for me if" + cont "seen by somebody." + done + +CeruleanGymGruntBigMistakeText: + text "Oh no! You seen" + line "me already! I make" + cont "big mistake!" + done + +CeruleanGymGruntByeText: + text "Hey, you! Forget" + line "you see me, okay?" + + para "You see, hear," + line "know nothing," + + para "okay?" + line "Bye, kid! Nothing!" + + para "Bye-bye a go-go!" + done + +CeruleanGymNote1Text: + text "Sorry, I'll be out" + line "for a while." + cont "MISTY, GYM LEADER" + done + +CeruleanGymNote2Text: + text "Since MISTY's out," + line "we'll be away too." + cont "GYM TRAINERS" + done + +MistyIntroText: + text "MISTY: I was ex-" + line "pecting you, you" + cont "pest!" + + para "You may have a" + line "lot of JOHTO GYM" + + para "BADGES, but you'd" + line "better not take me" + cont "too lightly." + + para "My water-type" + line "#MON are tough!" + done + +MistyWinLossText: + text "MISTY: You really" + line "are good…" + + para "I'll admit that" + line "you are skilled…" + + para "Here you go. It's" + line "CASCADEBADGE." + done + +ReceivedCascadeBadgeText: + text " received" + line "CASCADEBADGE." + done + +MistyFightDoneText: + text "MISTY: Are there" + line "many strong train-" + cont "ers in JOHTO? Like" + cont "you, I mean." + + para "I'm going to" + line "travel one day, so" + + para "I can battle some" + line "skilled trainers." + done + +SwimmerfDianaSeenText: + text "Sorry about being" + line "away. Let's get on" + cont "with it!" + done + +SwimmerfDianaBeatenText: + text "I give up! You're" + line "the winner!" + done + +SwimmerfDianaAfterBattleText: + text "I'll be swimming" + line "quietly." + done + +SwimmerfBrianaSeenText: + text "Don't let my ele-" + line "gant swimming un-" + cont "nerve you." + done + +SwimmerfBrianaBeatenText: + text "Ooh, you calmly" + line "disposed of me…" + done + +SwimmerfBrianaAfterBattleText: + text "Don't be too smug" + line "about beating me." + + para "MISTY will destroy" + line "you if you get" + cont "complacent." + done + +SwimmermParkerSeenText: + text "Glub…" + + para "I'm first! Come" + line "and get me!" + done + +SwimmermParkerBeatenText: + text "This can't be…" + done + +SwimmermParkerAfterBattleText: + text "MISTY has gotten" + line "much better in the" + cont "past few years." + + para "Don't let your" + line "guard down, or" + cont "you'll be crushed!" + done + +CeruleanGymGuideText: + text "Yo! CHAMP in" + line "making!" + + para "Since MISTY was" + line "away, I went out" + + para "for some fun too." + line "He-he-he." + done + +CeruleanGymGuideWinText: + text "Hoo, you showed me" + line "how tough you are." + + para "As always, that" + line "was one heck of a" + cont "great battle!" + done + +CeruleanGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 15, CERULEAN_CITY, 5 + warp_event 5, 15, CERULEAN_CITY, 5 + + def_coord_events + + def_bg_events + bg_event 3, 8, BGEVENT_ITEM, CeruleanGymHiddenMachinePart + bg_event 2, 13, BGEVENT_READ, CeruleanGymStatue1 + bg_event 6, 13, BGEVENT_READ, CeruleanGymStatue2 + + def_object_events + object_event 4, 10, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_CERULEAN_GYM_ROCKET + object_event 5, 3, SPRITE_MISTY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeruleanGymMistyScript, EVENT_TRAINERS_IN_CERULEAN_GYM + object_event 4, 6, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfDiana, EVENT_TRAINERS_IN_CERULEAN_GYM + object_event 1, 9, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerSwimmerfBriana, EVENT_TRAINERS_IN_CERULEAN_GYM + object_event 8, 9, SPRITE_SWIMMER_GUY, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermParker, EVENT_TRAINERS_IN_CERULEAN_GYM + object_event 7, 13, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanGymGuideScript, EVENT_TRAINERS_IN_CERULEAN_GYM diff --git a/maps/CeruleanGym.blk b/maps/CeruleanGym.blk new file mode 100644 index 0000000..a01ee19 --- /dev/null +++ b/maps/CeruleanGym.blk @@ -0,0 +1,2 @@ ++++++76968.'')/. -/.4/.'& +/.2&2/11311 \ No newline at end of file diff --git a/maps/CeruleanGymBadgeSpeechHouse.asm b/maps/CeruleanGymBadgeSpeechHouse.asm new file mode 100644 index 0000000..f11063dd --- /dev/null +++ b/maps/CeruleanGymBadgeSpeechHouse.asm @@ -0,0 +1,29 @@ + object_const_def + const CERULEANGYMBADGESPEECHHOUSE_POKEFAN_M + +CeruleanGymBadgeSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +CeruleanGymBadgeSpeechHousePokefanMScript: + jumptextfaceplayer CeruleanGymBadgeSpeechHousePokefanMText + +CeruleanGymBadgeSpeechHousePokefanMText: + text "Are you collecting" + line "KANTO GYM BADGES?" + done + +CeruleanGymBadgeSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CERULEAN_CITY, 1 + warp_event 3, 7, CERULEAN_CITY, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeruleanGymBadgeSpeechHousePokefanMScript, -1 diff --git a/maps/CeruleanMart.asm b/maps/CeruleanMart.asm new file mode 100644 index 0000000..62dfe9f --- /dev/null +++ b/maps/CeruleanMart.asm @@ -0,0 +1,60 @@ + object_const_def + const CERULEANMART_CLERK + const CERULEANMART_COOLTRAINER_M + const CERULEANMART_COOLTRAINER_F + +CeruleanMart_MapScripts: + def_scene_scripts + + def_callbacks + +CeruleanMart_Clerk: + opentext + pokemart MARTTYPE_STANDARD, MART_CERULEAN + closetext + end + +CeruleanMart_CooltrainerM: + jumptextfaceplayer CeruleanMart_CooltrainerMText + +CeruleanMart_CooltrainerF: + jumptextfaceplayer CeruleanMart_CooltrainerFText + +CeruleanMart_CooltrainerMText: + text "You'll run into" + line "many trainers on" + + para "the way to CERU-" + line "LEAN's CAPE." + + para "They want to see" + line "how they stack" + + para "up against other" + line "trainers." + done + +CeruleanMart_CooltrainerFText: + text "MISTY is about the" + line "only person in" + + para "town who can beat" + line "the trainers at" + cont "CERULEAN's CAPE." + done + +CeruleanMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CERULEAN_CITY, 6 + warp_event 3, 7, CERULEAN_CITY, 6 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeruleanMart_Clerk, -1 + object_event 1, 6, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeruleanMart_CooltrainerM, -1 + object_event 7, 2, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CeruleanMart_CooltrainerF, -1 diff --git a/maps/CeruleanPokecenter1F.asm b/maps/CeruleanPokecenter1F.asm new file mode 100644 index 0000000..885cdc6 --- /dev/null +++ b/maps/CeruleanPokecenter1F.asm @@ -0,0 +1,78 @@ + object_const_def + const CERULEANPOKECENTER1F_NURSE + const CERULEANPOKECENTER1F_SUPER_NERD + const CERULEANPOKECENTER1F_GYM_GUIDE + +CeruleanPokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +CeruleanPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +CeruleanPokecenter1FSuperNerdScript: + special Mobile_DummyReturnFalse + iftrue .mobile + jumptextfaceplayer CeruleanPokecenter1FSuperNerdText + +.mobile + jumptextfaceplayer CeruleanPokecenter1FSuperNerdText_Mobile + +CeruleanPokecenter1FGymGuideScript: + jumptextfaceplayer CeruleanPokecenter1FGymGuideText + +CeruleanPokecenter1FSuperNerdText: + text "For battles, I'd" + line "much rather use" + + para "#MON I've been" + line "raising, even if" + + para "they're weaker" + line "than some newly" + cont "caught #MON." + done + +CeruleanPokecenter1FSuperNerdText_Mobile: + text "Do you battle by" + line "mobile phone?" + + para "If time runs out" + line "during a battle," + + para "waiting to see who" + line "won is really" + cont "nerve wracking." + done + +CeruleanPokecenter1FGymGuideText: + text "The MAGNET TRAIN" + line "travels at over" + + para "340 mph. It goes" + line "between KANTO and" + + para "JOHTO in almost no" + line "time at all." + + para "It really makes" + line "JOHTO accessible." + done + +CeruleanPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, CERULEAN_CITY, 4 + warp_event 4, 7, CERULEAN_CITY, 4 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeruleanPokecenter1FNurseScript, -1 + object_event 8, 4, SPRITE_SUPER_NERD, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeruleanPokecenter1FSuperNerdScript, -1 + object_event 1, 5, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeruleanPokecenter1FGymGuideScript, -1 diff --git a/maps/CeruleanPokecenter2FBeta.asm b/maps/CeruleanPokecenter2FBeta.asm new file mode 100644 index 0000000..dd40d7c --- /dev/null +++ b/maps/CeruleanPokecenter2FBeta.asm @@ -0,0 +1,16 @@ +CeruleanPokecenter2FBeta_MapScripts: + def_scene_scripts + + def_callbacks + +CeruleanPokecenter2FBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 7, CERULEAN_POKECENTER_1F, 1 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/CeruleanPoliceStation.asm b/maps/CeruleanPoliceStation.asm new file mode 100644 index 0000000..6cb5c19 --- /dev/null +++ b/maps/CeruleanPoliceStation.asm @@ -0,0 +1,58 @@ + object_const_def + const CERULEANPOLICESTATION_FISHING_GURU + const CERULEANPOLICESTATION_POKEFAN_F + const CERULEANPOLICESTATION_DIGLETT + +CeruleanPoliceStation_MapScripts: + def_scene_scripts + + def_callbacks + +CeruleanPoliceStationFishingGuruScript: + jumptextfaceplayer CeruleanPoliceStationFishingGuruText + +CeruleanPoliceStationPokefanFScript: + jumptextfaceplayer CeruleanPoliceStationPokefanFText + +CeruleanDiglett: + opentext + writetext CeruleanDiglettText + cry DIGLETT + waitbutton + closetext + end + +CeruleanPoliceStationFishingGuruText: + text "I heard that some" + line "shady character is" + cont "skulking about." + + para "I won't stand for" + line "it if he turns out" + cont "to be a thief." + done + +CeruleanPoliceStationPokefanFText: + text "We were held up by" + line "robbers before." + done + +CeruleanDiglettText: + text "DIGLETT: Dug dug." + done + +CeruleanPoliceStation_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CERULEAN_CITY, 2 + warp_event 3, 7, CERULEAN_CITY, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 1, SPRITE_FISHING_GURU, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeruleanPoliceStationFishingGuruScript, -1 + object_event 5, 4, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanPoliceStationPokefanFScript, -1 + object_event 3, 5, SPRITE_DIGLETT, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CeruleanDiglett, -1 diff --git a/maps/CeruleanTradeSpeechHouse.asm b/maps/CeruleanTradeSpeechHouse.asm new file mode 100644 index 0000000..3bf6cf9 --- /dev/null +++ b/maps/CeruleanTradeSpeechHouse.asm @@ -0,0 +1,69 @@ + object_const_def + const CERULEANTRADESPEECHHOUSE_GRANNY + const CERULEANTRADESPEECHHOUSE_GRAMPS + const CERULEANTRADESPEECHHOUSE_RHYDON + const CERULEANTRADESPEECHHOUSE_ZUBAT + +CeruleanTradeSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +CeruleanTradeSpeechHouseGrannyScript: + jumptextfaceplayer CeruleanTradeSpeechHouseGrannyText + +CeruleanTradeSpeechHouseGrampsScript: + jumptextfaceplayer CeruleanTradeSpeechHouseGrampsText + +CeruleanTradeSpeechHouseRhydonScript: + opentext + writetext CeruleanTradeSpeechHouseRhydonText + cry KANGASKHAN + waitbutton + closetext + end + +CeruleanTradeSpeechHouseZubatScript: + opentext + writetext CeruleanTradeSpeechHouseZubatText + cry ZUBAT + waitbutton + closetext + end + +CeruleanTradeSpeechHouseGrannyText: + text "My husband lives" + line "happily with #-" + cont "MON he got through" + cont "trades." + done + +CeruleanTradeSpeechHouseGrampsText: + text "Ah… I'm so happy…" + done + +CeruleanTradeSpeechHouseRhydonText: + text "KANGASKHAN: Garu" + line "garuu." + done + +CeruleanTradeSpeechHouseZubatText: + text "ZUBAT: Zuba zubaa." + done + +CeruleanTradeSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CERULEAN_CITY, 3 + warp_event 3, 7, CERULEAN_CITY, 3 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 4, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CeruleanTradeSpeechHouseGrannyScript, -1 + object_event 1, 2, SPRITE_GRAMPS, SPRITEMOVEDATA_WANDER, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CeruleanTradeSpeechHouseGrampsScript, -1 + object_event 5, 2, SPRITE_RHYDON, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CeruleanTradeSpeechHouseRhydonScript, -1 + object_event 5, 6, SPRITE_ZUBAT, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CeruleanTradeSpeechHouseZubatScript, -1 diff --git a/maps/CharcoalKiln.asm b/maps/CharcoalKiln.asm new file mode 100644 index 0000000..9b6d171 --- /dev/null +++ b/maps/CharcoalKiln.asm @@ -0,0 +1,166 @@ + object_const_def + const CHARCOALKILN_BLACK_BELT + const CHARCOALKILN_YOUNGSTER + const CHARCOALKILN_MOLTRES + +CharcoalKiln_MapScripts: + def_scene_scripts + + def_callbacks + +CharcoalKilnBoss: + faceplayer + opentext + checkevent EVENT_GOT_HM01_CUT + iftrue .GotCut + checkevent EVENT_CLEARED_SLOWPOKE_WELL + iftrue .SavedSlowpoke + writetext CharcoalKilnBossText1 + waitbutton + closetext + end + +.SavedSlowpoke: + writetext CharcoalKilnBossText2 + waitbutton + closetext + end + +.GotCut: + writetext CharcoalKilnBossText3 + waitbutton + closetext + end + +CharcoalKilnApprentice: + faceplayer + opentext + checkevent EVENT_GOT_CHARCOAL_IN_CHARCOAL_KILN + iftrue .YoureTheCoolest + checkevent EVENT_GOT_HM01_CUT + iftrue .Thanks + writetext CharcoalKilnApprenticeText1 + waitbutton + closetext + end + +.Thanks: + writetext CharcoalKilnApprenticeText2 + promptbutton + verbosegiveitem CHARCOAL + iffalse .Done + setevent EVENT_GOT_CHARCOAL_IN_CHARCOAL_KILN + closetext + end + +.YoureTheCoolest: + writetext CharcoalKilnApprenticeText3 + waitbutton +.Done: + closetext + end + +CharcoalKilnFarfetchd: + faceplayer + opentext + writetext FarfetchdText + cry FARFETCH_D + waitbutton + closetext + end + +CharcoalKilnBookshelf: + jumpstd MagazineBookshelfScript + +CharcoalKilnRadio: + jumpstd Radio2Script + +CharcoalKilnBossText1: + text "All the SLOWPOKE" + line "have disappeared" + cont "from the town." + + para "The forest's pro-" + line "tector may be" + cont "angry with us…" + + para "It may be a bad" + line "omen. We should" + cont "stay in." + done + +CharcoalKilnBossText2: + text "The SLOWPOKE have" + line "returned…" + + para "But my APPRENTICE" + line "hasn't come back" + cont "from ILEX FOREST." + + para "Where in the world" + line "is that lazy guy?" + done + +CharcoalKilnBossText3: + text "You chased off" + line "TEAM ROCKET and" + + para "went to ILEX" + line "FOREST alone?" + + para "That takes guts!" + line "I like that. Come" + cont "train with us." + done + +CharcoalKilnApprenticeText1: + text "Where have all the" + line "SLOWPOKE gone?" + + para "Are they out play-" + line "ing somewhere?" + done + +CharcoalKilnApprenticeText2: + text "I'm sorry--I for-" + line "got to thank you." + + para "This is CHARCOAL" + line "that I made." + + para "Fire-type #MON" + line "would be happy to" + cont "hold that." + done + +CharcoalKilnApprenticeText3: + text "The SLOWPOKE came" + line "back, and you even" + cont "found FARFETCH'D." + + para "You're the cool-" + line "est, man!" + done + +FarfetchdText: + text "FARFETCH'D: Kwaa!" + done + +CharcoalKiln_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, AZALEA_TOWN, 2 + warp_event 3, 7, AZALEA_TOWN, 2 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, CharcoalKilnBookshelf + bg_event 1, 1, BGEVENT_READ, CharcoalKilnBookshelf + bg_event 7, 1, BGEVENT_READ, CharcoalKilnRadio + + def_object_events + object_event 2, 3, SPRITE_BLACK_BELT, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CharcoalKilnBoss, EVENT_CHARCOAL_KILN_BOSS + object_event 5, 3, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CharcoalKilnApprentice, EVENT_CHARCOAL_KILN_APPRENTICE + object_event 5, 6, SPRITE_MOLTRES, SPRITEMOVEDATA_POKEMON, 2, 2, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CharcoalKilnFarfetchd, EVENT_CHARCOAL_KILN_FARFETCH_D diff --git a/maps/CherrygroveCity.asm b/maps/CherrygroveCity.asm new file mode 100644 index 0000000..8e722b0 --- /dev/null +++ b/maps/CherrygroveCity.asm @@ -0,0 +1,572 @@ + object_const_def + const CHERRYGROVECITY_GRAMPS + const CHERRYGROVECITY_RIVAL + const CHERRYGROVECITY_TEACHER + const CHERRYGROVECITY_YOUNGSTER + const CHERRYGROVECITY_FISHER + +CherrygroveCity_MapScripts: + def_scene_scripts + scene_script CherrygroveCityNoop1Scene, SCENE_CHERRYGROVECITY_NOOP + scene_script CherrygroveCityNoop2Scene, SCENE_CHERRYGROVECITY_MEET_RIVAL + + def_callbacks + callback MAPCALLBACK_NEWMAP, CherrygroveCityFlypointCallback + +CherrygroveCityNoop1Scene: + end + +CherrygroveCityNoop2Scene: + end + +CherrygroveCityFlypointCallback: + setflag ENGINE_FLYPOINT_CHERRYGROVE + endcallback + +CherrygroveCityGuideGent: + faceplayer + opentext + writetext GuideGentIntroText + yesorno + iffalse .No + sjump .Yes +.Yes: + writetext GuideGentTourText1 + waitbutton + closetext + playmusic MUSIC_SHOW_ME_AROUND + follow CHERRYGROVECITY_GRAMPS, PLAYER + applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement1 + opentext + writetext GuideGentPokecenterText + waitbutton + closetext + applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement2 + turnobject PLAYER, UP + opentext + writetext GuideGentMartText + waitbutton + closetext + applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement3 + turnobject PLAYER, UP + opentext + writetext GuideGentRoute30Text + waitbutton + closetext + applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement4 + turnobject PLAYER, LEFT + opentext + writetext GuideGentSeaText + waitbutton + closetext + applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement5 + turnobject PLAYER, UP + pause 60 + turnobject CHERRYGROVECITY_GRAMPS, LEFT + turnobject PLAYER, RIGHT + opentext + writetext GuideGentGiftText + promptbutton + getstring STRING_BUFFER_4, .mapcardname + scall .JumpstdReceiveItem + setflag ENGINE_MAP_CARD + writetext GotMapCardText + promptbutton + writetext GuideGentPokegearText + waitbutton + closetext + stopfollow + special RestartMapMusic + turnobject PLAYER, UP + applymovement CHERRYGROVECITY_GRAMPS, GuideGentMovement6 + playsound SFX_ENTER_DOOR + disappear CHERRYGROVECITY_GRAMPS + clearevent EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE + waitsfx + end + +.JumpstdReceiveItem: + jumpstd ReceiveItemScript + end + +.mapcardname + db "MAP CARD@" + +.No: + writetext GuideGentNoText + waitbutton + closetext + end + +CherrygroveRivalSceneSouth: + moveobject CHERRYGROVECITY_RIVAL, 39, 7 +CherrygroveRivalSceneNorth: + turnobject PLAYER, RIGHT + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + pause 15 + appear CHERRYGROVECITY_RIVAL + applymovement CHERRYGROVECITY_RIVAL, CherrygroveCity_RivalWalksToYou + turnobject PLAYER, RIGHT + playmusic MUSIC_RIVAL_ENCOUNTER + opentext + writetext CherrygroveRivalText_Seen + waitbutton + closetext + checkevent EVENT_GOT_TOTODILE_FROM_ELM + iftrue .Totodile + checkevent EVENT_GOT_CHIKORITA_FROM_ELM + iftrue .Chikorita + winlosstext RivalCherrygroveWinText, RivalCherrygroveLossText + setlasttalked CHERRYGROVECITY_RIVAL + loadtrainer RIVAL1, RIVAL1_1_TOTODILE + loadvar VAR_BATTLETYPE, BATTLETYPE_CANLOSE + startbattle + dontrestartmapmusic + reloadmap + iftrue .AfterVictorious + sjump .AfterYourDefeat + +.Totodile: + winlosstext RivalCherrygroveWinText, RivalCherrygroveLossText + setlasttalked CHERRYGROVECITY_RIVAL + loadtrainer RIVAL1, RIVAL1_1_CHIKORITA + loadvar VAR_BATTLETYPE, BATTLETYPE_CANLOSE + startbattle + dontrestartmapmusic + reloadmap + iftrue .AfterVictorious + sjump .AfterYourDefeat + +.Chikorita: + winlosstext RivalCherrygroveWinText, RivalCherrygroveLossText + setlasttalked CHERRYGROVECITY_RIVAL + loadtrainer RIVAL1, RIVAL1_1_CYNDAQUIL + loadvar VAR_BATTLETYPE, BATTLETYPE_CANLOSE + startbattle + dontrestartmapmusic + reloadmap + iftrue .AfterVictorious + sjump .AfterYourDefeat + +.AfterVictorious: + playmusic MUSIC_RIVAL_AFTER + opentext + writetext CherrygroveRivalText_YouWon + waitbutton + closetext + sjump .FinishRival + +.AfterYourDefeat: + playmusic MUSIC_RIVAL_AFTER + opentext + writetext CherrygroveRivalText_YouLost + waitbutton + closetext +.FinishRival: + playsound SFX_TACKLE + applymovement PLAYER, CherrygroveCity_RivalPushesYouOutOfTheWay + turnobject PLAYER, LEFT + applymovement CHERRYGROVECITY_RIVAL, CherrygroveCity_RivalExitsStageLeft + disappear CHERRYGROVECITY_RIVAL + setscene SCENE_CHERRYGROVECITY_NOOP + special HealParty + playmapmusic + end + +CherrygroveTeacherScript: + faceplayer + opentext + checkflag ENGINE_MAP_CARD + iftrue .HaveMapCard + writetext CherrygroveTeacherText_NoMapCard + waitbutton + closetext + end + +.HaveMapCard: + writetext CherrygroveTeacherText_HaveMapCard + waitbutton + closetext + end + +CherrygroveYoungsterScript: + faceplayer + opentext + checkflag ENGINE_POKEDEX + iftrue .HavePokedex + writetext CherrygroveYoungsterText_NoPokedex + waitbutton + closetext + end + +.HavePokedex: + writetext CherrygroveYoungsterText_HavePokedex + waitbutton + closetext + end + +MysticWaterGuy: + faceplayer + opentext + checkevent EVENT_GOT_MYSTIC_WATER_IN_CHERRYGROVE + iftrue .After + writetext MysticWaterGuyTextBefore + promptbutton + verbosegiveitem MYSTIC_WATER + iffalse .Exit + setevent EVENT_GOT_MYSTIC_WATER_IN_CHERRYGROVE +.After: + writetext MysticWaterGuyTextAfter + waitbutton +.Exit: + closetext + end + +CherrygroveCitySign: + jumptext CherrygroveCitySignText + +GuideGentsHouseSign: + jumptext GuideGentsHouseSignText + +CherrygroveCityPokecenterSign: + jumpstd PokecenterSignScript + +CherrygroveCityMartSign: + jumpstd MartSignScript + +GuideGentMovement1: + step LEFT + step LEFT + step UP + step LEFT + turn_head UP + step_end + +GuideGentMovement2: + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + turn_head UP + step_end + +GuideGentMovement3: + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + turn_head UP + step_end + +GuideGentMovement4: + step LEFT + step LEFT + step LEFT + step DOWN + step LEFT + step LEFT + step LEFT + step DOWN + turn_head LEFT + step_end + +GuideGentMovement5: + step DOWN + step DOWN + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step DOWN + step DOWN + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + turn_head UP + step_end + +GuideGentMovement6: + step UP + step UP + step_end + +CherrygroveCity_RivalWalksToYou: + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step_end + +CherrygroveCity_RivalPushesYouOutOfTheWay: + big_step DOWN + turn_head UP + step_end + +CherrygroveCity_UnusedMovementData: ; unreferenced + step LEFT + turn_head DOWN + step_end + +CherrygroveCity_RivalExitsStageLeft: + big_step LEFT + big_step LEFT + big_step LEFT + big_step LEFT + big_step UP + big_step UP + big_step LEFT + big_step LEFT + step_end + +GuideGentIntroText: + text "You're a rookie" + line "trainer, aren't" + cont "you? I can tell!" + + para "That's OK! Every-" + line "one is a rookie" + cont "at some point!" + + para "If you'd like, I" + line "can teach you a" + cont "few things." + done + +GuideGentTourText1: + text "OK, then!" + line "Follow me!" + done + +GuideGentPokecenterText: + text "This is a #MON" + line "CENTER. They heal" + + para "your #MON in no" + line "time at all." + + para "You'll be relying" + line "on them a lot, so" + + para "you better learn" + line "about them." + done + +GuideGentMartText: + text "This is a #MON" + line "MART." + + para "They sell BALLS" + line "for catching wild" + + para "#MON and other" + line "useful items." + done + +GuideGentRoute30Text: + text "ROUTE 30 is out" + line "this way." + + para "Trainers will be" + line "battling their" + + para "prized #MON" + line "there." + done + +GuideGentSeaText: + text "This is the sea," + line "as you can see." + + para "Some #MON are" + line "found only in" + cont "water." + done + +GuideGentGiftText: + text "Here…" + + para "It's my house!" + line "Thanks for your" + cont "company." + + para "Let me give you a" + line "small gift." + done + +GotMapCardText: + text "'s #GEAR" + line "now has a MAP!" + done + +GuideGentPokegearText: + text "#GEAR becomes" + line "more useful as you" + cont "add CARDS." + + para "I wish you luck on" + line "your journey!" + done + +GuideGentNoText: + text "Oh… It's something" + line "I enjoy doing…" + + para "Fine. Come see me" + line "when you like." + done + +CherrygroveRivalText_Seen: + text "<……> <……> <……>" + + para "You got a #MON" + line "at the LAB." + + para "What a waste." + line "A wimp like you." + + para "<……> <……> <……>" + + para "Don't you get what" + line "I'm saying?" + + para "Well, I too, have" + line "a good #MON." + + para "I'll show you" + line "what I mean!" + done + +RivalCherrygroveWinText: + text "Humph. Are you" + line "happy you won?" + done + +CherrygroveRivalText_YouLost: + text "<……> <……> <……>" + + para "My name's ???." + + para "I'm going to be" + line "the world's great-" + cont "est #MON" + cont "trainer." + done + +RivalCherrygroveLossText: + text "Humph. That was a" + line "waste of time." + done + +CherrygroveRivalText_YouWon: + text "<……> <……> <……>" + + para "My name's ???." + + para "I'm going to be" + line "the world's great-" + cont "est #MON" + cont "trainer." + done + +CherrygroveTeacherText_NoMapCard: + text "Did you talk to" + line "the old man by the" + cont "#MON CENTER?" + + para "He'll put a MAP of" + line "JOHTO on your" + cont "#GEAR." + done + +CherrygroveTeacherText_HaveMapCard: + text "When you're with" + line "#MON, going" + cont "anywhere is fun." + done + +CherrygroveYoungsterText_NoPokedex: + text "MR.#MON's house" + line "is still farther" + cont "up ahead." + done + +CherrygroveYoungsterText_HavePokedex: + text "I battled the" + line "trainers on the" + cont "road." + + para "My #MON lost." + line "They're a mess! I" + + para "must take them to" + line "a #MON CENTER." + done + +MysticWaterGuyTextBefore: + text "A #MON I caught" + line "had an item." + + para "I think it's" + line "MYSTIC WATER." + + para "I don't need it," + line "so do you want it?" + done + +MysticWaterGuyTextAfter: + text "Back to fishing" + line "for me, then." + done + +CherrygroveCitySignText: + text "CHERRYGROVE CITY" + + para "The City of Cute," + line "Fragrant Flowers" + done + +GuideGentsHouseSignText: + text "GUIDE GENT'S HOUSE" + done + +CherrygroveCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 23, 3, CHERRYGROVE_MART, 2 + warp_event 29, 3, CHERRYGROVE_POKECENTER_1F, 1 + warp_event 17, 7, CHERRYGROVE_GYM_SPEECH_HOUSE, 1 + warp_event 25, 9, GUIDE_GENTS_HOUSE, 1 + warp_event 31, 11, CHERRYGROVE_EVOLUTION_SPEECH_HOUSE, 1 + + def_coord_events + coord_event 33, 6, SCENE_CHERRYGROVECITY_MEET_RIVAL, CherrygroveRivalSceneNorth + coord_event 33, 7, SCENE_CHERRYGROVECITY_MEET_RIVAL, CherrygroveRivalSceneSouth + + def_bg_events + bg_event 30, 8, BGEVENT_READ, CherrygroveCitySign + bg_event 23, 9, BGEVENT_READ, GuideGentsHouseSign + bg_event 24, 3, BGEVENT_READ, CherrygroveCityMartSign + bg_event 30, 3, BGEVENT_READ, CherrygroveCityPokecenterSign + + def_object_events + object_event 32, 6, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CherrygroveCityGuideGent, EVENT_GUIDE_GENT_IN_HIS_HOUSE + object_event 39, 6, SPRITE_RIVAL, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_CHERRYGROVE_CITY + object_event 27, 12, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CherrygroveTeacherScript, -1 + object_event 23, 7, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CherrygroveYoungsterScript, -1 + object_event 7, 12, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, MysticWaterGuy, -1 diff --git a/maps/CherrygroveCity.blk b/maps/CherrygroveCity.blk new file mode 100644 index 0000000..83585b5 --- /dev/null +++ b/maps/CherrygroveCity.blk @@ -0,0 +1,8 @@ +XYdv +vv + +56555 +1555GE4Y +X5554YqqX555 +4zvvy50 +Y29029945Y \ No newline at end of file diff --git a/maps/CherrygroveEvolutionSpeechHouse.asm b/maps/CherrygroveEvolutionSpeechHouse.asm new file mode 100644 index 0000000..772bd72 --- /dev/null +++ b/maps/CherrygroveEvolutionSpeechHouse.asm @@ -0,0 +1,57 @@ + object_const_def + const CHERRYGROVEEVOLUTIONSPEECHHOUSE_LASS + const CHERRYGROVEEVOLUTIONSPEECHHOUSE_YOUNGSTER + +CherrygroveEvolutionSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +CherrygroveEvolutionSpeechHouseYoungsterScript: + opentext + writetext CherrygroveEvolutionSpeechHouseYoungsterText + waitbutton + closetext + end + +CherrygroveEvolutionSpeechHouseLassScript: + opentext + writetext CherrygroveEvolutionSpeechHouseLassText + waitbutton + closetext + end + +CherrygroveEvolutionSpeechHouseBookshelf: + jumpstd MagazineBookshelfScript + +CherrygroveEvolutionSpeechHouseYoungsterText: + text "#MON gain expe-" + line "rience in battle" + + para "and change their" + line "form." + done + +CherrygroveEvolutionSpeechHouseLassText: + text "#MON change?" + + para "I would be shocked" + line "if one did that!" + done + +CherrygroveEvolutionSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CHERRYGROVE_CITY, 5 + warp_event 3, 7, CHERRYGROVE_CITY, 5 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, CherrygroveEvolutionSpeechHouseBookshelf + bg_event 1, 1, BGEVENT_READ, CherrygroveEvolutionSpeechHouseBookshelf + + def_object_events + object_event 3, 5, SPRITE_LASS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CherrygroveEvolutionSpeechHouseLassScript, -1 + object_event 2, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CherrygroveEvolutionSpeechHouseYoungsterScript, -1 diff --git a/maps/CherrygroveGymSpeechHouse.asm b/maps/CherrygroveGymSpeechHouse.asm new file mode 100644 index 0000000..a6e5169 --- /dev/null +++ b/maps/CherrygroveGymSpeechHouse.asm @@ -0,0 +1,60 @@ + object_const_def + const CHERRYGROVEGYMSPEECHHOUSE_POKEFAN_M + const CHERRYGROVEGYMSPEECHHOUSE_BUG_CATCHER + +CherrygroveGymSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +CherrygroveGymSpeechHousePokefanMScript: + jumptextfaceplayer CherrygroveGymSpeechHousePokefanMText + +CherrygroveGymSpeechHouseBugCatcherScript: + jumptextfaceplayer CherrygroveGymSpeechHouseBugCatcherText + +CherrygroveGymSpeechHouseBookshelf: + jumpstd PictureBookshelfScript + +CherrygroveGymSpeechHousePokefanMText: + text "You're trying to" + line "see how good you" + + para "are as a #MON" + line "trainer?" + + para "You better visit" + line "the #MON GYMS" + + para "all over JOHTO and" + line "collect BADGES." + done + +CherrygroveGymSpeechHouseBugCatcherText: + text "When I get older," + line "I'm going to be a" + cont "GYM LEADER!" + + para "I make my #MON" + line "battle with my" + + para "friend's to make" + line "them tougher!" + done + +CherrygroveGymSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CHERRYGROVE_CITY, 3 + warp_event 3, 7, CHERRYGROVE_CITY, 3 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, CherrygroveGymSpeechHouseBookshelf + bg_event 1, 1, BGEVENT_READ, CherrygroveGymSpeechHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CherrygroveGymSpeechHousePokefanMScript, -1 + object_event 5, 5, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CherrygroveGymSpeechHouseBugCatcherScript, -1 diff --git a/maps/CherrygroveMart.asm b/maps/CherrygroveMart.asm new file mode 100644 index 0000000..3f0d3b1 --- /dev/null +++ b/maps/CherrygroveMart.asm @@ -0,0 +1,86 @@ + object_const_def + const CHERRYGROVEMART_CLERK + const CHERRYGROVEMART_COOLTRAINER_M + const CHERRYGROVEMART_YOUNGSTER + +CherrygroveMart_MapScripts: + def_scene_scripts + + def_callbacks + +CherrygroveMartClerkScript: + opentext + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iftrue .PokeBallsInStock + pokemart MARTTYPE_STANDARD, MART_CHERRYGROVE + closetext + end + +.PokeBallsInStock: + pokemart MARTTYPE_STANDARD, MART_CHERRYGROVE_DEX + closetext + end + +CherrygroveMartCooltrainerMScript: + faceplayer + opentext + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iftrue .PokeBallsInStock + writetext CherrygroveMartCooltrainerMText + waitbutton + closetext + end + +.PokeBallsInStock: + writetext CherrygroveMartCooltrainerMText_PokeBallsInStock + waitbutton + closetext + end + +CherrygroveMartYoungsterScript: + jumptextfaceplayer CherrygroveMartYoungsterText + +CherrygroveMartCooltrainerMText: + text "They're fresh out" + line "of # BALLS!" + + para "When will they get" + line "more of them?" + done + +CherrygroveMartCooltrainerMText_PokeBallsInStock: + text "# BALLS are in" + line "stock! Now I can" + cont "catch #MON!" + done + +CherrygroveMartYoungsterText: + text "When I was walking" + line "in the grass, a" + + para "bug #MON poi-" + line "soned my #MON!" + + para "I just kept going," + line "but then my" + cont "#MON fainted." + + para "You should keep an" + line "ANTIDOTE with you." + done + +CherrygroveMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CHERRYGROVE_CITY, 1 + warp_event 3, 7, CHERRYGROVE_CITY, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CherrygroveMartClerkScript, -1 + object_event 7, 6, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CherrygroveMartCooltrainerMScript, -1 + object_event 2, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CherrygroveMartYoungsterScript, -1 diff --git a/maps/CherrygrovePokecenter1F.asm b/maps/CherrygrovePokecenter1F.asm new file mode 100644 index 0000000..92f93b9 --- /dev/null +++ b/maps/CherrygrovePokecenter1F.asm @@ -0,0 +1,85 @@ + object_const_def + const CHERRYGROVEPOKECENTER1F_NURSE + const CHERRYGROVEPOKECENTER1F_FISHER + const CHERRYGROVEPOKECENTER1F_GENTLEMAN + const CHERRYGROVEPOKECENTER1F_TEACHER + +CherrygrovePokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +CherrygrovePokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +CherrygrovePokecenter1FFisherScript: + jumptextfaceplayer CherrygrovePokecenter1FFisherText + +CherrygrovePokecenter1FGentlemanScript: + jumptextfaceplayer CherrygrovePokecenter1FGentlemanText + +CherrygrovePokecenter1FTeacherScript: + faceplayer + opentext + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iftrue .CommCenterOpen + writetext CherrygrovePokecenter1FTeacherText + waitbutton + closetext + end + +.CommCenterOpen: + writetext CherrygrovePokecenter1FTeacherText_CommCenterOpen + waitbutton + closetext + end + +CherrygrovePokecenter1FFisherText: + text "It's great. I can" + line "store any number" + + para "of #MON, and" + line "it's all free." + done + +CherrygrovePokecenter1FGentlemanText: + text "That PC is free" + line "for any trainer" + cont "to use." + done + +CherrygrovePokecenter1FTeacherText: + text "The COMMUNICATION" + line "CENTER upstairs" + cont "was just built." + + para "But they're still" + line "finishing it up." + done + +CherrygrovePokecenter1FTeacherText_CommCenterOpen: + text "The COMMUNICATION" + line "CENTER upstairs" + cont "was just built." + + para "I traded #MON" + line "there already!" + done + +CherrygrovePokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, CHERRYGROVE_CITY, 2 + warp_event 4, 7, CHERRYGROVE_CITY, 2 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CherrygrovePokecenter1FNurseScript, -1 + object_event 2, 3, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CherrygrovePokecenter1FFisherScript, -1 + object_event 8, 6, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CherrygrovePokecenter1FGentlemanScript, -1 + object_event 1, 6, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CherrygrovePokecenter1FTeacherScript, -1 diff --git a/maps/CianwoodCity.asm b/maps/CianwoodCity.asm new file mode 100644 index 0000000..1463fe2 --- /dev/null +++ b/maps/CianwoodCity.asm @@ -0,0 +1,417 @@ + object_const_def + const CIANWOODCITY_STANDING_YOUNGSTER + const CIANWOODCITY_POKEFAN_M + const CIANWOODCITY_LASS + const CIANWOODCITY_ROCK1 + const CIANWOODCITY_ROCK2 + const CIANWOODCITY_ROCK3 + const CIANWOODCITY_ROCK4 + const CIANWOODCITY_ROCK5 + const CIANWOODCITY_ROCK6 + const CIANWOODCITY_POKEFAN_F + const CIANWOODCITY_EUSINE + const CIANWOODCITY_SUICUNE + +CianwoodCity_MapScripts: + def_scene_scripts + scene_script CianwoodCityNoop1Scene, SCENE_CIANWOODCITY_NOOP + scene_script CianwoodCityNoop2Scene, SCENE_CIANWOODCITY_SUICUNE_AND_EUSINE + + def_callbacks + callback MAPCALLBACK_NEWMAP, CianwoodCityFlypointAndSuicuneCallback + +CianwoodCityNoop1Scene: + end + +CianwoodCityNoop2Scene: + end + +CianwoodCityFlypointAndSuicuneCallback: + setflag ENGINE_FLYPOINT_CIANWOOD + setevent EVENT_EUSINE_IN_BURNED_TOWER + checkevent EVENT_FOUGHT_EUSINE + iffalse .Done + disappear CIANWOODCITY_EUSINE +.Done: + endcallback + +CianwoodCitySuicuneAndEusine: + turnobject PLAYER, UP + showemote EMOTE_SHOCK, PLAYER, 15 + pause 15 + playsound SFX_WARP_FROM + applymovement CIANWOODCITY_SUICUNE, CianwoodCitySuicuneApproachMovement + turnobject PLAYER, DOWN + pause 15 + playsound SFX_WARP_FROM + applymovement CIANWOODCITY_SUICUNE, CianwoodCitySuicuneDepartMovement + disappear CIANWOODCITY_SUICUNE + pause 10 + setscene SCENE_CIANWOODCITY_NOOP + clearevent EVENT_SAW_SUICUNE_ON_ROUTE_42 + setmapscene ROUTE_42, SCENE_ROUTE42_SUICUNE + checkevent EVENT_FOUGHT_EUSINE + iftrue .Done + setevent EVENT_FOUGHT_EUSINE + playmusic MUSIC_MYSTICALMAN_ENCOUNTER + appear CIANWOODCITY_EUSINE + applymovement CIANWOODCITY_EUSINE, CianwoodCityEusineApproachMovement + opentext + writetext EusineSuicuneText + waitbutton + closetext + winlosstext EusineBeatenText, 0 + setlasttalked CIANWOODCITY_EUSINE + loadtrainer MYSTICALMAN, EUSINE + startbattle + dontrestartmapmusic + reloadmapafterbattle + playmusic MUSIC_MYSTICALMAN_ENCOUNTER + opentext + writetext EusineAfterText + waitbutton + closetext + applymovement CIANWOODCITY_EUSINE, CianwoodCityEusineDepartMovement + disappear CIANWOODCITY_EUSINE + pause 20 + special FadeOutMusic + playmapmusic + pause 10 +.Done: + end + +CianwoodCityChucksWife: + faceplayer + opentext + checkevent EVENT_GOT_HM02_FLY + iftrue .GotFly + writetext ChucksWifeEasierToFlyText + promptbutton + checkevent EVENT_BEAT_CHUCK + iftrue .BeatChuck + writetext ChucksWifeBeatChuckText + waitbutton + closetext + end + +.BeatChuck: + writetext ChucksWifeGiveHMText + promptbutton + verbosegiveitem HM_FLY + iffalse .Done + setevent EVENT_GOT_HM02_FLY + writetext ChucksWifeFlySpeechText + promptbutton +.GotFly: + writetext ChucksWifeChubbyText + waitbutton +.Done: + closetext + end + +CianwoodCityYoungster: + jumptextfaceplayer CianwoodCityYoungsterText + +CianwoodCityPokefanM: + jumptextfaceplayer CianwoodCityPokefanMText + +CianwoodCityLass: + jumptextfaceplayer CianwoodCityLassText + +CianwoodCityUnusedScript: ; unreferenced + jumptextfaceplayer CianwoodCityUnusedText + +CianwoodCitySign: + jumptext CianwoodCitySignText + +CianwoodGymSign: + jumptext CianwoodGymSignText + +CianwoodPharmacySign: + jumptext CianwoodPharmacySignText + +CianwoodPhotoStudioSign: + jumptext CianwoodPhotoStudioSignText + +CianwoodPokeSeerSign: + jumptext CianwoodPokeSeerSignText + +CianwoodPokecenterSign: + jumpstd PokecenterSignScript + +CianwoodCityRock: + jumpstd SmashRockScript + +CianwoodCityHiddenRevive: + hiddenitem REVIVE, EVENT_CIANWOOD_CITY_HIDDEN_REVIVE + +CianwoodCityHiddenMaxEther: + hiddenitem MAX_ETHER, EVENT_CIANWOOD_CITY_HIDDEN_MAX_ETHER + +CianwoodCitySuicuneApproachMovement: + set_sliding + fast_jump_step DOWN + fast_jump_step DOWN + fast_jump_step RIGHT + remove_sliding + step_end + +CianwoodCitySuicuneDepartMovement: + set_sliding + fast_jump_step RIGHT + fast_jump_step UP + fast_jump_step RIGHT + fast_jump_step RIGHT + remove_sliding + step_end + +CianwoodCityEusineApproachMovement: + step UP + step UP + step UP + step UP + step_end + +CianwoodCityEusineDepartMovement: + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +ChucksWifeEasierToFlyText: + text "You crossed the" + line "sea to get here?" + + para "That must have" + line "been hard." + + para "It would be much" + line "easier if your" + + para "#MON knew how" + line "to FLY…" + done + +ChucksWifeBeatChuckText: + text "But you can't use" + line "FLY without this" + cont "city's GYM BADGE." + + para "If you beat the" + line "GYM LEADER here," + cont "come see me." + + para "I'll have a nice" + line "gift for you." + done + +ChucksWifeGiveHMText: + text "That's CIANWOOD's" + line "GYM BADGE!" + + para "Then you should" + line "take this HM." + done + +ChucksWifeFlySpeechText: + text "Teach FLY to your" + line "#MON." + + para "You will be able" + line "to FLY instantly" + + para "to anywhere you " + line "have visited." + done + +ChucksWifeChubbyText: + text "My husband lost to" + line "you, so he needs" + cont "to train harder." + + para "That's good, since" + line "he was getting a" + cont "little chubby." + done + +CianwoodCityYoungsterText: + text "If you use FLY," + line "you can get back" + + para "to OLIVINE in-" + line "stantly." + done + +CianwoodCityPokefanMText: + text "Boulders to the" + line "north of town can" + cont "be crushed." + + para "They may be hiding" + line "something." + + para "Your #MON could" + line "use ROCK SMASH to" + cont "break them." + done + +CianwoodCityLassText: + text "CHUCK, the GYM" + line "LEADER, spars with" + + para "his fighting #-" + line "MON." + done + +CianwoodCityUnusedText: + text "There are several" + line "islands between" + cont "here and OLIVINE." + + para "A mythical sea" + line "creature supposed-" + cont "ly lives there." + done + +EusineSuicuneText: + text "EUSINE: Yo," + line "." + + para "Wasn't that" + line "SUICUNE just now?" + + para "I only caught a" + line "quick glimpse, but" + + para "I thought I saw" + line "SUICUNE running on" + cont "the waves." + + para "SUICUNE is beau-" + line "tiful and grand." + + para "And it races" + line "through towns and" + + para "roads at simply" + line "awesome speeds." + + para "It's wonderful…" + + para "I want to see" + line "SUICUNE up close…" + + para "I've decided." + + para "I'll battle you as" + line "a trainer to earn" + cont "SUICUNE's respect!" + + para "Come on, ." + line "Let's battle now!" + done + +EusineBeatenText: + text "I hate to admit" + line "it, but you win." + done + +EusineAfterText: + text "You're amazing," + line "!" + + para "No wonder #MON" + line "gravitate to you." + + para "I get it now." + + para "I'm going to keep" + line "searching for" + cont "SUICUNE." + + para "I'm sure we'll see" + line "each other again." + + para "See you around!" + done + +CianwoodCitySignText: + text "CIANWOOD CITY" + + para "A Port Surrounded" + line "by Rough Seas" + done + +CianwoodGymSignText: + text "CIANWOOD CITY" + line "#MON GYM" + + para "LEADER: CHUCK" + + para "His Roaring Fists" + line "Do the Talking" + done + +CianwoodPharmacySignText: + text "500 Years of" + line "Tradition" + + para "CIANWOOD CITY" + line "PHARMACY" + + para "We Await Your" + line "Medicinal Queries" + done + +CianwoodPhotoStudioSignText: + text "CIANWOOD CITY" + line "PHOTO STUDIO" + + para "Take a Snapshot as" + line "a Keepsake!" + done + +CianwoodPokeSeerSignText: + text "THE # SEER" + line "AHEAD" + done + +CianwoodCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 17, 41, MANIAS_HOUSE, 1 + warp_event 8, 43, CIANWOOD_GYM, 1 + warp_event 23, 43, CIANWOOD_POKECENTER_1F, 1 + warp_event 15, 47, CIANWOOD_PHARMACY, 1 + warp_event 9, 31, CIANWOOD_PHOTO_STUDIO, 1 + warp_event 15, 37, CIANWOOD_LUGIA_SPEECH_HOUSE, 1 + warp_event 5, 17, POKE_SEERS_HOUSE, 1 + + def_coord_events + coord_event 11, 16, SCENE_CIANWOODCITY_SUICUNE_AND_EUSINE, CianwoodCitySuicuneAndEusine + + def_bg_events + bg_event 20, 34, BGEVENT_READ, CianwoodCitySign + bg_event 7, 45, BGEVENT_READ, CianwoodGymSign + bg_event 24, 43, BGEVENT_READ, CianwoodPokecenterSign + bg_event 19, 47, BGEVENT_READ, CianwoodPharmacySign + bg_event 8, 32, BGEVENT_READ, CianwoodPhotoStudioSign + bg_event 8, 24, BGEVENT_READ, CianwoodPokeSeerSign + bg_event 4, 19, BGEVENT_ITEM, CianwoodCityHiddenRevive + bg_event 5, 29, BGEVENT_ITEM, CianwoodCityHiddenMaxEther + + def_object_events + object_event 21, 37, SPRITE_STANDING_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CianwoodCityYoungster, -1 + object_event 17, 33, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityPokefanM, -1 + object_event 14, 42, SPRITE_LASS, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityLass, -1 + object_event 8, 16, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityRock, -1 + object_event 9, 17, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityRock, -1 + object_event 4, 25, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityRock, -1 + object_event 5, 29, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityRock, -1 + object_event 10, 27, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityRock, -1 + object_event 4, 19, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityRock, -1 + object_event 10, 46, SPRITE_POKEFAN_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodCityChucksWife, -1 + object_event 11, 21, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_CIANWOOD_CITY_EUSINE + object_event 10, 14, SPRITE_SUICUNE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY diff --git a/maps/CianwoodCity.blk b/maps/CianwoodCity.blk new file mode 100644 index 0000000..69b9ab7 --- /dev/null +++ b/maps/CianwoodCity.blk @@ -0,0 +1 @@ +qqqqqqqi5555501qqqqqqqi5555545qqqqqqqi5555545qqqqqqqi5555545qqqqqqqi5559945qqqqqqqqk554555qqqqornqi554555qorrmZlrm994555qi55655555qi55655555qqk555055555qom5555455555qiE5559455555qi554555555qi4555555qqk55555qqiE555qqqpkE55qqqqi55qqorm5qqi5qqi5qqix5qqqkxjpppkqqqqpkhqqqiqqqqqqppppqqqqiqqqqqqqqqqqorrm \ No newline at end of file diff --git a/maps/CianwoodGym.asm b/maps/CianwoodGym.asm new file mode 100644 index 0000000..55cc84c --- /dev/null +++ b/maps/CianwoodGym.asm @@ -0,0 +1,328 @@ + object_const_def + const CIANWOODGYM_CHUCK + const CIANWOODGYM_BLACK_BELT1 + const CIANWOODGYM_BLACK_BELT2 + const CIANWOODGYM_BLACK_BELT3 + const CIANWOODGYM_BLACK_BELT4 + const CIANWOODGYM_BOULDER1 + const CIANWOODGYM_BOULDER2 + const CIANWOODGYM_BOULDER3 + const CIANWOODGYM_BOULDER4 + +CianwoodGym_MapScripts: + def_scene_scripts + + def_callbacks + +CianwoodGymChuckScript: + faceplayer + opentext + checkevent EVENT_BEAT_CHUCK + iftrue .FightDone + writetext ChuckIntroText1 + waitbutton + closetext + turnobject CIANWOODGYM_CHUCK, RIGHT + opentext + writetext ChuckIntroText2 + waitbutton + closetext + applymovement CIANWOODGYM_BOULDER1, CianwoodGymMovement_ChuckChucksBoulder + playsound SFX_STRENGTH + earthquake 80 + disappear CIANWOODGYM_BOULDER1 + pause 30 + faceplayer + opentext + writetext ChuckIntroText3 + waitbutton + closetext + winlosstext ChuckLossText, 0 + loadtrainer CHUCK, CHUCK1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_CHUCK + opentext + writetext GetStormBadgeText + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_STORMBADGE + readvar VAR_BADGES + scall CianwoodGymActivateRockets +.FightDone: + checkevent EVENT_GOT_TM01_DYNAMICPUNCH + iftrue .AlreadyGotTM + setevent EVENT_BEAT_BLACKBELT_YOSHI + setevent EVENT_BEAT_BLACKBELT_LAO + setevent EVENT_BEAT_BLACKBELT_NOB + setevent EVENT_BEAT_BLACKBELT_LUNG + writetext ChuckExplainBadgeText + promptbutton + verbosegiveitem TM_DYNAMICPUNCH + iffalse .BagFull + setevent EVENT_GOT_TM01_DYNAMICPUNCH + writetext ChuckExplainTMText + waitbutton + closetext + end + +.AlreadyGotTM: + writetext ChuckAfterText + waitbutton +.BagFull: + closetext + end + +CianwoodGymActivateRockets: + ifequal 7, .RadioTowerRockets + ifequal 6, .GoldenrodRockets + end + +.GoldenrodRockets: + jumpstd GoldenrodRocketsScript + +.RadioTowerRockets: + jumpstd RadioTowerRocketsScript + +TrainerBlackbeltYoshi: + trainer BLACKBELT_T, YOSHI, EVENT_BEAT_BLACKBELT_YOSHI, BlackbeltYoshiSeenText, BlackbeltYoshiBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BlackbeltYoshiAfterText + waitbutton + closetext + end + +TrainerBlackbeltLao: + trainer BLACKBELT_T, LAO, EVENT_BEAT_BLACKBELT_LAO, BlackbeltLaoSeenText, BlackbeltLaoBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BlackbeltLaoAfterText + waitbutton + closetext + end + +TrainerBlackbeltNob: + trainer BLACKBELT_T, NOB, EVENT_BEAT_BLACKBELT_NOB, BlackbeltNobSeenText, BlackbeltNobBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BlackbeltNobAfterText + waitbutton + closetext + end + +TrainerBlackbeltLung: + trainer BLACKBELT_T, LUNG, EVENT_BEAT_BLACKBELT_LUNG, BlackbeltLungSeenText, BlackbeltLungBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BlackbeltLungAfterText + waitbutton + closetext + end + +CianwoodGymBoulder: + jumpstd StrengthBoulderScript + +CianwoodGymStatue: + checkflag ENGINE_STORMBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, CHUCK, CHUCK1 + jumpstd GymStatue2Script + +CianwoodGymMovement_ChuckChucksBoulder: + set_sliding + big_step LEFT + big_step UP + fast_jump_step RIGHT + remove_sliding + step_end + +ChuckIntroText1: + text "WAHAHAH!" + + para "So you've come" + line "this far!" + + para "Let me tell you," + line "I'm tough!" + + para "My #MON will" + line "crush stones and" + cont "shatter bones!" + + para "Watch this!" + done + +ChuckIntroText2: + text "CHUCK: Urggh!" + line "…" + + para "Oooarrgh!" + done + +ChuckIntroText3: + text "There! Scared now," + line "are you?" + + para "What?" + line "It has nothing to" + + para "do with #MON?" + line "That's true!" + + para "Come on. We shall" + line "do battle!" + done + +ChuckLossText: + text "Wha? Huh?" + line "I lost?" + + para "How about that!" + line "You're worthy of" + cont "STORMBADGE!" + done + +GetStormBadgeText: + text " received" + line "STORMBADGE." + done + +ChuckExplainBadgeText: + text "STORMBADGE makes" + line "all #MON up to" + + para "L70 obey, even" + line "traded ones." + + para "It also lets your" + line "#MON use FLY" + + para "when you're not in" + line "a battle." + + para "Here, take this" + line "too!" + done + +ChuckExplainTMText: + text "That is DYNAMIC-" + line "PUNCH." + + para "It doesn't always" + line "hit, but when it" + + para "does, it causes" + line "confusion!" + done + +ChuckAfterText: + text "WAHAHAH! I enjoyed" + line "battling you!" + + para "But a loss is a" + line "loss!" + + para "From now on, I'm" + line "going to train 24" + cont "hours a day!" + done + +BlackbeltYoshiSeenText: + text "My #MON and I" + line "are bound togeth-" + cont "er by friendship." + + para "Our bond will" + line "never be broken!" + done + +BlackbeltYoshiBeatenText: + text "This isn't real!" + done + +BlackbeltYoshiAfterText: + text "You seem to have a" + line "strong bond with" + cont "your #MON too!" + done + +BlackbeltLaoSeenText: + text "We martial artists" + line "fear nothing!" + done + +BlackbeltLaoBeatenText: + text "That's shocking!" + done + +BlackbeltLaoAfterText: + text "Fighting #MON" + line "are afraid of psy-" + cont "chics…" + done + +BlackbeltNobSeenText: + text "Words are useless." + line "Let your fists do" + cont "the talking!" + done + +BlackbeltNobBeatenText: + text "…" + done + +BlackbeltNobAfterText: + text "I lost! " + line "I'm speechless!" + done + +BlackbeltLungSeenText: + text "My raging fists" + line "will shatter your" + cont "#MON!" + done + +BlackbeltLungBeatenText: + text "I got shattered!" + done + +BlackbeltLungAfterText: + text "My #MON lost…" + line "My… my pride is" + cont "shattered…" + done + +CianwoodGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 17, CIANWOOD_CITY, 2 + warp_event 5, 17, CIANWOOD_CITY, 2 + + def_coord_events + + def_bg_events + bg_event 3, 15, BGEVENT_READ, CianwoodGymStatue + bg_event 6, 15, BGEVENT_READ, CianwoodGymStatue + + def_object_events + object_event 4, 1, SPRITE_CHUCK, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CianwoodGymChuckScript, -1 + object_event 2, 12, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBlackbeltYoshi, -1 + object_event 7, 12, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBlackbeltLao, -1 + object_event 3, 9, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerBlackbeltNob, -1 + object_event 5, 5, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerBlackbeltLung, -1 + object_event 5, 1, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodGymBoulder, -1 + object_event 3, 7, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodGymBoulder, -1 + object_event 4, 7, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodGymBoulder, -1 + object_event 5, 7, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodGymBoulder, -1 diff --git a/maps/CianwoodGym.blk b/maps/CianwoodGym.blk new file mode 100644 index 0000000..b613024 --- /dev/null +++ b/maps/CianwoodGym.blk @@ -0,0 +1,4 @@ +"! + 5 5 +     + &  \ No newline at end of file diff --git a/maps/CianwoodLugiaSpeechHouse.asm b/maps/CianwoodLugiaSpeechHouse.asm new file mode 100644 index 0000000..f15e063 --- /dev/null +++ b/maps/CianwoodLugiaSpeechHouse.asm @@ -0,0 +1,78 @@ + object_const_def + const CIANWOODLUGIASPEECHHOUSE_TEACHER + const CIANWOODLUGIASPEECHHOUSE_LASS + const CIANWOODLUGIASPEECHHOUSE_TWIN + +CianwoodLugiaSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +CianwoodLugiaSpeechHouseTeacherScript: + jumptextfaceplayer CianwoodLugiaSpeechHouseTeacherText + +CianwoodLugiaSpeechHouseLassScript: + jumptextfaceplayer CianwoodLugiaSpeechHouseLassText + +CianwoodLugiaSpeechHouseTwinScript: + jumptextfaceplayer CianwoodLugiaSpeechHouseTwinText + +CianwoodLugiaSpeechHouseBookshelf: + jumpstd PictureBookshelfScript + +CianwoodLugiaSpeechHouseTeacherText: + text "You came from" + line "OLIVINE?" + + para "Do you remember" + line "the four islands" + cont "along the way?" + + para "I heard that a " + line "mythical sea crea-" + cont "ture is hiding in" + cont "them." + done + +CianwoodLugiaSpeechHouseLassText: + text "I heard that you" + line "can only see it if" + + para "you have a SILVER" + line "WING." + + para "It must have the" + line "same scent as the" + cont "creature." + done + +CianwoodLugiaSpeechHouseTwinText: + text "I've heard that" + line "the whirlpools" + + para "around the islands" + line "are caused by the" + cont "sea creature." + + para "You might need a" + line "special move to" + cont "get past them." + done + +CianwoodLugiaSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CIANWOOD_CITY, 6 + warp_event 3, 7, CIANWOOD_CITY, 6 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, CianwoodLugiaSpeechHouseBookshelf + bg_event 1, 1, BGEVENT_READ, CianwoodLugiaSpeechHouseBookshelf + + def_object_events + object_event 2, 4, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodLugiaSpeechHouseTeacherScript, -1 + object_event 6, 5, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CianwoodLugiaSpeechHouseLassScript, -1 + object_event 0, 2, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CianwoodLugiaSpeechHouseTwinScript, -1 diff --git a/maps/CianwoodPharmacy.asm b/maps/CianwoodPharmacy.asm new file mode 100644 index 0000000..ca6d356 --- /dev/null +++ b/maps/CianwoodPharmacy.asm @@ -0,0 +1,87 @@ + object_const_def + const CIANWOODPHARMACY_PHARMACIST + +CianwoodPharmacy_MapScripts: + def_scene_scripts + scene_script CianwoodPharmacyNoopScene ; unusable + + def_callbacks + +CianwoodPharmacyNoopScene: + end + +CianwoodPharmacist: + faceplayer + opentext + checkevent EVENT_GOT_SECRETPOTION_FROM_PHARMACY + iftrue .Mart + checkevent EVENT_JASMINE_EXPLAINED_AMPHYS_SICKNESS + iffalse .Mart + writetext PharmacistGiveSecretpotionText + promptbutton + giveitem SECRETPOTION + writetext ReceivedSecretpotionText + playsound SFX_KEY_ITEM + waitsfx + itemnotify + setevent EVENT_GOT_SECRETPOTION_FROM_PHARMACY + writetext PharmacistDescribeSecretpotionText + waitbutton + closetext + end + +.Mart: + pokemart MARTTYPE_PHARMACY, MART_CIANWOOD + closetext + end + +CianwoodPharmacyBookshelf: + jumpstd DifficultBookshelfScript + +PharmacistGiveSecretpotionText: + text "Your #MON ap-" + line "pear to be fine." + + para "Is something wor- " + line "rying you?" + + para "…" + + para "The LIGHTHOUSE" + line "#MON is in" + cont "trouble?" + + para "I got it!" + + para "This ought to do" + line "the trick." + done + +ReceivedSecretpotionText: + text " received" + line "SECRETPOTION." + done + +PharmacistDescribeSecretpotionText: + text "My SECRETPOTION is" + line "a tad too strong." + + para "I only offer it in" + line "an emergency." + done + +CianwoodPharmacy_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CIANWOOD_CITY, 4 + warp_event 3, 7, CIANWOOD_CITY, 4 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, CianwoodPharmacyBookshelf + bg_event 1, 1, BGEVENT_READ, CianwoodPharmacyBookshelf + + def_object_events + object_event 2, 3, SPRITE_PHARMACIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CianwoodPharmacist, -1 diff --git a/maps/CianwoodPhotoStudio.asm b/maps/CianwoodPhotoStudio.asm new file mode 100644 index 0000000..fcec568 --- /dev/null +++ b/maps/CianwoodPhotoStudio.asm @@ -0,0 +1,61 @@ + object_const_def + const CIANWOODPHOTOSTUDIO_FISHING_GURU + +CianwoodPhotoStudio_MapScripts: + def_scene_scripts + + def_callbacks + +CianwoodPhotoStudioFishingGuruScript: + faceplayer + opentext + writetext CianwoodPhotoStudioFishingGuruText_Question + yesorno + iffalse .Refused + writetext CianwoodPhotoStudioFishingGuruText_Yes + waitbutton + special PhotoStudio + waitbutton + closetext + end + +.Refused: + writetext CianwoodPhotoStudioFishingGuruText_No + waitbutton + closetext + end + +CianwoodPhotoStudioFishingGuruText_Question: + text "You have magnifi-" + line "cent #MON with" + cont "you." + + para "How about a photo" + line "for a souvenir?" + done + +CianwoodPhotoStudioFishingGuruText_Yes: + text "OK! Big smile now!" + done + +CianwoodPhotoStudioFishingGuruText_No: + text "Oh, that's too" + line "bad. I thought it" + + para "would be a great" + line "memento…" + done + +CianwoodPhotoStudio_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CIANWOOD_CITY, 5 + warp_event 3, 7, CIANWOOD_CITY, 5 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_FISHING_GURU, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CianwoodPhotoStudioFishingGuruScript, -1 diff --git a/maps/CianwoodPokecenter1F.asm b/maps/CianwoodPokecenter1F.asm new file mode 100644 index 0000000..3559c20 --- /dev/null +++ b/maps/CianwoodPokecenter1F.asm @@ -0,0 +1,148 @@ + object_const_def + const CIANWOODPOKECENTER1F_NURSE + const CIANWOODPOKECENTER1F_LASS + const CIANWOODPOKECENTER1F_GYM_GUIDE + const CIANWOODPOKECENTER1F_SUPER_NERD + +CianwoodPokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +CianwoodPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +CianwoodPokecenter1FLassScript: + jumptextfaceplayer CianwoodPokecenter1FLassText + +CianwoodGymGuideScript: + faceplayer + checkevent EVENT_BEAT_CHUCK + iftrue .CianwoodGymGuideWinScript + opentext + writetext CianwoodGymGuideText + waitbutton + closetext + end + +.CianwoodGymGuideWinScript: + opentext + writetext CianwoodGymGuideWinText + waitbutton + closetext + end + +CianwoodPokecenter1FSuperNerdScript: + jumptextfaceplayer CianwoodPokecenter1FSuperNerdText + +CianwoodPokecenter1FLassText: + text "Did you meet the" + line "#MANIAC?" + + para "He's always brag-" + line "ging about his" + cont "rare #MON." + done + +CianwoodGymGuideText: + text "The #MON GYM" + line "trainers here are" + cont "macho bullies." + + para "If I stick around," + line "they might come" + cont "after me." + + para "Here's some ad-" + line "vice: the GYM" + + para "LEADER uses the" + line "fighting-type." + + para "So you should" + line "confound him with" + cont "psychic #MON." + + para "Wipe out his #-" + line "MON before they" + + para "can use their" + line "physical strength." + + para "And those boulders" + line "in the middle of" + cont "the GYM?" + + para "If you don't move" + line "them correctly," + + para "you won't reach" + line "the GYM LEADER." + + para "If you get stuck," + line "go outside." + done + +CianwoodGymGuideWinText: + text "! You won!" + line "I could tell by" + cont "looking at you!" + done + +CianwoodPokecenter1FUnusedText1: ; unreferenced + text "Don't you get the" + line "urge to show off" + + para "your #MON to" + line "friends?" + + para "I wish I could" + line "show the #MON I" + + para "raised to my pal" + line "in VIOLET." + done + +CianwoodPokecenter1FUnusedText2: ; unreferenced + text "I've been battling" + line "my pal in VIOLET" + + para "using a MOBILE" + line "ADAPTER link." + + para "I'm down 5-7" + line "against him. I've" + cont "gotta crank it up!" + done + +CianwoodPokecenter1FSuperNerdText: + text "I love showing off" + line "the #MON that" + + para "I've raised." + line "Don't you?" + + para "I'm going to get" + line "into a bunch of" + + para "battles, and show" + line "off my #MON!" + done + +CianwoodPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, CIANWOOD_CITY, 3 + warp_event 4, 7, CIANWOOD_CITY, 3 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CianwoodPokecenter1FNurseScript, -1 + object_event 1, 5, SPRITE_LASS, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CianwoodPokecenter1FLassScript, -1 + object_event 5, 3, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CianwoodGymGuideScript, -1 + object_event 8, 6, SPRITE_SUPER_NERD, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CianwoodPokecenter1FSuperNerdScript, -1 diff --git a/maps/CinnabarIsland.asm b/maps/CinnabarIsland.asm new file mode 100644 index 0000000..cb6e7b1 --- /dev/null +++ b/maps/CinnabarIsland.asm @@ -0,0 +1,143 @@ + object_const_def + const CINNABARISLAND_BLUE + +CinnabarIsland_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, CinnabarIslandFlypointCallback + +CinnabarIslandFlypointCallback: + setflag ENGINE_FLYPOINT_CINNABAR + endcallback + +CinnabarIslandBlue: + faceplayer + opentext + writetext CinnabarIslandBlueText + waitbutton + closetext + playsound SFX_WARP_TO + applymovement CINNABARISLAND_BLUE, CinnabarIslandBlueTeleport + disappear CINNABARISLAND_BLUE + clearevent EVENT_VIRIDIAN_GYM_BLUE + end + +CinnabarIslandGymSign: + jumptext CinnabarIslandGymSignText + +CinnabarIslandSign: + jumptext CinnabarIslandSignText + +CinnabarIslandPokecenterSign: + jumpstd PokecenterSignScript + +CinnabarIslandHiddenRareCandy: + hiddenitem RARE_CANDY, EVENT_CINNABAR_ISLAND_HIDDEN_RARE_CANDY + +CinnabarIslandBlueTeleport: + teleport_from + step_end + +CinnabarIslandBlueText: + text "Who are you?" + + para "Well, it's plain" + line "to see that you're" + cont "a trainer…" + + para "My name's BLUE." + + para "I was once the" + line "CHAMPION, although" + + para "it was for only a" + line "short time…" + + para "That meddling RED" + line "did me in…" + + para "Anyway, what do" + line "you want? You want" + + para "to challenge me or" + line "something?" + + para "…I hate to say" + line "it, but I'm not in" + + para "the mood for a" + line "battle now." + + para "Take a good look" + line "around you…" + + para "A volcano erupts," + line "and just like" + + para "that, a whole town" + line "disappears." + + para "We can go on win-" + line "ning and losing in" + + para "#MON. But if" + line "nature so much as" + + para "twitches, we can" + line "lose in a second." + + para "…" + + para "That's the way it" + line "is…" + + para "But, anyway, I'm" + line "still a trainer." + + para "If I see a strong" + line "opponent, it makes" + cont "me want to battle." + + para "If you want to" + line "battle me, come to" + cont "the VIRIDIAN GYM." + + para "I'll take you on" + line "then." + done + +CinnabarIslandGymSignText: + text "There's a notice" + line "here…" + + para "CINNABAR GYM has" + line "relocated to SEA-" + cont "FOAM ISLANDS." + + para "BLAINE" + done + +CinnabarIslandSignText: + text "CINNABAR ISLAND" + + para "The Fiery Town of" + line "Burning Desire" + done + +CinnabarIsland_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 11, 11, CINNABAR_POKECENTER_1F, 1 + + def_coord_events + + def_bg_events + bg_event 12, 11, BGEVENT_READ, CinnabarIslandPokecenterSign + bg_event 9, 11, BGEVENT_READ, CinnabarIslandGymSign + bg_event 7, 7, BGEVENT_READ, CinnabarIslandSign + bg_event 9, 1, BGEVENT_ITEM, CinnabarIslandHiddenRareCandy + + def_object_events + object_event 9, 6, SPRITE_BLUE, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CinnabarIslandBlue, EVENT_BLUE_IN_CINNABAR diff --git a/maps/CinnabarIsland.blk b/maps/CinnabarIsland.blk new file mode 100644 index 0000000..e2f4b83 --- /dev/null +++ b/maps/CinnabarIsland.blk @@ -0,0 +1,2 @@ +dbQQ>???;dN>?,,)dN$W*,ed)dN1(,,,)dP\ !*,)d{{y|r(,)-{ +{t(,)C-$W%kkkkkkkkk \ No newline at end of file diff --git a/maps/CinnabarPokecenter1F.asm b/maps/CinnabarPokecenter1F.asm new file mode 100644 index 0000000..beabb1c --- /dev/null +++ b/maps/CinnabarPokecenter1F.asm @@ -0,0 +1,50 @@ + object_const_def + const CINNABARPOKECENTER1F_NURSE + const CINNABARPOKECENTER1F_COOLTRAINER_F + const CINNABARPOKECENTER1F_FISHER + +CinnabarPokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +CinnabarPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +CinnabarPokecenter1FCooltrainerFScript: + jumptextfaceplayer CinnabarPokecenter1FCooltrainerFText + +CinnabarPokecenter1FFisherScript: + jumptextfaceplayer CinnabarPokecenter1FFisherText + +CinnabarPokecenter1FCooltrainerFText: + text "CINNABAR GYM's" + line "BLAINE apparently" + + para "lives alone in the" + line "SEAFOAM ISLANDS" + cont "cave…" + done + +CinnabarPokecenter1FFisherText: + text "It's been a year" + line "since the volcano" + cont "erupted." + done + +CinnabarPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, CINNABAR_ISLAND, 1 + warp_event 4, 7, CINNABAR_ISLAND, 1 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CinnabarPokecenter1FNurseScript, -1 + object_event 7, 6, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CinnabarPokecenter1FCooltrainerFScript, -1 + object_event 2, 4, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CinnabarPokecenter1FFisherScript, -1 diff --git a/maps/CinnabarPokecenter2FBeta.asm b/maps/CinnabarPokecenter2FBeta.asm new file mode 100644 index 0000000..c17adbe --- /dev/null +++ b/maps/CinnabarPokecenter2FBeta.asm @@ -0,0 +1,16 @@ +CinnabarPokecenter2FBeta_MapScripts: + def_scene_scripts + + def_callbacks + +CinnabarPokecenter2FBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 7, CINNABAR_POKECENTER_1F, 3 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/Colosseum.asm b/maps/Colosseum.asm new file mode 100644 index 0000000..61a1251 --- /dev/null +++ b/maps/Colosseum.asm @@ -0,0 +1,78 @@ + object_const_def + const COLOSSEUM_CHRIS1 + const COLOSSEUM_CHRIS2 + +Colosseum_MapScripts: + def_scene_scripts + scene_script ColosseumInitializeScene, SCENE_COLOSSEUM_INITIALIZE + scene_script ColosseumNoop1Scene, SCENE_COLOSSEUM_NOOP + scene_script ColosseumNoop2Scene ; unused + + def_callbacks + callback MAPCALLBACK_OBJECTS, ColosseumSetWhichChrisCallback + callback MAPCALLBACK_NEWMAP, ColosseumPreparePokecenter2FCallback + +ColosseumInitializeScene: + sdefer ColosseumInitializeAndPreparePokecenter2FScript + end + +ColosseumNoop1Scene: + end + +ColosseumNoop2Scene: + end + +ColosseumSetWhichChrisCallback: + special CableClubCheckWhichChris + iffalse .Chris2 + disappear COLOSSEUM_CHRIS2 + appear COLOSSEUM_CHRIS1 + endcallback + +.Chris2: + disappear COLOSSEUM_CHRIS1 + appear COLOSSEUM_CHRIS2 + endcallback + +ColosseumPreparePokecenter2FCallback: + setmapscene POKECENTER_2F, SCENE_POKECENTER2F_LEAVE_COLOSSEUM + endcallback + +ColosseumInitializeAndPreparePokecenter2FScript: + setscene SCENE_COLOSSEUM_NOOP + setmapscene POKECENTER_2F, SCENE_POKECENTER2F_LEAVE_COLOSSEUM + end + +ColosseumConsoleScript: + special Colosseum + newloadmap MAPSETUP_LINKRETURN + end + +CableClubFriendScript: + opentext + writetext .FriendReadyText + waitbutton + closetext + end + +.FriendReadyText: + text "Your friend is" + line "ready." + done + +Colosseum_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 7, POKECENTER_2F, 3 + warp_event 5, 7, POKECENTER_2F, 3 + + def_coord_events + + def_bg_events + bg_event 4, 4, BGEVENT_RIGHT, ColosseumConsoleScript + bg_event 5, 4, BGEVENT_LEFT, ColosseumConsoleScript + + def_object_events + object_event 3, 4, SPRITE_CHRIS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CableClubFriendScript, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + object_event 6, 4, SPRITE_CHRIS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CableClubFriendScript, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 diff --git a/maps/Colosseum.blk b/maps/Colosseum.blk new file mode 100644 index 0000000..2366a43 --- /dev/null +++ b/maps/Colosseum.blk @@ -0,0 +1 @@ +  \ No newline at end of file diff --git a/maps/CopycatsHouse1F.asm b/maps/CopycatsHouse1F.asm new file mode 100644 index 0000000..8c21178 --- /dev/null +++ b/maps/CopycatsHouse1F.asm @@ -0,0 +1,88 @@ + object_const_def + const COPYCATSHOUSE1F_POKEFAN_M + const COPYCATSHOUSE1F_POKEFAN_F + const COPYCATSHOUSE1F_CLEFAIRY + +CopycatsHouse1F_MapScripts: + def_scene_scripts + + def_callbacks + +CopycatsHouse1FPokefanMScript: + jumptextfaceplayer CopycatsHouse1FPokefanMText + +CopycatsHouse1FPokefanFScript: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext CopycatsHouse1FPokefanFText + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext CopycatsHouse1FPokefanFText_ReturnedMachinePart + waitbutton + closetext + end + +CopycatsHouse1FBlisseyScript: + opentext + writetext CopycatsHouse1FBlisseyText + cry BLISSEY + waitbutton + closetext + end + +CopycatsHouse1FPokefanMText: + text "My daughter likes" + line "to mimic people." + + para "Her mimicry has" + line "earned her the" + + para "nickname COPYCAT" + line "around here." + done + +CopycatsHouse1FPokefanFText: + text "My daughter is so" + line "self-centered…" + + para "She only has a few" + line "friends." + done + +CopycatsHouse1FPokefanFText_ReturnedMachinePart: + text "She recently lost" + line "the # DOLL that" + + para "a boy gave her" + line "three years ago." + + para "Ever since then," + line "she's gotten even" + cont "better at mimicry…" + done + +CopycatsHouse1FBlisseyText: + text "BLISSEY: Bliisii!" + done + +CopycatsHouse1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, SAFFRON_CITY, 8 + warp_event 3, 7, SAFFRON_CITY, 8 + warp_event 2, 0, COPYCATS_HOUSE_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CopycatsHouse1FPokefanMScript, -1 + object_event 5, 4, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CopycatsHouse1FPokefanFScript, -1 + object_event 6, 6, SPRITE_CLEFAIRY, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CopycatsHouse1FBlisseyScript, -1 diff --git a/maps/CopycatsHouse1F.blk b/maps/CopycatsHouse1F.blk new file mode 100644 index 0000000..bbdc685 --- /dev/null +++ b/maps/CopycatsHouse1F.blk @@ -0,0 +1 @@ +#   \ No newline at end of file diff --git a/maps/CopycatsHouse2F.asm b/maps/CopycatsHouse2F.asm new file mode 100644 index 0000000..0e53ad0 --- /dev/null +++ b/maps/CopycatsHouse2F.asm @@ -0,0 +1,379 @@ + object_const_def + const COPYCATSHOUSE2F_COPYCAT1 ; if player is male + const COPYCATSHOUSE2F_DODRIO + const COPYCATSHOUSE2F_FAIRYDOLL ; lost item + const COPYCATSHOUSE2F_MONSTERDOLL + const COPYCATSHOUSE2F_BIRDDOLL + const COPYCATSHOUSE2F_COPYCAT2 ; if player is female + +CopycatsHouse2F_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, CopycatsHouse2FWhichGenderCallback + +CopycatsHouse2FWhichGenderCallback: + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .Female + disappear COPYCATSHOUSE2F_COPYCAT2 + appear COPYCATSHOUSE2F_COPYCAT1 + sjump .Done +.Female: + disappear COPYCATSHOUSE2F_COPYCAT1 + appear COPYCATSHOUSE2F_COPYCAT2 +.Done: + endcallback + +Copycat: + faceplayer + checkevent EVENT_GOT_PASS_FROM_COPYCAT + iftrue .GotPass + checkevent EVENT_RETURNED_LOST_ITEM_TO_COPYCAT + iftrue .TryGivePassAgain + checkitem LOST_ITEM + iftrue .ReturnLostItem + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .Default_Female_1 + applymovement COPYCATSHOUSE2F_COPYCAT1, CopycatSpinAroundMovementData + faceplayer + variablesprite SPRITE_COPYCAT, SPRITE_CHRIS + sjump .Default_Merge_1 + +.Default_Female_1: + applymovement COPYCATSHOUSE2F_COPYCAT2, CopycatSpinAroundMovementData + faceplayer + variablesprite SPRITE_COPYCAT, SPRITE_KRIS +.Default_Merge_1: + special LoadUsedSpritesGFX + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .TalkAboutLostItem + opentext + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .Default_Female_2a + writetext CopycatText_Male_1 + sjump .Default_Merge_2a + +.Default_Female_2a: + writetext CopycatText_Female_1 +.Default_Merge_2a: + waitbutton + closetext + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .Default_Female_3a + applymovement COPYCATSHOUSE2F_COPYCAT1, CopycatSpinAroundMovementData + sjump .Default_Merge_3a + +.Default_Female_3a: + applymovement COPYCATSHOUSE2F_COPYCAT2, CopycatSpinAroundMovementData +.Default_Merge_3a: + faceplayer + variablesprite SPRITE_COPYCAT, SPRITE_LASS + special LoadUsedSpritesGFX + opentext + writetext CopycatText_QuickMimicking + waitbutton + closetext + end + +.TalkAboutLostItem: + opentext + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .Default_Female_2b + writetext CopycatText_Male_2 + sjump .Default_Merge_2b + +.Default_Female_2b: + writetext CopycatText_Female_2 +.Default_Merge_2b: + waitbutton + closetext + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .Default_Female_3b + applymovement COPYCATSHOUSE2F_COPYCAT1, CopycatSpinAroundMovementData + sjump .Default_Merge_3b + +.Default_Female_3b: + applymovement COPYCATSHOUSE2F_COPYCAT2, CopycatSpinAroundMovementData +.Default_Merge_3b: + faceplayer + variablesprite SPRITE_COPYCAT, SPRITE_LASS + special LoadUsedSpritesGFX + opentext + writetext CopycatText_Worried + waitbutton + closetext + setevent EVENT_MET_COPYCAT_FOUND_OUT_ABOUT_LOST_ITEM + end + +.ReturnLostItem: + opentext + writetext CopycatText_GiveDoll + promptbutton + takeitem LOST_ITEM + setevent EVENT_RETURNED_LOST_ITEM_TO_COPYCAT + clearevent EVENT_COPYCATS_HOUSE_2F_DOLL + sjump .GivePass + +.TryGivePassAgain: + opentext +.GivePass: + writetext CopycatText_GivePass + promptbutton + verbosegiveitem PASS + iffalse .Cancel + setevent EVENT_GOT_PASS_FROM_COPYCAT + writetext CopycatText_ExplainPass + waitbutton + closetext + end + +.GotPass: + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .GotPass_Female_1 + applymovement COPYCATSHOUSE2F_COPYCAT1, CopycatSpinAroundMovementData + faceplayer + variablesprite SPRITE_COPYCAT, SPRITE_CHRIS + sjump .GotPass_Merge_1 + +.GotPass_Female_1: + applymovement COPYCATSHOUSE2F_COPYCAT2, CopycatSpinAroundMovementData + faceplayer + variablesprite SPRITE_COPYCAT, SPRITE_KRIS +.GotPass_Merge_1: + special LoadUsedSpritesGFX + opentext + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .GotPass_Female_2 + writetext CopycatText_Male_3 + sjump .GotPass_Merge_2 + +.GotPass_Female_2: + writetext CopycatText_Female_3 +.GotPass_Merge_2: + waitbutton + closetext + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .GotPass_Female_3 + applymovement COPYCATSHOUSE2F_COPYCAT1, CopycatSpinAroundMovementData + sjump .GotPass_Merge_3 + +.GotPass_Female_3: + applymovement COPYCATSHOUSE2F_COPYCAT2, CopycatSpinAroundMovementData +.GotPass_Merge_3: + faceplayer + variablesprite SPRITE_COPYCAT, SPRITE_LASS + special LoadUsedSpritesGFX + opentext + writetext CopycatText_ItsAScream + waitbutton +.Cancel: + closetext + end + +CopycatsDodrio: + opentext + writetext CopycatsDodrioText1 + cry DODRIO + promptbutton + writetext CopycatsDodrioText2 + waitbutton + closetext + end + +CopycatsHouse2FDoll: + jumptext CopycatsHouse2FDollText + +CopycatsHouse2FBookshelf: + jumpstd PictureBookshelfScript + +CopycatSpinAroundMovementData: + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + step_end + +CopycatText_Male_1: + text ": Hi! Do" + line "you like #MON?" + + para ": Uh, no, I" + line "just asked you." + + para ": Huh?" + line "You're strange!" + done + +CopycatText_QuickMimicking: + text "COPYCAT: Hmm?" + line "Quit mimicking?" + + para "But that's my" + line "favorite hobby!" + done + +CopycatText_Male_2: + text ": Hi!" + line "I heard that you" + + para "lost your favorite" + line "# DOLL." + + para ": If I find" + line "it, you'll give me" + cont "a rail PASS?" + + para ": I'll go" + line "find it for you." + + para "You think you lost" + line "it when you went" + cont "to VERMILION CITY?" + done + +CopycatText_Worried: + text "COPYCAT: Pardon?" + + para "I shouldn't decide" + line "what you should" + cont "do?" + + para "But I'm really" + line "worried… What if" + cont "someone finds it?" + done + +CopycatText_GiveDoll: + text "COPYCAT: Yay!" + line "That's my CLEFAIRY" + cont "# DOLL!" + + para "See the tear where" + line "the right leg is" + + para "sewn on? That's" + line "proof!" + done + +CopycatText_GivePass: + text "OK. Here's the" + line "MAGNET TRAIN PASS" + cont "like I promised!" + done + +CopycatText_ExplainPass: + text "COPYCAT: That's" + line "the PASS for the" + cont "MAGNET TRAIN." + + para "The rail company" + line "man gave me that" + + para "when they tore" + line "down our old house" + cont "for the STATION." + done + +CopycatText_Male_3: + text ": Hi!" + line "Thanks a lot for" + cont "the rail PASS!" + + para ": Pardon?" + + para ": Is it" + line "that fun to mimic" + cont "my every move?" + done + +CopycatText_ItsAScream: + text "COPYCAT: You bet!" + line "It's a scream!" + done + +CopycatText_Female_1: + text ": Hi. You" + line "must like #MON." + + para ": No, not" + line "me. I asked you." + + para ": Pardon?" + line "You're weird!" + done + +CopycatText_Female_2: + text ": Hi. Did" + line "you really lose" + cont "your # DOLL?" + + para ": You'll" + line "really give me a" + + para "rail PASS if I" + line "find it for you?" + + para ": Sure," + line "I'll look for it!" + + para "You think you lost" + line "it when you were" + cont "in VERMILION?" + done + +CopycatText_Female_3: + text ": Thank you" + line "for the rail PASS!" + + para ": …Pardon?" + + para ": Is it" + line "really that fun to" + + para "copy what I say" + line "and do?" + done + +CopycatsDodrioText1: + text "DODRIO: Gii giii!" + done + +CopycatsDodrioText2: + text "MIRROR, MIRROR ON" + line "THE WALL, WHO'S" + + para "THE FAIREST ONE OF" + line "ALL?" + done + +CopycatsHouse2FDollText: + text "This is a rare" + line "#MON! Huh?" + + para "It's only a doll…" + done + +CopycatsHouse2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 0, COPYCATS_HOUSE_1F, 3 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, CopycatsHouse2FBookshelf + bg_event 1, 1, BGEVENT_READ, CopycatsHouse2FBookshelf + + def_object_events + object_event 4, 3, SPRITE_COPYCAT, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Copycat, EVENT_COPYCAT_1 + object_event 6, 4, SPRITE_MOLTRES, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CopycatsDodrio, -1 + object_event 6, 1, SPRITE_FAIRY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CopycatsHouse2FDoll, EVENT_COPYCATS_HOUSE_2F_DOLL + object_event 2, 1, SPRITE_MONSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, CopycatsHouse2FDoll, -1 + object_event 7, 1, SPRITE_BIRD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CopycatsHouse2FDoll, -1 + object_event 4, 3, SPRITE_COPYCAT, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Copycat, EVENT_COPYCAT_2 diff --git a/maps/CopycatsHouse2F.blk b/maps/CopycatsHouse2F.blk new file mode 100644 index 0000000..5086f08 --- /dev/null +++ b/maps/CopycatsHouse2F.blk @@ -0,0 +1 @@ +  %&'( \ No newline at end of file diff --git a/maps/DanceTheater.asm b/maps/DanceTheater.asm new file mode 100644 index 0000000..f3704ba --- /dev/null +++ b/maps/DanceTheater.asm @@ -0,0 +1,360 @@ + object_const_def + const DANCETHEATER_KIMONO_GIRL1 + const DANCETHEATER_KIMONO_GIRL2 + const DANCETHEATER_KIMONO_GIRL3 + const DANCETHEATER_KIMONO_GIRL4 + const DANCETHEATER_KIMONO_GIRL5 + const DANCETHEATER_GENTLEMAN + const DANCETHEATER_RHYDON + const DANCETHEATER_COOLTRAINER_M + const DANCETHEATER_GRANNY + +DanceTheater_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerKimonoGirlNaoko: + trainer KIMONO_GIRL, NAOKO, EVENT_BEAT_KIMONO_GIRL_NAOKO, KimonoGirlNaokoSeenText, KimonoGirlNaokoBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext KimonoGirlNaokoAfterBattleText + waitbutton + closetext + end + +TrainerKimonoGirlSayo: + trainer KIMONO_GIRL, SAYO, EVENT_BEAT_KIMONO_GIRL_SAYO, KimonoGirlSayoSeenText, KimonoGirlSayoBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext KimonoGirlSayoAfterBattleText + waitbutton + closetext + end + +TrainerKimonoGirlZuki: + trainer KIMONO_GIRL, ZUKI, EVENT_BEAT_KIMONO_GIRL_ZUKI, KimonoGirlZukiSeenText, KimonoGirlZukiBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext KimonoGirlZukiAfterBattleText + waitbutton + closetext + end + +TrainerKimonoGirlKuni: + trainer KIMONO_GIRL, KUNI, EVENT_BEAT_KIMONO_GIRL_KUNI, KimonoGirlKuniSeenText, KimonoGirlKuniBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext KimonoGirlKuniAfterBattleText + waitbutton + closetext + end + +TrainerKimonoGirlMiki: + trainer KIMONO_GIRL, MIKI, EVENT_BEAT_KIMONO_GIRL_MIKI, KimonoGirlMikiSeenText, KimonoGirlMikiBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext KimonoGirlMikiAfterBattleText + waitbutton + closetext + end + +DanceTheaterSurfGuy: + faceplayer + opentext + writetext SurfGuyNeverLeftAScratchText + promptbutton + checkevent EVENT_GOT_HM03_SURF + iftrue SurfGuyAlreadyGaveSurf + checkevent EVENT_BEAT_KIMONO_GIRL_NAOKO + iffalse .KimonoGirlsUndefeated + checkevent EVENT_BEAT_KIMONO_GIRL_SAYO + iffalse .KimonoGirlsUndefeated + checkevent EVENT_BEAT_KIMONO_GIRL_ZUKI + iffalse .KimonoGirlsUndefeated + checkevent EVENT_BEAT_KIMONO_GIRL_KUNI + iffalse .KimonoGirlsUndefeated + checkevent EVENT_BEAT_KIMONO_GIRL_MIKI + iffalse .KimonoGirlsUndefeated + sjump .GetSurf + +.KimonoGirlsUndefeated: + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .PlayerIsFemale + writetext SurfGuyLadGiftText + waitbutton + closetext + end + +.PlayerIsFemale: + writetext SurfGuyLassieGiftText + waitbutton + closetext + end + +.GetSurf: + writetext SurfGuyLikeADanceText + promptbutton + verbosegiveitem HM_SURF + setevent EVENT_GOT_HM03_SURF + writetext SurfGuySurfExplanationText + waitbutton + closetext + end + +SurfGuyAlreadyGaveSurf: + writetext SurfGuyElegantKimonoGirlsText + waitbutton + closetext + end + +DanceTheaterRhydon: + opentext + writetext RhydonText + cry RHYDON + waitbutton + closetext + end + +DanceTheaterCooltrainerMScript: + jumptextfaceplayer DanceTheaterCooltrainerMText + +DanceTheaterGrannyScript: + jumptextfaceplayer DanceTheaterGrannyText + +DanceTheaterFancyPanel: + jumptext DanceTheaterFancyPanelText + +KimonoGirlNaokoSeenText: + text "You have lovely" + line "#MON. May I see" + cont "them in battle?" + done + +KimonoGirlNaokoBeatenText: + text "Oh, you are very" + line "strong." + done + +KimonoGirlNaokoAfterBattleText: + text "I enjoyed that" + line "bout. I would like" + cont "to see you again." + done + +KimonoGirlSayoSeenText: + text "I always dance" + line "with my #MON." + + para "Of course, I also" + line "train them." + done + +KimonoGirlSayoBeatenText: + text "Oh, so close!" + line "I almost had you." + done + +KimonoGirlSayoAfterBattleText: + text "Rhythm is impor-" + line "tant for both" + + para "dancing and #-" + line "MON." + done + +KimonoGirlZukiSeenText: + text "Isn't my barrette" + line "pretty?" + + para "Oh. A #MON" + line "battle?" + done + +KimonoGirlZukiBeatenText: + text "I don't have any" + line "#MON left…" + done + +KimonoGirlZukiAfterBattleText: + text "I put a different" + line "flower in my bar-" + cont "rette every month." + done + +KimonoGirlKuniSeenText: + text "Oh, you're a cute" + line "trainer. Would you" + cont "like to battle?" + done + +KimonoGirlKuniBeatenText: + text "You're stronger" + line "than you look." + done + +KimonoGirlKuniAfterBattleText: + text "I trained a lot," + line "so I thought I was" + + para "a capable trainer." + line "I guess I'm not." + done + +KimonoGirlMikiSeenText: + text "Do you like my" + line "dancing? I'm good" + cont "at #MON too." + done + +KimonoGirlMikiBeatenText: + text "Ooh, you're good" + line "at #MON too." + done + +KimonoGirlMikiAfterBattleText: + text "I can keep dancing" + line "because there are" + + para "people who enjoy" + line "what I do." + + para "My #MON keep my" + line "spirits up too." + done + +SurfGuyNeverLeftAScratchText: + text "Not only are the" + line "KIMONO GIRLS great" + + para "dancers, they're" + line "also skilled at" + cont "#MON." + + para "I always challenge" + line "them, but I've" + + para "never even left a" + line "scratch…" + done + +SurfGuyLadGiftText: + text "Lad! If you can" + line "defeat all the" + + para "KIMONO GIRLS, I'll" + line "give you a gift." + done + +SurfGuyLassieGiftText: + text "Lassie, if you can" + line "defeat all the" + + para "KIMONO GIRLS, I'll" + line "give you a gift." + done + +SurfGuyLikeADanceText: + text "The way you bat-" + line "tled, it was like" + cont "watching a dance." + + para "It was a rare" + line "treat to see!" + + para "I want you to have" + line "this. Don't worry" + cont "--take it!" + done + +SurfGuySurfExplanationText: + text "That's SURF." + + para "It's a move that" + line "lets #MON swim" + cont "across water." + done + +SurfGuyElegantKimonoGirlsText: + text "I wish my #MON" + line "were as elegant as" + cont "the KIMONO GIRLS…" + done + +RhydonText: + text "RHYDON: Gugooh" + line "gugogooh!" + done + +DanceTheaterCooltrainerMText: + text "That man's always" + line "with his RHYDON." + + para "Says he wants a" + line "#MON that can" + cont "SURF and dance." + + para "Is he trying to" + line "make a synchro-" + cont "nized swimming" + cont "#MON?" + done + +DanceTheaterGrannyText: + text "The KIMONO GIRLS" + line "are so beautiful…" + + para "But they have to" + line "go through rigor-" + cont "ous training." + + para "And they have to" + line "learn to follow" + + para "customs before ap-" + line "pearing in public." + + para "But if you love" + line "something, any-" + cont "thing is possible." + done + +DanceTheaterFancyPanelText: + text "It's a fancy panel" + line "that's decorated" + cont "with flowers." + done + +DanceTheater_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 13, ECRUTEAK_CITY, 8 + warp_event 6, 13, ECRUTEAK_CITY, 8 + + def_coord_events + + def_bg_events + bg_event 5, 6, BGEVENT_UP, DanceTheaterFancyPanel + bg_event 6, 6, BGEVENT_UP, DanceTheaterFancyPanel + + def_object_events + object_event 0, 2, SPRITE_KIMONO_GIRL, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 0, TrainerKimonoGirlNaoko, -1 + object_event 2, 1, SPRITE_KIMONO_GIRL, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 0, TrainerKimonoGirlSayo, -1 + object_event 6, 2, SPRITE_KIMONO_GIRL, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, TrainerKimonoGirlZuki, -1 + object_event 9, 1, SPRITE_KIMONO_GIRL, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 0, TrainerKimonoGirlKuni, -1 + object_event 11, 2, SPRITE_KIMONO_GIRL, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 0, TrainerKimonoGirlMiki, -1 + object_event 7, 10, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DanceTheaterSurfGuy, -1 + object_event 6, 8, SPRITE_RHYDON, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, DanceTheaterRhydon, -1 + object_event 10, 10, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, DanceTheaterCooltrainerMScript, -1 + object_event 3, 6, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DanceTheaterGrannyScript, -1 diff --git a/maps/DanceTheater.blk b/maps/DanceTheater.blk new file mode 100644 index 0000000..76a6f13 --- /dev/null +++ b/maps/DanceTheater.blk @@ -0,0 +1 @@ +------,,,,,,.0000/*+* \ No newline at end of file diff --git a/maps/DarkCaveBlackthornEntrance.asm b/maps/DarkCaveBlackthornEntrance.asm new file mode 100644 index 0000000..d710700 --- /dev/null +++ b/maps/DarkCaveBlackthornEntrance.asm @@ -0,0 +1,76 @@ + object_const_def + const DARKCAVEBLACKTHORNENTRANCE_PHARMACIST + const DARKCAVEBLACKTHORNENTRANCE_POKE_BALL1 + const DARKCAVEBLACKTHORNENTRANCE_POKE_BALL2 + +DarkCaveBlackthornEntrance_MapScripts: + def_scene_scripts + + def_callbacks + +DarkCaveBlackthornEntrancePharmacistScript: + faceplayer + opentext + checkevent EVENT_GOT_BLACKGLASSES_IN_DARK_CAVE + iftrue .GotBlackglasses + writetext DarkCaveBlackthornEntrancePharmacistText1 + promptbutton + verbosegiveitem BLACKGLASSES + iffalse .PackFull + setevent EVENT_GOT_BLACKGLASSES_IN_DARK_CAVE +.GotBlackglasses: + writetext DarkCaveBlackthornEntrancePharmacistText2 + waitbutton +.PackFull: + closetext + end + +DarkCaveBlackthornEntranceRevive: + itemball REVIVE + +DarkCaveBlackthornEntranceTMSnore: + itemball TM_SNORE + +DarkCaveBlackthornEntrancePharmacistText1: + text "Whoa! You startled" + line "me there!" + + para "I had my BLACK-" + line "GLASSES on, so I" + + para "didn't notice you" + line "at all." + + para "What am I doing" + line "here?" + + para "Hey, don't you" + line "worry about it." + + para "I'll give you a" + line "pair of BLACK-" + cont "GLASSES, so forget" + cont "you saw me, OK?" + done + +DarkCaveBlackthornEntrancePharmacistText2: + text "BLACKGLASSES ups" + line "the power of dark-" + cont "type moves." + done + +DarkCaveBlackthornEntrance_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 23, 3, ROUTE_45, 1 + warp_event 3, 25, DARK_CAVE_VIOLET_ENTRANCE, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 7, 3, SPRITE_PHARMACIST, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DarkCaveBlackthornEntrancePharmacistScript, -1 + object_event 21, 24, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DarkCaveBlackthornEntranceRevive, EVENT_DARK_CAVE_BLACKTHORN_ENTRANCE_REVIVE + object_event 7, 22, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DarkCaveBlackthornEntranceTMSnore, EVENT_DARK_CAVE_BLACKTHORN_ENTRANCE_TM_SNORE diff --git a/maps/DarkCaveBlackthornEntrance.blk b/maps/DarkCaveBlackthornEntrance.blk new file mode 100644 index 0000000..5c11d9c --- /dev/null +++ b/maps/DarkCaveBlackthornEntrance.blk @@ -0,0 +1,12 @@ +     ($ +9!# +9    +  >' ) & +++" >39 ("& +99 +'''''3 +  +(;(*(+& +);!&6 +$ +   # +  \ No newline at end of file diff --git a/maps/DarkCaveVioletEntrance.asm b/maps/DarkCaveVioletEntrance.asm new file mode 100644 index 0000000..572b546 --- /dev/null +++ b/maps/DarkCaveVioletEntrance.asm @@ -0,0 +1,55 @@ + object_const_def + const DARKCAVEVIOLETENTRANCE_POKE_BALL1 + const DARKCAVEVIOLETENTRANCE_ROCK1 + const DARKCAVEVIOLETENTRANCE_ROCK2 + const DARKCAVEVIOLETENTRANCE_ROCK3 + const DARKCAVEVIOLETENTRANCE_ROCK4 + const DARKCAVEVIOLETENTRANCE_POKE_BALL2 + const DARKCAVEVIOLETENTRANCE_POKE_BALL3 + const DARKCAVEVIOLETENTRANCE_POKE_BALL4 + +DarkCaveVioletEntrance_MapScripts: + def_scene_scripts + + def_callbacks + +DarkCaveVioletEntrancePotion: + itemball POTION + +DarkCaveVioletEntranceFullHeal: + itemball FULL_HEAL + +DarkCaveVioletEntranceHyperPotion: + itemball HYPER_POTION + +DarkCaveVioletEntranceDireHit: + itemball DIRE_HIT + +DarkCaveVioletEntranceRock: + jumpstd SmashRockScript + +DarkCaveVioletEntranceHiddenElixer: + hiddenitem ELIXER, EVENT_DARK_CAVE_VIOLET_ENTRANCE_HIDDEN_ELIXER + +DarkCaveVioletEntrance_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 15, ROUTE_31, 3 + warp_event 17, 1, DARK_CAVE_BLACKTHORN_ENTRANCE, 2 + warp_event 35, 33, ROUTE_46, 3 + + def_coord_events + + def_bg_events + bg_event 26, 3, BGEVENT_ITEM, DarkCaveVioletEntranceHiddenElixer + + def_object_events + object_event 6, 8, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DarkCaveVioletEntrancePotion, EVENT_DARK_CAVE_VIOLET_ENTRANCE_POTION + object_event 16, 14, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DarkCaveVioletEntranceRock, -1 + object_event 27, 6, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DarkCaveVioletEntranceRock, -1 + object_event 7, 14, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DarkCaveVioletEntranceRock, -1 + object_event 36, 31, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DarkCaveVioletEntranceRock, -1 + object_event 36, 22, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DarkCaveVioletEntranceFullHeal, EVENT_DARK_CAVE_VIOLET_ENTRANCE_FULL_HEAL + object_event 35, 9, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DarkCaveVioletEntranceHyperPotion, EVENT_DARK_CAVE_VIOLET_ENTRANCE_HYPER_POTION + object_event 30, 28, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DarkCaveVioletEntranceDireHit, EVENT_DARK_CAVE_VIOLET_ENTRANCE_DIRE_HIT diff --git a/maps/DarkCaveVioletEntrance.blk b/maps/DarkCaveVioletEntrance.blk new file mode 100644 index 0000000..d4e7ee9 --- /dev/null +++ b/maps/DarkCaveVioletEntrance.blk @@ -0,0 +1,25 @@ +    +(+!!&% *$* +(;&% +1) +;&2'" + );& +* + +9);;& +$  +(;>'3 $ + 9 +$1$!)) +$ # 9+ + +$ +9  +$;$ +9+ + + +9 + +  + )$ # \ No newline at end of file diff --git a/maps/DayCare.asm b/maps/DayCare.asm new file mode 100644 index 0000000..b70928f --- /dev/null +++ b/maps/DayCare.asm @@ -0,0 +1,173 @@ + object_const_def + const DAYCARE_GRAMPS + const DAYCARE_GRANNY + +DayCare_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, DayCareEggCheckCallback + +DayCareEggCheckCallback: + checkflag ENGINE_DAY_CARE_MAN_HAS_EGG + iftrue .PutDayCareManOutside + clearevent EVENT_DAY_CARE_MAN_IN_DAY_CARE + setevent EVENT_DAY_CARE_MAN_ON_ROUTE_34 + endcallback + +.PutDayCareManOutside: + setevent EVENT_DAY_CARE_MAN_IN_DAY_CARE + clearevent EVENT_DAY_CARE_MAN_ON_ROUTE_34 + endcallback + +DayCareManScript_Inside: + faceplayer + opentext + checkevent EVENT_GOT_ODD_EGG + iftrue .AlreadyHaveOddEgg + writetext DayCareManText_GiveOddEgg + promptbutton + closetext + readvar VAR_PARTYCOUNT + ifequal PARTY_LENGTH, .PartyFull + special GiveOddEgg + opentext + writetext DayCareText_GotOddEgg + playsound SFX_KEY_ITEM + waitsfx + writetext DayCareText_DescribeOddEgg + waitbutton + closetext + setevent EVENT_GOT_ODD_EGG + end + +.PartyFull: + opentext + writetext DayCareText_PartyFull + waitbutton + closetext + end + +.AlreadyHaveOddEgg: + special DayCareMan + waitbutton + closetext + end + +DayCareLadyScript: + faceplayer + opentext + checkflag ENGINE_DAY_CARE_MAN_HAS_EGG + iftrue .HusbandWasLookingForYou + special DayCareLady + waitbutton + closetext + end + +.HusbandWasLookingForYou: + writetext Text_GrampsLookingForYou + waitbutton + closetext + end + +DayCareBookshelf: + jumpstd DifficultBookshelfScript + +Text_GrampsLookingForYou: + text "Gramps was looking" + line "for you." + done + +Text_DayCareManTalksAboutEggTicket: ; unreferenced + text "I'm the DAY-CARE" + line "MAN." + + para "There's something" + line "new in GOLDENROD" + + para "called the TRADE" + line "CORNER." + + para "I was given an EGG" + line "TICKET that can be" + + para "traded in for a" + line "ODD EGG." + + para "But since we run a" + line "DAY-CARE, we don't" + + para "need it. You may" + line "as well have it." + done + +DayCareManText_GiveOddEgg: + text "I'm the DAY-CARE" + line "MAN." + + para "Do you know about" + line "EGGS?" + + para "I was raising" + line "#MON with my" + cont "wife, you see." + + para "We were shocked to" + line "find an EGG!" + + para "How incredible is" + line "that?" + + para "Well, wouldn't you" + line "like this EGG?" + + para "Then fine, this is" + line "yours to keep!" + done + +DayCareText_ComeAgain: ; unreferenced + text "Come again." + done + +DayCareText_GotOddEgg: + text " received" + line "ODD EGG!" + done + +DayCareText_DescribeOddEgg: + text "I found that when" + line "I was caring for" + + para "someone's #MON" + line "before." + + para "But the trainer" + line "didn't want the" + + para "EGG, so I'd kept" + line "it around." + done + +DayCareText_PartyFull: + text "You've no room for" + line "this." + done + +DayCare_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 5, ROUTE_34, 3 + warp_event 0, 6, ROUTE_34, 4 + warp_event 2, 7, ROUTE_34, 5 + warp_event 3, 7, ROUTE_34, 5 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, DayCareBookshelf + bg_event 1, 1, BGEVENT_READ, DayCareBookshelf + + def_object_events + object_event 2, 3, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DayCareManScript_Inside, EVENT_DAY_CARE_MAN_IN_DAY_CARE + object_event 5, 3, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, DayCareLadyScript, -1 diff --git a/maps/DayCare.blk b/maps/DayCare.blk new file mode 100644 index 0000000..758ddaf --- /dev/null +++ b/maps/DayCare.blk @@ -0,0 +1,4 @@ + + +  +  diff --git a/maps/DayOfWeekSiblingsHouse.asm b/maps/DayOfWeekSiblingsHouse.asm new file mode 100644 index 0000000..c020552 --- /dev/null +++ b/maps/DayOfWeekSiblingsHouse.asm @@ -0,0 +1,83 @@ + object_const_def + const DAYOFWEEKSIBLINGSHOUSE_POKEDEX + +DayOfWeekSiblingsHouse_MapScripts: + def_scene_scripts + + def_callbacks + +DayOfWeekSiblingsHousePokedexScript: + opentext + writetext DayOfWeekSiblingsHousePokedexText1 + yesorno + iffalse .End + writetext DayOfWeekSiblingsHousePokedexText2 + yesorno + iffalse .End + writetext DayOfWeekSiblingsHousePokedexText3 + waitbutton +.End: + closetext + end + +DayOfWeekSiblingsHousePokedexText1: + text "There's something" + line "written here." + + para "Read it?" + done + +DayOfWeekSiblingsHousePokedexText2: + text "To my brothers and" + line "sisters:" + + para "We take pride in" + line "serving #MON" + cont "trainers." + + para "When trainers talk" + line "to you, give them" + cont "something useful." + + para "Love," + line "MONICA" + + para "Keep reading?" + done + +DayOfWeekSiblingsHousePokedexText3: + text "Monday, MONICA" + line "ROUTE 40" + + para "Tuesday, TUSCANY" + line "ROUTE 29" + + para "Wednesday, WESLEY" + line "LAKE OF RAGE" + + para "Thursday, ARTHUR" + line "ROUTE 36" + + para "Friday, FRIEDA" + line "ROUTE 32" + + para "Saturday, SANTOS" + line "BLACKTHORN CITY" + + para "Sunday, SUNNY" + line "ROUTE 37" + done + +DayOfWeekSiblingsHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ROUTE_26, 3 + warp_event 3, 7, ROUTE_26, 3 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 3, SPRITE_POKEDEX, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DayOfWeekSiblingsHousePokedexScript, -1 diff --git a/maps/DeptStore1F.blk b/maps/DeptStore1F.blk new file mode 100644 index 0000000..415c136 --- /dev/null +++ b/maps/DeptStore1F.blk @@ -0,0 +1,2 @@ + +   % \ No newline at end of file diff --git a/maps/DeptStore2F.blk b/maps/DeptStore2F.blk new file mode 100644 index 0000000..ed35c0f --- /dev/null +++ b/maps/DeptStore2F.blk @@ -0,0 +1 @@ +,.- \ No newline at end of file diff --git a/maps/DeptStore3F.blk b/maps/DeptStore3F.blk new file mode 100644 index 0000000..308940b --- /dev/null +++ b/maps/DeptStore3F.blk @@ -0,0 +1,2 @@ + +  \ No newline at end of file diff --git a/maps/DeptStore4F.blk b/maps/DeptStore4F.blk new file mode 100644 index 0000000..540dc4c --- /dev/null +++ b/maps/DeptStore4F.blk @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/maps/DeptStore5F.blk b/maps/DeptStore5F.blk new file mode 100644 index 0000000..447ad4d --- /dev/null +++ b/maps/DeptStore5F.blk @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/maps/DeptStore6F.blk b/maps/DeptStore6F.blk new file mode 100644 index 0000000..0d74a49 --- /dev/null +++ b/maps/DeptStore6F.blk @@ -0,0 +1 @@ +!!/     \ No newline at end of file diff --git a/maps/DeptStoreElevator.blk b/maps/DeptStoreElevator.blk new file mode 100644 index 0000000..2a0fe57 --- /dev/null +++ b/maps/DeptStoreElevator.blk @@ -0,0 +1 @@ +&% \ No newline at end of file diff --git a/maps/DiglettsCave.asm b/maps/DiglettsCave.asm new file mode 100644 index 0000000..970afd4 --- /dev/null +++ b/maps/DiglettsCave.asm @@ -0,0 +1,40 @@ + object_const_def + const DIGLETTSCAVE_POKEFAN_M + +DiglettsCave_MapScripts: + def_scene_scripts + + def_callbacks + +DiglettsCavePokefanMScript: + jumptextfaceplayer DiglettsCavePokefanMText + +DiglettsCaveHiddenMaxRevive: + hiddenitem MAX_REVIVE, EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE + +DiglettsCavePokefanMText: + text "A bunch of DIGLETT" + line "popped out of the" + + para "ground! That was" + line "shocking." + done + +DiglettsCave_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 33, VERMILION_CITY, 10 + warp_event 5, 31, DIGLETTS_CAVE, 5 + warp_event 15, 5, ROUTE_2, 5 + warp_event 17, 3, DIGLETTS_CAVE, 6 + warp_event 17, 33, DIGLETTS_CAVE, 2 + warp_event 3, 3, DIGLETTS_CAVE, 4 + + def_coord_events + + def_bg_events + bg_event 6, 11, BGEVENT_ITEM, DiglettsCaveHiddenMaxRevive + + def_object_events + object_event 3, 31, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DiglettsCavePokefanMScript, -1 diff --git a/maps/DiglettsCave.blk b/maps/DiglettsCave.blk new file mode 100644 index 0000000..a7a9751 --- /dev/null +++ b/maps/DiglettsCave.blk @@ -0,0 +1,18 @@ +    + + + +$+ + # +  +) +    + + )   +  +   + +( +  +$ +) #  \ No newline at end of file diff --git a/maps/DragonShrine.asm b/maps/DragonShrine.asm new file mode 100644 index 0000000..b78ee46 --- /dev/null +++ b/maps/DragonShrine.asm @@ -0,0 +1,673 @@ + object_const_def + const DRAGONSHRINE_ELDER1 + const DRAGONSHRINE_ELDER2 + const DRAGONSHRINE_ELDER3 + const DRAGONSHRINE_CLAIR + +DragonShrine_MapScripts: + def_scene_scripts + scene_script DragonShrineTakeTestScene, SCENE_DRAGONSHRINE_TAKE_TEST + scene_script DragonShrineNoopScene, SCENE_DRAGONSHRINE_NOOP + + def_callbacks + +DragonShrineTakeTestScene: + sdefer DragonShrineTakeTestScript + end + +DragonShrineNoopScene: + end + +DragonShrineTakeTestScript: + applymovement PLAYER, DragonShrinePlayerWalkInMovement + applymovement DRAGONSHRINE_ELDER1, DragonShrineElderStepDownMovement + opentext + writetext DragonShrineElderGreetingText + promptbutton +.Question1: + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + writetext DragonShrineQuestion1Text + promptbutton + loadmenu DragonShrineQuestion1_MenuHeader + verticalmenu + closewindow + ifequal 1, .RightAnswer + ifequal 2, .WrongAnswer + ifequal 3, .RightAnswer + end + +.Question2: + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + writetext DragonShrineQuestion2Text + promptbutton + loadmenu DragonShrineQuestion2_MenuHeader + verticalmenu + closewindow + ifequal 1, .RightAnswer + ifequal 2, .RightAnswer + ifequal 3, .WrongAnswer +.Question3: + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_4 + writetext DragonShrineQuestion3Text + promptbutton + loadmenu DragonShrineQuestion3_MenuHeader + verticalmenu + closewindow + ifequal 1, .WrongAnswer + ifequal 2, .RightAnswer + ifequal 3, .RightAnswer +.Question4: + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_5 + writetext DragonShrineQuestion4Text + promptbutton + loadmenu DragonShrineQuestion4_MenuHeader + verticalmenu + closewindow + ifequal 1, .RightAnswer + ifequal 2, .WrongAnswer + ifequal 3, .RightAnswer +.Question5: + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_6 + writetext DragonShrineQuestion5Text + promptbutton + loadmenu DragonShrineQuestion5_MenuHeader + verticalmenu + closewindow + ifequal 1, .WrongAnswer + ifequal 2, .RightAnswer + ifequal 3, .WrongAnswer +.RightAnswer: + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_6 + iftrue .PassedTheTest + writetext DragonShrineRightAnswerText + promptbutton + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_5 + iftrue .Question5 + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_4 + iftrue .Question4 + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + iftrue .Question3 + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + iftrue .Question2 +.WrongAnswer: + closetext + turnobject DRAGONSHRINE_ELDER1, LEFT + opentext + writetext DragonShrineWrongAnswerText1 + waitbutton + closetext + turnobject DRAGONSHRINE_ELDER1, DOWN + opentext + writetext DragonShrineWrongAnswerText2 + waitbutton + closetext + setevent EVENT_ANSWERED_DRAGON_MASTER_QUIZ_WRONG + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_6 + iftrue .Question5 + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_5 + iftrue .Question4 + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_4 + iftrue .Question3 + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + iftrue .Question2 + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + iftrue .Question1 +.PassedTheTest: + writetext DragonShrinePassedTestText + waitbutton + closetext + playsound SFX_ENTER_DOOR + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_CLAIR + appear DRAGONSHRINE_CLAIR + waitsfx + turnobject PLAYER, DOWN + pause 30 + applymovement DRAGONSHRINE_CLAIR, DragonShrineClairWalkInMovement + turnobject DRAGONSHRINE_CLAIR, RIGHT + turnobject PLAYER, LEFT + turnobject DRAGONSHRINE_ELDER1, LEFT + opentext + writetext DragonShrineClairYouPassedText + waitbutton + closetext + special FadeOutMusic + applymovement DRAGONSHRINE_CLAIR, DragonShrineClairBigStepLeftMovement + opentext + writetext DragonShrineClairThatCantBeText + waitbutton + closetext + applymovement DRAGONSHRINE_CLAIR, DragonShrineClairSlowStepLeftMovement + opentext + writetext DragonShrineClairYoureLyingText + waitbutton + closetext + applymovement DRAGONSHRINE_ELDER1, DragonShrineElderWalkToClairMovement + turnobject DRAGONSHRINE_CLAIR, UP + opentext + writetext DragonShrineMustIInformLanceText + waitbutton + closetext + showemote EMOTE_SHOCK, DRAGONSHRINE_CLAIR, 15 + opentext + writetext DragonShrineIUnderstandText + waitbutton + closetext + applymovement DRAGONSHRINE_CLAIR, DragonShrineClairTwoSlowStepsRightMovement + opentext + writetext DragonShrineHereRisingBadgeText + waitbutton + setflag ENGINE_RISINGBADGE + playsound SFX_GET_BADGE + waitsfx + special RestartMapMusic + specialphonecall SPECIALCALL_MASTERBALL + setscene SCENE_DRAGONSHRINE_NOOP + setmapscene DRAGONS_DEN_B1F, SCENE_DRAGONSDENB1F_CLAIR_GIVES_TM + writetext DragonShrinePlayerReceivedRisingBadgeText + promptbutton + writetext DragonShrineRisingBadgeExplanationText + waitbutton + closetext + applymovement DRAGONSHRINE_ELDER1, DragonShrineElderWalkAway1Movement + turnobject DRAGONSHRINE_CLAIR, UP + applymovement DRAGONSHRINE_ELDER1, DragonShrineElderWalkAway2Movement + turnobject PLAYER, UP + opentext + writetext DragonShrineElderScoldsClairText + waitbutton + closetext + opentext + writetext DragonShrineSpeechlessText + waitbutton + closetext + applymovement DRAGONSHRINE_CLAIR, DragonShrineClairWalkOutMovement + playsound SFX_ENTER_DOOR + disappear DRAGONSHRINE_CLAIR + waitsfx + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + end + +DragonShrineElder1Script: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue .DontGiveDratiniYet + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_7 + iftrue .ReceivedDratini + checkevent EVENT_GOT_DRATINI + iffalse .GiveDratini + checkevent EVENT_BEAT_RIVAL_IN_MT_MOON + iftrue .BeatRivalInMtMoon + writetext DragonShrineClairsGrandfatherText + waitbutton + closetext + end + +.GiveDratini: + writetext DragonShrineTakeThisDratiniText + waitbutton + readvar VAR_PARTYCOUNT + ifequal PARTY_LENGTH, .PartyFull + writetext DragonShrinePlayerReceivedDratiniText + playsound SFX_CAUGHT_MON + waitsfx + givepoke DRATINI, 15 + checkevent EVENT_ANSWERED_DRAGON_MASTER_QUIZ_WRONG + special GiveDratini + setevent EVENT_GOT_DRATINI + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_7 + writetext DragonShrineSymbolicDragonText + waitbutton + closetext + end + +.PartyFull: + writetext DragonShrinePartyFullText + waitbutton + closetext + end + +.BeatRivalInMtMoon: + writetext DragonShrineRivalIsInTrainingText + waitbutton + closetext + end + +.DontGiveDratiniYet: + writetext DragonShrineComeAgainText + waitbutton + closetext + end + +.ReceivedDratini: + writetext DragonShrineSymbolicDragonText + waitbutton + closetext + end + +DragonShrineElder2Script: + faceplayer + opentext + writetext DragonShrineElder2Text + waitbutton + closetext + end + +DragonShrineElder3Script: + faceplayer + opentext + writetext DragonShrineElder3Text + waitbutton + closetext + end + +DragonShrineQuestion1_MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 8, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags + db 3 ; items + db "Pal@" + db "Underling@" + db "Friend@" + +DragonShrineQuestion2_MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 9, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags + db 3 ; items + db "Strategy@" + db "Raising@" + db "Cheating@" + +DragonShrineQuestion3_MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 5, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags + db 3 ; items + db "Weak person@" + db "Tough person@" + db "Anybody@" + +DragonShrineQuestion4_MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 8, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags + db 3 ; items + db "Love@" + db "Violence@" + db "Knowledge@" + +DragonShrineQuestion5_MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 12, 4, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_DISABLE_B ; flags + db 3 ; items + db "Tough@" + db "Both@" + db "Weak@" + +DragonShrinePlayerWalkInMovement: + slow_step UP + slow_step UP + slow_step UP + slow_step RIGHT + slow_step UP + slow_step UP + slow_step UP + step_end + +DragonShrineElderStepDownMovement: + slow_step DOWN + step_end + +DragonShrineElderWalkToClairMovement: + slow_step LEFT + slow_step LEFT + slow_step LEFT + turn_head DOWN + step_end + +DragonShrineElderWalkAway1Movement: + slow_step RIGHT + slow_step RIGHT + step_end + +DragonShrineElderWalkAway2Movement: + slow_step RIGHT + turn_head DOWN + step_end + +DragonShrineClairWalkInMovement: + slow_step UP + slow_step UP + slow_step UP + slow_step UP + slow_step UP + step_end + +DragonShrineClairBigStepLeftMovement: + fix_facing + big_step LEFT + step_end + +DragonShrineClairSlowStepLeftMovement: + slow_step LEFT + remove_fixed_facing + step_end + +DragonShrineClairTwoSlowStepsRightMovement: + slow_step RIGHT + slow_step RIGHT + step_end + +DragonShrineClairWalkOutMovement: + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +DragonShrineElderGreetingText: + text "Hm… Good to see" + line "you here." + + para "No need to explain" + line "why you came." + + para "CLAIR sent you" + line "here, didn't she?" + + para "That girl is a" + line "handful…" + + para "I am sorry, but I" + line "must test you." + + para "Not to worry, you" + line "are to answer only" + cont "a few questions." + + para "Ready?" + done + +DragonShrineQuestion1Text: + text "What are #MON" + line "to you?" + done + +DragonShrineQuestion2Text: + text "What helps you to" + line "win battles?" + done + +DragonShrineQuestion3Text: + text "What kind of" + line "trainer do you" + cont "wish to battle?" + done + +DragonShrineQuestion4Text: + text "What is most" + line "important for" + cont "raising #MON?" + done + +DragonShrineQuestion5Text: + text "Strong #MON." + line "Weak #MON." + + para "Which is more" + line "important?" + done + +DragonShrinePassedTestText: + text "Hm… I see…" + + para "You care deeply" + line "for #MON." + + para "Very commendable." + + para "That conviction is" + line "what is important!" + + para ", don't" + line "lose that belief." + + para "It will see you" + line "through at the" + cont "#MON LEAGUE." + done + +DragonShrineMustIInformLanceText: + text "CLAIR!" + + para "This child is" + line "impeccable, in" + cont "skill and spirit!" + + para "Admit defeat and" + line "confer the RISING-" + cont "BADGE!" + + para "…Or must I inform" + line "LANCE of this?" + done + +DragonShrineElderScoldsClairText: + text "CLAIR…" + + para "Reflect upon what" + line "it is that you" + + para "lack and this" + line "child has." + done + +DragonShrineComeAgainText: + text "Come again, if you" + line "so desire." + done + +DragonShrineTakeThisDratiniText: + text "Hm… Good to see" + line "you here." + + para "Your arrival is" + line "most fortunate." + + para "I have something" + line "for you." + + para "Take this DRATINI" + line "as proof that I" + + para "have recognized" + line "your worth." + done + +DragonShrinePlayerReceivedDratiniText: + text " received" + line "DRATINI!" + done + +DragonShrinePartyFullText: + text "Hm? Your #MON" + line "party is full." + done + +DragonShrineSymbolicDragonText: + text "Dragon #MON are" + line "symbolic of our" + cont "clan." + + para "You have shown" + line "that you can be" + + para "entrusted with" + line "one." + done + +DragonShrineClairsGrandfatherText: + text "CLAIR appears to" + line "have learned an" + + para "invaluable lesson" + line "from you." + + para "I thank you as her" + line "grandfather." + done + +DragonShrineRivalIsInTrainingText: + text "A boy close to" + line "your age is in" + cont "training here." + + para "He is much like" + line "CLAIR when she was" + + para "younger. It is a" + line "little worrisome…" + done + +DragonShrineWrongAnswerText1: + text "Hah? I didn't" + line "quite catch that…" + done + +DragonShrineWrongAnswerText2: + text "What was it you" + line "said?" + done + +DragonShrineRightAnswerText: + text "Oh, I understand…" + done + +DragonShrineElder2Text: + text "It's been quite" + line "some time since a" + + para "trainer has gained" + line "our MASTER's rare" + cont "approval." + + para "In fact, not since" + line "Master LANCE." + done + +DragonShrineElder3Text: + text "You know young" + line "Master LANCE?" + + para "He looks so much" + line "like our MASTER" + cont "did in his youth." + + para "It's in their" + line "blood." + done + +DragonShrineClairYouPassedText: + text "So how did it go?" + + para "I guess there's no" + line "point in asking." + + para "You did fail?" + + para "<……><……><……><……><……><……>" + + para "…What? You passed?" + done + +DragonShrineClairThatCantBeText: + text "That can't be!" + done + +DragonShrineClairYoureLyingText: + text "You're lying!" + + para "Even I haven't" + line "been approved!" + done + +DragonShrineIUnderstandText: + text "I-I understand…" + done + +DragonShrineHereRisingBadgeText: + text "Here, this is the" + line "RISINGBADGE…" + + para "Hurry up! Take it!" + done + +DragonShrinePlayerReceivedRisingBadgeText: + text " received" + line "RISINGBADGE." + done + +DragonShrineRisingBadgeExplanationText: + text "RISINGBADGE will" + line "enable your" + + para "#MON to use the" + line "move for climbing" + cont "waterfalls." + + para "Also, all #MON" + line "will recognize you" + + para "as a trainer and" + line "obey your every" + + para "command without" + line "question." + done + +DragonShrineSpeechlessText: + text "<……><……><……><……><……><……>" + done + +DragonShrine_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 9, DRAGONS_DEN_B1F, 2 + warp_event 5, 9, DRAGONS_DEN_B1F, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 1, SPRITE_ELDER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DragonShrineElder1Script, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + object_event 2, 4, SPRITE_ELDER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DragonShrineElder2Script, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + object_event 7, 4, SPRITE_ELDER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DragonShrineElder3Script, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + object_event 4, 8, SPRITE_CLAIR, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_DRAGON_SHRINE_CLAIR diff --git a/maps/DragonShrine.blk b/maps/DragonShrine.blk new file mode 100644 index 0000000..ea79474 --- /dev/null +++ b/maps/DragonShrine.blk @@ -0,0 +1 @@ +"()($&%-%'&%%%'&,%,'*%.%+ \ No newline at end of file diff --git a/maps/DragonsDen1F.asm b/maps/DragonsDen1F.asm new file mode 100644 index 0000000..4e353ca --- /dev/null +++ b/maps/DragonsDen1F.asm @@ -0,0 +1,19 @@ +DragonsDen1F_MapScripts: + def_scene_scripts + + def_callbacks + +DragonsDen1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 5, BLACKTHORN_CITY, 8 + warp_event 3, 3, DRAGONS_DEN_1F, 4 + warp_event 5, 15, DRAGONS_DEN_B1F, 1 + warp_event 5, 13, DRAGONS_DEN_1F, 2 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/DragonsDen1F.blk b/maps/DragonsDen1F.blk new file mode 100644 index 0000000..6af7d24 --- /dev/null +++ b/maps/DragonsDen1F.blk @@ -0,0 +1,5 @@ +  +* +$ #   + +)$ # \ No newline at end of file diff --git a/maps/DragonsDenB1F.asm b/maps/DragonsDenB1F.asm new file mode 100644 index 0000000..a69340d --- /dev/null +++ b/maps/DragonsDenB1F.asm @@ -0,0 +1,432 @@ + object_const_def + const DRAGONSDENB1F_POKE_BALL1 + const DRAGONSDENB1F_CLAIR + const DRAGONSDENB1F_RIVAL + const DRAGONSDENB1F_COOLTRAINER_M + const DRAGONSDENB1F_COOLTRAINER_F + const DRAGONSDENB1F_TWIN1 + const DRAGONSDENB1F_TWIN2 + const DRAGONSDENB1F_POKE_BALL2 + const DRAGONSDENB1F_POKE_BALL3 + +DragonsDenB1F_MapScripts: + def_scene_scripts + scene_script DragonsDenB1FNoop1Scene, SCENE_DRAGONSDENB1F_NOOP + scene_script DragonsDenB1FNoop2Scene, SCENE_DRAGONSDENB1F_CLAIR_GIVES_TM + + def_callbacks + callback MAPCALLBACK_NEWMAP, DragonsDenB1FCheckRivalCallback + +DragonsDenB1FNoop1Scene: + end + +DragonsDenB1FNoop2Scene: + end + +DragonsDenB1FCheckRivalCallback: + checkevent EVENT_BEAT_RIVAL_IN_MT_MOON + iftrue .CheckDay + disappear DRAGONSDENB1F_RIVAL + endcallback + +.CheckDay: + readvar VAR_WEEKDAY + ifequal TUESDAY, .AppearRival + ifequal THURSDAY, .AppearRival + disappear DRAGONSDENB1F_RIVAL + endcallback + +.AppearRival: + appear DRAGONSDENB1F_RIVAL + endcallback + +DragonsDenB1F_ClairScene: +; BUG: Clair can give TM24 Dragonbreath twice (see docs/bugs_and_glitches.md) + appear DRAGONSDENB1F_CLAIR + opentext + writetext ClairText_Wait + pause 30 + closetext + showemote EMOTE_SHOCK, PLAYER, 15 + turnobject PLAYER, LEFT + playmusic MUSIC_CLAIR + applymovement DRAGONSDENB1F_CLAIR, MovementDragonsDen_ClairWalksToYou + opentext + writetext ClairText_GiveDragonbreathDragonDen + promptbutton + giveitem TM_DRAGONBREATH + iffalse .BagFull + getitemname STRING_BUFFER_3, TM_DRAGONBREATH + writetext Text_ReceivedTM24 + playsound SFX_ITEM + waitsfx + itemnotify + setevent EVENT_GOT_TM24_DRAGONBREATH + writetext ClairText_DescribeDragonbreathDragonDen + promptbutton + writetext ClairText_WhatsTheMatterDragonDen + waitbutton + closetext + sjump .FinishClair + +.BagFull: + writetext ClairText_NoRoom + waitbutton + closetext +.FinishClair: + applymovement DRAGONSDENB1F_CLAIR, MovementDragonsDen_ClairWalksAway + special FadeOutMusic + pause 30 + special RestartMapMusic + disappear DRAGONSDENB1F_CLAIR + setscene SCENE_DRAGONSDENB1F_NOOP + end + +TrainerCooltrainermDarin: + trainer COOLTRAINERM, DARIN, EVENT_BEAT_COOLTRAINERM_DARIN, CooltrainermDarinSeenText, CooltrainermDarinBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainermDarinAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainerfCara: + trainer COOLTRAINERF, CARA, EVENT_BEAT_COOLTRAINERF_CARA, CooltrainerfCaraSeenText, CooltrainerfCaraBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainerfCaraAfterBattleText + waitbutton + closetext + end + +TrainerTwinsLeaandpia1: + trainer TWINS, LEAANDPIA1, EVENT_BEAT_TWINS_LEA_AND_PIA, TwinsLeaandpia1SeenText, TwinsLeaandpia1BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext TwinsLeaandpia1AfterBattleText + waitbutton + closetext + end + +TrainerTwinsLeaandpia2: + trainer TWINS, LEAANDPIA1, EVENT_BEAT_TWINS_LEA_AND_PIA, TwinsLeaandpia2SeenText, TwinsLeaandpia2BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext TwinsLeaandpia2AfterBattleText + waitbutton + closetext + end + +DragonsDenB1FDragonFangScript: +; This whole script is written out rather than as an itemball +; because it's left over from the GS event. + giveitem DRAGON_FANG + iffalse .BagFull + disappear DRAGONSDENB1F_POKE_BALL1 + opentext + getitemname STRING_BUFFER_3, DRAGON_FANG + writetext Text_FoundDragonFang + playsound SFX_ITEM + waitsfx + itemnotify + closetext + end + +.BagFull: + opentext + getitemname STRING_BUFFER_3, DRAGON_FANG + writetext Text_FoundDragonFang + promptbutton + writetext Text_NoRoomForDragonFang + waitbutton + closetext + end + +DragonsDenB1FRivalScript: + playmusic MUSIC_RIVAL_ENCOUNTER + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue .RivalTalkAgain + writetext RivalText_Training1 + waitbutton + closetext + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + special RestartMapMusic + end + +.RivalTalkAgain: + writetext RivalText_Training2 + waitbutton + closetext + special RestartMapMusic + end + +DragonShrineSignpost: + jumptext DragonShrineSignpostText + +DragonsDenB1FCalcium: + itemball CALCIUM + +DragonsDenB1FMaxElixer: + itemball MAX_ELIXER + +DragonsDenB1FHiddenRevive: + hiddenitem REVIVE, EVENT_DRAGONS_DEN_B1F_HIDDEN_REVIVE + +DragonsDenB1FHiddenMaxPotion: + hiddenitem MAX_POTION, EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_POTION + +DragonsDenB1FHiddenMaxElixer: + hiddenitem MAX_ELIXER, EVENT_DRAGONS_DEN_B1F_HIDDEN_MAX_ELIXER + +MovementDragonsDen_ClairWalksToYou: + slow_step RIGHT + slow_step RIGHT + slow_step RIGHT + slow_step RIGHT + step_end + +MovementDragonsDen_ClairWalksAway: + slow_step LEFT + slow_step LEFT + slow_step LEFT + slow_step LEFT + step_end + +ClairText_Wait: + text "Wait!" + done + +ClairText_GiveDragonbreathDragonDen: + text "CLAIR: I'm sorry" + line "about this." + + para "Here, take this as" + line "my apology." + done + +Text_ReceivedTM24: + text " received" + line "TM24." + done + +ClairText_DescribeDragonbreathDragonDen: + text "That contains" + line "DRAGONBREATH." + + para "No, it doesn't" + line "have anything to" + cont "do with my breath." + + para "If you don't want" + line "it, you don't have" + cont "to take it." + done + +ClairText_NoRoom: + text "Oh? You don't have" + line "any room for this." + + para "I'm going back to" + line "the GYM, so make" + + para "room, then come" + line "see me there." + done + +ClairText_WhatsTheMatterDragonDen: + text "CLAIR: What's the" + line "matter? Aren't you" + + para "going on to the" + line "#MON LEAGUE?" + + para "Do you know how to" + line "get there?" + + para "From here, go to" + line "NEW BARK TOWN." + + para "Then SURF east to" + line "#MON LEAGUE." + + para "The route there is" + line "very tough." + + para "Don't you dare" + line "lose at the #-" + cont "MON LEAGUE!" + + para "If you do, I'll" + line "feel even worse" + + para "about having lost" + line "to you!" + + para "Give it everything" + line "you've got." + done + +DragonShrineSignpostText: + text "DRAGON SHRINE" + + para "A shrine honoring" + line "the dragon #MON" + + para "said to have lived" + line "in DRAGON'S DEN." + done + +RivalText_Training1: + text "…" + line "What? ?" + + para "…No, I won't" + line "battle you now…" + + para "My #MON aren't" + line "ready to beat you." + + para "I can't push them" + line "too hard now." + + para "I have to be dis-" + line "ciplined to become" + + para "the greatest #-" + line "MON trainer…" + done + +RivalText_Training2: + text "…" + + para "Whew…" + + para "Learn to stay out" + line "of my way…" + done + +CooltrainermDarinSeenText: + text "You! How dare you" + line "enter uninvited!" + done + +CooltrainermDarinBeatenText: + text "S-strong!" + done + +CooltrainermDarinAfterBattleText: + text "The SHRINE ahead" + line "is home to the" + + para "MASTER of our" + line "dragon-user clan." + + para "You're not allowed" + line "to just go in!" + done + +CooltrainerfCaraSeenText: + text "You shouldn't be" + line "in here!" + done + +CooltrainerfCaraBeatenText: + text "Oh yikes, I lost!" + done + +CooltrainerfCaraAfterBattleText: + text "Soon I'm going to" + line "get permission" + + para "from our MASTER to" + line "use dragons." + + para "When I do, I'm" + line "going to become an" + + para "admirable dragon" + line "trainer and gain" + + para "our MASTER's" + line "approval." + done + +TwinsLeaandpia1SeenText: + text "It's a stranger we" + line "don't know." + done + +TwinsLeaandpia1BeatenText: + text "Ouchies." + done + +TwinsLeaandpia1AfterBattleText: + text "It was like having" + line "to battle LANCE." + done + +TwinsLeaandpia2SeenText: + text "Who are you?" + done + +TwinsLeaandpia2BeatenText: + text "Meanie." + done + +TwinsLeaandpia2AfterBattleText: + text "We'll tell on you." + + para "MASTER will be" + line "angry with you." + done + +Text_FoundDragonFang: + text " found" + line "@" + text_ram wStringBuffer3 + text "!" + done + +Text_NoRoomForDragonFang: + text "But can't" + line "carry any more" + cont "items." + done + +DragonsDenB1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 20, 3, DRAGONS_DEN_1F, 3 + warp_event 19, 29, DRAGON_SHRINE, 1 + + def_coord_events + coord_event 19, 30, SCENE_DRAGONSDENB1F_CLAIR_GIVES_TM, DragonsDenB1F_ClairScene + + def_bg_events + bg_event 18, 24, BGEVENT_READ, DragonShrineSignpost + bg_event 33, 29, BGEVENT_ITEM, DragonsDenB1FHiddenRevive + bg_event 21, 17, BGEVENT_ITEM, DragonsDenB1FHiddenMaxPotion + bg_event 31, 15, BGEVENT_ITEM, DragonsDenB1FHiddenMaxElixer + + def_object_events + object_event 35, 16, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DragonsDenB1FDragonFangScript, EVENT_DRAGONS_DEN_B1F_DRAGON_FANG + object_event 14, 30, SPRITE_CLAIR, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_DRAGONS_DEN_CLAIR + object_event 20, 23, SPRITE_RIVAL, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DragonsDenB1FRivalScript, EVENT_RIVAL_DRAGONS_DEN + object_event 20, 8, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerCooltrainermDarin, -1 + object_event 8, 8, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfCara, -1 + object_event 4, 17, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsLeaandpia1, -1 + object_event 4, 18, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsLeaandpia2, -1 + object_event 30, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DragonsDenB1FCalcium, EVENT_DRAGONS_DEN_B1F_CALCIUM + object_event 5, 20, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, DragonsDenB1FMaxElixer, EVENT_DRAGONS_DEN_B1F_MAX_ELIXER diff --git a/maps/DragonsDenB1F.blk b/maps/DragonsDenB1F.blk new file mode 100644 index 0000000..19a35f6 --- /dev/null +++ b/maps/DragonsDenB1F.blk @@ -0,0 +1,16 @@ +qomqorrrrrrrrrrrrnqqrmormorrrrsrrrrrnhqqqomqomhlnqqiqomTUDFTvvv +hqhqqiqiTvyYDFX555jqqhqomomX55zvvy555hqqlniqiX561 +55555lnqqhiomTvy565555555 +lrnhiiX561155 +55554YhhiiX565555555554Yhhii + +555555561 + +hhiqpk5699@B9:55 +vhhqpki55 +5DEF555555hhkqii55 + +D,-F55555jqhqkiqk55 +H./J5Yhjqqiiqqk55jpppqhqqiqpki + +jppppqqjppqqqiqqqpppppkqqjpqqjpp \ No newline at end of file diff --git a/maps/EarlsPokemonAcademy.asm b/maps/EarlsPokemonAcademy.asm new file mode 100644 index 0000000..07decf5 --- /dev/null +++ b/maps/EarlsPokemonAcademy.asm @@ -0,0 +1,431 @@ + object_const_def + const EARLSPOKEMONACADEMY_EARL + const EARLSPOKEMONACADEMY_YOUNGSTER1 + const EARLSPOKEMONACADEMY_GAMEBOY_KID1 + const EARLSPOKEMONACADEMY_GAMEBOY_KID2 + const EARLSPOKEMONACADEMY_YOUNGSTER2 + const EARLSPOKEMONACADEMY_POKEDEX + +EarlsPokemonAcademy_MapScripts: + def_scene_scripts + + def_callbacks + +AcademyEarl: + applymovement EARLSPOKEMONACADEMY_EARL, AcademyEarlSpinMovement + faceplayer + opentext + writetext AcademyEarlIntroText + yesorno + iffalse .Part1 + writetext AcademyEarlTeachHowToWinText + yesorno + iffalse .Done +.Part1: + writetext AcademyEarlTeachMoreText + yesorno + iffalse .Done + writetext AcademyEarlTeachHowToRaiseWellText + waitbutton + closetext + end + +.Done: + writetext AcademyEarlNoMoreToTeachText + waitbutton + closetext + end + +EarlsPokemonAcademyYoungster1Script: + jumptextfaceplayer EarlsPokemonAcademyYoungster1Text + +EarlsPokemonAcademyGameboyKid1Script: + faceplayer + opentext + writetext EarlsPokemonAcademyGameboyKid1Text + waitbutton + closetext + turnobject EARLSPOKEMONACADEMY_GAMEBOY_KID1, DOWN + end + +EarlsPokemonAcademyGameboyKid2Script: + faceplayer + opentext + writetext EarlsPokemonAcademyGameboyKid2Text + waitbutton + closetext + turnobject EARLSPOKEMONACADEMY_GAMEBOY_KID2, DOWN + end + +EarlsPokemonAcademyYoungster2Script: + jumptextfaceplayer EarlsPokemonAcademyYoungster2Text + +AcademyBlackboard: + opentext + writetext AcademyBlackboardText +.Loop: + loadmenu .BlackboardMenuHeader + _2dmenu + closewindow + ifequal 1, .Poison + ifequal 2, .Paralysis + ifequal 3, .Sleep + ifequal 4, .Burn + ifequal 5, .Freeze + closetext + end + +.Poison: + writetext AcademyPoisonText + waitbutton + sjump .Loop + +.Paralysis: + writetext AcademyParalysisText + waitbutton + sjump .Loop + +.Sleep: + writetext AcademySleepText + waitbutton + sjump .Loop + +.Burn: + writetext AcademyBurnText + waitbutton + sjump .Loop + +.Freeze: + writetext AcademyFreezeText + waitbutton + sjump .Loop + +.BlackboardMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 11, 8 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + dn 3, 2 ; rows, columns + db 5 ; spacing + dba .Text + dbw BANK(@), NULL + +.Text: + db "PSN@" + db "PAR@" + db "SLP@" + db "BRN@" + db "FRZ@" + db "QUIT@" + +AcademyNotebook: + opentext + writetext AcademyNotebookText + yesorno + iffalse .Done + writetext AcademyNotebookText1 + yesorno + iffalse .Done + writetext AcademyNotebookText2 + yesorno + iffalse .Done + writetext AcademyNotebookText3 + waitbutton +.Done: + closetext + end + +AcademyStickerMachine: ; unreferenced + jumptext AcademyStickerMachineText + +AcademyBookshelf: + jumpstd DifficultBookshelfScript + +AcademyEarlSpinMovement: + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + step_end + +AcademyEarlIntroText: + text "EARL, I am!" + + para "Wonderful are" + line "#MON, yes!" + + para "Teach you I will" + line "to be a better" + cont "trainer!" + + para "What you want to" + line "know? Want to be" + cont "a winner is you?" + done + +AcademyEarlTeachHowToWinText: + text "Good! Teach you," + line "I will!" + + para "In battle, #MON" + line "top on list jump" + cont "out first!" + + para "Change order in" + line "list, make battle" + cont "easy, maybe!" + + para "More from me you" + line "want to hear?" + done + +AcademyEarlTeachMoreText: + text "So, want to know" + line "how to raise" + cont "#MON well?" + done + +AcademyEarlTeachHowToRaiseWellText: + text "Fine! Teach you," + line "I will!" + + para "If #MON come" + line "out in battle even" + + para "briefly, some EXP." + line "Points it gets." + + para "At top of list put" + line "weak #MON." + + para "Switch in battle" + line "quick!" + + para "This way, weak" + line "#MON strong" + cont "become!" + done + +AcademyEarlNoMoreToTeachText: + text "Oh! Smart student" + line "you are! Nothing" + cont "more do I teach!" + + para "Good to #MON" + line "you must be!" + done + +EarlsPokemonAcademyYoungster1Text: + text "I'm taking notes" + line "of the teacher's" + cont "lecture." + + para "I'd better copy" + line "the stuff on the" + cont "blackboard too." + done + +EarlsPokemonAcademyGameboyKid1Text: + text "I traded my best" + line "#MON to the" + cont "guy beside me." + done + +EarlsPokemonAcademyGameboyKid2Text: + text "Huh? The #MON I" + line "just got is hold-" + cont "ing something!" + done + +EarlsPokemonAcademyYoungster2Text: + text "A #MON holding" + line "a BERRY will heal" + cont "itself in battle." + + para "Many other items" + line "can be held by" + cont "#MON…" + + para "It sure is tough" + line "taking notes…" + done + +AcademyBlackboardText: + text "The blackboard" + line "describes #MON" + + para "status changes in" + line "battle." + done + +AcademyBlackboardText2: ; unreferenced + text "Read which topic?" + done + +AcademyPoisonText: + text "If poisoned, a" + line "#MON steadily" + cont "loses HP." + + para "Poison lingers" + line "after the battle," + + para "and HP is lost as" + line "you walk." + + para "To cure it, use an" + line "ANTIDOTE." + done + +AcademyParalysisText: + text "Paralysis reduces" + line "speed and may" + cont "prevent movement." + + para "It remains after" + line "battle, so use" + cont "a PARLYZ HEAL." + done + +AcademySleepText: + text "If asleep, your" + line "#MON can't make" + cont "a move." + + para "A sleeping #MON" + line "doesn't wake up" + cont "after battle." + + para "Wake it up with" + line "an AWAKENING." + done + +AcademyBurnText: + text "A burn steadily" + line "consumes HP." + + para "It also reduces" + line "attack power." + + para "A burn lingers" + line "after battle." + + para "Use a BURN HEAL as" + line "the cure." + done + +AcademyFreezeText: + text "If your #MON is" + line "frozen, it can't" + cont "do a thing." + + para "It remains frozen" + line "after battle." + + para "Thaw it out with" + line "an ICE HEAL." + done + +AcademyNotebookText: + text "It's this kid's" + line "notebook…" + + para "Catch #MON" + line "using # BALLS." + + para "Up to six can be" + line "in your party." + + para "Keep reading?" + done + +AcademyNotebookText1: + text "Before throwing a" + line "# BALL, weaken" + cont "the target first." + + para "A poisoned or" + line "burned #MON is" + cont "easier to catch." + + para "Keep reading?" + done + +AcademyNotebookText2: + text "Some moves may" + line "cause confusion." + + para "Confusion may make" + line "a #MON attack" + cont "itself." + + para "Leaving battle" + line "clears up any" + cont "confusion." + + para "Keep reading?" + done + +AcademyNotebookText3: + text "People who catch" + line "and use #MON" + + para "in battle are" + line "#MON trainers." + + para "They are expected" + line "to visit #MON" + + para "GYMS and defeat" + line "other trainers." + + para "The next page" + line "is… Blank!" + + para "Boy: E-he-he…" + + para "I haven't written" + line "anymore…" + done + +AcademyStickerMachineText: + text "This super machine" + line "prints data out as" + + para "stickers!" + done + +EarlsPokemonAcademy_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 15, VIOLET_CITY, 3 + warp_event 4, 15, VIOLET_CITY, 3 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, AcademyBookshelf + bg_event 1, 1, BGEVENT_READ, AcademyBookshelf + bg_event 3, 0, BGEVENT_READ, AcademyBlackboard + bg_event 4, 0, BGEVENT_READ, AcademyBlackboard + + def_object_events + object_event 4, 2, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, AcademyEarl, EVENT_EARLS_ACADEMY_EARL + object_event 2, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, EarlsPokemonAcademyYoungster1Script, -1 + object_event 3, 11, SPRITE_GAMEBOY_KID, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EarlsPokemonAcademyGameboyKid1Script, -1 + object_event 4, 11, SPRITE_GAMEBOY_KID, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, EarlsPokemonAcademyGameboyKid2Script, -1 + object_event 4, 7, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EarlsPokemonAcademyYoungster2Script, -1 + object_event 2, 4, SPRITE_POKEDEX, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, AcademyNotebook, -1 diff --git a/maps/EarlsPokemonAcademy.blk b/maps/EarlsPokemonAcademy.blk new file mode 100644 index 0000000..391c13d --- /dev/null +++ b/maps/EarlsPokemonAcademy.blk @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/maps/EastWestGate.blk b/maps/EastWestGate.blk new file mode 100644 index 0000000..9a2cb75 --- /dev/null +++ b/maps/EastWestGate.blk @@ -0,0 +1 @@ +99 ?#$> \ No newline at end of file diff --git a/maps/EcruteakCity.asm b/maps/EcruteakCity.asm new file mode 100644 index 0000000..425b9ff --- /dev/null +++ b/maps/EcruteakCity.asm @@ -0,0 +1,298 @@ + object_const_def + const ECRUTEAKCITY_GRAMPS1 + const ECRUTEAKCITY_GRAMPS2 + const ECRUTEAKCITY_LASS1 + const ECRUTEAKCITY_LASS2 + const ECRUTEAKCITY_FISHER + const ECRUTEAKCITY_YOUNGSTER + const ECRUTEAKCITY_GRAMPS3 + +EcruteakCity_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, EcruteakCityFlypointCallback + +EcruteakCityFlypointCallback: + setflag ENGINE_FLYPOINT_ECRUTEAK + endcallback + +EcruteakCityGramps1Script: + jumptextfaceplayer EcruteakCityGramps1Text + +EcruteakCityGramps2Script: + jumptextfaceplayer EcruteakCityGramps2Text + +EcruteakCityGramps3Script: + jumptextfaceplayer EcruteakCityGramps3Text + +EcruteakCityLass1Script: + jumptextfaceplayer EcruteakCityLass1Text + +EcruteakCityLass2Script: + faceplayer + opentext + checkevent EVENT_RELEASED_THE_BEASTS + iftrue .ReleasedBeasts + writetext EcruteakCityLass2Text + waitbutton + closetext + end + +.ReleasedBeasts: + writetext EcruteakCityLass2Text_ReleasedBeasts + waitbutton + closetext + end + +EcruteakCityFisherScript: + faceplayer + opentext + checkevent EVENT_JASMINE_RETURNED_TO_GYM + iftrue .JasmineReturned + writetext EcruteakCityFisherText + waitbutton + closetext + end + +.JasmineReturned: + writetext EcruteakCityFisherText_JasmineReturned + waitbutton + closetext + end + +EcruteakCityYoungsterScript: + jumptextfaceplayer EcruteakCityYoungsterText + +EcruteakCitySign: + jumptext EcruteakCitySignText + +TinTowerSign: + jumptext TinTowerSignText + +EcruteakGymSign: + jumptext EcruteakGymSignText + +EcruteakDanceTheaterSign: + jumptext EcruteakDanceTheaterSignText + +BurnedTowerSign: + jumptext BurnedTowerSignText + +EcruteakCityPokecenterSign: + jumpstd PokecenterSignScript + +EcruteakCityMartSign: + jumpstd MartSignScript + +EcruteakCityHiddenHyperPotion: + hiddenitem HYPER_POTION, EVENT_ECRUTEAK_CITY_HIDDEN_HYPER_POTION + +UnusedMissingDaughterText: ; unreferenced + text "Oh, no. Oh, no…" + + para "My daughter is" + line "missing." + + para "No… She couldn't" + line "have gone to the" + cont "BURNED TOWER." + + para "I told her not to" + line "go near it…" + + para "People seem to" + line "disappear there…" + + para "Oh, what should I" + line "do…?" + done + +EcruteakCityGramps1Text: + text "ECRUTEAK used to" + line "have two towers:" + + para "one each in the" + line "east and west." + done + +EcruteakCityGramps2Text: + text "Ah, child." + line "Have you learned" + + para "to dance like the" + line "KIMONO GIRLS?" + + para "If you go to their" + line "DANCE THEATER, an" + + para "odd old man will" + line "give you something" + cont "nice, I hear." + done + +EcruteakCityLass1Text: + text "I'm going to prac-" + line "tice at the DANCE" + + para "THEATER. Care to" + line "join me?" + done + +EcruteakCityLass2Text: + text "The tower that" + line "used to be here…" + + para "My grandma told me" + line "it used to be much" + cont "taller." + done + +EcruteakCityLass2Text_ReleasedBeasts: + text "Three big #MON" + line "ran off in differ-" + cont "ent directions." + cont "What were they?" + done + +EcruteakCityFisherText: + text "I heard a rumor" + line "about OLIVINE" + cont "LIGHTHOUSE." + + para "The #MON that" + line "serves as the" + + para "beacon fell ill." + line "Sounds like they" + cont "are in trouble." + done + +EcruteakCityFisherText_JasmineReturned: + text "The #MON at" + line "OLIVINE LIGHTHOUSE" + cont "has been cured." + + para "Boats can safely" + line "sail out to sea at" + cont "night again." + done + +EcruteakCityYoungsterText: + text "I hear #MON are" + line "rampaging at the" + + para "LAKE OF RAGE. I'd" + line "like to see that." + done + +EcruteakCityGramps3Text: + text "In the distant" + line "past…" + + para "This tower burned" + line "in a fire. Three" + + para "nameless #MON" + line "perished in it." + + para "A rainbow-colored" + line "#MON descended" + + para "from the sky and" + line "resurrected them…" + + para "It's a legend that" + line "has been passed" + + para "down by ECRUTEAK" + line "GYM LEADERS." + + para "Me?" + + para "I was a trainer" + line "way back when." + cont "Hohoho!" + done + +EcruteakCitySignText: + text "ECRUTEAK CITY" + line "A Historical City" + + para "Where the Past" + line "Meets the Present" + done + +TinTowerSignText: + text "TIN TOWER" + + para "A legendary #-" + line "MON is said to" + cont "roost here." + done + +EcruteakGymSignText: + text "ECRUTEAK CITY" + line "#MON GYM" + cont "LEADER: MORTY" + + para "The Mystic Seer of" + line "the Future" + done + +EcruteakDanceTheaterSignText: + text "ECRUTEAK DANCE" + line "THEATER" + done + +BurnedTowerSignText: + text "BURNED TOWER" + + para "It was destroyed" + line "by a mysterious" + cont "fire." + + para "Please stay away," + line "as it is unsafe." + done + +EcruteakCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 35, 26, ROUTE_42_ECRUTEAK_GATE, 1 + warp_event 35, 27, ROUTE_42_ECRUTEAK_GATE, 2 + warp_event 18, 11, ECRUTEAK_TIN_TOWER_ENTRANCE, 1 + warp_event 20, 2, WISE_TRIOS_ROOM, 1 + warp_event 20, 3, WISE_TRIOS_ROOM, 2 + warp_event 23, 27, ECRUTEAK_POKECENTER_1F, 1 + warp_event 5, 21, ECRUTEAK_LUGIA_SPEECH_HOUSE, 1 + warp_event 23, 21, DANCE_THEATER, 1 + warp_event 29, 21, ECRUTEAK_MART, 2 + warp_event 6, 27, ECRUTEAK_GYM, 1 + warp_event 13, 27, ECRUTEAK_ITEMFINDER_HOUSE, 1 + warp_event 37, 7, TIN_TOWER_1F, 1 + warp_event 5, 5, BURNED_TOWER_1F, 1 + warp_event 0, 18, ROUTE_38_ECRUTEAK_GATE, 3 + warp_event 0, 19, ROUTE_38_ECRUTEAK_GATE, 4 + + def_coord_events + + def_bg_events + bg_event 15, 21, BGEVENT_READ, EcruteakCitySign + bg_event 38, 10, BGEVENT_READ, TinTowerSign + bg_event 8, 28, BGEVENT_READ, EcruteakGymSign + bg_event 21, 21, BGEVENT_READ, EcruteakDanceTheaterSign + bg_event 2, 10, BGEVENT_READ, BurnedTowerSign + bg_event 24, 27, BGEVENT_READ, EcruteakCityPokecenterSign + bg_event 30, 21, BGEVENT_READ, EcruteakCityMartSign + bg_event 23, 14, BGEVENT_ITEM, EcruteakCityHiddenHyperPotion + + def_object_events + object_event 18, 15, SPRITE_GRAMPS, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakCityGramps1Script, -1 + object_event 20, 21, SPRITE_GRAMPS, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakCityGramps2Script, -1 + object_event 21, 29, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, EcruteakCityLass1Script, -1 + object_event 3, 9, SPRITE_LASS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakCityLass2Script, -1 + object_event 9, 22, SPRITE_FISHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, EcruteakCityFisherScript, -1 + object_event 10, 14, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, EcruteakCityYoungsterScript, -1 + object_event 3, 7, SPRITE_GRAMPS, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, EcruteakCityGramps3Script, EVENT_ECRUTEAK_CITY_GRAMPS diff --git a/maps/EcruteakCity.blk b/maps/EcruteakCity.blk new file mode 100644 index 0000000..b903a4b --- /dev/null +++ b/maps/EcruteakCity.blk @@ -0,0 +1,8 @@ + +jppkB,-$% +l !nk&/ $%D +7;lm$% +tu +()AA,-,*-tuEVVQ&/&'/ +ETvU,-,-XY +&/&/ ,-GG./,-,- ./&/E`b`b`b \ No newline at end of file diff --git a/maps/EcruteakGym.asm b/maps/EcruteakGym.asm new file mode 100644 index 0000000..56f3d46 --- /dev/null +++ b/maps/EcruteakGym.asm @@ -0,0 +1,438 @@ + object_const_def + const ECRUTEAKGYM_MORTY + const ECRUTEAKGYM_SAGE1 + const ECRUTEAKGYM_SAGE2 + const ECRUTEAKGYM_GRANNY1 + const ECRUTEAKGYM_GRANNY2 + const ECRUTEAKGYM_GYM_GUIDE + const ECRUTEAKGYM_GRAMPS + +EcruteakGym_MapScripts: + def_scene_scripts + scene_script EcruteakGymForcedToLeaveScene, SCENE_ECRUTEAKGYM_FORCED_TO_LEAVE + scene_script EcruteakGymNoopScene, SCENE_ECRUTEAKGYM_NOOP + + def_callbacks + +EcruteakGymForcedToLeaveScene: + sdefer EcruteakGymClosed + end + +EcruteakGymNoopScene: + end + +EcruteakGymMortyScript: + faceplayer + opentext + checkevent EVENT_BEAT_MORTY + iftrue .FightDone + writetext MortyIntroText + waitbutton + closetext + winlosstext MortyWinLossText, 0 + loadtrainer MORTY, MORTY1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_MORTY + opentext + writetext Text_ReceivedFogBadge + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_FOGBADGE + readvar VAR_BADGES + scall EcruteakGymActivateRockets + setmapscene ECRUTEAK_TIN_TOWER_ENTRANCE, SCENE_ECRUTEAKTINTOWERENTRANCE_NOOP + setevent EVENT_RANG_CLEAR_BELL_1 + setevent EVENT_RANG_CLEAR_BELL_2 +.FightDone: + checkevent EVENT_GOT_TM30_SHADOW_BALL + iftrue .GotShadowBall + setevent EVENT_BEAT_SAGE_JEFFREY + setevent EVENT_BEAT_SAGE_PING + setevent EVENT_BEAT_MEDIUM_MARTHA + setevent EVENT_BEAT_MEDIUM_GRACE + writetext MortyText_FogBadgeSpeech + promptbutton + verbosegiveitem TM_SHADOW_BALL + iffalse .NoRoomForShadowBall + setevent EVENT_GOT_TM30_SHADOW_BALL + writetext MortyText_ShadowBallSpeech + waitbutton + closetext + end + +.GotShadowBall: + writetext MortyFightDoneText + waitbutton +.NoRoomForShadowBall: + closetext + end + +EcruteakGymActivateRockets: + ifequal 7, .RadioTowerRockets + ifequal 6, .GoldenrodRockets + end + +.GoldenrodRockets: + jumpstd GoldenrodRocketsScript + +.RadioTowerRockets: + jumpstd RadioTowerRocketsScript + +EcruteakGymClosed: + applymovement PLAYER, EcruteakGymPlayerStepUpMovement + applymovement ECRUTEAKGYM_GRAMPS, EcruteakGymGrampsSlowStepDownMovement + opentext + writetext EcruteakGymClosedText + waitbutton + closetext + follow PLAYER, ECRUTEAKGYM_GRAMPS + applymovement PLAYER, EcruteakGymPlayerSlowStepDownMovement + stopfollow + special FadeOutPalettes + playsound SFX_ENTER_DOOR + waitsfx + warp ECRUTEAK_CITY, 6, 27 + end + +TrainerSageJeffrey: + trainer SAGE, JEFFREY, EVENT_BEAT_SAGE_JEFFREY, SageJeffreySeenText, SageJeffreyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SageJeffreyAfterBattleText + waitbutton + closetext + end + +TrainerSagePing: + trainer SAGE, PING, EVENT_BEAT_SAGE_PING, SagePingSeenText, SagePingBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SagePingAfterBattleText + waitbutton + closetext + end + +TrainerMediumMartha: + trainer MEDIUM, MARTHA, EVENT_BEAT_MEDIUM_MARTHA, MediumMarthaSeenText, MediumMarthaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext MediumMarthaAfterBattleText + waitbutton + closetext + end + +TrainerMediumGrace: + trainer MEDIUM, GRACE, EVENT_BEAT_MEDIUM_GRACE, MediumGraceSeenText, MediumGraceBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext MediumGraceAfterBattleText + waitbutton + closetext + end + +EcruteakGymGuideScript: + faceplayer + opentext + checkevent EVENT_BEAT_MORTY + iftrue .EcruteakGymGuideWinScript + writetext EcruteakGymGuideText + waitbutton + closetext + end + +.EcruteakGymGuideWinScript: + writetext EcruteakGymGuideWinText + waitbutton + closetext + end + +EcruteakGymStatue: + checkflag ENGINE_FOGBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, MORTY, MORTY1 + jumpstd GymStatue2Script + +EcruteakGymPlayerStepUpMovement: + step UP + step_end + +EcruteakGymPlayerSlowStepDownMovement: + fix_facing + slow_step DOWN + remove_fixed_facing + step_end + +EcruteakGymGrampsSlowStepDownMovement: + slow_step DOWN + step_end + +MortyIntroText: + text "Good of you to" + line "have come." + + para "Here in ECRUTEAK," + line "#MON have been" + cont "revered." + + para "It's said that a" + line "rainbow-colored" + + para "#MON will come" + line "down to appear" + + para "before a truly" + line "powerful trainer." + + para "I believed that" + line "tale, so I have" + + para "secretly trained" + line "here all my life." + + para "As a result, I can" + line "now see what" + cont "others cannot." + + para "Just a bit more…" + + para "With a little" + line "more, I could see" + + para "a future in which" + line "I meet the #MON" + cont "of rainbow colors." + + para "You're going to" + line "help me reach that" + cont "level!" + done + +MortyWinLossText: + text "I'm not good" + line "enough yet…" + + para "All right. This" + line "BADGE is yours." + done + +Text_ReceivedFogBadge: + text " received" + line "FOGBADGE." + done + +MortyText_FogBadgeSpeech: + text "By having FOG-" + line "BADGE, #MON up" + + para "to L50 will obey" + line "you." + + para "Also, #MON that" + line "know SURF will be" + + para "able to use that" + line "move anytime." + + para "I want you to have" + line "this too." + done + +MortyText_ShadowBallSpeech: + text "It's SHADOW BALL." + line "It causes damage" + + para "and may reduce" + line "SPCL.DEF." + + para "Use it if it" + line "appeals to you." + done + +MortyFightDoneText: + text "I see…" + + para "Your journey has" + line "taken you to far-" + cont "away places." + + para "And you have wit-" + line "nessed much more" + cont "than I." + + para "I envy you for" + line "that…" + done + +SageJeffreySeenText: + text "I spent the spring" + line "with my #MON." + + para "Then summer, fall" + line "and winter…" + + para "Then spring came" + line "again. We have" + + para "lived together" + line "for a long time." + done + +SageJeffreyBeatenText: + text "Wins and losses, I" + line "experienced both." + done + +SageJeffreyAfterBattleText: + text "Where did #MON" + line "come from?" + done + +SagePingSeenText: + text "Can you inflict" + line "any damage on our" + cont "#MON?" + done + +SagePingBeatenText: + text "Ah! Well done!" + done + +SagePingAfterBattleText: + text "We use only ghost-" + line "type #MON." + + para "No normal-type" + line "attack can harm" + cont "them!" + done + +MediumMarthaSeenText: + text "I shall win!" + done + +MediumMarthaBeatenText: + text "I, I, I lost!" + done + +MediumMarthaAfterBattleText: + text "The one who wants" + line "to win most--will!" + done + +MediumGraceSeenText: + text "Stumped by our in-" + line "visible floor?" + + para "Defeat me if you" + line "want a hint!" + done + +MediumGraceBeatenText: + text "Wha-what?" + done + +MediumGraceAfterBattleText: + text "Fine. I shall tell" + line "you the secret of" + + para "the invisible" + line "floor." + + para "The path is right" + line "before our eyes!" + done + +EcruteakGymGuideText: + text "The trainers here" + line "have secret mo-" + cont "tives." + + para "If you win, they" + line "may tell you some" + + para "deep secrets about" + line "ECRUTEAK." + done + +EcruteakGymGuideWinText: + text "Whew, ." + line "You did great!" + + para "I was cowering in" + line "the corner out of" + cont "pure terror!" + done + +EcruteakGymClosedText: + text "MORTY, the GYM" + line "LEADER, is absent." + + para "Sorry, but you'll" + line "have to leave." + + para "Hohohoho." + done + +EcruteakGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 17, ECRUTEAK_CITY, 10 + warp_event 5, 17, ECRUTEAK_CITY, 10 + warp_event 4, 14, ECRUTEAK_GYM, 4 + warp_event 2, 4, ECRUTEAK_GYM, 3 + warp_event 3, 4, ECRUTEAK_GYM, 3 + warp_event 4, 4, ECRUTEAK_GYM, 3 + warp_event 4, 5, ECRUTEAK_GYM, 3 + warp_event 6, 7, ECRUTEAK_GYM, 3 + warp_event 7, 4, ECRUTEAK_GYM, 3 + warp_event 2, 6, ECRUTEAK_GYM, 3 + warp_event 3, 6, ECRUTEAK_GYM, 3 + warp_event 4, 6, ECRUTEAK_GYM, 3 + warp_event 5, 6, ECRUTEAK_GYM, 3 + warp_event 7, 6, ECRUTEAK_GYM, 3 + warp_event 7, 7, ECRUTEAK_GYM, 3 + warp_event 4, 8, ECRUTEAK_GYM, 3 + warp_event 5, 8, ECRUTEAK_GYM, 3 + warp_event 6, 8, ECRUTEAK_GYM, 3 + warp_event 7, 8, ECRUTEAK_GYM, 3 + warp_event 2, 8, ECRUTEAK_GYM, 3 + warp_event 2, 9, ECRUTEAK_GYM, 3 + warp_event 2, 10, ECRUTEAK_GYM, 3 + warp_event 2, 11, ECRUTEAK_GYM, 3 + warp_event 4, 10, ECRUTEAK_GYM, 3 + warp_event 5, 10, ECRUTEAK_GYM, 3 + warp_event 2, 12, ECRUTEAK_GYM, 3 + warp_event 3, 12, ECRUTEAK_GYM, 3 + warp_event 4, 12, ECRUTEAK_GYM, 3 + warp_event 5, 12, ECRUTEAK_GYM, 3 + warp_event 7, 10, ECRUTEAK_GYM, 3 + warp_event 7, 11, ECRUTEAK_GYM, 3 + warp_event 7, 12, ECRUTEAK_GYM, 3 + warp_event 7, 13, ECRUTEAK_GYM, 3 + + def_coord_events + + def_bg_events + bg_event 3, 15, BGEVENT_READ, EcruteakGymStatue + bg_event 6, 15, BGEVENT_READ, EcruteakGymStatue + + def_object_events + object_event 5, 1, SPRITE_MORTY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, EcruteakGymMortyScript, -1 + object_event 2, 7, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerSageJeffrey, -1 + object_event 3, 13, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSagePing, -1 + object_event 7, 5, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerMediumMartha, -1 + object_event 7, 9, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerMediumGrace, -1 + object_event 7, 15, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, EcruteakGymGuideScript, -1 + object_event 4, 14, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ECRUTEAK_GYM_GRAMPS diff --git a/maps/EcruteakGym.blk b/maps/EcruteakGym.blk new file mode 100644 index 0000000..9862f2e --- /dev/null +++ b/maps/EcruteakGym.blk @@ -0,0 +1,5 @@ +"! +797 +778 +977 +978778   & \ No newline at end of file diff --git a/maps/EcruteakItemfinderHouse.asm b/maps/EcruteakItemfinderHouse.asm new file mode 100644 index 0000000..9741072 --- /dev/null +++ b/maps/EcruteakItemfinderHouse.asm @@ -0,0 +1,177 @@ + object_const_def + const ECRUTEAKITEMFINDERHOUSE_COOLTRAINER_M + const ECRUTEAKITEMFINDERHOUSE_POKEDEX + +EcruteakItemfinderHouse_MapScripts: + def_scene_scripts + + def_callbacks + +EcruteakItemfinderGuy: + faceplayer + opentext + checkevent EVENT_GOT_ITEMFINDER + iftrue .itemfinder + writetext EcruteakItemfinderAdventureText + yesorno + iffalse .no + writetext EcruteakItemfinderTrueSpiritText + promptbutton + verbosegiveitem ITEMFINDER + setevent EVENT_GOT_ITEMFINDER +.itemfinder: + writetext ItemfinderExplanationText + waitbutton + closetext + end + +.no: + writetext EcruteakItemfinderToEachHisOwnText + waitbutton + closetext + end + +EcruteakHistoryBook: + opentext + writetext EcruteakHistoryBookText + yesorno + iftrue .ReadBook + closetext + end + +.ReadBook: + writetext EcruteakTwoTowersText + yesorno + iftrue .KeepReading + closetext + end + +.KeepReading: + writetext EcruteakThreeMonText + waitbutton + closetext + end + +ItemFinderHouseRadio: + jumpstd Radio2Script + +EcruteakItemfinderAdventureText: + text "Ah. You're on an" + line "adventure with" + cont "your #MON?" + + para "Well, what's an" + line "adventure without" + cont "treasure hunting?" + + para "Am I right, or am" + line "I right?" + done + +EcruteakItemfinderTrueSpiritText: + text "Good! You under-" + line "stand the true" + + para "spirit of adven-" + line "ture." + + para "I like that! Take" + line "this with you." + done + +ItemfinderExplanationText: + text "There are many" + line "items lying about" + + para "that aren't ob-" + line "vious." + + para "Use ITEMFINDER to" + line "check if there is" + + para "an item on the" + line "ground near you." + + para "It doesn't show" + line "the exact spot," + + para "so you'll have to" + line "look yourself." + + para "Oh yeah--I heard" + line "there are items" + + para "in ECRUTEAK's" + line "BURNED TOWER." + done + +EcruteakItemfinderToEachHisOwnText: + text "Oh… To each his" + line "own, I suppose…" + done + +EcruteakHistoryBookText: + text "HISTORY OF" + line "ECRUTEAK" + + para "Want to read it?" + done + +EcruteakTwoTowersText: + text "In ECRUTEAK, there" + line "were two towers." + + para "Each tower was the" + line "roost of powerful" + cont "flying #MON." + + para "But one of the" + line "towers burned to" + cont "the ground." + + para "The two #MON" + line "haven't been seen" + cont "since…" + + para "Keep reading?" + done + +EcruteakThreeMonText: + text "ECRUTEAK was also" + line "home to three" + + para "#MON that raced" + line "around the town." + + para "They were said to" + line "have been born of" + + para "water, lightning" + line "and fire." + + para "But they could not" + line "contain their" + cont "excessive power." + + para "So they say the" + line "three ran like the" + + para "wind off into the" + line "grassland." + done + +EcruteakItemfinderHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, ECRUTEAK_CITY, 11 + warp_event 4, 7, ECRUTEAK_CITY, 11 + + def_coord_events + + def_bg_events + bg_event 2, 1, BGEVENT_READ, ItemFinderHouseRadio + + def_object_events + object_event 2, 3, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, EcruteakItemfinderGuy, -1 + object_event 3, 3, SPRITE_POKEDEX, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakHistoryBook, -1 diff --git a/maps/EcruteakLugiaSpeechHouse.asm b/maps/EcruteakLugiaSpeechHouse.asm new file mode 100644 index 0000000..ad47d2d --- /dev/null +++ b/maps/EcruteakLugiaSpeechHouse.asm @@ -0,0 +1,59 @@ + object_const_def + const ECRUTEAKLUGIASPEECHHOUSE_GRAMPS + const ECRUTEAKLUGIASPEECHHOUSE_YOUNGSTER + +EcruteakLugiaSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +EcruteakLugiaSpeechHouseGrampsScript: + jumptextfaceplayer EcruteakLugiaSpeechHouseGrampsText + +EcruteakLugiaSpeechHouseYoungsterScript: + jumptextfaceplayer EcruteakLugiaSpeechHouseYoungsterText + +LugiaSpeechHouseRadio: + jumpstd Radio2Script + +EcruteakLugiaSpeechHouseGrampsText: + text "This happened when" + line "I was young." + + para "The sky suddenly" + line "turned black. A" + + para "giant flying #-" + line "MON was blocking" + cont "out the sun." + + para "I wonder what that" + line "#MON was? " + + para "It was like a bird" + line "and a dragon." + done + +EcruteakLugiaSpeechHouseYoungsterText: + text "Is there really a" + line "#MON that big?" + + para "If it exists, it" + line "must be powerful." + done + +EcruteakLugiaSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, ECRUTEAK_CITY, 7 + warp_event 4, 7, ECRUTEAK_CITY, 7 + + def_coord_events + + def_bg_events + bg_event 2, 1, BGEVENT_READ, LugiaSpeechHouseRadio + + def_object_events + object_event 2, 3, SPRITE_GRAMPS, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakLugiaSpeechHouseGrampsScript, -1 + object_event 5, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakLugiaSpeechHouseYoungsterScript, -1 diff --git a/maps/EcruteakMart.asm b/maps/EcruteakMart.asm new file mode 100644 index 0000000..e1a9328 --- /dev/null +++ b/maps/EcruteakMart.asm @@ -0,0 +1,60 @@ + object_const_def + const ECRUTEAKMART_CLERK + const ECRUTEAKMART_SUPER_NERD + const ECRUTEAKMART_GRANNY + +EcruteakMart_MapScripts: + def_scene_scripts + + def_callbacks + +EcruteakMartClerkScript: + opentext + pokemart MARTTYPE_STANDARD, MART_ECRUTEAK + closetext + end + +EcruteakMartSuperNerdScript: + jumptextfaceplayer EcruteakMartSuperNerdText + +EcruteakMartGrannyScript: + jumptextfaceplayer EcruteakMartGrannyText + +EcruteakMartSuperNerdText: + text "My EEVEE evolved" + line "into an ESPEON." + + para "But my friend's" + line "EEVEE turned into" + cont "an UMBREON." + + para "I wonder why? We" + line "both were raising" + + para "our EEVEE in the" + line "same way…" + done + +EcruteakMartGrannyText: + text "If you use REVIVE," + line "a #MON that's" + + para "fainted will wake" + line "right up." + done + +EcruteakMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ECRUTEAK_CITY, 9 + warp_event 3, 7, ECRUTEAK_CITY, 9 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakMartClerkScript, -1 + object_event 5, 2, SPRITE_SUPER_NERD, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, EcruteakMartSuperNerdScript, -1 + object_event 6, 6, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakMartGrannyScript, -1 diff --git a/maps/EcruteakPokecenter1F.asm b/maps/EcruteakPokecenter1F.asm new file mode 100644 index 0000000..1eef618 --- /dev/null +++ b/maps/EcruteakPokecenter1F.asm @@ -0,0 +1,224 @@ + object_const_def + const ECRUTEAKPOKECENTER1F_NURSE + const ECRUTEAKPOKECENTER1F_POKEFAN_M + const ECRUTEAKPOKECENTER1F_COOLTRAINER_F + const ECRUTEAKPOKECENTER1F_GYM_GUIDE + const ECRUTEAKPOKECENTER1F_BILL + +EcruteakPokecenter1F_MapScripts: + def_scene_scripts + scene_script EcruteakPokecenter1FMeetBillScene, SCENE_ECRUTEAKPOKECENTER1F_MEET_BILL + scene_script EcruteakPokecenter1FNoopScene, SCENE_ECRUTEAKPOKECENTER1F_NOOP + + def_callbacks + +EcruteakPokecenter1FMeetBillScene: + sdefer EcruteakPokcenter1FBillActivatesTimeCapsuleScript + end + +EcruteakPokecenter1FNoopScene: + end + +EcruteakPokcenter1FBillActivatesTimeCapsuleScript: + pause 30 + playsound SFX_EXIT_BUILDING + appear ECRUTEAKPOKECENTER1F_BILL + waitsfx + applymovement ECRUTEAKPOKECENTER1F_BILL, EcruteakPokecenter1FBillMovement1 + applymovement PLAYER, EcruteakPokecenter1FPlayerMovement1 + turnobject ECRUTEAKPOKECENTER1F_NURSE, UP + pause 10 + turnobject ECRUTEAKPOKECENTER1F_NURSE, DOWN + pause 30 + turnobject ECRUTEAKPOKECENTER1F_NURSE, UP + pause 10 + turnobject ECRUTEAKPOKECENTER1F_NURSE, DOWN + pause 20 + turnobject ECRUTEAKPOKECENTER1F_BILL, DOWN + pause 10 + opentext + writetext EcruteakPokecenter1F_BillText1 + promptbutton + sjump .PointlessJump + +.PointlessJump: + writetext EcruteakPokecenter1F_BillText2 + waitbutton + closetext + turnobject PLAYER, DOWN + applymovement ECRUTEAKPOKECENTER1F_BILL, EcruteakPokecenter1FBillMovement2 + playsound SFX_EXIT_BUILDING + disappear ECRUTEAKPOKECENTER1F_BILL + clearevent EVENT_MET_BILL + setflag ENGINE_TIME_CAPSULE + setscene SCENE_ECRUTEAKPOKECENTER1F_NOOP + waitsfx + end + +EcruteakPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +EcruteakPokecenter1FPokefanMScript: + special Mobile_DummyReturnFalse + iftrue .mobile + jumptextfaceplayer EcruteakPokecenter1FPokefanMText + +.mobile + jumptextfaceplayer EcruteakPokecenter1FPokefanMTextMobile + +EcruteakPokecenter1FCooltrainerFScript: + jumptextfaceplayer EcruteakPokecenter1FCooltrainerFText + +EcruteakPokecenter1FGymGuideScript: + jumptextfaceplayer EcruteakPokecenter1FGymGuideText + +EcruteakPokecenter1FBillMovement1: + step UP + step UP + step UP + step UP + step RIGHT + step RIGHT + step RIGHT + turn_head UP + step_end + +EcruteakPokecenter1FBillMovement2: + step RIGHT + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +EcruteakPokecenter1FPlayerMovement1: + step UP + step UP + step UP + step_end + +EcruteakPokecenter1F_BillText1: + text "Hi, I'm BILL. And" + line "who are you?" + + para "Hmm, , huh?" + line "You've come at the" + cont "right time." + done + +EcruteakPokecenter1F_BillText2: + text "I just finished" + line "adjustments on my" + cont "TIME CAPSULE." + + para "You know that" + line "#MON can be" + cont "traded, right?" + + para "My TIME CAPSULE" + line "was developed to" + + para "enable trades with" + line "the past." + + para "But you can't send" + line "anything that" + + para "didn't exist in" + line "the past." + + para "If you did, the PC" + line "in the past would" + cont "have a breakdown." + + para "So you have to" + line "remove anything" + + para "that wasn't around" + line "in the past." + + para "Put simply, no" + line "sending new moves" + + para "or new #MON in" + line "the TIME CAPSULE." + + para "Don't you worry." + line "I'm done with the" + cont "adjustments." + + para "Tomorrow, TIME" + line "CAPSULES will be" + + para "running at all" + line "#MON CENTERS." + + para "I have to hurry on" + line "back to GOLDENROD" + cont "and see my folks." + + para "Buh-bye!" + done + +EcruteakPokecenter1FPokefanMText: + text "The way the KIMONO" + line "GIRLS dance is" + + para "marvelous. Just" + line "like the way they" + cont "use their #MON." + done + +EcruteakPokecenter1FPokefanMTextMobile: + text "You must be hoping" + line "to battle more" + + para "people, right?" + line "There's apparently" + + para "some place where" + line "trainers gather." + + para "Where, you ask?" + + para "It's a little past" + line "OLIVINE CITY." + done + +EcruteakPokecenter1FCooltrainerFText: + text "MORTY, the GYM" + line "LEADER, is soooo" + cont "cool." + + para "His #MON are" + line "really tough too." + done + +EcruteakPokecenter1FGymGuideText: + text "LAKE OF RAGE…" + + para "The appearance of" + line "a GYARADOS swarm…" + + para "I smell a conspir-" + line "acy. I know it!" + done + +EcruteakPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, ECRUTEAK_CITY, 6 + warp_event 4, 7, ECRUTEAK_CITY, 6 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakPokecenter1FNurseScript, -1 + object_event 7, 6, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakPokecenter1FPokefanMScript, -1 + object_event 1, 4, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakPokecenter1FCooltrainerFScript, -1 + object_event 7, 1, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, EcruteakPokecenter1FGymGuideScript, -1 + object_event 0, 7, SPRITE_BILL, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ECRUTEAK_POKE_CENTER_BILL diff --git a/maps/EcruteakTinTowerEntrance.asm b/maps/EcruteakTinTowerEntrance.asm new file mode 100644 index 0000000..03be5f3 --- /dev/null +++ b/maps/EcruteakTinTowerEntrance.asm @@ -0,0 +1,298 @@ + object_const_def + const ECRUTEAKTINTOWERENTRANCE_SAGE1 + const ECRUTEAKTINTOWERENTRANCE_SAGE2 + const ECRUTEAKTINTOWERENTRANCE_SAGE3 + const ECRUTEAKTINTOWERENTRANCE_GRAMPS + +EcruteakTinTowerEntrance_MapScripts: + def_scene_scripts + scene_script EcruteakTinTowerEntranceNoop1Scene, SCENE_ECRUTEAKTINTOWERENTRANCE_SAGE_BLOCKS + scene_script EcruteakTinTowerEntranceNoop2Scene, SCENE_ECRUTEAKTINTOWERENTRANCE_NOOP + + def_callbacks + callback MAPCALLBACK_OBJECTS, EcruteakTinTowerEntranceInitializeSagesCallback + +EcruteakTinTowerEntranceNoop1Scene: + end + +EcruteakTinTowerEntranceNoop2Scene: + end + +EcruteakTinTowerEntranceInitializeSagesCallback: + checkevent EVENT_FOUGHT_SUICUNE + iftrue .DontBlockTower + checkevent EVENT_KOJI_ALLOWS_YOU_PASSAGE_TO_TIN_TOWER + iftrue .DontBlockTower + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .BlockTower + endcallback + +.BlockTower: + clearevent EVENT_RANG_CLEAR_BELL_1 + setevent EVENT_RANG_CLEAR_BELL_2 + setevent EVENT_ECRUTEAK_TIN_TOWER_ENTRANCE_WANDERING_SAGE + checkitem CLEAR_BELL + iftrue .NoClearBell + setscene SCENE_ECRUTEAKTINTOWERENTRANCE_SAGE_BLOCKS +.NoClearBell: + endcallback + +.DontBlockTower: + clearevent EVENT_ECRUTEAK_TIN_TOWER_ENTRANCE_WANDERING_SAGE + endcallback + +EcruteakTinTowerEntranceSageBlocksLeft: + checkevent EVENT_RANG_CLEAR_BELL_2 + iftrue EcruteakTinTowerEntranceAlreadyBlocked + applymovement ECRUTEAKTINTOWERENTRANCE_SAGE2, EcruteakTinTowerEntranceSageBlocksLeftMovement + moveobject ECRUTEAKTINTOWERENTRANCE_SAGE1, 4, 6 + appear ECRUTEAKTINTOWERENTRANCE_SAGE1 + pause 5 + disappear ECRUTEAKTINTOWERENTRANCE_SAGE2 + end + +EcruteakTinTowerEntranceSageBlocksRight: + checkevent EVENT_RANG_CLEAR_BELL_1 + iftrue EcruteakTinTowerEntranceAlreadyBlocked + applymovement ECRUTEAKTINTOWERENTRANCE_SAGE1, EcruteakTinTowerEntranceSageBlocksRightMovement + moveobject ECRUTEAKTINTOWERENTRANCE_SAGE2, 5, 6 + appear ECRUTEAKTINTOWERENTRANCE_SAGE2 + pause 5 + disappear ECRUTEAKTINTOWERENTRANCE_SAGE1 + end + +EcruteakTinTowerEntranceAlreadyBlocked: + end + +EcruteakTinTowerEntranceSageScript: + faceplayer + opentext + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .CheckForClearBell + checkflag ENGINE_FOGBADGE + iftrue .BlockPassage_GotFogBadge + writetext EcruteakTinTowerEntranceSageText + waitbutton + closetext + end + +.BlockPassage_GotFogBadge: + writetext EcruteakTinTowerEntranceSageText_GotFogBadge + waitbutton + closetext + end + +.CheckForClearBell: + checkevent EVENT_KOJI_ALLOWS_YOU_PASSAGE_TO_TIN_TOWER + iftrue .AllowedThrough + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue .RangClearBell + checkitem CLEAR_BELL + iftrue .GotClearBell + writetext EcruteakTinTowerEntranceSageText_NoClearBell + waitbutton + closetext + end + +.GotClearBell: + writetext EcruteakTinTowerEntranceSageText_HearsClearBell + waitbutton + closetext + setscene SCENE_ECRUTEAKTINTOWERENTRANCE_NOOP + setevent EVENT_RANG_CLEAR_BELL_2 + clearevent EVENT_RANG_CLEAR_BELL_1 + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + end + +.AllowedThrough: + writetext EcruteakTinTowerEntranceSageText_PleaseDoGoOn + waitbutton + closetext + end + +.RangClearBell: + writetext EcruteakTinTowerEntranceSageText_HeardClearBell + waitbutton + closetext + end + +EcruteakTinTowerEntranceWanderingSageScript: + faceplayer + opentext + checkevent EVENT_GOT_CLEAR_BELL + iftrue .GotClearBell + writetext EcruteakTinTowerEntranceWanderingSageText + waitbutton + closetext + end + +.GotClearBell: + writetext EcruteakTinTowerEntranceWanderingSageText_GotClearBell + waitbutton + closetext + end + +EcruteakTinTowerEntranceGrampsScript: + jumptextfaceplayer EcruteakTinTowerEntranceGrampsText + +EcruteakTinTowerEntranceSageBlocksLeftMovement: + fix_facing + big_step LEFT + remove_fixed_facing + turn_head DOWN + step_end + +EcruteakTinTowerEntranceSageBlocksRightMovement: + fix_facing + big_step RIGHT + remove_fixed_facing + turn_head DOWN + step_end + +EcruteakTinTowerEntranceSageText: + text "TIN TOWER is off" + line "limits to anyone" + + para "without ECRUTEAK" + line "GYM's BADGE." + + para "Sorry, but you'll" + line "have to leave." + done + +EcruteakTinTowerEntranceSageText_GotFogBadge: + text "TIN TOWER is off" + line "limits to anyone" + + para "without ECRUTEAK" + line "GYM's BADGE." + + para "Ah!" + + para "ECRUTEAK's GYM" + line "BADGE! Please, go" + cont "right through." + done + +EcruteakTinTowerEntranceSageText_NoClearBell: + text "A momentous event" + line "has occurred." + + para "I beg your pardon," + line "but I must ask you" + cont "to leave." + + para "…What soothes the" + line "soul…" + + para "The WISE TRIO say" + line "things that are so" + + para "very difficult to" + line "understand…" + done + +EcruteakTinTowerEntranceSageText_HearsClearBell: + text "A momentous event" + line "has occurred." + + para "I beg your pardon," + line "but I must ask you" + cont "to leave." + + para "<……><……><……>" + + para "Ah!" + + para "The sound of that" + line "CLEAR BELL!" + + para "It… It's sublime!" + + para "I've never heard" + line "so beautiful a" + cont "sound before!" + + para "That bell's chime" + line "is indicative of" + cont "the bearer's soul." + + para "You…" + + para "You may be able to" + line "make it through" + cont "TIN TOWER." + + para "Please, do go on." + done + +EcruteakTinTowerEntranceSageText_PleaseDoGoOn: + text "Please, do go on." + done + +EcruteakTinTowerEntranceSageText_HeardClearBell: + text "That bell's chime" + line "is indicative of" + cont "the bearer's soul." + + para "You…" + + para "You may be able to" + line "make it through" + cont "TIN TOWER." + + para "Please, do go on." + done + +EcruteakTinTowerEntranceWanderingSageText: + text "The TIN TOWER" + line "ahead is a nine-" + + para "tier tower of" + line "divine beauty." + + para "It soothes the" + line "soul of all who" + cont "see it." + done + +EcruteakTinTowerEntranceWanderingSageText_GotClearBell: + text "The TIN TOWER" + line "shook! A #MON" + + para "must have returned" + line "to the top!" + done + +EcruteakTinTowerEntranceGrampsText: + text "Two towers…" + line "Two #MON…" + + para "But when one" + line "burned down, both" + + para "#MON flew away," + line "never to return." + done + +EcruteakTinTowerEntrance_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 17, ECRUTEAK_CITY, 3 + warp_event 5, 17, ECRUTEAK_CITY, 3 + warp_event 5, 3, ECRUTEAK_TIN_TOWER_ENTRANCE, 4 + warp_event 17, 15, ECRUTEAK_TIN_TOWER_ENTRANCE, 3 + warp_event 17, 3, WISE_TRIOS_ROOM, 3 + + def_coord_events + coord_event 4, 7, SCENE_ECRUTEAKTINTOWERENTRANCE_SAGE_BLOCKS, EcruteakTinTowerEntranceSageBlocksLeft + coord_event 5, 7, SCENE_ECRUTEAKTINTOWERENTRANCE_SAGE_BLOCKS, EcruteakTinTowerEntranceSageBlocksRight + + def_bg_events + + def_object_events + object_event 4, 6, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakTinTowerEntranceSageScript, EVENT_RANG_CLEAR_BELL_1 + object_event 5, 6, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakTinTowerEntranceSageScript, EVENT_RANG_CLEAR_BELL_2 + object_event 6, 9, SPRITE_SAGE, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakTinTowerEntranceWanderingSageScript, EVENT_ECRUTEAK_TIN_TOWER_ENTRANCE_WANDERING_SAGE + object_event 3, 11, SPRITE_GRAMPS, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, EcruteakTinTowerEntranceGrampsScript, EVENT_ECRUTEAK_TIN_TOWER_ENTRANCE_WANDERING_SAGE diff --git a/maps/EcruteakTinTowerEntrance.blk b/maps/EcruteakTinTowerEntrance.blk new file mode 100644 index 0000000..8f74a65 --- /dev/null +++ b/maps/EcruteakTinTowerEntrance.blk @@ -0,0 +1,10 @@ +!" +  + +     +   +   +  + ! " + +&   \ No newline at end of file diff --git a/maps/ElmsHouse.asm b/maps/ElmsHouse.asm new file mode 100644 index 0000000..f68c593 --- /dev/null +++ b/maps/ElmsHouse.asm @@ -0,0 +1,98 @@ + object_const_def + const ELMSHOUSE_ELMS_WIFE + const ELMSHOUSE_ELMS_SON + +ElmsHouse_MapScripts: + def_scene_scripts + + def_callbacks + +ElmsWife: + jumptextfaceplayer ElmsWifeText + +ElmsSon: + jumptextfaceplayer ElmsSonText + +ElmsHousePC: + jumptext ElmsHousePCText + +ElmsHouseBookshelf: + jumpstd DifficultBookshelfScript + +ElmsWifeText: + text "Hi, ! My" + line "husband's always" + + para "so busy--I hope" + line "he's OK." + + para "When he's caught" + line "up in his #MON" + + para "research, he even" + line "forgets to eat." + done + +ElmsSonText: + text "When I grow up," + line "I'm going to help" + cont "my dad!" + + para "I'm going to be a" + line "great #MON" + cont "professor!" + done + +ElmsHouseLabFoodText: ; unreferenced + text "There's some food" + line "here. It must be" + cont "for the LAB." + done + +ElmsHousePokemonFoodText: ; unreferenced + text "There's some food" + line "here. This must be" + cont "for #MON." + done + +ElmsHousePCText: + text "#MON. Where do" + line "they come from? " + + para "Where are they" + line "going?" + + para "Why has no one" + line "ever witnessed a" + cont "#MON's birth?" + + para "I want to know! I" + line "will dedicate my" + + para "life to the study" + line "of #MON!" + + para "…" + + para "It's a part of" + line "PROF.ELM's re-" + cont "search papers." + done + +ElmsHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, NEW_BARK_TOWN, 4 + warp_event 3, 7, NEW_BARK_TOWN, 4 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, ElmsHousePC + bg_event 6, 1, BGEVENT_READ, ElmsHouseBookshelf + bg_event 7, 1, BGEVENT_READ, ElmsHouseBookshelf + + def_object_events + object_event 1, 5, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ElmsWife, -1 + object_event 5, 4, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ElmsSon, -1 diff --git a/maps/ElmsHouse.blk b/maps/ElmsHouse.blk new file mode 100644 index 0000000..46ed2bc --- /dev/null +++ b/maps/ElmsHouse.blk @@ -0,0 +1 @@ +   \ No newline at end of file diff --git a/maps/ElmsLab.asm b/maps/ElmsLab.asm new file mode 100644 index 0000000..bdaa019 --- /dev/null +++ b/maps/ElmsLab.asm @@ -0,0 +1,1412 @@ + object_const_def + const ELMSLAB_ELM + const ELMSLAB_ELMS_AIDE + const ELMSLAB_POKE_BALL1 + const ELMSLAB_POKE_BALL2 + const ELMSLAB_POKE_BALL3 + const ELMSLAB_OFFICER + +ElmsLab_MapScripts: + def_scene_scripts + scene_script ElmsLabMeetElmScene, SCENE_ELMSLAB_MEET_ELM + scene_script ElmsLabNoop1Scene, SCENE_ELMSLAB_CANT_LEAVE + scene_script ElmsLabNoop2Scene, SCENE_ELMSLAB_NOOP + scene_script ElmsLabNoop3Scene, SCENE_ELMSLAB_MEET_OFFICER + scene_script ElmsLabNoop4Scene, SCENE_ELMSLAB_UNUSED + scene_script ElmsLabNoop5Scene, SCENE_ELMSLAB_AIDE_GIVES_POTION + scene_const SCENE_ELMSLAB_AIDE_GIVES_POKE_BALLS + + def_callbacks + callback MAPCALLBACK_OBJECTS, ElmsLabMoveElmCallback + +ElmsLabMeetElmScene: + sdefer ElmsLabWalkUpToElmScript + end + +ElmsLabNoop1Scene: + end + +ElmsLabNoop2Scene: + end + +ElmsLabNoop3Scene: + end + +ElmsLabNoop4Scene: + end + +ElmsLabNoop5Scene: + end + +ElmsLabMoveElmCallback: + checkscene + iftrue .Skip ; not SCENE_ELMSLAB_MEET_ELM + moveobject ELMSLAB_ELM, 3, 4 +.Skip: + endcallback + +ElmsLabWalkUpToElmScript: + applymovement PLAYER, ElmsLab_WalkUpToElmMovement + showemote EMOTE_SHOCK, ELMSLAB_ELM, 15 + turnobject ELMSLAB_ELM, RIGHT + opentext + writetext ElmText_Intro +.MustSayYes: + yesorno + iftrue .ElmGetsEmail + writetext ElmText_Refused + sjump .MustSayYes + +.ElmGetsEmail: + writetext ElmText_Accepted + promptbutton + writetext ElmText_ResearchAmbitions + waitbutton + closetext + playsound SFX_GLASS_TING + pause 30 + showemote EMOTE_SHOCK, ELMSLAB_ELM, 10 + turnobject ELMSLAB_ELM, DOWN + opentext + writetext ElmText_GotAnEmail + waitbutton + closetext + opentext + turnobject ELMSLAB_ELM, RIGHT + writetext ElmText_MissionFromMrPokemon + waitbutton + closetext + applymovement ELMSLAB_ELM, ElmsLab_ElmToDefaultPositionMovement1 + turnobject PLAYER, UP + applymovement ELMSLAB_ELM, ElmsLab_ElmToDefaultPositionMovement2 + turnobject PLAYER, RIGHT + opentext + writetext ElmText_ChooseAPokemon + waitbutton + setscene SCENE_ELMSLAB_CANT_LEAVE + closetext + end + +ProfElmScript: + faceplayer + opentext + checkevent EVENT_GOT_SS_TICKET_FROM_ELM + iftrue ElmCheckMasterBall + checkevent EVENT_BEAT_ELITE_FOUR + iftrue ElmGiveTicketScript +ElmCheckMasterBall: + checkevent EVENT_GOT_MASTER_BALL_FROM_ELM + iftrue ElmCheckEverstone + checkflag ENGINE_RISINGBADGE + iftrue ElmGiveMasterBallScript +ElmCheckEverstone: + checkevent EVENT_GOT_EVERSTONE_FROM_ELM + iftrue ElmScript_CallYou + checkevent EVENT_SHOWED_TOGEPI_TO_ELM + iftrue ElmGiveEverstoneScript + checkevent EVENT_TOLD_ELM_ABOUT_TOGEPI_OVER_THE_PHONE + iffalse ElmCheckTogepiEgg + loadmonindex 1, TOGEPI + special FindPartyMonThatSpeciesYourTrainerID + iftrue ShowElmTogepiScript + loadmonindex 2, TOGETIC + special FindPartyMonThatSpeciesYourTrainerID + iftrue ShowElmTogepiScript + writetext ElmThoughtEggHatchedText + waitbutton + closetext + end + +ElmEggHatchedScript: + loadmonindex 1, TOGEPI + special FindPartyMonThatSpeciesYourTrainerID + iftrue ShowElmTogepiScript + loadmonindex 2, TOGETIC + special FindPartyMonThatSpeciesYourTrainerID + iftrue ShowElmTogepiScript + sjump ElmCheckGotEggAgain + +ElmCheckTogepiEgg: + checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE + iffalse ElmCheckGotEggAgain + checkevent EVENT_TOGEPI_HATCHED + iftrue ElmEggHatchedScript +ElmCheckGotEggAgain: + checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE ; why are we checking it again? + iftrue ElmWaitingEggHatchScript + checkflag ENGINE_ZEPHYRBADGE + iftrue ElmAideHasEggScript + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iftrue ElmStudyingEggScript + checkevent EVENT_GOT_MYSTERY_EGG_FROM_MR_POKEMON + iftrue ElmAfterTheftScript + checkevent EVENT_GOT_A_POKEMON_FROM_ELM + iftrue ElmDescribesMrPokemonScript + writetext ElmText_LetYourMonBattleIt + waitbutton + closetext + end + +LabTryToLeaveScript: + turnobject ELMSLAB_ELM, DOWN + opentext + writetext LabWhereGoingText + waitbutton + closetext + applymovement PLAYER, ElmsLab_CantLeaveMovement + end + +CyndaquilPokeBallScript: + checkevent EVENT_GOT_A_POKEMON_FROM_ELM + iftrue LookAtElmPokeBallScript + turnobject ELMSLAB_ELM, DOWN + refreshscreen + pokepic CYNDAQUIL + cry CYNDAQUIL + waitbutton + closepokepic + opentext + writetext TakeCyndaquilText + yesorno + iffalse DidntChooseStarterScript + disappear ELMSLAB_POKE_BALL1 + setevent EVENT_GOT_CYNDAQUIL_FROM_ELM + writetext ChoseStarterText + promptbutton + waitsfx + getmonname STRING_BUFFER_3, CYNDAQUIL + writetext ReceivedStarterText + playsound SFX_CAUGHT_MON + waitsfx + promptbutton + givepoke CYNDAQUIL, 5, BERRY + closetext + readvar VAR_FACING + ifequal RIGHT, ElmDirectionsScript + applymovement PLAYER, AfterCyndaquilMovement + sjump ElmDirectionsScript + +TotodilePokeBallScript: + checkevent EVENT_GOT_A_POKEMON_FROM_ELM + iftrue LookAtElmPokeBallScript + turnobject ELMSLAB_ELM, DOWN + refreshscreen + pokepic TOTODILE + cry TOTODILE + waitbutton + closepokepic + opentext + writetext TakeTotodileText + yesorno + iffalse DidntChooseStarterScript + disappear ELMSLAB_POKE_BALL2 + setevent EVENT_GOT_TOTODILE_FROM_ELM + writetext ChoseStarterText + promptbutton + waitsfx + getmonname STRING_BUFFER_3, TOTODILE + writetext ReceivedStarterText + playsound SFX_CAUGHT_MON + waitsfx + promptbutton + givepoke TOTODILE, 5, BERRY + closetext + applymovement PLAYER, AfterTotodileMovement + sjump ElmDirectionsScript + +ChikoritaPokeBallScript: + checkevent EVENT_GOT_A_POKEMON_FROM_ELM + iftrue LookAtElmPokeBallScript + turnobject ELMSLAB_ELM, DOWN + refreshscreen + pokepic CHIKORITA + cry CHIKORITA + waitbutton + closepokepic + opentext + writetext TakeChikoritaText + yesorno + iffalse DidntChooseStarterScript + disappear ELMSLAB_POKE_BALL3 + setevent EVENT_GOT_CHIKORITA_FROM_ELM + writetext ChoseStarterText + promptbutton + waitsfx + getmonname STRING_BUFFER_3, CHIKORITA + writetext ReceivedStarterText + playsound SFX_CAUGHT_MON + waitsfx + promptbutton + givepoke CHIKORITA, 5, BERRY + closetext + applymovement PLAYER, AfterChikoritaMovement + sjump ElmDirectionsScript + +DidntChooseStarterScript: + writetext DidntChooseStarterText + waitbutton + closetext + end + +ElmDirectionsScript: + turnobject PLAYER, UP + opentext + writetext ElmDirectionsText1 + waitbutton + closetext + addcellnum PHONE_ELM + opentext + writetext GotElmsNumberText + playsound SFX_REGISTER_PHONE_NUMBER + waitsfx + waitbutton + closetext + turnobject ELMSLAB_ELM, LEFT + opentext + writetext ElmDirectionsText2 + waitbutton + closetext + turnobject ELMSLAB_ELM, DOWN + opentext + writetext ElmDirectionsText3 + waitbutton + closetext + setevent EVENT_GOT_A_POKEMON_FROM_ELM + setevent EVENT_RIVAL_CHERRYGROVE_CITY + setscene SCENE_ELMSLAB_AIDE_GIVES_POTION + setmapscene NEW_BARK_TOWN, SCENE_NEWBARKTOWN_NOOP + end + +ElmDescribesMrPokemonScript: + writetext ElmDescribesMrPokemonText + waitbutton + closetext + end + +LookAtElmPokeBallScript: + opentext + writetext ElmPokeBallText + waitbutton + closetext + end + +ElmsLabHealingMachine: + opentext + checkevent EVENT_GOT_A_POKEMON_FROM_ELM + iftrue .CanHeal + writetext ElmsLabHealingMachineText1 + waitbutton + closetext + end + +.CanHeal: + writetext ElmsLabHealingMachineText2 + yesorno + iftrue ElmsLabHealingMachine_HealParty + closetext + end + +ElmsLabHealingMachine_HealParty: + special StubbedTrainerRankings_Healings + special HealParty + playmusic MUSIC_NONE + setval HEALMACHINE_ELMS_LAB + special HealMachineAnim + pause 30 + special RestartMapMusic + closetext + end + +ElmAfterTheftDoneScript: + waitbutton + closetext + end + +ElmAfterTheftScript: + writetext ElmAfterTheftText1 + checkitem MYSTERY_EGG + iffalse ElmAfterTheftDoneScript + promptbutton + writetext ElmAfterTheftText2 + waitbutton + takeitem MYSTERY_EGG + scall ElmJumpBackScript1 + writetext ElmAfterTheftText3 + waitbutton + scall ElmJumpBackScript2 + writetext ElmAfterTheftText4 + promptbutton + writetext ElmAfterTheftText5 + promptbutton + setevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + setflag ENGINE_MAIN_MENU_MOBILE_CHOICES + setmapscene ROUTE_29, SCENE_ROUTE29_CATCH_TUTORIAL + clearevent EVENT_ROUTE_30_YOUNGSTER_JOEY + setevent EVENT_ROUTE_30_BATTLE + writetext ElmAfterTheftText6 + waitbutton + closetext + setscene SCENE_ELMSLAB_AIDE_GIVES_POKE_BALLS + end + +ElmStudyingEggScript: + writetext ElmStudyingEggText + waitbutton + closetext + end + +ElmAideHasEggScript: + writetext ElmAideHasEggText + waitbutton + closetext + end + +ElmWaitingEggHatchScript: + writetext ElmWaitingEggHatchText + waitbutton + closetext + end + +ShowElmTogepiScript: + writetext ShowElmTogepiText1 + waitbutton + closetext + showemote EMOTE_SHOCK, ELMSLAB_ELM, 15 + setevent EVENT_SHOWED_TOGEPI_TO_ELM + opentext + writetext ShowElmTogepiText2 + promptbutton + writetext ShowElmTogepiText3 + promptbutton +ElmGiveEverstoneScript: + writetext ElmGiveEverstoneText1 + promptbutton + verbosegiveitem EVERSTONE + iffalse ElmScript_NoRoomForEverstone + writetext ElmGiveEverstoneText2 + waitbutton + closetext + setevent EVENT_GOT_EVERSTONE_FROM_ELM + end + +ElmScript_CallYou: + writetext ElmText_CallYou + waitbutton +ElmScript_NoRoomForEverstone: + closetext + end + +ElmGiveMasterBallScript: + writetext ElmGiveMasterBallText1 + promptbutton + verbosegiveitem MASTER_BALL + iffalse .notdone + setevent EVENT_GOT_MASTER_BALL_FROM_ELM + writetext ElmGiveMasterBallText2 + waitbutton +.notdone + closetext + end + +ElmGiveTicketScript: + writetext ElmGiveTicketText1 + promptbutton + verbosegiveitem S_S_TICKET + setevent EVENT_GOT_SS_TICKET_FROM_ELM + writetext ElmGiveTicketText2 + waitbutton + closetext + end + +ElmJumpBackScript1: + closetext + readvar VAR_FACING + ifequal DOWN, ElmJumpDownScript + ifequal UP, ElmJumpUpScript + ifequal LEFT, ElmJumpLeftScript + ifequal RIGHT, ElmJumpRightScript + end + +ElmJumpBackScript2: + closetext + readvar VAR_FACING + ifequal DOWN, ElmJumpUpScript + ifequal UP, ElmJumpDownScript + ifequal LEFT, ElmJumpRightScript + ifequal RIGHT, ElmJumpLeftScript + end + +ElmJumpUpScript: + applymovement ELMSLAB_ELM, ElmJumpUpMovement + opentext + end + +ElmJumpDownScript: + applymovement ELMSLAB_ELM, ElmJumpDownMovement + opentext + end + +ElmJumpLeftScript: + applymovement ELMSLAB_ELM, ElmJumpLeftMovement + opentext + end + +ElmJumpRightScript: + applymovement ELMSLAB_ELM, ElmJumpRightMovement + opentext + end + +AideScript_WalkPotion1: + applymovement ELMSLAB_ELMS_AIDE, AideWalksRight1 + turnobject PLAYER, DOWN + scall AideScript_GivePotion + applymovement ELMSLAB_ELMS_AIDE, AideWalksLeft1 + end + +AideScript_WalkPotion2: + applymovement ELMSLAB_ELMS_AIDE, AideWalksRight2 + turnobject PLAYER, DOWN + scall AideScript_GivePotion + applymovement ELMSLAB_ELMS_AIDE, AideWalksLeft2 + end + +AideScript_GivePotion: + opentext + writetext AideText_GiveYouPotion + promptbutton + verbosegiveitem POTION + writetext AideText_AlwaysBusy + waitbutton + closetext + setscene SCENE_ELMSLAB_NOOP + end + +AideScript_WalkBalls1: + applymovement ELMSLAB_ELMS_AIDE, AideWalksRight1 + turnobject PLAYER, DOWN + scall AideScript_GiveYouBalls + applymovement ELMSLAB_ELMS_AIDE, AideWalksLeft1 + end + +AideScript_WalkBalls2: + applymovement ELMSLAB_ELMS_AIDE, AideWalksRight2 + turnobject PLAYER, DOWN + scall AideScript_GiveYouBalls + applymovement ELMSLAB_ELMS_AIDE, AideWalksLeft2 + end + +AideScript_GiveYouBalls: + opentext + writetext AideText_GiveYouBalls + promptbutton + getitemname STRING_BUFFER_4, POKE_BALL + scall AideScript_ReceiveTheBalls + giveitem POKE_BALL, 5 + writetext AideText_ExplainBalls + promptbutton + itemnotify + closetext + setscene SCENE_ELMSLAB_NOOP + end + +AideScript_ReceiveTheBalls: + jumpstd ReceiveItemScript + end + +ElmsAideScript: + faceplayer + opentext + checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE + iftrue AideScript_AfterTheft + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iftrue AideScript_ExplainBalls + checkevent EVENT_GOT_MYSTERY_EGG_FROM_MR_POKEMON + iftrue AideScript_TheftTestimony + writetext AideText_AlwaysBusy + waitbutton + closetext + end + +AideScript_TheftTestimony: + writetext AideText_TheftTestimony + waitbutton + closetext + end + +AideScript_ExplainBalls: + writetext AideText_ExplainBalls + waitbutton + closetext + end + +AideScript_AfterTheft: + writetext AideText_AfterTheft + waitbutton + closetext + end + +MeetCopScript2: + applymovement PLAYER, MeetCopScript2_StepLeft + +MeetCopScript: + applymovement PLAYER, MeetCopScript_WalkUp +CopScript: + turnobject ELMSLAB_OFFICER, LEFT + opentext + writetext ElmsLabOfficerText1 + promptbutton + special NameRival + writetext ElmsLabOfficerText2 + waitbutton + closetext + applymovement ELMSLAB_OFFICER, OfficerLeavesMovement + disappear ELMSLAB_OFFICER + setscene SCENE_ELMSLAB_NOOP + end + +ElmsLabWindow: + opentext + checkflag ENGINE_FLYPOINT_VIOLET + iftrue .Normal + checkevent EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON + iftrue .BreakIn + sjump .Normal + +.BreakIn: + writetext ElmsLabWindowText2 + waitbutton + closetext + end + +.Normal: + writetext ElmsLabWindowText1 + waitbutton + closetext + end + +ElmsLabTravelTip1: + jumptext ElmsLabTravelTip1Text + +ElmsLabTravelTip2: + jumptext ElmsLabTravelTip2Text + +ElmsLabTravelTip3: + jumptext ElmsLabTravelTip3Text + +ElmsLabTravelTip4: + jumptext ElmsLabTravelTip4Text + +ElmsLabTrashcan: + jumptext ElmsLabTrashcanText + +ElmsLabPC: + jumptext ElmsLabPCText + +ElmsLabTrashcan2: ; unreferenced + jumpstd TrashCanScript + +ElmsLabBookshelf: + jumpstd DifficultBookshelfScript + +ElmsLab_WalkUpToElmMovement: + step UP + step UP + step UP + step UP + step UP + step UP + step UP + turn_head LEFT + step_end + +ElmsLab_CantLeaveMovement: + step UP + step_end + +MeetCopScript2_StepLeft: + step LEFT + step_end + +MeetCopScript_WalkUp: + step UP + step UP + turn_head RIGHT + step_end + +OfficerLeavesMovement: + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +AideWalksRight1: + step RIGHT + step RIGHT + turn_head UP + step_end + +AideWalksRight2: + step RIGHT + step RIGHT + step RIGHT + turn_head UP + step_end + +AideWalksLeft1: + step LEFT + step LEFT + turn_head DOWN + step_end + +AideWalksLeft2: + step LEFT + step LEFT + step LEFT + turn_head DOWN + step_end + +ElmJumpUpMovement: + fix_facing + big_step UP + remove_fixed_facing + step_end + +ElmJumpDownMovement: + fix_facing + big_step DOWN + remove_fixed_facing + step_end + +ElmJumpLeftMovement: + fix_facing + big_step LEFT + remove_fixed_facing + step_end + +ElmJumpRightMovement: + fix_facing + big_step RIGHT + remove_fixed_facing + step_end + +ElmsLab_ElmToDefaultPositionMovement1: + step UP + step_end + +ElmsLab_ElmToDefaultPositionMovement2: + step RIGHT + step RIGHT + step UP + turn_head DOWN + step_end + +AfterCyndaquilMovement: + step LEFT + step UP + turn_head UP + step_end + +AfterTotodileMovement: + step LEFT + step LEFT + step UP + turn_head UP + step_end + +AfterChikoritaMovement: + step LEFT + step LEFT + step LEFT + step UP + turn_head UP + step_end + +ElmText_Intro: + text "ELM: !" + line "There you are!" + + para "I needed to ask" + line "you a favor." + + para "I'm conducting new" + line "#MON research" + + para "right now. I was" + line "wondering if you" + + para "could help me with" + line "it, ." + + para "You see…" + + para "I'm writing a" + line "paper that I want" + + para "to present at a" + line "conference." + + para "But there are some" + line "things I don't" + + para "quite understand" + line "yet." + + para "So!" + + para "I'd like you to" + line "raise a #MON" + + para "that I recently" + line "caught." + done + +ElmText_Accepted: + text "Thanks, !" + + para "You're a great" + line "help!" + done + +ElmText_Refused: + text "But… Please, I" + line "need your help!" + done + +ElmText_ResearchAmbitions: + text "When I announce my" + line "findings, I'm sure" + + para "we'll delve a bit" + line "deeper into the" + + para "many mysteries of" + line "#MON." + + para "You can count on" + line "it!" + done + +ElmText_GotAnEmail: + text "Oh, hey! I got an" + line "e-mail!" + + para "<……><……><……>" + line "Hm… Uh-huh…" + + para "Okay…" + done + +ElmText_MissionFromMrPokemon: + text "Hey, listen." + + para "I have an acquain-" + line "tance called MR." + cont "#MON." + + para "He keeps finding" + line "weird things and" + + para "raving about his" + line "discoveries." + + para "Anyway, I just got" + line "an e-mail from him" + + para "saying that this" + line "time it's real." + + para "It is intriguing," + line "but we're busy" + + para "with our #MON" + line "research…" + + para "Wait!" + + para "I know!" + + para ", can you" + line "go in our place?" + done + +ElmText_ChooseAPokemon: + text "I want you to" + line "raise one of the" + + para "#MON contained" + line "in these BALLS." + + para "You'll be that" + line "#MON's first" + cont "partner, !" + + para "Go on. Pick one!" + done + +ElmText_LetYourMonBattleIt: + text "If a wild #MON" + line "appears, let your" + cont "#MON battle it!" + done + +LabWhereGoingText: + text "ELM: Wait! Where" + line "are you going?" + done + +TakeCyndaquilText: + text "ELM: You'll take" + line "CYNDAQUIL, the" + cont "fire #MON?" + done + +TakeTotodileText: + text "ELM: Do you want" + line "TOTODILE, the" + cont "water #MON?" + done + +TakeChikoritaText: + text "ELM: So, you like" + line "CHIKORITA, the" + cont "grass #MON?" + done + +DidntChooseStarterText: + text "ELM: Think it over" + line "carefully." + + para "Your partner is" + line "important." + done + +ChoseStarterText: + text "ELM: I think" + line "that's a great" + cont "#MON too!" + done + +ReceivedStarterText: + text " received" + line "@" + text_ram wStringBuffer3 + text "!" + done + +ElmDirectionsText1: + text "MR.#MON lives a" + line "little bit beyond" + + para "CHERRYGROVE, the" + line "next city over." + + para "It's almost a" + line "direct route" + + para "there, so you" + line "can't miss it." + + para "But just in case," + line "here's my phone" + + para "number. Call me if" + line "anything comes up!" + done + +ElmDirectionsText2: + text "If your #MON is" + line "hurt, you should" + + para "heal it with this" + line "machine." + + para "Feel free to use" + line "it anytime." + done + +ElmDirectionsText3: + text ", I'm" + line "counting on you!" + done + +GotElmsNumberText: + text " got ELM's" + line "phone number." + done + +ElmDescribesMrPokemonText: + text "MR.#MON goes" + line "everywhere and" + cont "finds rarities." + + para "Too bad they're" + line "just rare and" + cont "not very useful…" + done + +ElmPokeBallText: + text "It contains a" + line "#MON caught by" + cont "PROF.ELM." + done + +ElmsLabHealingMachineText1: + text "I wonder what this" + line "does?" + done + +ElmsLabHealingMachineText2: + text "Would you like to" + line "heal your #MON?" + done + +ElmAfterTheftText1: + text "ELM: , this" + line "is terrible…" + + para "Oh, yes, what was" + line "MR.#MON's big" + cont "discovery?" + done + +ElmAfterTheftText2: + text " handed" + line "the MYSTERY EGG to" + cont "PROF.ELM." + done + +ElmAfterTheftText3: + text "ELM: This?" + done + +ElmAfterTheftText4: + text "But… Is it a" + line "#MON EGG?" + + para "If it is, it is a" + line "great discovery!" + done + +ElmAfterTheftText5: + text "ELM: What?!?" + + para "PROF.OAK gave you" + line "a #DEX?" + + para ", is that" + line "true? Th-that's" + cont "incredible!" + + para "He is superb at" + line "seeing the poten-" + cont "tial of people as" + cont "trainers." + + para "Wow, . You" + line "may have what it" + + para "takes to become" + line "the CHAMPION." + + para "You seem to be" + line "getting on great" + cont "with #MON too." + + para "You should take" + line "the #MON GYM" + cont "challenge." + + para "The closest GYM" + line "would be the one" + cont "in VIOLET CITY." + done + +ElmAfterTheftText6: + text "…. The" + line "road to the" + + para "championship will" + line "be a long one." + + para "Before you leave," + line "make sure that you" + cont "talk to your mom." + done + +ElmStudyingEggText: + text "ELM: Don't give" + line "up! I'll call if" + + para "I learn anything" + line "about that EGG!" + done + +ElmAideHasEggText: + text "ELM: ?" + line "Didn't you meet my" + cont "assistant?" + + para "He should have met" + line "you with the EGG" + + para "at VIOLET CITY's" + line "#MON CENTER." + + para "You must have just" + line "missed him. Try to" + cont "catch him there." + done + +ElmWaitingEggHatchText: + text "ELM: Hey, has that" + line "EGG changed any?" + done + +ElmThoughtEggHatchedText: + text "? I thought" + line "the EGG hatched." + + para "Where is the" + line "#MON?" + done + +ShowElmTogepiText1: + text "ELM: , you" + line "look great!" + done + +ShowElmTogepiText2: + text "What?" + line "That #MON!?!" + done + +ShowElmTogepiText3: + text "The EGG hatched!" + line "So, #MON are" + cont "born from EGGS…" + + para "No, perhaps not" + line "all #MON are." + + para "Wow, there's still" + line "a lot of research" + cont "to be done." + done + +ElmGiveEverstoneText1: + text "Thanks, !" + line "You're helping" + + para "unravel #MON" + line "mysteries for us!" + + para "I want you to have" + line "this as a token of" + cont "our appreciation." + done + +ElmGiveEverstoneText2: + text "That's an" + line "EVERSTONE." + + para "Some species of" + line "#MON evolve" + + para "when they grow to" + line "certain levels." + + para "A #MON holding" + line "the EVERSTONE" + cont "won't evolve." + + para "Give it to a #-" + line "MON you don't want" + cont "to evolve." + done + +ElmText_CallYou: + text "ELM: , I'll" + line "call you if any-" + cont "thing comes up." + done + +AideText_AfterTheft: + text "…sigh… That" + line "stolen #MON." + + para "I wonder how it's" + line "doing." + + para "They say a #MON" + line "raised by a bad" + + para "person turns bad" + line "itself." + done + +ElmGiveMasterBallText1: + text "ELM: Hi, !" + line "Thanks to you, my" + + para "research is going" + line "great!" + + para "Take this as a" + line "token of my" + cont "appreciation." + done + +ElmGiveMasterBallText2: + text "The MASTER BALL is" + line "the best!" + + para "It's the ultimate" + line "BALL! It'll catch" + + para "any #MON with-" + line "out fail." + + para "It's given only to" + line "recognized #MON" + cont "researchers." + + para "I think you can" + line "make much better" + + para "use of it than I" + line "can, !" + done + +ElmGiveTicketText1: + text "ELM: !" + line "There you are!" + + para "I called because I" + line "have something for" + cont "you." + + para "See? It's an" + line "S.S.TICKET." + + para "Now you can catch" + line "#MON in KANTO." + done + +ElmGiveTicketText2: + text "The ship departs" + line "from OLIVINE CITY." + + para "But you knew that" + line "already, ." + + para "After all, you've" + line "traveled all over" + cont "with your #MON." + + para "Give my regards to" + line "PROF.OAK in KANTO!" + done + +ElmsLabMonEggText: ; unreferenced + text "It's the #MON" + line "EGG being studied" + cont "by PROF.ELM." + done + +AideText_GiveYouPotion: + text ", I want" + line "you to have this" + cont "for your errand." + done + +AideText_AlwaysBusy: + text "There are only two" + line "of us, so we're" + cont "always busy." + done + +AideText_TheftTestimony: + text "There was a loud" + line "noise outside…" + + para "When we went to" + line "look, someone" + cont "stole a #MON." + + para "It's unbelievable" + line "that anyone would" + cont "do that!" + + para "…sigh… That" + line "stolen #MON." + + para "I wonder how it's" + line "doing." + + para "They say a #MON" + line "raised by a bad" + + para "person turns bad" + line "itself." + done + +AideText_GiveYouBalls: + text "!" + + para "Use these on your" + line "#DEX quest!" + done + +AideText_ExplainBalls: + text "To add to your" + line "#DEX, you have" + cont "to catch #MON." + + para "Throw # BALLS" + line "at wild #MON" + cont "to get them." + done + +ElmsLabOfficerText1: + text "I heard a #MON" + line "was stolen here…" + + para "I was just getting" + line "some information" + cont "from PROF.ELM." + + para "Apparently, it was" + line "a young male with" + cont "long, red hair…" + + para "What?" + + para "You battled a" + line "trainer like that?" + + para "Did you happen to" + line "get his name?" + done + +ElmsLabOfficerText2: + text "OK! So " + line "was his name." + + para "Thanks for helping" + line "my investigation!" + done + +ElmsLabWindowText1: + text "The window's open." + + para "A pleasant breeze" + line "is blowing in." + done + +ElmsLabWindowText2: + text "He broke in" + line "through here!" + done + +ElmsLabTravelTip1Text: + text " opened a" + line "book." + + para "Travel Tip 1:" + + para "Press START to" + line "open the MENU." + done + +ElmsLabTravelTip2Text: + text " opened a" + line "book." + + para "Travel Tip 2:" + + para "Record your trip" + line "with SAVE!" + done + +ElmsLabTravelTip3Text: + text " opened a" + line "book." + + para "Travel Tip 3:" + + para "Open your PACK and" + line "press SELECT to" + cont "move items." + done + +ElmsLabTravelTip4Text: + text " opened a" + line "book." + + para "Travel Tip 4:" + + para "Check your #MON" + line "moves. Press the" + + para "A Button to switch" + line "moves." + done + +ElmsLabTrashcanText: + text "The wrapper from" + line "the snack PROF.ELM" + cont "ate is in there…" + done + +ElmsLabPCText: + text "OBSERVATIONS ON" + line "#MON EVOLUTION" + + para "…It says on the" + line "screen…" + done + +ElmsLab_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 11, NEW_BARK_TOWN, 1 + warp_event 5, 11, NEW_BARK_TOWN, 1 + + def_coord_events + coord_event 4, 6, SCENE_ELMSLAB_CANT_LEAVE, LabTryToLeaveScript + coord_event 5, 6, SCENE_ELMSLAB_CANT_LEAVE, LabTryToLeaveScript + coord_event 4, 5, SCENE_ELMSLAB_MEET_OFFICER, MeetCopScript + coord_event 5, 5, SCENE_ELMSLAB_MEET_OFFICER, MeetCopScript2 + coord_event 4, 8, SCENE_ELMSLAB_AIDE_GIVES_POTION, AideScript_WalkPotion1 + coord_event 5, 8, SCENE_ELMSLAB_AIDE_GIVES_POTION, AideScript_WalkPotion2 + coord_event 4, 8, SCENE_ELMSLAB_AIDE_GIVES_POKE_BALLS, AideScript_WalkBalls1 + coord_event 5, 8, SCENE_ELMSLAB_AIDE_GIVES_POKE_BALLS, AideScript_WalkBalls2 + + def_bg_events + bg_event 2, 1, BGEVENT_READ, ElmsLabHealingMachine + bg_event 6, 1, BGEVENT_READ, ElmsLabBookshelf + bg_event 7, 1, BGEVENT_READ, ElmsLabBookshelf + bg_event 8, 1, BGEVENT_READ, ElmsLabBookshelf + bg_event 9, 1, BGEVENT_READ, ElmsLabBookshelf + bg_event 0, 7, BGEVENT_READ, ElmsLabTravelTip1 + bg_event 1, 7, BGEVENT_READ, ElmsLabTravelTip2 + bg_event 2, 7, BGEVENT_READ, ElmsLabTravelTip3 + bg_event 3, 7, BGEVENT_READ, ElmsLabTravelTip4 + bg_event 6, 7, BGEVENT_READ, ElmsLabBookshelf + bg_event 7, 7, BGEVENT_READ, ElmsLabBookshelf + bg_event 8, 7, BGEVENT_READ, ElmsLabBookshelf + bg_event 9, 7, BGEVENT_READ, ElmsLabBookshelf + bg_event 9, 3, BGEVENT_READ, ElmsLabTrashcan + bg_event 5, 0, BGEVENT_READ, ElmsLabWindow + bg_event 3, 5, BGEVENT_DOWN, ElmsLabPC + + def_object_events + object_event 5, 2, SPRITE_ELM, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ProfElmScript, -1 + object_event 2, 9, SPRITE_SCIENTIST, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ElmsAideScript, EVENT_ELMS_AIDE_IN_LAB + object_event 6, 3, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CyndaquilPokeBallScript, EVENT_CYNDAQUIL_POKEBALL_IN_ELMS_LAB + object_event 7, 3, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TotodilePokeBallScript, EVENT_TOTODILE_POKEBALL_IN_ELMS_LAB + object_event 8, 3, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ChikoritaPokeBallScript, EVENT_CHIKORITA_POKEBALL_IN_ELMS_LAB + object_event 5, 3, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CopScript, EVENT_COP_IN_ELMS_LAB diff --git a/maps/ElmsLab.blk b/maps/ElmsLab.blk new file mode 100644 index 0000000..e391618 --- /dev/null +++ b/maps/ElmsLab.blk @@ -0,0 +1,2 @@ +  ! +  \ No newline at end of file diff --git a/maps/FastShip1F.asm b/maps/FastShip1F.asm new file mode 100644 index 0000000..8b156e8 --- /dev/null +++ b/maps/FastShip1F.asm @@ -0,0 +1,313 @@ + object_const_def + const FASTSHIP1F_SAILOR1 + const FASTSHIP1F_SAILOR2 + const FASTSHIP1F_SAILOR3 + const FASTSHIP1F_GENTLEMAN + +FastShip1F_MapScripts: + def_scene_scripts + scene_script FastShip1FNoop1Scene, SCENE_FASTSHIP1F_NOOP + scene_script FastShip1FEnterShipScene, SCENE_FASTSHIP1F_ENTER_SHIP + scene_script FastShip1FNoop2Scene, SCENE_FASTSHIP1F_MEET_GRANDPA + + def_callbacks + +FastShip1FNoop1Scene: + end + +FastShip1FEnterShipScene: + sdefer FastShip1FEnterShipScript + end + +FastShip1FNoop2Scene: + end + +FastShip1FEnterShipScript: + applymovement FASTSHIP1F_SAILOR1, FastShip1F_SailorStepAsideMovement + applymovement PLAYER, FastShip1F_PlayerEntersShipMovement + applymovement FASTSHIP1F_SAILOR1, FastShip1F_SailorBlocksDoorMovement + pause 30 + playsound SFX_BOAT + earthquake 30 + blackoutmod FAST_SHIP_CABINS_SW_SSW_NW + clearevent EVENT_FAST_SHIP_HAS_ARRIVED + checkevent EVENT_FAST_SHIP_FIRST_TIME + iftrue .SkipGrandpa + setscene SCENE_FASTSHIP1F_MEET_GRANDPA + end + +.SkipGrandpa: + setscene SCENE_FASTSHIP1F_NOOP + end + +FastShip1FSailor1Script: + faceplayer + opentext + checkevent EVENT_FAST_SHIP_HAS_ARRIVED + iftrue .Arrived + checkevent EVENT_FAST_SHIP_DESTINATION_OLIVINE + iftrue .Olivine + writetext FastShip1FSailor1Text_ToVermilion + waitbutton + closetext + end + +.Olivine: + writetext FastShip1FSailor1Text_ToOlivine + waitbutton + closetext + end + +.Arrived: + checkevent EVENT_FAST_SHIP_DESTINATION_OLIVINE + iftrue ._Olivine + writetext FastShip1FSailor1Text_InVermilion + waitbutton + closetext + scall .LetThePlayerOut + playsound SFX_EXIT_BUILDING + special FadeOutPalettes + waitsfx + setevent EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY + setmapscene VERMILION_PORT, SCENE_VERMILIONPORT_LEAVE_SHIP + warp VERMILION_PORT, 7, 17 + end + +._Olivine: + writetext FastShip1FSailor1Text_InOlivine + waitbutton + closetext + scall .LetThePlayerOut + playsound SFX_EXIT_BUILDING + special FadeOutPalettes + waitsfx + setevent EVENT_OLIVINE_PORT_SAILOR_AT_GANGWAY + setmapscene OLIVINE_PORT, SCENE_OLIVINEPORT_LEAVE_SHIP + warp OLIVINE_PORT, 7, 23 + end + +.LetThePlayerOut: + readvar VAR_FACING + ifequal RIGHT, .YouAreFacingRight + applymovement FASTSHIP1F_SAILOR1, FastShip1F_SailorStepAsideMovement + applymovement PLAYER, FastShip1F_PlayerLeavesShipMovement + end + +.YouAreFacingRight: + applymovement FASTSHIP1F_SAILOR1, FastShip1F_SailorStepAsideDownMovement + applymovement PLAYER, FastShip1F_PlayerLeavesShipRightMovement + end + +FastShip1FSailor2Script: + faceplayer + opentext + checkevent EVENT_FAST_SHIP_FIRST_TIME + iftrue .Vermilion + writetext FastShip1FSailor2Text_FirstTime + waitbutton + closetext + end + +.Vermilion: + writetext FastShip1FSailor2Text + waitbutton + closetext + end + +FastShip1FSailor3Script: + jumptextfaceplayer FastShip1FSailor3Text + +WorriedGrandpaSceneRight: + moveobject FASTSHIP1F_GENTLEMAN, 20, 6 + +WorriedGrandpaSceneLeft: + appear FASTSHIP1F_GENTLEMAN + applymovement FASTSHIP1F_GENTLEMAN, FastShip1F_GrandpaRunsInMovement + playsound SFX_TACKLE + applymovement PLAYER, FastShip1F_PlayerHitByGrandpaMovement + applymovement FASTSHIP1F_GENTLEMAN, FastShip1F_GrandpaApproachesPlayerMovement + opentext + writetext FastShip1FGrandpaText + waitbutton + closetext + turnobject PLAYER, RIGHT + applymovement FASTSHIP1F_GENTLEMAN, FastShip1F_GrandpaRunsOutMovement + disappear FASTSHIP1F_GENTLEMAN + setscene SCENE_FASTSHIP1F_NOOP + end + +FastShip1F_SailorStepAsideMovement: + slow_step LEFT + turn_head RIGHT + step_end + +FastShip1F_SailorBlocksDoorMovement: + slow_step RIGHT + turn_head DOWN + step_end + +FastShip1F_SailorStepAsideDownMovement: + slow_step DOWN + turn_head UP + step_end + +FastShip1F_PlayerEntersShipMovement: + step DOWN + step DOWN + turn_head DOWN + step_end + +FastShip1F_GrandpaRunsInMovement: + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + step_end + +FastShip1F_GrandpaApproachesPlayerMovement: + step RIGHT + step_end + +FastShip1F_GrandpaRunsOutMovement: + big_step DOWN + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + step_end + +FastShip1F_PlayerHitByGrandpaMovement: + big_step RIGHT + turn_head LEFT + step_end + +FastShip1F_StepUpMovement: ; unreferenced + step UP + step_end + +FastShip1F_StepDownMovement: ; unreferenced + step DOWN + step_end + +FastShip1F_PlayerLeavesShipMovement: + step UP + step UP + step_end + +FastShip1F_PlayerLeavesShipRightMovement: + step RIGHT + step UP + step_end + +FastShip1FSailor1Text_ToVermilion: + text "FAST SHIP S.S.AQUA" + line "is en route to" + cont "VERMILION CITY." + + para "We will make an" + line "announcement when" + cont "we arrive." + done + +FastShip1FSailor1Text_ToOlivine: + text "FAST SHIP S.S.AQUA" + line "is en route to" + cont "OLIVINE CITY." + + para "We will make an" + line "announcement when" + cont "we arrive." + done + +FastShip1FSailor2Text_FirstTime: + text "Here's your cabin." + + para "If your #MON" + line "are hurt, take a" + cont "nap in the bed." + + para "That will heal" + line "them." + done + +FastShip1FSailor2Text: + text "Here's your cabin." + + para "You can heal your" + line "#MON by taking" + cont "a nap in the bed." + + para "The ship will" + line "arrive while" + cont "you're sleeping." + done + +FastShip1FSailor3Text: + text "The passengers are" + line "all trainers." + + para "They're all itch-" + line "ing to battle in" + cont "their cabins." + done + +FastShip1FGrandpaText: + text "Whoa! Excuse me." + line "I was in a hurry!" + + para "My granddaughter" + line "is missing!" + + para "She's just a wee" + line "girl. If you see" + + para "her, please let me" + line "know!" + done + +FastShip1FSailor1Text_InOlivine: + text "FAST SHIP S.S.AQUA" + line "has arrived in" + cont "OLIVINE CITY." + done + +FastShip1FSailor1Text_InVermilion: + text "FAST SHIP S.S.AQUA" + line "has arrived in" + cont "VERMILION CITY." + done + +FastShip1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 25, 1, FAST_SHIP_1F, -1 + warp_event 27, 8, FAST_SHIP_CABINS_NNW_NNE_NE, 1 + warp_event 23, 8, FAST_SHIP_CABINS_NNW_NNE_NE, 2 + warp_event 19, 8, FAST_SHIP_CABINS_NNW_NNE_NE, 3 + warp_event 15, 8, FAST_SHIP_CABINS_SW_SSW_NW, 1 + warp_event 15, 15, FAST_SHIP_CABINS_SW_SSW_NW, 2 + warp_event 19, 15, FAST_SHIP_CABINS_SW_SSW_NW, 4 + warp_event 23, 15, FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN, 1 + warp_event 27, 15, FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN, 3 + warp_event 3, 13, FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN, 5 + warp_event 6, 12, FAST_SHIP_B1F, 1 + warp_event 30, 14, FAST_SHIP_B1F, 2 + + def_coord_events + coord_event 24, 6, SCENE_FASTSHIP1F_MEET_GRANDPA, WorriedGrandpaSceneLeft + coord_event 25, 6, SCENE_FASTSHIP1F_MEET_GRANDPA, WorriedGrandpaSceneRight + + def_bg_events + + def_object_events + object_event 25, 2, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FastShip1FSailor1Script, -1 + object_event 14, 7, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FastShip1FSailor2Script, -1 + object_event 22, 17, SPRITE_SAILOR, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FastShip1FSailor3Script, -1 + object_event 19, 6, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_FAST_SHIP_1F_GENTLEMAN diff --git a/maps/FastShip1F.blk b/maps/FastShip1F.blk new file mode 100644 index 0000000..093e9dc --- /dev/null +++ b/maps/FastShip1F.blk @@ -0,0 +1 @@ +    $$$$$$$$$$ ?     $$$  $$$$$$$$$ \ No newline at end of file diff --git a/maps/FastShipB1F.asm b/maps/FastShipB1F.asm new file mode 100644 index 0000000..3576e22 --- /dev/null +++ b/maps/FastShipB1F.asm @@ -0,0 +1,475 @@ + object_const_def + const FASTSHIPB1F_SAILOR1 + const FASTSHIPB1F_SAILOR2 + const FASTSHIPB1F_SAILOR3 + const FASTSHIPB1F_LASS + const FASTSHIPB1F_SUPER_NERD + const FASTSHIPB1F_SAILOR4 + const FASTSHIPB1F_FISHER + const FASTSHIPB1F_BLACK_BELT + const FASTSHIPB1F_SAILOR5 + const FASTSHIPB1F_TEACHER + const FASTSHIPB1F_YOUNGSTER1 + const FASTSHIPB1F_YOUNGSTER2 + +FastShipB1F_MapScripts: + def_scene_scripts + scene_script FastShipB1FNoop1Scene, SCENE_FASTSHIPB1F_SAILOR_BLOCKS + scene_script FastShipB1FNoop2Scene, SCENE_FASTSHIPB1F_NOOP + + def_callbacks + +FastShipB1FNoop1Scene: + end + +FastShipB1FNoop2Scene: + end + +FastShipB1FSailorBlocksLeft: + checkevent EVENT_FAST_SHIP_B1F_SAILOR_RIGHT + iftrue FastShipB1FAlreadyBlocked + applymovement FASTSHIPB1F_SAILOR2, FastShipB1FSailorBlocksLeftMovement + moveobject FASTSHIPB1F_SAILOR1, 30, 6 + appear FASTSHIPB1F_SAILOR1 + pause 5 + disappear FASTSHIPB1F_SAILOR2 + end + +FastShipB1FSailorBlocksRight: + checkevent EVENT_FAST_SHIP_B1F_SAILOR_LEFT + iftrue FastShipB1FAlreadyBlocked + applymovement FASTSHIPB1F_SAILOR1, FastShipB1FSailorBlocksRightMovement + moveobject FASTSHIPB1F_SAILOR2, 31, 6 + appear FASTSHIPB1F_SAILOR2 + pause 5 + disappear FASTSHIPB1F_SAILOR1 + end + +FastShipB1FAlreadyBlocked: + end + +FastShipB1FSailorScript: + faceplayer + opentext + checkevent EVENT_FAST_SHIP_FIRST_TIME + iftrue .FirstTime + checkevent EVENT_FAST_SHIP_LAZY_SAILOR + iftrue .LazySailor + checkevent EVENT_FAST_SHIP_INFORMED_ABOUT_LAZY_SAILOR + iftrue .AlreadyInformed + writetext FastShipB1FOnDutySailorText + waitbutton + closetext + setevent EVENT_FAST_SHIP_INFORMED_ABOUT_LAZY_SAILOR + clearevent EVENT_FAST_SHIP_CABINS_NNW_NNE_NE_SAILOR + end + +.AlreadyInformed: + writetext FastShipB1FOnDutySailorRefusedText + waitbutton + closetext + end + +.LazySailor: + writetext FastShipB1FOnDutySailorThanksText + checkevent EVENT_FAST_SHIP_FOUND_GIRL + iffalse .NotFoundGirl + waitbutton + closetext + end + +.NotFoundGirl: + promptbutton + writetext FastShipB1FOnDutySailorSawLittleGirlText + waitbutton + closetext + end + +.FirstTime: + writetext FastShipB1FOnDutySailorDirectionsText + waitbutton + closetext + end + +TrainerSailorJeff: + trainer SAILOR, JEFF, EVENT_BEAT_SAILOR_JEFF, SailorJeffSeenText, SailorJeffBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SailorJeffAfterBattleText + waitbutton + closetext + end + +TrainerPicnickerDebra: + trainer PICNICKER, DEBRA, EVENT_BEAT_PICNICKER_DEBRA, PicnickerDebraSeenText, PicnickerDebraBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PicnickerDebraAfterBattleText + waitbutton + closetext + end + +TrainerJugglerFritz: + trainer JUGGLER, FRITZ, EVENT_BEAT_JUGGLER_FRITZ, JugglerFritzSeenText, JugglerFritzBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext JugglerFritzAfterBattleText + waitbutton + closetext + end + +TrainerSailorGarrett: + trainer SAILOR, GARRETT, EVENT_BEAT_SAILOR_GARRETT, SailorGarrettSeenText, SailorGarrettBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SailorGarrettAfterBattleText + waitbutton + closetext + end + +TrainerFisherJonah: + trainer FISHER, JONAH, EVENT_BEAT_FISHER_JONAH, FisherJonahSeenText, FisherJonahBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherJonahAfterBattleText + waitbutton + closetext + end + +TrainerBlackbeltWai: + trainer BLACKBELT_T, WAI, EVENT_BEAT_BLACKBELT_WAI, BlackbeltWaiSeenText, BlackbeltWaiBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BlackbeltWaiAfterBattleText + waitbutton + closetext + end + +TrainerSailorKenneth: + trainer SAILOR, KENNETH, EVENT_BEAT_SAILOR_KENNETH, SailorKennethSeenText, SailorKennethBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SailorKennethAfterBattleText + waitbutton + closetext + end + +TrainerTeacherShirley: + trainer TEACHER, SHIRLEY, EVENT_BEAT_TEACHER_SHIRLEY, TeacherShirleySeenText, TeacherShirleyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext TeacherShirleyAfterBattleText + waitbutton + closetext + end + +TrainerSchoolboyNate: + trainer SCHOOLBOY, NATE, EVENT_BEAT_SCHOOLBOY_NATE, SchoolboyNateSeenText, SchoolboyNateBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SchoolboyNateAfterBattleText + waitbutton + closetext + end + +TrainerSchoolboyRicky: + trainer SCHOOLBOY, RICKY, EVENT_BEAT_SCHOOLBOY_RICKY, SchoolboyRickySeenText, SchoolboyRickyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SchoolboyRickyAfterBattleText + waitbutton + closetext + end + +FastShipB1FTrashcan: + jumpstd TrashCanScript + +FastShipB1FSailorBlocksRightMovement: + fix_facing + big_step RIGHT + remove_fixed_facing + turn_head DOWN + step_end + +FastShipB1FSailorBlocksLeftMovement: + fix_facing + big_step LEFT + remove_fixed_facing + turn_head DOWN + step_end + +FastShipB1FOnDutySailorText: + text "Hey, kid. Could I" + line "get you to look" + cont "for my buddy?" + + para "He's goofing off" + line "somewhere, that" + cont "lazy bum!" + + para "I want to go find" + line "him, but I'm on" + cont "duty right now." + done + +FastShipB1FOnDutySailorRefusedText: + text "Oh, gee…" + + para "The CAPTAIN will" + line "be furious…" + done + +FastShipB1FOnDutySailorThanksText: + text "Thanks, kid!" + line "I chewed him out" + + para "good so he'll quit" + line "slacking off!" + done + +FastShipB1FOnDutySailorSawLittleGirlText: + text "A little girl?" + + para "I may have seen" + line "her go by here." + done + +FastShipB1FOnDutySailorDirectionsText: + text "The dining room is" + line "up ahead." + + para "The stairs at the" + line "end lead to the" + cont "CAPTAIN's cabin." + done + +SailorJeffSeenText: + text "Nothing beats a" + line "battle when I'm" + cont "on my break." + done + +SailorJeffBeatenText: + text "Win or lose, my" + line "break's over!" + done + +SailorJeffAfterBattleText: + text "I guess I can't" + line "win if I don't get" + cont "serious." + done + +PicnickerDebraSeenText: + text "I'm so bored." + line "Want to battle?" + done + +PicnickerDebraBeatenText: + text "Yow! You're too" + line "strong!" + done + +PicnickerDebraAfterBattleText: + text "SAFFRON, CELADON…" + line "I hear there are" + + para "many big cities" + line "in KANTO." + done + +JugglerFritzSeenText: + text "Urrf…" + line "I'm seasick!" + done + +JugglerFritzBeatenText: + text "I can't move any-" + line "more…" + done + +JugglerFritzAfterBattleText: + text "No more ships for" + line "me. Next time," + + para "I'm taking the" + line "MAGNET TRAIN." + done + +SailorGarrettSeenText: + text "This is where we" + line "sailors work!" + done + +SailorGarrettBeatenText: + text "I lost on my home" + line "field…" + done + +SailorGarrettAfterBattleText: + text "We get different" + line "passengers from" + + para "VERMILION CITY to" + line "OLIVINE CITY." + done + +FisherJonahSeenText: + text "Even though we're" + line "out on the sea, I" + cont "can't fish!" + + para "This is boring!" + line "Let's battle!" + done + +FisherJonahBeatenText: + text "I… I'm not bored" + line "anymore…" + done + +FisherJonahAfterBattleText: + text "I plan to fish off" + line "VERMILION's pier." + done + +BlackbeltWaiSeenText: + text "I'm building up my" + line "legs by bracing" + + para "against the ship's" + line "rocking!" + done + +BlackbeltWaiBeatenText: + text "Rocked and rolled" + line "over!" + done + +BlackbeltWaiAfterBattleText: + text "I couldn't find" + line "the KARATE KING in" + cont "JOHTO." + + para "He's supposed to" + line "be training in a" + cont "cave somewhere." + done + +SailorKennethSeenText: + text "I'm a sailor man!" + + para "But I'm training" + line "#MON, so I can" + cont "become the CHAMP!" + done + +SailorKennethBeatenText: + text "My lack of train-" + line "ing is obvious…" + done + +SailorKennethAfterBattleText: + text "Eight BADGES!" + line "They must prove" + + para "that you've beaten" + line "GYM LEADERS." + + para "No wonder you're" + line "so good!" + done + +TeacherShirleySeenText: + text "Don't lay a finger" + line "on my students!" + done + +TeacherShirleyBeatenText: + text "Aaack!" + done + +TeacherShirleyAfterBattleText: + text "We're on a field" + line "trip to the RUINS" + cont "outside VIOLET." + done + +SchoolboyNateSeenText: + text "Do you know the" + line "RUINS OF ALPH?" + done + +SchoolboyNateBeatenText: + text "Yaargh!" + done + +SchoolboyNateAfterBattleText: + text "Radios pick up" + line "strange signals" + cont "inside the RUINS." + done + +SchoolboyRickySeenText: + text "There are some odd" + line "stone panels in" + cont "the RUINS OF ALPH." + done + +SchoolboyRickyBeatenText: + text "I was done in!" + done + +SchoolboyRickyAfterBattleText: + text "I read that there" + line "are four of those" + cont "stone panels." + done + +FastShipB1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 11, FAST_SHIP_1F, 11 + warp_event 31, 13, FAST_SHIP_1F, 12 + + def_coord_events + coord_event 30, 7, SCENE_FASTSHIPB1F_SAILOR_BLOCKS, FastShipB1FSailorBlocksLeft + coord_event 31, 7, SCENE_FASTSHIPB1F_SAILOR_BLOCKS, FastShipB1FSailorBlocksRight + + def_bg_events + bg_event 27, 9, BGEVENT_READ, FastShipB1FTrashcan + + def_object_events + object_event 30, 6, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FastShipB1FSailorScript, EVENT_FAST_SHIP_B1F_SAILOR_LEFT + object_event 31, 6, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FastShipB1FSailorScript, EVENT_FAST_SHIP_B1F_SAILOR_RIGHT + object_event 9, 11, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSailorJeff, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP + object_event 6, 4, SPRITE_LASS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerPicnickerDebra, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP + object_event 26, 9, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerJugglerFritz, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP + object_event 17, 4, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSailorGarrett, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND + object_event 25, 8, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerFisherJonah, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND + object_event 15, 11, SPRITE_BLACK_BELT, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBlackbeltWai, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND + object_event 23, 4, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSailorKenneth, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND + object_event 9, 11, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerTeacherShirley, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND + object_event 14, 9, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerSchoolboyNate, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND + object_event 14, 11, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerSchoolboyRicky, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND diff --git a/maps/FastShipB1F.blk b/maps/FastShipB1F.blk new file mode 100644 index 0000000..3b1aecd --- /dev/null +++ b/maps/FastShipB1F.blk @@ -0,0 +1 @@ +  '++++++++++++' ' && ' ' ! 5!' : **! 6666!' ' --! 6666!: '"%%%%#"%%%%#' \ No newline at end of file diff --git a/maps/FastShipCabins_NNW_NNE_NE.asm b/maps/FastShipCabins_NNW_NNE_NE.asm new file mode 100644 index 0000000..97284bd --- /dev/null +++ b/maps/FastShipCabins_NNW_NNE_NE.asm @@ -0,0 +1,289 @@ + object_const_def + const FASTSHIPCABINS_NNW_NNE_NE_COOLTRAINER_M + const FASTSHIPCABINS_NNW_NNE_NE_COOLTRAINER_F + const FASTSHIPCABINS_NNW_NNE_NE_SUPER_NERD + const FASTSHIPCABINS_NNW_NNE_NE_POKEFAN_M + const FASTSHIPCABINS_NNW_NNE_NE_SAILOR + const FASTSHIPCABINS_NNW_NNE_NE_GENTLEMAN + const FASTSHIPCABINS_NNW_NNE_NE_PHARMACIST + +FastShipCabins_NNW_NNE_NE_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerCooltrainermSean: + trainer COOLTRAINERM, SEAN, EVENT_BEAT_COOLTRAINERM_SEAN, CooltrainermSeanSeenText, CooltrainermSeanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainermSeanAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainerfCarol: + trainer COOLTRAINERF, CAROL, EVENT_BEAT_COOLTRAINERF_CAROL, CooltrainerfCarolSeenText, CooltrainerfCarolBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainerfCarolAfterBattleText + waitbutton + closetext + end + +TrainerPokemaniacEthan: + trainer POKEMANIAC, ETHAN, EVENT_BEAT_POKEMANIAC_ETHAN, PokemaniacEthanSeenText, PokemaniacEthanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokemaniacEthanAfterBattleText + waitbutton + closetext + end + +TrainerHikerNoland: + trainer HIKER, NOLAND, EVENT_BEAT_HIKER_NOLAND, HikerNolandSeenText, HikerNolandBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerNolandAfterBattleText + waitbutton + closetext + end + +TrainerGentlemanEdward: + trainer GENTLEMAN, EDWARD, EVENT_BEAT_GENTLEMAN_EDWARD, GentlemanEdwardSeenText, GentlemanEdwardBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GentlemanEdwardAfterBattleText + waitbutton + closetext + end + +TrainerBurglarCorey: + trainer BURGLAR, COREY, EVENT_BEAT_BURGLAR_COREY, BurglarCoreySeenText, BurglarCoreyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BurglarCoreyAfterBattleText + waitbutton + closetext + end + +FastShipLazySailorScript: + playmusic MUSIC_HIKER_ENCOUNTER + faceplayer + opentext + writetext SailorStanlySeenText + waitbutton + closetext + winlosstext SailorStanlyBeatenText, 0 + loadtrainer SAILOR, STANLY + startbattle + reloadmap + special HealParty + setevent EVENT_BEAT_SAILOR_STANLY + opentext + writetext SailorStanlyAfterBattleText + waitbutton + closetext + setevent EVENT_FAST_SHIP_LAZY_SAILOR + setmapscene FAST_SHIP_B1F, SCENE_FASTSHIPB1F_NOOP + readvar VAR_FACING + ifequal RIGHT, .Movement2 + applymovement FASTSHIPCABINS_NNW_NNE_NE_SAILOR, FastShipLazySailorLeavesMovement1 + playsound SFX_EXIT_BUILDING + disappear FASTSHIPCABINS_NNW_NNE_NE_SAILOR + waitsfx + end + +.Movement2: + applymovement FASTSHIPCABINS_NNW_NNE_NE_SAILOR, FastShipLazySailorLeavesMovement2 + playsound SFX_EXIT_BUILDING + disappear FASTSHIPCABINS_NNW_NNE_NE_SAILOR + waitsfx + end + +FastShipCabins_NNW_NNE_NETrashcan: + jumpstd TrashCanScript + +FastShipLazySailorLeavesMovement1: + step LEFT + step LEFT + step UP + step UP + step_end + +FastShipLazySailorLeavesMovement2: + step DOWN + step LEFT + step LEFT + step UP + step UP + step UP + step_end + +CooltrainermSeanSeenText: + text "I'm going to KANTO" + line "to test my skills." + done + +CooltrainermSeanBeatenText: + text "I wanted to win!" + done + +CooltrainermSeanAfterBattleText: + text "Trainers from" + line "JOHTO can battle" + + para "with KANTO GYM" + line "LEADERS." + done + +CooltrainerfCarolSeenText: + text "I'm training to" + line "become the CHAMP!" + done + +CooltrainerfCarolBeatenText: + text "What's so differ-" + line "ent between us?" + done + +CooltrainerfCarolAfterBattleText: + text "I'm going to beat" + line "you someday!" + done + +PokemaniacEthanSeenText: + text "Do you know LILY?" + line "She's a hot DJ in" + cont "KANTO." + done + +PokemaniacEthanBeatenText: + text "Gyaaaah!" + done + +PokemaniacEthanAfterBattleText: + text "LILY's nice, but" + line "MARY's the best!" + + para "I want to check" + line "out JOHTO's radio" + cont "programs!" + done + +HikerNolandSeenText: + text "Are you alone?" + line "Then let's battle!" + done + +HikerNolandBeatenText: + text "That's too much to" + line "handle!" + done + +HikerNolandAfterBattleText: + text "I wonder if there" + line "are any mountains" + + para "worth climbing in" + line "KANTO?" + done + +SailorStanlySeenText: + text "Yeah, I'm a sail-" + line "or, all right." + + para "I wasn't goofing" + line "off!" + + para "This cabin was" + line "vacant, so I just" + cont "took a quick nap!" + + para "Ah, forget it!" + line "Let's battle!" + done + +SailorStanlyBeatenText: + text "Sorry! It's all my" + line "fault!" + done + +SailorStanlyAfterBattleText: + text "Being a sailor, I" + line "have to do phys-" + cont "ical labor. It's" + cont "exhausting!" + done + +GentlemanEdwardSeenText: + text "Oh, no. I've lost" + line "something that's" + cont "very important." + done + +GentlemanEdwardBeatenText: + text "I… I can't find" + line "it…" + done + +GentlemanEdwardAfterBattleText: + text "I give up." + line "You don't have to" + + para "look. Just forget" + line "about it!" + done + +BurglarCoreySeenText: + text "Yeehaw!" + line "Lucky!" + done + +BurglarCoreyBeatenText: + text "How unlucky!" + line "I lost!" + done + +BurglarCoreyAfterBattleText: + text "I found a pretty" + line "coin here." + + para "Someone must have" + line "lost it…" + done + +FastShipCabins_NNW_NNE_NE_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 0, FAST_SHIP_1F, 2 + warp_event 2, 12, FAST_SHIP_1F, 3 + warp_event 2, 24, FAST_SHIP_1F, 4 + + def_coord_events + + def_bg_events + bg_event 6, 13, BGEVENT_READ, FastShipCabins_NNW_NNE_NETrashcan + bg_event 7, 19, BGEVENT_READ, FastShipCabins_NNW_NNE_NETrashcan + bg_event 7, 31, BGEVENT_READ, FastShipCabins_NNW_NNE_NETrashcan + + def_object_events + object_event 4, 3, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerCooltrainermSean, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND + object_event 1, 5, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfCarol, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND + object_event 1, 5, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacEthan, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND + object_event 4, 17, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerHikerNoland, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP + object_event 4, 26, SPRITE_SAILOR, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FastShipLazySailorScript, EVENT_FAST_SHIP_CABINS_NNW_NNE_NE_SAILOR + object_event 7, 30, SPRITE_GENTLEMAN, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerGentlemanEdward, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND + object_event 2, 30, SPRITE_PHARMACIST, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 4, TrainerBurglarCorey, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND diff --git a/maps/FastShipCabins_NNW_NNE_NE.blk b/maps/FastShipCabins_NNW_NNE_NE.blk new file mode 100644 index 0000000..fd03405 --- /dev/null +++ b/maps/FastShipCabins_NNW_NNE_NE.blk @@ -0,0 +1,6 @@ + + +8 9 , + +/ * , 5 + 77 66 5 \ No newline at end of file diff --git a/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm new file mode 100644 index 0000000..2bdc7c2 --- /dev/null +++ b/maps/FastShipCabins_SE_SSE_CaptainsCabin.asm @@ -0,0 +1,490 @@ + object_const_def + const FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_CAPTAIN + const FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_GENTLEMAN + const FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1 + const FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN2 + const FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_POKEFAN_M1 + const FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN3 + const FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN4 + const FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_SUPER_NERD1 + const FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_POKEFAN_M2 + const FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_POKEFAN_F + const FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_SUPER_NERD2 + +FastShipCabins_SE_SSE_CaptainsCabin_MapScripts: + def_scene_scripts + + def_callbacks + +FastShipCabins_SE_SSE_CaptainsCabinNoopScene: ; unreferenced + end + +SSAquaCaptain: + faceplayer + opentext + checkevent EVENT_FAST_SHIP_FIRST_TIME + iftrue .LaterTrip + writetext SSAquaCaptainExhaustingText + waitbutton + closetext + end + +.LaterTrip: + writetext SSAquaCaptainHowDoYouLikeText + waitbutton + closetext + end + +SSAquaGranddaughterBefore: + turnobject FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN2, RIGHT + opentext + writetext SSAquaGranddaughterCaptainPlayWithMeText + waitbutton + closetext + faceplayer + opentext + writetext SSAquaGranddaughterHasToFindGrandpaText + waitbutton + closetext + special FadeBlackQuickly + special ReloadSpritesNoPalettes + disappear FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN2 + applymovement PLAYER, SSAquaCaptainsCabinWarpsToGrandpasCabinMovement + moveobject FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1, 3, 19 + appear FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1 + turnobject PLAYER, UP + turnobject FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1, UP + special FadeInQuickly + turnobject FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_GENTLEMAN, DOWN + showemote EMOTE_SHOCK, FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_GENTLEMAN, 15 + applymovement FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN1, SSAquaGranddaughterEntersCabinMovement + turnobject FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_GENTLEMAN, RIGHT + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .PlayerIsFemale + opentext + writetext SSAquaGranddaughterWasPlayingMText + waitbutton + closetext + sjump .cont + +.PlayerIsFemale: + opentext + writetext SSAquaGranddaughterWasPlayingFText + waitbutton + closetext +.cont: + turnobject FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_TWIN2, DOWN + applymovement FASTSHIPCABINS_SE_SSE_CAPTAINSCABIN_GENTLEMAN, SSAquaGrandpaApproachesPlayerMovement + opentext + writetext SSAquaEntertainedGranddaughterText + promptbutton + setevent EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY + setmapscene FAST_SHIP_1F, SCENE_FASTSHIP1F_NOOP + sjump SSAquaMetalCoatAndDocking + +SSAquaGrandpa: + faceplayer + opentext + checkevent EVENT_GOT_METAL_COAT_FROM_GRANDPA_ON_SS_AQUA + iftrue SSAquaGotMetalCoat + checkevent EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_2 + iftrue SSAquaFoundGranddaughter + writetext SSAquaCantFindGranddaughterText + waitbutton + closetext + setmapscene FAST_SHIP_1F, SCENE_FASTSHIP1F_NOOP + end + +SSAquaMetalCoatAndDocking: + writetext SSAquaGrandpaHaveThisText + promptbutton + verbosegiveitem METAL_COAT + iffalse .NoRoom + setevent EVENT_GOT_METAL_COAT_FROM_GRANDPA_ON_SS_AQUA +.NoRoom: + closetext + waitsfx + playsound SFX_ELEVATOR_END + pause 30 + opentext + writetext SSAquaHasArrivedVermilionText + waitbutton + setevent EVENT_FAST_SHIP_HAS_ARRIVED + setevent EVENT_FAST_SHIP_FOUND_GIRL + closetext + end + +SSAquaFoundGranddaughter: + writetext SSAquaGrandpaHaveThisText + promptbutton + verbosegiveitem METAL_COAT + iffalse .NoRoom + setevent EVENT_GOT_METAL_COAT_FROM_GRANDPA_ON_SS_AQUA +.NoRoom: + closetext + end + +SSAquaGotMetalCoat: + writetext SSAquaGrandpaTravellingText + waitbutton + closetext + end + +SSAquaGranddaughterAfter: + faceplayer + opentext + writetext SSAquaGranddaughterHadFunText + waitbutton + closetext + end + +TrainerPokefanmColin: + trainer POKEFANM, COLIN, EVENT_BEAT_POKEFANM_COLIN, PokefanmColinSeenText, PokefanmColinBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanmColinAfterBattleText + waitbutton + closetext + end + +TrainerTwinsMegandpeg1: + trainer TWINS, MEGANDPEG1, EVENT_BEAT_TWINS_MEG_AND_PEG, TwinsMegandpeg1SeenText, TwinsMegandpeg1BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext TwinsMegandpeg1AfterBattleText + waitbutton + closetext + end + +TrainerTwinsMegandpeg2: + trainer TWINS, MEGANDPEG2, EVENT_BEAT_TWINS_MEG_AND_PEG, TwinsMegandpeg2SeenText, TwinsMegandpeg2BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext TwinsMegandpeg2AfterBattleText + waitbutton + closetext + end + +TrainerPsychicRodney: + trainer PSYCHIC_T, RODNEY, EVENT_BEAT_PSYCHIC_RODNEY, PsychicRodneySeenText, PsychicRodneyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PsychicRodneyAfterBattleText + waitbutton + closetext + end + +TrainerPokefanmJeremy: + trainer POKEFANM, JEREMY, EVENT_BEAT_POKEFANM_JEREMY, PokefanmJeremySeenText, PokefanmJeremyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanmJeremyAfterBattleText + waitbutton + closetext + end + +TrainerPokefanfGeorgia: + trainer POKEFANF, GEORGIA, EVENT_BEAT_POKEFANF_GEORGIA, PokefanfGeorgiaSeenText, PokefanfGeorgiaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanfGeorgiaAfterBattleText + waitbutton + closetext + end + +TrainerSupernerdShawn: + trainer SUPER_NERD, SHAWN, EVENT_BEAT_SUPER_NERD_SHAWN, SupernerdShawnSeenText, SupernerdShawnBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SupernerdShawnAfterBattleText + waitbutton + closetext + end + +FastShipCaptainsCabinTrashcan: + jumpstd TrashCanScript + +SSAquaCaptainsCabinWarpsToGrandpasCabinMovement: + big_step RIGHT + big_step UP + big_step UP + big_step UP + big_step UP + big_step UP + big_step UP + step_end + +SSAquaGranddaughterEntersCabinMovement: + step UP + step UP + turn_head LEFT + step_end + +SSAquaGrandpaApproachesPlayerMovement: + step DOWN + step_end + +SSAquaCaptainExhaustingText: + text "Whew! Thanks for" + line "coming along." + + para "Keeping that lit-" + line "tle girl amused" + cont "was exhausting." + done + +SSAquaCaptainHowDoYouLikeText: + text "How do you like" + line "S.S.AQUA's ride?" + + para "She practically" + line "skates across the" + cont "waves." + done + +SSAquaCantFindGranddaughterText: + text "Oh, hello…" + + para "I still can't find" + line "my granddaughter." + + para "If she's on the" + line "ship, that's OK." + + para "She's an energetic" + line "child, so she may" + + para "be bugging some-" + line "one. I'm worried…" + done + +SSAquaEntertainedGranddaughterText: + text ", was it?" + line "I heard you enter-" + cont "tained my grand-" + cont "daughter." + + para "I want to thank" + line "you for that." + done + +SSAquaGrandpaHaveThisText: + text "I know! I'd like" + line "you to have this!" + done + +SSAquaGrandpaTravellingText: + text "We're traveling" + line "around the world." + done + +SSAquaGranddaughterCaptainPlayWithMeText: + text "CAPTAIN, play with" + line "me, please?" + + para "I'm bored! I want" + line "to play more!" + done + +SSAquaGranddaughterHasToFindGrandpaText: + text "Hi! Will you play" + line "with me?" + + para "…Oh!" + + para "Grandpa's worried" + line "about me?" + + para "I have to go!" + + para "I have to go find" + line "Grandpa!" + done + +SSAquaGranddaughterWasPlayingMText: + text "Grandpa, here I" + line "am! I was playing" + + para "with the CAPTAIN" + line "and this guy!" + done + +SSAquaGranddaughterWasPlayingFText: + text "Grandpa, here I" + line "am! I was playing" + + para "with the CAPTAIN" + line "and this big girl!" + done + +SSAquaGranddaughterHadFunText: + text "I had lots of fun" + line "playing!" + done + +PokefanmColinSeenText: + text "Hey, kid! Want to" + line "battle with me?" + done + +PokefanmColinBeatenText: + text "You're strong!" + done + +PokefanmColinAfterBattleText: + text "You're traveling" + line "all alone?" + + para "Isn't your mom" + line "worried?" + done + +TwinsMegandpeg1SeenText: + text "You think I'm a" + line "baby?" + cont "That's not fair!" + done + +TwinsMegandpeg1BeatenText: + text "Oh! We lost!" + done + +TwinsMegandpeg1AfterBattleText: + text "Baby is a rude" + line "name to call us" + cont "girls!" + done + +TwinsMegandpeg2SeenText: + text "I'm not a baby!" + + para "That's not nice to" + line "say to a lady!" + done + +TwinsMegandpeg2BeatenText: + text "Oh! We lost!" + done + +TwinsMegandpeg2AfterBattleText: + text "Sometimes, kids" + line "are smarter than" + cont "grown-ups!" + done + +PsychicRodneySeenText: + text "Ssh! My brain is" + line "picking up radio" + cont "signals!" + done + +PsychicRodneyBeatenText: + text "…I hear some-" + line "thing!" + done + +PsychicRodneyAfterBattleText: + text "I get it. You can" + line "hear JOHTO's radio" + cont "on the FAST SHIP." + done + +PokefanmJeremySeenText: + text "What do you think?" + line "My #MON are" + cont "beautiful, yes?" + done + +PokefanmJeremyBeatenText: + text "Oh, no! My beauti-" + line "ful #MON!" + done + +PokefanmJeremyAfterBattleText: + text "I must go to the" + line "#MON SALON and" + cont "fix them up nice!" + done + +PokefanfGeorgiaSeenText: + text "I'm going to shop" + line "at the DEPT.STORE" + cont "and then…" + done + +PokefanfGeorgiaBeatenText: + text "What was I going" + line "to do?" + done + +PokefanfGeorgiaAfterBattleText: + text "Oh, yes! I have to" + line "get my #MON out" + cont "of DAY-CARE!" + done + +SupernerdShawnSeenText: + text "What kinds of #" + line "BALLS do you have" + cont "with you?" + done + +SupernerdShawnBeatenText: + text "Wait! Stop! Don't!" + line "Please!" + done + +SupernerdShawnAfterBattleText: + text "You should use the" + line "right BALLS to fit" + cont "the situation." + done + +SSAquaHasArrivedVermilionText: + text "FAST SHIP S.S.AQUA" + line "has arrived in" + cont "VERMILION CITY." + done + +FastShipCabins_SE_SSE_CaptainsCabin_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, FAST_SHIP_1F, 8 + warp_event 3, 7, FAST_SHIP_1F, 8 + warp_event 2, 19, FAST_SHIP_1F, 9 + warp_event 3, 19, FAST_SHIP_1F, 9 + warp_event 2, 33, FAST_SHIP_1F, 10 + warp_event 3, 33, FAST_SHIP_1F, 10 + + def_coord_events + + def_bg_events + bg_event 4, 25, BGEVENT_READ, FastShipCaptainsCabinTrashcan + + def_object_events + object_event 3, 25, SPRITE_CAPTAIN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SSAquaCaptain, -1 + object_event 2, 17, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SSAquaGrandpa, EVENT_FAST_SHIP_CABINS_SE_SSE_GENTLEMAN + object_event 3, 17, SPRITE_TWIN, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SSAquaGranddaughterAfter, EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_1 + object_event 2, 25, SPRITE_TWIN, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SSAquaGranddaughterBefore, EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_2 + object_event 5, 6, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 5, TrainerPokefanmColin, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP + object_event 2, 4, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsMegandpeg1, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP + object_event 3, 4, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsMegandpeg2, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP + object_event 5, 5, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerPsychicRodney, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND + object_event 2, 3, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmJeremy, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND + object_event 5, 5, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerPokefanfGeorgia, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND + object_event 1, 15, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerSupernerdShawn, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND diff --git a/maps/FastShipCabins_SE_SSE_CaptainsCabin.blk b/maps/FastShipCabins_SE_SSE_CaptainsCabin.blk new file mode 100644 index 0000000..4afad71 --- /dev/null +++ b/maps/FastShipCabins_SE_SSE_CaptainsCabin.blk @@ -0,0 +1,9 @@ + + + + + 66  * - + + +8 9 ,,  +0/78 23 9   - \ No newline at end of file diff --git a/maps/FastShipCabins_SW_SSW_NW.asm b/maps/FastShipCabins_SW_SSW_NW.asm new file mode 100644 index 0000000..339d051 --- /dev/null +++ b/maps/FastShipCabins_SW_SSW_NW.asm @@ -0,0 +1,244 @@ + object_const_def + const FASTSHIPCABINS_SW_SSW_NW_FISHER + const FASTSHIPCABINS_SW_SSW_NW_BUG_CATCHER + const FASTSHIPCABINS_SW_SSW_NW_BEAUTY + const FASTSHIPCABINS_SW_SSW_NW_ROCKER + +FastShipCabins_SW_SSW_NW_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerFirebreatherLyle: + trainer FIREBREATHER, LYLE, EVENT_BEAT_FIREBREATHER_LYLE, FirebreatherLyleSeenText, FirebreatherLyleBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FirebreatherLyleAfterBattleText + waitbutton + closetext + end + +TrainerBugCatcherKen: + trainer BUG_CATCHER, KEN, EVENT_BEAT_BUG_CATCHER_KEN, BugCatcherKenSeenText, BugCatcherKenBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BugCatcherKenAfterBattleText + waitbutton + closetext + end + +TrainerBeautyCassie: + trainer BEAUTY, CASSIE, EVENT_BEAT_BEAUTY_CASSIE, BeautyCassieSeenText, BeautyCassieBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BeautyCassieAfterBattleText + waitbutton + closetext + end + +TrainerGuitaristClyde: + trainer GUITARIST, CLYDE, EVENT_BEAT_GUITARIST_CLYDE, GuitaristClydeSeenText, GuitaristClydeBeatenText, 0, .Script + +.Script: + endifjustbattled + special Mobile_DummyReturnFalse + iftrue .mobile + opentext + writetext GuitaristClydeAfterBattleText + waitbutton + closetext + end + +.mobile + opentext + writetext GuitaristClydeAfterBattleMobileText + waitbutton + closetext + end + +FastShipBed: + opentext + writetext FastShipBedText1 + waitbutton + closetext + special FadeBlackQuickly + special ReloadSpritesNoPalettes + special StubbedTrainerRankings_Healings + special HealParty + playmusic MUSIC_HEAL + pause 60 + special RestartMapMusic + special FadeInQuickly + opentext + writetext FastShipBedText2 + waitbutton + closetext + checkevent EVENT_FAST_SHIP_HAS_ARRIVED + iftrue .AlreadyArrived + checkevent EVENT_FAST_SHIP_FOUND_GIRL + iftrue .CanArrive + checkevent EVENT_FAST_SHIP_FIRST_TIME + iftrue .CanArrive +.AlreadyArrived: + end + +.CanArrive: + playsound SFX_ELEVATOR_END + pause 30 + checkevent EVENT_FAST_SHIP_DESTINATION_OLIVINE + iftrue .ArrivedOlivine + opentext + writetext FastShipArrivedVermilionText + waitbutton + closetext + setevent EVENT_FAST_SHIP_HAS_ARRIVED + end + +.ArrivedOlivine: + opentext + writetext FastShipArrivedOlivineText + waitbutton + closetext + setevent EVENT_FAST_SHIP_HAS_ARRIVED + end + +FastShipCabinsNorthwestCabinTrashcan: + jumpstd TrashCanScript + +FirebreatherLyleSeenText: + text "I'm going to KANTO" + line "to put on fire-" + cont "breathing shows!" + done + +FirebreatherLyleBeatenText: + text "Fizzle… The" + line "flame's tiny…" + done + +FirebreatherLyleAfterBattleText: + text "I guess fire is" + line "weak on the sea." + + para "It doesn't matter?" + line "Really?" + done + +BugCatcherKenSeenText: + text "I'm visiting my" + line "grandma to catch" + cont "me some bugs!" + done + +BugCatcherKenBeatenText: + text "Ooh, wow." + line "You're tough!" + done + +BugCatcherKenAfterBattleText: + text "You can find lots" + line "of #MON in the" + cont "trees of JOHTO!" + done + +BeautyCassieSeenText: + text "I'm trying to" + line "forget my woes." + cont "Let's battle!" + done + +BeautyCassieBeatenText: + text "My heart weeps…" + done + +BeautyCassieAfterBattleText: + text "A voyage is best" + line "for getting over" + cont "a broken heart." + + para "But a FAST SHIP" + line "trip is too short" + cont "for grieving." + done + +GuitaristClydeSeenText: + text "I'm going to audi-" + line "tion my songs at" + + para "GOLDENROD's RADIO" + line "STATION." + done + +GuitaristClydeBeatenText: + text "Yowza!" + line "Total distortion!" + done + +GuitaristClydeAfterBattleMobileText: + text "I was going to" + line "make my debut at" + cont "the BATTLE TOWER…" + + para "I should go back" + line "to VERMILION and" + cont "redo my training…" + done + +GuitaristClydeAfterBattleText: + text "Speaking of the" + line "RADIO STATION," + + para "what's this week's" + line "lucky number?" + done + +FastShipBedText1: + text "A comfy bed!" + line "Time to sleep…" + done + +FastShipBedText2: + text "Ah, refreshed and" + line "restored!" + done + +FastShipArrivedOlivineText: + text "FAST SHIP S.S.AQUA" + line "has arrived in" + cont "OLIVINE CITY." + done + +FastShipArrivedVermilionText: + text "FAST SHIP S.S.AQUA" + line "has arrived in" + cont "VERMILION CITY." + done + +FastShipCabins_SW_SSW_NW_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 0, FAST_SHIP_1F, 5 + warp_event 2, 19, FAST_SHIP_1F, 6 + warp_event 3, 19, FAST_SHIP_1F, 6 + warp_event 2, 31, FAST_SHIP_1F, 7 + warp_event 3, 31, FAST_SHIP_1F, 7 + + def_coord_events + + def_bg_events + bg_event 7, 1, BGEVENT_READ, FastShipBed + bg_event 7, 2, BGEVENT_READ, FastShipBed + bg_event 7, 7, BGEVENT_READ, FastShipCabinsNorthwestCabinTrashcan + + def_object_events + object_event 1, 15, SPRITE_FISHER, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerFirebreatherLyle, EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP + object_event 6, 15, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerBugCatcherKen, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND + object_event 1, 26, SPRITE_BEAUTY, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBeautyCassie, EVENT_FAST_SHIP_PASSENGERS_EASTBOUND + object_event 3, 28, SPRITE_ROCKER, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerGuitaristClyde, EVENT_FAST_SHIP_PASSENGERS_WESTBOUND diff --git a/maps/FastShipCabins_SW_SSW_NW.blk b/maps/FastShipCabins_SW_SSW_NW.blk new file mode 100644 index 0000000..4a2e771 --- /dev/null +++ b/maps/FastShipCabins_SW_SSW_NW.blk @@ -0,0 +1,8 @@ +4 +89- 5 + + + +--  6 7 + +7 6  6 \ No newline at end of file diff --git a/maps/FightingDojo.asm b/maps/FightingDojo.asm new file mode 100644 index 0000000..afb87b4 --- /dev/null +++ b/maps/FightingDojo.asm @@ -0,0 +1,58 @@ + object_const_def + const FIGHTINGDOJO_BLACK_BELT + const FIGHTINGDOJO_POKE_BALL + +FightingDojo_MapScripts: + def_scene_scripts + + def_callbacks + +FightingDojoBlackBelt: + jumptextfaceplayer FightingDojoBlackBeltText + +FightingDojoSign1: + jumptext FightingDojoSign1Text + +FightingDojoSign2: + jumptext FightingDojoSign2Text + +FightingDojoFocusBand: + itemball FOCUS_BAND + +FightingDojoBlackBeltText: + text "Hello!" + + para "KARATE KING, the" + line "FIGHTING DOJO's" + + para "master, is in a" + line "cave in JOHTO for" + cont "training." + done + +FightingDojoSign1Text: + text "What goes around" + line "comes around!" + done + +FightingDojoSign2Text: + text "Enemies on every" + line "side!" + done + +FightingDojo_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 11, SAFFRON_CITY, 1 + warp_event 5, 11, SAFFRON_CITY, 1 + + def_coord_events + + def_bg_events + bg_event 4, 0, BGEVENT_READ, FightingDojoSign1 + bg_event 5, 0, BGEVENT_READ, FightingDojoSign2 + + def_object_events + object_event 4, 4, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FightingDojoBlackBelt, -1 + object_event 3, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, FightingDojoFocusBand, EVENT_PICKED_UP_FOCUS_BAND diff --git a/maps/FightingDojo.blk b/maps/FightingDojo.blk new file mode 100644 index 0000000..2cf2b0c --- /dev/null +++ b/maps/FightingDojo.blk @@ -0,0 +1 @@ +$(%)$'&&'&' \ No newline at end of file diff --git a/maps/FuchsiaCity.asm b/maps/FuchsiaCity.asm new file mode 100644 index 0000000..5fe9f0b --- /dev/null +++ b/maps/FuchsiaCity.asm @@ -0,0 +1,157 @@ + object_const_def + const FUCHSIACITY_YOUNGSTER + const FUCHSIACITY_POKEFAN_M + const FUCHSIACITY_TEACHER + const FUCHSIACITY_FRUIT_TREE + +FuchsiaCity_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, FuchsiaCityFlypointCallback + +FuchsiaCityFlypointCallback: + setflag ENGINE_FLYPOINT_FUCHSIA + endcallback + +FuchsiaCityYoungster: + jumptextfaceplayer FuchsiaCityYoungsterText + +FuchsiaCityPokefanM: + jumptextfaceplayer FuchsiaCityPokefanMText + +FuchsiaCityTeacher: + jumptextfaceplayer FuchsiaCityTeacherText + +FuchsiaCitySign: + jumptext FuchsiaCitySignText + +FuchsiaGymSign: + jumptext FuchsiaGymSignText + +SafariZoneOfficeSign: + jumptext SafariZoneOfficeSignText + +WardensHomeSign: + jumptext WardensHomeSignText + +SafariZoneClosedSign: + jumptext SafariZoneClosedSignText + +NoLitteringSign: + jumptext NoLitteringSignText + +FuchsiaCityPokecenterSign: + jumpstd PokecenterSignScript + +FuchsiaCityMartSign: + jumpstd MartSignScript + +FuchsiaCityFruitTree: + fruittree FRUITTREE_FUCHSIA_CITY + +FuchsiaCityYoungsterText: + text "One of the ELITE" + line "FOUR used to be" + + para "the LEADER of" + line "FUCHSIA's GYM." + done + +FuchsiaCityPokefanMText: + text "KOGA's daughter" + line "succeeded him as" + + para "the GYM LEADER" + line "after he joined" + cont "the ELITE FOUR." + done + +FuchsiaCityTeacherText: + text "The SAFARI ZONE is" + line "closed… It's sad," + + para "considering it's" + line "FUCHSIA's main" + cont "attraction." + done + +FuchsiaCitySignText: + text "FUCHSIA CITY" + + para "Behold! It's" + line "Passion Pink!" + done + +FuchsiaGymSignText: + text "FUCHSIA CITY" + line "#MON GYM" + cont "LEADER: JANINE" + + para "The Poisonous" + line "Ninja Master" + done + +SafariZoneOfficeSignText: + text "There's a notice" + line "here…" + + para "SAFARI ZONE OFFICE" + line "is closed until" + cont "further notice." + done + +WardensHomeSignText: + text "SAFARI ZONE" + line "WARDEN'S HOME" + done + +SafariZoneClosedSignText: + text "The WARDEN is" + line "traveling abroad." + + para "Therefore, the" + line "SAFARI ZONE is" + cont "closed." + done + +NoLitteringSignText: + text "No littering." + + para "Please take your" + line "waste with you." + done + +FuchsiaCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 13, FUCHSIA_MART, 2 + warp_event 22, 13, SAFARI_ZONE_MAIN_OFFICE, 1 + warp_event 8, 27, FUCHSIA_GYM, 1 + warp_event 11, 27, BILLS_BROTHERS_HOUSE, 1 + warp_event 19, 27, FUCHSIA_POKECENTER_1F, 1 + warp_event 27, 27, SAFARI_ZONE_WARDENS_HOME, 1 + warp_event 18, 3, SAFARI_ZONE_FUCHSIA_GATE_BETA, 3 ; inaccessible + warp_event 37, 22, ROUTE_15_FUCHSIA_GATE, 1 + warp_event 37, 23, ROUTE_15_FUCHSIA_GATE, 2 + warp_event 7, 35, ROUTE_19_FUCHSIA_GATE, 1 + warp_event 8, 35, ROUTE_19_FUCHSIA_GATE, 2 + + def_coord_events + + def_bg_events + bg_event 21, 15, BGEVENT_READ, FuchsiaCitySign + bg_event 5, 29, BGEVENT_READ, FuchsiaGymSign + bg_event 25, 15, BGEVENT_READ, SafariZoneOfficeSign + bg_event 27, 29, BGEVENT_READ, WardensHomeSign + bg_event 17, 5, BGEVENT_READ, SafariZoneClosedSign + bg_event 13, 15, BGEVENT_READ, NoLitteringSign + bg_event 20, 27, BGEVENT_READ, FuchsiaCityPokecenterSign + bg_event 6, 13, BGEVENT_READ, FuchsiaCityMartSign + + def_object_events + object_event 23, 18, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, FuchsiaCityYoungster, -1 + object_event 13, 8, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, FuchsiaCityPokefanM, -1 + object_event 16, 14, SPRITE_TEACHER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, FuchsiaCityTeacher, -1 + object_event 8, 1, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FuchsiaCityFruitTree, -1 diff --git a/maps/FuchsiaCity.blk b/maps/FuchsiaCity.blk new file mode 100644 index 0000000..b46ef2c --- /dev/null +++ b/maps/FuchsiaCity.blk @@ -0,0 +1,25 @@ + + + T! +ooo7}~ttttntmVUw +t + +6nwtttt{oowwwwwwwttt{tttn{{ + + + + +t + +t !oooo`{ T!tlltt +t|s{{{ + + +7:~owtto +oooooy{{nVUVmttngm + +nUllllllllkkkPRR`Uwwww11U_t1 +>?????????;_t + + +7N$ WWWW !%_89nNX0|rY1<=01nNX11111111Y_Vw1wnNZ\oo\ooo[11nPRRlt>?;RRRRRRRRn>?;FJ11(,) \ No newline at end of file diff --git a/maps/FuchsiaGym.asm b/maps/FuchsiaGym.asm new file mode 100644 index 0000000..1560c98 --- /dev/null +++ b/maps/FuchsiaGym.asm @@ -0,0 +1,400 @@ + object_const_def + const FUCHSIAGYM_JANINE + const FUCHSIAGYM_FUCHSIA_GYM_1 + const FUCHSIAGYM_FUCHSIA_GYM_2 + const FUCHSIAGYM_FUCHSIA_GYM_3 + const FUCHSIAGYM_FUCHSIA_GYM_4 + const FUCHSIAGYM_GYM_GUIDE + +FuchsiaGym_MapScripts: + def_scene_scripts + + def_callbacks + +FuchsiaGymJanineScript: + checkflag ENGINE_SOULBADGE + iftrue .FightDone + applymovement FUCHSIAGYM_JANINE, Movement_NinjaSpin + faceplayer + opentext + writetext JanineText_DisappointYou + waitbutton + closetext + winlosstext JanineText_ToughOne, 0 + loadtrainer JANINE, JANINE1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_JANINE + setevent EVENT_BEAT_LASS_ALICE + setevent EVENT_BEAT_LASS_LINDA + setevent EVENT_BEAT_PICNICKER_CINDY + setevent EVENT_BEAT_CAMPER_BARRY + variablesprite SPRITE_FUCHSIA_GYM_1, SPRITE_LASS + variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_LASS + variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_LASS + variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_YOUNGSTER + special LoadUsedSpritesGFX + opentext + writetext Text_ReceivedSoulBadge + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_SOULBADGE + sjump .AfterBattle +.FightDone: + faceplayer + opentext +.AfterBattle: + checkevent EVENT_GOT_TM06_TOXIC + iftrue .AfterTM + writetext JanineText_ToxicSpeech + promptbutton + verbosegiveitem TM_TOXIC + iffalse .AfterTM + setevent EVENT_GOT_TM06_TOXIC +.AfterTM: + writetext JanineText_ApplyMyself + waitbutton + closetext + end + +LassAliceScript: + checkevent EVENT_BEAT_LASS_ALICE + iftrue .AliceUnmasked + applymovement FUCHSIAGYM_FUCHSIA_GYM_1, Movement_NinjaSpin + faceplayer + variablesprite SPRITE_FUCHSIA_GYM_1, SPRITE_LASS + special LoadUsedSpritesGFX +.AliceUnmasked: + faceplayer + opentext + checkevent EVENT_BEAT_LASS_ALICE + iftrue .AliceAfterScript + writetext LassAliceBeforeText + waitbutton + closetext + winlosstext LassAliceBeatenText, 0 + loadtrainer LASS, ALICE + startbattle + iftrue .AliceBecomesJanine + reloadmapafterbattle + setevent EVENT_BEAT_LASS_ALICE + end + +.AliceBecomesJanine: + variablesprite SPRITE_FUCHSIA_GYM_1, SPRITE_JANINE + reloadmapafterbattle + end + +.AliceAfterScript: + writetext LassAliceAfterText + waitbutton + closetext + end + +LassLindaScript: + checkevent EVENT_BEAT_LASS_LINDA + iftrue .LindaUnmasked + applymovement FUCHSIAGYM_FUCHSIA_GYM_2, Movement_NinjaSpin + faceplayer + variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_LASS + special LoadUsedSpritesGFX +.LindaUnmasked: + faceplayer + opentext + checkevent EVENT_BEAT_LASS_LINDA + iftrue .LindaAfterScript + writetext LassLindaBeforeText + waitbutton + closetext + winlosstext LassLindaBeatenText, 0 + loadtrainer LASS, LINDA + startbattle + iftrue .LindaBecomesJanine + reloadmapafterbattle + setevent EVENT_BEAT_LASS_LINDA + end + +.LindaBecomesJanine: + variablesprite SPRITE_FUCHSIA_GYM_2, SPRITE_JANINE + reloadmapafterbattle + end + +.LindaAfterScript: + writetext LassLindaAfterText + waitbutton + closetext + end + +PicnickerCindyScript: + checkevent EVENT_BEAT_PICNICKER_CINDY + iftrue .CindyUnmasked + applymovement FUCHSIAGYM_FUCHSIA_GYM_3, Movement_NinjaSpin + faceplayer + variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_LASS + special LoadUsedSpritesGFX +.CindyUnmasked: + faceplayer + opentext + checkevent EVENT_BEAT_PICNICKER_CINDY + iftrue .CindyAfterScript + writetext PicnickerCindyBeforeText + waitbutton + closetext + winlosstext PicnickerCindyBeatenText, 0 + loadtrainer PICNICKER, CINDY + startbattle + iftrue .CindyBecomesJanine + reloadmapafterbattle + setevent EVENT_BEAT_PICNICKER_CINDY + end + +.CindyBecomesJanine: + variablesprite SPRITE_FUCHSIA_GYM_3, SPRITE_JANINE + reloadmapafterbattle + end + +.CindyAfterScript: + writetext PicnickerCindyAfterText + waitbutton + closetext + end + +CamperBarryScript: + checkevent EVENT_BEAT_CAMPER_BARRY + iftrue .BarryUnmasked + applymovement FUCHSIAGYM_FUCHSIA_GYM_4, Movement_NinjaSpin + faceplayer + variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_YOUNGSTER + special LoadUsedSpritesGFX +.BarryUnmasked: + faceplayer + opentext + checkevent EVENT_BEAT_CAMPER_BARRY + iftrue .BarryAfterScript + writetext CamperBarryBeforeText + waitbutton + closetext + winlosstext CamperBarryBeatenText, 0 + loadtrainer CAMPER, BARRY + startbattle + iftrue .BarryBecomesJanine + reloadmapafterbattle + setevent EVENT_BEAT_CAMPER_BARRY + end + +.BarryBecomesJanine: + variablesprite SPRITE_FUCHSIA_GYM_4, SPRITE_JANINE + reloadmapafterbattle + end + +.BarryAfterScript: + writetext CamperBarryAfterText + waitbutton + closetext + end + +FuchsiaGymGuideScript: + faceplayer + opentext + checkevent EVENT_BEAT_JANINE + iftrue .FuchsiaGymGuideWinScript + writetext FuchsiaGymGuideText + waitbutton + closetext + end + +.FuchsiaGymGuideWinScript: + writetext FuchsiaGymGuideWinText + waitbutton + closetext + end + +FuchsiaGymStatue: + checkflag ENGINE_SOULBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, JANINE, JANINE1 + jumpstd GymStatue2Script + +Movement_NinjaSpin: + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + step_end + +JanineText_DisappointYou: + text "Fufufufu…" + + para "I'm sorry to dis-" + line "appoint you…" + + para "I'm only joking!" + + para "I'm the real deal!" + + para "JANINE of FUCHSIA" + line "GYM, that's me!" + done + +JanineText_ToughOne: + text "JANINE: You're a" + line "tough one. You" + cont "definitely won…" + + para "Here's SOULBADGE." + line "Take it." + done + +Text_ReceivedSoulBadge: + text " received" + line "SOULBADGE." + done + +JanineText_ToxicSpeech: + text "JANINE: You're so" + line "tough! I have a" + cont "special gift!" + + para "It's TOXIC, a pow-" + line "erful poison that" + + para "steadily saps the" + line "victim's HP." + done + +JanineText_ApplyMyself: + text "JANINE: I'm going" + line "to really apply" + + para "myself and improve" + line "my skills." + + para "I want to become" + line "better than both" + cont "Father and you!" + done + +LassAliceBeforeText: + text "Fufufu!" + + para "I'm JANINE, the" + line "GYM LEADER!" + + para "No, I'm not!" + line "Gotcha, sucker!" + done + +LassAliceBeatenText: + text "I had you fooled…" + done + +LassAliceAfterText: + text "How will you dis-" + line "tinguish our real" + cont "LEADER?" + done + +LassLindaBeforeText: + text "Fooled you!" + line "Hahaha!" + done + +LassLindaBeatenText: + text "Ooh… I lost…" + line "You're not weak…" + done + +LassLindaAfterText: + text "Well? Wasn't my" + line "disguise perfect?" + done + +PicnickerCindyBeforeText: + text "I'm JANINE!" + + para "How did you know I" + line "was real?" + + para "Let's battle!" + done + +PicnickerCindyBeatenText: + text "Darn it!" + line "I wanted to win!" + done + +PicnickerCindyAfterText: + text "You must be" + line "getting tired." + done + +CamperBarryBeforeText: + text "Wahahaha!" + + para "You betcha!" + line "I'm JANINE!" + done + +CamperBarryBeatenText: + text "My disguise was" + line "right on! Dang!" + done + +CamperBarryAfterText: + text "Hey, you. Was my" + line "disguise cute or" + cont "what, huh?" + done + +FuchsiaGymGuideText: + text "Yo, CHAMP in" + line "making!" + + para "Whoops! Take a" + line "good look around" + + para "you. The trainers" + line "all look like the" + cont "LEADER, JANINE." + + para "Which of them is" + line "the real JANINE?" + done + +FuchsiaGymGuideWinText: + text "That was a great" + line "battle, trainer" + cont "from JOHTO!" + done + +FuchsiaGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 17, FUCHSIA_CITY, 3 + warp_event 5, 17, FUCHSIA_CITY, 3 + + def_coord_events + + def_bg_events + bg_event 3, 15, BGEVENT_READ, FuchsiaGymStatue + bg_event 6, 15, BGEVENT_READ, FuchsiaGymStatue + + def_object_events + object_event 1, 10, SPRITE_JANINE, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FuchsiaGymJanineScript, -1 + object_event 5, 7, SPRITE_FUCHSIA_GYM_1, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, LassAliceScript, -1 + object_event 5, 11, SPRITE_FUCHSIA_GYM_2, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, LassLindaScript, -1 + object_event 9, 4, SPRITE_FUCHSIA_GYM_3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PicnickerCindyScript, -1 + object_event 4, 2, SPRITE_FUCHSIA_GYM_4, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, CamperBarryScript, -1 + object_event 7, 15, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FuchsiaGymGuideScript, -1 diff --git a/maps/FuchsiaGym.blk b/maps/FuchsiaGym.blk new file mode 100644 index 0000000..fb6d17c --- /dev/null +++ b/maps/FuchsiaGym.blk @@ -0,0 +1 @@ +  \ No newline at end of file diff --git a/maps/FuchsiaMart.asm b/maps/FuchsiaMart.asm new file mode 100644 index 0000000..30443e4 --- /dev/null +++ b/maps/FuchsiaMart.asm @@ -0,0 +1,52 @@ + object_const_def + const FUCHSIAMART_CLERK + const FUCHSIAMART_FISHER + const FUCHSIAMART_COOLTRAINER_F + +FuchsiaMart_MapScripts: + def_scene_scripts + + def_callbacks + +FuchsiaMartClerkScript: + opentext + pokemart MARTTYPE_STANDARD, MART_FUCHSIA + closetext + end + +FuchsiaMartFisherScript: + jumptextfaceplayer FuchsiaMartFisherText + +FuchsiaMartCooltrainerFScript: + jumptextfaceplayer FuchsiaMartCooltrainerFText + +FuchsiaMartFisherText: + text "I was hoping to" + line "buy some SAFARI" + + para "ZONE souvenirs," + line "but it's closed…" + done + +FuchsiaMartCooltrainerFText: + text "The SAFARI ZONE" + line "WARDEN's grand-" + cont "daughter lives in" + cont "town." + done + +FuchsiaMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, FUCHSIA_CITY, 1 + warp_event 3, 7, FUCHSIA_CITY, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FuchsiaMartClerkScript, -1 + object_event 3, 2, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, FuchsiaMartFisherScript, -1 + object_event 7, 6, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, FuchsiaMartCooltrainerFScript, -1 diff --git a/maps/FuchsiaPokecenter1F.asm b/maps/FuchsiaPokecenter1F.asm new file mode 100644 index 0000000..9f37272 --- /dev/null +++ b/maps/FuchsiaPokecenter1F.asm @@ -0,0 +1,105 @@ + object_const_def + const FUCHSIAPOKECENTER1F_NURSE + const FUCHSIAPOKECENTER1F_COOLTRAINER_M + const FUCHSIAPOKECENTER1F_COOLTRAINER_F + const FUCHSIAPOKECENTER1F_JANINE_IMPERSONATOR + +FuchsiaPokecenter1F_MapScripts: + def_scene_scripts + scene_script FuchsiaPokeCenter1FNoopScene ; unusable + + def_callbacks + +FuchsiaPokeCenter1FNoopScene: + end + +FuchsiaPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +FuchsiaPokecenter1FCooltrainerMScript: + jumptextfaceplayer FuchsiaPokecenter1FCooltrainerMText + +FuchsiaPokecenter1FCooltrainerFScript: + jumptextfaceplayer FuchsiaPokecenter1FCooltrainerFText + +FuchsiaPokecenter1FJanineImpersonatorScript: + faceplayer + opentext + writetext FuchsiaPokecenter1FJanineImpersonatorText1 + waitbutton + closetext + applymovement FUCHSIAPOKECENTER1F_JANINE_IMPERSONATOR, FuchsiaPokecenter1FJanineImpersonatorSpinMovement + faceplayer + variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_JANINE + special LoadUsedSpritesGFX + opentext + writetext FuchsiaPokecenter1FJanineImpersonatorText2 + waitbutton + closetext + applymovement FUCHSIAPOKECENTER1F_JANINE_IMPERSONATOR, FuchsiaPokecenter1FJanineImpersonatorSpinMovement + faceplayer + variablesprite SPRITE_JANINE_IMPERSONATOR, SPRITE_LASS + special LoadUsedSpritesGFX + end + +FuchsiaPokecenter1FJanineImpersonatorSpinMovement: + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + step_end + +FuchsiaPokecenter1FCooltrainerMText: + text "Hey! You have a" + line "brand new kind of" + cont "#DEX." + + para "Did PROF.OAK give" + line "that to you?" + done + +FuchsiaPokecenter1FCooltrainerFText: + text "I got quite a" + line "shock at the GYM." + + para "There were all" + line "these girls who" + cont "looked identical." + done + +FuchsiaPokecenter1FJanineImpersonatorText1: + text "I'm JANINE! Hocus-" + line "pocus… Poof!" + done + +FuchsiaPokecenter1FJanineImpersonatorText2: + text "See? I look just" + line "like her now!" + done + +FuchsiaPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, FUCHSIA_CITY, 5 + warp_event 4, 7, FUCHSIA_CITY, 5 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, FuchsiaPokecenter1FNurseScript, -1 + object_event 8, 4, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FuchsiaPokecenter1FCooltrainerMScript, -1 + object_event 1, 4, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FuchsiaPokecenter1FCooltrainerFScript, -1 + object_event 5, 3, SPRITE_JANINE_IMPERSONATOR, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FuchsiaPokecenter1FJanineImpersonatorScript, -1 diff --git a/maps/FuchsiaPokecenter2FBeta.asm b/maps/FuchsiaPokecenter2FBeta.asm new file mode 100644 index 0000000..be01e1c --- /dev/null +++ b/maps/FuchsiaPokecenter2FBeta.asm @@ -0,0 +1,16 @@ +FuchsiaPokecenter2FBeta_MapScripts: + def_scene_scripts + + def_callbacks + +FuchsiaPokecenter2FBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 7, FUCHSIA_POKECENTER_1F, 3 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/GiftShop.blk b/maps/GiftShop.blk new file mode 100644 index 0000000..f414bee --- /dev/null +++ b/maps/GiftShop.blk @@ -0,0 +1 @@ + !" \ No newline at end of file diff --git a/maps/GoldenrodBikeShop.asm b/maps/GoldenrodBikeShop.asm new file mode 100644 index 0000000..8253db8 --- /dev/null +++ b/maps/GoldenrodBikeShop.asm @@ -0,0 +1,122 @@ + object_const_def + const GOLDENRODBIKESHOP_CLERK + +GoldenrodBikeShop_MapScripts: + def_scene_scripts + + def_callbacks + +GoldenrodBikeShopNoopScene: ; unreferenced + end + +GoldenrodBikeShopClerkScript: + faceplayer + opentext + checkevent EVENT_GOT_BICYCLE + iftrue .GotBicycle + writetext GoldenrodBikeShopClerkIntroText + yesorno + iffalse .Refused + writetext GoldenrodBikeShopClerkAgreedText + promptbutton + waitsfx + giveitem BICYCLE + writetext BorrowedABicycleText + playsound SFX_KEY_ITEM + waitsfx + itemnotify + setflag ENGINE_BIKE_SHOP_CALL_ENABLED + setevent EVENT_GOT_BICYCLE +.GotBicycle: + writetext GoldenrodBikeShopClerkFirstRateBikesText + waitbutton + closetext + end + +.Refused: + writetext GoldenrodBikeShopClerkRefusedText + waitbutton + closetext + end + +GoldenrodBikeShopJustReleasedCompactBike: ; unreferenced + jumptext GoldenrodBikeShopJustReleasedCompactBikeText + +GoldenrodBikeShopBicycle: + jumptext GoldenrodBikeShopBicycleText + +GoldenrodBikeShopClerkIntroText: + text "…sigh… I moved" + line "here, but I can't" + + para "sell my BICYCLES." + line "Why is that?" + + para "Could you ride a" + line "BICYCLE and adver-" + cont "tise for me?" + done + +GoldenrodBikeShopClerkAgreedText: + text "Really? Great!" + + para "Give me your name" + line "and phone number," + + para "and I'll loan you" + line "a BICYCLE." + done + +BorrowedABicycleText: + text " borrowed a" + line "BICYCLE." + done + +GoldenrodBikeShopClerkFirstRateBikesText: + text "My BICYCLES are" + line "first-rate! You" + + para "can ride them" + line "anywhere." + done + +GoldenrodBikeShopClerkRefusedText: + text "…sigh… Oh, for" + line "the kindness of" + cont "people…" + done + +GoldenrodBikeShopJustReleasedCompactBikeText: + text "Just released!" + + para "First-rate compact" + line "BICYCLES!" + done + +GoldenrodBikeShopBicycleText: + text "It's a shiny new" + line "BICYCLE!" + done + +GoldenrodBikeShop_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, GOLDENROD_CITY, 2 + warp_event 3, 7, GOLDENROD_CITY, 2 + + def_coord_events + + def_bg_events + bg_event 1, 2, BGEVENT_READ, GoldenrodBikeShopBicycle + bg_event 0, 3, BGEVENT_READ, GoldenrodBikeShopBicycle + bg_event 1, 3, BGEVENT_READ, GoldenrodBikeShopBicycle + bg_event 0, 5, BGEVENT_READ, GoldenrodBikeShopBicycle + bg_event 1, 5, BGEVENT_READ, GoldenrodBikeShopBicycle + bg_event 0, 6, BGEVENT_READ, GoldenrodBikeShopBicycle + bg_event 1, 6, BGEVENT_READ, GoldenrodBikeShopBicycle + bg_event 6, 6, BGEVENT_READ, GoldenrodBikeShopBicycle + bg_event 7, 6, BGEVENT_READ, GoldenrodBikeShopBicycle + + def_object_events + object_event 7, 2, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodBikeShopClerkScript, -1 diff --git a/maps/GoldenrodBikeShop.blk b/maps/GoldenrodBikeShop.blk new file mode 100644 index 0000000..33f316a --- /dev/null +++ b/maps/GoldenrodBikeShop.blk @@ -0,0 +1,2 @@ + +   \ No newline at end of file diff --git a/maps/GoldenrodCity.asm b/maps/GoldenrodCity.asm new file mode 100644 index 0000000..a5be17e --- /dev/null +++ b/maps/GoldenrodCity.asm @@ -0,0 +1,602 @@ + object_const_def + const GOLDENRODCITY_POKEFAN_M1 + const GOLDENRODCITY_YOUNGSTER1 + const GOLDENRODCITY_COOLTRAINER_F1 + const GOLDENRODCITY_COOLTRAINER_F2 + const GOLDENRODCITY_YOUNGSTER2 + const GOLDENRODCITY_LASS + const GOLDENRODCITY_GRAMPS + const GOLDENRODCITY_ROCKETSCOUT + const GOLDENRODCITY_ROCKET1 + const GOLDENRODCITY_ROCKET2 + const GOLDENRODCITY_ROCKET3 + const GOLDENRODCITY_ROCKET4 + const GOLDENRODCITY_ROCKET5 + const GOLDENRODCITY_ROCKET6 + const GOLDENRODCITY_MOVETUTOR + +GoldenrodCity_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, GoldenrodCityFlypointAndFloriaCallback + callback MAPCALLBACK_OBJECTS, GoldenrodCityMoveTutorCallback + +GoldenrodCityFlypointAndFloriaCallback: + setflag ENGINE_FLYPOINT_GOLDENROD + setflag ENGINE_REACHED_GOLDENROD + checkevent EVENT_MET_FLORIA + iftrue .FloriaDone + clearevent EVENT_FLORIA_AT_SUDOWOODO +.FloriaDone: + endcallback + +GoldenrodCityMoveTutorCallback: + checkevent EVENT_BEAT_ELITE_FOUR + iffalse .MoveTutorDone + checkitem COIN_CASE + iffalse .MoveTutorDisappear + readvar VAR_WEEKDAY + ifequal WEDNESDAY, .MoveTutorAppear + ifequal SATURDAY, .MoveTutorAppear +.MoveTutorDisappear: + disappear GOLDENRODCITY_MOVETUTOR + endcallback + +.MoveTutorAppear: + checkflag ENGINE_DAILY_MOVE_TUTOR + iftrue .MoveTutorDone + appear GOLDENRODCITY_MOVETUTOR +.MoveTutorDone: + endcallback + +MoveTutorScript: + faceplayer + opentext + writetext GoldenrodCityMoveTutorAskTeachAMoveText + yesorno + iffalse .Refused + special DisplayCoinCaseBalance + writetext GoldenrodCityMoveTutorAsk4000CoinsOkayText + yesorno + iffalse .Refused2 + checkcoins 4000 + ifequal HAVE_LESS, .NotEnoughMoney + writetext GoldenrodCityMoveTutorWhichMoveShouldITeachText + loadmenu .MoveMenuHeader + verticalmenu + closewindow + ifequal MOVETUTOR_FLAMETHROWER, .Flamethrower + ifequal MOVETUTOR_THUNDERBOLT, .Thunderbolt + ifequal MOVETUTOR_ICE_BEAM, .IceBeam + sjump .Incompatible + +.Flamethrower: + setval MOVETUTOR_FLAMETHROWER + writetext GoldenrodCityMoveTutorMoveText + special MoveTutor + ifequal FALSE, .TeachMove + sjump .Incompatible + +.Thunderbolt: + setval MOVETUTOR_THUNDERBOLT + writetext GoldenrodCityMoveTutorMoveText + special MoveTutor + ifequal FALSE, .TeachMove + sjump .Incompatible + +.IceBeam: + setval MOVETUTOR_ICE_BEAM + writetext GoldenrodCityMoveTutorMoveText + special MoveTutor + ifequal FALSE, .TeachMove + sjump .Incompatible + +.MoveMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 2, 15, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 4 ; items + db "FLAMETHROWER@" + db "THUNDERBOLT@" + db "ICE BEAM@" + db "CANCEL@" + +.Refused: + writetext GoldenrodCityMoveTutorAwwButTheyreAmazingText + waitbutton + closetext + end + +.Refused2: + writetext GoldenrodCityMoveTutorHmTooBadText + waitbutton + closetext + end + +.TeachMove: + writetext GoldenrodCityMoveTutorIfYouUnderstandYouveMadeItText + promptbutton + takecoins 4000 + waitsfx + playsound SFX_TRANSACTION + special DisplayCoinCaseBalance + writetext GoldenrodCityMoveTutorFarewellKidText + waitbutton + closetext + readvar VAR_FACING + ifequal LEFT, .WalkAroundPlayer + applymovement GOLDENRODCITY_MOVETUTOR, GoldenrodCityMoveTutorEnterGameCornerMovement + sjump .GoInside + +.WalkAroundPlayer: + applymovement GOLDENRODCITY_MOVETUTOR, GoldenrodCityMoveTutorWalkAroundPlayerThenEnterGameCornerMovement +.GoInside: + playsound SFX_ENTER_DOOR + disappear GOLDENRODCITY_MOVETUTOR + clearevent EVENT_GOLDENROD_GAME_CORNER_MOVE_TUTOR + setflag ENGINE_DAILY_MOVE_TUTOR + waitsfx + end + +.Incompatible: + writetext GoldenrodCityMoveTutorBButText + waitbutton + closetext + end + +.NotEnoughMoney: + writetext GoldenrodCityMoveTutorYouDontHaveEnoughCoinsText + waitbutton + closetext + end + +GoldenrodCityPokefanMScript: + jumptextfaceplayer GoldenrodCityPokefanMText + +GoldenrodCityYoungster1Script: + jumptextfaceplayer GoldenrodCityYoungster1Text + +GoldenrodCityCooltrainerF1Script: + faceplayer + opentext + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .ClearedRadioTower + writetext GoldenrodCityCooltrainerF1Text + waitbutton + closetext + end + +.ClearedRadioTower: + writetext GoldenrodCityCooltrainerF1Text_ClearedRadioTower + waitbutton + closetext + end + +GoldenrodCityCooltrainerF2Script: + faceplayer + opentext + checkflag ENGINE_RADIO_CARD + iftrue .GotRadioCard + writetext GoldenrodCityCooltrainerF2Text + waitbutton + closetext + end + +.GotRadioCard: + writetext GoldenrodCityCooltrainerF2Text_GotRadioCard + waitbutton + closetext + end + +GoldenrodCityYoungster2Script: + jumptextfaceplayer GoldenrodCityYoungster2Text + +GoldenrodCityLassScript: + jumptextfaceplayer GoldenrodCityLassText + +GoldenrodCityGrampsScript: + jumptextfaceplayer GoldenrodCityGrampsText + +GoldenrodCityRocketScoutScript: + opentext + writetext GoldenrodCityRocketScoutText1 + promptbutton + faceplayer + writetext GoldenrodCityRocketScoutText2 + waitbutton + closetext + turnobject GOLDENRODCITY_ROCKETSCOUT, UP + end + +GoldenrodCityRocket1Script: + jumptextfaceplayer GoldenrodCityRocket1Text + +GoldenrodCityRocket2Script: + jumptextfaceplayer GoldenrodCityRocket2Text + +GoldenrodCityRocket3Script: + jumptextfaceplayer GoldenrodCityRocket3Text + +GoldenrodCityRocket4Script: + jumptextfaceplayer GoldenrodCityRocket4Text + +GoldenrodCityRocket5Script: + jumptextfaceplayer GoldenrodCityRocket5Text + +GoldenrodCityRocket6Script: + jumptextfaceplayer GoldenrodCityRocket6Text + +GoldenrodCityStationSign: + jumptext GoldenrodCityStationSignText + +GoldenrodCityRadioTowerSign: + jumptext GoldenrodCityRadioTowerSignText + +GoldenrodDeptStoreSign: + jumptext GoldenrodDeptStoreSignText + +GoldenrodGymSign: + jumptext GoldenrodGymSignText + +GoldenrodCitySign: + jumptext GoldenrodCitySignText + +GoldenrodCityBikeShopSign: + jumptext GoldenrodCityBikeShopSignText + +GoldenrodCityGameCornerSign: + jumptext GoldenrodCityGameCornerSignText + +GoldenrodCityNameRaterSign: + jumptext GoldenrodCityNameRaterSignText + +GoldenrodCityUndergroundSignNorth: + jumptext GoldenrodCityUndergroundSignNorthText + +GoldenrodCityUndergroundSignSouth: + jumptext GoldenrodCityUndergroundSignSouthText + +GoldenrodCityPokecenterSign: + jumpstd PokecenterSignScript + +GoldenrodCityFlowerShopSign: + jumptext GoldenrodCityFlowerShopSignText + +GoldenrodCityMoveTutorEnterGameCornerMovement: + step RIGHT + step RIGHT + step UP + step_end + +GoldenrodCityMoveTutorWalkAroundPlayerThenEnterGameCornerMovement: + step DOWN + step RIGHT + step RIGHT + step UP + step UP + step_end + +GoldenrodCityPokefanMText: + text "They built the new" + line "RADIO TOWER to" + + para "replace the old," + line "creaky one." + done + +GoldenrodCityYoungster1Text: + text "I know there's a" + line "new BIKE SHOP, but" + + para "I can't find it" + line "anywhere." + done + +GoldenrodCityCooltrainerF1Text: + text "Is that man in" + line "black dressed up" + + para "like a TEAM ROCKET" + line "member? How silly!" + done + +GoldenrodCityCooltrainerF1Text_ClearedRadioTower: + text "Was that man in" + line "black really part" + + para "of TEAM ROCKET? I" + line "can't believe it!" + done + +GoldenrodCityCooltrainerF2Text: + text "The RADIO TOWER in" + line "GOLDENROD CITY is" + cont "a landmark." + + para "They're running a" + line "promotional cam- " + cont "paign right now." + + para "They'll modify" + line "your #GEAR," + + para "so it can also" + line "serve as a radio." + done + +GoldenrodCityCooltrainerF2Text_GotRadioCard: + text "Oh, your #GEAR" + line "works as a radio!" + done + +GoldenrodCityYoungster2Text: + text "E-he-he-he…" + + para "I got in trouble" + line "for playing in the" + + para "basement of the" + line "DEPT.STORE." + done + +GoldenrodCityLassText: + text "The man at that" + line "house rates your" + cont "#MON names." + + para "He can even rename" + line "your #MON." + done + +GoldenrodCityGrampsText: + text "Whew! This is one" + line "big town. I don't" + + para "know where any-" + line "thing is." + done + +GoldenrodCityRocketScoutText1: + text "So this is the" + line "RADIO TOWER…" + done + +GoldenrodCityRocketScoutText2: + text "What do you want," + line "you pest? Scram!" + done + +GoldenrodCityRocket1Text: + text "Stay out of the" + line "way! Beat it!" + done + +GoldenrodCityRocket2Text: + text "Take over the" + line "RADIO TOWER…" + + para "What? It's none of" + line "your business!" + done + +GoldenrodCityRocket3Text: + text "#MON? They're" + line "nothing more than" + + para "tools for making" + line "money!" + done + +GoldenrodCityRocket4Text: + text "Our dream will" + line "soon come true…" + + para "It was such a long" + line "struggle…" + done + +GoldenrodCityRocket5Text: + text "Hey, brat! You" + line "don't belong here!" + cont "Get lost!" + done + +GoldenrodCityRocket6Text: + text "Come taste the" + line "true terror of" + cont "TEAM ROCKET!" + done + +GoldenrodCityStationSignText: + text "GOLDENROD CITY" + line "STATION" + done + +GoldenrodCityRadioTowerSignText: + text "GOLDENROD CITY" + line "RADIO TOWER" + done + +GoldenrodDeptStoreSignText: + text "Full Selection of" + line "#MON Goods!" + + para "GOLDENROD CITY" + line "DEPT.STORE" + done + +GoldenrodGymSignText: + text "GOLDENROD CITY" + line "#MON GYM" + cont "LEADER: WHITNEY" + + para "The Incredibly" + line "Pretty Girl!" + done + +GoldenrodCitySignText: + text "GOLDENROD CITY" + + para "The Festive City" + line "of Opulent Charm" + done + +GoldenrodCityBikeShopSignText: + text "The World is a" + line "Cycle Path!" + cont "BIKE SHOP" + done + +GoldenrodCityGameCornerSignText: + text "Your Playground!" + + para "GOLDENROD CITY" + line "GAME CORNER" + done + +GoldenrodCityNameRaterSignText: + text "NAME RATER" + + para "Get Your #MON" + line "Nicknames Rated" + done + +GoldenrodCityUndergroundSignNorthText: + text "UNDERGROUND" + line "ENTRANCE" + done + +GoldenrodCityUndergroundSignSouthText: + text "UNDERGROUND" + line "ENTRANCE" + done + +GoldenrodCityPokeComCenterSignText: ; unreferenced + text "For Mobile Tips!" + line "#COM CENTER" + done + +GoldenrodCityFlowerShopSignText: + text "Blooming Beautiful" + line "FLOWER SHOP" + done + +GoldenrodCityMoveTutorAskTeachAMoveText: + text "I can teach your" + line "#MON amazing" + + para "moves if you'd" + line "like." + + para "Should I teach a" + line "new move?" + done + +GoldenrodCityMoveTutorAsk4000CoinsOkayText: + text "It will cost you" + line "4000 coins. Okay?" + done + +GoldenrodCityMoveTutorAwwButTheyreAmazingText: + text "Aww… But they're" + line "amazing…" + done + +GoldenrodCityMoveTutorWhichMoveShouldITeachText: + text "Wahahah! You won't" + line "regret it!" + + para "Which move should" + line "I teach?" + done + +GoldenrodCityMoveTutorHmTooBadText: + text "Hm, too bad. I'll" + line "have to get some" + cont "cash from home…" + done + +GoldenrodCityMoveTutorIfYouUnderstandYouveMadeItText: + text "If you understand" + line "what's so amazing" + + para "about this move," + line "you've made it as" + cont "a trainer." + done + +GoldenrodCityMoveTutorFarewellKidText: + text "Wahahah!" + line "Farewell, kid!" + done + +GoldenrodCityMoveTutorBButText: + text "B-but…" + done + +GoldenrodCityMoveTutorYouDontHaveEnoughCoinsText: + text "…You don't have" + line "enough coins here…" + done + +GoldenrodCityMoveTutorMoveText: + text_start + done + +GoldenrodCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 24, 7, GOLDENROD_GYM, 1 + warp_event 29, 29, GOLDENROD_BIKE_SHOP, 1 + warp_event 31, 21, GOLDENROD_HAPPINESS_RATER, 1 + warp_event 5, 25, BILLS_FAMILYS_HOUSE, 1 + warp_event 9, 13, GOLDENROD_MAGNET_TRAIN_STATION, 2 + warp_event 29, 5, GOLDENROD_FLOWER_SHOP, 1 + warp_event 33, 9, GOLDENROD_PP_SPEECH_HOUSE, 1 + warp_event 15, 7, GOLDENROD_NAME_RATER, 1 + warp_event 24, 27, GOLDENROD_DEPT_STORE_1F, 1 + warp_event 14, 21, GOLDENROD_GAME_CORNER, 1 + warp_event 5, 15, RADIO_TOWER_1F, 1 + warp_event 19, 1, ROUTE_35_GOLDENROD_GATE, 3 + warp_event 9, 5, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, 8 + warp_event 11, 29, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, 5 + warp_event 15, 27, GOLDENROD_POKECENTER_1F, 1 + + def_coord_events + + def_bg_events + bg_event 10, 14, BGEVENT_READ, GoldenrodCityStationSign + bg_event 4, 17, BGEVENT_READ, GoldenrodCityRadioTowerSign + bg_event 26, 27, BGEVENT_READ, GoldenrodDeptStoreSign + bg_event 26, 9, BGEVENT_READ, GoldenrodGymSign + bg_event 22, 18, BGEVENT_READ, GoldenrodCitySign + bg_event 28, 30, BGEVENT_READ, GoldenrodCityBikeShopSign + bg_event 16, 22, BGEVENT_READ, GoldenrodCityGameCornerSign + bg_event 12, 7, BGEVENT_READ, GoldenrodCityNameRaterSign + bg_event 8, 6, BGEVENT_READ, GoldenrodCityUndergroundSignNorth + bg_event 12, 30, BGEVENT_READ, GoldenrodCityUndergroundSignSouth + bg_event 16, 27, BGEVENT_UP, GoldenrodCityPokecenterSign + bg_event 30, 6, BGEVENT_READ, GoldenrodCityFlowerShopSign + + def_object_events + object_event 7, 18, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityPokefanMScript, EVENT_GOLDENROD_CITY_CIVILIANS + object_event 30, 17, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityYoungster1Script, EVENT_GOLDENROD_CITY_CIVILIANS + object_event 12, 16, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodCityCooltrainerF1Script, EVENT_GOLDENROD_CITY_CIVILIANS + object_event 20, 26, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityCooltrainerF2Script, EVENT_GOLDENROD_CITY_CIVILIANS + object_event 19, 17, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodCityYoungster2Script, EVENT_GOLDENROD_CITY_CIVILIANS + object_event 17, 10, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodCityLassScript, EVENT_GOLDENROD_CITY_CIVILIANS + object_event 11, 27, SPRITE_GRAMPS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityGrampsScript, EVENT_GOLDENROD_CITY_CIVILIANS + object_event 4, 16, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocketScoutScript, EVENT_GOLDENROD_CITY_ROCKET_SCOUT + object_event 28, 20, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocket1Script, EVENT_GOLDENROD_CITY_ROCKET_TAKEOVER + object_event 8, 15, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocket2Script, EVENT_GOLDENROD_CITY_ROCKET_TAKEOVER + object_event 16, 23, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocket3Script, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 29, 20, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocket4Script, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 29, 7, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocket5Script, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 31, 10, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodCityRocket6Script, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 12, 22, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, MoveTutorScript, EVENT_GOLDENROD_CITY_MOVE_TUTOR diff --git a/maps/GoldenrodCity.blk b/maps/GoldenrodCity.blk new file mode 100644 index 0000000..68dc2a1 --- /dev/null +++ b/maps/GoldenrodCity.blk @@ -0,0 +1,15 @@ + + + + +gFDgh + + +gFDh + +!ggh5 +"EefEABh5 +"wl +5%&IIIIIIIIJII55)*~~~~~~~~~Y@-.EAAAAAAYDwjYHIEgghzvUggh +5YgE'#(hY@'#(ggdhYD3ghYgdhzUgEgEdgh +Ygggdgl5YgdAAB@AAgdg \ No newline at end of file diff --git a/maps/GoldenrodDeptStore1F.asm b/maps/GoldenrodDeptStore1F.asm new file mode 100644 index 0000000..293b8cd --- /dev/null +++ b/maps/GoldenrodDeptStore1F.asm @@ -0,0 +1,98 @@ + object_const_def + const GOLDENRODDEPTSTORE1F_RECEPTIONIST + const GOLDENRODDEPTSTORE1F_POKEFAN_F + const GOLDENRODDEPTSTORE1F_BUG_CATCHER + const GOLDENRODDEPTSTORE1F_GENTLEMAN + +GoldenrodDeptStore1F_MapScripts: + def_scene_scripts + + def_callbacks + +GoldenrodDeptStore1FReceptionistScript: + jumptextfaceplayer GoldenrodDeptStore1FReceptionistText + +GoldenrodDeptStore1FGentlemanScript: + jumptextfaceplayer GoldenrodDeptStore1FGentlemanText + +GoldenrodDeptStore1FPokefanFScript: + jumptextfaceplayer GoldenrodDeptStore1FPokefanFText + +GoldenrodDeptStore1FBugCatcherScript: + jumptextfaceplayer GoldenrodDeptStore1FBugCatcherText + +GoldenrodDeptStore1FDirectory: + jumptext GoldenrodDeptStore1FDirectoryText + +GoldenrodDeptStore1FElevatorButton: + jumpstd ElevatorButtonScript + +GoldenrodDeptStore1FReceptionistText: + text "Welcome to GOLDEN-" + line "ROD DEPT.STORE." + done + +GoldenrodDeptStore1FGentlemanText: + text "The DEPT.STORE" + line "has a decent se-" + cont "lection." + + para "But some items" + line "are only available" + + para "as GAME CORNER" + line "prizes." + done + +GoldenrodDeptStore1FPokefanFText: + text "I'm raring to shop" + line "again today!" + done + +GoldenrodDeptStore1FBugCatcherText: + text "Mom's good at" + line "bargain hunting." + + para "She always buys" + line "stuff at lower" + cont "prices." + done + +GoldenrodDeptStore1FDirectoryText: + text "1F SERVICE COUNTER" + + para "2F TRAINER'S" + line " MARKET" + + para "3F BATTLE" + line " COLLECTION" + + para "4F MEDICINE BOX" + + para "5F TM CORNER" + + para "6F TRANQUIL SQUARE" + + para "ROOFTOP LOOKOUT" + done + +GoldenrodDeptStore1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 7, GOLDENROD_CITY, 9 + warp_event 8, 7, GOLDENROD_CITY, 9 + warp_event 15, 0, GOLDENROD_DEPT_STORE_2F, 2 + warp_event 2, 0, GOLDENROD_DEPT_STORE_ELEVATOR, 1 + + def_coord_events + + def_bg_events + bg_event 14, 0, BGEVENT_READ, GoldenrodDeptStore1FDirectory + bg_event 3, 0, BGEVENT_READ, GoldenrodDeptStore1FElevatorButton + + def_object_events + object_event 10, 1, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore1FReceptionistScript, -1 + object_event 5, 4, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore1FPokefanFScript, -1 + object_event 5, 5, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore1FBugCatcherScript, -1 + object_event 11, 5, SPRITE_GENTLEMAN, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore1FGentlemanScript, -1 diff --git a/maps/GoldenrodDeptStore2F.asm b/maps/GoldenrodDeptStore2F.asm new file mode 100644 index 0000000..7761ec9 --- /dev/null +++ b/maps/GoldenrodDeptStore2F.asm @@ -0,0 +1,118 @@ + object_const_def + const GOLDENRODDEPTSTORE2F_CLERK1 + const GOLDENRODDEPTSTORE2F_CLERK2 + const GOLDENRODDEPTSTORE2F_YOUNGSTER + const GOLDENRODDEPTSTORE2F_COOLTRAINER_F + const GOLDENRODDEPTSTORE2F_GENTLEMAN + +GoldenrodDeptStore2F_MapScripts: + def_scene_scripts + + def_callbacks + +GoldenrodDeptStore2FClerk1Script: + faceplayer + opentext + pokemart MARTTYPE_STANDARD, MART_GOLDENROD_2F_1 + closetext + end + +GoldenrodDeptStore2FClerk2Script: + faceplayer + opentext + pokemart MARTTYPE_STANDARD, MART_GOLDENROD_2F_2 + closetext + end + +GoldenrodDeptStore2FYoungsterScript: + jumptextfaceplayer GoldenrodDeptStore2FYoungsterText + +GoldenrodDeptStore2FCooltrainerFScript: + jumptextfaceplayer GoldenrodDeptStore2FCooltrainerFText + +GoldenrodDeptStore2FGentlemanScript: + jumptextfaceplayer GoldenrodDeptStore2FGentlemanText + +GoldenrodDeptStore2FDirectory: + jumptext GoldenrodDeptStore2FDirectoryText + +GoldenrodDeptStore2FElevatorButton: + jumpstd ElevatorButtonScript + +GoldenrodDeptStore2FUnusedText1: ; unreferenced + text "We intend to sell" + line "items for #MON" + cont "to hold." + + para "This is a free" + line "gift. Have a #-" + cont "MON hold it." + done + +GoldenrodDeptStore2FUnusedText2: ; unreferenced + text "By giving #MON" + line "items to hold, I" + + para "bet trainers will" + line "develop new battle" + cont "techniques." + done + +GoldenrodDeptStore2FYoungsterText: + text "#GEAR can store" + line "up to ten phone" + cont "numbers." + + para "It's hard to de-" + line "cide which numbers" + cont "to keep." + done + +GoldenrodDeptStore2FCooltrainerFText: + text "I got my ABRA at" + line "the GAME CORNER." + + para "Now it's my best" + line "partner." + done + +GoldenrodDeptStore2FGentlemanText: + text "This DEPT.STORE" + line "makes me realize" + + para "that GOLDENROD is" + line "a big city." + + para "The selection here" + line "is unmatched any-" + cont "where else." + done + +GoldenrodDeptStore2FDirectoryText: + text "Your Travel" + line "Companion" + + para "2F TRAINER'S" + line " MARKET" + done + +GoldenrodDeptStore2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 12, 0, GOLDENROD_DEPT_STORE_3F, 1 + warp_event 15, 0, GOLDENROD_DEPT_STORE_1F, 3 + warp_event 2, 0, GOLDENROD_DEPT_STORE_ELEVATOR, 1 + + def_coord_events + + def_bg_events + bg_event 14, 0, BGEVENT_READ, GoldenrodDeptStore2FDirectory + bg_event 3, 0, BGEVENT_READ, GoldenrodDeptStore2FElevatorButton + + def_object_events + object_event 13, 5, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore2FClerk1Script, -1 + object_event 13, 6, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore2FClerk2Script, -1 + object_event 9, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore2FYoungsterScript, -1 + object_event 6, 2, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore2FCooltrainerFScript, -1 + object_event 2, 6, SPRITE_GENTLEMAN, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore2FGentlemanScript, -1 diff --git a/maps/GoldenrodDeptStore3F.asm b/maps/GoldenrodDeptStore3F.asm new file mode 100644 index 0000000..edc48d6 --- /dev/null +++ b/maps/GoldenrodDeptStore3F.asm @@ -0,0 +1,74 @@ + object_const_def + const GOLDENRODDEPTSTORE3F_CLERK + const GOLDENRODDEPTSTORE3F_SUPER_NERD + const GOLDENRODDEPTSTORE3F_ROCKER + +GoldenrodDeptStore3F_MapScripts: + def_scene_scripts + + def_callbacks + +GoldenrodDeptStore3FClerkScript: + faceplayer + opentext + pokemart MARTTYPE_STANDARD, MART_GOLDENROD_3F + closetext + end + +GoldenrodDeptStore3FSuperNerdScript: + jumptextfaceplayer GoldenrodDeptStore3FSuperNerdText + +GoldenrodDeptStore3FRockerScript: + jumptextfaceplayer GoldenrodDeptStore3FRockerText + +GoldenrodDeptStore3FDirectory: + jumptext GoldenrodDeptStore3FDirectoryText + +GoldenrodDeptStore3FElevatorButton: + jumpstd ElevatorButtonScript + +GoldenrodDeptStore3FSuperNerdText: + text "I, I, I'm really" + line "impatient!" + + para "I use X SPEED in" + line "battle to speed up" + cont "my #MON." + done + +GoldenrodDeptStore3FRockerText: + text "Hey! When you bat-" + line "tle, do you use X" + cont "SPECIAL?" + + para "It's awesome. It" + line "really jacks up" + cont "SPECIAL ATTACK!" + done + +GoldenrodDeptStore3FDirectoryText: + text "For Victory" + line "Seekers" + + para "3F BATTLE" + line " COLLECTION" + done + +GoldenrodDeptStore3F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 12, 0, GOLDENROD_DEPT_STORE_2F, 1 + warp_event 15, 0, GOLDENROD_DEPT_STORE_4F, 2 + warp_event 2, 0, GOLDENROD_DEPT_STORE_ELEVATOR, 1 + + def_coord_events + + def_bg_events + bg_event 14, 0, BGEVENT_READ, GoldenrodDeptStore3FDirectory + bg_event 3, 0, BGEVENT_READ, GoldenrodDeptStore3FElevatorButton + + def_object_events + object_event 6, 1, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore3FClerkScript, -1 + object_event 12, 5, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore3FSuperNerdScript, -1 + object_event 2, 5, SPRITE_ROCKER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore3FRockerScript, -1 diff --git a/maps/GoldenrodDeptStore4F.asm b/maps/GoldenrodDeptStore4F.asm new file mode 100644 index 0000000..a65e560 --- /dev/null +++ b/maps/GoldenrodDeptStore4F.asm @@ -0,0 +1,96 @@ + object_const_def + const GOLDENRODDEPTSTORE4F_CLERK + const GOLDENRODDEPTSTORE4F_COOLTRAINER_M + const GOLDENRODDEPTSTORE4F_BUG_CATCHER + const GOLDENRODDEPTSTORE4F_GAMEBOY_KID + +GoldenrodDeptStore4F_MapScripts: + def_scene_scripts + + def_callbacks + +GoldenrodDeptStore4FClerkScript: + faceplayer + opentext + pokemart MARTTYPE_STANDARD, MART_GOLDENROD_4F + closetext + end + +GoldenrodDeptStore4FCooltrainerMScript: + jumptextfaceplayer GoldenrodDeptStore4FCooltrainerMText + +GoldenrodDeptStore4FBugCatcherScript: + jumptextfaceplayer GoldenrodDeptStore4FBugCatcherText + +GoldenrodDeptStore4FGameboyKidScript: + faceplayer + opentext + writetext GoldenrodDeptStore4FGameboyKidText + waitbutton + closetext + turnobject GOLDENRODDEPTSTORE4F_GAMEBOY_KID, DOWN + end + +GoldenrodDeptStore4FDirectory: + jumptext GoldenrodDeptStore4FDirectoryText + +GoldenrodDeptStore4FElevatorButton: + jumpstd ElevatorButtonScript + +GoldenrodDeptStore4FCooltrainerMText: + text "Hey. I love strong" + line "#MON." + + para "I feed them PRO-" + line "TEIN to crank up" + cont "their ATTACK." + done + +GoldenrodDeptStore4FBugCatcherText: + text "IRON adds to your" + line "#MON's DEFENSE." + done + +GoldenrodDeptStore4FGameboyKidText: + text "Some #MON" + line "evolve only by" + + para "being traded via a" + line "Game Link cable." + + para "I know of four:" + line "MACHOKE, KADABRA," + + para "HAUNTER and, um," + line "GRAVELER." + + para "I heard there are" + line "others too." + done + +GoldenrodDeptStore4FDirectoryText: + text "Let Us Pump Up" + line "Your #MON!" + + para "4F MEDICINE BOX" + done + +GoldenrodDeptStore4F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 12, 0, GOLDENROD_DEPT_STORE_5F, 1 + warp_event 15, 0, GOLDENROD_DEPT_STORE_3F, 2 + warp_event 2, 0, GOLDENROD_DEPT_STORE_ELEVATOR, 1 + + def_coord_events + + def_bg_events + bg_event 14, 0, BGEVENT_READ, GoldenrodDeptStore4FDirectory + bg_event 3, 0, BGEVENT_READ, GoldenrodDeptStore4FElevatorButton + + def_object_events + object_event 13, 5, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore4FClerkScript, -1 + object_event 11, 7, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore4FCooltrainerMScript, -1 + object_event 7, 2, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore4FBugCatcherScript, -1 + object_event 5, 1, SPRITE_GAMEBOY_KID, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore4FGameboyKidScript, -1 diff --git a/maps/GoldenrodDeptStore5F.asm b/maps/GoldenrodDeptStore5F.asm new file mode 100644 index 0000000..d13b598 --- /dev/null +++ b/maps/GoldenrodDeptStore5F.asm @@ -0,0 +1,238 @@ + object_const_def + const GOLDENRODDEPTSTORE5F_CLERK + const GOLDENRODDEPTSTORE5F_LASS + const GOLDENRODDEPTSTORE5F_MIKE + const GOLDENRODDEPTSTORE5F_POKEFAN_M + const GOLDENRODDEPTSTORE5F_CARRIE + const GOLDENRODDEPTSTORE5F_RECEPTIONIST + +GoldenrodDeptStore5F_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, GoldenrodDeptStore5FCheckIfSundayCallback + +GoldenrodDeptStore5FCheckIfSundayCallback: + readvar VAR_WEEKDAY + ifequal SUNDAY, .yes + disappear GOLDENRODDEPTSTORE5F_RECEPTIONIST + endcallback + +.yes + appear GOLDENRODDEPTSTORE5F_RECEPTIONIST + endcallback + +GoldenrodDeptStore5FClerkScript: + faceplayer + opentext + checkevent EVENT_GOT_TM02_HEADBUTT + iftrue .headbutt + checkevent EVENT_GOT_TM08_ROCK_SMASH + iftrue .onlyrocksmash + sjump .neither + +.headbutt + checkevent EVENT_GOT_TM08_ROCK_SMASH + iftrue .both + sjump .onlyheadbutt + +.neither + pokemart MARTTYPE_STANDARD, MART_GOLDENROD_5F_1 + closetext + end + +.onlyheadbutt + pokemart MARTTYPE_STANDARD, MART_GOLDENROD_5F_2 + closetext + end + +.onlyrocksmash + pokemart MARTTYPE_STANDARD, MART_GOLDENROD_5F_3 + closetext + end + +.both + pokemart MARTTYPE_STANDARD, MART_GOLDENROD_5F_4 + closetext + end + +GoldenrodDeptStore5FReceptionistScript: + faceplayer + opentext + readvar VAR_WEEKDAY + ifnotequal SUNDAY, .EventIsOver + checkflag ENGINE_GOLDENROD_DEPT_STORE_TM27_RETURN + iftrue .EventIsOver + special GetFirstPokemonHappiness + writetext GoldenrodDeptStore5FReceptionistOhYourMonDotDotDotText + promptbutton + ifgreater 150 - 1, .VeryHappy + ifgreater 50 - 1, .SomewhatHappy + sjump .NotVeryHappy + +.VeryHappy: + writetext GoldenrodDeptStore5FReceptionistThisMoveShouldBePerfectText + promptbutton + verbosegiveitem TM_RETURN + iffalse .Done + setflag ENGINE_GOLDENROD_DEPT_STORE_TM27_RETURN + closetext + end + +.SomewhatHappy: + writetext GoldenrodDeptStore5FReceptionistItsAdorableText + waitbutton + closetext + end + +.NotVeryHappy: + writetext GoldenrodDeptStore5FReceptionistItLooksEvilHowAboutThisTMText + promptbutton + verbosegiveitem TM_FRUSTRATION + iffalse .Done + setflag ENGINE_GOLDENROD_DEPT_STORE_TM27_RETURN + closetext + end + +.EventIsOver: + writetext GoldenrodDeptStore5FReceptionistThereAreTMsPerfectForMonText + waitbutton +.Done: + closetext + end + +Carrie: + faceplayer + opentext + special GameboyCheck + ifnotequal GBCHECK_CGB, .NotGBC ; This is a dummy check from Gold/Silver + writetext GoldenrodDeptStore5FCarrieMysteryGiftExplanationText + waitbutton + closetext + special UnlockMysteryGift + end + +.NotGBC: + writetext GoldenrodDeptStore5FCarrieMysteryGiftRequiresGBCText + waitbutton + closetext + end + +GoldenrodDeptStore5FLassScript: + jumptextfaceplayer GoldenrodDeptStore5FLassText + +Mike: + faceplayer + opentext + trade NPC_TRADE_MIKE + waitbutton + closetext + end + +GoldenrodDeptStore5FPokefanMScript: + jumptextfaceplayer GoldenrodDeptStore5FPokefanMText + +GoldenrodDeptStore5FDirectory: + jumptext GoldenrodDeptStore5FDirectoryText + +GoldenrodDeptStore5FElevatorButton: + jumpstd ElevatorButtonScript + +GoldenrodDeptStore5FReceptionistOhYourMonDotDotDotText: + text "Hello. Oh, your" + line "#MON…" + done + +GoldenrodDeptStore5FReceptionistThisMoveShouldBePerfectText: + text "It's very attached" + line "to you." + + para "This move should" + line "be perfect for a" + cont "pair like you." + done + +GoldenrodDeptStore5FReceptionistItsAdorableText: + text "It's adorable!" + + para "You should teach" + line "it good TM moves." + done + +GoldenrodDeptStore5FReceptionistItLooksEvilHowAboutThisTMText: + text "It looks evil. How" + line "about this TM for" + cont "it?" + done + +GoldenrodDeptStore5FReceptionistThereAreTMsPerfectForMonText: + text "There are sure to" + line "be TMs that are" + + para "just perfect for" + line "your #MON." + done + +GoldenrodDeptStore5FCarrieMysteryGiftExplanationText: + text "MYSTERY GIFT." + + para "With just a" + line "little beep, you" + cont "get a gift." + done + +GoldenrodDeptStore5FCarrieMysteryGiftRequiresGBCText: + text "The MYSTERY GIFT" + line "option requires a" + cont "Game Boy Color." + done + +GoldenrodDeptStore5FLassText: + text "On Sundays, a lady" + line "comes to check out" + cont "#MON." + + para "She even gives" + line "away TMs!" + done + +GoldenrodDeptStore5FPokefanMText: + text "You can't rename a" + line "#MON you get in" + cont "a trade." + + para "The name is a re-" + line "flection of the" + + para "original trainer's" + line "feelings for it." + done + +GoldenrodDeptStore5FDirectoryText: + text "Customize Your" + line "#MON" + + para "5F TM CORNER" + done + +GoldenrodDeptStore5F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 12, 0, GOLDENROD_DEPT_STORE_4F, 1 + warp_event 15, 0, GOLDENROD_DEPT_STORE_6F, 1 + warp_event 2, 0, GOLDENROD_DEPT_STORE_ELEVATOR, 1 + + def_coord_events + + def_bg_events + bg_event 14, 0, BGEVENT_READ, GoldenrodDeptStore5FDirectory + bg_event 3, 0, BGEVENT_READ, GoldenrodDeptStore5FElevatorButton + + def_object_events + object_event 8, 5, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore5FClerkScript, -1 + object_event 3, 6, SPRITE_LASS, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore5FLassScript, -1 + object_event 6, 3, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Mike, -1 + object_event 13, 5, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore5FPokefanMScript, -1 + object_event 9, 1, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Carrie, -1 + object_event 7, 5, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore5FReceptionistScript, EVENT_GOLDENROD_DEPT_STORE_5F_HAPPINESS_EVENT_LADY diff --git a/maps/GoldenrodDeptStore6F.asm b/maps/GoldenrodDeptStore6F.asm new file mode 100644 index 0000000..b31db37 --- /dev/null +++ b/maps/GoldenrodDeptStore6F.asm @@ -0,0 +1,172 @@ +DEF GOLDENRODDEPTSTORE6F_FRESH_WATER_PRICE EQU 200 +DEF GOLDENRODDEPTSTORE6F_SODA_POP_PRICE EQU 300 +DEF GOLDENRODDEPTSTORE6F_LEMONADE_PRICE EQU 350 + + object_const_def + const GOLDENRODDEPTSTORE6F_LASS + const GOLDENRODDEPTSTORE6F_SUPER_NERD + +GoldenrodDeptStore6F_MapScripts: + def_scene_scripts + + def_callbacks + +GoldenrodVendingMachine: + opentext + writetext GoldenrodVendingText +.Start: + special PlaceMoneyTopRight + loadmenu .MenuHeader + verticalmenu + closewindow + ifequal 1, .FreshWater + ifequal 2, .SodaPop + ifequal 3, .Lemonade + closetext + end + +.FreshWater: + checkmoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_FRESH_WATER_PRICE + ifequal HAVE_LESS, .NotEnoughMoney + giveitem FRESH_WATER + iffalse .NotEnoughSpace + takemoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_FRESH_WATER_PRICE + getitemname STRING_BUFFER_3, FRESH_WATER + sjump .VendItem + +.SodaPop: + checkmoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_SODA_POP_PRICE + ifequal HAVE_LESS, .NotEnoughMoney + giveitem SODA_POP + iffalse .NotEnoughSpace + takemoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_SODA_POP_PRICE + getitemname STRING_BUFFER_3, SODA_POP + sjump .VendItem + +.Lemonade: + checkmoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_LEMONADE_PRICE + ifequal HAVE_LESS, .NotEnoughMoney + giveitem LEMONADE + iffalse .NotEnoughSpace + takemoney YOUR_MONEY, GOLDENRODDEPTSTORE6F_LEMONADE_PRICE + getitemname STRING_BUFFER_3, LEMONADE + sjump .VendItem + +.VendItem: + pause 10 + playsound SFX_ENTER_DOOR + writetext GoldenrodClangText + promptbutton + itemnotify + sjump .Start + +.NotEnoughMoney: + writetext GoldenrodVendingNoMoneyText + waitbutton + sjump .Start + +.NotEnoughSpace: + writetext GoldenrodVendingNoSpaceText + waitbutton + sjump .Start + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 2, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 4 ; items + db "FRESH WATER ¥{d:GOLDENRODDEPTSTORE6F_FRESH_WATER_PRICE}@" + db "SODA POP ¥{d:GOLDENRODDEPTSTORE6F_SODA_POP_PRICE}@" + db "LEMONADE ¥{d:GOLDENRODDEPTSTORE6F_LEMONADE_PRICE}@" + db "CANCEL@" + +GoldenrodDeptStore6FLassScript: + jumptextfaceplayer GoldenrodDeptStore6FLassText + +GoldenrodDeptStore6FSuperNerdScript: + jumptextfaceplayer GoldenrodDeptStore6FSuperNerdText + +GoldenrodDeptStore6FDirectory: + jumptext GoldenrodDeptStore6FDirectoryText + +GoldenrodDeptStore6FElevatorButton: + jumpstd ElevatorButtonScript + +GoldenrodVendingText: + text "A vending machine!" + line "Here's the menu." + done + +GoldenrodClangText: + text "Clang! A can of" + line "@" + text_ram wStringBuffer3 + text_start + cont "popped out!" + done + +GoldenrodVendingNoMoneyText: + text "Oops, not enough" + line "money." + done + +GoldenrodVendingNoSpaceText: + text "There's no more" + line "room for stuff." + done + +GoldenrodDeptStore6FLassText: + text "Do you listen to" + line "LUCKY CHANNEL?" + + para "If you want to" + line "win, trade #MON" + + para "with as many peo-" + line "ple as possible to" + + para "get different ID" + line "numbers." + done + +GoldenrodDeptStore6FSuperNerdText: + text "If you're tired," + line "try the vending" + cont "machine's drinks." + + para "Your #MON will" + line "love them too." + done + +GoldenrodDeptStore6FDirectoryText: + text "Take a Break from" + line "Shopping!" + + para "6F TRANQUIL SQUARE" + done + +GoldenrodDeptStore6F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 15, 0, GOLDENROD_DEPT_STORE_5F, 2 + warp_event 2, 0, GOLDENROD_DEPT_STORE_ELEVATOR, 1 + warp_event 13, 0, GOLDENROD_DEPT_STORE_ROOF, 1 + + def_coord_events + + def_bg_events + bg_event 14, 0, BGEVENT_READ, GoldenrodDeptStore6FDirectory + bg_event 3, 0, BGEVENT_READ, GoldenrodDeptStore6FElevatorButton + bg_event 8, 1, BGEVENT_UP, GoldenrodVendingMachine + bg_event 9, 1, BGEVENT_UP, GoldenrodVendingMachine + bg_event 10, 1, BGEVENT_UP, GoldenrodVendingMachine + bg_event 11, 1, BGEVENT_UP, GoldenrodVendingMachine + + def_object_events + object_event 10, 2, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore6FLassScript, -1 + object_event 8, 2, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStore6FSuperNerdScript, -1 diff --git a/maps/GoldenrodDeptStoreB1F.asm b/maps/GoldenrodDeptStoreB1F.asm new file mode 100644 index 0000000..306045c --- /dev/null +++ b/maps/GoldenrodDeptStoreB1F.asm @@ -0,0 +1,130 @@ + object_const_def + const GOLDENRODDEPTSTOREB1F_POKE_BALL1 + const GOLDENRODDEPTSTOREB1F_POKE_BALL2 + const GOLDENRODDEPTSTOREB1F_POKE_BALL3 + const GOLDENRODDEPTSTOREB1F_POKE_BALL4 + const GOLDENRODDEPTSTOREB1F_BLACK_BELT1 + const GOLDENRODDEPTSTOREB1F_BLACK_BELT2 + const GOLDENRODDEPTSTOREB1F_BLACK_BELT3 + const GOLDENRODDEPTSTOREB1F_MACHOP + +GoldenrodDeptStoreB1F_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_TILES, GoldenRodDeptStoreB1FClearBoxesCallback + callback MAPCALLBACK_NEWMAP, GoldenRodDeptStoreUnblockCallback + +GoldenRodDeptStoreB1FClearBoxesCallback: + checkevent EVENT_RECEIVED_CARD_KEY + iftrue .GotCardKey + sjump .Continue + +.GotCardKey: + changeblock 16, 4, $0d ; floor + sjump .Continue + +.Continue: + checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2 + iftrue .Layout2 + checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3 + iftrue .Layout3 + changeblock 10, 8, $0d ; floor + endcallback + +.Layout2: + changeblock 4, 10, $0d ; floor + endcallback + +.Layout3: + changeblock 10, 12, $0d ; floor + endcallback + +GoldenRodDeptStoreUnblockCallback: + clearevent EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF + endcallback + +GoldenrodDeptStoreB1FBlackBelt1Script: + jumptextfaceplayer GoldenrodDeptStoreB1FBlackBelt1Text + +GoldenrodDeptStoreB1FBlackBelt2Script: + jumptextfaceplayer GoldenrodDeptStoreB1FBlackBelt2Text + +GoldenrodDeptStoreB1FBlackBelt3Script: + jumptextfaceplayer GoldenrodDeptStoreB1FBlackBelt3Text + +GoldenrodDeptStoreB1FMachopScript: + opentext + writetext GoldenrodDeptStoreB1FMachokeText + cry MACHOKE + waitbutton + closetext + end + +GoldenrodDeptStoreB1FEther: + itemball ETHER + +GoldenrodDeptStoreB1FAmuletCoin: + itemball AMULET_COIN + +GoldenrodDeptStoreB1FBurnHeal: + itemball BURN_HEAL + +GoldenrodDeptStoreB1FUltraBall: + itemball ULTRA_BALL + +GoldenrodDeptStoreB1FBlackBelt1Text: + text "Hey, kid! You're" + line "holding us up!" + + para "Our policy is to" + line "work behind the" + + para "scenes where no" + line "one can see us!" + done + +GoldenrodDeptStoreB1FBlackBelt2Text: + text "I lose my passion" + line "for work if some-" + cont "one's watching." + + para "Come on, kid," + line "scoot!" + done + +GoldenrodDeptStoreB1FBlackBelt3Text: + text "Oohah! Oohah!" + + para "The stuff on the" + line "ground's junk." + + para "Take it if you" + line "want it!" + done + +GoldenrodDeptStoreB1FMachokeText: + text "MACHOKE: Maaacho!" + done + +GoldenrodDeptStoreB1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 17, 2, GOLDENROD_UNDERGROUND_WAREHOUSE, 3 + warp_event 9, 4, GOLDENROD_DEPT_STORE_ELEVATOR, 1 + warp_event 10, 4, GOLDENROD_DEPT_STORE_ELEVATOR, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 10, 15, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodDeptStoreB1FEther, EVENT_GOLDENROD_DEPT_STORE_B1F_ETHER + object_event 14, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodDeptStoreB1FAmuletCoin, EVENT_GOLDENROD_DEPT_STORE_B1F_AMULET_COIN + object_event 6, 3, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodDeptStoreB1FBurnHeal, EVENT_GOLDENROD_DEPT_STORE_B1F_BURN_HEAL + object_event 15, 15, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodDeptStoreB1FUltraBall, EVENT_GOLDENROD_DEPT_STORE_B1F_ULTRA_BALL + object_event 9, 10, SPRITE_BLACK_BELT, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreB1FBlackBelt1Script, -1 + object_event 4, 8, SPRITE_BLACK_BELT, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreB1FBlackBelt2Script, -1 + object_event 6, 13, SPRITE_BLACK_BELT, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreB1FBlackBelt3Script, -1 + object_event 7, 7, SPRITE_MACHOP, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreB1FMachopScript, -1 diff --git a/maps/GoldenrodDeptStoreB1F.blk b/maps/GoldenrodDeptStoreB1F.blk new file mode 100644 index 0000000..0b9a5a3 --- /dev/null +++ b/maps/GoldenrodDeptStoreB1F.blk @@ -0,0 +1,5 @@ + +// +    %& +          +   \ No newline at end of file diff --git a/maps/GoldenrodDeptStoreElevator.asm b/maps/GoldenrodDeptStoreElevator.asm new file mode 100644 index 0000000..f29a1d8 --- /dev/null +++ b/maps/GoldenrodDeptStoreElevator.asm @@ -0,0 +1,67 @@ +GoldenrodDeptStoreElevator_MapScripts: + def_scene_scripts + + def_callbacks + +GoldenrodDeptStoreElevatorScript: + opentext + elevator GoldenrodDeptStoreElevatorData + closetext + iffalse .Done + pause 5 + playsound SFX_ELEVATOR + earthquake 60 + waitsfx + checkevent EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF + iftrue .Done + checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1 + iftrue .BoxLayout1 + checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2 + iftrue .BoxLayout2 + checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3 + iftrue .BoxLayout3 +.BoxLayout3: + setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1 + clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2 + clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3 + end + +.BoxLayout1: + clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1 + setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2 + clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3 + end + +.BoxLayout2: + clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1 + clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2 + setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3 + end + +.Done: + end + +GoldenrodDeptStoreElevatorData: + db 7 ; floors + elevfloor FLOOR_B1F, 2, GOLDENROD_DEPT_STORE_B1F + elevfloor FLOOR_1F, 4, GOLDENROD_DEPT_STORE_1F + elevfloor FLOOR_2F, 3, GOLDENROD_DEPT_STORE_2F + elevfloor FLOOR_3F, 3, GOLDENROD_DEPT_STORE_3F + elevfloor FLOOR_4F, 3, GOLDENROD_DEPT_STORE_4F + elevfloor FLOOR_5F, 3, GOLDENROD_DEPT_STORE_5F + elevfloor FLOOR_6F, 2, GOLDENROD_DEPT_STORE_6F + db -1 ; end + +GoldenrodDeptStoreElevator_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 1, 3, GOLDENROD_DEPT_STORE_1F, -1 + warp_event 2, 3, GOLDENROD_DEPT_STORE_1F, -1 + + def_coord_events + + def_bg_events + bg_event 3, 0, BGEVENT_READ, GoldenrodDeptStoreElevatorScript + + def_object_events diff --git a/maps/GoldenrodDeptStoreRoof.asm b/maps/GoldenrodDeptStoreRoof.asm new file mode 100644 index 0000000..a09e938 --- /dev/null +++ b/maps/GoldenrodDeptStoreRoof.asm @@ -0,0 +1,234 @@ + object_const_def + const GOLDENRODDEPTSTOREROOF_CLERK + const GOLDENRODDEPTSTOREROOF_POKEFAN_F + const GOLDENRODDEPTSTOREROOF_FISHER + const GOLDENRODDEPTSTOREROOF_TWIN + const GOLDENRODDEPTSTOREROOF_SUPER_NERD + const GOLDENRODDEPTSTOREROOF_POKEFAN_M + const GOLDENRODDEPTSTOREROOF_TEACHER + const GOLDENRODDEPTSTOREROOF_BUG_CATCHER + +GoldenrodDeptStoreRoof_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_TILES, GoldenrodDeptStoreRoofCheckSaleChangeBlockCallback + callback MAPCALLBACK_OBJECTS, GoldenrodDeptStoreRoofCheckSaleChangeClerkCallback + +GoldenrodDeptStoreRoofCheckSaleChangeBlockCallback: + checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON + iftrue .SaleIsOn + endcallback + +.SaleIsOn: + changeblock 0, 2, $3f ; cardboard boxes + changeblock 0, 4, $0f ; vendor booth + endcallback + +GoldenrodDeptStoreRoofCheckSaleChangeClerkCallback: + checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON + iftrue .ChangeClerk + setevent EVENT_GOLDENROD_SALE_OFF + clearevent EVENT_GOLDENROD_SALE_ON + endcallback + +.ChangeClerk: + clearevent EVENT_GOLDENROD_SALE_OFF + setevent EVENT_GOLDENROD_SALE_ON + endcallback + +GoldenrodDeptStoreRoofClerkScript: + opentext + pokemart MARTTYPE_ROOFTOP, 0 + closetext + end + +GoldenrodDeptStoreRoofPokefanFScript: + jumptextfaceplayer GoldenrodDeptStoreRoofPokefanFText + +GoldenrodDeptStoreRoofFisherScript: + faceplayer + opentext + writetext GoldenrodDeptStoreRoofFisherText + waitbutton + closetext + turnobject GOLDENRODDEPTSTOREROOF_FISHER, UP + end + +GoldenrodDeptStoreRoofTwinScript: + jumptextfaceplayer GoldenrodDeptStoreRoofTwinText + +GoldenrodDeptStoreRoofSuperNerdScript: + opentext + writetext GoldenrodDeptStoreRoofSuperNerdOhWowText + waitbutton + closetext + turnobject GOLDENRODDEPTSTOREROOF_SUPER_NERD, UP + opentext + writetext GoldenrodDeptStoreRoofSuperNerdQuitBotheringMeText + waitbutton + closetext + turnobject GOLDENRODDEPTSTOREROOF_SUPER_NERD, RIGHT + end + +GoldenrodDeptStoreRoofPokefanMScript: + jumptextfaceplayer GoldenrodDeptStoreRoofPokefanMText + +GoldenrodDeptStoreRoofTeacherScript: + jumptextfaceplayer GoldenrodDeptStoreRoofTeacherText + +GoldenrodDeptStoreRoofBugCatcherScript: + jumptextfaceplayer GoldenrodDeptStoreRoofBugCatcherText + +Binoculars1: + jumptext Binoculars1Text + +Binoculars2: + jumptext Binoculars2Text + +Binoculars3: + jumptext Binoculars3Text + +PokeDollVendingMachine: + jumptext PokeDollVendingMachineText + +GoldenrodDeptStoreRoofPokefanFText: + text "Whew, I'm tired." + + para "I sometimes come" + line "up to the rooftop" + + para "to take a break" + line "from shopping." + done + +GoldenrodDeptStoreRoofFisherText: + text "Pardon? Who says" + line "an adult can't get" + cont "into this?" + + para "I'm going to be" + line "back every day to" + + para "collect all the" + line "dolls!" + done + +GoldenrodDeptStoreRoofTwinText: + text "They have bargain" + line "sales here every" + cont "so often." + done + +GoldenrodDeptStoreRoofSuperNerdOhWowText: + text "Oh, wow!" + done + +GoldenrodDeptStoreRoofSuperNerdQuitBotheringMeText: + text "Will you quit" + line "bothering me?" + done + +GoldenrodDeptStoreRoofPokefanMText: + text "There's something" + line "I really want, but" + + para "I don't have the" + line "necessary cash…" + + para "Maybe I'll sell" + line "off the BERRIES" + cont "I've collected…" + done + +GoldenrodDeptStoreRoofTeacherText: + text "Oh, everything is" + line "so cheap!" + + para "I bought so much," + line "my PACK's crammed!" + done + +GoldenrodDeptStoreRoofBugCatcherText: + text "My #MON always" + line "get paralyzed or" + + para "poisoned when the" + line "chips are down…" + + para "So I came to buy" + line "some FULL HEAL." + + para "I wonder if" + line "there's any left?" + done + +Binoculars1Text: + text "These binoculars" + line "let me see far" + + para "away. Maybe I can" + line "see my own house." + + para "Is it the one with" + line "the green roof?" + done + +Binoculars2Text: + text "Hey! Some trainers" + line "are battling on" + cont "the road!" + + para "A #MON fired a" + line "flurry of leaves!" + + para "That makes me feel" + line "like battling" + cont "right now!" + done + +Binoculars3Text: + text "A FISHER caught a" + line "lot of MAGIKARP…" + + para "They're SPLASHing" + line "at the same time!" + + para "Look at the water" + line "going everywhere!" + done + +PokeDollVendingMachineText: + text "A vending machine" + line "for #MON dolls?" + + para "Insert money, then" + line "turn the crank…" + + para "But it's almost" + line "empty…" + done + +GoldenrodDeptStoreRoof_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 13, 1, GOLDENROD_DEPT_STORE_6F, 3 + + def_coord_events + + def_bg_events + bg_event 15, 3, BGEVENT_RIGHT, Binoculars1 + bg_event 15, 5, BGEVENT_RIGHT, Binoculars2 + bg_event 15, 6, BGEVENT_RIGHT, Binoculars3 + bg_event 3, 0, BGEVENT_UP, PokeDollVendingMachine + + def_object_events + object_event 1, 4, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofClerkScript, EVENT_GOLDENROD_SALE_OFF + object_event 10, 3, SPRITE_POKEFAN_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofPokefanFScript, -1 + object_event 2, 1, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofFisherScript, -1 + object_event 3, 4, SPRITE_TWIN, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofTwinScript, EVENT_GOLDENROD_SALE_ON + object_event 14, 6, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofSuperNerdScript, EVENT_GOLDENROD_SALE_ON + object_event 7, 0, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofPokefanMScript, EVENT_GOLDENROD_SALE_OFF + object_event 5, 3, SPRITE_TEACHER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofTeacherScript, EVENT_GOLDENROD_SALE_OFF + object_event 1, 6, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodDeptStoreRoofBugCatcherScript, EVENT_GOLDENROD_SALE_OFF diff --git a/maps/GoldenrodDeptStoreRoof.blk b/maps/GoldenrodDeptStoreRoof.blk new file mode 100644 index 0000000..5a2071e --- /dev/null +++ b/maps/GoldenrodDeptStoreRoof.blk @@ -0,0 +1 @@ +01111972::=<::62::8>::634;4;4;5 \ No newline at end of file diff --git a/maps/GoldenrodFlowerShop.asm b/maps/GoldenrodFlowerShop.asm new file mode 100644 index 0000000..5195107 --- /dev/null +++ b/maps/GoldenrodFlowerShop.asm @@ -0,0 +1,170 @@ + object_const_def + const GOLDENRODFLOWERSHOP_TEACHER + const GOLDENRODFLOWERSHOP_FLORIA + +GoldenrodFlowerShop_MapScripts: + def_scene_scripts + + def_callbacks + +FlowerShopTeacherScript: + checkevent EVENT_FOUGHT_SUDOWOODO + iftrue .Lalala + checkevent EVENT_GOT_SQUIRTBOTTLE + iftrue .GotSquirtbottle + checkevent EVENT_MET_FLORIA + iffalse .HaventMetFloria + checkevent EVENT_TALKED_TO_FLORIA_AT_FLOWER_SHOP + iffalse .Lalala + checkflag ENGINE_PLAINBADGE + iffalse .NoPlainBadge + faceplayer + opentext + writetext GoldenrodFlowerShopTeacherHeresTheSquirtbottleText + promptbutton + verbosegiveitem SQUIRTBOTTLE + setevent EVENT_GOT_SQUIRTBOTTLE + closetext + setevent EVENT_FLORIA_AT_SUDOWOODO + clearevent EVENT_FLORIA_AT_FLOWER_SHOP + end + +.Lalala: + turnobject GOLDENRODFLOWERSHOP_TEACHER, LEFT + opentext + writetext GoldenrodFlowerShopTeacherLalalaHavePlentyOfWaterText + waitbutton + closetext + end + +.GotSquirtbottle: + jumptextfaceplayer GoldenrodFlowerShopTeacherDontDoAnythingDangerousText + +.NoPlainBadge: + jumptextfaceplayer GoldenrodFlowerShopTeacherAskWantToBorrowWaterBottleText + +.HaventMetFloria: + jumptextfaceplayer GoldenrodFlowerShopTeacherMySisterWentToSeeWigglyTreeRoute36Text + +FlowerShopFloriaScript: + faceplayer + opentext + checkevent EVENT_FOUGHT_SUDOWOODO + iftrue .FoughtSudowoodo + checkevent EVENT_GOT_SQUIRTBOTTLE + iftrue .GotSquirtbottle + writetext GoldenrodFlowerShopFloriaWonderIfSisWillLendWaterBottleText + waitbutton + closetext + setevent EVENT_TALKED_TO_FLORIA_AT_FLOWER_SHOP + setevent EVENT_FLORIA_AT_FLOWER_SHOP + clearevent EVENT_FLORIA_AT_SUDOWOODO + end + +.GotSquirtbottle: + writetext GoldenrodFlowerShopFloriaYouBeatWhitneyText + waitbutton + closetext + end + +.FoughtSudowoodo: + writetext GoldenrodFlowerShopFloriaItReallyWasAMonText + waitbutton + closetext + end + +FlowerShopShelf1: ; unreferenced + jumpstd PictureBookshelfScript + +FlowerShopShelf2: ; unreferenced + jumpstd MagazineBookshelfScript + +FlowerShopRadio: ; unreferenced + jumpstd Radio2Script + +GoldenrodFlowerShopTeacherMySisterWentToSeeWigglyTreeRoute36Text: + text "Have you seen that" + line "wiggly tree that's" + + para "growing on ROUTE" + line "36?" + + para "My little sister" + line "got all excited" + + para "and went to see" + line "it…" + + para "I'm worried… Isn't" + line "it dangerous?" + done + +GoldenrodFlowerShopTeacherAskWantToBorrowWaterBottleText: + text "Do you want to" + line "borrow the water" + + para "bottle too?" + line "I don't want you" + + para "doing anything" + line "dangerous with it." + done + +GoldenrodFlowerShopTeacherHeresTheSquirtbottleText: + text "Oh, you're better" + line "than WHITNEY…" + + para "You'll be OK," + line "then. Here's the" + cont "SQUIRTBOTTLE!" + done + +GoldenrodFlowerShopTeacherDontDoAnythingDangerousText: + text "Don't do anything" + line "too dangerous!" + done + +GoldenrodFlowerShopTeacherLalalaHavePlentyOfWaterText: + text "Lalala lalalala." + line "Have plenty of" + cont "water, my lovely!" + done + +GoldenrodFlowerShopFloriaWonderIfSisWillLendWaterBottleText: + text "When I told my sis" + line "about the jiggly" + + para "tree, she told me" + line "it's dangerous." + + para "If I beat WHITNEY," + line "I wonder if she'll" + + para "lend me her water" + line "bottle…" + done + +GoldenrodFlowerShopFloriaYouBeatWhitneyText: + text "Wow, you beat" + line "WHITNEY? Cool!" + done + +GoldenrodFlowerShopFloriaItReallyWasAMonText: + text "So it really was a" + line "#MON!" + done + +GoldenrodFlowerShop_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, GOLDENROD_CITY, 6 + warp_event 3, 7, GOLDENROD_CITY, 6 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 4, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FlowerShopTeacherScript, -1 + object_event 5, 6, SPRITE_LASS, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, FlowerShopFloriaScript, EVENT_FLORIA_AT_FLOWER_SHOP diff --git a/maps/GoldenrodFlowerShop.blk b/maps/GoldenrodFlowerShop.blk new file mode 100644 index 0000000..10b67a4 --- /dev/null +++ b/maps/GoldenrodFlowerShop.blk @@ -0,0 +1 @@ +220/,.-  \ No newline at end of file diff --git a/maps/GoldenrodGameCorner.asm b/maps/GoldenrodGameCorner.asm new file mode 100644 index 0000000..4d5ae20 --- /dev/null +++ b/maps/GoldenrodGameCorner.asm @@ -0,0 +1,498 @@ +DEF GOLDENRODGAMECORNER_TM25_COINS EQU 5500 +DEF GOLDENRODGAMECORNER_TM14_COINS EQU 5500 +DEF GOLDENRODGAMECORNER_TM38_COINS EQU 5500 +DEF GOLDENRODGAMECORNER_ABRA_COINS EQU 100 +DEF GOLDENRODGAMECORNER_CUBONE_COINS EQU 800 +DEF GOLDENRODGAMECORNER_WOBBUFFET_COINS EQU 1500 + + object_const_def + const GOLDENRODGAMECORNER_CLERK + const GOLDENRODGAMECORNER_RECEPTIONIST1 + const GOLDENRODGAMECORNER_RECEPTIONIST2 + const GOLDENRODGAMECORNER_PHARMACIST1 + const GOLDENRODGAMECORNER_PHARMACIST2 + const GOLDENRODGAMECORNER_POKEFAN_M1 + const GOLDENRODGAMECORNER_COOLTRAINER_M + const GOLDENRODGAMECORNER_POKEFAN_F + const GOLDENRODGAMECORNER_COOLTRAINER_F + const GOLDENRODGAMECORNER_GENTLEMAN + const GOLDENRODGAMECORNER_POKEFAN_M2 + const GOLDENRODGAMECORNER_MOVETUTOR + +GoldenrodGameCorner_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, GoldenrodGameCornerMoveTutorCallback + +GoldenrodGameCornerMoveTutorCallback: + checkevent EVENT_BEAT_ELITE_FOUR + iffalse .finish + checkitem COIN_CASE + iffalse .move_tutor_inside + readvar VAR_WEEKDAY + ifequal WEDNESDAY, .move_tutor_outside + ifequal SATURDAY, .move_tutor_outside +.move_tutor_inside + appear GOLDENRODGAMECORNER_MOVETUTOR + endcallback + +.move_tutor_outside + checkflag ENGINE_DAILY_MOVE_TUTOR + iftrue .finish + disappear GOLDENRODGAMECORNER_MOVETUTOR +.finish + endcallback + +MoveTutorInsideScript: + faceplayer + opentext + writetext MoveTutorInsideText + waitbutton + closetext + turnobject GOLDENRODGAMECORNER_MOVETUTOR, RIGHT + end + +GoldenrodGameCornerCoinVendorScript: + jumpstd GameCornerCoinVendorScript + +GoldenrodGameCornerTMVendorScript: + faceplayer + opentext + writetext GoldenrodGameCornerPrizeVendorIntroText + waitbutton + checkitem COIN_CASE + iffalse GoldenrodGameCornerPrizeVendor_NoCoinCaseScript + writetext GoldenrodGameCornerPrizeVendorWhichPrizeText +GoldenrodGameCornerTMVendor_LoopScript: + special DisplayCoinCaseBalance + loadmenu GoldenrodGameCornerTMVendorMenuHeader + verticalmenu + closewindow + ifequal 1, .Thunder + ifequal 2, .Blizzard + ifequal 3, .FireBlast + sjump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript + +.Thunder: + checkcoins GOLDENRODGAMECORNER_TM25_COINS + ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript + getitemname STRING_BUFFER_3, TM_THUNDER + scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript + iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript + giveitem TM_THUNDER + iffalse GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript + takecoins GOLDENRODGAMECORNER_TM25_COINS + sjump GoldenrodGameCornerTMVendor_FinishScript + +.Blizzard: + checkcoins GOLDENRODGAMECORNER_TM14_COINS + ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript + getitemname STRING_BUFFER_3, TM_BLIZZARD + scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript + iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript + giveitem TM_BLIZZARD + iffalse GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript + takecoins GOLDENRODGAMECORNER_TM14_COINS + sjump GoldenrodGameCornerTMVendor_FinishScript + +.FireBlast: + checkcoins GOLDENRODGAMECORNER_TM38_COINS + ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript + getitemname STRING_BUFFER_3, TM_FIRE_BLAST + scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript + iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript + giveitem TM_FIRE_BLAST + iffalse GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript + takecoins GOLDENRODGAMECORNER_TM38_COINS + sjump GoldenrodGameCornerTMVendor_FinishScript + +GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript: + writetext GoldenrodGameCornerPrizeVendorConfirmPrizeText + yesorno + end + +GoldenrodGameCornerTMVendor_FinishScript: + waitsfx + playsound SFX_TRANSACTION + writetext GoldenrodGameCornerPrizeVendorHereYouGoText + waitbutton + sjump GoldenrodGameCornerTMVendor_LoopScript + +GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript: + writetext GoldenrodGameCornerPrizeVendorNeedMoreCoinsText + waitbutton + closetext + end + +GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript: + writetext GoldenrodGameCornerPrizeVendorNoMoreRoomText + waitbutton + closetext + end + +GoldenrodGameCornerPrizeVendor_CancelPurchaseScript: + writetext GoldenrodGameCornerPrizeVendorQuitText + waitbutton + closetext + end + +GoldenrodGameCornerPrizeVendor_NoCoinCaseScript: + writetext GoldenrodGameCornerPrizeVendorNoCoinCaseText + waitbutton + closetext + end + +GoldenrodGameCornerTMVendorMenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 2, 15, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 4 ; items + db "TM25 5500@" + db "TM14 5500@" + db "TM38 5500@" + db "CANCEL@" + +GoldenrodGameCornerPrizeMonVendorScript: + faceplayer + opentext + writetext GoldenrodGameCornerPrizeVendorIntroText + waitbutton + checkitem COIN_CASE + iffalse GoldenrodGameCornerPrizeVendor_NoCoinCaseScript +.loop + writetext GoldenrodGameCornerPrizeVendorWhichPrizeText + special DisplayCoinCaseBalance + loadmenu .MenuHeader + verticalmenu + closewindow + ifequal 1, .Abra + ifequal 2, .Cubone + ifequal 3, .Wobbuffet + sjump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript + +.Abra: + checkcoins GOLDENRODGAMECORNER_ABRA_COINS + ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript + readvar VAR_PARTYCOUNT + ifequal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript + getmonname STRING_BUFFER_3, ABRA + scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript + iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript + waitsfx + playsound SFX_TRANSACTION + writetext GoldenrodGameCornerPrizeVendorHereYouGoText + waitbutton + loadmonindex 1, ABRA + special GameCornerPrizeMonCheckDex + givepoke ABRA, 5 + takecoins GOLDENRODGAMECORNER_ABRA_COINS + sjump .loop + +.Cubone: + checkcoins GOLDENRODGAMECORNER_CUBONE_COINS + ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript + readvar VAR_PARTYCOUNT + ifequal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript + getmonname STRING_BUFFER_3, CUBONE + scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript + iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript + waitsfx + playsound SFX_TRANSACTION + writetext GoldenrodGameCornerPrizeVendorHereYouGoText + waitbutton + loadmonindex 2, CUBONE + special GameCornerPrizeMonCheckDex + givepoke CUBONE, 15 + takecoins GOLDENRODGAMECORNER_CUBONE_COINS + sjump .loop + +.Wobbuffet: + checkcoins GOLDENRODGAMECORNER_WOBBUFFET_COINS + ifequal HAVE_LESS, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript + readvar VAR_PARTYCOUNT + ifequal PARTY_LENGTH, GoldenrodGameCornerPrizeMonVendor_NoRoomForPrizeScript + getmonname STRING_BUFFER_3, WOBBUFFET + scall GoldenrodGameCornerPrizeVendor_ConfirmPurchaseScript + iffalse GoldenrodGameCornerPrizeVendor_CancelPurchaseScript + waitsfx + playsound SFX_TRANSACTION + writetext GoldenrodGameCornerPrizeVendorHereYouGoText + waitbutton + loadmonindex 3, WOBBUFFET + special GameCornerPrizeMonCheckDex + givepoke WOBBUFFET, 15 + takecoins GOLDENRODGAMECORNER_WOBBUFFET_COINS + sjump .loop + +.MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 2, 17, TEXTBOX_Y - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 4 ; items + db "ABRA 100@" + db "CUBONE 800@" + db "WOBBUFFET 1500@" + db "CANCEL@" + +GoldenrodGameCornerPharmacistScript: + faceplayer + opentext + writetext GoldenrodGameCornerPharmacistText + waitbutton + closetext + turnobject LAST_TALKED, LEFT + end + +GoldenrodGameCornerPokefanM1Script: + faceplayer + opentext + writetext GoldenrodGameCornerPokefanM1Text + waitbutton + closetext + turnobject GOLDENRODGAMECORNER_POKEFAN_M1, RIGHT + end + +GoldenrodGameCornerCooltrainerMScript: + faceplayer + opentext + writetext GoldenrodGameCornerCooltrainerMText + waitbutton + closetext + turnobject GOLDENRODGAMECORNER_COOLTRAINER_M, LEFT + end + +GoldenrodGameCornerPokefanFScript: + faceplayer + opentext + writetext GoldenrodGameCornerPokefanFText + waitbutton + closetext + turnobject GOLDENRODGAMECORNER_POKEFAN_F, RIGHT + end + +GoldenrodGameCornerCooltrainerFScript: + jumptextfaceplayer GoldenrodGameCornerCooltrainerFText + +GoldenrodGameCornerGentlemanScript: + faceplayer + opentext + writetext GoldenrodGameCornerGentlemanText + waitbutton + closetext + turnobject GOLDENRODGAMECORNER_GENTLEMAN, RIGHT + end + +GoldenrodGameCornerPokefanM2Script: + jumptextfaceplayer GoldenrodGameCornerPokefanM2Text + +GoldenrodGameCornerLeftTheirDrinkScript: + jumptext GoldenrodGameCornerLeftTheirDrinkText + +GoldenrodGameCornerSlotsMachineScript: + random 6 + ifequal 0, GoldenrodGameCornerLuckySlotsMachineScript + refreshscreen + setval FALSE + special SlotMachine + closetext + end + +GoldenrodGameCornerLuckySlotsMachineScript: + refreshscreen + setval TRUE + special SlotMachine + closetext + end + +GoldenrodGameCornerCardFlipMachineScript: + refreshscreen + special CardFlip + closetext + end + +GoldenrodGameCornerPrizeVendorIntroText: + text "Welcome!" + + para "We exchange your" + line "game coins for" + cont "fabulous prizes!" + done + +GoldenrodGameCornerPrizeVendorWhichPrizeText: + text "Which prize would" + line "you like?" + done + +GoldenrodGameCornerPrizeVendorConfirmPrizeText: + text_ram wStringBuffer3 + text "." + line "Is that right?" + done + +GoldenrodGameCornerPrizeVendorHereYouGoText: + text "Here you go!" + done + +GoldenrodGameCornerPrizeVendorNeedMoreCoinsText: + text "Sorry! You need" + line "more coins." + done + +GoldenrodGameCornerPrizeVendorNoMoreRoomText: + text "Sorry. You can't" + line "carry any more." + done + +GoldenrodGameCornerPrizeVendorQuitText: + text "OK. Please save" + line "your coins and" + cont "come again!" + done + +GoldenrodGameCornerPrizeVendorNoCoinCaseText: + text "Oh? You don't have" + line "a COIN CASE." + done + +GoldenrodGameCornerPharmacistText: + text "I always play this" + line "slot machine. It" + + para "pays out more than" + line "others, I think." + done + +GoldenrodGameCornerPokefanM1Text: + text "I just love this" + line "new slot machine." + + para "It's more of a" + line "challenge than the" + cont "ones in CELADON." + done + +GoldenrodGameCornerCooltrainerMText: + text "Life is a gamble." + line "I'm going to flip" + cont "cards till I drop!" + done + +GoldenrodGameCornerPokefanFText: + text "Card flip…" + + para "I prefer it over" + line "the slots because" + + para "it's easier to" + line "figure the odds." + + para "But the payout is" + line "much lower." + done + +GoldenrodGameCornerCooltrainerFText: + text "I won't quit until" + line "I win!" + done + +GoldenrodGameCornerGentlemanText: + text "I taught BLIZZARD" + line "to my #MON." + + para "It was hard to get" + line "enough coins for" + + para "it, but it was" + line "worth it." + done + +GoldenrodGameCornerPokefanM2Text: + text "I couldn't win at" + line "the slots, and I" + + para "blew it on card" + line "flipping…" + + para "I got so furious," + line "I tossed out my" + + para "COIN CASE in the" + line "UNDERGROUND." + done + +MoveTutorInsideText: + text "Wahahah! The coins" + line "keep rolling in!" + done + +GoldenrodGameCornerLeftTheirDrinkText: + text "Someone left their" + line "drink." + + para "It smells sweet." + done + +GoldenrodGameCorner_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 13, GOLDENROD_CITY, 10 + warp_event 3, 13, GOLDENROD_CITY, 10 + + def_coord_events + + def_bg_events + bg_event 6, 6, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 6, 7, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 6, 8, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 6, 9, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 6, 10, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 6, 11, BGEVENT_RIGHT, GoldenrodGameCornerSlotsMachineScript + bg_event 7, 6, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 7, 7, BGEVENT_READ, GoldenrodGameCornerLuckySlotsMachineScript + bg_event 7, 8, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 7, 9, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 7, 10, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 7, 11, BGEVENT_LEFT, GoldenrodGameCornerSlotsMachineScript + bg_event 12, 6, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 12, 7, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 12, 8, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 12, 9, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 12, 10, BGEVENT_READ, GoldenrodGameCornerSlotsMachineScript + bg_event 12, 11, BGEVENT_RIGHT, GoldenrodGameCornerSlotsMachineScript + bg_event 13, 6, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript + bg_event 13, 7, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript + bg_event 13, 8, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript + bg_event 13, 9, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript + bg_event 13, 10, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript + bg_event 13, 11, BGEVENT_LEFT, GoldenrodGameCornerCardFlipMachineScript + bg_event 18, 6, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript + bg_event 18, 7, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript + bg_event 18, 8, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript + bg_event 18, 9, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript + bg_event 18, 10, BGEVENT_READ, GoldenrodGameCornerCardFlipMachineScript + bg_event 18, 11, BGEVENT_RIGHT, GoldenrodGameCornerCardFlipMachineScript + bg_event 12, 1, BGEVENT_LEFT, GoldenrodGameCornerLeftTheirDrinkScript + + def_object_events + object_event 3, 2, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerCoinVendorScript, -1 + object_event 16, 2, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerTMVendorScript, -1 + object_event 18, 2, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPrizeMonVendorScript, -1 + object_event 8, 7, SPRITE_PHARMACIST, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, DAY, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPharmacistScript, -1 + object_event 8, 7, SPRITE_PHARMACIST, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, NITE, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPharmacistScript, -1 + object_event 11, 10, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM1Script, -1 + object_event 14, 8, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerCooltrainerMScript, -1 + object_event 17, 6, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanFScript, -1 + object_event 10, 3, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerCooltrainerFScript, -1 + object_event 5, 10, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerGentlemanScript, -1 + object_event 2, 9, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GoldenrodGameCornerPokefanM2Script, -1 + object_event 17, 10, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, MoveTutorInsideScript, EVENT_GOLDENROD_GAME_CORNER_MOVE_TUTOR diff --git a/maps/GoldenrodGameCorner.blk b/maps/GoldenrodGameCorner.blk new file mode 100644 index 0000000..9ef9597 --- /dev/null +++ b/maps/GoldenrodGameCorner.blk @@ -0,0 +1 @@ ++/0 ' ***     \ No newline at end of file diff --git a/maps/GoldenrodGym.asm b/maps/GoldenrodGym.asm new file mode 100644 index 0000000..a699666 --- /dev/null +++ b/maps/GoldenrodGym.asm @@ -0,0 +1,400 @@ + object_const_def + const GOLDENRODGYM_WHITNEY + const GOLDENRODGYM_LASS1 + const GOLDENRODGYM_LASS2 + const GOLDENRODGYM_BEAUTY1 + const GOLDENRODGYM_BEAUTY2 + const GOLDENRODGYM_GYM_GUIDE + +GoldenrodGym_MapScripts: + def_scene_scripts + scene_script GoldenrodGymNoop1Scene, SCENE_GOLDENRODGYM_NOOP + scene_script GoldenrodGymNoop2Scene, SCENE_GOLDENRODGYM_WHITNEY_STOPS_CRYING + + def_callbacks + +GoldenrodGymNoop1Scene: + end + +GoldenrodGymNoop2Scene: + end + +GoldenrodGymWhitneyScript: + faceplayer + checkevent EVENT_BEAT_WHITNEY + iftrue .FightDone + opentext + writetext WhitneyBeforeText + waitbutton + closetext + winlosstext WhitneyShouldntBeSoSeriousText, 0 + loadtrainer WHITNEY, WHITNEY1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_WHITNEY + setevent EVENT_MADE_WHITNEY_CRY + setscene SCENE_GOLDENRODGYM_WHITNEY_STOPS_CRYING + setevent EVENT_BEAT_BEAUTY_VICTORIA + setevent EVENT_BEAT_BEAUTY_SAMANTHA + setevent EVENT_BEAT_LASS_CARRIE + setevent EVENT_BEAT_LASS_BRIDGET +.FightDone: + opentext + checkevent EVENT_MADE_WHITNEY_CRY + iffalse .StoppedCrying + writetext WhitneyYouMeanieText + waitbutton + closetext + end + +.StoppedCrying: + checkevent EVENT_GOT_TM45_ATTRACT + iftrue .GotAttract + checkflag ENGINE_PLAINBADGE + iftrue .GotPlainBadge + writetext WhitneyWhatDoYouWantText + promptbutton + waitsfx + writetext PlayerReceivedPlainBadgeText + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_PLAINBADGE + readvar VAR_BADGES + scall GoldenrodGymActivateRockets +.GotPlainBadge: + writetext WhitneyPlainBadgeText + promptbutton + verbosegiveitem TM_ATTRACT + iffalse .NoRoomForAttract + setevent EVENT_GOT_TM45_ATTRACT + writetext WhitneyAttractText + waitbutton + closetext + end + +.GotAttract: + writetext WhitneyGoodCryText + waitbutton +.NoRoomForAttract: + closetext + end + +GoldenrodGymActivateRockets: + ifequal 7, .RadioTowerRockets + ifequal 6, .GoldenrodRockets + end + +.GoldenrodRockets: + jumpstd GoldenrodRocketsScript + +.RadioTowerRockets: + jumpstd RadioTowerRocketsScript + +TrainerLassCarrie: + trainer LASS, CARRIE, EVENT_BEAT_LASS_CARRIE, LassCarrieSeenText, LassCarrieBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext LassCarrieAfterBattleText + waitbutton + closetext + end + +WhitneyCriesScript: + showemote EMOTE_SHOCK, GOLDENRODGYM_LASS2, 15 + applymovement GOLDENRODGYM_LASS2, BridgetWalksUpMovement + turnobject PLAYER, DOWN + opentext + writetext BridgetWhitneyCriesText + waitbutton + closetext + applymovement GOLDENRODGYM_LASS2, BridgetWalksAwayMovement + setscene SCENE_GOLDENRODGYM_NOOP + clearevent EVENT_MADE_WHITNEY_CRY + end + +TrainerLassBridget: + trainer LASS, BRIDGET, EVENT_BEAT_LASS_BRIDGET, LassBridgetSeenText, LassBridgetBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext LassBridgetAfterBattleText + waitbutton + closetext + end + +TrainerBeautyVictoria: + trainer BEAUTY, VICTORIA, EVENT_BEAT_BEAUTY_VICTORIA, BeautyVictoriaSeenText, BeautyVictoriaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BeautyVictoriaAfterBattleText + waitbutton + closetext + end + +TrainerBeautySamantha: + trainer BEAUTY, SAMANTHA, EVENT_BEAT_BEAUTY_SAMANTHA, BeautySamanthaSeenText, BeautySamanthaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BeautySamanthaAfterBattleText + waitbutton + closetext + end + +GoldenrodGymGuideScript: + faceplayer + checkevent EVENT_BEAT_WHITNEY + iftrue .GoldenrodGymGuideWinScript + opentext + writetext GoldenrodGymGuideText + waitbutton + closetext + end + +.GoldenrodGymGuideWinScript: + opentext + writetext GoldenrodGymGuideWinText + waitbutton + closetext + end + +GoldenrodGymStatue: + checkflag ENGINE_PLAINBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, WHITNEY, WHITNEY1 + jumpstd GymStatue2Script + +BridgetWalksUpMovement: + step LEFT + turn_head UP + step_end + +BridgetWalksAwayMovement: + step RIGHT + turn_head LEFT + step_end + +WhitneyBeforeText: + text "Hi! I'm WHITNEY!" + + para "Everyone was into" + line "#MON, so I got" + cont "into it too!" + + para "#MON are" + line "super-cute!" + + para "You want to bat-" + line "tle? I'm warning" + cont "you--I'm good!" + done + +WhitneyShouldntBeSoSeriousText: + text "Sob…" + + para "…Waaaaaaah!" + line "You're mean!" + + para "You shouldn't be" + line "so serious! You…" + cont "you child, you!" + done + +WhitneyYouMeanieText: + text "Waaaaah!" + + para "Waaaaah!" + + para "…Snivel, hic…" + line "…You meanie!" + done + +WhitneyWhatDoYouWantText: + text "…Sniff…" + + para "What? What do you" + line "want? A BADGE?" + + para "Oh, right." + line "I forgot. Here's" + cont "PLAINBADGE." + done + +PlayerReceivedPlainBadgeText: + text " received" + line "PLAINBADGE." + done + +WhitneyPlainBadgeText: + text "PLAINBADGE lets" + line "your #MON use" + + para "STRENGTH outside" + line "of battle." + + para "It also boosts" + line "your #MON's" + cont "SPEED." + + para "Oh, you can have" + line "this too!" + done + +WhitneyAttractText: + text "It's ATTRACT!" + line "It makes full use" + + para "of a #MON's" + line "charm." + + para "Isn't it just per-" + line "fect for a cutie" + cont "like me?" + done + +WhitneyGoodCryText: + text "Ah, that was a" + line "good cry!" + + para "Come for a visit" + line "again! Bye-bye!" + done + +LassCarrieSeenText: + text "Don't let my" + line "#MON's cute" + + para "looks fool you." + line "They can whip you!" + done + +LassCarrieBeatenText: + text "Darn… I thought" + line "you were weak…" + done + +LassCarrieAfterBattleText: + text "Do my #MON" + line "think I'm cute?" + done + +LassBridgetSeenText: + text "I like cute #-" + line "MON better than" + cont "strong #MON." + + para "But I have strong" + line "and cute #MON!" + done + +LassBridgetBeatenText: + text "Oh, no, no, no!" + done + +LassBridgetAfterBattleText: + text "I'm trying to beat" + line "WHITNEY, but…" + cont "It's depressing." + + para "I'm okay! If I" + line "lose, I'll just" + + para "try harder next" + line "time!" + done + +BridgetWhitneyCriesText: + text "Oh, no. You made" + line "WHITNEY cry." + + para "It's OK. She'll" + line "stop soon. She" + + para "always cries when" + line "she loses." + done + +BeautyVictoriaSeenText: + text "Oh, you are a cute" + line "little trainer! " + + para "I like you, but I" + line "won't hold back!" + done + +BeautyVictoriaBeatenText: + text "Let's see… Oops," + line "it's over?" + done + +BeautyVictoriaAfterBattleText: + text "Wow, you must be" + line "good to beat me!" + cont "Keep it up!" + done + +BeautySamanthaSeenText: + text "Give it your best" + line "shot, or I'll take" + cont "you down!" + done + +BeautySamanthaBeatenText: + text "No! Oh, MEOWTH," + line "I'm so sorry!" + done + +BeautySamanthaAfterBattleText: + text "I taught MEOWTH" + line "moves for taking" + cont "on any type…" + done + +GoldenrodGymGuideText: + text "Yo! CHAMP in" + line "making!" + + para "This GYM is home" + line "to normal-type" + cont "#MON trainers." + + para "I recommend you" + line "use fighting-type" + cont "#MON." + done + +GoldenrodGymGuideWinText: + text "You won? Great! I" + line "was busy admiring" + cont "the ladies here." + done + +GoldenrodGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 17, GOLDENROD_CITY, 1 + warp_event 3, 17, GOLDENROD_CITY, 1 + + def_coord_events + coord_event 8, 5, SCENE_GOLDENRODGYM_WHITNEY_STOPS_CRYING, WhitneyCriesScript + + def_bg_events + bg_event 1, 15, BGEVENT_READ, GoldenrodGymStatue + bg_event 4, 15, BGEVENT_READ, GoldenrodGymStatue + + def_object_events + object_event 8, 3, SPRITE_WHITNEY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGymWhitneyScript, -1 + object_event 9, 13, SPRITE_LASS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerLassCarrie, -1 + object_event 9, 6, SPRITE_LASS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerLassBridget, -1 + object_event 0, 2, SPRITE_BEAUTY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBeautyVictoria, -1 + object_event 19, 5, SPRITE_BEAUTY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBeautySamantha, -1 + object_event 5, 15, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, GoldenrodGymGuideScript, -1 diff --git a/maps/GoldenrodGym.blk b/maps/GoldenrodGym.blk new file mode 100644 index 0000000..6781de0 --- /dev/null +++ b/maps/GoldenrodGym.blk @@ -0,0 +1 @@ +       %&    \ No newline at end of file diff --git a/maps/GoldenrodHappinessRater.asm b/maps/GoldenrodHappinessRater.asm new file mode 100644 index 0000000..019e553 --- /dev/null +++ b/maps/GoldenrodHappinessRater.asm @@ -0,0 +1,154 @@ + object_const_def + const GOLDENRODHAPPINESSRATER_TEACHER + const GOLDENRODHAPPINESSRATER_POKEFAN_M + const GOLDENRODHAPPINESSRATER_TWIN + +GoldenrodHappinessRater_MapScripts: + def_scene_scripts + + def_callbacks + +GoldenrodHappinessRaterTeacherScript: + faceplayer + opentext + special GetFirstPokemonHappiness + writetext GoldenrodHappinessRaterTeacherText + promptbutton + ifgreater 250 - 1, .LovesYouALot + ifgreater 200 - 1, .ReallyTrustsYou + ifgreater 150 - 1, .SortOfHappy + ifgreater 100 - 1, .QuiteCute + ifgreater 50 - 1, .NotUsedToYou + sjump .LooksMean + +.LovesYouALot: + writetext GoldenrodHappinessRatingText_LovesYouALot + waitbutton + closetext + end + +.ReallyTrustsYou: + writetext GoldenrodHappinessRatingText_ReallyTrustsYou + waitbutton + closetext + end + +.SortOfHappy: + writetext GoldenrodHappinessRatingText_SortOfHappy + waitbutton + closetext + end + +.QuiteCute: + writetext GoldenrodHappinessRatingText_QuiteCute + waitbutton + closetext + end + +.NotUsedToYou: + writetext GoldenrodHappinessRatingText_NotUsedToYou + waitbutton + closetext + end + +.LooksMean: + writetext GoldenrodHappinessRatingText_LooksMean + waitbutton + closetext + end + +GoldenrodHappinessRaterPokefanMScript: + jumptextfaceplayer GoldenrodHappinessRaterPokefanMText + +GoldenrodHappinessRaterTwinScript: + jumptextfaceplayer GoldenrodHappinessRaterTwinText + +HappinessRatersHouseBookshelf: + jumpstd DifficultBookshelfScript + +HappinessRatersHouseRadio: + jumpstd Radio2Script + +GoldenrodHappinessRaterTeacherText: + text "If you treat your" + line "#MON nicely," + + para "they will love you" + line "in return." + + para "Oh? Let me see" + line "your @" + text_ram wStringBuffer3 + text "…" + done + +GoldenrodHappinessRatingText_LovesYouALot: + text "It looks really" + line "happy! It must" + cont "love you a lot." + done + +GoldenrodHappinessRatingText_ReallyTrustsYou: + text "I get the feeling" + line "that it really" + cont "trusts you." + done + +GoldenrodHappinessRatingText_SortOfHappy: + text "It's friendly to-" + line "ward you. It looks" + cont "sort of happy." + done + +GoldenrodHappinessRatingText_QuiteCute: + text "It's quite cute." + done + +GoldenrodHappinessRatingText_NotUsedToYou: + text "You should treat" + line "it better. It's" + cont "not used to you." + done + +GoldenrodHappinessRatingText_LooksMean: + text "It doesn't seem to" + line "like you at all." + cont "It looks mean." + done + +GoldenrodHappinessRaterPokefanMText: + text "I keep losing in" + line "battles, and my" + + para "#MON end up" + line "fainting…" + + para "Maybe that's why" + line "my #MON don't" + cont "like me much…" + done + +GoldenrodHappinessRaterTwinText: + text "When I use an item" + line "on my #MON, it" + cont "acts really glad!" + done + +GoldenrodHappinessRater_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, GOLDENROD_CITY, 3 + warp_event 3, 7, GOLDENROD_CITY, 3 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, HappinessRatersHouseBookshelf + bg_event 1, 1, BGEVENT_READ, HappinessRatersHouseBookshelf + bg_event 7, 1, BGEVENT_READ, HappinessRatersHouseRadio + + def_object_events + object_event 2, 4, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, GoldenrodHappinessRaterTeacherScript, -1 + object_event 5, 3, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodHappinessRaterPokefanMScript, -1 + object_event 5, 6, SPRITE_TWIN, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodHappinessRaterTwinScript, -1 diff --git a/maps/GoldenrodMagnetTrainStation.asm b/maps/GoldenrodMagnetTrainStation.asm new file mode 100644 index 0000000..8c68492 --- /dev/null +++ b/maps/GoldenrodMagnetTrainStation.asm @@ -0,0 +1,181 @@ + object_const_def + const GOLDENRODMAGNETTRAINSTATION_OFFICER + const GOLDENRODMAGNETTRAINSTATION_GENTLEMAN + +GoldenrodMagnetTrainStation_MapScripts: + def_scene_scripts + scene_script GoldenrodMagnetTrainStationNoopScene, SCENE_GOLDENRODMAGNETTRAINSTATION_ARRIVE_FROM_SAFFRON + + def_callbacks + +GoldenrodMagnetTrainStationNoopScene: + end + +GoldenrodMagnetTrainStationOfficerScript: + faceplayer + opentext + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .MagnetTrainToSaffron + writetext GoldenrodMagnetTrainStationOfficerTheTrainHasntComeInText + waitbutton + closetext + end + +.MagnetTrainToSaffron: + writetext GoldenrodMagnetTrainStationOfficerAreYouComingAboardText + yesorno + iffalse .DecidedNotToRide + checkitem PASS + iffalse .PassNotInBag + writetext GoldenrodMagnetTrainStationOfficerRightThisWayText + waitbutton + closetext + applymovement GOLDENRODMAGNETTRAINSTATION_OFFICER, GoldenrodMagnetTrainStationOfficerApproachTrainDoorMovement + applymovement PLAYER, GoldenrodMagnetTrainStationPlayerApproachAndEnterTrainMovement + setval FALSE + special MagnetTrain + warpcheck + newloadmap MAPSETUP_TRAIN + applymovement PLAYER, .MovementBoardTheTrain + wait 20 + end + +.MovementBoardTheTrain: + turn_head DOWN + step_end + +.PassNotInBag: + writetext GoldenrodMagnetTrainStationOfficerYouDontHaveARailPassText + waitbutton + closetext + end + +.DecidedNotToRide: + writetext GoldenrodMagnetTrainStationOfficerHopeToSeeYouAgainText + waitbutton + closetext + end + +Script_ArriveFromSaffron: + applymovement GOLDENRODMAGNETTRAINSTATION_OFFICER, GoldenrodMagnetTrainStationOfficerApproachTrainDoorMovement + applymovement PLAYER, GoldenrodMagnetTrainStationPlayerLeaveTrainAndEnterStationMovement + applymovement GOLDENRODMAGNETTRAINSTATION_OFFICER, GoldenrodMagnetTrainStationOfficerReturnToBoardingGateMovement + opentext + writetext GoldenrodMagnetTrainStationOfficerArrivedInGoldenrodText + waitbutton + closetext + end + +GoldenrodMagnetTrainStationGentlemanScript: + jumptextfaceplayer GoldenrodMagnetTrainStationGentlemanText + +GoldenrodMagnetTrainStationOfficerApproachTrainDoorMovement: + step UP + step UP + step RIGHT + turn_head LEFT + step_end + +GoldenrodMagnetTrainStationOfficerReturnToBoardingGateMovement: + step LEFT + step DOWN + step DOWN + step_end + +GoldenrodMagnetTrainStationPlayerApproachAndEnterTrainMovement: + step UP + step UP + step UP + step LEFT + step LEFT + step LEFT + step UP + step UP + step_end + +GoldenrodMagnetTrainStationPlayerLeaveTrainAndEnterStationMovement: + step LEFT + step LEFT + step DOWN + step DOWN + step DOWN + step DOWN + turn_head UP + step_end + +GoldenrodMagnetTrainStationOfficerTheTrainHasntComeInText: + text "The train hasn't" + line "come in…" + + para "I know! I'll carry" + line "the passengers on" + cont "my back!" + + para "That won't work." + done + +GoldenrodMagnetTrainStationOfficerAreYouComingAboardText: + text "We'll soon depart" + line "for SAFFRON." + + para "Are you coming" + line "aboard?" + done + +GoldenrodMagnetTrainStationOfficerRightThisWayText: + text "May I see your" + line "rail PASS, please?" + + para "OK. Right this" + line "way, please." + done + +GoldenrodMagnetTrainStationOfficerYouDontHaveARailPassText: + text "Sorry. You don't" + line "have a rail PASS." + done + +GoldenrodMagnetTrainStationOfficerHopeToSeeYouAgainText: + text "We hope to see you" + line "again!" + done + +GoldenrodMagnetTrainStationOfficerArrivedInGoldenrodText: + text "We have arrived in" + line "GOLDENROD." + + para "We hope to see you" + line "again." + done + +GoldenrodMagnetTrainStationGentlemanText: + text "I'm the PRESIDENT." + + para "My dream was to" + line "build a train that" + + para "is faster than any" + line "#MON." + + para "It really brings" + line "JOHTO much closer" + cont "to KANTO." + done + +GoldenrodMagnetTrainStation_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 8, 17, GOLDENROD_CITY, 5 + warp_event 9, 17, GOLDENROD_CITY, 5 + warp_event 6, 5, SAFFRON_MAGNET_TRAIN_STATION, 4 + warp_event 11, 5, SAFFRON_MAGNET_TRAIN_STATION, 3 + + def_coord_events + coord_event 11, 6, SCENE_GOLDENRODMAGNETTRAINSTATION_ARRIVE_FROM_SAFFRON, Script_ArriveFromSaffron + + def_bg_events + + def_object_events + object_event 9, 9, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodMagnetTrainStationOfficerScript, -1 + object_event 11, 14, SPRITE_GENTLEMAN, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodMagnetTrainStationGentlemanScript, EVENT_GOLDENROD_TRAIN_STATION_GENTLEMAN diff --git a/maps/GoldenrodMagnetTrainStation.blk b/maps/GoldenrodMagnetTrainStation.blk new file mode 100644 index 0000000..777d071 --- /dev/null +++ b/maps/GoldenrodMagnetTrainStation.blk @@ -0,0 +1,6 @@ + + + + + + ,-    \ No newline at end of file diff --git a/maps/GoldenrodNameRater.asm b/maps/GoldenrodNameRater.asm new file mode 100644 index 0000000..f746c53 --- /dev/null +++ b/maps/GoldenrodNameRater.asm @@ -0,0 +1,38 @@ + object_const_def + const GOLDENRODNAMERATER_NAME_RATER + +GoldenrodNameRater_MapScripts: + def_scene_scripts + + def_callbacks + +GoldenrodNameRater: + faceplayer + opentext + special NameRater + waitbutton + closetext + end + +GoldenrodNameRaterBookshelf: + jumpstd DifficultBookshelfScript + +GoldenrodNameRaterRadio: + jumpstd Radio2Script + +GoldenrodNameRater_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, GOLDENROD_CITY, 8 + warp_event 3, 7, GOLDENROD_CITY, 8 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, GoldenrodNameRaterBookshelf + bg_event 1, 1, BGEVENT_READ, GoldenrodNameRaterBookshelf + bg_event 7, 1, BGEVENT_READ, GoldenrodNameRaterRadio + + def_object_events + object_event 2, 4, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_DOWN, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodNameRater, -1 diff --git a/maps/GoldenrodPPSpeechHouse.asm b/maps/GoldenrodPPSpeechHouse.asm new file mode 100644 index 0000000..42510af --- /dev/null +++ b/maps/GoldenrodPPSpeechHouse.asm @@ -0,0 +1,68 @@ + object_const_def + const GOLDENRODPPSPEECHHOUSE_FISHER + const GOLDENRODPPSPEECHHOUSE_LASS + +GoldenrodPPSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +GoldenrodPPSpeechHouseFisherScript: + jumptextfaceplayer GoldenrodPPSpeechHouseFisherText + +GoldenrodPPSpeechHouseLassScript: + jumptextfaceplayer GoldenrodPPSpeechHouseLassText + +GoldenrodPPSpeechHouseBookshelf2: + jumpstd DifficultBookshelfScript + +GoldenrodPPSpeechHouseBookshelf1: + jumpstd MagazineBookshelfScript + +GoldenrodPPSpeechHouseRadio: + jumpstd Radio2Script + +GoldenrodPPSpeechHouseFisherText: + text "Once while I was" + line "battling, my" + + para "#MON couldn't" + line "make any moves." + + para "The POWER POINTS," + line "or PP, of its" + + para "moves were all" + line "gone." + done + +GoldenrodPPSpeechHouseLassText: + text "Sometimes, a" + line "healthy #MON" + + para "may be unable to" + line "use its moves." + + para "If that happens," + line "heal it at a #-" + cont "MON CENTER or use" + cont "an item." + done + +GoldenrodPPSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, GOLDENROD_CITY, 7 + warp_event 3, 7, GOLDENROD_CITY, 7 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, GoldenrodPPSpeechHouseBookshelf1 + bg_event 1, 1, BGEVENT_READ, GoldenrodPPSpeechHouseBookshelf2 + bg_event 7, 1, BGEVENT_READ, GoldenrodPPSpeechHouseRadio + + def_object_events + object_event 2, 4, SPRITE_FISHER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodPPSpeechHouseFisherScript, -1 + object_event 5, 3, SPRITE_LASS, SPRITEMOVEDATA_STANDING_LEFT, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodPPSpeechHouseLassScript, -1 diff --git a/maps/GoldenrodPokecenter1F.asm b/maps/GoldenrodPokecenter1F.asm new file mode 100644 index 0000000..9483b81 --- /dev/null +++ b/maps/GoldenrodPokecenter1F.asm @@ -0,0 +1,825 @@ + object_const_def + const GOLDENRODPOKECENTER1F_NURSE + const GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST + const GOLDENRODPOKECENTER1F_GAMEBOY_KID + const GOLDENRODPOKECENTER1F_LASS + const GOLDENRODPOKECENTER1F_POKEFAN_F + +GoldenrodPokecenter1F_MapScripts: + def_scene_scripts + scene_const SCENE_GOLDENRODPOKECENTER1F_GS_BALL + + def_callbacks + +GoldenrodPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +GoldenrodPokecenter1F_GSBallSceneLeft: + setval BATTLETOWERACTION_CHECKMOBILEEVENT + special BattleTowerAction + ifequal MOBILE_EVENT_OBJECT_GS_BALL, .gsball + end + +.gsball + checkevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER + iftrue .cancel + playsound SFX_EXIT_BUILDING + moveobject GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, 0, 7 + disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST + appear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST + playmusic MUSIC_SHOW_ME_AROUND + applymovement GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, GoldenrodPokeCenter1FLinkReceptionistApproachPlayerAtLeftDoorwayTileMovement + turnobject PLAYER, UP + opentext + writetext GoldenrodPokeCenter1FLinkReceptionistPleaseAcceptGSBallText + waitbutton + verbosegiveitem GS_BALL + setevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER + setevent EVENT_CAN_GIVE_GS_BALL_TO_KURT + writetext GoldenrodPokeCenter1FLinkReceptionistPleaseDoComeAgainText + waitbutton + closetext + applymovement GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, GoldenrodPokeCenter1FLinkReceptionistWalkToStairsFromLeftDoorwayTileMovement + special RestartMapMusic + disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST + playsound SFX_EXIT_BUILDING +.cancel + end + +GoldenrodPokecenter1F_GSBallSceneRight: + setval BATTLETOWERACTION_CHECKMOBILEEVENT + special BattleTowerAction + ifequal MOBILE_EVENT_OBJECT_GS_BALL, .gsball + end + +.gsball + checkevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER + iftrue .cancel + playsound SFX_EXIT_BUILDING + moveobject GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, 0, 7 + disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST + appear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST + playmusic MUSIC_SHOW_ME_AROUND + applymovement GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, GoldenrodPokeCenter1FLinkReceptionistApproachPlayerAtRightDoorwayTileMovement + turnobject PLAYER, UP + opentext + writetext GoldenrodPokeCenter1FLinkReceptionistPleaseAcceptGSBallText + waitbutton + verbosegiveitem GS_BALL + setevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER + setevent EVENT_CAN_GIVE_GS_BALL_TO_KURT + writetext GoldenrodPokeCenter1FLinkReceptionistPleaseDoComeAgainText + waitbutton + closetext + applymovement GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST, GoldenrodPokeCenter1FLinkReceptionistWalkToStairsFromRightDoorwayTileMovement + special RestartMapMusic + disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST + playsound SFX_EXIT_BUILDING +.cancel + end + +GoldenrodPokecenter1FGameboyKidScript: + jumptextfaceplayer GoldenrodPokecenter1FGameboyKidText + +GoldenrodPokecenter1FLassScript: + jumptextfaceplayer GoldenrodPokecenter1FLassText + +GoldenrodPokecenter1FPokefanF: + faceplayer + opentext + writetext GoldenrodPokecenter1FPokefanFDoYouHaveEonMailText + waitbutton + writetext GoldenrodPokecenter1FAskGiveAwayAnEonMailText + yesorno + iffalse .NoEonMail + takeitem EON_MAIL + iffalse .NoEonMail + writetext GoldenrodPokecenter1FPlayerGaveAwayTheEonMailText + waitbutton + writetext GoldenrodPokecenter1FPokefanFThisIsForYouText + waitbutton + verbosegiveitem REVIVE + iffalse .NoRoom + writetext GoldenrodPokecenter1FPokefanFDaughterWillBeDelightedText + waitbutton + closetext + end + +.NoEonMail: + writetext GoldenrodPokecenter1FPokefanFTooBadText + waitbutton + closetext + end + +.NoRoom: + giveitem EON_MAIL + writetext GoldenrodPokecenter1FPokefanFAnotherTimeThenText + waitbutton + closetext + end + +GoldenrodPokeCenter1FLinkReceptionistApproachPlayerAtLeftDoorwayTileMovement: + step UP + step RIGHT + step RIGHT + step RIGHT + turn_head DOWN + step_end + +GoldenrodPokeCenter1FLinkReceptionistWalkToStairsFromLeftDoorwayTileMovement: + step LEFT + step LEFT + step LEFT + step DOWN + step_end + +GoldenrodPokeCenter1FLinkReceptionistApproachPlayerAtRightDoorwayTileMovement: + step UP + step RIGHT + step RIGHT + step RIGHT + step RIGHT + turn_head DOWN + step_end + +GoldenrodPokeCenter1FLinkReceptionistWalkToStairsFromRightDoorwayTileMovement: + step LEFT + step LEFT + step LEFT + step LEFT + step DOWN + step_end + +GoldenrodPokecomCenterWelcomeToTradeCornerText: ; unreferenced + text "Hello! Welcome to" + line "#COM CENTER" + cont "TRADE CORNER." + + para "You can trade" + line "#MON with other" + cont "people far away." + done + +GoldenrodPokecomCenterWeMustHoldYourMonText: ; unreferenced + text "To make a trade," + line "we must hold your" + cont "#MON." + + para "Would you like to" + line "trade?" + done + +GoldenrodPokecomCenterWhatMonDoYouWantText: ; unreferenced + text "What kind of" + line "#MON do you" + cont "want in return?" + done + +GoldenrodPokecomCenterWeWillTradeYourMonForMonText: ; unreferenced + text "Fine. We will try" + line "to trade your" + + para "@" + text_ram wStringBuffer3 + text " for" + line "@" + text_ram wStringBuffer4 + text "." + + para "We'll have to hold" + line "your #MON" + cont "during the trade." + + para "Please wait while" + line "we prepare the" + cont "room for it." + done + +GoldenrodPokecomCenterWeWillTradeYourMonForNewText: ; unreferenced + text "Fine. We will try" + line "to trade your" + + para "@" + text_ram wStringBuffer3 + text " for a" + line "#MON that you" + cont "have never seen." + + para "We'll have to hold" + line "your #MON" + cont "during the trade." + + para "Please wait while" + line "we prepare the" + cont "room for it." + done + +GoldenrodPokecomCenterYourMonHasBeenReceivedText: ; unreferenced + text "Your trade #MON" + line "has been received." + + para "It will take time" + line "to find a trade" + + para "partner. Please" + line "come back later." + done + +GoldenrodPokecomCenterYouHaveOnlyOneMonText: ; unreferenced + text "Oh? You have only" + line "one #MON in" + cont "your party. " + + para "Please come back" + line "once you've in-" + cont "creased the size" + cont "of your party." + done + +GoldenrodPokecomCenterWeHopeToSeeYouAgainText: ; unreferenced + text "We hope to see you" + line "again." + done + +GoldenrodPokecomCenterCommunicationErrorText: ; unreferenced + text "Communication" + line "error…" + done + +GoldenrodPokecomCenterCantAcceptLastMonText: ; unreferenced + text "If we accept that" + line "#MON, what will" + cont "you battle with?" + done + +GoldenrodPokecomCenterCantAcceptEggText: ; unreferenced + text "Sorry. We can't" + line "accept an EGG." + done + +GoldenrodPokecomCenterCantAcceptAbnormalMonText: ; unreferenced + text "Sorry, but your" + line "#MON appears to" + + para "be abnormal. We" + line "can't accept it." + done + +GoldenrodPokecomCenterAlreadyHoldingMonText: ; unreferenced + text "Oh? Aren't we" + line "already holding a" + cont "#MON of yours?" + done + +GoldenrodPokecomCenterCheckingTheRoomsText: ; unreferenced + text "We'll check the" + line "rooms." + + para "Please wait." + done + +GoldenrodPokecomCenterTradePartnerHasBeenFoundText: ; unreferenced + text "Thank you for your" + line "patience." + + para "A trade partner" + line "has been found." + done + +GoldenrodPokecomCenterItsYourNewPartnerText: ; unreferenced + text "It's your new" + line "partner." + + para "Please take care" + line "of it with love." + + para "We hope to see you" + line "again." + done + +GoldenrodPokecomCenterYourPartyIsFullText: ; unreferenced + text "Uh-oh. Your party" + line "is already full." + + para "Please come back" + line "when you have room" + cont "in your party." + done + +GoldenrodPokecomCenterNoTradePartnerFoundText: ; unreferenced + text "It's unfortunate," + line "but no one has" + + para "come forward as a" + line "trade partner." + + para "Would you like" + line "your #MON back?" + done + +GoldenrodPokecomCenterReturnedYourMonText: ; unreferenced + text "We have returned" + line "your #MON." + done + +GoldenrodPokecomCenterYourMonIsLonelyText: ; unreferenced + text "It's unfortunate," + line "but no one has" + + para "come forward as a" + line "trade partner." + + para "We've held your" + line "#MON for a long" + + para "time. As a result," + line "it is very lonely." + + para "Sorry, but we must" + line "return it to you." + done + +GoldenrodPokecenter1FWeHopeToSeeYouAgainText_2: ; unreferenced + text "We hope to see you" + line "again." + done + +GoldenrodPokecomCenterContinueToHoldYourMonText: ; unreferenced + text "Fine. We will" + line "continue to hold" + cont "your #MON." + done + +GoldenrodPokecomCenterRecentlyLeftYourMonText: ; unreferenced + text "Oh? You left your" + line "#MON with us" + cont "only recently." + + para "Please come back" + line "later." + done + +GoldenrodPokecomCenterSaveBeforeTradeCornerText: ; unreferenced + text "We'll SAVE before" + line "connecting to the" + cont "CENTER." + done + +GoldenrodPokecomCenterWhichMonToTradeText: ; unreferenced + text "Which #MON do" + line "you want to trade?" + done + +GoldenrodPokecomCenterTradeCanceledText: ; unreferenced + text "Sorry, but we must" + line "cancel the trade." + done + +GoldenrodPokecomCenterEggTicketText: ; unreferenced + text "Oh!" + + para "I see you have an" + line "EGG TICKET!" + + para "It's a coupon that" + line "special people can" + + para "redeem for a" + line "special #MON!" + done + +GoldenrodPokecomCenterOddEggBriefingText: ; unreferenced + text "Let me give you a" + line "quick briefing." + + para "Trades held at the" + line "TRADE CORNER are" + + para "between two" + line "trainers who don't" + + para "know each other's" + line "identity." + + para "As a result, it" + line "may take time." + + para "However, an ODD" + line "EGG is available" + cont "just for you." + + para "It will be sent to" + line "you right away." + + para "Please choose one" + line "of the rooms in" + + para "the CENTER." + line "An ODD EGG will be" + + para "sent from the" + line "chosen room." + done + +GoldenrodPokecomCenterPleaseWaitAMomentText: ; unreferenced + text "Please wait a" + line "moment." + done + +GoldenrodPokecomCenterHereIsYourOddEggText: ; unreferenced + text "Thank you for" + line "waiting." + + para "We received your" + line "ODD EGG." + + para "Here it is!" + + para "Please raise it" + line "with loving care." + done + +GoldenrodPokecomCenterNoEggTicketServiceText: ; unreferenced + text "I'm awfully sorry." + + para "The EGG TICKET" + line "exchange service" + cont "isn't running now." + done + +GoldenrodPokecomCenterNewsMachineText: ; unreferenced + text "It's a #MON" + line "NEWS MACHINE." + done + +GoldenrodPokecomCenterWhatToDoText: ; unreferenced + text "What would you" + line "like to do?" + done + +GoldenrodPokecomCenterNewsMachineExplanationText: ; unreferenced + text "#MON NEWS is" + line "news compiled from" + + para "the SAVE files of" + line "#MON trainers." + + para "When reading the" + line "NEWS, your SAVE" + + para "file may be sent" + line "out." + + para "The SAVE file data" + line "will contain your" + + para "adventure log and" + line "mobile profile." + + para "Your phone number" + line "will not be sent." + + para "The contents of" + line "the NEWS will vary" + + para "depending on the" + line "SAVE files sent by" + + para "you and the other" + line "#MON trainers." + + para "You might even be" + line "in the NEWS!" + done + +GoldenrodPokecomCenterWouldYouLikeTheNewsText: ; unreferenced + text "Would you like to" + line "get the NEWS?" + done + +GoldenrodPokecomCenterReadingTheLatestNewsText: ; unreferenced + text "Reading the latest" + line "NEWS… Please wait." + done + +GoldenrodPokecomCenterNoOldNewsText: ; unreferenced + text "There is no old" + line "NEWS…" + done + +GoldenrodPokecomCenterCorruptedNewsDataText: ; unreferenced + text "The NEWS data is" + line "corrupted." + + para "Please download" + line "the NEWS again." + done + +GoldenrodPokecomCenterMakingPreparationsText: ; unreferenced + text "We're making" + line "preparations." + + para "Please come back" + line "later." + done + +GoldenrodPokecomCenterSaveBeforeNewsMachineText: ; unreferenced + text "We will SAVE your" + line "progress before" + + para "starting the NEWS" + line "MACHINE." + done + +GoldenrodPokecomCenterPerson1Text: ; unreferenced + text "Whoa, this #MON" + line "CENTER is huge." + + para "They just built" + line "this place. They" + + para "installed lots of" + line "new machines too." + done + +GoldenrodPokecomCenterPerson2Text: ; unreferenced + text "I thought up a fun" + line "new thing for the" + cont "TRADE CORNER!" + + para "I make a PIDGEY" + line "hold MAIL, then" + + para "put it up for" + line "trade for another" + cont "one!" + + para "If everyone did" + line "that, MAIL could" + + para "be traded with all" + line "sorts of people!" + + para "I call it PIDGEY" + line "MAIL!" + + para "If it becomes" + line "popular, I might" + + para "make lots of new" + line "friends!" + done + +GoldenrodPokecomCenterPerson3Text: ; unreferenced + text "They said you can" + line "trade #MON with" + + para "total strangers up" + line "here." + + para "But they're still" + line "adjusting things." + done + +GoldenrodPokecomCenterPerson4Text: ; unreferenced + text "Some girl I don't" + line "know sent me her" + + para "HOPPIP." + line "You should trade" + + para "for a #MON that" + line "you want." + done + +GoldenrodPokecomCenterPerson5Text: ; unreferenced + text "I received a" + line "female HOPPIP, but" + cont "its named STANLEY!" + + para "That's my dad's" + line "name!" + done + +GoldenrodPokecomCenterPerson6Text: ; unreferenced + text "What is the NEWS" + line "MACHINE?" + + para "Does it get news" + line "from a wider area" + cont "than the radio?" + done + +GoldenrodPokecomCenterPerson7Text: ; unreferenced + text "The #COM CENTER" + line "will link with all" + + para "#MON CENTERS in" + line "a wireless net." + + para "That must mean" + line "I'll be able to" + + para "link with all" + line "sorts of people." + done + +GoldenrodPokecomCenterPerson8Text: ; unreferenced + text "The machines here" + line "can't be used yet." + + para "Still, it's nice" + line "coming to a trendy" + + para "place before other" + line "people." + done + +GoldenrodPokecomCenterPerson9Text: ; unreferenced + text "My friend was in" + line "the NEWS a while" + + para "back. I was really" + line "surprised!" + done + +GoldenrodPokecomCenterPerson10Text: ; unreferenced + text "I get anxious if I" + line "don't check out" + cont "the latest NEWS!" + done + +GoldenrodPokecomCenterPerson11Text: ; unreferenced + text "If I get in the" + line "NEWS and become" + + para "famous, I bet I'll" + line "be adored." + + para "I wonder how I" + line "could get in the" + cont "NEWS?" + done + +GoldenrodPokecenter1FGameboyKidText: + text "The COLOSSEUM" + line "upstairs is for" + cont "link battles." + + para "Battle records are" + line "posted on the" + + para "wall, so I can't" + line "afford to lose." + done + +GoldenrodPokecomCenterPerson12Text: ; unreferenced + text "I came over here" + line "when I got word" + + para "that GOLDENROD's" + line "#MON CENTER has" + + para "new machines that" + line "no one's ever seen" + cont "before." + + para "But it looks like" + line "they're still busy" + + para "with all their" + line "preparations…" + done + +GoldenrodPokecomCenterPerson13Text: ; unreferenced + text "Just seeing all" + line "these new things" + + para "here makes me feel" + line "younger!" + done + +GoldenrodPokecenter1FLassText: + text "A higher level" + line "#MON doesn't" + cont "always win." + + para "After all, it may" + line "have a type dis-" + cont "advantage." + + para "I don't think" + line "there is a single" + + para "#MON that is" + line "the toughest." + done + +GoldenrodPokeCenter1FLinkReceptionistPleaseAcceptGSBallText: + text ", isn't it?" + + para "Congratulations!" + + para "As a special deal," + line "a GS BALL has been" + cont "sent just for you!" + + para "Please accept it!" + done + +GoldenrodPokeCenter1FLinkReceptionistPleaseDoComeAgainText: + text "Please do come" + line "again!" + done + +GoldenrodPokecomCenterSignText: ; unreferenced + text "#COM CENTER" + line "1F INFORMATION" + + para "Left:" + line "ADMINISTRATION" + + para "Center:" + line "TRADE CORNER" + + para "Right:" + line "#MON NEWS" + done + +GoldenrodPokecomCenterNewsMachineNotYetText: ; unreferenced + text "It's a #MON" + line "NEWS MACHINE!" + + para "It's not in" + line "operation yet…" + done + +GoldenrodPokecenter1FPokefanFDoYouHaveEonMailText: + text "Oh my, your pack" + line "looks so heavy!" + + para "Oh! Do you happen" + line "to have something" + cont "named EON MAIL?" + + para "My daughter is" + line "after one." + + para "You can part with" + line "one, can't you?" + done + +GoldenrodPokecenter1FAskGiveAwayAnEonMailText: + text "Give away an EON" + line "MAIL?" + done + +GoldenrodPokecenter1FPokefanFThisIsForYouText: + text "Oh, that's great!" + line "Thank you, honey!" + + para "Here, this is for" + line "you in return!" + done + +GoldenrodPokecenter1FPokefanFDaughterWillBeDelightedText: + text "My daughter will" + line "be delighted!" + done + +GoldenrodPokecenter1FPokefanFTooBadText: + text "Oh? You don't have" + line "one? Too bad." + done + +GoldenrodPokecenter1FPokefanFAnotherTimeThenText: + text "Oh… Well, another" + line "time, then." + done + +GoldenrodPokecenter1FPlayerGaveAwayTheEonMailText: + text " gave away" + line "the EON MAIL." + done + +GoldenrodPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, GOLDENROD_CITY, 15 + warp_event 4, 7, GOLDENROD_CITY, 15 + warp_event 0, 6, POKECOM_CENTER_ADMIN_OFFICE_MOBILE, 1 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + coord_event 3, 7, SCENE_GOLDENRODPOKECENTER1F_GS_BALL, GoldenrodPokecenter1F_GSBallSceneLeft + coord_event 4, 7, SCENE_GOLDENRODPOKECENTER1F_GS_BALL, GoldenrodPokecenter1F_GSBallSceneRight + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodPokecenter1FNurseScript, -1 + object_event 16, 8, SPRITE_LINK_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1 + object_event 6, 1, SPRITE_GAMEBOY_KID, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoldenrodPokecenter1FGameboyKidScript, -1 + object_event 1, 4, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodPokecenter1FLassScript, -1 + object_event 7, 5, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GoldenrodPokecenter1FPokefanF, -1 diff --git a/maps/GoldenrodUnderground.asm b/maps/GoldenrodUnderground.asm new file mode 100644 index 0000000..5014bd5 --- /dev/null +++ b/maps/GoldenrodUnderground.asm @@ -0,0 +1,679 @@ +DEF GOLDENRODUNDERGROUND_OLDER_HAIRCUT_PRICE EQU 500 +DEF GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_PRICE EQU 300 + + object_const_def + const GOLDENRODUNDERGROUND_SUPER_NERD1 + const GOLDENRODUNDERGROUND_SUPER_NERD2 + const GOLDENRODUNDERGROUND_SUPER_NERD3 + const GOLDENRODUNDERGROUND_SUPER_NERD4 + const GOLDENRODUNDERGROUND_POKE_BALL + const GOLDENRODUNDERGROUND_GRAMPS + const GOLDENRODUNDERGROUND_OLDER_HAIRCUT_BROTHER + const GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_BROTHER + const GOLDENRODUNDERGROUND_GRANNY + +GoldenrodUnderground_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, GoldenrodUndergroundResetSwitchesCallback + callback MAPCALLBACK_TILES, GoldenrodUndergroundCheckBasementKeyCallback + callback MAPCALLBACK_OBJECTS, GoldenrodUndergroundCheckDayOfWeekCallback + +GoldenrodUndergroundResetSwitchesCallback: + clearevent EVENT_SWITCH_1 + clearevent EVENT_SWITCH_2 + clearevent EVENT_SWITCH_3 + clearevent EVENT_EMERGENCY_SWITCH + clearevent EVENT_SWITCH_4 + clearevent EVENT_SWITCH_5 + clearevent EVENT_SWITCH_6 + clearevent EVENT_SWITCH_7 + clearevent EVENT_SWITCH_8 + clearevent EVENT_SWITCH_9 + clearevent EVENT_SWITCH_10 + clearevent EVENT_SWITCH_11 + clearevent EVENT_SWITCH_12 + clearevent EVENT_SWITCH_13 + clearevent EVENT_SWITCH_14 + setval 0 + writemem wUndergroundSwitchPositions + endcallback + +GoldenrodUndergroundCheckBasementKeyCallback: + checkevent EVENT_USED_BASEMENT_KEY + iffalse .LockBasementDoor + endcallback + +.LockBasementDoor: + changeblock 18, 6, $3d ; locked door + endcallback + +GoldenrodUndergroundCheckDayOfWeekCallback: + readvar VAR_WEEKDAY + ifequal MONDAY, .Monday + ifequal TUESDAY, .Tuesday + ifequal WEDNESDAY, .Wednesday + ifequal THURSDAY, .Thursday + ifequal FRIDAY, .Friday + ifequal SATURDAY, .Saturday + +; Sunday + disappear GOLDENRODUNDERGROUND_GRAMPS + disappear GOLDENRODUNDERGROUND_OLDER_HAIRCUT_BROTHER + appear GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_BROTHER + appear GOLDENRODUNDERGROUND_GRANNY + endcallback + +.Monday: + disappear GOLDENRODUNDERGROUND_GRAMPS + checktime MORN + iffalse .NotMondayMorning + appear GOLDENRODUNDERGROUND_GRAMPS +.NotMondayMorning: + disappear GOLDENRODUNDERGROUND_OLDER_HAIRCUT_BROTHER + disappear GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_BROTHER + disappear GOLDENRODUNDERGROUND_GRANNY + endcallback + +.Tuesday: + disappear GOLDENRODUNDERGROUND_GRAMPS + appear GOLDENRODUNDERGROUND_OLDER_HAIRCUT_BROTHER + disappear GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_BROTHER + disappear GOLDENRODUNDERGROUND_GRANNY + endcallback + +.Wednesday: + disappear GOLDENRODUNDERGROUND_GRAMPS + disappear GOLDENRODUNDERGROUND_OLDER_HAIRCUT_BROTHER + appear GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_BROTHER + disappear GOLDENRODUNDERGROUND_GRANNY + endcallback + +.Thursday: + disappear GOLDENRODUNDERGROUND_GRAMPS + appear GOLDENRODUNDERGROUND_OLDER_HAIRCUT_BROTHER + disappear GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_BROTHER + disappear GOLDENRODUNDERGROUND_GRANNY + endcallback + +.Friday: + disappear GOLDENRODUNDERGROUND_GRAMPS + disappear GOLDENRODUNDERGROUND_OLDER_HAIRCUT_BROTHER + appear GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_BROTHER + disappear GOLDENRODUNDERGROUND_GRANNY + endcallback + +.Saturday: + disappear GOLDENRODUNDERGROUND_GRAMPS + appear GOLDENRODUNDERGROUND_OLDER_HAIRCUT_BROTHER + disappear GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_BROTHER + appear GOLDENRODUNDERGROUND_GRANNY + endcallback + +TrainerSupernerdEric: + trainer SUPER_NERD, ERIC, EVENT_BEAT_SUPER_NERD_ERIC, SupernerdEricSeenText, SupernerdEricBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SupernerdEricAfterBattleText + waitbutton + closetext + end + +TrainerSupernerdTeru: + trainer SUPER_NERD, TERU, EVENT_BEAT_SUPER_NERD_TERU, SupernerdTeruSeenText, SupernerdTeruBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SupernerdTeruAfterBattleText + waitbutton + closetext + end + +TrainerPokemaniacIssac: + trainer POKEMANIAC, ISSAC, EVENT_BEAT_POKEMANIAC_ISSAC, PokemaniacIssacSeenText, PokemaniacIssacBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokemaniacIssacAfterBattleText + waitbutton + closetext + end + +TrainerPokemaniacDonald: + trainer POKEMANIAC, DONALD, EVENT_BEAT_POKEMANIAC_DONALD, PokemaniacDonaldSeenText, PokemaniacDonaldBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokemaniacDonaldAfterBattleText + waitbutton + closetext + end + +BitterMerchantScript: + opentext + readvar VAR_WEEKDAY + ifequal SUNDAY, .Open + ifequal SATURDAY, .Open + sjump GoldenrodUndergroundScript_ShopClosed + +.Open: + pokemart MARTTYPE_BITTER, MART_UNDERGROUND + closetext + end + +BargainMerchantScript: + opentext + checkflag ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED + iftrue GoldenrodUndergroundScript_ShopClosed + readvar VAR_WEEKDAY + ifequal MONDAY, .CheckMorn + sjump GoldenrodUndergroundScript_ShopClosed + +.CheckMorn: + checktime MORN + iffalse GoldenrodUndergroundScript_ShopClosed + pokemart MARTTYPE_BARGAIN, 0 + closetext + end + +OlderHaircutBrotherScript: + opentext + readvar VAR_WEEKDAY + ifequal TUESDAY, .DoHaircut + ifequal THURSDAY, .DoHaircut + ifequal SATURDAY, .DoHaircut + sjump GoldenrodUndergroundScript_ShopClosed + +.DoHaircut: + checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT + iftrue .AlreadyGotHaircut + special PlaceMoneyTopRight + writetext GoldenrodUndergroundOlderHaircutBrotherOfferHaircutText + yesorno + iffalse .Refused + checkmoney YOUR_MONEY, GOLDENRODUNDERGROUND_OLDER_HAIRCUT_PRICE + ifequal HAVE_LESS, .NotEnoughMoney + writetext GoldenrodUndergroundOlderHaircutBrotherAskWhichMonText + promptbutton + special OlderHaircutBrother + ifequal $0, .Refused + ifequal $1, .Refused + setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT + ifequal $2, .two + ifequal $3, .three + sjump .else + +.two + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + clearevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + clearevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + sjump .then + +.three + clearevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + clearevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + sjump .then + +.else + clearevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + clearevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + sjump .then + +.then + takemoney YOUR_MONEY, GOLDENRODUNDERGROUND_OLDER_HAIRCUT_PRICE + special PlaceMoneyTopRight + writetext GoldenrodUndergroundOlderHaircutBrotherWatchItBecomeBeautifulText + waitbutton + closetext + special FadeOutPalettes + playmusic MUSIC_HEAL + pause 60 + special FadeInPalettes + special RestartMapMusic + opentext + writetext GoldenrodUndergroundOlderHaircutBrotherAllDoneText + waitbutton + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue EitherHaircutBrotherScript_SlightlyHappier + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + iftrue EitherHaircutBrotherScript_Happier + sjump EitherHaircutBrotherScript_MuchHappier + +.Refused: + writetext GoldenrodUndergroundOlderHaircutBrotherThatsAShameText + waitbutton + closetext + end + +.NotEnoughMoney: + writetext GoldenrodUndergroundOlderHaircutBrotherYoullNeedMoreMoneyText + waitbutton + closetext + end + +.AlreadyGotHaircut: + writetext GoldenrodUndergroundOlderHaircutBrotherOneHaircutADayText + waitbutton + closetext + end + +YoungerHaircutBrotherScript: + opentext + readvar VAR_WEEKDAY + ifequal SUNDAY, .DoHaircut + ifequal WEDNESDAY, .DoHaircut + ifequal FRIDAY, .DoHaircut + sjump GoldenrodUndergroundScript_ShopClosed + +.DoHaircut: + checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT + iftrue .AlreadyGotHaircut + special PlaceMoneyTopRight + writetext GoldenrodUndergroundYoungerHaircutBrotherOfferHaircutText + yesorno + iffalse .Refused + checkmoney YOUR_MONEY, GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_PRICE + ifequal HAVE_LESS, .NotEnoughMoney + writetext GoldenrodUndergroundYoungerHaircutBrotherAskWhichMonText + promptbutton + special YoungerHaircutBrother + ifequal $0, .Refused + ifequal $1, .Refused + setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT + ifequal $2, .two + ifequal $3, .three + sjump .else + +.two + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + clearevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + clearevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + sjump .then + +.three + clearevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + clearevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + sjump .then + +.else + clearevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + clearevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + sjump .then + +.then + takemoney YOUR_MONEY, GOLDENRODUNDERGROUND_YOUNGER_HAIRCUT_PRICE + special PlaceMoneyTopRight + writetext GoldenrodUndergroundYoungerHaircutBrotherIllMakeItLookCoolText + waitbutton + closetext + special FadeOutPalettes + playmusic MUSIC_HEAL + pause 60 + special FadeInPalettes + special RestartMapMusic + opentext + writetext GoldenrodUndergroundYoungerHaircutBrotherAllDoneText + waitbutton + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue EitherHaircutBrotherScript_SlightlyHappier + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + iftrue EitherHaircutBrotherScript_Happier + sjump EitherHaircutBrotherScript_MuchHappier + +.Refused: + writetext GoldenrodUndergroundYoungerHaircutBrotherHowDisappointingText + waitbutton + closetext + end + +.NotEnoughMoney: + writetext GoldenrodUndergroundYoungerHaircutBrotherShortOnFundsText + waitbutton + closetext + end + +.AlreadyGotHaircut: + writetext GoldenrodUndergroundYoungerHaircutBrotherOneHaircutADayText + waitbutton + closetext + end + +EitherHaircutBrotherScript_SlightlyHappier: + writetext HaircutBrosText_SlightlyHappier + special PlayCurMonCry + waitbutton + closetext + end + +EitherHaircutBrotherScript_Happier: + writetext HaircutBrosText_Happier + special PlayCurMonCry + waitbutton + closetext + end + +EitherHaircutBrotherScript_MuchHappier: + writetext HaircutBrosText_MuchHappier + special PlayCurMonCry + waitbutton + closetext + end + +BasementDoorScript:: + opentext + checkevent EVENT_USED_BASEMENT_KEY + iftrue .Open + checkitem BASEMENT_KEY + iftrue .Unlock + writetext GoldenrodUndergroundTheDoorsLockedText + waitbutton + closetext + end + +.Unlock: + playsound SFX_TRANSACTION + writetext GoldenrodUndergroundBasementKeyOpenedDoorText + waitbutton + closetext + changeblock 18, 6, $2e ; unlocked door + reloadmappart + closetext + setevent EVENT_USED_BASEMENT_KEY + end + +.Open: + writetext GoldenrodUndergroundTheDoorIsOpenText + waitbutton + closetext + end + +GoldenrodUndergroundScript_ShopClosed: + writetext GoldenrodUndergroundWeAreNotOpenTodayText + waitbutton + closetext + end + +GoldenrodUndergroundCoinCase: + itemball COIN_CASE + +GoldenrodUndergroundNoEntrySign: + jumptext GoldenrodUndergroundNoEntryText + +GoldenrodUndergroundHiddenParlyzHeal: + hiddenitem PARLYZ_HEAL, EVENT_GOLDENROD_UNDERGROUND_HIDDEN_PARLYZ_HEAL + +GoldenrodUndergroundHiddenSuperPotion: + hiddenitem SUPER_POTION, EVENT_GOLDENROD_UNDERGROUND_HIDDEN_SUPER_POTION + +GoldenrodUndergroundHiddenAntidote: + hiddenitem ANTIDOTE, EVENT_GOLDENROD_UNDERGROUND_HIDDEN_ANTIDOTE + +SupernerdEricSeenText: + text "I got booted out" + line "of the GAME COR-" + cont "NER." + + para "I was trying to" + line "cheat using my" + cont "#MON…" + done + +SupernerdEricBeatenText: + text "…Grumble…" + done + +SupernerdEricAfterBattleText: + text "I guess I have to" + line "do things fair and" + cont "square…" + done + +SupernerdTeruSeenText: + text "Do you consider" + line "type alignments in" + cont "battle?" + + para "If you know your" + line "type advantages," + + para "you'll do better" + line "in battle." + done + +SupernerdTeruBeatenText: + text "Ow, ow, ow!" + done + +SupernerdTeruAfterBattleText: + text "I know my #MON" + line "type alignments." + + para "But I only use one" + line "type of #MON." + done + +PokemaniacIssacSeenText: + text "My #MON just" + line "got a haircut!" + + para "I'll show you how" + line "strong it is!" + done + +PokemaniacIssacBeatenText: + text "Aiyeeee!" + done + +PokemaniacIssacAfterBattleText: + text "Your #MON will" + line "like you more if" + + para "you give them" + line "haircuts." + done + +PokemaniacDonaldSeenText: + text "I think you have" + line "some rare #MON" + cont "with you." + + para "Let me see them!" + done + +PokemaniacDonaldBeatenText: + text "Gaah! I lost!" + line "That makes me mad!" + done + +PokemaniacDonaldAfterBattleText: + text "Are you making a" + line "#DEX? Here's a" + cont "hot tip." + + para "The HIKER on ROUTE" + line "33, ANTHONY, is a" + cont "good guy." + + para "He'll phone you if" + line "he sees any rare" + cont "#MON." + done + +GoldenrodUndergroundTheDoorsLockedText: + text "The door's locked…" + done + +GoldenrodUndergroundTheDoorIsOpenText: + text "The door is open." + done + +GoldenrodUndergroundBasementKeyOpenedDoorText: + text "The BASEMENT KEY" + line "opened the door." + done + +GoldenrodUndergroundOlderHaircutBrotherOfferHaircutText: + text "Welcome!" + + para "I run the #MON" + line "SALON!" + + para "I'm the older and" + line "better of the two" + cont "HAIRCUT BROTHERS." + + para "I can make your" + line "#MON beautiful" + cont "for just ¥500." + + para "Would you like me" + line "to do that?" + done + +GoldenrodUndergroundOlderHaircutBrotherAskWhichMonText: + text "Which #MON" + line "should I work on?" + done + +GoldenrodUndergroundOlderHaircutBrotherWatchItBecomeBeautifulText: + text "OK! Watch it" + line "become beautiful!" + done + +GoldenrodUndergroundOlderHaircutBrotherAllDoneText: + text "There! All done!" + done + +GoldenrodUndergroundOlderHaircutBrotherThatsAShameText: + text "Is that right?" + line "That's a shame!" + done + +GoldenrodUndergroundOlderHaircutBrotherYoullNeedMoreMoneyText: + text "You'll need more" + line "money than that." + done + +GoldenrodUndergroundOlderHaircutBrotherOneHaircutADayText: + text "I do only one" + line "haircut a day. I'm" + cont "done for today." + done + +GoldenrodUndergroundYoungerHaircutBrotherOfferHaircutText: + text "Welcome to the" + line "#MON SALON!" + + para "I'm the younger" + line "and less expen-" + cont "sive of the two" + cont "HAIRCUT BROTHERS." + + para "I'll spiff up your" + line "#MON for just" + cont "¥300." + + para "So? How about it?" + done + +GoldenrodUndergroundYoungerHaircutBrotherAskWhichMonText: + text "OK, which #MON" + line "should I do?" + done + +GoldenrodUndergroundYoungerHaircutBrotherIllMakeItLookCoolText: + text "OK! I'll make it" + line "look cool!" + done + +GoldenrodUndergroundYoungerHaircutBrotherAllDoneText: + text "There we go!" + line "All done!" + done + +GoldenrodUndergroundYoungerHaircutBrotherHowDisappointingText: + text "No? " + line "How disappointing!" + done + +GoldenrodUndergroundYoungerHaircutBrotherShortOnFundsText: + text "You're a little" + line "short on funds." + done + +GoldenrodUndergroundYoungerHaircutBrotherOneHaircutADayText: + text "I can do only one" + line "haircut a day." + + para "Sorry, but I'm all" + line "done for today." + done + +HaircutBrosText_SlightlyHappier: + text_ram wStringBuffer3 + text " looks a" + line "little happier." + done + +HaircutBrosText_Happier: + text_ram wStringBuffer3 + text " looks" + line "happy." + done + +HaircutBrosText_MuchHappier: + text_ram wStringBuffer3 + text " looks" + line "delighted!" + done + +GoldenrodUndergroundWeAreNotOpenTodayText: + text "We're not open" + line "today." + done + +GoldenrodUndergroundNoEntryText: + text "NO ENTRY BEYOND" + line "THIS POINT" + done + +GoldenrodUnderground_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 2, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, 7 + warp_event 3, 34, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, 4 + warp_event 18, 6, GOLDENROD_UNDERGROUND, 4 + warp_event 21, 31, GOLDENROD_UNDERGROUND, 3 + warp_event 22, 31, GOLDENROD_UNDERGROUND, 3 + warp_event 22, 27, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, 1 + + def_coord_events + + def_bg_events + bg_event 18, 6, BGEVENT_READ, BasementDoorScript + bg_event 19, 6, BGEVENT_READ, GoldenrodUndergroundNoEntrySign + bg_event 6, 13, BGEVENT_ITEM, GoldenrodUndergroundHiddenParlyzHeal + bg_event 4, 18, BGEVENT_ITEM, GoldenrodUndergroundHiddenSuperPotion + bg_event 17, 8, BGEVENT_ITEM, GoldenrodUndergroundHiddenAntidote + + def_object_events + object_event 5, 31, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerSupernerdEric, -1 + object_event 6, 9, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerSupernerdTeru, -1 + object_event 3, 27, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPokemaniacIssac, -1 + object_event 2, 6, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacDonald, -1 + object_event 7, 25, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundCoinCase, EVENT_GOLDENROD_UNDERGROUND_COIN_CASE + object_event 7, 11, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BargainMerchantScript, EVENT_GOLDENROD_UNDERGROUND_GRAMPS + object_event 7, 14, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OlderHaircutBrotherScript, EVENT_GOLDENROD_UNDERGROUND_OLDER_HAIRCUT_BROTHER + object_event 7, 15, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungerHaircutBrotherScript, EVENT_GOLDENROD_UNDERGROUND_YOUNGER_HAIRCUT_BROTHER + object_event 7, 21, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BitterMerchantScript, EVENT_GOLDENROD_UNDERGROUND_GRANNY diff --git a/maps/GoldenrodUnderground.blk b/maps/GoldenrodUnderground.blk new file mode 100644 index 0000000..e3d0b95 --- /dev/null +++ b/maps/GoldenrodUnderground.blk @@ -0,0 +1 @@ +''''''''''''''1:''''''''''''''''''''''''''.'''''':''''''''''852''''''''''''83''''''''''''852''''''''''''3'''''''''''':''''''''''''852''''''''''''83''''''''''''8''''''''''''''4;+'''5'''''' <0 '''5''''''%&''''''''''''''''1'''''''''''' \ No newline at end of file diff --git a/maps/GoldenrodUndergroundSwitchRoomEntrances.asm b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm new file mode 100644 index 0000000..b0dbf26 --- /dev/null +++ b/maps/GoldenrodUndergroundSwitchRoomEntrances.asm @@ -0,0 +1,969 @@ +; block ids +DEF UNDERGROUND_DOOR_CLOSED1 EQU $2a +DEF UNDERGROUND_DOOR_CLOSED2 EQU $3e +DEF UNDERGROUND_DOOR_CLOSED3 EQU $3f +DEF UNDERGROUND_DOOR_OPEN1 EQU $2d +DEF UNDERGROUND_DOOR_OPEN2 EQU $3d + +MACRO ugdoor + DEF UGDOOR_\1_XCOORD EQU \2 + DEF UGDOOR_\1_YCOORD EQU \3 +ENDM + + ; id, x, y + ugdoor 1, 6, 16 + ugdoor 2, 6, 10 + ugdoor 3, 6, 2 + ugdoor 4, 10, 2 + ugdoor 5, 10, 10 + ugdoor 6, 10, 16 + ugdoor 7, 6, 12 + ugdoor 8, 8, 12 + ugdoor 9, 6, 6 + ugdoor 10, 8, 6 + ugdoor 11, 10, 12 + ugdoor 12, 12, 12 + ugdoor 13, 10, 6 + ugdoor 14, 12, 6 + ugdoor 15, 10, 18 + ugdoor 16, 12, 18 + +MACRO doorstate + changeblock UGDOOR_\1_YCOORD, UGDOOR_\1_XCOORD, UNDERGROUND_DOOR_\2 +ENDM + + object_const_def + const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_PHARMACIST1 + const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_PHARMACIST2 + const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET1 + const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET2 + const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET3 + const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET_GIRL + const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_TEACHER + const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SUPER_NERD + const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_POKE_BALL1 + const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_POKE_BALL2 + const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL + +GoldenrodUndergroundSwitchRoomEntrances_MapScripts: + def_scene_scripts + scene_script GoldenrodUndergroundSwitchRoomEntrancesNoop1Scene, SCENE_GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL_BATTLE + scene_script GoldenrodUndergroundSwitchRoomEntrancesNoop2Scene, SCENE_GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, GoldenrodUndergroundSwitchRoomEntrancesUpdateDoorPositionsCallback + +GoldenrodUndergroundSwitchRoomEntrancesNoop1Scene: + end + +GoldenrodUndergroundSwitchRoomEntrancesNoop2Scene: + end + +GoldenrodUndergroundSwitchRoomEntrancesUpdateDoorPositionsCallback: + checkevent EVENT_SWITCH_4 + iffalse .false4 + doorstate 1, OPEN1 +.false4 + checkevent EVENT_SWITCH_5 + iffalse .false5 + doorstate 2, OPEN1 +.false5 + checkevent EVENT_SWITCH_6 + iffalse .false6 + doorstate 3, OPEN1 +.false6 + checkevent EVENT_SWITCH_7 + iffalse .false7 + doorstate 4, OPEN1 +.false7 + checkevent EVENT_SWITCH_8 + iffalse .false8 + doorstate 5, OPEN1 +.false8 + checkevent EVENT_SWITCH_9 + iffalse .false9 + doorstate 6, OPEN1 +.false9 + checkevent EVENT_SWITCH_10 + iffalse .false10 + doorstate 7, CLOSED1 + doorstate 8, OPEN1 +.false10 + checkevent EVENT_SWITCH_11 + iffalse .false11 + doorstate 9, CLOSED1 + doorstate 10, OPEN1 +.false11 + checkevent EVENT_SWITCH_12 + iffalse .false12 + doorstate 11, CLOSED1 + doorstate 12, OPEN1 +.false12 + checkevent EVENT_SWITCH_13 + iffalse .false13 + doorstate 13, CLOSED1 + doorstate 14, OPEN1 +.false13 + checkevent EVENT_SWITCH_14 + iffalse .false14 + doorstate 15, CLOSED1 + doorstate 16, OPEN1 +.false14 + endcallback + +GoldenrodUndergroundSwitchRoomEntrancesSuperNerdScript: + jumptextfaceplayer GoldenrodUndergroundSwitchRoomEntrances_SuperNerdText + +GoldenrodUndergroundSwitchRoomEntrancesTeacherScript: + jumptextfaceplayer GoldenrodUndergroundSwitchRoomEntrances_TeacherText + +UndergroundRivalScene1: + turnobject PLAYER, RIGHT + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + pause 15 + playsound SFX_EXIT_BUILDING + appear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL + waitsfx + applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL, UndergroundRivalApproachMovement1 + turnobject PLAYER, RIGHT + scall UndergroundRivalBattleScript + applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL, UndergroundRivalRetreatMovement1 + playsound SFX_EXIT_BUILDING + disappear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL + setscene SCENE_GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_NOOP + waitsfx + playmapmusic + end + +UndergroundRivalScene2: + turnobject PLAYER, RIGHT + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + pause 15 + playsound SFX_EXIT_BUILDING + appear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL + waitsfx + applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL, UndergroundRivalApproachMovement2 + turnobject PLAYER, RIGHT + scall UndergroundRivalBattleScript + applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL, UndergroundRivalRetreatMovement2 + playsound SFX_EXIT_BUILDING + disappear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL + setscene SCENE_GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_NOOP + waitsfx + playmapmusic + end + +UndergroundRivalBattleScript: + checkevent EVENT_RIVAL_BURNED_TOWER + iftrue .Continue + setevent EVENT_RIVAL_BURNED_TOWER + setmapscene BURNED_TOWER_1F, SCENE_BURNEDTOWER1F_RIVAL_BATTLE +.Continue: + playmusic MUSIC_RIVAL_ENCOUNTER + opentext + writetext UndergroundRivalBeforeText + waitbutton + closetext + setevent EVENT_RIVAL_GOLDENROD_UNDERGROUND + checkevent EVENT_GOT_TOTODILE_FROM_ELM + iftrue .Totodile + checkevent EVENT_GOT_CHIKORITA_FROM_ELM + iftrue .Chikorita + winlosstext UndergroundRivalWinText, UndergroundRivalLossText + setlasttalked GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL + loadtrainer RIVAL1, RIVAL1_4_TOTODILE + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .FinishRivalBattle + +.Totodile: + winlosstext UndergroundRivalWinText, UndergroundRivalLossText + setlasttalked GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL + loadtrainer RIVAL1, RIVAL1_4_CHIKORITA + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .FinishRivalBattle + +.Chikorita: + winlosstext UndergroundRivalWinText, UndergroundRivalLossText + setlasttalked GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL + loadtrainer RIVAL1, RIVAL1_4_CYNDAQUIL + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .FinishRivalBattle + +.FinishRivalBattle: + playmusic MUSIC_RIVAL_AFTER + opentext + writetext UndergroundRivalAfterText + waitbutton + closetext + end + +TrainerGruntM11: + trainer GRUNTM, GRUNTM_11, EVENT_BEAT_ROCKET_GRUNTM_11, GruntM11SeenText, GruntM11BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM11AfterBattleText + waitbutton + closetext + end + +TrainerGruntM25: + trainer GRUNTM, GRUNTM_25, EVENT_BEAT_ROCKET_GRUNTM_25, GruntM25SeenText, GruntM25BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM25AfterBattleText + waitbutton + closetext + end + +TrainerBurglarDuncan: + trainer BURGLAR, DUNCAN, EVENT_BEAT_BURGLAR_DUNCAN, BurglarDuncanSeenText, BurglarDuncanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BurglarDuncanAfterBattleText + waitbutton + closetext + end + +TrainerBurglarEddie: + trainer BURGLAR, EDDIE, EVENT_BEAT_BURGLAR_EDDIE, BurglarEddieSeenText, BurglarEddieBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BurglarEddieAfterBattleText + waitbutton + closetext + end + +TrainerGruntM13: + trainer GRUNTM, GRUNTM_13, EVENT_BEAT_ROCKET_GRUNTM_13, GruntM13SeenText, GruntM13BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM13AfterBattleText + waitbutton + closetext + end + +TrainerGruntF3: + trainer GRUNTF, GRUNTF_3, EVENT_BEAT_ROCKET_GRUNTF_3, GruntF3SeenText, GruntF3BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntF3AfterBattleText + waitbutton + closetext + end + +Switch1Script: + opentext + writetext SwitchRoomText_Switch1 + promptbutton + checkevent EVENT_SWITCH_1 + iftrue .On + writetext SwitchRoomText_OffTurnOn + yesorno + iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle + readmem wUndergroundSwitchPositions + addval 1 + writemem wUndergroundSwitchPositions + setevent EVENT_SWITCH_1 + sjump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors + +.On: + writetext SwitchRoomText_OnTurnOff + yesorno + iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle + readmem wUndergroundSwitchPositions + addval -1 + writemem wUndergroundSwitchPositions + clearevent EVENT_SWITCH_1 + sjump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors + +Switch2Script: + opentext + writetext SwitchRoomText_Switch2 + promptbutton + checkevent EVENT_SWITCH_2 + iftrue .On + writetext SwitchRoomText_OffTurnOn + yesorno + iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle + readmem wUndergroundSwitchPositions + addval 2 + writemem wUndergroundSwitchPositions + setevent EVENT_SWITCH_2 + sjump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors + +.On: + writetext SwitchRoomText_OnTurnOff + yesorno + iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle + readmem wUndergroundSwitchPositions + addval -2 + writemem wUndergroundSwitchPositions + clearevent EVENT_SWITCH_2 + sjump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors + +Switch3Script: + opentext + writetext SwitchRoomText_Switch3 + promptbutton + checkevent EVENT_SWITCH_3 + iftrue .On + writetext SwitchRoomText_OffTurnOn + yesorno + iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle + readmem wUndergroundSwitchPositions + addval 3 + writemem wUndergroundSwitchPositions + setevent EVENT_SWITCH_3 + sjump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors + +.On: + writetext SwitchRoomText_OnTurnOff + yesorno + iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle + readmem wUndergroundSwitchPositions + addval -3 + writemem wUndergroundSwitchPositions + clearevent EVENT_SWITCH_3 + sjump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors + +EmergencySwitchScript: + opentext + writetext SwitchRoomText_Emergency + promptbutton + checkevent EVENT_EMERGENCY_SWITCH + iftrue .On + writetext SwitchRoomText_OffTurnOn + yesorno + iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle + setval 7 + writemem wUndergroundSwitchPositions + setevent EVENT_EMERGENCY_SWITCH + setevent EVENT_SWITCH_1 + setevent EVENT_SWITCH_2 + setevent EVENT_SWITCH_3 + sjump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors + +.On: + writetext SwitchRoomText_OnTurnOff + yesorno + iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle + setval 0 + writemem wUndergroundSwitchPositions + clearevent EVENT_EMERGENCY_SWITCH + clearevent EVENT_SWITCH_1 + clearevent EVENT_SWITCH_2 + clearevent EVENT_SWITCH_3 + sjump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors + +GoldenrodUndergroundSwitchRoomEntrances_DontToggle: + closetext + end + +GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors: + readmem wUndergroundSwitchPositions + ifequal 0, .Position0 + ifequal 1, .Position1 + ifequal 2, .Position2 + ifequal 3, .Position3 + ifequal 4, .Position4 + ifequal 5, .Position5 + ifequal 6, .Position6 + ifequal 7, .EmergencyPosition +.Position0: + playsound SFX_ENTER_DOOR + scall .Clear4 + scall .Clear5 + scall .Clear6 + scall .Clear7 + scall .Clear8 + scall .Clear9 + scall .Clear10 + scall .Clear11 + scall .Clear12 + scall .Clear13 + scall .Clear14 + reloadmappart + closetext + end + +.Position1: + playsound SFX_ENTER_DOOR + scall .Set4 + scall .Set10 + scall .Set13 + scall .Clear9 + scall .Clear11 + scall .Clear12 + scall .Clear14 + reloadmappart + closetext + end + +.Position2: + playsound SFX_ENTER_DOOR + scall .Set5 + scall .Set11 + scall .Set12 + scall .Clear8 + scall .Clear10 + scall .Clear13 + scall .Clear14 + reloadmappart + closetext + end + +.Position3: + playsound SFX_ENTER_DOOR + scall .Set6 + scall .Set10 + scall .Set13 + scall .Clear7 + scall .Clear11 + scall .Clear12 + scall .Clear14 + reloadmappart + closetext + end + +.Position4: + playsound SFX_ENTER_DOOR + scall .Set7 + scall .Set11 + scall .Set12 + scall .Clear6 + scall .Clear10 + scall .Clear13 + scall .Clear14 + reloadmappart + closetext + end + +.Position5: + playsound SFX_ENTER_DOOR + scall .Set8 + scall .Set10 + scall .Set13 + scall .Clear5 + scall .Clear11 + scall .Clear12 + scall .Clear14 + reloadmappart + closetext + end + +.Position6: + playsound SFX_ENTER_DOOR + scall .Set9 + scall .Set11 + scall .Set12 + scall .Set14 + scall .Clear4 + scall .Clear10 + scall .Clear13 + reloadmappart + closetext + end + +.EmergencyPosition: + playsound SFX_ENTER_DOOR + scall .Clear4 + scall .Clear5 + scall .Set6 + scall .Clear7 + scall .Set8 + scall .Set9 + scall .Clear10 + scall .Set11 + scall .Set12 + scall .Clear13 + scall .Set14 + reloadmappart + closetext + setval 6 + writemem wUndergroundSwitchPositions + end + +.Set4: + doorstate 1, OPEN1 + setevent EVENT_SWITCH_4 + end + +.Set5: + doorstate 2, OPEN1 + setevent EVENT_SWITCH_5 + end + +.Set6: + doorstate 3, OPEN1 + setevent EVENT_SWITCH_6 + end + +.Set7: + doorstate 4, OPEN1 + setevent EVENT_SWITCH_7 + end + +.Set8: + doorstate 5, OPEN1 + setevent EVENT_SWITCH_8 + end + +.Set9: + doorstate 6, OPEN1 + setevent EVENT_SWITCH_9 + end + +.Set10: + doorstate 7, CLOSED1 + doorstate 8, OPEN1 + setevent EVENT_SWITCH_10 + end + +.Set11: + doorstate 9, CLOSED1 + doorstate 10, OPEN1 + setevent EVENT_SWITCH_11 + end + +.Set12: + doorstate 11, CLOSED1 + doorstate 12, OPEN1 + setevent EVENT_SWITCH_12 + end + +.Set13: + doorstate 13, CLOSED1 + doorstate 14, OPEN1 + setevent EVENT_SWITCH_13 + end + +.Set14: + doorstate 15, CLOSED1 + doorstate 16, OPEN1 + setevent EVENT_SWITCH_14 + end + +.Clear4: + doorstate 1, CLOSED2 + clearevent EVENT_SWITCH_4 + end + +.Clear5: + doorstate 2, CLOSED2 + clearevent EVENT_SWITCH_5 + end + +.Clear6: + doorstate 3, CLOSED2 + clearevent EVENT_SWITCH_6 + end + +.Clear7: + doorstate 4, CLOSED2 + clearevent EVENT_SWITCH_7 + end + +.Clear8: + doorstate 5, CLOSED2 + clearevent EVENT_SWITCH_8 + end + +.Clear9: + doorstate 6, CLOSED2 + clearevent EVENT_SWITCH_9 + end + +.Clear10: + doorstate 7, CLOSED3 + doorstate 8, OPEN2 + clearevent EVENT_SWITCH_10 + end + +.Clear11: + doorstate 9, CLOSED3 + doorstate 10, OPEN2 + clearevent EVENT_SWITCH_11 + end + +.Clear12: + doorstate 11, CLOSED3 + doorstate 12, OPEN2 + clearevent EVENT_SWITCH_12 + end + +.Clear13: + doorstate 13, CLOSED3 + doorstate 14, OPEN2 + clearevent EVENT_SWITCH_13 + end + +.Clear14: + doorstate 15, CLOSED3 + doorstate 16, OPEN2 + clearevent EVENT_SWITCH_14 + end + +GoldenrodUndergroundSwitchRoomEntrancesSmokeBall: + itemball SMOKE_BALL + +GoldenrodUndergroundSwitchRoomEntrancesFullHeal: + itemball FULL_HEAL + +GoldenrodUndergroundSwitchRoomEntrancesHiddenMaxPotion: + hiddenitem MAX_POTION, EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION + +GoldenrodUndergroundSwitchRoomEntrancesHiddenRevive: + hiddenitem REVIVE, EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE + +UndergroundRivalApproachMovement1: + step DOWN + step LEFT + step LEFT + step LEFT + step_end + +UndergroundRivalApproachMovement2: + step DOWN + step DOWN + step LEFT + step LEFT + step LEFT + step_end + +UndergroundRivalRetreatMovement1: + step RIGHT + step RIGHT + step RIGHT + step UP + step_end + +UndergroundRivalRetreatMovement2: + step RIGHT + step RIGHT + step RIGHT + step UP + step UP + step_end + +UndergroundRivalBeforeText: + text "Hold it!" + + para "I saw you, so I" + line "tailed you." + + para "I don't need you" + line "underfoot while I" + + para "take care of TEAM" + line "ROCKET." + + para "…Wait a second." + line "You beat me be-" + cont "fore, didn't you?" + + para "That was just a" + line "fluke." + + para "But I repay my" + line "debts!" + done + +UndergroundRivalWinText: + text "…Why…" + line "Why do I lose?" + + para "I've assembled the" + line "toughest #MON." + + para "I didn't ease up" + line "on the gas." + + para "So why do I lose?" + done + +UndergroundRivalAfterText: + text "…I don't under-" + line "stand…" + + para "Is what that LANCE" + line "guy said true?" + + para "That I don't treat" + line "#MON properly?" + + para "Love…" + + para "Trust…" + + para "Are they really" + line "what I lack?" + + para "Are they keeping" + line "me from winning?" + + para "I… I just don't" + line "understand." + + para "But it's not going" + line "to end here." + + para "Not now. Not" + line "because of this." + + para "I won't give up my" + line "dream of becoming" + + para "the world's best" + line "#MON trainer!" + done + +UndergroundRivalLossText: + text "Humph. This is my" + line "real power, wimp." + + para "I'll make TEAM" + line "ROCKET history." + + para "And I'm going to" + line "grind that LANCE" + cont "under my heels." + done + +GoldenrodUndergroundSwitchRoomEntrances_SuperNerdText: + text "I was challenged" + line "to a battle down-" + cont "stairs." + + para "It's rough down" + line "there. You'd" + cont "better be careful." + done + +GoldenrodUndergroundSwitchRoomEntrances_TeacherText: + text "There are some" + line "shops downstairs…" + + para "But there are" + line "also trainers." + + para "I'm scared to go" + line "down there." + done + +GruntM11SeenText: + text "Open one shutter," + line "another closes." + + para "Bet you can't get" + line "where you want!" + done + +GruntM11BeatenText: + text "Drat! I was sunk" + line "by indecision!" + done + +GruntM11AfterBattleText: + text "I'm confused too…" + line "The switch on the" + + para "end is the one to" + line "press first, but…" + done + +GruntM25SeenText: + text "Kwahaha!" + + para "Confounded by the" + line "shutters, are we?" + + para "I'll let you in on" + line "a secret if you" + cont "can beat me!" + done + +GruntM25BeatenText: + text "Uwww…" + line "I blew it." + done + +GruntM25AfterBattleText: + text "All right. A hint!" + + para "Change the order" + line "of switching." + + para "That'll change the" + line "ways the shutters" + cont "open and close." + done + +BurglarDuncanSeenText: + text "Fork over your" + line "goodies!" + done + +BurglarDuncanBeatenText: + text "Mercy!" + done + +BurglarDuncanAfterBattleText: + text "Steal and sell!" + line "That's basic in" + cont "crime, kid!" + done + +BurglarEddieSeenText: + text "They ditched this" + line "project before" + cont "they finished." + + para "I'm searching for" + line "leftover loot." + done + +BurglarEddieBeatenText: + text "Over the top!" + done + +BurglarEddieAfterBattleText: + text "UNDERGROUND WARE-" + line "HOUSE?" + + para "What do you want" + line "to go there for?" + + para "There's nothing" + line "down there." + done + +GruntM13SeenText: + text "I don't care if" + line "you're lost." + + para "You show up here," + line "you're nothing but" + cont "a victim!" + done + +GruntM13BeatenText: + text "Urk! Yeah, think" + line "you're cool, huh?" + done + +GruntM13AfterBattleText: + text "You must have ice" + line "in your veins to" + cont "dis TEAM ROCKET." + done + +SwitchRoomText_Switch1: + text "It's labeled" + line "SWITCH 1." + done + +GruntF3SeenText: + text "Are you lost? No," + line "you can't be." + + para "You don't have" + line "that scared look." + + para "I'll give you" + line "something to be" + cont "scared about!" + done + +GruntF3BeatenText: + text "How could you?" + done + +GruntF3AfterBattleText: + text "Go wherever you'd" + line "like! Get lost!" + cont "See if I care!" + done + +SwitchRoomText_OffTurnOn: + text "It's OFF." + line "Turn it ON?" + done + +SwitchRoomText_OnTurnOff: + text "It's ON." + line "Turn it OFF?" + done + +SwitchRoomText_Switch2: + text "It's labeled" + line "SWITCH 2." + done + +SwitchRoomText_Switch3: + text "It's labeled" + line "SWITCH 3." + done + +SwitchRoomText_Emergency: + text "It's labeled" + line "EMERGENCY." + done + +GoldenrodUndergroundSwitchRoomEntrances_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 23, 3, GOLDENROD_UNDERGROUND, 6 + warp_event 22, 10, GOLDENROD_UNDERGROUND_WAREHOUSE, 1 + warp_event 23, 10, GOLDENROD_UNDERGROUND_WAREHOUSE, 2 + warp_event 5, 25, GOLDENROD_UNDERGROUND, 2 + warp_event 4, 29, GOLDENROD_CITY, 14 + warp_event 5, 29, GOLDENROD_CITY, 14 + warp_event 21, 25, GOLDENROD_UNDERGROUND, 1 + warp_event 20, 29, GOLDENROD_CITY, 13 + warp_event 21, 29, GOLDENROD_CITY, 13 + + def_coord_events + coord_event 19, 4, SCENE_GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL_BATTLE, UndergroundRivalScene1 + coord_event 19, 5, SCENE_GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_RIVAL_BATTLE, UndergroundRivalScene2 + + def_bg_events + bg_event 16, 1, BGEVENT_READ, Switch1Script + bg_event 10, 1, BGEVENT_READ, Switch2Script + bg_event 2, 1, BGEVENT_READ, Switch3Script + bg_event 20, 11, BGEVENT_READ, EmergencySwitchScript + bg_event 8, 9, BGEVENT_ITEM, GoldenrodUndergroundSwitchRoomEntrancesHiddenMaxPotion + bg_event 1, 8, BGEVENT_ITEM, GoldenrodUndergroundSwitchRoomEntrancesHiddenRevive + + def_object_events + object_event 9, 12, SPRITE_PHARMACIST, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerBurglarDuncan, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 4, 8, SPRITE_PHARMACIST, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerBurglarEddie, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 17, 2, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM13, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 11, 2, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM11, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 3, 2, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM25, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 19, 12, SPRITE_ROCKET_GIRL, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerGruntF3, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 3, 27, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodUndergroundSwitchRoomEntrancesTeacherScript, -1 + object_event 19, 27, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodUndergroundSwitchRoomEntrancesSuperNerdScript, -1 + object_event 1, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundSwitchRoomEntrancesSmokeBall, EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_SMOKE_BALL + object_event 14, 9, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundSwitchRoomEntrancesFullHeal, EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_FULL_HEAL + object_event 23, 3, SPRITE_RIVAL, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_GOLDENROD_UNDERGROUND diff --git a/maps/GoldenrodUndergroundSwitchRoomEntrances.blk b/maps/GoldenrodUndergroundSwitchRoomEntrances.blk new file mode 100644 index 0000000..d8a49b5 --- /dev/null +++ b/maps/GoldenrodUndergroundSwitchRoomEntrances.blk @@ -0,0 +1,2 @@ +*7**7*7***---*--*--*-)--------------*>*?*>?*>---=--=--*>*?*>?*>?7<---=--=--=--***********************   +((-- -- \ No newline at end of file diff --git a/maps/GoldenrodUndergroundWarehouse.asm b/maps/GoldenrodUndergroundWarehouse.asm new file mode 100644 index 0000000..b4837c8 --- /dev/null +++ b/maps/GoldenrodUndergroundWarehouse.asm @@ -0,0 +1,230 @@ + object_const_def + const GOLDENRODUNDERGROUNDWAREHOUSE_ROCKET1 + const GOLDENRODUNDERGROUNDWAREHOUSE_ROCKET2 + const GOLDENRODUNDERGROUNDWAREHOUSE_ROCKET3 + const GOLDENRODUNDERGROUNDWAREHOUSE_GENTLEMAN + const GOLDENRODUNDERGROUNDWAREHOUSE_POKE_BALL1 + const GOLDENRODUNDERGROUNDWAREHOUSE_POKE_BALL2 + const GOLDENRODUNDERGROUNDWAREHOUSE_POKE_BALL3 + +GoldenrodUndergroundWarehouse_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, GoldenrodUndergroundWarehouseResetSwitchesCallback + +GoldenrodUndergroundWarehouseResetSwitchesCallback: + clearevent EVENT_SWITCH_1 + clearevent EVENT_SWITCH_2 + clearevent EVENT_SWITCH_3 + clearevent EVENT_EMERGENCY_SWITCH + clearevent EVENT_SWITCH_4 + clearevent EVENT_SWITCH_5 + clearevent EVENT_SWITCH_6 + clearevent EVENT_SWITCH_7 + clearevent EVENT_SWITCH_8 + clearevent EVENT_SWITCH_9 + clearevent EVENT_SWITCH_10 + clearevent EVENT_SWITCH_11 + clearevent EVENT_SWITCH_12 + clearevent EVENT_SWITCH_13 + clearevent EVENT_SWITCH_14 + setval 0 + writemem wUndergroundSwitchPositions + endcallback + +TrainerGruntM24: + trainer GRUNTM, GRUNTM_24, EVENT_BEAT_ROCKET_GRUNTM_24, GruntM24SeenText, GruntM24BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM24AfterBattleText + waitbutton + closetext + end + +TrainerGruntM14: + trainer GRUNTM, GRUNTM_14, EVENT_BEAT_ROCKET_GRUNTM_14, GruntM14SeenText, GruntM14BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM14AfterBattleText + waitbutton + closetext + end + +TrainerGruntM15: + trainer GRUNTM, GRUNTM_15, EVENT_BEAT_ROCKET_GRUNTM_15, GruntM15SeenText, GruntM15BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM15AfterBattleText + waitbutton + closetext + end + +GoldenrodUndergroundWarehouseDirectorScript: + faceplayer + opentext + checkevent EVENT_RECEIVED_CARD_KEY + iftrue .GotCardKey + writetext DirectorIntroText + promptbutton + verbosegiveitem CARD_KEY + setevent EVENT_RECEIVED_CARD_KEY + setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1 + clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2 + clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3 + writetext DirectorCardKeyText + promptbutton +.GotCardKey: + writetext DirectorAfterText + waitbutton + closetext + end + +GoldenrodUndergroundWarehouseMaxEther: + itemball MAX_ETHER + +GoldenrodUndergroundWarehouseTMSleepTalk: + itemball TM_SLEEP_TALK + +GoldenrodUndergroundWarehouseUltraBall: + itemball ULTRA_BALL + +GruntM24SeenText: + text "How did you get" + line "this far?" + + para "I guess it can't" + line "be helped. I'll" + cont "dispose of you." + done + +GruntM24BeatenText: + text "I got disposed of…" + done + +GruntM24AfterBattleText: + text "TEAM ROCKET will" + line "keep going, wait-" + cont "ing for the return" + cont "of GIOVANNI." + + para "We'll do whatever" + line "it takes." + done + +GruntM14SeenText: + text "You're not going" + line "any farther!" + + para "I don't show mercy" + line "to my enemies, not" + cont "even brats!" + done + +GruntM14BeatenText: + text "Blast it!" + done + +GruntM14AfterBattleText: + text "I lost…" + + para "Please forgive me," + line "GIOVANNI!" + done + +GruntM15SeenText: + text "Hyuck-hyuck-hyuck!" + line "I remember you!" + + para "You got me good" + line "at our hideout!" + done + +GruntM15BeatenText: + text "Hyuck-hyuck-hyuck!" + line "So, that's how?" + done + +GruntM15AfterBattleText: + text "Hyuck-hyuck-hyuck!" + line "That was a blast!" + cont "I'll remember you!" + done + +DirectorIntroText: + text "DIRECTOR: Who?" + line "What? You came to" + cont "rescue me?" + + para "Thank you!" + + para "The RADIO TOWER!" + + para "What's happening" + line "there?" + + para "Taken over by TEAM" + line "ROCKET?" + + para "Here. Take this" + line "CARD KEY." + done + +DirectorCardKeyText: + text "DIRECTOR: Use that" + line "to open the shut-" + cont "ters on 3F." + done + +DirectorAfterText: + text "I'm begging you to" + line "help." + + para "There's no telling" + line "what they'll do if" + + para "they control the" + line "transmitter." + + para "They may even be" + line "able to control" + + para "#MON using a" + line "special signal!" + + para "You're the only" + line "one I can call on." + + para "Please save the" + line "RADIO TOWER…" + + para "And all the #-" + line "MON nationwide!" + done + +GoldenrodUndergroundWarehouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 12, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, 2 + warp_event 3, 12, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, 3 + warp_event 17, 2, GOLDENROD_DEPT_STORE_B1F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 9, 8, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM24, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 8, 15, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM14, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 14, 3, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 4, TrainerGruntM15, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 12, 8, SPRITE_GENTLEMAN, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GoldenrodUndergroundWarehouseDirectorScript, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 18, 15, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundWarehouseMaxEther, EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_MAX_ETHER + object_event 13, 9, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundWarehouseTMSleepTalk, EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK + object_event 2, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundWarehouseUltraBall, EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_ULTRA_BALL diff --git a/maps/GoldenrodUndergroundWarehouse.blk b/maps/GoldenrodUndergroundWarehouse.blk new file mode 100644 index 0000000..4b0f803 --- /dev/null +++ b/maps/GoldenrodUndergroundWarehouse.blk @@ -0,0 +1,3 @@ +  +    +          ,.4 0 2//////- \ No newline at end of file diff --git a/maps/GuideGentsHouse.asm b/maps/GuideGentsHouse.asm new file mode 100644 index 0000000..ee25b0d --- /dev/null +++ b/maps/GuideGentsHouse.asm @@ -0,0 +1,42 @@ + object_const_def + const GUIDEGENTSHOUSE_GRAMPS + +GuideGentsHouse_MapScripts: + def_scene_scripts + + def_callbacks + +GuideGentsHouseGuideGent: + jumptextfaceplayer GuideGentsHouseGuideGentText + +GuideGentsHouseBookshelf: + jumpstd MagazineBookshelfScript + +GuideGentsHouseGuideGentText: + text "When I was a wee" + line "lad, I was a hot-" + cont "shot trainer!" + + para "Here's a word of" + line "advice: Catch lots" + cont "of #MON!" + + para "Treat them all" + line "with kindness!" + done + +GuideGentsHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CHERRYGROVE_CITY, 4 + warp_event 3, 7, CHERRYGROVE_CITY, 4 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, GuideGentsHouseBookshelf + bg_event 1, 1, BGEVENT_READ, GuideGentsHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GuideGentsHouseGuideGent, EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE diff --git a/maps/HallOfFame.asm b/maps/HallOfFame.asm new file mode 100644 index 0000000..4135abb --- /dev/null +++ b/maps/HallOfFame.asm @@ -0,0 +1,123 @@ + object_const_def + const HALLOFFAME_LANCE + +HallOfFame_MapScripts: + def_scene_scripts + scene_script HallOfFameEnterScene, SCENE_HALLOFFAME_ENTER + scene_script HallOfFameNoopScene, SCENE_HALLOFFAME_NOOP + + def_callbacks + +HallOfFameEnterScene: + sdefer HallOfFameEnterScript + end + +HallOfFameNoopScene: + end + +HallOfFameEnterScript: + follow HALLOFFAME_LANCE, PLAYER + applymovement HALLOFFAME_LANCE, HallOfFame_WalkUpWithLance + stopfollow + turnobject PLAYER, RIGHT + opentext + writetext HallOfFame_LanceText + waitbutton + closetext + turnobject HALLOFFAME_LANCE, UP + applymovement PLAYER, HallOfFame_SlowlyApproachMachine + setscene SCENE_HALLOFFAME_NOOP + pause 15 + setval HEALMACHINE_HALL_OF_FAME + special HealMachineAnim + setevent EVENT_BEAT_ELITE_FOUR + setevent EVENT_TELEPORT_GUY + setevent EVENT_RIVAL_SPROUT_TOWER + clearevent EVENT_RED_IN_MT_SILVER + setevent EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME + clearevent EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME + setmapscene SPROUT_TOWER_3F, SCENE_SPROUTTOWER3F_NOOP + special HealParty + checkevent EVENT_GOT_SS_TICKET_FROM_ELM + iftrue .SkipPhoneCall + specialphonecall SPECIALCALL_SSTICKET +.SkipPhoneCall: + halloffame + end + +HallOfFame_WalkUpWithLance: + step UP + step UP + step UP + step UP + step UP + step UP + step UP + step UP + step RIGHT + turn_head LEFT + step_end + +HallOfFame_SlowlyApproachMachine: + slow_step UP + step_end + +HallOfFame_LanceText: + text "LANCE: It's been a" + line "long time since I" + cont "last came here." + + para "This is where we" + line "honor the LEAGUE" + + para "CHAMPIONS for all" + line "eternity." + + para "Their courageous" + line "#MON are also" + cont "inducted." + + para "Here today, we" + line "witnessed the rise" + + para "of a new LEAGUE" + line "CHAMPION--a" + + para "trainer who feels" + line "compassion for," + + para "and trust toward," + line "all #MON." + + para "A trainer who" + line "succeeded through" + + para "perseverance and" + line "determination." + + para "The new LEAGUE" + line "CHAMPION who has" + + para "all the makings" + line "of greatness!" + + para ", allow me" + line "to register you" + + para "and your partners" + line "as CHAMPIONS!" + done + +HallOfFame_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 13, LANCES_ROOM, 3 + warp_event 5, 13, LANCES_ROOM, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 4, 12, SPRITE_LANCE, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1 diff --git a/maps/HallOfFame.blk b/maps/HallOfFame.blk new file mode 100644 index 0000000..a64dfd2 --- /dev/null +++ b/maps/HallOfFame.blk @@ -0,0 +1 @@ +30123+456++++<++++++++++++++++++=++ \ No newline at end of file diff --git a/maps/House1.blk b/maps/House1.blk new file mode 100644 index 0000000..3f4c1db --- /dev/null +++ b/maps/House1.blk @@ -0,0 +1 @@ +   \ No newline at end of file diff --git a/maps/House2.blk b/maps/House2.blk new file mode 100644 index 0000000..217cc86 --- /dev/null +++ b/maps/House2.blk @@ -0,0 +1 @@ +)* \ No newline at end of file diff --git a/maps/IcePath1F.asm b/maps/IcePath1F.asm new file mode 100644 index 0000000..afe0ced --- /dev/null +++ b/maps/IcePath1F.asm @@ -0,0 +1,36 @@ + object_const_def + const ICEPATH1F_POKE_BALL1 + const ICEPATH1F_POKE_BALL2 + const ICEPATH1F_POKE_BALL3 + +IcePath1F_MapScripts: + def_scene_scripts + + def_callbacks + +IcePath1FHMWaterfall: + itemball HM_WATERFALL + +IcePath1FPPUp: + itemball PP_UP + +IcePath1FProtein: + itemball PROTEIN + +IcePath1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 19, ROUTE_44, 1 + warp_event 36, 27, BLACKTHORN_CITY, 7 + warp_event 37, 5, ICE_PATH_B1F, 1 + warp_event 37, 13, ICE_PATH_B1F, 7 + + def_coord_events + + def_bg_events + + def_object_events + object_event 31, 7, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePath1FHMWaterfall, EVENT_GOT_HM07_WATERFALL + object_event 32, 23, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePath1FPPUp, EVENT_ICE_PATH_1F_PP_UP + object_event 35, 9, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePath1FProtein, EVENT_ICE_PATH_1F_PROTEIN diff --git a/maps/IcePath1F.blk b/maps/IcePath1F.blk new file mode 100644 index 0000000..aae4025 --- /dev/null +++ b/maps/IcePath1F.blk @@ -0,0 +1,14 @@ + > > >> > >>  +.; +-  > >  +,. ,!# +/,-/ +,-/;   +,  + +; !# + +  +$% )  * +;  ;/ "  )  +) * \ No newline at end of file diff --git a/maps/IcePathB1F.asm b/maps/IcePathB1F.asm new file mode 100644 index 0000000..fe98b9f --- /dev/null +++ b/maps/IcePathB1F.asm @@ -0,0 +1,99 @@ + object_const_def + const ICEPATHB1F_BOULDER1 + const ICEPATHB1F_BOULDER2 + const ICEPATHB1F_BOULDER3 + const ICEPATHB1F_BOULDER4 + const ICEPATHB1F_POKE_BALL + +IcePathB1F_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_CMDQUEUE, IcePathB1FSetUpStoneTableCallback + +IcePathB1FSetUpStoneTableCallback: + writecmdqueue .CommandQueue + endcallback + +.CommandQueue: + cmdqueue CMDQUEUE_STONETABLE, .StoneTable ; check if any stones are sitting on a warp + +.StoneTable: + stonetable 3, ICEPATHB1F_BOULDER1, .Boulder1 + stonetable 4, ICEPATHB1F_BOULDER2, .Boulder2 + stonetable 5, ICEPATHB1F_BOULDER3, .Boulder3 + stonetable 6, ICEPATHB1F_BOULDER4, .Boulder4 + db -1 ; end + +.Boulder1: + disappear ICEPATHB1F_BOULDER1 + clearevent EVENT_BOULDER_IN_ICE_PATH_1A + sjump .FinishBoulder + +.Boulder2: + disappear ICEPATHB1F_BOULDER2 + clearevent EVENT_BOULDER_IN_ICE_PATH_2A + sjump .FinishBoulder + +.Boulder3: + disappear ICEPATHB1F_BOULDER3 + clearevent EVENT_BOULDER_IN_ICE_PATH_3A + sjump .FinishBoulder + +.Boulder4: + disappear ICEPATHB1F_BOULDER4 + clearevent EVENT_BOULDER_IN_ICE_PATH_4A + sjump .FinishBoulder + +.FinishBoulder: + pause 30 + scall .BoulderFallsThrough + opentext + writetext IcePathBoulderFellThroughText + waitbutton + closetext + end + +.BoulderFallsThrough: + playsound SFX_STRENGTH + earthquake 80 + end + +IcePathB1FBoulder: + jumpstd StrengthBoulderScript + +IcePathB1FIron: + itemball IRON + +IcePathB1FHiddenMaxPotion: + hiddenitem MAX_POTION, EVENT_ICE_PATH_B1F_HIDDEN_MAX_POTION + +IcePathBoulderFellThroughText: + text "The boulder fell" + line "through." + done + +IcePathB1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 15, ICE_PATH_1F, 3 + warp_event 17, 3, ICE_PATH_B2F_MAHOGANY_SIDE, 1 + warp_event 11, 2, ICE_PATH_B2F_MAHOGANY_SIDE, 3 ; hole + warp_event 4, 7, ICE_PATH_B2F_MAHOGANY_SIDE, 4 ; hole + warp_event 5, 12, ICE_PATH_B2F_MAHOGANY_SIDE, 5 ; hole + warp_event 12, 13, ICE_PATH_B2F_MAHOGANY_SIDE, 6 ; hole + warp_event 5, 25, ICE_PATH_1F, 4 + warp_event 11, 27, ICE_PATH_B2F_BLACKTHORN_SIDE, 1 + + def_coord_events + + def_bg_events + bg_event 17, 30, BGEVENT_ITEM, IcePathB1FHiddenMaxPotion + + def_object_events + object_event 11, 7, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB1FBoulder, EVENT_BOULDER_IN_ICE_PATH_1 + object_event 7, 8, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB1FBoulder, EVENT_BOULDER_IN_ICE_PATH_2 + object_event 8, 9, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB1FBoulder, EVENT_BOULDER_IN_ICE_PATH_3 + object_event 17, 7, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB1FBoulder, EVENT_BOULDER_IN_ICE_PATH_4 + object_event 5, 35, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePathB1FIron, EVENT_ICE_PATH_B1F_IRON diff --git a/maps/IcePathB1F.blk b/maps/IcePathB1F.blk new file mode 100644 index 0000000..08d75c1 --- /dev/null +++ b/maps/IcePathB1F.blk @@ -0,0 +1,2 @@ +;# ";;!"" "   #""! ;;;;7 + 8> " >.,;-.; .-,/ ;; \ No newline at end of file diff --git a/maps/IcePathB2FBlackthornSide.asm b/maps/IcePathB2FBlackthornSide.asm new file mode 100644 index 0000000..2920264 --- /dev/null +++ b/maps/IcePathB2FBlackthornSide.asm @@ -0,0 +1,28 @@ + object_const_def + const ICEPATHB2FBLACKTHORNSIDE_POKE_BALL + +IcePathB2FBlackthornSide_MapScripts: + def_scene_scripts + + def_callbacks + +IcePathB2FBlackthornSideTMRest: + itemball TM_REST + +IcePathB2FBlackthornSideHiddenIceHeal: + hiddenitem ICE_HEAL, EVENT_ICE_PATH_B2F_BLACKTHORN_SIDE_HIDDEN_ICE_HEAL + +IcePathB2FBlackthornSide_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 15, ICE_PATH_B1F, 8 + warp_event 3, 3, ICE_PATH_B3F, 2 + + def_coord_events + + def_bg_events + bg_event 2, 10, BGEVENT_ITEM, IcePathB2FBlackthornSideHiddenIceHeal + + def_object_events + object_event 8, 16, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePathB2FBlackthornSideTMRest, EVENT_ICE_PATH_B2F_BLACKTHORN_SIDE_TM_REST diff --git a/maps/IcePathB2FBlackthornSide.blk b/maps/IcePathB2FBlackthornSide.blk new file mode 100644 index 0000000..63316cc --- /dev/null +++ b/maps/IcePathB2FBlackthornSide.blk @@ -0,0 +1 @@ +"#:9$%%,-//- \ No newline at end of file diff --git a/maps/IcePathB2FMahoganySide.asm b/maps/IcePathB2FMahoganySide.asm new file mode 100644 index 0000000..28a9eee --- /dev/null +++ b/maps/IcePathB2FMahoganySide.asm @@ -0,0 +1,53 @@ + object_const_def + const ICEPATHB2FMAHOGANYSIDE_BOULDER1 + const ICEPATHB2FMAHOGANYSIDE_BOULDER2 + const ICEPATHB2FMAHOGANYSIDE_BOULDER3 + const ICEPATHB2FMAHOGANYSIDE_BOULDER4 + const ICEPATHB2FMAHOGANYSIDE_POKE_BALL1 + const ICEPATHB2FMAHOGANYSIDE_POKE_BALL2 + +IcePathB2FMahoganySide_MapScripts: + def_scene_scripts + + def_callbacks + +IcePathB2FMahoganySideBoulder: + jumptext IcePathB2FMahoganySideBoulderText + +IcePathB2FMahoganySideFullHeal: + itemball FULL_HEAL + +IcePathB2FMahoganySideMaxPotion: + itemball MAX_POTION + +IcePathB2FMahoganySideHiddenCarbos: + hiddenitem CARBOS, EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_HIDDEN_CARBOS + +IcePathB2FMahoganySideBoulderText: + text "It's immovably" + line "imbedded in ice." + done + +IcePathB2FMahoganySide_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 17, 1, ICE_PATH_B1F, 2 + warp_event 9, 11, ICE_PATH_B3F, 1 + warp_event 11, 4, ICE_PATH_B1F, 3 + warp_event 4, 6, ICE_PATH_B1F, 4 + warp_event 4, 12, ICE_PATH_B1F, 5 + warp_event 12, 12, ICE_PATH_B1F, 6 + + def_coord_events + + def_bg_events + bg_event 0, 17, BGEVENT_ITEM, IcePathB2FMahoganySideHiddenCarbos + + def_object_events + object_event 11, 3, SPRITE_BOULDER, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB2FMahoganySideBoulder, EVENT_BOULDER_IN_ICE_PATH_1A + object_event 4, 7, SPRITE_BOULDER, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB2FMahoganySideBoulder, EVENT_BOULDER_IN_ICE_PATH_2A + object_event 3, 12, SPRITE_BOULDER, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB2FMahoganySideBoulder, EVENT_BOULDER_IN_ICE_PATH_3A + object_event 12, 13, SPRITE_BOULDER, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB2FMahoganySideBoulder, EVENT_BOULDER_IN_ICE_PATH_4A + object_event 8, 9, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePathB2FMahoganySideFullHeal, EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_FULL_HEAL + object_event 0, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePathB2FMahoganySideMaxPotion, EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_MAX_POTION diff --git a/maps/IcePathB2FMahoganySide.blk b/maps/IcePathB2FMahoganySide.blk new file mode 100644 index 0000000..cc94e6b --- /dev/null +++ b/maps/IcePathB2FMahoganySide.blk @@ -0,0 +1 @@ + "!#! \ No newline at end of file diff --git a/maps/IcePathB3F.asm b/maps/IcePathB3F.asm new file mode 100644 index 0000000..ba606df --- /dev/null +++ b/maps/IcePathB3F.asm @@ -0,0 +1,29 @@ + object_const_def + const ICEPATHB3F_POKE_BALL + const ICEPATHB3F_ROCK + +IcePathB3F_MapScripts: + def_scene_scripts + + def_callbacks + +IcePathB3FNevermeltice: + itemball NEVERMELTICE + +IcePathB3FRock: + jumpstd SmashRockScript + +IcePathB3F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 5, ICE_PATH_B2F_MAHOGANY_SIDE, 2 + warp_event 15, 5, ICE_PATH_B2F_BLACKTHORN_SIDE, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 7, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IcePathB3FNevermeltice, EVENT_ICE_PATH_B3F_NEVERMELTICE + object_event 6, 6, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IcePathB3FRock, -1 diff --git a/maps/IcePathB3F.blk b/maps/IcePathB3F.blk new file mode 100644 index 0000000..c670d1e --- /dev/null +++ b/maps/IcePathB3F.blk @@ -0,0 +1 @@ +; ; !;9" :#(#  \ No newline at end of file diff --git a/maps/IlexForest.asm b/maps/IlexForest.asm new file mode 100644 index 0000000..4db77c3 --- /dev/null +++ b/maps/IlexForest.asm @@ -0,0 +1,965 @@ + object_const_def + const ILEXFOREST_FARFETCHD + const ILEXFOREST_YOUNGSTER1 + const ILEXFOREST_BLACK_BELT + const ILEXFOREST_ROCKER + const ILEXFOREST_POKE_BALL1 + const ILEXFOREST_KURT + const ILEXFOREST_LASS + const ILEXFOREST_YOUNGSTER2 + const ILEXFOREST_POKE_BALL2 + const ILEXFOREST_POKE_BALL3 + const ILEXFOREST_POKE_BALL4 + +IlexForest_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, IlexForestFarfetchdCallback + +IlexForestFarfetchdCallback: + checkevent EVENT_GOT_HM01_CUT + iftrue .Static + readmem wFarfetchdPosition + ifequal 1, .PositionOne + ifequal 2, .PositionTwo + ifequal 3, .PositionThree + ifequal 4, .PositionFour + ifequal 5, .PositionFive + ifequal 6, .PositionSix + ifequal 7, .PositionSeven + ifequal 8, .PositionEight + ifequal 9, .PositionNine + ifequal 10, .PositionTen +.Static: + endcallback + +.PositionOne: + moveobject ILEXFOREST_FARFETCHD, 14, 31 + appear ILEXFOREST_FARFETCHD + endcallback + +.PositionTwo: + moveobject ILEXFOREST_FARFETCHD, 15, 25 + appear ILEXFOREST_FARFETCHD + endcallback + +.PositionThree: + moveobject ILEXFOREST_FARFETCHD, 20, 24 + appear ILEXFOREST_FARFETCHD + endcallback + +.PositionFour: + moveobject ILEXFOREST_FARFETCHD, 29, 22 + appear ILEXFOREST_FARFETCHD + endcallback + +.PositionFive: + moveobject ILEXFOREST_FARFETCHD, 28, 31 + appear ILEXFOREST_FARFETCHD + endcallback + +.PositionSix: + moveobject ILEXFOREST_FARFETCHD, 24, 35 + appear ILEXFOREST_FARFETCHD + endcallback + +.PositionSeven: + moveobject ILEXFOREST_FARFETCHD, 22, 31 + appear ILEXFOREST_FARFETCHD + endcallback + +.PositionEight: + moveobject ILEXFOREST_FARFETCHD, 15, 29 + appear ILEXFOREST_FARFETCHD + endcallback + +.PositionNine: + moveobject ILEXFOREST_FARFETCHD, 10, 35 + appear ILEXFOREST_FARFETCHD + endcallback + +.PositionTen: + moveobject ILEXFOREST_FARFETCHD, 6, 28 + appear ILEXFOREST_FARFETCHD + endcallback + +IlexForestCharcoalApprenticeScript: + faceplayer + opentext + checkevent EVENT_HERDED_FARFETCHD + iftrue .DoneFarfetchd + writetext IlexForestApprenticeIntroText + waitbutton + closetext + end + +.DoneFarfetchd: + writetext IlexForestApprenticeAfterText + waitbutton + closetext + end + +IlexForestFarfetchdScript: + readmem wFarfetchdPosition + ifequal 1, .Position1 + ifequal 2, .Position2 + ifequal 3, .Position3 + ifequal 4, .Position4 + ifequal 5, .Position5 + ifequal 6, .Position6 + ifequal 7, .Position7 + ifequal 8, .Position8 + ifequal 9, .Position9 + ifequal 10, .Position10 + +.Position1: + faceplayer + opentext + writetext Text_ItsTheMissingPokemon + promptbutton + writetext Text_Kwaaaa + cry FARFETCH_D + waitbutton + closetext + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos1_Pos2 + moveobject ILEXFOREST_FARFETCHD, 15, 25 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 2 + end + +.Position2: + scall .CryAndCheckFacing + ifequal DOWN, .Position2_Down + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos2_Pos3 + moveobject ILEXFOREST_FARFETCHD, 20, 24 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 3 + end + +.Position2_Down: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos2_Pos8 + moveobject ILEXFOREST_FARFETCHD, 15, 29 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 8 + end + +.Position3: + scall .CryAndCheckFacing + ifequal LEFT, .Position3_Left + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos3_Pos4 + moveobject ILEXFOREST_FARFETCHD, 29, 22 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 4 + end + +.Position3_Left: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos3_Pos2 + moveobject ILEXFOREST_FARFETCHD, 15, 25 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 2 + end + +.Position4: + scall .CryAndCheckFacing + ifequal UP, .Position4_Up + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos4_Pos5 + moveobject ILEXFOREST_FARFETCHD, 28, 31 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 5 + end + +.Position4_Up: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos4_Pos3 + moveobject ILEXFOREST_FARFETCHD, 20, 24 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 3 + end + +.Position5: + scall .CryAndCheckFacing + ifequal UP, .Position5_Up + ifequal LEFT, .Position5_Left + ifequal RIGHT, .Position5_Right + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos5_Pos6 + moveobject ILEXFOREST_FARFETCHD, 24, 35 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 6 + end + +.Position5_Left: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetchd_Pos5_Pos7 + moveobject ILEXFOREST_FARFETCHD, 22, 31 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 7 + end + +.Position5_Up: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos5_Pos4_Up + moveobject ILEXFOREST_FARFETCHD, 29, 22 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 4 + end + +.Position5_Right: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos5_Pos4_Right + moveobject ILEXFOREST_FARFETCHD, 29, 22 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 4 + end + +.Position6: + scall .CryAndCheckFacing + ifequal RIGHT, .Position6_Right + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos6_Pos7 + moveobject ILEXFOREST_FARFETCHD, 22, 31 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 7 + end + +.Position6_Right: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos6_Pos5 + moveobject ILEXFOREST_FARFETCHD, 28, 31 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 5 + end + +.Position7: + scall .CryAndCheckFacing + ifequal DOWN, .Position7_Down + ifequal LEFT, .Position7_Left + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos7_Pos8 + moveobject ILEXFOREST_FARFETCHD, 15, 29 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 8 + end + +.Position7_Left: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos7_Pos6 + moveobject ILEXFOREST_FARFETCHD, 24, 35 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 6 + end + +.Position7_Down: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos7_Pos5 + moveobject ILEXFOREST_FARFETCHD, 28, 31 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 5 + end + +.Position8: + scall .CryAndCheckFacing + ifequal UP, .Position8_Up + ifequal LEFT, .Position8_Left + ifequal RIGHT, .Position8_Right + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos8_Pos9 + moveobject ILEXFOREST_FARFETCHD, 10, 35 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 9 + end + +.Position8_Right: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos8_Pos7 + moveobject ILEXFOREST_FARFETCHD, 22, 31 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 7 + end + +.Position8_Up: +.Position8_Left: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos8_Pos2 + moveobject ILEXFOREST_FARFETCHD, 15, 25 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 2 + end + +.Position9: + scall .CryAndCheckFacing + ifequal DOWN, .Position9_Down + ifequal RIGHT, .Position9_Right + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos9_Pos10 + moveobject ILEXFOREST_FARFETCHD, 6, 28 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 10 + appear ILEXFOREST_BLACK_BELT + setevent EVENT_CHARCOAL_KILN_BOSS + setevent EVENT_HERDED_FARFETCHD + end + +.Position9_Right: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos9_Pos8_Right + moveobject ILEXFOREST_FARFETCHD, 15, 29 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 8 + end + +.Position9_Down: + applymovement ILEXFOREST_FARFETCHD, MovementData_Farfetched_Pos9_Pos8_Down + moveobject ILEXFOREST_FARFETCHD, 15, 29 + disappear ILEXFOREST_FARFETCHD + appear ILEXFOREST_FARFETCHD + loadmem wFarfetchdPosition, 8 + end + +.Position10: + faceplayer + opentext + writetext Text_Kwaaaa + cry FARFETCH_D + waitbutton + closetext + end + +.CryAndCheckFacing: + faceplayer + opentext + writetext Text_Kwaaaa + cry FARFETCH_D + waitbutton + closetext + readvar VAR_FACING + end + +IlexForestCharcoalMasterScript: + faceplayer + opentext + checkevent EVENT_GOT_HM01_CUT + iftrue .AlreadyGotCut + writetext Text_CharcoalMasterIntro + promptbutton + verbosegiveitem HM_CUT + setevent EVENT_GOT_HM01_CUT + writetext Text_CharcoalMasterOutro + waitbutton + closetext + setevent EVENT_ILEX_FOREST_FARFETCHD + setevent EVENT_ILEX_FOREST_APPRENTICE + setevent EVENT_ILEX_FOREST_CHARCOAL_MASTER + clearevent EVENT_CHARCOAL_KILN_FARFETCH_D + clearevent EVENT_CHARCOAL_KILN_APPRENTICE + clearevent EVENT_CHARCOAL_KILN_BOSS + end + +.AlreadyGotCut: + writetext Text_CharcoalMasterTalkAfter + waitbutton + closetext + end + +IlexForestHeadbuttGuyScript: + faceplayer + opentext + checkevent EVENT_GOT_TM02_HEADBUTT + iftrue .AlreadyGotHeadbutt + writetext Text_HeadbuttIntro + promptbutton + verbosegiveitem TM_HEADBUTT + iffalse .BagFull + setevent EVENT_GOT_TM02_HEADBUTT +.AlreadyGotHeadbutt: + writetext Text_HeadbuttOutro + waitbutton +.BagFull: + closetext + end + +TrainerBugCatcherWayne: + trainer BUG_CATCHER, WAYNE, EVENT_BEAT_BUG_CATCHER_WAYNE, BugCatcherWayneSeenText, BugCatcherWayneBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BugCatcherWayneAfterBattleText + waitbutton + closetext + end + +IlexForestLassScript: + jumptextfaceplayer Text_IlexForestLass + +IlexForestRevive: + itemball REVIVE + +IlexForestXAttack: + itemball X_ATTACK + +IlexForestAntidote: + itemball ANTIDOTE + +IlexForestEther: + itemball ETHER + +IlexForestHiddenEther: + hiddenitem ETHER, EVENT_ILEX_FOREST_HIDDEN_ETHER + +IlexForestHiddenSuperPotion: + hiddenitem SUPER_POTION, EVENT_ILEX_FOREST_HIDDEN_SUPER_POTION + +IlexForestHiddenFullHeal: + hiddenitem FULL_HEAL, EVENT_ILEX_FOREST_HIDDEN_FULL_HEAL + +IlexForestBoulder: ; unreferenced + jumpstd StrengthBoulderScript + +IlexForestSignpost: + jumptext IlexForestSignpostText + +IlexForestShrineScript: + checkevent EVENT_FOREST_IS_RESTLESS + iftrue .ForestIsRestless + sjump .DontDoCelebiEvent + +.ForestIsRestless: + checkitem GS_BALL + iftrue .AskCelebiEvent +.DontDoCelebiEvent: + jumptext Text_IlexForestShrine + +.AskCelebiEvent: + opentext + writetext Text_ShrineCelebiEvent + yesorno + iftrue .CelebiEvent + closetext + end + +.CelebiEvent: + takeitem GS_BALL + clearevent EVENT_FOREST_IS_RESTLESS + setevent EVENT_AZALEA_TOWN_KURT + disappear ILEXFOREST_LASS + clearevent EVENT_ROUTE_34_ILEX_FOREST_GATE_LASS + writetext Text_InsertGSBall + waitbutton + closetext + pause 20 + showemote EMOTE_SHOCK, PLAYER, 20 + special FadeOutMusic + applymovement PLAYER, IlexForestPlayerStepsDownMovement + pause 30 + turnobject PLAYER, DOWN + pause 20 + clearflag ENGINE_FOREST_IS_RESTLESS + special CelebiShrineEvent + loadwildmon CELEBI, 30 + startbattle + reloadmapafterbattle + pause 20 + special CheckCaughtCelebi + iffalse .DidntCatchCelebi + appear ILEXFOREST_KURT + applymovement ILEXFOREST_KURT, IlexForestKurtStepsUpMovement + opentext + writetext Text_KurtCaughtCelebi + waitbutton + closetext + applymovement ILEXFOREST_KURT, IlexForestKurtStepsDownMovement + disappear ILEXFOREST_KURT +.DidntCatchCelebi: + end + +MovementData_Farfetchd_Pos1_Pos2: + big_step UP + big_step UP + big_step UP + big_step UP + big_step UP + step_end + +MovementData_Farfetchd_Pos2_Pos3: + big_step UP + big_step UP + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step DOWN + step_end + +MovementData_Farfetchd_Pos2_Pos8: + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + step_end + +MovementData_Farfetchd_Pos3_Pos4: + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + step_end + +MovementData_Farfetchd_Pos3_Pos2: + big_step UP + big_step LEFT + big_step LEFT + big_step LEFT + big_step LEFT + step_end + +MovementData_Farfetchd_Pos4_Pos5: + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + step_end + +MovementData_Farfetchd_Pos4_Pos3: + big_step LEFT + jump_step LEFT + big_step LEFT + big_step LEFT + step_end + +MovementData_Farfetchd_Pos5_Pos6: + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + big_step LEFT + big_step LEFT + big_step LEFT + big_step LEFT + step_end + +MovementData_Farfetchd_Pos5_Pos7: + big_step LEFT + big_step LEFT + big_step LEFT + big_step LEFT + step_end + +MovementData_Farfetched_Pos5_Pos4_Up: + big_step UP + big_step UP + big_step UP + big_step RIGHT + big_step UP + step_end + +MovementData_Farfetched_Pos5_Pos4_Right: + big_step RIGHT + turn_head UP + step_sleep 1 + turn_head DOWN + step_sleep 1 + turn_head UP + step_sleep 1 + big_step DOWN + big_step DOWN + fix_facing + jump_step UP + step_sleep 8 + step_sleep 8 + remove_fixed_facing + big_step UP + big_step UP + big_step UP + big_step UP + big_step UP + step_end + +MovementData_Farfetched_Pos6_Pos7: + big_step LEFT + big_step LEFT + big_step LEFT + big_step UP + big_step UP + big_step RIGHT + big_step UP + big_step UP + step_end + +MovementData_Farfetched_Pos6_Pos5: + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step UP + big_step UP + big_step UP + big_step UP + step_end + +MovementData_Farfetched_Pos7_Pos8: + big_step UP + big_step UP + big_step LEFT + big_step LEFT + big_step LEFT + big_step LEFT + big_step LEFT + step_end + +MovementData_Farfetched_Pos7_Pos6: + big_step DOWN + big_step DOWN + big_step LEFT + big_step DOWN + big_step DOWN + big_step RIGHT + big_step RIGHT + big_step RIGHT + step_end + +MovementData_Farfetched_Pos7_Pos5: + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + step_end + +MovementData_Farfetched_Pos8_Pos9: + big_step DOWN + big_step LEFT + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + step_end + +MovementData_Farfetched_Pos8_Pos7: + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + step_end + +MovementData_Farfetched_Pos8_Pos2: + big_step UP + big_step UP + big_step UP + big_step UP + step_end + +MovementData_Farfetched_Pos9_Pos10: + big_step LEFT + big_step LEFT + fix_facing + jump_step RIGHT + step_sleep 8 + step_sleep 8 + remove_fixed_facing + big_step LEFT + big_step LEFT + big_step UP + big_step UP + big_step UP + big_step UP + big_step UP + big_step UP + step_end + +MovementData_Farfetched_Pos9_Pos8_Right: + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step UP + big_step UP + big_step UP + big_step UP + big_step UP + step_end + +MovementData_Farfetched_Pos9_Pos8_Down: + big_step LEFT + big_step LEFT + fix_facing + jump_step RIGHT + step_sleep 8 + step_sleep 8 + remove_fixed_facing + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step UP + big_step UP + big_step UP + big_step UP + big_step UP + step_end + +IlexForestKurtStepsUpMovement: + step UP + step UP + step UP + step UP + step_end + +IlexForestKurtStepsDownMovement: + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +IlexForestPlayerStepsDownMovement: + fix_facing + slow_step DOWN + remove_fixed_facing + step_end + +IlexForestApprenticeIntroText: + text "Oh, man… My boss" + line "is going to be" + cont "steaming…" + + para "The FARFETCH'D" + line "that CUTS trees" + + para "for charcoal took" + line "off on me." + + para "I can't go looking" + line "for it here in the" + cont "ILEX FOREST." + + para "It's too big, dark" + line "and scary for me…" + done + +IlexForestApprenticeAfterText: + text "Wow! Thanks a" + line "whole bunch!" + + para "My boss's #MON" + line "won't obey me be-" + cont "cause I don't have" + cont "a BADGE." + done + +Text_ItsTheMissingPokemon: + text "It's the missing" + line "#MON!" + done + +Text_Kwaaaa: + text "FARFETCH'D: Kwaa!" + done + +Text_CharcoalMasterIntro: + text "Ah! My FARFETCH'D!" + + para "You found it for" + line "us, kid?" + + para "Without it, we" + line "wouldn't be able" + + para "to CUT trees for" + line "charcoal." + + para "Thanks, kid!" + + para "Now, how can I" + line "thank you…" + + para "I know! Here, take" + line "this." + done + +Text_CharcoalMasterOutro: + text "That's the CUT HM." + line "Teach that to a" + + para "#MON to clear" + line "small trees." + + para "Of course, you" + line "have to have the" + + para "GYM BADGE from" + line "AZALEA to use it." + done + +Text_CharcoalMasterTalkAfter: + text "Do you want to" + line "apprentice as a" + + para "charcoal maker" + line "with me?" + + para "You'll be first-" + line "rate in ten years!" + done + +Text_HeadbuttIntro: + text "What am I doing?" + + para "I'm shaking trees" + line "using HEADBUTT." + + para "It's fun. Here," + line "you try it too!" + done + +Text_HeadbuttOutro: + text "Rattle trees with" + line "HEADBUTT. Some-" + cont "times, sleeping" + cont "#MON fall out." + done + +Text_IlexForestLass: + text "Did something" + line "happen to the" + cont "forest's guardian?" + done + +IlexForestSignpostText: + text "ILEX FOREST is" + line "so overgrown with" + + para "trees that you" + line "can't see the sky." + + para "Please watch out" + line "for items that may" + cont "have been dropped." + done + +Text_IlexForestShrine: + text "ILEX FOREST" + line "SHRINE…" + + para "It's in honor of" + line "the forest's" + cont "protector…" + done + +Text_ShrineCelebiEvent: + text "ILEX FOREST" + line "SHRINE…" + + para "It's in honor of" + line "the forest's" + cont "protector…" + + para "Oh? What is this?" + + para "It's a hole." + line "It looks like the" + + para "GS BALL would fit" + line "inside it." + + para "Want to put the GS" + line "BALL here?" + done + +Text_InsertGSBall: + text " put in the" + line "GS BALL." + done + +Text_KurtCaughtCelebi: + text "Whew, wasn't that" + line "something!" + + para ", that was" + line "fantastic. Thanks!" + + para "The legends about" + line "that SHRINE were" + cont "real after all." + + para "I feel inspired by" + line "what I just saw." + + para "It motivates me to" + line "make better BALLS!" + + para "I'm going!" + done + +BugCatcherWayneSeenText: + text "Don't sneak up on" + line "me like that!" + + para "You frightened a" + line "#MON away!" + done + +BugCatcherWayneBeatenText: + text "I hadn't seen that" + line "#MON before…" + done + +BugCatcherWayneAfterBattleText: + text "A #MON I've" + line "never seen before" + + para "fell out of the" + line "tree when I used" + cont "HEADBUTT." + + para "I ought to use" + line "HEADBUTT in other" + cont "places too." + done + +IlexForest_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 1, 5, ROUTE_34_ILEX_FOREST_GATE, 3 + warp_event 3, 42, ILEX_FOREST_AZALEA_GATE, 1 + warp_event 3, 43, ILEX_FOREST_AZALEA_GATE, 2 + + def_coord_events + + def_bg_events + bg_event 3, 17, BGEVENT_READ, IlexForestSignpost + bg_event 11, 7, BGEVENT_ITEM, IlexForestHiddenEther + bg_event 22, 14, BGEVENT_ITEM, IlexForestHiddenSuperPotion + bg_event 1, 17, BGEVENT_ITEM, IlexForestHiddenFullHeal + bg_event 8, 22, BGEVENT_UP, IlexForestShrineScript + + def_object_events + object_event 14, 31, SPRITE_BIRD, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, IlexForestFarfetchdScript, EVENT_ILEX_FOREST_FARFETCHD + object_event 7, 28, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, IlexForestCharcoalApprenticeScript, EVENT_ILEX_FOREST_APPRENTICE + object_event 5, 28, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IlexForestCharcoalMasterScript, EVENT_ILEX_FOREST_CHARCOAL_MASTER + object_event 15, 14, SPRITE_ROCKER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IlexForestHeadbuttGuyScript, -1 + object_event 20, 32, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IlexForestRevive, EVENT_ILEX_FOREST_REVIVE + object_event 8, 29, SPRITE_KURT, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ILEX_FOREST_KURT + object_event 3, 24, SPRITE_LASS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, IlexForestLassScript, EVENT_ILEX_FOREST_LASS + object_event 12, 1, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 0, TrainerBugCatcherWayne, -1 + object_event 9, 17, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IlexForestXAttack, EVENT_ILEX_FOREST_X_ATTACK + object_event 17, 7, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IlexForestAntidote, EVENT_ILEX_FOREST_ANTIDOTE + object_event 27, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, IlexForestEther, EVENT_ILEX_FOREST_ETHER diff --git a/maps/IlexForest.blk b/maps/IlexForest.blk new file mode 100644 index 0000000..02dd097 --- /dev/null +++ b/maps/IlexForest.blk @@ -0,0 +1,3 @@ +  !"#$&'      +  +           !"#%&' \ No newline at end of file diff --git a/maps/IlexForestAzaleaGate.asm b/maps/IlexForestAzaleaGate.asm new file mode 100644 index 0000000..730eeee --- /dev/null +++ b/maps/IlexForestAzaleaGate.asm @@ -0,0 +1,46 @@ + object_const_def + const ILEXFORESTAZALEAGATE_OFFICER + const ILEXFORESTAZALEAGATE_GRANNY + +IlexForestAzaleaGate_MapScripts: + def_scene_scripts + + def_callbacks + +IlexForestAzaleaGateOfficerScript: + jumptextfaceplayer IlexForestAzaleaGateOfficerText + +IlexForestAzaleaGateGrannyScript: + jumptextfaceplayer IlexForestAzaleaGateGrannyText + +IlexForestAzaleaGateOfficerText: + text "ILEX FOREST is" + line "big. Be careful!" + cont "Don't get lost." + done + +IlexForestAzaleaGateGrannyText: + text "The FOREST is" + line "watched over by" + cont "its protector." + + para "Stay out of" + line "mischief!" + done + +IlexForestAzaleaGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 4, ILEX_FOREST, 2 + warp_event 0, 5, ILEX_FOREST, 3 + warp_event 9, 4, AZALEA_TOWN, 7 + warp_event 9, 5, AZALEA_TOWN, 8 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, IlexForestAzaleaGateOfficerScript, -1 + object_event 1, 3, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, IlexForestAzaleaGateGrannyScript, -1 diff --git a/maps/IndigoPlateauPokecenter1F.asm b/maps/IndigoPlateauPokecenter1F.asm new file mode 100644 index 0000000..7d83704 --- /dev/null +++ b/maps/IndigoPlateauPokecenter1F.asm @@ -0,0 +1,324 @@ + object_const_def + const INDIGOPLATEAUPOKECENTER1F_NURSE + const INDIGOPLATEAUPOKECENTER1F_CLERK + const INDIGOPLATEAUPOKECENTER1F_COOLTRAINER_M + const INDIGOPLATEAUPOKECENTER1F_RIVAL + const INDIGOPLATEAUPOKECENTER1F_GRAMPS + const INDIGOPLATEAUPOKECENTER1F_ABRA + +IndigoPlateauPokecenter1F_MapScripts: + def_scene_scripts + scene_script IndigoPlateauPokecenter1FNoopScene, SCENE_INDIGOPLATEAUPOKECENTER1F_RIVAL_BATTLE + + def_callbacks + callback MAPCALLBACK_NEWMAP, IndigoPlateauPokecenter1FPrepareElite4Callback + +IndigoPlateauPokecenter1FNoopScene: + end + +IndigoPlateauPokecenter1FPrepareElite4Callback: + setmapscene WILLS_ROOM, SCENE_WILLSROOM_LOCK_DOOR + setmapscene KOGAS_ROOM, SCENE_KOGASROOM_LOCK_DOOR + setmapscene BRUNOS_ROOM, SCENE_BRUNOSROOM_LOCK_DOOR + setmapscene KARENS_ROOM, SCENE_KARENSROOM_LOCK_DOOR + setmapscene LANCES_ROOM, SCENE_LANCESROOM_LOCK_DOOR + setmapscene HALL_OF_FAME, SCENE_HALLOFFAME_ENTER + clearevent EVENT_WILLS_ROOM_ENTRANCE_CLOSED + clearevent EVENT_WILLS_ROOM_EXIT_OPEN + clearevent EVENT_KOGAS_ROOM_ENTRANCE_CLOSED + clearevent EVENT_KOGAS_ROOM_EXIT_OPEN + clearevent EVENT_BRUNOS_ROOM_ENTRANCE_CLOSED + clearevent EVENT_BRUNOS_ROOM_EXIT_OPEN + clearevent EVENT_KARENS_ROOM_ENTRANCE_CLOSED + clearevent EVENT_KARENS_ROOM_EXIT_OPEN + clearevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED + clearevent EVENT_LANCES_ROOM_EXIT_OPEN + clearevent EVENT_BEAT_ELITE_4_WILL + clearevent EVENT_BEAT_ELITE_4_KOGA + clearevent EVENT_BEAT_ELITE_4_BRUNO + clearevent EVENT_BEAT_ELITE_4_KAREN + clearevent EVENT_BEAT_CHAMPION_LANCE + setevent EVENT_LANCES_ROOM_OAK_AND_MARY + endcallback + +PlateauRivalBattle1: + checkevent EVENT_BEAT_RIVAL_IN_MT_MOON + iffalse PlateauRivalScriptDone + checkflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT + iftrue PlateauRivalScriptDone + readvar VAR_WEEKDAY + ifequal SUNDAY, PlateauRivalScriptDone + ifequal TUESDAY, PlateauRivalScriptDone + ifequal THURSDAY, PlateauRivalScriptDone + ifequal FRIDAY, PlateauRivalScriptDone + ifequal SATURDAY, PlateauRivalScriptDone + moveobject INDIGOPLATEAUPOKECENTER1F_RIVAL, 17, 9 + appear INDIGOPLATEAUPOKECENTER1F_RIVAL + turnobject PLAYER, DOWN + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + pause 15 + applymovement INDIGOPLATEAUPOKECENTER1F_RIVAL, PlateauRivalMovement1 + playmusic MUSIC_RIVAL_ENCOUNTER + turnobject PLAYER, RIGHT + sjump PlateauRivalBattleCommon + +PlateauRivalBattle2: + checkevent EVENT_BEAT_RIVAL_IN_MT_MOON + iffalse PlateauRivalScriptDone + checkflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT + iftrue PlateauRivalScriptDone + readvar VAR_WEEKDAY + ifequal SUNDAY, PlateauRivalScriptDone + ifequal TUESDAY, PlateauRivalScriptDone + ifequal THURSDAY, PlateauRivalScriptDone + ifequal FRIDAY, PlateauRivalScriptDone + ifequal SATURDAY, PlateauRivalScriptDone + appear INDIGOPLATEAUPOKECENTER1F_RIVAL + turnobject PLAYER, DOWN + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + pause 15 + applymovement INDIGOPLATEAUPOKECENTER1F_RIVAL, PlateauRivalMovement2 + playmusic MUSIC_RIVAL_ENCOUNTER + turnobject PLAYER, LEFT +PlateauRivalBattleCommon: + opentext + writetext PlateauRivalText1 + waitbutton + closetext + setevent EVENT_INDIGO_PLATEAU_POKECENTER_RIVAL + checkevent EVENT_GOT_TOTODILE_FROM_ELM + iftrue .Totodile + checkevent EVENT_GOT_CHIKORITA_FROM_ELM + iftrue .Chikorita + ; Cyndaquil + winlosstext PlateauRivalWinText, PlateauRivalLoseText + setlasttalked INDIGOPLATEAUPOKECENTER1F_RIVAL + loadtrainer RIVAL2, RIVAL2_2_TOTODILE + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump PlateauRivalPostBattle + +.Totodile: + winlosstext PlateauRivalWinText, PlateauRivalLoseText + setlasttalked INDIGOPLATEAUPOKECENTER1F_RIVAL + loadtrainer RIVAL2, RIVAL2_2_CHIKORITA + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump PlateauRivalPostBattle + +.Chikorita: + winlosstext PlateauRivalWinText, PlateauRivalLoseText + setlasttalked INDIGOPLATEAUPOKECENTER1F_RIVAL + loadtrainer RIVAL2, RIVAL2_2_CYNDAQUIL + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump PlateauRivalPostBattle + +PlateauRivalPostBattle: + playmusic MUSIC_RIVAL_AFTER + opentext + writetext PlateauRivalText2 + waitbutton + closetext + turnobject PLAYER, DOWN + applymovement INDIGOPLATEAUPOKECENTER1F_RIVAL, PlateauRivalLeavesMovement + disappear INDIGOPLATEAUPOKECENTER1F_RIVAL + setscene SCENE_INDIGOPLATEAUPOKECENTER1F_RIVAL_BATTLE + playmapmusic + setflag ENGINE_INDIGO_PLATEAU_RIVAL_FIGHT +PlateauRivalScriptDone: + end + +IndigoPlateauPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +IndigoPlateauPokecenter1FClerkScript: + opentext + pokemart MARTTYPE_STANDARD, MART_INDIGO_PLATEAU + closetext + end + +IndigoPlateauPokecenter1FCooltrainerMScript: + jumptextfaceplayer IndigoPlateauPokecenter1FCooltrainerMText + +TeleportGuyScript: + faceplayer + opentext + writetext TeleportGuyText1 + yesorno + iffalse .No + writetext TeleportGuyYesText + waitbutton + closetext + playsound SFX_WARP_TO + special FadeOutPalettes + waitsfx + warp NEW_BARK_TOWN, 13, 6 + end + +.No: + writetext TeleportGuyNoText + waitbutton + closetext + end + +AbraScript: + opentext + writetext AbraText + cry ABRA + waitbutton + closetext + end + +PlateauRivalMovement1: + step UP + step UP + step UP + step UP + step UP + turn_head LEFT + step_end + +PlateauRivalMovement2: + step UP + step UP + step UP + step UP + step UP + turn_head RIGHT + step_end + +PlateauRivalLeavesMovement: + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +IndigoPlateauPokecenter1FCooltrainerMText: + text "At the #MON" + line "LEAGUE, you'll get" + + para "tested by the" + line "ELITE FOUR." + + para "You have to beat" + line "them all. If you" + + para "lose, you have to" + line "start all over!" + done + +PlateauRivalText1: + text "Hold it." + + para "You're going to" + line "take the #MON" + + para "LEAGUE challenge" + line "now?" + + para "That's not going" + line "to happen." + + para "My super-well-" + line "trained #MON" + + para "are going to pound" + line "you." + + para "!" + line "I challenge you!" + done + +PlateauRivalWinText: + text "…" + + para "OK--I lost…" + done + +PlateauRivalText2: + text "…Darn… I still" + line "can't win…" + + para "I… I have to think" + line "more about my" + cont "#MON…" + + para "Humph! Try not to" + line "lose!" + done + +PlateauRivalLoseText: + text "…" + + para "Whew…" + line "With my partners," + + para "I'm going to be" + line "the CHAMPION!" + done + +TeleportGuyText1: + text "Ah! You're chal-" + line "lenging the ELITE" + + para "FOUR? Are you sure" + line "you're ready?" + + para "If you need to" + line "train some more," + + para "my ABRA can help" + line "you." + + para "It can TELEPORT" + line "you home." + + para "Would you like to" + line "go home now?" + done + +TeleportGuyYesText: + text "OK, OK. Picture" + line "your house in your" + cont "mind…" + done + +TeleportGuyNoText: + text "OK, OK. The best" + line "of luck to you!" + done + +AbraText: + text "ABRA: Aabra…" + done + +IndigoPlateauPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 13, ROUTE_23, 1 + warp_event 6, 13, ROUTE_23, 2 + warp_event 0, 13, POKECENTER_2F, 1 + warp_event 14, 3, WILLS_ROOM, 1 + + def_coord_events + coord_event 16, 4, SCENE_INDIGOPLATEAUPOKECENTER1F_RIVAL_BATTLE, PlateauRivalBattle1 + coord_event 17, 4, SCENE_INDIGOPLATEAUPOKECENTER1F_RIVAL_BATTLE, PlateauRivalBattle2 + + def_bg_events + + def_object_events + object_event 3, 7, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IndigoPlateauPokecenter1FNurseScript, -1 + object_event 11, 7, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IndigoPlateauPokecenter1FClerkScript, -1 + object_event 11, 11, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, IndigoPlateauPokecenter1FCooltrainerMScript, -1 + object_event 16, 9, SPRITE_RIVAL, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_INDIGO_PLATEAU_POKECENTER_RIVAL + object_event 1, 9, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, TeleportGuyScript, EVENT_TELEPORT_GUY + object_event 0, 9, SPRITE_JYNX, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, AbraScript, EVENT_TELEPORT_GUY diff --git a/maps/IndigoPlateauPokecenter1F.blk b/maps/IndigoPlateauPokecenter1F.blk new file mode 100644 index 0000000..96c6a22 --- /dev/null +++ b/maps/IndigoPlateauPokecenter1F.blk @@ -0,0 +1 @@ +*, ' \ No newline at end of file diff --git a/maps/KarensRoom.asm b/maps/KarensRoom.asm new file mode 100644 index 0000000..beeb804 --- /dev/null +++ b/maps/KarensRoom.asm @@ -0,0 +1,147 @@ + object_const_def + const KARENSROOM_KAREN + +KarensRoom_MapScripts: + def_scene_scripts + scene_script KarensRoomLockDoorScene, SCENE_KARENSROOM_LOCK_DOOR + scene_script KarensRoomNoopScene, SCENE_KARENSROOM_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, KarensRoomDoorsCallback + +KarensRoomLockDoorScene: + sdefer KarensRoomDoorLocksBehindYouScript + end + +KarensRoomNoopScene: + end + +KarensRoomDoorsCallback: + checkevent EVENT_KARENS_ROOM_ENTRANCE_CLOSED + iffalse .KeepEntranceOpen + changeblock 4, 14, $2a ; wall +.KeepEntranceOpen: + checkevent EVENT_KARENS_ROOM_EXIT_OPEN + iffalse .KeepExitClosed + changeblock 4, 2, $16 ; open door +.KeepExitClosed: + endcallback + +KarensRoomDoorLocksBehindYouScript: + applymovement PLAYER, KarensRoom_EnterMovement + refreshscreen $86 + playsound SFX_STRENGTH + earthquake 80 + changeblock 4, 14, $2a ; wall + reloadmappart + closetext + setscene SCENE_KARENSROOM_NOOP + setevent EVENT_KARENS_ROOM_ENTRANCE_CLOSED + waitsfx + end + +KarenScript_Battle: + faceplayer + opentext + checkevent EVENT_BEAT_ELITE_4_KAREN + iftrue KarenScript_AfterBattle + writetext KarenScript_KarenBeforeText + waitbutton + closetext + winlosstext KarenScript_KarenBeatenText, 0 + loadtrainer KAREN, KAREN1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_ELITE_4_KAREN + opentext + writetext KarenScript_KarenDefeatText + waitbutton + closetext + playsound SFX_ENTER_DOOR + changeblock 4, 2, $16 ; open door + reloadmappart + closetext + setevent EVENT_KARENS_ROOM_EXIT_OPEN + waitsfx + end + +KarenScript_AfterBattle: + writetext KarenScript_KarenDefeatText + waitbutton + closetext + end + +KarensRoom_EnterMovement: + step UP + step UP + step UP + step UP + step_end + +KarenScript_KarenBeforeText: + text "I am KAREN of the" + line "ELITE FOUR." + + para "You're ?" + line "How amusing." + + para "I love dark-type" + line "#MON." + + para "I find their wild," + line "tough image to be" + + para "so appealing. And" + line "they're so strong." + + para "Think you can take" + line "them? Just try to" + cont "entertain me." + + para "Let's go." + done + +KarenScript_KarenBeatenText: + text "Well, aren't you" + line "good. I like that" + cont "in a trainer." + done + +KarenScript_KarenDefeatText: + text "Strong #MON." + + para "Weak #MON." + + para "That is only the" + line "selfish perception" + cont "of people." + + para "Truly skilled" + line "trainers should" + + para "try to win with" + line "their favorites." + + para "I like your style." + line "You understand" + cont "what's important." + + para "Go on--the CHAM-" + line "PION is waiting." + done + +KarensRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 17, BRUNOS_ROOM, 3 + warp_event 5, 17, BRUNOS_ROOM, 4 + warp_event 4, 2, LANCES_ROOM, 1 + warp_event 5, 2, LANCES_ROOM, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 7, SPRITE_KAREN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, KarenScript_Battle, -1 diff --git a/maps/KarensRoom.blk b/maps/KarensRoom.blk new file mode 100644 index 0000000..dca33f9 --- /dev/null +++ b/maps/KarensRoom.blk @@ -0,0 +1 @@ +"--------**-**-- \ No newline at end of file diff --git a/maps/KogasRoom.asm b/maps/KogasRoom.asm new file mode 100644 index 0000000..85c58d0 --- /dev/null +++ b/maps/KogasRoom.asm @@ -0,0 +1,144 @@ + object_const_def + const KOGASROOM_KOGA + +KogasRoom_MapScripts: + def_scene_scripts + scene_script KogasRoomLockDoorScene, SCENE_KOGASROOM_LOCK_DOOR + scene_script KogasRoomNoopScene, SCENE_KOGASROOM_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, KogasRoomDoorsCallback + +KogasRoomLockDoorScene: + sdefer KogasRoomDoorLocksBehindYouScript + end + +KogasRoomNoopScene: + end + +KogasRoomDoorsCallback: + checkevent EVENT_KOGAS_ROOM_ENTRANCE_CLOSED + iffalse .KeepEntranceOpen + changeblock 4, 14, $2a ; wall +.KeepEntranceOpen: + checkevent EVENT_KOGAS_ROOM_EXIT_OPEN + iffalse .KeepExitClosed + changeblock 4, 2, $16 ; open door +.KeepExitClosed: + endcallback + +KogasRoomDoorLocksBehindYouScript: + applymovement PLAYER, KogasRoom_EnterMovement + refreshscreen $86 + playsound SFX_STRENGTH + earthquake 80 + changeblock 4, 14, $2a ; wall + reloadmappart + closetext + setscene SCENE_KOGASROOM_NOOP + setevent EVENT_KOGAS_ROOM_ENTRANCE_CLOSED + waitsfx + end + +KogaScript_Battle: + faceplayer + opentext + checkevent EVENT_BEAT_ELITE_4_KOGA + iftrue KogaScript_AfterBattle + writetext KogaScript_KogaBeforeText + waitbutton + closetext + winlosstext KogaScript_KogaBeatenText, 0 + loadtrainer KOGA, KOGA1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_ELITE_4_KOGA + opentext + writetext KogaScript_KogaDefeatText + waitbutton + closetext + playsound SFX_ENTER_DOOR + changeblock 4, 2, $16 ; open door + reloadmappart + closetext + setevent EVENT_KOGAS_ROOM_EXIT_OPEN + waitsfx + end + +KogaScript_AfterBattle: + writetext KogaScript_KogaDefeatText + waitbutton + closetext + end + +KogasRoom_EnterMovement: + step UP + step UP + step UP + step UP + step_end + +KogaScript_KogaBeforeText: + text "Fwahahahaha!" + + para "I am KOGA of the" + line "ELITE FOUR." + + para "I live in shadows," + line "a ninja!" + + para "My intricate style" + line "will confound and" + cont "destroy you!" + + para "Confusion, sleep," + line "poison…" + + para "Prepare to be the" + line "victim of my sin-" + cont "ister technique!" + + para "Fwahahahaha!" + + para "#MON is not" + line "merely about brute" + + para "force--you shall" + line "see soon enough!" + done + +KogaScript_KogaBeatenText: + text "Ah!" + line "You have proven" + cont "your worth!" + done + +KogaScript_KogaDefeatText: + text "I subjected you to" + line "everything I could" + cont "muster." + + para "But my efforts" + line "failed. I must" + cont "hone my skills." + + para "Go on to the next" + line "room, and put your" + cont "abilities to test!" + done + +KogasRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 17, WILLS_ROOM, 2 + warp_event 5, 17, WILLS_ROOM, 3 + warp_event 4, 2, BRUNOS_ROOM, 1 + warp_event 5, 2, BRUNOS_ROOM, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 7, SPRITE_KOGA, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, KogaScript_Battle, -1 diff --git a/maps/KogasRoom.blk b/maps/KogasRoom.blk new file mode 100644 index 0000000..eb41834 --- /dev/null +++ b/maps/KogasRoom.blk @@ -0,0 +1 @@ +"4444!888!888!8!!8!**-**-- \ No newline at end of file diff --git a/maps/KurtsHouse.asm b/maps/KurtsHouse.asm new file mode 100644 index 0000000..5579a41 --- /dev/null +++ b/maps/KurtsHouse.asm @@ -0,0 +1,700 @@ + object_const_def + const KURTSHOUSE_KURT1 + const KURTSHOUSE_TWIN1 + const KURTSHOUSE_SLOWPOKE + const KURTSHOUSE_KURT2 + const KURTSHOUSE_TWIN2 + +KurtsHouse_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, KurtsHouseKurtCallback + +KurtsHouseKurtCallback: + checkevent EVENT_CLEARED_SLOWPOKE_WELL + iffalse .Done + checkevent EVENT_FOREST_IS_RESTLESS + iftrue .Done + checkflag ENGINE_KURT_MAKING_BALLS + iftrue .MakingBalls + disappear KURTSHOUSE_KURT2 + appear KURTSHOUSE_KURT1 + disappear KURTSHOUSE_TWIN2 + appear KURTSHOUSE_TWIN1 + endcallback + +.MakingBalls: + disappear KURTSHOUSE_KURT1 + appear KURTSHOUSE_KURT2 + disappear KURTSHOUSE_TWIN1 + appear KURTSHOUSE_TWIN2 +.Done: + endcallback + +Kurt1: + faceplayer + opentext + checkevent EVENT_KURT_GAVE_YOU_LURE_BALL + iftrue .GotLureBall + checkevent EVENT_CLEARED_SLOWPOKE_WELL + iftrue .ClearedSlowpokeWell + writetext KurtsHouseKurtMakingBallsMustWaitText + waitbutton + closetext + special FadeOutMusic + setevent EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET + readvar VAR_FACING + ifequal UP, .RunAround + turnobject PLAYER, DOWN + playsound SFX_FLY + applymovement KURTSHOUSE_KURT1, KurtsHouseKurtExitHouseMovement + playsound SFX_EXIT_BUILDING + disappear KURTSHOUSE_KURT1 + waitsfx + special RestartMapMusic + end + +.RunAround: + turnobject PLAYER, DOWN + playsound SFX_FLY + applymovement KURTSHOUSE_KURT1, KurtsHouseKurtGoAroundPlayerThenExitHouseMovement + playsound SFX_EXIT_BUILDING + disappear KURTSHOUSE_KURT1 + waitsfx + special RestartMapMusic + end + +.ClearedSlowpokeWell: + writetext KurtsHouseKurtHonoredToMakeBallsText + promptbutton + verbosegiveitem LURE_BALL + iffalse .NoRoomForBall + setevent EVENT_KURT_GAVE_YOU_LURE_BALL +.GotLureBall: + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue .WaitForApricorns + checkevent EVENT_GAVE_KURT_RED_APRICORN + iftrue .GiveLevelBall + checkevent EVENT_GAVE_KURT_BLU_APRICORN + iftrue .GiveLureBall + checkevent EVENT_GAVE_KURT_YLW_APRICORN + iftrue .GiveMoonBall + checkevent EVENT_GAVE_KURT_GRN_APRICORN + iftrue .GiveFriendBall + checkevent EVENT_GAVE_KURT_WHT_APRICORN + iftrue .GiveFastBall + checkevent EVENT_GAVE_KURT_BLK_APRICORN + iftrue .GiveHeavyBall + checkevent EVENT_GAVE_KURT_PNK_APRICORN + iftrue .GiveLoveBall + checkevent EVENT_CAN_GIVE_GS_BALL_TO_KURT + iftrue .CanGiveGSBallToKurt +.NoGSBall: + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + iftrue .CheckApricorns + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + iftrue .CheckApricorns + writetext KurtsHouseKurtBallsFromApricornsText + waitbutton +.CheckApricorns: + checkitem RED_APRICORN + iftrue .AskApricorn + checkitem BLU_APRICORN + iftrue .AskApricorn + checkitem YLW_APRICORN + iftrue .AskApricorn + checkitem GRN_APRICORN + iftrue .AskApricorn + checkitem WHT_APRICORN + iftrue .AskApricorn + checkitem BLK_APRICORN + iftrue .AskApricorn + checkitem PNK_APRICORN + iftrue .AskApricorn + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + iftrue .ThatTurnedOutGreat + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + iftrue .IMakeBallsFromApricorns + closetext + end + +.IMakeBallsFromApricorns: + writetext KurtsHouseKurtBallsFromApricornsText + waitbutton + closetext + end + +.AskApricorn: + writetext KurtsHouseKurtAskYouHaveAnApricornText + promptbutton + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_3 + special SelectApricornForKurt + ifequal FALSE, .Cancel + ifequal BLU_APRICORN, .Blu + ifequal YLW_APRICORN, .Ylw + ifequal GRN_APRICORN, .Grn + ifequal WHT_APRICORN, .Wht + ifequal BLK_APRICORN, .Blk + ifequal PNK_APRICORN, .Pnk +; .Red + setevent EVENT_GAVE_KURT_RED_APRICORN + sjump .GaveKurtApricorns + +.Blu: + setevent EVENT_GAVE_KURT_BLU_APRICORN + sjump .GaveKurtApricorns + +.Ylw: + setevent EVENT_GAVE_KURT_YLW_APRICORN + sjump .GaveKurtApricorns + +.Grn: + setevent EVENT_GAVE_KURT_GRN_APRICORN + sjump .GaveKurtApricorns + +.Wht: + setevent EVENT_GAVE_KURT_WHT_APRICORN + sjump .GaveKurtApricorns + +.Blk: + setevent EVENT_GAVE_KURT_BLK_APRICORN + sjump .GaveKurtApricorns + +.Pnk: + setevent EVENT_GAVE_KURT_PNK_APRICORN + sjump .GaveKurtApricorns + +.GaveKurtApricorns: + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + setflag ENGINE_KURT_MAKING_BALLS +.WaitForApricorns: + writetext KurtsHouseKurtItWillTakeADayText + waitbutton + closetext + end + +.Cancel: + writetext KurtsHouseKurtThatsALetdownText + waitbutton + closetext + end + +._ThatTurnedOutGreat: + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 +.ThatTurnedOutGreat: + writetext KurtsHouseKurtTurnedOutGreatText + waitbutton +.NoRoomForBall: + closetext + end + +.GiveLevelBall: + checkflag ENGINE_KURT_MAKING_BALLS + iftrue KurtMakingBallsScript + writetext KurtsHouseKurtJustFinishedYourBallText + promptbutton + verbosegiveitemvar LEVEL_BALL, VAR_KURT_APRICORNS + iffalse .NoRoomForBall + clearevent EVENT_GAVE_KURT_RED_APRICORN + sjump ._ThatTurnedOutGreat + +.GiveLureBall: + checkflag ENGINE_KURT_MAKING_BALLS + iftrue KurtMakingBallsScript + writetext KurtsHouseKurtJustFinishedYourBallText + promptbutton + verbosegiveitemvar LURE_BALL, VAR_KURT_APRICORNS + iffalse .NoRoomForBall + clearevent EVENT_GAVE_KURT_BLU_APRICORN + sjump ._ThatTurnedOutGreat + +.GiveMoonBall: + checkflag ENGINE_KURT_MAKING_BALLS + iftrue KurtMakingBallsScript + writetext KurtsHouseKurtJustFinishedYourBallText + promptbutton + verbosegiveitemvar MOON_BALL, VAR_KURT_APRICORNS + iffalse .NoRoomForBall + clearevent EVENT_GAVE_KURT_YLW_APRICORN + sjump ._ThatTurnedOutGreat + +.GiveFriendBall: + checkflag ENGINE_KURT_MAKING_BALLS + iftrue KurtMakingBallsScript + writetext KurtsHouseKurtJustFinishedYourBallText + promptbutton + verbosegiveitemvar FRIEND_BALL, VAR_KURT_APRICORNS + iffalse .NoRoomForBall + clearevent EVENT_GAVE_KURT_GRN_APRICORN + sjump ._ThatTurnedOutGreat + +.GiveFastBall: + checkflag ENGINE_KURT_MAKING_BALLS + iftrue KurtMakingBallsScript + writetext KurtsHouseKurtJustFinishedYourBallText + promptbutton + verbosegiveitemvar FAST_BALL, VAR_KURT_APRICORNS + iffalse .NoRoomForBall + clearevent EVENT_GAVE_KURT_WHT_APRICORN + sjump ._ThatTurnedOutGreat + +.GiveHeavyBall: + checkflag ENGINE_KURT_MAKING_BALLS + iftrue KurtMakingBallsScript + writetext KurtsHouseKurtJustFinishedYourBallText + promptbutton + verbosegiveitemvar HEAVY_BALL, VAR_KURT_APRICORNS + iffalse .NoRoomForBall + clearevent EVENT_GAVE_KURT_BLK_APRICORN + sjump ._ThatTurnedOutGreat + +.GiveLoveBall: + checkflag ENGINE_KURT_MAKING_BALLS + iftrue KurtMakingBallsScript + writetext KurtsHouseKurtJustFinishedYourBallText + promptbutton + verbosegiveitemvar LOVE_BALL, VAR_KURT_APRICORNS + iffalse .NoRoomForBall + clearevent EVENT_GAVE_KURT_PNK_APRICORN + sjump ._ThatTurnedOutGreat + +.CanGiveGSBallToKurt: + checkevent EVENT_GAVE_GS_BALL_TO_KURT + iftrue .GaveGSBallToKurt + checkitem GS_BALL + iffalse .NoGSBall + writetext KurtsHouseKurtWhatIsThatText + waitbutton + closetext + setevent EVENT_GAVE_GS_BALL_TO_KURT + takeitem GS_BALL + setflag ENGINE_KURT_MAKING_BALLS + end + +.GaveGSBallToKurt: + checkflag ENGINE_KURT_MAKING_BALLS + iffalse .NotMakingBalls + writetext KurtsHouseKurtImCheckingItNowText + waitbutton + writetext KurtsHouseKurtAhHaISeeText + waitbutton + closetext + end + +.NotMakingBalls: + writetext KurtsHouseKurtThisBallStartedToShakeText + waitbutton + closetext + setevent EVENT_FOREST_IS_RESTLESS + clearevent EVENT_CAN_GIVE_GS_BALL_TO_KURT + clearevent EVENT_GAVE_GS_BALL_TO_KURT + special FadeOutMusic + pause 20 + showemote EMOTE_SHOCK, KURTSHOUSE_KURT1, 30 + readvar VAR_FACING + ifequal UP, .GSBallRunAround + turnobject PLAYER, DOWN + playsound SFX_FLY + applymovement KURTSHOUSE_KURT1, KurtsHouseKurtExitHouseMovement + sjump .KurtHasLeftTheBuilding + +.GSBallRunAround: + turnobject PLAYER, DOWN + playsound SFX_FLY + applymovement KURTSHOUSE_KURT1, KurtsHouseKurtGoAroundPlayerThenExitHouseMovement +.KurtHasLeftTheBuilding: + playsound SFX_EXIT_BUILDING + disappear KURTSHOUSE_KURT1 + clearevent EVENT_AZALEA_TOWN_KURT + waitsfx + special RestartMapMusic + setmapscene AZALEA_TOWN, SCENE_AZALEATOWN_KURT_RETURNS_GS_BALL + end + +Kurt2: + faceplayer + opentext + checkevent EVENT_GAVE_GS_BALL_TO_KURT + iftrue KurtScript_ImCheckingItNow +KurtMakingBallsScript: + checkevent EVENT_BUGGING_KURT_TOO_MUCH + iffalse Script_FirstTimeBuggingKurt + writetext KurtsHouseKurtDontBotherMeText + waitbutton + closetext + turnobject KURTSHOUSE_KURT2, UP + end + +Script_FirstTimeBuggingKurt: + writetext KurtsHouseKurtGranddaughterHelpingWorkFasterText + waitbutton + closetext + turnobject KURTSHOUSE_KURT2, UP + setevent EVENT_BUGGING_KURT_TOO_MUCH + end + +KurtScript_ImCheckingItNow: + writetext KurtsHouseKurtImCheckingItNowText + waitbutton + turnobject KURTSHOUSE_KURT2, UP + writetext KurtsHouseKurtAhHaISeeText + waitbutton + closetext + end + +KurtsGranddaughter1: + faceplayer + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue KurtsGranddaughter2Subscript + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + iftrue KurtsGranddaughterFunScript + checkevent EVENT_FOREST_IS_RESTLESS + iftrue .Lonely + checkevent EVENT_FAST_SHIP_FIRST_TIME + iftrue .Dad + checkevent EVENT_CLEARED_SLOWPOKE_WELL + iftrue .SlowpokeBack + checkevent EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET + iftrue .Lonely + opentext + writetext KurtsGranddaughterSlowpokeGoneText + waitbutton + closetext + end + +.SlowpokeBack: + opentext + writetext KurtsGranddaughterSlowpokeBackText + waitbutton + closetext + end + +.Lonely: + opentext + writetext KurtsGranddaughterLonelyText + waitbutton + closetext + end + +.Dad: + opentext + writetext KurtsGranddaughterDadText + waitbutton + closetext + end + +KurtsGranddaughter2: + faceplayer +KurtsGranddaughter2Subscript: + opentext + checkevent EVENT_GAVE_GS_BALL_TO_KURT + iftrue .GSBall + writetext KurtsGranddaughterHelpText + waitbutton + closetext + turnobject KURTSHOUSE_TWIN2, RIGHT + end + +.GSBall: + writetext KurtsGranddaughterGSBallText + waitbutton + closetext + turnobject KURTSHOUSE_TWIN2, RIGHT + end + +KurtsGranddaughterFunScript: + opentext + writetext KurtsGranddaughterFunText + waitbutton + closetext + end + +KurtsHouseSlowpoke: + faceplayer + opentext + writetext KurtsHouseSlowpokeText + cry SLOWPOKE + waitbutton + closetext + end + +KurtsHouseOakPhoto: + jumptext KurtsHouseOakPhotoText + +KurtsHouseCelebiStatue: + jumptext KurtsHouseCelebiStatueText + +KurtsHouseBookshelf: + jumpstd DifficultBookshelfScript + +KurtsHouseRadio: + jumpstd Radio2Script + +KurtsHouseKurtExitHouseMovement: + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + step_end + +KurtsHouseKurtGoAroundPlayerThenExitHouseMovement: + big_step RIGHT + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + big_step DOWN + step_end + +KurtsHouseKurtMakingBallsMustWaitText: + text "Hm? Who are you?" + + para ", eh? You" + line "want me to make" + cont "some BALLS?" + + para "Sorry, but that'll" + line "have to wait." + + para "Do you know TEAM" + line "ROCKET? Ah, don't" + + para "worry. I'll tell" + line "you anyhow." + + para "TEAM ROCKET's an" + line "evil gang that" + + para "uses #MON for" + line "their dirty work." + + para "They're supposed" + line "to have disbanded" + cont "three years ago." + + para "Anyway, they're at" + line "the WELL, cutting" + + para "off SLOWPOKETAILS" + line "for sale!" + + para "So I'm going to" + line "go give them a" + cont "lesson in pain!" + + para "Hang on, SLOWPOKE!" + line "Old KURT is on his" + cont "way!" + done + +KurtsHouseKurtHonoredToMakeBallsText: + text "KURT: Hi, !" + + para "You handled your-" + line "self like a real" + cont "hero at the WELL." + + para "I like your style!" + + para "I would be honored" + line "to make BALLS for" + + para "a trainer like" + line "you." + + para "This is all I have" + line "now, but take it." + done + +KurtsHouseKurtBallsFromApricornsText: + text "KURT: I make BALLS" + line "from APRICORNS." + + para "Collect them from" + line "trees and bring" + cont "'em to me." + + para "I'll make BALLS" + line "out of them." + done + +KurtsHouseKurtAskYouHaveAnApricornText: + text "KURT: You have an" + line "APRICORN for me?" + + para "Fine! I'll turn it" + line "into a BALL." + done + +KurtsHouseKurtItWillTakeADayText: + text "KURT: It'll take a" + line "day to make you a" + + para "BALL. Come back" + line "for it later." + done + +KurtsHouseKurtThatsALetdownText: + text "KURT: Oh…" + line "That's a letdown." + done + +KurtsHouseKurtDontBotherMeText: + text "KURT: I'm working!" + line "Don't bother me!" + done + +KurtsHouseKurtJustFinishedYourBallText: + text "KURT: Ah, !" + line "I just finished" + cont "your BALL. Here!" + done + +KurtsHouseKurtTurnedOutGreatText: + text "KURT: That turned" + line "out great." + + para "Try catching" + line "#MON with it." + done + +KurtsHouseKurtGranddaughterHelpingWorkFasterText: + text "KURT: Now that my" + line "granddaughter is" + + para "helping me, I can" + line "work much faster." + done + +KurtsHouseKurtWhatIsThatText: + text "Wh-what is that?" + + para "I've never seen" + line "one before." + + para "It looks a lot" + line "like a # BALL," + + para "but it appears to" + line "be something else." + + para "Let me check it" + line "for you." + done + +KurtsHouseKurtImCheckingItNowText: + text "I'm checking it" + line "now." + done + +KurtsHouseKurtAhHaISeeText: + text "Ah-ha! I see!" + line "So…" + done + +KurtsHouseKurtThisBallStartedToShakeText: + text "!" + + para "This BALL started" + line "to shake while I" + cont "was checking it." + + para "There must be" + line "something to this!" + done + +KurtsGranddaughterSlowpokeGoneText: + text "The SLOWPOKE are" + line "gone… Were they" + + para "taken away by bad" + line "people?" + done + +KurtsGranddaughterLonelyText: + text "Grandpa's gone…" + line "I'm so lonely…" + done + +KurtsGranddaughterSlowpokeBackText: + text "The SLOWPOKE my" + line "dad gave me came" + + para "back! Its TAIL is" + line "growing back too!" + done + +KurtsGranddaughterDadText: + text "Dad works at SILPH" + line "where he studies" + cont "# BALLS." + + para "I have to stay" + line "home with Grandpa" + cont "and SLOWPOKE." + done + +KurtsGranddaughterHelpText: + text "I get to help" + line "Grandpa now!" + + para "We'll make good" + line "BALLS for you, so" + cont "please wait!" + done + +KurtsGranddaughterFunText: + text "It's fun to make" + line "BALLS!" + done + +KurtsGranddaughterGSBallText: + text "Grandpa's checking" + line "a BALL right now." + + para "So I'm waiting" + line "till he's done." + done + +KurtsHouseSlowpokeText: + text "SLOWPOKE: …" + line "Yawn?" + done + +KurtsHouseOakPhotoText: + text "…A young PROF." + line "OAK?" + done + +KurtsHouseCelebiStatueText: + text "It's a statue of" + line "the forest's pro-" + cont "tector." + done + +KurtsHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, AZALEA_TOWN, 4 + warp_event 4, 7, AZALEA_TOWN, 4 + + def_coord_events + + def_bg_events + bg_event 6, 1, BGEVENT_READ, KurtsHouseRadio + bg_event 8, 0, BGEVENT_READ, KurtsHouseOakPhoto + bg_event 9, 0, BGEVENT_READ, KurtsHouseOakPhoto + bg_event 5, 1, BGEVENT_READ, KurtsHouseBookshelf + bg_event 2, 1, BGEVENT_READ, KurtsHouseBookshelf + bg_event 3, 1, BGEVENT_READ, KurtsHouseBookshelf + bg_event 4, 1, BGEVENT_READ, KurtsHouseCelebiStatue + + def_object_events + object_event 3, 2, SPRITE_KURT, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Kurt1, EVENT_KURTS_HOUSE_KURT_1 + object_event 5, 3, SPRITE_TWIN, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, KurtsGranddaughter1, EVENT_KURTS_HOUSE_GRANDDAUGHTER_1 + object_event 6, 3, SPRITE_SLOWPOKE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, KurtsHouseSlowpoke, EVENT_KURTS_HOUSE_SLOWPOKE + object_event 14, 3, SPRITE_KURT, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Kurt2, EVENT_KURTS_HOUSE_KURT_2 + object_event 11, 4, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, KurtsGranddaughter2, EVENT_KURTS_HOUSE_GRANDDAUGHTER_2 diff --git a/maps/KurtsHouse.blk b/maps/KurtsHouse.blk new file mode 100644 index 0000000..4e9d506 --- /dev/null +++ b/maps/KurtsHouse.blk @@ -0,0 +1 @@ +#)12 356* \ No newline at end of file diff --git a/maps/LakeOfRage.asm b/maps/LakeOfRage.asm new file mode 100644 index 0000000..51a7b9d --- /dev/null +++ b/maps/LakeOfRage.asm @@ -0,0 +1,522 @@ + object_const_def + const LAKEOFRAGE_LANCE + const LAKEOFRAGE_GRAMPS + const LAKEOFRAGE_SUPER_NERD1 + const LAKEOFRAGE_COOLTRAINER_F1 + const LAKEOFRAGE_FISHER1 + const LAKEOFRAGE_FISHER2 + const LAKEOFRAGE_COOLTRAINER_M + const LAKEOFRAGE_COOLTRAINER_F2 + const LAKEOFRAGE_GYARADOS + const LAKEOFRAGE_WESLEY + const LAKEOFRAGE_POKE_BALL1 + const LAKEOFRAGE_POKE_BALL2 + +LakeOfRage_MapScripts: + def_scene_scripts + scene_script LakeOfRageNoop1Scene ; unusable + scene_script LakeOfRageNoop2Scene ; unusable + + def_callbacks + callback MAPCALLBACK_NEWMAP, LakeOfRageFlypointCallback + callback MAPCALLBACK_OBJECTS, LakeOfRageWesleyCallback + +LakeOfRageNoop1Scene: + end + +LakeOfRageNoop2Scene: + end + +LakeOfRageFlypointCallback: + setflag ENGINE_FLYPOINT_LAKE_OF_RAGE + endcallback + +LakeOfRageWesleyCallback: + readvar VAR_WEEKDAY + ifequal WEDNESDAY, .WesleyAppears + disappear LAKEOFRAGE_WESLEY + endcallback + +.WesleyAppears: + appear LAKEOFRAGE_WESLEY + endcallback + +LakeOfRageLanceScript: + checkevent EVENT_REFUSED_TO_HELP_LANCE_AT_LAKE_OF_RAGE + iftrue .AskAgainForHelp + opentext + writetext LakeOfRageLanceForcedToEvolveText + promptbutton + faceplayer + writetext LakeOfRageLanceIntroText + yesorno + iffalse .RefusedToHelp +.AgreedToHelp: + writetext LakeOfRageLanceRadioSignalText + waitbutton + closetext + playsound SFX_WARP_TO + applymovement LAKEOFRAGE_LANCE, LakeOfRageLanceTeleportIntoSkyMovement + disappear LAKEOFRAGE_LANCE + clearevent EVENT_MAHOGANY_MART_LANCE_AND_DRAGONITE + setevent EVENT_DECIDED_TO_HELP_LANCE + setmapscene MAHOGANY_MART_1F, SCENE_MAHOGANYMART1F_LANCE_UNCOVERS_STAIRS + end + +.RefusedToHelp: + writetext LakeOfRageLanceRefusedText + waitbutton + closetext + setevent EVENT_REFUSED_TO_HELP_LANCE_AT_LAKE_OF_RAGE + end + +.AskAgainForHelp: + faceplayer + opentext + writetext LakeOfRageLanceAskHelpText + yesorno + iffalse .RefusedToHelp + sjump .AgreedToHelp + +RedGyarados: + opentext + writetext LakeOfRageGyaradosCryText + pause 15 + cry GYARADOS + closetext + loadwildmon GYARADOS, 30 + loadvar VAR_BATTLETYPE, BATTLETYPE_SHINY + startbattle + ifequal LOSE, .NotBeaten + disappear LAKEOFRAGE_GYARADOS +.NotBeaten: + reloadmapafterbattle + opentext + giveitem RED_SCALE + waitsfx + writetext LakeOfRageGotRedScaleText + playsound SFX_ITEM + waitsfx + itemnotify + closetext + setscene 0 ; Lake of Rage does not have a scene variable + appear LAKEOFRAGE_LANCE + end + +LakeOfRageGrampsScript: + faceplayer + opentext + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .ClearedRocketHideout + writetext LakeOfRageGrampsText + waitbutton + closetext + end + +.ClearedRocketHideout: + writetext LakeOfRageGrampsText_ClearedRocketHideout + waitbutton + closetext + end + +LakeOfRageSuperNerdScript: + jumptextfaceplayer LakeOfRageSuperNerdText + +LakeOfRageCooltrainerFScript: + jumptextfaceplayer LakeOfRageCooltrainerFText + +LakeOfRageSign: + jumptext LakeOfRageSignText + +MagikarpHouseSignScript: + opentext + writetext FishingGurusHouseSignText + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .MagikarpLengthRecord + waitbutton + closetext + end + +.MagikarpLengthRecord: + promptbutton + special MagikarpHouseSign + closetext + end + +TrainerFisherAndre: + trainer FISHER, ANDRE, EVENT_BEAT_FISHER_ANDRE, FisherAndreSeenText, FisherAndreBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherAndreAfterBattleText + waitbutton + closetext + end + +TrainerFisherRaymond: + trainer FISHER, RAYMOND, EVENT_BEAT_FISHER_RAYMOND, FisherRaymondSeenText, FisherRaymondBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherRaymondAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainermAaron: + trainer COOLTRAINERM, AARON, EVENT_BEAT_COOLTRAINERM_AARON, CooltrainermAaronSeenText, CooltrainermAaronBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainermAaronAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainerfLois: + trainer COOLTRAINERF, LOIS, EVENT_BEAT_COOLTRAINERF_LOIS, CooltrainerfLoisSeenText, CooltrainerfLoisBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainerfLoisAfterBattleText + waitbutton + closetext + end + +WesleyScript: + faceplayer + opentext + checkevent EVENT_GOT_BLACKBELT_FROM_WESLEY + iftrue WesleyWednesdayScript + readvar VAR_WEEKDAY + ifnotequal WEDNESDAY, WesleyNotWednesdayScript + checkevent EVENT_MET_WESLEY_OF_WEDNESDAY + iftrue .MetWesley + writetext MeetWesleyText + promptbutton + setevent EVENT_MET_WESLEY_OF_WEDNESDAY +.MetWesley: + writetext WesleyGivesGiftText + promptbutton + verbosegiveitem BLACKBELT_I + iffalse WesleyDoneScript + setevent EVENT_GOT_BLACKBELT_FROM_WESLEY + writetext WesleyGaveGiftText + waitbutton + closetext + end + +WesleyWednesdayScript: + writetext WesleyWednesdayText + waitbutton +WesleyDoneScript: + closetext + end + +WesleyNotWednesdayScript: + writetext WesleyNotWednesdayText + waitbutton + closetext + end + +LakeOfRageElixer: + itemball ELIXER + +LakeOfRageTMDetect: + itemball TM_DETECT + +LakeOfRageHiddenFullRestore: + hiddenitem FULL_RESTORE, EVENT_LAKE_OF_RAGE_HIDDEN_FULL_RESTORE + +LakeOfRageHiddenRareCandy: + hiddenitem RARE_CANDY, EVENT_LAKE_OF_RAGE_HIDDEN_RARE_CANDY + +LakeOfRageHiddenMaxPotion: + hiddenitem MAX_POTION, EVENT_LAKE_OF_RAGE_HIDDEN_MAX_POTION + +LakeOfRageLanceTeleportIntoSkyMovement: + teleport_from + step_end + +LakeOfRageLanceForcedToEvolveText: + text "This lake is full" + line "of GYARADOS but" + cont "nothing else…" + + para "So the MAGIKARP" + line "are being forced" + cont "to evolve…" + done + +LakeOfRageLanceIntroText: + text "Did you come here" + line "because of the" + cont "rumors?" + + para "You're ?" + line "I'm LANCE, a" + cont "trainer like you." + + para "I heard some ru-" + line "mors, so I came to" + cont "investigate…" + + para "I saw the way you" + line "battled earlier," + cont "." + + para "I can tell that" + line "you're a trainer" + + para "with considerable" + line "skill." + + para "If you don't mind," + line "could you help me" + cont "investigate?" + done + +LakeOfRageLanceRadioSignalText: + text "LANCE: Excellent!" + + para "It seems that the" + line "LAKE's MAGIKARP" + + para "are being forced" + line "to evolve." + + para "A mysterious radio" + line "broadcast coming" + + para "from MAHOGANY is" + line "the cause." + + para "I'll be waiting" + line "for you, ." + done + +LakeOfRageLanceRefusedText: + text "Oh… Well, if you" + line "change your mind," + cont "please help me." + done + +LakeOfRageLanceAskHelpText: + text "LANCE: Hm? Are you" + line "going to help me?" + done + +LakeOfRageGyaradosCryText: + text "GYARADOS: Gyashaa!" + done + +LakeOfRageGotRedScaleText: + text " obtained a" + line "RED SCALE." + done + +LakeOfRageGrampsText: + text "The GYARADOS are" + line "angry!" + + para "It's a bad omen!" + done + +LakeOfRageGrampsText_ClearedRocketHideout: + text "Hahah! The MAGI-" + line "KARP are biting!" + done + +LakeOfRageSuperNerdText: + text "I heard this lake" + line "was made by ram-" + cont "paging GYARADOS." + + para "I wonder if there" + line "is any connection" + + para "to their mass out-" + line "break now?" + done + +LakeOfRageCooltrainerFText: + text "Did my eyes de-" + line "ceive me? I saw a" + + para "red GYARADOS in" + line "the LAKE…" + + para "But I thought" + line "GYARADOS were" + cont "usually blue?" + done + +FisherAndreSeenText: + text "Let me battle with" + line "the #MON I just" + cont "caught!" + done + +FisherAndreBeatenText: + text "I might be an ex-" + line "pert angler, but" + + para "I stink as a #-" + line "MON trainer…" + done + +FisherAndreAfterBattleText: + text "I won't lose as an" + line "angler! I catch" + cont "#MON all day." + done + +FisherRaymondSeenText: + text "No matter what I" + line "do, all I catch" + + para "are the same #-" + line "MON…" + done + +FisherRaymondBeatenText: + text "My line's all" + line "tangled up…" + done + +FisherRaymondAfterBattleText: + text "Why can't I catch" + line "any good #MON?" + done + +CooltrainermAaronSeenText: + text "If a trainer spots" + line "another trainer," + + para "he has to make a" + line "challenge." + + para "That is our" + line "destiny." + done + +CooltrainermAaronBeatenText: + text "Whew…" + line "Good battle." + done + +CooltrainermAaronAfterBattleText: + text "#MON and their" + line "trainer become" + + para "powerful through" + line "constant battling." + done + +CooltrainerfLoisSeenText: + text "What happened to" + line "the red GYARADOS?" + + para "It's gone?" + + para "Oh, darn. I came" + line "here for nothing?" + + para "I know--let's" + line "battle!" + done + +CooltrainerfLoisBeatenText: + text "Good going!" + done + +CooltrainerfLoisAfterBattleText: + text "Come to think of" + line "it, I've seen a" + cont "pink BUTTERFREE." + done + +MeetWesleyText: + text "WESLEY: Well, how" + line "do you do?" + + para "Seeing as how it's" + line "Wednesday today," + + para "I'm WESLEY of" + line "Wednesday." + done + +WesleyGivesGiftText: + text "Pleased to meet" + line "you. Please take a" + cont "souvenir." + done + +WesleyGaveGiftText: + text "WESLEY: BLACKBELT" + line "beefs up the power" + cont "of fighting moves." + done + +WesleyWednesdayText: + text "WESLEY: Since you" + line "found me, you must" + + para "have met my broth-" + line "ers and sisters." + + para "Or did you just" + line "get lucky?" + done + +WesleyNotWednesdayText: + text "WESLEY: Today's" + line "not Wednesday." + cont "That's too bad." + done + +LakeOfRageSignText: + text "LAKE OF RAGE," + line "also known as" + cont "GYARADOS LAKE." + done + +FishingGurusHouseSignText: + text "FISHING GURU'S" + line "HOUSE" + done + +LakeOfRage_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 3, LAKE_OF_RAGE_HIDDEN_POWER_HOUSE, 1 + warp_event 27, 31, LAKE_OF_RAGE_MAGIKARP_HOUSE, 1 + + def_coord_events + + def_bg_events + bg_event 21, 27, BGEVENT_READ, LakeOfRageSign + bg_event 25, 31, BGEVENT_READ, MagikarpHouseSignScript + bg_event 11, 28, BGEVENT_ITEM, LakeOfRageHiddenFullRestore + bg_event 4, 4, BGEVENT_ITEM, LakeOfRageHiddenRareCandy + bg_event 35, 5, BGEVENT_ITEM, LakeOfRageHiddenMaxPotion + + def_object_events + object_event 21, 28, SPRITE_LANCE, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LakeOfRageLanceScript, EVENT_LAKE_OF_RAGE_LANCE + object_event 20, 26, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LakeOfRageGrampsScript, -1 + object_event 36, 13, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LakeOfRageSuperNerdScript, -1 + object_event 25, 29, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LakeOfRageCooltrainerFScript, -1 + object_event 30, 23, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerFisherAndre, EVENT_LAKE_OF_RAGE_CIVILIANS + object_event 24, 26, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerFisherRaymond, EVENT_LAKE_OF_RAGE_CIVILIANS + object_event 4, 15, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerCooltrainermAaron, EVENT_LAKE_OF_RAGE_CIVILIANS + object_event 36, 7, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, TrainerCooltrainerfLois, EVENT_LAKE_OF_RAGE_CIVILIANS + object_event 18, 22, SPRITE_GYARADOS, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, RedGyarados, EVENT_LAKE_OF_RAGE_RED_GYARADOS + object_event 4, 4, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, WesleyScript, EVENT_LAKE_OF_RAGE_WESLEY_OF_WEDNESDAY + object_event 7, 10, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, LakeOfRageElixer, EVENT_LAKE_OF_RAGE_ELIXER + object_event 35, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, LakeOfRageTMDetect, EVENT_LAKE_OF_RAGE_TM_DETECT diff --git a/maps/LakeOfRage.blk b/maps/LakeOfRage.blk new file mode 100644 index 0000000..3b26d4f --- /dev/null +++ b/maps/LakeOfRage.blk @@ -0,0 +1 @@ +,-aaaaaaa./aaa]]a\]f\]aa[]aaTvvy555Y<[]]]X5555555YbeeX55555Ya?jpp=aX5YGfhqqeWKee`ehqqaKWa`Gjqqqe=]hqqqdlrqq \ No newline at end of file diff --git a/maps/LakeOfRageHiddenPowerHouse.asm b/maps/LakeOfRageHiddenPowerHouse.asm new file mode 100644 index 0000000..65d3d9f --- /dev/null +++ b/maps/LakeOfRageHiddenPowerHouse.asm @@ -0,0 +1,82 @@ + object_const_def + const LAKEOFRAGEHIDDENPOWERHOUSE_FISHER + +LakeOfRageHiddenPowerHouse_MapScripts: + def_scene_scripts + + def_callbacks + +HiddenPowerGuy: + faceplayer + opentext + checkevent EVENT_GOT_TM10_HIDDEN_POWER + iftrue .AlreadyGotItem + writetext HiddenPowerGuyText1 + promptbutton + verbosegiveitem TM_HIDDEN_POWER + iffalse .Done + setevent EVENT_GOT_TM10_HIDDEN_POWER + writetext HiddenPowerGuyText2 + waitbutton + closetext + end +.AlreadyGotItem: + writetext HiddenPowerGuyText3 + waitbutton +.Done: + closetext + end + +HiddenPowerHouseBookshelf: + jumpstd DifficultBookshelfScript + +HiddenPowerGuyText1: + text "…You have strayed" + line "far…" + + para "Here I have medi-" + line "tated. Inside me," + + para "a new power has" + line "been awakened." + + para "Let me share my" + line "power with your" + + para "#MON." + line "Take this, child." + done + +HiddenPowerGuyText2: + text "Do you see it? It" + line "is HIDDEN POWER!" + + para "It draws out the" + line "power of #MON" + cont "for attacking." + + para "Remember this: its" + line "type and power de-" + cont "pend on the #-" + cont "MON using it." + done + +HiddenPowerGuyText3: + text "I am meditating…" + done + +LakeOfRageHiddenPowerHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, LAKE_OF_RAGE, 1 + warp_event 3, 7, LAKE_OF_RAGE, 1 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, HiddenPowerHouseBookshelf + bg_event 1, 1, BGEVENT_READ, HiddenPowerHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_FISHER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, HiddenPowerGuy, -1 diff --git a/maps/LakeOfRageMagikarpHouse.asm b/maps/LakeOfRageMagikarpHouse.asm new file mode 100644 index 0000000..8c70486 --- /dev/null +++ b/maps/LakeOfRageMagikarpHouse.asm @@ -0,0 +1,224 @@ + object_const_def + const LAKEOFRAGEMAGIKARPHOUSE_FISHING_GURU + +LakeOfRageMagikarpHouse_MapScripts: + def_scene_scripts + + def_callbacks + +MagikarpLengthRaterScript: + faceplayer + opentext + checkevent EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY + iftrue .GetReward + checkevent EVENT_LAKE_OF_RAGE_ASKED_FOR_MAGIKARP + iftrue .AskedForMagikarp + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .ClearedRocketHideout + checkevent EVENT_LAKE_OF_RAGE_EXPLAINED_WEIRD_MAGIKARP + iftrue .ExplainedHistory + writetext MagikarpLengthRaterText_LakeOfRageHistory + waitbutton + closetext + setevent EVENT_LAKE_OF_RAGE_EXPLAINED_WEIRD_MAGIKARP + end + +.ExplainedHistory: + writetext MagikarpLengthRaterText_MenInBlack + waitbutton + closetext + end + +.ClearedRocketHideout: + writetext MagikarpLengthRaterText_WorldsLargestMagikarp + waitbutton + closetext + setevent EVENT_LAKE_OF_RAGE_ASKED_FOR_MAGIKARP + end + +.AskedForMagikarp: + loadmonindex 1, MAGIKARP + special FindPartyMonThatSpecies + iffalse .ClearedRocketHideout + writetext MagikarpLengthRaterText_YouHaveAMagikarp + waitbutton + special CheckMagikarpLength + ifequal MAGIKARPLENGTH_NOT_MAGIKARP, .NotMagikarp + ifequal MAGIKARPLENGTH_REFUSED, .Refused + ifequal MAGIKARPLENGTH_TOO_SHORT, .TooShort + ; MAGIKARPLENGTH_BEAT_RECORD + sjump .GetReward + +.GetReward: + writetext MagikarpLengthRaterText_Memento + promptbutton + verbosegiveitem ELIXER + iffalse .NoRoom + writetext MagikarpLengthRaterText_Bonus + waitbutton + closetext + clearevent EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY + end + +.NoRoom: + closetext + setevent EVENT_LAKE_OF_RAGE_ELIXIR_ON_STANDBY + end + +.TooShort: + writetext MagikarpLengthRaterText_TooShort + waitbutton + closetext + end + +.NotMagikarp: + writetext MagikarpLengthRaterText_NotMagikarp + waitbutton + closetext + end + +.Refused: + writetext MagikarpLengthRaterText_Refused + waitbutton + closetext + end + +LakeOfRageMagikarpHouseUnusedRecordSign: ; unreferenced + jumptext LakeOfRageMagikarpHouseUnusedRecordText + +MagikarpHouseBookshelf: + jumpstd DifficultBookshelfScript + +MagikarpLengthRaterText_LakeOfRageHistory: + text "LAKE OF RAGE is" + line "actually a crater" + + para "made by rampaging" + line "GYARADOS." + + para "The crater filled" + line "up with rainwater" + + para "and the LAKE was" + line "formed." + + para "That's the story" + line "passed on from my" + + para "Grandpa's great-" + line "great-grandpa." + + para "It used to be that" + line "you could catch" + + para "lively MAGIKARP" + line "there, but…" + + para "I don't understand" + line "what's happening." + done + +MagikarpLengthRaterText_MenInBlack: + text "The LAKE hasn't" + line "been normal since" + + para "those men wearing" + line "black arrived." + done + +MagikarpLengthRaterText_WorldsLargestMagikarp: + text "LAKE OF RAGE is" + line "back to normal." + + para "The MAGIKARP have" + line "returned." + + para "I may yet realize" + line "my dream of see-" + cont "ing the world's" + cont "largest MAGIKARP." + + para "Do you have a ROD?" + line "Please help me if" + cont "you do." + done + +MagikarpLengthRaterText_YouHaveAMagikarp: + text "Ah, you have a" + line "MAGIKARP! Let's" + + para "see how big that" + line "baby is." + done + +MagikarpLengthRaterText_Memento: + text "Wow! This one is" + line "outstanding!" + + para "I tip my hat to" + line "you!" + + para "Take this as a" + line "memento!" + done + +MagikarpLengthRaterText_Bonus: + text "The record is the" + line "important thing." + + para "Think of that as" + line "a bonus!" + done + +MagikarpLengthRaterText_TooShort: + text "Wow! This one is" + line "outstanding!" + + para "…I wish I could" + line "say that, but I've" + + para "seen a bigger one" + line "before." + done + +MagikarpLengthRaterText_NotMagikarp: + text "What? That's not a" + line "MAGIKARP!" + done + +MagikarpLengthRaterText_Refused: + text "Oh… So you didn't" + line "get one good" + + para "enough to show me?" + line "Maybe next time." + done + +LakeOfRageMagikarpHouseUnusedRecordText: + text "CURRENT RECORD" + + para "@" + text_ram wStringBuffer3 + text " caught by" + line "@" + text_ram wStringBuffer4 + text_end + +LakeOfRageMagikarpHouseUnusedDummyText: ; unreferenced + text_end + +LakeOfRageMagikarpHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, LAKE_OF_RAGE, 2 + warp_event 3, 7, LAKE_OF_RAGE, 2 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, MagikarpHouseBookshelf + bg_event 1, 1, BGEVENT_READ, MagikarpHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_FISHING_GURU, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MagikarpLengthRaterScript, -1 diff --git a/maps/LancesRoom.asm b/maps/LancesRoom.asm new file mode 100644 index 0000000..1fa3843 --- /dev/null +++ b/maps/LancesRoom.asm @@ -0,0 +1,356 @@ + object_const_def + const LANCESROOM_LANCE + const LANCESROOM_MARY + const LANCESROOM_OAK + +LancesRoom_MapScripts: + def_scene_scripts + scene_script LancesRoomLockDoorScene, SCENE_LANCESROOM_LOCK_DOOR + scene_script LancesRoomNoopScene, SCENE_LANCESROOM_APPROACH_LANCE + + def_callbacks + callback MAPCALLBACK_TILES, LancesRoomDoorsCallback + +LancesRoomLockDoorScene: + sdefer LancesRoomDoorLocksBehindYouScript + end + +LancesRoomNoopScene: + end + +LancesRoomDoorsCallback: + checkevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED + iffalse .KeepEntranceOpen + changeblock 4, 22, $34 ; wall +.KeepEntranceOpen: + checkevent EVENT_LANCES_ROOM_EXIT_OPEN + iffalse .KeepExitClosed + changeblock 4, 0, $0b ; open door +.KeepExitClosed: + endcallback + +LancesRoomDoorLocksBehindYouScript: + applymovement PLAYER, LancesRoom_EnterMovement + refreshscreen $86 + playsound SFX_STRENGTH + earthquake 80 + changeblock 4, 22, $34 ; wall + reloadmappart + closetext + setscene SCENE_LANCESROOM_APPROACH_LANCE + setevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED + end + +Script_ApproachLanceFromLeft: + special FadeOutMusic + applymovement PLAYER, MovementData_ApproachLanceFromLeft + sjump LancesRoomLanceScript + +Script_ApproachLanceFromRight: + special FadeOutMusic + applymovement PLAYER, MovementData_ApproachLanceFromRight +LancesRoomLanceScript: + turnobject LANCESROOM_LANCE, LEFT + opentext + writetext LanceBattleIntroText + waitbutton + closetext + winlosstext LanceBattleWinText, 0 + setlasttalked LANCESROOM_LANCE + loadtrainer CHAMPION, LANCE + startbattle + dontrestartmapmusic + reloadmapafterbattle + setevent EVENT_BEAT_CHAMPION_LANCE + opentext + writetext LanceBattleAfterText + waitbutton + closetext + playsound SFX_ENTER_DOOR + changeblock 4, 0, $0b ; open door + reloadmappart + closetext + setevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED + musicfadeout MUSIC_BEAUTY_ENCOUNTER, 16 + pause 30 + showemote EMOTE_SHOCK, LANCESROOM_LANCE, 15 + turnobject LANCESROOM_LANCE, DOWN + pause 10 + turnobject PLAYER, DOWN + appear LANCESROOM_MARY + applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryRushesIn + opentext + writetext LancesRoomMaryOhNoOakText + waitbutton + closetext + appear LANCESROOM_OAK + applymovement LANCESROOM_OAK, LancesRoomMovementData_OakWalksIn + follow LANCESROOM_MARY, LANCESROOM_OAK + applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryYieldsToOak + stopfollow + turnobject LANCESROOM_OAK, UP + turnobject LANCESROOM_LANCE, LEFT + opentext + writetext LancesRoomOakCongratulationsText + waitbutton + closetext + applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryInterviewChampion + turnobject PLAYER, LEFT + opentext + writetext LancesRoomMaryInterviewText + waitbutton + closetext + applymovement LANCESROOM_LANCE, LancesRoomMovementData_LancePositionsSelfToGuidePlayerAway + turnobject PLAYER, UP + opentext + writetext LancesRoomNoisyText + waitbutton + closetext + follow LANCESROOM_LANCE, PLAYER + turnobject LANCESROOM_MARY, UP + turnobject LANCESROOM_OAK, UP + applymovement LANCESROOM_LANCE, LancesRoomMovementData_LanceLeadsPlayerToHallOfFame + stopfollow + playsound SFX_EXIT_BUILDING + disappear LANCESROOM_LANCE + applymovement PLAYER, LancesRoomMovementData_PlayerExits + playsound SFX_EXIT_BUILDING + disappear PLAYER + applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryTriesToFollow + showemote EMOTE_SHOCK, LANCESROOM_MARY, 15 + opentext + writetext LancesRoomMaryNoInterviewText + pause 30 + closetext + applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryRunsBackAndForth + special FadeOutPalettes + pause 15 + warpfacing UP, HALL_OF_FAME, 4, 13 + end + +LancesRoom_EnterMovement: + step UP + step UP + step UP + step UP + step_end + +MovementData_ApproachLanceFromLeft: + step UP + step UP + turn_head RIGHT + step_end + +MovementData_ApproachLanceFromRight: + step UP + step LEFT + step UP + turn_head RIGHT + step_end + +LancesRoomMovementData_MaryRushesIn: + big_step UP + big_step UP + big_step UP + turn_head DOWN + step_end + +LancesRoomMovementData_OakWalksIn: + step UP + step UP + step_end + +LancesRoomMovementData_MaryYieldsToOak: + step LEFT + turn_head RIGHT + step_end + +LancesRoomMovementData_MaryInterviewChampion: + big_step UP + turn_head RIGHT + step_end + +LancesRoomMovementData_LancePositionsSelfToGuidePlayerAway: + step UP + step LEFT + turn_head DOWN + step_end + +LancesRoomMovementData_LanceLeadsPlayerToHallOfFame: + step UP + step_end + +LancesRoomMovementData_PlayerExits: + step UP + step_end + +LancesRoomMovementData_MaryTriesToFollow: + step UP + step RIGHT + turn_head UP + step_end + +LancesRoomMovementData_MaryRunsBackAndForth: + big_step RIGHT + big_step RIGHT + big_step LEFT + big_step LEFT + big_step LEFT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step LEFT + big_step LEFT + turn_head UP + step_end + +LanceBattleIntroText: + text "LANCE: I've been" + line "waiting for you." + + para "!" + + para "I knew that you," + line "with your skills," + + para "would eventually" + line "reach me here." + + para "There's no need" + line "for words now." + + para "We will battle to" + line "determine who is" + + para "the stronger of" + line "the two of us." + + para "As the most power-" + line "ful trainer and as" + + para "the #MON LEAGUE" + line "CHAMPION…" + + para "I, LANCE the drag-" + line "on master, accept" + cont "your challenge!" + done + +LanceBattleWinText: + text "…It's over." + + para "But it's an odd" + line "feeling." + + para "I'm not angry that" + line "I lost. In fact, I" + cont "feel happy." + + para "Happy that I" + line "witnessed the rise" + + para "of a great new" + line "CHAMPION!" + done + +LanceBattleAfterText: + text "…Whew." + + para "You have become" + line "truly powerful," + cont "." + + para "Your #MON have" + line "responded to your" + + para "strong and up-" + line "standing nature." + + para "As a trainer, you" + line "will continue to" + + para "grow strong with" + line "your #MON." + done + +LancesRoomMaryOhNoOakText: + text "MARY: Oh, no!" + line "It's all over!" + + para "PROF.OAK, if you" + line "weren't so slow…" + done + +LancesRoomOakCongratulationsText: + text "PROF.OAK: Ah," + line "!" + + para "It's been a long" + line "while." + + para "You certainly look" + line "more impressive." + + para "Your conquest of" + line "the LEAGUE is just" + cont "fantastic!" + + para "Your dedication," + line "trust and love for" + + para "your #MON made" + line "this happen." + + para "Your #MON were" + line "outstanding too." + + para "Because they be-" + line "lieved in you as a" + + para "trainer, they per-" + line "severed." + + para "Congratulations," + line "!" + done + +LancesRoomMaryInterviewText: + text "MARY: Let's inter-" + line "view the brand new" + cont "CHAMPION!" + done + +LancesRoomNoisyText: + text "LANCE: This is" + line "getting to be a" + cont "bit too noisy…" + + para ", could you" + line "come with me?" + done + +LancesRoomMaryNoInterviewText: + text "MARY: Oh, wait!" + line "We haven't done" + cont "the interview!" + done + +LancesRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 23, KARENS_ROOM, 3 + warp_event 5, 23, KARENS_ROOM, 4 + warp_event 4, 1, HALL_OF_FAME, 1 + warp_event 5, 1, HALL_OF_FAME, 2 + + def_coord_events + coord_event 4, 5, SCENE_LANCESROOM_APPROACH_LANCE, Script_ApproachLanceFromLeft + coord_event 5, 5, SCENE_LANCESROOM_APPROACH_LANCE, Script_ApproachLanceFromRight + + def_bg_events + + def_object_events + object_event 5, 3, SPRITE_LANCE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LancesRoomLanceScript, -1 + object_event 4, 7, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_LANCES_ROOM_OAK_AND_MARY + object_event 4, 7, SPRITE_OAK, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_LANCES_ROOM_OAK_AND_MARY diff --git a/maps/LancesRoom.blk b/maps/LancesRoom.blk new file mode 100644 index 0000000..b9c7185 --- /dev/null +++ b/maps/LancesRoom.blk @@ -0,0 +1 @@ +(,.-)/20:>=?;851698<1<9851698<1<9851698<1<9851698<1<9+1+7 \ No newline at end of file diff --git a/maps/LavRadioTower1F.asm b/maps/LavRadioTower1F.asm new file mode 100644 index 0000000..0ec5efc --- /dev/null +++ b/maps/LavRadioTower1F.asm @@ -0,0 +1,240 @@ + object_const_def + const LAVRADIOTOWER1F_RECEPTIONIST + const LAVRADIOTOWER1F_OFFICER + const LAVRADIOTOWER1F_SUPER_NERD1 + const LAVRADIOTOWER1F_GENTLEMAN + const LAVRADIOTOWER1F_SUPER_NERD2 + +LavRadioTower1F_MapScripts: + def_scene_scripts + + def_callbacks + +LavRadioTower1FReceptionistScript: + jumptextfaceplayer LavRadioTower1FReceptionistText + +LavRadioTower1FOfficerScript: + jumptextfaceplayer LavRadioTower1FOfficerText + +LavRadioTower1FSuperNerd1Script: + jumptextfaceplayer LavRadioTower1FSuperNerd1Text + +LavRadioTower1FGentlemanScript: + faceplayer + opentext + checkflag ENGINE_EXPN_CARD + iftrue .GotExpnCard + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext LavRadioTower1FGentlemanText + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext LavRadioTower1FGentlemanText_ReturnedMachinePart + promptbutton + getstring STRING_BUFFER_4, .expncardname + scall .receiveitem + setflag ENGINE_EXPN_CARD +.GotExpnCard: + writetext LavRadioTower1FGentlemanText_GotExpnCard + waitbutton + closetext + end + +.receiveitem: + jumpstd ReceiveItemScript + end + +.expncardname + db "EXPN CARD@" + +LavRadioTower1FSuperNerd2Script: + faceplayer + opentext + checkflag ENGINE_EXPN_CARD + iftrue .GotExpnCard + writetext LavRadioTower1FSuperNerd2Text + waitbutton + closetext + end + +.GotExpnCard: + writetext LavRadioTower1FSuperNerd2Text_GotExpnCard + waitbutton + closetext + end + +LavRadioTower1FDirectory: + jumptext LavRadioTower1FDirectoryText + +LavRadioTower1FPokeFluteSign: + jumptext LavRadioTower1FPokeFluteSignText + +LavRadioTower1FReferenceLibrary: ; unreferenced + jumptext LavRadioTower1FReferenceLibraryText + +LavRadioTower1FReceptionistText: + text "Welcome!" + line "Feel free to look" + + para "around anywhere on" + line "this floor." + done + +LavRadioTower1FOfficerText: + text "Sorry, but you can" + line "only tour the" + cont "ground floor." + + para "Ever since JOHTO's" + line "RADIO TOWER was" + + para "taken over by a" + line "criminal gang, we" + + para "have had to step" + line "up our security." + done + +LavRadioTower1FSuperNerd1Text: + text "Many people are" + line "hard at work here" + + para "in the RADIO" + line "TOWER." + + para "They must be doing" + line "their best to put" + cont "on good shows." + done + +LavRadioTower1FGentlemanText: + text "Oh, no, no, no!" + + para "We've been off the" + line "air ever since the" + + para "POWER PLANT shut" + line "down." + + para "All my efforts to" + line "start this station" + + para "would be wasted if" + line "I can't broadcast." + + para "I'll be ruined!" + done + +LavRadioTower1FGentlemanText_ReturnedMachinePart: + text "Ah! So you're the" + line " who solved" + + para "the POWER PLANT's" + line "problem?" + + para "Thanks to you, I" + line "never lost my job." + + para "I tell you, you're" + line "a real lifesaver!" + + para "Please take this" + line "as my thanks." + done + +LavRadioTower1FGentlemanText_GotExpnCard: + text "With that thing," + line "you can tune into" + + para "the radio programs" + line "here in KANTO." + + para "Gahahahaha!" + done + +LavRadioTower1FSuperNerd2Text: + text "Hey there!" + + para "I am the super" + line "MUSIC DIRECTOR!" + + para "Huh? Your #GEAR" + line "can't tune into my" + + para "music programs." + line "How unfortunate!" + + para "If you get an EXPN" + line "CARD upgrade, you" + + para "can tune in. You'd" + line "better get one!" + done + +LavRadioTower1FSuperNerd2Text_GotExpnCard: + text "Hey there!" + + para "I am the super" + line "MUSIC DIRECTOR!" + + para "I'm responsible" + line "for the gorgeous" + + para "melodies that go" + line "out over the air." + + para "Don't be square." + line "Grab your music" + cont "off the air!" + done + +LavRadioTower1FDirectoryText: + text "1F RECEPTION" + line "2F SALES" + + para "3F PERSONNEL" + line "4F PRODUCTION" + + para "5F DIRECTOR'S" + line " OFFICE" + done + +LavRadioTower1FPokeFluteSignText: + text "Perk Up #MON" + line "with Mellow Sounds" + + para "of the # FLUTE" + line "on CHANNEL 20" + done + +LavRadioTower1FReferenceLibraryText: + text "Wow! A full rack" + line "of #MON CDs and" + cont "videos." + + para "This must be the" + line "reference library." + done + +LavRadioTower1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, LAVENDER_TOWN, 7 + warp_event 3, 7, LAVENDER_TOWN, 7 + + def_coord_events + + def_bg_events + bg_event 11, 0, BGEVENT_READ, LavRadioTower1FDirectory + bg_event 5, 0, BGEVENT_READ, LavRadioTower1FPokeFluteSign + + def_object_events + object_event 6, 6, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LavRadioTower1FReceptionistScript, -1 + object_event 15, 1, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LavRadioTower1FOfficerScript, -1 + object_event 1, 3, SPRITE_SUPER_NERD, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, LavRadioTower1FSuperNerd1Script, -1 + object_event 9, 1, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LavRadioTower1FGentlemanScript, -1 + object_event 14, 6, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LavRadioTower1FSuperNerd2Script, -1 diff --git a/maps/LavRadioTower1F.blk b/maps/LavRadioTower1F.blk new file mode 100644 index 0000000..5e68cf1 --- /dev/null +++ b/maps/LavRadioTower1F.blk @@ -0,0 +1,2 @@ +   +8/5636  55247 \ No newline at end of file diff --git a/maps/LavenderMart.asm b/maps/LavenderMart.asm new file mode 100644 index 0000000..a296a1b --- /dev/null +++ b/maps/LavenderMart.asm @@ -0,0 +1,62 @@ + object_const_def + const LAVENDERMART_CLERK + const LAVENDERMART_POKEFAN_M + const LAVENDERMART_ROCKER + +LavenderMart_MapScripts: + def_scene_scripts + + def_callbacks + +LavenderMartClerkScript: + opentext + pokemart MARTTYPE_STANDARD, MART_LAVENDER + closetext + end + +LavenderMartPokefanMScript: + jumptextfaceplayer LavenderMartPokefanMText + +LavenderMartRockerScript: + jumptextfaceplayer LavenderMartRockerText + +LavenderMartPokefanMText: + text "REPEL is a neces-" + line "sity if you are" + + para "going to explore a" + line "cave." + + para "Even though I like" + line "exploring, I still" + + para "haven't made it to" + line "all the caves." + done + +LavenderMartRockerText: + text "I heard about a" + line "craftsman who" + + para "makes custom BALLS" + line "in the JOHTO town" + + para "of AZALEA. I wish" + line "I had some." + done + +LavenderMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, LAVENDER_TOWN, 5 + warp_event 3, 7, LAVENDER_TOWN, 5 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LavenderMartClerkScript, -1 + object_event 6, 6, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, LavenderMartPokefanMScript, -1 + object_event 9, 2, SPRITE_ROCKER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LavenderMartRockerScript, -1 diff --git a/maps/LavenderNameRater.asm b/maps/LavenderNameRater.asm new file mode 100644 index 0000000..a80cdba --- /dev/null +++ b/maps/LavenderNameRater.asm @@ -0,0 +1,36 @@ + object_const_def + const LAVENDERNAMERATER_NAME_RATER + +LavenderNameRater_MapScripts: + def_scene_scripts + scene_script LavenderNameRaterNoopScene ; unusable + + def_callbacks + +LavenderNameRaterNoopScene: + end + +LavenderNameRater: + faceplayer + opentext + special NameRater + waitbutton + closetext + end + +LavenderNameRaterUnusedBookshelf: ; unreferenced + jumpstd DifficultBookshelfScript + +LavenderNameRater_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, LAVENDER_TOWN, 4 + warp_event 3, 7, LAVENDER_TOWN, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, LavenderNameRater, -1 diff --git a/maps/LavenderPokecenter1F.asm b/maps/LavenderPokecenter1F.asm new file mode 100644 index 0000000..f112e9a --- /dev/null +++ b/maps/LavenderPokecenter1F.asm @@ -0,0 +1,97 @@ + object_const_def + const LAVENDERPOKECENTER1F_NURSE + const LAVENDERPOKECENTER1F_GENTLEMAN + const LAVENDERPOKECENTER1F_TEACHER + const LAVENDERPOKECENTER1F_YOUNGSTER + +LavenderPokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +LavenderPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +LavenderPokecenter1FGentlemanScript: + jumptextfaceplayer LavenderPokecenter1FGentlemanText + +LavenderPokecenter1FTeacherScript: + jumptextfaceplayer LavenderPokecenter1FTeacherText + +LavenderPokecenter1FYoungsterScript: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext LavenderPokecenter1FYoungsterText + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext LavenderPokecenter1FYoungsterText_ReturnedMachinePart + waitbutton + closetext + end + +LavenderPokecenter1FGentlemanText: + text "To the north of" + line "LAVENDER is ROCK" + + para "TUNNEL. Go through" + line "it to get to the" + cont "POWER PLANT." + done + +LavenderPokecenter1FTeacherText: + text "There's a radio" + line "program that plays" + cont "# FLUTE music." + + para "Oh? Ah, your radio" + line "needs an EXPN CARD" + cont "to tune into it." + done + +LavenderPokecenter1FYoungsterText: + text "If the POWER PLANT" + line "isn't running, the" + + para "MAGNET TRAIN won't" + line "run either…" + + para "It also means the" + line "RADIO STATION" + cont "can't broadcast…" + done + +LavenderPokecenter1FYoungsterText_ReturnedMachinePart: + text "The DIRECTOR of" + line "the RADIO STATION" + cont "sure was happy." + + para "He said they're" + line "back on the air" + + para "because the POWER" + line "PLANT is running" + cont "smoothly again." + done + +LavenderPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, LAVENDER_TOWN, 1 + warp_event 4, 7, LAVENDER_TOWN, 1 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LavenderPokecenter1FNurseScript, -1 + object_event 7, 6, SPRITE_GENTLEMAN, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LavenderPokecenter1FGentlemanScript, -1 + object_event 5, 3, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LavenderPokecenter1FTeacherScript, -1 + object_event 1, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, LavenderPokecenter1FYoungsterScript, -1 diff --git a/maps/LavenderPokecenter2FBeta.asm b/maps/LavenderPokecenter2FBeta.asm new file mode 100644 index 0000000..6e084f5 --- /dev/null +++ b/maps/LavenderPokecenter2FBeta.asm @@ -0,0 +1,16 @@ +LavenderPokecenter2FBeta_MapScripts: + def_scene_scripts + + def_callbacks + +LavenderPokecenter2FBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 7, LAVENDER_POKECENTER_1F, 3 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/LavenderSpeechHouse.asm b/maps/LavenderSpeechHouse.asm new file mode 100644 index 0000000..44c60b4 --- /dev/null +++ b/maps/LavenderSpeechHouse.asm @@ -0,0 +1,43 @@ + object_const_def + const LAVENDERSPEECHHOUSE_POKEFAN_F + +LavenderSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +LavenderSpeechHousePokefanFScript: + jumptextfaceplayer LavenderSpeechHousePokefanFText + +LavenderSpeechHouseBookshelf: + jumpstd PictureBookshelfScript + +LavenderSpeechHousePokefanFText: + text "LAVENDER is a" + line "tiny, quiet town" + + para "at the foot of the" + line "mountains." + + para "It's gotten a bit" + line "busier since the" + + para "RADIO TOWER was" + line "built." + done + +LavenderSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, LAVENDER_TOWN, 3 + warp_event 3, 7, LAVENDER_TOWN, 3 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, LavenderSpeechHouseBookshelf + bg_event 1, 1, BGEVENT_READ, LavenderSpeechHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, LavenderSpeechHousePokefanFScript, -1 diff --git a/maps/LavenderTown.asm b/maps/LavenderTown.asm new file mode 100644 index 0000000..6f52b85 --- /dev/null +++ b/maps/LavenderTown.asm @@ -0,0 +1,132 @@ + object_const_def + const LAVENDERTOWN_POKEFAN_M + const LAVENDERTOWN_TEACHER + const LAVENDERTOWN_GRAMPS + const LAVENDERTOWN_YOUNGSTER + +LavenderTown_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, LavenderTownFlypointCallback + +LavenderTownFlypointCallback: + setflag ENGINE_FLYPOINT_LAVENDER + endcallback + +LavenderTownPokefanMScript: + jumptextfaceplayer LavenderTownPokefanMText + +LavenderTownTeacherScript: + jumptextfaceplayer LavenderTownTeacherText + +LavenderTownGrampsScript: + jumptextfaceplayer LavenderTownGrampsText + +LavenderTownYoungsterScript: + jumptextfaceplayer LavenderTownYoungsterText + +LavenderTownSign: + jumptext LavenderTownSignText + +KantoRadioStationSign: + jumptext KantoRadioStationSignText + +VolunteerPokemonHouseSign: + jumptext VolunteerPokemonHouseSignText + +SoulHouseSign: + jumptext SoulHouseSignText + +LavenderPokecenterSignText: + jumpstd PokecenterSignScript + +LavenderMartSignText: + jumpstd MartSignScript + +LavenderTownPokefanMText: + text "That's quite some" + line "building, eh?" + + para "It's KANTO's RADIO" + line "TOWER." + done + +LavenderTownTeacherText: + text "KANTO has many" + line "good radio shows." + done + +LavenderTownGrampsText: + text "People come from" + line "all over to pay" + + para "their respects to" + line "the departed souls" + cont "of #MON." + done + +LavenderTownYoungsterText: + text "You need a #" + line "FLUTE to wake" + cont "sleeping #MON." + + para "Every trainer has" + line "to know that!" + done + +LavenderTownSignText: + text "LAVENDER TOWN" + + para "The Noble Purple" + line "Town" + done + +KantoRadioStationSignText: + text "KANTO RADIO" + line "STATION" + + para "Your Favorite" + line "Programs On-Air" + cont "Around the Clock!" + done + +VolunteerPokemonHouseSignText: + text "LAVENDER VOLUNTEER" + line "#MON HOUSE" + done + +SoulHouseSignText: + text "SOUL HOUSE" + + para "May the Souls of" + line "#MON Rest Easy" + done + +LavenderTown_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 5, LAVENDER_POKECENTER_1F, 1 + warp_event 5, 9, MR_FUJIS_HOUSE, 1 + warp_event 3, 13, LAVENDER_SPEECH_HOUSE, 1 + warp_event 7, 13, LAVENDER_NAME_RATER, 1 + warp_event 1, 5, LAVENDER_MART, 2 + warp_event 13, 11, SOUL_HOUSE, 1 + warp_event 14, 5, LAV_RADIO_TOWER_1F, 1 + + def_coord_events + + def_bg_events + bg_event 11, 3, BGEVENT_READ, LavenderTownSign + bg_event 15, 7, BGEVENT_READ, KantoRadioStationSign + bg_event 3, 9, BGEVENT_READ, VolunteerPokemonHouseSign + bg_event 15, 13, BGEVENT_READ, SoulHouseSign + bg_event 6, 5, BGEVENT_READ, LavenderPokecenterSignText + bg_event 2, 5, BGEVENT_READ, LavenderMartSignText + + def_object_events + object_event 12, 7, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, LavenderTownPokefanMScript, -1 + object_event 2, 15, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, LavenderTownTeacherScript, -1 + object_event 14, 12, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LavenderTownGrampsScript, -1 + object_event 6, 11, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 1, LavenderTownYoungsterScript, -1 diff --git a/maps/LavenderTown.blk b/maps/LavenderTown.blk new file mode 100644 index 0000000..79f890d --- /dev/null +++ b/maps/LavenderTown.blk @@ -0,0 +1 @@ +WW%{{{hi, ! !{yhi(|s|r{{7:~({{{{{{{y{({y{{ T!({{{{{{|}~({{wVw({{{{{{{{{(???;{>???, \ No newline at end of file diff --git a/maps/MahoganyGym.asm b/maps/MahoganyGym.asm new file mode 100644 index 0000000..7c5cf03 --- /dev/null +++ b/maps/MahoganyGym.asm @@ -0,0 +1,393 @@ + object_const_def + const MAHOGANYGYM_PRYCE + const MAHOGANYGYM_BEAUTY1 + const MAHOGANYGYM_ROCKER1 + const MAHOGANYGYM_BEAUTY2 + const MAHOGANYGYM_ROCKER2 + const MAHOGANYGYM_ROCKER3 + const MAHOGANYGYM_GYM_GUIDE + +MahoganyGym_MapScripts: + def_scene_scripts + + def_callbacks + +MahoganyGymPryceScript: + faceplayer + opentext + checkevent EVENT_BEAT_PRYCE + iftrue .FightDone + writetext PryceText_Intro + waitbutton + closetext + winlosstext PryceText_Impressed, 0 + loadtrainer PRYCE, PRYCE1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_PRYCE + opentext + writetext Text_ReceivedGlacierBadge + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_GLACIERBADGE + readvar VAR_BADGES + scall MahoganyGymActivateRockets +.FightDone: + checkevent EVENT_GOT_TM16_ICY_WIND + iftrue PryceScript_Defeat + setevent EVENT_BEAT_SKIER_ROXANNE + setevent EVENT_BEAT_SKIER_CLARISSA + setevent EVENT_BEAT_BOARDER_RONALD + setevent EVENT_BEAT_BOARDER_BRAD + setevent EVENT_BEAT_BOARDER_DOUGLAS + writetext PryceText_GlacierBadgeSpeech + promptbutton + verbosegiveitem TM_ICY_WIND + iffalse MahoganyGym_NoRoomForIcyWind + setevent EVENT_GOT_TM16_ICY_WIND + writetext PryceText_IcyWindSpeech + waitbutton + closetext + end + +PryceScript_Defeat: + writetext PryceText_CherishYourPokemon + waitbutton +MahoganyGym_NoRoomForIcyWind: + closetext + end + +MahoganyGymActivateRockets: + ifequal 7, .RadioTowerRockets + ifequal 6, .GoldenrodRockets + end + +.GoldenrodRockets: + jumpstd GoldenrodRocketsScript + +.RadioTowerRockets: + jumpstd RadioTowerRocketsScript + +TrainerSkierRoxanne: + trainer SKIER, ROXANNE, EVENT_BEAT_SKIER_ROXANNE, SkierRoxanneSeenText, SkierRoxanneBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SkierRoxanneAfterBattleText + waitbutton + closetext + end + +TrainerSkierClarissa: + trainer SKIER, CLARISSA, EVENT_BEAT_SKIER_CLARISSA, SkierClarissaSeenText, SkierClarissaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SkierClarissaAfterBattleText + waitbutton + closetext + end + +TrainerBoarderRonald: + trainer BOARDER, RONALD, EVENT_BEAT_BOARDER_RONALD, BoarderRonaldSeenText, BoarderRonaldBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BoarderRonaldAfterBattleText + waitbutton + closetext + end + +TrainerBoarderBrad: + trainer BOARDER, BRAD, EVENT_BEAT_BOARDER_BRAD, BoarderBradSeenText, BoarderBradBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BoarderBradAfterBattleText + waitbutton + closetext + end + +TrainerBoarderDouglas: + trainer BOARDER, DOUGLAS, EVENT_BEAT_BOARDER_DOUGLAS, BoarderDouglasSeenText, BoarderDouglasBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BoarderDouglasAfterBattleText + waitbutton + closetext + end + +MahoganyGymGuideScript: + faceplayer + opentext + checkevent EVENT_BEAT_PRYCE + iftrue .MahoganyGymGuideWinScript + writetext MahoganyGymGuideText + waitbutton + closetext + end + +.MahoganyGymGuideWinScript: + writetext MahoganyGymGuideWinText + waitbutton + closetext + end + +MahoganyGymStatue: + checkflag ENGINE_GLACIERBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, PRYCE, PRYCE1 + jumpstd GymStatue2Script + +PryceText_Intro: + text "#MON have many" + line "experiences in" + + para "their lives, just " + line "like we do. " + + para "I, too, have seen" + line "and suffered much" + cont "in my life." + + para "Since I am your" + line "elder, let me show" + cont "you what I mean." + + para "I have been with" + line "#MON since" + + para "before you were" + line "born." + + para "I do not lose" + line "easily." + + para "I, PRYCE--the" + line "winter trainer--" + + para "shall demonstrate" + line "my power!" + done + +PryceText_Impressed: + text "Ah, I am impressed" + line "by your prowess." + + para "With your strong" + line "will, I know you" + + para "will overcome all" + line "life's obstacles." + + para "You are worthy of" + line "this BADGE!" + done + +Text_ReceivedGlacierBadge: + text " received" + line "GLACIERBADGE." + done + +PryceText_GlacierBadgeSpeech: + text "That BADGE will" + line "raise the SPECIAL" + cont "stats of #MON." + + para "It also lets your" + line "#MON use WHIRL-" + cont "POOL to get across" + cont "real whirlpools." + + para "And this… This is" + line "a gift from me!" + done + +PryceText_IcyWindSpeech: + text "That TM contains" + line "ICY WIND." + + para "It inflicts damage" + line "and lowers speed." + + para "It demonstrates" + line "the harshness of" + cont "winter." + done + +PryceText_CherishYourPokemon: + text "When the ice and" + line "snow melt, spring" + cont "arrives." + + para "You and your #-" + line "MON will be to-" + + para "gether for many" + line "years to come." + + para "Cherish your time" + line "together!" + done + +BoarderRonaldSeenText: + text "I'll freeze your" + line "#MON, so you" + cont "can't do a thing!" + done + +BoarderRonaldBeatenText: + text "Darn. I couldn't" + line "do a thing." + done + +BoarderRonaldAfterBattleText: + text "I think there's a" + line "move a #MON" + + para "can use while it's" + line "frozen." + done + +BoarderBradSeenText: + text "This GYM has a" + line "slippery floor." + + para "It's fun, isn't" + line "it?" + + para "But hey--we're" + line "not playing games" + cont "here!" + done + +BoarderBradBeatenText: + text "Do you see how" + line "serious we are?" + done + +BoarderBradAfterBattleText: + text "This GYM is great." + line "I love boarding" + cont "with my #MON!" + done + +BoarderDouglasSeenText: + text "I know PRYCE's" + line "secret." + done + +BoarderDouglasBeatenText: + text "OK. I'll tell you" + line "PRYCE's secret." + done + +BoarderDouglasAfterBattleText: + text "The secret behind" + line "PRYCE's power…" + + para "He meditates under" + line "a waterfall daily" + + para "to strengthen his" + line "mind and body." + done + +SkierRoxanneSeenText: + text "To get to PRYCE," + line "our GYM LEADER," + + para "you need to think" + line "before you skate." + done + +SkierRoxanneBeatenText: + text "I wouldn't lose to" + line "you in skiing!" + done + +SkierRoxanneAfterBattleText: + text "If you don't skate" + line "with precision," + + para "you won't get far" + line "in this GYM." + done + +SkierClarissaSeenText: + text "Check out my" + line "parallel turn!" + done + +SkierClarissaBeatenText: + text "No! You made me" + line "wipe out!" + done + +SkierClarissaAfterBattleText: + text "I shouldn't have" + line "been bragging" + cont "about my skiing…" + done + +MahoganyGymGuideText: + text "PRYCE is a veteran" + line "who has trained" + + para "#MON for some" + line "50 years." + + para "He's said to be" + line "good at freezing" + + para "opponents with" + line "ice-type moves." + + para "That means you" + line "should melt him" + + para "with your burning" + line "ambition!" + done + +MahoganyGymGuideWinText: + text "PRYCE is some-" + line "thing, but you're" + cont "something else!" + + para "That was a hot" + line "battle that" + + para "bridged the gen-" + line "eration gap!" + done + +MahoganyGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 17, MAHOGANY_TOWN, 3 + warp_event 5, 17, MAHOGANY_TOWN, 3 + + def_coord_events + + def_bg_events + bg_event 3, 15, BGEVENT_READ, MahoganyGymStatue + bg_event 6, 15, BGEVENT_READ, MahoganyGymStatue + + def_object_events + object_event 5, 3, SPRITE_PRYCE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, MahoganyGymPryceScript, -1 + object_event 4, 6, SPRITE_BEAUTY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerSkierRoxanne, -1 + object_event 0, 17, SPRITE_ROCKER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerBoarderRonald, -1 + object_event 9, 17, SPRITE_BEAUTY, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerSkierClarissa, -1 + object_event 5, 9, SPRITE_ROCKER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerBoarderBrad, -1 + object_event 2, 4, SPRITE_ROCKER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerBoarderDouglas, -1 + object_event 7, 15, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, MahoganyGymGuideScript, -1 diff --git a/maps/MahoganyGym.blk b/maps/MahoganyGym.blk new file mode 100644 index 0000000..a46e044 --- /dev/null +++ b/maps/MahoganyGym.blk @@ -0,0 +1 @@ +'''''19916522/959/9.19996512.25.9/65-61--2 \ No newline at end of file diff --git a/maps/MahoganyMart1F.asm b/maps/MahoganyMart1F.asm new file mode 100644 index 0000000..f6c9587 --- /dev/null +++ b/maps/MahoganyMart1F.asm @@ -0,0 +1,238 @@ + object_const_def + const MAHOGANYMART1F_PHARMACIST + const MAHOGANYMART1F_BLACK_BELT + const MAHOGANYMART1F_LANCE + const MAHOGANYMART1F_DRAGONITE + const MAHOGANYMART1F_GRANNY + +MahoganyMart1F_MapScripts: + def_scene_scripts + scene_script MahoganyMart1FNoopScene, SCENE_MAHOGANYMART1F_NOOP + scene_script MahoganyMart1FLanceUncoversStairsScene, SCENE_MAHOGANYMART1F_LANCE_UNCOVERS_STAIRS + + def_callbacks + callback MAPCALLBACK_TILES, MahoganyMart1FStaircaseCallback + +MahoganyMart1FNoopScene: + end + +MahoganyMart1FLanceUncoversStairsScene: + sdefer MahoganyMart1FLanceUncoversStaircaseScript + end + +MahoganyMart1FStaircaseCallback: + checkevent EVENT_UNCOVERED_STAIRCASE_IN_MAHOGANY_MART + iftrue .ShowStairs + endcallback + +.ShowStairs: + changeblock 6, 2, $1e ; stairs + endcallback + +MahoganyMart1FPharmacistScript: + faceplayer + opentext + checkevent EVENT_DECIDED_TO_HELP_LANCE + iftrue .LanceEntered + pokemart MARTTYPE_STANDARD, MART_MAHOGANY_1 + closetext + end + +.LanceEntered: + writetext MahoganyMart1FPharmacistText_LanceEntered + waitbutton + closetext + end + +MahoganyMart1FBlackBeltScript: + faceplayer + opentext + checkevent EVENT_DECIDED_TO_HELP_LANCE + iftrue .LanceEntered + writetext MahoganyMart1FBlackBeltText + waitbutton + closetext + end + +.LanceEntered: + writetext MahoganyMart1FBlackBeltText_LanceEntered + waitbutton + closetext + end + +MahoganyMart1FLanceUncoversStaircaseScript: + pause 15 + opentext + writetext MahoganyMart1FLanceDragoniteHyperBeamText + pause 15 + closetext + playsound SFX_TACKLE + applymovement MAHOGANYMART1F_DRAGONITE, MahoganyMart1FDragoniteTackleMovement + applymovement MAHOGANYMART1F_BLACK_BELT, MahoganyMart1FBlackBeltKnockedBackMovement + pause 15 + disappear MAHOGANYMART1F_DRAGONITE + pause 15 + applymovement MAHOGANYMART1F_LANCE, MahoganyMart1FLanceApproachPlayerMovement + opentext + writetext MahoganyMart1FLanceRadioText + waitbutton + closetext + follow MAHOGANYMART1F_LANCE, PLAYER + applymovement MAHOGANYMART1F_LANCE, MahoganyMart1FLanceApproachPharmacistMovement + applymovement MAHOGANYMART1F_PHARMACIST, MahoganyMart1FPharmacistShovedAsideMovement + applymovement MAHOGANYMART1F_LANCE, MahoganyMart1FLanceApproachHiddenStairsMovement + stopfollow + opentext + writetext MahoganyMart1FLanceStairsText + waitbutton + showemote EMOTE_SHOCK, MAHOGANYMART1F_PHARMACIST, 10 + playsound SFX_FAINT + changeblock 6, 2, $1e ; stairs + reloadmappart + closetext + setevent EVENT_UNCOVERED_STAIRCASE_IN_MAHOGANY_MART + turnobject MAHOGANYMART1F_LANCE, LEFT + opentext + writetext MahoganyMart1FLanceSplitUpText + waitbutton + closetext + applymovement MAHOGANYMART1F_LANCE, MahoganyMart1FLanceGoDownStairsMovement + playsound SFX_EXIT_BUILDING + disappear MAHOGANYMART1F_LANCE + setscene SCENE_MAHOGANYMART1F_NOOP + waitsfx + end + +MahoganyMart1FGrannyScript: + faceplayer + opentext + pokemart MARTTYPE_STANDARD, MART_MAHOGANY_2 + closetext + end + +MahoganyMart1FDragoniteTackleMovement: + fix_facing + big_step LEFT + big_step RIGHT + remove_fixed_facing + step_end + +MahoganyMart1FBlackBeltKnockedBackMovement: + fix_facing + big_step LEFT + remove_fixed_facing + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + step_end + +MahoganyMart1FPharmacistShovedAsideMovement: + fix_facing + big_step LEFT + remove_fixed_facing + step_end + +MahoganyMart1FLanceApproachPlayerMovement: + slow_step LEFT + turn_head DOWN + step_end + +MahoganyMart1FLanceApproachPharmacistMovement: + slow_step RIGHT + slow_step UP + slow_step UP + step_end + +MahoganyMart1FLanceApproachHiddenStairsMovement: + slow_step UP + slow_step RIGHT + slow_step RIGHT + step_end + +MahoganyMart1FLanceGoDownStairsMovement: + slow_step RIGHT + step_end + +MahoganyMart1FRageCandyBarText: ; unreferenced + text "Hello, kiddo!" + + para "How would you like" + line "some RAGECANDYBAR?" + + para "It's the thing to" + line "eat in MAHOGANY!" + done + +MahoganyMart1FPharmacistText_LanceEntered: + text "Arrgh… You found" + line "the secret stair-" + cont "way…" + done + +MahoganyMart1FBlackBeltText: + text "Heheh! The experi-" + line "ment worked like a" + cont "charm." + + para "MAGIKARP are just" + line "worthless, but" + + para "GYARADOS are big" + line "moneymakers." + done + +MahoganyMart1FBlackBeltText_LanceEntered: + text "Urrgh…" + + para "That guy's dragon" + line "#MON are tough…" + done + +MahoganyMart1FLanceDragoniteHyperBeamText: + text "LANCE: DRAGONITE," + line "HYPER BEAM." + done + +MahoganyMart1FLanceRadioText: + text "What took you," + line "?" + + para "Just as I thought," + line "that strange radio" + + para "signal is coming" + line "from here." + done + +MahoganyMart1FLanceStairsText: + text "The stairs are" + line "right here." + done + +MahoganyMart1FLanceSplitUpText: + text "LANCE: , we" + line "should split up to" + + para "check this place." + line "I'll go first." + done + +MahoganyMart1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, MAHOGANY_TOWN, 1 + warp_event 4, 7, MAHOGANY_TOWN, 1 + warp_event 7, 3, TEAM_ROCKET_BASE_B1F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 4, 3, SPRITE_PHARMACIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MahoganyMart1FPharmacistScript, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 1, 6, SPRITE_BLACK_BELT, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MahoganyMart1FBlackBeltScript, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 4, 6, SPRITE_LANCE, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MAHOGANY_MART_LANCE_AND_DRAGONITE + object_event 3, 6, SPRITE_DRAGON, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MAHOGANY_MART_LANCE_AND_DRAGONITE + object_event 1, 3, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MahoganyMart1FGrannyScript, EVENT_MAHOGANY_MART_OWNERS diff --git a/maps/MahoganyPokecenter1F.asm b/maps/MahoganyPokecenter1F.asm new file mode 100644 index 0000000..d61d09c --- /dev/null +++ b/maps/MahoganyPokecenter1F.asm @@ -0,0 +1,70 @@ + object_const_def + const MAHOGANYPOKECENTER1F_NURSE + const MAHOGANYPOKECENTER1F_POKEFAN_M + const MAHOGANYPOKECENTER1F_YOUNGSTER + const MAHOGANYPOKECENTER1F_COOLTRAINER_F + +MahoganyPokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +MahoganyPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +MahoganyPokecenter1FPokefanMScript: + jumptextfaceplayer MahoganyPokecenter1FPokefanMText + +MahoganyPokecenter1FYoungsterScript: + jumptextfaceplayer MahoganyPokecenter1FYoungsterText + +MahoganyPokecenter1FCooltrainerFScript: + jumptextfaceplayer MahoganyPokecenter1FCooltrainerFText + +MahoganyPokecenter1FPokefanMText: + text "What's this? TEAM" + line "ROCKET has come" + cont "back?" + + para "I saw some men in" + line "black at LAKE OF" + cont "RAGE…" + done + +MahoganyPokecenter1FYoungsterText: + text "I stop my #MON" + line "from evolving too" + cont "early." + + para "I make them learn" + line "certain moves be-" + cont "fore I let them" + cont "evolve." + done + +MahoganyPokecenter1FCooltrainerFText: + text "#MON do become" + line "stronger when they" + + para "evolve, but they" + line "also learn moves" + cont "more slowly." + done + +MahoganyPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, MAHOGANY_TOWN, 4 + warp_event 4, 7, MAHOGANY_TOWN, 4 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MahoganyPokecenter1FNurseScript, -1 + object_event 7, 2, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, MahoganyPokecenter1FPokefanMScript, -1 + object_event 1, 3, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, MahoganyPokecenter1FYoungsterScript, -1 + object_event 2, 3, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MahoganyPokecenter1FCooltrainerFScript, -1 diff --git a/maps/MahoganyRedGyaradosSpeechHouse.asm b/maps/MahoganyRedGyaradosSpeechHouse.asm new file mode 100644 index 0000000..0fdce56 --- /dev/null +++ b/maps/MahoganyRedGyaradosSpeechHouse.asm @@ -0,0 +1,74 @@ + object_const_def + const MAHOGANYREDGYARADOSSPEECHHOUSE_BLACK_BELT + const MAHOGANYREDGYARADOSSPEECHHOUSE_TEACHER + +MahoganyRedGyaradosSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +MahoganyRedGyaradosSpeechHouseBlackBeltScript: + jumptextfaceplayer MahoganyRedGyaradosSpeechHouseBlackBeltText + +MahoganyRedGyaradosSpeechHouseTeacherScript: + faceplayer + opentext + checkflag ENGINE_ROCKETS_IN_RADIO_TOWER + iftrue .RocketsInRadioTower + writetext MahoganyRedGyaradosSpeechHouseTeacherText + waitbutton + closetext + end + +.RocketsInRadioTower: + writetext MahoganyRedGyaradosSpeechHouseTeacherText_RocketsInRadioTower + waitbutton + closetext + end + +MahoganyRedGyaradosSpeechHouseUnusedBookshelf1: ; unreferenced + jumpstd PictureBookshelfScript + +MahoganyRedGyaradosSpeechHouseUnusedBookshelf2: ; unreferenced + jumpstd MagazineBookshelfScript + +MahoganyRedGyaradosSpeechHouseBlackBeltText: + text "I heard that a red" + line "GYARADOS appeared" + cont "at the LAKE." + + para "That's odd, since" + line "even ordinary" + + para "GYARADOS are rare" + line "in that lake…" + done + +MahoganyRedGyaradosSpeechHouseTeacherText: + text "My favorite radio" + line "program? I'd say" + cont "#MON MUSIC." + done + +MahoganyRedGyaradosSpeechHouseTeacherText_RocketsInRadioTower: + text "I've been hearing" + line "laughter on the" + + para "radio…" + line "It's creepy." + done + +MahoganyRedGyaradosSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, MAHOGANY_TOWN, 2 + warp_event 3, 7, MAHOGANY_TOWN, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MahoganyRedGyaradosSpeechHouseBlackBeltScript, -1 + object_event 6, 5, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, MahoganyRedGyaradosSpeechHouseTeacherScript, -1 diff --git a/maps/MahoganyTown.asm b/maps/MahoganyTown.asm new file mode 100644 index 0000000..5d628c8 --- /dev/null +++ b/maps/MahoganyTown.asm @@ -0,0 +1,271 @@ +DEF MAHOGANYTOWN_RAGECANDYBAR_PRICE EQU 300 + + object_const_def + const MAHOGANYTOWN_POKEFAN_M + const MAHOGANYTOWN_GRAMPS + const MAHOGANYTOWN_FISHER + const MAHOGANYTOWN_LASS + +MahoganyTown_MapScripts: + def_scene_scripts + scene_script MahoganyTownNoop1Scene, SCENE_MAHOGANYTOWN_TRY_RAGECANDYBAR + scene_script MahoganyTownNoop2Scene, SCENE_MAHOGANYTOWN_NOOP + + def_callbacks + callback MAPCALLBACK_NEWMAP, MahoganyTownFlypointCallback + +MahoganyTownNoop1Scene: + end + +MahoganyTownNoop2Scene: + end + +MahoganyTownFlypointCallback: + setflag ENGINE_FLYPOINT_MAHOGANY + endcallback + +MahoganyTownTryARageCandyBarScript: + showemote EMOTE_SHOCK, MAHOGANYTOWN_POKEFAN_M, 15 + applymovement MAHOGANYTOWN_POKEFAN_M, MahoganyTownRageCandyBarMerchantBlocksYouMovement + follow PLAYER, MAHOGANYTOWN_POKEFAN_M + applymovement PLAYER, MahoganyTownPlayerStepLeftMovement + stopfollow + turnobject PLAYER, RIGHT + scall RageCandyBarMerchantScript + applymovement MAHOGANYTOWN_POKEFAN_M, MahoganyTownRageCandyBarMerchantReturnsMovement + end + +MahoganyTownPokefanMScript: + faceplayer +RageCandyBarMerchantScript: + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .ClearedRocketHideout + scall .SellRageCandyBars + end + +.ClearedRocketHideout: + opentext + writetext RageCandyBarMerchantSoldOutText + waitbutton + closetext + end + +.SellRageCandyBars: + opentext + writetext RageCandyBarMerchantTryOneText + special PlaceMoneyTopRight + yesorno + iffalse .Refused + checkmoney YOUR_MONEY, MAHOGANYTOWN_RAGECANDYBAR_PRICE + ifequal HAVE_LESS, .NotEnoughMoney + giveitem RAGECANDYBAR + iffalse .NoRoom + waitsfx + playsound SFX_TRANSACTION + takemoney YOUR_MONEY, MAHOGANYTOWN_RAGECANDYBAR_PRICE + special PlaceMoneyTopRight + writetext RageCandyBarMerchantSavorItText + waitbutton + closetext + end + +.NotEnoughMoney: + writetext RageCandyBarMerchantNotEnoughMoneyText + waitbutton + closetext + end + +.Refused: + writetext RageCandyBarMerchantRefusedText + waitbutton + closetext + end + +.NoRoom: + writetext RageCandyBarMerchantNoRoomText + waitbutton + closetext + end + +MahoganyTownGrampsScript: + faceplayer + opentext + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .ClearedRocketHideout + writetext MahoganyTownGrampsText + waitbutton + closetext + end + +.ClearedRocketHideout: + writetext MahoganyTownGrampsText_ClearedRocketHideout + waitbutton + closetext + end + +MahoganyTownFisherScript: + jumptextfaceplayer MahoganyTownFisherText + +MahoganyTownLassScript: + jumptextfaceplayer MahoganyTownLassText + +MahoganyTownSign: + jumptext MahoganyTownSignText + +MahoganyTownRagecandybarSign: + jumptext MahoganyTownRagecandybarSignText + +MahoganyGymSign: + jumptext MahoganyGymSignText + +MahoganyTownPokecenterSign: + jumpstd PokecenterSignScript + +MahoganyTownCollideDownFaceLeftMovement: ; unreferenced + step DOWN + big_step UP + turn_head DOWN +MahoganyTownPlayerStepLeftMovement: + step LEFT + step_end + +MahoganyTownRageCandyBarMerchantBlocksYouMovement: + step RIGHT + step DOWN + turn_head LEFT + step_end + +MahoganyTownRageCandyBarMerchantReturnsMovement: + step UP + turn_head DOWN + step_end + +RageCandyBarMerchantTryOneText: + text "Hiya, kid!" + + para "I see you're new" + line "in MAHOGANY TOWN." + + para "Since you're new," + line "you should try a" + + para "yummy RAGECANDY-" + line "BAR!" + + para "Right now, it can" + line "be yours for just" + cont "¥300! Want one?" + done + +RageCandyBarMerchantSavorItText: + text "Good! Savor it!" + done + +RageCandyBarMerchantNotEnoughMoneyText: + text "You don't have" + line "enough money." + done + +RageCandyBarMerchantRefusedText: + text "Oh, fine then…" + done + +RageCandyBarMerchantNoRoomText: + text "You don't have" + line "room for this." + done + +RageCandyBarMerchantSoldOutText: + text "RAGECANDYBAR's" + line "sold out." + + para "I'm packing up." + line "Don't bother me," + cont "kiddo." + done + +MahoganyTownGrampsText: + text "Are you off to see" + line "the GYARADOS ram-" + cont "page at the LAKE?" + done + +MahoganyTownGrampsText_ClearedRocketHideout: + text "MAGIKARP have" + line "returned to LAKE" + cont "OF RAGE." + + para "That should be" + line "good news for the" + cont "anglers there." + done + +MahoganyTownFisherText: + text "Since you came" + line "this far, take the" + + para "time to do some" + line "sightseeing." + + para "You should head" + line "north and check" + + para "out LAKE OF RAGE" + line "right now." + done + +MahoganyTownLassText: + text "Visit Grandma's" + line "shop. She sells" + + para "stuff that nobody" + line "else has." + done + +MahoganyTownSignText: + text "MAHOGANY TOWN" + + para "Welcome to the" + line "Home of the Ninja" + done + +MahoganyTownRagecandybarSignText: + text "While visiting" + line "MAHOGANY TOWN, try" + cont "a RAGECANDYBAR!" + done + +MahoganyGymSignText: + text "MAHOGANY TOWN" + line "#MON GYM" + cont "LEADER: PRYCE" + + para "The Teacher of" + line "Winter's Harshness" + done + +MahoganyTown_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 11, 7, MAHOGANY_MART_1F, 1 + warp_event 17, 7, MAHOGANY_RED_GYARADOS_SPEECH_HOUSE, 1 + warp_event 6, 13, MAHOGANY_GYM, 1 + warp_event 15, 13, MAHOGANY_POKECENTER_1F, 1 + warp_event 9, 1, ROUTE_43_MAHOGANY_GATE, 3 + + def_coord_events + coord_event 19, 8, SCENE_MAHOGANYTOWN_TRY_RAGECANDYBAR, MahoganyTownTryARageCandyBarScript + coord_event 19, 9, SCENE_MAHOGANYTOWN_TRY_RAGECANDYBAR, MahoganyTownTryARageCandyBarScript + + def_bg_events + bg_event 1, 5, BGEVENT_READ, MahoganyTownSign + bg_event 9, 7, BGEVENT_READ, MahoganyTownRagecandybarSign + bg_event 3, 13, BGEVENT_READ, MahoganyGymSign + bg_event 16, 13, BGEVENT_READ, MahoganyTownPokecenterSign + + def_object_events + object_event 19, 8, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MahoganyTownPokefanMScript, EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST + object_event 6, 9, SPRITE_GRAMPS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MahoganyTownGrampsScript, -1 + object_event 6, 14, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, MahoganyTownFisherScript, EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_GYM + object_event 12, 8, SPRITE_LASS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MahoganyTownLassScript, EVENT_MAHOGANY_MART_OWNERS diff --git a/maps/MahoganyTown.blk b/maps/MahoganyTown.blk new file mode 100644 index 0000000..02c7edf --- /dev/null +++ b/maps/MahoganyTown.blk @@ -0,0 +1 @@ +qqqilrrrrm^GRZV=GWkiWZWjiGhihqppppppppq \ No newline at end of file diff --git a/maps/ManiasHouse.asm b/maps/ManiasHouse.asm new file mode 100644 index 0000000..ad8d8cf --- /dev/null +++ b/maps/ManiasHouse.asm @@ -0,0 +1,212 @@ + object_const_def + const MANIASHOUSE_ROCKER + +ManiasHouse_MapScripts: + def_scene_scripts + + def_callbacks + +ManiaScript: + faceplayer + opentext + checkevent EVENT_MANIA_TOOK_SHUCKIE_OR_LET_YOU_KEEP_HIM + iftrue .default_postevent + checkevent EVENT_GOT_SHUCKIE + iftrue .alreadyhaveshuckie + writetext ManiaText_AskLookAfterShuckle + yesorno + iffalse .refusetotakeshuckie + special GiveShuckle + iffalse .partyfull + writetext ManiaText_TakeCareOfShuckle + promptbutton + waitsfx + writetext ManiaText_GotShuckle + playsound SFX_KEY_ITEM + waitsfx + closetext + setevent EVENT_GOT_SHUCKIE + end + +.alreadyhaveshuckie + checkflag ENGINE_GOT_SHUCKIE_TODAY + iffalse .returnshuckie + writetext ManiaText_TakeCareOfShuckle + waitbutton + closetext + end + +.partyfull + writetext ManiaText_PartyFull + waitbutton + closetext + end + +.refusetotakeshuckie + writetext ManiaText_IfHeComesBack + waitbutton + closetext + end + +.returnshuckie + writetext ManiaText_CanIHaveMyMonBack + yesorno + iffalse .refused + special ReturnShuckie + ifequal SHUCKIE_WRONG_MON, .wrong + ifequal SHUCKIE_REFUSED, .refused + ifequal SHUCKIE_HAPPY, .superhappy + ifequal SHUCKIE_FAINTED, .default_postevent + ; SHUCKIE_RETURNED + writetext ManiaText_ThankYou + waitbutton + closetext + setevent EVENT_MANIA_TOOK_SHUCKIE_OR_LET_YOU_KEEP_HIM + end + +.wrong + writetext ManiaText_ShuckleNotThere + waitbutton + closetext + end + +.superhappy + writetext ManiaText_ShuckleLikesYou + waitbutton + closetext + setevent EVENT_MANIA_TOOK_SHUCKIE_OR_LET_YOU_KEEP_HIM + end + +.refused + writetext ManiaText_SameAsBeingRobbed + waitbutton + closetext + end + +.nothingleft ; unreferenced + writetext ManiaText_ShuckleIsYourLastMon + waitbutton + closetext + end + +.default_postevent + writetext ManiaText_HappinessSpeech + waitbutton + closetext + end + +ManiasHouseUnusedBookshelf: ; unreferenced + jumpstd PictureBookshelfScript + +ManiaText_AskLookAfterShuckle: + text "I, I'm in shock!" + + para "A guy about your" + line "age with piercing" + + para "eyes and long hair" + line "came in." + + para "He scared me into" + line "giving him my" + cont "prized #MON!" + + para "I still have one" + line "left, but what if" + cont "he comes back?" + + para "You look strong." + line "Could you look" + + para "after my #MON" + line "for a while?" + done + +ManiaText_TakeCareOfShuckle: + text "Oh, thank you!" + + para "Take good care of" + line "it, please!" + done + +ManiaText_GotShuckle: + text " received a" + line "#MON." + done + +ManiaText_PartyFull: + text "Your #MON party" + line "is full." + done + +ManiaText_IfHeComesBack: + text "Oh, no… What'll" + line "I do if he comes" + cont "back?" + done + +ManiaText_CanIHaveMyMonBack: + text "Hi! How's my #-" + line "MON?" + + para "I think I'm safe" + line "now, so may I have" + cont "it back?" + done + +ManiaText_ThankYou: + text "Thank you!" + done + +ManiaText_ShuckleNotThere: + text "Hey, you don't" + line "have my #MON" + cont "with you." + done + +ManiaText_ShuckleLikesYou: + text "My #MON has" + line "come to like you." + + para "All right, you" + line "should keep it." + + para "But promise to" + line "be good to it!" + done + +ManiaText_SameAsBeingRobbed: + text "Oh, no, no… That's" + line "the same as being" + cont "robbed." + done + +ManiaText_HappinessSpeech: + text "For #MON, hap-" + line "piness is being" + + para "with a person who" + line "treats them well." + done + +ManiaText_ShuckleIsYourLastMon: + text "If I take my #-" + line "MON back, what are" + + para "you going to use" + line "in battle?" + done + +ManiasHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CIANWOOD_CITY, 1 + warp_event 3, 7, CIANWOOD_CITY, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 4, SPRITE_ROCKER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ManiaScript, -1 diff --git a/maps/Mart.blk b/maps/Mart.blk new file mode 100644 index 0000000..31e7e80 --- /dev/null +++ b/maps/Mart.blk @@ -0,0 +1 @@ +'+"++++)(+*+++# \ No newline at end of file diff --git a/maps/MobileBattleRoom.asm b/maps/MobileBattleRoom.asm new file mode 100644 index 0000000..1188130 --- /dev/null +++ b/maps/MobileBattleRoom.asm @@ -0,0 +1,79 @@ +MobileBattleRoom_MapScripts: + def_scene_scripts + scene_script MobileBattleRoomInitializeScene, SCENE_MOBILEBATTLEROOM_INITIALIZE + scene_script MobileBattleRoomNoopScene, SCENE_MOBILEBATTLEROOM_NOOP + + def_callbacks + +MobileBattleRoomInitializeScene: + sdefer MobileBattleRoomInitializeAndPreparePokecenter2FScript + end + +MobileBattleRoomNoopScene: + end + +MobileBattleRoomInitializeAndPreparePokecenter2FScript: + setscene SCENE_MOBILEBATTLEROOM_NOOP + setmapscene POKECENTER_2F, SCENE_POKECENTER2F_LEAVE_MOBILE_BATTLE_ROOM + end + +MobileBattleRoomConsoleScript: + refreshscreen + special Function1037c2 + ifequal $1, .one + special Function1037eb + iffalse .false + ifequal $1, .one_ + ifequal $2, .two_ + sjump .false + +.one_ + writetext MobileBattleRoom_HealText + pause 20 + closetext + special FadeOutPalettes + playmusic MUSIC_HEAL + special LoadMapPalettes + pause 60 + special FadeInPalettes + special RestartMapMusic + refreshscreen +.two_ + special StubbedTrainerRankings_Healings + special HealParty + special Function10383c + iftrue .false +.one + special Function10387b + writetext MobileBattleRoom_EstablishingCommsText + waitbutton + reloadmappart + special Function101225 +.false + closetext + end + +MobileBattleRoom_EstablishingCommsText: + text "Establishing" + line "communications…" + done + +MobileBattleRoom_HealText: + text "Your #MON will" + line "be fully healed" + cont "before battle." + done + +MobileBattleRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 7, POKECENTER_2F, 6 + warp_event 5, 7, POKECENTER_2F, 6 + + def_coord_events + + def_bg_events + bg_event 4, 2, BGEVENT_UP, MobileBattleRoomConsoleScript + + def_object_events diff --git a/maps/MobileBattleRoom.blk b/maps/MobileBattleRoom.blk new file mode 100644 index 0000000..a87d959 --- /dev/null +++ b/maps/MobileBattleRoom.blk @@ -0,0 +1 @@ +/1430=587>9<.;:=?-> \ No newline at end of file diff --git a/maps/MobileTradeRoom.asm b/maps/MobileTradeRoom.asm new file mode 100644 index 0000000..96d7535 --- /dev/null +++ b/maps/MobileTradeRoom.asm @@ -0,0 +1,47 @@ +MobileTradeRoom_MapScripts: + def_scene_scripts + scene_script MobileTradeRoomInitializeScene, SCENE_MOBILETRADEROOM_INITIALIZE + scene_script MobileTradeRoomNoopScene, SCENE_MOBILETRADEROOM_NOOP + + def_callbacks + +MobileTradeRoomInitializeScene: + sdefer MobileTradeRoomInitializeAndPreparePokecenter2FScript + end + +MobileTradeRoomNoopScene: + end + +MobileTradeRoomInitializeAndPreparePokecenter2FScript: + setscene SCENE_MOBILETRADEROOM_NOOP + setmapscene POKECENTER_2F, SCENE_POKECENTER2F_LEAVE_MOBILE_TRADE_ROOM + end + +MobileTradeRoomConsoleScript: + refreshscreen + special Function1037c2 + writetext MobileTradeRoom_EstablishingCommsText + waitbutton + reloadmappart + special Function101231 + closetext + end + +MobileTradeRoom_EstablishingCommsText: + text "Establishing" + line "communications…" + done + +MobileTradeRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 7, POKECENTER_2F, 5 + warp_event 5, 7, POKECENTER_2F, 5 + + def_coord_events + + def_bg_events + bg_event 4, 2, BGEVENT_UP, MobileTradeRoomConsoleScript + + def_object_events diff --git a/maps/MobileTradeRoom.blk b/maps/MobileTradeRoom.blk new file mode 100644 index 0000000..fbe5787 --- /dev/null +++ b/maps/MobileTradeRoom.blk @@ -0,0 +1 @@ +/1230=567>9<.;:=?-> \ No newline at end of file diff --git a/maps/MountMoon.asm b/maps/MountMoon.asm new file mode 100644 index 0000000..1d48007 --- /dev/null +++ b/maps/MountMoon.asm @@ -0,0 +1,179 @@ + object_const_def + const MOUNTMOON_RIVAL + +MountMoon_MapScripts: + def_scene_scripts + scene_script MountMoonRivalEncounterScene, SCENE_MOUNTMOON_RIVAL_BATTLE + scene_script MountMoonNoopScene, SCENE_MOUNTMOON_NOOP + + def_callbacks + +MountMoonRivalEncounterScene: + sdefer MountMoonRivalBattleScript + end + +MountMoonNoopScene: + end + +MountMoonRivalBattleScript: + turnobject PLAYER, RIGHT + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + pause 15 + applymovement MOUNTMOON_RIVAL, MountMoonRivalMovementBefore + playmusic MUSIC_RIVAL_ENCOUNTER + opentext + writetext MountMoonRivalTextBefore + waitbutton + closetext + checkevent EVENT_GOT_TOTODILE_FROM_ELM + iftrue .Totodile + checkevent EVENT_GOT_CHIKORITA_FROM_ELM + iftrue .Chikorita + winlosstext MountMoonRivalTextWin, MountMoonRivalTextLoss + setlasttalked MOUNTMOON_RIVAL + loadtrainer RIVAL2, RIVAL2_1_TOTODILE + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .FinishBattle + +.Totodile: + winlosstext MountMoonRivalTextWin, MountMoonRivalTextLoss + setlasttalked MOUNTMOON_RIVAL + loadtrainer RIVAL2, RIVAL2_1_CHIKORITA + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .FinishBattle + +.Chikorita: + winlosstext MountMoonRivalTextWin, MountMoonRivalTextLoss + setlasttalked MOUNTMOON_RIVAL + loadtrainer RIVAL2, RIVAL2_1_CYNDAQUIL + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .FinishBattle + +.FinishBattle: + playmusic MUSIC_RIVAL_AFTER + opentext + writetext MountMoonRivalTextAfter + waitbutton + closetext + applymovement MOUNTMOON_RIVAL, MountMoonRivalMovementAfter + disappear MOUNTMOON_RIVAL + setscene SCENE_MOUNTMOON_NOOP + setevent EVENT_BEAT_RIVAL_IN_MT_MOON + playmapmusic + end + +MountMoonRivalMovementBefore: + step LEFT + step LEFT + step LEFT + step_end + +MountMoonRivalMovementAfter: + step RIGHT + step RIGHT + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +MountMoonRivalTextBefore: + text "<……> <……> <……>" + + para "It's been a while," + line "." + + para "…Since I lost to" + line "you, I thought" + + para "about what I was" + line "lacking with my" + cont "#MON…" + + para "And we came up" + line "with an answer." + + para ", now we'll" + line "show you!" + done + +MountMoonRivalTextWin: + text "<……> <……> <……>" + + para "I thought I raised" + line "my #MON to be" + + para "the best they" + line "could be…" + + para "…But it still " + line "wasn't enough…" + done + +MountMoonRivalTextAfter: + text "<……> <……> <……>" + + para "…You won, fair" + line "and square." + + para "I admit it. But" + line "this isn't the" + cont "end." + + para "I'm going to be" + line "the greatest #-" + cont "MON trainer ever." + + para "Because these guys" + line "are behind me." + + para "…Listen, ." + + para "One of these days" + line "I'm going to prove" + + para "how good I am by" + line "beating you." + done + +MountMoonRivalTextLoss: + text "<……> <……> <……>" + + para "I've repaid my" + line "debt to you." + + para "With my #MON," + line "I'm going to beat" + + para "the CHAMPION and" + line "become the world's" + cont "greatest trainer." + done + +MountMoon_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 3, ROUTE_3, 1 + warp_event 15, 15, ROUTE_4, 1 + warp_event 13, 3, MOUNT_MOON, 7 + warp_event 15, 11, MOUNT_MOON, 8 + warp_event 25, 5, MOUNT_MOON_SQUARE, 1 + warp_event 25, 15, MOUNT_MOON_SQUARE, 2 + warp_event 25, 3, MOUNT_MOON, 3 + warp_event 25, 13, MOUNT_MOON, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 7, 3, SPRITE_RIVAL, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MT_MOON_RIVAL diff --git a/maps/MountMoon.blk b/maps/MountMoon.blk new file mode 100644 index 0000000..2521dba --- /dev/null +++ b/maps/MountMoon.blk @@ -0,0 +1,11 @@ +    +$* +(* #!)+ +)$+  # +(+  + +   + 99 + +!$ +$ # # \ No newline at end of file diff --git a/maps/MountMoonGiftShop.asm b/maps/MountMoonGiftShop.asm new file mode 100644 index 0000000..7c42d91 --- /dev/null +++ b/maps/MountMoonGiftShop.asm @@ -0,0 +1,43 @@ + object_const_def + const MOUNTMOONGIFTSHOP_GRAMPS1 ; morning only + const MOUNTMOONGIFTSHOP_GRAMPS2 ; day only + const MOUNTMOONGIFTSHOP_LASS1 ; morning only + const MOUNTMOONGIFTSHOP_LASS2 ; day only + +MountMoonGiftShop_MapScripts: + def_scene_scripts + + def_callbacks + +MountMoonGiftShopClerkScript: + faceplayer + opentext + pokemart MARTTYPE_STANDARD, MART_MT_MOON + closetext + end + +MountMoonGiftShopLassScript: + jumptextfaceplayer MountMoonGiftShopLassText + +MountMoonGiftShopLassText: + text "When the sun goes" + line "down, CLEFAIRY" + cont "come out to play." + done + +MountMoonGiftShop_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, MOUNT_MOON_SQUARE, 3 + warp_event 4, 7, MOUNT_MOON_SQUARE, 3 + + def_coord_events + + def_bg_events + + def_object_events + object_event 4, 3, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, MORN, 0, OBJECTTYPE_SCRIPT, 0, MountMoonGiftShopClerkScript, -1 + object_event 1, 2, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, DAY, 0, OBJECTTYPE_SCRIPT, 0, MountMoonGiftShopClerkScript, -1 + object_event 1, 6, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, MORN, 0, OBJECTTYPE_SCRIPT, 0, MountMoonGiftShopLassScript, -1 + object_event 5, 4, SPRITE_LASS, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, DAY, 0, OBJECTTYPE_SCRIPT, 0, MountMoonGiftShopLassScript, -1 diff --git a/maps/MountMoonSquare.asm b/maps/MountMoonSquare.asm new file mode 100644 index 0000000..3d9fea3 --- /dev/null +++ b/maps/MountMoonSquare.asm @@ -0,0 +1,151 @@ + object_const_def + const MOUNTMOONSQUARE_FAIRY1 + const MOUNTMOONSQUARE_FAIRY2 + const MOUNTMOONSQUARE_ROCK + +MountMoonSquare_MapScripts: + def_scene_scripts + scene_script MountMoonSquareNoopScene, SCENE_MOUNTMOONSQUARE_CLEFAIRY_DANCE + + def_callbacks + callback MAPCALLBACK_NEWMAP, MountMoonSquareDisappearMoonStoneCallback + callback MAPCALLBACK_OBJECTS, MountMoonSquareDisappearRockCallback + +MountMoonSquareNoopScene: + end + +MountMoonSquareDisappearMoonStoneCallback: + setevent EVENT_MOUNT_MOON_SQUARE_HIDDEN_MOON_STONE + endcallback + +MountMoonSquareDisappearRockCallback: + disappear MOUNTMOONSQUARE_ROCK + endcallback + +ClefairyDance: + checkflag ENGINE_MT_MOON_SQUARE_CLEFAIRY + iftrue .NoDancing + readvar VAR_WEEKDAY + ifnotequal MONDAY, .NoDancing + checktime NITE + iffalse .NoDancing + appear MOUNTMOONSQUARE_FAIRY1 + appear MOUNTMOONSQUARE_FAIRY2 + applymovement PLAYER, PlayerWalksUpToDancingClefairies + pause 15 + appear MOUNTMOONSQUARE_ROCK + turnobject MOUNTMOONSQUARE_FAIRY1, RIGHT + cry CLEFAIRY + waitsfx + pause 30 + follow MOUNTMOONSQUARE_FAIRY1, MOUNTMOONSQUARE_FAIRY2 + cry CLEFAIRY + applymovement MOUNTMOONSQUARE_FAIRY1, ClefairyDanceStep1 + cry CLEFAIRY + applymovement MOUNTMOONSQUARE_FAIRY1, ClefairyDanceStep2 + cry CLEFAIRY + applymovement MOUNTMOONSQUARE_FAIRY1, ClefairyDanceStep3 + cry CLEFAIRY + applymovement MOUNTMOONSQUARE_FAIRY1, ClefairyDanceStep4 + cry CLEFAIRY + applymovement MOUNTMOONSQUARE_FAIRY1, ClefairyDanceStep5 + stopfollow + applymovement MOUNTMOONSQUARE_FAIRY2, ClefairyDanceStep6 + follow MOUNTMOONSQUARE_FAIRY1, MOUNTMOONSQUARE_FAIRY2 + applymovement MOUNTMOONSQUARE_FAIRY1, ClefairyDanceStep7 + stopfollow + turnobject MOUNTMOONSQUARE_FAIRY1, DOWN + pause 10 + showemote EMOTE_SHOCK, MOUNTMOONSQUARE_FAIRY1, 15 + turnobject MOUNTMOONSQUARE_FAIRY1, DOWN + cry CLEFAIRY + pause 15 + follow MOUNTMOONSQUARE_FAIRY1, MOUNTMOONSQUARE_FAIRY2 + applymovement MOUNTMOONSQUARE_FAIRY1, ClefairyFleeMovement + disappear MOUNTMOONSQUARE_FAIRY1 + disappear MOUNTMOONSQUARE_FAIRY2 + stopfollow + clearevent EVENT_MOUNT_MOON_SQUARE_HIDDEN_MOON_STONE + setflag ENGINE_MT_MOON_SQUARE_CLEFAIRY + end + +.NoDancing: + end + +MountMoonSquareHiddenMoonStone: + hiddenitem MOON_STONE, EVENT_MOUNT_MOON_SQUARE_HIDDEN_MOON_STONE + +DontLitterSign: + jumptext DontLitterSignText + +MtMoonSquareRock: + jumpstd SmashRockScript + +PlayerWalksUpToDancingClefairies: + step UP + step_end + +ClefairyDanceStep1: + slow_step DOWN + slow_jump_step DOWN + step_end + +ClefairyDanceStep2: + slow_jump_step RIGHT + step_end + +ClefairyDanceStep3: + slow_step UP + slow_jump_step UP + step_end + +ClefairyDanceStep4: + slow_jump_step LEFT + step_end + +ClefairyDanceStep5: + slow_step DOWN + slow_jump_step DOWN + step_end + +ClefairyDanceStep6: + slow_step DOWN + step_end + +ClefairyDanceStep7: + slow_step RIGHT + step_end + +ClefairyFleeMovement: + step RIGHT + step RIGHT + step RIGHT + jump_step RIGHT + step RIGHT + step RIGHT + step_end + +DontLitterSignText: + text "MT.MOON SQUARE" + line "DON'T LITTER" + done + +MountMoonSquare_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 20, 5, MOUNT_MOON, 5 + warp_event 22, 11, MOUNT_MOON, 6 + warp_event 13, 7, MOUNT_MOON_GIFT_SHOP, 1 + + def_coord_events + coord_event 7, 11, SCENE_MOUNTMOONSQUARE_CLEFAIRY_DANCE, ClefairyDance + + def_bg_events + bg_event 7, 7, BGEVENT_ITEM, MountMoonSquareHiddenMoonStone + bg_event 17, 7, BGEVENT_READ, DontLitterSign + + def_object_events + object_event 6, 6, SPRITE_FAIRY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MT_MOON_SQUARE_CLEFAIRY + object_event 7, 6, SPRITE_FAIRY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MT_MOON_SQUARE_CLEFAIRY + object_event 7, 7, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MtMoonSquareRock, EVENT_MT_MOON_SQUARE_ROCK diff --git a/maps/MountMoonSquare.blk b/maps/MountMoonSquare.blk new file mode 100644 index 0000000..f04b599 --- /dev/null +++ b/maps/MountMoonSquare.blk @@ -0,0 +1,4 @@ +>?????????????;(+WWWW*,,,,+W*)()bQQc$WWW%n()()NttMy + +tn()()NttM{{{ +>??,)()PARO/$*,)(){{{{{{{{{{(,)(,??????????,,)$WWWWWWWWWWWWW% \ No newline at end of file diff --git a/maps/MountMortar1FInside.asm b/maps/MountMortar1FInside.asm new file mode 100644 index 0000000..7cdbd1c --- /dev/null +++ b/maps/MountMortar1FInside.asm @@ -0,0 +1,143 @@ + object_const_def + const MOUNTMORTAR1FINSIDE_BOULDER + const MOUNTMORTAR1FINSIDE_POKE_BALL1 + const MOUNTMORTAR1FINSIDE_POKE_BALL2 + const MOUNTMORTAR1FINSIDE_POKE_BALL3 + const MOUNTMORTAR1FINSIDE_POKE_BALL4 + const MOUNTMORTAR1FINSIDE_POKE_BALL5 + const MOUNTMORTAR1FINSIDE_SUPER_NERD1 + const MOUNTMORTAR1FINSIDE_SUPER_NERD2 + const MOUNTMORTAR1FINSIDE_POKE_BALL6 + const MOUNTMORTAR1FINSIDE_POKE_BALL7 + +MountMortar1FInside_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerPokemaniacMiller: + trainer POKEMANIAC, MILLER, EVENT_BEAT_POKEMANIAC_MILLER, PokemaniacMillerSeenText, PokemaniacMillerBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokemaniacMillerAfterBattleText + waitbutton + closetext + end + +TrainerSupernerdMarkus: + trainer SUPER_NERD, MARKUS, EVENT_BEAT_SUPER_NERD_MARKUS, SupernerdMarkusSeenText, SupernerdMarkusBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SupernerdMarkusAfterBattleText + waitbutton + closetext + end + +MountMortar1FBoulder: + jumpstd StrengthBoulderScript + +MountMortar1FInsideEscapeRope: + itemball ESCAPE_ROPE + +MountMortar1FInsideMaxRevive: + itemball MAX_REVIVE + +MountMortar1FInsideHyperPotion: + itemball HYPER_POTION + +MountMortar1FInsideMaxPotion: + itemball MAX_POTION + +MountMortar1FInsideNugget: + itemball NUGGET + +MountMortar1FInsideIron: + itemball IRON + +MountMortar1FInsideUltraBall: + itemball ULTRA_BALL + +MountMortar1FInsideHiddenMaxRepel: + hiddenitem MAX_REPEL, EVENT_MOUNT_MORTAR_1F_INSIDE_HIDDEN_MAX_REPEL + +PokemaniacMillerSeenText: + text "I'm not losing" + line "this time!" + done + +PokemaniacMillerBeatenText: + text "I lost to some" + line "kid…?" + done + +PokemaniacMillerAfterBattleText: + text "A while back, this" + line "karate dude wanted" + + para "to battle. He was" + line "ridiculously good." + + para "He just thrashed" + line "us silly." + + para "He went in deeper" + line "saying it was for" + + para "his training. I" + line "wonder how he is?" + done + +SupernerdMarkusSeenText: + text "Hey! HUGH!" + done + +SupernerdMarkusBeatenText: + text "I mistook you for" + line "someone else…" + done + +SupernerdMarkusAfterBattleText: + text "I came to explore" + line "MT.MORTAR, but I" + + para "got separated from" + line "my partner…" + + para "Did you run into a" + line "trainer who uses a" + + para "SEADRA that knows" + line "WATERFALL?" + done + +MountMortar1FInside_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 11, 47, MOUNT_MORTAR_1F_OUTSIDE, 5 + warp_event 29, 47, MOUNT_MORTAR_1F_OUTSIDE, 6 + warp_event 5, 39, MOUNT_MORTAR_1F_OUTSIDE, 8 + warp_event 33, 41, MOUNT_MORTAR_1F_OUTSIDE, 9 + warp_event 3, 19, MOUNT_MORTAR_B1F, 1 + warp_event 9, 9, MOUNT_MORTAR_2F_INSIDE, 2 + + def_coord_events + + def_bg_events + bg_event 30, 11, BGEVENT_ITEM, MountMortar1FInsideHiddenMaxRepel + + def_object_events + object_event 21, 43, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MountMortar1FBoulder, -1 + object_event 35, 38, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideEscapeRope, EVENT_MOUNT_MORTAR_1F_INSIDE_ESCAPE_ROPE + object_event 16, 10, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideMaxRevive, EVENT_MOUNT_MORTAR_1F_INSIDE_MAX_REVIVE + object_event 10, 27, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideHyperPotion, EVENT_MOUNT_MORTAR_1F_INSIDE_HYPER_POTION + object_event 22, 20, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideMaxPotion, EVENT_MOUNT_MORTAR_1F_INSIDE_MAX_POTION + object_event 35, 19, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideNugget, EVENT_MOUNT_MORTAR_1F_INSIDE_NUGGET + object_event 33, 43, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacMiller, -1 + object_event 24, 28, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerSupernerdMarkus, -1 + object_event 8, 16, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideIron, EVENT_MOUNT_MORTAR_1F_INSIDE_IRON + object_event 17, 17, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FInsideUltraBall, EVENT_MOUNT_MORTAR_1F_INSIDE_ULTRA_BALL diff --git a/maps/MountMortar1FInside.blk b/maps/MountMortar1FInside.blk new file mode 100644 index 0000000..72ec304 --- /dev/null +++ b/maps/MountMortar1FInside.blk @@ -0,0 +1,29 @@ +   (+((  ++"!)+     +((!! 61 + +)+ +  +  +" )  +  +( + (+191 + + + + 6 +  * +    +"  + <1 6 (*(+ !((+99  +) +      61* 69:* +1 )!!+);()! 89   )  + +* +)*   +!)   ( ) +1! +  (9   +$+!)$ ## \ No newline at end of file diff --git a/maps/MountMortar1FOutside.asm b/maps/MountMortar1FOutside.asm new file mode 100644 index 0000000..4436c3d --- /dev/null +++ b/maps/MountMortar1FOutside.asm @@ -0,0 +1,40 @@ + object_const_def + const MOUNTMORTAR1FOUTSIDE_POKE_BALL1 + const MOUNTMORTAR1FOUTSIDE_POKE_BALL2 + +MountMortar1FOutside_MapScripts: + def_scene_scripts + + def_callbacks + +MountMortar1FOutsideEther: + itemball ETHER + +MountMortar1FOutsideRevive: + itemball REVIVE + +MountMortar1FOutsideHiddenHyperPotion: + hiddenitem HYPER_POTION, EVENT_MOUNT_MORTAR_1F_OUTSIDE_HIDDEN_HYPER_POTION + +MountMortar1FOutside_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 33, ROUTE_42, 3 + warp_event 17, 33, ROUTE_42, 4 + warp_event 37, 33, ROUTE_42, 5 + warp_event 17, 5, MOUNT_MORTAR_2F_INSIDE, 1 + warp_event 11, 21, MOUNT_MORTAR_1F_INSIDE, 1 + warp_event 29, 21, MOUNT_MORTAR_1F_INSIDE, 2 + warp_event 17, 29, MOUNT_MORTAR_B1F, 2 + warp_event 7, 13, MOUNT_MORTAR_1F_INSIDE, 3 + warp_event 33, 13, MOUNT_MORTAR_1F_INSIDE, 4 + + def_coord_events + + def_bg_events + bg_event 25, 22, BGEVENT_ITEM, MountMortar1FOutsideHiddenHyperPotion + + def_object_events + object_event 13, 15, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FOutsideEther, EVENT_MOUNT_MORTAR_1F_OUTSIDE_ETHER + object_event 31, 18, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar1FOutsideRevive, EVENT_MOUNT_MORTAR_1F_OUTSIDE_REVIVE diff --git a/maps/MountMortar1FOutside.blk b/maps/MountMortar1FOutside.blk new file mode 100644 index 0000000..92a7619 --- /dev/null +++ b/maps/MountMortar1FOutside.blk @@ -0,0 +1,20 @@ +-.-........../../-./-.-........../../-./-.....7...././ %&  +   +   + + + + +  +  +  -/ -..../,,,,-.. /-/-/-..7./,,,,-.7-//-/  4,,,,4 -/54 + +54 + 6 + +  +) +(+    +) +$%$& + $ # # # \ No newline at end of file diff --git a/maps/MountMortar2FInside.asm b/maps/MountMortar2FInside.asm new file mode 100644 index 0000000..2b159fc --- /dev/null +++ b/maps/MountMortar2FInside.asm @@ -0,0 +1,86 @@ + object_const_def + const MOUNTMORTAR2FINSIDE_POKE_BALL1 + const MOUNTMORTAR2FINSIDE_POKE_BALL2 + const MOUNTMORTAR2FINSIDE_POKE_BALL3 + const MOUNTMORTAR2FINSIDE_POKE_BALL4 + const MOUNTMORTAR2FINSIDE_POKE_BALL5 + const MOUNTMORTAR2FINSIDE_POKE_BALL6 + const MOUNTMORTAR2FINSIDE_SUPER_NERD + +MountMortar2FInside_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerSupernerdHugh: + trainer SUPER_NERD, HUGH, EVENT_BEAT_SUPER_NERD_HUGH, SupernerdHughSeenText, SupernerdHughBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SupernerdHughAfterBattleText + waitbutton + closetext + end + +MountMortar2FInsideMaxPotion: + itemball MAX_POTION + +MountMortar2FInsideRareCandy: + itemball RARE_CANDY + +MountMortar2FInsideTMDefenseCurl: + itemball TM_DEFENSE_CURL + +MountMortar2FInsideDragonScale: + itemball DRAGON_SCALE + +MountMortar2FInsideElixer: + itemball ELIXER + +MountMortar2FInsideEscapeRope: + itemball ESCAPE_ROPE + +MountMortar2FInsideHiddenFullRestore: + hiddenitem FULL_RESTORE, EVENT_MOUNT_MORTAR_2F_INSIDE_HIDDEN_FULL_RESTORE + +SupernerdHughSeenText: + text "Yo! MARKUS!" + done + +SupernerdHughBeatenText: + text "Sorry, my mistake." + done + +SupernerdHughAfterBattleText: + text "I'm investigating" + line "MT.MORTAR, but my" + cont "pal's gone AWOL." + + para "Have you seen a" + line "trainer who has a" + + para "SLOWPOKE that can" + line "use STRENGTH?" + done + +MountMortar2FInside_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 17, 33, MOUNT_MORTAR_1F_OUTSIDE, 4 + warp_event 3, 5, MOUNT_MORTAR_1F_INSIDE, 6 + + def_coord_events + + def_bg_events + bg_event 24, 8, BGEVENT_ITEM, MountMortar2FInsideHiddenFullRestore + + def_object_events + object_event 28, 22, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar2FInsideMaxPotion, EVENT_MOUNT_MORTAR_2F_INSIDE_MAX_POTION + object_event 2, 33, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar2FInsideRareCandy, EVENT_MOUNT_MORTAR_2F_INSIDE_RARE_CANDY + object_event 19, 17, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar2FInsideTMDefenseCurl, EVENT_MOUNT_MORTAR_2F_INSIDE_TM_DEFENSE_CURL + object_event 16, 5, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar2FInsideDragonScale, EVENT_MOUNT_MORTAR_2F_INSIDE_DRAGON_SCALE + object_event 9, 11, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar2FInsideElixer, EVENT_MOUNT_MORTAR_2F_INSIDE_ELIXER + object_event 28, 5, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortar2FInsideEscapeRope, EVENT_MOUNT_MORTAR_2F_INSIDE_ESCAPE_ROPE + object_event 13, 26, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerSupernerdHugh, -1 diff --git a/maps/MountMortar2FInside.blk b/maps/MountMortar2FInside.blk new file mode 100644 index 0000000..c6006ad --- /dev/null +++ b/maps/MountMortar2FInside.blk @@ -0,0 +1,13 @@ +     +(!!*(*(  + (*1  +)+!!9 +   +>''=1 6+!1)" + !">'=  &%  + +>= !   &%+!1 >'= +&%  +(+)&%&%  !! &% +1!(* +  ! 69"  1 1>= +>'= *>=*&%&2'=)&% >'3% +("$!)(>3%  # \ No newline at end of file diff --git a/maps/MountMortarB1F.asm b/maps/MountMortarB1F.asm new file mode 100644 index 0000000..d4e4c9d --- /dev/null +++ b/maps/MountMortarB1F.asm @@ -0,0 +1,154 @@ + object_const_def + const MOUNTMORTARB1F_POKE_BALL1 + const MOUNTMORTARB1F_POKE_BALL2 + const MOUNTMORTARB1F_BOULDER + const MOUNTMORTARB1F_KIYO + const MOUNTMORTARB1F_POKE_BALL3 + const MOUNTMORTARB1F_POKE_BALL4 + const MOUNTMORTARB1F_POKE_BALL5 + +MountMortarB1F_MapScripts: + def_scene_scripts + + def_callbacks + +MountMortarB1FKiyoScript: + faceplayer + opentext + checkevent EVENT_GOT_TYROGUE_FROM_KIYO + iftrue .GotTyrogue + checkevent EVENT_BEAT_BLACKBELT_KIYO + iftrue .BeatKiyo + writetext MountMortarB1FKiyoIntroText + waitbutton + closetext + winlosstext MountMortarB1FKiyoWinText, 0 + loadtrainer BLACKBELT_T, KIYO + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_BLACKBELT_KIYO + opentext +.BeatKiyo: + writetext MountMortarB1FTyrogueRewardText + promptbutton + waitsfx + readvar VAR_PARTYCOUNT + ifequal PARTY_LENGTH, .NoRoom + writetext MountMortarB1FReceiveMonText + playsound SFX_CAUGHT_MON + waitsfx + givepoke TYROGUE, 10 + setevent EVENT_GOT_TYROGUE_FROM_KIYO +.GotTyrogue: + writetext MountMortarB1FKiyoGotTyrogueText + waitbutton + closetext + end + +.NoRoom: + writetext MountMortarB1FKiyoFullPartyText + waitbutton + closetext + end + +MountMortarB1FBoulder: + jumpstd StrengthBoulderScript + +MountMortarB1FHyperPotion: + itemball HYPER_POTION + +MountMortarB1FCarbos: + itemball CARBOS + +MountMortarB1FFullRestore: + itemball FULL_RESTORE + +MountMortarB1FMaxEther: + itemball MAX_ETHER + +MountMortarB1FPPUp: + itemball PP_UP + +MountMortarB1FHiddenMaxRevive: + hiddenitem MAX_REVIVE, EVENT_MOUNT_MORTAR_B1F_HIDDEN_MAX_REVIVE + +MountMortarB1FKiyoIntroText: + text "Hey!" + + para "I am the KARATE" + line "KING!" + + para "I train alone here" + line "in the dark!" + + para "You!" + line "Battle with me!" + + para "Hwaaarggh!" + done + +MountMortarB1FKiyoWinText: + text "Waaaarggh!" + line "I'm beaten!" + done + +MountMortarB1FTyrogueRewardText: + text "I… I'm crushed…" + + para "My training is" + line "still not enough…" + + para "But a loss is a" + line "loss. I admit it." + + para "As proof that you" + line "defeated me, I'll" + + para "give you a rare" + line "fighting #MON." + done + +MountMortarB1FReceiveMonText: + text " received" + line "TYROGUE." + done + +MountMortarB1FKiyoGotTyrogueText: + text "TYROGUE is a" + line "fighting-type." + + para "It evolves into a" + line "tougher #MON." + + para "Keep up the hard" + line "work. I'll keep" + cont "training too." + + para "Farewell!" + done + +MountMortarB1FKiyoFullPartyText: + text "You have no room" + line "in your party!" + done + +MountMortarB1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 3, MOUNT_MORTAR_1F_INSIDE, 5 + warp_event 19, 29, MOUNT_MORTAR_1F_OUTSIDE, 7 + + def_coord_events + + def_bg_events + bg_event 4, 6, BGEVENT_ITEM, MountMortarB1FHiddenMaxRevive + + def_object_events + object_event 29, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortarB1FHyperPotion, EVENT_MOUNT_MORTAR_B1F_HYPER_POTION + object_event 4, 16, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortarB1FCarbos, EVENT_MOUNT_MORTAR_B1F_CARBOS + object_event 9, 10, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MountMortarB1FBoulder, -1 + object_event 16, 4, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, MountMortarB1FKiyoScript, -1 + object_event 34, 24, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortarB1FFullRestore, EVENT_MOUNT_MORTAR_B1F_FULL_RESTORE + object_event 32, 3, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortarB1FMaxEther, EVENT_MOUNT_MORTAR_B1F_MAX_ETHER + object_event 21, 26, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, MountMortarB1FPPUp, EVENT_MOUNT_MORTAR_B1F_PP_UP diff --git a/maps/MountMortarB1F.blk b/maps/MountMortarB1F.blk new file mode 100644 index 0000000..3e2676a --- /dev/null +++ b/maps/MountMortarB1F.blk @@ -0,0 +1,20 @@ +    ++)  >=  +*)* +>32=* +(  &2'=  )* >32= >'''3%1&%  &% 6&%  &% &% +( >'3% +>'''3% ++ +>3% +&% +*  +&% &%  +>= +&% >3%1  +&% +&% &2=  +&%&%!&%  +&% +1&% &2= +&% &% 61&% )!&%*<&%  \ No newline at end of file diff --git a/maps/MoveDeletersHouse.asm b/maps/MoveDeletersHouse.asm new file mode 100644 index 0000000..4786394 --- /dev/null +++ b/maps/MoveDeletersHouse.asm @@ -0,0 +1,34 @@ + object_const_def + const MOVEDELETERSHOUSE_SUPER_NERD + +MoveDeletersHouse_MapScripts: + def_scene_scripts + + def_callbacks + +MoveDeleter: + faceplayer + opentext + special MoveDeletion + waitbutton + closetext + end + +MoveDeletersHouseBookshelf: + jumpstd DifficultBookshelfScript + +MoveDeletersHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, BLACKTHORN_CITY, 6 + warp_event 3, 7, BLACKTHORN_CITY, 6 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, MoveDeletersHouseBookshelf + bg_event 1, 1, BGEVENT_READ, MoveDeletersHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MoveDeleter, -1 diff --git a/maps/MrFujisHouse.asm b/maps/MrFujisHouse.asm new file mode 100644 index 0000000..28f3591 --- /dev/null +++ b/maps/MrFujisHouse.asm @@ -0,0 +1,98 @@ + object_const_def + const MRFUJISHOUSE_SUPER_NERD + const MRFUJISHOUSE_LASS + const MRFUJISHOUSE_PSYDUCK + const MRFUJISHOUSE_NIDORINO + const MRFUJISHOUSE_PIDGEY + +MrFujisHouse_MapScripts: + def_scene_scripts + + def_callbacks + +MrFujisHouseSuperNerdScript: + jumptextfaceplayer MrFujisHouseSuperNerdText + +MrFujisHouseLassScript: + jumptextfaceplayer MrFujisHouseLassText + +MrFujisPsyduck: + opentext + writetext MrFujisPsyduckText + cry PSYDUCK + waitbutton + closetext + end + +MrFujisNidorino: + opentext + writetext MrFujisNidorinoText + cry NIDORINO + waitbutton + closetext + end + +MrFujisPidgey: + opentext + writetext MrFujisPidgeyText + cry PIDGEY + waitbutton + closetext + end + +MrFujisHouseBookshelf: + jumpstd DifficultBookshelfScript + +MrFujisHouseSuperNerdText: + text "MR.FUJI does live" + line "here, but he's not" + + para "home now." + + para "He should be at" + line "the SOUL HOUSE." + done + +MrFujisHouseLassText: + text "Some cold-hearted" + line "people stop caring" + cont "for their #MON." + + para "Grandpa takes in" + line "the poor homeless" + + para "#MON and takes" + line "care of them." + done + +MrFujisPsyduckText: + text "PSYDUCK: Gu-guwa?" + done + +MrFujisNidorinoText: + text "NIDORINO: Gyun!" + done + +MrFujisPidgeyText: + text "PIDGEY: Pijji!" + done + +MrFujisHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, LAVENDER_TOWN, 2 + warp_event 3, 7, LAVENDER_TOWN, 2 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, MrFujisHouseBookshelf + bg_event 1, 1, BGEVENT_READ, MrFujisHouseBookshelf + + def_object_events + object_event 4, 1, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, MrFujisHouseSuperNerdScript, -1 + object_event 3, 4, SPRITE_LASS, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MrFujisHouseLassScript, -1 + object_event 7, 4, SPRITE_RHYDON, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MrFujisPsyduck, -1 + object_event 5, 5, SPRITE_GROWLITHE, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, MrFujisNidorino, -1 + object_event 1, 3, SPRITE_MOLTRES, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, MrFujisPidgey, -1 diff --git a/maps/MrFujisHouse.blk b/maps/MrFujisHouse.blk new file mode 100644 index 0000000..e75cb97 --- /dev/null +++ b/maps/MrFujisHouse.blk @@ -0,0 +1 @@ +0 1  \ No newline at end of file diff --git a/maps/MrPokemonsHouse.asm b/maps/MrPokemonsHouse.asm new file mode 100644 index 0000000..de0489f --- /dev/null +++ b/maps/MrPokemonsHouse.asm @@ -0,0 +1,391 @@ + object_const_def + const MRPOKEMONSHOUSE_GENTLEMAN + const MRPOKEMONSHOUSE_OAK + +MrPokemonsHouse_MapScripts: + def_scene_scripts + scene_script MrPokemonsHouseMeetMrPokemonScene, SCENE_MRPOKEMONSHOUSE_MEET_MR_POKEMON + scene_script MrPokemonsHouseNoopScene, SCENE_MRPOKEMONSHOUSE_NOOP + + def_callbacks + +MrPokemonsHouseMeetMrPokemonScene: + sdefer MrPokemonsHouseMrPokemonEventScript + end + +MrPokemonsHouseNoopScene: + end + +MrPokemonsHouseMrPokemonEventScript: + showemote EMOTE_SHOCK, MRPOKEMONSHOUSE_GENTLEMAN, 15 + turnobject MRPOKEMONSHOUSE_GENTLEMAN, DOWN + opentext + writetext MrPokemonIntroText1 + waitbutton + closetext + applymovement PLAYER, MrPokemonsHouse_PlayerWalksToMrPokemon + opentext + writetext MrPokemonIntroText2 + promptbutton + waitsfx + giveitem MYSTERY_EGG + writetext MrPokemonsHouse_GotEggText + playsound SFX_KEY_ITEM + waitsfx + itemnotify + setevent EVENT_GOT_MYSTERY_EGG_FROM_MR_POKEMON + blackoutmod CHERRYGROVE_CITY + writetext MrPokemonIntroText3 + promptbutton + turnobject MRPOKEMONSHOUSE_GENTLEMAN, RIGHT + writetext MrPokemonIntroText4 + promptbutton + turnobject MRPOKEMONSHOUSE_GENTLEMAN, DOWN + turnobject MRPOKEMONSHOUSE_OAK, LEFT + writetext MrPokemonIntroText5 + waitbutton + closetext + sjump MrPokemonsHouse_OakScript + +MrPokemonsHouse_MrPokemonScript: + faceplayer + opentext + checkitem RED_SCALE + iftrue .RedScale + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iftrue .AlwaysNewDiscoveries + writetext MrPokemonText_ImDependingOnYou + waitbutton + closetext + end + +.AlwaysNewDiscoveries: + writetext MrPokemonText_AlwaysNewDiscoveries + waitbutton + closetext + end + +.RedScale: + writetext MrPokemonText_GimmeTheScale + yesorno + iffalse .refused + verbosegiveitem EXP_SHARE + iffalse .full + takeitem RED_SCALE + sjump .AlwaysNewDiscoveries + +.refused + writetext MrPokemonText_Disappointed + waitbutton +.full + closetext + end + +MrPokemonsHouse_OakScript: + playmusic MUSIC_PROF_OAK + applymovement MRPOKEMONSHOUSE_OAK, MrPokemonsHouse_OakWalksToPlayer + turnobject PLAYER, RIGHT + opentext + writetext MrPokemonsHouse_OakText1 + promptbutton + waitsfx + writetext MrPokemonsHouse_GetDexText + playsound SFX_ITEM + waitsfx + setflag ENGINE_POKEDEX + writetext MrPokemonsHouse_OakText2 + waitbutton + closetext + turnobject PLAYER, DOWN + applymovement MRPOKEMONSHOUSE_OAK, MrPokemonsHouse_OakExits + playsound SFX_EXIT_BUILDING + disappear MRPOKEMONSHOUSE_OAK + waitsfx + special RestartMapMusic + pause 15 + turnobject PLAYER, UP + opentext + writetext MrPokemonsHouse_MrPokemonHealText + waitbutton + closetext + special FadeBlackQuickly + special ReloadSpritesNoPalettes + playmusic MUSIC_HEAL + special StubbedTrainerRankings_Healings + special HealParty + pause 60 + special FadeInQuickly + special RestartMapMusic + opentext + writetext MrPokemonText_ImDependingOnYou + waitbutton + closetext + setevent EVENT_RIVAL_NEW_BARK_TOWN + setevent EVENT_PLAYERS_HOUSE_1F_NEIGHBOR + clearevent EVENT_PLAYERS_NEIGHBORS_HOUSE_NEIGHBOR + setscene SCENE_MRPOKEMONSHOUSE_NOOP + setmapscene CHERRYGROVE_CITY, SCENE_CHERRYGROVECITY_MEET_RIVAL + setmapscene ELMS_LAB, SCENE_ELMSLAB_MEET_OFFICER + specialphonecall SPECIALCALL_ROBBED + clearevent EVENT_COP_IN_ELMS_LAB + checkevent EVENT_GOT_TOTODILE_FROM_ELM + iftrue .RivalTakesChikorita + checkevent EVENT_GOT_CHIKORITA_FROM_ELM + iftrue .RivalTakesCyndaquil + setevent EVENT_TOTODILE_POKEBALL_IN_ELMS_LAB + end + +.RivalTakesChikorita: + setevent EVENT_CHIKORITA_POKEBALL_IN_ELMS_LAB + end + +.RivalTakesCyndaquil: + setevent EVENT_CYNDAQUIL_POKEBALL_IN_ELMS_LAB + end + +MrPokemonsHouse_ForeignMagazines: + jumptext MrPokemonsHouse_ForeignMagazinesText + +MrPokemonsHouse_BrokenComputer: + jumptext MrPokemonsHouse_BrokenComputerText + +MrPokemonsHouse_StrangeCoins: + jumptext MrPokemonsHouse_StrangeCoinsText + +MrPokemonsHouse_PlayerWalksToMrPokemon: + step RIGHT + step UP + step_end + +MrPokemonsHouse_OakWalksToPlayer: + step DOWN + step LEFT + step LEFT + step_end + +MrPokemonsHouse_OakExits: + step DOWN + step LEFT + turn_head DOWN + step_sleep 2 + step_end + +MrPokemonIntroText1: + text "Hello, hello! You" + line "must be ." + + para "PROF.ELM said that" + line "you would visit." + done + +MrPokemonIntroText2: + text "This is what I" + line "want PROF.ELM to" + cont "examine." + done + +MrPokemonsHouse_GotEggText: + text " received" + line "MYSTERY EGG." + done + +MrPokemonIntroText3: + text "I know a couple" + line "who run a #MON" + cont "DAY-CARE service." + + para "They gave me that" + line "EGG." + + para "I was intrigued," + line "so I sent mail to" + cont "PROF.ELM." + + para "For #MON evolu-" + line "tion, PROF.ELM is" + cont "the authority." + done + +MrPokemonIntroText4: + text "Even PROF.OAK here" + line "recognizes that." + done + +MrPokemonIntroText5: + text "If my assumption" + line "is correct, PROF." + cont "ELM will know it." + done + +MrPokemonsHouse_MrPokemonHealText: + text "You are returning" + line "to PROF.ELM?" + + para "Here. Your #MON" + line "should have some" + cont "rest." + done + +MrPokemonText_ImDependingOnYou: + text "I'm depending on" + line "you!" + done + +MrPokemonText_AlwaysNewDiscoveries: + text "Life is delight-" + line "ful! Always, new" + + para "discoveries to be" + line "made!" + done + +MrPokemonsHouse_OakText1: + text "OAK: Aha! So" + line "you're !" + + para "I'm OAK! A #MON" + line "researcher." + + para "I was just visit-" + line "ing my old friend" + cont "MR.#MON." + + para "I heard you were" + line "running an errand" + + para "for PROF.ELM, so I" + line "waited here." + + para "Oh! What's this?" + line "A rare #MON!" + + para "Let's see…" + + para "Hm, I see!" + + para "I understand why" + line "PROF.ELM gave you" + + para "a #MON for this" + line "errand." + + para "To researchers" + line "like PROF.ELM and" + + para "I, #MON are our" + line "friends." + + para "He saw that you" + line "would treat your" + + para "#MON with love" + line "and care." + + para "…Ah!" + + para "You seem to be" + line "dependable." + + para "How would you like" + line "to help me out?" + + para "See? This is the" + line "latest version of" + cont "#DEX." + + para "It automatically" + line "records data on" + + para "#MON you've" + line "seen or caught." + + para "It's a hi-tech" + line "encyclopedia!" + done + +MrPokemonsHouse_GetDexText: + text " received" + line "#DEX!" + done + +MrPokemonsHouse_OakText2: + text "Go meet many kinds" + line "of #MON and" + + para "complete that" + line "#DEX!" + + para "But I've stayed" + line "too long." + + para "I have to get to" + line "GOLDENROD for my" + cont "usual radio show." + + para ", I'm" + line "counting on you!" + done + +MrPokemonText_GimmeTheScale: + text "Hm? That SCALE!" + line "What's that?" + cont "A red GYARADOS?" + + para "That's rare! " + line "I, I want it…" + + para ", would you" + line "care to trade it?" + + para "I can offer this" + line "EXP.SHARE I got" + cont "from PROF.OAK." + done + +MrPokemonText_Disappointed: + text "That's disappoint-" + line "ing. That happens" + cont "to be very rare." + done + +MrPokemonsHouse_ForeignMagazinesText: + text "It's packed with" + line "foreign magazines." + + para "Can't even read" + line "their titles…" + done + +MrPokemonsHouse_BrokenComputerText: + text "It's a big com-" + line "puter. Hmm. It's" + cont "broken." + done + +MrPokemonsHouse_StrangeCoinsText: + text "A whole pile of" + line "strange coins!" + + para "Maybe they're from" + line "another country…" + done + +MrPokemonsHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ROUTE_30, 2 + warp_event 3, 7, ROUTE_30, 2 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, MrPokemonsHouse_ForeignMagazines + bg_event 1, 1, BGEVENT_READ, MrPokemonsHouse_ForeignMagazines + bg_event 6, 1, BGEVENT_READ, MrPokemonsHouse_BrokenComputer + bg_event 7, 1, BGEVENT_READ, MrPokemonsHouse_BrokenComputer + bg_event 6, 4, BGEVENT_READ, MrPokemonsHouse_StrangeCoins + + def_object_events + object_event 3, 5, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MrPokemonsHouse_MrPokemonScript, -1 + object_event 6, 5, SPRITE_OAK, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_MR_POKEMONS_HOUSE_OAK diff --git a/maps/MrPokemonsHouse.blk b/maps/MrPokemonsHouse.blk new file mode 100644 index 0000000..65564c1 --- /dev/null +++ b/maps/MrPokemonsHouse.blk @@ -0,0 +1 @@ + '(  \ No newline at end of file diff --git a/maps/MrPsychicsHouse.asm b/maps/MrPsychicsHouse.asm new file mode 100644 index 0000000..dc33ffd --- /dev/null +++ b/maps/MrPsychicsHouse.asm @@ -0,0 +1,62 @@ + object_const_def + const MRPSYCHICSHOUSE_FISHING_GURU + +MrPsychicsHouse_MapScripts: + def_scene_scripts + + def_callbacks + +MrPsychic: + faceplayer + opentext + checkevent EVENT_GOT_TM29_PSYCHIC + iftrue .AlreadyGotItem + writetext MrPsychicText1 + promptbutton + verbosegiveitem TM_PSYCHIC_M + iffalse .Done + setevent EVENT_GOT_TM29_PSYCHIC +.AlreadyGotItem: + writetext MrPsychicText2 + waitbutton +.Done: + closetext + end + +MrPsychicsHouseBookshelf: + jumpstd DifficultBookshelfScript + +MrPsychicText1: + text "…" + + para "…" + + para "…" + + para "…I got it!" + + para "You wanted this!" + done + +MrPsychicText2: + text "TM29 is PSYCHIC." + + para "It may lower the" + line "target's SPCL.DEF." + done + +MrPsychicsHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, SAFFRON_CITY, 5 + warp_event 3, 7, SAFFRON_CITY, 5 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, MrPsychicsHouseBookshelf + bg_event 1, 1, BGEVENT_READ, MrPsychicsHouseBookshelf + + def_object_events + object_event 5, 3, SPRITE_FISHING_GURU, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, MrPsychic, -1 diff --git a/maps/NationalPark.asm b/maps/NationalPark.asm new file mode 100644 index 0000000..e99777f --- /dev/null +++ b/maps/NationalPark.asm @@ -0,0 +1,545 @@ + object_const_def + const NATIONALPARK_LASS1 + const NATIONALPARK_POKEFAN_F1 + const NATIONALPARK_TEACHER1 + const NATIONALPARK_YOUNGSTER1 + const NATIONALPARK_YOUNGSTER2 + const NATIONALPARK_TEACHER2 + const NATIONALPARK_PERSIAN + const NATIONALPARK_YOUNGSTER3 + const NATIONALPARK_POKEFAN_F2 + const NATIONALPARK_POKEFAN_M + const NATIONALPARK_LASS2 + const NATIONALPARK_POKE_BALL1 + const NATIONALPARK_GAMEBOY_KID + const NATIONALPARK_POKE_BALL2 + +NationalPark_MapScripts: + def_scene_scripts + + def_callbacks + +NationalParkLassScript: + jumptextfaceplayer NationalParkLassText + +NationalParkPokefanFScript: + jumptextfaceplayer NationalParkPokefanFText + +NationalParkTeacher1Script: + faceplayer + opentext + checkevent EVENT_GOT_QUICK_CLAW + iftrue .GotQuickClaw + writetext NationalParkTeacher1Text + promptbutton + verbosegiveitem QUICK_CLAW + iffalse .NoRoom + setevent EVENT_GOT_QUICK_CLAW +.GotQuickClaw: + writetext NationalParkTeacher1Text_GotQuickClaw + waitbutton +.NoRoom: + closetext + end + +NationalParkYoungster1Script: + jumptextfaceplayer NationalParkYoungster1Text + +NationalParkYoungster2Script: + jumptextfaceplayer NationalParkYoungster2Text + +NationalParkTeacher2Script: + jumptextfaceplayer NationalParkTeacher2Text + +NationalParkPersian: + faceplayer + opentext + writetext NationalParkPersianText + cry PERSIAN + waitbutton + closetext + end + +NationalParkGameboyKidScript: + faceplayer + opentext + writetext NationalParkGameboyKidText + waitbutton + closetext + turnobject NATIONALPARK_GAMEBOY_KID, DOWN + end + +TrainerSchoolboyJack1: + trainer SCHOOLBOY, JACK1, EVENT_BEAT_SCHOOLBOY_JACK, SchoolboyJack1SeenText, SchoolboyJack1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_SCHOOLBOY_JACK + endifjustbattled + opentext + checkflag ENGINE_JACK_READY_FOR_REMATCH + iftrue .Rematch + checkcellnum PHONE_SCHOOLBOY_JACK + iftrue .NumberAccepted + checkevent EVENT_JACK_ASKED_FOR_PHONE_NUMBER + iftrue .AskAgain + writetext SchoolboyJackTradeMonText + promptbutton + setevent EVENT_JACK_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .RequestNumber + +.AskAgain: + scall .AskNumber2 +.RequestNumber: + askforphonenumber PHONE_SCHOOLBOY_JACK + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, SCHOOLBOY, JACK1 + scall .RegisteredNumber + sjump .NumberAccepted + +.Rematch: + scall .RematchStd + winlosstext SchoolboyJack1BeatenText, 0 + readmem wJackFightCount + ifequal 4, .Fight4 + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight4: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight4 +.Fight3: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight3 +.Fight2: + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .LoadFight2 +.Fight1: + checkflag ENGINE_FLYPOINT_OLIVINE + iftrue .LoadFight1 +.LoadFight0: + loadtrainer SCHOOLBOY, JACK1 + startbattle + reloadmapafterbattle + loadmem wJackFightCount, 1 + clearflag ENGINE_JACK_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer SCHOOLBOY, JACK2 + startbattle + reloadmapafterbattle + loadmem wJackFightCount, 2 + clearflag ENGINE_JACK_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer SCHOOLBOY, JACK3 + startbattle + reloadmapafterbattle + loadmem wJackFightCount, 3 + clearflag ENGINE_JACK_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer SCHOOLBOY, JACK4 + startbattle + reloadmapafterbattle + loadmem wJackFightCount, 4 + clearflag ENGINE_JACK_READY_FOR_REMATCH + end + +.LoadFight4: + loadtrainer SCHOOLBOY, JACK5 + startbattle + reloadmapafterbattle + clearflag ENGINE_JACK_READY_FOR_REMATCH + end + +.AskNumber1: + jumpstd AskNumber1MScript + end + +.AskNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberMScript + end + +.NumberAccepted: + jumpstd NumberAcceptedMScript + end + +.NumberDeclined: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.RematchStd: + jumpstd RematchMScript + end + +TrainerPokefanmWilliam: + trainer POKEFANM, WILLIAM, EVENT_BEAT_POKEFANM_WILLIAM, PokefanmWilliamSeenText, PokefanmWilliamBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanmWilliamAfterBattleText + waitbutton + closetext + end + +TrainerPokefanfBeverly1: + trainer POKEFANF, BEVERLY1, EVENT_BEAT_POKEFANF_BEVERLY, PokefanfBeverly1SeenText, PokefanfBeverly1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_POKEFAN_BEVERLY + endifjustbattled + opentext + checkflag ENGINE_BEVERLY_HAS_NUGGET + iftrue .GiveNugget + checkcellnum PHONE_POKEFAN_BEVERLY + iftrue .NumberAccepted + checkpoke MARILL + iffalse .NoMarill + checkevent EVENT_BEVERLY_ASKED_FOR_PHONE_NUMBER + iftrue .AskAgain + writetext PokefanBeverlyCuteMonText + promptbutton + setevent EVENT_BEVERLY_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .RequestNumber + +.AskAgain: + scall .AskNumber2 +.RequestNumber: + askforphonenumber PHONE_POKEFAN_BEVERLY + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, POKEFANF, BEVERLY1 + scall .RegisteredNumber + sjump .NumberAccepted + +.GiveNugget: + scall .Gift + verbosegiveitem NUGGET + iffalse .NoRoom + clearflag ENGINE_BEVERLY_HAS_NUGGET + sjump .NumberAccepted + +.NoRoom: + sjump .PackFull + +.NoMarill: + writetext PokefanFBeverlyMarillFriendText + waitbutton + closetext + end + +.AskNumber1: + jumpstd AskNumber1FScript + end + +.AskNumber2: + jumpstd AskNumber2FScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberFScript + end + +.NumberAccepted: + jumpstd NumberAcceptedFScript + end + +.NumberDeclined: + jumpstd NumberDeclinedFScript + end + +.PhoneFull: + jumpstd PhoneFullFScript + end + +.Gift: + jumpstd GiftFScript + end + +.PackFull: + jumpstd PackFullFScript + end + +TrainerLassKrise: + trainer LASS, KRISE, EVENT_BEAT_LASS_KRISE, LassKriseSeenText, LassKriseBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext LassKriseAfterBattleText + waitbutton + closetext + end + +NationalParkRelaxationSquareSign: + jumptext NationalParkRelaxationSquareText + +NationalParkBattleNoticeSign: + jumptext NationalParkBattleNoticeText + +NationalParkTrainerTipsSign: + jumptext NationalParkTrainerTipsText + +NationalParkParlyzHeal: + itemball PARLYZ_HEAL + +NationalParkTMDig: + itemball TM_DIG + +NationalParkHiddenFullHeal: + hiddenitem FULL_HEAL, EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL + +NationalParkLassText: + text "Look! Check out my" + line "bag!" + + para "I printed out my" + line "favorites from my" + + para "#DEX and stuck" + line "them on my bag." + done + +NationalParkPokefanFText: + text "This is MAIL I got" + line "from my daughter." + cont "It cheers me up." + done + +NationalParkTeacher1Text: + text "Pay attention," + line "please!" + + para "…Oops, I have to" + line "quit thinking like" + + para "a teacher all the" + line "time." + + para "You must be a" + line "#MON trainer." + + para "Since you're work-" + line "ing so hard, I" + + para "want you to have" + line "this." + done + +NationalParkTeacher1Text_GotQuickClaw: + text "Let a #MON hold" + line "that QUICK CLAW." + + para "Sometimes it will" + line "strike first" + cont "during battle." + done + +NationalParkYoungster1Text: + text "I'm playing with" + line "stickers I printed" + cont "from my #DEX." + done + +NationalParkYoungster2Text: + text "I get the other" + line "guy's #DEX" + cont "sticker if I win." + done + +NationalParkTeacher2Text: + text "I take walks in" + line "the PARK, but I" + + para "never go into the" + line "grass." + + para "Trainers always" + line "want to battle…" + done + +NationalParkPersianText: + text "PERSIAN: Fufushaa!" + done + +NationalParkGameboyKidText: + text "I'm printing out" + line "my #DEX." + + para "You can also print" + line "out stuff like" + + para "MAIL and your PC" + line "BOXES." + done + +SchoolboyJack1SeenText: + text "The world of" + line "#MON is deep." + + para "There are still" + line "lots of things we" + cont "don't know." + + para "But I know more" + line "than you do!" + done + +SchoolboyJack1BeatenText: + text "Wha-wha-what?" + done + +SchoolboyJackTradeMonText: + text "There is a lot" + line "to learn." + + para "For example…" + + para "There are {d:NUM_TMS} kinds" + line "of TMs." + + para "Traded #MON" + line "level up faster." + done + +PokefanfBeverly1SeenText: + text "My #MON are" + line "simply darling." + + para "Let me tell you" + line "how proud my" + cont "darlings make me." + done + +PokefanfBeverly1BeatenText: + text "I can beat you in" + line "pride, but…" + done + +PokefanBeverlyCuteMonText: + text "I must say, your" + line "#MON are quite" + cont "cute, too." + done + +PokefanmWilliamSeenText: + text "We adore our #-" + line "MON, even if they" + cont "dislike us." + + para "That's what being" + line "a FAN is about." + done + +PokefanmWilliamBeatenText: + text "M-my #MON!" + done + +PokefanmWilliamAfterBattleText: + text "I lost the battle," + line "but my #MON win" + + para "the prize for" + line "being most lovely." + done + +PokefanFBeverlyMarillFriendText: + text "My friend keeps a" + line "MARILL!" + + para "I find them very" + line "endearing." + + para "Oh, I wish for a" + line "MARILL of my own…" + done + +LassKriseSeenText: + text "Hello? Why are you" + line "staring at me?" + + para "Oh, a battle?" + done + +LassKriseBeatenText: + text "…Hmmm…" + done + +LassKriseAfterBattleText: + text "I thought you were" + line "staring at me" + cont "because I'm cute!" + done + +NationalParkRelaxationSquareText: + text "RELAXATION SQUARE" + line "NATIONAL PARK" + done + +NationalParkBattleNoticeText: + text "What is this" + line "notice?" + + para "Please battle only" + line "in the grass." + + para "NATIONAL PARK" + line "WARDEN'S OFFICE" + done + +NationalParkTrainerTipsText: + text "TRAINER TIPS" + + para "Print out MAIL by" + line "opening it then" + cont "pressing START." + done + +NationalPark_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 33, 18, ROUTE_36_NATIONAL_PARK_GATE, 1 + warp_event 33, 19, ROUTE_36_NATIONAL_PARK_GATE, 2 + warp_event 10, 47, ROUTE_35_NATIONAL_PARK_GATE, 1 + warp_event 11, 47, ROUTE_35_NATIONAL_PARK_GATE, 2 + + def_coord_events + + def_bg_events + bg_event 14, 44, BGEVENT_READ, NationalParkRelaxationSquareSign + bg_event 27, 31, BGEVENT_READ, NationalParkBattleNoticeSign + bg_event 6, 47, BGEVENT_ITEM, NationalParkHiddenFullHeal + bg_event 12, 4, BGEVENT_READ, NationalParkTrainerTipsSign + + def_object_events + object_event 15, 24, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, NationalParkLassScript, -1 + object_event 14, 4, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkPokefanFScript, -1 + object_event 27, 40, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, NationalParkTeacher1Script, -1 + object_event 11, 41, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkYoungster1Script, -1 + object_event 10, 41, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, NationalParkYoungster2Script, -1 + object_event 17, 41, SPRITE_TEACHER, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkTeacher2Script, -1 + object_event 26, 40, SPRITE_GROWLITHE, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkPersian, -1 + object_event 27, 23, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSchoolboyJack1, -1 + object_event 18, 29, SPRITE_POKEFAN_F, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerPokefanfBeverly1, -1 + object_event 16, 9, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerPokefanmWilliam, -1 + object_event 8, 14, SPRITE_LASS, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerLassKrise, -1 + object_event 35, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, NationalParkParlyzHeal, EVENT_NATIONAL_PARK_PARLYZ_HEAL + object_event 26, 6, SPRITE_GAMEBOY_KID, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NationalParkGameboyKidScript, -1 + object_event 1, 43, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, NationalParkTMDig, EVENT_NATIONAL_PARK_TM_DIG diff --git a/maps/NationalPark.blk b/maps/NationalPark.blk new file mode 100644 index 0000000..9b41b2c --- /dev/null +++ b/maps/NationalPark.blk @@ -0,0 +1,2 @@ +'+'+'+'+'+ ()*45 ,-.:8?39; 012 67  #####'+/<===> +()*,-.012 \ No newline at end of file diff --git a/maps/NationalParkBugContest.asm b/maps/NationalParkBugContest.asm new file mode 100644 index 0000000..ba623ea --- /dev/null +++ b/maps/NationalParkBugContest.asm @@ -0,0 +1,250 @@ + object_const_def + const NATIONALPARKBUGCONTEST_YOUNGSTER1 + const NATIONALPARKBUGCONTEST_YOUNGSTER2 + const NATIONALPARKBUGCONTEST_ROCKER + const NATIONALPARKBUGCONTEST_POKEFAN_M + const NATIONALPARKBUGCONTEST_YOUNGSTER3 + const NATIONALPARKBUGCONTEST_YOUNGSTER4 + const NATIONALPARKBUGCONTEST_LASS + const NATIONALPARKBUGCONTEST_YOUNGSTER5 + const NATIONALPARKBUGCONTEST_YOUNGSTER6 + const NATIONALPARKBUGCONTEST_YOUNGSTER7 + const NATIONALPARKBUGCONTEST_POKE_BALL1 + const NATIONALPARKBUGCONTEST_POKE_BALL2 + +NationalParkBugContest_MapScripts: + def_scene_scripts + + def_callbacks + +BugCatchingContestant1AScript: + faceplayer + opentext + writetext BugCatchingContestant1AText + waitbutton + closetext + end + +BugCatchingContestant2AScript: + faceplayer + opentext + writetext BugCatchingContestant2AText + waitbutton + closetext + end + +BugCatchingContestant3AScript: + faceplayer + opentext + writetext BugCatchingContestant3AText + waitbutton + closetext + end + +BugCatchingContestant4AScript: + faceplayer + opentext + writetext BugCatchingContestant4AText + waitbutton + closetext + end + +BugCatchingContestant5AScript: + faceplayer + opentext + writetext BugCatchingContestant5AText + waitbutton + closetext + end + +BugCatchingContestant6AScript: + faceplayer + opentext + writetext BugCatchingContestant6AText + waitbutton + closetext + end + +BugCatchingContestant7AScript: + faceplayer + opentext + writetext BugCatchingContestant7AText + waitbutton + closetext + end + +BugCatchingContestant8AScript: + faceplayer + opentext + writetext BugCatchingContestant8AText + waitbutton + closetext + end + +BugCatchingContestant9AScript: + faceplayer + opentext + writetext BugCatchingContestant9AText + waitbutton + closetext + end + +BugCatchingContestant10AScript: + faceplayer + opentext + writetext BugCatchingContestant10AText + waitbutton + closetext + end + +NationalParkBugContestRelaxationSquareSign: + jumptext NationalParkBugContestRelaxationSquareText + +NationalParkBugContestBattleNoticeSign: + jumptext NationalParkBugContestBattleNoticeText + +NationalParkBugContestTrainerTipsSign: + jumptext NationalParkBugContestTrainerTipsText + +NationalParkBugContestParlyzHeal: + itemball PARLYZ_HEAL + +NationalParkBugContestTMDig: + itemball TM_DIG + +NationalParkBugContestHiddenFullHeal: + hiddenitem FULL_HEAL, EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL + +BugCatchingContestant1AText: + text "DON: I'm going to" + line "win! Don't bother" + cont "me." + done + +BugCatchingContestant2AText: + text "ED: My PARASECT" + line "puts #MON to" + cont "sleep with SPORE." + done + +BugCatchingContestant3AText: + text "NICK: I'm raising" + line "fast #MON for" + cont "battles." + done + +BugCatchingContestant4AText: + text "WILLIAM: I'm not" + line "concerned about" + cont "winning." + + para "I'm just looking" + line "for rare #MON." + done + +BugCatchingContestant5AText: + text "BENNY: Ssh! You'll" + line "scare off SCYTHER." + + para "I'll talk to you" + line "later." + done + +BugCatchingContestant6AText: + text "BARRY: You should" + line "weaken bug #MON" + + para "first, then throw" + line "a BALL." + done + +BugCatchingContestant7AText: + text "CINDY: I love bug" + line "#MON." + + para "I guess you must" + line "like them too." + done + +BugCatchingContestant8AText: + text "JOSH: I've been" + line "collecting bug" + + para "#MON since I" + line "was just a baby." + + para "There's no way I'm" + line "going to lose!" + done + +BugCatchingContestant9AText: + text "SAMUEL: If you've" + line "got the time to" + + para "chat, go find some" + line "bug #MON." + done + +BugCatchingContestant10AText: + text "KIPP: I've studied" + line "about bug #MON" + cont "a lot." + + para "I'm going to win" + line "for sure." + done + +NationalParkBugContestRelaxationSquareText: + text "RELAXATION SQUARE" + line "NATIONAL PARK" + done + +NationalParkBugContestBattleNoticeText: + text "What is this" + line "notice?" + + para "Please battle only" + line "in the grass." + + para "NATIONAL PARK" + line "WARDEN'S OFFICE" + done + +NationalParkBugContestTrainerTipsText: + text "TRAINER TIPS" + + para "Print out MAIL by" + line "opening it then" + cont "pressing START." + done + +NationalParkBugContest_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 33, 18, ROUTE_36_NATIONAL_PARK_GATE, 1 + warp_event 33, 19, ROUTE_36_NATIONAL_PARK_GATE, 1 + warp_event 10, 47, ROUTE_35_NATIONAL_PARK_GATE, 1 + warp_event 11, 47, ROUTE_35_NATIONAL_PARK_GATE, 1 + + def_coord_events + + def_bg_events + bg_event 14, 44, BGEVENT_READ, NationalParkBugContestRelaxationSquareSign + bg_event 27, 31, BGEVENT_READ, NationalParkBugContestBattleNoticeSign + bg_event 6, 47, BGEVENT_ITEM, NationalParkBugContestHiddenFullHeal + bg_event 12, 4, BGEVENT_READ, NationalParkBugContestTrainerTipsSign + + def_object_events + object_event 19, 29, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant1AScript, EVENT_BUG_CATCHING_CONTESTANT_1A + object_event 28, 22, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant2AScript, EVENT_BUG_CATCHING_CONTESTANT_2A + object_event 9, 18, SPRITE_ROCKER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant3AScript, EVENT_BUG_CATCHING_CONTESTANT_3A + object_event 7, 13, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WALK_UP_DOWN, 1, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant4AScript, EVENT_BUG_CATCHING_CONTESTANT_4A + object_event 23, 9, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant5AScript, EVENT_BUG_CATCHING_CONTESTANT_5A + object_event 27, 13, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 3, 3, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant6AScript, EVENT_BUG_CATCHING_CONTESTANT_6A + object_event 7, 23, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant7AScript, EVENT_BUG_CATCHING_CONTESTANT_7A + object_event 11, 27, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant8AScript, EVENT_BUG_CATCHING_CONTESTANT_8A + object_event 16, 8, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant9AScript, EVENT_BUG_CATCHING_CONTESTANT_9A + object_event 17, 34, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 3, 3, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant10AScript, EVENT_BUG_CATCHING_CONTESTANT_10A + object_event 35, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, NationalParkBugContestParlyzHeal, EVENT_NATIONAL_PARK_PARLYZ_HEAL + object_event 1, 43, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, NationalParkBugContestTMDig, EVENT_NATIONAL_PARK_TM_DIG diff --git a/maps/NewBarkTown.asm b/maps/NewBarkTown.asm new file mode 100644 index 0000000..9fcc113 --- /dev/null +++ b/maps/NewBarkTown.asm @@ -0,0 +1,304 @@ + object_const_def + const NEWBARKTOWN_TEACHER + const NEWBARKTOWN_FISHER + const NEWBARKTOWN_RIVAL + +NewBarkTown_MapScripts: + def_scene_scripts + scene_script NewBarkTownNoop1Scene, SCENE_NEWBARKTOWN_TEACHER_STOPS_YOU + scene_script NewBarkTownNoop2Scene, SCENE_NEWBARKTOWN_NOOP + + def_callbacks + callback MAPCALLBACK_NEWMAP, NewBarkTownFlypointCallback + +NewBarkTownNoop1Scene: + end + +NewBarkTownNoop2Scene: + end + +NewBarkTownFlypointCallback: + setflag ENGINE_FLYPOINT_NEW_BARK + clearevent EVENT_FIRST_TIME_BANKING_WITH_MOM + endcallback + +NewBarkTown_TeacherStopsYouScene1: + playmusic MUSIC_MOM + turnobject NEWBARKTOWN_TEACHER, LEFT + opentext + writetext Text_WaitPlayer + waitbutton + closetext + turnobject PLAYER, RIGHT + applymovement NEWBARKTOWN_TEACHER, NewBarkTown_TeacherRunsToYouMovement1 + opentext + writetext Text_WhatDoYouThinkYoureDoing + waitbutton + closetext + follow NEWBARKTOWN_TEACHER, PLAYER + applymovement NEWBARKTOWN_TEACHER, NewBarkTown_TeacherBringsYouBackMovement1 + stopfollow + opentext + writetext Text_ItsDangerousToGoAlone + waitbutton + closetext + special RestartMapMusic + end + +NewBarkTown_TeacherStopsYouScene2: + playmusic MUSIC_MOM + turnobject NEWBARKTOWN_TEACHER, LEFT + opentext + writetext Text_WaitPlayer + waitbutton + closetext + turnobject PLAYER, RIGHT + applymovement NEWBARKTOWN_TEACHER, NewBarkTown_TeacherRunsToYouMovement2 + turnobject PLAYER, UP + opentext + writetext Text_WhatDoYouThinkYoureDoing + waitbutton + closetext + follow NEWBARKTOWN_TEACHER, PLAYER + applymovement NEWBARKTOWN_TEACHER, NewBarkTown_TeacherBringsYouBackMovement2 + stopfollow + opentext + writetext Text_ItsDangerousToGoAlone + waitbutton + closetext + special RestartMapMusic + end + +NewBarkTownTeacherScript: + faceplayer + opentext + checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST + iftrue .CallMom + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iftrue .TellMomYoureLeaving + checkevent EVENT_GOT_A_POKEMON_FROM_ELM + iftrue .MonIsAdorable + writetext Text_GearIsImpressive + waitbutton + closetext + end + +.MonIsAdorable: + writetext Text_YourMonIsAdorable + waitbutton + closetext + end + +.TellMomYoureLeaving: + writetext Text_TellMomIfLeaving + waitbutton + closetext + end + +.CallMom: + writetext Text_CallMomOnGear + waitbutton + closetext + end + +NewBarkTownFisherScript: + jumptextfaceplayer Text_ElmDiscoveredNewMon + +NewBarkTownRivalScript: + opentext + writetext NewBarkTownRivalText1 + waitbutton + closetext + turnobject NEWBARKTOWN_RIVAL, LEFT + opentext + writetext NewBarkTownRivalText2 + waitbutton + closetext + follow PLAYER, NEWBARKTOWN_RIVAL + applymovement PLAYER, NewBarkTown_RivalPushesYouAwayMovement + stopfollow + pause 5 + turnobject NEWBARKTOWN_RIVAL, DOWN + pause 5 + playsound SFX_TACKLE + applymovement PLAYER, NewBarkTown_RivalShovesYouOutMovement + applymovement NEWBARKTOWN_RIVAL, NewBarkTown_RivalReturnsToTheShadowsMovement + end + +NewBarkTownSign: + jumptext NewBarkTownSignText + +NewBarkTownPlayersHouseSign: + jumptext NewBarkTownPlayersHouseSignText + +NewBarkTownElmsLabSign: + jumptext NewBarkTownElmsLabSignText + +NewBarkTownElmsHouseSign: + jumptext NewBarkTownElmsHouseSignText + +NewBarkTown_TeacherRunsToYouMovement1: + step LEFT + step LEFT + step LEFT + step LEFT + step_end + +NewBarkTown_TeacherRunsToYouMovement2: + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + turn_head DOWN + step_end + +NewBarkTown_TeacherBringsYouBackMovement1: + step RIGHT + step RIGHT + step RIGHT + step RIGHT + turn_head LEFT + step_end + +NewBarkTown_TeacherBringsYouBackMovement2: + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + turn_head LEFT + step_end + +NewBarkTown_RivalPushesYouAwayMovement: + turn_head UP + step DOWN + step_end + +NewBarkTown_RivalShovesYouOutMovement: + turn_head UP + fix_facing + jump_step DOWN + remove_fixed_facing + step_end + +NewBarkTown_RivalReturnsToTheShadowsMovement: + step RIGHT + step_end + +Text_GearIsImpressive: + text "Wow, your #GEAR" + line "is impressive!" + + para "Did your mom get" + line "it for you?" + done + +Text_WaitPlayer: + text "Wait, !" + done + +Text_WhatDoYouThinkYoureDoing: + text "What do you think" + line "you're doing?" + done + +Text_ItsDangerousToGoAlone: + text "It's dangerous to" + line "go out without a" + cont "#MON!" + + para "Wild #MON" + line "jump out of the" + + para "grass on the way" + line "to the next town." + done + +Text_YourMonIsAdorable: + text "Oh! Your #MON" + line "is adorable!" + cont "I wish I had one!" + done + +Text_TellMomIfLeaving: + text "Hi, !" + line "Leaving again?" + + para "You should tell" + line "your mom if you" + cont "are leaving." + done + +Text_CallMomOnGear: + text "Call your mom on" + line "your #GEAR to" + + para "let her know how" + line "you're doing." + done + +Text_ElmDiscoveredNewMon: + text "Yo, !" + + para "I hear PROF.ELM" + line "discovered some" + cont "new #MON." + done + +NewBarkTownRivalText1: + text "<……>" + + para "So this is the" + line "famous ELM #MON" + cont "LAB…" + done + +NewBarkTownRivalText2: + text "…What are you" + line "staring at?" + done + +NewBarkTownSignText: + text "NEW BARK TOWN" + + para "The Town Where the" + line "Winds of a New" + cont "Beginning Blow" + done + +NewBarkTownPlayersHouseSignText: + text "'s House" + done + +NewBarkTownElmsLabSignText: + text "ELM #MON LAB" + done + +NewBarkTownElmsHouseSignText: + text "ELM'S HOUSE" + done + +NewBarkTown_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 6, 3, ELMS_LAB, 1 + warp_event 13, 5, PLAYERS_HOUSE_1F, 1 + warp_event 3, 11, PLAYERS_NEIGHBORS_HOUSE, 1 + warp_event 11, 13, ELMS_HOUSE, 1 + + def_coord_events + coord_event 1, 8, SCENE_NEWBARKTOWN_TEACHER_STOPS_YOU, NewBarkTown_TeacherStopsYouScene1 + coord_event 1, 9, SCENE_NEWBARKTOWN_TEACHER_STOPS_YOU, NewBarkTown_TeacherStopsYouScene2 + + def_bg_events + bg_event 8, 8, BGEVENT_READ, NewBarkTownSign + bg_event 11, 5, BGEVENT_READ, NewBarkTownPlayersHouseSign + bg_event 3, 3, BGEVENT_READ, NewBarkTownElmsLabSign + bg_event 9, 13, BGEVENT_READ, NewBarkTownElmsHouseSign + + def_object_events + object_event 6, 8, SPRITE_TEACHER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NewBarkTownTeacherScript, -1 + object_event 12, 9, SPRITE_FISHER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, NewBarkTownFisherScript, -1 + object_event 3, 2, SPRITE_RIVAL, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, NewBarkTownRivalScript, EVENT_RIVAL_NEW_BARK_TOWN diff --git a/maps/NewBarkTown.blk b/maps/NewBarkTown.blk new file mode 100644 index 0000000..4cec021 --- /dev/null +++ b/maps/NewBarkTown.blk @@ -0,0 +1 @@ +GwGTEXbGbeeb \ No newline at end of file diff --git a/maps/NorthSouthGate.blk b/maps/NorthSouthGate.blk new file mode 100644 index 0000000..d4e3831 --- /dev/null +++ b/maps/NorthSouthGate.blk @@ -0,0 +1,2 @@ +    + \ No newline at end of file diff --git a/maps/OaksLab.asm b/maps/OaksLab.asm new file mode 100644 index 0000000..0551ede --- /dev/null +++ b/maps/OaksLab.asm @@ -0,0 +1,288 @@ + object_const_def + const OAKSLAB_OAK + const OAKSLAB_SCIENTIST1 + const OAKSLAB_SCIENTIST2 + const OAKSLAB_SCIENTIST3 + +OaksLab_MapScripts: + def_scene_scripts + + def_callbacks + +OaksLabNoopScene: ; unreferenced + end + +Oak: + faceplayer + opentext + checkevent EVENT_OPENED_MT_SILVER + iftrue .CheckPokedex + checkevent EVENT_TALKED_TO_OAK_IN_KANTO + iftrue .CheckBadges + writetext OakWelcomeKantoText + promptbutton + setevent EVENT_TALKED_TO_OAK_IN_KANTO +.CheckBadges: + readvar VAR_BADGES + ifequal NUM_BADGES, .OpenMtSilver + ifequal NUM_JOHTO_BADGES, .Complain + sjump .AhGood + +.CheckPokedex: + writetext OakLabDexCheckText + waitbutton + special ProfOaksPCBoot + writetext OakLabGoodbyeText + waitbutton + closetext + end + +.OpenMtSilver: + writetext OakOpenMtSilverText + promptbutton + setevent EVENT_OPENED_MT_SILVER + sjump .CheckPokedex + +.Complain: + writetext OakNoKantoBadgesText + promptbutton + sjump .CheckPokedex + +.AhGood: + writetext OakYesKantoBadgesText + promptbutton + sjump .CheckPokedex + +OaksAssistant1Script: + jumptextfaceplayer OaksAssistant1Text + +OaksAssistant2Script: + jumptextfaceplayer OaksAssistant2Text + +OaksAssistant3Script: + jumptextfaceplayer OaksAssistant3Text + +OaksLabBookshelf: + jumpstd DifficultBookshelfScript + +OaksLabPoster1: + jumptext OaksLabPoster1Text + +OaksLabPoster2: + jumptext OaksLabPoster2Text + +OaksLabTrashcan: + jumptext OaksLabTrashcanText + +OaksLabPC: + jumptext OaksLabPCText + +OakWelcomeKantoText: + text "OAK: Ah, !" + line "It's good of you" + + para "to come all this" + line "way to KANTO." + + para "What do you think" + line "of the trainers" + + para "out here?" + line "Pretty tough, huh?" + done + +OakLabDexCheckText: + text "How is your #-" + line "DEX coming?" + + para "Let's see…" + done + +OakLabGoodbyeText: + text "If you're in the" + line "area, I hope you" + cont "come visit again." + done + +OakOpenMtSilverText: + text "OAK: Wow! That's" + line "excellent!" + + para "You collected the" + line "BADGES of GYMS in" + cont "KANTO. Well done!" + + para "I was right in my" + line "assessment of you." + + para "Tell you what," + line ". I'll make" + + para "arrangements so" + line "that you can go to" + cont "MT.SILVER." + + para "MT.SILVER is a big" + line "mountain that is" + + para "home to many wild" + line "#MON." + + para "It's too dangerous" + line "for your average" + + para "trainer, so it's" + line "off limits. But" + + para "we can make an" + line "exception in your" + cont "case, ." + + para "Go up to INDIGO" + line "PLATEAU. You can" + + para "reach MT.SILVER" + line "from there." + done + +OakNoKantoBadgesText: + text "OAK: Hmm? You're" + line "not collecting" + cont "KANTO GYM BADGES?" + + para "The GYM LEADERS in" + line "KANTO are as tough" + + para "as any you battled" + line "in JOHTO." + + para "I recommend that" + line "you challenge" + cont "them." + done + +OakYesKantoBadgesText: + text "OAK: Ah, you're" + line "collecting KANTO" + cont "GYM BADGES." + + para "I imagine that" + line "it's hard, but the" + + para "experience is sure" + line "to help you." + + para "Come see me when" + line "you get them all." + + para "I'll have a gift" + line "for you." + + para "Keep trying hard," + line "!" + done + +OaksAssistant1Text: + text "The PROF's #MON" + line "TALK radio program" + + para "isn't aired here" + line "in KANTO." + + para "It's a shame--I'd" + line "like to hear it." + done + +OaksAssistant2Text: + text "Thanks to your" + line "work on the #-" + cont "DEX, the PROF's" + + para "research is coming" + line "along great." + done + +OaksAssistant3Text: + text "Don't tell anyone," + line "but PROF.OAK'S" + + para "#MON TALK isn't" + line "a live broadcast." + done + +OaksLabPoster1Text: + text "Press START to" + line "open the MENU." + done + +OaksLabPoster2Text: + text "The SAVE option is" + line "on the MENU." + + para "Use it in a timely" + line "manner." + done + +OaksLabTrashcanText: + text "There's nothing in" + line "here…" + done + +OaksLabPCText: + text "There's an e-mail" + line "message on the PC." + + para "…" + + para "PROF.OAK, how is" + line "your research" + cont "coming along?" + + para "I'm still plugging" + line "away." + + para "I heard rumors" + line "that is" + + para "getting quite a" + line "reputation." + + para "I'm delighted to" + line "hear that." + + para "ELM in NEW BARK" + line "TOWN 8-)" + done + +OaksLab_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 11, PALLET_TOWN, 3 + warp_event 5, 11, PALLET_TOWN, 3 + + def_coord_events + + def_bg_events + bg_event 6, 1, BGEVENT_READ, OaksLabBookshelf + bg_event 7, 1, BGEVENT_READ, OaksLabBookshelf + bg_event 8, 1, BGEVENT_READ, OaksLabBookshelf + bg_event 9, 1, BGEVENT_READ, OaksLabBookshelf + bg_event 0, 7, BGEVENT_READ, OaksLabBookshelf + bg_event 1, 7, BGEVENT_READ, OaksLabBookshelf + bg_event 2, 7, BGEVENT_READ, OaksLabBookshelf + bg_event 3, 7, BGEVENT_READ, OaksLabBookshelf + bg_event 6, 7, BGEVENT_READ, OaksLabBookshelf + bg_event 7, 7, BGEVENT_READ, OaksLabBookshelf + bg_event 8, 7, BGEVENT_READ, OaksLabBookshelf + bg_event 9, 7, BGEVENT_READ, OaksLabBookshelf + bg_event 4, 0, BGEVENT_READ, OaksLabPoster1 + bg_event 5, 0, BGEVENT_READ, OaksLabPoster2 + bg_event 9, 3, BGEVENT_READ, OaksLabTrashcan + bg_event 0, 1, BGEVENT_READ, OaksLabPC + + def_object_events + object_event 4, 2, SPRITE_OAK, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Oak, -1 + object_event 1, 8, SPRITE_SCIENTIST, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OaksAssistant1Script, -1 + object_event 8, 9, SPRITE_SCIENTIST, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OaksAssistant2Script, -1 + object_event 1, 4, SPRITE_SCIENTIST, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OaksAssistant3Script, -1 diff --git a/maps/OaksLab.blk b/maps/OaksLab.blk new file mode 100644 index 0000000..5b200c8 --- /dev/null +++ b/maps/OaksLab.blk @@ -0,0 +1,2 @@ +   +  \ No newline at end of file diff --git a/maps/OlivineCafe.asm b/maps/OlivineCafe.asm new file mode 100644 index 0000000..f58eee8 --- /dev/null +++ b/maps/OlivineCafe.asm @@ -0,0 +1,93 @@ + object_const_def + const OLIVINECAFE_SAILOR1 + const OLIVINECAFE_FISHING_GURU + const OLIVINECAFE_SAILOR2 + +OlivineCafe_MapScripts: + def_scene_scripts + + def_callbacks + +OlivineCafeStrengthSailorScript: + faceplayer + opentext + checkevent EVENT_GOT_HM04_STRENGTH + iftrue .GotStrength + writetext OlivineCafeStrengthSailorText + promptbutton + verbosegiveitem HM_STRENGTH + setevent EVENT_GOT_HM04_STRENGTH +.GotStrength: + writetext OlivineCafeStrengthSailorText_GotStrength + waitbutton + closetext + end + +OlivineCafeFishingGuruScript: + jumptextfaceplayer OlivineCafeFishingGuruText + +OlivineCafeSailorScript: + jumptextfaceplayer OlivineCafeSailorText + +OlivineCafeStrengthSailorText: + text "Hah! Your #MON" + line "sure look like" + cont "lightweights!" + + para "They don't have" + line "the power to move" + cont "boulders aside." + + para "Here, use this" + line "and teach them" + cont "STRENGTH!" + done + +OlivineCafeStrengthSailorText_GotStrength: + text "On the sea, the" + line "only thing you can" + + para "count on is your" + line "own good self!" + + para "I'm so proud of my" + line "buff bod!" + done + +OlivineCafeFishingGuruText: + text "OLIVINE CAFE's" + line "menu is chock full" + + para "of hearty fare for" + line "beefy SAILORS!" + done + +OlivineCafeSailorText: + text "Whenever I roll" + line "into this town, I" + + para "always visit the" + line "OLIVINE CAFE." + + para "Everything on the" + line "menu makes me feel" + + para "stronger. I can't" + line "stop eating!" + done + +OlivineCafe_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, OLIVINE_CITY, 7 + warp_event 3, 7, OLIVINE_CITY, 7 + + def_coord_events + + def_bg_events + + def_object_events + object_event 4, 3, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineCafeStrengthSailorScript, -1 + object_event 7, 3, SPRITE_FISHING_GURU, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineCafeFishingGuruScript, -1 + object_event 6, 6, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineCafeSailorScript, -1 diff --git a/maps/OlivineCafe.blk b/maps/OlivineCafe.blk new file mode 100644 index 0000000..e0fc631 --- /dev/null +++ b/maps/OlivineCafe.blk @@ -0,0 +1 @@ +**  \ No newline at end of file diff --git a/maps/OlivineCity.asm b/maps/OlivineCity.asm new file mode 100644 index 0000000..3e8c9cf --- /dev/null +++ b/maps/OlivineCity.asm @@ -0,0 +1,322 @@ + object_const_def + const OLIVINECITY_SAILOR1 + const OLIVINECITY_STANDING_YOUNGSTER + const OLIVINECITY_SAILOR2 + const OLIVINECITY_OLIVINE_RIVAL + +OlivineCity_MapScripts: + def_scene_scripts + scene_script OlivineCityNoop1Scene, SCENE_OLIVINECITY_RIVAL_ENCOUNTER + scene_script OlivineCityNoop2Scene, SCENE_OLIVINECITY_NOOP + + def_callbacks + callback MAPCALLBACK_NEWMAP, OlivineCityFlypointCallback + +OlivineCityNoop1Scene: + end + +OlivineCityNoop2Scene: + end + +OlivineCityFlypointCallback: + setflag ENGINE_FLYPOINT_OLIVINE + endcallback + +OlivineCityRivalSceneTop: + turnobject PLAYER, LEFT + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + pause 15 + playsound SFX_ENTER_DOOR + appear OLIVINECITY_OLIVINE_RIVAL + waitsfx + applymovement OLIVINECITY_OLIVINE_RIVAL, OlivineCityRivalApproachesTopMovement + playmusic MUSIC_RIVAL_ENCOUNTER + opentext + writetext OlivineCityRivalText + waitbutton + closetext + applymovement PLAYER, OlivineCityPlayerStepsAsideTopMovement + turnobject PLAYER, RIGHT + applymovement OLIVINECITY_OLIVINE_RIVAL, OlivineCityRivalLeavesTopMovement + setscene SCENE_OLIVINECITY_NOOP + disappear OLIVINECITY_OLIVINE_RIVAL + special RestartMapMusic + variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY + special LoadUsedSpritesGFX + end + +OlivineCityRivalSceneBottom: + turnobject PLAYER, LEFT + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + pause 15 + playsound SFX_ENTER_DOOR + appear OLIVINECITY_OLIVINE_RIVAL + waitsfx + applymovement OLIVINECITY_OLIVINE_RIVAL, OlivineCityRivalApproachesBottomMovement + playmusic MUSIC_RIVAL_ENCOUNTER + opentext + writetext OlivineCityRivalText + waitbutton + closetext + applymovement PLAYER, OlivineCityPlayerStepsAsideBottomMovement + turnobject PLAYER, RIGHT + applymovement OLIVINECITY_OLIVINE_RIVAL, OlivineCityRivalLeavesBottomMovement + disappear OLIVINECITY_OLIVINE_RIVAL + setscene SCENE_OLIVINECITY_NOOP + special RestartMapMusic + variablesprite SPRITE_OLIVINE_RIVAL, SPRITE_SWIMMER_GUY + special LoadUsedSpritesGFX + end + +OlivineCitySailor1Script: + jumptextfaceplayer OlivineCitySailor1Text + +OlivineCityStandingYoungsterScript: + faceplayer + opentext + random 2 + ifequal 0, .FiftyFifty + writetext OlivineCityStandingYoungsterPokegearText + waitbutton + closetext + end + +.FiftyFifty: + writetext OlivineCityStandingYoungsterPokedexText + waitbutton + closetext + end + +OlivineCitySailor2Script: + jumptextfaceplayer OlivineCitySailor2Text + +OlivineCitySign: + jumptext OlivineCitySignText + +OlivineCityPortSign: + jumptext OlivineCityPortSignText + +OlivineGymSign: + jumptext OlivineGymSignText + +OlivineLighthouseSign: + jumptext OlivineLighthouseSignText + +OlivineCityBattleTowerSign: + jumptext OlivineCityBattleTowerSignText + +OlivineCityPokecenterSign: + jumpstd PokecenterSignScript + +OlivineCityMartSign: + jumpstd MartSignScript + +OlivineCityRivalApproachesTopMovement: + step DOWN + step RIGHT + step RIGHT + step_end + +OlivineCityRivalApproachesBottomMovement: + step DOWN + step DOWN + step RIGHT + step RIGHT + step_end + +OlivineCityRivalLeavesTopMovement: + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step UP + step UP + step UP + step UP + step UP + step UP + step_end + +OlivineCityRivalLeavesBottomMovement: + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step UP + step UP + step UP + step UP + step UP + step_end + +OlivineCityPlayerStepsAsideTopMovement: + step DOWN + turn_head UP + step_end + +OlivineCityPlayerStepsAsideBottomMovement: + step UP + turn_head DOWN + step_end + +OlivineCityRivalText: + text "…" + + para "You again?" + + para "There's no need to" + line "panic. I don't" + + para "bother with wimps" + line "like you." + + para "Speaking of weak-" + line "lings, the city's" + + para "GYM LEADER isn't" + line "here." + + para "Supposedly taking" + line "care of a sick" + + para "#MON at the" + line "LIGHTHOUSE." + + para "Humph! Boo-hoo!" + line "Just let sick" + cont "#MON go!" + + para "A #MON that" + line "can't battle is" + cont "worthless!" + + para "Why don't you go" + line "train at the" + cont "LIGHTHOUSE?" + + para "Who knows. It may" + line "make you a bit" + cont "less weak!" + done + +OlivineCitySailor1Text: + text "Dark roads are" + line "dangerous at" + cont "night." + + para "But in the pitch-" + line "black of night," + + para "the sea is even" + line "more treacherous!" + + para "Without the beacon" + line "of the LIGHTHOUSE" + + para "to guide it, no" + line "ship can sail." + done + +OlivineCityStandingYoungsterPokegearText: + text "That thing you" + line "have--it's a #-" + cont "GEAR, right? Wow," + cont "that's cool." + done + +OlivineCityStandingYoungsterPokedexText: + text "Wow, you have a" + line "#DEX!" + + para "That is just so" + line "awesome." + done + +OlivineCitySailor2Text: + text "The sea is sweet!" + + para "Sunsets on the sea" + line "are marvelous!" + + para "Sing with me! " + line "Yo-ho! Blow the" + cont "man down!…" + done + +OlivineCitySignText: + text "OLIVINE CITY" + + para "The Port Closest" + line "to Foreign Lands" + done + +OlivineCityPortSignText: + text "OLIVINE PORT" + line "FAST SHIP PIER" + done + +OlivineGymSignText: + text "OLIVINE CITY" + line "#MON GYM" + cont "LEADER: JASMINE" + + para "The Steel-Clad" + line "Defense Girl" + done + +OlivineLighthouseSignText: + text "OLIVINE LIGHTHOUSE" + line "Also known as the" + cont "GLITTER LIGHTHOUSE" + done + +OlivineCityBattleTowerSignText: + text "BATTLE TOWER AHEAD" + line "Opening Now!" + done + +OlivineCityBattleTowerSignText_NotYetOpen: ; unreferenced +; originally shown when the Battle Tower was closed + text "BATTLE TOWER AHEAD" + done + +OlivineCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 13, 21, OLIVINE_POKECENTER_1F, 1 + warp_event 10, 11, OLIVINE_GYM, 1 + warp_event 25, 11, OLIVINE_TIMS_HOUSE, 1 + warp_event 0, 0, OLIVINE_HOUSE_BETA, 1 ; inaccessible + warp_event 29, 11, OLIVINE_PUNISHMENT_SPEECH_HOUSE, 1 + warp_event 13, 15, OLIVINE_GOOD_ROD_HOUSE, 1 + warp_event 7, 21, OLIVINE_CAFE, 1 + warp_event 19, 17, OLIVINE_MART, 2 + warp_event 29, 27, OLIVINE_LIGHTHOUSE_1F, 1 + warp_event 19, 27, OLIVINE_PORT_PASSAGE, 1 + warp_event 20, 27, OLIVINE_PORT_PASSAGE, 2 + + def_coord_events + coord_event 13, 12, SCENE_OLIVINECITY_RIVAL_ENCOUNTER, OlivineCityRivalSceneTop + coord_event 13, 13, SCENE_OLIVINECITY_RIVAL_ENCOUNTER, OlivineCityRivalSceneBottom + + def_bg_events + bg_event 17, 11, BGEVENT_READ, OlivineCitySign + bg_event 20, 24, BGEVENT_READ, OlivineCityPortSign + bg_event 7, 11, BGEVENT_READ, OlivineGymSign + bg_event 30, 28, BGEVENT_READ, OlivineLighthouseSign + bg_event 3, 23, BGEVENT_READ, OlivineCityBattleTowerSign + bg_event 14, 21, BGEVENT_READ, OlivineCityPokecenterSign + bg_event 20, 17, BGEVENT_READ, OlivineCityMartSign + + def_object_events + object_event 26, 27, SPRITE_SAILOR, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineCitySailor1Script, -1 + object_event 20, 13, SPRITE_STANDING_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, OlivineCityStandingYoungsterScript, -1 + object_event 17, 21, SPRITE_SAILOR, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineCitySailor2Script, -1 + object_event 10, 11, SPRITE_OLIVINE_RIVAL, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_OLIVINE_CITY diff --git a/maps/OlivineCity.blk b/maps/OlivineCity.blk new file mode 100644 index 0000000..1c0fa6c --- /dev/null +++ b/maps/OlivineCity.blk @@ -0,0 +1,6 @@ +FDFDFDFDIIJHIIIIFGGDFDFAAATv UFX5~YTFAX5YXIIJIX5z +vyxX655 +vv +ETUX69955555555Y XYX55655555555YXYEX55655555555YXzvvvy56111111111 +vv +111111155555555555555555555 diff --git a/maps/OlivineGoodRodHouse.asm b/maps/OlivineGoodRodHouse.asm new file mode 100644 index 0000000..fde165b --- /dev/null +++ b/maps/OlivineGoodRodHouse.asm @@ -0,0 +1,94 @@ + object_const_def + const OLIVINEGOODRODHOUSE_FISHING_GURU + +OlivineGoodRodHouse_MapScripts: + def_scene_scripts + + def_callbacks + +GoodRodGuru: + faceplayer + opentext + checkevent EVENT_GOT_GOOD_ROD + iftrue .AlreadyGotItem + writetext OfferGoodRodText + yesorno + iffalse .DontWantIt + writetext GiveGoodRodText + promptbutton + verbosegiveitem GOOD_ROD + writetext GaveGoodRodText + waitbutton + closetext + setevent EVENT_GOT_GOOD_ROD + end + +.DontWantIt: + writetext DontWantGoodRodText + waitbutton + closetext + end + +.AlreadyGotItem: + writetext HaveGoodRodText + waitbutton + closetext + end + +GoodRodHouseBookshelf: ; unreferenced + jumpstd PictureBookshelfScript + +OfferGoodRodText: + text "OLIVINE is on the" + line "sea!" + + para "And if it's on the" + line "sea, there are" + cont "bound to be fish!" + + para "I've fished here" + line "for 30 years." + + para "Would you like to" + line "face the sea and" + cont "fish?" + done + +GiveGoodRodText: + text "Ah, hahah!" + line "We have ourselves" + cont "a new angler!" + done + +GaveGoodRodText: + text "Fish aren't found" + line "in the sea alone." + + para "They go wherever" + line "there is water." + done + +DontWantGoodRodText: + text "Whaaat? You don't" + line "like to fish!?" + cont "Incomprehensible!" + done + +HaveGoodRodText: + text "How are things?" + line "Land the big one?" + done + +OlivineGoodRodHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, OLIVINE_CITY, 6 + warp_event 3, 7, OLIVINE_CITY, 6 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_FISHING_GURU, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, GoodRodGuru, -1 diff --git a/maps/OlivineGym.asm b/maps/OlivineGym.asm new file mode 100644 index 0000000..2b59ca1 --- /dev/null +++ b/maps/OlivineGym.asm @@ -0,0 +1,213 @@ + object_const_def + const OLIVINEGYM_JASMINE + const OLIVINEGYM_GYM_GUIDE + +OlivineGym_MapScripts: + def_scene_scripts + + def_callbacks + +OlivineGymJasmineScript: + faceplayer + opentext + checkevent EVENT_BEAT_JASMINE + iftrue .FightDone + writetext Jasmine_SteelTypeIntro + waitbutton + closetext + winlosstext Jasmine_BetterTrainer, 0 + loadtrainer JASMINE, JASMINE1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_JASMINE + opentext + writetext Text_ReceivedMineralBadge + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_MINERALBADGE + readvar VAR_BADGES + scall OlivineGymActivateRockets +.FightDone: + checkevent EVENT_GOT_TM23_IRON_TAIL + iftrue .GotIronTail + writetext Jasmine_BadgeSpeech + promptbutton + verbosegiveitem TM_IRON_TAIL + iffalse .NoRoomForIronTail + setevent EVENT_GOT_TM23_IRON_TAIL + writetext Jasmine_IronTailSpeech + waitbutton + closetext + end + +.GotIronTail: + writetext Jasmine_GoodLuck + waitbutton +.NoRoomForIronTail: + closetext + end + +OlivineGymActivateRockets: + ifequal 7, .RadioTowerRockets + ifequal 6, .GoldenrodRockets + end + +.GoldenrodRockets: + jumpstd GoldenrodRocketsScript + +.RadioTowerRockets: + jumpstd RadioTowerRocketsScript + +OlivineGymGuideScript: + faceplayer + checkevent EVENT_BEAT_JASMINE + iftrue .OlivineGymGuideWinScript + checkevent EVENT_JASMINE_RETURNED_TO_GYM + iffalse .OlivineGymGuidePreScript + opentext + writetext OlivineGymGuideText + waitbutton + closetext + end + +.OlivineGymGuideWinScript: + opentext + writetext OlivineGymGuideWinText + waitbutton + closetext + end + +.OlivineGymGuidePreScript: + opentext + writetext OlivineGymGuidePreText + waitbutton + closetext + end + +OlivineGymStatue: + checkflag ENGINE_MINERALBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, JASMINE, JASMINE1 + jumpstd GymStatue2Script + +Jasmine_SteelTypeIntro: + text "…Thank you for" + line "your help at the" + cont "LIGHTHOUSE…" + + para "But this is dif-" + line "ferent. Please" + + para "allow me to intro-" + line "duce myself." + + para "I am JASMINE, a" + line "GYM LEADER. I use" + cont "the steel-type." + + para "…Do you know about" + line "the steel-type?" + + para "It's a type that" + line "was only recently" + cont "discovered." + + para "…Um… May I begin?" + done + +Jasmine_BetterTrainer: + text "…You are a better" + line "trainer than me," + + para "in both skill and" + line "kindness." + + para "In accordance with" + line "LEAGUE rules, I" + + para "confer upon you" + line "this BADGE." + done + +Text_ReceivedMineralBadge: + text " received" + line "MINERALBADGE." + done + +Jasmine_BadgeSpeech: + text "MINERALBADGE" + line "raises #MON's" + cont "DEFENSE." + + para "…Um… Please take" + line "this too…" + done + +Text_ReceivedTM09: ; unreferenced + text " received" + line "TM09." + done + +Jasmine_IronTailSpeech: + text "…You could use" + line "that TM to teach" + cont "IRON TAIL." + done + +Jasmine_GoodLuck: + text "Um… I don't know" + line "how to say this," + cont "but good luck…" + done + +OlivineGymGuideText: + text "JASMINE uses the" + line "newly discovered" + cont "steel-type." + + para "I don't know very" + line "much about it." + done + +OlivineGymGuideWinText: + text "That was awesome." + + para "The steel-type," + line "huh?" + + para "That was a close" + line "encounter of an" + cont "unknown kind!" + done + +OlivineGymGuidePreText: + text "JASMINE, the GYM" + line "LEADER, is at the" + cont "LIGHTHOUSE." + + para "She's been tending" + line "to a sick #MON." + + para "A strong trainer" + line "has to be compas-" + cont "sionate." + done + +OlivineGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 15, OLIVINE_CITY, 2 + warp_event 5, 15, OLIVINE_CITY, 2 + + def_coord_events + + def_bg_events + bg_event 3, 13, BGEVENT_READ, OlivineGymStatue + bg_event 6, 13, BGEVENT_READ, OlivineGymStatue + + def_object_events + object_event 5, 3, SPRITE_JASMINE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, OlivineGymJasmineScript, EVENT_OLIVINE_GYM_JASMINE + object_event 7, 13, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, OlivineGymGuideScript, -1 diff --git a/maps/OlivineGym.blk b/maps/OlivineGym.blk new file mode 100644 index 0000000..ad6b907 --- /dev/null +++ b/maps/OlivineGym.blk @@ -0,0 +1 @@ +%***&%&% !"&%&%&%&%&$#' \ No newline at end of file diff --git a/maps/OlivineHouseBeta.asm b/maps/OlivineHouseBeta.asm new file mode 100644 index 0000000..b0dae23 --- /dev/null +++ b/maps/OlivineHouseBeta.asm @@ -0,0 +1,55 @@ + object_const_def + const OLIVINEHOUSEBETA_TEACHER + const OLIVINEHOUSEBETA_RHYDON + +OlivineHouseBeta_MapScripts: + def_scene_scripts + + def_callbacks + +OlivineHouseBetaTeacherScript: + jumptextfaceplayer OlivineHouseBetaTeacherText + +OlivineHouseBetaRhydonScript: + opentext + writetext OlivineHouseBetaRhydonText + cry RHYDON + waitbutton + closetext + end + +OlivineHouseBetaBookshelf1: + jumpstd PictureBookshelfScript + +OlivineHouseBetaBookshelf2: + jumpstd MagazineBookshelfScript + +OlivineHouseBetaTeacherText: + text "When my #MON" + line "got sick, the" + + para "PHARMACIST in" + line "ECRUTEAK made some" + cont "medicine for me." + done + +OlivineHouseBetaRhydonText: + text "RHYDON: Gugooh!" + done + +OlivineHouseBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, OLIVINE_CITY, 4 + warp_event 3, 7, OLIVINE_CITY, 4 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, OlivineHouseBetaBookshelf1 + bg_event 1, 1, BGEVENT_READ, OlivineHouseBetaBookshelf2 + + def_object_events + object_event 2, 3, SPRITE_TEACHER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineHouseBetaTeacherScript, -1 + object_event 6, 4, SPRITE_RHYDON, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineHouseBetaRhydonScript, -1 diff --git a/maps/OlivineLighthouse1F.asm b/maps/OlivineLighthouse1F.asm new file mode 100644 index 0000000..d0fa12d --- /dev/null +++ b/maps/OlivineLighthouse1F.asm @@ -0,0 +1,53 @@ + object_const_def + const OLIVINELIGHTHOUSE1F_SAILOR + const OLIVINELIGHTHOUSE1F_POKEFAN_F + +OlivineLighthouse1F_MapScripts: + def_scene_scripts + + def_callbacks + +OlivineLighthouse1FSailorScript: + jumptextfaceplayer OlivineLighthouse1FSailorText + +OlivineLighthouse1FPokefanFScript: + jumptextfaceplayer OlivineLighthouse1FPokefanFText + +OlivineLighthouse1FSailorText: + text "People train at" + line "this LIGHTHOUSE." + + para "It's not easy to" + line "climb because of" + cont "all the trainers." + done + +OlivineLighthouse1FPokefanFText: + text "In the past, #-" + line "MON used to light" + + para "the sea around" + line "OLIVINE at night." + + para "The LIGHTHOUSE was" + line "made in honor of" + cont "those #MON." + done + +OlivineLighthouse1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 10, 17, OLIVINE_CITY, 9 + warp_event 11, 17, OLIVINE_CITY, 9 + warp_event 3, 11, OLIVINE_LIGHTHOUSE_2F, 1 + warp_event 16, 13, OLIVINE_LIGHTHOUSE_2F, 3 + warp_event 17, 13, OLIVINE_LIGHTHOUSE_2F, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 8, 2, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineLighthouse1FSailorScript, -1 + object_event 16, 9, SPRITE_POKEFAN_F, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineLighthouse1FPokefanFScript, -1 diff --git a/maps/OlivineLighthouse1F.blk b/maps/OlivineLighthouse1F.blk new file mode 100644 index 0000000..7943b4f --- /dev/null +++ b/maps/OlivineLighthouse1F.blk @@ -0,0 +1 @@ + >=<=<=<> ><''''''<>>''><>'''>>'>< <>''>>'> >''>>:> ><''>>>< ><'''><> >'''>< <<=<.=<< \ No newline at end of file diff --git a/maps/OlivineLighthouse2F.asm b/maps/OlivineLighthouse2F.asm new file mode 100644 index 0000000..6159de9 --- /dev/null +++ b/maps/OlivineLighthouse2F.asm @@ -0,0 +1,221 @@ + object_const_def + const OLIVINELIGHTHOUSE2F_SAILOR + const OLIVINELIGHTHOUSE2F_GENTLEMAN + +OlivineLighthouse2F_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerGentlemanAlfred: + trainer GENTLEMAN, ALFRED, EVENT_BEAT_GENTLEMAN_ALFRED, GentlemanAlfredSeenText, GentlemanAlfredBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GentlemanAlfredAfterBattleText + waitbutton + closetext + end + +TrainerSailorHuey: + trainer SAILOR, HUEY1, EVENT_BEAT_SAILOR_HUEY, SailorHueySeenText, SailorHueyBeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_SAILOR_HUEY + endifjustbattled + opentext + checkflag ENGINE_HUEY_READY_FOR_REMATCH + iftrue .WantsBattle + checkcellnum PHONE_SAILOR_HUEY + iftrue .NumberAccepted + checkevent EVENT_HUEY_ASKED_FOR_PHONE_NUMBER + iftrue .AskedBefore + setevent EVENT_HUEY_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .AskForNumber + +.AskedBefore: + scall .AskNumber2 +.AskForNumber: + askforphonenumber PHONE_SAILOR_HUEY + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, SAILOR, HUEY1 + scall .RegisteredNumber + sjump .NumberAccepted + +.WantsBattle: + scall .Rematch + winlosstext SailorHueyBeatenText, 0 + readmem wHueyFightCount + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight3: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight3 +.Fight2: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight2 +.Fight1: + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .LoadFight1 +.LoadFight0: + loadtrainer SAILOR, HUEY1 + startbattle + reloadmapafterbattle + loadmem wHueyFightCount, 1 + clearflag ENGINE_HUEY_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer SAILOR, HUEY2 + startbattle + reloadmapafterbattle + loadmem wHueyFightCount, 2 + clearflag ENGINE_HUEY_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer SAILOR, HUEY3 + startbattle + reloadmapafterbattle + loadmem wHueyFightCount, 3 + clearflag ENGINE_HUEY_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer SAILOR, HUEY4 + startbattle + reloadmapafterbattle + clearflag ENGINE_HUEY_READY_FOR_REMATCH + checkevent EVENT_HUEY_PROTEIN + iftrue .HasProtein + checkevent EVENT_GOT_PROTEIN_FROM_HUEY + iftrue .SkipGift + scall .RematchGift + verbosegiveitem PROTEIN + iffalse .PackFull + setevent EVENT_GOT_PROTEIN_FROM_HUEY + sjump .NumberAccepted + +.SkipGift: + end + +.HasProtein: + opentext + writetext SailorHueyGiveProteinText + waitbutton + verbosegiveitem PROTEIN + iffalse .PackFull + clearevent EVENT_HUEY_PROTEIN + setevent EVENT_GOT_PROTEIN_FROM_HUEY + sjump .NumberAccepted + +.AskNumber1: + jumpstd AskNumber1MScript + end + +.AskNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberMScript + end + +.NumberAccepted: + jumpstd NumberAcceptedMScript + end + +.NumberDeclined: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.Rematch: + jumpstd RematchMScript + end + +.PackFull: + setevent EVENT_HUEY_PROTEIN + jumpstd PackFullMScript + end + +.RematchGift: + jumpstd RematchGiftMScript + end + +SailorHueySeenText: + text "Men of the sea are" + line "always spoiling" + cont "for a good fight!" + done + +SailorHueyBeatenText: + text "Urf!" + line "I lose!" + done + +SailorHueyUnusedText: ; unreferenced + text "What power!" + line "How would you like" + + para "to sail the seas" + line "with me?" + done + +GentlemanAlfredSeenText: + text "Hm? This is no" + line "place for playing." + done + +GentlemanAlfredBeatenText: + text "Ah! I can see that" + line "you're serious." + done + +GentlemanAlfredAfterBattleText: + text "Up top is a #-" + line "MON that keeps the" + cont "LIGHTHOUSE lit." + + para "But I hear that" + line "it's sick now and" + + para "can't be cured by" + line "ordinary medicine." + done + +SailorHueyGiveProteinText: + text "Man! You're as" + line "tough as ever!" + + para "Anyway, here's" + line "that medicine from" + cont "before." + done + +OlivineLighthouse2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 11, OLIVINE_LIGHTHOUSE_1F, 3 + warp_event 5, 3, OLIVINE_LIGHTHOUSE_3F, 2 + warp_event 16, 13, OLIVINE_LIGHTHOUSE_1F, 4 + warp_event 17, 13, OLIVINE_LIGHTHOUSE_1F, 5 + warp_event 16, 11, OLIVINE_LIGHTHOUSE_3F, 4 + warp_event 17, 11, OLIVINE_LIGHTHOUSE_3F, 5 + + def_coord_events + + def_bg_events + + def_object_events + object_event 9, 3, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSailorHuey, -1 + object_event 17, 8, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerGentlemanAlfred, -1 diff --git a/maps/OlivineLighthouse2F.blk b/maps/OlivineLighthouse2F.blk new file mode 100644 index 0000000..f0a4c97 --- /dev/null +++ b/maps/OlivineLighthouse2F.blk @@ -0,0 +1 @@ + ><<=<=<> >>:'''''<>><<<<>'''>> <>''>><> >''>>1<> ><''>>''<<<''(><>''''''>< <=<=<=<< \ No newline at end of file diff --git a/maps/OlivineLighthouse3F.asm b/maps/OlivineLighthouse3F.asm new file mode 100644 index 0000000..f905c97 --- /dev/null +++ b/maps/OlivineLighthouse3F.asm @@ -0,0 +1,135 @@ + object_const_def + const OLIVINELIGHTHOUSE3F_SAILOR + const OLIVINELIGHTHOUSE3F_GENTLEMAN + const OLIVINELIGHTHOUSE3F_YOUNGSTER + const OLIVINELIGHTHOUSE3F_POKE_BALL + +OlivineLighthouse3F_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerBirdKeeperTheo: + trainer BIRD_KEEPER, THEO, EVENT_BEAT_BIRD_KEEPER_THEO, BirdKeeperTheoSeenText, BirdKeeperTheoBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BirdKeeperTheoAfterBattleText + waitbutton + closetext + end + +TrainerGentlemanPreston: + trainer GENTLEMAN, PRESTON, EVENT_BEAT_GENTLEMAN_PRESTON, GentlemanPrestonSeenText, GentlemanPrestonBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GentlemanPrestonAfterBattleText + waitbutton + closetext + end + +TrainerSailorTerrell: + trainer SAILOR, TERRELL, EVENT_BEAT_SAILOR_TERRELL, SailorTerrellSeenText, SailorTerrellBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SailorTerrellAfterBattleText + waitbutton + closetext + end + +OlivineLighthouse3FEther: + itemball ETHER + +BirdKeeperTheoSeenText: + text "Why are you here?" + line "Are you just going" + + para "to gawk? I suggest" + line "that you leave!" + done + +BirdKeeperTheoBeatenText: + text "You really are" + line "concerned…" + done + +BirdKeeperTheoAfterBattleText: + text "How the heck do" + line "you go up?" + + para "I want to visit" + line "the sick #MON," + + para "but I can't get up" + line "there…" + done + +SailorTerrellSeenText: + text "Sailors are both" + line "kind and strong." + cont "How about you?" + done + +SailorTerrellBeatenText: + text "You are both kind" + line "and strong…" + done + +SailorTerrellAfterBattleText: + text "Every time I come" + line "back to OLIVINE, I" + cont "visit the GYM." + + para "The GYM LEADER's" + line "#MON type has" + + para "changed without me" + line "noticing." + done + +GentlemanPrestonSeenText: + text "I travel the world" + line "to train my #-" + cont "MON. I wish to" + cont "battle with you." + done + +GentlemanPrestonBeatenText: + text "…sigh… I must" + line "train some more…" + done + +GentlemanPrestonAfterBattleText: + text "JASMINE used to" + line "use rock #MON" + cont "like ONIX." + done + +OlivineLighthouse3F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 13, 3, OLIVINE_LIGHTHOUSE_4F, 1 + warp_event 5, 3, OLIVINE_LIGHTHOUSE_2F, 2 + warp_event 9, 5, OLIVINE_LIGHTHOUSE_4F, 4 + warp_event 16, 11, OLIVINE_LIGHTHOUSE_2F, 5 + warp_event 17, 11, OLIVINE_LIGHTHOUSE_2F, 6 + warp_event 16, 9, OLIVINE_LIGHTHOUSE_4F, 5 + warp_event 17, 9, OLIVINE_LIGHTHOUSE_4F, 6 + warp_event 8, 3, OLIVINE_LIGHTHOUSE_4F, 7 + warp_event 9, 3, OLIVINE_LIGHTHOUSE_4F, 8 + + def_coord_events + + def_bg_events + + def_object_events + object_event 9, 2, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerSailorTerrell, -1 + object_event 13, 5, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerGentlemanPreston, -1 + object_event 3, 9, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBirdKeeperTheo, -1 + object_event 8, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, OlivineLighthouse3FEther, EVENT_OLIVINE_LIGHTHOUSE_3F_ETHER diff --git a/maps/OlivineLighthouse3F.blk b/maps/OlivineLighthouse3F.blk new file mode 100644 index 0000000..dd80572 --- /dev/null +++ b/maps/OlivineLighthouse3F.blk @@ -0,0 +1 @@ + >=>=>=<> ><1>'>:'<>>''>:>'''>>'><<<>''>>'> >''>>'<> ><'(>>''<<<'''><>''''''>< <=<=<=<< \ No newline at end of file diff --git a/maps/OlivineLighthouse4F.asm b/maps/OlivineLighthouse4F.asm new file mode 100644 index 0000000..69a48aa --- /dev/null +++ b/maps/OlivineLighthouse4F.asm @@ -0,0 +1,103 @@ + object_const_def + const OLIVINELIGHTHOUSE4F_SAILOR + const OLIVINELIGHTHOUSE4F_LASS + +OlivineLighthouse4F_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerLassConnie: + trainer LASS, CONNIE1, EVENT_BEAT_LASS_CONNIE, LassConnie1SeenText, LassConnie1BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext LassConnie1AfterBattleText + waitbutton + closetext + end + +TrainerSailorKent: + trainer SAILOR, KENT, EVENT_BEAT_SAILOR_KENT, SailorKentSeenText, SailorKentBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SailorKentAfterBattleText + waitbutton + closetext + end + +SailorKentSeenText: + text "JASMINE must be" + line "worried sick about" + cont "the #MON here." + + para "She won't even" + line "smile these days." + done + +SailorKentBeatenText: + text "I can't manage a" + line "smile either…" + done + +SailorKentAfterBattleText: + text "Speaking of sick," + line "I've heard there's" + + para "a good PHARMACY in" + line "CIANWOOD." + done + +LassConnie1SeenText: + text "JASMINE is this" + line "city's GYM LEADER." + + para "I mean to bring" + line "her back with me." + + para "Nobody had better" + line "get in my way!" + done + +LassConnie1BeatenText: + text "Aaack! My #MON!" + done + +LassConnie1AfterBattleText: + text "Right. Anybody" + line "would be worried" + cont "if his or her own" + cont "#MON were hurt." + + para "I'll pray for the" + line "#MON here, so" + + para "JASMINE can come" + line "back to the GYM." + done + +OlivineLighthouse4F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 13, 3, OLIVINE_LIGHTHOUSE_3F, 1 + warp_event 3, 5, OLIVINE_LIGHTHOUSE_5F, 2 + warp_event 9, 7, OLIVINE_LIGHTHOUSE_5F, 3 + warp_event 9, 5, OLIVINE_LIGHTHOUSE_3F, 3 + warp_event 16, 9, OLIVINE_LIGHTHOUSE_3F, 6 + warp_event 17, 9, OLIVINE_LIGHTHOUSE_3F, 7 + warp_event 8, 3, OLIVINE_LIGHTHOUSE_3F, 8 + warp_event 9, 3, OLIVINE_LIGHTHOUSE_3F, 9 + warp_event 16, 7, OLIVINE_LIGHTHOUSE_5F, 4 + warp_event 17, 7, OLIVINE_LIGHTHOUSE_5F, 5 + + def_coord_events + + def_bg_events + + def_object_events + object_event 7, 14, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSailorKent, -1 + object_event 11, 2, SPRITE_LASS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerLassConnie, -1 diff --git a/maps/OlivineLighthouse4F.blk b/maps/OlivineLighthouse4F.blk new file mode 100644 index 0000000..b48dd5d --- /dev/null +++ b/maps/OlivineLighthouse4F.blk @@ -0,0 +1 @@ + >=>=<=<> ><'>('1'<>>:'>1>'''>>'>>:>>''>>'>><>>'(>>'<> ><''>>''<<<'''><>''''''>< <=<=<=<< \ No newline at end of file diff --git a/maps/OlivineLighthouse5F.asm b/maps/OlivineLighthouse5F.asm new file mode 100644 index 0000000..5f01ebd --- /dev/null +++ b/maps/OlivineLighthouse5F.asm @@ -0,0 +1,113 @@ + object_const_def + const OLIVINELIGHTHOUSE5F_SAILOR + const OLIVINELIGHTHOUSE5F_YOUNGSTER + const OLIVINELIGHTHOUSE5F_POKE_BALL1 + const OLIVINELIGHTHOUSE5F_POKE_BALL2 + const OLIVINELIGHTHOUSE5F_POKE_BALL3 + +OlivineLighthouse5F_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerBirdKeeperDenis: + trainer BIRD_KEEPER, DENIS, EVENT_BEAT_BIRD_KEEPER_DENIS, BirdKeeperDenisSeenText, BirdKeeperDenisBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BirdKeeperDenisAfterBattleText + waitbutton + closetext + end + +TrainerSailorErnest: + trainer SAILOR, ERNEST, EVENT_BEAT_SAILOR_ERNEST, SailorErnestSeenText, SailorErnestBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SailorErnestAfterBattleText + waitbutton + closetext + end + +OlivineLighthouse5FRareCandy: + itemball RARE_CANDY + +OlivineLighthouse5FSuperRepel: + itemball SUPER_REPEL + +OlivineLighthouse5FTMSwagger: + itemball TM_SWAGGER + +OlivineLighthouse5FHiddenHyperPotion: + hiddenitem HYPER_POTION, EVENT_OLIVINE_LIGHTHOUSE_5F_HIDDEN_HYPER_POTION + +SailorErnestSeenText: + text "I wanted to battle" + line "JASMINE, but she's" + + para "not up to it now." + line "So, how about you?" + done + +SailorErnestBeatenText: + text "Whoa, whoa. You're" + line "overwhelming!" + done + +SailorErnestAfterBattleText: + text "A GYM LEADER isn't" + line "just about being" + + para "strong. A LEADER" + line "also needs to be" + cont "compassionate." + done + +BirdKeeperDenisSeenText: + text "We're pretty high" + line "up here. My bird" + + para "#MON are in" + line "prime form." + done + +BirdKeeperDenisBeatenText: + text "Oops…They crashed…" + done + +BirdKeeperDenisAfterBattleText: + text "My #MON learned" + line "how to use FLY in" + cont "CIANWOOD." + + para "Well, since I'm a" + line "loser, I'll FLY" + cont "across the sea…" + done + +OlivineLighthouse5F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 15, OLIVINE_LIGHTHOUSE_6F, 1 + warp_event 3, 5, OLIVINE_LIGHTHOUSE_4F, 2 + warp_event 9, 7, OLIVINE_LIGHTHOUSE_4F, 3 + warp_event 16, 7, OLIVINE_LIGHTHOUSE_4F, 9 + warp_event 17, 7, OLIVINE_LIGHTHOUSE_4F, 10 + warp_event 16, 5, OLIVINE_LIGHTHOUSE_6F, 2 + warp_event 17, 5, OLIVINE_LIGHTHOUSE_6F, 3 + + def_coord_events + + def_bg_events + bg_event 3, 13, BGEVENT_ITEM, OlivineLighthouse5FHiddenHyperPotion + + def_object_events + object_event 8, 11, SPRITE_SAILOR, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSailorErnest, -1 + object_event 8, 3, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerBirdKeeperDenis, -1 + object_event 15, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, OlivineLighthouse5FRareCandy, EVENT_OLIVINE_LIGHTHOUSE_5F_RARE_CANDY + object_event 6, 15, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, OlivineLighthouse5FSuperRepel, EVENT_OLIVINE_LIGHTHOUSE_5F_SUPER_REPEL + object_event 2, 13, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, OlivineLighthouse5FTMSwagger, EVENT_OLIVINE_LIGHTHOUSE_5F_TM_SWAGGER diff --git a/maps/OlivineLighthouse5F.blk b/maps/OlivineLighthouse5F.blk new file mode 100644 index 0000000..7e19c93 --- /dev/null +++ b/maps/OlivineLighthouse5F.blk @@ -0,0 +1 @@ + >=<=<=<> ><''''''<>>1'><>'''>>'><1<>'(>>'>'''>''>>'>'''>''>>'>'''>''><>>':'>'>< <<=<=<=< \ No newline at end of file diff --git a/maps/OlivineLighthouse6F.asm b/maps/OlivineLighthouse6F.asm new file mode 100644 index 0000000..af83cf7 --- /dev/null +++ b/maps/OlivineLighthouse6F.asm @@ -0,0 +1,278 @@ + object_const_def + const OLIVINELIGHTHOUSE6F_JASMINE + const OLIVINELIGHTHOUSE6F_MONSTER + const OLIVINELIGHTHOUSE6F_POKE_BALL + +OlivineLighthouse6F_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, OlivineLighthouse6FLoadReservedIDCallback + +OlivineLighthouse6FLoadReservedIDCallback: + loadmonindex 1, AMPHAROS + endcallback + +OlivineLighthouseJasmine: + faceplayer + opentext + checkitem SECRETPOTION + iftrue .BroughtSecretpotion + checkevent EVENT_JASMINE_EXPLAINED_AMPHYS_SICKNESS + iftrue .ExplainedSickness + writetext JasmineCianwoodPharmacyText + promptbutton + setevent EVENT_JASMINE_EXPLAINED_AMPHYS_SICKNESS +.ExplainedSickness: + writetext JasmineGetSomeMedicineText + waitbutton + closetext + end + +.BroughtSecretpotion: + writetext JasmineCureAmphyText + yesorno + iffalse .Refused + writetext PlayerHandedSecretpotionText + promptbutton + takeitem SECRETPOTION + writetext JasmineDontBeOffendedText + waitbutton + closetext + turnobject OLIVINELIGHTHOUSE6F_JASMINE, RIGHT + pause 15 + turnobject OLIVINELIGHTHOUSE6F_MONSTER, LEFT + opentext + playmusic MUSIC_HEAL + writetext JasmineAmphyHowAreYouFeelingText + pause 60 + promptbutton + closetext + special RestartMapMusic + cry AMPHAROS + special FadeOutPalettes + pause 10 + special FadeInPalettes + opentext + writetext AmphyPaluPaluluText + waitbutton + closetext + turnobject OLIVINELIGHTHOUSE6F_MONSTER, RIGHT + pause 10 + turnobject OLIVINELIGHTHOUSE6F_MONSTER, LEFT + pause 10 + turnobject OLIVINELIGHTHOUSE6F_MONSTER, RIGHT + pause 10 + turnobject OLIVINELIGHTHOUSE6F_MONSTER, LEFT + pause 10 + faceplayer + opentext + writetext JasmineThankYouText + waitbutton + closetext + setevent EVENT_JASMINE_RETURNED_TO_GYM + clearevent EVENT_OLIVINE_GYM_JASMINE + readvar VAR_FACING + ifequal DOWN, .FacingDown + ifequal RIGHT, .FacingRight + applymovement OLIVINELIGHTHOUSE6F_JASMINE, OlivineLighthouseJasmineLeavesUpMovement + disappear OLIVINELIGHTHOUSE6F_JASMINE + end + +.FacingDown: + applymovement OLIVINELIGHTHOUSE6F_JASMINE, OlivineLighthouseJasmineLeavesDownMovement + disappear OLIVINELIGHTHOUSE6F_JASMINE + end + +.FacingRight: + applymovement OLIVINELIGHTHOUSE6F_JASMINE, OlivineLighthouseJasmineLeavesRightMovement + disappear OLIVINELIGHTHOUSE6F_JASMINE + end + +.Refused: + writetext JasmineISeeText + waitbutton + closetext + turnobject OLIVINELIGHTHOUSE6F_JASMINE, RIGHT + pause 15 + turnobject OLIVINELIGHTHOUSE6F_MONSTER, LEFT + opentext + writetext JasmineAmphyHangOnText + waitbutton + closetext + end + +.Unused: ; unreferenced + end + +OlivineLighthouseAmphy: + faceplayer + opentext + checkevent EVENT_JASMINE_RETURNED_TO_GYM + iftrue .HealthyNow + writetext AmphyPalPalooText + loadmonindex 0, AMPHAROS + special PlaySlowCry + promptbutton + writetext AmphyBreathingLaboredText + waitbutton + closetext + end + +.HealthyNow: + writetext AmphyPaluPaluluText + cry AMPHAROS + waitbutton + closetext + special FadeOutPalettes + special FadeInPalettes + special FadeOutPalettes + special FadeInPalettes + end + +OlivineLighthouse6FSuperPotion: + itemball SUPER_POTION + +OlivineLighthouseJasmineLeavesUpMovement: + slow_step UP + slow_step UP + slow_step RIGHT + slow_step UP + slow_step UP + step_sleep 8 + step_sleep 8 + step_end + +OlivineLighthouseJasmineLeavesDownMovement: + slow_step DOWN + slow_step RIGHT + slow_step RIGHT + slow_step RIGHT + slow_step UP + slow_step RIGHT + slow_step RIGHT + slow_step RIGHT + step_end + +OlivineLighthouseJasmineLeavesRightMovement: + slow_step UP + slow_step UP + slow_step RIGHT + slow_step UP + slow_step UP + slow_step UP + step_sleep 8 + step_end + +JasmineCianwoodPharmacyText: + text "JASMINE: … This" + line "#MON always" + + para "kept the sea lit" + line "at night." + + para "…But it suddenly" + line "got sick… It's" + cont "gasping for air…" + + para "…I understand" + line "that there is a" + + para "wonderful PHARMACY" + line "in CIANWOOD…" + + para "But that's across" + line "the sea…" + + para "And I can't leave" + line "AMPHY unattended…" + done + +JasmineGetSomeMedicineText: + text "…May I ask you to" + line "get some medicine" + cont "for me? Please?" + done + +JasmineCureAmphyText: + text "JASMINE: …Will" + line "that medicine cure" + cont "AMPHY?" + done + +PlayerHandedSecretpotionText: + text " handed the" + line "SECRETPOTION to" + cont "JASMINE." + done + +JasmineDontBeOffendedText: + text "JASMINE: …Um," + line "please don't be" + cont "offended…" + + para "…AMPHY will not" + line "take anything from" + cont "anyone but me…" + done + +JasmineAmphyHowAreYouFeelingText: + text "JASMINE: …" + + para "AMPHY, how are you" + line "feeling?" + done + +JasmineThankYouText: + text "JASMINE: …Oh, I'm" + line "so relieved…" + + para "This is just so" + line "wonderful…" + + para "Thank you so very," + line "very much." + + para "…I will return to" + line "the GYM…" + done + +JasmineISeeText: + text "JASMINE: …I see…" + done + +JasmineAmphyHangOnText: + text "…AMPHY, hang on!" + done + +AmphyPalPalooText: + text "AMPHY: …" + line "…Pa… paloo…" + done + +AmphyBreathingLaboredText: + text "Its breathing is" + line "terribly labored…" + done + +AmphyPaluPaluluText: + text "AMPHY: Palu!" + line "Palulu!" + done + +OlivineLighthouse6F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 15, OLIVINE_LIGHTHOUSE_5F, 1 + warp_event 16, 5, OLIVINE_LIGHTHOUSE_5F, 6 + warp_event 17, 5, OLIVINE_LIGHTHOUSE_5F, 7 + + def_coord_events + + def_bg_events + + def_object_events + object_event 8, 8, SPRITE_JASMINE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, OlivineLighthouseJasmine, EVENT_OLIVINE_LIGHTHOUSE_JASMINE + object_event 9, 8, SPRITE_MONSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, OlivineLighthouseAmphy, -1 + object_event 3, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, OlivineLighthouse6FSuperPotion, EVENT_OLIVINE_LIGHTHOUSE_6F_SUPER_POTION diff --git a/maps/OlivineLighthouse6F.blk b/maps/OlivineLighthouse6F.blk new file mode 100644 index 0000000..19639c2 --- /dev/null +++ b/maps/OlivineLighthouse6F.blk @@ -0,0 +1 @@ + >))))))> ><''''''<>>'><'<>'(>>'< 6<''>>'' '''>>'>- >''>>'<<'<<''><>''1'''>< <))))))< \ No newline at end of file diff --git a/maps/OlivineMart.asm b/maps/OlivineMart.asm new file mode 100644 index 0000000..094db19 --- /dev/null +++ b/maps/OlivineMart.asm @@ -0,0 +1,60 @@ + object_const_def + const OLIVINEMART_CLERK + const OLIVINEMART_COOLTRAINER_F + const OLIVINEMART_LASS + +OlivineMart_MapScripts: + def_scene_scripts + + def_callbacks + +OlivineMartClerkScript: + opentext + pokemart MARTTYPE_STANDARD, MART_OLIVINE + closetext + end + +OlivineMartCooltrainerFScript: + jumptextfaceplayer OlivineMartCooltrainerFText + +OlivineMartLassScript: + jumptextfaceplayer OlivineMartLassText + +OlivineMartCooltrainerFText: + text "Do your #MON" + line "already know the" + + para "move for carrying" + line "people on water?" + done + +OlivineMartLassText: + text "My BUTTERFREE came" + line "from my boyfriend" + cont "overseas." + + para "It carried some" + line "MAIL from him." + + para "Want to know what" + line "it says?" + + para "Let's see… Nope!" + line "It's a secret!" + done + +OlivineMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, OLIVINE_CITY, 8 + warp_event 3, 7, OLIVINE_CITY, 8 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineMartClerkScript, -1 + object_event 6, 2, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, OlivineMartCooltrainerFScript, -1 + object_event 1, 6, SPRITE_LASS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivineMartLassScript, -1 diff --git a/maps/OlivinePokecenter1F.asm b/maps/OlivinePokecenter1F.asm new file mode 100644 index 0000000..995fc69 --- /dev/null +++ b/maps/OlivinePokecenter1F.asm @@ -0,0 +1,64 @@ + object_const_def + const OLIVINEPOKECENTER1F_NURSE + const OLIVINEPOKECENTER1F_FISHING_GURU + const OLIVINEPOKECENTER1F_FISHER + const OLIVINEPOKECENTER1F_TEACHER + +OlivinePokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +OlivinePokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +OlivinePokecenter1FFishingGuruScript: + jumpstd HappinessCheckScript + +OlivinePokecenter1FFisherScript: + jumptextfaceplayer OlivinePokecenter1FFisherText + +OlivinePokecenter1FTeacherScript: + jumptextfaceplayer OlivinePokecenter1FTeacherText + +OlivinePokecenter1FFisherText: + text "The SAILOR in the" + line "OLIVINE CAFE next" + + para "door is really" + line "generous." + + para "He taught my" + line "#MON STRENGTH." + + para "Now it can move" + line "big boulders." + done + +OlivinePokecenter1FTeacherText: + text "There's a person" + line "in CIANWOOD CITY" + cont "across the sea." + + para "I heard him brag-" + line "ging about his" + cont "rare #MON." + done + +OlivinePokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, OLIVINE_CITY, 1 + warp_event 4, 7, OLIVINE_CITY, 1 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePokecenter1FNurseScript, -1 + object_event 8, 4, SPRITE_FISHING_GURU, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePokecenter1FFishingGuruScript, -1 + object_event 2, 3, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, OlivinePokecenter1FFisherScript, -1 + object_event 7, 1, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePokecenter1FTeacherScript, -1 diff --git a/maps/OlivinePort.asm b/maps/OlivinePort.asm new file mode 100644 index 0000000..25c3e25 --- /dev/null +++ b/maps/OlivinePort.asm @@ -0,0 +1,405 @@ + object_const_def + const OLIVINEPORT_SAILOR1 + const OLIVINEPORT_SAILOR2 + const OLIVINEPORT_SAILOR3 + const OLIVINEPORT_FISHING_GURU1 + const OLIVINEPORT_FISHING_GURU2 + const OLIVINEPORT_YOUNGSTER + const OLIVINEPORT_COOLTRAINER_F + +OlivinePort_MapScripts: + def_scene_scripts + scene_script OlivinePortNoopScene, SCENE_OLIVINEPORT_ASK_ENTER_SHIP + scene_script OlivinePortLeaveShipScene, SCENE_OLIVINEPORT_LEAVE_SHIP + + def_callbacks + +OlivinePortNoopScene: + end + +OlivinePortLeaveShipScene: + sdefer OlivinePortLeaveShipScript + end + +OlivinePortLeaveShipScript: + applymovement PLAYER, OlivinePortLeaveFastShipMovement + appear OLIVINEPORT_SAILOR1 + setscene SCENE_OLIVINEPORT_ASK_ENTER_SHIP + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + blackoutmod OLIVINE_CITY + end + +OlivinePortSailorAtGangwayScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue OlivinePortAlreadyRodeScript + writetext OlivinePortSailorGetOnBoardText + waitbutton + closetext + turnobject OLIVINEPORT_SAILOR1, DOWN + pause 10 + playsound SFX_EXIT_BUILDING + disappear OLIVINEPORT_SAILOR1 + waitsfx + applymovement PLAYER, OlivinePortEnterFastShipMovement + playsound SFX_EXIT_BUILDING + special FadeOutPalettes + waitsfx + checkevent EVENT_FAST_SHIP_FIRST_TIME + iffalse .FirstTime + clearevent EVENT_FAST_SHIP_PASSENGERS_EASTBOUND + setevent EVENT_FAST_SHIP_PASSENGERS_WESTBOUND + clearevent EVENT_BEAT_COOLTRAINERM_SEAN + clearevent EVENT_BEAT_COOLTRAINERF_CAROL + clearevent EVENT_BEAT_GENTLEMAN_EDWARD + clearevent EVENT_BEAT_BEAUTY_CASSIE + clearevent EVENT_BEAT_PSYCHIC_RODNEY + clearevent EVENT_BEAT_SUPER_NERD_SHAWN + clearevent EVENT_BEAT_SAILOR_GARRETT + clearevent EVENT_BEAT_FISHER_JONAH + clearevent EVENT_BEAT_BLACKBELT_WAI +.FirstTime: + clearevent EVENT_FAST_SHIP_DESTINATION_OLIVINE + appear OLIVINEPORT_SAILOR1 + setmapscene FAST_SHIP_1F, SCENE_FASTSHIP1F_ENTER_SHIP + warp FAST_SHIP_1F, 25, 1 + end + +OlivinePortAlreadyRodeScript: + writetext OlivinePortCantBoardText + waitbutton + closetext + end + +OlivinePortWalkUpToShipScript: + turnobject OLIVINEPORT_SAILOR3, RIGHT + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue .skip + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + iftrue .skip + turnobject PLAYER, LEFT + opentext + checkevent EVENT_FAST_SHIP_FIRST_TIME + iffalse .FirstTime + readvar VAR_WEEKDAY + ifequal SUNDAY, .NextShipMonday + ifequal SATURDAY, .NextShipMonday + ifequal TUESDAY, .NextShipFriday + ifequal WEDNESDAY, .NextShipFriday + ifequal THURSDAY, .NextShipFriday +.FirstTime: + writetext OlivinePortAskBoardText + yesorno + iffalse OlivinePortNotRidingMoveAwayScript + writetext OlivinePortAskTicketText + promptbutton + checkitem S_S_TICKET + iffalse .NoTicket + writetext OlivinePortFlashTicketText + waitbutton + closetext + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + applymovement PLAYER, OlivinePortApproachFastShipFirstTimeMovement + sjump OlivinePortSailorAtGangwayScript + +.NoTicket: + writetext OlivinePortNoTicketText + waitbutton + closetext + applymovement PLAYER, OlivinePortCannotEnterFastShipMovement + end + +.NextShipMonday: + writetext OlivinePortMondayShipText + waitbutton + closetext + applymovement PLAYER, OlivinePortCannotEnterFastShipMovement + end + +.NextShipFriday: + writetext OlivinePortFridayShipText + waitbutton + closetext + applymovement PLAYER, OlivinePortCannotEnterFastShipMovement + end + +.skip: + end + +OlivinePortNotRidingScript: + writetext OlivinePortComeAgainText + waitbutton + closetext + end + +OlivinePortNotRidingMoveAwayScript: + writetext OlivinePortComeAgainText + waitbutton + closetext + applymovement PLAYER, OlivinePortCannotEnterFastShipMovement + end + +OlivinePortSailorAfterHOFScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue OlivinePortAlreadyRodeScript + checkevent EVENT_FAST_SHIP_FIRST_TIME + iffalse .FirstTime + readvar VAR_WEEKDAY + ifequal SUNDAY, .NextShipMonday + ifequal SATURDAY, .NextShipMonday + ifequal TUESDAY, .NextShipFriday + ifequal WEDNESDAY, .NextShipFriday + ifequal THURSDAY, .NextShipFriday +.FirstTime: + writetext OlivinePortAskBoardText + yesorno + iffalse OlivinePortNotRidingScript + writetext OlivinePortAskTicketText + promptbutton + checkitem S_S_TICKET + iffalse .NoTicket + writetext OlivinePortFlashTicketText + waitbutton + closetext + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + readvar VAR_FACING + ifequal RIGHT, .Right + applymovement PLAYER, OlivinePortApproachFastShipAfterHOFMovement + sjump OlivinePortSailorAtGangwayScript + +.Right: + applymovement PLAYER, OlivinePortApproachFastShipAfterHOFRightMovement + sjump OlivinePortSailorAtGangwayScript + +.NoTicket: + writetext OlivinePortNoTicketText + waitbutton + closetext + end + +.NextShipMonday: + writetext OlivinePortMondayShipText + waitbutton + closetext + end + +.NextShipFriday: + writetext OlivinePortFridayShipText + waitbutton + closetext + end + +OlivinePortSailorBeforeHOFScript: + jumptextfaceplayer OlivinePortSailorBeforeHOFText + +OlivinePortFishingGuru1Script: + faceplayer + opentext + writetext OlivinePortFishingGuru1Text + waitbutton + closetext + turnobject OLIVINEPORT_FISHING_GURU1, UP + end + +OlivinePortFishingGuru2Script: + faceplayer + opentext + writetext OlivinePortFishingGuru2Text + waitbutton + closetext + turnobject OLIVINEPORT_FISHING_GURU2, UP + end + +OlivinePortYoungsterScript: + faceplayer + opentext + writetext OlivinePortYoungsterText + waitbutton + closetext + turnobject OLIVINEPORT_YOUNGSTER, DOWN + end + +OlivinePortCooltrainerFScript: + faceplayer + opentext + writetext OlivinePortCooltrainerFText + waitbutton + closetext + turnobject OLIVINEPORT_COOLTRAINER_F, DOWN + end + +OlivinePortHiddenProtein: + hiddenitem PROTEIN, EVENT_OLIVINE_PORT_HIDDEN_PROTEIN + +OlivinePortEnterFastShipMovement: + step DOWN + step_end + +OlivinePortLeaveFastShipMovement: + step UP + step_end + +OlivinePortCannotEnterFastShipMovement: + step RIGHT + turn_head LEFT + step_end + +OlivinePortApproachFastShipFirstTimeMovement: + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +OlivinePortApproachFastShipAfterHOFMovement: + step RIGHT + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +OlivinePortApproachFastShipAfterHOFRightMovement: + step UP + step RIGHT + step RIGHT + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +OlivinePortSailorGetOnBoardText: + text "We're departing" + line "soon. Please get" + cont "on board." + done + +OlivinePortCantBoardText: + text "Sorry. You can't" + line "board now." + done + +OlivinePortAskBoardText: + text "Welcome to FAST" + line "SHIP S.S.AQUA." + + para "Will you be board-" + line "ing today?" + done + +OlivinePortAskTicketText: + text "May I see your" + line "S.S.TICKET?" + done + +OlivinePortComeAgainText: + text "We hope to see you" + line "again!" + done + +OlivinePortFlashTicketText: + text " flashed" + line "the S.S.TICKET." + + para "That's it." + line "Thank you!" + done + +OlivinePortNoTicketText: + text " tried to" + line "show the S.S." + cont "TICKET…" + + para "…But no TICKET!" + + para "Sorry!" + line "You may board only" + + para "if you have an" + line "S.S.TICKET." + done + +OlivinePortMondayShipText: + text "The FAST SHIP will" + line "sail next Monday." + done + +OlivinePortFridayShipText: + text "The FAST SHIP will" + line "sail next Friday." + done + +OlivinePortFishingGuru1Text: + text "SHELLDER are easy" + line "to catch here." + + para "They're kind of" + line "rare elsewhere." + done + +OlivinePortFishingGuru2Text: + text "How many RODS do" + line "you have?" + + para "Different RODS" + line "catch different" + cont "#MON." + done + +OlivinePortYoungsterText: + text "S.S.AQUA uses jets" + line "to skim over the" + cont "waves!" + done + +OlivinePortCooltrainerFText: + text "There are lots of" + line "#MON in KANTO." + + para "I wish I could go…" + done + +OlivinePortSailorBeforeHOFText: + text "We don't want you" + line "to fall into the" + + para "sea, so you're not" + line "allowed in." + done + +OlivinePort_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 11, 7, OLIVINE_PORT_PASSAGE, 5 + warp_event 7, 23, FAST_SHIP_1F, 1 + + def_coord_events + coord_event 7, 15, SCENE_OLIVINEPORT_ASK_ENTER_SHIP, OlivinePortWalkUpToShipScript + + def_bg_events + bg_event 1, 22, BGEVENT_ITEM, OlivinePortHiddenProtein + + def_object_events + object_event 7, 23, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePortSailorAtGangwayScript, EVENT_OLIVINE_PORT_SAILOR_AT_GANGWAY + object_event 7, 15, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePortSailorBeforeHOFScript, EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME + object_event 6, 15, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePortSailorAfterHOFScript, EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME + object_event 4, 14, SPRITE_FISHING_GURU, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePortFishingGuru1Script, EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME + object_event 13, 14, SPRITE_FISHING_GURU, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePortFishingGuru2Script, EVENT_OLIVINE_PORT_SPRITES_BEFORE_HALL_OF_FAME + object_event 4, 15, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePortYoungsterScript, EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME + object_event 11, 15, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePortCooltrainerFScript, EVENT_OLIVINE_PORT_SPRITES_AFTER_HALL_OF_FAME diff --git a/maps/OlivinePort.blk b/maps/OlivinePort.blk new file mode 100644 index 0000000..994dacc --- /dev/null +++ b/maps/OlivinePort.blk @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + + + + + +  + + + + + + +  + + +&&&&&&&  + + + + + + + + + + + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/maps/OlivinePortPassage.asm b/maps/OlivinePortPassage.asm new file mode 100644 index 0000000..2b1cf0a --- /dev/null +++ b/maps/OlivinePortPassage.asm @@ -0,0 +1,35 @@ + object_const_def + const OLIVINEPORTPASSAGE_POKEFAN_M + +OlivinePortPassage_MapScripts: + def_scene_scripts + + def_callbacks + +OlivinePortPassagePokefanMScript: + jumptextfaceplayer OlivinePortPassagePokefanMText + +OlivinePortPassagePokefanMText: + text "FAST SHIP S.S.AQUA" + line "sails to KANTO on" + + para "Mondays and Fri-" + line "days." + done + +OlivinePortPassage_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 15, 0, OLIVINE_CITY, 10 + warp_event 16, 0, OLIVINE_CITY, 11 + warp_event 15, 4, OLIVINE_PORT_PASSAGE, 4 + warp_event 3, 2, OLIVINE_PORT_PASSAGE, 3 + warp_event 3, 14, OLIVINE_PORT, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 17, 1, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePortPassagePokefanMScript, EVENT_OLIVINE_PORT_PASSAGE_POKEFAN_M diff --git a/maps/OlivinePunishmentSpeechHouse.asm b/maps/OlivinePunishmentSpeechHouse.asm new file mode 100644 index 0000000..ce96ac5 --- /dev/null +++ b/maps/OlivinePunishmentSpeechHouse.asm @@ -0,0 +1,55 @@ + object_const_def + const OLIVINEPUNISHMENTSPEECHHOUSE_POKEFAN_M + const OLIVINEPUNISHMENTSPEECHHOUSE_LASS + +OlivinePunishmentSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +OlivinePunishmentSpeechHouseDad: + jumptextfaceplayer OlivinePunishmentSpeechHouseDadText + +OlivinePunishmentSpeechHouseDaughter: + jumptextfaceplayer OlivinePunishmentSpeechHouseDaughterText + +OlivinePunishmentSpeechHouseBookshelf2: + jumpstd PictureBookshelfScript + +OlivinePunishmentSpeechHouseBookshelf1: + jumpstd MagazineBookshelfScript + +OlivinePunishmentSpeechHouseDadText: + text "Along the way to" + line "CIANWOOD, there" + + para "are four deserted" + line "islands." + + para "Bad kids are taken" + line "to the islands as" + cont "punishment!" + done + +OlivinePunishmentSpeechHouseDaughterText: + text "Whenever I get in" + line "trouble, Daddy" + cont "always scares me." + done + +OlivinePunishmentSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, OLIVINE_CITY, 5 + warp_event 3, 7, OLIVINE_CITY, 5 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, OlivinePunishmentSpeechHouseBookshelf1 + bg_event 1, 1, BGEVENT_READ, OlivinePunishmentSpeechHouseBookshelf2 + + def_object_events + object_event 1, 2, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePunishmentSpeechHouseDad, -1 + object_event 5, 5, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, OlivinePunishmentSpeechHouseDaughter, -1 diff --git a/maps/OlivineTimsHouse.asm b/maps/OlivineTimsHouse.asm new file mode 100644 index 0000000..082ae52 --- /dev/null +++ b/maps/OlivineTimsHouse.asm @@ -0,0 +1,34 @@ + object_const_def + const OLIVINETIMSHOUSE_TIM + +OlivineTimsHouse_MapScripts: + def_scene_scripts + + def_callbacks + +Tim: + faceplayer + opentext + trade NPC_TRADE_TIM + waitbutton + closetext + end + +TimsHouseBookshelf: + jumpstd MagazineBookshelfScript + +OlivineTimsHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, OLIVINE_CITY, 3 + warp_event 3, 7, OLIVINE_CITY, 3 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, TimsHouseBookshelf + bg_event 1, 1, BGEVENT_READ, TimsHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_FISHING_GURU, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Tim, -1 diff --git a/maps/PalletTown.asm b/maps/PalletTown.asm new file mode 100644 index 0000000..945ab04 --- /dev/null +++ b/maps/PalletTown.asm @@ -0,0 +1,88 @@ + object_const_def + const PALLETTOWN_TEACHER + const PALLETTOWN_FISHER + +PalletTown_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, PalletTownFlypointCallback + +PalletTownFlypointCallback: + setflag ENGINE_FLYPOINT_PALLET + endcallback + +PalletTownTeacherScript: + jumptextfaceplayer PalletTownTeacherText + +PalletTownFisherScript: + jumptextfaceplayer PalletTownFisherText + +PalletTownSign: + jumptext PalletTownSignText + +RedsHouseSign: + jumptext RedsHouseSignText + +OaksLabSign: + jumptext OaksLabSignText + +BluesHouseSign: + jumptext BluesHouseSignText + +PalletTownTeacherText: + text "I'm raising #-" + line "MON too." + + para "They serve as my" + line "private guards." + done + +PalletTownFisherText: + text "Technology is" + line "incredible!" + + para "You can now trade" + line "#MON across" + cont "time like e-mail." + done + +PalletTownSignText: + text "PALLET TOWN" + + para "A Tranquil Setting" + line "of Peace & Purity" + done + +RedsHouseSignText: + text "RED'S HOUSE" + done + +OaksLabSignText: + text "OAK #MON" + line "RESEARCH LAB" + done + +BluesHouseSignText: + text "BLUE'S HOUSE" + done + +PalletTown_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 5, REDS_HOUSE_1F, 1 + warp_event 13, 5, BLUES_HOUSE, 1 + warp_event 12, 11, OAKS_LAB, 1 + + def_coord_events + + def_bg_events + bg_event 7, 9, BGEVENT_READ, PalletTownSign + bg_event 3, 5, BGEVENT_READ, RedsHouseSign + bg_event 13, 13, BGEVENT_READ, OaksLabSign + bg_event 11, 5, BGEVENT_READ, BluesHouseSign + + def_object_events + object_event 3, 8, SPRITE_TEACHER, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PalletTownTeacherScript, -1 + object_event 12, 14, SPRITE_FISHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PalletTownFisherScript, -1 diff --git a/maps/PalletTown.blk b/maps/PalletTown.blk new file mode 100644 index 0000000..7203e50 --- /dev/null +++ b/maps/PalletTown.blk @@ -0,0 +1,4 @@ +RORO PRRRPN8989MN<=<=MNMNwV T!MNtt7:~MNwVw1MN +1tt +1MP +edaaaaaO \ No newline at end of file diff --git a/maps/PewterCity.asm b/maps/PewterCity.asm new file mode 100644 index 0000000..352e7b7 --- /dev/null +++ b/maps/PewterCity.asm @@ -0,0 +1,179 @@ + object_const_def + const PEWTERCITY_COOLTRAINER_F + const PEWTERCITY_BUG_CATCHER + const PEWTERCITY_GRAMPS + const PEWTERCITY_FRUIT_TREE1 + const PEWTERCITY_FRUIT_TREE2 + +PewterCity_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, PewterCityFlypointCallback + +PewterCityFlypointCallback: + setflag ENGINE_FLYPOINT_PEWTER + endcallback + +PewterCityCooltrainerFScript: + jumptextfaceplayer PewterCityCooltrainerFText + +PewterCityBugCatcherScript: + jumptextfaceplayer PewterCityBugCatcherText + +PewterCityGrampsScript: + faceplayer + opentext + checkevent EVENT_GOT_SILVER_WING + iftrue .GotSilverWing + writetext PewterCityGrampsText + promptbutton + verbosegiveitem SILVER_WING + setevent EVENT_GOT_SILVER_WING + closetext + end + +.GotSilverWing: + writetext PewterCityGrampsText_GotSilverWing + waitbutton + closetext + end + +PewterCitySign: + jumptext PewterCitySignText + +PewterGymSign: + jumptext PewterGymSignText + +PewterMuseumSign: + jumptext PewterMuseumSignText + +PewterCityMtMoonGiftShopSign: + jumptext PewterCityMtMoonGiftShopSignText + +PewterCityWelcomeSign: + jumptext PewterCityWelcomeSignText + +PewterCityPokecenterSign: + jumpstd PokecenterSignScript + +PewterCityMartSign: + jumpstd MartSignScript + +PewterCityFruitTree1: + fruittree FRUITTREE_PEWTER_CITY_1 + +PewterCityFruitTree2: + fruittree FRUITTREE_PEWTER_CITY_2 + +PewterCityCooltrainerFText: + text "Have you visited" + line "PEWTER GYM?" + + para "The LEADER uses" + line "rock-type #MON." + done + +PewterCityBugCatcherText: + text "At night, CLEFAIRY" + line "come out to play" + cont "at MT.MOON." + + para "But not every" + line "night." + done + +PewterCityGrampsText: + text "Ah, you came all" + line "the way out here" + cont "from JOHTO?" + + para "That brings back" + line "memories. When I" + + para "was young, I went" + line "to JOHTO to train." + + para "You remind me so" + line "much of what I was" + + para "like as a young" + line "man." + + para "Here. I want you" + line "to have this item" + cont "I found in JOHTO." + done + +PewterCityGrampsText_GotSilverWing: + text "Going to new, un-" + line "known places and" + cont "seeing new people…" + + para "Those are the joys" + line "of travel." + done + +PewterCitySignText: + text "PEWTER CITY" + line "A Stone Gray City" + done + +PewterGymSignText: + text "PEWTER CITY" + line "#MON GYM" + cont "LEADER: BROCK" + + para "The Rock Solid" + line "#MON Trainer" + done + +PewterMuseumSignText: + text "There's a notice" + line "here…" + + para "PEWTER MUSEUM OF" + line "SCIENCE is closed" + cont "for renovations…" + done + +PewterCityMtMoonGiftShopSignText: + text "There's a notice" + line "here…" + + para "MT.MOON GIFT SHOP" + line "NOW OPEN!" + done + +PewterCityWelcomeSignText: + text "WELCOME TO" + line "PEWTER CITY!" + done + +PewterCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 29, 13, PEWTER_NIDORAN_SPEECH_HOUSE, 1 + warp_event 16, 17, PEWTER_GYM, 1 + warp_event 23, 17, PEWTER_MART, 2 + warp_event 13, 25, PEWTER_POKECENTER_1F, 1 + warp_event 7, 29, PEWTER_SNOOZE_SPEECH_HOUSE, 1 + + def_coord_events + + def_bg_events + bg_event 25, 23, BGEVENT_READ, PewterCitySign + bg_event 11, 17, BGEVENT_READ, PewterGymSign + bg_event 15, 9, BGEVENT_READ, PewterMuseumSign + bg_event 33, 19, BGEVENT_READ, PewterCityMtMoonGiftShopSign + bg_event 19, 29, BGEVENT_READ, PewterCityWelcomeSign + bg_event 14, 25, BGEVENT_READ, PewterCityPokecenterSign + bg_event 24, 17, BGEVENT_READ, PewterCityMartSign + + def_object_events + object_event 19, 11, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PewterCityCooltrainerFScript, -1 + object_event 14, 29, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, PewterCityBugCatcherScript, -1 + object_event 29, 17, SPRITE_GRAMPS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PewterCityGrampsScript, -1 + object_event 32, 3, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PewterCityFruitTree1, -1 + object_event 30, 3, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PewterCityFruitTree2, -1 diff --git a/maps/PewterCity.blk b/maps/PewterCity.blk new file mode 100644 index 0000000..5e6f654 --- /dev/null +++ b/maps/PewterCity.blk @@ -0,0 +1,59 @@ + + +RRRRRRRRRRRR?;tt  T!tt + + +,)ttuqqv7}~t + +ttn,)/7}}~/B,) + + + + + + +n,)tttttt>??,) + + + +(,,,) + +  !$WW,) + + +|s + + +,),)RRRRR + + + + + +>??,) !1wVww1(,,,) + + +|rtnttttm$WW,)nttttmM + ++%t + + +n/mM + +)M + +%QQQQQQQQQQ + + + + + + + + + + + + + + diff --git a/maps/PewterGym.asm b/maps/PewterGym.asm new file mode 100644 index 0000000..40b8b34 --- /dev/null +++ b/maps/PewterGym.asm @@ -0,0 +1,225 @@ + object_const_def + const PEWTERGYM_BROCK + const PEWTERGYM_YOUNGSTER + const PEWTERGYM_GYM_GUIDE + +PewterGym_MapScripts: + def_scene_scripts + + def_callbacks + +PewterGymBrockScript: + faceplayer + opentext + checkflag ENGINE_BOULDERBADGE + iftrue .FightDone + writetext BrockIntroText + waitbutton + closetext + winlosstext BrockWinLossText, 0 + loadtrainer BROCK, BROCK1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_BROCK + setevent EVENT_BEAT_CAMPER_JERRY + opentext + writetext ReceivedBoulderBadgeText + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_BOULDERBADGE + writetext BrockBoulderBadgeText + waitbutton + closetext + end + +.FightDone: + writetext BrockFightDoneText + waitbutton + closetext + end + +TrainerCamperJerry: + trainer CAMPER, JERRY, EVENT_BEAT_CAMPER_JERRY, CamperJerrySeenText, CamperJerryBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CamperJerryAfterBattleText + waitbutton + closetext + end + +PewterGymGuideScript: + faceplayer + opentext + checkevent EVENT_BEAT_BROCK + iftrue .PewterGymGuideWinScript + writetext PewterGymGuideText + waitbutton + closetext + end + +.PewterGymGuideWinScript: + writetext PewterGymGuideWinText + waitbutton + closetext + end + +PewterGymStatue: + checkflag ENGINE_BOULDERBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, BROCK, BROCK1 + jumpstd GymStatue2Script + +BrockIntroText: + text "BROCK: Wow, it's" + line "not often that we" + + para "get a challenger" + line "from JOHTO." + + para "I'm BROCK, the" + line "PEWTER GYM LEADER." + + para "I'm an expert on" + line "rock-type #MON." + + para "My #MON are im-" + line "pervious to most" + + para "physical attacks." + line "You'll have a hard" + + para "time inflicting" + line "any damage." + + para "Come on!" + done + +BrockWinLossText: + text "BROCK: Your #-" + line "MON's powerful at-" + cont "tacks overcame my" + cont "rock-hard defense…" + + para "You're stronger" + line "than I expected…" + + para "Go ahead--take" + line "this BADGE." + done + +ReceivedBoulderBadgeText: + text " received" + line "BOULDERBADGE." + done + +BrockBoulderBadgeText: + text "BROCK: ," + line "thanks. I enjoyed" + + para "battling you, even" + line "though I am a bit" + cont "upset." + + para "That BOULDERBADGE" + line "will make your" + + para "#MON even more" + line "powerful." + done + +BrockFightDoneText: + text "BROCK: The world" + line "is huge. There are" + + para "still many strong" + line "trainers like you." + + para "Just wait and see." + line "I'm going to be-" + cont "come a lot strong-" + cont "er too." + done + +CamperJerrySeenText: + text "The trainers of" + line "this GYM use rock-" + cont "type #MON." + + para "The rock-type has" + line "high DEFENSE." + + para "Battles could end" + line "up going a long" + + para "time. Are you" + line "ready for this?" + done + +CamperJerryBeatenText: + text "I have to win" + line "these battles…" + done + +CamperJerryAfterBattleText: + text "Hey, you! Trainer" + line "from JOHTO! BROCK" + + para "is tough. He'll" + line "punish you if you" + + para "don't take him" + line "seriously." + done + +PewterGymGuideText: + text "Yo! CHAMP in" + line "making! You're" + + para "really rocking." + line "Are you battling" + + para "the GYM LEADERS of" + line "KANTO?" + + para "They're strong and" + line "dedicated people," + + para "just like JOHTO's" + line "GYM LEADERS." + done + +PewterGymGuideWinText: + text "Yo! CHAMP in" + line "making! That GYM" + + para "didn't give you" + line "much trouble." + + para "The way you took" + line "charge was really" + + para "inspiring. I mean" + line "that seriously." + done + +PewterGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 13, PEWTER_CITY, 2 + warp_event 5, 13, PEWTER_CITY, 2 + + def_coord_events + + def_bg_events + bg_event 2, 11, BGEVENT_READ, PewterGymStatue + bg_event 7, 11, BGEVENT_READ, PewterGymStatue + + def_object_events + object_event 5, 1, SPRITE_BROCK, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, PewterGymBrockScript, -1 + object_event 2, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerCamperJerry, -1 + object_event 6, 11, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 1, PewterGymGuideScript, -1 diff --git a/maps/PewterGym.blk b/maps/PewterGym.blk new file mode 100644 index 0000000..789a99a --- /dev/null +++ b/maps/PewterGym.blk @@ -0,0 +1 @@ +322245 632 2452 2652 262 2 & \ No newline at end of file diff --git a/maps/PewterMart.asm b/maps/PewterMart.asm new file mode 100644 index 0000000..4482274 --- /dev/null +++ b/maps/PewterMart.asm @@ -0,0 +1,60 @@ + object_const_def + const PEWTERMART_CLERK + const PEWTERMART_YOUNGSTER + const PEWTERMART_SUPER_NERD + +PewterMart_MapScripts: + def_scene_scripts + + def_callbacks + +PewterMartClerkScript: + opentext + pokemart MARTTYPE_STANDARD, MART_PEWTER + closetext + end + +PewterMartYoungsterScript: + jumptextfaceplayer PewterMartYoungsterText + +PewterMartSuperNerdScript: + jumptextfaceplayer PewterMartSuperNerdText + +PewterMartYoungsterText: + text "Hi! Check out my" + line "GYARADOS!" + + para "I raised it from a" + line "MAGIKARP. I can't" + + para "believe how strong" + line "it has become." + done + +PewterMartSuperNerdText: + text "There once was a" + line "weird old man who" + cont "sold MAGIKARP." + + para "He was saying the" + line "MAGIKARP from the" + + para "LAKE OF RAGE were" + line "excellent." + done + +PewterMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, PEWTER_CITY, 3 + warp_event 3, 7, PEWTER_CITY, 3 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PewterMartClerkScript, -1 + object_event 9, 2, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PewterMartYoungsterScript, -1 + object_event 6, 6, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, PewterMartSuperNerdScript, -1 diff --git a/maps/PewterNidoranSpeechHouse.asm b/maps/PewterNidoranSpeechHouse.asm new file mode 100644 index 0000000..e8793ee --- /dev/null +++ b/maps/PewterNidoranSpeechHouse.asm @@ -0,0 +1,42 @@ + object_const_def + const PEWTERNIDORANSPEECHHOUSE_SUPER_NERD + const PEWTERNIDORANSPEECHHOUSE_NIDORAN_M + +PewterNidoranSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +PewterNidoranSpeechHouseSuperNerdScript: + jumptextfaceplayer PewterNidoranSpeechHouseSuperNerdText + +PewterNidoran: + opentext + writetext PewterNidoranText + cry NIDORAN_M + waitbutton + closetext + end + +PewterNidoranSpeechHouseSuperNerdText: + text "NIDORAN, shake!" + done + +PewterNidoranText: + text "NIDORAN: Gau gau!" + done + +PewterNidoranSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, PEWTER_CITY, 1 + warp_event 3, 7, PEWTER_CITY, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 5, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PewterNidoranSpeechHouseSuperNerdScript, -1 + object_event 4, 5, SPRITE_GROWLITHE, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PewterNidoran, -1 diff --git a/maps/PewterPokecenter1F.asm b/maps/PewterPokecenter1F.asm new file mode 100644 index 0000000..236e41d --- /dev/null +++ b/maps/PewterPokecenter1F.asm @@ -0,0 +1,85 @@ + object_const_def + const PEWTERPOKECENTER1F_NURSE + const PEWTERPOKECENTER1F_TEACHER + const PEWTERPOKECENTER1F_JIGGLYPUFF + const PEWTERPOKECENTER1F_BUG_CATCHER + const PEWTERPOKECENTER1F_CHRIS + +PewterPokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +PewterPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +PewterPokecenter1FTeacherScript: + jumptextfaceplayer PewterPokecenter1FTeacherText + +PewterJigglypuff: + opentext + writetext PewterJigglypuffText + cry JIGGLYPUFF + waitbutton + closetext + end + +PewterPokecenter1FBugCatcherScript: + jumptextfaceplayer PewterPokecenter1FBugCatcherText + +Chris: + faceplayer + opentext + trade NPC_TRADE_CHRIS + waitbutton + closetext + end + +PewterPokecenter1FTeacherText: + text "…Yeah, and the" + line "GYM in CINNABAR's" + + para "gone. I was really" + line "amazed." + + para "…Yes? I'm on the" + line "phone. Go away!" + done + +PewterJigglypuffText: + text "JIGGLYPUFF: Puu" + line "pupuu." + done + +PewterPokecenter1FBugCatcherText: + text "Most #MON get" + line "drowsy if they" + + para "hear a JIGGLYPUFF" + line "singing." + + para "There are several" + line "moves that can be" + + para "used only while a" + line "#MON is asleep." + done + +PewterPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, PEWTER_CITY, 4 + warp_event 4, 7, PEWTER_CITY, 4 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PewterPokecenter1FNurseScript, -1 + object_event 8, 6, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PewterPokecenter1FTeacherScript, -1 + object_event 1, 3, SPRITE_JIGGLYPUFF, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PewterJigglypuff, -1 + object_event 2, 3, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PewterPokecenter1FBugCatcherScript, -1 + object_event 7, 2, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Chris, -1 diff --git a/maps/PewterPokecenter2FBeta.asm b/maps/PewterPokecenter2FBeta.asm new file mode 100644 index 0000000..0bf6d60 --- /dev/null +++ b/maps/PewterPokecenter2FBeta.asm @@ -0,0 +1,16 @@ +PewterPokecenter2FBeta_MapScripts: + def_scene_scripts + + def_callbacks + +PewterPokecenter2FBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 7, PEWTER_POKECENTER_1F, 3 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/PewterSnoozeSpeechHouse.asm b/maps/PewterSnoozeSpeechHouse.asm new file mode 100644 index 0000000..e32ca72 --- /dev/null +++ b/maps/PewterSnoozeSpeechHouse.asm @@ -0,0 +1,35 @@ + object_const_def + const PEWTERSNOOZESPEECHHOUSE_GRAMPS + +PewterSnoozeSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +PewterSnoozeSpeechHouseGrampsScript: + jumptextfaceplayer PewterSnoozeSpeechHouseGrampsText + +PewterSnoozeSpeechHouseBookshelf: + jumpstd PictureBookshelfScript + +PewterSnoozeSpeechHouseGrampsText: + text "I like snoozing" + line "with the radio on…" + cont "…Zzzz…" + done + +PewterSnoozeSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, PEWTER_CITY, 5 + warp_event 3, 7, PEWTER_CITY, 5 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, PewterSnoozeSpeechHouseBookshelf + bg_event 1, 1, BGEVENT_READ, PewterSnoozeSpeechHouseBookshelf + + def_object_events + object_event 5, 3, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PewterSnoozeSpeechHouseGrampsScript, -1 diff --git a/maps/PlayersHouse1F.asm b/maps/PlayersHouse1F.asm new file mode 100644 index 0000000..f914bd8 --- /dev/null +++ b/maps/PlayersHouse1F.asm @@ -0,0 +1,409 @@ + object_const_def + const PLAYERSHOUSE1F_MOM1 + const PLAYERSHOUSE1F_MOM2 + const PLAYERSHOUSE1F_MOM3 + const PLAYERSHOUSE1F_MOM4 + const PLAYERSHOUSE1F_POKEFAN_F + +PlayersHouse1F_MapScripts: + def_scene_scripts + scene_script PlayersHouse1FNoop1Scene, SCENE_PLAYERSHOUSE1F_MEET_MOM + scene_script PlayersHouse1FNoop2Scene, SCENE_PLAYERSHOUSE1F_NOOP + + def_callbacks + +PlayersHouse1FNoop1Scene: + end + +PlayersHouse1FNoop2Scene: + end + +MeetMomLeftScript: + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + +MeetMomRightScript: + playmusic MUSIC_MOM + showemote EMOTE_SHOCK, PLAYERSHOUSE1F_MOM1, 15 + turnobject PLAYER, LEFT + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iffalse .OnRight + applymovement PLAYERSHOUSE1F_MOM1, MomTurnsTowardPlayerMovement + sjump MeetMomScript + +.OnRight: + applymovement PLAYERSHOUSE1F_MOM1, MomWalksToPlayerMovement +MeetMomScript: + opentext + writetext ElmsLookingForYouText + promptbutton + getstring STRING_BUFFER_4, PokegearName + scall PlayersHouse1FReceiveItemStd + setflag ENGINE_POKEGEAR + setflag ENGINE_PHONE_CARD + addcellnum PHONE_MOM + setscene SCENE_PLAYERSHOUSE1F_NOOP + setevent EVENT_PLAYERS_HOUSE_MOM_1 + clearevent EVENT_PLAYERS_HOUSE_MOM_2 + writetext MomGivesPokegearText + promptbutton + special SetDayOfWeek +.SetDayOfWeek: + writetext IsItDSTText + yesorno + iffalse .WrongDay + special InitialSetDSTFlag + yesorno + iffalse .SetDayOfWeek + sjump .DayOfWeekDone + +.WrongDay: + special InitialClearDSTFlag + yesorno + iffalse .SetDayOfWeek +.DayOfWeekDone: + writetext ComeHomeForDSTText + yesorno + iffalse .ExplainPhone + sjump .KnowPhone + +.KnowPhone: + writetext KnowTheInstructionsText + promptbutton + sjump .FinishPhone + +.ExplainPhone: + writetext DontKnowTheInstructionsText + promptbutton + sjump .FinishPhone + +.FinishPhone: + writetext InstructionsNextText + waitbutton + closetext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue .FromRight + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + iffalse .FromLeft + sjump .Finish + +.FromRight: + applymovement PLAYERSHOUSE1F_MOM1, MomTurnsBackMovement + sjump .Finish + +.FromLeft: + applymovement PLAYERSHOUSE1F_MOM1, MomWalksBackMovement + sjump .Finish + +.Finish: + special RestartMapMusic + turnobject PLAYERSHOUSE1F_MOM1, LEFT + end + +MeetMomTalkedScript: + playmusic MUSIC_MOM + sjump MeetMomScript + +PokegearName: + db "#GEAR@" + +PlayersHouse1FReceiveItemStd: + jumpstd ReceiveItemScript + end + +MomScript: + faceplayer + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + checkscene + iffalse MeetMomTalkedScript ; SCENE_PLAYERSHOUSE1F_MEET_MOM + opentext + checkevent EVENT_FIRST_TIME_BANKING_WITH_MOM + iftrue .FirstTimeBanking + checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST + iftrue .BankOfMom + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iftrue .GaveMysteryEgg + checkevent EVENT_GOT_A_POKEMON_FROM_ELM + iftrue .GotAPokemon + writetext HurryUpElmIsWaitingText + waitbutton + closetext + end + +.GotAPokemon: + writetext SoWhatWasProfElmsErrandText + waitbutton + closetext + end + +.FirstTimeBanking: + writetext ImBehindYouText + waitbutton + closetext + end + +.GaveMysteryEgg: + setevent EVENT_FIRST_TIME_BANKING_WITH_MOM +.BankOfMom: + setevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST + special BankOfMom + waitbutton + closetext + end + +NeighborScript: + faceplayer + opentext + checktime MORN + iftrue .MornScript + checktime DAY + iftrue .DayScript + checktime NITE + iftrue .NiteScript + +.MornScript: + writetext NeighborMornIntroText + promptbutton + sjump .Main + +.DayScript: + writetext NeighborDayIntroText + promptbutton + sjump .Main + +.NiteScript: + writetext NeighborNiteIntroText + promptbutton + sjump .Main + +.Main: + writetext NeighborText + waitbutton + closetext + turnobject PLAYERSHOUSE1F_POKEFAN_F, RIGHT + end + +PlayersHouse1FTVScript: + jumptext PlayersHouse1FTVText + +PlayersHouse1FStoveScript: + jumptext PlayersHouse1FStoveText + +PlayersHouse1FSinkScript: + jumptext PlayersHouse1FSinkText + +PlayersHouse1FFridgeScript: + jumptext PlayersHouse1FFridgeText + +MomTurnsTowardPlayerMovement: + turn_head RIGHT + step_end + +MomWalksToPlayerMovement: + slow_step RIGHT + step_end + +MomTurnsBackMovement: + turn_head LEFT + step_end + +MomWalksBackMovement: + slow_step LEFT + step_end + +ElmsLookingForYouText: + text "Oh, …! Our" + line "neighbor, PROF." + + para "ELM, was looking" + line "for you." + + para "He said he wanted" + line "you to do some-" + cont "thing for him." + + para "Oh! I almost for-" + line "got! Your #MON" + + para "GEAR is back from" + line "the repair shop." + + para "Here you go!" + done + +MomGivesPokegearText: + text "#MON GEAR, or" + line "just #GEAR." + + para "It's essential if" + line "you want to be a" + cont "good trainer." + + para "Oh, the day of the" + line "week isn't set." + + para "You mustn't forget" + line "that!" + done + +IsItDSTText: + text "Is it Daylight" + line "Saving Time now?" + done + +ComeHomeForDSTText: + text "Come home to" + line "adjust your clock" + + para "for Daylight" + line "Saving Time." + + para "By the way, do you" + line "know how to use" + cont "the PHONE?" + done + +KnowTheInstructionsText: + text "Don't you just" + line "turn the #GEAR" + + para "on and select the" + line "PHONE icon?" + done + +DontKnowTheInstructionsText: + text "I'll read the" + line "instructions." + + para "Turn the #GEAR" + line "on and select the" + cont "PHONE icon." + done + +InstructionsNextText: + text "Phone numbers are" + line "stored in memory." + + para "Just choose a name" + line "you want to call." + + para "Gee, isn't that" + line "convenient?" + done + +HurryUpElmIsWaitingText: + text "PROF.ELM is wait-" + line "ing for you." + + para "Hurry up, baby!" + done + +SoWhatWasProfElmsErrandText: + text "So, what was PROF." + line "ELM's errand?" + + para "…" + + para "That does sound" + line "challenging." + + para "But, you should be" + line "proud that people" + cont "rely on you." + done + +ImBehindYouText: + text ", do it!" + + para "I'm behind you all" + line "the way!" + done + +NeighborMornIntroText: + text "Good morning," + line "!" + + para "I'm visiting!" + done + +NeighborDayIntroText: + text "Hello, !" + line "I'm visiting!" + done + +NeighborNiteIntroText: + text "Good evening," + line "!" + + para "I'm visiting!" + done + +NeighborText: + text ", have you" + line "heard?" + + para "My daughter is" + line "adamant about" + + para "becoming PROF." + line "ELM's assistant." + + para "She really loves" + line "#MON!" + done + +PlayersHouse1FStoveText: + text "Mom's specialty!" + + para "CINNABAR VOLCANO" + line "BURGER!" + done + +PlayersHouse1FSinkText: + text "The sink is spot-" + line "less. Mom likes it" + cont "clean." + done + +PlayersHouse1FFridgeText: + text "Let's see what's" + line "in the fridge…" + + para "FRESH WATER and" + line "tasty LEMONADE!" + done + +PlayersHouse1FTVText: + text "There's a movie on" + line "TV: Stars dot the" + + para "sky as two boys" + line "ride on a train…" + + para "I'd better get" + line "rolling too!" + done + +PlayersHouse1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 6, 7, NEW_BARK_TOWN, 2 + warp_event 7, 7, NEW_BARK_TOWN, 2 + warp_event 9, 0, PLAYERS_HOUSE_2F, 1 + + def_coord_events + coord_event 8, 4, SCENE_PLAYERSHOUSE1F_MEET_MOM, MeetMomLeftScript + coord_event 9, 4, SCENE_PLAYERSHOUSE1F_MEET_MOM, MeetMomRightScript + + def_bg_events + bg_event 0, 1, BGEVENT_READ, PlayersHouse1FStoveScript + bg_event 1, 1, BGEVENT_READ, PlayersHouse1FSinkScript + bg_event 2, 1, BGEVENT_READ, PlayersHouse1FFridgeScript + bg_event 4, 1, BGEVENT_READ, PlayersHouse1FTVScript + + def_object_events + object_event 7, 4, SPRITE_MOM, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MomScript, EVENT_PLAYERS_HOUSE_MOM_1 + object_event 2, 2, SPRITE_MOM, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, MORN, 0, OBJECTTYPE_SCRIPT, 0, MomScript, EVENT_PLAYERS_HOUSE_MOM_2 + object_event 7, 4, SPRITE_MOM, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, DAY, 0, OBJECTTYPE_SCRIPT, 0, MomScript, EVENT_PLAYERS_HOUSE_MOM_2 + object_event 0, 2, SPRITE_MOM, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, NITE, 0, OBJECTTYPE_SCRIPT, 0, MomScript, EVENT_PLAYERS_HOUSE_MOM_2 + object_event 4, 4, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, NeighborScript, EVENT_PLAYERS_HOUSE_1F_NEIGHBOR diff --git a/maps/PlayersHouse1F.blk b/maps/PlayersHouse1F.blk new file mode 100644 index 0000000..8b85e15 --- /dev/null +++ b/maps/PlayersHouse1F.blk @@ -0,0 +1,2 @@ + +   \ No newline at end of file diff --git a/maps/PlayersHouse2F.asm b/maps/PlayersHouse2F.asm new file mode 100644 index 0000000..45d43a6 --- /dev/null +++ b/maps/PlayersHouse2F.asm @@ -0,0 +1,133 @@ + object_const_def + const PLAYERSHOUSE2F_CONSOLE + const PLAYERSHOUSE2F_DOLL_1 + const PLAYERSHOUSE2F_DOLL_2 + const PLAYERSHOUSE2F_BIG_DOLL + +PlayersHouse2F_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, PlayersHouse2FInitializeRoomCallback + callback MAPCALLBACK_TILES, PlayersHouse2FSetUpTileDecorationsCallback + +PlayersHouse2FNoopScene: ; unreferenced + end + +PlayersHouse2FInitializeRoomCallback: + special ToggleDecorationsVisibility + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_8 + checkevent EVENT_INITIALIZED_EVENTS + iftrue .SkipInitialization + jumpstd InitializeEventsScript + endcallback + +.SkipInitialization: + endcallback + +PlayersHouse2FSetUpTileDecorationsCallback: + special ToggleMaptileDecorations + endcallback + + db 0, 0, 0 ; unused + +PlayersHouseDoll1Script:: + describedecoration DECODESC_LEFT_DOLL + +PlayersHouseDoll2Script: + describedecoration DECODESC_RIGHT_DOLL + +PlayersHouseBigDollScript: + describedecoration DECODESC_BIG_DOLL + +PlayersHouseGameConsoleScript: + describedecoration DECODESC_CONSOLE + +PlayersHousePosterScript: + conditional_event EVENT_PLAYERS_ROOM_POSTER, .Script + +.Script: + describedecoration DECODESC_POSTER + +PlayersHouseRadioScript: + checkevent EVENT_GOT_A_POKEMON_FROM_ELM + iftrue .NormalRadio + checkevent EVENT_LISTENED_TO_INITIAL_RADIO + iftrue .AbbreviatedRadio + playmusic MUSIC_POKEMON_TALK + opentext + writetext PlayersRadioText1 + pause 45 + writetext PlayersRadioText2 + pause 45 + writetext PlayersRadioText3 + pause 45 + musicfadeout MUSIC_NEW_BARK_TOWN, 16 + writetext PlayersRadioText4 + pause 45 + closetext + setevent EVENT_LISTENED_TO_INITIAL_RADIO + end + +.NormalRadio: + jumpstd Radio1Script + +.AbbreviatedRadio: + opentext + writetext PlayersRadioText4 + pause 45 + closetext + end + +PlayersHouseBookshelfScript: + jumpstd PictureBookshelfScript + +PlayersHousePCScript: + opentext + special PlayersHousePC + iftrue .Warp + closetext + end +.Warp: + warp NONE, 0, 0 + end + +PlayersRadioText1: + text "PROF.OAK'S #MON" + line "TALK! Please tune" + cont "in next time!" + done + +PlayersRadioText2: + text "#MON CHANNEL!" + done + +PlayersRadioText3: + text "This is DJ MARY," + line "your co-host!" + done + +PlayersRadioText4: + text "#MON!" + line "#MON CHANNEL…" + done + +PlayersHouse2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 0, PLAYERS_HOUSE_1F, 3 + + def_coord_events + + def_bg_events + bg_event 2, 1, BGEVENT_UP, PlayersHousePCScript + bg_event 3, 1, BGEVENT_READ, PlayersHouseRadioScript + bg_event 5, 1, BGEVENT_READ, PlayersHouseBookshelfScript + bg_event 6, 0, BGEVENT_IFSET, PlayersHousePosterScript + + def_object_events + object_event 4, 2, SPRITE_CONSOLE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PlayersHouseGameConsoleScript, EVENT_PLAYERS_HOUSE_2F_CONSOLE + object_event 4, 4, SPRITE_DOLL_1, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PlayersHouseDoll1Script, EVENT_PLAYERS_HOUSE_2F_DOLL_1 + object_event 5, 4, SPRITE_DOLL_2, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PlayersHouseDoll2Script, EVENT_PLAYERS_HOUSE_2F_DOLL_2 + object_event 0, 1, SPRITE_BIG_DOLL, SPRITEMOVEDATA_BIGDOLL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PlayersHouseBigDollScript, EVENT_PLAYERS_HOUSE_2F_BIG_DOLL diff --git a/maps/PlayersHouse2F.blk b/maps/PlayersHouse2F.blk new file mode 100644 index 0000000..63d33c2 --- /dev/null +++ b/maps/PlayersHouse2F.blk @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/maps/PlayersNeighborsHouse.asm b/maps/PlayersNeighborsHouse.asm new file mode 100644 index 0000000..2c09a55 --- /dev/null +++ b/maps/PlayersNeighborsHouse.asm @@ -0,0 +1,115 @@ + object_const_def + const PLAYERSNEIGHBORSHOUSE_COOLTRAINER_F + const PLAYERSNEIGHBORSHOUSE_POKEFAN_F + +PlayersNeighborsHouse_MapScripts: + def_scene_scripts + + def_callbacks + +PlayersNeighborsDaughterScript: + jumptextfaceplayer PlayersNeighborsDaughterText + +PlayersNeighborScript: + jumptextfaceplayer PlayersNeighborText + +PlayersNeighborsHouseBookshelfScript: + jumpstd MagazineBookshelfScript + +PlayersNeighborsHouseRadioScript: + checkevent EVENT_GOT_A_POKEMON_FROM_ELM + iftrue .NormalRadio + checkevent EVENT_LISTENED_TO_INITIAL_RADIO + iftrue .AbbreviatedRadio + playmusic MUSIC_POKEMON_TALK + opentext + writetext PlayerNeighborRadioText1 + pause 45 + writetext PlayerNeighborRadioText2 + pause 45 + writetext PlayerNeighborRadioText3 + pause 45 + musicfadeout MUSIC_NEW_BARK_TOWN, 16 + writetext PlayerNeighborRadioText4 + pause 45 + closetext + setevent EVENT_LISTENED_TO_INITIAL_RADIO + end +.NormalRadio: + jumpstd Radio1Script +.AbbreviatedRadio: + opentext + writetext PlayerNeighborRadioText4 + pause 45 + closetext + end + +PlayersNeighborsDaughterText: + text "PIKACHU is an" + line "evolved #MON." + + para "I was amazed by" + line "PROF.ELM's find-" + cont "ings." + + para "He's so famous for" + line "his research on" + cont "#MON evolution." + + para "…sigh…" + + para "I wish I could be" + line "a researcher like" + cont "him…" + done + +PlayersNeighborText: + text "My daughter is" + line "adamant about" + + para "becoming PROF." + line "ELM's assistant." + + para "She really loves" + line "#MON!" + + para "But then, so do I!" + done + +PlayerNeighborRadioText1: + text "PROF.OAK'S #MON" + line "TALK! Please tune" + cont "in next time!" + done + +PlayerNeighborRadioText2: + text "#MON CHANNEL!" + done + +PlayerNeighborRadioText3: + text "This is DJ MARY," + line "your co-host!" + done + +PlayerNeighborRadioText4: + text "#MON!" + line "#MON CHANNEL…" + done + +PlayersNeighborsHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, NEW_BARK_TOWN, 3 + warp_event 3, 7, NEW_BARK_TOWN, 3 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, PlayersNeighborsHouseBookshelfScript + bg_event 1, 1, BGEVENT_READ, PlayersNeighborsHouseBookshelfScript + bg_event 7, 1, BGEVENT_READ, PlayersNeighborsHouseRadioScript + + def_object_events + object_event 2, 3, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, PlayersNeighborsDaughterScript, -1 + object_event 5, 3, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, PlayersNeighborScript, EVENT_PLAYERS_NEIGHBORS_HOUSE_NEIGHBOR diff --git a/maps/PokeSeersHouse.asm b/maps/PokeSeersHouse.asm new file mode 100644 index 0000000..e098272 --- /dev/null +++ b/maps/PokeSeersHouse.asm @@ -0,0 +1,29 @@ + object_const_def + const POKESEERSHOUSE_GRANNY + +PokeSeersHouse_MapScripts: + def_scene_scripts + + def_callbacks + +SeerScript: + faceplayer + opentext + special PokeSeer + waitbutton + closetext + end + +PokeSeersHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, CIANWOOD_CITY, 7 + warp_event 3, 7, CIANWOOD_CITY, 7 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SeerScript, -1 diff --git a/maps/Pokecenter1F.blk b/maps/Pokecenter1F.blk new file mode 100644 index 0000000..6d4f1ec --- /dev/null +++ b/maps/Pokecenter1F.blk @@ -0,0 +1 @@ + ./'./ \ No newline at end of file diff --git a/maps/Pokecenter2F.asm b/maps/Pokecenter2F.asm new file mode 100644 index 0000000..e4175fd --- /dev/null +++ b/maps/Pokecenter2F.asm @@ -0,0 +1,1042 @@ + object_const_def + const POKECENTER2F_TRADE_RECEPTIONIST + const POKECENTER2F_BATTLE_RECEPTIONIST + const POKECENTER2F_TIME_CAPSULE_RECEPTIONIST + const POKECENTER2F_OFFICER + +Pokecenter2F_MapScripts: + def_scene_scripts + scene_script Pokecenter2FCheckMysteryGiftScene, SCENE_POKECENTER2F_CHECK_MYSTERY_GIFT + scene_script Pokecenter2FLeaveTradeCenterScene, SCENE_POKECENTER2F_LEAVE_TRADE_CENTER + scene_script Pokecenter2FLeaveColosseumScene, SCENE_POKECENTER2F_LEAVE_COLOSSEUM + scene_script Pokecenter2FLeaveTimeCapsuleScene, SCENE_POKECENTER2F_LEAVE_TIME_CAPSULE + scene_script Pokecenter2FLeaveMobileTradeRoomScene, SCENE_POKECENTER2F_LEAVE_MOBILE_TRADE_ROOM + scene_script Pokecenter2FLeaveMobileBattleRoomScene, SCENE_POKECENTER2F_LEAVE_MOBILE_BATTLE_ROOM + + def_callbacks + +Pokecenter2FCheckMysteryGiftScene: + special CheckMysteryGift + ifequal $0, .done + clearevent EVENT_MYSTERY_GIFT_DELIVERY_GUY + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + iftrue .done + sdefer Pokecenter2F_AppearMysteryGiftDeliveryGuy +.done + end + +Pokecenter2FLeaveTradeCenterScene: + sdefer Script_LeftCableTradeCenter + end + +Pokecenter2FLeaveColosseumScene: + sdefer Script_LeftCableColosseum + end + +Pokecenter2FLeaveTimeCapsuleScene: + sdefer Script_LeftTimeCapsule + end + +Pokecenter2FLeaveMobileTradeRoomScene: + sdefer Script_LeftMobileTradeRoom + end + +Pokecenter2FLeaveMobileBattleRoomScene: + sdefer Script_LeftMobileBattleRoom + end + +Pokecenter2F_AppearMysteryGiftDeliveryGuy: + appear POKECENTER2F_OFFICER + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + end + +Script_TradeCenterClosed: + faceplayer + opentext + writetext Text_TradeRoomClosed + waitbutton + closetext + end + +Script_BattleRoomClosed: + faceplayer + opentext + writetext Text_BattleRoomClosed + waitbutton + closetext + end + +LinkReceptionistScript_Trade: + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iffalse Script_TradeCenterClosed + opentext + writetext Text_TradeReceptionistIntro + yesorno + iffalse .Cancel + special Mobile_DummyReturnFalse ; always returns false + iffalse .NoMobile + writetext Text_TradeReceptionistMobile + special AskMobileOrCable + iffalse .Cancel + ifequal $1, .Mobile +.NoMobile: + special SetBitsForLinkTradeRequest + writetext Text_PleaseWait + special WaitForLinkedFriend + iffalse .FriendNotReady + writetext Text_MustSaveGame + yesorno + iffalse .DidNotSave + special TryQuickSave + iffalse .DidNotSave + writetext Text_PleaseWait + special CheckLinkTimeout_Receptionist + iffalse .LinkTimedOut + readmem wOtherPlayerLinkMode + iffalse .LinkedToFirstGen + special CheckBothSelectedSameRoom + iffalse .IncompatibleRooms + writetext Text_PleaseComeIn + waitbutton + closetext + scall Pokecenter2F_CheckGender + warpcheck + end + +.FriendNotReady: + special WaitForOtherPlayerToExit + writetext YourFriendIsNotReadyText + closetext + end + +.LinkedToFirstGen: + special FailedLinkToPast + writetext Text_CantLinkToThePast + special CloseLink + closetext + end + +.IncompatibleRooms: + writetext Text_IncompatibleRooms + special CloseLink + closetext + end + +.LinkTimedOut: + writetext Text_LinkTimedOut + sjump .AbortLink + +.DidNotSave: + writetext Text_PleaseComeAgain +.AbortLink: + special WaitForOtherPlayerToExit +.Cancel: + closetext + end + +.Mobile: + scall .Mobile_TrySave + iftrue .Mobile_Abort + scall BattleTradeMobile_WalkIn + warpcheck + end + +.Mobile_Abort: + end + +.Mobile_TrySave: + writetext Text_MustSaveGame + yesorno + iffalse .Mobile_DidNotSave + special TryQuickSave + iffalse .Mobile_DidNotSave + special Function1011f1 + writetext Text_PleaseComeIn + waitbutton + closetext + setval FALSE + end + +.Mobile_DidNotSave: + writetext Text_PleaseComeAgain + closetext + setval TRUE + end + +BattleTradeMobile_WalkIn: + applymovementlasttalked Pokecenter2FMobileMobileMovementData_ReceptionistWalksUpAndLeft_LookDown + applymovement PLAYER, Pokecenter2FMobileMovementData_PlayerWalksIntoMobileBattleRoom + end + +LinkReceptionistScript_Battle: + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iffalse Script_BattleRoomClosed + opentext + writetext Text_BattleReceptionistIntro + yesorno + iffalse .Cancel + special Mobile_DummyReturnFalse ; always returns false + iffalse .NoMobile + writetext Text_BattleReceptionistMobile + special AskMobileOrCable + iffalse .Cancel + ifequal $1, .Mobile +.NoMobile: + special SetBitsForBattleRequest + writetext Text_PleaseWait + special WaitForLinkedFriend + iffalse .FriendNotReady + writetext Text_MustSaveGame + yesorno + iffalse .DidNotSave + special TryQuickSave + iffalse .DidNotSave + writetext Text_PleaseWait + special CheckLinkTimeout_Receptionist + iffalse .LinkTimedOut + readmem wOtherPlayerLinkMode + iffalse .LinkedToFirstGen + special CheckBothSelectedSameRoom + iffalse .IncompatibleRooms + writetext Text_PleaseComeIn + waitbutton + closetext + scall Pokecenter2F_CheckGender + warpcheck + end + +.FriendNotReady: + special WaitForOtherPlayerToExit + writetext YourFriendIsNotReadyText + closetext + end + +.LinkedToFirstGen: + special FailedLinkToPast + writetext Text_CantLinkToThePast + special CloseLink + closetext + end + +.IncompatibleRooms: + writetext Text_IncompatibleRooms + special CloseLink + closetext + end + +.LinkTimedOut: + writetext Text_LinkTimedOut + sjump .AbortLink + +.DidNotSave: + writetext Text_PleaseComeAgain +.AbortLink: + special WaitForOtherPlayerToExit +.Cancel: + closetext + end + +.Mobile: + scall .SelectThreeMons + iffalse .Mobile_Abort + scall .Mobile_TrySave + iftrue .Mobile_Abort + scall BattleTradeMobile_WalkIn + warpcheck + end + +.Mobile_Abort: + end + +.Mobile_TrySave: + writetext Text_MustSaveGame + yesorno + iffalse .Mobile_DidNotSave + special Function103780 + iffalse .Mobile_DidNotSave + special Function1011f1 + writetext Text_PleaseComeIn + waitbutton + closetext + setval FALSE + end + +.Mobile_DidNotSave: + writetext Text_PleaseComeAgain + closetext + setval TRUE + end + +.SelectThreeMons: + special Mobile_SelectThreeMons + iffalse .Mobile_DidNotSelect + ifequal $1, .Mobile_OK + ifequal $2, .Mobile_OK + ifequal $3, .Mobile_InvalidParty + sjump .Mobile_DidNotSelect + +.Mobile_InvalidParty: + writetext Text_BrokeStadiumRules + waitbutton +.Mobile_DidNotSelect: + closetext + setval FALSE + end + +.Mobile_OK: + setval TRUE + end + +Script_TimeCapsuleClosed: + faceplayer + opentext + writetext Text_TimeCapsuleClosed + waitbutton + closetext + end + +LinkReceptionistScript_TimeCapsule: + checkevent EVENT_MET_BILL + iftrue Script_TimeCapsuleClosed + checkflag ENGINE_TIME_CAPSULE + iftrue Script_TimeCapsuleClosed + special SetBitsForTimeCapsuleRequest + faceplayer + opentext + writetext Text_TimeCapsuleReceptionistIntro + yesorno + iffalse .Cancel + special CheckTimeCapsuleCompatibility + ifequal $1, .MonTooNew + ifequal $2, .MonMoveTooNew + ifequal $3, .MonHasMail + writetext Text_PleaseWait + special WaitForLinkedFriend + iffalse .FriendNotReady + writetext Text_MustSaveGame + yesorno + iffalse .DidNotSave + special TryQuickSave + iffalse .DidNotSave + writetext Text_PleaseWait + special CheckLinkTimeout_Receptionist + iffalse .LinkTimedOut + readmem wOtherPlayerLinkMode + iffalse .OK + special CheckBothSelectedSameRoom + writetext Text_IncompatibleRooms + special CloseLink + closetext + end + +.OK: + special EnterTimeCapsule + writetext Text_PleaseComeIn + waitbutton + closetext + scall TimeCapsuleScript_CheckPlayerGender + warpcheck + end + +.FriendNotReady: + special WaitForOtherPlayerToExit + writetext YourFriendIsNotReadyText + closetext + end + +.LinkTimedOut: + writetext Text_LinkTimedOut + sjump .Cancel + +.DidNotSave: + writetext Text_PleaseComeAgain +.Cancel: + special WaitForOtherPlayerToExit + closetext + end + +.MonTooNew: + writetext Text_RejectNewMon + closetext + end + +.MonMoveTooNew: + writetext Text_RejectMonWithNewMove + closetext + end + +.MonHasMail: + writetext Text_RejectMonWithMail + closetext + end + +Script_LeftCableTradeCenter: + special WaitForOtherPlayerToExit + scall Script_WalkOutOfLinkTradeRoom + setscene SCENE_POKECENTER2F_CHECK_MYSTERY_GIFT + setmapscene TRADE_CENTER, SCENE_TRADECENTER_INITIALIZE + end + +Script_LeftMobileTradeRoom: + special Function101220 + scall Script_WalkOutOfMobileTradeRoom + setscene SCENE_POKECENTER2F_CHECK_MYSTERY_GIFT + setmapscene MOBILE_TRADE_ROOM, SCENE_MOBILETRADEROOM_INITIALIZE + end + +Script_WalkOutOfMobileTradeRoom: + applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMobileMovementData_ReceptionistWalksUpAndLeft + applymovement PLAYER, Pokecenter2FMovementData_PlayerWalksOutOfMobileRoom + applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMobileMovementData_ReceptionistWalksRightAndDown + end + +Script_LeftCableColosseum: + special WaitForOtherPlayerToExit + scall Script_WalkOutOfLinkBattleRoom + setscene SCENE_POKECENTER2F_CHECK_MYSTERY_GIFT + setmapscene COLOSSEUM, SCENE_COLOSSEUM_INITIALIZE + end + +Script_LeftMobileBattleRoom: + special Function101220 + scall Script_WalkOutOfMobileBattleRoom + setscene SCENE_POKECENTER2F_CHECK_MYSTERY_GIFT + setmapscene MOBILE_BATTLE_ROOM, SCENE_MOBILEBATTLEROOM_INITIALIZE + end + +Script_WalkOutOfMobileBattleRoom: + applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMobileMovementData_ReceptionistWalksUpAndLeft + applymovement PLAYER, Pokecenter2FMovementData_PlayerWalksOutOfMobileRoom + applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMobileMovementData_ReceptionistWalksRightAndDown + end + +Pokecenter2F_CheckGender: + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .Female + applymovementlasttalked Pokecenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesThreeStepsUp + end + +.Female: + applymovementlasttalked Pokecenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight_2 + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsUp + opentext + writetext Text_OhPleaseWait + waitbutton + closetext + applymovementlasttalked Pokecenter2FMovementData_ReceptionistLooksRight + turnobject PLAYER, LEFT + opentext + writetext Text_ChangeTheLook + waitbutton + closetext + playsound SFX_TINGLE + applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight + setval (PAL_NPC_RED << 4) + special SetPlayerPalette + applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft + setflag ENGINE_KRIS_IN_CABLE_CLUB + special UpdatePlayerSprite + opentext + writetext Text_LikeTheLook + waitbutton + closetext + showemote EMOTE_SHOCK, PLAYER, 15 + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepUp + end + +Script_WalkOutOfLinkTradeRoom: + checkflag ENGINE_KRIS_IN_CABLE_CLUB + iftrue .Female + applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_3 + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesThreeStepsDown + applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightAndDown + end + +.Female: + applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_3 + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepDown_2 + clearflag ENGINE_KRIS_IN_CABLE_CLUB + playsound SFX_TINGLE + applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight + setval (PAL_NPC_BLUE << 4) + special SetPlayerPalette + applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft + special UpdatePlayerSprite + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsDown_2 + applymovement POKECENTER2F_TRADE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightAndDown + end + +Script_WalkOutOfLinkBattleRoom: + checkflag ENGINE_KRIS_IN_CABLE_CLUB + iftrue .Female + applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_3 + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesThreeStepsDown + applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightAndDown + end + +.Female: + applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_3 + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepDown_2 + clearflag ENGINE_KRIS_IN_CABLE_CLUB + playsound SFX_TINGLE + applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight + setval (PAL_NPC_BLUE << 4) + special SetPlayerPalette + applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft + special UpdatePlayerSprite + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsDown_2 + applymovement POKECENTER2F_BATTLE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightAndDown + end + +TimeCapsuleScript_CheckPlayerGender: + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .Female + readvar VAR_FACING + ifequal LEFT, .MaleFacingLeft + ifequal RIGHT, .MaleFacingRight + applymovementlasttalked Pokecenter2FMovementData_ReceptionistStepsLeftLooksDown + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsUp_2 + end + +.MaleFacingLeft: + applymovementlasttalked Pokecenter2FMovementData_ReceptionistStepsLeftLooksDown + applymovement PLAYER, Pokecenter2FMovementData_PlayerWalksLeftAndUp + end + +.MaleFacingRight: + applymovementlasttalked Pokecenter2FMovementData_ReceptionistStepsRightLooksDown + applymovement PLAYER, Pokecenter2FMovementData_PlayerWalksRightAndUp + end + +.Female: + readvar VAR_FACING + ifequal RIGHT, .FemaleFacingRight + ifequal LEFT, .FemaleFacingLeft + applymovementlasttalked Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight_2 + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepUp_2 + sjump .FemaleContinue + +.FemaleFacingRight: + applymovementlasttalked Pokecenter2FMovementData_ReceptionistStepsRightLooksLeft_2 + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepRight + sjump .FemaleContinue + +.FemaleFacingLeft: + applymovementlasttalked Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight_2 + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepLeft +.FemaleContinue: + opentext + writetext Text_OhPleaseWait + waitbutton + closetext + readvar VAR_FACING + ifnotequal UP, .FemaleChangeApperance + turnobject PLAYER, LEFT +.FemaleChangeApperance: + opentext + writetext Text_ChangeTheLook + waitbutton + closetext + playsound SFX_TINGLE + applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight + setval (PAL_NPC_RED << 4) + special SetPlayerPalette + applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingDown + faceobject PLAYER, POKECENTER2F_TIME_CAPSULE_RECEPTIONIST + setflag ENGINE_KRIS_IN_CABLE_CLUB + special UpdatePlayerSprite + opentext + writetext Text_LikeTheLook + waitbutton + closetext + showemote EMOTE_SHOCK, PLAYER, 15 + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepUp_2 + end + +Script_LeftTimeCapsule: + special WaitForOtherPlayerToExit + checkflag ENGINE_KRIS_IN_CABLE_CLUB + iftrue .Female + applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesTwoStepsDown + applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_2 + sjump .Done + +.Female: + applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepDown + clearflag ENGINE_KRIS_IN_CABLE_CLUB + playsound SFX_TINGLE + applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight + setval (PAL_NPC_BLUE << 4) + special SetPlayerPalette + applymovement PLAYER, Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft + special UpdatePlayerSprite + applymovement PLAYER, Pokecenter2FMovementData_PlayerTakesOneStepDown + applymovement POKECENTER2F_TIME_CAPSULE_RECEPTIONIST, Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_2 +.Done: + setscene SCENE_POKECENTER2F_CHECK_MYSTERY_GIFT + setmapscene TIME_CAPSULE, SCENE_TIMECAPSULE_INITIALIZE + end + +Pokecenter2FLinkRecordSign: + refreshscreen + special DisplayLinkRecord + closetext + end + +Pokecenter2FOfficerScript: + faceplayer + opentext + checkevent EVENT_MYSTERY_GIFT_DELIVERY_GUY + iftrue .AlreadyGotGift + writetext Text_MysteryGiftDeliveryGuy_Intro + yesorno + iffalse .RefusedGift + writetext Text_MysteryGiftDeliveryGuy_HereYouGo + promptbutton + waitsfx + special GetMysteryGiftItem + iffalse .BagIsFull + itemnotify + setevent EVENT_MYSTERY_GIFT_DELIVERY_GUY +.AlreadyGotGift: + writetext Text_MysteryGiftDeliveryGuy_Outro + waitbutton + closetext + end + +.BagIsFull: + writetext Text_MysteryGiftDeliveryGuy_NoRoom + waitbutton + closetext + end + +.RefusedGift: + writetext Text_MysteryGiftDeliveryGuy_SaidNo + waitbutton + closetext + end + +Pokecenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight: + slow_step UP + slow_step LEFT + turn_head RIGHT + step_end + +Pokecenter2FMobileMobileMovementData_ReceptionistWalksUpAndLeft_LookDown: + slow_step UP + slow_step LEFT + turn_head DOWN + step_end + +Pokecenter2FMovementData_ReceptionistStepsLeftLooksDown: + slow_step LEFT + turn_head DOWN + step_end + +Pokecenter2FMovementData_ReceptionistStepsRightLooksDown: + slow_step RIGHT + turn_head DOWN + step_end + +Pokecenter2FMovementData_ReceptionistWalksUpAndLeft_LookRight_2: + slow_step UP + slow_step LEFT + turn_head RIGHT + step_end + +Pokecenter2FMovementData_ReceptionistLooksRight: + turn_head RIGHT + step_end + +Pokecenter2FMovementData_PlayerTakesThreeStepsUp: + step UP + step UP + step UP + step_end + +Pokecenter2FMovementData_PlayerTakesTwoStepsUp: + step UP + step UP + step_end + +Pokecenter2FMovementData_PlayerTakesOneStepUp: + step UP + step_end + +Pokecenter2FMobileMovementData_PlayerWalksIntoMobileBattleRoom: + step UP + step UP + step RIGHT + step UP + step_end + +Pokecenter2FMovementData_PlayerTakesTwoStepsUp_2: + step UP + step UP + step_end + +Pokecenter2FMovementData_PlayerWalksLeftAndUp: + step LEFT + step UP + step_end + +Pokecenter2FMovementData_PlayerWalksRightAndUp: + step RIGHT + step UP + step_end + +Pokecenter2FMovementData_PlayerTakesThreeStepsDown: + step DOWN + step DOWN + step DOWN + step_end + +Pokecenter2FMovementData_PlayerTakesTwoStepsDown: + step DOWN + step DOWN + step_end + +Pokecenter2FMovementData_PlayerTakesOneStepDown: + step DOWN + step_end + +Pokecenter2FMovementData_ReceptionistStepsRightAndDown: + slow_step RIGHT + slow_step DOWN + step_end + +Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_2: + slow_step RIGHT + turn_head DOWN + step_end + +Pokecenter2FMovementData_ReceptionistStepsRightLooksDown_3: + slow_step UP + slow_step LEFT + turn_head RIGHT + step_end + +Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight: + slow_step LEFT + turn_head RIGHT + step_end + +Pokecenter2FMobileMovementData_ReceptionistWalksUpAndLeft: + slow_step UP + slow_step LEFT + turn_head RIGHT + step_end + +Pokecenter2FMovementData_PlayerWalksOutOfMobileRoom: + step DOWN + step LEFT + step DOWN + step DOWN + step_end + +Pokecenter2FMobileMovementData_ReceptionistWalksRightAndDown: + slow_step RIGHT + slow_step DOWN + step_end + +Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingRight: + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + step_end + +Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingLeft: + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head LEFT + step_end + +Pokecenter2FMovementData_PlayerSpinsClockwiseEndsFacingDown: + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + step_end + +Pokecenter2FMovementData_PlayerTakesOneStepDown_2: + step DOWN + step_end + +Pokecenter2FMovementData_PlayerTakesTwoStepsDown_2: + step DOWN + step DOWN + step_end + +Pokecenter2FMovementData_PlayerTakesOneStepUp_2: + step UP + step_end + +Pokecenter2FMovementData_PlayerTakesOneStepRight: + step RIGHT + step_end + +Pokecenter2FMovementData_PlayerTakesOneStepLeft: + step LEFT + step_end + +Pokecenter2FMovementData_ReceptionistStepsLeftLooksRight_2: + slow_step LEFT + turn_head RIGHT + step_end + +Pokecenter2FMovementData_ReceptionistStepsRightLooksLeft_2: + slow_step RIGHT + turn_head LEFT + step_end + +Text_BattleReceptionistMobile: + text "Would you like to" + line "battle over a GAME" + + para "LINK cable or by" + line "mobile phone?" + done + +Text_TradeReceptionistMobile: + text "Would you like to" + line "trade over a GAME" + + para "LINK cable or by" + line "mobile phone?" + done + +Text_ThisWayToMobileRoom: ; unreferenced + text "This way to the" + line "MOBILE ROOM." + done + +Text_BattleReceptionistIntro: + text "Welcome to CABLE" + line "CLUB COLOSSEUM." + + para "You may battle a" + line "friend here." + + para "Would you like to" + line "battle?" + done + +Text_TradeReceptionistIntro: + text "Welcome to CABLE" + line "TRADE CENTER." + + para "You may trade your" + line "#MON here with" + cont "a friend." + + para "Would you like to" + line "trade?" + done + +Text_TimeCapsuleReceptionistIntro: + text "Welcome to CABLE" + line "CLUB TIME CAPSULE." + + para "You can travel to" + line "the past and trade" + cont "your #MON." + + para "Would you like to" + line "trade across time?" + done + +YourFriendIsNotReadyText: + text "Your friend is not" + line "ready." + prompt + +Text_MustSaveGame: + text "Before opening the" + line "link, you must" + cont "save your game." + done + +Text_PleaseWait: + text "Please wait." + done + +Text_LinkTimedOut: + text "The link has been" + line "closed because of" + cont "inactivity." + + para "Please contact" + line "your friend and" + cont "come again." + prompt + +Text_PleaseComeAgain: + text "Please come again." + prompt + +Text_PleaseComeInDuplicate: ; unreferenced + text "Please come in." + prompt + +Text_TemporaryStagingInLinkRoom: ; unreferenced + text "We'll put you in" + line "the link room for" + cont "the time being." + done + +Text_CantLinkToThePast: + text "You can't link to" + line "the past here." + prompt + +Text_IncompatibleRooms: + text "Incompatible rooms" + line "were chosen." + prompt + +Text_PleaseComeIn: + text "Please come in." + done + +Text_PleaseEnter: ; unreferenced + text "Please enter." + prompt + +Text_RejectNewMon: + text "Sorry--@" + text_ram wStringBuffer1 + text_start + line "can't be taken." + prompt + +Text_RejectMonWithNewMove: + text "You can't take the" + line "@" + text_ram wStringBuffer1 + text " with a" + cont "@" + text_ram wStringBuffer2 + text "." + prompt + +Text_RejectMonWithMail: + text "You can't take the" + line "@" + text_ram wStringBuffer1 + text " that" + cont "has MAIL with you." + prompt + +Text_TimeCapsuleClosed: + text "I'm sorry--the" + line "TIME CAPSULE is" + cont "being adjusted." + done + +Text_TradeRoomClosed: + text "I'm sorry--the" + line "TRADE MACHINE is" + cont "being adjusted." + done + +Text_BattleRoomClosed: + text "I'm sorry--the" + line "BATTLE MACHINE is" + cont "being adjusted." + done + +Text_MysteryGiftDeliveryGuy_Intro: + text "Hello! You're" + line ", right?" + + para "I have some-" + line "thing for you." + done + +Text_MysteryGiftDeliveryGuy_HereYouGo: + text "Here you go!" + done + +Text_MysteryGiftDeliveryGuy_Outro: + text "We hope to serve" + line "you again." + done + +Text_MysteryGiftDeliveryGuy_NoRoom: + text "Oh, you have no" + line "space for this." + + para "Stop in at any" + line "#MON CENTER" + + para "across the country" + line "to pick it up." + done + +Text_MysteryGiftDeliveryGuy_SaidNo: + text "No? That's very" + line "strange…" + done + +Text_OhPleaseWait: + text "Oh, please wait." + done + +Text_ChangeTheLook: + text "We need to change" + line "the look here…" + done + +Text_LikeTheLook: + text "How does this" + line "style look to you?" + done + +Text_BrokeStadiumRules: + text "Excuse me!" + + para "For STADIUM rules," + line "please bring six" + + para "different #MON," + line "excluding EGGS." + + para "The six #MON" + line "must be different." + + para "Also, they must" + line "not be holding" + cont "identical items." + + para "Please come back" + line "when you're ready." + done + +Pokecenter2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 7, POKECENTER_2F, -1 + warp_event 5, 0, TRADE_CENTER, 1 + warp_event 9, 0, COLOSSEUM, 1 + warp_event 13, 2, TIME_CAPSULE, 1 + warp_event 6, 0, MOBILE_TRADE_ROOM, 1 + warp_event 10, 0, MOBILE_BATTLE_ROOM, 1 + + def_coord_events + + def_bg_events + bg_event 7, 3, BGEVENT_READ, Pokecenter2FLinkRecordSign + + def_object_events + object_event 5, 2, SPRITE_LINK_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LinkReceptionistScript_Trade, -1 + object_event 9, 2, SPRITE_LINK_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LinkReceptionistScript_Battle, -1 + object_event 13, 3, SPRITE_LINK_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, LinkReceptionistScript_TimeCapsule, -1 + object_event 1, 1, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Pokecenter2FOfficerScript, EVENT_MYSTERY_GIFT_DELIVERY_GUY diff --git a/maps/Pokecenter2F.blk b/maps/Pokecenter2F.blk new file mode 100644 index 0000000..968f746 --- /dev/null +++ b/maps/Pokecenter2F.blk @@ -0,0 +1,2 @@ +1+ + 28(8-)-) \ No newline at end of file diff --git a/maps/PokecomCenterAdminOfficeMobile.asm b/maps/PokecomCenterAdminOfficeMobile.asm new file mode 100644 index 0000000..605cc7b --- /dev/null +++ b/maps/PokecomCenterAdminOfficeMobile.asm @@ -0,0 +1,280 @@ + object_const_def + const POKECOMCENTERADMINOFFICEMOBILE_SCIENTIST1 + const POKECOMCENTERADMINOFFICEMOBILE_SCIENTIST2 + const POKECOMCENTERADMINOFFICEMOBILE_SCIENTIST3 + +PokecomCenterAdminOfficeMobile_MapScripts: + def_scene_scripts + + def_callbacks + +PokecomCenterAdminOfficeMobileScientist1Script: + jumptextfaceplayer PokecomCenterAdminOfficeMobileScientist1Text + +PokecomCenterAdminOfficeMobileScientist2Script: + jumptextfaceplayer PokecomCenterAdminOfficeMobileScientist2Text + +PokecomCenterAdminOfficeMobileScientist3Script: + jumptextfaceplayer PokecomCenterAdminOfficeMobileScientist3Text + +PokecomCenterAdminOfficeMobileComputer1: + opentext + writetext PokecomCenterAdminOfficeMobileComputer1Text + waitbutton +.loop: + reloadmappart + loadmenu .Computer1MenuHeader + verticalmenu + closewindow + ifequal 1, .PokeComClub + ifequal 2, .MobileCenter + sjump .Quit + +.PokeComClub: + opentext + writetext PokecomCenterAdminOfficeMobileComputer1Text_PokeComClub + waitbutton + sjump .loop + +.MobileCenter: + opentext + writetext PokecomCenterAdminOfficeMobileComputer1Text_MobileCenter + waitbutton + sjump .loop + +.Quit: + closetext + end + +.Computer1MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 15, 8 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 3 ; items + db "# つうしん クラブ@" ; # COM CLUB + db "モバイルセンター@" ; MOBILE CENTER + db "やめる@" ; QUIT + +PokecomCenterAdminOfficeMobileComputer2: + opentext + writetext PokecomCenterAdminOfficeMobileComputer2Text + waitbutton +.loop: + reloadmappart + loadmenu .Computer2MenuHeader + verticalmenu + closewindow + ifequal 1, .UsePhone + ifequal 2, .DontUsePhone + sjump .Quit + +.UsePhone: + opentext + writetext PokecomCenterAdminOfficeMobileComputer2Text_UsePhone + waitbutton + sjump .loop + +.DontUsePhone: + opentext + writetext PokecomCenterAdminOfficeMobileComputer2Text_DontUsePhone + waitbutton + sjump .loop + +.Quit: + closetext + end + +.Computer2MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 15, 8 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR ; flags + db 3 ; items + db "でんわつかうとき@" ; Use phone + db "でんわつながらないとき@" ; Don't use phone + db "やめる@" ; QUIT + +PokecomCenterAdminOfficeMobileComputer3: + jumptext PokecomCenterAdminOfficeMobileComputer3Text + +PokecomCenterAdminOfficeMobileScientist1Text: + text "#COM CENTER and" + line "MOBILE CENTER were" + + para "built to satisfy" + line "demands for trades" + + para "and battles with" + line "trainers far away" + + para "and with total" + line "strangers." + done + +PokecomCenterAdminOfficeMobileScientist2Text: + text "When you linked" + line "with someone by" + + para "mobile phone for" + line "the first time," + + para "weren't you" + line "impressed?" + + para "When my first try" + line "worked, I was so" + + para "impressed that I" + line "got the shakes!" + done + +PokecomCenterAdminOfficeMobileScientist3Text: + text "They were able to" + line "build this huge" + + para "facility thanks to" + line "advances in wire-" + cont "less technology." + done + +PokecomCenterAdminOfficeMobileComputer1Text: + text "It's a notice" + line "about where MOBILE" + + para "ADAPTERS are to be" + line "used…" + done + +PokecomCenterAdminOfficeMobileComputer1Text_PokeComClub: + text "There's a #COM" + line "CLUB upstairs in" + + para "any #MON" + line "CENTER." + + para "There, you can" + line "battle or trade" + + para "with a friend far" + line "away by using a" + cont "MOBILE ADAPTER." + + para "To link up, your" + line "friend must have" + + para "the same kind of" + line "MOBILE ADAPTER as" + cont "you." + done + +PokecomCenterAdminOfficeMobileComputer1Text_MobileCenter: + text "To use the TRADE" + line "CORNER or read the" + + para "#MON NEWS, you" + line "need to phone the" + cont "MOBILE CENTER." + + para "You must register" + line "at the MOBILE" + + para "CENTER before" + line "connecting there." + done + +PokecomCenterAdminOfficeMobileComputer2Text: + text "It's a notice" + line "about using the" + cont "phone…" + done + +PokecomCenterAdminOfficeMobileComputer2Text_UsePhone: + text "Please ensure that" + line "your phone and" + + para "MOBILE ADAPTER are" + line "properly linked." + + para "Please make sure" + line "the wireless phone" + cont "signal is strong." + + para "Don't touch or" + line "hang up the phone" + cont "while linking." + done + +PokecomCenterAdminOfficeMobileComputer2Text_DontUsePhone: + text "If the server is" + line "busy, it may not" + + para "be possible to log" + line "on." + + para "If so, please call" + line "back later." + + para "If you are unable" + line "to log on or don't" + + para "understand the" + line "error messages," + + para "call a support" + line "center or read the" + cont "instructions." + done + +PokecomCenterAdminOfficeMobileComputer3Text: + text "The ADMINISTRATION" + line "OFFICE received an" + cont "e-mail. It says…" + + para "<……> <……> <……>" + + para "To the #COM" + line "CENTER staff…" + + para "Wireless communi-" + line "cation has enabled" + + para "#MON trainers" + line "to interact across" + + para "the nation. Let's" + line "keep working for" + + para "the day when all" + line "the trainers in" + + para "the world can link" + line "without barriers!" + + para "<……> <……> <……>" + done + +PokecomCenterAdminOfficeMobile_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 31, GOLDENROD_POKECENTER_1F, 3 + warp_event 1, 31, GOLDENROD_POKECENTER_1F, 3 + + def_coord_events + + def_bg_events + bg_event 6, 26, BGEVENT_UP, PokecomCenterAdminOfficeMobileComputer1 + bg_event 6, 28, BGEVENT_UP, PokecomCenterAdminOfficeMobileComputer2 + bg_event 3, 26, BGEVENT_UP, PokecomCenterAdminOfficeMobileComputer3 + + def_object_events + object_event 4, 28, SPRITE_SCIENTIST, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, PokecomCenterAdminOfficeMobileScientist1Script, -1 + object_event 7, 27, SPRITE_SCIENTIST, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PokecomCenterAdminOfficeMobileScientist2Script, -1 + object_event 7, 29, SPRITE_SCIENTIST, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PokecomCenterAdminOfficeMobileScientist3Script, -1 diff --git a/maps/PokecomCenterAdminOfficeMobile.blk b/maps/PokecomCenterAdminOfficeMobile.blk new file mode 100644 index 0000000..d4fd924 --- /dev/null +++ b/maps/PokecomCenterAdminOfficeMobile.blk @@ -0,0 +1,4 @@ +&*' +< +/)#  >8? ( + "; %$... +!,-...933901224567::7-=== \ No newline at end of file diff --git a/maps/PokemonFanClub.asm b/maps/PokemonFanClub.asm new file mode 100644 index 0000000..f109bae --- /dev/null +++ b/maps/PokemonFanClub.asm @@ -0,0 +1,316 @@ + object_const_def + const POKEMONFANCLUB_CHAIRMAN + const POKEMONFANCLUB_RECEPTIONIST + const POKEMONFANCLUB_CLEFAIRY_GUY + const POKEMONFANCLUB_TEACHER + const POKEMONFANCLUB_FAIRY + const POKEMONFANCLUB_ODDISH + +PokemonFanClub_MapScripts: + def_scene_scripts + + def_callbacks + +PokemonFanClubChairmanScript: + faceplayer + opentext + checkevent EVENT_LISTENED_TO_FAN_CLUB_PRESIDENT + iftrue .HeardSpeech + checkevent EVENT_LISTENED_TO_FAN_CLUB_PRESIDENT_BUT_BAG_WAS_FULL + iftrue .HeardSpeechButBagFull + writetext PokemonFanClubChairmanDidYouVisitToHearAboutMyMonText + yesorno + iffalse .NotListening + writetext PokemonFanClubChairmanRapidashText + promptbutton +.HeardSpeechButBagFull: + writetext PokemonFanClubChairmanIWantYouToHaveThisText + promptbutton + verbosegiveitem RARE_CANDY + iffalse .BagFull + setevent EVENT_LISTENED_TO_FAN_CLUB_PRESIDENT + writetext PokemonFanClubChairmanItsARareCandyText + waitbutton + closetext + end + +.HeardSpeech: + writetext PokemonFanClubChairmanMoreTalesToTellText + waitbutton + closetext + end + +.NotListening: + writetext PokemonFanClubChairmanHowDisappointingText + waitbutton +.BagFull: + closetext + end + +PokemonFanClubReceptionistScript: + jumptextfaceplayer PokemonFanClubReceptionistText + +PokemonFanClubClefairyGuyScript: + faceplayer + opentext + checkevent EVENT_GOT_LOST_ITEM_FROM_FAN_CLUB + iftrue .GotLostItem + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .FoundClefairyDoll + writetext PokemonFanClubClefairyGuyClefairyIsSoAdorableText + waitbutton + closetext + end + +.FoundClefairyDoll: + writetext PokemonFanClubClefairyGuyMakingDoWithADollIFoundText + checkevent EVENT_MET_COPYCAT_FOUND_OUT_ABOUT_LOST_ITEM + iftrue .MetCopycat + waitbutton + closetext + end + +.MetCopycat: + promptbutton + writetext PokemonFanClubClefairyGuyTakeThisDollBackToGirlText + promptbutton + waitsfx + giveitem LOST_ITEM + iffalse .NoRoom + disappear POKEMONFANCLUB_FAIRY + writetext PokemonFanClubPlayerReceivedDollText + playsound SFX_KEY_ITEM + waitsfx + itemnotify + setevent EVENT_GOT_LOST_ITEM_FROM_FAN_CLUB + closetext + end + +.GotLostItem: + writetext PokemonFanClubClefairyGuyGoingToGetARealClefairyText + waitbutton + closetext + end + +.NoRoom: + writetext PokemonFanClubClefairyGuyPackIsJammedFullText + waitbutton + closetext + end + +PokemonFanClubTeacherScript: + jumptextfaceplayer PokemonFanClubTeacherText + +PokemonFanClubClefairyDollScript: + jumptext PokemonFanClubClefairyDollText + +PokemonFanClubBayleefScript: + opentext + writetext PokemonFanClubBayleefText + cry BAYLEEF + waitbutton + closetext + end + +PokemonFanClubListenSign: + jumptext PokemonFanClubListenSignText + +PokemonFanClubBraggingSign: + jumptext PokemonFanClubBraggingSignText + +PokemonFanClubChairmanDidYouVisitToHearAboutMyMonText: + text "I'm the CHAIRMAN" + line "of the #MON FAN" + cont "CLUB." + + para "I've raised over" + line "150 #MON." + + para "I'm very fussy" + line "when it comes to" + cont "#MON." + + para "Did you visit just" + line "to hear about my" + cont "#MON?" + done + +PokemonFanClubChairmanRapidashText: + text "Good!" + line "Then listen up!" + + para "So… my favorite" + line "RAPIDASH…" + + para "It… cute… lovely…" + line "smart… unbearably…" + cont "plus… amazing… oh…" + cont "you think so?…" + cont "Too much… wild…" + cont "beautiful… kindly…" + cont "love it!" + + para "Hug it… when…" + line "sleeping… warm and" + cont "cuddly… Oh, and…" + cont "spectacular…" + cont "ravishing… simply" + cont "divine…" + cont "Oops! Look at the" + cont "time! I've kept" + cont "you too long!" + done + +PokemonFanClubChairmanIWantYouToHaveThisText: + text "Thanks for hearing" + line "me out. I want you" + cont "to have this!" + done + +PokemonFanClubChairmanItsARareCandyText: + text "It's a RARE CANDY" + line "that makes #MON" + cont "stronger." + + para "I prefer making my" + line "#MON stronger" + + para "by battling, so" + line "you can have it." + done + +PokemonFanClubChairmanMoreTalesToTellText: + text "Hello, !" + + para "Did you come see" + line "me about my #-" + cont "MON again?" + + para "No? Oh… I had more" + line "tales to tell…" + done + +PokemonFanClubChairmanHowDisappointingText: + text "How disappointing…" + + para "Come back if you" + line "want to listen." + done + +PokemonFanClubReceptionistText: + text "Our CHAIRMAN is" + line "very vocal when it" + cont "comes to #MON…" + done + +PokemonFanClubClefairyGuyClefairyIsSoAdorableText: + text "I love the way" + line "CLEFAIRY waggles" + + para "its finger when" + line "it's trying to use" + + para "METRONOME." + line "It's so adorable!" + done + +PokemonFanClubClefairyGuyMakingDoWithADollIFoundText: + text "I love CLEFAIRY," + line "but I could never" + + para "catch one. So I'm" + line "making do with a" + + para "# DOLL that I" + line "found." + done + +PokemonFanClubClefairyGuyTakeThisDollBackToGirlText: + text "Oh, I see now. The" + line "girl who lost this" + + para "# DOLL is sad…" + + para "OK. Could you take" + line "this # DOLL" + + para "back to that poor" + line "little girl?" + + para "I'll befriend a" + line "real CLEFAIRY on" + + para "my own one day." + line "No worries!" + done + +PokemonFanClubPlayerReceivedDollText: + text " received" + line "# DOLL." + done + +PokemonFanClubClefairyGuyGoingToGetARealClefairyText: + text "You watch. I'm" + line "going to get a" + + para "real CLEFAIRY as" + line "my friend." + done + +PokemonFanClubClefairyGuyPackIsJammedFullText: + text "Your PACK is" + line "jammed full." + done + +PokemonFanClubTeacherText: + text "Look at my darling" + line "BAYLEEF!" + + para "The leaf on its" + line "head is so cute!" + done + +PokemonFanClubClefairyDollText: + text "It's a CLEFAIRY!" + line "Huh?" + + para "Oh, right. It's a" + line "CLEFAIRY #" + cont "DOLL." + done + +PokemonFanClubBayleefText: + text "BAYLEEF: Li liif!" + done + +PokemonFanClubListenSignText: + text "Let's all listen" + line "politely to other" + cont "trainers." + done + +PokemonFanClubBraggingSignText: + text "If someone brags," + line "brag right back!" + done + +PokemonFanClub_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, VERMILION_CITY, 3 + warp_event 3, 7, VERMILION_CITY, 3 + + def_coord_events + + def_bg_events + bg_event 7, 0, BGEVENT_READ, PokemonFanClubListenSign + bg_event 9, 0, BGEVENT_READ, PokemonFanClubBraggingSign + + def_object_events + object_event 3, 1, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PokemonFanClubChairmanScript, -1 + object_event 4, 1, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PokemonFanClubReceptionistScript, -1 + object_event 2, 3, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PokemonFanClubClefairyGuyScript, -1 + object_event 7, 2, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PokemonFanClubTeacherScript, -1 + object_event 2, 4, SPRITE_FAIRY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, PokemonFanClubClefairyDollScript, EVENT_VERMILION_FAN_CLUB_DOLL + object_event 7, 3, SPRITE_ODDISH, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PokemonFanClubBayleefScript, -1 diff --git a/maps/PokemonFanClub.blk b/maps/PokemonFanClub.blk new file mode 100644 index 0000000..85cc8fc --- /dev/null +++ b/maps/PokemonFanClub.blk @@ -0,0 +1 @@ +))!"# $0 1 \ No newline at end of file diff --git a/maps/PortPassage.blk b/maps/PortPassage.blk new file mode 100644 index 0000000..25a1837 --- /dev/null +++ b/maps/PortPassage.blk @@ -0,0 +1,3 @@ + +%& +  *)    ,//-    ,/- \ No newline at end of file diff --git a/maps/PowerPlant.asm b/maps/PowerPlant.asm new file mode 100644 index 0000000..423260e --- /dev/null +++ b/maps/PowerPlant.asm @@ -0,0 +1,410 @@ + object_const_def + const POWERPLANT_OFFICER1 + const POWERPLANT_GYM_GUIDE1 + const POWERPLANT_GYM_GUIDE2 + const POWERPLANT_OFFICER2 + const POWERPLANT_GYM_GUIDE3 + const POWERPLANT_MANAGER + const POWERPLANT_FOREST + +PowerPlant_MapScripts: + def_scene_scripts + scene_script PowerPlantNoop1Scene, SCENE_POWERPLANT_NOOP + scene_script PowerPlantNoop2Scene, SCENE_POWERPLANT_GUARD_GETS_PHONE_CALL + + def_callbacks + +PowerPlantNoop1Scene: + end + +PowerPlantNoop2Scene: + end + +PowerPlantGuardPhoneScript: + playsound SFX_CALL + showemote EMOTE_SHOCK, POWERPLANT_OFFICER1, 15 + waitsfx + pause 30 + applymovement POWERPLANT_OFFICER1, PowerPlantOfficer1ApproachGymGuide2Movement + turnobject POWERPLANT_GYM_GUIDE1, DOWN + turnobject POWERPLANT_GYM_GUIDE2, DOWN + opentext + writetext PowerPlantOfficer1CeruleanShadyCharacterText + waitbutton + closetext + turnobject POWERPLANT_OFFICER1, LEFT + turnobject PLAYER, RIGHT + opentext + writetext PowerPlantOfficer1CouldIAskForYourCooperationText + waitbutton + closetext + turnobject PLAYER, DOWN + applymovement POWERPLANT_OFFICER1, PowerPlantOfficer1ReturnToPostMovement + setscene SCENE_POWERPLANT_NOOP + end + +PowerPlantOfficerScript: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + checkevent EVENT_MET_MANAGER_AT_POWER_PLANT + iftrue .MetManager + writetext PowerPlantOfficer1AThiefBrokeInText + waitbutton + closetext + end + +.MetManager: + writetext PowerPlantOfficer1CouldIAskForYourCooperationText + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext PowerPlantOfficer1HaveToBeefUpSecurityText + waitbutton + closetext + end + +PowerPlantGymGuide1Script: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext PowerPlantGymGuide1SomeoneStoleAPartText + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext PowerPlantGymGuide1GeneratorUpAndRunningText + waitbutton + closetext + end + +PowerPlantGymGuide2Script: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext PowerPlantGymGuide2PowerPlantUpAndRunningText + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext PowerPlantGymGuide2GeneratorIsRunningAgainText + waitbutton + closetext + end + +PowerPlantOfficer2Script: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext PowerPlantOfficer2ManagerHasBeenSadAndFuriousText + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext PowerPlantOfficer2ManagerHasBeenCheerfulText + waitbutton + closetext + end + +PowerPlantGymGuide4Script: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext PowerPlantGymGuide4MagnetTrainConsumesElectricityText + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext PowerPlantGymGuide4WeCanGetMagnetTrainRunningText + waitbutton + closetext + end + +PowerPlantManager: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + checkitem MACHINE_PART + iftrue .FoundMachinePart + checkevent EVENT_MET_MANAGER_AT_POWER_PLANT + iftrue .MetManager + writetext PowerPlantManagerWhoWouldRuinMyGeneratorText + waitbutton + closetext + setevent EVENT_MET_MANAGER_AT_POWER_PLANT + clearevent EVENT_CERULEAN_GYM_ROCKET + clearevent EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM + setmapscene CERULEAN_GYM, SCENE_CERULEANGYM_GRUNT_RUNS_OUT + setscene SCENE_POWERPLANT_GUARD_GETS_PHONE_CALL + end + +.MetManager: + writetext PowerPlantManagerIWontForgiveCulpritText + waitbutton + closetext + end + +.FoundMachinePart: + writetext PowerPlantManagerThatsThePartText + promptbutton + takeitem MACHINE_PART + setevent EVENT_RETURNED_MACHINE_PART + clearevent EVENT_SAFFRON_TRAIN_STATION_POPULATION + setevent EVENT_ROUTE_5_6_POKEFAN_M_BLOCKS_UNDERGROUND_PATH + setevent EVENT_ROUTE_24_ROCKET + setevent EVENT_RESTORED_POWER_TO_KANTO + clearevent EVENT_GOLDENROD_TRAIN_STATION_GENTLEMAN +.ReturnedMachinePart: + checkevent EVENT_GOT_TM07_ZAP_CANNON + iftrue .GotZapCannon + writetext PowerPlantManagerTakeThisTMText + promptbutton + verbosegiveitem TM_ZAP_CANNON + iffalse .NoRoom + setevent EVENT_GOT_TM07_ZAP_CANNON + writetext PowerPlantManagerTM07IsZapCannonText + waitbutton +.NoRoom: + closetext + end + +.GotZapCannon: + writetext PowerPlantManagerMyBelovedGeneratorText + waitbutton + closetext + end + +Forest: + faceplayer + opentext + trade NPC_TRADE_FOREST + waitbutton + closetext + end + +PowerPlantBookshelf: + jumpstd DifficultBookshelfScript + +PowerPlantOfficer1ApproachGymGuide2Movement: + step RIGHT + step RIGHT + step UP + step UP + step_end + +PowerPlantOfficer1ReturnToPostMovement: + step DOWN + step DOWN + step LEFT + step LEFT + turn_head DOWN + step_end + +PowerPlantOfficer1AThiefBrokeInText: + text "A thief broke into" + line "the POWER PLANT…" + + para "What is the world" + line "coming to?" + done + +PowerPlantOfficer1CeruleanShadyCharacterText: + text "I just got word" + line "from CERULEAN." + + para "It appears that a" + line "shady character" + + para "has been loitering" + line "around." + done + +PowerPlantOfficer1CouldIAskForYourCooperationText: + text "Could I ask for" + line "your cooperation?" + done + +PowerPlantOfficer1HaveToBeefUpSecurityText: + text "We'll have to beef" + line "up our security" + cont "presence." + done + +PowerPlantGymGuide1SomeoneStoleAPartText: + text "Someone made off" + line "with a part that's" + + para "essential for the" + line "generator." + + para "Without it, the" + line "new generator's" + cont "useless!" + done + +PowerPlantGymGuide1GeneratorUpAndRunningText: + text "The generator's up" + line "and running. It's" + + para "making electricity" + line "to spare." + done + +PowerPlantGymGuide2PowerPlantUpAndRunningText: + text "This POWER PLANT" + line "had been abandoned" + cont "in the past." + + para "We got it back up" + line "and running to" + + para "provide power to" + line "the MAGNET TRAIN." + done + +PowerPlantGymGuide2GeneratorIsRunningAgainText: + text "The generator's" + line "running again!" + done + +PowerPlantOfficer2ManagerHasBeenSadAndFuriousText: + text "The POWER PLANT's" + line "MANAGER is up" + cont "ahead." + + para "But since someone" + line "wrecked the gener-" + cont "ator, he's been" + cont "both sad and" + cont "furious…" + done + +PowerPlantOfficer2ManagerHasBeenCheerfulText: + text "Since the gener-" + line "ator's been fixed," + + para "the MANAGER has" + line "been cheerful." + done + +PowerPlantGymGuide4MagnetTrainConsumesElectricityText: + text "The MAGNET TRAIN" + line "consumes a lot of" + cont "electricity." + + para "It can't move if" + line "the new generator" + cont "isn't operating." + done + +PowerPlantGymGuide4WeCanGetMagnetTrainRunningText: + text "All right! We can" + line "finally get the" + + para "MAGNET TRAIN" + line "running again." + done + +PowerPlantManagerWhoWouldRuinMyGeneratorText: + text "MANAGER: I, I, I'm" + line "ready to blast" + cont "someone!" + + para "Who would dare" + line "ruin my generator?" + + para "I spent so much" + line "time on it!" + + para "If I catch him," + line "he's going to get" + + para "a taste of my ZAP" + line "CANNON!" + done + +PowerPlantManagerIWontForgiveCulpritText: + text "MANAGER: I won't" + line "forgive him!" + + para "The culprit can" + line "cry and apologize," + + para "but I'll still" + line "hammer him!" + + para "Gahahahah!" + done + +PowerPlantManagerThatsThePartText: + text "MANAGER: Ah! Yeah!" + + para "That's the missing" + line "PART from my be-" + cont "loved generator!" + cont "You found it?" + done + +PowerPlantManagerTakeThisTMText: + text "Wahah! Thanks!" + + para "Here! Take this TM" + line "as a reward!" + done + +PowerPlantManagerTM07IsZapCannonText: + text "MANAGER: TM07 is" + line "my ZAP CANNON." + + para "It's a powerful" + line "technique!" + + para "It's not what any-" + line "one would consider" + + para "accurate, but it" + line "packs a wallop!" + done + +PowerPlantManagerMyBelovedGeneratorText: + text "MANAGER: My be-" + line "loved generator!" + + para "Keep pumping the" + line "electricity out!" + done + +PowerPlant_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 17, ROUTE_10_NORTH, 2 + warp_event 3, 17, ROUTE_10_NORTH, 2 + + def_coord_events + coord_event 5, 12, SCENE_POWERPLANT_GUARD_GETS_PHONE_CALL, PowerPlantGuardPhoneScript + + def_bg_events + bg_event 0, 1, BGEVENT_READ, PowerPlantBookshelf + bg_event 1, 1, BGEVENT_READ, PowerPlantBookshelf + + def_object_events + object_event 4, 14, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PowerPlantOfficerScript, -1 + object_event 2, 9, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PowerPlantGymGuide1Script, -1 + object_event 6, 11, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PowerPlantGymGuide2Script, -1 + object_event 9, 3, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, PowerPlantOfficer2Script, -1 + object_event 7, 2, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PowerPlantGymGuide4Script, -1 + object_event 14, 10, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, PowerPlantManager, -1 + object_event 5, 5, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Forest, -1 diff --git a/maps/PowerPlant.blk b/maps/PowerPlant.blk new file mode 100644 index 0000000..ef71d18 --- /dev/null +++ b/maps/PowerPlant.blk @@ -0,0 +1 @@ + , .). ).  44%$4.'.  \ No newline at end of file diff --git a/maps/RadioTower1F.asm b/maps/RadioTower1F.asm new file mode 100644 index 0000000..da7777d --- /dev/null +++ b/maps/RadioTower1F.asm @@ -0,0 +1,493 @@ + object_const_def + const RADIOTOWER1F_RECEPTIONIST + const RADIOTOWER1F_LASS + const RADIOTOWER1F_YOUNGSTER + const RADIOTOWER1F_ROCKET + const RADIOTOWER1F_LUCKYNUMBERMAN + const RADIOTOWER1F_CARD_WOMAN + +RadioTower1F_MapScripts: + def_scene_scripts + + def_callbacks + +RadioTower1FReceptionistScript: + faceplayer + opentext + checkflag ENGINE_ROCKETS_IN_RADIO_TOWER + iftrue .Rockets + writetext RadioTower1FReceptionistWelcomeText + waitbutton + closetext + end + +.Rockets: + writetext RadioTower1FReceptionistNoToursText + waitbutton + closetext + end + +RadioTower1FLuckyNumberManScript: + faceplayer + opentext + writetext RadioTower1FLuckyNumberManAskToPlayText + promptbutton + special CheckLuckyNumberShowFlag + iffalse .skip + special ResetLuckyNumberShowFlag +.skip + special PrintTodaysLuckyNumber + checkflag ENGINE_LUCKY_NUMBER_SHOW + iftrue .GameOver + writetext RadioTower1FLuckyNumberManThisWeeksIdIsText + promptbutton + closetext + applymovement RADIOTOWER1F_LUCKYNUMBERMAN, RadioTower1FLuckyNumberManGoToPCMovement + opentext + writetext RadioTower1FLuckyNumberManCheckIfMatchText + promptbutton + waitsfx + writetext RadioTower1FLuckyNumberManDotDotDotText + playsound SFX_DEX_FANFARE_20_49 + waitsfx + promptbutton + special CheckForLuckyNumberWinners + closetext + applymovement RADIOTOWER1F_LUCKYNUMBERMAN, RadioTower1FLuckyNumberManReturnToPlayerMovement + opentext + ifequal 1, .FirstPlace + ifequal 2, .SecondPlace + ifequal 3, .ThirdPlace + sjump .NoPrize + +.GameOver: + writetext RadioTower1FLuckyNumberManComeAgainText + waitbutton + closetext + end + +.FirstPlace: + writetext RadioTower1FLuckyNumberManPerfectMatchText + playsound SFX_1ST_PLACE + waitsfx + promptbutton + giveitem MASTER_BALL + iffalse .BagFull + itemnotify + setflag ENGINE_LUCKY_NUMBER_SHOW + sjump .GameOver + +.SecondPlace: + writetext RadioTower1FLuckyNumberManOkayMatchText + playsound SFX_2ND_PLACE + waitsfx + promptbutton + giveitem EXP_SHARE + iffalse .BagFull + itemnotify + setflag ENGINE_LUCKY_NUMBER_SHOW + sjump .GameOver + +.ThirdPlace: + writetext RadioTower1FLuckyNumberManWeakMatchText + playsound SFX_3RD_PLACE + waitsfx + promptbutton + giveitem PP_UP + iffalse .BagFull + itemnotify + setflag ENGINE_LUCKY_NUMBER_SHOW + sjump .GameOver + +.NoPrize: + writetext RadioTower1FLuckyNumberManNoneOfYourIDNumbersMatchText + waitbutton + closetext + end + +.BagFull: + writetext RadioTower1FLuckyNumberManNoRoomForYourPrizeText + waitbutton + closetext + end + +RadioTower1FRadioCardWomanScript: + faceplayer + opentext + checkflag ENGINE_RADIO_CARD + iftrue .GotCard + writetext RadioTower1FRadioCardWomanOfferQuizText + yesorno + iffalse .NoQuiz + writetext RadioTower1FRadioCardWomanQuestion1Text + yesorno + iffalse .WrongAnswer + playsound SFX_ELEVATOR_END + waitsfx + writetext RadioTower1FRadioCardWomanQuestion2Text + yesorno + iffalse .WrongAnswer + playsound SFX_ELEVATOR_END + waitsfx + writetext RadioTower1FRadioCardWomanQuestion3Text + yesorno + iftrue .WrongAnswer + playsound SFX_ELEVATOR_END + waitsfx + writetext RadioTower1FRadioCardWomanQuestion4Text + yesorno + iffalse .WrongAnswer + playsound SFX_ELEVATOR_END + waitsfx + writetext RadioTower1FRadioCardWomanQuestion5Text + yesorno + iftrue .WrongAnswer + playsound SFX_ELEVATOR_END + waitsfx + writetext RadioTower1FRadioCardWomanYouWinText + promptbutton + getstring STRING_BUFFER_4, .RadioCardText + scall .ReceiveItem + writetext RadioTower1FPokegearIsARadioText + promptbutton + setflag ENGINE_RADIO_CARD +.GotCard: + writetext RadioTower1FRadioCardWomanTuneInText + waitbutton + closetext + end + +.RadioCardText: + db "RADIO CARD@" + +.ReceiveItem: + jumpstd ReceiveItemScript + end + +.WrongAnswer: + playsound SFX_WRONG + writetext RadioTower1FRadioCardWomanWrongAnswerText + waitbutton + closetext + end + +.NoQuiz: + writetext RadioTower1FRadioCardWomanNotTakingQuizText + waitbutton + closetext + end + +RadioTower1FLassScript: + jumptextfaceplayer RadioTower1FLassText + +RadioTower1FYoungsterScript: + jumptextfaceplayer RadioTower1FYoungsterText + +TrainerGruntM3: + trainer GRUNTM, GRUNTM_3, EVENT_BEAT_ROCKET_GRUNTM_3, GruntM3SeenText, GruntM3BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM3AfterBattleText + waitbutton + closetext + end + +RadioTower1FDirectory: + jumptext RadioTower1FDirectoryText + +RadioTower1FLuckyChannelSign: + jumptext RadioTower1FLuckyChannelSignText + +RadioTower1FLuckyNumberManGoToPCMovement: + step RIGHT + turn_head UP + step_end + +RadioTower1FLuckyNumberManReturnToPlayerMovement: + step LEFT + turn_head UP + step_end + +RadioTower1FReceptionistWelcomeText: + text "Welcome!" + done + +RadioTower1FReceptionistNoToursText: + text "Hello. I'm sorry," + line "but we're not" + cont "offering any tours" + cont "today." + done + +RadioTower1FLuckyNumberManAskToPlayText: + text "Hi, are you here" + line "for the LUCKY NUM-" + cont "BER SHOW?" + + para "Want me to check" + line "the ID numbers of" + cont "your #MON?" + + para "If you get lucky," + line "you win a prize." + done + +RadioTower1FLuckyNumberManThisWeeksIdIsText: + text "This week's ID" + line "number is @" + text_ram wStringBuffer3 + text "." + done + +RadioTower1FLuckyNumberManCheckIfMatchText: + text "Let's see if you" + line "have a match." + done + +RadioTower1FLuckyNumberManDotDotDotText: + text "<……>" + line "<……>" + done + +RadioTower1FLuckyNumberManComeAgainText: + text "Please come back" + line "next week for the" + cont "next LUCKY NUMBER." + done + +RadioTower1FLuckyNumberManPerfectMatchText: + text "Wow! You have a" + line "perfect match of" + cont "all five numbers!" + + para "We have a grand" + line "prize winner!" + + para "You have won a" + line "MASTER BALL!" + done + +RadioTower1FLuckyNumberManOkayMatchText: + text "Hey! You've" + line "matched the last" + cont "three numbers!" + + para "You've won second" + line "prize, an EXP." + cont "SHARE!" + done + +RadioTower1FLuckyNumberManWeakMatchText: + text "Ooh, you've" + line "matched the last" + cont "two numbers." + + para "You've won third" + line "prize, a PP UP." + done + +RadioTower1FLuckyNumberManNoneOfYourIDNumbersMatchText: + text "Nope, none of your" + line "ID numbers match." + done + +RadioTower1FLuckyNumberManNoRoomForYourPrizeText: + text "You've got no room" + line "for your prize." + + para "Make room and come" + line "back right away." + done + +RadioTower1FRadioCardWomanOfferQuizText: + text "We have a special" + line "quiz campaign on" + cont "right now." + + para "Answer five ques-" + line "tions correctly to" + cont "win a RADIO CARD." + + para "Slide it into your" + line "#GEAR to play" + + para "the radio anytime," + line "anywhere." + + para "Would you like to" + line "take the quiz?" + done + +RadioTower1FRadioCardWomanQuestion1Text: + text "Question 1:" + + para "Is there a #MON" + line "that appears only" + cont "in the morning?" + done + +RadioTower1FRadioCardWomanQuestion2Text: + text "Correct!" + line "Question 2:" + + para "Is this statement" + line "correct?" + + para "You can't buy a" + line "BERRY at a MART." + done + +RadioTower1FRadioCardWomanQuestion3Text: + text "Bull's-eye!" + line "Question 3:" + + para "Does HM01 contain" + line "the move FLASH?" + done + +RadioTower1FRadioCardWomanQuestion4Text: + text "So far so good!" + line "Question 4:" + + para "Is FALKNER the" + line "VIOLET GYM LEADER" + + para "who uses bird" + line "#MON?" + done + +RadioTower1FRadioCardWomanQuestion5Text: + text "Wow! Right again!" + line "Here's the final" + cont "question:" + + para "Do GOLDENROD GAME" + line "CORNER's slots" + + para "have CHARMANDER" + line "on their reels?" + done + +RadioTower1FRadioCardWomanYouWinText: + text "Bingo! You got it!" + line "Congratulations!" + + para "Here's your prize," + line "a RADIO CARD!" + done + +RadioTower1FPokegearIsARadioText: + text "'s #GEAR" + line "can now double as" + cont "a radio!" + done + +RadioTower1FRadioCardWomanTuneInText: + text "Please tune in to" + line "our radio shows." + done + +RadioTower1FRadioCardWomanWrongAnswerText: + text "Oh, dear." + line "Sorry, but you" + + para "got it wrong." + line "Please try again!" + done + +RadioTower1FRadioCardWomanNotTakingQuizText: + text "Oh. I see. Please" + line "see me if you" + cont "change your mind." + done + +RadioTower1FLassText: + text "BEN is a fabulous" + line "DJ." + + para "His sweet voice" + line "makes me melt!" + done + +RadioTower1FYoungsterText: + text "I love MARY, from" + line "#MON TALK." + + para "I only know what" + line "she sounds like," + cont "though." + done + +GruntM3SeenText: + text "We've finally" + line "taken over the" + cont "RADIO TOWER!" + + para "Now everyone will" + line "get to experience" + + para "the true terror of" + line "TEAM ROCKET!" + + para "We'll show you" + line "how scary we are!" + done + +GruntM3BeatenText: + text "Too strong! We" + line "must watch you…" + done + +GruntM3AfterBattleText: + text "You're too strong." + + para "Our plan could be" + line "ruined. I must" + cont "warn the others…" + done + +RadioTower1FDirectoryText: + text "1F RECEPTION" + line "2F SALES" + + para "3F PERSONNEL" + line "4F PRODUCTION" + + para "5F DIRECTOR'S" + line " OFFICE" + done + +RadioTower1FLuckyChannelSignText: + text "LUCKY CHANNEL!" + + para "Win with #MON" + line "ID numbers!" + + para "Trade your #MON" + line "to collect differ-" + cont "ent ID numbers!" + done + +RadioTower1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, GOLDENROD_CITY, 11 + warp_event 3, 7, GOLDENROD_CITY, 11 + warp_event 15, 0, RADIO_TOWER_2F, 2 + + def_coord_events + + def_bg_events + bg_event 3, 0, BGEVENT_READ, RadioTower1FDirectory + bg_event 13, 0, BGEVENT_READ, RadioTower1FLuckyChannelSign + + def_object_events + object_event 5, 6, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, RadioTower1FReceptionistScript, -1 + object_event 16, 4, SPRITE_LASS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, RadioTower1FLassScript, EVENT_GOLDENROD_CITY_CIVILIANS + object_event 15, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RadioTower1FYoungsterScript, EVENT_GOLDENROD_CITY_CIVILIANS + object_event 14, 1, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM3, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 8, 6, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RadioTower1FLuckyNumberManScript, EVENT_GOLDENROD_CITY_CIVILIANS + object_event 12, 6, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, RadioTower1FRadioCardWomanScript, EVENT_GOLDENROD_CITY_CIVILIANS diff --git a/maps/RadioTower1F.blk b/maps/RadioTower1F.blk new file mode 100644 index 0000000..bdbca98 --- /dev/null +++ b/maps/RadioTower1F.blk @@ -0,0 +1 @@ +1 1 1&+&. ,- \ No newline at end of file diff --git a/maps/RadioTower2F.asm b/maps/RadioTower2F.asm new file mode 100644 index 0000000..b41e18b --- /dev/null +++ b/maps/RadioTower2F.asm @@ -0,0 +1,741 @@ +DEF BLUE_CARD_POINT_CAP EQU 30 + + object_const_def + const RADIOTOWER2F_SUPER_NERD + const RADIOTOWER2F_TEACHER + const RADIOTOWER2F_ROCKET1 + const RADIOTOWER2F_ROCKET2 + const RADIOTOWER2F_ROCKET3 + const RADIOTOWER2F_ROCKET_GIRL + const RADIOTOWER2F_BLACK_BELT1 + const RADIOTOWER2F_BLACK_BELT2 + const RADIOTOWER2F_JIGGLYPUFF + const RADIOTOWER2F_BUENA + const RADIOTOWER2F_RECEPTIONIST + +RadioTower2F_MapScripts: + def_scene_scripts + + def_callbacks + +RadioTower2FNoopScene: ; unreferenced + end + +RadioTower2FSuperNerdScript: + jumptextfaceplayer RadioTower2FSuperNerdText + +RadioTower2FTeacherScript: + faceplayer + opentext + checkflag ENGINE_ROCKETS_IN_RADIO_TOWER + iftrue .Rockets + writetext RadioTower2FTeacherText + waitbutton + closetext + end + +.Rockets: + writetext RadioTower2FTeacherText_Rockets + waitbutton + closetext + end + +RadioTowerJigglypuff: + opentext + writetext RadioTowerJigglypuffText + cry JIGGLYPUFF + waitbutton + closetext + end + +RadioTower2FBlackBelt1Script: + jumptextfaceplayer RadioTower2FBlackBelt1Text + +RadioTower2FBlackBelt2Script: + jumptextfaceplayer RadioTower2FBlackBelt2Text + +TrainerGruntM4: + trainer GRUNTM, GRUNTM_4, EVENT_BEAT_ROCKET_GRUNTM_4, GruntM4SeenText, GruntM4BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM4AfterBattleText + waitbutton + closetext + end + +TrainerGruntM5: + trainer GRUNTM, GRUNTM_5, EVENT_BEAT_ROCKET_GRUNTM_5, GruntM5SeenText, GruntM5BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM5AfterBattleText + waitbutton + closetext + end + +TrainerGruntM6: + trainer GRUNTM, GRUNTM_6, EVENT_BEAT_ROCKET_GRUNTM_6, GruntM6SeenText, GruntM6BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM6AfterBattleText + waitbutton + closetext + end + +TrainerGruntF2: + trainer GRUNTF, GRUNTF_2, EVENT_BEAT_ROCKET_GRUNTF_2, GruntF2SeenText, GruntF2BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntF2AfterBattleText + waitbutton + closetext + end + +Buena: + faceplayer + opentext + checkflag ENGINE_ROCKETS_IN_RADIO_TOWER + iftrue .MidRocketTakeover + checkevent EVENT_MET_BUENA + iffalse .Introduction + checkflag ENGINE_BUENAS_PASSWORD_2 + iftrue .PlayedAlready + readvar VAR_HOUR + ifless NITE_HOUR, .TooEarly + checkflag ENGINE_BUENAS_PASSWORD + iffalse .TuneIn + checkitem BLUE_CARD + iffalse .NoBlueCard + readvar VAR_BLUECARDBALANCE + ifequal BLUE_CARD_POINT_CAP, .BlueCardCapped0 + playmusic MUSIC_BUENAS_PASSWORD + writetext RadioTower2FBuenaDoYouKnowPasswordText + special AskRememberPassword + iffalse .ForgotPassword + writetext RadioTower2FBuenaJoinTheShowText + waitbutton + closetext + turnobject RADIOTOWER2F_BUENA, RIGHT + readvar VAR_FACING + ifnotequal RIGHT, .DontNeedToMove + applymovement PLAYER, RadioTower2FPlayerWalksToMicrophoneMovement +.DontNeedToMove: + turnobject PLAYER, RIGHT + opentext + writetext RadioTower2FBuenaEveryoneSayPasswordText + waitbutton + closetext + turnobject RADIOTOWER2F_BUENA, DOWN + refreshscreen + special BuenasPassword + closetext + iffalse .WrongAnswer + opentext + writetext RadioTower2FBuenaCorrectAnswerText + waitbutton + closetext + readvar VAR_BLUECARDBALANCE + addval 1 + writevar VAR_BLUECARDBALANCE + waitsfx + playsound SFX_TRANSACTION + setflag ENGINE_BUENAS_PASSWORD_2 + pause 20 + turnobject RADIOTOWER2F_BUENA, RIGHT + opentext + writetext RadioTower2FBuenaThanksForComingText + waitbutton + closetext + special FadeOutMusic + pause 20 + special RestartMapMusic + readvar VAR_BLUECARDBALANCE + ifequal BLUE_CARD_POINT_CAP, .BlueCardCapped1 + end + +.Introduction: + writetext RadioTower2FBuenaShowIntroductionText + promptbutton + setevent EVENT_MET_BUENA + verbosegiveitem BLUE_CARD +.TuneIn: + writetext RadioTower2FBuenaTuneInToMyShowText + waitbutton + closetext + checkcellnum PHONE_BUENA + iftrue .Registered0 + checkevent EVENT_BUENA_OFFERED_HER_PHONE_NUMBER + iftrue .OfferedNumberBefore +.Registered0: + turnobject RADIOTOWER2F_BUENA, RIGHT + end + +.ForgotPassword: + writetext RadioTower2FBuenaComeBackAfterListeningText + waitbutton + closetext + turnobject RADIOTOWER2F_BUENA, RIGHT + special FadeOutMusic + pause 20 + special RestartMapMusic + end + +.PlayedAlready: + writetext RadioTower2FBuenaAlreadyPlayedText + waitbutton + closetext + checkcellnum PHONE_BUENA + iftrue .Registered1 + checkevent EVENT_BUENA_OFFERED_HER_PHONE_NUMBER + iftrue .OfferedNumberBefore +.Registered1: + turnobject RADIOTOWER2F_BUENA, RIGHT + pause 10 + end + +.WrongAnswer: + setflag ENGINE_BUENAS_PASSWORD_2 + opentext + writetext RadioTower2FBuenaDidYouForgetText + waitbutton + closetext + turnobject RADIOTOWER2F_BUENA, RIGHT + pause 20 + opentext + writetext RadioTower2FBuenaThanksForComingText + waitbutton + closetext + turnobject RADIOTOWER2F_BUENA, RIGHT + special FadeOutMusic + pause 20 + special RestartMapMusic + end + +.MidRocketTakeover: + writetext RadioTower2FBuenaPasswordIsHelpText + waitbutton + closetext + end + +.NoBlueCard: + writetext RadioTower2FBuenaNoBlueCardText + waitbutton + closetext + checkcellnum PHONE_BUENA + iftrue .Registered2 + checkevent EVENT_BUENA_OFFERED_HER_PHONE_NUMBER_NO_BLUE_CARD + iftrue .OfferedNumberBefore +.Registered2: + turnobject RADIOTOWER2F_BUENA, RIGHT + end + +.BlueCardCapped0: + writetext RadioTower2FBuenaCardIsFullText + waitbutton + closetext + checkcellnum PHONE_BUENA + iftrue .Registered3 + checkevent EVENT_BUENA_OFFERED_HER_PHONE_NUMBER_NO_BLUE_CARD + iftrue .OfferedNumberBefore +.Registered3: + turnobject RADIOTOWER2F_BUENA, RIGHT + end + +.TooEarly: + writetext RadioTower2FBuenaTuneInAfterSixText + waitbutton + closetext + checkcellnum PHONE_BUENA + iftrue .Registered4 + checkevent EVENT_BUENA_OFFERED_HER_PHONE_NUMBER + iftrue .OfferedNumberBefore +.Registered4: + end + +.BlueCardCapped1: + checkcellnum PHONE_BUENA + iftrue .HasNumber + pause 20 + turnobject RADIOTOWER2F_BUENA, DOWN + pause 15 + turnobject PLAYER, UP + pause 15 + checkevent EVENT_BUENA_OFFERED_HER_PHONE_NUMBER_NO_BLUE_CARD + iftrue .OfferedNumberBefore + showemote EMOTE_SHOCK, RADIOTOWER2F_BUENA, 15 + setevent EVENT_BUENA_OFFERED_HER_PHONE_NUMBER_NO_BLUE_CARD + setevent EVENT_BUENA_OFFERED_HER_PHONE_NUMBER + opentext + writetext RadioTower2FBuenaOfferPhoneNumberText + sjump .AskForNumber + +.OfferedNumberBefore: + opentext + writetext RadioTower2FBuenaOfferNumberAgainText +.AskForNumber: + askforphonenumber PHONE_BUENA + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + writetext RadioTower2FRegisteredBuenasNumberText + playsound SFX_REGISTER_PHONE_NUMBER + waitsfx + promptbutton + writetext RadioTower2FBuenaCallMeText + waitbutton + closetext + turnobject RADIOTOWER2F_BUENA, RIGHT + addcellnum PHONE_BUENA + end + +.NumberDeclined: + writetext RadioTower2FBuenaSadRejectedText + waitbutton + closetext + turnobject RADIOTOWER2F_BUENA, RIGHT + end + +.PhoneFull: + writetext RadioTower2FBuenaYourPhoneIsFullText + waitbutton + closetext + turnobject RADIOTOWER2F_BUENA, RIGHT +.HasNumber: + end + +RadioTowerBuenaPrizeReceptionist: + faceplayer + opentext + checkitem BLUE_CARD + iffalse .NoCard + writetext RadioTower2FBuenaReceptionistPointsForPrizesText + promptbutton + special BuenaPrize + closetext + end + +.NoCard: + writetext RadioTower2FBuenaReceptionistNoCardText + promptbutton + closetext + end + +RadioTower2FSalesSign: + jumptext RadioTower2FSalesSignText + +RadioTower2FOaksPKMNTalkSign: + jumptext RadioTower2FOaksPKMNTalkSignText + +RadioTower2FPokemonRadioSign: + jumptext RadioTower2FPokemonRadioSignText + +RadioTower2FBookshelf: + jumpstd MagazineBookshelfScript + +RadioTower2FPlayerWalksToMicrophoneMovement: + slow_step DOWN + slow_step RIGHT + step_end + +RadioTower2FSuperNerdText: + text "You can listen to" + line "the radio any-" + cont "where. Tune in!" + done + +RadioTower2FTeacherText: + text "Lullabies on the" + line "radio may make" + cont "#MON sleep." + done + +RadioTower2FTeacherText_Rockets: + text "Why would they" + line "want to take over" + cont "the RADIO TOWER?" + done + +RadioTowerJigglypuffText: + text "JIGGLYPUFF:" + line "Jiggly…" + done + +RadioTower2FBlackBelt1Text: + text "Sorry. Authorized" + line "personnel only" + cont "beyond this point." + + para "It wasn't that way" + line "before." + + para "There's something" + line "wrong with the" + cont "DIRECTOR…" + done + +RadioTower2FBlackBelt2Text: + text "Feel free to look" + line "around anywhere." + + para "The DIRECTOR is" + line "nice again, just" + cont "as he was before." + done + +GruntM4SeenText: + text "Three years ago," + line "TEAM ROCKET was" + cont "forced to disband." + + para "But we're making a" + line "comeback here!" + done + +GruntM4BeatenText: + text "Gwah! Don't get" + line "cute!" + done + +GruntM4AfterBattleText: + text "We won't let you" + line "ruin our plans" + cont "for our comeback!" + done + +GruntM5SeenText: + text "We're TEAM ROCKET," + line "the exploiters of" + cont "#MON!" + + para "We love being" + line "evil! Scared?" + done + +GruntM5BeatenText: + text "You think you're a" + line "hero?" + done + +GruntM5AfterBattleText: + text "We're not always" + line "evil. We just do" + cont "whatever we like." + done + +GruntM6SeenText: + text "Hey, hey! Keep out" + line "of our way!" + done + +GruntM6BeatenText: + text "Arggh. I give up." + done + +GruntM6AfterBattleText: + text "Our EXECUTIVES are" + line "trying to take" + cont "this place over." + + para "They have some big" + line "plan. I wonder" + cont "what that is?" + done + +GruntF2SeenText: + text "Hahaha!" + + para "How boring." + line "It was far too" + + para "easy to take over" + line "this place!" + + para "Come on, keep me" + line "amused!" + done + +GruntF2BeatenText: + text "Wh-who are you?" + done + +GruntF2AfterBattleText: + text "You beat me, and" + line "I won't forget it!" + done + +RadioTower2FBuenaShowIntroductionText: + text "BUENA: Hi! I'm" + line "BUENA!" + + para "Do you know about" + line "a radio program" + cont "called PASSWORD?" + + para "If you can tell me" + line "the password from" + + para "the program, you" + line "will earn points." + + para "Save up those" + line "points and trade" + + para "them to that sweet" + line "young lady over" + + para "there for some" + line "choice prizes!" + + para "Here you go!" + + para "It's your very own" + line "point card!" + done + +RadioTower2FBuenaTuneInToMyShowText: + text "BUENA: Tune in to" + line "my PASSWORD SHOW!" + done + +RadioTower2FBuenaDoYouKnowPasswordText: + text "BUENA: Hi!" + line "Did you tune in to" + cont "my radio show?" + + para "Do you remember" + line "today's password?" + done + +RadioTower2FBuenaJoinTheShowText: + text "BUENA: Oh, wow!" + line "Thank you!" + + para "What was your name" + line "again?" + + para "…, OK!" + + para "Come on, ." + line "Join the show." + done + +RadioTower2FBuenaEveryoneSayPasswordText: + text "BUENA: Everyone" + line "ready?" + + para "I want to hear you" + line "shout out today's" + + para "password for" + line "!" + done + +RadioTower2FBuenaComeBackAfterListeningText: + text "BUENA: Come back" + line "after you listen" + + para "to my show, OK?" + line "Catch ya later!" + done + +RadioTower2FBuenaAlreadyPlayedText: + text "BUENA: Sorry…" + + para "You get just one" + line "chance each day." + + para "Come back tomorrow" + line "for another try!" + done + +RadioTower2FBuenaCorrectAnswerText: + text "BUENA: YIPPEE!" + line "That's right!" + + para "You did tune in!" + line "I'm so happy!" + + para "You earned one" + line "point! Congrats!" + done + +RadioTower2FBuenaDidYouForgetText: + text "BUENA: Aww…" + line "That's not it…" + + para "Did you forget the" + line "password?" + done + +RadioTower2FBuenaThanksForComingText: + text "BUENA: Yup! Our" + line "contestant was" + + para "." + line "Thanks for coming!" + + para "I hope all you" + line "listeners will" + + para "come too!" + line "I'll be waiting!" + done + +RadioTower2FBuenaPasswordIsHelpText: + text "BUENA: Huh?" + line "Today's password?" + + para "HELP, of course!" + done + +RadioTower2FBuenaCardIsFullText: + text "BUENA: Your BLUE" + line "CARD's full." + + para "Trade it in for a" + line "fabulous prize!" + done + +RadioTower2FBuenaTuneInAfterSixText: + text "BUENA: Tune in to" + line "PASSWORD every" + + para "night from six to" + line "midnight!" + + para "Tune in, then drop" + line "in for a visit!" + done + +RadioTower2FBuenaNoBlueCardText: + text "BUENA: Oh? You" + line "forgot to bring" + cont "your BLUE CARD?" + + para "I can't give you" + line "points if you" + cont "don't have it." + done + +RadioTower2FBuenaOfferPhoneNumberText: + text "BUENA: Oh! Your" + line "BLUE CARD reached" + + para "{d:BLUE_CARD_POINT_CAP} points today!" + line "That's so wild!" + + para "Hmm… There isn't a" + line "prize for hitting" + cont "{d:BLUE_CARD_POINT_CAP} points, but…" + + para "You came by so" + line "often, ." + + para "I'll make you a" + line "special deal!" + + para "How would you like" + line "my phone number?" + done + +RadioTower2FBuenaOfferNumberAgainText: + text "BUENA: ," + line "do you want to" + + para "register my phone" + line "number?" + done + +RadioTower2FRegisteredBuenasNumberText: + text " registered" + line "BUENA's number." + done + +RadioTower2FBuenaCallMeText: + text "BUENA: I look" + line "forward to hearing" + cont "from you!" + done + +RadioTower2FBuenaSadRejectedText: + text "BUENA: Aww… It's a" + line "special prize…" + done + +RadioTower2FBuenaYourPhoneIsFullText: + text "BUENA: ," + line "your phone list" + + para "has no room left" + line "for me…" + done + +RadioTower2FBuenaReceptionistPointsForPrizesText: + text "You can cash in" + line "your saved points" + + para "for a lovely prize" + line "of your choice!" + done + +RadioTower2FBuenaReceptionistNoCardText: + text "You can't trade in" + line "points without" + cont "your BLUE CARD." + + para "Don't forget your" + line "BLUE CARD!" + done + +RadioTower2FSalesSignText: + text "2F SALES" + done + +RadioTower2FOaksPKMNTalkSignText: + text "PROF.OAK'S #MON" + line "TALK" + + para "The Hottest Show" + line "on the Air!" + done + +RadioTower2FPokemonRadioSignText: + text "Anywhere, Anytime" + line "#MON Radio" + done + +RadioTower2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 0, RADIO_TOWER_3F, 1 + warp_event 15, 0, RADIO_TOWER_1F, 3 + + def_coord_events + + def_bg_events + bg_event 3, 0, BGEVENT_READ, RadioTower2FSalesSign + bg_event 5, 0, BGEVENT_READ, RadioTower2FOaksPKMNTalkSign + bg_event 9, 1, BGEVENT_READ, RadioTower2FBookshelf + bg_event 10, 1, BGEVENT_READ, RadioTower2FBookshelf + bg_event 11, 1, BGEVENT_READ, RadioTower2FBookshelf + bg_event 13, 0, BGEVENT_READ, RadioTower2FPokemonRadioSign + + def_object_events + object_event 6, 6, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, RadioTower2FSuperNerdScript, EVENT_GOLDENROD_CITY_CIVILIANS + object_event 17, 2, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, RadioTower2FTeacherScript, -1 + object_event 1, 4, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM4, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 8, 4, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM5, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 4, 1, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerGruntM6, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 10, 5, SPRITE_ROCKET_GIRL, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerGruntF2, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 0, 1, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RadioTower2FBlackBelt1Script, EVENT_RADIO_TOWER_BLACKBELT_BLOCKS_STAIRS + object_event 1, 1, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RadioTower2FBlackBelt2Script, EVENT_RADIO_TOWER_CIVILIANS_AFTER + object_event 12, 1, SPRITE_JIGGLYPUFF, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RadioTowerJigglypuff, -1 + object_event 14, 5, SPRITE_BEAUTY, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Buena, -1 + object_event 12, 7, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, RadioTowerBuenaPrizeReceptionist, EVENT_GOLDENROD_CITY_CIVILIANS diff --git a/maps/RadioTower2F.blk b/maps/RadioTower2F.blk new file mode 100644 index 0000000..9967284 --- /dev/null +++ b/maps/RadioTower2F.blk @@ -0,0 +1,2 @@ + $ + =0;/ 539: 524 \ No newline at end of file diff --git a/maps/RadioTower3F.asm b/maps/RadioTower3F.asm new file mode 100644 index 0000000..f7c4be9 --- /dev/null +++ b/maps/RadioTower3F.asm @@ -0,0 +1,351 @@ + object_const_def + const RADIOTOWER3F_SUPER_NERD + const RADIOTOWER3F_GYM_GUIDE + const RADIOTOWER3F_COOLTRAINER_F + const RADIOTOWER3F_ROCKET1 + const RADIOTOWER3F_ROCKET2 + const RADIOTOWER3F_ROCKET3 + const RADIOTOWER3F_SCIENTIST + +RadioTower3F_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_TILES, RadioTower3FCardKeyShutterCallback + +RadioTower3FCardKeyShutterCallback: + checkevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER + iftrue .Change + endcallback + +.Change: + changeblock 14, 2, $2a ; open shutter + changeblock 14, 4, $01 ; floor + endcallback + +RadioTower3FSuperNerdScript: + jumptextfaceplayer RadioTower3FSuperNerdText + +RadioTower3FGymGuideScript: + faceplayer + opentext + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .NoRockets + writetext RadioTower3FGymGuideText_Rockets + waitbutton + closetext + end + +.NoRockets: + writetext RadioTower3FGymGuideText + waitbutton + closetext + end + +RadioTower3FCooltrainerFScript: + faceplayer + opentext + checkevent EVENT_GOT_SUNNY_DAY_FROM_RADIO_TOWER + iftrue .GotSunnyDay + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .NoRockets + checkevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER + iftrue .UsedCardKey + writetext RadioTower3FCooltrainerFPleaseSaveDirectorText + waitbutton + closetext + end + +.UsedCardKey: + writetext RadioTower3FCooltrainerFIsDirectorSafeText + waitbutton + closetext + end + +.NoRockets: + writetext RadioTower3FCooltrainerFYoureMyHeroText + promptbutton + verbosegiveitem TM_SUNNY_DAY + iffalse .NoRoom + writetext RadioTower3FCooltrainerFItsSunnyDayText + waitbutton + closetext + setevent EVENT_GOT_SUNNY_DAY_FROM_RADIO_TOWER + end + +.GotSunnyDay: + writetext RadioTower3FCooltrainerFYouWereMarvelousText + waitbutton +.NoRoom: + closetext + end + +TrainerGruntM7: + trainer GRUNTM, GRUNTM_7, EVENT_BEAT_ROCKET_GRUNTM_7, GruntM7SeenText, GruntM7BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM7AfterBattleText + waitbutton + closetext + end + +TrainerGruntM8: + trainer GRUNTM, GRUNTM_8, EVENT_BEAT_ROCKET_GRUNTM_8, GruntM8SeenText, GruntM8BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM8AfterBattleText + waitbutton + closetext + end + +TrainerGruntM9: + trainer GRUNTM, GRUNTM_9, EVENT_BEAT_ROCKET_GRUNTM_9, GruntM9SeenText, GruntM9BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM9AfterBattleText + waitbutton + closetext + end + +TrainerScientistMarc: + trainer SCIENTIST, MARC, EVENT_BEAT_SCIENTIST_MARC, ScientistMarcSeenText, ScientistMarcBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext ScientistMarcAfterBattleText + waitbutton + closetext + end + +CardKeySlotScript:: + opentext + writetext RadioTower3FCardKeySlotText + waitbutton + checkevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER + iftrue .UsedCardKey + checkitem CARD_KEY + iftrue .HaveCardKey +.UsedCardKey: + closetext + end + +.HaveCardKey: + writetext InsertedTheCardKeyText + waitbutton + setevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER + playsound SFX_ENTER_DOOR + changeblock 14, 2, $2a ; open shutter + changeblock 14, 4, $01 ; floor + reloadmappart + closetext + waitsfx + end + +RadioTower3FPersonnelSign: + jumptext RadioTower3FPersonnelSignText + +RadioTower3FPokemonMusicSign: + jumptext RadioTower3FPokemonMusicSignText + +RadioTower3FSuperNerdText: + text "We have recordings" + line "of the cries of" + + para "all #MON that" + line "have been found." + + para "We must have about" + line "200 kinds." + done + +RadioTower3FGymGuideText_Rockets: + text "To trainers, #-" + line "MON are their" + cont "beloved partners." + + para "It's terrible how" + line "TEAM ROCKET is" + + para "trying to control" + line "#MON." + done + +RadioTower3FGymGuideText: + text "We run 24 hours a" + line "day to broadcast" + + para "entertaining pro-" + line "grams." + + para "I'll do my best to" + line "run around the" + cont "clock too!" + done + +RadioTower3FCooltrainerFPleaseSaveDirectorText: + text "The TEAM ROCKET" + line "boss has locked" + cont "himself in." + + para "But the DIRECTOR" + line "can open it." + + para "He's up on the" + line "fifth floor." + + para "Please save him!" + done + +RadioTower3FCooltrainerFIsDirectorSafeText: + text "Is the DIRECTOR" + line "safe?" + done + +RadioTower3FCooltrainerFYoureMyHeroText: + text "Thank you!" + line "You're my hero!" + + para "This is a token of" + line "my appreciation." + done + +RadioTower3FCooltrainerFItsSunnyDayText: + text "It's SUNNY DAY." + line "It powers up fire-" + cont "type moves for a" + cont "while." + done + +RadioTower3FCooltrainerFYouWereMarvelousText: + text "You were simply" + line "marvelous!" + done + +GruntM7SeenText: + text "I've been given" + line "strict orders." + + para "I'm to crush any-" + line "one who challenges" + cont "TEAM ROCKET!" + done + +GruntM7BeatenText: + text "What?!" + done + +GruntM7AfterBattleText: + text "I failed in my" + line "duties…" + + para "I'll be docked pay" + line "for this…" + done + +GruntM8SeenText: + text "It feels great" + line "ordering #MON" + cont "to commit crimes." + done + +GruntM8BeatenText: + text "You're kidding!" + done + +GruntM8AfterBattleText: + text "I feel lousy over" + line "losing!" + + para "Darn it! I hate" + line "useless #MON!" + done + +GruntM9SeenText: + text "Why did the shut-" + line "ter open? Did you" + + para "have something to" + line "do with this?" + done + +GruntM9BeatenText: + text "I'm done for!" + done + +GruntM9AfterBattleText: + text "What?! You made it" + line "past our men in" + cont "the UNDERGROUND?" + + para "How could you?" + done + +ScientistMarcSeenText: + text "An unknown child" + line "wandering here?" + + para "Who are you?" + done + +ScientistMarcBeatenText: + text "Tch! I took you" + line "too lightly!" + done + +ScientistMarcAfterBattleText: + text "Bwahahaha…" + + para "I can transmit as" + line "strong a signal as" + cont "I need from here." + done + +RadioTower3FCardKeySlotText: + text "It's the CARD KEY" + line "slot." + done + +InsertedTheCardKeyText: + text " inserted" + line "the CARD KEY." + done + +RadioTower3FPersonnelSignText: + text "3F PERSONNEL" + done + +RadioTower3FPokemonMusicSignText: + text "#MON MUSIC with" + line "Host DJ BEN" + done + +RadioTower3F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 0, RADIO_TOWER_2F, 1 + warp_event 7, 0, RADIO_TOWER_4F, 2 + warp_event 17, 0, RADIO_TOWER_4F, 4 + + def_coord_events + + def_bg_events + bg_event 3, 0, BGEVENT_READ, RadioTower3FPersonnelSign + bg_event 9, 0, BGEVENT_READ, RadioTower3FPokemonMusicSign + bg_event 14, 2, BGEVENT_UP, CardKeySlotScript + + def_object_events + object_event 7, 4, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RadioTower3FSuperNerdScript, EVENT_RADIO_TOWER_CIVILIANS_AFTER + object_event 3, 4, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, RadioTower3FGymGuideScript, -1 + object_event 11, 3, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, RadioTower3FCooltrainerFScript, -1 + object_event 5, 1, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerGruntM7, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 6, 2, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM8, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 16, 6, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM9, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 9, 6, SPRITE_SCIENTIST, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerScientistMarc, EVENT_RADIO_TOWER_ROCKET_TAKEOVER diff --git a/maps/RadioTower3F.blk b/maps/RadioTower3F.blk new file mode 100644 index 0000000..cacdd06 --- /dev/null +++ b/maps/RadioTower3F.blk @@ -0,0 +1 @@ +1 #('')<7# \ No newline at end of file diff --git a/maps/RadioTower4F.asm b/maps/RadioTower4F.asm new file mode 100644 index 0000000..d630073 --- /dev/null +++ b/maps/RadioTower4F.asm @@ -0,0 +1,268 @@ + object_const_def + const RADIOTOWER4F_FISHER + const RADIOTOWER4F_TEACHER + const RADIOTOWER4F_GROWLITHE + const RADIOTOWER4F_ROCKET1 + const RADIOTOWER4F_ROCKET2 + const RADIOTOWER4F_ROCKET_GIRL + const RADIOTOWER4F_SCIENTIST + +RadioTower4F_MapScripts: + def_scene_scripts + + def_callbacks + +RadioTower4FFisherScript: + jumptextfaceplayer RadioTower4FFisherText + +RadioTower4FDJMaryScript: + faceplayer + opentext + checkevent EVENT_GOT_PINK_BOW_FROM_MARY + iftrue .GotPinkBow + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .ClearedRockets + writetext RadioTower4FDJMaryText + waitbutton + closetext + end + +.ClearedRockets: + writetext RadioTower4FDJMaryText_ClearedRockets + promptbutton + verbosegiveitem PINK_BOW + iffalse .NoRoom + writetext RadioTower4FDJMaryText_GivePinkBow + waitbutton + closetext + setevent EVENT_GOT_PINK_BOW_FROM_MARY + end + +.GotPinkBow: + writetext RadioTower4FDJMaryText_After + waitbutton +.NoRoom: + closetext + end + +RadioTowerMeowth: + opentext + writetext RadioTowerMeowthText + cry MEOWTH + waitbutton + closetext + end + +TrainerGruntM10: + trainer GRUNTM, GRUNTM_10, EVENT_BEAT_ROCKET_GRUNTM_10, GruntM10SeenText, GruntM10BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM10AfterBattleText + waitbutton + closetext + end + +TrainerExecutivem2: + trainer EXECUTIVEM, EXECUTIVEM_2, EVENT_BEAT_ROCKET_EXECUTIVEM_2, Executivem2SeenText, Executivem2BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext Executivem2AfterBattleText + waitbutton + closetext + end + +TrainerGruntF4: + trainer GRUNTF, GRUNTF_4, EVENT_BEAT_ROCKET_GRUNTF_4, GruntF4SeenText, GruntF4BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntF4AfterBattleText + waitbutton + closetext + end + +TrainerScientistRich: + trainer SCIENTIST, RICH, EVENT_BEAT_SCIENTIST_RICH, ScientistRichSeenText, ScientistRichBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext ScientistRichAfterBattleText + waitbutton + closetext + end + +RadioTower4FProductionSign: + jumptext RadioTower4FProductionSignText + +RadioTower4FStudio2Sign: + jumptext RadioTower4FStudio2SignText + +RadioTower4FFisherText: + text "I listened to the" + line "radio while I was" + cont "at the RUINS." + + para "I heard a strange" + line "broadcast there." + done + +RadioTower4FDJMaryText: + text "MARY: Why? Why do" + line "I have to suffer" + cont "through this?" + + para "MEOWTH, help me!" + done + +RadioTower4FDJMaryText_ClearedRockets: + text "MARY: Oh! You're" + line "my little savior!" + + para "Will you take this" + line "as my thanks?" + done + +RadioTower4FDJMaryText_GivePinkBow: + text "MARY: It's just" + line "right for #MON" + + para "that know normal-" + line "type moves." + done + +RadioTower4FDJMaryText_After: + text "MARY: Please tune" + line "into me on PROF." + + para "OAK'S #MON TALK" + line "show." + done + +RadioTowerMeowthText: + text "MEOWTH: Meowth…" + done + +GruntM10SeenText: + text "You plan to rescue" + line "the DIRECTOR?" + + para "That won't be pos-" + line "sible because I'm" + cont "going to beat you!" + done + +GruntM10BeatenText: + text "No! Unbelievable!" + done + +GruntM10AfterBattleText: + text "I don't believe" + line "it! I was beaten!" + done + +Executivem2SeenText: + text "Stop! I'm known as" + line "the TEAM ROCKET" + cont "fortress!" + + para "You're not taking" + line "another step!" + done + +Executivem2BeatenText: + text "The fortress came" + line "down!" + done + +Executivem2AfterBattleText: + text "You've earned my" + line "respect, so here's" + cont "some advice." + + para "It's not too late." + line "You can still turn" + cont "back." + done + +GruntF4SeenText: + text "Don't I think" + line "#MON are cute?" + + para "I'll think my" + line "#MON are cute--" + + para "after they beat" + line "yours!" + done + +GruntF4BeatenText: + text "Oh, no! They're so" + line "useless!" + done + +GruntF4AfterBattleText: + text "I love my" + line "beautiful self!" + + para "Who cares about" + line "#MON?" + done + +ScientistRichSeenText: + text "Most excellent." + + para "This RADIO TOWER" + line "will fulfill our" + cont "grand design." + done + +ScientistRichBeatenText: + text "Hmmm…" + + para "All grand plans" + line "come with snags." + done + +ScientistRichAfterBattleText: + text "Do you honestly" + line "believe you can" + cont "stop TEAM ROCKET?" + done + +RadioTower4FProductionSignText: + text "4F PRODUCTION" + done + +RadioTower4FStudio2SignText: + text "4F STUDIO 2" + done + +RadioTower4F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 0, RADIO_TOWER_5F, 1 + warp_event 9, 0, RADIO_TOWER_3F, 2 + warp_event 12, 0, RADIO_TOWER_5F, 2 + warp_event 17, 0, RADIO_TOWER_3F, 3 + + def_coord_events + + def_bg_events + bg_event 7, 0, BGEVENT_READ, RadioTower4FProductionSign + bg_event 15, 0, BGEVENT_READ, RadioTower4FStudio2Sign + + def_object_events + object_event 6, 4, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, RadioTower4FFisherScript, EVENT_RADIO_TOWER_CIVILIANS_AFTER + object_event 14, 6, SPRITE_TEACHER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, RadioTower4FDJMaryScript, -1 + object_event 12, 7, SPRITE_GROWLITHE, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, RadioTowerMeowth, -1 + object_event 5, 6, SPRITE_ROCKET, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM10, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 14, 1, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_LEFT, 2, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerExecutivem2, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 12, 4, SPRITE_ROCKET_GIRL, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerGruntF4, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 4, 2, SPRITE_SCIENTIST, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerScientistRich, EVENT_RADIO_TOWER_ROCKET_TAKEOVER diff --git a/maps/RadioTower4F.blk b/maps/RadioTower4F.blk new file mode 100644 index 0000000..b7027c1 --- /dev/null +++ b/maps/RadioTower4F.blk @@ -0,0 +1 @@ + 1  #  #'#53''#524 \ No newline at end of file diff --git a/maps/RadioTower5F.asm b/maps/RadioTower5F.asm new file mode 100644 index 0000000..49ca41a --- /dev/null +++ b/maps/RadioTower5F.asm @@ -0,0 +1,444 @@ + object_const_def + const RADIOTOWER5F_DIRECTOR + const RADIOTOWER5F_ROCKET + const RADIOTOWER5F_ROCKET_GIRL + const RADIOTOWER5F_ROCKER + const RADIOTOWER5F_POKE_BALL + +RadioTower5F_MapScripts: + def_scene_scripts + scene_script RadioTower5FNoop1Scene, SCENE_RADIOTOWER5F_FAKE_DIRECTOR + scene_script RadioTower5FNoop2Scene, SCENE_RADIOTOWER5F_ROCKET_BOSS + scene_script RadioTower5FNoop3Scene, SCENE_RADIOTOWER5F_NOOP + + def_callbacks + +RadioTower5FNoop1Scene: + end + +RadioTower5FNoop2Scene: + end + +RadioTower5FNoop3Scene: + end + +FakeDirectorScript: + turnobject RADIOTOWER5F_DIRECTOR, UP + showemote EMOTE_SHOCK, RADIOTOWER5F_DIRECTOR, 15 + opentext + writetext FakeDirectorTextBefore1 + waitbutton + closetext + applymovement RADIOTOWER5F_DIRECTOR, FakeDirectorMovement + playmusic MUSIC_ROCKET_ENCOUNTER + opentext + writetext FakeDirectorTextBefore2 + waitbutton + closetext + winlosstext FakeDirectorWinText, 0 + setlasttalked RADIOTOWER5F_DIRECTOR + loadtrainer EXECUTIVEM, EXECUTIVEM_3 + startbattle + reloadmapafterbattle + opentext + writetext FakeDirectorTextAfter + promptbutton + verbosegiveitem BASEMENT_KEY + closetext + setscene SCENE_RADIOTOWER5F_ROCKET_BOSS + setevent EVENT_BEAT_ROCKET_EXECUTIVEM_3 + end + +Director: + faceplayer + opentext + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .TrueDirector + writetext FakeDirectorTextAfter + waitbutton + closetext + end + +.TrueDirector: + writetext RadioTower5FDirectorText + waitbutton + closetext + end + +TrainerExecutivef1: + trainer EXECUTIVEF, EXECUTIVEF_1, EVENT_BEAT_ROCKET_EXECUTIVEF_1, Executivef1SeenText, Executivef1BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext Executivef1AfterBattleText + waitbutton + closetext + end + +RadioTower5FRocketBossScript: + applymovement PLAYER, RadioTower5FPlayerTwoStepsLeftMovement + playmusic MUSIC_ROCKET_ENCOUNTER + turnobject RADIOTOWER5F_ROCKET, RIGHT + opentext + writetext RadioTower5FRocketBossBeforeText + waitbutton + closetext + winlosstext RadioTower5FRocketBossWinText, 0 + setlasttalked RADIOTOWER5F_ROCKET + loadtrainer EXECUTIVEM, EXECUTIVEM_1 + startbattle + reloadmapafterbattle + opentext + writetext RadioTower5FRocketBossAfterText + waitbutton + closetext + special FadeBlackQuickly + special ReloadSpritesNoPalettes + disappear RADIOTOWER5F_ROCKET + disappear RADIOTOWER5F_ROCKET_GIRL + pause 15 + special FadeInQuickly + setevent EVENT_BEAT_ROCKET_EXECUTIVEM_1 + setevent EVENT_CLEARED_RADIO_TOWER + clearflag ENGINE_ROCKETS_IN_RADIO_TOWER + setevent EVENT_GOLDENROD_CITY_ROCKET_SCOUT + setevent EVENT_GOLDENROD_CITY_ROCKET_TAKEOVER + setevent EVENT_RADIO_TOWER_ROCKET_TAKEOVER + clearevent EVENT_MAHOGANY_MART_OWNERS + clearflag ENGINE_ROCKETS_IN_MAHOGANY + clearevent EVENT_GOLDENROD_CITY_CIVILIANS + clearevent EVENT_RADIO_TOWER_CIVILIANS_AFTER + setevent EVENT_BLACKTHORN_CITY_SUPER_NERD_BLOCKS_GYM + clearevent EVENT_BLACKTHORN_CITY_SUPER_NERD_DOES_NOT_BLOCK_GYM + special PlayMapMusic + disappear RADIOTOWER5F_DIRECTOR + moveobject RADIOTOWER5F_DIRECTOR, 12, 0 + appear RADIOTOWER5F_DIRECTOR + applymovement RADIOTOWER5F_DIRECTOR, RadioTower5FDirectorWalksIn + turnobject PLAYER, RIGHT + opentext + writetext RadioTower5FDirectorThankYouText + promptbutton + verbosegiveitem CLEAR_BELL + writetext RadioTower5FDirectorDescribeClearBellText + waitbutton + closetext + setscene SCENE_RADIOTOWER5F_NOOP + setmapscene ECRUTEAK_TIN_TOWER_ENTRANCE, SCENE_ECRUTEAKTINTOWERENTRANCE_SAGE_BLOCKS + setevent EVENT_GOT_CLEAR_BELL + setevent EVENT_TEAM_ROCKET_DISBANDED + sjump .UselessJump + +.UselessJump: + applymovement RADIOTOWER5F_DIRECTOR, RadioTower5FDirectorWalksOut + playsound SFX_EXIT_BUILDING + disappear RADIOTOWER5F_DIRECTOR + end + +Ben: + jumptextfaceplayer BenText + +RadioTower5FUltraBall: + itemball ULTRA_BALL + +RadioTower5FDirectorsOfficeSign: + jumptext RadioTower5FDirectorsOfficeSignText + +RadioTower5FStudio1Sign: + jumptext RadioTower5FStudio1SignText + +RadioTower5FBookshelf: + jumpstd MagazineBookshelfScript + +FakeDirectorMovement: + step LEFT + step LEFT + step LEFT + step UP + step UP + step_end + +RadioTower5FDirectorWalksIn: + step DOWN + step DOWN + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step DOWN + step DOWN + step DOWN + step LEFT + step_end + +RadioTower5FDirectorWalksOut: + step RIGHT + step UP + step UP + step UP + step LEFT + step LEFT + step LEFT + step LEFT + step UP + step UP + step_end + +RadioTower5FPlayerTwoStepsLeftMovement: + step LEFT + step LEFT + step_end + +FakeDirectorTextBefore1: + text "Y-you! You came to" + line "rescue me?" + done + +FakeDirectorTextBefore2: + text "Is that what you" + line "were expecting?" + + para "Wrong!" + line "I'm an imposter!" + + para "I pretended to be" + line "the real thing to" + + para "prepare for our" + line "takeover." + + para "Do you want to" + line "know where we hid" + cont "the real DIRECTOR?" + + para "Sure, I'll tell" + line "you. But only if" + cont "you can beat me!" + done + +FakeDirectorWinText: + text "OK, OK. I'll tell" + line "you where he is." + done + +FakeDirectorTextAfter: + text "We stashed the" + line "real DIRECTOR in" + + para "the UNDERGROUND" + line "WAREHOUSE." + + para "It's at the far" + line "end of the UNDER-" + cont "GROUND." + + para "But I doubt you'll" + line "get that far." + done + +Executivef1SeenText: + text "Remember me from" + line "the HIDEOUT in" + cont "MAHOGANY TOWN?" + + para "I lost then, but I" + line "won't this time." + done + +Executivef1BeatenText: + text "This can't be" + line "happening!" + + para "I fought hard, but" + line "I still lost…" + done + +Executivef1AfterBattleText: + text ", isn't it?" + + para "A brat like you" + line "won't appreciate" + + para "the magnificence" + line "of TEAM ROCKET." + + para "That's too bad." + line "I really admire" + cont "your power." + done + +RadioTower5FRocketBossBeforeText: + text "Oh? You managed to" + line "get this far?" + + para "You must be quite" + line "the trainer." + + para "We intend to take" + line "over this RADIO" + + para "STATION and an-" + line "nounce our come-" + cont "back." + + para "That should bring" + line "our boss GIOVANNI" + + para "back from his solo" + line "training." + + para "We are going to" + line "regain our former" + cont "glory." + + para "I won't allow you" + line "to interfere with" + cont "our plans." + done + +RadioTower5FRocketBossWinText: + text "No! Forgive me," + line "GIOVANNI!" + done + +RadioTower5FRocketBossAfterText: + text "How could this be?" + + para "Our dreams have" + line "come to naught." + + para "I wasn't up to the" + line "task after all." + + para "Like GIOVANNI did" + line "before me, I will" + + para "disband TEAM" + line "ROCKET here today." + + para "Farewell." + done + +RadioTower5FDirectorThankYouText: + text "DIRECTOR: ," + line "thank you!" + + para "Your courageous" + line "actions have saved" + + para "#MON nation-" + line "wide." + + para "I know it's not" + line "much, but please" + cont "take this." + done + +RadioTower5FDirectorDescribeClearBellText: + text "There used to be a" + line "tower right here" + cont "in GOLDENROD CITY." + + para "But it was old and" + line "creaky." + + para "So we replaced it" + line "with our RADIO" + cont "TOWER." + + para "We dug up that" + line "bell during" + cont "construction." + + para "I heard that all" + line "sorts of #MON" + + para "lived in GOLDENROD" + line "in the past." + + para "Perhaps…" + + para "That bell has some" + line "connection to the" + + para "TIN TOWER in" + line "ECRUTEAK CITY…" + + para "Ah!" + + para "That reminds me…" + + para "I overheard TEAM" + line "ROCKET whispering." + + para "Apparently, some-" + line "thing is going on" + cont "at the TIN TOWER." + + para "I have no idea" + line "what is happening," + + para "but you might look" + line "into it." + + para "OK, I better go to" + line "my OFFICE." + done + +RadioTower5FDirectorText: + text "DIRECTOR: Hello," + line "!" + + para "You know, I love" + line "#MON." + + para "I built this RADIO" + line "TOWER so I could" + + para "express my love" + line "of #MON." + + para "It would be nice" + line "if people enjoyed" + cont "our programs." + done + +BenText: + text "BEN: Do you listen" + line "to our music?" + done + +RadioTower5FDirectorsOfficeSignText: + text "5F DIRECTOR'S" + line " OFFICE" + done + +RadioTower5FStudio1SignText: + text "5F STUDIO 1" + done + +RadioTower5F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 0, RADIO_TOWER_4F, 1 + warp_event 12, 0, RADIO_TOWER_4F, 3 + + def_coord_events + coord_event 0, 3, SCENE_RADIOTOWER5F_FAKE_DIRECTOR, FakeDirectorScript + coord_event 16, 5, SCENE_RADIOTOWER5F_ROCKET_BOSS, RadioTower5FRocketBossScript + + def_bg_events + bg_event 3, 0, BGEVENT_READ, RadioTower5FDirectorsOfficeSign + bg_event 11, 0, BGEVENT_READ, RadioTower5FStudio1Sign + bg_event 15, 0, BGEVENT_READ, RadioTower5FStudio1Sign + bg_event 16, 1, BGEVENT_READ, RadioTower5FBookshelf + bg_event 17, 1, BGEVENT_READ, RadioTower5FBookshelf + + def_object_events + object_event 3, 6, SPRITE_GENTLEMAN, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Director, -1 + object_event 13, 5, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 17, 2, SPRITE_ROCKET_GIRL, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerExecutivef1, EVENT_RADIO_TOWER_ROCKET_TAKEOVER + object_event 13, 5, SPRITE_ROCKER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Ben, EVENT_RADIO_TOWER_CIVILIANS_AFTER + object_event 8, 5, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RadioTower5FUltraBall, EVENT_RADIO_TOWER_5F_ULTRA_BALL diff --git a/maps/RadioTower5F.blk b/maps/RadioTower5F.blk new file mode 100644 index 0000000..287e21a --- /dev/null +++ b/maps/RadioTower5F.blk @@ -0,0 +1,2 @@ +1#  +#='"#636>#5245> \ No newline at end of file diff --git a/maps/RedsHouse1F.asm b/maps/RedsHouse1F.asm new file mode 100644 index 0000000..0d6cf22 --- /dev/null +++ b/maps/RedsHouse1F.asm @@ -0,0 +1,91 @@ + object_const_def + const REDSHOUSE1F_REDS_MOM + +RedsHouse1F_MapScripts: + def_scene_scripts + scene_script RedHouse1FNoopScene ; unusable + + def_callbacks + +RedHouse1FNoopScene: + end + +RedsMom: + faceplayer + opentext + checkevent EVENT_MET_REDS_MOM + iftrue .MetAlready + writetext RedsMomText1 + waitbutton + closetext + setevent EVENT_MET_REDS_MOM + end +.MetAlready: + writetext RedsMomText2 + waitbutton + closetext + end + +RedsHouse1FTV: + jumptext RedsHouse1FTVText + +RedsHouse1FBookshelf: + jumpstd PictureBookshelfScript + +RedsMomText1: + text "Hi!" + + para "RED's been away" + line "for a long time." + + para "He hasn't called" + line "either, so I have" + + para "no idea where he" + line "is or what he's" + cont "been doing." + + para "They say that no" + line "word is proof that" + + para "he's doing fine," + line "but I do worry" + cont "about him." + done + +RedsMomText2: + text "I worry about RED" + line "getting hurt or" + + para "sick, but he's a" + line "boy. I'm proud" + + para "that he is doing" + line "what he wants to" + + para "do." + done + +RedsHouse1FTVText: + text "They have programs" + line "that aren't shown" + cont "in JOHTO…" + done + +RedsHouse1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, PALLET_TOWN, 1 + warp_event 3, 7, PALLET_TOWN, 1 + warp_event 7, 0, REDS_HOUSE_2F, 1 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, RedsHouse1FBookshelf + bg_event 1, 1, BGEVENT_READ, RedsHouse1FBookshelf + bg_event 2, 1, BGEVENT_READ, RedsHouse1FTV + + def_object_events + object_event 5, 3, SPRITE_REDS_MOM, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RedsMom, -1 diff --git a/maps/RedsHouse1F.blk b/maps/RedsHouse1F.blk new file mode 100644 index 0000000..f58e430 --- /dev/null +++ b/maps/RedsHouse1F.blk @@ -0,0 +1,2 @@ + +   \ No newline at end of file diff --git a/maps/RedsHouse2F.asm b/maps/RedsHouse2F.asm new file mode 100644 index 0000000..da0f012 --- /dev/null +++ b/maps/RedsHouse2F.asm @@ -0,0 +1,38 @@ +RedsHouse2F_MapScripts: + def_scene_scripts + + def_callbacks + +RedsHouse2FN64Script: + jumptext RedsHouse2FN64Text + +RedsHouse2FPCScript: + jumptext RedsHouse2FPCText + +RedsHouse2FN64Text: + text " played the" + line "N64." + + para "Better get going--" + line "no time to lose!" + done + +RedsHouse2FPCText: + text "It looks like it" + line "hasn't been used" + cont "in a long time…" + done + +RedsHouse2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 0, REDS_HOUSE_1F, 3 + + def_coord_events + + def_bg_events + bg_event 3, 5, BGEVENT_READ, RedsHouse2FN64Script + bg_event 0, 1, BGEVENT_READ, RedsHouse2FPCScript + + def_object_events diff --git a/maps/RedsHouse2F.blk b/maps/RedsHouse2F.blk new file mode 100644 index 0000000..def8a18 --- /dev/null +++ b/maps/RedsHouse2F.blk @@ -0,0 +1 @@ +  " \ No newline at end of file diff --git a/maps/RockTunnel1F.asm b/maps/RockTunnel1F.asm new file mode 100644 index 0000000..3dbcf92 --- /dev/null +++ b/maps/RockTunnel1F.asm @@ -0,0 +1,41 @@ + object_const_def + const ROCKTUNNEL1F_POKE_BALL1 + const ROCKTUNNEL1F_POKE_BALL2 + +RockTunnel1F_MapScripts: + def_scene_scripts + + def_callbacks + +RockTunnel1FElixer: + itemball ELIXER + +RockTunnel1FTMSteelWing: + itemball TM_STEEL_WING + +RockTunnel1FHiddenXAccuracy: + hiddenitem X_ACCURACY, EVENT_ROCK_TUNNEL_1F_HIDDEN_X_ACCURACY + +RockTunnel1FHiddenXDefend: + hiddenitem X_DEFEND, EVENT_ROCK_TUNNEL_1F_HIDDEN_X_DEFEND + +RockTunnel1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 15, 3, ROUTE_9, 1 + warp_event 11, 25, ROUTE_10_SOUTH, 1 + warp_event 5, 3, ROCK_TUNNEL_B1F, 3 + warp_event 15, 9, ROCK_TUNNEL_B1F, 2 + warp_event 27, 3, ROCK_TUNNEL_B1F, 4 + warp_event 27, 13, ROCK_TUNNEL_B1F, 1 + + def_coord_events + + def_bg_events + bg_event 24, 4, BGEVENT_ITEM, RockTunnel1FHiddenXAccuracy + bg_event 21, 15, BGEVENT_ITEM, RockTunnel1FHiddenXDefend + + def_object_events + object_event 4, 18, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RockTunnel1FElixer, EVENT_ROCK_TUNNEL_1F_ELIXER + object_event 10, 15, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RockTunnel1FTMSteelWing, EVENT_ROCK_TUNNEL_1F_TM_STEEL_WING diff --git a/maps/RockTunnel1F.blk b/maps/RockTunnel1F.blk new file mode 100644 index 0000000..9df1356 --- /dev/null +++ b/maps/RockTunnel1F.blk @@ -0,0 +1,16 @@ +      + +$*  + +#!" +   +(  +*(   + !* + + + +   (  +) !)" +)$  +$" # \ No newline at end of file diff --git a/maps/RockTunnelB1F.asm b/maps/RockTunnelB1F.asm new file mode 100644 index 0000000..88693aa --- /dev/null +++ b/maps/RockTunnelB1F.asm @@ -0,0 +1,40 @@ + object_const_def + const ROCKTUNNELB1F_POKE_BALL1 + const ROCKTUNNELB1F_POKE_BALL2 + const ROCKTUNNELB1F_POKE_BALL3 + +RockTunnelB1F_MapScripts: + def_scene_scripts + + def_callbacks + +RockTunnelB1FIron: + itemball IRON + +RockTunnelB1FPPUp: + itemball PP_UP + +RockTunnelB1FRevive: + itemball REVIVE + +RockTunnelB1FHiddenMaxPotion: + hiddenitem MAX_POTION, EVENT_ROCK_TUNNEL_B1F_HIDDEN_MAX_POTION + +RockTunnelB1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 3, ROCK_TUNNEL_1F, 6 + warp_event 17, 9, ROCK_TUNNEL_1F, 4 + warp_event 23, 3, ROCK_TUNNEL_1F, 3 + warp_event 25, 23, ROCK_TUNNEL_1F, 5 + + def_coord_events + + def_bg_events + bg_event 4, 14, BGEVENT_ITEM, RockTunnelB1FHiddenMaxPotion + + def_object_events + object_event 7, 25, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RockTunnelB1FIron, EVENT_ROCK_TUNNEL_B1F_IRON + object_event 6, 17, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RockTunnelB1FPPUp, EVENT_ROCK_TUNNEL_B1F_PP_UP + object_event 15, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RockTunnelB1FRevive, EVENT_ROCK_TUNNEL_B1F_REVIVE diff --git a/maps/RockTunnelB1F.blk b/maps/RockTunnelB1F.blk new file mode 100644 index 0000000..8c2a3e4 --- /dev/null +++ b/maps/RockTunnelB1F.blk @@ -0,0 +1,16 @@ +  +( + + +()  ( +  +)")" + +")!   + "( ( +(* +)++ +!" (*! ++  +  *  +(!)+  \ No newline at end of file diff --git a/maps/Route1.asm b/maps/Route1.asm new file mode 100644 index 0000000..42a0a41 --- /dev/null +++ b/maps/Route1.asm @@ -0,0 +1,94 @@ + object_const_def + const ROUTE1_YOUNGSTER + const ROUTE1_COOLTRAINER_F + const ROUTE1_FRUIT_TREE + +Route1_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerSchoolboyDanny: + trainer SCHOOLBOY, DANNY, EVENT_BEAT_SCHOOLBOY_DANNY, SchoolboyDannySeenText, SchoolboyDannyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SchoolboyDannyAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainerfQuinn: + trainer COOLTRAINERF, QUINN, EVENT_BEAT_COOLTRAINERF_QUINN, CooltrainerfQuinnSeenText, CooltrainerfQuinnBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainerfQuinnAfterBattleText + waitbutton + closetext + end + +Route1Sign: + jumptext Route1SignText + +Route1FruitTree: + fruittree FRUITTREE_ROUTE_1 + +SchoolboyDannySeenText: + text "If trainers meet," + line "the first thing to" + cont "do is battle." + done + +SchoolboyDannyBeatenText: + text "Awww… I've got a" + line "losing record…" + done + +SchoolboyDannyAfterBattleText: + text "For trainers, it's" + line "a given that we'll" + + para "battle whenever we" + line "meet." + done + +CooltrainerfQuinnSeenText: + text "You there!" + line "Want to battle?" + done + +CooltrainerfQuinnBeatenText: + text "Down and out…" + done + +CooltrainerfQuinnAfterBattleText: + text "You're strong." + + para "You obviously must" + line "have trained hard." + done + +Route1SignText: + text "ROUTE 1" + + para "PALLET TOWN -" + line "VIRIDIAN CITY" + done + +Route1_MapEvents: + db 0, 0 ; filler + + def_warp_events + + def_coord_events + + def_bg_events + bg_event 7, 27, BGEVENT_READ, Route1Sign + + def_object_events + object_event 4, 12, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSchoolboyDanny, -1 + object_event 9, 25, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerCooltrainerfQuinn, -1 + object_event 3, 7, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route1FruitTree, -1 diff --git a/maps/Route1.blk b/maps/Route1.blk new file mode 100644 index 0000000..ab52d08 --- /dev/null +++ b/maps/Route1.blk @@ -0,0 +1,37 @@ +MRRO1PRRN +Mtt +1 + +tN +MB11N +n + +n m +nB m +n +tt +111m +nRRa m +M + +tt1 N +M +1111ttN +M//N +M +111111N +Moooo N +M + +tt 1N +M1N +n + 1 + m +n t1 tm +nQQc bQQm +n + +M N + +m diff --git a/maps/Route10North.asm b/maps/Route10North.asm new file mode 100644 index 0000000..49404a8 --- /dev/null +++ b/maps/Route10North.asm @@ -0,0 +1,29 @@ +Route10North_MapScripts: + def_scene_scripts + + def_callbacks + +PowerPlantSign: + jumptext PowerPlantSignText + +Route10PokecenterSign: + jumpstd PokecenterSignScript + +PowerPlantSignText: + text "KANTO POWER PLANT" + done + +Route10North_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 11, 1, ROUTE_10_POKECENTER_1F, 1 + warp_event 3, 9, POWER_PLANT, 1 + + def_coord_events + + def_bg_events + bg_event 5, 11, BGEVENT_READ, PowerPlantSign + bg_event 12, 1, BGEVENT_READ, Route10PokecenterSign + + def_object_events diff --git a/maps/Route10North.blk b/maps/Route10North.blk new file mode 100644 index 0000000..21d6dbf --- /dev/null +++ b/maps/Route10North.blk @@ -0,0 +1,6 @@ +,)UUU|rMe(,) + + + + +Me(,,?????;e(+ TTT!,)e()|}}}~$%e(){y{ e().(,????????,,,,,,,,,,, \ No newline at end of file diff --git a/maps/Route10Pokecenter1F.asm b/maps/Route10Pokecenter1F.asm new file mode 100644 index 0000000..8a26805 --- /dev/null +++ b/maps/Route10Pokecenter1F.asm @@ -0,0 +1,97 @@ + object_const_def + const ROUTE10POKECENTER1F_NURSE + const ROUTE10POKECENTER1F_GENTLEMAN + const ROUTE10POKECENTER1F_GYM_GUIDE + const ROUTE10POKECENTER1F_COOLTRAINER_F + +Route10Pokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +Route10Pokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +Route10Pokecenter1FGentlemanScript: + jumptextfaceplayer Route10Pokecenter1FGentlemanText + +Route10Pokecenter1FGymGuideScript: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext Route10Pokecenter1FGymGuideText + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext Route10Pokecenter1FGymGuideText_ReturnedMachinePart + waitbutton + closetext + end + +Route10Pokecenter1FCooltrainerFScript: + jumptextfaceplayer Route10Pokecenter1FCooltrainerFText + +Route10Pokecenter1FGentlemanText: + text "A #MON CENTER" + line "near a cave?" + + para "That's mighty" + line "convenient." + done + +Route10Pokecenter1FGymGuideText: + text "The POWER PLANT's" + line "MANAGER is looking" + + para "for a strong #-" + line "MON trainer." + + para "He needs help" + line "getting back" + + para "something that" + line "was stolen." + done + +Route10Pokecenter1FGymGuideText_ReturnedMachinePart: + text "I hear TEAM ROCKET" + line "got back together" + + para "in JOHTO but fell" + line "apart right away." + + para "I didn't know any-" + line "thing about that." + done + +Route10Pokecenter1FCooltrainerFText: + text "When you go out-" + line "side, you can see" + + para "the roof of a big" + line "building." + + para "That's the POWER" + line "PLANT." + done + +Route10Pokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, ROUTE_10_NORTH, 1 + warp_event 4, 7, ROUTE_10_NORTH, 1 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route10Pokecenter1FNurseScript, -1 + object_event 7, 6, SPRITE_GENTLEMAN, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route10Pokecenter1FGentlemanScript, -1 + object_event 7, 2, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route10Pokecenter1FGymGuideScript, -1 + object_event 1, 3, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route10Pokecenter1FCooltrainerFScript, -1 diff --git a/maps/Route10Pokecenter2FBeta.asm b/maps/Route10Pokecenter2FBeta.asm new file mode 100644 index 0000000..4cf3a2a --- /dev/null +++ b/maps/Route10Pokecenter2FBeta.asm @@ -0,0 +1,16 @@ +Route10Pokecenter2FBeta_MapScripts: + def_scene_scripts + + def_callbacks + +Route10Pokecenter2FBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 7, ROUTE_10_POKECENTER_1F, 3 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/Route10South.asm b/maps/Route10South.asm new file mode 100644 index 0000000..57310ea --- /dev/null +++ b/maps/Route10South.asm @@ -0,0 +1,89 @@ + object_const_def + const ROUTE10SOUTH_POKEFAN_M1 + const ROUTE10SOUTH_POKEFAN_M2 + +Route10South_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerHikerJim: + trainer HIKER, JIM, EVENT_BEAT_HIKER_JIM, HikerJimSeenText, HikerJimBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerJimAfterBattleText + waitbutton + closetext + end + +TrainerPokefanmRobert: + trainer POKEFANM, ROBERT, EVENT_BEAT_POKEFANM_ROBERT, PokefanmRobertSeenText, PokefanmRobertBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanmRobertAfterBattleText + waitbutton + closetext + end + +Route10Sign: + jumptext Route10SignText + +HikerJimSeenText: + text "Hahahah!" + done + +HikerJimBeatenText: + text "Hahaha-hachoo!" + done + +HikerJimAfterBattleText: + text "Hay fever is" + line "making me sneeze!" + cont "Ahahah-CHOO!" + done + +PokefanmRobertSeenText: + text "You like #MON," + line "don't you?" + + para "Me too!" + done + +PokefanmRobertBeatenText: + text "I'd have to say" + line "that's my loss." + done + +PokefanmRobertAfterBattleText: + text "Look what you did" + line "to my #MON…" + + para "I won't forget" + line "this…" + done + +Route10SignText: + text "ROUTE 10" + + para "CERULEAN CITY -" + line "LAVENDER TOWN" + done + +Route10South_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 6, 1, ROCK_TUNNEL_1F, 2 + + def_coord_events + + def_bg_events + bg_event 5, 3, BGEVENT_READ, Route10Sign + + def_object_events + object_event 17, 3, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerHikerJim, -1 + object_event 8, 10, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmRobert, -1 diff --git a/maps/Route10South.blk b/maps/Route10South.blk new file mode 100644 index 0000000..73ab611 --- /dev/null +++ b/maps/Route10South.blk @@ -0,0 +1 @@ ++WWWWWWW*)1111111()1111>;\()>??,)11(){$WWW%\(){{{{{{{{(,??;{{ T!(,,+%\ahi(,,){11hi, \ No newline at end of file diff --git a/maps/Route11.asm b/maps/Route11.asm new file mode 100644 index 0000000..02237fc --- /dev/null +++ b/maps/Route11.asm @@ -0,0 +1,162 @@ + object_const_def + const ROUTE11_YOUNGSTER1 + const ROUTE11_YOUNGSTER2 + const ROUTE11_YOUNGSTER3 + const ROUTE11_YOUNGSTER4 + const ROUTE11_FRUIT_TREE + +Route11_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerYoungsterOwen: + trainer YOUNGSTER, OWEN, EVENT_BEAT_YOUNGSTER_OWEN, YoungsterOwenSeenText, YoungsterOwenBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext YoungsterOwenAfterBattleText + waitbutton + closetext + end + +TrainerYoungsterJason: + trainer YOUNGSTER, JASON, EVENT_BEAT_YOUNGSTER_JASON, YoungsterJasonSeenText, YoungsterJasonBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext YoungsterJasonAfterBattleText + waitbutton + closetext + end + +TrainerPsychicHerman: + trainer PSYCHIC_T, HERMAN, EVENT_BEAT_PSYCHIC_HERMAN, PsychicHermanSeenText, PsychicHermanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PsychicHermanAfterBattleText + waitbutton + closetext + end + +TrainerPsychicFidel: + trainer PSYCHIC_T, FIDEL, EVENT_BEAT_PSYCHIC_FIDEL, PsychicFidelSeenText, PsychicFidelBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PsychicFidelAfterBattleText + waitbutton + closetext + end + +Route11Sign: + jumptext Route11SignText + +Route11FruitTree: + fruittree FRUITTREE_ROUTE_11 + +Route11HiddenRevive: + hiddenitem REVIVE, EVENT_ROUTE_11_HIDDEN_REVIVE + +YoungsterOwenSeenText: + text "There's no cheat-" + line "ing in #MON." + + para "Let's keep it fair" + line "and square!" + done + +YoungsterOwenBeatenText: + text "Huh? How did this" + line "happen?" + done + +YoungsterOwenAfterBattleText: + text "I fought fair and" + line "square with honor." + + para "I don't regret" + line "this at all." + done + +YoungsterJasonSeenText: + text "It itches and" + line "tickles a bit when" + + para "I wear shorts in" + line "the grass." + done + +YoungsterJasonBeatenText: + text "Aiyaaah!" + line "I got stomped!" + done + +YoungsterJasonAfterBattleText: + text "I'm going to catch" + line "more #MON in" + cont "the grass." + done + +PsychicHermanSeenText: + text "…" + done + +PsychicHermanBeatenText: + text "…" + done + +PsychicHermanAfterBattleText: + text "…" + + para "I lost while I had" + line "my eyes closed…" + done + +PsychicFidelSeenText: + text "I can see it…" + + para "Everything to see" + line "about you…" + done + +PsychicFidelBeatenText: + text "I couldn't foresee" + line "your power…" + done + +PsychicFidelAfterBattleText: + text "Strength in con-" + line "viction…" + + para "You're strong be-" + line "cause you believe" + cont "in your #MON." + done + +Route11SignText: + text "ROUTE 11" + done + +Route11_MapEvents: + db 0, 0 ; filler + + def_warp_events + + def_coord_events + + def_bg_events + bg_event 3, 7, BGEVENT_READ, Route11Sign + bg_event 32, 5, BGEVENT_ITEM, Route11HiddenRevive + + def_object_events + object_event 22, 14, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterOwen, -1 + object_event 20, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterJason, -1 + object_event 28, 7, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerPsychicHerman, -1 + object_event 8, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPsychicFidel, -1 + object_event 32, 2, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route11FruitTree, -1 diff --git a/maps/Route11.blk b/maps/Route11.blk new file mode 100644 index 0000000..46cb9af --- /dev/null +++ b/maps/Route11.blk @@ -0,0 +1,14 @@ +I###H I####H + +n' ' ' ^ + +nm' ' ' +Ln' I#" &##H RR11" ' ' ' ' ooomD#E D#" ' ] + +m ' ' ' + +] &##" ' + +D#####E D##E + + \ No newline at end of file diff --git a/maps/Route12.asm b/maps/Route12.asm new file mode 100644 index 0000000..ea992c2 --- /dev/null +++ b/maps/Route12.asm @@ -0,0 +1,186 @@ + object_const_def + const ROUTE12_FISHER1 + const ROUTE12_FISHER2 + const ROUTE12_FISHER3 + const ROUTE12_FISHER4 + const ROUTE12_POKE_BALL1 + const ROUTE12_POKE_BALL2 + +Route12_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerFisherKyle: + trainer FISHER, KYLE, EVENT_BEAT_FISHER_KYLE, FisherKyleSeenText, FisherKyleBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherKyleAfterBattleText + waitbutton + closetext + end + +TrainerFisherMartin: + trainer FISHER, MARTIN, EVENT_BEAT_FISHER_MARTIN, FisherMartinSeenText, FisherMartinBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherMartinAfterBattleText + waitbutton + closetext + end + +TrainerFisherStephen: + trainer FISHER, STEPHEN, EVENT_BEAT_FISHER_STEPHEN, FisherStephenSeenText, FisherStephenBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherStephenAfterBattleText + waitbutton + closetext + end + +TrainerFisherBarney: + trainer FISHER, BARNEY, EVENT_BEAT_FISHER_BARNEY, FisherBarneySeenText, FisherBarneyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherBarneyAfterBattleText + waitbutton + closetext + end + +Route12Sign: + jumptext Route12SignText + +FishingSpotSign: + jumptext FishingSpotSignText + +Route12Calcium: + itemball CALCIUM + +Route12Nugget: + itemball NUGGET + +Route12HiddenElixer: + hiddenitem ELIXER, EVENT_ROUTE_12_HIDDEN_ELIXER + +FisherMartinSeenText: + text "Patience is the" + line "key to both fish-" + cont "ing and #MON." + done + +FisherMartinBeatenText: + text "Gwaaah!" + done + +FisherMartinAfterBattleText: + text "I'm too impatient" + line "for fishing…" + done + +FisherStephenSeenText: + text "I feel so content," + line "fishing while lis-" + cont "tening to some" + cont "tunes on my radio." + done + +FisherStephenBeatenText: + text "My stupid radio" + line "distracted me!" + done + +FisherStephenAfterBattleText: + text "Have you checked" + line "out KANTO's radio" + + para "programs? We get a" + line "good variety here." + done + +FisherBarneySeenText: + text "What's most impor-" + line "tant in our every-" + cont "day lives?" + done + +FisherBarneyBeatenText: + text "The answer is" + line "coming up next!" + done + +FisherBarneyAfterBattleText: + text "I think electric-" + line "ity is the most" + + para "important thing in" + line "our daily lives." + + para "If it weren't," + line "people wouldn't" + + para "have made such a" + line "fuss when the" + + para "POWER PLANT went" + line "out of commission." + done + +FisherKyleSeenText: + text "Do you remember?" + done + +FisherKyleBeatenText: + text "You do remember?" + done + +FisherKyleAfterBattleText: + text "The tug you feel" + line "on the ROD when" + + para "you hook a #-" + line "MON…" + + para "That's the best" + line "feeling ever for" + cont "an angler like me." + done + +Route12SignText: + text "ROUTE 12" + + para "NORTH TO LAVENDER" + line "TOWN" + done + +FishingSpotSignText: + text "FISHING SPOT" + done + +Route12_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 11, 33, ROUTE_12_SUPER_ROD_HOUSE, 1 + + def_coord_events + + def_bg_events + bg_event 11, 27, BGEVENT_READ, Route12Sign + bg_event 13, 9, BGEVENT_READ, FishingSpotSign + bg_event 14, 13, BGEVENT_ITEM, Route12HiddenElixer + + def_object_events + object_event 5, 13, SPRITE_FISHER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherMartin, -1 + object_event 14, 23, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherStephen, -1 + object_event 10, 38, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 5, TrainerFisherBarney, -1 + object_event 6, 7, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerFisherKyle, -1 + object_event 5, 43, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route12Calcium, EVENT_ROUTE_12_CALCIUM + object_event 5, 51, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route12Nugget, EVENT_ROUTE_12_NUGGET diff --git a/maps/Route12.blk b/maps/Route12.blk new file mode 100644 index 0000000..324ff4a --- /dev/null +++ b/maps/Route12.blk @@ -0,0 +1,13 @@ +,+W%$WWWW,)CCCCCC,)CCCCkk,)tCCC,)xxy,)xCCxxxW%tCCxxxCxCCCxxxxCCCCtCCCCCxCkkkxxCooRRRyCCCCCCCxxC111C +nwwwwwC +nC +nCC +nxxxxCC +nl6CCCC +no5CCC +nxCCC +nl3CC +n +nCxxC +n +nC \ No newline at end of file diff --git a/maps/Route12SuperRodHouse.asm b/maps/Route12SuperRodHouse.asm new file mode 100644 index 0000000..10cb41c --- /dev/null +++ b/maps/Route12SuperRodHouse.asm @@ -0,0 +1,91 @@ + object_const_def + const ROUTE12SUPERRODHOUSE_FISHING_GURU + +Route12SuperRodHouse_MapScripts: + def_scene_scripts + + def_callbacks + +Route12SuperRodHouseFishingGuruScript: + faceplayer + opentext + checkevent EVENT_GOT_SUPER_ROD + iftrue .GotSuperRod + writetext OfferSuperRodText + yesorno + iffalse .Refused + writetext GiveSuperRodText + promptbutton + verbosegiveitem SUPER_ROD + iffalse .NoRoom + setevent EVENT_GOT_SUPER_ROD +.GotSuperRod: + writetext GaveSuperRodText + waitbutton + closetext + end + +.Refused: + writetext DontWantSuperRodText + waitbutton +.NoRoom: + closetext + end + +SuperRodHouseBookshelf: ; unreferenced + jumpstd PictureBookshelfScript + +OfferSuperRodText: + text "I'm the FISHING" + line "GURU's younger" + cont "brother." + + para "I can see that you" + line "like fishing." + + para "There's no doubt" + line "in my mind at all!" + + para "So? I know I'm" + line "right." + done + +GiveSuperRodText: + text "Yes, yes. Just as" + line "I thought!" + + para "Here, fishing fan!" + line "Take this--it's a" + cont "SUPER ROD." + done + +GaveSuperRodText: + text "Try your hand at" + line "fishing wherever" + cont "there is water." + + para "Remember--you can" + line "catch different" + + para "#MON using" + line "different RODS." + done + +DontWantSuperRodText: + text "Huh? My own eyes" + line "deceived me?" + done + +Route12SuperRodHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ROUTE_12, 1 + warp_event 3, 7, ROUTE_12, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 3, SPRITE_FISHING_GURU, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route12SuperRodHouseFishingGuruScript, -1 diff --git a/maps/Route13.asm b/maps/Route13.asm new file mode 100644 index 0000000..0294844 --- /dev/null +++ b/maps/Route13.asm @@ -0,0 +1,210 @@ + object_const_def + const ROUTE13_YOUNGSTER1 + const ROUTE13_YOUNGSTER2 + const ROUTE13_POKEFAN_M1 + const ROUTE13_POKEFAN_M2 + const ROUTE13_POKEFAN_M3 + +Route13_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerPokefanmAlex: + trainer POKEFANM, ALEX, EVENT_BEAT_POKEFANM_ALEX, PokefanmAlexSeenText, PokefanmAlexBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanmAlexAfterBattleText + waitbutton + closetext + end + +TrainerPokefanmJoshua: + trainer POKEFANM, JOSHUA, EVENT_BEAT_POKEFANM_JOSHUA, PokefanmJoshuaSeenText, PokefanmJoshuaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanmJoshuaAfterBattleText + waitbutton + closetext + end + +TrainerBirdKeeperPerry: + trainer BIRD_KEEPER, PERRY, EVENT_BEAT_BIRD_KEEPER_PERRY, BirdKeeperPerrySeenText, BirdKeeperPerryBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BirdKeeperPerryAfterBattleText + waitbutton + closetext + end + +TrainerBirdKeeperBret: + trainer BIRD_KEEPER, BRET, EVENT_BEAT_BIRD_KEEPER_BRET, BirdKeeperBretSeenText, BirdKeeperBretBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BirdKeeperBretAfterBattleText + waitbutton + closetext + end + +TrainerHikerKenny: + trainer HIKER, KENNY, EVENT_BEAT_HIKER_KENNY, HikerKennySeenText, HikerKennyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerKennyAfterBattleText + waitbutton + closetext + end + +Route13TrainerTips: + jumptext Route13TrainerTipsText + +Route13Sign: + jumptext Route13SignText + +Route13DirectionsSign: + jumptext Route13DirectionsSignText + +Route13HiddenCalcium: + hiddenitem CALCIUM, EVENT_ROUTE_13_HIDDEN_CALCIUM + +PokefanmAlexSeenText: + text "Bow down before my" + line "regal #MON!" + done + +PokefanmAlexBeatenText: + text "How… How dare you" + line "mock royalty!" + done + +PokefanmAlexAfterBattleText: + text "Doesn't everyone" + line "wish to someday be" + cont "a king?" + done + +PokefanmJoshuaSeenText: + text "Nihihi! Would you" + line "like to battle my" + cont "PIKACHU gang?" + done + +PokefanmJoshuaBeatenText: + text "PI-PIKACHU!" + done + +PokefanmJoshuaAfterBattleText: + text "You look like you" + line "have many #MON," + + para "but PIKACHU is" + line "still the best." + done + +BirdKeeperPerrySeenText: + text "Agility is the key" + line "attribute of bird" + cont "#MON." + done + +BirdKeeperPerryBeatenText: + text "You beat me with" + line "your speed…" + done + +BirdKeeperPerryAfterBattleText: + text "Your #MON are" + line "remarkably well-" + cont "trained." + done + +BirdKeeperBretSeenText: + text "Check out my #-" + line "MON. Just look at" + + para "their coloring and" + line "their plumage." + done + +BirdKeeperBretBeatenText: + text "Shoot!" + line "Not good enough!" + done + +BirdKeeperBretAfterBattleText: + text "If you groom them," + line "#MON get happy." + done + +HikerKennySeenText: + text "I should go to" + line "ROCK TUNNEL to get" + cont "myself an ONIX." + done + +HikerKennyBeatenText: + text "I lost…" + done + +HikerKennyAfterBattleText: + text "Geological fea-" + line "tures don't appear" + cont "to change." + + para "But they actually" + line "change, little by" + cont "little." + done + +Route13TrainerTipsText: + text "TRAINER TIPS" + + para "Look! Right there," + line "at the left side" + cont "of the post." + done + +Route13SignText: + text "ROUTE 13" + + para "NORTH TO SILENCE" + line "BRIDGE" + done + +Route13DirectionsSignText: + text "NORTH TO LAVENDER" + line "TOWN" + + para "WEST TO FUCHSIA" + line "CITY" + done + +Route13_MapEvents: + db 0, 0 ; filler + + def_warp_events + + def_coord_events + + def_bg_events + bg_event 29, 13, BGEVENT_READ, Route13TrainerTips + bg_event 41, 11, BGEVENT_READ, Route13Sign + bg_event 17, 13, BGEVENT_READ, Route13DirectionsSign + bg_event 30, 13, BGEVENT_ITEM, Route13HiddenCalcium + + def_object_events + object_event 42, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerBirdKeeperPerry, -1 + object_event 43, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerBirdKeeperBret, -1 + object_event 32, 8, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmJoshua, -1 + object_event 14, 10, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerHikerKenny, -1 + object_event 25, 6, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerPokefanmAlex, -1 diff --git a/maps/Route13.blk b/maps/Route13.blk new file mode 100644 index 0000000..a1947cc --- /dev/null +++ b/maps/Route13.blk @@ -0,0 +1,33 @@ + +M + + + + + + + + + + + + + + + + + + +nC +Mwwwwwwwwwwwwwwwwwwww YC +M1wwwwwwwwwwwww1www4 YC +Mwwwww1wwwww1wwwwww YC +Mw1wwwwwww1wwwww1w[C +Mwwww1wwwwwwww1wwVw1C +M111 +U +ww1wVwwwwwwwxxxxxC +M111 +UMQQQQjCCCCCC +M +UM.CCCCCkkkkkk \ No newline at end of file diff --git a/maps/Route14.asm b/maps/Route14.asm new file mode 100644 index 0000000..f4e2627 --- /dev/null +++ b/maps/Route14.asm @@ -0,0 +1,129 @@ + object_const_def + const ROUTE14_POKEFAN_M1 + const ROUTE14_YOUNGSTER + const ROUTE14_POKEFAN_M2 + const ROUTE14_KIM + +Route14_MapScripts: + def_scene_scripts + + def_callbacks + +Kim: + faceplayer + opentext + trade NPC_TRADE_KIM + waitbutton + closetext + end + +TrainerPokefanmCarter: + trainer POKEFANM, CARTER, EVENT_BEAT_POKEFANM_CARTER, PokefanmCarterSeenText, PokefanmCarterBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanmCarterAfterBattleText + waitbutton + closetext + end + +TrainerBirdKeeperRoy: + trainer BIRD_KEEPER, ROY, EVENT_BEAT_BIRD_KEEPER_ROY, BirdKeeperRoySeenText, BirdKeeperRoyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BirdKeeperRoyAfterBattleText + waitbutton + closetext + end + +TrainerPokefanmTrevor: + trainer POKEFANM, TREVOR, EVENT_BEAT_POKEFANM_TREVOR, PokefanmTrevorSeenText, PokefanmTrevorBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanmTrevorAfterBattleText + waitbutton + closetext + end + +PokefanmCarterSeenText: + text "Let me tell you," + line "I had a hard time" + + para "catching my prized" + line "#MON." + done + +PokefanmCarterBeatenText: + text "Awaaah!" + done + +PokefanmCarterAfterBattleText: + text "SQUIRTLE, CHARMAN-" + line "DER and BULBASAUR…" + + para "I think that's a" + line "well-balanced mix." + done + +BirdKeeperRoySeenText: + text "My dream is to fly" + line "with my beloved" + cont "bird #MON." + done + +BirdKeeperRoyBeatenText: + text "I can dream, but I" + line "can't ever fly…" + done + +BirdKeeperRoyAfterBattleText: + text "You have #MON" + line "that know the HM" + + para "move FLY, don't" + line "you? I envy you." + done + +PokefanmTrevorSeenText: + text "Hi. Did you know…?" + + para "#MON get more" + line "friendly if you" + + para "train them in a" + line "place that they" + cont "remember." + done + +PokefanmTrevorBeatenText: + text "Where did I meet" + line "this PSYDUCK?" + done + +PokefanmTrevorAfterBattleText: + text "If only there were" + line "an easy way to" + + para "identify where I" + line "got my #MON…" + done + +Route14_MapEvents: + db 0, 0 ; filler + + def_warp_events + + def_coord_events + + def_bg_events + + def_object_events + object_event 11, 15, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmCarter, -1 + object_event 11, 27, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBirdKeeperRoy, -1 + object_event 6, 11, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmTrevor, -1 + object_event 7, 5, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 4, Kim, -1 diff --git a/maps/Route14.blk b/maps/Route14.blk new file mode 100644 index 0000000..bfa56c5 --- /dev/null +++ b/maps/Route14.blk @@ -0,0 +1,61 @@ + +M mUM +M mUM +M mUMCC +MnmUMCC +M5 +UmUMCC +M + +UmU +cC +M + +UmU +MC +M + +U5U +MC +M + +UmU +MC + +UmU +MC + +UmU +MCUnUUU +U +MC5 + + + +U +MC + + + + + +U +MCUUUUUUU +MC + + + + + + + +MCQQQQQQQQQC + + + + + + + + +C \ No newline at end of file diff --git a/maps/Route15.asm b/maps/Route15.asm new file mode 100644 index 0000000..93cddf8 --- /dev/null +++ b/maps/Route15.asm @@ -0,0 +1,221 @@ + object_const_def + const ROUTE15_YOUNGSTER1 + const ROUTE15_YOUNGSTER2 + const ROUTE15_YOUNGSTER3 + const ROUTE15_YOUNGSTER4 + const ROUTE15_TEACHER1 + const ROUTE15_TEACHER2 + const ROUTE15_POKE_BALL + +Route15_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerTeacherColette: + trainer TEACHER, COLETTE, EVENT_BEAT_TEACHER_COLETTE, TeacherColetteSeenText, TeacherColetteBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext TeacherColetteAfterBattleText + waitbutton + closetext + end + +TrainerTeacherHillary: + trainer TEACHER, HILLARY, EVENT_BEAT_TEACHER_HILLARY, TeacherHillarySeenText, TeacherHillaryBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext TeacherHillaryAfterBattleText + waitbutton + closetext + end + +TrainerSchoolboyKipp: + trainer SCHOOLBOY, KIPP, EVENT_BEAT_SCHOOLBOY_KIP, SchoolboyKippSeenText, SchoolboyKippBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SchoolboyKippAfterBattleText + waitbutton + closetext + end + +TrainerSchoolboyTommy: + trainer SCHOOLBOY, TOMMY, EVENT_BEAT_SCHOOLBOY_TOMMY, SchoolboyTommySeenText, SchoolboyTommyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SchoolboyTommyAfterBattleText + waitbutton + closetext + end + +TrainerSchoolboyJohnny: + trainer SCHOOLBOY, JOHNNY, EVENT_BEAT_SCHOOLBOY_JOHNNY, SchoolboyJohnnySeenText, SchoolboyJohnnyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SchoolboyJohnnyAfterBattleText + waitbutton + closetext + end + +TrainerSchoolboyBilly: + trainer SCHOOLBOY, BILLY, EVENT_BEAT_SCHOOLBOY_BILLY, SchoolboyBillySeenText, SchoolboyBillyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SchoolboyBillyAfterBattleText + waitbutton + closetext + end + +Route15Sign: + jumptext Route15SignText + +Route15PPUp: + itemball PP_UP + +TeacherColetteSeenText: + text "Have you forgotten" + line "anything?" + done + +TeacherColetteBeatenText: + text "Kyaaah!" + done + +TeacherColetteAfterBattleText: + text "Before I became a" + line "teacher, I used to" + + para "forget a lot of" + line "things." + done + +TeacherHillarySeenText: + text "On sunny days, I" + line "think that the" + + para "kids would rather" + line "be playing in the" + + para "schoolyard than" + line "studying in class." + done + +TeacherHillaryBeatenText: + text "I didn't want to" + line "lose…" + done + +TeacherHillaryAfterBattleText: + text "Studying is impor-" + line "tant, but exercise" + cont "is just as vital." + done + +SchoolboyKippSeenText: + text "Hang on. I have to" + line "phone my mom." + done + +SchoolboyKippBeatenText: + text "Sorry, Mom!" + line "I was beaten!" + done + +SchoolboyKippAfterBattleText: + text "My mom worries so" + line "much about me, I" + + para "have to phone her" + line "all the time." + done + +SchoolboyTommySeenText: + text "Let's battle." + line "I won't lose!" + done + +SchoolboyTommyBeatenText: + text "I forgot to do my" + line "homework!" + done + +SchoolboyTommyAfterBattleText: + text "Sayonara! I just" + line "learned that in my" + cont "Japanese class." + done + +SchoolboyJohnnySeenText: + text "We're on a field" + line "trip to LAVENDER" + + para "RADIO TOWER for" + line "social studies." + done + +SchoolboyJohnnyBeatenText: + text "You're wickedly" + line "tough!" + done + +SchoolboyJohnnyAfterBattleText: + text "I'm tired of walk-" + line "ing. I need to" + cont "take a break." + done + +SchoolboyBillySeenText: + text "My favorite class" + line "is gym!" + done + +SchoolboyBillyBeatenText: + text "Oh, no!" + line "How could I lose?" + done + +SchoolboyBillyAfterBattleText: + text "If #MON were a" + line "subject at school," + cont "I'd be the best!" + done + +Route15SignText: + text "ROUTE 15" + + para "FUCHSIA CITY -" + line "LAVENDER TOWN" + done + +Route15_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 4, ROUTE_15_FUCHSIA_GATE, 3 + warp_event 2, 5, ROUTE_15_FUCHSIA_GATE, 4 + + def_coord_events + + def_bg_events + bg_event 19, 9, BGEVENT_READ, Route15Sign + + def_object_events + object_event 10, 10, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSchoolboyKipp, -1 + object_event 15, 13, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSchoolboyTommy, -1 + object_event 33, 10, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSchoolboyJohnny, -1 + object_event 27, 10, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSchoolboyBilly, -1 + object_event 30, 12, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerTeacherColette, -1 + object_event 20, 10, SPRITE_TEACHER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerTeacherHillary, -1 + object_event 12, 5, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route15PPUp, EVENT_ROUTE_15_PP_UP diff --git a/maps/Route15.blk b/maps/Route15.blk new file mode 100644 index 0000000..6512007 --- /dev/null +++ b/maps/Route15.blk @@ -0,0 +1,43 @@ + + +N + + + + + + + + + + + + + +!RPRRRRRRRRRRRRRR~UUUXUUUUUUUUUUUUUUQNUZ +NU 11tt t t +NUUUUUUUUUUUUUUUUl + +N1111111111111111 + + +QQQQQQQQQQQQQQQQQ + + + + + + + + + + + + + + + + + + + diff --git a/maps/Route15FuchsiaGate.asm b/maps/Route15FuchsiaGate.asm new file mode 100644 index 0000000..91a4f8d --- /dev/null +++ b/maps/Route15FuchsiaGate.asm @@ -0,0 +1,34 @@ + object_const_def + const ROUTE15FUCHSIAGATE_OFFICER + +Route15FuchsiaGate_MapScripts: + def_scene_scripts + + def_callbacks + +Route15FuchsiaGateOfficerScript: + jumptextfaceplayer Route15FuchsiaGateOfficerText + +Route15FuchsiaGateOfficerText: + text "You're working on" + line "a #DEX? That's" + + para "really something." + line "Don't give up!" + done + +Route15FuchsiaGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 4, FUCHSIA_CITY, 8 + warp_event 0, 5, FUCHSIA_CITY, 9 + warp_event 9, 4, ROUTE_15, 1 + warp_event 9, 5, ROUTE_15, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route15FuchsiaGateOfficerScript, -1 diff --git a/maps/Route16.asm b/maps/Route16.asm new file mode 100644 index 0000000..4d803de --- /dev/null +++ b/maps/Route16.asm @@ -0,0 +1,44 @@ +Route16_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, Route16AlwaysOnBikeCallback + +Route16AlwaysOnBikeCallback: + readvar VAR_YCOORD + ifless 5, .CanWalk + readvar VAR_XCOORD + ifgreater 13, .CanWalk + setflag ENGINE_ALWAYS_ON_BIKE + endcallback + +.CanWalk: + clearflag ENGINE_ALWAYS_ON_BIKE + endcallback + +CyclingRoadSign: + jumptext CyclingRoadSignText + +CyclingRoadSignText: + text "CYCLING ROAD" + + para "DOWNHILL COASTING" + line "ALL THE WAY!" + done + +Route16_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 1, ROUTE_16_FUCHSIA_SPEECH_HOUSE, 1 + warp_event 14, 6, ROUTE_16_GATE, 3 + warp_event 14, 7, ROUTE_16_GATE, 4 + warp_event 9, 6, ROUTE_16_GATE, 1 + warp_event 9, 7, ROUTE_16_GATE, 2 + + def_coord_events + + def_bg_events + bg_event 5, 5, BGEVENT_READ, CyclingRoadSign + + def_object_events diff --git a/maps/Route16.blk b/maps/Route16.blk new file mode 100644 index 0000000..20f2e14 --- /dev/null +++ b/maps/Route16.blk @@ -0,0 +1 @@ + wVww !27~jgCCdkk \ No newline at end of file diff --git a/maps/Route16FuchsiaSpeechHouse.asm b/maps/Route16FuchsiaSpeechHouse.asm new file mode 100644 index 0000000..6b9644a --- /dev/null +++ b/maps/Route16FuchsiaSpeechHouse.asm @@ -0,0 +1,37 @@ + object_const_def + const ROUTE16FUCHSIASPEECHHOUSE_SUPER_NERD + +Route16FuchsiaSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +Route16FuchsiaSpeechHouseSuperNerdScript: + jumptextfaceplayer Route16FuchsiaSpeechHouseSuperNerdText + +Route16FuchsiaSpeechHouseBookshelf: + jumpstd PictureBookshelfScript + +Route16FuchsiaSpeechHouseSuperNerdText: + text "If you cruise down" + line "CYCLING ROAD, you" + + para "will end up in" + line "FUCHSIA CITY." + done + +Route16FuchsiaSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ROUTE_16, 1 + warp_event 3, 7, ROUTE_16, 1 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, Route16FuchsiaSpeechHouseBookshelf + bg_event 1, 1, BGEVENT_READ, Route16FuchsiaSpeechHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route16FuchsiaSpeechHouseSuperNerdScript, -1 diff --git a/maps/Route16Gate.asm b/maps/Route16Gate.asm new file mode 100644 index 0000000..78ec39e --- /dev/null +++ b/maps/Route16Gate.asm @@ -0,0 +1,77 @@ + object_const_def + const ROUTE16GATE_OFFICER + +Route16Gate_MapScripts: + def_scene_scripts + scene_script Route16GateNoopScene, SCENE_ROUTE16GATE_BICYCLE_CHECK + + def_callbacks + +Route16GateNoopScene: + end + +Route16GateOfficerScript: + jumptextfaceplayer Route16GateOfficerText + +Route16GateBicycleCheck: + checkitem BICYCLE + iffalse .NoBicycle + end + +.NoBicycle: + showemote EMOTE_SHOCK, ROUTE16GATE_OFFICER, 15 + turnobject PLAYER, UP + opentext + writetext Route16GateCannotPassText + waitbutton + closetext + applymovement PLAYER, Route16GateCannotPassMovement + end + +Route16GateCannotPassMovement: + step RIGHT + turn_head LEFT + step_end + +Route16GateOfficerText: + text "CYCLING ROAD" + line "starts here." + + para "It's all downhill," + line "so it's totally" + cont "exhilarating." + + para "It's a great sort" + line "of feeling that" + + para "you can't get from" + line "a ship or train." + done + +Route16GateCannotPassText: + text "Hey! Whoa! Stop!" + + para "You can't go out" + line "on the CYCLING" + + para "ROAD without a" + line "BICYCLE." + done + +Route16Gate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 4, ROUTE_16, 4 + warp_event 0, 5, ROUTE_16, 5 + warp_event 9, 4, ROUTE_16, 2 + warp_event 9, 5, ROUTE_16, 3 + + def_coord_events + coord_event 5, 4, SCENE_ROUTE16GATE_BICYCLE_CHECK, Route16GateBicycleCheck + coord_event 5, 5, SCENE_ROUTE16GATE_BICYCLE_CHECK, Route16GateBicycleCheck + + def_bg_events + + def_object_events + object_event 5, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route16GateOfficerScript, -1 diff --git a/maps/Route17.asm b/maps/Route17.asm new file mode 100644 index 0000000..05f6479 --- /dev/null +++ b/maps/Route17.asm @@ -0,0 +1,150 @@ + object_const_def + const ROUTE17_BIKER1 + const ROUTE17_BIKER2 + const ROUTE17_BIKER3 + const ROUTE17_BIKER4 + +Route17_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, Route17AlwaysOnBikeCallback + +Route17AlwaysOnBikeCallback: + setflag ENGINE_ALWAYS_ON_BIKE + setflag ENGINE_DOWNHILL + endcallback + +TrainerBikerCharles: + trainer BIKER, CHARLES, EVENT_BEAT_BIKER_CHARLES, BikerCharlesSeenText, BikerCharlesBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BikerCharlesAfterBattleText + waitbutton + closetext + end + +TrainerBikerRiley: + trainer BIKER, RILEY, EVENT_BEAT_BIKER_RILEY, BikerRileySeenText, BikerRileyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BikerRileyAfterBattleText + waitbutton + closetext + end + +TrainerBikerJoel: + trainer BIKER, JOEL, EVENT_BEAT_BIKER_JOEL, BikerJoelSeenText, BikerJoelBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BikerJoelAfterBattleText + waitbutton + closetext + end + +TrainerBikerGlenn: + trainer BIKER, GLENN, EVENT_BEAT_BIKER_GLENN, BikerGlennSeenText, BikerGlennBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BikerGlennAfterBattleText + waitbutton + closetext + end + +Route17HiddenMaxEther: + hiddenitem MAX_ETHER, EVENT_ROUTE_17_HIDDEN_MAX_ETHER + +Route17HiddenMaxElixer: + hiddenitem MAX_ELIXER, EVENT_ROUTE_17_HIDDEN_MAX_ELIXER + +BikerRileySeenText: + text "Hey, you! You're" + line "from JOHTO, huh?" + done + +BikerRileyBeatenText: + text "Whoa, you kick!" + done + +BikerRileyAfterBattleText: + text "Don't get cocky," + line "you JOHTO punk!" + done + +BikerJoelSeenText: + text "Wow. That's a cool" + line "BICYCLE!" + done + +BikerJoelBeatenText: + text "But you don't just" + line "look cool…" + done + +BikerJoelAfterBattleText: + text "I look cool, but" + line "I'm weak, so I'm" + cont "not really cool." + + para "I have to train" + line "harder…" + done + +BikerGlennSeenText: + text "Hey! Want to have" + line "a speed battle?" + done + +BikerGlennBeatenText: + text "Yikes! You've got" + line "awesome torque!" + done + +BikerGlennAfterBattleText: + text "Hands-free riding" + line "is considered cool" + cont "on CYCLING ROAD." + done + +BikerCharlesSeenText: + text "We're fearless" + line "highway stars!" + done + +BikerCharlesBeatenText: + text "Arrrgh! Crash and" + line "burn!" + done + +BikerCharlesAfterBattleText: + text "Reckless driving" + line "causes accidents!" + cont "Take it easy!" + done + +Route17_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 17, 82, ROUTE_17_ROUTE_18_GATE, 1 + warp_event 17, 83, ROUTE_17_ROUTE_18_GATE, 2 + + def_coord_events + + def_bg_events + bg_event 9, 54, BGEVENT_ITEM, Route17HiddenMaxEther + bg_event 8, 77, BGEVENT_ITEM, Route17HiddenMaxElixer + + def_object_events + object_event 4, 17, SPRITE_BIKER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 4, TrainerBikerRiley, -1 + object_event 9, 68, SPRITE_BIKER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerBikerJoel, -1 + object_event 3, 53, SPRITE_BIKER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBikerGlenn, -1 + object_event 6, 80, SPRITE_BIKER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 4, TrainerBikerCharles, -1 diff --git a/maps/Route17.blk b/maps/Route17.blk new file mode 100644 index 0000000..77e783a --- /dev/null +++ b/maps/Route17.blk @@ -0,0 +1,52 @@ +N MN] + +] MN' + +' MN' + +' MCCN' + +' + +MkkN' + +' + + + +MN' + +' + + +]MN' + +'t'MN' + +'ed +'MN''edt'MN'ed'edt'MN'ed'ed +'MN'ed'ed +'MN'ed'edt'MN'ed'edt'MN'ed'edt'MN'ed'ed +'MN'ed'ed +'MN'ed'ed +'MN'ed'edt'MN'ed'edt'MN'ed'edt'MN'ed'edt'MN'ed'ed +'MN'ed'ed +'MN'ed'ed +'MN&##Eed +'MN' +.dt'MN' +eCCdt'MN' +eCCdt'MN' +eCCdt'MN' +eCCdt'MN' +eCCd +'MN' +eCCd +'MN&######"MN' + +'MN^ +eCCd +^MN +11 +111 +MPRR1w1RRROj111gCC\kk CC111117CCwwwwwCC-CCCCCCCCCC \ No newline at end of file diff --git a/maps/Route17Route18Gate.asm b/maps/Route17Route18Gate.asm new file mode 100644 index 0000000..b257963 --- /dev/null +++ b/maps/Route17Route18Gate.asm @@ -0,0 +1,68 @@ + object_const_def + const ROUTE17ROUTE18GATE_OFFICER + +Route17Route18Gate_MapScripts: + def_scene_scripts + scene_script Route17Route18GateNoopScene, SCENE_ROUTE17ROUTE18GATE_BICYCLE_CHECK + + def_callbacks + +Route17Route18GateNoopScene: + end + +Route17Route18GateOfficerScript: + jumptextfaceplayer Route17Route18GateOfficerText + +Route17Route18GateBicycleCheck: + checkitem BICYCLE + iffalse .NoBicycle + end + +.NoBicycle: + showemote EMOTE_SHOCK, ROUTE17ROUTE18GATE_OFFICER, 15 + turnobject PLAYER, UP + opentext + writetext Route17Route18GateCannotPassText + waitbutton + closetext + applymovement PLAYER, Route17Route18GateCannotPassMovement + end + +Route17Route18GateCannotPassMovement: + step RIGHT + turn_head LEFT + step_end + +Route17Route18GateOfficerText: + text "CYCLING ROAD" + line "Uphill Starts Here" + done + +Route17Route18GateCannotPassText: + text "Hang on! Don't you" + line "have a BICYCLE?" + + para "The CYCLING ROAD" + line "is beyond here." + + para "You have to have a" + line "BICYCLE to go on." + done + +Route17Route18Gate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 4, ROUTE_17, 1 + warp_event 0, 5, ROUTE_17, 2 + warp_event 9, 4, ROUTE_18, 1 + warp_event 9, 5, ROUTE_18, 2 + + def_coord_events + coord_event 5, 4, SCENE_ROUTE17ROUTE18GATE_BICYCLE_CHECK, Route17Route18GateBicycleCheck + coord_event 5, 5, SCENE_ROUTE17ROUTE18GATE_BICYCLE_CHECK, Route17Route18GateBicycleCheck + + def_bg_events + + def_object_events + object_event 5, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route17Route18GateOfficerScript, -1 diff --git a/maps/Route18.asm b/maps/Route18.asm new file mode 100644 index 0000000..ecad393 --- /dev/null +++ b/maps/Route18.asm @@ -0,0 +1,92 @@ + object_const_def + const ROUTE18_YOUNGSTER1 + const ROUTE18_YOUNGSTER2 + +Route18_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerBirdKeeperBoris: + trainer BIRD_KEEPER, BORIS, EVENT_BEAT_BIRD_KEEPER_BORIS, BirdKeeperBorisSeenText, BirdKeeperBorisBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BirdKeeperBorisAfterBattleText + waitbutton + closetext + end + +TrainerBirdKeeperBob: + trainer BIRD_KEEPER, BOB, EVENT_BEAT_BIRD_KEEPER_BOB, BirdKeeperBobSeenText, BirdKeeperBobBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BirdKeeperBobAfterBattleText + waitbutton + closetext + end + +Route18Sign: + jumptext Route18SignText + +BirdKeeperBorisSeenText: + text "If you're looking" + line "for #MON, you" + + para "have to look in" + line "the tall grass." + done + +BirdKeeperBorisBeatenText: + text "Ayieee!" + done + +BirdKeeperBorisAfterBattleText: + text "Since you're so" + line "strong, it must be" + cont "fun to battle." + done + +BirdKeeperBobSeenText: + text "CYCLING ROAD is a" + line "quick shortcut to" + cont "CELADON." + done + +BirdKeeperBobBeatenText: + text "…Whew!" + done + +BirdKeeperBobAfterBattleText: + text "If you don't have" + line "a BICYCLE, you're" + + para "not allowed to use" + line "the shortcut." + done + +Route18SignText: + text "ROUTE 18" + + para "CELADON CITY -" + line "FUCHSIA CITY" + done + +Route18_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 6, ROUTE_17_ROUTE_18_GATE, 3 + warp_event 2, 7, ROUTE_17_ROUTE_18_GATE, 4 + + def_coord_events + + def_bg_events + bg_event 9, 5, BGEVENT_READ, Route18Sign + + def_object_events + object_event 9, 12, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBirdKeeperBoris, -1 + object_event 13, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBirdKeeperBob, -1 diff --git a/maps/Route18.blk b/maps/Route18.blk new file mode 100644 index 0000000..67663c2 --- /dev/null +++ b/maps/Route18.blk @@ -0,0 +1,10 @@ +CCdN +CCdN + +!kVwwlll~bQQQ + + + +N bQQCdN NttCdbQQQQ@ttCdN +t +tttt \ No newline at end of file diff --git a/maps/Route19.asm b/maps/Route19.asm new file mode 100644 index 0000000..168c948 --- /dev/null +++ b/maps/Route19.asm @@ -0,0 +1,253 @@ + object_const_def + const ROUTE19_SWIMMER_GIRL + const ROUTE19_SWIMMER_GUY1 + const ROUTE19_SWIMMER_GUY2 + const ROUTE19_SWIMMER_GUY3 + const ROUTE19_FISHER1 + const ROUTE19_FISHER2 + +Route19_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_TILES, Route19ClearRocksCallback + +Route19ClearRocksCallback: + checkevent EVENT_CINNABAR_ROCKS_CLEARED + iftrue .Done + changeblock 6, 6, $7a ; rock + changeblock 8, 6, $7a ; rock + changeblock 10, 6, $7a ; rock + changeblock 12, 8, $7a ; rock + changeblock 4, 8, $7a ; rock + changeblock 10, 10, $7a ; rock +.Done: + endcallback + +TrainerSwimmerfDawn: + trainer SWIMMERF, DAWN, EVENT_BEAT_SWIMMERF_DAWN, SwimmerfDawnSeenText, SwimmerfDawnBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfDawnAfterBattleText + waitbutton + closetext + end + +TrainerSwimmermHarold: + trainer SWIMMERM, HAROLD, EVENT_BEAT_SWIMMERM_HAROLD, SwimmermHaroldSeenText, SwimmermHaroldBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermHaroldAfterBattleText + waitbutton + closetext + end + +TrainerSwimmermJerome: + trainer SWIMMERM, JEROME, EVENT_BEAT_SWIMMERM_JEROME, SwimmermJeromeSeenText, SwimmermJeromeBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermJeromeAfterBattleText + waitbutton + closetext + end + +TrainerSwimmermTucker: + trainer SWIMMERM, TUCKER, EVENT_BEAT_SWIMMERM_TUCKER, SwimmermTuckerSeenText, SwimmermTuckerBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermTuckerAfterBattleText + waitbutton + closetext + end + +Route19Fisher1Script: + faceplayer + opentext + checkevent EVENT_CINNABAR_ROCKS_CLEARED + iftrue .RocksCleared + writetext Route19Fisher1Text + waitbutton + closetext + end + +.RocksCleared: + writetext Route19Fisher1Text_RocksCleared + waitbutton + closetext + end + +Route19Fisher2Script: + faceplayer + opentext + checkevent EVENT_CINNABAR_ROCKS_CLEARED + iftrue .RocksCleared + writetext Route19Fisher2Text + waitbutton + closetext + end + +.RocksCleared: + writetext Route19Fisher2Text_RocksCleared + waitbutton + closetext + end + +Route19Sign: + jumptext Route19SignText + +CarefulSwimmingSign: + jumptext CarefulSwimmingSignText + +SwimmermHaroldSeenText: + text "Have you ever gone" + line "swimming in the" + cont "sea at night?" + done + +SwimmermHaroldBeatenText: + text "Glub…" + done + +SwimmermHaroldAfterBattleText: + text "At night, the sea" + line "turns black. It" + + para "feels like it will" + line "swallow you up." + done + +SwimmermTuckerSeenText: + text "Pant, pant…" + line "Just… a little…" + + para "farther… to…" + line "FUCHSIA…" + done + +SwimmermTuckerBeatenText: + text "I'm drowning!" + done + +SwimmermTuckerAfterBattleText: + text "I… asked my girl-" + line "friend to swim to" + cont "FUCHSIA… Gasp…" + done + +SwimmerfDawnSeenText: + text "I'm disgusted by" + line "wimpy people!" + done + +SwimmerfDawnBeatenText: + text "I could beat you" + line "at swimming…" + done + +SwimmerfDawnAfterBattleText: + text "It's a quick swim" + line "between FUCHSIA" + + para "and SEAFOAM IS-" + line "LANDS…" + + para "Sheesh, some big" + line "man my boyfriend" + + para "is! What a wimp!" + done + +SwimmermJeromeSeenText: + text "Swimming?" + line "I'm lousy at it." + + para "I'm just splashing" + line "around in these" + cont "shallow waters." + done + +SwimmermJeromeBeatenText: + text "I thought I could" + line "win." + done + +SwimmermJeromeAfterBattleText: + text "I might be bad at" + line "swimming, but I" + cont "love the sea." + done + +Route19Fisher1Text: + text "Sorry. This road" + line "is closed for" + cont "construction." + + para "If you want to get" + line "to CINNABAR, you'd" + + para "better go south" + line "from PALLET TOWN." + done + +Route19Fisher1Text_RocksCleared: + text "I'm all sweaty." + line "Time for a swim!" + done + +Route19Fisher2Text: + text "Who knows how long" + line "it would take to" + cont "move this boulder…" + done + +Route19Fisher2Text_RocksCleared: + text "The roadwork is" + line "finally finished." + + para "Now I can go" + line "fishing again." + done + +Route19SignText: + text "ROUTE 19" + + para "FUCHSIA CITY -" + line "SEAFOAM ISLANDS" + done + +CarefulSwimmingSignText: + text "Please be careful" + line "if you are swim-" + cont "ming to SEAFOAM" + cont "ISLANDS." + + para "FUCHSIA POLICE" + done + +Route19_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 3, ROUTE_19_FUCHSIA_GATE, 3 + + def_coord_events + + def_bg_events + bg_event 11, 13, BGEVENT_READ, Route19Sign + bg_event 11, 1, BGEVENT_READ, CarefulSwimmingSign + + def_object_events + object_event 9, 23, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 0, TrainerSwimmerfDawn, -1 + object_event 13, 28, SPRITE_SWIMMER_GUY, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermHarold, -1 + object_event 11, 17, SPRITE_SWIMMER_GUY, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermJerome, -1 + object_event 8, 23, SPRITE_SWIMMER_GUY, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, TrainerSwimmermTucker, -1 + object_event 9, 5, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 1, Route19Fisher1Script, -1 + object_event 11, 5, SPRITE_FISHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 1, Route19Fisher2Script, -1 diff --git a/maps/Route19.blk b/maps/Route19.blk new file mode 100644 index 0000000..3a29894 --- /dev/null +++ b/maps/Route19.blk @@ -0,0 +1 @@ +(,) !Vw(,)(,)|~11$W%$W%111CCCCCCCCCCCk1111kkCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCkkkkkkkkk \ No newline at end of file diff --git a/maps/Route19FuchsiaGate.asm b/maps/Route19FuchsiaGate.asm new file mode 100644 index 0000000..d1c6544 --- /dev/null +++ b/maps/Route19FuchsiaGate.asm @@ -0,0 +1,60 @@ + object_const_def + const ROUTE19FUCHSIAGATE_OFFICER + +Route19FuchsiaGate_MapScripts: + def_scene_scripts + + def_callbacks + +Route19FuchsiaGateOfficerScript: + faceplayer + opentext + checkevent EVENT_CINNABAR_ROCKS_CLEARED + iftrue .RocksCleared + writetext Route19FuchsiaGateOfficerText + waitbutton + closetext + end + +.RocksCleared: + writetext Route19FuchsiaGateOfficerText_RocksCleared + waitbutton + closetext + end + +Route19FuchsiaGateOfficerText: + text "CINNABAR's volcano" + line "erupted." + + para "It hurled boulders" + line "that cut off ROUTE" + cont "19 indefinitely." + + para "I wonder if the" + line "people of CINNABAR" + cont "are safe…" + done + +Route19FuchsiaGateOfficerText_RocksCleared: + text "No CINNABAR citi-" + line "zens were injured" + + para "by the eruption." + line "That's great!" + done + +Route19FuchsiaGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 0, FUCHSIA_CITY, 10 + warp_event 5, 0, FUCHSIA_CITY, 11 + warp_event 4, 7, ROUTE_19, 1 + warp_event 5, 7, ROUTE_19, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 0, 4, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route19FuchsiaGateOfficerScript, -1 diff --git a/maps/Route2.asm b/maps/Route2.asm new file mode 100644 index 0000000..045c3c2 --- /dev/null +++ b/maps/Route2.asm @@ -0,0 +1,175 @@ + object_const_def + const ROUTE2_BUG_CATCHER1 + const ROUTE2_BUG_CATCHER2 + const ROUTE2_BUG_CATCHER3 + const ROUTE2_POKE_BALL1 + const ROUTE2_POKE_BALL2 + const ROUTE2_POKE_BALL3 + const ROUTE2_POKE_BALL4 + const ROUTE2_FRUIT_TREE + +Route2_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerBugCatcherRob: + trainer BUG_CATCHER, ROB, EVENT_BEAT_BUG_CATCHER_ROB, BugCatcherRobSeenText, BugCatcherRobBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BugCatcherRobAfterBattleText + waitbutton + closetext + end + +TrainerBugCatcherEd: + trainer BUG_CATCHER, ED, EVENT_BEAT_BUG_CATCHER_ED, BugCatcherEdSeenText, BugCatcherEdBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BugCatcherEdAfterBattleText + waitbutton + closetext + end + +TrainerBugCatcherDoug: + trainer BUG_CATCHER, DOUG, EVENT_BEAT_BUG_CATCHER_DOUG, BugCatcherDougSeenText, BugCatcherDougBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BugCatcherDougAfterBattleText + waitbutton + closetext + end + +Route2Sign: + jumptext Route2SignText + +Route2DiglettsCaveSign: + jumptext Route2DiglettsCaveSignText + +Route2DireHit: + itemball DIRE_HIT + +Route2MaxPotion: + itemball MAX_POTION + +Route2Carbos: + itemball CARBOS + +Route2Elixer: + itemball ELIXER + +Route2FruitTree: + fruittree FRUITTREE_ROUTE_2 + +Route2HiddenMaxEther: + hiddenitem MAX_ETHER, EVENT_ROUTE_2_HIDDEN_MAX_ETHER + +Route2HiddenFullHeal: + hiddenitem FULL_HEAL, EVENT_ROUTE_2_HIDDEN_FULL_HEAL + +Route2HiddenFullRestore: + hiddenitem FULL_RESTORE, EVENT_ROUTE_2_HIDDEN_FULL_RESTORE + +Route2HiddenRevive: + hiddenitem REVIVE, EVENT_ROUTE_2_HIDDEN_REVIVE + +BugCatcherRobSeenText: + text "My bug #MON are" + line "tough. Prepare to" + cont "lose!" + done + +BugCatcherRobBeatenText: + text "I was whipped…" + done + +BugCatcherRobAfterBattleText: + text "I'm going to look" + line "for stronger bug" + cont "#MON." + done + +BugCatcherEdSeenText: + text "If you walk in" + line "tall grass wearing" + + para "shorts, do you get" + line "nicks and cuts?" + done + +BugCatcherEdBeatenText: + text "Ouch, ouch, ouch!" + done + +BugCatcherEdAfterBattleText: + text "They'll really" + line "sting when you" + cont "take a bath." + done + +BugCatcherDougSeenText: + text "Why don't girls" + line "like bug #MON?" + done + +BugCatcherDougBeatenText: + text "No good!" + done + +BugCatcherDougAfterBattleText: + text "Bug #MON squish" + line "like plush toys" + + para "when you squeeze" + line "their bellies." + + para "I love how they" + line "feel!" + done + +Route2SignText: + text "ROUTE 2" + + para "VIRIDIAN CITY -" + line "PEWTER CITY" + done + +Route2DiglettsCaveSignText: + text "DIGLETT'S CAVE" + done + +Route2_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 15, 15, ROUTE_2_NUGGET_HOUSE, 1 + warp_event 15, 31, ROUTE_2_GATE, 3 + warp_event 16, 27, ROUTE_2_GATE, 1 + warp_event 17, 27, ROUTE_2_GATE, 2 + warp_event 12, 7, DIGLETTS_CAVE, 3 + + def_coord_events + + def_bg_events + bg_event 7, 51, BGEVENT_READ, Route2Sign + bg_event 11, 9, BGEVENT_READ, Route2DiglettsCaveSign + bg_event 7, 23, BGEVENT_ITEM, Route2HiddenMaxEther + bg_event 4, 14, BGEVENT_ITEM, Route2HiddenFullHeal + bg_event 4, 27, BGEVENT_ITEM, Route2HiddenFullRestore + bg_event 11, 30, BGEVENT_ITEM, Route2HiddenRevive + + def_object_events + object_event 10, 45, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 5, TrainerBugCatcherRob, -1 + object_event 6, 4, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBugCatcherEd, -1 + object_event 0, 40, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBugCatcherDoug, -1 + object_event 0, 29, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route2DireHit, EVENT_ROUTE_2_DIRE_HIT + object_event 2, 23, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route2MaxPotion, EVENT_ROUTE_2_MAX_POTION + object_event 19, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route2Carbos, EVENT_ROUTE_2_CARBOS + object_event 14, 50, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route2Elixer, EVENT_ROUTE_2_ELIXER + object_event 10, 14, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route2FruitTree, -1 diff --git a/maps/Route2.blk b/maps/Route2.blk new file mode 100644 index 0000000..73d1a2d --- /dev/null +++ b/maps/Route2.blk @@ -0,0 +1,41 @@ + 1 + + + >??; +11111$W% +n2ll1tt +n + +11111lnll + +1nlnl + +1nnnnLL111nnnnmm2llnnnnmL/ononmm/mo + + +o +o +mOPl +l + +l T!n|}~ROMRR/UUUUUn + + + +n + +ttt n/t o4 + + + +ttnm + + +tlmt + +/4/ +tt1 +mtt + + +o4ooo \ No newline at end of file diff --git a/maps/Route20.asm b/maps/Route20.asm new file mode 100644 index 0000000..83c1be4 --- /dev/null +++ b/maps/Route20.asm @@ -0,0 +1,127 @@ + object_const_def + const ROUTE20_SWIMMER_GIRL1 + const ROUTE20_SWIMMER_GIRL2 + const ROUTE20_SWIMMER_GUY + +Route20_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, Route20ClearRocksCallback + +Route20ClearRocksCallback: + setevent EVENT_CINNABAR_ROCKS_CLEARED + endcallback + +TrainerSwimmerfNicole: + trainer SWIMMERF, NICOLE, EVENT_BEAT_SWIMMERF_NICOLE, SwimmerfNicoleSeenText, SwimmerfNicoleBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfNicoleAfterBattleText + waitbutton + closetext + end + +TrainerSwimmerfLori: + trainer SWIMMERF, LORI, EVENT_BEAT_SWIMMERF_LORI, SwimmerfLoriSeenText, SwimmerfLoriBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfLoriAfterBattleText + waitbutton + closetext + end + +TrainerSwimmermCameron: + trainer SWIMMERM, CAMERON, EVENT_BEAT_SWIMMERM_CAMERON, SwimmermCameronSeenText, SwimmermCameronBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermCameronAfterBattleText + waitbutton + closetext + end + +CinnabarGymSign: + jumptext CinnabarGymSignText + +SwimmerfNicoleSeenText: + text "I feel so much" + line "lighter in water." + done + +SwimmerfNicoleBeatenText: + text "Oh, no!" + done + +SwimmerfNicoleAfterBattleText: + text "Swimming exercises" + line "your full body." + + para "It's really good" + line "for you." + done + +SwimmerfLoriSeenText: + text "What an impressive" + line "collection of GYM" + + para "BADGES. We should" + line "battle!" + done + +SwimmerfLoriBeatenText: + text "No!" + done + +SwimmerfLoriAfterBattleText: + text "SURF is no longer" + line "the only HM move" + cont "you use in water." + done + +SwimmermCameronSeenText: + text "I guess it's im-" + line "possible to swim" + + para "all the way to" + line "JOHTO." + done + +SwimmermCameronBeatenText: + text "Aiyah!" + done + +SwimmermCameronAfterBattleText: + text "Besides the sea, I" + line "can also swim in" + cont "ponds and rivers." + done + +CinnabarGymSignText: + text "What does this" + line "sign say?" + + para "CINNABAR GYM" + line "LEADER: BLAINE" + done + +Route20_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 38, 7, SEAFOAM_GYM, 1 + + def_coord_events + + def_bg_events + bg_event 37, 11, BGEVENT_READ, CinnabarGymSign + + def_object_events + object_event 52, 8, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfNicole, -1 + object_event 45, 13, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfLori, -1 + object_event 12, 13, SPRITE_SWIMMER_GUY, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermCameron, -1 diff --git a/maps/Route20.blk b/maps/Route20.blk new file mode 100644 index 0000000..855c2a6 --- /dev/null +++ b/maps/Route20.blk @@ -0,0 +1 @@ +kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkeCCCCCCCCCCCd>?;1111eCCCCCCCCeCCCCCCCCCCCd$W%1>?;eCCCCCCCCeCCCCCCCCCCCd1111$%eCCCCCCCCeCCCCCCCCCd111111eCCCCCCCCeCCCCCxxCCCC-j1eCCCCCCCCeCCCCCCCCCCCkkkkC.CCCCCCCC.CCCCCCCCCCCCCCCCCCCCCCCCCCCCCkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk \ No newline at end of file diff --git a/maps/Route21.asm b/maps/Route21.asm new file mode 100644 index 0000000..3c5ea1d --- /dev/null +++ b/maps/Route21.asm @@ -0,0 +1,102 @@ + object_const_def + const ROUTE21_SWIMMER_GIRL + const ROUTE21_SWIMMER_GUY + const ROUTE21_FISHER + +Route21_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerSwimmermSeth: + trainer SWIMMERM, SETH, EVENT_BEAT_SWIMMERM_SETH, SwimmermSethSeenText, SwimmermSethBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermSethAfterBattleText + waitbutton + closetext + end + +TrainerSwimmerfNikki: + trainer SWIMMERF, NIKKI, EVENT_BEAT_SWIMMERF_NIKKI, SwimmerfNikkiSeenText, SwimmerfNikkiBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfNikkiAfterBattleText + waitbutton + closetext + end + +TrainerFisherArnold: + trainer FISHER, ARNOLD, EVENT_BEAT_FISHER_ARNOLD, FisherArnoldSeenText, FisherArnoldBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherArnoldAfterBattleText + waitbutton + closetext + end + +SwimmermSethSeenText: + text "Land ho! Gotta" + line "keep going!" + done + +SwimmermSethBeatenText: + text "Glug…" + done + +SwimmermSethAfterBattleText: + text "This arrogant guy" + line "was at CINNABAR's" + cont "volcano." + done + +SwimmerfNikkiSeenText: + text "If I win, you have" + line "to help me with my" + cont "suntan lotion!" + done + +SwimmerfNikkiBeatenText: + text "I'm worried about" + line "sunburn…" + done + +SwimmerfNikkiAfterBattleText: + text "I have to watch" + line "out for blemishes" + cont "caused by the sun." + done + +FisherArnoldSeenText: + text "I'm bored by fish-" + line "ing. Let's battle!" + done + +FisherArnoldBeatenText: + text "Utter failure…" + done + +FisherArnoldAfterBattleText: + text "I'll just go back" + line "to fishing…" + done + +Route21_MapEvents: + db 0, 0 ; filler + + def_warp_events + + def_coord_events + + def_bg_events + + def_object_events + object_event 11, 16, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfNikki, -1 + object_event 2, 30, SPRITE_SWIMMER_GUY, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerSwimmermSeth, -1 + object_event 14, 22, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherArnold, -1 diff --git a/maps/Route21.blk b/maps/Route21.blk new file mode 100644 index 0000000..bde7b62 --- /dev/null +++ b/maps/Route21.blk @@ -0,0 +1,4 @@ +QcedQQQbQQtMed Nt +tMed N + +j.-gCCCCCCCCkCCCCCkkCCCCCCCCCCCCCCCxxCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCxxCCCCCCCCCCCCCCCCCCCCCCCkCCCCCCCCCCCCCCCC \ No newline at end of file diff --git a/maps/Route22.asm b/maps/Route22.asm new file mode 100644 index 0000000..fa21816 --- /dev/null +++ b/maps/Route22.asm @@ -0,0 +1,27 @@ +Route22_MapScripts: + def_scene_scripts + + def_callbacks + +VictoryRoadEntranceSign: + jumptext VictoryRoadEntranceSignText + +VictoryRoadEntranceSignText: + text "#MON LEAGUE" + + para "VICTORY ROAD" + line "ENTRANCE" + done + +Route22_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 13, 5, VICTORY_ROAD_GATE, 1 + + def_coord_events + + def_bg_events + bg_event 15, 7, BGEVENT_READ, VictoryRoadEntranceSign + + def_object_events diff --git a/maps/Route22.blk b/maps/Route22.blk new file mode 100644 index 0000000..4d2d9bb --- /dev/null +++ b/maps/Route22.blk @@ -0,0 +1,3 @@ +,,,,,+WW*,,,,,+WWW*,,,,,,) !$WWWWW%/(,,,,,,)|~UUUUUUUUU$W,,,,,)1>;/b + +,,,,,)\ ed() N,,,,,)11 UU() N>,,,,,)RRR$%/(,,,,,,??;UUUUUUUUUU(,,,,,,,,,??????????, \ No newline at end of file diff --git a/maps/Route23.asm b/maps/Route23.asm new file mode 100644 index 0000000..e09f8f9 --- /dev/null +++ b/maps/Route23.asm @@ -0,0 +1,37 @@ +Route23_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, Route23FlypointCallback + +Route23FlypointCallback: + setflag ENGINE_FLYPOINT_INDIGO_PLATEAU + endcallback + +IndigoPlateauSign: + jumptext IndigoPlateauSignText + +IndigoPlateauSignText: + text "INDIGO PLATEAU" + + para "The Ultimate Goal" + line "for Trainers!" + + para "#MON LEAGUE HQ" + done + +Route23_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 5, INDIGO_PLATEAU_POKECENTER_1F, 1 + warp_event 10, 5, INDIGO_PLATEAU_POKECENTER_1F, 2 + warp_event 9, 13, VICTORY_ROAD, 10 + warp_event 10, 13, VICTORY_ROAD, 10 + + def_coord_events + + def_bg_events + bg_event 11, 7, BGEVENT_READ, IndigoPlateauSign + + def_object_events diff --git a/maps/Route23.blk b/maps/Route23.blk new file mode 100644 index 0000000..ef76b03 --- /dev/null +++ b/maps/Route23.blk @@ -0,0 +1,9 @@ +111hi111111hi11111 +7S:~ +1111 +m1n +11 +m11n + +m11n +mFJn>??>????,>?>?,,>???,, \ No newline at end of file diff --git a/maps/Route24.asm b/maps/Route24.asm new file mode 100644 index 0000000..826cfae --- /dev/null +++ b/maps/Route24.asm @@ -0,0 +1,129 @@ + object_const_def + const ROUTE24_ROCKET + +Route24_MapScripts: + def_scene_scripts + + def_callbacks + +Route24RocketScript: + faceplayer + playmusic MUSIC_ROCKET_ENCOUNTER + opentext + writetext Route24RocketSeenText + waitbutton + closetext + winlosstext Route24RocketBeatenText, -1 + loadtrainer GRUNTM, GRUNTM_31 + startbattle + dontrestartmapmusic + reloadmapafterbattle + playmusic MUSIC_ROCKET_ENCOUNTER + opentext + writetext Route24RocketAfterBattleText + promptbutton + special FadeOutMusic + writetext Route24RocketDisappearsText + waitbutton + closetext + special FadeBlackQuickly + special ReloadSpritesNoPalettes + disappear ROUTE24_ROCKET + pause 25 + special FadeInQuickly + playmapmusic + end + +Route24RocketSeenText: + text "Hey, kid! Me am a" + line "TEAM ROCKET member" + cont "kind of guy!" + + para "Come from another" + line "country, a trainer" + cont "number one, me!" + + para "Think I did, if" + line "stop the energy," + + para "be big panic for" + line "here people!" + + para "Secret it is my" + line "mission, so tell" + cont "you I not!" + + para "But! If win you do" + line "versus me, a man I" + + para "be and mine secret" + line "to you I tell." + + para "Hey, kid! Battle" + line "begin we do!" + done + +Route24RocketBeatenText: + text "Ayieeeh! No, no," + line "no, believe it I" + cont "can't!" + + para "Strong very much" + line "be you! Match I am" + cont "not to you!" + done + +Route24RocketAfterBattleText: + text "OK. Tell you mine" + line "secret will I." + + para "MACHINE PART steal" + line "by me, hide it I" + + para "did in GYM of the" + line "CERULEAN." + + para "Inside water put" + line "it I did. Look for" + + para "in water center of" + line "GYM at." + + para "But you forget me" + line "not!" + + para "Beat you for sure" + line "will TEAM ROCKET." + + para "Come from JOHTO" + line "will they, mine" + + para "friends, yes. Will" + line "revenge they are." + done + +Route24RocketDisappearsText: + text "…" + + para "You say what? TEAM" + line "ROCKET bye-bye a" + + para "go-go? Broken it" + line "is says you?" + + para "Oh, no! Should I" + line "do what now on" + cont "from, me?" + done + +Route24_MapEvents: + db 0, 0 ; filler + + def_warp_events + + def_coord_events + + def_bg_events + + def_object_events + object_event 8, 7, SPRITE_ROCKET, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route24RocketScript, EVENT_ROUTE_24_ROCKET diff --git a/maps/Route24.blk b/maps/Route24.blk new file mode 100644 index 0000000..99b5107 --- /dev/null +++ b/maps/Route24.blk @@ -0,0 +1,10 @@ +) eN +(,,) eN +$WW) eN +CC)/eN +CC)1CN +CC)1CN +CC)1CN +CC,;CN +CC,)CN +CC \ No newline at end of file diff --git a/maps/Route25.asm b/maps/Route25.asm new file mode 100644 index 0000000..99c7e2d --- /dev/null +++ b/maps/Route25.asm @@ -0,0 +1,455 @@ + object_const_def + const ROUTE25_MISTY + const ROUTE25_COOLTRAINER_M1 + const ROUTE25_YOUNGSTER1 + const ROUTE25_LASS1 + const ROUTE25_YOUNGSTER2 + const ROUTE25_LASS2 + const ROUTE25_YOUNGSTER3 + const ROUTE25_LASS3 + const ROUTE25_SUPER_NERD + const ROUTE25_COOLTRAINER_M2 + const ROUTE25_POKE_BALL + +Route25_MapScripts: + def_scene_scripts + scene_script Route25Noop1Scene, SCENE_ROUTE25_NOOP + scene_script Route25Noop2Scene, SCENE_ROUTE25_MISTYS_DATE + + def_callbacks + +Route25Noop1Scene: + end + +Route25Noop2Scene: + end + +Route25MistyDate1Script: + showemote EMOTE_HEART, ROUTE25_MISTY, 15 + pause 30 + showemote EMOTE_SHOCK, ROUTE25_COOLTRAINER_M1, 10 + turnobject ROUTE25_MISTY, DOWN + applymovement ROUTE25_COOLTRAINER_M1, Route25MistysDateLeavesMovement1 + disappear ROUTE25_COOLTRAINER_M1 + pause 15 + playmusic MUSIC_BEAUTY_ENCOUNTER + turnobject ROUTE25_MISTY, UP + pause 10 + applymovement ROUTE25_MISTY, Route25MistyApproachesPlayerMovement1 + opentext + writetext Route25MistyDateText + waitbutton + closetext + turnobject PLAYER, DOWN + applymovement ROUTE25_MISTY, Route25MistyLeavesPlayerMovement1 + turnobject PLAYER, LEFT + applymovement ROUTE25_MISTY, Route25MistyLeavesMovement + disappear ROUTE25_MISTY + clearevent EVENT_TRAINERS_IN_CERULEAN_GYM + setscene SCENE_ROUTE25_NOOP + special RestartMapMusic + end + +Route25MistyDate2Script: + showemote EMOTE_HEART, ROUTE25_MISTY, 15 + pause 30 + showemote EMOTE_SHOCK, ROUTE25_COOLTRAINER_M1, 10 + turnobject ROUTE25_MISTY, DOWN + applymovement ROUTE25_COOLTRAINER_M1, Route25MistysDateLeavesMovement2 + disappear ROUTE25_COOLTRAINER_M1 + pause 15 + playmusic MUSIC_BEAUTY_ENCOUNTER + turnobject ROUTE25_MISTY, UP + pause 10 + applymovement ROUTE25_MISTY, Route25MistyApproachesPlayerMovement2 + opentext + writetext Route25MistyDateText + waitbutton + closetext + turnobject PLAYER, UP + applymovement ROUTE25_MISTY, Route25MistyLeavesPlayerMovement2 + turnobject PLAYER, LEFT + applymovement ROUTE25_MISTY, Route25MistyLeavesMovement + disappear ROUTE25_MISTY + clearevent EVENT_TRAINERS_IN_CERULEAN_GYM + setscene SCENE_ROUTE25_NOOP + special RestartMapMusic + end + +TrainerSchoolboyDudley: + trainer SCHOOLBOY, DUDLEY, EVENT_BEAT_SCHOOLBOY_DUDLEY, SchoolboyDudleySeenText, SchoolboyDudleyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SchoolboyDudleyAfterBattleText + waitbutton + closetext + end + +TrainerLassEllen: + trainer LASS, ELLEN, EVENT_BEAT_LASS_ELLEN, LassEllenSeenText, LassEllenBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext LassEllenAfterBattleText + waitbutton + closetext + end + +TrainerSchoolboyJoe: + trainer SCHOOLBOY, JOE, EVENT_BEAT_SCHOOLBOY_JOE, SchoolboyJoeSeenText, SchoolboyJoeBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SchoolboyJoeAfterBattleText + waitbutton + closetext + end + +TrainerLassLaura: + trainer LASS, LAURA, EVENT_BEAT_LASS_LAURA, LassLauraSeenText, LassLauraBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext LassLauraAfterBattleText + waitbutton + closetext + end + +TrainerCamperLloyd: + trainer CAMPER, LLOYD, EVENT_BEAT_CAMPER_LLOYD, CamperLloydSeenText, CamperLloydBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CamperLloydAfterBattleText + waitbutton + closetext + end + +TrainerLassShannon: + trainer LASS, SHANNON, EVENT_BEAT_LASS_SHANNON, LassShannonSeenText, LassShannonBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext LassShannonAfterBattleText + waitbutton + closetext + end + +TrainerSupernerdPat: + trainer SUPER_NERD, PAT, EVENT_BEAT_SUPER_NERD_PAT, SupernerdPatSeenText, SupernerdPatBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SupernerdPatAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainermKevin: + faceplayer + opentext + checkevent EVENT_BEAT_COOLTRAINERM_KEVIN + iftrue .AfterBattle + checkevent EVENT_CLEARED_NUGGET_BRIDGE + iftrue .AfterNuggetBridge + writetext CooltrainermKevinNuggetText + promptbutton + verbosegiveitem NUGGET + iffalse .NoRoomForNugget + setevent EVENT_CLEARED_NUGGET_BRIDGE +.AfterNuggetBridge: + writetext CooltrainermKevinSeenText + waitbutton + closetext + winlosstext CooltrainermKevinBeatenText, 0 + loadtrainer COOLTRAINERM, KEVIN + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_COOLTRAINERM_KEVIN + opentext +.AfterBattle: + writetext CooltrainermKevinAfterBattleText + waitbutton +.NoRoomForNugget: + closetext + end + +BillsHouseSign: + jumptext BillsHouseSignText + +Route25Protein: + itemball PROTEIN + +Route25HiddenPotion: + hiddenitem POTION, EVENT_ROUTE_25_HIDDEN_POTION + +Route25MistysDateLeavesMovement1: + big_step DOWN + step_end + +Route25MistysDateLeavesMovement2: + big_step DOWN + big_step DOWN + step_end + +Route25MistyApproachesPlayerMovement1: + step UP + step UP + step UP + step LEFT + step LEFT + step LEFT + step_end + +Route25MistyApproachesPlayerMovement2: + step UP + step UP + step LEFT + step LEFT + step LEFT + step_end + +Route25MistyLeavesPlayerMovement1: + step DOWN + step LEFT + step_end + +Route25MistyLeavesPlayerMovement2: + step UP + step LEFT + step_end + +Route25MistyLeavesMovement: + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step_end + +Route25MistyDateText: + text "MISTY: Aww! Why" + line "did you have to" + + para "show up and bug us" + line "now?" + + para "Do you know what" + line "they call people" + cont "like you?" + + para "Pests! You heard" + line "me right, pest!" + + para "…" + + para "…Oh? Those BADGES" + line "you have… Are they" + cont "JOHTO GYM BADGES?" + + para "If you have eight," + line "you must be good." + + para "OK, then. Come to" + line "CERULEAN GYM." + + para "I'll be happy to" + line "take you on." + + para "I'm MISTY, the" + line "GYM LEADER in" + cont "CERULEAN." + done + +SchoolboyDudleySeenText: + text "Beat the six of us" + line "trainers to win a" + cont "fabulous prize!" + + para "Think you've got" + line "what it takes?" + done + +SchoolboyDudleyBeatenText: + text "Whoo! Good stuff." + done + +SchoolboyDudleyAfterBattleText: + text "I did my best." + line "I have no regrets." + done + +LassEllenSeenText: + text "I'm second." + line "Now it's serious!" + done + +LassEllenBeatenText: + text "How could I lose?" + done + +LassEllenAfterBattleText: + text "I did my best." + line "I have no regrets." + done + +SchoolboyJoeSeenText: + text "Here's No. 3!" + line "I won't be easy." + done + +SchoolboyJoeBeatenText: + text "Ow! Stomped flat!" + done + +SchoolboyJoeAfterBattleText: + text "I did my best." + line "I have no regrets." + done + +LassLauraSeenText: + text "I'm No. 4!" + line "Getting tired?" + done + +LassLauraBeatenText: + text "I lost too…" + done + +LassLauraAfterBattleText: + text "I did my best." + line "I have no regrets." + done + +CamperLloydSeenText: + text "OK! I'm No. 5." + line "I'll stomp you!" + done + +CamperLloydBeatenText: + text "Whoa! Too much." + done + +CamperLloydAfterBattleText: + text "I did my best." + line "I have no regrets." + done + +LassShannonSeenText: + text "I'm the last in" + line "line, but I tell" + cont "you, I'm tough!" + done + +LassShannonBeatenText: + text "You're kidding." + done + +LassShannonAfterBattleText: + text "I did my best." + line "I have no regrets." + done + +SupernerdPatSeenText: + text "Mufufufu…" + + para "I have nothing to" + line "do with the six-" + cont "pack trainers." + + para "I waited here to" + line "beat you when you" + + para "were tired out by" + line "all the battles." + done + +SupernerdPatBeatenText: + text "Aren't you tired" + line "at all?" + done + +SupernerdPatAfterBattleText: + text "I'm sorry… I won't" + line "cheat anymore…" + done + +CooltrainermKevinNuggetText: + text "You took on one" + line "more battle than" + + para "you expected, but" + line "you won anyway." + + para "As promised, you" + line "win a prize." + done + +CooltrainermKevinSeenText: + text "But after seeing" + line "how you battle, I" + + para "want to see how" + line "I'll fare." + + para "How about it? Let" + line "me take you on." + done + +CooltrainermKevinBeatenText: + text "I've never had a" + line "battle this good!" + done + +CooltrainermKevinAfterBattleText: + text "That was a great" + line "battle!" + + para "You and your #-" + line "MON are truly out-" + cont "standing!" + done + +BillsHouseSignText: + text "SEA COTTAGE" + line "BILL'S HOUSE" + done + +UnusedBillsHouseSignText: ; unreferenced + text "BILL'S HOUSE" + done + +Route25_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 47, 5, BILLS_HOUSE, 1 + + def_coord_events + coord_event 42, 6, SCENE_ROUTE25_MISTYS_DATE, Route25MistyDate1Script + coord_event 42, 7, SCENE_ROUTE25_MISTYS_DATE, Route25MistyDate2Script + + def_bg_events + bg_event 45, 5, BGEVENT_READ, BillsHouseSign + bg_event 4, 5, BGEVENT_ITEM, Route25HiddenPotion + + def_object_events + object_event 46, 9, SPRITE_MISTY, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ROUTE_25_MISTY_BOYFRIEND + object_event 46, 10, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ROUTE_25_MISTY_BOYFRIEND + object_event 12, 8, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSchoolboyDudley, -1 + object_event 16, 11, SPRITE_LASS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerLassEllen, -1 + object_event 21, 8, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerSchoolboyJoe, -1 + object_event 22, 6, SPRITE_LASS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerLassLaura, -1 + object_event 25, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerCamperLloyd, -1 + object_event 28, 11, SPRITE_LASS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerLassShannon, -1 + object_event 31, 7, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerSupernerdPat, -1 + object_event 37, 8, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, TrainerCooltrainermKevin, -1 + object_event 32, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route25Protein, EVENT_ROUTE_25_PROTEIN diff --git a/maps/Route25.blk b/maps/Route25.blk new file mode 100644 index 0000000..f5e52af --- /dev/null +++ b/maps/Route25.blk @@ -0,0 +1,25 @@ +,,,,,,,,,,,,,,,,,,,,,,+WW*,,,)+WWWWWWWWWWWWWWWWWWWWW%89$WWW%)tLtY1X + +o + +n + +nttMwV<=wwRCC)/[1ZL +Lonll4ttttUUUU +MCC)1111111111lLnn +otttMMCC) +tt1 + + + + + +mln +ntttROeCCdMCC)tt +bQQQQQQQQQQQQQ@RRRRRRROCC) + + +N +>???????????;CC) +jN +(,,,,,,,,,,,)CCCCCCCCCC \ No newline at end of file diff --git a/maps/Route26.asm b/maps/Route26.asm new file mode 100644 index 0000000..77677df --- /dev/null +++ b/maps/Route26.asm @@ -0,0 +1,434 @@ + object_const_def + const ROUTE26_COOLTRAINER_M1 + const ROUTE26_COOLTRAINER_M2 + const ROUTE26_COOLTRAINER_F1 + const ROUTE26_COOLTRAINER_F2 + const ROUTE26_YOUNGSTER + const ROUTE26_FISHER + const ROUTE26_FRUIT_TREE + const ROUTE26_POKE_BALL + +Route26_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerCooltrainermJake: + trainer COOLTRAINERM, JAKE, EVENT_BEAT_COOLTRAINERM_JAKE, CooltrainermJakeSeenText, CooltrainermJakeBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainermJakeAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainermGaven3: + trainer COOLTRAINERM, GAVEN3, EVENT_BEAT_COOLTRAINERM_GAVEN, CooltrainermGaven3SeenText, CooltrainermGaven3BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_COOLTRAINERM_GAVEN + endifjustbattled + opentext + checkflag ENGINE_GAVEN_READY_FOR_REMATCH + iftrue .WantsBattle + checkcellnum PHONE_COOLTRAINERM_GAVEN + iftrue .NumberAccepted + checkevent EVENT_GAVEN_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext CooltrainermGavenAfterText + promptbutton + setevent EVENT_GAVEN_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .AskForNumber + +.AskedAlready: + scall .AskNumber2 +.AskForNumber: + askforphonenumber PHONE_COOLTRAINERM_GAVEN + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, COOLTRAINERM, GAVEN3 + scall .RegisteredNumber + sjump .NumberAccepted + +.WantsBattle: + scall .Rematch + winlosstext CooltrainermGaven3BeatenText, 0 + readmem wGavenFightCount + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight2: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight2 +.Fight1: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight1 +.LoadFight0: + loadtrainer COOLTRAINERM, GAVEN3 + startbattle + reloadmapafterbattle + loadmem wGavenFightCount, 1 + clearflag ENGINE_GAVEN_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer COOLTRAINERM, GAVEN1 + startbattle + reloadmapafterbattle + loadmem wGavenFightCount, 2 + clearflag ENGINE_GAVEN_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer COOLTRAINERM, GAVEN2 + startbattle + reloadmapafterbattle + clearflag ENGINE_GAVEN_READY_FOR_REMATCH + end + +.AskNumber1: + jumpstd AskNumber1MScript + end + +.AskNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberMScript + end + +.NumberAccepted: + jumpstd NumberAcceptedMScript + end + +.NumberDeclined: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.Rematch: + jumpstd RematchMScript + end + +TrainerCooltrainerfJoyce: + trainer COOLTRAINERF, JOYCE, EVENT_BEAT_COOLTRAINERF_JOYCE, CooltrainerfJoyceSeenText, CooltrainerfJoyceBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainerfJoyceAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainerfBeth1: + trainer COOLTRAINERF, BETH1, EVENT_BEAT_COOLTRAINERF_BETH, CooltrainerfBeth1SeenText, CooltrainerfBeth1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_COOLTRAINERF_BETH + endifjustbattled + opentext + checkflag ENGINE_BETH_READY_FOR_REMATCH + iftrue .WantsBattle + checkcellnum PHONE_COOLTRAINERF_BETH + iftrue .NumberAccepted + checkevent EVENT_BETH_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext CooltrainerfBethAfterText + promptbutton + setevent EVENT_BETH_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .AskForNumber + +.AskedAlready: + scall .AskNumber2 +.AskForNumber: + askforphonenumber PHONE_COOLTRAINERF_BETH + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, COOLTRAINERF, BETH1 + scall .RegisteredNumber + sjump .NumberAccepted + +.WantsBattle: + scall .Rematch + winlosstext CooltrainerfBeth1BeatenText, 0 + readmem wBethFightCount + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight2: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight2 +.Fight1: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight1 +.LoadFight0: + loadtrainer COOLTRAINERF, BETH1 + startbattle + reloadmapafterbattle + loadmem wBethFightCount, 1 + clearflag ENGINE_BETH_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer COOLTRAINERF, BETH2 + startbattle + reloadmapafterbattle + loadmem wBethFightCount, 2 + clearflag ENGINE_BETH_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer COOLTRAINERF, BETH3 + startbattle + reloadmapafterbattle + clearflag ENGINE_BETH_READY_FOR_REMATCH + end + +.AskNumber1: + jumpstd AskNumber1FScript + end + +.AskNumber2: + jumpstd AskNumber2FScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberFScript + end + +.NumberAccepted: + jumpstd NumberAcceptedFScript + end + +.NumberDeclined: + jumpstd NumberDeclinedFScript + end + +.PhoneFull: + jumpstd PhoneFullFScript + end + +.Rematch: + jumpstd RematchFScript + end + +TrainerPsychicRichard: + trainer PSYCHIC_T, RICHARD, EVENT_BEAT_PSYCHIC_RICHARD, PsychicRichardSeenText, PsychicRichardBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PsychicRichardAfterBattleText + waitbutton + closetext + end + +TrainerFisherScott: + trainer FISHER, SCOTT, EVENT_BEAT_FISHER_SCOTT, FisherScottSeenText, FisherScottBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherScottAfterBattleText + waitbutton + closetext + end + +Route26Sign: + jumptext Route26SignText + +Route26FruitTree: + fruittree FRUITTREE_ROUTE_26 + +Route26MaxElixer: + itemball MAX_ELIXER + +CooltrainermJakeSeenText: + text "I'm making my" + line "final preparations" + + para "for the #MON" + line "LEAGUE." + done + +CooltrainermJakeBeatenText: + text "I blew it!" + done + +CooltrainermJakeAfterBattleText: + text "It's going to be" + line "tough to win at" + cont "the LEAGUE." + + para "I need to do some" + line "more training." + + para "I hear that the" + line "LEAGUE's ELITE" + + para "FOUR are tougher" + line "than GYM LEADERS." + done + +CooltrainermGaven3SeenText: + text "By experiencing" + line "tough battles, you" + cont "gain power." + done + +CooltrainermGaven3BeatenText: + text "Gaah! Life is even" + line "tougher!" + done + +CooltrainermGavenAfterText: + text "To get to #MON" + line "LEAGUE, you have" + + para "to get through" + line "VICTORY ROAD." + + para "But VICTORY ROAD" + line "is tough." + + para "Practically nobody" + line "goes there!" + done + +CooltrainerfJoyceSeenText: + text "Since you've come" + line "this far, you must" + cont "be good." + + para "I'm going to give" + line "this battle every-" + cont "thing I've got!" + done + +CooltrainerfJoyceBeatenText: + text "No! I don't" + line "believe this!" + done + +CooltrainerfJoyceAfterBattleText: + text "I've defeated" + line "eight GYM LEADERS," + + para "so I was feeling" + line "confident." + + para "I'll have to try" + line "harder next time." + done + +CooltrainerfBeth1SeenText: + text "I lost to a train-" + line "er named ." + + para "He was really" + line "strong, but…" + + para "It was as if he" + line "absolutely had to" + cont "win at any cost." + + para "I felt sorry for" + line "his #MON." + done + +CooltrainerfBeth1BeatenText: + text "#MON aren't" + line "tools of war." + done + +CooltrainerfBethAfterText: + text "#MON are in-" + line "valuable, lifelong" + cont "partners." + done + +PsychicRichardSeenText: + text "Wow, look at all" + line "those BADGES!" + cont "I'm impressed." + + para "But you're not" + line "satisfied by just" + + para "collecting them," + line "right?" + done + +PsychicRichardBeatenText: + text "Good battle!" + done + +PsychicRichardAfterBattleText: + text "People and #MON" + line "grow from their" + cont "experiences." + + para "Don't get lazy and" + line "complacent." + done + +FisherScottSeenText: + text "I'm feeling great" + line "today!" + + para "I feel like I" + line "could boot even" + cont "the LEAGUE CHAMP!" + done + +FisherScottBeatenText: + text "No! Not in this" + line "battle!" + done + +FisherScottAfterBattleText: + text "Just like in fish-" + line "ing, it's all over" + + para "in #MON if you" + line "give up." + done + +Route26SignText: + text "ROUTE 26" + + para "#MON LEAGUE" + line "RECEPTION GATE" + done + +Route26_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 5, VICTORY_ROAD_GATE, 3 + warp_event 15, 57, ROUTE_26_HEAL_HOUSE, 1 + warp_event 5, 71, DAY_OF_WEEK_SIBLINGS_HOUSE, 1 + + def_coord_events + + def_bg_events + bg_event 8, 6, BGEVENT_READ, Route26Sign + + def_object_events + object_event 14, 24, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerCooltrainermJake, -1 + object_event 9, 38, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainermGaven3, -1 + object_event 10, 56, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfJoyce, -1 + object_event 5, 8, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerCooltrainerfBeth1, -1 + object_event 13, 79, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPsychicRichard, -1 + object_event 10, 92, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerFisherScott, -1 + object_event 14, 54, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route26FruitTree, -1 + object_event 9, 15, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route26MaxElixer, EVENT_ROUTE_26_MAX_ELIXER diff --git a/maps/Route26.blk b/maps/Route26.blk new file mode 100644 index 0000000..81a0a62 --- /dev/null +++ b/maps/Route26.blk @@ -0,0 +1,20 @@ +qqqqqqqqqqqqonqqqqqqihqqqqqomElrnqqqihqqqiWWjkhqokiWWlmlniii + +hiiiWWjkhiiiWWhqkhiiilrmhiiiWWW +hiiihiii +jqiiijppqommihorrmqihi +vvvqilmX +55qi +Ty65 +qiX5655qi +jppkXqqklnqi +qqi +hqqpqqilrrrqom + +qi +qi + +qiqiqiWWWVVom +ii +iiiWmWWRWWWTvUWX5YX5z +vveX5655XC5655vvvy5565555655CCCCC5615511111115555555555555 \ No newline at end of file diff --git a/maps/Route26HealHouse.asm b/maps/Route26HealHouse.asm new file mode 100644 index 0000000..1135feb --- /dev/null +++ b/maps/Route26HealHouse.asm @@ -0,0 +1,63 @@ + object_const_def + const ROUTE26HEALHOUSE_TEACHER + +Route26HealHouse_MapScripts: + def_scene_scripts + + def_callbacks + +Route26HealHouseTeacherScript: + faceplayer + opentext + writetext Route26HealHouseRestAWhileText + waitbutton + closetext + special FadeBlackQuickly + special ReloadSpritesNoPalettes + special StubbedTrainerRankings_Healings + playmusic MUSIC_HEAL + special HealParty + pause 60 + special FadeInQuickly + special RestartMapMusic + opentext + writetext Route26HealHouseKeepAtItText + waitbutton + closetext + end + +Route26HealHouseBookshelf: + jumpstd PictureBookshelfScript + +Route26HealHouseRestAWhileText: + text "Your #MON look" + line "a little tired." + + para "You should rest" + line "them a while." + done + +Route26HealHouseKeepAtItText: + text "There!" + + para "Your #MON are" + line "looking good!" + + para "Keep at it!" + done + +Route26HealHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ROUTE_26, 2 + warp_event 3, 7, ROUTE_26, 2 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, Route26HealHouseBookshelf + bg_event 1, 1, BGEVENT_READ, Route26HealHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route26HealHouseTeacherScript, -1 diff --git a/maps/Route27.asm b/maps/Route27.asm new file mode 100644 index 0000000..70c70eb --- /dev/null +++ b/maps/Route27.asm @@ -0,0 +1,492 @@ + object_const_def + const ROUTE27_COOLTRAINER_M1 + const ROUTE27_COOLTRAINER_M2 + const ROUTE27_COOLTRAINER_F1 + const ROUTE27_COOLTRAINER_F2 + const ROUTE27_YOUNGSTER1 + const ROUTE27_YOUNGSTER2 + const ROUTE27_POKE_BALL1 + const ROUTE27_POKE_BALL2 + const ROUTE27_FISHER + +Route27_MapScripts: + def_scene_scripts + scene_script Route27Noop1Scene, SCENE_ROUTE27_FIRST_STEP_INTO_KANTO + scene_script Route27Noop2Scene, SCENE_ROUTE27_NOOP + + def_callbacks + +Route27Noop1Scene: + end + +Route27Noop2Scene: + end + +FirstStepIntoKantoLeftScene: + turnobject ROUTE27_FISHER, LEFT + showemote EMOTE_SHOCK, ROUTE27_FISHER, 15 + applymovement ROUTE27_FISHER, Route27FisherStepLeftTwiceMovement + sjump FirstStepIntoKantoScene_Continue + +FirstStepIntoKantoRightScene: + turnobject ROUTE27_FISHER, LEFT + showemote EMOTE_SHOCK, ROUTE27_FISHER, 15 + applymovement ROUTE27_FISHER, Route27FisherStepLeftOnceMovement +FirstStepIntoKantoScene_Continue: + turnobject PLAYER, RIGHT + opentext + writetext Route27FisherHeyText + promptbutton + writetext Route27FisherText + waitbutton + closetext + setscene SCENE_ROUTE27_NOOP + end + +Route27FisherScript: + jumptextfaceplayer Route27FisherText + +TrainerPsychicGilbert: + trainer PSYCHIC_T, GILBERT, EVENT_BEAT_PSYCHIC_GILBERT, PsychicGilbertSeenText, PsychicGilbertBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PsychicGilbertAfterBattleText + waitbutton + closetext + end + +TrainerBirdKeeperJose2: + trainer BIRD_KEEPER, JOSE2, EVENT_BEAT_BIRD_KEEPER_JOSE2, BirdKeeperJose2SeenText, BirdKeeperJose2BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_BIRDKEEPER_JOSE + endifjustbattled + opentext + checkflag ENGINE_JOSE_READY_FOR_REMATCH + iftrue .WantsBattle + checkflag ENGINE_JOSE_HAS_STAR_PIECE + iftrue .HasStarPiece + checkcellnum PHONE_BIRDKEEPER_JOSE + iftrue .NumberAccepted + checkevent EVENT_JOSE_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext BirdKeeperJose2AfterBattleText + promptbutton + setevent EVENT_JOSE_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .AskForNumber + +.AskedAlready: + scall .AskNumber2 +.AskForNumber: + askforphonenumber PHONE_BIRDKEEPER_JOSE + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, BIRD_KEEPER, JOSE2 + scall .RegisteredNumber + sjump .NumberAccepted + +.WantsBattle: + scall .Rematch + winlosstext BirdKeeperJose2BeatenText, 0 + readmem wJoseFightCount + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight2: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight2 +.Fight1: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight1 +.LoadFight0: + loadtrainer BIRD_KEEPER, JOSE2 + startbattle + reloadmapafterbattle + loadmem wJoseFightCount, 1 + clearflag ENGINE_JOSE_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer BIRD_KEEPER, JOSE1 + startbattle + reloadmapafterbattle + loadmem wJoseFightCount, 2 + clearflag ENGINE_JOSE_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer BIRD_KEEPER, JOSE3 + startbattle + reloadmapafterbattle + clearflag ENGINE_JOSE_READY_FOR_REMATCH + end + +.HasStarPiece: + scall .Gift + verbosegiveitem STAR_PIECE + iffalse .NoRoom + clearflag ENGINE_JOSE_HAS_STAR_PIECE + sjump .NumberAccepted + +.NoRoom: + sjump .PackFull + +.AskNumber1: + jumpstd AskNumber1MScript + end + +.AskNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberMScript + end + +.NumberAccepted: + jumpstd NumberAcceptedMScript + end + +.NumberDeclined: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.Rematch: + jumpstd RematchMScript + end + +.Gift: + jumpstd GiftMScript + end + +.PackFull: + jumpstd PackFullMScript + end + +TrainerCooltrainermBlake: + trainer COOLTRAINERM, BLAKE, EVENT_BEAT_COOLTRAINERM_BLAKE, CooltrainermBlakeSeenText, CooltrainermBlakeBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainermBlakeAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainermBrian: + trainer COOLTRAINERM, BRIAN, EVENT_BEAT_COOLTRAINERM_BRIAN, CooltrainermBrianSeenText, CooltrainermBrianBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainermBrianAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainerfReena: + trainer COOLTRAINERF, REENA1, EVENT_BEAT_COOLTRAINERF_REENA, CooltrainerfReenaSeenText, CooltrainerfReenaBeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_COOLTRAINERF_REENA + endifjustbattled + opentext + checkflag ENGINE_REENA_READY_FOR_REMATCH + iftrue .WantsBattle + checkcellnum PHONE_COOLTRAINERF_REENA + iftrue .NumberAccepted + checkevent EVENT_REENA_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext CooltrainerfReenaAfterBattleText + promptbutton + setevent EVENT_REENA_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .AskForNumber + +.AskedAlready: + scall .AskNumber2 +.AskForNumber: + askforphonenumber PHONE_COOLTRAINERF_REENA + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, COOLTRAINERF, REENA1 + scall .RegisteredNumber + sjump .NumberAccepted + +.WantsBattle: + scall .Rematch + winlosstext CooltrainerfReenaBeatenText, 0 + readmem wReenaFightCount + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight2: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight2 +.Fight1: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight1 +.LoadFight0: + loadtrainer COOLTRAINERF, REENA1 + startbattle + reloadmapafterbattle + loadmem wReenaFightCount, 1 + clearflag ENGINE_REENA_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer COOLTRAINERF, REENA2 + startbattle + reloadmapafterbattle + loadmem wReenaFightCount, 2 + clearflag ENGINE_REENA_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer COOLTRAINERF, REENA3 + startbattle + reloadmapafterbattle + clearflag ENGINE_REENA_READY_FOR_REMATCH + end + +.AskNumber1: + jumpstd AskNumber1FScript + end + +.AskNumber2: + jumpstd AskNumber2FScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberFScript + end + +.NumberAccepted: + jumpstd NumberAcceptedFScript + end + +.NumberDeclined: + jumpstd NumberDeclinedFScript + end + +.PhoneFull: + jumpstd PhoneFullFScript + end + +.Rematch: + jumpstd RematchFScript + end + +TrainerCooltrainerfMegan: + trainer COOLTRAINERF, MEGAN, EVENT_BEAT_COOLTRAINERF_MEGAN, CooltrainerfMeganSeenText, CooltrainerfMeganBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainerfMeganAfterBattleText + waitbutton + closetext + end + +TohjoFallsSign: + jumptext TohjoFallsSignText + +Route27TMSolarbeam: + itemball TM_SOLARBEAM + +Route27RareCandy: + itemball RARE_CANDY + +Route27FisherStepLeftTwiceMovement: + step LEFT + step LEFT + step_end + +Route27FisherStepLeftOnceMovement: + step LEFT + step_end + +Route27FisherHeyText: + text "Hey!" + done + +Route27FisherText: + text "Do you know what" + line "you just did?" + + para "You've taken your" + line "first step into" + cont "KANTO." + + para "Check your #-" + line "GEAR MAP and see." + done + +CooltrainermBlakeSeenText: + text "You look pretty" + line "strong." + cont "Let me battle you!" + done + +CooltrainermBlakeBeatenText: + text "Yow!" + done + +CooltrainermBlakeAfterBattleText: + text "If you prevail on" + line "this harsh trek," + + para "the truth will be" + line "revealed!" + + para "Heh, sorry, I just" + line "wanted to say" + cont "something cool." + done + +CooltrainermBrianSeenText: + text "Hm? You're good," + line "aren't you?" + done + +CooltrainermBrianBeatenText: + text "Just as I thought!" + done + +CooltrainermBrianAfterBattleText: + text "A good trainer can" + line "recognize other" + cont "good trainers." + done + +CooltrainerfReenaSeenText: + text "You shouldn't" + line "underestimate the" + + para "wild #MON in" + line "these parts." + done + +CooltrainerfReenaBeatenText: + text "Oh! You're much" + line "too strong!" + done + +CooltrainerfReenaAfterBattleText: + text "You're just a kid," + line "but you're not to" + + para "be underestimated" + line "either." + done + +CooltrainerfMeganSeenText: + text "It's rare to see" + line "anyone come here." + + para "Are you training" + line "on your own?" + done + +CooltrainerfMeganBeatenText: + text "Oh! You're really" + line "strong!" + done + +CooltrainerfMeganAfterBattleText: + text "I'm checking out" + line "pre- and post-" + cont "evolution #MON." + + para "Evolution really" + line "does make #MON" + cont "stronger." + + para "But evolved forms" + line "also learn moves" + cont "later on." + done + +PsychicGilbertSeenText: + text "Don't say a thing!" + + para "Let me guess what" + line "you're thinking." + + para "Mmmmmmm…" + + para "I got it! You're" + line "on the #MON" + cont "LEAGUE challenge!" + done + +PsychicGilbertBeatenText: + text "You're too much!" + done + +PsychicGilbertAfterBattleText: + text "With your skills," + line "you'll do well at" + cont "the LEAGUE." + + para "That's what my" + line "premonition says." + done + +BirdKeeperJose2SeenText: + text "Tweet! Tweet!" + line "Tetweet!" + done + +BirdKeeperJose2BeatenText: + text "Tweet!" + done + +BirdKeeperJose2AfterBattleText: + text "BIRD KEEPERS like" + line "me mimic bird" + + para "whistles to com-" + line "mand #MON." + done + +TohjoFallsSignText: + text "TOHJO FALLS" + + para "THE LINK BETWEEN" + line "KANTO AND JOHTO" + done + +Route27_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 33, 7, ROUTE_27_SANDSTORM_HOUSE, 1 + warp_event 26, 5, TOHJO_FALLS, 1 + warp_event 36, 5, TOHJO_FALLS, 2 + + def_coord_events + coord_event 18, 10, SCENE_ROUTE27_FIRST_STEP_INTO_KANTO, FirstStepIntoKantoLeftScene + coord_event 19, 10, SCENE_ROUTE27_FIRST_STEP_INTO_KANTO, FirstStepIntoKantoRightScene + + def_bg_events + bg_event 25, 7, BGEVENT_READ, TohjoFallsSign + + def_object_events + object_event 48, 7, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainermBlake, -1 + object_event 58, 6, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerCooltrainermBrian, -1 + object_event 72, 10, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerCooltrainerfReena, -1 + object_event 37, 6, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerCooltrainerfMegan, -1 + object_event 65, 7, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPsychicGilbert, -1 + object_event 58, 13, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBirdKeeperJose2, -1 + object_event 60, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route27TMSolarbeam, EVENT_ROUTE_27_TM_SOLARBEAM + object_event 53, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route27RareCandy, EVENT_ROUTE_27_RARE_CANDY + object_event 21, 10, SPRITE_FISHER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 3, Route27FisherScript, -1 diff --git a/maps/Route27.blk b/maps/Route27.blk new file mode 100644 index 0000000..1523a2b --- /dev/null +++ b/maps/Route27.blk @@ -0,0 +1,17 @@ + +jppppppppppklrnqqqqqqqqiTvvvvvUlrrsrrrrsmTvUTvvUWWWeevvvy +5555 +vUGX5Y5555555555 +YRWWe +XzvUTvCCCCCCCvvvX5Y +e +XY +4555X5 + +eeTvU + +TUX8555CCCC + +Y +4zvvvvvvvvvyz +vvvvy69999:1X5YTvy11111111111111111189:555555 \ No newline at end of file diff --git a/maps/Route27SandstormHouse.asm b/maps/Route27SandstormHouse.asm new file mode 100644 index 0000000..561d3b9 --- /dev/null +++ b/maps/Route27SandstormHouse.asm @@ -0,0 +1,108 @@ + object_const_def + const ROUTE27SANDSTORMHOUSE_GRANNY + +Route27SandstormHouse_MapScripts: + def_scene_scripts + + def_callbacks + +SandstormHouseWoman: + faceplayer + opentext + checkevent EVENT_GOT_TM37_SANDSTORM + iftrue .AlreadyGotItem + special GetFirstPokemonHappiness + writetext SandstormHouseWomanText1 + promptbutton + ifgreater 150 - 1, .Loyal + sjump .Disloyal + +.Loyal: + writetext SandstormHouseWomanLoyalText + promptbutton + verbosegiveitem TM_SANDSTORM + iffalse .Done + setevent EVENT_GOT_TM37_SANDSTORM +.AlreadyGotItem: + writetext SandstormHouseSandstormDescription + waitbutton +.Done: + closetext + end + +.Disloyal: + writetext SandstormHouseWomanDisloyalText + waitbutton + closetext + end + +SandstormHouseBookshelf: + jumpstd MagazineBookshelfScript + +SandstormHouseWomanText1: + text "Where are you off" + line "to with #MON?" + + para "#MON LEAGUE?" + + para "Are your #MON" + line "loyal enough for" + cont "you to win?" + + para "Let me see…" + done + +SandstormHouseWomanLoyalText: + text "Ah! Your #MON" + line "trusts you very" + cont "much." + + para "It's nice to see a" + line "good trainer." + + para "Here. A gift for" + line "your journey." + done + +SandstormHouseSandstormDescription: + text "TM37 happens to be" + line "SANDSTORM." + + para "It's a move that" + line "inflicts damage on" + cont "both battlers." + + para "It's for advanced" + line "trainers only." + + para "Use it if you" + line "dare. Good luck!" + done + +SandstormHouseWomanDisloyalText: + text "If it doesn't come" + line "to trust you some" + + para "more, it could be" + line "tough going." + + para "Trust is the tie" + line "that binds #MON" + cont "and trainers." + done + +Route27SandstormHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ROUTE_27, 1 + warp_event 3, 7, ROUTE_27, 1 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, SandstormHouseBookshelf + bg_event 1, 1, BGEVENT_READ, SandstormHouseBookshelf + + def_object_events + object_event 2, 4, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SandstormHouseWoman, -1 diff --git a/maps/Route28.asm b/maps/Route28.asm new file mode 100644 index 0000000..b84ff6f --- /dev/null +++ b/maps/Route28.asm @@ -0,0 +1,29 @@ +Route28_MapScripts: + def_scene_scripts + + def_callbacks + +Route28Sign: + jumptext Route28SignText + +Route28HiddenRareCandy: + hiddenitem RARE_CANDY, EVENT_ROUTE_28_HIDDEN_RARE_CANDY + +Route28SignText: + text "ROUTE 28" + done + +Route28_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 3, ROUTE_28_STEEL_WING_HOUSE, 1 + warp_event 33, 5, VICTORY_ROAD_GATE, 7 + + def_coord_events + + def_bg_events + bg_event 31, 5, BGEVENT_READ, Route28Sign + bg_event 25, 2, BGEVENT_ITEM, Route28HiddenRareCandy + + def_object_events diff --git a/maps/Route28.blk b/maps/Route28.blk new file mode 100644 index 0000000..b7d2d2a --- /dev/null +++ b/maps/Route28.blk @@ -0,0 +1,14 @@ +WWWWW*,,,+WWWWWWWW*,lll$WWW%lll !(,oooooo|~(, +Z/1111(, + + + +  +Z\(, + +(, + + >???,,????; + + + eCd(,,,,,,,,,,?????????,,,,,, \ No newline at end of file diff --git a/maps/Route28SteelWingHouse.asm b/maps/Route28SteelWingHouse.asm new file mode 100644 index 0000000..325091b --- /dev/null +++ b/maps/Route28SteelWingHouse.asm @@ -0,0 +1,86 @@ + object_const_def + const ROUTE28STEELWINGHOUSE_CELEBRITY + const ROUTE28STEELWINGHOUSE_FEAROW + +Route28SteelWingHouse_MapScripts: + def_scene_scripts + scene_script Route28SteelWingHouseNoopScene ; unusable + + def_callbacks + +Route28SteelWingHouseNoopScene: + end + +Celebrity: + faceplayer + opentext + checkevent EVENT_GOT_TM47_STEEL_WING + iftrue .AlreadyGotItem + writetext CelebrityText1 + promptbutton + verbosegiveitem TM_STEEL_WING + iffalse .Done + setevent EVENT_GOT_TM47_STEEL_WING +.Done: + closetext + end +.AlreadyGotItem: + writetext CelebrityText2 + waitbutton + closetext + end + +CelebritysFearow: + opentext + writetext CelebritysFearowText + cry FEAROW + waitbutton + closetext + end + +CelebrityHouseBookshelf: + jumpstd MagazineBookshelfScript + +CelebrityText1: + text "Oh, dear." + line "You've found me." + + para "Please don't tell" + line "anyone about me." + + para "I'll give you this" + line "for keeping my" + cont "secret. Please?" + done + +CelebrityText2: + text "It's tough being a" + line "top celebrity." + + para "Everywhere I go," + line "people chase me." + + para "I just want to be" + line "left alone…" + done + +CelebritysFearowText: + text "FEAROW: Feero!" + done + +Route28SteelWingHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ROUTE_28, 1 + warp_event 3, 7, ROUTE_28, 1 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, CelebrityHouseBookshelf + bg_event 1, 1, BGEVENT_READ, CelebrityHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Celebrity, -1 + object_event 6, 5, SPRITE_MOLTRES, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, CelebritysFearow, -1 diff --git a/maps/Route29.asm b/maps/Route29.asm new file mode 100644 index 0000000..9b883f6 --- /dev/null +++ b/maps/Route29.asm @@ -0,0 +1,437 @@ + object_const_def + const ROUTE29_COOLTRAINER_M1 + const ROUTE29_YOUNGSTER + const ROUTE29_TEACHER1 + const ROUTE29_FRUIT_TREE + const ROUTE29_FISHER + const ROUTE29_COOLTRAINER_M2 + const ROUTE29_TUSCANY + const ROUTE29_POKE_BALL + +Route29_MapScripts: + def_scene_scripts + scene_script Route29Noop1Scene, SCENE_ROUTE29_NOOP + scene_script Route29Noop2Scene, SCENE_ROUTE29_CATCH_TUTORIAL + + def_callbacks + callback MAPCALLBACK_OBJECTS, Route29TuscanyCallback + +Route29Noop1Scene: + end + +Route29Noop2Scene: + end + +Route29TuscanyCallback: + checkflag ENGINE_ZEPHYRBADGE + iftrue .DoesTuscanyAppear + +.TuscanyDisappears: + disappear ROUTE29_TUSCANY + endcallback + +.DoesTuscanyAppear: + readvar VAR_WEEKDAY + ifnotequal TUESDAY, .TuscanyDisappears + appear ROUTE29_TUSCANY + endcallback + +Route29Tutorial1: + turnobject ROUTE29_COOLTRAINER_M1, UP + showemote EMOTE_SHOCK, ROUTE29_COOLTRAINER_M1, 15 + applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData1a + turnobject PLAYER, LEFT + setevent EVENT_DUDE_TALKED_TO_YOU + opentext + writetext CatchingTutorialIntroText + yesorno + iffalse Script_RefusedTutorial1 + closetext + follow ROUTE29_COOLTRAINER_M1, PLAYER + applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData1b + stopfollow + loadwildmon RATTATA, 5 + catchtutorial BATTLETYPE_TUTORIAL + turnobject ROUTE29_COOLTRAINER_M1, UP + opentext + writetext CatchingTutorialDebriefText + waitbutton + closetext + setscene SCENE_ROUTE29_NOOP + setevent EVENT_LEARNED_TO_CATCH_POKEMON + end + +Route29Tutorial2: + turnobject ROUTE29_COOLTRAINER_M1, UP + showemote EMOTE_SHOCK, ROUTE29_COOLTRAINER_M1, 15 + applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData2a + turnobject PLAYER, LEFT + setevent EVENT_DUDE_TALKED_TO_YOU + opentext + writetext CatchingTutorialIntroText + yesorno + iffalse Script_RefusedTutorial2 + closetext + follow ROUTE29_COOLTRAINER_M1, PLAYER + applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData2b + stopfollow + loadwildmon RATTATA, 5 + catchtutorial BATTLETYPE_TUTORIAL + turnobject ROUTE29_COOLTRAINER_M1, UP + opentext + writetext CatchingTutorialDebriefText + waitbutton + closetext + setscene SCENE_ROUTE29_NOOP + setevent EVENT_LEARNED_TO_CATCH_POKEMON + end + +Script_RefusedTutorial1: + writetext CatchingTutorialDeclinedText + waitbutton + closetext + applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData1b + setscene SCENE_ROUTE29_NOOP + end + +Script_RefusedTutorial2: + writetext CatchingTutorialDeclinedText + waitbutton + closetext + applymovement ROUTE29_COOLTRAINER_M1, DudeMovementData2b + setscene SCENE_ROUTE29_NOOP + end + +CatchingTutorialDudeScript: + faceplayer + opentext + readvar VAR_BOXSPACE + ifequal 0, .BoxFull + checkevent EVENT_LEARNED_TO_CATCH_POKEMON + iftrue .BoxFull + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iffalse .BoxFull + writetext CatchingTutorialRepeatText + yesorno + iffalse .Declined + closetext + loadwildmon RATTATA, 5 + catchtutorial BATTLETYPE_TUTORIAL + opentext + writetext CatchingTutorialDebriefText + waitbutton + closetext + setevent EVENT_LEARNED_TO_CATCH_POKEMON + end + +.BoxFull: + writetext CatchingTutorialBoxFullText + waitbutton + closetext + end + +.Declined: + writetext CatchingTutorialDeclinedText + waitbutton + closetext + end + +Route29YoungsterScript: + jumptextfaceplayer Route29YoungsterText + +Route29TeacherScript: + jumptextfaceplayer Route29TeacherText + +Route29FisherScript: + jumptextfaceplayer Route29FisherText + +Route29CooltrainerMScript: + faceplayer + opentext + checktime DAY + iftrue .day_morn + checktime NITE + iftrue .nite +.day_morn + writetext Route29CooltrainerMText_WaitingForNight + waitbutton + closetext + end + +.nite + writetext Route29CooltrainerMText_WaitingForMorning + waitbutton + closetext + end + +TuscanyScript: + faceplayer + opentext + checkevent EVENT_GOT_PINK_BOW_FROM_TUSCANY + iftrue TuscanyTuesdayScript + readvar VAR_WEEKDAY + ifnotequal TUESDAY, TuscanyNotTuesdayScript + checkevent EVENT_MET_TUSCANY_OF_TUESDAY + iftrue .MetTuscany + writetext MeetTuscanyText + promptbutton + setevent EVENT_MET_TUSCANY_OF_TUESDAY +.MetTuscany: + writetext TuscanyGivesGiftText + promptbutton + verbosegiveitem PINK_BOW + iffalse TuscanyDoneScript + setevent EVENT_GOT_PINK_BOW_FROM_TUSCANY + writetext TuscanyGaveGiftText + waitbutton + closetext + end + +TuscanyTuesdayScript: + writetext TuscanyTuesdayText + waitbutton +TuscanyDoneScript: + closetext + end + +TuscanyNotTuesdayScript: + writetext TuscanyNotTuesdayText + waitbutton + closetext + end + +Route29Sign1: + jumptext Route29Sign1Text + +Route29Sign2: + jumptext Route29Sign2Text + +Route29FruitTree: + fruittree FRUITTREE_ROUTE_29 + +Route29Potion: + itemball POTION + +DudeMovementData1a: + step UP + step UP + step UP + step UP + step RIGHT + step RIGHT + step_end + +DudeMovementData2a: + step UP + step UP + step UP + step RIGHT + step RIGHT + step_end + +DudeMovementData1b: + step LEFT + step LEFT + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +DudeMovementData2b: + step LEFT + step LEFT + step DOWN + step DOWN + step DOWN + step_end + +CatchingTutorialBoxFullText: + text "#MON hide in" + line "the grass. Who" + + para "knows when they'll" + line "pop out…" + done + +CatchingTutorialIntroText: + text "I've seen you a" + line "couple times. How" + + para "many #MON have" + line "you caught?" + + para "Would you like me" + line "to show you how to" + cont "catch #MON?" + done + +CatchingTutorialDebriefText: + text "That's how you do" + line "it." + + para "If you weaken them" + line "first, #MON are" + cont "easier to catch." + done + +CatchingTutorialDeclinedText: + text "Oh. Fine, then." + + para "Anyway, if you" + line "want to catch" + + para "#MON, you have" + line "to walk a lot." + done + +CatchingTutorialRepeatText: + text "Huh? You want me" + line "to show you how to" + cont "catch #MON?" + done + +Route29YoungsterText: + text "Yo. How are your" + line "#MON?" + + para "If they're weak" + line "and not ready for" + + para "battle, keep out" + line "of the grass." + done + +Route29TeacherText: + text "See those ledges?" + line "It's scary to jump" + cont "off them." + + para "But you can go to" + line "NEW BARK without" + + para "walking through" + line "the grass." + done + +Route29FisherText: + text "I wanted to take a" + line "break, so I saved" + + para "to record my" + line "progress." + done + +Route29CooltrainerMText_WaitingForDay: ; unreferenced + text "I'm waiting for" + line "#MON that" + + para "appear only in the" + line "daytime." + done + +Route29CooltrainerMText_WaitingForNight: + text "I'm waiting for" + line "#MON that" + + para "appear only at" + line "night." + done + +Route29CooltrainerMText_WaitingForMorning: + text "I'm waiting for" + line "#MON that" + + para "appear only in the" + line "morning." + done + +MeetTuscanyText: + text "TUSCANY: I do be-" + line "lieve that this is" + + para "the first time" + line "we've met?" + + para "Please allow me to" + line "introduce myself." + + para "I am TUSCANY of" + line "Tuesday." + done + +TuscanyGivesGiftText: + text "By way of intro-" + line "duction, please" + + para "accept this gift," + line "a PINK BOW." + done + +TuscanyGaveGiftText: + text "TUSCANY: Wouldn't" + line "you agree that it" + cont "is most adorable?" + + para "It strengthens" + line "normal-type moves." + + para "I am certain it" + line "will be of use." + done + +TuscanyTuesdayText: + text "TUSCANY: Have you" + line "met MONICA, my" + cont "older sister?" + + para "Or my younger" + line "brother, WESLEY?" + + para "I am the second of" + line "seven children." + done + +TuscanyNotTuesdayText: + text "TUSCANY: Today is" + line "not Tuesday. That" + cont "is unfortunate…" + done + +Route29Sign1Text: + text "ROUTE 29" + + para "CHERRYGROVE CITY -" + line "NEW BARK TOWN" + done + +Route29Sign2Text: + text "ROUTE 29" + + para "CHERRYGROVE CITY -" + line "NEW BARK TOWN" + done + +Route29_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 27, 1, ROUTE_29_ROUTE_46_GATE, 3 + + def_coord_events + coord_event 53, 8, SCENE_ROUTE29_CATCH_TUTORIAL, Route29Tutorial1 + coord_event 53, 9, SCENE_ROUTE29_CATCH_TUTORIAL, Route29Tutorial2 + + def_bg_events + bg_event 51, 7, BGEVENT_READ, Route29Sign1 + bg_event 3, 5, BGEVENT_READ, Route29Sign2 + + def_object_events + object_event 50, 12, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, CatchingTutorialDudeScript, -1 + object_event 27, 16, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route29YoungsterScript, -1 + object_event 15, 11, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route29TeacherScript, -1 + object_event 12, 2, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route29FruitTree, -1 + object_event 25, 3, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route29FisherScript, -1 + object_event 13, 4, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route29CooltrainerMScript, -1 + object_event 29, 12, SPRITE_TEACHER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TuscanyScript, EVENT_ROUTE_29_TUSCANY_OF_TUESDAY + object_event 48, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route29Potion, EVENT_ROUTE_29_POTION diff --git a/maps/Route29.blk b/maps/Route29.blk new file mode 100644 index 0000000..66ec4b5 --- /dev/null +++ b/maps/Route29.blk @@ -0,0 +1 @@ +\]<O=]efG^KWS>=^Nad>\?" + + para "I work as PROF." + line "OAK's AIDE." + + para "I had no idea that" + line "you were out here." + + para "PROF.OAK's LAB is" + line "nearby in PALLET" + cont "TOWN." + done + +Route2Gate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 0, ROUTE_2, 3 + warp_event 5, 0, ROUTE_2, 4 + warp_event 4, 7, ROUTE_2, 2 + warp_event 5, 7, ROUTE_2, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 6, 4, SPRITE_SCIENTIST, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route2GateScientistScript, -1 diff --git a/maps/Route2NuggetHouse.asm b/maps/Route2NuggetHouse.asm new file mode 100644 index 0000000..93e8fbe --- /dev/null +++ b/maps/Route2NuggetHouse.asm @@ -0,0 +1,64 @@ + object_const_def + const ROUTE2NUGGETHOUSE_FISHER + +Route2NuggetHouse_MapScripts: + def_scene_scripts + + def_callbacks + +Route2NuggetHouseFisherScript: + faceplayer + opentext + checkevent EVENT_GOT_NUGGET_FROM_GUY + iftrue .GotNugget + writetext Route2NuggetHouseFisherText + promptbutton + verbosegiveitem NUGGET + iffalse .NoRoom + setevent EVENT_GOT_NUGGET_FROM_GUY +.GotNugget: + writetext Route2NuggetHouseFisherText_GotNugget + waitbutton +.NoRoom: + closetext + end + +Route2NuggetHouseBookshelf: ; unreferenced + jumpstd DifficultBookshelfScript + +Route2NuggetHouseFisherText: + text "Hi! Wow, I'm glad" + line "to see you." + + para "You're the first" + line "visitor I've had" + cont "in a long time." + + para "I'm super-happy!" + line "Let me give you a" + cont "little present." + done + +Route2NuggetHouseFisherText_GotNugget: + text "That's a NUGGET." + + para "I can't give you" + line "any nuggets of" + + para "wisdom, so that'll" + line "have to do!" + done + +Route2NuggetHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ROUTE_2, 1 + warp_event 3, 7, ROUTE_2, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 4, SPRITE_FISHER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 2, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route2NuggetHouseFisherScript, -1 diff --git a/maps/Route3.asm b/maps/Route3.asm new file mode 100644 index 0000000..a670cd8 --- /dev/null +++ b/maps/Route3.asm @@ -0,0 +1,148 @@ + object_const_def + const ROUTE3_FISHER1 + const ROUTE3_YOUNGSTER1 + const ROUTE3_YOUNGSTER2 + const ROUTE3_FISHER2 + +Route3_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerFirebreatherOtis: + trainer FIREBREATHER, OTIS, EVENT_BEAT_FIREBREATHER_OTIS, FirebreatherOtisSeenText, FirebreatherOtisBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FirebreatherOtisAfterBattleText + waitbutton + closetext + end + +TrainerYoungsterWarren: + trainer YOUNGSTER, WARREN, EVENT_BEAT_YOUNGSTER_WARREN, YoungsterWarrenSeenText, YoungsterWarrenBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext YoungsterWarrenAfterBattleText + waitbutton + closetext + end + +TrainerYoungsterJimmy: + trainer YOUNGSTER, JIMMY, EVENT_BEAT_YOUNGSTER_JIMMY, YoungsterJimmySeenText, YoungsterJimmyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext YoungsterJimmyAfterBattleText + waitbutton + closetext + end + +TrainerFirebreatherBurt: + trainer FIREBREATHER, BURT, EVENT_BEAT_FIREBREATHER_BURT, FirebreatherBurtSeenText, FirebreatherBurtBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FirebreatherBurtAfterBattleText + waitbutton + closetext + end + +Route3MtMoonSquareSign: + jumptext Route3MtMoonSquareSignText + +FirebreatherOtisSeenText: + text "Ah! The weather's" + line "as fine as ever." + done + +FirebreatherOtisBeatenText: + text "It's sunny, but" + line "I'm all wet…" + done + +FirebreatherOtisAfterBattleText: + text "When it rains," + line "it's hard to get" + cont "ignition…" + done + +YoungsterWarrenSeenText: + text "Hmmm… I don't know" + line "what to do…" + done + +YoungsterWarrenBeatenText: + text "I knew I'd lose…" + done + +YoungsterWarrenAfterBattleText: + text "You looked strong." + + para "I was afraid to" + line "take you on…" + done + +YoungsterJimmySeenText: + text "I can run like the" + line "wind!" + done + +YoungsterJimmyBeatenText: + text "Blown away!" + done + +YoungsterJimmyAfterBattleText: + text "I wear shorts the" + line "whole year round." + + para "That's my fashion" + line "policy." + done + +FirebreatherBurtSeenText: + text "Step right up and" + line "take a look!" + done + +FirebreatherBurtBeatenText: + text "Yow! That's hot!" + done + +FirebreatherBurtAfterBattleText: + text "The greatest fire-" + line "breather in KANTO," + cont "that's me." + + para "But not the best" + line "trainer…" + done + +Route3MtMoonSquareSignText: + text "MT.MOON SQUARE" + + para "Just go up the" + line "stairs." + done + +Route3_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 52, 1, MOUNT_MOON, 1 + + def_coord_events + + def_bg_events + bg_event 49, 13, BGEVENT_READ, Route3MtMoonSquareSign + + def_object_events + object_event 26, 12, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerFirebreatherOtis, -1 + object_event 10, 7, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterWarren, -1 + object_event 16, 3, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerYoungsterJimmy, -1 + object_event 49, 5, SPRITE_FISHER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerFirebreatherBurt, -1 diff --git a/maps/Route3.blk b/maps/Route3.blk new file mode 100644 index 0000000..5b5266b --- /dev/null +++ b/maps/Route3.blk @@ -0,0 +1,50 @@ +,,+WWWWWWWWW*,,,,,,,,,+WWW*,,,,) + + + + + + + +t(,,,,,,,,,) +(,,WW%/BB/(+WWWWWW*,) +(,,@ + + + +n + +n + +() + + + + + +(,) +(,,An/BB + +$%/>;/(,) +>?,,,??; + + + + + +n + + + + + +() + +(,)/$W*,,,,)>?????; () + +$W% +V (,,,,)(,,,,,)()tt + + + + (,,WW%(,,,,,)(,?????????,,, \ No newline at end of file diff --git a/maps/Route30.asm b/maps/Route30.asm new file mode 100644 index 0000000..e34e624 --- /dev/null +++ b/maps/Route30.asm @@ -0,0 +1,434 @@ + object_const_def + const ROUTE30_YOUNGSTER1 + const ROUTE30_YOUNGSTER2 + const ROUTE30_YOUNGSTER3 + const ROUTE30_BUG_CATCHER + const ROUTE30_YOUNGSTER4 + const ROUTE30_MONSTER1 + const ROUTE30_MONSTER2 + const ROUTE30_FRUIT_TREE1 + const ROUTE30_FRUIT_TREE2 + const ROUTE30_COOLTRAINER_F + const ROUTE30_POKE_BALL + +Route30_MapScripts: + def_scene_scripts + + def_callbacks + +YoungsterJoey_ImportantBattleScript: + waitsfx + playmusic MUSIC_JOHTO_TRAINER_BATTLE + opentext + writetext Text_UseTackle + pause 30 + closetext + playsound SFX_TACKLE + applymovement ROUTE30_MONSTER2, Route30_JoeysRattataAttacksMovement + opentext + faceplayer + writetext Text_ThisIsABigBattle + waitbutton + turnobject ROUTE30_YOUNGSTER1, UP + closetext + playsound SFX_TACKLE + applymovement ROUTE30_MONSTER1, Route30_MikeysRattataAttacksMovement + special RestartMapMusic + end + +TrainerYoungsterJoey: + trainer YOUNGSTER, JOEY1, EVENT_BEAT_YOUNGSTER_JOEY, YoungsterJoey1SeenText, YoungsterJoey1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_YOUNGSTER_JOEY + endifjustbattled + opentext + checkflag ENGINE_JOEY_READY_FOR_REMATCH + iftrue .Rematch + checkcellnum PHONE_YOUNGSTER_JOEY + iftrue .NumberAccepted + checkevent EVENT_JOEY_ASKED_FOR_PHONE_NUMBER + iftrue .AskAgain + writetext YoungsterJoey1AfterText + promptbutton + setevent EVENT_JOEY_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .RequestNumber + +.AskAgain: + scall .AskNumber2 +.RequestNumber: + askforphonenumber PHONE_YOUNGSTER_JOEY + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, YOUNGSTER, JOEY1 + scall .RegisteredNumber + sjump .NumberAccepted + +.Rematch: + scall .RematchStd + winlosstext YoungsterJoey1BeatenText, 0 + readmem wJoeyFightCount + ifequal 4, .Fight4 + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight4: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight4 +.Fight3: + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .LoadFight3 +.Fight2: + checkflag ENGINE_FLYPOINT_OLIVINE + iftrue .LoadFight2 +.Fight1: + checkflag ENGINE_FLYPOINT_GOLDENROD + iftrue .LoadFight1 +.LoadFight0: + loadtrainer YOUNGSTER, JOEY1 + startbattle + reloadmapafterbattle + loadmem wJoeyFightCount, 1 + clearflag ENGINE_JOEY_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer YOUNGSTER, JOEY2 + startbattle + reloadmapafterbattle + loadmem wJoeyFightCount, 2 + clearflag ENGINE_JOEY_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer YOUNGSTER, JOEY3 + startbattle + reloadmapafterbattle + loadmem wJoeyFightCount, 3 + clearflag ENGINE_JOEY_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer YOUNGSTER, JOEY4 + startbattle + reloadmapafterbattle + loadmem wJoeyFightCount, 4 + clearflag ENGINE_JOEY_READY_FOR_REMATCH + end + +.LoadFight4: + loadtrainer YOUNGSTER, JOEY5 + startbattle + reloadmapafterbattle + clearflag ENGINE_JOEY_READY_FOR_REMATCH + checkevent EVENT_JOEY_HP_UP + iftrue .GiveHPUp + checkevent EVENT_GOT_HP_UP_FROM_JOEY + iftrue .done + scall .RematchGift + verbosegiveitem HP_UP + iffalse .PackFull + setevent EVENT_GOT_HP_UP_FROM_JOEY + sjump .NumberAccepted + +.done + end + +.GiveHPUp: + opentext + writetext YoungsterJoeyText_GiveHPUpAfterBattle + waitbutton + verbosegiveitem HP_UP + iffalse .PackFull + clearevent EVENT_JOEY_HP_UP + setevent EVENT_GOT_HP_UP_FROM_JOEY + sjump .NumberAccepted + +.AskNumber1: + jumpstd AskNumber1MScript + end + +.AskNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberMScript + end + +.NumberAccepted: + jumpstd NumberAcceptedMScript + end + +.NumberDeclined: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.RematchStd: + jumpstd RematchMScript + end + +.PackFull: + setevent EVENT_JOEY_HP_UP + jumpstd PackFullMScript + end + +.RematchGift: + jumpstd RematchGiftMScript + end + +TrainerYoungsterMikey: + trainer YOUNGSTER, MIKEY, EVENT_BEAT_YOUNGSTER_MIKEY, YoungsterMikeySeenText, YoungsterMikeyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext YoungsterMikeyAfterText + waitbutton + closetext + end + +TrainerBugCatcherDon: + trainer BUG_CATCHER, DON, EVENT_BEAT_BUG_CATCHER_DON, BugCatcherDonSeenText, BugCatcherDonBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BugCatcherDonAfterText + waitbutton + closetext + end + +Route30YoungsterScript: + faceplayer + opentext + checkevent EVENT_GAVE_MYSTERY_EGG_TO_ELM + iftrue .CompletedEggQuest + writetext Route30YoungsterText_DirectionsToMrPokemonsHouse + waitbutton + closetext + end + +.CompletedEggQuest: + writetext Route30YoungsterText_EveryoneIsBattling + waitbutton + closetext + end + +Route30CooltrainerFScript: + jumptextfaceplayer Route30CooltrainerFText + +Route30Sign: + jumptext Route30SignText + +MrPokemonsHouseDirectionsSign: + jumptext MrPokemonsHouseDirectionsSignText + +MrPokemonsHouseSign: + jumptext MrPokemonsHouseSignText + +Route30TrainerTips: + jumptext Route30TrainerTipsText + +Route30Antidote: + itemball ANTIDOTE + +Route30FruitTree1: + fruittree FRUITTREE_ROUTE_30_1 + +Route30FruitTree2: + fruittree FRUITTREE_ROUTE_30_2 + +Route30HiddenPotion: + hiddenitem POTION, EVENT_ROUTE_30_HIDDEN_POTION + +Route30_JoeysRattataAttacksMovement: + fix_facing + big_step UP + big_step DOWN + step_end + +Route30_MikeysRattataAttacksMovement: + fix_facing + big_step DOWN + big_step UP + step_end + +Text_UseTackle: + text "Go, RATTATA!" + + para "TACKLE!" + done + +Text_ThisIsABigBattle: + text "What? This is a" + line "big battle!" + cont "Leave me alone!" + done + +YoungsterJoey1SeenText: + text "I just lost, so" + line "I'm trying to find" + cont "more #MON." + + para "Wait! You look" + line "weak! Come on," + cont "let's battle!" + done + +YoungsterJoey1BeatenText: + text "Ack! I lost again!" + line "Doggone it!" + done + +YoungsterJoey1AfterText: + text "Do I have to have" + line "more #MON in" + + para "order to battle" + line "better?" + + para "No! I'm sticking" + line "with this one no" + cont "matter what!" + done + +YoungsterMikeySeenText: + text "You're a #MON" + line "trainer, right?" + + para "Then you have to" + line "battle!" + done + +YoungsterMikeyBeatenText: + text "That's strange." + line "I won before." + done + +YoungsterMikeyAfterText: + text "Becoming a good" + line "trainer is really" + cont "tough." + + para "I'm going to bat-" + line "tle other people" + cont "to get better." + done + +BugCatcherDonSeenText: + text "Instead of a bug" + line "#MON, I found" + cont "a trainer!" + done + +BugCatcherDonBeatenText: + text "Argh! You're too" + line "strong!" + done + +BugCatcherDonAfterText: + text "I ran out of #" + line "BALLS while I was" + cont "catching #MON." + + para "I should've bought" + line "some more…" + done + +Route30YoungsterText_DirectionsToMrPokemonsHouse: + text "MR.#MON's" + line "house? It's a bit" + cont "farther ahead." + done + +Route30YoungsterText_EveryoneIsBattling: + text "Everyone's having" + line "fun battling!" + cont "You should too!" + done + +Route30CooltrainerFText: + text "I'm not a trainer." + + para "But if you look" + line "one in the eyes," + cont "prepare to battle." + done + +Route30SignText: + text "ROUTE 30" + + para "VIOLET CITY -" + line "CHERRYGROVE CITY" + done + +MrPokemonsHouseDirectionsSignText: + text "MR.#MON'S HOUSE" + line "STRAIGHT AHEAD!" + done + +MrPokemonsHouseSignText: + text "MR.#MON'S HOUSE" + done + +Route30TrainerTipsText: + text "TRAINER TIPS" + + para "No stealing other" + line "people's #MON!" + + para "# BALLS are to" + line "be thrown only at" + cont "wild #MON!" + done + +YoungsterJoeyText_GiveHPUpAfterBattle: + text "I lost again…" + line "Gee, you're tough!" + + para "Oh yeah, I almost" + line "forgot that I had" + cont "to give you this." + + para "Use it to get even" + line "tougher, OK?" + + para "I'm going to get" + line "tougher too." + done + +Route30_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 39, ROUTE_30_BERRY_HOUSE, 1 + warp_event 17, 5, MR_POKEMONS_HOUSE, 1 + + def_coord_events + + def_bg_events + bg_event 9, 43, BGEVENT_READ, Route30Sign + bg_event 13, 29, BGEVENT_READ, MrPokemonsHouseDirectionsSign + bg_event 15, 5, BGEVENT_READ, MrPokemonsHouseSign + bg_event 3, 21, BGEVENT_READ, Route30TrainerTips + bg_event 14, 9, BGEVENT_ITEM, Route30HiddenPotion + + def_object_events + object_event 5, 26, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, YoungsterJoey_ImportantBattleScript, EVENT_ROUTE_30_BATTLE + object_event 2, 28, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterJoey, EVENT_ROUTE_30_YOUNGSTER_JOEY + object_event 5, 23, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerYoungsterMikey, -1 + object_event 1, 7, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBugCatcherDon, -1 + object_event 7, 30, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route30YoungsterScript, -1 + object_event 5, 24, SPRITE_MONSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ROUTE_30_BATTLE + object_event 5, 25, SPRITE_MONSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_ROUTE_30_BATTLE + object_event 5, 39, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route30FruitTree1, -1 + object_event 11, 5, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route30FruitTree2, -1 + object_event 2, 13, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route30CooltrainerFScript, -1 + object_event 8, 35, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route30Antidote, EVENT_ROUTE_30_ANTIDOTE diff --git a/maps/Route30.blk b/maps/Route30.blk new file mode 100644 index 0000000..b79b95f --- /dev/null +++ b/maps/Route30.blk @@ -0,0 +1 @@ +V]]]GgfWV]VW]GWZGVTUXYGXYVWWTX \ No newline at end of file diff --git a/maps/Route30BerryHouse.asm b/maps/Route30BerryHouse.asm new file mode 100644 index 0000000..d7c68d2 --- /dev/null +++ b/maps/Route30BerryHouse.asm @@ -0,0 +1,61 @@ + object_const_def + const ROUTE30BERRYHOUSE_POKEFAN_M + +Route30BerryHouse_MapScripts: + def_scene_scripts + + def_callbacks + +Route30BerryHousePokefanMScript: + faceplayer + opentext + checkevent EVENT_GOT_BERRY_FROM_ROUTE_30_HOUSE + iftrue .GotBerry + writetext Route30BerrySpeechHouseMonEatBerriesText + promptbutton + verbosegiveitem BERRY + iffalse .NoRoom + setevent EVENT_GOT_BERRY_FROM_ROUTE_30_HOUSE +.GotBerry: + writetext Route30BerrySpeechHouseCheckTreesText + waitbutton +.NoRoom: + closetext + end + +Route30BerryHouseBookshelf: + jumpstd MagazineBookshelfScript + +Route30BerrySpeechHouseMonEatBerriesText: + text "You know, #MON" + line "eat BERRIES." + + para "Well, my #MON" + line "got healthier by" + cont "eating a BERRY." + + para "Here. I'll share" + line "one with you!" + done + +Route30BerrySpeechHouseCheckTreesText: + text "Check trees for" + line "BERRIES. They just" + cont "drop right off." + done + +Route30BerryHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ROUTE_30, 1 + warp_event 3, 7, ROUTE_30, 1 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, Route30BerryHouseBookshelf + bg_event 1, 1, BGEVENT_READ, Route30BerryHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, Route30BerryHousePokefanMScript, -1 diff --git a/maps/Route31.asm b/maps/Route31.asm new file mode 100644 index 0000000..f7d1455 --- /dev/null +++ b/maps/Route31.asm @@ -0,0 +1,439 @@ + object_const_def + const ROUTE31_FISHER + const ROUTE31_YOUNGSTER + const ROUTE31_BUG_CATCHER + const ROUTE31_COOLTRAINER_M + const ROUTE31_FRUIT_TREE + const ROUTE31_POKE_BALL1 + const ROUTE31_POKE_BALL2 + +Route31_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, Route31CheckMomCallCallback + +Route31CheckMomCallCallback: + checkevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST + iffalse .DoMomCall + endcallback + +.DoMomCall: + specialphonecall SPECIALCALL_WORRIED + endcallback + +TrainerBugCatcherWade1: + trainer BUG_CATCHER, WADE1, EVENT_BEAT_BUG_CATCHER_WADE, BugCatcherWade1SeenText, BugCatcherWade1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_BUG_CATCHER_WADE + endifjustbattled + opentext + checkflag ENGINE_WADE_READY_FOR_REMATCH + iftrue .WadeRematch + checkflag ENGINE_WADE_HAS_ITEM + iftrue .WadeItem + checkcellnum PHONE_BUG_CATCHER_WADE + iftrue .AcceptedNumberSTD + checkevent EVENT_WADE_ASKED_FOR_PHONE_NUMBER + iftrue .AskAgain + writetext BugCatcherWade1AfterText + waitbutton + setevent EVENT_WADE_ASKED_FOR_PHONE_NUMBER + scall .AskPhoneNumberSTD + sjump .Continue + +.AskAgain: + scall .AskAgainSTD +.Continue: + askforphonenumber PHONE_BUG_CATCHER_WADE + ifequal PHONE_CONTACTS_FULL, .PhoneFullSTD + ifequal PHONE_CONTACT_REFUSED, .DeclinedNumberSTD + gettrainername STRING_BUFFER_3, BUG_CATCHER, WADE1 + scall .RegisterNumberSTD + sjump .AcceptedNumberSTD + +.WadeRematch: + scall .RematchSTD + winlosstext BugCatcherWade1BeatenText, 0 + readmem wWadeFightCount + ifequal 4, .Fight4 + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight4: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight4 +.Fight3: + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .LoadFight3 +.Fight2: + checkflag ENGINE_FLYPOINT_MAHOGANY + iftrue .LoadFight2 +.Fight1: + checkflag ENGINE_FLYPOINT_GOLDENROD + iftrue .LoadFight1 +.LoadFight0: + loadtrainer BUG_CATCHER, WADE1 + startbattle + reloadmapafterbattle + loadmem wWadeFightCount, 1 + clearflag ENGINE_WADE_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer BUG_CATCHER, WADE2 + startbattle + reloadmapafterbattle + loadmem wWadeFightCount, 2 + clearflag ENGINE_WADE_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer BUG_CATCHER, WADE3 + startbattle + reloadmapafterbattle + loadmem wWadeFightCount, 3 + clearflag ENGINE_WADE_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer BUG_CATCHER, WADE4 + startbattle + reloadmapafterbattle + loadmem wWadeFightCount, 4 + clearflag ENGINE_WADE_READY_FOR_REMATCH + end + +.LoadFight4: + loadtrainer BUG_CATCHER, WADE5 + startbattle + reloadmapafterbattle + clearflag ENGINE_WADE_READY_FOR_REMATCH + end + +.WadeItem: + scall .ItemSTD + checkevent EVENT_WADE_HAS_BERRY + iftrue .Berry + checkevent EVENT_WADE_HAS_PSNCUREBERRY + iftrue .Psncureberry + checkevent EVENT_WADE_HAS_PRZCUREBERRY + iftrue .Przcureberry + checkevent EVENT_WADE_HAS_BITTER_BERRY + iftrue .BitterBerry +.Berry: + verbosegiveitem BERRY + iffalse .PackFull + sjump .Done +.Psncureberry: + verbosegiveitem PSNCUREBERRY + iffalse .PackFull + sjump .Done +.Przcureberry: + verbosegiveitem PRZCUREBERRY + iffalse .PackFull + sjump .Done +.BitterBerry: + verbosegiveitem BITTER_BERRY + iffalse .PackFull +.Done: + clearflag ENGINE_WADE_HAS_ITEM + sjump .AcceptedNumberSTD +.PackFull: + sjump .PackFullSTD + +.AskPhoneNumberSTD: + jumpstd AskNumber1MScript + end + +.AskAgainSTD: + jumpstd AskNumber2MScript + end + +.RegisterNumberSTD: + jumpstd RegisteredNumberMScript + end + +.AcceptedNumberSTD: + jumpstd NumberAcceptedMScript + end + +.DeclinedNumberSTD: + jumpstd NumberDeclinedMScript + end + +.PhoneFullSTD: + jumpstd PhoneFullMScript + end + +.RematchSTD: + jumpstd RematchMScript + end + +.ItemSTD: + jumpstd GiftMScript + end + +.PackFullSTD: + jumpstd PackFullMScript + end + +Route31MailRecipientScript: + faceplayer + opentext + checkevent EVENT_GOT_TM50_NIGHTMARE + iftrue .DescribeNightmare + checkevent EVENT_GOT_KENYA + iftrue .TryGiveKenya + writetext Text_Route31SleepyMan + waitbutton + closetext + end + +.TryGiveKenya: + writetext Text_Route31SleepyManGotMail + promptbutton + checkpokemail ReceivedSpearowMailText + ifequal POKEMAIL_WRONG_MAIL, .WrongMail + ifequal POKEMAIL_REFUSED, .Refused + ifequal POKEMAIL_NO_MAIL, .NoMail + ifequal POKEMAIL_LAST_MON, .LastMon + ; POKEMAIL_CORRECT + writetext Text_Route31HandOverMailMon + promptbutton + writetext Text_Route31ReadingMail + promptbutton + setevent EVENT_GAVE_KENYA + verbosegiveitem TM_NIGHTMARE + iffalse .NoRoomForItems + setevent EVENT_GOT_TM50_NIGHTMARE +.DescribeNightmare: + writetext Text_Route31DescribeNightmare + waitbutton +.NoRoomForItems: + closetext + end + +.WrongMail: + writetext Text_Route31WrongMail + waitbutton + closetext + end + +.NoMail: + writetext Text_Route31MissingMail + waitbutton + closetext + end + +.Refused: + writetext Text_Route31DeclinedToHandOverMail + waitbutton + closetext + end + +.LastMon: + writetext Text_Route31CantTakeLastMon + waitbutton + closetext + end + +ReceivedSpearowMailText: + db "DARK CAVE leads" + next "to another road@" + +Route31YoungsterScript: + jumptextfaceplayer Route31YoungsterText + +Route31Sign: + jumptext Route31SignText + +DarkCaveSign: + jumptext DarkCaveSignText + +Route31CooltrainerMScript: + jumptextfaceplayer Route31CooltrainerMText + +Route31FruitTree: + fruittree FRUITTREE_ROUTE_31 + +Route31Potion: + itemball POTION + +Route31PokeBall: + itemball POKE_BALL + +Route31CooltrainerMText: + text "DARK CAVE…" + + para "If #MON could" + line "light it up, I'd" + cont "explore it." + done + +BugCatcherWade1SeenText: + text "I caught a bunch" + line "of #MON. Let me" + cont "battle with you!" + done + +BugCatcherWade1BeatenText: + text "Awwwww…" + done + +BugCatcherWade1AfterText: + text "You can catch" + line "#MON even if" + + para "you have six with" + line "you." + + para "If you catch one," + line "it'll go to your" + cont "BOX automatically." + done + +Text_Route31SleepyMan: + text "… Hnuurg… Huh?" + + para "I walked too far" + line "today looking for" + cont "#MON." + + para "My feet hurt and" + line "I'm sleepy…" + + para "If I were a wild" + line "#MON, I'd be" + cont "easy to catch…" + + para "…Zzzz…" + done + +Text_Route31SleepyManGotMail: + text "…Zzzz… Huh?" + + para "What's that? You" + line "have MAIL for me?" + done + +Text_Route31HandOverMailMon: + text " handed" + line "over the #MON" + cont "holding the MAIL." + done + +Text_Route31ReadingMail: + text "Let's see…" + + para "…DARK CAVE leads" + line "to another road…" + + para "That's good to" + line "know." + + para "Thanks for bring-" + line "ing this to me." + + para "My friend's a good" + line "guy, and you're" + cont "swell too!" + + para "I'd like to do" + line "something good in" + cont "return too!" + + para "I know! I want you" + line "to have this!" + done + +Text_Route31DescribeNightmare: + text "TM50 is NIGHTMARE." + + para "It's a wicked move" + line "that steadily cuts" + + para "the HP of a sleep-" + line "ing enemy." + + para "Ooooh…" + line "That's scary…" + + para "I don't want to" + line "have bad dreams." + done + +Text_Route31WrongMail: + text "This MAIL isn't" + line "for me." + done + +Text_Route31MissingMail: + text "Why is this #-" + line "MON so special?" + + para "It doesn't have" + line "any MAIL." + done + +Text_Route31DeclinedToHandOverMail: + text "What? You don't" + line "want anything?" + done + +Text_Route31CantTakeLastMon: + text "If I take that" + line "#MON from you," + + para "what are you going" + line "to use in battle?" + done + +Route31YoungsterText: + text "I found a good" + line "#MON in DARK" + cont "CAVE." + + para "I'm going to raise" + line "it to take on" + cont "FALKNER." + + para "He's the leader of" + line "VIOLET CITY's GYM." + done + +Route31SignText: + text "ROUTE 31" + + para "VIOLET CITY -" + line "CHERRYGROVE CITY" + done + +DarkCaveSignText: + text "DARK CAVE" + done + +Route31_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 6, ROUTE_31_VIOLET_GATE, 3 + warp_event 4, 7, ROUTE_31_VIOLET_GATE, 4 + warp_event 34, 5, DARK_CAVE_VIOLET_ENTRANCE, 1 + + def_coord_events + + def_bg_events + bg_event 7, 5, BGEVENT_READ, Route31Sign + bg_event 31, 5, BGEVENT_READ, DarkCaveSign + + def_object_events + object_event 17, 7, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route31MailRecipientScript, -1 + object_event 9, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route31YoungsterScript, -1 + object_event 21, 13, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 5, TrainerBugCatcherWade1, -1 + object_event 33, 8, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route31CooltrainerMScript, -1 + object_event 16, 7, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route31FruitTree, -1 + object_event 29, 5, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route31Potion, EVENT_ROUTE_31_POTION + object_event 19, 15, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route31PokeBall, EVENT_ROUTE_31_POKE_BALL diff --git a/maps/Route31.blk b/maps/Route31.blk new file mode 100644 index 0000000..6c76e0e --- /dev/null +++ b/maps/Route31.blk @@ -0,0 +1 @@ +hqqiTvUhqqi G_]X5zvUGlsrm MX5YWKWSbWKW[fbb \ No newline at end of file diff --git a/maps/Route31VioletGate.asm b/maps/Route31VioletGate.asm new file mode 100644 index 0000000..59a67e9 --- /dev/null +++ b/maps/Route31VioletGate.asm @@ -0,0 +1,43 @@ + object_const_def + const ROUTE31VIOLETGATE_OFFICER + const ROUTE31VIOLETGATE_COOLTRAINER_F + +Route31VioletGate_MapScripts: + def_scene_scripts + + def_callbacks + +Route31VioletGateOfficerScript: + jumptextfaceplayer Route31VioletGateOfficerText + +Route31VioletGateCooltrainerFScript: + jumptextfaceplayer Route31VioletGateCooltrainerFText + +Route31VioletGateOfficerText: + text "Hi there!" + line "Did you visit" + cont "SPROUT TOWER?" + done + +Route31VioletGateCooltrainerFText: + text "I came too far" + line "out. I'd better" + cont "phone home!" + done + +Route31VioletGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 4, VIOLET_CITY, 8 + warp_event 0, 5, VIOLET_CITY, 9 + warp_event 9, 4, ROUTE_31, 1 + warp_event 9, 5, ROUTE_31, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route31VioletGateOfficerScript, -1 + object_event 1, 2, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route31VioletGateCooltrainerFScript, -1 diff --git a/maps/Route32.asm b/maps/Route32.asm new file mode 100644 index 0000000..72699eb --- /dev/null +++ b/maps/Route32.asm @@ -0,0 +1,958 @@ + object_const_def + const ROUTE32_FISHER1 + const ROUTE32_FISHER2 + const ROUTE32_FISHER3 + const ROUTE32_YOUNGSTER1 + const ROUTE32_YOUNGSTER2 + const ROUTE32_YOUNGSTER3 + const ROUTE32_LASS1 + const ROUTE32_COOLTRAINER_M + const ROUTE32_YOUNGSTER4 + const ROUTE32_FISHER4 + const ROUTE32_POKE_BALL1 + const ROUTE32_FISHER5 + const ROUTE32_FRIEDA + const ROUTE32_POKE_BALL2 + +Route32_MapScripts: + def_scene_scripts + scene_script Route32Noop1Scene, SCENE_ROUTE32_COOLTRAINER_M_BLOCKS + scene_script Route32Noop2Scene, SCENE_ROUTE32_OFFER_SLOWPOKETAIL + scene_script Route32Noop3Scene, SCENE_ROUTE32_NOOP + + def_callbacks + callback MAPCALLBACK_OBJECTS, Route32FriedaCallback + +Route32Noop1Scene: + end + +Route32Noop2Scene: + end + +Route32Noop3Scene: + end + +Route32FriedaCallback: + readvar VAR_WEEKDAY + ifequal FRIDAY, .FriedaAppears + disappear ROUTE32_FRIEDA + endcallback + +.FriedaAppears: + appear ROUTE32_FRIEDA + endcallback + +Route32CooltrainerMScript: + faceplayer +Route32CooltrainerMContinueScene: + opentext + checkevent EVENT_GOT_MIRACLE_SEED_IN_ROUTE_32 + iftrue .GotMiracleSeed + checkflag ENGINE_ZEPHYRBADGE + iffalse .DontHaveZephyrBadge + checkevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE + iftrue .GiveMiracleSeed + writetext Route32CooltrainerMText_AideIsWaiting + waitbutton + closetext + end + +.GoToSproutTower: ; unreferenced + writetext Route32CooltrainerMText_UnusedSproutTower + waitbutton + closetext + end + +.GiveMiracleSeed: + writetext Route32CooltrainerMText_HaveThisSeed + promptbutton + verbosegiveitem MIRACLE_SEED + iffalse .BagFull + setevent EVENT_GOT_MIRACLE_SEED_IN_ROUTE_32 + sjump .GotMiracleSeed + +.DontHaveZephyrBadge: + writetext Route32CooltrainerMText_VioletGym + waitbutton + closetext + end + +.GotMiracleSeed: + writetext Route32CooltrainerMText_ExperiencesShouldBeUseful + waitbutton +.BagFull: + closetext + end + +Route32CooltrainerMStopsYouScene: + turnobject ROUTE32_COOLTRAINER_M, LEFT + turnobject PLAYER, RIGHT + opentext + writetext Route32CooltrainerMText_WhatsTheHurry + waitbutton + closetext + follow PLAYER, ROUTE32_COOLTRAINER_M + applymovement PLAYER, Movement_Route32CooltrainerMPushesYouBackToViolet + stopfollow + turnobject PLAYER, DOWN + scall Route32CooltrainerMContinueScene + applymovement ROUTE32_COOLTRAINER_M, Movement_Route32CooltrainerMReset1 + applymovement ROUTE32_COOLTRAINER_M, Movement_Route32CooltrainerMReset2 + end + +Route32RoarTMGuyScript: + faceplayer + opentext + checkevent EVENT_GOT_TM05_ROAR + iftrue .AlreadyHaveRoar + writetext Text_RoarIntro + promptbutton + verbosegiveitem TM_ROAR + iffalse .Finish + setevent EVENT_GOT_TM05_ROAR +.AlreadyHaveRoar: + writetext Text_RoarOutro + waitbutton +.Finish: + closetext + end + +Route32WannaBuyASlowpokeTailScript: + turnobject ROUTE32_FISHER4, DOWN + turnobject PLAYER, UP + sjump _OfferToSellSlowpokeTail + +SlowpokeTailSalesmanScript: + faceplayer +_OfferToSellSlowpokeTail: + setscene SCENE_ROUTE32_NOOP + opentext + writetext Text_MillionDollarSlowpokeTail + yesorno + iffalse .refused + writetext Text_ThoughtKidsWereLoaded + waitbutton + closetext + end + +.refused + writetext Text_RefusedToBuySlowpokeTail + waitbutton + closetext + end + +TrainerCamperRoland: + trainer CAMPER, ROLAND, EVENT_BEAT_CAMPER_ROLAND, CamperRolandSeenText, CamperRolandBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CamperRolandAfterText + waitbutton + closetext + end + +TrainerFisherJustin: + trainer FISHER, JUSTIN, EVENT_BEAT_FISHER_JUSTIN, FisherJustinSeenText, FisherJustinBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherJustinAfterText + waitbutton + closetext + end + +TrainerFisherRalph1: + trainer FISHER, RALPH1, EVENT_BEAT_FISHER_RALPH, FisherRalph1SeenText, FisherRalph1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_FISHER_RALPH + endifjustbattled + opentext + checkflag ENGINE_RALPH_READY_FOR_REMATCH + iftrue .Rematch + checkflag ENGINE_QWILFISH_SWARM + iftrue .Swarm + checkcellnum PHONE_FISHER_RALPH + iftrue .NumberAccepted + checkevent EVENT_RALPH_ASKED_FOR_PHONE_NUMBER + iftrue .AskAgain + writetext FisherRalphAfterText + promptbutton + setevent EVENT_RALPH_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .AskForNumber + +.AskAgain: + scall .AskNumber2 +.AskForNumber: + askforphonenumber PHONE_FISHER_RALPH + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, FISHER, RALPH1 + scall .RegisteredNumber + sjump .NumberAccepted + +.Rematch: + scall .RematchStd + winlosstext FisherRalph1BeatenText, 0 + readmem wRalphFightCount + ifequal 4, .Fight4 + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight4: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight4 +.Fight3: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight3 +.Fight2: + checkflag ENGINE_FLYPOINT_LAKE_OF_RAGE + iftrue .LoadFight2 +.Fight1: + checkflag ENGINE_FLYPOINT_ECRUTEAK + iftrue .LoadFight1 +.LoadFight0: + loadtrainer FISHER, RALPH1 + startbattle + reloadmapafterbattle + loadmem wRalphFightCount, 1 + clearflag ENGINE_RALPH_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer FISHER, RALPH2 + startbattle + reloadmapafterbattle + loadmem wRalphFightCount, 2 + clearflag ENGINE_RALPH_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer FISHER, RALPH3 + startbattle + reloadmapafterbattle + loadmem wRalphFightCount, 3 + clearflag ENGINE_RALPH_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer FISHER, RALPH4 + startbattle + reloadmapafterbattle + loadmem wRalphFightCount, 4 + clearflag ENGINE_RALPH_READY_FOR_REMATCH + end + +.LoadFight4: + loadtrainer FISHER, RALPH5 + startbattle + reloadmapafterbattle + clearflag ENGINE_RALPH_READY_FOR_REMATCH + end + +.Swarm: + writetext FisherRalphSwarmText + waitbutton + closetext + end + +.AskNumber1: + jumpstd AskNumber1MScript + end + +.AskNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberMScript + end + +.NumberAccepted: + jumpstd NumberAcceptedMScript + end + +.NumberDeclined: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.RematchStd: + jumpstd RematchMScript + end + +TrainerFisherHenry: + trainer FISHER, HENRY, EVENT_BEAT_FISHER_HENRY, FisherHenrySeenText, FisherHenryBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherHenryAfterText + waitbutton + closetext + end + +TrainerPicnickerLiz1: + trainer PICNICKER, LIZ1, EVENT_BEAT_PICNICKER_LIZ, PicnickerLiz1SeenText, PicnickerLiz1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_PICNICKER_LIZ + endifjustbattled + opentext + checkflag ENGINE_LIZ_READY_FOR_REMATCH + iftrue .Rematch + checkcellnum PHONE_PICNICKER_LIZ + iftrue .NumberAccepted + checkevent EVENT_LIZ_ASKED_FOR_PHONE_NUMBER + iftrue .AskAgain + writetext PicnickerLiz1AfterText + promptbutton + setevent EVENT_LIZ_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .AskForNumber + +.AskAgain: + scall .AskNumber2 +.AskForNumber: + askforphonenumber PHONE_PICNICKER_LIZ + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, PICNICKER, LIZ1 + scall .RegisteredNumber + sjump .NumberAccepted + +.Rematch: + scall .RematchStd + winlosstext PicnickerLiz1BeatenText, 0 + readmem wLizFightCount + ifequal 4, .Fight4 + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight4: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight4 +.Fight3: + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .LoadFight3 +.Fight2: + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .LoadFight2 +.Fight1: + checkflag ENGINE_FLYPOINT_ECRUTEAK + iftrue .LoadFight1 +.LoadFight0: + loadtrainer PICNICKER, LIZ1 + startbattle + reloadmapafterbattle + loadmem wLizFightCount, 1 + clearflag ENGINE_LIZ_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer PICNICKER, LIZ2 + startbattle + reloadmapafterbattle + loadmem wLizFightCount, 2 + clearflag ENGINE_LIZ_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer PICNICKER, LIZ3 + startbattle + reloadmapafterbattle + loadmem wLizFightCount, 3 + clearflag ENGINE_LIZ_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer PICNICKER, LIZ4 + startbattle + reloadmapafterbattle + loadmem wLizFightCount, 4 + clearflag ENGINE_LIZ_READY_FOR_REMATCH + end + +.LoadFight4: + loadtrainer PICNICKER, LIZ5 + startbattle + reloadmapafterbattle + clearflag ENGINE_LIZ_READY_FOR_REMATCH + end + +.AskNumber1: + jumpstd AskNumber1FScript + end + +.AskNumber2: + jumpstd AskNumber2FScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberFScript + end + +.NumberAccepted: + jumpstd NumberAcceptedFScript + end + +.NumberDeclined: + jumpstd NumberDeclinedFScript + end + +.PhoneFull: + jumpstd PhoneFullFScript + end + +.RematchStd: + jumpstd RematchFScript + end + +TrainerYoungsterAlbert: + trainer YOUNGSTER, ALBERT, EVENT_BEAT_YOUNGSTER_ALBERT, YoungsterAlbertSeenText, YoungsterAlbertBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext YoungsterAlbertAfterText + waitbutton + closetext + end + +TrainerYoungsterGordon: + trainer YOUNGSTER, GORDON, EVENT_BEAT_YOUNGSTER_GORDON, YoungsterGordonSeenText, YoungsterGordonBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext YoungsterGordonAfterText + waitbutton + closetext + end + +TrainerBirdKeeperPeter: + trainer BIRD_KEEPER, PETER, EVENT_BEAT_BIRD_KEEPER_PETER, BirdKeeperPeterSeenText, BirdKeeperPeterBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BirdKeeperPeterAfterText + waitbutton + closetext + end + +FriedaScript: + faceplayer + opentext + checkevent EVENT_GOT_POISON_BARB_FROM_FRIEDA + iftrue .Friday + readvar VAR_WEEKDAY + ifnotequal FRIDAY, .NotFriday + checkevent EVENT_MET_FRIEDA_OF_FRIDAY + iftrue .MetFrieda + writetext MeetFriedaText + promptbutton + setevent EVENT_MET_FRIEDA_OF_FRIDAY +.MetFrieda: + writetext FriedaGivesGiftText + promptbutton + verbosegiveitem POISON_BARB + iffalse .Done + setevent EVENT_GOT_POISON_BARB_FROM_FRIEDA + writetext FriedaGaveGiftText + waitbutton + closetext + end + +.Friday: + writetext FriedaFridayText + waitbutton +.Done: + closetext + end + +.NotFriday: + writetext FriedaNotFridayText + waitbutton + closetext + end + +Route32GreatBall: + itemball GREAT_BALL + +Route32Repel: + itemball REPEL + +Route32Sign: + jumptext Route32SignText + +Route32RuinsSign: + jumptext Route32RuinsSignText + +Route32UnionCaveSign: + jumptext Route32UnionCaveSignText + +Route32PokecenterSign: + jumpstd PokecenterSignScript + +Route32HiddenGreatBall: + hiddenitem GREAT_BALL, EVENT_ROUTE_32_HIDDEN_GREAT_BALL + +Route32HiddenSuperPotion: + hiddenitem SUPER_POTION, EVENT_ROUTE_32_HIDDEN_SUPER_POTION + +Movement_Route32CooltrainerMPushesYouBackToViolet: + step UP + step UP + step_end + +Movement_Route32CooltrainerMReset1: + step DOWN + step_end + +Movement_Route32CooltrainerMReset2: + step RIGHT + step_end + +Route32CooltrainerMText_WhatsTheHurry: + text "Wait up!" + line "What's the hurry?" + done + +Route32CooltrainerMText_AideIsWaiting: + text ", right?" + line "Some guy wearing" + + para "glasses was look-" + line "ing for you." + + para "See for yourself." + line "He's waiting for" + + para "you at the #MON" + line "CENTER." + done + +Route32CooltrainerMText_UnusedSproutTower: + text "Have you gone to" + line "SPROUT TOWER?" + + para "If you ever visit" + line "VIOLET CITY, " + + para "they'll expect you" + line "to train there." + + para "That's basic for" + line "trainers. Go to" + cont "SPROUT TOWER!" + done + +Route32CooltrainerMText_VioletGym: + text "Have you gone to" + line "the #MON GYM?" + + para "You can test your" + line "#MON and your-" + cont "self there." + + para "It's a rite of" + line "passage for all" + cont "trainers!" + done + +Route32CooltrainerMText_HaveThisSeed: + text "You have some good" + line "#MON there." + + para "It must be from" + line "the training you" + + para "gave them around" + line "VIOLET CITY." + + para "The training at" + line "the GYM must have" + + para "been especially" + line "helpful." + + para "As a souvenir of" + line "VIOLET CITY, take" + cont "this." + + para "It increases the" + line "power of grass-" + cont "type moves." + done + +Route32CooltrainerMText_ExperiencesShouldBeUseful: + text "Your experiences" + line "in VIOLET CITY" + + para "should be useful" + line "for your journey." + done + +Text_MillionDollarSlowpokeTail: + text "How would you like" + line "to have this" + + para "tasty, nutritious" + line "SLOWPOKETAIL?" + + para "For you right now," + line "just ¥1,000,000!" + + para "You'll want this!" + done + +Text_ThoughtKidsWereLoaded: + text "Tch! I thought" + line "kids these days" + cont "were loaded…" + done + +Text_RefusedToBuySlowpokeTail: + text "You don't want it?" + line "Then scram. Shoo!" + done + +FisherJustinSeenText: + text "Whoa!" + + para "You made me lose" + line "that fish!" + done + +FisherJustinBeatenText: + text "Sploosh!" + done + +FisherJustinAfterText: + text "Calm, collected…" + line "The essence of" + + para "fishing and #-" + line "MON is the same." + done + +FisherRalph1SeenText: + text "I'm really good at" + line "both fishing and" + cont "#MON." + + para "I'm not about to" + line "lose to any kid!" + done + +FisherRalph1BeatenText: + text "Tch! I tried to" + line "rush things…" + done + +FisherRalphAfterText: + text "Fishing is a life-" + line "long passion." + + para "#MON are life-" + line "long friends!" + done + +FisherRalphSwarmText: + text "One, two, three…" + line "Muahahaha, what a" + + para "great haul!" + line "I'm done! Go ahead" + + para "and catch as many" + line "as you can, kid!" + done + +Route32UnusedFisher1SeenText: ; unreferenced + text "I keep catching" + line "the same #MON…" + + para "Maybe a battle" + line "will turn things" + cont "around for me." + done + +Route32UnusedFisher1BeatenText: ; unreferenced + text "Nothing ever goes" + line "right for me now…" + done + +Route32UnusedFisher1AfterText: ; unreferenced + text "How come the guy" + line "next to me catches" + cont "good #MON?" + done + +Route32UnusedFisher2SeenText: ; unreferenced + text "Heh, I'm on a roll" + line "today. How about a" + cont "battle, kid?" + done + +Route32UnusedFisher2BeatenText: ; unreferenced + text "Oof. I wasn't" + line "lucky that time." + done + +Route32UnusedFisher2AfterText: ; unreferenced + text "You have to have a" + line "good ROD if you" + + para "want to catch good" + line "#MON." + done + +FisherHenrySeenText: + text "My #MON?" + line "Freshly caught!" + done + +FisherHenryBeatenText: + text "SPLASH?" + done + +FisherHenryAfterText: + text "Freshly caught" + line "#MON are no" + + para "match for properly" + line "raised ones." + done + +YoungsterAlbertSeenText: + text "I haven't seen you" + line "around before." + + para "So you think you" + line "are pretty tough?" + done + +YoungsterAlbertBeatenText: + text "You're strong!" + done + +YoungsterAlbertAfterText: + text "I'm going to try" + line "to be the best" + cont "with my favorites." + + para "I'm not using the" + line "same tough #MON" + cont "as everyone else." + done + +YoungsterGordonSeenText: + text "I found some good" + line "#MON in the" + cont "grass!" + + para "I think they'll do" + line "it for me!" + done + +YoungsterGordonBeatenText: + text "Darn. I thought I" + line "could win." + done + +YoungsterGordonAfterText: + text "The grass is full" + line "of clingy things." + done + +CamperRolandSeenText: + text "That glance…" + line "It's intriguing." + done + +CamperRolandBeatenText: + text "Hmmm. This is" + line "disappointing." + done + +CamperRolandAfterText: + text "If you don't want" + line "to battle, just" + cont "avoid eye contact." + done + +PicnickerLiz1SeenText: + text "Uh-huh. Yeah, and" + line "you know…" + + para "Pardon? Battle?" + line "I'm on the phone." + + para "Oh, all right. But" + line "make it fast." + done + +PicnickerLiz1BeatenText: + text "Oh! I've got to" + line "relieve my anger!" + done + +PicnickerLiz1AfterText: + text "I was having a" + line "nice chat too." + done + +BirdKeeperPeterSeenText: + text "That BADGE! It's" + line "from VIOLET CITY!" + + para "You beat FALKNER?" + done + +BirdKeeperPeterBeatenText: + text "I know what my" + line "weaknesses are." + done + +BirdKeeperPeterAfterText: + text "I should train" + line "again at the GYM" + cont "in VIOLET CITY." + done + +Route32UnusedText: ; unreferenced + text "The fishermen" + line "yelled at me for" + cont "bugging them…" + done + +Text_RoarIntro: + text "WROOOOAR!" + line "PEOPLE RUN WHEN I" + + para "ROAR! BUT YOU" + line "CAME LOOKING!" + + para "THAT PLEASES ME!" + line "NOW TAKE THIS!" + done + +Text_RoarOutro: + text "WROOOAR!" + line "IT'S ROAR!" + + para "EVEN #MON RUN" + line "FROM A GOOD ROAR!" + done + +MeetFriedaText: + text "FRIEDA: Yahoo!" + line "It's Friday!" + + para "I'm FRIEDA of" + line "Friday!" + + para "Nice to meet you!" + done + +FriedaGivesGiftText: + text "Here's a POISON" + line "BARB for you!" + done + +FriedaGaveGiftText: + text "FRIEDA: Give it to" + line "a #MON that has" + cont "poison-type moves." + + para "Oh!" + + para "It's wicked!" + + para "You'll be shocked" + line "how good it makes" + cont "poison moves!" + done + +FriedaFridayText: + text "FRIEDA: Hiya! What" + line "day do you like?" + + para "I love Friday. No" + line "doubt about it!" + + para "Don't you think" + line "it's great too?" + done + +FriedaNotFridayText: + text "FRIEDA: Isn't it" + line "Friday today?" + + para "It's so boring" + line "when it's not!" + done + +Route32SignText: + text "ROUTE 32" + + para "VIOLET CITY -" + line "AZALEA TOWN" + done + +Route32RuinsSignText: + text "RUINS OF ALPH" + line "EAST ENTRANCE" + done + +Route32UnionCaveSignText: + text "UNION CAVE" + line "AHEAD" + done + +Route32_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 11, 73, ROUTE_32_POKECENTER_1F, 1 + warp_event 4, 2, ROUTE_32_RUINS_OF_ALPH_GATE, 3 + warp_event 4, 3, ROUTE_32_RUINS_OF_ALPH_GATE, 4 + warp_event 6, 79, UNION_CAVE_1F, 4 + + def_coord_events + coord_event 18, 8, SCENE_ROUTE32_COOLTRAINER_M_BLOCKS, Route32CooltrainerMStopsYouScene + coord_event 7, 71, SCENE_ROUTE32_OFFER_SLOWPOKETAIL, Route32WannaBuyASlowpokeTailScript + + def_bg_events + bg_event 13, 5, BGEVENT_READ, Route32Sign + bg_event 9, 1, BGEVENT_READ, Route32RuinsSign + bg_event 10, 84, BGEVENT_READ, Route32UnionCaveSign + bg_event 12, 73, BGEVENT_READ, Route32PokecenterSign + bg_event 12, 67, BGEVENT_ITEM, Route32HiddenGreatBall + bg_event 11, 40, BGEVENT_ITEM, Route32HiddenSuperPotion + + def_object_events + object_event 8, 49, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherJustin, -1 + object_event 12, 56, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerFisherRalph1, -1 + object_event 6, 48, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherHenry, -1 + object_event 12, 22, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterAlbert, -1 + object_event 4, 63, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterGordon, -1 + object_event 3, 45, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerCamperRoland, -1 + object_event 10, 30, SPRITE_LASS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerPicnickerLiz1, -1 + object_event 19, 8, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route32CooltrainerMScript, -1 + object_event 11, 82, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBirdKeeperPeter, -1 + object_event 7, 70, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SlowpokeTailSalesmanScript, EVENT_SLOWPOKE_WELL_ROCKETS + object_event 6, 53, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route32GreatBall, EVENT_ROUTE_32_GREAT_BALL + object_event 15, 13, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route32RoarTMGuyScript, -1 + object_event 12, 67, SPRITE_LASS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, FriedaScript, EVENT_ROUTE_32_FRIEDA_OF_FRIDAY + object_event 3, 30, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route32Repel, EVENT_ROUTE_32_REPEL diff --git a/maps/Route32.blk b/maps/Route32.blk new file mode 100644 index 0000000..7dbc354 --- /dev/null +++ b/maps/Route32.blk @@ -0,0 +1,8 @@ + G G + +jpkUjk +lnqkYhilrmjqiOlsmjkShiclma\]jkjpkZjqihomhqilmhqihqijpqqijppqqqqilrrrrrrmT +vvTvvy65 +X555655X555655X5655XCC5655X655XC655X5655X5655aX5X5X5\]^X5b`X5X5jpk`X5hqi`X5hqqpkaXqqosmXqqiZQ +qqiqqi +Eqqqppppkqqqqqqqi \ No newline at end of file diff --git a/maps/Route32Pokecenter1F.asm b/maps/Route32Pokecenter1F.asm new file mode 100644 index 0000000..640def5 --- /dev/null +++ b/maps/Route32Pokecenter1F.asm @@ -0,0 +1,110 @@ + object_const_def + const ROUTE32POKECENTER1F_NURSE + const ROUTE32POKECENTER1F_FISHING_GURU + const ROUTE32POKECENTER1F_COOLTRAINER_F + +Route32Pokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +Route32Pokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +Route32Pokecenter1FFishingGuruScript: + faceplayer + opentext + checkevent EVENT_GOT_OLD_ROD + iftrue .GotOldRod + writetext Route32Pokecenter1FFishingGuruText_Question + yesorno + iffalse .Refused + writetext Route32Pokecenter1FFishingGuruText_Yes + promptbutton + verbosegiveitem OLD_ROD + writetext Route32Pokecenter1FFishingGuruText_GiveOldRod + waitbutton + closetext + setevent EVENT_GOT_OLD_ROD + end + +.Refused: + writetext Route32Pokecenter1FFishingGuruText_No + waitbutton + closetext + end + +.GotOldRod: + writetext Route32Pokecenter1FFishingGuruText_After + waitbutton + closetext + end + +Route32Pokecenter1FCooltrainerFScript: + jumptextfaceplayer Route32Pokecenter1FCooltrainerFText + +Route32Pokecenter1FFishingGuruText_Question: + text "This is a great" + line "fishing spot." + + para "You saw people" + line "fishing? How" + cont "about you?" + + para "Would you like one" + line "of my RODS?" + done + +Route32Pokecenter1FFishingGuruText_Yes: + text "Heh, that's good" + line "to hear." + + para "Now you're an" + line "angler too!" + done + +Route32Pokecenter1FFishingGuruText_GiveOldRod: + text "Fishing is great!" + + para "If there's water," + line "be it the sea or a" + + para "stream, try out" + line "your ROD." + done + +Route32Pokecenter1FFishingGuruText_No: + text "Oh. That's rather" + line "disappointing…" + done + +Route32Pokecenter1FFishingGuruText_After: + text "Yo, kid. How are" + line "they biting?" + done + +Route32Pokecenter1FCooltrainerFText: + text "What should I make" + line "my #MON hold?" + + para "Maybe an item that" + line "increases ATTACK" + cont "power…" + done + +Route32Pokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, ROUTE_32, 1 + warp_event 4, 7, ROUTE_32, 1 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route32Pokecenter1FNurseScript, -1 + object_event 1, 4, SPRITE_FISHING_GURU, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route32Pokecenter1FFishingGuruScript, -1 + object_event 6, 2, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route32Pokecenter1FCooltrainerFScript, -1 diff --git a/maps/Route32RuinsOfAlphGate.asm b/maps/Route32RuinsOfAlphGate.asm new file mode 100644 index 0000000..c30f4cb --- /dev/null +++ b/maps/Route32RuinsOfAlphGate.asm @@ -0,0 +1,63 @@ + object_const_def + const ROUTE32RUINSOFALPHGATE_OFFICER + const ROUTE32RUINSOFALPHGATE_POKEFAN_M + const ROUTE32RUINSOFALPHGATE_YOUNGSTER + +Route32RuinsOfAlphGate_MapScripts: + def_scene_scripts + + def_callbacks + +Route32RuinsOfAlphGateOfficerScript: + jumptextfaceplayer Route32RuinsOfAlphGateOfficerText + +Route32RuinsOfAlphGatePokefanMScript: + jumptextfaceplayer Route32RuinsOfAlphGatePokefanMText + +Route32RuinsOfAlphGateYoungsterScript: + jumptextfaceplayer Route32RuinsOfAlphGateYoungsterText + +Route32RuinsOfAlphGateOfficerText: + text "RUINS OF ALPH" + + para "A Look-and-Touch" + line "Tourist Site" + + para "Try the sliding" + line "stone panels!" + done + +Route32RuinsOfAlphGatePokefanMText: + text "You're studying" + line "the RUINS?" + + para "I see a scientist" + line "in the making." + done + +Route32RuinsOfAlphGateYoungsterText: + text "There are drawings" + line "on stone panels." + + para "I tried moving" + line "them. I wonder" + cont "what they are." + done + +Route32RuinsOfAlphGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 4, RUINS_OF_ALPH_OUTSIDE, 10 + warp_event 0, 5, RUINS_OF_ALPH_OUTSIDE, 11 + warp_event 9, 4, ROUTE_32, 2 + warp_event 9, 5, ROUTE_32, 3 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route32RuinsOfAlphGateOfficerScript, -1 + object_event 8, 2, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, Route32RuinsOfAlphGatePokefanMScript, -1 + object_event 1, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route32RuinsOfAlphGateYoungsterScript, -1 diff --git a/maps/Route33.asm b/maps/Route33.asm new file mode 100644 index 0000000..389f865 --- /dev/null +++ b/maps/Route33.asm @@ -0,0 +1,209 @@ + object_const_def + const ROUTE33_POKEFAN_M + const ROUTE33_LASS + const ROUTE33_FRUIT_TREE + +Route33_MapScripts: + def_scene_scripts + + def_callbacks + +Route33LassScript: + jumptextfaceplayer Route33LassText + +TrainerHikerAnthony: + trainer HIKER, ANTHONY2, EVENT_BEAT_HIKER_ANTHONY, HikerAnthony2SeenText, HikerAnthony2BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_HIKER_ANTHONY + endifjustbattled + opentext + checkflag ENGINE_ANTHONY_READY_FOR_REMATCH + iftrue .Rematch + checkflag ENGINE_DUNSPARCE_SWARM + iftrue .Swarm + checkcellnum PHONE_HIKER_ANTHONY + iftrue .NumberAccepted + checkevent EVENT_ANTHONY_ASKED_FOR_PHONE_NUMBER + iftrue .AskAgain + writetext HikerAnthony2AfterText + promptbutton + setevent EVENT_ANTHONY_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .AskForPhoneNumber + +.AskAgain: + scall .AskNumber2 +.AskForPhoneNumber: + askforphonenumber PHONE_HIKER_ANTHONY + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, HIKER, ANTHONY2 + scall .RegisteredNumber + sjump .NumberAccepted + +.Rematch: + scall .RematchStd + winlosstext HikerAnthony2BeatenText, 0 + readmem wAnthonyFightCount + ifequal 4, .Fight4 + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight4: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight4 +.Fight3: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight3 +.Fight2: + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .LoadFight2 +.Fight1: + checkflag ENGINE_FLYPOINT_OLIVINE + iftrue .LoadFight1 +.LoadFight0: + loadtrainer HIKER, ANTHONY2 + startbattle + reloadmapafterbattle + loadmem wAnthonyFightCount, 1 + clearflag ENGINE_ANTHONY_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer HIKER, ANTHONY1 + startbattle + reloadmapafterbattle + loadmem wAnthonyFightCount, 2 + clearflag ENGINE_ANTHONY_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer HIKER, ANTHONY3 + startbattle + reloadmapafterbattle + loadmem wAnthonyFightCount, 3 + clearflag ENGINE_ANTHONY_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer HIKER, ANTHONY4 + startbattle + reloadmapafterbattle + loadmem wAnthonyFightCount, 4 + clearflag ENGINE_ANTHONY_READY_FOR_REMATCH + end + +.LoadFight4: + loadtrainer HIKER, ANTHONY5 + startbattle + reloadmapafterbattle + clearflag ENGINE_ANTHONY_READY_FOR_REMATCH + end + +.Swarm: + writetext HikerAnthonyDunsparceText + waitbutton + closetext + end + +.AskNumber1: + jumpstd AskNumber1MScript + end + +.AskNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberMScript + end + +.NumberAccepted: + jumpstd NumberAcceptedMScript + end + +.NumberDeclined: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.RematchStd: + jumpstd RematchMScript + end + +Route33Sign: + jumptext Route33SignText + +Route33FruitTree: + fruittree FRUITTREE_ROUTE_33 + +HikerAnthony2SeenText: + text "I came through the" + line "tunnel, but I" + + para "still have plenty" + line "of energy left." + done + +HikerAnthony2BeatenText: + text "Whoa! You've got" + line "more zip than me!" + done + +HikerAnthony2AfterText: + text "We HIKERS are at" + line "our best in the" + cont "mountains." + done + +HikerAnthonyDunsparceText: + text "Hey, did you get a" + line "DUNSPARCE?" + + para "I caught one too." + + para "Take a look at it" + line "in the light. It's" + cont "got a funny face!" + done + +Route33LassText: + text "Pant, pant…" + + para "I finally got" + line "through that cave." + + para "It was much bigger" + line "than I'd expected." + + para "I got too tired to" + line "explore the whole" + + para "thing, so I came" + line "outside." + done + +Route33SignText: + text "ROUTE 33" + done + +Route33_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 11, 9, UNION_CAVE_1F, 3 + + def_coord_events + + def_bg_events + bg_event 11, 11, BGEVENT_READ, Route33Sign + + def_object_events + object_event 6, 13, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerHikerAnthony, -1 + object_event 13, 16, SPRITE_LASS, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route33LassScript, -1 + object_event 14, 16, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route33FruitTree, -1 diff --git a/maps/Route33.blk b/maps/Route33.blk new file mode 100644 index 0000000..32b7087 --- /dev/null +++ b/maps/Route33.blk @@ -0,0 +1,4 @@ +qqqqqqqirrrrnqqihqqi +hqqilsrm +/NGjpk +RWKlnihilm \ No newline at end of file diff --git a/maps/Route34.asm b/maps/Route34.asm new file mode 100644 index 0000000..abadb9c --- /dev/null +++ b/maps/Route34.asm @@ -0,0 +1,793 @@ + object_const_def + const ROUTE34_YOUNGSTER1 + const ROUTE34_YOUNGSTER2 + const ROUTE34_YOUNGSTER3 + const ROUTE34_LASS + const ROUTE34_OFFICER + const ROUTE34_POKEFAN_M + const ROUTE34_GRAMPS + const ROUTE34_DAY_CARE_MON_1 + const ROUTE34_DAY_CARE_MON_2 + const ROUTE34_COOLTRAINER_F1 + const ROUTE34_COOLTRAINER_F2 + const ROUTE34_COOLTRAINER_F3 + const ROUTE34_POKE_BALL + +Route34_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, Route34EggCheckCallback + +Route34EggCheckCallback: + checkflag ENGINE_DAY_CARE_MAN_HAS_EGG + iftrue .PutDayCareManOutside + clearevent EVENT_DAY_CARE_MAN_IN_DAY_CARE + setevent EVENT_DAY_CARE_MAN_ON_ROUTE_34 + sjump .CheckMon1 + +.PutDayCareManOutside: + setevent EVENT_DAY_CARE_MAN_IN_DAY_CARE + clearevent EVENT_DAY_CARE_MAN_ON_ROUTE_34 + sjump .CheckMon1 + +.CheckMon1: + checkflag ENGINE_DAY_CARE_MAN_HAS_MON + iffalse .HideMon1 + clearevent EVENT_DAY_CARE_MON_1 + sjump .CheckMon2 + +.HideMon1: + setevent EVENT_DAY_CARE_MON_1 + sjump .CheckMon2 + +.CheckMon2: + checkflag ENGINE_DAY_CARE_LADY_HAS_MON + iffalse .HideMon2 + clearevent EVENT_DAY_CARE_MON_2 + endcallback + +.HideMon2: + setevent EVENT_DAY_CARE_MON_2 + endcallback + +DayCareManScript_Outside: + faceplayer + opentext + special DayCareManOutside + waitbutton + closetext + ifequal TRUE, .end_fail + clearflag ENGINE_DAY_CARE_MAN_HAS_EGG + readvar VAR_FACING + ifequal RIGHT, .walk_around_player + applymovement ROUTE34_GRAMPS, Route34MovementData_DayCareManWalksBackInside + playsound SFX_ENTER_DOOR + disappear ROUTE34_GRAMPS +.end_fail + end + +.walk_around_player + applymovement ROUTE34_GRAMPS, Route34MovementData_DayCareManWalksBackInside_WalkAroundPlayer + playsound SFX_ENTER_DOOR + disappear ROUTE34_GRAMPS + end + +DayCareMon1Script: + opentext + special DayCareMon1 + closetext + end + +DayCareMon2Script: + opentext + special DayCareMon2 + closetext + end + +TrainerCamperTodd1: + trainer CAMPER, TODD1, EVENT_BEAT_CAMPER_TODD, CamperTodd1SeenText, CamperTodd1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_CAMPER_TODD + endifjustbattled + opentext + checkflag ENGINE_TODD_READY_FOR_REMATCH + iftrue .Rematch + checkflag ENGINE_GOLDENROD_DEPT_STORE_SALE_IS_ON + iftrue .SaleIsOn + checkcellnum PHONE_CAMPER_TODD + iftrue .NumberAccepted + checkevent EVENT_TODD_ASKED_FOR_PHONE_NUMBER + iftrue .AskAgain + writetext CamperTodd1AfterText + promptbutton + setevent EVENT_TODD_ASKED_FOR_PHONE_NUMBER + scall .AskNumber + sjump .FinishAsk + +.AskAgain: + scall .AskNumber2 +.FinishAsk: + askforphonenumber PHONE_CAMPER_TODD + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, CAMPER, TODD1 + scall .RegisteredNumber + sjump .NumberAccepted + +.Rematch: + scall .RematchStd + winlosstext CamperTodd1BeatenText, 0 + readmem wToddFightCount + ifequal 4, .Fight4 + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight4: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight4 +.Fight3: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight3 +.Fight2: + checkflag ENGINE_FLYPOINT_BLACKTHORN + iftrue .LoadFight2 +.Fight1: + checkflag ENGINE_FLYPOINT_CIANWOOD + iftrue .LoadFight1 +.LoadFight0: + loadtrainer CAMPER, TODD1 + startbattle + reloadmapafterbattle + loadmem wToddFightCount, 1 + clearflag ENGINE_TODD_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer CAMPER, TODD2 + startbattle + reloadmapafterbattle + loadmem wToddFightCount, 2 + clearflag ENGINE_TODD_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer CAMPER, TODD3 + startbattle + reloadmapafterbattle + loadmem wToddFightCount, 3 + clearflag ENGINE_TODD_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer CAMPER, TODD4 + startbattle + reloadmapafterbattle + loadmem wToddFightCount, 4 + clearflag ENGINE_TODD_READY_FOR_REMATCH + end + +.LoadFight4: + loadtrainer CAMPER, TODD5 + startbattle + reloadmapafterbattle + clearflag ENGINE_TODD_READY_FOR_REMATCH + end + +.SaleIsOn: + writetext CamperToddSaleText + waitbutton + closetext + end + +.AskNumber: + jumpstd AskNumber1MScript + end + +.AskNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberMScript + end + +.NumberAccepted: + jumpstd NumberAcceptedMScript + end + +.NumberDeclined: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.RematchStd: + jumpstd RematchMScript + end + +TrainerPicnickerGina1: + trainer PICNICKER, GINA1, EVENT_BEAT_PICNICKER_GINA, PicnickerGina1SeenText, PicnickerGina1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_PICNICKER_GINA + endifjustbattled + opentext + checkflag ENGINE_GINA_READY_FOR_REMATCH + iftrue .Rematch + checkflag ENGINE_GINA_HAS_LEAF_STONE + iftrue .LeafStone + checkcellnum PHONE_PICNICKER_GINA + iftrue .NumberAccepted + checkevent EVENT_GINA_ASKED_FOR_PHONE_NUMBER + iftrue .AskAgain + writetext PicnickerGina1AfterText + promptbutton + setevent EVENT_GINA_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .FinishAsk + +.AskAgain: + scall .AskNumber2 +.FinishAsk: + askforphonenumber PHONE_PICNICKER_GINA + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, PICNICKER, GINA1 + scall .RegisteredNumber + sjump .NumberAccepted + +.Rematch: + scall .RematchStd + winlosstext PicnickerGina1BeatenText, 0 + readmem wGinaFightCount + ifequal 4, .Fight4 + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight4: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight4 +.Fight3: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight3 +.Fight2: + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .LoadFight2 +.Fight1: + checkflag ENGINE_FLYPOINT_MAHOGANY + iftrue .LoadFight1 +.LoadFight0: + loadtrainer PICNICKER, GINA1 + startbattle + reloadmapafterbattle + loadmem wGinaFightCount, 1 + clearflag ENGINE_GINA_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer PICNICKER, GINA2 + startbattle + reloadmapafterbattle + loadmem wGinaFightCount, 2 + clearflag ENGINE_GINA_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer PICNICKER, GINA3 + startbattle + reloadmapafterbattle + loadmem wGinaFightCount, 3 + clearflag ENGINE_GINA_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer PICNICKER, GINA4 + startbattle + reloadmapafterbattle + loadmem wGinaFightCount, 4 + clearflag ENGINE_GINA_READY_FOR_REMATCH + end + +.LoadFight4: + loadtrainer PICNICKER, GINA5 + startbattle + reloadmapafterbattle + clearflag ENGINE_GINA_READY_FOR_REMATCH + end + +.LeafStone: + scall .Gift + verbosegiveitem LEAF_STONE + iffalse .BagFull + clearflag ENGINE_GINA_HAS_LEAF_STONE + setevent EVENT_GINA_GAVE_LEAF_STONE + sjump .NumberAccepted + +.BagFull: + sjump .PackFull + +.AskNumber1: + jumpstd AskNumber1FScript + end + +.AskNumber2: + jumpstd AskNumber2FScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberFScript + end + +.NumberAccepted: + jumpstd NumberAcceptedFScript + end + +.NumberDeclined: + jumpstd NumberDeclinedFScript + end + +.PhoneFull: + jumpstd PhoneFullFScript + end + +.RematchStd: + jumpstd RematchFScript + end + +.Gift: + jumpstd GiftFScript + end + +.PackFull: + jumpstd PackFullFScript + end + +OfficerKeithScript: + faceplayer + opentext + checktime NITE + iffalse .NoFight + checkevent EVENT_BEAT_OFFICER_KEITH + iftrue .AfterScript + playmusic MUSIC_OFFICER_ENCOUNTER + writetext OfficerKeithSeenText + waitbutton + closetext + winlosstext OfficerKeithWinText, 0 + loadtrainer OFFICER, KEITH + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_OFFICER_KEITH + closetext + end + +.AfterScript: + writetext OfficerKeithAfterText + waitbutton + closetext + end + +.NoFight: + writetext OfficerKeithDaytimeText + waitbutton + closetext + end + +TrainerYoungsterSamuel: + trainer YOUNGSTER, SAMUEL, EVENT_BEAT_YOUNGSTER_SAMUEL, YoungsterSamuelSeenText, YoungsterSamuelBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext YoungsterSamuelAfterText + waitbutton + closetext + end + +TrainerYoungsterIan: + trainer YOUNGSTER, IAN, EVENT_BEAT_YOUNGSTER_IAN, YoungsterIanSeenText, YoungsterIanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext YoungsterIanAfterText + waitbutton + closetext + end + +TrainerPokefanmBrandon: + trainer POKEFANM, BRANDON, EVENT_BEAT_POKEFANM_BRANDON, PokefanmBrandonSeenText, PokefanmBrandonBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanmBrandonAfterText + waitbutton + closetext + end + +TrainerCooltrainerfIrene: + trainer COOLTRAINERF, IRENE, EVENT_BEAT_COOLTRAINERF_IRENE, CooltrainerfIreneSeenText, CooltrainerfIreneBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + checkevent EVENT_GOT_SOFT_SAND_FROM_KATE + iftrue .GotSoftSand + writetext CooltrainerfIreneAfterText1 + waitbutton + closetext + end + +.GotSoftSand: + writetext CooltrainerfIreneAfterText2 + waitbutton + closetext + end + +TrainerCooltrainerfJenn: + trainer COOLTRAINERF, JENN, EVENT_BEAT_COOLTRAINERF_JENN, CooltrainerfJennSeenText, CooltrainerfJennBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + checkevent EVENT_GOT_SOFT_SAND_FROM_KATE + iftrue .GotSoftSand + writetext CooltrainerfJennAfterText1 + waitbutton + closetext + end + +.GotSoftSand: + writetext CooltrainerfJennAfterText2 + waitbutton + closetext + end + +TrainerCooltrainerfKate: + trainer COOLTRAINERF, KATE, EVENT_BEAT_COOLTRAINERF_KATE, CooltrainerfKateSeenText, CooltrainerfKateBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + checkevent EVENT_GOT_SOFT_SAND_FROM_KATE + iftrue .GotSoftSand + writetext CooltrainerfKateOfferSoftSandText + promptbutton + verbosegiveitem SOFT_SAND + iffalse .BagFull + setevent EVENT_GOT_SOFT_SAND_FROM_KATE +.GotSoftSand: + writetext CooltrainerfKateAfterText + waitbutton +.BagFull: + closetext + end + +Route34IlexForestSign: ; unreferenced + jumptext Route34IlexForestSignText + +Route34Sign: + jumptext Route34SignText + +Route34TrainerTips: + jumptext Route34TrainerTipsText + +DayCareSign: + jumptext DayCareSignText + +Route34Nugget: + itemball NUGGET + +Route34HiddenRareCandy: + hiddenitem RARE_CANDY, EVENT_ROUTE_34_HIDDEN_RARE_CANDY + +Route34HiddenSuperPotion: + hiddenitem SUPER_POTION, EVENT_ROUTE_34_HIDDEN_SUPER_POTION + +Route34MovementData_DayCareManWalksBackInside: + slow_step LEFT + slow_step LEFT + slow_step UP + step_end + +Route34MovementData_DayCareManWalksBackInside_WalkAroundPlayer: + slow_step DOWN + slow_step LEFT + slow_step LEFT + slow_step UP + slow_step UP + step_end + +YoungsterSamuelSeenText: + text "This is where I do" + line "my training!" + done + +YoungsterSamuelBeatenText: + text "Beaten by a" + line "passing stranger!" + done + +YoungsterSamuelMobileText: ; unreferenced + text "Have you been to" + line "GOLDENROD CITY?" + + para "Weren't you amazed" + line "by how they've" + + para "changed the" + line "#MON CENTER?" + done + +YoungsterSamuelAfterText: + text "I'm going to train" + line "even harder." + + para "After all, I'm" + line "trying to become" + cont "a GYM LEADER." + done + +YoungsterIanSeenText: + text "I'm the best in my" + line "class at #MON." + done + +YoungsterIanBeatenText: + text "No! There are bet-" + line "ter trainers…" + done + +YoungsterIanAfterText: + text "I'm trying hard so" + line "I can be the star" + cont "in my class." + done + +CamperTodd1SeenText: + text "I'm confident in" + line "my ability to" + cont "raise #MON." + + para "Want to see?" + done + +CamperTodd1BeatenText: + text "Did I screw up my" + line "training?" + done + +CamperTodd1AfterText: + text "Maybe I should" + line "take one to a DAY-" + + para "CARE. Or maybe use" + line "some items…" + done + +CamperToddSaleText: + text "Shopping under the" + line "sky!" + + para "It feels so nice" + line "up on a rooftop." + done + +PicnickerGina1SeenText: + text "Are you a trainer?" + + para "Let's have a" + line "practice battle." + done + +PicnickerGina1BeatenText: + text "Oh, no! I just" + line "can't win…" + done + +PicnickerGina1AfterText: + text "You're too strong" + line "to be a practice" + cont "partner." + done + +OfficerKeithSeenText: + text "Who goes there?" + line "What are you up" + cont "to?" + done + +OfficerKeithWinText: + text "You're a tough" + line "little kid." + done + +OfficerKeithAfterText: + text "Yep, I see nothing" + line "wrong today. You" + + para "be good and stay" + line "out of trouble." + done + +OfficerKeithDaytimeText: + text "I'm on patrol for" + line "suspicious indi-" + cont "viduals." + done + +PokefanmBrandonSeenText: + text "I just got my" + line "#MON back from" + cont "DAY-CARE." + + para "Let's see how much" + line "stronger it got!" + done + +PokefanmBrandonBeatenText: + text "Why does it end" + line "this way?" + done + +PokefanmBrandonAfterText: + text "My #MON knew" + line "moves I didn't" + cont "know it had." + + para "That confounded me" + line "to no end!" + done + +CooltrainerfIreneSeenText: + text "IRENE: Kyaaah!" + line "Someone found us!" + done + +CooltrainerfIreneBeatenText: + text "IRENE: Ohhh!" + line "Too strong!" + done + +CooltrainerfIreneAfterText1: + text "IRENE: My sister" + line "KATE will get you" + cont "for this!" + done + +CooltrainerfIreneAfterText2: + text "IRENE: Isn't this" + line "beach great?" + + para "It's our secret" + line "little getaway!" + done + +CooltrainerfJennSeenText: + text "JENN: You can't" + line "beat IRENE and go" + cont "unpunished!" + done + +CooltrainerfJennBeatenText: + text "JENN: So sorry," + line "IRENE! Sis!" + done + +CooltrainerfJennAfterText1: + text "JENN: Don't get" + line "cocky! My sister" + cont "KATE is tough!" + done + +CooltrainerfJennAfterText2: + text "JENN: Sunlight" + line "makes your body" + cont "stronger." + done + +CooltrainerfKateSeenText: + text "KATE: You sure" + line "were mean to my" + cont "little sisters!" + done + +CooltrainerfKateBeatenText: + text "KATE: No! I can't" + line "believe I lost." + done + +CooltrainerfKateOfferSoftSandText: + text "KATE: You're too" + line "strong. I didn't" + cont "stand a chance." + + para "Here. You deserve" + line "this." + done + +CooltrainerfKateAfterText: + text "KATE: I'm sorry we" + line "jumped you." + + para "We never expected" + line "anyone to find us" + + para "here. You sure" + line "startled us." + done + +Route34IlexForestSignText: + text "ILEX FOREST" + line "THROUGH THE GATE" + done + +Route34SignText: + text "ROUTE 34" + + para "GOLDENROD CITY -" + line "AZALEA TOWN" + + para "ILEX FOREST" + line "SOMEWHERE BETWEEN" + done + +Route34TrainerTipsText: + text "TRAINER TIPS" + + para "BERRY trees grow" + line "new BERRIES" + cont "every day." + + para "Make a note of" + line "which trees bear" + cont "which BERRIES." + done + +DayCareSignText: + text "DAY-CARE" + + para "LET US RAISE YOUR" + line "#MON FOR YOU!" + done + +Route34_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 13, 37, ROUTE_34_ILEX_FOREST_GATE, 1 + warp_event 14, 37, ROUTE_34_ILEX_FOREST_GATE, 2 + warp_event 11, 14, DAY_CARE, 1 + warp_event 11, 15, DAY_CARE, 2 + warp_event 13, 15, DAY_CARE, 3 + + def_coord_events + + def_bg_events + bg_event 12, 6, BGEVENT_READ, Route34Sign + bg_event 13, 33, BGEVENT_READ, Route34TrainerTips + bg_event 10, 13, BGEVENT_READ, DayCareSign + bg_event 8, 32, BGEVENT_ITEM, Route34HiddenRareCandy + bg_event 17, 19, BGEVENT_ITEM, Route34HiddenSuperPotion + + def_object_events + object_event 13, 7, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 5, TrainerCamperTodd1, -1 + object_event 15, 32, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterSamuel, -1 + object_event 11, 20, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerYoungsterIan, -1 + object_event 10, 26, SPRITE_LASS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerPicnickerGina1, -1 + object_event 9, 11, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OfficerKeithScript, -1 + object_event 18, 28, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerPokefanmBrandon, -1 + object_event 15, 16, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DayCareManScript_Outside, EVENT_DAY_CARE_MAN_ON_ROUTE_34 + object_event 14, 18, SPRITE_DAY_CARE_MON_1, SPRITEMOVEDATA_POKEMON, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DayCareMon1Script, EVENT_DAY_CARE_MON_1 + object_event 17, 19, SPRITE_DAY_CARE_MON_2, SPRITEMOVEDATA_POKEMON, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, DayCareMon2Script, EVENT_DAY_CARE_MON_2 + object_event 11, 48, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 5, TrainerCooltrainerfIrene, -1 + object_event 3, 48, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfJenn, -1 + object_event 6, 51, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerCooltrainerfKate, -1 + object_event 7, 30, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route34Nugget, EVENT_ROUTE_34_NUGGET diff --git a/maps/Route34.blk b/maps/Route34.blk new file mode 100644 index 0000000..d327c51 --- /dev/null +++ b/maps/Route34.blk @@ -0,0 +1,10 @@ +5YFD +YIJHIII5 +5 + +E56Y +6Y56Y=56Y,56Y>D56zUDc565YH`ab565Y565YB565YF56YF56YF56YG56Y56Y 56Y 56Y56YB +FF + + + \ No newline at end of file diff --git a/maps/Route34IlexForestGate.asm b/maps/Route34IlexForestGate.asm new file mode 100644 index 0000000..fa91df9 --- /dev/null +++ b/maps/Route34IlexForestGate.asm @@ -0,0 +1,155 @@ + object_const_def + const ROUTE34ILEXFORESTGATE_TEACHER1 + const ROUTE34ILEXFORESTGATE_BUTTERFREE + const ROUTE34ILEXFORESTGATE_LASS + const ROUTE34ILEXFORESTGATE_TEACHER2 + +Route34IlexForestGate_MapScripts: + def_scene_scripts + scene_const SCENE_ROUTE34ILEXFORESTGATE_TEACHER_BLOCKS_IF_FOREST_IS_RESTLESS + + def_callbacks + callback MAPCALLBACK_OBJECTS, Route34IsForestRestlessCallback + +Route34IsForestRestlessCallback: + checkevent EVENT_FOREST_IS_RESTLESS + iffalse .Normal + disappear ROUTE34ILEXFORESTGATE_TEACHER1 + appear ROUTE34ILEXFORESTGATE_TEACHER2 + endcallback + +.Normal: + disappear ROUTE34ILEXFORESTGATE_TEACHER2 + appear ROUTE34ILEXFORESTGATE_TEACHER1 + endcallback + +Route34IlexForestGateCelebiEvent: + checkevent EVENT_FOREST_IS_RESTLESS + iffalse .skip + showemote EMOTE_SHOCK, ROUTE34ILEXFORESTGATE_TEACHER2, 20 + turnobject ROUTE34ILEXFORESTGATE_TEACHER2, LEFT + turnobject PLAYER, RIGHT + follow PLAYER, ROUTE34ILEXFORESTGATE_TEACHER2 + applymovement PLAYER, Route34IlexForestGateTeacherBlocksPlayerMovement + stopfollow + turnobject PLAYER, DOWN + opentext + writetext Route34IlexForestGateTeacher_ForestIsRestless + waitbutton + closetext + applymovement ROUTE34ILEXFORESTGATE_TEACHER2, Route34IlexForestGateTeacherReturnsMovement +.skip: + end + +Route34IlexForestGateTeacherScript: + faceplayer + opentext + checkevent EVENT_FOREST_IS_RESTLESS + iftrue .ForestIsRestless + checkevent EVENT_GOT_TM12_SWEET_SCENT + iftrue .GotSweetScent + writetext Route34IlexForestGateTeacherText + promptbutton + verbosegiveitem TM_SWEET_SCENT + iffalse .NoRoom + setevent EVENT_GOT_TM12_SWEET_SCENT +.GotSweetScent: + writetext Route34IlexForestGateTeacher_GotSweetScent + waitbutton +.NoRoom: + closetext + end + +.ForestIsRestless: + writetext Route34IlexForestGateTeacher_ForestIsRestless + promptbutton + closetext + end + +Route34IlexForestGateButterfreeScript: + opentext + writetext Route34IlexForestGateButterfreeText + cry BUTTERFREE + waitbutton + closetext + end + +Route34IlexForestGateLassScript: + jumptextfaceplayer Route34IlexForestGateLassText + +Route34IlexForestGateTeacherBlocksPlayerMovement: + step UP + step UP + step_end + +Route34IlexForestGateTeacherReturnsMovement: + step DOWN + step RIGHT + step_end + +Route34IlexForestGateTeacherText: + text "Oh, honey. You're" + line "making a #DEX?" + + para "It must be hard if" + line "#MON won't" + + para "appear. Try using" + line "this TM." + done + +Route34IlexForestGateTeacher_GotSweetScent: + text "It's SWEET SCENT." + + para "Use it wherever" + line "#MON appear." + + para "#MON will be" + line "enticed by it." + done + +Route34IlexForestGateTeacher_ForestIsRestless: + text "Something's wrong" + line "in ILEX FOREST…" + + para "You should stay" + line "away right now." + done + +Route34IlexForestGateButterfreeText: + text "BUTTERFREE: Freeh!" + done + +Route34IlexForestGateLassText: + text "Did you see the" + line "shrine honoring" + cont "the protector?" + + para "It watches over" + line "the FOREST from" + cont "across time." + + para "I think that it" + line "must be a grass-" + cont "type #MON." + done + +Route34IlexForestGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 0, ROUTE_34, 1 + warp_event 5, 0, ROUTE_34, 2 + warp_event 4, 7, ILEX_FOREST, 1 + warp_event 5, 7, ILEX_FOREST, 1 + + def_coord_events + coord_event 4, 7, SCENE_ROUTE34ILEXFORESTGATE_TEACHER_BLOCKS_IF_FOREST_IS_RESTLESS, Route34IlexForestGateCelebiEvent + + def_bg_events + + def_object_events + object_event 9, 3, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route34IlexForestGateTeacherScript, EVENT_ROUTE_34_ILEX_FOREST_GATE_TEACHER_BEHIND_COUNTER + object_event 9, 4, SPRITE_BUTTERFREE, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route34IlexForestGateButterfreeScript, -1 + object_event 3, 4, SPRITE_LASS, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route34IlexForestGateLassScript, EVENT_ROUTE_34_ILEX_FOREST_GATE_LASS + object_event 5, 7, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route34IlexForestGateTeacherScript, EVENT_ROUTE_34_ILEX_FOREST_GATE_TEACHER_IN_WALKWAY diff --git a/maps/Route35.asm b/maps/Route35.asm new file mode 100644 index 0000000..2fe0d50 --- /dev/null +++ b/maps/Route35.asm @@ -0,0 +1,488 @@ + object_const_def + const ROUTE35_YOUNGSTER1 + const ROUTE35_YOUNGSTER2 + const ROUTE35_LASS1 + const ROUTE35_LASS2 + const ROUTE35_YOUNGSTER3 + const ROUTE35_FISHER + const ROUTE35_BUG_CATCHER + const ROUTE35_SUPER_NERD + const ROUTE35_OFFICER + const ROUTE35_FRUIT_TREE + const ROUTE35_POKE_BALL + +Route35_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerBirdKeeperBryan: + trainer BIRD_KEEPER, BRYAN, EVENT_BEAT_BIRD_KEEPER_BRYAN, BirdKeeperBryanSeenText, BirdKeeperBryanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BirdKeeperBryanAfterBattleText + waitbutton + closetext + end + +TrainerJugglerIrwin: + trainer JUGGLER, IRWIN1, EVENT_BEAT_JUGGLER_IRWIN, JugglerIrwin1SeenText, JugglerIrwin1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_JUGGLER_IRWIN + endifjustbattled + opentext + checkcellnum PHONE_JUGGLER_IRWIN + iftrue Route35NumberAcceptedM + checkevent EVENT_IRWIN_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext JugglerIrwinAfterBattleText + promptbutton + setevent EVENT_IRWIN_ASKED_FOR_PHONE_NUMBER + scall Route35AskNumber1M + sjump .AskForNumber + +.AskedAlready: + scall Route35AskNumber2M +.AskForNumber: + askforphonenumber PHONE_JUGGLER_IRWIN + ifequal PHONE_CONTACTS_FULL, Route35PhoneFullM + ifequal PHONE_CONTACT_REFUSED, Route35NumberDeclinedM + gettrainername STRING_BUFFER_3, JUGGLER, IRWIN1 + scall Route35RegisteredNumberM + sjump Route35NumberAcceptedM + +Route35AskNumber1M: + jumpstd AskNumber1MScript + end + +Route35AskNumber2M: + jumpstd AskNumber2MScript + end + +Route35RegisteredNumberM: + jumpstd RegisteredNumberMScript + end + +Route35NumberAcceptedM: + jumpstd NumberAcceptedMScript + end + +Route35NumberDeclinedM: + jumpstd NumberDeclinedMScript + end + +Route35PhoneFullM: + jumpstd PhoneFullMScript + end + +Route35RematchM: + jumpstd RematchMScript + end + +TrainerCamperIvan: + trainer CAMPER, IVAN, EVENT_BEAT_CAMPER_IVAN, CamperIvanSeenText, CamperIvanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CamperIvanAfterBattleText + waitbutton + closetext + end + +TrainerCamperElliot: + trainer CAMPER, ELLIOT, EVENT_BEAT_CAMPER_ELLIOT, CamperElliotSeenText, CamperElliotBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CamperElliotAfterBattleText + waitbutton + closetext + end + +TrainerPicnickerBrooke: + trainer PICNICKER, BROOKE, EVENT_BEAT_PICNICKER_BROOKE, PicnickerBrookeSeenText, PicnickerBrookeBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PicnickerBrookeAfterBattleText + waitbutton + closetext + end + +TrainerPicnickerKim: + trainer PICNICKER, KIM, EVENT_BEAT_PICNICKER_KIM, PicnickerKimSeenText, PicnickerKimBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PicnickerKimAfterBattleText + waitbutton + closetext + end + +TrainerBugCatcherArnie: + trainer BUG_CATCHER, ARNIE1, EVENT_BEAT_BUG_CATCHER_ARNIE, BugCatcherArnieSeenText, BugCatcherArnieBeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_BUG_CATCHER_ARNIE + endifjustbattled + opentext + checkflag ENGINE_ARNIE_READY_FOR_REMATCH + iftrue .WantsBattle + checkflag ENGINE_YANMA_SWARM + iftrue .YanmaSwarming + checkcellnum PHONE_BUG_CATCHER_ARNIE + iftrue Route35NumberAcceptedM + checkevent EVENT_ARNIE_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext BugCatcherArnieAfterBattleText + promptbutton + setevent EVENT_ARNIE_ASKED_FOR_PHONE_NUMBER + scall Route35AskNumber1M + sjump .AskForNumber + +.AskedAlready: + scall Route35AskNumber2M +.AskForNumber: + askforphonenumber PHONE_BUG_CATCHER_ARNIE + ifequal PHONE_CONTACTS_FULL, Route35PhoneFullM + ifequal PHONE_CONTACT_REFUSED, Route35NumberDeclinedM + gettrainername STRING_BUFFER_3, BUG_CATCHER, ARNIE1 + scall Route35RegisteredNumberM + sjump Route35NumberAcceptedM + +.WantsBattle: + scall Route35RematchM + winlosstext BugCatcherArnieBeatenText, 0 + readmem wArnieFightCount + ifequal 4, .Fight4 + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight4: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight4 +.Fight3: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight3 +.Fight2: + checkflag ENGINE_FLYPOINT_BLACKTHORN + iftrue .LoadFight2 +.Fight1: + checkflag ENGINE_FLYPOINT_LAKE_OF_RAGE + iftrue .LoadFight1 +.LoadFight0: + loadtrainer BUG_CATCHER, ARNIE1 + startbattle + reloadmapafterbattle + loadmem wArnieFightCount, 1 + clearflag ENGINE_ARNIE_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer BUG_CATCHER, ARNIE2 + startbattle + reloadmapafterbattle + loadmem wArnieFightCount, 2 + clearflag ENGINE_ARNIE_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer BUG_CATCHER, ARNIE3 + startbattle + reloadmapafterbattle + loadmem wArnieFightCount, 3 + clearflag ENGINE_ARNIE_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer BUG_CATCHER, ARNIE4 + startbattle + reloadmapafterbattle + loadmem wArnieFightCount, 4 + clearflag ENGINE_ARNIE_READY_FOR_REMATCH + end + +.LoadFight4: + loadtrainer BUG_CATCHER, ARNIE5 + startbattle + reloadmapafterbattle + clearflag ENGINE_ARNIE_READY_FOR_REMATCH + end + +.YanmaSwarming: + writetext BugCatcherArnieYanmaText + waitbutton + closetext + end + +TrainerFirebreatherWalt: + trainer FIREBREATHER, WALT, EVENT_BEAT_FIREBREATHER_WALT, FirebreatherWaltSeenText, FirebreatherWaltBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FirebreatherWaltAfterBattleText + waitbutton + closetext + end + +TrainerOfficerDirk: + faceplayer + opentext + checktime NITE + iffalse .NotNight + checkevent EVENT_BEAT_OFFICER_DIRK + iftrue .AfterBattle + playmusic MUSIC_OFFICER_ENCOUNTER + writetext OfficerDirkSeenText + waitbutton + closetext + winlosstext OfficerDirkBeatenText, 0 + loadtrainer OFFICER, DIRK + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_OFFICER_DIRK + closetext + end + +.AfterBattle: + writetext OfficerDirkAfterBattleText + waitbutton + closetext + end + +.NotNight: + writetext OfficerDirkPrettyToughText + waitbutton + closetext + end + +Route35Sign: + jumptext Route35SignText + +Route35TMRollout: + itemball TM_ROLLOUT + +Route35FruitTree: + fruittree FRUITTREE_ROUTE_35 + +CamperIvanSeenText: + text "I've been getting" + line "#MON data off" + + para "my radio. I think" + line "I'm good." + done + +CamperIvanBeatenText: + text "I give!" + done + +CamperIvanAfterBattleText: + text "Music on the radio" + line "changes the moods" + cont "of wild #MON." + done + +CamperElliotSeenText: + text "I'm gonna show my" + line "girlfriend I'm hot" + cont "stuff!" + done + +CamperElliotBeatenText: + text "I wish you would" + line "have lost for me…" + done + +CamperElliotAfterBattleText: + text "I was humiliated" + line "in front of my" + cont "girlfriend…" + done + +PicnickerBrookeSeenText: + text "My boyfriend's" + line "weak, so I can't" + cont "rely on him." + done + +PicnickerBrookeBeatenText: + text "Oh, my! You're so" + line "strong!" + done + +PicnickerBrookeAfterBattleText: + text "I can count on my" + line "#MON more than" + cont "my boyfriend." + done + +PicnickerKimSeenText: + text "Are you going to" + line "the GYM? Me too!" + done + +PicnickerKimBeatenText: + text "Oh. I couldn't" + line "win…" + done + +PicnickerKimAfterBattleText: + text "The GYM BADGES are" + line "pretty. I collect" + cont "them." + done + +BirdKeeperBryanSeenText: + text "What kinds of" + line "BALLS do you use?" + done + +BirdKeeperBryanBeatenText: + text "Yikes! Not fast" + line "enough!" + done + +BirdKeeperBryanAfterBattleText: + text "Some #MON flee" + line "right away." + + para "Try catching them" + line "with KURT's FAST" + cont "BALL." + + para "Whenever I find a" + line "WHT APRICORN, I" + cont "take it to KURT." + + para "He turns it into a" + line "custom BALL." + done + +JugglerIrwin1SeenText: + text "Behold my graceful" + line "BALL dexterity!" + done + +JugglerIrwin1BeatenText: + text "Whew! That was a" + line "jolt!" + done + +JugglerIrwinAfterBattleText: + text "I was going to" + line "dazzle you with my" + cont "prize #MON." + + para "But your prowess" + line "electrified me!" + done + +BugCatcherArnieSeenText: + text "I'll go anywhere" + line "if bug #MON" + cont "appear there." + done + +BugCatcherArnieBeatenText: + text "Huh? I shouldn't" + line "have lost that…" + done + +BugCatcherArnieAfterBattleText: + text "My VENONAT won me" + line "the Bug-Catching" + + para "Contest at the" + line "NATIONAL PARK." + done + +BugCatcherArnieYanmaText: + text "Wow… Look at all" + line "those YANMA!" + + para "I'm so blown away," + line "I can't move." + done + +FirebreatherWaltSeenText: + text "I'm practicing my" + line "fire breathing." + done + +FirebreatherWaltBeatenText: + text "Ow! I scorched the" + line "tip of my nose!" + done + +FirebreatherWaltAfterBattleText: + text "The #MON March" + line "on the radio lures" + cont "wild #MON." + done + +OfficerDirkSeenText: + text "Danger lurks in" + line "the night!" + done + +OfficerDirkBeatenText: + text "Whoops!" + done + +OfficerDirkAfterBattleText: + text "You know, night-" + line "time is fun in its" + cont "own ways." + + para "But don't overdo" + line "it, OK?" + done + +OfficerDirkPrettyToughText: + text "Your #MON look" + line "pretty tough." + + para "You could go any-" + line "where safely." + done + +Route35SignText: + text "ROUTE 35" + done + +Route35_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 33, ROUTE_35_GOLDENROD_GATE, 1 + warp_event 10, 33, ROUTE_35_GOLDENROD_GATE, 2 + warp_event 3, 5, ROUTE_35_NATIONAL_PARK_GATE, 3 + + def_coord_events + + def_bg_events + bg_event 1, 7, BGEVENT_READ, Route35Sign + bg_event 11, 31, BGEVENT_READ, Route35Sign + + def_object_events + object_event 4, 19, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerCamperIvan, -1 + object_event 8, 20, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerCamperElliot, -1 + object_event 7, 20, SPRITE_LASS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerPicnickerBrooke, -1 + object_event 10, 26, SPRITE_LASS, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerPicnickerKim, -1 + object_event 14, 28, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 0, TrainerBirdKeeperBryan, -1 + object_event 2, 10, SPRITE_FISHER, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 2, TrainerFirebreatherWalt, -1 + object_event 16, 7, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_STANDING_DOWN, 2, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerBugCatcherArnie, -1 + object_event 5, 10, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerJugglerIrwin, -1 + object_event 5, 6, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, TrainerOfficerDirk, -1 + object_event 2, 25, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route35FruitTree, -1 + object_event 13, 16, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route35TMRollout, EVENT_ROUTE_35_TM_ROLLOUT diff --git a/maps/Route35.blk b/maps/Route35.blk new file mode 100644 index 0000000..8f30b69 --- /dev/null +++ b/maps/Route35.blk @@ -0,0 +1 @@ +< b=G[B@FDFDFDFAAADFDFIIIDTUDXYDXYDXYxDAAAB @AAAF D \ No newline at end of file diff --git a/maps/Route35GoldenrodGate.asm b/maps/Route35GoldenrodGate.asm new file mode 100644 index 0000000..05dd7d8 --- /dev/null +++ b/maps/Route35GoldenrodGate.asm @@ -0,0 +1,214 @@ + object_const_def + const ROUTE35GOLDENRODGATE_RANDY + const ROUTE35GOLDENRODGATE_POKEFAN_F + const ROUTE35GOLDENRODGATE_FISHER + +Route35GoldenrodGate_MapScripts: + def_scene_scripts + + def_callbacks + +RandyScript: + faceplayer + opentext + checkevent EVENT_GOT_HP_UP_FROM_RANDY + iftrue .gothpup + checkevent EVENT_GAVE_KENYA + iftrue .questcomplete + checkevent EVENT_GOT_KENYA + iftrue .alreadyhavekenya + writetext Route35GoldenrodGateRandyAskTakeThisMonToMyFriendText + yesorno + iffalse .refused + writetext Route35GoldenrodGateRandyThanksText + promptbutton + waitsfx + readvar VAR_PARTYCOUNT + ifequal PARTY_LENGTH, .partyfull + writetext Route35GoldenrodGatePlayerReceivedAMonWithMailText + playsound SFX_KEY_ITEM + waitsfx + givepoke SPEAROW, 10, NO_ITEM, GiftSpearowName, GiftSpearowOTName + givepokemail GiftSpearowMail + setevent EVENT_GOT_KENYA +.alreadyhavekenya + writetext Route35GoldenrodGateRandyWeirdTreeBlockingRoadText + waitbutton + closetext + end + +.partyfull + writetext Route35GoldenrodGateRandyCantCarryAnotherMonText + waitbutton + closetext + end + +.refused + writetext Route35GoldenrodGateRandyOhNeverMindThenText + waitbutton + closetext + end + +.questcomplete + writetext Route35GoldenrodGateRandySomethingForYourTroubleText + promptbutton + verbosegiveitem HP_UP + iffalse .bagfull + setevent EVENT_GOT_HP_UP_FROM_RANDY +.gothpup + writetext Route35GoldenrodGateRandyMyPalWasSnoozingRightText + waitbutton +.bagfull + closetext + end + +GiftSpearowMail: + db FLOWER_MAIL + db "DARK CAVE leads" + next "to another road@" + +GiftSpearowName: + db "KENYA@" + +GiftSpearowOTName: + db "RANDY@" + + db 0 ; unused + +Route35GoldenrodGatePokefanFScript: + faceplayer + opentext + checkevent EVENT_FOUGHT_SUDOWOODO + iftrue .FoughtSudowoodo + writetext Route35GoldenrodGatePokefanFText + waitbutton + closetext + end + +.FoughtSudowoodo + writetext Route35GoldenrodGatePokefanFText_FoughtSudowoodo + waitbutton + closetext + end + +Route35GoldenrodGateFisherScript: + jumptextfaceplayer Route35GoldenrodGateFisherText + +Route35GoldenrodGateRandyAskTakeThisMonToMyFriendText: + text "Excuse me, kid!" + line "Can you do a guy" + cont "a favor?" + + para "Can you take this" + line "#MON with MAIL" + cont "to my friend?" + + para "He's on ROUTE 31." + done + +Route35GoldenrodGateRandyThanksText: + text "You will? Perfect!" + line "Thanks, kid!" + + para "My pal's a chubby" + line "guy who snoozes" + cont "all the time." + + para "You'll recognize" + line "him right away!" + done + +Route35GoldenrodGatePlayerReceivedAMonWithMailText: + text " received a" + line "#MON with MAIL." + done + +Route35GoldenrodGateRandyWeirdTreeBlockingRoadText: + text "You can read it," + line "but don't lose it!" + cont "ROUTE 31!" + + para "Oh, yeah. There" + line "was a weird tree" + cont "blocking the road." + + para "I wonder if it's" + line "been cleared?" + done + +Route35GoldenrodGateRandyCantCarryAnotherMonText: + text "You can't carry" + line "another #MON…" + done + +Route35GoldenrodGateRandyOhNeverMindThenText: + text "Oh… Never mind," + line "then…" + done + +Route35GoldenrodGateRandySomethingForYourTroubleText: + text "Thanks, kid! You" + line "made the delivery" + cont "for me!" + + para "Here's something" + line "for your trouble!" + done + +Route35GoldenrodGateRandyMyPalWasSnoozingRightText: + text "My pal was snooz-" + line "ing, right? Heh," + cont "what'd I say?" + done + +Route35GoldenrodGatePokefanFText: + text "A strange tree is" + line "blocking the road." + + para "It wriggles around" + line "if you talk to it." + + para "I heard it became" + line "wild when someone" + + para "watered it with a" + line "SQUIRTBOTTLE." + done + +Route35GoldenrodGatePokefanFText_FoughtSudowoodo: + text "I like the #MON" + line "Lullaby they play" + cont "on the radio." + done + +Route35GoldenrodGateFisherText: + text "I wonder how many" + line "kinds of #MON" + + para "there are in the" + line "world." + + para "Three years ago," + line "PROF.OAK said that" + + para "there were 150" + line "different kinds." + done + +Route35GoldenrodGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 0, ROUTE_35, 1 + warp_event 5, 0, ROUTE_35, 2 + warp_event 4, 7, GOLDENROD_CITY, 12 + warp_event 5, 7, GOLDENROD_CITY, 12 + + def_coord_events + + def_bg_events + + def_object_events + object_event 0, 4, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, RandyScript, -1 + object_event 6, 4, SPRITE_POKEFAN_F, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route35GoldenrodGatePokefanFScript, -1 + object_event 3, 2, SPRITE_FISHER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route35GoldenrodGateFisherScript, -1 diff --git a/maps/Route35NationalParkGate.asm b/maps/Route35NationalParkGate.asm new file mode 100644 index 0000000..b38e564 --- /dev/null +++ b/maps/Route35NationalParkGate.asm @@ -0,0 +1,455 @@ + object_const_def + const ROUTE35NATIONALPARKGATE_OFFICER1 + const ROUTE35NATIONALPARKGATE_YOUNGSTER + const ROUTE35NATIONALPARKGATE_OFFICER2 + +Route35NationalParkGate_MapScripts: + def_scene_scripts + scene_script Route35NationalParkGateNoop1Scene, SCENE_ROUTE35NATIONALPARKGATE_NOOP + scene_script Route35NationalParkGateNoop2Scene, SCENE_ROUTE35NATIONALPARKGATE_UNUSED + scene_script Route35NationalParkGateLeaveContestEarlyScene, SCENE_ROUTE35NATIONALPARKGATE_LEAVE_CONTEST_EARLY + + def_callbacks + callback MAPCALLBACK_NEWMAP, Route35NationalParkGateCheckIfContestRunningCallback + callback MAPCALLBACK_OBJECTS, Route35NationalParkGateCheckIfContestAvailableCallback + +Route35NationalParkGateNoop1Scene: + end + +Route35NationalParkGateNoop2Scene: + end + +Route35NationalParkGateLeaveContestEarlyScene: + sdefer Route35NationalParkGateLeavingContestEarlyScript + end + +Route35NationalParkGateCheckIfContestRunningCallback: + checkflag ENGINE_BUG_CONTEST_TIMER + iftrue Route35NationalParkBugContestIsRunningScript + setscene SCENE_ROUTE35NATIONALPARKGATE_NOOP + endcallback + +Route35NationalParkBugContestIsRunningScript: + setscene SCENE_ROUTE35NATIONALPARKGATE_LEAVE_CONTEST_EARLY + endcallback + +Route35NationalParkGateCheckIfContestAvailableCallback: + readvar VAR_WEEKDAY + ifequal TUESDAY, .SetContestOfficer + ifequal THURSDAY, .SetContestOfficer + ifequal SATURDAY, .SetContestOfficer + checkflag ENGINE_BUG_CONTEST_TIMER + iftrue Route35NationalParkBugContestIsRunningScript + disappear ROUTE35NATIONALPARKGATE_OFFICER1 + appear ROUTE35NATIONALPARKGATE_YOUNGSTER + appear ROUTE35NATIONALPARKGATE_OFFICER2 + endcallback + +.SetContestOfficer: + appear ROUTE35NATIONALPARKGATE_OFFICER1 + disappear ROUTE35NATIONALPARKGATE_YOUNGSTER + disappear ROUTE35NATIONALPARKGATE_OFFICER2 + endcallback + +Route35NationalParkGateLeavingContestEarlyScript: + applymovement PLAYER, Route35NationalParkGatePlayerApproachOfficer1Movement + turnobject ROUTE35NATIONALPARKGATE_OFFICER1, RIGHT + opentext + readvar VAR_CONTESTMINUTES + addval 1 + getnum STRING_BUFFER_3 + writetext Route35NationalParkGateOfficer1WantToFinishText + yesorno + iffalse .GoBackToContest + writetext Route35NationalParkGateOfficer1WaitAtNorthGateText + waitbutton + closetext + jumpstd BugContestResultsWarpScript + +.GoBackToContest: + writetext Route35NationalParkGateOfficer1OkGoFinishText + waitbutton + closetext + scall Route35NationalParkGate_EnterContest + playsound SFX_ENTER_DOOR + special FadeOutPalettes + waitsfx + warpfacing UP, NATIONAL_PARK_BUG_CONTEST, 10, 47 + end + +Route35OfficerScriptContest: + readvar VAR_WEEKDAY + ifequal SUNDAY, Route35NationalParkGate_NoContestToday + ifequal MONDAY, Route35NationalParkGate_NoContestToday + ifequal WEDNESDAY, Route35NationalParkGate_NoContestToday + ifequal FRIDAY, Route35NationalParkGate_NoContestToday + faceplayer + opentext + checkflag ENGINE_DAILY_BUG_CONTEST + iftrue Route35NationalParkGate_ContestIsOver + scall Route35NationalParkGate_GetDayOfWeek + writetext Route35NationalParkGateOfficer1AskToParticipateText + yesorno + iffalse Route35NationalParkGate_DeclinedToParticipate + readvar VAR_PARTYCOUNT + ifgreater 1, Route35NationalParkGate_LeaveTheRestBehind + special ContestDropOffMons + clearevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER +Route35NationalParkGate_OkayToProceed: + setflag ENGINE_BUG_CONTEST_TIMER + special PlayMapMusic + writetext Route35NationalParkGateOfficer1GiveParkBallsText + promptbutton + writetext Route35NationalParkGatePlayerReceivedParkBallsText + playsound SFX_ITEM + waitsfx + writetext Route35NationalParkGateOfficer1ExplainsRulesText + waitbutton + closetext + special GiveParkBalls + scall Route35NationalParkGate_EnterContest + playsound SFX_ENTER_DOOR + special FadeOutPalettes + waitsfx + special SelectRandomBugContestContestants + warpfacing UP, NATIONAL_PARK_BUG_CONTEST, 10, 47 + end + +Route35NationalParkGate_EnterContest: + readvar VAR_FACING + ifequal LEFT, Route35NationalParkGate_FacingLeft + applymovement PLAYER, Route35NationalParkGatePlayerGoAroundOfficerAndEnterParkMovement + end + +Route35NationalParkGate_FacingLeft: + applymovement PLAYER, Route35NationalParkGatePlayerEnterParkMovement + end + +Route35NationalParkGate_LeaveTheRestBehind: + readvar VAR_PARTYCOUNT + ifless PARTY_LENGTH, Route35NationalParkGate_LessThanFullParty + readvar VAR_BOXSPACE + ifequal 0, Route35NationalParkGate_NoRoomInBox + +Route35NationalParkGate_LessThanFullParty: + special CheckFirstMonIsEgg + ifequal TRUE, Route35NationalParkGate_FirstMonIsEgg + writetext Route35NationalParkGateOfficer1AskToUseFirstMonText + yesorno + iffalse Route35NationalParkGate_DeclinedToLeaveMonsBehind + special ContestDropOffMons + iftrue Route35NationalParkGate_FirstMonIsFainted + setevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER + writetext Route35NationalParkGateOfficer1WellHoldYourMonText + promptbutton + writetext Route35NationalParkGatePlayersMonLeftWithHelperText + playsound SFX_GOT_SAFARI_BALLS + waitsfx + promptbutton + sjump Route35NationalParkGate_OkayToProceed + +Route35NationalParkGate_DeclinedToParticipate: + writetext Route35NationalParkGateOfficer1TakePartInFutureText + waitbutton + closetext + end + +Route35NationalParkGate_DeclinedToLeaveMonsBehind: + writetext Route35NationalParkGateOfficer1ChooseMonAndComeBackText + waitbutton + closetext + end + +Route35NationalParkGate_FirstMonIsFainted: + writetext Route35NationalParkGateOfficer1FirstMonCantBattleText + waitbutton + closetext + end + +Route35NationalParkGate_NoRoomInBox: + writetext Route35NationalParkGateOfficer1MakeRoomText + waitbutton + closetext + end + +Route35NationalParkGate_FirstMonIsEgg: + writetext Route35NationalParkGateOfficer1EggAsFirstMonText + waitbutton + closetext + end + +Route35NationalParkGate_ContestIsOver: + writetext Route35NationalParkGateOfficer1ContestIsOverText + waitbutton + closetext + end + +Route35NationalParkGate_NoContestToday: + jumptextfaceplayer Route35NationalParkGateOfficer1WeHoldContestsText + +Route35NationalParkGateOfficerScript: + faceplayer + opentext + checkflag ENGINE_DAILY_BUG_CONTEST + iftrue Route35NationalParkGate_ContestIsOver + writetext Route35NationalParkGateOfficer1WeHoldContestsText + waitbutton + closetext + end + +Route35NationalParkGateYoungsterScript: + jumptextfaceplayer Route35NationalParkGateYoungsterText + +BugCatchingContestExplanationSign: + jumptext BugCatchingContestExplanationText + +Route35NationalParkGate_GetDayOfWeek: + jumpstd DayToTextScript + end + +Route35NationalParkGatePlayerApproachOfficer1Movement: + step DOWN + turn_head LEFT + step_end + +Route35NationalParkGatePlayerGoAroundOfficerAndEnterParkMovement: + step RIGHT + step UP + step UP + step_end + +Route35NationalParkGatePlayerEnterParkMovement: + step UP + step_end + +Route35NationalParkGateOfficer1AskToParticipateText: + text "Today's @" + text_ram wStringBuffer3 + text "." + line "That means the" + + para "Bug-Catching Con-" + line "test is on today." + + para "The rules are sim-" + line "ple." + + para "Using one of your" + line "#MON, catch a" + + para "bug #MON to be" + line "judged." + + para "Would you like to" + line "give it a try?" + done + +Route35NationalParkGateOfficer1GiveParkBallsText: + text "Here are the PARK" + line "BALLS for the" + cont "Contest." + done + +Route35NationalParkGatePlayerReceivedParkBallsText: + text " received" + line "{d:BUG_CONTEST_BALLS} PARK BALLS." + done + +Route35NationalParkGateOfficer1ExplainsRulesText: + text "The person who" + line "gets the strong-" + cont "est bug #MON" + cont "is the winner." + + para "You have {d:BUG_CONTEST_MINUTES}" + line "minutes." + + para "If you run out of" + line "PARK BALLS, you're" + cont "done." + + para "You can keep the" + line "last #MON you" + cont "catch as your own." + + para "Go out and catch" + line "the strongest bug" + + para "#MON you can" + line "find!" + done + +Route35NationalParkGateOfficer1AskToUseFirstMonText: + text "Uh-oh…" + + para "You have more than" + line "one #MON." + + para "You'll have to use" + line "@" + text_ram wStringBuffer3 + text ", the" + + para "first #MON in" + line "your party." + + para "Is that OK with" + line "you?" + done + +Route35NationalParkGateOfficer1WellHoldYourMonText: + text "Fine, we'll hold" + line "your other #MON" + cont "while you compete." + done + +Route35NationalParkGatePlayersMonLeftWithHelperText: + text "'s #MON" + line "were left with the" + cont "CONTEST HELPER." + done + +Route35NationalParkGateOfficer1ChooseMonAndComeBackText: + text "Please choose the" + line "#MON to be used" + + para "in the Contest," + line "then come see me." + done + +Route35NationalParkGateOfficer1TakePartInFutureText: + text "OK. We hope you'll" + line "take part in the" + cont "future." + done + +Route35NationalParkGateOfficer1FirstMonCantBattleText: + text "Uh-oh…" + line "The first #MON" + + para "in your party" + line "can't battle." + + para "Please switch it" + line "with the #MON" + + para "you want to use," + line "then come see me." + done + +Route35NationalParkGateOfficer1MakeRoomText: + text "Uh-oh…" + line "Both your party" + + para "and your PC BOX" + line "are full." + + para "You have no room" + line "to put the bug" + cont "#MON you catch." + + para "Please make room" + line "in your party or" + + para "your PC BOX, then" + line "come see me." + done + +Route35NationalParkGateOfficer1EggAsFirstMonText: + text "Uh-oh…" + line "You have an EGG as" + + para "the first #MON" + line "in your party." + + para "Please switch it" + line "with the #MON" + + para "you want to use," + line "then come see me." + done + +Route35NationalParkGateOfficer1WantToFinishText: + text "You still have @" + text_ram wStringBuffer3 + text_start + line "minute(s) left." + + para "Do you want to" + line "finish now?" + done + +Route35NationalParkGateOfficer1WaitAtNorthGateText: + text "OK. Please wait at" + line "the North Gate for" + + para "the announcement" + line "of the winners." + done + +Route35NationalParkGateOfficer1OkGoFinishText: + text "OK. Please get" + line "back outside and" + cont "finish up." + done + +Route35NationalParkGateOfficer1ContestIsOverText: + text "Today's Contest is" + line "over. We hope you" + + para "will participate" + line "in the future." + done + +Route35NationalParkGateOfficer1WeHoldContestsText: + text "We hold Contests" + line "regularly in the" + + para "PARK. You should" + line "give it a shot." + done + +Route35NationalParkGateYoungsterText: + text "When is the next" + line "Bug-Catching Con-" + cont "test going to be?" + done + +BugCatchingContestExplanationText: + text "The Bug-Catching" + line "Contest is held on" + + para "Tuesday, Thursday" + line "and Saturday." + + para "Not only do you" + line "earn a prize just" + + para "for participating," + line "you also get to" + + para "keep the bug" + line "#MON you may" + + para "have at the end of" + line "the contest." + done + +Route35NationalParkGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 0, NATIONAL_PARK, 3 + warp_event 4, 0, NATIONAL_PARK, 4 + warp_event 3, 7, ROUTE_35, 3 + warp_event 4, 7, ROUTE_35, 3 + + def_coord_events + + def_bg_events + bg_event 5, 0, BGEVENT_READ, BugCatchingContestExplanationSign + + def_object_events + object_event 2, 1, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route35OfficerScriptContest, EVENT_ROUTE_35_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY + object_event 6, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route35NationalParkGateYoungsterScript, EVENT_ROUTE_35_NATIONAL_PARK_GATE_YOUNGSTER + object_event 0, 3, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route35NationalParkGateOfficerScript, EVENT_ROUTE_35_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY diff --git a/maps/Route35NationalParkGate.blk b/maps/Route35NationalParkGate.blk new file mode 100644 index 0000000..14662eb --- /dev/null +++ b/maps/Route35NationalParkGate.blk @@ -0,0 +1 @@ +).,(6 6%& \ No newline at end of file diff --git a/maps/Route36.asm b/maps/Route36.asm new file mode 100644 index 0000000..ec5f7ea --- /dev/null +++ b/maps/Route36.asm @@ -0,0 +1,688 @@ + object_const_def + const ROUTE36_YOUNGSTER1 + const ROUTE36_YOUNGSTER2 + const ROUTE36_WEIRD_TREE + const ROUTE36_LASS1 + const ROUTE36_FISHER + const ROUTE36_FRUIT_TREE + const ROUTE36_ARTHUR + const ROUTE36_FLORIA + const ROUTE36_SUICUNE + +Route36_MapScripts: + def_scene_scripts + scene_script Route36Noop1Scene, SCENE_ROUTE36_NOOP + scene_script Route36Noop2Scene, SCENE_ROUTE36_SUICUNE + + def_callbacks + callback MAPCALLBACK_OBJECTS, Route36ArthurCallback + +Route36Noop1Scene: + end + +Route36Noop2Scene: + end + +Route36ArthurCallback: + readvar VAR_WEEKDAY + ifequal THURSDAY, .ArthurAppears + disappear ROUTE36_ARTHUR + endcallback + +.ArthurAppears: + appear ROUTE36_ARTHUR + endcallback + +Route36SuicuneScript: + showemote EMOTE_SHOCK, PLAYER, 15 + pause 15 + playsound SFX_WARP_FROM + turnobject PLAYER, UP + applymovement ROUTE36_SUICUNE, Route36SuicuneMovement + disappear ROUTE36_SUICUNE + turnobject PLAYER, DOWN + pause 10 + setscene SCENE_ROUTE36_NOOP + clearevent EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY + setmapscene CIANWOOD_CITY, SCENE_CIANWOODCITY_SUICUNE_AND_EUSINE + end + +SudowoodoScript: + checkitem SQUIRTBOTTLE + iftrue .Fight + + waitsfx + playsound SFX_SANDSTORM + applymovement ROUTE36_WEIRD_TREE, SudowoodoShakeMovement + end + +.Fight: + opentext + writetext UseSquirtbottleText + yesorno + iffalse DidntUseSquirtbottleScript + closetext +WateredWeirdTreeScript:: ; export (for when you use Squirtbottle from pack) + opentext + writetext UsedSquirtbottleText + waitbutton + closetext + waitsfx + playsound SFX_SANDSTORM + applymovement ROUTE36_WEIRD_TREE, SudowoodoShakeMovement + opentext + writetext SudowoodoAttackedText + waitbutton + closetext + loadwildmon SUDOWOODO, 20 + startbattle + setevent EVENT_FOUGHT_SUDOWOODO + ifequal DRAW, DidntCatchSudowoodo + disappear ROUTE36_WEIRD_TREE + variablesprite SPRITE_WEIRD_TREE, SPRITE_TWIN + reloadmapafterbattle + end + +DidntUseSquirtbottleScript: + closetext + end + +DidntCatchSudowoodo: + reloadmapafterbattle + applymovement ROUTE36_WEIRD_TREE, WeirdTreeMovement_Flee + disappear ROUTE36_WEIRD_TREE + variablesprite SPRITE_WEIRD_TREE, SPRITE_TWIN + special LoadUsedSpritesGFX + special RefreshSprites + end + +Route36FloriaScript: + faceplayer + opentext + checkevent EVENT_TALKED_TO_FLORIA_AT_FLOWER_SHOP + iftrue .SecondTimeTalking + setevent EVENT_MET_FLORIA + writetext FloriaText1 + waitbutton + closetext + clearevent EVENT_FLORIA_AT_FLOWER_SHOP + readvar VAR_FACING + ifequal UP, .Up + applymovement ROUTE36_FLORIA, FloriaMovement1 + disappear ROUTE36_FLORIA + end + +.Up: + applymovement ROUTE36_FLORIA, FloriaMovement2 + disappear ROUTE36_FLORIA + end + +.SecondTimeTalking: + writetext FloriaText2 + waitbutton + closetext + end + +Route36RockSmashGuyScript: + faceplayer + opentext + checkevent EVENT_GOT_TM08_ROCK_SMASH + iftrue .AlreadyGotRockSmash + checkevent EVENT_FOUGHT_SUDOWOODO + iftrue .ClearedSudowoodo + writetext RockSmashGuyText1 + waitbutton + closetext + end + +.ClearedSudowoodo: + writetext RockSmashGuyText2 + promptbutton + verbosegiveitem TM_ROCK_SMASH + iffalse .NoRoomForTM + setevent EVENT_GOT_TM08_ROCK_SMASH +.AlreadyGotRockSmash: + writetext RockSmashGuyText3 + waitbutton +.NoRoomForTM: + closetext + end + +Route36LassScript: + faceplayer + opentext + checkevent EVENT_FOUGHT_SUDOWOODO + iftrue .ClearedSudowoodo + writetext Route36LassText + waitbutton + closetext + end + +.ClearedSudowoodo: + writetext Route36LassText_ClearedSudowoodo + waitbutton + closetext + end + +TrainerSchoolboyAlan1: + trainer SCHOOLBOY, ALAN1, EVENT_BEAT_SCHOOLBOY_ALAN, SchoolboyAlan1SeenText, SchoolboyAlan1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_SCHOOLBOY_ALAN + endifjustbattled + opentext + checkflag ENGINE_ALAN_READY_FOR_REMATCH + iftrue .ChooseRematch + checkflag ENGINE_ALAN_HAS_FIRE_STONE + iftrue .GiveFireStone + checkcellnum PHONE_SCHOOLBOY_ALAN + iftrue .NumberAccepted + checkevent EVENT_ALAN_ASKED_FOR_PHONE_NUMBER + iftrue .AskAgainForPhoneNumber + writetext SchoolboyAlanBooksText + promptbutton + setevent EVENT_ALAN_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .ContinueAskForPhoneNumber + +.AskAgainForPhoneNumber: + scall .AskNumber2 +.ContinueAskForPhoneNumber: + askforphonenumber PHONE_SCHOOLBOY_ALAN + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, SCHOOLBOY, ALAN1 + scall .RegisteredNumber + sjump .NumberAccepted + +.ChooseRematch: + scall .Rematch + winlosstext SchoolboyAlan1BeatenText, 0 + readmem wAlanFightCount + ifequal 4, .Fight4 + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight4: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight4 +.Fight3: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight3 +.Fight2: + checkflag ENGINE_FLYPOINT_BLACKTHORN + iftrue .LoadFight2 +.Fight1: + checkflag ENGINE_FLYPOINT_OLIVINE + iftrue .LoadFight1 +.LoadFight0: + loadtrainer SCHOOLBOY, ALAN1 + startbattle + reloadmapafterbattle + loadmem wAlanFightCount, 1 + clearflag ENGINE_ALAN_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer SCHOOLBOY, ALAN2 + startbattle + reloadmapafterbattle + loadmem wAlanFightCount, 2 + clearflag ENGINE_ALAN_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer SCHOOLBOY, ALAN3 + startbattle + reloadmapafterbattle + loadmem wAlanFightCount, 3 + clearflag ENGINE_ALAN_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer SCHOOLBOY, ALAN4 + startbattle + reloadmapafterbattle + loadmem wAlanFightCount, 4 + clearflag ENGINE_ALAN_READY_FOR_REMATCH + end + +.LoadFight4: + loadtrainer SCHOOLBOY, ALAN5 + startbattle + reloadmapafterbattle + clearflag ENGINE_ALAN_READY_FOR_REMATCH + end + +.GiveFireStone: + scall .Gift + verbosegiveitem FIRE_STONE + iffalse .BagFull + clearflag ENGINE_ALAN_HAS_FIRE_STONE + setevent EVENT_ALAN_GAVE_FIRE_STONE + sjump .NumberAccepted + +.BagFull: + sjump .PackFull + +.AskNumber1: + jumpstd AskNumber1MScript + end + +.AskNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberMScript + end + +.NumberAccepted: + jumpstd NumberAcceptedMScript + end + +.NumberDeclined: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.Rematch: + jumpstd RematchMScript + end + +.Gift: + jumpstd GiftMScript + end + +.PackFull: + jumpstd PackFullMScript + end + +TrainerPsychicMark: + trainer PSYCHIC_T, MARK, EVENT_BEAT_PSYCHIC_MARK, PsychicMarkSeenText, PsychicMarkBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PsychicMarkAfterBattleText + waitbutton + closetext + end + +ArthurScript: + faceplayer + opentext + checkevent EVENT_GOT_HARD_STONE_FROM_ARTHUR + iftrue .AlreadyGotStone + readvar VAR_WEEKDAY + ifnotequal THURSDAY, ArthurNotThursdayScript + checkevent EVENT_MET_ARTHUR_OF_THURSDAY + iftrue .MetArthur + writetext MeetArthurText + promptbutton + setevent EVENT_MET_ARTHUR_OF_THURSDAY +.MetArthur: + writetext ArthurGivesGiftText + promptbutton + verbosegiveitem HARD_STONE + iffalse .BagFull + setevent EVENT_GOT_HARD_STONE_FROM_ARTHUR + writetext ArthurGaveGiftText + waitbutton + closetext + end + +.AlreadyGotStone: + writetext ArthurThursdayText + waitbutton +.BagFull: + closetext + end + +ArthurNotThursdayScript: + writetext ArthurNotThursdayText + waitbutton + closetext + end + +Route36Sign: + jumptext Route36SignText + +RuinsOfAlphNorthSign: + jumptext RuinsOfAlphNorthSignText + +Route36TrainerTips1: + jumptext Route36TrainerTips1Text + +Route36TrainerTips2: + jumptext Route36TrainerTips2Text + +Route36FruitTree: + fruittree FRUITTREE_ROUTE_36 + +SudowoodoShakeMovement: + tree_shake + step_end + +WeirdTreeMovement_Flee: + fast_jump_step UP + fast_jump_step UP + step_end + +FloriaMovement1: + step DOWN + step DOWN + step DOWN + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step_end + +FloriaMovement2: + step LEFT + step DOWN + step DOWN + step DOWN + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step_end + +Route36SuicuneMovement: + set_sliding + fast_jump_step DOWN + fast_jump_step DOWN + fast_jump_step DOWN + fast_jump_step RIGHT + fast_jump_step RIGHT + fast_jump_step RIGHT + remove_sliding + step_end + +UseSquirtbottleText: + text "It's a weird tree." + line "Use SQUIRTBOTTLE?" + done + +UsedSquirtbottleText: + text " used the" + line "SQUIRTBOTTLE." + done + +SudowoodoAttackedText: + text "The weird tree" + line "doesn't like the" + cont "SQUIRTBOTTLE!" + + para "The weird tree" + line "attacked!" + done + +FloriaText1: + text "I'm the FLOWER" + line "SHOP's FLORIA!" + + para "Listen, listen!" + + para "When I sprinkled" + line "water on that" + + para "wiggly tree, it" + line "jumped right up!" + + para "It just has to be" + line "a #MON." + + para "I bet it would be" + line "shocked out of its" + + para "disguise if you" + line "soaked it!" + + para "I know! I'll tell" + line "my sis and borrow" + cont "her water bottle!" + done + +FloriaText2: + text "When I told my sis" + line "about the jiggly" + + para "tree, she said" + line "it's dangerous." + + para "If I beat WHITNEY," + line "I wonder if she'll" + + para "lend me her water" + line "bottle…" + done + +RockSmashGuyText1: + text "Wa-hey!" + + para "I was going to" + line "snap that tree" + + para "with my straight-" + line "arm punch." + + para "But I couldn't!" + line "I'm a failure!" + done + +RockSmashGuyText2: + text "Did you clear that" + line "wretched tree?" + + para "I'm impressed!" + line "I want you to" + cont "have this." + done + +Text_ReceivedTM08: ; unreferenced + text " received" + line "TM08." + done + +RockSmashGuyText3: + text "That happens to be" + line "ROCK SMASH." + + para "You can shatter" + line "rocks with just a" + + para "single well-aimed" + line "smack." + + para "If any rocks are" + line "in your way, just" + cont "smash 'em up!" + done + +UnusedOddTreeText: ; unreferenced + text "An odd tree is" + line "blocking the way" + cont "to GOLDENROD CITY." + + para "I wanted to go see" + line "the huge #MON" + + para "CENTER they just" + line "opened…" + done + +Route36LassText: + text "An odd tree is" + line "blocking the way" + cont "to GOLDENROD CITY." + + para "It's preventing" + line "me from shopping." + + para "Something should" + line "be done about it." + done + +Route36LassText_ClearedSudowoodo: + text "That odd tree dis-" + line "appeared without a" + cont "trace." + + para "Oh! That tree was" + line "really a #MON?" + done + +PsychicMarkSeenText: + text "I'm going to read" + line "your thoughts!" + done + +PsychicMarkBeatenText: + text "I misread you!" + done + +PsychicMarkAfterBattleText: + text "I'd be strong if" + line "only I could tell" + + para "what my opponent" + line "was thinking." + done + +SchoolboyAlan1SeenText: + text "Thanks to my stud-" + line "ies, I'm ready for" + cont "any #MON!" + done + +SchoolboyAlan1BeatenText: + text "Oops! Computation" + line "error?" + done + +SchoolboyAlanBooksText: + text "Darn. I study five" + line "hours a day too." + + para "There's more to" + line "learning than just" + cont "reading books." + done + +MeetArthurText: + text "ARTHUR: Who are" + line "you?" + + para "I'm ARTHUR of" + line "Thursday." + done + +ArthurGivesGiftText: + text "Here. You can have" + line "this." + done + +ArthurGaveGiftText: + text "ARTHUR: A #MON" + line "that uses rock-" + + para "type moves should" + line "hold on to that." + + para "It pumps up rock-" + line "type attacks." + done + +ArthurThursdayText: + text "ARTHUR: I'm ARTHUR" + line "of Thursday. I'm" + + para "the second son out" + line "of seven children." + done + +ArthurNotThursdayText: + text "ARTHUR: Today's" + line "not Thursday. How" + cont "disappointing." + done + +Route36SignText: + text "ROUTE 36" + done + +RuinsOfAlphNorthSignText: + text "RUINS OF ALPH" + line "NORTH ENTRANCE" + done + +Route36TrainerTips1Text: + text "TRAINER TIPS" + + para "#MON stats" + line "vary--even within" + cont "the same species." + + para "Their stats may be" + line "similar at first." + + para "However, differ-" + line "ences will become" + + para "pronounced as the" + line "#MON grow." + done + +Route36TrainerTips2Text: + text "TRAINER TIPS" + + para "Use DIG to return" + line "to the entrance of" + cont "any place." + + para "It is convenient" + line "for exploring" + + para "caves and other" + line "landmarks." + done + +Route36_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 18, 8, ROUTE_36_NATIONAL_PARK_GATE, 3 + warp_event 18, 9, ROUTE_36_NATIONAL_PARK_GATE, 4 + warp_event 47, 13, ROUTE_36_RUINS_OF_ALPH_GATE, 1 + warp_event 48, 13, ROUTE_36_RUINS_OF_ALPH_GATE, 2 + + def_coord_events + coord_event 20, 7, SCENE_ROUTE36_SUICUNE, Route36SuicuneScript + coord_event 22, 7, SCENE_ROUTE36_SUICUNE, Route36SuicuneScript + + def_bg_events + bg_event 29, 1, BGEVENT_READ, Route36TrainerTips2 + bg_event 45, 11, BGEVENT_READ, RuinsOfAlphNorthSign + bg_event 55, 7, BGEVENT_READ, Route36Sign + bg_event 21, 7, BGEVENT_READ, Route36TrainerTips1 + + def_object_events + object_event 20, 13, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPsychicMark, -1 + object_event 31, 14, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerSchoolboyAlan1, -1 + object_event 35, 9, SPRITE_WEIRD_TREE, SPRITEMOVEDATA_SUDOWOODO, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SudowoodoScript, EVENT_ROUTE_36_SUDOWOODO + object_event 51, 8, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route36LassScript, -1 + object_event 44, 9, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route36RockSmashGuyScript, -1 + object_event 21, 4, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route36FruitTree, -1 + object_event 46, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ArthurScript, EVENT_ROUTE_36_ARTHUR_OF_THURSDAY + object_event 33, 12, SPRITE_LASS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route36FloriaScript, EVENT_FLORIA_AT_SUDOWOODO + object_event 21, 6, SPRITE_SUICUNE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_SAW_SUICUNE_ON_ROUTE_36 diff --git a/maps/Route36.blk b/maps/Route36.blk new file mode 100644 index 0000000..ce31adc --- /dev/null +++ b/maps/Route36.blk @@ -0,0 +1,4 @@ +`Gb]^`bbdef]]^ Gba>^aG=] bdee=]]]b`deGeeeee ` + +` +jppk \ No newline at end of file diff --git a/maps/Route36NationalParkGate.asm b/maps/Route36NationalParkGate.asm new file mode 100644 index 0000000..1bcef7a --- /dev/null +++ b/maps/Route36NationalParkGate.asm @@ -0,0 +1,877 @@ + object_const_def + const ROUTE36NATIONALPARKGATE_OFFICER1 + const ROUTE36NATIONALPARKGATE_YOUNGSTER1 + const ROUTE36NATIONALPARKGATE_YOUNGSTER2 + const ROUTE36NATIONALPARKGATE_ROCKER + const ROUTE36NATIONALPARKGATE_POKEFAN_M + const ROUTE36NATIONALPARKGATE_YOUNGSTER3 + const ROUTE36NATIONALPARKGATE_YOUNGSTER4 + const ROUTE36NATIONALPARKGATE_LASS + const ROUTE36NATIONALPARKGATE_YOUNGSTER5 + const ROUTE36NATIONALPARKGATE_YOUNGSTER6 + const ROUTE36NATIONALPARKGATE_YOUNGSTER7 + const ROUTE36NATIONALPARKGATE_OFFICER2 + +Route36NationalParkGate_MapScripts: + def_scene_scripts + scene_script Route36NationalParkGateNoop1Scene, SCENE_ROUTE36NATIONALPARKGATE_NOOP + scene_script Route36NationalParkGateNoop2Scene, SCENE_ROUTE36NATIONALPARKGATE_UNUSED + scene_script Route36NationalParkGateLeaveContestEarlyScene, SCENE_ROUTE36NATIONALPARKGATE_LEAVE_CONTEST_EARLY + + def_callbacks + callback MAPCALLBACK_NEWMAP, Route36NationalParkGateCheckIfContestRunningCallback + callback MAPCALLBACK_OBJECTS, Route36NationalParkGateCheckIfContestAvailableCallback + +Route36NationalParkGateNoop1Scene: + end + +Route36NationalParkGateNoop2Scene: + end + +Route36NationalParkGateLeaveContestEarlyScene: + sdefer Route36NationalParkGateLeavingContestEarlyScript + end + +Route36NationalParkGateCheckIfContestRunningCallback: + checkflag ENGINE_BUG_CONTEST_TIMER + iftrue .BugContestIsRunning + setscene SCENE_ROUTE36NATIONALPARKGATE_NOOP + endcallback + +.BugContestIsRunning: + setscene SCENE_ROUTE36NATIONALPARKGATE_LEAVE_CONTEST_EARLY + endcallback + +Route36NationalParkGateCheckIfContestAvailableCallback: + checkevent EVENT_WARPED_FROM_ROUTE_35_NATIONAL_PARK_GATE + iftrue .Return + readvar VAR_WEEKDAY + ifequal TUESDAY, .SetContestOfficer + ifequal THURSDAY, .SetContestOfficer + ifequal SATURDAY, .SetContestOfficer + checkflag ENGINE_BUG_CONTEST_TIMER + iftrue .SetContestOfficer + disappear ROUTE36NATIONALPARKGATE_OFFICER1 + appear ROUTE36NATIONALPARKGATE_OFFICER2 + endcallback + +.SetContestOfficer: + appear ROUTE36NATIONALPARKGATE_OFFICER1 + disappear ROUTE36NATIONALPARKGATE_OFFICER2 +.Return: + endcallback + +Route36NationalParkGateLeavingContestEarlyScript: + turnobject PLAYER, UP + opentext + readvar VAR_CONTESTMINUTES + addval 1 + getnum STRING_BUFFER_3 + writetext Route36NationalParkGateOfficer1WantToFinishText + yesorno + iffalse .GoBackToContest + writetext Route36NationalParkGateOfficer1WaitHereForAnnouncementText + waitbutton + closetext + special FadeBlackQuickly + special ReloadSpritesNoPalettes + scall .CopyContestants + disappear ROUTE36NATIONALPARKGATE_OFFICER1 + appear ROUTE36NATIONALPARKGATE_OFFICER2 + applymovement PLAYER, Route36NationalParkGatePlayerWaitWithContestantsMovement + pause 15 + special FadeInQuickly + jumpstd BugContestResultsScript + +.GoBackToContest: + writetext Route36NationalParkGateOfficer1OkGoFinishText + waitbutton + closetext + turnobject PLAYER, LEFT + playsound SFX_EXIT_BUILDING + special FadeOutPalettes + waitsfx + warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, 33, 18 + end + +.CopyContestants: + checkevent EVENT_BUG_CATCHING_CONTESTANT_1A + iftrue .Not1 + appear ROUTE36NATIONALPARKGATE_YOUNGSTER1 +.Not1: + checkevent EVENT_BUG_CATCHING_CONTESTANT_2A + iftrue .Not2 + appear ROUTE36NATIONALPARKGATE_YOUNGSTER2 +.Not2: + checkevent EVENT_BUG_CATCHING_CONTESTANT_3A + iftrue .Not3 + appear ROUTE36NATIONALPARKGATE_ROCKER +.Not3: + checkevent EVENT_BUG_CATCHING_CONTESTANT_4A + iftrue .Not4 + appear ROUTE36NATIONALPARKGATE_POKEFAN_M +.Not4: + checkevent EVENT_BUG_CATCHING_CONTESTANT_5A + iftrue .Not5 + appear ROUTE36NATIONALPARKGATE_YOUNGSTER3 +.Not5: + checkevent EVENT_BUG_CATCHING_CONTESTANT_6A + iftrue .Not6 + appear ROUTE36NATIONALPARKGATE_YOUNGSTER4 +.Not6: + checkevent EVENT_BUG_CATCHING_CONTESTANT_7A + iftrue .Not7 + appear ROUTE36NATIONALPARKGATE_LASS +.Not7: + checkevent EVENT_BUG_CATCHING_CONTESTANT_8A + iftrue .Not8 + appear ROUTE36NATIONALPARKGATE_YOUNGSTER5 +.Not8: + checkevent EVENT_BUG_CATCHING_CONTESTANT_9A + iftrue .Not9 + appear ROUTE36NATIONALPARKGATE_YOUNGSTER6 +.Not9: + checkevent EVENT_BUG_CATCHING_CONTESTANT_10A + iftrue .Not10 + appear ROUTE36NATIONALPARKGATE_YOUNGSTER7 +.Not10: + special UpdateSprites + end + +Route36OfficerScriptContest: + readvar VAR_WEEKDAY + ifequal SUNDAY, _ContestNotOn + ifequal MONDAY, _ContestNotOn + ifequal WEDNESDAY, _ContestNotOn + ifequal FRIDAY, _ContestNotOn + faceplayer + opentext + checkflag ENGINE_DAILY_BUG_CONTEST + iftrue Route36Officer_ContestHasConcluded + scall Route36ParkGate_DayToText + writetext Route36NationalParkGateOfficer1AskToParticipateText + yesorno + iffalse .DecidedNotToJoinContest + readvar VAR_PARTYCOUNT + ifgreater 1, .LeaveMonsWithOfficer + special ContestDropOffMons + clearevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER +.ResumeStartingContest: + setflag ENGINE_BUG_CONTEST_TIMER + special PlayMapMusic + writetext Route36NationalParkGateOfficer1GiveParkBallsText + promptbutton + waitsfx + writetext Route36NationalParkGatePlayerReceivedParkBallsText + playsound SFX_ITEM + waitsfx + writetext Route36NationalParkGateOfficer1ExplainsRulesText + waitbutton + closetext + setflag ENGINE_BUG_CONTEST_TIMER + special GiveParkBalls + turnobject PLAYER, LEFT + playsound SFX_EXIT_BUILDING + special FadeOutPalettes + waitsfx + special SelectRandomBugContestContestants + warpfacing LEFT, NATIONAL_PARK_BUG_CONTEST, 33, 18 + end + +.LeaveMonsWithOfficer: + readvar VAR_PARTYCOUNT + ifless PARTY_LENGTH, .ContinueLeavingMons + readvar VAR_BOXSPACE + ifequal 0, .BoxFull +.ContinueLeavingMons: + special CheckFirstMonIsEgg + ifequal TRUE, .FirstMonIsEgg + writetext Route36NationalParkGateOfficer1AskToUseFirstMonText + yesorno + iffalse .RefusedToLeaveMons + special ContestDropOffMons + iftrue .FirstMonIsFainted + setevent EVENT_LEFT_MONS_WITH_CONTEST_OFFICER + writetext Route36NationalParkGateOfficer1WellHoldYourMonText + promptbutton + writetext Route36NationalParkGatePlayersMonLeftWithHelperText + playsound SFX_GOT_SAFARI_BALLS + waitsfx + promptbutton + sjump .ResumeStartingContest + +.DecidedNotToJoinContest: + writetext Route36NationalParkGateOfficer1TakePartInFutureText + waitbutton + closetext + end + +.RefusedToLeaveMons: + writetext Route36NationalParkGateOfficer1ChooseMonAndComeBackText + waitbutton + closetext + end + +.FirstMonIsFainted: + writetext Route36NationalParkGateOfficer1FirstMonCantBattleText + waitbutton + closetext + end + +.BoxFull: + writetext Route36NationalParkGateOfficer1MakeRoomText + waitbutton + closetext + end + +.FirstMonIsEgg: + writetext Route36NationalParkGateOfficer1EggAsFirstMonText + waitbutton + closetext + end + +Route36Officer_ContestHasConcluded: + checkevent EVENT_CONTEST_OFFICER_HAS_SUN_STONE + iftrue .Sunstone + checkevent EVENT_CONTEST_OFFICER_HAS_EVERSTONE + iftrue .Everstone + checkevent EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY + iftrue .GoldBerry + checkevent EVENT_CONTEST_OFFICER_HAS_BERRY + iftrue .Berry + writetext Route36NationalParkGateOfficer1ContestIsOverText + waitbutton + closetext + end + +.Sunstone: + writetext Route36NationalParkGateOfficer1HeresThePrizeText + promptbutton + verbosegiveitem SUN_STONE + iffalse .BagFull + clearevent EVENT_CONTEST_OFFICER_HAS_SUN_STONE + closetext + end + +.Everstone: + writetext Route36NationalParkGateOfficer1HeresThePrizeText + promptbutton + verbosegiveitem EVERSTONE + iffalse .BagFull + clearevent EVENT_CONTEST_OFFICER_HAS_EVERSTONE + closetext + end + +.GoldBerry: + writetext Route36NationalParkGateOfficer1HeresThePrizeText + promptbutton + verbosegiveitem GOLD_BERRY + iffalse .BagFull + clearevent EVENT_CONTEST_OFFICER_HAS_GOLD_BERRY + closetext + end + +.Berry: + writetext Route36NationalParkGateOfficer1HeresThePrizeText + promptbutton + verbosegiveitem BERRY + iffalse .BagFull + clearevent EVENT_CONTEST_OFFICER_HAS_BERRY + closetext + end + +.BagFull: + writetext Route36NationalParkGateOfficer1WellHoldPrizeText + waitbutton + closetext + end + +_ContestNotOn: + jumptextfaceplayer Route36NationalParkGateOfficer1SomeMonOnlySeenInParkText + +Route36NationalParkGateOfficerScript: + faceplayer + opentext + checkflag ENGINE_DAILY_BUG_CONTEST + iftrue Route36Officer_ContestHasConcluded + writetext Route36NationalParkGateOfficer1SomeMonOnlySeenInParkText + waitbutton + closetext + end + +Route36ParkGate_DayToText: + jumpstd DayToTextScript + end + +BugCatchingContestant1BScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iffalse .StillCompeting + writetext BugCatchingContestant1BText + waitbutton + closetext + end + +.StillCompeting: + writetext BugCatchingContestant1BStillCompetingText + waitbutton + closetext + end + +BugCatchingContestant2BScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iffalse .StillCompeting + writetext BugCatchingContestant2BText + waitbutton + closetext + end + +.StillCompeting: + writetext BugCatchingContestant2BStillCompetingText + waitbutton + closetext + end + +BugCatchingContestant3BScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iffalse .StillCompeting + writetext BugCatchingContestant3BText + waitbutton + closetext + end + +.StillCompeting: + writetext BugCatchingContestant3BStillCompetingText + waitbutton + closetext + end + +BugCatchingContestant4BScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iffalse .StillCompeting + writetext BugCatchingContestant4BText + waitbutton + closetext + end + +.StillCompeting: + writetext BugCatchingContestant4BStillCompetingText + waitbutton + closetext + end + +BugCatchingContestant5BScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iffalse .StillCompeting + writetext BugCatchingContestant5BText + waitbutton + closetext + end + +.StillCompeting: + writetext BugCatchingContestant5BStillCompetingText + waitbutton + closetext + end + +BugCatchingContestant6BScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iffalse .StillCompeting + writetext BugCatchingContestant6BText + waitbutton + closetext + end + +.StillCompeting: + writetext BugCatchingContestant6BStillCompetingText + waitbutton + closetext + end + +BugCatchingContestant7BScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iffalse .StillCompeting + writetext BugCatchingContestant7BText + waitbutton + closetext + end + +.StillCompeting: + writetext BugCatchingContestant7BStillCompetingText + waitbutton + closetext + end + +BugCatchingContestant8BScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iffalse .StillCompeting + writetext BugCatchingContestant8BText + waitbutton + closetext + end + +.StillCompeting: + writetext BugCatchingContestant8BStillCompetingText + waitbutton + closetext + end + +BugCatchingContestant9BScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iffalse .StillCompeting + writetext BugCatchingContestant9BText + waitbutton + closetext + end + +.StillCompeting: + writetext BugCatchingContestant9BStillCompetingText + waitbutton + closetext + end + +BugCatchingContestant10BScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iffalse .StillCompeting + writetext BugCatchingContestant10BText + waitbutton + closetext + end + +.StillCompeting: + writetext BugCatchingContestant10BStillCompetingText + waitbutton + closetext + end + +UnusedBugCatchingContestExplanationSign: ; unreferenced +; duplicate of BugCatchingContestExplanationSign in Route35NationalParkGate.asm + jumptext UnusedBugCatchingContestExplanationText + +Route36NationalParkGatePlayerWaitWithContestantsMovement: + big_step DOWN + big_step RIGHT + turn_head UP + step_end + +Route36NationalParkGateOfficer1AskToParticipateText: + text "Today's @" + text_ram wStringBuffer3 + text "." + line "That means the" + + para "Bug-Catching Con-" + line "test is on today." + + para "The rules are sim-" + line "ple." + + para "Using one of your" + line "#MON, catch a" + + para "bug #MON to be" + line "judged." + + para "Would you like to" + line "give it a try?" + done + +Route36NationalParkGateOfficer1GiveParkBallsText: + text "Here are the PARK" + line "BALLS for the" + cont "Contest." + done + +Route36NationalParkGatePlayerReceivedParkBallsText: + text " received" + line "{d:BUG_CONTEST_BALLS} PARK BALLS." + done + +Route36NationalParkGateOfficer1ExplainsRulesText: + text "The person who" + line "gets the strong-" + cont "est bug #MON" + cont "is the winner." + + para "You have {d:BUG_CONTEST_MINUTES}" + line "minutes." + + para "If you run out of" + line "PARK BALLS, you're" + cont "done." + + para "You can keep the" + line "last #MON you" + cont "catch as your own." + + para "Go out and catch" + line "the strongest bug" + + para "#MON you can" + line "find!" + done + +Route36NationalParkGateOfficer1AskToUseFirstMonText: + text "Uh-oh…" + + para "You have more than" + line "one #MON." + + para "You'll have to use" + line "@" + text_ram wStringBuffer3 + text ", the" + + para "first #MON in" + line "your party." + + para "Is that OK with" + line "you?" + done + +Route36NationalParkGateOfficer1WellHoldYourMonText: + text "Fine, we'll hold" + line "your other #MON" + cont "while you compete." + done + +Route36NationalParkGatePlayersMonLeftWithHelperText: + text "'s #MON" + line "were left with the" + cont "CONTEST HELPER." + done + +Route36NationalParkGateOfficer1ChooseMonAndComeBackText: + text "Please choose the" + line "#MON to be used" + + para "in the Contest," + line "then come see me." + done + +Route36NationalParkGateOfficer1TakePartInFutureText: + text "OK. We hope you'll" + line "take part in the" + cont "future." + done + +Route36NationalParkGateOfficer1FirstMonCantBattleText: + text "Uh-oh…" + line "The first #MON" + + para "in your party" + line "can't battle." + + para "Please switch it" + line "with the #MON" + + para "you want to use," + line "then come see me." + done + +Route36NationalParkGateOfficer1MakeRoomText: + text "Uh-oh…" + line "Both your party" + + para "and your PC BOX" + line "are full." + + para "You have no room" + line "to put the bug" + cont "#MON you catch." + + para "Please make room" + line "in your party or" + + para "your PC BOX, then" + line "come see me." + done + +Route36NationalParkGateOfficer1EggAsFirstMonText: + text "Uh-oh…" + line "You have an EGG as" + + para "the first #MON" + line "in your party." + + para "Please switch it" + line "with the #MON" + + para "you want to use," + line "then come see me." + done + +Route36NationalParkGateOfficer1WantToFinishText: + text "You still have @" + text_ram wStringBuffer3 + text_start + line "minute(s) left." + + para "Do you want to" + line "finish now?" + done + +Route36NationalParkGateOfficer1WaitHereForAnnouncementText: + text "OK. Please wait" + line "here for the" + + para "announcement of" + line "the winners." + done + +Route36NationalParkGateOfficer1OkGoFinishText: + text "OK. Please go back" + line "outside and finish" + cont "up." + done + +Route36NationalParkGateOfficer1ContestIsOverText: + text "Today's Contest is" + line "over. We hope you" + + para "will participate" + line "in the future." + done + +Route36NationalParkGateOfficer1SomeMonOnlySeenInParkText: + text "Some #MON can" + line "only be seen in" + cont "the PARK." + done + +BugCatchingContestant1BText: + text "DON: Wow, you beat" + line "me. You're pretty" + cont "good." + done + +BugCatchingContestant1BStillCompetingText: + text "DON: Luck plays a" + line "big part in this." + + para "You never know" + line "what #MON will" + cont "appear." + done + +BugCatchingContestant2BText: + text "ED: I envy you." + line "I just couldn't" + cont "do it this time." + done + +BugCatchingContestant2BStillCompetingText: + text "ED: Maybe you win" + line "with big #MON?" + done + +BugCatchingContestant3BText: + text "NICK: Well done!" + line "I'm going to raise" + cont "my #MON better." + done + +BugCatchingContestant3BStillCompetingText: + text "NICK: Maybe you" + line "get a higher score" + + para "for a #MON of" + line "an unusual color." + done + +BugCatchingContestant4BText: + text "WILLIAM: You're" + line "the winner? What" + cont "did you catch?" + done + +BugCatchingContestant4BStillCompetingText: + text "WILLIAM: Well, I'm" + line "satisfied because" + + para "I caught a #MON" + line "that I wanted." + done + +BugCatchingContestant5BText: + text "BENNY: Congrats!" + line "You have earned my" + cont "respect!" + done + +BugCatchingContestant5BStillCompetingText: + text "BENNY: I caught a" + line "SCYTHER before," + cont "but I didn't win." + done + +BugCatchingContestant6BText: + text "BARRY: That #-" + line "MON you caught…" + cont "it's awesome!" + done + +BugCatchingContestant6BStillCompetingText: + text "BARRY: It's easier" + line "to win if you get" + + para "a high-level bug" + line "#MON." + + para "But I think they" + line "also consider some" + cont "other points." + done + +BugCatchingContestant7BText: + text "CINDY: You won?" + line "That's great!" + + para "Do you feel like" + line "looking for bug" + cont "#MON with me?" + done + +BugCatchingContestant7BStillCompetingText: + text "CINDY: I really" + line "love bug #MON!" + done + +BugCatchingContestant8BText: + text "JOSH: I… I can't" + line "believe I lost at" + cont "bug-catching…" + done + +BugCatchingContestant8BStillCompetingText: + text "JOSH: I heard that" + line "somebody won with" + cont "a CATERPIE!" + done + +BugCatchingContestant9BText: + text "SAMUEL: Next time," + line "I'm going to win." + done + +BugCatchingContestant9BStillCompetingText: + text "SAMUEL: Darn." + line "I thought I would" + cont "score higher…" + done + +BugCatchingContestant10BText: + text "KIPP: Could you" + line "give me some tips?" + + para "I want to study" + line "your style." + done + +BugCatchingContestant10BStillCompetingText: + text "KIPP: I study a" + line "lot, but that's" + + para "not good enough to" + line "win." + done + +UnusedSilphScope2Text: ; unreferenced +; This text is referring to Sudowoodo. +; The SILPHSCOPE2 was later reworked into the SQUIRTBOTTLE. + text "I hear there's a" + line "#MON that looks" + cont "just like a tree." + + para "You can reveal its" + line "identity using a" + cont "SILPHSCOPE 2." + done + +UnusedBugCatchingContestExplanationText: +; duplicate of BugCatchingContestExplanationText in Route35NationalParkGate.asm + text "The Bug-Catching" + line "Contest is held on" + + para "Tuesday, Thursday" + line "and Saturday." + + para "Not only do you" + line "earn a prize just" + + para "for participating," + line "you also get to" + + para "keep the bug" + line "#MON you may" + + para "have at the end of" + line "the contest." + done + +Route36NationalParkGateOfficer1WellHoldPrizeText: + text "Uh-oh… Your PACK" + line "is full." + + para "We'll hold on to" + line "your prize, but" + cont "only for today." + + para "Please make room," + line "then come see me." + done + +Route36NationalParkGateOfficer1HeresThePrizeText: + text "?" + + para "Here's the prize" + line "we were holding" + cont "for you." + done + +Route36NationalParkGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 4, NATIONAL_PARK, 1 + warp_event 0, 5, NATIONAL_PARK, 2 + warp_event 9, 4, ROUTE_36, 1 + warp_event 9, 5, ROUTE_36, 2 + + def_coord_events + + def_bg_events + bg_event 6, 0, BGEVENT_READ, BugCatchingContestExplanationSign + + def_object_events + object_event 0, 3, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route36OfficerScriptContest, EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_CONTEST_DAY + object_event 2, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant1BScript, EVENT_BUG_CATCHING_CONTESTANT_1B + object_event 4, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant2BScript, EVENT_BUG_CATCHING_CONTESTANT_2B + object_event 2, 6, SPRITE_ROCKER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant3BScript, EVENT_BUG_CATCHING_CONTESTANT_3B + object_event 6, 5, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant4BScript, EVENT_BUG_CATCHING_CONTESTANT_4B + object_event 2, 7, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant5BScript, EVENT_BUG_CATCHING_CONTESTANT_5B + object_event 5, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant6BScript, EVENT_BUG_CATCHING_CONTESTANT_6B + object_event 3, 6, SPRITE_LASS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant7BScript, EVENT_BUG_CATCHING_CONTESTANT_7B + object_event 4, 7, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant8BScript, EVENT_BUG_CATCHING_CONTESTANT_8B + object_event 6, 7, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant9BScript, EVENT_BUG_CATCHING_CONTESTANT_9B + object_event 6, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, BugCatchingContestant10BScript, EVENT_BUG_CATCHING_CONTESTANT_10B + object_event 3, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route36NationalParkGateOfficerScript, EVENT_ROUTE_36_NATIONAL_PARK_GATE_OFFICER_NOT_CONTEST_DAY diff --git a/maps/Route36NationalParkGate.blk b/maps/Route36NationalParkGate.blk new file mode 100644 index 0000000..8145831 --- /dev/null +++ b/maps/Route36NationalParkGate.blk @@ -0,0 +1 @@ +-,0 #7$ \ No newline at end of file diff --git a/maps/Route36RuinsOfAlphGate.asm b/maps/Route36RuinsOfAlphGate.asm new file mode 100644 index 0000000..a33a3ce --- /dev/null +++ b/maps/Route36RuinsOfAlphGate.asm @@ -0,0 +1,50 @@ + object_const_def + const ROUTE36RUINSOFALPHGATE_OFFICER + const ROUTE36RUINSOFALPHGATE_GRAMPS + +Route36RuinsOfAlphGate_MapScripts: + def_scene_scripts + + def_callbacks + +Route36RuinsOfAlphGateOfficerScript: + jumptextfaceplayer Route36RuinsOfAlphGateOfficerText + +Route36RuinsOfAlphGateGrampsScript: + jumptextfaceplayer Route36RuinsOfAlphGateGrampsText + +Route36RuinsOfAlphGateOfficerText: + text "Don't you wonder" + line "who'd make some-" + cont "thing like this?" + cont "And why?" + done + +Route36RuinsOfAlphGateGrampsText: + text "Did you see that" + line "strange tree in" + cont "the road?" + + para "That may explain" + line "why fewer people" + + para "are visiting the" + line "RUINS OF ALPH." + done + +Route36RuinsOfAlphGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 0, ROUTE_36, 3 + warp_event 5, 0, ROUTE_36, 4 + warp_event 4, 7, RUINS_OF_ALPH_OUTSIDE, 9 + warp_event 5, 7, RUINS_OF_ALPH_OUTSIDE, 9 + + def_coord_events + + def_bg_events + + def_object_events + object_event 0, 4, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route36RuinsOfAlphGateOfficerScript, -1 + object_event 7, 5, SPRITE_GRAMPS, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, Route36RuinsOfAlphGateGrampsScript, -1 diff --git a/maps/Route37.asm b/maps/Route37.asm new file mode 100644 index 0000000..3d80fd6 --- /dev/null +++ b/maps/Route37.asm @@ -0,0 +1,256 @@ + object_const_def + const ROUTE37_WEIRD_TREE1 + const ROUTE37_WEIRD_TREE2 + const ROUTE37_YOUNGSTER + const ROUTE37_FRUIT_TREE1 + const ROUTE37_SUNNY + const ROUTE37_FRUIT_TREE2 + const ROUTE37_FRUIT_TREE3 + +Route37_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, Route37SunnyCallback + +Route37SunnyCallback: + readvar VAR_WEEKDAY + ifequal SUNDAY, .SunnyAppears + disappear ROUTE37_SUNNY + endcallback + +.SunnyAppears: + appear ROUTE37_SUNNY + endcallback + +TrainerTwinsAnnandanne1: + trainer TWINS, ANNANDANNE1, EVENT_BEAT_TWINS_ANN_AND_ANNE, TwinsAnnandanne1SeenText, TwinsAnnandanne1BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext TwinsAnnandanne1AfterBattleText + waitbutton + closetext + end + +TrainerTwinsAnnandanne2: + trainer TWINS, ANNANDANNE2, EVENT_BEAT_TWINS_ANN_AND_ANNE, TwinsAnnandanne2SeenText, TwinsAnnandanne2BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext TwinsAnnandanne2AfterBattleText + waitbutton + closetext + end + +TrainerPsychicGreg: + trainer PSYCHIC_T, GREG, EVENT_BEAT_PSYCHIC_GREG, PsychicGregSeenText, PsychicGregBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PsychicGregAfterBattleText + waitbutton + closetext + end + +SunnyScript: + faceplayer + opentext + checkevent EVENT_GOT_MAGNET_FROM_SUNNY + iftrue SunnySundayScript + readvar VAR_WEEKDAY + ifnotequal SUNDAY, SunnyNotSundayScript + checkevent EVENT_MET_SUNNY_OF_SUNDAY + iftrue .MetSunny + writetext MeetSunnyText + promptbutton + setevent EVENT_MET_SUNNY_OF_SUNDAY +.MetSunny: + checkflag ENGINE_PLAYER_IS_FEMALE + iftrue .Kris + writetext SunnyGivesGiftText1 + promptbutton + sjump .next +.Kris: + writetext SunnyGivesGiftText2 + promptbutton +.next + verbosegiveitem MAGNET + iffalse SunnyDoneScript + setevent EVENT_GOT_MAGNET_FROM_SUNNY + writetext SunnyGaveGiftText + waitbutton + closetext + end + +SunnySundayScript: + writetext SunnySundayText + waitbutton +SunnyDoneScript: + closetext + end + +SunnyNotSundayScript: + writetext SunnyNotSundayText + waitbutton + closetext + end + +Route37Sign: + jumptext Route37SignText + +Route37FruitTree1: + fruittree FRUITTREE_ROUTE_37_1 + +Route37FruitTree2: + fruittree FRUITTREE_ROUTE_37_2 + +Route37FruitTree3: + fruittree FRUITTREE_ROUTE_37_3 + +Route37HiddenEther: + hiddenitem ETHER, EVENT_ROUTE_37_HIDDEN_ETHER + +TwinsAnnandanne1SeenText: + text "ANN: ANNE and I" + line "are in this to-" + cont "gether!" + done + +TwinsAnnandanne1BeatenText: + text "ANN & ANNE: Nnn… A" + line "little too strong." + done + +TwinsAnnandanne1AfterBattleText: + text "ANN: I can tell" + line "what my sister and" + + para "my #MON are" + line "thinking." + done + +TwinsAnnandanne2SeenText: + text "ANNE: ANN and I" + line "are in this to-" + cont "gether!" + done + +TwinsAnnandanne2BeatenText: + text "ANN & ANNE: Nnn… A" + line "little too strong." + done + +TwinsAnnandanne2AfterBattleText: + text "ANNE: We share the" + line "same feelings as" + cont "our #MON." + done + +PsychicGregSeenText: + text "#MON can't do a" + line "thing if they are" + cont "asleep." + + para "I'll show you how" + line "scary that is!" + done + +PsychicGregBeatenText: + text "I lost. That's" + line "pretty sad…" + done + +PsychicGregAfterBattleText: + text "Putting #MON to" + line "sleep or paralyz-" + cont "ing them are good" + cont "battle techniques." + done + +MeetSunnyText: + text "SUNNY: Hi!" + + para "I'm SUNNY of Sun-" + line "day, meaning it's" + cont "Sunday today!" + done + +SunnyGivesGiftText1: + text "I was told to give" + line "you this if I saw" + cont "you!" + done + +SunnyGivesGiftText2: + text "I was told to give" + line "you this if I saw" + cont "you!" + done + +SunnyGaveGiftText: + text "SUNNY: That thing…" + + para "Um…" + + para "… What was it now…" + + para "…" + + para "Oh! I remember" + line "now!" + + para "A #MON that" + line "knows electric" + + para "moves should hold" + line "it." + + para "My sis MONICA said" + line "it powers up" + cont "electric moves!" + done + +SunnySundayText: + text "SUNNY: My sisters" + line "and brothers are" + cont "MONICA, TUSCANY," + cont "WESLEY, ARTHUR," + cont "FRIEDA and SANTOS." + + para "They're all older" + line "than me!" + done + +SunnyNotSundayText: + text "SUNNY: Isn't today" + line "Sunday?" + cont "Um… I forgot!" + done + +Route37SignText: + text "ROUTE 37" + done + +Route37_MapEvents: + db 0, 0 ; filler + + def_warp_events + + def_coord_events + + def_bg_events + bg_event 5, 3, BGEVENT_READ, Route37Sign + bg_event 4, 2, BGEVENT_ITEM, Route37HiddenEther + + def_object_events + object_event 6, 12, SPRITE_WEIRD_TREE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsAnnandanne1, -1 + object_event 7, 12, SPRITE_WEIRD_TREE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerTwinsAnnandanne2, -1 + object_event 6, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerPsychicGreg, -1 + object_event 13, 5, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route37FruitTree1, -1 + object_event 16, 8, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SunnyScript, EVENT_ROUTE_37_SUNNY_OF_SUNDAY + object_event 16, 5, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route37FruitTree2, -1 + object_event 15, 7, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route37FruitTree3, -1 diff --git a/maps/Route37.blk b/maps/Route37.blk new file mode 100644 index 0000000..8825339 --- /dev/null +++ b/maps/Route37.blk @@ -0,0 +1 @@ +`GWWW`b` \ No newline at end of file diff --git a/maps/Route38.asm b/maps/Route38.asm new file mode 100644 index 0000000..4e6902b --- /dev/null +++ b/maps/Route38.asm @@ -0,0 +1,493 @@ + object_const_def + const ROUTE38_STANDING_YOUNGSTER1 + const ROUTE38_LASS + const ROUTE38_STANDING_YOUNGSTER2 + const ROUTE38_BEAUTY1 + const ROUTE38_SAILOR + const ROUTE38_FRUIT_TREE + const ROUTE38_BEAUTY2 + +Route38_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerBirdKeeperToby: + trainer BIRD_KEEPER, TOBY, EVENT_BEAT_BIRD_KEEPER_TOBY, BirdKeeperTobySeenText, BirdKeeperTobyBeatenText, 0, .Script + +.Script + endifjustbattled + opentext + writetext BirdKeeperTobyAfterBattleText + waitbutton + closetext + end + +TrainerSailorHarry: + trainer SAILOR, HARRY, EVENT_BEAT_SAILOR_HARRY, SailorHarrySeenText, SailorHarryBeatenText, 0, .Script + +.Script + endifjustbattled + opentext + writetext SailorHarryAfterBattleText + waitbutton + closetext + end + +TrainerLassDana1: + trainer LASS, DANA1, EVENT_BEAT_LASS_DANA, LassDana1SeenText, LassDana1BeatenText, 0, .Script + +.Script + loadvar VAR_CALLERID, PHONE_LASS_DANA + endifjustbattled + opentext + checkflag ENGINE_DANA_READY_FOR_REMATCH + iftrue .DanaRematch + checkflag ENGINE_DANA_HAS_THUNDERSTONE + iftrue .TryGiveThunderstone + checkcellnum PHONE_LASS_DANA + iftrue .NumberAccepted + checkevent EVENT_DANA_ASKED_FOR_PHONE_NUMBER + iftrue .SecondTimeAsking + writetext LassDanaMoomooMilkText + promptbutton + setevent EVENT_DANA_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1F + sjump .AskForPhoneNumber + +.SecondTimeAsking: + scall .AskNumber2F +.AskForPhoneNumber: + askforphonenumber PHONE_LASS_DANA + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .DeclinedPhoneNumber + gettrainername STRING_BUFFER_3, LASS, DANA1 + scall .RegisteredPhoneNumber + sjump .NumberAccepted + +.DanaRematch: + scall .Rematch + winlosstext LassDana1BeatenText, 0 + readmem wDanaFightCount + ifequal 4, .Fight4 + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight4: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight4 +.Fight3: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight3 +.Fight2: + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .LoadFight2 +.Fight1: + checkflag ENGINE_FLYPOINT_CIANWOOD + iftrue .LoadFight1 +.LoadFight0: + loadtrainer LASS, DANA1 + startbattle + reloadmapafterbattle + loadmem wDanaFightCount, 1 + clearflag ENGINE_DANA_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer LASS, DANA2 + startbattle + reloadmapafterbattle + loadmem wDanaFightCount, 2 + clearflag ENGINE_DANA_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer LASS, DANA3 + startbattle + reloadmapafterbattle + loadmem wDanaFightCount, 3 + clearflag ENGINE_DANA_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer LASS, DANA4 + startbattle + reloadmapafterbattle + loadmem wDanaFightCount, 4 + clearflag ENGINE_DANA_READY_FOR_REMATCH + end + +.LoadFight4: + loadtrainer LASS, DANA5 + startbattle + reloadmapafterbattle + clearflag ENGINE_DANA_READY_FOR_REMATCH + end + +.TryGiveThunderstone: + scall .Gift + verbosegiveitem THUNDERSTONE + iffalse .NoRoomForThunderstone + clearflag ENGINE_DANA_HAS_THUNDERSTONE + setevent EVENT_DANA_GAVE_THUNDERSTONE + sjump .NumberAccepted + +.NoRoomForThunderstone: + sjump .PackFull + +.AskNumber1F: + jumpstd AskNumber1FScript + end + +.AskNumber2F: + jumpstd AskNumber2FScript + end + +.RegisteredPhoneNumber: + jumpstd RegisteredNumberFScript + end + +.NumberAccepted: + jumpstd NumberAcceptedFScript + end + +.DeclinedPhoneNumber: + jumpstd NumberDeclinedFScript + end + +.PhoneFull: + jumpstd PhoneFullFScript + end + +.Rematch: + jumpstd RematchFScript + end + +.Gift: + jumpstd GiftFScript + end + +.PackFull: + jumpstd PackFullFScript + end + +TrainerSchoolboyChad1: + trainer SCHOOLBOY, CHAD1, EVENT_BEAT_SCHOOLBOY_CHAD, SchoolboyChad1SeenText, SchoolboyChad1BeatenText, 0, .Script + +.Script + loadvar VAR_CALLERID, PHONE_SCHOOLBOY_CHAD + endifjustbattled + opentext + checkflag ENGINE_CHAD_READY_FOR_REMATCH + iftrue .ChadRematch + checkcellnum PHONE_SCHOOLBOY_CHAD + iftrue .HaveChadsNumber + checkevent EVENT_CHAD_ASKED_FOR_PHONE_NUMBER + iftrue .SecondTimeAsking + writetext SchoolboyChadSoManyTestsText + promptbutton + setevent EVENT_CHAD_ASKED_FOR_PHONE_NUMBER + scall .AskPhoneNumber1 + sjump .AskToRegisterNumber + +.SecondTimeAsking: + scall .AskPhoneNumber2 +.AskToRegisterNumber: + askforphonenumber PHONE_SCHOOLBOY_CHAD + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .SaidNo + gettrainername STRING_BUFFER_3, SCHOOLBOY, CHAD1 + scall .RegisteredChad + sjump .HaveChadsNumber + +.ChadRematch: + scall .Rematch + winlosstext SchoolboyChad1BeatenText, 0 + readmem wChadFightCount + ifequal 4, .Fight4 + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight4: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight4 +.Fight3: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight3 +.Fight2: + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .LoadFight2 +.Fight1: + checkflag ENGINE_FLYPOINT_MAHOGANY + iftrue .LoadFight1 +.LoadFight0: + loadtrainer SCHOOLBOY, CHAD1 + startbattle + reloadmapafterbattle + loadmem wChadFightCount, 1 + clearflag ENGINE_CHAD_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer SCHOOLBOY, CHAD2 + startbattle + reloadmapafterbattle + loadmem wChadFightCount, 2 + clearflag ENGINE_CHAD_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer SCHOOLBOY, CHAD3 + startbattle + reloadmapafterbattle + loadmem wChadFightCount, 3 + clearflag ENGINE_CHAD_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer SCHOOLBOY, CHAD4 + startbattle + reloadmapafterbattle + loadmem wChadFightCount, 4 + clearflag ENGINE_CHAD_READY_FOR_REMATCH + end + +.LoadFight4: + loadtrainer SCHOOLBOY, CHAD5 + startbattle + reloadmapafterbattle + clearflag ENGINE_CHAD_READY_FOR_REMATCH + end + +.AskPhoneNumber1: + jumpstd AskNumber1MScript + end + +.AskPhoneNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredChad: + jumpstd RegisteredNumberMScript + end + +.HaveChadsNumber: + jumpstd NumberAcceptedMScript + end + +.SaidNo: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.Rematch: + jumpstd RematchMScript + end + +TrainerBeautyValerie: + trainer BEAUTY, VALERIE, EVENT_BEAT_BEAUTY_VALERIE, BeautyValerieSeenText, BeautyValerieBeatenText, 0, .Script + +.Script + endifjustbattled + opentext + writetext BeautyValerieAfterBattleText + waitbutton + closetext + end + +TrainerBeautyOlivia: + trainer BEAUTY, OLIVIA, EVENT_BEAT_BEAUTY_OLIVIA, BeautyOliviaSeenText, BeautyOliviaBeatenText, 0, .Script + +.Script + endifjustbattled + opentext + writetext BeautyOliviaAfterBattleText + waitbutton + closetext + end + +Route38Sign: + jumptext Route38SignText + +Route38TrainerTips: + jumptext Route38TrainerTipsText + +Route38FruitTree: + fruittree FRUITTREE_ROUTE_38 + +BirdKeeperTobySeenText: + text "Fly high into the" + line "sky, my beloved" + cont "bird #MON!" + done + +BirdKeeperTobyBeatenText: + text "I feel like just" + line "flying away now." + done + +BirdKeeperTobyAfterBattleText: + text "I plan to train in" + line "CIANWOOD CITY to" + + para "teach my #MON" + line "how to FLY." + done + +SchoolboyChad1SeenText: + text "Let me try some-" + line "thing I learned" + cont "today." + done + +SchoolboyChad1BeatenText: + text "I didn't study" + line "enough, I guess." + done + +SchoolboyChadSoManyTestsText: + text "I have to take so" + line "many tests, I" + + para "don't have much" + line "time for #MON." + + para "So when I do get" + line "to play, I really" + cont "concentrate." + done + +LassDana1SeenText: + text "You seem to be" + line "good at #MON." + + para "If you are, how" + line "about giving me" + cont "some advice?" + done + +LassDana1BeatenText: + text "I see. So you can" + line "battle that way." + done + +LassDanaMoomooMilkText: + text "I know something" + line "good!" + + para "MOOMOO FARM's milk" + line "is famous for its" + cont "flavor." + done + +BeautyValerieSeenText: + text "Hi! Aren't you a" + line "cute trainer!" + + para "May I see your" + line "#MON?" + done + +BeautyValerieBeatenText: + text "I'm glad I got to" + line "see your #MON!" + done + +BeautyValerieAfterBattleText: + text "When I see #-" + line "MON, it seems to" + cont "soothe my nerves." + done + +SailorHarrySeenText: + text "I've been over-" + line "seas, so I know" + + para "about all sorts of" + line "#MON!" + done + +SailorHarryBeatenText: + text "Your skill is" + line "world class!" + done + +SailorHarryAfterBattleText: + text "All kinds of peo-" + line "ple around the" + + para "world live happily" + line "with #MON." + done + +BeautyOliviaSeenText: + text "Don't you think my" + line "#MON and I are" + cont "beautiful?" + done + +BeautyOliviaBeatenText: + text "We drink MOOMOO" + line "MILK every day." + done + +BeautyOliviaAfterBattleText: + text "MOOMOO MILK is" + line "good for beauty" + + para "and health, but" + line "inconveniently," + + para "they only sell a" + line "bottle at a time." + done + +Route38SignText: + text "ROUTE 38" + + para "OLIVINE CITY -" + line "ECRUTEAK CITY" + done + +Route38TrainerTipsText: + text "TRAINER TIPS" + + para "If a #MON is" + line "trying to evolve," + cont "you can stop it." + + para "Press the B But-" + line "ton during evolu-" + cont "tion." + + para "That startles the" + line "#MON and stops" + cont "its evolution." + done + +Route38_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 35, 8, ROUTE_38_ECRUTEAK_GATE, 1 + warp_event 35, 9, ROUTE_38_ECRUTEAK_GATE, 2 + + def_coord_events + + def_bg_events + bg_event 33, 7, BGEVENT_READ, Route38Sign + bg_event 5, 13, BGEVENT_READ, Route38TrainerTips + + def_object_events + object_event 4, 1, SPRITE_STANDING_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerSchoolboyChad1, -1 + object_event 15, 3, SPRITE_LASS, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerLassDana1, -1 + object_event 12, 15, SPRITE_STANDING_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerBirdKeeperToby, -1 + object_event 19, 9, SPRITE_BEAUTY, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerBeautyValerie, -1 + object_event 24, 5, SPRITE_SAILOR, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerSailorHarry, -1 + object_event 12, 10, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route38FruitTree, -1 + object_event 5, 8, SPRITE_BEAUTY, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerBeautyOlivia, -1 diff --git a/maps/Route38.blk b/maps/Route38.blk new file mode 100644 index 0000000..90ea9de --- /dev/null +++ b/maps/Route38.blk @@ -0,0 +1 @@ +FAAAAAAF]]]]]F]]]]IJG N@AAAAAAAMNHIIIIIIIABxMRWWWWSeeeFVQIIIIIFIIIIID \ No newline at end of file diff --git a/maps/Route38EcruteakGate.asm b/maps/Route38EcruteakGate.asm new file mode 100644 index 0000000..c7467a4 --- /dev/null +++ b/maps/Route38EcruteakGate.asm @@ -0,0 +1,39 @@ + object_const_def + const ROUTE38ECRUTEAKGATE_OFFICER + +Route38EcruteakGate_MapScripts: + def_scene_scripts + + def_callbacks + +Route38EcruteakGateOfficerScript: + jumptextfaceplayer Route38EcruteakGateOfficerText + +Route38EcruteakGateOfficerText: + text "Where did you say" + line "you're from?" + + para "NEW BARK TOWN?" + + para "PROF.ELM lives" + line "over there, right?" + + para "You've come a long" + line "way to get here." + done + +Route38EcruteakGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 4, ROUTE_38, 1 + warp_event 0, 5, ROUTE_38, 2 + warp_event 9, 4, ECRUTEAK_CITY, 14 + warp_event 9, 5, ECRUTEAK_CITY, 15 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route38EcruteakGateOfficerScript, -1 diff --git a/maps/Route39.asm b/maps/Route39.asm new file mode 100644 index 0000000..0e19773 --- /dev/null +++ b/maps/Route39.asm @@ -0,0 +1,369 @@ + object_const_def + const ROUTE39_SAILOR + const ROUTE39_POKEFAN_M + const ROUTE39_POKEFAN_F1 + const ROUTE39_MILTANK1 + const ROUTE39_MILTANK2 + const ROUTE39_MILTANK3 + const ROUTE39_MILTANK4 + const ROUTE39_PSYCHIC_NORMAN + const ROUTE39_FRUIT_TREE + const ROUTE39_POKEFAN_F2 + +Route39_MapScripts: + def_scene_scripts + + def_callbacks + +Route39Miltank: + opentext + writetext Route39MiltankText + cry MILTANK + waitbutton + closetext + end + +TrainerPokefanmDerek: + trainer POKEFANM, DEREK1, EVENT_BEAT_POKEFANM_DEREK, PokefanmDerekSeenText, PokefanmDerekBeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_POKEFANM_DEREK + endifjustbattled + opentext + checkflag ENGINE_DEREK_HAS_NUGGET + iftrue .HasNugget + checkcellnum PHONE_POKEFANM_DEREK + iftrue .NumberAccepted + checkpoke PIKACHU + iffalse .WantsPikachu + checkevent EVENT_DEREK_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext PokefanMDerekText_NotBragging + promptbutton + setevent EVENT_DEREK_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .AskForNumber + +.AskedAlready: + scall .AskNumber2 +.AskForNumber: + askforphonenumber PHONE_POKEFANM_DEREK + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, POKEFANM, DEREK1 + scall .RegisteredNumber + sjump .NumberAccepted + +.HasNugget: + scall .Gift + verbosegiveitem NUGGET + iffalse .NoRoom + clearflag ENGINE_DEREK_HAS_NUGGET + sjump .NumberAccepted + +.NoRoom: + sjump .PackFull + +.WantsPikachu: + writetext PokefanMDerekPikachuIsItText + waitbutton + closetext + end + +.AskNumber1: + jumpstd AskNumber1MScript + end + +.AskNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberMScript + end + +.NumberAccepted: + jumpstd NumberAcceptedMScript + end + +.NumberDeclined: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.Gift: + jumpstd GiftMScript + end + +.PackFull: + jumpstd PackFullMScript + end + +TrainerPokefanfRuth: + trainer POKEFANF, RUTH, EVENT_BEAT_POKEFANF_RUTH, PokefanfRuthSeenText, PokefanfRuthBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanfRuthAfterBattleText + waitbutton + closetext + end + +TrainerSailorEugene: + trainer SAILOR, EUGENE, EVENT_BEAT_SAILOR_EUGENE, SailorEugeneSeenText, SailorEugeneBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SailorEugeneAfterBattleText + waitbutton + closetext + end + +TrainerPsychicNorman: + trainer PSYCHIC_T, NORMAN, EVENT_BEAT_PSYCHIC_NORMAN, PsychicNormanSeenText, PsychicNormanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PsychicNormanAfterBattleText + waitbutton + closetext + end + +TrainerPokefanfJaime: + faceplayer + opentext + checktime NITE + iffalse .NotNight + checkevent EVENT_BEAT_POKEFANF_JAIME + iftrue .Beaten + writetext PokefanfJaimeSeenText + waitbutton + closetext + winlosstext PokefanfJaimeBeatenText, 0 + loadtrainer POKEFANF, JAIME + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_POKEFANF_JAIME + closetext + end + +.Beaten: + writetext PokefanfJaimeAfterBattleText + waitbutton + closetext + end + +.NotNight: + writetext PokefanfJaimeHopeItGetsDarkText + waitbutton + closetext + end + +Route39Sign: + jumptext Route39SignText + +MoomooFarmSign: + jumptext MoomooFarmSignText + +Route39TrainerTips: + jumptext Route39TrainerTipsText + +Route39FruitTree: + fruittree FRUITTREE_ROUTE_39 + +Route39HiddenNugget: + hiddenitem NUGGET, EVENT_ROUTE_39_HIDDEN_NUGGET + +Route39MiltankText: + text "MILTANK: Mooo!" + done + +SailorEugeneSeenText: + text "I just got back to" + line "OLIVINE." + + para "So how about a" + line "#MON battle?" + done + +SailorEugeneBeatenText: + text "Awaaargh!" + done + +SailorEugeneAfterBattleText: + text "My #MON were" + line "caught and raised" + cont "overseas." + + para "They're my compan-" + line "ions on those long" + cont "voyages." + done + +PokefanmDerekSeenText: + text "This is a good" + line "time to brag about" + cont "my PIKACHU!" + done + +PokefanmDerekBeatenText: + text "I had no time to" + line "show off PIKACHU…" + done + +PokefanMDerekText_NotBragging: + text "I'm not listening" + line "to your bragging!" + + para "We # FANS have" + line "a policy of not" + + para "listening to other" + line "people brag!" + done + +PokefanfRuthSeenText: + text "Such darling" + line "#MON." + + para "Let's show our" + line "#MON together" + cont "at the same time." + done + +PokefanfRuthBeatenText: + text "I don't mind" + line "losing." + done + +PokefanfRuthAfterBattleText: + text "Do you know about" + line "baby #MON?" + + para "I bet they're just" + line "adorable!" + done + +PokefanMDerekPikachuIsItText: + text "PIKACHU is it!" + line "Don't you agree?" + done + +PsychicNormanSeenText: + text "Let me see what" + line "your #MON are" + cont "capable of." + done + +PsychicNormanBeatenText: + text "Ooh, your #MON" + line "have potential." + done + +PsychicNormanAfterBattleText: + text "You know how #-" + line "MON have different" + cont "abilities?" + + para "People are like" + line "that too. Every-" + cont "one has different" + cont "potential." + done + +PokefanfJaimeHopeItGetsDarkText: + text "Ufufufu… I hope it" + line "gets dark soon." + done + +PokefanfJaimeSeenText: + text "You came at just" + line "the right time." + + para "Let's battle." + done + +PokefanfJaimeBeatenText: + text "Oh, how disap-" + line "pointing…" + done + +PokefanfJaimeAfterBattleText: + text "I met my MEOWTH at" + line "night, right here" + cont "on ROUTE 39." + + para "I'm not sure why," + line "but it seems to" + + para "like it when I" + line "train here." + + para "It seems to become" + line "friendlier by" + + para "training here than" + line "anywhere else." + done + +Route39SignText: + text "ROUTE 39" + + para "OLIVINE CITY -" + line "ECRUTEAK CITY" + done + +MoomooFarmSignText: + text "MOOMOO FARM" + + para "Enjoy Our Fresh" + line "and Tasty Milk" + done + +Route39TrainerTipsText: + text "TRAINER TIPS" + + para "Use HEADBUTT on" + line "trees to shake" + cont "#MON out." + + para "Different kinds of" + line "#MON drop out" + cont "of trees." + + para "Use HEADBUTT on" + line "any tree you see!" + done + +Route39_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 1, 3, ROUTE_39_BARN, 1 + warp_event 5, 3, ROUTE_39_FARMHOUSE, 1 + + def_coord_events + + def_bg_events + bg_event 5, 31, BGEVENT_READ, Route39TrainerTips + bg_event 9, 5, BGEVENT_READ, MoomooFarmSign + bg_event 15, 7, BGEVENT_READ, Route39Sign + bg_event 5, 13, BGEVENT_ITEM, Route39HiddenNugget + + def_object_events + object_event 13, 29, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerSailorEugene, -1 + object_event 10, 22, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerPokefanmDerek, -1 + object_event 11, 19, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerPokefanfRuth, -1 + object_event 3, 12, SPRITE_TAUROS, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route39Miltank, -1 + object_event 6, 11, SPRITE_TAUROS, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route39Miltank, -1 + object_event 4, 15, SPRITE_TAUROS, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route39Miltank, -1 + object_event 8, 13, SPRITE_TAUROS, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route39Miltank, -1 + object_event 13, 7, SPRITE_STANDING_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 1, TrainerPsychicNorman, -1 + object_event 9, 3, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route39FruitTree, -1 + object_event 4, 22, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, TrainerPokefanfJaime, -1 diff --git a/maps/Route39.blk b/maps/Route39.blk new file mode 100644 index 0000000..feb4ac8 --- /dev/null +++ b/maps/Route39.blk @@ -0,0 +1 @@ +@AABFHIxJDDGHI@AABDFDF@ADFDHIIIIJDDNDRWWRWWRWW\ gave a" + line "BERRY to MILTANK." + done + +Route39BarnLittleHealthierText: + text "MILTANK became a" + line "little healthier!" + done + +Route39BarnQuiteHealthyText: + text "MILTANK became" + line "quite healthy!" + done + +Route39BarnTotallyHealthyText: + text "MILTANK became" + line "totally healthy!" + done + +Route39BarnNoBerriesText: + text " has no" + line "BERRIES…" + done + +Route39BarnRefusedBerryText: + text " wouldn't" + line "give a BERRY." + + para "MILTANK looks sad." + done + +Route39Barn_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, ROUTE_39, 1 + warp_event 4, 7, ROUTE_39, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route39BarnTwin1Script, -1 + object_event 4, 3, SPRITE_TWIN, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route39BarnTwin2Script, -1 + object_event 3, 3, SPRITE_TAUROS, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MoomooScript, -1 diff --git a/maps/Route39Barn.blk b/maps/Route39Barn.blk new file mode 100644 index 0000000..9b225d9 --- /dev/null +++ b/maps/Route39Barn.blk @@ -0,0 +1 @@ +%%%% && & !" \ No newline at end of file diff --git a/maps/Route39Farmhouse.asm b/maps/Route39Farmhouse.asm new file mode 100644 index 0000000..3a0367c --- /dev/null +++ b/maps/Route39Farmhouse.asm @@ -0,0 +1,210 @@ +DEF ROUTE39FARMHOUSE_MILK_PRICE EQU 500 + + object_const_def + const ROUTE39FARMHOUSE_POKEFAN_M + const ROUTE39FARMHOUSE_POKEFAN_F + +Route39Farmhouse_MapScripts: + def_scene_scripts + + def_callbacks + +PokefanM_DairyFarmer: + faceplayer + opentext + checkevent EVENT_HEALED_MOOMOO + iftrue FarmerMScript_SellMilk + writetext FarmerMText_SickCow + waitbutton + closetext + setevent EVENT_TALKED_TO_FARMER_ABOUT_MOOMOO + end + +FarmerMScript_SellMilk: + checkitem MOOMOO_MILK + iftrue FarmerMScript_Milking + writetext FarmerMText_BuyMilk + special PlaceMoneyTopRight + yesorno + iffalse FarmerMScript_NoSale + checkmoney YOUR_MONEY, ROUTE39FARMHOUSE_MILK_PRICE + ifequal HAVE_LESS, FarmerMScript_NoMoney + giveitem MOOMOO_MILK + iffalse FarmerMScript_NoRoom + takemoney YOUR_MONEY, ROUTE39FARMHOUSE_MILK_PRICE + special PlaceMoneyTopRight + waitsfx + playsound SFX_TRANSACTION + writetext FarmerMText_GotMilk + promptbutton + itemnotify + closetext + end + +FarmerMScript_NoMoney: + writetext FarmerMText_NoMoney + waitbutton + closetext + end + +FarmerMScript_NoRoom: + writetext FarmerMText_NoRoom + waitbutton + closetext + end + +FarmerMScript_NoSale: + writetext FarmerMText_NoSale + waitbutton + closetext + end + +FarmerMScript_Milking: + writetext FarmerMText_Milking + waitbutton + closetext + end + +PokefanF_SnoreFarmer: + faceplayer + opentext + checkevent EVENT_GOT_TM13_SNORE_FROM_MOOMOO_FARM + iftrue FarmerFScript_GotSnore + checkevent EVENT_HEALED_MOOMOO + iftrue FarmerFScript_GiveSnore + writetext FarmerFText_InTrouble + waitbutton + closetext + end + +FarmerFScript_GiveSnore: + writetext FarmerFText_HealedMiltank + promptbutton + verbosegiveitem TM_SNORE + iffalse FarmerFScript_NoRoomForSnore + setevent EVENT_GOT_TM13_SNORE_FROM_MOOMOO_FARM +FarmerFScript_GotSnore: + writetext FarmerFText_SnoreSpeech + waitbutton +FarmerFScript_NoRoomForSnore: + closetext + end + +FarmhouseBookshelf: + jumpstd PictureBookshelfScript + +FarmerMText_SickCow: + text "My MILTANK ain't" + line "givin' me milk" + cont "n'more." + + para "This here FARM's" + line "got famous milk." + + para "Most everyone" + line "wants a drink." + + para "It'll give me lots" + line "o' milk if'n I" + + para "feed it lots o'" + line "BERRIES, I reckon." + done + +FarmerMText_BuyMilk: + text "How'd you like my" + line "MOOMOO MILK?" + + para "It's my pride and" + line "joy, there." + + para "Give it to #MON" + line "to restore HP!" + + para "I'll give it to ya" + line "fer just ¥{d:ROUTE39FARMHOUSE_MILK_PRICE}." + done + +FarmerMText_GotMilk: + text "Here ya go!" + line "Drink up'n enjoy!" + done + +FarmerMText_NoMoney: + text "Sorry, there." + line "No cash, no sale!" + done + +FarmerMText_NoRoom: + text "I reckon yer" + line "PACK's full." + done + +FarmerMText_NoSale: + text "You don't want it?" + line "Come again, hear?" + done + +FarmerMText_Milking: + text "I best go do my" + line "milkin'." + done + +FarmerFText_InTrouble: + text "Our milk even goes" + line "out to KANTO." + + para "So if our own" + line "MILTANK won't give" + + para "us any milk, we're" + line "in trouble." + done + +FarmerFText_HealedMiltank: + text "You fixed our" + line "MILTANK, hon. Now" + + para "it gives MOOMOO" + line "MILK again." + + para "Here's somethin'" + line "fer your trouble." + done + +Text_ReceivedTM13: ; unreferenced + text " received" + line "TM13." + done + +FarmerFText_SnoreSpeech: + text "That there's" + line "SNORE." + + para "It's a rare move" + line "that only works" + + para "while the #MON" + line "is asleep." + + para "You best think how" + line "you ought to use" + cont "it, hon." + done + +Route39Farmhouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ROUTE_39, 2 + warp_event 3, 7, ROUTE_39, 2 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, FarmhouseBookshelf + bg_event 1, 1, BGEVENT_READ, FarmhouseBookshelf + + def_object_events + object_event 3, 2, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, PokefanM_DairyFarmer, -1 + object_event 5, 4, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, PokefanF_SnoreFarmer, -1 diff --git a/maps/Route4.asm b/maps/Route4.asm new file mode 100644 index 0000000..4f86bf5 --- /dev/null +++ b/maps/Route4.asm @@ -0,0 +1,137 @@ + object_const_def + const ROUTE4_YOUNGSTER + const ROUTE4_LASS1 + const ROUTE4_LASS2 + const ROUTE4_POKE_BALL + +Route4_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerBirdKeeperHank: + trainer BIRD_KEEPER, HANK, EVENT_BEAT_BIRD_KEEPER_HANK, BirdKeeperHankSeenText, BirdKeeperHankBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BirdKeeperHankAfterBattleText + waitbutton + closetext + end + +TrainerPicnickerHope: + trainer PICNICKER, HOPE, EVENT_BEAT_PICNICKER_HOPE, PicnickerHopeSeenText, PicnickerHopeBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PicnickerHopeAfterBattleText + waitbutton + closetext + end + +TrainerPicnickerSharon: + trainer PICNICKER, SHARON, EVENT_BEAT_PICNICKER_SHARON, PicnickerSharonSeenText, PicnickerSharonBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PicnickerSharonAfterBattleText + waitbutton + closetext + end + +MtMoonSquareSign: + jumptext MtMoonSquareSignText + +Route4HPUp: + itemball HP_UP + +Route4HiddenUltraBall: + hiddenitem ULTRA_BALL, EVENT_ROUTE_4_HIDDEN_ULTRA_BALL + +BirdKeeperHankSeenText: + text "I'm raising my" + line "#MON. Want to" + cont "battle with me?" + done + +BirdKeeperHankBeatenText: + text "Ack! I lost that" + line "one…" + done + +BirdKeeperHankAfterBattleText: + text "If you have a" + line "specific #MON" + + para "that you want to" + line "raise, put it out" + + para "first, then switch" + line "it right away." + + para "That's how to do" + line "it." + done + +PicnickerHopeSeenText: + text "I have a feeling" + line "that I can win." + + para "Let's see if I'm" + line "right!" + done + +PicnickerHopeBeatenText: + text "Aww, you are too" + line "strong." + done + +PicnickerHopeAfterBattleText: + text "I heard CLEFAIRY" + line "appear at MT.MOON." + + para "But where could" + line "they be?" + done + +PicnickerSharonSeenText: + text "Um…" + line "I…" + done + +PicnickerSharonBeatenText: + text "…" + done + +PicnickerSharonAfterBattleText: + text "……I'll go train" + line "some more…" + done + +MtMoonSquareSignText: + text "MT.MOON SQUARE" + + para "Just go up the" + line "stairs." + done + +Route4_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 5, MOUNT_MOON, 2 + + def_coord_events + + def_bg_events + bg_event 3, 7, BGEVENT_READ, MtMoonSquareSign + bg_event 10, 3, BGEVENT_ITEM, Route4HiddenUltraBall + + def_object_events + object_event 17, 9, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBirdKeeperHank, -1 + object_event 9, 8, SPRITE_LASS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 4, TrainerPicnickerHope, -1 + object_event 21, 6, SPRITE_LASS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 4, TrainerPicnickerSharon, -1 + object_event 26, 3, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route4HPUp, EVENT_ROUTE_4_HP_UP diff --git a/maps/Route4.blk b/maps/Route4.blk new file mode 100644 index 0000000..dd1244a --- /dev/null +++ b/maps/Route4.blk @@ -0,0 +1,34 @@ +,,+WWWWWWWWWWWWWW*,,,,) +X +YY +XX +X + + + +$WW+% +Z/[Y +XX +Z/a) + + + + +Y +XZ/C)/[ +Z/ook) + + + + + + + + + + +m n1ww,????;//m nMQQ,,,,,)ttt + + +m +Mtt,,,,,,?????????????? \ No newline at end of file diff --git a/maps/Route40.asm b/maps/Route40.asm new file mode 100644 index 0000000..b8641c6 --- /dev/null +++ b/maps/Route40.asm @@ -0,0 +1,362 @@ + object_const_def + const ROUTE40_OLIVINE_RIVAL1 + const ROUTE40_OLIVINE_RIVAL2 + const ROUTE40_SWIMMER_GIRL1 + const ROUTE40_SWIMMER_GIRL2 + const ROUTE40_ROCK1 + const ROUTE40_ROCK2 + const ROUTE40_ROCK3 + const ROUTE40_LASS1 + const ROUTE40_MONICA + const ROUTE40_POKEFAN_M + const ROUTE40_LASS2 + const ROUTE40_STANDING_YOUNGSTER + +Route40_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, Route40MonicaCallback + +Route40MonicaCallback: + clearevent EVENT_BATTLE_TOWER_OPEN_CIVILIANS + readvar VAR_WEEKDAY + ifequal MONDAY, .MonicaAppears + disappear ROUTE40_MONICA + endcallback + +.MonicaAppears: + appear ROUTE40_MONICA + endcallback + +TrainerSwimmerfElaine: + trainer SWIMMERF, ELAINE, EVENT_BEAT_SWIMMERF_ELAINE, SwimmerfElaineSeenText, SwimmerfElaineBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfElaineAfterBattleText + waitbutton + closetext + end + +TrainerSwimmerfPaula: + trainer SWIMMERF, PAULA, EVENT_BEAT_SWIMMERF_PAULA, SwimmerfPaulaSeenText, SwimmerfPaulaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfPaulaAfterBattleText + waitbutton + closetext + end + +TrainerSwimmermSimon: + trainer SWIMMERM, SIMON, EVENT_BEAT_SWIMMERM_SIMON, SwimmermSimonSeenText, SwimmermSimonBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermSimonAfterBattleText + waitbutton + closetext + end + +TrainerSwimmermRandall: + trainer SWIMMERM, RANDALL, EVENT_BEAT_SWIMMERM_RANDALL, SwimmermRandallSeenText, SwimmermRandallBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermRandallAfterBattleText + waitbutton + closetext + end + +Route40Lass1Script: + jumptextfaceplayer Route40Lass1Text + +Route40PokefanMScript: + special Mobile_DummyReturnFalse + iftrue .mobile + jumptextfaceplayer Route40PokefanMText + +.mobile + jumptextfaceplayer Route40PokefanMText_Mobile + +Route40Lass2Script: + jumptextfaceplayer Route40Lass2Text + +Route40StandingYoungsterScript: + jumptextfaceplayer Route40StandingYoungsterText + +MonicaScript: + faceplayer + opentext + checkevent EVENT_GOT_SHARP_BEAK_FROM_MONICA + iftrue .Monday + readvar VAR_WEEKDAY + ifnotequal MONDAY, .NotMonday + checkevent EVENT_MET_MONICA_OF_MONDAY + iftrue .MetMonica + writetext MeetMonicaText + promptbutton + setevent EVENT_MET_MONICA_OF_MONDAY +.MetMonica: + writetext MonicaGivesGiftText + promptbutton + verbosegiveitem SHARP_BEAK + iffalse .done + setevent EVENT_GOT_SHARP_BEAK_FROM_MONICA + writetext MonicaGaveGiftText + waitbutton + closetext + end + +.Monday: + writetext MonicaMondayText + waitbutton +.done: + closetext + end + +.NotMonday: + writetext MonicaNotMondayText + waitbutton + closetext + end + +Route40Sign: + jumptext Route40SignText + +Route40Rock: + jumpstd SmashRockScript + +Route40HiddenHyperPotion: + hiddenitem HYPER_POTION, EVENT_ROUTE_40_HIDDEN_HYPER_POTION + +Route40_StepRightUp6Movement: ; unreferenced + step RIGHT + step UP + step UP + step UP + step UP + step UP + step UP + step_end + +Route40_StepUp5Movement: ; unreferenced + step UP + step UP + step UP + step UP + step UP + step_end + +Route40_StepUp4Movement: ; unreferenced + step UP + step UP + step UP + step UP + step_end + +SwimmermSimonSeenText: + text "You have to warm" + line "up before going" + cont "into the water." + + para "That's basic." + done + +SwimmermSimonBeatenText: + text "OK! Uncle! I give!" + done + +SwimmermSimonAfterBattleText: + text "CIANWOOD CITY is" + line "a good distance" + cont "away from here." + done + +SwimmermRandallSeenText: + text "Hey, you're young" + line "and fit!" + + para "Don't ride your" + line "#MON! Swim!" + done + +SwimmermRandallBeatenText: + text "Uh-oh. I lost…" + done + +SwimmermRandallAfterBattleText: + text "Swimming exercises" + line "your entire body." + cont "It's healthy." + done + +SwimmerfElaineSeenText: + text "Are you going to" + line "CIANWOOD?" + + para "How about a quick" + line "battle first?" + done + +SwimmerfElaineBeatenText: + text "I lost that one!" + done + +SwimmerfElaineAfterBattleText: + text "I'd say I'm a bet-" + line "ter swimmer than" + cont "you. Yeah!" + done + +SwimmerfPaulaSeenText: + text "No inner tube for" + line "me." + + para "I'm hanging on to" + line "a sea #MON!" + done + +SwimmerfPaulaBeatenText: + text "Ooh, I'm feeling" + line "dizzy!" + done + +SwimmerfPaulaAfterBattleText: + text "While I float like" + line "this, the waves" + cont "carry me along." + done + +Route40Lass1Text: + text "Although you can't" + line "see it from here," + + para "CIANWOOD is across" + line "the sea." + done + +Route40PokefanMText: + text "Hm! There's a big" + line "building up ahead!" + + para "What is it?" + done + +Route40PokefanMText_Mobile: + text "Hm! Look at all" + line "those serious-" + cont "looking trainers" + cont "streaming in." + + para "What? What?" + done + +Route40Lass2Text: + text "I came to OLIVINE" + line "by ship to see the" + + para "sights and soak up" + line "the atmosphere." + + para "Being a port, it" + line "feels so different" + cont "from a big city." + done + +Route40StandingYoungsterText: + text "Have you gone to" + line "the BATTLE TOWER?" + + para "I think a lot of" + line "tough trainers" + + para "have gathered" + line "there already." + + para "But since you have" + line "so many BADGES," + + para "you shouldn't do" + line "badly at all." + done + +MeetMonicaText: + text "MONICA: Glad to" + line "meet you. I'm" + + para "MONICA of Monday." + done + +MonicaGivesGiftText: + text "As a token of our" + line "friendship, I have" + cont "a gift for you!" + done + +MonicaGaveGiftText: + text "MONICA: It's an" + line "item that raises" + + para "the power of fly-" + line "ing-type moves." + + para "You should equip a" + line "bird #MON with" + cont "that item." + done + +MonicaMondayText: + text "MONICA: My broth-" + line "ers and sisters" + + para "are all over the" + line "place." + + para "See if you could" + line "find them all!" + done + +MonicaNotMondayText: + text "MONICA: I don't" + line "think today is" + cont "Monday. How sad…" + done + +Route40SignText: + text "ROUTE 40" + + para "CIANWOOD CITY -" + line "OLIVINE CITY" + done + +Route40_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 5, ROUTE_40_BATTLE_TOWER_GATE, 1 + + def_coord_events + + def_bg_events + bg_event 14, 10, BGEVENT_READ, Route40Sign + bg_event 7, 8, BGEVENT_ITEM, Route40HiddenHyperPotion + + def_object_events + object_event 14, 15, SPRITE_OLIVINE_RIVAL, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerSwimmermSimon, -1 + object_event 18, 30, SPRITE_OLIVINE_RIVAL, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 5, TrainerSwimmermRandall, -1 + object_event 3, 19, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 4, TrainerSwimmerfElaine, -1 + object_event 10, 25, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfPaula, -1 + object_event 7, 11, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route40Rock, -1 + object_event 6, 9, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route40Rock, -1 + object_event 7, 8, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route40Rock, -1 + object_event 11, 13, SPRITE_LASS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route40Lass1Script, -1 + object_event 8, 10, SPRITE_BEAUTY, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, MonicaScript, EVENT_ROUTE_40_MONICA_OF_MONDAY + object_event 7, 6, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route40PokefanMScript, -1 + object_event 13, 4, SPRITE_LASS, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route40Lass2Script, -1 + object_event 16, 9, SPRITE_STANDING_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route40StandingYoungsterScript, EVENT_BATTLE_TOWER_OPEN_CIVILIANS diff --git a/maps/Route40.blk b/maps/Route40.blk new file mode 100644 index 0000000..f42d58c --- /dev/null +++ b/maps/Route40.blk @@ -0,0 +1,3 @@ +hii hiiIIIIlmiqqirrm5v + +E5565555556555555565655555556505555555654555555565455555556545555555694555555564555555556455555555645555555562555555556 \ No newline at end of file diff --git a/maps/Route40BattleTowerGate.asm b/maps/Route40BattleTowerGate.asm new file mode 100644 index 0000000..7d06923 --- /dev/null +++ b/maps/Route40BattleTowerGate.asm @@ -0,0 +1,86 @@ + object_const_def + const ROUTE40BATTLETOWERGATE_ROCKER + const ROUTE40BATTLETOWERGATE_TWIN + +Route40BattleTowerGate_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, RouteBattleTowerGateShowSailorCallback + +RouteBattleTowerGateShowSailorCallback: + clearevent EVENT_BATTLE_TOWER_OPEN_CIVILIANS + endcallback + +Route40BattleTowerGateRockerScript: + jumptextfaceplayer Route40BattleTowerGateRockerText + +Route40BattleTowerGateTwinScript: + jumptextfaceplayer Route40BattleTowerGateTwinText + +Route40BattleTowerGateUnusedText1: ; unreferenced + text "Did you come to" + line "see the BATTLE" + cont "TOWER too?" + + para "But I guess you" + line "can't go in yet." + done + +Route40BattleTowerGateUnusedText2: ; unreferenced + text "BATTLE TOWER has" + line "opened." + + para "I want to go, but" + line "I haven't thought" + + para "up a cool line for" + line "when I win." + done + +Route40BattleTowerGateRockerText: + text "Are you going to" + line "the BATTLE TOWER?" + + para "This is a secret," + line "but if you win a" + + para "whole lot, you can" + line "win special gifts." + done + +Route40BattleTowerGateUnusedText3: ; unreferenced + text "I'm going to train" + line "my #MON so I'll" + + para "be all ready for" + line "the BATTLE TOWER." + done + +Route40BattleTowerGateTwinText: + text "The levels of the" + line "#MON I want to" + + para "use are all" + line "different." + + para "I have to go train" + line "them now!" + done + +Route40BattleTowerGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 7, ROUTE_40, 1 + warp_event 5, 7, ROUTE_40, 1 + warp_event 4, 0, BATTLE_TOWER_OUTSIDE, 1 + warp_event 5, 0, BATTLE_TOWER_OUTSIDE, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 3, SPRITE_ROCKER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route40BattleTowerGateRockerScript, EVENT_BATTLE_TOWER_OPEN_CIVILIANS + object_event 7, 5, SPRITE_TWIN, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route40BattleTowerGateTwinScript, -1 diff --git a/maps/Route41.asm b/maps/Route41.asm new file mode 100644 index 0000000..1c446ad --- /dev/null +++ b/maps/Route41.asm @@ -0,0 +1,365 @@ + object_const_def + const ROUTE41_OLIVINE_RIVAL1 + const ROUTE41_OLIVINE_RIVAL2 + const ROUTE41_OLIVINE_RIVAL3 + const ROUTE41_OLIVINE_RIVAL4 + const ROUTE41_OLIVINE_RIVAL5 + const ROUTE41_SWIMMER_GIRL1 + const ROUTE41_SWIMMER_GIRL2 + const ROUTE41_SWIMMER_GIRL3 + const ROUTE41_SWIMMER_GIRL4 + const ROUTE41_SWIMMER_GIRL5 + +Route41_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerSwimmerfKaylee: + trainer SWIMMERF, KAYLEE, EVENT_BEAT_SWIMMERF_KAYLEE, SwimmerfKayleeSeenText, SwimmerfKayleeBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfKayleeAfterBattleText + waitbutton + closetext + end + +TrainerSwimmerfSusie: + trainer SWIMMERF, SUSIE, EVENT_BEAT_SWIMMERF_SUSIE, SwimmerfSusieSeenText, SwimmerfSusieBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfSusieAfterBattleText + waitbutton + closetext + end + +TrainerSwimmerfDenise: + trainer SWIMMERF, DENISE, EVENT_BEAT_SWIMMERF_DENISE, SwimmerfDeniseSeenText, SwimmerfDeniseBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfDeniseAfterBattleText + waitbutton + closetext + end + +TrainerSwimmerfKara: + trainer SWIMMERF, KARA, EVENT_BEAT_SWIMMERF_KARA, SwimmerfKaraSeenText, SwimmerfKaraBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfKaraAfterBattleText + waitbutton + closetext + end + +TrainerSwimmerfWendy: + trainer SWIMMERF, WENDY, EVENT_BEAT_SWIMMERF_WENDY, SwimmerfWendySeenText, SwimmerfWendyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmerfWendyAfterBattleText + waitbutton + closetext + end + +TrainerSwimmermCharlie: + trainer SWIMMERM, CHARLIE, EVENT_BEAT_SWIMMERM_CHARLIE, SwimmermCharlieSeenText, SwimmermCharlieBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermCharlieAfterBattleText + waitbutton + closetext + end + +TrainerSwimmermGeorge: + trainer SWIMMERM, GEORGE, EVENT_BEAT_SWIMMERM_GEORGE, SwimmermGeorgeSeenText, SwimmermGeorgeBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermGeorgeAfterBattleText + waitbutton + closetext + end + +TrainerSwimmermBerke: + trainer SWIMMERM, BERKE, EVENT_BEAT_SWIMMERM_BERKE, SwimmermBerkeSeenText, SwimmermBerkeBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermBerkeAfterBattleText + waitbutton + closetext + end + +TrainerSwimmermKirk: + trainer SWIMMERM, KIRK, EVENT_BEAT_SWIMMERM_KIRK, SwimmermKirkSeenText, SwimmermKirkBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermKirkAfterBattleText + waitbutton + closetext + end + +TrainerSwimmermMathew: + trainer SWIMMERM, MATHEW, EVENT_BEAT_SWIMMERM_MATHEW, SwimmermMathewSeenText, SwimmermMathewBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SwimmermMathewAfterBattleText + waitbutton + closetext + end + +Route41Rock: ; unreferenced + jumpstd SmashRockScript + +Route41HiddenMaxEther: + hiddenitem MAX_ETHER, EVENT_ROUTE_41_HIDDEN_MAX_ETHER + +SwimmermCharlieSeenText: + text "The water's warm" + line "here. I'm loose" + cont "and limber." + + para "Sure, I'll take" + line "you on!" + done + +SwimmermCharlieBeatenText: + text "Yikes! I've got" + line "prune skin!" + done + +SwimmermCharlieAfterBattleText: + text "Isn't it relaxing" + line "just floating like" + cont "this?" + done + +SwimmermGeorgeSeenText: + text "I'm a bit tired." + line "If I win, lend me" + cont "your #MON." + done + +SwimmermGeorgeBeatenText: + text "Pant, pant…" + done + +SwimmermGeorgeAfterBattleText: + text "It's so far to" + line "CIANWOOD." + + para "But it's no easy" + line "return trip to" + cont "OLIVINE either." + + para "What should I do?" + done + +SwimmermBerkeSeenText: + text "See those islands" + line "that are blocked" + cont "by whirlpools?" + + para "There just has to" + line "be a secret!" + done + +SwimmermBerkeBeatenText: + text "What's the secret" + line "to your strength?" + done + +SwimmermBerkeAfterBattleText: + text "It was a dark and" + line "stormy night…" + + para "I saw this giant" + line "#MON flying" + cont "from the islands." + + para "It was scattering" + line "feathers from its" + cont "silver wings." + done + +SwimmermKirkSeenText: + text "The waves are wild" + line "here." + + para "They tire you out" + line "while you swim." + done + +SwimmermKirkBeatenText: + text "I'm beat!" + done + +SwimmermKirkAfterBattleText: + text "The currents keep" + line "me from reaching" + cont "that island." + done + +SwimmermMathewSeenText: + text "Are you seeking" + line "the secrets of" + cont "WHIRL ISLANDS?" + done + +SwimmermMathewBeatenText: + text "Ooh, you've got" + line "great endurance!" + done + +SwimmermMathewAfterBattleText: + text "A secret about" + line "WHIRL ISLANDS…" + + para "It's pitch-black" + line "inside!" + done + +SwimmerfKayleeSeenText: + text "I'm on my way to" + line "WHIRL ISLANDS." + + para "I'm going explor-" + line "ing with friends." + done + +SwimmerfKayleeBeatenText: + text "Is that how you do" + line "it?" + done + +SwimmerfKayleeAfterBattleText: + text "There's supposed" + line "to be a big #-" + cont "MON deep beneath" + cont "WHIRL ISLANDS." + + para "I wonder what it" + line "could be?" + done + +SwimmerfSusieSeenText: + text "You look so ele-" + line "gant, riding your" + cont "#MON." + done + +SwimmerfSusieBeatenText: + text "I'm crushed…" + done + +SwimmerfSusieAfterBattleText: + text "Wasn't there a hit" + line "song about a boy" + cont "riding a LAPRAS?" + done + +SwimmerfDeniseSeenText: + text "The weather is so" + line "beautiful, I'm in" + cont "a daze!" + done + +SwimmerfDeniseBeatenText: + text "Ohhh!" + done + +SwimmerfDeniseAfterBattleText: + text "A sunburn is the" + line "worst for skin." + + para "But I don't use a" + line "sunblock." + + para "I won't pollute" + line "the water." + done + +SwimmerfKaraSeenText: + text "If you need to" + line "rest, just tread" + cont "water." + + para "You'll get your" + line "wind back, so you" + + para "can keep on going" + line "strong." + done + +SwimmerfKaraBeatenText: + text "Oh! You have more" + line "energy than I do." + done + +SwimmerfKaraAfterBattleText: + text "I heard roars from" + line "deep inside the" + cont "ISLANDS." + done + +SwimmerfWendySeenText: + text "At night, STARYU" + line "gather near the" + cont "water's surface." + done + +SwimmerfWendyBeatenText: + text "Oh, dear…" + done + +SwimmerfWendyAfterBattleText: + text "The clusters of" + line "STARYU light up" + cont "at the same time." + + para "It's so beautiful," + line "it's scary." + done + +Route41_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 12, 17, WHIRL_ISLAND_NW, 1 + warp_event 36, 19, WHIRL_ISLAND_NE, 1 + warp_event 12, 37, WHIRL_ISLAND_SW, 1 + warp_event 36, 45, WHIRL_ISLAND_SE, 1 + + def_coord_events + + def_bg_events + bg_event 9, 35, BGEVENT_ITEM, Route41HiddenMaxEther + + def_object_events + object_event 32, 6, SPRITE_OLIVINE_RIVAL, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermCharlie, -1 + object_event 46, 8, SPRITE_OLIVINE_RIVAL, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermGeorge, -1 + object_event 20, 26, SPRITE_OLIVINE_RIVAL, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermBerke, -1 + object_event 32, 30, SPRITE_OLIVINE_RIVAL, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermKirk, -1 + object_event 19, 46, SPRITE_OLIVINE_RIVAL, SPRITEMOVEDATA_SPINCOUNTERCLOCKWISE, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerSwimmermMathew, -1 + object_event 17, 4, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfKaylee, -1 + object_event 23, 19, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfSusie, -1 + object_event 27, 34, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerSwimmerfDenise, -1 + object_event 44, 28, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 4, TrainerSwimmerfKara, -1 + object_event 9, 50, SPRITE_SWIMMER_GIRL, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerSwimmerfWendy, -1 diff --git a/maps/Route41.blk b/maps/Route41.blk new file mode 100644 index 0000000..e6f2aaf --- /dev/null +++ b/maps/Route41.blk @@ -0,0 +1,27 @@ +111111111111111155555555655555555555555555555555565555555555555555555555556556114555555 +5555555555565615589:14555555555612556615 +55551265556111156956655565:11 +55565665jppk +59:545569669 +lrsm +45545jppk566565558594lrsm561656995 +55654555 +56565556995599054 +5555 +561565 +5556994555456299 +5:55655555555555518:5569945556556561114555555555555 +55655:1 +551125555555555555655855695 +555:11455565565jppk5659990155189565565 +lsrm +615455 +55555656556 +5659455 +5565655:55599:545569655455 +9455545jppk5:65585599455552955 +lsrm54655699455555 +565 +5594655555555555551999995 +456189555 +5555555555556994615569999999999999999999905 \ No newline at end of file diff --git a/maps/Route42.asm b/maps/Route42.asm new file mode 100644 index 0000000..43878f7 --- /dev/null +++ b/maps/Route42.asm @@ -0,0 +1,348 @@ + object_const_def + const ROUTE42_FISHER + const ROUTE42_POKEFAN_M + const ROUTE42_SUPER_NERD + const ROUTE42_FRUIT_TREE1 + const ROUTE42_FRUIT_TREE2 + const ROUTE42_FRUIT_TREE3 + const ROUTE42_POKE_BALL1 + const ROUTE42_POKE_BALL2 + const ROUTE42_SUICUNE + +Route42_MapScripts: + def_scene_scripts + scene_script Route42Noop1Scene, SCENE_ROUTE42_NOOP + scene_script Route42Noop2Scene, SCENE_ROUTE42_SUICUNE + + def_callbacks + +Route42Noop1Scene: + end + +Route42Noop2Scene: + end + +Route42SuicuneScript: + showemote EMOTE_SHOCK, PLAYER, 15 + pause 15 + playsound SFX_WARP_FROM + applymovement ROUTE42_SUICUNE, Route42SuicuneMovement + disappear ROUTE42_SUICUNE + pause 10 + setscene SCENE_ROUTE42_NOOP + clearevent EVENT_SAW_SUICUNE_ON_ROUTE_36 + setmapscene ROUTE_36, SCENE_ROUTE36_SUICUNE + end + +TrainerFisherTully: + trainer FISHER, TULLY1, EVENT_BEAT_FISHER_TULLY, FisherTullySeenText, FisherTullyBeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_FISHER_TULLY + endifjustbattled + opentext + checkflag ENGINE_TULLY_READY_FOR_REMATCH + iftrue .WantsBattle + checkflag ENGINE_TULLY_HAS_WATER_STONE + iftrue .HasWaterStone + checkcellnum PHONE_FISHER_TULLY + iftrue .NumberAccepted + checkevent EVENT_TULLY_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext FisherTullyAfterBattleText + promptbutton + setevent EVENT_TULLY_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .AskForNumber + +.AskedAlready: + scall .AskNumber2 +.AskForNumber: + askforphonenumber PHONE_FISHER_TULLY + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, FISHER, TULLY1 + scall .RegisteredNumber + sjump .NumberAccepted + +.WantsBattle: + scall .Rematch + winlosstext FisherTullyBeatenText, 0 + readmem wTullyFightCount + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight3: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight3 +.Fight2: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight2 +.Fight1: + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .LoadFight1 +.LoadFight0: + loadtrainer FISHER, TULLY1 + startbattle + reloadmapafterbattle + loadmem wTullyFightCount, 1 + clearflag ENGINE_TULLY_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer FISHER, TULLY2 + startbattle + reloadmapafterbattle + loadmem wTullyFightCount, 2 + clearflag ENGINE_TULLY_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer FISHER, TULLY3 + startbattle + reloadmapafterbattle + loadmem wTullyFightCount, 3 + clearflag ENGINE_TULLY_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer FISHER, TULLY4 + startbattle + reloadmapafterbattle + clearflag ENGINE_TULLY_READY_FOR_REMATCH + end + +.HasWaterStone: + scall .Gift + verbosegiveitem WATER_STONE + iffalse .NoRoom + clearflag ENGINE_TULLY_HAS_WATER_STONE + setevent EVENT_TULLY_GAVE_WATER_STONE + sjump .NumberAccepted + +.NoRoom: + sjump .PackFull + +.AskNumber1: + jumpstd AskNumber1MScript + end + +.AskNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberMScript + end + +.NumberAccepted: + jumpstd NumberAcceptedMScript + end + +.NumberDeclined: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.Rematch: + jumpstd RematchMScript + end + +.Gift: + jumpstd GiftMScript + end + +.PackFull: + jumpstd PackFullMScript + end + +TrainerPokemaniacShane: + trainer POKEMANIAC, SHANE, EVENT_BEAT_POKEMANIAC_SHANE, PokemaniacShaneSeenText, PokemaniacShaneBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokemaniacShaneAfterBattleText + waitbutton + closetext + end + +TrainerHikerBenjamin: + trainer HIKER, BENJAMIN, EVENT_BEAT_HIKER_BENJAMIN, HikerBenjaminSeenText, HikerBenjaminBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerBenjaminAfterBattleText + waitbutton + closetext + end + +Route42Sign1: + jumptext Route42Sign1Text + +MtMortarSign1: + jumptext MtMortarSign1Text + +MtMortarSign2: + jumptext MtMortarSign2Text + +Route42Sign2: + jumptext Route42Sign2Text + +Route42UltraBall: + itemball ULTRA_BALL + +Route42SuperPotion: + itemball SUPER_POTION + +Route42FruitTree1: + fruittree FRUITTREE_ROUTE_42_1 + +Route42FruitTree2: + fruittree FRUITTREE_ROUTE_42_2 + +Route42FruitTree3: + fruittree FRUITTREE_ROUTE_42_3 + +Route42HiddenMaxPotion: + hiddenitem MAX_POTION, EVENT_ROUTE_42_HIDDEN_MAX_POTION + +Route42SuicuneMovement: + set_sliding + fast_jump_step UP + fast_jump_step UP + fast_jump_step UP + fast_jump_step RIGHT + fast_jump_step RIGHT + fast_jump_step RIGHT + remove_sliding + step_end + +FisherTullySeenText: + text "Let me demonstrate" + line "the power of the" + cont "#MON I caught!" + done + +FisherTullyBeatenText: + text "What? That's not" + line "right." + done + +FisherTullyAfterBattleText: + text "I want to become" + line "the trainer CHAMP" + + para "using the #MON" + line "I caught." + + para "That's the best" + line "part of fishing!" + done + +HikerBenjaminSeenText: + text "Ah, it's good to" + line "be outside!" + cont "I feel so free!" + done + +HikerBenjaminBeatenText: + text "Gahahah!" + done + +HikerBenjaminAfterBattleText: + text "Losing feels in-" + line "significant if you" + + para "look up at the big" + line "sky!" + done + +PokemaniacShaneSeenText: + text "HEY!" + + para "This is my secret" + line "place! Get lost," + cont "you outsider!" + done + +PokemaniacShaneBeatenText: + text "I should have used" + line "my MOON STONE…" + done + +PokemaniacShaneAfterBattleText: + text "You're working on" + line "a #DEX?" + + para "Wow, you must know" + line "some pretty rare" + cont "#MON!" + + para "May I please see" + line "it. Please?" + done + +Route42Sign1Text: + text "ROUTE 42" + + para "ECRUTEAK CITY -" + line "MAHOGANY TOWN" + done + +MtMortarSign1Text: + text "MT.MORTAR" + + para "WATERFALL CAVE" + line "INSIDE" + done + +MtMortarSign2Text: + text "MT.MORTAR" + + para "WATERFALL CAVE" + line "INSIDE" + done + +Route42Sign2Text: + text "ROUTE 42" + + para "ECRUTEAK CITY -" + line "MAHOGANY TOWN" + done + +Route42_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 8, ROUTE_42_ECRUTEAK_GATE, 3 + warp_event 0, 9, ROUTE_42_ECRUTEAK_GATE, 4 + warp_event 10, 5, MOUNT_MORTAR_1F_OUTSIDE, 1 + warp_event 28, 9, MOUNT_MORTAR_1F_OUTSIDE, 2 + warp_event 46, 7, MOUNT_MORTAR_1F_OUTSIDE, 3 + + def_coord_events + coord_event 24, 14, SCENE_ROUTE42_SUICUNE, Route42SuicuneScript + + def_bg_events + bg_event 4, 10, BGEVENT_READ, Route42Sign1 + bg_event 7, 5, BGEVENT_READ, MtMortarSign1 + bg_event 45, 9, BGEVENT_READ, MtMortarSign2 + bg_event 54, 8, BGEVENT_READ, Route42Sign2 + bg_event 16, 11, BGEVENT_ITEM, Route42HiddenMaxPotion + + def_object_events + object_event 40, 10, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherTully, -1 + object_event 51, 9, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerHikerBenjamin, -1 + object_event 47, 8, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacShane, -1 + object_event 27, 16, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route42FruitTree1, -1 + object_event 28, 16, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route42FruitTree2, -1 + object_event 29, 16, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route42FruitTree3, -1 + object_event 6, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route42UltraBall, EVENT_ROUTE_42_ULTRA_BALL + object_event 33, 8, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route42SuperPotion, EVENT_ROUTE_42_SUPER_POTION + object_event 26, 16, SPRITE_SUICUNE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_SAW_SUICUNE_ON_ROUTE_42 diff --git a/maps/Route42.blk b/maps/Route42.blk new file mode 100644 index 0000000..c6ef37b --- /dev/null +++ b/maps/Route42.blk @@ -0,0 +1,10 @@ +hqqqqlrrnqqiqqqhqqqqiqqqqqq +lnqorrrnhqqiqqqlrrrrmorrrrraGlsmTv +hlrrmorrrrrnqqi +aX5YhqqqqiTvvv +lrsm X5YlrrrsmX55YGEjpEaTy +YX +Yjqqa +55zUecefXYjpk +hqqX55 +a>]^jqqqpppppqqqabhqqqqqqjppkq \ No newline at end of file diff --git a/maps/Route42EcruteakGate.asm b/maps/Route42EcruteakGate.asm new file mode 100644 index 0000000..6eb1c89 --- /dev/null +++ b/maps/Route42EcruteakGate.asm @@ -0,0 +1,34 @@ + object_const_def + const ROUTE42ECRUTEAKGATE_OFFICER + +Route42EcruteakGate_MapScripts: + def_scene_scripts + + def_callbacks + +Route42EcruteakGateOfficerScript: + jumptextfaceplayer Route42EcruteakGateOfficerText + +Route42EcruteakGateOfficerText: + text "MT.MORTAR is like" + line "a maze inside." + + para "Be careful. Don't" + line "get lost in there." + done + +Route42EcruteakGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 4, ECRUTEAK_CITY, 1 + warp_event 0, 5, ECRUTEAK_CITY, 2 + warp_event 9, 4, ROUTE_42, 1 + warp_event 9, 5, ROUTE_42, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route42EcruteakGateOfficerScript, -1 diff --git a/maps/Route43.asm b/maps/Route43.asm new file mode 100644 index 0000000..470e1e4 --- /dev/null +++ b/maps/Route43.asm @@ -0,0 +1,526 @@ + object_const_def + const ROUTE43_SUPER_NERD1 + const ROUTE43_SUPER_NERD2 + const ROUTE43_SUPER_NERD3 + const ROUTE43_FISHER + const ROUTE43_LASS + const ROUTE43_YOUNGSTER + const ROUTE43_FRUIT_TREE + const ROUTE43_POKE_BALL + +Route43_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, Route43CheckIfRocketsScene + +Route43CheckIfRocketsScene: + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .NoRockets + setmapscene ROUTE_43_GATE, SCENE_ROUTE43GATE_ROCKET_SHAKEDOWN + endcallback + +.NoRockets: + setmapscene ROUTE_43_GATE, SCENE_ROUTE43GATE_NOOP + endcallback + +TrainerCamperSpencer: + trainer CAMPER, SPENCER, EVENT_BEAT_CAMPER_SPENCER, CamperSpencerSeenText, CamperSpencerBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CamperSpencerAfterBattleText + waitbutton + closetext + end + +TrainerPokemaniacBen: + trainer POKEMANIAC, BEN, EVENT_BEAT_POKEMANIAC_BEN, PokemaniacBenSeenText, PokemaniacBenBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokemaniacBenAfterBattleText + waitbutton + closetext + end + +TrainerPokemaniacBrent: + trainer POKEMANIAC, BRENT1, EVENT_BEAT_POKEMANIAC_BRENT, PokemaniacBrentSeenText, PokemaniacBrentBeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_POKEMANIAC_BRENT + endifjustbattled + opentext + checkflag ENGINE_BRENT_READY_FOR_REMATCH + iftrue .WantsBattle + checkcellnum PHONE_POKEMANIAC_BRENT + iftrue .NumberAccepted + checkevent EVENT_BRENT_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext PokemaniacBrentAfterBattleText + promptbutton + setevent EVENT_BRENT_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .AskForNumber + +.AskedAlready: + scall .AskNumber2 +.AskForNumber: + askforphonenumber PHONE_POKEMANIAC_BRENT + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, POKEMANIAC, BRENT1 + scall .RegisteredNumber + sjump .NumberAccepted + +.WantsBattle: + scall .Rematch + winlosstext PokemaniacBrentBeatenText, 0 + readmem wBrentFightCount + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight3: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight3 +.Fight2: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight2 +.Fight1: + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .LoadFight1 +.LoadFight0: + loadtrainer POKEMANIAC, BRENT1 + startbattle + reloadmapafterbattle + loadmem wBrentFightCount, 1 + clearflag ENGINE_BRENT_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer POKEMANIAC, BRENT2 + startbattle + reloadmapafterbattle + loadmem wBrentFightCount, 2 + clearflag ENGINE_BRENT_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer POKEMANIAC, BRENT3 + startbattle + reloadmapafterbattle + loadmem wBrentFightCount, 3 + clearflag ENGINE_BRENT_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer POKEMANIAC, BRENT4 + startbattle + reloadmapafterbattle + clearflag ENGINE_BRENT_READY_FOR_REMATCH + end + +.AskNumber1: + jumpstd AskNumber1MScript + end + +.AskNumber2: + jumpstd AskNumber2MScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberMScript + end + +.NumberAccepted: + jumpstd NumberAcceptedMScript + end + +.NumberDeclined: + jumpstd NumberDeclinedMScript + end + +.PhoneFull: + jumpstd PhoneFullMScript + end + +.Rematch: + jumpstd RematchMScript + end + +TrainerPokemaniacRon: + trainer POKEMANIAC, RON, EVENT_BEAT_POKEMANIAC_RON, PokemaniacRonSeenText, PokemaniacRonBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokemaniacRonAfterBattleText + waitbutton + closetext + end + +TrainerFisherMarvin: + trainer FISHER, MARVIN, EVENT_BEAT_FISHER_MARVIN, FisherMarvinSeenText, FisherMarvinBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherMarvinAfterBattleText + waitbutton + closetext + end + +TrainerPicnickerTiffany: + trainer PICNICKER, TIFFANY3, EVENT_BEAT_PICNICKER_TIFFANY, PicnickerTiffanySeenText, PicnickerTiffanyBeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_PICNICKER_TIFFANY + endifjustbattled + opentext + checkflag ENGINE_TIFFANY_READY_FOR_REMATCH + iftrue .WantsBattle + checkflag ENGINE_TIFFANY_HAS_PINK_BOW + iftrue .HasPinkBow + checkcellnum PHONE_PICNICKER_TIFFANY + iftrue .NumberAccepted + checkpoke CLEFAIRY + iffalse .NoClefairy + checkevent EVENT_TIFFANY_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext PicnickerTiffanyWantsPicnicText + promptbutton + setevent EVENT_TIFFANY_ASKED_FOR_PHONE_NUMBER + scall .AskNumber1 + sjump .AskForNumber + +.AskedAlready: + scall .AskNumber2 +.AskForNumber: + askforphonenumber PHONE_PICNICKER_TIFFANY + ifequal PHONE_CONTACTS_FULL, .PhoneFull + ifequal PHONE_CONTACT_REFUSED, .NumberDeclined + gettrainername STRING_BUFFER_3, PICNICKER, TIFFANY3 + scall .RegisteredNumber + sjump .NumberAccepted + +.WantsBattle: + scall .Rematch + winlosstext PicnickerTiffanyBeatenText, 0 + readmem wTiffanyFightCount + ifequal 3, .Fight3 + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight3: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight3 +.Fight2: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight2 +.Fight1: + checkevent EVENT_CLEARED_RADIO_TOWER + iftrue .LoadFight1 +.LoadFight0: + loadtrainer PICNICKER, TIFFANY3 + startbattle + reloadmapafterbattle + loadmem wTiffanyFightCount, 1 + clearflag ENGINE_TIFFANY_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer PICNICKER, TIFFANY1 + startbattle + reloadmapafterbattle + loadmem wTiffanyFightCount, 2 + clearflag ENGINE_TIFFANY_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer PICNICKER, TIFFANY2 + startbattle + reloadmapafterbattle + loadmem wTiffanyFightCount, 3 + clearflag ENGINE_TIFFANY_READY_FOR_REMATCH + end + +.LoadFight3: + loadtrainer PICNICKER, TIFFANY4 + startbattle + reloadmapafterbattle + clearflag ENGINE_TIFFANY_READY_FOR_REMATCH + end + +.HasPinkBow: + scall .Gift + verbosegiveitem PINK_BOW + iffalse .NoRoom + clearflag ENGINE_TIFFANY_HAS_PINK_BOW + setevent EVENT_TIFFANY_GAVE_PINK_BOW + sjump .NumberAccepted + +.NoRoom: + sjump .PackFull + +.NoClefairy: + writetext PicnickerTiffanyClefairyText + waitbutton + closetext + end + +.AskNumber1: + jumpstd AskNumber1FScript + end + +.AskNumber2: + jumpstd AskNumber2FScript + end + +.RegisteredNumber: + jumpstd RegisteredNumberFScript + end + +.NumberAccepted: + jumpstd NumberAcceptedFScript + end + +.NumberDeclined: + jumpstd NumberDeclinedFScript + end + +.PhoneFull: + jumpstd PhoneFullFScript + end + +.Rematch: + jumpstd RematchFScript + end + +.Gift: + jumpstd GiftFScript + end + +.PackFull: + jumpstd PackFullFScript + end + +Route43Sign1: + jumptext Route43Sign1Text + +Route43Sign2: + jumptext Route43Sign2Text + +Route43TrainerTips: + jumptext Route43TrainerTipsText + +Route43FruitTree: + fruittree FRUITTREE_ROUTE_43 + +Route43MaxEther: + itemball MAX_ETHER + +PokemaniacBenSeenText: + text "I love #MON!" + + para "That's why I" + line "started--and why" + + para "I'll keep on col-" + line "lecting #MON!" + done + +PokemaniacBenBeatenText: + text "How could you do" + line "this to me?" + done + +PokemaniacBenAfterBattleText: + text "What else do I" + line "like besides" + cont "#MON?" + + para "MARY on the radio." + line "I bet she's cute!" + done + +PokemaniacBrentSeenText: + text "Hey! Do you have" + line "any rare #MON?" + done + +PokemaniacBrentBeatenText: + text "Oh, my poor #-" + line "MON! Darlings!" + done + +PokemaniacBrentAfterBattleText: + text "I'd be happy just" + line "to own a single" + cont "rare #MON." + done + +PokemaniacRonSeenText: + text "Would you get" + line "this?" + + para "Some guy" + line "made fun of my" + cont "#MON!" + + para "Darn it! My #-" + line "MON's great!" + done + +PokemaniacRonBeatenText: + text "My NIDOKING did" + line "pretty right on!" + done + +PokemaniacRonAfterBattleText: + text "It's okay for" + line "people to like" + + para "different types" + line "of #MON." + + para "#MON isn't just" + line "about having the" + cont "most powerful one." + done + +FisherMarvinSeenText: + text "I'm in a slump." + + para "Maybe it's the" + line "gear I'm using." + + para "Let's battle for a" + line "change of pace!" + done + +FisherMarvinBeatenText: + text "I lost, but I feel" + line "better anyway." + done + +FisherMarvinAfterBattleText: + text "KURT's LURE BALL" + line "is the best for" + + para "catching hooked" + line "#MON." + + para "It's much more" + line "effective than a" + cont "ULTRA BALL." + done + +CamperSpencerSeenText: + text "I can do so much" + line "with my #MON--" + cont "it's super-fun!" + done + +CamperSpencerBeatenText: + text "Losing isn't fun" + line "at all…" + done + +CamperSpencerAfterBattleText: + text "What is going on" + line "at LAKE OF RAGE?" + + para "We were planning" + line "to camp there." + done + +PicnickerTiffanySeenText: + text "Are you going to" + line "LAKE OF RAGE too?" + + para "Let's play for a " + line "little while!" + done + +PicnickerTiffanyBeatenText: + text "I played too much!" + done + +PicnickerTiffanyWantsPicnicText: + text "I'm having a pic-" + line "nic with #MON." + + para "Won't you join us?" + done + +PicnickerTiffanyClefairyText: + text "Isn't my CLEFAIRY" + line "just the most" + cont "adorable thing?" + done + +Route43Sign1Text: + text "ROUTE 43" + + para "LAKE OF RAGE -" + line "MAHOGANY TOWN" + done + +Route43Sign2Text: + text "ROUTE 43" + + para "LAKE OF RAGE -" + line "MAHOGANY TOWN" + done + +Route43TrainerTipsText: + text "TRAINER TIPS" + + para "All #MON have" + line "pros and cons" + + para "depending on their" + line "types." + + para "If their types" + line "differ, a higher-" + + para "level #MON may" + line "lose in battle." + + para "Learn which types" + line "are strong and" + + para "weak against your" + line "#MON's type." + done + +Route43_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 51, ROUTE_43_MAHOGANY_GATE, 1 + warp_event 10, 51, ROUTE_43_MAHOGANY_GATE, 2 + warp_event 17, 35, ROUTE_43_GATE, 3 + warp_event 17, 31, ROUTE_43_GATE, 1 + warp_event 18, 31, ROUTE_43_GATE, 2 + + def_coord_events + + def_bg_events + bg_event 13, 3, BGEVENT_READ, Route43Sign1 + bg_event 11, 49, BGEVENT_READ, Route43Sign2 + bg_event 16, 38, BGEVENT_READ, Route43TrainerTips + + def_object_events + object_event 13, 5, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPokemaniacBen, -1 + object_event 13, 20, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacBrent, -1 + object_event 14, 7, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPokemaniacRon, -1 + object_event 4, 16, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 4, TrainerFisherMarvin, -1 + object_event 9, 25, SPRITE_LASS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerPicnickerTiffany, -1 + object_event 13, 40, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerCamperSpencer, -1 + object_event 1, 26, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route43FruitTree, -1 + object_event 12, 32, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route43MaxEther, EVENT_ROUTE_43_MAX_ETHER diff --git a/maps/Route43.blk b/maps/Route43.blk new file mode 100644 index 0000000..d1cc4ed --- /dev/null +++ b/maps/Route43.blk @@ -0,0 +1 @@ +bbGb`TU`XY`TUXYaXY]^XYbXYdgXYaXY jpkWVpqqiWVqqqiqormEqiqiqiqqpkqqqixjpqqqi hqqqqi hq \ No newline at end of file diff --git a/maps/Route43Gate.asm b/maps/Route43Gate.asm new file mode 100644 index 0000000..2ac39d1 --- /dev/null +++ b/maps/Route43Gate.asm @@ -0,0 +1,264 @@ +DEF ROUTE43GATE_TOLL EQU 1000 + + object_const_def + const ROUTE43GATE_OFFICER + const ROUTE43GATE_ROCKET1 + const ROUTE43GATE_ROCKET2 + +Route43Gate_MapScripts: + def_scene_scripts + scene_script Route43GateRocketShakedownScene, SCENE_ROUTE43GATE_ROCKET_SHAKEDOWN + scene_script Route43GateNoopScene, SCENE_ROUTE43GATE_NOOP + + def_callbacks + callback MAPCALLBACK_NEWMAP, Route43GateCheckIfRocketsCallback + +Route43GateRocketShakedownScene: + sdefer Route43GateRocketTakeoverScript + end + +Route43GateNoopScene: + end + +Route43GateCheckIfRocketsCallback: + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .NoRockets + setmapscene ROUTE_43, 0 ; Route 43 does not have a scene variable + endcallback + +.NoRockets: + setmapscene ROUTE_43, 1 ; Route 43 does not have a scene variable + endcallback + +Route43GateRocketTakeoverScript: + playmusic MUSIC_ROCKET_ENCOUNTER + readvar VAR_FACING + ifequal DOWN, RocketScript_Southbound + ifequal UP, RocketScript_Northbound + setscene SCENE_ROUTE43GATE_NOOP + end + +RocketScript_Southbound: + applymovement PLAYER, PlayerStepsIn + showemote EMOTE_SHOCK, ROUTE43GATE_ROCKET2, 15 + applymovement ROUTE43GATE_ROCKET2, Rocket2Script_BlocksYouSouth + turnobject ROUTE43GATE_ROCKET1, UP + showemote EMOTE_SHOCK, ROUTE43GATE_ROCKET1, 15 + applymovement ROUTE43GATE_ROCKET1, Rocket1Script_BlocksYouSouth + opentext + writetext RocketText_TollFee + promptbutton + checkmoney YOUR_MONEY, ROUTE43GATE_TOLL - 1 + ifequal HAVE_MORE, RocketScript_TollSouth + sjump RocketScript_YoureBrokeSouth + +RocketScript_TollSouth: + takemoney YOUR_MONEY, ROUTE43GATE_TOLL + writetext RocketText_ThankYou + sjump RocketScript_ShakeDownSouth + +RocketScript_YoureBrokeSouth: + takemoney YOUR_MONEY, ROUTE43GATE_TOLL + writetext RocketText_AllYouGot + sjump RocketScript_ShakeDownSouth + +RocketScript_ShakeDownSouth: + promptbutton + closetext + applymovement ROUTE43GATE_ROCKET1, Rocket1Script_LetsYouPassSouth + applymovement ROUTE43GATE_ROCKET2, Rocket2Script_LetsYouPassSouth + setscene SCENE_ROUTE43GATE_NOOP + special RestartMapMusic + end + +RocketScript_Northbound: + showemote EMOTE_SHOCK, ROUTE43GATE_ROCKET1, 15 + applymovement ROUTE43GATE_ROCKET1, Rocket1Script_BlocksYouNorth + turnobject ROUTE43GATE_ROCKET2, DOWN + showemote EMOTE_SHOCK, ROUTE43GATE_ROCKET2, 15 + applymovement ROUTE43GATE_ROCKET2, Rocket2Script_BlocksYouNorth + opentext + writetext RocketText_TollFee + promptbutton + checkmoney YOUR_MONEY, ROUTE43GATE_TOLL - 1 + ifequal HAVE_MORE, RocketScript_TollNorth + sjump RocketScript_YoureBrokeNorth + +RocketScript_TollNorth: + takemoney YOUR_MONEY, ROUTE43GATE_TOLL + writetext RocketText_ThankYou + sjump RocketScript_ShakeDownNorth + +RocketScript_YoureBrokeNorth: + takemoney YOUR_MONEY, ROUTE43GATE_TOLL + writetext RocketText_AllYouGot + sjump RocketScript_ShakeDownNorth + +RocketScript_ShakeDownNorth: + promptbutton + closetext + applymovement ROUTE43GATE_ROCKET2, Rocket2Script_LetsYouPassNorth + applymovement ROUTE43GATE_ROCKET1, Rocket1Script_LetsYouPassNorth + setscene SCENE_ROUTE43GATE_NOOP + special RestartMapMusic + end + +RocketScript_MakingABundle: + jumptextfaceplayer RocketText_MakingABundle + +OfficerScript_GuardWithSludgeBomb: + faceplayer + opentext + checkevent EVENT_GOT_TM36_SLUDGE_BOMB + iftrue .GotSludgeBomb + writetext OfficerText_FoundTM + promptbutton + verbosegiveitem TM_SLUDGE_BOMB + iffalse .NoRoomForSludgeBomb + setevent EVENT_GOT_TM36_SLUDGE_BOMB + closetext + end + +.GotSludgeBomb: + writetext OfficerText_AvoidGrass + waitbutton +.NoRoomForSludgeBomb: + closetext + end + +PlayerStepsIn: + step DOWN + step_end + +Rocket1Script_BlocksYouSouth: + big_step UP + big_step UP + big_step RIGHT + big_step RIGHT + turn_head UP + step_end + +Rocket1Script_LetsYouPassSouth: + big_step LEFT + big_step LEFT + big_step DOWN + big_step DOWN + step_end + +Rocket1Script_BlocksYouNorth: + big_step DOWN + big_step DOWN + big_step RIGHT + big_step RIGHT + turn_head DOWN + step_end + +Rocket1Script_LetsYouPassNorth: + big_step LEFT + big_step LEFT + big_step UP + big_step UP + turn_head DOWN + step_end + +Rocket2Script_BlocksYouSouth: + big_step UP + big_step UP + big_step LEFT + big_step LEFT + turn_head UP + step_end + +Rocket2Script_LetsYouPassSouth: + big_step RIGHT + big_step RIGHT + big_step DOWN + big_step DOWN + turn_head UP + step_end + +Rocket2Script_BlocksYouNorth: + big_step DOWN + big_step DOWN + big_step LEFT + big_step LEFT + turn_head DOWN + step_end + +Rocket2Script_LetsYouPassNorth: + big_step RIGHT + big_step RIGHT + big_step UP + big_step UP + step_end + +RocketText_TollFee: + text "Hold it there," + line "kiddo!" + + para "The toll is ¥{d:ROUTE43GATE_TOLL}" + line "to go through." + done + +RocketText_ThankYou: + text "Thank you very" + line "much!" + done + +RocketText_AllYouGot: + text "Then pay what you" + line "have, please." + done + +RocketText_MakingABundle: + text "He-he-he. We're" + line "making a bundle." + + para "Everyone wants to" + line "see what's going" + + para "on up at LAKE OF" + line "RAGE." + done + +OfficerText_FoundTM: + text "I got chased from" + line "my post by these" + cont "thugs in black." + + para "They left this" + line "behind." + + para "It makes me uncom-" + line "fortable. Could" + cont "you take it away?" + done + +Text_ReceivedTM30: ; unreferenced + text " received" + line "TM30." + done + +OfficerText_AvoidGrass: + text "Use this gate to" + line "avoid walking in" + cont "the grass." + done + +Route43Gate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 0, ROUTE_43, 4 + warp_event 5, 0, ROUTE_43, 5 + warp_event 4, 7, ROUTE_43, 3 + warp_event 5, 7, ROUTE_43, 3 + + def_coord_events + + def_bg_events + + def_object_events + object_event 0, 4, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, OfficerScript_GuardWithSludgeBomb, EVENT_LAKE_OF_RAGE_CIVILIANS + object_event 2, 4, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RocketScript_MakingABundle, EVENT_ROUTE_43_GATE_ROCKETS + object_event 7, 4, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RocketScript_MakingABundle, EVENT_ROUTE_43_GATE_ROCKETS diff --git a/maps/Route43MahoganyGate.asm b/maps/Route43MahoganyGate.asm new file mode 100644 index 0000000..65a6340 --- /dev/null +++ b/maps/Route43MahoganyGate.asm @@ -0,0 +1,53 @@ + object_const_def + const ROUTE43MAHOGANYGATE_OFFICER + +Route43MahoganyGate_MapScripts: + def_scene_scripts + + def_callbacks + +Route43MahoganyGateOfficer: + faceplayer + opentext + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .RocketsCleared + writetext Route43MahoganyGateOfficerText + waitbutton + closetext + end + +.RocketsCleared: + writetext Route43MahoganyGateOfficerRocketsClearedText + waitbutton + closetext + end + +Route43MahoganyGateOfficerText: + text "Only people headed" + line "up to LAKE OF RAGE" + + para "have been through" + line "here lately." + done + +Route43MahoganyGateOfficerRocketsClearedText: + text "Nobody goes up to" + line "LAKE OF RAGE these" + cont "days." + done + +Route43MahoganyGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 0, ROUTE_43, 1 + warp_event 5, 0, ROUTE_43, 2 + warp_event 4, 7, MAHOGANY_TOWN, 5 + warp_event 5, 7, MAHOGANY_TOWN, 5 + + def_coord_events + + def_bg_events + + def_object_events + object_event 0, 4, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route43MahoganyGateOfficer, -1 diff --git a/maps/Route44.asm b/maps/Route44.asm new file mode 100644 index 0000000..099d59a --- /dev/null +++ b/maps/Route44.asm @@ -0,0 +1,531 @@ + object_const_def + const ROUTE44_FISHER1 + const ROUTE44_FISHER2 + const ROUTE44_YOUNGSTER1 + const ROUTE44_SUPER_NERD + const ROUTE44_YOUNGSTER2 + const ROUTE44_COOLTRAINER_M + const ROUTE44_COOLTRAINER_F + const ROUTE44_FRUIT_TREE + const ROUTE44_POKE_BALL1 + const ROUTE44_POKE_BALL2 + const ROUTE44_POKE_BALL3 + +Route44_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerBirdKeeperVance1: + trainer BIRD_KEEPER, VANCE1, EVENT_BEAT_BIRD_KEEPER_VANCE, BirdKeeperVance1SeenText, BirdKeeperVance1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_BIRDKEEPER_VANCE + endifjustbattled + opentext + checkflag ENGINE_VANCE_READY_FOR_REMATCH + iftrue .WantsBattle + checkcellnum PHONE_BIRDKEEPER_VANCE + iftrue Route44NumberAcceptedM + checkevent EVENT_VANCE_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext BirdKeeperVanceLegendaryBirdsText + promptbutton + setevent EVENT_VANCE_ASKED_FOR_PHONE_NUMBER + scall Route44AskNumber1M + sjump .AskForNumber + +.AskedAlready: + scall Route44AskNumber2M +.AskForNumber: + askforphonenumber PHONE_BIRDKEEPER_VANCE + ifequal PHONE_CONTACTS_FULL, Route44PhoneFullM + ifequal PHONE_CONTACT_REFUSED, Route44NumberDeclinedM + gettrainername STRING_BUFFER_3, BIRD_KEEPER, VANCE1 + scall Route44RegisteredNumberM + sjump Route44NumberAcceptedM + +.WantsBattle: + scall Route44RematchM + winlosstext BirdKeeperVance1BeatenText, 0 + readmem wVanceFightCount + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight2: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight2 +.Fight1: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight1 +.LoadFight0: + loadtrainer BIRD_KEEPER, VANCE1 + startbattle + reloadmapafterbattle + loadmem wVanceFightCount, 1 + clearflag ENGINE_VANCE_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer BIRD_KEEPER, VANCE2 + startbattle + reloadmapafterbattle + loadmem wVanceFightCount, 2 + clearflag ENGINE_VANCE_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer BIRD_KEEPER, VANCE3 + startbattle + reloadmapafterbattle + clearflag ENGINE_VANCE_READY_FOR_REMATCH + checkevent EVENT_VANCE_CARBOS + iftrue .Carbos + checkevent EVENT_GOT_CARBOS_FROM_VANCE + iftrue .ReceivedCarbosBefore + scall Route44RematchGiftM + verbosegiveitem CARBOS + iffalse VancePackFull + setevent EVENT_GOT_CARBOS_FROM_VANCE + sjump Route44NumberAcceptedM + +.ReceivedCarbosBefore: + end + +.Carbos: + opentext + writetext BirdKeeperVance2BeatenText + waitbutton + verbosegiveitem CARBOS + iffalse VancePackFull + clearevent EVENT_VANCE_CARBOS + setevent EVENT_GOT_CARBOS_FROM_VANCE + sjump Route44NumberAcceptedM + +Route44AskNumber1M: + jumpstd AskNumber1MScript + end + +Route44AskNumber2M: + jumpstd AskNumber2MScript + end + +Route44RegisteredNumberM: + jumpstd RegisteredNumberMScript + end + +Route44NumberAcceptedM: + jumpstd NumberAcceptedMScript + end + +Route44NumberDeclinedM: + jumpstd NumberDeclinedMScript + end + +Route44PhoneFullM: + jumpstd PhoneFullMScript + end + +Route44RematchM: + jumpstd RematchMScript + end + +Route44GiftM: + jumpstd GiftMScript + end + +Route44PackFullM: + jumpstd PackFullMScript + end + +VancePackFull: + setevent EVENT_VANCE_CARBOS + jumpstd PackFullMScript + end + +Route44RematchGiftM: + jumpstd RematchGiftMScript + end + +TrainerPsychicPhil: + trainer PSYCHIC_T, PHIL, EVENT_BEAT_PSYCHIC_PHIL, PsychicPhilSeenText, PsychicPhilBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PsychicPhilAfterBattleText + waitbutton + closetext + end + +TrainerFisherWilton1: + trainer FISHER, WILTON1, EVENT_BEAT_FISHER_WILTON, FisherWilton1SeenText, FisherWilton1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_FISHER_WILTON + endifjustbattled + opentext + checkflag ENGINE_WILTON_READY_FOR_REMATCH + iftrue .WantsBattle + checkflag ENGINE_WILTON_HAS_ITEM + iftrue .HasItem + checkcellnum PHONE_FISHER_WILTON + iftrue Route44NumberAcceptedM + checkevent EVENT_WILTON_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext FisherWiltonHugePoliwagText + promptbutton + setevent EVENT_WILTON_ASKED_FOR_PHONE_NUMBER + scall Route44AskNumber1M + sjump .AskForNumber + +.AskedAlready: + scall Route44AskNumber2M +.AskForNumber: + askforphonenumber PHONE_FISHER_WILTON + ifequal PHONE_CONTACTS_FULL, Route44PhoneFullM + ifequal PHONE_CONTACT_REFUSED, Route44NumberDeclinedM + gettrainername STRING_BUFFER_3, FISHER, WILTON1 + scall Route44RegisteredNumberM + sjump Route44NumberAcceptedM + +.WantsBattle: + scall Route44RematchM + winlosstext FisherWilton1BeatenText, 0 + readmem wWiltonFightCount + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight2: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight2 +.Fight1: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight1 +.LoadFight0: + loadtrainer FISHER, WILTON1 + startbattle + reloadmapafterbattle + loadmem wWiltonFightCount, 1 + clearflag ENGINE_WILTON_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer FISHER, WILTON2 + startbattle + reloadmapafterbattle + loadmem wWiltonFightCount, 2 + clearflag ENGINE_WILTON_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer FISHER, WILTON3 + startbattle + reloadmapafterbattle + clearflag ENGINE_WILTON_READY_FOR_REMATCH + end + +.HasItem: + scall Route44GiftM + checkevent EVENT_WILTON_HAS_ULTRA_BALL + iftrue .UltraBall + checkevent EVENT_WILTON_HAS_GREAT_BALL + iftrue .GreatBall + checkevent EVENT_WILTON_HAS_POKE_BALL + iftrue .PokeBall +.UltraBall: + verbosegiveitem ULTRA_BALL + iffalse .Route44PackFullM + sjump .ItemReceived + +.GreatBall: + verbosegiveitem GREAT_BALL + iffalse .Route44PackFullM + sjump .ItemReceived + +.PokeBall: + verbosegiveitem POKE_BALL + iffalse .Route44PackFullM +.ItemReceived: + clearflag ENGINE_WILTON_HAS_ITEM + sjump Route44NumberAcceptedM + +.Route44PackFullM: + sjump Route44PackFullM + +TrainerFisherEdgar: + trainer FISHER, EDGAR, EVENT_BEAT_FISHER_EDGAR, FisherEdgarSeenText, FisherEdgarBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FisherEdgarAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainerfCybil: + trainer COOLTRAINERF, CYBIL, EVENT_BEAT_COOLTRAINERF_CYBIL, CooltrainerfCybilSeenText, CooltrainerfCybilBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainerfCybilAfterBattleText + waitbutton + closetext + end + +TrainerPokemaniacZach: + trainer POKEMANIAC, ZACH, EVENT_BEAT_POKEMANIAC_ZACH, PokemaniacZachSeenText, PokemaniacZachBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokemaniacZachAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainermAllen: + trainer COOLTRAINERM, ALLEN, EVENT_BEAT_COOLTRAINERM_ALLEN, CooltrainermAllenSeenText, CooltrainermAllenBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainermAllenAfterBattleText + waitbutton + closetext + end + +Route44Sign1: + jumptext Route44Sign1Text + +Route44Sign2: + jumptext Route44Sign2Text + +Route44FruitTree: + fruittree FRUITTREE_ROUTE_44 + +Route44MaxRevive: + itemball MAX_REVIVE + +Route44UltraBall: + itemball ULTRA_BALL + +Route44MaxRepel: + itemball MAX_REPEL + +Route44HiddenElixer: + hiddenitem ELIXER, EVENT_ROUTE_44_HIDDEN_ELIXER + +FisherWilton1SeenText: + text "Aack! You made me" + line "lose a POLIWAG!" + + para "What are you going" + line "to do about it?" + done + +FisherWilton1BeatenText: + text "Just forget about" + line "it." + done + +FisherWiltonHugePoliwagText: + text "That POLIWAG that" + line "got away…" + cont "It was huge." + + para "I swear it must've" + line "been 16 feet long!" + done + +FisherEdgarSeenText: + text "I fish until I" + line "can't anymore." + + para "I also battle" + line "until I drop." + + para "That's my" + line "relationship" + cont "with my #MON." + done + +FisherEdgarBeatenText: + text "Hmmmm… " + line "This isn't right." + done + +FisherEdgarAfterBattleText: + text "That's 100 wins" + line "to 101 losses." + + para "I won't battle" + line "again for a while." + done + +BirdKeeperVance1SeenText: + text "Do you know about" + line "the legendary bird" + cont "#MON?" + done + +BirdKeeperVance1BeatenText: + text "Whew! You're hot" + line "stuff." + done + +BirdKeeperVanceLegendaryBirdsText: + text "ARTICUNO, ZAPDOS" + line "and MOLTRES are" + + para "the three legend-" + line "ary bird #MON." + + para "I heard there are" + line "other legendary" + cont "birds, though." + done + +BirdKeeperVance2BeatenText: + text "Why can't I ever" + line "beat you?" + + para "Oh yeah, here you" + line "go. It's that gift" + + para "I couldn't give" + line "you last time." + done + +PsychicPhilSeenText: + text "I'm gonna win," + line "for sure!" + done + +PsychicPhilBeatenText: + text "Arrgh… That's a" + line "shocking loss…" + done + +PsychicPhilAfterBattleText: + text "It's important to" + line "have conviction" + cont "on your side." + done + +PokemaniacZachSeenText: + text "I'll do anything" + line "to get my hands on" + cont "rare #MON!" + done + +PokemaniacZachBeatenText: + text "Oooh, your #MON" + line "are so appealing." + done + +PokemaniacZachAfterBattleText: + text "If a #MON has" + line "different colors" + + para "from usual, it's" + line "more valuable." + + para "What? You mean" + line "that's not true?" + done + +CooltrainermAllenSeenText: + text "I can tell you're" + line "a good trainer by" + cont "looking at you." + + para "I'm good at #-" + line "MON, and I can see" + cont "that you are too." + done + +CooltrainermAllenBeatenText: + text "Tch! It's a total" + line "loss on my part." + done + +CooltrainermAllenAfterBattleText: + text "Wow. You have a" + line "lot of BADGES." + + para "No wonder you're" + line "so tough." + + para "I wonder if" + line "ECRUTEAK GYM's" + + para "MORTY is still in" + line "training?" + + para "He really hammered" + line "me." + done + +CooltrainerfCybilSeenText: + text "You look strong." + + para "Good trainers seek" + line "tough opponents" + cont "instinctively." + done + +CooltrainerfCybilBeatenText: + text "Nope! This won't" + line "do at all." + done + +CooltrainerfCybilAfterBattleText: + text "We all get better" + line "by experiencing" + cont "many battles." + + para "I battled a lot to" + line "become what I am" + cont "today--an elite." + done + +Route44Sign1Text: + text "ROUTE 44" + line "ICE PATH AHEAD" + done + +Route44Sign2Text: + text "ROUTE 44" + + para "MAHOGANY TOWN -" + line "BLACKTHORN CITY" + done + +Route44_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 56, 7, ICE_PATH_1F, 1 + + def_coord_events + + def_bg_events + bg_event 53, 7, BGEVENT_READ, Route44Sign1 + bg_event 6, 10, BGEVENT_READ, Route44Sign2 + bg_event 32, 9, BGEVENT_ITEM, Route44HiddenElixer + + def_object_events + object_event 35, 3, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherWilton1, -1 + object_event 19, 13, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerFisherEdgar, -1 + object_event 10, 9, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPsychicPhil, -1 + object_event 43, 2, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacZach, -1 + object_event 51, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerBirdKeeperVance1, -1 + object_event 41, 15, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 5, TrainerCooltrainermAllen, -1 + object_event 31, 14, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 5, TrainerCooltrainerfCybil, -1 + object_event 9, 5, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route44FruitTree, -1 + object_event 30, 8, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route44MaxRevive, EVENT_ROUTE_44_MAX_REVIVE + object_event 45, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route44UltraBall, EVENT_ROUTE_44_ULTRA_BALL + object_event 14, 9, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route44MaxRepel, EVENT_ROUTE_44_MAX_REPEL diff --git a/maps/Route44.blk b/maps/Route44.blk new file mode 100644 index 0000000..aaf8648 --- /dev/null +++ b/maps/Route44.blk @@ -0,0 +1 @@ +nqqqorrrrrrrrrrrrrrrrrrrrrrnqqhqqomeeehqqlrrmbTvvvvUhqqX55zUNGlsn]^TUX5YNRWWWhpkE=^TyY]NhqiTvUTy5Y\RZWWjpqqqkXzvUhqqqqqppppppppppppppppppppppppqqq \ No newline at end of file diff --git a/maps/Route45.asm b/maps/Route45.asm new file mode 100644 index 0000000..cf24706 --- /dev/null +++ b/maps/Route45.asm @@ -0,0 +1,557 @@ + object_const_def + const ROUTE45_POKEFAN_M1 + const ROUTE45_POKEFAN_M2 + const ROUTE45_POKEFAN_M3 + const ROUTE45_POKEFAN_M4 + const ROUTE45_BLACK_BELT + const ROUTE45_COOLTRAINER_M + const ROUTE45_COOLTRAINER_F + const ROUTE45_FRUIT_TREE + const ROUTE45_POKE_BALL1 + const ROUTE45_POKE_BALL2 + const ROUTE45_POKE_BALL3 + const ROUTE45_POKE_BALL4 + const ROUTE45_YOUNGSTER + +Route45_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerBlackbeltKenji: + trainer BLACKBELT_T, KENJI3, EVENT_BEAT_BLACKBELT_KENJI, BlackbeltKenji3SeenText, BlackbeltKenji3BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_BLACKBELT_KENJI + endifjustbattled + opentext + checkcellnum PHONE_BLACKBELT_KENJI + iftrue .Registered + checkevent EVENT_KENJI_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + special SampleKenjiBreakCountdown + writetext BlackbeltKenjiAfterBattleText + waitbutton + setevent EVENT_KENJI_ASKED_FOR_PHONE_NUMBER + scall Route45AskNumber1M + sjump .AskForNumber + +.AskedAlready: + scall Route45AskNumber2M +.AskForNumber: + askforphonenumber PHONE_BLACKBELT_KENJI + ifequal PHONE_CONTACTS_FULL, Route45PhoneFullM + ifequal PHONE_CONTACT_REFUSED, Route45NumberDeclinedM + gettrainername STRING_BUFFER_3, BLACKBELT_T, KENJI3 + scall Route45RegisteredNumberM + sjump Route45NumberAcceptedM + +.Registered: + readvar VAR_KENJI_BREAK + ifnotequal 1, Route45NumberAcceptedM + checktime MORN + iftrue .Morning + checktime NITE + iftrue .Night + checkevent EVENT_KENJI_ON_BREAK + iffalse Route45NumberAcceptedM + scall Route45GiftM + verbosegiveitem PP_UP + iffalse .NoRoom + clearevent EVENT_KENJI_ON_BREAK + special SampleKenjiBreakCountdown + sjump Route45NumberAcceptedM + +.Morning: + writetext BlackbeltKenjiMorningText + waitbutton + closetext + end + +.Night: + writetext BlackbeltKenjiNightText + waitbutton + closetext + end + +.NoRoom: + sjump Route45PackFullM + +Route45AskNumber1M: + jumpstd AskNumber1MScript + end + +Route45AskNumber2M: + jumpstd AskNumber2MScript + end + +Route45RegisteredNumberM: + jumpstd RegisteredNumberMScript + end + +Route45NumberAcceptedM: + jumpstd NumberAcceptedMScript + end + +Route45NumberDeclinedM: + jumpstd NumberDeclinedMScript + end + +Route45PhoneFullM: + jumpstd PhoneFullMScript + end + +Route45RematchM: + jumpstd RematchMScript + end + +Route45GiftM: + jumpstd GiftMScript + end + +Route45PackFullM: + jumpstd PackFullMScript + end + +HikerParryHasIron: + setevent EVENT_PARRY_IRON + jumpstd PackFullMScript + end + +Route45RematchGiftM: + jumpstd RematchGiftMScript + end + +TrainerHikerErik: + trainer HIKER, ERIK, EVENT_BEAT_HIKER_ERIK, HikerErikSeenText, HikerErikBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerErikAfterBattleText + waitbutton + closetext + end + +TrainerHikerMichael: + trainer HIKER, MICHAEL, EVENT_BEAT_HIKER_MICHAEL, HikerMichaelSeenText, HikerMichaelBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerMichaelAfterBattleText + waitbutton + closetext + end + +TrainerHikerParry: + trainer HIKER, PARRY3, EVENT_BEAT_HIKER_PARRY, HikerParry3SeenText, HikerParry3BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_HIKER_PARRY + endifjustbattled + opentext + checkflag ENGINE_PARRY_READY_FOR_REMATCH + iftrue .WantsBattle + checkcellnum PHONE_HIKER_PARRY + iftrue Route45NumberAcceptedM + checkevent EVENT_PARRY_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext HikerParryAfterBattleText + promptbutton + setevent EVENT_PARRY_ASKED_FOR_PHONE_NUMBER + scall Route45AskNumber1M + sjump .AskForNumber + +.AskedAlready: + scall Route45AskNumber2M +.AskForNumber: + askforphonenumber PHONE_HIKER_PARRY + ifequal PHONE_CONTACTS_FULL, Route45PhoneFullM + ifequal PHONE_CONTACT_REFUSED, Route45NumberDeclinedM + gettrainername STRING_BUFFER_3, HIKER, PARRY1 + scall Route45RegisteredNumberM + sjump Route45NumberAcceptedM + +.WantsBattle: + scall Route45RematchM + winlosstext HikerParry3BeatenText, 0 + readmem wParryFightCount + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight2: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight2 +.Fight1: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight1 +.LoadFight0: + loadtrainer HIKER, PARRY3 + startbattle + reloadmapafterbattle + loadmem wParryFightCount, 1 + clearflag ENGINE_PARRY_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer HIKER, PARRY1 + startbattle + reloadmapafterbattle + loadmem wParryFightCount, 2 + clearflag ENGINE_PARRY_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer HIKER, PARRY2 + startbattle + reloadmapafterbattle + clearflag ENGINE_PARRY_READY_FOR_REMATCH + checkevent EVENT_PARRY_IRON + iftrue .HasIron + checkevent EVENT_GOT_IRON_FROM_PARRY + iftrue .GotIron + scall Route45RematchGiftM + verbosegiveitem IRON + iffalse HikerParryHasIron + setevent EVENT_GOT_IRON_FROM_PARRY + sjump Route45NumberAcceptedM + +.GotIron: + end + +.HasIron: + opentext + writetext HikerParryGivesIronText + waitbutton + verbosegiveitem IRON + iffalse HikerParryHasIron + clearevent EVENT_PARRY_IRON + setevent EVENT_GOT_IRON_FROM_PARRY + sjump Route45NumberAcceptedM + +TrainerHikerTimothy: + trainer HIKER, TIMOTHY, EVENT_BEAT_HIKER_TIMOTHY, HikerTimothySeenText, HikerTimothyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerTimothyAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainermRyan: + trainer COOLTRAINERM, RYAN, EVENT_BEAT_COOLTRAINERM_RYAN, CooltrainermRyanSeenText, CooltrainermRyanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainermRyanAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainerfKelly: + trainer COOLTRAINERF, KELLY, EVENT_BEAT_COOLTRAINERF_KELLY, CooltrainerfKellySeenText, CooltrainerfKellyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainerfKellyAfterBattleText + waitbutton + closetext + end + +TrainerCamperQuentin: + faceplayer + opentext + checkevent EVENT_BEAT_CAMPER_QUENTIN + iftrue .Defeated + writetext CamperQuentinSeenText + waitbutton + closetext + winlosstext CamperQuentinBeatenText, 0 + loadtrainer CAMPER, QUENTIN + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_CAMPER_QUENTIN + closetext + end + +.Defeated: + writetext CamperQuentinAfterBattleText + waitbutton + closetext + end + +Route45DummyScript: ; unreferenced + writetext Route45DummyText + waitbutton + closetext + end + +Route45Sign: + jumptext Route45SignText + +Route45FruitTree: + fruittree FRUITTREE_ROUTE_45 + +Route45Nugget: + itemball NUGGET + +Route45Revive: + itemball REVIVE + +Route45Elixer: + itemball ELIXER + +Route45MaxPotion: + itemball MAX_POTION + +Route45HiddenPpUp: + hiddenitem PP_UP, EVENT_ROUTE_45_HIDDEN_PP_UP + +HikerErikSeenText: + text "Be prepared for" + line "anything!" + + para "Let me see if your" + line "#MON have been" + cont "raised properly!" + done + +HikerErikBeatenText: + text "Oh, I lost that!" + done + +HikerErikAfterBattleText: + text "I'll head back to" + line "BLACKTHORN's ICE" + + para "PATH and train" + line "some more." + done + +HikerMichaelSeenText: + text "Yo! You're spunky!" + line "But you know what?" + + para "When it comes to" + line "sheer spunkiness," + cont "I'm the man!" + done + +HikerMichaelBeatenText: + text "My #MON weren't" + line "spunky enough!" + done + +HikerMichaelAfterBattleText: + text "Boy, do I love" + line "HP UP! Mmmm, yum!" + + para "I keep drinking my" + line "#MON's!" + + para "I can't help it!" + done + +HikerParry3SeenText: + text "My #MON are" + line "power packed!" + done + +HikerParry3BeatenText: + text "Wahahah! I'm the" + line "big loser!" + done + +HikerParryAfterBattleText: + text "I'm not much good" + line "at thinking, see?" + + para "So, I just plow" + line "ahead with power!" + done + +HikerTimothySeenText: + text "Why do I climb" + line "mountains?" + + para "Because they're" + line "there." + + para "Why do I train" + line "#MON?" + + para "Because they're" + line "there!" + done + +HikerTimothyBeatenText: + text "Losses…" + line "They're there too!" + done + +HikerTimothyAfterBattleText: + text "The best thing to" + line "ever happen to me" + + para "was discovering" + line "#MON." + done + +HikerParryGivesIronText: + text "I just can't find" + line "a way to win!" + + para "Keep it up!" + + para "Oh, and take this" + line "--it's the gift" + + para "you couldn't take" + line "when we last met." + done + +BlackbeltKenji3SeenText: + text "I was training" + line "here alone." + + para "Behold the fruits" + line "of my labor!" + done + +BlackbeltKenji3BeatenText: + text "Waaaargh!" + done + +BlackbeltKenjiAfterBattleText: + text "This calls for" + line "extreme measures." + + para "I must take to the" + line "hills and train in" + cont "solitude." + done + +BlackbeltKenjiMorningText: + text "I'm going to train" + line "a bit more before" + cont "I break for lunch." + done + +BlackbeltKenjiNightText: + text "We had plenty of" + line "rest at lunch, so" + + para "now we're all" + line "ready to go again!" + + para "We're going to" + line "train again!" + done + +CooltrainermRyanSeenText: + text "What are your" + line "thoughts on rais-" + cont "ing #MON?" + done + +CooltrainermRyanBeatenText: + text "You've won my" + line "respect." + done + +CooltrainermRyanAfterBattleText: + text "I see you're rais-" + line "ing your #MON" + cont "with care." + + para "The bond you build" + line "will save you in" + cont "tough situations." + done + +CooltrainerfKellySeenText: + text "What is your" + line "battle strategy?" + + para "It is foolish to" + line "use strong moves" + cont "indiscriminately." + done + +CooltrainerfKellyBeatenText: + text "Fine. I lost." + done + +CooltrainerfKellyAfterBattleText: + text "I'm not in favor" + line "of overly power-" + cont "ful moves." + + para "I want to win, but" + line "I also don't want" + cont "to harm #MON." + done + +Route45DummyText: + text "I'm really, really" + line "tough!" + + para "Is there anywhere" + line "I can prove how" + cont "tough I really am?" + done + +CamperQuentinSeenText: + text "I'm really, really" + line "tough!" + done + +CamperQuentinBeatenText: + text "I was tough at the" + line "BATTLE TOWER…" + done + +CamperQuentinAfterBattleText: + text "Have you been to" + line "the BATTLE TOWER?" + + para "I never, ever lose" + line "there, but…" + done + +Route45SignText: + text "ROUTE 45" + line "MOUNTAIN RD. AHEAD" + done + +Route45_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 5, DARK_CAVE_BLACKTHORN_ENTRANCE, 1 + + def_coord_events + + def_bg_events + bg_event 10, 4, BGEVENT_READ, Route45Sign + bg_event 13, 80, BGEVENT_ITEM, Route45HiddenPpUp + + def_object_events + object_event 10, 16, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerHikerErik, -1 + object_event 15, 65, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerHikerMichael, -1 + object_event 5, 28, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerHikerParry, -1 + object_event 9, 65, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerHikerTimothy, -1 + object_event 11, 50, SPRITE_BLACK_BELT, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerBlackbeltKenji, -1 + object_event 17, 18, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerCooltrainermRyan, -1 + object_event 5, 36, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfKelly, -1 + object_event 16, 82, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route45FruitTree, -1 + object_event 6, 51, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route45Nugget, EVENT_ROUTE_45_NUGGET + object_event 5, 66, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route45Revive, EVENT_ROUTE_45_REVIVE + object_event 6, 20, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route45Elixer, EVENT_ROUTE_45_ELIXER + object_event 7, 33, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route45MaxPotion, EVENT_ROUTE_45_MAX_POTION + object_event 4, 70, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, TrainerCamperQuentin, -1 diff --git a/maps/Route45.blk b/maps/Route45.blk new file mode 100644 index 0000000..30d8b83 --- /dev/null +++ b/maps/Route45.blk @@ -0,0 +1,4 @@ +qi + +hqqqqk +hqqosmElnqihqqkjkVVVlnqihihqihiVjkVhomhihihihiVhihilmhiVhiMlmhiVVQhijkVjpqihihqqiVVjomVhqjilmhjqiLhhqqkPVVjqhqqihqhqqijkhqlrqiVhilnqqqihihqqomhiVVhqqihiVVhqqilmhqqiLlnqiPVVVhqiVjklnihihihiVjpkVhihiVhqihiWlmhomhiOhihiWWSlmWWhihijkWjpqqkjqihqqrmhomlrnRWhihhiTUhhiXYhpkhihqilmWjppqqihqqqqqppppqqqq \ No newline at end of file diff --git a/maps/Route46.asm b/maps/Route46.asm new file mode 100644 index 0000000..4418595 --- /dev/null +++ b/maps/Route46.asm @@ -0,0 +1,270 @@ + object_const_def + const ROUTE46_POKEFAN_M + const ROUTE46_YOUNGSTER + const ROUTE46_LASS + const ROUTE46_FRUIT_TREE1 + const ROUTE46_FRUIT_TREE2 + const ROUTE46_POKE_BALL + +Route46_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerCamperTed: + trainer CAMPER, TED, EVENT_BEAT_CAMPER_TED, CamperTedSeenText, CamperTedBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CamperTedAfterBattleText + waitbutton + closetext + end + +TrainerPicnickerErin1: + trainer PICNICKER, ERIN1, EVENT_BEAT_PICNICKER_ERIN, PicnickerErin1SeenText, PicnickerErin1BeatenText, 0, .Script + +.Script: + loadvar VAR_CALLERID, PHONE_PICNICKER_ERIN + endifjustbattled + opentext + checkflag ENGINE_ERIN_READY_FOR_REMATCH + iftrue .WantsBattle + checkcellnum PHONE_PICNICKER_ERIN + iftrue Route46NumberAcceptedF + checkevent EVENT_ERIN_ASKED_FOR_PHONE_NUMBER + iftrue .AskedAlready + writetext PicnickerErinAfterBattleText + promptbutton + setevent EVENT_ERIN_ASKED_FOR_PHONE_NUMBER + scall Route46AskNumber1F + sjump .AskForNumber + +.AskedAlready: + scall Route46AskNumber2F +.AskForNumber: + askforphonenumber PHONE_PICNICKER_ERIN + ifequal PHONE_CONTACTS_FULL, Route46PhoneFullF + ifequal PHONE_CONTACT_REFUSED, Route46NumberDeclinedF + gettrainername STRING_BUFFER_3, PICNICKER, ERIN1 + scall Route46RegisteredNumberF + sjump Route46NumberAcceptedF + +.WantsBattle: + scall Route46RematchF + winlosstext PicnickerErin1BeatenText, 0 + readmem wErinFightCount + ifequal 2, .Fight2 + ifequal 1, .Fight1 + ifequal 0, .LoadFight0 +.Fight2: + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .LoadFight2 +.Fight1: + checkevent EVENT_BEAT_ELITE_FOUR + iftrue .LoadFight1 +.LoadFight0: + loadtrainer PICNICKER, ERIN1 + startbattle + reloadmapafterbattle + loadmem wErinFightCount, 1 + clearflag ENGINE_ERIN_READY_FOR_REMATCH + end + +.LoadFight1: + loadtrainer PICNICKER, ERIN2 + startbattle + reloadmapafterbattle + loadmem wErinFightCount, 2 + clearflag ENGINE_ERIN_READY_FOR_REMATCH + end + +.LoadFight2: + loadtrainer PICNICKER, ERIN3 + startbattle + reloadmapafterbattle + clearflag ENGINE_ERIN_READY_FOR_REMATCH + checkevent EVENT_ERIN_CALCIUM + iftrue .HasCalcium + checkevent EVENT_GOT_CALCIUM_FROM_ERIN + iftrue .GotCalciumAlready + scall Route46RematchGiftF + verbosegiveitem CALCIUM + iffalse ErinNoRoomForCalcium + setevent EVENT_GOT_CALCIUM_FROM_ERIN + sjump Route46NumberAcceptedF + +.GotCalciumAlready: + end + +.HasCalcium: + opentext + writetext PicnickerErin2BeatenText + waitbutton + verbosegiveitem CALCIUM + iffalse ErinNoRoomForCalcium + clearevent EVENT_ERIN_CALCIUM + setevent EVENT_GOT_CALCIUM_FROM_ERIN + sjump Route46NumberAcceptedF + +Route46AskNumber1F: + jumpstd AskNumber1FScript + end + +Route46AskNumber2F: + jumpstd AskNumber2FScript + end + +Route46RegisteredNumberF: + jumpstd RegisteredNumberFScript + end + +Route46NumberAcceptedF: + jumpstd NumberAcceptedFScript + end + +Route46NumberDeclinedF: + jumpstd NumberDeclinedFScript + end + +Route46PhoneFullF: + jumpstd PhoneFullFScript + end + +Route46RematchF: + jumpstd RematchFScript + end + +ErinNoRoomForCalcium: + setevent EVENT_ERIN_CALCIUM + jumpstd PackFullFScript + end + +Route46RematchGiftF: + jumpstd RematchGiftFScript + end + +TrainerHikerBailey: + trainer HIKER, BAILEY, EVENT_BEAT_HIKER_BAILEY, HikerBaileySeenText, HikerBaileyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerBaileyAfterBattleText + waitbutton + closetext + end + +Route46Sign: + jumptext Route46SignText + +Route46XSpeed: + itemball X_SPEED + +Route46FruitTree1: + fruittree FRUITTREE_ROUTE_46_1 + +Route46FruitTree2: + fruittree FRUITTREE_ROUTE_46_2 + +HikerBaileySeenText: + text "Awright! I'll show" + line "you the power of" + cont "mountain #MON!" + done + +HikerBaileyBeatenText: + text "Mercy! You showed" + line "me your power!" + done + +HikerBaileyAfterBattleText: + text "It's over. I don't" + line "mind. We HIKERS" + cont "are like that." + done + +CamperTedSeenText: + text "I'm raising #-" + line "MON too!" + + para "Will you battle" + line "with me?" + done + +CamperTedBeatenText: + text "Wha…?" + done + +CamperTedAfterBattleText: + text "I did my best but" + line "came up short." + + para "No excuses--I" + line "admit I lost." + done + +PicnickerErin1SeenText: + text "I raise #MON" + line "too!" + + para "Will you battle" + line "with me?" + done + +PicnickerErin1BeatenText: + text "Oh, rats!" + done + +PicnickerErinAfterBattleText: + text "I've been to many" + line "GYMS, but the GYM" + + para "in GOLDENROD is my" + line "favorite." + + para "It's filled with" + line "pretty flowers!" + done + +PicnickerErin2BeatenText: + text "Aww… I keep losing" + line "all the time!" + + para "I'll just have to" + line "try harder!" + + para "Anyway, thanks for" + line "battling me again" + + para "and again. Here's" + line "that present from" + cont "the other time." + done + +Route46SignText: + text "ROUTE 46" + line "MOUNTAIN RD. AHEAD" + done + +Route46_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 33, ROUTE_29_ROUTE_46_GATE, 1 + warp_event 8, 33, ROUTE_29_ROUTE_46_GATE, 2 + warp_event 14, 5, DARK_CAVE_VIOLET_ENTRANCE, 3 + + def_coord_events + + def_bg_events + bg_event 9, 27, BGEVENT_READ, Route46Sign + + def_object_events + object_event 12, 19, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerHikerBailey, -1 + object_event 4, 14, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerCamperTed, -1 + object_event 2, 13, SPRITE_LASS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 2, TrainerPicnickerErin1, -1 + object_event 7, 5, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route46FruitTree1, -1 + object_event 8, 6, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route46FruitTree2, -1 + object_event 1, 15, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, Route46XSpeed, EVENT_ROUTE_46_X_SPEED diff --git a/maps/Route46.blk b/maps/Route46.blk new file mode 100644 index 0000000..ff78a31 --- /dev/null +++ b/maps/Route46.blk @@ -0,0 +1 @@ +qqlrrrrmqqqqorrnqqornqilrsmhqilrnppklrrmWWjpNhqjkWjpqqjqilnqqWlrmhjpNhhqRWWWhhqhlrGlrr   \ No newline at end of file diff --git a/maps/Route5.asm b/maps/Route5.asm new file mode 100644 index 0000000..ae2912b --- /dev/null +++ b/maps/Route5.asm @@ -0,0 +1,56 @@ + object_const_def + const ROUTE5_POKEFAN_M + +Route5_MapScripts: + def_scene_scripts + + def_callbacks + +Route5PokefanMScript: + jumptextfaceplayer Route5PokefanMText + +Route5UndergroundPathSign: + jumptext Route5UndergroundPathSignText + +HouseForSaleSign: + jumptext HouseForSaleSignText + +Route5PokefanMText: + text "The road is closed" + line "until the problem" + + para "at the POWER PLANT" + line "is solved." + done + +Route5UndergroundPathSignText: + text "UNDERGROUND PATH" + + para "CERULEAN CITY -" + line "VERMILION CITY" + done + +HouseForSaleSignText: + text "What's this?" + + para "House for Sale…" + line "Nobody lives here." + done + +Route5_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 17, 15, ROUTE_5_UNDERGROUND_PATH_ENTRANCE, 1 + warp_event 8, 17, ROUTE_5_SAFFRON_GATE, 1 + warp_event 9, 17, ROUTE_5_SAFFRON_GATE, 2 + warp_event 10, 11, ROUTE_5_CLEANSE_TAG_HOUSE, 1 + + def_coord_events + + def_bg_events + bg_event 17, 17, BGEVENT_READ, Route5UndergroundPathSign + bg_event 10, 11, BGEVENT_READ, HouseForSaleSign + + def_object_events + object_event 17, 16, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route5PokefanMScript, EVENT_ROUTE_5_6_POKEFAN_M_BLOCKS_UNDERGROUND_PATH diff --git a/maps/Route5.blk b/maps/Route5.blk new file mode 100644 index 0000000..b6b8af8 --- /dev/null +++ b/maps/Route5.blk @@ -0,0 +1 @@ +m'nN'Mm'n N'Mm'nN'Mm'n N'Mm^n89N^Mm1n11N1Mm1nN !m1111111|~RROPRR \ No newline at end of file diff --git a/maps/Route5CleanseTagHouse.asm b/maps/Route5CleanseTagHouse.asm new file mode 100644 index 0000000..69eecff --- /dev/null +++ b/maps/Route5CleanseTagHouse.asm @@ -0,0 +1,76 @@ + object_const_def + const ROUTE5CLEANSETAGHOUSE_GRANNY + const ROUTE5CLEANSETAGHOUSE_TEACHER + +Route5CleanseTagHouse_MapScripts: + def_scene_scripts + + def_callbacks + +Route5CleanseTagHouseGrannyScript: + faceplayer + opentext + checkevent EVENT_GOT_CLEANSE_TAG + iftrue .GotCleanseTag + writetext Route5CleanseTagHouseGrannyText1 + promptbutton + verbosegiveitem CLEANSE_TAG + iffalse .NoRoom + setevent EVENT_GOT_CLEANSE_TAG +.GotCleanseTag: + writetext Route5CleanseTagHouseGrannyText2 + waitbutton +.NoRoom: + closetext + end + +Route5CleanseTagHouseTeacherScript: + jumptextfaceplayer Route5CleanseTagHouseTeacherText + +HouseForSaleBookshelf: + jumpstd DifficultBookshelfScript + +Route5CleanseTagHouseGrannyText1: + text "Eeyaaaah!" + + para "I sense a sinister" + line "shadow hovering" + cont "over you." + + para "Take this to ward" + line "it off!" + done + +Route5CleanseTagHouseGrannyText2: + text "You were in mortal" + line "danger, but you" + cont "are protected now." + done + +Route5CleanseTagHouseTeacherText: + text "My grandma is into" + line "warding off what" + + para "she believes to be" + line "evil spirits." + + para "I'm sorry that she" + line "startled you." + done + +Route5CleanseTagHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, ROUTE_5, 4 + warp_event 3, 7, ROUTE_5, 4 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, HouseForSaleBookshelf + bg_event 1, 1, BGEVENT_READ, HouseForSaleBookshelf + + def_object_events + object_event 2, 5, SPRITE_GRANNY, SPRITEMOVEDATA_SPINCLOCKWISE, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, Route5CleanseTagHouseGrannyScript, -1 + object_event 5, 3, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Route5CleanseTagHouseTeacherScript, -1 diff --git a/maps/Route5SaffronGate.asm b/maps/Route5SaffronGate.asm new file mode 100644 index 0000000..485717a --- /dev/null +++ b/maps/Route5SaffronGate.asm @@ -0,0 +1,35 @@ + object_const_def + const ROUTE5SAFFRONGATE_OFFICER + +Route5SaffronGate_MapScripts: + def_scene_scripts + + def_callbacks + +Route5SaffronGateOfficerScript: + jumptextfaceplayer Route5SaffronGateOfficerText + +Route5SaffronGateOfficerText: + text "You're from JOHTO," + line "aren't you?" + + para "How do you like" + line "KANTO? It's nice," + cont "don't you agree?" + done + +Route5SaffronGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 0, ROUTE_5, 2 + warp_event 5, 0, ROUTE_5, 3 + warp_event 4, 7, SAFFRON_CITY, 9 + warp_event 5, 7, SAFFRON_CITY, 9 + + def_coord_events + + def_bg_events + + def_object_events + object_event 0, 4, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route5SaffronGateOfficerScript, -1 diff --git a/maps/Route5UndergroundPathEntrance.asm b/maps/Route5UndergroundPathEntrance.asm new file mode 100644 index 0000000..ec1b391 --- /dev/null +++ b/maps/Route5UndergroundPathEntrance.asm @@ -0,0 +1,33 @@ + object_const_def + const ROUTE5UNDERGROUNDPATHENTRANCE_TEACHER + +Route5UndergroundPathEntrance_MapScripts: + def_scene_scripts + + def_callbacks + +Route5UndergroundPathEntranceTeacherScript: + jumptextfaceplayer Route5UndergroundPathEntranceTeacherText + +Route5UndergroundPathEntranceTeacherText: + text "Many cities in" + line "JOHTO have long" + + para "histories. I'd" + line "love to visit!" + done + +Route5UndergroundPathEntrance_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, ROUTE_5, 1 + warp_event 4, 7, ROUTE_5, 1 + warp_event 4, 3, UNDERGROUND_PATH, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 2, SPRITE_TEACHER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route5UndergroundPathEntranceTeacherScript, -1 diff --git a/maps/Route6.asm b/maps/Route6.asm new file mode 100644 index 0000000..bc694e5 --- /dev/null +++ b/maps/Route6.asm @@ -0,0 +1,107 @@ + object_const_def + const ROUTE6_POKEFAN_M1 + const ROUTE6_POKEFAN_M2 + const ROUTE6_POKEFAN_M3 + +Route6_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerPokefanmRex: + trainer POKEFANM, REX, EVENT_BEAT_POKEFANM_REX, PokefanmRexSeenText, PokefanmRexBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanmRexAfterBattleText + waitbutton + closetext + end + +TrainerPokefanmAllan: + trainer POKEFANM, ALLAN, EVENT_BEAT_POKEFANM_ALLAN, PokefanmAllanSeenText, PokefanmAllanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokefanmAllanAfterBattleText + waitbutton + closetext + end + +Route6PokefanMScript: + jumptextfaceplayer Route6PokefanMText + +Route6UndergroundPathSign: + jumptext Route6UndergroundPathSignText + +Route6PokefanMText: + text "The road is closed" + line "until the problem" + + para "at the POWER PLANT" + line "is solved." + done + +Route6UndergroundPathSignText: + text "UNDERGROUND PATH" + + para "CERULEAN CITY -" + line "VERMILION CITY" + done + +PokefanmRexSeenText: + text "My PHANPY is the" + line "cutest in the" + cont "world." + done + +PokefanmRexBeatenText: + text "My PHANPY!" + done + +PokefanmRexAfterBattleText: + text "Look how adorable" + line "my PHANPY acts!" + + para "Isn't it cute" + line "enough to make" + cont "your heart melt?" + done + +PokefanmAllanSeenText: + text "My TEDDIURSA is" + line "the cutest in the" + cont "world." + done + +PokefanmAllanBeatenText: + text "My TEDDIURSA!" + done + +PokefanmAllanAfterBattleText: + text "Look how adorable" + line "my TEDDIURSA acts!" + + para "Isn't it cute" + line "enough to make" + cont "your heart melt?" + done + +Route6_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 17, 3, ROUTE_6_UNDERGROUND_PATH_ENTRANCE, 1 + warp_event 6, 1, ROUTE_6_SAFFRON_GATE, 3 + + def_coord_events + + def_bg_events + bg_event 19, 5, BGEVENT_READ, Route6UndergroundPathSign + + def_object_events + object_event 17, 4, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 2, Route6PokefanMScript, EVENT_ROUTE_5_6_POKEFAN_M_BLOCKS_UNDERGROUND_PATH + object_event 9, 12, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, TrainerPokefanmRex, -1 + object_event 10, 12, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, TrainerPokefanmAllan, -1 diff --git a/maps/Route6.blk b/maps/Route6.blk new file mode 100644 index 0000000..60b9a41 --- /dev/null +++ b/maps/Route6.blk @@ -0,0 +1 @@ +/7:~/ !/|~111111111 1 1111111  1 ed 111111 ed 1 QQc1bQQQQQ \ No newline at end of file diff --git a/maps/Route6SaffronGate.asm b/maps/Route6SaffronGate.asm new file mode 100644 index 0000000..aad5b6f --- /dev/null +++ b/maps/Route6SaffronGate.asm @@ -0,0 +1,72 @@ + object_const_def + const ROUTE6SAFFRONGATE_OFFICER + +Route6SaffronGate_MapScripts: + def_scene_scripts + scene_script Route6SaffronGateNoopScene ; unusable + + def_callbacks + +Route6SaffronGateNoopScene: + end + +Route6SaffronGuardScript: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedPart + writetext Route6SaffronGuardWelcomeText + waitbutton + closetext + end + +.ReturnedPart: + writetext Route6SaffronGuardMagnetTrainText + waitbutton + closetext + end + +Route6SaffronGuardWelcomeText: + text "Welcome to SAFFRON" + line "CITY, home of the" + cont "MAGNET TRAIN!" + + para "…That's what I'd" + line "normally say, but" + + para "the MAGNET TRAIN" + line "isn't running now." + + para "It's not getting" + line "any electricity" + + para "because there's" + line "something wrong" + + para "with the POWER" + line "PLANT." + done + +Route6SaffronGuardMagnetTrainText: + text "The MAGNET TRAIN" + line "is the most famous" + + para "thing about SAF-" + line "FRON." + done + +Route6SaffronGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 0, SAFFRON_CITY, 12 + warp_event 5, 0, SAFFRON_CITY, 13 + warp_event 4, 7, ROUTE_6, 2 + warp_event 5, 7, ROUTE_6, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 0, 4, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route6SaffronGuardScript, -1 diff --git a/maps/Route6UndergroundPathEntrance.asm b/maps/Route6UndergroundPathEntrance.asm new file mode 100644 index 0000000..52ef605 --- /dev/null +++ b/maps/Route6UndergroundPathEntrance.asm @@ -0,0 +1,18 @@ +Route6UndergroundPathEntrance_MapScripts: + def_scene_scripts + + def_callbacks + +Route6UndergroundPathEntrance_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, ROUTE_6, 1 + warp_event 4, 7, ROUTE_6, 1 + warp_event 4, 3, UNDERGROUND_PATH, 2 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/Route7.asm b/maps/Route7.asm new file mode 100644 index 0000000..ff87a54 --- /dev/null +++ b/maps/Route7.asm @@ -0,0 +1,48 @@ +Route7_MapScripts: + def_scene_scripts + + def_callbacks + +Route7UndergroundPathSign: + jumptext Route7UndergroundPathSignText + +Route7LockedDoor: + jumptext Route7LockedDoorText + +Route7UndergroundPathSignText: + text "What's this flyer?" + + para "… Uncouth trainers" + line "have been holding" + + para "battles in the" + line "UNDERGROUND PATH." + + para "Because of rising" + line "complaints by lo-" + cont "cal residents, the" + cont "UNDERGROUND PATH" + cont "has been sealed" + cont "indefinitely." + + para "CELADON POLICE" + done + +Route7LockedDoorText: + text "It's locked…" + done + +Route7_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 15, 6, ROUTE_7_SAFFRON_GATE, 1 + warp_event 15, 7, ROUTE_7_SAFFRON_GATE, 2 + + def_coord_events + + def_bg_events + bg_event 5, 11, BGEVENT_READ, Route7UndergroundPathSign + bg_event 6, 9, BGEVENT_READ, Route7LockedDoor + + def_object_events diff --git a/maps/Route7.blk b/maps/Route7.blk new file mode 100644 index 0000000..d61f4e6 --- /dev/null +++ b/maps/Route7.blk @@ -0,0 +1 @@ +UUUUUY UUUY /[11 !897~f\1 diff --git a/maps/Route7SaffronGate.asm b/maps/Route7SaffronGate.asm new file mode 100644 index 0000000..7aca3e9 --- /dev/null +++ b/maps/Route7SaffronGate.asm @@ -0,0 +1,60 @@ + object_const_def + const ROUTE7SAFFRONGATE_OFFICER + +Route7SaffronGate_MapScripts: + def_scene_scripts + + def_callbacks + +Route7SaffronGuardScript: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedPart + writetext Route7SaffronGuardPowerPlantText + waitbutton + closetext + end + +.ReturnedPart: + writetext Route7SaffronGuardSeriousText + waitbutton + closetext + end + +Route7SaffronGuardPowerPlantText: + text "Did you hear about" + line "the accident at" + cont "the POWER PLANT?" + + para "It's located in" + line "the East, close to" + cont "LAVENDER TOWN." + done + +Route7SaffronGuardSeriousText: + text "I take my GUARD" + line "job seriously." + + para "Hey! You have a" + line "#DEX." + + para "OK. You can go" + line "through." + done + +Route7SaffronGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 4, ROUTE_7, 1 + warp_event 0, 5, ROUTE_7, 2 + warp_event 9, 4, SAFFRON_CITY, 10 + warp_event 9, 5, SAFFRON_CITY, 11 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route7SaffronGuardScript, -1 diff --git a/maps/Route8.asm b/maps/Route8.asm new file mode 100644 index 0000000..9e20e00 --- /dev/null +++ b/maps/Route8.asm @@ -0,0 +1,192 @@ + object_const_def + const ROUTE8_BIKER1 + const ROUTE8_BIKER2 + const ROUTE8_BIKER3 + const ROUTE8_SUPER_NERD1 + const ROUTE8_SUPER_NERD2 + const ROUTE8_FRUIT_TREE + +Route8_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerBikerDwayne: + trainer BIKER, DWAYNE, EVENT_BEAT_BIKER_DWAYNE, BikerDwayneSeenText, BikerDwayneBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BikerDwayneAfterBattleText + waitbutton + closetext + end + +TrainerBikerHarris: + trainer BIKER, HARRIS, EVENT_BEAT_BIKER_HARRIS, BikerHarrisSeenText, BikerHarrisBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BikerHarrisAfterBattleText + waitbutton + closetext + end + +TrainerBikerZeke: + trainer BIKER, ZEKE, EVENT_BEAT_BIKER_ZEKE, BikerZekeSeenText, BikerZekeBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BikerZekeAfterBattleText + waitbutton + closetext + end + +TrainerSupernerdSam: + trainer SUPER_NERD, SAM, EVENT_BEAT_SUPER_NERD_SAM, SupernerdSamSeenText, SupernerdSamBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SupernerdSamAfterBattleText + waitbutton + closetext + end + +TrainerSupernerdTom: + trainer SUPER_NERD, TOM, EVENT_BEAT_SUPER_NERD_TOM, SupernerdTomSeenText, SupernerdTomBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SupernerdTomAfterBattleText + waitbutton + closetext + end + +Route8LockedDoor: + jumptext Route8LockedDoorText + +Route8UndergroundPathSign: + jumptext Route8UndergroundPathSignText + +Route8FruitTree: + fruittree FRUITTREE_ROUTE_8 + +BikerDwayneSeenText: + text "We're the KANTO" + line "#MON FEDERATION" + cont "trainer group." + + para "We'll drive you" + line "under our wheels!" + done + +BikerDwayneBeatenText: + text "S-sorry!" + done + +BikerDwayneAfterBattleText: + text "The KANTO #MON" + line "FEDERATION will" + cont "never fall!" + done + +BikerHarrisSeenText: + text "The cops shut down" + line "our UNDERGROUND" + + para "PATH! That really" + line "fries me!" + done + +BikerHarrisBeatenText: + text "F-forgive me!" + done + +BikerHarrisAfterBattleText: + text "Wiped out by some" + line "punk from JOHTO…" + done + +BikerZekeSeenText: + text "We're the KANTO" + line "#MON FEDERA-" + cont "TION!" + cont "Right on!" + done + +BikerZekeBeatenText: + text "Yikes! Sorry!" + done + +BikerZekeAfterBattleText: + text "We'll try not to" + line "disturb anyone" + cont "from now on…" + done + +SupernerdSamSeenText: + text "How does the MAG-" + line "NET TRAIN work?" + done + +SupernerdSamBeatenText: + text "I just want to see" + line "the MAGNET TRAIN…" + done + +SupernerdSamAfterBattleText: + text "The power of mag-" + line "nets is awesome!" + done + +SupernerdTomSeenText: + text "Hm… You've got" + line "many GYM BADGES." + done + +SupernerdTomBeatenText: + text "Just as I thought…" + line "You're tough!" + done + +SupernerdTomAfterBattleText: + text "GYM BADGES give" + line "you advantages in" + cont "battles." + done + +Route8LockedDoorText: + text "It's locked…" + done + +Route8UndergroundPathSignText: + text "The flyer's torn." + + para "It's impossible to" + line "read…" + done + +Route8_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 4, ROUTE_8_SAFFRON_GATE, 3 + warp_event 4, 5, ROUTE_8_SAFFRON_GATE, 4 + + def_coord_events + + def_bg_events + bg_event 11, 7, BGEVENT_READ, Route8UndergroundPathSign + bg_event 10, 5, BGEVENT_READ, Route8LockedDoor + + def_object_events + object_event 10, 8, SPRITE_BIKER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 5, TrainerBikerDwayne, -1 + object_event 10, 9, SPRITE_BIKER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 5, TrainerBikerHarris, -1 + object_event 10, 10, SPRITE_BIKER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerBikerZeke, -1 + object_event 23, 2, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerSupernerdSam, -1 + object_event 31, 12, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 4, TrainerSupernerdTom, -1 + object_event 33, 5, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Route8FruitTree, -1 diff --git a/maps/Route8.blk b/maps/Route8.blk new file mode 100644 index 0000000..882d7e6 --- /dev/null +++ b/maps/Route8.blk @@ -0,0 +1,24 @@ +(+WWWWWWWWWWWWW%(+ !$% 11N + + + + + +()7~f11NI####H +t()QcN' +RR +'tt$% + +] +MN'M N' +ww + +' +Maa +'M 5' +]>; + +'tttt +'5 N' + +'()>;D#####EMttND##E()(,???????????????,, \ No newline at end of file diff --git a/maps/Route8SaffronGate.asm b/maps/Route8SaffronGate.asm new file mode 100644 index 0000000..49df57d --- /dev/null +++ b/maps/Route8SaffronGate.asm @@ -0,0 +1,34 @@ + object_const_def + const ROUTE8SAFFRONGATE_OFFICER + +Route8SaffronGate_MapScripts: + def_scene_scripts + + def_callbacks + +Route8SaffronGateOfficerScript: + jumptextfaceplayer Route8SaffronGateOfficerText + +Route8SaffronGateOfficerText: + text "Have you been to" + line "LAVENDER TOWN?" + + para "There's a tall" + line "RADIO TOWER there." + done + +Route8SaffronGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 4, SAFFRON_CITY, 14 + warp_event 0, 5, SAFFRON_CITY, 15 + warp_event 9, 4, ROUTE_8, 1 + warp_event 9, 5, ROUTE_8, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 2, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Route8SaffronGateOfficerScript, -1 diff --git a/maps/Route9.asm b/maps/Route9.asm new file mode 100644 index 0000000..e14f059 --- /dev/null +++ b/maps/Route9.asm @@ -0,0 +1,224 @@ + object_const_def + const ROUTE9_YOUNGSTER1 + const ROUTE9_LASS1 + const ROUTE9_YOUNGSTER2 + const ROUTE9_LASS2 + const ROUTE9_POKEFAN_M1 + const ROUTE9_POKEFAN_M2 + +Route9_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerCamperDean: + trainer CAMPER, DEAN, EVENT_BEAT_CAMPER_DEAN, CamperDeanSeenText, CamperDeanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CamperDeanAfterBattleText + waitbutton + closetext + end + +TrainerPicnickerHeidi: + trainer PICNICKER, HEIDI, EVENT_BEAT_PICNICKER_HEIDI, PicnickerHeidiSeenText, PicnickerHeidiBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PicnickerHeidiAfterBattleText + waitbutton + closetext + end + +TrainerCamperSid: + trainer CAMPER, SID, EVENT_BEAT_CAMPER_SID, CamperSidSeenText, CamperSidBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CamperSidAfterBattleText + waitbutton + closetext + end + +TrainerPicnickerEdna: + trainer PICNICKER, EDNA, EVENT_BEAT_PICNICKER_EDNA, PicnickerEdnaSeenText, PicnickerEdnaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PicnickerEdnaAfterBattleText + waitbutton + closetext + end + +TrainerHikerTim: + trainer HIKER, TIM, EVENT_BEAT_HIKER_TIM, HikerTimSeenText, HikerTimBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerTimAfterBattleText + waitbutton + closetext + end + +TrainerHikerSidney: + trainer HIKER, SIDNEY, EVENT_BEAT_HIKER_SIDNEY, HikerSidneySeenText, HikerSidneyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerSidneyAfterBattleText + waitbutton + closetext + end + +Route9Sign: + jumptext Route9SignText + +Route9HiddenEther: + hiddenitem ETHER, EVENT_ROUTE_9_HIDDEN_ETHER + +CamperDeanSeenText: + text "I came to explore" + line "ROCK TUNNEL." + done + +CamperDeanBeatenText: + text "Whoa! Danger, man." + done + +CamperDeanAfterBattleText: + text "My #MON were" + line "hurt before even" + + para "entering ROCK" + line "TUNNEL." + + para "I'd better take" + line "them to a #MON" + cont "CENTER right away." + done + +PicnickerHeidiSeenText: + text "Have you ever been" + line "to a picnic?" + + para "They're so much" + line "fun!" + done + +PicnickerHeidiBeatenText: + text "Ohhhh!" + done + +PicnickerHeidiAfterBattleText: + text "We bake lots of" + line "goodies and share" + + para "them all around." + line "They're delicious!" + done + +CamperSidSeenText: + text "Hey, you!" + line "Don't litter!" + done + +CamperSidBeatenText: + text "I was just point-" + line "ing out…" + done + +CamperSidAfterBattleText: + text "Sorry. You weren't" + line "littering. It was" + cont "my mistake." + done + +PicnickerEdnaSeenText: + text "People shouldn't" + line "leave any litter" + cont "behind." + done + +PicnickerEdnaBeatenText: + text "Ohh… I lost…" + done + +PicnickerEdnaAfterBattleText: + text "Conserving energy" + line "is important, but" + + para "the environment is" + line "even more vital." + done + +HikerTimSeenText: + text "She'll be coming" + line "'round MT.SILVER" + cont "when she comes…" + + para "MT.SILVER is in" + line "JOHTO, right?" + done + +HikerTimBeatenText: + text "I was too busy" + line "singing…" + done + +HikerTimAfterBattleText: + text "Battles are about" + line "concentration." + done + +HikerSidneySeenText: + text "I'll tell you a" + line "secret." + + para "But first, we" + line "battle!" + done + +HikerSidneyBeatenText: + text "Oh, dang!" + line "I lost that…" + done + +HikerSidneyAfterBattleText: + text "The POWER PLANT is" + line "across a small" + cont "river." + done + +Route9SignText: + text "ROUTE 9" + + para "CERULEAN CITY -" + line "ROCK TUNNEL" + done + +Route9_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 48, 15, ROCK_TUNNEL_1F, 1 + + def_coord_events + + def_bg_events + bg_event 15, 7, BGEVENT_READ, Route9Sign + bg_event 41, 15, BGEVENT_ITEM, Route9HiddenEther + + def_object_events + object_event 23, 11, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerCamperDean, -1 + object_event 39, 8, SPRITE_LASS, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 3, TrainerPicnickerHeidi, -1 + object_event 11, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 5, TrainerCamperSid, -1 + object_event 12, 15, SPRITE_LASS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_TRAINER, 1, TrainerPicnickerEdna, -1 + object_event 28, 3, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerHikerTim, -1 + object_event 36, 15, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 4, TrainerHikerSidney, -1 diff --git a/maps/Route9.blk b/maps/Route9.blk new file mode 100644 index 0000000..e7e7b94 --- /dev/null +++ b/maps/Route9.blk @@ -0,0 +1,27 @@ +t$WWWWWW*+WW*+WWWWW*+WWWWWWWW*RRO + + +() () + +111()CCCCCCCC(RAM oo/$%o/$%/>;()aaaaaae(tNM>;1>;11111$%1$% + Me(tN511()\$%>;1>;1111 +/Oe(tQ>;$%11111$%\()>;>; + + + +Me(tt()\>;\$%$%(,?; + +Me(tt()1111() + + + + + + + + + + +(+Wp + +Me(tt(,????,,???????????+%w1 !Me( \ No newline at end of file diff --git a/maps/RuinsOfAlphAerodactylChamber.asm b/maps/RuinsOfAlphAerodactylChamber.asm new file mode 100644 index 0000000..d52ef80 --- /dev/null +++ b/maps/RuinsOfAlphAerodactylChamber.asm @@ -0,0 +1,163 @@ +RuinsOfAlphAerodactylChamber_MapScripts: + def_scene_scripts + scene_script RuinsOfAlphAerodactylChamberCheckWallScene, SCENE_RUINSOFALPHAERODACTYLCHAMBER_CHECK_WALL + scene_script RuinsOfAlphAerodactylChamberNoopScene, SCENE_RUINSOFALPHAERODACTYLCHAMBER_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, RuinsOfAlphAerodactylChamberHiddenDoorsCallback + +RuinsOfAlphAerodactylChamberCheckWallScene: + checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER + iftrue .OpenWall + end + +.OpenWall: + sdefer RuinsOfAlphAerodactylChamberWallOpenScript + end + +RuinsOfAlphAerodactylChamberNoopScene: + end + +RuinsOfAlphAerodactylChamberHiddenDoorsCallback: + checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER + iftrue .WallOpen + changeblock 4, 0, $2e ; closed wall +.WallOpen: + checkevent EVENT_SOLVED_AERODACTYL_PUZZLE + iffalse .FloorClosed + endcallback + +.FloorClosed: + changeblock 2, 2, $01 ; left floor + changeblock 4, 2, $02 ; right floor + endcallback + +RuinsOfAlphAerodactylChamberWallOpenScript: + pause 30 + earthquake 30 + showemote EMOTE_SHOCK, PLAYER, 20 + pause 30 + playsound SFX_STRENGTH + changeblock 4, 0, $30 ; open wall + reloadmappart + earthquake 50 + setscene SCENE_RUINSOFALPHAERODACTYLCHAMBER_NOOP + closetext + end + +RuinsOfAlphAerodactylChamberPuzzle: + refreshscreen + setval UNOWNPUZZLE_AERODACTYL + special UnownPuzzle + closetext + iftrue .PuzzleComplete + end + +.PuzzleComplete: + setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS + setevent EVENT_SOLVED_AERODACTYL_PUZZLE + setflag ENGINE_UNLOCKED_UNOWNS_S_TO_W + setmapscene RUINS_OF_ALPH_INNER_CHAMBER, SCENE_RUINSOFALPHINNERCHAMBER_STRANGE_PRESENCE + earthquake 30 + showemote EMOTE_SHOCK, PLAYER, 15 + changeblock 2, 2, $18 ; left hole + changeblock 4, 2, $19 ; right hole + reloadmappart + playsound SFX_STRENGTH + earthquake 80 + applymovement PLAYER, RuinsOfAlphAerodactylChamberSkyfallTopMovement + playsound SFX_KINESIS + waitsfx + pause 20 + warpcheck + end + +RuinsOfAlphAerodactylChamberAncientReplica: + jumptext RuinsOfAlphAerodactylChamberAncientReplicaText + +RuinsOfAlphAerodactylChamberDescriptionSign: + jumptext RuinsOfAlphAerodactylChamberDescriptionText + +RuinsOfAlphAerodactylChamberWallPatternLeft: + opentext + writetext RuinsOfAlphAerodactylChamberWallPatternLeftText + setval UNOWNWORDS_LIGHT + special DisplayUnownWords + closetext + end + +RuinsOfAlphAerodactylChamberWallPatternRight: + checkevent EVENT_WALL_OPENED_IN_AERODACTYL_CHAMBER + iftrue .WallOpen + opentext + writetext RuinsOfAlphAerodactylChamberWallPatternRightText + setval UNOWNWORDS_LIGHT + special DisplayUnownWords + closetext + end + +.WallOpen: + opentext + writetext RuinsOfAlphAerodactylChamberWallHoleText + waitbutton + closetext + end + +RuinsOfAlphAerodactylChamberSkyfallTopMovement: + skyfall_top + step_end + +RuinsOfAlphAerodactylChamberWallPatternLeftText: + text "Patterns appeared" + line "on the walls…" + done + +RuinsOfAlphAerodactylChamberUnownText: ; unreferenced + text "It's UNOWN text!" + done + +RuinsOfAlphAerodactylChamberWallPatternRightText: + text "Patterns appeared" + line "on the walls…" + done + +RuinsOfAlphAerodactylChamberWallHoleText: + text "There's a big hole" + line "in the wall!" + done + +RuinsOfAlphAerodactylChamberAncientReplicaText: + text "It's a replica of" + line "an ancient #-" + cont "MON." + done + +RuinsOfAlphAerodactylChamberDescriptionText: + text "This flying #-" + line "MON attacked its" + + para "prey with saw-like" + line "fangs." + done + +RuinsOfAlphAerodactylChamber_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 9, RUINS_OF_ALPH_OUTSIDE, 4 + warp_event 4, 9, RUINS_OF_ALPH_OUTSIDE, 4 + warp_event 3, 3, RUINS_OF_ALPH_INNER_CHAMBER, 8 + warp_event 4, 3, RUINS_OF_ALPH_INNER_CHAMBER, 9 + warp_event 4, 0, RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM, 1 + + def_coord_events + + def_bg_events + bg_event 2, 3, BGEVENT_READ, RuinsOfAlphAerodactylChamberAncientReplica + bg_event 5, 3, BGEVENT_READ, RuinsOfAlphAerodactylChamberAncientReplica + bg_event 3, 2, BGEVENT_UP, RuinsOfAlphAerodactylChamberPuzzle + bg_event 4, 2, BGEVENT_UP, RuinsOfAlphAerodactylChamberDescriptionSign + bg_event 3, 0, BGEVENT_UP, RuinsOfAlphAerodactylChamberWallPatternLeft + bg_event 4, 0, BGEVENT_UP, RuinsOfAlphAerodactylChamberWallPatternRight + + def_object_events diff --git a/maps/RuinsOfAlphAerodactylItemRoom.asm b/maps/RuinsOfAlphAerodactylItemRoom.asm new file mode 100644 index 0000000..4eaee2b --- /dev/null +++ b/maps/RuinsOfAlphAerodactylItemRoom.asm @@ -0,0 +1,52 @@ + object_const_def + const RUINSOFALPHAERODACTYLITEMROOM_POKE_BALL1 + const RUINSOFALPHAERODACTYLITEMROOM_POKE_BALL2 + const RUINSOFALPHAERODACTYLITEMROOM_POKE_BALL3 + const RUINSOFALPHAERODACTYLITEMROOM_POKE_BALL4 + +RuinsOfAlphAerodactylItemRoom_MapScripts: + def_scene_scripts + + def_callbacks + +RuinsOfAlphAerodactylItemRoomGoldBerry: + itemball GOLD_BERRY + +RuinsOfAlphAerodactylItemRoomMoonStone: + itemball MOON_STONE + +RuinsOfAlphAerodactylItemRoomHealPowder: + itemball HEAL_POWDER + +RuinsOfAlphAerodactylItemRoomEnergyRoot: + itemball ENERGY_ROOT + +RuinsOfAlphAerodactylItemRoomAncientReplica: + jumptext RuinsOfAlphAerodactylItemRoomAncientReplicaText + +RuinsOfAlphAerodactylItemRoomAncientReplicaText: + text "It's a replica of" + line "an ancient #-" + cont "MON." + done + +RuinsOfAlphAerodactylItemRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 9, RUINS_OF_ALPH_AERODACTYL_CHAMBER, 5 + warp_event 4, 9, RUINS_OF_ALPH_AERODACTYL_CHAMBER, 5 + warp_event 3, 1, RUINS_OF_ALPH_AERODACTYL_WORD_ROOM, 1 + warp_event 4, 1, RUINS_OF_ALPH_AERODACTYL_WORD_ROOM, 2 + + def_coord_events + + def_bg_events + bg_event 2, 1, BGEVENT_READ, RuinsOfAlphAerodactylItemRoomAncientReplica + bg_event 5, 1, BGEVENT_READ, RuinsOfAlphAerodactylItemRoomAncientReplica + + def_object_events + object_event 2, 6, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphAerodactylItemRoomGoldBerry, EVENT_PICKED_UP_GOLD_BERRY_FROM_AERODACTYL_ITEM_ROOM + object_event 5, 6, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphAerodactylItemRoomMoonStone, EVENT_PICKED_UP_MOON_STONE_FROM_AERODACTYL_ITEM_ROOM + object_event 2, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphAerodactylItemRoomHealPowder, EVENT_PICKED_UP_HEAL_POWDER_FROM_AERODACTYL_ITEM_ROOM + object_event 5, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphAerodactylItemRoomEnergyRoot, EVENT_PICKED_UP_ENERGY_ROOT_FROM_AERODACTYL_ITEM_ROOM diff --git a/maps/RuinsOfAlphAerodactylWordRoom.asm b/maps/RuinsOfAlphAerodactylWordRoom.asm new file mode 100644 index 0000000..b0ac650 --- /dev/null +++ b/maps/RuinsOfAlphAerodactylWordRoom.asm @@ -0,0 +1,18 @@ +RuinsOfAlphAerodactylWordRoom_MapScripts: + def_scene_scripts + + def_callbacks + +RuinsOfAlphAerodactylWordRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 5, RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM, 3 + warp_event 10, 5, RUINS_OF_ALPH_AERODACTYL_ITEM_ROOM, 4 + warp_event 17, 11, RUINS_OF_ALPH_INNER_CHAMBER, 8 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/RuinsOfAlphAerodactylWordRoom.blk b/maps/RuinsOfAlphAerodactylWordRoom.blk new file mode 100644 index 0000000..fb849e6 --- /dev/null +++ b/maps/RuinsOfAlphAerodactylWordRoom.blk @@ -0,0 +1,2 @@ + + !"#$%    \ No newline at end of file diff --git a/maps/RuinsOfAlphHoOhChamber.asm b/maps/RuinsOfAlphHoOhChamber.asm new file mode 100644 index 0000000..226ff9b --- /dev/null +++ b/maps/RuinsOfAlphHoOhChamber.asm @@ -0,0 +1,164 @@ +RuinsOfAlphHoOhChamber_MapScripts: + def_scene_scripts + scene_script RuinsOfAlphHoOhChamberCheckWallScene, SCENE_RUINSOFALPHHOOHCHAMBER_CHECK_WALL + scene_script RuinsOfAlphHoOhChamberNoopScene, SCENE_RUINSOFALPHHOOHCHAMBER_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, RuinsOfAlphHoOhChamberHiddenDoorsCallback + +RuinsOfAlphHoOhChamberCheckWallScene: + special HoOhChamber + checkevent EVENT_WALL_OPENED_IN_HO_OH_CHAMBER + iftrue .OpenWall + end + +.OpenWall: + sdefer RuinsOfAlphHoOhChamberWallOpenScript + end + +RuinsOfAlphHoOhChamberNoopScene: + end + +RuinsOfAlphHoOhChamberHiddenDoorsCallback: + checkevent EVENT_WALL_OPENED_IN_HO_OH_CHAMBER + iftrue .WallOpen + changeblock 4, 0, $2e ; closed wall +.WallOpen: + checkevent EVENT_SOLVED_HO_OH_PUZZLE + iffalse .FloorClosed + endcallback + +.FloorClosed: + changeblock 2, 2, $01 ; left floor + changeblock 4, 2, $02 ; right floor + endcallback + +RuinsOfAlphHoOhChamberWallOpenScript: + pause 30 + earthquake 30 + showemote EMOTE_SHOCK, PLAYER, 20 + pause 30 + playsound SFX_STRENGTH + changeblock 4, 0, $30 ; open wall + reloadmappart + earthquake 50 + setscene SCENE_RUINSOFALPHHOOHCHAMBER_NOOP + closetext + end + +RuinsOfAlphHoOhChamberPuzzle: + refreshscreen + setval UNOWNPUZZLE_HO_OH + special UnownPuzzle + closetext + iftrue .PuzzleComplete + end + +.PuzzleComplete: + setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS + setevent EVENT_SOLVED_HO_OH_PUZZLE + setflag ENGINE_UNLOCKED_UNOWNS_X_TO_Z + setmapscene RUINS_OF_ALPH_INNER_CHAMBER, SCENE_RUINSOFALPHINNERCHAMBER_STRANGE_PRESENCE + earthquake 30 + showemote EMOTE_SHOCK, PLAYER, 15 + changeblock 2, 2, $18 ; left hole + changeblock 4, 2, $19 ; right hole + reloadmappart + playsound SFX_STRENGTH + earthquake 80 + applymovement PLAYER, RuinsOfAlphHoOhChamberSkyfallTopMovement + playsound SFX_KINESIS + waitsfx + pause 20 + warpcheck + end + +RuinsOfAlphHoOhChamberAncientReplica: + jumptext RuinsOfAlphHoOhChamberAncientReplicaText + +RuinsOfAlphHoOhChamberDescriptionSign: + jumptext RuinsOfAlphHoOhChamberDescriptionText + +RuinsOfAlphHoOhChamberWallPatternLeft: + opentext + writetext RuinsOfAlphHoOhChamberWallPatternLeftText + setval UNOWNWORDS_HO_OH + special DisplayUnownWords + closetext + end + +RuinsOfAlphHoOhChamberWallPatternRight: + checkevent EVENT_WALL_OPENED_IN_HO_OH_CHAMBER + iftrue .WallOpen + opentext + writetext RuinsOfAlphHoOhChamberWallPatternRightText + setval UNOWNWORDS_HO_OH + special DisplayUnownWords + closetext + end + +.WallOpen: + opentext + writetext RuinsOfAlphHoOhChamberWallHoleText + waitbutton + closetext + end + +RuinsOfAlphHoOhChamberSkyfallTopMovement: + skyfall_top + step_end + +RuinsOfAlphHoOhChamberWallPatternLeftText: + text "Patterns appeared" + line "on the walls…" + done + +RuinsOfAlphHoOhChamberUnownText: ; unreferenced + text "It's UNOWN text!" + done + +RuinsOfAlphHoOhChamberWallPatternRightText: + text "Patterns appeared" + line "on the walls…" + done + +RuinsOfAlphHoOhChamberWallHoleText: + text "There's a big hole" + line "in the wall!" + done + +RuinsOfAlphHoOhChamberAncientReplicaText: + text "It's a replica of" + line "an ancient #-" + cont "MON." + done + +RuinsOfAlphHoOhChamberDescriptionText: + text "A #MON that" + line "flew gracefully on" + + para "rainbow-colored" + line "wings." + done + +RuinsOfAlphHoOhChamber_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 9, RUINS_OF_ALPH_OUTSIDE, 1 + warp_event 4, 9, RUINS_OF_ALPH_OUTSIDE, 1 + warp_event 3, 3, RUINS_OF_ALPH_INNER_CHAMBER, 2 + warp_event 4, 3, RUINS_OF_ALPH_INNER_CHAMBER, 3 + warp_event 4, 0, RUINS_OF_ALPH_HO_OH_ITEM_ROOM, 1 + + def_coord_events + + def_bg_events + bg_event 2, 3, BGEVENT_READ, RuinsOfAlphHoOhChamberAncientReplica + bg_event 5, 3, BGEVENT_READ, RuinsOfAlphHoOhChamberAncientReplica + bg_event 3, 2, BGEVENT_UP, RuinsOfAlphHoOhChamberPuzzle + bg_event 4, 2, BGEVENT_UP, RuinsOfAlphHoOhChamberDescriptionSign + bg_event 3, 0, BGEVENT_UP, RuinsOfAlphHoOhChamberWallPatternLeft + bg_event 4, 0, BGEVENT_UP, RuinsOfAlphHoOhChamberWallPatternRight + + def_object_events diff --git a/maps/RuinsOfAlphHoOhItemRoom.asm b/maps/RuinsOfAlphHoOhItemRoom.asm new file mode 100644 index 0000000..d0469d6 --- /dev/null +++ b/maps/RuinsOfAlphHoOhItemRoom.asm @@ -0,0 +1,52 @@ + object_const_def + const RUINSOFALPHHOOHITEMROOM_POKE_BALL1 + const RUINSOFALPHHOOHITEMROOM_POKE_BALL2 + const RUINSOFALPHHOOHITEMROOM_POKE_BALL3 + const RUINSOFALPHHOOHITEMROOM_POKE_BALL4 + +RuinsOfAlphHoOhItemRoom_MapScripts: + def_scene_scripts + + def_callbacks + +RuinsOfAlphHoOhItemRoomGoldBerry: + itemball GOLD_BERRY + +RuinsOfAlphHoOhItemRoomMysteryberry: + itemball MYSTERYBERRY + +RuinsOfAlphHoOhItemRoomRevivalHerb: + itemball REVIVAL_HERB + +RuinsOfAlphHoOhItemRoomCharcoal: + itemball CHARCOAL + +RuinsOfAlphHoOhItemRoomAncientReplica: + jumptext RuinsOfAlphHoOhItemRoomAncientReplicaText + +RuinsOfAlphHoOhItemRoomAncientReplicaText: + text "It's a replica of" + line "an ancient #-" + cont "MON." + done + +RuinsOfAlphHoOhItemRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 9, RUINS_OF_ALPH_HO_OH_CHAMBER, 5 + warp_event 4, 9, RUINS_OF_ALPH_HO_OH_CHAMBER, 5 + warp_event 3, 1, RUINS_OF_ALPH_HO_OH_WORD_ROOM, 1 + warp_event 4, 1, RUINS_OF_ALPH_HO_OH_WORD_ROOM, 2 + + def_coord_events + + def_bg_events + bg_event 2, 1, BGEVENT_READ, RuinsOfAlphHoOhItemRoomAncientReplica + bg_event 5, 1, BGEVENT_READ, RuinsOfAlphHoOhItemRoomAncientReplica + + def_object_events + object_event 2, 6, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphHoOhItemRoomGoldBerry, EVENT_PICKED_UP_GOLD_BERRY_FROM_HO_OH_ITEM_ROOM + object_event 5, 6, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphHoOhItemRoomMysteryberry, EVENT_PICKED_UP_MYSTERYBERRY_FROM_HO_OH_ITEM_ROOM + object_event 2, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphHoOhItemRoomRevivalHerb, EVENT_PICKED_UP_REVIVAL_HERB_FROM_HO_OH_ITEM_ROOM + object_event 5, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphHoOhItemRoomCharcoal, EVENT_PICKED_UP_CHARCOAL_FROM_HO_OH_ITEM_ROOM diff --git a/maps/RuinsOfAlphHoOhWordRoom.asm b/maps/RuinsOfAlphHoOhWordRoom.asm new file mode 100644 index 0000000..e6f3f62 --- /dev/null +++ b/maps/RuinsOfAlphHoOhWordRoom.asm @@ -0,0 +1,18 @@ +RuinsOfAlphHoOhWordRoom_MapScripts: + def_scene_scripts + + def_callbacks + +RuinsOfAlphHoOhWordRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 9, RUINS_OF_ALPH_HO_OH_ITEM_ROOM, 3 + warp_event 10, 9, RUINS_OF_ALPH_HO_OH_ITEM_ROOM, 4 + warp_event 17, 21, RUINS_OF_ALPH_INNER_CHAMBER, 2 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/RuinsOfAlphHoOhWordRoom.blk b/maps/RuinsOfAlphHoOhWordRoom.blk new file mode 100644 index 0000000..d15ce28 --- /dev/null +++ b/maps/RuinsOfAlphHoOhWordRoom.blk @@ -0,0 +1,2 @@ + + !"#$%&'()*+,-./0123456789:;<=    \ No newline at end of file diff --git a/maps/RuinsOfAlphInnerChamber.asm b/maps/RuinsOfAlphInnerChamber.asm new file mode 100644 index 0000000..ac4eab6 --- /dev/null +++ b/maps/RuinsOfAlphInnerChamber.asm @@ -0,0 +1,124 @@ + object_const_def + const RUINSOFALPHINNERCHAMBER_FISHER + const RUINSOFALPHINNERCHAMBER_TEACHER + const RUINSOFALPHINNERCHAMBER_GRAMPS + +RuinsOfAlphInnerChamber_MapScripts: + def_scene_scripts + scene_script RuinsOfAlphInnerChamberNoopScene, SCENE_RUINSOFALPHINNERCHAMBER_NOOP + scene_script RuinsOfAlphInnerChamberStrangePresenceScene, SCENE_RUINSOFALPHINNERCHAMBER_STRANGE_PRESENCE + + def_callbacks + +RuinsOfAlphInnerChamberNoopScene: + end + +RuinsOfAlphInnerChamberStrangePresenceScene: + sdefer RuinsOfAlphInnerChamberStrangePresenceScript + end + +RuinsOfAlphInnerChamberStrangePresenceScript: + opentext + writetext RuinsOfAlphStrangePresenceText + waitbutton + closetext + setscene SCENE_RUINSOFALPHINNERCHAMBER_NOOP + setevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS + clearevent EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_FISHER + end + +RuinsOfAlphInnerChamberFisherScript: + jumptextfaceplayer RuinsOfAlphInnerChamberFisherText + +RuinsOfAlphInnerChamberTeacherScript: + jumptextfaceplayer RuinsOfAlphInnerChamberTeacherText + +RuinsOfAlphInnerChamberGrampsScript: + jumptextfaceplayer RuinsOfAlphInnerChamberGrampsText + +RuinsOfAlphInnerChamberStatue: + jumptext RuinsOfAlphInnerChamberStatueText + +RuinsOfAlphStrangePresenceText: + text "There is a strange" + line "presence here…" + done + +RuinsOfAlphInnerChamberFisherText: + text "This is a big" + line "room, but there's" + cont "nothing here." + done + +RuinsOfAlphInnerChamberTeacherText: + text "This place has a" + line "mystical quality" + cont "to it." + + para "It feels sort of" + line "ethereal even." + done + +RuinsOfAlphInnerChamberGrampsText: + text "Ancient buildings" + line "are often tombs of" + cont "kings." + + para "Like the pyramids," + line "for instance." + done + +RuinsOfAlphInnerChamberStatueText: + text "It's a replica of" + line "an ancient #-" + cont "MON." + done + +RuinsOfAlphInnerChamber_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 10, 13, RUINS_OF_ALPH_OUTSIDE, 5 + warp_event 3, 15, RUINS_OF_ALPH_HO_OH_CHAMBER, 3 + warp_event 4, 15, RUINS_OF_ALPH_HO_OH_CHAMBER, 4 + warp_event 15, 3, RUINS_OF_ALPH_KABUTO_CHAMBER, 3 + warp_event 16, 3, RUINS_OF_ALPH_KABUTO_CHAMBER, 4 + warp_event 3, 21, RUINS_OF_ALPH_OMANYTE_CHAMBER, 3 + warp_event 4, 21, RUINS_OF_ALPH_OMANYTE_CHAMBER, 4 + warp_event 15, 24, RUINS_OF_ALPH_AERODACTYL_CHAMBER, 3 + warp_event 16, 24, RUINS_OF_ALPH_AERODACTYL_CHAMBER, 4 + + def_coord_events + + def_bg_events + bg_event 2, 3, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 5, 3, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 8, 3, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 11, 3, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 14, 3, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 17, 3, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 2, 8, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 5, 8, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 8, 8, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 11, 8, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 14, 8, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 17, 8, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 2, 13, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 17, 13, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 2, 18, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 5, 18, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 8, 18, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 11, 18, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 14, 18, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 17, 18, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 2, 24, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 5, 24, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 8, 24, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 11, 24, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 14, 24, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + bg_event 17, 24, BGEVENT_READ, RuinsOfAlphInnerChamberStatue + + def_object_events + object_event 3, 7, SPRITE_FISHER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphInnerChamberFisherScript, EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS + object_event 14, 13, SPRITE_TEACHER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphInnerChamberTeacherScript, EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS + object_event 11, 19, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphInnerChamberGrampsScript, EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS diff --git a/maps/RuinsOfAlphInnerChamber.blk b/maps/RuinsOfAlphInnerChamber.blk new file mode 100644 index 0000000..ee907fc --- /dev/null +++ b/maps/RuinsOfAlphInnerChamber.blk @@ -0,0 +1,7 @@ +   + + +         + + +           &*'*'*'*'( \ No newline at end of file diff --git a/maps/RuinsOfAlphItemRoom.blk b/maps/RuinsOfAlphItemRoom.blk new file mode 100644 index 0000000..54b5328 --- /dev/null +++ b/maps/RuinsOfAlphItemRoom.blk @@ -0,0 +1 @@ +451212,+ \ No newline at end of file diff --git a/maps/RuinsOfAlphKabutoChamber.asm b/maps/RuinsOfAlphKabutoChamber.asm new file mode 100644 index 0000000..73fff82 --- /dev/null +++ b/maps/RuinsOfAlphKabutoChamber.asm @@ -0,0 +1,276 @@ + object_const_def + const RUINSOFALPHKABUTOCHAMBER_RECEPTIONIST + const RUINSOFALPHKABUTOCHAMBER_SCIENTIST + +RuinsOfAlphKabutoChamber_MapScripts: + def_scene_scripts + scene_script RuinsOfAlphKabutoChamberCheckWallScene, SCENE_RUINSOFALPHKABUTOCHAMBER_CHECK_WALL + scene_script RuinsOfAlphKabutoChamberNoopScene, SCENE_RUINSOFALPHKABUTOCHAMBER_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, RuinsOfAlphKabutoChamberHiddenDoorsCallback + +RuinsOfAlphKabutoChamberCheckWallScene: + checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER + iftrue .OpenWall + end + +.OpenWall: + sdefer RuinsOfAlphKabutoChamberWallOpenScript + end + +RuinsOfAlphKabutoChamberNoopScene: + end + +RuinsOfAlphKabutoChamberHiddenDoorsCallback: + checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER + iftrue .WallOpen + changeblock 4, 0, $2e ; closed wall +.WallOpen: + checkevent EVENT_SOLVED_KABUTO_PUZZLE + iffalse .FloorClosed + endcallback + +.FloorClosed: + changeblock 2, 2, $01 ; left floor + changeblock 4, 2, $02 ; right floor + endcallback + +RuinsOfAlphKabutoChamberWallOpenScript: + pause 30 + earthquake 30 + showemote EMOTE_SHOCK, PLAYER, 20 + pause 30 + playsound SFX_STRENGTH + changeblock 4, 0, $30 ; open wall + reloadmappart + earthquake 50 + setscene SCENE_RUINSOFALPHKABUTOCHAMBER_NOOP + closetext + end + +RuinsOfAlphKabutoChamberReceptionistScript: + jumptextfaceplayer RuinsOfAlphKabutoChamberReceptionistText + +RuinsOfAlphKabutoChamberPuzzle: + refreshscreen + setval UNOWNPUZZLE_KABUTO + special UnownPuzzle + closetext + iftrue .PuzzleComplete + end + +.PuzzleComplete: + setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS + setevent EVENT_SOLVED_KABUTO_PUZZLE + setflag ENGINE_UNLOCKED_UNOWNS_A_TO_K + setevent EVENT_RUINS_OF_ALPH_KABUTO_CHAMBER_RECEPTIONIST + setmapscene RUINS_OF_ALPH_INNER_CHAMBER, SCENE_RUINSOFALPHINNERCHAMBER_STRANGE_PRESENCE + earthquake 30 + showemote EMOTE_SHOCK, PLAYER, 15 + changeblock 2, 2, $18 ; left hole + changeblock 4, 2, $19 ; right hole + reloadmappart + playsound SFX_STRENGTH + earthquake 80 + applymovement PLAYER, RuinsOfAlphKabutoChamberSkyfallTopMovement + playsound SFX_KINESIS + waitsfx + pause 20 + warpcheck + end + +RuinsOfAlphKabutoChamberScientistScript: + faceplayer + opentext + readvar VAR_UNOWNCOUNT + ifequal NUM_UNOWN, .AllUnownCaught + checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER + iftrue .WallOpen + checkevent EVENT_SOLVED_KABUTO_PUZZLE + iffalse .PuzzleIncomplete + writetext RuinsOfAlphKabutoChamberScientistTremorText + promptbutton +.PuzzleIncomplete: + writetext RuinsOfAlphKabutoChamberScientistCrypticText + waitbutton + closetext + turnobject RUINSOFALPHKABUTOCHAMBER_SCIENTIST, UP + end + +.WallOpen: + writetext RuinsOfAlphKabutoChamberScientistHoleText + waitbutton + closetext + end + +.AllUnownCaught: + writetext RuinsOfAlphResearchCenterScientist1Text_GotAllUnown + waitbutton + closetext + end + +RuinsOfAlphKabutoChamberAncientReplica: + jumptext RuinsOfAlphKabutoChamberAncientReplicaText + +RuinsOfAlphKabutoChamberDescriptionSign: + jumptext RuinsOfAlphKabutoChamberDescriptionText + +RuinsOfAlphKabutoChamberWallPatternLeft: + opentext + writetext RuinsOfAlphKabutoChamberWallPatternLeftText + setval UNOWNWORDS_ESCAPE + special DisplayUnownWords + closetext + end + +RuinsOfAlphKabutoChamberWallPatternRight: + checkevent EVENT_WALL_OPENED_IN_KABUTO_CHAMBER + iftrue .WallOpen + opentext + writetext RuinsOfAlphKabutoChamberWallPatternRightText + setval UNOWNWORDS_ESCAPE + special DisplayUnownWords + closetext + end + +.WallOpen: + opentext + writetext RuinsOfAlphKabutoChamberWallHoleText + waitbutton + closetext + end + +RuinsOfAlphKabutoChamberSkyfallTopMovement: + skyfall_top + step_end + +RuinsOfAlphKabutoChamberReceptionistText: + text "Welcome to this" + line "chamber." + + para "There are sliding" + line "panels that depict" + + para "a #MON drawn by" + line "the ancients." + + para "Slide the panels" + line "around to form the" + cont "picture." + + para "To the right is a" + line "description of the" + cont "#MON." + + para "Scientists in the" + line "back are examining" + + para "some newly found" + line "patterns." + done + +RuinsOfAlphKabutoChamberScientistCrypticText: + text "Recently, strange," + line "cryptic patterns" + cont "have appeared." + + para "It's odd. They" + line "weren't here a" + cont "little while ago…" + + para "You should take a" + line "look at the walls." + done + +RuinsOfAlphKabutoChamberScientistHoleText: + text "Ah! Here's another" + line "huge hole!" + + para "It's big enough to" + line "go through!" + done + +RuinsOfAlphKabutoChamberScientistTremorText: + text "That tremor was" + line "pretty scary!" + + para "But I'm more" + line "concerned about" + cont "this wall here…" + done + +RuinsOfAlphKabutoChamberUnusedText: ; unreferenced + text "The patterns on" + line "the wall appear to" + cont "be words!" + + para "And those sliding" + line "stone panels seem" + + para "to be signals of" + line "some kind." + + para "I think they make" + line "#MON appear," + + para "but it's not clear" + line "yet…" + done + +RuinsOfAlphKabutoChamberWallPatternLeftText: + text "Patterns appeared" + line "on the walls…" + done + +RuinsOfAlphKabutoChamberUnownText: ; unreferenced + text "It's UNOWN text!" + done + +RuinsOfAlphKabutoChamberWallPatternRightText: + text "Patterns appeared" + line "on the walls…" + done + +RuinsOfAlphKabutoChamberWallHoleText: + text "There's a big hole" + line "in the wall!" + done + +RuinsOfAlphKabutoChamberAncientReplicaText: + text "It's a replica of" + line "an ancient #-" + cont "MON." + done + +RuinsOfAlphKabutoChamberDescriptionText: + text "A #MON that hid" + line "on the sea floor." + + para "Eyes on its back" + line "scanned the area." + done + +RuinsOfAlphKabutoChamber_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 9, RUINS_OF_ALPH_OUTSIDE, 2 + warp_event 4, 9, RUINS_OF_ALPH_OUTSIDE, 2 + warp_event 3, 3, RUINS_OF_ALPH_INNER_CHAMBER, 4 + warp_event 4, 3, RUINS_OF_ALPH_INNER_CHAMBER, 5 + warp_event 4, 0, RUINS_OF_ALPH_KABUTO_ITEM_ROOM, 1 + + def_coord_events + + def_bg_events + bg_event 2, 3, BGEVENT_READ, RuinsOfAlphKabutoChamberAncientReplica + bg_event 5, 3, BGEVENT_READ, RuinsOfAlphKabutoChamberAncientReplica + bg_event 3, 2, BGEVENT_UP, RuinsOfAlphKabutoChamberPuzzle + bg_event 4, 2, BGEVENT_UP, RuinsOfAlphKabutoChamberDescriptionSign + bg_event 3, 0, BGEVENT_UP, RuinsOfAlphKabutoChamberWallPatternLeft + bg_event 4, 0, BGEVENT_UP, RuinsOfAlphKabutoChamberWallPatternRight + + def_object_events + object_event 5, 5, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphKabutoChamberReceptionistScript, EVENT_RUINS_OF_ALPH_KABUTO_CHAMBER_RECEPTIONIST + object_event 3, 1, SPRITE_SCIENTIST, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphKabutoChamberScientistScript, -1 diff --git a/maps/RuinsOfAlphKabutoItemRoom.asm b/maps/RuinsOfAlphKabutoItemRoom.asm new file mode 100644 index 0000000..21eee98 --- /dev/null +++ b/maps/RuinsOfAlphKabutoItemRoom.asm @@ -0,0 +1,52 @@ + object_const_def + const RUINSOFALPHKABUTOITEMROOM_POKE_BALL1 + const RUINSOFALPHKABUTOITEMROOM_POKE_BALL2 + const RUINSOFALPHKABUTOITEMROOM_POKE_BALL3 + const RUINSOFALPHKABUTOITEMROOM_POKE_BALL4 + +RuinsOfAlphKabutoItemRoom_MapScripts: + def_scene_scripts + + def_callbacks + +RuinsOfAlphKabutoItemRoomBerry: + itemball BERRY + +RuinsOfAlphKabutoItemRoomPsncureberry: + itemball PSNCUREBERRY + +RuinsOfAlphKabutoItemRoomHealPowder: + itemball HEAL_POWDER + +RuinsOfAlphKabutoItemRoomEnergypowder: + itemball ENERGYPOWDER + +RuinsOfAlphKabutoItemRoomAncientReplica: + jumptext RuinsOfAlphKabutoItemRoomAncientReplicaText + +RuinsOfAlphKabutoItemRoomAncientReplicaText: + text "It's a replica of" + line "an ancient #-" + cont "MON." + done + +RuinsOfAlphKabutoItemRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 9, RUINS_OF_ALPH_KABUTO_CHAMBER, 5 + warp_event 4, 9, RUINS_OF_ALPH_KABUTO_CHAMBER, 5 + warp_event 3, 1, RUINS_OF_ALPH_KABUTO_WORD_ROOM, 1 + warp_event 4, 1, RUINS_OF_ALPH_KABUTO_WORD_ROOM, 2 + + def_coord_events + + def_bg_events + bg_event 2, 1, BGEVENT_READ, RuinsOfAlphKabutoItemRoomAncientReplica + bg_event 5, 1, BGEVENT_READ, RuinsOfAlphKabutoItemRoomAncientReplica + + def_object_events + object_event 2, 6, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphKabutoItemRoomBerry, EVENT_PICKED_UP_BERRY_FROM_KABUTO_ITEM_ROOM + object_event 5, 6, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphKabutoItemRoomPsncureberry, EVENT_PICKED_UP_PSNCUREBERRY_FROM_KABUTO_ITEM_ROOM + object_event 2, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphKabutoItemRoomHealPowder, EVENT_PICKED_UP_HEAL_POWDER_FROM_KABUTO_ITEM_ROOM + object_event 5, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphKabutoItemRoomEnergypowder, EVENT_PICKED_UP_ENERGYPOWDER_FROM_KABUTO_ITEM_ROOM diff --git a/maps/RuinsOfAlphKabutoWordRoom.asm b/maps/RuinsOfAlphKabutoWordRoom.asm new file mode 100644 index 0000000..06d281a --- /dev/null +++ b/maps/RuinsOfAlphKabutoWordRoom.asm @@ -0,0 +1,18 @@ +RuinsOfAlphKabutoWordRoom_MapScripts: + def_scene_scripts + + def_callbacks + +RuinsOfAlphKabutoWordRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 5, RUINS_OF_ALPH_KABUTO_ITEM_ROOM, 3 + warp_event 10, 5, RUINS_OF_ALPH_KABUTO_ITEM_ROOM, 4 + warp_event 17, 11, RUINS_OF_ALPH_INNER_CHAMBER, 4 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/RuinsOfAlphKabutoWordRoom.blk b/maps/RuinsOfAlphKabutoWordRoom.blk new file mode 100644 index 0000000..fb849e6 --- /dev/null +++ b/maps/RuinsOfAlphKabutoWordRoom.blk @@ -0,0 +1,2 @@ + + !"#$%    \ No newline at end of file diff --git a/maps/RuinsOfAlphOmanyteChamber.asm b/maps/RuinsOfAlphOmanyteChamber.asm new file mode 100644 index 0000000..dcfb6ef --- /dev/null +++ b/maps/RuinsOfAlphOmanyteChamber.asm @@ -0,0 +1,164 @@ +RuinsOfAlphOmanyteChamber_MapScripts: + def_scene_scripts + scene_script RuinsOfAlphOmanyteChamberCheckWallScene, SCENE_RUINSOFALPHOMANYTECHAMBER_CHECK_WALL + scene_script RuinsOfAlphOmanyteChamberNoopScene, SCENE_RUINSOFALPHOMANYTECHAMBER_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, RuinsOfAlphOmanyteChamberHiddenDoorsCallback + +RuinsOfAlphOmanyteChamberCheckWallScene: + special OmanyteChamber + checkevent EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER + iftrue .OpenWall + end + +.OpenWall: + sdefer RuinsOfAlphOmanyteChamberWallOpenScript + end + +RuinsOfAlphOmanyteChamberNoopScene: + end + +RuinsOfAlphOmanyteChamberHiddenDoorsCallback: + checkevent EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER + iftrue .WallOpen + changeblock 4, 0, $2e ; closed wall +.WallOpen: + checkevent EVENT_SOLVED_OMANYTE_PUZZLE + iffalse .FloorClosed + endcallback + +.FloorClosed: + changeblock 2, 2, $01 ; left floor + changeblock 4, 2, $02 ; right floor + endcallback + +RuinsOfAlphOmanyteChamberWallOpenScript: + pause 30 + earthquake 30 + showemote EMOTE_SHOCK, PLAYER, 20 + pause 30 + playsound SFX_STRENGTH + changeblock 4, 0, $30 ; open wall + reloadmappart + earthquake 50 + setscene SCENE_RUINSOFALPHOMANYTECHAMBER_NOOP + closetext + end + +RuinsOfAlphOmanyteChamberPuzzle: + refreshscreen + setval UNOWNPUZZLE_OMANYTE + special UnownPuzzle + closetext + iftrue .PuzzleComplete + end + +.PuzzleComplete: + setevent EVENT_RUINS_OF_ALPH_INNER_CHAMBER_TOURISTS + setevent EVENT_SOLVED_OMANYTE_PUZZLE + setflag ENGINE_UNLOCKED_UNOWNS_L_TO_R + setmapscene RUINS_OF_ALPH_INNER_CHAMBER, SCENE_RUINSOFALPHINNERCHAMBER_STRANGE_PRESENCE + earthquake 30 + showemote EMOTE_SHOCK, PLAYER, 15 + changeblock 2, 2, $18 ; left hole + changeblock 4, 2, $19 ; right hole + reloadmappart + playsound SFX_STRENGTH + earthquake 80 + applymovement PLAYER, RuinsOfAlphOmanyteChamberSkyfallTopMovement + playsound SFX_KINESIS + waitsfx + pause 20 + warpcheck + end + +RuinsOfAlphOmanyteChamberAncientReplica: + jumptext RuinsOfAlphOmanyteChamberAncientReplicaText + +RuinsOfAlphOmanyteChamberDescriptionSign: + jumptext RuinsOfAlphOmanyteChamberDescriptionText + +RuinsOfAlphOmanyteChamberWallPatternLeft: + opentext + writetext RuinsOfAlphOmanyteChamberWallPatternLeftText + setval UNOWNWORDS_WATER + special DisplayUnownWords + closetext + end + +RuinsOfAlphOmanyteChamberWallPatternRight: + checkevent EVENT_WALL_OPENED_IN_OMANYTE_CHAMBER + iftrue .WallOpen + opentext + writetext RuinsOfAlphOmanyteChamberWallPatternRightText + setval UNOWNWORDS_WATER + special DisplayUnownWords + closetext + end + +.WallOpen: + opentext + writetext RuinsOfAlphOmanyteChamberWallHoleText + waitbutton + closetext + end + +RuinsOfAlphOmanyteChamberSkyfallTopMovement: + skyfall_top + step_end + +RuinsOfAlphOmanyteChamberWallPatternLeftText: + text "Patterns appeared" + line "on the walls…" + done + +RuinsOfAlphOmanyteChamberUnownText: ; unreferenced + text "It's UNOWN text!" + done + +RuinsOfAlphOmanyteChamberWallPatternRightText: + text "Patterns appeared" + line "on the walls…" + done + +RuinsOfAlphOmanyteChamberWallHoleText: + text "There's a big hole" + line "in the wall!" + done + +RuinsOfAlphOmanyteChamberAncientReplicaText: + text "It's a replica of" + line "an ancient #-" + cont "MON." + done + +RuinsOfAlphOmanyteChamberDescriptionText: + text "This #MON" + line "drifted in the" + + para "sea by twisting" + line "its ten tentacles." + done + +RuinsOfAlphOmanyteChamber_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 9, RUINS_OF_ALPH_OUTSIDE, 3 + warp_event 4, 9, RUINS_OF_ALPH_OUTSIDE, 3 + warp_event 3, 3, RUINS_OF_ALPH_INNER_CHAMBER, 6 + warp_event 4, 3, RUINS_OF_ALPH_INNER_CHAMBER, 7 + warp_event 4, 0, RUINS_OF_ALPH_OMANYTE_ITEM_ROOM, 1 + + def_coord_events + + def_bg_events + bg_event 2, 3, BGEVENT_READ, RuinsOfAlphOmanyteChamberAncientReplica + bg_event 5, 3, BGEVENT_READ, RuinsOfAlphOmanyteChamberAncientReplica + bg_event 3, 2, BGEVENT_UP, RuinsOfAlphOmanyteChamberPuzzle + bg_event 4, 2, BGEVENT_UP, RuinsOfAlphOmanyteChamberDescriptionSign + bg_event 3, 0, BGEVENT_UP, RuinsOfAlphOmanyteChamberWallPatternLeft + bg_event 4, 0, BGEVENT_UP, RuinsOfAlphOmanyteChamberWallPatternRight + + def_object_events diff --git a/maps/RuinsOfAlphOmanyteItemRoom.asm b/maps/RuinsOfAlphOmanyteItemRoom.asm new file mode 100644 index 0000000..c6e6714 --- /dev/null +++ b/maps/RuinsOfAlphOmanyteItemRoom.asm @@ -0,0 +1,52 @@ + object_const_def + const RUINSOFALPHOMANYTEITEMROOM_POKE_BALL1 + const RUINSOFALPHOMANYTEITEMROOM_POKE_BALL2 + const RUINSOFALPHOMANYTEITEMROOM_POKE_BALL3 + const RUINSOFALPHOMANYTEITEMROOM_POKE_BALL4 + +RuinsOfAlphOmanyteItemRoom_MapScripts: + def_scene_scripts + + def_callbacks + +RuinsOfAlphOmanyteItemRoomMysteryberry: + itemball MYSTERYBERRY + +RuinsOfAlphOmanyteItemRoomMysticWater: + itemball MYSTIC_WATER + +RuinsOfAlphOmanyteItemRoomStardust: + itemball STARDUST + +RuinsOfAlphOmanyteItemRoomStarPiece: + itemball STAR_PIECE + +RuinsOfAlphOmanyteItemRoomAncientReplica: + jumptext RuinsOfAlphOmanyteItemRoomAncientReplicaText + +RuinsOfAlphOmanyteItemRoomAncientReplicaText: + text "It's a replica of" + line "an ancient #-" + cont "MON." + done + +RuinsOfAlphOmanyteItemRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 9, RUINS_OF_ALPH_OMANYTE_CHAMBER, 5 + warp_event 4, 9, RUINS_OF_ALPH_OMANYTE_CHAMBER, 5 + warp_event 3, 1, RUINS_OF_ALPH_OMANYTE_WORD_ROOM, 1 + warp_event 4, 1, RUINS_OF_ALPH_OMANYTE_WORD_ROOM, 2 + + def_coord_events + + def_bg_events + bg_event 2, 1, BGEVENT_READ, RuinsOfAlphOmanyteItemRoomAncientReplica + bg_event 5, 1, BGEVENT_READ, RuinsOfAlphOmanyteItemRoomAncientReplica + + def_object_events + object_event 2, 6, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphOmanyteItemRoomMysteryberry, EVENT_PICKED_UP_MYSTERYBERRY_FROM_OMANYTE_ITEM_ROOM + object_event 5, 6, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphOmanyteItemRoomMysticWater, EVENT_PICKED_UP_MYSTIC_WATER_FROM_OMANYTE_ITEM_ROOM + object_event 2, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphOmanyteItemRoomStardust, EVENT_PICKED_UP_STARDUST_FROM_OMANYTE_ITEM_ROOM + object_event 5, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, RuinsOfAlphOmanyteItemRoomStarPiece, EVENT_PICKED_UP_STAR_PIECE_FROM_OMANYTE_ITEM_ROOM diff --git a/maps/RuinsOfAlphOmanyteWordRoom.asm b/maps/RuinsOfAlphOmanyteWordRoom.asm new file mode 100644 index 0000000..b1d85fd --- /dev/null +++ b/maps/RuinsOfAlphOmanyteWordRoom.asm @@ -0,0 +1,18 @@ +RuinsOfAlphOmanyteWordRoom_MapScripts: + def_scene_scripts + + def_callbacks + +RuinsOfAlphOmanyteWordRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 7, RUINS_OF_ALPH_OMANYTE_ITEM_ROOM, 3 + warp_event 10, 7, RUINS_OF_ALPH_OMANYTE_ITEM_ROOM, 4 + warp_event 17, 13, RUINS_OF_ALPH_INNER_CHAMBER, 6 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/RuinsOfAlphOmanyteWordRoom.blk b/maps/RuinsOfAlphOmanyteWordRoom.blk new file mode 100644 index 0000000..16c0b72 --- /dev/null +++ b/maps/RuinsOfAlphOmanyteWordRoom.blk @@ -0,0 +1,2 @@ + + !"#$%&'()*+,-    \ No newline at end of file diff --git a/maps/RuinsOfAlphOutside.asm b/maps/RuinsOfAlphOutside.asm new file mode 100644 index 0000000..ad4200b --- /dev/null +++ b/maps/RuinsOfAlphOutside.asm @@ -0,0 +1,311 @@ + object_const_def + const RUINSOFALPHOUTSIDE_YOUNGSTER1 + const RUINSOFALPHOUTSIDE_SCIENTIST + const RUINSOFALPHOUTSIDE_FISHER + const RUINSOFALPHOUTSIDE_YOUNGSTER2 + const RUINSOFALPHOUTSIDE_YOUNGSTER3 + +RuinsOfAlphOutside_MapScripts: + def_scene_scripts + scene_script RuinsOfAlphOutsideNoop1Scene, SCENE_RUINSOFALPHOUTSIDE_NOOP + scene_script RuinsOfAlphOutsideNoop2Scene, SCENE_RUINSOFALPHOUTSIDE_GET_UNOWN_DEX + + def_callbacks + callback MAPCALLBACK_OBJECTS, RuinsOfAlphOutsideScientistCallback + +RuinsOfAlphOutsideNoop1Scene: + end + +RuinsOfAlphOutsideNoop2Scene: + end + +RuinsOfAlphOutsideScientistCallback: + checkflag ENGINE_UNOWN_DEX + iftrue .NoScientist + checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS + iftrue .MaybeScientist + sjump .NoScientist + +.MaybeScientist: + readvar VAR_UNOWNCOUNT + ifgreater 2, .YesScientist + sjump .NoScientist + +.YesScientist: + appear RUINSOFALPHOUTSIDE_SCIENTIST + setscene SCENE_RUINSOFALPHOUTSIDE_GET_UNOWN_DEX + endcallback + +.NoScientist: + disappear RUINSOFALPHOUTSIDE_SCIENTIST + setscene SCENE_RUINSOFALPHOUTSIDE_NOOP + endcallback + +RuinsOfAlphOutsideScientistScene1: + turnobject RUINSOFALPHOUTSIDE_SCIENTIST, UP + turnobject PLAYER, DOWN + sjump RuinsOfAlphOutsideScientistSceneContinue + +RuinsOfAlphOutsideScientistScene2: + turnobject RUINSOFALPHOUTSIDE_SCIENTIST, LEFT + turnobject PLAYER, RIGHT + sjump RuinsOfAlphOutsideScientistSceneContinue + +RuinsOfAlphOutsideScientistScript: + faceplayer +RuinsOfAlphOutsideScientistSceneContinue: + opentext + writetext RuinsOfAlphOutsideScientistText + waitbutton + closetext + playmusic MUSIC_SHOW_ME_AROUND + follow RUINSOFALPHOUTSIDE_SCIENTIST, PLAYER + applymovement RUINSOFALPHOUTSIDE_SCIENTIST, RuinsOfAlphOutsideScientistWalkToLabMovement + disappear RUINSOFALPHOUTSIDE_SCIENTIST + stopfollow + applymovement PLAYER, RuinsOfAlphOutsidePlayerEnterLabMovement + setmapscene RUINS_OF_ALPH_RESEARCH_CENTER, SCENE_RUINSOFALPHRESEARCHCENTER_GET_UNOWN_DEX + warpcheck + end + +RuinsOfAlphOutsideFisherScript: + faceplayer + opentext + checkevent EVENT_TALKED_TO_RUINS_COWARD + iftrue .Next + setevent EVENT_TALKED_TO_RUINS_COWARD + writetext RuinsOfAlphOutsideFisherText1 + promptbutton +.Next: + writetext RuinsOfAlphOutsideFisherText2 + waitbutton + closetext + end + +RuinsOfAlphOutsideYoungster1Script: + faceplayer + opentext + writetext RuinsOfAlphOutsideYoungster1Text + waitbutton + closetext + end + +RuinsOfAlphOutsideYoungster2Script: + faceplayer + opentext + writetext RuinsOfAlphOutsideYoungster2Text + waitbutton + closetext + turnobject RUINSOFALPHOUTSIDE_YOUNGSTER3, UP + end + +TrainerPsychicNathan: + trainer PSYCHIC_T, NATHAN, EVENT_BEAT_PSYCHIC_NATHAN, PsychicNathanSeenText, PsychicNathanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PsychicNathanAfterBattleText + waitbutton + closetext + end + +TrainerSuperNerdStan: ; unreferenced + trainer SUPER_NERD, STAN, EVENT_BEAT_SUPER_NERD_STAN, SuperNerdStanSeenText, SuperNerdStanBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SuperNerdStanAfterBattleText + waitbutton + closetext + end + +RuinsOfAlphOutsideMysteryChamberSign: + jumptext RuinsOfAlphOutsideMysteryChamberSignText + +RuinsOfAlphSign: + jumptext RuinsOfAlphSignText + +RuinsOfAlphResearchCenterSign: + jumptext RuinsOfAlphResearchCenterSignText + +RuinsOfAlphOutsideScientistWalkToLabMovement: + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step UP + step UP + step RIGHT + step RIGHT + step UP + step UP + step_end + +RuinsOfAlphOutsidePlayerEnterLabMovement: + step UP + step_end + +RuinsOfAlphOutsideScientistText: + text "Hm? That's a #-" + line "DEX, isn't it?" + cont "May I see it?" + + para "There are so many" + line "kinds of #MON." + + para "Hm? What's this?" + + para "What is this" + line "#MON?" + + para "It looks like the" + line "strange writing on" + + para "the walls of the" + line "RUINS." + + para "If those drawings" + line "are really #-" + cont "MON, there should" + cont "be many more." + + para "I know! Let me up-" + line "grade your #-" + cont "DEX. Follow me." + done + +SuperNerdStanSeenText: + text "What do you want?" + line "I'm studying--" + cont "don't disturb me!" + done + +SuperNerdStanBeatenText: + text "Sorry…" + line "I'm frustrated by" + + para "our lack of real" + line "understanding…" + done + +SuperNerdStanAfterBattleText: + text "The RUINS are from" + line "about 1500 years" + cont "ago." + + para "Nobody knows who" + line "built them." + + para "It's also not" + line "known if the #-" + cont "MON statues have" + cont "any meaning." + + para "It's all one big" + line "mystery…" + done + +PsychicNathanSeenText: + text "Hmmm… This is a" + line "strange place." + done + +PsychicNathanBeatenText: + text "…" + done + +PsychicNathanAfterBattleText: + text "I like thinking" + line "here." + done + +RuinsOfAlphOutsideMysteryChamberSignText: + text "MYSTERY STONE" + line "PANEL CHAMBER" + done + +RuinsOfAlphSignText: + text "RUINS OF ALPH" + line "VISITORS WELCOME" + done + +RuinsOfAlphResearchCenterSignText: + text "RUINS OF ALPH" + line "RESEARCH CENTER" + + para "THE AUTHORITY ON" + line "THE RUINS OF ALPH" + done + +RuinsOfAlphOutsideFisherText1: + text "While exploring" + line "the RUINS, we" + + para "suddenly noticed" + line "an odd presence." + + para "We all got scared" + line "and ran away." + + para "You should be" + line "careful too." + done + +RuinsOfAlphOutsideFisherText2: + text "The RUINS hide a" + line "huge secret!" + + para "…I think…" + done + +RuinsOfAlphOutsideYoungster1Text: + text "There are many" + line "kinds of UNOWN, so" + + para "we use them for" + line "our secret codes." + done + +RuinsOfAlphOutsideYoungster2Text: + text "A… H… E… A… D…" + line "Hmm…" + + para "What?" + + para "I'm decoding this" + line "message!" + done + +RuinsOfAlphOutside_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 17, RUINS_OF_ALPH_HO_OH_CHAMBER, 1 + warp_event 14, 7, RUINS_OF_ALPH_KABUTO_CHAMBER, 1 + warp_event 2, 29, RUINS_OF_ALPH_OMANYTE_CHAMBER, 1 + warp_event 16, 33, RUINS_OF_ALPH_AERODACTYL_CHAMBER, 1 + warp_event 10, 13, RUINS_OF_ALPH_INNER_CHAMBER, 1 + warp_event 17, 11, RUINS_OF_ALPH_RESEARCH_CENTER, 1 + warp_event 6, 19, UNION_CAVE_B1F, 1 + warp_event 6, 27, UNION_CAVE_B1F, 2 + warp_event 7, 5, ROUTE_36_RUINS_OF_ALPH_GATE, 3 + warp_event 13, 20, ROUTE_32_RUINS_OF_ALPH_GATE, 1 + warp_event 13, 21, ROUTE_32_RUINS_OF_ALPH_GATE, 2 + + def_coord_events + coord_event 11, 14, SCENE_RUINSOFALPHOUTSIDE_GET_UNOWN_DEX, RuinsOfAlphOutsideScientistScene1 + coord_event 10, 15, SCENE_RUINSOFALPHOUTSIDE_GET_UNOWN_DEX, RuinsOfAlphOutsideScientistScene2 + + def_bg_events + bg_event 16, 8, BGEVENT_READ, RuinsOfAlphOutsideMysteryChamberSign + bg_event 12, 16, BGEVENT_READ, RuinsOfAlphSign + bg_event 18, 12, BGEVENT_READ, RuinsOfAlphResearchCenterSign + + def_object_events + object_event 4, 20, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 1, TrainerPsychicNathan, -1 + object_event 11, 15, SPRITE_SCIENTIST, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphOutsideScientistScript, EVENT_RUINS_OF_ALPH_OUTSIDE_SCIENTIST + object_event 13, 17, SPRITE_FISHER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphOutsideFisherScript, EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_FISHER + object_event 14, 11, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphOutsideYoungster1Script, EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_YOUNGSTERS + object_event 12, 8, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphOutsideYoungster2Script, EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_YOUNGSTERS diff --git a/maps/RuinsOfAlphOutside.blk b/maps/RuinsOfAlphOutside.blk new file mode 100644 index 0000000..fd834de --- /dev/null +++ b/maps/RuinsOfAlphOutside.blk @@ -0,0 +1,12 @@ +  + + +jppkTUlrsmXYE +XYjppk +XYhosmEjppqilsnqiE +Zlsm  +  +jpkjpqqi + +jqosniTUjklsmlmXYhi +PVVQjqiVVVQlsm \ No newline at end of file diff --git a/maps/RuinsOfAlphPuzzleChamber.blk b/maps/RuinsOfAlphPuzzleChamber.blk new file mode 100644 index 0000000..6560787 --- /dev/null +++ b/maps/RuinsOfAlphPuzzleChamber.blk @@ -0,0 +1 @@ +-0 ,+ \ No newline at end of file diff --git a/maps/RuinsOfAlphResearchCenter.asm b/maps/RuinsOfAlphResearchCenter.asm new file mode 100644 index 0000000..7f789fb --- /dev/null +++ b/maps/RuinsOfAlphResearchCenter.asm @@ -0,0 +1,407 @@ + object_const_def + const RUINSOFALPHRESEARCHCENTER_SCIENTIST1 + const RUINSOFALPHRESEARCHCENTER_SCIENTIST2 + const RUINSOFALPHRESEARCHCENTER_SCIENTIST3 + +RuinsOfAlphResearchCenter_MapScripts: + def_scene_scripts + scene_script RuinsOfAlphResearchCenterNoopScene, SCENE_RUINSOFALPHRESEARCHCENTER_NOOP + scene_script RuinsOfAlphResearchCenterGetUnownDexScene, SCENE_RUINSOFALPHRESEARCHCENTER_GET_UNOWN_DEX + + def_callbacks + callback MAPCALLBACK_OBJECTS, RuinsOfAlphResearchCenterScientistCallback + +RuinsOfAlphResearchCenterNoopScene: + end + +RuinsOfAlphResearchCenterGetUnownDexScene: + sdefer RuinsOfAlphResearchCenterGetUnownDexScript + end + +RuinsOfAlphResearchCenterScientistCallback: + checkscene + ifequal SCENE_RUINSOFALPHRESEARCHCENTER_GET_UNOWN_DEX, .ShowScientist + endcallback + +.ShowScientist: + moveobject RUINSOFALPHRESEARCHCENTER_SCIENTIST3, 3, 7 + appear RUINSOFALPHRESEARCHCENTER_SCIENTIST3 + endcallback + +RuinsOfAlphResearchCenterGetUnownDexScript: + applymovement RUINSOFALPHRESEARCHCENTER_SCIENTIST3, RuinsOfAlphResearchCenterApproachesComputerMovement + playsound SFX_BOOT_PC + pause 60 + playsound SFX_SWITCH_POKEMON + pause 30 + playsound SFX_TALLY + pause 30 + playsound SFX_TRANSACTION + pause 30 + turnobject RUINSOFALPHRESEARCHCENTER_SCIENTIST3, DOWN + opentext + writetext RuinsOfAlphResearchCenterModifiedDexText + waitbutton + closetext + applymovement RUINSOFALPHRESEARCHCENTER_SCIENTIST3, RuinsOfAlphResearchCenterApproachesPlayerMovement + opentext + writetext RuinsOfAlphResearchCenterDexUpgradedText + playsound SFX_ITEM + waitsfx + setflag ENGINE_UNOWN_DEX + writetext RuinsOfAlphResearchCenterScientist3Text + waitbutton + closetext + applymovement RUINSOFALPHRESEARCHCENTER_SCIENTIST3, RuinsOfAlphResearchCenterLeavesPlayerMovement + setscene SCENE_RUINSOFALPHRESEARCHCENTER_NOOP + special RestartMapMusic + end + +RuinsOfAlphResearchCenterScientist3Script: + faceplayer + opentext + readvar VAR_UNOWNCOUNT + ifequal NUM_UNOWN, .PrinterAvailable + writetext RuinsOfAlphResearchCenterScientist3Text + waitbutton + closetext + end + +.PrinterAvailable: + writetext RuinsOfAlphResearchCenterScientist3_PrinterAvailable + waitbutton + closetext + end + +RuinsOfAlphResearchCenterScientist1Script: + faceplayer + opentext + readvar VAR_UNOWNCOUNT + ifequal NUM_UNOWN, .GotAllUnown + checkflag ENGINE_UNOWN_DEX + iftrue .GotUnownDex + checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS + iftrue .UnownAppeared + writetext RuinsOfAlphResearchCenterScientist1Text + waitbutton + closetext + end + +.UnownAppeared: + writetext RuinsOfAlphResearchCenterScientist1Text_UnownAppeared + waitbutton + closetext + end + +.GotUnownDex: + writetext RuinsOfAlphResearchCenterScientist1Text_GotUnownDex + waitbutton + closetext + end + +.GotAllUnown: + writetext RuinsOfAlphResearchCenterScientist1Text_GotAllUnown + waitbutton + closetext + clearevent EVENT_RUINS_OF_ALPH_OUTSIDE_TOURIST_YOUNGSTERS + end + +RuinsOfAlphResearchCenterScientist2Script: + faceplayer + opentext + readvar VAR_UNOWNCOUNT + ifequal NUM_UNOWN, .GotAllUnown + checkevent EVENT_MADE_UNOWN_APPEAR_IN_RUINS + iftrue .UnownAppeared + writetext RuinsOfAlphResearchCenterScientist2Text + waitbutton + closetext + end + +.UnownAppeared: + writetext RuinsOfAlphResearchCenterScientist2Text_UnownAppeared + waitbutton + closetext + end + +.GotAllUnown: + writetext RuinsOfAlphResearchCenterScientist2Text_GotAllUnown + waitbutton + closetext + end + +RuinsOfAlphResearchCenterComputer: + opentext + checkevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST + iftrue .SkipChecking + readvar VAR_UNOWNCOUNT + ifequal NUM_UNOWN, .GotAllUnown +.SkipChecking: + writetext RuinsOfAlphResearchCenterComputerText + waitbutton + closetext + end + +.GotAllUnown: + writetext RuinsOfAlphResearchCenterComputerText_GotAllUnown + waitbutton + closetext + end + +RuinsOfAlphResearchCenterPrinter: + opentext + checkevent EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST + iftrue .SkipChecking + readvar VAR_UNOWNCOUNT + ifequal NUM_UNOWN, .PrinterAvailable +.SkipChecking: + writetext RuinsOfAlphResearchCenterPrinterText_DoesntWork + waitbutton + closetext + end + +.PrinterAvailable: + writetext RuinsOfAlphResearchCenterUnownPrinterText + waitbutton + special UnownPrinter + closetext + end + +RuinsOfAlphResearchCenterPhoto: ; unreferenced + jumptext RuinsOfAlphResearchCenterProfSilktreePhotoText + +RuinsOfAlphResearchCenterBookshelf: + jumptext RuinsOfAlphResearchCenterAcademicBooksText + +RuinsOfAlphResearchCenterApproachesComputerMovement: + step UP + step UP + step LEFT + turn_head UP + step_end + +RuinsOfAlphResearchCenterApproachesPlayerMovement: + step DOWN + step_end + +RuinsOfAlphResearchCenterLeavesPlayerMovement: + step UP + step_end + +RuinsOfAlphResearchCenterModifiedDexText: + text "Done!" + + para "I modified your" + line "#DEX." + + para "I added an" + line "optional #DEX" + + para "to store UNOWN" + line "data." + + para "It records them in" + line "the sequence that" + cont "they were caught." + done + +RuinsOfAlphResearchCenterDexUpgradedText: + text "'s #DEX" + line "was upgraded." + done + +RuinsOfAlphResearchCenterScientist3Text: + text "The UNOWN you" + line "catch will all be" + cont "recorded." + + para "Check to see how" + line "many kinds exist." + done + +RuinsOfAlphResearchCenterScientist3_PrinterAvailable: + text "You caught all the" + line "UNOWN variations?" + + para "That's a great" + line "achievement!" + + para "I've set up the" + line "printer here for" + cont "handling UNOWN." + + para "Feel free to use" + line "it anytime." + done + +RuinsOfAlphResearchCenterScientist1Text: + text "The RUINS are" + line "about 1500 years" + cont "old." + + para "But it's not known" + line "why they were" + cont "built--or by whom." + done + +RuinsOfAlphResearchCenterScientist1Text_GotUnownDex: + text "I wonder how many" + line "kinds of #MON" + cont "are in the RUINS?" + done + +RuinsOfAlphResearchCenterScientist1Text_UnownAppeared: + text "#MON appeared" + line "in the RUINS?" + + para "That's incredible" + line "news!" + + para "We'll need to" + line "investigate this." + done + +RuinsOfAlphResearchCenterScientist1Text_GotAllUnown: + text "Our investigation," + line "with your help, is" + + para "giving us insight" + line "into the RUINS." + + para "The RUINS appear" + line "to have been built" + + para "as a habitat for" + line "#MON." + done + +RuinsOfAlphResearchCenterScientist2Text: + text "There are odd pat-" + line "terns drawn on the" + + para "walls of the" + line "RUINS." + + para "They must be the" + line "keys for unravel-" + cont "ing the mystery" + cont "of the RUINS." + done + +RuinsOfAlphResearchCenterScientist2Text_UnownAppeared: + text "The strange #-" + line "MON you saw in the" + cont "RUINS?" + + para "They appear to be" + line "very much like the" + + para "drawings on the" + line "walls there." + + para "Hmm…" + + para "That must mean" + line "there are many" + cont "kinds of them…" + done + +RuinsOfAlphResearchCenterUnusedText1: ; unreferenced + text "We think something" + line "caused the cryptic" + + para "patterns to appear" + line "in the RUINS." + + para "We've focused our" + line "studies on that." + done + +RuinsOfAlphResearchCenterUnusedText2: ; unreferenced + text "According to my" + line "research…" + + para "Those mysterious" + line "patterns appeared" + + para "when the #COM" + line "CENTER was built." + + para "It must mean that" + line "radio waves have" + + para "some sort of a" + line "link…" + done + +RuinsOfAlphResearchCenterScientist2Text_GotAllUnown: + text "Why did those" + line "ancient patterns" + + para "appear on the wall" + line "now?" + + para "The mystery" + line "deepens…" + done + +RuinsOfAlphResearchCenterComputerText: + text "RUINS OF ALPH" + + para "Exploration" + line "Year 10" + done + +RuinsOfAlphResearchCenterComputerText_GotAllUnown: + text "Mystery #MON" + line "Name: UNOWN" + + para "A total of {d:NUM_UNOWN}" + line "kinds found." + done + +RuinsOfAlphResearchCenterPrinterText_DoesntWork: + text "This doesn't seem" + line "to work yet." + done + +RuinsOfAlphResearchCenterUnownPrinterText: + text "UNOWN may be" + line "printed out." + done + +RuinsOfAlphResearchCenterProfSilktreePhotoText: + text "It's a photo of" + line "the RESEARCH" + + para "CENTER'S founder," + line "PROF.SILKTREE." + done + +RuinsOfAlphResearchCenterAcademicBooksText: + text "There are many" + line "academic books." + + para "Ancient Ruins…" + line "Mysteries of the" + cont "Ancients…" + done + +RuinsOfAlphResearchCenter_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, RUINS_OF_ALPH_OUTSIDE, 6 + warp_event 3, 7, RUINS_OF_ALPH_OUTSIDE, 6 + + def_coord_events + + def_bg_events + bg_event 6, 5, BGEVENT_READ, RuinsOfAlphResearchCenterBookshelf + bg_event 3, 4, BGEVENT_READ, RuinsOfAlphResearchCenterComputer + bg_event 7, 1, BGEVENT_READ, RuinsOfAlphResearchCenterPrinter + + def_object_events + object_event 4, 5, SPRITE_SCIENTIST, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphResearchCenterScientist1Script, -1 + object_event 5, 2, SPRITE_SCIENTIST, SPRITEMOVEDATA_WANDER, 2, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphResearchCenterScientist2Script, -1 + object_event 2, 5, SPRITE_SCIENTIST, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RuinsOfAlphResearchCenterScientist3Script, EVENT_RUINS_OF_ALPH_RESEARCH_CENTER_SCIENTIST diff --git a/maps/RuinsOfAlphResearchCenter.blk b/maps/RuinsOfAlphResearchCenter.blk new file mode 100644 index 0000000..051b602 --- /dev/null +++ b/maps/RuinsOfAlphResearchCenter.blk @@ -0,0 +1 @@ +;()  \ No newline at end of file diff --git a/maps/SafariZoneBeta.asm b/maps/SafariZoneBeta.asm new file mode 100644 index 0000000..eca291c --- /dev/null +++ b/maps/SafariZoneBeta.asm @@ -0,0 +1,17 @@ +SafariZoneBeta_MapScripts: + def_scene_scripts + + def_callbacks + +SafariZoneBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 23, SAFARI_ZONE_FUCHSIA_GATE_BETA, 1 + warp_event 10, 23, SAFARI_ZONE_FUCHSIA_GATE_BETA, 2 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/SafariZoneBeta.blk b/maps/SafariZoneBeta.blk new file mode 100644 index 0000000..fb340d3 --- /dev/null +++ b/maps/SafariZoneBeta.blk @@ -0,0 +1 @@ +?//'#33+ \ No newline at end of file diff --git a/maps/SafariZoneFuchsiaGateBeta.asm b/maps/SafariZoneFuchsiaGateBeta.asm new file mode 100644 index 0000000..d11041e --- /dev/null +++ b/maps/SafariZoneFuchsiaGateBeta.asm @@ -0,0 +1,19 @@ +SafariZoneFuchsiaGateBeta_MapScripts: + def_scene_scripts + + def_callbacks + +SafariZoneFuchsiaGateBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 0, SAFARI_ZONE_BETA, 1 + warp_event 5, 0, SAFARI_ZONE_BETA, 2 + warp_event 4, 7, FUCHSIA_CITY, 7 + warp_event 5, 7, FUCHSIA_CITY, 7 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/SafariZoneMainOffice.asm b/maps/SafariZoneMainOffice.asm new file mode 100644 index 0000000..6263e68 --- /dev/null +++ b/maps/SafariZoneMainOffice.asm @@ -0,0 +1,17 @@ +SafariZoneMainOffice_MapScripts: + def_scene_scripts + + def_callbacks + +SafariZoneMainOffice_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, FUCHSIA_CITY, 2 + warp_event 3, 7, FUCHSIA_CITY, 2 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/SafariZoneWardensHome.asm b/maps/SafariZoneWardensHome.asm new file mode 100644 index 0000000..9419483 --- /dev/null +++ b/maps/SafariZoneWardensHome.asm @@ -0,0 +1,93 @@ + object_const_def + const SAFARIZONEWARDENSHOME_LASS + +SafariZoneWardensHome_MapScripts: + def_scene_scripts + + def_callbacks + +WardensGranddaughter: + faceplayer + opentext + checkevent EVENT_TALKED_TO_WARDENS_GRANDDAUGHTER + iftrue .AlreadyMet + writetext WardensGranddaughterText1 + waitbutton + closetext + setevent EVENT_TALKED_TO_WARDENS_GRANDDAUGHTER + end +.AlreadyMet: + writetext WardensGranddaughterText2 + waitbutton + closetext + end + +WardenPhoto: + jumptext WardenPhotoText + +SafariZonePhoto: + jumptext SafariZonePhotoText + +WardensHomeBookshelf: + jumpstd PictureBookshelfScript + +WardensGranddaughterText1: + text "My grandpa is the" + line "SAFARI ZONE WAR-" + cont "DEN." + + para "At least he was…" + + para "He decided to go" + line "on a vacation and" + + para "took off overseas" + line "all by himself." + + para "He quit running" + line "SAFARI ZONE just" + cont "like that." + done + +WardensGranddaughterText2: + text "Many people were" + line "disappointed that" + + para "SAFARI ZONE closed" + line "down, but Grandpa" + cont "is so stubborn…" + done + +WardenPhotoText: + text "It's a photo of a" + line "grinning old man" + + para "who's surrounded" + line "by #MON." + done + +SafariZonePhotoText: + text "It's a photo of a" + line "huge grassy plain" + + para "with rare #MON" + line "frolicking in it." + done + +SafariZoneWardensHome_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, FUCHSIA_CITY, 6 + warp_event 3, 7, FUCHSIA_CITY, 6 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, WardensHomeBookshelf + bg_event 1, 1, BGEVENT_READ, WardensHomeBookshelf + bg_event 7, 0, BGEVENT_READ, WardenPhoto + bg_event 9, 0, BGEVENT_READ, SafariZonePhoto + + def_object_events + object_event 2, 4, SPRITE_LASS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, WardensGranddaughter, -1 diff --git a/maps/SaffronCity.asm b/maps/SaffronCity.asm new file mode 100644 index 0000000..7e19aac --- /dev/null +++ b/maps/SaffronCity.asm @@ -0,0 +1,306 @@ + object_const_def + const SAFFRONCITY_LASS1 + const SAFFRONCITY_POKEFAN_M + const SAFFRONCITY_COOLTRAINER_M + const SAFFRONCITY_COOLTRAINER_F + const SAFFRONCITY_FISHER + const SAFFRONCITY_YOUNGSTER1 + const SAFFRONCITY_YOUNGSTER2 + const SAFFRONCITY_LASS2 + +SaffronCity_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, SaffronCityFlypointCallback + +SaffronCityFlypointCallback: + setflag ENGINE_FLYPOINT_SAFFRON + endcallback + +SaffronCityLass1Script: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext SaffronCityLass1Text + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext SaffronCityLass1Text_ReturnedMachinePart + waitbutton + closetext + end + +SaffronCityPokefanMScript: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext SaffronCityPokefanMText + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext SaffronCityPokefanMText_ReturnedMachinePart + waitbutton + closetext + end + +SaffronCityCooltrainerMScript: + jumptextfaceplayer SaffronCityCooltrainerMText + +SaffronCityCooltrainerFScript: + jumptextfaceplayer SaffronCityCooltrainerFText + +SaffronCityFisherScript: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext SaffronCityFisherText + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext SaffronCityFisherText_ReturnedMachinePart + waitbutton + closetext + end + +SaffronCityYoungster1Script: + jumptextfaceplayer SaffronCityYoungster1Text + +SaffronCityYoungster2Script: + jumptextfaceplayer SaffronCityYoungster2Text + +SaffronCityLass2Script: + jumptextfaceplayer SaffronCityLass2Text + +SaffronCitySign: + jumptext SaffronCitySignText + +SaffronGymSign: + jumptext SaffronGymSignText + +FightingDojoSign: + jumptext FightingDojoSignText + +SilphCoSign: + jumptext SilphCoSignText + +MrPsychicsHouseSign: + jumptext MrPsychicsHouseSignText + +SaffronCityMagnetTrainStationSign: + jumptext SaffronCityMagnetTrainStationSignText + +SaffronCityPokecenterSign: + jumpstd PokecenterSignScript + +SaffronCityMartSign: + jumpstd MartSignScript + +SaffronCityLass1Text: + text "A little girl who" + line "is an expert at" + + para "mimicking people" + line "lives here." + + para "She even mimics" + line "the people she's" + + para "conversing with." + line "It's confusing." + done + +SaffronCityLass1Text_ReturnedMachinePart: + text "The COPYCAT girl" + line "looked unhappy." + + para "She said she lost" + line "her favorite #" + cont "DOLL--CLEFAIRY." + done + +SaffronCityPokefanMText: + text "You came out from" + line "JOHTO?" + + para "You can zip back" + line "home if the MAGNET" + cont "TRAIN's running." + done + +SaffronCityPokefanMText_ReturnedMachinePart: + text "You came out from" + line "JOHTO?" + + para "You can zip back" + line "home by hopping on" + cont "the MAGNET TRAIN." + done + +SaffronCityCooltrainerMText: + text "I went to the GYM," + line "raring for battles" + cont "against trainers…" + + para "It turns out, I" + line "stumbled into the" + + para "unused GYM next" + line "door." + + para "Boy, I was pretty" + line "embarrassed." + done + +SaffronCityCooltrainerFText: + text "This is SILPH CO.," + line "famous for #MON" + cont "merchandise." + + para "In the past, TEAM" + line "ROCKET wanted the" + + para "company because of" + line "that." + done + +SaffronCityFisherText: + text "Chew… Chew…" + + para "I hear there's big" + line "trouble brewing at" + cont "the POWER PLANT." + + para "Chew… Chew…" + done + +SaffronCityFisherText_ReturnedMachinePart: + text "Chew… Chew…" + + para "I hear there was" + line "big trouble at the" + cont "POWER PLANT." + + para "Chew… Chew…" + line "Haaah, I'm full!" + done + +SaffronCityYoungster1Text: + text "Going into an" + line "alley for the" + + para "first time makes" + line "me sorta anxious." + done + +SaffronCityYoungster2Text: + text "There's a place" + line "called TRAINER" + + para "HOUSE in VIRIDIAN" + line "where trainers" + + para "gather from all" + line "over the place." + done + +SaffronCityLass2Text: + text "Our city was" + line "featured on a" + cont "radio program." + + para "It's nice to hear" + line "praise for your" + + para "city, but it's a" + line "bit embarrassing" + cont "too." + done + +SaffronCitySignText: + text "SAFFRON CITY" + + para "Shining, Golden" + line "Land of Commerce" + done + +SaffronGymSignText: + text "SAFFRON CITY" + line "#MON GYM" + cont "LEADER: SABRINA" + + para "The Master of" + line "Psychic #MON!" + done + +FightingDojoSignText: + text "Everyone Welcome!" + line "FIGHTING DOJO" + done + +SilphCoSignText: + text "SILPH CO." + line "OFFICE BUILDING" + done + +MrPsychicsHouseSignText: + text "MR.PSYCHIC'S" + line "HOUSE" + done + +SaffronCityMagnetTrainStationSignText: + text "SAFFRON CITY" + line "MAGNET TRAIN" + cont "STATION" + done + +SaffronCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 26, 3, FIGHTING_DOJO, 1 + warp_event 34, 3, SAFFRON_GYM, 1 + warp_event 25, 11, SAFFRON_MART, 2 + warp_event 9, 29, SAFFRON_POKECENTER_1F, 1 + warp_event 27, 29, MR_PSYCHICS_HOUSE, 1 + warp_event 8, 3, SAFFRON_MAGNET_TRAIN_STATION, 2 + warp_event 18, 21, SILPH_CO_1F, 1 + warp_event 9, 11, COPYCATS_HOUSE_1F, 1 + warp_event 18, 3, ROUTE_5_SAFFRON_GATE, 3 + warp_event 0, 24, ROUTE_7_SAFFRON_GATE, 3 + warp_event 0, 25, ROUTE_7_SAFFRON_GATE, 4 + warp_event 16, 33, ROUTE_6_SAFFRON_GATE, 1 + warp_event 17, 33, ROUTE_6_SAFFRON_GATE, 2 + warp_event 39, 22, ROUTE_8_SAFFRON_GATE, 1 + warp_event 39, 23, ROUTE_8_SAFFRON_GATE, 2 + + def_coord_events + + def_bg_events + bg_event 21, 5, BGEVENT_READ, SaffronCitySign + bg_event 33, 5, BGEVENT_READ, SaffronGymSign + bg_event 25, 5, BGEVENT_READ, FightingDojoSign + bg_event 15, 21, BGEVENT_READ, SilphCoSign + bg_event 25, 29, BGEVENT_READ, MrPsychicsHouseSign + bg_event 11, 5, BGEVENT_READ, SaffronCityMagnetTrainStationSign + bg_event 10, 29, BGEVENT_READ, SaffronCityPokecenterSign + bg_event 26, 11, BGEVENT_READ, SaffronCityMartSign + + def_object_events + object_event 7, 14, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SaffronCityLass1Script, -1 + object_event 19, 30, SPRITE_POKEFAN_M, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, SaffronCityPokefanMScript, -1 + object_event 32, 7, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SaffronCityCooltrainerMScript, -1 + object_event 20, 24, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SaffronCityCooltrainerFScript, -1 + object_event 27, 12, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SaffronCityFisherScript, -1 + object_event 15, 19, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SaffronCityYoungster1Script, -1 + object_event 35, 22, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SaffronCityYoungster2Script, -1 + object_event 19, 8, SPRITE_LASS, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SaffronCityLass2Script, -1 diff --git a/maps/SaffronCity.blk b/maps/SaffronCity.blk new file mode 100644 index 0000000..aa4c0b9 --- /dev/null +++ b/maps/SaffronCity.blk @@ -0,0 +1,5 @@ + + + TT! ! T!   !ww7}:~7~7:~7~RRROVwwwV1wwV1wMNI################HMN' ! ! !1111 ! ! !'MN'7~|~7~ TT!|s7~7~'MN&######hi######"MN'UUUUUUhiUUUUUU'MN'U ! !UhiU ! !U'MN'UhihiUhiUhihiU'MN'U7~7~V7:}~w7~7~U'OP&################"'UUUUUUUUUUUUUUUU'cb' ! ! ! ! !U ! !U'MN'7~|r7~7~7~V|~7~U'MND################EMP ! ! !cb ! ! ! !QQ +7~7~7~ T!7~7~7~7~ + diff --git a/maps/SaffronGym.asm b/maps/SaffronGym.asm new file mode 100644 index 0000000..32f5010 --- /dev/null +++ b/maps/SaffronGym.asm @@ -0,0 +1,339 @@ + object_const_def + const SAFFRONGYM_SABRINA + const SAFFRONGYM_GRANNY1 + const SAFFRONGYM_YOUNGSTER1 + const SAFFRONGYM_GRANNY2 + const SAFFRONGYM_YOUNGSTER2 + const SAFFRONGYM_GYM_GUIDE + +SaffronGym_MapScripts: + def_scene_scripts + + def_callbacks + +SaffronGymSabrinaScript: + faceplayer + opentext + checkflag ENGINE_MARSHBADGE + iftrue .FightDone + writetext SabrinaIntroText + waitbutton + closetext + winlosstext SabrinaWinLossText, 0 + loadtrainer SABRINA, SABRINA1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_SABRINA + setevent EVENT_BEAT_MEDIUM_REBECCA + setevent EVENT_BEAT_MEDIUM_DORIS + setevent EVENT_BEAT_PSYCHIC_FRANKLIN + setevent EVENT_BEAT_PSYCHIC_JARED + opentext + writetext ReceivedMarshBadgeText + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_MARSHBADGE + writetext SabrinaMarshBadgeText + waitbutton + closetext + end + +.FightDone: + writetext SabrinaFightDoneText + waitbutton + closetext + end + +TrainerMediumRebecca: + trainer MEDIUM, REBECCA, EVENT_BEAT_MEDIUM_REBECCA, MediumRebeccaSeenText, MediumRebeccaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext MediumRebeccaAfterBattleText + waitbutton + closetext + end + +TrainerPsychicFranklin: + trainer PSYCHIC_T, FRANKLIN, EVENT_BEAT_PSYCHIC_FRANKLIN, PsychicFranklinSeenText, PsychicFranklinBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PsychicFranklinAfterBattleText + waitbutton + closetext + end + +TrainerMediumDoris: + trainer MEDIUM, DORIS, EVENT_BEAT_MEDIUM_DORIS, MediumDorisSeenText, MediumDorisBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext MediumDorisAfterBattleText + waitbutton + closetext + end + +TrainerPsychicJared: + trainer PSYCHIC_T, JARED, EVENT_BEAT_PSYCHIC_JARED, PsychicJaredSeenText, PsychicJaredBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PsychicJaredAfterBattleText + waitbutton + closetext + end + +SaffronGymGuideScript: + faceplayer + opentext + checkevent EVENT_BEAT_SABRINA + iftrue .SaffronGymGuideWinScript + writetext SaffronGymGuideText + waitbutton + closetext + end + +.SaffronGymGuideWinScript: + writetext SaffronGymGuideWinText + waitbutton + closetext + end + +SaffronGymStatue: + checkflag ENGINE_MARSHBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, SABRINA, SABRINA1 + jumpstd GymStatue2Script + +SabrinaIntroText: + text "SABRINA: I knew" + line "you were coming…" + + para "Three years ago I" + line "had a vision of" + cont "your arrival." + + para "You're after my" + line "BADGE." + + para "I don't enjoy bat-" + line "tling, but it's my" + + para "duty as a LEADER" + line "to confer BADGES" + + para "on anyone who has" + line "proven him- or" + cont "herself worthy." + + para "Since you wish it," + line "I will show you my" + cont "psychic powers!" + done + +SabrinaWinLossText: + text "SABRINA: Your" + line "power…" + + para "It far exceeds" + line "what I foresaw…" + + para "Maybe it isn't" + line "possible to fully" + + para "predict what the" + line "future holds…" + + para "OK, you win. You" + line "earned yourself" + cont "MARSHBADGE." + done + +ReceivedMarshBadgeText: + text " received" + line "MARSHBADGE." + done + +SabrinaMarshBadgeText: + text "SABRINA: MARSH-" + line "BADGE draws out" + + para "your subliminal" + line "powers…" + + para "Although I failed" + line "to accurately pre-" + cont "dict your power," + cont "this much I know" + cont "to be true." + + para "You will become a" + line "celebrated and" + cont "beloved CHAMPION!" + done + +SabrinaFightDoneText: + text "SABRINA: Your love" + line "for your #MON" + + para "overwhelmed my" + line "psychic power…" + + para "The power of love," + line "I think, is also a" + + para "kind of psychic" + line "power…" + done + +MediumRebeccaSeenText: + text "The power of all" + line "those you defeated" + cont "comes to me!" + done + +MediumRebeccaBeatenText: + text "Strong…" + line "Far too strong…" + done + +MediumRebeccaAfterBattleText: + text "What is the source" + line "of your power?" + done + +PsychicFranklinSeenText: + text "Psychic power is" + line "the power of your" + cont "soul." + done + +PsychicFranklinBeatenText: + text "Your soul has more" + line "power than mine!" + done + +PsychicFranklinAfterBattleText: + text "You made your soul" + line "stronger, not just" + cont "your abilities." + done + +MediumDorisSeenText: + text "Fufufufu…" + line "I see it clearly." + + para "I can see into" + line "your soul!" + done + +MediumDorisBeatenText: + text "Though I read you," + line "I still lost…" + done + +MediumDorisAfterBattleText: + text "Darn! I forgot" + line "that I predicted I" + cont "would lose to you." + done + +PsychicJaredSeenText: + text "The FIGHTING DOJO" + line "next door was once" + cont "this city's GYM." + done + +PsychicJaredBeatenText: + text "I was no match…" + done + +PsychicJaredAfterBattleText: + text "KARATE KING, the" + line "master of the" + + para "FIGHTING DOJO, was" + line "just destroyed by" + cont "SABRINA." + done + +SaffronGymGuideText: + text "Yo, CHAMP in" + line "making!" + + para "A trainer as" + line "skilled as you" + + para "doesn't need to be" + line "told how to deal" + + para "with psychic-type" + line "#MON, right?" + + para "I expect great" + line "things from you!" + + para "Good luck!" + done + +SaffronGymGuideWinText: + text "That was another" + line "fantastic battle!" + done + +SaffronGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 8, 17, SAFFRON_CITY, 2 + warp_event 9, 17, SAFFRON_CITY, 2 + warp_event 11, 15, SAFFRON_GYM, 18 + warp_event 19, 15, SAFFRON_GYM, 19 + warp_event 19, 11, SAFFRON_GYM, 20 + warp_event 1, 11, SAFFRON_GYM, 21 + warp_event 5, 3, SAFFRON_GYM, 22 + warp_event 11, 5, SAFFRON_GYM, 23 + warp_event 1, 15, SAFFRON_GYM, 24 + warp_event 19, 3, SAFFRON_GYM, 25 + warp_event 15, 17, SAFFRON_GYM, 26 + warp_event 5, 17, SAFFRON_GYM, 27 + warp_event 5, 9, SAFFRON_GYM, 28 + warp_event 9, 3, SAFFRON_GYM, 29 + warp_event 15, 9, SAFFRON_GYM, 30 + warp_event 15, 5, SAFFRON_GYM, 31 + warp_event 1, 5, SAFFRON_GYM, 32 + warp_event 19, 17, SAFFRON_GYM, 3 + warp_event 19, 9, SAFFRON_GYM, 4 + warp_event 1, 9, SAFFRON_GYM, 5 + warp_event 5, 5, SAFFRON_GYM, 6 + warp_event 11, 3, SAFFRON_GYM, 7 + warp_event 1, 17, SAFFRON_GYM, 8 + warp_event 19, 5, SAFFRON_GYM, 9 + warp_event 15, 15, SAFFRON_GYM, 10 + warp_event 5, 15, SAFFRON_GYM, 11 + warp_event 5, 11, SAFFRON_GYM, 12 + warp_event 9, 5, SAFFRON_GYM, 13 + warp_event 15, 11, SAFFRON_GYM, 14 + warp_event 15, 3, SAFFRON_GYM, 15 + warp_event 1, 3, SAFFRON_GYM, 16 + warp_event 11, 9, SAFFRON_GYM, 17 + + def_coord_events + + def_bg_events + bg_event 8, 15, BGEVENT_READ, SaffronGymStatue + + def_object_events + object_event 9, 8, SPRITE_SABRINA, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SaffronGymSabrinaScript, -1 + object_event 17, 16, SPRITE_GRANNY, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerMediumRebecca, -1 + object_event 3, 16, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPsychicFranklin, -1 + object_event 3, 4, SPRITE_GRANNY, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerMediumDoris, -1 + object_event 17, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPsychicJared, -1 + object_event 9, 14, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SaffronGymGuideScript, -1 diff --git a/maps/SaffronGym.blk b/maps/SaffronGym.blk new file mode 100644 index 0000000..6c5e10c --- /dev/null +++ b/maps/SaffronGym.blk @@ -0,0 +1,4 @@ +  +         +         +   6   $   \ No newline at end of file diff --git a/maps/SaffronMagnetTrainStation.asm b/maps/SaffronMagnetTrainStation.asm new file mode 100644 index 0000000..7158a7b --- /dev/null +++ b/maps/SaffronMagnetTrainStation.asm @@ -0,0 +1,234 @@ + object_const_def + const SAFFRONMAGNETTRAINSTATION_OFFICER + const SAFFRONMAGNETTRAINSTATION_GYM_GUIDE + const SAFFRONMAGNETTRAINSTATION_TEACHER + const SAFFRONMAGNETTRAINSTATION_LASS + +SaffronMagnetTrainStation_MapScripts: + def_scene_scripts + scene_script SaffronMagnetTrainStationNoopScene, SCENE_SAFFRONMAGNETTRAINSTATION_ARRIVE_FROM_GOLDENROD + + def_callbacks + +SaffronMagnetTrainStationNoopScene: + end + +SaffronMagnetTrainStationOfficerScript: + faceplayer + opentext + checkevent EVENT_RESTORED_POWER_TO_KANTO + iftrue .MagnetTrainToGoldenrod + writetext SaffronMagnetTrainStationOfficerTrainIsntOperatingText + waitbutton + closetext + end + +.MagnetTrainToGoldenrod: + writetext SaffronMagnetTrainStationOfficerAreYouComingOnBoardText + yesorno + iffalse .DecidedNotToRide + checkitem PASS + iffalse .PassNotInBag + writetext SaffronMagnetTrainStationOfficerRightThisWayText + waitbutton + closetext + applymovement SAFFRONMAGNETTRAINSTATION_OFFICER, SaffronMagnetTrainStationOfficerApproachTrainDoorMovement + applymovement PLAYER, SaffronMagnetTrainStationPlayerApproachAndEnterTrainMovement + setval TRUE + special MagnetTrain + warpcheck + newloadmap MAPSETUP_TRAIN + applymovement PLAYER, .MovementBoardTheTrain + wait 20 + end + +.MovementBoardTheTrain: + turn_head DOWN + step_end + +.PassNotInBag: + writetext SaffronMagnetTrainStationOfficerYouDontHaveAPassText + waitbutton + closetext + end + +.DecidedNotToRide: + writetext SaffronMagnetTrainStationOfficerHopeToSeeYouAgainText + waitbutton + closetext + end + +Script_ArriveFromGoldenrod: + applymovement SAFFRONMAGNETTRAINSTATION_OFFICER, SaffronMagnetTrainStationOfficerApproachTrainDoorMovement + applymovement PLAYER, SaffronMagnetTrainStationPlayerLeaveTrainAndEnterStationMovement + applymovement SAFFRONMAGNETTRAINSTATION_OFFICER, SaffronMagnetTrainStationOfficerReturnToBoardingGateMovement + opentext + writetext SaffronMagnetTrainStationOfficerArrivedInSaffronText + waitbutton + closetext + end + +SaffronMagnetTrainStationGymGuideScript: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .ReturnedMachinePart + writetext SaffronMagnetTrainStationGymGuideText + waitbutton + closetext + end + +.ReturnedMachinePart: + writetext SaffronMagnetTrainStationGymGuideText_ReturnedMachinePart + waitbutton + closetext + end + +SaffronMagnetTrainStationTeacherScript: + jumptextfaceplayer SaffronMagnetTrainStationTeacherText + +SaffronMagnetTrainStationLassScript: + jumptextfaceplayer SaffronMagnetTrainStationLassText + +SaffronMagnetTrainStationOfficerApproachTrainDoorMovement: + step UP + step UP + step RIGHT + turn_head LEFT + step_end + +SaffronMagnetTrainStationOfficerReturnToBoardingGateMovement: + step LEFT + step DOWN + step DOWN + step_end + +SaffronMagnetTrainStationPlayerApproachAndEnterTrainMovement: + step UP + step UP + step UP + step LEFT + step LEFT + step LEFT + step UP + step UP + step_end + +SaffronMagnetTrainStationPlayerLeaveTrainAndEnterStationMovement: + step LEFT + step LEFT + step DOWN + step DOWN + step DOWN + step DOWN + turn_head UP + step_end + +SaffronMagnetTrainStationOfficerTrainIsntOperatingText: + text "I'm sorry, but the" + line "MAGNET TRAIN isn't" + cont "operating now." + done + +SaffronMagnetTrainStationOfficerAreYouComingOnBoardText: + text "We'll soon depart" + line "for GOLDENROD." + + para "Are you coming on" + line "board?" + done + +SaffronMagnetTrainStationOfficerRightThisWayText: + text "May I see your" + line "rail PASS, please?" + + para "OK. Right this" + line "way, please." + done + +SaffronMagnetTrainStationOfficerYouDontHaveAPassText: + text "Sorry, but you" + line "don't have a PASS." + done + +SaffronMagnetTrainStationOfficerHopeToSeeYouAgainText: + text "We hope to see you" + line "again." + done + +SaffronMagnetTrainStationOfficerArrivedInSaffronText: + text "We have arrived in" + line "SAFFRON." + + para "We hope to see you" + line "again." + done + +SaffronMagnetTrainStationGymGuideText: + text "The MAGNET TRAIN" + line "is a super-modern" + + para "rail liner that" + line "uses electricity" + + para "and magnets to" + line "attain incredible" + cont "speed." + + para "However, if there" + line "isn't any elec-" + cont "tricity…" + done + +SaffronMagnetTrainStationGymGuideText_ReturnedMachinePart: + text "Whew…" + + para "How many times" + line "have I gone back" + + para "and forth between" + line "KANTO and JOHTO?" + done + +SaffronMagnetTrainStationTeacherText: + text "Before the MAGNET" + line "TRAIN STATION was" + + para "built, there was a" + line "house there." + + para "A little girl" + line "named COPYCAT used" + cont "to live there." + done + +SaffronMagnetTrainStationLassText: + text "Hi. Do you have a" + line "rail PASS? I have" + + para "one. All the peo-" + line "ple in SAFFRON who" + + para "ride the MAGNET" + line "TRAIN have PASSES." + done + +SaffronMagnetTrainStation_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 8, 17, SAFFRON_CITY, 6 + warp_event 9, 17, SAFFRON_CITY, 6 + warp_event 6, 5, GOLDENROD_MAGNET_TRAIN_STATION, 4 + warp_event 11, 5, GOLDENROD_MAGNET_TRAIN_STATION, 3 + + def_coord_events + coord_event 11, 6, SCENE_SAFFRONMAGNETTRAINSTATION_ARRIVE_FROM_GOLDENROD, Script_ArriveFromGoldenrod + + def_bg_events + + def_object_events + object_event 9, 9, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SaffronMagnetTrainStationOfficerScript, -1 + object_event 10, 14, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SaffronMagnetTrainStationGymGuideScript, -1 + object_event 6, 11, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SaffronMagnetTrainStationTeacherScript, EVENT_SAFFRON_TRAIN_STATION_POPULATION + object_event 6, 10, SPRITE_LASS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SaffronMagnetTrainStationLassScript, EVENT_SAFFRON_TRAIN_STATION_POPULATION diff --git a/maps/SaffronMagnetTrainStation.blk b/maps/SaffronMagnetTrainStation.blk new file mode 100644 index 0000000..bdca20f --- /dev/null +++ b/maps/SaffronMagnetTrainStation.blk @@ -0,0 +1,6 @@ + + + + + + /  3  \ No newline at end of file diff --git a/maps/SaffronMart.asm b/maps/SaffronMart.asm new file mode 100644 index 0000000..9bd6a2f --- /dev/null +++ b/maps/SaffronMart.asm @@ -0,0 +1,52 @@ + object_const_def + const SAFFRONMART_CLERK + const SAFFRONMART_COOLTRAINER_M + const SAFFRONMART_COOLTRAINER_F + +SaffronMart_MapScripts: + def_scene_scripts + + def_callbacks + +SaffronMartClerkScript: + opentext + pokemart MARTTYPE_STANDARD, MART_SAFFRON + closetext + end + +SaffronMartCooltrainerMScript: + jumptextfaceplayer SaffronMartCooltrainerMText + +SaffronMartCooltrainerFScript: + jumptextfaceplayer SaffronMartCooltrainerFText + +SaffronMartCooltrainerMText: + text "There's a big" + line "RADIO TOWER in" + cont "LAVENDER." + done + +SaffronMartCooltrainerFText: + text "I want to become" + line "stronger, but I'm" + cont "not good yet…" + + para "Could you show me" + line "how sometime?" + done + +SaffronMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, SAFFRON_CITY, 3 + warp_event 3, 7, SAFFRON_CITY, 3 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SaffronMartClerkScript, -1 + object_event 7, 2, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, SaffronMartCooltrainerMScript, -1 + object_event 7, 6, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SaffronMartCooltrainerFScript, -1 diff --git a/maps/SaffronPokecenter1F.asm b/maps/SaffronPokecenter1F.asm new file mode 100644 index 0000000..a7d483d --- /dev/null +++ b/maps/SaffronPokecenter1F.asm @@ -0,0 +1,128 @@ + object_const_def + const SAFFRONPOKECENTER1F_NURSE + const SAFFRONPOKECENTER1F_TEACHER + const SAFFRONPOKECENTER1F_FISHER + const SAFFRONPOKECENTER1F_YOUNGSTER + +SaffronPokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +SaffronPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +SaffronPokecenter1FTeacherScript: + special Mobile_DummyReturnFalse + iftrue .mobile + jumptextfaceplayer SaffronPokecenter1FTeacherText + +.mobile + jumptextfaceplayer SaffronPokecenter1FTeacherMobileText + +SaffronPokecenter1FFisherScript: + faceplayer + opentext + checkevent EVENT_RETURNED_MACHINE_PART + iftrue .SolvedKantoPowerCrisis + writetext SaffronPokecenter1FFisherText + waitbutton + closetext + end + +.SolvedKantoPowerCrisis: + writetext SaffronPokecenter1FFisherReturnedMachinePartText + waitbutton + closetext + end + +SaffronPokecenter1FYoungsterScript: + jumptextfaceplayer SaffronPokecenter1FYoungsterText + +SaffronPokecenter1FTeacherText: + text "What are JOHTO's" + line "#MON CENTERS" + cont "like?" + + para "…Oh, I see. So" + line "they're not much" + + para "different from the" + line "ones in KANTO." + + para "I can go to JOHTO" + line "without worrying," + cont "then!" + done + +SaffronPokecenter1FTeacherMobileText: + text "What are JOHTO's" + line "#MON CENTERS" + cont "like?" + + para "…Oh, I see." + line "So they let you" + + para "link with people" + line "far away?" + + para "Then I'll get my" + line "friend in JOHTO to" + + para "catch a MARILL and" + line "trade it to me!" + done + +SaffronPokecenter1FFisherText: + text "I just happened to" + line "come through ROCK" + + para "TUNNEL. There was" + line "some commotion at" + cont "the POWER PLANT." + done + +SaffronPokecenter1FFisherReturnedMachinePartText: + text "Caves collapse" + line "easily." + + para "Several caves have" + line "disappeared in the" + + para "past few years," + line "like the one out-" + cont "side CERULEAN." + + para "As a pro HIKER," + line "that's common" + cont "knowledge." + done + +SaffronPokecenter1FYoungsterText: + text "SILPH CO.'s HEAD" + line "OFFICE and the" + + para "MAGNET TRAIN STA-" + line "TION--they're the" + + para "places to see in" + line "SAFFRON." + done + +SaffronPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, SAFFRON_CITY, 4 + warp_event 4, 7, SAFFRON_CITY, 4 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SaffronPokecenter1FNurseScript, -1 + object_event 7, 2, SPRITE_TEACHER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, SaffronPokecenter1FTeacherScript, -1 + object_event 8, 6, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SaffronPokecenter1FFisherScript, -1 + object_event 1, 4, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SaffronPokecenter1FYoungsterScript, -1 diff --git a/maps/SaffronPokecenter2FBeta.asm b/maps/SaffronPokecenter2FBeta.asm new file mode 100644 index 0000000..0e520a5 --- /dev/null +++ b/maps/SaffronPokecenter2FBeta.asm @@ -0,0 +1,16 @@ +SaffronPokecenter2FBeta_MapScripts: + def_scene_scripts + + def_callbacks + +SaffronPokecenter2FBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 7, SAFFRON_POKECENTER_1F, 3 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/SeafoamGym.asm b/maps/SeafoamGym.asm new file mode 100644 index 0000000..4606db4 --- /dev/null +++ b/maps/SeafoamGym.asm @@ -0,0 +1,170 @@ + object_const_def + const SEAFOAMGYM_BLAINE + const SEAFOAMGYM_GYM_GUIDE + +SeafoamGym_MapScripts: + def_scene_scripts + scene_script SeafoamGymNoopScene ; unusable + + def_callbacks + +SeafoamGymNoopScene: + end + +SeafoamGymBlaineScript: + faceplayer + opentext + checkflag ENGINE_VOLCANOBADGE + iftrue .FightDone + writetext BlaineIntroText + waitbutton + closetext + winlosstext BlaineWinLossText, 0 + loadtrainer BLAINE, BLAINE1 + startbattle + iftrue .ReturnAfterBattle + appear SEAFOAMGYM_GYM_GUIDE +.ReturnAfterBattle: + reloadmapafterbattle + setevent EVENT_BEAT_BLAINE + opentext + writetext ReceivedVolcanoBadgeText + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_VOLCANOBADGE + writetext BlaineAfterBattleText + waitbutton + closetext + end + +.FightDone: + writetext BlaineFightDoneText + waitbutton + closetext + end + +SeafoamGymGuideScript: + faceplayer + opentext + checkevent EVENT_TALKED_TO_SEAFOAM_GYM_GUIDE_ONCE + iftrue .TalkedToSeafoamGymGuideScript + writetext SeafoamGymGuideWinText + waitbutton + closetext + setevent EVENT_TALKED_TO_SEAFOAM_GYM_GUIDE_ONCE + end + +.TalkedToSeafoamGymGuideScript: + writetext SeafoamGymGuideWinText2 + waitbutton + closetext + end + +BlaineIntroText: + text "BLAINE: Waaah!" + + para "My GYM in CINNABAR" + line "burned down." + + para "My fire-breathing" + line "#MON and I are" + + para "homeless because" + line "of the volcano." + + para "Waaah!" + + para "But I'm back in" + line "business as a GYM" + + para "LEADER here in" + line "this cave." + + para "If you can beat" + line "me, I'll give you" + cont "a BADGE." + + para "Ha! You'd better" + line "have BURN HEAL!" + done + +BlaineWinLossText: + text "BLAINE: Awesome." + line "I've burned out…" + + para "You've earned" + line "VOLCANOBADGE!" + done + +ReceivedVolcanoBadgeText: + text " received" + line "VOLCANOBADGE." + done + +BlaineAfterBattleText: + text "BLAINE: I did lose" + line "this time, but I'm" + + para "going to win the" + line "next time." + + para "When I rebuild my" + line "CINNABAR GYM," + + para "we'll have to have" + line "a rematch." + done + +BlaineFightDoneText: + text "BLAINE: My fire" + line "#MON will be" + + para "even stronger." + line "Just you watch!" + done + +SeafoamGymGuideWinText: + text "Yo!" + + para "… Huh? It's over" + line "already?" + + para "Sorry, sorry!" + + para "CINNABAR GYM was" + line "gone, so I didn't" + + para "know where to find" + line "you." + + para "But, hey, you're" + line "plenty strong even" + + para "without my advice." + line "I knew you'd win!" + done + +SeafoamGymGuideWinText2: + text "A #MON GYM can" + line "be anywhere as" + + para "long as the GYM" + line "LEADER is there." + + para "There's no need" + line "for a building." + done + +SeafoamGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 5, ROUTE_20, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 2, SPRITE_BLAINE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, SeafoamGymBlaineScript, -1 + object_event 6, 5, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SeafoamGymGuideScript, EVENT_SEAFOAM_GYM_GYM_GUIDE diff --git a/maps/SeafoamGym.blk b/maps/SeafoamGym.blk new file mode 100644 index 0000000..0f3609d --- /dev/null +++ b/maps/SeafoamGym.blk @@ -0,0 +1,3 @@ +  + +)$* # \ No newline at end of file diff --git a/maps/SilphCo1F.asm b/maps/SilphCo1F.asm new file mode 100644 index 0000000..5edaffe --- /dev/null +++ b/maps/SilphCo1F.asm @@ -0,0 +1,69 @@ + object_const_def + const SILPHCO1F_RECEPTIONIST + const SILPHCO1F_OFFICER + +SilphCo1F_MapScripts: + def_scene_scripts + + def_callbacks + +SilphCoReceptionistScript: + jumptextfaceplayer SilphCoReceptionistText + +SilphCoOfficerScript: + faceplayer + opentext + checkevent EVENT_GOT_UP_GRADE + iftrue .GotUpGrade + writetext SilphCoOfficerText + promptbutton + verbosegiveitem UP_GRADE + iffalse .NoRoom + setevent EVENT_GOT_UP_GRADE +.GotUpGrade: + writetext SilphCoOfficerText_GotUpGrade + waitbutton +.NoRoom: + closetext + end + +SilphCoReceptionistText: + text "Welcome. This is" + line "SILPH CO.'s HEAD" + cont "OFFICE BUILDING." + done + +SilphCoOfficerText: + text "Only employees are" + line "permitted to go" + cont "upstairs." + + para "But since you came" + line "such a long way," + + para "have this neat" + line "little souvenir." + done + +SilphCoOfficerText_GotUpGrade: + text "It's SILPH CO.'s" + line "latest product." + + para "It's not for sale" + line "anywhere yet." + done + +SilphCo1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, SAFFRON_CITY, 7 + warp_event 3, 7, SAFFRON_CITY, 7 + + def_coord_events + + def_bg_events + + def_object_events + object_event 4, 2, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SilphCoReceptionistScript, -1 + object_event 13, 1, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SilphCoOfficerScript, -1 diff --git a/maps/SilphCo1F.blk b/maps/SilphCo1F.blk new file mode 100644 index 0000000..fdc4ff5 --- /dev/null +++ b/maps/SilphCo1F.blk @@ -0,0 +1 @@ +5544?---  \ No newline at end of file diff --git a/maps/SilverCaveItemRooms.asm b/maps/SilverCaveItemRooms.asm new file mode 100644 index 0000000..dd9323f --- /dev/null +++ b/maps/SilverCaveItemRooms.asm @@ -0,0 +1,29 @@ + object_const_def + const SILVERCAVEITEMROOMS_POKE_BALL1 + const SILVERCAVEITEMROOMS_POKE_BALL2 + +SilverCaveItemRooms_MapScripts: + def_scene_scripts + + def_callbacks + +SilverCaveItemRoomsMaxRevive: + itemball MAX_REVIVE + +SilverCaveItemRoomsFullRestore: + itemball FULL_RESTORE + +SilverCaveItemRooms_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 13, 3, SILVER_CAVE_ROOM_2, 3 + warp_event 7, 15, SILVER_CAVE_ROOM_2, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 6, 3, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveItemRoomsMaxRevive, EVENT_SILVER_CAVE_ITEM_ROOMS_MAX_REVIVE + object_event 15, 11, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveItemRoomsFullRestore, EVENT_SILVER_CAVE_ITEM_ROOMS_FULL_RESTORE diff --git a/maps/SilverCaveItemRooms.blk b/maps/SilverCaveItemRooms.blk new file mode 100644 index 0000000..f2902c2 --- /dev/null +++ b/maps/SilverCaveItemRooms.blk @@ -0,0 +1,5 @@ +   +$ #   + + +$ # \ No newline at end of file diff --git a/maps/SilverCaveOutside.asm b/maps/SilverCaveOutside.asm new file mode 100644 index 0000000..1fdd12f --- /dev/null +++ b/maps/SilverCaveOutside.asm @@ -0,0 +1,38 @@ +SilverCaveOutside_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, SilverCaveOutsideFlypointCallback + +SilverCaveOutsideFlypointCallback: + setflag ENGINE_FLYPOINT_SILVER_CAVE + endcallback + +MtSilverPokecenterSign: + jumpstd PokecenterSignScript + +MtSilverSign: + jumptext MtSilverSignText + +SilverCaveOutsideHiddenFullRestore: + hiddenitem FULL_RESTORE, EVENT_SILVER_CAVE_OUTSIDE_HIDDEN_FULL_RESTORE + +MtSilverSignText: + text "MT.SILVER" + done + +SilverCaveOutside_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 23, 19, SILVER_CAVE_POKECENTER_1F, 1 + warp_event 18, 11, SILVER_CAVE_ROOM_1, 1 + + def_coord_events + + def_bg_events + bg_event 24, 19, BGEVENT_READ, MtSilverPokecenterSign + bg_event 17, 13, BGEVENT_READ, MtSilverSign + bg_event 9, 25, BGEVENT_ITEM, SilverCaveOutsideHiddenFullRestore + + def_object_events diff --git a/maps/SilverCaveOutside.blk b/maps/SilverCaveOutside.blk new file mode 100644 index 0000000..87a67df --- /dev/null +++ b/maps/SilverCaveOutside.blk @@ -0,0 +1,14 @@ +,,),,),,,$WW*,,,,,,,,,),,),,,,,,(,,,,,,,WW%,,),,,,,,$WWW*,,,,,,,,)+WWW*,,,,,$WWW,,,,,)),,,$W*,,,,,WWWWW%)+WW*$WW*,,,,,,,,,))1(,,,(,,+W,,,,,+%)1 +$W*,$W*),,,,,,)+% +  !(,,,$%,WWWWW%) |r$WWWWWW,,,,,,) X11Z/lll,+WWWW% Z/o +`,) +Y + + + 5ln,)/[ e-/,) + e- + + X ,,??????????; Z[ + ?????????;,,) + + >,,,,,,,,,),,,??????, \ No newline at end of file diff --git a/maps/SilverCavePokecenter1F.asm b/maps/SilverCavePokecenter1F.asm new file mode 100644 index 0000000..8d2d3b6 --- /dev/null +++ b/maps/SilverCavePokecenter1F.asm @@ -0,0 +1,44 @@ + object_const_def + const SILVERCAVEPOKECENTER1F_NURSE + const SILVERCAVEPOKECENTER1F_GRANNY + +SilverCavePokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +SilverCavePokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +SilverCavePokecenter1FGrannyScript: + jumptextfaceplayer SilverCavePokecenter1FGrannyText + +SilverCavePokecenter1FGrannyText: + text "Trainers who seek" + line "power climb MT." + + para "SILVER despite its" + line "many dangers…" + + para "With their trusted" + line "#MON, they must" + + para "feel they can go" + line "anywhere…" + done + +SilverCavePokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, SILVER_CAVE_OUTSIDE, 1 + warp_event 4, 7, SILVER_CAVE_OUTSIDE, 1 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SilverCavePokecenter1FNurseScript, -1 + object_event 1, 5, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_LEFT, 2, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SilverCavePokecenter1FGrannyScript, -1 diff --git a/maps/SilverCaveRoom1.asm b/maps/SilverCaveRoom1.asm new file mode 100644 index 0000000..944b3a2 --- /dev/null +++ b/maps/SilverCaveRoom1.asm @@ -0,0 +1,47 @@ + object_const_def + const SILVERCAVEROOM1_POKE_BALL1 + const SILVERCAVEROOM1_POKE_BALL2 + const SILVERCAVEROOM1_POKE_BALL3 + const SILVERCAVEROOM1_POKE_BALL4 + +SilverCaveRoom1_MapScripts: + def_scene_scripts + + def_callbacks + +SilverCaveRoom1MaxElixer: + itemball MAX_ELIXER + +SilverCaveRoom1Protein: + itemball PROTEIN + +SilverCaveRoom1EscapeRope: + itemball ESCAPE_ROPE + +SilverCaveRoom1UltraBall: + itemball ULTRA_BALL + +SilverCaveRoom1HiddenDireHit: + hiddenitem DIRE_HIT, EVENT_SILVER_CAVE_ROOM_1_HIDDEN_DIRE_HIT + +SilverCaveRoom1HiddenUltraBall: + hiddenitem ULTRA_BALL, EVENT_SILVER_CAVE_ROOM_1_HIDDEN_ULTRA_BALL + +SilverCaveRoom1_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 33, SILVER_CAVE_OUTSIDE, 2 + warp_event 15, 1, SILVER_CAVE_ROOM_2, 1 + + def_coord_events + + def_bg_events + bg_event 16, 23, BGEVENT_ITEM, SilverCaveRoom1HiddenDireHit + bg_event 17, 12, BGEVENT_ITEM, SilverCaveRoom1HiddenUltraBall + + def_object_events + object_event 4, 9, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom1MaxElixer, EVENT_SILVER_CAVE_ROOM_1_MAX_ELIXER + object_event 15, 29, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom1Protein, EVENT_SILVER_CAVE_ROOM_1_PROTEIN + object_event 5, 30, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom1EscapeRope, EVENT_SILVER_CAVE_ROOM_1_ESCAPE_ROPE + object_event 7, 18, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom1UltraBall, EVENT_SILVER_CAVE_ROOM_1_ULTRA_BALL diff --git a/maps/SilverCaveRoom1.blk b/maps/SilverCaveRoom1.blk new file mode 100644 index 0000000..80fd1e9 --- /dev/null +++ b/maps/SilverCaveRoom1.blk @@ -0,0 +1,22 @@ +   +( +  6 +99 +(+! ++ * +99 0  + +!!!* +  +9  + 69  + +  + 99 +  +) +* 699 +9+! +  +99:   +!!!$+!!" # \ No newline at end of file diff --git a/maps/SilverCaveRoom2.asm b/maps/SilverCaveRoom2.asm new file mode 100644 index 0000000..07a2c2c --- /dev/null +++ b/maps/SilverCaveRoom2.asm @@ -0,0 +1,40 @@ + object_const_def + const SILVERCAVEROOM2_POKE_BALL1 + const SILVERCAVEROOM2_POKE_BALL2 + const SILVERCAVEROOM2_POKE_BALL3 + +SilverCaveRoom2_MapScripts: + def_scene_scripts + + def_callbacks + +SilverCaveRoom2Calcium: + itemball CALCIUM + +SilverCaveRoom2UltraBall: + itemball ULTRA_BALL + +SilverCaveRoom2PPUp: + itemball PP_UP + +SilverCaveRoom2HiddenMaxPotion: + hiddenitem MAX_POTION, EVENT_SILVER_CAVE_ROOM_2_HIDDEN_MAX_POTION + +SilverCaveRoom2_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 17, 31, SILVER_CAVE_ROOM_1, 2 + warp_event 11, 5, SILVER_CAVE_ROOM_3, 1 + warp_event 13, 21, SILVER_CAVE_ITEM_ROOMS, 1 + warp_event 23, 3, SILVER_CAVE_ITEM_ROOMS, 2 + + def_coord_events + + def_bg_events + bg_event 14, 31, BGEVENT_ITEM, SilverCaveRoom2HiddenMaxPotion + + def_object_events + object_event 24, 10, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom2Calcium, EVENT_SILVER_CAVE_ROOM_2_CALCIUM + object_event 22, 24, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom2UltraBall, EVENT_SILVER_CAVE_ROOM_2_ULTRA_BALL + object_event 4, 20, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SilverCaveRoom2PPUp, EVENT_SILVER_CAVE_ROOM_2_PP_UP diff --git a/maps/SilverCaveRoom2.blk b/maps/SilverCaveRoom2.blk new file mode 100644 index 0000000..19e352b --- /dev/null +++ b/maps/SilverCaveRoom2.blk @@ -0,0 +1,26 @@ + +,,-.. +  + +,,-.. +-.7. + +,,-7. + +     +-/./ -/ +-/./  -/,, -/./ +-/,,-/ -/ + +   + +-  +  + )-..7. +- +-/'' + - +-  +     *-./ +-/,,,-/$$$$-./ +%)$$$$ # \ No newline at end of file diff --git a/maps/SilverCaveRoom3.asm b/maps/SilverCaveRoom3.asm new file mode 100644 index 0000000..f471bd8 --- /dev/null +++ b/maps/SilverCaveRoom3.asm @@ -0,0 +1,62 @@ + object_const_def + const SILVERCAVEROOM3_RED + +SilverCaveRoom3_MapScripts: + def_scene_scripts + + def_callbacks + +Red: + special FadeOutMusic + faceplayer + opentext + writetext RedSeenText + waitbutton + closetext + winlosstext RedWinLossText, RedWinLossText + loadtrainer RED, RED1 + startbattle + dontrestartmapmusic + reloadmapafterbattle + special FadeOutMusic + opentext + writetext RedLeavesText + waitbutton + closetext + special FadeBlackQuickly + special ReloadSpritesNoPalettes + disappear SILVERCAVEROOM3_RED + pause 15 + special FadeInQuickly + pause 30 + special HealParty + refreshscreen + credits + end + +RedSeenText: + text "<……>" + line "<……>" + done + +RedWinLossText: + text "…" + done + +RedLeavesText: + text "<……>" + line "<……>" + done + +SilverCaveRoom3_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 33, SILVER_CAVE_ROOM_2, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 9, 10, SPRITE_RED, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Red, EVENT_RED_IN_MT_SILVER diff --git a/maps/SilverCaveRoom3.blk b/maps/SilverCaveRoom3.blk new file mode 100644 index 0000000..46c42fc --- /dev/null +++ b/maps/SilverCaveRoom3.blk @@ -0,0 +1,13 @@ +   ....  + +/....- + /- -/ +-/-/   +-/-/  -/-/- /-/-- +//-- +//- +/ + + +  6 +$$ # \ No newline at end of file diff --git a/maps/SlowpokeWellB1F.asm b/maps/SlowpokeWellB1F.asm new file mode 100644 index 0000000..4a187fc --- /dev/null +++ b/maps/SlowpokeWellB1F.asm @@ -0,0 +1,341 @@ + object_const_def + const SLOWPOKEWELLB1F_ROCKET1 + const SLOWPOKEWELLB1F_ROCKET2 + const SLOWPOKEWELLB1F_ROCKET3 + const SLOWPOKEWELLB1F_ROCKET_GIRL + const SLOWPOKEWELLB1F_SLOWPOKE1 + const SLOWPOKEWELLB1F_SLOWPOKE2 + const SLOWPOKEWELLB1F_KURT + const SLOWPOKEWELLB1F_BOULDER + const SLOWPOKEWELLB1F_POKE_BALL + +SlowpokeWellB1F_MapScripts: + def_scene_scripts + + def_callbacks + +SlowpokeWellB1FKurtScript: + jumptextfaceplayer SlowpokeWellB1FKurtText + +TrainerGruntM29: + trainer GRUNTM, GRUNTM_29, EVENT_BEAT_ROCKET_GRUNTM_29, GruntM29SeenText, GruntM29BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM29AfterBattleText + waitbutton + closetext + end + +TrainerGruntM1: + trainer GRUNTM, GRUNTM_1, EVENT_BEAT_ROCKET_GRUNTM_1, GruntM1SeenText, GruntM1BeatenText, 0, .Script + +.Script: + opentext + writetext TrainerGruntM1WhenTalkText + waitbutton + closetext + special FadeBlackQuickly + special ReloadSpritesNoPalettes + disappear SLOWPOKEWELLB1F_ROCKET1 + disappear SLOWPOKEWELLB1F_ROCKET2 + disappear SLOWPOKEWELLB1F_ROCKET3 + disappear SLOWPOKEWELLB1F_ROCKET_GIRL + pause 15 + special FadeInQuickly + disappear SLOWPOKEWELLB1F_KURT + moveobject SLOWPOKEWELLB1F_KURT, 11, 6 + appear SLOWPOKEWELLB1F_KURT + applymovement SLOWPOKEWELLB1F_KURT, KurtSlowpokeWellVictoryMovementData + turnobject PLAYER, RIGHT + opentext + writetext KurtLeaveSlowpokeWellText + waitbutton + closetext + setevent EVENT_CLEARED_SLOWPOKE_WELL + variablesprite SPRITE_AZALEA_ROCKET, SPRITE_RIVAL + setmapscene AZALEA_TOWN, SCENE_AZALEATOWN_RIVAL_BATTLE + clearevent EVENT_ILEX_FOREST_APPRENTICE + clearevent EVENT_ILEX_FOREST_FARFETCHD + setevent EVENT_CHARCOAL_KILN_FARFETCH_D + setevent EVENT_CHARCOAL_KILN_APPRENTICE + setevent EVENT_SLOWPOKE_WELL_SLOWPOKES + setevent EVENT_SLOWPOKE_WELL_KURT + clearevent EVENT_AZALEA_TOWN_SLOWPOKES + clearevent EVENT_KURTS_HOUSE_SLOWPOKE + clearevent EVENT_KURTS_HOUSE_KURT_1 + special FadeOutPalettes + special HealParty + pause 15 + warp KURTS_HOUSE, 3, 3 + end + +TrainerGruntM2: + trainer GRUNTM, GRUNTM_2, EVENT_BEAT_ROCKET_GRUNTM_2, GruntM2SeenText, GruntM2BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM2AfterBattleText + waitbutton + closetext + end + +TrainerGruntF1: + trainer GRUNTF, GRUNTF_1, EVENT_BEAT_ROCKET_GRUNTF_1, GruntF1SeenText, GruntF1BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntF1AfterBattleText + waitbutton + closetext + end + +SlowpokeWellB1FSlowpokeWithMailScript: + faceplayer + opentext + cry SLOWPOKE + writetext SlowpokeWellB1FSlowpokeWithMailText + yesorno + iftrue .ReadMail + closetext + end + +.ReadMail: + writetext SlowpokeWellB1FSlowpokeMailText + waitbutton + closetext + end + +SlowpokeWellB1FTaillessSlowpokeScript: + faceplayer + opentext + writetext SlowpokeWellB1FTaillessSlowpokeText + cry SLOWPOKE + waitbutton + closetext + end + +SlowpokeWellB1FBoulder: + jumpstd StrengthBoulderScript + +SlowpokeWellB1FSuperPotion: + itemball SUPER_POTION + +KurtSlowpokeWellVictoryMovementData: + step LEFT + step LEFT + step LEFT + step LEFT + step UP + step_sleep 8 + step_sleep 8 + step_sleep 8 + step LEFT + step UP + step UP + step_sleep 8 + step_sleep 8 + step_sleep 8 + turn_head LEFT + step_end + +SlowpokeWellB1FKurtText: + text "KURT: Hey there," + line "!" + + para "The guard up top" + line "took off when I" + cont "shouted at him." + + para "But then I took a" + line "tumble down the" + cont "WELL." + + para "I slammed down" + line "hard on my back," + cont "so I can't move." + + para "Rats! If I were" + line "fit, my #MON" + + para "would've punished" + line "them…" + + para "Ah, it can't be" + line "helped." + + para ", show them" + line "how gutsy you are" + cont "in my place!" + done + +KurtLeaveSlowpokeWellText: + text "KURT: Way to go," + line "!" + + para "TEAM ROCKET has" + line "taken off." + + para "My back's better" + line "too. Let's get out" + cont "of here." + done + +GruntM29SeenText: + text "Darn! I was stand-" + line "ing guard up top" + + para "when some old coot" + line "yelled at me." + + para "He startled me so" + line "much that I fell" + cont "down here." + + para "I think I'll vent" + line "my anger by taking" + cont "it out on you!" + done + +GruntM29BeatenText: + text "Arrgh! This is NOT" + line "my day!" + done + +GruntM29AfterBattleText: + text "Sure, we've been" + line "hacking the tails" + + para "off SLOWPOKE and" + line "selling them." + + para "Everything we do" + line "is for profit." + + para "That's right!" + line "We're TEAM ROCKET," + + para "and we'll do any-" + line "thing for money!" + done + +GruntM1SeenText: + text "What do you want?" + + para "If you interrupt" + line "our work, don't" + cont "expect any mercy!" + done + +GruntM1BeatenText: + text "You did OK today," + line "but wait till next" + cont "time!" + done + +TrainerGruntM1WhenTalkText: + text "Yeah, TEAM ROCKET" + line "was broken up" + cont "three years ago." + + para "But we continued" + line "our activities" + cont "underground." + + para "Now you can have" + line "fun watching us" + cont "stir up trouble!" + done + +GruntM2SeenText: + text "Quit taking SLOW-" + line "POKETAILS?" + + para "If we obeyed you," + line "TEAM ROCKET's rep" + cont "would be ruined!" + done + +GruntM2BeatenText: + text "Just…" + line "Too strong…" + done + +GruntM2AfterBattleText: + text "We need the money," + line "but selling SLOW-" + cont "POKETAILS?" + + para "It's tough being a" + line "ROCKET GRUNT!" + done + +GruntF1SeenText: + text "Stop taking TAILS?" + + para "Yeah, just try to" + line "defeat all of us!" + done + +GruntF1BeatenText: + text "You rotten brat!" + done + +GruntF1AfterBattleText: + text "SLOWPOKETAILS" + line "grow back fast!" + + para "What's wrong with" + line "selling them?" + done + +SlowpokeWellB1FSlowpokeWithMailText: + text "A SLOWPOKE with" + line "its TAIL cut off…" + + para "Huh? It has MAIL." + line "Read it?" + done + +SlowpokeWellB1FSlowpokeMailText: + text " read the" + line "MAIL." + + para "Be good and look" + line "after the house" + + para "with Grandpa and" + line "SLOWPOKE." + + para "Love, Dad" + done + +SlowpokeWellB1FTaillessSlowpokeText: + text "A SLOWPOKE with" + line "its TAIL cut off…" + done + +SlowpokeWellB1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 17, 15, AZALEA_TOWN, 6 + warp_event 7, 11, SLOWPOKE_WELL_B2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 15, 7, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM29, EVENT_SLOWPOKE_WELL_ROCKETS + object_event 5, 2, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 1, TrainerGruntM1, EVENT_SLOWPOKE_WELL_ROCKETS + object_event 5, 6, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerGruntM2, EVENT_SLOWPOKE_WELL_ROCKETS + object_event 10, 4, SPRITE_ROCKET_GIRL, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerGruntF1, EVENT_SLOWPOKE_WELL_ROCKETS + object_event 7, 4, SPRITE_SLOWPOKE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SlowpokeWellB1FSlowpokeWithMailScript, EVENT_SLOWPOKE_WELL_SLOWPOKES + object_event 6, 2, SPRITE_SLOWPOKE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, SlowpokeWellB1FTaillessSlowpokeScript, EVENT_SLOWPOKE_WELL_SLOWPOKES + object_event 16, 14, SPRITE_KURT, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SlowpokeWellB1FKurtScript, EVENT_SLOWPOKE_WELL_KURT + object_event 3, 2, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SlowpokeWellB1FBoulder, -1 + object_event 10, 3, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SlowpokeWellB1FSuperPotion, EVENT_SLOWPOKE_WELL_B1F_SUPER_POTION diff --git a/maps/SlowpokeWellB1F.blk b/maps/SlowpokeWellB1F.blk new file mode 100644 index 0000000..d6f3c21 --- /dev/null +++ b/maps/SlowpokeWellB1F.blk @@ -0,0 +1,8 @@ +  +) +  6 +) !!!  ++ + )  +' % +%  \ No newline at end of file diff --git a/maps/SlowpokeWellB2F.asm b/maps/SlowpokeWellB2F.asm new file mode 100644 index 0000000..f9c8ff2 --- /dev/null +++ b/maps/SlowpokeWellB2F.asm @@ -0,0 +1,74 @@ + object_const_def + const SLOWPOKEWELLB2F_GYM_GUIDE + const SLOWPOKEWELLB2F_POKE_BALL + +SlowpokeWellB2F_MapScripts: + def_scene_scripts + + def_callbacks + +SlowpokeWellB2FGymGuideScript: + faceplayer + opentext + checkevent EVENT_GOT_KINGS_ROCK_IN_SLOWPOKE_WELL + iftrue .GotKingsRock + writetext SlowpokeWellB2FGymGuideText + promptbutton + verbosegiveitem KINGS_ROCK + iffalse .NoRoom + setevent EVENT_GOT_KINGS_ROCK_IN_SLOWPOKE_WELL +.NoRoom: + closetext + end + +.GotKingsRock: + writetext SlowpokeWellB2FGymGuideText_GotKingsRock + waitbutton + closetext + end + +SlowpokeWellB2FTMRainDance: + itemball TM_RAIN_DANCE + +SlowpokeWellB2FGymGuideText: + text "I'm waiting to see" + line "SLOWPOKE's moment" + cont "of evolution." + + para "Through observa-" + line "tion, I made a new" + cont "discovery." + + para "A SLOWPOKE with a" + line "KING'S ROCK often" + + para "gets bitten by a" + line "SHELLDER." + + para "Here, I'll share a" + line "KING'S ROCK with" + cont "you." + done + +SlowpokeWellB2FGymGuideText_GotKingsRock: + text "I'm going to be" + line "like SLOWPOKE." + + para "I'll wait patient-" + line "ly, so I can see" + cont "one evolve." + done + +SlowpokeWellB2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 11, SLOWPOKE_WELL_B1F, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 4, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 1, SlowpokeWellB2FGymGuideScript, -1 + object_event 15, 5, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SlowpokeWellB2FTMRainDance, EVENT_SLOWPOKE_WELL_B2F_TM_RAIN_DANCE diff --git a/maps/SlowpokeWellB2F.blk b/maps/SlowpokeWellB2F.blk new file mode 100644 index 0000000..7eb3c8d --- /dev/null +++ b/maps/SlowpokeWellB2F.blk @@ -0,0 +1,9 @@ +  +  + + +    + + +  +  \ No newline at end of file diff --git a/maps/SoulHouse.asm b/maps/SoulHouse.asm new file mode 100644 index 0000000..f23c592 --- /dev/null +++ b/maps/SoulHouse.asm @@ -0,0 +1,88 @@ + object_const_def + const SOULHOUSE_MRFUJI + const SOULHOUSE_TEACHER + const SOULHOUSE_LASS + const SOULHOUSE_GRANNY + +SoulHouse_MapScripts: + def_scene_scripts + + def_callbacks + +MrFuji: + jumptextfaceplayer MrFujiText + +SoulHouseTeacherScript: + jumptextfaceplayer SoulHouseTeacherText + +SoulHouseLassScript: + jumptextfaceplayer SoulHouseLassText + +SoulHouseGrannyScript: + jumptextfaceplayer SoulHouseGrannyText + +MrFujiText: + text "MR.FUJI: Welcome." + + para "Hmm… You appear to" + line "be raising your" + + para "#MON in a kind" + line "and loving manner." + + para "#MON lovers" + line "come here to pay" + + para "their respects to" + line "departed #MON." + + para "Please offer con-" + line "dolences for the" + + para "souls of the de-" + line "parted #MON." + + para "I'm sure that will" + line "make them happy." + done + +SoulHouseTeacherText: + text "There are other" + line "graves of #MON" + cont "here, I think." + + para "There are many" + line "chambers that only" + cont "MR.FUJI may enter." + done + +SoulHouseLassText: + text "I came with my mom" + line "to visit #MON" + cont "graves…" + done + +SoulHouseGrannyText: + text "The #MON that" + line "lived with me…" + + para "I loved them like" + line "my grandchildren…" + done + +SoulHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 7, LAVENDER_TOWN, 6 + warp_event 5, 7, LAVENDER_TOWN, 6 + + def_coord_events + + def_bg_events + + def_object_events + object_event 4, 2, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, MrFuji, -1 + object_event 7, 3, SPRITE_TEACHER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SoulHouseTeacherScript, -1 + object_event 2, 5, SPRITE_LASS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SoulHouseLassScript, -1 + object_event 1, 3, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SoulHouseGrannyScript, -1 diff --git a/maps/SoulHouse.blk b/maps/SoulHouse.blk new file mode 100644 index 0000000..ade1108 --- /dev/null +++ b/maps/SoulHouse.blk @@ -0,0 +1 @@ +(+*(+*+((( +* \ No newline at end of file diff --git a/maps/SproutTower1F.asm b/maps/SproutTower1F.asm new file mode 100644 index 0000000..e816548 --- /dev/null +++ b/maps/SproutTower1F.asm @@ -0,0 +1,125 @@ + object_const_def + const SPROUTTOWER1F_SAGE1 + const SPROUTTOWER1F_SAGE2 + const SPROUTTOWER1F_GRANNY + const SPROUTTOWER1F_TEACHER + const SPROUTTOWER1F_SAGE3 + const SPROUTTOWER1F_POKE_BALL + +SproutTower1F_MapScripts: + def_scene_scripts + + def_callbacks + +SproutTower1FSage1Script: + jumptextfaceplayer SproutTower1FSage1Text + +SproutTower1FSage2Script: + jumptextfaceplayer SproutTower1FSage2Text + +SproutTower1FGrannyScript: + jumptextfaceplayer SproutTower1FGrannyText + +SproutTower1FTeacherScript: + jumptextfaceplayer SproutTower1FTeacherText + +TrainerSageChow: + trainer SAGE, CHOW, EVENT_BEAT_SAGE_CHOW, SageChowSeenText, SageChowBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SageChowAfterBattleText + waitbutton + closetext + end + +SproutTower1FParlyzHeal: + itemball PARLYZ_HEAL + +SproutTower1FStatue: + jumptext SproutTower1FStatueText + +SageChowSeenText: + text "We stand guard in" + line "this tower." + + para "Here, we express" + line "our gratitude to" + cont "honor all #MON." + done + +SageChowBeatenText: + text "Th-Thank you!" + done + +SageChowAfterBattleText: + text "All living beings" + line "coexist through" + cont "cooperation." + + para "We must always be" + line "thankful for this." + done + +SproutTower1FSage1Text: + text "Only if you reach" + line "the top will you" + cont "obtain an HM." + done + +SproutTower1FSage2Text: + text "SPROUT TOWER was" + line "built long ago" + + para "as a place for" + line "#MON training." + done + +SproutTower1FGrannyText: + text "A BELLSPROUT over" + line "100 feet tall…" + + para "People say that it" + line "became the center" + cont "pillar here." + done + +SproutTower1FTeacherText: + text "See the pillar" + line "shaking?" + + para "People are train-" + line "ing upstairs." + done + +SproutTower1FStatueText: + text "A #MON statue…" + + para "It looks very" + line "distinguished." + done + +SproutTower1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 15, VIOLET_CITY, 7 + warp_event 10, 15, VIOLET_CITY, 7 + warp_event 6, 4, SPROUT_TOWER_2F, 1 + warp_event 2, 6, SPROUT_TOWER_2F, 2 + warp_event 17, 3, SPROUT_TOWER_2F, 3 + + def_coord_events + + def_bg_events + bg_event 7, 15, BGEVENT_READ, SproutTower1FStatue + bg_event 12, 15, BGEVENT_READ, SproutTower1FStatue + + def_object_events + object_event 7, 4, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SproutTower1FSage1Script, -1 + object_event 6, 7, SPRITE_SAGE, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SproutTower1FSage2Script, -1 + object_event 11, 12, SPRITE_GRANNY, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SproutTower1FGrannyScript, -1 + object_event 9, 9, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SproutTower1FTeacherScript, -1 + object_event 3, 5, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSageChow, -1 + object_event 16, 7, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower1FParlyzHeal, EVENT_SPROUT_TOWER_1F_PARLYZ_HEAL diff --git a/maps/SproutTower1F.blk b/maps/SproutTower1F.blk new file mode 100644 index 0000000..d3df2a0 --- /dev/null +++ b/maps/SproutTower1F.blk @@ -0,0 +1,5 @@ +   +    +   +  +    10  \ No newline at end of file diff --git a/maps/SproutTower2F.asm b/maps/SproutTower2F.asm new file mode 100644 index 0000000..3bab713 --- /dev/null +++ b/maps/SproutTower2F.asm @@ -0,0 +1,102 @@ + object_const_def + const SPROUTTOWER2F_SAGE1 + const SPROUTTOWER2F_SAGE2 + const SPROUTTOWER2F_POKE_BALL + +SproutTower2F_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerSageNico: + trainer SAGE, NICO, EVENT_BEAT_SAGE_NICO, SageNicoSeenText, SageNicoBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SageNicoAfterBattleText + waitbutton + closetext + end + +TrainerSageEdmond: + trainer SAGE, EDMOND, EVENT_BEAT_SAGE_EDMOND, SageEdmondSeenText, SageEdmondBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SageEdmondAfterBattleText + waitbutton + closetext + end + +SproutTower2FStatue: + jumptext SproutTower2FStatueText + +SproutTower2FXAccuracy: + itemball X_ACCURACY + +SageNicoSeenText: + text "However hard we" + line "battle, the TOWER" + cont "will stand strong." + done + +SageNicoBeatenText: + text "I fought hard but" + line "I'm too weak." + done + +SageNicoAfterBattleText: + text "The flexible pil-" + line "lar protects the" + + para "TOWER, even from" + line "earthquakes." + done + +SageEdmondSeenText: + text "…Sway like leaves" + line "in the wind…" + done + +SageEdmondBeatenText: + text "Oh, I'm weak!" + done + +SageEdmondAfterBattleText: + text "I tried to copy" + line "BELLSPROUT's" + + para "gentle movements" + line "for battle…" + + para "But I didn't train" + line "well enough." + done + +SproutTower2FStatueText: + text "A #MON statue…" + + para "It looks very" + line "distinguished." + done + +SproutTower2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 6, 4, SPROUT_TOWER_1F, 3 + warp_event 2, 6, SPROUT_TOWER_1F, 4 + warp_event 17, 3, SPROUT_TOWER_1F, 5 + warp_event 10, 14, SPROUT_TOWER_3F, 1 + + def_coord_events + + def_bg_events + bg_event 12, 15, BGEVENT_READ, SproutTower2FStatue + + def_object_events + object_event 12, 3, SPRITE_SAGE, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerSageNico, -1 + object_event 9, 14, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 5, TrainerSageEdmond, -1 + object_event 3, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower2FXAccuracy, EVENT_SPROUT_TOWER_2F_X_ACCURACY diff --git a/maps/SproutTower2F.blk b/maps/SproutTower2F.blk new file mode 100644 index 0000000..8113e44 --- /dev/null +++ b/maps/SproutTower2F.blk @@ -0,0 +1,2 @@ +           +    0  \ No newline at end of file diff --git a/maps/SproutTower3F.asm b/maps/SproutTower3F.asm new file mode 100644 index 0000000..b4388df --- /dev/null +++ b/maps/SproutTower3F.asm @@ -0,0 +1,354 @@ + object_const_def + const SPROUTTOWER3F_SAGE1 + const SPROUTTOWER3F_SAGE2 + const SPROUTTOWER3F_SAGE3 + const SPROUTTOWER3F_SAGE4 + const SPROUTTOWER3F_POKE_BALL1 + const SPROUTTOWER3F_POKE_BALL2 + const SPROUTTOWER3F_RIVAL + +SproutTower3F_MapScripts: + def_scene_scripts + scene_script SproutTower3FNoop1Scene, SCENE_SPROUTTOWER3F_RIVAL_ENCOUNTER + scene_script SproutTower3FNoop2Scene, SCENE_SPROUTTOWER3F_NOOP + + def_callbacks + +SproutTower3FNoop1Scene: + end + +SproutTower3FNoop2Scene: + end + +SproutTower3FRivalScene: + turnobject PLAYER, UP + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + playsound SFX_TACKLE + playsound SFX_ELEVATOR + earthquake 79 + pause 15 + playsound SFX_TACKLE + playsound SFX_ELEVATOR + earthquake 79 + applymovement PLAYER, SproutTower3FPlayerApproachesRivalMovement + applymovement SPROUTTOWER3F_RIVAL, SproutTower3FRivalApproachesElderMovement + opentext + writetext SproutTowerElderLecturesRivalText + waitbutton + closetext + showemote EMOTE_SHOCK, SPROUTTOWER3F_RIVAL, 15 + turnobject SPROUTTOWER3F_RIVAL, DOWN + pause 15 + applymovement SPROUTTOWER3F_RIVAL, SproutTower3FRivalLeavesElderMovement + playmusic MUSIC_RIVAL_ENCOUNTER + opentext + writetext SproutTowerRivalOnlyCareAboutStrongText + waitbutton + closetext + turnobject SPROUTTOWER3F_RIVAL, UP + opentext + writetext SproutTowerRivalUsedEscapeRopeText + pause 15 + closetext + playsound SFX_WARP_TO + special FadeBlackQuickly + special ReloadSpritesNoPalettes + disappear SPROUTTOWER3F_RIVAL + waitsfx + special FadeInQuickly + setscene SCENE_SPROUTTOWER3F_NOOP + special RestartMapMusic + end + +SageLiScript: + faceplayer + opentext + checkevent EVENT_GOT_HM05_FLASH + iftrue .GotFlash + writetext SageLiSeenText + waitbutton + closetext + winlosstext SageLiBeatenText, 0 + loadtrainer SAGE, LI + startbattle + reloadmapafterbattle + opentext + writetext SageLiTakeThisFlashText + promptbutton + verbosegiveitem HM_FLASH + setevent EVENT_GOT_HM05_FLASH + setevent EVENT_BEAT_SAGE_LI + writetext SageLiFlashExplanationText + waitbutton + closetext + end + +.GotFlash: + writetext SageLiAfterBattleText + waitbutton + closetext + end + +TrainerSageJin: + trainer SAGE, JIN, EVENT_BEAT_SAGE_JIN, SageJinSeenText, SageJinBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SageJinAfterBattleText + waitbutton + closetext + end + +TrainerSageTroy: + trainer SAGE, TROY, EVENT_BEAT_SAGE_TROY, SageTroySeenText, SageTroyBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SageTroyAfterBattleText + waitbutton + closetext + end + +TrainerSageNeal: + trainer SAGE, NEAL, EVENT_BEAT_SAGE_NEAL, SageNealSeenText, SageNealBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext SageNealAfterBattleText + waitbutton + closetext + end + +SproutTower3FPainting: + jumptext SproutTower3FPaintingText + +SproutTower3FStatue: + jumptext SproutTower3FStatueText + +SproutTower3FPotion: + itemball POTION + +SproutTower3FEscapeRope: + itemball ESCAPE_ROPE + +SproutTower3FPlayerApproachesRivalMovement: + step UP + step UP + step UP + step UP + step_end + +SproutTower3FRivalApproachesElderMovement: + step UP + step_end + +SproutTower3FRivalLeavesElderMovement: + step RIGHT + step DOWN + step_end + +SproutTowerElderLecturesRivalText: + text "ELDER: You are in-" + line "deed skilled as a" + cont "trainer." + + para "As promised, here" + line "is your HM." + + para "But let me say" + line "this: You should" + + para "treat your" + line "#MON better." + + para "The way you battle" + line "is far too harsh." + + para "#MON are not" + line "tools of war…" + done + +SproutTowerRivalOnlyCareAboutStrongText: + text "…" + line "…Humph!" + + para "He claims to be" + line "the ELDER but" + cont "he's weak." + + para "It stands to" + line "reason." + + para "I'd never lose to" + line "fools who babble" + + para "about being nice" + line "to #MON." + + para "I only care about" + line "strong #MON" + cont "that can win." + + para "I really couldn't" + line "care less about" + cont "weak #MON." + done + +SproutTowerRivalUsedEscapeRopeText: + text " used an" + line "ESCAPE ROPE!" + done + +SageLiSeenText: + text "So good of you to" + line "come here!" + + para "SPROUT TOWER is a" + line "place of training." + + para "People and #MON" + line "test their bonds" + + para "to build a bright" + line "future together." + + para "I am the final" + line "test." + + para "Allow me to check" + line "the ties between" + + para "your #MON and" + line "you!" + done + +SageLiBeatenText: + text "Ah, excellent!" + done + +SageLiTakeThisFlashText: + text "You and your #-" + line "MON should have" + + para "no problem using" + line "this move." + + para "Take this FLASH" + line "HM." + done + +SageLiFlashExplanationText: + text "FLASH illuminates" + line "even the darkest" + cont "of all places." + + para "But to use it out" + line "of battle, you" + + para "need the BADGE" + line "from VIOLET's GYM." + done + +SageLiAfterBattleText: + text "I hope you learn" + line "and grow from your" + cont "journey." + done + +SageJinSeenText: + text "I train to find" + line "enlightenment in" + cont "#MON!" + done + +SageJinBeatenText: + text "My training is" + line "incomplete…" + done + +SageJinAfterBattleText: + text "As #MON grow" + line "stronger, so does" + cont "the trainer." + + para "No, wait. As the" + line "trainer grows" + + para "stronger, so do" + line "the #MON." + done + +SageTroySeenText: + text "Let me see how" + line "much you trust" + cont "your #MON." + done + +SageTroyBeatenText: + text "Yes, your trust is" + line "real!" + done + +SageTroyAfterBattleText: + text "It is not far to" + line "the ELDER." + done + +SageNealSeenText: + text "The ELDER's HM" + line "lights even pitch-" + cont "black darkness." + done + +SageNealBeatenText: + text "It is my head that" + line "is bright!" + done + +SageNealAfterBattleText: + text "Let there be light" + line "on your journey." + done + +SproutTower3FPaintingText: + text "It's a powerful" + line "painting of a" + cont "BELLSPROUT." + done + +SproutTower3FStatueText: + text "A #MON statue…" + + para "It looks very" + line "distinguished." + done + +SproutTower3F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 10, 14, SPROUT_TOWER_2F, 4 + + def_coord_events + coord_event 11, 9, SCENE_SPROUTTOWER3F_RIVAL_ENCOUNTER, SproutTower3FRivalScene + + def_bg_events + bg_event 8, 1, BGEVENT_READ, SproutTower3FStatue + bg_event 11, 1, BGEVENT_READ, SproutTower3FStatue + bg_event 9, 0, BGEVENT_READ, SproutTower3FPainting + bg_event 10, 0, BGEVENT_READ, SproutTower3FPainting + bg_event 5, 15, BGEVENT_READ, SproutTower3FStatue + bg_event 14, 15, BGEVENT_READ, SproutTower3FStatue + + def_object_events + object_event 8, 13, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSageJin, -1 + object_event 8, 8, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerSageTroy, -1 + object_event 10, 2, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, SageLiScript, -1 + object_event 11, 11, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerSageNeal, -1 + object_event 6, 14, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower3FPotion, EVENT_SPROUT_TOWER_3F_POTION + object_event 14, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, SproutTower3FEscapeRope, EVENT_SPROUT_TOWER_3F_ESCAPE_ROPE + object_event 10, 4, SPRITE_RIVAL, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_SPROUT_TOWER diff --git a/maps/SproutTower3F.blk b/maps/SproutTower3F.blk new file mode 100644 index 0000000..d2982bf --- /dev/null +++ b/maps/SproutTower3F.blk @@ -0,0 +1,5 @@ + ./   +   +     +* * +  *   1  0  \ No newline at end of file diff --git a/maps/TeamRocketBaseB1F.asm b/maps/TeamRocketBaseB1F.asm new file mode 100644 index 0000000..bcfcc0e --- /dev/null +++ b/maps/TeamRocketBaseB1F.asm @@ -0,0 +1,789 @@ + object_const_def + const TEAMROCKETBASEB1F_ROCKET1 + const TEAMROCKETBASEB1F_ROCKET2 + const TEAMROCKETBASEB1F_SCIENTIST + const TEAMROCKETBASEB1F_POKE_BALL1 + const TEAMROCKETBASEB1F_POKE_BALL2 + const TEAMROCKETBASEB1F_POKE_BALL3 + +TeamRocketBaseB1F_MapScripts: + def_scene_scripts + scene_script TeamRocketBaseB1FNoopScene, SCENE_TEAMROCKETBASEB1F_TRAPS + + def_callbacks + callback MAPCALLBACK_OBJECTS, TeamRocketBaseB1FHideSecurityGruntCallback + +TeamRocketBaseB1FNoopScene: + end + +TeamRocketBaseB1FHideSecurityGruntCallback: + disappear TEAMROCKETBASEB1F_ROCKET1 + endcallback + +SecurityCamera1a: + checkevent EVENT_SECURITY_CAMERA_1 + iftrue NoSecurityCamera + scall PlaySecurityCameraSounds + checkevent EVENT_TEAM_ROCKET_BASE_POPULATION + iftrue NoSecurityCamera + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + moveobject TEAMROCKETBASEB1F_ROCKET1, 19, 2 + appear TEAMROCKETBASEB1F_ROCKET1 + turnobject PLAYER, LEFT + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 + scall TrainerCameraGrunt1 + ifequal TRUE, NoSecurityCamera + scall PlaySecurityCameraSounds + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + moveobject TEAMROCKETBASEB1F_ROCKET1, 19, 2 + appear TEAMROCKETBASEB1F_ROCKET1 + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 + scall TrainerCameraGrunt2 + ifequal TRUE, NoSecurityCamera + setevent EVENT_SECURITY_CAMERA_1 + end + +SecurityCamera1b: + checkevent EVENT_SECURITY_CAMERA_1 + iftrue NoSecurityCamera + scall PlaySecurityCameraSounds + checkevent EVENT_TEAM_ROCKET_BASE_POPULATION + iftrue NoSecurityCamera + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + moveobject TEAMROCKETBASEB1F_ROCKET1, 19, 3 + appear TEAMROCKETBASEB1F_ROCKET1 + turnobject PLAYER, LEFT + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 + scall TrainerCameraGrunt1 + ifequal TRUE, NoSecurityCamera + scall PlaySecurityCameraSounds + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + moveobject TEAMROCKETBASEB1F_ROCKET1, 19, 3 + appear TEAMROCKETBASEB1F_ROCKET1 + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 + scall TrainerCameraGrunt2 + ifequal TRUE, NoSecurityCamera + setevent EVENT_SECURITY_CAMERA_1 + end + +SecurityCamera2a: + checkevent EVENT_SECURITY_CAMERA_2 + iftrue NoSecurityCamera + scall PlaySecurityCameraSounds + checkevent EVENT_TEAM_ROCKET_BASE_POPULATION + iftrue NoSecurityCamera + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + moveobject TEAMROCKETBASEB1F_ROCKET1, 4, 7 + appear TEAMROCKETBASEB1F_ROCKET1 + turnobject PLAYER, LEFT + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement2 + scall TrainerCameraGrunt1 + ifequal TRUE, NoSecurityCamera + scall PlaySecurityCameraSounds + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + turnobject PLAYER, RIGHT + moveobject TEAMROCKETBASEB1F_ROCKET1, 12, 5 + appear TEAMROCKETBASEB1F_ROCKET1 + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement3 + scall TrainerCameraGrunt2 + ifequal TRUE, NoSecurityCamera + setevent EVENT_SECURITY_CAMERA_2 + end + +SecurityCamera2b: + checkevent EVENT_SECURITY_CAMERA_2 + iftrue NoSecurityCamera + scall PlaySecurityCameraSounds + checkevent EVENT_TEAM_ROCKET_BASE_POPULATION + iftrue NoSecurityCamera + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + moveobject TEAMROCKETBASEB1F_ROCKET1, 4, 8 + appear TEAMROCKETBASEB1F_ROCKET1 + turnobject PLAYER, LEFT + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement4 + scall TrainerCameraGrunt1 + ifequal TRUE, NoSecurityCamera + scall PlaySecurityCameraSounds + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + turnobject PLAYER, RIGHT + moveobject TEAMROCKETBASEB1F_ROCKET1, 12, 5 + appear TEAMROCKETBASEB1F_ROCKET1 + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement5 + scall TrainerCameraGrunt2 + ifequal TRUE, NoSecurityCamera + setevent EVENT_SECURITY_CAMERA_2 + end + +SecurityCamera3a: + checkevent EVENT_SECURITY_CAMERA_3 + iftrue NoSecurityCamera + scall PlaySecurityCameraSounds + checkevent EVENT_TEAM_ROCKET_BASE_POPULATION + iftrue NoSecurityCamera + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + moveobject TEAMROCKETBASEB1F_ROCKET1, 19, 6 + appear TEAMROCKETBASEB1F_ROCKET1 + turnobject PLAYER, LEFT + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 + scall TrainerCameraGrunt1 + ifequal TRUE, NoSecurityCamera + scall PlaySecurityCameraSounds + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + turnobject PLAYER, RIGHT + moveobject TEAMROCKETBASEB1F_ROCKET1, 25, 11 + appear TEAMROCKETBASEB1F_ROCKET1 + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement6 + scall TrainerCameraGrunt2 + ifequal TRUE, NoSecurityCamera + setevent EVENT_SECURITY_CAMERA_3 + end + +SecurityCamera3b: + checkevent EVENT_SECURITY_CAMERA_3 + iftrue NoSecurityCamera + scall PlaySecurityCameraSounds + checkevent EVENT_TEAM_ROCKET_BASE_POPULATION + iftrue NoSecurityCamera + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + moveobject TEAMROCKETBASEB1F_ROCKET1, 19, 7 + appear TEAMROCKETBASEB1F_ROCKET1 + turnobject PLAYER, LEFT + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 + scall TrainerCameraGrunt1 + ifequal TRUE, NoSecurityCamera + scall PlaySecurityCameraSounds + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + turnobject PLAYER, RIGHT + moveobject TEAMROCKETBASEB1F_ROCKET1, 25, 12 + appear TEAMROCKETBASEB1F_ROCKET1 + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement7 + scall TrainerCameraGrunt2 + ifequal TRUE, NoSecurityCamera + setevent EVENT_SECURITY_CAMERA_3 + end + +SecurityCamera4: + checkevent EVENT_SECURITY_CAMERA_4 + iftrue NoSecurityCamera + scall PlaySecurityCameraSounds + checkevent EVENT_TEAM_ROCKET_BASE_POPULATION + iftrue NoSecurityCamera + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + moveobject TEAMROCKETBASEB1F_ROCKET1, 17, 16 + appear TEAMROCKETBASEB1F_ROCKET1 + turnobject PLAYER, LEFT + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 + scall TrainerCameraGrunt1 + ifequal TRUE, NoSecurityCamera + scall PlaySecurityCameraSounds + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + turnobject PLAYER, RIGHT + moveobject TEAMROCKETBASEB1F_ROCKET1, 25, 11 + appear TEAMROCKETBASEB1F_ROCKET1 + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement8 + scall TrainerCameraGrunt2 + ifequal TRUE, NoSecurityCamera + setevent EVENT_SECURITY_CAMERA_4 + end + +SecurityCamera5: + checkevent EVENT_SECURITY_CAMERA_5 + iftrue NoSecurityCamera + scall PlaySecurityCameraSounds + checkevent EVENT_TEAM_ROCKET_BASE_POPULATION + iftrue NoSecurityCamera + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + moveobject TEAMROCKETBASEB1F_ROCKET1, 3, 16 + appear TEAMROCKETBASEB1F_ROCKET1 + turnobject PLAYER, LEFT + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement1 + scall TrainerCameraGrunt1 + ifequal TRUE, NoSecurityCamera + scall PlaySecurityCameraSounds + showemote EMOTE_SHOCK, PLAYER, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + turnobject PLAYER, RIGHT + moveobject TEAMROCKETBASEB1F_ROCKET1, 14, 16 + appear TEAMROCKETBASEB1F_ROCKET1 + applymovement TEAMROCKETBASEB1F_ROCKET1, SecurityCameraMovement9 + scall TrainerCameraGrunt2 + ifequal TRUE, NoSecurityCamera + setevent EVENT_SECURITY_CAMERA_5 + end + +NoSecurityCamera: + end + +TrainerCameraGrunt1: + opentext + writetext CameraGrunt1SeenText + waitbutton + closetext + winlosstext CameraGrunt1BeatenText, 0 + setlasttalked TEAMROCKETBASEB1F_ROCKET1 + loadtrainer GRUNTM, GRUNTM_20 + startbattle + disappear TEAMROCKETBASEB1F_ROCKET1 + reloadmapafterbattle + end + +TrainerCameraGrunt2: + opentext + writetext CameraGrunt2SeenText + waitbutton + closetext + winlosstext CameraGrunt2BeatenText, 0 + setlasttalked TEAMROCKETBASEB1F_ROCKET1 + loadtrainer GRUNTM, GRUNTM_21 + startbattle + disappear TEAMROCKETBASEB1F_ROCKET1 + reloadmapafterbattle + end + +PlaySecurityCameraSounds: + playsound SFX_LICK + pause 10 + playsound SFX_LICK + pause 10 + playsound SFX_LICK + pause 10 + playsound SFX_LICK + pause 10 + playsound SFX_LICK + pause 10 + playsound SFX_LICK + end + +ExplodingTrap1: + checkevent EVENT_EXPLODING_TRAP_1 + iftrue NoExplodingTrap + scall KoffingExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_1 + end + +ExplodingTrap2: + checkevent EVENT_EXPLODING_TRAP_2 + iftrue NoExplodingTrap + scall VoltorbExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_2 + end + +ExplodingTrap3: + checkevent EVENT_EXPLODING_TRAP_3 + iftrue NoExplodingTrap + scall GeodudeExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_3 + end + +ExplodingTrap4: + checkevent EVENT_EXPLODING_TRAP_4 + iftrue NoExplodingTrap + scall VoltorbExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_4 + end + +ExplodingTrap5: + checkevent EVENT_EXPLODING_TRAP_5 + iftrue NoExplodingTrap + scall GeodudeExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_5 + end + +ExplodingTrap6: + checkevent EVENT_EXPLODING_TRAP_6 + iftrue NoExplodingTrap + scall KoffingExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_6 + end + +ExplodingTrap7: + checkevent EVENT_EXPLODING_TRAP_7 + iftrue NoExplodingTrap + scall VoltorbExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_7 + end + +ExplodingTrap8: + checkevent EVENT_EXPLODING_TRAP_8 + iftrue NoExplodingTrap + scall KoffingExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_8 + end + +ExplodingTrap9: + checkevent EVENT_EXPLODING_TRAP_9 + iftrue NoExplodingTrap + scall KoffingExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_9 + end + +ExplodingTrap10: + checkevent EVENT_EXPLODING_TRAP_10 + iftrue NoExplodingTrap + scall VoltorbExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_10 + end + +ExplodingTrap11: + checkevent EVENT_EXPLODING_TRAP_11 + iftrue NoExplodingTrap + scall GeodudeExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_11 + end + +ExplodingTrap12: + checkevent EVENT_EXPLODING_TRAP_12 + iftrue NoExplodingTrap + scall GeodudeExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_12 + end + +ExplodingTrap13: + checkevent EVENT_EXPLODING_TRAP_13 + iftrue NoExplodingTrap + scall GeodudeExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_13 + end + +ExplodingTrap14: + checkevent EVENT_EXPLODING_TRAP_14 + iftrue NoExplodingTrap + scall KoffingExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_14 + end + +ExplodingTrap15: + checkevent EVENT_EXPLODING_TRAP_15 + iftrue NoExplodingTrap + scall VoltorbExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_15 + end + +ExplodingTrap16: + checkevent EVENT_EXPLODING_TRAP_16 + iftrue NoExplodingTrap + scall KoffingExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_16 + end + +ExplodingTrap17: + checkevent EVENT_EXPLODING_TRAP_17 + iftrue NoExplodingTrap + scall VoltorbExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_17 + end + +ExplodingTrap18: + checkevent EVENT_EXPLODING_TRAP_18 + iftrue NoExplodingTrap + scall GeodudeExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_18 + end + +ExplodingTrap19: + checkevent EVENT_EXPLODING_TRAP_19 + iftrue NoExplodingTrap + scall GeodudeExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_19 + end + +ExplodingTrap20: + checkevent EVENT_EXPLODING_TRAP_20 + iftrue NoExplodingTrap + scall VoltorbExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_20 + end + +ExplodingTrap21: + checkevent EVENT_EXPLODING_TRAP_21 + iftrue NoExplodingTrap + scall KoffingExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_21 + end + +ExplodingTrap22: + checkevent EVENT_EXPLODING_TRAP_22 + iftrue NoExplodingTrap + scall VoltorbExplodingTrap + reloadmapafterbattle + setevent EVENT_EXPLODING_TRAP_22 + end + +VoltorbExplodingTrap: + special FadeOutPalettes + cry VOLTORB + special FadeInPalettes + setlasttalked -1 + loadvar VAR_BATTLETYPE, BATTLETYPE_TRAP + loadwildmon VOLTORB, 23 + startbattle + end + +GeodudeExplodingTrap: + special FadeOutPalettes + cry GEODUDE + special FadeInPalettes + setlasttalked -1 + loadvar VAR_BATTLETYPE, BATTLETYPE_TRAP + loadwildmon GEODUDE, 21 + startbattle + end + +KoffingExplodingTrap: + special FadeOutPalettes + cry KOFFING + special FadeInPalettes + setlasttalked -1 + loadvar VAR_BATTLETYPE, BATTLETYPE_TRAP + loadwildmon KOFFING, 21 + startbattle + end + +NoExplodingTrap: + end + +TrainerScientistJed: + trainer SCIENTIST, JED, EVENT_BEAT_SCIENTIST_JED, ScientistJedSeenText, ScientistJedBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext ScientistJedAfterBattleText + waitbutton + closetext + end + +TrainerGruntM16: + trainer GRUNTM, GRUNTM_16, EVENT_BEAT_ROCKET_GRUNTM_16, GruntM16SeenText, GruntM16BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM16AfterBattleText + waitbutton + closetext + end + +TeamRocketBaseB1FSecurityCamera: + jumptext TeamRocketBaseB1FSecurityCameraText + +TeamRocketBaseB1FBookshelf: + jumpstd TeamRocketOathScript + +TeamRocketBaseB1FSecretSwitch: + opentext + checkevent EVENT_TURNED_OFF_SECURITY_CAMERAS + iftrue .SecretSwitchOff + writetext TeamRocketBaseB1FSecretSwitchText + playsound SFX_TALLY + waitbutton + closetext + setevent EVENT_TURNED_OFF_SECURITY_CAMERAS + setevent EVENT_SECURITY_CAMERA_1 + setevent EVENT_SECURITY_CAMERA_2 + setevent EVENT_SECURITY_CAMERA_3 + setevent EVENT_SECURITY_CAMERA_4 + setevent EVENT_SECURITY_CAMERA_5 + end + +.SecretSwitchOff: + writetext TeamRocketBaseB1FSwitchOffText + waitbutton + closetext + end + +TeamRocketBaseB1FHyperPotion: + itemball HYPER_POTION + +TeamRocketBaseB1FNugget: + itemball NUGGET + +TeamRocketBaseB1FGuardSpec: + itemball GUARD_SPEC + +TeamRocketBaseB1FHiddenRevive: + hiddenitem REVIVE, EVENT_TEAM_ROCKET_BASE_B1F_HIDDEN_REVIVE + +SecurityCameraMovement1: + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + step_end + +SecurityCameraMovement2: + big_step UP + big_step RIGHT + big_step UP + big_step UP + big_step UP + big_step UP + turn_head RIGHT + step_end + +SecurityCameraMovement3: + big_step LEFT + big_step LEFT + big_step LEFT + big_step UP + big_step UP + big_step UP + big_step LEFT + big_step LEFT + step_end + +SecurityCameraMovement4: +; he jumps over a trap + jump_step UP + big_step RIGHT + big_step UP + big_step UP + big_step UP + turn_head RIGHT + step_end + +SecurityCameraMovement5: + big_step LEFT + big_step LEFT + big_step LEFT + big_step UP + big_step UP + big_step LEFT + big_step LEFT + step_end + +SecurityCameraMovement6: + big_step UP + big_step UP + big_step RIGHT + big_step UP + big_step UP + big_step UP + big_step LEFT + step_end + +SecurityCameraMovement7: + big_step UP + big_step UP + big_step UP + big_step RIGHT + big_step UP + big_step UP + big_step LEFT + step_end + +SecurityCameraMovement8: + big_step DOWN + big_step DOWN + big_step RIGHT + big_step DOWN + big_step DOWN + big_step DOWN + big_step LEFT + big_step LEFT + big_step LEFT + step_end + +SecurityCameraMovement9: + big_step LEFT + big_step LEFT + big_step LEFT + big_step LEFT + big_step LEFT + step_end + +CameraGrunt1SeenText: + text "Hey!" + line "Intruder alert!" + done + +CameraGrunt1BeatenText: + text "Dang… I failed…" + done + +CameraGrunt2SeenText: + text "It's my turn!" + line "There's no escape!" + done + +CameraGrunt2BeatenText: + text "Surveillance cams" + line "are in the #MON" + cont "statues." + + para "We'll keep appear-" + line "ing until you trip" + cont "a secret switch." + done + +ScientistJedSeenText: + text "This was once a" + line "ninja hideout." + + para "There are traps to" + line "confound intruders" + cont "like you." + done + +ScientistJedBeatenText: + text "I get it…" + done + +ScientistJedAfterBattleText: + text "All right. I'll" + line "divulge a secret" + cont "about our hideout." + + para "That thing on the" + line "floor up ahead is" + cont "a warp panel." + + para "If you step on it," + line "you'll be warped" + + para "back to the en-" + line "trance." + done + +GruntM16SeenText: + text "Heheh. Feeling" + line "lucky, punk?" + + para "Go ahead, take" + line "another step." + + para "We've got traps" + line "set in the floor!" + done + +GruntM16BeatenText: + text "Kaboom!" + done + +GruntM16AfterBattleText: + text "I don't even know" + line "where the traps" + cont "are planted." + + para "You'll just have" + line "to collect your" + cont "courage and walk." + done + +TeamRocketBaseB1FSecurityCameraText: + text "It's a PERSIAN" + line "statue…" + + para "Its eyes are oddly" + line "shiny." + done + +TeamRocketBaseB1FSecretSwitchText: + text "A secret switch!" + line "Better press it." + done + +TeamRocketBaseB1FSwitchOffText: + text "The switch is" + line "turned off." + done + +TeamRocketBaseB1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 27, 2, MAHOGANY_MART_1F, 3 + warp_event 3, 14, TEAM_ROCKET_BASE_B2F, 1 + warp_event 5, 15, TEAM_ROCKET_BASE_B1F, 4 + warp_event 25, 2, TEAM_ROCKET_BASE_B1F, 3 + + def_coord_events + ; There are five security cameras in the base. + ; Walking in front of one triggers two Rocket Grunts. + coord_event 24, 2, SCENE_TEAMROCKETBASEB1F_TRAPS, SecurityCamera1a + coord_event 24, 3, SCENE_TEAMROCKETBASEB1F_TRAPS, SecurityCamera1b + coord_event 6, 2, SCENE_TEAMROCKETBASEB1F_TRAPS, SecurityCamera2a + coord_event 6, 3, SCENE_TEAMROCKETBASEB1F_TRAPS, SecurityCamera2b + coord_event 24, 6, SCENE_TEAMROCKETBASEB1F_TRAPS, SecurityCamera3a + coord_event 24, 7, SCENE_TEAMROCKETBASEB1F_TRAPS, SecurityCamera3b + coord_event 22, 16, SCENE_TEAMROCKETBASEB1F_TRAPS, SecurityCamera4 + coord_event 8, 16, SCENE_TEAMROCKETBASEB1F_TRAPS, SecurityCamera5 + ; There are spots on the floor that trigger a Pokémon battle. + ; Each Pokémon (Voltorb, Koffing, Geodude) knows Selfdestruct. + coord_event 2, 7, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap1 + coord_event 3, 7, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap2 + coord_event 4, 7, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap3 + coord_event 1, 8, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap4 + coord_event 3, 8, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap5 + coord_event 5, 8, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap6 + coord_event 3, 9, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap7 + coord_event 4, 9, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap8 + coord_event 1, 10, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap9 + coord_event 2, 10, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap10 + coord_event 3, 10, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap11 + coord_event 5, 10, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap12 + coord_event 2, 11, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap13 + coord_event 4, 11, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap14 + coord_event 1, 12, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap15 + coord_event 2, 12, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap16 + coord_event 4, 12, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap17 + coord_event 5, 12, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap18 + coord_event 1, 13, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap19 + coord_event 3, 13, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap20 + coord_event 4, 13, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap21 + coord_event 5, 13, SCENE_TEAMROCKETBASEB1F_TRAPS, ExplodingTrap22 + + def_bg_events + bg_event 19, 11, BGEVENT_READ, TeamRocketBaseB1FSecretSwitch + bg_event 24, 1, BGEVENT_UP, TeamRocketBaseB1FSecurityCamera + bg_event 6, 1, BGEVENT_UP, TeamRocketBaseB1FSecurityCamera + bg_event 8, 15, BGEVENT_UP, TeamRocketBaseB1FSecurityCamera + bg_event 22, 15, BGEVENT_UP, TeamRocketBaseB1FSecurityCamera + bg_event 24, 5, BGEVENT_UP, TeamRocketBaseB1FSecurityCamera + bg_event 20, 11, BGEVENT_READ, TeamRocketBaseB1FBookshelf + bg_event 21, 11, BGEVENT_READ, TeamRocketBaseB1FBookshelf + bg_event 3, 11, BGEVENT_ITEM, TeamRocketBaseB1FHiddenRevive + + def_object_events + object_event 0, 0, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_SECURITY_GRUNTS + object_event 2, 4, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM16, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 18, 12, SPRITE_SCIENTIST, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerScientistJed, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 27, 6, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB1FHyperPotion, EVENT_TEAM_ROCKET_BASE_B1F_HYPER_POTION + object_event 14, 15, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB1FNugget, EVENT_TEAM_ROCKET_BASE_B1F_NUGGET + object_event 21, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB1FGuardSpec, EVENT_TEAM_ROCKET_BASE_B1F_GUARD_SPEC diff --git a/maps/TeamRocketBaseB1F.blk b/maps/TeamRocketBaseB1F.blk new file mode 100644 index 0000000..5be24ad --- /dev/null +++ b/maps/TeamRocketBaseB1F.blk @@ -0,0 +1,6 @@ +   + "  +  +  + += +  )* ?     \ No newline at end of file diff --git a/maps/TeamRocketBaseB2F.asm b/maps/TeamRocketBaseB2F.asm new file mode 100644 index 0000000..08f04f8 --- /dev/null +++ b/maps/TeamRocketBaseB2F.asm @@ -0,0 +1,969 @@ + object_const_def + const TEAMROCKETBASEB2F_ROCKET1 + const TEAMROCKETBASEB2F_ROCKET_GIRL + const TEAMROCKETBASEB2F_LANCE + const TEAMROCKETBASEB2F_DRAGON + const TEAMROCKETBASEB2F_ELECTRODE1 + const TEAMROCKETBASEB2F_ELECTRODE2 + const TEAMROCKETBASEB2F_ELECTRODE3 + const TEAMROCKETBASEB2F_ELECTRODE4 + const TEAMROCKETBASEB2F_ELECTRODE5 + const TEAMROCKETBASEB2F_ELECTRODE6 + const TEAMROCKETBASEB2F_ROCKET2 + const TEAMROCKETBASEB2F_ROCKET3 + const TEAMROCKETBASEB2F_ROCKET4 + const TEAMROCKETBASEB2F_POKE_BALL + +TeamRocketBaseB2F_MapScripts: + def_scene_scripts + scene_script TeamRocketBaseB2FNoop1Scene, SCENE_TEAMROCKETBASEB2F_LANCE_HEALS + scene_script TeamRocketBaseB2FNoop2Scene, SCENE_TEAMROCKETBASEB2F_ROCKET_BOSS + scene_script TeamRocketBaseB2FNoop3Scene, SCENE_TEAMROCKETBASEB2F_ELECTRODES + scene_script TeamRocketBaseB2FNoop4Scene, SCENE_TEAMROCKETBASEB2F_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, TeamRocketBaseB2FTransmitterDoorCallback + +TeamRocketBaseB2FNoop1Scene: + end + +TeamRocketBaseB2FNoop2Scene: + end + +TeamRocketBaseB2FNoop3Scene: + end + +TeamRocketBaseB2FNoop4Scene: + end + +TeamRocketBaseB2FTransmitterDoorCallback: + checkevent EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER + iftrue .OpenDoor + endcallback + +.OpenDoor: + changeblock 14, 12, $07 ; floor + endcallback + +RocketBaseBossFLeft: + moveobject TEAMROCKETBASEB2F_LANCE, 9, 13 + sjump RocketBaseBossFScript + +RocketBaseBossFRight: + moveobject TEAMROCKETBASEB2F_ROCKET_GIRL, 21, 16 + moveobject TEAMROCKETBASEB2F_ROCKET1, 21, 16 + moveobject TEAMROCKETBASEB2F_DRAGON, 10, 13 + moveobject TEAMROCKETBASEB2F_LANCE, 10, 13 +RocketBaseBossFScript: + appear TEAMROCKETBASEB2F_ROCKET_GIRL + appear TEAMROCKETBASEB2F_ROCKET1 + opentext + writetext RocketBaseExecutiveFHoldItText + waitbutton + closetext + turnobject PLAYER, DOWN + showemote EMOTE_SHOCK, PLAYER, 15 + applymovement PLAYER, RocketBasePlayerApproachesBossFMovement + playmusic MUSIC_ROCKET_ENCOUNTER + applymovement TEAMROCKETBASEB2F_ROCKET_GIRL, RocketBaseBossFApproachesPlayerMovement + turnobject PLAYER, UP + applymovement TEAMROCKETBASEB2F_ROCKET1, RocketBaseGruntApproachesPlayerMovement + opentext + writetext RocketBaseBossFThrashText + waitbutton + closetext + cry DRAGONITE + turnobject TEAMROCKETBASEB2F_ROCKET_GIRL, LEFT + turnobject PLAYER, LEFT + appear TEAMROCKETBASEB2F_DRAGON + applymovement TEAMROCKETBASEB2F_DRAGON, RocketBaseDragoniteAttacksMovement + applymovement TEAMROCKETBASEB2F_ROCKET_GIRL, RocketBaseBossFHitMovement + applymovement TEAMROCKETBASEB2F_ROCKET1, RocketBaseGruntProtectsBossFMovement + appear TEAMROCKETBASEB2F_LANCE + applymovement TEAMROCKETBASEB2F_LANCE, RocketBaseLanceApproachesBossFMovement + opentext + writetext RocketBaseLanceShareFunText + waitbutton + closetext + turnobject PLAYER, RIGHT + applymovement TEAMROCKETBASEB2F_ROCKET_GIRL, RocketBaseBossFFacesPlayerMovement + opentext + writetext RocketBaseBossDontMeddleText + waitbutton + closetext + applymovement TEAMROCKETBASEB2F_ROCKET1, RocketBaseGruntBattlesLanceMovement + applymovement TEAMROCKETBASEB2F_ROCKET_GIRL, RocketBaseBossFBattlesPlayerMovement + winlosstext RocketBaseBossWinText, 0 + setlasttalked TEAMROCKETBASEB2F_ROCKET_GIRL + loadtrainer EXECUTIVEF, EXECUTIVEF_2 + startbattle + disappear TEAMROCKETBASEB2F_DRAGON + setevent EVENT_TEAM_ROCKET_BASE_B2F_EXECUTIVE + setevent EVENT_TEAM_ROCKET_BASE_B2F_GRUNT_WITH_EXECUTIVE + setevent EVENT_TEAM_ROCKET_BASE_B2F_LANCE + reloadmapafterbattle + setevent EVENT_BEAT_ROCKET_EXECUTIVEF_2 + opentext + writetext RocketBaseBossRetreatText + waitbutton + closetext + special FadeBlackQuickly + special ReloadSpritesNoPalettes + disappear TEAMROCKETBASEB2F_ROCKET1 + disappear TEAMROCKETBASEB2F_ROCKET_GIRL + disappear TEAMROCKETBASEB2F_ROCKET2 + disappear TEAMROCKETBASEB2F_ROCKET3 + disappear TEAMROCKETBASEB2F_ROCKET4 + pause 15 + special FadeInQuickly + setscene SCENE_TEAMROCKETBASEB2F_ELECTRODES + clearevent EVENT_TEAM_ROCKET_BASE_B2F_LANCE + turnobject TEAMROCKETBASEB2F_LANCE, DOWN + opentext + writetext RocketBaseLancePostBattleText + waitbutton + closetext + applymovement TEAMROCKETBASEB2F_LANCE, RocketBaseLanceChecksPlayerMovement + turnobject PLAYER, UP + opentext + writetext RocketBaseLancePowerOffText + waitbutton + closetext + follow TEAMROCKETBASEB2F_LANCE, PLAYER + applymovement TEAMROCKETBASEB2F_LANCE, RocketBaseLanceApproachesMachineMovement + stopfollow + applymovement TEAMROCKETBASEB2F_LANCE, RocketBaseLancePacesMovement + opentext + writetext RockerBaseLanceElectrodeFaintText + waitbutton + closetext + applymovement TEAMROCKETBASEB2F_LANCE, RocketBaseLanceApproachesElectrodesMovement + disappear TEAMROCKETBASEB2F_LANCE + +RocketBaseCantLeaveScript: + applymovement PLAYER, RocketBasePlayerCantLeaveElectrodesMovement + end + +RocketBaseLancesSideScript: + opentext + writetext RocketBaseLancesSideText + waitbutton + closetext + applymovement PLAYER, RocketBasePlayerCantGoRightMovement + end + +LanceHealsScript1: + turnobject PLAYER, UP + sjump LanceHealsCommon + +LanceHealsScript2: + turnobject PLAYER, RIGHT + turnobject TEAMROCKETBASEB2F_LANCE, LEFT +LanceHealsCommon: + opentext + writetext LanceHealsText1 + waitbutton + closetext + special FadeOutPalettes + special StubbedTrainerRankings_Healings + playsound SFX_FULL_HEAL + special HealParty + special FadeInPalettes + opentext + writetext LanceHealsText2 + waitbutton + closetext + setscene SCENE_TEAMROCKETBASEB2F_ROCKET_BOSS + setevent EVENT_LANCE_HEALED_YOU_IN_TEAM_ROCKET_BASE + readvar VAR_FACING + ifequal RIGHT, .FacingRight + applymovement TEAMROCKETBASEB2F_LANCE, RocketBaseLanceLeavesAfterHealMovement + disappear TEAMROCKETBASEB2F_LANCE + end + +.FacingRight: + applymovement TEAMROCKETBASEB2F_LANCE, RocketBaseLanceLeavesAfterHealRightMovement + disappear TEAMROCKETBASEB2F_LANCE + end + +TrainerGruntM17: + trainer GRUNTM, GRUNTM_17, EVENT_BEAT_ROCKET_GRUNTM_17, GruntM17SeenText, GruntM17BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM17AfterBattleText + waitbutton + closetext + end + +TrainerGruntM18: + trainer GRUNTM, GRUNTM_18, EVENT_BEAT_ROCKET_GRUNTM_18, GruntM18SeenText, GruntM18BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM18AfterBattleText + waitbutton + closetext + end + +TrainerGruntM19: + trainer GRUNTM, GRUNTM_19, EVENT_BEAT_ROCKET_GRUNTM_19, GruntM19SeenText, GruntM19BeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GruntM19AfterBattleText + waitbutton + closetext + end + +RocketElectrode1: + cry ELECTRODE + loadwildmon ELECTRODE, 23 + startbattle + iftrue TeamRocketBaseB2FReloadMap + disappear TEAMROCKETBASEB2F_ELECTRODE1 + disappear TEAMROCKETBASEB2F_ELECTRODE4 + checkevent EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_1 + iffalse TeamRocketBaseB2FReloadMap + checkevent EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_2 + iffalse TeamRocketBaseB2FReloadMap + checkevent EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_3 + iffalse TeamRocketBaseB2FReloadMap + reloadmapafterbattle + special PlayMapMusic + applymovement PLAYER, RocketBasePlayerLeavesElectrodesMovement1 + sjump RocketBaseElectrodeScript + +RocketElectrode2: + cry ELECTRODE + loadwildmon ELECTRODE, 23 + startbattle + iftrue TeamRocketBaseB2FReloadMap + disappear TEAMROCKETBASEB2F_ELECTRODE2 + disappear TEAMROCKETBASEB2F_ELECTRODE5 + checkevent EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_1 + iffalse TeamRocketBaseB2FReloadMap + checkevent EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_2 + iffalse TeamRocketBaseB2FReloadMap + checkevent EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_3 + iffalse TeamRocketBaseB2FReloadMap + reloadmapafterbattle + special PlayMapMusic + applymovement PLAYER, RocketBasePlayerLeavesElectrodesMovement2 + sjump RocketBaseElectrodeScript + +RocketElectrode3: + cry ELECTRODE + loadwildmon ELECTRODE, 23 + startbattle + iftrue TeamRocketBaseB2FReloadMap + disappear TEAMROCKETBASEB2F_ELECTRODE3 + disappear TEAMROCKETBASEB2F_ELECTRODE6 + checkevent EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_1 + iffalse TeamRocketBaseB2FReloadMap + checkevent EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_2 + iffalse TeamRocketBaseB2FReloadMap + checkevent EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_3 + iffalse TeamRocketBaseB2FReloadMap + reloadmapafterbattle + special PlayMapMusic + applymovement PLAYER, RocketBasePlayerLeavesElectrodesMovement3 + sjump RocketBaseElectrodeScript + +TeamRocketBaseB2FReloadMap: + reloadmapafterbattle + end + +RocketBaseElectrodeScript: + moveobject TEAMROCKETBASEB2F_LANCE, 18, 6 + appear TEAMROCKETBASEB2F_LANCE + applymovement TEAMROCKETBASEB2F_LANCE, RocketBaseLanceLeavesElectrodesMovement + turnobject PLAYER, RIGHT + opentext + writetext RocketBaseLanceElectrodeDoneText + promptbutton + verbosegiveitem HM_WHIRLPOOL + setevent EVENT_GOT_HM06_WHIRLPOOL + writetext RocketBaseLanceWhirlpoolText + waitbutton + closetext + turnobject TEAMROCKETBASEB2F_LANCE, DOWN + opentext + writetext RocketBaseLanceMonMasterText + waitbutton + closetext + turnobject PLAYER, DOWN + applymovement TEAMROCKETBASEB2F_LANCE, RocketBaseLanceLeavesBaseMovement + disappear TEAMROCKETBASEB2F_LANCE + setevent EVENT_CLEARED_ROCKET_HIDEOUT + clearflag ENGINE_ROCKET_SIGNAL_ON_CH20 + setevent EVENT_ROUTE_43_GATE_ROCKETS + setevent EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_GYM + setscene SCENE_TEAMROCKETBASEB2F_NOOP + clearevent EVENT_LAKE_OF_RAGE_CIVILIANS + setevent EVENT_TURNED_OFF_SECURITY_CAMERAS + setevent EVENT_SECURITY_CAMERA_1 + setevent EVENT_SECURITY_CAMERA_2 + setevent EVENT_SECURITY_CAMERA_3 + setevent EVENT_SECURITY_CAMERA_4 + setevent EVENT_SECURITY_CAMERA_5 + end + +TeamRocketBaseB2FLockedDoor: + conditional_event EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER, .Script + +.Script: + opentext + checkevent EVENT_LEARNED_HAIL_GIOVANNI + iftrue .KnowsPassword + writetext RocketBaseDoorNoPasswordText + waitbutton + closetext + end + +.KnowsPassword: + writetext RocketBaseDoorKnowPasswordText + waitbutton + playsound SFX_ENTER_DOOR + changeblock 14, 12, $07 ; floor + reloadmappart + closetext + setevent EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER + waitsfx + end + +TeamRocketBaseB2FTransmitterScript: + opentext + checkevent EVENT_CLEARED_ROCKET_HIDEOUT + iftrue .Deactivated + writetext RocketBaseB2FTransmitterText + waitbutton + closetext + end + +.Deactivated: + writetext RocketBaseB2FDeactivateTransmitterText + waitbutton + closetext + end + +TeamRocketBaseB2FTMThief: + itemball TM_THIEF + +TeamRocketBaseB2FHiddenFullHeal: + hiddenitem FULL_HEAL, EVENT_TEAM_ROCKET_BASE_B2F_HIDDEN_FULL_HEAL + +RocketBaseLanceLeavesAfterHealMovement: + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step_end + +RocketBaseLanceLeavesAfterHealRightMovement: + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step_end + +RocketBasePlayerApproachesBossFMovement: + step DOWN + step DOWN + step DOWN + turn_head RIGHT + step_end + +RocketBaseBossFApproachesPlayerMovement: + big_step LEFT + big_step LEFT + big_step UP + big_step UP + big_step UP + big_step LEFT + big_step LEFT + big_step LEFT + big_step LEFT + turn_head DOWN + step_end + +RocketBaseGruntApproachesPlayerMovement: + big_step LEFT + big_step LEFT + big_step UP + big_step UP + big_step LEFT + big_step LEFT + step_end + +RocketBaseDragoniteAttacksMovement: + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + step_end + +RocketBaseBossFHitMovement: + fix_facing + set_sliding + jump_step RIGHT + remove_sliding + remove_fixed_facing + step_end + +RocketBaseBossFFacesPlayerMovement: + slow_step DOWN + turn_head LEFT + step_end + +RocketBaseLanceApproachesBossFMovement: + step RIGHT + step RIGHT + step RIGHT + step_end + +RocketBaseBossFBattlesPlayerMovement: + big_step LEFT + step_end + +RocketBaseGruntBattlesLanceMovement: + big_step LEFT + step_end + +RocketBaseGruntProtectsBossFMovement: + big_step LEFT + big_step UP + turn_head LEFT + step_end + +RocketBaseLanceChecksPlayerMovement: + step RIGHT + step RIGHT + turn_head DOWN + step_end + +RocketBaseLanceApproachesMachineMovement: + step UP + step UP + step UP + step_end + +RocketBaseLancePacesMovement: + step_sleep 8 + step LEFT + step LEFT + turn_head UP + step_sleep 8 + step RIGHT + step RIGHT + step RIGHT + step RIGHT + turn_head UP + step_sleep 8 + step LEFT + step LEFT + turn_head DOWN + step_end + +RocketBaseLanceApproachesElectrodesMovement: + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step UP + step UP + step UP + step UP + step UP + step_end + +RocketBasePlayerCantLeaveElectrodesMovement: + step UP + step LEFT + step LEFT + step LEFT + step LEFT + turn_head UP + step_end + +RocketBasePlayerCantGoRightMovement: + step LEFT + step_end + +RocketBaseLanceLeavesElectrodesMovement: + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step LEFT + step LEFT + step LEFT + step_end + +RocketBaseLanceLeavesBaseMovement: + step DOWN + step DOWN + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step_end + +RocketBasePlayerLeavesElectrodesMovement1: + step RIGHT + step RIGHT + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step_end + +RocketBasePlayerLeavesElectrodesMovement2: + step RIGHT + step RIGHT + step DOWN + step DOWN + step DOWN + step DOWN + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step_end + +RocketBasePlayerLeavesElectrodesMovement3: + step RIGHT + step RIGHT + step DOWN + step DOWN + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step_end + +RocketBaseExecutiveFHoldItText: + text "Hold it right" + line "there!" + done + +RocketBaseBossFThrashText: + text "We can't have a" + line "brat like you on" + cont "the loose." + + para "It's harmful to" + line "TEAM ROCKET's" + cont "pride, you see." + + para "However strong you" + line "may be, you can't" + + para "take both of us at" + line "the same time." + + para "Sorry, baby. Now" + line "get ready to be" + cont "thrashed." + done + +RocketBaseLanceShareFunText: + text "Hey! Don't be so" + line "selfish. Spread" + cont "the fun around." + done + +RocketBaseBossDontMeddleText: + text "What? You had an" + line "accomplice?" + + para "Where is your" + line "sense of honor?" + + para "As the interim" + line "boss in place of" + + para "GIOVANNI, I'll" + line "show you how wrong" + + para "it is to meddle" + line "with TEAM ROCKET!" + done + +RocketBaseBossWinText: + text "Tch, you really" + line "are strong." + + para "It's too bad." + + para "If you were to" + line "join TEAM ROCKET," + + para "you could become" + line "an EXECUTIVE." + done + +RocketBaseBossRetreatText: + text "…This hideout is" + line "done for…" + + para "But that's fine." + line "The broadcast ex-" + cont "periment was a" + cont "total success." + + para "It doesn't matter" + line "what happens to" + cont "this hideout now." + + para "We have much big-" + line "ger plans." + + para "You'll come to" + line "appreciate TEAM" + + para "ROCKET's true" + line "power soon enough." + + para "Enjoy yourself" + line "while you can…" + + para "Fufufufu…" + done + +RocketBaseLancePostBattleText: + text "LANCE: That did" + line "it. We defeated" + + para "all the ROCKETS" + line "here." + + para "But I'm concerned" + line "about the young" + + para "guy I battled in" + line "the process…" + done + +RocketBaseLancePowerOffText: + text "Sorry, ." + line "I saw how well you" + + para "were doing, so I" + line "just hung back." + + para "Now all there is" + line "left to do is to" + + para "turn off that odd" + line "radio signal." + done + +RockerBaseLanceElectrodeFaintText: + text "It's this machine" + line "that's causing all" + cont "the problems." + + para "I don't see a" + line "switch on it…" + + para "We have no choice." + line "We have to make" + + para "all the ELECTRODE" + line "faint." + + para "That should stop" + line "this machine from" + + para "transmitting that" + line "strange signal." + + para "It's no fault of" + line "the #MON, so it" + + para "makes me feel" + line "guilty." + + para ", let's" + line "split the job." + done + +RocketBaseLancesSideText: + text "LANCE: Leave this" + line "side to me." + done + +RocketBaseLanceElectrodeDoneText: + text "LANCE: That odd" + line "signal has finally" + cont "stopped." + + para "The LAKE should be" + line "back to normal." + + para "You're the hero!" + line "Let me thank you" + + para "on behalf of all" + line "the #MON." + + para "Oh, yes. You" + line "should take this." + + para "I found it here," + line "but I don't have" + cont "any need for it." + done + +RocketBaseReceivedHM06Text: ; unreferenced + text " received" + line "HM06." + done + +RocketBaseLanceWhirlpoolText: + text "That's WHIRLPOOL." + line "Teach it to a" + + para "#MON to get" + line "across wild water." + + para "But keep this in" + line "mind." + + para "You can use that" + line "out of battle only" + + para "with the BADGE" + line "from MAHOGANY GYM." + done + +RocketBaseLanceMonMasterText: + text "…" + + para "The journey to be-" + line "coming the #MON" + + para "MASTER is long and" + line "difficult." + + para "Knowing that, will" + line "you keep going?" + + para "…" + + para "I see. No, you're" + line "right." + + para "If you would give" + line "up that easily," + + para "you would have" + line "never chased that" + + para "dream in the first" + line "place." + + para "I look forward to" + line "seeing you again!" + done + +LanceHealsText1: + text "LANCE: Are you all" + line "right?" + + para "Your #MON are" + line "hurt and tired." + + para "Here, give them" + line "some of my medi-" + cont "cine." + done + +LanceHealsText2: + text "LANCE: ," + line "let's give it our" + cont "best for #MON." + done + +GruntM17SeenText: + text "The door won't" + line "open?" + + para "Well, duh." + line "It has to have a" + + para "password that only" + line "TEAM ROCKET knows." + done + +GruntM17BeatenText: + text "What? I lost?" + done + +GruntM17AfterBattleText: + text "Heh, I'm just a" + line "GRUNT." + + para "I don't know the" + line "password. Too bad" + cont "for you." + done + +GruntM18SeenText: + text "Oh, a kid? I don't" + line "really like this," + + para "but eliminate you" + line "I must." + done + +GruntM18BeatenText: + text "I knew I'd lose…" + done + +GruntM18AfterBattleText: + text "I got wiped out on" + line "the last mission" + cont "by a kid too." + + para "When we were ab-" + line "ducting #MON," + + para "this kid with long" + line "red hair and mean-" + + para "looking eyes just" + line "creamed me…" + done + +GruntM19SeenText: + text "You rotten little" + line "pest!" + done + +GruntM19BeatenText: + text "Grrrr…" + done + +GruntM19AfterBattleText: + text "Heh, only the boss" + line "knows the password" + cont "for that door." + + para "Where's the boss?" + line "Who knows? Go look" + cont "for yourself." + done + +RocketBaseDoorNoPasswordText: + text "The door's closed…" + + para "It needs a pass-" + line "word to open." + done + +RocketBaseDoorKnowPasswordText: + text "The door's closed…" + + para " entered" + line "the password." + + para "The door opened!" + done + +RocketBaseB2FTransmitterText: + text "It's the radio" + line "transmitter that's" + + para "sending the" + line "sinister signal." + + para "It's working at" + line "full capacity." + done + +RocketBaseB2FDeactivateTransmitterText: + text "The radio trans-" + line "mitter has finally" + + para "stopped its evil" + line "broadcast." + done + +TeamRocketBaseB2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 14, TEAM_ROCKET_BASE_B1F, 2 + warp_event 3, 2, TEAM_ROCKET_BASE_B3F, 1 + warp_event 27, 2, TEAM_ROCKET_BASE_B3F, 2 + warp_event 3, 6, TEAM_ROCKET_BASE_B3F, 3 + warp_event 27, 14, TEAM_ROCKET_BASE_B3F, 4 + + def_coord_events + coord_event 5, 14, SCENE_TEAMROCKETBASEB2F_LANCE_HEALS, LanceHealsScript1 + coord_event 4, 13, SCENE_TEAMROCKETBASEB2F_LANCE_HEALS, LanceHealsScript2 + coord_event 14, 11, SCENE_TEAMROCKETBASEB2F_ROCKET_BOSS, RocketBaseBossFLeft + coord_event 15, 11, SCENE_TEAMROCKETBASEB2F_ROCKET_BOSS, RocketBaseBossFRight + coord_event 14, 12, SCENE_TEAMROCKETBASEB2F_ELECTRODES, RocketBaseCantLeaveScript + coord_event 15, 12, SCENE_TEAMROCKETBASEB2F_ELECTRODES, RocketBaseCantLeaveScript + coord_event 12, 3, SCENE_TEAMROCKETBASEB2F_ELECTRODES, RocketBaseLancesSideScript + coord_event 12, 10, SCENE_TEAMROCKETBASEB2F_ELECTRODES, RocketBaseLancesSideScript + coord_event 12, 11, SCENE_TEAMROCKETBASEB2F_ELECTRODES, RocketBaseLancesSideScript + + def_bg_events + bg_event 14, 12, BGEVENT_IFNOTSET, TeamRocketBaseB2FLockedDoor + bg_event 15, 12, BGEVENT_IFNOTSET, TeamRocketBaseB2FLockedDoor + bg_event 17, 9, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 16, 9, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 15, 9, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 14, 9, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 13, 9, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 12, 9, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 12, 8, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 12, 7, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 12, 6, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 12, 5, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 12, 4, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 13, 4, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 14, 4, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 15, 4, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 16, 4, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 17, 4, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 17, 5, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 17, 6, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 17, 7, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 17, 8, BGEVENT_READ, TeamRocketBaseB2FTransmitterScript + bg_event 26, 7, BGEVENT_ITEM, TeamRocketBaseB2FHiddenFullHeal + + def_object_events + object_event 20, 16, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_GRUNT_WITH_EXECUTIVE + object_event 20, 16, SPRITE_ROCKET_GIRL, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_EXECUTIVE + object_event 5, 13, SPRITE_LANCE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_LANCE + object_event 9, 13, SPRITE_DRAGON, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_DRAGONITE + object_event 7, 5, SPRITE_VOLTORB, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RocketElectrode1, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_1 + object_event 7, 7, SPRITE_VOLTORB, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RocketElectrode2, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_2 + object_event 7, 9, SPRITE_VOLTORB, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, RocketElectrode3, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_3 + object_event 22, 5, SPRITE_VOLTORB, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_1 + object_event 22, 7, SPRITE_VOLTORB, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_2 + object_event 22, 9, SPRITE_VOLTORB, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B2F_ELECTRODE_3 + object_event 25, 13, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM17, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 4, 1, SPRITE_ROCKET, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 1, TrainerGruntM18, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 21, 14, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 4, TrainerGruntM19, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 3, 10, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB2FTMThief, EVENT_TEAM_ROCKET_BASE_B2F_TM_THIEF diff --git a/maps/TeamRocketBaseB2F.blk b/maps/TeamRocketBaseB2F.blk new file mode 100644 index 0000000..dbf0687 --- /dev/null +++ b/maps/TeamRocketBaseB2F.blk @@ -0,0 +1 @@ +<6666666666666="<6666666=7<66<9=7"<9=7"16<9=7"<21=66=<666666666=7"&4444%$?7>44>4444444444? \ No newline at end of file diff --git a/maps/TeamRocketBaseB3F.asm b/maps/TeamRocketBaseB3F.asm new file mode 100644 index 0000000..8136302 --- /dev/null +++ b/maps/TeamRocketBaseB3F.asm @@ -0,0 +1,606 @@ + object_const_def + const TEAMROCKETBASEB3F_LANCE + const TEAMROCKETBASEB3F_ROCKET1 + const TEAMROCKETBASEB3F_MOLTRES + const TEAMROCKETBASEB3F_ROCKET_GIRL + const TEAMROCKETBASEB3F_ROCKET2 + const TEAMROCKETBASEB3F_SCIENTIST1 + const TEAMROCKETBASEB3F_SCIENTIST2 + const TEAMROCKETBASEB3F_ROCKET3 + const TEAMROCKETBASEB3F_RIVAL + const TEAMROCKETBASEB3F_POKE_BALL1 + const TEAMROCKETBASEB3F_POKE_BALL2 + const TEAMROCKETBASEB3F_POKE_BALL3 + const TEAMROCKETBASEB3F_POKE_BALL4 + const TEAMROCKETBASEB3F_POKE_BALL5 + +TeamRocketBaseB3F_MapScripts: + def_scene_scripts + scene_script TeamRocketBaseB3FLanceGetsPasswordScene, SCENE_TEAMROCKETBASEB3F_LANCE_GETS_PASSWORD + scene_script TeamRocketBaseB3FNoop1Scene, SCENE_TEAMROCKETBASEB3F_RIVAL_ENCOUNTER + scene_script TeamRocketBaseB3FNoop2Scene, SCENE_TEAMROCKETBASEB3F_ROCKET_BOSS + scene_script TeamRocketBaseB3FNoop3Scene, SCENE_TEAMROCKETBASEB3F_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, TeamRocketBaseB3FCheckGiovanniDoorCallback + +TeamRocketBaseB3FLanceGetsPasswordScene: + sdefer LanceGetPasswordScript + end + +TeamRocketBaseB3FNoop1Scene: + end + +TeamRocketBaseB3FNoop2Scene: + end + +TeamRocketBaseB3FNoop3Scene: + end + +TeamRocketBaseB3FCheckGiovanniDoorCallback: + checkevent EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE + iftrue .OpenSesame + endcallback + +.OpenSesame: + changeblock 10, 8, $07 ; floor + endcallback + +LanceGetPasswordScript: + turnobject PLAYER, LEFT + pause 5 + turnobject TEAMROCKETBASEB3F_MOLTRES, RIGHT + pause 20 + applymovement TEAMROCKETBASEB3F_LANCE, RocketBaseLanceApproachesPlayerMovement + opentext + writetext LanceGetPasswordText + waitbutton + closetext + applymovement TEAMROCKETBASEB3F_LANCE, RocketBaseLanceLeavesMovement + disappear TEAMROCKETBASEB3F_LANCE + setscene SCENE_TEAMROCKETBASEB3F_RIVAL_ENCOUNTER + end + +RocketBaseRival: + turnobject PLAYER, LEFT + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + appear TEAMROCKETBASEB3F_RIVAL + applymovement TEAMROCKETBASEB3F_RIVAL, RocketBaseRivalEnterMovement + turnobject PLAYER, LEFT + playmusic MUSIC_RIVAL_ENCOUNTER + opentext + writetext RocketBaseRivalText + waitbutton + closetext + playsound SFX_TACKLE + applymovement PLAYER, RocketBaseRivalShovesPlayerMovement + applymovement TEAMROCKETBASEB3F_RIVAL, RocketBaseRivalLeavesMovement + disappear TEAMROCKETBASEB3F_RIVAL + setscene SCENE_TEAMROCKETBASEB3F_ROCKET_BOSS + special RestartMapMusic + end + +TeamRocketBaseB3FRocketScript: + jumptextfaceplayer TeamRocketBaseB3FRocketText + +RocketBaseBossLeft: + applymovement PLAYER, RocketBasePlayerApproachesBossLeftMovement + sjump RocketBaseBoss + +RocketBaseBossRight: + applymovement PLAYER, RocketBasePlayerApproachesBossRightMovement +RocketBaseBoss: + pause 30 + showemote EMOTE_SHOCK, TEAMROCKETBASEB3F_ROCKET1, 15 + playmusic MUSIC_ROCKET_ENCOUNTER + turnobject TEAMROCKETBASEB3F_ROCKET1, DOWN + opentext + writetext ExecutiveM4BeforeText + waitbutton + closetext + applymovement TEAMROCKETBASEB3F_ROCKET1, RocketBaseBossApproachesPlayerMovement + winlosstext ExecutiveM4BeatenText, 0 + setlasttalked TEAMROCKETBASEB3F_ROCKET1 + loadtrainer EXECUTIVEM, EXECUTIVEM_4 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_ROCKET_EXECUTIVEM_4 + opentext + writetext ExecutiveM4AfterText + waitbutton + closetext + applymovement TEAMROCKETBASEB3F_ROCKET1, RocketBaseBossHitsTableMovement + playsound SFX_TACKLE + applymovement TEAMROCKETBASEB3F_ROCKET1, RocketBaseBossLeavesMovement + disappear TEAMROCKETBASEB3F_ROCKET1 + setscene SCENE_TEAMROCKETBASEB3F_NOOP + end + +RocketBaseMurkrow: + opentext + writetext RocketBaseMurkrowText + waitbutton + closetext + setevent EVENT_LEARNED_HAIL_GIOVANNI + end + +SlowpokeTailGrunt: + trainer GRUNTF, GRUNTF_5, EVENT_BEAT_ROCKET_GRUNTF_5, GruntF5SeenText, GruntF5BeatenText, 0, GruntF5Script + +GruntF5Script: + endifjustbattled + opentext + writetext GruntF5AfterBattleText + waitbutton + closetext + setevent EVENT_LEARNED_SLOWPOKETAIL + end + +RaticateTailGrunt: + trainer GRUNTM, GRUNTM_28, EVENT_BEAT_ROCKET_GRUNTM_28, GruntM28SeenText, GruntM28BeatenText, 0, GruntM28Script + +GruntM28Script: + endifjustbattled + opentext + writetext GruntM28AfterBattleText + waitbutton + closetext + setevent EVENT_LEARNED_RATICATE_TAIL + end + +TrainerScientistRoss: + trainer SCIENTIST, ROSS, EVENT_BEAT_SCIENTIST_ROSS, ScientistRossSeenText, ScientistRossBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext ScientistRossAfterBattleText + waitbutton + closetext + end + +TrainerScientistMitch: + trainer SCIENTIST, MITCH, EVENT_BEAT_SCIENTIST_MITCH, ScientistMitchSeenText, ScientistMitchBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext ScientistMitchAfterBattleText + waitbutton + closetext + end + +TeamRocketBaseB3FLockedDoor: + conditional_event EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE, .Script + +.Script: + opentext + checkevent EVENT_LEARNED_SLOWPOKETAIL + iffalse .NeedsPassword + checkevent EVENT_LEARNED_RATICATE_TAIL + iffalse .NeedsPassword + sjump .OpenSesame + +.NeedsPassword: + writetext TeamRocketBaseB3FLockedDoorNeedsPasswordText + waitbutton + closetext + end + +.OpenSesame: + writetext TeamRocketBaseB3FLockedDoorOpenSesameText + waitbutton + playsound SFX_ENTER_DOOR + changeblock 10, 8, $07 ; floor + reloadmappart + closetext + setevent EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE + waitsfx + end + +TeamRocketBaseB3FOathScript: + jumpstd TeamRocketOathScript + +TeamRocketBaseB3FProtein: + itemball PROTEIN + +TeamRocketBaseB3FXSpecial: + itemball X_SPECIAL + +TeamRocketBaseB3FFullHeal: + itemball FULL_HEAL + +TeamRocketBaseB3FIceHeal: + itemball ICE_HEAL + +TeamRocketBaseB3FUltraBall: + itemball ULTRA_BALL + +RocketBaseLanceApproachesPlayerMovement: + step RIGHT + step_end + +RocketBaseLanceLeavesMovement: + step DOWN + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step_end + +RocketBasePlayerApproachesBossLeftMovement: + step UP + step UP + step UP + step LEFT + step LEFT + turn_head UP + step_end + +RocketBasePlayerApproachesBossRightMovement: + step UP + step UP + step LEFT + step UP + step LEFT + step LEFT + turn_head UP + step_end + +RocketBaseBossApproachesPlayerMovement: + step DOWN + step_end + +RocketBaseBossHitsTableMovement: + big_step RIGHT + big_step RIGHT + step_end + +RocketBaseBossLeavesMovement: + fix_facing + fast_jump_step LEFT + remove_fixed_facing + step_sleep 8 + step_sleep 8 + slow_step RIGHT + big_step DOWN + big_step DOWN + big_step DOWN + big_step RIGHT + big_step DOWN + big_step DOWN + big_step DOWN + big_step LEFT + big_step LEFT + big_step LEFT + big_step LEFT + big_step LEFT + big_step UP + big_step UP + big_step UP + big_step UP + big_step UP + big_step UP + big_step UP + big_step UP + big_step LEFT + big_step LEFT + step_end + +RocketBaseRivalEnterMovement: + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step RIGHT + step RIGHT + step RIGHT + step_end + +RocketBaseRivalLeavesMovement: + step LEFT + step LEFT + step UP + step UP + step UP + step UP + step UP + step_end + +RocketBaseRivalShovesPlayerMovement: + fix_facing + big_step RIGHT + remove_fixed_facing + step_end + +LanceGetPasswordText: + text "LANCE: It takes" + line "two passwords to" + + para "get into the" + line "boss's quarters." + + para "Those passwords" + line "are known only to" + cont "a few ROCKETS." + + para "That ROCKET there" + line "very graciously" + cont "told me so." + + para ", let's go" + line "get the passwords." + done + +TeamRocketBaseB3FRocketText: + text "Urrggh… The guy" + line "in the cape is" + cont "incredibly tough…" + done + +RocketBaseRivalText: + text "…" + + para "Didn't I tell you" + line "that I was going" + + para "to destroy TEAM" + line "ROCKET?" + + para "…Tell me, who was" + line "the guy in the" + + para "cape who used" + line "dragon #MON?" + + para "My #MON were no" + line "match at all." + + para "I don't care that" + line "I lost. I can beat" + + para "him by getting" + line "stronger #MON." + + para "It's what he said" + line "that bothers me…" + + para "He told me that" + line "I don't love and" + + para "trust my #MON" + line "enough." + + para "I'm furious that I" + line "lost to a bleeding" + cont "heart like him." + + para "…Humph! I don't" + line "have the time for" + cont "the likes of you!" + done + +ExecutiveM4BeforeText: + text "What? Who are you?" + line "This is the office" + + para "of our leader," + line "GIOVANNI." + + para "Since disbanding" + line "TEAM ROCKET three" + + para "years ago, he has" + line "been in training." + + para "But we're certain" + line "he will be back" + + para "some day to assume" + line "command again." + + para "That's why we're" + line "standing guard." + + para "I won't let any-" + line "one disturb this" + cont "place!" + done + +ExecutiveM4BeatenText: + text "I… I couldn't do a" + line "thing…" + + para "GIOVANNI, please" + line "forgive me…" + done + +ExecutiveM4AfterText: + text "No, I can't let" + line "this affect me." + + para "I have to inform" + line "the others…" + done + +RocketBaseMurkrowText: + text "MURKROW: The" + line "password is…" + + para "HAIL GIOVANNI." + done + +GruntF5SeenText: + text "Do I know the" + line "password?" + + para "Maybe." + + para "But no weakling's" + line "going to get it!" + done + +GruntF5BeatenText: + text "All right. Stop." + line "I'll tell you." + done + +GruntF5AfterBattleText: + text "The password to" + line "the boss's room is" + + para "SLOWPOKETAIL." + + para "But it's useless" + line "unless you have" + cont "two passwords." + done + +GruntM28SeenText: + text "Hyuck-hyuck-hyuck!" + + para "You're challenging" + line "me to a battle?" + + para "Hah! You're nuts," + line "but you have guts!" + + para "I like that!" + + para "If you can beat" + line "me, I'll tell you" + + para "a password to the" + line "boss's room!" + done + +GruntM28BeatenText: + text "Hyuck-hyuck-hyuck!" + line "You're good!" + done + +GruntM28AfterBattleText: + text "Hyuck-hyuck-hyuck!" + + para "The password to" + line "the boss's room…" + + para "Uh…, I think it is" + line "RATICATE TAIL." + done + +ScientistRossSeenText: + text "I used to work for" + line "SILPH, but now I" + + para "run research for" + line "TEAM ROCKET." + + para "A meddlesome child" + line "like you needs to" + cont "be punished." + done + +ScientistRossBeatenText: + text "A mere tactical" + line "error cost me…" + done + +ScientistRossAfterBattleText: + text "A radio signal" + line "that drives #-" + cont "MON mad…" + + para "My experiment is a" + line "complete success." + + para "My promotion is" + line "assured. This loss" + + para "means absolutely" + line "nothing." + done + +ScientistMitchSeenText: + text "I don't care that" + line "#MON are hurt" + cont "by our experiment." + done + +ScientistMitchBeatenText: + text "Thinking is my" + line "strong suit, not" + cont "battling." + done + +ScientistMitchAfterBattleText: + text "If we turn up the" + line "power of our radio" + + para "signal for broad-" + line "cast nationwide…" + + para "The very thought" + line "excites me!" + done + +TeamRocketBaseB3FLockedDoorNeedsPasswordText: + text "The door's closed…" + + para "It needs two" + line "passwords to open." + done + +TeamRocketBaseB3FLockedDoorOpenSesameText: + text "The door's closed…" + + para " entered" + line "the two passwords." + + para "The door opened!" + done + +TeamRocketBaseB3F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 2, TEAM_ROCKET_BASE_B2F, 2 + warp_event 27, 2, TEAM_ROCKET_BASE_B2F, 3 + warp_event 3, 6, TEAM_ROCKET_BASE_B2F, 4 + warp_event 27, 14, TEAM_ROCKET_BASE_B2F, 5 + + def_coord_events + coord_event 10, 8, SCENE_TEAMROCKETBASEB3F_ROCKET_BOSS, RocketBaseBossLeft + coord_event 11, 8, SCENE_TEAMROCKETBASEB3F_ROCKET_BOSS, RocketBaseBossRight + coord_event 8, 10, SCENE_TEAMROCKETBASEB3F_RIVAL_ENCOUNTER, RocketBaseRival + + def_bg_events + bg_event 10, 9, BGEVENT_IFNOTSET, TeamRocketBaseB3FLockedDoor + bg_event 11, 9, BGEVENT_IFNOTSET, TeamRocketBaseB3FLockedDoor + bg_event 10, 1, BGEVENT_READ, TeamRocketBaseB3FOathScript + bg_event 11, 1, BGEVENT_READ, TeamRocketBaseB3FOathScript + bg_event 12, 1, BGEVENT_READ, TeamRocketBaseB3FOathScript + bg_event 13, 1, BGEVENT_READ, TeamRocketBaseB3FOathScript + bg_event 4, 13, BGEVENT_READ, TeamRocketBaseB3FOathScript + bg_event 5, 13, BGEVENT_READ, TeamRocketBaseB3FOathScript + bg_event 6, 13, BGEVENT_READ, TeamRocketBaseB3FOathScript + bg_event 7, 13, BGEVENT_READ, TeamRocketBaseB3FOathScript + + def_object_events + object_event 25, 14, SPRITE_LANCE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, LanceGetPasswordScript, EVENT_TEAM_ROCKET_BASE_B3F_LANCE_PASSWORDS + object_event 8, 3, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TEAM_ROCKET_BASE_B3F_EXECUTIVE + object_event 7, 2, SPRITE_MOLTRES, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, RocketBaseMurkrow, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 21, 7, SPRITE_ROCKET_GIRL, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 0, SlowpokeTailGrunt, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 5, 14, SPRITE_ROCKET, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, RaticateTailGrunt, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 23, 11, SPRITE_SCIENTIST, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 0, TrainerScientistRoss, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 11, 15, SPRITE_SCIENTIST, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerScientistMitch, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 24, 14, SPRITE_ROCKET, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TeamRocketBaseB3FRocketScript, EVENT_TEAM_ROCKET_BASE_POPULATION + object_event 4, 5, SPRITE_RIVAL, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_TEAM_ROCKET_BASE + object_event 1, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB3FProtein, EVENT_TEAM_ROCKET_BASE_B3F_PROTEIN + object_event 3, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB3FXSpecial, EVENT_TEAM_ROCKET_BASE_B3F_X_SPECIAL + object_event 28, 9, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB3FFullHeal, EVENT_TEAM_ROCKET_BASE_B3F_FULL_HEAL + object_event 17, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB3FIceHeal, EVENT_TEAM_ROCKET_BASE_B3F_ICE_HEAL + object_event 14, 10, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TeamRocketBaseB3FUltraBall, EVENT_TEAM_ROCKET_BASE_B3F_ULTRA_BALL diff --git a/maps/TeamRocketBaseB3F.blk b/maps/TeamRocketBaseB3F.blk new file mode 100644 index 0000000..b7a0031 --- /dev/null +++ b/maps/TeamRocketBaseB3F.blk @@ -0,0 +1 @@ +<66<=666666=""77""7<666=7"" 7")77">4 4:"77#444444?")77" >%$4?7" 37>444444?444444? \ No newline at end of file diff --git a/maps/TimeCapsule.asm b/maps/TimeCapsule.asm new file mode 100644 index 0000000..01aa5c2 --- /dev/null +++ b/maps/TimeCapsule.asm @@ -0,0 +1,69 @@ + object_const_def + const TIMECAPSULE_CHRIS1 + const TIMECAPSULE_CHRIS2 + +TimeCapsule_MapScripts: + def_scene_scripts + scene_script TimeCapsuleInitializeScene, SCENE_TIMECAPSULE_INITIALIZE + scene_script TimeCapsuleNoopScene, SCENE_TIMECAPSULE_NOOP + + def_callbacks + callback MAPCALLBACK_OBJECTS, TimeCapsuleSetWhichChrisCallback + +TimeCapsuleInitializeScene: + sdefer TimeCapsuleInitializeAndPreparePokecenter2FScript + end + +TimeCapsuleNoopScene: + end + +TimeCapsuleSetWhichChrisCallback: + special CableClubCheckWhichChris + iffalse .Chris2 + disappear TIMECAPSULE_CHRIS2 + appear TIMECAPSULE_CHRIS1 + endcallback + +.Chris2: + disappear TIMECAPSULE_CHRIS1 + appear TIMECAPSULE_CHRIS2 + endcallback + +TimeCapsuleInitializeAndPreparePokecenter2FScript: + setscene SCENE_TIMECAPSULE_NOOP + setmapscene POKECENTER_2F, SCENE_POKECENTER2F_LEAVE_TIME_CAPSULE + end + +TimeCapsuleConsoleScript: + special TimeCapsule + newloadmap MAPSETUP_LINKRETURN + end + +TimeCapsuleFriendScript: + opentext + writetext .FriendReadyText + waitbutton + closetext + end + +.FriendReadyText: + text "Your friend is" + line "ready." + done + +TimeCapsule_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 7, POKECENTER_2F, 4 + warp_event 5, 7, POKECENTER_2F, 4 + + def_coord_events + + def_bg_events + bg_event 4, 4, BGEVENT_RIGHT, TimeCapsuleConsoleScript + bg_event 5, 4, BGEVENT_LEFT, TimeCapsuleConsoleScript + + def_object_events + object_event 3, 4, SPRITE_CHRIS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TimeCapsuleFriendScript, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + object_event 6, 4, SPRITE_CHRIS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TimeCapsuleFriendScript, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 diff --git a/maps/TinTower1F.asm b/maps/TinTower1F.asm new file mode 100644 index 0000000..99427a1 --- /dev/null +++ b/maps/TinTower1F.asm @@ -0,0 +1,552 @@ + object_const_def + const TINTOWER1F_SUICUNE + const TINTOWER1F_RAIKOU + const TINTOWER1F_ENTEI + const TINTOWER1F_EUSINE + const TINTOWER1F_SAGE1 + const TINTOWER1F_SAGE2 + const TINTOWER1F_SAGE3 + const TINTOWER1F_SAGE4 + const TINTOWER1F_SAGE5 + const TINTOWER1F_SAGE6 + +TinTower1F_MapScripts: + def_scene_scripts + scene_script TinTower1FSuicuneBattleScene, SCENE_TINTOWER1F_SUICUNE_BATTLE + scene_script TinTower1FNoopScene, SCENE_TINTOWER1F_NOOP + + def_callbacks + callback MAPCALLBACK_OBJECTS, TinTower1FNPCsCallback + callback MAPCALLBACK_TILES, TinTower1FStairsCallback + callback MAPCALLBACK_NEWMAP, TinTower1FLoadReservedIDsCallback + +TinTower1FSuicuneBattleScene: + sdefer TinTower1FSuicuneBattleScript + end + +TinTower1FNoopScene: + end + +TinTower1FLoadReservedIDsCallback: + loadmonindex 1, RAIKOU + loadmonindex 2, ENTEI + loadmonindex 3, SUICUNE + endcallback + +TinTower1FNPCsCallback: + checkevent EVENT_GOT_RAINBOW_WING + iftrue .GotRainbowWing + checkevent EVENT_BEAT_ELITE_FOUR + iffalse .FaceBeasts + special BeastsCheck + iffalse .FaceBeasts + clearevent EVENT_TIN_TOWER_1F_WISE_TRIO_2 + setevent EVENT_TIN_TOWER_1F_WISE_TRIO_1 +.GotRainbowWing: + checkevent EVENT_FOUGHT_HO_OH + iffalse .Done + appear TINTOWER1F_EUSINE +.Done: + endcallback + +.FaceBeasts: + checkevent EVENT_FOUGHT_SUICUNE + iftrue .FoughtSuicune + appear TINTOWER1F_SUICUNE + loadmonindex 0, RAIKOU + special MonCheck + iftrue .NoRaikou + appear TINTOWER1F_RAIKOU + sjump .CheckEntei + +.NoRaikou: + disappear TINTOWER1F_RAIKOU +.CheckEntei: + loadmonindex 0, ENTEI + special MonCheck + iftrue .NoEntei + appear TINTOWER1F_ENTEI + sjump .BeastsDone + +.NoEntei: + disappear TINTOWER1F_ENTEI +.BeastsDone: + endcallback + +.FoughtSuicune: + disappear TINTOWER1F_SUICUNE + disappear TINTOWER1F_RAIKOU + disappear TINTOWER1F_ENTEI + clearevent EVENT_TIN_TOWER_1F_WISE_TRIO_1 + setevent EVENT_TIN_TOWER_1F_WISE_TRIO_2 + endcallback + +TinTower1FStairsCallback: + checkevent EVENT_GOT_RAINBOW_WING + iftrue .DontHideStairs + changeblock 10, 2, $09 ; floor +.DontHideStairs: + endcallback + +TinTower1FSuicuneBattleScript: + applymovement PLAYER, TinTower1FPlayerEntersMovement + pause 15 + loadmonindex 0, RAIKOU + special MonCheck + iftrue .Next1 ; if player caught Raikou, it doesn't appear in Tin Tower + applymovement TINTOWER1F_RAIKOU, TinTower1FRaikouApproachesMovement + turnobject PLAYER, LEFT + cry RAIKOU + pause 10 + playsound SFX_WARP_FROM + applymovement TINTOWER1F_RAIKOU, TinTower1FRaikouLeavesMovement + disappear TINTOWER1F_RAIKOU + playsound SFX_EXIT_BUILDING + waitsfx +.Next1: + loadmonindex 0, ENTEI + special MonCheck + iftrue .Next2 ; if player caught Entei, it doesn't appear in Tin Tower + applymovement TINTOWER1F_ENTEI, TinTower1FEnteiApproachesMovement + turnobject PLAYER, RIGHT + cry ENTEI + pause 10 + playsound SFX_WARP_FROM + applymovement TINTOWER1F_ENTEI, TinTower1FEnteiLeavesMovement + disappear TINTOWER1F_ENTEI + playsound SFX_EXIT_BUILDING + waitsfx +.Next2: + turnobject PLAYER, UP + pause 10 + applymovement PLAYER, TinTower1FPlayerBacksUpMovement + applymovement TINTOWER1F_SUICUNE, TinTower1FSuicuneApproachesMovement + cry SUICUNE + pause 20 + loadwildmon SUICUNE, 40 + loadvar VAR_BATTLETYPE, BATTLETYPE_SUICUNE + startbattle + dontrestartmapmusic + disappear TINTOWER1F_SUICUNE + setevent EVENT_FOUGHT_SUICUNE + setevent EVENT_SAW_SUICUNE_ON_ROUTE_42 + setmapscene ROUTE_42, SCENE_ROUTE42_NOOP + setevent EVENT_SAW_SUICUNE_ON_ROUTE_36 + setmapscene ROUTE_36, SCENE_ROUTE36_NOOP + setevent EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY + setmapscene CIANWOOD_CITY, SCENE_CIANWOODCITY_NOOP + setscene SCENE_TINTOWER1F_NOOP + clearevent EVENT_SET_WHEN_FOUGHT_HO_OH + reloadmapafterbattle + pause 20 + turnobject PLAYER, DOWN + playmusic MUSIC_MYSTICALMAN_ENCOUNTER + playsound SFX_ENTER_DOOR + moveobject TINTOWER1F_EUSINE, 10, 15 + appear TINTOWER1F_EUSINE + applymovement TINTOWER1F_EUSINE, TinTower1FEusineEntersMovement + playsound SFX_ENTER_DOOR + moveobject TINTOWER1F_SAGE1, 9, 15 + appear TINTOWER1F_SAGE1 + applymovement TINTOWER1F_SAGE1, TinTower1FSage1EntersMovement + playsound SFX_ENTER_DOOR + moveobject TINTOWER1F_SAGE2, 9, 15 + appear TINTOWER1F_SAGE2 + applymovement TINTOWER1F_SAGE2, TinTower1FSage2EntersMovement + playsound SFX_ENTER_DOOR + moveobject TINTOWER1F_SAGE3, 9, 15 + appear TINTOWER1F_SAGE3 + applymovement TINTOWER1F_SAGE3, TinTower1FSage3EntersMovement + moveobject TINTOWER1F_SAGE1, 7, 13 + moveobject TINTOWER1F_SAGE2, 9, 13 + moveobject TINTOWER1F_SAGE3, 11, 13 + turnobject PLAYER, RIGHT + opentext + writetext TinTower1FEusineSuicuneText + waitbutton + closetext + applymovement TINTOWER1F_EUSINE, TinTower1FEusineLeavesMovement + playsound SFX_EXIT_BUILDING + disappear TINTOWER1F_EUSINE + waitsfx + special FadeOutMusic + pause 20 + playmapmusic + end + +TinTower1FSage1Script: + jumptextfaceplayer TinTower1FSage1Text + +TinTower1FSage2Script: + jumptextfaceplayer TinTower1FSage2Text + +TinTower1FSage3Script: + jumptextfaceplayer TinTower1FSage3Text + +TinTower1FSage4Script: + checkevent EVENT_FOUGHT_HO_OH + iftrue .FoughtHoOh + jumptextfaceplayer TinTower1FSage4Text1 + +.FoughtHoOh: + jumptextfaceplayer TinTower1FSage4Text2 + +TinTower1FSage5Script: + faceplayer + opentext + checkevent EVENT_FOUGHT_HO_OH + iftrue .FoughtHoOh + checkevent EVENT_GOT_RAINBOW_WING + iftrue .GotRainbowWing + writetext TinTower1FSage5Text1 + promptbutton + verbosegiveitem RAINBOW_WING + closetext + refreshscreen + earthquake 72 + waitsfx + playsound SFX_STRENGTH + changeblock 10, 2, $20 ; stairs + reloadmappart + setevent EVENT_GOT_RAINBOW_WING + closetext + opentext +.GotRainbowWing: + writetext TinTower1FSage5Text2 + waitbutton + closetext + end + +.FoughtHoOh: + writetext TinTower1FSage5Text3 + waitbutton + closetext + end + +TinTower1FSage6Script: + checkevent EVENT_FOUGHT_HO_OH + iftrue .FoughtHoOh + jumptextfaceplayer TinTower1FSage6Text1 + +.FoughtHoOh: + jumptextfaceplayer TinTower1FSage6Text2 + +TinTower1FEusine: + jumptextfaceplayer TinTower1FEusineHoOhText + +TinTower1FPlayerEntersMovement: + slow_step UP + slow_step UP + slow_step UP + slow_step UP + step_end + +TinTower1FRaikouApproachesMovement: + set_sliding + fast_jump_step DOWN + remove_sliding + step_end + +TinTower1FRaikouLeavesMovement: + set_sliding + fast_jump_step DOWN + fast_jump_step RIGHT + fast_jump_step DOWN + remove_sliding + step_end + +TinTower1FEnteiApproachesMovement: + set_sliding + fast_jump_step DOWN + remove_sliding + step_end + +TinTower1FEnteiLeavesMovement: + set_sliding + fast_jump_step DOWN + fast_jump_step LEFT + fast_jump_step DOWN + remove_sliding + step_end + +TinTower1FSuicuneApproachesMovement: + set_sliding + fast_jump_step DOWN + remove_sliding + step_end + +TinTower1FPlayerBacksUpMovement: + fix_facing + big_step DOWN + remove_fixed_facing + step_end + +TinTower1FEusineEntersMovement: + step UP + step UP + step UP + turn_head LEFT + step_end + +TinTower1FEusineLeavesMovement: + step DOWN + step DOWN + step DOWN + step_end + +TinTower1FSage1EntersMovement: + step UP + step UP + step LEFT + step LEFT + turn_head UP + step_end + +TinTower1FSage2EntersMovement: + step UP + step UP + step_end + +TinTower1FSage3EntersMovement: + step UP + step RIGHT + step RIGHT + step UP + step_end + +TinTower1FEusineSuicuneText: + text "EUSINE: Awesome!" + line "Too awesome, even!" + + para "I've never seen a" + line "battle that great." + + para "That was truly" + line "inspiring to see." + + para "SUICUNE was tough," + line "but you were even" + + para "more incredible," + line "." + + para "I heard SUICUNE's" + line "mystic power" + + para "summons a rainbow-" + line "colored #MON." + + para "Maybe, just maybe," + line "what went on today" + + para "will cause that" + line "#MON to appear." + + para "I'm going to study" + line "the legends more." + + para "Thanks for showing" + line "me that fantastic" + cont "battle." + + para "Later, !" + done + +TinTower1FSage1Text: + text "According to" + line "legend…" + + para "When the souls of" + line "#MON and humans" + + para "commune, from the" + line "heavens descends a" + + para "#MON of rainbow" + line "colors…" + + para "Could it mean the" + line "legendary #MON" + + para "are testing us" + line "humans?" + done + +TinTower1FSage2Text: + text "When the BRASS" + line "TOWER burned down," + + para "three nameless" + line "#MON were said" + + para "to have perished." + line "It was tragic." + + para "However…" + + para "A rainbow-colored" + line "#MON…" + + para "In other words…" + + para "HO-OH descended" + line "from the sky and" + + para "gave new life to" + line "the three #MON." + + para "They are…" + + para "SUICUNE, ENTEI and" + line "RAIKOU." + + para "That is what they" + line "say." + done + +TinTower1FSage3Text: + text "The two TOWERS are" + line "said to have been" + + para "built to foster" + line "friendship and" + + para "hope between #-" + line "MON and people." + + para "That was 700 years" + line "ago, but the ideal" + + para "still remains" + line "important today." + done + +TinTower1FSage4Text1: + text "HO-OH appears to" + line "have descended" + + para "upon this, the TIN" + line "TOWER!" + done + +TinTower1FSage5Text1: + text "This will protect" + line "you. Take it." + done + +TinTower1FSage5Text2: + text "Now, go." + done + +TinTower1FSage6Text1: + text "I believe you are" + line "being tested." + + para "Free your mind" + line "from uncertainty," + cont "and advance." + done + +TinTower1FEusineHoOhText: + text "I knew it." + + para "I knew you'd get" + line "to see the #MON" + + para "of rainbow colors," + line "." + + para "It happened just" + line "as I envisioned." + + para "My research isn't" + line "bad, I might say." + + para "I'm going to keep" + line "studying #MON" + + para "to become a famous" + line "#MANIAC!" + done + +TinTower1FSage4Text2: + text "The legendary" + line "#MON are said" + + para "to embody three" + line "powers…" + + para "The lightning that" + line "struck the TOWER." + + para "The fire that" + line "burned the TOWER." + + para "And the rain that" + line "put out the fire…" + done + +TinTower1FSage5Text3: + text "When the legendary" + line "#MON appeared…" + + para "They struck terror" + line "in those who saw" + cont "their rise." + + para "And…" + + para "Some even took to" + line "futile attacks." + + para "The legendary" + line "#MON, knowing" + + para "their own power," + line "fled, ignoring the" + cont "frightened people." + done + +TinTower1FSage6Text2: + text "Of the legendary" + line "#MON, SUICUNE" + + para "is said to be the" + line "closest to HO-OH." + + para "I hear there may" + line "also be a link to" + + para "#MON known as" + line "UNOWN." + + para "The #MON UNOWN" + line "must be sharing a" + + para "cooperative bond" + line "with SUICUNE." + done + +TinTower1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 15, ECRUTEAK_CITY, 12 + warp_event 10, 15, ECRUTEAK_CITY, 12 + warp_event 10, 2, TIN_TOWER_2F, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 9, 9, SPRITE_SUICUNE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TIN_TOWER_1F_SUICUNE + object_event 7, 9, SPRITE_RAIKOU, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TIN_TOWER_1F_RAIKOU + object_event 12, 9, SPRITE_ENTEI, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_TIN_TOWER_1F_ENTEI + object_event 8, 3, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, TinTower1FEusine, EVENT_TIN_TOWER_1F_EUSINE + object_event 5, 9, SPRITE_SAGE, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TinTower1FSage1Script, EVENT_TIN_TOWER_1F_WISE_TRIO_1 + object_event 11, 11, SPRITE_SAGE, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TinTower1FSage2Script, EVENT_TIN_TOWER_1F_WISE_TRIO_1 + object_event 14, 6, SPRITE_SAGE, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TinTower1FSage3Script, EVENT_TIN_TOWER_1F_WISE_TRIO_1 + object_event 4, 2, SPRITE_SAGE, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TinTower1FSage4Script, EVENT_TIN_TOWER_1F_WISE_TRIO_2 + object_event 9, 1, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TinTower1FSage5Script, EVENT_TIN_TOWER_1F_WISE_TRIO_2 + object_event 14, 2, SPRITE_SAGE, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TinTower1FSage6Script, EVENT_TIN_TOWER_1F_WISE_TRIO_2 diff --git a/maps/TinTower1F.blk b/maps/TinTower1F.blk new file mode 100644 index 0000000..64687f7 --- /dev/null +++ b/maps/TinTower1F.blk @@ -0,0 +1,5 @@ +"! +  +"  + !  + "  ! "! \ No newline at end of file diff --git a/maps/TinTower2F.asm b/maps/TinTower2F.asm new file mode 100644 index 0000000..4d749fa --- /dev/null +++ b/maps/TinTower2F.asm @@ -0,0 +1,17 @@ +TinTower2F_MapScripts: + def_scene_scripts + + def_callbacks + +TinTower2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 10, 14, TIN_TOWER_3F, 1 + warp_event 10, 2, TIN_TOWER_1F, 3 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/TinTower2F.blk b/maps/TinTower2F.blk new file mode 100644 index 0000000..c78616a --- /dev/null +++ b/maps/TinTower2F.blk @@ -0,0 +1,5 @@ + "!      * * + * * + * * + *     +  \ No newline at end of file diff --git a/maps/TinTower3F.asm b/maps/TinTower3F.asm new file mode 100644 index 0000000..9b9f74b --- /dev/null +++ b/maps/TinTower3F.asm @@ -0,0 +1,24 @@ + object_const_def + const TINTOWER3F_POKE_BALL + +TinTower3F_MapScripts: + def_scene_scripts + + def_callbacks + +TinTower3FFullHeal: + itemball FULL_HEAL + +TinTower3F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 10, 14, TIN_TOWER_2F, 1 + warp_event 16, 2, TIN_TOWER_4F, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 14, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower3FFullHeal, EVENT_TIN_TOWER_3F_FULL_HEAL diff --git a/maps/TinTower3F.blk b/maps/TinTower3F.blk new file mode 100644 index 0000000..1cec30b --- /dev/null +++ b/maps/TinTower3F.blk @@ -0,0 +1 @@ +!*****" +++++  ,,,,,  ***> ++++ >****  , ,  + +  \ No newline at end of file diff --git a/maps/TinTower4F.asm b/maps/TinTower4F.asm new file mode 100644 index 0000000..8793e66 --- /dev/null +++ b/maps/TinTower4F.asm @@ -0,0 +1,40 @@ + object_const_def + const TINTOWER4F_POKE_BALL1 + const TINTOWER4F_POKE_BALL2 + const TINTOWER4F_POKE_BALL3 + +TinTower4F_MapScripts: + def_scene_scripts + + def_callbacks + +TinTower4FUltraBall: + itemball ULTRA_BALL + +TinTower4FPPUp: + itemball PP_UP + +TinTower4FEscapeRope: + itemball ESCAPE_ROPE + +TinTower4FHiddenMaxPotion: + hiddenitem MAX_POTION, EVENT_TIN_TOWER_4F_HIDDEN_MAX_POTION + +TinTower4F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 4, TIN_TOWER_5F, 2 + warp_event 16, 2, TIN_TOWER_3F, 2 + warp_event 2, 14, TIN_TOWER_5F, 3 + warp_event 17, 15, TIN_TOWER_5F, 4 + + def_coord_events + + def_bg_events + bg_event 11, 6, BGEVENT_ITEM, TinTower4FHiddenMaxPotion + + def_object_events + object_event 14, 10, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower4FUltraBall, EVENT_TIN_TOWER_4F_ULTRA_BALL + object_event 17, 14, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower4FPPUp, EVENT_TIN_TOWER_4F_PP_UP + object_event 2, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower4FEscapeRope, EVENT_TIN_TOWER_4F_ESCAPE_ROPE diff --git a/maps/TinTower4F.blk b/maps/TinTower4F.blk new file mode 100644 index 0000000..ac4e4f4 --- /dev/null +++ b/maps/TinTower4F.blk @@ -0,0 +1 @@ +!" *!" ,,  *=++> ++=+> **=*> ,, =,> **=++*> ++++++ \ No newline at end of file diff --git a/maps/TinTower5F.asm b/maps/TinTower5F.asm new file mode 100644 index 0000000..1d74df6 --- /dev/null +++ b/maps/TinTower5F.asm @@ -0,0 +1,34 @@ + object_const_def + const TINTOWER5F_POKE_BALL + +TinTower5F_MapScripts: + def_scene_scripts + + def_callbacks + +TinTower5FRareCandy: + itemball RARE_CANDY + +TinTower5FHiddenFullRestore: + hiddenitem FULL_RESTORE, EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE + +TinTower5FHiddenCarbos: + hiddenitem CARBOS, EVENT_TIN_TOWER_5F_HIDDEN_CARBOS + +TinTower5F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 11, 15, TIN_TOWER_6F, 2 + warp_event 2, 4, TIN_TOWER_4F, 1 + warp_event 2, 14, TIN_TOWER_4F, 3 + warp_event 17, 15, TIN_TOWER_4F, 4 + + def_coord_events + + def_bg_events + bg_event 16, 14, BGEVENT_ITEM, TinTower5FHiddenFullRestore + bg_event 3, 15, BGEVENT_ITEM, TinTower5FHiddenCarbos + + def_object_events + object_event 9, 9, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower5FRareCandy, EVENT_TIN_TOWER_5F_RARE_CANDY diff --git a/maps/TinTower5F.blk b/maps/TinTower5F.blk new file mode 100644 index 0000000..54de661 --- /dev/null +++ b/maps/TinTower5F.blk @@ -0,0 +1 @@ + ,,?,,  <++ =+<=,>=+*= =* *==+> ++=+? ,,,>=*,,>**>+++ * \ No newline at end of file diff --git a/maps/TinTower6F.asm b/maps/TinTower6F.asm new file mode 100644 index 0000000..17570b5 --- /dev/null +++ b/maps/TinTower6F.asm @@ -0,0 +1,24 @@ + object_const_def + const TINTOWER6F_POKE_BALL + +TinTower6F_MapScripts: + def_scene_scripts + + def_callbacks + +TinTower6FMaxPotion: + itemball MAX_POTION + +TinTower6F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 9, TIN_TOWER_7F, 1 + warp_event 11, 15, TIN_TOWER_5F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 8, 8, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower6FMaxPotion, EVENT_TIN_TOWER_6F_MAX_POTION diff --git a/maps/TinTower6F.blk b/maps/TinTower6F.blk new file mode 100644 index 0000000..fbd83f2 --- /dev/null +++ b/maps/TinTower6F.blk @@ -0,0 +1 @@ +;;;;;;  >****** >** *  *  * ,,,, ****** ** \ No newline at end of file diff --git a/maps/TinTower7F.asm b/maps/TinTower7F.asm new file mode 100644 index 0000000..2ff0da5 --- /dev/null +++ b/maps/TinTower7F.asm @@ -0,0 +1,27 @@ + object_const_def + const TINTOWER7F_POKE_BALL + +TinTower7F_MapScripts: + def_scene_scripts + + def_callbacks + +TinTower7FMaxRevive: + itemball MAX_REVIVE + +TinTower7F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 9, TIN_TOWER_6F, 1 + warp_event 10, 15, TIN_TOWER_8F, 1 + warp_event 12, 7, TIN_TOWER_7F, 4 + warp_event 8, 3, TIN_TOWER_7F, 3 + warp_event 6, 9, TIN_TOWER_9F, 5 + + def_coord_events + + def_bg_events + + def_object_events + object_event 16, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower7FMaxRevive, EVENT_TIN_TOWER_7F_MAX_REVIVE diff --git a/maps/TinTower7F.blk b/maps/TinTower7F.blk new file mode 100644 index 0000000..1c4ad1d --- /dev/null +++ b/maps/TinTower7F.blk @@ -0,0 +1 @@ +! ++  $,,  **=> $=> $ => => +++ ***$ \ No newline at end of file diff --git a/maps/TinTower8F.asm b/maps/TinTower8F.asm new file mode 100644 index 0000000..fa82d78 --- /dev/null +++ b/maps/TinTower8F.asm @@ -0,0 +1,38 @@ + object_const_def + const TINTOWER8F_POKE_BALL1 + const TINTOWER8F_POKE_BALL2 + const TINTOWER8F_POKE_BALL3 + +TinTower8F_MapScripts: + def_scene_scripts + + def_callbacks + +TinTower8FNugget: + itemball NUGGET + +TinTower8FMaxElixer: + itemball MAX_ELIXER + +TinTower8FFullRestore: + itemball FULL_RESTORE + +TinTower8F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 5, TIN_TOWER_7F, 2 + warp_event 2, 11, TIN_TOWER_9F, 1 + warp_event 16, 7, TIN_TOWER_9F, 2 + warp_event 10, 3, TIN_TOWER_9F, 3 + warp_event 14, 15, TIN_TOWER_9F, 6 + warp_event 6, 9, TIN_TOWER_9F, 7 + + def_coord_events + + def_bg_events + + def_object_events + object_event 7, 13, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower8FNugget, EVENT_TIN_TOWER_8F_NUGGET + object_event 11, 6, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower8FMaxElixer, EVENT_TIN_TOWER_8F_MAX_ELIXER + object_event 3, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower8FFullRestore, EVENT_TIN_TOWER_8F_FULL_RESTORE diff --git a/maps/TinTower8F.blk b/maps/TinTower8F.blk new file mode 100644 index 0000000..b1251f1 --- /dev/null +++ b/maps/TinTower8F.blk @@ -0,0 +1 @@ +!" $ $ *  * *$ $ * $ **  + * , $  \ No newline at end of file diff --git a/maps/TinTower9F.asm b/maps/TinTower9F.asm new file mode 100644 index 0000000..694fd89 --- /dev/null +++ b/maps/TinTower9F.asm @@ -0,0 +1,37 @@ + object_const_def + const TINTOWER9F_POKE_BALL + +TinTower9F_MapScripts: + def_scene_scripts + + def_callbacks + +TinTower9FHPUp: + itemball HP_UP + +TinTower9FUnusedHoOhText: ; unreferenced + text "HO-OH: Shaoooh!" + done + +TinTower9FUnusedLugiaText: ; unreferenced + text "LUGIA: Gyaaan!" + done + +TinTower9F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 12, 3, TIN_TOWER_8F, 2 + warp_event 2, 5, TIN_TOWER_8F, 3 + warp_event 12, 7, TIN_TOWER_8F, 4 + warp_event 7, 9, TIN_TOWER_ROOF, 1 + warp_event 16, 7, TIN_TOWER_7F, 5 + warp_event 6, 13, TIN_TOWER_8F, 5 + warp_event 8, 13, TIN_TOWER_8F, 6 + + def_coord_events + + def_bg_events + + def_object_events + object_event 9, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TinTower9FHPUp, EVENT_TIN_TOWER_9F_HP_UP diff --git a/maps/TinTower9F.blk b/maps/TinTower9F.blk new file mode 100644 index 0000000..b4514e6 --- /dev/null +++ b/maps/TinTower9F.blk @@ -0,0 +1 @@ + !!""  $ $ * *$ $**  ***  *$$+++  * ,,,  \ No newline at end of file diff --git a/maps/TinTowerRoof.asm b/maps/TinTowerRoof.asm new file mode 100644 index 0000000..cfa0a70 --- /dev/null +++ b/maps/TinTowerRoof.asm @@ -0,0 +1,56 @@ + object_const_def + const TINTOWERROOF_HO_OH + +TinTowerRoof_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, TinTowerRoofHoOhCallback + +TinTowerRoofHoOhCallback: + checkevent EVENT_FOUGHT_HO_OH + iftrue .NoAppear + checkitem RAINBOW_WING + iftrue .Appear + sjump .NoAppear + +.Appear: + appear TINTOWERROOF_HO_OH + endcallback + +.NoAppear: + disappear TINTOWERROOF_HO_OH + endcallback + +TinTowerHoOh: + faceplayer + opentext + writetext HoOhText + cry HO_OH + pause 15 + closetext + setevent EVENT_FOUGHT_HO_OH + loadvar VAR_BATTLETYPE, BATTLETYPE_FORCEITEM + loadwildmon HO_OH, 60 + startbattle + disappear TINTOWERROOF_HO_OH + reloadmapafterbattle + setevent EVENT_SET_WHEN_FOUGHT_HO_OH + end + +HoOhText: + text "Shaoooh!" + done + +TinTowerRoof_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 13, TIN_TOWER_9F, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 9, 5, SPRITE_HO_OH, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, TinTowerHoOh, EVENT_TIN_TOWER_ROOF_HO_OH diff --git a/maps/TinTowerRoof.blk b/maps/TinTowerRoof.blk new file mode 100644 index 0000000..7edefee --- /dev/null +++ b/maps/TinTowerRoof.blk @@ -0,0 +1 @@ +######-### ### ### ############ \ No newline at end of file diff --git a/maps/TohjoFalls.asm b/maps/TohjoFalls.asm new file mode 100644 index 0000000..6819a64 --- /dev/null +++ b/maps/TohjoFalls.asm @@ -0,0 +1,24 @@ + object_const_def + const TOHJOFALLS_POKE_BALL + +TohjoFalls_MapScripts: + def_scene_scripts + + def_callbacks + +TohjoFallsMoonStone: + itemball MOON_STONE + +TohjoFalls_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 13, 15, ROUTE_27, 2 + warp_event 25, 15, ROUTE_27, 3 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 6, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, TohjoFallsMoonStone, EVENT_TOHJO_FALLS_MOON_STONE diff --git a/maps/TohjoFalls.blk b/maps/TohjoFalls.blk new file mode 100644 index 0000000..1c09886 --- /dev/null +++ b/maps/TohjoFalls.blk @@ -0,0 +1,11 @@ + +  +  +- -. . +- +-/. + ,,,-/. +-/,, ,,,-/ +'-/,,-./ +-./%  +%$%$ # # \ No newline at end of file diff --git a/maps/TradeCenter.asm b/maps/TradeCenter.asm new file mode 100644 index 0000000..9c6e73b --- /dev/null +++ b/maps/TradeCenter.asm @@ -0,0 +1,69 @@ + object_const_def + const TRADECENTER_CHRIS1 + const TRADECENTER_CHRIS2 + +TradeCenter_MapScripts: + def_scene_scripts + scene_script TradeCenterInitializeScene, SCENE_TRADECENTER_INITIALIZE + scene_script TradeCenterNoopScene, SCENE_TRADECENTER_NOOP + + def_callbacks + callback MAPCALLBACK_OBJECTS, TradeCenterSetWhichChrisCallback + +TradeCenterInitializeScene: + sdefer TradeCenterInitializeAndPreparePokecenter2FScript + end + +TradeCenterNoopScene: + end + +TradeCenterSetWhichChrisCallback: + special CableClubCheckWhichChris + iffalse .Chris2 + disappear TRADECENTER_CHRIS2 + appear TRADECENTER_CHRIS1 + endcallback + +.Chris2: + disappear TRADECENTER_CHRIS1 + appear TRADECENTER_CHRIS2 + endcallback + +TradeCenterInitializeAndPreparePokecenter2FScript: + setscene SCENE_TRADECENTER_NOOP + setmapscene POKECENTER_2F, SCENE_POKECENTER2F_LEAVE_TRADE_CENTER + end + +TradeCenterConsoleScript: + special TradeCenter + newloadmap MAPSETUP_LINKRETURN + end + +TradeCenterFriendScript: ; unreferenced + opentext + writetext TradeCenterFriendReadyText + waitbutton + closetext + end + +TradeCenterFriendReadyText: + text "Your friend is" + line "ready." + done + +TradeCenter_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 7, POKECENTER_2F, 2 + warp_event 5, 7, POKECENTER_2F, 2 + + def_coord_events + + def_bg_events + bg_event 4, 4, BGEVENT_RIGHT, TradeCenterConsoleScript + bg_event 5, 4, BGEVENT_LEFT, TradeCenterConsoleScript + + def_object_events + object_event 3, 4, SPRITE_CHRIS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CableClubFriendScript, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + object_event 6, 4, SPRITE_CHRIS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, CableClubFriendScript, EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 diff --git a/maps/TradeCenter.blk b/maps/TradeCenter.blk new file mode 100644 index 0000000..29df834 --- /dev/null +++ b/maps/TradeCenter.blk @@ -0,0 +1 @@ +"!  \ No newline at end of file diff --git a/maps/TrainerHouse1F.asm b/maps/TrainerHouse1F.asm new file mode 100644 index 0000000..fbf5449 --- /dev/null +++ b/maps/TrainerHouse1F.asm @@ -0,0 +1,158 @@ + object_const_def + const TRAINERHOUSE1F_RECEPTIONIST + const TRAINERHOUSE1F_COOLTRAINER_M + const TRAINERHOUSE1F_COOLTRAINER_F + const TRAINERHOUSE1F_YOUNGSTER + const TRAINERHOUSE1F_GENTLEMAN + +TrainerHouse1F_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerHouse1FReceptionistScript: + jumptextfaceplayer TrainerHouse1FReceptionistText + +TrainerHouse1FCooltrainerMScript: + jumptextfaceplayer TrainerHouse1FCooltrainerMText + +TrainerHouse1FCooltrainerFScript: + jumptextfaceplayer TrainerHouse1FCooltrainerFText + +TrainerHouse1FYoungsterScript: + jumptextfaceplayer TrainerHouse1FYoungsterText + +TrainerHouse1FGentlemanScript: + jumptextfaceplayer TrainerHouse1FGentlemanText + +TrainerHouseSign1: + jumptext TrainerHouseSign1Text + +TrainerHouseSign2: + jumptext TrainerHouseSign2Text + +TrainerHouseIllegibleBook: + jumptext TrainerHouseIllegibleText + +TrainerHouse1FReceptionistText: + text "Welcome to TRAINER" + line "HOUSE, the newest" + + para "and most happening" + line "place in VIRIDIAN." + + para "We're open to" + line "trainers only." + + para "You can battle" + line "against the best" + + para "of the best right" + line "downstairs." + done + +TrainerHouse1FCooltrainerMText: + text "VIRIDIAN is the" + line "town closest to" + cont "INDIGO PLATEAU." + + para "They built this" + line "place because so" + + para "many trainers pass" + line "through on their" + + para "way up to INDIGO" + line "PLATEAU." + done + +TrainerHouse1FCooltrainerFText: + text "They hold practice" + line "battles downstairs" + cont "here." + + para "I would love to" + line "see how well a" + + para "trainer from JOHTO" + line "battles." + done + +TrainerHouse1FYoungsterText: + text "I guess you can't" + line "become the CHAMP" + + para "unless you go all" + line "over the place and" + + para "battle all kinds" + line "of people." + + para "The CHAMPION from" + line "PALLET traveled to" + + para "all the cities and" + line "towns in KANTO." + done + +TrainerHouse1FGentlemanText: + text "Whew… I'm taking a" + line "rest from #MON" + cont "battles." + done + +TrainerHouseSign1Text: + text "Practice battles" + line "are held in the" + + para "TRAINING HALL" + line "downstairs." + + para "Skilled trainers" + line "are invited to" + cont "participate." + done + +TrainerHouseSign2Text: + text "There are no rules" + line "or regulations for" + + para "practice matches." + line "Just like in field" + + para "battles, anything" + line "goes!" + done + +TrainerHouseIllegibleText: + text "…What's this?" + line "A strategy memo?" + + para "This writing looks" + line "like ONIX tracks…" + + para "It's completely" + line "illegible…" + done + +TrainerHouse1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 13, VIRIDIAN_CITY, 3 + warp_event 3, 13, VIRIDIAN_CITY, 3 + warp_event 8, 2, TRAINER_HOUSE_B1F, 1 + + def_coord_events + + def_bg_events + bg_event 5, 0, BGEVENT_READ, TrainerHouseSign1 + bg_event 7, 0, BGEVENT_READ, TrainerHouseSign2 + bg_event 7, 10, BGEVENT_READ, TrainerHouseIllegibleBook + + def_object_events + object_event 0, 11, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, TrainerHouse1FReceptionistScript, -1 + object_event 7, 11, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TrainerHouse1FCooltrainerMScript, -1 + object_event 6, 2, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_DOWN, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, TrainerHouse1FCooltrainerFScript, -1 + object_event 4, 8, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, TrainerHouse1FYoungsterScript, -1 + object_event 2, 4, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TrainerHouse1FGentlemanScript, -1 diff --git a/maps/TrainerHouse1F.blk b/maps/TrainerHouse1F.blk new file mode 100644 index 0000000..d327ae9 --- /dev/null +++ b/maps/TrainerHouse1F.blk @@ -0,0 +1 @@ +))%!"# $&'  \ No newline at end of file diff --git a/maps/TrainerHouseB1F.asm b/maps/TrainerHouseB1F.asm new file mode 100644 index 0000000..89e6872 --- /dev/null +++ b/maps/TrainerHouseB1F.asm @@ -0,0 +1,183 @@ + object_const_def + const TRAINERHOUSEB1F_RECEPTIONIST + const TRAINERHOUSEB1F_CHRIS + +TrainerHouseB1F_MapScripts: + def_scene_scripts + scene_script TrainerHouseB1FNoopScene, SCENE_TRAINERHOUSEB1F_ASK_BATTLE + + def_callbacks + +TrainerHouseB1FNoopScene: + end + +TrainerHouseReceptionistScript: + turnobject PLAYER, UP + opentext + checkflag ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY + iftrue .FoughtTooManyTimes + writetext TrainerHouseB1FIntroText + promptbutton + special TrainerHouse + iffalse .GetCal3Name + gettrainername STRING_BUFFER_3, CAL, CAL2 + sjump .GotName + +.GetCal3Name: + gettrainername STRING_BUFFER_3, CAL, CAL3 +.GotName: + writetext TrainerHouseB1FYourOpponentIsText + promptbutton + writetext TrainerHouseB1FAskWantToBattleText + yesorno + iffalse .Declined + setflag ENGINE_FOUGHT_IN_TRAINER_HALL_TODAY + writetext TrainerHouseB1FGoRightInText + waitbutton + closetext + applymovement PLAYER, Movement_EnterTrainerHouseBattleRoom + opentext + writetext TrainerHouseB1FCalBeforeText + waitbutton + closetext + special TrainerHouse + iffalse .NoSpecialBattle + winlosstext TrainerHouseB1FCalBeatenText, 0 + setlasttalked TRAINERHOUSEB1F_CHRIS + loadtrainer CAL, CAL2 + startbattle + reloadmapafterbattle + iffalse .End +.NoSpecialBattle: + winlosstext TrainerHouseB1FCalBeatenText, 0 + setlasttalked TRAINERHOUSEB1F_CHRIS + loadtrainer CAL, CAL3 + startbattle + reloadmapafterbattle +.End: + applymovement PLAYER, Movement_ExitTrainerHouseBattleRoom + end + +.Declined: + writetext TrainerHouseB1FPleaseComeAgainText + waitbutton + closetext + applymovement PLAYER, Movement_TrainerHouseTurnBack + end + +.FoughtTooManyTimes: + writetext TrainerHouseB1FSecondChallengeDeniedText + waitbutton + closetext + applymovement PLAYER, Movement_TrainerHouseTurnBack + end + +Movement_EnterTrainerHouseBattleRoom: + step LEFT + step LEFT + step LEFT + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step LEFT + turn_head RIGHT + step_end + +Movement_ExitTrainerHouseBattleRoom: + step UP + step UP + step UP + step RIGHT + step UP + step UP + step UP + step UP + step UP + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step_end + +Movement_TrainerHouseTurnBack: + step RIGHT + turn_head LEFT + step_end + +TrainerHouseB1FIntroText: + text "Hi. Welcome to our" + line "TRAINING HALL." + + para "You may battle a" + line "trainer once per" + cont "day." + done + +TrainerHouseB1FYourOpponentIsText: + text_ram wStringBuffer3 + text " is your" + line "opponent today." + done + +TrainerHouseB1FAskWantToBattleText: + text "Would you like to" + line "battle?" + done + +TrainerHouseB1FGoRightInText: + text "Please go right" + line "through." + + para "You may begin" + line "right away." + done + +TrainerHouseB1FPleaseComeAgainText: + text "Sorry. Only those" + line "trainers who will" + + para "be battling are" + line "allowed to go in." + done + +TrainerHouseB1FSecondChallengeDeniedText: + text "I'm sorry." + line "This would be your" + + para "second time today." + line "You're permitted" + + para "to enter just once" + line "a day." + done + +TrainerHouseB1FCalBeatenText: + text "I lost…" + line "Darn…" + done + +TrainerHouseB1FCalBeforeText: + text "I traveled out" + line "here just so I" + cont "could battle you." + done + +TrainerHouseB1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 4, TRAINER_HOUSE_1F, 3 + + def_coord_events + coord_event 7, 3, SCENE_TRAINERHOUSEB1F_ASK_BATTLE, TrainerHouseReceptionistScript + + def_bg_events + + def_object_events + object_event 7, 1, SPRITE_RECEPTIONIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1 + object_event 6, 11, SPRITE_CHRIS, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ObjectEvent, -1 diff --git a/maps/TrainerHouseB1F.blk b/maps/TrainerHouseB1F.blk new file mode 100644 index 0000000..5aeef06 --- /dev/null +++ b/maps/TrainerHouseB1F.blk @@ -0,0 +1 @@ +! 16 3<21="0007"0007"0007>444? \ No newline at end of file diff --git a/maps/UndergroundPath.asm b/maps/UndergroundPath.asm new file mode 100644 index 0000000..4dcb707 --- /dev/null +++ b/maps/UndergroundPath.asm @@ -0,0 +1,25 @@ +UndergroundPath_MapScripts: + def_scene_scripts + + def_callbacks + +UndergroundPathHiddenFullRestore: + hiddenitem FULL_RESTORE, EVENT_UNDERGROUND_PATH_HIDDEN_FULL_RESTORE + +UndergroundPathHiddenXSpecial: + hiddenitem X_SPECIAL, EVENT_UNDERGROUND_PATH_HIDDEN_X_SPECIAL + +UndergroundPath_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 2, ROUTE_5_UNDERGROUND_PATH_ENTRANCE, 3 + warp_event 3, 24, ROUTE_6_UNDERGROUND_PATH_ENTRANCE, 3 + + def_coord_events + + def_bg_events + bg_event 3, 9, BGEVENT_ITEM, UndergroundPathHiddenFullRestore + bg_event 1, 19, BGEVENT_ITEM, UndergroundPathHiddenXSpecial + + def_object_events diff --git a/maps/UndergroundPath.blk b/maps/UndergroundPath.blk new file mode 100644 index 0000000..a988dc5 --- /dev/null +++ b/maps/UndergroundPath.blk @@ -0,0 +1,2 @@ + +             \ No newline at end of file diff --git a/maps/UndergroundPathEntrance.blk b/maps/UndergroundPathEntrance.blk new file mode 100644 index 0000000..92909de --- /dev/null +++ b/maps/UndergroundPathEntrance.blk @@ -0,0 +1 @@ +4;+ <0 %& \ No newline at end of file diff --git a/maps/UnionCave1F.asm b/maps/UnionCave1F.asm new file mode 100644 index 0000000..7721ed1 --- /dev/null +++ b/maps/UnionCave1F.asm @@ -0,0 +1,222 @@ + object_const_def + const UNIONCAVE1F_POKEFAN_M1 + const UNIONCAVE1F_SUPER_NERD + const UNIONCAVE1F_POKEFAN_M2 + const UNIONCAVE1F_FISHER1 + const UNIONCAVE1F_FISHER2 + const UNIONCAVE1F_POKE_BALL1 + const UNIONCAVE1F_POKE_BALL2 + const UNIONCAVE1F_POKE_BALL3 + const UNIONCAVE1F_POKE_BALL4 + +UnionCave1F_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerPokemaniacLarry: + trainer POKEMANIAC, LARRY, EVENT_BEAT_POKEMANIAC_LARRY, PokemaniacLarrySeenText, PokemaniacLarryBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokemaniacLarryAfterBattleText + waitbutton + closetext + end + +TrainerHikerRussell: + trainer HIKER, RUSSELL, EVENT_BEAT_HIKER_RUSSELL, HikerRussellSeenText, HikerRussellBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerRussellAfterBattleText + waitbutton + closetext + end + +TrainerHikerDaniel: + trainer HIKER, DANIEL, EVENT_BEAT_HIKER_DANIEL, HikerDanielSeenText, HikerDanielBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerDanielAfterBattleText + waitbutton + closetext + end + +TrainerFirebreatherBill: + trainer FIREBREATHER, BILL, EVENT_BEAT_FIREBREATHER_BILL, FirebreatherBillSeenText, FirebreatherBillBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FirebreatherBillAfterBattleText + waitbutton + closetext + end + +TrainerFirebreatherRay: + trainer FIREBREATHER, RAY, EVENT_BEAT_FIREBREATHER_RAY, FirebreatherRaySeenText, FirebreatherRayBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext FirebreatherRayAfterBattleText + waitbutton + closetext + end + +UnionCave1FGreatBall: + itemball GREAT_BALL + +UnionCave1FXAttack: + itemball X_ATTACK + +UnionCave1FPotion: + itemball POTION + +UnionCave1FAwakening: + itemball AWAKENING + +UnionCave1FUnusedSign: ; unreferenced + jumptext UnionCave1FUnusedSignText + +HikerRussellSeenText: + text "You're headed to" + line "AZALEA, are you?" + + para "Let my #MON see" + line "if you are good" + cont "enough to battle." + done + +HikerRussellBeatenText: + text "Oh, oh, oh!" + done + +HikerRussellAfterBattleText: + text "All right, then!" + line "I've decided." + + para "I'm not leaving" + line "until my #MON" + cont "get tougher!" + done + +PokemaniacLarrySeenText: + text "I roam far and" + line "wide in search of" + cont "#MON." + + para "Are you looking" + line "for #MON too?" + + para "Then you're my" + line "collecting rival!" + done + +PokemaniacLarryBeatenText: + text "Ugh. My poor #-" + line "MON…" + done + +PokemaniacLarryAfterBattleText: + text "Every Friday, you" + line "can hear #MON" + + para "roars from deep" + line "inside the cave." + done + +HikerDanielSeenText: + text "Whoa! What a" + line "surprise!" + + para "I didn't expect to" + line "see anyone here!" + done + +HikerDanielBeatenText: + text "Whoa! I'm beaten" + line "big time!" + done + +HikerDanielAfterBattleText: + text "I was conned into" + line "buying a SLOWPOKE-" + cont "TAIL." + + para "I feel sorry for" + line "the poor #MON." + done + +FirebreatherBillSeenText: + text "ZUBAT's SUPERSONIC" + line "keeps confusing" + cont "my #MON." + + para "I'm seriously" + line "upset about that!" + done + +FirebreatherBillBeatenText: + text "I flamed out!" + done + +FirebreatherBillAfterBattleText: + text "On weekends, you" + line "can hear strange" + + para "roars from deep in" + line "the cave." + done + +FirebreatherRaySeenText: + text "If it's light, a" + line "cave isn't scary." + + para "If you're strong," + line "#MON aren't" + cont "scary." + done + +FirebreatherRayBeatenText: + text "FLASH!" + done + +FirebreatherRayAfterBattleText: + text "It's my #MON's" + line "fire that lights" + cont "up this cave." + done + +UnionCave1FUnusedSignText: + text "UNION CAVE" + done + +UnionCave1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 19, UNION_CAVE_B1F, 3 + warp_event 3, 33, UNION_CAVE_B1F, 4 + warp_event 17, 31, ROUTE_33, 1 + warp_event 17, 3, ROUTE_32, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 6, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerHikerDaniel, -1 + object_event 4, 21, SPRITE_SUPER_NERD, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacLarry, -1 + object_event 11, 8, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 1, TrainerHikerRussell, -1 + object_event 15, 27, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerFirebreatherRay, -1 + object_event 14, 19, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 4, TrainerFirebreatherBill, -1 + object_event 17, 21, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCave1FGreatBall, EVENT_UNION_CAVE_1F_GREAT_BALL + object_event 4, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCave1FXAttack, EVENT_UNION_CAVE_1F_X_ATTACK + object_event 4, 17, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCave1FPotion, EVENT_UNION_CAVE_1F_POTION + object_event 12, 33, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCave1FAwakening, EVENT_UNION_CAVE_1F_AWAKENING diff --git a/maps/UnionCave1F.blk b/maps/UnionCave1F.blk new file mode 100644 index 0000000..2226b61 --- /dev/null +++ b/maps/UnionCave1F.blk @@ -0,0 +1,18 @@ +  *()$ ++)>''=# ++)  +>=+ +&%     (+ +1(+ +  ++ + * + +)+  + 6  + * +>=>= +&% +&%$ + +)#   \ No newline at end of file diff --git a/maps/UnionCaveB1F.asm b/maps/UnionCaveB1F.asm new file mode 100644 index 0000000..18441ba --- /dev/null +++ b/maps/UnionCaveB1F.asm @@ -0,0 +1,174 @@ + object_const_def + const UNIONCAVEB1F_POKEFAN_M1 + const UNIONCAVEB1F_POKEFAN_M2 + const UNIONCAVEB1F_SUPER_NERD1 + const UNIONCAVEB1F_SUPER_NERD2 + const UNIONCAVEB1F_POKE_BALL1 + const UNIONCAVEB1F_BOULDER + const UNIONCAVEB1F_POKE_BALL2 + +UnionCaveB1F_MapScripts: + def_scene_scripts + + def_callbacks + +TrainerPokemaniacAndrew: + trainer POKEMANIAC, ANDREW, EVENT_BEAT_POKEMANIAC_ANDREW, PokemaniacAndrewSeenText, PokemaniacAndrewBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokemaniacAndrewAfterBattleText + waitbutton + closetext + end + +TrainerPokemaniacCalvin: + trainer POKEMANIAC, CALVIN, EVENT_BEAT_POKEMANIAC_CALVIN, PokemaniacCalvinSeenText, PokemaniacCalvinBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext PokemaniacCalvinAfterBattleText + waitbutton + closetext + end + +TrainerHikerPhillip: + trainer HIKER, PHILLIP, EVENT_BEAT_HIKER_PHILLIP, HikerPhillipSeenText, HikerPhillipBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerPhillipAfterBattleText + waitbutton + closetext + end + +TrainerHikerLeonard: + trainer HIKER, LEONARD, EVENT_BEAT_HIKER_LEONARD, HikerLeonardSeenText, HikerLeonardBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext HikerLeonardAfterBattleText + waitbutton + closetext + end + +UnionCaveB1FTMSwift: + itemball TM_SWIFT + +UnionCaveB1FXDefend: + itemball X_DEFEND + +UnionCaveB1FBoulder: + jumpstd StrengthBoulderScript + +HikerPhillipSeenText: + text "It's been a while" + line "since I last saw" + cont "another person." + + para "Don't be shy." + line "Let's battle!" + done + +HikerPhillipBeatenText: + text "Uurggh…" + done + +HikerPhillipAfterBattleText: + text "I've been lost for" + line "a long time…" + + para "I don't mind it" + line "here, but I am" + cont "soooo hungry!" + done + +HikerLeonardSeenText: + text "What do you know!" + line "A visitor!" + done + +HikerLeonardBeatenText: + text "Wahahah! You're a" + line "feisty one!" + done + +HikerLeonardAfterBattleText: + text "I live down here." + + para "You can, too, if" + line "you'd like." + + para "There's plenty of" + line "room, you see." + done + +PokemaniacAndrewSeenText: + text "Who's there?" + + para "Leave me and my" + line "#MON alone!" + done + +PokemaniacAndrewBeatenText: + text "Go…" + line "Go away!" + done + +PokemaniacAndrewAfterBattleText: + text "Just me and my" + line "#MON. I'm de-" + cont "lirious with joy." + done + +PokemaniacCalvinSeenText: + text "I came all the way" + line "here to conduct my" + cont "#MON research." + + para "Let me demonstrate" + line "my findings in a" + cont "real battle!" + done + +PokemaniacCalvinBeatenText: + text "You demonstrated" + line "on me!" + done + +PokemaniacCalvinAfterBattleText: + text "I should compile" + line "and announce my" + cont "study findings." + + para "I might even be-" + line "come famous like" + cont "PROF.ELM." + done + +UnionCaveB1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 3, RUINS_OF_ALPH_OUTSIDE, 7 + warp_event 3, 11, RUINS_OF_ALPH_OUTSIDE, 8 + warp_event 7, 19, UNION_CAVE_1F, 1 + warp_event 3, 33, UNION_CAVE_1F, 2 + warp_event 17, 31, UNION_CAVE_B2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 9, 4, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerHikerPhillip, -1 + object_event 16, 7, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 3, TrainerHikerLeonard, -1 + object_event 5, 32, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacAndrew, -1 + object_event 17, 30, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacCalvin, -1 + object_event 2, 16, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCaveB1FTMSwift, EVENT_UNION_CAVE_B1F_TM_SWIFT + object_event 7, 10, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, UnionCaveB1FBoulder, -1 + object_event 17, 23, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCaveB1FXDefend, EVENT_UNION_CAVE_B1F_X_DEFEND diff --git a/maps/UnionCaveB1F.blk b/maps/UnionCaveB1F.blk new file mode 100644 index 0000000..5f09cc3 --- /dev/null +++ b/maps/UnionCaveB1F.blk @@ -0,0 +1,10 @@ +  +$*(  #*   +   +$+)*< # ' +1 + +)   + )*    +&% +&  \ No newline at end of file diff --git a/maps/UnionCaveB2F.asm b/maps/UnionCaveB2F.asm new file mode 100644 index 0000000..567dfc9 --- /dev/null +++ b/maps/UnionCaveB2F.asm @@ -0,0 +1,158 @@ + object_const_def + const UNIONCAVEB2F_ROCKER + const UNIONCAVEB2F_COOLTRAINER_F1 + const UNIONCAVEB2F_COOLTRAINER_F2 + const UNIONCAVEB2F_POKE_BALL1 + const UNIONCAVEB2F_POKE_BALL2 + const UNIONCAVEB2F_LAPRAS + +UnionCaveB2F_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, UnionCaveB2FLaprasCallback + +UnionCaveB2FLaprasCallback: + checkflag ENGINE_UNION_CAVE_LAPRAS + iftrue .NoAppear + readvar VAR_WEEKDAY + ifequal FRIDAY, .Appear +.NoAppear: + disappear UNIONCAVEB2F_LAPRAS + endcallback + +.Appear: + appear UNIONCAVEB2F_LAPRAS + endcallback + +UnionCaveLapras: + faceplayer + cry LAPRAS + loadwildmon LAPRAS, 20 + startbattle + disappear UNIONCAVEB2F_LAPRAS + setflag ENGINE_UNION_CAVE_LAPRAS + reloadmapafterbattle + end + +TrainerCooltrainermNick: + trainer COOLTRAINERM, NICK, EVENT_BEAT_COOLTRAINERM_NICK, CooltrainermNickSeenText, CooltrainermNickBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainermNickAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainerfGwen: + trainer COOLTRAINERF, GWEN, EVENT_BEAT_COOLTRAINERF_GWEN, CooltrainerfGwenSeenText, CooltrainerfGwenBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainerfGwenAfterBattleText + waitbutton + closetext + end + +TrainerCooltrainerfEmma: + trainer COOLTRAINERF, EMMA, EVENT_BEAT_COOLTRAINERF_EMMA, CooltrainerfEmmaSeenText, CooltrainerfEmmaBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext CooltrainerfEmmaAfterBattleText + waitbutton + closetext + end + +UnionCaveB2FElixer: + itemball ELIXER + +UnionCaveB2FHyperPotion: + itemball HYPER_POTION + +CooltrainermNickSeenText: + text "There are two" + line "kinds of people." + + para "Those who have" + line "style, and those" + cont "who don't." + + para "What kind of" + line "person are you?" + done + +CooltrainermNickBeatenText: + text "You've got" + line "dazzling style!" + done + +CooltrainermNickAfterBattleText: + text "Your #MON style" + line "is stunning and" + cont "colorful, I admit." + + para "You'll just keep" + line "getting better!" + done + +CooltrainerfGwenSeenText: + text "I'm in training." + line "Care for a round?" + done + +CooltrainerfGwenBeatenText: + text "Aww, no! You're" + line "too good for me." + done + +CooltrainerfGwenAfterBattleText: + text "I'm going to train" + line "by myself until I" + cont "improve." + done + +CooltrainerfEmmaSeenText: + text "If the #MON I" + line "liked were there," + cont "I'd go anywhere." + + para "That's what a real" + line "trainer does." + done + +CooltrainerfEmmaBeatenText: + text "I'd rather pet my" + line "babies than this!" + done + +CooltrainerfEmmaAfterBattleText: + text "Just once a week," + line "a #MON comes to" + cont "the water's edge." + + para "I wanted to see" + line "that #MON…" + done + +UnionCaveB2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 3, UNION_CAVE_B1F, 5 + + def_coord_events + + def_bg_events + + def_object_events + object_event 15, 19, SPRITE_ROCKER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainermNick, -1 + object_event 5, 13, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerCooltrainerfGwen, -1 + object_event 3, 30, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerCooltrainerfEmma, -1 + object_event 16, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCaveB2FElixer, EVENT_UNION_CAVE_B2F_ELIXER + object_event 12, 19, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UnionCaveB2FHyperPotion, EVENT_UNION_CAVE_B2F_HYPER_POTION + object_event 11, 31, SPRITE_SURF, SPRITEMOVEDATA_SWIM_WANDER, 1, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, UnionCaveLapras, EVENT_UNION_CAVE_B2F_LAPRAS diff --git a/maps/UnionCaveB2F.blk b/maps/UnionCaveB2F.blk new file mode 100644 index 0000000..91e6770 --- /dev/null +++ b/maps/UnionCaveB2F.blk @@ -0,0 +1,21 @@ +    +)1 + +(( + +''''  + + ' + +  +    +&%! + +( + 6 + +%)* +  +   +  +&   \ No newline at end of file diff --git a/maps/VermilionCity.asm b/maps/VermilionCity.asm new file mode 100644 index 0000000..36bbf16 --- /dev/null +++ b/maps/VermilionCity.asm @@ -0,0 +1,301 @@ + object_const_def + const VERMILIONCITY_TEACHER + const VERMILIONCITY_GRAMPS + const VERMILIONCITY_MACHOP + const VERMILIONCITY_SUPER_NERD + const VERMILIONCITY_BIG_SNORLAX + const VERMILIONCITY_POKEFAN_M + +VermilionCity_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, VermilionCityFlypointCallback + +VermilionCityFlypointCallback: + setflag ENGINE_FLYPOINT_VERMILION + endcallback + +VermilionCityTeacherScript: + jumptextfaceplayer VermilionCityTeacherText + +VermilionMachopOwner: + jumptextfaceplayer VermilionMachopOwnerText + +VermilionMachop: + opentext + writetext VermilionMachopText1 + cry MACHOP + waitbutton + closetext + earthquake 30 + opentext + writetext VermilionMachopText2 + waitbutton + closetext + end + +VermilionCitySuperNerdScript: + jumptextfaceplayer VermilionCitySuperNerdText + +VermilionSnorlax: + opentext + special SnorlaxAwake + iftrue .Awake + writetext VermilionCitySnorlaxSleepingText + waitbutton + closetext + end + +.Awake: + writetext VermilionCityRadioNearSnorlaxText + pause 15 + cry SNORLAX + closetext + loadvar VAR_BATTLETYPE, BATTLETYPE_FORCEITEM + loadwildmon SNORLAX, 50 + startbattle + disappear VERMILIONCITY_BIG_SNORLAX + setevent EVENT_FOUGHT_SNORLAX + reloadmapafterbattle + end + +VermilionGymBadgeGuy: + faceplayer + opentext + checkevent EVENT_GOT_HP_UP_FROM_VERMILION_GUY + iftrue .AlreadyGotItem + readvar VAR_BADGES + ifequal NUM_BADGES, .AllBadges + ifgreater 13, .MostBadges + ifgreater 9, .SomeBadges + writetext VermilionCityBadgeGuyTrainerText + waitbutton + closetext + end + +.SomeBadges: + writetext VermilionCityBadgeGuySomeBadgesText + waitbutton + closetext + end + +.MostBadges: + writetext VermilionCityBadgeGuyMostBadgesText + waitbutton + closetext + end + +.AllBadges: + writetext VermilionCityBadgeGuyAllBadgesText + promptbutton + verbosegiveitem HP_UP + iffalse .Done + setevent EVENT_GOT_HP_UP_FROM_VERMILION_GUY +.AlreadyGotItem: + writetext VermilionCityBadgeGuyBattleEdgeText + waitbutton +.Done: + closetext + end + +VermilionCitySign: + jumptext VermilionCitySignText + +VermilionGymSign: + jumptext VermilionGymSignText + +PokemonFanClubSign: + jumptext PokemonFanClubSignText + +VermilionCityDiglettsCaveSign: + jumptext VermilionCityDiglettsCaveSignText + +VermilionCityPortSign: + jumptext VermilionCityPortSignText + +VermilionCityPokecenterSign: + jumpstd PokecenterSignScript + +VermilionCityMartSign: + jumpstd MartSignScript + +VermilionCityHiddenFullHeal: + hiddenitem FULL_HEAL, EVENT_VERMILION_CITY_HIDDEN_FULL_HEAL + +VermilionCityTeacherText: + text "VERMILION PORT is" + line "KANTO's seaside" + cont "gateway." + + para "Luxury liners from" + line "around the world" + cont "dock here." + done + +VermilionMachopOwnerText: + text "My #MON is" + line "preparing the land" + cont "for construction." + + para "But I have no" + line "money to start the" + cont "project…" + done + +VermilionMachopText1: + text "MACHOP: Guooh" + line "gogogoh!" + done + +VermilionMachopText2: + text "A MACHOP is growl-" + line "ing while stomping" + cont "the ground flat." + done + +VermilionCitySuperNerdText: + text "There are eight" + line "GYMS in KANTO." + + para "That big building" + line "is VERMILION's" + cont "#MON GYM." + done + +VermilionCitySnorlaxSleepingText: + text "SNORLAX is snoring" + line "peacefully…" + done + +VermilionCityRadioNearSnorlaxText: + text "The #GEAR was" + line "placed near the" + cont "sleeping SNORLAX…" + + para "…" + + para "SNORLAX woke up!" + done + +VermilionCityBadgeGuyTrainerText: + text "Skilled trainers" + line "gather in KANTO." + + para "GYM LEADERS are" + line "especially strong." + + para "They won't be easy" + line "to defeat." + done + +VermilionCityBadgeGuySomeBadgesText: + text "You've started to" + line "collect KANTO GYM" + cont "BADGES?" + + para "Don't you agree" + line "that the trainers" + cont "here are tough?" + done + +VermilionCityBadgeGuyMostBadgesText: + text "I guess you'll be" + line "finished with your" + + para "conquest of KANTO" + line "GYMS soon." + + para "Let me know if" + line "you get all eight" + cont "BADGES." + done + +VermilionCityBadgeGuyAllBadgesText: + text "Congratulations!" + + para "You got all the" + line "KANTO GYM BADGES." + + para "I've got a reward" + line "for your efforts." + done + +VermilionCityBadgeGuyBattleEdgeText: + text "Having a variety" + line "of #MON types" + + para "should give you an" + line "edge in battle." + + para "I'm sure the KANTO" + line "GYM BADGES will" + cont "help you." + done + +VermilionCitySignText: + text "VERMILION CITY" + + para "The Port of" + line "Exquisite Sunsets" + done + +VermilionGymSignText: + text "VERMILION CITY" + line "#MON GYM" + cont "LEADER: LT.SURGE" + + para "The Lightning" + line "American" + done + +PokemonFanClubSignText: + text "#MON FAN CLUB" + + para "All #MON Fans" + line "Welcome!" + done + +VermilionCityDiglettsCaveSignText: + text "DIGLETT'S CAVE" + done + +VermilionCityPortSignText: + text "VERMILION PORT" + line "ENTRANCE" + done + +VermilionCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 5, VERMILION_FISHING_SPEECH_HOUSE, 1 + warp_event 9, 5, VERMILION_POKECENTER_1F, 1 + warp_event 7, 13, POKEMON_FAN_CLUB, 1 + warp_event 13, 13, VERMILION_MAGNET_TRAIN_SPEECH_HOUSE, 1 + warp_event 21, 13, VERMILION_MART, 2 + warp_event 21, 17, VERMILION_DIGLETTS_CAVE_SPEECH_HOUSE, 1 + warp_event 10, 19, VERMILION_GYM, 1 + warp_event 19, 31, VERMILION_PORT_PASSAGE, 1 + warp_event 20, 31, VERMILION_PORT_PASSAGE, 2 + warp_event 34, 7, DIGLETTS_CAVE, 1 + + def_coord_events + + def_bg_events + bg_event 25, 3, BGEVENT_READ, VermilionCitySign + bg_event 5, 19, BGEVENT_READ, VermilionGymSign + bg_event 5, 13, BGEVENT_READ, PokemonFanClubSign + bg_event 33, 9, BGEVENT_READ, VermilionCityDiglettsCaveSign + bg_event 27, 15, BGEVENT_READ, VermilionCityPortSign + bg_event 10, 5, BGEVENT_READ, VermilionCityPokecenterSign + bg_event 22, 13, BGEVENT_READ, VermilionCityMartSign + bg_event 12, 19, BGEVENT_ITEM, VermilionCityHiddenFullHeal + + def_object_events + object_event 18, 9, SPRITE_TEACHER, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionCityTeacherScript, -1 + object_event 23, 6, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionMachopOwner, -1 + object_event 26, 7, SPRITE_MACHOP, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, VermilionMachop, -1 + object_event 14, 16, SPRITE_SUPER_NERD, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VermilionCitySuperNerdScript, -1 + object_event 34, 8, SPRITE_BIG_SNORLAX, SPRITEMOVEDATA_BIGDOLLSYM, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionSnorlax, EVENT_VERMILION_CITY_SNORLAX + object_event 31, 12, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VermilionGymBadgeGuy, -1 diff --git a/maps/VermilionCity.blk b/maps/VermilionCity.blk new file mode 100644 index 0000000..5984b94 --- /dev/null +++ b/maps/VermilionCity.blk @@ -0,0 +1,5 @@ + +RRRRRO1PRR ! ! !1 !wVww1|~|r7~17~1111>?;d1111111111IH1$%-11111DE1111CC !C !11 !www +d|~1|~11|s1111l +d1111111111111 +od1 11111dV5111ed1edd11111e-.d1edd11111eCCCCCd1ed-.d111111e-jCCCCCCCd1.CCCCCCCCCCCCCCCCCkkkkkkFJkkkkCCCCCCCCCd0eCCCCCCCCCCCCC-.CCCCCC \ No newline at end of file diff --git a/maps/VermilionDiglettsCaveSpeechHouse.asm b/maps/VermilionDiglettsCaveSpeechHouse.asm new file mode 100644 index 0000000..c428999 --- /dev/null +++ b/maps/VermilionDiglettsCaveSpeechHouse.asm @@ -0,0 +1,33 @@ + object_const_def + const VERMILIONDIGLETTSCAVESPEECHHOUSE_GENTLEMAN + +VermilionDiglettsCaveSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +VermilionDiglettsCaveSpeechHouseGentlemanScript: + jumptextfaceplayer VermilionDiglettsCaveSpeechHouseGentlemanText + +VermilionDiglettsCaveSpeechHouseGentlemanText: + text "Over many years," + line "DIGLETT dug a" + cont "large tunnel." + + para "That tunnel goes" + line "to a distant town." + done + +VermilionDiglettsCaveSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, VERMILION_CITY, 6 + warp_event 3, 7, VERMILION_CITY, 6 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_GENTLEMAN, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VermilionDiglettsCaveSpeechHouseGentlemanScript, -1 diff --git a/maps/VermilionFishingSpeechHouse.asm b/maps/VermilionFishingSpeechHouse.asm new file mode 100644 index 0000000..1f0046b --- /dev/null +++ b/maps/VermilionFishingSpeechHouse.asm @@ -0,0 +1,63 @@ + object_const_def + const VERMILIONFISHINGSPEECHHOUSE_FISHING_GURU + +VermilionFishingSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +FishingDude: + jumptextfaceplayer FishingDudeText + +FishingDudesHousePhoto: + jumptext FishingDudesHousePhotoText + +FishingDudesHouseBookshelf: ; unreferenced + jumpstd PictureBookshelfScript + +FishingDudeText: + text "I am the FISHING" + line "DUDE, the elder of" + cont "the FISHING BROS." + + para "Have you met the" + line "FISHING GURU at" + cont "LAKE OF RAGE?" + + para "He dreams about" + line "seeing the world's" + cont "greatest MAGIKARP." + + para "If you don't mind," + line "could you show him" + + para "any MAGIKARP you" + line "catch?" + + para "Who knows, you may" + line "catch the MAGIKARP" + cont "of his dreams." + done + +FishingDudesHousePhotoText: + text "It's a photo of" + line "people fishing…" + + para "They're having a" + line "great time…" + done + +VermilionFishingSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, VERMILION_CITY, 1 + warp_event 3, 7, VERMILION_CITY, 1 + + def_coord_events + + def_bg_events + bg_event 3, 0, BGEVENT_READ, FishingDudesHousePhoto + + def_object_events + object_event 2, 4, SPRITE_FISHING_GURU, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, FishingDude, -1 diff --git a/maps/VermilionGym.asm b/maps/VermilionGym.asm new file mode 100644 index 0000000..68ae33a --- /dev/null +++ b/maps/VermilionGym.asm @@ -0,0 +1,294 @@ + object_const_def + const VERMILIONGYM_SURGE + const VERMILIONGYM_GENTLEMAN + const VERMILIONGYM_ROCKER + const VERMILIONGYM_SUPER_NERD + const VERMILIONGYM_GYM_GUIDE + +VermilionGym_MapScripts: + def_scene_scripts + + def_callbacks + +VermilionGymSurgeScript: + faceplayer + opentext + checkflag ENGINE_THUNDERBADGE + iftrue .FightDone + writetext LtSurgeIntroText + waitbutton + closetext + winlosstext LtSurgeWinLossText, 0 + loadtrainer LT_SURGE, LT_SURGE1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_LTSURGE + setevent EVENT_BEAT_GENTLEMAN_GREGORY + setevent EVENT_BEAT_GUITARIST_VINCENT + setevent EVENT_BEAT_JUGGLER_HORTON + opentext + writetext ReceivedThunderBadgeText + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_THUNDERBADGE + writetext LtSurgeThunderBadgeText + waitbutton + closetext + end + +.FightDone: + writetext LtSurgeFightDoneText + waitbutton + closetext + end + +TrainerGentlemanGregory: + trainer GENTLEMAN, GREGORY, EVENT_BEAT_GENTLEMAN_GREGORY, GentlemanGregorySeenText, GentlemanGregoryBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GentlemanGregoryAfterBattleText + waitbutton + closetext + end + +TrainerGuitaristVincent: + trainer GUITARIST, VINCENT, EVENT_BEAT_GUITARIST_VINCENT, GuitaristVincentSeenText, GuitaristVincentBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext GuitaristVincentAfterBattleText + waitbutton + closetext + end + +TrainerJugglerHorton: + trainer JUGGLER, HORTON, EVENT_BEAT_JUGGLER_HORTON, JugglerHortonSeenText, JugglerHortonBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext JugglerHortonAfterBattleText + waitbutton + closetext + end + +VermilionGymGuideScript: + faceplayer + opentext + checkevent EVENT_BEAT_LTSURGE + iftrue .VermilionGymGuideWinScript + writetext VermilionGymGuideText + waitbutton + closetext + end + +.VermilionGymGuideWinScript: + writetext VermilionGymGuideWinText + waitbutton + closetext + end + +VermilionGymTrashCan: + jumptext VermilionGymTrashCanText + +VermilionGymStatue: + checkflag ENGINE_THUNDERBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, LT_SURGE, LT_SURGE1 + jumpstd GymStatue2Script + +LtSurgeIntroText: + text "SURGE: Hey, you" + line "little tyke!" + + para "I have to hand it" + line "to you. It may not" + + para "be very smart to" + line "challenge me, but" + cont "it takes guts!" + + para "When it comes to" + line "electric #MON," + cont "I'm number one!" + + para "I've never lost on" + line "the battlefield." + + para "I'll zap you just" + line "like I did my" + cont "enemies in war!" + done + +LtSurgeWinLossText: + text "SURGE: Arrrgh!" + line "You are strong!" + + para "OK, kid. You get" + line "THUNDERBADGE!" + done + +ReceivedThunderBadgeText: + text " received" + line "THUNDERBADGE." + done + +LtSurgeThunderBadgeText: + text "SURGE: THUNDER-" + line "BADGE increases" + cont "#MON's speed. " + + para "Consider it proof" + line "that you defeated" + + para "me. You wear it" + line "proudly, hear?" + done + +LtSurgeFightDoneText: + text "SURGE: Hey, kid!" + line "Still slugging and" + cont "chugging away?" + + para "My #MON and I" + line "are still at it!" + done + +GentlemanGregorySeenText: + text "You're here to" + line "defeat LT.SURGE?" + + para "Not if I can help" + line "it!" + done + +GentlemanGregoryBeatenText: + text "Sorry I failed" + line "you, LT.SURGE," + cont "sir!" + done + +GentlemanGregoryAfterBattleText: + text "When I was still" + line "in the army, LT." + + para "SURGE saved my" + line "life." + done + +GuitaristVincentSeenText: + text "LT.SURGE recog-" + line "nized my potential" + + para "with electric" + line "#MON." + + para "Think you can beat" + line "me?" + done + +GuitaristVincentBeatenText: + text "Ooh, how shocking!" + done + +GuitaristVincentAfterBattleText: + text "If the GYM's traps" + line "were working, you" + + para "would have been" + line "toast…" + done + +JugglerHortonSeenText: + text "I'm going to take" + line "you down! Prepare" + cont "to be shocked!" + done + +JugglerHortonBeatenText: + text "Gwaaah!" + line "I was overpowered…" + done + +JugglerHortonAfterBattleText: + text "Don't get too com-" + line "fortable about" + + para "beating me…" + line "LT.SURGE is tough." + done + +VermilionGymGuideText: + text "Yo! CHAMP in" + line "making!" + + para "You lucked out" + line "this time." + + para "LT.SURGE is very" + line "cautious. He has" + + para "traps set all over" + line "the GYM." + + para "But--he-heh--the" + line "traps aren't" + cont "active right now." + + para "You'll have no" + line "problem getting to" + cont "LT.SURGE." + done + +VermilionGymGuideWinText: + text "Whew! That was an" + line "electrifying bout!" + + para "It sure made me" + line "nervous." + done + +VermilionGymTrashCanText: + text "Nope! Nothing here" + line "but trash." + done + +VermilionGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 17, VERMILION_CITY, 7 + warp_event 5, 17, VERMILION_CITY, 7 + + def_coord_events + + def_bg_events + bg_event 1, 7, BGEVENT_READ, VermilionGymTrashCan + bg_event 3, 7, BGEVENT_READ, VermilionGymTrashCan + bg_event 5, 7, BGEVENT_READ, VermilionGymTrashCan + bg_event 7, 7, BGEVENT_READ, VermilionGymTrashCan + bg_event 9, 7, BGEVENT_READ, VermilionGymTrashCan + bg_event 1, 9, BGEVENT_READ, VermilionGymTrashCan + bg_event 3, 9, BGEVENT_READ, VermilionGymTrashCan + bg_event 5, 9, BGEVENT_READ, VermilionGymTrashCan + bg_event 7, 9, BGEVENT_READ, VermilionGymTrashCan + bg_event 9, 9, BGEVENT_READ, VermilionGymTrashCan + bg_event 1, 11, BGEVENT_READ, VermilionGymTrashCan + bg_event 3, 11, BGEVENT_READ, VermilionGymTrashCan + bg_event 5, 11, BGEVENT_READ, VermilionGymTrashCan + bg_event 7, 11, BGEVENT_READ, VermilionGymTrashCan + bg_event 9, 11, BGEVENT_READ, VermilionGymTrashCan + bg_event 3, 15, BGEVENT_READ, VermilionGymStatue + bg_event 6, 15, BGEVENT_READ, VermilionGymStatue + + def_object_events + object_event 5, 2, SPRITE_SURGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, VermilionGymSurgeScript, -1 + object_event 8, 8, SPRITE_GENTLEMAN, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerGentlemanGregory, -1 + object_event 4, 7, SPRITE_ROCKER, SPRITEMOVEDATA_STANDING_DOWN, 3, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 3, TrainerGuitaristVincent, -1 + object_event 0, 10, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 4, TrainerJugglerHorton, -1 + object_event 7, 15, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 1, VermilionGymGuideScript, -1 diff --git a/maps/VermilionGym.blk b/maps/VermilionGym.blk new file mode 100644 index 0000000..70311ff --- /dev/null +++ b/maps/VermilionGym.blk @@ -0,0 +1 @@ +"&&&$#% ! !  \ No newline at end of file diff --git a/maps/VermilionMagnetTrainSpeechHouse.asm b/maps/VermilionMagnetTrainSpeechHouse.asm new file mode 100644 index 0000000..8688d8d --- /dev/null +++ b/maps/VermilionMagnetTrainSpeechHouse.asm @@ -0,0 +1,49 @@ + object_const_def + const VERMILIONMAGNETTRAINSPEECHHOUSE_POKEFAN_F + const VERMILIONMAGNETTRAINSPEECHHOUSE_YOUNGSTER + +VermilionMagnetTrainSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +VermilionMagnetTrainSpeechHousePokefanFScript: + jumptextfaceplayer VermilionMagnetTrainSpeechHousePokefanFText + +VermilionMagnetTrainSpeechHouseYoungsterScript: + jumptextfaceplayer VermilionMagnetTrainSpeechHouseYoungsterText + +VermilionMagnetTrainSpeechHouseBookshelf: + jumpstd PictureBookshelfScript + +VermilionMagnetTrainSpeechHousePokefanFText: + text "Do you know about" + line "the MAGNET TRAIN?" + + para "It's a railway" + line "that goes to GOL-" + cont "DENROD in JOHTO." + done + +VermilionMagnetTrainSpeechHouseYoungsterText: + text "I want to go to" + line "SAFFRON to see" + cont "the MAGNET TRAIN." + done + +VermilionMagnetTrainSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, VERMILION_CITY, 4 + warp_event 3, 7, VERMILION_CITY, 4 + + def_coord_events + + def_bg_events + bg_event 0, 1, BGEVENT_READ, VermilionMagnetTrainSpeechHouseBookshelf + bg_event 1, 1, BGEVENT_READ, VermilionMagnetTrainSpeechHouseBookshelf + + def_object_events + object_event 2, 3, SPRITE_POKEFAN_F, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionMagnetTrainSpeechHousePokefanFScript, -1 + object_event 0, 3, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VermilionMagnetTrainSpeechHouseYoungsterScript, -1 diff --git a/maps/VermilionMart.asm b/maps/VermilionMart.asm new file mode 100644 index 0000000..8d0526f --- /dev/null +++ b/maps/VermilionMart.asm @@ -0,0 +1,51 @@ + object_const_def + const VERMILIONMART_CLERK + const VERMILIONMART_SUPER_NERD + const VERMILIONMART_BEAUTY + +VermilionMart_MapScripts: + def_scene_scripts + + def_callbacks + +VermilionMartClerkScript: + opentext + pokemart MARTTYPE_STANDARD, MART_VERMILION + closetext + end + +VermilionMartSuperNerdScript: + jumptextfaceplayer VermilionMartSuperNerdText + +VermilionMartBeautyScript: + jumptextfaceplayer VermilionMartBeautyText + +VermilionMartSuperNerdText: + text "TEAM ROCKET is no" + line "longer in KANTO." + + para "That alone makes" + line "me happy." + done + +VermilionMartBeautyText: + text "I'm thinking about" + line "going shopping in" + cont "SAFFRON." + done + +VermilionMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, VERMILION_CITY, 5 + warp_event 3, 7, VERMILION_CITY, 5 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionMartClerkScript, -1 + object_event 5, 2, SPRITE_SUPER_NERD, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VermilionMartSuperNerdScript, -1 + object_event 8, 6, SPRITE_BEAUTY, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VermilionMartBeautyScript, -1 diff --git a/maps/VermilionPokecenter1F.asm b/maps/VermilionPokecenter1F.asm new file mode 100644 index 0000000..41533c2 --- /dev/null +++ b/maps/VermilionPokecenter1F.asm @@ -0,0 +1,93 @@ + object_const_def + const VERMILIONPOKECENTER1F_NURSE + const VERMILIONPOKECENTER1F_FISHING_GURU + const VERMILIONPOKECENTER1F_SAILOR + const VERMILIONPOKECENTER1F_BUG_CATCHER + +VermilionPokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +VermilionPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +VermilionPokecenter1FFishingGuruScript: + faceplayer + opentext + checkevent EVENT_FOUGHT_SNORLAX + iftrue .FoughtSnorlax + writetext VermilionPokecenter1FFishingGuruText + waitbutton + closetext + end + +.FoughtSnorlax: + writetext VermilionPokecenter1FFishingGuruText_FoughtSnorlax + waitbutton + closetext + end + +VermilionPokecenter1FSailorScript: + jumptextfaceplayer VermilionPokecenter1FSailorText + +VermilionPokecenter1FBugCatcherScript: + jumptextfaceplayer VermilionPokecenter1FBugCatcherText + +VermilionPokecenter1FFishingGuruText: + text "A sleeping #MON" + line "is lying in front" + cont "of DIGLETT'S CAVE." + + para "It's a fantastic" + line "opportunity to get" + + para "it, but how do you" + line "wake it up?" + done + +VermilionPokecenter1FFishingGuruText_FoughtSnorlax: + text "There used to be a" + line "sleeping #MON" + + para "lying in front of" + line "DIGLETT'S CAVE." + + para "But it seems to" + line "have disappeared." + done + +VermilionPokecenter1FSailorText: + text "The FAST SHIP is a" + line "great place to" + + para "meet and battle" + line "trainers." + done + +VermilionPokecenter1FBugCatcherText: + text "Oh? You have some" + line "BADGES I've never" + cont "seen before." + + para "Oh, I get it. You" + line "got them in JOHTO." + done + +VermilionPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, VERMILION_CITY, 2 + warp_event 4, 7, VERMILION_CITY, 2 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionPokecenter1FNurseScript, -1 + object_event 7, 2, SPRITE_FISHING_GURU, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VermilionPokecenter1FFishingGuruScript, -1 + object_event 6, 5, SPRITE_SAILOR, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 1, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, VermilionPokecenter1FSailorScript, -1 + object_event 1, 5, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VermilionPokecenter1FBugCatcherScript, -1 diff --git a/maps/VermilionPokecenter2FBeta.asm b/maps/VermilionPokecenter2FBeta.asm new file mode 100644 index 0000000..1e1f42d --- /dev/null +++ b/maps/VermilionPokecenter2FBeta.asm @@ -0,0 +1,16 @@ +VermilionPokecenter2FBeta_MapScripts: + def_scene_scripts + + def_callbacks + +VermilionPokecenter2FBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 7, VERMILION_POKECENTER_1F, 3 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/VermilionPort.asm b/maps/VermilionPort.asm new file mode 100644 index 0000000..794040e --- /dev/null +++ b/maps/VermilionPort.asm @@ -0,0 +1,315 @@ + object_const_def + const VERMILIONPORT_SAILOR1 + const VERMILIONPORT_SAILOR2 + const VERMILIONPORT_SUPER_NERD + +VermilionPort_MapScripts: + def_scene_scripts + scene_script VermilionPortNoopScene, SCENE_VERMILIONPORT_ASK_ENTER_SHIP + scene_script VermilionPortLeaveShipScene, SCENE_VERMILIONPORT_LEAVE_SHIP + + def_callbacks + callback MAPCALLBACK_NEWMAP, VermilionPortFlypointCallback + +VermilionPortNoopScene: + end + +VermilionPortLeaveShipScene: + sdefer VermilionPortLeaveShipScript + end + +VermilionPortFlypointCallback: + setflag ENGINE_FLYPOINT_VERMILION + endcallback + +VermilionPortLeaveShipScript: + applymovement PLAYER, VermilionPortLeaveFastShipMovement + appear VERMILIONPORT_SAILOR1 + setscene SCENE_VERMILIONPORT_ASK_ENTER_SHIP + setevent EVENT_FAST_SHIP_CABINS_SE_SSE_CAPTAINS_CABIN_TWIN_1 + setevent EVENT_FAST_SHIP_CABINS_SE_SSE_GENTLEMAN + setevent EVENT_FAST_SHIP_PASSENGERS_FIRST_TRIP + clearevent EVENT_OLIVINE_PORT_PASSAGE_POKEFAN_M + setevent EVENT_FAST_SHIP_FIRST_TIME + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + blackoutmod VERMILION_CITY + end + +VermilionPortSailorAtGangwayScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue VermilionPortAlreadyRodeScript + writetext VermilionPortDepartingText + waitbutton + closetext + turnobject VERMILIONPORT_SAILOR1, DOWN + pause 10 + playsound SFX_EXIT_BUILDING + disappear VERMILIONPORT_SAILOR1 + waitsfx + applymovement PLAYER, VermilionPortEnterFastShipMovement + playsound SFX_EXIT_BUILDING + special FadeOutPalettes + waitsfx + setevent EVENT_FAST_SHIP_PASSENGERS_EASTBOUND + clearevent EVENT_FAST_SHIP_PASSENGERS_WESTBOUND + clearevent EVENT_BEAT_POKEMANIAC_ETHAN + clearevent EVENT_BEAT_BURGLAR_COREY + clearevent EVENT_BEAT_BUG_CATCHER_KEN + clearevent EVENT_BEAT_GUITARIST_CLYDE + clearevent EVENT_BEAT_POKEFANM_JEREMY + clearevent EVENT_BEAT_POKEFANF_GEORGIA + clearevent EVENT_BEAT_SAILOR_KENNETH + clearevent EVENT_BEAT_TEACHER_SHIRLEY + clearevent EVENT_BEAT_SCHOOLBOY_NATE + clearevent EVENT_BEAT_SCHOOLBOY_RICKY + setevent EVENT_FAST_SHIP_DESTINATION_OLIVINE + appear VERMILIONPORT_SAILOR1 + setmapscene FAST_SHIP_1F, SCENE_FASTSHIP1F_ENTER_SHIP + warp FAST_SHIP_1F, 25, 1 + end + +VermilionPortAlreadyRodeScript: + writetext VermilionPortCantBoardText + waitbutton + closetext + end + +VermilionPortWalkUpToShipScript: + turnobject VERMILIONPORT_SAILOR2, RIGHT + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue .skip + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + iftrue .skip + turnobject PLAYER, LEFT + opentext + readvar VAR_WEEKDAY + ifequal MONDAY, .NextShipWednesday + ifequal TUESDAY, .NextShipWednesday + ifequal THURSDAY, .NextShipSunday + ifequal FRIDAY, .NextShipSunday + ifequal SATURDAY, .NextShipSunday + writetext VermilionPortAskBoardingText + yesorno + iffalse VermilionPortNotRidingMoveAwayScript + writetext VermilionPortAskTicketText + promptbutton + checkitem S_S_TICKET + iffalse .NoTicket + writetext VermilionPortSSTicketText + waitbutton + closetext + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + applymovement PLAYER, VermilionPortApproachFastShipMovement + sjump VermilionPortSailorAtGangwayScript + +.NoTicket: + writetext VermilionPortNoTicketText + waitbutton + closetext + applymovement PLAYER, VermilionPortCannotEnterFastShipMovement + end + +.NextShipWednesday: + writetext VermilionPortSailMondayText + waitbutton + closetext + applymovement PLAYER, VermilionPortCannotEnterFastShipMovement + end + +.NextShipSunday: + writetext VermilionPortSailSundayText + waitbutton + closetext + applymovement PLAYER, VermilionPortCannotEnterFastShipMovement + end + +.skip: + end + +VermilionPortNotRidingScript: + writetext VermilionPortComeAgainText + waitbutton + closetext + end + +VermilionPortNotRidingMoveAwayScript: + writetext VermilionPortComeAgainText + waitbutton + closetext + applymovement PLAYER, VermilionPortCannotEnterFastShipMovement + end + +VermilionPortSailorScript: + faceplayer + opentext + checkevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_1 + iftrue VermilionPortAlreadyRodeScript + readvar VAR_WEEKDAY + ifequal MONDAY, .NextShipWednesday + ifequal TUESDAY, .NextShipWednesday + ifequal THURSDAY, .NextShipSunday + ifequal FRIDAY, .NextShipSunday + ifequal SATURDAY, .NextShipSunday + writetext VermilionPortAskBoardingText + yesorno + iffalse VermilionPortNotRidingScript + writetext VermilionPortAskTicketText + promptbutton + checkitem S_S_TICKET + iffalse .NoTicket + writetext VermilionPortSSTicketText + waitbutton + closetext + setevent EVENT_TEMPORARY_UNTIL_MAP_RELOAD_2 + applymovement PLAYER, VermilionPortApproachFastShipRightMovement + sjump VermilionPortSailorAtGangwayScript + +.NoTicket: + writetext VermilionPortNoTicketText + waitbutton + closetext + end + +.NextShipWednesday: + writetext VermilionPortSailMondayText + waitbutton + closetext + end + +.NextShipSunday: + writetext VermilionPortSailSundayText + waitbutton + closetext + end + +VermilionPortSuperNerdScript: + faceplayer + opentext + writetext VermilionPortSuperNerdText + waitbutton + closetext + end + +VermilionPortHiddenIron: + hiddenitem IRON, EVENT_VERMILION_PORT_HIDDEN_IRON + +VermilionPortEnterFastShipMovement: + step DOWN + step_end + +VermilionPortLeaveFastShipMovement: + step UP + step_end + +VermilionPortCannotEnterFastShipMovement: + step RIGHT + turn_head LEFT + step_end + +VermilionPortApproachFastShipMovement: + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +VermilionPortApproachFastShipRightMovement: + step RIGHT + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +VermilionPortDepartingText: + text "We're departing" + line "soon. Please get" + cont "on board." + done + +VermilionPortCantBoardText: + text "Sorry. You can't" + line "board now." + done + +VermilionPortAskBoardingText: + text "Welcome to FAST" + line "SHIP S.S.AQUA." + + para "Will you be board-" + line "ing today?" + done + +VermilionPortAskTicketText: + text "May I see your" + line "S.S.TICKET?" + done + +VermilionPortComeAgainText: + text "We hope to see you" + line "again!" + done + +VermilionPortSSTicketText: + text " flashed" + line "the S.S.TICKET." + + para "That's it." + line "Thank you!" + done + +VermilionPortNoTicketText: + text " tried to" + line "show the S.S." + cont "TICKET…" + + para "…But no TICKET!" + + para "Sorry!" + line "You may board only" + + para "if you have an" + line "S.S.TICKET." + done + +VermilionPortSailMondayText: + text "The FAST SHIP will" + line "sail on Wednesday." + done + +VermilionPortSailSundayText: + text "The FAST SHIP will" + line "sail next Sunday." + done + +VermilionPortSuperNerdText: + text "You came from" + line "JOHTO?" + + para "I hear many rare" + line "#MON live over" + cont "there." + done + +VermilionPort_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 5, VERMILION_PORT_PASSAGE, 5 + warp_event 7, 17, FAST_SHIP_1F, 1 + + def_coord_events + coord_event 7, 11, SCENE_VERMILIONPORT_ASK_ENTER_SHIP, VermilionPortWalkUpToShipScript + + def_bg_events + bg_event 16, 13, BGEVENT_ITEM, VermilionPortHiddenIron + + def_object_events + object_event 7, 17, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionPortSailorAtGangwayScript, EVENT_VERMILION_PORT_SAILOR_AT_GANGWAY + object_event 6, 11, SPRITE_SAILOR, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionPortSailorScript, -1 + object_event 11, 11, SPRITE_SUPER_NERD, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionPortSuperNerdScript, -1 diff --git a/maps/VermilionPort.blk b/maps/VermilionPort.blk new file mode 100644 index 0000000..29e78d7 --- /dev/null +++ b/maps/VermilionPort.blk @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + 5 + + + +  + + + + + + + + + + + +  + + + + + + +  + + + + + + + + + + + + + + + + + + + +  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/maps/VermilionPortPassage.asm b/maps/VermilionPortPassage.asm new file mode 100644 index 0000000..1b59b7a --- /dev/null +++ b/maps/VermilionPortPassage.asm @@ -0,0 +1,34 @@ + object_const_def + const VERMILIONPORTPASSAGE_TEACHER + +VermilionPortPassage_MapScripts: + def_scene_scripts + + def_callbacks + +VermilionPortPassageTeacherScript: + jumptextfaceplayer VermilionPortPassageTeacherText + +VermilionPortPassageTeacherText: + text "The FAST SHIP" + line "sails on Wednes-" + cont "days and Sundays" + cont "every week." + done + +VermilionPortPassage_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 15, 0, VERMILION_CITY, 8 + warp_event 16, 0, VERMILION_CITY, 9 + warp_event 15, 4, VERMILION_PORT_PASSAGE, 4 + warp_event 3, 2, VERMILION_PORT_PASSAGE, 3 + warp_event 3, 14, VERMILION_PORT, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 17, 1, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VermilionPortPassageTeacherScript, -1 diff --git a/maps/VictoryRoad.asm b/maps/VictoryRoad.asm new file mode 100644 index 0000000..57fcd1a --- /dev/null +++ b/maps/VictoryRoad.asm @@ -0,0 +1,268 @@ + object_const_def + const VICTORYROAD_RIVAL + const VICTORYROAD_POKE_BALL1 + const VICTORYROAD_POKE_BALL2 + const VICTORYROAD_POKE_BALL3 + const VICTORYROAD_POKE_BALL4 + const VICTORYROAD_POKE_BALL5 + +VictoryRoad_MapScripts: + def_scene_scripts + scene_script VictoryRoadNoop1Scene, SCENE_VICTORYROAD_RIVAL_BATTLE + scene_script VictoryRoadNoop2Scene, SCENE_VICTORYROAD_NOOP + + def_callbacks + +VictoryRoadNoop1Scene: + end + +VictoryRoadNoop2Scene: + end + +VictoryRoadRivalLeft: + moveobject VICTORYROAD_RIVAL, 18, 11 + turnobject PLAYER, DOWN + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + pause 15 + appear VICTORYROAD_RIVAL + applymovement VICTORYROAD_RIVAL, VictoryRoadRivalBattleApproachMovement1 + scall VictoryRoadRivalNext + applymovement VICTORYROAD_RIVAL, VictoryRoadRivalBattleExitMovement1 + disappear VICTORYROAD_RIVAL + setscene SCENE_VICTORYROAD_NOOP + playmapmusic + end + +VictoryRoadRivalRight: + turnobject PLAYER, DOWN + showemote EMOTE_SHOCK, PLAYER, 15 + special FadeOutMusic + pause 15 + appear VICTORYROAD_RIVAL + applymovement VICTORYROAD_RIVAL, VictoryRoadRivalBattleApproachMovement2 + scall VictoryRoadRivalNext + applymovement VICTORYROAD_RIVAL, VictoryRoadRivalBattleExitMovement2 + disappear VICTORYROAD_RIVAL + setscene SCENE_VICTORYROAD_NOOP + playmapmusic + end + +VictoryRoadRivalNext: + turnobject PLAYER, DOWN + playmusic MUSIC_RIVAL_ENCOUNTER + opentext + writetext VictoryRoadRivalBeforeText + waitbutton + closetext + setevent EVENT_RIVAL_VICTORY_ROAD + checkevent EVENT_GOT_TOTODILE_FROM_ELM + iftrue .GotTotodile + checkevent EVENT_GOT_CHIKORITA_FROM_ELM + iftrue .GotChikorita + winlosstext VictoryRoadRivalDefeatText, VictoryRoadRivalVictoryText + setlasttalked VICTORYROAD_RIVAL + loadtrainer RIVAL1, RIVAL1_5_TOTODILE + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .AfterBattle + +.GotTotodile: + winlosstext VictoryRoadRivalDefeatText, VictoryRoadRivalVictoryText + setlasttalked VICTORYROAD_RIVAL + loadtrainer RIVAL1, RIVAL1_5_CHIKORITA + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .AfterBattle + +.GotChikorita: + winlosstext VictoryRoadRivalDefeatText, VictoryRoadRivalVictoryText + setlasttalked VICTORYROAD_RIVAL + loadtrainer RIVAL1, RIVAL1_5_CYNDAQUIL + startbattle + dontrestartmapmusic + reloadmapafterbattle + sjump .AfterBattle + +.AfterBattle: + playmusic MUSIC_RIVAL_AFTER + opentext + writetext VictoryRoadRivalAfterText + waitbutton + closetext + end + +VictoryRoadTMEarthquake: + itemball TM_EARTHQUAKE + +VictoryRoadMaxRevive: + itemball MAX_REVIVE + +VictoryRoadFullRestore: + itemball FULL_RESTORE + +VictoryRoadFullHeal: + itemball FULL_HEAL + +VictoryRoadHPUp: + itemball HP_UP + +VictoryRoadHiddenMaxPotion: + hiddenitem MAX_POTION, EVENT_VICTORY_ROAD_HIDDEN_MAX_POTION + +VictoryRoadHiddenFullHeal: + hiddenitem FULL_HEAL, EVENT_VICTORY_ROAD_HIDDEN_FULL_HEAL + +VictoryRoadRivalBattleApproachMovement1: + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step UP + step UP + step_end + +VictoryRoadRivalBattleApproachMovement2: + step UP + step UP + step LEFT + step LEFT + step LEFT + step LEFT + step LEFT + step UP + step UP + step_end + +VictoryRoadRivalBattleExitMovement1: + step DOWN + step DOWN + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step_end + +VictoryRoadRivalBattleExitMovement2: + step DOWN + step DOWN + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step RIGHT + step DOWN + step DOWN + step_end + +VictoryRoadRivalBeforeText: + text "Hold it." + + para "…Are you going to" + line "take the #MON" + cont "LEAGUE challenge?" + + para "…Don't make me" + line "laugh." + + para "You're so much" + line "weaker than I am." + + para "I'm not like I was" + line "before." + + para "I now have the" + line "best and strongest" + + para "#MON with me." + line "I'm invincible!" + + para "!" + line "I challenge you!" + done + +VictoryRoadRivalDefeatText: + text "…I couldn't win…" + + para "I gave it every-" + line "thing I had…" + + para "What you possess," + line "and what I lack…" + + para "I'm beginning to" + line "understand what" + + para "that dragon master" + line "said to me…" + done + +VictoryRoadRivalAfterText: + text "…I haven't given up" + line "on becoming the" + cont "greatest trainer…" + + para "I'm going to find" + line "out why I can't" + + para "win and become" + line "stronger…" + + para "When I do, I will" + line "challenge you." + + para "And I'll beat you" + line "down with all my" + cont "power." + + para "…Humph! You keep" + line "at it until then." + done + +VictoryRoadRivalVictoryText: + text "…Humph!" + + para "When it comes down" + line "to it, nothing can" + cont "beat power." + + para "I don't need any-" + line "thing else." + done + +VictoryRoad_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 67, VICTORY_ROAD_GATE, 5 + warp_event 1, 49, VICTORY_ROAD, 3 + warp_event 1, 35, VICTORY_ROAD, 2 + warp_event 13, 31, VICTORY_ROAD, 5 + warp_event 13, 17, VICTORY_ROAD, 4 + warp_event 17, 33, VICTORY_ROAD, 7 + warp_event 17, 19, VICTORY_ROAD, 6 + warp_event 0, 11, VICTORY_ROAD, 9 + warp_event 0, 27, VICTORY_ROAD, 8 + warp_event 13, 5, ROUTE_23, 3 + + def_coord_events + coord_event 12, 8, SCENE_VICTORYROAD_RIVAL_BATTLE, VictoryRoadRivalLeft + coord_event 13, 8, SCENE_VICTORYROAD_RIVAL_BATTLE, VictoryRoadRivalRight + + def_bg_events + bg_event 3, 29, BGEVENT_ITEM, VictoryRoadHiddenMaxPotion + bg_event 3, 65, BGEVENT_ITEM, VictoryRoadHiddenFullHeal + + def_object_events + object_event 18, 13, SPRITE_RIVAL, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_VICTORY_ROAD + object_event 3, 28, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VictoryRoadTMEarthquake, EVENT_VICTORY_ROAD_TM_EARTHQUAKE + object_event 12, 48, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VictoryRoadMaxRevive, EVENT_VICTORY_ROAD_MAX_REVIVE + object_event 18, 29, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VictoryRoadFullRestore, EVENT_VICTORY_ROAD_FULL_RESTORE + object_event 15, 48, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VictoryRoadFullHeal, EVENT_VICTORY_ROAD_FULL_HEAL + object_event 7, 38, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VictoryRoadHPUp, EVENT_VICTORY_ROAD_HP_UP diff --git a/maps/VictoryRoad.blk b/maps/VictoryRoad.blk new file mode 100644 index 0000000..c55025e --- /dev/null +++ b/maps/VictoryRoad.blk @@ -0,0 +1,7 @@ +   "?+)*!"1 6  + +!! )<+"(+<*9!1199   +))+; !;   !! *!)   ++* +9  +111  1+*!!$!+ #  \ No newline at end of file diff --git a/maps/VictoryRoadGate.asm b/maps/VictoryRoadGate.asm new file mode 100644 index 0000000..8521389 --- /dev/null +++ b/maps/VictoryRoadGate.asm @@ -0,0 +1,119 @@ + object_const_def + const VICTORYROADGATE_OFFICER + const VICTORYROADGATE_BLACK_BELT1 + const VICTORYROADGATE_BLACK_BELT2 + +VictoryRoadGate_MapScripts: + def_scene_scripts + scene_script VictoryRoadGateNoop1Scene, SCENE_VICTORYROADGATE_BADGE_CHECK + scene_script VictoryRoadGateNoop2Scene, SCENE_VICTORYROADGATE_NOOP + + def_callbacks + +VictoryRoadGateNoop1Scene: + end + +VictoryRoadGateNoop2Scene: + end + +VictoryRoadGateBadgeCheckScript: + turnobject PLAYER, LEFT + sjump _VictoryRoadGateBadgeCheckScript + +VictoryRoadGateOfficerScript: + faceplayer +_VictoryRoadGateBadgeCheckScript: + opentext + writetext VictoryRoadGateOfficerText + promptbutton + readvar VAR_BADGES + ifgreater NUM_JOHTO_BADGES - 1, .AllEightBadges + writetext VictoryRoadGateNotEnoughBadgesText + waitbutton + closetext + applymovement PLAYER, VictoryRoadGateStepDownMovement + end + +.AllEightBadges: + writetext VictoryRoadGateEightBadgesText + waitbutton + closetext + setscene SCENE_VICTORYROADGATE_NOOP + end + +VictoryRoadGateLeftBlackBeltScript: + jumptextfaceplayer VictoryRoadGateLeftBlackBeltText + +VictoryRoadGateRightBlackBeltScript: + jumptextfaceplayer VictoryRoadGateRightBlackBeltText + +VictoryRoadGateStepDownMovement: + step DOWN + step_end + +VictoryRoadGateOfficerText: + text "Only trainers who" + line "have proven them-" + cont "selves may pass." + done + +VictoryRoadGateNotEnoughBadgesText: + text "You don't have all" + line "the GYM BADGES of" + cont "JOHTO." + + para "I'm sorry, but I" + line "can't let you go" + cont "through." + done + +VictoryRoadGateEightBadgesText: + text "Oh! The eight" + line "BADGES of JOHTO!" + + para "Please, go right" + line "on through!" + done + +VictoryRoadGateLeftBlackBeltText: + text "This way leads to" + line "MT.SILVER." + + para "You'll see scary-" + line "strong #MON out" + cont "there." + done + +VictoryRoadGateRightBlackBeltText: + text "Off to the #MON" + line "LEAGUE, are you?" + + para "The ELITE FOUR are" + line "so strong it's" + + para "scary, and they're" + line "ready for you!" + done + +VictoryRoadGate_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 17, 7, ROUTE_22, 1 + warp_event 18, 7, ROUTE_22, 1 + warp_event 9, 17, ROUTE_26, 1 + warp_event 10, 17, ROUTE_26, 1 + warp_event 9, 0, VICTORY_ROAD, 1 + warp_event 10, 0, VICTORY_ROAD, 1 + warp_event 1, 7, ROUTE_28, 2 + warp_event 2, 7, ROUTE_28, 2 + + def_coord_events + coord_event 10, 11, SCENE_VICTORYROADGATE_BADGE_CHECK, VictoryRoadGateBadgeCheckScript + + def_bg_events + + def_object_events + object_event 8, 11, SPRITE_OFFICER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VictoryRoadGateOfficerScript, -1 + object_event 7, 5, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VictoryRoadGateLeftBlackBeltScript, EVENT_OPENED_MT_SILVER + object_event 12, 5, SPRITE_BLACK_BELT, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VictoryRoadGateRightBlackBeltScript, EVENT_FOUGHT_SNORLAX diff --git a/maps/VictoryRoadGate.blk b/maps/VictoryRoadGate.blk new file mode 100644 index 0000000..90fe1bd --- /dev/null +++ b/maps/VictoryRoadGate.blk @@ -0,0 +1 @@ +'''')*''''''''''''%&''''%&'''''''''''' 0'''''''' ''''''''''''''''%&'''' \ No newline at end of file diff --git a/maps/VioletCity.asm b/maps/VioletCity.asm new file mode 100644 index 0000000..58b93a3 --- /dev/null +++ b/maps/VioletCity.asm @@ -0,0 +1,312 @@ + object_const_def + const VIOLETCITY_EARL + const VIOLETCITY_LASS + const VIOLETCITY_SUPER_NERD + const VIOLETCITY_GRAMPS + const VIOLETCITY_YOUNGSTER + const VIOLETCITY_FRUIT_TREE + const VIOLETCITY_POKE_BALL1 + const VIOLETCITY_POKE_BALL2 + +VioletCity_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, VioletCityFlypointCallback + +VioletCityFlypointCallback: + setflag ENGINE_FLYPOINT_VIOLET + endcallback + +VioletCityEarlScript: + applymovement VIOLETCITY_EARL, VioletCitySpinningEarl_MovementData + faceplayer + opentext + writetext Text_EarlAsksIfYouBeatFalkner + yesorno + iffalse .FollowEarl + sjump .PointlessJump + +.PointlessJump: + writetext Text_VeryNiceIndeed + waitbutton + closetext + end + +.FollowEarl: + writetext Text_FollowEarl + waitbutton + closetext + playmusic MUSIC_SHOW_ME_AROUND + follow VIOLETCITY_EARL, PLAYER + applymovement VIOLETCITY_EARL, VioletCityFollowEarl_MovementData + turnobject PLAYER, UP + applymovement VIOLETCITY_EARL, VioletCitySpinningEarl_MovementData + stopfollow + special RestartMapMusic + opentext + writetext Text_HereTeacherIAm + waitbutton + closetext + applymovement VIOLETCITY_EARL, VioletCitySpinningEarl_MovementData + applymovement VIOLETCITY_EARL, VioletCityFinishFollowEarl_MovementData + playsound SFX_ENTER_DOOR + disappear VIOLETCITY_EARL + clearevent EVENT_EARLS_ACADEMY_EARL + waitsfx + end + +VioletCityLassScript: + jumptextfaceplayer VioletCityLassText + +VioletCitySuperNerdScript: + jumptextfaceplayer VioletCitySuperNerdText + +VioletCityGrampsScript: + jumptextfaceplayer VioletCityGrampsText + +VioletCityYoungsterScript: + jumptextfaceplayer VioletCityYoungsterText + +VioletCitySign: + jumptext VioletCitySignText + +VioletGymSign: + jumptext VioletGymSignText + +SproutTowerSign: + jumptext SproutTowerSignText + +EarlsPokemonAcademySign: + jumptext EarlsPokemonAcademySignText + +VioletCityPokecenterSign: + jumpstd PokecenterSignScript + +VioletCityMartSign: + jumpstd MartSignScript + +VioletCityPPUp: + itemball PP_UP + +VioletCityRareCandy: + itemball RARE_CANDY + +VioletCityFruitTree: + fruittree FRUITTREE_VIOLET_CITY + +VioletCityHiddenHyperPotion: + hiddenitem HYPER_POTION, EVENT_VIOLET_CITY_HIDDEN_HYPER_POTION + +VioletCityFollowEarl_MovementData: + big_step DOWN + big_step DOWN + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + big_step DOWN + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + big_step RIGHT + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + big_step UP + turn_head DOWN + step_end + +VioletCityFinishFollowEarl_MovementData: + step UP + step_end + +VioletCitySpinningEarl_MovementData: + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + turn_head LEFT + turn_head UP + turn_head RIGHT + turn_head DOWN + step_end + +Text_EarlAsksIfYouBeatFalkner: + text "Hello!" + line "You are trainer?" + + para "Battle GYM LEADER," + line "win you did?" + done + +Text_VeryNiceIndeed: + text "Ooh, la la!" + line "Very indeed nice!" + done + +Text_FollowEarl: + text "Is that so? Then" + line "study shall you!" + cont "Follow me!" + done + +Text_HereTeacherIAm: + text "Here, teacher I" + line "am. Good it is" + cont "you study here!" + done + +VioletCityLassText: + text "Ghosts are rumored" + line "to appear in" + cont "SPROUT TOWER." + + para "They said normal-" + line "type #MON moves" + + para "had no effect on" + line "ghosts." + done + +VioletCitySuperNerdText: + text "Hey, you're a" + line "#MON trainer?" + + para "If you beat the" + line "GYM LEADER here," + + para "you'll be ready" + line "for prime time!" + done + +VioletCityGrampsText: + text "FALKNER, from the" + line "VIOLET #MON" + + para "GYM, is a fine" + line "trainer!" + + para "He inherited his" + line "father's gym and" + + para "has done a great" + line "job with it." + done + +VioletCityYoungsterText: + text "I saw a wiggly" + line "tree up ahead!" + + para "If you touch it," + line "it squirms and" + cont "dances! Cool!" + done + +VioletCitySignText: + text "VIOLET CITY" + + para "The City of" + line "Nostalgic Scents" + done + +VioletGymSignText: + text "VIOLET CITY" + line "#MON GYM" + cont "LEADER: FALKNER" + + para "The Elegant Master" + line "of Flying #MON" + done + +SproutTowerSignText: + text "SPROUT TOWER" + + para "Experience the" + line "Way of #MON" + done + +EarlsPokemonAcademySignText: + text "EARL'S #MON" + line "ACADEMY" + done + +VioletCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 17, VIOLET_MART, 2 + warp_event 18, 17, VIOLET_GYM, 1 + warp_event 30, 17, EARLS_POKEMON_ACADEMY, 1 + warp_event 3, 15, VIOLET_NICKNAME_SPEECH_HOUSE, 1 + warp_event 31, 25, VIOLET_POKECENTER_1F, 1 + warp_event 21, 29, VIOLET_KYLES_HOUSE, 1 + warp_event 23, 5, SPROUT_TOWER_1F, 1 + warp_event 39, 24, ROUTE_31_VIOLET_GATE, 1 + warp_event 39, 25, ROUTE_31_VIOLET_GATE, 2 + + def_coord_events + + def_bg_events + bg_event 24, 20, BGEVENT_READ, VioletCitySign + bg_event 15, 17, BGEVENT_READ, VioletGymSign + bg_event 24, 8, BGEVENT_READ, SproutTowerSign + bg_event 27, 17, BGEVENT_READ, EarlsPokemonAcademySign + bg_event 32, 25, BGEVENT_READ, VioletCityPokecenterSign + bg_event 10, 17, BGEVENT_READ, VioletCityMartSign + bg_event 37, 14, BGEVENT_ITEM, VioletCityHiddenHyperPotion + + def_object_events + object_event 13, 16, SPRITE_FISHER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VioletCityEarlScript, EVENT_VIOLET_CITY_EARL + object_event 28, 28, SPRITE_LASS, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VioletCityLassScript, -1 + object_event 24, 14, SPRITE_SUPER_NERD, SPRITEMOVEDATA_WANDER, 1, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VioletCitySuperNerdScript, -1 + object_event 17, 20, SPRITE_GRAMPS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletCityGrampsScript, -1 + object_event 5, 18, SPRITE_YOUNGSTER, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VioletCityYoungsterScript, -1 + object_event 14, 29, SPRITE_FRUIT_TREE, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletCityFruitTree, -1 + object_event 4, 1, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VioletCityPPUp, EVENT_VIOLET_CITY_PP_UP + object_event 35, 5, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, VioletCityRareCandy, EVENT_VIOLET_CITY_RARE_CANDY diff --git a/maps/VioletCity.blk b/maps/VioletCity.blk new file mode 100644 index 0000000..20561bc --- /dev/null +++ b/maps/VioletCity.blk @@ -0,0 +1 @@ +TvvU,-X55Y"#TUXY()XYXYtuXYXYEXYXYTvyY,-XYX55Y./]X,*-`GG&'/a`aacaeeE=]bpkeeZVaarm]E,-]./bEea \ No newline at end of file diff --git a/maps/VioletGym.asm b/maps/VioletGym.asm new file mode 100644 index 0000000..5320a0f --- /dev/null +++ b/maps/VioletGym.asm @@ -0,0 +1,299 @@ + object_const_def + const VIOLETGYM_FALKNER + const VIOLETGYM_YOUNGSTER1 + const VIOLETGYM_YOUNGSTER2 + const VIOLETGYM_GYM_GUIDE + +VioletGym_MapScripts: + def_scene_scripts + + def_callbacks + +VioletGymFalknerScript: + faceplayer + opentext + checkevent EVENT_BEAT_FALKNER + iftrue .FightDone + writetext FalknerIntroText + waitbutton + closetext + winlosstext FalknerWinLossText, 0 + loadtrainer FALKNER, FALKNER1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_FALKNER + opentext + writetext ReceivedZephyrBadgeText + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_ZEPHYRBADGE + readvar VAR_BADGES + scall VioletGymActivateRockets +.FightDone: + checkevent EVENT_GOT_TM31_MUD_SLAP + iftrue .SpeechAfterTM + setevent EVENT_BEAT_BIRD_KEEPER_ROD + setevent EVENT_BEAT_BIRD_KEEPER_ABE + setmapscene ELMS_LAB, SCENE_ELMSLAB_NOOP + specialphonecall SPECIALCALL_ASSISTANT + writetext FalknerZephyrBadgeText + promptbutton + verbosegiveitem TM_MUD_SLAP + iffalse .NoRoomForMudSlap + setevent EVENT_GOT_TM31_MUD_SLAP + writetext FalknerTMMudSlapText + waitbutton + closetext + end + +.SpeechAfterTM: + writetext FalknerFightDoneText + waitbutton +.NoRoomForMudSlap: + closetext + end + +VioletGymActivateRockets: + ifequal 7, .RadioTowerRockets + ifequal 6, .GoldenrodRockets + end + +.GoldenrodRockets: + jumpstd GoldenrodRocketsScript + +.RadioTowerRockets: + jumpstd RadioTowerRocketsScript + +TrainerBirdKeeperRod: + trainer BIRD_KEEPER, ROD, EVENT_BEAT_BIRD_KEEPER_ROD, BirdKeeperRodSeenText, BirdKeeperRodBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BirdKeeperRodAfterBattleText + waitbutton + closetext + end + +TrainerBirdKeeperAbe: + trainer BIRD_KEEPER, ABE, EVENT_BEAT_BIRD_KEEPER_ABE, BirdKeeperAbeSeenText, BirdKeeperAbeBeatenText, 0, .Script + +.Script: + endifjustbattled + opentext + writetext BirdKeeperAbeAfterBattleText + waitbutton + closetext + end + +VioletGymGuideScript: + faceplayer + opentext + checkevent EVENT_BEAT_FALKNER + iftrue .VioletGymGuideWinScript + writetext VioletGymGuideText + waitbutton + closetext + end + +.VioletGymGuideWinScript: + writetext VioletGymGuideWinText + waitbutton + closetext + end + +VioletGymStatue: + checkflag ENGINE_ZEPHYRBADGE + iftrue .Beaten + jumpstd GymStatue1Script +.Beaten: + gettrainername STRING_BUFFER_4, FALKNER, FALKNER1 + jumpstd GymStatue2Script + +FalknerIntroText: + text "I'm FALKNER, the" + line "VIOLET #MON GYM" + cont "leader!" + + para "People say you can" + line "clip flying-type" + + para "#MON's wings" + line "with a jolt of" + cont "electricity…" + + para "I won't allow such" + line "insults to bird" + cont "#MON!" + + para "I'll show you the" + line "real power of the" + + para "magnificent bird" + line "#MON!" + done + +FalknerWinLossText: + text "…Darn! My dad's" + line "cherished bird" + cont "#MON…" + + para "All right." + line "Take this." + + para "It's the official" + line "#MON LEAGUE" + cont "ZEPHYRBADGE." + done + +ReceivedZephyrBadgeText: + text " received" + line "ZEPHYRBADGE." + done + +FalknerZephyrBadgeText: + text "ZEPHYRBADGE" + line "raises the attack" + cont "power of #MON." + + para "It also enables" + line "#MON to use" + + para "FLASH, if they" + line "have it, anytime." + + para "Here--take this" + line "too." + done + +FalknerTMMudSlapText: + text "By using a TM, a" + line "#MON will" + + para "instantly learn a" + line "new move." + + para "Think before you" + line "act--a TM can be" + cont "used only once." + + para "TM31 contains" + line "MUD-SLAP." + + para "It reduces the" + line "enemy's accuracy" + + para "while it causes" + line "damage." + + para "In other words, it" + line "is both defensive" + cont "and offensive." + done + +FalknerFightDoneText: + text "There are #MON" + line "GYMS in cities and" + cont "towns ahead." + + para "You should test" + line "your skills at" + cont "these GYMS." + + para "I'm going to train" + line "harder to become" + + para "the greatest bird" + line "master!" + done + +BirdKeeperRodSeenText: + text "The keyword is" + line "guts!" + + para "Those here are" + line "training night and" + + para "day to become bird" + line "#MON masters." + + para "Come on!" + done + +BirdKeeperRodBeatenText: + text "Gaaah!" + done + +BirdKeeperRodAfterBattleText: + text "FALKNER's skills" + line "are for real!" + + para "Don't get cocky" + line "just because you" + cont "beat me!" + done + +BirdKeeperAbeSeenText: + text "Let me see if you" + line "are good enough to" + cont "face FALKNER!" + done + +BirdKeeperAbeBeatenText: + text "This can't be" + line "true!" + done + +BirdKeeperAbeAfterBattleText: + text "This is pathetic," + line "losing to some" + cont "rookie trainer…" + done + +VioletGymGuideText: + text "Hey! I'm no train-" + line "er but I can give" + cont "some advice!" + + para "Believe me!" + line "If you believe, a" + + para "championship dream" + line "can come true." + + para "You believe?" + line "Then listen." + + para "The grass-type is" + line "weak against the" + + para "flying-type. Keep" + line "this in mind." + done + +VioletGymGuideWinText: + text "Nice battle! Keep" + line "it up, and you'll" + + para "be the CHAMP in no" + line "time at all!" + done + +VioletGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 15, VIOLET_CITY, 2 + warp_event 5, 15, VIOLET_CITY, 2 + + def_coord_events + + def_bg_events + bg_event 3, 13, BGEVENT_READ, VioletGymStatue + bg_event 6, 13, BGEVENT_READ, VioletGymStatue + + def_object_events + object_event 5, 1, SPRITE_FALKNER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, VioletGymFalknerScript, -1 + object_event 7, 6, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_LEFT, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBirdKeeperRod, -1 + object_event 2, 10, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_RIGHT, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerBirdKeeperAbe, -1 + object_event 7, 13, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VioletGymGuideScript, -1 diff --git a/maps/VioletGym.blk b/maps/VioletGym.blk new file mode 100644 index 0000000..f5f2849 --- /dev/null +++ b/maps/VioletGym.blk @@ -0,0 +1 @@ +-3-3-----3-33--3 \ No newline at end of file diff --git a/maps/VioletKylesHouse.asm b/maps/VioletKylesHouse.asm new file mode 100644 index 0000000..25e4115 --- /dev/null +++ b/maps/VioletKylesHouse.asm @@ -0,0 +1,46 @@ + object_const_def + const VIOLETKYLESHOUSE_POKEFAN_M + const VIOLETKYLESHOUSE_KYLE + +VioletKylesHouse_MapScripts: + def_scene_scripts + + def_callbacks + +VioletKylesHousePokefanMScript: + jumptextfaceplayer VioletKylesHousePokefanMText + +Kyle: + faceplayer + opentext + trade NPC_TRADE_KYLE + waitbutton + closetext + end + +VioletKylesHousePokefanMText: + text "A #MON you get" + line "in a trade grows" + cont "quickly." + + para "But if you don't" + line "have the right GYM" + + para "BADGE, they may" + line "disobey you." + done + +VioletKylesHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, VIOLET_CITY, 6 + warp_event 4, 7, VIOLET_CITY, 6 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_POKEFAN_M, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletKylesHousePokefanMScript, -1 + object_event 6, 5, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WALK_UP_DOWN, 0, 2, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, Kyle, -1 diff --git a/maps/VioletMart.asm b/maps/VioletMart.asm new file mode 100644 index 0000000..575d19b --- /dev/null +++ b/maps/VioletMart.asm @@ -0,0 +1,63 @@ + object_const_def + const VIOLETMART_CLERK + const VIOLETMART_GRANNY + const VIOLETMART_COOLTRAINER_M + +VioletMart_MapScripts: + def_scene_scripts + + def_callbacks + +VioletMartClerkScript: + opentext + pokemart MARTTYPE_STANDARD, MART_VIOLET + closetext + end + +VioletMartGrannyScript: + jumptextfaceplayer VioletMartGrannyText + +VioletMartCooltrainerMScript: + jumptextfaceplayer VioletMartCooltrainerMText + +VioletMartGrannyText: + text "When you first" + line "catch a #MON," + cont "it may be weak." + + para "But it will even-" + line "tually grow to be" + cont "strong." + + para "It's important to" + line "treat #MON with" + cont "love." + done + +VioletMartCooltrainerMText: + text "#MON can hold" + line "items like POTION" + cont "and ANTIDOTE." + + para "But they don't" + line "appear to know how" + + para "to use manmade" + line "items." + done + +VioletMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, VIOLET_CITY, 1 + warp_event 3, 7, VIOLET_CITY, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletMartClerkScript, -1 + object_event 7, 6, SPRITE_GRANNY, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletMartGrannyScript, -1 + object_event 5, 2, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VioletMartCooltrainerMScript, -1 diff --git a/maps/VioletNicknameSpeechHouse.asm b/maps/VioletNicknameSpeechHouse.asm new file mode 100644 index 0000000..1495855 --- /dev/null +++ b/maps/VioletNicknameSpeechHouse.asm @@ -0,0 +1,59 @@ + object_const_def + const VIOLETNICKNAMESPEECHHOUSE_TEACHER + const VIOLETNICKNAMESPEECHHOUSE_LASS + const VIOLETNICKNAMESPEECHHOUSE_BIRD + +VioletNicknameSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +VioletNicknameSpeechHouseTeacherScript: + jumptextfaceplayer VioletNicknameSpeechHouseTeacherText + +VioletNicknameSpeechHouseLassScript: + jumptextfaceplayer VioletNicknameSpeechHouseLassText + +VioletNicknameSpeechHouseBirdScript: + faceplayer + opentext + writetext VioletNicknameSpeechHouseBirdText + cry PIDGEY + waitbutton + closetext + end + +VioletNicknameSpeechHouseTeacherText: + text "She uses the names" + line "of her favorite" + cont "things to eat." + + para "For the nicknames" + line "she gives to her" + cont "#MON, I mean." + done + +VioletNicknameSpeechHouseLassText: + text "I call my PIDGEY" + line "STRAWBERRY!" + done + +VioletNicknameSpeechHouseBirdText: + text "STRAWBERRY: Pijji!" + done + +VioletNicknameSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, VIOLET_CITY, 4 + warp_event 4, 7, VIOLET_CITY, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 3, SPRITE_TEACHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletNicknameSpeechHouseTeacherScript, -1 + object_event 6, 4, SPRITE_LASS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VioletNicknameSpeechHouseLassScript, -1 + object_event 5, 2, SPRITE_BIRD, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, VioletNicknameSpeechHouseBirdScript, -1 diff --git a/maps/VioletPokecenter1F.asm b/maps/VioletPokecenter1F.asm new file mode 100644 index 0000000..679b645 --- /dev/null +++ b/maps/VioletPokecenter1F.asm @@ -0,0 +1,233 @@ + object_const_def + const VIOLETPOKECENTER1F_NURSE + const VIOLETPOKECENTER1F_GAMEBOY_KID + const VIOLETPOKECENTER1F_GENTLEMAN + const VIOLETPOKECENTER1F_YOUNGSTER + const VIOLETPOKECENTER1F_ELMS_AIDE + +VioletPokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +VioletPokecenterNurse: + jumpstd PokecenterNurseScript + +VioletPokecenter1F_ElmsAideScript: + faceplayer + opentext + checkevent EVENT_REFUSED_TO_TAKE_EGG_FROM_ELMS_AIDE + iftrue .SecondTimeAsking + writetext VioletPokecenterElmsAideFavorText +.AskTakeEgg: + yesorno + iffalse .RefusedEgg + readvar VAR_PARTYCOUNT + ifequal PARTY_LENGTH, .PartyFull + giveegg TOGEPI, EGG_LEVEL + getstring STRING_BUFFER_4, .eggname + scall .AideGivesEgg + setevent EVENT_GOT_TOGEPI_EGG_FROM_ELMS_AIDE + clearevent EVENT_ELMS_AIDE_IN_LAB + clearevent EVENT_TOGEPI_HATCHED + setmapscene ROUTE_32, SCENE_ROUTE32_OFFER_SLOWPOKETAIL + writetext VioletPokecenterElmsAideGiveEggText + waitbutton + closetext + readvar VAR_FACING + ifequal UP, .AideWalksAroundPlayer + turnobject PLAYER, DOWN + applymovement VIOLETPOKECENTER1F_ELMS_AIDE, MovementData_AideWalksStraightOutOfPokecenter + playsound SFX_EXIT_BUILDING + disappear VIOLETPOKECENTER1F_ELMS_AIDE + waitsfx + end + +.AideWalksAroundPlayer: + applymovement VIOLETPOKECENTER1F_ELMS_AIDE, MovementData_AideWalksLeftToExitPokecenter + turnobject PLAYER, DOWN + applymovement VIOLETPOKECENTER1F_ELMS_AIDE, MovementData_AideFinishesLeavingPokecenter + playsound SFX_EXIT_BUILDING + disappear VIOLETPOKECENTER1F_ELMS_AIDE + waitsfx + end + +.eggname + db "EGG@" + +.AideGivesEgg: + jumpstd ReceiveTogepiEggScript + end + +.PartyFull: + writetext VioletCityElmsAideFullPartyText + waitbutton + closetext + end + +.RefusedEgg: + writetext VioletPokecenterElmsAideRefuseText + waitbutton + closetext + setevent EVENT_REFUSED_TO_TAKE_EGG_FROM_ELMS_AIDE + end + +.SecondTimeAsking: + writetext VioletPokecenterElmsAideAskEggText + sjump .AskTakeEgg + +VioletPokecenter1FGameboyKidScript: + jumptextfaceplayer VioletPokecenter1FGameboyKidText + +VioletPokecenter1FGentlemanScript: + jumptextfaceplayer VioletPokecenter1FGentlemanText + +VioletPokecenter1FYoungsterScript: + jumptextfaceplayer VioletPokecenter1FYoungsterText + +MovementData_AideWalksStraightOutOfPokecenter: + step DOWN + step DOWN + step DOWN + step DOWN + step_end + +MovementData_AideWalksLeftToExitPokecenter: + step LEFT + step DOWN + step_end + +MovementData_AideFinishesLeavingPokecenter: + step DOWN + step DOWN + step DOWN + step_end + +VioletPokecenterElmsAideFavorText: + text ", long" + line "time, no see." + + para "PROF.ELM asked me" + line "to find you." + + para "He has another" + line "favor to ask." + + para "Would you take the" + line "#MON EGG?" + done + +VioletPokecenterElmsAideGiveEggText: + text "We discovered that" + line "a #MON will not" + + para "hatch until it" + line "grows in the EGG." + + para "It also has to be" + line "with other active" + cont "#MON to hatch." + + para ", you're" + line "the only person" + cont "we can rely on." + + para "Please call PROF." + line "ELM when that EGG" + cont "hatches!" + done + +VioletCityElmsAideFullPartyText: + text "Oh, no. You can't" + line "carry any more" + cont "#MON with you." + + para "I'll wait here" + line "while you make" + cont "room for the EGG." + done + +VioletPokecenterElmsAideRefuseText: + text "B-but… PROF.ELM" + line "asked for you…" + done + +VioletPokecenterElmsAideAskEggText: + text ", will you" + line "take the EGG?" + done + +VioletPokecenterFarawayLinkText: ; unreferenced + text "I've been thinking" + line "it'd be great to" + + para "be able to link up" + line "and battle with my" + + para "friends who live" + line "far away." + done + +VioletPokecenterMobileAdapterText: ; unreferenced + text "I just battled a" + line "friend in CIANWOOD" + cont "over a link." + + para "If you connect a" + line "MOBILE ADAPTER," + + para "you can link with" + line "a friend far away." + done + +VioletPokecenter1FGameboyKidText: + text "A guy named BILL" + line "made the #MON" + cont "PC storage system." + done + +VioletPokecenter1FGentlemanText: + text "It was around" + line "three years ago." + + para "TEAM ROCKET was up" + line "to no good with" + cont "#MON." + + para "But justice pre-" + line "vailed--a young" + cont "kid broke 'em up." + done + +VioletPokecenter1FYoungsterText: + text "#MON are smart." + line "They won't obey a" + + para "trainer they don't" + line "respect." + + para "Without the right" + line "GYM BADGES, they" + + para "will just do as" + line "they please." + done + +VioletPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, VIOLET_CITY, 5 + warp_event 4, 7, VIOLET_CITY, 5 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletPokecenterNurse, -1 + object_event 7, 6, SPRITE_GAMEBOY_KID, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, VioletPokecenter1FGameboyKidScript, -1 + object_event 1, 4, SPRITE_GENTLEMAN, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, VioletPokecenter1FGentlemanScript, -1 + object_event 8, 1, SPRITE_YOUNGSTER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, VioletPokecenter1FYoungsterScript, -1 + object_event 4, 3, SPRITE_SCIENTIST, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, VioletPokecenter1F_ElmsAideScript, EVENT_ELMS_AIDE_IN_VIOLET_POKEMON_CENTER diff --git a/maps/ViridianCity.asm b/maps/ViridianCity.asm new file mode 100644 index 0000000..98dcef4 --- /dev/null +++ b/maps/ViridianCity.asm @@ -0,0 +1,240 @@ + object_const_def + const VIRIDIANCITY_GRAMPS1 + const VIRIDIANCITY_GRAMPS2 + const VIRIDIANCITY_FISHER + const VIRIDIANCITY_YOUNGSTER + +ViridianCity_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_NEWMAP, ViridianCityFlypointCallback + +ViridianCityFlypointCallback: + setflag ENGINE_FLYPOINT_VIRIDIAN + endcallback + +ViridianCityCoffeeGramps: + faceplayer + opentext + writetext ViridianCityCoffeeGrampsQuestionText + yesorno + iffalse .no + writetext ViridianCityCoffeeGrampsBelievedText + waitbutton + closetext + end + +.no: + writetext ViridianCityCoffeeGrampsDoubtedText + waitbutton + closetext + end + +ViridianCityGrampsNearGym: + faceplayer + opentext + checkevent EVENT_BLUE_IN_CINNABAR + iftrue .BlueReturned + writetext ViridianCityGrampsNearGymText + waitbutton + closetext + end + +.BlueReturned: + writetext ViridianCityGrampsNearGymBlueReturnedText + waitbutton + closetext + end + +ViridianCityDreamEaterFisher: + faceplayer + opentext + checkevent EVENT_GOT_TM42_DREAM_EATER + iftrue .GotDreamEater + writetext ViridianCityDreamEaterFisherText + promptbutton + verbosegiveitem TM_DREAM_EATER + iffalse .NoRoomForDreamEater + setevent EVENT_GOT_TM42_DREAM_EATER +.GotDreamEater: + writetext ViridianCityDreamEaterFisherGotDreamEaterText + waitbutton +.NoRoomForDreamEater: + closetext + end + +ViridianCityYoungsterScript: + jumptextfaceplayer ViridianCityYoungsterText + +ViridianCitySign: + jumptext ViridianCitySignText + +ViridianGymSign: + jumptext ViridianGymSignText + +ViridianCityWelcomeSign: + jumptext ViridianCityWelcomeSignText + +TrainerHouseSign: + jumptext TrainerHouseSignText + +ViridianCityPokecenterSign: + jumpstd PokecenterSignScript + +ViridianCityMartSign: + jumpstd MartSignScript + +ViridianCityCoffeeGrampsQuestionText: + text "Hey, kid! I just" + line "had a double shot" + + para "of espresso, and" + line "I am wired!" + + para "I need to talk to" + line "someone, so you'll" + cont "have to do!" + + para "I might not look" + line "like much now, but" + + para "I was an expert at" + line "catching #MON." + + para "Do you believe me?" + done + +ViridianCityCoffeeGrampsBelievedText: + text "Good, good. Yes, I" + line "was something out" + + para "of the ordinary," + line "let me tell you!" + done + +ViridianCityCoffeeGrampsDoubtedText: + text "What? You little" + line "whelp!" + + para "If I were just a" + line "bit younger, I'd" + + para "show you a thing" + line "or two. Humph!" + done + +ViridianCityGrampsNearGymText: + text "This GYM didn't" + line "have a LEADER" + cont "until recently." + + para "A young man from" + line "PALLET became the" + + para "LEADER, but he's" + line "often away." + done + +ViridianCityGrampsNearGymBlueReturnedText: + text "Are you going to" + line "battle the LEADER?" + + para "Good luck to you." + line "You'll need it." + done + +ViridianCityDreamEaterFisherText: + text "Yawn!" + + para "I must have dozed" + line "off in the sun." + + para "…I had this dream" + line "about a DROWZEE" + + para "eating my dream." + line "Weird, huh?" + + para "Huh?" + line "What's this?" + + para "Where did this TM" + line "come from?" + + para "This is spooky!" + line "Here, you can have" + cont "this TM." + done + +ViridianCityDreamEaterFisherGotDreamEaterText: + text "TM42 contains" + line "DREAM EATER…" + + para "…Zzzzz…" + done + +ViridianCityYoungsterText: + text "I heard that there" + line "are many items on" + + para "the ground in" + line "VIRIDIAN FOREST." + done + +ViridianCitySignText: + text "VIRIDIAN CITY" + + para "The Eternally" + line "Green Paradise" + done + +ViridianGymSignText: + text "VIRIDIAN CITY" + line "#MON GYM" + cont "LEADER: …" + + para "The rest of the" + line "text is illegible…" + done + +ViridianCityWelcomeSignText: + text "WELCOME TO" + line "VIRIDIAN CITY," + + para "THE GATEWAY TO" + line "INDIGO PLATEAU" + done + +TrainerHouseSignText: + text "TRAINER HOUSE" + + para "The Club for Top" + line "Trainer Battles" + done + +ViridianCity_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 32, 7, VIRIDIAN_GYM, 1 + warp_event 21, 9, VIRIDIAN_NICKNAME_SPEECH_HOUSE, 1 + warp_event 23, 15, TRAINER_HOUSE_1F, 1 + warp_event 29, 19, VIRIDIAN_MART, 2 + warp_event 23, 25, VIRIDIAN_POKECENTER_1F, 1 + + def_coord_events + + def_bg_events + bg_event 17, 17, BGEVENT_READ, ViridianCitySign + bg_event 27, 7, BGEVENT_READ, ViridianGymSign + bg_event 19, 1, BGEVENT_READ, ViridianCityWelcomeSign + bg_event 21, 15, BGEVENT_READ, TrainerHouseSign + bg_event 24, 25, BGEVENT_READ, ViridianCityPokecenterSign + bg_event 30, 19, BGEVENT_READ, ViridianCityMartSign + + def_object_events + object_event 18, 5, SPRITE_GRAMPS, SPRITEMOVEDATA_WANDER, 2, 2, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ViridianCityCoffeeGramps, -1 + object_event 30, 8, SPRITE_GRAMPS, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ViridianCityGrampsNearGym, -1 + object_event 6, 23, SPRITE_FISHER, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ViridianCityDreamEaterFisher, -1 + object_event 17, 21, SPRITE_YOUNGSTER, SPRITEMOVEDATA_WANDER, 3, 3, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ViridianCityYoungsterScript, -1 diff --git a/maps/ViridianCity.blk b/maps/ViridianCity.blk new file mode 100644 index 0000000..7b3d51b --- /dev/null +++ b/maps/ViridianCity.blk @@ -0,0 +1,59 @@ +,,),,)111111,,) +RRR4011 1,,)M111,,)M,,)M1WW%M T!www + + +M|}~1 +llll ! +?;t + +|s +,)R + + + +,) +4tt +t !t + +,) + + +|r + +t,)eCd//,)t + + + + + + +ttttW%wwwwwwwwwwwwwww + + + + + + + + + +M + +MN + +N + + + + + + + + + + +M + +MN + +N diff --git a/maps/ViridianGym.asm b/maps/ViridianGym.asm new file mode 100644 index 0000000..4df71b6 --- /dev/null +++ b/maps/ViridianGym.asm @@ -0,0 +1,185 @@ + object_const_def + const VIRIDIANGYM_BLUE + const VIRIDIANGYM_GYM_GUIDE + +ViridianGym_MapScripts: + def_scene_scripts + + def_callbacks + +ViridianGymBlueScript: + faceplayer + opentext + checkflag ENGINE_EARTHBADGE + iftrue .FightDone + writetext LeaderBlueBeforeText + waitbutton + closetext + winlosstext LeaderBlueWinText, 0 + loadtrainer BLUE, BLUE1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_BLUE + opentext + writetext Text_ReceivedEarthBadge + playsound SFX_GET_BADGE + waitsfx + setflag ENGINE_EARTHBADGE + writetext LeaderBlueAfterText + waitbutton + closetext + end + +.FightDone: + writetext LeaderBlueEpilogueText + waitbutton + closetext + end + +ViridianGymGuideScript: + faceplayer + opentext + checkevent EVENT_BEAT_BLUE + iftrue .ViridianGymGuideWinScript + writetext ViridianGymGuideText + waitbutton + closetext + end + +.ViridianGymGuideWinScript: + writetext ViridianGymGuideWinText + waitbutton + closetext + end + +ViridianGymStatue: + checkflag ENGINE_EARTHBADGE + iftrue .Beaten + jumpstd GymStatue1Script + +.Beaten: + gettrainername STRING_BUFFER_4, BLUE, BLUE1 + jumpstd GymStatue2Script + +LeaderBlueBeforeText: + text "BLUE: Yo! Finally" + line "got here, huh?" + + para "I wasn't in the" + line "mood at CINNABAR," + + para "but now I'm ready" + line "to battle you." + + para "…" + + para "You're telling me" + line "you conquered all" + cont "the GYMS in JOHTO?" + + para "Heh! JOHTO's GYMS" + line "must be pretty" + cont "pathetic then." + + para "Hey, don't worry" + line "about it." + + para "I'll know if you" + line "are good or not by" + + para "battling you right" + line "now." + + para "Ready, JOHTO" + line "CHAMP?" + done + +LeaderBlueWinText: + text "BLUE: What?" + + para "How the heck did I" + line "lose to you?" + + para "…" + + para "Tch, all right…" + line "Here, take this--" + cont "it's EARTHBADGE." + done + +Text_ReceivedEarthBadge: + text " received" + line "EARTHBADGE." + done + +LeaderBlueAfterText: + text "BLUE: …" + + para "All right, I was" + line "wrong. You're the" + + para "real deal. You are" + line "a good trainer." + + para "But I'm going to" + line "beat you someday." + + para "Don't you forget" + line "it!" + done + +LeaderBlueEpilogueText: + text "BLUE: Listen, you." + + para "You'd better not" + line "lose until I beat" + cont "you. Got it?" + done + +ViridianGymGuideText: + text "Yo, CHAMP in" + line "making!" + + para "How's it going?" + line "Looks like you're" + cont "on a roll." + + para "The GYM LEADER is" + line "a guy who battled" + + para "the CHAMPION three" + line "years ago." + + para "He's no pushover." + + para "Give it everything" + line "you've got!" + done + +ViridianGymGuideWinText: + text "Man, you are truly" + line "tough…" + + para "That was a heck of" + line "an inspirational" + + para "battle. It brought" + line "tears to my eyes." + done + +ViridianGym_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 4, 17, VIRIDIAN_CITY, 1 + warp_event 5, 17, VIRIDIAN_CITY, 1 + + def_coord_events + + def_bg_events + bg_event 3, 13, BGEVENT_READ, ViridianGymStatue + bg_event 6, 13, BGEVENT_READ, ViridianGymStatue + + def_object_events + object_event 5, 3, SPRITE_BLUE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ViridianGymBlueScript, EVENT_VIRIDIAN_GYM_BLUE + object_event 7, 13, SPRITE_GYM_GUIDE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ViridianGymGuideScript, EVENT_VIRIDIAN_GYM_BLUE diff --git a/maps/ViridianGym.blk b/maps/ViridianGym.blk new file mode 100644 index 0000000..8f10c71 --- /dev/null +++ b/maps/ViridianGym.blk @@ -0,0 +1 @@ +=<<<=77>==?77:?>:77=21=689> ?; \ No newline at end of file diff --git a/maps/ViridianMart.asm b/maps/ViridianMart.asm new file mode 100644 index 0000000..8e801da --- /dev/null +++ b/maps/ViridianMart.asm @@ -0,0 +1,51 @@ + object_const_def + const VIRIDIANMART_CLERK + const VIRIDIANMART_LASS + const VIRIDIANMART_COOLTRAINER_M + +ViridianMart_MapScripts: + def_scene_scripts + + def_callbacks + +ViridianMartClerkScript: + opentext + pokemart MARTTYPE_STANDARD, MART_VIRIDIAN + closetext + end + +ViridianMartLassScript: + jumptextfaceplayer ViridianMartLassText + +ViridianMartCooltrainerMScript: + jumptextfaceplayer ViridianMartCooltrainerMText + +ViridianMartLassText: + text "The GYM LEADER" + line "here is totally" + cont "cool." + done + +ViridianMartCooltrainerMText: + text "Have you been to" + line "CINNABAR?" + + para "It's an island way" + line "south of here." + done + +ViridianMart_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, VIRIDIAN_CITY, 4 + warp_event 3, 7, VIRIDIAN_CITY, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 1, 3, SPRITE_CLERK, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ViridianMartClerkScript, -1 + object_event 7, 2, SPRITE_LASS, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 2, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ViridianMartLassScript, -1 + object_event 1, 6, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ViridianMartCooltrainerMScript, -1 diff --git a/maps/ViridianNicknameSpeechHouse.asm b/maps/ViridianNicknameSpeechHouse.asm new file mode 100644 index 0000000..943a78c --- /dev/null +++ b/maps/ViridianNicknameSpeechHouse.asm @@ -0,0 +1,77 @@ + object_const_def + const VIRIDIANNICKNAMESPEECHHOUSE_POKEFAN_M + const VIRIDIANNICKNAMESPEECHHOUSE_LASS + const VIRIDIANNICKNAMESPEECHHOUSE_SPEARY + const VIRIDIANNICKNAMESPEECHHOUSE_RATTEY + +ViridianNicknameSpeechHouse_MapScripts: + def_scene_scripts + + def_callbacks + +ViridianNicknameSpeechHousePokefanMScript: + jumptextfaceplayer ViridianNicknameSpeechHousePokefanMText + +ViridianNicknameSpeechHouseLassScript: + jumptextfaceplayer ViridianNicknameSpeechHouseLassText + +Speary: + opentext + writetext SpearyText + cry SPEAROW + waitbutton + closetext + end + +Rattey: + opentext + writetext RatteyText + cry RATTATA + waitbutton + closetext + end + +ViridianNicknameSpeechHousePokefanMText: + text "Do you put a lot" + line "of thought into" + + para "naming your" + line "#MON?" + + para "Giving them good" + line "nicknames adds to" + + para "the fun of trading" + line "with others." + done + +ViridianNicknameSpeechHouseLassText: + text "They're SPEARY--" + line "a SPEAROW--and" + cont "RATTEY--a RATTATA." + done + +SpearyText: + text "SPEARY: Ch-chun!" + done + +RatteyText: + text "RATTEY: Kikiii!" + done + +ViridianNicknameSpeechHouse_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 2, 7, VIRIDIAN_CITY, 2 + warp_event 3, 7, VIRIDIAN_CITY, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 2, 4, SPRITE_POKEFAN_M, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ViridianNicknameSpeechHousePokefanMScript, -1 + object_event 5, 4, SPRITE_LASS, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ViridianNicknameSpeechHouseLassScript, -1 + object_event 5, 2, SPRITE_MOLTRES, SPRITEMOVEDATA_POKEMON, 2, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, Speary, -1 + object_event 6, 3, SPRITE_GROWLITHE, SPRITEMOVEDATA_POKEMON, 2, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Rattey, -1 diff --git a/maps/ViridianPokecenter1F.asm b/maps/ViridianPokecenter1F.asm new file mode 100644 index 0000000..fcd32fc --- /dev/null +++ b/maps/ViridianPokecenter1F.asm @@ -0,0 +1,88 @@ + object_const_def + const VIRIDIANPOKECENTER1F_NURSE + const VIRIDIANPOKECENTER1F_COOLTRAINER_M + const VIRIDIANPOKECENTER1F_COOLTRAINER_F + const VIRIDIANPOKECENTER1F_BUG_CATCHER + +ViridianPokecenter1F_MapScripts: + def_scene_scripts + + def_callbacks + +ViridianPokecenter1FNurseScript: + jumpstd PokecenterNurseScript + +ViridianPokecenter1FCooltrainerMScript: + faceplayer + opentext + checkevent EVENT_BLUE_IN_CINNABAR + iftrue .BlueReturned + writetext ViridianPokecenter1FCooltrainerMText + waitbutton + closetext + end + +.BlueReturned: + writetext ViridianPokecenter1FCooltrainerMText_BlueReturned + waitbutton + closetext + end + +ViridianPokecenter1FCooltrainerFScript: + jumptextfaceplayer ViridianPokecenter1FCooltrainerFText + +ViridianPokecenter1FBugCatcherScript: + jumptextfaceplayer ViridianPokecenter1FBugCatcherText + +ViridianPokecenter1FCooltrainerMText: + text "Where in the world" + line "is VIRIDIAN's GYM" + + para "LEADER? I wanted" + line "to challenge him." + done + +ViridianPokecenter1FCooltrainerMText_BlueReturned: + text "There are no GYM" + line "TRAINERS at the" + cont "VIRIDIAN GYM." + + para "The LEADER claims" + line "his policy is to" + + para "win without having" + line "any underlings." + done + +ViridianPokecenter1FCooltrainerFText: + text "I heard that the" + line "GYM in CINNABAR is" + cont "gone." + + para "I wonder what be-" + line "came of BLAINE," + cont "the GYM LEADER." + done + +ViridianPokecenter1FBugCatcherText: + text "My dream is to be-" + line "come a GYM LEADER." + done + +ViridianPokecenter1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 7, VIRIDIAN_CITY, 5 + warp_event 4, 7, VIRIDIAN_CITY, 5 + warp_event 0, 7, POKECENTER_2F, 1 + + def_coord_events + + def_bg_events + + def_object_events + object_event 3, 1, SPRITE_NURSE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ViridianPokecenter1FNurseScript, -1 + object_event 8, 4, SPRITE_COOLTRAINER_M, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, ViridianPokecenter1FCooltrainerMScript, -1 + object_event 5, 3, SPRITE_COOLTRAINER_F, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, ViridianPokecenter1FCooltrainerFScript, -1 + object_event 1, 6, SPRITE_BUG_CATCHER, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, ViridianPokecenter1FBugCatcherScript, -1 diff --git a/maps/ViridianPokecenter2FBeta.asm b/maps/ViridianPokecenter2FBeta.asm new file mode 100644 index 0000000..95886fb --- /dev/null +++ b/maps/ViridianPokecenter2FBeta.asm @@ -0,0 +1,16 @@ +ViridianPokecenter2FBeta_MapScripts: + def_scene_scripts + + def_callbacks + +ViridianPokecenter2FBeta_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 0, 7, VIRIDIAN_POKECENTER_1F, 3 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/WhirlIslandB1F.asm b/maps/WhirlIslandB1F.asm new file mode 100644 index 0000000..d077c64 --- /dev/null +++ b/maps/WhirlIslandB1F.asm @@ -0,0 +1,68 @@ + object_const_def + const WHIRLISLANDB1F_POKE_BALL1 + const WHIRLISLANDB1F_POKE_BALL2 + const WHIRLISLANDB1F_POKE_BALL3 + const WHIRLISLANDB1F_POKE_BALL4 + const WHIRLISLANDB1F_POKE_BALL5 + const WHIRLISLANDB1F_BOULDER + +WhirlIslandB1F_MapScripts: + def_scene_scripts + + def_callbacks + +WhirlIslandB1FFullRestore: + itemball FULL_RESTORE + +WhirlIslandB1FCarbos: + itemball CARBOS + +WhirlIslandB1FCalcium: + itemball CALCIUM + +WhirlIslandB1FNugget: + itemball NUGGET + +WhirlIslandB1FEscapeRope: + itemball ESCAPE_ROPE + +WhirlIslandB1FBoulder: + jumpstd StrengthBoulderScript + +WhirlIslandB1FHiddenRareCandy: + hiddenitem RARE_CANDY, EVENT_WHIRL_ISLAND_B1F_HIDDEN_RARE_CANDY + +WhirlIslandB1FHiddenUltraBall: + hiddenitem ULTRA_BALL, EVENT_WHIRL_ISLAND_B1F_HIDDEN_ULTRA_BALL + +WhirlIslandB1FHiddenFullRestore: + hiddenitem FULL_RESTORE, EVENT_WHIRL_ISLAND_B1F_HIDDEN_FULL_RESTORE + +WhirlIslandB1F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 5, WHIRL_ISLAND_NW, 2 + warp_event 35, 3, WHIRL_ISLAND_NE, 2 + warp_event 29, 9, WHIRL_ISLAND_NE, 3 + warp_event 9, 31, WHIRL_ISLAND_SW, 3 + warp_event 23, 31, WHIRL_ISLAND_SW, 2 + warp_event 31, 29, WHIRL_ISLAND_SE, 2 + warp_event 25, 21, WHIRL_ISLAND_B2F, 1 + warp_event 13, 27, WHIRL_ISLAND_B2F, 2 + warp_event 17, 21, WHIRL_ISLAND_CAVE, 1 + + def_coord_events + + def_bg_events + bg_event 30, 4, BGEVENT_ITEM, WhirlIslandB1FHiddenRareCandy + bg_event 36, 18, BGEVENT_ITEM, WhirlIslandB1FHiddenUltraBall + bg_event 2, 23, BGEVENT_ITEM, WhirlIslandB1FHiddenFullRestore + + def_object_events + object_event 7, 13, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB1FFullRestore, EVENT_WHIRL_ISLAND_B1F_FULL_RESTORE + object_event 2, 18, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB1FCarbos, EVENT_WHIRL_ISLAND_B1F_CARBOS + object_event 33, 23, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB1FCalcium, EVENT_WHIRL_ISLAND_B1F_CALCIUM + object_event 17, 8, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB1FNugget, EVENT_WHIRL_ISLAND_B1F_NUGGET + object_event 19, 26, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB1FEscapeRope, EVENT_WHIRL_ISLAND_B1F_ESCAPE_ROPE + object_event 23, 26, SPRITE_BOULDER, SPRITEMOVEDATA_STRENGTH_BOULDER, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, WhirlIslandB1FBoulder, -1 diff --git a/maps/WhirlIslandB1F.blk b/maps/WhirlIslandB1F.blk new file mode 100644 index 0000000..4c7e065 --- /dev/null +++ b/maps/WhirlIslandB1F.blk @@ -0,0 +1,34 @@ +   +     + + "  + +61   + + ++ + << + + + + 9  + + +<  9 1 + + :;+" + +  +!+!11  + +19   + 6 + + +) 9:  +(  ! + * +  ++(+ +  *6* ++ + 1! ! "   \ No newline at end of file diff --git a/maps/WhirlIslandB2F.asm b/maps/WhirlIslandB2F.asm new file mode 100644 index 0000000..db9f9d8 --- /dev/null +++ b/maps/WhirlIslandB2F.asm @@ -0,0 +1,36 @@ + object_const_def + const WHIRLISLANDB2F_POKE_BALL1 + const WHIRLISLANDB2F_POKE_BALL2 + const WHIRLISLANDB2F_POKE_BALL3 + +WhirlIslandB2F_MapScripts: + def_scene_scripts + + def_callbacks + +WhirlIslandB2FFullRestore: + itemball FULL_RESTORE + +WhirlIslandB2FMaxRevive: + itemball MAX_REVIVE + +WhirlIslandB2FMaxElixer: + itemball MAX_ELIXER + +WhirlIslandB2F_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 11, 5, WHIRL_ISLAND_B1F, 7 + warp_event 7, 11, WHIRL_ISLAND_B1F, 8 + warp_event 7, 25, WHIRL_ISLAND_LUGIA_CHAMBER, 1 + warp_event 13, 31, WHIRL_ISLAND_SW, 5 + + def_coord_events + + def_bg_events + + def_object_events + object_event 10, 11, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB2FFullRestore, EVENT_WHIRL_ISLAND_B2F_FULL_RESTORE + object_event 6, 4, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB2FMaxRevive, EVENT_WHIRL_ISLAND_B2F_MAX_REVIVE + object_event 5, 12, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandB2FMaxElixer, EVENT_WHIRL_ISLAND_B2F_MAX_ELIXER diff --git a/maps/WhirlIslandB2F.blk b/maps/WhirlIslandB2F.blk new file mode 100644 index 0000000..39fdea3 --- /dev/null +++ b/maps/WhirlIslandB2F.blk @@ -0,0 +1 @@ +//.....--.//.....--.//% &--./12'''3-.1   ./-../,-.../-../,-.../-../,-.../-../,-.../-../,-.../-7./,-..% &2''31  %1  \ No newline at end of file diff --git a/maps/WhirlIslandCave.asm b/maps/WhirlIslandCave.asm new file mode 100644 index 0000000..3e6cc1d --- /dev/null +++ b/maps/WhirlIslandCave.asm @@ -0,0 +1,17 @@ +WhirlIslandCave_MapScripts: + def_scene_scripts + + def_callbacks + +WhirlIslandCave_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 5, WHIRL_ISLAND_B1F, 9 + warp_event 3, 13, WHIRL_ISLAND_NW, 4 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/WhirlIslandCave.blk b/maps/WhirlIslandCave.blk new file mode 100644 index 0000000..dec2df8 --- /dev/null +++ b/maps/WhirlIslandCave.blk @@ -0,0 +1,6 @@ +  1 +$ +# + +( +  \ No newline at end of file diff --git a/maps/WhirlIslandLugiaChamber.asm b/maps/WhirlIslandLugiaChamber.asm new file mode 100644 index 0000000..029b70f --- /dev/null +++ b/maps/WhirlIslandLugiaChamber.asm @@ -0,0 +1,55 @@ + object_const_def + const WHIRLISLANDLUGIACHAMBER_LUGIA + +WhirlIslandLugiaChamber_MapScripts: + def_scene_scripts + + def_callbacks + callback MAPCALLBACK_OBJECTS, WhirlIslandLugiaChamberLugiaCallback + +WhirlIslandLugiaChamberLugiaCallback: + checkevent EVENT_FOUGHT_LUGIA + iftrue .NoAppear + checkitem SILVER_WING + iftrue .Appear + sjump .NoAppear + +.Appear: + appear WHIRLISLANDLUGIACHAMBER_LUGIA + endcallback + +.NoAppear: + disappear WHIRLISLANDLUGIACHAMBER_LUGIA + endcallback + +Lugia: + faceplayer + opentext + writetext LugiaText + cry LUGIA + pause 15 + closetext + setevent EVENT_FOUGHT_LUGIA + loadvar VAR_BATTLETYPE, BATTLETYPE_FORCEITEM + loadwildmon LUGIA, 60 + startbattle + disappear WHIRLISLANDLUGIACHAMBER_LUGIA + reloadmapafterbattle + end + +LugiaText: + text "Gyaaas!" + done + +WhirlIslandLugiaChamber_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 9, 13, WHIRL_ISLAND_B2F, 3 + + def_coord_events + + def_bg_events + + def_object_events + object_event 9, 5, SPRITE_LUGIA, SPRITEMOVEDATA_POKEMON, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, Lugia, EVENT_WHIRL_ISLAND_LUGIA_CHAMBER_LUGIA diff --git a/maps/WhirlIslandLugiaChamber.blk b/maps/WhirlIslandLugiaChamber.blk new file mode 100644 index 0000000..01757cc --- /dev/null +++ b/maps/WhirlIslandLugiaChamber.blk @@ -0,0 +1 @@ +--//..--//--//..--//--//>=--//=-/>32=-/>2'1321'3 1$1 #  \ No newline at end of file diff --git a/maps/WhirlIslandNE.asm b/maps/WhirlIslandNE.asm new file mode 100644 index 0000000..4907ce7 --- /dev/null +++ b/maps/WhirlIslandNE.asm @@ -0,0 +1,25 @@ + object_const_def + const WHIRLISLANDNE_POKE_BALL + +WhirlIslandNE_MapScripts: + def_scene_scripts + + def_callbacks + +WhirlIslandNEUltraBall: + itemball ULTRA_BALL + +WhirlIslandNE_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 3, 13, ROUTE_41, 2 + warp_event 17, 3, WHIRL_ISLAND_B1F, 2 + warp_event 13, 11, WHIRL_ISLAND_B1F, 3 + + def_coord_events + + def_bg_events + + def_object_events + object_event 11, 11, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandNEUltraBall, EVENT_WHIRL_ISLAND_NE_ULTRA_BALL diff --git a/maps/WhirlIslandNE.blk b/maps/WhirlIslandNE.blk new file mode 100644 index 0000000..9d25739 --- /dev/null +++ b/maps/WhirlIslandNE.blk @@ -0,0 +1,8 @@ +   +   +) +1   +)<<" +< +$  # +)<  \ No newline at end of file diff --git a/maps/WhirlIslandNW.asm b/maps/WhirlIslandNW.asm new file mode 100644 index 0000000..0a78ec9 --- /dev/null +++ b/maps/WhirlIslandNW.asm @@ -0,0 +1,19 @@ +WhirlIslandNW_MapScripts: + def_scene_scripts + + def_callbacks + +WhirlIslandNW_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 7, ROUTE_41, 1 + warp_event 5, 3, WHIRL_ISLAND_B1F, 1 + warp_event 3, 15, WHIRL_ISLAND_SW, 4 + warp_event 7, 15, WHIRL_ISLAND_CAVE, 2 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/WhirlIslandNW.blk b/maps/WhirlIslandNW.blk new file mode 100644 index 0000000..e0e4d61 --- /dev/null +++ b/maps/WhirlIslandNW.blk @@ -0,0 +1,4 @@ +  +* +11 $ #   +  \ No newline at end of file diff --git a/maps/WhirlIslandSE.asm b/maps/WhirlIslandSE.asm new file mode 100644 index 0000000..5e7baaf --- /dev/null +++ b/maps/WhirlIslandSE.asm @@ -0,0 +1,17 @@ +WhirlIslandSE_MapScripts: + def_scene_scripts + + def_callbacks + +WhirlIslandSE_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 13, ROUTE_41, 4 + warp_event 5, 3, WHIRL_ISLAND_B1F, 6 + + def_coord_events + + def_bg_events + + def_object_events diff --git a/maps/WhirlIslandSE.blk b/maps/WhirlIslandSE.blk new file mode 100644 index 0000000..9949d35 --- /dev/null +++ b/maps/WhirlIslandSE.blk @@ -0,0 +1,4 @@ +111 1111 +$ + # + diff --git a/maps/WhirlIslandSW.asm b/maps/WhirlIslandSW.asm new file mode 100644 index 0000000..1ed2738 --- /dev/null +++ b/maps/WhirlIslandSW.asm @@ -0,0 +1,27 @@ + object_const_def + const WHIRLISLANDSW_POKE_BALL + +WhirlIslandSW_MapScripts: + def_scene_scripts + + def_callbacks + +WhirlIslandSWUltraBall: + itemball ULTRA_BALL + +WhirlIslandSW_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 7, ROUTE_41, 3 + warp_event 17, 3, WHIRL_ISLAND_B1F, 5 + warp_event 3, 3, WHIRL_ISLAND_B1F, 4 + warp_event 3, 15, WHIRL_ISLAND_NW, 3 + warp_event 17, 15, WHIRL_ISLAND_B2F, 4 + + def_coord_events + + def_bg_events + + def_object_events + object_event 15, 2, SPRITE_POKE_BALL, SPRITEMOVEDATA_STILL, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WhirlIslandSWUltraBall, EVENT_WHIRL_ISLAND_SW_ULTRA_BALL diff --git a/maps/WhirlIslandSW.blk b/maps/WhirlIslandSW.blk new file mode 100644 index 0000000..0264700 --- /dev/null +++ b/maps/WhirlIslandSW.blk @@ -0,0 +1,4 @@ +   + %  +)&2= $ #   +&%  \ No newline at end of file diff --git a/maps/WillsRoom.asm b/maps/WillsRoom.asm new file mode 100644 index 0000000..0dbcf87 --- /dev/null +++ b/maps/WillsRoom.asm @@ -0,0 +1,142 @@ + object_const_def + const WILLSROOM_WILL + +WillsRoom_MapScripts: + def_scene_scripts + scene_script WillsRoomLockDoorScene, SCENE_WILLSROOM_LOCK_DOOR + scene_script WillsRoomNoopScene, SCENE_WILLSROOM_NOOP + + def_callbacks + callback MAPCALLBACK_TILES, WillsRoomDoorsCallback + +WillsRoomLockDoorScene: + sdefer WillsRoomDoorLocksBehindYouScript + end + +WillsRoomNoopScene: + end + +WillsRoomDoorsCallback: + checkevent EVENT_WILLS_ROOM_ENTRANCE_CLOSED + iffalse .KeepEntranceOpen + changeblock 4, 14, $2a ; wall +.KeepEntranceOpen: + checkevent EVENT_WILLS_ROOM_EXIT_OPEN + iffalse .KeepExitClosed + changeblock 4, 2, $16 ; open door +.KeepExitClosed: + endcallback + +WillsRoomDoorLocksBehindYouScript: + applymovement PLAYER, WillsRoom_EnterMovement + refreshscreen $86 + playsound SFX_STRENGTH + earthquake 80 + changeblock 4, 14, $2a ; wall + reloadmappart + closetext + setscene SCENE_WILLSROOM_NOOP + setevent EVENT_WILLS_ROOM_ENTRANCE_CLOSED + waitsfx + end + +WillScript_Battle: + faceplayer + opentext + checkevent EVENT_BEAT_ELITE_4_WILL + iftrue WillScript_AfterBattle + writetext WillScript_WillBeforeText + waitbutton + closetext + winlosstext WillScript_WillBeatenText, 0 + loadtrainer WILL, WILL1 + startbattle + reloadmapafterbattle + setevent EVENT_BEAT_ELITE_4_WILL + opentext + writetext WillScript_WillDefeatText + waitbutton + closetext + playsound SFX_ENTER_DOOR + changeblock 4, 2, $16 ; open door + reloadmappart + closetext + setevent EVENT_WILLS_ROOM_EXIT_OPEN + waitsfx + end + +WillScript_AfterBattle: + writetext WillScript_WillDefeatText + waitbutton + closetext + end + +WillsRoom_EnterMovement: + step UP + step UP + step UP + step UP + step_end + +WillScript_WillBeforeText: + text "Welcome to #MON" + line "LEAGUE, ." + + para "Allow me to intro-" + line "duce myself. I am" + cont "WILL." + + para "I have trained all" + line "around the world," + + para "making my psychic" + line "#MON powerful." + + para "And, at last, I've" + line "been accepted into" + cont "the ELITE FOUR." + + para "I can only keep" + line "getting better!" + + para "Losing is not an" + line "option!" + done + +WillScript_WillBeatenText: + text "I… I can't…" + line "believe it…" + done + +WillScript_WillDefeatText: + text "Even though I was" + line "defeated, I won't" + cont "change my course." + + para "I will continue" + line "battling until I" + + para "stand above all" + line "trainers!" + + para "Now, , move" + line "on and experience" + + para "the true ferocity" + line "of the ELITE FOUR." + done + +WillsRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 5, 17, INDIGO_PLATEAU_POKECENTER_1F, 4 + warp_event 4, 2, KOGAS_ROOM, 1 + warp_event 5, 2, KOGAS_ROOM, 2 + + def_coord_events + + def_bg_events + + def_object_events + object_event 5, 7, SPRITE_WILL, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_SCRIPT, 0, WillScript_Battle, -1 diff --git a/maps/WillsRoom.blk b/maps/WillsRoom.blk new file mode 100644 index 0000000..94f3a27 --- /dev/null +++ b/maps/WillsRoom.blk @@ -0,0 +1 @@ +"4444888$888$$8$$$8$$**-**-(- \ No newline at end of file diff --git a/maps/WiseTriosRoom.asm b/maps/WiseTriosRoom.asm new file mode 100644 index 0000000..4690839 --- /dev/null +++ b/maps/WiseTriosRoom.asm @@ -0,0 +1,364 @@ + object_const_def + const WISETRIOSROOM_SAGE1 + const WISETRIOSROOM_SAGE2 + const WISETRIOSROOM_SAGE3 + const WISETRIOSROOM_SAGE4 + const WISETRIOSROOM_SAGE5 + const WISETRIOSROOM_SAGE6 + +WiseTriosRoom_MapScripts: + def_scene_scripts + scene_script WiseTriosRoomNoop1Scene, SCENE_WISETRIOSROOM_SAGE_BLOCKS + scene_script WiseTriosRoomNoop2Scene, SCENE_WISETRIOSROOM_NOOP + + def_callbacks + callback MAPCALLBACK_OBJECTS, WiseTriosRoomWiseTrioCallback + +WiseTriosRoomNoop1Scene: + end + +WiseTriosRoomNoop2Scene: + end + +WiseTriosRoomWiseTrioCallback: + checkevent EVENT_FOUGHT_SUICUNE + iftrue .NoWiseTrio + checkevent EVENT_KOJI_ALLOWS_YOU_PASSAGE_TO_TIN_TOWER + iftrue .WiseTrio2 + checkitem CLEAR_BELL + iftrue .WiseTrio2 + clearevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1 + setevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2 + endcallback + +.WiseTrio2: + setevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1 + clearevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2 + endcallback + +.NoWiseTrio: + setevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1 + setevent EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2 + endcallback + +WiseTriosRoomSage1Script: + jumptextfaceplayer WiseTriosRoomSage1Text + +WiseTriosRoomSage2Script: + jumptextfaceplayer WiseTriosRoomSage2Text + +WiseTriosRoomSage3Script: + jumptextfaceplayer WiseTriosRoomSage3Text + +WiseTriosRoom_CannotEnterTinTowerScript: + turnobject WISETRIOSROOM_SAGE3, UP + turnobject PLAYER, DOWN + showemote EMOTE_SHOCK, WISETRIOSROOM_SAGE3, 20 + follow PLAYER, WISETRIOSROOM_SAGE3 + applymovement PLAYER, WiseTriosRoomSageBlocksPlayerMovement + stopfollow + turnobject PLAYER, RIGHT + opentext + writetext WiseTriosRoomSage3BlocksExitText + waitbutton + closetext + applymovement WISETRIOSROOM_SAGE3, WiseTriosRoomSageReturnsMovement + turnobject WISETRIOSROOM_SAGE3, LEFT + end + +TrainerSageGaku: + trainer SAGE, GAKU, EVENT_BEAT_SAGE_GAKU, SageGakuSeenText, SageGakuBeatenText, 0, .Script + +.Script: + opentext + writetext SageGakuAfterBattleText + waitbutton + closetext + end + +TrainerSageMasa: + trainer SAGE, MASA, EVENT_BEAT_SAGE_MASA, SageMasaSeenText, SageMasaBeatenText, 0, .Script + +.Script: + opentext + writetext SageMasaAfterBattleText + waitbutton + closetext + end + +TrainerSageKoji: + trainer SAGE, KOJI, EVENT_BEAT_SAGE_KOJI, SageKojiSeenText, SageKojiBeatenText, 0, .Script + +.Script: + checkevent EVENT_KOJI_ALLOWS_YOU_PASSAGE_TO_TIN_TOWER + iftrue .KojiAllowsPassage + pause 10 + showemote EMOTE_SHOCK, WISETRIOSROOM_SAGE6, 20 + opentext + writetext SageKojiAfterBattleQuestionText + promptbutton + writetext SageKojiAfterBattleSpeechText + waitbutton + closetext + applymovement WISETRIOSROOM_SAGE6, WiseTriosRoomSageAllowsPassageMovement + turnobject WISETRIOSROOM_SAGE6, UP + setevent EVENT_KOJI_ALLOWS_YOU_PASSAGE_TO_TIN_TOWER + setscene SCENE_WISETRIOSROOM_NOOP + end + +.KojiAllowsPassage: + opentext + writetext SageKojiAfterBattleFinalText + waitbutton + closetext + end + +WiseTriosRoomSageBlocksPlayerMovement: + step LEFT + step LEFT + step_end + +WiseTriosRoomSageReturnsMovement: + step RIGHT + step DOWN + step_end + +WiseTriosRoomSageAllowsPassageMovement: + step RIGHT + step DOWN + step_end + +WiseTriosRoomSage1Text: + text "Astounding…" + + para "SUICUNE, ENTEI and" + line "RAIKOU have arisen" + cont "from their sleep…" + + para "Is the legend" + line "coming true?" + done + +WiseTriosRoomSage2Text: + text "We train at the" + line "BURNED TOWER, but" + + para "we've never heard" + line "of a hole opening" + + para "up there before." + line "It must have been" + + para "deliberately made" + line "by someone." + done + +WiseTriosRoomSage3BlocksExitText: + text "TIN TOWER may be" + line "entered by those" + + para "bearing ECRUTEAK's" + line "GYM BADGE." + + para "However, now that" + line "SUICUNE, RAIKOU" + + para "and ENTEI have" + line "arisen, I ask you" + + para "to refrain from" + line "entering!" + done + +WiseTriosRoomSage3Text: + text "We, the WISE TRIO," + line "are the protectors" + + para "of the legendary" + line "#MON." + done + +SageGakuSeenText: + text "Legend has it that" + line "upon the emergence" + + para "of a trainer who" + line "has the ability to" + + para "touch the souls of" + line "#MON, a #MON" + + para "will come forth to" + line "put that trainer" + + para "to test at the TIN" + line "TOWER." + + para "The legend has" + line "come true!" + + para "The legendary" + line "#MON SUICUNE" + cont "has arrived!" + + para "We, the WISE TRIO," + line "shall test your" + + para "worthiness to go" + line "inside!" + done + +SageGakuBeatenText: + text "Stronger than we" + line "thought? Perhaps…" + done + +SageGakuAfterBattleText: + text "Ah, so it is you" + line "who claim to have" + + para "seen SUICUNE," + line "ENTEI and RAIKOU" + cont "while they slept?" + + para "Unbelievable!" + + para "Legend has it that" + line "they can't be seen" + cont "while they sleep…" + done + +SageMasaSeenText: + text "Can you be trusted" + line "with the truth?" + + para "I must ascertain" + line "your worthiness." + done + +SageMasaBeatenText: + text "…I will tell you" + line "the truth…" + done + +SageMasaAfterBattleText: + text "In the past, there" + line "were two nine-tier" + cont "towers here." + + para "The BRASS TOWER," + line "which was said to" + + para "awaken #MON," + line "and the TIN TOWER," + + para "where #MON were" + line "said to rest." + + para "The view from the" + line "tops of the TOWERS" + + para "must have been" + line "magnificent." + + para "At the time, an" + line "immense, silver-" + + para "colored #MON" + line "was said to make" + + para "its roost atop the" + line "BRASS TOWER." + + para "However…" + + para "About 150 years" + line "ago, a lightning" + + para "bolt struck one of" + line "the TOWERS." + + para "It was engulfed in" + line "flames that raged" + cont "for three days." + + para "A sudden downpour" + line "finally put out" + cont "the blaze." + + para "And that is how" + line "the BURNED TOWER" + cont "came to be." + done + +SageKojiSeenText: + text "Let me see your" + line "power!" + done + +SageKojiBeatenText: + text "Too strong!" + line "Why?" + done + +SageKojiAfterBattleQuestionText: + text "You… Are you the" + line "trainer who is" + + para "awaited by the" + line "legendary #MON?" + done + +SageKojiAfterBattleSpeechText: + text "I see…" + + para "We, the WISE TRIO," + line "have been given " + + para "the responsibility" + line "of protecting the" + + para "legendary #MON." + line "We are to allow" + + para "passage only to" + line "those people who" + + para "possess the power" + line "and soul of truth." + + para "Please, do go on" + line "and enter the TIN" + cont "TOWER ahead." + + para "SUICUNE will put" + line "you to the test." + done + +SageKojiAfterBattleFinalText: + text "Please, do go on." + + para "SUICUNE will put" + line "you to the test." + done + +WiseTriosRoom_MapEvents: + db 0, 0 ; filler + + def_warp_events + warp_event 7, 4, ECRUTEAK_CITY, 4 + warp_event 7, 5, ECRUTEAK_CITY, 5 + warp_event 1, 4, ECRUTEAK_TIN_TOWER_ENTRANCE, 5 + + def_coord_events + coord_event 7, 4, SCENE_WISETRIOSROOM_SAGE_BLOCKS, WiseTriosRoom_CannotEnterTinTowerScript + + def_bg_events + + def_object_events + object_event 6, 2, SPRITE_SAGE, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, WiseTriosRoomSage1Script, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1 + object_event 6, 7, SPRITE_SAGE, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 1, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, WiseTriosRoomSage2Script, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1 + object_event 7, 5, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, WiseTriosRoomSage3Script, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_1 + object_event 4, 2, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerSageGaku, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2 + object_event 4, 6, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerSageMasa, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2 + object_event 6, 4, SPRITE_SAGE, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 2, TrainerSageKoji, EVENT_WISE_TRIOS_ROOM_WISE_TRIO_2 diff --git a/maps/WiseTriosRoom.blk b/maps/WiseTriosRoom.blk new file mode 100644 index 0000000..2e3258e --- /dev/null +++ b/maps/WiseTriosRoom.blk @@ -0,0 +1 @@ +(798$(( \ No newline at end of file diff --git a/maps/unused/BetaAzaleaTown.blk b/maps/unused/BetaAzaleaTown.blk new file mode 100644 index 0000000..8faa183 --- /dev/null +++ b/maps/unused/BetaAzaleaTown.blk @@ -0,0 +1,10 @@ +aaaaaaaaFDaaaaaaaaaaaaaaaaaFDaaaaaaaaaaaaaaaaaFHIIaaaaaaBaaaFaaaaaaFaFaaaHJGFee>aacaaaFaaaadeefaaaaFGbaaaaaaaaFDaaaaaaaFaaDaU +aaaaaaaHIY +aaaaaaa~zU +aaaaaaa5Y +aaaaa@AAAA5z +vvvUaaaaaaaaaaa552955zvvvvvvvvvv +aa55551111111111111 + +a555555555555555552 +a \ No newline at end of file diff --git a/maps/unused/BetaBlackthornCity.blk b/maps/unused/BetaBlackthornCity.blk new file mode 100644 index 0000000..c6fc4f2 --- /dev/null +++ b/maps/unused/BetaBlackthornCity.blk @@ -0,0 +1 @@ +hqqqqqqqqqqqqqqqqqqqhqorrrrrrrrrnqqqqqqqhqiaKeWaKeWahqqqqqqqhqieKaWWWaeWhqorrnqqhqiaWWKWeaWehqi !hqqhqiKWWeeaWWahqi$%hqqhqieKeaWWeeehqi$%hqqhqiaKaWeeWaahqi$%hqqlrmKeWWaWeWahqi()hqqKaWKaWaeWlrmtuhqqWWWWWWKaWWWWWWhqqhqqlrrG \ No newline at end of file diff --git a/maps/unused/BetaBlank.blk b/maps/unused/BetaBlank.blk new file mode 100644 index 0000000..e534056 --- /dev/null +++ b/maps/unused/BetaBlank.blk @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/maps/unused/BetaCapsuleHouse.blk b/maps/unused/BetaCapsuleHouse.blk new file mode 100644 index 0000000..555abfa --- /dev/null +++ b/maps/unused/BetaCapsuleHouse.blk @@ -0,0 +1 @@ +' \ No newline at end of file diff --git a/maps/unused/BetaCaveTestMap.blk b/maps/unused/BetaCaveTestMap.blk new file mode 100644 index 0000000..eba6c84 --- /dev/null +++ b/maps/unused/BetaCaveTestMap.blk @@ -0,0 +1,18 @@ +   +;<  ; 6< + + 589: + + + + +  5  + +    + + 5   + +    +  + 5 6 +    \ No newline at end of file diff --git a/maps/unused/BetaCeladonMansion1F.blk b/maps/unused/BetaCeladonMansion1F.blk new file mode 100644 index 0000000..993ea3a --- /dev/null +++ b/maps/unused/BetaCeladonMansion1F.blk @@ -0,0 +1 @@ +?',9..',9 \ No newline at end of file diff --git a/maps/unused/BetaCeladonMansion2F.blk b/maps/unused/BetaCeladonMansion2F.blk new file mode 100644 index 0000000..8d3e219 --- /dev/null +++ b/maps/unused/BetaCeladonMansion2F.blk @@ -0,0 +1 @@ +? +,/ \ No newline at end of file diff --git a/maps/unused/BetaCherrygroveCity.blk b/maps/unused/BetaCherrygroveCity.blk new file mode 100644 index 0000000..440952f --- /dev/null +++ b/maps/unused/BetaCherrygroveCity.blk @@ -0,0 +1,9 @@ + +aaaaaaaa + +a6 +a6YEa6Y,-6YG./a52vUa551 + +aaaaa5555 + +aaaa \ No newline at end of file diff --git a/maps/unused/BetaCianwoodCity.blk b/maps/unused/BetaCianwoodCity.blk new file mode 100644 index 0000000..d946e1d --- /dev/null +++ b/maps/unused/BetaCianwoodCity.blk @@ -0,0 +1 @@ +aaaaXaaTyaaX5ETy5Tv455aTvvyfaXYaaXYEaaeaaa \ No newline at end of file diff --git a/maps/unused/BetaCinnabarPokemonLabHallway.blk b/maps/unused/BetaCinnabarPokemonLabHallway.blk new file mode 100644 index 0000000..7a6502a --- /dev/null +++ b/maps/unused/BetaCinnabarPokemonLabHallway.blk @@ -0,0 +1,2 @@ +  +  \ No newline at end of file diff --git a/maps/unused/BetaCinnabarPokemonLabRoom1.blk b/maps/unused/BetaCinnabarPokemonLabRoom1.blk new file mode 100644 index 0000000..ef77b65 --- /dev/null +++ b/maps/unused/BetaCinnabarPokemonLabRoom1.blk @@ -0,0 +1,2 @@ +  +  \ No newline at end of file diff --git a/maps/unused/BetaCinnabarPokemonLabRoom2.blk b/maps/unused/BetaCinnabarPokemonLabRoom2.blk new file mode 100644 index 0000000..822db17 --- /dev/null +++ b/maps/unused/BetaCinnabarPokemonLabRoom2.blk @@ -0,0 +1 @@ +  \ No newline at end of file diff --git a/maps/unused/BetaCinnabarPokemonLabRoom3.blk b/maps/unused/BetaCinnabarPokemonLabRoom3.blk new file mode 100644 index 0000000..d9a64a5 --- /dev/null +++ b/maps/unused/BetaCinnabarPokemonLabRoom3.blk @@ -0,0 +1 @@ +   \ No newline at end of file diff --git a/maps/unused/BetaEcruteakCity.blk b/maps/unused/BetaEcruteakCity.blk new file mode 100644 index 0000000..ce448c2 --- /dev/null +++ b/maps/unused/BetaEcruteakCity.blk @@ -0,0 +1 @@ +?eeeeeeeeeeeb !bb$%b>$%`&;',-&'`$%`*"+#/*+aE$%dg,-b()#/tuWZWVWVWVWZ@AABGTU !FXY$%&'XYa$%*+VVZVVVVVVZaa()EatuIIJ~{@AAAAA HII \ No newline at end of file diff --git a/maps/unused/BetaElevator.blk b/maps/unused/BetaElevator.blk new file mode 100644 index 0000000..32fb226 --- /dev/null +++ b/maps/unused/BetaElevator.blk @@ -0,0 +1 @@ +&$$$%$$$$$$$$$$$$$$$$$$ \ No newline at end of file diff --git a/maps/unused/BetaFastShipInsideCutOut.blk b/maps/unused/BetaFastShipInsideCutOut.blk new file mode 100644 index 0000000..b385b01 --- /dev/null +++ b/maps/unused/BetaFastShipInsideCutOut.blk @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/maps/unused/BetaGoldenrodCity.blk b/maps/unused/BetaGoldenrodCity.blk new file mode 100644 index 0000000..1a15612 --- /dev/null +++ b/maps/unused/BetaGoldenrodCity.blk @@ -0,0 +1,10 @@ + + + +FD + +JHU !Y$#Y"HEzv%&IIIIIIIIJII55)* @-.EAAAAAAAAAA FIHIJEEvvU55YY@AEYDFYHFzU5 + +B @55 + +F~D \ No newline at end of file diff --git a/maps/unused/BetaHouse.blk b/maps/unused/BetaHouse.blk new file mode 100644 index 0000000..187a3cd --- /dev/null +++ b/maps/unused/BetaHouse.blk @@ -0,0 +1 @@ +*+,*-.12/0/ \ No newline at end of file diff --git a/maps/unused/BetaLakeOfRage.blk b/maps/unused/BetaLakeOfRage.blk new file mode 100644 index 0000000..d1d63a0 --- /dev/null +++ b/maps/unused/BetaLakeOfRage.blk @@ -0,0 +1 @@ +\^af\a\^afG^f\\f>^fTU^abfd?fdTvyY>dG\fd\X55Ya^d?f^Tvy55Y<d`f\\Ty555Y`f]\?\aX555Y\\^?Tvvy555Y^<fTvy555555Y^bd\bf^X5555555Ydf\ffTy5555555Y\b\af\fX55555Ya^d<d\daX555Yfd\\G`f^^\>e\adfa \ No newline at end of file diff --git a/maps/unused/BetaMahoganyTown.blk b/maps/unused/BetaMahoganyTown.blk new file mode 100644 index 0000000..6b4c62e --- /dev/null +++ b/maps/unused/BetaMahoganyTown.blk @@ -0,0 +1 @@ +`N=`RZW,-G./WEZWWG? \ No newline at end of file diff --git a/maps/unused/BetaNewBarkTown.blk b/maps/unused/BetaNewBarkTown.blk new file mode 100644 index 0000000..395c91f --- /dev/null +++ b/maps/unused/BetaNewBarkTown.blk @@ -0,0 +1 @@ +^]?II~IDGaaHTvEX5@~~{XDGGXHIIIIIIIaXvvvvvvvvv1 \ No newline at end of file diff --git a/maps/unused/BetaOlivineCity.blk b/maps/unused/BetaOlivineCity.blk new file mode 100644 index 0000000..749f05a --- /dev/null +++ b/maps/unused/BetaOlivineCity.blk @@ -0,0 +1,4 @@ +FDIJHIIIFDFZFDFDFFZFFZFFDFFZFAABFZFFDF|}FTvvvvvvvvvUDF|}FXYX55YDF|}FXYX55YHIIIJ|}FXYX556vvv + +JXYX5545552 +Xzvvvvy55255552vvvy555 555550555552995555~5555:5555 \ No newline at end of file diff --git a/maps/unused/BetaPewterMuseumOfScience1F.blk b/maps/unused/BetaPewterMuseumOfScience1F.blk new file mode 100644 index 0000000..1eec02a --- /dev/null +++ b/maps/unused/BetaPewterMuseumOfScience1F.blk @@ -0,0 +1,2 @@ + +  ! &! & \ No newline at end of file diff --git a/maps/unused/BetaPewterMuseumOfScience2F.blk b/maps/unused/BetaPewterMuseumOfScience2F.blk new file mode 100644 index 0000000..ac56222 --- /dev/null +++ b/maps/unused/BetaPewterMuseumOfScience2F.blk @@ -0,0 +1 @@ +012! \ No newline at end of file diff --git a/maps/unused/BetaPlayersHouse2F.blk b/maps/unused/BetaPlayersHouse2F.blk new file mode 100644 index 0000000..b5b53b4 --- /dev/null +++ b/maps/unused/BetaPlayersHouse2F.blk @@ -0,0 +1 @@ + ! " \ No newline at end of file diff --git a/maps/unused/BetaPokecenter.blk b/maps/unused/BetaPokecenter.blk new file mode 100644 index 0000000..2613507 --- /dev/null +++ b/maps/unused/BetaPokecenter.blk @@ -0,0 +1 @@ +  ' \ No newline at end of file diff --git a/maps/unused/BetaRocketHideout1F.blk b/maps/unused/BetaRocketHideout1F.blk new file mode 100644 index 0000000..dcec627 --- /dev/null +++ b/maps/unused/BetaRocketHideout1F.blk @@ -0,0 +1,15 @@ +  +   +  + + + +   +  +   +   +   + + % + +   \ No newline at end of file diff --git a/maps/unused/BetaRocketHideoutB1F.blk b/maps/unused/BetaRocketHideoutB1F.blk new file mode 100644 index 0000000..b17106c --- /dev/null +++ b/maps/unused/BetaRocketHideoutB1F.blk @@ -0,0 +1,4 @@ + +   +  +  >:)   ><) >>    )89      >>   8: ::?   ?< <> "! 89  *> *   89 :?:? )  ;?;? )  ? >:) 5//////>89<)  +,/////- >>>> 1 8899///= + 5///->:?  1 = + >? ? ,/////-,////- \ No newline at end of file diff --git a/maps/unused/BetaRoute23.blk b/maps/unused/BetaRoute23.blk new file mode 100644 index 0000000..a62533d --- /dev/null +++ b/maps/unused/BetaRoute23.blk @@ -0,0 +1,7 @@ + + ! + +ohi +omhi!nm7:~nm'nm'nm'nm'nm'nm'nm'nm +^ +noo !hihi \ No newline at end of file diff --git a/maps/unused/BetaRuinsOfAlphUnsolvedPuzzleRoom.blk b/maps/unused/BetaRuinsOfAlphUnsolvedPuzzleRoom.blk new file mode 100644 index 0000000..a3aa06b --- /dev/null +++ b/maps/unused/BetaRuinsOfAlphUnsolvedPuzzleRoom.blk @@ -0,0 +1 @@ + ,+ \ No newline at end of file diff --git a/maps/unused/BetaSilverCaveOutside.blk b/maps/unused/BetaSilverCaveOutside.blk new file mode 100644 index 0000000..3cde140 --- /dev/null +++ b/maps/unused/BetaSilverCaveOutside.blk @@ -0,0 +1 @@ +hqqqqqihqqqqqilrrsm \ No newline at end of file diff --git a/maps/unused/BetaSlowpokeWell1F.blk b/maps/unused/BetaSlowpokeWell1F.blk new file mode 100644 index 0000000..a2722d0 --- /dev/null +++ b/maps/unused/BetaSlowpokeWell1F.blk @@ -0,0 +1,5 @@ +  +(+ +)* + +   \ No newline at end of file diff --git a/maps/unused/BetaSproutTower1.blk b/maps/unused/BetaSproutTower1.blk new file mode 100644 index 0000000..6c0b2ea --- /dev/null +++ b/maps/unused/BetaSproutTower1.blk @@ -0,0 +1,3 @@ +      +   +    \ No newline at end of file diff --git a/maps/unused/BetaSproutTower2.blk b/maps/unused/BetaSproutTower2.blk new file mode 100644 index 0000000..a13cec1 --- /dev/null +++ b/maps/unused/BetaSproutTower2.blk @@ -0,0 +1,9 @@ +  +  +   +  +   +   +   +  + \ No newline at end of file diff --git a/maps/unused/BetaSproutTower3.blk b/maps/unused/BetaSproutTower3.blk new file mode 100644 index 0000000..846bb90 --- /dev/null +++ b/maps/unused/BetaSproutTower3.blk @@ -0,0 +1,7 @@ +  +    +  +    +  +   + \ No newline at end of file diff --git a/maps/unused/BetaSproutTower5.blk b/maps/unused/BetaSproutTower5.blk new file mode 100644 index 0000000..baaeaa9 --- /dev/null +++ b/maps/unused/BetaSproutTower5.blk @@ -0,0 +1,9 @@ +  +  +  +  +  +     +  + +         \ No newline at end of file diff --git a/maps/unused/BetaSproutTower6.blk b/maps/unused/BetaSproutTower6.blk new file mode 100644 index 0000000..ea93956 --- /dev/null +++ b/maps/unused/BetaSproutTower6.blk @@ -0,0 +1,4 @@ +  +              +   +   \ No newline at end of file diff --git a/maps/unused/BetaSproutTower7.blk b/maps/unused/BetaSproutTower7.blk new file mode 100644 index 0000000..bfa5da2 --- /dev/null +++ b/maps/unused/BetaSproutTower7.blk @@ -0,0 +1,8 @@ +  + +   +  +      +    +   +  \ No newline at end of file diff --git a/maps/unused/BetaSproutTower8.blk b/maps/unused/BetaSproutTower8.blk new file mode 100644 index 0000000..254c0c5 --- /dev/null +++ b/maps/unused/BetaSproutTower8.blk @@ -0,0 +1,5 @@ +   +     +   +     +     \ No newline at end of file diff --git a/maps/unused/BetaSproutTower9.blk b/maps/unused/BetaSproutTower9.blk new file mode 100644 index 0000000..f5737b2 --- /dev/null +++ b/maps/unused/BetaSproutTower9.blk @@ -0,0 +1 @@ +     \ No newline at end of file diff --git a/maps/unused/BetaSproutTowerCutOut1.blk b/maps/unused/BetaSproutTowerCutOut1.blk new file mode 100644 index 0000000..21808bb --- /dev/null +++ b/maps/unused/BetaSproutTowerCutOut1.blk @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/maps/unused/BetaSproutTowerCutOut2.blk b/maps/unused/BetaSproutTowerCutOut2.blk new file mode 100644 index 0000000..21808bb --- /dev/null +++ b/maps/unused/BetaSproutTowerCutOut2.blk @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/maps/unused/BetaSproutTowerCutOut3.blk b/maps/unused/BetaSproutTowerCutOut3.blk new file mode 100644 index 0000000..21808bb --- /dev/null +++ b/maps/unused/BetaSproutTowerCutOut3.blk @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/maps/unused/BetaUnionCave.blk b/maps/unused/BetaUnionCave.blk new file mode 100644 index 0000000..b103c25 --- /dev/null +++ b/maps/unused/BetaUnionCave.blk @@ -0,0 +1,8 @@ +  + + + + + + +  \ No newline at end of file diff --git a/maps/unused/BetaUnknownGym.blk b/maps/unused/BetaUnknownGym.blk new file mode 100644 index 0000000..c3063ad --- /dev/null +++ b/maps/unused/BetaUnknownGym.blk @@ -0,0 +1 @@ +( \ No newline at end of file diff --git a/maps/unused/BetaVioletCity.blk b/maps/unused/BetaVioletCity.blk new file mode 100644 index 0000000..963dbb2 --- /dev/null +++ b/maps/unused/BetaVioletCity.blk @@ -0,0 +1,7 @@ +??&;'TU&;'b?*"+XY*"+?=G^bXYTU]]]]]]]]]]]]]XYXYXYb`b !`GbD$%F` +&;' +bD()F`G*"+ +eeebDtuF` + +AEA +bpk`bsm`=]E`G`G?e`b`?eeeeeeeeeef`b \ No newline at end of file diff --git a/mobile/fixed_words.asm b/mobile/fixed_words.asm new file mode 100644 index 0000000..feb98df --- /dev/null +++ b/mobile/fixed_words.asm @@ -0,0 +1,4126 @@ +; 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: + ld a, e + or d + jr z, .error + ld a, e + and d + cp $ff + jr z, .error + push hl + call CopyMobileEZChatToC608 + pop hl + call PlaceString + and a + ret + +.error + ld c, l + ld b, h + scf + ret + +Function11c075: + push de + ld a, c + call Function11c254 + pop de + ld bc, wcd36 + call Function11c08f + ret + +Function11c082: ; unreferenced + push de + ld a, c + call Function11c254 + pop de + ld bc, wcd36 + call PrintEZChatBattleMessage + ret + +Function11c08f: + ld l, e + ld h, d + push hl + ld a, 3 +.loop + push af + ld a, [bc] + ld e, a + inc bc + ld a, [bc] + ld d, a + inc bc + push bc + call Function11c05d + jr c, .okay + inc bc + +.okay + ld l, c + ld h, b + pop bc + pop af + dec a + jr nz, .loop + pop hl + ld de, 2 * SCREEN_WIDTH + add hl, de + ld a, $3 +.loop2 + push af + ld a, [bc] + ld e, a + inc bc + ld a, [bc] + ld d, a + inc bc + push bc + call Function11c05d + jr c, .okay2 + inc bc + +.okay2 + ld l, c + ld h, b + pop bc + pop af + dec a + jr nz, .loop2 + ret + +PrintEZChatBattleMessage: +; Use up to 6 words from bc to print text starting at de. + ; Preserve [wJumptableIndex], [wcf64] + ld a, [wJumptableIndex] + ld l, a + ld a, [wcf64] + ld h, a + push hl + ; reset value at [wc618] (not preserved) + ld hl, wc618 + ld a, $0 + ld [hli], a + ; preserve de + push de + ; [wJumptableIndex] keeps track of which line we're on (0, 1, or 2) + ; [wcf64] keeps track of how much room we have left in the current line + xor a + ld [wJumptableIndex], a + ld a, 18 + ld [wcf64], a + ld a, 6 +.loop + push af + ; load the 2-byte word data pointed to by bc + ld a, [bc] + ld e, a + inc bc + ld a, [bc] + ld d, a + inc bc + ; if $0000, we're done + or e + jr z, .done + ; preserving hl and bc, get the length of the word + push hl + push bc + call CopyMobileEZChatToC608 + call GetLengthOfWordAtC608 + ld e, c + pop bc + pop hl + ; if the functions return 0, we're done + ld a, e + or a + jr z, .done +.loop2 + ; e contains the length of the word + ; add 1 for the space, unless we're at the start of the line + ld a, [wcf64] + cp 18 + jr z, .skip_inc + inc e + +.skip_inc + ; if the word fits, put it on the same line + cp e + jr nc, .same_line + ; otherwise, go to the next line + ld a, [wJumptableIndex] + inc a + ld [wJumptableIndex], a + ; if we're on line 2, insert "" + ld [hl], "" + rra + jr c, .got_line_terminator + ; else, insert "" + ld [hl], "" + +.got_line_terminator + inc hl + ; init the next line, holding on to the same word + ld a, 18 + ld [wcf64], a + dec e + jr .loop2 + +.same_line + ; add the space, unless we're at the start of the line + cp 18 + jr z, .skip_space + ld [hl], " " + inc hl + +.skip_space + ; deduct the length of the word + sub e + ld [wcf64], a + ld de, wc608 +.place_string_loop + ; load the string from de to hl + ld a, [de] + cp "@" + jr z, .done + inc de + ld [hli], a + jr .place_string_loop + +.done + ; next word? + pop af + dec a + jr nz, .loop + ; we're finished, place "" + ld [hl], "" + ; now, let's place the string from wc618 to bc + pop bc + ld hl, wc618 + call PlaceHLTextAtBC + ; restore the original values of [wJumptableIndex] and [wcf64] + pop hl + ld a, l + ld [wJumptableIndex], a + ld a, h + ld [wcf64], a + ret + +GetLengthOfWordAtC608: + ld c, $0 + ld hl, wc608 +.loop + ld a, [hli] + cp "@" + ret z + inc c + jr .loop + +CopyMobileEZChatToC608: + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld a, "@" + ld hl, wc608 + ld bc, NAME_LENGTH + call ByteFill + ld a, d + and a + jr z, .get_name + ld hl, MobileEZChatCategoryPointers + dec d + sla d + ld c, d + ld b, $0 + add hl, bc + ld a, [hli] + ld c, a + ld a, [hl] + ld b, a + push bc + pop hl + ld c, e + ld b, $0 + sla c + rl b + sla c + rl b + sla c + rl b + add hl, bc + ld bc, NAME_LENGTH_JAPANESE - 1 +.copy_string + ld de, wc608 + call CopyBytes + ld de, wc608 + pop af + ldh [rSVBK], a + ret + +.get_name + ld a, e + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wStringBuffer1 + ld bc, MON_NAME_LENGTH - 1 + jr .copy_string + +Function11c1ab: + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + call Function11c1b9 + pop af + ldh [hInMenu], a + ret + +Function11c1b9: + call .InitKanaMode + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + call EZChat_MasterLoop + pop af + ldh [rSVBK], a + ret + +.InitKanaMode: + xor a + ld [wJumptableIndex], a + ld [wcf64], a + ld [wcf65], a + ld [wcf66], a + ld [wcd23], a + ld [wcd20], a + ld [wcd21], a + ld [wcd22], a + ld [wcd35], a + ld [wcd2b], a + ld a, $ff + ld [wcd24], a + ld a, [wMenuCursorY] + dec a + call Function11c254 + call ClearBGPalettes + call ClearSprites + call ClearScreen + call Function11d323 + call SetPalettes + call DisableLCD + ld hl, SelectStartGFX + ld de, vTiles2 + ld bc, $60 + call CopyBytes + ld hl, EZChatSlowpokeLZ + ld de, vTiles0 + call Decompress + call EnableLCD + farcall ReloadMapPart + farcall ClearSpriteAnims + farcall LoadPokemonData + ldh a, [rSVBK] + push af + ld a, BANK(wPokedexOrder) + ldh [rSVBK], a + ; whatever depends on this will break, but nothing seems to depend on the loaded order anyway! + farcall Pokedex_ABCMode + ld a, $5 + ldh [rSVBK], a + ld hl, wc6d0 + ld de, wLYOverrides + ld bc, $100 + call CopyBytes + pop af + ldh [rSVBK], a + call EZChat_GetCategoryWordsByKana + call EZChat_GetSeenPokemonByKana + ret + +Function11c254: + push af + ld a, BANK(sEZChatMessages) + call OpenSRAM + ld hl, sEZChatMessages + pop af + sla a + sla a + ld c, a + sla a + add c + ld c, a + ld b, 0 + add hl, bc + ld de, wcd36 + ld bc, EASY_CHAT_MESSAGE_LENGTH + call CopyBytes + call CloseSRAM + ret + +EZChat_ClearBottom12Rows: + ld a, " " + hlcoord 0, 6 + ld bc, (SCREEN_HEIGHT - 6) * SCREEN_WIDTH + call ByteFill + ret + +EZChat_MasterLoop: +.loop + call JoyTextDelay + ldh a, [hJoyPressed] + ldh [hJoypadPressed], a + ld a, [wJumptableIndex] + bit 7, a + jr nz, .exit + call .DoJumptableFunction + farcall PlaySpriteAnimations + farcall ReloadMapPart + jr .loop + +.exit + farcall ClearSpriteAnims + call ClearSprites + ret + +.DoJumptableFunction: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + dw .SpawnObjects ; 00 + dw .InitRAM ; 01 + dw Function11c35f ; 02 + dw Function11c373 ; 03 + dw Function11c3c2 ; 04 + dw Function11c3ed ; 05 + dw Function11c52c ; 06 + dw Function11c53d ; 07 + dw Function11c658 ; 08 + dw Function11c675 ; 09 + dw Function11c9bd ; 0a + dw Function11c9c3 ; 0b + dw Function11caad ; 0c + dw Function11cab3 ; 0d + dw Function11cb52 ; 0e + dw Function11cb66 ; 0f + dw Function11cbf5 ; 10 + dw Function11ccef ; 11 + dw Function11cd04 ; 12 + dw Function11cd20 ; 13 + dw Function11cd54 ; 14 + dw Function11ce0b ; 15 + dw Function11ce2b ; 16 + +.SpawnObjects: + depixel 3, 1, 2, 5 + ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR + call InitSpriteAnimStruct + + depixel 8, 1, 2, 5 + ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, $1 + ld [hl], a + + depixel 9, 2, 2, 0 + ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, $3 + ld [hl], a + + depixel 10, 16 + ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, $4 + ld [hl], a + + depixel 10, 4 + ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, $5 + ld [hl], a + + depixel 10, 2 + ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, $2 + ld [hl], a + + ld hl, wcd23 + set 1, [hl] + set 2, [hl] + jp Function11cfb5 + +.InitRAM: + ld a, $9 + ld [wcd2d], a + ld a, $2 + ld [wcd2e], a + ld [wcd2f], a + ld [wcd30], a + ld de, wcd2d + call Function11cfce + jp Function11cfb5 + +Function11c35f: + ld hl, wcd2f + inc [hl] + inc [hl] + dec hl + dec hl + dec [hl] + push af + ld de, wcd2d + call Function11cfce + pop af + ret nz + jp Function11cfb5 + +Function11c373: + ld hl, wcd30 + inc [hl] + inc [hl] + dec hl + dec hl + dec [hl] + push af + ld de, wcd2d + call Function11cfce + pop af + ret nz + call Function11c38a + jp Function11cfb5 + +Function11c38a: + ld hl, Unknown_11c986 + ld bc, wcd36 + ld a, $6 +.asm_11c392 + push af + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + push hl + push de + pop hl + ld a, [bc] + inc bc + ld e, a + ld a, [bc] + inc bc + ld d, a + push bc + or e + jr z, .asm_11c3af + ld a, e + and d + cp $ff + jr z, .asm_11c3af + call Function11c05d + jr .asm_11c3b5 +.asm_11c3af + ld de, String_11c3bc + call PlaceString +.asm_11c3b5 + pop bc + pop hl + pop af + dec a + jr nz, .asm_11c392 + ret + +String_11c3bc: + db "ーーーーー@" + +Function11c3c2: + call EZChat_ClearBottom12Rows + ld de, Unknown_11cfbe + call Function11d035 + hlcoord 1, 7 + ld de, String_11c4db + call PlaceString + hlcoord 1, 16 + ld de, String_11c51b + call PlaceString + call Function11c4be + ld hl, wcd23 + set 0, [hl] + ld hl, wcd24 + res 0, [hl] + call Function11cfb5 + +Function11c3ed: + ld hl, wcd20 + ld de, hJoypadPressed + ld a, [de] + and $8 + jr nz, .asm_11c426 + ld a, [de] + and $2 + jr nz, .asm_11c41a + ld a, [de] + and $1 + jr nz, .asm_11c42c + ld de, hJoyLast + ld a, [de] + and $40 + jr nz, .asm_11c47c + ld a, [de] + and $80 + jr nz, .asm_11c484 + ld a, [de] + and $20 + jr nz, .asm_11c48c + ld a, [de] + and $10 + jr nz, .asm_11c498 + ret + +.asm_11c41a + call PlayClickSFX +.asm_11c41d + ld hl, wcd24 + set 0, [hl] + ld a, $c + jr .asm_11c475 +.asm_11c426 + ld a, $8 + ld [wcd20], a + ret + +.asm_11c42c + ld a, [wcd20] + cp $6 + jr c, .asm_11c472 + sub $6 + jr z, .asm_11c469 + dec a + jr z, .asm_11c41d + ld hl, wcd36 + ld c, $c + xor a +.asm_11c440 + or [hl] + inc hl + dec c + jr nz, .asm_11c440 + and a + jr z, .asm_11c460 + ld de, Unknown_11cfba + call Function11cfce + decoord 1, 2 + ld bc, wcd36 + call Function11c08f + ld hl, wcd24 + set 0, [hl] + ld a, $e + jr .asm_11c475 +.asm_11c460 + ld hl, wcd24 + set 0, [hl] + ld a, $11 + jr .asm_11c475 +.asm_11c469 + ld hl, wcd24 + set 0, [hl] + ld a, $a + jr .asm_11c475 +.asm_11c472 + call Function11c4a5 +.asm_11c475 + ld [wJumptableIndex], a + call PlayClickSFX + ret + +.asm_11c47c + ld a, [hl] + cp $3 + ret c + sub $3 + jr .asm_11c4a3 +.asm_11c484 + ld a, [hl] + cp $6 + ret nc + add $3 + jr .asm_11c4a3 +.asm_11c48c + ld a, [hl] + and a + ret z + cp $3 + ret z + cp $6 + ret z + dec a + jr .asm_11c4a3 +.asm_11c498 + ld a, [hl] + cp $2 + ret z + cp $5 + ret z + cp $8 + ret z + inc a +.asm_11c4a3 + ld [hl], a + ret + +Function11c4a5: + ld hl, wcd23 + res 0, [hl] + ld a, [wcd2b] + and a + jr nz, .asm_11c4b7 + xor a + ld [wcd21], a + ld a, $6 + ret + +.asm_11c4b7 + xor a + ld [wcd22], a + ld a, $15 + ret + +Function11c4be: + ld a, $1 + hlcoord 0, 6, wAttrmap + ld bc, $a0 + call ByteFill + ld a, $7 + hlcoord 0, 14, wAttrmap + ld bc, $28 + call ByteFill + farcall ReloadMapPart + ret + +String_11c4db: + db "6つのことば¯くみあわせます" + next "かえたいところ¯えらぶと でてくる" + next "ことばのグループから いれかえたい" + next "たんご¯えらんでください" + db "@" + +String_11c51b: + db "ぜんぶけす やめる   けってい@" + +Function11c52c: + call EZChat_ClearBottom12Rows + call EZChat_PlaceCategoryNames + call Function11c618 + ld hl, wcd24 + res 1, [hl] + call Function11cfb5 + +Function11c53d: + ld hl, wcd21 + ld de, hJoypadPressed + + ld a, [de] + and START + jr nz, .start + + ld a, [de] + and SELECT + jr nz, .select + + ld a, [de] + and B_BUTTON + jr nz, .b + + ld a, [de] + and A_BUTTON + jr nz, .a + + ld de, hJoyLast + + ld a, [de] + and D_UP + jr nz, .up + + ld a, [de] + and D_DOWN + jr nz, .down + + ld a, [de] + and D_LEFT + jr nz, .left + + ld a, [de] + and D_RIGHT + jr nz, .right + + ret + +.a + ld a, [wcd21] + cp 15 + jr c, .got_category + sub $f + jr z, .done + dec a + jr z, .mode + jr .b + +.start + ld hl, wcd24 + set 0, [hl] + ld a, $8 + ld [wcd20], a + +.b + ld a, $4 + jr .go_to_function + +.select + ld a, [wcd2b] + xor $1 + ld [wcd2b], a + ld a, $15 + jr .go_to_function + +.mode + ld a, $13 + jr .go_to_function + +.got_category + ld a, $8 + +.go_to_function + ld hl, wcd24 + set 1, [hl] + ld [wJumptableIndex], a + call PlayClickSFX + ret + +.done + ld a, [wcd20] + call Function11ca6a + call PlayClickSFX + ret + +.up + ld a, [hl] + cp $3 + ret c + sub $3 + jr .finish_dpad + +.down + ld a, [hl] + cp $f + ret nc + add $3 + jr .finish_dpad + +.left + ld a, [hl] + and a + ret z + cp $3 + ret z + cp $6 + ret z + cp $9 + ret z + cp $c + ret z + cp $f + ret z + dec a + jr .finish_dpad + +.right + ld a, [hl] + cp $2 + ret z + cp $5 + ret z + cp $8 + ret z + cp $b + ret z + cp $e + ret z + cp $11 + ret z + inc a + +.finish_dpad + ld [hl], a + ret + +EZChat_PlaceCategoryNames: + ld de, MobileEZChatCategoryNames + ld bc, Coords_11c63a + ld a, 15 +.loop + push af + ld a, [bc] + inc bc + ld l, a + ld a, [bc] + inc bc + ld h, a + push bc + call PlaceString + ; The category names are padded with "@". + ; To find the next category, the system must + ; find the first character at de that is not "@". +.find_next_string_loop + inc de + ld a, [de] + cp "@" + jr z, .find_next_string_loop + pop bc + pop af + dec a + jr nz, .loop + hlcoord 1, 17 + ld de, EZChatString_Stop_Mode_Cancel + call PlaceString + ret + +Function11c618: + ld a, $2 + hlcoord 0, 6, wAttrmap + ld bc, $c8 + call ByteFill + farcall ReloadMapPart + ret + +EZChatString_Stop_Mode_Cancel: + db "けす    モード   やめる@" + +Coords_11c63a: + dwcoord 1, 7 + dwcoord 7, 7 + dwcoord 13, 7 + dwcoord 1, 9 + dwcoord 7, 9 + dwcoord 13, 9 + dwcoord 1, 11 + dwcoord 7, 11 + dwcoord 13, 11 + dwcoord 1, 13 + dwcoord 7, 13 + dwcoord 13, 13 + dwcoord 1, 15 + dwcoord 7, 15 + dwcoord 13, 15 + +Function11c658: + call EZChat_ClearBottom12Rows + call Function11c770 + ld de, Unknown_11cfc2 + call Function11d035 + call Function11c9ab + call Function11c7bc + call Function11c86e + ld hl, wcd24 + res 3, [hl] + call Function11cfb5 + +Function11c675: + ld hl, wMobileCommsJumptableIndex + ld de, hJoypadPressed + ld a, [de] + and A_BUTTON + jr nz, .a + ld a, [de] + and B_BUTTON + jr nz, .b + ld a, [de] + and START + jr nz, .start + ld a, [de] + and SELECT + jr z, .select + + ld a, [wcd26] + and a + ret z + sub $c + jr nc, .asm_11c699 + xor a +.asm_11c699 + ld [wcd26], a + jr .asm_11c6c4 + +.start + ld hl, wcd28 + ld a, [wcd26] + add $c + cp [hl] + ret nc + ld [wcd26], a + ld a, [hl] + ld b, a + ld hl, wMobileCommsJumptableIndex + ld a, [wcd26] + add [hl] + jr c, .asm_11c6b9 + cp b + jr c, .asm_11c6c4 +.asm_11c6b9 + ld a, [wcd28] + ld hl, wcd26 + sub [hl] + dec a + ld [wMobileCommsJumptableIndex], a +.asm_11c6c4 + call Function11c992 + call Function11c7bc + call Function11c86e + ret + +.select + ld de, hJoyLast + ld a, [de] + and D_UP + jr nz, .asm_11c708 + ld a, [de] + and D_DOWN + jr nz, .asm_11c731 + ld a, [de] + and D_LEFT + jr nz, .asm_11c746 + ld a, [de] + and D_RIGHT + jr nz, .asm_11c755 + ret + +.a + call Function11c8f6 + ld a, $4 + ld [wcd35], a + jr .asm_11c6fc +.b + ld a, [wcd2b] + and a + jr nz, .asm_11c6fa + ld a, $6 + jr .asm_11c6fc +.asm_11c6fa + ld a, $15 +.asm_11c6fc + ld [wJumptableIndex], a + ld hl, wcd24 + set 3, [hl] + call PlayClickSFX + ret + +.asm_11c708 + ld a, [hl] + cp $3 + jr c, .asm_11c711 + sub $3 + jr .asm_11c76e +.asm_11c711 + ld a, [wcd26] + sub $3 + ret c + ld [wcd26], a + jr .asm_11c6c4 +.asm_11c71c + ld hl, wcd28 + ld a, [wcd26] + add $c + ret c + cp [hl] + ret nc + ld a, [wcd26] + add $3 + ld [wcd26], a + jr .asm_11c6c4 +.asm_11c731 + ld a, [wcd28] + ld b, a + ld a, [wcd26] + add [hl] + add $3 + cp b + ret nc + ld a, [hl] + cp $9 + jr nc, .asm_11c71c + add $3 + jr .asm_11c76e +.asm_11c746 + ld a, [hl] + and a + ret z + cp $3 + ret z + cp $6 + ret z + cp $9 + ret z + dec a + jr .asm_11c76e +.asm_11c755 + ld a, [wcd28] + ld b, a + ld a, [wcd26] + add [hl] + inc a + cp b + ret nc + ld a, [hl] + cp $2 + ret z + cp $5 + ret z + cp $8 + ret z + cp $b + ret z + inc a +.asm_11c76e + ld [hl], a + ret + +Function11c770: + xor a + ld [wMobileCommsJumptableIndex], a + ld [wcd26], a + ld [wcd27], a + ld a, [wcd2b] + and a + jr nz, .cd2b_is_nonzero + ld a, [wcd21] + and a + jr z, .cd21_is_zero + ; load from data array + dec a + sla a + ld hl, MobileEZChatData_WordAndPageCounts + ld c, a + ld b, 0 + add hl, bc + ld a, [hli] + ld [wcd28], a + ld a, [hl] +.load + ld [wcd29], a + ret + +.cd21_is_zero + ; compute from [wc7d2] + ld a, [wc7d2] + ld [wcd28], a +.div_12 + ld c, 12 + call SimpleDivide + and a + jr nz, .no_need_to_floor + dec b +.no_need_to_floor + ld a, b + jr .load + +.cd2b_is_nonzero + ; compute from [wc6a8 + 2 * [wcd22]] + ld hl, wc6a8 + ld a, [wcd22] + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [hl] + ld [wcd28], a + jr .div_12 + +Function11c7bc: + ld bc, Unknown_11c854 + ld a, [wcd2b] + and a + jr nz, .asm_11c814 + ld a, [wcd21] + ld d, a + and a + jr z, .asm_11c7e9 + ld a, [wcd26] + ld e, a +.asm_11c7d0 + ld a, [bc] + ld l, a + inc bc + ld a, [bc] + ld h, a + inc bc + and l + cp $ff + ret z + push bc + push de + call Function11c05d + pop de + pop bc + inc e + ld a, [wcd28] + cp e + jr nz, .asm_11c7d0 + ret + +.asm_11c7e9 + ld hl, wListPointer + ld a, [wcd26] + ld e, a + add hl, de +.asm_11c7f1 + push de + ld a, [hli] + ld e, a + ld d, 0 + push hl + ld a, [bc] + ld l, a + inc bc + ld a, [bc] + ld h, a + inc bc + and l + cp $ff + jr z, .asm_11c811 + push bc + call Function11c05d + pop bc + pop hl + pop de + inc e + ld a, [wcd28] + cp e + jr nz, .asm_11c7f1 + ret + +.asm_11c811 + pop hl + pop de + ret + +.asm_11c814 + ld hl, wc648 + ld a, [wcd22] + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + push de + pop hl + ld a, [wcd26] + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [wcd26] + ld e, a +.asm_11c831 + push de + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + push hl + ld a, [bc] + ld l, a + inc bc + ld a, [bc] + ld h, a + inc bc + and l + cp $ff + jr z, .asm_11c851 + push bc + call Function11c05d + pop bc + pop hl + pop de + inc e + ld a, [wcd28] + cp e + jr nz, .asm_11c831 + ret + +.asm_11c851 + pop hl + pop de + ret + +Unknown_11c854: + dwcoord 2, 8 + dwcoord 8, 8 + dwcoord 14, 8 + dwcoord 2, 10 + dwcoord 8, 10 + dwcoord 14, 10 + dwcoord 2, 12 + dwcoord 8, 12 + dwcoord 14, 12 + dwcoord 2, 14 + dwcoord 8, 14 + dwcoord 14, 14 + dw -1 + +Function11c86e: + ld a, [wcd26] + and a + jr z, .asm_11c88a + hlcoord 2, 17 + ld de, MobileString_Prev + call PlaceString + hlcoord 6, 17 + ld c, $3 + xor a +.asm_11c883 + ld [hli], a + inc a + dec c + jr nz, .asm_11c883 + jr .asm_11c895 +.asm_11c88a + hlcoord 2, 17 + ld c, $7 + ld a, $7f +.asm_11c891 + ld [hli], a + dec c + jr nz, .asm_11c891 +.asm_11c895 + ld hl, wcd28 + ld a, [wcd26] + add $c + jr c, .asm_11c8b7 + cp [hl] + jr nc, .asm_11c8b7 + hlcoord 16, 17 + ld de, MobileString_Next + call PlaceString + hlcoord 11, 17 + ld a, $3 + ld c, a +.asm_11c8b1 + ld [hli], a + inc a + dec c + jr nz, .asm_11c8b1 + ret + +.asm_11c8b7 + hlcoord 17, 16 + ld a, $7f + ld [hl], a + hlcoord 11, 17 + ld c, $7 +.asm_11c8c2 + ld [hli], a + dec c + jr nz, .asm_11c8c2 + ret + +BCD2String: ; unreferenced + inc a + push af + and $f + ldh [hDividend], a + pop af + and $f0 + swap a + ldh [hDividend + 1], a + xor a + ldh [hDividend + 2], a + push hl + farcall Function11a80c + pop hl + ld a, [wcd63] + add "0" + ld [hli], a + ld a, [wcd62] + add "0" + ld [hli], a + ret + +MobileString_Page: ; unreferenced + db "ぺージ@" + +MobileString_Prev: + db "まえ@" + +MobileString_Next: + db "つぎ@" + +Function11c8f6: + ld a, [wcd20] + call Function11c95d + push hl + ld a, [wcd2b] + and a + jr nz, .asm_11c938 + ld a, [wcd21] + ld d, a + and a + jr z, .asm_11c927 + ld hl, wcd26 + ld a, [wMobileCommsJumptableIndex] + add [hl] +.asm_11c911 + ld e, a +.asm_11c912 + pop hl + push de + call Function11c05d + pop de + ld a, [wcd20] + ld c, a + ld b, 0 + ld hl, wcd36 + add hl, bc + add hl, bc + ld [hl], e + inc hl + ld [hl], d + ret + +.asm_11c927 + ld hl, wcd26 + ld a, [wMobileCommsJumptableIndex] + add [hl] + ld c, a + ld b, 0 + ld hl, wListPointer + add hl, bc + ld a, [hl] + jr .asm_11c911 +.asm_11c938 + ld hl, wc648 + ld a, [wcd22] + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + push de + pop hl + ld a, [wcd26] + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [wMobileCommsJumptableIndex] + ld e, a + add hl, de + add hl, de + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + jr .asm_11c912 + +Function11c95d: + sla a + ld c, a + ld b, 0 + ld hl, Unknown_11c986 + add hl, bc + ld a, [hli] + ld c, a + ld a, [hl] + ld b, a + push bc + push bc + pop hl + ld a, $5 + ld c, a + ld a, $7f +.asm_11c972 + ld [hli], a + dec c + jr nz, .asm_11c972 + dec hl + ld bc, -20 + add hl, bc + ld a, $5 + ld c, a + ld a, $7f +.asm_11c980 + ld [hld], a + dec c + jr nz, .asm_11c980 + pop hl + ret + +Unknown_11c986: + dwcoord 1, 2 + dwcoord 7, 2 + dwcoord 13, 2 + dwcoord 1, 4 + dwcoord 7, 4 + dwcoord 13, 4 + +Function11c992: + ld a, $8 + hlcoord 2, 7 +.asm_11c997 + push af + ld a, $7f + push hl + ld bc, $11 + call ByteFill + pop hl + ld bc, $14 + add hl, bc + pop af + dec a + jr nz, .asm_11c997 + ret + +Function11c9ab: + ld a, $7 + hlcoord 0, 6, wAttrmap + ld bc, $c8 + call ByteFill + farcall ReloadMapPart + ret + +Function11c9bd: + ld de, String_11ca38 + call Function11ca7f + +Function11c9c3: + ld hl, wcd2a + ld de, hJoypadPressed + ld a, [de] + and $1 + jr nz, .asm_11c9de + ld a, [de] + and $2 + jr nz, .asm_11c9e9 + ld a, [de] + and $40 + jr nz, .asm_11c9f7 + ld a, [de] + and $80 + jr nz, .asm_11c9fc + ret + +.asm_11c9de + ld a, [hl] + and a + jr nz, .asm_11c9e9 + call Function11ca5e + xor a + ld [wcd20], a +.asm_11c9e9 + ld hl, wcd24 + set 4, [hl] + ld a, $4 + ld [wJumptableIndex], a + call PlayClickSFX + ret + +.asm_11c9f7 + ld a, [hl] + and a + ret z + dec [hl] + ret + +.asm_11c9fc + ld a, [hl] + and a + ret nz + inc [hl] + ret + +Function11ca01: + hlcoord 14, 7, wAttrmap + ld de, $14 + ld a, $5 + ld c, a +.asm_11ca0a + push hl + ld a, $6 + ld b, a + ld a, $7 +.asm_11ca10 + ld [hli], a + dec b + jr nz, .asm_11ca10 + pop hl + add hl, de + dec c + jr nz, .asm_11ca0a + +Function11ca19: + hlcoord 0, 12, wAttrmap + ld de, $14 + ld a, $6 + ld c, a +.asm_11ca22 + push hl + ld a, $14 + ld b, a + ld a, $7 +.asm_11ca28 + ld [hli], a + dec b + jr nz, .asm_11ca28 + pop hl + add hl, de + dec c + jr nz, .asm_11ca22 + farcall ReloadMapPart + ret + +String_11ca38: + db "とうろくちゅうあいさつ¯ぜんぶ" + next "けしても よろしいですか?@" + +String_11ca57: + db "はい" + next "いいえ@" + +Function11ca5e: + xor a +.loop + push af + call Function11ca6a + pop af + inc a + cp $6 + jr nz, .loop + ret + +Function11ca6a: + ld hl, wcd36 + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld [hl], b + inc hl + ld [hl], b + call Function11c95d + ld de, String_11c3bc + call PlaceString + ret + +Function11ca7f: + push de + ld de, Unknown_11cfc6 + call Function11cfce + ld de, Unknown_11cfca + call Function11cfce + hlcoord 1, 14 + pop de + call PlaceString + hlcoord 16, 8 + ld de, String_11ca57 + call PlaceString + call Function11ca01 + ld a, $1 + ld [wcd2a], a + ld hl, wcd24 + res 4, [hl] + call Function11cfb5 + ret + +Function11caad: + ld de, String_11cb1c + call Function11ca7f + +Function11cab3: + ld hl, wcd2a + ld de, hJoypadPressed + ld a, [de] + and $1 + jr nz, .asm_11cace + ld a, [de] + and $2 + jr nz, .asm_11caf9 + ld a, [de] + and $40 + jr nz, .asm_11cb12 + ld a, [de] + and $80 + jr nz, .asm_11cb17 + ret + +.asm_11cace + call PlayClickSFX + ld a, [hl] + and a + jr nz, .asm_11cafc + ld a, [wcd35] + and a + jr z, .asm_11caf3 + cp $ff + jr z, .asm_11caf3 + ld a, $ff + ld [wcd35], a + hlcoord 1, 14 + ld de, String_11cb31 + call PlaceString + ld a, $1 + ld [wcd2a], a + ret + +.asm_11caf3 + ld hl, wJumptableIndex + set 7, [hl] + ret + +.asm_11caf9 + call PlayClickSFX +.asm_11cafc + ld hl, wcd24 + set 4, [hl] + ld a, $4 + ld [wJumptableIndex], a + ld a, [wcd35] + cp $ff + ret nz + ld a, $1 + ld [wcd35], a + ret + +.asm_11cb12 + ld a, [hl] + and a + ret z + dec [hl] + ret + +.asm_11cb17 + ld a, [hl] + and a + ret nz + inc [hl] + ret + +String_11cb1c: + db "あいさつとうろく¯ちゅうし" + next "しますか?@" + +String_11cb31: + db "とうろくちゅうあいさつほぞん" + next "されませんよろしい ですか?@" + +Function11cb52: + ld hl, Unknown_11cc01 + ld a, [wMenuCursorY] +.asm_11cb58 + dec a + jr z, .asm_11cb5f + inc hl + inc hl + jr .asm_11cb58 +.asm_11cb5f + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + call Function11ca7f + +Function11cb66: + ld hl, wcd2a + ld de, hJoypadPressed + ld a, [de] + and $1 + jr nz, .asm_11cb81 + ld a, [de] + and $2 + jr nz, .asm_11cbd7 + ld a, [de] + and $40 + jr nz, .asm_11cbeb + ld a, [de] + and $80 + jr nz, .asm_11cbf0 + ret + +.asm_11cb81 + ld a, [hl] + and a + jr nz, .asm_11cbd4 + ld a, BANK(sEZChatMessages) + call OpenSRAM + ld hl, sEZChatMessages + ld a, [wMenuCursorY] + dec a + sla a + sla a + ld c, a + sla a + add c + ld c, a + ld b, 0 + add hl, bc + ld de, wcd36 + ld c, EASY_CHAT_MESSAGE_LENGTH +.asm_11cba2 + ld a, [de] + ld [hli], a + inc de + dec c + jr nz, .asm_11cba2 + call CloseSRAM + call PlayClickSFX + ld de, Unknown_11cfc6 + call Function11cfce + ld hl, Unknown_11cc7e + ld a, [wMenuCursorY] +.asm_11cbba + dec a + jr z, .asm_11cbc1 + inc hl + inc hl + jr .asm_11cbba +.asm_11cbc1 + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + hlcoord 1, 14 + call PlaceString + ld hl, wJumptableIndex + inc [hl] + inc hl + ld a, $10 + ld [hl], a + ret + +.asm_11cbd4 + call PlayClickSFX +.asm_11cbd7 + ld de, Unknown_11cfba + call Function11cfce + call Function11c38a + ld hl, wcd24 + set 4, [hl] + ld a, $4 + ld [wJumptableIndex], a + ret + +.asm_11cbeb + ld a, [hl] + and a + ret z + dec [hl] + ret + +.asm_11cbf0 + ld a, [hl] + and a + ret nz + inc [hl] + ret + +Function11cbf5: + call WaitSFX + ld hl, wcf64 + dec [hl] + ret nz + dec hl + set 7, [hl] + ret + +Unknown_11cc01: + dw String_11cc09 + dw String_11cc23 + dw String_11cc42 + dw String_11cc60 + +String_11cc09: + db "じこしょうかい は" + next "この あいさつで いいですか?@" + +String_11cc23: + db "たいせん はじまるとき は" + next "この あいさつで いいですか?@" + +String_11cc42: + db "たいせん かったとき は" + next "この あいさつで いいですか?@" + +String_11cc60: + db "たいせん まけたとき は" + next "この あいさつで いいですか?@" + +Unknown_11cc7e: + dw String_11cc86 + dw String_11cc9d + dw String_11ccb9 + dw String_11ccd4 + +String_11cc86: + db "じこしょうかい の" + next "あいさつ¯とうろくした!@" + +String_11cc9d: + db "たいせん はじまるとき の" + next "あいさつ¯とうろくした!@" + +String_11ccb9: + db "たいせん かったとき の" + next "あいさつ¯とうろくした!@" + +String_11ccd4: + db "たいせん まけたとき の" + next "あいさつ¯とうろくした!@" + +Function11ccef: + ld de, Unknown_11cfc6 + call Function11cfce + hlcoord 1, 14 + ld de, String_11cd10 + call PlaceString + call Function11ca19 + call Function11cfb5 + +Function11cd04: + ld de, hJoypadPressed + ld a, [de] + and a + ret z + ld a, $4 + ld [wJumptableIndex], a + ret + +String_11cd10: + db "なにか ことば¯いれてください@" + +Function11cd20: + call EZChat_ClearBottom12Rows + ld de, Unknown_11cfc6 + call Function11cfce + hlcoord 1, 14 + ld a, [wcd2b] + ld [wcd2c], a + and a + jr nz, .asm_11cd3a + ld de, String_11cdc7 + jr .asm_11cd3d +.asm_11cd3a + ld de, String_11cdd9 +.asm_11cd3d + call PlaceString + hlcoord 4, 8 + ld de, String_11cdf5 + call PlaceString + call Function11cdaa + ld hl, wcd24 + res 5, [hl] + call Function11cfb5 + +Function11cd54: + ld hl, wcd2c + ld de, hJoypadPressed + ld a, [de] + and A_BUTTON + jr nz, .asm_11cd6f + ld a, [de] + and B_BUTTON + jr nz, .asm_11cd73 + ld a, [de] + and D_UP + jr nz, .asm_11cd8b + ld a, [de] + and D_DOWN + jr nz, .asm_11cd94 + ret + +.asm_11cd6f + ld a, [hl] + ld [wcd2b], a +.asm_11cd73 + ld a, [wcd2b] + and a + jr nz, .asm_11cd7d + ld a, $6 + jr .asm_11cd7f + +.asm_11cd7d + ld a, $15 +.asm_11cd7f + ld [wJumptableIndex], a + ld hl, wcd24 + set 5, [hl] + call PlayClickSFX + ret + +.asm_11cd8b + ld a, [hl] + and a + ret z + dec [hl] + ld de, String_11cdc7 + jr .asm_11cd9b + +.asm_11cd94 + ld a, [hl] + and a + ret nz + inc [hl] + ld de, String_11cdd9 +.asm_11cd9b + push de + ld de, Unknown_11cfc6 + call Function11cfce + pop de + hlcoord 1, 14 + call PlaceString + ret + +Function11cdaa: + ld a, $2 + hlcoord 0, 6, wAttrmap + ld bc, 6 * SCREEN_WIDTH + call ByteFill + ld a, $7 + hlcoord 0, 12, wAttrmap + ld bc, 4 * SCREEN_WIDTH + call ByteFill + farcall ReloadMapPart + ret + +String_11cdc7: +; Words will be displayed by category + db "ことば¯しゅるいべつに" + next "えらべます@" + +String_11cdd9: +; Words will be displayed in alphabetical order + db "ことば¯アイウエオ の" + next "じゅんばんで ひょうじ します@" + +String_11cdf5: + db "しゅるいべつ モード" ; Category mode + next "アイウエオ  モード@" ; ABC mode + +Function11ce0b: + call EZChat_ClearBottom12Rows + hlcoord 1, 7 + ld de, String_11cf79 + call PlaceString + hlcoord 1, 17 + ld de, EZChatString_Stop_Mode_Cancel + call PlaceString + call Function11c618 + ld hl, wcd24 + res 2, [hl] + call Function11cfb5 + +Function11ce2b: + ld a, [wcd22] + sla a + sla a + ld c, a + ld b, 0 + ld hl, Unknown_11ceb9 + add hl, bc + + ld de, hJoypadPressed + ld a, [de] + and START + jr nz, .start + ld a, [de] + and SELECT + jr nz, .select + ld a, [de] + and A_BUTTON + jr nz, .a + ld a, [de] + and B_BUTTON + jr nz, .b + + ld de, hJoyLast + ld a, [de] + and D_UP + jr nz, .up + ld a, [de] + and D_DOWN + jr nz, .down + ld a, [de] + and D_LEFT + jr nz, .left + ld a, [de] + and D_RIGHT + jr nz, .right + + ret + +.a + ld a, [wcd22] + cp NUM_KANA + jr c, .place + sub NUM_KANA + jr z, .done + dec a + jr z, .mode + jr .b + +.start + ld hl, wcd24 + set 0, [hl] + ld a, $8 + ld [wcd20], a +.b + ld a, $4 + jr .load + +.select + ld a, [wcd2b] + xor $1 + ld [wcd2b], a + ld a, $6 + jr .load + +.place + ld a, $8 + jr .load + +.mode + ld a, $13 +.load + ld [wJumptableIndex], a + ld hl, wcd24 + set 2, [hl] + call PlayClickSFX + ret + +.done + ld a, [wcd20] + call Function11ca6a + call PlayClickSFX + ret + +.left + inc hl +.down + inc hl +.right + inc hl +.up + ld a, [hl] + cp $ff + ret z + ld [wcd22], a + ret + +Unknown_11ceb9: + ; up left down right + db $ff, $01 + db $05, $ff + db $ff, $02 + db $06, $00 + db $ff, $03 + db $07, $01 + db $ff, $04 + db $08, $02 + db $ff, $14 + db $09, $03 + db $00, $06 + db $0a, $ff + db $01, $07 + db $0b, $05 + db $02, $08 + db $0c, $06 + db $03, $09 + db $0d, $07 + db $04, $19 + db $0e, $08 + db $05, $0b + db $0f, $ff + db $06, $0c + db $10, $0a + db $07, $0d + db $11, $0b + db $08, $0e + db $12, $0c + db $09, $1e + db $13, $0d + db $0a, $10 + db $2d, $ff + db $0b, $11 + db $2d, $0f + db $0c, $12 + db $2d, $10 + db $0d, $13 + db $2d, $11 + db $0e, $26 + db $2d, $12 + db $ff, $15 + db $19, $04 + db $ff, $16 + db $1a, $14 + db $ff, $17 + db $1b, $15 + db $ff, $18 + db $1c, $16 + db $ff, $23 + db $1d, $17 + db $14, $1a + db $1e, $09 + db $15, $1b + db $1f, $19 + db $16, $1c + db $20, $1a + db $17, $1d + db $21, $1b + db $18, $2b + db $22, $1c + db $19, $1f + db $26, $0e + db $1a, $20 + db $27, $1e + db $1b, $21 + db $28, $1f + db $1c, $22 + db $29, $20 + db $1d, $2c + db $2a, $21 + db $ff, $24 + db $2b, $18 + db $ff, $25 + db $2b, $23 + db $ff, $ff + db $2b, $24 + db $1e, $27 + db $2e, $13 + db $1f, $28 + db $2e, $26 + db $20, $29 + db $2e, $27 + db $21, $2a + db $2e, $28 + db $22, $ff + db $2e, $29 + db $23, $ff + db $2c, $1d + db $2b, $ff + db $2f, $22 + db $0f, $2e + db $ff, $ff + db $26, $2f + db $ff, $2d + db $2c, $ff + db $ff, $2e + +String_11cf79: +; Hiragana table + db "あいうえお なにぬねの や ゆ よ" + next "かきくけこ はひふへほ わ" + next "さしすせそ まみむめも そのた" + next "たちつてと らりるれろ" + db "@" + +Function11cfb5: + ld hl, wJumptableIndex + inc [hl] + ret + +Unknown_11cfba: + db 0, 0 ; start coords + db 20, 6 ; end coords + +Unknown_11cfbe: + db 0, 14 ; start coords + db 20, 4 ; end coords + +Unknown_11cfc2: + db 0, 6 ; start coords + db 20, 10 ; end coords + +Unknown_11cfc6: + db 0, 12 ; start coords + db 20, 6 ; end coords + +Unknown_11cfca: + db 14, 7 ; start coords + db 6, 5 ; end coords + +Function11cfce: + hlcoord 0, 0 + ld bc, SCREEN_WIDTH + ld a, [de] + inc de + push af + ld a, [de] + inc de + and a +.add_n_times + jr z, .done_add_n_times + add hl, bc + dec a + jr .add_n_times +.done_add_n_times + pop af + ld c, a + ld b, 0 + add hl, bc + push hl + ld a, $79 + ld [hli], a + ld a, [de] + inc de + dec a + dec a + jr z, .skip_fill + ld c, a + ld a, $7a +.fill_loop + ld [hli], a + dec c + jr nz, .fill_loop +.skip_fill + ld a, $7b + ld [hl], a + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + ld a, [de] + dec de + dec a + dec a + jr z, .skip_section + ld b, a +.loop + push hl + ld a, $7c + ld [hli], a + ld a, [de] + dec a + dec a + jr z, .skip_row + ld c, a + ld a, $7f +.row_loop + ld [hli], a + dec c + jr nz, .row_loop +.skip_row + ld a, $7c + ld [hl], a + pop hl + push bc + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .loop +.skip_section + ld a, $7d + ld [hli], a + ld a, [de] + dec a + dec a + jr z, .skip_remainder + ld c, a + ld a, $7a +.final_loop + ld [hli], a + dec c + jr nz, .final_loop +.skip_remainder + ld a, $7e + ld [hl], a + ret + +Function11d035: + hlcoord 0, 0 + ld bc, SCREEN_WIDTH + ld a, [de] + inc de + push af + ld a, [de] + inc de + and a +.add_n_times + jr z, .done_add_n_times + add hl, bc + dec a + jr .add_n_times +.done_add_n_times + pop af + ld c, a + ld b, 0 + add hl, bc + push hl + ld a, $79 + ld [hl], a + pop hl + push hl + ld a, [de] + dec a + inc de + ld c, a + add hl, bc + ld a, $7b + ld [hl], a + call .AddNMinusOneTimes + ld a, $7e + ld [hl], a + pop hl + push hl + call .AddNMinusOneTimes + ld a, $7d + ld [hl], a + pop hl + push hl + inc hl + push hl + call .AddNMinusOneTimes + pop bc + dec de + ld a, [de] + cp $2 + jr z, .skip + dec a + dec a +.loop + push af + ld a, $7a + ld [hli], a + ld [bc], a + inc bc + pop af + dec a + jr nz, .loop +.skip + pop hl + ld bc, $14 + add hl, bc + push hl + ld a, [de] + dec a + ld c, a + ld b, 0 + add hl, bc + pop bc + inc de + ld a, [de] + cp $2 + ret z + push bc + dec a + dec a + ld c, a + ld b, a + ld de, $14 +.loop2 + ld a, $7c + ld [hl], a + add hl, de + dec c + jr nz, .loop2 + pop hl +.loop3 + ld a, $7c + ld [hl], a + add hl, de + dec b + jr nz, .loop3 + ret + +.AddNMinusOneTimes: + ld a, [de] + dec a + ld bc, SCREEN_WIDTH +.add_n_minus_one_times + add hl, bc + dec a + jr nz, .add_n_minus_one_times + ret + +AnimateEZChatCursor: + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + jumptable .Jumptable, hl + +.Jumptable: + dw .zero + dw .one + dw .two + dw .three + dw .four + dw .five + dw .six + dw .seven + dw .eight + dw .nine + dw .ten + +.zero + ld a, [wcd20] + sla a + ld hl, .Coords_Zero + ld e, $1 + jr .load + +.one + ld a, [wcd21] + sla a + ld hl, .Coords_One + ld e, $2 + jr .load + +.two + ld hl, .FramesetsIDs_Two + ld a, [wcd22] + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + call ReinitSpriteAnimFrame + + ld a, [wcd22] + sla a + ld hl, .Coords_Two + ld e, $4 + jr .load + +.three + ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_2 + call ReinitSpriteAnimFrame + ld a, [wMobileCommsJumptableIndex] + sla a + ld hl, .Coords_Three + ld e, $8 +.load + push de + ld e, a + ld d, 0 + add hl, de + push hl + pop de + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld a, [de] + inc de + ld [hli], a + ld a, [de] + ld [hl], a + pop de + ld a, e + call .UpdateObjectFlags + ret + +.four + ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_2 + call ReinitSpriteAnimFrame + ld a, [wcd2a] + sla a + ld hl, .Coords_Four + ld e, $10 + jr .load + +.five + ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_2 + call ReinitSpriteAnimFrame + ld a, [wcd2c] + sla a + ld hl, .Coords_Five + ld e, $20 + jr .load + +.six + ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_5 + call ReinitSpriteAnimFrame + ; X = [wcd4a] * 8 + 24 + ld a, [wcd4a] + sla a + sla a + sla a + add $18 + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld [hli], a + ; Y = 48 + ld a, $30 + ld [hl], a + + ld a, $1 + ld e, a + call .UpdateObjectFlags + ret + +.seven + ld a, [wEZChatCursorYCoord] + cp $4 + jr z, .cursor0 + ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 + jr .got_frameset + +.cursor0 + ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 +.got_frameset + call ReinitSpriteAnimFrame + ld a, [wEZChatCursorYCoord] + cp $4 + jr z, .asm_11d1b1 + ; X = [wEZChatCursorXCoord] * 8 + 32 + ld a, [wEZChatCursorXCoord] + sla a + sla a + sla a + add $20 + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld [hli], a + ; Y = [wEZChatCursorYCoord] * 16 + 72 + ld a, [wEZChatCursorYCoord] + sla a + sla a + sla a + sla a + add $48 + ld [hl], a + ld a, $2 + ld e, a + call .UpdateObjectFlags + ret + +.asm_11d1b1 + ; X = [wEZChatCursorXCoord] * 40 + 24 + ld a, [wEZChatCursorXCoord] + sla a + sla a + sla a + ld e, a + sla a + sla a + add e + add $18 + ld hl, SPRITEANIMSTRUCT_XCOORD + add hl, bc + ld [hli], a + ; Y = 138 + ld a, $8a + ld [hl], a + ld a, $2 + ld e, a + call .UpdateObjectFlags + ret + +.nine + ld d, -13 * 8 + ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_7 + jr .eight_nine_load + +.eight + ld d, 2 * 8 + ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_6 +.eight_nine_load + push de + call ReinitSpriteAnimFrame + ld a, [wcd4a] + sla a + sla a + sla a + ld e, a + sla a + add e + add 8 * 8 + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld [hld], a + pop af + ld [hl], a + ld a, $4 + ld e, a + call .UpdateObjectFlags + ret + +.ten + ld a, SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 + call ReinitSpriteAnimFrame + ld a, $8 + ld e, a + call .UpdateObjectFlags + ret + +.Coords_Zero: + dbpixel 1, 3, 5, 2 + dbpixel 7, 3, 5, 2 + dbpixel 13, 3, 5, 2 + dbpixel 1, 5, 5, 2 + dbpixel 7, 5, 5, 2 + dbpixel 13, 5, 5, 2 + dbpixel 1, 17, 5, 2 + dbpixel 7, 17, 5, 2 + dbpixel 13, 17, 5, 2 + +.Coords_One: + dbpixel 1, 8, 5, 2 + dbpixel 7, 8, 5, 2 + dbpixel 13, 8, 5, 2 + dbpixel 1, 10, 5, 2 + dbpixel 7, 10, 5, 2 + dbpixel 13, 10, 5, 2 + dbpixel 1, 12, 5, 2 + dbpixel 7, 12, 5, 2 + dbpixel 13, 12, 5, 2 + dbpixel 1, 14, 5, 2 + dbpixel 7, 14, 5, 2 + dbpixel 13, 14, 5, 2 + dbpixel 1, 16, 5, 2 + dbpixel 7, 16, 5, 2 + dbpixel 13, 16, 5, 2 + dbpixel 1, 18, 5, 2 + dbpixel 7, 18, 5, 2 + dbpixel 13, 18, 5, 2 + +.Coords_Two: + dbpixel 2, 9 ; 00 + dbpixel 3, 9 ; 01 + dbpixel 4, 9 ; 02 + dbpixel 5, 9 ; 03 + dbpixel 6, 9 ; 04 + dbpixel 2, 11 ; 05 + dbpixel 3, 11 ; 06 + dbpixel 4, 11 ; 07 + dbpixel 5, 11 ; 08 + dbpixel 6, 11 ; 09 + dbpixel 2, 13 ; 0a + dbpixel 3, 13 ; 0b + dbpixel 4, 13 ; 0c + dbpixel 5, 13 ; 0d + dbpixel 6, 13 ; 0e + dbpixel 2, 15 ; 0f + dbpixel 3, 15 ; 10 + dbpixel 4, 15 ; 11 + dbpixel 5, 15 ; 12 + dbpixel 6, 15 ; 13 + dbpixel 8, 9 ; 14 + dbpixel 9, 9 ; 15 + dbpixel 10, 9 ; 16 + dbpixel 11, 9 ; 17 + dbpixel 12, 9 ; 18 + dbpixel 8, 11 ; 19 + dbpixel 9, 11 ; 1a + dbpixel 10, 11 ; 1b + dbpixel 11, 11 ; 1c + dbpixel 12, 11 ; 1d + dbpixel 8, 13 ; 1e + dbpixel 9, 13 ; 1f + dbpixel 10, 13 ; 20 + dbpixel 11, 13 ; 21 + dbpixel 12, 13 ; 22 + dbpixel 14, 9 ; 23 + dbpixel 16, 9 ; 24 + dbpixel 18, 9 ; 25 + dbpixel 8, 15 ; 26 + dbpixel 9, 15 ; 27 + dbpixel 10, 15 ; 28 + dbpixel 11, 15 ; 29 + dbpixel 12, 15 ; 2a + dbpixel 14, 11 ; 2b + dbpixel 14, 13 ; 2c + dbpixel 1, 18, 5, 2 ; 2d + dbpixel 7, 18, 5, 2 ; 2e + dbpixel 13, 18, 5, 2 ; 2f + +.Coords_Three: + dbpixel 2, 10 + dbpixel 8, 10 + dbpixel 14, 10 + dbpixel 2, 12 + dbpixel 8, 12 + dbpixel 14, 12 + dbpixel 2, 14 + dbpixel 8, 14 + dbpixel 14, 14 + dbpixel 2, 16 + dbpixel 8, 16 + dbpixel 14, 16 + +.Coords_Four: + dbpixel 16, 10 + dbpixel 16, 12 + +.Coords_Five: + dbpixel 4, 10 + dbpixel 4, 12 + +.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 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 03 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 04 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 05 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 06 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 07 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 08 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 09 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 0a + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 0b + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 0c + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 0d + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 0e + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 0f + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 10 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 11 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 12 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 13 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 14 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 15 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 16 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 17 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 18 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 19 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 1a + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 1b + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 1c + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 1d + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 1e + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 1f + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 20 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 21 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 22 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 23 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 24 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 25 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 26 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 27 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 28 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 29 + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 2a + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_3 ; 2b + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_4 ; 2c + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 ; 2d + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 ; 2e + db SPRITE_ANIM_FRAMESET_EZCHAT_CURSOR_1 ; 2f + +.UpdateObjectFlags: + ld hl, wcd24 + and [hl] + jr nz, .update_y_offset + ld a, e + ld hl, wcd23 + and [hl] + jr z, .reset_y_offset + ld hl, SPRITEANIMSTRUCT_VAR3 + add hl, bc + ld a, [hl] + and a + jr z, .flip_bit_0 + dec [hl] + ret + +.flip_bit_0 + ld a, $0 + ld [hld], a + ld a, $1 + xor [hl] + ld [hl], a + and a + jr nz, .update_y_offset +.reset_y_offset + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + xor a + ld [hl], a + ret + +.update_y_offset + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, $b0 + sub [hl] + ld hl, SPRITEANIMSTRUCT_YOFFSET + add hl, bc + ld [hl], a + ret + +Function11d323: + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, Palette_11d33a + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + pop af + ldh [rSVBK], a + ret + +Palette_11d33a: + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 31, 16, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 23, 17, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + +EZChat_GetSeenPokemonByKana: + ldh a, [rSVBK] + push af + ld hl, wc648 + ld a, LOW(w5_d800) + ld [wcd2d], a + ld [hli], a + ld a, HIGH(w5_d800) + ld [wcd2e], a + ld [hl], a + + ld a, LOW(EZChat_SortedPokemon) + ld [wcd2f], a + ld a, HIGH(EZChat_SortedPokemon) + ld [wcd30], a + + ld a, LOW(wc6a8) + ld [wcd31], a + ld a, HIGH(wc6a8) + ld [wcd32], a + + ld a, LOW(wc64a) + ld [wcd33], a + ld a, HIGH(wc64a) + ld [wcd34], a + + ld hl, EZChat_SortedWords + ld a, (EZChat_SortedWords.End - EZChat_SortedWords) / 4 + +.MasterLoop: + push af +; read row +; offset + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a +; size + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a +; save the pointer to the next row + push hl +; add de to w3_d000 + ld hl, w3_d000 + add hl, de +; recover de from wcd2d (default: w5_d800) + ld a, [wcd2d] + ld e, a + ld a, [wcd2e] + ld d, a +; save bc for later + push bc + +.loop1 +; copy 2*bc bytes from 3:hl to 5:de + ld a, $3 + ldh [rSVBK], a + ld a, [hli] + push af + ld a, $5 + ldh [rSVBK], a + pop af + ld [de], a + inc de + + ld a, $3 + ldh [rSVBK], a + ld a, [hli] + push af + ld a, $5 + ldh [rSVBK], a + pop af + ld [de], a + inc de + + dec bc + ld a, c + or b + jr nz, .loop1 + +; recover the pointer from wcd2f (default: EZChat_SortedPokemon) + ld a, [wcd2f] + ld l, a + ld a, [wcd30] + ld h, a +; copy the pointer from [hl] to bc + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a +; store the pointer to the next pointer back in wcd2f + ld a, l + ld [wcd2f], a + ld a, h + ld [wcd30], a +; push pop that pointer to hl + push bc + pop hl + ld c, $0 +.loop2 +; Have you seen this Pokemon? + ld a, [hl] + cp $ff + jr z, .done + call .CheckSeenMon + jr nz, .next +; If not, skip it. + inc hl + jr .loop2 + +.next +; If so, append it to the list at 5:de, and increase the count. + ld a, [hli] + ld [de], a + inc de + xor a + ld [de], a + inc de + inc c + jr .loop2 + +.done +; Remember the original value of bc from the table? +; Well, the stack remembers it, and it's popping it to hl. + pop hl +; Add the number of seen Pokemon from the list. + ld b, $0 + add hl, bc +; Push pop to bc. + push hl + pop bc +; Load the pointer from [wcd31] (default: wc6a8) + ld a, [wcd31] + ld l, a + ld a, [wcd32] + ld h, a +; Save the quantity from bc to [hl] + ld a, c + ld [hli], a + ld a, b + ld [hli], a +; Save the new value of hl to [wcd31] + ld a, l + ld [wcd31], a + ld a, h + ld [wcd32], a +; Recover the pointer from [wcd33] (default: wc64a) + ld a, [wcd33] + ld l, a + ld a, [wcd34] + ld h, a +; Save the current value of de there + ld a, e + ld [wcd2d], a + ld [hli], a + ld a, d + ld [wcd2e], a +; Save the new value of hl back to [wcd33] + ld [hli], a + ld a, l + ld [wcd33], a + ld a, h + ld [wcd34], a +; Next row + pop hl + pop af + dec a + jr z, .ExitMasterLoop + jp .MasterLoop + +.ExitMasterLoop: + pop af + ldh [rSVBK], a + ret + +.CheckSeenMon: + push hl + push bc + push de + ld hl, rSVBK + ld e, $1 + ld [hl], e + call CheckSeenMon + ld hl, rSVBK + ld e, $5 + ld [hl], e + pop de + pop bc + pop hl + ret + +EZChat_GetCategoryWordsByKana: + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a + + ; load pointers + ld hl, MobileEZChatCategoryPointers + ld bc, MobileEZChatData_WordAndPageCounts + + ; init WRAM registers + xor a + ld [wcd2d], a + inc a + ld [wcd2e], a + + ; enter the first loop + ld a, 14 +.loop1 + push af + + ; load the pointer to the category + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + push hl + + ; skip to the attributes + ld hl, NAME_LENGTH_JAPANESE - 1 + add hl, de + + ; get the number of words in the category + ld a, [bc] ; number of entries to copy + inc bc + inc bc + push bc + +.loop2 + push af + push hl + + ; load offset at [hl] + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + + ; add to w3_d000 + ld hl, w3_d000 + add hl, de + + ; copy from wcd2d and increment [wcd2d] in place + ld a, [wcd2d] + ld [hli], a + inc a + ld [wcd2d], a + + ; copy from wcd2e + ld a, [wcd2e] + ld [hl], a + + ; next entry + pop hl + ld de, 8 + add hl, de + pop af + dec a + jr nz, .loop2 + + ; reset and go to next category + ld hl, wcd2d + xor a + ld [hli], a + inc [hl] + pop bc + pop hl + pop af + dec a + jr nz, .loop1 + pop af + ldh [rSVBK], a + ret + +INCLUDE "data/pokemon/ezchat_order.asm" + +SelectStartGFX: +INCBIN "gfx/mobile/select_start.2bpp" + +EZChatSlowpokeLZ: +INCBIN "gfx/pokedex/slowpoke.2bpp.lz" + +MobileEZChatCategoryNames: +; entries correspond to EZCHAT_* constants + db "ポケモン@@" ; 00 + db "タイプ@@@" ; 01 + db "あいさつ@@" ; 02 + db "ひと@@@@" ; 03 + db "バトル@@@" ; 04 + db "こえ@@@@" ; 05 + db "かいわ@@@" ; 06 + db "きもち@@@" ; 07 + db "じょうたい@" ; 08 + db "せいかつ@@" ; 09 + db "しゅみ@@@" ; 0a + db "こうどう@@" ; 0b + db "じかん@@@" ; 0c + db "むすび@@@" ; 0d + db "あれこれ@@" ; 0e + +MobileEZChatCategoryPointers: +; entries correspond to EZCHAT_* constants + dw .Types ; 01 + dw .Greetings ; 02 + dw .People ; 03 + dw .Battle ; 04 + dw .Exclamations ; 05 + dw .Conversation ; 06 + dw .Feelings ; 07 + dw .Conditions ; 08 + dw .Life ; 09 + dw .Hobbies ; 0a + dw .Actions ; 0b + dw .Time ; 0c + dw .Farewells ; 0d + dw .ThisAndThat ; 0e + +.Types: + db "あく@@@", $26, $0, $0 + db "いわ@@@", $aa, $0, $0 + db "エスパー@", $da, $0, $0 + db "かくとう@", $4e, $1, $0 + db "くさ@@@", $ba, $1, $0 + db "ゴースト@", $e4, $1, $0 + db "こおり@@", $e6, $1, $0 + db "じめん@@", $68, $2, $0 + db "タイプ@@", $e8, $2, $0 + db "でんき@@", $8e, $3, $0 + db "どく@@@", $ae, $3, $0 + db "ドラゴン@", $bc, $3, $0 + db "ノーマル@", $22, $4, $0 + db "はがね@@", $36, $4, $0 + db "ひこう@@", $5e, $4, $0 + db "ほのお@@", $b2, $4, $0 + db "みず@@@", $f4, $4, $0 + db "むし@@@", $12, $5, $0 + +.Greetings: + db "ありがと@", $58, $0, $0 + db "ありがとう", $5a, $0, $0 + db "いくぜ!@", $80, $0, $0 + db "いくよ!@", $82, $0, $0 + db "いくわよ!", $84, $0, $0 + db "いやー@@", $a6, $0, $0 + db "おっす@@", $a, $1, $0 + db "おはつです", $22, $1, $0 + db "おめでとう", $2a, $1, $0 + db "ごめん@@", $f8, $1, $0 + db "ごめんよ@", $fa, $1, $0 + db "こらっ@@", $fc, $1, $0 + db "こんちは!", $a, $2, $0 + db "こんにちは", $10, $2, $0 + db "さようなら", $28, $2, $0 + db "サンキュー", $2e, $2, $0 + db "さんじょう", $30, $2, $0 + db "しっけい@", $48, $2, $0 + db "しつれい@", $4c, $2, $0 + db "じゃーね@", $6c, $2, $0 + db "すいません", $8c, $2, $0 + db "それじゃ@", $ca, $2, $0 + db "どうも@@", $a6, $3, $0 + db "なんじゃ@", $ee, $3, $0 + db "ハーイ@@", $2c, $4, $0 + db "はいはい@", $32, $4, $0 + db "バイバイ@", $34, $4, $0 + db "へイ@@@", $8a, $4, $0 + db "またね@@", $de, $4, $0 + db "もしもし@", $32, $5, $0 + db "やあ@@@", $3e, $5, $0 + db "やっほー@", $4e, $5, $0 + db "よう@@@", $62, $5, $0 + db "ようこそ@", $64, $5, $0 + db "よろしく@", $80, $5, $0 + db "らっしゃい", $94, $5, $0 + +.People: + db "あいて@@", $1c, $0, $0 + db "あたし@@", $36, $0, $0 + db "あなた@@", $40, $0, $0 + db "あなたが@", $42, $0, $0 + db "あなたに@", $44, $0, $0 + db "あなたの@", $46, $0, $0 + db "あなたは@", $48, $0, $0 + db "あなたを@", $4a, $0, $0 + db "おかあさん", $e8, $0, $0 + db "おじいさん", $fc, $0, $0 + db "おじさん@", $2, $1, $0 + db "おとうさん", $e, $1, $0 + db "おとこのこ", $10, $1, $0 + db "おとな@@", $14, $1, $0 + db "おにいさん", $16, $1, $0 + db "おねえさん", $18, $1, $0 + db "おばあさん", $1c, $1, $0 + db "おばさん@", $20, $1, $0 + db "おれさま@", $34, $1, $0 + db "おんなのこ", $3a, $1, $0 + db "ガール@@", $40, $1, $0 + db "かぞく@@", $52, $1, $0 + db "かのじょ@", $72, $1, $0 + db "かれ@@@", $7c, $1, $0 + db "きみ@@@", $9a, $1, $0 + db "きみが@@", $9c, $1, $0 + db "きみに@@", $9e, $1, $0 + db "きみの@@", $a0, $1, $0 + db "きみは@@", $a2, $1, $0 + db "きみを@@", $a4, $1, $0 + db "ギャル@@", $ae, $1, $0 + db "きょうだい", $b2, $1, $0 + db "こども@@", $f0, $1, $0 + db "じぶん@@", $54, $2, $0 + db "じぶんが@", $56, $2, $0 + db "じぶんに@", $58, $2, $0 + db "じぶんの@", $5a, $2, $0 + db "じぶんは@", $5c, $2, $0 + db "じぶんを@", $5e, $2, $0 + db "だれ@@@", $18, $3, $0 + db "だれか@@", $1a, $3, $0 + db "だれが@@", $1c, $3, $0 + db "だれに@@", $1e, $3, $0 + db "だれの@@", $20, $3, $0 + db "だれも@@", $22, $3, $0 + db "だれを@@", $24, $3, $0 + db "ちゃん@@", $38, $3, $0 + db "ともだち@", $b8, $3, $0 + db "なかま@@", $d4, $3, $0 + db "ひと@@@", $62, $4, $0 + db "ボーイ@@", $98, $4, $0 + db "ボク@@@", $a0, $4, $0 + db "ボクが@@", $a2, $4, $0 + db "ボクに@@", $a4, $4, $0 + db "ボクの@@", $a6, $4, $0 + db "ボクは@@", $a8, $4, $0 + db "ボクを@@", $aa, $4, $0 + db "みんな@@", $4, $5, $0 + db "みんなが@", $6, $5, $0 + db "みんなに@", $8, $5, $0 + db "みんなの@", $a, $5, $0 + db "みんなは@", $c, $5, $0 + db "ライバル@", $8a, $5, $0 + db "わたし@@", $c2, $5, $0 + db "わたしが@", $c4, $5, $0 + db "わたしに@", $c6, $5, $0 + db "わたしの@", $c8, $5, $0 + db "わたしは@", $ca, $5, $0 + db "わたしを@", $cc, $5, $0 + +.Battle: + db "あいしょう", $18, $0, $0 + db "いけ!@@", $88, $0, $0 + db "いちばん@", $96, $0, $0 + db "かくご@@", $4c, $1, $0 + db "かたせて@", $54, $1, $0 + db "かち@@@", $56, $1, $0 + db "かつ@@@", $58, $1, $0 + db "かった@@", $60, $1, $0 + db "かったら@", $62, $1, $0 + db "かって@@", $64, $1, $0 + db "かてない@", $66, $1, $0 + db "かてる@@", $68, $1, $0 + db "かなわない", $70, $1, $0 + db "きあい@@", $84, $1, $0 + db "きめた@@", $a8, $1, $0 + db "きりふだ@", $b6, $1, $0 + db "くらえ@@", $c2, $1, $0 + db "こい!@@", $da, $1, $0 + db "こうげき@", $e0, $1, $0 + db "こうさん@", $e2, $1, $0 + db "こんじょう", $8, $2, $0 + db "さいのう@", $16, $2, $0 + db "さくせん@", $1a, $2, $0 + db "さばき@@", $22, $2, $0 + db "しょうぶ@", $7e, $2, $0 + db "しょうり@", $80, $2, $0 + db "せめ@@@", $b4, $2, $0 + db "センス@@", $b6, $2, $0 + db "たいせん@", $e6, $2, $0 + db "たたかい@", $f6, $2, $0 + db "ちから@@", $32, $3, $0 + db "チャレンジ", $36, $3, $0 + db "つよい@@", $58, $3, $0 + db "つよすぎ@", $5a, $3, $0 + db "つらい@@", $5c, $3, $0 + db "つらかった", $5e, $3, $0 + db "てかげん@", $6c, $3, $0 + db "てき@@@", $6e, $3, $0 + db "てんさい@", $90, $3, $0 + db "でんせつ@", $94, $3, $0 + db "トレーナー", $c6, $3, $0 + db "にげ@@@", $4, $4, $0 + db "ぬるい@@", $10, $4, $0 + db "ねらう@@", $16, $4, $0 + db "バトル@@", $4a, $4, $0 + db "ファイト@", $72, $4, $0 + db "ふっかつ@", $78, $4, $0 + db "ポイント@", $94, $4, $0 + db "ポケモン@", $ac, $4, $0 + db "ほんき@@", $bc, $4, $0 + db "まいった!", $c4, $4, $0 + db "まけ@@@", $c8, $4, $0 + db "まけたら@", $ca, $4, $0 + db "まけて@@", $cc, $4, $0 + db "まける@@", $ce, $4, $0 + db "まもり@@", $ea, $4, $0 + db "みかた@@", $f2, $4, $0 + db "みとめない", $fe, $4, $0 + db "みとめる@", $0, $5, $0 + db "むてき@@", $16, $5, $0 + db "もらった!", $3c, $5, $0 + db "よゆう@@", $7a, $5, $0 + db "よわい@@", $82, $5, $0 + db "よわすぎ@", $84, $5, $0 + db "らくしょう", $8e, $5, $0 + db "りーダー@", $9e, $5, $0 + db "ルール@@", $a0, $5, $0 + db "レべル@@", $a6, $5, $0 + db "わざ@@@", $be, $5, $0 + +.Exclamations: + db "!@@@@", $0, $0, $0 + db "!!@@@", $2, $0, $0 + db "!?@@@", $4, $0, $0 + db "?@@@@", $6, $0, $0 + db "⋯@@@@", $8, $0, $0 + db "⋯!@@@", $a, $0, $0 + db "⋯⋯⋯@@", $c, $0, $0 + db "ー@@@@", $e, $0, $0 + db "ーーー@@", $10, $0, $0 + db "あーあ@@", $14, $0, $0 + db "あーん@@", $16, $0, $0 + db "あははー@", $52, $0, $0 + db "あら@@@", $54, $0, $0 + db "いえ@@@", $72, $0, $0 + db "イエス@@", $74, $0, $0 + db "うう@@@", $ac, $0, $0 + db "うーん@@", $ae, $0, $0 + db "うおー!@", $b0, $0, $0 + db "うおりゃー", $b2, $0, $0 + db "うひょー@", $bc, $0, $0 + db "うふふ@@", $be, $0, $0 + db "うわー@@", $ca, $0, $0 + db "うわーん@", $cc, $0, $0 + db "ええ@@@", $d2, $0, $0 + db "えー@@@", $d4, $0, $0 + db "えーん@@", $d6, $0, $0 + db "えへへ@@", $dc, $0, $0 + db "おいおい@", $e0, $0, $0 + db "おお@@@", $e2, $0, $0 + db "おっと@@", $c, $1, $0 + db "がーん@@", $42, $1, $0 + db "キャー@@", $aa, $1, $0 + db "ギャー@@", $ac, $1, $0 + db "ぐふふふふ", $bc, $1, $0 + db "げっ@@@", $ce, $1, $0 + db "しくしく@", $3e, $2, $0 + db "ちえっ@@", $2e, $3, $0 + db "てへ@@@", $86, $3, $0 + db "ノー@@@", $20, $4, $0 + db "はあー@@", $2a, $4, $0 + db "はい@@@", $30, $4, $0 + db "はっはっは", $48, $4, $0 + db "ひいー@@", $56, $4, $0 + db "ひゃあ@@", $6a, $4, $0 + db "ふっふっふ", $7c, $4, $0 + db "ふにゃ@@", $7e, $4, $0 + db "ププ@@@", $80, $4, $0 + db "ふふん@@", $82, $4, $0 + db "ふん@@@", $88, $4, $0 + db "へっへっへ", $8e, $4, $0 + db "へへー@@", $90, $4, $0 + db "ほーほほほ", $9c, $4, $0 + db "ほら@@@", $b6, $4, $0 + db "まあ@@@", $c0, $4, $0 + db "むきー!!", $10, $5, $0 + db "むふー@@", $18, $5, $0 + db "むふふ@@", $1a, $5, $0 + db "むむ@@@", $1c, $5, $0 + db "よーし@@", $6a, $5, $0 + db "よし!@@", $72, $5, $0 + db "ラララ@@", $98, $5, $0 + db "わーい@@", $ac, $5, $0 + db "わーん!!", $b0, $5, $0 + db "ワオ@@@", $b2, $5, $0 + db "わっ!!@", $ce, $5, $0 + db "わははは!", $d0, $5, $0 + +.Conversation: + db "あのね@@", $50, $0, $0 + db "あんまり@", $6e, $0, $0 + db "いじわる@", $8e, $0, $0 + db "うそ@@@", $b6, $0, $0 + db "うむ@@@", $c4, $0, $0 + db "おーい@@", $e4, $0, $0 + db "おすすめ@", $6, $1, $0 + db "おばかさん", $1e, $1, $0 + db "かなり@@", $6e, $1, $0 + db "から@@@", $7a, $1, $0 + db "きぶん@@", $98, $1, $0 + db "けど@@@", $d6, $1, $0 + db "こそ@@@", $ea, $1, $0 + db "こと@@@", $ee, $1, $0 + db "さあ@@@", $12, $2, $0 + db "さっぱり@", $1e, $2, $0 + db "さて@@@", $20, $2, $0 + db "じゅうぶん", $72, $2, $0 + db "すぐ@@@", $94, $2, $0 + db "すごく@@", $98, $2, $0 + db "すこしは@", $9a, $2, $0 + db "すっっごい", $a0, $2, $0 + db "ぜーんぜん", $b0, $2, $0 + db "ぜったい@", $b2, $2, $0 + db "それで@@", $ce, $2, $0 + db "だけ@@@", $f2, $2, $0 + db "だって@@", $fc, $2, $0 + db "たぶん@@", $6, $3, $0 + db "たら@@@", $14, $3, $0 + db "ちょー@@", $3a, $3, $0 + db "ちょっと@", $3c, $3, $0 + db "ったら@@", $4e, $3, $0 + db "って@@@", $50, $3, $0 + db "ていうか@", $62, $3, $0 + db "でも@@@", $88, $3, $0 + db "どうしても", $9c, $3, $0 + db "とうぜん@", $a0, $3, $0 + db "どうぞ@@", $a2, $3, $0 + db "とりあえず", $be, $3, $0 + db "なあ@@@", $cc, $3, $0 + db "なんて@@", $f4, $3, $0 + db "なんでも@", $fc, $3, $0 + db "なんとか@", $fe, $3, $0 + db "には@@@", $8, $4, $0 + db "バッチり@", $46, $4, $0 + db "ばりばり@", $52, $4, $0 + db "ほど@@@", $b0, $4, $0 + db "ほんと@@", $be, $4, $0 + db "まさに@@", $d0, $4, $0 + db "マジ@@@", $d2, $4, $0 + db "マジで@@", $d4, $4, $0 + db "まったく@", $e4, $4, $0 + db "まで@@@", $e6, $4, $0 + db "まるで@@", $ec, $4, $0 + db "ムード@@", $e, $5, $0 + db "むしろ@@", $14, $5, $0 + db "めちゃ@@", $24, $5, $0 + db "めっぽう@", $28, $5, $0 + db "もう@@@", $2c, $5, $0 + db "モード@@", $2e, $5, $0 + db "もっと@@", $36, $5, $0 + db "もはや@@", $38, $5, $0 + db "やっと@@", $4a, $5, $0 + db "やっぱり@", $4c, $5, $0 + db "より@@@", $7c, $5, $0 + db "れば@@@", $a4, $5, $0 + +.Feelings: + db "あいたい@", $1a, $0, $0 + db "あそびたい", $32, $0, $0 + db "いきたい@", $7c, $0, $0 + db "うかれて@", $b4, $0, $0 + db "うれしい@", $c6, $0, $0 + db "うれしさ@", $c8, $0, $0 + db "エキサイト", $d8, $0, $0 + db "えらい@@", $de, $0, $0 + db "おかしい@", $ec, $0, $0 + db "オッケー@", $8, $1, $0 + db "かえりたい", $48, $1, $0 + db "がっくし@", $5a, $1, $0 + db "かなしい@", $6c, $1, $0 + db "がんばって", $80, $1, $0 + db "きがしない", $86, $1, $0 + db "きがする@", $88, $1, $0 + db "ききたい@", $8a, $1, $0 + db "きになる@", $90, $1, $0 + db "きのせい@", $96, $1, $0 + db "きらい@@", $b4, $1, $0 + db "くやしい@", $be, $1, $0 + db "くやしさ@", $c0, $1, $0 + db "さみしい@", $24, $2, $0 + db "ざんねん@", $32, $2, $0 + db "しあわせ@", $36, $2, $0 + db "したい@@", $44, $2, $0 + db "したくない", $46, $2, $0 + db "しまった@", $64, $2, $0 + db "しょんぼり", $82, $2, $0 + db "すき@@@", $92, $2, $0 + db "だいきらい", $da, $2, $0 + db "たいくつ@", $dc, $2, $0 + db "だいじ@@", $de, $2, $0 + db "だいすき@", $e4, $2, $0 + db "たいへん@", $ea, $2, $0 + db "たのしい@", $0, $3, $0 + db "たのしすぎ", $2, $3, $0 + db "たべたい@", $8, $3, $0 + db "ダメダメ@", $e, $3, $0 + db "たりない@", $16, $3, $0 + db "ちくしょー", $34, $3, $0 + db "どうしよう", $9e, $3, $0 + db "ドキドキ@", $ac, $3, $0 + db "ナイス@@", $d0, $3, $0 + db "のみたい@", $26, $4, $0 + db "びっくり@", $60, $4, $0 + db "ふあん@@", $74, $4, $0 + db "ふらふら@", $86, $4, $0 + db "ほしい@@", $ae, $4, $0 + db "ボロボロ@", $b8, $4, $0 + db "まだまだ@", $e0, $4, $0 + db "まてない@", $e8, $4, $0 + db "まんぞく@", $f0, $4, $0 + db "みたい@@", $f8, $4, $0 + db "めずらしい", $22, $5, $0 + db "メラメラ@", $2a, $5, $0 + db "やだ@@@", $46, $5, $0 + db "やったー@", $48, $5, $0 + db "やばい@@", $50, $5, $0 + db "やばすぎる", $52, $5, $0 + db "やられた@", $54, $5, $0 + db "やられて@", $56, $5, $0 + db "よかった@", $6e, $5, $0 + db "ラブラブ@", $96, $5, $0 + db "ロマン@@", $a8, $5, $0 + db "ろんがい@", $aa, $5, $0 + db "わから@@", $b4, $5, $0 + db "わかり@@", $b6, $5, $0 + db "わくわく@", $ba, $5, $0 + +.Conditions: + db "あつい@@", $38, $0, $0 + db "あった@@", $3a, $0, $0 + db "あり@@@", $56, $0, $0 + db "ある@@@", $5e, $0, $0 + db "あわてて@", $6a, $0, $0 + db "いい@@@", $70, $0, $0 + db "いか@@@", $76, $0, $0 + db "イカス@@", $78, $0, $0 + db "いきおい@", $7a, $0, $0 + db "いける@@", $8a, $0, $0 + db "いじょう@", $8c, $0, $0 + db "いそがしい", $90, $0, $0 + db "いっしょに", $9a, $0, $0 + db "いっぱい@", $9c, $0, $0 + db "いない@@", $a0, $0, $0 + db "いや@@@", $a4, $0, $0 + db "いる@@@", $a8, $0, $0 + db "うまい@@", $c0, $0, $0 + db "うまく@@", $c2, $0, $0 + db "おおきい@", $e6, $0, $0 + db "おくれ@@", $f2, $0, $0 + db "おしい@@", $fa, $0, $0 + db "おもしろい", $2c, $1, $0 + db "おもしろく", $2e, $1, $0 + db "かっこいい", $5c, $1, $0 + db "かわいい@", $7e, $1, $0 + db "かんぺき@", $82, $1, $0 + db "けっこう@", $d0, $1, $0 + db "げんき@@", $d8, $1, $0 + db "こわい@@", $6, $2, $0 + db "さいこう@", $14, $2, $0 + db "さむい@@", $26, $2, $0 + db "さわやか@", $2c, $2, $0 + db "しかたない", $38, $2, $0 + db "すごい@@", $96, $2, $0 + db "すごすぎ@", $9c, $2, $0 + db "すてき@@", $a4, $2, $0 + db "たいした@", $e0, $2, $0 + db "だいじょぶ", $e2, $2, $0 + db "たかい@@", $ec, $2, $0 + db "ただしい@", $f8, $2, $0 + db "だめ@@@", $c, $3, $0 + db "ちいさい@", $2c, $3, $0 + db "ちがう@@", $30, $3, $0 + db "つかれ@@", $48, $3, $0 + db "とくい@@", $b0, $3, $0 + db "とまらない", $b6, $3, $0 + db "ない@@@", $ce, $3, $0 + db "なかった@", $d2, $3, $0 + db "なし@@@", $d8, $3, $0 + db "なって@@", $dc, $3, $0 + db "はやい@@", $50, $4, $0 + db "ひかる@@", $5a, $4, $0 + db "ひくい@@", $5c, $4, $0 + db "ひどい@@", $64, $4, $0 + db "ひとりで@", $66, $4, $0 + db "ひま@@@", $68, $4, $0 + db "ふそく@@", $76, $4, $0 + db "へた@@@", $8c, $4, $0 + db "まちがって", $e2, $4, $0 + db "やさしい@", $42, $5, $0 + db "よく@@@", $70, $5, $0 + db "よわって@", $86, $5, $0 + db "らく@@@", $8c, $5, $0 + db "らしい@@", $90, $5, $0 + db "わるい@@", $d4, $5, $0 + +.Life: + db "アルバイト", $64, $0, $0 + db "うち@@@", $ba, $0, $0 + db "おかね@@", $ee, $0, $0 + db "おこづかい", $f4, $0, $0 + db "おふろ@@", $24, $1, $0 + db "がっこう@", $5e, $1, $0 + db "きねん@@", $92, $1, $0 + db "グループ@", $c6, $1, $0 + db "ゲット@@", $d2, $1, $0 + db "こうかん@", $de, $1, $0 + db "しごと@@", $40, $2, $0 + db "しゅぎょう", $74, $2, $0 + db "じゅぎょう", $76, $2, $0 + db "じゅく@@", $78, $2, $0 + db "しんか@@", $88, $2, $0 + db "ずかん@@", $90, $2, $0 + db "せいかつ@", $ae, $2, $0 + db "せんせい@", $b8, $2, $0 + db "センター@", $ba, $2, $0 + db "タワー@@", $28, $3, $0 + db "つうしん@", $40, $3, $0 + db "テスト@@", $7e, $3, $0 + db "テレビ@@", $8c, $3, $0 + db "でんわ@@", $96, $3, $0 + db "どうぐ@@", $9a, $3, $0 + db "トレード@", $c4, $3, $0 + db "なまえ@@", $e8, $3, $0 + db "ニュース@", $a, $4, $0 + db "にんき@@", $c, $4, $0 + db "パーティー", $2e, $4, $0 + db "べんきょう", $92, $4, $0 + db "マシン@@", $d6, $4, $0 + db "めいし@@", $1e, $5, $0 + db "メッセージ", $26, $5, $0 + db "もようがえ", $3a, $5, $0 + db "ゆめ@@@", $5a, $5, $0 + db "ようちえん", $66, $5, $0 + db "ラジオ@@", $92, $5, $0 + db "ワールド@", $ae, $5, $0 + +.Hobbies: + db "アイドル@", $1e, $0, $0 + db "アニメ@@", $4c, $0, $0 + db "うた@@@", $b8, $0, $0 + db "えいが@@", $d0, $0, $0 + db "おかし@@", $ea, $0, $0 + db "おしゃべり", $4, $1, $0 + db "おままごと", $28, $1, $0 + db "おもちゃ@", $30, $1, $0 + db "おんがく@", $38, $1, $0 + db "カード@@", $3e, $1, $0 + db "かいもの@", $46, $1, $0 + db "グルメ@@", $c8, $1, $0 + db "ゲーム@@", $cc, $1, $0 + db "ざっし@@", $1c, $2, $0 + db "さんぽ@@", $34, $2, $0 + db "じてんしゃ", $50, $2, $0 + db "しゅみ@@", $7a, $2, $0 + db "スポーツ@", $a8, $2, $0 + db "ダイエット", $d8, $2, $0 + db "たからもの", $f0, $2, $0 + db "たび@@@", $4, $3, $0 + db "ダンス@@", $2a, $3, $0 + db "つり@@@", $60, $3, $0 + db "デート@@", $6a, $3, $0 + db "でんしゃ@", $92, $3, $0 + db "ぬいぐるみ", $e, $4, $0 + db "パソコン@", $3e, $4, $0 + db "はな@@@", $4c, $4, $0 + db "ヒーロー@", $58, $4, $0 + db "ひるね@@", $6e, $4, $0 + db "ヒロイン@", $70, $4, $0 + db "ぼうけん@", $96, $4, $0 + db "ボード@@", $9a, $4, $0 + db "ボール@@", $9e, $4, $0 + db "ほん@@@", $ba, $4, $0 + db "マンガ@@", $ee, $4, $0 + db "やくそく@", $40, $5, $0 + db "やすみ@@", $44, $5, $0 + db "よてい@@", $74, $5, $0 + +.Actions: + db "あう@@@", $20, $0, $0 + db "あきらめ@", $24, $0, $0 + db "あげる@@", $28, $0, $0 + db "あせる@@", $2e, $0, $0 + db "あそび@@", $30, $0, $0 + db "あそぶ@@", $34, $0, $0 + db "あつめ@@", $3e, $0, $0 + db "あるき@@", $60, $0, $0 + db "あるく@@", $62, $0, $0 + db "いく@@@", $7e, $0, $0 + db "いけ@@@", $86, $0, $0 + db "おき@@@", $f0, $0, $0 + db "おこり@@", $f6, $0, $0 + db "おこる@@", $f8, $0, $0 + db "おしえ@@", $fe, $0, $0 + db "おしえて@", $0, $1, $0 + db "おねがい@", $1a, $1, $0 + db "おぼえ@@", $26, $1, $0 + db "かえる@@", $4a, $1, $0 + db "がまん@@", $74, $1, $0 + db "きく@@@", $8c, $1, $0 + db "きたえ@@", $8e, $1, $0 + db "きめ@@@", $a6, $1, $0 + db "くる@@@", $c4, $1, $0 + db "さがし@@", $18, $2, $0 + db "さわぎ@@", $2a, $2, $0 + db "した@@@", $42, $2, $0 + db "しって@@", $4a, $2, $0 + db "して@@@", $4e, $2, $0 + db "しない@@", $52, $2, $0 + db "しまう@@", $60, $2, $0 + db "じまん@@", $66, $2, $0 + db "しらない@", $84, $2, $0 + db "しる@@@", $86, $2, $0 + db "しんじて@", $8a, $2, $0 + db "する@@@", $aa, $2, $0 + db "たべる@@", $a, $3, $0 + db "つかう@@", $42, $3, $0 + db "つかえ@@", $44, $3, $0 + db "つかって@", $46, $3, $0 + db "できない@", $70, $3, $0 + db "できる@@", $72, $3, $0 + db "でない@@", $84, $3, $0 + db "でる@@@", $8a, $3, $0 + db "なげる@@", $d6, $3, $0 + db "なやみ@@", $ea, $3, $0 + db "ねられ@@", $18, $4, $0 + db "ねる@@@", $1a, $4, $0 + db "のがし@@", $24, $4, $0 + db "のむ@@@", $28, $4, $0 + db "はしり@@", $3a, $4, $0 + db "はしる@@", $3c, $4, $0 + db "はたらき@", $40, $4, $0 + db "はたらく@", $42, $4, $0 + db "はまって@", $4e, $4, $0 + db "ぶつけ@@", $7a, $4, $0 + db "ほめ@@@", $b4, $4, $0 + db "みせて@@", $f6, $4, $0 + db "みて@@@", $fc, $4, $0 + db "みる@@@", $2, $5, $0 + db "めざす@@", $20, $5, $0 + db "もって@@", $34, $5, $0 + db "ゆずる@@", $58, $5, $0 + db "ゆるす@@", $5c, $5, $0 + db "ゆるせ@@", $5e, $5, $0 + db "られない@", $9a, $5, $0 + db "られる@@", $9c, $5, $0 + db "わかる@@", $b8, $5, $0 + db "わすれ@@", $c0, $5, $0 + +.Time: + db "あき@@@", $22, $0, $0 + db "あさ@@@", $2a, $0, $0 + db "あした@@", $2c, $0, $0 + db "いちにち@", $94, $0, $0 + db "いつか@@", $98, $0, $0 + db "いつも@@", $9e, $0, $0 + db "いま@@@", $a2, $0, $0 + db "えいえん@", $ce, $0, $0 + db "おととい@", $12, $1, $0 + db "おわり@@", $36, $1, $0 + db "かようび@", $78, $1, $0 + db "きのう@@", $94, $1, $0 + db "きょう@@", $b0, $1, $0 + db "きんようび", $b8, $1, $0 + db "げつようび", $d4, $1, $0 + db "このあと@", $f4, $1, $0 + db "このまえ@", $f6, $1, $0 + db "こんど@@", $c, $2, $0 + db "じかん@@", $3c, $2, $0 + db "じゅうねん", $70, $2, $0 + db "すいようび", $8e, $2, $0 + db "スタート@", $9e, $2, $0 + db "ずっと@@", $a2, $2, $0 + db "ストップ@", $a6, $2, $0 + db "そのうち@", $c4, $2, $0 + db "ついに@@", $3e, $3, $0 + db "つぎ@@@", $4a, $3, $0 + db "どようび@", $ba, $3, $0 + db "なつ@@@", $da, $3, $0 + db "にちようび", $6, $4, $0 + db "はじめ@@", $38, $4, $0 + db "はる@@@", $54, $4, $0 + db "ひる@@@", $6c, $4, $0 + db "ふゆ@@@", $84, $4, $0 + db "まいにち@", $c6, $4, $0 + db "もくようび", $30, $5, $0 + db "よなか@@", $76, $5, $0 + db "よる@@@", $7e, $5, $0 + db "らいしゅう", $88, $5, $0 + +.Farewells: + db "いたします", $92, $0, $0 + db "おります@", $32, $1, $0 + db "か!?@@", $3c, $1, $0 + db "かい?@@", $44, $1, $0 + db "かしら?@", $50, $1, $0 + db "かな?@@", $6a, $1, $0 + db "かも@@@", $76, $1, $0 + db "くれ@@@", $ca, $1, $0 + db "ございます", $e8, $1, $0 + db "しがち@@", $3a, $2, $0 + db "します@@", $62, $2, $0 + db "じゃ@@@", $6a, $2, $0 + db "じゃん@@", $6e, $2, $0 + db "しよう@@", $7c, $2, $0 + db "ぜ!@@@", $ac, $2, $0 + db "ぞ!@@@", $bc, $2, $0 + db "た@@@@", $d4, $2, $0 + db "だ@@@@", $d6, $2, $0 + db "だからね@", $ee, $2, $0 + db "だぜ@@@", $f4, $2, $0 + db "だった@@", $fa, $2, $0 + db "だね@@@", $fe, $2, $0 + db "だよ@@@", $10, $3, $0 + db "だよねー!", $12, $3, $0 + db "だわ@@@", $26, $3, $0 + db "ッス@@@", $4c, $3, $0 + db "ってかんじ", $52, $3, $0 + db "っぱなし@", $54, $3, $0 + db "つもり@@", $56, $3, $0 + db "ていない@", $64, $3, $0 + db "ている@@", $66, $3, $0 + db "でーす!@", $68, $3, $0 + db "でした@@", $74, $3, $0 + db "でしょ?@", $76, $3, $0 + db "でしょー!", $78, $3, $0 + db "です@@@", $7a, $3, $0 + db "ですか?@", $7c, $3, $0 + db "ですよ@@", $80, $3, $0 + db "ですわ@@", $82, $3, $0 + db "どうなの?", $a4, $3, $0 + db "どうよ?@", $a8, $3, $0 + db "とかいって", $aa, $3, $0 + db "なの@@@", $e0, $3, $0 + db "なのか@@", $e2, $3, $0 + db "なのだ@@", $e4, $3, $0 + db "なのよ@@", $e6, $3, $0 + db "なんだね@", $f2, $3, $0 + db "なんです@", $f8, $3, $0 + db "なんてね@", $fa, $3, $0 + db "ね@@@@", $12, $4, $0 + db "ねー@@@", $14, $4, $0 + db "の@@@@", $1c, $4, $0 + db "の?@@@", $1e, $4, $0 + db "ばっかり@", $44, $4, $0 + db "まーす!@", $c2, $4, $0 + db "ます@@@", $d8, $4, $0 + db "ますわ@@", $da, $4, $0 + db "ません@@", $dc, $4, $0 + db "みたいな@", $fa, $4, $0 + db "よ!@@@", $60, $5, $0 + db "よー@@@", $68, $5, $0 + db "よーん@@", $6c, $5, $0 + db "よね@@@", $78, $5, $0 + db "るよ@@@", $a2, $5, $0 + db "わけ@@@", $bc, $5, $0 + db "わよ!@@", $d2, $5, $0 + +.ThisAndThat: + db "ああ@@@", $12, $0, $0 + db "あっち@@", $3c, $0, $0 + db "あの@@@", $4e, $0, $0 + db "ありゃ@@", $5c, $0, $0 + db "あれ@@@", $66, $0, $0 + db "あれは@@", $68, $0, $0 + db "あんな@@", $6c, $0, $0 + db "こう@@@", $dc, $1, $0 + db "こっち@@", $ec, $1, $0 + db "この@@@", $f2, $1, $0 + db "こりゃ@@", $fe, $1, $0 + db "これ@@@", $0, $2, $0 + db "これだ!@", $2, $2, $0 + db "これは@@", $4, $2, $0 + db "こんな@@", $e, $2, $0 + db "そう@@@", $be, $2, $0 + db "そっち@@", $c0, $2, $0 + db "その@@@", $c2, $2, $0 + db "そりゃ@@", $c6, $2, $0 + db "それ@@@", $c8, $2, $0 + db "それだ!@", $cc, $2, $0 + db "それは@@", $d0, $2, $0 + db "そんな@@", $d2, $2, $0 + db "どう@@@", $98, $3, $0 + db "どっち@@", $b2, $3, $0 + db "どの@@@", $b4, $3, $0 + db "どりゃ@@", $c0, $3, $0 + db "どれ@@@", $c2, $3, $0 + db "どれを@@", $c8, $3, $0 + db "どんな@@", $ca, $3, $0 + db "なに@@@", $de, $3, $0 + db "なんか@@", $ec, $3, $0 + db "なんだ@@", $f0, $3, $0 + db "なんで@@", $f6, $3, $0 + db "なんなんだ", $0, $4, $0 + db "なんの@@", $2, $4, $0 + +MobileEZChatData_WordAndPageCounts: +MACRO macro_11f220 +; parameter: number of words + db \1 +; 12 words per page (0-based indexing) + db (\1 - 1) / 12 +ENDM + macro_11f220 18 ; 01: Types + macro_11f220 36 ; 02: Greetings + macro_11f220 69 ; 03: People + macro_11f220 69 ; 04: Battle + macro_11f220 66 ; 05: Exclamations + macro_11f220 66 ; 06: Conversation + macro_11f220 69 ; 07: Feelings + macro_11f220 66 ; 08: Conditions + macro_11f220 39 ; 09: Life + macro_11f220 39 ; 0a: Hobbies + macro_11f220 69 ; 0b: Actions + macro_11f220 39 ; 0c: Time + macro_11f220 66 ; 0d: Farewells + macro_11f220 36 ; 0e: ThisAndThat + +EZChat_SortedWords: +; Addresses in WRAM bank 3 where EZChat words beginning +; with the given kana are sorted in memory, and the pre- +; allocated size for each. +; These arrays are expanded dynamically to accomodate +; any Pokemon you've seen that starts with each kana. +MACRO macro_11f23c + dw w3_d012 - w3_d000 + x, \1 + DEF x += 2 * \1 +ENDM +DEF x = 0 + macro_11f23c $2f ; a + macro_11f23c $1e ; i + macro_11f23c $11 ; u + macro_11f23c $09 ; e + macro_11f23c $2e ; o + macro_11f23c $24 ; ka_ga + macro_11f23c $1b ; ki_gi + macro_11f23c $09 ; ku_gu + macro_11f23c $07 ; ke_ge + macro_11f23c $1c ; ko_go + macro_11f23c $12 ; sa_za + macro_11f23c $2b ; shi_ji + macro_11f23c $10 ; su_zu + macro_11f23c $08 ; se_ze + macro_11f23c $0c ; so_zo + macro_11f23c $2c ; ta_da + macro_11f23c $09 ; chi_dhi + macro_11f23c $12 ; tsu_du + macro_11f23c $1b ; te_de + macro_11f23c $1a ; to_do + macro_11f23c $1c ; na + macro_11f23c $05 ; ni + macro_11f23c $02 ; nu + macro_11f23c $05 ; ne + macro_11f23c $07 ; no + macro_11f23c $16 ; ha_ba_pa + macro_11f23c $0e ; hi_bi_pi + macro_11f23c $0c ; fu_bu_pu + macro_11f23c $05 ; he_be_pe + macro_11f23c $16 ; ho_bo_po + macro_11f23c $19 ; ma + macro_11f23c $0e ; mi + macro_11f23c $08 ; mu + macro_11f23c $07 ; me + macro_11f23c $09 ; mo + macro_11f23c $0d ; ya + macro_11f23c $04 ; yu + macro_11f23c $14 ; yo + macro_11f23c $0b ; ra + macro_11f23c $01 ; ri + macro_11f23c $02 ; ru + macro_11f23c $02 ; re + macro_11f23c $02 ; ro + macro_11f23c $15 ; wa + dw NULL, $09 ; end +.End diff --git a/mobile/mobile_12.asm b/mobile/mobile_12.asm new file mode 100644 index 0000000..7f3e171 --- /dev/null +++ b/mobile/mobile_12.asm @@ -0,0 +1,1817 @@ +InitMobileProfile: + xor a + set 6, a + ld [wd002], a + ld hl, wd003 + set 0, [hl] + ld a, c + and a + call z, InitCrystalData + call ClearBGPalettes + call Function48d3d + ld a, [wd479] + bit 1, a + jr z, .not_yet_initialized + ld a, [wd003] + set 0, a + set 1, a + set 2, a + set 3, a + ld [wd003], a +.not_yet_initialized + call Function486bf + call LoadFontsExtra + ld de, MobileUpArrowGFX + ld hl, vTiles2 tile $10 + lb bc, BANK(MobileUpArrowGFX), 1 + call Request1bpp + ld de, MobileDownArrowGFX + ld hl, vTiles2 tile $11 + lb bc, BANK(MobileDownArrowGFX), 1 + call Request1bpp + call Function4a3a7 + call ClearBGPalettes + ld a, [wd002] + bit 6, a + jr z, .asm_4808a + call Function48689 + jr .asm_480d7 +.asm_4808a + ld a, $5 + ld [wMusicFade], a + ld a, LOW(MUSIC_MOBILE_ADAPTER_MENU) + ld [wMusicFadeID], a + ld a, HIGH(MUSIC_MOBILE_ADAPTER_MENU) + ld [wMusicFadeID + 1], a + ld c, 20 + call DelayFrames + ld b, CRYSTAL_CGB_MOBILE_1 + call GetCrystalCGBLayout + call ClearBGPalettes + hlcoord 0, 0 + ld b, 2 + ld c, 20 + call ClearBox + hlcoord 0, 1 + ld a, $c + ld [hl], a + ld bc, $13 + add hl, bc + ld [hl], a + ld de, MobileProfileString + hlcoord 1, 1 + call PlaceString + hlcoord 0, 2 + ld b, $a + ld c, $12 + call Function48cdc + hlcoord 2, 4 + ld de, MobileString_Gender + call PlaceString +.asm_480d7 + hlcoord 2, 6 + ld de, MobileString_Age + call PlaceString + hlcoord 2, 8 + ld de, MobileString_Address + call PlaceString + hlcoord 2, 10 + ld de, MobileString_ZipCode + call PlaceString + hlcoord 2, 12 + ld de, MobileString_OK + call PlaceString + ld a, [wd002] + bit 6, a + jr nz, .asm_48113 + ld a, [wPlayerGender] + ld hl, Strings_484fb + call GetNthString + ld d, h + ld e, l + hlcoord 11, 4 + call PlaceString +.asm_48113 + hlcoord 11, 6 + call Function487ec + ld a, [wd474] + dec a + ld hl, Prefectures + call GetNthString + ld d, h + ld e, l + hlcoord 11, 8 + call PlaceString + hlcoord 11, 10 + call Function489ea + hlcoord 0, 14 + ld b, $2 + ld c, $12 + call Textbox + hlcoord 1, 16 + ld de, MobileString_PersonalInfo + call PlaceString + call Function48187 + call WaitBGMap2 + call SetPalettes + call StaticMenuJoypad + ld hl, wMenuCursorY + ld b, [hl] + push bc + jr asm_4815f + +Function48157: + call ScrollingMenuJoypad + ld hl, wMenuCursorY + ld b, [hl] + push bc +asm_4815f: + bit A_BUTTON_F, a + jp nz, Function4820d + ld b, a + ld a, [wd002] + bit 6, a + jr z, .dont_check_b_button + ld hl, wd479 + bit 1, [hl] + jr z, .dont_check_b_button + bit B_BUTTON_F, b + jr nz, .b_button +.dont_check_b_button + jp Function48272 + +.b_button + call ClearBGPalettes + call Function48d30 + pop bc + call ClearTilemap + ld a, $ff + ret + +Function48187: + ld a, [wd479] + bit 1, a + jr nz, .asm_481f1 + ld a, [wd003] + ld d, a + call Function48725 + jr c, .asm_481a2 + lb bc, 1, 4 + hlcoord 2, 12 + call ClearBox + jr .asm_481ad +.asm_481a2 + push de + hlcoord 2, 12 + ld de, MobileString_OK + call PlaceString + pop de +.asm_481ad + ld a, [wd002] + bit 6, a + jr nz, .asm_481c1 + bit 0, d + jr nz, .asm_481c1 + lb bc, 1, 8 + hlcoord 11, 4 + call ClearBox +.asm_481c1 + bit 1, d + jr nz, .asm_481ce + lb bc, 1, 8 + hlcoord 11, 6 + call ClearBox +.asm_481ce + bit 2, d + jr nz, .asm_481db + lb bc, 2, 8 + hlcoord 11, 7 + call ClearBox +.asm_481db + bit 3, d + jr nz, .asm_481f1 + ld a, [wd479] + bit 0, a + jr nz, .asm_481f8 + lb bc, 1, 8 + hlcoord 11, 10 + call ClearBox + jr .asm_48201 +.asm_481f1 + ld a, [wd479] + bit 0, a + jr nz, .asm_48201 +.asm_481f8 + hlcoord 11, 10 + ld de, .String_TellLater + call PlaceString +.asm_48201 + ret + +.String_TellLater: + db "Tell Later@" + +Function4820d: + call PlaceHollowCursor + ld hl, wMenuCursorY + ld a, [hl] + push af + ld a, [wd002] + bit 6, a + jr z, .asm_4821f + pop af + inc a + push af +.asm_4821f + pop af + cp $1 + jr z, asm_4828d + cp $2 + jp z, Function4876f + cp $3 + jp z, Function48304 + cp $4 + jp z, Function488d3 + ld a, $2 + call MenuClickSound + ld a, [wd002] + bit 6, a + jr z, .asm_4825c + jr .asm_4825c + + hlcoord 1, 15 + ld b, $2 + ld c, $12 + call ClearBox + ld de, MobileString_ProfileChanged + hlcoord 1, 16 + call PlaceString + call WaitBGMap + ld c, 48 + call DelayFrames + +.asm_4825c + call ClearBGPalettes + call Function48d30 + pop bc + call ClearTilemap + ld b, SCGB_DIPLOMA + call GetSGBLayout + ld hl, wd479 + set 1, [hl] + xor a + ret + +Function48272: + jp Function4840c + +MobileString_PersonalInfo: + db "Personal Info@" + +Function48283: + lb bc, 2, 18 + hlcoord 1, 15 + call ClearBox + ret + +asm_4828d: + call Function48283 + hlcoord 1, 16 + ld de, MobileDesc_Gender + call PlaceString + ld hl, MenuHeader_0x484f1 + call LoadMenuHeader + call Function4873c + hlcoord 11, 2 + ld b, $4 + ld c, $7 + call Function48cdc + hlcoord 13, 4 + ld de, String_484fb + call PlaceString + hlcoord 13, 6 + ld de, String_484ff + call PlaceString + call WaitBGMap + ld a, [wPlayerGender] + inc a + ld [wMenuCursorPosition], a + call StaticMenuJoypad + call PlayClickSFX + call ExitMenu + bit 0, a + jp z, Function4840c + ld hl, wMenuCursorY + ld a, [hl] + ld hl, Strings_484fb + cp $1 + jr z, .asm_482ed +.asm_482e1 + ld a, [hli] + cp $50 + jr nz, .asm_482e1 + ld a, 1 << PLAYERGENDER_FEMALE_F + ld [wPlayerGender], a + jr .asm_482f1 +.asm_482ed + xor a + ld [wPlayerGender], a +.asm_482f1 + ld d, h + ld e, l + hlcoord 11, 4 + call PlaceString + ld a, [wd003] + set 0, a + ld [wd003], a + jp Function4840c + +Function48304: + call Function48283 + hlcoord 1, 16 + ld de, MobileDesc_Address + call PlaceString + ld hl, MenuHeader_0x48504 + call LoadMenuHeader + ld hl, MenuHeader_0x48513 + call LoadMenuHeader + hlcoord 10, 0 + ld b, $c + ld c, $8 + call Function48cdc + ld a, [wMenuCursorPosition] + ld b, a + ld a, [wMenuScrollPosition] + ld c, a + push bc + ld a, [wd474] + dec a + cp $29 + jr c, .asm_4833f + sub $29 + inc a + ld [wMenuCursorPosition], a + ld a, $29 +.asm_4833f + ld [wMenuScrollPosition], a + farcall Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap +.asm_48348 + call ScrollingMenu + ld de, $629 + call Function48383 + jr c, .asm_48348 + ld d, a + pop bc + ld a, b + ld [wMenuCursorPosition], a + ld a, c + ld [wMenuScrollPosition], a + ld a, d + push af + call ExitMenu + call ExitMenu + pop af + ldh a, [hJoyPressed] + bit 0, a + jr z, .asm_48377 + call Function483bb + ld a, [wd003] + set 2, a + ld [wd003], a +.asm_48377 + call Function48187 + farcall Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + jp Function4840c + +Function48383: + push bc + push af + bit 5, a + jr nz, .asm_48390 + bit 4, a + jr nz, .asm_4839f + and a + jr .asm_483b7 +.asm_48390 + ld a, [wMenuScrollPosition] + sub d + ld [wMenuScrollPosition], a + jr nc, .asm_483af + xor a + ld [wMenuScrollPosition], a + jr .asm_483af +.asm_4839f + ld a, [wMenuScrollPosition] + add d + ld [wMenuScrollPosition], a + cp e + jr c, .asm_483af + ld a, e + ld [wMenuScrollPosition], a + jr .asm_483af +.asm_483af + ld hl, wMenuCursorY + ld a, [hl] + ld [wMenuCursorPosition], a + scf +.asm_483b7 + pop bc + ld a, b + pop bc + ret + +Function483bb: + ld hl, wScrollingMenuCursorPosition + ld a, [hl] + inc a + ld [wd474], a + dec a + ld b, a + ld hl, Prefectures +.asm_483c8 + and a + jr z, .asm_483d5 +.asm_483cb + ld a, [hli] + cp "@" + jr nz, .asm_483cb + ld a, b + dec a + ld b, a + jr .asm_483c8 +.asm_483d5 + ld d, h + ld e, l + ld b, $2 + ld c, $8 + hlcoord 11, 7 + call ClearBox + hlcoord 11, 8 + call PlaceString + ret + +Function483e8: + push de + ld hl, Prefectures + ld a, [wMenuSelection] + cp $ff + jr nz, .asm_483f8 + ld hl, Wakayama ; last string + jr .asm_48405 + +.asm_483f8 + ld d, a + and a + jr z, .asm_48405 +.asm_483fc + ld a, [hli] + cp "@" + jr nz, .asm_483fc + ld a, d + dec a + jr .asm_483f8 + +.asm_48405 + ld d, h + ld e, l + pop hl + call PlaceString + ret + +Function4840c: + call Function48187 + call Function48283 + hlcoord 1, 16 + ld de, MobileString_PersonalInfo + call PlaceString + call Function486bf + pop bc + ld hl, wMenuCursorY + ld [hl], b + ld a, [wd002] + bit 6, a + jr nz, .narrower_box + ld b, 9 + ld c, 1 + hlcoord 1, 4 + call ClearBox + jp Function48157 + +.narrower_box + ld b, 7 + ld c, 1 + hlcoord 1, 6 + call ClearBox + jp Function48157 + +Mobile12_Bin2Dec: + push bc + push af + push de + push hl + ld hl, .DigitStrings +.loop + and a + jr z, .got_string + inc hl + inc hl + dec a + jr .loop +.got_string + ld d, h + ld e, l + pop hl + call PlaceString + pop de + pop af + pop bc + ret + +.DigitStrings: + db "0@" + db "1@" + db "2@" + db "3@" + db "4@" + db "5@" + db "6@" + db "7@" + db "8@" + db "9@" + +MobileProfileString: db " Mobile Profile@" +MobileString_Gender: db "Gender@" +MobileString_Age: db "Age@" +MobileString_Address: db "Address@" +MobileString_ZipCode: db "Zip Code@" +MobileString_OK: db "OK@" +MobileString_ProfileChanged: db "Profile Changed@" +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?@" + +MenuHeader_0x484f1: + db MENU_BACKUP_TILES ; flags + menu_coords 11, 2, SCREEN_WIDTH - 1, 7 + dw MenuData_0x484f9 + db 1 ; default option + +MenuData_0x484f9: + db STATICMENU_CURSOR | STATICMENU_WRAP ; flags + db 2 ; items +Strings_484fb: +String_484fb: db "Boy@" +String_484ff: db "Girl@" + +MenuHeader_0x48504: + db MENU_BACKUP_TILES ; flags + menu_coords 10, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + +MenuHeader_0x48509: + db MENU_BACKUP_TILES ; flags + menu_coords 10, 5, SCREEN_WIDTH - 1, 7 + +MenuHeader_0x4850e: + db MENU_BACKUP_TILES ; flags + menu_coords 10, 9, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + +MenuHeader_0x48513: + db MENU_BACKUP_TILES ; flags + menu_coords 11, 1, 18, 12 + dw MenuData_0x4851b + db 1 ; default option + +MenuData_0x4851b: + db SCROLLINGMENU_DISPLAY_ARROWS | SCROLLINGMENU_ENABLE_RIGHT | SCROLLINGMENU_ENABLE_LEFT | SCROLLINGMENU_CALL_FUNCTION1_CANCEL ; flags + db 6, 0 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dba .Items + dba Function483e8 + dba NULL + dba NULL + +.Items: + db 46 +for x, 46 + db x +endr + db -1 + +Prefectures: +Aichi: db "あいちけん@" ; Aichi +Aomori: db "あおもりけん@" ; Aomori +Akita: db "あきたけん@" ; Akita +Ishikawa: db "いしかわけん@" ; Ishikawa +Ibaraki: db "いばらきけん@" ; Ibaraki +Iwate: db "いわてけん@" ; Iwate +Ehime: db "えひめけん@" ; Ehime +Oita: db "おおいたけん@" ; Oita +Osakafu: db "おおさかふ@" ; Osakafu +Okayama: db "おかやまけん@" ; Okayama +Okinawa: db "おきなわけん@" ; Okinawa +Kagawa: db "かがわけん@" ; Kagawa +Kagoshima: db "かごしまけん@" ; Kagoshima +Kanagawa: db "かながわけん@" ; Kanagawa +Gifu: db "ぎふけん@" ; Gifu +Kyotofu: db "きょうとふ@" ; Kyotofu +Kumamoto: db "くまもとけん@" ; Kumamoto +Gunma: db "ぐんまけん@" ; Gunma +Kochi: db "こうちけん@" ; Kochi +Saitama: db "さいたまけん@" ; Saitama +Saga: db "さがけん@" ; Saga +Shiga: db "しがけん@" ; Shiga +Shizuoka: db "しずおかけん@" ; Shizuoka +Shimane: db "しまねけん@" ; Shimane +Chiba: db "ちばけん@" ; Chiba +Tokyo: db "とうきょうと@" ; Tokyo +Tokushima: db "とくしまけん@" ; Tokushima +Tochigi: db "とちぎけん@" ; Tochigi +Tottori: db "とっとりけん@" ; Tottori +Toyama: db "とやまけん@" ; Toyama +Nagasaki: db "ながさきけん@" ; Nagasaki +Nagano: db "ながのけん@" ; Nagano +Naraken: db "ならけん@" ; Naraken +Niigata: db "にいがたけん@" ; Niigata +Hyogo: db "ひょうごけん@" ; Hyogo +Hiroshima: db "ひろしまけん@" ; Hiroshima +Fukui: db "ふくいけん@" ; Fukui +Fukuoka: db "ふくおかけん@" ; Fukuoka +Fukushima: db "ふくしまけん@" ; Fukushima +Hokkaido: db "ほっかいどう@" ; Hokkaido +Mie: db "みえけん@" ; Mie +Miyagi: db "みやぎけん@" ; Miyagi +Miyazaki: db "みやざきけん@" ; Miyazaki +Yamagata: db "やまがたけん@" ; Yamagata +Yamaguchi: db "やまぐちけん@" ; Yamaguchi +Yamanashi: db "やまなしけん@" ; Yamanashi +Wakayama: db "わかやまけん@" ; Wakayama + +Function48689: + ld c, 7 + call DelayFrames + ld b, CRYSTAL_CGB_MOBILE_1 + call GetCrystalCGBLayout + call ClearBGPalettes + hlcoord 0, 0 + ld b, 4 + ld c, SCREEN_WIDTH + call ClearBox + hlcoord 0, 2 + ld a, $c + ld [hl], a + ld bc, SCREEN_WIDTH - 1 + add hl, bc + ld [hl], a + ld de, MobileProfileString + hlcoord 1, 2 + call PlaceString + hlcoord 0, 4 + ld b, $8 + ld c, $12 + call Function48cdc + ret + +Function486bf: + ld hl, w2DMenuCursorInitY + ld a, [wd002] + bit 6, a + jr nz, .start_at_6 + ld a, 4 + ld [hli], a + jr .got_init_y + +.start_at_6 + ld a, 6 + ld [hli], a +.got_init_y + ld a, 1 + ld [hli], a ; init x + ld a, [wd002] + bit 6, a + jr nz, .check_wd479 + call Function48725 + ld a, 4 + jr nc, .got_num_rows_1 + ld a, 5 +.got_num_rows_1 + ld [hli], a + jr .got_num_rows_2 + +.check_wd479 + ld a, [wd479] + bit 1, a + jr nz, .four_rows + call Function48725 + jr c, .four_rows + ld a, 3 + ld [hli], a + jr .got_num_rows_2 + +.four_rows + ld a, 4 + ld [hli], a +.got_num_rows_2 + ld a, 1 + ld [hli], a ; num cols + ld [hl], 0 ; flags 1 + set 5, [hl] + inc hl + xor a + ld [hli], a ; flags 2 + ld a, $20 + ld [hli], a ; cursor offsets + ld a, A_BUTTON + add D_UP + add D_DOWN + push af + ld a, [wd002] + bit 6, a + jr z, .got_joypad_mask + pop af + add B_BUTTON + push af +.got_joypad_mask + pop af + ld [hli], a + ld a, $1 + ld [hli], a ; cursor y + ld [hli], a ; cursor x + xor a + ld [hli], a ; off char + ld [hli], a ; cursor tile + ld [hli], a ; cursor tile + 1 + ret + +Function48725: +; ld a, [wd003] +; and $f +; cp $f +; jr nz, .clear_carry +; scf +; ret +; .clear_carry +; and a +; ret + + ld a, [wd003] + bit 0, a + jr z, .clear_carry + bit 1, a + jr z, .clear_carry + bit 2, a + jr z, .clear_carry + bit 3, a + jr z, .clear_carry + scf + ret + +.clear_carry + and a + ret + +Function4873c: + ld hl, w2DMenuCursorInitY + ld a, 4 + ld [hli], a + ld a, 12 + ld [hli], a ; init x + ld a, 2 + ld [hli], a ; num rows + ld a, 1 + ld [hli], a ; num cols + ld [hl], 0 ; flags 1 + set 5, [hl] + inc hl + xor a + ld [hli], a ; flags 2 + ln a, 2, 0 + ld [hli], a ; cursor offsets + ld a, A_BUTTON + add B_BUTTON + ld [hli], a ; joypad filter + ; ld a, [wPlayerGender] + ; xor 1 << PLAYERGENDER_FEMALE_F + ; inc a + ld a, [wPlayerGender] + and a + jr z, .male + ld a, 2 + jr .okay_gender + +.male + ld a, 1 +.okay_gender + ld [hli], a ; cursor y + ld a, $1 + ld [hli], a ; cursor x + xor a + ld [hli], a ; off char + ld [hli], a ; cursor tile + ld [hli], a ; cursor tile + 1 + ret + +Function4876f: + call Function48283 + hlcoord 1, 16 + ld de, MobileDesc_Age + call PlaceString + ld hl, MenuHeader_0x48509 + call LoadMenuHeader + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + hlcoord 10, 5 + ld b, $1 + ld c, $8 + call Function48cdc + call WaitBGMap + ld a, [wd473] + and a + jr z, .asm_487ab + cp $64 + jr z, .asm_487b2 + hlcoord 12, 5 + ld [hl], $10 + hlcoord 12, 7 + ld [hl], $11 + jr .asm_487b7 +.asm_487ab + hlcoord 12, 5 + ld [hl], $10 + jr .asm_487b7 +.asm_487b2 + hlcoord 12, 7 + ld [hl], $11 +.asm_487b7 + hlcoord 11, 6 + call Function487ec + ld c, 10 + call DelayFrames + ld a, [wd473] + push af +.asm_487c6 + call JoyTextDelay + call Function4880e + jr nc, .asm_487c6 + ld a, $1 + call MenuClickSound + pop bc + jr nz, .asm_487da + ld a, b + ld [wd473], a +.asm_487da + ld a, [wd473] + call ExitMenu + hlcoord 11, 6 + call Function487ec + pop af + ldh [hInMenu], a + jp Function4840c + +Function487ec: + push hl + ld de, wd473 + call Function487ff + pop hl +rept 4 + inc hl +endr + ld de, String_4880d + call PlaceString + ret + +Function487ff: + push hl + ld a, " " + ld [hli], a + ld [hl], a + pop hl + ld b, PRINTNUM_LEADINGZEROS | 1 + ld c, 3 + call PrintNum + ret + +String_4880d: + db "@" + +Function4880e: + ldh a, [hJoyPressed] + and A_BUTTON + jp nz, Function488b9 + ldh a, [hJoyPressed] + and B_BUTTON + jp nz, Function488b4 + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .asm_48843 + ld a, [hl] + and D_DOWN + jr nz, .asm_48838 + ld a, [hl] + and D_LEFT + jr nz, .asm_4884f + ld a, [hl] + and D_RIGHT + jr nz, .asm_4885f + call DelayFrame + and a + ret +.asm_48838 + ld hl, wd473 + ld a, [hl] + and a + jr z, .asm_48840 + dec a +.asm_48840 + ld [hl], a + jr .asm_4886f +.asm_48843 + ld hl, wd473 + ld a, [hl] + cp $64 + jr nc, .asm_4884c + inc a +.asm_4884c + ld [hl], a + jr .asm_4886f +.asm_4884f + ld a, [wd473] + cp $5b + jr c, .asm_48858 + ld a, $5a +.asm_48858 + add $a + ld [wd473], a + jr .asm_4886f +.asm_4885f + ld a, [wd473] + cp $a + jr nc, .asm_48868 + ld a, $a +.asm_48868 + sub $a + ld [wd473], a + jr .asm_4886f +.asm_4886f + ld a, [wd473] + and a + jr z, .asm_48887 + cp $64 + jr z, .asm_48898 + jr z, .asm_488a7 + hlcoord 12, 5 + ld [hl], $10 + hlcoord 12, 7 + ld [hl], $11 + jr .asm_488a7 +.asm_48887 + hlcoord 10, 5 + ld b, $1 + ld c, $8 + call Function48cdc + hlcoord 12, 5 + ld [hl], $10 + jr .asm_488a7 +.asm_48898 + hlcoord 10, 5 + ld b, $1 + ld c, $8 + call Function48cdc + hlcoord 12, 7 + ld [hl], $11 +.asm_488a7 + hlcoord 11, 6 + call Function487ec + call WaitBGMap + ld a, $1 + and a + ret + +Function488b4: + ld a, $0 + and a + scf + ret + +Function488b9: + ld a, [wd003] + set 1, a + ld [wd003], a + scf + ret + +MobileUpArrowGFX: +INCBIN "gfx/mobile/up_arrow.1bpp" + +MobileDownArrowGFX: +INCBIN "gfx/mobile/down_arrow.1bpp" + +Function488d3: + call Function48283 + hlcoord 1, 16 + ld de, MobileDesc_ZipCode + call PlaceString + call Function48a3a + jp c, Function4840c + ld hl, MenuHeader_0x4850e + call LoadMenuHeader + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + hlcoord 10, 9 + ld b, $1 + ld c, $8 + call Function48cdc + ld a, [wd475] + and $f + ld d, $0 + hlcoord 11, 10 + call Function489ea + call WaitBGMap + ld a, [wd475] + ld b, a + ld a, [wd476] + ld c, a + ld a, [wd477] + ld d, a + ld a, [wd478] + ld e, a + push de + push bc + ld d, $0 + ld b, $0 + +asm_48922: + push bc + call JoyTextDelay + ldh a, [hJoyDown] + and a + jp z, Function4896e + bit 0, a + jp nz, Function4896e + bit 1, a + jp nz, Function4896e + ld a, [wd002] + and %11001111 + res 7, a + ld [wd002], a + pop bc + inc b + ld a, b + cp $5 + push bc + jr c, .asm_4894c + pop bc + ld b, $4 + push bc +.asm_4894c + pop bc + push bc + ld a, b + cp $4 + jr nz, asm_48972 + ld c, 10 + call DelayFrames + jr asm_48972 + +Function4895a: ; unreferenced + ldh a, [hJoyPressed] + and a + jr z, .asm_48965 + pop bc + ld b, $1 + push bc + jr asm_48972 + +.asm_48965 + ldh a, [hJoyLast] + and a + jr z, asm_48972 + + pop bc + ld b, $1 + push bc + +Function4896e: + pop bc + ld b, $0 + push bc + +asm_48972: + call Function48ab5 + push af + cp $f0 + jr z, .asm_48994 + cp $f + jr nz, .asm_48988 + ld a, [wd002] + set 7, a + and $cf + ld [wd002], a +.asm_48988 + hlcoord 11, 10 + ld b, $0 + ld c, d + add hl, bc + ld b, $3 + call Function48c11 +.asm_48994 + call WaitBGMap + pop af + pop bc + jr nc, asm_48922 + jr nz, .asm_489b1 + pop bc + ld a, b + ld [wd475], a + ld a, c + ld [wd476], a + pop bc + ld a, b + ld [wd477], a + ld a, c + ld [wd478], a + jr .asm_489c5 +.asm_489b1 + push af + ld a, [wd479] + set 0, a + ld [wd479], a + ld a, [wd003] + set 3, a + ld [wd003], a + pop af + pop bc + pop bc +.asm_489c5 + push af + push bc + push de + push hl + ld a, $1 + call MenuClickSound + pop hl + pop de + pop bc + pop af + call ExitMenu + hlcoord 11, 10 + call Function489ea + hlcoord 11, 9 + lb bc, 1, 8 + call ClearBox + pop af + ldh [hInMenu], a + jp Function4840c + +Function489ea: + push de + ld a, [wd475] + and $f + call Mobile12_Bin2Dec + ld a, [wd476] + and $f0 + swap a + inc hl + call Mobile12_Bin2Dec + ld a, [wd476] + and $f + inc hl + call Mobile12_Bin2Dec + inc hl + ld de, String_48a38 + call PlaceString + ld a, [wd477] + and $f0 + swap a + inc hl + call Mobile12_Bin2Dec + ld a, [wd477] + and $f + inc hl + call Mobile12_Bin2Dec + ld a, [wd478] + and $f0 + swap a + inc hl + call Mobile12_Bin2Dec + ld a, [wd478] + and $f + inc hl + call Mobile12_Bin2Dec + pop de + ret + +String_48a38: + db "-@" + +Function48a3a: + ld hl, MenuHeader_0x48a9c + call LoadMenuHeader + call Function4873c + ld a, $a + ld [w2DMenuCursorInitY], a + ld a, $b + ld [w2DMenuCursorInitX], a + ld a, $1 + ld [wMenuCursorY], a + hlcoord 10, 8 + ld b, $4 + ld c, $8 + call Function48cdc + hlcoord 12, 10 + ld de, String_48aa1 + call PlaceString + call StaticMenuJoypad + push af + call PlayClickSFX + call ExitMenu + pop af + bit 1, a + jp nz, Function48a9a + ld a, [wMenuCursorY] + cp $1 + jr z, .asm_48a98 + ld a, [wd003] + set 3, a + ld [wd003], a + ld a, [wd479] + res 0, a + ld [wd479], a + xor a + ld bc, $4 + ld hl, wd475 + call ByteFill + jr Function48a9a +.asm_48a98 + and a + ret + +Function48a9a: + scf + ret + +MenuHeader_0x48a9c: + db MENU_BACKUP_TILES ; flags + menu_coords 10, 8, SCREEN_WIDTH - 1, 13 + +String_48aa1: + db "Tell Now" + next "Tell Later@" + +Function48ab5: + ldh a, [hJoyPressed] + and A_BUTTON + jp nz, Function48c0f + ldh a, [hJoyPressed] + and B_BUTTON + jp nz, Function48c0d + ld a, d + and a + jr z, .asm_48adf + cp $1 + jr z, .asm_48ae7 + cp $2 + jr z, .asm_48af1 + cp $3 + jr z, .asm_48af9 + cp $4 + jr z, .asm_48b03 + cp $5 + jr z, .asm_48b0b + cp $6 + jr .asm_48b15 +.asm_48adf + ld hl, wd475 + ld a, [hl] + and $f + jr .asm_48b1d +.asm_48ae7 + ld hl, wd476 + ld a, [hl] + swap a + or $f0 + jr .asm_48b1d +.asm_48af1 + ld hl, wd476 + ld a, [hl] + and $f + jr .asm_48b1d +.asm_48af9 + ld hl, wd477 + ld a, [hl] + swap a + or $f0 + jr .asm_48b1d +.asm_48b03 + ld hl, wd477 + ld a, [hl] + and $f + jr .asm_48b1d +.asm_48b0b + ld hl, wd478 + ld a, [hl] + swap a + or $f0 + jr .asm_48b1d +.asm_48b15 + ld hl, wd478 + ld a, [hl] + and $f + jr .asm_48b1d +.asm_48b1d + push hl + push af + ld e, $0 + hlcoord 11, 10 + ld a, d +.asm_48b25 + and a + jr z, .asm_48b2c + inc e + dec a + jr .asm_48b25 +.asm_48b2c + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .asm_48b8d + ld a, [hl] + and D_DOWN + jr nz, .asm_48b55 + ld a, [hl] + and D_LEFT + jp nz, Function48bd7 + ld a, [hl] + and D_RIGHT + jr nz, .asm_48b9d + hlcoord 11, 10 + call Function489ea + ld a, [wd002] + bit 7, a + jr nz, .asm_48b51 +.asm_48b51 + pop bc + pop bc + and a + ret +.asm_48b55 + pop af + ld b, a + and $f + and a + ld a, b + jr nz, .asm_48b61 + and $f0 + add $a +.asm_48b61 + dec a +.asm_48b62 + push de + push af + hlcoord 10, 9 + ld b, $1 + ld c, $8 + call Function48cdc + pop af + pop de + hlcoord 11, 10 + ld b, a + ld a, d + cp $3 + jr c, .asm_48b7a + inc hl +.asm_48b7a + ld a, b + pop hl + bit 7, a + jr z, .asm_48b85 + call Function48c4d + jr .asm_48b88 +.asm_48b85 + call Function48c5a +.asm_48b88 + ld a, $f0 + jp Function48c00 +.asm_48b8d + pop af + ld b, a + and $f + cp $9 + ld a, b + jr c, .asm_48b9a + and $f0 + add $ff +.asm_48b9a + inc a + jr .asm_48b62 +.asm_48b9d + push de + hlcoord 10, 9 + ld b, $1 + ld c, $8 + call Function48cdc + pop de + ld a, d + cp $6 + jr nc, .asm_48baf + inc d +.asm_48baf + pop af + pop hl + ld b, a + ld a, d + cp $6 + ld a, b + jr z, .asm_48bc4 + bit 7, a + jr nz, .asm_48bc4 + inc hl + ld a, [hl] + swap a + and $f + jr asm_48bc7 +.asm_48bc4 + ld a, [hl] + and $f + +asm_48bc7: + hlcoord 11, 10 + push af + ld a, d + cp $3 + pop bc + ld a, b + jr c, .asm_48bd3 + inc hl +.asm_48bd3 + ld a, $f + jr Function48c00 + +Function48bd7: + push de + hlcoord 10, 9 + ld b, $1 + ld c, $8 + call Function48cdc + pop de + ld a, d + and a + pop af + pop hl + ld b, a + ld a, d + and a + ld a, b + jr z, .asm_48bf3 + bit 7, a + jr z, .asm_48bf8 + dec d + dec hl +.asm_48bf3 + ld a, [hl] + and $f + jr asm_48bc7 +.asm_48bf8 + dec d + ld a, [hl] + swap a + and $f + jr asm_48bc7 + +Function48c00: + push af + hlcoord 11, 10 + call Function489ea + ld a, $1 + and a + pop bc + ld a, b + ret + +Function48c0d: + xor a + and a + +Function48c0f: + scf + ret + +Function48c11: + ld a, [wd002] + bit 7, a + jr z, .asm_48c20 + ld a, d + cp $3 + jr c, .asm_48c1e + inc hl +.asm_48c1e + ld [hl], $7f +.asm_48c20 + ld a, [wd002] + swap a + and $3 + inc a + cp b + jr nz, .asm_48c40 + ld a, [wd002] + bit 7, a + jr z, .asm_48c3a + res 7, a + ld [wd002], a + xor a + jr .asm_48c40 +.asm_48c3a + set 7, a + ld [wd002], a + xor a +.asm_48c40 + swap a + ld b, a + ld a, [wd002] + and $cf + or b + ld [wd002], a + ret + +Function48c4d: + swap a + and $f0 + push af + ld a, [hl] + and $f + ld [hl], a + pop af + or [hl] + ld [hl], a + ret + +Function48c5a: + push af + ld a, [hl] + and $f0 + ld [hl], a + pop af + or [hl] + ld [hl], a + ret + +Function48c63: + ld a, "@" + ld [de], a + ld a, c + cp $30 + jr nc, .asm_48c8c + and a + jr z, .asm_48c8c + dec c + push de + ld h, d + ld l, e + ld a, "@" + ld b, 7 +.asm_48c76 + ld [hli], a + dec b + jr nz, .asm_48c76 + ld hl, Prefectures + ld a, c + call GetNthString +.asm_48c81 + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + cp "@" + jr nz, .asm_48c81 + and a + pop de + ret + +.asm_48c8c + scf + ret + +Function48c8e: ; unreferenced + ld hl, wd019 + $11 + ld d, h + ld e, l + farcall Function48c63 + hlcoord 10, 7 + call PlaceString + call WaitBGMap + ret + +Function48ca3: ; unreferenced + push af + push bc + push de + push hl + ld b, 0 + ld c, 0 + ld d, 0 +.asm_48cad + cp 100 + jr c, .asm_48cb6 + sub 100 + inc b + jr .asm_48cad + +.asm_48cb6 + cp 10 + jr c, .asm_48cbf + sub 10 + inc c + jr .asm_48cb6 + +.asm_48cbf + cp 1 + jr c, .asm_48cc7 + dec a + inc d + jr .asm_48cbf + +.asm_48cc7 + ld a, b + call Mobile12_Bin2Dec + inc hl + ld a, c + call Mobile12_Bin2Dec + inc hl + ld a, d + call Mobile12_Bin2Dec + pop hl + pop de + pop bc + pop af + ret + +Function48cda: + ld h, d + ld l, e + +Function48cdc: + push bc + push hl + call Function48cfd + pop hl + pop bc + ld de, wAttrmap - wTilemap + add hl, de + inc b + inc b + inc c + inc c + ld a, $0 +.asm_48ced + push bc + push hl +.asm_48cef + ld [hli], a + dec c + jr nz, .asm_48cef + pop hl + ld de, $14 + add hl, de + pop bc + dec b + jr nz, .asm_48ced + ret + +Function48cfd: + push hl + ld a, $4 + ld [hli], a + inc a + call Function48d2a + inc a + ld [hl], a + pop hl + ld de, $14 + add hl, de +.asm_48d0c + push hl + ld a, $7 + ld [hli], a + ld a, $7f + call Function48d2a + ld [hl], $8 + pop hl + ld de, $14 + add hl, de + dec b + jr nz, .asm_48d0c + ld a, $9 + ld [hli], a + ld a, $a + call Function48d2a + ld [hl], $b + ret + +Function48d2a: + ld d, c +.asm_48d2b + ld [hli], a + dec d + jr nz, .asm_48d2b + ret + +Function48d30: + ld hl, wd475 + call Function48d4a + ld hl, wd477 + call Function48d4a + ret + +Function48d3d: + ld hl, wd475 + call Function48d94 + ld hl, wd477 + call Function48d94 + ret + +Function48d4a: + inc hl + ld a, [hl] + ld b, a + and $f + ld c, a + srl b + srl b + srl b + srl b + push bc + ld c, 10 + ld a, b + call SimpleMultiply + pop bc + add c + ld [hld], a + xor a + ldh [hMultiplicand + 0], a + ldh [hMultiplicand + 1], a + ld a, [hl] + srl a + srl a + srl a + srl a + ld c, 10 + call SimpleMultiply + ld b, a + ld a, [hli] + and $f + add b + ldh [hMultiplicand + 2], a + ld a, 100 + ldh [hMultiplier], a + call Multiply + ldh a, [hProduct + 2] + ld b, a + ldh a, [hProduct + 3] + ld c, a + ld e, [hl] + add e + ld c, a + ld a, b + adc 0 + ld b, a + ld a, c + ld [hld], a + ld [hl], b + ret + +Function48d94: + xor a + ldh [hDividend + 0], a + ldh [hDividend + 1], a + ld a, [hli] + ldh [hDividend + 0], a + ld a, [hl] + ldh [hDividend + 1], a + ld a, 100 + ldh [hDivisor], a + ld b, 2 + call Divide + ldh a, [hRemainder] + ld c, 10 + call SimpleDivide + sla b + sla b + sla b + sla b + or b + ld [hld], a + ldh a, [hQuotient + 3] + ld c, 10 + call SimpleDivide + sla b + sla b + sla b + sla b + or b + ld [hl], a + ret diff --git a/mobile/mobile_12_2.asm b/mobile/mobile_12_2.asm new file mode 100644 index 0000000..8e43d3b --- /dev/null +++ b/mobile/mobile_12_2.asm @@ -0,0 +1,912 @@ +MobileCheckOwnMonAnywhere: +; Like CheckOwnMonAnywhere, but only checks for species. +; OT/ID don't matter. + +; inputs: +; [wScriptVar] should contain the species we're looking for. + +; outputs: +; sets carry if monster matches species. + + ; If there are no monsters in the party, + ; the player must not own any yet. + + ld a, [wPartyCount] + and a + ret z + + ld d, a + ld e, 0 + ld hl, wPartyMon1Species + ld bc, wPartyMonOTs + + ; Run .CheckMatch on each Pokémon in the party. + +.partymon + call .CheckMatch + ret c + + push bc + ld bc, PARTYMON_STRUCT_LENGTH + add hl, bc + pop bc + call .AdvanceOTName + dec d + jr nz, .partymon + + ; Run .CheckMatch on each Pokémon in the PC. + + ld a, BANK(sBoxCount) + call OpenSRAM + ld a, [sBoxCount] + and a + jr z, .boxes + + ld d, a + ld hl, sBoxMon1Species + ld bc, sBoxMonOTs +.openboxmon + call .CheckMatch + jr nc, .loop + + call CloseSRAM + ret + +.loop + push bc + ld bc, BOXMON_STRUCT_LENGTH + add hl, bc + pop bc + call .AdvanceOTName + dec d + jr nz, .openboxmon + + ; Run .CheckMatch on each monster in the other 13 PC boxes. + +.boxes + call CloseSRAM + + ld c, 0 + ld a, [wScriptVar] + call GetPokemonIndexFromID + ld d, h + ld e, l +.box + ; Don't search the current box again. + ld a, [wCurBox] + and $f + cp c + jr z, .loopbox + + ; Load the box. + + ld hl, .BoxAddresses + ld b, 0 + add hl, bc + add hl, bc + add hl, bc + ld a, [hli] + call OpenSRAM + ld a, [hli] + ld h, [hl] + ld l, a + + ; Number of monsters in the box + + ld b, MONS_PER_BOX +.box_search_loop + ld a, [hli] + cp e + ld a, [hli] + jr nz, .next_box_mon + cp d + jr z, .found_in_box +.next_box_mon + dec b + jr nz, .box_search_loop + +.loopbox + inc c + ld a, c + cp NUM_BOXES + jr c, .box + + call CloseSRAM + and a + ret + +.found_in_box + call CloseSRAM + scf + ret + +.CheckMatch: + ; Check if a Pokémon is of a specific species. + ; We compare the species we are looking for in + ; [wScriptVar] to the species we have in [hl]. + ; Sets carry flag if species matches. + + push bc + push hl + push de + ld d, b + ld e, c + + ; check species + + ld a, [wScriptVar] + ld b, [hl] + cp b + jr nz, .no_match + jr .match + +.no_match + pop de + pop hl + pop bc + and a + ret + +.match + pop de + pop hl + pop bc + scf + ret + +.BoxAddresses: + table_width 3, MobileCheckOwnMonAnywhere.BoxAddresses +for n, 1, NUM_BOXES + 1 + dba sBox{d:n}PokemonIndexes +endr + assert_table_length NUM_BOXES + +.AdvanceOTName: + push hl + ld hl, NAME_LENGTH + add hl, bc + ld b, h + ld c, l + pop hl + ret + +UnusedFindItemInPCOrBag: + ld a, [wScriptVar] + ld [wCurItem], a + ld hl, wNumPCItems + call CheckItem + jr c, .found + + ld a, [wScriptVar] + ld [wCurItem], a + ld hl, wNumItems + call CheckItem + jr c, .found + + xor a + ld [wScriptVar], a + ret + +.found + ld a, 1 + ld [wScriptVar], a + ret + +Function4a94e: + call FadeToMenu + ld a, -1 + ld hl, wd002 + ld bc, 3 + call ByteFill + xor a + ld [wd018], a + ld [wd019], a + ld b, SCGB_PACKPALS + call GetSGBLayout + call SetPalettes + call Function4aa22 + jr c, .asm_4a985 + jr z, .asm_4a9a1 + jr .asm_4a97b + +.asm_4a974 + call Function4aa25 + jr c, .asm_4a985 + jr z, .asm_4a9a1 + +.asm_4a97b + call Function4ac58 + ld hl, wd019 + res 1, [hl] + jr .asm_4a974 + +.asm_4a985 + ld a, [wd018] + and a + jr nz, .asm_4a990 + call Function4aba8 + jr c, .asm_4a974 + +.asm_4a990 + call CloseSubmenu + ld hl, wd002 + ld a, -1 + ld bc, 3 + call ByteFill + scf + jr .asm_4a9af + +.asm_4a9a1 + call Function4a9c3 + jr c, .asm_4a9b0 + call Function4a9d7 + jr c, .asm_4a974 + call CloseSubmenu + and a + +.asm_4a9af + ret + +.asm_4a9b0 + ld de, SFX_WRONG + call PlaySFX + ld hl, MobilePickThreeMonForBattleText + call PrintText + jr .asm_4a974 + +MobilePickThreeMonForBattleText: + text_far _MobilePickThreeMonForBattleText + text_end + +Function4a9c3: + ld hl, wd002 + ld a, $ff + cp [hl] + jr z, .asm_4a9d5 + inc hl + cp [hl] + jr z, .asm_4a9d5 + inc hl + cp [hl] + jr z, .asm_4a9d5 + and a + ret + +.asm_4a9d5 + scf + ret + +Function4a9d7: + ld a, [wd002] + ld hl, wPartyMonNicknames + call GetNickname + ld h, d + ld l, e + ld de, wMobileParticipant1Nickname + ld bc, NAME_LENGTH_JAPANESE + call CopyBytes + ld a, [wd003] + ld hl, wPartyMonNicknames + call GetNickname + ld h, d + ld l, e + ld de, wMobileParticipant2Nickname + ld bc, NAME_LENGTH_JAPANESE + call CopyBytes + ld a, [wd004] + ld hl, wPartyMonNicknames + call GetNickname + ld h, d + ld l, e + ld de, wMobileParticipant3Nickname + ld bc, NAME_LENGTH_JAPANESE + call CopyBytes + ld hl, MobileUseTheseThreeMonText + call PrintText + call YesNoBox + ret + +MobileUseTheseThreeMonText: + text_far _MobileUseTheseThreeMonText + text_end + +Function4aa22: + call ClearBGPalettes + +Function4aa25: + farcall LoadPartyMenuGFX + farcall InitPartyMenuWithCancel + call Function4aad3 + +Function4aa34: + ld a, PARTYMENUACTION_MOBILE + ld [wPartyMenuActionText], a + farcall WritePartyMenuTilemap + xor a + ld [wPartyMenuActionText], a + farcall PrintPartyMenuText + call Function4aab6 + call WaitBGMap + call SetPalettes + call DelayFrame + call Function4ab1a + jr z, .asm_4aa66 + push af + call Function4aafb + jr c, .asm_4aa67 + call Function4ab06 + jr c, .asm_4aa67 + pop af + +.asm_4aa66 + ret + +.asm_4aa67 + ld hl, wd019 + set 1, [hl] + pop af + ret + +Function4aa6e: ; unreferenced + pop af + ld de, SFX_WRONG + call PlaySFX + call WaitSFX + jr Function4aa34 + +Function4aa7a: + ld hl, wd002 + ld d, $3 +.loop + ld e, PARTY_LENGTH + ld a, [hli] + push de + push hl + cp -1 + jr z, .done + ld hl, wSpriteAnimationStructs + inc a + ld d, a +.inner_loop + ld a, [hl] + and a + jr z, .next + cp d + jr z, .same_as_d + jr .next + + ld a, $3 + jr .proceed + +.same_as_d + ld a, $2 + +.proceed + push hl + ld c, l + ld b, h + ld hl, $2 + add hl, bc + ld [hl], a + pop hl + +.next + ld bc, $10 + add hl, bc + dec e + jr nz, .inner_loop + pop hl + pop de + dec d + jr nz, .loop + jr .finished + +.done + pop hl + pop de + +.finished + ret + +Function4aab6: + ld hl, wd002 + ld d, $3 +.loop + ld a, [hli] + cp -1 + jr z, .done + push de + push hl + hlcoord 0, 1 + ld bc, $28 + call AddNTimes + ld [hl], $ec + pop hl + pop de + dec d + jr nz, .loop + +.done + ret + +Function4aad3: + ld hl, wPartyCount + ld a, [hli] + and a + ret z ; Nothing in your party + + ld c, a + xor a + ldh [hObjectStructIndex], a +.loop + push bc + push hl + ld e, MONICON_PARTYMENU + farcall LoadMenuMonIcon + ldh a, [hObjectStructIndex] + inc a + ldh [hObjectStructIndex], a + pop hl + pop bc + dec c + jr nz, .loop + + call Function4aa7a + farcall PlaySpriteAnimations + ret + +Function4aafb: + ld a, [wCurPartySpecies] + cp EGG + jr z, .egg + and a + ret + +.egg + scf + ret + +Function4ab06: + ld a, [wCurPartyMon] + ld bc, PARTYMON_STRUCT_LENGTH + ld hl, wPartyMon1HP + call AddNTimes + ld a, [hli] + ld b, a + ld a, [hl] + or b + jr nz, .NotFainted + scf + +.NotFainted: + ret + +Function4ab1a: +.asm_4ab1a + ld a, $fb + ld [wMenuJoypadFilter], a + ld a, $26 + ld [w2DMenuCursorOffsets], a + ld a, $2 + ld [w2DMenuNumCols], a + call Function4adf7 + call StaticMenuJoypad + call Function4abc3 + jr c, .asm_4ab1a + push af + call Function4ab99 + call nc, PlaceHollowCursor + pop af + bit 1, a + jr nz, .asm_4ab6d + ld a, [wPartyCount] + inc a + ld b, a + ld a, [wMenuCursorY] + ld [wPartyMenuCursor], a + cp b + jr z, .asm_4ab7e + ld a, [wMenuCursorY] + dec a + ld [wCurPartyMon], a + ld c, a + ld b, 0 + ld hl, wPartySpecies + add hl, bc + ld a, [hl] + ld [wCurPartySpecies], a + ld de, SFX_READ_TEXT_2 + call PlaySFX + call WaitSFX + ld a, $1 + and a + ret + +.asm_4ab6d + ld a, [wMenuCursorY] + ld [wPartyMenuCursor], a +.asm_4ab73 + ld de, SFX_READ_TEXT_2 + call PlaySFX + call WaitSFX + scf + ret + +.asm_4ab7e + ld a, $1 + ld [wd018], a + ld a, [wMenuCursorX] + cp $2 + jr z, .asm_4ab73 + ld de, SFX_READ_TEXT_2 + call PlaySFX + call WaitSFX + xor a + ld [wd018], a + and a + ret + +Function4ab99: + bit 1, a + jr z, .asm_4aba6 + ld a, [wd002] + cp $ff + jr z, .asm_4aba6 + scf + ret + +.asm_4aba6 + and a + ret + +Function4aba8: + ld hl, wd004 + ld a, [hl] + cp $ff + jr nz, .asm_4abbe + dec hl + ld a, [hl] + cp $ff + jr nz, .asm_4abbe + dec hl + ld a, [hl] + cp $ff + jr nz, .asm_4abbe + and a + ret + +.asm_4abbe + ld a, $ff + ld [hl], a + scf + ret + +Function4abc3: + bit 3, a + jr z, .asm_4abd5 + ld a, [wPartyCount] + inc a + ld [wMenuCursorY], a + ld a, $1 + ld [wMenuCursorX], a + jr .asm_4ac29 + +.asm_4abd5 + bit 6, a + jr z, .asm_4abeb + ld a, [wMenuCursorY] + ld [wMenuCursorY], a + and a + jr nz, .asm_4ac29 + ld a, [wPartyCount] + inc a + ld [wMenuCursorY], a + jr .asm_4ac29 + +.asm_4abeb + bit 7, a + jr z, .asm_4ac08 + ld a, [wMenuCursorY] + ld [wMenuCursorY], a + ld a, [wPartyCount] + inc a + inc a + ld b, a + ld a, [wMenuCursorY] + cp b + jr nz, .asm_4ac29 + ld a, $1 + ld [wMenuCursorY], a + jr .asm_4ac29 + +.asm_4ac08 + bit 4, a + jr nz, .asm_4ac10 + bit 5, a + jr z, .asm_4ac56 + +.asm_4ac10 + ld a, [wMenuCursorY] + ld b, a + ld a, [wPartyCount] + inc a + cp b + jr nz, .asm_4ac29 + ld a, [wMenuCursorX] + cp $1 + jr z, .asm_4ac26 + ld a, $1 + jr .asm_4ac29 + +.asm_4ac26 + ld [wMenuCursorX], a + +.asm_4ac29 + hlcoord 0, 1 + lb bc, 13, 1 + call ClearBox + call Function4aab6 + ld a, [wPartyCount] + hlcoord 6, 1 +.asm_4ac3b + ld bc, $28 + add hl, bc + dec a + jr nz, .asm_4ac3b + ld [hl], $7f + ld a, [wMenuCursorY] + ld b, a + ld a, [wPartyCount] + inc a + cp b + jr z, .asm_4ac54 + ld a, $1 + ld [wMenuCursorX], a + +.asm_4ac54 + scf + ret + +.asm_4ac56 + and a + ret + +Function4ac58: + lb bc, 2, 18 + hlcoord 1, 15 + call ClearBox + farcall FreezeMonIcons + ld hl, MenuHeader_0x4aca2 + call LoadMenuHeader + ld hl, wd019 + bit 1, [hl] + jr z, .asm_4ac89 + hlcoord 11, 13 + ld b, $3 + ld c, $7 + call Textbox + hlcoord 13, 14 + ld de, String_4ada7 + call PlaceString + jr .asm_4ac96 + +.asm_4ac89 + hlcoord 11, 9 + ld b, $7 + ld c, $7 + call Textbox + call Function4ad68 + +.asm_4ac96 + ld a, $1 + ldh [hBGMapMode], a + call Function4acaa + call ExitMenu + and a + ret + +MenuHeader_0x4aca2: + db MENU_BACKUP_TILES ; flags + menu_coords 11, 9, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw NULL + db 1 ; default option + +Function4acaa: +.asm_4acaa + ld a, $a0 + ld [wMenuDataFlags], a + ld a, [wd019] + bit 1, a + jr z, .asm_4acc2 + ld a, $2 + ld [wMenuDataItems], a + ld a, $c + ld [wMenuBorderTopCoord], a + jr .asm_4accc + +.asm_4acc2 + ld a, $4 + ld [wMenuDataItems], a + ld a, $8 + ld [wMenuBorderTopCoord], a + +.asm_4accc + ld a, $b + ld [wMenuBorderLeftCoord], a + ld a, $1 + ld [wMenuCursorPosition], a + call InitVerticalMenuCursor + ld hl, w2DMenuFlags1 + set 6, [hl] + call StaticMenuJoypad + ld de, SFX_READ_TEXT_2 + call PlaySFX + ldh a, [hJoyPressed] + bit 0, a + jr nz, .asm_4acf4 + bit 1, a + jr nz, .asm_4acf3 + jr .asm_4acaa + +.asm_4acf3 + ret + +.asm_4acf4 + ld a, [wd019] + bit 1, a + jr nz, .asm_4ad0e + ld a, [wMenuCursorY] + cp $1 + jr z, Function4ad17 + cp $2 + jp z, Function4ad56 + cp $3 + jp z, Function4ad60 + jr .asm_4acf3 + +.asm_4ad0e + ld a, [wMenuCursorY] + cp $1 + jr z, Function4ad56 + jr .asm_4acf3 + +Function4ad17: + call Function4adb2 + jr z, .asm_4ad4a + ld hl, wd002 + ld a, $ff + cp [hl] + jr z, .asm_4ad39 + inc hl + cp [hl] + jr z, .asm_4ad39 + inc hl + cp [hl] + jr z, .asm_4ad39 + ld de, SFX_WRONG + call WaitPlaySFX + ld hl, MobileOnlyThreeMonMayEnterText + call PrintText + ret + +.asm_4ad39 + ld a, [wCurPartyMon] + ld [hl], a + call Function4a9c3 + ret c + ld a, [wd019] + set 0, a + ld [wd019], a + ret + +.asm_4ad4a + ld a, $ff + ld [hl], a + call Function4adc2 + ret + +MobileOnlyThreeMonMayEnterText: + text_far _MobileOnlyThreeMonMayEnterText + text_end + +Function4ad56: + farcall OpenPartyStats + call WaitBGMap2 + ret + +Function4ad60: + farcall ManagePokemonMoves + ret + +Function4ad67: ; unreferenced + ret + +Function4ad68: + hlcoord 13, 12 + ld de, String_4ad88 + call PlaceString + call Function4adb2 + jr c, .asm_4ad7e + hlcoord 13, 10 + ld de, String_4ada0 + jr .asm_4ad84 + +.asm_4ad7e + hlcoord 13, 10 + ld de, String_4ad9a + +.asm_4ad84 + call PlaceString + ret + +String_4ad88: + db "つよさをみる" + next "つかえるわざ" + next "もどる@" + +String_4ad9a: + db "さんかする@" + +String_4ada0: + db "さんかしない@" + +String_4ada7: + db "つよさをみる" + next "もどる@" ; BACK + +Function4adb2: + ld hl, wd002 + ld a, [wCurPartyMon] + cp [hl] + ret z + inc hl + cp [hl] + ret z + inc hl + cp [hl] + ret z + scf + ret + +Function4adc2: + ld a, [wd002] + cp $ff + jr nz, .skip + ld a, [wd003] + cp $ff + jr nz, .skip2 + ld a, [wd004] + ld [wd002], a + ld a, $ff + ld [wd004], a + jr .skip + +.skip2 + ld [wd002], a + ld a, $ff + ld [wd003], a + +.skip + ld a, [wd003] + cp $ff + ret nz + ld b, a + ld a, [wd004] + ld [wd003], a + ld a, b + ld [wd004], a + ret + +Function4adf7: + ld a, [wd019] + bit 0, a + ret z + ld a, [wPartyCount] + inc a + ld [wMenuCursorY], a + ld a, $1 + ld [wMenuCursorX], a + ld a, [wd019] + res 0, a + ld [wd019], a + ret diff --git a/mobile/mobile_22.asm b/mobile/mobile_22.asm new file mode 100644 index 0000000..f841935 --- /dev/null +++ b/mobile/mobile_22.asm @@ -0,0 +1,4244 @@ +String_89116: + db "-----@" + +String_8911c: + db "でんわばんごうが ただしく" ; Phone number is not + next "はいって いません!@" ; entered correctly! + +String_89135: + db "データが かわって いますが" ; The data has changed. + next "かきかえないで やめますか?@" ; Quit anyway? + +String_89153: + db "メッセージは ありません@" ; No message + +OpenSRAMBank4: + push af + ld a, $4 + call OpenSRAM + pop af + ret + +Function89168: + ld hl, wGameTimerPaused + set GAME_TIMER_MOBILE_F, [hl] + ret + +Function8916e: + ld hl, wGameTimerPaused + res GAME_TIMER_MOBILE_F, [hl] + ret + +Function89174: + ld hl, wGameTimerPaused + bit GAME_TIMER_MOBILE_F, [hl] + ret + +Function8917a: + ld hl, wd002 + ld bc, $32 + xor a + call ByteFill + ret + +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. + push de + push hl +.loop + ld a, [de] + inc de + cp [hl] + jr nz, .done + inc hl + dec c + jr nz, .loop +.done + pop hl + pop de + ret + +Function89193: +; copy(hl, de, 4) +; Copies c bytes from hl to de. +; Preserves hl and de. + push de + push hl +.loop + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .loop + pop hl + pop de + ret + +Function8919e: +; Searches for the c'th string starting at de. Returns the pointer in de. + ld a, c + and a + ret z +.loop + ld a, [de] + inc de + cp "@" + jr nz, .loop + dec c + jr nz, .loop + ret + +Function891ab: + call Mobile22_SetBGMapMode1 + farcall ReloadMapPart + call Mobile22_SetBGMapMode0 + ret + +Function891b8: + call Mobile22_SetBGMapMode0 + hlcoord 0, 0 + ld a, " " + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + call DelayFrame + ret + +Function891ca: + push bc + call Function891b8 + call WaitBGMap + pop bc + ret + +Function891d3: + push bc + call Function891ca + ld c, $10 + call DelayFrames + pop bc + ret + +Function891de: + call Mobile22_SetBGMapMode0 + call ClearPalettes + hlcoord 0, 0, wAttrmap + ld a, $7 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + hlcoord 0, 0 + ld a, " " + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + call Function891ab + ret + +Function891fe: + push bc + call Function891de + ld c, $10 + call DelayFrames + pop bc + ret + +Mobile_EnableSpriteUpdates: + ld a, 1 + ld [wSpriteUpdatesEnabled], a + ret + +Mobile_DisableSpriteUpdates: + ld a, 0 + ld [wSpriteUpdatesEnabled], a + ret + +Function89215: + push hl + push bc + ld bc, wAttrmap - wTilemap + add hl, bc + ld [hl], a + pop bc + pop hl + ret + +Function8921f: + push de + ld de, SCREEN_WIDTH + add hl, de + inc hl + ld a, $7f +.loop + push bc + push hl +.asm_89229 + ld [hli], a + dec c + jr nz, .asm_89229 + pop hl + add hl, de + pop bc + dec b + jr nz, .loop + pop de + ret + +Mobile22_PromptButton: + call JoyWaitAorB + call PlayClickSFX + ret + +Mobile22_SetBGMapMode0: + xor a + ldh [hBGMapMode], a + ret + +Mobile22_SetBGMapMode1: + ld a, $1 + ldh [hBGMapMode], a + ret + +Function89245: + farcall TryLoadSaveFile + ret c + farcall _LoadData + and a + ret + +Function89254: + ld bc, $d07 + jr Function89261 + +Function89259: + ld bc, $0e07 + jr Function89261 + +Function8925e: + ld bc, $0e0c + +Function89261: + push af + push bc + ld hl, MenuHeader_0x892a3 + call CopyMenuHeader + pop bc + ld hl, wMenuBorderTopCoord + ld a, c + ld [hli], a + ld a, b + ld [hli], a + ld a, c + add $4 + ld [hli], a + ld a, b + add $5 + ld [hl], a + pop af + ld [wMenuCursorPosition], a + call PushWindow + call Mobile22_SetBGMapMode0 + call Mobile_EnableSpriteUpdates + call VerticalMenu + push af + ld c, $a + call DelayFrames + call CloseWindow + call Mobile_DisableSpriteUpdates + pop af + jr c, .done + ld a, [wMenuCursorY] + cp $2 + jr z, .done + and a + ret + +.done + scf + ret + +MenuHeader_0x892a3: + db MENU_BACKUP_TILES ; flags + menu_coords 10, 5, 15, 9 + dw MenuData_0x892ab + db 1 ; default option + +MenuData_0x892ab: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 2 ; items + db "はい@" + db "いいえ@" + +Function892b4: + call Function8931b + +Function892b7: + ld d, b + ld e, c + ld hl, 0 + add hl, bc + ld a, "@" + ld bc, 6 + call ByteFill + ld b, d + ld c, e + ld hl, 6 + add hl, bc + ld a, "@" + ld bc, 6 + call ByteFill + ld b, d + ld c, e + ld hl, 12 + add hl, bc + xor a + ld [hli], a + ld [hl], a + ld hl, 14 + add hl, bc + ld [hli], a + ld [hl], a + ld hl, 16 + add hl, bc + ld [hl], a + ld hl, 17 + add hl, bc + ld a, -1 + ld bc, 8 + call ByteFill + ld b, d + ld c, e + ld e, 6 + ld hl, 25 + add hl, bc +.loop + ld a, -1 + ld [hli], a + ld a, -1 + ld [hli], a + dec e + jr nz, .loop + ret + +Function89305: + xor a + ld [wMenuSelection], a + ld c, 40 +.loop + ld a, [wMenuSelection] + inc a + ld [wMenuSelection], a + push bc + call Function892b4 + pop bc + dec c + jr nz, .loop + ret + +Function8931b: + push hl + ld hl, s4_a03b + ld a, [wMenuSelection] + dec a + ld bc, 37 + call AddNTimes + ld b, h + ld c, l + pop hl + ret + +Function8932d: + ld hl, 0 + add hl, bc + +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. + push bc + ld c, NAME_LENGTH_JAPANESE - 1 +.loop + ld a, [hli] + cp "@" + jr z, .terminator + cp " " + jr nz, .nonspace + dec c + jr nz, .loop + +.terminator + scf + jr .done + +.nonspace + and a + +.done + pop bc + ret + +Function89346: + ld h, b + ld l, c + jr _incave + +Function8934a: + ld hl, NAME_LENGTH_JAPANESE + add hl, bc +_incave: +; 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. + push bc + ld c, NAME_LENGTH_JAPANESE - 1 +.loop + ld a, [hli] + cp "@" + jr z, .terminator + cp " " + jr nz, .nonspace + dec c + jr nz, .loop + +.terminator + scf + jr .done + +.nonspace + and a + +.done + pop bc + ret + +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 + jr ._incave + + ld hl, 25 + add hl, bc + +._incave + push de + ld e, NAME_LENGTH_JAPANESE +.loop + ld a, [hli] + cp -1 + jr nz, .ok + ld a, [hli] + cp -1 + jr nz, .ok + dec e + jr nz, .loop + scf + jr .done + +.ok + and a + +.done + pop de + ret + +Function89381: + push bc + push de + call Function89b45 + jr c, .ok + push hl + ld a, -1 + ld bc, 8 + call ByteFill + pop hl + +.ok + pop de + ld c, 8 + call Function89193 + pop bc + ret + +Function8939a: + push bc + ld hl, 0 + add hl, bc + ld de, wd002 + ld c, 6 + call Function89193 + pop bc + ld hl, 17 + add hl, bc + ld de, wd008 + call Function89381 + ret + +Function893b3: + call DisableLCD + call ClearSprites + call LoadStandardFont + call LoadFontsExtra + call Function893ef + call Function8942b + call Function89455 + call EnableLCD + ret + +Function893cc: + call DisableLCD + call ClearSprites + call LoadStandardFont + call LoadFontsExtra + call Function893ef + call Function89464 + call EnableLCD + ret + +Function893e2: + call Function89b1e + call Function893b3 + call Function8a5b6 + call Function8949c + ret + +Function893ef: + ld de, vTiles0 + ld hl, EZChatCursorGFX + ld bc, $20 + ld a, BANK(EZChatCursorGFX) + call FarCopyBytes + ret + +Function893fe: ; unreferenced + call DisableLCD + call Function893ef + call EnableLCD + call DelayFrame + ret + +EZChatCursorGFX: +INCBIN "gfx/mobile/ez_chat_cursor.2bpp" + +Function8942b: + ld de, vTiles0 tile $02 + ld hl, CardLargeSpriteAndFolderGFX + ld bc, 8 tiles ; just the large card sprite + ld a, BANK(CardLargeSpriteAndFolderGFX) + call FarCopyBytes + ld de, vTiles0 tile $0a + ld hl, CardSpriteGFX + ld bc, 4 tiles + ld a, BANK(CardSpriteGFX) + call FarCopyBytes + ret + +Function89448: +; Clears the sprite array + push af + ld hl, wShadowOAM + ld d, 24 * SPRITEOAMSTRUCT_LENGTH + xor a +.loop + ld [hli], a + dec d + jr nz, .loop + pop af + ret + +Function89455: + ld hl, CardLargeSpriteAndFolderGFX + ld de, vTiles2 tile $0c + ld bc, (8 + 65) tiles ; large card sprite + folder + ld a, BANK(CardLargeSpriteAndFolderGFX) + call FarCopyBytes + ret + +Function89464: + ld hl, MobileCardGFX + ld de, vTiles2 + ld bc, $20 tiles + ld a, BANK(MobileCardGFX) + call FarCopyBytes + ld hl, MobileCard2GFX + ld de, vTiles2 tile $20 + ld bc, $17 tiles + ld a, BANK(MobileCard2GFX) + call FarCopyBytes + ret + +Function89481: + ld d, 2 + call Function8934a + ret c + ld d, 0 + ld hl, 16 + add hl, bc + bit 0, [hl] + ret z + inc d + ret + +Function89492: + ld d, 0 + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + ret z + inc d + ret + +Function8949c: + ldh a, [rSVBK] + push af + ld a, 5 + ldh [rSVBK], a + ld hl, Palette_894b3 + ld de, wBGPals1 palette 7 + ld bc, 1 palettes + call CopyBytes + pop af + ldh [rSVBK], a + ret + +Palette_894b3: + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 00, 00, 00 + +Function894bb: + call Function894dc + push bc + call Function8956f + call Function8949c + call Function8a60d + pop bc + ret + +Function894ca: + push bc + call Function894dc + call Function895c7 + call Function8949c + call Function8a60d + call SetPalettes + pop bc + ret + +Function894dc: + push bc + ldh a, [rSVBK] + push af + ld a, 5 + ldh [rSVBK], a + + ld c, d + ld b, 0 + ld hl, .PalettePointers + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wBGPals1 + ld bc, 3 palettes + call CopyBytes + ld hl, .Pals345 + ld de, wBGPals1 + 3 palettes + ld bc, 3 palettes + call CopyBytes + + pop af + ldh [rSVBK], a + pop bc + ret + +.PalettePointers: + dw .Pals012a + dw .Pals012b + dw .Pals012c + +.Pals012a: + RGB 31, 31, 31 + RGB 10, 17, 13 + RGB 10, 08, 22 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 20, 31 + RGB 10, 08, 22 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 20, 31 + RGB 10, 17, 13 + RGB 00, 00, 00 + +.Pals012b: + RGB 31, 31, 31 + RGB 30, 22, 11 + RGB 31, 08, 15 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 20, 31 + RGB 31, 08, 15 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 20, 31 + RGB 30, 22, 11 + RGB 00, 00, 00 + +.Pals012c: + RGB 31, 31, 31 + RGB 15, 20, 26 + RGB 25, 07, 20 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 20, 31 + RGB 25, 07, 20 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 20, 31 + RGB 15, 20, 26 + RGB 00, 00, 00 + +.Pals345: + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 13, 00 + RGB 14, 08, 00 + + RGB 31, 31, 31 + RGB 16, 16, 31 + RGB 00, 00, 31 + RGB 00, 00, 00 + + RGB 19, 31, 11 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + +Function8956f: + push bc + ld hl, 16 + add hl, bc + ld d, h + ld e, l + ld hl, $000c + add hl, bc + ld b, h + ld c, l + farcall GetMobileOTTrainerClass + ld a, c + ld [wTrainerClass], a + ldh a, [rSVBK] + push af + ld a, 5 + ldh [rSVBK], a + ld hl, wd030 + ld a, -1 + ld [hli], a + ld a, " " + ld [hl], a + pop af + ldh [rSVBK], a + ld a, [wTrainerClass] + ld h, 0 + ld l, a + add hl, hl + add hl, hl + ld de, TrainerPalettes + add hl, de + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld de, wd032 + ld c, 4 +.loop + ld a, BANK(TrainerPalettes) + call GetFarByte + ld [de], a + inc de + inc hl + dec c + jr nz, .loop + ld hl, wd036 + xor a + ld [hli], a + ld [hl], a + pop af + ldh [rSVBK], a + pop bc + ret + +Function895c7: + ldh a, [rSVBK] + push af + ld a, 5 + ldh [rSVBK], a + ld hl, Palette_895de + ld de, wd030 + ld bc, 8 + call CopyBytes + pop af + ldh [rSVBK], a + ret + +Palette_895de: + RGB 31, 31, 31 + RGB 07, 07, 06 + RGB 07, 07, 06 + RGB 00, 00, 00 + +Function895e6: ; unreferenced + ld a, 7 + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + ret + +Function895f2: + push bc + xor a + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + call Function89605 + call Function89655 + pop bc + ret + +Function89605: + hlcoord 19, 2, wAttrmap + ld a, 1 + ld de, SCREEN_WIDTH + ld c, 14 +.loop + ld [hl], a + dec c + jr z, .done + add hl, de + inc a + ld [hl], a + dec a + add hl, de + dec c + jr nz, .loop + +.done + hlcoord 0, 16, wAttrmap + ld c, 10 + ld a, 2 +.loop2 + ld [hli], a + dec a + ld [hli], a + inc a + dec c + jr nz, .loop2 + hlcoord 1, 11, wAttrmap + ld a, 4 + ld bc, 4 + call ByteFill + ld a, 5 + ld bc, 14 + call ByteFill + ret + +Function8963d: + hlcoord 12, 3, wAttrmap + ld a, 6 + ld de, SCREEN_WIDTH + lb bc, 7, 7 +.loop + push hl + ld c, 7 +.next + ld [hli], a + dec c + jr nz, .next + pop hl + add hl, de + dec b + jr nz, .loop + ret + +Function89655: + hlcoord 1, 12, wAttrmap + ld de, SCREEN_WIDTH + ld a, 5 + ld b, 4 +.loop + ld c, 18 + push hl +.next + ld [hli], a + dec c + jr nz, .next + pop hl + add hl, de + dec b + jr nz, .loop + ret + +Function8966c: + push bc + call Function89688 + hlcoord 4, 0 + ld c, 8 + call Function896f5 + pop bc + ret + +Function8967a: + push bc + call Function89688 + hlcoord 2, 0 + ld c, 12 + call Function896f5 + pop bc + ret + +Function89688: + hlcoord 0, 0 + ld a, 1 + ld e, SCREEN_WIDTH + call Function896e1 + ld a, 2 + ld e, SCREEN_WIDTH + call Function896eb + ld a, 3 + ld [hli], a + ld a, 4 + ld e, SCREEN_HEIGHT + call Function896e1 + ld a, 6 + ld [hli], a + push bc + ld c, 13 +.loop + call Function896cb + dec c + jr z, .done + call Function896d6 + dec c + jr nz, .loop + +.done + pop bc + ld a, 25 + ld [hli], a + ld a, 26 + ld e, SCREEN_HEIGHT + call Function896e1 + ld a, 28 + ld [hli], a + ld a, 2 + ld e, SCREEN_WIDTH + call Function896eb + ret + +Function896cb: + ld de, SCREEN_WIDTH - 1 + ld a, 7 + ld [hl], a + add hl, de + ld a, 9 + ld [hli], a + ret + +Function896d6: + ld de, SCREEN_WIDTH - 1 + ld a, 10 + ld [hl], a + add hl, de + ld a, 11 + ld [hli], a + ret + +Function896e1: +.loop + ld [hli], a + inc a + dec e + ret z + ld [hli], a + dec a + dec e + jr nz, .loop + ret + +Function896eb: +.loop + ld [hli], a + dec a + dec e + ret z + ld [hli], a + inc a + dec e + jr nz, .loop + ret + +Function896f5: + call Function8971f + call Function89736 + inc hl + inc hl + ld b, 2 + +Function896ff: ; unreferenced +; INPUT: +; hl = address of upper left corner of the area +; b = height +; c = width + +; clears an area of the screen + ld a, " " + ld de, SCREEN_WIDTH +.row_loop + push bc + push hl +.col_loop + ld [hli], a + dec c + jr nz, .col_loop + pop hl + pop bc + add hl, de + dec b + jr nz, .row_loop + +; alternates tiles $36 and $18 at the bottom of the area + dec hl + inc c + inc c +.bottom_loop + ld a, $36 + ld [hli], a + dec c + ret z + ld a, $18 + ld [hli], a + dec c + jr nz, .bottom_loop + ret + +Function8971f: + ld a, $2c + ld [hli], a + ld a, $2d + ld [hld], a + push hl + ld de, SCREEN_WIDTH + add hl, de + ld a, $31 + ld [hli], a + ld a, $32 + ld [hld], a + add hl, de + ld a, $35 + ld [hl], a + pop hl + ret + +Function89736: + push hl + inc hl + inc hl + ld e, c + ld d, $0 + add hl, de + ld a, $2f + ld [hli], a + ld a, $30 + ld [hld], a + ld de, SCREEN_WIDTH + add hl, de + ld a, $33 + ld [hli], a + ld a, $34 + ld [hl], a + add hl, de + ld a, $1f + ld [hl], a + pop hl + ret + +Function89753: + ld a, $c + ld [hl], a + xor a + call Function89215 + ret + +Function8975b: + ld a, $1d + ld [hli], a + inc a + ld [hli], a + ld a, $d + ld [hl], a + dec hl + dec hl + ld a, $4 + ld e, $3 +.asm_89769 + call Function89215 + inc hl + dec e + jr nz, .asm_89769 + ret + +Function89771: + ld a, $12 + ld [hl], a + ld a, $3 + call Function89215 + ret + +Function8977a: + ld e, $4 + ld d, $13 +.asm_8977e + ld a, d + ld [hl], a + ld a, $4 + call Function89215 + inc hl + inc d + dec e + jr nz, .asm_8977e + ld e, $e +.asm_8978c + ld a, d + ld [hl], a + xor a + call Function89215 + inc hl + dec e + jr nz, .asm_8978c + ret + +Function89797: + push bc + ld a, $e + ld [hl], a + ld bc, SCREEN_WIDTH + add hl, bc + ld a, $11 + ld [hli], a + ld a, $10 + ld c, $8 +.asm_897a6 + ld [hli], a + dec c + jr nz, .asm_897a6 + ld a, $f + ld [hl], a + pop bc + ret + +Function897af: + push bc + ld hl, $0010 + add hl, bc + ld d, h + ld e, l + ld hl, $000c + add hl, bc + ld b, h + ld c, l + farcall GetMobileOTTrainerClass + ld a, c + ld [wTrainerClass], a + xor a + ld [wCurPartySpecies], a + ld de, vTiles2 tile $37 + farcall GetTrainerPic + pop bc + ret + +Function897d5: + push bc + call Function8934a + jr nc, .asm_897f3 + hlcoord 12, 3, wAttrmap + xor a + ld de, SCREEN_WIDTH + lb bc, 7, 7 +.asm_897e5 + push hl + ld c, $7 +.asm_897e8 + ld [hli], a + dec c + jr nz, .asm_897e8 + pop hl + add hl, de + dec b + jr nz, .asm_897e5 + pop bc + ret + +.asm_897f3 + ld a, $37 + ldh [hGraphicStartTile], a + hlcoord 12, 3 + lb bc, 7, 7 + predef PlaceGraphic + call Function8963d + pop bc + ret + +Function89807: + ld hl, ChrisSilhouetteGFX + ld a, [wPlayerGender] + bit PLAYERGENDER_FEMALE_F, a + jr z, .asm_89814 + ld hl, KrisSilhouetteGFX +.asm_89814 + call DisableLCD + ld de, vTiles2 tile $37 + ld bc, (5 * 7) tiles + ld a, BANK(ChrisSilhouetteGFX) ; aka BANK(KrisSilhouetteGFX) + call FarCopyBytes + call EnableLCD + call DelayFrame + ret + +Function89829: + push bc + ld bc, $705 + ld de, $14 + ld a, $37 +.asm_89832 + push bc + push hl +.asm_89834 + ld [hli], a + inc a + dec c + jr nz, .asm_89834 + pop hl + add hl, de + pop bc + dec b + jr nz, .asm_89832 + call Function8963d + pop bc + ret + +Function89844: + call Function89481 + call Function894bb + call Function897af + push bc + call WaitBGMap2 + call SetPalettes + pop bc + ret + +Function89856: + push bc + call Function891b8 + pop bc + call Function895f2 + call Function8966c + call Function899d3 + call Function898aa + call Function898be + call Function898dc + call Function898f3 + push bc + ld bc, wd008 + hlcoord 2, 10 + call Function89975 + pop bc + call Function897d5 + ret + +Function8987f: + call Function891b8 + call Function895f2 + call Function8967a + call Function899d3 + hlcoord 5, 1 + call Function8999c + hlcoord 13, 3 + call Function89829 + call Function899b2 + hlcoord 5, 5 + call Function899c9 + ld bc, wd008 + hlcoord 2, 10 + call Function89975 + ret + +Function898aa: + ld a, [wMenuSelection] + and a + ret z + push bc + hlcoord 6, 1 + ld de, wMenuSelection + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + pop bc + ret + +Function898be: + push bc + ld de, wd002 + ld hl, wd002 + call Function89331 + jr nc, .asm_898cd + ld de, String_89116 + +.asm_898cd + hlcoord 9, 1 + ld a, [wMenuSelection] + and a + jr nz, .asm_898d7 + dec hl + +.asm_898d7 + call PlaceString + pop bc + ret + +Function898dc: + ld hl, $0006 + add hl, bc + push bc + ld d, h + ld e, l + call Function8934a + jr nc, .asm_898eb + ld de, String_89116 + +.asm_898eb + hlcoord 6, 4 + call PlaceString + pop bc + ret + +Function898f3: + push bc + ld hl, $000c + add hl, bc + ld d, h + ld e, l + call Function8934a + jr c, .asm_8990a + hlcoord 5, 5 + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + jr .asm_89913 + +.asm_8990a + hlcoord 5, 5 + ld de, String_89116 + call PlaceString + +.asm_89913 + pop bc + ret + +Function89915: + push bc + push hl + ld de, Unknown_89942 + ld c, $8 +.asm_8991c + ld a, [de] + ld [hl], a + ld a, $4 + call Function89215 + inc hl + inc de + dec c + jr nz, .asm_8991c + pop hl + ld b, $4 + ld c, $2b + ld a, $8 + ld de, Unknown_8994a +.asm_89932 + push af + ld a, [de] + cp [hl] + jr nz, .asm_8993b + call Function8994e + inc de + +.asm_8993b + inc hl + pop af + dec a + jr nz, .asm_89932 + pop bc + ret + +Unknown_89942: + db $24, $25, $26, " ", $27, $28, $29, $2a +Unknown_8994a: + db $24, $27, $29, $ff + +Function8994e: + push hl + push de + ld de, SCREEN_WIDTH + ld a, l + sub e + ld l, a + ld a, h + sbc d + ld h, a + ld a, c + ld [hl], a + ld a, b + call Function89215 + pop de + pop hl + ret + +Function89962: + push bc + ld c, $4 + ld b, $20 +.asm_89967 + ld a, b + ld [hl], a + ld a, $4 + call Function89215 + inc hl + inc b + dec c + jr nz, .asm_89967 + pop bc + ret + +Function89975: + push bc + ld e, $8 +.asm_89978 + ld a, [bc] + ld d, a + call Function8998b + swap d + inc hl + ld a, d + call Function8998b + inc bc + inc hl + dec e + jr nz, .asm_89978 + pop bc + ret + +Function8998b: + push bc + and $f + cp $a + jr nc, .asm_89997 + ld c, $f6 + add c + jr .asm_89999 + +.asm_89997 + ld a, $7f + +.asm_89999 + ld [hl], a + pop bc + ret + +Function8999c: + ld de, wPlayerName + call PlaceString + inc bc + ld h, b + ld l, c + ld de, String_899ac + call PlaceString + ret + +String_899ac: + db "の めいし@" + +Function899b2: + ld bc, wPlayerName + call Function89346 + jr c, .asm_899bf + ld de, wPlayerName + jr .asm_899c2 +.asm_899bf + ld de, String_89116 +.asm_899c2 + hlcoord 6, 4 + call PlaceString + ret + +Function899c9: + ld de, wPlayerID + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + ret + +Function899d3: + hlcoord 1, 4 + call Function89753 + hlcoord 2, 5 + call Function8975b + hlcoord 1, 9 + call Function89771 + hlcoord 1, 11 + call Function8977a + hlcoord 1, 5 + call Function89797 + hlcoord 2, 4 + call Function89962 + hlcoord 2, 9 + call Function89915 + ret + +Function899fe: + push bc + push hl + ld hl, $0019 + add hl, bc + ld b, h + ld c, l + pop hl + call Function89a0c + pop bc + ret + +Function89a0c: + push hl + call Function89363 + pop hl + jr c, .asm_89a1c + ld d, h + ld e, l + farcall Function11c08f + ret + +.asm_89a1c + ld de, String_89153 + call PlaceString + ret + +Function89a23: + hlcoord 0, 11 + ld b, $4 + ld c, $12 + call Function8921f + ret + +Function89a2e: + hlcoord 11, 12 + ld b, $2 + ld c, $6 + call Textbox + hlcoord 13, 13 + ld de, String_89a4e + call PlaceString + hlcoord 13, 14 + ld de, String_89a53 + call PlaceString + call Function89655 + ret + +String_89a4e: + db "けってい@" + +String_89a53: + db "やめる@" + +Function89a57: + call JoyTextDelay_ForcehJoyDown ; joypad + bit D_UP_F, c + jr nz, .d_up + bit D_DOWN_F, c + jr nz, .d_down + bit A_BUTTON_F, c + jr nz, .a_b_button + bit B_BUTTON_F, c + jr nz, .a_b_button + bit START_F, c + jr nz, .start_button + scf + ret + +.a_b_button + ld a, $1 + and a + ret + +.start_button + ld a, $2 + and a + ret + +.d_up + call .MoveCursorUp + call nc, .PlayPocketSwitchSFX + ld a, $0 + ret + +.d_down + call .MoveCursorDown + call nc, .PlayPocketSwitchSFX + ld a, $0 + ret + +.PlayPocketSwitchSFX: + push af + ld de, SFX_SWITCH_POCKETS + call PlaySFX + pop af + ret + +.MoveCursorDown: + ld d, 40 + ld e, 1 + call .ApplyCursorMovement + ret + +.MoveCursorUp: + ld d, 1 + ld e, -1 + call .ApplyCursorMovement + ret + +.ApplyCursorMovement: + ld a, [wMenuSelection] + ld c, a + push bc +.loop + ld a, [wMenuSelection] + cp d + jr z, .equal_to_d + add e + jr nz, .not_zero + inc a + +.not_zero + ld [wMenuSelection], a + call .Function89ac7 ; BCD conversion of data in SRAM? + jr nc, .loop + call .Function89ae6 ; split [wMenuSelection] into [wd030] + [wd031] where [wd030] <= 5 + pop bc + and a + ret + +.equal_to_d + pop bc + ld a, c + ld [wMenuSelection], a + scf + ret + +.Function89ac7: + call OpenSRAMBank4 + call Function8931b + call .Function89ad4 + call CloseSRAM + ret + +.Function89ad4: + push de + call Function8932d ; find a non-space character within 5 bytes of bc + jr c, .no_nonspace_character + ld hl, 17 + add hl, bc + call Function89b45 + jr c, .finish_decode + +.no_nonspace_character + and a + +.finish_decode + pop de + ret + +.Function89ae6: + ld hl, wd031 + xor a + ld [hl], a + ld a, [wMenuSelection] +.loop2 + cp 6 + jr c, .load_and_ret + sub 5 + ld c, a + ld a, [hl] + add 5 + ld [hl], a + ld a, c + jr .loop2 + +.load_and_ret + ld [wd030], a + ret + +Function89b00: + farcall MG_Mobile_Layout_LoadPals + ret + +Function89b07: + call Mobile22_SetBGMapMode0 + call DelayFrame + farcall Function4a3a7 + ret + +Function89b14: ; unreferenced + call ClearBGPalettes + call Function89b07 + call Function89b00 + ret + +Function89b1e: + farcall Function4a485 + call Function89b00 + ret + +Function89b28: + call Function891de + call ClearBGPalettes + call Function893e2 + call ExitMenu + call Function891ab + call SetPalettes + ret + +Function89b3b: + call Mobile22_SetBGMapMode0 + farcall Function48cda + ret + +Function89b45: + ; some sort of decoder? + ; BCD? + push hl + push bc + ld c, $10 + ld e, $0 +.loop + ld a, [hli] + ld b, a + and $f + cp 10 + jr c, .low_nybble_less_than_10 + ld a, c + cp $b + jr nc, .clear_carry + jr .set_carry + +.low_nybble_less_than_10 + dec c + swap b + inc e + ld a, b + and $f + cp 10 + jr c, .high_nybble_less_than_10 + ld a, c + cp $b + jr nc, .clear_carry + jr .set_carry + +.high_nybble_less_than_10 + inc e + dec c + jr nz, .loop + dec e + +.set_carry + scf + jr .finish + +.clear_carry + and a + +.finish + pop bc + pop hl + ret + +Function89b78: + push bc + ld a, [wd010] + cp $10 + jr c, .asm_89b8c + ld a, e + and a + jr z, .asm_89b89 + ld c, e +.asm_89b85 + inc hl + dec c + jr nz, .asm_89b85 +.asm_89b89 + ld a, $7f + ld [hl], a +.asm_89b8c + ld a, [wd010] + inc a + and $1f + ld [wd010], a + pop bc + ret + +Function89b97: + call Function89c34 + jr c, .asm_89ba0 + call Function89448 + ret +.asm_89ba0 + ld a, [wd011] + ld hl, Unknown_89bd8 + and a + jr z, .asm_89bae +.asm_89ba9 + inc hl + inc hl + dec a + jr nz, .asm_89ba9 +.asm_89bae + ld a, [hli] + ld h, [hl] + ld l, a + ld de, wShadowOAMSprite00 +.asm_89bb4 + ld a, [hli] + cp $ff + ret z + ld c, a + ld b, 0 +.asm_89bbb + push hl + ld a, [hli] + ld [de], a ; y + inc de + ld a, [hli] + add b + ld [de], a ; x + inc de + ld a, $08 + add b + ld b, a + ld a, [hli] ; tile id + ld [de], a + inc de + ld a, [hli] ; attributes + ld [de], a + inc de + pop hl + dec c + jr nz, .asm_89bbb + ld b, $0 + ld c, $4 + add hl, bc + jr .asm_89bb4 + +Unknown_89bd8: + dw Unknown_89be0 + dw Unknown_89bf5 + dw Unknown_89c0a + dw Unknown_89c1f + +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: + 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: + 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: + 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 + +Function89c34: + push bc + ld a, [wd012] + ld c, a + inc a + and $f + ld [wd012], a + ld a, c + cp $8 + pop bc + ret + +Function89c44: + call Function89c34 + jr c, .asm_89c4f + push de + call Function89448 + pop de + ret +.asm_89c4f + ld hl, wShadowOAMSprite00 + push de + ld a, b + ld [hli], a ; y + ld d, $8 + ld a, e + and a + ld a, c + jr z, .asm_89c60 +.asm_89c5c + add d + dec e + jr nz, .asm_89c5c +.asm_89c60 + pop de + ld [hli], a ; x + ld a, d + ld [hli], a ; tile id + xor a + ld [hli], a ; attributes + ret + +Function89c67: +; menu scrolling? + call JoyTextDelay_ForcehJoyDown ; joypad + ld b, $0 + bit A_BUTTON_F, c + jr z, .not_a_button + ld b, $1 + and a + ret + +.not_a_button + bit B_BUTTON_F, c + jr z, .not_b_button + scf + ret + +.not_b_button + xor a + bit D_UP_F, c + jr z, .not_d_up + ld a, $1 +.not_d_up + bit D_DOWN_F, c + jr z, .not_d_down + ld a, $2 +.not_d_down + bit D_LEFT_F, c + jr z, .not_d_left + ld a, $3 +.not_d_left + bit D_RIGHT_F, c + jr z, .not_d_right + ld a, $4 +.not_d_right + and a + ret z ; no dpad pressed + dec a + ld c, a + ld d, $0 + ld hl, .ScrollData0 + ld a, [wd02f] + and a + jr z, .got_data + ld hl, .ScrollData1 +.got_data + ld a, [wd011] + and a + jr z, .got_row + ld e, $4 +.add_n_times + add hl, de + dec a + jr nz, .add_n_times +.got_row + ld e, c + add hl, de + ld a, [hl] + and a + ret z + dec a + ld [wd011], a + xor a + ld [wd012], a + ret + +.ScrollData0: + db 0, 2, 0, 0 + db 1, 3, 0, 0 + db 2, 4, 0, 0 + db 3, 0, 0, 0 + +.ScrollData1: + db 0, 0, 0, 0 + db 0, 3, 0, 0 + db 2, 4, 0, 0 + db 3, 0, 0, 0 + +Function89cdf: + ld a, $10 + add b + ld b, a + ld a, $8 + add c + ld c, a + ld e, $2 + ld a, $2 + ld hl, wShadowOAMSprite00 +.asm_89cee + push af + push bc + ld d, $4 +.asm_89cf2 + ld a, b + ld [hli], a ; y + ld a, c + ld [hli], a ; x + ld a, e + ld [hli], a ; tile id + ld a, $1 + ld [hli], a ; attributes + ld a, $8 + add c + ld c, a + inc e + dec d + jr nz, .asm_89cf2 + pop bc + ld a, $8 + add b + ld b, a + pop af + dec a + jr nz, .asm_89cee + ret + +Function89d0d: + call Mobile22_SetBGMapMode0 + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + + ld c, 8 + ld de, wBGPals1 +.loop + push bc + ld hl, .Palette1 + ld bc, 1 palettes + call CopyBytes + pop bc + dec c + jr nz, .loop + + ld hl, .Palette2 + ld de, wBGPals1 + 2 palettes + ld bc, 1 palettes + call CopyBytes + + pop af + ldh [rSVBK], a + + call SetPalettes + farcall PrintMail + call Mobile22_SetBGMapMode1 + ld c, 24 + call DelayFrames + call RestartMapMusic + ret + +.Palette1: + RGB 31, 31, 31 + RGB 19, 19, 19 + RGB 15, 15, 15 + RGB 00, 00, 00 + +.Palette2: + RGB 31, 31, 31 + RGB 19, 19, 19 + RGB 19, 19, 19 + RGB 00, 00, 00 + +Function89d5e: + push af + call CopyMenuHeader + pop af + ld [wMenuCursorPosition], a + call Mobile22_SetBGMapMode0 + call PlaceVerticalMenuItems + call InitVerticalMenuCursor + ld hl, w2DMenuFlags1 + set 7, [hl] + ret + +Function89d75: + push hl + call Mobile22_SetBGMapMode0 + call _hl_ + farcall Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + pop hl + jr asm_89d90 + +Function89d85: + push hl + call Mobile22_SetBGMapMode0 + call _hl_ + call CGBOnly_CopyTilemapAtOnce + pop hl + +asm_89d90: + call Mobile22_SetBGMapMode0 + push hl + call _hl_ + call Function89dab + ld a, [wMenuCursorY] + push af + call Function891ab + pop af + pop hl + jr c, .asm_89da9 + jr z, asm_89d90 + scf + ret +.asm_89da9 + and a + ret + +Function89dab: + call Mobile22_SetBGMapMode0 + farcall MobileMenuJoypad + call Mobile22_SetBGMapMode0 + ld a, c + ld hl, wMenuJoypadFilter + and [hl] + ret z + bit A_BUTTON_F, a + jr nz, .asm_89dc7 + bit B_BUTTON_F, a + jr nz, .asm_89dd9 + xor a + ret +.asm_89dc7 + call PlayClickSFX + ld a, [w2DMenuNumRows] + ld c, a + ld a, [wMenuCursorY] + cp c + jr z, .asm_89dd9 + call PlaceHollowCursor + scf + ret +.asm_89dd9 + call PlayClickSFX + ld a, $1 + and a + ret + +Function89de0: + call ClearSprites + call Function89e0a + jr c, .asm_89e00 + ld c, $1 +.asm_89dea + call Function8a31c + jr z, .asm_89dfd + ld a, [wMenuCursorY] + ld c, a + push bc + ld hl, Jumptable_89e04 + ld a, e + dec a + rst JumpTable + pop bc + jr .asm_89dea +.asm_89dfd + call Function891fe +.asm_89e00 + call Function8917a + ret + +Jumptable_89e04: + dw Function8a62c + dw Function8a999 + dw Function8ab93 + +Function89e0a: + call OpenSRAMBank4 + call Function8b3b0 + call CloseSRAM + ld hl, Jumptable_89e18 + rst JumpTable + ret + +Jumptable_89e18: + dw Function89e1e + dw Function8a116 + dw Function8a2aa + +Function89e1e: + call OpenSRAMBank4 + ld bc, $a037 + call Function8b36c + call CloseSRAM + xor a + ld [wd02d], a + +asm_89e2e: + ld a, [wd02d] + ld hl, Jumptable_89e3c + rst JumpTable + ret + +Function89e36: + ld hl, wd02d + inc [hl] + jr asm_89e2e + +Jumptable_89e3c: + dw Function89e6f + dw Function89fed + dw Function89ff6 + dw Function8a03d + dw Function89eb9 + dw Function89efd + dw Function89fce + dw Function8a04c + dw Function8a055 + dw Function8a0e6 + dw Function8a0ec + dw Function8a0f5 + dw Function89e58 + dw Function89e68 + +Function89e58: + ld a, $1 + call Function8a2fe + call Function891fe + call Function893e2 + call Function89168 + and a + ret + +Function89e68: + call Function891fe + ld a, $1 + scf + ret + +Function89e6f: + call Function891de + call Function89245 + call Function89ee1 + call Function89e9a + hlcoord 7, 4 + call Function8a58d + ld a, $5 + hlcoord 7, 4, wAttrmap + call Function8a5a3 + ld a, $6 + hlcoord 10, 4, wAttrmap + call Function8a5a3 + call Function891ab + call SetPalettes + jp Function89e36 + +Function89e9a: + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, Palette_89eb1 + ld de, wBGPals1 palette 5 + ld bc, 1 palettes + call CopyBytes + pop af + ldh [rSVBK], a + ret + +Palette_89eb1: + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 27, 19, 00 + RGB 00, 00, 00 + +Function89eb9: + call Function891fe + call Function89ee1 + call Function89e9a + hlcoord 7, 4 + call Function8a58d + ld a, $5 + hlcoord 7, 4, wAttrmap + call Function8a5a3 + ld a, $6 + hlcoord 10, 4, wAttrmap + call Function8a5a3 + call Function891ab + call SetPalettes + jp Function89e36 + +Function89ee1: + call ClearBGPalettes + call Function893e2 + call Mobile22_SetBGMapMode0 + farcall Function4a3a7 + farcall MG_Mobile_Layout_CreatePalBoxes + hlcoord 1, 0 + call Function8a53d + ret + +Function89efd: + ld hl, wd012 + ld a, $ff + ld [hli], a + xor a +rept 4 + ld [hli], a +endr + ld [hl], a +.asm_89f09 + ld hl, wd012 + inc [hl] + ld a, [hli] + and $3 + jr nz, .asm_89f2e + ld a, [hl] + cp $4 + jr nc, .asm_89f2e + ld b, $32 + inc [hl] + ld a, [hl] + dec a + jr z, .asm_89f26 + ld c, a +.asm_89f1f + ld a, $b + add b + ld b, a + dec c + jr nz, .asm_89f1f +.asm_89f26 + ld c, $e8 + ld a, [wd013] + call Function89fa5 +.asm_89f2e + ld a, [wd013] + and a + jr z, .asm_89f58 +.asm_89f34 + call Function89f6a + ld e, a + ld a, c + cp $a8 + jr nc, .asm_89f4d + cp $46 + jr c, .asm_89f4d + ld d, $0 + dec e + ld hl, wd014 + add hl, de + set 0, [hl] + inc e + jr .asm_89f51 +.asm_89f4d + ld a, $2 + add c + ld c, a +.asm_89f51 + ld a, e + call Function89f77 + dec a + jr nz, .asm_89f34 +.asm_89f58 + call DelayFrame + ld hl, wd014 + ld c, $4 +.asm_89f60 + ld a, [hli] + and a + jr z, .asm_89f09 + dec c + jr nz, .asm_89f60 + jp Function89e36 + +Function89f6a: + push af + ld de, $10 + call Function89f9a + ld a, [hli] + ld b, a + ld a, [hl] + ld c, a + pop af + ret + +Function89f77: + push af + ld de, $10 + call Function89f9a + ld d, $2 +.asm_89f80 + push bc + ld e, $2 +.asm_89f83 + ld a, b + ld [hli], a + ld a, c + ld [hli], a + inc hl + inc hl + ld a, $8 + add c + ld c, a + dec e + jr nz, .asm_89f83 + pop bc + ld a, $8 + add b + ld b, a + dec d + jr nz, .asm_89f80 + pop af + ret + +Function89f9a: + dec a + ld hl, wShadowOAM + and a + ret z +.asm_89fa0 + add hl, de + dec a + jr nz, .asm_89fa0 + ret + +Function89fa5: + ld de, $10 + call Function89f9a + ld e, $2 + ld d, $a +.asm_89faf + push bc + ld a, $2 +.asm_89fb2 + push af + ld a, b + ld [hli], a + ld a, c + ld [hli], a + ld a, d + inc d + ld [hli], a + ld a, $1 + ld [hli], a + ld a, $8 + add c + ld c, a + pop af + dec a + jr nz, .asm_89fb2 + pop bc + ld a, $8 + add b + ld b, a + dec e + jr nz, .asm_89faf + ret + +Function89fce: + call Function8a5b6 + ld a, $5 + hlcoord 7, 4, wAttrmap + call Function8a5a3 + ld a, $6 + hlcoord 10, 4, wAttrmap + call Function8a5a3 + call Function89448 + call SetPalettes + call Function891ab + jp Function89e36 + +Function89fed: + ld hl, MobileCardFolderIntro1Text + call PrintText + jp Function89e36 + +Function89ff6: + call Function891fe + call ClearBGPalettes + call Function893cc + call Function89807 + call Function89492 + call Function894ca + call OpenSRAMBank4 + ld hl, $a603 + ld a, -1 + ld bc, 8 + call ByteFill + ld hl, $a603 + ld de, wd008 + call Function89381 + call CloseSRAM + call Function8987f + call OpenSRAMBank4 + hlcoord 1, 13 + ld bc, $a007 + call Function89a0c + call CloseSRAM + call Function891ab + call Mobile22_PromptButton + jp Function89e36 + +Function8a03d: + ld hl, MobileCardFolderIntro2Text + call Mobile_EnableSpriteUpdates + call PrintText + call Mobile_DisableSpriteUpdates + jp Function89e36 + +Function8a04c: + ld hl, MobileCardFolderIntro3Text + call PrintText + jp Function89e36 + +Function8a055: + ld c, $7 + ld b, $4 +.asm_8a059 + call Function8a0a1 + inc c + call Function8a0c9 + push bc + call Function8a58d + pop bc + call Function8a0de + push bc + push hl + ld a, $5 + call Function8a5a3 + pop hl + inc hl + inc hl + inc hl + ld a, $6 + call Function8a5a3 + call CGBOnly_CopyTilemapAtOnce + pop bc + ld a, c + cp $b + jr nz, .asm_8a059 + call Function8a0a1 + hlcoord 12, 4 + call Function8a58d + ld a, $5 + hlcoord 12, 4, wAttrmap + call Function8a5a3 + pop hl + ld a, $6 + hlcoord 15, 4, wAttrmap + call Function8a5a3 + call CGBOnly_CopyTilemapAtOnce + jp Function89e36 + +Function8a0a1: + call Mobile22_SetBGMapMode0 + push bc + call Function8a0c9 + ld e, $6 +.asm_8a0aa + push hl + ld bc, $6 + add hl, bc + ld d, [hl] + call Function8a0c1 + pop hl + ld [hl], d + call Function89215 + ld bc, $14 + add hl, bc + dec e + jr nz, .asm_8a0aa + pop bc + ret + +Function8a0c1: + push hl + ld bc, wAttrmap - wTilemap + add hl, bc + ld a, [hl] + pop hl + ret + +Function8a0c9: + push bc + hlcoord 0, 0 + ld de, $14 + ld a, b + and a + jr z, .asm_8a0d8 +.asm_8a0d4 + add hl, de + dec b + jr nz, .asm_8a0d4 +.asm_8a0d8 + ld d, $0 + ld e, c + add hl, de + pop bc + ret + +Function8a0de: + call Function8a0c9 + ld de, wAttrmap - wTilemap + add hl, de + ret + +Function8a0e6: + call Function8b539 + jp Function89e36 + +Function8a0ec: + ld hl, MobileCardFolderIntro4Text + call PrintText + jp Function89e36 + +Function8a0f5: + call Function8b555 + jp nc, Function8a0ff + ld hl, wd02d + inc [hl] + +Function8a0ff: + jp Function89e36 + +MobileCardFolderIntro1Text: + text_far _MobileCardFolderIntro1Text + text_end + +MobileCardFolderIntro2Text: + text_far _MobileCardFolderIntro2Text + text_end + +MobileCardFolderIntro3Text: + text_far _MobileCardFolderIntro3Text + text_end + +MobileCardFolderIntro4Text: + text_far _MobileCardFolderIntro4Text + text_end + +Function8a116: + ld a, $1 + ld [wd030], a + ld hl, MenuHeader_0x8a176 + call LoadMenuHeader +.asm_8a121 + call Mobile22_SetBGMapMode0 + call Function8a17b + jr c, .asm_8a16b + ld a, [wMenuCursorY] + ld [wd030], a + dec d + jr z, .asm_8a140 + call Function8a20d + jr c, .asm_8a121 + xor a + call Function8a2fe + call Function8916e + jr .asm_8a16b +.asm_8a140 + call Function89174 + jr nz, .asm_8a14c + call Function8a241 + jr c, .asm_8a121 + jr .asm_8a15a +.asm_8a14c + call WaitSFX + ld de, SFX_TWINKLE + call PlaySFX + ld c, $10 + call DelayFrames +.asm_8a15a + call ExitMenu + call Function891de + call Function893e2 + call Function89245 + call Function89168 + and a + ret +.asm_8a16b + call Mobile_EnableSpriteUpdates + call CloseWindow + call Mobile_DisableSpriteUpdates + scf + ret + +MenuHeader_0x8a176: + db MENU_BACKUP_TILES ; flags + menu_coords 14, 0, SCREEN_WIDTH - 1, 6 + +Function8a17b: + decoord 14, 0 + ld b, $5 + ld c, $4 + call Function89b3b + ld hl, MenuHeader_0x8a19a + ld a, [wd030] + call Function89d5e + ld hl, Function8a1b0 + call Function89d75 + jr nc, .asm_8a198 + ld a, $0 +.asm_8a198 + ld d, a + ret + +MenuHeader_0x8a19a: + db MENU_BACKUP_TILES ; flags + menu_coords 14, 0, SCREEN_WIDTH - 1, 6 + dw MenuData_0x8a1a2 + db 1 ; default option + +MenuData_0x8a1a2: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING | STATICMENU_WRAP ; flags + db 3 ; items + db "ひらく@" + db "すてる@" + db "もどる@" + +Function8a1b0: + hlcoord 0, 12 + ld b, $4 + ld c, $12 + call Textbox + hlcoord 1, 14 + ld a, [wMenuCursorY] + ld de, Strings_8a1cc + dec a + ld c, a + call Function8919e + call PlaceString + ret + +Strings_8a1cc: + db "めいしせいりと へんしゅうを" + next "おこないます" + db "@" + + db "めいしフォルダーめいしと" + next "あんしょうばんごうけします" + db "@" + + db "まえがめんもどります" + db "@" + +Function8a20d: + ld hl, MobileCardFolderAskDeleteText + call PrintText + ld a, $2 + call Function89259 + ret c + ld hl, MobileCardFolderDeleteAreYouSureText + call PrintText + ld a, $2 + call Function89259 + ret c + xor a + call Function8a2fe + ld hl, MobileCardFolderDeletedText + call PrintText + xor a + and a + ret + +MobileCardFolderAskDeleteText: + text_far _MobileCardFolderAskDeleteText + text_end + +MobileCardFolderDeleteAreYouSureText: + text_far _MobileCardFolderDeleteAreYouSureText + text_end + +MobileCardFolderDeletedText: + text_far _MobileCardFolderDeletedText + text_end + +Function8a241: + call LoadStandardMenuHeader + call Function891fe + call Function8a262 + jr nc, .asm_8a254 + call Function891fe + call Function89b28 + scf + ret +.asm_8a254 + call Function891de + call ClearBGPalettes + call ExitMenu + call Function891de + and a + ret + +Function8a262: + call ClearBGPalettes + call Function893e2 + call Mobile22_SetBGMapMode0 + farcall Function4a3a7 + farcall MG_Mobile_Layout_CreatePalBoxes + hlcoord 1, 0 + call Function8a53d + hlcoord 12, 4 + call Function8a58d + ld a, $5 + hlcoord 12, 4, wAttrmap + call Function8a5a3 + ld a, $6 + hlcoord 15, 4, wAttrmap + call Function8a5a3 + xor a + ld [wd02e], a + ld bc, wd013 + call Function8b36c + call Function8b493 + call Function891ab + call SetPalettes + call Function8b5e7 + ret + +Function8a2aa: + ld hl, MenuHeader_0x8a2ef + call LoadMenuHeader + ld hl, MobileCardFolderAskOpenOldText + call PrintText + ld a, $1 + call Function89259 + jr nc, .asm_8a2cf + ld hl, MobileCardFolderAskDeleteOldText + call PrintText + ld a, $2 + call Function89259 + jr c, .asm_8a2ea + call Function8a20d + jr .asm_8a2ea +.asm_8a2cf + call ExitMenu + call Function8a241 + jr c, .asm_8a2ed + ld a, $1 + call Function8a313 + call CloseSRAM + call Function891de + call Function89245 + call Function89168 + and a + ret +.asm_8a2ea + call CloseWindow +.asm_8a2ed + scf + ret + +MenuHeader_0x8a2ef: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + +MobileCardFolderAskOpenOldText: + text_far _MobileCardFolderAskOpenOldText + text_end + +MobileCardFolderAskDeleteOldText: + text_far _MobileCardFolderAskDeleteOldText + text_end + +Function8a2fe: + call Function8a313 + call Function89305 + ld hl, $a603 + ld bc, $8 + ld a, -1 + call ByteFill + call CloseSRAM + ret + +Function8a313: + ld c, a + call OpenSRAMBank4 + ld a, c + ld [$a60b], a + ret + +Function8a31c: + push bc + call Mobile22_SetBGMapMode0 + farcall Function4a3a7 + farcall MG_Mobile_Layout_CreatePalBoxes + hlcoord 1, 0 + call Function8a53d + hlcoord 12, 4 + call Function8a58d + call Function8a3b2 + pop bc + ld a, c + ld [wMenuCursorPosition], a + ld [wMenuSelection], a + call PlaceVerticalMenuItems + call InitVerticalMenuCursor + ld hl, w2DMenuFlags1 + set 7, [hl] +.asm_8a34e + call Function8a3a2 + call Mobile22_SetBGMapMode0 + call Function8a453 + call Function8a4d3 + call Function8a4fc + call Function891ab + call SetPalettes + call Function8a383 + jr c, .asm_8a370 + jr z, .asm_8a34e +.asm_8a36a + call Function89448 + xor a + ld e, a + ret +.asm_8a370 + call Function89448 + call PlaceHollowCursor + call Function8a3a2 + ld a, [wMenuSelection] + cp $ff + jr z, .asm_8a36a + ld e, a + and a + ret + +Function8a383: + farcall MobileMenuJoypad + ld a, c + ld hl, wMenuJoypadFilter + and [hl] + ret z + bit A_BUTTON_F, a + jr nz, .asm_8a399 + bit B_BUTTON_F, a + jr nz, .asm_8a39e + xor a + ret +.asm_8a399 + call PlayClickSFX + scf + ret +.asm_8a39e + call PlayClickSFX + ret + +Function8a3a2: + ld a, [wMenuCursorY] + dec a + ld hl, wd002 + ld e, a + ld d, 0 + add hl, de + ld a, [hl] + ld [wMenuSelection], a + ret + +Function8a3b2: + ld a, $1 + ld [wMenuSelection], a + call Function8a4fc + call Function8a3df + jr nc, .asm_8a3ce + decoord 0, 2 + ld b, $6 + ld c, $9 + call Function89b3b + ld hl, MenuHeader_0x8a435 + jr .asm_8a3db +.asm_8a3ce + decoord 0, 2 + ld b, $8 + ld c, $9 + call Function89b3b + ld hl, MenuHeader_0x8a40f +.asm_8a3db + call CopyMenuHeader + ret + +Function8a3df: + call OpenSRAMBank4 + ld hl, $a603 + call Function89b45 + call CloseSRAM + ld hl, wd002 + jr c, .asm_8a3f8 + ld de, Unknown_8a408 + call Function8a400 + scf + ret +.asm_8a3f8 + ld de, Unknown_8a40b + call Function8a400 + and a + ret + +Function8a400: + ld a, [de] + inc de + ld [hli], a + cp $ff + jr nz, Function8a400 + ret + +Unknown_8a408: db 1, 2, -1 +Unknown_8a40b: db 1, 2, 3, -1 + +MenuHeader_0x8a40f: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 2, 10, TEXTBOX_Y - 1 + dw MenuData_0x8a417 + db 1 ; default option + +MenuData_0x8a417: + db STATICMENU_CURSOR | STATICMENU_WRAP ; flags + db 4 ; items + db "めいしりスト@" + db "じぶんの めいし@" + db "めいしこうかん@" + db "やめる@" + +MenuHeader_0x8a435: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 2, 10, 9 + dw MenuData_0x8a43d + db 1 ; default option + +MenuData_0x8a43d: + db STATICMENU_CURSOR | STATICMENU_WRAP ; flags + db 3 ; items + db "めいしりスト@" + db "じぶんの めいし@" + db "やめる@" + +Function8a453: + hlcoord 0, 12 + ld b, $4 + ld c, $12 + call Textbox + hlcoord 1, 14 + ld de, String_8a476 + ld a, [wMenuSelection] + cp $ff + jr z, .asm_8a472 + ld de, Strings_8a483 + dec a + ld c, a + call Function8919e +.asm_8a472 + call PlaceString + ret + +String_8a476: + db "まえがめんもどります@" + +Strings_8a483: + db "おともだちめいしは" + next "ここいれておきます@" + + db "でんわばんごういれると" + next "めいしこうかんできます@" + + db "ともだちと じぶんめいしを" + next "せきがいせんで こうかん します@" + +Function8a4d3: + ld a, [wMenuSelection] + cp $1 + jr nz, .asm_8a4eb + ld a, $5 + hlcoord 12, 4, wAttrmap + call Function8a5a3 + ld a, $7 + hlcoord 15, 4, wAttrmap + call Function8a5a3 + ret +.asm_8a4eb + ld a, $7 + hlcoord 12, 4, wAttrmap + call Function8a5a3 + ld a, $6 + hlcoord 15, 4, wAttrmap + call Function8a5a3 + ret + +Function8a4fc: + ld a, [wMenuSelection] + cp $3 + jr nz, asm_8a529 + ld hl, wd012 + ld a, [hli] + ld b, a + ld a, [hld] + add b + ld [hl], a + ld b, a + ld c, $80 + call Function89cdf + call Function8a515 + ret + +Function8a515: + ld hl, wd012 + ld a, [hl] + cp $38 + jr c, .asm_8a520 + cp $3c + ret c +.asm_8a520 + ld a, [wd013] + cpl + inc a + ld [wd013], a + ret + +asm_8a529: + ld hl, wd012 + ld a, $3c + ld [hli], a + ld a, $ff + ld [hli], a + ld hl, wShadowOAM + xor a + ld bc, 8 * SPRITEOAMSTRUCT_LENGTH + call ByteFill + ret + +Function8a53d: + push hl + ld a, $15 + ld c, $8 + ld de, $14 + call Function8a573 + ld a, $1d + ld c, $9 + call Function8a57c + inc a + ld [hl], a + call Function8a584 + pop hl + add hl, de + ld a, $1f + ld c, $8 + call Function8a573 + dec hl + ld a, $51 + ld [hli], a + ld a, $26 + ld c, $1 + call Function8a57c + ld a, $52 + ld c, $3 + call Function8a573 + ld a, $27 + ld c, $6 + +Function8a573: + ld [hl], a + call Function8a584 + inc a + dec c + jr nz, Function8a573 + ret + +Function8a57c: + ld [hl], a + call Function8a584 + dec c + jr nz, Function8a57c + ret + +Function8a584: + push af + ld a, $4 + call Function89215 + inc hl + pop af + ret + +Function8a58d: + ld a, $2d + ld bc, $606 + ld de, $14 +.asm_8a595 + push bc + push hl +.asm_8a597 + ld [hli], a + inc a + dec c + jr nz, .asm_8a597 + pop hl + add hl, de + pop bc + dec b + jr nz, .asm_8a595 + ret + +Function8a5a3: + ld bc, $603 + ld de, $14 +.asm_8a5a9 + push bc + push hl +.asm_8a5ab + ld [hli], a + dec c + jr nz, .asm_8a5ab + pop hl + add hl, de + pop bc + dec b + jr nz, .asm_8a5a9 + ret + +Function8a5b6: + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, Palette_8a5e5 + ld de, wBGPals1 + 4 palettes + ld bc, 3 palettes + call CopyBytes + ld hl, Palette_8a5fd + ld de, wOBPals1 + ld bc, 1 palettes + call CopyBytes + ld hl, Palette_8a605 + ld de, wOBPals1 + 1 palettes + ld bc, 1 palettes + call CopyBytes + pop af + ldh [rSVBK], a + ret + +Palette_8a5e5: + RGB 31, 31, 31 + RGB 27, 19, 00 + RGB 07, 11, 22 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 16, 16, 31 + RGB 27, 19, 00 + RGB 00, 00, 00 + + RGB 31, 31, 31 + RGB 31, 00, 00 + RGB 27, 19, 00 + RGB 00, 00, 00 + +Palette_8a5fd: + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 00, 00, 00 + RGB 31, 31, 31 + +Palette_8a605: + RGB 00, 00, 00 + RGB 14, 18, 31 + RGB 16, 16, 31 + RGB 31, 31, 31 + +Function8a60d: + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, Palette_8a624 + ld de, wOBPals1 + ld bc, 1 palettes + call CopyBytes + pop af + ldh [rSVBK], a + ret + +Palette_8a624: + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 00, 00, 00 + +Function8a62c: + call LoadStandardMenuHeader + call Function891fe + xor a + call Function8b94a + call Function8b677 +.asm_8a639 + xor a + ld [wd033], a + ld [wd032], a + ld [wd0e3], a + call Function8b7bd + ld a, c + and a + jr z, .asm_8a66a + ld [wMenuSelection], a + ld b, a + ld a, [wScrollingMenuCursorPosition] + inc a + ld [wd034], a + push bc + call Function8b960 + ld a, c + pop bc + jr z, .asm_8a639 + ld c, a + ld hl, Jumptable_8a671 + ld a, b + ld [wMenuSelection], a + ld a, c + dec a + rst JumpTable + jr .asm_8a639 +.asm_8a66a + call Function891fe + call Function89b28 + ret + +Jumptable_8a671: + dw Function8a679 + dw Function8a6cd + dw Function8a8c3 + dw Function8a930 + +Function8a679: + call Function891de + call ClearBGPalettes + call Function893cc + call OpenSRAMBank4 + call Function8931b + call Function89844 + call CloseSRAM + call OpenSRAMBank4 + call Function8939a + call Function89856 + hlcoord 1, 13 + call Function899fe + call Function891ab + call CloseSRAM +.asm_8a6a3 + call Function89a57 + jr c, .asm_8a6a3 + and a + jr z, Function8a679 + ld hl, Jumptable_8a6bc + dec a + rst JumpTable + jr c, Function8a679 + call Function891fe + call Function8b677 + call Function89448 + ret + +Jumptable_8a6bc: + dw Function8a6c0 + dw Function8a6c5 + +Function8a6c0: + call PlayClickSFX + and a + ret + +Function8a6c5: + call PlayClickSFX + call Function89d0d + scf + ret + +Function8a6cd: + call Function891de + call ClearBGPalettes + call Function893cc + call OpenSRAMBank4 + call Function8931b + call Function89844 + call Function8a757 + call CloseSRAM +.asm_8a6e5 + call OpenSRAMBank4 + call Function8931b + call Function89856 + call Function89a2e + call Function891ab + xor a + ld [wd02f], a + call CloseSRAM +.asm_8a6fb + call Function89b97 + call Function89c67 + jr c, .asm_8a718 + ld a, b + and a + jr z, .asm_8a6fb + call PlayClickSFX + call Function89448 + ld a, [wd011] + ld hl, Jumptable_8a74f + rst JumpTable + jr nc, .asm_8a6e5 + jr .asm_8a742 +.asm_8a718 + call OpenSRAMBank4 + call Function8a765 + call CloseSRAM + jr nc, .asm_8a73f + call Mobile22_SetBGMapMode0 + call Function89448 + call Function89a23 + hlcoord 1, 13 + ld de, String_89135 + call PlaceString + call WaitBGMap + ld a, $2 + call Function89254 + jr c, .asm_8a6e5 +.asm_8a73f + call CloseSRAM +.asm_8a742 + call ClearBGPalettes + call Function89448 + call Function891d3 + call Function8b677 + ret + +Jumptable_8a74f: + dw Function8a78c + dw Function8a7cb + dw Function8a818 + dw Function8a8a1 + +Function8a757: + call Function8939a + xor a + ld [wd010], a + ld [wd011], a + ld [wd012], a + ret + +Function8a765: + call Function8931b + push bc + ld hl, $0 + add hl, bc + ld de, wd002 + ld c, $6 + call Function89185 + pop bc + jr nz, .asm_8a78a + push bc + ld hl, $11 + add hl, bc + ld de, wd008 + ld c, $8 + call Function89185 + pop bc + jr nz, .asm_8a78a + and a + ret +.asm_8a78a + scf + ret + +Function8a78c: + call Function891fe + ld de, wd002 + ld b, NAME_FRIEND + farcall NamingScreen + call OpenSRAMBank4 + call Function8931b + push bc + ld hl, $0 + add hl, bc + ld d, h + ld e, l + ld hl, wd002 + call InitName + call CloseSRAM + call DelayFrame + call JoyTextDelay + call Function891de + call ClearBGPalettes + call Function893cc + call OpenSRAMBank4 + pop bc + call Function89844 + call CloseSRAM + and a + ret + +Function8a7cb: + ld a, [wMenuSelection] + push af + call Function891de + ld de, wd008 + ld c, $0 + farcall Function17a68f + jr c, .asm_8a7f4 + ld hl, wd008 + ld a, $ff + ld bc, $8 + call ByteFill + ld h, d + ld l, e + ld de, wd008 + ld c, $8 + call Function89193 +.asm_8a7f4 + pop af + ld [wMenuSelection], a + call Function891de + call ClearBGPalettes + call Function893cc + call OpenSRAMBank4 + call Function8931b + call Function89844 + call Function89856 + call Function89a2e + call Function891ab + call CloseSRAM + and a + ret + +Function8a818: + call Function89a23 + ld hl, wd002 + call Function89331 + jr c, .asm_8a875 + ld hl, wd008 + call Function89b45 + jr nc, .asm_8a87a + call OpenSRAMBank4 + call Function8a765 + jr nc, .asm_8a863 + call Function8931b + push bc + ld hl, $0 + add hl, bc + ld d, h + ld e, l + ld hl, wd002 + ld c, $6 + call Function89193 + pop bc + ld hl, $11 + add hl, bc + ld d, h + ld e, l + ld hl, wd008 + ld c, $8 + call Function89193 + hlcoord 1, 13 + ld de, .string_8a868 + call PlaceString + call WaitBGMap + call JoyWaitAorB +.asm_8a863 + call CloseSRAM + scf + ret + +.string_8a868 + db "めいしかきかえ まし@" + +.asm_8a875 + ld de, String_8a88b + jr .asm_8a87d +.asm_8a87a + ld de, String_8911c +.asm_8a87d + hlcoord 1, 13 + call PlaceString + call WaitBGMap + call JoyWaitAorB + and a + ret + +String_8a88b: + db "おともだちなまえが" + next "かかれて いません!@" + +Function8a8a1: + call OpenSRAMBank4 + call Function8a765 + call CloseSRAM + jr nc, .asm_8a8bf + call Function89a23 + hlcoord 1, 13 + ld de, String_89135 + call PlaceString + ld a, $2 + call Function89254 + jr c, .asm_8a8c1 +.asm_8a8bf + scf + ret +.asm_8a8c1 + and a + ret + +Function8a8c3: + call Function891de + call ClearBGPalettes + call Function893cc + call OpenSRAMBank4 + call Function8931b + call Function89844 + call Function8939a + call Function89856 + call CloseSRAM + call Function891ab + hlcoord 1, 13 + ld de, String_8a919 + call PlaceString + ld a, $2 + call Function89254 + jr c, .asm_8a90f + call OpenSRAMBank4 + call Function892b4 + call CloseSRAM + call Function89a23 + call Mobile22_SetBGMapMode0 + hlcoord 1, 13 + ld de, String_8a926 + call PlaceString + call WaitBGMap + call JoyWaitAorB +.asm_8a90f + call Function89448 + call Function891fe + call Function8b677 + ret + +String_8a919: + db "このデータけしますか?@" + +String_8a926: + db "データけしまし@" + +Function8a930: + ld a, [wMenuSelection] + push af + xor a + ld [wd032], a + ld a, $1 + ld [wd033], a + ld a, [wd034] + ld [wd0e3], a +.asm_8a943 + call Function8b7bd + ld a, [wMenuJoypad] + and A_BUTTON + jr nz, .asm_8a953 + ld a, c + and a + jr nz, .asm_8a943 + pop af + ret +.asm_8a953 + call OpenSRAMBank4 + pop af + cp c + jr z, .asm_8a995 + push bc + ld [wMenuSelection], a + call Function8931b + push bc + ld h, b + ld l, c + ld de, wd002 + ld bc, $25 + call CopyBytes + pop de + pop bc + ld a, c + ld [wMenuSelection], a + call Function8931b + push bc + ld h, b + ld l, c + ld bc, $25 + call CopyBytes + pop de + ld hl, wd002 + ld bc, $25 + call CopyBytes + ld de, SFX_SWITCH_POKEMON + call WaitPlaySFX + ld de, SFX_SWITCH_POKEMON + call WaitPlaySFX +.asm_8a995 + call CloseSRAM + ret + +Function8a999: + ld hl, MenuHeader_0x8a9c9 + call LoadMenuHeader + ld c, $1 +.asm_8a9a1 + call Function8a9ce + jr c, .asm_8a9bb + push bc + push de + call LoadStandardMenuHeader + pop de + dec e + ld a, e + ld hl, Jumptable_8a9c5 + rst JumpTable + call Function891fe + call Function89b28 + pop bc + jr .asm_8a9a1 +.asm_8a9bb + call Mobile_EnableSpriteUpdates + call CloseWindow + call Mobile_DisableSpriteUpdates + ret + +Jumptable_8a9c5: + dw Function8aa0a + dw Function8ab3b + +MenuHeader_0x8a9c9: + db MENU_BACKUP_TILES ; flags + menu_coords 11, 4, 18, TEXTBOX_Y - 1 + +Function8a9ce: + push bc + decoord 11, 4 + ld b, $6 + ld c, $6 + call Function89b3b + pop bc + ld a, c + ld hl, MenuHeader_0x8a9f2 + call Function89d5e + ld hl, Function8aa09 + call Function89d85 + jr c, .asm_8a9ed + ld c, a + ld e, a + and a + ret +.asm_8a9ed + ld c, a + ld e, $0 + scf + ret + +MenuHeader_0x8a9f2: + db MENU_BACKUP_TILES ; flags + menu_coords 11, 4, 18, TEXTBOX_Y - 1 + dw MenuData_0x8a9fa + db 1 ; default option + +MenuData_0x8a9fa: + db STATICMENU_CURSOR | STATICMENU_WRAP ; flags + db 3 ; items + db "へんしゅう@" + db "みる@" + db "やめる@" + +Function8aa09: + ret + +Function8aa0a: + ld a, $1 + ld [wd02f], a + ld [wd011], a + xor a + ld [wd010], a + ld [wd012], a + call OpenSRAMBank4 + ld hl, $a603 + ld de, wd008 + call Function89381 + call CloseSRAM + call Function891fe + call ClearBGPalettes + call Function893cc + call Function89807 + call Function89492 + call Function894ca +.asm_8aa3a + call Function8987f + call Function89a2e + call Function891ab +.asm_8aa43 + call Function89b97 + call Function89c67 + jr c, .asm_8aa61 + ld a, b + and a + jr z, .asm_8aa43 + call PlayClickSFX + call Function89448 + ld a, [wd011] + dec a + ld hl, Jumptable_8aa6d + rst JumpTable + jr nc, .asm_8aa3a + jr .asm_8aa69 +.asm_8aa61 + call Function89448 + call Function8ab11 + jr nc, .asm_8aa3a +.asm_8aa69 + call Function89448 + ret + +Jumptable_8aa6d: + dw Function8aa73 + dw Function8aab6 + dw Function8ab11 + +Function8aa73: + ld a, [wMenuSelection] + ld e, a + push de + call Function891de + ld de, wd008 + ld c, $0 + farcall Function17a68f + jr c, .asm_8aa9d + ld hl, wd008 + ld a, $ff + ld bc, $8 + call ByteFill + ld h, d + ld l, e + ld de, wd008 + ld c, $8 + call Function89193 +.asm_8aa9d + call Function891fe + call ClearBGPalettes + call Function893cc + call Function89807 + call Function89492 + call Function894ca + pop de + ld a, e + ld [wMenuSelection], a + and a + ret + +Function8aab6: + call Function89a23 + ld hl, wd008 + call Function89b45 + jr nc, Function8ab00 + call OpenSRAMBank4 + ld de, wd008 + ld hl, $a603 + ld c, $8 + call Function89185 + jr z, .asm_8aaeb + ld hl, wd008 + ld de, $a603 + ld c, $8 + call Function89193 + hlcoord 1, 13 + ld de, String_8aaf0 + call PlaceString + call WaitBGMap + call JoyWaitAorB +.asm_8aaeb + call CloseSRAM + scf + ret + +String_8aaf0: + db "あたらしい めいしできまし@" + +Function8ab00: + ld de, String_8911c + hlcoord 1, 13 + call PlaceString + call WaitBGMap + call Mobile22_PromptButton + and a + ret + +Function8ab11: + call OpenSRAMBank4 + ld hl, $a603 + ld de, wd008 + ld c, $8 + call Function89185 + call CloseSRAM + jr z, .asm_8ab37 + call Function89a23 + hlcoord 1, 13 + ld de, String_89135 + call PlaceString + ld a, $2 + call Function89254 + jr c, .asm_8ab39 +.asm_8ab37 + scf + ret +.asm_8ab39 + and a + ret + +Function8ab3b: +.pressed_start + call Function891fe + call ClearBGPalettes + call Function893cc + call Function89807 + call Function89492 + call Function894ca + call OpenSRAMBank4 + ld hl, $a603 + ld de, wd008 + call Function89381 + call CloseSRAM + call Function8987f + call OpenSRAMBank4 + hlcoord 1, 13 + ld bc, $a007 + call Function89a0c + call CloseSRAM + call Function891ab + call .JoypadLoop + jr c, .pressed_start + ret + +.JoypadLoop: + call JoyTextDelay_ForcehJoyDown + bit A_BUTTON_F, c + jr nz, .a_b_button + bit B_BUTTON_F, c + jr nz, .a_b_button + bit START_F, c + jr z, .JoypadLoop + call PlayClickSFX + call Function89d0d + scf + ret + +.a_b_button + call PlayClickSFX + and a + ret + +Function8ab93: + call ClearBGPalettes + call LoadStandardMenuHeader + farcall DoNameCardSwap + call ClearSprites + call Function891fe + call Function89b28 + ret + +Function8aba9: + ld a, $2 + call Function8b94a + ld a, $1 + ld [wd032], a +.asm_8abb3 + call Function891fe + call Function8b677 +.asm_8abb9 + call Function8b7bd + jr z, .asm_8abdf + ld a, c + ld [wMenuSelection], a + call OpenSRAMBank4 + call Function8931b + ld hl, $0011 + add hl, bc + call Function89b45 + call CloseSRAM + jr c, .asm_8abe2 + ld de, SFX_WRONG + call WaitPlaySFX + call CloseSRAM + jr .asm_8abb9 + +.asm_8abdf + xor a + ld c, a + ret + +.asm_8abe2 + call PlayClickSFX +.asm_8abe5 + call Function891de + call ClearBGPalettes + call Function893cc + call OpenSRAMBank4 + call Function8931b + call Function89844 + call CloseSRAM + call OpenSRAMBank4 + call Function8939a + call Function89856 + hlcoord 1, 13 + call Function899fe + call CloseSRAM + call Function891ab +.asm_8ac0f + call Function89a57 + jr c, .asm_8ac0f + and a + jr z, .asm_8abe5 + cp $2 + jr z, .asm_8ac0f + hlcoord 0, 12 + ld b, $4 + ld c, $12 + call Textbox + hlcoord 1, 14 + ld de, String_8ac3b + call PlaceString + ld a, $1 + call Function8925e + jp c, .asm_8abb3 + ld a, [wMenuSelection] + ld c, a + ret + +String_8ac3b: + db "こともだちでんわを" + next "かけますか?@" + +Function8ac4e: + xor a + ld [wMenuSelection], a + push de + call Function891de + call ClearBGPalettes + call Function893cc + pop bc + call Function89844 + call Function8939a + call Function89856 + hlcoord 1, 13 + call Function899fe + call Function891ab + ret + +Function8ac70: + push de + ld a, $3 + call Function8b94a + +Function8ac76: + call Function891fe + call Function8b677 + +Function8ac7c: + call Function8b7bd + jr z, .asm_8acf0 + ld a, c + ld [wd02f], a + ld [wMenuSelection], a + call OpenSRAMBank4 + call Function8931b + call Function8932d + call CloseSRAM + jr nc, .asm_8acb0 + call OpenSRAMBank4 + ld hl, $0011 + add hl, bc + call Function89b45 + call CloseSRAM + jr nc, .asm_8accc + call OpenSRAMBank4 + call Function892b7 + call CloseSRAM + jr .asm_8accc + +.asm_8acb0 + call Function8ad0b + jr c, Function8ac76 + and a + jr nz, .asm_8accc + call OpenSRAMBank4 + ld h, b + ld l, c + ld d, $0 + ld e, $6 + add hl, de + ld d, h + ld e, l + pop hl + ld c, $1f + call Function89193 + jr .asm_8ace4 + +.asm_8accc + pop hl + call OpenSRAMBank4 + ld d, b + ld e, c + ld c, $6 + call Function89193 + ld a, $6 + add e + ld e, a + ld a, $0 + adc d + ld d, a + ld c, $1f + call Function89193 + +.asm_8ace4 + call CloseSRAM + call LoadStandardFont + ld a, [wd02f] + ld c, a + and a + ret + +.asm_8acf0 + ld hl, MobileCardFolderFinishRegisteringCardsText + call PrintText + ld a, $2 + call Function89259 + jp c, Function8ac7c + call LoadStandardFont + pop de + ld c, $0 + scf + ret + +MobileCardFolderFinishRegisteringCardsText: + text_far _MobileCardFolderFinishRegisteringCardsText + text_end + +Function8ad0b: +.asm_8ad0b + ld a, [wMenuSelection] + ld [wd02f], a + call Function891de + call ClearBGPalettes + call Function893cc + call OpenSRAMBank4 + call Function8931b + push bc + call Function89844 + call Function8939a + call Function89856 + hlcoord 1, 13 + call Function899fe + call CloseSRAM + call Function891ab + pop bc +.asm_8ad37 + push bc + call Function89a57 + pop bc + jr c, .asm_8ad37 + and a + jr z, .asm_8ad0b + cp $2 + jr z, .asm_8ad37 + call Mobile22_SetBGMapMode0 + push bc + hlcoord 0, 12 + ld b, $4 + ld c, $12 + call Textbox + ld de, String_8ad89 + hlcoord 1, 14 + call PlaceString + ld a, $2 + call Function8925e + jr c, .asm_8ad87 + call Mobile22_SetBGMapMode0 + hlcoord 0, 12 + ld b, $4 + ld c, $12 + call Textbox + ld de, String_8ad9c + hlcoord 1, 14 + call PlaceString + ld a, $1 + call Function8925e + jr c, .asm_8ad84 + ld a, $0 + jr .asm_8ad86 + +.asm_8ad84 + ld a, $1 + +.asm_8ad86 + and a + +.asm_8ad87 + pop bc + ret + +String_8ad89: + db "こめいしけして" + next "いれかえますか?@" + +String_8ad9c: + db "おともだちなまえを" + next "のこして おきますか?@" + +Function8adb3: + call Function891de + call Function8a262 + push af + call Function891de + pop af + ret + +Function8adbf: ; unreferenced + call OpenSRAMBank4 + ld hl, $a603 + call Function89b45 + call CloseSRAM + ret + +Function8adcc: + call OpenSRAMBank4 + call Function8b3b0 + call CloseSRAM + ret nc + cp $2 + ret z + scf + ret diff --git a/mobile/mobile_22_2.asm b/mobile/mobile_22_2.asm new file mode 100644 index 0000000..2eb183c --- /dev/null +++ b/mobile/mobile_22_2.asm @@ -0,0 +1,1099 @@ +Function8b342:: +; Loads the map data pointer, then runs through a +; dw with three dummy functions. Spends a lot of energy +; doing pretty much nothing. + call GetMapAttributesPointer + ld d, h + ld e, l + +; Everything between here and "ret" is useless. + xor a +.loop + push af + ld hl, .dw + rst JumpTable + pop af + inc a + cp 3 + jr nz, .loop + ret + +.dw + dw .zero + dw .one + dw .two + +.zero + ret + +.one + ret + +.two + ret + +Function8b35d: ; unreferenced + ld a, h + cp d + ret nz + ld a, l + cp e + ret + +Function8b363: ; unreferenced + push bc + farcall Mobile_AlwaysReturnNotCarry + pop bc + ret + +Function8b36c: + ; [bc + (0:4)] = -1 + push bc + ld h, b + ld l, c + ld bc, 4 + ld a, -1 + call ByteFill + pop bc + ret + +Function8b379: + ; d = [bc + e] + push bc + ld a, c + add e + ld c, a + ld a, $0 + adc b + ld b, a + ld a, [bc] + ld d, a + pop bc + ret + +Function8b385: + ; [bc + e] = d + push bc + ld a, c + add e + ld c, a + ld a, $0 + adc b + ld b, a + ld a, d + ld [bc], a + pop bc + ret + +Function8b391: + ; find first e in range(4) such that [bc + e] == -1 + ; if none exist, return carry + push bc + ld e, 0 + ld d, 4 +.loop + ld a, [bc] + inc bc + cp -1 + jr z, .done + inc e + dec d + jr nz, .loop + dec e + scf +.done + pop bc + ret + +Function8b3a4: + ; strcmp(hl, bc, 4) + push de + push bc + ld d, b + ld e, c + ld c, 4 + call Function89185 + pop bc + pop de + ret + +Function8b3b0: + ld bc, s4_a037 + ld a, [s4_a60b] + and a + jr z, .asm_8b3c2 + cp $3 + jr nc, .asm_8b3c2 + call Function8b391 + jr c, .asm_8b3c9 +.asm_8b3c2 + call Function8b36c + xor a + ld [s4_a60b], a +.asm_8b3c9 + ld a, [s4_a60b] + ret + +Function8b3cd: + push de + push bc + ld e, $4 +.asm_8b3d1 + ld a, [bc] + inc bc + call Function8998b + inc hl + dec e + jr nz, .asm_8b3d1 + pop bc + pop de + ret + +Function8b3dd: + push de + push bc + call JoyTextDelay_ForcehJoyDown ; joypad + ld a, c + pop bc + pop de + bit A_BUTTON_F, a + jr nz, .a_button + bit B_BUTTON_F, a + jr nz, .b_button + bit D_UP_F, a + jr nz, .d_up + bit D_DOWN_F, a + jr nz, .d_down + and a + ret + +.a_button + ld a, e + cp $3 + jr z, .e_is_zero + inc e + ld d, 0 + call Function8b385 + xor a + ld [wd010], a + ret + +.e_is_zero + call PlayClickSFX + ld d, $0 + scf + ret + +.b_button + ld a, e + and a + jr nz, .e_is_not_zero + call PlayClickSFX + ld d, -1 + call Function8b385 + ld d, 1 + scf + ret + +.e_is_not_zero + ld d, -1 + call Function8b385 + dec e + xor a + ld [wd010], a + ret + +.d_up + call Function8b379 + ld a, d + cp $a + jr c, .less_than_10_up_1 + ld d, $9 +.less_than_10_up_1 + inc d + ld a, d + cp $a + jr c, .less_than_10_up_2 + ld d, $0 +.less_than_10_up_2 + call Function8b385 + xor a + ld [wd010], a + ret + +.d_down + call Function8b379 + ld a, d + cp $a + jr c, .less_than_10_down + ld d, $0 +.less_than_10_down + ld a, d + dec d + and a + jr nz, .nonzero_down + ld d, $9 +.nonzero_down + call Function8b385 + xor a + ld [wd010], a + ret + +Function8b45c: + call Function8b36c + xor a + ld [wd010], a + ld [wd012], a + call Function8b391 + ld d, $0 + call Function8b385 +.asm_8b46e + call Mobile22_SetBGMapMode0 + call Function8b493 + call Function8b4cc + call Function8b518 + call Function89b78 + push bc + call Function8b4fd + call Function89c44 + ld a, $1 + ldh [hBGMapMode], a + pop bc + call Function8b3dd + jr nc, .asm_8b46e + ld a, d + and a + ret z + scf + ret + +Function8b493: + push bc + call Mobile22_SetBGMapMode0 + call Function8b521 + ld hl, Jumptable_8b4a0 + pop bc + rst JumpTable + ret + +Jumptable_8b4a0: + dw Function8b4a4 + dw Function8b4b8 + +Function8b4a4: + push bc + push de + call Function8b4d8 + call Textbox + pop de + pop bc + call Function8b4cc + call Function8b518 + call Function8b3cd + ret + +Function8b4b8: + push bc + push de + call Function8b4ea + call Function89b3b + pop de + pop bc + call Function8b4cc + call Function8b518 + call Function8b3cd + ret + +Function8b4cc: + push bc + ld hl, Unknown_8b529 + call Function8b50a + ld a, [hli] + ld h, [hl] + ld l, a + pop bc + ret + +Function8b4d8: + ld hl, Unknown_8b529 + call Function8b50a + push hl + inc hl + inc hl + ld a, [hli] + ld b, a + ld a, [hl] + ld c, a + pop hl + ld a, [hli] + ld h, [hl] + ld l, a + ret + +Function8b4ea: + ld hl, Unknown_8b529 + call Function8b50a + push hl + inc hl + inc hl + ld a, [hli] + ld b, a + ld a, [hl] + ld c, a + pop hl + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + ret + +Function8b4fd: + ld hl, Unknown_8b529 + 4 + call Function8b50a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, [hli] + ld d, a + ret + +Function8b50a: + ld a, [wd02e] + and a + ret z + ld b, $0 + ld c, $8 +.asm_8b513 + add hl, bc + dec a + jr nz, .asm_8b513 + ret + +Function8b518: + push de + ld d, $0 + ld e, $14 + add hl, de + inc hl + pop de + ret + +Function8b521: + ld hl, Unknown_8b529 + 7 + call Function8b50a + ld a, [hl] + ret + +Unknown_8b529: + dwcoord 2, 5 + db 1, 4, $20, $49, 0, 1 + dwcoord 7, 4 + db 1, 4, $48, $41, 0, 0 + +Function8b539: + ld bc, wd017 + call Function8b36c + xor a + ld [wd012], a + ld [wd02e], a + call Function8b493 + call Function8b4fd + ld e, $0 + call Function89c44 + call CGBOnly_CopyTilemapAtOnce + ret + +Function8b555: +.loop + ld hl, EnterNewPasscodeText + call PrintText + ld bc, wd017 + call Function8b45c + jr c, .asm_8b5c8 + call Function89448 + ld bc, wd017 + call Function8b493 + ld bc, wd017 + call Function8b664 + jr nz, .asm_8b57c + ld hl, FourZerosInvalidText + call PrintText + jr .loop + +.asm_8b57c + ld hl, ConfirmPasscodeText + call PrintText + ld bc, wd013 + call Function8b45c + jr c, .loop + ld bc, wd017 + ld hl, wd013 + call Function8b3a4 + jr z, .strings_equal + call Function89448 + ld bc, wd013 + call Function8b493 + ld hl, PasscodesNotSameText + call PrintText + jr .asm_8b57c + +.strings_equal + call OpenSRAMBank4 + ld hl, wd013 + ld de, s4_a037 + ld bc, $4 + call CopyBytes + call CloseSRAM + call Function89448 + ld bc, wd013 + call Function8b493 + ld hl, PasscodeSetText + call PrintText + and a +.asm_8b5c8 + push af + call Function89448 + pop af + ret + +EnterNewPasscodeText: + text_far _EnterNewPasscodeText + text_end + +ConfirmPasscodeText: + text_far _ConfirmPasscodeText + text_end + +PasscodesNotSameText: + text_far _PasscodesNotSameText + text_end + +PasscodeSetText: + text_far _PasscodeSetText + text_end + +FourZerosInvalidText: + text_far _FourZerosInvalidText + text_end + +Function8b5e7: + ld bc, wd013 + call Function8b36c + xor a + ld [wd012], a + ld [wd02e], a + call Function8b493 + call Function891ab + call Function8b4fd + ld e, $0 + call Function89c44 +.asm_8b602 + ld hl, EnterPasscodeText + call PrintText + ld bc, wd013 + call Function8b45c + jr c, .asm_8b63c + call Function89448 + ld bc, wd013 + call Function8b493 + call OpenSRAMBank4 + ld hl, s4_a037 + call Function8b3a4 + call CloseSRAM + jr z, .asm_8b635 + ld hl, IncorrectPasscodeText + call PrintText + ld bc, wd013 + call Function8b36c + jr .asm_8b602 +.asm_8b635 + ld hl, UnknownText_0x8b64c + call PrintText + and a +.asm_8b63c + push af + call Function89448 + pop af + ret + +EnterPasscodeText: + text_far _EnterPasscodeText + text_end + +IncorrectPasscodeText: + text_far _IncorrectPasscodeText + text_end + +UnknownText_0x8b64c: + ; CARD FOLDER open.@ @ + text_far _CardFolderOpenText + text_asm + ld de, SFX_TWINKLE + call PlaySFX + call WaitSFX + ld c, $8 + call DelayFrames + ld hl, .string_8b663 + ret + +.string_8b663 + text_end + +Function8b664: + push bc + ld de, $4 +.asm_8b668 + ld a, [bc] + cp $0 + jr nz, .asm_8b66e + inc d +.asm_8b66e + inc bc + dec e + jr nz, .asm_8b668 + pop bc + ld a, d + cp $4 + ret + +Function8b677: + call ClearBGPalettes + call DisableLCD + call Function8b690 + call Function8b6bb + call Function8b6ed + call EnableLCD + call Function891ab + call SetPalettes + ret + +Function8b690: + ld hl, MobileCardListGFX + ld de, vTiles2 + ld bc, $16 tiles + ld a, BANK(MobileCardListGFX) + call FarCopyBytes + ld hl, MobileCardListGFX tile $15 + ld de, vTiles2 tile $61 + ld bc, 1 tiles + ld a, BANK(MobileCardListGFX) + call FarCopyBytes + ld hl, MobileCardListGFX tile $16 + ld de, vTiles0 tile $ee + ld bc, 1 tiles + ld a, BANK(MobileCardListGFX) + call FarCopyBytes + ret + +Function8b6bb: + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, Palette_8b6d5 + ld de, wBGPals1 + ld bc, 3 palettes + call CopyBytes + pop af + ldh [rSVBK], a + call Function8949c + ret + +Palette_8b6d5: + RGB 31, 31, 31 + RGB 31, 21, 00 + RGB 14, 07, 03 + RGB 00, 00, 00 + RGB 31, 31, 31 + RGB 31, 21, 00 + RGB 22, 09, 17 + RGB 00, 00, 00 + RGB 31, 31, 31 + RGB 31, 21, 00 + RGB 06, 24, 08 + RGB 00, 00, 00 + +Function8b6ed: + hlcoord 0, 0, wAttrmap + ld bc, $012c + xor a + call ByteFill + hlcoord 0, 14, wAttrmap + ld bc, $0050 + ld a, $7 + call ByteFill + ret + +Function8b703: + call Mobile22_SetBGMapMode0 + push hl + ld a, $c + ld [hli], a + inc a + call Function8b73e + inc a + ld [hl], a + pop hl + push hl + push bc + ld de, SCREEN_WIDTH + add hl, de +.asm_8b717 + push hl + ld a, $f + ld [hli], a + ld a, $7f + call Function8b73e + ld a, $11 + ld [hl], a + pop hl + ld de, SCREEN_WIDTH + add hl, de + dec b + jr nz, .asm_8b717 + call Function8b732 + pop bc + pop hl + jr Function8b744 + +Function8b732: + ld a, $12 + ld [hli], a + ld a, $13 + call Function8b73e + ld a, $14 + ld [hl], a + ret + +Function8b73e: + ld d, c +.asm_8b73f + ld [hli], a + dec d + jr nz, .asm_8b73f + ret + +Function8b744: + ld de, wAttrmap - wTilemap + add hl, de + inc b + inc b + inc c + inc c + xor a +.asm_8b74d + push bc + push hl +.asm_8b74f + ld [hli], a + dec c + jr nz, .asm_8b74f + pop hl + ld de, SCREEN_WIDTH + add hl, de + pop bc + dec b + jr nz, .asm_8b74d + ret + +Function8b75d: + call Mobile22_SetBGMapMode0 + hlcoord 0, 0 + ld a, $1 + ld bc, SCREEN_WIDTH + call ByteFill + hlcoord 0, 1 + ld a, $2 + ld [hl], a + hlcoord 9, 1 + ld c, $b + call Function8b788 + hlcoord 1, 1 + ld a, $4 + ld e, $8 +.asm_8b780 + ld [hli], a + inc a + dec e + jr nz, .asm_8b780 + jr Function8b79e + +Function8b787: ; unreferenced + ret + +Function8b788: +.asm_8b788 + ld a, $2 + ld [hli], a + dec c + ret z + ld a, $1 + ld [hli], a + dec c + ret z + ld a, $3 + ld [hli], a + dec c + ret z + ld a, $1 + ld [hli], a + dec c + jr nz, .asm_8b788 + ret + +Function8b79e: + hlcoord 0, 1, wAttrmap + ld a, $1 + ld [hli], a + hlcoord 9, 1, wAttrmap + ld e, $b +.asm_8b7a9 + ld a, $2 + ld [hli], a + dec e + ret z + xor a + ld [hli], a + dec e + ret z + ld a, $1 + ld [hli], a + dec e + ret z + xor a + ld [hli], a + dec e + jr nz, .asm_8b7a9 + ret + +Function8b7bd: + call Function8b855 + ld hl, MenuHeader_0x8b867 + call CopyMenuHeader + ld a, [wd030] + ld [wMenuCursorPosition], a + ld a, [wd031] + ld [wMenuScrollPosition], a + ld a, [wd032] + and a + jr z, .asm_8b7e0 + ld a, [wMenuFlags] + set 3, a + ld [wMenuFlags], a + +.asm_8b7e0 + ld a, [wd0e3] + and a + jr z, .asm_8b7ea + dec a + ld [wScrollingMenuCursorPosition], a + +.asm_8b7ea + hlcoord 0, 2 + ld b, $b + ld c, $12 + call Function8b703 + call Function8b75d + call UpdateSprites + call Mobile_EnableSpriteUpdates + call ScrollingMenu + call Mobile_DisableSpriteUpdates + ld a, [wMenuJoypad] + cp B_BUTTON + jr z, .asm_8b823 + cp D_LEFT + jr nz, .asm_8b813 + call Function8b832 + jr .asm_8b7ea + +.asm_8b813 + cp D_RIGHT + jr nz, .asm_8b81c + call Function8b83e + jr .asm_8b7ea + +.asm_8b81c + ld a, [wMenuSelection] + cp $ff + jr nz, .asm_8b824 + +.asm_8b823 + xor a + +.asm_8b824 + ld c, a + ld a, [wMenuCursorY] + ld [wd030], a + ld a, [wMenuScrollPosition] + ld [wd031], a + ret + +Function8b832: + ld a, [wMenuScrollPosition] + ld hl, wMenuDataItems + sub [hl] + jr nc, Function8b84b + xor a + jr Function8b84b + +Function8b83e: + ld a, [wMenuScrollPosition] + ld hl, wMenuDataItems + add [hl] + cp $24 + jr c, Function8b84b + ld a, $24 + +Function8b84b: + ld [wMenuScrollPosition], a + ld a, [wMenuCursorY] + ld [wMenuCursorPosition], a + ret + +Function8b855: + ld a, $28 + ld hl, wd002 + ld [hli], a + ld c, $28 + xor a +.asm_8b85e + inc a + ld [hli], a + dec c + jr nz, .asm_8b85e + ld a, $ff + ld [hl], a + ret + +MenuHeader_0x8b867: + db MENU_BACKUP_TILES ; flags + menu_coords 1, 3, 18, 13 + dw MenuData_0x8b870 + db 1 ; default option + + db 0 + +MenuData_0x8b870: + db SCROLLINGMENU_ENABLE_FUNCTION3 | SCROLLINGMENU_DISPLAY_ARROWS | SCROLLINGMENU_ENABLE_RIGHT | SCROLLINGMENU_ENABLE_LEFT ; flags + db 5, 3 ; rows, columns + db SCROLLINGMENU_ITEMS_NORMAL ; item format + dbw 0, wd002 + dba Function8b880 + dba Function8b88c + dba Function8b8c8 + +Function8b880: + ld h, d + ld l, e + ld de, wMenuSelection + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ret + +Function8b88c: + call OpenSRAMBank4 + ld h, d + ld l, e + push hl + ld de, String_89116 + call Function8931b + call Function8932d + jr c, .asm_8b8a3 + ld hl, 0 + add hl, bc + ld d, h + ld e, l + +.asm_8b8a3 + pop hl + push hl + call PlaceString + pop hl + ld d, $0 + ld e, $6 + add hl, de + push hl + ld de, String_89116 + call Function8931b + call Function8934a + jr c, .asm_8b8c0 + ld hl, $0006 + add hl, bc + ld d, h + ld e, l + +.asm_8b8c0 + pop hl + call PlaceString + call CloseSRAM + ret + +Function8b8c8: + hlcoord 0, 14 + ld b, $2 + ld c, $12 + call Textbox + ld a, [wd033] + ld b, 0 + ld c, a + ld hl, Unknown_8b903 + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ld d, h + ld e, l + hlcoord 1, 16 + call PlaceString + hlcoord 0, 13 + ld a, $f + ld [hl], a + hlcoord 19, 13 + ld a, $11 + ld [hl], a + ld a, [wMenuScrollPosition] + cp $24 + ret c + hlcoord 0, 13 + ld c, $12 + call Function8b732 + ret + +Unknown_8b903: + dw String_8b90b + dw String_8b919 + dw String_8b92a + dw String_8b938 + +String_8b90b: db "めいしを えらんでください@" ; Please select a noun. +String_8b919: db "どの めいしと いれかえますか?@" ; OK to swap with any noun? +String_8b92a: db "あいてを えらんでください@" ; Please select an opponent. +String_8b938: db "いれる ところを えらんでください@" ; Please select a location. + +Function8b94a: + ld [wd033], a + xor a + ld [wMenuScrollPosition], a + ld [wd032], a + ld [wd0e3], a + ld [wd031], a + ld a, $1 + ld [wd030], a + ret + +Function8b960: + ld hl, MenuHeader_0x8b9ac + call LoadMenuHeader + call Function8b9e9 + jr c, .asm_8b97a + hlcoord 11, 0 + ld b, $6 + ld c, $7 + call Function8b703 + ld hl, MenuHeader_0x8b9b1 + jr .asm_8b987 +.asm_8b97a + hlcoord 11, 0 + ld b, $a + ld c, $7 + call Function8b703 + ld hl, MenuHeader_0x8b9ca +.asm_8b987 + ld a, $1 + call Function89d5e + ld hl, Function8b9ab + call Function89d85 + call ExitMenu + jr c, .asm_8b99c + call Function8b99f + jr nz, .asm_8b99d +.asm_8b99c + xor a +.asm_8b99d + ld c, a + ret + +Function8b99f: + ld hl, wd002 + dec a + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + cp $ff + ret + +Function8b9ab: + ret + +MenuHeader_0x8b9ac: + db MENU_BACKUP_TILES ; flags + menu_coords 11, 0, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + +MenuHeader_0x8b9b1: + db MENU_BACKUP_TILES ; flags + menu_coords 11, 0, SCREEN_WIDTH - 1, 7 + dw MenuData_0x8b9b9 + db 1 ; default option + +MenuData_0x8b9b9: + db STATICMENU_CURSOR | STATICMENU_WRAP ; flags + db 3 ; items + db "へんしゅう@" ; EDIT + db "いれかえ@" ; REPLACE + db "やめる@" ; QUIT + +MenuHeader_0x8b9ca: + db MENU_BACKUP_TILES ; flags + menu_coords 11, 0, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw MenuData_0x8b9d2 + db 1 ; default option + +MenuData_0x8b9d2: + db STATICMENU_CURSOR | STATICMENU_WRAP ; flags + db 5 ; items + db "みる@" ; VIEW + db "へんしゅう@" ; EDIT + db "いれかえ@" ; REPLACE + db "けす@" ; ERASE + db "やめる@" ; QUIT + +Function8b9e9: + call OpenSRAMBank4 + call Function8931b + call Function8932d + jr nc, .asm_8b9f6 + jr .asm_8b9ff +.asm_8b9f6 + ld hl, $11 + add hl, bc + call Function89b45 + jr c, .asm_8ba08 +.asm_8b9ff + call Function892b4 + and a + ld de, Unknown_8ba1c + jr .asm_8ba0c +.asm_8ba08 + ld de, Unknown_8ba1f + scf +.asm_8ba0c + push af + ld hl, wd002 +.asm_8ba10 + ld a, [de] + inc de + ld [hli], a + cp $ff + jr nz, .asm_8ba10 + call CloseSRAM + pop af + ret + +Unknown_8ba1c: + db 2, 4, -1 + +Unknown_8ba1f: + db 1, 2, 4, 3, -1 diff --git a/mobile/mobile_40.asm b/mobile/mobile_40.asm new file mode 100644 index 0000000..26cdc27 --- /dev/null +++ b/mobile/mobile_40.asm @@ -0,0 +1,7712 @@ +Function100000: +; d: 1 or 2 +; e: bank +; bc: addr + ldh a, [rSVBK] + push af + ld a, 1 + ldh [rSVBK], a + + call Function100022 + call Function1000ba + call Function100675 + call Function100057 + call Function10016f + call Function100276 + + push bc + call Function100301 + pop bc + + pop af + ldh [rSVBK], a + ret + +Function100022: + push de + push bc + call SetRAMStateForMobile + pop bc + pop de + ld a, d + ld [wcd21], a + ld a, e + ld [wcd22], a + ld a, c + ld [wcd23], a + ld a, b + ld [wcd24], a + farcall Function10127e + farcall Stubbed_Function106462 + farcall Function106464 ; load broken gfx + farcall Function11615a ; init RAM + ld hl, wVramState + set 1, [hl] + ret + +Function100057: + call DisableMobile + call ReturnToMapFromSubmenu + ld hl, wVramState + res 1, [hl] + ret + +SetRAMStateForMobile: + xor a + ld hl, wBGMapBuffer + ld bc, $65 + call ByteFill + xor a + ld hl, wMobileWRAM + ld bc, wMobileWRAMEnd - wMobileWRAM + call ByteFill + ldh a, [rIE] + ld [wBGMapBuffer], a + xor a + ldh [hMapAnims], a + ldh [hLCDCPointer], a + ret + +EnableMobile: + xor a + ld hl, wOverworldMapBlocks + ld bc, wOverworldMapBlocksEnd - wOverworldMapBlocks + call ByteFill + + di + call DoubleSpeed + xor a + ldh [rIF], a + ld a, IE_DEFAULT + ldh [rIE], a + xor a + ldh [hMapAnims], a + ldh [hLCDCPointer], a + ld a, $01 + ldh [hMobileReceive], a + ldh [hMobile], a + ei + + ret + +DisableMobile: + di + xor a + ldh [hMobileReceive], a + ldh [hMobile], a + xor a + ldh [hVBlank], a + call NormalSpeed + xor a + ldh [rIF], a + ld a, [wBGMapBuffer] + ldh [rIE], a + ei + ret + +Function1000ba: +.loop + ; call [wcd22]:([wcd23][wcd24] + [wMobileCommsJumptableIndex]) + ld hl, wcd23 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [wMobileCommsJumptableIndex] + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [wcd22] + call GetFarWord + ld a, [wcd22] + rst FarCall + + call Function1000e8 + call Function1000fa + call Function100144 + call Function100163 + ld a, [wcd2b] + and a + jr z, .loop + call DelayFrame + ret + +Function1000e8: + ld hl, wcd29 + bit 7, [hl] + ret z + farcall Function115dd3 + ld hl, wcd29 + set 6, [hl] + ret + +Function1000fa: + ld a, [wc30d] + and a + ret z + ld hl, wcd29 + bit 4, [hl] + ret z + ld a, [wcd2b] + and a + jr nz, .asm_100117 + farcall Function11619d + ld hl, wcd29 + set 6, [hl] + ret + +.asm_100117 + di + xor a + ldh [rIF], a + ldh a, [rIE] + and $1f ^ (1 << SERIAL | 1 << TIMER) + ldh [rIE], a + xor a + ldh [hMobileReceive], a + ldh [hMobile], a + ei + + ld a, [wLinkMode] + push af + xor a + ld [wLinkMode], a + ld a, $04 + ld [wc314 + 5], a + farcall Function11619d + ld hl, wcd29 + set 6, [hl] + pop af + ld [wLinkMode], a + ret + +Function100144: + ld hl, wcd29 + bit 5, [hl] + jr z, .asm_100155 + res 5, [hl] + res 2, [hl] + res 6, [hl] + call Function100320 + ret + +.asm_100155 + bit 2, [hl] + ret z + res 2, [hl] + res 6, [hl] + farcall HDMATransferTilemapToWRAMBank3 + ret + +Function100163: + ld hl, wcd29 + bit 6, [hl] + ret z + res 6, [hl] + call DelayFrame + ret + +Function10016f: + ld a, [wcd2b] + cp $01 + ret z + cp $02 + ret z + cp $ff + jp z, .asm_1001f5 + cp $fe + jr z, .asm_1001c4 + cp $f5 + jr z, .asm_1001e7 + cp $f6 + jr z, .asm_1001b6 + cp $fa + jp z, .asm_1001bd + cp $f7 + jp z, .asm_1001ee + cp $f4 + jr z, .asm_1001d2 + cp $f3 + jr z, .asm_1001cb + cp $f1 + jr z, .asm_1001c4 + cp $f2 + jr z, .asm_1001c4 + cp $fc + jr z, .asm_1001e6 + cp $fb + jr z, .asm_1001af + cp $f8 + ret z + ret ; ???????????????????????????? + +.asm_1001af + ld a, $d7 + ld de, 0 + jr .asm_1001d7 + +.asm_1001b6 + ld a, $d5 + ld de, 0 + jr .asm_1001d7 + +.asm_1001bd + ld a, $d6 + ld de, 0 + jr .asm_1001d7 + +.asm_1001c4 + ld a, $d2 + ld de, 2 + jr .asm_1001d7 + +.asm_1001cb + ld a, $d1 + ld de, 1 + jr .asm_1001d7 + +.asm_1001d2 + ld a, $d0 + ld de, 0 + +.asm_1001d7 + ld [wMobileErrorCodeBuffer], a + ld a, d + ld [wMobileErrorCodeBuffer + 2], a + ld a, e + ld [wMobileErrorCodeBuffer + 1], a + call Function10020b + ret + +.asm_1001e6 + ret + +.asm_1001e7 + ld de, String10025e + call Function100232 + ret + +.asm_1001ee + ld de, String10024d + call Function100232 + ret + +.asm_1001f5 + ld a, [wcd2c] + ld [wMobileErrorCodeBuffer], a + ld a, [wcd2d] + ld [wMobileErrorCodeBuffer + 2], a + ld a, [wcd2d] + ld [wMobileErrorCodeBuffer + 1], a + call Function10020b + ret + +Function10020b: + xor a + ld [wc303], a + farcall FadeOutPalettes + farcall Function106464 + call HideSprites + call DelayFrame + + ldh a, [rSVBK] + push af + ld a, $01 + ldh [rSVBK], a + + farcall DisplayMobileError + + pop af + ldh [rSVBK], a + ret + +Function100232: + push de + farcall Function106464 + call Function3f20 + call UpdateSprites + hlcoord 1, 2 + pop de + call PlaceString + call Function100320 + call JoyWaitAorB + ret + +String10024d: + db "つうしんを キャンセル しました@" + +String10025e: + db "おともだちと えらんだ へやが" + next "ちがうようです@" + +Function100276: + ld a, [wcd2b] + cp $01 + jr z, .asm_10029f + cp $02 + jr z, .asm_100296 + cp $f5 + jr z, .asm_1002a5 + cp $f6 + jr z, .asm_1002a5 + cp $f7 + jr z, .asm_100293 + cp $f8 + jr z, .asm_1002b1 + jr .asm_1002c0 + +.asm_100293 + ld c, $02 + ret + +.asm_100296 + farcall Script_reloadmappart + ld c, $04 + ret + +.asm_10029f + call Function1002dc + ld c, 0 + ret + +.asm_1002a5 + farcall Script_reloadmappart + call Function1002ed + ld c, $03 + ret + +.asm_1002b1 + call Function1002c9 + call Function1002dc + ld de, String10024d + call Function100232 + ld c, $02 + ret + +.asm_1002c0 + call Function1002c9 + call Function1002dc + ld c, $01 + ret + +Function1002c9: + ld hl, wcd2a + bit 0, [hl] + ret z + farcall CleanUpBattleRAM + farcall LoadPokemonData + ret + +Function1002dc: + ld a, MAPSETUP_LINKRETURN + ldh [hMapEntryMethod], a + farcall RunMapSetupScript + xor a + ldh [hMapEntryMethod], a + call LoadStandardFont + ret + +Function1002ed: + farcall LoadOW_BGPal7 + farcall ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + call DelayFrame + ret + +Function100301: + ld hl, wcd2a + bit 1, [hl] + ret z + farcall Function106464 + farcall Function10202c + farcall Function115dd3 + call Function100320 + call JoyWaitAorB + ret + +Function100320: + farcall Mobile_ReloadMapPart + ret + +Function100327: ; unreferenced + farcall HDMATransferTilemapToWRAMBank3 + ret + +Function10032e: + call Function10034d + ld e, a + ret nc + ld [wcd2b], a + ret + +Function100337: + call Function10032e + ret c + ld a, [wc821] + bit 4, a + jr z, .asm_100345 + ld a, e + and a + ret + +.asm_100345 + ld a, $f9 + ld e, a + ld [wcd2b], a + scf + ret + +Function10034d: + ld a, [wc821] + bit 1, a + jr nz, .asm_10036a + bit 2, a + jr nz, .asm_10037e + bit 3, a + jr nz, .asm_100366 + bit 0, a + jr nz, .asm_100364 + ld a, $01 + and a + ret + +.asm_100364 + xor a + ret + +.asm_100366 + ld a, $02 + and a + ret + +.asm_10036a + ld a, MOBILEAPI_00 + call MobileAPI + ld [wcd2c], a + ld a, h + ld [wcd2d], a + ld a, l + ld [wcd2e], a + ld a, $ff + scf + ret + +.asm_10037e + ld a, $fe + scf + ret + +Function100382: + ld a, [wcd27] + ld hl, Jumptable_10044e + rst JumpTable + ret + +Function10038a: + ld hl, wccb4 + ld a, MOBILEAPI_17 + call MobileAPI + ret + +Function100393: + ld hl, wcc60 + ld a, MOBILEAPI_1D + call MobileAPI + ret + +Function10039c: + ld hl, wcc60 + ld de, w3_d000 + ld bc, $54 + ld a, $03 + call FarCopyWRAM + ret + +Function1003ab: ; unreferenced + ld hl, w3_d000 + ld de, wcc60 + ld bc, $54 + ld a, $03 + call FarCopyWRAM + ret + +Function1003ba: + ld hl, wccb4 + ld de, w3_d080 + ld bc, $54 + ld a, $03 + call FarCopyWRAM + ret + +Function1003c9: + ld hl, w3_d080 + ld de, wccb4 + ld bc, $54 + ld a, $03 + call FarCopyWRAM + ret + +Function1003d8: + ld hl, wccb4 + ld a, [hli] + ld c, a + ld b, 0 + push hl + add hl, bc + ld a, [wBGMapPalBuffer] + ld [hl], a + pop hl + inc bc + call Function10043a + add hl, bc + ld [hl], e + inc hl + ld [hl], d + ld a, c + add $02 + ld [wccb4], a + ret + +Function1003f5: + ld a, [wcc60] + sub $03 + ld [wcc60], a + ld a, [wccb4] + sub $03 + ld [wccb4], a + ret + +Function100406: + ld a, [wcc60] + sub $02 + ld c, a + ld b, 0 + ld hl, wcc61 + call Function10043a + add hl, bc + ld a, [hli] + cp e + jr nz, .asm_100426 + ld a, [hld] + cp d + jr nz, .asm_100426 + dec hl + ld a, [wBGMapPalBuffer] + cp [hl] + jr nz, .asm_10042d + xor a + ret + +.asm_100426 + ld a, $f4 + ld [wcd2b], a + jr .asm_100432 + +.asm_10042d + ld a, $f3 + ld [wcd2b], a + +.asm_100432 + push hl + ld hl, wcd7c + inc [hl] + pop hl + scf + ret + +Function10043a: + push hl + push bc + ld de, 0 +.asm_10043f + ld a, [hli] + add e + ld e, a + ld a, d + adc 0 + ld d, a + dec bc + ld a, b + or c + jr nz, .asm_10043f + pop bc + pop hl + ret + +Jumptable_10044e: + dw Function10046a + dw Function10047c + dw Function100493 + dw Function1004ba + dw Function1004f4 + dw Function1004ce + dw Function1004de + dw Function1004a4 + dw Function100495 + dw Function1004ce + dw Function1004de + dw Function1004e9 + dw Function1004f4 + dw Function1004a4 + +Function10046a: + ld hl, wBGMapPalBuffer + inc [hl] + call Function1003d8 + call Function1003ba + ld a, [wcd27] + inc a + ld [wcd27], a + ret + +Function10047c: + call Function100337 + ret c + ret z + cp $02 + jr z, .asm_100487 + jr .asm_10048d + +.asm_100487 + ld a, $08 + ld [wcd27], a + ret + +.asm_10048d + ld a, $02 + ld [wcd27], a + ret + +Function100493: + jr asm_100497 + +Function100495: + jr asm_100497 + +asm_100497: + call Function100337 + ret c + ret z + ld a, [wcd27] + inc a + ld [wcd27], a + ret + +Function1004a4: + call Function100406 + jr c, .asm_1004b8 + call Function1003c9 + call Function1003f5 + ld a, [wcd27] + set 7, a + ld [wcd27], a + ret + +.asm_1004b8 + scf + ret + +Function1004ba: + call Function10038a + and a + jr nz, .asm_1004c8 + ld a, [wcd27] + inc a + ld [wcd27], a + ret + +.asm_1004c8 + ld a, $08 + ld [wcd27], a + ret + +Function1004ce: + call Function100337 + ret c + ret z + cp $02 + ret nz + ld a, [wcd27] + inc a + ld [wcd27], a + ret + +Function1004de: + call Function100393 + ld a, [wcd27] + inc a + ld [wcd27], a + ret + +Function1004e9: + call Function10038a + ld a, [wcd27] + inc a + ld [wcd27], a + ret + +Function1004f4: + call Function100337 + ret c + ret z + ld a, [wcd27] + inc a + ld [wcd27], a + call Function10039c + ret + +Function100504: + push de + call Function3f20 + call UpdateSprites + pop de + hlcoord 4, 2 + call PlaceString + ret + +Function100513: + call Function3f7c + call PlaceVerticalMenuItems + call InitVerticalMenuCursor + ld hl, w2DMenuFlags1 + set 7, [hl] + ret + +Function100522: + ld a, [wcd28] + ld hl, Jumptable_10052a + rst JumpTable + ret + +Jumptable_10052a: + dw Function100534 + dw Function100545 + dw Function100545 + dw Function100545 + dw Function10054d + +Function100534: + call Function100513 + call UpdateSprites + call ApplyTilemap + ld a, [wcd28] + inc a + ld [wcd28], a + ret + +Function100545: + ld a, [wcd28] + inc a + ld [wcd28], a + ret + +Function10054d: + farcall MobileMenuJoypad + ld a, c + ld hl, wMenuJoypadFilter + and [hl] + ret z + call MenuClickSound + bit 0, a + jr nz, .asm_100565 + bit 1, a + jr nz, .asm_10056f + ret + +.asm_100565 + ld a, [wcd28] + set 7, a + ld [wcd28], a + and a + ret + +.asm_10056f + ld a, [wcd28] + set 7, a + ld [wcd28], a + scf + ret + +Function100579: + ld a, [wcd26] + ld hl, Jumptable_100581 + rst JumpTable + ret + +Jumptable_100581: + dw Function100585 + dw Function100597 + +Function100585: + ld hl, MenuHeader_1005b2 + call LoadMenuHeader + ld a, 0 + ld [wcd28], a + ld a, [wcd26] + inc a + ld [wcd26], a + +Function100597: + call Function100522 + ld a, [wcd28] + bit 7, a + ret z + jr nc, .asm_1005a6 + xor a + ld [wMenuCursorY], a + +.asm_1005a6 + call ExitMenu + ld a, [wcd26] + set 7, a + ld [wcd26], a + ret + +MenuHeader_1005b2: + db MENU_BACKUP_TILES ; flags + db 6, 14 + db 10, 19 + dw MenuData_1005ba + db 1 ; default option + +MenuData_1005ba: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 2 + db "はい@" + db "いいえ@" + +Function1005c3: + ld a, [wcd26] + ld hl, Jumptable_1005cb + rst JumpTable + ret + +Jumptable_1005cb: + dw Function1005cf + dw Function1005e1 + +Function1005cf: + ld hl, MenuHeader_1005fc + call LoadMenuHeader + ld a, 0 + ld [wcd28], a + ld a, [wcd26] + inc a + ld [wcd26], a + +Function1005e1: + call Function100522 + ld a, [wcd28] + bit 7, a + ret z + jr nc, .asm_1005f0 + xor a + ld [wMenuCursorY], a +.asm_1005f0 + call ExitMenu + ld a, [wcd26] + set 7, a + ld [wcd26], a + ret + +MenuHeader_1005fc: + db MENU_BACKUP_TILES ; flags + db 6, 14 + db 10, 19 + dw MenuData_100604 + db 1 ; default option + +MenuData_100604: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 2 + db "かける@" + db "まつ@" + +Mobile_CommunicationStandby: + hlcoord 3, 10 + ld b, 1 + ld c, 11 + call Function3eea + ld de, .String + hlcoord 4, 11 + call PlaceString + ret + +.String: + db "つうしんたいきちゅう!@" + +AdvanceMobileInactivityTimerAndCheckExpired: + push bc + call IncrementMobileInactivityTimerByCFrames + pop bc + ld a, [wMobileInactivityTimerMinutes] + cp b + jr nc, .timed_out + and a + ret + +.timed_out + ld a, $fa + ld [wcd2b], a + scf + ret + +StartMobileInactivityTimer: + xor a + ld [wMobileInactivityTimerMinutes], a + ld [wMobileInactivityTimerSeconds], a + ld [wMobileInactivityTimerFrames], a + ret + +IncrementMobileInactivityTimerBy1Frame: + ld c, 1 +IncrementMobileInactivityTimerByCFrames: + ld hl, wMobileInactivityTimerFrames ; timer? + ld a, [hl] + add c + cp 60 + jr c, .seconds + xor a + +.seconds + ld [hld], a + ret c + ld a, [hl] + inc a + cp 60 + jr c, .minutes + xor a + +.minutes + ld [hld], a + ret c + inc [hl] + ret + +Function100665: + call UpdateTime + ld hl, wcd36 + ldh a, [hHours] + ld [hli], a + ldh a, [hMinutes] + ld [hli], a + ldh a, [hSeconds] + ld [hl], a + ret + +Function100675: + ld hl, wcd2a + bit 2, [hl] + set 2, [hl] + ret nz + call Function1006d3 + ret + +Function100681: + push hl + ld hl, wcd2a + bit 2, [hl] + ld hl, wcd2a + set 2, [hl] + pop hl + jr nz, .asm_100694 + push hl + call Function1006d3 + pop hl +.asm_100694 + ld de, wcd32 + +Function100697: + ld a, [de] + and a + jr nz, .asm_1006bb + inc de + push de + call .asm_1006b4 + ld de, String1006c2 + call PlaceString + ld h, b + ld l, c + pop de + inc de + call .asm_1006b4 + ld de, String1006c6 + call PlaceString + ret + +.asm_1006b4 + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ret + +.asm_1006bb + ld de, String1006ca + call PlaceString + ret + +String1006c2: + db "ふん @" +String1006c6: + db "びょう@" +String1006ca: + db "1じかんいじょう@" + +Function1006d3: + call UpdateTime + ld de, wcd34 + ld hl, wcd38 + +Function1006dc: + ld a, [hld] + ld c, a + ldh a, [hSeconds] + sub c + jr nc, .asm_1006e5 + add $3c + +.asm_1006e5 + ld [de], a + dec de + ld a, [hld] + ld c, a + ldh a, [hMinutes] + sbc c + jr nc, .asm_1006f0 + add $3c + +.asm_1006f0 + ld [de], a + dec de + ld a, [hl] + ld c, a + ldh a, [hHours] + sbc c + jr nc, .asm_1006fb + add MAX_HOUR + +.asm_1006fb + ld [de], a + ret + +MobileBattleResetTimer: + ld a, BANK(sMobileBattleTimer) + ld hl, sMobileBattleTimer + call OpenSRAM + xor a + ld [hli], a + ld [hli], a + ld [hli], a + call CloseSRAM + ret + +MobileBattleFixTimer: + ld a, BANK(sMobileBattleTimer) + ld hl, sMobileBattleTimer + call OpenSRAM + xor a ; MOBILE_BATTLE_ALLOWED_SECONDS + ld [hli], a + ld a, MOBILE_BATTLE_ALLOWED_MINUTES + ld [hli], a + xor a + ld [hli], a + call CloseSRAM + ret + +Function100720: + xor a + ld [wcd6a], a + call UpdateTime + ldh a, [hHours] + ld [wcd72], a + ldh a, [hMinutes] + ld [wcd73], a + ldh a, [hSeconds] + ld [wcd74], a + ld a, BANK(sMobileBattleTimer) + ld hl, sMobileBattleTimer + call OpenSRAM + ld a, [hli] + ld [wcd6c], a + ld a, [hli] + ld [wcd6d], a + ld a, [hli] + ld [wcd6e], a + call CloseSRAM + ld a, [wcd6d] + ld [wcd6b], a + ret + +Function100754: + call UpdateTime + ldh a, [hHours] + ld [wcd72], a + ldh a, [hMinutes] + ld [wcd73], a + ldh a, [hSeconds] + ld [wcd74], a + ld a, [wcd6d] + ld [wcd6b], a + ld hl, wcd2a + res 6, [hl] + ret + +Function100772: + push de + ld hl, wcd6c + ld a, [de] + cp [hl] + jr c, .asm_10079a + jr nz, .asm_10078c + inc hl + inc de + ld a, [de] + cp [hl] + jr c, .asm_10079a + jr nz, .asm_10078c + inc hl + inc de + ld a, [de] + cp [hl] + jr c, .asm_10079a + jr z, .asm_10079a + +.asm_10078c + pop hl + ld a, [hli] + ld [wcd6c], a + ld a, [hli] + ld [wcd6d], a + ld a, [hli] + ld [wcd6e], a + ret + +.asm_10079a + pop de + ret + +Function10079c: + ld a, [wcd21] + cp $01 + jr nz, .dont_quit + ld hl, wcd2a + bit 5, [hl] + jr nz, .dont_quit + ld hl, wcd2a + bit 6, [hl] + jr nz, .dont_quit + ld a, [wcd6a] + add c + cp 60 + jr nc, .overflow + ld [wcd6a], a + and a + ret + +.overflow + sub 60 + ld [wcd6a], a + ld d, b + push de + call Function1007f6 + pop de + jr c, .quit + ld a, c + and a + jr nz, .quit + ld a, b + cp 10 + jr nc, .quit + ld a, d + and a + ret z + ld a, [wcd6b] + cp b + ret z + ld a, b + ld [wcd6b], a + call Function1008e0 + and a + ret + +.quit + call Function1008e0 + ld hl, wcd2a + set 4, [hl] + ld a, $fc + ld [wcd2b], a + scf + ret + +.dont_quit + and a + ret + +Function1007f6: + call UpdateTime + ld hl, wcd74 + ld de, wcd71 + call Function1006dc + ld a, $04 + call OpenSRAM + ld hl, $a802 + call Function100826 + call CloseSRAM + ld hl, wcd6e + call Function100826 + ldh a, [hHours] + ld [wcd72], a + ldh a, [hMinutes] + ld [wcd73], a + ldh a, [hSeconds] + ld [wcd74], a + ret + +Function100826: + ld a, [wcd71] + add [hl] + sub $3c + jr nc, .asm_100830 + add $3c + +.asm_100830 + ld [hld], a + ccf + ld a, [wcd70] + adc [hl] + sub $3c + jr nc, .asm_10083c + add $3c + +.asm_10083c + ld [hld], a + ld b, a + ccf + ld a, [wcd6f] + adc [hl] + ld [hl], a + ld c, a + ret + +Function100846: + ld hl, wcd2a + bit 5, [hl] + jr nz, .asm_10087c + ld a, [wcd6e] + ld c, a + ld a, 0 + sub c + jr nc, .asm_100858 + add $3c + +.asm_100858 + ld [wStringBuffer2 + 2], a + ld a, [wcd6d] + ld c, a + ld a, $0a + sbc c + ld [wStringBuffer2 + 1], a + xor a + ld [wStringBuffer2], a + ld de, String_10088e + hlcoord 1, 14 + call PlaceString + ld de, wStringBuffer2 + hlcoord 4, 16 + call Function100697 + ret + +.asm_10087c + ld de, String_10088e + hlcoord 1, 14 + call PlaceString + ld h, b + ld l, c + ld de, String_10089f + call PlaceString + ret + +String_10088e: + db "モバイルたいせん できる" + next "じかん@" + +String_10089f: + db " むせいげん@" + +MobileBattleGetRemainingTime: +; Calculates the difference between 10 minutes and sMobileBattleTimer +; Returns minutes in c and seconds in b + ld a, BANK(sMobileBattleTimer) + ld hl, sMobileBattleTimer + call OpenSRAM + ld a, [hli] + ld [wStringBuffer2], a + ld a, [hli] + ld [wStringBuffer2 + 1], a + ld a, [hli] + ld [wStringBuffer2 + 2], a + call CloseSRAM + ld a, [wStringBuffer2 + 2] + ld b, a + ld a, MOBILE_BATTLE_ALLOWED_SECONDS + sub b + jr nc, .no_carry_seconds + add 60 +.no_carry_seconds + ld b, a + ld a, [wStringBuffer2 + 1] + ld c, a + ld a, MOBILE_BATTLE_ALLOWED_MINUTES + sbc c + ld c, a + jr c, .fail + ld a, [wStringBuffer2] + and a + jr nz, .fail + ret + +.fail + call MobileBattleFixTimer + ld c, 0 + ret + +Function1008e0: + ldh a, [hBGMapMode] + ld b, a + ldh a, [hVBlank] + ld c, a + push bc + xor a + ldh [hBGMapMode], a + ld a, $03 + ldh [hVBlank], a + call Function100970 + call Function100902 + call Function100989 + call DelayFrame + pop bc + ld a, c + ldh [hVBlank], a + ld a, b + ldh [hBGMapMode], a + ret + +Function100902: + hlcoord 3, 10 + ld b, $01 + ld c, $0b + call Textbox + ld a, [wcd6d] + ld c, a + ld a, $0a + sub c + ld [wStringBuffer2], a + jr z, .asm_10093f + ld de, .string_100966 + hlcoord 4, 11 + call PlaceString + hlcoord 8, 11 + lb bc, 1, 2 + ld de, wStringBuffer2 + call PrintNum + ld de, SFX_TWO_PC_BEEPS + call PlaySFX + farcall ReloadMapPart + ld c, $3c + call DelayFrames + ret + +.asm_10093f + ld de, .string_10095a + hlcoord 4, 11 + call PlaceString + ld de, SFX_4_NOTE_DITTY + call PlaySFX + farcall ReloadMapPart + ld c, 120 + call DelayFrames + ret + +.string_10095a + db "たいせん しゅうりょう@" +.string_100966 + db "のこり   ふん!@" + +Function100970: + hlcoord 0, 0 + ld de, w3_dc00 + call Function1009a5 + hlcoord 0, 0, wAttrmap + ld de, w3_dd68 + call Function1009a5 + call Function1009d2 + call Function1009ae + ret + +Function100989: + ld hl, w3_dc00 + decoord 0, 0 + call Function1009a5 + call Function1009ae + farcall ReloadMapPart + ld hl, w3_dd68 + decoord 0, 0, wAttrmap + call Function1009a5 + ret + +Function1009a5: + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, $03 + call FarCopyWRAM + ret + +Function1009ae: + ldh a, [rSVBK] + push af + ld a, $03 + ldh [rSVBK], a + + ld hl, w3_d800 + decoord 0, 0, wAttrmap + ld c, SCREEN_WIDTH + ld b, SCREEN_HEIGHT +.loop_row + push bc +.loop_col + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .loop_col + ld bc, BG_MAP_WIDTH - SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, .loop_row + + pop af + ldh [rSVBK], a + ret + +Function1009d2: + ldh a, [rSVBK] + push af + ld a, $03 + ldh [rSVBK], a + + ldh a, [rVBK] + push af + ld a, $01 + ldh [rVBK], a + + ld hl, w3_d800 + debgcoord 0, 0 + lb bc, $03, $24 + call Get2bpp + + pop af + ldh [rVBK], a + + pop af + ldh [rSVBK], a + ret + +Function1009f3: + ldh a, [hJoyDown] + and SELECT + A_BUTTON + cp SELECT + A_BUTTON + jr nz, .select_a + ld hl, wcd2a + set 4, [hl] + ld a, $f8 + ld [wcd2b], a + scf + ret + +.select_a + xor a + ret + +_LinkBattleSendReceiveAction: + call .StageForSend + ld [wLinkBattleSentAction], a + vc_hook Wireless_start_exchange + farcall PlaceWaitingText + ld a, [wLinkMode] + cp LINK_MOBILE + jr nz, .not_mobile + + call .MobileBattle_SendReceiveAction + call Function100da5 + farcall FinishBattleAnim + jr .done + +.not_mobile + call .LinkBattle_SendReceiveAction + +.done + ret + +.StageForSend: + ld a, [wBattlePlayerAction] + and a ; BATTLEPLAYERACTION_USEMOVE? + jr nz, .switch + ld a, [wCurPlayerMove] + call GetMoveIndexFromID + ld b, BATTLEACTION_STRUGGLE + ld a, h + if HIGH(STRUGGLE) + cp HIGH(STRUGGLE) + else + and a + endc + jr nz, .not_struggle + ld a, l + cp LOW(STRUGGLE) + jr z, .struggle +.not_struggle + ld b, BATTLEACTION_SKIPTURN + cp $ff + jr z, .struggle + ld a, [wCurMoveNum] + jr .use_move + +.switch + ld a, [wCurPartyMon] + add BATTLEACTION_SWITCH1 + jr .use_move + +.struggle + ld a, b + +.use_move + and $0f + ret + +.LinkBattle_SendReceiveAction: + ld a, [wLinkBattleSentAction] + ld [wPlayerLinkAction], a + ld a, $ff + ld [wOtherPlayerLinkAction], a +.waiting + call LinkTransfer + call DelayFrame + ld a, [wOtherPlayerLinkAction] + inc a + jr z, .waiting + + vc_hook Wireless_end_exchange + vc_patch Wireless_net_delay_3 +if DEF(_CRYSTAL_VC) + ld b, 26 +else + ld b, 10 +endc + vc_patch_end +.receive + call DelayFrame + call LinkTransfer + dec b + jr nz, .receive + + vc_hook Wireless_start_send_zero_bytes + vc_patch Wireless_net_delay_4 +if DEF(_CRYSTAL_VC) + ld b, 26 +else + ld b, 10 +endc + vc_patch_end +.acknowledge + call DelayFrame + call LinkDataReceived + dec b + jr nz, .acknowledge + + vc_hook Wireless_end_send_zero_bytes + ld a, [wOtherPlayerLinkAction] + ld [wBattleAction], a + ret + +.MobileBattle_SendReceiveAction: + call Function100acf + call StartMobileInactivityTimer + ld a, 0 + ld [wcd27], a +.asm_100a92 + call DelayFrame + call GetJoypad + farcall Function100382 + ld c, $01 + ld b, $03 + push bc + call AdvanceMobileInactivityTimerAndCheckExpired + pop bc + jr c, .asm_100ac7 + ld b, $01 + call Function10079c + jr c, .asm_100ac7 + call Function1009f3 + jr c, .asm_100ac7 + ld a, [wcd2b] + and a + jr nz, .asm_100ac7 + ld a, [wcd27] + bit 7, a + jr z, .asm_100a92 + call Function100ae7 + jr .asm_100ace + +.asm_100ac7 + ld a, $0f + ld [wd430], a + jr .asm_100ace + +.asm_100ace + ret + +Function100acf: + ld de, Unknown_100b0a + ld hl, wccb5 + ld a, [wLinkBattleSentAction] + ld [hli], a + ld c, $01 +.asm_100adb + ld a, [de] + inc de + ld [hli], a + inc c + and a + jr nz, .asm_100adb + ld a, c + ld [wccb4], a + ret + +Function100ae7: + ld de, Unknown_100b0a + ld hl, wcc62 +.asm_100aed + ld a, [de] + inc de + and a + jr z, .asm_100af8 + cp [hl] + jr nz, .asm_100aff + inc hl + jr .asm_100aed + +.asm_100af8 + ld a, [wcc61] + ld [wd430], a + ret + +.asm_100aff + ld a, $0f + ld [wd430], a + ld a, $f1 + ld [wcd2b], a + ret + +pushc +setcharmap ascii + +Unknown_100b0a: + db "tetsuji", 0 + +popc + +Mobile_LoadBattleMenu: + call Function100dd8 + ret c + ld hl, BattleMenuHeader + ld a, BANK(BattleMenuHeader) + ld de, LoadMenuHeader + call FarCall_de + ld a, BANK(BattleMenuHeader) + ld [wMenuData_2DMenuItemStringsBank], a + ld a, [wBattleMenuCursorPosition] + ld [wMenuCursorPosition], a + call Function100e72 + call Function100b45 + farcall InitPartyMenuBGPal7 + call Function100ed4 + ld a, [wMenuCursorPosition] + ld [wBattleMenuCursorPosition], a + call ExitMenu + ret + +Function100b45: + call Function100b7a +.loop + call Mobile_SetOverworldDelay + farcall MobileMenuJoypad + push bc + farcall HDMATransferTilemapToWRAMBank3 + call Function100e2d + pop bc + jr c, .asm_100b6b + ld a, [wMenuJoypadFilter] + and c + jr z, .loop + farcall Mobile_GetMenuSelection + ret + +.asm_100b6b + ld a, [w2DMenuNumCols] + ld c, a + ld a, [w2DMenuNumRows] + call SimpleMultiply + ld [wMenuCursorPosition], a + and a + ret + +Function100b7a: + ld hl, CopyMenuData + ld a, [wMenuData_2DMenuItemStringsBank] + rst FarCall + farcall Draw2DMenu + farcall MobileTextBorder + call UpdateSprites + call ApplyTilemap + farcall Init2DMenuCursorPosition + ld hl, w2DMenuFlags1 + set 7, [hl] + ret + +Mobile_MoveSelectionScreen: + xor a + ld [wSwappingMove], a + farcall CheckPlayerHasUsableMoves + ret z + call Function100dd8 + jp c, xor_a_dec_a + call Function100e72 + call .GetMoveSelection + push af + farcall InitPartyMenuBGPal7 + call Function100ed4 + pop af + ret + +.GetMoveSelection: + xor a + ldh [hBGMapMode], a + call .ListMoves + call Function100c98 +.master_loop + farcall MoveInfoBox +.loop + call Mobile_SetOverworldDelay + farcall MobileMenuJoypad + push bc + farcall HDMATransferTilemapToWRAMBank3 + call Function100e2d + pop bc + jr c, .b_button + ld a, [wMenuJoypadFilter] + and c + bit D_UP_F, a + jp nz, .d_up + bit D_DOWN_F, a + jp nz, .d_down + bit A_BUTTON_F, a + jr nz, .a_button + bit B_BUTTON_F, a + jr nz, .b_button + jr .loop + +.d_up + ld a, [wMenuCursorY] + and a + jp nz, .master_loop + ld a, [wNumMoves] + inc a + ld [wMenuCursorY], a + jp .master_loop + +.d_down + ld a, [wMenuCursorY] + ld b, a + ld a, [wNumMoves] + inc a + inc a + cp b + jp nz, .master_loop + ld a, $01 + ld [wMenuCursorY], a + jp .master_loop + +.b_button + ld a, [wMenuCursorY] + dec a + ld [wCurMoveNum], a + ld a, $01 + and a + ret + +.a_button + ld a, [wMenuCursorY] + dec a + ld [wCurMoveNum], a + ld a, [wMenuCursorY] + dec a + ld c, a + ld b, 0 + ld hl, wBattleMonPP + add hl, bc + ld a, [hl] + and $3f + jr z, .no_pp_left + ld a, [wPlayerDisableCount] + swap a + and $0f + dec a + cp c + jr z, .move_disabled + ld a, [wMenuCursorY] + dec a + ld c, a + ld b, 0 + ld hl, wBattleMonMoves + add hl, bc + ld a, [hl] + ld [wCurPlayerMove], a + xor a + ret + +.move_disabled + ld hl, BattleText_TheMoveIsDisabled + jr .print_text + +.no_pp_left + ld hl, BattleText_TheresNoPPLeftForThisMove + +.print_text + call StdBattleTextbox + call SafeLoadTempTilemapToTilemap + jp .GetMoveSelection + +.ListMoves: + hlcoord 0, 8 + ld b, 8 + ld c, 8 + call Textbox + ld hl, wBattleMonMoves + ld de, wListMoves_MoveIndicesBuffer + ld bc, NUM_MOVES + call CopyBytes + ld a, SCREEN_WIDTH * 2 + ld [wListMovesLineSpacing], a + hlcoord 2, 10 + predef ListMoves + ret + +Function100c98: + ld de, .data + call Load2DMenuData + ld a, [wNumMoves] + inc a + ld [w2DMenuNumRows], a + ld a, [wCurMoveNum] + inc a + ld [wMenuCursorY], a + ret + +.data: + db 10, 1 ; cursor start y, x + db -1, 1 ; rows, columns + db $a0, $00 ; flags + dn 2, 0 ; cursor offsets + db D_UP | D_DOWN | A_BUTTON | B_BUTTON ; accepted buttons + +Mobile_PartyMenuSelect: + call Function100dd8 + ret c + ld hl, w2DMenuFlags1 + set 7, [hl] + res 6, [hl] +.loop + call Mobile_SetOverworldDelay + farcall MobileMenuJoypad + push bc + farcall PlaySpriteAnimations + farcall HDMATransferTilemapToWRAMBank3 + call MobileComms_CheckInactivityTimer + pop bc + jr c, .done + ld a, [wMenuJoypadFilter] + and c + jr z, .loop + call PlaceHollowCursor + ld a, [wPartyCount] + inc a + ld b, a + ld a, [wMenuCursorY] + cp b + jr z, .done + ld [wPartyMenuCursor], a + ldh a, [hJoyLast] + ld b, a + bit 1, b + jr nz, .done + ld a, [wMenuCursorY] + dec a + ld [wCurPartyMon], a + ld c, a + ld b, 0 + ld hl, wPartySpecies + add hl, bc + ld a, [hl] + ld [wCurPartySpecies], a + ld de, SFX_READ_TEXT_2 + call PlaySFX + call WaitSFX + and a + ret + +.done + ld de, SFX_READ_TEXT_2 + call PlaySFX + call WaitSFX + scf + ret + +MobileBattleMonMenu: + call Function100dd8 + ret c + call Function100d67 + ld hl, w2DMenuFlags1 + set 7, [hl] + res 6, [hl] +.asm_100d30 + call Mobile_SetOverworldDelay + farcall MobileMenuJoypad + push bc + farcall PlaySpriteAnimations + farcall HDMATransferTilemapToWRAMBank3 + call MobileComms_CheckInactivityTimer + pop bc + jr c, .asm_100d54 + ld a, [wMenuJoypadFilter] + and c + jr nz, .asm_100d56 + jr .asm_100d30 + +.asm_100d54 + scf + ret + +.asm_100d56 + push af + ld de, SFX_READ_TEXT_2 + call PlaySFX + pop af + bit 1, a + jr z, .asm_100d65 + ret z + scf + ret + +.asm_100d65 + and a + ret + +Function100d67: + ld hl, .MenuHeader + call CopyMenuHeader + xor a + ldh [hBGMapMode], a + call MenuBox + call UpdateSprites + call PlaceVerticalMenuItems + call WaitBGMap + call CopyMenuData + call InitVerticalMenuCursor + ld hl, w2DMenuFlags1 + set 6, [hl] + ret + +.MenuHeader: + db 0 ; flags + menu_coords 11, 11, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw .MenuData + db 1 ; default option + +.MenuData: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 3 + db "いれかえる@" ; TRADE + db "つよさをみる@" ; STATS + db "キャンセル@" ; CANCEL + +Function100da5: + ld hl, wcd2a + res 3, [hl] + ld hl, wcd29 + res 0, [hl] + ret + +Function100db0: + ld hl, wcd2a + bit 3, [hl] + jr nz, .asm_100dbe + ld hl, wcd2a + set 3, [hl] + scf + ret + +.asm_100dbe + xor a + ret + +Function100dc0: + ld a, [wLinkMode] + cp LINK_MOBILE + jr nz, .mobile + ld hl, wcd2a + bit 3, [hl] + jr z, .mobile + scf + ret + +.mobile + xor a + ret + +Mobile_SetOverworldDelay: + ld a, 30 + ld [wOverworldDelay], a + ret + +Function100dd8: + ld c, $01 + ld b, $03 + farcall AdvanceMobileInactivityTimerAndCheckExpired + jr c, .asm_100dfb + ld c, $3c + ld b, $01 + call Function10079c + jr c, .asm_100dfb + farcall Function10032e + ld a, [wcd2b] + and a + jr nz, .asm_100dfb + xor a + ret + +.asm_100dfb + scf + ret + +MobileComms_CheckInactivityTimer: + ld a, [wOverworldDelay] + ld c, a + ld a, 30 + sub c + ld c, a + ld b, 3 + push bc + farcall AdvanceMobileInactivityTimerAndCheckExpired ; useless to farcall + pop bc + jr c, .quit + ld b, 1 + call Function10079c + jr c, .quit + call Function1009f3 + jr c, .quit + farcall Function10032e ; useless to farcall + ld a, [wcd2b] + and a + jr nz, .quit + xor a + ret + +.quit + scf + ret + +Function100e2d: + ld a, [wOverworldDelay] + ld c, a + ld a, 30 + sub c + ld c, a + ld b, 3 + push bc + farcall AdvanceMobileInactivityTimerAndCheckExpired + pop bc + jr c, .asm_100e61 + ld b, 1 + call Function10079c + jr c, .asm_100e61 + call Function1009f3 + jr c, .asm_100e61 + farcall Function10032e + ld a, [wcd2b] + and a + jr nz, .asm_100e61 + call Function100e63 + call Function100e84 + xor a + ret + +.asm_100e61 + scf + ret + +Function100e63: + ld a, e + cp $02 + ret nz + call Function100db0 + ret nc + ld de, SFX_ELEVATOR_END + call PlaySFX + ret + +Function100e72: + xor a + ld hl, wcd29 + bit 0, [hl] + jr z, .asm_100e7c + ld a, $0a + +.asm_100e7c + ld [wcd67], a + xor a + ld [wcd68], a + ret + +Function100e84: + ld a, [wcd67] + ld hl, Jumptable_100e8c + rst JumpTable + ret + +Jumptable_100e8c: + dw Function100ea2 + dw Function100eae + dw Function100eb4 + dw Function100eae + dw Function100eb4 + dw Function100eae + dw Function100eb4 + dw Function100eae + dw Function100eb4 + dw Function100eae + dw Function100ec4 + +Function100ea2: + call Function100dc0 + ret nc + ld hl, wcd29 + set 0, [hl] + call Function100ec5 + +Function100eae: + scf + call Function100eca + jr asm_100eb8 + +Function100eb4: + and a + call Function100eca + +asm_100eb8: + ld hl, wcd68 + inc [hl] + ld a, [hl] + cp $02 + ret c + ld [hl], 0 + jr Function100ec5 + +Function100ec4: + ret + +Function100ec5: + ld hl, wcd67 + inc [hl] + ret + +Function100eca: + farcall Mobile_InitPartyMenuBGPal7 + call Function100ed4 + ret + +Function100ed4: + farcall ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +Function100edf: + ld hl, Unknown_100fc0 + ld c, 1 + jr Function100f02 + +Function100ee6: + ld hl, Unknown_100fc0 + ld c, 2 + jr Function100f02 + +Function100eed: + ld hl, Unknown_100feb + ld c, 1 + jr Function100f02 + +Function100ef4: + ld hl, Unknown_100ff3 + ld c, 1 + jr Function100f02 + +Function100efb: ; unreferenced + ld hl, Unknown_10102c + ld c, 1 + jr Function100f02 + +Function100f02: + ld a, c + ld [wStringBuffer2], a + ; someting that was previously stored in de gets backed up to here + ld a, e + ld [wStringBuffer2 + 1], a + ld a, d + ld [wStringBuffer2 + 2], a + ; empty this + xor a + ld [wStringBuffer2 + 4], a + ld [wStringBuffer2 + 5], a +.loop + ld a, [hl] + cp $ff + jr z, .done + ld [wStringBuffer2 + 3], a ; bank + push hl + inc hl + ; addr 1 + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ; size + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ; addr 2 + ld a, [hli] + ld h, [hl] + ld l, a + call Function100f3d + ; next line + pop hl + ld de, 7 + add hl, de + jr .loop + +.done + ; recover the values into bc + ld a, [wStringBuffer2 + 4] + ld c, a + ld a, [wStringBuffer2 + 5] + ld b, a + ret + +Function100f3d: + ; parameter + ld a, [wStringBuffer2] + cp $02 + jr z, .two + cp $01 + jr z, .one + cp $03 + jr z, .three + ret + +.three + ; what was once in de gets copied to hl, + ; modified by Function100f8d, and put back + ; into this backup + ld a, [wStringBuffer2 + 1] + ld l, a + ld a, [wStringBuffer2 + 2] + ld h, a + call Function100f8d + ld a, l + ld [wStringBuffer2 + 1], a + ld a, h + ld [wStringBuffer2 + 2], a + ret + +.two + ; hl gets backed up to de, then + ; do the same as in .three + ld d, h + ld e, l + ld a, [wStringBuffer2 + 1] + ld l, a + ld a, [wStringBuffer2 + 2] + ld h, a + call Function100f8d + ld a, l + ld [wStringBuffer2 + 1], a + ld a, h + ld [wStringBuffer2 + 2], a + ret + +.one + ; de gets copied to hl, then + ; load the backup into de, + ; finally run Function100f8d + ; and store the de result + ld h, d + ld l, e + ld a, [wStringBuffer2 + 1] + ld e, a + ld a, [wStringBuffer2 + 2] + ld d, a + call Function100f8d + ld a, e + ld [wStringBuffer2 + 1], a + ld a, d + ld [wStringBuffer2 + 2], a + ret + +Function100f8d: + push hl + ld a, [wStringBuffer2 + 4] + ld l, a + ld a, [wStringBuffer2 + 5] + ld h, a + add hl, bc + ld a, l + ld [wStringBuffer2 + 4], a + ld a, h + ld [wStringBuffer2 + 5], a + pop hl + ld a, [wStringBuffer2 + 3] + bit 7, a + res 7, a + jr z, .sram + and a + jr nz, .far_wram + call CopyBytes + ret + +.far_wram + and $7f + call FarCopyWRAM + ret + +.sram + call OpenSRAM + call CopyBytes + call CloseSRAM + ret + +MACRO macro_100fc0 + ; first byte: + ; Bit 7 set: Not SRAM + ; Lower 7 bits: Bank if SRAM + ; address, size[, OT address] + db ($80 * (\1 >= SRAM_End)) | (BANK(\1) * (\1 < SRAM_End)) + dw \1, \2 + if _NARG == 3 + dw \3 + else + dw NULL + endc +ENDM + +Unknown_100fc0: + macro_100fc0 wPlayerName, NAME_LENGTH, wOTPlayerName + macro_100fc0 wPartyCount, 1 + PARTY_LENGTH + 1, wOTPartyCount + macro_100fc0 wPlayerID, 2, wOTPlayerID + macro_100fc0 wPartyMons, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH, wOTPartyMons + macro_100fc0 wPartyMonOTs, NAME_LENGTH * PARTY_LENGTH, wOTPartyMonOTs + macro_100fc0 wPartyMonNicknames, MON_NAME_LENGTH * PARTY_LENGTH, wOTPartyMonNicknames + db -1 ; end + +Unknown_100feb: + macro_100fc0 sPartyMail, MAIL_STRUCT_LENGTH * PARTY_LENGTH + db -1 ; end + +Unknown_100ff3: + macro_100fc0 wdc41, 1 + macro_100fc0 wPlayerName, NAME_LENGTH + macro_100fc0 wPlayerName, NAME_LENGTH + macro_100fc0 wPlayerID, 2 + macro_100fc0 wSecretID, 2 + macro_100fc0 wPlayerGender, 1 + macro_100fc0 s4_a603, 8 + macro_100fc0 sEZChatMessages, EASY_CHAT_MESSAGE_LENGTH * 4 + db -1 ; end + +Unknown_10102c: + macro_100fc0 wOTPlayerName, NAME_LENGTH + macro_100fc0 wOTPlayerID, 2 + macro_100fc0 wOTPartyMonNicknames, MON_NAME_LENGTH * PARTY_LENGTH + macro_100fc0 wOTPartyMonOTs, NAME_LENGTH * PARTY_LENGTH + macro_100fc0 wOTPartyMons, PARTYMON_STRUCT_LENGTH * PARTY_LENGTH + db -1 ; end + +Function101050: + call Function10107d + ld a, [wOTPartyCount] +rept 2 ; ??? + ld hl, wc608 +endr + ld bc, wc7bb - wc608 + call Function1010de + ld hl, wc7bb + ld [hl], e + inc hl + ld [hl], d + ld a, BANK(s7_a001) + call OpenSRAM + ld hl, wc608 + ld de, s7_a001 + ld bc, wc7bd - wc608 + call CopyBytes + call CloseSRAM + ret + +Function10107d: + xor a + ld hl, wc608 + ld bc, wc7bd - wc608 + call ByteFill + ld hl, wOTPlayerName + ld de, wc608 + ld bc, NAME_LENGTH + call CopyBytes + ld hl, wd271 + ld a, [hli] + ld [wc608 + 11], a + ld a, [hl] + ld [wc608 + 12], a + ld hl, wOTPartyMonNicknames + ld de, wc608 + 13 + ld bc, NAME_LENGTH + call .CopyAllFromOT + ld hl, wOTPartyMonOTs + ld de, wOTClassName + 1 + ld bc, NAME_LENGTH + call .CopyAllFromOT + ld hl, wOTPartyMon1Species + ld de, wc699 + ld bc, PARTYMON_STRUCT_LENGTH + call .CopyAllFromOT + ld a, $50 + ld [wc7b9], a + ld a, $33 + ld [wc7ba], a + ret + +.CopyAllFromOT: + push hl + ld hl, 0 + ld a, [wOTPartyCount] + call AddNTimes + ld b, h + ld c, l + pop hl + call CopyBytes + ret + +Function1010de: + push hl + push bc + ld de, 0 +.loop + ld a, [hli] + add e + ld e, a + ld a, d + adc 0 + ld d, a + dec bc + ld a, b + or c + jr nz, .loop + pop bc + pop hl + ret + +LoadSelectedPartiesForColosseum: + xor a + ld hl, wStringBuffer2 + ld bc, 9 + call ByteFill + ld hl, wPlayerMonSelection + ld de, wPartyCount + call .CopyThreeSpecies + ld hl, wPlayerMonSelection + ld de, wPartyMon1Species + call .CopyPartyStruct + ld hl, wPlayerMonSelection + ld de, wPartyMonOTs + call .CopyName + ld hl, wPlayerMonSelection + ld de, wPartyMonNicknames + call .CopyName + ld hl, wOTMonSelection + ld de, wOTPartyCount + call .CopyThreeSpecies + ld hl, wOTMonSelection + ld de, wOTPartyMon1Species + call .CopyPartyStruct + ld hl, wOTMonSelection + ld de, wOTPartyMonOTs + call .CopyName + ld hl, wOTMonSelection + ld de, wOTPartyMonNicknames + call .CopyName + ret + +.CopyThreeSpecies: +; Load the 3 choices to the buffer + push de + ld bc, wStringBuffer2 + NAME_LENGTH_JAPANESE + xor a +.party_loop + push af + call .GetNthSpecies + ld [bc], a + inc bc + pop af + inc a + cp 3 + jr nz, .party_loop + pop de +; Copy the 3 choices to the party + ld a, 3 + ld [de], a + inc de + ld hl, wStringBuffer2 + NAME_LENGTH_JAPANESE + ld bc, 3 + call CopyBytes + ld a, $ff + ld [de], a + ret + +.GetNthSpecies: +; Preserves hl and de +; Get the index of the Nth selection + push hl + add l + ld l, a + ld a, h + adc 0 + ld h, a + ld a, [hl] + pop hl +; Get the corresponding species + push de + inc de + add e + ld e, a + ld a, d + adc 0 + ld d, a + ld a, [de] + pop de + ret + +.CopyPartyStruct: + ld bc, PARTYMON_STRUCT_LENGTH + jr .ContinueCopy + +.CopyName: + ld bc, NAME_LENGTH + +.ContinueCopy: + ; Copy, via wc608... + ld a, LOW(wc608) + ld [wStringBuffer2], a + ld a, HIGH(wc608) + ld [wStringBuffer2 + 1], a + ; ... bc bytes... + ld a, c + ld [wStringBuffer2 + 2], a + ld a, b + ld [wStringBuffer2 + 3], a + ; ... to de... + ld a, e + ld [wStringBuffer2 + 4], a + ld a, d + ld [wStringBuffer2 + 5], a + ; ... 3 times. + ld a, 3 +.big_copy_loop + push af + ld a, [hli] + push hl + push af + call .GetDestinationAddress + call .GetCopySize + pop af + call AddNTimes + ld a, [wStringBuffer2] + ld e, a + ld a, [wStringBuffer2 + 1] + ld d, a + call CopyBytes + ld a, e + ld [wStringBuffer2], a + ld a, d + ld [wStringBuffer2 + 1], a + pop hl + pop af + dec a + jr nz, .big_copy_loop + call .GetCopySize + ld a, 3 + ld hl, 0 + call AddNTimes + ld b, h + ld c, l + call .GetDestinationAddress + ld d, h + ld e, l + ld hl, wc608 + call CopyBytes + ret + +.GetDestinationAddress: + ld a, [wStringBuffer2 + 4] + ld l, a + ld a, [wStringBuffer2 + 5] + ld h, a + ret + +.GetCopySize: + ld a, [wStringBuffer2 + 2] + ld c, a + ld a, [wStringBuffer2 + 3] + ld b, a + ret + +Function1011f1: + ld a, BANK(s4_a60c) + call OpenSRAM + ld a, [s4_a60c] + ld [wdc41], a + call CloseSRAM + ld hl, wdc41 + res 4, [hl] + ld hl, wGameTimerPaused + bit GAME_TIMER_MOBILE_F, [hl] + jr z, .skip + ld hl, wdc41 + set 4, [hl] + +.skip + call Function10209c + xor a + ld [wdc5f], a + ld [wdc60], a + ld a, LINK_MOBILE + ld [wLinkMode], a + ret + +Function101220: + xor a + ld [wLinkMode], a + ret + +Function101225: + ld d, 1 + ld e, BANK(Jumptable_101297) + ld bc, Jumptable_101297 + call Function100000 + jr Function10123d + +Function101231: + ld d, 2 + ld e, BANK(Jumptable_101297) + ld bc, Jumptable_101297 + call Function100000 + jr Function10123d + +Function10123d: + xor a + ld [wScriptVar], a + ld a, c + ld hl, Jumptable_101247 + rst JumpTable + ret + +Jumptable_101247: + dw Function101251 + dw Function10127d + dw Function10127c + dw Function10126c + dw Function101265 + +Function101251: + call UpdateSprites + call RefreshScreen + ld hl, ClosingLinkText + call Function1021e0 + call Function1020ea + ret c + call Function102142 + ret + +Function101265: + ld hl, LinkTerminatedText + call Function1021e0 + ret + +Function10126c: + call UpdateSprites + farcall Script_reloadmappart + ld hl, ClosingLinkText + call Function1021e0 + ret + +Function10127c: + ret + +Function10127d: + ret + +Function10127e: + ld a, [wdc5f] + and a + jr z, .zero + cp 1 + ld c, $27 + jr z, .load + cp 2 + ld c, $37 + jr z, .load +.zero + ld c, 0 +.load + ld a, c + ld [wMobileCommsJumptableIndex], a + ret + +Jumptable_101297: + dw Function101a97 ; 00 + dw Function101ab4 ; 01 + dw Function101475 ; 02 + dw Function101b0f ; 03 + dw Function101438 ; 04 + dw Function101b2b ; 05 + dw Function101b59 ; 06 + dw Function101475 ; 07 + dw Function101b70 ; 08 + dw Function101438 ; 09 + dw Function101b8f ; 0a + dw Function101d7b ; 0b + dw Function101d95 ; 0c + dw Function101475 ; 0d + dw Function101db2 ; 0e + dw Function101e4f ; 0f + dw Function101475 ; 10 + dw Function101e64 ; 11 + dw Function101e4f ; 12 + dw Function101475 ; 13 + dw Function101e64 ; 14 + dw Function101d95 ; 15 + dw Function101475 ; 16 + dw Function101db2 ; 17 + dw Function101dd0 ; 18 + dw Function101de3 ; 19 + dw Function101e39 ; 1a + dw Function101e09 ; 1b + dw Function101e4f ; 1c + dw Function101475 ; 1d + dw Function101e64 ; 1e + dw Function101d95 ; 1f + dw Function101475 ; 20 + dw Function101db2 ; 21 + dw Function101e09 ; 22 + dw Function101e31 ; 23 + dw Function101bc8 ; 24 + dw Function101438 ; 25 + dw Function101be5 ; 26 + dw Function101ac6 ; 27 + dw Function101ab4 ; 28 + dw Function101475 ; 29 + dw Function101c11 ; 2a + dw Function1014f4 ; 2b + dw Function101cc8 ; 2c + dw Function1014e2 ; 2d + dw Function1014e2 ; 2e + dw Function101d10 ; 2f + dw Function101d2a ; 30 + dw Function101d2a ; 31 + dw Function101507 ; 32 + dw Function10156d ; 33 + dw Function101557 ; 34 + dw Function10158a ; 35 + dw Function101c42 ; 36 + dw Function101aed ; 37 + dw Function101ab4 ; 38 + dw Function101475 ; 39 + dw Function101c2b ; 3a + dw Function1014f4 ; 3b + dw Function101cdf ; 3c + dw Function1014e2 ; 3d + dw Function1014e2 ; 3e + dw Function101d1e ; 3f + dw Function101d2a ; 40 + dw Function101d2a ; 41 + dw Function101507 ; 42 + dw Function10156d ; 43 + dw Function101544 ; 44 + dw Function10158a ; 45 + dw Function101c42 ; 46 + dw Function101c50 ; 47 + dw Function1014ce ; 48 + dw Function101cf6 ; 49 + dw Function101826 ; 4a + dw Function1017e4 ; 4b + dw Function1017f1 ; 4c + dw Function1018a8 ; 4d + dw Function1018d6 ; 4e + dw Function1017e4 ; 4f + dw Function1017f1 ; 50 + dw Function1018e1 ; 51 + dw Function1015df ; 52 + dw Function10167d ; 53 + dw Function10168a ; 54 + dw Function10162a ; 55 + dw Function1015be ; 56 + dw Function10167d ; 57 + dw Function10168a ; 58 + dw Function10161f ; 59 + dw Function10159d ; 5a + dw Function10167d ; 5b + dw Function10168a ; 5c + dw Function101600 ; 5d + dw Function101d03 ; 5e + dw Function101d6b ; 5f + dw Function10159d ; 60 + dw Function1014ce ; 61 + dw Function10168e ; 62 + dw Function101600 ; 63 + dw Function101913 ; 64 + dw Function10194b ; 65 + dw _SelectMonsForMobileBattle ; 66 + dw Function1017e4 ; 67 + dw Function1017f5 ; 68 + dw _StartMobileBattle ; 69 + dw Function101537 ; 6a + dw Function101571 ; 6b + dw Function101c92 ; 6c + dw Function10152a ; 6d + dw Function101571 ; 6e + dw Function101a4f ; 6f + dw Function101cbc ; 70 + dw Function101c62 ; 71 + dw Function101537 ; 72 + dw Function101571 ; 73 + dw Function101c92 ; 74 + dw Function10152a ; 75 + dw Function101571 ; 76 + dw Function101ca0 ; 77 + dw Function101475 ; 78 + dw Function101cbc ; 79 + +Function10138b: + farcall Function8adcc + ld c, 0 + jr c, .asm_101396 + inc c + +.asm_101396 + sla c + ld a, [wcd2f] + and a + jr z, .asm_10139f + inc c + +.asm_10139f + sla c + ld a, [wcd21] + cp $01 + jr z, .asm_1013a9 + inc c + +.asm_1013a9 + ret + +Function1013aa: + call ClearBGPalettes + call ExitMenu + call ReloadTilesetAndPalettes + farcall Function106464 + call UpdateSprites + call FinishExitMenu + ret + +Function1013c0: + farcall BlankScreen + farcall Stubbed_Function106462 + farcall Function106464 + call FinishExitMenu + ret + +Function1013d6: + farcall HDMATransferAttrmapAndTilemapToWRAMBank3 + ret + +Function1013dd: + call CGBOnly_CopyTilemapAtOnce + ret + +Function1013e1: ; unreferenced + push de + inc de + ld b, a + ld c, 0 +.asm_1013e6 + inc c + ld a, [hli] + ld [de], a + inc de + and a + jr z, .asm_1013f1 + dec b + jr nz, .asm_1013e6 + scf + +.asm_1013f1 + pop de + ld a, c + ld [de], a + ret + +Function1013f5: + ld a, [hli] + ld [de], a + inc de + ld c, a +.asm_1013f9 + ld a, [hli] + ld [de], a + inc de + dec c + jr nz, .asm_1013f9 + ret + +Function101400: ; unreferenced + ld a, [de] + inc de + cp [hl] + jr nz, asm_101416 + inc hl + +Function101406: + ld c, a + ld b, 0 +.asm_101409 + ld a, [de] + inc de + cp [hl] + jr nz, asm_101416 + inc hl + dec bc + ld a, b + or c + jr nz, .asm_101409 + and a + ret + +asm_101416: + scf + ret + +Function101418: + call GetJoypad + ldh a, [hJoyDown] + and SELECT + A_BUTTON + cp SELECT + A_BUTTON + jr z, .asm_101425 + xor a + ret + +.asm_101425 + ld a, $f7 + ld [wcd2b], a + scf + ret + +Function10142c: + ld a, $01 + ld [wc305], a + farcall Function115e18 + ret + +Function101438: + ld hl, wcd29 + set 6, [hl] + ld a, [wcd26] + ld hl, Jumptable_101457 + rst JumpTable + ld a, [wcd26] + bit 7, a + ret z + ld a, 0 + ld [wcd26], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Jumptable_101457: + dw Function10145b + dw Function101467 + +Function10145b: + ld a, $3c + ld [wcd42], a + ld a, [wcd26] + inc a + ld [wcd26], a + +Function101467: + ld hl, wcd42 + dec [hl] + ret nz + ld a, [wcd26] + set 7, a + ld [wcd26], a + ret + +Function101475: + ld hl, wcd29 + set 6, [hl] + ld a, [wcd26] + ld hl, Jumptable_101494 + rst JumpTable + ld a, [wcd26] + bit 7, a + ret z + ld a, 0 + ld [wcd26], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Jumptable_101494: + dw Function10149a + dw Function1014a6 + dw Function1014b7 + +Function10149a: + ld a, $28 + ld [wcd42], a + ld a, [wcd26] + inc a + ld [wcd26], a + +Function1014a6: + ld hl, wcd42 + dec [hl] + ret nz + ld a, $50 + ld [wcd42], a + ld a, [wcd26] + inc a + ld [wcd26], a + +Function1014b7: + call GetJoypad + ldh a, [hJoyPressed] + and A_BUTTON | B_BUTTON + jr nz, .asm_1014c5 + ld hl, wcd42 + dec [hl] + ret nz + +.asm_1014c5 + ld a, [wcd26] + set 7, a + ld [wcd26], a + ret + +Function1014ce: + farcall Function100720 + farcall StartMobileInactivityTimer + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function1014e2: + ld hl, wcd29 + set 6, [hl] + ld a, 0 + ld [wcd26], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function1014f4: + farcall EnableMobile + ld hl, wcd29 + set 6, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101507: + ld de, wcd30 + ld hl, $40 + ld bc, $40 + ld a, MOBILEAPI_01 + call MobileAPI + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function10151d: ; unreferenced + ld a, MOBILEAPI_1A + call MobileAPI + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function10152a: + ld a, MOBILEAPI_1B + call MobileAPI + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101537: + ld a, MOBILEAPI_05 + call MobileAPI + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101544: + farcall StartMobileInactivityTimer + ld a, MOBILEAPI_09 + call MobileAPI + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101557: + farcall StartMobileInactivityTimer + ld hl, wcd53 + ld a, MOBILEAPI_04 + call MobileAPI + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function10156d: + call Function101418 + ret c + +Function101571: + farcall Function10032e + ret c + ret z + ld a, e + cp $01 + jr z, .asm_101582 + ld [wcd2b], a + ret + +.asm_101582 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function10158a: + farcall IncrementMobileInactivityTimerBy1Frame + ld a, [wMobileInactivityTimerMinutes] + cp $0a + jr c, Function10156d + ld a, $fb + ld [wcd2b], a + ret + +Function10159d: + ld de, wc608 + farcall Function100edf + ld de, wc608 + ld a, $05 + ld hl, w5_d800 + call Function10174c + ld a, 0 + ld [wcd26], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function1015be: + ld de, wc608 + farcall Function100eed + ld de, wc608 + ld a, $05 + ld hl, w5_d800 + call Function10174c + ld a, 0 + ld [wcd26], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function1015df: + ld de, wc608 + farcall Function100ef4 + ld de, wc608 + ld a, $05 + ld hl, w5_d800 + call Function10174c + ld a, 0 + ld [wcd26], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101600: + ld hl, w5_d800 + ld de, wc608 + ld bc, $1e0 + ld a, $05 + call FarCopyWRAM + ld de, wc608 + farcall Function100ee6 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function10161f: + call Function101649 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function10162a: + call Function101663 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +MobileCopyTransferData: + ld de, wMobileTransferData + ld bc, $1e0 + call FarCopyWRAM + ret + +MobileCopyTransferData2: + ld hl, wMobileTransferData + ld bc, $1e0 + call FarCopyWRAM + ret + +Function101649: + ld a, BANK(w5_d800) + ld hl, w5_d800 + call MobileCopyTransferData + ld a, BANK(w5_da00) + ld de, w5_da00 + call MobileCopyTransferData2 + ret + +Function10165a: + ld a, BANK(w5_da00) + ld hl, w5_da00 + call MobileCopyTransferData + ret + +Function101663: + ld a, BANK(w5_dc00) + ld hl, w5_d800 + call MobileCopyTransferData + ld a, BANK(w5_dc00) + ld de, w5_dc00 + call MobileCopyTransferData2 + ret + +Function101674: ; unreferenced + ld a, BANK(w5_dc00) + ld hl, w5_dc00 + call MobileCopyTransferData + ret + +Function10167d: + ld a, 0 + ld [wcd26], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function10168a: + call Function101418 + ret c + +Function10168e: + ld b, 0 + ld c, $01 + farcall Function10079c + ret c + ld c, $01 + ld b, $03 + farcall AdvanceMobileInactivityTimerAndCheckExpired + ret c + ld a, [wcd26] + ld hl, Jumptable_1016c3 + rst JumpTable + ld hl, wcd29 + set 6, [hl] + ld a, [wcd26] + bit 7, a + ret z + ld a, 0 + ld [wcd26], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Jumptable_1016c3: + dw Function1016cf + dw Function1016de + dw Function1016f8 + dw Function101705 + dw Function101719 + dw Function101724 + +Function1016cf: + ld hl, wcd3a + inc [hl] + call Function10176f + ld a, [wcd26] + inc a + ld [wcd26], a + ret + +Function1016de: + call Function10177b + jr nc, .asm_1016eb + ld a, [wcd26] + inc a + ld [wcd26], a + ret + +.asm_1016eb + ld a, $ff + ld [wcd39], a + ld a, [wcd26] + inc a + ld [wcd26], a + ret + +Function1016f8: + ld a, 0 + ld [wcd27], a + ld a, [wcd26] + inc a + ld [wcd26], a + ret + +Function101705: + farcall Function100382 + ld a, [wcd27] + bit 7, a + ret z + ld a, [wcd26] + inc a + ld [wcd26], a + ret + +Function101719: + call Function1017c7 + ld a, [wcd26] + inc a + ld [wcd26], a + ret + +Function101724: + ld a, [wcd39] + cp $ff + jr z, .asm_101731 + ld a, 0 + ld [wcd26], a + ret + +.asm_101731 + ld a, [wcd26] + set 7, a + ld [wcd26], a + ret + +Unknown_10173a: + db $50 + +Function10173b: + push bc + push af + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [Unknown_10173a] + ld c, a + ld b, 0 + pop af + call AddNTimes + pop bc + ret + +Function10174c: + ld [wcd3d], a + ld a, l + ld [wcd3e], a + ld a, h + ld [wcd3f], a + ld a, e + ld [wcd3b], a + ld a, d + ld [wBattleTowerRoomMenu2JumptableIndex], a + ld a, c + ld [wcd40], a + ld a, b + ld [wcd41], a + xor a + ld [wcd39], a + ld [wcd3a], a + ret + +Function10176f: + ld hl, wccb4 + ld bc, $54 + ld a, $11 + call ByteFill + ret + +Function10177b: + ld a, [Unknown_10173a] + ld c, a + ld b, 0 + ld a, [wcd3a] + ld hl, 0 + call AddNTimes + ld e, l + ld d, h + ld hl, wcd40 + ld a, [hli] + ld h, [hl] + ld l, a + ld a, l + sub e + ld l, a + ld a, h + sbc d + ld h, a + jr c, .asm_1017a0 + add hl, bc + call Function1017b0 + scf + ret + +.asm_1017a0 + ld a, $ff + ld [wcd39], a + add hl, bc + ld a, h + or l + ret z + ld c, l + ld b, h + call Function1017b0 + xor a + ret + +Function1017b0: + ld a, c + ld [wccb4], a + push bc + ld a, [wcd3a] + dec a + ld hl, wcd3b + call Function10173b + pop bc + ld de, wccb5 + call CopyBytes + ret + +Function1017c7: + ld a, [wcc60] + ld c, a + ld b, 0 + ld a, [wcd3a] + dec a + ld hl, wcd3e + call Function10173b + ld e, l + ld d, h + ld hl, wcc61 + ld a, [wcd3d] + call FarCopyWRAM + and a + ret + +Function1017e4: + ld a, 0 + ld [wcd27], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function1017f1: + call Function101418 + ret c + +Function1017f5: + ld b, 0 + ld c, $01 + farcall Function10079c + ret c + ld c, $01 + ld b, $03 + farcall AdvanceMobileInactivityTimerAndCheckExpired + ret c + farcall Function100382 + ld a, [wcd27] + bit 7, a + jr nz, .next + ld hl, wcd29 + set 6, [hl] + ret + +.next + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101826: + ld a, [wcd21] + cp $02 + jr z, .asm_101833 + cp $01 + jr z, .asm_101844 + jr .asm_101869 + +.asm_101833 + ld hl, Unknown_10186f + ld de, wccb4 + call Function1013f5 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101844 + farcall Function103654 + ld a, c + ld hl, Unknown_101882 + cp $01 + jr z, .asm_10185b + ld hl, Unknown_101895 + cp $02 + jr z, .asm_10185b + jr .asm_101869 + +.asm_10185b + ld de, wccb4 + call Function1013f5 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101869 + ld a, $fe + ld [wcd2b], a + ret + +pushc +setcharmap ascii + +Unknown_10186f: + db .end - @ + db $19, $73, $09, $13, "trade_crystal" +.end + db 0 + +Unknown_101882: + db .end - @ + db $19, $67, $10, $01, "free__crystal" +.end + db 0 + +Unknown_101895: + db .end - @ + db $19, $67, $10, $01, "limit_crystal" +.end + db 0 + +popc + +Function1018a8: + ld hl, wccb5 + ld de, wcc61 + ld a, $04 + call Function101406 + jr c, .asm_1018d0 + ld hl, wccb9 + ld de, wcc65 + ld a, $06 + call Function101406 + jr c, .asm_1018ca + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_1018ca + ld a, $f6 + ld [wcd2b], a + ret + +.asm_1018d0 + ld a, $f5 + ld [wcd2b], a + ret + +Function1018d6: + call Function1018ec + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function1018e1: + call Function1018fb + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function1018ec: + ld a, $0a + ld hl, wccb4 + ld [hli], a + ld c, a +.asm_1018f3 + call Random + ld [hli], a + dec c + jr nz, .asm_1018f3 + ret + +Function1018fb: + ld a, [wcd2f] + and a + jr z, .asm_101906 + ld hl, wcc61 + jr .asm_101909 + +.asm_101906 + ld hl, wccb5 + +.asm_101909 + ld de, wLinkBattleRNs + ld bc, 10 + call CopyBytes + ret + +Function101913: + ld hl, wcd2a + set 0, [hl] + xor a + ld [wc30d], a + ld hl, wcd29 + res 4, [hl] + xor a + ld [wc305], a + ld hl, wcd29 + res 7, [hl] + ld a, $90 + ldh [hWY], a + ld a, [wcd21] + cp $01 + jr z, .asm_10193f + cp $02 + jr z, .asm_101945 + ld a, $71 + ld [wMobileCommsJumptableIndex], a + ret + +.asm_10193f + ld a, $66 + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101945 + ld a, $65 + ld [wMobileCommsJumptableIndex], a + ret + +Function10194b: + call DisableSpriteUpdates + call ClearSprites + farcall Function1021f9 + ld hl, wcd29 + bit 3, [hl] + jr nz, .asm_101967 + call Function1013c0 + ld a, $71 + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101967 + ld a, $60 + ld [wMobileCommsJumptableIndex], a + ret + +_SelectMonsForMobileBattle: + farcall BlankScreen + farcall Mobile_CommunicationStandby + ld hl, wcd29 + set 5, [hl] + ld hl, wcd2a + set 6, [hl] + ld a, $06 + ld [wccb4], a + ld hl, wPlayerMonSelection + ld de, wccb5 + ld bc, 3 + call CopyBytes + ld hl, wcd6c + ld a, [hli] + ld [wccb8], a + ld a, [hli] + ld [wccb9], a + ld a, [hl] + ld [wccba], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +_StartMobileBattle: + call CopyOtherPlayersBattleMonSelection + farcall Function100754 + xor a + ld [wdc5f], a + ld [wdc60], a + farcall BlankScreen + call SpeechTextbox + farcall Function100846 + ld c, 120 + call DelayFrames + farcall ClearTilemap + call .CopyOTDetails + call StartMobileBattle + ld a, [wcd2b] + cp $fc + jr nz, .asm_1019e6 + xor a + ld [wcd2b], a +.asm_1019e6 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +.CopyOTDetails: + ldh a, [rSVBK] + push af + ld a, BANK(w5_dc0d) + ldh [rSVBK], a + + ld bc, w5_dc0d + ld de, w5_dc11 + farcall GetMobileOTTrainerClass + + pop af + ldh [rSVBK], a + + ld a, c + ld [wOtherTrainerClass], a + ld hl, wOTPlayerName + ld de, wOTClassName + ld bc, NAME_LENGTH + call CopyBytes + ld a, [wcd2f] + and a + ld a, USING_INTERNAL_CLOCK + jr z, .got_link_player_number + ld a, USING_EXTERNAL_CLOCK +.got_link_player_number + ldh [hSerialConnectionStatus], a + ret + +StartMobileBattle: + ; force stereo and fast text speed + ld hl, wOptions + ld a, [hl] + push af + and (1 << STEREO) + or 1 ; 1 frame per character i.e. fast text + ld [hl], a + ld a, 1 + ld [wDisableTextAcceleration], a + farcall BattleIntro + farcall DoBattle + farcall ShowLinkBattleParticipantsAfterEnd + xor a + ld [wDisableTextAcceleration], a + ld a, CONNECTION_NOT_ESTABLISHED + ldh [hSerialConnectionStatus], a + pop af + ld [wOptions], a + ret + +Function101a4f: + ld a, 1 + ld [wDisableTextAcceleration], a + farcall DisplayLinkBattleResult + xor a + ld [wDisableTextAcceleration], a + farcall CleanUpBattleRAM + farcall LoadPokemonData + call Function1013c0 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +CopyOtherPlayersBattleMonSelection: + ld hl, wcc61 + ld de, wOTMonSelection + ld bc, 3 + call CopyBytes + ld de, wcc64 + farcall Function100772 + farcall Function101050 + farcall LoadSelectedPartiesForColosseum + ret + +Function101a97: + farcall Function115d99 + ld hl, wcd29 + set 7, [hl] + ld c, $02 + call Function10142c + ld hl, wcd29 + set 6, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101ab4: + ld e, $01 + call Function101ee4 + ld hl, wcd29 + set 5, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101ac6: + farcall Function115d99 + ld hl, wcd29 + set 7, [hl] + ld c, $02 + call Function10142c + ld hl, wcd29 + set 6, [hl] + xor a + ld [wcd2f], a + ld de, wdc42 + call Function102068 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101aed: + farcall Function115d99 + ld hl, wcd29 + set 7, [hl] + ld c, $02 + call Function10142c + ld hl, wcd29 + set 6, [hl] + ld a, $01 + ld [wcd2f], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101b0f: + ld c, 0 + call Function10142c + ld e, $03 + call Function101ee4 + ld hl, wcd29 + set 5, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ld a, 0 + ld [wcd26], a + ret + +Function101b2b: + farcall Function100579 + ld hl, wcd29 + set 2, [hl] + ld a, [wcd26] + bit 7, a + ret z + call Function1013dd + ld a, 0 + ld [wcd26], a + ld a, [wMenuCursorY] + cp $01 + jr z, .asm_101b51 + ld a, $02 + ld [wcd2b], a + ret + +.asm_101b51 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101b59: + ld c, $02 + call Function10142c + ld e, $02 + call Function101ee4 + ld hl, wcd29 + set 5, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101b70: + ld c, $02 + call Function10142c + ld e, $04 + call Function101ee4 + ld hl, wcd29 + set 5, [hl] + call UpdateSprites + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ld a, 0 + ld [wcd26], a + ret + +Function101b8f: + farcall Function1005c3 + ld hl, wcd29 + set 2, [hl] + ld a, [wcd26] + bit 7, a + ret z + call Function1013dd + ld a, 0 + ld [wcd26], a + ld a, [wMenuCursorY] + cp $01 + jr z, .asm_101bbc + ld a, $01 + ld [wcd2f], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101bbc + xor a + ld [wcd2f], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101bc8: + ld c, $02 + call Function10142c + ld e, $08 + call Function101ee4 + call Function102048 + call Function1013dd + ld a, 0 + ld [wcd26], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101be5: + farcall Function100579 + ld hl, wcd29 + set 2, [hl] + ld a, [wcd26] + bit 7, a + ret z + call Function1013dd + ld a, 0 + ld [wcd26], a + ld a, [wMenuCursorY] + cp $01 + jr nz, .asm_101c0b + ld a, $2a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101c0b + ld a, $02 + ld [wcd2b], a + ret + +Function101c11: + ld a, $01 + ld [wdc5f], a + ld e, $09 + call Function101ee4 + call Function102048 + ld hl, wcd29 + set 5, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101c2b: + ld a, $02 + ld [wdc5f], a + ld e, $07 + call Function101ee4 + ld hl, wcd29 + set 5, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101c42: + ld hl, wcd2a + set 1, [hl] + call Function100665 + ld a, $47 + ld [wMobileCommsJumptableIndex], a + ret + +Function101c50: + ld e, $0a + call Function101ee4 + ld hl, wcd29 + set 2, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101c62: + farcall Function115d99 + ld hl, wcd29 + set 7, [hl] + ld c, $01 + call Function10142c + xor a + ld [wc30d], a + ld hl, wcd29 + res 4, [hl] + ld e, $0b + call Function101ee4 + ld hl, wcd29 + set 5, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ld a, 0 + ld [wcd26], a + ret + +Function101c92: + farcall Function100675 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101ca0: + ld c, $02 + call Function10142c + ld e, $0c + call Function101ee4 + ld hl, wcd29 + set 5, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ld a, 0 + ld [wcd26], a + ret + +Function101cbc: + ld a, $01 + ld [wcd2b], a + ret + +Function101cc2: ; unreferenced + ld a, $02 + ld [wcd2b], a + ret + +Function101cc8: + ld a, $01 + ld [wc314], a + ld a, $01 + ld [wc30d], a + ld hl, wcd29 + set 4, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101cdf: + ld a, $06 + ld [wc314], a + ld a, $01 + ld [wc30d], a + ld hl, wcd29 + set 4, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101cf6: + ld a, $0b + ld [wc314 + 1], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101d03: + ld a, $0e + ld [wc314 + 1], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101d10: + ld c, $01 + call Function10142c + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + jr Function101d2a + +Function101d1e: + ld c, $03 + call Function10142c + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + +Function101d2a: + call Function101418 + ret c + ld hl, wcd29 + set 6, [hl] + ld a, [wcd26] + ld hl, Jumptable_101d4d + rst JumpTable + ld a, [wcd26] + bit 7, a + ret z + ld a, 0 + ld [wcd26], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Jumptable_101d4d: + dw Function101d51 + dw Function101d5d + +Function101d51: + ld a, $3c + ld [wcd42], a + ld a, [wcd26] + inc a + ld [wcd26], a + +Function101d5d: + ld hl, wcd42 + dec [hl] + ret nz + ld a, [wcd26] + set 7, a + ld [wcd26], a + ret + +Function101d6b: + ld a, [wc30d] + and a + ret nz + ld hl, wcd29 + res 4, [hl] + ld a, $64 + ld [wMobileCommsJumptableIndex], a + ret + +Function101d7b: + farcall Function10138b + ld b, 0 + ld hl, Unknown_101d8d + add hl, bc + ld c, [hl] + ld a, c + ld [wMobileCommsJumptableIndex], a + ret + +Unknown_101d8d: + db $15, $15, $1f, $1f, $0c, $12, $3a, $3a + +Function101d95: + call Function101ee2 + call LoadStandardMenuHeader + ld e, $0e + call Function101ee4 + ld hl, wcd29 + set 5, [hl] + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ld a, 0 + ld [wcd26], a + ret + +Function101db2: + farcall Function103302 + call ExitMenu + ld hl, wcd29 + set 5, [hl] + jr c, .asm_101dca + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101dca + ld a, $02 + ld [wcd2b], a + ret + +Function101dd0: + ld hl, wdc41 + bit 1, [hl] + jr nz, .asm_101ddd + ld a, $19 + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101ddd + ld a, $1b + ld [wMobileCommsJumptableIndex], a + ret + +Function101de3: + call Function101ecc + call Function101ead + jr c, .asm_101df3 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101df3 + call Function101e98 + jr c, .asm_101e00 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101e00 + call Function101ed3 + ld a, $02 + ld [wcd2b], a + ret + +Function101e09: + call Function101ead + jr c, .asm_101e16 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101e16 + call Function101ecc + call Function101e98 + push af + call Function101ed3 + pop af + jr c, .asm_101e2b + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101e2b + ld a, $02 + ld [wcd2b], a + ret + +Function101e31: + ld a, $3a + ld [wMobileCommsJumptableIndex], a + jp Function101c2b + +Function101e39: + call Function1020bf + push af + call Function101ed3 + pop af + jr c, .asm_101e49 + ld a, $2a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101e49 + ld a, $02 + ld [wcd2b], a + ret + +Function101e4f: + ld e, $06 + call Function101ee4 + call Function1013d6 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ld a, 0 + ld [wcd26], a + ret + +Function101e64: + call Function101ecc + call Function1020a8 + push af + call Function101ed3 + pop af + jr c, .asm_101e77 + ld a, $24 + ld [wMobileCommsJumptableIndex], a + ret + +.asm_101e77 + ld hl, wcd29 + set 5, [hl] + ld a, $02 + ld [wcd2b], a + ret + +Function101e82: ; unreferenced + call Function101ecc + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101e8d: ; unreferenced + call Function101ed3 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function101e98: + call ClearSprites + farcall Function8adb3 + ret c + ld hl, wGameTimerPaused + set GAME_TIMER_MOBILE_F, [hl] + ld hl, wdc41 + set 4, [hl] + ret + +Function101ead: + ld hl, wGameTimerPaused + bit GAME_TIMER_MOBILE_F, [hl] + jr nz, .asm_101ec8 + ld hl, wdc41 + bit 2, [hl] + jr z, .asm_101eca + ld a, [wcd2f] + and a + jr nz, .asm_101ec8 + ld hl, wdc41 + bit 1, [hl] + jr z, .asm_101eca + +.asm_101ec8 + xor a + ret + +.asm_101eca + scf + ret + +Function101ecc: + call Function101ee2 + call FadeToMenu + ret + +Function101ed3: + call Function1013aa + farcall Function115d99 + ld hl, wcd29 + set 7, [hl] + ret + +Function101ee2: + ld e, 0 + +Function101ee4: + ld d, 0 + ld hl, Unknown_101ef5 + add hl, de + add hl, de + ld a, [hli] + ld d, [hl] + ld e, a + farcall Function100504 + ret + +Unknown_101ef5: + dw String_101f13 + dw String_101f14 + dw String_101f32 + dw String_101f4f + dw String_101f69 + dw String_101f81 + dw String_101f93 + dw String_101faa + dw String_101fc5 + dw String_101fd2 + dw String_101fe1 + dw String_101fef + dw String_102000 + dw String_10200c + dw String_102014 + +String_101f13: + db "@" + +String_101f14: + db "モバイルアダプタを つかって" + next "おともだちと つうしんします@" + +String_101f32: + db "でんわを かけるひとには" + next "つうわりょうきんが かかります@" + +String_101f4f: + db "モバイルアダプタの じゅんびは" + next "できて いますか?@" + +String_101f69: + db "あなたが おともだちに" + next "でんわを かけますか?@" + +String_101f81: + db "めいしフォルダーを" + next "つかいますか?@" + +String_101f93: + db "でんわばんごうを にゅうりょく" + next "してください@" + +String_101faa: + db "それでは おともだちからの" + next "でんわを おまちします⋯@" + +String_101fc5: + next "に でんわを かけます@" + +String_101fd2: + next "に でんわを かけています@" + +String_101fe1: + db "でんわが つながりました!@" + +String_101fef: + db "つうわを" + next "しゅうりょう します⋯@" + +String_102000: + db "つうしん しゅうりょう@" + +String_10200c: + db "つうわ じかん@" + +String_102014: + db "それでは つうしんの" + next "せっていを してください@" + +Function10202c: + farcall Function115d99 + ld hl, wcd29 + set 7, [hl] + ld c, $02 + call Function10142c + ld e, $0d + call Function101ee4 + hlcoord 4, 4 + call Function100681 + ret + +Function102048: + call Function10204c + ret + +Function10204c: + hlcoord 3, 2 + ld c, $10 + ld de, wcd53 +.asm_102054 + ld a, [de] + inc de + and a + jr z, .asm_102067 + sub $30 + jr c, .asm_102067 + cp $0a + jr nc, .asm_102067 + add $f6 + ld [hli], a + dec c + jr nz, .asm_102054 + +.asm_102067 + ret + +Function102068: + ld hl, wcd53 + ld c, $08 +.asm_10206d + ld a, [de] + call Function102080 + jr c, .asm_10207f + ld a, [de] + swap a + call Function102080 + jr c, .asm_10207f + inc de + dec c + jr nz, .asm_10206d + +.asm_10207f + ret + +Function102080: + and $0f + cp $0f + jr z, .asm_10208a + add $30 + ld [hli], a + ret + +.asm_10208a + ld [hl], 0 + scf + ret + +Function10208e: + push de + ld h, d + ld l, e + ld de, wdc42 + ld bc, 8 + call CopyBytes + pop de + ret + +Function10209c: + ld a, $ff + ld hl, wdc42 + ld bc, 8 + call ByteFill + ret + +Function1020a8: + call Function10209c + ld c, $01 + ld de, wdc42 + farcall Function17a68f + ret c + call Function10208e + call Function102068 + xor a + ret + +Function1020bf: + call ClearSprites + farcall Function8aba9 + ld a, c + and a + jr z, .asm_1020e8 + dec a + ld hl, $a04c + ld bc, $25 + call AddNTimes + ld d, h + ld e, l + ld a, $04 + call OpenSRAM + call Function10208e + call Function102068 + call CloseSRAM + xor a + ret + +.asm_1020e8 + scf + ret + +Function1020ea: + ld hl, wdc41 + bit 4, [hl] + jr z, .quit + ld hl, wdc41 + bit 2, [hl] + jr nz, .quit + call Function10218d + ld hl, wc608 + bit 4, [hl] + jr z, .quit + ld hl, wc608 + bit 2, [hl] + jr nz, .quit + call Function102112 + jr z, .quit + and a + ret + +.quit + scf + ret + +Function102112: + ld a, BANK(s4_a03b) + call OpenSRAM + ld hl, s4_a03b + 6 + ld c, 40 +.outer_loop + push hl + ld de, wc60f + ld b, 31 +.inner_loop + ld a, [de] + cp [hl] + jr nz, .not_matching + inc de + inc hl + dec b + jr nz, .inner_loop + pop hl + xor a + jr .done + +.not_matching + pop hl + ld de, 37 + add hl, de + dec c + jr nz, .outer_loop + ld a, $01 + and a + jr .done ; useless jr + +.done + push af + call CloseSRAM + pop af + ret + +Function102142: + call Function10218d + call Function102180 + ld hl, NewCardArrivedText + call MenuTextbox + ld de, SFX_LEVEL_UP + call PlaySFX + call JoyWaitAorB + call ExitMenu + call Function10219f + ld hl, PutCardInCardFolderText + call MenuTextbox + call YesNoBox + call ExitMenu + jr c, .asm_10217c + call Function1021b8 + jr c, .asm_10217c + call Function10218d + call Function102180 + ld hl, CardWasListedText + call PrintText + +.asm_10217c + call Function1013d6 + ret + +Function102180: + ld hl, wc608 + 1 + ld de, wStringBuffer2 + ld bc, 11 + call CopyBytes + ret + +Function10218d: + ld hl, w5_dc00 + ld de, wc608 + ld bc, $26 + ld a, $05 + call FarCopyWRAM + ld de, wc608 + 1 ; useless + ret + +Function10219f: + call FadeToMenu + call Function10218d + ld de, wc608 + 1 + farcall Function8ac4e + call JoyWaitAorB + call PlayClickSFX + call Function1013aa + ret + +Function1021b8: + call FadeToMenu + call Function10218d + ld de, wPlayerMoveStruct + farcall Function8ac70 + ld a, c + ld [wStringBuffer1], a + push af + call Function1013aa + pop af + ret + +NewCardArrivedText: + text_far _NewCardArrivedText + text_end + +PutCardInCardFolderText: + text_far _PutCardInCardFolderText + text_end + +CardWasListedText: + text_far _CardWasListedText + text_end + +Function1021e0: + call MenuTextbox + call JoyWaitAorB + call ExitMenu + ret + +StartingLinkText: ; unreferenced + text_far _StartingLinkText + text_end + +LinkTerminatedText: + text_far _LinkTerminatedText + text_end + +ClosingLinkText: + text_far _ClosingLinkText + text_end + +Function1021f9: + call Function102233 + ld a, $0 ; Function10234b + ld [wcd49], a + ld hl, wcd29 + bit 3, [hl] + res 3, [hl] + jr z, .asm_10220f + ld a, $1 ; Function102361 + ld [wcd49], a + +.asm_10220f + call Function1022ca + ld a, [wcd49] + ld hl, Jumptable_1022f5 + rst JumpTable + call Function102241 + call Function1022d0 + jr c, .asm_102231 + ld a, [wcd49] + bit 7, a + jr z, .asm_10220f + xor a + ld hl, wcd29 + bit 3, [hl] + ret z + scf + ret + +.asm_102231 + xor a + ret + +Function102233: + ld hl, wcd49 + ld bc, 10 + xor a + call ByteFill + call Function10304f + ret + +Function102241: + call Function10226a + call Function102274 + call Function10224b + ret + +Function10224b: + ld hl, wcd4b + bit 1, [hl] + jr nz, .asm_10225e + bit 2, [hl] + jr nz, .asm_10225e + call DelayFrame + call DelayFrame + xor a + ret + +.asm_10225e + res 1, [hl] + res 2, [hl] + farcall Mobile_ReloadMapPart + scf + ret + +Function10226a: + ld hl, wcd4b + bit 0, [hl] + ret z + call Function10305d + ret + +Function102274: + ld hl, wcd4b + bit 3, [hl] + ret z + res 3, [hl] + ld de, 8 + call PlaySFX + ret + +Function102283: + ld a, $01 + ld [wAttrmapEnd], a + ld hl, wcd4b + set 0, [hl] + ret + +Function10228e: + xor a + ld [wAttrmapEnd], a + ld hl, wcd4b + res 0, [hl] + ret + +Function102298: + ld a, e + cp $02 + ret nz + ld hl, wcd4b + bit 6, [hl] + jr z, .asm_1022b6 + ld hl, wcd4b + bit 7, [hl] + ld hl, wcd4b + set 7, [hl] + ret nz + ld de, SFX_ELEVATOR_END + call PlaySFX + jr .asm_1022c1 + +.asm_1022b6 + ld hl, wcd4b + bit 7, [hl] + ld hl, wcd4b + res 7, [hl] + ret z + +.asm_1022c1 + call Function10304f + ld a, $01 + ld [wAttrmapEnd], a + ret + +Function1022ca: + ld a, 30 + ld [wOverworldDelay], a + ret + +Function1022d0: + farcall Function10032e + ld a, [wcd2b] + and a + jr nz, .asm_1022f3 + call Function102298 + ld a, [wOverworldDelay] + ld c, a + ld a, 30 + sub c + ld c, a + ld b, 03 + farcall AdvanceMobileInactivityTimerAndCheckExpired + jr c, .asm_1022f3 + xor a + ret + +.asm_1022f3 + scf + ret + +Jumptable_1022f5: + dw Function10234b ; 00 + dw Function102361 ; 01 + dw Function10236e ; 02 + dw Function102387 ; 03 + dw Function1023a1 ; 04 + dw Function1025c7 ; 05 + dw Function1025dc ; 06 + dw Function1024f6 ; 07 + dw Function10250c ; 08 + dw Function1024a8 ; 09 + dw Function102591 ; 0a + dw Function1024a8 ; 0b + dw Function1025b0 ; 0c + dw Function1025bd ; 0d + dw Function102814 ; 0e + dw Function10283c ; 0f + dw Function102862 ; 10 + dw Function10286f ; 11 + dw Function1024a8 ; 12 + dw Function1028a5 ; 13 + dw Function1028ab ; 14 + dw Function1023b5 ; 15 + dw Function1023c6 ; 16 + dw Function1024af ; 17 + dw Function102416 ; 18 + dw Function102423 ; 19 + dw Function10244b ; 1a + dw Function1024af ; 1b + dw Function10246a ; 1c + dw Function102652 ; 1d + dw Function10266b ; 1e + dw Function1025e9 ; 1f + dw Function1025ff ; 20 + dw Function102738 ; 21 + dw Function102754 ; 22 + dw Function1026b7 ; 23 + dw Function1026c8 ; 24 + dw Function1028bf ; 25 + dw Function1028c6 ; 26 + dw Function1028d3 ; 27 + dw Function1028da ; 28 + dw Function1024a8 ; 29 + dw Function10248d ; 2a + +Function10234b: + call Function102d9a + call Function102dd3 + call Function102dec + ld hl, wcd4b + set 1, [hl] + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function102361: + ld a, $cc + call Function1028e8 + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function10236e: + call Function1028fc + ret nc + ld a, [wcd51] + cp $cc + jr z, .asm_10237f + ld a, $f2 + ld [wcd2b], a + ret + +.asm_10237f + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function102387: + ld hl, wcd4b + set 6, [hl] + xor a + ld [wdc5f], a + ld de, MUSIC_ROUTE_30 + call PlayMusic + call Function102d9a + call Function102dd3 + ld a, $01 + ld [wMenuCursorY], a + +Function1023a1: + call Function102283 + call Function102db7 + call Function102dec + ld hl, wcd4b + set 1, [hl] + ld a, $1d + ld [wcd49], a + ret + +Function1023b5: + call Function10228e + call Function102a3b + call Function102b12 + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function1023c6: + call Function102c48 + call Function102c87 + ld a, [wcd4c] + dec a + ld [wCurPartyMon], a + xor a ; REMOVE_PARTY + ld [wPokemonWithdrawDepositParameter], a + farcall RemoveMonFromPartyOrBox + ld hl, wPartyCount + inc [hl] + ld a, [hli] + ld c, a + ld b, 0 + add hl, bc + ld [hl], $ff + ld a, [wPartyCount] + ld [wcd4c], a + call Function102c07 + call Function102d48 + call Function102b32 + call Function102f50 + ld hl, wcd4b + set 1, [hl] + ld a, $14 + ld [wcd4e], a + ld a, 0 + ld [wcd4f], a + ld a, 0 + ld [wcd4a], a + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function102416: + ld a, $aa + call Function1028e8 + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function102423: + call Function102921 + ret nc + farcall SaveAfterLinkTrade + farcall StubbedTrainerRankings_Trades + farcall BackupMobileEventIndex + ld hl, wcd4b + set 1, [hl] + ld a, 0 + ld [wcd4a], a + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function10244b: + call Function102f32 + ld hl, wcd4b + set 1, [hl] + ld a, $19 + ld [wcd4e], a + ld a, 0 + ld [wcd4f], a + ld a, 0 + ld [wcd4a], a + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function10246a: + call Function102d9a + ld hl, wcd29 + set 3, [hl] + call Function102e07 + ld hl, wcd4b + set 1, [hl] + ld a, $2a + ld [wcd49], a + ret + +Function102480: ; unreferenced + ld c, $32 + call DelayFrames + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function10248d: + ld a, [wcd49] + set 7, a + ld [wcd49], a + ret + +Function102496: ; unreferenced + ld hl, wcd4e + dec [hl] + ret nz + ld a, 0 + ld [wcd4a], a + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function1024a8: + farcall Function1009f3 + ret c + +Function1024af: + call GetJoypad + ld a, [wcd4a] + ld hl, Jumptable_1024ba + rst JumpTable + ret + +Jumptable_1024ba: + dw Function1024c0 + dw Function1024cb + dw Function1024de + +Function1024c0: + ld hl, wcd4e + inc [hl] + ld a, [wcd4a] + inc a + ld [wcd4a], a + +Function1024cb: + ld hl, wcd4e + dec [hl] + ret nz + ld a, [wcd4f] + inc a + ld [wcd4e], a + ld a, [wcd4a] + inc a + ld [wcd4a], a + +Function1024de: + ld hl, wcd4e + dec [hl] + jr z, .asm_1024e9 + ldh a, [hJoyPressed] + and A_BUTTON | B_BUTTON + ret z + +.asm_1024e9 + ld a, 0 + ld [wcd4a], a + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function1024f6: + call PlaceHollowCursor + ld hl, wcd4b + set 1, [hl] + ld a, [wcd4c] + call Function1028e8 + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function10250c: + call Function1028fc + ret nc + ld a, [wcd51] + cp $0f + jr z, .asm_10254b + and a + jr z, .asm_102572 + cp $aa + jr z, .asm_102572 + cp $07 + jr nc, .asm_102572 + ld [wcd4d], a + dec a + ld [wd003], a + ld a, [wcd4c] + dec a + ld [wd002], a + call Function102b9c + call Function102bdc + jr c, .asm_10256d + farcall CheckAnyOtherAliveMonsForTrade + jr c, .asm_102568 + ld hl, wcd4b + set 1, [hl] + ld a, $0e + ld [wcd49], a + ret + +.asm_10254b + call Function103021 + ld hl, wcd4b + set 1, [hl] + ld a, 0 + ld [wcd4a], a + ld a, $1e + ld [wcd4e], a + ld a, $1e + ld [wcd4f], a + ld a, $29 + ld [wcd49], a + ret + +.asm_102568 + call Function102ff5 + jr .asm_102577 + +.asm_10256d + call Function102f85 + jr .asm_102577 + +.asm_102572 + call Function102fce + jr .asm_102577 + +.asm_102577 + ld hl, wcd4b + set 1, [hl] + ld a, 0 + ld [wcd4a], a + ld a, $1e + ld [wcd4e], a + ld a, $3c + ld [wcd4f], a + ld a, $09 + ld [wcd49], a + ret + +Function102591: + call Function102ee7 + ld hl, wcd4b + set 1, [hl] + ld a, 0 + ld [wcd4a], a + ld a, $1e + ld [wcd4e], a + ld a, $3c + ld [wcd4f], a + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function1025b0: + ld a, $09 + call Function1028e8 + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function1025bd: + call Function1028fc + ret nc + ld a, $04 + ld [wcd49], a + ret + +Function1025c7: + call Function102f6d + ld hl, wcd4b + set 1, [hl] + ld a, $0f + call Function1028e8 + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function1025dc: + call Function1028fc + ret nc + ld a, [wcd49] + set 7, a + ld [wcd49], a + ret + +Function1025e9: + nop + ld hl, wcd4b + set 6, [hl] + call Function102b4e + ld hl, wcd4b + set 1, [hl] + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function1025ff: + ld hl, wcd4b + set 2, [hl] + farcall Function1009f3 + ret c + farcall MobileMenuJoypad + ld a, [wMenuJoypadFilter] + and c + ret z + bit A_BUTTON_F, c + jr nz, .a_button + bit D_UP_F, c + jr nz, .d_up + bit D_DOWN_F, c + jr nz, .d_down + ret + +.a_button + ld hl, wcd4b + set 3, [hl] + ld a, $27 ; Function1028d3 + ld [wcd49], a + ret + +.d_up + ld a, [wMenuCursorY] + ld b, a + ld a, [wOTPartyCount] + cp b + ret nz + call HideCursor + ld a, [wPartyCount] + ld [wMenuCursorY], a + ld a, $1d ; Function102652 + ld [wcd49], a + ret + +.d_down + ld a, [wMenuCursorY] + cp $01 + ret nz + ld a, $23 ; Function1026b7 + ld [wcd49], a + ret + +Function102652: + nop + ld hl, wcd4b + set 6, [hl] + nop + call Function102b7b + nop + ld hl, wcd4b + set 1, [hl] + nop + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function10266b: + ld hl, wcd4b + set 2, [hl] + farcall Function1009f3 + ret c + farcall MobileMenuJoypad + ld a, [wMenuJoypadFilter] + and c + ret z + bit A_BUTTON_F, c + jr nz, .a_button + bit D_DOWN_F, c + jr nz, .d_down + bit D_UP_F, c + jr nz, .d_up + ret + +.a_button + ld hl, wcd4b + set 3, [hl] + ld a, $21 ; Function102738 + ld [wcd49], a + ret + +.d_down + ld a, [wMenuCursorY] + dec a + ret nz + call HideCursor + ld a, $1f ; Function1025e9 + ld [wcd49], a + ret + +.d_up + ld a, [wMenuCursorY] + ld b, a + ld a, [wPartyCount] + cp b + ret nz + ld a, $23 ; Function1026b7 + ld [wcd49], a + ret + +Function1026b7: + ld hl, wcd4b + set 6, [hl] + ld a, [wcd49] + inc a + ld [wcd49], a + ld a, 0 + ld [wcd4a], a + +Function1026c8: + call GetJoypad + farcall Function1009f3 + ret c + ld a, [wcd4a] + ld hl, Jumptable_1026da + rst JumpTable + ret + +Jumptable_1026da: + dw Function1026de + dw Function1026f3 + +Function1026de: + call HideCursor + hlcoord 9, 17 + ld [hl], $ed + ld a, [wcd4a] + inc a + ld [wcd4a], a + ld hl, wcd4b + set 1, [hl] + ret + +Function1026f3: + ldh a, [hJoyPressed] + bit A_BUTTON_F, a + jr nz, .asm_102723 + bit D_UP_F, a + jr nz, .asm_102712 + bit D_DOWN_F, a + jr nz, .asm_102702 + ret + +.asm_102702 + hlcoord 9, 17 + ld [hl], " " + ld a, $01 + ld [wMenuCursorY], a + ld a, $1d ; Function102652 + ld [wcd49], a + ret + +.asm_102712 + hlcoord 9, 17 + ld [hl], " " + ld a, [wOTPartyCount] + ld [wMenuCursorY], a + ld a, $1f ; Function1025e9 + ld [wcd49], a + ret + +.asm_102723 + hlcoord 9, 17 + ld [hl], "▷" + ld hl, wcd4b + set 3, [hl] + ld hl, wcd4b + set 2, [hl] + ld a, $5 ; Function1025c7 + ld [wcd49], a + ret + +Function102738: + ld hl, wcd4b + set 6, [hl] + call PlaceHollowCursor + call Function1027eb + ld hl, wcd4b + set 1, [hl] + ld a, [wcd49] + inc a + ld [wcd49], a + ld a, 0 + ld [wcd4a], a + +Function102754: + call GetJoypad + farcall Function1009f3 + ret c + ld a, [wcd4a] + ld hl, Jumptable_102766 + rst JumpTable + ret + +Jumptable_102766: + dw Function102770 + dw Function102775 + dw Function10278c + dw Function1027a0 + dw Function1027b7 + +Function102770: + ld a, $01 + ld [wcd4a], a + +Function102775: + hlcoord 1, 16 + ld [hl], "▶" + hlcoord 11, 16 + ld [hl], " " + ld hl, wcd4b + set 2, [hl] + ld a, [wcd4a] + inc a + ld [wcd4a], a + ret + +Function10278c: + ldh a, [hJoyPressed] + bit A_BUTTON_F, a + jr nz, asm_1027c6 + bit B_BUTTON_F, a + jr nz, asm_1027e2 + bit D_RIGHT_F, a + jr nz, .asm_10279b + ret + +.asm_10279b + ld a, $03 + ld [wcd4a], a +Function1027a0: + hlcoord 1, 16 + ld [hl], " " + hlcoord 11, 16 + ld [hl], "▶" + ld hl, wcd4b + set 2, [hl] + ld a, [wcd4a] + inc a + ld [wcd4a], a + ret + +Function1027b7: + ldh a, [hJoyPressed] + bit A_BUTTON_F, a + jr nz, asm_1027d1 + bit B_BUTTON_F, a + jr nz, asm_1027e2 + bit D_LEFT_F, a + jr nz, Function102770 + ret + +asm_1027c6: + ld hl, wcd4b + set 3, [hl] + ld a, $25 ; Function1028bf + ld [wcd49], a + ret + +asm_1027d1: + ld hl, wcd4b + set 3, [hl] + ld a, [wMenuCursorY] + ld [wcd4c], a + ld a, $7 ; Function1024f6 + ld [wcd49], a + ret + +asm_1027e2: + call Function102db7 + ld a, $1d ; Function102652 + ld [wcd49], a + ret + +Function1027eb: + hlcoord 0, 14 + ld b, 2 + ld c, 18 + ld d, h + ld e, l + farcall _LinkTextbox + ld de, .Stats_Trade + hlcoord 2, 16 + call PlaceString + ret + +.Stats_Trade: + db "STATS TRADE@" + +Function102814: + ld a, [wMenuCursorY] + ld [wcd52], a + ld a, [wcd4c] + dec a + ld [wd002], a + ld a, [wcd4d] + dec a + ld [wd003], a + call Function102ea8 + ld a, [wcd49] + inc a + ld [wcd49], a + ld a, 0 + ld [wcd4a], a + ld hl, wcd4b + set 1, [hl] + +Function10283c: + ld hl, wcd4b + set 2, [hl] + call Function1029c3 + ret z + jr c, .asm_102852 + ld a, $10 ; Function102862 + ld [wcd49], a + ld hl, wcd4b + set 1, [hl] + ret + +.asm_102852 + ld a, $14 ; Function1028ab + ld [wcd49], a + ld hl, wcd4b + set 3, [hl] + ld hl, wcd4b + set 1, [hl] + ret + +Function102862: + ld a, $08 + call Function1028e8 + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function10286f: + call Function1028fc + ret nc + ld a, [wcd52] + ld [wMenuCursorY], a + ld a, [wcd51] + cp $08 + jr nz, .asm_102886 + ld a, $15 ; Function1023b5 + ld [wcd49], a + ret + +.asm_102886 + call Function102ee7 + ld hl, wcd4b + set 1, [hl] + ld a, $1e + ld [wcd4e], a + ld a, $3c + ld [wcd4f], a + ld a, 0 + ld [wcd4a], a + ld a, [wcd49] + inc a + ld [wcd49], a + ret + +Function1028a5: + ld a, $4 ; Function1023a1 + ld [wcd49], a + ret + +Function1028ab: + ld a, [wcd52] + ld [wMenuCursorY], a + call Function102f15 + ld hl, wcd4b + set 1, [hl] + ld a, $c ; Function1025b0 + ld [wcd49], a + ret + +Function1028bf: + ld a, [wcd49] + inc a + ld [wcd49], a + +Function1028c6: + xor a + ld [wMonType], a + call Function102bac + ld a, $1d ; Function102652 + ld [wcd49], a + ret + +Function1028d3: + ld a, [wcd49] + inc a + ld [wcd49], a + +Function1028da: + ld a, OTPARTYMON + ld [wMonType], a + call Function102bac + ld a, $1f ; Function1025e9 + ld [wcd49], a + ret + +Function1028e8: + ld hl, wcd4b + res 6, [hl] + ld [wcd50], a + farcall StartMobileInactivityTimer + ld a, 0 + ld [wcd4a], a + ret + +Function1028fc: + call GetJoypad + farcall Function1009f3 + jr nc, .asm_102909 + and a + ret + +.asm_102909 + ld a, [wcd4a] + ld hl, Jumptable_102917 + rst JumpTable + ret nc + ld a, 0 + ld [wcd4a], a + ret + +Jumptable_102917: + dw Function102933 + dw Function10294f + dw Function10295d + dw Function10296e + dw Function102996 + +Function102921: + ld a, [wcd4a] + ld hl, Jumptable_10292f + rst JumpTable + ret nc + ld a, 0 + ld [wcd4a], a + ret + +Jumptable_10292f: + dw Function10295d + dw Function102984 + +Function102933: + ld hl, MenuHeader_1029bb + call LoadMenuHeader + call Function102e07 + ld a, $32 + ld [wTextDelayFrames], a + ld hl, wcd4b + set 1, [hl] + ld a, [wcd4a] + inc a + ld [wcd4a], a + and a + ret + +Function10294f: + ld a, [wTextDelayFrames] + and a + ret nz + ld a, [wcd4a] + inc a + ld [wcd4a], a + and a + ret + +Function10295d: + call Function10299e + ld a, 0 + ld [wcd27], a + ld a, [wcd4a] + inc a + ld [wcd4a], a + and a + ret + +Function10296e: + farcall Function100382 + and a + ld a, [wcd27] + bit 7, a + ret z + ld a, [wcd4a] + inc a + ld [wcd4a], a + and a + ret + +Function102984: + farcall Function100382 + and a + ld a, [wcd27] + bit 7, a + ret z + call Function1029af + scf + ret + +Function102996: + call Function1029af + call ExitMenu + scf + ret + +Function10299e: + ld a, $01 + ld [wccb4], a + ld a, [wcd50] + ld [wccb5], a + ld a, $aa + ld [wcd51], a + ret + +Function1029af: + ld hl, wcd4b + res 7, [hl] + ld a, [wcc61] + ld [wcd51], a + ret + +MenuHeader_1029bb: + db MENU_BACKUP_TILES ; flags + menu_coords 3, 10, 15, 12 + dw NULL + db 1 ; default option + +Function1029c3: + ld a, [wcd4a] + ld hl, Jumptable_1029cb + rst JumpTable + ret + +Jumptable_1029cb: + dw Function1029cf + dw Function1029fe + +Function1029cf: + call LoadStandardMenuHeader + hlcoord 10, 7 + ld b, 3 + ld c, 8 + ld d, h + ld e, l + farcall _LinkTextbox + ld de, String_102a26 + hlcoord 12, 8 + call PlaceString + ld hl, wcd4b + set 1, [hl] + ld de, MenuData3_102a33 + call Load2DMenuData + ld a, [wcd4a] + inc a + ld [wcd4a], a + xor a + ret + +Function1029fe: + farcall Function1009f3 + ret c + farcall MobileMenuJoypad + ld a, c + ld hl, wMenuJoypadFilter + and [hl] + ret z + push af + call ExitMenu + pop af + ld a, [wMenuCursorY] + cp $01 + jr nz, .asm_102a21 + ld a, $01 + and a + ret + +.asm_102a21 + ld a, $01 + and a + scf + ret + +String_102a26: + db "TRADE" + next "CANCEL" + db "@" + +MenuData3_102a33: + db 8, 11 ; cursor start y, x + db 2, 1 ; rows, columns + db $80, $00 ; flags + dn 2, 0 ; cursor offset + db A_BUTTON ; accepted buttons + +Function102a3b: + ld a, [wcd30] + ld [wc74e], a + ld hl, wPlayerName + ld de, wPlayerTrademonSenderName + ld bc, NAME_LENGTH + call CopyBytes + ld a, [wcd4c] + dec a + ld c, a + ld b, 0 + ld hl, wPartySpecies + add hl, bc + ld a, [hl] + ld [wPlayerTrademonSpecies], a + ld a, [wcd4c] + dec a + ld hl, wPartyMonOTs + call SkipNames + ld de, wPlayerTrademonOTName + ld bc, NAME_LENGTH + call CopyBytes + ld a, [wcd4c] + dec a + ld hl, wPartyMon1ID + call GetPartyLocation + ld a, [hli] + ld [wPlayerTrademonID], a + ld a, [hl] + ld [wPlayerTrademonID + 1], a + ld a, [wcd4c] + dec a + ld hl, wPartyMon1DVs + call GetPartyLocation + ld a, [hli] + ld [wPlayerTrademonDVs], a + ld a, [hl] + ld [wPlayerTrademonDVs + 1], a + ld a, [wcd4c] + dec a + ld hl, wPartyMon1Species + call GetPartyLocation + ld b, h + ld c, l + farcall GetCaughtGender + ld a, c + ld [wPlayerTrademonCaughtData], a + ld hl, wOTPlayerName + ld de, wOTTrademonSenderName + ld bc, NAME_LENGTH + call CopyBytes + + ld a, [wcd4d] + dec a + ld c, a + ld b, 0 + ld hl, wOTPartySpecies + add hl, bc + ld a, [hl] + ld [wOTTrademonSpecies], a + ld a, [wcd4d] + dec a + ld hl, wOTPartyMonOTs + call SkipNames + ld de, wOTTrademonOTName + ld bc, NAME_LENGTH + call CopyBytes + ld a, [wcd4d] + dec a + ld hl, wOTPartyMon1ID + call GetPartyLocation + ld a, [hli] + ld [wOTTrademonID], a + ld a, [hl] + ld [wOTTrademonID + 1], a + ld a, [wcd4d] + dec a + ld hl, wOTPartyMon1DVs + call GetPartyLocation + ld a, [hli] + ld [wOTTrademonDVs], a + ld a, [hl] + ld [wOTTrademonDVs + 1], a + ld a, [wcd4d] + dec a + ld hl, wOTPartyMon1Species + call GetPartyLocation + ld b, h + ld c, l + farcall GetCaughtGender + ld a, c + ld [wOTTrademonCaughtData], a + ret + +Function102b12: + ld c, 100 + call DelayFrames + call Function102d9a + call LoadFontsBattleExtra + ld a, [wcd2f] + and a + jr nz, .asm_102b2b + farcall Function108026 + jr .asm_102b31 + +.asm_102b2b + farcall Function10802a + +.asm_102b31 + ret + +Function102b32: + ld a, [wcd4c] + dec a + ld [wCurPartyMon], a + ld a, $01 + ld [wForceEvolution], a + farcall EvolvePokemon + call Function102d9a + call Function102dd3 + call Function102dec + ret + +Function102b4e: + ld a, OTPARTYMON + ld [wMonType], a + ld a, [wMenuCursorY] + push af + ld de, MenuData_102b73 + call Load2DMenuData + pop af + ld [wMenuCursorY], a + ld a, [wOTPartyCount] + ld [w2DMenuNumRows], a + ret + +Function102b68: ; unreferenced + xor a + ld hl, wWindowStackPointer + ld bc, $10 + call ByteFill + ret + +MenuData_102b73: + db 9, 6 ; cursor start y, x + db -1, 1 ; rows, columns + db $a0, $00 ; flags + dn 1, 0 ; cursor offset + db D_UP | D_DOWN | A_BUTTON ; accepted buttons + +Function102b7b: + xor a + ld [wMonType], a + ld a, [wMenuCursorY] + push af + ld de, MenuData_102b94 + call Load2DMenuData + pop af + ld [wMenuCursorY], a + ld a, [wPartyCount] + ld [w2DMenuNumRows], a + ret + +MenuData_102b94: + db 1, 6 ; cursor start y, x + db 255, 1 ; rows, columns + db $a0, $00 ; flags + dn 1, 0 ; cursor offset + db D_UP | D_DOWN | A_BUTTON ; accepted buttons + +Function102b9c: + ld a, [wcd4d] + dec a + hlcoord 6, 9 + ld bc, $14 + call AddNTimes + ld [hl], $ec + ret + +Function102bac: + ld a, [wMenuCursorY] + dec a + ld [wCurPartyMon], a + call LowVolume + call ClearSprites + farcall _MobileStatsScreenInit + ld a, [wCurPartyMon] + inc a + ld [wMenuCursorY], a + call Function102d9a + call ClearPalettes + call DelayFrame + call MaxVolume + call Function102dd3 + call Function102dec + call Function102db7 + ret + +Function102bdc: + ld a, [wcd4d] + dec a + ld hl, wOTPartyMon1Species + call GetPartyLocation + push hl + ld a, [wcd4d] + ld c, a + ld b, 0 + ld hl, wOTPartyCount + add hl, bc + ld a, [hl] + pop hl + cp EGG + jr z, .asm_102bfa + cp [hl] + jr nz, .asm_102c05 + +.asm_102bfa + ld bc, MON_LEVEL + add hl, bc + ld a, [hl] + cp MAX_LEVEL + 1 + jr nc, .asm_102c05 + and a + ret + +.asm_102c05 + scf + ret + +Function102c07: + call Function102c14 + call Function102c3b + call Function102c21 + call Function102c2e + ret + +Function102c14: + ld hl, wPartySpecies + ld de, wOTPartySpecies + ld bc, 1 + call Function102c71 + ret + +Function102c21: + ld hl, wPartyMonNicknames + ld de, wOTPartyMonNicknames + ld bc, 11 + call Function102c71 + ret + +Function102c2e: + ld hl, wPartyMonOTs + ld de, wOTPartyMonOTs + ld bc, 11 + call Function102c71 + ret + +Function102c3b: + ld hl, wPartyMon1 + ld de, wOTPartyMon1 + ld bc, $30 + call Function102c71 + ret + +Function102c48: + farcall Function10165a + ld a, 0 + call OpenSRAM + ld hl, $a600 + ld de, wc608 + ld bc, $2f + call Function102c71 + call CloseSRAM + ld hl, wc608 + ld de, w5_da00 + ld bc, $1e0 + ld a, $05 + call FarCopyWRAM + ret + +Function102c71: + ld a, [wcd4c] + dec a + call AddNTimes + push hl + ld h, d + ld l, e + ld a, [wcd4d] + dec a + call AddNTimes + pop de + call SwapBytes + ret + +Function102c87: + ld a, [wJumptableIndex] + push af + ld a, [wcf64] + push af + ld a, [wcd4c] + ld [wJumptableIndex], a + ld a, [wPartyCount] + ld [wcf64], a + ld a, 0 + ld hl, $a600 + ld de, wc608 + ld bc, $11a + call Function102d3e + call Function102cee + ld a, 0 + ld hl, wc608 + ld de, $a600 + ld bc, $11a + call Function102d3e + ld a, [wcd4d] + ld [wJumptableIndex], a + ld a, [wOTPartyCount] + ld [wcf64], a + ld a, $05 + ld hl, w5_da00 + ld de, wc608 + ld bc, $11a + call FarCopyWRAM + call Function102cee + ld a, $05 + ld hl, wc608 + ld de, w5_da00 + ld bc, $11a + call FarCopyWRAM + pop af + ld [wcf64], a + pop af + ld [wJumptableIndex], a + ret + +Function102cee: + ld a, [wJumptableIndex] + dec a + call Function102d34 + ld de, wd002 + ld bc, $2f + call CopyBytes + ld a, [wJumptableIndex] + ld c, a + ld a, $06 + sub c + ret z + ld bc, $2f + ld hl, 0 + call AddNTimes + push hl + ld a, [wJumptableIndex] + dec a + call Function102d34 + ld d, h + ld e, l + ld hl, $2f + add hl, de + pop bc + call CopyBytes + ld a, [wcf64] + dec a + call Function102d34 + ld d, h + ld e, l + ld hl, wd002 + ld bc, $2f + call CopyBytes + ret + +Function102d34: + ld hl, wc608 + ld bc, $2f + call AddNTimes + ret + +Function102d3e: + call OpenSRAM + call CopyBytes + call CloseSRAM + ret + +Function102d48: + ld a, [wcd4c] + ld e, a + ld d, 0 + ld hl, wPartyCount + add hl, de + ld a, [hl] + ld [wTempSpecies], a + cp EGG + jr z, .asm_102d6d + call SetSeenAndCaughtMon + ld a, [wcd4c] + dec a + ld bc, PARTYMON_STRUCT_LENGTH + ld hl, wPartyMon1Happiness + call AddNTimes + ld [hl], BASE_HAPPINESS + +.asm_102d6d + ld a, [wTempSpecies] + call GetPokemonIndexFromID + ld a, l + sub LOW(UNOWN) + if HIGH(UNOWN) == 0 + or h + else + jr nz, .asm_102d98 + if HIGH(UNOWN) == 1 + dec h + else + ld a, h + cp HIGH(UNOWN) + endc + endc + jr nz, .asm_102d98 + ld a, [wcd4c] + dec a + ld bc, PARTYMON_STRUCT_LENGTH + ld hl, wPartyMon1DVs + call AddNTimes + predef GetUnownLetter + farcall UpdateUnownDex + ld a, [wFirstUnownSeen] + and a + jr nz, .asm_102d98 + ld a, [wUnownLetter] + ld [wFirstUnownSeen], a + +.asm_102d98 + and a + ret + +Function102d9a: + ld a, " " + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + ld a, $07 + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + farcall HDMATransferAttrmapAndTilemapToWRAMBank3 + ret + +Function102db7: + call Function102e4f + call Function102e3e + ld hl, wcd4b + set 1, [hl] + ret + +Function102dc3: + hlcoord 0, 12 + ld b, 4 + ld c, 18 + ld d, h + ld e, l + farcall _LinkTextbox + ret + +Function102dd3: + call DisableLCD + ld de, MobileTradeLightsGFX + ld hl, vTiles0 + lb bc, BANK(MobileTradeLightsGFX), 4 + call Get2bpp + farcall __LoadTradeScreenBorderGFX + call EnableLCD + ret + +Function102dec: + ld hl, MobileTradeLightsPalettes + ld de, wOBPals1 + ld bc, 4 palettes + ld a, $05 + call FarCopyWRAM + farcall Function49742 + call SetPalettes + call DelayFrame + ret + +Function102e07: + hlcoord 3, 10 + ld b, 1 + ld c, 11 + ld a, [wBattleMode] + and a + jr z, .link_battle + call Textbox + jr .okay + +.link_battle +; the next three operations are pointless + hlcoord 3, 10 + ld b, 1 + ld c, 11 + ld d, h + ld e, l + farcall _LinkTextbox + +.okay + ld de, .waiting + hlcoord 4, 11 + call PlaceString + ret + +.waiting + db "Waiting...!@" + +Function102e3e: + ld de, .CancelString + hlcoord 10, 17 + call PlaceString + ret + +.CancelString: + db "CANCEL@" + +Function102e4f: + farcall LoadMobileTradeBorderTilemap + farcall _InitMG_Mobile_LinkTradePalMap + ld de, wPlayerName + hlcoord 4, 0 + call PlaceString + ld a, $14 + ld [bc], a + ld de, wOTPlayerName + hlcoord 4, 8 + call PlaceString + ld a, $14 + ld [bc], a + hlcoord 7, 1 + ld de, wPartySpecies + call .PlaceSpeciesNames + hlcoord 7, 9 + ld de, wOTPartySpecies + call .PlaceSpeciesNames + ret + +.PlaceSpeciesNames: + ld c, 0 +.count_loop + ld a, [de] + cp $ff + ret z + ld [wNamedObjectIndex], a + push bc + push hl + push de + push hl + ld a, c + ldh [hDividend], a + call GetPokemonName + pop hl + call PlaceString + pop de + inc de + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + inc c + jr .count_loop + +Function102ea8: + call Function102dc3 + ld a, [wcd4c] + dec a + ld c, a + ld b, 0 + ld hl, wPartySpecies + add hl, bc + ld a, [hl] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wStringBuffer1 + ld de, wStringBuffer2 + ld bc, 11 + call CopyBytes + ld a, [wcd4d] + dec a + ld c, a + ld b, 0 + ld hl, wOTPartySpecies + add hl, bc + ld a, [hl] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, TradingMonForOTMonText + call PrintTextboxText + ret + +TradingMonForOTMonText: + text_far _TradingMonForOTMonText + text_end + +Function102ee7: + call Function102dc3 + ld de, String_102ef4 + hlcoord 1, 14 + call PlaceString + ret + +String_102ef4: + db "Too bad! The trade" + next "was canceled!" + db "@" + +Function102f15: + call Function102dc3 + ld de, .TooBadTheTradeWasCanceled + hlcoord 1, 14 + call PlaceString + ret + +.TooBadTheTradeWasCanceled: + db "こうかんを キャンセルしました@" + +Function102f32: + call Function102dc3 + ld de, .TradeCompleted + hlcoord 1, 14 + call PlaceString + ret + +.TradeCompleted: + db "Trade completed!@" + +Function102f50: + call Function102dc3 + ld de, .PleaseWait + hlcoord 1, 14 + call PlaceString + ret + +.PleaseWait: + db "しょうしょう おまち ください@" + +Function102f6d: + call Function102dc3 + ld de, .Finished + hlcoord 1, 14 + call PlaceString + ret + +.Finished: + db "しゅうりょう します@" + +Function102f85: + ld a, [wd003] + ld c, a + ld b, 0 + ld hl, wOTPartySpecies + add hl, bc + ld a, [hl] + ld [wNamedObjectIndex], a + call GetPokemonName + call Function102dc3 + ld de, String_102fb2 + hlcoord 1, 14 + call PlaceString + ld de, wStringBuffer1 + hlcoord 13, 14 + call PlaceString + ld de, String_102fcc + call PlaceString + ret + +String_102fb2: + db "あいてがわえらんだ " + next "いじょうあるようです!!" + db "@" + +String_102fcc: + db "に@" + +Function102fce: + call Function102dc3 + ld de, String_102fdb + hlcoord 1, 14 + call PlaceString + ret + +String_102fdb: + db "あいてがわせんたくに" + next "いじょうあるようです!!" + done + +Function102ff5: + call Function102dc3 + ld de, String_103002 + hlcoord 1, 14 + call PlaceString + ret + +String_103002: + db "その#を こうかんすると" + next "せんとう できなく なっちゃうよ!" + db "@" + +Function103021: + call Function102dc3 + ld de, String_10302e + hlcoord 1, 14 + call PlaceString + ret + +String_10302e: + db "あいてが ちゅうしを えらんだので" + next "こうかんを ちゅうし します" + db "@" + +Function10304f: + xor a + ld [wAttrmapEnd], a + ld [wcf42], a + ld [wcf44], a + ld [wcf45], a + ret + +Function10305d: + nop + ld a, [wAttrmapEnd] + and a + ret z + call Function10307f + ret c + call Function103094 + call Function10306e + ret + +Function10306e: + ld a, $01 + ldh [hOAMUpdate], a + call ClearSprites + ld de, wShadowOAM + call Function1030cd + xor a + ldh [hOAMUpdate], a + ret + +Function10307f: + ld c, $02 + ld hl, wcd4b + bit 7, [hl] + jr z, .asm_10308a + ld c, $01 + +.asm_10308a + ld hl, wcf45 + inc [hl] + ld a, [hl] + cp c + ret c + xor a + ld [hl], a + ret + +Function103094: + ld hl, wcd4b + bit 7, [hl] + jr nz, .asm_1030c0 + ld a, [wcf42] + bit 7, a + jr nz, .asm_1030b2 + ld a, [wcf44] + inc a + ld [wcf44], a + cp $2c + ret nz + ld hl, wcf42 + set 7, [hl] + ret + +.asm_1030b2 + ld a, [wcf44] + dec a + ld [wcf44], a + ret nz + ld hl, wcf42 + res 7, [hl] + ret + +.asm_1030c0 + ld hl, wcf44 + ld a, [hl] + and a + jr z, .asm_1030ca + dec a + ld [hl], a + ret nz + +.asm_1030ca + ld [hl], $2c + ret + +Function1030cd: + ld a, [wcf44] + ld l, a + ld h, 0 + add hl, hl + add hl, hl + add hl, hl + ld bc, Unknown_103112 + add hl, bc + ld b, $30 + ld c, $08 +.asm_1030de + push hl + ld hl, wcd4b + bit 7, [hl] + pop hl + ld a, 0 + jr z, .asm_1030eb + ld a, $05 +.asm_1030eb + + add [hl] + inc hl + push hl + + add a + add a + + add LOW(Unknown_10327a) + ld l, a + ld a, HIGH(Unknown_10327a) + adc 0 + ld h, a + + ld a, b + add [hl] + inc hl + ld [de], a + inc de + ld a, $0a + add [hl] + inc hl + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + pop hl + ld a, b + add $08 + ld b, a + dec c + jr nz, .asm_1030de + ret + +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 + 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 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $00, $00, $00, $00, $00, $00, $00, $00 + db $01, $00, $00, $00, $00, $00, $00, $00 + db $02, $01, $00, $00, $00, $00, $00, $00 + db $03, $02, $01, $00, $00, $00, $00, $00 + db $04, $03, $02, $01, $00, $00, $00, $00 + db $04, $04, $03, $02, $01, $00, $00, $00 + db $04, $04, $04, $03, $02, $01, $00, $00 + db $04, $04, $04, $04, $03, $02, $01, $00 + db $04, $04, $04, $04, $04, $03, $02, $01 + db $04, $04, $04, $04, $04, $04, $03, $02 + db $04, $04, $04, $04, $04, $04, $04, $03 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $04, $04, $04, $04, $04, $04, $04, $04 + db $03, $04, $04, $04, $04, $04, $04, $04 + db $02, $03, $04, $04, $04, $04, $04, $04 + db $01, $02, $03, $04, $04, $04, $04, $04 + db $00, $01, $02, $03, $04, $04, $04, $04 + db $00, $00, $01, $02, $03, $04, $04, $04 + db $00, $00, $00, $01, $02, $03, $04, $04 + db $00, $00, $00, $00, $01, $02, $03, $04 + db $00, $00, $00, $00, $00, $01, $02, $03 + db $00, $00, $00, $00, $00, $00, $01, $02 + db $00, $00, $00, $00, $00, $00, $00, $01 + 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 + 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 + 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 + +Unknown_10327a: + db $00, $00, $00, $00 + db $00, $00, $01, $00 + db $00, $00, $02, $00 + db $00, $00, $03, $00 + db $00, $00, $01, $01 + db $00, $00, $00, $00 + db $00, $00, $01, $02 + db $00, $00, $02, $02 + db $00, $00, $03, $02 + db $00, $00, $01, $03 + +MobileTradeLightsGFX: +INCBIN "gfx/mobile/mobile_trade_lights.2bpp" + +MobileTradeLightsPalettes: +INCLUDE "gfx/mobile/mobile_trade_lights.pal" + +Function103302: + call Function103309 + call Function103362 + ret + +Function103309: + xor a + ldh [hBGMapMode], a + ld hl, wd1ea + ld bc, 10 + xor a + call ByteFill + ld a, BANK(s4_a60c) + call OpenSRAM + ld a, [wdc41] + ld [s4_a60c], a + ld [wd1ea], a + call CloseSRAM + call Function1035c6 + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, [hli] + ld [wd1ef], a + ld a, [hli] + ld [wd1ec], a + ld a, [hli] + ld [wd1ed], a + ld h, d + ld l, e + call Function3eea + ld hl, wd1ec + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hl] + ld [wd1ee], a + call Function1034be + call UpdateSprites + farcall HDMATransferAttrmapAndTilemapToWRAMBank3 + ld a, $01 + ld [wd1f0], a + call Function10339a + ret + +Function103362: +.asm_103362 + ld a, [wd1f0] + ld [wd1f1], a + call Function1033af + call Function10339a + call Function10342c + farcall HDMATransferTilemapToWRAMBank3 + ld a, [wd1eb] + bit 7, a + jr z, .asm_103362 + ld hl, wd1eb + bit 6, [hl] + jr z, .asm_103398 + ld a, BANK(s4_a60c) + call OpenSRAM + ld a, [wd1ea] + ld [s4_a60c], a + ld [wdc41], a + call CloseSRAM + xor a + ret + +.asm_103398 + scf + ret + +Function10339a: + ld a, [wd1f0] + ld [wd1f2], a + ld c, a + ld b, 0 + ld hl, wd1ec + ld a, [hli] + ld h, [hl] + ld l, a + add hl, bc + ld a, [hl] + ld [wd1f3], a + ret + +Function1033af: + call GetJoypad + ldh a, [hJoyPressed] + bit D_LEFT_F, a + jr nz, .left + bit D_RIGHT_F, a + jr nz, .right + bit B_BUTTON_F, a + jr nz, .b + bit A_BUTTON_F, a + jr nz, .a + bit D_UP_F, a + jr nz, .up + bit D_DOWN_F, a + jr nz, .down + ret + +.up + ld a, [wd1f0] + dec a + ld [wd1f0], a + cp 1 + ret nc + ld a, [wd1ee] + ld [wd1f0], a + ret + +.down + ld a, [wd1f0] + inc a + ld [wd1f0], a + ld c, a + ld a, [wd1ee] + cp c + ret nc + ld a, 1 + ld [wd1f0], a + ret + +.b + call PlayClickSFX + ld hl, wd1eb + set 7, [hl] + ret + +.a + ld a, [wd1f3] + cp 3 + jr nz, .a_return + ld de, SFX_TRANSACTION + call PlaySFX + ld hl, wd1eb + set 7, [hl] + ld hl, wd1eb + set 6, [hl] + ret + +.left +.right +.a_return + ld a, [wd1f3] + cp 3 + ret z + ld de, SFX_PUSH_BUTTON + call PlaySFX + ld bc, 8 + call Function10350f + ld a, [wd1ea] + xor e + ld [wd1ea], a + ret + +Function10342c: + ld a, [wd1f0] + ld [wd1f2], a + call Function103490 + call Function10343c + call Function1034a7 + ret + +Function10343c: + ld a, [wd1f3] + cp $02 + jr nz, .asm_103452 + ld bc, 1 + call Function1034f7 + ld c, $12 + ld b, $01 + call Function1034e0 + jr .asm_10345f + +.asm_103452 + ld bc, $ffed + call Function1034f7 + ld c, $12 + ld b, $02 + call Function1034e0 + +.asm_10345f + ld bc, 0 + call Function10350f + ld bc, 1 + call Function103487 + ld bc, 8 + call Function10350f + ld a, [wd1ea] + and e + ld bc, 2 + jr z, .asm_10347d + ld bc, 4 + +.asm_10347d + call Function10350f + ld bc, 11 + call Function103487 + ret + +Function103487: + push de + call Function1034f7 + pop de + call PlaceString + ret + +Function103490: + hlcoord 0, 15 + ld c, $14 + ld b, $03 + call Function1034e0 + ld bc, 6 + call Function10350f + hlcoord 1, 16 + call PlaceString + ret + +Function1034a7: + ld a, [wd1f1] + ld [wd1f2], a + ld bc, 10 + call Function1034f7 + ld [hl], $7f + ld bc, 10 + call Function1034f1 + ld [hl], $ed + ret + +Function1034be: + ld a, $01 + ld [wd1f2], a + ld hl, wd1ec + ld a, [hli] + ld h, [hl] + ld l, a + ld a, [hli] +.asm_1034ca + push af + ld a, [hli] + push hl + ld [wd1f3], a + call Function10343c + ld hl, wd1f2 + inc [hl] + pop hl + pop af + dec a + jr nz, .asm_1034ca + call Function103490 + ret + +Function1034e0: + push bc + push hl + call ClearBox + pop hl + ld bc, wAttrmap - wTilemap + add hl, bc + pop bc + ld a, $06 + call FillBoxWithByte + ret + +Function1034f1: + ld a, [wd1f0] + ld [wd1f2], a + +Function1034f7: + hlcoord 0, 0 + add hl, bc + ld a, [wd1ef] + ld bc, SCREEN_WIDTH + call AddNTimes + ld a, [wd1f2] + dec a + ld bc, 40 + call AddNTimes + ret + +Function10350f: + ld a, [wd1f3] + push bc + ld hl, Unknown_103522 + ld bc, 9 + call AddNTimes + pop bc + add hl, bc + ld a, [hli] + ld d, [hl] + ld e, a + ret + +Unknown_103522: + dw String_103546 + dw String_103598 + dw String_1035a0 + dw String_10355f + db $01 + dw String_10354f + dw String_1035a8 + dw String_1035b1 + dw String_103571 + db $02 + dw String_103557 + dw String_1035ba + dw String_1035bd + dw String_103585 + db $04 + dw String_103545 + dw String_1035c1 + dw String_1035c1 + dw String_103545 + +String_103545: db "@" +String_103546: db "せんとう アニメ@" +String_10354f: db "でんわばんごう@" +String_103557: db "めいしこうかん@" +String_10355f: db "でんわを かけるひとが きめられる@" +String_103571: db "でんわばんごうの にゅうりょくのしかた@" +String_103585: db "あたらしいめいしが あれば こうかん@" +String_103598: db "とばして みる@" +String_1035a0: db "じっくり みる@" +String_1035a8: db "めいしからえらぶ@" +String_1035b1: db "すうじで いれる@" +String_1035ba: db "する@" +String_1035bd: db "しない@" +String_1035c1: db "けってい@" + +Function1035c6: + farcall Function10138b + ld b, 0 + ld hl, Unknown_1035d7 + add hl, bc + add hl, bc + ld a, [hli] + ld h, [hl] + ld l, a + ret + +Unknown_1035d7: + dw Unknown_1035e7 + dw Unknown_1035f3 + dw Unknown_103608 + dw Unknown_103608 + dw Unknown_1035fe + dw AskMobileOrCable + dw AskMobileOrCable + dw AskMobileOrCable + +Unknown_1035e7: + dwcoord 0, 6 + db $12, $07, $07 + dw .this +.this + db 4, 2, 1, 0, 3 + +Unknown_1035f3: + dwcoord 0, 7 + db $12, $06, $09 + dw .this +.this + db 3, 2, 1, 3 + +Unknown_1035fe: + dwcoord 0, 9 + db $12, $04, $0b + dw .this +.this + db 2, 0, 3 + +Unknown_103608: + dwcoord 0, 9 + db $12, $04, $0b + dw .this +.this + db 2, 2, 3 + +AskMobileOrCable: + ld hl, MenuHeader_103640 + call LoadMenuHeader + ld a, [wMobileOrCable_LastSelection] + and $0f + jr z, .skip_load + ld [wMenuCursorPosition], a + +.skip_load + call VerticalMenu + call CloseWindow + jr c, .pressed_b + ld a, [wMenuCursorY] + ld [wScriptVar], a + ld c, a + ld a, [wMobileOrCable_LastSelection] + and $f0 + or c + ld [wMobileOrCable_LastSelection], a + ret + +.pressed_b + xor a + ld [wScriptVar], a + ret + +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: + db STATICMENU_CURSOR ; flags + db 2 + db "モバイル@" + db "ケーブル@" + +Function103654: + farcall Mobile_AlwaysReturnNotCarry + bit 7, c + jr nz, .asm_103666 + ld hl, wcd2a + res 5, [hl] + ld c, $02 + ret + +.asm_103666 + ld hl, wcd2a + set 5, [hl] + ld c, $01 + ret + +Mobile_SelectThreeMons: + farcall Mobile_AlwaysReturnNotCarry + bit 7, c + jr z, .asm_10369b + ld hl, MobileBattleMustPickThreeMonText + call PrintText + call YesNoBox + jr c, .asm_103696 + farcall CheckForMobileBattleRules + jr nc, .asm_103690 + call JoyWaitAorB + jr .asm_103696 + +.asm_103690 + ld a, $01 + ld [wScriptVar], a + ret + +.asm_103696 + xor a + ld [wScriptVar], a + ret + +.asm_10369b + ld hl, wMobileOrCable_LastSelection + bit 7, [hl] + set 7, [hl] + jr nz, .asm_1036b5 + ld hl, MobileBattleMoreInfoText + call PrintText + call YesNoBox + jr c, .asm_1036b5 + call Function1036f9 + call JoyWaitAorB + +.asm_1036b5 + call Function103700 + jr c, .asm_1036f4 + ld hl, MenuHeader_103747 + call LoadMenuHeader + call VerticalMenu + call ExitMenu + jr c, .asm_1036f4 + ld a, [wMenuCursorY] + cp $01 + jr z, .asm_1036d9 + cp $02 + jr z, .asm_1036f4 + cp $03 + jr z, .asm_1036ec + jr .asm_1036b5 + +.asm_1036d9 + farcall CheckForMobileBattleRules + jr nc, .asm_1036e6 + call JoyWaitAorB + jr .asm_1036f4 + +.asm_1036e6 + ld a, $01 + ld [wScriptVar], a + ret + +.asm_1036ec + call Function1036f9 + call JoyWaitAorB + jr .asm_1036b5 + +.asm_1036f4 + xor a + ld [wScriptVar], a + ret + +Function1036f9: + ld hl, MobileBattleRulesText + call PrintText + ret + +Function103700: + ld c, 10 + ld hl, wSwarmFlags + bit SWARMFLAGS_MOBILE_4_F, [hl] + jr z, .asm_10370f + farcall MobileBattleGetRemainingTime +.asm_10370f + ld a, c + ld [wStringBuffer2], a + ld a, [wStringBuffer2] + cp 5 + jr nc, .five_or_more_mins + cp 2 + jr nc, .two_to_five_mins + cp 1 + jr nc, .one_min + jr .times_up + +.five_or_more_mins + ld hl, WouldYouLikeToMobileBattleText + call PrintText + and a + ret + +.two_to_five_mins + ld hl, WantAQuickMobileBattleText + call PrintText + and a + ret + +.one_min + ld hl, WantToRushThroughAMobileBattleText + call PrintText + and a + ret + +.times_up + ld hl, PleaseTryAgainTomorrowText + call PrintText + call JoyWaitAorB + scf + ret + +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: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING ; flags + db 3 + db "はい@" + db "やめる@" + db "せつめい@" + +MobileBattleMustPickThreeMonText: + text_far _MobileBattleMustPickThreeMonText + text_end + +MobileBattleMoreInfoText: + text_far _MobileBattleMoreInfoText + text_end + +MobileBattleRulesText: + text_far _MobileBattleRulesText + text_end + +WouldYouLikeToMobileBattleText: + text_far _WouldYouLikeToMobileBattleText + text_end + +WantAQuickMobileBattleText: + text_far _WantAQuickMobileBattleText + text_end + +WantToRushThroughAMobileBattleText: + text_far _WantToRushThroughAMobileBattleText + text_end + +PleaseTryAgainTomorrowText: + text_far _PleaseTryAgainTomorrowText + text_end + +Function103780: + ld a, [wChosenCableClubRoom] + push af + call Function10378c + pop af + ld [wChosenCableClubRoom], a + ret + +Function10378c: + ld c, 0 + ld hl, wSwarmFlags + bit SWARMFLAGS_MOBILE_4_F, [hl] + jr nz, .already_set + ld c, 1 + ld hl, wSwarmFlags + set SWARMFLAGS_MOBILE_4_F, [hl] + +.already_set + push bc + farcall Link_SaveGame + pop bc + jr c, .failed_to_save + ld a, 1 + ld [wScriptVar], a + ld a, c + and a + ret z + farcall MobileBattleResetTimer + ret + +.failed_to_save + xor a + ld [wScriptVar], a + ld a, c + and a + ret z + ld hl, wSwarmFlags + res SWARMFLAGS_MOBILE_4_F, [hl] + ret + +Function1037c2: + call MobileCheckRemainingBattleTime + jr c, .nope + ld a, [wdc5f] + and a + jr z, .nope + ld hl, TryAgainUsingSameSettingsText + call PrintText + call YesNoBox + jr c, .nope + ld a, $01 + ld [wScriptVar], a + ret + +.nope + xor a + ld [wdc5f], a + ld [wScriptVar], a + ret + +TryAgainUsingSameSettingsText: + text_far _TryAgainUsingSameSettingsText + text_end + +Function1037eb: + call MobileCheckRemainingBattleTime + jr nc, .asm_103807 + ld hl, MobileBattleLessThanOneMinuteLeftText + call PrintText + call JoyWaitAorB + ld hl, MobileBattleNoTimeLeftForLinkingText + call PrintText + call JoyWaitAorB + xor a + ld [wScriptVar], a + ret + +.asm_103807 + ld a, [wdc60] + and a + jr nz, .asm_103813 + ld a, $01 + ld [wScriptVar], a + ret + +.asm_103813 + ld a, $02 + ld [wScriptVar], a + ret + +MobileBattleLessThanOneMinuteLeftText: + text_far _MobileBattleLessThanOneMinuteLeftText + text_end + +MobileBattleNoTimeLeftForLinkingText: + text_far _MobileBattleNoTimeLeftForLinkingText + text_end + +MobileCheckRemainingBattleTime: +; Returns carry if less than one minute remains + farcall Mobile_AlwaysReturnNotCarry + bit 7, c + jr nz, .ok + farcall MobileBattleGetRemainingTime + ld a, c + cp 1 + jr c, .fail + +.ok + xor a + ret + +.fail + scf + ret + +Function10383c: + ld a, $01 + ld [wdc60], a + xor a + ld hl, wPlayerMonSelection + ld [hli], a + ld [hli], a + ld [hl], a + ld hl, PickThreeMonForMobileBattleText + call PrintText + call JoyWaitAorB + farcall Script_reloadmappart + farcall Function4a94e + jr c, .asm_103870 + ld hl, wd002 + ld de, wPlayerMonSelection + ld bc, 3 + call CopyBytes + xor a + ld [wScriptVar], a + ret + +.asm_103870 + ld a, $01 + ld [wScriptVar], a + ret + +PickThreeMonForMobileBattleText: + text_far _PickThreeMonForMobileBattleText + text_end + +Function10387b: + farcall Mobile_AlwaysReturnNotCarry + bit 7, c + ret nz + farcall MobileBattleGetRemainingTime + ld a, c + ld [wStringBuffer2], a + ld hl, MobileBattleRemainingTimeText + call PrintText + call JoyWaitAorB + ret + +MobileBattleRemainingTimeText: + text_far _MobileBattleRemainingTimeText + text_end diff --git a/mobile/mobile_41.asm b/mobile/mobile_41.asm new file mode 100644 index 0000000..0450a41 --- /dev/null +++ b/mobile/mobile_41.asm @@ -0,0 +1,1113 @@ +; These functions deal with miscellaneous statistics +; which were used for Trainer Rankings in Pokémon News. + +; Copies certain values at the time the player enters the Hall of Fame. +StubbedTrainerRankings_HallOfFame2:: + ret + ld a, BANK(sTrainerRankingGameTimeHOF) + call OpenSRAM + + ld hl, wGameTimeHours + ld de, sTrainerRankingGameTimeHOF + ld bc, 4 + call CopyBytes + + ld hl, sTrainerRankingStepCount + ld de, sTrainerRankingStepCountHOF + ld bc, 4 + call CopyBytes + + ; sTrainerRankingHealings is only a 3-byte value. + ; One extraneous byte is copied from sTrainerRankingMysteryGift. + ld hl, sTrainerRankingHealings + ld de, sTrainerRankingHealingsHOF + ld bc, 4 + call CopyBytes + + ld hl, sTrainerRankingBattles + ld de, sTrainerRankingBattlesHOF + ld bc, 3 + call CopyBytes + + call UpdateTrainerRankingsChecksum + call CloseSRAM + ret + +StubbedTrainerRankings_MagikarpLength: + ret + ld a, BANK(sTrainerRankingLongestMagikarp) + call OpenSRAM + ld de, wMagikarpLength + ld hl, sTrainerRankingLongestMagikarp + + ; Is this Magikarp the longest measured? + ld a, [de] + cp [hl] + jr z, .isLowByteHigher + jr nc, .newRecordLongest + jr .checkShortest + +.isLowByteHigher + inc hl + inc de + ld a, [de] + cp [hl] + dec hl + dec de + jr c, .checkShortest + +.newRecordLongest + ld a, [de] + inc de + ld [hli], a + ld a, [de] + dec de + ld [hl], a + +.checkShortest + ; First, check if the record for shortest Magikarp is 0. + ; This seems unnecessary, because the value is initialized to 100.0 cm. + ld hl, sTrainerRankingShortestMagikarp + ld a, [hli] + or [hl] + dec hl + jr z, .newRecordShortest + + ; Now check if this Magikarp is the shortest + ld a, [de] + cp [hl] + jr z, .isLowByteLower + jr c, .newRecordShortest + jr .done + +.isLowByteLower + inc hl + inc de + ld a, [de] + cp [hl] + jr nc, .done + dec hl + dec de + +.newRecordShortest + ld a, [de] + inc de + ld [hli], a + ld a, [de] + ld [hl], a + +.done + call UpdateTrainerRankingsChecksum + call CloseSRAM + ret + +StubbedTrainerRankings_BugContestScore: + ret + ld a, BANK(sTrainerRankingBugContestScore) + call OpenSRAM + ldh a, [hProduct] + ld hl, sTrainerRankingBugContestScore + cp [hl] + jr z, .isLowByteHigher + jr nc, .newHighScore + jr .done + +.isLowByteHigher + inc hl + ldh a, [hMultiplicand] + cp [hl] + jr c, .done + dec hl + +.newHighScore + ldh a, [hProduct] + ld [hli], a + ldh a, [hMultiplicand] + ld [hl], a + +.done + call UpdateTrainerRankingsChecksum + call CloseSRAM + ret + +StubbedTrainerRankings_AddToSlotsWinStreak: + ret + ld a, BANK(sTrainerRankingCurrentSlotsStreak) + call OpenSRAM + + ; Increment the current streak + ld hl, sTrainerRankingCurrentSlotsStreak + 1 + inc [hl] + jr nz, .noCarry + dec hl + inc [hl] + inc hl + +.noCarry + dec hl + ; Now check if this is a new record for longest streak + ld a, [sTrainerRankingLongestSlotsStreak] + cp [hl] + jr z, .isLowByteHigher + jr c, .newRecordStreak + jr .done + +.isLowByteHigher + inc hl + ld a, [sTrainerRankingLongestSlotsStreak + 1] + cp [hl] + jr nc, .done + dec hl + +.newRecordStreak + ld a, [hli] + ld [sTrainerRankingLongestSlotsStreak], a + ld a, [hl] + ld [sTrainerRankingLongestSlotsStreak + 1], a + +.done + call UpdateTrainerRankingsChecksum + call CloseSRAM + ret + +StubbedTrainerRankings_EndSlotsWinStreak: + ret + ld a, BANK(sTrainerRankingCurrentSlotsStreak) + call OpenSRAM + ld hl, sTrainerRankingCurrentSlotsStreak + xor a + ld [hli], a + ld [hl], a + call UpdateTrainerRankingsChecksum + call CloseSRAM + ret + +StubbedTrainerRankings_AddToSlotsPayouts: + ret + ld a, BANK(sTrainerRankingTotalSlotsPayouts) + call OpenSRAM + ld hl, sTrainerRankingTotalSlotsPayouts + 3 + ld a, e + add [hl] + ld [hld], a + ld a, d + adc [hl] + ld [hld], a + jr nc, .done + inc [hl] + jr nz, .done + dec hl + inc [hl] + jr nz, .done + ld a, $ff + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + +.done + call UpdateTrainerRankingsChecksum + call CloseSRAM + ret + +StubbedTrainerRankings_AddToBattlePayouts: + ret + ld a, BANK(sTrainerRankingTotalBattlePayouts) + call OpenSRAM + ld hl, sTrainerRankingTotalBattlePayouts + 3 + ld a, [bc] + dec bc + add [hl] + ld [hld], a + ld a, [bc] + dec bc + adc [hl] + ld [hld], a + ld a, [bc] + adc [hl] + ld [hld], a + jr nc, .done + inc [hl] + jr nz, .done + ld a, $ff + ld [hli], a + ld [hli], a + ld [hli], a + ld [hl], a + +.done + call UpdateTrainerRankingsChecksum + call CloseSRAM + ret + +StubbedTrainerRankings_StepCount: + ret + ld hl, sTrainerRankingStepCount + jp StubbedTrainerRankings_Increment4Byte + +StubbedTrainerRankings_BattleTowerWins: ; unreferenced + ret + ld a, BANK(s5_aa8d) + call OpenSRAM + ld a, [s5_aa8d] + and a + call CloseSRAM + ret nz + ld hl, sTrainerRankingBattleTowerWins + jp StubbedTrainerRankings_Increment2Byte + +StubbedTrainerRankings_TMsHMsTaught: + ret + ld hl, sTrainerRankingTMsHMsTaught + jp StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_Battles: + ret + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL ; Exclude the Dude’s tutorial battle + ret z + ld hl, sTrainerRankingBattles + jp StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_WildBattles: + ret + ld a, [wBattleType] + cp BATTLETYPE_TUTORIAL ; Exclude the Dude’s tutorial battle + ret z + ld hl, sTrainerRankingWildBattles + jp StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_TrainerBattles: + ret + ld hl, sTrainerRankingTrainerBattles + jp StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_Unused1: ; unreferenced + ret + ld hl, sTrainerRankingUnused1 + jp StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_HallOfFame:: + ret + ld hl, sTrainerRankingHOFEntries + jp StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_WildMonsCaught: + ret + ld hl, sTrainerRankingWildMonsCaught + jp StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_HookedEncounters: + ret + ld hl, sTrainerRankingHookedEncounters + jp StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_EggsHatched: + ret + ld hl, sTrainerRankingEggsHatched + jp StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_MonsEvolved: + ret + ld hl, sTrainerRankingMonsEvolved + jp StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_FruitPicked: + ret + ld hl, sTrainerRankingFruitPicked + jp StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_Healings: + ret + ld hl, sTrainerRankingHealings + jp StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_MysteryGift: + ret + ld hl, sTrainerRankingMysteryGift + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_Trades: + ret + ld hl, sTrainerRankingTrades + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_Fly: + ret + ld hl, sTrainerRankingFly + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_Surf: + ret + ld hl, sTrainerRankingSurf + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_Waterfall: + ret + ld hl, sTrainerRankingWaterfall + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_WhiteOuts: + ret + ld hl, sTrainerRankingWhiteOuts + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_LuckyNumberShow: + ret + ld hl, sTrainerRankingLuckyNumberShow + jr StubbedTrainerRankings_Increment2Byte + +StubbedTrainerRankings_PhoneCalls: + ret + ld hl, sTrainerRankingPhoneCalls + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_Unused2: ; unreferenced + ret + ld hl, sTrainerRankingUnused2 + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_LinkBattles: + ret + ld hl, sTrainerRankingLinkBattles + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_Splash: + ret + ; Only counts if it’s the player’s turn + ldh a, [hBattleTurn] + and a + ret nz + ld hl, sTrainerRankingSplash + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_TreeEncounters: + ret + ld hl, sTrainerRankingTreeEncounters + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_Unused3: ; unreferenced + ret + ld hl, sTrainerRankingUnused3 + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_ColosseumWins: + ret + ld hl, sTrainerRankingColosseumWins + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_ColosseumLosses: + ret + ld hl, sTrainerRankingColosseumLosses + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_ColosseumDraws: + ret + ld hl, sTrainerRankingColosseumDraws + jr StubbedTrainerRankings_Increment3Byte + +; Counts uses of both Selfdestruct and Explosion. +StubbedTrainerRankings_Selfdestruct: + ret + ; Only counts if it’s the player’s turn + ldh a, [hBattleTurn] + and a + ret nz + ld hl, sTrainerRankingSelfdestruct + jr StubbedTrainerRankings_Increment3Byte + +StubbedTrainerRankings_Increment4Byte: + push bc + ld bc, 3 + jr StubbedTrainerRankings_Increment + +StubbedTrainerRankings_Increment3Byte: + push bc + ld bc, 2 + jr StubbedTrainerRankings_Increment + +StubbedTrainerRankings_Increment2Byte: + push bc + ld bc, 1 + jr StubbedTrainerRankings_Increment + +StubbedTrainerRankings_Increment1Byte: ; unreferenced + push bc + ld bc, 0 + +; Increments a big-endian value of bc + 1 bytes at hl +StubbedTrainerRankings_Increment: + ld a, BANK(sTrainerRankings) + call OpenSRAM + push hl + push de + ld e, c + inc e +.asm_106136 + ld a, [hli] + inc a + jr nz, .asm_10613d + dec e + jr nz, .asm_106136 + +.asm_10613d + pop de + pop hl + jr z, .asm_10614d + add hl, bc +.asm_106142 + inc [hl] + jr nz, .asm_10614d + ld a, c + and a + jr z, .asm_10614d + dec hl + dec c + jr .asm_106142 + +.asm_10614d + call UpdateTrainerRankingsChecksum + call CloseSRAM + pop bc + ret + +; Used when SRAM bank 5 isn’t already loaded — what’s the point of this? +UpdateTrainerRankingsChecksum2: + ret + ld a, BANK(sTrainerRankings) + call OpenSRAM + call UpdateTrainerRankingsChecksum + call CloseSRAM + ret + +UpdateTrainerRankingsChecksum: + push de + call CalculateTrainerRankingsChecksum + ld hl, sTrainerRankingsChecksum + ld [hl], d + inc hl + ld [hl], e + pop de + ret + +CalculateTrainerRankingsChecksum: + push bc + ld hl, sTrainerRankings + ld bc, sTrainerRankingsChecksum - sTrainerRankings + xor a + ld de, 0 +.asm_106179 + ld a, e + add [hl] + ld e, a + jr nc, .asm_10617f + inc d + +.asm_10617f + inc hl + dec bc + ld a, b + or c + jr nz, .asm_106179 + pop bc + ret + +BackupMobileEventIndex: + ld a, BANK(sMobileEventIndex) + call OpenSRAM + ld a, [sMobileEventIndex] + push af + ld a, BANK(sMobileEventIndexBackup) + call OpenSRAM + pop af + ld [sMobileEventIndexBackup], a + call CloseSRAM + ret + +RestoreMobileEventIndex: + ld a, BANK(sMobileEventIndexBackup) + call OpenSRAM + ld a, [sMobileEventIndexBackup] + push af + ld a, BANK(sMobileEventIndex) + call OpenSRAM + pop af + ld [sMobileEventIndex], a + call CloseSRAM + ret + +VerifyTrainerRankingsChecksum: ; unreferenced + call CalculateTrainerRankingsChecksum + ld hl, sTrainerRankingsChecksum + ld a, d + cp [hl] + ret nz + inc hl + ld a, e + cp [hl] + ret + +DeleteMobileEventIndex: + ld a, BANK(sMobileEventIndex) + call OpenSRAM + xor a + ld [sMobileEventIndex], a + call CloseSRAM + ret + +InitializeTrainerRankings: ; unreferenced +; Initializes Trainer Rankings data for a new save file in JP Crystal. + ld hl, sTrainerRankings + ld bc, sTrainerRankingsEnd - sTrainerRankings + xor a + call ByteFill + + ; Initialize the shortest Magikarp to 100.0 cm + ld hl, sTrainerRankingShortestMagikarp + ld a, $3 + ld [hli], a + ld [hl], $e8 + + call UpdateTrainerRankingsChecksum + ld hl, sTrainerRankings + ld de, sTrainerRankingsBackup + ld bc, sTrainerRankingsEnd - sTrainerRankings + call CopyBytes + ret + +_MobilePrintNum:: +; Supports signed 31-bit integers (up to 10 digits) +; b: Bits 0-4 = # bytes +; Bit 7 = set if negative +; c: Number of digits +; de: highest byte of number to convert +; hl: where to print the converted string + push bc + xor a + ldh [hPrintNumBuffer + 0], a + ldh [hPrintNumBuffer + 1], a + ldh [hPrintNumBuffer + 2], a + ld a, b + and $f + cp $1 + jr z, .one_byte + cp $2 + jr z, .two_bytes + cp $3 + jr z, .three_bytes +; four bytes + ld a, [de] + ldh [hPrintNumBuffer + 0], a + inc de + +.three_bytes + ld a, [de] + ldh [hPrintNumBuffer + 1], a + inc de + +.two_bytes + ld a, [de] + ldh [hPrintNumBuffer + 2], a + inc de + +.one_byte + ld a, [de] + ldh [hPrintNumBuffer + 3], a + inc de + + push de + xor a + ldh [hPrintNumBuffer + 8], a + ld a, b + ldh [hPrintNumBuffer + 9], a + ld a, c + cp 2 + jr z, .two_digits + ld de, ._2 + cp 3 + jr z, .three_to_nine_digits + ld de, ._3 + cp 4 + jr z, .three_to_nine_digits + ld de, ._4 + cp 5 + jr z, .three_to_nine_digits + ld de, ._5 + cp 6 + jr z, .three_to_nine_digits + ld de, ._6 + cp 7 + jr z, .three_to_nine_digits + ld de, ._7 + cp 8 + jr z, .three_to_nine_digits + ld de, ._8 + cp 9 + jr z, .three_to_nine_digits + ld de, ._9 + +.three_to_nine_digits + inc de + inc de + inc de + dec a + dec a + +.digit_loop + push af + call .Function1062b2 + call .Function1062ff +rept 4 + inc de +endr + pop af + dec a + jr nz, .digit_loop + +.two_digits + ld c, 0 + ldh a, [hPrintNumBuffer + 3] +.mod_ten_loop + cp 10 + jr c, .simple_divide_done + sub 10 + inc c + jr .mod_ten_loop + +.simple_divide_done + ld b, a + ldh a, [hPrintNumBuffer + 8] + or c + ldh [hPrintNumBuffer + 8], a + jr nz, .create_digit + call .LoadMinusTenIfNegative + jr .done + +.create_digit + ld a, "0" + add c + ld [hl], a + +.done + call .Function1062ff + ld a, "0" + add b + ld [hli], a + pop de + pop bc + ret + +._9 + dd 1000000000 +._8 + dd 100000000 +._7 + dd 10000000 +._6 + dd 1000000 +._5 + dd 100000 +._4 + dd 10000 +._3 + dd 1000 +._2 + dd 100 + +.Function1062b2: + ld c, $0 +.asm_1062b4 + ld a, [de] + dec de + ld b, a + ldh a, [hPrintNumBuffer + 3] + sub b + ldh [hPrintNumBuffer + 7], a + ld a, [de] + dec de + ld b, a + ldh a, [hPrintNumBuffer + 2] + sbc b + ldh [hPrintNumBuffer + 6], a + ld a, [de] + dec de + ld b, a + ldh a, [hPrintNumBuffer + 1] + sbc b + ldh [hPrintNumBuffer + 5], a + ld a, [de] + inc de + inc de + inc de + ld b, a + ldh a, [hPrintNumBuffer + 0] + sbc b + ldh [hPrintNumBuffer + 4], a + jr c, .asm_1062eb + ldh a, [hPrintNumBuffer + 4] + ldh [hPrintNumBuffer + 0], a + ldh a, [hPrintNumBuffer + 5] + ldh [hPrintNumBuffer + 1], a + ldh a, [hPrintNumBuffer + 6] + ldh [hPrintNumBuffer + 2], a + ldh a, [hPrintNumBuffer + 7] + ldh [hPrintNumBuffer + 3], a + inc c + jr .asm_1062b4 + +.asm_1062eb + ldh a, [hPrintNumBuffer + 8] + or c + jr z, .LoadMinusTenIfNegative + ld a, -10 + add c + ld [hl], a + ldh [hPrintNumBuffer + 8], a + ret + +.LoadMinusTenIfNegative: + ldh a, [hPrintNumBuffer + 9] + bit 7, a + ret z + + ld [hl], -10 + ret + +.Function1062ff: + ldh a, [hPrintNumBuffer + 9] + bit 7, a + jr nz, .asm_10630d + bit 6, a + jr z, .asm_10630d + ldh a, [hPrintNumBuffer + 8] + and a + ret z + +.asm_10630d + inc hl + ret + +; functions related to the cable club and various NPC scripts referencing communications + +Mobile_DummyReturnFalse: + xor a + ld [wScriptVar], a + ret + +Stubbed_Function106314: + ret + ld a, BANK(s4_b000) + call OpenSRAM + ld a, c + cpl + ld [s4_b000], a + call CloseSRAM + ld a, BANK(s7_a800) + call OpenSRAM + ld a, c + ld [s7_a800], a + call CloseSRAM + ret + +Mobile_AlwaysReturnNotCarry: + or a + ret + +Function106331: ; unreferenced +; called by Mobile_DummyReturnFalse in JP Crystal + ; check ~[s4_b000] == [s7_a800] + ld a, BANK(s4_b000) + call OpenSRAM + ld a, [s4_b000] + cpl + ld b, a + call CloseSRAM + ld a, BANK(s7_a800) + call OpenSRAM + ld a, [s7_a800] + ld c, a + call CloseSRAM + ld a, c + cp b + jr nz, .nope + + ; check [s7_a800] != 0 + and a + jr z, .nope + + ; check !([s7_a800] & %01110000) + and %10001111 + cp c + jr nz, .nope + + ld c, a + scf + ret + +.nope + xor a + ld c, a + ret + +Function10635c: + ld a, [wMobileCommsJumptableIndex] + bit 7, a + ret nz + ld a, [wMobileCommsJumptableIndex] + ld hl, .Jumptable + rst JumpTable + ret + +.Jumptable: + dw .init + dw Function106392 + dw Function1063cc + dw Function1063d8 + dw Function1063e5 + dw Function1063f3 + dw Function106403 + dw Function106442 + dw Function106453 + +.init: + ld de, wcd30 + ld hl, $41 + ld bc, $41 + ld a, MOBILEAPI_20 + call MobileAPI + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function106392: + xor a + ld [wcf64], a + ld a, [wc821] + bit 1, a + jr nz, .asm_1063a2 + bit 0, a + jr z, .asm_1063bf + ret + +.asm_1063a2 + call Mobile_AlwaysReturnNotCarry + ld a, c + and a + jr nz, .asm_1063b4 + ld a, $b + ld [wcf64], a + ld a, $7 + ld [wMobileCommsJumptableIndex], a + ret + +.asm_1063b4 + ld a, $7 + ld [wcf64], a + ld a, $7 + ld [wMobileCommsJumptableIndex], a + ret + +.asm_1063bf + ld a, $1 + ld [wcf64], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function1063cc: + ld a, $78 + ld [wcd42], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + +Function1063d8: + ld hl, wcd42 + dec [hl] + ret nz + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function1063e5: + ld a, [wcf64] + cp $3 + ret nz + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function1063f3: + ld de, wcd31 + ld a, MOBILEAPI_TELEPHONESTATUS + call MobileAPI + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function106403: + ld a, [wc821] + bit 1, a + jr nz, .asm_106426 + bit 0, a + jr z, .asm_10640f + ret + +.asm_10640f + ld a, [wcd31] + and $80 + ld c, a + ld a, [wcd30] + or c + inc a + ld c, a + call Stubbed_Function106314 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_106426 + call Mobile_AlwaysReturnNotCarry + ld a, c + and a + jr z, .asm_106435 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +.asm_106435 + ld c, $0 + call Stubbed_Function106314 + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + ret + +Function106442: + ld a, MOBILEAPI_1B + call MobileAPI + xor a + ldh [hMobile], a + ldh [hMobileReceive], a + ld a, [wMobileCommsJumptableIndex] + inc a + ld [wMobileCommsJumptableIndex], a + +Function106453: + ld a, [wMobileCommsJumptableIndex] + set 7, a + ld [wMobileCommsJumptableIndex], a + nop + ld a, $4 + ld [wcf64], a + ret + +Stubbed_Function106462: + ret + ret + +Function106464:: + ld de, FontsExtra_SolidBlackGFX + ld hl, vTiles2 tile "■" ; $60 + lb bc, BANK(FontsExtra_SolidBlackGFX), 1 + call Get2bpp + ld de, FontsExtra2_UpArrowGFX + ld hl, vTiles2 tile "▲" ; $61 + lb bc, BANK(FontsExtra2_UpArrowGFX), 1 + call Get2bpp + ld de, MobileDialingFrameGFX + ld hl, vTiles2 tile "☎" ; $62 + ld c, 9 + ld b, BANK(MobileDialingFrameGFX) + call Get2bpp + ld de, $40b0 + ld hl, vTiles2 tile $6b + ld b, $0f ; no graphics at 0f:40b0; JP leftover??? + call Get2bpp + farcall LoadFrame + ret + +Function10649b: ; unreferenced + ld a, [wTextboxFrame] + maskbits NUM_FRAMES + ld bc, TEXTBOX_FRAME_TILES * LEN_1BPP_TILE + ld hl, Frames + call AddNTimes + ld d, h + ld e, l + ld hl, vTiles2 tile "┌" ; $79 + ld c, TEXTBOX_FRAME_TILES ; "┌" to "┘" + ld b, BANK(Frames) + call Function1064c3 + ld hl, vTiles2 tile " " ; $7f + ld de, TextboxSpaceGFX + ld c, 1 + ld b, BANK(TextboxSpaceGFX) + call Function1064c3 + ret + +Function1064c3: + ldh a, [rSVBK] + push af + ld a, $6 + ldh [rSVBK], a + push bc + push hl + ld hl, Function3f88 + ld a, b + rst FarCall + pop hl + pop bc + pop af + ldh [rSVBK], a + jr asm_1064ed + +Function1064d8: ; unreferenced + ldh a, [rSVBK] + push af + ld a, $6 + ldh [rSVBK], a + push bc + push hl + ld hl, Function3f9f + ld a, b + rst FarCall + pop hl + pop bc + pop af + ldh [rSVBK], a + jr asm_1064ed + +asm_1064ed: + ld de, wDecompressScratch + ld b, $0 + ldh a, [rSVBK] + push af + ld a, $6 + ldh [rSVBK], a + ldh a, [rVBK] + push af + ld a, $1 + ldh [rVBK], a + call Get2bpp + pop af + ldh [rVBK], a + pop af + ldh [rSVBK], a + ret + +Function10650a: ; unreferenced + ld de, MobilePhoneTilesGFX + lb bc, BANK(MobilePhoneTilesGFX), 17 + call Get2bpp + ret + +MobileDialingFrameGFX: +INCBIN "gfx/mobile/dialing_frame.2bpp" diff --git a/mobile/mobile_42.asm b/mobile/mobile_42.asm new file mode 100644 index 0000000..2059f85 --- /dev/null +++ b/mobile/mobile_42.asm @@ -0,0 +1,1687 @@ +MACRO add_mobiletradeanim +\1_MobileTradeCmd: + dw \1 +ENDM + +MACRO mobiletradeanim + db (\1_MobileTradeCmd - MobileTradeAnim_JumptableLoop.Jumptable) / 2 +ENDM + +MobileTradeAnimation_SendGivemonToGTS: + ld a, $80 + ld [wcf65], a + ld de, .TradeAnimScript + jp RunMobileTradeAnim_NoFrontpics + +.TradeAnimScript: + mobiletradeanim MobileTradeAnim_ShowPlayerMonForGTS + mobiletradeanim MobileTradeAnim_FadeToBlack + mobiletradeanim MobileTradeAnim_10 + mobiletradeanim MobileTradeAnim_GiveTrademon1 + mobiletradeanim MobileTradeAnim_06 + mobiletradeanim MobileTradeAnim_0f + mobiletradeanim EndMobileTradeAnim + +MobileTradeAnimation_RetrieveGivemonFromGTS: + ld a, $80 + jr asm_108018 + +MobileTradeAnimation_ReceiveGetmonFromGTS: + ld a, $0 +asm_108018: + ld [wcf65], a + ld de, .TradeAnimScript + jp RunMobileTradeAnim_NoFrontpics + +.TradeAnimScript: + mobiletradeanim MobileTradeAnim_11 + mobiletradeanim MobileTradeAnim_07 + mobiletradeanim MobileTradeAnim_GetTrademon1 + mobiletradeanim MobileTradeAnim_ShowOTMonFromGTS + mobiletradeanim EndMobileTradeAnim + +Function108026: + ld a, $0 + jr asm_10802c + +Function10802a: + ld a, $1 + +asm_10802c: + ld [wcf65], a + ld de, .TradeAnimScript + jp RunMobileTradeAnim_Frontpics + +.TradeAnimScript: ; trade + mobiletradeanim MobileTradeAnim_ShowPlayerMonToBeSent + mobiletradeanim MobileTradeAnim_FadeToBlack + mobiletradeanim MobileTradeAnim_02 + mobiletradeanim MobileTradeAnim_GiveTrademon1 + mobiletradeanim MobileTradeAnim_05 + mobiletradeanim MobileTradeAnim_GetTrademon1 + mobiletradeanim MobileTradeAnim_ShowOTMonFromTrade + mobiletradeanim EndMobileTradeAnim + +Function10803d: + ld a, $0 + ld [wcf65], a + ld de, .TradeAnimScript + jp RunMobileTradeAnim_NoFrontpics + +.TradeAnimScript: + mobiletradeanim MobileTradeAnim_11 + mobiletradeanim MobileTradeAnim_07 + mobiletradeanim MobileTradeAnim_GetTrademon1 + mobiletradeanim MobileTradeAnim_GetOddEgg + mobiletradeanim EndMobileTradeAnim + +Function10804d: + ld a, $0 + ld [wcf65], a + ld de, .TradeAnimScript + jp RunMobileTradeAnim_NoFrontpics + +.TradeAnimScript: + mobiletradeanim MobileTradeAnim_11 + mobiletradeanim MobileTradeAnim_ShowOTMonFromGTS + mobiletradeanim EndMobileTradeAnim + +RunMobileTradeAnim_Frontpics: + ld hl, wTradeAnimAddress + ld [hl], e + inc hl + ld [hl], d + ldh a, [hMapAnims] + push af + xor a + ldh [hMapAnims], a + ld hl, wVramState + ld a, [hl] + push af + res 0, [hl] + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + call Function1080b7 +.loop + call MobileTradeAnim_JumptableLoop + jr nc, .loop + pop af + ld [wOptions], a + pop af + ld [wVramState], a + pop af + ldh [hMapAnims], a + ret + +RunMobileTradeAnim_NoFrontpics: + ld hl, wTradeAnimAddress + ld [hl], e + inc hl + ld [hl], d + ldh a, [hMapAnims] + push af + xor a + ldh [hMapAnims], a + ld hl, wVramState + ld a, [hl] + push af + res 0, [hl] + ld hl, wOptions + ld a, [hl] + push af + set NO_TEXT_SCROLL, [hl] + call Function108157 +.loop + call MobileTradeAnim_JumptableLoop + jr nc, .loop + pop af + ld [wOptions], a + pop af + ld [wVramState], a + pop af + ldh [hMapAnims], a + ret + +Function1080b7: + xor a + ld [wJumptableIndex], a + call ClearBGPalettes + call ClearSprites + call ClearTilemap + call DisableLCD + call MobileTradeAnim_ClearTiles + call MobileTradeAnim_ClearBGMap + call LoadStandardFont + call LoadFontsBattleExtra + + ld a, $1 + ldh [rVBK], a + ld hl, MobileTradeGFX + ld de, vTiles2 + call Decompress + + ld a, $0 + ldh [rVBK], a + ld hl, MobileTradeSpritesGFX + ld de, vTiles0 tile $20 + call Decompress + + call EnableLCD + + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + farcall ClearSpriteAnims + + call DelayFrame + + ld de, TradeBallGFX + ld hl, vTiles0 + lb bc, BANK(TradeBallGFX), 6 + call Request2bpp + + ld de, TradePoofGFX + ld hl, vTiles0 tile $06 + lb bc, BANK(TradePoofGFX), 12 + call Request2bpp + + xor a ; SPRITE_ANIM_DICT_DEFAULT + ld hl, wSpriteAnimDict + ld [hli], a + ld [hl], $00 + + ld a, [wPlayerTrademonSpecies] + ld hl, wPlayerTrademonDVs + ld de, vTiles0 tile $30 + call MobileTradeAnim_GetFrontpic + + ld a, [wOTTrademonSpecies] + ld hl, wOTTrademonDVs + ld de, vTiles2 tile $31 + call MobileTradeAnim_GetFrontpic + + ld a, [wPlayerTrademonSpecies] + ld de, wPlayerTrademonSpeciesName + call MobileTradeAnim_InitSpeciesName + + ld a, [wOTTrademonSpecies] + ld de, wOTTrademonSpeciesName + call MobileTradeAnim_InitSpeciesName + + xor a + call Function108b98 + call Function108af4 + ret + +Function108157: + xor a + ld [wJumptableIndex], a + call ClearBGPalettes + call ClearSprites + call ClearTilemap + call DisableLCD + call MobileTradeAnim_ClearTiles + call MobileTradeAnim_ClearBGMap + call LoadStandardFont + call LoadFontsBattleExtra + call EnableLCD + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + farcall ClearSpriteAnims + xor a ; SPRITE_ANIM_DICT_DEFAULT + ld hl, wSpriteAnimDict + ld [hli], a + ld [hl], $00 + call DelayFrame + ld a, [wPlayerTrademonSpecies] + ld de, wPlayerTrademonSpeciesName + call MobileTradeAnim_InitSpeciesName + ld a, [wOTTrademonSpecies] + ld de, wOTTrademonSpeciesName + call MobileTradeAnim_InitSpeciesName + xor a + call Function108b98 + call Function108af4 + ret + +MobileTradeAnim_ClearTiles: + ld a, $1 + ldh [rVBK], a + ld hl, vTiles0 + ld bc, 3 * $80 tiles + xor a + call ByteFill + ld a, $0 + ldh [rVBK], a + ld hl, vTiles0 + ld bc, 3 * $80 tiles + xor a + call ByteFill + ret + +MobileTradeAnim_ClearBGMap: + ld a, $1 + ldh [rVBK], a + hlbgcoord 0, 0 + ld bc, 2 * BG_MAP_HEIGHT * BG_MAP_WIDTH + ld a, $0 + call ByteFill + ld a, $0 + ldh [rVBK], a + hlbgcoord 0, 0 + ld bc, 2 * BG_MAP_HEIGHT * BG_MAP_WIDTH + ld a, $7f + call ByteFill + ret + +MobileTradeAnim_GetFrontpic: + push de + push af + predef GetUnownLetter + pop af + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call GetBaseData + pop de + predef GetMonFrontpic + ret + +Function108201: + push de + push af + predef GetUnownLetter + pop af + ld [wCurPartySpecies], a + ld [wCurSpecies], a + call GetBaseData + pop de + predef GetAnimatedFrontpic + ret + +Function108219: ; unreferenced + ld [wCurPartySpecies], a + hlcoord 7, 2 + ld d, $0 + ld e, ANIM_MON_TRADE + predef AnimateFrontpic + ret + +Function108229: + ld [wCurPartySpecies], a + hlcoord 7, 2 + ld d, $0 + ld e, ANIM_MON_TRADE + predef LoadMonAnimation + ret + +MobileTradeAnim_InitSpeciesName: + push de + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wStringBuffer1 + pop de + ld bc, MON_NAME_LENGTH + call CopyBytes + ret + +MobileTradeAnim_JumptableLoop: + ld a, [wJumptableIndex] + bit 7, a + jr nz, .StopAnim + call .ExecuteMobileTradeAnimCommand + call DelayFrame + and a + ret + +.StopAnim: + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + call LoadStandardFont + call LoadFontsBattleExtra + farcall Stubbed_Function106462 + farcall Function106464 + scf + ret + +.ExecuteMobileTradeAnimCommand: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + add_mobiletradeanim GetMobileTradeAnimByte ; 00 + add_mobiletradeanim MobileTradeAnim_ShowPlayerMonToBeSent ; 01 + add_mobiletradeanim MobileTradeAnim_02 ; 02 + add_mobiletradeanim MobileTradeAnim_GiveTrademon1 ; 03 + add_mobiletradeanim MobileTradeAnim_GiveTrademon2 ; 04 + add_mobiletradeanim MobileTradeAnim_05 ; 05 + add_mobiletradeanim MobileTradeAnim_06 ; 06 + add_mobiletradeanim MobileTradeAnim_07 ; 07 + add_mobiletradeanim MobileTradeAnim_GetTrademon1 ; 08 + add_mobiletradeanim MobileTradeAnim_GetTrademon2 ; 09 + add_mobiletradeanim MobileTradeAnim_GetTrademon3 ; 0a + add_mobiletradeanim MobileTradeAnim_ShowOTMonFromTrade ; 0b + add_mobiletradeanim EndMobileTradeAnim ; 0c + add_mobiletradeanim MobileTradeAnim_ShowPlayerMonForGTS ; 0d + add_mobiletradeanim MobileTradeAnim_ShowOTMonFromGTS ; 0e + add_mobiletradeanim MobileTradeAnim_0f ; 0f + add_mobiletradeanim MobileTradeAnim_10 ; 10 + add_mobiletradeanim MobileTradeAnim_11 ; 11 + add_mobiletradeanim MobileTradeAnim_FadeToBlack ; 12 + add_mobiletradeanim MobileTradeAnim_GetOddEgg ; 13 get odd egg + +MobileTradeAnim_Next: + ld hl, wJumptableIndex + inc [hl] + ret + +GetMobileTradeAnimByte: + ld hl, wTradeAnimAddress + ld e, [hl] + inc hl + ld d, [hl] + ld a, [de] + ld [wJumptableIndex], a + inc de + ld [hl], d + dec hl + ld [hl], e + ret + +EndMobileTradeAnim: + ld hl, wJumptableIndex + set 7, [hl] + ret + +WaitMobileTradeSpriteAnims: +.loop + push bc + farcall PlaySpriteAnimations + pop bc + call DelayFrame + dec c + jr nz, .loop + ret + +Function1082db: +.loop + farcall PlaySpriteAnimations + farcall SetUpPokeAnim + farcall HDMATransferTilemapToWRAMBank3 + jr nc, .loop + ret + +Function1082f0: +.loop + call Function108b78 + call DelayFrame + dec c + jr nz, .loop + ret + +Function1082fa: +.loop + call Function108b78 + push hl + push bc + farcall PlaySpriteAnimations + pop bc + pop hl + call DelayFrame + dec c + jr nz, .loop + ret + +MobileTradeAnim_ShowPlayerMonToBeSent: + ld de, MUSIC_EVOLUTION + call PlayMusic2 + ld a, $80 + ldh [hSCX], a + xor a + ldh [hSCY], a + ld a, $87 + ldh [hWX], a + ld a, $50 + ldh [hWY], a + call MobileTradeAnim_DisplayMonToBeSent + ld a, [wPlayerTrademonSpecies] + ld [wCurPartySpecies], a + call Function10895e + ld a, [wPlayerTrademonDVs] + ld [wTempMonDVs], a + ld a, [wPlayerTrademonDVs + 1] + ld [wTempMonDVs + 1], a + ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbBGPals + call WaitBGMap +.loop + ldh a, [hWX] + cp $7 + jr z, .okay + sub $4 + ldh [hWX], a + ldh a, [hSCX] + sub $4 + ldh [hSCX], a + call DelayFrame + jr .loop + +.okay + ld a, $7 + ldh [hWX], a + xor a + ldh [hSCX], a + ld a, [wPlayerTrademonSpecies] + call GetCryIndex + jr c, .skip_cry + ld e, c + ld d, b + call PlayCry + +.skip_cry + ld c, 80 + call DelayFrames + call Function108bec + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL + call InitSpriteAnimStruct + ld de, SFX_BALL_POOF + call PlaySFX + hlcoord 0, 0 + ld bc, 12 * SCREEN_WIDTH + ld a, " " + call ByteFill + ld c, 80 + call WaitMobileTradeSpriteAnims + call GetMobileTradeAnimByte + ret + +MobileTradeAnim_ShowOTMonFromTrade: + call ClearBGPalettes + call ClearSprites + call ClearTilemap + call DisableLCD + call MobileTradeAnim_ClearBGMap + ld a, [wOTTrademonSpecies] + ld [wCurPartySpecies], a + ld hl, wOTTrademonDVs + ld de, vTiles2 + call Function108201 + call EnableLCD + farcall DeinitializeAllSprites + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL + call InitSpriteAnimStruct + call Function108b45 + ld a, $1 + call Function108b98 + call Function108af4 + ld c, 48 + call WaitMobileTradeSpriteAnims + ld de, SFX_BALL_POOF + call PlaySFX + call MobileTradeAnim_DisplayReceivedMon + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $50 + ldh [hWY], a + ld a, [wOTTrademonSpecies] + ld [wCurPartySpecies], a + ld a, [wOTTrademonDVs] + ld [wTempMonDVs], a + ld a, [wOTTrademonDVs + 1] + ld [wTempMonDVs + 1], a + ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbBGPals + call Function108963 + ld a, [wOTTrademonSpecies] + call Function108229 + call Function1082db + call Function108c16 + call GetMobileTradeAnimByte + ret + +MobileTradeAnim_ShowPlayerMonForGTS: + ld de, MUSIC_EVOLUTION + call PlayMusic2 + ld a, $80 + ldh [hSCX], a + xor a + ldh [hSCY], a + ld a, $87 + ldh [hWX], a + ld a, $50 + ldh [hWY], a + call MobileTradeAnim_DisplayMonToBeSent + ld a, [wPlayerTrademonSpecies] + ld [wCurPartySpecies], a + ld hl, wPlayerTrademonDVs + call Function10898a + call DelayFrame + ld de, TradeBallGFX + ld hl, vTiles0 + lb bc, BANK(TradeBallGFX), 6 + call Request2bpp + ld de, TradePoofGFX + ld hl, vTiles0 tile $06 + lb bc, BANK(TradePoofGFX), 12 + call Request2bpp + ld a, [wPlayerTrademonDVs] + ld [wTempMonDVs], a + ld a, [wPlayerTrademonDVs + 1] + ld [wTempMonDVs + 1], a + ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbBGPals + call WaitBGMap +.loop + ldh a, [hWX] + cp $7 + jr z, .done + sub $4 + ldh [hWX], a + ldh a, [hSCX] + sub $4 + ldh [hSCX], a + call DelayFrame + jr .loop + +.done + ld a, $7 + ldh [hWX], a + xor a + ldh [hSCX], a + ld a, [wPlayerTrademonSpecies] + call GetCryIndex + jr c, .skip_cry + ld e, c + ld d, b + call PlayCry + +.skip_cry + ld c, 80 + call DelayFrames + call Function108c2b + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_BALL + call InitSpriteAnimStruct + ld de, SFX_BALL_POOF + call PlaySFX + hlcoord 0, 0 + ld bc, 12 * SCREEN_WIDTH + ld a, " " + call ByteFill + ld c, 80 + call WaitMobileTradeSpriteAnims + call GetMobileTradeAnimByte + ret + +MobileTradeAnim_ShowOTMonFromGTS: + call ClearBGPalettes + call ClearSprites + call ClearTilemap + call DisableLCD + call MobileTradeAnim_ClearBGMap + ld a, [wOTTrademonSpecies] + ld [wCurPartySpecies], a + ld hl, wOTTrademonDVs + ld de, vTiles2 + call Function108201 + call EnableLCD + farcall DeinitializeAllSprites + call DelayFrame + ld de, TradeBallGFX + ld hl, vTiles0 + lb bc, BANK(TradeBallGFX), 6 + call Request2bpp + ld de, TradePoofGFX + ld hl, vTiles0 tile $06 + lb bc, BANK(TradePoofGFX), 12 + call Request2bpp + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL + call InitSpriteAnimStruct + call Function108b45 + ld a, $1 + call Function108b98 + call Function108af4 + ld c, 48 + call WaitMobileTradeSpriteAnims + ld de, SFX_BALL_POOF + call PlaySFX + call MobileTradeAnim_DisplayReceivedMon + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $50 + ldh [hWY], a + ld a, [wOTTrademonSpecies] + ld [wCurPartySpecies], a + ld a, [wOTTrademonDVs] + ld [wTempMonDVs], a + ld a, [wOTTrademonDVs + 1] + ld [wTempMonDVs + 1], a + ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbBGPals + ld a, [wOTTrademonSpecies] + ld hl, wOTTrademonDVs + call Function10898a + ld a, [wOTTrademonSpecies] + call Function108229 + call Function1082db + call Function108c40 + call GetMobileTradeAnimByte + ret + +MobileTradeAnim_GetOddEgg: + call ClearBGPalettes + call ClearSprites + call ClearTilemap + call DisableLCD + call MobileTradeAnim_ClearBGMap + ld a, [wOTTrademonSpecies] + ld [wCurPartySpecies], a + ld hl, wOTTrademonDVs + ld de, vTiles2 + call Function108201 + call EnableLCD + farcall DeinitializeAllSprites + call DelayFrame + ld de, TradeBallGFX + ld hl, vTiles0 + lb bc, BANK(TradeBallGFX), 6 + call Request2bpp + ld de, TradePoofGFX + ld hl, vTiles0 tile $06 + lb bc, BANK(TradePoofGFX), 12 + call Request2bpp + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_BALL + call InitSpriteAnimStruct + call Function108b45 + ld a, $1 + call Function108b98 + call Function108af4 + ld c, 48 + call WaitMobileTradeSpriteAnims + ld de, SFX_BALL_POOF + call PlaySFX + call Function108a33 + xor a + ldh [hSCX], a + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $50 + ldh [hWY], a + ld a, [wOTTrademonSpecies] + ld [wCurPartySpecies], a + ld a, [wOTTrademonDVs] + ld [wTempMonDVs], a + ld a, [wOTTrademonDVs + 1] + ld [wTempMonDVs + 1], a + ld b, SCGB_PLAYER_OR_MON_FRONTPIC_PALS + call GetSGBLayout + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbBGPals + ld a, [wOTTrademonSpecies] + ld hl, wOTTrademonDVs + call Function10898a + ld a, [wOTTrademonSpecies] + call Function108229 + call Function1082db + call GetMobileTradeAnimByte + ret + +MobileTradeAnim_02: + farcall DeinitializeAllSprites + call ClearBGPalettes + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + call DisableLCD + call MobileTradeAnim_ClearBGMap + call Function108c80 + call Function108c6d + call EnableLCD + ld a, $c + ldh [hSCX], a + ld a, $78 + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, MobileTradeBGPalettes + ld de, wBGPals1 + ld bc, 8 palettes + call CopyBytes + pop af + ldh [rSVBK], a + call LoadMobileAdapterPalette + call Function108af4 + call GetMobileTradeAnimByte + ret + +MobileTradeAnim_10: + farcall DeinitializeAllSprites + call ClearBGPalettes + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + call DisableLCD + call MobileTradeAnim_ClearBGMap + ld a, $1 + ldh [rVBK], a + ld hl, MobileTradeGFX + ld de, vTiles2 + call Decompress + ld a, $0 + ldh [rVBK], a + ld hl, MobileTradeSpritesGFX + ld de, vTiles0 tile $20 + call Decompress + call Function108c80 + call Function108c6d + call EnableLCD + ld a, $c + ldh [hSCX], a + ld a, $78 + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, MobileTradeBGPalettes + ld de, wBGPals1 + ld bc, 8 palettes + call CopyBytes + pop af + ldh [rSVBK], a + call LoadMobileAdapterPalette + call Function108af4 + call GetMobileTradeAnimByte + ret + +MobileTradeAnim_11: + call ClearBGPalettes + call ClearSprites + call ClearTilemap + xor a + ldh [hBGMapMode], a + call DisableLCD + ld a, $1 + ldh [rVBK], a + ld hl, MobileTradeGFX + ld de, vTiles2 + call Decompress + ld a, $0 + ldh [rVBK], a + ld hl, MobileTradeSpritesGFX + ld de, vTiles0 tile $20 + call Decompress + call Function108c80 + call Function108c6d + call EnableLCD + ld a, $80 + ldh [hSCX], a + ld a, $90 + ldh [hSCY], a + ld a, $7 + ldh [hWX], a + ld a, $90 + ldh [hWY], a + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, MobileTradeBGPalettes + ld de, wBGPals1 + ld bc, 8 palettes + call CopyBytes + pop af + ldh [rSVBK], a + call LoadMobileAdapterPalette + call Function108af4 + call Function108b5a + ld a, $e0 + ldh [hSCX], a + ld de, MUSIC_EVOLUTION + call PlayMusic2 + call GetMobileTradeAnimByte + ret + +MobileTradeAnim_GiveTrademon1: + ld de, SFX_GIVE_TRADEMON + call PlaySFX + ld c, 40 + ld hl, wBGPals2 palette 6 + call Function1082f0 + call Function108af4 +.loop + ldh a, [hSCX] + cp $e0 + jr z, .loop2 + dec a + dec a + ldh [hSCX], a + cp $f8 + jr nz, .next + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE + call InitSpriteAnimStruct + +.next + ld c, 1 + call WaitMobileTradeSpriteAnims + jr .loop + +.loop2 + ldh a, [hSCY] + cp $f8 + jr z, .done + dec a + dec a + ldh [hSCY], a + cp $40 + jr z, .init + cp $30 + jr z, .delete + cp $68 + jr z, .replace + jr .next2 + +.init + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE + call InitSpriteAnimStruct + xor a + call Function108ad4 + jr .next2 + +.delete + call MobileTradeAnim_DeleteSprites + jr .next2 + +.replace + call MobileTradeAnim_DeleteSprites + ld a, $1 + call Function108ad4 +.next2 + ld c, 1 + call WaitMobileTradeSpriteAnims + jr .loop2 + +.done + call MobileTradeAnim_Next + ret + +MobileTradeAnim_GiveTrademon2: + ld c, 40 + ld hl, wBGPals2 + 1 palettes + call Function1082f0 + call Function108af4 + call Function108b5a + depixel 9, 10, 2, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_PING + call InitSpriteAnimStruct + ld de, SFX_FORESIGHT + call PlaySFX + ld c, 10 + call WaitMobileTradeSpriteAnims + xor a + ld [wcf64], a + depixel 9, 10, 2, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_SENT_PULSE + call InitSpriteAnimStruct +.loop + ldh a, [hSCY] + cp $90 + jr z, .done + sub $8 + ldh [hSCY], a + ld c, 1 + call WaitMobileTradeSpriteAnims + jr .loop + +.done + call GetMobileTradeAnimByte + ret + +MobileTradeAnim_05: + ld c, 40 + call WaitMobileTradeSpriteAnims + ld a, $1 + ld [wcf64], a + ld de, SFX_SHARPEN + call PlaySFX + ld c, 60 + call WaitMobileTradeSpriteAnims + depixel 30, 10, 2, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_PULSE + call InitSpriteAnimStruct + call GetMobileTradeAnimByte + ld de, SFX_THROW_BALL + call PlaySFX + ret + +MobileTradeAnim_06: + ld c, 40 + call WaitMobileTradeSpriteAnims + ld a, $1 + ld [wcf64], a + ld de, SFX_SHARPEN + call PlaySFX + call GetMobileTradeAnimByte + ret + +MobileTradeAnim_07: + ld c, 80 + call DelayFrames + depixel 30, 10, 2, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_OT_PULSE + call InitSpriteAnimStruct + call GetMobileTradeAnimByte + ld de, SFX_THROW_BALL + call PlaySFX + ret + +MobileTradeAnim_GetTrademon1: + ld c, 40 + call WaitMobileTradeSpriteAnims +.loop + ldh a, [hSCY] + cp $f8 + jr z, .done + add $8 + ldh [hSCY], a + ld c, 1 + call WaitMobileTradeSpriteAnims + jr .loop + +.done + farcall DeinitializeAllSprites + depixel 9, 10, 2, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_PING + call InitSpriteAnimStruct + ld de, SFX_GLASS_TING_2 + call PlaySFX + call Function108af4 + call MobileTradeAnim_Next + ret + +MobileTradeAnim_GetTrademon2: + ld c, 20 + ld hl, wBGPals2 + 1 palettes + call Function1082fa + ld de, SFX_GIVE_TRADEMON + call PlaySFX + ld c, 20 + ld hl, wBGPals2 + 1 palettes + call Function1082fa + call Function108af4 +.asm_1088ad + ldh a, [hSCY] + cp $78 + jr z, .asm_1088ee + inc a + inc a + ldh [hSCY], a + cp $30 + jr z, .asm_1088c5 + cp $40 + jr z, .asm_1088dd + cp $68 + jr z, .asm_1088cf + jr .asm_1088e7 + +.asm_1088c5 + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE + call InitSpriteAnimStruct + jr .asm_1088e7 + +.asm_1088cf + depixel 10, 11, 4, 0 + ld a, SPRITE_ANIM_INDEX_MOBILE_TRADE_CABLE_BULGE + call InitSpriteAnimStruct + xor a + call Function108ad4 + jr .asm_1088e7 + +.asm_1088dd + call MobileTradeAnim_DeleteSprites + ld a, $1 + call Function108ad4 + jr .asm_1088e7 + +.asm_1088e7 + ld c, 1 + call WaitMobileTradeSpriteAnims + jr .asm_1088ad + +.asm_1088ee + ldh a, [hSCX] + cp $c + jr z, .asm_108906 + inc a + inc a + ldh [hSCX], a + cp -8 + jr nz, .asm_1088e7 + call MobileTradeAnim_DeleteSprites + ld c, 1 + call WaitMobileTradeSpriteAnims + jr .asm_1088ee + +.asm_108906 + call MobileTradeAnim_Next + ret + +MobileTradeAnim_GetTrademon3: + ld c, 40 + ld hl, wBGPals2 palette 6 + call Function1082f0 + call Function108af4 + call GetMobileTradeAnimByte + ret + +MobileTradeAnim_0f: + ld c, 40 + call WaitMobileTradeSpriteAnims + farcall DeinitializeAllSprites + call ClearBGPalettes + call ClearSprites + call ClearTilemap + call DisableLCD + call MobileTradeAnim_ClearTiles + call MobileTradeAnim_ClearBGMap + call EnableLCD + call GetMobileTradeAnimByte + ret + +MobileTradeAnim_FadeToBlack: +.loop + ldh a, [rBGP] + and a + jr z, .blank + sla a + sla a + call DmgToCgbBGPals + call DmgToCgbObjPal0 + ld c, 4 + call DelayFrames + jr .loop + +.blank + xor a + call DmgToCgbBGPals + call DmgToCgbObjPal0 + call GetMobileTradeAnimByte + ret + +Function10895e: + ld de, vTiles0 tile $30 + jr asm_108966 + +Function108963: + ld de, vTiles2 tile $31 +asm_108966: + call DelayFrame + ld hl, vTiles2 + lb bc, BANK(TradeGameBoyLZ), $31 + call Request2bpp + call WaitTop + call MobileTradeAnim_ClearTilemap + hlcoord 7, 2 + xor a + ldh [hGraphicStartTile], a + lb bc, 7, 7 + predef PlaceGraphic + call WaitBGMap + ret + +Function10898a: + ld de, vTiles2 + call MobileTradeAnim_GetFrontpic + call WaitTop + call MobileTradeAnim_ClearTilemap + hlcoord 7, 2 + xor a + ldh [hGraphicStartTile], a + lb bc, 7, 7 + predef PlaceGraphic + call WaitBGMap + ret + +MobileTradeAnim_DisplayMonToBeSent: + ld de, wPlayerTrademonSpecies + ld a, [de] + cp EGG + jr z, MobileTradeAnim_DisplayEggData + call MobileTradeAnim_LoadMonTemplate + ld de, wPlayerTrademonSpecies + call MobileTradeAnim_MonDisplay_PrintSpeciesNumber + ld de, wPlayerTrademonSpeciesName + call MobileTradeAnim_MonDisplay_PrintSpeciesName + ld a, [wPlayerTrademonCaughtData] + ld de, wPlayerTrademonOTName + call MobileTradeAnim_MonDisplay_PrintOTNameAndGender + ld de, wPlayerTrademonID + call MobileTradeAnim_MonDisplay_PrintIDNumber + call MobileTradeAnim_MonDisplay_UpdateBGMap + ret + +MobileTradeAnim_DisplayReceivedMon: + ld de, wOTTrademonSpecies + ld a, [de] + cp EGG + jr z, MobileTradeAnim_DisplayEggData + call MobileTradeAnim_LoadMonTemplate + ld de, wOTTrademonSpecies + call MobileTradeAnim_MonDisplay_PrintSpeciesNumber + ld de, wOTTrademonSpeciesName + call MobileTradeAnim_MonDisplay_PrintSpeciesName + ld a, [wOTTrademonCaughtData] + ld de, wOTTrademonOTName + call MobileTradeAnim_MonDisplay_PrintOTNameAndGender + ld de, wOTTrademonID + call MobileTradeAnim_MonDisplay_PrintIDNumber + call MobileTradeAnim_MonDisplay_UpdateBGMap + ret + +MobileTradeAnim_DisplayEggData: + call WaitTop + call MobileTradeAnim_ClearTilemap + ld a, HIGH(vBGMap1) + ldh [hBGMapAddress + 1], a + hlcoord 5, 0 + ld b, 6 + ld c, 9 + call Textbox + hlcoord 6, 2 + ld de, .EggTemplate + call PlaceString + call MobileTradeAnim_MonDisplay_UpdateBGMap + ret + +.EggTemplate: + db "タマゴ" + next "おや/?????" + next "?????" + db "@" + +Function108a33: + call WaitTop + call MobileTradeAnim_ClearTilemap + ld a, HIGH(vBGMap1) + ldh [hBGMapAddress + 1], a + hlcoord 5, 0 + ld b, 6 + ld c, 9 + call Textbox + hlcoord 7, 4 + ld de, .OddEgg + call PlaceString + call MobileTradeAnim_MonDisplay_UpdateBGMap + ret + +.OddEgg: + db "なぞのタマゴ@" + +MobileTradeAnim_LoadMonTemplate: + call WaitTop + call MobileTradeAnim_ClearTilemap + ld a, HIGH(vBGMap1) + ldh [hBGMapAddress + 1], a + hlcoord 4, 0 + ld b, 6 + ld c, 10 + call Textbox + hlcoord 5, 0 + ld de, .MonTemplate + call PlaceString + ret + +.MonTemplate: + db "─ №" + next "" + next "おや/" + next "" + db "@" + +MobileTradeAnim_MonDisplay_UpdateBGMap: + call WaitBGMap + call WaitTop + ld a, HIGH(vBGMap0) + ldh [hBGMapAddress + 1], a + ret + +MobileTradeAnim_MonDisplay_PrintSpeciesNumber: + hlcoord 9, 0 + lb bc, PRINTNUM_LEADINGZEROS | 1, 3 + call PrintNum + ret + +MobileTradeAnim_MonDisplay_PrintSpeciesName: + hlcoord 5, 2 + call PlaceString + ret + +MobileTradeAnim_MonDisplay_PrintOTNameAndGender: + cp $3 + jr c, .got_gender + xor a +.got_gender + push af + hlcoord 8, 4 + call PlaceString + inc bc + pop af + ld hl, .GenderChars + ld d, 0 + ld e, a + add hl, de + ld a, [hl] + ld [bc], a + ret + +.GenderChars: + db " " + db "♂" + db "♀" + +MobileTradeAnim_MonDisplay_PrintIDNumber: + hlcoord 8, 6 + lb bc, PRINTNUM_LEADINGZEROS | 2, 5 + call PrintNum + ret + +MobileTradeAnim_ClearTilemap: + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + ld a, " " + call ByteFill + ret + +Function108ad4: + and a + jr z, .asm_108adc + ld de, MobileCable2GFX + jr .asm_108adf + +.asm_108adc + ld de, MobileCable1GFX +.asm_108adf + ld a, $1 + ldh [rVBK], a + ld hl, vTiles2 tile $4a + lb bc, BANK(MobileCable1GFX), 16 ; aka BANK(MobileCable2GFX) + call Get2bppViaHDMA + call DelayFrame + ld a, $0 + ldh [rVBK], a + ret + +Function108af4: + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld a, [wcf65] + and $1 + jr z, .copy_MobileTradeOB1Palettes + ld hl, MobileTradeOB2Palettes + ld de, wOBPals1 + ld bc, 8 palettes + call CopyBytes + ld hl, MobileTradeOB2Palettes + ld de, wOBPals2 + ld bc, 8 palettes + call CopyBytes + jr .done_copy + +.copy_MobileTradeOB1Palettes + ld hl, MobileTradeOB1Palettes + ld de, wOBPals1 + ld bc, 8 palettes + call CopyBytes + ld hl, MobileTradeOB1Palettes + ld de, wOBPals2 + ld bc, 8 palettes + call CopyBytes + +.done_copy + pop af + ldh [rSVBK], a + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbObjPal0 + ld a, %11100100 ; 3,2,1,0 + call DmgToCgbBGPals + call DelayFrame + ret + +Function108b45: + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld de, PALRGB_WHITE + ld hl, wBGPals1 + ld a, e + ld [hli], a + ld d, a + ld [hli], a + pop af + ldh [rSVBK], a + ret + +Function108b5a: + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld de, palred 18 + palgreen 31 + palblue 15 + ld hl, wBGPals2 + 4 palettes + ld c, $10 +.loop + ld a, e + ld [hli], a + ld a, d + ld [hli], a + dec c + jr nz, .loop + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +Function108b78: + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld a, c + and $2 + jr z, .Orange + ld de, PALRGB_WHITE + jr .load_pal + +.Orange: + ld de, palred 31 + palgreen 15 + palblue 1 +.load_pal + ld a, e + ld [hli], a + ld a, d + ld [hld], a + pop af + ldh [rSVBK], a + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +Palette_108b98: +; removed + +Function108b98: + ld d, a + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld a, [wcf65] + and $1 + xor d + jr z, .asm_108bad + ld hl, Palette_108b98 + 1 palettes + jr .asm_108bb0 + +.asm_108bad + ld hl, Palette_108b98 +.asm_108bb0 + ld de, wBGPals1 + 7 palettes + ld bc, 8 palettes + call CopyBytes + pop af + ldh [rSVBK], a + ret + +MobileTradeAnim_DeleteSprites: + farcall DeinitializeAllSprites + call ClearSprites + ret + +MobileTradeAnim_AnimateSentPulse: + ld a, [wcf64] + and a + ret z + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + cp -1 * 8 - 6 + jr z, .delete + sub 1 * 8 + ld [hl], a + ret + +.delete + farcall DeinitializeSprite + ret + +MobileTradeAnim_AnimateOTPulse: + ld hl, SPRITEANIMSTRUCT_YCOORD + add hl, bc + ld a, [hl] + cp 9 * 8 + 2 + ret z + add 1 * 8 + ld [hl], a + ret + +Function108bec: + ld a, $90 + ldh [hWY], a + ld hl, .MobilePlayerWillTradeMonText + call PrintText + ld c, 80 + call DelayFrames + ld hl, .MobileForPartnersMonText + call PrintText + ld c, 80 + call DelayFrames + ret + +.MobilePlayerWillTradeMonText: + text_far _MobilePlayerWillTradeMonText + text_end + +.MobileForPartnersMonText: + text_far _MobileForPartnersMonText + text_end + +.MobilePlayersMonTradeText: ; unreferenced + text_far _MobilePlayersMonTradeText + text_end + +Function108c16: + ld a, $90 + ldh [hWY], a + ld hl, .MobileTakeGoodCareOfMonText + call PrintText + ld c, 80 + call DelayFrames + ret + +.MobileTakeGoodCareOfMonText: + text_far _MobileTakeGoodCareOfMonText + text_end + +Function108c2b: + ld a, $90 + ldh [hWY], a + ld hl, .MobilePlayersMonTrade2Text + call PrintText + ld c, 80 + call DelayFrames + ret + +.MobilePlayersMonTrade2Text: + text_far _MobilePlayersMonTrade2Text + text_end + +Function108c40: + ld a, $90 + ldh [hWY], a + ld a, [wcf65] + and %10000000 + jr z, .Getmon + ld hl, .MobileTradeCameBackText + call PrintText + ld c, 80 + call DelayFrames + ret + +.Getmon: + ld hl, .MobileTakeGoodCareOfText + call PrintText + ld c, 80 + call DelayFrames + ret + +.MobileTakeGoodCareOfText: + text_far _MobileTakeGoodCareOfText + text_end + +.MobileTradeCameBackText: + text_far _MobileTradeCameBackText + text_end + +Function108c6d: + ld hl, MobileTradeTilemapLZ + debgcoord 0, 0 + call Decompress + ld hl, MobileTradeTilemapLZ + debgcoord 0, 0, vBGMap1 + call Decompress + ret + +Function108c80: + ld a, $1 + ldh [rVBK], a + ld hl, MobileTradeAttrmapLZ + debgcoord 0, 0 + call Decompress + ld hl, MobileTradeAttrmapLZ + debgcoord 0, 0, vBGMap1 + call Decompress + ld a, $0 + ldh [rVBK], a + ret + +LoadMobileAdapterPalette: + ld a, [wc74e] + and $7f + cp $8 ; CONST: Amount of mobile adapters + jr c, .asm_108d12 + ld a, $7 + +.asm_108d12 + ld bc, 1 palettes + ld hl, MobileAdapterPalettes + call AddNTimes + ld a, BANK(wBGPals1) + ld de, wBGPals1 + 4 palettes + ld bc, 1 palettes + call FarCopyWRAM + ret + +MobileTradeSpritesGFX: +INCBIN "gfx/mobile/mobile_trade_sprites.2bpp.lz" + +MobileTradeGFX: +INCBIN "gfx/mobile/mobile_trade.2bpp.lz" + +MobileTradeTilemapLZ: +INCBIN "gfx/mobile/mobile_trade.tilemap.lz" + +MobileTradeAttrmapLZ: +INCBIN "gfx/mobile/mobile_trade.attrmap.lz" + +UnusedMobilePulsePalettes: ; unreferenced +INCLUDE "gfx/mobile/unused_mobile_pulses.pal" + +MobileTradeBGPalettes: +INCLUDE "gfx/mobile/mobile_trade_bg.pal" + +MobileTradeOB1Palettes: +INCLUDE "gfx/mobile/mobile_trade_ob1.pal" + +MobileTradeOB2Palettes: +INCLUDE "gfx/mobile/mobile_trade_ob2.pal" + +MobileCable1GFX: +INCBIN "gfx/mobile/mobile_cable_1.2bpp" + +MobileCable2GFX: +INCBIN "gfx/mobile/mobile_cable_2.2bpp" + +MobileAdapterPalettes: +INCLUDE "gfx/mobile/mobile_adapters.pal" diff --git a/mobile/mobile_45_2.asm b/mobile/mobile_45_2.asm new file mode 100644 index 0000000..82f2cc7 --- /dev/null +++ b/mobile/mobile_45_2.asm @@ -0,0 +1,1369 @@ +Function116567: + ld hl, wc3f7 + dec [hl] + ret nz + ld hl, wc3f6 + inc [hl] +.asm_116570 + ld a, $7 + sla a + ld c, a + ld b, 0 + ld hl, Unknown_1167eb + add hl, bc + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + push de + pop hl + ld a, [wc3f6] + sla a + ld c, a + ld b, 0 + add hl, bc + ld a, [hli] + cp $fe + jr nz, .asm_116595 + xor a + ld [wc3f6], a + jr .asm_116570 + +.asm_116595 + ld [wc3f5], a + ld a, [hl] + ld [wc3f7], a + ret + +Function11659d: + ld a, [wc314] + cp $12 + ret nc + ld e, a + ld d, 0 + ld hl, Jumptable_1165af + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +Jumptable_1165af: + dw Function11677e + dw Function1165d5 + dw Function1165d8 + dw Function1165e3 + dw Function1165f5 + dw Function116600 + dw Function116615 + dw Function116618 + dw Function116623 + dw Function116635 + dw Function116640 + dw Function116655 + dw Function11665c + dw Function11668d + dw Function11669f + dw Function1166a2 + dw Function1166c4 + dw Function1166d6 + dw Function1166d6 + +Function1165d5: + call Function11678e + +Function1165d8: + ld a, $0 + ld c, a + ld a, $ff + ld b, a + ld a, $a8 + call Function1166f4 + +Function1165e3: + call Function116747 + ld a, [wc30e] + cp $e8 + ret nz + ld a, $1 + call Function116780 + ret c + jp Function116797 + +Function1165f5: + ld a, $1 + ld c, a + ld a, $1 + ld b, a + ld a, $e8 + call Function1166f4 + +Function116600: + call Function116747 + ld a, [wc30e] + cp $a8 + ret nz + ld a, $1 + call Function116780 + ret c + ld a, $2 + ld [wc314], a + ret + +Function116615: + call Function11678e + +Function116618: + ld a, $3 + ld c, a + ld a, $1 + ld b, a + ld a, $28 + call Function11671f + +Function116623: + call Function116747 + ld a, [wc30f] + cp $a0 + ret nz + ld a, $6 + call Function116780 + ret c + jp Function116797 + +Function116635: + ld a, $2 + ld c, a + ld a, $ff + ld b, a + ld a, $a0 + call Function11671f + +Function116640: + call Function116747 + ld a, [wc30f] + cp $28 + ret nz + ld a, $6 + call Function116780 + ret c + ld a, $7 + ld [wc314], a + ret + +Function116655: + xor a + ld [wc314 + 3], a + call Function11678e + +Function11665c: + ld hl, wc314 + 3 + ld a, $1 + xor [hl] + ld [hl], a + add $4 + ld c, a + call Function11679c + ld a, [wc314 + 3] + and a + jr nz, .asm_116673 + ld a, $48 + jr .asm_116675 + +.asm_116673 + ld a, $78 + +.asm_116675 + ld [wc30f], a + call Random + ldh a, [hRandomAdd] + and $7 + sla a + sla a + sla a + add $30 + ld [wc30e], a + call Function116797 + +Function11668d: + ld a, [wc311] + cp $ff + ret nz + ld a, $b + call Function116780 + ret c + ld a, $c + ld [wc314], a + ret + +Function11669f: + call Function11678e + +Function1166a2: + ld a, $a8 + ld [wc30e], a + ld [wc3f1], a + ld a, $60 + ld [wc30f], a + ld [wc3f3], a + ld a, $ff + ld [wc314 + 2], a + xor a + ld [wc314 + 3], a + ld a, $0 + ld c, a + call Function11679c + call Function116797 + +Function1166c4: + call Function116747 + ld a, [wc30e] + cp $58 + ret nz + ld a, $6 + ld c, a + call Function11679c + call Function116797 + +Function1166d6: + call Function116747 + ld a, [wc30e] + cp $48 + jr nz, .asm_1166e4 + xor a + ld [wc314 + 2], a + +.asm_1166e4 + ld a, [wc311] + cp $ff + ret nz + ld a, $4 + ld [wc319], a + xor a + ld [wc314], a + ret + +Function1166f4: + ld [wc30e], a + ld a, b + ld [wc314 + 2], a + xor a + ld [wc314 + 3], a + ld hl, wc30f +.asm_116702 + call Random + ldh a, [hRandomAdd] + and $7 + jr z, .asm_11670c + dec a + +.asm_11670c + sla a + sla a + sla a + add $48 + cp [hl] + jr z, .asm_116702 + ld [hl], a + call Function11679c + call Function116797 + ret + +Function11671f: + ld [wc30f], a + ld a, b + ld [wc314 + 3], a + xor a + ld [wc314 + 2], a + ld hl, wc30e +.asm_11672d + call Random + ldh a, [hRandomAdd] + and $7 + sla a + sla a + sla a + add $30 + cp [hl] + jr z, .asm_11672d + ld [hl], a + call Function11679c + call Function116797 + ret + +Function116747: + ld hl, wc30e + ld a, [wc314 + 2] + add [hl] + ld [hl], a + ld hl, wc30f + ld a, [wc314 + 3] + add [hl] + ld [hl], a + ret + +Function116758: + ld a, [wc30f] + cp $30 + jr c, .asm_116770 + jr z, .asm_116770 + cp $38 + jr c, .asm_116774 + jr z, .asm_116774 + cp $40 + jr c, .asm_116778 + jr z, .asm_116778 + xor a + jr .asm_11677a + +.asm_116770 + ld a, $c + jr .asm_11677a + +.asm_116774 + ld a, $8 + jr .asm_11677a + +.asm_116778 + ld a, $4 + +.asm_11677a + ld [wc314 + 4], a + ret + +Function11677e: + ld a, $0 + +Function116780: + ld hl, wc314 + 1 + cp [hl] + jr z, .asm_11678c + ld a, [hl] + ld [wc314], a + scf + ret + +.asm_11678c + and a + ret + +Function11678e: + ld hl, wc314 + ld a, [hl] + ld [wc314 + 1], a + inc [hl] + ret + +Function116797: + ld hl, wc314 + inc [hl] + ret + +Function11679c: + ld a, c + ld [wc311], a + xor a + ld [wc312], a + jr asm_1167af + +Function1167a6: + ld hl, wc313 + dec [hl] + ret nz + ld hl, wc312 + inc [hl] + +asm_1167af: + ld a, [wc311] + cp $ff + ret z + sla a + ld c, a + ld b, 0 + ld hl, Unknown_1167eb + add hl, bc + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + push de + pop hl + ld a, [wc312] + sla a + ld c, a + ld b, 0 + add hl, bc + ld a, [hli] + cp $ff + jr z, .asm_1167dc + cp $fe + jr nz, .asm_1167e3 + xor a + ld [wc312], a + jr asm_1167af + +.asm_1167dc + ld a, $ff + ld [wc311], a + ld a, $fd + +.asm_1167e3 + ld [wc310], a + ld a, [hl] + ld [wc313], a + ret + +Unknown_1167eb: + dw Unknown_1167fb + dw Unknown_116808 + dw Unknown_116867 + dw Unknown_116870 + dw Unknown_116815 + dw Unknown_11683e + dw Unknown_116881 + dw Unknown_1168ae + +Unknown_1167fb: + db $0, $6 + db $1, $4 + db $2, $4 + db $3, $6 + db $2, $4 + db $1, $4 + db $fe + +Unknown_116808: + db $4, $6 + db $5, $4 + db $6, $4 + db $7, $6 + db $6, $4 + db $5, $4 + db $fe + +Unknown_116815: + db $fd, $20 + db $8, $c + db $9, $24 + db $a, $4 + db $b, $8 + db $a, $4 + db $9, $6 + db $c, $4 + db $d, $8 + db $c, $5 + db $9, $24 + db $a, $4 + db $b, $8 + db $a, $4 + db $9, $6 + db $c, $4 + db $d, $8 + db $c, $5 + db $9, $8 + db $8, $4 + db -1 ; end + +Unknown_11683e: + db $fd, $20 + db $e, $c + db $f, $24 + db $10, $4 + db $11, $8 + db $10, $4 + db $f, $6 + db $12, $4 + db $13, $8 + db $12, $5 + db $f, $24 + db $10, $4 + db $11, $8 + db $10, $4 + db $f, $6 + db $12, $4 + db $13, $8 + db $12, $5 + db $f, $8 + db $e, $4 + db -1 ; end + +Unknown_116867: + db $14, $8 + db $15, $8 + db $16, $8 + db $15, $8 + db $fe + +Unknown_116870: + db $17, $5 + db $18, $5 + db $19, $5 + db $1a, $5 + db $1b, $5 + db $1a, $5 + db $19, $5 + db $18, $5 + db $fe + +Unknown_116881: + db $1c, $7 + db $1d, $7 + db $1e, $a + db $1f, $a + db $20, $5 + db $21, $5 + db $20, $5 + db $21, $5 + db $20, $18 + db $22, $4 + db $23, $2 + db $22, $2 + db $23, $2 + db $22, $1 + db $23, $1 + db $22, $1 + db $23, $4 + db $fd, $1 + db $23, $1 + db $fd, $2 + db $23, $2 + db $fd, $40 + db -1 ; end + +Unknown_1168ae: + db $24, $4 + db $25, $4 + db $26, $4 + db $27, $4 + db $28, $4 + db $29, $4 + db $2a, $4 + db $2b, $4 + db $2c, $4 + db $2d, $4 + db $2e, $4 + db $fe + +Unknown_1168c5: + dw Unknown_116923 + dw Unknown_116960 + dw Unknown_1169a1 + dw Unknown_1169de + dw Unknown_116a1b + dw Unknown_116a58 + dw Unknown_116a99 + dw Unknown_116ad6 + dw Unknown_116d1b + dw Unknown_116d4c + dw Unknown_116d85 + dw Unknown_116dbe + dw Unknown_116df7 + dw Unknown_116e30 + dw Unknown_116e69 + dw Unknown_116e9a + dw Unknown_116ed3 + dw Unknown_116f0c + dw Unknown_116f45 + dw Unknown_116f7e + dw Unknown_116b13 + dw Unknown_116b54 + dw Unknown_116b95 + dw Unknown_116bd6 + dw Unknown_116c17 + dw Unknown_116c58 + dw Unknown_116c99 + dw Unknown_116cda + dw Unknown_116fb7 + dw Unknown_116fec + dw Unknown_117025 + dw Unknown_117056 + dw Unknown_117083 + dw Unknown_1170c0 + dw Unknown_1170fd + dw Unknown_11713a + dw Unknown_117177 + dw Unknown_11719c + dw Unknown_1171c1 + dw Unknown_1171e6 + dw Unknown_11720b + dw Unknown_117230 + dw Unknown_117255 + dw Unknown_11727a + dw Unknown_11729f + dw Unknown_1172c4 + dw Unknown_1172e9 + +Unknown_116923: + db $f + db $0, $0, $1, $a + db $0, $8, $2, $d + db $0, $10, $3, $d + db $0, $18, $4, $d + db $8, $0, $11, $a + db $8, $8, $12, $a + db $8, $10, $13, $a + db $8, $18, $14, $d + db $10, $0, $21, $a + db $10, $8, $22, $a + db $10, $10, $23, $a + db $10, $18, $24, $a + db $18, $0, $31, $a + db $18, $8, $32, $a + db $18, $10, $33, $a + +Unknown_116960: + db $10 + db $1, $0, $1, $a + db $1, $8, $2, $d + db $1, $10, $3, $d + db $1, $18, $4, $d + db $9, $0, $11, $a + db $9, $8, $12, $a + db $9, $10, $13, $a + db $9, $18, $14, $d + db $11, $0, $5, $a + db $11, $8, $6, $a + db $11, $10, $7, $a + db $11, $18, $34, $a + db $19, $0, $15, $a + db $19, $8, $16, $a + db $19, $10, $17, $a + db $19, $18, $35, $a + +Unknown_1169a1: + db $f + db $1, $0, $1, $a + db $1, $8, $2, $d + db $1, $10, $3, $d + db $1, $18, $4, $d + db $9, $0, $11, $a + db $9, $8, $12, $a + db $9, $10, $13, $a + db $9, $18, $14, $d + db $11, $0, $25, $a + db $11, $8, $26, $a + db $11, $10, $27, $a + db $11, $18, $34, $a + db $19, $8, $36, $a + db $19, $10, $37, $a + db $19, $18, $35, $a + +Unknown_1169de: + db $f + db $0, $0, $1, $a + db $0, $8, $2, $d + db $0, $10, $3, $d + db $0, $18, $4, $d + db $8, $0, $11, $a + db $8, $8, $12, $a + db $8, $10, $13, $a + db $8, $18, $14, $d + db $10, $0, $10, $a + db $10, $8, $20, $a + db $10, $10, $30, $a + db $10, $18, $24, $a + db $18, $0, $31, $a + db $18, $8, $32, $a + db $18, $10, $33, $a + +Unknown_116a1b: + db $f + db $0, $0, $4, $2d + db $0, $8, $3, $2d + db $0, $10, $2, $2d + db $0, $18, $1, $2a + db $8, $0, $14, $2d + db $8, $8, $13, $2a + db $8, $10, $12, $2a + db $8, $18, $11, $2a + db $10, $0, $24, $2a + db $10, $8, $23, $2a + db $10, $10, $22, $2a + db $10, $18, $21, $2a + db $18, $8, $33, $2a + db $18, $10, $32, $2a + db $18, $18, $31, $2a + +Unknown_116a58: + db $10 + db $1, $0, $4, $2d + db $1, $8, $3, $2d + db $1, $10, $2, $2d + db $1, $18, $1, $2a + db $9, $0, $14, $2d + db $9, $8, $13, $2a + db $9, $10, $12, $2a + db $9, $18, $11, $2a + db $11, $0, $34, $2a + db $11, $8, $7, $2a + db $11, $10, $6, $2a + db $11, $18, $5, $2a + db $19, $0, $35, $2a + db $19, $8, $17, $2a + db $19, $10, $16, $2a + db $19, $18, $15, $2a + +Unknown_116a99: + db $f + db $1, $0, $4, $2d + db $1, $8, $3, $2d + db $1, $10, $2, $2d + db $1, $18, $1, $2a + db $9, $0, $14, $2d + db $9, $8, $13, $2a + db $9, $10, $12, $2a + db $9, $18, $11, $2a + db $11, $0, $34, $2a + db $11, $8, $27, $2a + db $11, $10, $26, $2a + db $11, $18, $25, $2a + db $19, $0, $35, $2a + db $19, $8, $37, $2a + db $19, $10, $36, $2a + +Unknown_116ad6: + db $f + db $0, $0, $4, $2d + db $0, $8, $3, $2d + db $0, $10, $2, $2d + db $0, $18, $1, $2a + db $8, $0, $14, $2d + db $8, $8, $13, $2a + db $8, $10, $12, $2a + db $8, $18, $11, $2a + db $10, $0, $24, $2a + db $10, $8, $30, $2a + db $10, $10, $20, $2a + db $10, $18, $10, $2a + db $18, $8, $33, $2a + db $18, $10, $32, $2a + db $18, $18, $31, $2a + +Unknown_116b13: + db $10 + db $18, $0, $0, $b + db $18, $8, $8, $b + db $18, $10, $5c, $b + db $18, $18, $0, $b + db $10, $0, $0, $b + db $10, $8, $5d, $b + db $10, $10, $5e, $b + db $10, $18, $0, $b + db $8, $0, $50, $b + db $8, $8, $51, $b + db $8, $10, $52, $b + db $8, $18, $50, $2b + db $0, $0, $43, $b + db $0, $8, $44, $b + db $0, $10, $44, $2b + db $0, $18, $43, $2b + +Unknown_116b54: + db $10 + db $19, $0, $0, $b + db $19, $8, $18, $b + db $19, $10, $c, $b + db $19, $18, $0, $b + db $11, $0, $42, $b + db $11, $8, $3a, $b + db $11, $10, $3a, $2b + db $11, $18, $42, $2b + db $9, $0, $58, $b + db $9, $8, $45, $b + db $9, $10, $45, $2b + db $9, $18, $58, $2b + db $1, $0, $d, $b + db $1, $8, $44, $b + db $1, $10, $44, $2b + db $1, $18, $d, $2b + +Unknown_116b95: + db $10 + db $18, $0, $0, $b + db $18, $8, $5c, $2b + db $18, $10, $8, $2b + db $18, $18, $0, $b + db $10, $0, $0, $b + db $10, $8, $5e, $2b + db $10, $10, $5d, $2b + db $10, $18, $0, $b + db $8, $0, $50, $b + db $8, $8, $52, $2b + db $8, $10, $51, $2b + db $8, $18, $50, $2b + db $0, $0, $43, $b + db $0, $8, $44, $b + db $0, $10, $44, $2b + db $0, $18, $43, $2b + +Unknown_116bd6: + db $10 + db $18, $0, $0, $a + db $18, $8, $56, $a + db $18, $10, $57, $a + db $18, $18, $0, $a + db $10, $0, $64, $a + db $10, $8, $4a, $a + db $10, $10, $4b, $a + db $10, $18, $71, $a + db $8, $0, $54, $a + db $8, $8, $55, $a + db $8, $10, $55, $2a + db $8, $18, $54, $2a + db $0, $0, $48, $a + db $0, $8, $49, $a + db $0, $10, $49, $2a + db $0, $18, $48, $2a + +Unknown_116c17: + db $10 + db $19, $0, $0, $a + db $19, $8, $76, $a + db $19, $10, $77, $a + db $19, $18, $0, $a + db $11, $0, $64, $a + db $11, $8, $69, $a + db $11, $10, $6a, $a + db $11, $18, $6b, $a + db $9, $0, $6f, $a + db $9, $8, $70, $a + db $9, $10, $70, $2a + db $9, $18, $6f, $2a + db $1, $0, $63, $a + db $1, $8, $19, $a + db $1, $10, $19, $2a + db $1, $18, $63, $2a + +Unknown_116c58: + db $10 + db $1a, $0, $6c, $a + db $1a, $8, $6d, $a + db $1a, $10, $6e, $a + db $1a, $18, $0, $a + db $12, $0, $5f, $a + db $12, $8, $60, $a + db $12, $10, $61, $a + db $12, $18, $62, $a + db $a, $0, $53, $a + db $a, $8, $55, $a + db $a, $10, $55, $2a + db $a, $18, $53, $2a + db $2, $0, $46, $a + db $2, $8, $47, $a + db $2, $10, $47, $2a + db $2, $18, $46, $2a + +Unknown_116c99: + db $10 + db $19, $0, $0, $2a + db $19, $8, $77, $2a + db $19, $10, $76, $2a + db $19, $18, $0, $2a + db $11, $0, $6b, $2a + db $11, $8, $6a, $2a + db $11, $10, $69, $2a + db $11, $18, $64, $2a + db $9, $0, $6f, $a + db $9, $8, $70, $a + db $9, $10, $70, $2a + db $9, $18, $6f, $2a + db $1, $0, $63, $a + db $1, $8, $19, $a + db $1, $10, $19, $2a + db $1, $18, $63, $2a + +Unknown_116cda: + db $10 + db $18, $0, $0, $a + db $18, $8, $57, $2a + db $18, $10, $56, $2a + db $18, $18, $0, $a + db $10, $0, $71, $2a + db $10, $8, $4b, $2a + db $10, $10, $4a, $2a + db $10, $18, $64, $2a + db $8, $0, $54, $a + db $8, $8, $55, $a + db $8, $10, $55, $2a + db $8, $18, $54, $2a + db $0, $0, $48, $a + db $0, $8, $49, $a + db $0, $10, $49, $2a + db $0, $18, $48, $2a + +Unknown_116d1b: + db $c + db $0, $0, $38, $4a + db $0, $8, $39, $4a + db $0, $10, $39, $6a + db $0, $18, $38, $6a + db $8, $0, $28, $4a + db $8, $8, $29, $4a + db $8, $10, $29, $6a + db $8, $18, $28, $6a + db $10, $0, $9, $4d + db $10, $8, $19, $4a + db $10, $10, $19, $6a + db $10, $18, $9, $6d + +Unknown_116d4c: + db $e + db $0, $8, $3b, $4a + db $0, $10, $3b, $6a + db $8, $0, $2a, $4a + db $8, $8, $2b, $4a + db $8, $10, $2b, $6a + db $8, $18, $2a, $6a + db $10, $0, $1a, $4a + db $10, $8, $1b, $4a + db $10, $10, $1b, $6a + db $10, $18, $1a, $6a + db $18, $0, $a, $4a + db $18, $8, $b, $4a + db $18, $10, $b, $6a + db $18, $18, $a, $6a + +Unknown_116d85: + db $e + db $0, $0, $35, $2a + db $0, $8, $3c, $4a + db $0, $10, $3d, $4a + db $0, $18, $3e, $4a + db $8, $0, $2c, $4a + db $8, $8, $2d, $4a + db $8, $10, $2e, $4a + db $8, $18, $2f, $4a + db $10, $0, $1c, $4a + db $10, $8, $1d, $4a + db $10, $10, $1e, $4d + db $10, $18, $1f, $4d + db $18, $10, $e, $4d + db $18, $18, $f, $4a + +Unknown_116dbe: + db $e + db $0, $0, $65, $4a + db $0, $8, $66, $4a + db $0, $10, $67, $4a + db $0, $18, $68, $4a + db $8, $8, $59, $4a + db $8, $10, $5a, $4a + db $8, $18, $5b, $4a + db $10, $0, $4c, $4a + db $10, $8, $4d, $4d + db $10, $10, $4e, $4d + db $10, $18, $4f, $4a + db $18, $0, $3f, $4d + db $18, $8, $40, $4d + db $18, $10, $41, $4d + +Unknown_116df7: + db $e + db $0, $0, $3e, $6a + db $0, $8, $3d, $6a + db $0, $10, $3c, $6a + db $0, $18, $35, $a + db $8, $0, $2f, $6a + db $8, $8, $2e, $6a + db $8, $10, $2d, $6a + db $8, $18, $2c, $6a + db $10, $0, $1f, $6d + db $10, $8, $1e, $6d + db $10, $10, $1d, $6a + db $10, $18, $1c, $6a + db $18, $0, $f, $6a + db $18, $8, $e, $6d + +Unknown_116e30: + db $e + db $0, $0, $68, $6a + db $0, $8, $67, $6a + db $0, $10, $66, $6a + db $0, $18, $65, $6a + db $8, $0, $5b, $6a + db $8, $8, $5a, $6a + db $8, $10, $59, $6a + db $10, $0, $4f, $6a + db $10, $8, $4e, $6d + db $10, $10, $4d, $6d + db $10, $18, $4c, $6a + db $18, $8, $41, $6d + db $18, $10, $40, $6d + db $18, $18, $3f, $6d + +Unknown_116e69: + db $c + db $8, $0, $9, $d + db $8, $8, $19, $a + db $8, $10, $19, $2a + db $8, $18, $9, $2d + db $10, $0, $28, $a + db $10, $8, $29, $a + db $10, $10, $29, $2a + db $10, $18, $28, $2a + db $18, $0, $38, $a + db $18, $8, $39, $a + db $18, $10, $39, $2a + db $18, $18, $38, $2a + +Unknown_116e9a: + db $e + db $0, $0, $a, $a + db $0, $8, $b, $a + db $0, $10, $b, $2a + db $0, $18, $a, $2a + db $8, $0, $1a, $a + db $8, $8, $1b, $a + db $8, $10, $1b, $2a + db $8, $18, $1a, $2a + db $10, $0, $2a, $a + db $10, $8, $2b, $a + db $10, $10, $2b, $2a + db $10, $18, $2a, $2a + db $18, $8, $3b, $a + db $18, $10, $3b, $2a + +Unknown_116ed3: + db $e + db $0, $10, $e, $d + db $0, $18, $f, $a + db $8, $0, $1c, $a + db $8, $8, $1d, $a + db $8, $10, $1e, $d + db $8, $18, $1f, $d + db $10, $0, $2c, $a + db $10, $8, $2d, $a + db $10, $10, $2e, $a + db $10, $18, $2f, $a + db $18, $0, $35, $6a + db $18, $8, $3c, $a + db $18, $10, $3d, $a + db $18, $18, $3e, $a + +Unknown_116f0c: + db $e + db $0, $0, $3f, $d + db $0, $8, $40, $d + db $0, $10, $41, $d + db $8, $0, $4c, $a + db $8, $8, $4d, $d + db $8, $10, $4e, $d + db $8, $18, $4f, $a + db $10, $8, $59, $a + db $10, $10, $5a, $a + db $10, $18, $5b, $a + db $18, $0, $65, $a + db $18, $8, $66, $a + db $18, $10, $67, $a + db $18, $18, $68, $a + +Unknown_116f45: + db $e + db $0, $0, $f, $2a + db $0, $8, $e, $2d + db $8, $0, $1f, $2d + db $8, $8, $1e, $2d + db $8, $10, $1d, $2a + db $8, $18, $1c, $2a + db $10, $0, $2f, $2a + db $10, $8, $2e, $2a + db $10, $10, $2d, $2a + db $10, $18, $2c, $2a + db $18, $0, $3e, $2a + db $18, $8, $3d, $2a + db $18, $10, $3c, $2a + db $18, $18, $35, $4a + +Unknown_116f7e: + db $e + db $0, $8, $41, $2d + db $0, $10, $40, $2d + db $0, $18, $3f, $2d + db $8, $0, $4f, $2a + db $8, $8, $4e, $2d + db $8, $10, $4d, $2d + db $8, $18, $4c, $2a + db $10, $0, $5b, $2a + db $10, $8, $5a, $2a + db $10, $10, $59, $2a + db $18, $0, $68, $2a + db $18, $8, $67, $2a + db $18, $10, $66, $2a + db $18, $18, $65, $2a + +Unknown_116fb7: + db $d + db $fa, $0, $72, $a + db $fa, $8, $73, $d + db $fa, $10, $74, $d + db $fa, $18, $75, $d + db $2, $0, $81, $a + db $2, $8, $82, $a + db $2, $10, $83, $a + db $2, $18, $84, $a + db $a, $0, $91, $a + db $a, $8, $92, $a + db $a, $10, $93, $a + db $a, $18, $94, $a + db $12, $10, $a3, $a + +Unknown_116fec: + db $e + db $fd, $0, $85, $d + db $fd, $8, $86, $d + db $5, $0, $95, $d + db $5, $8, $96, $a + db $5, $10, $97, $a + db $5, $18, $98, $a + db $d, $0, $a5, $a + db $d, $8, $a6, $a + db $d, $10, $a7, $a + db $d, $18, $a8, $a + db $15, $0, $b3, $a + db $15, $8, $b4, $a + db $15, $10, $b5, $a + db $15, $18, $b6, $a + +Unknown_117025: + db $c + db $8, $0, $79, $d + db $8, $8, $7a, $d + db $8, $10, $7b, $a + db $8, $18, $7c, $a + db $10, $0, $89, $d + db $10, $8, $8a, $a + db $10, $10, $8b, $a + db $10, $18, $8c, $a + db $18, $0, $99, $a + db $18, $8, $9a, $a + db $18, $10, $9b, $a + db $18, $18, $9c, $a + +Unknown_117056: + db $b + db $8, $0, $7d, $a + db $8, $8, $7e, $d + db $8, $10, $7f, $d + db $8, $18, $80, $a + db $10, $0, $8d, $a + db $10, $8, $8e, $a + db $10, $10, $8f, $a + db $10, $18, $90, $a + db $18, $8, $9e, $a + db $18, $10, $9f, $a + db $18, $18, $a0, $a + +Unknown_117083: + db $f + db $0, $0, $a1, $a + db $0, $8, $a2, $a + db $0, $10, $a2, $2a + db $0, $18, $a1, $2a + db $8, $0, $b1, $a + db $8, $8, $b2, $d + db $8, $10, $b2, $2d + db $8, $18, $b1, $2a + db $10, $0, $ab, $a + db $10, $8, $ac, $a + db $10, $10, $ac, $2a + db $10, $18, $ab, $2a + db $18, $8, $a4, $a + db $18, $10, $87, $a + db $18, $18, $88, $a + +Unknown_1170c0: + db $f + db $0, $0, $a1, $a + db $0, $8, $a2, $d + db $0, $10, $a2, $2a + db $0, $18, $a1, $2a + db $8, $0, $b1, $a + db $8, $8, $78, $d + db $8, $10, $78, $2d + db $8, $18, $b1, $2a + db $10, $0, $ab, $a + db $10, $8, $ac, $a + db $10, $10, $ac, $2a + db $10, $18, $ab, $2a + db $18, $8, $a4, $a + db $18, $10, $87, $a + db $18, $18, $88, $a + +Unknown_1170fd: + db $f + db $0, $0, $a9, $a + db $0, $8, $aa, $a + db $0, $10, $aa, $2a + db $0, $18, $a9, $2a + db $8, $0, $b7, $a + db $8, $8, $b8, $a + db $8, $10, $b8, $2a + db $8, $18, $b7, $2a + db $10, $0, $ab, $a + db $10, $8, $ac, $a + db $10, $10, $ac, $2a + db $10, $18, $ad, $a + db $18, $8, $a4, $a + db $18, $10, $ba, $a + db $18, $18, $bb, $a + +Unknown_11713a: + db $f + db $0, $0, $ae, $c + db $0, $8, $af, $c + db $0, $10, $af, $2c + db $0, $18, $ae, $2c + db $8, $0, $bc, $c + db $8, $8, $bd, $c + db $8, $10, $bd, $2c + db $8, $18, $bc, $2c + db $10, $0, $bf, $c + db $10, $8, $9d, $c + db $10, $10, $9d, $2c + db $10, $18, $b0, $c + db $18, $8, $b9, $c + db $18, $10, $c0, $c + db $18, $18, $be, $c + +Unknown_117177: + db $9 + db $14, $0, $1f, $6 + db $14, $8, $20, $6 + db $14, $10, $21, $6 + db $c, $0, $10, $6 + db $c, $8, $11, $6 + db $c, $10, $12, $6 + db $4, $0, $1, $6 + db $4, $8, $2, $6 + db $4, $10, $3, $6 + +Unknown_11719c: + db $9 + db $14, $0, $22, $6 + db $14, $8, $23, $6 + db $14, $10, $24, $6 + db $c, $0, $13, $6 + db $c, $8, $14, $6 + db $c, $10, $15, $6 + db $4, $0, $4, $6 + db $4, $8, $5, $6 + db $4, $10, $6, $6 + +Unknown_1171c1: + db $9 + db $14, $0, $25, $6 + db $14, $8, $26, $6 + db $14, $10, $27, $6 + db $c, $0, $16, $6 + db $c, $8, $17, $6 + db $c, $10, $18, $6 + db $4, $0, $7, $6 + db $4, $8, $8, $6 + db $4, $10, $9, $6 + +Unknown_1171e6: + db $9 + db $14, $0, $28, $6 + db $14, $8, $29, $6 + db $14, $10, $2a, $6 + db $c, $0, $19, $6 + db $c, $8, $1a, $6 + db $c, $10, $1b, $6 + db $4, $0, $a, $6 + db $4, $8, $b, $6 + db $4, $10, $c, $6 + +Unknown_11720b: + db $9 + db $14, $0, $2b, $6 + db $14, $8, $2c, $6 + db $14, $10, $2d, $6 + db $c, $0, $1c, $6 + db $c, $8, $1d, $6 + db $c, $10, $1e, $6 + db $4, $0, $d, $6 + db $4, $8, $e, $6 + db $4, $10, $f, $6 + +Unknown_117230: + db $9 + db $14, $0, $47, $6 + db $14, $8, $48, $6 + db $14, $10, $49, $6 + db $c, $0, $3b, $6 + db $c, $8, $3c, $6 + db $c, $10, $3b, $26 + db $4, $0, $2e, $6 + db $4, $8, $2f, $6 + db $4, $10, $30, $6 + +Unknown_117255: + db $9 + db $14, $0, $35, $6 + db $14, $8, $4a, $6 + db $14, $10, $35, $6 + db $c, $0, $3d, $6 + db $c, $8, $35, $6 + db $c, $10, $3d, $26 + db $4, $0, $31, $6 + db $4, $8, $32, $6 + db $4, $10, $31, $26 + +Unknown_11727a: + db $9 + db $14, $0, $4b, $6 + db $14, $8, $4c, $6 + db $14, $10, $4d, $6 + db $c, $0, $3e, $6 + db $c, $8, $3f, $6 + db $c, $10, $40, $6 + db $4, $0, $33, $6 + db $4, $8, $34, $6 + db $4, $10, $35, $6 + +Unknown_11729f: + db $9 + db $14, $0, $4e, $6 + db $14, $8, $4f, $6 + db $14, $10, $50, $6 + db $c, $0, $41, $6 + db $c, $8, $42, $6 + db $c, $10, $43, $6 + db $4, $0, $35, $6 + db $4, $8, $36, $6 + db $4, $10, $37, $6 + +Unknown_1172c4: + db $9 + db $14, $0, $51, $6 + db $14, $8, $52, $6 + db $14, $10, $35, $6 + db $c, $0, $44, $6 + db $c, $8, $45, $6 + db $c, $10, $46, $6 + db $4, $0, $38, $6 + db $4, $8, $39, $6 + db $4, $10, $3a, $6 + +Unknown_1172e9: + db $9 + db $10, $0, $0, $2 + db $10, $8, $0, $2 + db $10, $10, $0, $2 + db $8, $0, $0, $2 + db $8, $8, $0, $2 + db $c, $10, $1f, $6 + db $0, $0, $0, $2 + db $0, $8, $0, $2 + db $4, $10, $10, $6 + +PichuBorderMobileOBPalettes: +INCLUDE "gfx/mobile/pichu_border_ob.pal" + +PichuBorderMobileBGPalettes: +INCLUDE "gfx/mobile/pichu_border_bg.pal" + +PichuBorderMobileTilemapAttrmap: +INCBIN "gfx/mobile/pichu_border.tilemap" +INCBIN "gfx/mobile/pichu_border.attrmap" diff --git a/mobile/mobile_45_sprite_engine.asm b/mobile/mobile_45_sprite_engine.asm new file mode 100644 index 0000000..6a0cb09 --- /dev/null +++ b/mobile/mobile_45_sprite_engine.asm @@ -0,0 +1,877 @@ +Function115d99: + ld de, MobileDialingGFX + ld hl, vTiles0 tile $60 + lb bc, BANK(MobileDialingGFX), 20 + call Get2bpp + xor a + ld [wc305], a + ld [wc306], a + ld [wc309], a + ld [wc30a], a + ld [wc30b], a + ld [wc30c], a + ld a, $10 + ld [wc307], a + ld a, $18 + ld [wc308], a + ret + +Function115dc3: + xor a + ld [wc305], a + ld a, $a0 + ld hl, wShadowOAMSprite31 + ld bc, 8 * SPRITEOAMSTRUCT_LENGTH + call ByteFill + ret + +Function115dd3: + ld a, [wc305] + and a + ret z + ld a, $a0 + ld hl, wShadowOAMSprite31 + ld bc, 8 * SPRITEOAMSTRUCT_LENGTH + call ByteFill + call Function115e22 + ld a, [wc309] + sla a + ld c, a + ld b, 0 + ld hl, Unknown_115e86 + add hl, bc + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + push de + pop hl + ld de, wShadowOAMSprite31 + ld a, [wc307] + ld c, a + ld a, [wc308] + ld b, a + ld a, [hli] +.asm_115e04 + push af + ld a, [hli] + add b + ld [de], a ; y + inc de + ld a, [hli] + add c + ld [de], a ; x + inc de + ld a, [hli] + ld [de], a ; tile id + inc de + ld a, [hli] + ld [de], a ; attributes + inc de + pop af + dec a + jr nz, .asm_115e04 + ret + +Function115e18: + ld a, c + ld [wc30a], a + xor a + ld [wc30b], a + jr Function115e2b + +Function115e22: + ld hl, wc30c + dec [hl] + ret nz + ld hl, wc30b + inc [hl] + +Function115e2b: + ld a, [wc30a] + sla a + ld c, a + ld b, 0 + ld hl, Unknown_115e59 + add hl, bc + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + push de + pop hl + ld a, [wc30b] + sla a + ld c, a + ld b, 0 + add hl, bc + ld a, [hli] + cp $ff + jr nz, .not_end + xor a + ld [wc30b], a + jr Function115e2b + +.not_end + ld [wc309], a + ld a, [hl] + ld [wc30c], a + ret + +Unknown_115e59: + dw Unknown_115e61 + dw Unknown_115e6c + dw Unknown_115e76 + dw Unknown_115e79 + +; OAM idx (see Unknown_115e86), flip flags/duration +Unknown_115e61: + db $04, $08 + db $05, $08 + db $06, $08 + db $07, $08 + db $08, $08 + db -1 + +Unknown_115e6c: + db $01, $08 + db $02, $08 + db $03, $08 + db $09, $08 + db $0a, $08 +Unknown_115e76: + db $00, $08 + db -1 + +Unknown_115e79: + db $0b, $08 + db $0c, $08 + db $0d, $08 + db $0e, $08 + db $0f, $08 + db $00, $08 + db -1 + +Unknown_115e86: + dw Unknown_115ea6 + dw Unknown_115eb7 + dw Unknown_115ecc + dw Unknown_115ee1 + dw Unknown_115ef6 + dw Unknown_115f13 + dw Unknown_115f30 + dw Unknown_115f4d + dw Unknown_115f6a + dw Unknown_115f87 + dw Unknown_115f9c + dw Unknown_115fb1 + dw Unknown_115fc6 + dw Unknown_115fdb + dw Unknown_115ff0 + dw Unknown_116005 + +Unknown_115ea6: + db 4 + dbsprite 0, 1, 0, 0, $60, $01 + dbsprite 1, 1, 0, 0, $61, $01 + dbsprite 0, 2, 0, 0, $62, $01 + dbsprite 1, 2, 0, 0, $63, $01 + +Unknown_115eb7: + db 5 + dbsprite 1, 0, 0, 0, $64, $00 + dbsprite 0, 1, 0, 0, $60, $01 + dbsprite 1, 1, 0, 0, $61, $01 + dbsprite 0, 2, 0, 0, $62, $01 + dbsprite 1, 2, 0, 0, $63, $01 + +Unknown_115ecc: + db 5 + dbsprite 1, 0, 0, 0, $65, $00 + dbsprite 0, 1, 0, 0, $60, $01 + dbsprite 1, 1, 0, 0, $61, $01 + dbsprite 0, 2, 0, 0, $62, $01 + dbsprite 1, 2, 0, 0, $63, $01 + +Unknown_115ee1: + db 5 + dbsprite 1, 0, 0, 0, $66, $00 + dbsprite 0, 1, 0, 0, $60, $01 + dbsprite 1, 1, 0, 0, $61, $01 + dbsprite 0, 2, 0, 0, $62, $01 + dbsprite 1, 2, 0, 0, $63, $01 + +Unknown_115ef6: + db 7 + dbsprite 0, 0, 0, 0, $67, $01 + dbsprite 0, 1, 0, 0, $68, $01 + dbsprite 0, 2, 0, 0, $6d, $00 + dbsprite 1, 2, 0, 0, $69, $00 + dbsprite 2, 2, 0, 0, $6a, $00 + dbsprite 1, 3, 0, 0, $6b, $00 + dbsprite 2, 3, 0, 0, $6c, $00 + +Unknown_115f13: + db 7 + dbsprite 0, 0, 0, 0, $67, $01 + dbsprite 0, 1, 0, 0, $68, $01 + dbsprite 0, 2, 0, 0, $6e, $00 + dbsprite 1, 2, 0, 0, $69, $00 + dbsprite 2, 2, 0, 0, $6a, $00 + dbsprite 1, 3, 0, 0, $6b, $00 + dbsprite 2, 3, 0, 0, $6c, $00 + +Unknown_115f30: + db 7 + dbsprite 0, 0, 0, 0, $67, $01 + dbsprite 0, 1, 0, 0, $68, $01 + dbsprite 0, 2, 0, 0, $6f, $00 + dbsprite 1, 2, 0, 0, $69, $00 + dbsprite 2, 2, 0, 0, $6a, $00 + dbsprite 1, 3, 0, 0, $6b, $00 + dbsprite 2, 3, 0, 0, $6c, $00 + +Unknown_115f4d: + db 7 + dbsprite 0, 0, 0, 0, $67, $01 + dbsprite 0, 1, 0, 0, $68, $01 + dbsprite 0, 2, 0, 0, $70, $00 + dbsprite 1, 2, 0, 0, $69, $00 + dbsprite 2, 2, 0, 0, $6a, $00 + dbsprite 1, 3, 0, 0, $6b, $00 + dbsprite 2, 3, 0, 0, $6c, $00 + +Unknown_115f6a: + db 7 + dbsprite 0, 0, 0, 0, $67, $01 + dbsprite 0, 1, 0, 0, $68, $01 + dbsprite 0, 2, 0, 0, $71, $00 + dbsprite 1, 2, 0, 0, $69, $00 + dbsprite 2, 2, 0, 0, $6a, $00 + dbsprite 1, 3, 0, 0, $6b, $00 + dbsprite 2, 3, 0, 0, $6c, $00 + +Unknown_115f87: + db 5 + dbsprite 1, 0, 0, 0, $72, $00 + dbsprite 0, 1, 0, 0, $60, $01 + dbsprite 1, 1, 0, 0, $61, $01 + dbsprite 0, 2, 0, 0, $62, $01 + dbsprite 1, 2, 0, 0, $63, $01 + +Unknown_115f9c: + db 5 + dbsprite 1, 0, 0, 0, $73, $00 + dbsprite 0, 1, 0, 0, $60, $01 + dbsprite 1, 1, 0, 0, $61, $01 + dbsprite 0, 2, 0, 0, $62, $01 + dbsprite 1, 2, 0, 0, $63, $01 + +Unknown_115fb1: + db 5 + dbsprite 1, 0, 0, 1, $64, $60 + dbsprite 0, 1, 0, 0, $60, $01 + dbsprite 1, 1, 0, 0, $61, $01 + dbsprite 0, 2, 0, 0, $62, $01 + dbsprite 1, 2, 0, 0, $63, $01 + +Unknown_115fc6: + db 5 + dbsprite 1, 0, 0, 1, $65, $60 + dbsprite 0, 1, 0, 0, $60, $01 + dbsprite 1, 1, 0, 0, $61, $01 + dbsprite 0, 2, 0, 0, $62, $01 + dbsprite 1, 2, 0, 0, $63, $01 + +Unknown_115fdb: + db 5 + dbsprite 1, 0, 0, 1, $66, $60 + dbsprite 0, 1, 0, 0, $60, $01 + dbsprite 1, 1, 0, 0, $61, $01 + dbsprite 0, 2, 0, 0, $62, $01 + dbsprite 1, 2, 0, 0, $63, $01 + +Unknown_115ff0: + db 5 + dbsprite 1, 0, 0, 1, $72, $60 + dbsprite 0, 1, 0, 0, $60, $01 + dbsprite 1, 1, 0, 0, $61, $01 + dbsprite 0, 2, 0, 0, $62, $01 + dbsprite 1, 2, 0, 0, $63, $01 + +Unknown_116005: + db 5 + dbsprite 1, 0, 0, 1, $73, $60 + dbsprite 0, 1, 0, 0, $60, $01 + dbsprite 1, 1, 0, 0, $61, $01 + dbsprite 0, 2, 0, 0, $62, $01 + dbsprite 1, 2, 0, 0, $63, $01 + +MobileDialingGFX:: +INCBIN "gfx/mobile/dialing.2bpp" + +Function11615a: + xor a + ld [wc30d], a + ld [wc319], a + ld [wc310], a + ld [wc311], a + ld [wc312], a + ld [wc313], a + ld [wc314], a + ld [wc314 + 1], a + ld [wc314 + 4], a + ld [wc3f6], a + ld [wc3f8], a + ld [wc3f2], a + ld [wc3f4], a + ld a, $24 + ld [wc3f5], a + ld a, $7 + ld [wc3f7], a + ld a, $b0 + ld [wc30e], a + ld [wc3f1], a + ld a, $48 + ld [wc30f], a + ld [wc3f3], a + ret + +Function11619d: + ld a, [wc30d] + and a + ret z + ld a, [wc319] + cp $2 + jr c, .asm_1161b4 + ld a, $a0 + ld hl, wShadowOAM + ld bc, 25 * SPRITEOAMSTRUCT_LENGTH + call ByteFill + +.asm_1161b4 + call Function1161b8 + ret + +Function1161b8: + jumptable .Jumptable, wc319 + +.Jumptable: + dw Function1161d5 + dw Function116294 + dw Function1162cb + dw Function1162f2 + dw Function1163c0 + dw Function11636e + dw Function116441 + +Function1161d5: + ldh a, [rSVBK] + push af + + ld a, $6 + ldh [rSVBK], a + + ld hl, PichuBorderMobileTilemapAttrmap + ld de, wDecompressScratch + ld bc, 32 * 12 * 2 + call CopyBytes + + di + +.wait_for_vblank +; Wait until a vblank would occur had interrupts not just been disabled. + ldh a, [rLY] + cp LY_VBLANK + 1 + jr nz, .wait_for_vblank + + ld a, $d0 + ldh [rHDMA1], a + ld a, $0 + ldh [rHDMA2], a + ld a, $1c + ldh [rHDMA3], a + xor a + ldh [rHDMA4], a + ld a, $8 + ldh [rHDMA5], a + + ld a, $d0 + ldh [rHDMA1], a + ld a, $80 + ldh [rHDMA2], a + ld a, $1c + ldh [rHDMA3], a + ld a, $80 + ldh [rHDMA4], a + ld a, $8 + ldh [rHDMA5], a + + ld a, $d1 + ldh [rHDMA1], a + ld a, $0 + ldh [rHDMA2], a + ld a, $1d + ldh [rHDMA3], a + xor a + ldh [rHDMA4], a + ld a, $8 + ldh [rHDMA5], a + + ld a, $1 + ldh [rVBK], a + + ld a, $d1 + ldh [rHDMA1], a + ld a, $80 + ldh [rHDMA2], a + ld a, $1c + ldh [rHDMA3], a + xor a + ldh [rHDMA4], a + ld a, $8 + ldh [rHDMA5], a + + ld a, $d2 + ldh [rHDMA1], a + ld a, $0 + ldh [rHDMA2], a + ld a, $1c + ldh [rHDMA3], a + ld a, $80 + ldh [rHDMA4], a + ld a, $8 + ldh [rHDMA5], a + + ld a, $d2 + ldh [rHDMA1], a + ld a, $80 + ldh [rHDMA2], a + ld a, $1d + ldh [rHDMA3], a + xor a + ldh [rHDMA4], a + ld a, $8 + ldh [rHDMA5], a + + xor a + ldh [rVBK], a + + ei + + pop af + ldh [rSVBK], a + + farcall ReloadMapPart + ld a, $8 + ld [wMusicFade], a + ld de, MUSIC_MOBILE_ADAPTER + ld a, e + ld [wMusicFadeID], a + ld a, d + ld [wMusicFadeID + 1], a + ld a, [wc319] + inc a + ld [wc319], a + ret + +MenuHeader_11628c: ; unreferenced + db MENU_BACKUP_TILES ; flags + menu_coords 0, 6, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw NULL + db 0 ; default option + +Function116294: + farcall Function170d02 + ld a, [wc319] + inc a + ld [wc319], a + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, wBGPals1 palette 6 + ld de, wc320 + ld bc, 2 palettes + call CopyBytes + ld hl, PichuBorderMobileBGPalettes + ld de, wBGPals1 palette 7 + ld bc, 1 palettes + call CopyBytes + call SetPalettes + pop af + ldh [rSVBK], a + ld a, $30 + ldh [hWY], a + ret + +Function1162cb: + farcall Function170cc6 + ld a, [wc319] + inc a + ld [wc319], a + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, PichuBorderMobileOBPalettes + ld de, wOBPals1 + 2 palettes + ld bc, 6 palettes + call CopyBytes + call SetPalettes + pop af + ldh [rSVBK], a + ret + +Function1162f2: + call Function11659d + call Function116758 + call Function1167a6 + ld a, [wc310] + cp EGG + ret z + sla a + ld c, a + ld b, 0 + ld hl, Unknown_1168c5 + add hl, bc + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + push de + pop hl + ld a, [wc30e] + ld c, a + ld a, [wc30f] + ld b, a + ld a, [wc314 + 4] + ld e, a + ld a, [hli] + sub e + ld de, wShadowOAMSprite09 +.asm_116321 + push af + ld a, [hli] + add b + ld [de], a ; y + inc de + ld a, [hli] + add c + ld [de], a ; x + inc de + ld a, [hli] + ld [de], a ; tile id + inc de + ld a, [hli] + ld [de], a ; attributes + inc de + pop af + dec a + jr nz, .asm_116321 + call Function116468 + ld a, [wc3f5] + sla a + ld c, a + ld b, 0 + ld hl, Unknown_1168c5 + add hl, bc + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + push de + pop hl + ld a, [wc3f1] + ld c, a + ld a, [wc3f3] + ld b, a + ld a, [wc3f8] + ld e, a + ld a, [hli] + sub e + ld de, wShadowOAMSprite00 +.asm_11635a + push af + ld a, [hli] + add b + ld [de], a ; y + inc de + ld a, [hli] + add c + ld [de], a ; x + inc de + ld a, [hli] + ld [de], a ; tile id + inc de + ld a, [hli] + ld [de], a ; attributes + inc de + pop af + dec a + jr nz, .asm_11635a + ret + +Function11636e: + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, wBGPals2 + ld de, wBGPals1 + ld bc, 8 palettes + call CopyBytes + pop af + ldh [rSVBK], a + call SetPalettes + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld a, $a0 + ld hl, wShadowOAM + ld bc, 16 * SPRITEOAMSTRUCT_LENGTH + call ByteFill + ld a, $90 + ldh [hWY], a + call UpdateSprites + pop af + ldh [rSVBK], a + farcall ReloadMapPart + ld a, $8 + ld [wMusicFade], a + ld a, [wMapMusic] + ld [wMusicFadeID], a + xor a + ld [wMusicFadeID + 1], a + xor a + ld [wc319], a + ld [wc30d], a + ret + +Function1163c0: + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld a, $a0 + ld hl, wShadowOAM + ld bc, 16 * SPRITEOAMSTRUCT_LENGTH + call ByteFill + call DelayFrame + farcall _RefreshSprites + ld b, SCGB_MAPPALS + call GetSGBLayout + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, wc320 + ld de, wd030 + ld bc, $0010 + call CopyBytes + pop af + ldh [rSVBK], a + call SetPalettes + call DelayFrame + ld a, $90 + ldh [hWY], a + call UpdateSprites + farcall _ClearSprites + pop af + ldh [rSVBK], a + farcall ReloadMapPart + ld a, [wLinkMode] + cp LINK_MOBILE + jr z, .asm_11642a + ld a, $8 + ld [wMusicFade], a + ld a, [wMapMusic] + ld [wMusicFadeID], a + xor a + ld [wMusicFadeID + 1], a + jr .asm_116439 + +.asm_11642a + ld a, $8 + ld [wMusicFade], a + ld a, LOW(MUSIC_NONE) + ld [wMusicFadeID], a + ld a, HIGH(MUSIC_NONE) + ld [wMusicFadeID + 1], a + +.asm_116439 + xor a + ld [wc319], a + ld [wc30d], a + ret + +Function116441: + farcall Function17d405 + ld a, $90 + ldh [hWY], a + farcall ReloadMapPart + ld a, $8 + ld [wMusicFade], a + ld a, [wMapMusic] + ld [wMusicFadeID], a + xor a + ld [wMusicFadeID + 1], a + xor a + ld [wc319], a + ld [wc30d], a + ret + +Function116468: + call Function116567 + ld a, [wc314] + cp $d + jr nz, .asm_1164a8 + ld hl, wc30e + ld a, [hl] + cp $50 + jr nc, .asm_116484 + ld a, $50 + sub [hl] + add $50 + ld [wc3f1], a + jr .asm_11648d + +.asm_116484 + sub $50 + ld c, a + ld a, $50 + sub c + ld [wc3f1], a + +.asm_11648d + ld hl, wc30f + ld a, [hl] + cp $60 + jr nc, .asm_11649e + ld a, $60 + sub [hl] + add $60 + ld [wc3f3], a + ret + +.asm_11649e + sub $60 + ld c, a + ld a, $60 + sub c + ld [wc3f3], a + ret + +.asm_1164a8 + ld hl, wc30e + ld a, $b0 + cp [hl] + jr nc, .asm_1164b8 + ld a, [wc3f1] + and a + jr z, .asm_11650b + jr .asm_1164f2 + +.asm_1164b8 + ld a, [wc3f1] + sub [hl] + jr nc, .asm_1164c1 + xor $ff + inc a + +.asm_1164c1 + ld b, a + ld c, $0 + ld a, $5 +.asm_1164c6 + srl b + rr c + dec a + jr nz, .asm_1164c6 + ld a, c + ld [wc3fa], a + ld a, b + ld [wc3f9], a + ld a, [wc3f1] + sub [hl] + jr c, .asm_1164f2 + ld c, $0 + ld a, [wc3fa] + xor $ff + add $1 + rl c + ld [wc3fa], a + ld a, [wc3f9] + xor $ff + add c + ld [wc3f9], a + +.asm_1164f2 + ld a, [wc3f2] + ld l, a + ld a, [wc3f1] + ld h, a + ld a, [wc3fa] + ld e, a + ld a, [wc3f9] + ld d, a + add hl, de + ld a, l + ld [wc3f2], a + ld a, h + ld [wc3f1], a + +.asm_11650b + ld hl, wc30f + ld a, $b0 + cp [hl] + jr c, .asm_11654d + ld a, [wc3f3] + sub [hl] + jr nc, .asm_11651c + xor $ff + inc a + +.asm_11651c + ld b, a + ld c, $0 + ld a, $5 +.asm_116521 + srl b + rr c + dec a + jr nz, .asm_116521 + ld a, c + ld [wc3fc], a + ld a, b + ld [wc3fb], a + ld a, [wc3f3] + sub [hl] + jr c, .asm_11654d + ld c, $0 + ld a, [wc3fc] + xor $ff + add $1 + rl c + ld [wc3fc], a + ld a, [wc3fb] + xor $ff + add c + ld [wc3fb], a + +.asm_11654d + ld a, [wc3f4] + ld l, a + ld a, [wc3f3] + ld h, a + ld a, [wc3fc] + ld e, a + ld a, [wc3fb] + ld d, a + add hl, de + ld a, l + ld [wc3f4], a + ld a, h + ld [wc3f3], a + ret diff --git a/mobile/mobile_45_stadium.asm b/mobile/mobile_45_stadium.asm new file mode 100644 index 0000000..429bc7f --- /dev/null +++ b/mobile/mobile_45_stadium.asm @@ -0,0 +1,813 @@ +GiveOddEgg: + farcall _GiveOddEgg + ret + +Function11765d: + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + call Function11766b + pop af + ldh [hInMenu], a + ret + +Function11766b: + call Function117699 + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + call Function1176ee + ld a, $5 + call OpenSRAM + ld hl, $b1f3 + ld de, wcd49 + ld bc, $8 + call CopyBytes + ld de, wc708 + ld bc, $11 + call CopyBytes + call CloseSRAM + pop af + ldh [rSVBK], a + ret + +Function117699: + ld a, $5 + call OpenSRAM + ld hl, wcd49 + ld de, $b1f3 + ld bc, $8 + call CopyBytes + ld hl, wc708 + ld bc, $11 + call CopyBytes + call CloseSRAM + xor a + ld [wcd49], a + ld [wcd4a], a + ld [wcd4b], a + ld [wcd4c], a + ld [wcd4d], a + ld [wcd4e], a + ld [wcd4f], a + ld hl, wc708 + ld bc, $11 + call ByteFill + call ClearBGPalettes + call ClearSprites + farcall Function171c87 + farcall ReloadMapPart + farcall ClearSpriteAnims + ret + +Function1176ee: +.loop + call JoyTextDelay + ld a, [wcd49] + bit 7, a + jr nz, .quit + call Function117719 + farcall PlaySpriteAnimations + farcall ReloadMapPart + jr .loop + +.quit + farcall ClearSpriteAnims + call ClearBGPalettes + call ClearScreen + call ClearSprites + ret + +Function117719: + jumptable Jumptable_117728, wcd49 + +Jumptable_117728: + dw Function117738 + dw Function117764 + dw Function1178aa + dw Function1178e8 + dw Function117942 + dw Function117976 + dw Function117984 + dw Function1179a7 + +Function117738: + farcall Function171ccd + depixel 6, 3 + ld a, $1d + call InitSpriteAnimStruct + ld hl, $c + add hl, bc + ld a, $6 + ld [hl], a + depixel 9, 4 + ld a, $1d + call InitSpriteAnimStruct + ld hl, $c + add hl, bc + ld a, $7 + ld [hl], a + ld a, $3 + ld [wcd23], a + jp MobilePassword_IncrementJumptable + +Function117764: + ld a, [wcd4a] + cp $10 + jr nz, .asm_11776f + ld a, $1 + jr .asm_117770 + +.asm_11776f + xor a +.asm_117770 + ld [wcd24], a + ld hl, hJoyPressed + ld a, [hl] + and SELECT + jr nz, Function117764_select + ld a, [hl] + and START + jr nz, Function117764_start + ld a, [hl] + and A_BUTTON + jp nz, Function117764_a_button + ld a, [hl] + and B_BUTTON + jr nz, Function117764_b_button + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, Function117764_d_up + ld a, [hl] + and D_DOWN + jr nz, Function117764_d_down + ld a, [hl] + and D_LEFT + jp nz, Function117764_d_left + ld a, [hl] + and D_RIGHT + jp nz, Function117764_d_right + ret + +Function117764_select: + farcall Function171cf0 + ret + +Function117764_start: + ld a, $2 + ld [wcd4c], a + ld a, $4 + ld [wcd4d], a + ret + +Function1177b7: + ld a, $3 + ld [wcd24], a + ld a, [wcd4a] + and a + jr z, .asm_1177c5 + jp MobilePassword_IncrementJumptable + +.asm_1177c5 + ld a, $6 + ld [wcd49], a + ret + +Function1177cb: + ld a, $80 + ld [wcd49], a + ld [wScriptVar], a + jp MobilePassword_IncrementJumptable + +Function117764_b_button: + call PlayClickSFX + ld a, [wcd4a] + and a + ret z + dec a + ld [wcd4a], a + ld e, a + ld d, 0 + ld hl, wc708 + add hl, de + xor a + ld [hl], a + hlcoord 2, 4 + add hl, de + ld [hl], a + ret + +Function117764_d_up: + ld a, [wcd4d] + and a + ret z + dec a + ld [wcd4d], a + cp $3 + ret nz + ld a, [wcd4c] + ld e, a + sla a + sla a + add e +Function117764_d_vertical_load: + ld [wcd4c], a + ret + +Function117764_d_down: + ld a, [wcd4d] + cp $4 + ret z + inc a + ld [wcd4d], a + cp $4 + ret nz + ld a, [wcd4c] + cp $a + jr nc, .asm_117825 + cp $5 + jr nc, .asm_117829 + xor a + jr Function117764_d_vertical_load + +.asm_117825 + ld a, $2 + jr Function117764_d_vertical_load + +.asm_117829 + ld a, $1 + jr Function117764_d_vertical_load + +Function117764_d_left: + ld a, [wcd4c] + and a + ret z + dec a + ld [wcd4c], a + ret + +Function117764_d_right: + ld e, $d + ld a, [wcd4d] + cp $4 + jr nz, .wrap + ld e, $2 +.wrap + ld a, [wcd4c] + cp e + ret z + inc a + ld [wcd4c], a + ret + +Function117764_a_button: + call PlayClickSFX + ld a, [wcd4d] + cp $4 + jr nz, .not_4 + ld a, [wcd4c] + cp $2 + jp z, Function1177b7 + cp $1 + jp z, Function1177cb + jp Function117764_select + +.not_4 + ld a, [wcd4a] + ld e, a + cp $10 + jp z, Function117764_start + inc a + ld [wcd4a], a + ld d, $0 + ld a, [wcd4b] + and a + jr nz, .ascii_symbols + ld hl, Unknown_117a0f + jr .got_ascii + +.ascii_symbols + ld hl, Unknown_117a47 +.got_ascii + push de + ld a, [wcd4c] + ld b, a + ld a, [wcd4d] + ld c, $e + call SimpleMultiply + add b + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ld hl, wc708 + add hl, de + ld [hl], a + pop de + hlcoord 2, 4 + add hl, de + sub $20 + ld [hl], a + ld a, e + cp $f + ret nz + jp Function117764_start + +Function1178aa: + ld hl, MenuHeader_1179b5 + call LoadMenuHeader + call MenuBox + call MenuBoxCoord2Tile + ld hl, MenuHeader_1179bd + call LoadMenuHeader + call MenuBox + call MenuBoxCoord2Tile + farcall ReloadMapPart + hlcoord 16, 8 + ld de, YessNoString_1179c5 + call PlaceString + hlcoord 15, 10 + ld a, "▶" + ld [hl], a + hlcoord 1, 14 + ld de, AskSavePasswordString + call PlaceString + ld a, $1 + ld [wcd4e], a + jp MobilePassword_IncrementJumptable + +Function1178e8: + ldh a, [hJoyPressed] + cp B_BUTTON + jr z, .b_button + cp A_BUTTON + jr z, .a_button + cp D_DOWN + jr z, .d_down + cp D_UP + ret nz + ld a, [wcd4e] + and a + ret z + dec a + ld [wcd4e], a + hlcoord 15, 8 + ld a, "▶" + ld [hl], a + hlcoord 15, 10 + ld a, " " + ld [hl], a + ret + +.d_down + ld a, [wcd4e] + and a + ret nz + inc a + ld [wcd4e], a + hlcoord 15, 8 + ld a, " " + ld [hl], a + hlcoord 15, 10 + ld a, "▶" + ld [hl], a + ret + +.a_button + call PlayClickSFX + ld a, [wcd4e] + and a + jr nz, .b_button + call ExitMenu + ld a, $1 + ld [wcd4f], a + jp MobilePassword_IncrementJumptable + +.b_button + call ExitMenu + call ExitMenu + jp MobilePassword_IncrementJumptable + +Function117942: + call SpeechTextbox + hlcoord 1, 14 + ld de, SavedPasswordString + call PlaceString + ld a, $1e + ld [wcd4e], a + ld a, BANK(sMobileLoginPassword) + call OpenSRAM + ld a, [wcd4f] + ld [sMobileLoginPassword], a + ld hl, wc708 + ld de, sMobileLoginPassword + 1 + ld bc, MOBILE_LOGIN_PASSWORD_LENGTH + call CopyBytes + call CloseSRAM + ld a, [wcd4f] + and a + jr z, asm_11797e + call MobilePassword_IncrementJumptable + +Function117976: + ld hl, wcd4e + dec [hl] + ret nz + call ExitMenu +asm_11797e: + ld a, $80 + ld [wcd49], a + ret + +Function117984: + ld hl, MenuHeader_1179b5 + call LoadMenuHeader + call MenuBox + call MenuBoxCoord2Tile + farcall ReloadMapPart + hlcoord 1, 14 + ld de, NotAPokemonPasswordString + call PlaceString + ld a, $1e + ld [wcd4e], a + call MobilePassword_IncrementJumptable + +Function1179a7: + ld hl, wcd4e + dec [hl] + ret nz + call ExitMenu + ld a, $1 + ld [wcd49], a + ret + +MenuHeader_1179b5: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw NULL + db 0 ; default option + +MenuHeader_1179bd: + db MENU_BACKUP_TILES ; flags + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw NULL + db 0 ; default option + +YessNoString_1179c5: + db "はい" + next "いいえ@" + +AskSavePasswordString: + db "こパスワード¯ほぞんして" + line "おきますか?@" + +NotAPokemonPasswordString: + db "パスワードにゅうりょく" + line "されていません!@" + +SavedPasswordString: + db "ログインパスワード¯ほぞん" + line "しました@" + +MobilePassword_IncrementJumptable: + ld hl, wcd49 + inc [hl] + ret + +pushc +setcharmap ascii + +Unknown_117a0f: + db "ABCDEFGHIJKLMNOPQRSTUVWXYZ " + db "abcdefghijklmnopqrstuvwxyz " + +Unknown_117a47: + db "0123456789 " + db "!\"#$%&'()*+ " + db ",-./:;<=>?@ " + db "[\\]^_`\{|}~ " +popc + +; everything from here to the end of the bank is related to the +; Mobile Stadium option from the continue/newgame menu. +; Needs better function names +MobileStudium: + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + call Function117a8d + pop af + ldh [hInMenu], a + ret + +Function117a8d: + call Function117a94 + call Function117acd + ret + +Function117a94: + xor a + ld [wJumptableIndex], a + ld [wcf64], a + ld [wcf65], a + ld [wcf66], a + call ClearBGPalettes + call ClearSprites + farcall Function172e78 + farcall HDMATransferAttrmapAndTilemapToWRAMBank3 + ret + +Function117ab4: + call ClearBGPalettes + call ClearSprites + farcall Function172e78 + farcall Function172eb9 + farcall ReloadMapPart + ret + +Function117acd: + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .asm_117ae2 + call Function117ae9 + farcall HDMATransferAttrmapAndTilemapToWRAMBank3 + jr Function117acd + +.asm_117ae2 + call ClearBGPalettes + call ClearSprites + ret + +Function117ae9: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + dw Function117b06 + dw Function117b14 + dw Function117b28 + dw Function117b31 + dw Function117b4f + dw Function117bb6 + dw Function117c4a + +Function117b06: + farcall Function172eb9 + ld a, $10 + ld [wcf64], a + jp MobileStudium_JumptableIncrement + +Function117b14: + ld hl, wcf64 + dec [hl] + ret nz + ld hl, MenuHeader_117cbc + call LoadMenuHeader + call MenuBox + call MenuBoxCoord2Tile + jp MobileStudium_JumptableIncrement + +Function117b28: + ld hl, MobileStadiumEntryText + call PrintText + jp MobileStudium_JumptableIncrement + +Function117b31: + ld hl, MenuHeader_117cc4 + call LoadMenuHeader + call MenuBox + call MenuBoxCoord2Tile + hlcoord 16, 8 + ld de, YesNo117ccc + call PlaceString + hlcoord 15, 8 + ld a, "▶" + ld [hl], a + jp MobileStudium_JumptableIncrement + +Function117b4f: + ldh a, [hJoyPressed] + cp B_BUTTON + jr z, .b_button + cp A_BUTTON + jr z, .a_button + cp D_DOWN + jr z, .d_down + cp D_UP + ret nz + ld a, [wcf64] + and a + ret z + dec a + ld [wcf64], a + hlcoord 15, 8 + ld a, "▶" + ld [hl], a + hlcoord 15, 10 + ld a, " " + ld [hl], a + ret + +.d_down + ld a, [wcf64] + and a + ret nz + inc a + ld [wcf64], a + hlcoord 15, 8 + ld a, " " + ld [hl], a + hlcoord 15, 10 + ld a, "▶" + ld [hl], a + ret + +.a_button + call PlayClickSFX + ld a, [wcf64] + and a + jr nz, .b_button + call ExitMenu + call ExitMenu + farcall ReloadMapPart + jp MobileStudium_JumptableIncrement + +.b_button + call ExitMenu + call ExitMenu + farcall ReloadMapPart + ld a, $80 + ld [wJumptableIndex], a + ret + +Function117bb6: + call Function117c89 + ld a, $1 + ldh [hBGMapMode], a + farcall Function118284 + call ClearSprites + ld a, [wMobileErrorCodeBuffer] + and a + jr z, .asm_117be7 + cp $a + jr z, .asm_117be1 +.asm_117bd0 + ld a, $2 + ld [wc303], a + farcall DisplayMobileError + ld a, $80 + ld [wJumptableIndex], a + ret + +.asm_117be1 + ld a, $80 + ld [wJumptableIndex], a + ret + +.asm_117be7 + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a + ld a, [wcd89] + and $1 + jr nz, .asm_117c16 + ld a, [w3_d000] + cp $fe + jr nz, .asm_117c16 + ld a, [w3_d001] + cp $f + jr nz, .asm_117c16 + ld hl, w3_dfec + ld de, wcd69 + ld c, $10 +.asm_117c0b + ld a, [de] + inc de + cp [hl] + jr nz, .asm_117c16 + inc hl + dec c + jr nz, .asm_117c0b + jr .asm_117c20 + +.asm_117c16 + pop af + ldh [rSVBK], a + ld a, $d3 + ld [wMobileErrorCodeBuffer], a + jr .asm_117bd0 + +.asm_117c20 + pop af + ldh [rSVBK], a + farcall Function172eb9 + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a + ld a, $7 + call OpenSRAM + ld hl, w3_d002 + ld de, $b000 + ld bc, $1000 + call CopyBytes + call CloseSRAM + pop af + ldh [rSVBK], a + jp MobileStudium_JumptableIncrement + +Function117c4a: + ld hl, MenuHeader_117cbc + call LoadMenuHeader + call MenuBox + call MenuBoxCoord2Tile + farcall ReloadMapPart + ld hl, MobileStadiumSuccessText + call PrintText + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, wBGPals1 + ld de, 1 palettes + ld c, 8 +.loop + push hl + ld a, LOW(PALRGB_WHITE) + ld [hli], a + ld a, HIGH(PALRGB_WHITE) + ld [hl], a + pop hl + add hl, de + dec c + jr nz, .loop + call RotateThreePalettesRight + pop af + ldh [rSVBK], a + ld a, $80 + ld [wJumptableIndex], a + ret + +Function117c89: + ld a, $7 + call OpenSRAM + ld l, $0 + ld h, l + ld de, $b000 + ld bc, $0ffc +.asm_117c97 + push bc + ld a, [de] + inc de + ld c, a + ld b, 0 + add hl, bc + pop bc + dec bc + ld a, b + or c + jr nz, .asm_117c97 + ld a, l + ld [wcd83], a + ld a, h + ld [wcd84], a + ld hl, $bfea + ld de, wcd69 + ld bc, $10 + call CopyBytes + call CloseSRAM + ret + +MenuHeader_117cbc: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw NULL + db 0 ; default option + +MenuHeader_117cc4: + db MENU_BACKUP_TILES ; flags + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw NULL + db 0 ; default item + +YesNo117ccc: + db "はい" + next "いいえ@" + +MobileStadiumEntryText: + text_far _MobileStadiumEntryText + text_end + +MobileStadiumSuccessText: + text_far _MobileStadiumSuccessText + text_end + +MobileStudium_JumptableIncrement: + ld hl, wJumptableIndex + inc [hl] + ret diff --git a/mobile/mobile_46.asm b/mobile/mobile_46.asm new file mode 100644 index 0000000..20ff7cc --- /dev/null +++ b/mobile/mobile_46.asm @@ -0,0 +1,7714 @@ +Function118000: + ld a, $1 + ld [wcd38], a + jr asm_11800b + +Function118007: + xor a + ld [wcd38], a + +asm_11800b: + call BattleTowerRoomMenu_InitRAM + ld a, $18 + ld [wcd33], a + ld a, $19 + ld [wcd34], a + ld a, $4 + ld [wc3f0], a + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a +.loop + call JoyTextDelay + call Function118473 + ld a, [wBattleTowerRoomMenuJumptableIndex] + cp $1b + jr c, .skip + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a + +.skip + call Function1184a5 + call BattleTowerRoomMenu_WriteMessage + farcall Function115dd3 + farcall Function11619d + call DelayFrame + ld a, [wBattleTowerRoomMenuJumptableIndex] + ld hl, wcd33 + cp [hl] + jr nz, .loop + pop af + ldh [rSVBK], a + call BattleTowerRoomMenu_Cleanup + call ReturnToMapFromSubmenu +BattleTowerRoomMenu_DoNothing: + ret + +Function11805f: + ld a, $1 + ld [wcd38], a + call BattleTowerRoomMenu_InitRAM + ld a, $18 + ld [wcd33], a + ld a, $19 + ld [wcd34], a + ld a, $4 + ld [wc3f0], a + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a +.asm_11807d + call JoyTextDelay + call Function118473 + ld a, [wBattleTowerRoomMenuJumptableIndex] + cp $1b + jr c, .asm_118090 + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a + +.asm_118090 + call Function11857c + call BattleTowerRoomMenu_WriteMessage + farcall Function115dd3 + farcall Function11619d + call DelayFrame + ld a, [wBattleTowerRoomMenuJumptableIndex] + ld hl, wcd33 + cp [hl] + jr nz, .asm_11807d + pop af + ldh [rSVBK], a + call BattleTowerRoomMenu_Cleanup + call ReturnToMapFromSubmenu + ret + +Function1180b8: + call BattleTowerRoomMenu_InitRAM + ld a, $22 + ld [wcd33], a + ld a, $23 + ld [wcd34], a + ld a, $4 + ld [wc3f0], a + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a +.asm_1180d1 + call JoyTextDelay + call Function118473 + ld a, [wBattleTowerRoomMenuJumptableIndex] + cp $28 + jr c, .asm_1180e4 + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a + +.asm_1180e4 + ld a, [wBattleTowerRoomMenuJumptableIndex] + cp $10 + jr c, .asm_1180f2 + cp $16 + jr nc, .asm_1180f2 + call Function11884c + +.asm_1180f2 + call Function1184ec + call BattleTowerRoomMenu_WriteMessage + farcall Function115dd3 + farcall Function11619d + call DelayFrame + ld a, [wBattleTowerRoomMenuJumptableIndex] + ld hl, wcd33 + cp [hl] + jr nz, .asm_1180d1 + pop af + ldh [rSVBK], a + call BattleTowerRoomMenu_Cleanup + call ReturnToMapFromSubmenu + ret + +Function11811a: + ld a, 1 + ld [wcd38], a + jr Function118125 + +_BattleTowerRoomMenu: + xor a + ld [wcd38], a +Function118125: + call BattleTowerRoomMenu_InitRAM + ld a, $3 + ld [wcd33], a + ld a, $d + ld [wcd34], a + ld a, $4 + ld [wc3f0], a + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a +.loop + call JoyTextDelay + call Function118473 + ld a, [wBattleTowerRoomMenuJumptableIndex] + cp $f + jr c, .skip + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a +.skip + call BattleTowerRoomMenu_Jumptable + call BattleTowerRoomMenu_WriteMessage + farcall Function115dd3 + farcall Function11619d + call DelayFrame + ld a, [wBattleTowerRoomMenuJumptableIndex] + ld hl, wcd33 + cp [hl] + jr nz, .loop + xor a + ld [w3_d000], a + pop af + ldh [rSVBK], a + call BattleTowerRoomMenu_Cleanup + call Function118180 + call ReturnToMapFromSubmenu + ret + +Function118180: + ld a, [wScriptVar] + and a + ret nz + ld a, [wcd38] + and a + ret z + ld a, BANK(s5_a89c) ; aka BANK(s5_a8b2) + call OpenSRAM + ld hl, wcd69 + ld de, s5_a89c + ld bc, 22 + call CopyBytes + + ldh a, [rSVBK] + push af + ld a, BANK(w3_d202) + ldh [rSVBK], a + + ld de, w3_d202 + ld c, $96 + farcall CheckStringForErrors_IgnoreTerminator + jr c, .return_d3 + + ld de, w3_d202 + lb bc, 1, $96 + farcall CheckStringContainsLessThanBNextCharacters + jr c, .return_d3 + + ld hl, w3_d202 + ld de, s5_a8b2 + ld bc, 150 + call CopyBytes +.reset_banks + pop af + ldh [rSVBK], a + call CloseSRAM + ret + +.return_d3 + ld a, $d3 + ld [wMobileErrorCodeBuffer], a + ld [wScriptVar], a + jr .reset_banks + +Function1181da: + call BattleTowerRoomMenu_InitRAM + ld a, $2 + ld [wcd38], a + ld a, $21 + ld [wcd33], a + ld a, $22 + ld [wcd34], a + ld a, $4 + ld [wc3f0], a + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a +.asm_1181f8 + call JoyTextDelay + call Function118473 + ld a, [wBattleTowerRoomMenuJumptableIndex] + cp $28 + jr c, .asm_11820b + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a + +.asm_11820b + call Function1185c3 + call BattleTowerRoomMenu_WriteMessage + farcall Function115dd3 + farcall Function11619d + call DelayFrame + ld a, [wBattleTowerRoomMenuJumptableIndex] + ld hl, wcd33 + cp [hl] + jr nz, .asm_1181f8 + pop af + ldh [rSVBK], a + call BattleTowerRoomMenu_Cleanup + call ReturnToMapFromSubmenu + ret + +Function118233: + call BattleTowerRoomMenu_InitRAM + ld a, $1b + ld [wcd33], a + ld a, $1c + ld [wcd34], a + ld a, $6 + ld [wc3f0], a + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a +.asm_11824c + call JoyTextDelay + call Function118473 + ld a, [wBattleTowerRoomMenuJumptableIndex] + cp $1e + jr c, .asm_11825f + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a + +.asm_11825f + call Function118624 + call BattleTowerRoomMenu_WriteMessage + farcall Function115dd3 + farcall Function11619d + call DelayFrame + ld a, [wBattleTowerRoomMenuJumptableIndex] + ld hl, wcd33 + cp [hl] + jr nz, .asm_11824c + pop af + ldh [rSVBK], a + call BattleTowerRoomMenu_Cleanup + ret + +Function118284: + call BattleTowerRoomMenu_InitRAM + ld a, $19 + ld [wcd33], a + ld a, $1e + ld [wcd34], a + ld a, $5 + ld [wc3f0], a + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a +.asm_11829d + call JoyTextDelay + call Function118473 + ld a, [wBattleTowerRoomMenuJumptableIndex] + cp $20 + jr c, .asm_1182b0 + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a +.asm_1182b0 + call Function1186f5 + call BattleTowerRoomMenu_WriteMessage + farcall Function115dd3 + farcall Function11619d + call DelayFrame + ld a, [wBattleTowerRoomMenuJumptableIndex] + ld hl, wcd33 + cp [hl] + jr nz, .asm_11829d + pop af + ldh [rSVBK], a + call BattleTowerRoomMenu_Cleanup + ret + +Function1182d5: ; unreferenced + call BattleTowerRoomMenu_InitRAM + ld a, $18 + ld [wcd33], a + ld a, $19 + ld [wcd34], a + ld a, $4 + ld [wc3f0], a + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a +.asm_1182ee + call JoyTextDelay + call Function118473 + ld a, [wBattleTowerRoomMenuJumptableIndex] + cp $1b + jr c, .asm_118301 + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a + +.asm_118301 + call Function118746 + call BattleTowerRoomMenu_WriteMessage + farcall Function115dd3 + farcall Function11619d + call DelayFrame + ld a, [wBattleTowerRoomMenuJumptableIndex] + ld hl, wcd33 + cp [hl] + jr nz, .asm_1182ee + pop af + ldh [rSVBK], a + call BattleTowerRoomMenu_Cleanup + call ReturnToMapFromSubmenu + ret + +Function118329: + call BattleTowerRoomMenu_InitRAM + ld a, $15 + ld [wcd33], a + ld a, $16 + ld [wcd34], a + ld a, $6 + ld [wc3f0], a + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a +.asm_118342 + call JoyTextDelay + call Function118473 + ld a, [wBattleTowerRoomMenuJumptableIndex] + cp $18 + jr c, .asm_118355 + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a + +.asm_118355 + call Function118671 + call BattleTowerRoomMenu_WriteMessage + farcall Function115dd3 + farcall Function11619d + call DelayFrame + ld a, [wBattleTowerRoomMenuJumptableIndex] + ld hl, wcd33 + cp [hl] + jr nz, .asm_118342 + pop af + ldh [rSVBK], a + call BattleTowerRoomMenu_Cleanup + ret + +Function11837a: + call BattleTowerRoomMenu_InitRAM + ld a, $16 + ld [wcd33], a + ld a, $17 + ld [wcd34], a + ld a, $6 + ld [wc3f0], a + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a +.asm_118393 + call JoyTextDelay + call Function118473 + ld a, [wBattleTowerRoomMenuJumptableIndex] + cp $19 + jr c, .asm_1183a6 + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a + +.asm_1183a6 + call Function1186b2 + call BattleTowerRoomMenu_WriteMessage + farcall Function115dd3 + farcall Function11619d + call DelayFrame + ld a, [wBattleTowerRoomMenuJumptableIndex] + ld hl, wcd33 + cp [hl] + jr nz, .asm_118393 + pop af + ldh [rSVBK], a + call BattleTowerRoomMenu_Cleanup + ret + +BattleTowerRoomMenu_InitRAM: + di + ldh a, [rIE] + ld [wcd32], a + call DoubleSpeed + xor a + ldh [rIF], a + ld [wMobileErrorCodeBuffer], a + ld [wMobileErrorCodeBuffer + 1], a + ld [wMobileErrorCodeBuffer + 2], a + ld [wcd80], a + ld [wcd65], a + ld [wcd66], a + ld [wcd67], a + ld [wcd68], a + ld [wc31a], a + ld [wcd89], a + ld [wcd8a], a + ld [wcd8b], a + ld [wc3ec], a + ld [wc3ed], a + ld [wc3ee], a + ld [wc3ef], a + ld hl, wVramState + ld a, [hl] + ld [wcd7f], a + set 1, [hl] + ld a, (1 << SERIAL) | (1 << TIMER) | (1 << LCD_STAT) | (1 << VBLANK) + ldh [rIE], a + ld a, $1 + ldh [hMobileReceive], a + ldh [hMobile], a + ei + farcall Stubbed_Function106462 + farcall Function106464 + farcall Function115d99 + farcall Function11615a + ld a, BANK(s5_bfff) + call OpenSRAM + xor a + ld [s5_bfff], a + call CloseSRAM + ret + +Function118440: + push af + ld a, BANK(s5_bfff) + call OpenSRAM + ld a, [s5_bfff] + inc a + ld [s5_bfff], a + call CloseSRAM + pop af + ret + +BattleTowerRoomMenu_Cleanup: + di + xor a + ldh [hMobileReceive], a + ldh [hMobile], a + ldh [hVBlank], a + call NormalSpeed + xor a + ldh [rIF], a + ld a, [wcd32] + ldh [rIE], a + ei + ld a, [wcd7f] + ld [wVramState], a + ld a, [wMobileErrorCodeBuffer] + ld [wScriptVar], a + ret + +Function118473: + ld a, [wcd65] + and a + ret z + ld a, [wcd66] + inc a + ld [wcd66], a + cp 60 + ret nz + xor a + ld [wcd66], a + ld a, [wcd67] + inc a + ld [wcd67], a + cp 60 + ret nz + ld a, [wcd68] + inc a + ld [wcd68], a + cp 99 + jr z, .ninety_nine + xor a + ld [wcd67], a + ret + +.ninety_nine + xor a + ld [wcd65], a + ret + +Function1184a5: + jumptable .Jumptable, wBattleTowerRoomMenuJumptableIndex + +.Jumptable: + dw Function11886e + dw Function118880 + dw Function11878d + dw Function1188b0 + dw Function11878d + dw Function1188b8 + dw Function11878d + dw Function1188c0 + dw Function11878d + dw Function1188c8 + dw Function11878d + dw Function118903 + dw SetExchangeDownloadURL + dw Function11878d + dw Function118d80 + dw Function118d9b + dw Function11878d + dw Function118ded + dw Function118e6d + dw Function11878d + dw Function11984e + dw Function118e76 + dw Function118e7e + dw Function11878d + dw BattleTowerRoomMenu_DoNothing + dw Function118e76 + dw BattleTowerRoomMenu_CallRoomMenu2 + dw Function118e76 + +Function1184ec: + jumptable .Jumptable, wBattleTowerRoomMenuJumptableIndex + +.Jumptable: + dw Function11886e + dw Function118880 + dw Function11878d + dw Function1188b0 + dw Function11878d + dw Function1188b8 + dw Function11878d + dw Function1188c0 + dw Function11878d + dw Function1188c8 + dw Function11878d + dw Function118903 + dw Function119954 + dw Function11878d + dw Function119973 + dw Function11878d + dw Function119987 + dw Function11878d + dw Function1199b4 + dw Function1199ca + dw Function11878d + dw Function1199e2 + dw Function119b0d + dw Function11878d + dw Function119b6b + dw Function119b3b + dw Function11878d + dw Function119b52 + dw Function11878d + dw Function118e6d + dw Function11878d + dw Function118e76 + dw Function118e7e + dw Function11878d + dw BattleTowerRoomMenu_DoNothing + dw Function118e76 + dw BattleTowerRoomMenu_CallRoomMenu2 + dw Function119b45 + dw Function11878d + dw Function119ac9 + dw Function118e76 + +BattleTowerRoomMenu_Jumptable: + jumptable .Jumptable, wBattleTowerRoomMenuJumptableIndex + +.Jumptable: + dw BattleTowerRoomMenu_PickLevelMessage + dw BattleTowerRoomMenu_PlacePickLevelMenu + dw BattleTowerRoomMenu_UpdatePickLevelMenu + dw BattleTowerRoomMenu_DoNothing + dw BattleTowerRoomMenu_PartyMonTopsThisLevelMessage + dw BattleTowerRoomMenu_WaitForMessage + dw BattleTowerRoomMenu_DelayRestartMenu + dw BattleTowerRoomMenu_QuitMessage + dw BattleTowerRoomMenu_PlaceYesNoMenu + dw BattleTowerRoomMenu_UpdateYesNoMenu + dw BattleTowerRoomMenu_UberRestrictionMessage + dw BattleTowerRoomMenu_WaitForMessage + dw BattleTowerRoomMenu_DelayRestartMenu + dw Function118e76 ; mobile + dw BattleTowerRoomMenu_CallRoomMenu2 ; mobile + dw Function118e76 ; mobile + +Function11857c: + jumptable .Jumptable, wBattleTowerRoomMenuJumptableIndex + +.Jumptable: + dw Function11886e + dw Function118880 + dw Function11878d + dw Function1188b0 + dw Function11878d + dw Function1188b8 + dw Function11878d + dw Function1188c0 + dw Function11878d + dw Function1188c8 + dw Function11878d + dw Function118903 + dw SetBattleDownloadURL + dw Function11878d + dw Function11891c + dw Function1198ee + dw Function1198f7 + dw Function11878d + dw Function119937 + dw Function118e6d + dw Function11878d + dw Function118e76 + dw Function118e7e + dw Function11878d + dw BattleTowerRoomMenu_DoNothing + dw Function118e76 + dw BattleTowerRoomMenu_CallRoomMenu2 + dw Function118e76 + +Function1185c3: + jumptable .Jumptable, wBattleTowerRoomMenuJumptableIndex + +.Jumptable: + dw Function11886e + dw Function118880 + dw Function11878d + dw Function1188b0 + dw Function11878d + dw Function1188b8 + dw Function11878d + dw Function1188c0 + dw Function11878d + dw Function1188c8 + dw Function11878d + dw Function118903 + dw SetNewsDownloadURL + dw Function11878d + dw Function118e92 + dw Function11878d + dw Function118eb0 + dw Function118ec6 + dw Function118f0d + dw Function118f14 + dw Function118f5e + dw Function11878d + dw Function118fc0 + dw Function11878d + dw Function119054 + dw Function1190d0 + dw Function11878d + dw Function1190ec + dw Function118e6d + dw Function11878d + dw Function118e76 + dw Function118e7e + dw Function11878d + dw BattleTowerRoomMenu_DoNothing + dw Function118e76 + dw BattleTowerRoomMenu_CallRoomMenu2 + dw BattleTowerRoomMenu_QuitMessage + dw BattleTowerRoomMenu_PlaceYesNoMenu + dw BattleTowerRoomMenu_UpdateYesNoMenu + dw Function11914e + dw Function118e76 + +Function118624: + jumptable .Jumptable, wBattleTowerRoomMenuJumptableIndex + +.Jumptable: + dw Function118866 + dw Function118880 + dw Function11878d + dw Function1188b0 + dw Function11878d + dw Function1188b8 + dw Function11878d + dw Function1188c0 + dw Function11878d + dw Function1188c8 + dw Function11878d + dw Function118903 + dw SetNewsDownloadURL + dw Function11878d + dw Function118e92 + dw Function11878d + dw Function11915d + dw Function118f68 + dw Function11878d + dw Function119009 + dw Function11878d + dw Function119054 + dw Function118e6d + dw Function11878d + dw Function118e76 + dw Function118e7e + dw Function11878d + dw BattleTowerRoomMenu_DoNothing + dw Function118e76 + dw BattleTowerRoomMenu_CallRoomMenu2 + dw Function118e76 + +Function118671: + jumptable .Jumptable, wBattleTowerRoomMenuJumptableIndex + +.Jumptable: + dw Function118866 + dw Function118880 + dw Function11878d + dw Function1188b0 + dw Function11878d + dw Function1188b8 + dw Function11878d + dw Function1188c0 + dw Function11878d + dw Function1188c8 + dw Function11878d + dw Function118903 + dw Function119380 + dw Function119388 + dw Function1193a0 + dw Function11878d + dw Function118e6d + dw Function11878d + dw Function118e76 + dw Function118e7e + dw Function11878d + dw BattleTowerRoomMenu_DoNothing + dw Function118e76 + dw BattleTowerRoomMenu_CallRoomMenu2 + dw Function118e76 + +Function1186b2: + jumptable .Jumptable, wBattleTowerRoomMenuJumptableIndex + +.Jumptable: + dw Function118866 + dw Function118880 + dw Function11878d + dw Function1188b0 + dw Function11878d + dw Function1188b8 + dw Function11878d + dw Function1188c0 + dw Function11878d + dw Function1188c8 + dw Function11878d + dw Function118903 + dw Function119380 + dw Function1193e3 + dw Function1193fb + dw Function11878d + dw Function119413 + dw Function118e6d + dw Function11878d + dw Function118e76 + dw Function118e7e + dw Function11878d + dw BattleTowerRoomMenu_DoNothing + dw Function118e76 + dw BattleTowerRoomMenu_CallRoomMenu2 + dw Function118e76 + +Function1186f5: + jumptable .Jumptable, wBattleTowerRoomMenuJumptableIndex + +.Jumptable: + dw Function11886a + dw Function118880 + dw Function11878d + dw Function1188b0 + dw Function11878d + dw Function1188b8 + dw Function11878d + dw Function1188c0 + dw Function11878d + dw Function1188c8 + dw Function11878d + dw Function118903 + dw SetStadiumDownloadURL + dw Function11878d + dw Function119451 + dw Function1195f8 + dw Function119612 + dw Function119629 + dw Function119648 + dw Function11878d + dw Function118e6d + dw Function11878d + dw Function118e76 + dw Function118e7e + dw Function11878d + dw BattleTowerRoomMenu_DoNothing + dw Function11967d + dw Function119685 + dw Function119665 + dw Function11966d + dw Function118e76 + dw BattleTowerRoomMenu_CallRoomMenu2 + dw Function118e76 + +Function118746: + jumptable .Jumptable, wBattleTowerRoomMenuJumptableIndex + +.Jumptable: + dw Function11886e + dw Function118880 + dw Function11878d + dw Function1188b0 + dw Function11878d + dw Function1188b8 + dw Function11878d + dw Function1188c0 + dw Function11878d + dw Function1188c8 + dw Function11878d + dw Function118903 + dw SetOddEggDownloadURL + dw Function11878d + dw Function1196f2 + dw Function1197c9 + dw Function1197dc + dw Function11878d + dw Function118e6d + dw Function11878d + dw Function119800 + dw Function118e76 + dw Function118e7e + dw Function11878d + dw BattleTowerRoomMenu_DoNothing + dw Function118e76 + dw BattleTowerRoomMenu_CallRoomMenu2 + dw Function118e76 + +Function11878d: + ld a, [wc821] + bit 1, a + jr nz, .asm_1187af + bit 2, a + jr nz, .asm_1187d1 + bit 0, a + jr nz, .asm_1187aa + ld a, [wcd89] + and $1 + jr z, .asm_1187a7 + ld a, $3 + ldh [rSVBK], a +.asm_1187a7 + jp BattleTowerRoomMenu_IncrementJumptable +.asm_1187aa + call Function118821 + ret c + ret +.asm_1187af + ld a, MOBILEAPI_00 + call MobileAPI + ld [wMobileErrorCodeBuffer], a + ld a, l + ld [wMobileErrorCodeBuffer + 1], a + ld a, h + ld [wMobileErrorCodeBuffer + 2], a + ld a, MOBILEAPI_05 + call MobileAPI + ld a, [wc3f0] + ld [wc319], a + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a + ret +.asm_1187d1 + ld hl, wcd89 + bit 0, [hl] + jr nz, .asm_118803 + set 0, [hl] + ld a, BANK(w6_d000) + ldh [rSVBK], a + ld de, w6_d000 + ld bc, $1000 + ld a, [hl] + sla a + jr c, .asm_1187f9 + sla a + jr c, .asm_1187fd + sla a + jr c, .asm_1187f5 + ld a, MOBILEAPI_12 + jr .asm_1187ff +.asm_1187f5 + ld a, MOBILEAPI_14 + jr .asm_1187ff +.asm_1187f9 + ld a, MOBILEAPI_15 + jr .asm_1187ff +.asm_1187fd + ld a, MOBILEAPI_16 +.asm_1187ff + call MobileAPI + ret +.asm_118803 + ld a, $d3 + +SetMobileErrorCode: + ld [wMobileErrorCodeBuffer], a + xor a + ld [wMobileErrorCodeBuffer + 1], a + ld [wMobileErrorCodeBuffer + 2], a + ld a, MOBILEAPI_05 + call MobileAPI + ld a, [wc3f0] + ld [wc319], a + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a + ret + +Function118821: + ld a, [wc319] + cp $3 + jr c, .asm_11884a + cp $4 + jr z, .asm_11884a + ldh a, [hJoyDown] + cp $5 + jr nz, .asm_11884a + ld a, MOBILEAPI_05 + call MobileAPI + ld a, $a + ld [wMobileErrorCodeBuffer], a + ld a, [wc3f0] + ld [wc319], a + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a + scf + ret +.asm_11884a + and a + ret + +Function11884c: + ldh a, [hJoyDown] + cp $5 + jr nz, .asm_118864 + ld a, MOBILEAPI_05 + call MobileAPI + ld a, $a + ld [wMobileErrorCodeBuffer], a + ld a, [wcd34] + ld [wBattleTowerRoomMenuJumptableIndex], a + scf + ret + +.asm_118864 + and a + ret + +Function118866: + ld a, 2 + jr asm_11886f + +Function11886a: + ld a, 1 + jr asm_11886f + +Function11886e: + xor a + +asm_11886f: + ld [wBGMapPalBuffer], a + ld a, $0 + ld [wBattleTowerRoomMenu2JumptableIndex], a + call BattleTowerRoomMenu_IncrementJumptable + ld a, [wcd33] + ld [wMobileInactivityTimerSeconds], a + +Function118880: + call BattleTowerRoomMenu2 + ret c + xor a + ld [wcf64], a + ld [wc807], a + ld de, wcd81 + ld hl, $46 + ld a, MOBILEAPI_01 + jp Function119e2b + +Function118896: ; unreferenced + ld a, [wc821] + bit 1, a + jr nz, .asm_1188a5 + bit 2, a + jr nz, .asm_1188a5 + bit 0, a + jr z, .asm_1188aa + +.asm_1188a5 + ld a, MOBILEAPI_1A + jp Function119e2b + +.asm_1188aa + call BattleTowerRoomMenu_IncrementJumptable + jp BattleTowerRoomMenu_IncrementJumptable + +Function1188b0: + ld de, wc346 + ld a, MOBILEAPI_06 + jp Function119e2b + +Function1188b8: + ld de, wc3ac + ld a, MOBILEAPI_07 + jp Function119e2b + +Function1188c0: + ld de, wEmailAddress + ld a, MOBILEAPI_08 + jp Function119e2b + +Function1188c8: + ld a, $1 + ld [wcd65], a + call Function1188e7 + ld hl, wc708 +.asm_1188d3 + ld a, [de] + inc de + ld [hli], a + and a + jr nz, .asm_1188d3 + call Function119eb4 + call Function119ec2 + ld hl, wc708 + ld a, MOBILEAPI_03 + jp Function119e2b + +Function1188e7: + ld de, wc346 + ld a, BANK(s5_aa4a) + call OpenSRAM + ld a, [s5_aa4a] + call CloseSRAM + and a + ret z + sla a + ld c, a +.asm_1188fa + ld a, [de] + inc de + and a + jr nz, .asm_1188fa + dec c + jr nz, .asm_1188fa + ret + +Function118903: + ld a, [wc3f0] + ld [wc319], a + ld c, $1 + farcall Function115e18 + ld a, $8 + ld [wBattleTowerRoomMenu2JumptableIndex], a + call BattleTowerRoomMenu2 + jp BattleTowerRoomMenu_IncrementJumptable + +Function11891c: + call Function118b42 + jp BattleTowerRoomMenu_IncrementJumptable + +BattleTowerRoomMenu_PickLevelMessage: + ld a, [wcd38] + and a + jr nz, .asm_11892d + ld hl, Text_WhatLevelDoYouWantToChallenge + jr .asm_118930 + +.asm_11892d + ld hl, Text_CheckBattleRoomListByMaxLevel + +.asm_118930 + call BattleTowerRoomMenu_SetMessage + call BattleTowerRoomMenu_IncrementJumptable + +BattleTowerRoomMenu_PlacePickLevelMenu: + ld a, [wc31a] + and a + ret nz + ld hl, MenuHeader_119cf7 + call LoadMenuHeader + call MenuBox + call MenuBoxCoord2Tile + call ApplyTilemap + hlcoord 16, 8, wAttrmap + ld a, $40 + or [hl] + ld [hl], a + call WaitBGMap2 + ld a, $1 + ld [wcd4f], a + ld a, $1 + ldh [rSVBK], a + ld a, [wStatusFlags] + bit STATUSFLAGS_HALL_OF_FAME_F, a + jr nz, .asm_11896b + ld hl, Strings_Ll0ToL40 ; Address to list of strings with the choosable levels + ld a, 5 ; 4 levels to choose from, including 'Cancel'-option + jr .asm_118970 + +.asm_11896b + ld hl, Strings_L10ToL100 ; Address to list of strings with the choosable levels + ld a, 11 ; 10 levels to choose from, including 'Cancel'-option + +.asm_118970 + ld [wcd4a], a + ld a, l + ld [wcd4b], a + ld a, h + ld [wcd4c], a + ld a, $3 + ldh [rSVBK], a + call BattleTowerRoomMenu_IncrementJumptable + +BattleTowerRoomMenu_UpdatePickLevelMenu: + hlcoord 13, 8 + ld de, String_119d07 + call PlaceString + hlcoord 13, 10 + ld de, String_119d07 + call PlaceString + ld a, [wcd4b] + ld l, a + ld a, [wcd4c] + ld h, a + ld d, $0 + ld a, [wcd4f] + dec a + rlca + rlca + rlca + ld e, a + add hl, de + ld a, l + ld e, a + ld a, h + ld d, a + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld bc, wStringBuffer3 +.asm_1189b5 + ld a, [hli] + cp $50 + jr z, .asm_1189c4 + cp $7f + jr z, .asm_1189c2 + ld [bc], a + inc bc + jr .asm_1189b5 + +.asm_1189c2 + ld a, $50 + +.asm_1189c4 + ld [bc], a + pop af + ldh [rSVBK], a + hlcoord 13, 9 + call PlaceString + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .b_button + ld a, [hl] + and A_BUTTON + jr nz, .a_button + ld a, [hl] + and D_DOWN + jr nz, .d_down + ld a, [hl] + and D_UP + jr nz, .d_up +.asm_1189e5 + ret + +.d_down + ld hl, wcd4f + dec [hl] + jr nz, .asm_1189e5 + ld a, [wcd4a] + ld [hl], a + jr .asm_1189e5 + +.d_up + ld a, [wcd4a] + ld hl, wcd4f + inc [hl] + cp [hl] + jr nc, .asm_1189e5 + ld a, $1 + ld [hl], a + jr .asm_1189e5 + +.a_button + call PlayClickSFX + ld a, [wcd4f] + ld hl, wcd4a + cp [hl] + jr z, .asm_118a3c + dec a + and $fe + srl a + ld [wcf65], a + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + call CloseWindow + pop af + ldh [rSVBK], a + ld a, [wcd38] + and a + jr nz, .asm_118a30 + call BattleTower_LevelCheck + ret c + call BattleTower_UbersCheck + ret c + +.asm_118a30 + ld a, [wcd4f] + ld [w3_d800], a + jp BattleTowerRoomMenu_IncrementJumptable + +.b_button + call PlayClickSFX + +.asm_118a3c + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + call CloseWindow + pop af + ldh [rSVBK], a + ld a, $7 + ld [wBattleTowerRoomMenuJumptableIndex], a + ld a, $0 + ld [wMobileInactivityTimerFrames], a + ret + +Function118a54: ; unreferenced + ld a, [wcd55] + ld l, a + ld a, [wcd56] + ld h, a + ld de, wc3ec + ld bc, $0004 + jp Function118ae4 + +Function118a65: ; unreferenced + ld hl, BattleDownloadURL + ld de, wcc60 + ld bc, $80 + call CopyBytes + ld de, w3_d000 + ld bc, $1000 + jp Function118b10 + +SetBattleDownloadURL: + ld hl, BattleDownloadURL + ld de, wcc60 + ld bc, $80 + call CopyBytes + ld de, w3_d000 + ld bc, $1000 + jp Function118b10 + +SetExchangeDownloadURL: + ld hl, ExchangeDownloadURL + ld de, wcc60 + ld bc, $80 + call CopyBytes + ld de, w3_d000 + ld bc, $1000 + jp Function118b10 + +SetNewsDownloadURL: + ld hl, NewsDownloadURL + ld de, wcc60 + ld bc, $80 + call CopyBytes + ld a, $5 + ldh [rSVBK], a + ld de, w3_d100 + ld bc, $e00 + jr Function118b10 + +SetStadiumDownloadURL: + ld hl, StadiumDownloadURL + ld de, wcc60 + ld bc, $80 + call CopyBytes + ld de, w3_d000 + ld bc, $1000 + jr Function118b10 + +SetOddEggDownloadURL: + ld hl, OddEggDownloadURL + ld de, wcc60 + ld bc, $80 + call CopyBytes + ld de, w3_d000 + ld bc, $1000 + jr Function118b10 + +Function118ae4: + push bc + push de + push hl + ld a, $8 + ld [wBattleTowerRoomMenu2JumptableIndex], a + call BattleTowerRoomMenu2 + pop hl + ld c, $0 + ld de, wcc60 +.asm_118af5 + ld a, [hli] + ld [de], a + inc de + and a + jr z, .asm_118b06 + inc c + ld a, c + cp $a6 + jr c, .asm_118af5 + ld a, $da + jp SetMobileErrorCode + +.asm_118b06 + call Function118b24 + pop de + pop bc + ld a, MOBILEAPI_15 + jp Function119e2b + +Function118b10: + push de + push bc + ld a, $8 + ld [wBattleTowerRoomMenu2JumptableIndex], a + call BattleTowerRoomMenu2 + call Function118b24 + pop bc + pop de + ld a, MOBILEAPI_15 + jp Function119e2b + +Function118b24: + ld hl, wc346 + ld a, LOW(wc708) + ld [hli], a + ld a, HIGH(wc708) + ld [hli], a + ld a, LOW(wcc60) + ld [hli], a + ld a, HIGH(wcc60) + ld [hli], a + call Function119eb4 + call Function119ec2 + ld a, $80 + ld [wcd89], a + ld hl, wc346 + ret + +Function118b42: + ld hl, wd002 + ld a, l + ld [wcd51], a + ld a, h + ld [wcd52], a + call Function118b8c + ld a, l + ld [wcd55], a + ld [wcd59], a + ld a, h + ld [wcd56], a + ld [wcd5a], a + call Function118b8c + ld a, l + ld [wcd53], a + ld [wcd5d], a + ld a, h + ld [wcd54], a + ld [wcd5e], a + call Function118b8c + ld a, l + ld [wcd57], a + ld [wcd5b], a + ld a, h + ld [wcd58], a + ld [wcd5c], a + call Function118b8c + ld a, l + ld [wcd5f], a + ld a, h + ld [wcd60], a + ret + +Function118b8c: +.asm_118b8c + call Function118b9a + ret nc + ld a, [hli] + cp $d + jr nz, .asm_118b8c + dec hl + xor a + ld [hli], a + ld [hli], a + ret + +Function118b9a: + ld a, h + cp $e0 + ret c + ld a, $d3 + call SetMobileErrorCode + and a + ret + +pushc +setcharmap ascii + +ExchangeDownloadURL: + db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/exchange/index.txt", 0 + +BattleDownloadURL: + db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/battle/index.txt", 0 + +NewsDownloadURL: + db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/news/index.txt", 0 + +StadiumDownloadURL: + db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/POKESTA/menu.cgb", 0 + +OddEggDownloadURL: + db "http://gameboy.datacenter.ne.jp/cgb/download?name=/01/CGB-BXTJ/tamago/index.txt", 0 + +popc + +Function118d35: ; unreferenced + ld hl, $d200 + ld a, [wcd38] + and a + jr nz, .asm_118d6e + ld a, [hli] + cp $94 + jr nz, .asm_118d7b + ld a, [hl] + cp $5 + jr nz, .asm_118d7b + ld a, [wcd4f] + sla a + ld b, a + sla a + sla a + add b + ld b, a + ld a, BANK(s5_b2fb) + call OpenSRAM + ld a, b + ld [s5_b2fb], a + call CloseSRAM + farcall Function170be4 + farcall Function1700c4 + jr .asm_118d78 + +.asm_118d6e + ld a, [hli] + cp $96 + jr nz, .asm_118d7b + ld a, [hl] + cp $0 + jr nz, .asm_118d7b + +.asm_118d78 + jp BattleTowerRoomMenu_IncrementJumptable + +.asm_118d7b + ld a, $d3 + jp SetMobileErrorCode + +Function118d80: + call Function118e06 + ld a, [wcd38] + and a + jr z, .asm_118d8e + call BattleTowerRoomMenu_IncrementJumptable + jr asm_118d9f + +.asm_118d8e + ld a, $9 + ld [wBattleTowerRoomMenu2JumptableIndex], a + ld a, $12 + ld [wMobileInactivityTimerSeconds], a + call BattleTowerRoomMenu_IncrementJumptable + +Function118d9b: + call BattleTowerRoomMenu2 + ret c + +asm_118d9f: + ld hl, wc608 + call Function119940 + ld a, [wcd38] + and a + jr nz, .asm_118db2 + ld a, TRADE_CORNER_REQUEST_LENGTH + ld [wcd3b], a + jr .asm_118db7 + +.asm_118db2 + ld a, $26 + ld [wcd3b], a + +.asm_118db7 + ld hl, w3_d800 + ld a, LOW(wc608) + ld [hli], a + ld a, HIGH(wc608) + ld [hli], a + ld a, [wcd3b] + ld [hli], a + xor a + ld [hli], a + ld a, LOW(wc708) + ld [hli], a + ld a, HIGH(wc708) + ld [hli], a + ld a, [wcd39] + ld [hli], a + ld a, [wcd3a] + ld [hli], a + call Function119eb4 + call Function119ec2 + ld a, $40 + ld [wcd89], a + ld hl, w3_d800 + ld de, w3_de00 + ld bc, $200 + ld a, MOBILEAPI_16 + jp Function119e2b + +Function118ded: + ld a, [wcd38] + and a + jr z, .asm_118e03 + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + farcall Function11b93b + pop af + ldh [rSVBK], a + +.asm_118e03 + jp BattleTowerRoomMenu_IncrementJumptable + +Function118e06: + ld hl, wd002 + ld a, [wcd38] + and a + jr z, .asm_118e1d +.asm_118e0f + call Function118b9a + ret nc + ld a, [hli] + cp $d + jr nz, .asm_118e0f + ld a, [hli] + cp $a + jr nz, .asm_118e0f + +.asm_118e1d + ld a, l + ld [wcd39], a + ld a, h + ld [wcd3a], a +.asm_118e25 + call Function118b9a + ret nc + ld a, [hli] + cp $d + jr nz, .asm_118e25 + ld a, [hli] + cp $a + jr nz, .asm_118e25 + dec hl + xor a + ld [hld], a + ld [hl], a + jr asm_118e3e + +Function118e39: + ld a, [hli] + and a + jr nz, Function118e39 + dec hl + +asm_118e3e: + ld a, [hld] + cp $2f + jr nz, asm_118e3e + inc hl + inc hl + ld de, wcd85 + ld c, $4 +.asm_118e4a + ld a, [hli] + cp $2e + jr z, .asm_118e63 + cp $30 + jr c, .asm_118e67 + cp $3a + jr nc, .asm_118e67 + sub $30 + add $f6 + ld [de], a + inc de + dec c + jr nz, .asm_118e4a + ld de, wcd85 +.asm_118e63 + ld a, $50 + ld [de], a + ret +.asm_118e67 + ld a, $f3 + ld [de], a + inc de + jr .asm_118e63 + +Function118e6d: + xor a + ld [wcd65], a + ld a, MOBILEAPI_05 + jp Function119e2b + +Function118e76: + ; Call $c in BattleTowerRoomMenu2 + ld a, $c + ld [wBattleTowerRoomMenu2JumptableIndex], a + jp BattleTowerRoomMenu_IncrementJumptable + +Function118e7e: + call BattleTowerRoomMenu2 + ret c + ld a, MOBILEAPI_1B + jp Function119e2b + +BattleTowerRoomMenu_CallRoomMenu2: + call BattleTowerRoomMenu2 + ret c + ld a, [wcd33] + ld [wBattleTowerRoomMenuJumptableIndex], a + ret + +Function118e92: + call Function118440 + call Function1191d3 + ld a, [wcd53] + ld l, a + ld a, [wcd54] + ld h, a + ld de, wcc60 + call Function1191ad + ret c + ld de, w3_d800 + ld bc, $0800 + jp Function118b10 + +Function118eb0: + call Function118440 + ld hl, w3_d802 + ld de, wBGMapBuffer + ld bc, $000c + call CopyBytes + call Function1192cc + ret c + jp BattleTowerRoomMenu_IncrementJumptable + +Function118ec6: + call Function118440 + call SpeechTextbox + ld hl, w3_d80e + ld de, wc320 + ld bc, $0026 + call CopyBytes + xor a + ld [wc31f], a + ld a, LOW(wc320) + ld [wc31b], a + ld a, HIGH(wc320) + ld [wc31c], a + hlcoord 1, 14 + ld a, l + ld [wc31d], a + ld a, h + ld [wc31e], a + ld a, $2 + ld [wc31a], a + ld a, $1d + ld [wBattleTowerRoomMenu2JumptableIndex], a + ld a, $24 + ld [wMobileInactivityTimerSeconds], a + ld a, $11 + ld [wMobileInactivityTimerFrames], a + ld a, $1c + ld [wcd47], a + jp BattleTowerRoomMenu_IncrementJumptable + +Function118f0d: + call BattleTowerRoomMenu2 + ret c + call Function118440 + +Function118f14: + call Function118440 + ld a, [wcd51] + ld l, a + ld a, [wcd52] + ld h, a + ld de, wcc60 + call Function1191ad + ret c + ld a, [wcc60] + and a + jr z, .DontSendSaveFile + ld hl, Text_SaveFileWillBeSent + call BattleTowerRoomMenu_SetMessage + +.DontSendSaveFile: + ld a, [wcd57] + ld l, a + ld a, [wcd58] + ld h, a + ld de, wcc60 + call Function1191ad + ret c + ld hl, wcc60 + call Function118e39 + ld a, $9 + ld [wBattleTowerRoomMenu2JumptableIndex], a + ld a, $24 + ld [wMobileInactivityTimerSeconds], a + ld a, $13 + ld [wMobileInactivityTimerFrames], a + ld a, $1c + ld [wcd47], a + jp BattleTowerRoomMenu_IncrementJumptable + +Function118f5e: + call BattleTowerRoomMenu2 + ret c + call Function118440 + call DelayFrame + +Function118f68: + call Function119223 + ret c + call Function118440 + ld a, [wcd51] + ld l, a + ld a, [wcd52] + ld h, a + ld de, wcc60 + call Function1191ad + ret c + ld a, [wcc60] + and a + jr z, .asm_118fba + ld hl, wc346 + ld a, LOW(wc608) + ld [hli], a + ld a, HIGH(wc608) + ld [hli], a + ld a, [wcd4b] + ld [hli], a + ld a, [wcd4c] + ld [hli], a + ld a, LOW(wc708) + ld [hli], a + ld a, HIGH(wc708) + ld [hli], a + ld a, LOW(wcc60) + ld [hli], a + ld a, HIGH(wcc60) + ld [hli], a + call Function119eb4 + call Function119ec2 + ld a, $40 + ld [wcd89], a + ld hl, wc346 + ld de, w3_de00 + ld bc, $200 + ld a, MOBILEAPI_16 + jp Function119e2b + +.asm_118fba + call BattleTowerRoomMenu_IncrementJumptable + jp BattleTowerRoomMenu_IncrementJumptable + +Function118fc0: + call Function118440 + ld a, [wcd55] + ld l, a + ld a, [wcd56] + ld h, a + ld de, wcc60 + call Function1191ad + ret c + ld a, [wcc60] + and a + jr z, .asm_118ffa + ld a, [wcd51] + ld l, a + ld a, [wcd52] + ld h, a + ld de, wcc60 + call Function1191ad + ret c + ld a, [wcc60] + and a + jr z, .asm_118ff2 + ld hl, Text_SentSaveFileReadingNews + jr .asm_118ff5 + +.asm_118ff2 + ld hl, Text_ReadingNews + +.asm_118ff5 + call BattleTowerRoomMenu_SetMessage + jr Function119009 + +.asm_118ffa + ld hl, Text_ReadingNews + call BattleTowerRoomMenu_SetMessage + call BattleTowerRoomMenu_IncrementJumptable + call BattleTowerRoomMenu_IncrementJumptable + jp BattleTowerRoomMenu_IncrementJumptable + +Function119009: + call Function118440 + call Function119300 + ld a, [wcd55] + ld l, a + ld a, [wcd56] + ld h, a + ld de, wcc60 + call Function1191ad + ret c + ld hl, wc346 + ld a, LOW(wc608) + ld [hli], a + ld a, HIGH(wc608) + ld [hli], a + ld a, [wcd4b] + ld [hli], a + ld a, [wcd4c] + ld [hli], a + ld a, LOW(wc708) + ld [hli], a + ld a, HIGH(wc708) + ld [hli], a + ld a, LOW(wcc60) + ld [hli], a + ld a, HIGH(wcc60) + ld [hli], a + call Function119eb4 + call Function119ec2 + ld a, $40 + ld [wcd89], a + ld hl, wc346 + ld de, w3_d000 + ld bc, $1000 + ld a, MOBILEAPI_16 + jp Function119e2b + +Function119054: + ld a, $6 + call OpenSRAM + ld hl, wd002 + ld a, [wcd4f] + ld e, a + ld a, [wcd50] + ld d, a + ld a, [w3_d000] + ld c, a + ld a, [w3_d000 + 1] + ld b, a + call Function119192 + ret c + ld a, [wcd89] + and $1 + jr z, .asm_11908a + ld a, $6 + ldh [rSVBK], a + ld hl, wd002 + ld a, [w3_d000] + ld c, a + ld a, [w3_d000 + 1] + ld b, a + call Function119192 + ret c + +.asm_11908a + call CloseSRAM + ld a, $3 ; ??? + ldh [rSVBK], a + ld a, BANK(s5_b1b3) ; aka BANK(s5_b1b4) and BANK(s5_aa7f) and BANK(s5_b2f3) and BANK(s5_b2f4) + call OpenSRAM + ld a, [wcd4f] + ld [s5_b1b3], a + ld a, [wcd50] + ld [s5_b1b4], a + ld hl, wcd20 + ld de, s5_aa7f + ld bc, 12 + call CopyBytes + ldh a, [rSVBK] + push af + ld a, BANK(wd474) ; aka BANK(wd475) + ldh [rSVBK], a + ld a, [wd474] + ld [s5_b2f3], a + ld hl, wd475 + ld de, s5_b2f4 + ld bc, 4 + call CopyBytes + pop af + ldh [rSVBK], a + call CloseSRAM + jp BattleTowerRoomMenu_IncrementJumptable + +Function1190d0: + ld a, BANK(w3_d000) + ldh [rSVBK], a + ld a, [wcd57] + ld l, a + ld a, [wcd58] + ld h, a + ld de, wcc60 + call Function1191ad + ret c + ld de, w3_d000 + ld bc, $1000 + jp Function118b10 + +Function1190ec: + ld a, BANK(s5_aa73) + call OpenSRAM + ld hl, wBGMapBuffer + ld de, s5_aa73 + ld bc, 12 + call CopyBytes + call CloseSRAM + ld a, BANK(s5_aa72) + call OpenSRAM + ld a, $1 + ld [s5_aa72], a + call CloseSRAM + ld a, BANK(s6_a000) + call OpenSRAM + ld a, [w3_d000] + ld c, a + ld a, [w3_d000 + 1] + ld b, a + ld hl, wd002 + ld de, s6_a000 + call Function119192 + ret c + ld a, [wcd89] + and $1 + jr z, .asm_11913e + ld a, BANK(w6_d000) + ldh [rSVBK], a + ld a, [w6_d000] + ld c, a + ld a, [w6_d000 + 1] + ld b, a + ld hl, w6_d000 + 2 + call Function119192 + ret c + +.asm_11913e + ld a, BANK("Battle Tower RAM") + ldh [rSVBK], a + call CloseSRAM + ld hl, Text_ReceivedNews + call BattleTowerRoomMenu_SetMessage + jp BattleTowerRoomMenu_IncrementJumptable + +Function11914e: + call BattleTowerRoomMenu2 + ret c + ld a, $1c + ld [wBattleTowerRoomMenuJumptableIndex], a + ld a, $a + ld [wMobileErrorCodeBuffer], a + ret + +Function11915d: + ld hl, w3_d802 + ld de, wcd20 + ld bc, 12 + call CopyBytes + ld a, BANK(s5_aa7f) + call OpenSRAM + ld hl, wBGMapBuffer + ld de, s5_aa7f + ld c, 12 +.asm_119176 + ld a, [de] + inc de + cp [hl] + jr nz, .asm_119184 + inc hl + dec c + jr nz, .asm_119176 + call BattleTowerRoomMenu_IncrementJumptable + jr .asm_11918e + +.asm_119184 + ld a, $16 + ld [wBattleTowerRoomMenuJumptableIndex], a + ld a, $b + ld [wMobileErrorCodeBuffer], a + +.asm_11918e + call CloseSRAM + ret + +Function119192: + inc b + inc c + jr .asm_11919e + +.asm_119196 + ld a, [hli] + ld [de], a + inc de + ld a, $bf + cp d + jr c, .asm_1191a6 + +.asm_11919e + dec c + jr nz, .asm_119196 + dec b + jr nz, .asm_119196 + and a + ret + +.asm_1191a6 + ld a, $d3 + call SetMobileErrorCode + scf + ret + +Function1191ad: + push bc + ld c, $0 + ld a, $5 + ldh [rSVBK], a +.asm_1191b4 + ld a, [hli] + ld [de], a + inc de + and a + jr z, .asm_1191cc + inc c + ld a, c + cp $a6 + jr c, .asm_1191b4 + ld a, $da + call SetMobileErrorCode + ld a, BANK("Battle Tower RAM") + ldh [rSVBK], a + pop bc + scf + ret + +.asm_1191cc + ld a, BANK("Battle Tower RAM") + ldh [rSVBK], a + pop bc + and a + ret + +Function1191d3: + ld hl, w3_d100 + 2 + ld a, l + ld [wcd53], a + ld a, h + ld [wcd54], a + call Function11920f + ld a, l + ld [wcd51], a + ld a, [wcd4a] + ld a, h + ld [wcd52], a + call Function11920f + ld a, l + ld [wcd55], a + ld a, [wcd4a] + ld a, h + ld [wcd56], a + call Function11920f + ld a, [wcd49] + ld a, l + ld [wcd57], a + ld a, [wcd4a] + ld a, h + ld [wcd58], a + call Function11920f + ret + +Function11920f: +.asm_11920f + call Function118b9a + ret nc + ld a, [hli] + cp $d + jr nz, .asm_11920f + ld a, [hli] + cp $a + jr nz, .asm_11920f + dec hl + xor a + ld [hld], a + ld [hli], a + inc hl + ret + +Function119223: + xor a + ld [wcd4b], a + ld [wcd4c], a + ld a, BANK(s5_b092) ; aka BANK(s5_b1b1) and BANK(s5_b1b2) and BANK(s5_b1d3) + call OpenSRAM + ld hl, wEmailAddress + ld de, s5_b092 + ld bc, 31 + call CopyBytes + dec de + xor a + ld [de], a + ld hl, w3_d810 +.asm_119241 + ld a, [hli] + cp $50 + jr nz, .asm_119241 + ld a, [hli] + ld [wcd4f], a + ld a, [hli] + ld [wcd50], a + ld a, [hli] + ld [s5_b1b1], a + ld c, a + ld a, [hli] + ld [s5_b1b2], a + ld b, a + ld de, s5_b1d3 + call CopyBytes + call CloseSRAM + ld e, l + ld d, h + ld hl, wc608 +.asm_119266 + ld a, [de] + inc de + cp $ff + jr z, .asm_1192c2 + cp $fe + jr z, .asm_1192a5 + call OpenSRAM + ld a, [de] + inc de + ld c, a + ld a, [de] + inc de + ld b, a + ld a, [de] + inc de + push de + push af + ld a, [wcd4b] + ld e, a + ld a, [wcd4c] + ld d, a + pop af +.asm_119286 + push af + ld a, [bc] + inc bc + ld [hli], a + inc de + pop af + dec a + jr nz, .asm_119286 + call CloseSRAM + ld a, e + ld [wcd4b], a + ld a, d + ld [wcd4c], a + pop de +.asm_11929b + and a + jr z, .asm_119266 + ld a, $d3 + call SetMobileErrorCode + scf + ret + +.asm_1192a5 + ld a, [wcd4b] + ld c, a + ld a, [wcd4c] + ld b, a + ld a, [de] + inc de +.asm_1192af + push af + ld a, [de] + inc de + ld [hli], a + inc bc + pop af + dec a + jr nz, .asm_1192af + ld a, c + ld [wcd4b], a + ld a, b + ld [wcd4c], a + jr .asm_11929b + +.asm_1192c2 + ld a, e + ld [wcd4d], a + ld a, d + ld [wcd4e], a + and a + ret + +Function1192cc: + ld a, BANK(s5_aa73) + call OpenSRAM + ld hl, s5_aa73 + ld de, wc608 + ld bc, 12 + call CopyBytes + call CloseSRAM + ld hl, wc608 + ld de, wcd20 + ld c, $c +.asm_1192e8 + ld a, [de] + inc de + ld b, a + ld a, [hli] + cp b + jr nz, .asm_1192fe + dec c + jr nz, .asm_1192e8 + ld a, $1f + ld [wBattleTowerRoomMenu2JumptableIndex], a + ld a, $27 + ld [wBattleTowerRoomMenuJumptableIndex], a + scf + ret + +.asm_1192fe + and a + ret + +Function119300: + xor a + ld [wcd4b], a + ld [wcd4c], a + ld a, [wcd4d] + ld e, a + ld a, [wcd4e] + ld d, a + ld hl, wc608 + ld a, [wcd4b] + ld c, a + ld a, [wcd4c] + ld b, a +.asm_11931a + ld a, [de] + inc de + cp $50 + jr z, .asm_119324 + ld [hli], a + inc bc + jr .asm_11931a + +.asm_119324 + ld a, $3d + ld [hli], a + inc bc + ld a, c + ld [wcd4b], a + ld a, b + ld [wcd4c], a + ld a, [de] + inc de + call OpenSRAM + ld a, [de] + inc de + ld c, a + ld a, [de] + inc de + ld b, a + ld a, [de] + inc de + push de + push af + ld a, [wcd4b] + ld e, a + ld a, [wcd4c] + ld d, a + pop af +.asm_119348 + push af + ld a, [bc] + and $f0 + swap a + call Function1197bf + ld [hli], a + inc de + ld a, [bc] + inc bc + and $f + call Function1197bf + ld [hli], a + inc de + pop af + dec a + jr nz, .asm_119348 + call CloseSRAM + ld a, e + ld [wcd4b], a + ld a, d + ld [wcd4c], a + pop de + ld a, [de] + cp $50 + jr z, .asm_11937f + ld a, [wcd4b] + ld c, a + ld a, [wcd4c] + ld b, a + ld a, $26 + ld [hli], a + inc bc + jr .asm_11931a + +.asm_11937f + ret + +Function119380: + ld a, $80 + ld [wcd49], a + jp BattleTowerRoomMenu_IncrementJumptable + +Function119388: + ld hl, wcd49 + dec [hl] + ret nz + ld hl, wcc60 + call Function118e39 + ld a, $9 + ld [wBattleTowerRoomMenu2JumptableIndex], a + ld a, $10 + ld [wMobileInactivityTimerSeconds], a + call BattleTowerRoomMenu_IncrementJumptable + +Function1193a0: + call BattleTowerRoomMenu2 + ret c + call DelayFrame + ld a, $8 + ld [wBattleTowerRoomMenu2JumptableIndex], a + call BattleTowerRoomMenu2 + ld hl, wc346 + ld a, LOW(w3_d000) + ld [hli], a + ld a, HIGH(w3_d000) + ld [hli], a + ld a, [wcd3b] + ld [hli], a + xor a + ld [hli], a + ld a, LOW(wc708) + ld [hli], a + ld a, HIGH(wc708) + ld [hli], a + ld a, LOW(wcc60) + ld [hli], a + ld a, HIGH(wcc60) + ld [hli], a + call Function119eb4 + call Function119ec2 + ld a, $40 + ld [wcd89], a + ld hl, wc346 + ld de, w3_de00 + ld bc, $200 + ld a, MOBILEAPI_16 + jp Function119e2b + +Function1193e3: + ld hl, wcd49 + dec [hl] + ret nz + ld hl, wcc60 + call Function118e39 + ld a, $9 + ld [wBattleTowerRoomMenu2JumptableIndex], a + ld a, $11 + ld [wMobileInactivityTimerSeconds], a + call BattleTowerRoomMenu_IncrementJumptable + +Function1193fb: + call BattleTowerRoomMenu2 + ret c + call DelayFrame + ld a, $8 + ld [wBattleTowerRoomMenu2JumptableIndex], a + call BattleTowerRoomMenu2 + ld de, w3_d000 + ld bc, $1000 + jp Function118b10 + +Function119413: + ld a, $6 ; ??? + call OpenSRAM + ld a, [w3_d000] + ld c, a + ld a, [w3_d000 + 1] + ld b, a + dec bc + dec bc + ld hl, wd002 + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + call Function119192 + ret c + ld a, [wcd89] + and $1 + jr z, .asm_119447 + ld a, BANK(w6_d000) + ldh [rSVBK], a + ld a, [w6_d000] + ld c, a + ld a, [w6_d000 + 1] + ld b, a + ld hl, w6_d000 + 2 + call Function119192 + ret c + +.asm_119447 + ld a, BANK("Battle Tower RAM") + ldh [rSVBK], a + call CloseSRAM + jp BattleTowerRoomMenu_IncrementJumptable + +Function119451: + ld a, [wcd89] + and $1 + jr z, .asm_11945d + ld a, $d3 + jp SetMobileErrorCode +.asm_11945d + xor a + ld [wcd50], a + call Function119694 + ld a, b + ld [wcd49], a + call Function1196cd + ld a, [wd002] + ld hl, wd003 + +Function119471: + push af + ld a, [hli] + ld [wc608], a + ld a, [hli] + ld [wc608 + 3], a + ld a, [hli] + ld [wc608 + 1], a + ld a, [hli] + ld [wc608 + 2], a + ld a, [hli] + ld [wc608 + 4], a + ld a, [hli] + ld [wc608 + 5], a + push hl + ld a, [wc608] + cp $ff + jr z, .asm_1194a7 + ld a, [wc608 + 2] + cp $ff + jr z, .asm_1194a7 + ld a, [wc608 + 1] + cp $ff + jr nz, .asm_1194a7 + call Function119584 + jr c, .asm_11950c + jr .asm_1194f0 +.asm_1194a7 + ld hl, wc608 + ld de, wc608 + 3 + ld c, $3 +.asm_1194af + ld a, [de] + inc de + cp [hl] + inc hl + jr c, .asm_1194f3 + jr z, .asm_1194b9 + jr nc, .asm_1194bc +.asm_1194b9 + dec c + jr nz, .asm_1194af +.asm_1194bc + ld c, $3 + ld hl, wcd49 + ld de, wc608 +.asm_1194c4 + ld a, [de] + inc de + cp $ff + jr z, .asm_1194d1 + cp [hl] + jr z, .asm_1194d1 + jr c, .asm_1194d5 + jr nc, .asm_1194f0 +.asm_1194d1 + inc hl + dec c + jr nz, .asm_1194c4 +.asm_1194d5 + ld c, $3 + ld hl, wcd49 + ld de, wc608 + 3 +.asm_1194dd + ld a, [de] + inc de + cp $ff + jr z, .asm_1194ea + cp [hl] + jr c, .asm_1194f0 + jr z, .asm_1194ea + jr nc, .asm_11950c +.asm_1194ea + inc hl + dec c + jr nz, .asm_1194dd + jr .asm_11950c +.asm_1194f0 + pop hl + jr .asm_119557 +.asm_1194f3 + ld c, $3 + ld hl, wcd49 + ld de, wc608 +.asm_1194fb + ld a, [de] + inc de + cp $ff + jr z, .asm_119508 + cp [hl] + jr c, .asm_11950c + jr z, .asm_119508 + jr nc, .asm_1194d5 +.asm_119508 + inc hl + dec c + jr nz, .asm_1194fb +.asm_11950c + pop hl + ld a, $1 + ld [wcd50], a + ld a, l + ld [wc608], a + ld a, h + ld [wc608 + 1], a + ld de, wcd69 + ld c, $10 + ld b, $0 +.asm_119521 + ld a, [de] + inc de + cp [hl] + inc hl + jr nz, .asm_119528 + inc b +.asm_119528 + dec c + jr nz, .asm_119521 + ld a, $10 + cp b + jr z, .asm_119536 +rept 4 + inc hl +endr + jr .asm_11957a +.asm_119536 + ld a, [hli] + cp $50 + jr nz, .asm_119552 + ld a, [hli] + cp $33 + jr nz, .asm_119553 + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, [wcd83] + cp c + jr nz, .asm_119576 + ld a, [wcd84] + cp b + jr nz, .asm_119576 + jr .asm_11955b +.asm_119552 + inc hl +.asm_119553 + inc hl + inc hl + jr .asm_11955b +.asm_119557 + ld de, $14 + add hl, de +.asm_11955b + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + add hl, de + pop af + dec a + jp nz, Function119471 + ld a, [wcd50] + and a + jr z, .asm_119571 + ld a, $1a + ld [wBattleTowerRoomMenuJumptableIndex], a + ret +.asm_119571 + ld a, $d8 + jp SetMobileErrorCode +.asm_119576 + ld a, $10 + jr .asm_11957c +.asm_11957a + ld a, $f +.asm_11957c + ld [wBattleTowerRoomMenuJumptableIndex], a + pop af + call Function1195c4 + ret + +Function119584: + ld a, [wc608] + ld b, a + ld a, [wc608 + 3] + ld c, a + cp b + jr c, .asm_11959c + ld a, [wcd49] + cp b + jr c, .asm_1195c2 +.asm_119595 + cp c + jr c, .asm_1195a2 + jr z, .asm_1195a2 + jr .asm_1195c2 +.asm_11959c + ld a, [wcd49] + cp b + jr c, .asm_119595 +.asm_1195a2 + ld a, [wc608 + 2] + ld b, a + ld a, [wc608 + 5] + ld c, a + cp b + jr c, .asm_1195ba + ld a, [wcd4b] + cp b + jr c, .asm_1195c2 +.asm_1195b3 + cp c + jr c, .asm_1195c0 + jr z, .asm_1195c0 + jr .asm_1195c2 +.asm_1195ba + ld a, [wcd4b] + cp b + jr c, .asm_1195b3 +.asm_1195c0 + scf + ret +.asm_1195c2 + and a + ret + +Function1195c4: + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld de, $a5 + ld a, b + cp d + jr c, .asm_1195d9 + jr z, .asm_1195d3 + jr nc, .asm_1195f3 +.asm_1195d3 + ld a, c + cp e + jr z, .asm_1195d9 + jr nc, .asm_1195f3 +.asm_1195d9 + ld de, wcc60 + call CopyBytes + xor a + ld [de], a + ld a, [wc608] + ld l, a + ld a, [wc608 + 1] + ld h, a + ld de, wcd69 + ld bc, $10 + call CopyBytes + ret +.asm_1195f3 + ld a, $d8 + jp SetMobileErrorCode + +Function1195f8: + ld a, $11 + ld [wBattleTowerRoomMenu2JumptableIndex], a + ld a, $1c + ld [wMobileInactivityTimerSeconds], a + ld a, $f + ld [wMobileInactivityTimerFrames], a + ld a, $14 + ld [wcd47], a + call BattleTowerRoomMenu_IncrementJumptable + jp BattleTowerRoomMenu_IncrementJumptable + +Function119612: + ld a, $14 + ld [wBattleTowerRoomMenu2JumptableIndex], a + ld a, $1c + ld [wMobileInactivityTimerSeconds], a + ld a, $10 + ld [wMobileInactivityTimerFrames], a + ld a, $14 + ld [wcd47], a + jp BattleTowerRoomMenu_IncrementJumptable + +Function119629: + call BattleTowerRoomMenu2 + ret c + ld a, LOW(wcc60) + ld l, a + ld a, HIGH(wcc60) + ld h, a + call Function118e39 + ld a, $9 + ld [wBattleTowerRoomMenu2JumptableIndex], a + ld a, $1c + ld [wMobileInactivityTimerSeconds], a + ld a, $14 + ld [wcd47], a + call BattleTowerRoomMenu_IncrementJumptable + +Function119648: + call BattleTowerRoomMenu2 + ret c + call DelayFrame + ld a, $8 + ld [wBattleTowerRoomMenu2JumptableIndex], a + call BattleTowerRoomMenu2 + call Function118b24 + ld de, w3_d000 + ld bc, $1000 + ld a, MOBILEAPI_15 + jp Function119e2b + +Function119665: + ld a, $1a + ld [wBattleTowerRoomMenu2JumptableIndex], a + call BattleTowerRoomMenu_IncrementJumptable + +Function11966d: + call BattleTowerRoomMenu2 + ret c + ld a, [wcd47] + ld [wBattleTowerRoomMenuJumptableIndex], a + ld a, $a + ld [wMobileErrorCodeBuffer], a + ret + +Function11967d: + ld a, $18 + ld [wBattleTowerRoomMenu2JumptableIndex], a + call BattleTowerRoomMenu_IncrementJumptable + +Function119685: + call BattleTowerRoomMenu2 + ret c + ld a, $14 + ld [wBattleTowerRoomMenuJumptableIndex], a + ld a, $a + ld [wMobileErrorCodeBuffer], a + ret + +Function119694: + ld b, 0 + ld hl, Unknown_1196b8 +.asm_119699 + ld de, wc708 + ld a, [de] + inc de + cp [hl] + inc hl + jr nz, .asm_1196af + ld a, [de] + inc de + cp [hl] + inc hl + jr nz, .asm_1196b0 + ld a, [de] + inc de + cp [hl] + inc hl + jr nz, .asm_1196b1 + ret +.asm_1196af + inc hl +.asm_1196b0 + inc hl +.asm_1196b1 + inc b + ld a, b + cp $7 + jr nz, .asm_119699 + ret + +pushc +setcharmap ascii + +Unknown_1196b8: + db "Mon" + db "Tue" + db "Wed" + db "Thu" + db "Fri" + db "Sat" + db "Sun" + +popc + +Function1196cd: + ld de, wc719 + call Function1196de + ld [wcd4a], a + inc de + call Function1196de + ld [wcd4b], a + ret + +Function1196de: + ld a, [de] + inc de + ; b = ([de] - 48) * 2 + ; c = ([de] - 48) * 10 + sub $30 + sla a + ld b, a + sla a + sla a + add b + ld c, a + add hl, bc + ld a, [de] + inc de + sub $30 + add c + ret + +Function1196f2: + ld hl, wd002 +.asm_1196f5 + call Function118b9a + ret nc + ld a, [hli] + cp $d + jr nz, .asm_1196f5 + ld a, [hl] + cp $a + jr nz, .asm_1196f5 + xor a + ld [hld], a + ld [hli], a + ld a, l + ld [wcd5b], a + ld a, h + ld [wcd5c], a + inc hl + ld e, l + ld d, h + ld a, [de] + inc de + cp $d + jr nz, .asm_119722 + ld a, [de] + inc de + cp $a + jr nz, .asm_119722 + ld a, $b + jp SetMobileErrorCode + +.asm_119722 + call Random + ld c, $0 + ld b, c +.asm_119728 + call Function119798 + ld a, d + cp $ff + jr nz, .asm_119735 + ld a, e + cp $ff + jr z, .asm_11974c + +.asm_119735 + ldh a, [hRandomSub] + cp d + jr c, .asm_11974c + jr z, .asm_11973e + jr .asm_119745 + +.asm_11973e + ldh a, [hRandomAdd] + cp e + jr c, .asm_11974c + jr z, .asm_11974c + +.asm_119745 + inc bc + ld a, c + or b + jr z, .asm_119770 + jr .asm_119728 + +.asm_11974c + ld a, [wcd5b] + ld l, a + ld a, [wcd5c] + ld h, a +.asm_119754 + ld a, [hld] + cp $58 + jr nz, .asm_119754 + ld d, $0 +.asm_11975b + inc d + ld a, [hld] + cp $58 + jr z, .asm_11975b + inc hl + inc hl + ld a, d + dec a + jr z, .asm_11978e + dec a + jr z, .asm_119785 + dec a + jr z, .asm_11977e + dec a + jr z, .asm_119775 + +.asm_119770 + ld a, $d3 + jp SetMobileErrorCode + +.asm_119775 + ld a, b + and $f0 + swap a + call Function1197bf + ld [hli], a + +.asm_11977e + ld a, b + and $f + call Function1197bf + ld [hli], a + +.asm_119785 + ld a, c + and $f0 + swap a + call Function1197bf + ld [hli], a + +.asm_11978e + ld a, c + and $f + call Function1197bf + ld [hli], a + jp BattleTowerRoomMenu_IncrementJumptable + +Function119798: + ld d, $0 + ld e, d + call Function1197b4 + swap a + or d + ld d, a + call Function1197b4 + or d + ld d, a + call Function1197b4 + swap a + or e + ld e, a + call Function1197b4 + or e + ld e, a + ret + +Function1197b4: + ld a, [hli] + cp $61 + jr nc, .asm_1197bc + sub $30 + ret + +.asm_1197bc + sub $57 + ret + +Function1197bf: + cp $a + jr nc, .asm_1197c6 + add $30 + ret + +.asm_1197c6 + add $57 + ret + +Function1197c9: + ld hl, wd002 + call Function118e39 + ld a, $9 + ld [wBattleTowerRoomMenu2JumptableIndex], a + ld a, $12 + ld [wMobileInactivityTimerSeconds], a + call BattleTowerRoomMenu_IncrementJumptable + +Function1197dc: + call BattleTowerRoomMenu2 + ret c + call DelayFrame + ld hl, wd002 + ld de, wcc60 + ld bc, $0080 + call CopyBytes + dec de + xor a + ld [de], a + call Function118b24 + ld de, w3_d000 + ld bc, $1000 + ld a, MOBILEAPI_15 + jp Function119e2b + +Function119800: + ld a, $fd + ld [wc6d0], a + ld [wOTTrademonSpecies], a + ld a, [wcd81] + ld [wc74e], a + ld a, [wJumptableIndex] + push af + ld a, [wcf64] + push af + ld a, [wcf65] + push af + ld a, [wBattleTowerRoomMenuJumptableIndex] + push af + ld a, $1 + ldh [rSVBK], a + call FadeToMenu + farcall Function10803d + call Function11a9ce + call RestartMapMusic + ld a, BANK("Battle Tower RAM") + ldh [rSVBK], a + pop af + ld [wBattleTowerRoomMenuJumptableIndex], a + pop af + ld [wcf65], a + pop af + ld [wcf64], a + pop af + ld [wJumptableIndex], a + farcall Function115dc3 + jp BattleTowerRoomMenu_IncrementJumptable + +Function11984e: + ld a, [wcd80] + and a + jr nz, .asm_1198a0 + ld a, [wcd38] + and a + jr nz, .asm_1198a8 + farcall Function170000 + ld a, [wJumptableIndex] + push af + ld a, [wcf64] + push af + ld a, [wcf65] + push af + ld a, [wBattleTowerRoomMenuJumptableIndex] + push af + ld a, $1 + ldh [rSVBK], a + call FadeToMenu + farcall MobileTradeAnimation_SendGivemonToGTS + call Function11a9ce + call RestartMapMusic + ld a, BANK("Battle Tower RAM") + ldh [rSVBK], a + pop af + ld [wBattleTowerRoomMenuJumptableIndex], a + pop af + ld [wcf65], a + pop af + ld [wcf64], a + pop af + ld [wJumptableIndex], a + farcall Function115dc3 + jp BattleTowerRoomMenu_IncrementJumptable + +.asm_1198a0 + ld a, $a + ld [wMobileErrorCodeBuffer], a + jp BattleTowerRoomMenu_IncrementJumptable + +.asm_1198a8 + farcall Function17005a + ld a, [wJumptableIndex] + push af + ld a, [wcf64] + push af + ld a, [wcf65] + push af + ld a, [wBattleTowerRoomMenuJumptableIndex] + push af + ld a, $1 + ldh [rSVBK], a + call FadeToMenu + farcall MobileTradeAnimation_RetrieveGivemonFromGTS + call Function11a9ce + call RestartMapMusic + ld a, BANK("Battle Tower RAM") + ldh [rSVBK], a + pop af + ld [wBattleTowerRoomMenuJumptableIndex], a + pop af + ld [wcf65], a + pop af + ld [wcf64], a + pop af + ld [wJumptableIndex], a + farcall Function115dc3 + jp BattleTowerRoomMenu_IncrementJumptable + +Function1198ee: + ld hl, Text_RegisteringRecord + call BattleTowerRoomMenu_SetMessage + call BattleTowerRoomMenu_IncrementJumptable + +Function1198f7: + ld a, [wc31a] + and a + ret nz + ld hl, wc608 + 2 + call Function119940 + ld hl, w3_d800 + ld a, LOW(wc608) + ld [hli], a + ld a, HIGH(wc608) + ld [hli], a + ld a, $f6 + ld [hli], a + xor a + ld [hli], a + ld a, LOW(wc708) + ld [hli], a + ld a, HIGH(wc708) + ld [hli], a + ld a, [wcd51] + ld [hli], a + ld a, [wcd52] + ld [hli], a + call Function119eb4 + call Function119ec2 + ld a, $40 + ld [wcd89], a + ld hl, w3_d800 + ld de, w3_de00 + ld bc, $200 + ld a, MOBILEAPI_16 + jp Function119e2b + +Function119937: + farcall BattleTowerAction_06 + jp BattleTowerRoomMenu_IncrementJumptable + +Function119940: + ld de, wEmailAddress + ld c, MOBILE_EMAIL_LENGTH +.asm_119945 + ld a, [de] + inc de + ld [hli], a + dec c + jr z, .asm_119953 + and a + jr nz, .asm_119945 + xor a +.asm_11994f + ld [hli], a + dec c + jr nz, .asm_11994f + +.asm_119953 + ret + +Function119954: + ld a, $1c + ld [wBattleTowerRoomMenu2JumptableIndex], a + call BattleTowerRoomMenu2 + ld hl, wc608 + ld de, wEmailAddress +.asm_119962 + ld a, [de] + inc de + ld [hli], a + and a + jr nz, .asm_119962 + call Function119ec2 + ld hl, wc608 + ld a, MOBILEAPI_0F + jp Function119e2b + +Function119973: + ld a, $1 + ld [wcf64], a + xor a + ld [wcf65], a + ld [w3_d090], a + ld de, w3_d000 + ld a, MOBILEAPI_10 + jp Function119e2b + +Function119987: + ld hl, w3_d000 + 1 + ld a, [w3_d000] + or [hl] + jr z, .asm_1199a0 + ld a, [wcf64] + ld l, a + ld a, [wcf65] + ld h, a + ld de, wBGPals2 + ld a, MOBILEAPI_11 + jp Function119e2b + +.asm_1199a0 + ld a, [w3_d090] + and a + jr z, .asm_1199ae + ld a, $16 + ld [wBattleTowerRoomMenuJumptableIndex], a + jp Function119b0d + +.asm_1199ae + ld a, $1b + ld [wBattleTowerRoomMenuJumptableIndex], a + ret + +Function1199b4: + ld a, [w3_d081 + 1] + and a + jr nz, .asm_1199c7 + ld a, [w3_d081] + cp $7 + jr nc, .asm_1199c7 + call BattleTowerRoomMenu_IncrementJumptable + jp Function1199ca + +.asm_1199c7 + jp Function119ac9 + +Function1199ca: + ld a, $20 + ld [wcd89], a + ld a, [wcf64] + ld l, a + ld a, [wcf65] + ld h, a + ld de, w3_d100 + ld bc, $0700 + ld a, MOBILEAPI_14 + jp Function119e2b + +Function1199e2: + ld c, $c + ld de, XGameCodePrefix + call Function119e4f + jp c, Function119ac9 + ld a, c + cp $1 + jp nz, Function119ac9 + ld hl, w3_d880 + ld bc, XGameCode +.loop + ld a, [bc] + and a + jr z, .game_result_prefix + cp [hl] + jp nz, Function119ac9 + inc bc + inc hl + jr .loop + +.game_result_prefix + ld c, $17 + ld de, XGameResultPrefix + call Function119e4f + jp c, .asm_119aa7 + ld a, c + cp $1 + jp nz, .asm_119aa7 + ld a, [w3_d880] + cp $31 + jp nz, .asm_119aa7 + ld a, [w3_d881] + cp $20 + jp nz, .asm_119aa7 + ld a, [w3_d88a] + cp $20 + jp nz, .asm_119aa7 + ld a, [w3_d894] + cp $20 + jp nz, .asm_119aa7 + xor a + ld [w3_d8a0], a + ld [w3_d8a1], a + ld [w3_d8a2], a + ld [w3_d8a3], a + ld hl, w3_d8a0 + ld bc, w3_d889 + call Function119e98 + call Function119e98 + ld hl, w3_d8a0 + ld a, [wcd2d] + cp [hl] + jr nz, Function119ac9 + inc hl + ld a, [wcd2c] + cp [hl] + jr nz, Function119ac9 + inc hl + ld a, [wcd2b] + cp [hl] + jr nz, Function119ac9 + inc hl + ld a, [wcd2a] + cp [hl] + jr nz, Function119ac9 + xor a + ld [w3_d8a0], a + ld [w3_d8a1], a + ld [w3_d8a2], a + ld [w3_d8a3], a + ld hl, w3_d8a0 + ld bc, w3_d88e + call Function119e98 + ld bc, w3_d893 + call Function119e98 + ld hl, w3_d8a0 + ld a, [wcd2f] + cp [hl] + jr nz, .asm_119aa7 + inc hl + ld a, [wcd2e] + cp [hl] + jr nz, .asm_119aa7 + inc hl + ld a, [wcd31] + cp [hl] + jr nz, .asm_119aa7 + inc hl + ld a, [wcd30] + cp [hl] + jr z, .asm_119aaf + +.asm_119aa7 + ld a, $25 + ld [wBattleTowerRoomMenuJumptableIndex], a + jp Function119b45 + +.asm_119aaf + ld a, [w3_d090] + and a + jr nz, .asm_119aa7 + ld a, [w3_d895] + sub $30 + ld [w3_d090], a + ld a, [wcf64] + ld [w3_d090 + 1], a + ld a, [wcf65] + ld [w3_d090 + 2], a + +Function119ac9: + ld a, [w3_d000] + ld l, a + ld a, [w3_d000 + 1] + ld h, a + dec hl + ld a, l + ld [w3_d000], a + ld a, h + ld [w3_d000 + 1], a + ld a, [wcf64] + ld l, a + ld a, [wcf65] + ld h, a + inc hl + ld a, l + ld [wcf64], a + ld a, h + ld [wcf65], a + ld a, $10 + ld [wBattleTowerRoomMenuJumptableIndex], a + ret + +pushc +setcharmap ascii + +XGameCode: + db "CGB-BXTJ-00", $0 + +XGameResult: ; unreferenced + db "pokemon_crystal", $0 + +popc + +Function119b0d: + ld a, $8 + ld [wBattleTowerRoomMenu2JumptableIndex], a + call BattleTowerRoomMenu2 + ld a, [w3_d090] + cp $1 + jr z, .asm_119b23 + ld a, $19 + ld [wBattleTowerRoomMenuJumptableIndex], a + jr Function119b3b + +.asm_119b23 + ld a, $10 + ld [wcd89], a + ld a, [w3_d090 + 1] + ld l, a + ld a, [w3_d090 + 2] + ld h, a + ld de, w3_d100 + ld bc, $0700 + ld a, MOBILEAPI_12 + jp Function119e2b + +Function119b3b: + ld a, [w3_d090 + 1] + ld l, a + ld a, [w3_d090 + 2] + ld h, a + jr asm_119b4d + +Function119b45: + ld a, [wcf64] + ld l, a + ld a, [wcf65] + ld h, a + +asm_119b4d: + ld a, MOBILEAPI_13 + jp Function119e2b + +Function119b52: + ld a, [w3_d090] + cp $1 + jr nz, .asm_119b66 + ld a, BANK(s5_a800) + call OpenSRAM + ld a, $4 + ld [s5_a800], a + call CloseSRAM + +.asm_119b66 + ld a, MOBILEAPI_0E + jp Function119e2b + +Function119b6b: + ld a, [w3_d090] + cp $1 + jr z, .asm_119b75 + jp BattleTowerRoomMenu_IncrementJumptable + +.asm_119b75 + ld a, [w3_d100] + ld b, a + ld a, [w3_d100 + 1] + or b + jr z, .asm_119be3 + ld hl, w3_d800 + ld de, w3_d100 + 2 +.asm_119b85 + ld a, [de] + inc de + cp $d + jr nz, .asm_119b85 + inc de + ld a, [de] + cp $d + jr nz, .asm_119b85 + inc de + inc de +.asm_119b93 + ld a, [de] + inc de + cp $d + jr z, .asm_119bfa + call .decodeBase64Character + ret c + ld [hli], a + ld a, [de] + inc de + call .decodeBase64Character + ret c + ld [hli], a + ld a, [de] + inc de + call .decodeBase64Character + ret c + ld [hli], a + ld a, [de] + inc de + call .decodeBase64Character + ret c + ld [hl], a + push de + ld d, [hl] + dec hl + ld c, [hl] + dec hl + ld b, [hl] + dec hl + ld a, [hl] + sla b + sla b + sla b + rla + sla b + rla + ld [hli], a + ld [hl], b + inc hl + rrc c + rrc c + ld [hl], c + dec hl + ld a, $f + and c + or [hl] + ld [hli], a + ld a, [hli] + and $c0 + or [hl] + dec hl + ld [hld], a + dec hl + pop de + inc hl + inc hl + inc hl + ld a, h + cp $e0 + jr c, .asm_119b93 + +.asm_119be3 + ld a, $19 + ld [wBattleTowerRoomMenuJumptableIndex], a + ld a, BANK(s5_a800) + call OpenSRAM + ld a, $1 + ld [s5_a800], a + call CloseSRAM + xor a + ld [w3_d090], a + ret + +.asm_119bfa + inc de + ld a, [de] + cp $d + jr nz, .asm_119b93 + ld a, l + cp LOW(w3_d869) + jr nz, .asm_119be3 + ld a, h + cp HIGH(w3_d869) + jr nz, .asm_119be3 + ld a, BANK(s5_b090) ; aka BANK(s5_b091) and BANK(s5_b023) + call OpenSRAM + ld a, [wcf64] + ld [s5_b090], a + ld a, [wcf65] + ld [s5_b091], a + ld hl, w3_d800 + ld de, s5_b023 + ld bc, 105 + call CopyBytes + ld a, $3 + ld [s5_a800], a + call CloseSRAM + ld hl, w3_d800 + ld de, wc608 + ld bc, 105 + call CopyBytes + jp BattleTowerRoomMenu_IncrementJumptable + +pushc +setcharmap ascii + +.decodeBase64Character + cp "+" + jr c, .asm_119c68 + jr z, .asm_119c80 + cp "/" + jr c, .asm_119c68 + jr z, .asm_119c84 + cp "0" + jr c, .asm_119c68 + cp "9" + 1 + jr c, .asm_119c88 + cp "=" + jr c, .asm_119c68 + jr z, .asm_119c8c + cp "A" + jr c, .asm_119c68 + cp "Z" + 1 + jr c, .asm_119c8f + cp "a" + jr c, .asm_119c68 + cp "z" + 1 + jr c, .asm_119c93 + +popc + +.asm_119c68 + ld a, $19 + ld [wBattleTowerRoomMenuJumptableIndex], a + ld a, BANK(s5_a800) + call OpenSRAM + ld a, $1 + ld [s5_a800], a + call CloseSRAM + xor a + ld [w3_d090], a + scf + ret + +.asm_119c80 + ld a, $3e + and a + ret + +.asm_119c84 + ld a, $3f + and a + ret + +.asm_119c88 + add $4 + and a + ret + +.asm_119c8c + xor a + and a + ret + +.asm_119c8f + sub $41 + and a + ret + +.asm_119c93 + sub $47 + and a + ret + +BattleTowerRoomMenu_UberRestrictionMessage: + ld hl, Text_UberRestriction + call BattleTowerRoomMenu_SetMessage + call BattleTowerRoomMenu_IncrementJumptable + jr BattleTowerRoomMenu_WaitForMessage + +BattleTowerRoomMenu_PartyMonTopsThisLevelMessage: + ld hl, Text_PartyMonTopsThisLevel + call BattleTowerRoomMenu_SetMessage + call BattleTowerRoomMenu_IncrementJumptable + +BattleTowerRoomMenu_WaitForMessage: + ld a, [wc31a] + and a + ret nz + ld a, $80 + ld [wcd50], a + call BattleTowerRoomMenu_IncrementJumptable + +BattleTowerRoomMenu_DelayRestartMenu: + ; Loops while (--[wcd50] != 0), + ; to create some sort of "delay" after the message is written on the screen, + ; before starting the menu again. + ld hl, wcd50 + dec [hl] + ret nz + ld a, $0 + ld [wBattleTowerRoomMenuJumptableIndex], a + ret + +BattleTowerRoomMenu_QuitMessage: + ld a, [wcd38] + and a + jr z, .asm_119cd1 + dec a + jr z, .asm_119cd6 + ld hl, Text_QuitReadingNews + jr .asm_119cd9 + +.asm_119cd1 + ld hl, Text_CancelBattleRoomChallenge + jr .asm_119cd9 + +.asm_119cd6 + ld hl, Text_ExitGymLeaderHonorRoll + +.asm_119cd9 + call BattleTowerRoomMenu_SetMessage + call BattleTowerRoomMenu_IncrementJumptable + +BattleTowerRoomMenu_PlaceYesNoMenu: + ld a, [wc31a] + and a + ret nz + ld a, $f + ld [wBattleTowerRoomMenu2JumptableIndex], a + call BattleTowerRoomMenu_IncrementJumptable + +BattleTowerRoomMenu_UpdateYesNoMenu: + ; Only ever called when [wBattleTowerRoomMenu2JumptableIndex] is $10 + call BattleTowerRoomMenu2 + ret c + ld a, [wMobileInactivityTimerFrames] + ld [wBattleTowerRoomMenuJumptableIndex], a + ret + +MenuHeader_119cf7: + db MENU_BACKUP_TILES ; flags + menu_coords 12, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw NULL + db 0 ; default option + +MenuData_119cff: ; unreferenced + db MENU_BACKUP_TILES ; flags + menu_coords 15, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw NULL + db 0 ; default option + +String_119d07: + db " ▼@" + +Strings_L10ToL100: + db " L:10 @@" + db " L:20 @@" + db " L:30 @@" + db " L:40 @@" + db " L:50 @@" + db " L:60 @@" + db " L:70 @@" + db " L:80 @@" + db " L:90 @@" + db " L:100@@" + db "CANCEL@@" + +Strings_Ll0ToL40: + db " L:10 @@" + db " L:20 @@" + db " L:30 @@" + db " L:40 @@" + db "CANCEL@@" + +BattleTowerCancelString: ; unreferenced + db "CANCEL@" + +BattleTower_LevelCheck: + ldh a, [rSVBK] + push af + ld a, BANK(wPartyMons) + ldh [rSVBK], a + ld a, [wcd4f] + ld c, 10 + call SimpleMultiply + ld hl, wcd50 + ld [hl], a + ld bc, PARTYMON_STRUCT_LENGTH + ld de, wPartyMon1Level + ld a, [wPartyCount] +.party_loop + push af + ld a, [de] + push hl + push de + pop hl + add hl, bc + push hl + pop de + pop hl + cp [hl] + jr z, .equal + jr nc, .exceeds +.equal + pop af + dec a + jr nz, .party_loop + pop af + ldh [rSVBK], a + and a + ret + +.exceeds + pop af + ld a, $4 + ld [wBattleTowerRoomMenuJumptableIndex], a + pop af + ldh [rSVBK], a + scf + ret + +BattleTower_UbersCheck: + ldh a, [rSVBK] + push af + ld a, [wcd4f] + cp 70 / 10 + jr nc, .level_70_or_more + ld a, BANK(wPartyMons) + ldh [rSVBK], a + ld hl, wPartyMon1Level + ld bc, PARTYMON_STRUCT_LENGTH + ld de, wPartySpecies + ld a, [wPartyCount] +.loop + push af + push bc + push de + push hl + ld a, [de] + call GetPokemonIndexFromID + ld b, h + ld c, l + ld hl, .ubers + ld de, 2 + call IsInWordArray + pop hl + pop de + pop bc + jr nc, .next +.uber + ld a, [hl] + cp 70 + jr c, .uber_under_70 +.next + add hl, bc + inc de + pop af + dec a + jr nz, .loop +.level_70_or_more + pop af + ldh [rSVBK], a + and a + ret + +.ubers + dw MEWTWO + dw MEW + dw LUGIA + dw HO_OH + dw CELEBI + dw -1 + +.uber_under_70 + pop af + ld a, [de] + ld [wNamedObjectIndex], a + call GetPokemonName + ld hl, wStringBuffer1 + ld de, wcd49 + ld bc, MON_NAME_LENGTH + call CopyBytes + ld a, $a + ld [wBattleTowerRoomMenuJumptableIndex], a + pop af + ldh [rSVBK], a + scf + ret + +Function119e2b: + call MobileAPI + +BattleTowerRoomMenu_IncrementJumptable: + ld hl, wBattleTowerRoomMenuJumptableIndex + inc [hl] + ret + +pushc +setcharmap ascii + +XGameCodePrefix: + db "X-Game-code:\n" + +XGameResultPrefix: + db "X-Game-result:\n" + +popc + +Function119e4f: + push bc + ld hl, w3_d100 + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a +.loop + ld a, [de] + cp [hl] + jr z, .found_equality +.next + inc hl + dec bc + ld a, b + or c + jr nz, .loop +.return_carry + pop bc + scf + ret + +.found_equality + push de +.loop2 + ld a, [de] + inc de +pushc +setcharmap ascii + cp "\n" +popc + jr z, .newline + cp [hl] + jr nz, .unequal + inc hl + dec bc + ld a, b + or c + jr nz, .loop2 + pop de + jr .return_carry + +.unequal + pop de + jr .next + +.newline + pop de + pop bc + inc hl + ld de, w3_d880 +.loop3 + ld a, [hli] + ld [de], a + inc de +pushc +setcharmap ascii + cp "\r" +popc + jr z, .finish + dec c + jr nz, .loop3 + scf + ret + +.finish + and a + ret + +Function119e8e: + cp $60 + jr c, .less_than_0x60 + sub $57 + ret + +.less_than_0x60 + sub $30 + ret + +Function119e98: + ld a, $2 +.loop + push af + ld a, [bc] + dec bc + call Function119e8e + or [hl] + ld [hl], a + ld a, [bc] + dec bc + call Function119e8e + rlca + rlca + rlca + rlca + or [hl] + ld [hl], a + inc hl + pop af + dec a + and a + jr nz, .loop + ret + +Function119eb4: + xor a + ld [wc3cc], a + ld de, wc3ac +.loop + ld a, [de] + inc de + ld [hli], a + and a + jr nz, .loop + ret + +Function119ec2: + ld a, BANK(sMobileLoginPassword) + call OpenSRAM + xor a + ld [sMobileLoginPassword + MOBILE_LOGIN_PASSWORD_LENGTH], a + ld de, sMobileLoginPassword + 1 +.loop + ld a, [de] + inc de + ld [hli], a + and a + jr nz, .loop + call CloseSRAM + ret + +BattleTowerRoomMenu2: + ldh a, [rSVBK] + ld [wcd8c], a + ld a, $1 + ldh [rSVBK], a + + call .RunJumptable + + ld a, [wcd8c] + ldh [rSVBK], a + ld a, $1 + ldh [hBGMapMode], a + ret + +.RunJumptable: + jumptable .Jumptable, wBattleTowerRoomMenu2JumptableIndex + +.Jumptable: + dw Function119f3f + dw Function119f45 + dw Function119f56 + dw Function119f76 + dw Function119f98 + dw Function11a113 + dw Function11a129 + dw Function11a131 + dw Function11a13d + dw Function11a14b + dw Function11a16d + dw Function11a192 + dw Function11a2e6 + dw Function11a302 + dw Function11a33a + dw BattleTowerRoomMenu2_PlaceYesNoMenu + dw BattleTowerRoomMenu2_UpdateYesNoMenu + dw Function11a357 + dw Function11a36b + dw Function11a38d + dw Function11a3c5 + dw Function11a3d9 + dw Function11a3f9 + dw Function11a41b + dw Function11a452 + dw Function11a47a + dw Function11a488 + dw Function11a49e + dw Function11a4db + dw Function11a4e8 + dw Function11a4fe + dw Function11a466 + dw Function11a47a + +Function119f3f: + call Function11a5b9 + jp BattleTowerRoomMenu2_IncrementJumptable + +Function119f45: + hlcoord 4, 2 + ld de, String_11a661 + call PlaceString + ld a, $80 + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function119f56: + ld a, [wMobileInactivityTimerMinutes] + and a + jr z, .asm_119f62 + dec a + ld [wMobileInactivityTimerMinutes], a + scf + ret + +.asm_119f62 + call Function11a63c + hlcoord 4, 2 + ld de, String_11a6aa + call PlaceString + ld a, $80 + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function119f76: + ld a, [wMobileInactivityTimerMinutes] + and a + jr z, .asm_119f82 + dec a + ld [wMobileInactivityTimerMinutes], a + scf + ret + +.asm_119f82 + call Function11a63c + hlcoord 4, 2 + ld de, String_11a679 + call PlaceString + call Function11a5f5 + xor a + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function119f98: + call Function11a536 + ret c + call PlayClickSFX + ld a, [wMobileInactivityTimerMinutes] + and a + jr nz, .asm_119fef + call ExitMenu + call Function11a63c + xor a + ld [wScriptVar], a + call Function11a00e + ld a, [wScriptVar] + and a + jr z, .asm_119fd4 + call ExitMenu + farcall ReloadMapPart + farcall Function115dc3 + ld a, [wcd33] + ld [wcf66], a + ld a, $a + ld [wMobileErrorCodeBuffer], a + scf + ret + +.asm_119fd4 + hlcoord 4, 2 + ld de, String_11a692 + call PlaceString + ld a, $1 + ld [wc30d], a + ld a, $1 + ld [wc314], a + farcall ReloadMapPart + and a + ret + +.asm_119fef + call ExitMenu + call ExitMenu + farcall ReloadMapPart + ld a, [wMobileInactivityTimerSeconds] + ld [wcf66], a + farcall Function115dc3 + ld a, $a + ld [wMobileErrorCodeBuffer], a + scf + ret + +Function11a00e: + ld a, BANK(sMobileLoginPassword) + call OpenSRAM + ld a, [sMobileLoginPassword] + and a + jr z, .asm_11a02a + ld a, [sMobileLoginPassword + 1] + call CloseSRAM + and a + ret nz + ld a, BANK(sMobileLoginPassword) + call OpenSRAM + xor a + ld [sMobileLoginPassword], a + +.asm_11a02a + call CloseSRAM + ld a, [wBGMapPalBuffer] + and a + jr z, .asm_11a039 + dec a + jr z, .asm_11a081 + jp Function11a0ca + +.asm_11a039 + ld a, BANK(w3_d800) + ldh [rSVBK], a + ld hl, wc608 + ld de, w3_d800 + ld bc, 246 + call CopyBytes + ld a, $1 + ldh [rSVBK], a + call FadeToMenu + farcall Function11765d + call Function11a9ce + ld a, BANK(w3_d800) + ldh [rSVBK], a + ld hl, w3_d800 + ld de, wc608 + ld bc, 246 + call CopyBytes + ld a, $1 + ldh [rSVBK], a + farcall Function115d99 + ld c, $0 + farcall Function115e18 + ld a, $1 + ld [wc305], a + ret + +.asm_11a081 + xor a + ld [wMenuBorderLeftCoord], a + ld [wMenuBorderTopCoord], a + ld a, $13 + ld [wMenuBorderRightCoord], a + ld a, $5 + ld [wMenuBorderBottomCoord], a + call PushWindow + farcall Function11765d + farcall Function117ab4 + farcall Stubbed_Function106462 + farcall Function106464 + call ExitMenu + farcall ReloadMapPart + farcall Function115d99 + ld c, $0 + farcall Function115e18 + ld a, $1 + ld [wc305], a + ret + +Function11a0ca: + xor a + ld [wMenuBorderLeftCoord], a + ld [wMenuBorderTopCoord], a + ld a, $13 + ld [wMenuBorderRightCoord], a + ld a, $11 + ld [wMenuBorderBottomCoord], a + call PushWindow + farcall Function11765d + farcall Function17d3f6 + farcall Stubbed_Function106462 + farcall Function106464 + call ExitMenu + farcall ReloadMapPart + farcall Function115d99 + ld c, $0 + farcall Function115e18 + ld a, $1 + ld [wc305], a + ret + +Function11a113: + call Function11a63c + ld c, $1 + farcall Function115e18 + hlcoord 4, 2 + ld de, String_11a6c8 + call PlaceString + and a + ret + +Function11a129: + ld a, $80 + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a131: + ld hl, wMobileInactivityTimerMinutes + dec [hl] + ret nz + ld a, [wBattleTowerRoomMenu2JumptableIndex] + inc a + ld [wBattleTowerRoomMenu2JumptableIndex], a + +Function11a13d: + call Function11a63c + hlcoord 4, 2 + ld de, String_11a6d2 + call PlaceString + and a + ret + +Function11a14b: + ld hl, wcd85 + ld a, [hl] + cp $f3 + jr nz, .asm_11a155 + and a + ret + +.asm_11a155 + call Function11a1d6 + ret c + call Function11a63c + hlcoord 4, 2 + ld de, String_11a6f1 + call PlaceString + ld a, $80 + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a16d: + ld a, [wMobileInactivityTimerMinutes] + and a + jr z, .asm_11a179 + dec a + ld [wMobileInactivityTimerMinutes], a + scf + ret + +.asm_11a179 + call Function11a63c + call Function11a1e6 + hlcoord 4, 2 + ld de, wc346 + call PlaceString + call Function11a5f5 + xor a + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a192: + call Function11a536 + ret c + call PlayClickSFX + ld a, [wMobileInactivityTimerMinutes] + and a + jr nz, .asm_11a1b6 + call ExitMenu + farcall ReloadMapPart + call Function11a63c + hlcoord 4, 2 + ld de, String_11a6d2 + call PlaceString + and a + ret + +.asm_11a1b6 + call ExitMenu + farcall ReloadMapPart + ld a, [wMobileInactivityTimerSeconds] + ld [wcf66], a + ld [wcd80], a + call Function11a63c + hlcoord 4, 2 + ld de, String_11a6d2 + call PlaceString + scf + ret + +Function11a1d6: + ld a, [wcd85] + cp $50 + jr nz, .asm_11a1e4 + ld a, $d3 + call SetMobileErrorCode + scf + ret + +.asm_11a1e4 + and a + ret + +Function11a1e6: + ld hl, String_11a706 + ld de, wc346 + call Function11a1ff + ld hl, wcd85 + call Function11a1ff + ld hl, String_11a70b + call Function11a1ff + ld a, $50 + ld [de], a + ret + +Function11a1ff: +.asm_11a1ff + ld a, [hli] + cp $50 + ret z + ld [de], a + inc de + jr .asm_11a1ff + +BattleTowerRoomMenu2_PlaceYesNoMenu: + ld hl, MenuHeader_11a2de + call LoadMenuHeader + call MenuBox + call MenuBoxCoord2Tile + call ApplyTilemap + hlcoord 16, 8 + ld de, String_11a2cf + call PlaceString + hlcoord 16, 10 + ld de, String_11a2d3 + call PlaceString + hlcoord 15, 8 + ld a, $ed + ld [hl], a + xor a + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +BattleTowerRoomMenu2_UpdateYesNoMenu: + ld hl, hJoyPressed + ld a, [hl] + and A_BUTTON + jr nz, .a_button + ld a, [hl] + and B_BUTTON + jr nz, .b_button + ld a, [hl] + and D_UP + jr nz, .d_up + ld a, [hl] + and D_DOWN + jr nz, .d_down +.asm_11a24c + call Function11a9f0 + scf + ret + +.d_up + xor a + ld [wcd8a], a + ld [wcd8b], a + ld a, [wMobileInactivityTimerMinutes] + and a + jr z, .asm_11a24c + xor a + ld [wMobileInactivityTimerMinutes], a + hlcoord 15, 8 + ld a, $ed + ld [hl], a + hlcoord 15, 10 + ld a, $7f + ld [hl], a + jr .asm_11a24c + +.d_down + xor a + ld [wcd8a], a + ld [wcd8b], a + ld a, [wMobileInactivityTimerMinutes] + and a + jr nz, .asm_11a24c + inc a + ld [wMobileInactivityTimerMinutes], a + hlcoord 15, 8 + ld a, $7f + ld [hl], a + hlcoord 15, 10 + ld a, $ed + ld [hl], a + jr .asm_11a24c + +.a_button + xor a + ld [wcd8a], a + ld [wcd8b], a + call PlayClickSFX + ld a, [wMobileInactivityTimerMinutes] + and a + jr nz, .exit_no_carry + call ExitMenu + farcall ReloadMapPart + ld a, [wMobileInactivityTimerFrames] + cp $0 + jr z, .asm_11a2b4 + ld a, [wcd47] + jr .exit_carry + +.asm_11a2b4 + ld a, [wcd33] + +.exit_carry + ld [wcf66], a + ld a, $a + ld [wMobileErrorCodeBuffer], a + scf + ret + +.b_button + call PlayClickSFX + +.exit_no_carry + call ExitMenu + farcall ReloadMapPart + and a + ret + +String_11a2cf: + db "YES@" + +String_11a2d3: + db "NO@" + +MenuHeader_11a2d6: ; unreferenced + db MENU_BACKUP_TILES ; flags + menu_coords 14, 6, SCREEN_WIDTH - 1, 10 + dw NULL + db 0 ; default option + +MenuHeader_11a2de: + db MENU_BACKUP_TILES ; flags + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw NULL + db 0 ; default option + +Function11a2e6: + call Function11a63c + ld c, $2 + farcall Function115e18 + hlcoord 4, 2 + ld de, String_11a71e + call PlaceString + ld a, $80 + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a302: + ld a, [wMobileInactivityTimerMinutes] + and a + jr z, .asm_11a30e + dec a + ld [wMobileInactivityTimerMinutes], a + scf + ret + +.asm_11a30e + call Function11a63c + hlcoord 4, 2 + ld de, String_11a72a + call PlaceString + hlcoord 9, 4 + ld de, wcd68 + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + hlcoord 14, 4 + ld de, wcd67 + lb bc, PRINTNUM_LEADINGZEROS | 1, 2 + call PrintNum + ld a, $80 + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a33a: + ld a, [wMobileInactivityTimerMinutes] + and a + jr z, .asm_11a346 + dec a + ld [wMobileInactivityTimerMinutes], a + scf + ret + +.asm_11a346 + call ExitMenu + farcall ReloadMapPart + farcall Function115dc3 + and a + ret + +Function11a357: + call Function11a63c + hlcoord 4, 2 + ld de, String_11a743 + call PlaceString + ld a, $80 + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a36b: + ld a, [wMobileInactivityTimerMinutes] + and a + jr z, .asm_11a377 + dec a + ld [wMobileInactivityTimerMinutes], a + scf + ret + +.asm_11a377 + call Function11a63c + hlcoord 4, 2 + ld de, String_11a755 + call PlaceString + call Function11a5f5 + xor a + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a38d: + call Function11a536 + ret c + call PlayClickSFX + ld a, [wMobileInactivityTimerMinutes] + and a + jr nz, .asm_11a3b1 + call ExitMenu + farcall ReloadMapPart + call Function11a63c + hlcoord 4, 2 + ld de, String_11a6d2 + call PlaceString + and a + ret + +.asm_11a3b1 + call ExitMenu + farcall ReloadMapPart + ld a, [wMobileInactivityTimerSeconds] + ld [wcf66], a + ld [wcd80], a + scf + ret + +Function11a3c5: + call Function11a63c + hlcoord 4, 2 + ld de, String_11a762 + call PlaceString + ld a, $80 + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a3d9: + ld a, [wMobileInactivityTimerMinutes] + and a + jr z, .asm_11a3e5 + dec a + ld [wMobileInactivityTimerMinutes], a + scf + ret + +.asm_11a3e5 + call Function11a63c + hlcoord 4, 2 + ld de, String_11a779 + call PlaceString + ld a, $80 + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a3f9: + ld a, [wMobileInactivityTimerMinutes] + and a + jr z, .asm_11a405 + dec a + ld [wMobileInactivityTimerMinutes], a + scf + ret + +.asm_11a405 + call Function11a63c + hlcoord 4, 2 + ld de, String_11a755 + call PlaceString + call Function11a5f5 + xor a + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a41b: + call Function11a536 + ret c + call PlayClickSFX + ld a, [wMobileInactivityTimerMinutes] + and a + jr nz, .asm_11a43f + call ExitMenu + farcall ReloadMapPart + call Function11a63c + hlcoord 4, 2 + ld de, String_11a6d2 + call PlaceString + and a + ret + +.asm_11a43f + call ExitMenu + farcall ReloadMapPart + ld a, $1c + ld [wcf66], a + ld [wcd80], a + scf + ret + +Function11a452: + call Function11a63c + hlcoord 4, 2 + ld de, String_11a791 + call PlaceString + ld a, $80 + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a466: + call Function11a63c + hlcoord 4, 2 + ld de, String_11a7c1 + call PlaceString + ld a, $80 + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a47a: + ld a, [wMobileInactivityTimerMinutes] + and a + jr z, .asm_11a486 + dec a + ld [wMobileInactivityTimerMinutes], a + scf + ret + +.asm_11a486 + and a + ret + +Function11a488: + call Function11a63c + hlcoord 4, 2 + ld de, String_11a7ac + call PlaceString + call Function11a5f5 + xor a + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a49e: + call Function11a536 + ret c + call PlayClickSFX + ld a, [wMobileInactivityTimerMinutes] + and a + jr nz, .asm_11a4c7 + call ExitMenu + farcall ReloadMapPart + call Function11a63c + hlcoord 4, 2 + ld de, String_11a6d2 + call PlaceString + ld a, $14 + ld [wcf66], a + and a + ret + +.asm_11a4c7 + call ExitMenu + farcall ReloadMapPart + ld a, [wMobileInactivityTimerFrames] + ld [wcf66], a + ld [wcd80], a + scf + ret + +Function11a4db: + call Function11a63c + ld de, String_11a6db + hlcoord 4, 2 + call PlaceString + ret + +Function11a4e8: + call Function11a63c + hlcoord 4, 2 + ld de, String_11a7d7 + call PlaceString + call Function11a5f5 + xor a + ld [wMobileInactivityTimerMinutes], a + jp BattleTowerRoomMenu2_IncrementJumptable + +Function11a4fe: + call Function11a536 + ret c + call PlayClickSFX + ld a, [wMobileInactivityTimerMinutes] + and a + jr nz, .asm_11a522 + call ExitMenu + farcall ReloadMapPart + call Function11a63c + hlcoord 4, 2 + ld de, String_11a6d2 + call PlaceString + and a + ret + +.asm_11a522 + call ExitMenu + farcall ReloadMapPart + ld a, [wMobileInactivityTimerSeconds] + ld [wcf66], a + ld [wcd80], a + scf + ret + +Function11a536: + ld hl, hJoyPressed + ld a, [hl] + and A_BUTTON + jr nz, .asm_11a5a7 + ld a, [hl] + and B_BUTTON + jr nz, .asm_11a5a2 + ld a, [hl] + and D_UP + jr nz, .asm_11a564 + ld a, [hl] + and D_DOWN + jr nz, .asm_11a583 +.asm_11a54d + ld a, [wBattleTowerRoomMenu2JumptableIndex] + cp $4 + jr z, .asm_11a562 + call Function11a9f0 + jr nz, .asm_11a562 + call ExitMenu + farcall ReloadMapPart + +.asm_11a562 + scf + ret + +.asm_11a564 + xor a + ld [wcd8a], a + ld [wcd8b], a + ld a, [wMobileInactivityTimerMinutes] + and a + jr z, .asm_11a54d + xor a + ld [wMobileInactivityTimerMinutes], a + hlcoord 15, 7 + ld a, $ed + ld [hl], a + hlcoord 15, 9 + ld a, $7f + ld [hl], a + jr .asm_11a54d + +.asm_11a583 + xor a + ld [wcd8a], a + ld [wcd8b], a + ld a, [wMobileInactivityTimerMinutes] + and a + jr nz, .asm_11a54d + inc a + ld [wMobileInactivityTimerMinutes], a + hlcoord 15, 7 + ld a, $7f + ld [hl], a + hlcoord 15, 9 + ld a, $ed + ld [hl], a + jr .asm_11a54d + +.asm_11a5a2 + ld a, $1 + ld [wMobileInactivityTimerMinutes], a + +.asm_11a5a7 + xor a + ld [wcd8a], a + ld [wcd8b], a + and a + ret + +BattleTowerRoomMenu2_IncrementJumptable: + ld a, [wBattleTowerRoomMenu2JumptableIndex] + inc a + ld [wBattleTowerRoomMenu2JumptableIndex], a + scf + ret + +Function11a5b9: + xor a + ld [wMenuBorderLeftCoord], a + ld [wMenuBorderTopCoord], a + ld a, $13 + ld [wMenuBorderRightCoord], a + ld a, $5 + ld [wMenuBorderBottomCoord], a + call PushWindow + hlcoord 0, 0, wAttrmap + ld b, $6 + ld c, $14 + hlcoord 0, 0 + ld b, $4 + ld c, $12 + call Function3eea + farcall ReloadMapPart + call UpdateSprites + ld c, $0 + farcall Function115e18 + ld a, $1 + ld [wc305], a + ret + +Function11a5f5: + ld a, $e + ld [wMenuBorderLeftCoord], a + ld a, $13 + ld [wMenuBorderRightCoord], a + ld a, $6 + ld [wMenuBorderTopCoord], a + ld a, $a + ld [wMenuBorderBottomCoord], a + call PushWindow + hlcoord 14, 6, wAttrmap + ld b, $5 + ld c, $6 + hlcoord 14, 6 + ld b, $3 + ld c, $4 + call Function3eea + hlcoord 16, 7 + ld de, String_11a2cf + call PlaceString + hlcoord 16, 9 + ld de, String_11a2d3 + call PlaceString + hlcoord 15, 7 + ld a, $ed + ld [hl], a + farcall ReloadMapPart + ret + +Function11a63c: + hlcoord 4, 1 + ld de, String_11a7f4 + call PlaceString + hlcoord 4, 2 + ld de, String_11a7f4 + call PlaceString + hlcoord 4, 3 + ld de, String_11a7f4 + call PlaceString + hlcoord 4, 4 + ld de, String_11a7f4 + call PlaceString + ret + +String_11a661: + db "これから モバイルセンターに" + next "でんわかけます@" + +String_11a679: + db "モバイルアダプタじゅんびは" + next "できて いますか?@" + +String_11a692: + db "でんわかけています" + next "しばらく おまちください@" + +String_11a6aa: + db "でんわをかけると つうわりょう" + next "せつぞくりょうかかります@" + +String_11a6c8: + db "せつぞく しました@" + +String_11a6d2: + db "つうしん ちゅう@" + +String_11a6db: + db "つうしん ちゅう" + next "セレクト エーでちゅうし@" + +String_11a6f1: + db "この サービスには" + next "つうわりょうほかに@" + +String_11a706: + db "おかね@" + +String_11a70b: + db "えん" + next "かかります よろしい ですか?@" + +String_11a71e: + db "つうしん しゅうりょう@" + +String_11a72a: + db "つないだ じかん" + next "  やく   ふん   びょう@" + +String_11a743: + db "もっていない データが" + next "あります!@" + +String_11a755: + db "データよみこみますか?@" + +String_11a762: + db "おなじ データよみこんだ" + next "ことありますが@" + +String_11a779: + db "そのデータなくなっているか" + next "こわれて います@" + +String_11a791: + db "もっている データと" + next "おなじデータしか ありません!@" + +String_11a7ac: + db "データよみこみを" + next "ちゅうし しますか?@" + +String_11a7c1: + db "あたらしい ニュースは" + next "ありません でした@" + +String_11a7d7: + db "あたらしいニュースあります" + next "ニュースよみこみますか?@" + +String_11a7f4: + db "               @" + +MenuHeader_11a804: ; unreferenced + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, SCREEN_WIDTH - 1, 5 + dw NULL + db 0 ; default option + +Function11a80c: + ld de, hDivisor + ld bc, hDividend + ld hl, Unknown_11a89a + call Function11a88c + ld bc, hQuotient + 1 + ld hl, Unknown_11a8ba + call Function11a88c + ld bc, hPrintNumBuffer + 2 + ld hl, Unknown_11a8da + call Function11a88c + xor a + ld b, a + ldh a, [hDivisor] + and $f + ld e, a + ldh a, [hPrintNumBuffer + 6] + and $f + call Function11a884 + ld e, a + ldh a, [hPrintNumBuffer + 8] + and $f + call Function11a884 + ld [wcd62], a + ld e, b + xor a + ld b, a + ldh a, [hDivisor] + and $f0 + swap a + call Function11a884 + ld e, a + ldh a, [hPrintNumBuffer + 6] + and $f0 + swap a + call Function11a884 + ld e, a + ldh a, [hPrintNumBuffer + 8] + and $f0 + swap a + call Function11a884 + ld [wcd63], a + ld e, b + xor a + ld b, a + ldh a, [hMathBuffer] + and $f + call Function11a884 + ld e, a + ldh a, [hPrintNumBuffer + 7] + and $f + call Function11a884 + ld e, a + ldh a, [hPrintNumBuffer + 9] + and $f + call Function11a884 + ld [wcd64], a + ret + +Function11a884: + add e + cp $a + ret c + sub $a + inc b + ret + +Function11a88c: + ld a, [bc] + sla a + ld c, a + xor a + ld b, a + add hl, bc + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + inc de + ret + +Unknown_11a89a: +for x, 16 + bcd x % 100, x / 100 +endr + +Unknown_11a8ba: +for x, 0, 16**2, 16 + bcd x % 100, x / 100 +endr + +Unknown_11a8da: +for x, 0, 16**3, 16**2 + bcd x % 100, x / 100 +endr + +BattleTowerRoomMenu_WriteMessage: + jumptable .Jumptable, wc31a + +.Jumptable: + dw BattleTowerRoomMenu_WriteMessage_DoNothing + dw Function11a90f + dw Function11a971 + +Function11a90f: + ld a, $1 + ldh [rSVBK], a + call SpeechTextbox + ld a, $50 + ld hl, wc320 + ld bc, $008c + call ByteFill + ld a, [wc31b] + ld l, a + ld a, [wc31c] + ld h, a + ld de, wc320 +.asm_11a92c + ld a, [hli] + cp $57 + jr z, .asm_11a94f + cp $0 + jr z, .asm_11a92c + cp $50 + jr z, .asm_11a92c + cp $1 + jr z, .asm_11a941 + ld [de], a + inc de + jr .asm_11a92c + +.asm_11a941 + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a +.asm_11a945 + ld a, [bc] + inc bc + cp $50 + jr z, .asm_11a92c + ld [de], a + inc de + jr .asm_11a945 + +.asm_11a94f + xor a + ld [wc31f], a + ld a, LOW(wc320) + ld [wc31b], a + ld a, HIGH(wc320) + ld [wc31c], a + hlcoord 1, 14 + ld a, l + ld [wc31d], a + ld a, h + ld [wc31e], a + ld hl, wc31a + inc [hl] + ld a, $3 + ldh [rSVBK], a + +BattleTowerRoomMenu_WriteMessage_DoNothing: + ret + +Function11a971: + ld hl, wc31f + ldh a, [hJoyDown] + and a + jr nz, .asm_11a97f + ld a, [hl] + and a + jr z, .asm_11a97f + dec [hl] + ret + +.asm_11a97f + ld a, [wOptions] + and $7 + ld [hl], a + ld hl, wcd8d + ld a, [wc31b] + ld e, a + ld a, [wc31c] + ld d, a + ld a, [de] + inc de + ld [hli], a + ld a, e + ld [wc31b], a + ld a, d + ld [wc31c], a + ld a, $50 + ld [hl], a + ld a, [wc31d] + ld l, a + ld a, [wc31e] + ld h, a + ld de, wcd8d + call PlaceString + ld a, c + ld [wc31d], a + ld a, b + ld [wc31e], a + ld a, [wcd8d] + cp $50 + jr nz, .asm_11a9bf + xor a + ld [wc31a], a + +.asm_11a9bf + ret + +BattleTowerRoomMenu_SetMessage: + ld a, l + ld [wc31b], a + ld a, h + ld [wc31c], a + ld a, $1 + ld [wc31a], a + ret + +Function11a9ce: + call ClearBGPalettes + call ReloadTilesetAndPalettes + call ExitMenu + farcall Stubbed_Function106462 + farcall Function106464 + farcall FinishExitMenu + call UpdateSprites + ret + +Function11a9f0: + ld a, $1 + and a + ret + +Function11a9f4: ; unreferenced + ld a, [wcd8a] + ld l, a + ld a, [wcd8b] + ld h, a + inc hl + ld a, l + ld [wcd8a], a + ld a, h + ld [wcd8b], a + ld de, $d5d0 + add hl, de + bit 7, h + ret nz + ld a, $d6 + call SetMobileErrorCode + and a + ret + +Text_SaveFileWillBeSent: + text "SAVE FILE will be" + line "sent." + done + +Text_SentSaveFileReadingNews: + text "Sent SAVE FILE." + line "Reading NEWS…" + done + +Text_ReadingNews: + text "Reading NEWS…" + done + +Text_ReceivedNews: + text "Received NEWS!" + done + +Text_QuitReadingNews: + text "Quit reading NEWS?" + done + +Text_CanceledSendingSaveFile: ; unreferenced + text "Canceled sending" + line "SAVE FILE." + done + +Text_ReceivedOddEgg: ; unreferenced + text "ODD EGG" + line "was received!" + done + +Text_RegisteringRecord: + text "Registering your" + line "record…" + done + +Text_BattleRoomVisitLimit: ; unreferenced + text "One visit per day" + line "per BATTLE ROOM!" + done + +Text_PartyMonTopsThisLevel: + text "A party #MON" + line "tops this level." + done + +Text_UberRestriction: + text_ram wcd49 + text " may go" + line "only to BATTLE" + + para "ROOMS that are" + line "Lv.70 or higher." + done + +Text_CancelBattleRoomChallenge: + text "Cancel your BATTLE" + line "ROOM challenge?" + done + +Text_ExitGymLeaderHonorRoll: + text "Exit GYM LEADER" + line "HONOR ROLL?" + done + +Text_LinkingWithCenter: ; unreferenced + text "Linking with the" + line "CENTER…" + done + +Text_WhatLevelDoYouWantToChallenge: + text "What level do you" + line "want to challenge?" + done + +Text_CheckBattleRoomListByMaxLevel: + text "Check BATTLE ROOM" + line "list by max level?" + done + +Text_EnterWhichBattleRoom: ; unreferenced + text "Enter which" + line "BATTLE ROOM?" + done + +Text_WhichBattleRoom: ; unreferenced + text "Which BATTLE ROOM?" + done + +Text_ThisBattleRoomPleaseWait: ; unreferenced + text_ram wStringBuffer3 + text "'s ROOM" + line "@" + text_ram wStringBuffer4 + text "?" + cont "Please wait…" + done + +Function11ac3e: + call SpeechTextbox + call FadeToMenu + callfar ClearSpriteAnims2 + call Function11ac51 + call CloseSubmenu + ret + +Function11ac51: + xor a + ldh [hBGMapMode], a + ld hl, wOptions + ld a, [hl] + push af + set 4, [hl] + ld a, [wVramState] + push af + xor a + ld [wVramState], a + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + xor a + ldh [hMapAnims], a + ld [wcd49], a + ld [wcd4a], a + ld [wcd4c], a + ld [wcd4d], a + ld [wcd4e], a + call Function11ad1b + call DelayFrame +.loop + call JoyTextDelay + ld a, [wJumptableIndex] + bit 7, a + jr nz, .asm_11aca8 + call Function11b314 + call Function11acb7 + call Function11ad6e + ld a, 30 * SPRITEOAMSTRUCT_LENGTH + ld [wCurSpriteOAMAddr], a + farcall DoNextFrameForAllSprites + farcall ReloadMapPart + jr .loop + +.asm_11aca8 + call ClearSprites + pop af + ldh [hInMenu], a + pop af + ld [wVramState], a + pop af + ld [wOptions], a + ret + +Function11acb7: + ld hl, TilemapPack_11ba44 + ld a, [wcd49] + ld c, a + ld b, 0 + sla c + rl b + sla c + rl b + sla c + rl b + add hl, bc + decoord 6, 6 + ld a, [hli] + ld [de], a + decoord 0, 7 + ld bc, 7 + call CopyBytes + ld a, [wcd49] + inc a + ld [wcd49], a + ld a, [hl] + cp $ff + jr nz, .get_the_other + xor a + ld [wcd49], a +.get_the_other + ld hl, TilemapPack_11bb7d + ld a, [wcd4a] + ld c, a + ld b, 0 + sla c + rl b + sla c + rl b + sla c + rl b + add hl, bc + decoord 3, 9 + ld bc, 7 + call CopyBytes + ld a, [wcd4a] + inc a + ld [wcd4a], a + inc hl + ld a, [hl] + cp $ff + ret nz + xor a + ld [wcd4a], a + ret + +Function11ad1b: + call ClearBGPalettes + call ClearSprites + call ClearTilemap + farcall Function17c000 + ld a, [wMenuCursorY] + ld [wcd82], a + dec a + ldh [hObjectStructIndex], a + ld a, $10 + ld [wCurIconTile], a + ld hl, LoadMenuMonIcon + ld a, BANK(LoadMenuMonIcon) + ld e, MONICON_MOBILE1 + rst FarCall + ld hl, LoadMenuMonIcon + ld a, BANK(LoadMenuMonIcon) + ld e, MONICON_MOBILE2 + rst FarCall + ld hl, wPokedexOrder + ld bc, $0115 + xor a + call ByteFill + xor a + ld [wJumptableIndex], a + ld [wcf64], a + ld [wcf65], a + ld [wcf66], a + ld [wcd30], a + ld a, DEXMODE_ABC + ld [wCurDexMode], a + farcall Pokedex_OrderMonsByMode + ret + +Function11ad6e: + ld a, [wJumptableIndex] + ld hl, Jumptable_11ad78 + call Function11b239 + jp hl + +Jumptable_11ad78: + dw Function11b082 + dw Function11b0ff + dw Function11ad95 + dw Function11adc4 + dw Function11ae4e + dw Function11ae98 + dw Function11ad8f + dw Function11af04 + dw Function11af4e + +MobileIncJumptableIndex: + ld hl, wJumptableIndex + inc [hl] + ret + +Function11ad8f: + ld hl, wJumptableIndex + set 7, [hl] + ret + +Function11ad95: + ld hl, MenuHeader_11ae38 + call LoadMenuHeader + call MenuBox + hlcoord 12, 12 + ld de, String_11ae40 + call PlaceString + hlcoord 10, 10, wAttrmap + lb bc, 8, 8 + call Function11afd6 + farcall ReloadMapPart + call MobileIncJumptableIndex + ld a, $1 + ld [wMenuCursorY], a + ld hl, Unknown_11afcc + call Function11afb7 + +Function11adc4: + ld hl, hJoyPressed + ld a, [hl] + and a + ret z + ld a, [hl] + and D_UP + jr nz, .asm_11ade6 + ld a, [hl] + and D_DOWN + jr nz, .asm_11aded + ld a, [hl] + and A_BUTTON + jr nz, .asm_11ae06 + ld a, [hl] + and B_BUTTON + ret z + call PlayClickSFX + xor a + ld [wJumptableIndex], a + jr .asm_11ae2e + +.asm_11ade6 + ld a, [wMenuCursorY] + dec a + ret z + jr .asm_11adf4 + +.asm_11aded + ld a, [wMenuCursorY] + inc a + cp $4 + ret z + +.asm_11adf4 + push af + ld hl, Unknown_11afcc + call Function11afbb + pop af + ld [wMenuCursorY], a + ld hl, Unknown_11afcc + call Function11afb7 + ret + +.asm_11ae06 + call PlayClickSFX + ld a, [wMenuCursorY] + dec a + ld hl, wcd30 + ld [hl], a + and a + jr z, .asm_11ae28 + hlcoord 2, 14 + ld a, [wMenuCursorY] + cp $2 + jr z, .asm_11ae23 + call Function11b272 + jr .asm_11ae2b + +.asm_11ae23 + call Function11b267 + jr .asm_11ae2b + +.asm_11ae28 + ld a, $3 + ld [hl], a + +.asm_11ae2b + call MobileIncJumptableIndex + +.asm_11ae2e + call ExitMenu + farcall ReloadMapPart + ret + +MenuHeader_11ae38: + db MENU_BACKUP_TILES ; flags + menu_coords 10, 10, 17, SCREEN_HEIGHT - 1 + dw NULL + db 0 ; default option + +String_11ae40: + db "どちらでも" + next "♂オス" + next "♀メス" + db "@" + +Function11ae4e: + ld hl, MenuHeader_11afe8 + call LoadMenuHeader + call MenuBox + hlcoord 10, 14 + ld de, String_11aff0 + call PlaceString + ld hl, MenuHeader_11b013 + call LoadMenuHeader + call MenuBox + hlcoord 16, 8 + ld de, String_11b01b + call PlaceString + hlcoord 14, 7, wAttrmap + lb bc, 5, 6 + call Function11afd6 + hlcoord 9, 12, wAttrmap + lb bc, 6, 11 + call Function11afd6 + farcall ReloadMapPart + call MobileIncJumptableIndex + ld a, $1 + ld [wMenuCursorY], a + ld hl, Unknown_11afd2 + call Function11afb7 + +Function11ae98: + ld hl, hJoyPressed + ld a, [hl] + and a + ret z + ld a, [hl] + and D_UP + jr nz, .asm_11aec1 + ld a, [hl] + and D_DOWN + jr nz, .asm_11aec8 + ld a, [hl] + and A_BUTTON + jr nz, .asm_11aee1 + ld a, [hl] + and B_BUTTON + ret z + call PlayClickSFX +.asm_11aeb4 + hlcoord 2, 14 + ld a, $7f + ld [hl], a + ld a, $1 + ld [wJumptableIndex], a + jr .asm_11aef7 + +.asm_11aec1 + ld a, [wMenuCursorY] + dec a + ret z + jr .asm_11aecf + +.asm_11aec8 + ld a, [wMenuCursorY] + inc a + cp $3 + ret z + +.asm_11aecf + push af + ld hl, Unknown_11afd2 + call Function11afbb + pop af + ld [wMenuCursorY], a + ld hl, Unknown_11afd2 + call Function11afb7 + ret + +.asm_11aee1 + call PlayClickSFX + ld a, [wMenuCursorY] + cp $2 + jr z, .asm_11aeb4 + ld a, [wcd4b] + ld [wScriptVar], a + call Function11b022 + call MobileIncJumptableIndex + +.asm_11aef7 + call ExitMenu + call ExitMenu + farcall ReloadMapPart + ret + +Function11af04: + ld hl, MenuHeader_11afe8 + call LoadMenuHeader + call MenuBox + hlcoord 10, 14 + ld de, String_11b003 + call PlaceString + ld hl, MenuHeader_11b013 + call LoadMenuHeader + call MenuBox + hlcoord 16, 8 + ld de, String_11b01b + call PlaceString + hlcoord 14, 7, wAttrmap + lb bc, 5, 6 + call Function11afd6 + hlcoord 9, 12, wAttrmap + lb bc, 6, 11 + call Function11afd6 + farcall ReloadMapPart + call MobileIncJumptableIndex + ld a, $2 + ld [wMenuCursorY], a + ld hl, Unknown_11afd2 + call Function11afb7 + +Function11af4e: + ld hl, hJoyPressed + ld a, [hl] + and a + ret z + ld a, [hl] + and D_UP + jr nz, .asm_11af77 + ld a, [hl] + and D_DOWN + jr nz, .asm_11af7e + ld a, [hl] + and A_BUTTON + jr nz, .asm_11af97 + ld a, [hl] + and B_BUTTON + ret z + call PlayClickSFX +.asm_11af6a + hlcoord 2, 14 + ld a, $7f + ld [hl], a + ld a, $1 + ld [wJumptableIndex], a + jr .asm_11afaa + +.asm_11af77 + ld a, [wMenuCursorY] + dec a + ret z + jr .asm_11af85 + +.asm_11af7e + ld a, [wMenuCursorY] + inc a + cp $3 + ret z + +.asm_11af85 + push af + ld hl, Unknown_11afd2 + call Function11afbb + pop af + ld [wMenuCursorY], a + ld hl, Unknown_11afd2 + call Function11afb7 + ret + +.asm_11af97 + call PlayClickSFX + ld a, [wMenuCursorY] + cp $2 + jr z, .asm_11af6a + ld a, $6 + ld [wJumptableIndex], a + xor a + ld [wScriptVar], a + +.asm_11afaa + call ExitMenu + call ExitMenu + farcall ReloadMapPart + ret + +Function11afb7: + ld e, $ed + jr asm_11afbd + +Function11afbb: + ld e, $7f + +asm_11afbd: + ld a, [wMenuCursorY] + dec a + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, e + ld e, [hl] + inc hl + ld d, [hl] + ld [de], a + ret + +Unknown_11afcc: + dwcoord 11, 12 + dwcoord 11, 14 + dwcoord 11, 16 + +Unknown_11afd2: + dwcoord 15, 8 + dwcoord 15, 10 + +Function11afd6: + ld de, SCREEN_WIDTH + ld a, $3 +.row + push bc + push hl +.col + ld [hli], a + dec c + jr nz, .col + pop hl + add hl, de + pop bc + dec b + jr nz, .row + ret + +MenuHeader_11afe8: + db MENU_BACKUP_TILES ; flags + menu_coords 9, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw NULL + db 0 ; default option + +String_11aff0: + db "この じょうけんで" + next "よろしいですか?@" + +String_11b003: + db "こうかんを" + next "ちゅうししますか?@" + +MenuHeader_11b013: + db MENU_BACKUP_TILES ; flags + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw NULL + db 1 ; default option + +String_11b01b: + db "はい" + next "いいえ@" + +Function11b022: + ld a, [wcd2e] + and a + jr z, .asm_11b02e + ld hl, wStringBuffer3 + call Function11b03d + +.asm_11b02e + ld a, [wcd30] + and a + ret z + cp $3 + ret z + ld hl, wStringBuffer4 + call Function11b03d + ret + +Function11b03d: + push hl + push af + ld c, $1 +.loop + ld a, [hli] + cp "♂" + jr z, .gender + cp "♀" + jr z, .gender + cp "@" + jr z, .done + inc c + jr .loop + +.gender + dec hl + ld a, "@" + ld [hli], a + +.done + dec hl + push hl + ld e, 4 + ld d, 0 + add hl, de + ld e, l + ld d, h + pop hl +.loop2 + ld a, [hld] + ld [de], a + dec de + dec c + jr nz, .loop2 + pop af + pop de + cp $1 + jr nz, .female + ld hl, .MaleString + jr .got_string + +.female + ld hl, .FemaleString + +.got_string + ld bc, 4 ; string length + call CopyBytes + ret + +.MaleString: db "オスの " +.FemaleString: db "メスの " + +Function11b082: + call Function11b242 + ld a, $7 + ld [wc7d3], a + call Function11b099 + call Function11b295 + call Function11b275 + call SetPalettes + jp MobileIncJumptableIndex + +Function11b099: + ld c, $6 + hlcoord 11, 1 + ld a, [wc7d3] + add a + ld b, a + xor a + call Function11b236 + ld a, [wc7d0] + ld e, a + ld d, 0 + ld hl, wPokedexOrder + add hl, de + ld e, l + ld d, h + hlcoord 11, 2 + ld a, [wc7d3] +.loop + push af + ld a, [de] + ld [wTempSpecies], a + push de + push hl + call .PlaceMonNameOrPlaceholderString + pop hl + ld de, 2 * SCREEN_WIDTH + add hl, de + pop de + inc de + pop af + dec a + jr nz, .loop + ret + +.PlaceMonNameOrPlaceholderString: + and a + ret z + + call .CheckSeenFlag + ret c + + call .SetCaughtFlag + push hl + call GetPokemonName + pop hl + call PlaceString + ret + +.SetCaughtFlag: + call CheckCaughtMemMon + jr nz, .okay + inc hl + ret + +.okay + ld a, $1 + ld [hli], a + ret + +.CheckSeenFlag: + call CheckSeenMemMon + ret nz + + inc hl + ld de, .EmptySlot + call PlaceString + scf + ret + +.EmptySlot: + db "ーーーーー@" + +Function11b0ff: + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jr nz, .asm_11b141 + ld a, [hl] + and A_BUTTON + jr nz, .asm_11b131 + call Function11b175 + jr nc, .asm_11b125 + ld a, [wcd4c] + inc a + and $3 + ld [wcd4c], a + xor a + ldh [hBGMapMode], a + call Function11b099 + ld a, $1 + ldh [hBGMapMode], a + ret + +.asm_11b125 + ld a, [wcd4c] + and a + ret z + inc a + and $3 + ld [wcd4c], a + ret + +.asm_11b131 + call Function11b20b + call CheckSeenMemMon + jr z, .asm_11b13d + ld a, $1 + jr .asm_11b148 + +.asm_11b13d + ld a, $2 + jr .asm_11b148 + +.asm_11b141 + ld hl, wJumptableIndex + ld a, $7 + ld [hl], a + ret + +.asm_11b148 + call PlayClickSFX + ld [wcd4b], a + and a + jr z, .asm_11b16c + ld a, [wcf65] + cp $0 + jr z, .asm_11b163 + cp $fe + jr z, .asm_11b167 + cp $ff + jr z, .asm_11b16b + jp MobileIncJumptableIndex + +.asm_11b163 + ld a, $1 + jr .asm_11b16c + +.asm_11b167 + ld a, $2 + jr .asm_11b16c + +.asm_11b16b + xor a + +.asm_11b16c + ld [wcd30], a + ld a, $4 + ld [wJumptableIndex], a + ret + +Function11b175: + ld a, [wc7d3] + ld d, a + ld a, [wc7d2] + ld e, a + ld hl, hJoyLast + ld a, [hl] + and D_UP + jr nz, .asm_11b19a + ld a, [hl] + and D_DOWN + jr nz, .asm_11b1ae + ld a, d + cp e + jr nc, .asm_11b1ed + ld a, [hl] + and D_LEFT + jr nz, .asm_11b1c6 + ld a, [hl] + and D_RIGHT + jr nz, .asm_11b1d8 + jr .asm_11b1ed + +.asm_11b19a + ld hl, wc7d1 + ld a, [hl] + and a + jr z, .asm_11b1a4 + dec [hl] + jr .asm_11b1ef + +.asm_11b1a4 + ld hl, wc7d0 + ld a, [hl] + and a + jr z, .asm_11b1ed + dec [hl] + jr .asm_11b1ef + +.asm_11b1ae + ld hl, wc7d1 + ld a, [hl] + inc a + cp e + jr nc, .asm_11b1ed + cp d + jr nc, .asm_11b1bc + inc [hl] + jr .asm_11b1ef + +.asm_11b1bc + ld hl, wc7d0 + add [hl] + cp e + jr nc, .asm_11b1ed + inc [hl] + jr .asm_11b1ef + +.asm_11b1c6 + ld hl, wc7d0 + ld a, [hl] + and a + jr z, .asm_11b1ed + cp d + jr nc, .asm_11b1d4 + xor a + ld [hl], a + jr .asm_11b1ef + +.asm_11b1d4 + sub d + ld [hl], a + jr .asm_11b1ef + +.asm_11b1d8 + ld hl, wc7d0 + ld a, d + add a + add [hl] + jr c, .asm_11b1e3 + cp e + jr c, .asm_11b1e8 + +.asm_11b1e3 + ld a, e + sub d + ld [hl], a + jr .asm_11b1ef + +.asm_11b1e8 + ld a, [hl] + add d + ld [hl], a + jr .asm_11b1ef + +.asm_11b1ed + and a + ret + +.asm_11b1ef + call Function11b295 + call Function11b275 + scf + ret + +FillScreenWithTile32: ; unreferenced + hlcoord 0, 0 + ld a, $32 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + ret + +CopyDataUntilFF: ; unreferenced +.loop + ld a, [de] + cp $ff + ret z + inc de + ld [hli], a + jr .loop + +Function11b20b: + ld a, [wc7d1] + ld hl, wc7d0 + add [hl] + ld e, a + ld d, 0 + ld hl, wc6d0 + add hl, de + ld a, [hl] + ld [wTempSpecies], a + ret + +CheckCaughtMemMon: + push de + push hl + ld a, [wTempSpecies] + call CheckCaughtMon + pop hl + pop de + ret + +CheckSeenMemMon: + push de + push hl + ld a, [wTempSpecies] + call CheckSeenMon + pop hl + pop de + ret + +Function11b236: + jp FillBoxWithByte + +Function11b239: + ld e, a + ld d, 0 + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + ret + +Function11b242: + hlcoord 3, 4 + ld de, wStringBuffer3 + call PlaceString + xor a + ld [wMonType], a + farcall GetGender + hlcoord 1, 4 + ld a, [wCurPartySpecies] + ld bc, wcd2f + ld [bc], a + dec bc + jr c, asm_11b26a + jr z, asm_11b26f + ld a, $1 + ld [bc], a + +Function11b267: + ld [hl], $ef + ret + +asm_11b26a: + xor a + ld [bc], a + ld [hl], $7f + ret + +asm_11b26f: + ld a, $2 + ld [bc], a + +Function11b272: + ld [hl], $f5 + ret + +Function11b275: + call Function11b279 + ret + +Function11b279: + ld a, [wTempSpecies] + ld [wCurSpecies], a + call CheckSeenMemMon + jr z, .asm_11b28f + call GetBaseData + ld a, [wBaseGender] + ld [wcf65], a + jr .asm_11b294 + +.asm_11b28f + ld a, $ff + ld [wcf65], a + +.asm_11b294 + ret + +Function11b295: + hlcoord 4, 13 + ld de, String_11b308 + call PlaceString + hlcoord 4, 14 + ld de, String_11b308 + call PlaceString + call Function11b20b + call CheckSeenMemMon + jr z, .asm_11b2d1 + ld a, [wc608] + ld c, a + ld a, [wc608 + 1] + ld b, a + ld hl, $0007 + add hl, bc + xor a + ld [hl], a + ld hl, $0003 + add hl, bc + ld e, [hl] + farcall FlyFunction_GetMonIcon + hlcoord 4, 14 + push hl + call GetPokemonName + jr .asm_11b2e7 + +.asm_11b2d1 + ld a, [wc608] + ld c, a + ld a, [wc608 + 1] + ld b, a + ld hl, $0007 + add hl, bc + ld a, $50 + ld [hl], a + hlcoord 4, 13 + push hl + ld de, String_11b30e + +.asm_11b2e7 + ld a, NAME_LENGTH_JAPANESE + ld bc, wStringBuffer4 +.asm_11b2ec + push af + ld a, [de] + ld [bc], a + inc de + inc bc + pop af + dec a + and a + jr nz, .asm_11b2ec + pop hl + ld de, wStringBuffer4 + call PlaceString + ret + +String_11b2fe: ; unreferenced + db "あげる#@" + +String_11b303: ; unreferenced + db "ほしい#@" + +String_11b308: + db "     @" + +String_11b30e: + db "みはっけん@" + +Function11b314: + call Function11b31b + call Function11b3d9 + ret + +Function11b31b: + ld hl, .Coords + ld a, [wJumptableIndex] + cp 2 + jr c, .tilemap_1 + ld a, [wc7d1] + cp 4 + jr nc, .tilemap_3 + cp 3 + jr c, .tilemap_1 + ld a, [wJumptableIndex] + cp 2 + jr z, .tilemap_1 + cp 3 + jr z, .tilemap_1 + cp 6 + jr z, .tilemap_1 + + ld bc, .Tilemap2 + jr .load_sprites + +.tilemap_3 + ld bc, .Tilemap3 + jr .load_sprites + +.tilemap_1 + ld bc, .Tilemap1 + +.load_sprites + call Function11b397 + ret + +.Coords: + dbpixel 3, 11, 2, 6 ; 0 + dbpixel 3, 12, 2, 6 ; 1 + dbpixel 3, 13, 2, 6 ; 2 + dbpixel 3, 14, 2, 6 ; 3 + dbpixel 3, 15, 2, 6 ; 4 + dbpixel 3, 16, 2, 6 ; 5 + dbpixel 3, 17, 2, 6 ; 6 + dbpixel 4, 11, 2, 6 ; 7 + dbpixel 4, 12, 2, 6 ; 8 + dbpixel 4, 13, 2, 6 ; 9 + dbpixel 4, 14, 2, 6 ; 10 + dbpixel 4, 15, 2, 6 ; 11 + dbpixel 4, 16, 2, 6 ; 12 + dbpixel 4, 17, 2, 6 ; 13 + db -1 + +.Tilemap1: ; vtiles + db $30 ; 0 + db $31 ; 1 + db $31 ; 2 + db $31 ; 3 + db $31 ; 4 + db $31 ; 5 + db $32 ; 6 + db $40 ; 7 + db $41 ; 8 + db $41 ; 9 + db $41 ; 10 + db $41 ; 11 + db $41 ; 12 + db $42 ; 13 + +.Tilemap2: ; vtiles + db $30 ; 0 + db $31 ; 1 + db $31 ; 2 + db $39 ; 3 + db $39 ; 4 + db $39 ; 5 + db $39 ; 6 + db $40 ; 7 + db $41 ; 8 + db $41 ; 9 + db $39 ; 10 + db $39 ; 11 + db $39 ; 12 + db $39 ; 13 + +.Tilemap3: ; vtiles + db $39 ; 0 + db $39 ; 1 + db $39 ; 2 + db $39 ; 3 + db $39 ; 4 + db $39 ; 5 + db $39 ; 6 + db $39 ; 7 + db $39 ; 8 + db $39 ; 9 + db $39 ; 10 + db $39 ; 11 + db $39 ; 12 + db $39 ; 13 + +Function11b397: + ld de, wShadowOAMSprite00 +.loop + ld a, [hl] + cp $ff + ret z + ld a, [wc7d1] + and $7 + swap a + add [hl] + inc hl + ld [de], a ; y + inc de + + ld a, [hli] + ld [de], a ; x + inc de + + ld a, [bc] + inc bc + ld [de], a ; tile id + inc de + ld a, $5 + ld [de], a ; attributes + inc de + jr .loop + +Function11b3b6: ; unreferenced +.loop + ld a, [hl] + cp -1 + ret z + ld a, [wcd4d] + and $7 + swap a + add [hl] + inc hl + ld [de], a + inc de + ld a, [hli] + ld [de], a + inc de + push hl + ld l, c + ld h, b + ld a, [wcd4e] + add [hl] + inc bc + ld [de], a + inc de + pop hl + ld a, $5 + ld [de], a + inc de + jr .loop + +Function11b3d9: + ld de, wShadowOAMSprite28 + push de + ld a, [wc7d2] + dec a + ld e, a + ld a, [wc7d1] + ld hl, wc7d0 + add [hl] + cp e + jr z, .skip + ld hl, 0 + ld bc, $70 + call AddNTimes + ld e, l + ld d, h + ld b, 0 + ld a, d + or e + jr z, .load_sprites + ld a, [wc7d2] + ld c, a +.loop1 + ld a, e + sub c + ld e, a + ld a, d + sbc $0 + ld d, a + jr c, .load_sprites + inc b + jr .loop1 + +.skip + ld b, 14 * 8 + +.load_sprites + ld a, 2 * 8 + 5 + add b + pop hl + ld [hli], a + cp $41 + jr c, .version1 + ld a, [wJumptableIndex] + cp 4 + jr z, .version2 + cp 5 + jr z, .version2 + cp 7 + jr z, .version2 + cp 8 + jr z, .version2 + +.version1 + ld a, 19 * 8 + 3 + ld [hli], a + ld a, [wcd4c] + add $3c + ld [hli], a + ld a, [wcd4c] + add $1 + ld [hl], a + ret + +.version2 + ld a, 19 * 8 + 3 + ld [hli], a + ld a, $39 + ld [hli], a + xor a + ld [hl], a + ret + +TradeCornerHoldMon: +; special + call Mobile46_InitJumptable + call TradeCornerHoldMon_RunJumptable + ret + +Mobile46_InitJumptable: + xor a + ld [wJumptableIndex], a + ld [wcf64], a + ld [wcf65], a + ld [wcf66], a + call UpdateTime + ret + +TradeCornerHoldMon_RunJumptable: +.loop + call .IterateJumptable + call DelayFrame + ld a, [wJumptableIndex] + cp 4 + jr nz, .loop + ret + +.IterateJumptable: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + dw TradeCornerHoldMon_PrepareForUpload + dw Function11b570 + dw TradeCornerHoldMon_RemoveFromParty + dw TradeCornerHoldMon_Success + dw TradeCornerHoldMon_Noop ; unused + +TradeCornerHoldMon_PrepareForUpload: + call .InitRAM + ld hl, wPlayerName + ld a, NAME_LENGTH_JAPANESE - 1 +.get_char + push af + ld a, [hli] + ld [bc], a + inc bc + pop af + dec a + and a + jr nz, .get_char + + ld de, PARTYMON_STRUCT_LENGTH + ld hl, wPartyMon1Species + ld a, [wcd82] + dec a + push af + +.get_next_party_mon + and a + jr z, .got_selected_mon + add hl, de + dec a + jr .get_next_party_mon + +.got_selected_mon + push bc + ld a, PARTYMON_STRUCT_LENGTH +.copy_mon_byte + ; copies wPartyMon to bc. + push af + ld a, [hli] + ld [bc], a + inc bc + pop af + dec a + and a + jr nz, .copy_mon_byte + + pop de ; pushed from bc + push bc + ld a, [de] + ld [wCurSpecies], a + call GetBaseData + ld hl, MON_LEVEL + add hl, de + ld a, [hl] + ld [wCurPartyLevel], a + ld hl, MON_MAXHP + add hl, de + push hl + ld hl, MON_STAT_EXP - 1 + add hl, de + pop de + push de + ld b, TRUE + predef CalcMonStats + pop de + ld h, d + ld l, e + dec hl + dec hl + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hl], a + pop bc + ld de, NAME_LENGTH + ld hl, wPartyMonOTs + pop af + push af +.loop4 + and a + jr z, .okay2 + add hl, de + dec a + jr .loop4 + +.okay2 + ld a, NAME_LENGTH - 1 +.loop5 + push af + ld a, [hli] + ld [bc], a + inc bc + pop af + dec a + and a + jr nz, .loop5 + ld de, NAME_LENGTH + ld hl, wPartyMonNicknames + pop af + push af +.loop6 + and a + jr z, .okay3 + add hl, de + dec a + jr .loop6 + +.okay3 + ld a, NAME_LENGTH - 1 +.loop7 + push af + ld a, [hli] + ld [bc], a + inc bc + pop af + dec a + and a + jr nz, .loop7 + ld de, MAIL_STRUCT_LENGTH + ld hl, sPartyMail + pop af +.loop8 + and a + jr z, .okay4 + add hl, de + dec a + jr .loop8 + +.okay4 + ld a, BANK(sPartyMail) + call OpenSRAM + ld a, MAIL_STRUCT_LENGTH +.loop9 + push af + ld a, [hli] + ld [bc], a + inc bc + pop af + dec a + and a + jr nz, .loop9 + call CloseSRAM + jp MobileIncJumptableIndex + +.InitRAM: + ld bc, wOfferTrainerID + ld a, [wPlayerID] + ld [wcd2a], a + ld [bc], a + inc bc + + ld a, [wPlayerID + 1] + ld [wcd2b], a + ld [bc], a + inc bc + + ld a, [wSecretID] + ld [wcd2c], a + ld [bc], a + inc bc + + ld a, [wSecretID + 1] + ld [wcd2d], a + ld [bc], a + inc bc + + ld a, [wcd2e] ; offer gender + ld [bc], a + inc bc + + ld a, [wcd2f] ; offer species + ld [bc], a + inc bc + + ld a, [wcd30] ; req gender + ld [bc], a + inc bc + + ld a, [wd265] ; req species + ld [bc], a + inc bc + ret + +Function11b570: + call Function118007 + ld a, [wScriptVar] + and a + jr nz, .exit + call .SaveData + jp MobileIncJumptableIndex + +.exit + ld a, $4 + ld [wJumptableIndex], a + ret + +.SaveData: + ld a, $3 + ldh [rSVBK], a + + ld hl, w3_d800 + ld de, wc608 + ld bc, w3_d88f - w3_d800 + call CopyBytes + + ld a, $1 + ldh [rSVBK], a + ld a, BANK(s5_a800) + call OpenSRAM + + ld de, s5_a800 + ld a, $1 + ld [de], a + inc de + ld hl, wc608 + ld bc, w3_d88f - w3_d800 + call CopyBytes + + push de + pop hl + + ldh a, [hRTCMinutes] + ld [hli], a + ldh a, [hRTCHours] + ld [hli], a + ldh a, [hRTCDayLo] + ld [hli], a + ldh a, [hRTCDayHi] + ld [hl], a + + call CloseSRAM + ret + +TradeCornerHoldMon_RemoveFromParty: + ld a, [wcd82] + dec a + ld [wCurPartyMon], a + xor a ; REMOVE_PARTY + ld [wPokemonWithdrawDepositParameter], a + farcall RemoveMonFromPartyOrBox + farcall BattleTowerAction_16 + farcall SaveAfterLinkTrade + jp MobileIncJumptableIndex + +TradeCornerHoldMon_Success: + xor a + ld [wScriptVar], a + jp MobileIncJumptableIndex + +TradeCornerHoldMon_Noop: + ret + +Function11b5e8: + ld a, $0 + call OpenSRAM + ld hl, wRTC + ld de, wc608 + ld bc, 4 + call CopyBytes + call CloseSRAM + ld a, $5 + call OpenSRAM + ld hl, wc608 + ld de, $b08c + ld bc, 4 + call CopyBytes + ld a, $2 + ld [$a800], a + ld a, [$a81f] + ld [wcd2a], a + ld a, [$a820] + ld [wcd2b], a + ld a, [$a821] + ld [wcd2c], a + ld a, [$a822] + ld [wcd2d], a + ld a, [$a823] + ld [wcd2e], a + ld a, [$a824] + ld [wcd2f], a + ld a, [$a825] + ld [wcd30], a + ld a, [$a826] + ld [wcd31], a + call CloseSRAM + call Mobile46_InitJumptable + call .loop + ret + +.loop + call .RunJumptable + call DelayFrame + ld a, [wJumptableIndex] + cp $1 + jr nz, .loop + ret + +.RunJumptable: + jumptable .Jumptable, wJumptableIndex + +.Jumptable: + dw Function11b66d + dw Function11b6b3 + +Function11b66d: + call Function1180b8 + ld a, [wScriptVar] + and a + jr nz, .asm_11b6b0 + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a + ld a, [w3_d090] + ld b, a + pop af + ldh [rSVBK], a + ld a, b + and a + jr z, .asm_11b691 + cp $1 + jr nz, .asm_11b6b0 + call Function11b6b4 + jr .asm_11b6b0 + +.asm_11b691 + farcall BattleTowerAction_17 + ld a, [wScriptVar] + and a + jr z, .asm_11b6b0 + xor a + ld [wScriptVar], a + ldh a, [rSVBK] + push af + ld a, $3 + ldh [rSVBK], a + ld a, $2 + ld [w3_d090], a + pop af + ldh [rSVBK], a + +.asm_11b6b0 + jp MobileIncJumptableIndex + +Function11b6b3: + ret + +Function11b6b4: + ld a, $5 + call OpenSRAM + ld a, [wcd30] + ld [wc708], a + ld a, [wcd31] + ld [wc709], a + + ld a, LOW(wc708) + ld [wMobileMonSpeciesPointer], a + ld a, HIGH(wc708) + ld [wMobileMonSpeciesPointer + 1], a + + ld a, LOW(wMobileMon) + ld [wMobileMonStructPointer], a + ld a, HIGH(wMobileMon) + ld [wMobileMonStructPointer + 1], a + + ld a, LOW(wMobileMonOT) + ld [wMobileMonOTPointer], a + ld a, HIGH(wMobileMonOT) + ld [wMobileMonOTPointer + 1], a + + ld a, LOW(wMobileMonNick) + ld [wMobileMonNicknamePointer], a + ld a, HIGH(wMobileMonNick) + ld [wMobileMonNicknamePointer + 1], a + + ld a, LOW(wMobileMonMail) + ld [wMobileMonMailPointer], a + ld a, HIGH(wMobileMonMail) + ld [wMobileMonMailPointer + 1], a + + ld a, BASE_HAPPINESS + ld [wMobileMonHappiness], a + + ld de, wMobileMonOT + ld c, NAME_LENGTH_JAPANESE - 1 + farcall CheckStringForErrors + jr nc, .length_check_OT + farcall Mobile_CopyDefaultOTName + +.length_check_OT + ld de, wMobileMonOT + lb bc, 1, NAME_LENGTH_JAPANESE - 1 + farcall CheckStringContainsLessThanBNextCharacters + jr nc, .error_check_nick + farcall Mobile_CopyDefaultOTName + +.error_check_nick + ld de, wMobileMonNick + ld c, NAME_LENGTH_JAPANESE - 1 + farcall CheckStringForErrors + jr nc, .length_check_nick + farcall Mobile_CopyDefaultNickname + +.length_check_nick + ld de, wMobileMonNick + lb bc, 1, NAME_LENGTH_JAPANESE - 1 + farcall CheckStringContainsLessThanBNextCharacters + jr nc, .error_check_mail + farcall Mobile_CopyDefaultNickname + +.error_check_mail + ld de, wMobileMonMail + ld c, MAIL_MSG_LENGTH + 1 + farcall CheckStringForErrors + jr nc, .length_check_mail + farcall Mobile_CopyDefaultMail + +.length_check_mail + ld de, wMobileMonMail + lb bc, 2, MAIL_MSG_LENGTH + 1 + farcall CheckStringContainsLessThanBNextCharacters + jr c, .fix_mail + ld a, b + cp $2 + jr nz, .mail_ok + +.fix_mail + farcall Mobile_CopyDefaultMail + +.mail_ok + ld de, wMobileMonMailAuthor + ld c, NAME_LENGTH_JAPANESE - 1 + farcall CheckStringForErrors + jr nc, .length_check_author + farcall Mobile_CopyDefaultMailAuthor + +.length_check_author + ld de, wMobileMonMailAuthor + lb bc, 1, NAME_LENGTH_JAPANESE - 1 + farcall CheckStringContainsLessThanBNextCharacters + jr nc, .author_okay + farcall Mobile_CopyDefaultMailAuthor + +.author_okay + ld a, [wMobileMonItem] + cp -1 + jr nz, .item_okay + xor a + ld [wMobileMonItem], a + +.item_okay + ld a, [wcd31] + ld [wMobileMonSpecies], a + ld [wCurSpecies], a + call GetBaseData + + ld hl, wMobileMonLevel + ld a, [hl] + cp MIN_LEVEL + ld a, MIN_LEVEL + jr c, .replace_level + ld a, [hl] + cp MAX_LEVEL + jr c, .done_level + ld a, MAX_LEVEL +.replace_level + ld [hl], a +.done_level + ld [wCurPartyLevel], a + + ld hl, wMobileMonExp + 2 + ld de, wMobileMonMaxHP + ld b, TRUE + predef CalcMonStats + ld de, wMobileMonMaxHP + ld hl, wMobileMonHP + ld a, [de] + ld [hli], a + inc de + ld a, [de] + ld [hl], a + call AddMobileMonToParty + ret + +Function11b7e5: + ld a, [wMobileMonSpecies] + ld [wOTTrademonSpecies], a + ld [wCurPartySpecies], a + ld a, [wcd81] + ld [wc74e], a + ld hl, wMobileMonOT ; OT + ld de, wOTTrademonOTName + ld bc, 5 + call CopyBytes + ld a, "@" + ld [de], a + ld a, [wMobileMonID] + ld [wOTTrademonID], a + ld a, [wMobileMonID + 1] + ld [wOTTrademonID + 1], a + ld hl, wMobileMonDVs + ld a, [hli] + ld [wOTTrademonDVs], a + ld a, [hl] + ld [wOTTrademonDVs + 1], a + ld bc, wMobileMon ; pokemon_data_start + farcall GetCaughtGender + ld a, c + ld [wOTTrademonCaughtData], a + call SpeechTextbox + call FadeToMenu + farcall MobileTradeAnimation_ReceiveGetmonFromGTS + farcall Function17d1f1 + ld a, $1 + ld [wForceEvolution], a + ld a, LINK_TRADECENTER + ld [wLinkMode], a + farcall EvolvePokemon + xor a + ld [wLinkMode], a + farcall SaveAfterLinkTrade + ld a, BANK(s5_a800) + call OpenSRAM + ld a, $5 + ld [s5_a800], a + call CloseSRAM + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetMapSceneID + ld a, d + or e + jr z, .asm_11b872 + ld a, $1 + ld [de], a + +.asm_11b872 + call CloseSubmenu + call RestartMapMusic + ret + +Function11b879: + farcall BattleTower_CheckSaveFileExistsAndIsYours + ld a, [wScriptVar] + and a + ret z + ld a, BANK(s5_a800) + call OpenSRAM + ld a, [s5_a800] + ld [wScriptVar], a + ld a, [s5_a890] + ld [wcd49], a + ld a, [s5_a891] + ld [wcd4a], a + ld a, [s5_a892] + ld [wcd4b], a + ld a, [s5_a893] + ld [wcd4c], a + call CloseSRAM + ld a, [wScriptVar] + and a + ret z + ld hl, wcd4c + ldh a, [hRTCDayHi] + cp [hl] + ret nz + dec hl + ldh a, [hRTCDayLo] + cp [hl] + ret nz + ld hl, wcd4a + ldh a, [hRTCHours] + cp [hl] + jr nc, .asm_11b8d8 + ld a, $18 + sub [hl] + ld hl, hRTCHours + add [hl] + ld [wcd4c], a + ldh a, [hRTCMinutes] + ld [wcd4b], a + xor a + ld [wcd4a], a + jr .asm_11b8e2 + +.asm_11b8d8 + ldh a, [hRTCMinutes] + ld [wcd4b], a + ldh a, [hRTCHours] + ld [wcd4c], a + +.asm_11b8e2 + xor a + ld l, a + ld h, a + ld b, a + ld d, a + ld a, [wcd4b] + ld e, a + ld a, [wcd4c] + ld c, $3c + call AddNTimes + add hl, de + push hl + xor a + ld l, a + ld h, a + ld b, a + ld d, a + ld a, [wcd49] + ld e, a + ld a, [wcd4a] + ld c, $3c + call AddNTimes + add hl, de + ld a, l + cpl + add $1 + ld e, a + ld a, h + cpl + adc 0 + ld d, a + pop hl + add hl, de + ld de, $ff88 + add hl, de + bit 7, h + ret z + ld a, $2 + ld [wScriptVar], a + ret + +Function11b920: + call Mobile46_InitJumptable + ld a, BANK(sOfferTrainerID) + call OpenSRAM + ld hl, sOfferTrainerID + ld de, wOfferTrainerID + ld bc, 8 + call CopyBytes + call CloseSRAM + call Function118000 + ret + +Function11b93b: + ld a, BANK(s5_a800) + call OpenSRAM + xor a + ld [s5_a800], a + ld hl, sOfferGender + ld de, wc608 + ld bc, TRADE_CORNER_REQUEST_LENGTH + call CopyBytes + call CloseSRAM + + ld a, LOW(wUnknownGender) + ld [wMobileMonSpeciesPointer], a + ld a, HIGH(wUnknownGender) + ld [wMobileMonSpeciesPointer + 1], a + + ld a, LOW(wUnknownMon) + ld [wMobileMonStructPointer], a + ld a, HIGH(wUnknownMon) + ld [wMobileMonStructPointer + 1], a + + ld a, LOW(wUnknownMonOT) + ld [wMobileMonOTPointer], a + ld a, HIGH(wUnknownMonOT) + ld [wMobileMonOTPointer + 1], a + + ld a, LOW(wUnknownMonNick) + ld [wMobileMonNicknamePointer], a + ld a, HIGH(wUnknownMonNick) + ld [wMobileMonNicknamePointer + 1], a + + ld a, LOW(wUnknownMonMail) + ld [wMobileMonMailPointer], a + ld a, HIGH(wUnknownMonMail) + ld [wMobileMonMailPointer + 1], a + call AddMobileMonToParty + farcall SaveAfterLinkTrade + ret + +AddMobileMonToParty: + ld hl, wPartyCount + ld a, [hl] + ld e, a + inc [hl] + + ld a, [wMobileMonSpeciesPointer] + ld l, a + ld a, [wMobileMonSpeciesPointer + 1] + ld h, a + inc hl + ld bc, wPartySpecies + ld d, e +.loop1 + inc bc + dec d + jr nz, .loop1 + ld a, e + ld [wCurPartyMon], a + ld a, [hl] + ld [bc], a + inc bc + ld a, -1 + ld [bc], a + + ld hl, wPartyMon1Species + ld bc, PARTYMON_STRUCT_LENGTH + ld a, e + ld [wMobileMonIndex], a +.loop2 + add hl, bc + dec a + and a + jr nz, .loop2 + ld e, l + ld d, h + ld a, [wMobileMonStructPointer] + ld l, a + ld a, [wMobileMonStructPointer + 1] + ld h, a + ld bc, PARTYMON_STRUCT_LENGTH + call CopyBytes + + ld hl, wPartyMonOTs + ld bc, NAME_LENGTH + ld a, [wMobileMonIndex] +.loop3 + add hl, bc + dec a + and a + jr nz, .loop3 + ld e, l + ld d, h + ld a, [wMobileMonOTPointer] + ld l, a + ld a, [wMobileMonOTPointer + 1] + ld h, a + ld bc, MON_NAME_LENGTH - 1 + call CopyBytes + ld a, "@" + ld [de], a + + ld hl, wPartyMonNicknames + ld bc, MON_NAME_LENGTH + ld a, [wMobileMonIndex] +.loop4 + add hl, bc + dec a + and a + jr nz, .loop4 + ld e, l + ld d, h + ld a, [wMobileMonNicknamePointer] + ld l, a + ld a, [wMobileMonNicknamePointer + 1] + ld h, a + ld bc, MON_NAME_LENGTH - 1 + call CopyBytes + ld a, "@" + ld [de], a + + ld hl, sPartyMail + ld bc, MAIL_STRUCT_LENGTH + ld a, [wMobileMonIndex] +.loop5 + add hl, bc + dec a + and a + jr nz, .loop5 + ld a, BANK(sPartyMail) + call OpenSRAM + ld e, l + ld d, h + ld a, [wMobileMonMailPointer] + ld l, a + ld a, [wMobileMonMailPointer + 1] + ld h, a + ld bc, MAIL_STRUCT_LENGTH + call CopyBytes + + call CloseSRAM + ret + +Function11ba38: + farcall CheckCurPartyMonFainted + ret c + xor a + ld [wScriptVar], a + ret + +TilemapPack_11ba44: + db $47, $30, $0a, $0a, $0a, $0a, $0a, $56 ; 00 + db $46, $2f, $0a, $0a, $0a, $0a, $0a, $55 ; 01 + db $45, $3d, $0a, $0a, $0a, $0a, $0a, $54 ; 02 + db $44, $30, $0a, $0a, $0a, $0a, $0a, $53 ; 03 + db $43, $2f, $0a, $0a, $0a, $0a, $0a, $52 ; 04 + db $4a, $3d, $0a, $0a, $0a, $0a, $0a, $51 ; 05 + db $4a, $30, $0a, $0a, $0a, $0a, $0a, $50 ; 06 + db $4a, $2f, $0a, $0a, $0a, $0a, $0a, $4f ; 07 + db $4a, $3d, $0a, $0a, $0a, $0a, $0a, $4e ; 08 + db $4a, $30, $0a, $0a, $0a, $0a, $4d, $42 ; 09 + db $4a, $2f, $0a, $0a, $0a, $0a, $6b, $58 ; 0a + db $4a, $3d, $0a, $0a, $0a, $0a, $6a, $58 ; 0b + db $4a, $30, $0a, $0a, $0a, $0a, $69, $58 ; 0c + db $4a, $2f, $0a, $0a, $0a, $0a, $68, $58 ; 0d + db $4a, $3d, $0a, $0a, $0a, $66, $67, $58 ; 0e + db $4a, $30, $0a, $0a, $0a, $65, $0a, $58 ; 0f + db $4a, $2f, $0a, $0a, $0a, $64, $0a, $58 ; 10 + db $4a, $3d, $0a, $0a, $0a, $63, $0a, $58 ; 11 + db $4a, $30, $0a, $0a, $61, $62, $0a, $58 ; 12 + db $4a, $2f, $0a, $0a, $5f, $60, $0a, $58 ; 13 + db $4a, $3d, $0a, $61, $62, $0a, $0a, $58 ; 14 + db $4a, $30, $0a, $63, $0a, $0a, $0a, $58 ; 15 + db $4a, $2f, $69, $0a, $0a, $0a, $0a, $58 ; 16 + db $4a, $3d, $81, $0a, $0a, $0a, $0a, $58 ; 17 + db $4a, $30, $80, $0a, $0a, $0a, $0a, $58 ; 18 + db $4a, $2f, $7f, $0a, $0a, $0a, $0a, $58 ; 19 + db $4a, $3d, $0a, $0a, $0a, $0a, $0a, $58 ; 1a + db $4a, $30, $0a, $0a, $0a, $0a, $0a, $58 ; 1b + db $4a, $2f, $68, $87, $88, $89, $0a, $58 ; 1c + db $4a, $3d, $6e, $6f, $70, $75, $76, $58 ; 1d + db $4a, $30, $75, $76, $5c, $5d, $5e, $58 ; 1e + db $4a, $2f, $71, $72, $73, $74, $6d, $58 ; 1f + db $4a, $3d, $75, $76, $77, $8a, $8b, $58 ; 20 + db $4a, $30, $66, $67, $65, $0a, $6a, $58 ; 21 + db $4a, $2f, $83, $84, $0a, $83, $84, $58 ; 22 + db $4a, $3d, $0a, $85, $82, $84, $0a, $58 ; 23 + db $4a, $30, $41, $80, $40, $0a, $0a, $58 ; 24 + db $4a, $2f, $83, $0a, $0a, $0a, $0a, $58 ; 25 + db $4a, $3d, $40, $0a, $0a, $0a, $0a, $58 ; 26 + db -1 + +TilemapPack_11bb7d: + db $0a, $0a, $0a, $0a, $0a, $0a, $16, $00 ; 00 + db $78, $0a, $0a, $0a, $0a, $0a, $8c, $00 ; 01 + db $79, $0a, $0a, $0a, $0a, $0a, $8d, $00 ; 02 + db $7a, $0a, $0a, $0a, $0a, $0a, $8e, $00 ; 03 + db $7b, $0a, $0a, $0a, $0a, $0a, $8c, $00 ; 04 + db $7c, $0a, $0a, $0a, $0a, $0a, $8d, $00 ; 05 + db $7d, $0a, $0a, $0a, $0a, $0a, $8e, $00 ; 06 + db $2e, $7e, $0a, $0a, $0a, $0a, $8c, $00 ; 07 + db $2e, $80, $0a, $0a, $0a, $0a, $8d, $00 ; 08 + db $2e, $81, $0a, $0a, $0a, $0a, $8e, $00 ; 09 + db $2e, $82, $0a, $0a, $0a, $0a, $8c, $00 ; 0a + db $2e, $69, $0a, $0a, $0a, $0a, $8d, $00 ; 0b + db $2e, $6a, $0a, $0a, $0a, $0a, $8e, $00 ; 0c + db $2e, $6b, $0a, $0a, $0a, $0a, $8c, $00 ; 0d + db $2e, $0a, $68, $0a, $0a, $0a, $8d, $00 ; 0e + db $2e, $0a, $69, $0a, $0a, $0a, $8e, $00 ; 0f + db $2e, $0a, $0a, $6a, $0a, $0a, $8c, $00 ; 10 + db $2e, $0a, $0a, $6b, $0a, $0a, $8d, $00 ; 11 + db $2e, $0a, $0a, $0a, $80, $0a, $8e, $00 ; 12 + db $2e, $0a, $0a, $0a, $82, $0a, $8c, $00 ; 13 + db $2e, $0a, $0a, $0a, $6c, $0a, $8d, $00 ; 14 + db $2e, $0a, $0a, $0a, $0a, $83, $8e, $00 ; 15 + db $2e, $0a, $6b, $0a, $0a, $0a, $8c, $00 ; 16 + db $2e, $0a, $0a, $69, $0a, $0a, $8d, $00 ; 17 + db $2e, $0a, $0a, $6a, $0a, $0a, $8e, $00 ; 18 + db $2e, $0a, $0a, $0a, $68, $0a, $8c, $00 ; 19 + db $2e, $0a, $0a, $0a, $63, $0a, $8d, $00 ; 1a + db $2e, $0a, $0a, $61, $62, $0a, $8e, $00 ; 1b + db $2e, $0a, $0a, $0a, $5f, $60, $8c, $00 ; 1c + db $2e, $0a, $0a, $0a, $63, $0a, $8d, $00 ; 1d + db $2e, $0a, $0a, $0a, $0a, $69, $8c, $00 ; 1e + db $2e, $0a, $0a, $0a, $0a, $6b, $8d, $00 ; 1f + db $2e, $0a, $0a, $0a, $0a, $83, $8e, $00 ; 20 + db $2e, $0a, $0a, $0a, $0a, $86, $8c, $00 ; 21 + db $2e, $0a, $85, $0a, $0a, $0a, $8d, $00 ; 22 + db $2e, $0a, $0a, $84, $0a, $0a, $8e, $00 ; 23 + db -1 diff --git a/mobile/mobile_5b.asm b/mobile/mobile_5b.asm new file mode 100644 index 0000000..1a36315 --- /dev/null +++ b/mobile/mobile_5b.asm @@ -0,0 +1,781 @@ +Function16c000: ; unreferenced + ; Only for CGB + ldh a, [hCGB] + and a + ret z + ; Only do this once per boot cycle + ldh a, [hSystemBooted] + and a + ret z + ; Disable the joypad during mobile setup + ld a, [wJoypadDisable] + push af + set JOYPAD_DISABLE_SGB_TRANSFER_F, a + ld [wJoypadDisable], a + ; Do stuff + call MobileSystemSplashScreen_InitGFX ; Load GFX + farcall SetRAMStateForMobile + farcall EnableMobile + call .RunJumptable + farcall DisableMobile + ; Prevent this routine from running again + ; until the next time the system is turned on + xor a + ldh [hSystemBooted], a + ; Restore the flag state + pop af + ld [wJoypadDisable], a + ret + +.RunJumptable: + xor a + ld [wJumptableIndex], a + ld [wcf64], a + ld [wd002], a + ld [wd003], a +.loop + call DelayFrame + farcall Function10635c + ld a, [wd002] + ld hl, .Jumptable + rst JumpTable + call Function16cb2e + call Function16cbae + ld a, [wd002] + cp $ff + jr nz, .loop + ret + +.Jumptable: + dw .init + dw Function16c0ba + dw Function16c089 + dw Function16c09e + dw Function16c0a8 + dw Function16c0dc + dw Function16c0ec + dw Function16c0ba + dw Function16c0ca + dw Function16c0dc + dw Function16c0ec + dw .quit + +.init + ld a, [wcf64] + and a + ret z + ld [wd002], a + xor a + ld [wd003], a + ret + +.quit + push af + ld a, $ff + ld [wd002], a + pop af + ret + +Function16c089: + ld a, $1 + ld [wd1eb], a + ld [wd1f1], a + xor a + ldh [hWY], a + call Function16c0fa + ld a, [wd002] + ld [wcf64], a + ret + +Function16c09e: + ld a, [wcf64] + cp $4 + ret nz + call Function16c0fa + ret + +Function16c0a8: + xor a + ld [wd1eb], a + ld [wd1f1], a + call ClearSprites + ld a, $90 + ldh [hWY], a + call Function16c0fa + ret + +Function16c0ba: + call Function16c943 + push af + ld a, [wd003] + inc a + ld [wd003], a + pop af + call c, Function16c0fa + ret + +Function16c0ca: + ld a, [wd003] + cp $28 + push af + ld a, [wd003] + inc a + ld [wd003], a + pop af + call z, Function16c0fa + ret + +Function16c0dc: + call Function16ca11 + push af + ld a, [wd003] + inc a + ld [wd003], a + pop af + call c, Function16c0fa + ret + +Function16c0ec: + call ClearBGPalettes + call ClearScreen + push af + ld a, $ff + ld [wd002], a + pop af + ret + +Function16c0fa: + push af + ld a, [wd002] + inc a + ld [wd002], a + xor a + ld [wd003], a + pop af + ret + +MobileSystemSplashScreen_InitGFX: + call DisableLCD + ld hl, vTiles2 + ld de, .Tiles + lb bc, BANK(.Tiles), 104 + call Get2bpp + call .LoadPals + call .LoadTilemap + call .LoadAttrmap + hlbgcoord 0, 0 + call Function16cc73 + call Function16cc02 + xor a + ldh [hBGMapMode], a + call EnableLCD + ret + +.LoadPals: + ld de, wBGPals1 + ld hl, MobileSplashScreenPalettes + ld bc, 8 + ld a, $5 + call FarCopyWRAM + farcall ApplyPals + ret + +.LoadTilemap: + hlcoord 0, 0 + ld bc, 20 + xor a + call ByteFill + ld hl, .Tilemap + decoord 0, 1 + ld bc, $0154 + call CopyBytes + ret + +.LoadAttrmap: + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH + xor a + call ByteFill + ld hl, .Attrmap + decoord 0, 1, wAttrmap + ld bc, 17 * SCREEN_WIDTH + call CopyBytes + ret + +.Tiles: +INCBIN "gfx/mobile/mobile_splash.2bpp" + +.Tilemap: +INCBIN "gfx/mobile/mobile_splash.tilemap" + +.Attrmap: +INCBIN "gfx/mobile/mobile_splash.attrmap" + +MobileSplashScreenPalettes: +INCLUDE "gfx/mobile/mobile_splash.pal" + +Function16c943: + ld a, [wd003] + and a + jr nz, .asm_16c95e + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld a, $ff + ld bc, 1 palettes + ld hl, wBGPals1 + call ByteFill + pop af + ldh [rSVBK], a + +.asm_16c95e + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld e, $0 + ld a, $0 +.asm_16c969 + ld hl, MobileSplashScreenPalettes + call Function16cab6 + call Function16cabb + ld d, a + ld hl, wBGPals1 + call Function16cab6 + call Function16cabb + cp d + jr z, .asm_16c991 + ld b, $1 +.asm_16c981 + dec a + cp d + jr z, .asm_16c988 + dec b + jr nz, .asm_16c981 + +.asm_16c988 + ld hl, wBGPals1 + call Function16cab6 + call Function16cadc + +.asm_16c991 + ld hl, MobileSplashScreenPalettes + call Function16cab6 + call Function16cad8 + ld d, a + ld hl, wBGPals1 + call Function16cab6 + call Function16cad8 + cp d + jr z, .asm_16c9b9 + ld b, $1 +.asm_16c9a9 + dec a + cp d + jr z, .asm_16c9b0 + dec b + jr nz, .asm_16c9a9 + +.asm_16c9b0 + ld hl, wBGPals1 + call Function16cab6 + call Function16cb08 + +.asm_16c9b9 + ld hl, MobileSplashScreenPalettes + call Function16cab6 + call Function16cac4 + ld d, a + ld hl, wBGPals1 + call Function16cab6 + call Function16cac4 + cp d + jr z, .asm_16c9e1 + ld b, $1 +.asm_16c9d1 + dec a + cp d + jr z, .asm_16c9d8 + dec b + jr nz, .asm_16c9d1 + +.asm_16c9d8 + ld hl, wBGPals1 + call Function16cab6 + call Function16cae8 + +.asm_16c9e1 + inc e + inc e + ld a, e + cp $8 + jr nz, .asm_16c969 + farcall ApplyPals + call SetPalettes + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld a, [wd003] + cp $1f + jr z, .asm_16ca09 + pop af + ldh [rSVBK], a + ld e, $0 + pop af + ldh [rSVBK], a + and a + ret + +.asm_16ca09 + pop af + ldh [rSVBK], a + pop af + ldh [rSVBK], a + scf + ret + +Function16ca11: + ld a, [wd003] + and a + jr nz, .asm_16ca1d + farcall ApplyPals + +.asm_16ca1d + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld e, $0 + ld a, $0 +.asm_16ca28 + ld hl, wBGPals1 + call Function16cab6 + call Function16cabb + cp $1f + jr z, .asm_16ca48 + ld b, $1 +.asm_16ca37 + inc a + cp $1f + jr z, .asm_16ca3f + dec b + jr nz, .asm_16ca37 + +.asm_16ca3f + ld hl, wBGPals1 + call Function16cab6 + call Function16cadc + +.asm_16ca48 + ld hl, wBGPals1 + call Function16cab6 + call Function16cad8 + cp $1f + jr z, .asm_16ca68 + ld b, $1 +.asm_16ca57 + inc a + cp $1f + jr z, .asm_16ca5f + dec b + jr nz, .asm_16ca57 + +.asm_16ca5f + ld hl, wBGPals1 + call Function16cab6 + call Function16cb08 + +.asm_16ca68 + ld hl, wBGPals1 + call Function16cab6 + call Function16cac4 + cp $1f + jr z, .asm_16ca88 + ld b, $1 +.asm_16ca77 + inc a + cp $1f + jr z, .asm_16ca7f + dec b + jr nz, .asm_16ca77 + +.asm_16ca7f + ld hl, wBGPals1 + call Function16cab6 + call Function16cae8 + +.asm_16ca88 + inc e + inc e + ld a, e + cp $8 + jr nz, .asm_16ca28 + farcall ApplyPals + call SetPalettes + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld a, [wd003] + cp $1f + jr z, .asm_16caae + pop af + ldh [rSVBK], a + pop af + ldh [rSVBK], a + and a + ret + +.asm_16caae + pop af + ldh [rSVBK], a + pop af + ldh [rSVBK], a + scf + ret + +Function16cab6: + ld b, $0 + ld c, e + add hl, bc + ret + +Function16cabb: + inc hl + ld a, [hl] + srl a + srl a + and $1f + ret + +Function16cac4: + inc hl + ld a, [hld] + and $3 + ld b, a + ld a, [hl] + sla a + rl b + sla a + rl b + sla a + rl b + ld a, b + ret + +Function16cad8: + ld a, [hl] + and $1f + ret + +Function16cadc: + sla a + sla a + ld b, a + inc hl + ld a, [hl] + and $83 + or b + ld [hl], a + ret + +Function16cae8: + ld c, a + srl a + srl a + srl a + ld b, a + inc hl + ld a, [hl] + and $fc + or b + ld [hld], a + ld a, c + sla a + sla a + sla a + sla a + sla a + ld b, a + ld a, [hl] + and $1f + or b + ld [hl], a + ret + +Function16cb08: + ld b, a + ld a, [hl] + and $e0 + or b + ld [hl], a + ret + +Function16cb0f: + xor a + ld [wd1ea], a + ld [wd1eb], a + xor a + ld [wd1ec], a + ld a, $70 + ld [wd1ee], a + ld a, $4 + ld [wd1ed], a + ld a, $a0 + ld [wd1ef], a + xor a + ld [wd1f0], a + ret + +Function16cb2e: + ld a, [wd1eb] + and a + ret z + call Function16cb40 + ld hl, Unknown_16cb86 + ld de, wShadowOAM + call Function16cb5d + ret + +Function16cb40: + ld hl, wd1ec + inc [hl] + ld a, [hl] + cp $18 + ret c + xor a + ld [hl], a + ld a, [wd1ef] + cp $a0 + jr nz, .asm_16cb57 + ld a, $a7 + ld [wd1ef], a + ret + +.asm_16cb57 + ld a, $a0 + ld [wd1ef], a + ret + +Function16cb5d: + ld a, [hli] + and a + ret z +.asm_16cb60 + push af + ld a, [wd1ee] + add [hl] + add $10 + ld [de], a + inc hl + inc de + ld a, [wd1ed] + add [hl] + add $8 + ld [de], a + inc hl + inc de + ld a, [wd1ef] + add [hl] + ld [de], a + inc hl + inc de + ld a, [wd1f0] + or [hl] + ld [de], a + inc hl + inc de + pop af + dec a + jr nz, .asm_16cb60 + ret + +Unknown_16cb86: + db 7 + db 0, 0, 0, 1 + db 8, 0, 1, 1 + db 8, 8, 2, 0 + db 8, 16, 3, 0 + db 16, 0, 4, 1 + db 16, 8, 5, 0 + db 16, 16, 6, 0 + +Function16cba3: + xor a + ld [wd1f1], a + ld [wd1f2], a + ld [wd1f3], a + ret + +Function16cbae: + ld a, [wd1f1] + and a + ret z + call Function16cbba + call Function16cbd1 + ret + +Function16cbba: + ld hl, wd1f2 + inc [hl] + ld a, [hl] + cp $c + ret c + xor a + ld [hl], a + ld a, [wd1f3] + inc a + cp $4 + jr c, .asm_16cbcd + xor a + +.asm_16cbcd + ld [wd1f3], a + ret + +Function16cbd1: + ld a, [wd1f3] + ld c, a + ld b, 0 + ld hl, Unknown_16cbfb + add hl, bc + ld a, [hl] + ld bc, 2 + ld hl, Unknown_16cfa3 + call AddNTimes + ld de, wBGPals1 palette 1 color 2 + ld bc, PAL_COLOR_SIZE + ld a, $5 + call FarCopyWRAM + farcall ApplyPals + ld a, TRUE + ldh [hCGBPalUpdate], a + ret + +Unknown_16cbfb: + db 0, 1, 2, 1, 0, 1, 2 + +Function16cc02: + call Function16cc18 + call Function16cc49 + call Function16cc62 + call Function16cc25 + call Function16cc6e + call Function16cb0f + call Function16cba3 + ret + +Function16cc18: + ld hl, vTiles1 + ld de, MobileAdapterCheckGFX + lb bc, BANK(MobileAdapterCheckGFX), 46 + call Get2bpp + ret + +Function16cc25: + ld hl, Unknown_16cfa9 + ld de, wBGPals1 + 1 palettes + call .CopyPal + ld hl, Unknown_16cfb1 + ld de, wOBPals1 + call .CopyPal + ld hl, Unknown_16cfb9 + ld de, wOBPals1 + 1 palettes + call .CopyPal + ret + +.CopyPal: + ld bc, 1 palettes + ld a, $5 + jp FarCopyWRAM + +Function16cc49: + hlcoord 4, 15 + ld a, $80 + call Function16cc5a + hlcoord 4, 16 + ld a, $90 + call Function16cc5a + ret + +Function16cc5a: + ld c, $10 +.asm_16cc5c + ld [hli], a + inc a + dec c + jr nz, .asm_16cc5c + ret + +Function16cc62: + hlcoord 0, 15, wAttrmap + ld bc, $0028 + ld a, $1 + call ByteFill + ret + +Function16cc6e: + hlbgcoord 0, 0, vBGMap1 + jr Function16cc73 + +Function16cc73: + ldh a, [rVBK] + push af + ld a, $0 + ldh [rVBK], a + push hl + decoord 0, 0 + call Function16cc90 + pop hl + ld a, $1 + ldh [rVBK], a + decoord 0, 0, wAttrmap + call Function16cc90 + pop af + ldh [rVBK], a + ret + +Function16cc90: + ld bc, $1214 +.asm_16cc93 + push bc +.asm_16cc94 + ld a, [de] + inc de + ld [hli], a + dec c + jr nz, .asm_16cc94 + ld bc, $000c + add hl, bc + pop bc + dec b + jr nz, .asm_16cc93 + ret + +MobileAdapterCheckGFX: +INCBIN "gfx/mobile/mobile_splash_check.2bpp" + +Unknown_16cfa3: + RGB 31, 31, 31 + RGB 25, 27, 29 + RGB 16, 19, 25 + +Unknown_16cfa9: + RGB 31, 31, 31 + RGB 25, 27, 29 + RGB 31, 31, 31 + RGB 07, 07, 07 + +Unknown_16cfb1: + RGB 31, 31, 31 + RGB 13, 09, 18 + RGB 26, 21, 16 + RGB 07, 07, 07 + +Unknown_16cfb9: + RGB 31, 31, 31 + RGB 18, 05, 02 + RGB 27, 11, 12 + RGB 07, 07, 07 diff --git a/mobile/mobile_5c.asm b/mobile/mobile_5c.asm new file mode 100644 index 0000000..37b364a --- /dev/null +++ b/mobile/mobile_5c.asm @@ -0,0 +1,875 @@ +Function170000: + ld a, [wOfferSpecies] + ld [wPlayerTrademonSpecies], a + ld hl, wOfferMonSender + ld de, wPlayerTrademonSenderName + ld bc, NAME_LENGTH_JAPANESE - 1 + call CopyBytes + ld a, "@" + ld [de], a + ld hl, wOfferMonOT + ld de, wPlayerTrademonOTName + ld bc, NAME_LENGTH_JAPANESE - 1 + call CopyBytes + ld a, "@" + ld [de], a + ld hl, wOfferMonDVs + ld a, [hli] + ld [wPlayerTrademonDVs], a + ld a, [hl] + ld [wPlayerTrademonDVs + 1], a + ld hl, wOfferMonID + ld a, [hli] + ld [wPlayerTrademonID], a + ld a, [hl] + ld [wPlayerTrademonID + 1], a + ld bc, wOfferMon + farcall GetCaughtGender + ld a, c + ld [wPlayerTrademonCaughtData], a + ld a, [wcd81] + ld [wc74e], a + ld hl, wc608 + ld de, $d800 + ld bc, TRADE_CORNER_REQUEST_LENGTH + call CopyBytes + ret + +Function17005a: + ld a, BANK(sOfferMon) + call OpenSRAM + ld a, [sOfferSpecies] + ld [wOTTrademonSpecies], a + ld hl, sOfferMonSender + ld de, wOTTrademonSenderName + ld bc, NAME_LENGTH_JAPANESE - 1 + call CopyBytes + ld a, "@" + ld [de], a + ld hl, sOfferMonOT + ld de, wOTTrademonOTName + ld bc, NAME_LENGTH_JAPANESE - 1 + call CopyBytes + ld a, "@" + ld [de], a + ld hl, sOfferMonDVs + ld a, [hli] + ld [wOTTrademonDVs], a + ld a, [hl] + ld [wOTTrademonDVs + 1], a + ld hl, sOfferMonID + ld a, [hli] + ld [wOTTrademonID], a + ld a, [hl] + ld [wOTTrademonID + 1], a + ld bc, sOfferMon + farcall GetCaughtGender + ld a, c + ld [wOTTrademonCaughtData], a + ld a, [wcd81] + ld [wc74e], a + call CloseSRAM + ret + +INCLUDE "engine/events/battle_tower/battle_tower.asm" + +Function170be4: + ld a, BANK(s5_a894) + call OpenSRAM + xor a + ld hl, s5_a894 + ld bc, 6 + 2 + call ByteFill + call CloseSRAM + ret + +Clears5_a89a: + ld a, BANK(s5_a89a) + call OpenSRAM + ld hl, s5_a89a + xor a + ld [hli], a + ld [hl], a + call CloseSRAM + ret + +Function170c06: ; unreferenced + ld a, BANK(s5_a894) + call OpenSRAM + ld hl, s5_a894 + ld a, [wBattleResult] + and a ; WIN? + jr nz, .asm_170c15 + inc [hl] + +.asm_170c15 + inc hl + inc hl + ld a, [s5_a89a + 1] + add [hl] + ld [hld], a + ld a, [s5_a89a] + adc [hl] + ld [hli], a + jr nc, .asm_170c27 + ld a, $ff + ld [hld], a + ld [hli], a + +.asm_170c27 + inc hl + push hl + ld de, 0 + xor a + ld [wTempByteValue], a +.asm_170c30 + ld hl, wPartyMon1HP + ld a, [wTempByteValue] + call GetPartyLocation + ld a, [hli] + ld b, a + ld c, [hl] + inc hl + inc hl + ld a, [hld] + sub c + ld c, a + ld a, [hl] + sbc b + ld b, a + push de + pop hl + add hl, bc + push hl + pop de + jr c, .asm_170c58 + ld a, [wTempByteValue] + inc a + ld [wTempByteValue], a + cp $3 + jr c, .asm_170c30 + jr .asm_170c5b + +.asm_170c58 + ld de, -1 + +.asm_170c5b + pop hl + inc hl + ld a, e + add [hl] + ld [hld], a + ld a, d + adc [hl] + ld [hli], a + jr nc, .asm_170c69 + ld a, $ff + ld [hld], a + ld [hli], a + +.asm_170c69 + inc hl + push hl + ld b, $0 + ld c, $0 +.asm_170c6f + ld hl, wPartyMon1HP + ld a, b + push bc + call GetPartyLocation + pop bc + ld a, [hli] + or [hl] + jr nz, .asm_170c7d + inc c + +.asm_170c7d + inc b + ld a, b + cp $3 + jr c, .asm_170c6f + pop hl + ld a, [hl] + add c + ld [hl], a + call CloseSRAM + ret + +Function170c8b: + ld hl, wLastEnemyCounterMove + ld b, $5 +.asm_170c90 + ld a, [hl] + xor $ff + ld [hli], a + dec b + jr nz, .asm_170c90 + ret + +CheckBTMonMovesForErrors: + ld c, BATTLETOWER_PARTY_LENGTH + ld hl, wBT_OTTempMon1Moves +.loop + push hl + ld a, [hl] + cp MOVE_TABLE_ENTRIES + 1 + jr c, .okay + push hl + ld hl, POUND + call GetMoveIDFromIndex + pop hl + ld [hl], a + +.okay + inc hl + ld b, NUM_MOVES - 1 +.loop2 + ld a, [hl] + and a + jr z, .loop3 + cp MOVE_TABLE_ENTRIES + 1 + jr c, .next + +.loop3 + xor a + ld [hl], a + inc hl + dec b + jr nz, .loop3 + jr .done + +.next + inc hl + dec b + jr nz, .loop2 + +.done + pop hl + ld de, NICKNAMED_MON_STRUCT_LENGTH + add hl, de + dec c + jr nz, .loop + ret + +Function170cc6: + ldh a, [rSVBK] + push af + ld a, BANK(wDecompressScratch) + ldh [rSVBK], a + ld hl, PichuAnimatedMobileGFX + ld de, wDecompressScratch + call Decompress + ld a, 1 + ldh [rVBK], a + ld de, wDecompressScratch + ld hl, vTiles0 + lb bc, BANK(wDecompressScratch), 193 + call Get2bpp + xor a + ldh [rVBK], a + ld hl, ElectroBallMobileGFX + ld de, wDecompressScratch + call Decompress + ld de, wBGPals1 + ld hl, vTiles0 + lb bc, BANK(wDecompressScratch), 83 + call Get2bpp + pop af + ldh [rSVBK], a + ret + +Function170d02: + ld a, $1 + ldh [rVBK], a + ld de, PichuBorderMobileGFX + ld hl, vTiles0 tile $c1 + lb bc, BANK(PichuBorderMobileGFX), 24 + call Get2bpp + xor a + ldh [rVBK], a + ret + +PichuAnimatedMobileGFX: +INCBIN "gfx/mobile/pichu_animated.2bpp.lz" + +ElectroBallMobileGFX: +INCBIN "gfx/mobile/electro_ball.2bpp.lz" + +PichuBorderMobileGFX: +INCBIN "gfx/mobile/pichu_border.2bpp" + +Function1719c8: + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + call Function1719d6 + pop af + ldh [hInMenu], a + ret + +Function1719d6: + farcall BattleTowerRoomMenu_InitRAM + call Function1719ed + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + call Function171a11 + pop af + ldh [rSVBK], a + ret + +Function1719ed: + xor a + ld [wcd49], a + ld [wcd4a], a + dec a + ld [wcd4b], a + call ClearBGPalettes + call ClearSprites + farcall Function171d2b + farcall ReloadMapPart + farcall ClearSpriteAnims + ret + +Function171a11: +.loop + call JoyTextDelay + ld a, [wcd49] + bit 7, a + jr nz, .done + call Function171a36 + farcall PlaySpriteAnimations + farcall ReloadMapPart + jr .loop +.done + farcall ClearSpriteAnims + call ClearSprites + ret + +Function171a36: + jumptable Jumptable_171a45, wcd49 + +Jumptable_171a45: + dw Function171a95 + dw Function171ac9 + dw Function171a5d + dw Function171ad7 + dw Function171a5d + dw Function171aec + dw Function171b4b + dw Function171b85 + dw Function171bcc + dw Function171c2c + dw Function171c39 + dw Function171c41 + +Function171a5d: + ld a, [wc821] + bit 1, a + jr nz, .asm_171a6a + bit 0, a + ret nz + jp Function171c66 + +.asm_171a6a + ld a, MOBILEAPI_00 + call MobileAPI + ld [wMobileErrorCodeBuffer], a + ld a, l + ld [wMobileErrorCodeBuffer + 1], a + ld a, h + ld [wMobileErrorCodeBuffer + 2], a + ld a, MOBILEAPI_05 + call MobileAPI + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + farcall BattleTowerRoomMenu_Cleanup + pop af + ldh [rSVBK], a + ld a, $a + ld [wcd49], a + ret + +Function171a95: + farcall Function171ccd + hlcoord 2, 8 + ld de, String_171aa7 + call PlaceString + jp Function171c66 + +String_171aa7: + db "モバイルアダプタに" + next "せつぞく しています" + next "しばらく おまちください" + db "@" + +Function171ac9: + ld de, wcd81 + ld hl, $5c + ld a, MOBILEAPI_01 + call MobileAPI + jp Function171c66 + +Function171ad7: + xor a + ld hl, wc608 + ld bc, $66 + call ByteFill + ld de, wc608 + ld a, MOBILEAPI_06 + call MobileAPI + jp Function171c66 + +Function171aec: + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + farcall BattleTowerRoomMenu_Cleanup + pop af + ldh [rSVBK], a + hlcoord 2, 6 + ld a, $8 +.asm_171b01 + push af + push hl + xor a + ld bc, $10 + call ByteFill + pop hl + ld de, $14 + add hl, de + pop af + dec a + jr nz, .asm_171b01 + hlcoord 2, 7 + ld a, $3 + ld de, wc608 +.asm_171b1b + push af + push hl + ld a, [de] + and a + jr z, .asm_171b34 + ld a, [wcd4b] + inc a + ld [wcd4b], a + push hl + call Function171b42 + pop hl + ld bc, $ffec + add hl, bc + call Function171b42 +.asm_171b34 + pop hl + ld bc, $14 + add hl, bc + add hl, bc + add hl, bc + pop af + dec a + jr nz, .asm_171b1b + jp Function171c66 + +Function171b42: + ld a, [de] + inc de + and a + ret z + sub $20 + ld [hli], a + jr Function171b42 + +Function171b4b: + depixel 8, 2 + ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, $8 + ld [hl], a + + depixel 8, 19 + ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, $9 + ld [hl], a + + depixel 17, 14, 2, 0 + ld a, SPRITE_ANIM_INDEX_EZCHAT_CURSOR + call InitSpriteAnimStruct + ld hl, SPRITEANIMSTRUCT_VAR1 + add hl, bc + ld a, $a + ld [hl], a + + ld a, $4 + ld [wcd23], a + ld a, $8 + ld [wcd24], a + jp Function171c66 + +Function171b85: + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jp nz, Function171b9f + ld a, [hl] + and A_BUTTON + jp nz, Function171bbd + ld a, [hl] + and D_UP + jr nz, asm_171ba5 + ld a, [hl] + and D_DOWN + jr nz, asm_171baf + ret + +Function171b9f: + ld a, $80 + ld [wcd49], a + ret + +asm_171ba5: + ld a, [wcd4a] + and a + ret z + dec a + ld [wcd4a], a + ret + +asm_171baf: + ld a, [wcd4b] + ld c, a + ld a, [wcd4a] + cp c + ret z + inc a + ld [wcd4a], a + ret + +Function171bbd: + call PlayClickSFX + ld a, $8 + ld [wcd23], a + xor a + ld [wcd24], a + jp Function171c66 + +Function171bcc: + ld hl, hJoyPressed + ld a, [hl] + and B_BUTTON + jp nz, Function171bdc + ld a, [hl] + and A_BUTTON + jp nz, Function171beb + ret + +Function171bdc: + ld a, $4 + ld [wcd23], a + ld a, $8 + ld [wcd24], a + ld hl, wcd49 + dec [hl] + ret + +Function171beb: + ld a, BANK(s5_aa4a) + call OpenSRAM + ld a, [wcd4a] + ld [s5_aa4a], a + call CloseSRAM + ld hl, MenuHeader_171c6b + call LoadMenuHeader + call MenuBox + call MenuBoxCoord2Tile + farcall ReloadMapPart + hlcoord 1, 14 + ld de, String_171c73 + call PlaceString + ld a, [wcd4a] + cp $2 + jr z, .asm_171c1f + ld a, $8 + jr .asm_171c21 +.asm_171c1f + ld a, $c +.asm_171c21 + ld [wcd24], a + ld a, $1e + ld [wcd4c], a + call Function171c66 + +Function171c2c: + ld hl, wcd4c + dec [hl] + ret nz + call ExitMenu + call ClearBGPalettes + jr asm_171c60 + +Function171c39: + ld a, $28 + ld [wcd4c], a + call Function171c66 + +Function171c41: + ld hl, wcd4c + dec [hl] + ret nz + call ClearBGPalettes + farcall Stubbed_Function106462 + farcall Function106464 + ld a, $2 + ld [wc303], a + farcall DisplayMobileError +asm_171c60: + ld a, $80 + ld [wcd49], a + ret + +Function171c66: + ld hl, wcd49 + inc [hl] + ret + +MenuHeader_171c6b: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 12, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1 + dw NULL + db 0 ; default option + +String_171c73: + db "モバイルセンターを けってい" + next "しました@" + +Function171c87: + call DisableLCD + ld hl, AsciiFontGFX + ld de, vTiles2 tile $00 + ld bc, $6e tiles + call CopyBytes + ld hl, PasswordSlowpokeLZ + ld de, vTiles0 tile $00 + call Decompress + call EnableLCD + ld hl, PasswordTopTilemap + decoord 0, 0 + ld bc, $168 + call CopyBytes + ld hl, MobilePasswordAttrmap + decoord 0, 0, wAttrmap + ld bc, $168 + call CopyBytes + hlcoord 3, 2 + ld de, String_172e31 + call PlaceString + hlcoord 3, 16 + ld de, String_172e3f + call PlaceString + ret + +Function171ccd: + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, MobilePasswordPalettes + ld de, wBGPals1 + ld bc, 8 palettes + call CopyBytes + ld hl, wOBPals1 palette 0 color 1 + ld a, LOW(PALRGB_WHITE) + ld [hli], a + ld a, HIGH(PALRGB_WHITE) + ld [hl], a + call SetPalettes + pop af + ldh [rSVBK], a + ret + +Function171cf0: + xor a + hlcoord 4, 15 + ld [hli], a + ld [hli], a + ld a, [wcd4b] + xor $1 + ld [wcd4b], a + and a + jr nz, .shifted + ld hl, PasswordBottomTilemap + decoord 0, 7 + ld bc, $8c + call CopyBytes + hlcoord 3, 16 + ld de, String_172e3f + jp PlaceString + +.shifted + ld hl, PasswordShiftTilemap + decoord 0, 7 + ld bc, $8c + call CopyBytes + hlcoord 3, 16 + ld de, String_172e4e + jp PlaceString + +Function171d2b: + call DisableLCD + ld hl, AsciiFontGFX + ld de, vTiles2 tile $00 + ld bc, $6e tiles + call CopyBytes + ld hl, PasswordSlowpokeLZ + ld de, vTiles0 tile $00 + call Decompress + call EnableLCD + ld hl, ChooseMobileCenterTilemap + decoord 0, 0 + ld bc, $168 + call CopyBytes + ld hl, ChooseMobileCenterAttrmap + decoord 0, 0, wAttrmap + ld bc, $168 + call CopyBytes + hlcoord 2, 2 + ld de, String_172e5d + call PlaceString + hlcoord 14, 16 + ld de, String_172e58 + call PlaceString + ret + +MobilePasswordPalettes: +INCLUDE "gfx/mobile/mobile_password.pal" + +AsciiFontGFX: +INCBIN "gfx/mobile/ascii_font.2bpp" + +PasswordTopTilemap: +INCBIN "gfx/mobile/password_top.tilemap" + +PasswordBottomTilemap: +INCBIN "gfx/mobile/password_bottom.tilemap" + +PasswordShiftTilemap: +INCBIN "gfx/mobile/password_shift.tilemap" + +ChooseMobileCenterTilemap: +INCBIN "gfx/mobile/mobile_center.tilemap" + +MobilePasswordAttrmap: +INCBIN "gfx/mobile/password.attrmap" + +ChooseMobileCenterAttrmap: +INCBIN "gfx/mobile/mobile_center.attrmap" + +PasswordSlowpokeLZ: +INCBIN "gfx/pokedex/slowpoke.2bpp.lz" + +String_172e31: + db "パスワードいれてください@" +String_172e3f: + db "きりかえ やめる  けってい@" +String_172e4e: + db "きりかえ やめる  " +String_172e58: + db "けってい@" +String_172e5d: + db "せつぞくする モバイルセンターを" + next "えらんで ください@" + +Function172e78: + ld a, $7f + hlcoord 0, 0 + ld bc, $168 + call ByteFill + ld a, $7 + hlcoord 0, 0, wAttrmap + ld bc, $168 + call ByteFill + call DisableLCD + ld hl, Stadium2N64GFX + ld de, vTiles2 tile $00 + ld bc, $61 tiles + call CopyBytes + call EnableLCD + ld hl, Stadium2N64Tilemap + decoord 0, 0 + ld bc, $168 + call CopyBytes + ld hl, Stadium2N64Attrmap + decoord 0, 0, wAttrmap + ld bc, $168 + call CopyBytes + ret + +Function172eb9: + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, Palette_172edf + ld de, wBGPals1 + ld bc, 8 palettes + call CopyBytes + ld hl, Palette_172edf + ld de, wBGPals2 + ld bc, 8 palettes + call CopyBytes + call SetPalettes + pop af + ldh [rSVBK], a + ret + +Palette_172edf: + RGB 5, 12, 17 + RGB 31, 31, 31 + RGB 18, 25, 28 + RGB 10, 17, 21 + RGB 6, 13, 18 + RGB 31, 31, 31 + RGB 20, 26, 28 + RGB 12, 19, 23 + RGB 3, 10, 16 + RGB 31, 31, 31 + RGB 6, 13, 18 + RGB 20, 26, 28 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 5, 5, 16 + RGB 8, 19, 28 + RGB 0, 0, 0 + RGB 31, 31, 31 + RGB 31, 31, 31 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + +Stadium2N64GFX: +INCBIN "gfx/mobile/stadium2_n64.2bpp" + +Stadium2N64Tilemap: +INCBIN "gfx/mobile/stadium2_n64.tilemap" + +Stadium2N64Attrmap: +INCBIN "gfx/mobile/stadium2_n64.attrmap" diff --git a/mobile/mobile_5e.asm b/mobile/mobile_5e.asm new file mode 100644 index 0000000..111fc96 --- /dev/null +++ b/mobile/mobile_5e.asm @@ -0,0 +1,941 @@ +MobileCardGFX:: +INCBIN "gfx/mobile/card.2bpp" + +ChrisSilhouetteGFX:: +INCBIN "gfx/mobile/chris_silhouette.2bpp" + +KrisSilhouetteGFX:: +INCBIN "gfx/mobile/kris_silhouette.2bpp" + +MobileCard2GFX:: +INCBIN "gfx/mobile/card_2.2bpp" + +CardLargeSpriteAndFolderGFX:: +INCBIN "gfx/mobile/card_large_sprite.2bpp" +INCBIN "gfx/mobile/card_folder.2bpp" + +CardSpriteGFX:: +INCBIN "gfx/mobile/card_sprite.2bpp" + +Function17a68f:: + call Function17a6a8 + call Function17a751 + ld hl, $d088 + bit 5, [hl] + jr z, .asm_17a6a6 + ld de, wStringBuffer1 + push de + call Function17a721 + pop de + xor a + ret + +.asm_17a6a6 + scf + ret + +Function17a6a8: + push de + push bc + ld hl, wStringBuffer2 + ld bc, $a + xor a + call ByteFill + ld hl, wd1ea + ld bc, $10 + ld a, $ff + call ByteFill + pop bc + ld a, c + and a + jr z, .asm_17a6c9 + ld hl, $d088 + set 4, [hl] +.asm_17a6c9 + pop de + call Function17a6f5 + call Function17aba0 + farcall Function106464 + call Function17ac0c + farcall HDMATransferAttrmapAndTilemapToWRAMBank3 + call Function17abcf + farcall LoadOW_BGPal7 + farcall Function49420 + call SetPalettes + call DelayFrame + ret + +Function17a6f5: + ld hl, wd1ea + ld c, $0 + ld b, $8 +.asm_17a6fc + ld a, [de] + call Function17a713 + jr c, .asm_17a70e + ld a, [de] + swap a + call Function17a713 + jr c, .asm_17a70e + inc de + dec b + jr nz, .asm_17a6fc +.asm_17a70e + ld a, c + ld [$d08c], a + ret + +Function17a713: + and $f + cp $a + jr nc, .asm_17a71d + ld [hli], a + inc c + and a + ret + +.asm_17a71d + ld [hl], $ff + scf + ret + +Function17a721: + push de + ld h, d + ld l, e + ld bc, $8 + ld a, $ff + call ByteFill + pop de + ld hl, wd1ea + ld b, $8 +.asm_17a732 + ld c, $0 + ld a, [hli] + cp $a + jr nc, .asm_17a748 + ld c, a + ld a, [hli] + cp $a + jr nc, .asm_17a74c + swap a + or c + ld [de], a + inc de + dec b + jr nz, .asm_17a732 + ret + +.asm_17a748 + ld a, $ff + ld [de], a + ret + +.asm_17a74c + ld a, $f0 + or c + ld [de], a + ret + +Function17a751: + xor a + ld [$d087], a +.asm_17a755 + call Function17a781 + call Function17a7ae + call Function17a97b + call Function17a770 + call Function17a78f + ld hl, $d08f + inc [hl] + ld a, [$d087] + bit 7, a + jr z, .asm_17a755 + ret + +Function17a770: + ldh a, [hOAMUpdate] + push af + ld a, $1 + ldh [hOAMUpdate], a + call HideSprites + call Function17a9cb + pop af + ldh [hOAMUpdate], a + ret + +Function17a781: + ldh a, [hInMenu] + push af + ld a, $1 + ldh [hInMenu], a + call JoyTextDelay + pop af + ldh [hInMenu], a + ret + +Function17a78f: + ld hl, $d088 + bit 7, [hl] + res 7, [hl] + jr nz, .asm_17a79f + farcall HDMATransferTilemapToWRAMBank3 + ret + +.asm_17a79f + farcall ReloadMapPart + ret + +Function17a7a6: ; unreferenced + ld a, [$d087] + inc a + ld [$d087], a + ret + +Function17a7ae: + ld a, [$d087] + ld hl, Jumptable_17a7b6 + rst JumpTable + ret + +Jumptable_17a7b6: + dw Function17a7c2 + dw Function17a7cd + dw Function17a7d8 + dw Function17a7ff + dw Function17a81a + dw Function17a7f4 + +Function17a7c2: + ld a, $4 + call Function17aad3 + ld a, $1 + ld [$d087], a + ret + +Function17a7cd: + call Function17a83c + call Function17a8ae + ret c + call Function17a848 + ret + +Function17a7d8: + call Function17a83c + call Function17a848 + ld hl, $d08b + dec [hl] + ret nz + call Function17ac1d + call Function17ac2a + ld hl, $d088 + set 7, [hl] + ld a, $1 + ld [$d087], a + ret + +Function17a7f4: + ld hl, $d08b + dec [hl] + ret nz + ld hl, $d087 + set 7, [hl] + ret + +Function17a7ff: + ld hl, $d08b + dec [hl] + ret nz + call Function17ac1d + call Function17ac2a + ld hl, $d088 + set 7, [hl] + ld hl, $d088 + set 5, [hl] + ld hl, $d087 + set 7, [hl] + ret + +Function17a81a: + call IsSFXPlaying + ret nc + ldh a, [hJoyPressed] + and $3 + ret z + call ExitMenu + call Function17ac1d + call Function17ac2a + ld hl, $d088 + set 7, [hl] + ld hl, $d088 + res 6, [hl] + ld a, $1 + ld [$d087], a + ret + +Function17a83c: + ldh a, [hJoyLast] + and $f0 + ld c, a + ldh a, [hJoyPressed] + and $b + or c + ld c, a + ret + +Function17a848: + ld a, c + and $60 + cp $60 + jr z, .asm_17a876 + ld a, c + and $50 + cp $50 + jr z, .asm_17a87d + ld a, c + and $a0 + cp $a0 + jr z, .asm_17a884 + ld a, c + and $90 + cp $90 + jr z, .asm_17a88b + bit 6, c + jr nz, .asm_17a892 + bit 7, c + jr nz, .asm_17a899 + bit 5, c + jr nz, .asm_17a8a0 + bit 4, c + jr nz, .asm_17a8a7 + xor a + ret + +.asm_17a876 + ld a, $9 + call Function17aad0 + scf + ret + +.asm_17a87d + ld a, $a + call Function17aad0 + scf + ret + +.asm_17a884 + ld a, $b + call Function17aad0 + scf + ret + +.asm_17a88b + ld a, $c + call Function17aad0 + scf + ret + +.asm_17a892 + ld a, $5 + call Function17aad0 + scf + ret + +.asm_17a899 + ld a, $6 + call Function17aad0 + scf + ret + +.asm_17a8a0 + ld a, $7 + call Function17aad0 + scf + ret + +.asm_17a8a7 + ld a, $8 + call Function17aad0 + scf + ret + +Function17a8ae: + bit 1, c + jr nz, .asm_17a8bc + bit 0, c + jr nz, .asm_17a8cc + bit 3, c + jr nz, .asm_17a8d7 + xor a + ret + +.asm_17a8bc + ld a, $b + ld [$d08a], a + call Function17aa98 + call Function17a943 + call Function17aa88 + scf + ret + +.asm_17a8cc + call Function17aad7 + call Function17aa98 + call Function17a8de + scf + ret + +.asm_17a8d7 + ld a, $c + call Function17aad3 + scf + ret + +Function17a8de: + ld a, $2 + call Function17aae0 + ld a, [hl] + cp $f1 + jr z, .asm_17a8fd + cp $f0 + jr z, .asm_17a904 + cp $f2 + jr z, .asm_17a911 + ld e, a + call Function17a964 + ld a, $2 + ld [$d087], a + call Function17aa88 + ret + +.asm_17a8fd + call Function17a943 + call Function17aa88 + ret + +.asm_17a904 + call Function17aad7 + call Function17aa98 + call Function17a91e + call Function17aa88 + ret + +.asm_17a911 + call Function17aa98 + ld a, $5 + ld [$d087], a + xor a + call Function17aa88 + ret + +Function17a91e: + ld a, [$d08c] + cp $7 + jr c, .asm_17a92c + ld a, $3 + ld [$d087], a + xor a + ret + +.asm_17a92c + call LoadStandardMenuHeader + call Function17a99e + ld hl, $d088 + set 7, [hl] + ld hl, $d088 + set 6, [hl] + ld a, $4 + ld [$d087], a + scf + ret + +Function17a943: + ld a, [$d08c] + and a + jr z, .asm_17a95d + dec a + ld [$d08c], a + ld c, a + ld b, 0 + ld hl, wd1ea + add hl, bc + ld [hl], $ff + ld a, $2 + ld [$d087], a + and a + ret + +.asm_17a95d + ld a, $5 + ld [$d087], a + xor a + ret + +Function17a964: + ld a, [$d08c] + cp $10 + jr nc, .asm_17a979 + ld c, a + ld b, 0 + inc a + ld [$d08c], a + ld hl, wd1ea + add hl, bc + ld [hl], e + and a + ret + +.asm_17a979 + scf + ret + +Function17a97b: + hlcoord 1, 1 + lb bc, 2, 18 + call ClearBox + hlcoord 3, 2 + ld de, wd1ea + ld a, [$d08c] + and a + ret z + ld c, a +.asm_17a990 + ld a, [de] + inc de + cp $a + jr nc, .asm_17a99d + add $f6 + ld [hli], a + dec c + jr nz, .asm_17a990 + ret + +.asm_17a99d + ret + +Function17a99e: + hlcoord 0, 12 + ld b, $4 + ld c, $12 + call Function17ac46 + hlcoord 2, 14 + ld de, String_17a9b2 + call PlaceString + ret + +String_17a9b2: + db "でんわばんごうが ただしく" + next "はいって いません!" + db "@" + +Function17a9cb: + ld de, wShadowOAM + ld hl, $d088 + bit 6, [hl] + jr nz, .bit_6_set + call Function17a9e3 + call Function17aa22 + call Function17a9f5 + ret + +.bit_6_set + call Function17a9e3 + ret + +Function17a9e3: + ld a, $3 + ld [$d08e], a + ld hl, Unknown_17aa77 + ld b, $8 + ld c, $8 + ld a, $5 + call Function17aa4a + ret + +Function17a9f5: + ld a, [$d08c] + cp $10 + ret nc + ld a, [$d08f] + swap a + and $1 + add $1 + ld [$d08e], a + ld a, [$d08c] + cp $10 + jr c, .okay + dec a +.okay + ld c, $8 + call SimpleMultiply + add $18 + ld b, a + ld c, $11 + ld hl, Unknown_17aa72 + ld a, $4 + call Function17aa4a + ret + +Function17aa22: + ld a, $0 + ld [$d08e], a + push de + ld a, $3 + call Function17aae0 + add a + add a + add a + add $0 + push af + ld a, $4 + call Function17aae0 + add a + add a + add a + add $8 + ld c, a + pop af + ld b, a + pop de + ld a, $0 + ld hl, Unknown_17aa77 + call Function17aa4a + ret + +Function17aa4a: + ld [$d08d], a + ld a, b + add $8 + ld b, a + ld a, c + add $10 + ld c, a + ld a, [hli] +.loop + push af + ld a, [hli] + add c + ld [de], a + inc de + ld a, [hli] + add b + ld [de], a + inc de + ld a, [$d08d] + add [hl] + inc hl + ld [de], a + inc de + ld a, [$d08e] + or [hl] + inc hl + ld [de], a + inc de + pop af + dec a + jr nz, .loop + ret + +Unknown_17aa72: + db 1 + db 0, 0, 0, 0 + +Unknown_17aa77: + db 4 + db 0, 0, 0, 0 + db 0, 8, 1, 0 + db 8, 0, 2, 0 + db 8, 8, 3, 0 + +Function17aa88: + jr c, asm_17aa91 + ld de, SFX_SWITCH_POKEMON + call PlaySFX + ret + +asm_17aa91: + ld de, SFX_WRONG + call PlaySFX + ret + +Function17aa98: + ld a, $5 + ld [$d08b], a + call Function17aaa9 + call Function17aac3 + ld hl, $d088 + set 7, [hl] + ret + +Function17aaa9: + ld a, $3 + call Function17aae3 + ld c, a + ld b, 0 + hlcoord 0, 0, wAttrmap + add hl, bc + push hl + ld a, $4 + call Function17aae3 + ld bc, $14 + pop hl + call AddNTimes + ret + +Function17aac3: + ld a, $b + push hl + ld [hli], a + ld [hli], a + pop hl + ld de, SCREEN_WIDTH + add hl, de + ld [hli], a + ld [hli], a + ret + +Function17aad0: + call Function17aae0 + +Function17aad3: + ld [$d089], a + ret + +Function17aad7: + push af + ld a, [$d089] + ld [$d08a], a + pop af + ret + +Function17aae0: + call Function17aad7 + +Function17aae3: + push af + ld a, [$d08a] + ld bc, $d + ld hl, Unknown_17aaf7 + call AddNTimes + pop af + ld c, a + ld b, 0 + add hl, bc + ld a, [hl] + ret + +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 + db $0, $0, $4, $6, $8, $0, $6, $5, $4, $5, $1, $5, $7 + db $0, $0, $5, $9, $8, $1, $7, $3, $5, $0, $2, $6, $8 + db $0, $0, $6, $c, $8, $2, $8, $4, $3, $1, $3, $7, $3 + db $0, $0, $7, $6, $b, $3, $9, $8, $7, $8, $4, $8, $a + db $0, $0, $8, $9, $b, $4, $a, $6, $8, $3, $5, $9, $b + db $0, $0, $9, $c, $b, $5, $b, $7, $6, $4, $6, $a, $6 + db $0, $0,$f2, $6, $e, $6, $0, $c, $a, $c, $7, $c, $0 + 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 + +Function17aba0: + ldh a, [rVBK] + push af + ld a, $1 + ldh [rVBK], a + + ld hl, vTiles5 tile $00 + ld de, DialpadGFX + lb bc, BANK(DialpadGFX), $80 ; includes first 4 tiles of DialpadCursorGFX + call Get2bpp + + pop af + ldh [rVBK], a + + ld hl, vTiles0 tile $00 + ld de, DialpadCursorGFX + lb bc, BANK(DialpadCursorGFX), 5 + call Get2bpp + + ld hl, vTiles0 tile $05 + ld de, MobileDialingGFX + lb bc, BANK(MobileDialingGFX), 4 + call Get2bpp + ret + +Function17abcf: + ldh a, [rSVBK] + push af + ld a, BANK(wBGPals1) + ldh [rSVBK], a + + ld hl, Palette_17ac55 + ld de, wBGPals1 + ld bc, 6 palettes + call CopyBytes + + ld hl, Palette_17ac95 + ld de, wOBPals1 + ld bc, 8 palettes + call CopyBytes + + ld hl, Palette_17b4b5 + ld de, wOBPals1 palette 1 + ld bc, 2 palettes + call CopyBytes + + ld hl, MapObjectPals palette 1 + ld de, wOBPals1 palette 3 + ld bc, 1 palettes + ld a, BANK(MapObjectPals) + call FarCopyBytes + + pop af + ldh [rSVBK], a + ret + +Function17ac0c: + call Function17ac1d + call Function17ac2a + hlcoord 0, 0 + ld b, 2 + ld c, SCREEN_WIDTH - 2 + call Function17ac46 + ret + +Function17ac1d: + ld hl, DialpadTilemap + decoord 0, 4 + ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH + call CopyBytes + ret + +Function17ac2a: + ld hl, DialpadAttrmap + decoord 0, 4, wAttrmap + ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH + call CopyBytes + hlcoord 0, 4, wAttrmap + ld bc, (SCREEN_HEIGHT - 4) * SCREEN_WIDTH +.loop + ld a, [hl] + or $8 + ld [hli], a + dec bc + ld a, b + or c + jr nz, .loop + ret + +Function17ac46: + ld a, [$d088] + bit 4, a + jr nz, .bit_4_set + call Textbox + ret + +.bit_4_set + call Function3eea + ret + +Palette_17ac55: + RGB 0, 0, 0 + RGB 9, 10, 25 + RGB 16, 19, 31 + RGB 31, 31, 31 + + RGB 5, 11, 9 + RGB 7, 14, 12 + RGB 17, 24, 22 + RGB 28, 31, 31 + + RGB 0, 0, 0 + RGB 3, 0, 10 + RGB 3, 3, 16 + RGB 6, 8, 25 + + RGB 5, 11, 9 + RGB 28, 31, 31 + RGB 7, 14, 12 + RGB 17, 24, 22 + + RGB 0, 0, 0 + RGB 5, 2, 16 + RGB 8, 8, 26 + RGB 13, 9, 17 + + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + +Palette_17ac95: + RGB 31, 31, 31 + RGB 4, 3, 3 + RGB 31, 13, 0 + RGB 31, 31, 31 + + RGB 31, 31, 31 + RGB 0, 0, 0 + RGB 31, 31, 31 + RGB 31, 31, 31 + + RGB 31, 0, 0 + RGB 16, 3, 0 + RGB 28, 19, 11 + RGB 31, 31, 31 + + RGB 31, 16, 0 + RGB 9, 6, 4 + RGB 31, 16, 0 + RGB 31, 24, 0 + + RGB 31, 18, 6 + RGB 0, 3, 0 + RGB 0, 9, 0 + RGB 0, 12, 0 + + RGB 0, 16, 0 + RGB 0, 22, 0 + RGB 0, 25, 0 + RGB 0, 27, 0 + + RGB 0, 31, 0 + RGB 3, 31, 0 + RGB 8, 31, 0 + RGB 14, 31, 0 + + RGB 16, 31, 0 + RGB 22, 31, 0 + RGB 27, 31, 0 + RGB 31, 31, 0 + +DialpadTilemap: +INCBIN "gfx/mobile/dialpad.tilemap" + +DialpadAttrmap: +INCBIN "gfx/mobile/dialpad.attrmap" + +DialpadGFX: +INCBIN "gfx/mobile/dialpad.2bpp" + +DialpadCursorGFX: +INCBIN "gfx/mobile/dialpad_cursor.2bpp" + +Palette_17b4b5: + RGB 2, 6, 10 + RGB 24, 30, 29 + +MobileCardListGFX:: +INCBIN "gfx/mobile/card_list.2bpp" diff --git a/mobile/mobile_5f.asm b/mobile/mobile_5f.asm new file mode 100644 index 0000000..29f8acf --- /dev/null +++ b/mobile/mobile_5f.asm @@ -0,0 +1,5183 @@ +Function17c000: + call DisableLCD + + ld hl, vTiles2 + ld bc, $31 tiles + xor a + call ByteFill + + call LoadStandardFont + call LoadFontsExtra + + ld hl, HaveWantMap + decoord 0, 0 + bccoord 0, 0, wAttrmap + + ld a, SCREEN_HEIGHT +.y + push af + ld a, SCREEN_WIDTH + + push hl +.x + push af + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [bc], a + inc bc + pop af + dec a + jr nz, .x + pop hl + + push bc + ld bc, BG_MAP_WIDTH * 2 + add hl, bc + pop bc + + pop af + dec a + jr nz, .y + + ldh a, [rSVBK] + push af + + ld a, BANK(wBGPals1) + ldh [rSVBK], a + + ld hl, HaveWantPals + ld de, wBGPals1 + ld bc, 16 palettes + call CopyBytes + + pop af + ldh [rSVBK], a + + ld hl, MobileSelectGFX + ld de, vTiles0 tile $30 + ld bc, $20 tiles + call CopyBytes + + ld a, 1 + ldh [rVBK], a + + ld hl, HaveWantGFX + ld de, vTiles2 + ld bc, $80 tiles + call CopyBytes + + ld hl, HaveWantGFX + $80 tiles + ld de, vTiles1 + ld bc, $10 tiles + call CopyBytes + + xor a + ldh [rVBK], a + + call EnableLCD + farcall ReloadMapPart + ret + +HaveWantGFX: +INCBIN "gfx/mobile/havewant.2bpp" + +MobileSelectGFX: +INCBIN "gfx/mobile/select.2bpp" + +HaveWantMap: +; Interleaved tile/palette map. +INCBIN "gfx/mobile/havewant_map.bin" + +HaveWantPals: +; BG and OBJ palettes. + RGB 0, 0, 0 + RGB 21, 21, 21 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 4, 17, 29 + RGB 6, 19, 31 + RGB 31, 31, 31 + + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 2, 13, 18 + RGB 6, 19, 31 + RGB 31, 31, 31 + + RGB 0, 0, 0 + RGB 31, 5, 5 + RGB 29, 21, 21 + RGB 31, 31, 31 + + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 4, 17, 29 + RGB 6, 19, 31 + RGB 2, 15, 27 + + RGB 0, 0, 0 + RGB 28, 19, 18 + RGB 25, 9, 0 + RGB 0, 0, 0 + + RGB 0, 0, 0 + RGB 31, 27, 27 + RGB 31, 10, 4 + RGB 29, 0, 0 + + RGB 0, 0, 0 + RGB 31, 31, 31 + RGB 26, 8, 23 + RGB 22, 0, 16 + + RGB 0, 0, 0 + RGB 31, 31, 31 + RGB 20, 8, 31 + RGB 15, 1, 26 + + RGB 0, 0, 0 + RGB 31, 31, 31 + RGB 17, 12, 31 + RGB 12, 6, 31 + + RGB 0, 16, 0 + RGB 11, 11, 14 + RGB 5, 5, 7 + RGB 31, 31, 31 + + RGB 0, 31, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + + RGB 16, 31, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + RGB 0, 0, 0 + +CheckStringForErrors: +; Valid character ranges: +; $0, $5 - $13, $19 - $1c, $26 - $34, $3a - $3e, $40 - $48, $60 - $ff +.loop + ld a, [de] + inc de + and a ; "" + jr z, .NextChar + cp FIRST_REGULAR_TEXT_CHAR + jr nc, .NextChar + cp "" + jr z, .NextChar + cp "@" + jr z, .Done + cp "ガ" + jr c, .Fail + cp "" + jr c, .NextChar + cp "" + 1 + jr c, .Fail + cp "" + jr c, .NextChar + cp "" + 1 + jr c, .Fail + cp "" + jr c, .NextChar + cp "" + 1 + jr c, .Fail + cp "" + jr c, .NextChar + cp "" + 1 + jr c, .Fail + cp "" + jr c, .NextChar + +.Fail: + scf + ret + +.NextChar: + dec c + jr nz, .loop + +.Done: + and a + ret + +CheckStringForErrors_IgnoreTerminator: +; Find control chars +.loop + ld a, [de] + inc de + and a + jr z, .next + cp "" + 1 + jr nc, .next + cp "" + jr z, .next + cp "@" + jr z, .next + + cp "ガ" + jr c, .end + cp "" + jr c, .next + cp "" + 1 + jr c, .end + cp "" + jr c, .next + cp "" + 1 + jr c, .end + cp "" + jr c, .next + cp "" + 1 + jr c, .end + cp "" + jr c, .next + cp "" + 1 + jr c, .end + cp "" + jr c, .next + +.end + scf + ret + +.next + dec c + jr nz, .loop + and a + ret + +Function17d0f3: + ld a, [wMobileMonSpecies] + ld [wOTTrademonSpecies], a + ld [wCurPartySpecies], a + ld a, [wcd81] + ld [wc74e], a + ld hl, wMobileMonOT + ld de, wOTTrademonOTName + ld bc, NAME_LENGTH_JAPANESE - 1 + call CopyBytes + ld a, "@" + ld [de], a + ld a, [wMobileMonID] + ld [wOTTrademonID], a + ld a, [wMobileMonID + 1] + ld [wOTTrademonID + 1], a + ld hl, wMobileMonDVs + ld a, [hli] + ld [wOTTrademonDVs], a + ld a, [hl] + ld [wOTTrademonDVs + 1], a + ld bc, wMobileMonSpecies + farcall GetCaughtGender + ld a, c + ld [wOTTrademonCaughtData], a + call SpeechTextbox + call FadeToMenu + farcall Function10804d + farcall Function17d1f1 + ld a, $1 + ld [wForceEvolution], a + ld a, LINK_TRADECENTER + ld [wLinkMode], a + farcall EvolvePokemon + xor a + ld [wLinkMode], a + farcall SaveAfterLinkTrade + ld a, BANK(s5_a800) + call OpenSRAM + ld a, BANK(s5_a800) + ld [s5_a800], a + call CloseSRAM + ld a, [wMapGroup] + ld b, a + ld a, [wMapNumber] + ld c, a + call GetMapSceneID + ld a, d + or e + jr z, .asm_17d180 + ld a, $1 + ld [de], a + +.asm_17d180 + call CloseSubmenu + call RestartMapMusic + ret + +Mobile_CopyDefaultOTName: + ld hl, Mobile5F_PlayersName + ld de, wMobileMonOT + ld bc, NAME_LENGTH_JAPANESE - 1 + call CopyBytes + ret + +Mobile5F_PlayersName: + db "クりス@@" + +Mobile_CopyDefaultNickname: + ld hl, .DefaultNickname + ld de, wMobileMonNick + ld bc, NAME_LENGTH_JAPANESE - 1 + call CopyBytes + ret + +.DefaultNickname: + db "?????" + +Mobile_CopyDefaultMail: + ld a, "@" + ld hl, wMobileMonMail + ld bc, MAIL_MSG_LENGTH + 1 + call ByteFill + ld hl, .DefaultMessage + ld de, wMobileMonMail + ld bc, .DefaultMessageEnd - .DefaultMessage + call CopyBytes + ret + +.DefaultMessage: + db "こんにちは@" +.DefaultMessageEnd: + +Mobile_CopyDefaultMailAuthor: + ld a, "@" + ld de, wMobileMonMailAuthor + ld bc, NAME_LENGTH_JAPANESE - 1 + call ByteFill + ld hl, Mobile5F_PlayersName + ld de, wMobileMonMailAuthor + ld bc, NAME_LENGTH_JAPANESE - 1 + call CopyBytes + ret + +CheckStringContainsLessThanBNextCharacters: +.loop + ld a, [de] + inc de + cp "" + jr nz, .next_char + dec b + jr z, .done + +.next_char + dec c + jr nz, .loop + and a + ret + +.done + scf + ret + +Function17d1f1: + ld a, [wCurPartySpecies] + call SetSeenAndCaughtMon + + ld a, [wCurPartySpecies] + call GetPokemonIndexFromID + sub LOW(UNOWN) + if HIGH(UNOWN) == 0 + or h + else + ret nz + if HIGH(UNOWN) == 1 + dec h + else + ld a, h + cp HIGH(UNOWN) + endc + endc + ret nz + + ld hl, wPartyMon1DVs + ld a, [wPartyCount] + dec a + ld bc, PARTYMON_STRUCT_LENGTH + call AddNTimes + predef GetUnownLetter + callfar UpdateUnownDex + ld a, [wFirstUnownSeen] + and a + ret nz + + ld a, [wUnownLetter] + ld [wFirstUnownSeen], a + ret + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Parameter: [wScriptVar] = 0..1 +; +; if [wScriptVar] == FALSE +; Show japanese menu options +; - News - News - ??? - Cancel +; if [wScriptVar] == TRUE +; Show BattleTower-Menu with 3 options in english language +; - Challenge - Explanation - Cancel +Menu_ChallengeExplanationCancel: + ld a, [wScriptVar] + and a + jr nz, .English + ld a, $4 + ld [wScriptVar], a + ld hl, MenuHeader_17d26a ; Japanese Menu, where you can choose 'News' as an option + jr .Load_Interpret + +.English: + ld a, $4 + ld [wScriptVar], a + ld hl, MenuHeader_ChallengeExplanationCancel ; English Menu + +.Load_Interpret: + call LoadMenuHeader + call Function17d246 + call CloseWindow + ret + +Function17d246: + call VerticalMenu + jr c, .Exit + ld a, [wScriptVar] + cp $5 + jr nz, .UsewMenuCursorY + ld a, [wMenuCursorY] + cp $3 + ret z + jr c, .UsewMenuCursorY + dec a + jr .LoadToScriptVar + +.UsewMenuCursorY: + ld a, [wMenuCursorY] + +.LoadToScriptVar: + ld [wScriptVar], a + ret + +.Exit: + ld a, $4 + ld [wScriptVar], a + ret + +MenuHeader_17d26a: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 14, 9 + dw MenuData_17d272 + db 1 ; default option + +MenuData_17d272: + db STATICMENU_CURSOR | STATICMENU_WRAP ; flags + db 4 + db "ニュース¯よみこむ@" + db "ニュース¯みる@" + db "せつめい@" + db "やめる@" + +MenuHeader_ChallengeExplanationCancel: + db MENU_BACKUP_TILES ; flags + menu_coords 0, 0, 14, 7 + dw MenuData_ChallengeExplanationCancel + db 1 ; default option + +MenuData_ChallengeExplanationCancel: + db STATICMENU_CURSOR | STATICMENU_WRAP ; flags + db 3 + db "Challenge@" + db "Explanation@" + db "Cancel@" + +Function17d2b6: + call Function17d2c0 + farcall Function1181da + ret + +Function17d2c0: + xor a + ld [wJumptableIndex], a + ld [wcf64], a + ld [wcf65], a + ld [wcf66], a + ret + +Function17d2ce: + ld a, BANK(s5_aa72) + call OpenSRAM + ld a, [s5_aa72] + call CloseSRAM + and a + jr nz, .asm_17d2e2 + ld a, $1 + ld [wScriptVar], a + ret + +.asm_17d2e2 + call Function17d314 + ret c + call SpeechTextbox + call FadeToMenu + ldh a, [rSVBK] + push af + ld a, $4 + ldh [rSVBK], a + call Function17d370 + call Function17d45a + pop af + ldh [rSVBK], a + ld de, MUSIC_MOBILE_CENTER + ld a, e + ld [wMapMusic], a + ld [wMusicFadeID], a + ld a, d + ld [wMusicFadeID + 1], a + call PlayMusic + call ReturnToMapFromSubmenu + call CloseSubmenu + ret + +Function17d314: + ld a, BANK(s5_b1b1) + call OpenSRAM + ld a, [s5_b1b1] + call CloseSRAM + cp $21 + jr nc, .asm_17d354 + ld a, BANK(s6_a006) + call OpenSRAM + ld l, 0 + ld h, l + ld de, s6_a006 + ld a, [s6_a004] + ld c, a + ld a, [s6_a005] + ld b, a +.asm_17d336 + push bc + ld a, [de] + inc de + ld c, a + ld b, 0 + add hl, bc + pop bc + dec bc + ld a, b + or c + jr nz, .asm_17d336 + ld a, [s6_a002] + cp l + jr nz, .asm_17d354 + ld a, [s6_a003] + cp h + jr nz, .asm_17d354 + call CloseSRAM + and a + ret + +.asm_17d354 + call CloseSRAM + ld a, $5 + call OpenSRAM + xor a + ld hl, $aa73 + ld bc, $c + call ByteFill + call CloseSRAM + ld a, $2 + ld [wScriptVar], a + scf + ret + +Function17d370: + xor a + ld [wcd77], a + ld [wMobileCrashCheckPointer], a + ld [wMobileCrashCheckPointer + 1], a + dec a + ld [wcd6c], a + call ClearBGPalettes + call ClearSprites + call ClearScreen + farcall ReloadMapPart + call DisableLCD + ld hl, vTiles0 tile $ee + ld de, wc608 + ld bc, 1 tiles + call CopyBytes + ld a, $1 + ldh [rVBK], a + ld hl, PokemonNewsGFX + ld de, vTiles1 + ld bc, $48 tiles + call CopyBytes + xor a + ld hl, vTiles2 tile $7f + ld bc, 1 tiles + call ByteFill + ld hl, wc608 + ld de, vTiles0 tile $ee + ld bc, 1 tiles + call CopyBytes + xor a + ldh [rVBK], a + ld hl, PostalMarkGFX + ld de, vTiles2 tile $60 + ld bc, 1 tiles + call CopyBytes + call EnableLCD + call Function17d60b + ld a, $0 + ld [wBGMapBuffer], a + ld a, $d0 + ld [wcd21], a + ld a, BANK(s6_a006) + call OpenSRAM + ld hl, s6_a006 + ld de, w4_d000 + ld bc, $1000 + call CopyBytes + call CloseSRAM + ret + +Function17d3f6: + call ClearBGPalettes + call ClearSprites + call ClearScreen + farcall ReloadMapPart + +Function17d405: + call DisableLCD + ld hl, vTiles0 tile $ee + ld de, wc608 + ld bc, 1 tiles + call CopyBytes + ld a, $1 + ldh [rVBK], a + ld hl, PokemonNewsGFX + ld de, vTiles1 + ld bc, $48 tiles + call CopyBytes + xor a + ld hl, vTiles2 tile $7f + ld bc, 1 tiles + call ByteFill + ld hl, wc608 + ld de, vTiles0 tile $ee + ld bc, 1 tiles + call CopyBytes + xor a + ldh [rVBK], a + call EnableLCD + ldh a, [rSVBK] + push af + ld a, $5 + ldh [rSVBK], a + ld hl, PokemonNewsPalettes + ld de, wBGPals1 + ld bc, 8 palettes + call CopyBytes + call SetPalettes + pop af + ldh [rSVBK], a + ret + +Function17d45a: +.asm_17d45a + call JoyTextDelay + ld a, [wcd77] + bit 7, a + jr nz, .asm_17d46f + call Function17d474 + farcall ReloadMapPart + jr .asm_17d45a + +.asm_17d46f + xor a + ld [wScriptVar], a + ret + +Function17d474: + jumptable Jumptable_17d483, wcd77 + +Jumptable_17d483: + dw Function17d48d + dw Function17d5be + dw Function17d5c4 + dw Function17d6fd + dw Function17e427 + +Function17d48d: + ld hl, PokemonNewsPalettes + ld de, wc608 + ld bc, $40 + call CopyBytes + ld hl, PokemonNewsTileAttrmap + decoord 0, 0 + bccoord 0, 0, wAttrmap + ld a, $12 +.asm_17d4a4 + push af + ld a, $14 + push hl +.asm_17d4a8 + push af + ld a, [hli] + cp $7f + jr z, .asm_17d4b0 + add $80 + +.asm_17d4b0 + ld [de], a + inc de + ld a, [hli] + ld [bc], a + inc bc + pop af + dec a + jr nz, .asm_17d4a8 + pop hl + push bc + ld bc, $40 + add hl, bc + pop bc + pop af + dec a + jr nz, .asm_17d4a4 + ld a, [wBGMapBuffer] + ld l, a + ld a, [wcd21] + ld h, a + ld a, [hli] + ld e, a + ld a, [wcd6c] + cp e + jr z, .asm_17d4e0 + ld a, e + ld [wcd6c], a + ld [wMapMusic], a + ld d, $0 + call PlayMusic2 + +.asm_17d4e0 + ld a, [hli] + ld de, wc608 + ld c, $8 +.asm_17d4e6 + srl a + jr nc, .asm_17d4f6 + ld b, $8 + push af +.asm_17d4ed + ld a, [hli] + ld [de], a + inc de + dec b + jr nz, .asm_17d4ed + pop af + jr .asm_17d4fc + +.asm_17d4f6 + push af + ld a, e + add $8 + ld e, a + pop af + +.asm_17d4fc + dec c + jr nz, .asm_17d4e6 + push hl + call Function17d5f6 + pop hl + ld a, [hli] + and a + jr z, .asm_17d539 +.asm_17d508 + push af + ld a, [hli] + ld [wcd4f], a + ld a, [hli] + ld [wcd50], a + ld a, [hli] + ld [wcd51], a + ld a, [hli] + ld [wcd52], a + ld a, [hli] + sla a + sla a + sla a + add $98 + ld [wcd53], a + ld de, wcd4f + call Function17e613 + ld a, [hli] + ld [wcd53], a + ld de, wcd4f + call Function17e691 + pop af + dec a + jr nz, .asm_17d508 + +.asm_17d539 + ld a, [hli] +.asm_17d53a + push af + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + push hl + pop de + hlcoord 0, 0 + add hl, bc + call PlaceString + push de + pop hl + inc hl + pop af + dec a + jr nz, .asm_17d53a + ld de, wCreditsTimer + ld bc, $c + call CopyBytes + xor a + ld [wcd2e], a + ld [wcd2f], a + inc a + ld [wcd30], a + ld [wcd31], a + ld de, wcd32 + ld bc, $10 + call CopyBytes + ld a, [hli] + ld [wcd42], a + ld a, [hli] + ld [wcd43], a + ld a, [hli] + ld [wMobileInactivityTimerMinutes], a + ld a, [hli] + ld [wMobileInactivityTimerSeconds], a + ld a, [hli] + ld [wMobileInactivityTimerFrames], a + ld a, [hli] + and a + jr z, .asm_17d58a + call Function17d6a1 + +.asm_17d58a + ld a, l + ld [wcd49], a + ld a, h + ld [wcd4a], a + ld a, [wcd42] + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, l + ld [wcd4b], a + ld a, h + ld [wcd4c], a + add hl, bc + add hl, bc + ld a, l + ld [wcd4d], a + ld a, h + ld [wcd4e], a + call Function17e451 + call Function17e55b + call Function17e5af + farcall ReloadMapPart + jp Function17e438 + +Function17d5be: + call SetPalettes + call Function17e438 + +Function17d5c4: + ldh a, [hJoyPressed] + and a + ret z + ld c, 0 + ld b, c + ld hl, wcd32 +.loop + srl a + jr c, .got_button + inc c + inc c + jr .loop + +.got_button + add hl, bc + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + and c + cp $ff + ret z + ld a, [wcd20] + ld l, a + ld a, [wcd21] + ld h, a + add hl, bc + ld a, l + ld [wMobileCrashCheckPointer], a + ld a, h + ld [wMobileCrashCheckPointer + 1], a + ld a, $3 + ld [wcd77], a + ret + +Function17d5f6: + ld a, $5 + ldh [rSVBK], a + ld hl, wc608 + ld de, wBGPals1 + ld bc, 8 palettes + call CopyBytes + ld a, $4 + ldh [rSVBK], a + ret + +Function17d60b: + ld a, $5 + call OpenSRAM + ld hl, $b1d3 + ld de, wc608 + ld bc, $20 + call CopyBytes + ld a, [$b1b1] + ld c, a + ld a, [$b1b2] + ld b, a + ld a, [$b1b3] + ld l, a + ld a, [$b1b4] + ld h, a + call CloseSRAM + ld a, $6 + call OpenSRAM + ld de, wc708 + ld a, c + and a + jr z, .asm_17d684 +.asm_17d63b + push bc + ld a, l + ld [de], a + inc de + ld a, h + ld [de], a + inc de + ld bc, $a + add hl, bc + pop bc + ld a, [hli] + ld [wcd4a], a + ld a, [hli] + ld [wcd49], a + push hl + push de + ld hl, wc608 + ld e, b + ld d, $0 + add hl, de + ld a, [hli] + ld [wcd4b], a + ld a, [hl] + ld [wcd4c], a + pop de + pop hl + inc b + inc b + dec c + dec c + jr z, .asm_17d684 + push bc + push de + ld a, [wcd49] + ld c, a + ld a, [wcd4a] + ld b, a + ld a, [wcd4b] + ld e, a + ld a, [wcd4c] + ld d, a +.asm_17d67a + add hl, de + dec bc + ld a, c + or b + jr nz, .asm_17d67a + pop de + pop bc + jr .asm_17d63b + +.asm_17d684 + call CloseSRAM + ld a, $5 + call OpenSRAM + ld hl, wc708 + ld de, $b1b3 + ld a, [$b1b1] + ld c, a + ld a, [$b1b2] + ld b, a + call CopyBytes + call CloseSRAM + ret + +Function17d6a1: + push hl + ld a, [wcd6e] + ld c, a + ld b, 0 + ld a, $5 + call OpenSRAM + ld hl, $b1d3 + add hl, bc + add hl, bc + ld a, [hli] + ld [wcd47], a + ld a, [hl] + ld [wBGMapPalBuffer], a + ld hl, $b1b3 + add hl, bc + add hl, bc + ld a, [hli] + ld c, a + ld a, [hl] + ld h, a + ld l, c + call CloseSRAM + ld a, $6 + call OpenSRAM + ld a, l + ld [wcd5e], a + ld a, h + ld [wcd5f], a + ld de, wcd60 + ld bc, $4 + call CopyBytes + inc hl + inc hl + ld de, wcd64 + ld bc, $4 + call CopyBytes + ld a, [hli] + ld [wcd69], a + ld a, [hli] + ld [wcd68], a + ld a, l + ld [wcd6a], a + ld a, h + ld [wcd6b], a + call CloseSRAM + pop hl + ret + +Function17d6fd: + ld a, [wcd77] + bit 7, a + jr nz, asm_17d721 + ld a, [wMobileCrashCheckPointer] + ld l, a + ld a, [wMobileCrashCheckPointer + 1] + ld h, a + ld a, [hl] + cp $ff + jr z, asm_17d721 + +Function17d711: +.crash_loop + cp $31 + jr nc, .crash_loop + ld e, a + ld d, 0 + ld hl, Jumptable17d72a + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +asm_17d721: + call Function17e5af + ld a, $2 + ld [wcd77], a + ret + +Jumptable17d72a: + dw Function17d78c + dw Function17d78d + dw Function17d7b4 + dw Function17d7c2 + dw Function17d7d3 + dw Function17d7e5 + dw Function17d818 + dw Function17d833 + dw Function17d85d + dw Function17d902 + dw Function17d93a + dw Function17d98b + dw Function17d9e3 + dw Function17da31 + dw Function17da9c + dw Function17dadc + dw Function17db2d + dw Function17db56 + dw Function17db77 + dw Function17dbe9 + dw Function17dc1f + dw Function17dc9f + dw Function17dca9 + dw Function17dccf + dw Function17dd13 + dw Function17dd30 + dw Function17dd49 + dw Function17ddcd + dw Function17de32 + dw Function17de91 + dw Function17ded9 + dw Function17e0fd + dw Function17e133 + dw Function17e165 + dw Function17e1a1 + dw Function17e254 + dw Function17e261 + dw Function17e270 + dw Function17e27f + dw Function17e293 + dw Function17e2a7 + dw IncCrashCheckPointer_SaveGameData + dw IncCrashCheckPointer_SaveAfterLinkTrade + dw IncCrashCheckPointer_SaveBox + dw IncCrashCheckPointer_SaveChecksum + dw IncCrashCheckPointer_SaveTrainerRankingsChecksum + dw Function17e3e0 + dw Function17e3f0 + dw Function17e409 + +Function17d78c: + ret + +Function17d78d: + call IncCrashCheckPointer + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + call HlToCrashCheckPointer + ld a, BANK(s6_a006) + call OpenSRAM + ld hl, s6_a006 + add hl, bc + ld de, w4_d000 + ld bc, $1000 + call CopyBytes + call CloseSRAM + xor a + ld [wcd77], a + call ClearBGPalettes + ret + +Function17d7b4: + call IncCrashCheckPointer + ld a, [hli] + ld e, a + ld d, 0 + call PlayMusic2 + call HlToCrashCheckPointer + ret + +Function17d7c2: + call IncCrashCheckPointer + ld a, [hli] + ld e, a + ld d, 0 + call PlaySFX + call WaitSFX + call HlToCrashCheckPointer + ret + +Function17d7d3: + call IncCrashCheckPointer + ld a, [hli] + push bc + call GetCryIndex + ld d, b + ld e, c + pop bc + call nc, PlayCry + call WaitSFX + call HlToCrashCheckPointer + ret + +Function17d7e5: + call IncCrashCheckPointer + ld a, [hli] + ld [wcd4f], a + ld a, [hli] + ld [wcd50], a + ld a, [hli] + ld [wcd51], a + ld a, [hli] + ld [wcd52], a + ld a, [hli] + sla a + sla a + sla a + add $98 + ld [wcd53], a + ld de, wcd4f + call Function17e613 + ld a, [hli] + ld [wcd53], a + ld de, wcd4f + call Function17e691 + call HlToCrashCheckPointer + ret + +Function17d818: + call IncCrashCheckPointer + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + call HlToCrashCheckPointer + call Function17e447 + ld e, l + ld d, h + hlcoord 0, 0 + add hl, bc + call PlaceString + ret + +Function17d833: + call IncCrashCheckPointer + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + call HlToCrashCheckPointer + push de + push bc + call Function17e32b + pop bc + pop de + call Function17e43d + ld c, l + ld b, h + hlcoord 0, 0 + add hl, de + ld e, l + ld d, h + farcall Function11c08f + call Function17e349 + ret + +Function17d85d: + call IncCrashCheckPointer + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + push hl + ld hl, wBGPals1 + add hl, de + ld de, wcc60 +.asm_17d86c + ld a, [hli] + ld [de], a + inc de + and a + jr nz, .asm_17d86c + pop hl + ld de, wc608 + ld c, $0 +.asm_17d878 + ld a, [hli] + cp $ff + jr z, .asm_17d8c7 + ld [wcd4f], a + ld a, [hli] + ld [wcd50], a + ld a, [hli] + ld [wcd51], a + ld a, [hli] + ld [wcd52], a + ld a, [wcd51] + push af + cp $c0 + jr c, .asm_17d89b + ld a, [wcd4f] + ldh [rSVBK], a + jr .asm_17d8a1 + +.asm_17d89b + ld a, [wcd4f] + call OpenSRAM + +.asm_17d8a1 + push hl + ld a, [wcd50] + ld l, a + ld a, [wcd51] + ld h, a + ld a, [wcd52] +.asm_17d8ad + push af + ld a, [hli] + ld [de], a + inc de + inc c + pop af + dec a + jr nz, .asm_17d8ad + pop hl + pop af + cp $c0 + jr c, .asm_17d8c2 + ld a, $4 + ldh [rSVBK], a + jr .asm_17d878 + +.asm_17d8c2 + call CloseSRAM + jr .asm_17d878 + +.asm_17d8c7 + call HlToCrashCheckPointer + push bc + ld a, $3 + ldh [rSVBK], a + ld hl, wc608 + ld de, wBGPals1 + ld b, $0 + call CopyBytes + ld a, $4 + ldh [rSVBK], a + call Function17e32b + pop bc + ld a, c + ld [wcd3b], a + xor a + ld [wcf66], a + farcall Function118329 + ld a, [wMobileErrorCodeBuffer] + and a + jr z, .asm_17d8fe + cp $a + jr z, .asm_17d8fe + call Function17e309 + ret + +.asm_17d8fe + call Function17e349 + ret + +Function17d902: + call IncCrashCheckPointer + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + push de + call HlToCrashCheckPointer + call Function17e32b + pop de + ld hl, wBGPals1 + add hl, de + ld de, wcc60 +.asm_17d918 + ld a, [hli] + ld [de], a + inc de + and a + jr nz, .asm_17d918 + xor a + ld [wcf66], a + farcall Function11837a + ld a, [wMobileErrorCodeBuffer] + and a + jr z, .asm_17d936 + cp $a + jr z, .asm_17d936 + call Function17e309 + ret + +.asm_17d936 + call Function17e349 + ret + +Function17d93a: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $5 + call CopyBytes + call HlToCrashCheckPointer + call Function17e32b + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld a, [wc70c] + call Function17e6de + ld a, [wc70a] + ld [wCurPartySpecies], a + ld a, [wc70c] + ld e, a + farcall LoadMonPaletteAsNthBGPal + call SetPalettes + ld a, [wc708] + ld l, a + ld a, [wc709] + ld h, a + ld a, [wc70b] + ld c, a + decoord 0, 0 + add hl, de + ld e, l + ld d, h + farcall HOF_AnimateFrontpic + pop af + ldh [rSVBK], a + call Function17e349 + ret + +Function17d98b: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $4 + call CopyBytes + call HlToCrashCheckPointer + call Function17e32b + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld a, [wc70b] + call Function17e6de + ld a, [wc70a] + ld [wTrainerClass], a + ld a, [wc70b] + ld e, a + farcall LoadTrainerClassPaletteAsNthBGPal + call SetPalettes + ld a, [wc708] + ld e, a + ld a, [wc709] + ld d, a + push de + ld de, vTiles2 + farcall GetTrainerPic + pop hl + decoord 0, 0 + add hl, de + ld bc, $707 + predef PlaceGraphic + pop af + ldh [rSVBK], a + call Function17e349 + ret + +Function17d9e3: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $7 + call CopyBytes + call HlToCrashCheckPointer + ld a, [wc70b] + push af + cp $c0 + jr c, .asm_17da01 + ld a, [wc70c] + ldh [rSVBK], a + jr .asm_17da07 + +.asm_17da01 + ld a, [wc70c] + call OpenSRAM + +.asm_17da07 + ld a, [wc708] + ld l, a + ld a, [wc709] + ld h, a + ld a, [wc70a] + ld e, a + ld a, [wc70b] + ld d, a + ld a, [wc70d] + ld c, a + ld a, [wc70e] + ld b, a + call CopyBytes + pop af + cp $c0 + jr c, .asm_17da2d + ld a, $4 + ldh [rSVBK], a + jr .asm_17da30 + +.asm_17da2d + call CloseSRAM + +.asm_17da30 + ret + +Function17da31: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $4 + call CopyBytes + call HlToCrashCheckPointer + ld a, [wc709] + push af + cp $c0 + jr c, .asm_17da4f + ld a, [wc70a] + ldh [rSVBK], a + jr .asm_17da55 + +.asm_17da4f + ld a, [wc70a] + call OpenSRAM + +.asm_17da55 + ld a, [wc708] + ld e, a + ld a, [wc709] + ld d, a + ld a, [wc70b] + ld c, a + bit 7, c + jr nz, .asm_17da70 + ld hl, Unknown_17da8c + ld b, $0 + add hl, bc + ld a, [de] + or [hl] + ld [de], a + jr .asm_17da7d + +.asm_17da70 + ld hl, Unknown_17da94 + ld a, c + and $7f + ld c, a + ld b, 0 + add hl, bc + ld a, [de] + and [hl] + ld [de], a + +.asm_17da7d + pop af + cp $c0 + jr c, .asm_17da88 + ld a, $4 + ldh [rSVBK], a + jr .asm_17da8b + +.asm_17da88 + call CloseSRAM + +.asm_17da8b + ret + +Unknown_17da8c: +for x, 8 + db 1 << x +endr + +Unknown_17da94: +for x, 8 + db ~(1 << x) +endr + +Function17da9c: + ld a, [wcd31] + dec a + jr z, .asm_17dabd + push af + call Function17e566 + pop af + ld [wcd31], a + ld hl, wcd24 + ld a, [wcd2e] + sub [hl] + ld [wcd2e], a + call Function17e55b + call Function17e5af +.asm_17daba + jp IncCrashCheckPointer + +.asm_17dabd + ld a, [wcd2f] + and a + jr z, .asm_17daba + ld hl, wcd24 + sub [hl] + ld [wcd2f], a + ld a, [wcd2e] + sub [hl] + ld [wcd2e], a + call Function17e451 + call Function17e55b + call Function17e5af + jr .asm_17daba + +Function17dadc: + ld a, [wcd2e] + ld hl, wcd24 + add [hl] + ld hl, wcd42 + cp [hl] + jr z, .asm_17db0e + jr nc, .asm_17db0e + ld hl, wcd31 + ld a, [wcd2b] + cp [hl] + jr z, .asm_17db11 + call Function17e566 + ld a, [wcd31] + inc a + ld [wcd31], a + ld hl, wcd24 + ld a, [wcd2e] + add [hl] + ld [wcd2e], a + call Function17e55b + call Function17e5af + +.asm_17db0e + jp IncCrashCheckPointer + +.asm_17db11 + ld hl, wcd24 + ld a, [wcd2f] + add [hl] + ld [wcd2f], a + ld a, [wcd2e] + add [hl] + ld [wcd2e], a + call Function17e451 + call Function17e55b + call Function17e5af + jr .asm_17db0e + +Function17db2d: + ld a, [wcd30] + ld hl, wcd24 + cp [hl] + jr z, .asm_17db53 + ld hl, wcd42 + ld a, [wcd2e] + inc a + cp [hl] + jr z, .asm_17db53 + ld [wcd2e], a + call Function17e566 + ld a, [wcd30] + inc a + ld [wcd30], a + call Function17e55b + call Function17e5af + +.asm_17db53 + jp IncCrashCheckPointer + +Function17db56: + ld a, [wcd30] + cp $1 + jr z, .asm_17db74 + call Function17e566 + ld a, [wcd30] + dec a + ld [wcd30], a + ld a, [wcd2e] + dec a + ld [wcd2e], a + call Function17e55b + call Function17e5af + +.asm_17db74 + jp IncCrashCheckPointer + +Function17db77: + ld hl, wcd2d + ld a, [wcd2f] + add [hl] + ld hl, wcd42 + cp [hl] + jr z, .asm_17dbae + jr nc, .asm_17dbae + call Function17e566 + ld hl, wcd2d + ld a, [wcd2f] + add [hl] + ld [wcd2f], a + ld a, [wcd2e] + add [hl] + ld hl, wcd42 + cp [hl] + jr c, .asm_17db9f + ld a, [hl] + dec a + +.asm_17db9f + ld [wcd2e], a + call Function17dbb1 + call Function17e451 + call Function17e55b + call Function17e5af + +.asm_17dbae + jp IncCrashCheckPointer + +Function17dbb1: + ld hl, wcd2f + ld a, [wcd42] + sub [hl] + ld hl, wcd2d + cp [hl] + ret nc + ld a, $1 + ld [wcd30], a + ld [wcd31], a + ld a, [wcd24] + ld c, a + ld a, [wcd24] + ld b, a + ld a, [wcd2e] + ld hl, wcd2f + sub [hl] +.asm_17dbd4 + and a + ret z + push af + ld hl, wcd30 + ld a, b + cp [hl] + jr nz, .asm_17dbe4 + ld a, $1 + ld [hl], a + ld hl, wcd31 + +.asm_17dbe4 + inc [hl] + pop af + dec a + jr .asm_17dbd4 + +Function17dbe9: + ld hl, wcd2d + ld a, [wcd2f] + sub [hl] + bit 7, a + jr z, .asm_17dbf5 + xor a + +.asm_17dbf5 + ld [wcd2f], a + ld a, [wcd30] + dec a + ld c, a + ld a, [wcd31] + ld b, a + xor a + ld hl, wcd24 +.asm_17dc05 + dec b + jr z, .asm_17dc0b + add [hl] + jr .asm_17dc05 + +.asm_17dc0b + add c + ld hl, wcd2f + add [hl] + ld [wcd2e], a + call Function17e451 + call Function17e55b + call Function17e5af + jp IncCrashCheckPointer + +Function17dc1f: + call IncCrashCheckPointer + ld de, wc688 + ld bc, $6 + call CopyBytes + call Function17e32b + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld hl, wc688 + ld a, $40 + ld [wc708], a + ld a, [hli] + ld [wc70a], a + add $5 + ld [wc70c], a + ld a, [hli] + ld [wc709], a + add $4 + ld [wc70b], a + ld a, $96 + ld [wc70d], a + ld a, $5c + ld [wc70e], a + ld a, $1 + ld [wc70f], a + ld hl, wc708 + call LoadMenuHeader + call VerticalMenu + jr nc, .asm_17dc6e + ld a, $2 + ld [wMenuCursorY], a + +.asm_17dc6e + call CloseWindow + pop af + ldh [rSVBK], a + ld a, [wMenuCursorY] + cp $1 + jr nz, .asm_17dc85 + ld a, [wc68a] + ld l, a + ld a, [wc68a + 1] + ld h, a + jr .asm_17dc8d + +.asm_17dc85 + ld a, [wc68a + 2] + ld l, a + ld a, [wc68a + 3] + ld h, a + +.asm_17dc8d + push hl + call Function17e349 + pop hl + call Function17e40f + ret + +MenuData_17dc96: ; unreferenced + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING | STATICMENU_WRAP ; flags + db 2 + db "はい@" + db "いいえ@" + +Function17dc9f: + call IncCrashCheckPointer + call HlToCrashCheckPointer + call RotateFourPalettesLeft + ret + +Function17dca9: + call IncCrashCheckPointer + call HlToCrashCheckPointer + +Function17dcaf: + ld a, $5 + ldh [rSVBK], a + ld hl, wBGPals1 + ld de, 1 palettes + ld c, 8 +.asm_17dcbb + push hl + ld a, $ff + ld [hli], a + ld a, $7f + ld [hl], a + pop hl + add hl, de + dec c + jr nz, .asm_17dcbb + call RotateThreePalettesRight + ld a, $4 + ldh [rSVBK], a + ret + +Function17dccf: + call IncCrashCheckPointer + push hl + ld a, [wcd4b] + ld l, a + ld a, [wcd4c] + ld h, a + ld a, [wcd2e] + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [hli] + ld c, a + ld a, [hl] + ld b, a + call Function17e43d + call HlToCrashCheckPointer +.asm_17dced + ld a, [wMobileCrashCheckPointer] + ld l, a + ld a, [wMobileCrashCheckPointer + 1] + ld h, a + ld a, [hl] + cp $ff + jr z, .asm_17dd0d +.crash_loop + cp $31 + jr nc, .crash_loop + call Function17d711 + ld a, [wcd77] + bit 7, a + jr nz, .asm_17dd0d + and a + jr z, .asm_17dd11 + jr .asm_17dced + +.asm_17dd0d + pop hl + jp HlToCrashCheckPointer + +.asm_17dd11 + pop hl + ret + +Function17dd13: + call IncCrashCheckPointer + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + call HlToCrashCheckPointer + call Function17e447 + push hl + hlcoord 0, 0 + add hl, bc + push hl + pop bc + pop hl + call PlaceHLTextAtBC + ret + +Function17dd30: + call IncCrashCheckPointer + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld b, 0 + ld a, [hli] + push af + call HlToCrashCheckPointer + pop af + hlcoord 0, 0 + add hl, de + call Function17e600 + ret + +Function17dd49: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $a + call CopyBytes + ld a, [wc711] + ld c, a + ld b, 0 + call CopyBytes + ld a, [wc70a] + cp $c0 + jr c, .sram + ld a, [wc708] + ldh [rSVBK], a + jr .got_bank + +.sram + ld a, [wc708] + call OpenSRAM + +.got_bank + ld a, [wc709] + ld l, a + ld a, [wc70a] + ld h, a + ld de, wc688 + ld a, [wc711] + ld c, a + ld b, 0 + call CopyBytes + ld a, [wc70a] + cp $c0 + jr c, .close_sram + ld a, $4 + ldh [rSVBK], a + jr .exited_bank + +.close_sram + call CloseSRAM + +.exited_bank + ld a, [wc711] + ld c, a + ld hl, wc712 + ld de, wc688 +.loop + ld a, [de] + inc de + cp [hl] + inc hl + jr z, .next + jr c, .load + jr .load2 + +.next + dec c + jr nz, .loop + ld a, [wc70d] + ld l, a + ld a, [wc70e] + ld h, a + jr .done + +.load2 + ld a, [wc70f] + ld l, a + ld a, [wc710] + ld h, a + jr .done + +.load + ld a, [wc70b] + ld l, a + ld a, [wc70c] + ld h, a + +.done + call Function17e40f + ret + +Function17ddcd: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $8 + call CopyBytes + ld a, [wc70a] + cp $c0 + jr c, .asm_17dde7 + ld a, [wc708] + ldh [rSVBK], a + jr .asm_17dded + +.asm_17dde7 + ld a, [wc708] + call OpenSRAM + +.asm_17dded + ld a, [wc709] + ld e, a + ld a, [wc70a] + ld d, a + ld a, [de] + ld [wc710], a + ld a, [wc70b] + ld c, a + ld b, 0 + ld a, [wc70a] + cp $c0 + jr c, .asm_17de0c + ld a, $4 + ldh [rSVBK], a + jr .asm_17de0f + +.asm_17de0c + call CloseSRAM + +.asm_17de0f + push hl + ld hl, Unknown_17da8c + add hl, bc + ld a, [hl] + ld hl, wc710 + and [hl] + pop hl + jr nz, .asm_17de26 + ld a, [wc70e] + ld l, a + ld a, [wc70f] + ld h, a + jr .asm_17de2e + +.asm_17de26 + ld a, [wc70c] + ld l, a + ld a, [wc70d] + ld h, a + +.asm_17de2e + call Function17e40f + ret + +Function17de32: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $9 + call CopyBytes + ld a, [wc710] + ld c, a + ld b, 0 + call CopyBytes + ld a, $6 + call OpenSRAM + call Function17f4f6 + ld a, [wc708] + ld e, a + ld a, [wc709] + ld d, a + add hl, de + ld e, l + ld d, h + ld a, [wc710] + ld c, a + ld hl, wc711 +.asm_17de61 + ld a, [de] + inc de + cp [hl] + inc hl + jr z, .asm_17de6b + jr c, .asm_17de82 + jr .asm_17de78 + +.asm_17de6b + dec c + jr nz, .asm_17de61 + ld a, [wc70c] + ld l, a + ld a, [wc70d] + ld h, a + jr .asm_17de8a + +.asm_17de78 + ld a, [wc70e] + ld l, a + ld a, [wc70f] + ld h, a + jr .asm_17de8a + +.asm_17de82 + ld a, [wc70a] + ld l, a + ld a, [wc70b] + ld h, a + +.asm_17de8a + call CloseSRAM + call Function17e40f + ret + +Function17de91: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $7 + call CopyBytes + ld a, $6 + call OpenSRAM + call Function17f4f6 + ld a, [wc708] + ld e, a + ld a, [wc709] + ld d, a + add hl, de + ld e, l + ld d, h + ld a, [wc70a] + ld c, a + ld b, 0 + ld hl, Unknown_17da8c + add hl, bc + ld a, [hl] + ld l, e + ld h, d + and [hl] + jr nz, .asm_17deca + ld a, [wc70d] + ld l, a + ld a, [wc70e] + ld h, a + jr .asm_17ded2 + +.asm_17deca + ld a, [wc70b] + ld l, a + ld a, [wc70c] + ld h, a + +.asm_17ded2 + call CloseSRAM + call Function17e40f + ret + +Function17ded9: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $1f + call CopyBytes + call Function17e32b + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld hl, wc708 + ld a, [hli] + ld [wCurPartySpecies], a + ld [wTempEnemyMonSpecies], a + ld a, [hli] + ld [wCurPartyLevel], a + ld a, [hli] + ld b, a + ld a, [wPartyCount] + cp $6 + jp nc, Function17e026 + xor a + ld [wMonType], a + push hl + push bc + predef TryAddMonToParty + farcall SetCaughtData + pop bc + pop hl + bit 1, b + jr z, .asm_17df33 + push bc + push hl + ld a, [wPartyCount] + dec a + ld hl, wPartyMonNicknames + call SkipNames + ld d, h + ld e, l + pop hl + call CopyBytes + pop bc + jr .asm_17df37 + +.asm_17df33 + ld de, $6 + add hl, de + +.asm_17df37 + bit 2, b + jr z, .asm_17df5a + push bc + push hl + ld a, [wPartyCount] + dec a + ld hl, wPartyMonOTs + call SkipNames + ld d, h + ld e, l + pop hl + call CopyBytes + ld a, [hli] + ld b, a + push hl + farcall SetGiftPartyMonCaughtData + pop hl + pop bc + jr .asm_17df5e + +.asm_17df5a + ld de, $7 + add hl, de + +.asm_17df5e + bit 3, b + jr z, .asm_17df79 + push bc + push hl + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1ID + call GetPartyLocation + ld d, h + ld e, l + pop hl + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + pop bc + jr .asm_17df7b + +.asm_17df79 + inc hl + inc hl + +.asm_17df7b + bit 4, b + jr z, .asm_17dfd0 + push bc + push hl + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1DVs + call GetPartyLocation + ld d, h + ld e, l + pop hl + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + push hl + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1Species + call GetPartyLocation + ld a, [hl] + ld [wCurSpecies], a + call GetBaseData + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1MaxHP + call GetPartyLocation + ld d, h + ld e, l + push hl + ld b, FALSE + farcall CalcMonStats + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1HP + call GetPartyLocation + ld d, h + ld e, l + pop hl + ld a, [hli] + ld [de], a + inc de + ld a, [hl] + ld [de], a + pop hl + pop bc + jr .asm_17dfd2 + +.asm_17dfd0 + inc hl + inc hl + +.asm_17dfd2 + bit 5, b + jr z, .asm_17dfea + push bc + push hl + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1Item + call GetPartyLocation + ld d, h + ld e, l + pop hl + ld a, [hli] + ld [de], a + pop bc + jr .asm_17dfeb + +.asm_17dfea + inc hl + +.asm_17dfeb + bit 6, b + jr z, .asm_17e01f + push bc + push hl + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1Moves + call GetPartyLocation + ld d, h + ld e, l + pop hl + push de + ld bc, $4 + call CopyBytes + pop de + push hl + push de + ld a, [wPartyCount] + dec a + ld hl, wPartyMon1PP + call GetPartyLocation + ld d, h + ld e, l + pop hl + predef FillPP + pop hl + pop bc + jp asm_17e0ee + +.asm_17e01f + ld de, $4 + add hl, de + jp asm_17e0ee + +Function17e026: + ld a, BANK(sBoxCount) + call OpenSRAM + ld a, [sBoxCount] + call CloseSRAM + cp $14 + jp nc, .asm_17e0ea + bit 0, b + jp z, .asm_17e0ea + push bc + push hl + farcall LoadEnemyMon + farcall SendMonIntoBox + farcall SetBoxMonCaughtData + pop hl + pop bc + ld a, BANK(sBoxMonNicknames) + call OpenSRAM + bit 1, b + jr z, .asm_17e067 + push bc + ld bc, $b + ld de, sBoxMonNicknames + call CopyBytes + pop bc + jr .asm_17e06b + +.asm_17e067 + ld de, $6 + add hl, de + +.asm_17e06b + bit 2, b + jr z, .asm_17e08e + push bc + ld bc, $6 + ld de, sBoxMonOTs + call CopyBytes + ld a, [hli] + ld b, a + push hl + call CloseSRAM + farcall SetGiftBoxMonCaughtData + ld a, $1 + call OpenSRAM + pop hl + pop bc + jr .asm_17e092 + +.asm_17e08e + ld de, $7 + add hl, de + +.asm_17e092 + bit 3, b + jr z, .asm_17e0a2 + push bc + ld de, sBoxMon1ID + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + pop bc + jr .asm_17e0a4 + +.asm_17e0a2 + inc hl + inc hl + +.asm_17e0a4 + bit 4, b + jr z, .asm_17e0b4 + push bc + ld de, sBoxMon1DVs + ld a, [hli] + ld [de], a + inc de + ld a, [hli] + ld [de], a + pop bc + jr .asm_17e0b6 + +.asm_17e0b4 + inc hl + inc hl + +.asm_17e0b6 + bit 5, b + ld a, [hli] + jr z, .asm_17e0be + ld [sBoxMon1Item], a + +.asm_17e0be + bit 6, b + jr z, .asm_17e0e1 + push bc + ld de, sBoxMon1Moves + ld bc, $4 + call CopyBytes + push hl + ld hl, sBoxMon1Moves + ld de, sBoxMon1PP + predef FillPP + call CloseSRAM + pop hl + pop bc + inc hl + inc hl + jr asm_17e0ee + +.asm_17e0e1 + call CloseSRAM + ld de, $6 + add hl, de + jr asm_17e0ee + +.asm_17e0ea + ld bc, $1a + add hl, bc + +asm_17e0ee: + ld a, [hli] + ld h, [hl] + ld l, a + pop af + ldh [rSVBK], a + push hl + call Function17e349 + pop hl + call Function17e40f + ret + +Function17e0fd: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $6 + call CopyBytes + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld hl, wc708 + ld a, [hli] + ld [wCurItem], a + ld a, [hli] + ld [wItemQuantityChange], a + push hl + ld hl, wNumItems + call ReceiveItem + pop hl + jr c, .asm_17e127 + inc hl + inc hl + +.asm_17e127 + ld a, [hli] + ld b, a + ld a, [hl] + ld h, a + ld l, b + pop af + ldh [rSVBK], a + call Function17e40f + ret + +Function17e133: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $5 + call CopyBytes + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld hl, wc708 + ld a, [hli] + ld [wScriptVar], a + push hl + farcall MobileCheckOwnMonAnywhere + pop hl + jr c, .asm_17e159 + inc hl + inc hl + +.asm_17e159 + ld a, [hli] + ld b, a + ld a, [hl] + ld h, a + ld l, b + pop af + ldh [rSVBK], a + call Function17e40f + ret + +Function17e165: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $5 + call CopyBytes + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + ld hl, wc708 + ld a, [hli] + ld [wCurItem], a + push hl + ld hl, wNumItems + call CheckItem + pop hl + jr c, .asm_17e195 + push hl + ld hl, wNumPCItems + call CheckItem + pop hl + jr c, .asm_17e195 + inc hl + inc hl + +.asm_17e195 + ld a, [hli] + ld b, a + ld a, [hl] + ld h, a + ld l, b + pop af + ldh [rSVBK], a + call Function17e40f + ret + +Function17e1a1: + call IncCrashCheckPointer + ld de, wc708 + ld bc, $d + call CopyBytes + ld a, [wc70a] + cp $c0 + jr c, .asm_17e1bb + ld a, [wc708] + ldh [rSVBK], a + jr .asm_17e1c1 + +.asm_17e1bb + ld a, [wc708] + call OpenSRAM + +.asm_17e1c1 + ld a, [wc709] + ld l, a + ld a, [wc70a] + ld h, a + ld de, wc608 + ld a, [wc70b] + ld c, a + ld b, 0 + call CopyBytes + ld a, [wc70a] + cp $c0 + jr c, .asm_17e1e2 + ld a, $4 + ldh [rSVBK], a + jr .asm_17e1e5 + +.asm_17e1e2 + call CloseSRAM + +.asm_17e1e5 + ld a, [wc70e] + cp $c0 + jr c, .asm_17e1f3 + ld a, [wc70c] + ldh [rSVBK], a + jr .asm_17e1f9 + +.asm_17e1f3 + ld a, [wc70c] + call OpenSRAM + +.asm_17e1f9 + ld a, [wc70d] + ld l, a + ld a, [wc70e] + ld h, a + ld de, wc688 + ld a, [wc70b] + ld c, a + ld b, 0 + call CopyBytes + ld a, [wc70e] + cp $c0 + jr c, .asm_17e21a + ld a, $4 + ldh [rSVBK], a + jr .asm_17e21d + +.asm_17e21a + call CloseSRAM + +.asm_17e21d + ld a, [wc70b] + ld c, a + ld hl, wc688 + ld de, wc608 +.asm_17e227 + ld a, [de] + inc de + cp [hl] + inc hl + jr z, .asm_17e231 + jr c, .asm_17e23e + jr .asm_17e248 + +.asm_17e231 + dec c + jr nz, .asm_17e227 + ld a, [wc711] + ld l, a + ld a, [wc712] + ld h, a + jr .asm_17e250 + +.asm_17e23e + ld a, [wc70f] + ld l, a + ld a, [wc710] + ld h, a + jr .asm_17e250 + +.asm_17e248 + ld a, [wc712 + 1] + ld l, a + ld a, [wc712 + 2] + ld h, a + +.asm_17e250 + call Function17e40f + ret + +Function17e254: + call IncCrashCheckPointer + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld [de], a + call HlToCrashCheckPointer + ret + +Function17e261: + call IncCrashCheckPointer + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [de] + add [hl] + ld [de], a + inc hl + call HlToCrashCheckPointer + ret + +Function17e270: + call IncCrashCheckPointer + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [de] + sub [hl] + ld [de], a + inc hl + call HlToCrashCheckPointer + ret + +Function17e27f: + call IncCrashCheckPointer + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + call HlToCrashCheckPointer + ld l, c + ld h, b + ld a, [de] + add [hl] + ld [de], a + ret + +Function17e293: + call IncCrashCheckPointer + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld c, a + ld a, [hli] + ld b, a + call HlToCrashCheckPointer + ld l, c + ld h, b + ld a, [de] + sub [hl] + ld [de], a + ret + +Function17e2a7: + call IncCrashCheckPointer + call HlToCrashCheckPointer + call Function17e32b + xor a + ld [wcf66], a + farcall Function118233 + ld de, PostalMarkGFX + ld hl, vTiles2 tile $60 + lb bc, BANK(PostalMarkGFX), 1 + call Get2bpp + ld a, [wMobileErrorCodeBuffer] + and a + jr z, .asm_17e2d8 + cp $a + jr z, .asm_17e2f7 + cp $b + jr z, .asm_17e300 + call Function17e309 + ret + +.asm_17e2d8 + call Function17d60b + call Function17e349 + xor a + ld [wcd7a], a + ld a, $5 + call OpenSRAM + ld hl, $aa73 + ld de, $aa7f + ld bc, $c + call CopyBytes + call CloseSRAM + ret + +.asm_17e2f7 + call Function17e349 + ld a, $1 + ld [wcd7a], a + ret + +.asm_17e300 + call Function17e349 + ld a, $2 + ld [wcd7a], a + ret + +Function17e309: + ld a, $2 + ld [wc303], a + call Function17dcaf + call ClearScreen + call Function17e349 + call Function17d5f6 + farcall DisplayMobileError + call Function17e349 + call Function17dcaf + xor a + ld [wcd77], a + ret + +Function17e32b: + ld a, $5 + call OpenSRAM + ld hl, wc608 + ld de, $b0b1 + ld bc, $40 + call CopyBytes + ld hl, wBGMapBuffer + ld bc, $5b + call CopyBytes + call CloseSRAM + ret + +Function17e349: + ld a, $5 + call OpenSRAM + ld hl, $b0b1 + ld de, wc608 + ld bc, $40 + call CopyBytes + ld de, wBGMapBuffer + ld bc, $5b + call CopyBytes + call CloseSRAM + ret + +MACRO inc_crash_check_pointer_farcall + call IncCrashCheckPointer + call HlToCrashCheckPointer ; redundant + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + rept _NARG + farcall \1 + shift + endr + pop af + ldh [rSVBK], a + ret +ENDM + +IncCrashCheckPointer_SaveGameData: + inc_crash_check_pointer_farcall SaveGameData + +IncCrashCheckPointer_SaveAfterLinkTrade: + inc_crash_check_pointer_farcall SaveAfterLinkTrade + +IncCrashCheckPointer_SaveBox: + inc_crash_check_pointer_farcall SaveBox + +IncCrashCheckPointer_SaveChecksum: + inc_crash_check_pointer_farcall SaveChecksum + +IncCrashCheckPointer_SaveTrainerRankingsChecksum: + inc_crash_check_pointer_farcall UpdateTrainerRankingsChecksum2, BackupMobileEventIndex + +Function17e3e0: + call IncCrashCheckPointer + ld a, [hli] + ld c, a + call HlToCrashCheckPointer + ld a, $1 + ldh [hBGMapMode], a + call DelayFrames + ret + +Function17e3f0: + call IncCrashCheckPointer + call HlToCrashCheckPointer +.asm_17e3f6 + call JoyTextDelay + ld hl, hJoyPressed + ld a, [hl] + and $1 + ret nz + ld a, [hl] + and $2 + ret nz + call WaitBGMap + jr .asm_17e3f6 + +Function17e409: + ld hl, wcd77 + set 7, [hl] + ret + +Function17e40f: + ld de, wBGPals1 + add hl, de + jr HlToCrashCheckPointer + +IncCrashCheckPointer: + ld a, [wMobileCrashCheckPointer] + ld l, a + ld a, [wMobileCrashCheckPointer + 1] + ld h, a + inc hl + +HlToCrashCheckPointer: + ld a, l + ld [wMobileCrashCheckPointer], a + ld a, h + ld [wMobileCrashCheckPointer + 1], a + ret + +Function17e427: + ld hl, hJoyPressed + ld a, [hl] + and $1 + jr nz, .asm_17e432 + and $2 + ret z + +.asm_17e432 + ld a, $3 + ld [wcd77], a + ret + +Function17e438: + ld hl, wcd77 + inc [hl] + ret + +Function17e43d: + ld a, [wBGMapBuffer] + ld l, a + ld a, [wcd21] + ld h, a + add hl, bc + ret + +Function17e447: + ld a, [wBGMapBuffer] + ld l, a + ld a, [wcd21] + ld h, a + add hl, de + ret + +Function17e451: + ld a, [wcd42] + and a + ret z + call Function17e51b + call Function17e4dd + ld a, [wcd2e] + push af + ld a, [wcd49] + ld l, a + ld a, [wcd4a] + ld h, a + ld a, [wcd2f] + ld [wcd2e], a + ld c, a + ld b, 0 + add hl, bc + add hl, bc + push hl + hlcoord 0, 0 + ld bc, $14 + ld a, [wcd23] + call AddNTimes + ld a, [wCreditsTimer] + ld c, a + ld b, 0 + add hl, bc + pop bc + ld a, [wMobileCommsJumptableIndex] +.asm_17e48b + push af + push hl + ld a, [wcd24] +.asm_17e490 + push af + push hl + ld a, [bc] + inc bc + ld e, a + ld a, [bc] + inc bc + ld d, a + push bc + push hl + ld a, [wBGMapBuffer] + ld l, a + ld a, [wcd21] + ld h, a + add hl, de + push hl + pop de + pop hl + call PlaceString + pop bc + pop hl + ld a, [wcd26] + ld e, a + ld d, 0 + add hl, de + ld a, [wcd2e] + inc a + ld [wcd2e], a + ld e, a + ld a, [wcd42] + cp e + jr z, .asm_17e4d5 + pop af + dec a + jr nz, .asm_17e490 + pop hl + ld a, [wcd27] + ld de, $14 +.asm_17e4cb + add hl, de + dec a + jr nz, .asm_17e4cb + pop af + dec a + jr nz, .asm_17e48b + jr .asm_17e4d8 + +.asm_17e4d5 + pop af + pop hl + pop af + +.asm_17e4d8 + pop af + ld [wcd2e], a + ret + +Function17e4dd: + ld a, [wcd2c] + and $1 + ret z + ld a, [wcd29] + hlcoord 0, 0 + ld bc, $14 + call AddNTimes + ld a, [wcd28] + ld c, a + ld b, 0 + add hl, bc + ld a, [wcd2f] + and a + jr z, .asm_17e4ff + ld a, $61 + ld [hl], a + +.asm_17e4ff + ld a, [wcd2a] + ld bc, $14 + call AddNTimes + ld a, [wcd42] + ld c, a + ld a, [wcd2e] + ld b, a + ld a, [wcd24] + add b + cp c + ret z + ret nc + ld a, $ee + ld [hl], a + ret + +Function17e51b: + ld a, [wcd28] + ld hl, wCreditsTimer + sub [hl] + inc a + ld [wcd4f], a + hlcoord 0, 0 + ld bc, $14 + ld a, [wcd23] + dec a + call AddNTimes + ld a, [wCreditsTimer] + ld c, a + ld b, 0 + add hl, bc + ld a, [wMobileCommsJumptableIndex] + ld c, a + ld a, [wcd27] + call SimpleMultiply +.asm_17e544 + push af + push hl + ld a, [wcd4f] + ld c, a + ld b, 0 + ld a, $7f + call ByteFill + pop hl + ld bc, $14 + add hl, bc + pop af + dec a + jr nz, .asm_17e544 + ret + +Function17e55b: + ld a, [wcd42] + and a + ret z + ld a, $ed + call Function17e571 + ret + +Function17e566: + ld a, [wcd42] + and a + ret z + ld a, $7f + call Function17e571 + ret + +Function17e571: + push af + hlcoord 0, 0 + ld bc, $14 + ld a, [wcd23] + call AddNTimes + ld a, [wCreditsTimer] + ld c, a + ld b, 0 + add hl, bc + dec hl + push hl + ld a, [wcd31] + dec a + ld c, a + ld a, [wcd27] + call SimpleMultiply + ld l, $0 + ld h, l + ld bc, $14 + call AddNTimes + ld a, [wcd30] + dec a + ld c, a + ld a, [wcd26] + call SimpleMultiply + ld c, a + ld b, 0 + add hl, bc + pop bc + add hl, bc + pop af + ld [hl], a + ret + +Function17e5af: + ld a, [wcd2c] + and $2 + ret z + ld a, [wcd43] + ld l, a + ld a, [wMobileInactivityTimerMinutes] + ld h, a + bccoord 0, 0 + add hl, bc + ld bc, $ffec + add hl, bc + ld a, [wMobileInactivityTimerSeconds] + ld c, a + ld b, 0 + ld a, [wMobileInactivityTimerFrames] + call Function17e600 + ld a, [wcd2e] + ld c, a + ld b, 0 + ld a, [wcd4d] + ld l, a + ld a, [wcd4e] + ld h, a + add hl, bc + add hl, bc + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [wBGMapBuffer] + ld l, a + ld a, [wcd21] + ld h, a + add hl, de + push hl + pop de + ld a, [wcd43] + ld l, a + ld a, [wMobileInactivityTimerMinutes] + ld h, a + bccoord 0, 0 + add hl, bc + call PlaceString + ret + +Function17e600: +.asm_17e600 + push af + push hl + push bc + ld a, $7f + call ByteFill + pop bc + pop hl + ld de, $14 + add hl, de + pop af + dec a + jr nz, .asm_17e600 + ret + +Function17e613: + push hl + hlcoord 0, 0 + ld bc, $14 + ld a, [de] + inc de + push af + ld a, [de] + inc de + and a +.asm_17e620 + jr z, .asm_17e626 + add hl, bc + dec a + jr .asm_17e620 + +.asm_17e626 + pop af + ld c, a + ld b, 0 + add hl, bc + push hl + ld a, [wcd53] + ld [hli], a + ld a, [de] + inc de + dec a + dec a + jr z, .asm_17e63f + ld c, a + ld a, [wcd53] + inc a +.asm_17e63b + ld [hli], a + dec c + jr nz, .asm_17e63b + +.asm_17e63f + ld a, [wcd53] + add $2 + ld [hl], a + pop hl + ld bc, $14 + add hl, bc + ld a, [de] + dec de + dec a + dec a + jr z, .asm_17e674 + ld b, a +.asm_17e651 + push hl + ld a, [wcd53] + add $3 + ld [hli], a + ld a, [de] + dec a + dec a + jr z, .asm_17e664 + ld c, a + ld a, $7f +.asm_17e660 + ld [hli], a + dec c + jr nz, .asm_17e660 + +.asm_17e664 + ld a, [wcd53] + add $4 + ld [hl], a + pop hl + push bc + ld bc, $14 + add hl, bc + pop bc + dec b + jr nz, .asm_17e651 + +.asm_17e674 + ld a, [wcd53] + add $5 + ld [hli], a + ld a, [de] + dec a + dec a + jr z, .asm_17e689 + ld c, a + ld a, [wcd53] + add $6 +.asm_17e685 + ld [hli], a + dec c + jr nz, .asm_17e685 + +.asm_17e689 + ld a, [wcd53] + add $7 + ld [hl], a + pop hl + ret + +Function17e691: + push hl + ld hl, NULL + ld bc, $14 + ld a, [de] + inc de + push af + ld a, [de] + inc de + inc de + and a +.asm_17e69f + jr z, .asm_17e6a5 + add hl, bc + dec a + jr .asm_17e69f + +.asm_17e6a5 + pop af + ld c, a + ld b, 0 + add hl, bc + ld a, [de] + dec de +.asm_17e6ac + push af + push hl + ld a, [de] +.asm_17e6af + push af + push hl + push hl + bccoord 0, 0 + add hl, bc + ld a, [hl] + cp $7f + jr z, .asm_17e6c2 + ld a, [wcd53] + add $8 + jr .asm_17e6c7 + +.asm_17e6c2 + ld a, [wcd53] + jr .asm_17e6c7 + +.asm_17e6c7 + pop hl + bccoord 0, 0, wAttrmap + add hl, bc + ld [hl], a + pop hl + inc hl + pop af + dec a + jr nz, .asm_17e6af + pop hl + ld bc, $14 + add hl, bc + pop af + dec a + jr nz, .asm_17e6ac + pop hl + ret + +Function17e6de: + push af + ld a, [wc708] + ld l, a + ld a, [wc709] + ld h, a + decoord 0, 0, wAttrmap + add hl, de + pop af + ld b, $7 +.asm_17e6ee + push hl + ld c, $7 +.asm_17e6f1 + ld [hli], a + dec c + jr nz, .asm_17e6f1 + pop hl + ld de, $14 + add hl, de + dec b + jr nz, .asm_17e6ee + ret + +PokemonNewsGFX: +INCBIN "gfx/mobile/pokemon_news.2bpp" + +PostalMarkGFX: +INCBIN "gfx/font/postal_mark.2bpp" + +PokemonNewsTileAttrmap: +INCBIN "gfx/mobile/pokemon_news.bin" + +PokemonNewsPalettes: +INCLUDE "gfx/mobile/pokemon_news.pal" + +RunMobileScript:: + ld a, $6 + call OpenSRAM + inc de +.loop + call _RunMobileScript + jr c, .finished + jr .loop + +.finished + call CloseSRAM + ret + +_RunMobileScript: + ld a, [de] + inc de + cp "@" + jr z, .finished + cp $10 ; jumptable size + jr nc, .finished + dec a + push de + ld e, a + ld d, 0 + ld hl, .Jumptable + add hl, de + add hl, de + ld a, [hli] + ld h, [hl] + ld l, a + jp hl + +.finished + scf + ret + +.Jumptable: + dw Function17f081 ; 0 + dw Function17f0f8 ; 1 + dw Function17f154 ; 2 + dw Function17f181 ; 3 + dw Function17f1d0 ; 4 + dw Function17f220 ; 5 + dw Function17f27b ; 6 + dw Function17f2cb ; 7 + dw MobileScript_PlayerName ; 8 + dw MobileScript_Prefecture ; 9 + dw Function17f382 ; a + dw Function17f3c9 ; b + dw Function17f3f0 ; c + dw Function17f41d ; d + dw Function17f44f ; e + dw Function17f44f ; f + +Function17f081: + pop hl + call Function17f524 + jr c, .asm_17f09f + ld de, 4 + add hl, de + ld a, [hli] + inc hl + inc hl + ld e, l + ld d, h + ld l, c + ld h, b + ld c, a + ld b, 0 + add hl, bc + ld a, [de] + cp "@" + jr z, .asm_17f09d + and a + ret + +.asm_17f09d + scf + ret + +.asm_17f09f + push bc + ld de, wcd54 + ld bc, 7 + call CopyBytes + pop bc + push hl + push bc + call Function17f4f6 + pop bc + ld a, [wcd54] + ld e, a + ld a, [wcd55] + ld d, a + add hl, de + ld e, l + ld d, h + ld l, c + ld h, b + push hl + ld a, [wcd56] + ld b, a + ld a, [wcd57] + ld c, a + call MobilePrintNum + ld a, l + ld [wcd52], a + ld a, h + ld [wcd53], a + ld a, [wcd59] + and a + jr z, .asm_17f0ee + ld c, a + ld a, [wcd57] + inc a + ld b, a + ld e, l + ld d, h + dec de +.asm_17f0e0 + ld a, c + cp b + jr z, .asm_17f0ea + ld a, [de] + dec de + ld [hld], a + dec b + jr .asm_17f0e0 + +.asm_17f0ea + ld a, [wcd5a] + ld [hl], a + +.asm_17f0ee + pop hl + ld a, [wcd58] + call Function17f50f + pop de + and a + ret + +Function17f0f8: + pop hl + call Function17f524 + jr c, .asm_17f114 + ld de, $3 + add hl, de + ld a, [hli] + ld e, l + ld d, h + ld l, c + ld h, b + ld c, a + ld b, 0 + add hl, bc + ld a, [de] + cp "@" + jr z, .asm_17f112 + and a + ret + +.asm_17f112 + scf + ret + +.asm_17f114 + push bc + ld de, wcd54 + ld bc, $4 + call CopyBytes + pop bc + push hl + push bc + call Function17f4f6 + ld a, [wcd54] + ld e, a + ld a, [wcd55] + ld d, a + add hl, de + ld de, wc608 + ld a, [wcd56] + ld c, a + ld b, 0 + call CopyBytes + ld a, "@" + ld [de], a + pop hl + ld de, wc608 + call PlaceString + ld a, c + ld [wcd52], a + ld a, b + ld [wcd53], a + ld a, [wcd57] + call Function17f50f + pop de + and a + ret + +Function17f154: + pop hl + call Function17f524 + jr c, .asm_17f167 + inc hl + inc hl + ld e, l + ld d, h + ld a, [de] + cp "@" + jr z, .asm_17f165 + and a + ret + +.asm_17f165 + scf + ret + +.asm_17f167 + push bc + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + pop bc + push hl + push bc + call Function17f4f6 + add hl, de + ld c, l + ld b, h + pop de + farcall Function11c08f + ld c, l + ld b, h + pop de + and a + ret + +Function17f181: + pop hl + call Function17f524 + jr c, .asm_17f19d + ld de, $2 + add hl, de + ld a, [hli] + ld e, l + ld d, h + ld l, c + ld h, b + ld c, a + ld b, 0 + add hl, bc + ld a, [de] + cp "@" + jr z, .asm_17f19b + and a + ret + +.asm_17f19b + scf + ret + +.asm_17f19d + push bc + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld [wcd54], a + pop bc + push hl + push bc + call Function17f4f6 + add hl, de + ld a, [hl] + ld c, a + ld de, wc608 + farcall Function48c63 + pop hl + ld de, wc608 + call PlaceString + ld a, c + ld [wcd52], a + ld a, b + ld [wcd53], a + ld a, [wcd54] + call Function17f50f + pop de + and a + ret + +Function17f1d0: + pop hl + call Function17f524 + jr c, .asm_17f1ec + ld de, $2 + add hl, de + ld a, [hli] + ld e, l + ld d, h + ld l, c + ld h, b + ld c, a + ld b, 0 + add hl, bc + ld a, [de] + cp "@" + jr z, .asm_17f1ea + and a + ret + +.asm_17f1ea + scf + ret + +.asm_17f1ec + push bc + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld [wcd54], a + pop bc + push hl + push bc + call Function17f4f6 + add hl, de + ld a, [hl] + ld a, BANK(wNamedObjectIndex) + ldh [rSVBK], a + ld [wNamedObjectIndex], a + call GetPokemonName + pop hl + call PlaceString + ld a, c + ld [wcd52], a + ld a, b + ld [wcd53], a + ld a, $4 + ldh [rSVBK], a + ld a, [wcd54] + call Function17f50f + pop de + and a + ret + +Function17f220: + pop hl + call Function17f524 + jr c, .asm_17f23c + ld de, $2 + add hl, de + ld a, [hli] + ld e, l + ld d, h + ld l, c + ld h, b + ld c, a + ld b, 0 + add hl, bc + ld a, [de] + cp "@" + jr z, .asm_17f23a + and a + ret + +.asm_17f23a + scf + ret + +.asm_17f23c + push bc + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld [wcd54], a + pop bc + push hl + push bc + call Function17f4f6 + add hl, de + ld a, [hl] + ld e, a + ld d, 0 + ld hl, .Genders + add hl, de + add hl, de + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + pop hl + call PlaceString + ld a, c + ld [wcd52], a + ld a, b + ld [wcd53], a + ld a, [wcd54] + call Function17f50f + pop de + and a + ret + +.Genders: dw .Boy, .Girl +.Boy: db "Boy@" +.Girl: db "Girl@" + +Function17f27b: + pop hl + call Function17f524 + jr c, .asm_17f297 + ld de, $2 + add hl, de + ld a, [hli] + ld e, l + ld d, h + ld l, c + ld h, b + ld c, a + ld b, 0 + add hl, bc + ld a, [de] + cp "@" + jr z, .asm_17f295 + and a + ret + +.asm_17f295 + scf + ret + +.asm_17f297 + push bc + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [hli] + ld [wcd54], a + pop bc + push hl + push bc + call Function17f4f6 + add hl, de + ld a, [hl] + ld a, $1 + ldh [rSVBK], a + ld [wNamedObjectIndex], a + call GetItemName + pop hl + call PlaceString + ld a, c + ld [wcd52], a + ld a, b + ld [wcd53], a + ld a, $4 + ldh [rSVBK], a + ld a, [wcd54] + call Function17f50f + pop de + and a + ret + +Function17f2cb: + pop hl + push bc + ld a, [hli] + ld [wcd54], a + ld a, [hli] + ld [wcd55], a + ld a, [wcd2e] + inc a + ld [wcd56], a + pop bc + push hl + ld l, c + ld h, b + push hl + ld de, wcd56 + ld b, $1 + ld a, [wcd54] + ld c, a + call MobilePrintNum + ld a, l + ld [wcd52], a + ld a, h + ld [wcd53], a + pop hl + ld a, [wcd55] + call Function17f50f + pop de + and a + ret + +MobileScript_PlayerName: + pop hl + push bc + ld a, [hli] + ld [wcd54], a + pop bc + push hl + push bc + ld a, $1 + ldh [rSVBK], a + ld hl, wPlayerName + ld de, wc608 + ld bc, NAME_LENGTH_JAPANESE + call CopyBytes + ld a, $4 + ldh [rSVBK], a + pop hl + ld de, wc608 + call PlaceString + ld a, c + ld [wcd52], a + ld a, b + ld [wcd53], a + ld a, [wcd54] + call Function17f50f + pop de + and a + ret + +MobileScript_Prefecture: + pop hl + push bc + ld a, [hli] + ld [wcd55], a + and $f + ld [wcd54], a + pop bc + push hl + ld l, c + ld h, b + push hl + ld a, [wcd55] + bit 7, a + jr nz, .asm_17f355 + ld a, BANK(sCrystalData) + call OpenSRAM + ld a, [sCrystalData + 2] + jr .asm_17f35d + +.asm_17f355 + ld a, BANK(s5_b2f3) + call OpenSRAM + ld a, [s5_b2f3] + +.asm_17f35d + ld c, a + call CloseSRAM + ld de, wc608 + farcall Function48c63 + pop hl + ld de, wc608 + call PlaceString + ld a, c + ld [wcd52], a + ld a, b + ld [wcd53], a + ld a, [wcd54] + call Function17f50f + pop de + and a + ret + +Function17f382: + pop hl + push bc + ld a, [hli] + ld [wcd55], a + and $f + ld [wcd54], a + pop bc + push hl + push bc + ld l, c + ld h, b + ld a, [wcd55] + bit 7, a + jr nz, .asm_17f3a3 + ld a, BANK(sCrystalData) + call OpenSRAM + ld de, sCrystalData + 3 + jr .asm_17f3ab + +.asm_17f3a3 + ld a, BANK(s5_b2f4) + call OpenSRAM + ld de, s5_b2f4 + +.asm_17f3ab + ld a, PRINTNUM_LEADINGZEROS | 2 + ld b, a + ld a, 3 + ld c, a + call PrintNum + call CloseSRAM + ld a, l + ld [wcd52], a + ld a, h + ld [wcd53], a + pop hl + ld a, [wcd54] + call Function17f50f + pop de + and a + ret + +Function17f3c9: + push bc + ld hl, wcd36 + ld de, wc708 + ld bc, 12 + call CopyBytes + pop de + ld c, $0 + farcall Function11c075 + push hl + ld hl, wc708 + ld de, wcd36 + ld bc, 12 + call CopyBytes + pop bc + pop de + and a + ret + +Function17f3f0: + pop hl + push hl + ld a, [hli] + push af + push bc + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld a, [de] + ld c, a + ld b, 0 + add hl, bc + add hl, bc + ld a, [hli] + ld e, a + ld a, [hli] + ld d, a + ld hl, wBGPals1 + add hl, de + ld e, l + ld d, h + pop hl + call PlaceString + pop af + ld e, a + ld d, 0 + pop hl + add hl, de + add hl, de + inc hl + inc hl + inc hl + ld e, l + ld d, h + ld l, c + ld h, b + scf + ret + +Function17f41d: + pop hl + ld a, [hli] + push hl + push af + ld l, c + ld h, b + ld bc, -wTilemap + $10000 + add hl, bc + ld de, -SCREEN_WIDTH + ld c, $1 +.asm_17f42c + ld a, h + and a + jr nz, .asm_17f435 + ld a, l + cp SCREEN_WIDTH + jr c, .asm_17f439 + +.asm_17f435 + add hl, de + inc c + jr .asm_17f42c + +.asm_17f439 + hlcoord 0, 0 + ld de, SCREEN_WIDTH + ld a, c +.asm_17f440 + and a + jr z, .asm_17f447 + add hl, de + dec a + jr .asm_17f440 + +.asm_17f447 + pop af + ld e, a + ld d, 0 + add hl, de + pop de + and a + ret + +Function17f44f: + pop hl + call Function17f524 + jr c, .asm_17f46d + ld de, $5 + add hl, de + ld a, [hli] + inc hl + inc hl + ld e, l + ld d, h + ld l, c + ld h, b + ld c, a + ld b, 0 + add hl, bc + ld a, [de] + cp "@" + jr z, .asm_17f46b + and a + ret + +.asm_17f46b + scf + ret + +.asm_17f46d + push bc + ld de, wcd54 + ld bc, $8 + call CopyBytes + pop bc + push hl + push bc + ld a, [wcd56] + cp $c0 + jr c, .asm_17f488 + ld a, [wcd54] + ldh [rSVBK], a + jr .asm_17f48e + +.asm_17f488 + ld a, [wcd54] + call OpenSRAM + +.asm_17f48e + ld a, [wcd55] + ld l, a + ld a, [wcd56] + ld h, a + ld de, wc608 + ld a, [wcd57] + ld c, a + ld b, 0 + call CopyBytes + ld a, [wcd56] + cp $c0 + jr c, .asm_17f4af + ld a, $4 + ldh [rSVBK], a + jr .asm_17f4b7 + +.asm_17f4af + call CloseSRAM + ld a, $6 + call OpenSRAM + +.asm_17f4b7 + ld de, wc608 + pop hl + push hl + ld a, [wcd57] + ld b, a + ld a, [wcd58] + ld c, a + call MobilePrintNum + ld a, l + ld [wcd52], a + ld a, h + ld [wcd53], a + ld a, [wcd5a] + and a + jr z, .asm_17f4ec + ld c, a + ld a, [wcd58] + inc a + ld b, a + ld e, l + ld d, h + dec de +.asm_17f4de + ld a, c + cp b + jr z, .asm_17f4e8 + ld a, [de] + dec de + ld [hld], a + dec b + jr .asm_17f4de + +.asm_17f4e8 + ld a, [wcd5b] + ld [hl], a + +.asm_17f4ec + pop hl + ld a, [wcd59] + call Function17f50f + pop de + and a + ret + +Function17f4f6: + ld a, [wcd6a] + ld l, a + ld a, [wcd6b] + ld h, a + ld a, [wcd47] + ld c, a + ld a, [wBGMapPalBuffer] + ld b, a + ld a, [wcd2e] +.asm_17f509 + and a + ret z + dec a + add hl, bc + jr .asm_17f509 + +Function17f50f: + and a + jr z, .asm_17f519 + ld c, a + ld b, 0 + add hl, bc + ld c, l + ld b, h + ret + +.asm_17f519 + ld a, [wcd52] + ld c, a + ld l, a + ld a, [wcd53] + ld b, a + ld h, a + ret + +Function17f524: + push hl + push bc + push de + ld a, [wcd42] + dec a + ld b, a + ld a, [wcd2e] + cp b + jr z, .asm_17f53a + ld hl, wcd68 + cp [hl] +.asm_17f536 + pop de + pop bc + pop hl + ret + +.asm_17f53a + scf + jr .asm_17f536 + +BattleTowerMobileError: + call FadeToMenu + xor a + ld [wc303], a + ldh a, [rSVBK] + push af + ld a, $1 + ldh [rSVBK], a + + call DisplayMobileError + + pop af + ldh [rSVBK], a + call ExitAllMenus + ret + +DisplayMobileError: +.loop + call JoyTextDelay + call .RunJumptable + ld a, [wc303] + bit 7, a + jr nz, .quit + farcall HDMATransferAttrmapAndTilemapToWRAMBank3 + jr .loop + +.quit + call .deinit + ret + +.deinit + ld a, [wMobileErrorCodeBuffer] + cp $22 + jr z, .asm_17f597 + cp $31 + jr z, .asm_17f58a + cp $33 + ret nz + ld a, [wMobileErrorCodeBuffer + 1] + cp $1 + ret nz + ld a, [wMobileErrorCodeBuffer + 2] + cp $2 + ret nz + jr .asm_17f5a1 + +.asm_17f58a + ld a, [wMobileErrorCodeBuffer + 1] + cp $3 + ret nz + ld a, [wMobileErrorCodeBuffer + 2] + and a + ret nz + jr .asm_17f5a1 + +.asm_17f597 + ld a, [wMobileErrorCodeBuffer + 1] + and a + ret nz + ld a, [wMobileErrorCodeBuffer + 2] + and a + ret nz + +.asm_17f5a1 + ld a, BANK(sMobileLoginPassword) + call OpenSRAM + xor a + ld [sMobileLoginPassword], a + call CloseSRAM + ret + +.RunJumptable: + jumptable .Jumptable, wc303 + +.Jumptable: + dw Function17f5c3 + dw Function17ff23 + dw Function17f5d2 + +Function17f5c3: + call Function17f5e4 + farcall FinishExitMenu + ld a, $1 + ld [wc303], a + ret + +Function17f5d2: + call Function17f5e4 + farcall HDMATransferAttrmapAndTilemapToWRAMBank3 + call SetPalettes + ld a, $1 + ld [wc303], a + ret + +Function17f5e4: + ld a, $8 + ld [wMusicFade], a + ld de, MUSIC_NONE + ld a, e + ld [wMusicFadeID], a + ld a, d + ld [wMusicFadeID + 1], a + ld a, " " + hlcoord 0, 0 + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + ld a, $6 + hlcoord 0, 0, wAttrmap + ld bc, SCREEN_WIDTH * SCREEN_HEIGHT + call ByteFill + hlcoord 2, 1 + ld b, $1 + ld c, $e + call Function3eea + hlcoord 1, 4 + ld b, $c + ld c, $10 + call Function3eea + hlcoord 3, 2 + ld de, MobileCommunicationErrorText + call PlaceString + call Function17ff3c + jr nc, .asm_17f632 + hlcoord 11, 2 + call Function17f6b7 + +.asm_17f632 + ld a, [wMobileErrorCodeBuffer] + cp $d0 + jr nc, .asm_17f684 + cp $10 + jr c, .asm_17f679 + sub $10 + cp $24 + jr nc, .asm_17f679 + ld e, a + ld d, 0 + ld hl, MobileErrorCodeTable + add hl, de + add hl, de + ld a, [wMobileErrorCodeBuffer + 1] + ld e, a + ld a, [wMobileErrorCodeBuffer + 2] + ld d, a + ld a, [hli] + ld c, a + ld a, [hl] + ld h, a + ld l, c + ld a, [hli] + and a + jr z, .asm_17f679 + ld c, a +.asm_17f65d + ld a, [hli] + ld b, a + ld a, [hli] + cp $ff + jr nz, .asm_17f667 + cp b + jr z, .asm_17f66e + +.asm_17f667 + xor d + jr nz, .asm_17f674 + ld a, b + xor e + jr nz, .asm_17f674 + +.asm_17f66e + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + jr .asm_17f67d + +.asm_17f674 + inc hl + inc hl + dec c + jr nz, .asm_17f65d + +.asm_17f679 + ld a, $d9 + jr .asm_17f684 + +.asm_17f67d + hlcoord 2, 6 + call PlaceString + ret + +.asm_17f684 + sub $d0 + ld e, a + ld d, 0 + ld hl, Table_17f699 + add hl, de + add hl, de + ld a, [hli] + ld e, a + ld a, [hl] + ld d, a + hlcoord 2, 6 + call PlaceString + ret + +Table_17f699: + dw MobileErrorCode_101_000_Text + dw MobileErrorCode_101_001_Text + dw MobileErrorCode_101_002_Text + dw MobileErrorCode_101_003_Text + dw MobileErrorCode_101_004_Text + dw MobileErrorCode_101_005_Text + dw MobileErrorCode_101_006_Text + dw MobileErrorCode_101_007_Text + dw MobileErrorCode_101_008_Text + dw MobileErrorCode_101_009_Text + dw MobileErrorCode_101_009_Text + +Palette_17f6af: ; unreferenced + RGB 5, 5, 16 + RGB 8, 19, 28 + RGB 0, 0, 0 + RGB 31, 31, 31 + +Function17f6b7: + ld a, [wMobileErrorCodeBuffer] + call .bcd_two_digits + inc hl + ld a, [wMobileErrorCodeBuffer + 2] + and $f + call .bcd_digit + ld a, [wMobileErrorCodeBuffer + 1] + call .bcd_two_digits + ret + +.bcd_two_digits + ld c, a + and $f0 + swap a + call .bcd_digit + ld a, c + and $f + +.bcd_digit + add "0" + ld [hli], a + ret + +MobileCommunicationErrorText: + db "つうしんエラー   ー@" + +String_17f6e8: ; unreferenced + db "みていぎエラーです" + next "プログラム" + next "かくにん してください" + db "@" + +MobileErrorCodeTable: + dw MobileErrorCodes_10 + dw MobileErrorCodes_11 + dw MobileErrorCodes_12 + dw MobileErrorCodes_13 + dw MobileErrorCodes_14 + dw MobileErrorCodes_15 + dw MobileErrorCodes_16 + dw MobileErrorCodes_17 + dw MobileErrorCodes_20 + dw MobileErrorCodes_20 + dw MobileErrorCodes_20 + dw MobileErrorCodes_20 + dw MobileErrorCodes_20 + dw MobileErrorCodes_20 + dw MobileErrorCodes_20 + dw MobileErrorCodes_20 + dw MobileErrorCodes_20 + dw MobileErrorCodes_21 + dw MobileErrorCodes_22 + dw MobileErrorCodes_23 + dw MobileErrorCodes_24 + dw MobileErrorCodes_25 + dw MobileErrorCodes_26 + dw MobileErrorCodes_30 + dw MobileErrorCodes_30 + dw MobileErrorCodes_30 + dw MobileErrorCodes_30 + dw MobileErrorCodes_30 + dw MobileErrorCodes_30 + dw MobileErrorCodes_30 + dw MobileErrorCodes_30 + dw MobileErrorCodes_30 + dw MobileErrorCodes_30 + dw MobileErrorCodes_31 + dw MobileErrorCodes_32 + dw MobileErrorCodes_33 + +MobileErrorCodes_10: db 1 + dw $000, MobileErrorCode_10_000_Text + +MobileErrorCodes_11: db 1 + dw $000, MobileErrorCode_11_000_Text + +MobileErrorCodes_12: db 1 + dw $000, MobileErrorCode_12_000_Text + +MobileErrorCodes_13: db 1 + dw $000, MobileErrorCode_13_000_Text + +MobileErrorCodes_14: db 1 + dw $000, MobileErrorCode_14_000_Text + +MobileErrorCodes_15: db 4 + dw $000, MobileErrorCode_15_000_Text + dw $001, MobileErrorCode_15_001_Text + dw $002, MobileErrorCode_15_002_Text + dw $003, MobileErrorCode_15_003_Text + +MobileErrorCodes_16: db 1 + dw $000, MobileErrorCode_CommuncationErrorText + +MobileErrorCodes_17: db 1 + dw $000, MobileErrorCode_CommuncationErrorText + +MobileErrorCodes_20: db 1 + dw $000, MobileErrorCode_CommuncationErrorText + +MobileErrorCodes_21: db 1 + dw $000, MobileErrorCode_CommuncationErrorText + +MobileErrorCodes_22: db 1 + dw $000, MobileErrorCode_22_000_Text + +MobileErrorCodes_23: db 1 + dw $000, MobileErrorCode_23_000_Text + +MobileErrorCodes_24: db 1 + dw $000, MobileErrorCode_ServerConnectionFailedText + +MobileErrorCodes_25: db 1 + dw $000, MobileErrorCode_25_000_Text + +MobileErrorCodes_26: db 1 + dw $000, MobileErrorCode_26_000_Text + +MobileErrorCodes_30: db 17 + dw $000, MobileErrorCode_CommuncationErrorText + dw $221, MobileErrorCode_ServerConnectionFailedText + dw $421, MobileErrorCode_ServerConnectionFailedText + dw $450, MobileErrorCode_30_450_Text + dw $451, MobileErrorCode_ServerConnectionFailedText + dw $452, MobileErrorCode_ServerConnectionFailedText + dw $500, MobileErrorCode_CommuncationErrorText + dw $501, MobileErrorCode_CommuncationErrorText + dw $502, MobileErrorCode_CommuncationErrorText + dw $503, MobileErrorCode_CommuncationErrorText + dw $504, MobileErrorCode_CommuncationErrorText + dw $550, MobileErrorCode_30_550_Text + dw $551, MobileErrorCode_30_551_Text + dw $552, MobileErrorCode_ServerConnectionFailedText + dw $553, MobileErrorCode_30_553_Text + dw $554, MobileErrorCode_ServerConnectionFailedText + dw -1, MobileErrorCode_ServerConnectionFailedText + +MobileErrorCodes_31: db 5 + dw $000, MobileErrorCode_CommuncationErrorText + dw $002, MobileErrorCode_31_002_Text + dw $003, MobileErrorCode_31_003_Text + dw $004, MobileErrorCode_CommuncationErrorText + dw -1, MobileErrorCode_ServerConnectionFailedText + +MobileErrorCodes_32: db 17 + dw $000, MobileErrorCode_CommuncationErrorText + dw $301, MobileErrorCode_CommuncationErrorText + dw $302, MobileErrorCode_CommuncationErrorText + dw $400, MobileErrorCode_CommuncationErrorText + dw $401, MobileErrorCode_CommuncationErrorText + dw $403, MobileErrorCode_32_403_Text + dw $404, MobileErrorCode_32_404_Text + dw $405, MobileErrorCode_CommuncationErrorText + dw $406, MobileErrorCode_CommuncationErrorText + dw $407, MobileErrorCode_CommuncationErrorText + dw $408, MobileErrorCode_32_408_Text + dw $500, MobileErrorCode_ServerErrorText + dw $501, MobileErrorCode_CommuncationErrorText + dw $502, MobileErrorCode_ServerErrorText + dw $503, MobileErrorCode_32_503_Text + dw $504, MobileErrorCode_ServerErrorText + dw -1, MobileErrorCode_ServerErrorText + +MobileErrorCodes_33: db 19 + dw $101, MobileErrorCode_33_101_Text + dw $102, MobileErrorCode_33_102_Text + dw $103, MobileErrorCode_33_103_Text + dw $104, MobileErrorCode_33_104_Text + dw $105, MobileErrorCode_33_105_Text + dw $106, MobileErrorCode_33_106_Text + dw $201, MobileErrorCode_33_201_Text + dw $202, MobileErrorCode_CommuncationErrorText + dw $203, MobileErrorCode_33_203_Text + dw $204, MobileErrorCode_CommuncationErrorText + dw $205, MobileErrorCode_ServerErrorText + dw $206, MobileErrorCode_33_206_Text + dw $299, MobileErrorCode_33_299_Text + dw $301, MobileErrorCode_ServerErrorText + dw $401, MobileErrorCode_ServerErrorText + dw $402, MobileErrorCode_ServerErrorText + dw $403, MobileErrorCode_ServerErrorText + dw $404, MobileErrorCode_ServerErrorText + dw -1, MobileErrorCode_ServerErrorText + +MobileErrorCode_10_000_Text: +; The Mobile Adapter is not properly plugged in. +; Ensure you have taken a good look at and properly followed the instructions. + db "モバイルアダプタが ただしく" + next "さしこまれていません" + next "とりあつかいせつめいしょを" + next "ごらんのうえ しっかりと" + next "さしこんで ください" + db "@" + +MobileErrorCode_11_000_Text: +MobileErrorCode_13_000_Text: +; Could not connect because either the phone cannot make the call, or the telephone line is busy. +; Please wait for a while and call again. + db "でんわが うまく かけられないか" + next "でんわかいせんが こんでいるので" + next "つうしん できません" + next "しばらく まって" + next "かけなおして ください" + db "@" + +MobileErrorCode_12_000_Text: +; As the telephone line is busy, the phone was not able to gather enough information (?) +; Please wait for a while and call again. + db "でんわかいせんが こんでいるため" + next "でんわが かけられません" + next "しばらく まって" + next "かけなおして ください" + db "@" + +MobileErrorCode_15_000_Text: +MobileErrorCode_15_001_Text: +MobileErrorCode_15_002_Text: +MobileErrorCode_15_003_Text: +; There is an error with the Mobile Adapter. +; Please wait for a little while before calling again. +; If the problem persists, please contact the Mobile Support Center. + db "モバイルアダプタの エラーです" + next "しばらく まって" + next "かけなおして ください" + next "なおらない ときは" + next "モバイルサポートセンターへ" + next "おといあわせください" + db "@" + +MobileErrorCode_CommuncationErrorText: +; Communication error. +; Please wait a moment, and then try again. +; If the issue persists, please contact the Mobile Support Center. + db "つうしんエラーです" + next "しばらく まって" + next "かけなおして ください" + next "なおらない ときは" + next "モバイルサポートセンターへ" + next "おといあわせください" + db "@" + +MobileErrorCode_22_000_Text: +; There is a mistake either with the login password, or the login ID. +; Please confirm the password, wait for a while, and try again. + db "ログインパスワードか" + next "ログイン アイディーに" + next "まちがいがあります" + next "パスワードを かくにんして" + next "しばらく まって" + next "かけなおして ください" + db "@" + +MobileErrorCode_23_000_Text: +; The call was ended. +; Please see the instruction manual, wait a moment, and try again. + db "でんわが きれました" + next "とりあつかいせつめいしょを" + next "ごらんのうえ" + next "しばらく まって" + next "かけなおして ください" + db "@" + +MobileErrorCode_ServerErrorText: +; There was a communication error with the mobile center. +; Please wait a moment and then try again. + db "モバイルセンターの" + next "つうしんエラーです" + next "しばらくまって" + next "かけなおして ください" + db "@" + +MobileErrorCode_14_000_Text: +MobileErrorCode_25_000_Text: +; The Mobile Adapter's details have expired and the information is not correct. +; Please use the Mobile Trainer to repeat the initial registration (process). + db "モバイルアダプタに" + next "とうろくされた じょうほうが" + next "ただしく ありません" + next "モバイルトレーナーで" + next "しょきとうろくを してください" + db "@" + +MobileErrorCode_32_503_Text: +; Could not connect because the Mobile Center is busy. +; Please wait a moment and try again. +; For details, please see the instruction manual. + db "モバイルセンターが" + next "こんでいて つながりません" + next "しばらくまって" + next "かけなおして ください" + next "くわしくは とりあつかい" + next "せつめいしょを ごらんください" + db "@" + +MobileErrorCode_30_450_Text: +MobileErrorCode_30_550_Text: +MobileErrorCode_30_551_Text: +MobileErrorCode_30_553_Text: +; There is a mistake with the email address of the addressee. +; Please replace with a / the correct email address. + db "あてさき メールアドレスに" + next "まちがいがあります" + next "ただしい メールアドレスを" + next "いれなおしてください" + db "@" + +MobileErrorCode_31_002_Text: +; There is a mistake with the email address. +; Please see the instruction manual, and use the Mobile Trainer to repeat the initial registration (process). + db "メールアドレスに" + next "まちがいが あります" + next "とりあつかいせつめいしょを" + next "ごらんのうえ" + next "モバイルトレーナーで" + next "しょきとうろくを してください" + db "@" + +MobileErrorCode_31_003_Text: +MobileErrorCode_33_201_Text: +; There is either an error with the login password, or an error with the Mobile Center. +; Please confirm the password, wait a moment, and then try again. + db "ログインパスワードに" + next "まちがいが あるか" + next "モバイルセンターの エラーです" + next "パスワードを かくにんして" + next "しばらく まって" + next "かけなおして ください" + db "@" + +MobileErrorCode_32_403_Text: +MobileErrorCode_32_404_Text: +; Cannot read data. +; Please wait a moment, and then try again. +; If the issue persists, please contact the Mobile Support Center. + db "データの よみこみが できません" + next "しばらくまって" + next "かけなおして ください" + next "なおらない ときは" + next "モバイルサポートセンターへ" + next "おといあわせください" + db "@" + +MobileErrorCode_26_000_Text: +MobileErrorCode_32_408_Text: +; Out of time. +; The call was ended. +; Please try again. +; For details, please see the instruction manual. + db "じかんぎれです" + next "でんわが きれました" + next "でんわを かけなおしてください" + next "くわしくは とりあつかい" + next "せつめいしょを ごらんください" + db "@" + +MobileErrorCode_33_101_Text: +; The service cannot be used if payments for usage fees are late. +; For details, please see the instruction manual. + db "ごりよう りょうきんの " + next "おしはらいが おくれたばあいには" + next "ごりようが できなくなります" + next "くわしくは とりあつかい" + next "せつめいしょを ごらんください" + db "@" + +MobileErrorCode_33_102_Text: +MobileErrorCode_33_299_Text: +; Your access to this service has been restricted. Service cannot be used. +; For details, please see the instruction manual. + db "おきゃくさまの ごつごうにより" + next "ごりようできません" + next "くわしくは とりあつかい" + next "せつめいしょを ごらんください" + db "@" + +MobileErrorCode_ServerConnectionFailedText: +; The telephone line is busy. Due to this error, the Mobile Center cannot communicate. +; Please wait for a little while and call again. + db "でんわかいせんが こんでいるか" + next "モバイルセンターの エラーで" + next "つうしんが できません" + next "しばらく まって" + next "かけなおして ください" + db "@" + +MobileErrorCode_33_103_Text: +; Service cannot be used this month because usage fees have exceeded conditions. +; For details, please see the instruction manual. + db "ごりよう りょうきんが" + next "じょうげんを こえているため" + next "こんげつは ごりようできません" + next "くわしくは とりあつかい" + next "せつめいしょを ごらんください" + db "@" + +MobileErrorCode_33_106_Text: +; Cannot communicate because the Mobile Center is currently undergoing maintenance. +; Please wait a moment, then try again. + db "げんざい モバイルセンターの" + next "てんけんを しているので" + next "つうしんが できません" + next "しばらく まって" + next "かけなおして ください" + db "@" + +MobileErrorCode_33_104_Text: +MobileErrorCode_33_105_Text: +MobileErrorCode_33_203_Text: +MobileErrorCode_33_206_Text: +MobileErrorCode_101_004_Text: +; Cannot read data. +; For details, please see the instruction manual. + db "データの よみこみが できません" + next "くわしくは とりあつかい" + next "せつめいしょを ごらんください" + db "@" + +MobileErrorCode_101_006_Text: +; Call ended because more than 3 minutes elapsed with no input. + db "3ぷん いじょう なにも" + next "にゅうりょく しなかったので" + next "でんわが きれました" + db "@" + +MobileErrorCode_101_001_Text: +MobileErrorCode_101_002_Text: +; Could not connect properly. +; Please try again from the beginning (of the process). + db "つうしんが うまく" + next "できませんでした" + next "もういちど はじめから" + next "やりなおしてください" + db "@" + +MobileErrorCode_101_003_Text: +MobileErrorCode_101_008_Text: +MobileErrorCode_101_009_Text: +; Cannot read data. +; Please wait a moment, then try again. +; If the issue persists, please contact the Mobile Support Center. + db "データの よみこみが できません" + next "しばらくまって" + next "かけなおして ください" + next "なおらない ときは" + next "モバイルサポートセンターへ" + next "おといあわせください" + db "@" + +MobileErrorCode_101_007_Text: +; Call ended due to long waiting time. + db "まちじかんが ながいので" + next "でんわが きれました" + db "@" + +MobileErrorCode_101_005_Text: +; (Your adapter's) type differs from the other user’s Mobile Adapter. +; For details, please see the instruction manual. + db "あいての モバイルアダプタと" + next "タイプが ちがいます" + next "くわしくは とりあつかい" + next "せつめいしょを ごらんください" + db "@" + +String_17fe9a: ; unreferenced +; Cannot send your save data because Pokémon News is being updated. +; Please send your save data after loading new Pokémon News. + db "ポケモンニュースが" + next "あたらしくなっているので" + next "レポートを おくれません" + next "あたらしい ポケモンニュースの" + next "よみこみを さきに してください" + db "@" + +MobileErrorCode_101_000_Text: +; Either bad communication status, or the other user called was the incorrect user. +; Please confirm and try again. + db "つうしんの じょうきょうが" + next "よくないか かけるあいてが" + next "まちがっています" + next "もういちど かくにんをして" + next "でんわを かけなおして ください" + db "@" + +Function17ff23: + ldh a, [hJoyPressed] + and a + ret z + ld a, $8 + ld [wMusicFade], a + ld a, [wMapMusic] + ld [wMusicFadeID], a + xor a + ld [wMusicFadeID + 1], a + ld hl, wc303 + set 7, [hl] + ret + +Function17ff3c: + nop + ld a, [wMobileErrorCodeBuffer] + cp $d0 + ret c + hlcoord 10, 2 + ld de, String_17ff68 + call PlaceString + ld a, [wMobileErrorCodeBuffer] + push af + sub $d0 + inc a + ld [wMobileErrorCodeBuffer], a + hlcoord 14, 2 + ld de, wMobileErrorCodeBuffer + lb bc, PRINTNUM_LEADINGZEROS | 1, 3 + call PrintNum + pop af + ld [wMobileErrorCodeBuffer], a + and a + ret + +String_17ff68: + db "101@" diff --git a/mobile/mobile_menu.asm b/mobile/mobile_menu.asm new file mode 100644 index 0000000..be21f70 --- /dev/null +++ b/mobile/mobile_menu.asm @@ -0,0 +1,848 @@ +MainMenu_Mobile: + call ClearBGPalettes + ld a, MUSIC_MOBILE_ADAPTER_MENU + ld [wMapMusic], a + ld de, MUSIC_MOBILE_ADAPTER_MENU + call Function4a6c5 +Function49f0a: + call ClearBGPalettes + call Function4a3a7 + call Function4a492 + call ClearBGPalettes +Function49f16: + call MobileMenu_InitMenuBuffers + ld c, 12 + call DelayFrames + hlcoord 4, 0 + ld b, 10 + ld c, 10 + call Function48cdc + hlcoord 6, 2 + ld de, MobileString1 + call PlaceString + hlcoord 0, 12 + ld b, 4 + ld c, SCREEN_HEIGHT + call Textbox + xor a + ld de, String_0x49fe9 + hlcoord 1, 14 + call PlaceString + call WaitBGMap2 + call SetPalettes + call StaticMenuJoypad + ld hl, wMenuCursorY + ld b, [hl] + push bc + jr .check_buttons + +.joy_loop + call ScrollingMenuJoypad + ld hl, wMenuCursorY + ld b, [hl] + push bc + +.check_buttons + bit A_BUTTON_F, a + jr nz, .a_button + bit B_BUTTON_F, a + jr nz, .b_button + jr .next + +.a_button + ld hl, wMenuCursorY + ld a, [hl] + cp 1 + jp z, Function4a098 + cp 2 + jp z, Function4a0b9 + cp 3 + jp z, Function4a0c2 + cp 4 + jp z, Function4a100 + ld a, 1 + call MenuClickSound +.b_button + pop bc + call ClearBGPalettes + call ClearTilemap + ld a, MUSIC_MAIN_MENU + ld [wMapMusic], a + ld de, MUSIC_MAIN_MENU + call Function4a6c5 + ret + +.next + ld hl, wMenuCursorY + ld a, [hl] + dec a + ld hl, MobileStrings2 + call GetNthString + ld d, h + ld e, l + hlcoord 1, 13 + ld b, 4 + ld c, SCREEN_HEIGHT + call ClearBox + hlcoord 1, 14 + call PlaceString + jp .useless_jump + +.useless_jump + call MobileMenu_InitMenuBuffers + pop bc + ld hl, wMenuCursorY + ld [hl], b + ld b, $a + ld c, $1 + hlcoord 5, 1 + call ClearBox + jp .joy_loop + +MobileString1: + db "めいしフォルダー" + next "あいさつ" + next "プロフィール" + next "せい" + next "もどる" + db "@" + +MobileStrings2: +; string 0 +String_0x49fe9: + db "めいし¯つくったり" + next "ほぞんしておける フォルダーです@" +; string 1 + db "モバイルたいせんや じぶんのめいしで" + next "つかう あいさつ¯つくります@" +; string 2 + db "あなたじゅうしょや ねんれいの" + next "せい¯かえられます@" +; string 3 + db "モバイルセンターせつぞくするとき" + next "ひつような こと¯きめます@" +; string 4 + db "まえがめん もどります" + next "@" + +MobileMenu_InitMenuBuffers: + ld hl, w2DMenuCursorInitY + ld a, 2 + ld [hli], a + ld a, 5 ; w2DMenuCursorInitX + ld [hli], a + ld a, 5 ; w2DMenuNumRows + ld [hli], a + ld a, 1 ; w2DMenuNumCols + ld [hli], a + ld [hl], $0 ; w2DMenuFlags1 + set 5, [hl] + inc hl + xor a ; w2DMenuFlags2 + ld [hli], a + ld a, $20 ; w2DMenuCursorOffsets + ld [hli], a + ; could have done "ld a, A_BUTTON | D_UP | D_DOWN | B_BUTTON" instead + ld a, A_BUTTON + add D_UP + add D_DOWN + add B_BUTTON + ld [hli], a ; wMenuJoypadFilter + ld a, 1 + ld [hli], a ; wMenuCursorY, wMenuCursorX + ld [hli], a ; wMenuCursorY, wMenuCursorX + ret + +Function4a098: + ld a, 2 + call MenuClickSound + call PlaceHollowCursor + call WaitBGMap + call LoadStandardMenuHeader + farcall Function89de0 + call ExitMenu + call MG_Mobile_Layout_LoadPals + call Function4a485 + pop bc + jp Function49f16 + +Function4a0b9: + ld a, 2 + call MenuClickSound + pop bc + jp Function4a4c4 + +Function4a0c2: + ld a, 2 + call MenuClickSound + ld a, BANK(sPlayerData) + call OpenSRAM + ld hl, sPlayerData + wPlayerName - wPlayerData + ld de, wPlayerName + ld bc, NAME_LENGTH_JAPANESE + call CopyBytes + call CloseSRAM + farcall _LoadData + ld c, 2 + call DelayFrames + ld c, $1 + call InitMobileProfile + push af + call ClearBGPalettes + pop af + and a + jr nz, .skip_save + farcall _SaveData +.skip_save + ld c, 5 + call DelayFrames + jr asm_4a111 + +Function4a100: + ld a, 2 + call MenuClickSound + call ClearBGPalettes + call Function4a13b + call ClearBGPalettes + call ClearTilemap + +asm_4a111: + pop bc + call LoadFontsExtra + jp Function49f0a + +Function4a118: + ld hl, w2DMenuCursorInitY + ld a, $1 + ld [hli], a + ld a, $d + ld [hli], a + ld a, $3 + ld [hli], a + ld a, $1 + ld [hli], a + ld [hl], $0 + set 5, [hl] + inc hl + xor a + ld [hli], a + ld a, $20 + ld [hli], a + ld a, $1 + add $2 + ld [hli], a + ld a, $1 + ld [hli], a + ld [hli], a + ret + +Function4a13b: + call Function4a3a7 + call Function4a492 + call Function4a373 + ld c, 10 + call DelayFrames + +Function4a149: + hlcoord 1, 2 + ld b, $6 + ld c, $10 + call Function48cdc + hlcoord 3, 4 + ld de, String_4a1ef + call PlaceString + hlcoord 0, 12 + ld b, $4 + ld c, $12 + call Textbox + ld a, [wMenuCursorY] + dec a + ld hl, Strings_4a23d + call GetNthString + ld d, h + ld e, l + hlcoord 1, 13 + ld b, $4 + ld c, $12 + call ClearBox + hlcoord 1, 14 + call PlaceString + farcall Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + call SetPalettes + call StaticMenuJoypad + ld hl, wMenuCursorY + ld b, [hl] + push bc + jr asm_4a19d + +Function4a195: + call ScrollingMenuJoypad + ld hl, wMenuCursorY + ld b, [hl] + push bc + +asm_4a19d: + bit 0, a + jr nz, .asm_4a1a7 + bit 1, a + jr nz, .asm_4a1ba + jr .asm_4a1bc +.asm_4a1a7 + ld hl, wMenuCursorY + ld a, [hl] + cp $1 + jp z, Function4a20e + cp $2 + jp z, Function4a221 + ld a, $1 + call MenuClickSound +.asm_4a1ba + pop bc + ret +.asm_4a1bc + ld hl, wMenuCursorY + ld a, [hl] + dec a + ld hl, Strings_4a23d + call GetNthString + ld d, h + ld e, l + hlcoord 1, 13 + ld b, $4 + ld c, $12 + call ClearBox + hlcoord 1, 14 + call PlaceString + jr .asm_4a1db +.asm_4a1db + call Function4a373 + pop bc + ld hl, wMenuCursorY + ld [hl], b + lb bc, 6, 1 + hlcoord 2, 3 + call ClearBox + jp Function4a195 + +String_4a1ef: + db "モバイルセンター¯えらぶ" + next "ログインパスワード¯いれる" + next "もどる@" + +Function4a20e: + ld a, $1 + call MenuClickSound + farcall Function1719c8 + call ClearBGPalettes + call DelayFrame + jr Function4a239 + +Function4a221: + ld a, $1 + call MenuClickSound + call Function4a28a + jr c, Function4a239 + call Function4a373 + ld a, $2 + ld [wMenuCursorY], a + jr .asm_4a235 +.asm_4a235 + pop bc + jp Function4a149 + +Function4a239: + pop bc + jp Function4a13b + +Strings_4a23d: + db "いつも せつぞく¯する" + next "モバイルセンター¯えらびます@" + + db "モバイルセンターせつぞくするとき" + next "つかうパスワード¯ほぞんできます@" + + db "まえがめん もどります@" + + db "@" + +Function4a28a: + hlcoord 2, 3 + lb bc, 6, 1 + ld a, " " + call Function4a6d8 + call PlaceHollowCursor + call WaitBGMap + call LoadStandardMenuHeader + ld a, $5 + call OpenSRAM + ld a, [$aa4b] + call CloseSRAM + and a + jr z, .asm_4a2df + hlcoord 12, 0 + ld b, $5 + ld c, $6 + call Function48cdc + hlcoord 14, 1 + ld de, String_4a34b + call PlaceString + farcall Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + call Function4a118 + call ScrollingMenuJoypad + push af + call PlayClickSFX + pop af + bit B_BUTTON_F, a + jr nz, .quit + ld a, [wMenuCursorY] + cp $2 + jr z, .DeleteLoginPassword + cp $3 + jr z, .quit +.asm_4a2df + farcall Function11765d + call ClearBGPalettes + call ExitMenu + call LoadFontsExtra + scf + ret + +.DeleteLoginPassword: + call PlaceHollowCursor + ld hl, DeleteSavedLoginPasswordText + call PrintText + hlcoord 14, 7 + ld b, 3 + ld c, 4 + call Textbox + farcall Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + ld hl, DeletePassword_YesNo_MenuHeader + call LoadMenuHeader + call VerticalMenu + bit B_BUTTON_F, a + jr nz, .dont_delete_password + ld a, [wMenuCursorY] + cp $2 + jr z, .dont_delete_password + ld a, BANK(sMobileLoginPassword) + call OpenSRAM + ld hl, sMobileLoginPassword + xor a + ld bc, MOBILE_LOGIN_PASSWORD_LENGTH + call ByteFill + call CloseSRAM + ld hl, DeletedTheLoginPasswordText + call PrintText + call JoyWaitAorB +.dont_delete_password + call ExitMenu +.quit + call ExitMenu + farcall Mobile_OpenAndCloseMenu_HDMATransferTilemapAndAttrmap + xor a + ret + +MenuHeader_0x4a346: ; unreferenced + db MENU_BACKUP_TILES ; flags + menu_coords 12, 0, SCREEN_WIDTH - 1, 6 + +String_4a34b: + db "いれなおす" + next "けす" + next "もどる@" + +DeleteSavedLoginPasswordText: + text_far _DeleteSavedLoginPasswordText + text_end + +DeletedTheLoginPasswordText: + text_far _DeletedTheLoginPasswordText + text_end + +DeletePassword_YesNo_MenuHeader: + db MENU_BACKUP_TILES ; flags + menu_coords 14, 7, SCREEN_WIDTH - 1, TEXTBOX_Y - 1 + dw MenuData_0x4a36a + db 2 ; default option + +MenuData_0x4a36a: + db STATICMENU_CURSOR | STATICMENU_NO_TOP_SPACING | STATICMENU_WRAP ; flags + db 2 ; items + db "はい@" + db "いいえ@" + +Function4a373: + ld hl, w2DMenuCursorInitY + ld a, $4 + ld [hli], a + ld a, $2 + ld [hli], a + ld a, $3 + ld [hli], a + ld a, $1 + ld [hli], a + ld [hl], $0 + set 5, [hl] + inc hl + xor a + ld [hli], a + ld a, $20 + ld [hli], a + ld a, $1 + add $40 + add $80 + add $2 + ld [hli], a + ld a, $1 + ld [hli], a + ld [hli], a + ret + +Function4a39a: ; unreferenced + call Function4a485 + call Function4a492 + call Function4a3aa + call SetPalettes + ret + +Function4a3a7: + call Function4a485 +Function4a3aa: + hlcoord 0, 0 + lb bc, 3, 1 + xor a + call Function4a6d8 + lb bc, 1, 1 + ld a, $1 + call Function4a6d8 + lb bc, 1, 1 + xor a + call Function4a6d8 + lb bc, 1, 1 + ld a, $1 + call Function4a6d8 + lb bc, 4, 1 + ld a, $2 + call Function4a6d8 + lb bc, 1, 1 + ld a, $3 + call Function4a6d8 + lb bc, 1, 1 + ld a, " " + call Function4a6d8 + hlcoord 1, 0 + ld a, $1 + lb bc, 3, 18 + call Function4a6d8 + lb bc, 1, 18 + ld a, $0 + call Function4a6d8 + lb bc, 1, 18 + ld a, $1 + call Function4a6d8 + lb bc, 1, 18 + ld a, $2 + call Function4a6d8 + lb bc, 11, 18 + ld a, " " + call Function4a6d8 + hlcoord 19, 0 + lb bc, 3, 1 + ld a, $0 + call Function4a6d8 + lb bc, 1, 1 + ld a, $1 + call Function4a6d8 + lb bc, 1, 1 + xor a + call Function4a6d8 + lb bc, 1, 1 + ld a, $1 + call Function4a6d8 + lb bc, 4, 1 + ld a, $2 + call Function4a6d8 + lb bc, 1, 1 + ld a, $3 + call Function4a6d8 + lb bc, 1, 1 + ld a, " " + call Function4a6d8 + ret + +Function4a449: ; unreferenced + ld bc, 3 * SCREEN_WIDTH + ld a, $0 + hlcoord 0, 0 + call ByteFill + ld bc, 2 * SCREEN_WIDTH + ld a, $1 + call ByteFill + ld bc, 2 * SCREEN_WIDTH + ld a, $0 + call ByteFill + ld bc, 2 * SCREEN_WIDTH + ld a, $1 + call ByteFill + ld bc, SCREEN_WIDTH + ld a, $2 + call ByteFill + ld bc, SCREEN_WIDTH + ld a, $3 + call ByteFill + ld bc, SCREEN_WIDTH + ld a, " " + call ByteFill + ret + +Function4a485: + ld de, MobileMenuGFX + ld hl, vTiles2 tile $00 + lb bc, BANK(MobileMenuGFX), 13 + call Get2bpp + ret + +Function4a492: + call _CrystalCGB_MobileLayout0 + ret + +MainMenu_MobileStudium: + ld a, [wStartDay] + ld b, a + ld a, [wStartHour] + ld c, a + ld a, [wStartMinute] + ld d, a + ld a, [wStartSecond] + ld e, a + push bc + push de + farcall MobileStudium + call ClearBGPalettes + pop de + pop bc + ld a, b + ld [wStartDay], a + ld a, c + ld [wStartHour], a + ld a, d + ld [wStartMinute], a + ld a, e + ld [wStartSecond], a + ret + +Function4a4c4: + call ClearBGPalettes + call Function4a3a7 + call Function4a492 + call Function4a680 + call ClearBGPalettes + ld c, 20 + call DelayFrames + hlcoord 2, 0 + ld b, $a + ld c, $e + call Function48cdc + hlcoord 4, 2 + ld de, String_4a5c5 + call PlaceString + hlcoord 4, 4 + ld de, String_4a5cd + call PlaceString + hlcoord 4, 6 + ld de, String_4a5da + call PlaceString + hlcoord 4, 8 + ld de, String_4a5e6 + call PlaceString + hlcoord 4, 10 + ld de, String_4a5f2 + call PlaceString + hlcoord 0, 12 + ld b, $4 + ld c, $12 + call Textbox + xor a + ld hl, Strings_4a5f6 + ld d, h + ld e, l + hlcoord 1, 14 + call PlaceString + ld a, $1 + ld hl, Strings_4a5f6 + call GetNthString + ld d, h + ld e, l + hlcoord 1, 16 + call PlaceString + call WaitBGMap2 + call SetPalettes + call StaticMenuJoypad + ld hl, wMenuCursorY + ld b, [hl] + push bc + jr asm_4a54d + +Function4a545: + call ScrollingMenuJoypad + ld hl, wMenuCursorY + ld b, [hl] + push bc + +asm_4a54d: + bit 0, a + jr nz, .asm_4a557 + bit 1, a + jr nz, .asm_4a574 + jr .asm_4a57e +.asm_4a557 + ld hl, wMenuCursorY + ld a, [hl] + cp $1 + jp z, Function4a6ab + cp $2 + jp z, Function4a6ab + cp $3 + jp z, Function4a6ab + cp $4 + jp z, Function4a6ab + ld a, $1 + call MenuClickSound +.asm_4a574 + pop bc + call ClearBGPalettes + call ClearTilemap + jp Function49f0a +.asm_4a57e + ld hl, wMenuCursorY + ld a, [hl] + dec a + add a + push af + ld hl, Strings_4a5f6 + call GetNthString + ld d, h + ld e, l + hlcoord 1, 13 + ld b, $4 + ld c, $12 + call ClearBox + hlcoord 1, 14 + call PlaceString + pop af + inc a + ld hl, Strings_4a5f6 + call GetNthString + ld d, h + ld e, l + hlcoord 1, 16 + call PlaceString + jp Function4a5b0 + +Function4a5b0: + call Function4a680 + pop bc + ld hl, wMenuCursorY + ld [hl], b + ld b, $a + ld c, $1 + hlcoord 3, 1 + call ClearBox + jp Function4a545 + +String_4a5c5: + db "じこしょうかい@" +String_4a5cd: + db "たいせん はじまるとき@" +String_4a5da: + db "たいせん かったとき@" +String_4a5e6: + db "たいせん まけたとき@" +String_4a5f2: + db "もどる@" + +Strings_4a5f6: + db "めいし や ニュース のせる@" + db "あなたあいさつです@" + db "モバイル たいせんはじまるとき@" + db "あいてみえる あいさつです@" + db "モバイル たいせんで かったとき@" + db "あいてみえる あいさつです@" + db "モバイル たいせんで まけたとき@" + db "あいてみえる あいさつです@" + db "まえがめん もどります@" + db "@" + +Function4a680: + ld hl, w2DMenuCursorInitY + ld a, $2 + ld [hli], a + ld a, $3 + ld [hli], a + ld a, $5 + ld [hli], a + ld a, $1 + ld [hli], a + ld [hl], $0 + set 5, [hl] + inc hl + xor a + ld [hli], a + ld a, $20 + ld [hli], a + ld a, $1 + add $40 + add $80 + add $2 + ld [hli], a + ld a, $1 + ld [hli], a + ld [hli], a + xor a + ld [hli], a + ld [hli], a + ld [hli], a + ret + +Function4a6ab: + ld a, $2 + call MenuClickSound + call ClearBGPalettes + ld b, SCGB_DIPLOMA + call GetSGBLayout + farcall Function11c1ab + pop bc + call LoadFontsExtra + jp Function4a4c4 + +Function4a6c5: + ld a, $5 + ld [wMusicFade], a + ld a, e + ld [wMusicFadeID], a + ld a, d + ld [wMusicFadeID + 1], a + ld c, 22 + call DelayFrames + ret + +Function4a6d8: + push bc + push hl +.asm_4a6da + ld [hli], a + dec c + jr nz, .asm_4a6da + pop hl + ld bc, SCREEN_WIDTH + add hl, bc + pop bc + dec b + jr nz, Function4a6d8 + ret + +if DEF(_DEBUG) +MainMenu_DebugRoom: + farcall _DebugRoom + ret +endc diff --git a/mobile/news/news.asm b/mobile/news/news.asm new file mode 100644 index 0000000..e7264c2 --- /dev/null +++ b/mobile/news/news.asm @@ -0,0 +1,42 @@ +; http://forums.glitchcity.info/index.php?topic=7509.msg206449#msg206449 + + dab PlayersHouseDoll1Script ; related to "My Room" in Stadium 2? + +Function1f4003: ; unreferenced + ld a, BANK(s6_a000) + call OpenSRAM + ld hl, .news_data + ld de, s6_a000 + ld bc, $1000 + call CopyBytes + call CloseSRAM + ret + +.news_data +INCBIN "mobile/news/news_1.bin" + +Function1f4dbe: ; unreferenced + ld a, BANK(s6_a000) + call OpenSRAM + ld hl, .news_data + ld de, s6_a000 + ld bc, $1000 + call CopyBytes + call CloseSRAM + ret + +.news_data +INCBIN "mobile/news/news_2.bin" + +Function1f5d9f: ; unreferenced + ld a, BANK(s6_a000) + call OpenSRAM + ld hl, .news_data + ld de, s6_a000 + ld bc, $1000 + call CopyBytes + call CloseSRAM + ret + +.news_data +INCBIN "mobile/news/news_3.bin" diff --git a/mobile/news/news_1.bin b/mobile/news/news_1.bin new file mode 100644 index 0000000000000000000000000000000000000000..aa8c73e78d3f626258b69c3aed7f632a80c84fbd GIT binary patch literal 3494 zcmZQrzWGH5+XXs{_&M=!{2g6|o7e)`pjf{sGFEBo5{KCl0F8-gH z&EP-ZfByeq6YJ$K+zf!QRQDaavX6V;#EAX z^{du0tYlcrz{t$>Uy_wkh($t@v7Hgl^kV$4A;pk)_5#Blh8GNsj4&l%81&(4*clOQ zDMtPO3}6?if-Jr3zvuj(1JA=zgsxmVzvlq5&@ul#_gyxX25vlXeb1))sp}s1-1Wb9 zVb?w5`W*(lH-$6aWczRMpW){r)k%-%8rOqOf9}8OeErrP_Yc%BcYZv%e%tlSp+}Ex z^8(Asp4xQ(aOkF++b-AdxpjWuz2|{Y%Y+{Hdu_aNe&0QRusW~{<@esQ3cYZ1*AXw{ z?dSIfhHtvP>Gn~G9cum;Zk^u?2}5vj8t)C*y=l)qRj}^6{`^g=S3DN3-*bL%K!_?R zWaT#=K78VN0LTOK7jB-s>wo3a`Mm)|CxLK=c!vM~LHPgwXogq@7H|?sWhi54W0=Y? zlVK^tMutR&y-)~>d{D$QvoSI-{Fj`(tbgTWZ zM|K>(7jWqQf%?wIw$<#aTeoiC9dOy?W`J_iSqA0gvkZ(^nf@y$on=-|KFbJYvneN^ zWdgA;9M}X2jJy6@u0taPi;qNknUl|+WVprfiUB26M=-2s`2RlvoU&sW;-FqiV<=*% zW9Vk+XPC~gm|-KsRwzXElHR>tJL(}}9U#ip5CCH*h;lc>IbeUJoMm7<$NXO<=`5pi z%2`Gzn@Kt4EE9;$%mzx_AfFuEw7nkLBcz5JT2wM=GJrk4ndu1A6{dhR5HIEIW2O&G zf0+W9*cq9@nVXr3c>==}hX4N;gM(o{!$JmbP|Px}WWa=985kHbp)=zgCTtKCV9adl zNoP~ef+7o%9Kg=n%5aL|K0|;g2NN?B0|OfyqXYvJD=Py-z_v|T1P|Xs5o}^%W%(4) zyLv)^C?`Wey{gW`dz%837?jR3GQ^zaV^n5ThLiY-AH?_o$)FM!8VV8E8^_YCS! zA5j&0+<(^}UZ4e#n#A?Mxo+|rr|;jML$e)}1I>3(o*<-RV?|VK$n^`NW@Bb)V(4P{ z{~v_^|8HaHfFyo~3E(1aKEq;$6%1<`HZ$yC*vD{~;W)#2hU*OX8J;t|XZX(WpMjl` zpHZAq8VfW8*M5i;-_zK>I>2#_V?fK)9-ajOoR50~CUZDG4&aeoGdW<{WA1fJ1DYSt z-ViWvUDL$J0W&(+On{Vusb?7�^fr=Dem(o9gA8A`K2X;vuB2Bq1dGzXOC1ks?f z7*rK_-Pv}tJ_J(MfGV-)0U*)#Mjm-^oq!p7qP$$GXW3YVS>;)ESuI)JSc6#;S@T$H zSW(K;G=?08|NlYw|NjhzENFRJ#8AOd$I!yi!7!b18Pitg8!Qkg4sIDRvw%G9G8V%E-vbvH@M@J>x^h_l%58EWGG4oJ_wNIhh!l zSz?f_1O=`#lPHri6C(@Dc62?qO!`c=OpL57o6%*$nLL@onHbqvYS2w9WJ+c#WMX7z zd5*59o2izmn~9NwWg5DkrA*VAmNGGNvK&O#gBBd8nD#K8Vq#=q`HHUn3DY&ECrpft zEXwFI|Cl~7{bOQeVi84`kznRxmSARNW)VcT5)>Rp%qq-A%#187W#}?K%y!H^%#5ro zC(&inm?N0em>JnvqS0jJnwj-b0>7IP2tEM`Uy7JYO*TbP$IZ((NSWVwti z^BvPiHnGI8ZIh$0E=v#7A>voJDqog zhG|H`J6YDT>||l&-2rOc^%lUvUMcAcyTaq5lt zZhIE6@xYDe&z}dJ(!CW{3NC#hYCsCw8+q!%WjBoDxW*Bz1SA0|%V9F0G9AVSm+deP YxQvH!AZ0y_2QKqr97x#@?Vm{=KE7?^}u z*jboZVi*z_{zE|uLmC5%B%=@uLk2?uLp4J)Lp#G{hUpB88H5_Mv*nlIUA+5_Mw>R<_hi*M^a?geO9R|BMJrCS? z^nfZ@UUlE5ecMm@L)g1E@3|+x_m)-Y(R(Jwm+QA}-?ruYt(zx}L)GqC-Lk5myv9lP z=&hUEEyc45~&gL;sKcm22BJ8(~S-=RyJ_MG1v@bi%Bq{nlOAqL9tIluRLz^+^8 zjaBV7@4P2(vg^FD|JKW!4EEjJRzIm{GFTd9i2Q|{C-3@SxpaPSfDi*C1D^;BIFv)G-({zF?fnG#d&*;VtlA@INyfBLl<#?^gE$epuZL_-S@|^ZWj3<LanDKXdwxGZZQZu#ldRS&ZL$1cC0pMLK03)s4CXV0D$`W1jkm7~W%nrE(-e9R8g-n#s;-_K81w(qy{3*cTaxq9lp zd;2z>@;h~O&$gY1w_W$sdALLN)TW!~js1?^+qS9x{GFR1?Z3Be0$cuP+a|xCpZ;#! z2(DY)8A2I$F)*`(D+q2q1}=7SeNgGv^0-a-)V6&m>rX%0ye&YAA>(W!Ln1>a z10$=1B;yqZ=K23YVx8|Nn1qo;vOxV<^_$fnKLHXp6ub>zHp{Z_jz zH&3dChRmJXaHM|I=F2B_9)vT1c(QvAtDHCRm$|X-@qDiXH|{+T+;n@>?W6UVPu}&v zXkdJ~e#iNvJL)goJgM{Gc{szFi}h;vtmL-dJnFyy*3lcXAQM8b@7Ym*RBrp>tv9bd z4?J?&;NX$^{hJN$)$cjH>E^bh&-_mxxnZnwVAI)q^#bda}-g=l9u!z{n2|m4{kpTXV|*+e*M);$IctqUpV0J@Obv?_Q^-< zK^C42-F9!^CY=Y*>%;1|UNSzi`FS{Ig953_M{Y}mGepDN5{V4S(6&S>Lq0<_Lpwt^ z!wLpXMpH&RrU0e_rXD6x-3BSDK&=UIon9}0;bs7Yr3$LvVeEZ}E^PwWcuK6rt9V%J zSIuRZ$uO6J@eS91a4M3JWE5fguOY>dcXlhoL58yojEpexn+*DJHE)pE{~7fEGk~oE z+jQ4|&-pzEo`<6dUAc6A&jDniWBz;YyKE{A+<4&no=wmO1*mah3{ExSFgq<7_5XuX zG=t>iW&JB38`p2Uf1rNbroEd_`TzQ6bMaTWH;RmJ#^#J zCY^h-r?$ymzJC8eC`8%jgY}@2D0J)A?I4>kpM;rmanF$(2R3cnRKIKUksXKco$}wK zcW>9`E%%J;x9&Q6=hn?om;&Q^kfV-;9=U%2Y*hV$ZJR<5-`fjw4>VAO9`}1~ym5Zt zJxB`*9FpKB*@c_Cj(8bwKfgCH9FpR}A+6?r;nw-RkVuukc460rqg(f!-|G)*-hmo+ zm+QCPxp97Pz^;4SHbL5ZC;cZqo-2E3)8Tqh3IMg(c5mAANY(u@x9nvTkWvzoW<10H z{~-MTe>6iZJZY9Ov@uL&n8~n|VIxB#!(J!^B~4JGWM%`kT%mCVkHr93C_#fU;L!a8 z^^lMUMNq(HlbZp`NoN_9lg~0R?&JQioOG61Ir%Ijl+C7`e3l8szHneuJvdzM`fs^@ z50ZugFnuJ-%ba}nB*QI+R}3gE_Xvjd4FCT_TJJFoaZoR%F%&V>F?2KZgWK&J8MZ